From 15f80d7049c41c2787a36f372a6b533884ab862c Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 4 Sep 2022 19:52:30 +0200 Subject: [PATCH 001/131] Add initial header translation --- crates/header-translator/Cargo.toml | 14 +++ crates/header-translator/src/lib.rs | 137 +++++++++++++++++++++++++++ crates/header-translator/src/main.rs | 133 ++++++++++++++++++++++++++ 3 files changed, 284 insertions(+) create mode 100644 crates/header-translator/Cargo.toml create mode 100644 crates/header-translator/src/lib.rs create mode 100644 crates/header-translator/src/main.rs diff --git a/crates/header-translator/Cargo.toml b/crates/header-translator/Cargo.toml new file mode 100644 index 000000000..19fb9d18e --- /dev/null +++ b/crates/header-translator/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "header-translator" +version = "0.1.0" +edition = "2021" +publish = false + +repository = "https://github.com/madsmtm/objc2" +license = "Zlib OR Apache-2.0 OR MIT" + +[dependencies] +clang = { version = "2.0", features = ["runtime", "clang_10_0"] } +clang-sys = "1.0" +quote = "1.0" +proc-macro2 = "1.0" diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs new file mode 100644 index 000000000..6aa736ec6 --- /dev/null +++ b/crates/header-translator/src/lib.rs @@ -0,0 +1,137 @@ +use std::collections::HashMap; +use std::path::{Path, PathBuf}; + +use clang::source::File; +use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index, Type}; +use proc_macro2::{Ident, TokenStream}; +use quote::{format_ident, quote}; + +pub fn get_rust_name(selector: &str) -> Ident { + format_ident!("{}", selector.split(':').collect::>().join("_")) +} + +pub fn get_return_type(return_type: &Type<'_>) -> TokenStream { + // let return_item = ctx.resolve_item(sig.return_type()); + // if let TypeKind::Void = *return_item.get_kind().expect_type().kind() { + // quote! {} + // } else { + // let ret_ty = return_item.to_rust_ty_or_opaque(ctx, &()); + // quote! { + // -> #ret_ty + // } + // } + quote! {} +} + +pub fn get_macro_name(return_type: &Type<'_>) -> Ident { + if true { + format_ident!("msg_send") + } else { + format_ident!("msg_send_id") + } +} + +pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { + match entity.get_kind() { + EntityKind::InclusionDirective | EntityKind::MacroExpansion | EntityKind::ObjCClassRef => { + TokenStream::new() + } + EntityKind::ObjCInterfaceDecl => { + let name = format_ident!("{}", entity.get_name().expect("class name")); + let mut superclass = None; + let mut protocols = Vec::new(); + let mut methods = Vec::new(); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::ObjCSuperClassRef => { + superclass = Some(entity); + } + EntityKind::ObjCClassRef => { + println!("ObjCClassRef: {:?}", entity.get_display_name()); + } + EntityKind::ObjCProtocolRef => { + protocols.push(entity); + } + EntityKind::ObjCInstanceMethodDecl => { + let selector = entity.get_name().expect("instance method selector"); + let fn_name = get_rust_name(&selector); + + let result_type = entity + .get_result_type() + .expect("instance method return type"); + let ret = get_return_type(&result_type); + let macro_name = get_macro_name(&result_type); + + methods.push(quote! { + pub unsafe fn #fn_name(&self) #ret { + #macro_name![self, ] + } + }); + } + EntityKind::ObjCClassMethodDecl => { + let selector = entity.get_name().expect("class method selector"); + let fn_name = get_rust_name(&selector); + + let result_type = + entity.get_result_type().expect("class method return type"); + let ret = get_return_type(&result_type); + let macro_name = get_macro_name(&result_type); + + methods.push(quote! { + pub unsafe fn #fn_name() #ret { + #macro_name![Self::class(), ] + } + }); + } + EntityKind::ObjCPropertyDecl => { + methods.push(quote! {}); + } + _ => { + println!("{:?}: {:?}", entity.get_kind(), entity.get_display_name()); + } + } + EntityVisitResult::Continue + }); + + let superclass = superclass.expect("only classes with a superclass is supported"); + let superclass_name = + format_ident!("{}", superclass.get_name().expect("superclass name")); + + quote! { + extern_class!( + #[derive(Debug)] + struct #name; + + unsafe impl ClassType for #name { + type Super = #superclass_name; + } + ); + + impl #name { + #(#methods)* + } + } + } + EntityKind::ObjCCategoryDecl => { + quote! {} + } + _ => { + println!( + "Unknown: {:?}: {}", + entity.get_kind(), + entity + .get_display_name() + .unwrap_or_else(|| "`None`".to_string()) + ); + TokenStream::new() + } + } +} + +pub fn create_rust_file(entities: &[Entity<'_>]) -> TokenStream { + let mut iter = entities.iter().map(get_tokens); + quote! { + #(#iter)* + } +} diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs new file mode 100644 index 000000000..c78569544 --- /dev/null +++ b/crates/header-translator/src/main.rs @@ -0,0 +1,133 @@ +use std::collections::HashMap; +use std::path::{Path, PathBuf}; + +use clang::source::File; +use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index}; + +use header_translator::create_rust_file; + +fn main() { + // let sysroot = Path::new("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"); + let sysroot = Path::new("./ideas/MacOSX-SDK-changes/MacOSXA.B.C.sdk"); + let framework_path = sysroot.join("System/Library/Frameworks"); + + let clang = Clang::new().unwrap(); + + let index = Index::new(&clang, true, true); + + let _module_path = framework_path.join("module.map"); + + // for entry in framework_path.read_dir().unwrap() { + // let dir = entry.unwrap(); + // println!("{:?}", dir.file_name()); + // if dir.file_type().unwrap().is_dir() { + + let dir = framework_path.join("AppKit.framework").join("Headers"); + let header = dir.join("AppKit.h"); + + let tu = index + .parser(&header) + .detailed_preprocessing_record(true) + // .single_file_parse(true) + .skip_function_bodies(true) + .include_attributed_types(true) + .visit_implicit_attributes(true) + .retain_excluded_conditional_blocks(true) + .arguments(&[ + "-x", + "objective-c", + "-fobjc-arc", + "-fobjc-abi-version=2", // 3?? + // "-mmacosx-version-min=" + "-fparse-all-comments", + // "-fapinotes", + "-isysroot", + sysroot.to_str().unwrap(), + ]) + .parse() + .unwrap(); + + dbg!(&tu); + dbg!(tu.get_target()); + dbg!(tu.get_memory_usage()); + dbg!(tu.get_diagnostics()); + + let dbg_file = |file: File<'_>| { + dbg!( + &file, + file.get_module(), + file.get_skipped_ranges(), + file.is_include_guarded(), + // file.get_includes(), + // file.get_references(), + ); + }; + + dbg_file(tu.get_file(&header).unwrap()); + dbg_file(tu.get_file(&dir.join("NSAccessibility.h")).unwrap()); + let cursor_file = tu.get_file(&dir.join("NSCursor.h")).unwrap(); + dbg_file(cursor_file); + + let entity = tu.get_entity(); + + dbg!(&entity); + dbg!(entity.get_availability()); + + let mut entities_left = usize::MAX; + + let mut result: HashMap>> = HashMap::new(); + + entity.visit_children(|entity, _parent| { + // EntityKind::InclusionDirective + // if let Some(file) = entity.get_file() { + // let path = file.get_path(); + // if path.starts_with(&dir) { + // result.entry(path).or_default().push(entity); + // } + // } + if let Some(location) = entity.get_location() { + if let Some(file) = location.get_file_location().file { + let path = file.get_path(); + if path.starts_with(&dir) { + result.entry(path).or_default().push(entity); + } + // entities_left = 20; + // println!("{:?}: {}", entity.get_kind(), entity.get_display_name().unwrap_or_else(|| "`None`".to_string())); + // if entity.get_display_name().as_deref() == Some("TARGET_OS_IPHONE") { + // dbg!(&entity); + // dbg!(&entity.get_range()); + // dbg!(&entity.get_children()); + // } + } + } + + // if entities_left < 100 { + // dbg!(&entity); + // } + + // if let Some(left) = entities_left.checked_sub(1) { + // entities_left = left; + // EntityVisitResult::Recurse + // } else { + // EntityVisitResult::Break + // } + // if e.get_kind() == EntityKind::StructDecl { + // // EntityVisitResult::Recurse + // } else { + // EntityVisitResult::Break + // } + EntityVisitResult::Continue + }); + + // for entity in &result[&dir.join("NSCursor.h")] { + // println!("{:?}: {}", entity.get_kind(), entity.get_display_name().unwrap_or_else(|| "`None`".to_string())); + // if let Some(comment) = entity.get_comment() { + // println!("{}", comment); + // } + // } + + println!("{:#}", create_rust_file(&result[&dir.join("NSCursor.h")])); + + // } + // } +} From c8be96df59f9e80a98b95e32522e9e7e591d1d0a Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 7 Sep 2022 19:08:31 +0200 Subject: [PATCH 002/131] Closer to usable --- crates/header-translator/src/lib.rs | 182 ++++++++++++++++++++------- crates/header-translator/src/main.rs | 20 ++- 2 files changed, 154 insertions(+), 48 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 6aa736ec6..4b1bb9ecf 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -2,33 +2,104 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; use clang::source::File; -use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index, Type}; +use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index, Nullability, Type, TypeKind}; use proc_macro2::{Ident, TokenStream}; use quote::{format_ident, quote}; -pub fn get_rust_name(selector: &str) -> Ident { - format_ident!("{}", selector.split(':').collect::>().join("_")) +fn get_rust_name(selector: &str) -> Ident { + format_ident!( + "{}", + selector.trim_end_matches(|c| c == ':').replace(':', "_") + ) } -pub fn get_return_type(return_type: &Type<'_>) -> TokenStream { - // let return_item = ctx.resolve_item(sig.return_type()); - // if let TypeKind::Void = *return_item.get_kind().expect_type().kind() { - // quote! {} - // } else { - // let ret_ty = return_item.to_rust_ty_or_opaque(ctx, &()); - // quote! { - // -> #ret_ty - // } - // } - quote! {} -} +fn get_rust_type(ty: &Type<'_>) -> (TokenStream, bool) { + use TypeKind::*; -pub fn get_macro_name(return_type: &Type<'_>) -> Ident { - if true { - format_ident!("msg_send") - } else { - format_ident!("msg_send_id") - } + let tokens = match ty.get_kind() { + Void => quote!(c_void), + Bool => quote!(bool), + CharS | CharU => quote!(c_char), + SChar => quote!(c_schar), + UChar => quote!(c_uchar), + Short => quote!(c_short), + UShort => quote!(c_ushort), + Int => quote!(c_int), + UInt => quote!(c_uint), + Long => quote!(c_long), + ULong => quote!(c_ulong), + LongLong => quote!(c_longlong), + ULongLong => quote!(c_ulonglong), + Float => quote!(c_float), + Double => quote!(c_double), + // ObjCId => quote!(Option>), + // ObjCClass => quote!(Option<&Class>), + // ObjCSel => quote!(Option), + Pointer => { + let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); + let (ty_tokens, _) = get_rust_type(&pointee); + + // TODO: Nullability + if ty.is_const_qualified() { + quote!(*const #ty_tokens) + } else { + quote!(*mut #ty_tokens) + } + } + ObjCInterface => { + let base_ty = ty + .get_objc_object_base_type() + .expect("interface to have base type"); + if base_ty != *ty { + // TODO: Figure out what the base type is + panic!("base {:?} was not equal to {:?}", base_ty, ty); + } + let ident = format_ident!("{}", ty.get_display_name()); + quote!(#ident) + } + // ObjCObjectPointer => quote!(Option>), + Attributed => { + let nullability = ty + .get_nullability() + .expect("attributed type to have nullability"); + let modified = ty + .get_modified_type() + .expect("attributed type to have modified type"); + match modified.get_kind() { + ObjCObjectPointer => { + let pointee = modified + .get_pointee_type() + .expect("pointer type to have pointee"); + let (ty_tokens, _) = get_rust_type(&pointee); + if nullability == Nullability::NonNull { + return (quote!(Id<#ty_tokens, Shared>), true); + } else { + return (quote!(Option>), true); + } + } + Typedef => { + let (ty_tokens, _) = get_rust_type(&modified); + if nullability == Nullability::NonNull { + return (quote!(Id<#ty_tokens, Shared>), true); + } else { + return (quote!(Option>), true); + } + } + _ => panic!("Unsupported attributed type: {:?}", modified), + } + } + Typedef => { + let display_name = ty.get_display_name(); + if display_name == "instancetype" { + quote!(Self) + } else { + let ident = format_ident!("{}", ty.get_display_name()); + quote!(#ident) + } + } + _ => panic!("Unsupported type: {:?}", ty), + }; + (tokens, false) } pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { @@ -53,36 +124,53 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { EntityKind::ObjCProtocolRef => { protocols.push(entity); } - EntityKind::ObjCInstanceMethodDecl => { - let selector = entity.get_name().expect("instance method selector"); - let fn_name = get_rust_name(&selector); + kind @ (EntityKind::ObjCInstanceMethodDecl + | EntityKind::ObjCClassMethodDecl) => { + // TODO: Handle `NSConsumesSelf` and `NSReturnsRetained` + println!("Children: {:?}", entity.get_children()); - let result_type = entity - .get_result_type() - .expect("instance method return type"); - let ret = get_return_type(&result_type); - let macro_name = get_macro_name(&result_type); - - methods.push(quote! { - pub unsafe fn #fn_name(&self) #ret { - #macro_name![self, ] - } - }); - } - EntityKind::ObjCClassMethodDecl => { - let selector = entity.get_name().expect("class method selector"); + let selector = entity.get_name().expect("method selector"); let fn_name = get_rust_name(&selector); - let result_type = - entity.get_result_type().expect("class method return type"); - let ret = get_return_type(&result_type); - let macro_name = get_macro_name(&result_type); + if entity.is_variadic() { + panic!("Can't handle variadic methods"); + } + + let args = Vec::::new(); + let method_call = Vec::::new(); + + let result_type = entity.get_result_type().expect("method return type"); + let (ret, is_id) = if result_type.get_kind() == TypeKind::Void { + (quote! {}, false) + } else { + let (return_item, is_id) = get_rust_type(&result_type); + ( + quote! { + -> #return_item + }, + is_id, + ) + }; + + let macro_name = if is_id { + format_ident!("msg_send_id") + } else { + format_ident!("msg_send") + }; - methods.push(quote! { - pub unsafe fn #fn_name() #ret { - #macro_name![Self::class(), ] - } - }); + if EntityKind::ObjCInstanceMethodDecl == kind { + methods.push(quote! { + pub unsafe fn #fn_name(&self #(, #args)*) #ret { + #macro_name![self, #(#method_call),*] + } + }); + } else { + methods.push(quote! { + pub unsafe fn #fn_name(#(#args),*) #ret { + #macro_name![Self::class(), #(#method_call),*] + } + }); + } } EntityKind::ObjCPropertyDecl => { methods.push(quote! {}); diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index c78569544..738c326af 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,5 +1,7 @@ use std::collections::HashMap; +use std::io::Write; use std::path::{Path, PathBuf}; +use std::process::{Command, Stdio}; use clang::source::File; use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index}; @@ -126,7 +128,23 @@ fn main() { // } // } - println!("{:#}", create_rust_file(&result[&dir.join("NSCursor.h")])); + let res = format!("{}", create_rust_file(&result[&dir.join("NSCursor.h")])); + + println!("{}\n\n\n\n", res); + + let mut child = Command::new("rustfmt") + .stdin(Stdio::piped()) + .spawn() + .expect("failed running rustfmt"); + + let mut stdin = child.stdin.take().expect("failed to open stdin"); + stdin.write_all(res.as_bytes()).expect("failed writing"); + drop(stdin); + + println!( + "{}", + String::from_utf8(child.wait_with_output().expect("failed formatting").stdout).unwrap() + ); // } // } From 2315c688682f9a1754a9e76154009bd4bb9e9b28 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 7 Sep 2022 20:44:45 +0200 Subject: [PATCH 003/131] Mostly works with NSCursor --- crates/header-translator/src/lib.rs | 286 +++++++++++++++++++--------- 1 file changed, 198 insertions(+), 88 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 4b1bb9ecf..249d242cd 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -13,9 +13,8 @@ fn get_rust_name(selector: &str) -> Ident { ) } -fn get_rust_type(ty: &Type<'_>) -> (TokenStream, bool) { +fn get_simple_ty(ty: &Type<'_>) -> Option { use TypeKind::*; - let tokens = match ty.get_kind() { Void => quote!(c_void), Bool => quote!(bool), @@ -32,83 +31,198 @@ fn get_rust_type(ty: &Type<'_>) -> (TokenStream, bool) { ULongLong => quote!(c_ulonglong), Float => quote!(c_float), Double => quote!(c_double), + Typedef => { + let display_name = ty.get_display_name(); + match &*display_name { + "BOOL" => quote!(bool), + display_name => { + let ident = format_ident!("{}", display_name); + quote!(#ident) + } + } + } + _ => return None, + }; + Some(tokens) +} + +fn get_rust_type(ty: &Type<'_>, is_return: bool) -> (TokenStream, bool) { + use TypeKind::*; + + let tokens = match ty.get_kind() { // ObjCId => quote!(Option>), // ObjCClass => quote!(Option<&Class>), // ObjCSel => quote!(Option), Pointer => { let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); - let (ty_tokens, _) = get_rust_type(&pointee); + let pointee_tokens = get_simple_ty(&pointee).expect("pointer is simple type"); // TODO: Nullability if ty.is_const_qualified() { - quote!(*const #ty_tokens) + quote!(*const #pointee_tokens) } else { - quote!(*mut #ty_tokens) - } - } - ObjCInterface => { - let base_ty = ty - .get_objc_object_base_type() - .expect("interface to have base type"); - if base_ty != *ty { - // TODO: Figure out what the base type is - panic!("base {:?} was not equal to {:?}", base_ty, ty); + quote!(*mut #pointee_tokens) } - let ident = format_ident!("{}", ty.get_display_name()); - quote!(#ident) } // ObjCObjectPointer => quote!(Option>), Attributed => { let nullability = ty .get_nullability() .expect("attributed type to have nullability"); - let modified = ty + let ty = ty .get_modified_type() .expect("attributed type to have modified type"); - match modified.get_kind() { + match ty.get_kind() { ObjCObjectPointer => { - let pointee = modified - .get_pointee_type() - .expect("pointer type to have pointee"); - let (ty_tokens, _) = get_rust_type(&pointee); + let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + let tokens = match ty.get_kind() { + ObjCInterface => { + let base_ty = ty + .get_objc_object_base_type() + .expect("interface to have base type"); + if base_ty != ty { + // TODO: Figure out what the base type is + panic!("base {:?} was not equal to {:?}", base_ty, ty); + } + let ident = format_ident!("{}", ty.get_display_name()); + quote!(#ident) + } + _ => panic!("pointee was not objcinterface: {:?}", ty), + }; + let tokens = if is_return { + quote!(Id<#tokens, Shared>) + } else { + quote!(&#tokens) + }; if nullability == Nullability::NonNull { - return (quote!(Id<#ty_tokens, Shared>), true); + return (quote!(#tokens), true); } else { - return (quote!(Option>), true); + return (quote!(Option<#tokens>), true); } } - Typedef => { - let (ty_tokens, _) = get_rust_type(&modified); + Typedef if ty.get_display_name() == "instancetype" => { + if !is_return { + panic!("instancetype in non-return position") + } if nullability == Nullability::NonNull { - return (quote!(Id<#ty_tokens, Shared>), true); + return (quote!(Id), true); } else { - return (quote!(Option>), true); + return (quote!(Option>), true); } } - _ => panic!("Unsupported attributed type: {:?}", modified), + _ => panic!("Unsupported attributed type: {:?}", ty), } } - Typedef => { - let display_name = ty.get_display_name(); - if display_name == "instancetype" { - quote!(Self) + _ => { + if let Some(tokens) = get_simple_ty(&ty) { + tokens } else { - let ident = format_ident!("{}", ty.get_display_name()); - quote!(#ident) + panic!("Unsupported type: {:?}", ty) } } - _ => panic!("Unsupported type: {:?}", ty), }; (tokens, false) } +// One of EntityKind::ObjCInstanceMethodDecl or EntityKind::ObjCClassMethodDecl +fn parse_method(entity: Entity<'_>) -> TokenStream { + // println!("Method {:?}", entity.get_display_name()); + // println!("Availability: {:?}", entity.get_platform_availability()); + // TODO: Handle `NSConsumesSelf` and `NSReturnsRetained` + // println!("Children: {:?}", entity.get_children()); + + if entity.is_variadic() { + panic!("Can't handle variadic methods"); + } + + let selector = entity.get_name().expect("method selector"); + let fn_name = get_rust_name(&selector); + + let result_type = entity.get_result_type().expect("method return type"); + let (ret, is_id) = if result_type.get_kind() == TypeKind::Void { + (quote! {}, false) + } else { + let (return_item, is_id) = get_rust_type(&result_type, true); + ( + quote! { + -> #return_item + }, + is_id, + ) + }; + + let macro_name = if is_id { + format_ident!("msg_send_id") + } else { + format_ident!("msg_send") + }; + + let arguments: Vec<_> = entity + .get_arguments() + .expect("method arguments") + .into_iter() + .map(|arg| { + ( + format_ident!("{}", arg.get_name().expect("arg display name")), + arg.get_type().expect("argument type"), + ) + }) + .collect(); + + let fn_args = arguments.iter().map(|(param, arg_ty)| { + let (ty, _) = get_rust_type(&arg_ty, false); + quote!(#param: #ty) + }); + + let method_call = if selector.contains(':') { + let split_selector: Vec<_> = selector.split(':').filter(|sel| !sel.is_empty()).collect(); + assert!( + arguments.len() == split_selector.len(), + "incorrect method argument length", + ); + + let iter = arguments + .iter() + .zip(split_selector) + .map(|((param, _), sel)| { + let sel = format_ident!("{}", sel); + quote!(#sel: #param) + }); + quote!(#(#iter),*) + } else { + assert_eq!(arguments.len(), 0, "too many arguments"); + let sel = format_ident!("{}", selector); + quote!(#sel) + }; + + match entity.get_kind() { + EntityKind::ObjCInstanceMethodDecl => { + quote! { + pub unsafe fn #fn_name(&self #(, #fn_args)*) #ret { + #macro_name![self, #method_call] + } + } + } + EntityKind::ObjCClassMethodDecl => { + quote! { + pub unsafe fn #fn_name(#(#fn_args),*) #ret { + #macro_name![Self::class(), #method_call] + } + } + } + _ => panic!("unknown method kind"), + } +} + pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { match entity.get_kind() { EntityKind::InclusionDirective | EntityKind::MacroExpansion | EntityKind::ObjCClassRef => { TokenStream::new() } EntityKind::ObjCInterfaceDecl => { + // entity.get_mangled_objc_names() let name = format_ident!("{}", entity.get_name().expect("class name")); + // println!("Availability: {:?}", entity.get_platform_availability()); let mut superclass = None; let mut protocols = Vec::new(); let mut methods = Vec::new(); @@ -124,60 +238,19 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { EntityKind::ObjCProtocolRef => { protocols.push(entity); } - kind @ (EntityKind::ObjCInstanceMethodDecl - | EntityKind::ObjCClassMethodDecl) => { - // TODO: Handle `NSConsumesSelf` and `NSReturnsRetained` - println!("Children: {:?}", entity.get_children()); - - let selector = entity.get_name().expect("method selector"); - let fn_name = get_rust_name(&selector); - - if entity.is_variadic() { - panic!("Can't handle variadic methods"); - } - - let args = Vec::::new(); - let method_call = Vec::::new(); - - let result_type = entity.get_result_type().expect("method return type"); - let (ret, is_id) = if result_type.get_kind() == TypeKind::Void { - (quote! {}, false) - } else { - let (return_item, is_id) = get_rust_type(&result_type); - ( - quote! { - -> #return_item - }, - is_id, - ) - }; - - let macro_name = if is_id { - format_ident!("msg_send_id") - } else { - format_ident!("msg_send") - }; - - if EntityKind::ObjCInstanceMethodDecl == kind { - methods.push(quote! { - pub unsafe fn #fn_name(&self #(, #args)*) #ret { - #macro_name![self, #(#method_call),*] - } - }); - } else { - methods.push(quote! { - pub unsafe fn #fn_name(#(#args),*) #ret { - #macro_name![Self::class(), #(#method_call),*] - } - }); - } + EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { + methods.push(parse_method(entity)); } EntityKind::ObjCPropertyDecl => { - methods.push(quote! {}); - } - _ => { - println!("{:?}: {:?}", entity.get_kind(), entity.get_display_name()); + // println!( + // "Property {:?}, {:?}", + // entity.get_display_name().unwrap(), + // entity.get_objc_attributes().unwrap() + // ); + // methods.push(quote! {}); } + EntityKind::UnexposedAttr => {} + _ => panic!("Unknown {:?}", entity), } EntityVisitResult::Continue }); @@ -202,7 +275,44 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { } } EntityKind::ObjCCategoryDecl => { - quote! {} + let doc = entity.get_name().expect("category name"); + let mut class = None; + let mut methods = Vec::new(); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::ObjCClassRef => { + if class.is_some() { + panic!("could not find unique category class") + } + class = Some(entity); + } + EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { + methods.push(parse_method(entity)); + } + EntityKind::ObjCPropertyDecl => { + // println!( + // "Property {:?}, {:?}", + // entity.get_display_name().unwrap(), + // entity.get_objc_attributes().unwrap() + // ); + // methods.push(quote! {}); + } + EntityKind::UnexposedAttr => {} + _ => panic!("Unknown {:?}", entity), + } + EntityVisitResult::Continue + }); + + let class = class.expect("could not find category class"); + let class_name = format_ident!("{}", class.get_name().expect("class name")); + + quote! { + #[doc = #doc] + impl #class_name { + #(#methods)* + } + } } _ => { println!( From 197a05ee84826e8d9a78c0e82f38e4f98bf90e70 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 8 Sep 2022 13:48:54 +0200 Subject: [PATCH 004/131] Mostly works with NSAlert.h --- crates/header-translator/src/lib.rs | 111 +++++++++++++++++---------- crates/header-translator/src/main.rs | 2 +- 2 files changed, 73 insertions(+), 40 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 249d242cd..ceba7eb3c 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -50,14 +50,10 @@ fn get_rust_type(ty: &Type<'_>, is_return: bool) -> (TokenStream, bool) { use TypeKind::*; let tokens = match ty.get_kind() { - // ObjCId => quote!(Option>), - // ObjCClass => quote!(Option<&Class>), - // ObjCSel => quote!(Option), Pointer => { let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); let pointee_tokens = get_simple_ty(&pointee).expect("pointer is simple type"); - // TODO: Nullability if ty.is_const_qualified() { quote!(*const #pointee_tokens) } else { @@ -72,10 +68,39 @@ fn get_rust_type(ty: &Type<'_>, is_return: bool) -> (TokenStream, bool) { let ty = ty .get_modified_type() .expect("attributed type to have modified type"); - match ty.get_kind() { + let tokens = match ty.get_kind() { + ObjCId => quote!(Object), + ObjCClass => { + if nullability == Nullability::NonNull { + return (quote!(&Class), false); + } else { + return (quote!(Option<&Class>), false); + } + } + ObjCSel => { + if nullability == Nullability::NonNull { + return (quote!(Sel), false); + } else { + return (quote!(Option), false); + } + } + Pointer => { + let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); + let pointee_tokens = get_simple_ty(&pointee).expect("pointer is simple type"); + + if nullability == Nullability::NonNull { + return (quote!(NonNull<#pointee_tokens>), false); + } else { + if ty.is_const_qualified() { + return (quote!(*const #pointee_tokens), false); + } else { + return (quote!(*mut #pointee_tokens), false); + } + } + } ObjCObjectPointer => { let ty = ty.get_pointee_type().expect("pointer type to have pointee"); - let tokens = match ty.get_kind() { + match ty.get_kind() { ObjCInterface => { let base_ty = ty .get_objc_object_base_type() @@ -87,30 +112,35 @@ fn get_rust_type(ty: &Type<'_>, is_return: bool) -> (TokenStream, bool) { let ident = format_ident!("{}", ty.get_display_name()); quote!(#ident) } + ObjCObject => { + quote!(TodoGenerics) + } _ => panic!("pointee was not objcinterface: {:?}", ty), - }; - let tokens = if is_return { - quote!(Id<#tokens, Shared>) - } else { - quote!(&#tokens) - }; - if nullability == Nullability::NonNull { - return (quote!(#tokens), true); - } else { - return (quote!(Option<#tokens>), true); } } Typedef if ty.get_display_name() == "instancetype" => { if !is_return { panic!("instancetype in non-return position") } - if nullability == Nullability::NonNull { - return (quote!(Id), true); - } else { - return (quote!(Option>), true); - } + quote!(Self) + } + Typedef => { + quote!(TodoTypedef) + } + BlockPointer => { + quote!(TodoBlock) } _ => panic!("Unsupported attributed type: {:?}", ty), + }; + let tokens = if is_return { + quote!(Id<#tokens, Shared>) + } else { + quote!(&#tokens) + }; + if nullability == Nullability::NonNull { + return (quote!(#tokens), true); + } else { + return (quote!(Option<#tokens>), true); } } _ => { @@ -125,18 +155,21 @@ fn get_rust_type(ty: &Type<'_>, is_return: bool) -> (TokenStream, bool) { } // One of EntityKind::ObjCInstanceMethodDecl or EntityKind::ObjCClassMethodDecl -fn parse_method(entity: Entity<'_>) -> TokenStream { +fn parse_method(entity: Entity<'_>) -> Option { // println!("Method {:?}", entity.get_display_name()); // println!("Availability: {:?}", entity.get_platform_availability()); // TODO: Handle `NSConsumesSelf` and `NSReturnsRetained` // println!("Children: {:?}", entity.get_children()); + let selector = entity.get_name().expect("method selector"); + let fn_name = get_rust_name(&selector); + if entity.is_variadic() { - panic!("Can't handle variadic methods"); + println!("Can't handle variadic method {}", selector); + return None; } - let selector = entity.get_name().expect("method selector"); - let fn_name = get_rust_name(&selector); + println!("{}", selector); let result_type = entity.get_result_type().expect("method return type"); let (ret, is_id) = if result_type.get_kind() == TypeKind::Void { @@ -196,20 +229,16 @@ fn parse_method(entity: Entity<'_>) -> TokenStream { }; match entity.get_kind() { - EntityKind::ObjCInstanceMethodDecl => { - quote! { - pub unsafe fn #fn_name(&self #(, #fn_args)*) #ret { - #macro_name![self, #method_call] - } + EntityKind::ObjCInstanceMethodDecl => Some(quote! { + pub unsafe fn #fn_name(&self #(, #fn_args)*) #ret { + #macro_name![self, #method_call] } - } - EntityKind::ObjCClassMethodDecl => { - quote! { - pub unsafe fn #fn_name(#(#fn_args),*) #ret { - #macro_name![Self::class(), #method_call] - } + }), + EntityKind::ObjCClassMethodDecl => Some(quote! { + pub unsafe fn #fn_name(#(#fn_args),*) #ret { + #macro_name![Self::class(), #method_call] } - } + }), _ => panic!("unknown method kind"), } } @@ -239,7 +268,9 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { protocols.push(entity); } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - methods.push(parse_method(entity)); + if let Some(tokens) = parse_method(entity) { + methods.push(tokens); + } } EntityKind::ObjCPropertyDecl => { // println!( @@ -288,7 +319,9 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { class = Some(entity); } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - methods.push(parse_method(entity)); + if let Some(tokens) = parse_method(entity) { + methods.push(tokens); + } } EntityKind::ObjCPropertyDecl => { // println!( diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 738c326af..1b0479b2c 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -128,7 +128,7 @@ fn main() { // } // } - let res = format!("{}", create_rust_file(&result[&dir.join("NSCursor.h")])); + let res = format!("{}", create_rust_file(&result[&dir.join("NSAlert.h")])); println!("{}\n\n\n\n", res); From 2474385cfc3d4307e7ff22e064c5c24902f90f43 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 05:36:37 +0200 Subject: [PATCH 005/131] Refactor a bit --- crates/header-translator/src/lib.rs | 160 +++++++++++++--------------- 1 file changed, 77 insertions(+), 83 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index ceba7eb3c..f821f2cea 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -33,6 +33,7 @@ fn get_simple_ty(ty: &Type<'_>) -> Option { Double => quote!(c_double), Typedef => { let display_name = ty.get_display_name(); + // TODO: Handle typedefs properly match &*display_name { "BOOL" => quote!(bool), display_name => { @@ -46,102 +47,95 @@ fn get_simple_ty(ty: &Type<'_>) -> Option { Some(tokens) } -fn get_rust_type(ty: &Type<'_>, is_return: bool) -> (TokenStream, bool) { +fn get_id_type(tokens: TokenStream, is_return: bool, nullability: Nullability) -> TokenStream { + let tokens = if is_return { + quote!(Id<#tokens, Shared>) + } else { + quote!(&#tokens) + }; + if nullability == Nullability::NonNull { + quote!(#tokens) + } else { + quote!(Option<#tokens>) + } +} + +fn get_rust_type(mut ty: Type<'_>, is_return: bool) -> (TokenStream, bool) { use TypeKind::*; - let tokens = match ty.get_kind() { + let mut nullability = Nullability::Nullable; + let mut kind = ty.get_kind(); + if kind == Attributed { + nullability = ty + .get_nullability() + .expect("attributed type to have nullability"); + ty = ty + .get_modified_type() + .expect("attributed type to have modified type"); + kind = ty.get_kind(); + } + + let tokens = match kind { + ObjCId => { + return (get_id_type(quote!(Object), is_return, nullability), true); + } + ObjCClass => { + if nullability == Nullability::NonNull { + quote!(&Class) + } else { + quote!(Option<&Class>) + } + } + ObjCSel => { + if nullability == Nullability::NonNull { + quote!(Sel) + } else { + quote!(Option) + } + } Pointer => { let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); let pointee_tokens = get_simple_ty(&pointee).expect("pointer is simple type"); - if ty.is_const_qualified() { - quote!(*const #pointee_tokens) + if nullability == Nullability::NonNull { + quote!(NonNull<#pointee_tokens>) } else { - quote!(*mut #pointee_tokens) + if ty.is_const_qualified() { + quote!(*const #pointee_tokens) + } else { + quote!(*mut #pointee_tokens) + } } } - // ObjCObjectPointer => quote!(Option>), - Attributed => { - let nullability = ty - .get_nullability() - .expect("attributed type to have nullability"); - let ty = ty - .get_modified_type() - .expect("attributed type to have modified type"); + ObjCObjectPointer => { + let ty = ty.get_pointee_type().expect("pointer type to have pointee"); let tokens = match ty.get_kind() { - ObjCId => quote!(Object), - ObjCClass => { - if nullability == Nullability::NonNull { - return (quote!(&Class), false); - } else { - return (quote!(Option<&Class>), false); + ObjCInterface => { + let base_ty = ty + .get_objc_object_base_type() + .expect("interface to have base type"); + if base_ty != ty { + // TODO: Figure out what the base type is + panic!("base {:?} was not equal to {:?}", base_ty, ty); } + let ident = format_ident!("{}", ty.get_display_name()); + quote!(#ident) } - ObjCSel => { - if nullability == Nullability::NonNull { - return (quote!(Sel), false); - } else { - return (quote!(Option), false); - } - } - Pointer => { - let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); - let pointee_tokens = get_simple_ty(&pointee).expect("pointer is simple type"); - - if nullability == Nullability::NonNull { - return (quote!(NonNull<#pointee_tokens>), false); - } else { - if ty.is_const_qualified() { - return (quote!(*const #pointee_tokens), false); - } else { - return (quote!(*mut #pointee_tokens), false); - } - } - } - ObjCObjectPointer => { - let ty = ty.get_pointee_type().expect("pointer type to have pointee"); - match ty.get_kind() { - ObjCInterface => { - let base_ty = ty - .get_objc_object_base_type() - .expect("interface to have base type"); - if base_ty != ty { - // TODO: Figure out what the base type is - panic!("base {:?} was not equal to {:?}", base_ty, ty); - } - let ident = format_ident!("{}", ty.get_display_name()); - quote!(#ident) - } - ObjCObject => { - quote!(TodoGenerics) - } - _ => panic!("pointee was not objcinterface: {:?}", ty), - } - } - Typedef if ty.get_display_name() == "instancetype" => { - if !is_return { - panic!("instancetype in non-return position") - } - quote!(Self) - } - Typedef => { - quote!(TodoTypedef) - } - BlockPointer => { - quote!(TodoBlock) + ObjCObject => { + quote!(TodoGenerics) } - _ => panic!("Unsupported attributed type: {:?}", ty), - }; - let tokens = if is_return { - quote!(Id<#tokens, Shared>) - } else { - quote!(&#tokens) + _ => panic!("pointee was not objcinterface: {:?}", ty), }; - if nullability == Nullability::NonNull { - return (quote!(#tokens), true); - } else { - return (quote!(Option<#tokens>), true); + return (get_id_type(tokens, is_return, nullability), true); + } + Typedef if ty.get_display_name() == "instancetype" => { + if !is_return { + panic!("instancetype in non-return position") } + return (get_id_type(quote!(Self), is_return, nullability), true); + } + BlockPointer => { + quote!(TodoBlock) } _ => { if let Some(tokens) = get_simple_ty(&ty) { @@ -175,7 +169,7 @@ fn parse_method(entity: Entity<'_>) -> Option { let (ret, is_id) = if result_type.get_kind() == TypeKind::Void { (quote! {}, false) } else { - let (return_item, is_id) = get_rust_type(&result_type, true); + let (return_item, is_id) = get_rust_type(result_type, true); ( quote! { -> #return_item @@ -203,7 +197,7 @@ fn parse_method(entity: Entity<'_>) -> Option { .collect(); let fn_args = arguments.iter().map(|(param, arg_ty)| { - let (ty, _) = get_rust_type(&arg_ty, false); + let (ty, _) = get_rust_type(arg_ty.clone(), false); quote!(#param: #ty) }); From 91cc01cb93ce5a2c662181f60e36e463e8b3de9f Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 05:54:45 +0200 Subject: [PATCH 006/131] AppKit is now parse-able --- crates/header-translator/src/lib.rs | 112 ++++++++++++++++----------- crates/header-translator/src/main.rs | 32 ++++---- 2 files changed, 85 insertions(+), 59 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index f821f2cea..e79b16628 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -13,40 +13,6 @@ fn get_rust_name(selector: &str) -> Ident { ) } -fn get_simple_ty(ty: &Type<'_>) -> Option { - use TypeKind::*; - let tokens = match ty.get_kind() { - Void => quote!(c_void), - Bool => quote!(bool), - CharS | CharU => quote!(c_char), - SChar => quote!(c_schar), - UChar => quote!(c_uchar), - Short => quote!(c_short), - UShort => quote!(c_ushort), - Int => quote!(c_int), - UInt => quote!(c_uint), - Long => quote!(c_long), - ULong => quote!(c_ulong), - LongLong => quote!(c_longlong), - ULongLong => quote!(c_ulonglong), - Float => quote!(c_float), - Double => quote!(c_double), - Typedef => { - let display_name = ty.get_display_name(); - // TODO: Handle typedefs properly - match &*display_name { - "BOOL" => quote!(bool), - display_name => { - let ident = format_ident!("{}", display_name); - quote!(#ident) - } - } - } - _ => return None, - }; - Some(tokens) -} - fn get_id_type(tokens: TokenStream, is_return: bool, nullability: Nullability) -> TokenStream { let tokens = if is_return { quote!(Id<#tokens, Shared>) @@ -76,6 +42,21 @@ fn get_rust_type(mut ty: Type<'_>, is_return: bool) -> (TokenStream, bool) { } let tokens = match kind { + Void => quote!(c_void), + Bool => quote!(bool), + CharS | CharU => quote!(c_char), + SChar => quote!(c_schar), + UChar => quote!(c_uchar), + Short => quote!(c_short), + UShort => quote!(c_ushort), + Int => quote!(c_int), + UInt => quote!(c_uint), + Long => quote!(c_long), + ULong => quote!(c_ulong), + LongLong => quote!(c_longlong), + ULongLong => quote!(c_ulonglong), + Float => quote!(c_float), + Double => quote!(c_double), ObjCId => { return (get_id_type(quote!(Object), is_return, nullability), true); } @@ -94,8 +75,10 @@ fn get_rust_type(mut ty: Type<'_>, is_return: bool) -> (TokenStream, bool) { } } Pointer => { + println!("{:?}", &ty); let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); - let pointee_tokens = get_simple_ty(&pointee).expect("pointer is simple type"); + println!("{:?}", &pointee); + let (pointee_tokens, _) = get_rust_type(pointee, false); if nullability == Nullability::NonNull { quote!(NonNull<#pointee_tokens>) @@ -124,6 +107,9 @@ fn get_rust_type(mut ty: Type<'_>, is_return: bool) -> (TokenStream, bool) { ObjCObject => { quote!(TodoGenerics) } + Attributed => { + quote!(TodoAttributed) + } _ => panic!("pointee was not objcinterface: {:?}", ty), }; return (get_id_type(tokens, is_return, nullability), true); @@ -134,15 +120,37 @@ fn get_rust_type(mut ty: Type<'_>, is_return: bool) -> (TokenStream, bool) { } return (get_id_type(quote!(Self), is_return, nullability), true); } + Typedef => { + let display_name = ty.get_display_name(); + let display_name = display_name.strip_prefix("const ").unwrap_or(&display_name); + // TODO: Handle typedefs properly + match &*display_name { + "BOOL" => quote!(bool), + display_name => { + let ident = format_ident!("{}", display_name); + quote!(#ident) + } + } + } BlockPointer => { quote!(TodoBlock) } + FunctionPrototype => { + quote!(TodoFunction) + } + IncompleteArray => quote!(TodoArray), + ConstantArray => { + let (element_type, _) = get_rust_type( + ty.get_element_type().expect("array to have element type"), + false, + ); + let num_elements = ty + .get_size() + .expect("constant array to have element length"); + quote!([#element_type; #num_elements]) + } _ => { - if let Some(tokens) = get_simple_ty(&ty) { - tokens - } else { - panic!("Unsupported type: {:?}", ty) - } + panic!("Unsupported type: {:?}", ty) } }; (tokens, false) @@ -274,8 +282,15 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { // ); // methods.push(quote! {}); } + EntityKind::TemplateTypeParameter => { + println!("TODO: Template parameters") + } + EntityKind::VisibilityAttr => { + // NS_CLASS_AVAILABLE_MAC?? + println!("TODO: VisibilityAttr") + } EntityKind::UnexposedAttr => {} - _ => panic!("Unknown {:?}", entity), + _ => panic!("Unknown in ObjCInterfaceDecl {:?}", entity), } EntityVisitResult::Continue }); @@ -300,8 +315,14 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { } } EntityKind::ObjCCategoryDecl => { - let doc = entity.get_name().expect("category name"); + let meta = if let Some(doc) = entity.get_name() { + quote!(#[doc = #doc]) + } else { + // Some categories don't have a name. Example: NSClipView + quote!() + }; let mut class = None; + let mut protocols = Vec::new(); let mut methods = Vec::new(); entity.visit_children(|entity, _parent| { @@ -312,6 +333,9 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { } class = Some(entity); } + EntityKind::ObjCProtocolRef => { + protocols.push(entity); + } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { if let Some(tokens) = parse_method(entity) { methods.push(tokens); @@ -326,7 +350,7 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { // methods.push(quote! {}); } EntityKind::UnexposedAttr => {} - _ => panic!("Unknown {:?}", entity), + _ => panic!("Unknown in ObjCCategoryDecl {:?}", entity), } EntityVisitResult::Continue }); @@ -335,7 +359,7 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { let class_name = format_ident!("{}", class.get_name().expect("class name")); quote! { - #[doc = #doc] + #meta impl #class_name { #(#methods)* } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 1b0479b2c..e8931311f 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::BTreeMap; use std::io::Write; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; @@ -77,7 +77,7 @@ fn main() { let mut entities_left = usize::MAX; - let mut result: HashMap>> = HashMap::new(); + let mut result: BTreeMap>> = BTreeMap::new(); entity.visit_children(|entity, _parent| { // EntityKind::InclusionDirective @@ -128,23 +128,25 @@ fn main() { // } // } - let res = format!("{}", create_rust_file(&result[&dir.join("NSAlert.h")])); + for res in result.values() { + let res = format!("{}", create_rust_file(&res)); - println!("{}\n\n\n\n", res); + println!("{}\n\n\n\n", res); - let mut child = Command::new("rustfmt") - .stdin(Stdio::piped()) - .spawn() - .expect("failed running rustfmt"); + let mut child = Command::new("rustfmt") + .stdin(Stdio::piped()) + .spawn() + .expect("failed running rustfmt"); - let mut stdin = child.stdin.take().expect("failed to open stdin"); - stdin.write_all(res.as_bytes()).expect("failed writing"); - drop(stdin); + let mut stdin = child.stdin.take().expect("failed to open stdin"); + stdin.write_all(res.as_bytes()).expect("failed writing"); + drop(stdin); - println!( - "{}", - String::from_utf8(child.wait_with_output().expect("failed formatting").stdout).unwrap() - ); + println!( + "{}", + String::from_utf8(child.wait_with_output().expect("failed formatting").stdout).unwrap() + ); + } // } // } From d09866c9dfd19d321c9c78b1af2ef1c7c1113c41 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 06:04:43 +0200 Subject: [PATCH 007/131] handle reserved keywords --- crates/header-translator/src/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index e79b16628..45f0f83d6 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -13,6 +13,13 @@ fn get_rust_name(selector: &str) -> Ident { ) } +fn handle_reserved(s: &str) -> &str { + match s { + "type" => "type_", + s => s, + } +} + fn get_id_type(tokens: TokenStream, is_return: bool, nullability: Nullability) -> TokenStream { let tokens = if is_return { quote!(Id<#tokens, Shared>) @@ -198,7 +205,10 @@ fn parse_method(entity: Entity<'_>) -> Option { .into_iter() .map(|arg| { ( - format_ident!("{}", arg.get_name().expect("arg display name")), + format_ident!( + "{}", + handle_reserved(&arg.get_name().expect("arg display name")) + ), arg.get_type().expect("argument type"), ) }) From 556a5d87e01680327a5e097b6d1e83742ca30c87 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 07:24:38 +0200 Subject: [PATCH 008/131] Handle protocols somewhat --- crates/header-translator/src/lib.rs | 52 ++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 45f0f83d6..78b5195b9 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -251,15 +251,16 @@ fn parse_method(entity: Entity<'_>) -> Option { #macro_name![Self::class(), #method_call] } }), - _ => panic!("unknown method kind"), + _ => unreachable!("unknown method kind"), } } pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { match entity.get_kind() { - EntityKind::InclusionDirective | EntityKind::MacroExpansion | EntityKind::ObjCClassRef => { - TokenStream::new() - } + EntityKind::InclusionDirective + | EntityKind::MacroExpansion + | EntityKind::ObjCClassRef + | EntityKind::MacroDefinition => TokenStream::new(), EntityKind::ObjCInterfaceDecl => { // entity.get_mangled_objc_names() let name = format_ident!("{}", entity.get_name().expect("class name")); @@ -375,6 +376,49 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { } } } + EntityKind::ObjCProtocolDecl => { + let name = format_ident!("{}", entity.get_name().expect("protocol name")); + let mut protocols = Vec::new(); + let mut methods = Vec::new(); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::ObjCExplicitProtocolImpl => { + // TODO + } + EntityKind::ObjCProtocolRef => { + protocols.push(entity); + } + EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { + // TODO: Required vs. optional methods + if let Some(tokens) = parse_method(entity) { + methods.push(tokens); + } + } + EntityKind::ObjCPropertyDecl => { + // TODO + } + EntityKind::UnexposedAttr => {} + _ => panic!("Unknown in ObjCProtocolDecl {:?}", entity), + } + EntityVisitResult::Continue + }); + + quote! { + extern_protocol!( + #[derive(Debug)] + struct #name; + + unsafe impl ProtocolType for #name { + type Super = todo!(); + } + ); + + impl #name { + #(#methods)* + } + } + } _ => { println!( "Unknown: {:?}: {}", From f3093fc3a3b3d853fcfedb98713a1dba96ffc9cc Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 07:27:28 +0200 Subject: [PATCH 009/131] Handle the few remaining entity kinds --- crates/header-translator/src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 78b5195b9..766747bc4 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -260,6 +260,7 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { EntityKind::InclusionDirective | EntityKind::MacroExpansion | EntityKind::ObjCClassRef + | EntityKind::ObjCProtocolRef | EntityKind::MacroDefinition => TokenStream::new(), EntityKind::ObjCInterfaceDecl => { // entity.get_mangled_objc_names() @@ -419,8 +420,16 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { } } } + EntityKind::EnumDecl + | EntityKind::VarDecl + | EntityKind::FunctionDecl + | EntityKind::TypedefDecl + | EntityKind::StructDecl => { + // TODO + TokenStream::new() + } _ => { - println!( + panic!( "Unknown: {:?}: {}", entity.get_kind(), entity From fb6096cf5dead625bd3dc636c7e112c0d0958598 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 07:41:55 +0200 Subject: [PATCH 010/131] Works with Foundation --- crates/header-translator/src/lib.rs | 38 +++++++++++++++++++++++----- crates/header-translator/src/main.rs | 12 ++++----- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 766747bc4..fc96cffaf 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -36,12 +36,18 @@ fn get_id_type(tokens: TokenStream, is_return: bool, nullability: Nullability) - fn get_rust_type(mut ty: Type<'_>, is_return: bool) -> (TokenStream, bool) { use TypeKind::*; - let mut nullability = Nullability::Nullable; + let mut nullability = Nullability::Unspecified; let mut kind = ty.get_kind(); - if kind == Attributed { - nullability = ty + while kind == Attributed { + let new = ty .get_nullability() .expect("attributed type to have nullability"); + nullability = match (nullability, new) { + (Nullability::NonNull, Nullability::Nullable) => Nullability::Nullable, + (Nullability::NonNull, _) => Nullability::NonNull, + (Nullability::Nullable, _) => Nullability::Nullable, + (Nullability::Unspecified, new) => new, + }; ty = ty .get_modified_type() .expect("attributed type to have modified type"); @@ -266,14 +272,24 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { // entity.get_mangled_objc_names() let name = format_ident!("{}", entity.get_name().expect("class name")); // println!("Availability: {:?}", entity.get_platform_availability()); - let mut superclass = None; + let mut superclass_name = None; let mut protocols = Vec::new(); let mut methods = Vec::new(); entity.visit_children(|entity, _parent| { match entity.get_kind() { + EntityKind::ObjCIvarDecl => { + // Explicitly ignored + } EntityKind::ObjCSuperClassRef => { - superclass = Some(entity); + superclass_name = Some(format_ident!( + "{}", + entity.get_name().expect("superclass name") + )); + } + EntityKind::ObjCRootClass => { + // TODO: Maybe just skip root classes entirely? + superclass_name = Some(format_ident!("Object")); } EntityKind::ObjCClassRef => { println!("ObjCClassRef: {:?}", entity.get_display_name()); @@ -301,15 +317,20 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { // NS_CLASS_AVAILABLE_MAC?? println!("TODO: VisibilityAttr") } + EntityKind::TypeRef => { + // TODO + } + EntityKind::ObjCException => { + // Maybe useful for knowing when to implement `Error` for the type + } EntityKind::UnexposedAttr => {} _ => panic!("Unknown in ObjCInterfaceDecl {:?}", entity), } EntityVisitResult::Continue }); - let superclass = superclass.expect("only classes with a superclass is supported"); let superclass_name = - format_ident!("{}", superclass.get_name().expect("superclass name")); + superclass_name.expect("only classes with a superclass is supported"); quote! { extern_class!( @@ -361,6 +382,9 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { // ); // methods.push(quote! {}); } + EntityKind::TemplateTypeParameter => { + println!("TODO: Template parameters") + } EntityKind::UnexposedAttr => {} _ => panic!("Unknown in ObjCCategoryDecl {:?}", entity), } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index e8931311f..2b523ec18 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -24,8 +24,8 @@ fn main() { // println!("{:?}", dir.file_name()); // if dir.file_type().unwrap().is_dir() { - let dir = framework_path.join("AppKit.framework").join("Headers"); - let header = dir.join("AppKit.h"); + let dir = framework_path.join("Foundation.framework").join("Headers"); + let header = dir.join("Foundation.h"); let tu = index .parser(&header) @@ -65,10 +65,10 @@ fn main() { ); }; - dbg_file(tu.get_file(&header).unwrap()); - dbg_file(tu.get_file(&dir.join("NSAccessibility.h")).unwrap()); - let cursor_file = tu.get_file(&dir.join("NSCursor.h")).unwrap(); - dbg_file(cursor_file); + // dbg_file(tu.get_file(&header).unwrap()); + // dbg_file(tu.get_file(&dir.join("NSAccessibility.h")).unwrap()); + // let cursor_file = tu.get_file(&dir.join("NSCursor.h")).unwrap(); + // dbg_file(cursor_file); let entity = tu.get_entity(); From 399afc81718a26bff79f28b6d303faffd2ce66ad Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 07:43:47 +0200 Subject: [PATCH 011/131] Cleanup --- crates/header-translator/src/lib.rs | 17 +++-------------- crates/header-translator/src/main.rs | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index fc96cffaf..af557b544 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -1,8 +1,4 @@ -use std::collections::HashMap; -use std::path::{Path, PathBuf}; - -use clang::source::File; -use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index, Nullability, Type, TypeKind}; +use clang::{Entity, EntityKind, EntityVisitResult, Nullability, Type, TypeKind}; use proc_macro2::{Ident, TokenStream}; use quote::{format_ident, quote}; @@ -453,20 +449,13 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { TokenStream::new() } _ => { - panic!( - "Unknown: {:?}: {}", - entity.get_kind(), - entity - .get_display_name() - .unwrap_or_else(|| "`None`".to_string()) - ); - TokenStream::new() + panic!("Unknown: {:?}", entity) } } } pub fn create_rust_file(entities: &[Entity<'_>]) -> TokenStream { - let mut iter = entities.iter().map(get_tokens); + let iter = entities.iter().map(get_tokens); quote! { #(#iter)* } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 2b523ec18..734afc36c 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -54,17 +54,17 @@ fn main() { dbg!(tu.get_memory_usage()); dbg!(tu.get_diagnostics()); - let dbg_file = |file: File<'_>| { - dbg!( - &file, - file.get_module(), - file.get_skipped_ranges(), - file.is_include_guarded(), - // file.get_includes(), - // file.get_references(), - ); - }; - + // let dbg_file = |file: File<'_>| { + // dbg!( + // &file, + // file.get_module(), + // file.get_skipped_ranges(), + // file.is_include_guarded(), + // // file.get_includes(), + // // file.get_references(), + // ); + // }; + // // dbg_file(tu.get_file(&header).unwrap()); // dbg_file(tu.get_file(&dir.join("NSAccessibility.h")).unwrap()); // let cursor_file = tu.get_file(&dir.join("NSCursor.h")).unwrap(); From 61535ee730f87b7e2c316dc3ba7554f2cd74b85d Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 08:08:47 +0200 Subject: [PATCH 012/131] Refactor --- crates/header-translator/src/lib.rs | 273 +--------------------- crates/header-translator/src/method.rs | 123 ++++++++++ crates/header-translator/src/rust_type.rs | 171 ++++++++++++++ 3 files changed, 305 insertions(+), 262 deletions(-) create mode 100644 crates/header-translator/src/method.rs create mode 100644 crates/header-translator/src/rust_type.rs diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index af557b544..b53b953e8 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -1,261 +1,10 @@ -use clang::{Entity, EntityKind, EntityVisitResult, Nullability, Type, TypeKind}; -use proc_macro2::{Ident, TokenStream}; +use clang::{Entity, EntityKind, EntityVisitResult}; +use proc_macro2::TokenStream; use quote::{format_ident, quote}; -fn get_rust_name(selector: &str) -> Ident { - format_ident!( - "{}", - selector.trim_end_matches(|c| c == ':').replace(':', "_") - ) -} - -fn handle_reserved(s: &str) -> &str { - match s { - "type" => "type_", - s => s, - } -} - -fn get_id_type(tokens: TokenStream, is_return: bool, nullability: Nullability) -> TokenStream { - let tokens = if is_return { - quote!(Id<#tokens, Shared>) - } else { - quote!(&#tokens) - }; - if nullability == Nullability::NonNull { - quote!(#tokens) - } else { - quote!(Option<#tokens>) - } -} - -fn get_rust_type(mut ty: Type<'_>, is_return: bool) -> (TokenStream, bool) { - use TypeKind::*; - - let mut nullability = Nullability::Unspecified; - let mut kind = ty.get_kind(); - while kind == Attributed { - let new = ty - .get_nullability() - .expect("attributed type to have nullability"); - nullability = match (nullability, new) { - (Nullability::NonNull, Nullability::Nullable) => Nullability::Nullable, - (Nullability::NonNull, _) => Nullability::NonNull, - (Nullability::Nullable, _) => Nullability::Nullable, - (Nullability::Unspecified, new) => new, - }; - ty = ty - .get_modified_type() - .expect("attributed type to have modified type"); - kind = ty.get_kind(); - } - - let tokens = match kind { - Void => quote!(c_void), - Bool => quote!(bool), - CharS | CharU => quote!(c_char), - SChar => quote!(c_schar), - UChar => quote!(c_uchar), - Short => quote!(c_short), - UShort => quote!(c_ushort), - Int => quote!(c_int), - UInt => quote!(c_uint), - Long => quote!(c_long), - ULong => quote!(c_ulong), - LongLong => quote!(c_longlong), - ULongLong => quote!(c_ulonglong), - Float => quote!(c_float), - Double => quote!(c_double), - ObjCId => { - return (get_id_type(quote!(Object), is_return, nullability), true); - } - ObjCClass => { - if nullability == Nullability::NonNull { - quote!(&Class) - } else { - quote!(Option<&Class>) - } - } - ObjCSel => { - if nullability == Nullability::NonNull { - quote!(Sel) - } else { - quote!(Option) - } - } - Pointer => { - println!("{:?}", &ty); - let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); - println!("{:?}", &pointee); - let (pointee_tokens, _) = get_rust_type(pointee, false); - - if nullability == Nullability::NonNull { - quote!(NonNull<#pointee_tokens>) - } else { - if ty.is_const_qualified() { - quote!(*const #pointee_tokens) - } else { - quote!(*mut #pointee_tokens) - } - } - } - ObjCObjectPointer => { - let ty = ty.get_pointee_type().expect("pointer type to have pointee"); - let tokens = match ty.get_kind() { - ObjCInterface => { - let base_ty = ty - .get_objc_object_base_type() - .expect("interface to have base type"); - if base_ty != ty { - // TODO: Figure out what the base type is - panic!("base {:?} was not equal to {:?}", base_ty, ty); - } - let ident = format_ident!("{}", ty.get_display_name()); - quote!(#ident) - } - ObjCObject => { - quote!(TodoGenerics) - } - Attributed => { - quote!(TodoAttributed) - } - _ => panic!("pointee was not objcinterface: {:?}", ty), - }; - return (get_id_type(tokens, is_return, nullability), true); - } - Typedef if ty.get_display_name() == "instancetype" => { - if !is_return { - panic!("instancetype in non-return position") - } - return (get_id_type(quote!(Self), is_return, nullability), true); - } - Typedef => { - let display_name = ty.get_display_name(); - let display_name = display_name.strip_prefix("const ").unwrap_or(&display_name); - // TODO: Handle typedefs properly - match &*display_name { - "BOOL" => quote!(bool), - display_name => { - let ident = format_ident!("{}", display_name); - quote!(#ident) - } - } - } - BlockPointer => { - quote!(TodoBlock) - } - FunctionPrototype => { - quote!(TodoFunction) - } - IncompleteArray => quote!(TodoArray), - ConstantArray => { - let (element_type, _) = get_rust_type( - ty.get_element_type().expect("array to have element type"), - false, - ); - let num_elements = ty - .get_size() - .expect("constant array to have element length"); - quote!([#element_type; #num_elements]) - } - _ => { - panic!("Unsupported type: {:?}", ty) - } - }; - (tokens, false) -} - -// One of EntityKind::ObjCInstanceMethodDecl or EntityKind::ObjCClassMethodDecl -fn parse_method(entity: Entity<'_>) -> Option { - // println!("Method {:?}", entity.get_display_name()); - // println!("Availability: {:?}", entity.get_platform_availability()); - // TODO: Handle `NSConsumesSelf` and `NSReturnsRetained` - // println!("Children: {:?}", entity.get_children()); - - let selector = entity.get_name().expect("method selector"); - let fn_name = get_rust_name(&selector); - - if entity.is_variadic() { - println!("Can't handle variadic method {}", selector); - return None; - } - - println!("{}", selector); - - let result_type = entity.get_result_type().expect("method return type"); - let (ret, is_id) = if result_type.get_kind() == TypeKind::Void { - (quote! {}, false) - } else { - let (return_item, is_id) = get_rust_type(result_type, true); - ( - quote! { - -> #return_item - }, - is_id, - ) - }; - - let macro_name = if is_id { - format_ident!("msg_send_id") - } else { - format_ident!("msg_send") - }; - - let arguments: Vec<_> = entity - .get_arguments() - .expect("method arguments") - .into_iter() - .map(|arg| { - ( - format_ident!( - "{}", - handle_reserved(&arg.get_name().expect("arg display name")) - ), - arg.get_type().expect("argument type"), - ) - }) - .collect(); - - let fn_args = arguments.iter().map(|(param, arg_ty)| { - let (ty, _) = get_rust_type(arg_ty.clone(), false); - quote!(#param: #ty) - }); - - let method_call = if selector.contains(':') { - let split_selector: Vec<_> = selector.split(':').filter(|sel| !sel.is_empty()).collect(); - assert!( - arguments.len() == split_selector.len(), - "incorrect method argument length", - ); - - let iter = arguments - .iter() - .zip(split_selector) - .map(|((param, _), sel)| { - let sel = format_ident!("{}", sel); - quote!(#sel: #param) - }); - quote!(#(#iter),*) - } else { - assert_eq!(arguments.len(), 0, "too many arguments"); - let sel = format_ident!("{}", selector); - quote!(#sel) - }; - - match entity.get_kind() { - EntityKind::ObjCInstanceMethodDecl => Some(quote! { - pub unsafe fn #fn_name(&self #(, #fn_args)*) #ret { - #macro_name![self, #method_call] - } - }), - EntityKind::ObjCClassMethodDecl => Some(quote! { - pub unsafe fn #fn_name(#(#fn_args),*) #ret { - #macro_name![Self::class(), #method_call] - } - }), - _ => unreachable!("unknown method kind"), - } -} +mod method; +mod rust_type; +use self::method::Method; pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { match entity.get_kind() { @@ -294,8 +43,8 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { protocols.push(entity); } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - if let Some(tokens) = parse_method(entity) { - methods.push(tokens); + if let Some(method) = Method::parse(entity) { + methods.push(method); } } EntityKind::ObjCPropertyDecl => { @@ -366,8 +115,8 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { protocols.push(entity); } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - if let Some(tokens) = parse_method(entity) { - methods.push(tokens); + if let Some(method) = Method::parse(entity) { + methods.push(method); } } EntityKind::ObjCPropertyDecl => { @@ -412,8 +161,8 @@ pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { // TODO: Required vs. optional methods - if let Some(tokens) = parse_method(entity) { - methods.push(tokens); + if let Some(method) = Method::parse(entity) { + methods.push(method); } } EntityKind::ObjCPropertyDecl => { diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs new file mode 100644 index 000000000..b3b302331 --- /dev/null +++ b/crates/header-translator/src/method.rs @@ -0,0 +1,123 @@ +use clang::{Entity, EntityKind, TypeKind}; +use proc_macro2::TokenStream; +use quote::{format_ident, quote, ToTokens, TokenStreamExt}; + +use crate::rust_type::RustType; + +#[derive(Debug, Clone)] +pub struct Method { + tokens: TokenStream, +} + +impl Method { + /// Takes one of `EntityKind::ObjCInstanceMethodDecl` or + /// `EntityKind::ObjCClassMethodDecl`. + pub fn parse(entity: Entity<'_>) -> Option { + // println!("Method {:?}", entity.get_display_name()); + // println!("Availability: {:?}", entity.get_platform_availability()); + // TODO: Handle `NSConsumesSelf` and `NSReturnsRetained` + // println!("Children: {:?}", entity.get_children()); + + let selector = entity.get_name().expect("method selector"); + let fn_name = format_ident!( + "{}", + selector.trim_end_matches(|c| c == ':').replace(':', "_") + ); + + if entity.is_variadic() { + println!("Can't handle variadic method {}", selector); + return None; + } + + println!("{}", selector); + + let result_type = entity.get_result_type().expect("method return type"); + let (ret, is_id) = if result_type.get_kind() == TypeKind::Void { + (quote! {}, false) + } else { + let RustType { tokens, is_id } = RustType::parse(result_type, true); + ( + quote! { + -> #tokens + }, + is_id, + ) + }; + + let macro_name = if is_id { + format_ident!("msg_send_id") + } else { + format_ident!("msg_send") + }; + + let arguments: Vec<_> = entity + .get_arguments() + .expect("method arguments") + .into_iter() + .map(|arg| { + ( + format_ident!( + "{}", + handle_reserved(&arg.get_name().expect("arg display name")) + ), + arg.get_type().expect("argument type"), + ) + }) + .collect(); + + let fn_args = arguments.iter().map(|(param, arg_ty)| { + let RustType { tokens, .. } = RustType::parse(arg_ty.clone(), false); + quote!(#param: #tokens) + }); + + let method_call = if selector.contains(':') { + let split_selector: Vec<_> = + selector.split(':').filter(|sel| !sel.is_empty()).collect(); + assert!( + arguments.len() == split_selector.len(), + "incorrect method argument length", + ); + + let iter = arguments + .iter() + .zip(split_selector) + .map(|((param, _), sel)| { + let sel = format_ident!("{}", sel); + quote!(#sel: #param) + }); + quote!(#(#iter),*) + } else { + assert_eq!(arguments.len(), 0, "too many arguments"); + let sel = format_ident!("{}", selector); + quote!(#sel) + }; + + let tokens = match entity.get_kind() { + EntityKind::ObjCInstanceMethodDecl => quote! { + pub unsafe fn #fn_name(&self #(, #fn_args)*) #ret { + #macro_name![self, #method_call] + } + }, + EntityKind::ObjCClassMethodDecl => quote! { + pub unsafe fn #fn_name(#(#fn_args),*) #ret { + #macro_name![Self::class(), #method_call] + } + }, + _ => unreachable!("unknown method kind"), + }; + Some(Self { tokens }) + } +} + +impl ToTokens for Method { + fn to_tokens(&self, tokens: &mut TokenStream) { + tokens.append_all(self.tokens.clone()); + } +} + +fn handle_reserved(s: &str) -> &str { + match s { + "type" => "type_", + s => s, + } +} diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs new file mode 100644 index 000000000..c2baa6348 --- /dev/null +++ b/crates/header-translator/src/rust_type.rs @@ -0,0 +1,171 @@ +use clang::{Nullability, Type, TypeKind}; +use proc_macro2::TokenStream; +use quote::{format_ident, quote}; + +#[derive(Debug, Clone)] +pub struct RustType { + pub tokens: TokenStream, + pub is_id: bool, +} + +impl RustType { + fn new(tokens: TokenStream) -> Self { + Self { + tokens, + is_id: false, + } + } + + fn new_id(tokens: TokenStream, is_return: bool, nullability: Nullability) -> Self { + let tokens = if is_return { + quote!(Id<#tokens, Shared>) + } else { + quote!(&#tokens) + }; + let tokens = if nullability == Nullability::NonNull { + tokens + } else { + quote!(Option<#tokens>) + }; + Self { + tokens, + is_id: true, + } + } + + pub fn parse(mut ty: Type<'_>, is_return: bool) -> Self { + use TypeKind::*; + + let mut nullability = Nullability::Unspecified; + let mut kind = ty.get_kind(); + while kind == Attributed { + let new = ty + .get_nullability() + .expect("attributed type to have nullability"); + nullability = match (nullability, new) { + (Nullability::NonNull, Nullability::Nullable) => Nullability::Nullable, + (Nullability::NonNull, _) => Nullability::NonNull, + (Nullability::Nullable, _) => Nullability::Nullable, + (Nullability::Unspecified, new) => new, + }; + ty = ty + .get_modified_type() + .expect("attributed type to have modified type"); + kind = ty.get_kind(); + } + + let tokens = match kind { + Void => quote!(c_void), + Bool => quote!(bool), + CharS | CharU => quote!(c_char), + SChar => quote!(c_schar), + UChar => quote!(c_uchar), + Short => quote!(c_short), + UShort => quote!(c_ushort), + Int => quote!(c_int), + UInt => quote!(c_uint), + Long => quote!(c_long), + ULong => quote!(c_ulong), + LongLong => quote!(c_longlong), + ULongLong => quote!(c_ulonglong), + Float => quote!(c_float), + Double => quote!(c_double), + ObjCId => { + return Self::new_id(quote!(Object), is_return, nullability); + } + ObjCClass => { + if nullability == Nullability::NonNull { + quote!(&Class) + } else { + quote!(Option<&Class>) + } + } + ObjCSel => { + if nullability == Nullability::NonNull { + quote!(Sel) + } else { + quote!(Option) + } + } + Pointer => { + println!("{:?}", &ty); + let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); + println!("{:?}", &pointee); + let Self { tokens, .. } = Self::parse(pointee, false); + + if nullability == Nullability::NonNull { + quote!(NonNull<#tokens>) + } else { + if ty.is_const_qualified() { + quote!(*const #tokens) + } else { + quote!(*mut #tokens) + } + } + } + ObjCObjectPointer => { + let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + let tokens = match ty.get_kind() { + ObjCInterface => { + let base_ty = ty + .get_objc_object_base_type() + .expect("interface to have base type"); + if base_ty != ty { + // TODO: Figure out what the base type is + panic!("base {:?} was not equal to {:?}", base_ty, ty); + } + let ident = format_ident!("{}", ty.get_display_name()); + quote!(#ident) + } + ObjCObject => { + quote!(TodoGenerics) + } + Attributed => { + quote!(TodoAttributed) + } + _ => panic!("pointee was not objcinterface: {:?}", ty), + }; + return Self::new_id(tokens, is_return, nullability); + } + Typedef if ty.get_display_name() == "instancetype" => { + if !is_return { + panic!("instancetype in non-return position") + } + return Self::new_id(quote!(Self), is_return, nullability); + } + Typedef => { + let display_name = ty.get_display_name(); + let display_name = display_name.strip_prefix("const ").unwrap_or(&display_name); + // TODO: Handle typedefs properly + match &*display_name { + "BOOL" => quote!(bool), + display_name => { + let ident = format_ident!("{}", display_name); + quote!(#ident) + } + } + } + BlockPointer => { + quote!(TodoBlock) + } + FunctionPrototype => { + quote!(TodoFunction) + } + IncompleteArray => quote!(TodoArray), + ConstantArray => { + let Self { tokens, .. } = Self::parse( + ty.get_element_type().expect("array to have element type"), + false, + ); + let num_elements = ty + .get_size() + .expect("constant array to have element length"); + quote!([#tokens; #num_elements]) + } + _ => { + panic!("Unsupported type: {:?}", ty) + } + }; + Self::new(tokens) + } +} From 80a3404e79535f57755cd9e7ae2dee1c91dff52b Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 08:27:14 +0200 Subject: [PATCH 013/131] Refactor Method to (almost) be PartialEq --- crates/header-translator/src/method.rs | 121 +++++++++++++++---------- 1 file changed, 71 insertions(+), 50 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index b3b302331..c038065d0 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -6,7 +6,10 @@ use crate::rust_type::RustType; #[derive(Debug, Clone)] pub struct Method { - tokens: TokenStream, + selector: String, + is_class_method: bool, + arguments: Vec<(String, RustType)>, + result_type: Option, } impl Method { @@ -19,35 +22,16 @@ impl Method { // println!("Children: {:?}", entity.get_children()); let selector = entity.get_name().expect("method selector"); - let fn_name = format_ident!( - "{}", - selector.trim_end_matches(|c| c == ':').replace(':', "_") - ); if entity.is_variadic() { println!("Can't handle variadic method {}", selector); return None; } - println!("{}", selector); - - let result_type = entity.get_result_type().expect("method return type"); - let (ret, is_id) = if result_type.get_kind() == TypeKind::Void { - (quote! {}, false) - } else { - let RustType { tokens, is_id } = RustType::parse(result_type, true); - ( - quote! { - -> #tokens - }, - is_id, - ) - }; - - let macro_name = if is_id { - format_ident!("msg_send_id") - } else { - format_ident!("msg_send") + let is_class_method = match entity.get_kind() { + EntityKind::ObjCInstanceMethodDecl => false, + EntityKind::ObjCClassMethodDecl => true, + _ => unreachable!("unknown method kind"), }; let arguments: Vec<_> = entity @@ -56,23 +40,54 @@ impl Method { .into_iter() .map(|arg| { ( - format_ident!( - "{}", - handle_reserved(&arg.get_name().expect("arg display name")) - ), - arg.get_type().expect("argument type"), + arg.get_name().expect("arg display name"), + RustType::parse(arg.get_type().expect("argument type"), false), ) }) .collect(); + let result_type = entity.get_result_type().expect("method return type"); + let result_type = if result_type.get_kind() != TypeKind::Void { + Some(RustType::parse(result_type, true)) + } else { + None + }; + + Some(Self { + selector, + is_class_method, + arguments, + result_type, + }) + } +} + +impl ToTokens for Method { + fn to_tokens(&self, tokens: &mut TokenStream) { + let fn_name = format_ident!( + "{}", + self.selector + .trim_end_matches(|c| c == ':') + .replace(':', "_") + ); + + let arguments: Vec<_> = self + .arguments + .iter() + .map(|(param, ty)| (format_ident!("{}", handle_reserved(¶m)), ty)) + .collect(); + let fn_args = arguments.iter().map(|(param, arg_ty)| { - let RustType { tokens, .. } = RustType::parse(arg_ty.clone(), false); + let tokens = &arg_ty.tokens; quote!(#param: #tokens) }); - let method_call = if selector.contains(':') { - let split_selector: Vec<_> = - selector.split(':').filter(|sel| !sel.is_empty()).collect(); + let method_call = if self.selector.contains(':') { + let split_selector: Vec<_> = self + .selector + .split(':') + .filter(|sel| !sel.is_empty()) + .collect(); assert!( arguments.len() == split_selector.len(), "incorrect method argument length", @@ -88,30 +103,36 @@ impl Method { quote!(#(#iter),*) } else { assert_eq!(arguments.len(), 0, "too many arguments"); - let sel = format_ident!("{}", selector); + let sel = format_ident!("{}", self.selector); quote!(#sel) }; - let tokens = match entity.get_kind() { - EntityKind::ObjCInstanceMethodDecl => quote! { - pub unsafe fn #fn_name(&self #(, #fn_args)*) #ret { - #macro_name![self, #method_call] - } - }, - EntityKind::ObjCClassMethodDecl => quote! { + let (ret, is_id) = if let Some(RustType { tokens, is_id }) = &self.result_type { + (quote!(-> #tokens), *is_id) + } else { + (quote!(), false) + }; + + let macro_name = if is_id { + format_ident!("msg_send_id") + } else { + format_ident!("msg_send") + }; + + let result = if self.is_class_method { + quote! { pub unsafe fn #fn_name(#(#fn_args),*) #ret { #macro_name![Self::class(), #method_call] } - }, - _ => unreachable!("unknown method kind"), + } + } else { + quote! { + pub unsafe fn #fn_name(&self #(, #fn_args)*) #ret { + #macro_name![self, #method_call] + } + } }; - Some(Self { tokens }) - } -} - -impl ToTokens for Method { - fn to_tokens(&self, tokens: &mut TokenStream) { - tokens.append_all(self.tokens.clone()); + tokens.append_all(result); } } From 8249f691edba4148297f6b09f0ff31a25e8938cc Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 08:52:17 +0200 Subject: [PATCH 014/131] Parse more things --- crates/header-translator/src/method.rs | 69 ++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index c038065d0..07cc73c30 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -1,13 +1,26 @@ -use clang::{Entity, EntityKind, TypeKind}; +use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::rust_type::RustType; +#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] +enum MemoryManagement { + /// Consumes self and returns retained pointer + Init, + ReturnsRetained, + ReturnsInnerPointer, + Normal, +} + +#[allow(dead_code)] #[derive(Debug, Clone)] pub struct Method { selector: String, is_class_method: bool, + is_optional_protocol_method: bool, + memory_management: MemoryManagement, + designated_initializer: bool, arguments: Vec<(String, RustType)>, result_type: Option, } @@ -18,8 +31,6 @@ impl Method { pub fn parse(entity: Entity<'_>) -> Option { // println!("Method {:?}", entity.get_display_name()); // println!("Availability: {:?}", entity.get_platform_availability()); - // TODO: Handle `NSConsumesSelf` and `NSReturnsRetained` - // println!("Children: {:?}", entity.get_children()); let selector = entity.get_name().expect("method selector"); @@ -53,9 +64,61 @@ impl Method { None }; + let mut designated_initializer = false; + let mut consumes_self = false; + let mut memory_management = MemoryManagement::Normal; + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::ObjCClassRef + | EntityKind::ObjCProtocolRef + | EntityKind::TypeRef + | EntityKind::ParmDecl => { + // Ignore + } + EntityKind::ObjCDesignatedInitializer => { + if designated_initializer { + panic!("encountered ObjCDesignatedInitializer twice"); + } + designated_initializer = true; + } + EntityKind::NSConsumesSelf => { + consumes_self = true; + } + EntityKind::NSReturnsRetained => { + if memory_management != MemoryManagement::Normal { + panic!("got unexpected NSReturnsRetained") + } + memory_management = MemoryManagement::ReturnsRetained; + } + EntityKind::ObjCReturnsInnerPointer => { + if memory_management != MemoryManagement::Normal { + panic!("got unexpected ObjCReturnsInnerPointer") + } + memory_management = MemoryManagement::ReturnsInnerPointer; + } + EntityKind::NSConsumed => { + // TODO: Handle consumed arguments + } + EntityKind::UnexposedAttr => {} + _ => panic!("Unknown method child: {:?}, {:?}", entity, _parent), + }; + EntityVisitResult::Recurse + }); + + if consumes_self { + if memory_management != MemoryManagement::ReturnsRetained { + panic!("got NSConsumesSelf without NSReturnsRetained"); + } + memory_management = MemoryManagement::Init; + } + Some(Self { selector, is_class_method, + is_optional_protocol_method: entity.is_objc_optional(), + memory_management, + designated_initializer, arguments, result_type, }) From 236d9d3b5a9bc4231d7c25ecabdab3c6b48f8a9c Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 09:00:30 +0200 Subject: [PATCH 015/131] Parse NSConsumed --- crates/header-translator/src/method.rs | 39 +++++++++++++++++++---- crates/header-translator/src/rust_type.rs | 5 +-- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 07cc73c30..c271b78b4 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -49,17 +49,43 @@ impl Method { .get_arguments() .expect("method arguments") .into_iter() - .map(|arg| { + .map(|entity| { + let mut is_consumed = false; + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::ObjCClassRef + | EntityKind::ObjCProtocolRef + | EntityKind::TypeRef + | EntityKind::ParmDecl => { + // Ignore + } + EntityKind::NSConsumed => { + if is_consumed { + panic!("got NSConsumed twice"); + } + is_consumed = true; + } + EntityKind::UnexposedAttr => {} + _ => panic!("Unknown method argument child: {:?}, {:?}", entity, _parent), + }; + EntityVisitResult::Continue + }); + ( - arg.get_name().expect("arg display name"), - RustType::parse(arg.get_type().expect("argument type"), false), + entity.get_name().expect("arg display name"), + RustType::parse( + entity.get_type().expect("argument type"), + false, + is_consumed, + ), ) }) .collect(); let result_type = entity.get_result_type().expect("method return type"); let result_type = if result_type.get_kind() != TypeKind::Void { - Some(RustType::parse(result_type, true)) + Some(RustType::parse(result_type, true, false)) } else { None }; @@ -98,12 +124,13 @@ impl Method { memory_management = MemoryManagement::ReturnsInnerPointer; } EntityKind::NSConsumed => { - // TODO: Handle consumed arguments + // Handled inside arguments } EntityKind::UnexposedAttr => {} _ => panic!("Unknown method child: {:?}, {:?}", entity, _parent), }; - EntityVisitResult::Recurse + // TODO: Verify that Continue is good enough + EntityVisitResult::Continue }); if consumes_self { diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index c2baa6348..8cd6ab847 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -33,7 +33,7 @@ impl RustType { } } - pub fn parse(mut ty: Type<'_>, is_return: bool) -> Self { + pub fn parse(mut ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { use TypeKind::*; let mut nullability = Nullability::Unspecified; @@ -91,7 +91,7 @@ impl RustType { println!("{:?}", &ty); let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); println!("{:?}", &pointee); - let Self { tokens, .. } = Self::parse(pointee, false); + let Self { tokens, .. } = Self::parse(pointee, false, is_consumed); if nullability == Nullability::NonNull { quote!(NonNull<#tokens>) @@ -156,6 +156,7 @@ impl RustType { let Self { tokens, .. } = Self::parse( ty.get_element_type().expect("array to have element type"), false, + is_consumed, ); let num_elements = ty .get_size() From 68503bbae1e27cccbdfe690e55b22ab312c50f6e Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 09:23:12 +0200 Subject: [PATCH 016/131] Verify memory management --- crates/header-translator/src/lib.rs | 1 + crates/header-translator/src/method.rs | 52 +++++++++++++++++++++ crates/header-translator/src/objc2_utils.rs | 40 ++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 crates/header-translator/src/objc2_utils.rs diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index b53b953e8..7d9c0a512 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -3,6 +3,7 @@ use proc_macro2::TokenStream; use quote::{format_ident, quote}; mod method; +mod objc2_utils; mod rust_type; use self::method::Method; diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index c271b78b4..f1eb99ec6 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -2,6 +2,7 @@ use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; +use crate::objc2_utils::in_selector_family; use crate::rust_type::RustType; #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] @@ -13,6 +14,51 @@ enum MemoryManagement { Normal, } +impl MemoryManagement { + /// Verifies that the selector and the memory management rules match up + /// in a way that we can just use `msg_send_id!`. + fn verify_sel(self, sel: &str) { + // TODO: Handle these differently + if sel == "unarchiver:didDecodeObject:" { + return; + } + if sel == "awakeAfterUsingCoder:" { + return; + } + + let bytes = sel.as_bytes(); + if in_selector_family(bytes, b"new") { + assert!( + self == Self::ReturnsRetained, + "{:?} did not match {}", + self, + sel + ); + } else if in_selector_family(bytes, b"alloc") { + assert!( + self == Self::ReturnsRetained, + "{:?} did not match {}", + self, + sel + ); + } else if in_selector_family(bytes, b"init") { + assert!(self == Self::Init, "{:?} did not match {}", self, sel); + } else if in_selector_family(bytes, b"copy") || in_selector_family(bytes, b"mutableCopy") { + assert!( + self == Self::ReturnsRetained, + "{:?} did not match {}", + self, + sel + ); + } else { + if self == Self::ReturnsInnerPointer { + return; + } + assert!(self == Self::Normal, "{:?} did not match {}", self, sel); + } + } +} + #[allow(dead_code)] #[derive(Debug, Clone)] pub struct Method { @@ -140,6 +186,12 @@ impl Method { memory_management = MemoryManagement::Init; } + if let Some(RustType { is_id, .. }) = result_type { + if is_id { + memory_management.verify_sel(&selector); + } + } + Some(Self { selector, is_class_method, diff --git a/crates/header-translator/src/objc2_utils.rs b/crates/header-translator/src/objc2_utils.rs new file mode 100644 index 000000000..779da0986 --- /dev/null +++ b/crates/header-translator/src/objc2_utils.rs @@ -0,0 +1,40 @@ +//! Utilities copied from `objc2` + +pub const fn in_selector_family(mut selector: &[u8], mut family: &[u8]) -> bool { + // Skip leading underscores from selector + loop { + selector = match selector { + [b'_', rest @ ..] => rest, + _ => break, + } + } + + // Compare each character + loop { + (selector, family) = match (selector, family) { + // Remaining items + ([s, selector @ ..], [f, family @ ..]) => { + if *s == *f { + // Next iteration + (selector, family) + } else { + // Family does not begin with selector + return false; + } + } + // Equal + ([], []) => { + return true; + } + // Selector can't be part of familiy if smaller than it + ([], _) => { + return false; + } + // Remaining items in selector + // -> ensure next character is not lowercase + ([s, ..], []) => { + return !s.is_ascii_lowercase(); + } + } + } +} From 00522fe7f1d68c23fb3d33163ab8b142bafbc5e2 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 09:26:24 +0200 Subject: [PATCH 017/131] More work --- crates/header-translator/src/main.rs | 12 +++++++----- crates/header-translator/src/method.rs | 9 +++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 734afc36c..56a9fd432 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -131,10 +131,11 @@ fn main() { for res in result.values() { let res = format!("{}", create_rust_file(&res)); - println!("{}\n\n\n\n", res); + // println!("{}\n\n\n\n", res); let mut child = Command::new("rustfmt") .stdin(Stdio::piped()) + .stdout(Stdio::piped()) .spawn() .expect("failed running rustfmt"); @@ -142,10 +143,11 @@ fn main() { stdin.write_all(res.as_bytes()).expect("failed writing"); drop(stdin); - println!( - "{}", - String::from_utf8(child.wait_with_output().expect("failed formatting").stdout).unwrap() - ); + let output = child.wait_with_output().expect("failed formatting"); + // println!( + // "{}", + // String::from_utf8(output.stdout).unwrap() + // ); } // } diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index f1eb99ec6..6bded14ce 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -113,6 +113,8 @@ impl Method { is_consumed = true; } EntityKind::UnexposedAttr => {} + // For some reason we recurse into array types + EntityKind::IntegerLiteral => {} _ => panic!("Unknown method argument child: {:?}, {:?}", entity, _parent), }; EntityVisitResult::Continue @@ -172,6 +174,13 @@ impl Method { EntityKind::NSConsumed => { // Handled inside arguments } + EntityKind::IbActionAttr => { + // TODO: What is this? + } + EntityKind::ObjCRequiresSuper => { + // TODO: Can we use this for something? + // + } EntityKind::UnexposedAttr => {} _ => panic!("Unknown method child: {:?}, {:?}", entity, _parent), }; From 5e95345300d81d2fbd0decf6d376a82f92b6d944 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 09:26:34 +0200 Subject: [PATCH 018/131] Fix reserved keywords --- crates/header-translator/src/method.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 6bded14ce..348661541 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -217,9 +217,12 @@ impl ToTokens for Method { fn to_tokens(&self, tokens: &mut TokenStream) { let fn_name = format_ident!( "{}", - self.selector - .trim_end_matches(|c| c == ':') - .replace(':', "_") + handle_reserved( + &self + .selector + .trim_end_matches(|c| c == ':') + .replace(':', "_") + ) ); let arguments: Vec<_> = self @@ -290,6 +293,7 @@ impl ToTokens for Method { fn handle_reserved(s: &str) -> &str { match s { "type" => "type_", + "trait" => "trait_", s => s, } } From bc25f915cf3eabc08f1b2ff4fb818adebfb6a63f Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 09:51:59 +0200 Subject: [PATCH 019/131] Refactor statements --- crates/header-translator/src/lib.rs | 205 +------------------- crates/header-translator/src/main.rs | 5 +- crates/header-translator/src/stmt.rs | 277 +++++++++++++++++++++++++++ 3 files changed, 283 insertions(+), 204 deletions(-) create mode 100644 crates/header-translator/src/stmt.rs diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 7d9c0a512..276e03234 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -1,211 +1,16 @@ -use clang::{Entity, EntityKind, EntityVisitResult}; +use clang::Entity; use proc_macro2::TokenStream; -use quote::{format_ident, quote}; +use quote::quote; mod method; mod objc2_utils; mod rust_type; -use self::method::Method; +mod stmt; -pub fn get_tokens(entity: &Entity<'_>) -> TokenStream { - match entity.get_kind() { - EntityKind::InclusionDirective - | EntityKind::MacroExpansion - | EntityKind::ObjCClassRef - | EntityKind::ObjCProtocolRef - | EntityKind::MacroDefinition => TokenStream::new(), - EntityKind::ObjCInterfaceDecl => { - // entity.get_mangled_objc_names() - let name = format_ident!("{}", entity.get_name().expect("class name")); - // println!("Availability: {:?}", entity.get_platform_availability()); - let mut superclass_name = None; - let mut protocols = Vec::new(); - let mut methods = Vec::new(); - - entity.visit_children(|entity, _parent| { - match entity.get_kind() { - EntityKind::ObjCIvarDecl => { - // Explicitly ignored - } - EntityKind::ObjCSuperClassRef => { - superclass_name = Some(format_ident!( - "{}", - entity.get_name().expect("superclass name") - )); - } - EntityKind::ObjCRootClass => { - // TODO: Maybe just skip root classes entirely? - superclass_name = Some(format_ident!("Object")); - } - EntityKind::ObjCClassRef => { - println!("ObjCClassRef: {:?}", entity.get_display_name()); - } - EntityKind::ObjCProtocolRef => { - protocols.push(entity); - } - EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - if let Some(method) = Method::parse(entity) { - methods.push(method); - } - } - EntityKind::ObjCPropertyDecl => { - // println!( - // "Property {:?}, {:?}", - // entity.get_display_name().unwrap(), - // entity.get_objc_attributes().unwrap() - // ); - // methods.push(quote! {}); - } - EntityKind::TemplateTypeParameter => { - println!("TODO: Template parameters") - } - EntityKind::VisibilityAttr => { - // NS_CLASS_AVAILABLE_MAC?? - println!("TODO: VisibilityAttr") - } - EntityKind::TypeRef => { - // TODO - } - EntityKind::ObjCException => { - // Maybe useful for knowing when to implement `Error` for the type - } - EntityKind::UnexposedAttr => {} - _ => panic!("Unknown in ObjCInterfaceDecl {:?}", entity), - } - EntityVisitResult::Continue - }); - - let superclass_name = - superclass_name.expect("only classes with a superclass is supported"); - - quote! { - extern_class!( - #[derive(Debug)] - struct #name; - - unsafe impl ClassType for #name { - type Super = #superclass_name; - } - ); - - impl #name { - #(#methods)* - } - } - } - EntityKind::ObjCCategoryDecl => { - let meta = if let Some(doc) = entity.get_name() { - quote!(#[doc = #doc]) - } else { - // Some categories don't have a name. Example: NSClipView - quote!() - }; - let mut class = None; - let mut protocols = Vec::new(); - let mut methods = Vec::new(); - - entity.visit_children(|entity, _parent| { - match entity.get_kind() { - EntityKind::ObjCClassRef => { - if class.is_some() { - panic!("could not find unique category class") - } - class = Some(entity); - } - EntityKind::ObjCProtocolRef => { - protocols.push(entity); - } - EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - if let Some(method) = Method::parse(entity) { - methods.push(method); - } - } - EntityKind::ObjCPropertyDecl => { - // println!( - // "Property {:?}, {:?}", - // entity.get_display_name().unwrap(), - // entity.get_objc_attributes().unwrap() - // ); - // methods.push(quote! {}); - } - EntityKind::TemplateTypeParameter => { - println!("TODO: Template parameters") - } - EntityKind::UnexposedAttr => {} - _ => panic!("Unknown in ObjCCategoryDecl {:?}", entity), - } - EntityVisitResult::Continue - }); - - let class = class.expect("could not find category class"); - let class_name = format_ident!("{}", class.get_name().expect("class name")); - - quote! { - #meta - impl #class_name { - #(#methods)* - } - } - } - EntityKind::ObjCProtocolDecl => { - let name = format_ident!("{}", entity.get_name().expect("protocol name")); - let mut protocols = Vec::new(); - let mut methods = Vec::new(); - - entity.visit_children(|entity, _parent| { - match entity.get_kind() { - EntityKind::ObjCExplicitProtocolImpl => { - // TODO - } - EntityKind::ObjCProtocolRef => { - protocols.push(entity); - } - EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - // TODO: Required vs. optional methods - if let Some(method) = Method::parse(entity) { - methods.push(method); - } - } - EntityKind::ObjCPropertyDecl => { - // TODO - } - EntityKind::UnexposedAttr => {} - _ => panic!("Unknown in ObjCProtocolDecl {:?}", entity), - } - EntityVisitResult::Continue - }); - - quote! { - extern_protocol!( - #[derive(Debug)] - struct #name; - - unsafe impl ProtocolType for #name { - type Super = todo!(); - } - ); - - impl #name { - #(#methods)* - } - } - } - EntityKind::EnumDecl - | EntityKind::VarDecl - | EntityKind::FunctionDecl - | EntityKind::TypedefDecl - | EntityKind::StructDecl => { - // TODO - TokenStream::new() - } - _ => { - panic!("Unknown: {:?}", entity) - } - } -} +use self::stmt::Stmt; pub fn create_rust_file(entities: &[Entity<'_>]) -> TokenStream { - let iter = entities.iter().map(get_tokens); + let iter = entities.iter().filter_map(Stmt::parse); quote! { #(#iter)* } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 56a9fd432..233c70ea7 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -144,10 +144,7 @@ fn main() { drop(stdin); let output = child.wait_with_output().expect("failed formatting"); - // println!( - // "{}", - // String::from_utf8(output.stdout).unwrap() - // ); + // println!("{}", String::from_utf8(output.stdout).unwrap()); } // } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs new file mode 100644 index 000000000..7798ad096 --- /dev/null +++ b/crates/header-translator/src/stmt.rs @@ -0,0 +1,277 @@ +use clang::{Entity, EntityKind, EntityVisitResult}; +use proc_macro2::TokenStream; +use quote::{format_ident, quote, ToTokens, TokenStreamExt}; + +use crate::method::Method; + +#[derive(Debug, Clone)] +pub enum Stmt { + /// @interface + ClassDecl { + name: String, + // TODO: Generics + superclass: Option, + protocols: Vec, + methods: Vec, + }, + CategoryDecl { + class_name: String, + /// Some categories don't have a name. Example: NSClipView + name: Option, + /// I don't quite know what this means? + protocols: Vec, + methods: Vec, + }, + ProtocolDecl { + name: String, + protocols: Vec, + methods: Vec, + }, +} + +impl Stmt { + pub fn parse(entity: &Entity<'_>) -> Option { + match entity.get_kind() { + EntityKind::InclusionDirective + | EntityKind::MacroExpansion + | EntityKind::ObjCClassRef + | EntityKind::ObjCProtocolRef + | EntityKind::MacroDefinition => None, + EntityKind::ObjCInterfaceDecl => { + // entity.get_mangled_objc_names() + let name = entity.get_name().expect("class name"); + // println!("Availability: {:?}", entity.get_platform_availability()); + let mut superclass = None; + let mut protocols = Vec::new(); + let mut methods = Vec::new(); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::ObjCIvarDecl => { + // Explicitly ignored + } + EntityKind::ObjCSuperClassRef => { + superclass = Some(Some(entity.get_name().expect("superclass name"))); + } + EntityKind::ObjCRootClass => { + // TODO: Maybe just skip root classes entirely? + superclass = Some(None); + } + EntityKind::ObjCClassRef => { + println!("ObjCClassRef: {:?}", entity.get_display_name()); + } + EntityKind::ObjCProtocolRef => { + protocols.push(entity.get_name().expect("protocolref to have name")); + } + EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { + if let Some(method) = Method::parse(entity) { + methods.push(method); + } + } + EntityKind::ObjCPropertyDecl => { + // println!( + // "Property {:?}, {:?}", + // entity.get_display_name().unwrap(), + // entity.get_objc_attributes().unwrap() + // ); + // methods.push(quote! {}); + } + EntityKind::TemplateTypeParameter => { + println!("TODO: Template parameters") + } + EntityKind::VisibilityAttr => { + // NS_CLASS_AVAILABLE_MAC?? + println!("TODO: VisibilityAttr") + } + EntityKind::TypeRef => { + // TODO + } + EntityKind::ObjCException => { + // Maybe useful for knowing when to implement `Error` for the type + } + EntityKind::UnexposedAttr => {} + _ => panic!("Unknown in ObjCInterfaceDecl {:?}", entity), + } + EntityVisitResult::Continue + }); + + let superclass = superclass.expect("no superclass found"); + + Some(Self::ClassDecl { + name, + superclass, + protocols, + methods, + }) + } + EntityKind::ObjCCategoryDecl => { + let mut class = None; + let mut protocols = Vec::new(); + let mut methods = Vec::new(); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::ObjCClassRef => { + if class.is_some() { + panic!("could not find unique category class") + } + class = Some(entity); + } + EntityKind::ObjCProtocolRef => { + protocols.push(entity.get_name().expect("protocolref to have name")); + } + EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { + if let Some(method) = Method::parse(entity) { + methods.push(method); + } + } + EntityKind::ObjCPropertyDecl => { + // println!( + // "Property {:?}, {:?}", + // entity.get_display_name().unwrap(), + // entity.get_objc_attributes().unwrap() + // ); + // methods.push(quote! {}); + } + EntityKind::TemplateTypeParameter => { + println!("TODO: Template parameters") + } + EntityKind::UnexposedAttr => {} + _ => panic!("Unknown in ObjCCategoryDecl {:?}", entity), + } + EntityVisitResult::Continue + }); + + let class = class.expect("could not find category class"); + let class_name = class.get_name().expect("class name"); + + Some(Self::CategoryDecl { + class_name, + name: entity.get_name(), + protocols, + methods, + }) + } + EntityKind::ObjCProtocolDecl => { + let name = entity.get_name().expect("protocol name"); + let mut protocols = Vec::new(); + let mut methods = Vec::new(); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::ObjCExplicitProtocolImpl => { + // TODO + } + EntityKind::ObjCProtocolRef => { + protocols.push(entity.get_name().expect("protocolref to have name")); + } + EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { + // TODO: Required vs. optional methods + if let Some(method) = Method::parse(entity) { + methods.push(method); + } + } + EntityKind::ObjCPropertyDecl => { + // TODO + } + EntityKind::UnexposedAttr => {} + _ => panic!("Unknown in ObjCProtocolDecl {:?}", entity), + } + EntityVisitResult::Continue + }); + + Some(Self::ProtocolDecl { + name, + protocols, + methods, + }) + } + EntityKind::EnumDecl + | EntityKind::VarDecl + | EntityKind::FunctionDecl + | EntityKind::TypedefDecl + | EntityKind::StructDecl => { + // TODO + None + } + _ => { + panic!("Unknown: {:?}", entity) + } + } + } +} + +impl ToTokens for Stmt { + fn to_tokens(&self, tokens: &mut TokenStream) { + let result = match self { + Self::ClassDecl { + name, + superclass, + protocols, + methods, + } => { + let name = format_ident!("{}", name); + let superclass_name = + format_ident!("{}", superclass.as_deref().unwrap_or("Object")); + + quote! { + extern_class!( + #[derive(Debug)] + struct #name; + + unsafe impl ClassType for #name { + type Super = #superclass_name; + } + ); + + impl #name { + #(#methods)* + } + } + } + Self::CategoryDecl { + class_name, + name, + protocols, + methods, + } => { + let meta = if let Some(name) = name { + quote!(#[doc = #name]) + } else { + quote!() + }; + let class_name = format_ident!("{}", class_name); + + quote! { + #meta + impl #class_name { + #(#methods)* + } + } + } + Self::ProtocolDecl { + name, + protocols, + methods, + } => { + let name = format_ident!("{}", name); + + quote! { + extern_protocol!( + #[derive(Debug)] + struct #name; + + unsafe impl ProtocolType for #name { + type Super = todo!(); + } + ); + + impl #name { + #(#methods)* + } + } + } + }; + tokens.append_all(result); + } +} From 7e35057ab2503818526e8f5ae02c21575dcff973 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 10:09:31 +0200 Subject: [PATCH 020/131] Add initial availability --- crates/header-translator/src/availability.rs | 14 +++++++++++ crates/header-translator/src/lib.rs | 1 + crates/header-translator/src/method.rs | 12 ++++++++-- crates/header-translator/src/stmt.rs | 25 ++++++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 crates/header-translator/src/availability.rs diff --git a/crates/header-translator/src/availability.rs b/crates/header-translator/src/availability.rs new file mode 100644 index 000000000..f00b07f53 --- /dev/null +++ b/crates/header-translator/src/availability.rs @@ -0,0 +1,14 @@ +use clang::PlatformAvailability; + +#[derive(Debug, Clone)] +pub struct Availability { + inner: Vec, +} + +impl Availability { + pub fn parse(availability: Vec) -> Self { + Self { + inner: availability, + } + } +} diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 276e03234..de3fe3aec 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -2,6 +2,7 @@ use clang::Entity; use proc_macro2::TokenStream; use quote::quote; +mod availability; mod method; mod objc2_utils; mod rust_type; diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 348661541..dd145be25 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -2,6 +2,7 @@ use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; +use crate::availability::Availability; use crate::objc2_utils::in_selector_family; use crate::rust_type::RustType; @@ -63,6 +64,7 @@ impl MemoryManagement { #[derive(Debug, Clone)] pub struct Method { selector: String, + availability: Availability, is_class_method: bool, is_optional_protocol_method: bool, memory_management: MemoryManagement, @@ -76,8 +78,6 @@ impl Method { /// `EntityKind::ObjCClassMethodDecl`. pub fn parse(entity: Entity<'_>) -> Option { // println!("Method {:?}", entity.get_display_name()); - // println!("Availability: {:?}", entity.get_platform_availability()); - let selector = entity.get_name().expect("method selector"); if entity.is_variadic() { @@ -85,6 +85,12 @@ impl Method { return None; } + let availability = Availability::parse( + entity + .get_platform_availability() + .expect("method availability"), + ); + let is_class_method = match entity.get_kind() { EntityKind::ObjCInstanceMethodDecl => false, EntityKind::ObjCClassMethodDecl => true, @@ -195,6 +201,7 @@ impl Method { memory_management = MemoryManagement::Init; } + // Verify that memory management is as expected if let Some(RustType { is_id, .. }) = result_type { if is_id { memory_management.verify_sel(&selector); @@ -203,6 +210,7 @@ impl Method { Some(Self { selector, + availability, is_class_method, is_optional_protocol_method: entity.is_objc_optional(), memory_management, diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 7798ad096..f480a6be6 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -2,6 +2,7 @@ use clang::{Entity, EntityKind, EntityVisitResult}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; +use crate::availability::Availability; use crate::method::Method; #[derive(Debug, Clone)] @@ -9,6 +10,7 @@ pub enum Stmt { /// @interface ClassDecl { name: String, + availability: Availability, // TODO: Generics superclass: Option, protocols: Vec, @@ -16,6 +18,7 @@ pub enum Stmt { }, CategoryDecl { class_name: String, + availability: Availability, /// Some categories don't have a name. Example: NSClipView name: Option, /// I don't quite know what this means? @@ -24,6 +27,7 @@ pub enum Stmt { }, ProtocolDecl { name: String, + availability: Availability, protocols: Vec, methods: Vec, }, @@ -40,6 +44,11 @@ impl Stmt { EntityKind::ObjCInterfaceDecl => { // entity.get_mangled_objc_names() let name = entity.get_name().expect("class name"); + let availability = Availability::parse( + entity + .get_platform_availability() + .expect("class availability"), + ); // println!("Availability: {:?}", entity.get_platform_availability()); let mut superclass = None; let mut protocols = Vec::new(); @@ -99,6 +108,7 @@ impl Stmt { Some(Self::ClassDecl { name, + availability, superclass, protocols, methods, @@ -106,6 +116,11 @@ impl Stmt { } EntityKind::ObjCCategoryDecl => { let mut class = None; + let availability = Availability::parse( + entity + .get_platform_availability() + .expect("category availability"), + ); let mut protocols = Vec::new(); let mut methods = Vec::new(); @@ -147,6 +162,7 @@ impl Stmt { Some(Self::CategoryDecl { class_name, + availability, name: entity.get_name(), protocols, methods, @@ -154,6 +170,11 @@ impl Stmt { } EntityKind::ObjCProtocolDecl => { let name = entity.get_name().expect("protocol name"); + let availability = Availability::parse( + entity + .get_platform_availability() + .expect("protocol availability"), + ); let mut protocols = Vec::new(); let mut methods = Vec::new(); @@ -182,6 +203,7 @@ impl Stmt { Some(Self::ProtocolDecl { name, + availability, protocols, methods, }) @@ -206,6 +228,7 @@ impl ToTokens for Stmt { let result = match self { Self::ClassDecl { name, + availability, superclass, protocols, methods, @@ -231,6 +254,7 @@ impl ToTokens for Stmt { } Self::CategoryDecl { class_name, + availability, name, protocols, methods, @@ -251,6 +275,7 @@ impl ToTokens for Stmt { } Self::ProtocolDecl { name, + availability, protocols, methods, } => { From 29b75608ce7ee5a8e2d2cf3968973ddb70253a21 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 10:29:45 +0200 Subject: [PATCH 021/131] Prepare RustType --- crates/header-translator/src/method.rs | 15 +++++++-------- crates/header-translator/src/rust_type.rs | 16 +++++++++++++--- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index dd145be25..040a17931 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -202,8 +202,8 @@ impl Method { } // Verify that memory management is as expected - if let Some(RustType { is_id, .. }) = result_type { - if is_id { + if let Some(type_) = &result_type { + if type_.is_id() { memory_management.verify_sel(&selector); } } @@ -239,10 +239,9 @@ impl ToTokens for Method { .map(|(param, ty)| (format_ident!("{}", handle_reserved(¶m)), ty)) .collect(); - let fn_args = arguments.iter().map(|(param, arg_ty)| { - let tokens = &arg_ty.tokens; - quote!(#param: #tokens) - }); + let fn_args = arguments + .iter() + .map(|(param, arg_ty)| quote!(#param: #arg_ty)); let method_call = if self.selector.contains(':') { let split_selector: Vec<_> = self @@ -269,8 +268,8 @@ impl ToTokens for Method { quote!(#sel) }; - let (ret, is_id) = if let Some(RustType { tokens, is_id }) = &self.result_type { - (quote!(-> #tokens), *is_id) + let (ret, is_id) = if let Some(type_) = &self.result_type { + (quote!(-> #type_), type_.is_id()) } else { (quote!(), false) }; diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 8cd6ab847..6420a02e9 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -1,11 +1,11 @@ use clang::{Nullability, Type, TypeKind}; use proc_macro2::TokenStream; -use quote::{format_ident, quote}; +use quote::{format_ident, quote, ToTokens, TokenStreamExt}; #[derive(Debug, Clone)] pub struct RustType { - pub tokens: TokenStream, - pub is_id: bool, + tokens: TokenStream, + is_id: bool, } impl RustType { @@ -33,6 +33,10 @@ impl RustType { } } + pub fn is_id(&self) -> bool { + self.is_id + } + pub fn parse(mut ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { use TypeKind::*; @@ -170,3 +174,9 @@ impl RustType { Self::new(tokens) } } + +impl ToTokens for RustType { + fn to_tokens(&self, tokens: &mut TokenStream) { + tokens.append_all(self.tokens.clone()); + } +} From 00b467883d6b2092a43f0ebd234f8d61a06529b3 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 9 Sep 2022 11:05:41 +0200 Subject: [PATCH 022/131] Split RustType up in parse and ToToken part --- crates/header-translator/src/rust_type.rs | 288 ++++++++++++++-------- crates/header-translator/src/stmt.rs | 2 + 2 files changed, 187 insertions(+), 103 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 6420a02e9..7664555fe 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -2,44 +2,64 @@ use clang::{Nullability, Type, TypeKind}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; -#[derive(Debug, Clone)] -pub struct RustType { - tokens: TokenStream, - is_id: bool, -} +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum RustType { + // Primitives + Void, + C99Bool, + Char, + SChar, + UChar, + Short, + UShort, + Int, + UInt, + Long, + ULong, + LongLong, + ULongLong, + Float, + Double, -impl RustType { - fn new(tokens: TokenStream) -> Self { - Self { - tokens, - is_id: false, - } - } + // Objective-C + Id { + name: String, + // generics: Vec, + is_return: bool, + nullability: Nullability, + }, + Class { + nullability: Nullability, + }, + Sel { + nullability: Nullability, + }, + ObjcBool, - fn new_id(tokens: TokenStream, is_return: bool, nullability: Nullability) -> Self { - let tokens = if is_return { - quote!(Id<#tokens, Shared>) - } else { - quote!(&#tokens) - }; - let tokens = if nullability == Nullability::NonNull { - tokens - } else { - quote!(Option<#tokens>) - }; - Self { - tokens, - is_id: true, - } - } + // Others + Pointer { + nullability: Nullability, + is_const: bool, + pointee: Box, + }, + Array { + element_type: Box, + num_elements: usize, + }, + TypeDef(String), +} + +impl RustType { pub fn is_id(&self) -> bool { - self.is_id + matches!(self, Self::Id { .. }) } pub fn parse(mut ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { use TypeKind::*; + // println!("{:?}, {:?}", ty, ty.get_class_type()); + let mut nullability = Nullability::Unspecified; let mut kind = ty.get_kind(); while kind == Attributed { @@ -58,58 +78,44 @@ impl RustType { kind = ty.get_kind(); } - let tokens = match kind { - Void => quote!(c_void), - Bool => quote!(bool), - CharS | CharU => quote!(c_char), - SChar => quote!(c_schar), - UChar => quote!(c_uchar), - Short => quote!(c_short), - UShort => quote!(c_ushort), - Int => quote!(c_int), - UInt => quote!(c_uint), - Long => quote!(c_long), - ULong => quote!(c_ulong), - LongLong => quote!(c_longlong), - ULongLong => quote!(c_ulonglong), - Float => quote!(c_float), - Double => quote!(c_double), - ObjCId => { - return Self::new_id(quote!(Object), is_return, nullability); - } - ObjCClass => { - if nullability == Nullability::NonNull { - quote!(&Class) - } else { - quote!(Option<&Class>) - } - } - ObjCSel => { - if nullability == Nullability::NonNull { - quote!(Sel) - } else { - quote!(Option) - } - } + match kind { + Void => Self::Void, + Bool => Self::C99Bool, + CharS | CharU => Self::Char, + SChar => Self::SChar, + UChar => Self::UChar, + Short => Self::Short, + UShort => Self::UShort, + Int => Self::Int, + UInt => Self::UInt, + Long => Self::Long, + ULong => Self::ULong, + LongLong => Self::LongLong, + ULongLong => Self::ULongLong, + Float => Self::Float, + Double => Self::Double, + ObjCId => Self::Id { + name: "Object".to_string(), + is_return, + nullability, + }, + ObjCClass => Self::Class { nullability }, + ObjCSel => Self::Sel { nullability }, Pointer => { println!("{:?}", &ty); let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); println!("{:?}", &pointee); - let Self { tokens, .. } = Self::parse(pointee, false, is_consumed); + let pointee = Self::parse(pointee, false, is_consumed); - if nullability == Nullability::NonNull { - quote!(NonNull<#tokens>) - } else { - if ty.is_const_qualified() { - quote!(*const #tokens) - } else { - quote!(*mut #tokens) - } + Self::Pointer { + nullability, + is_const: ty.is_const_qualified(), + pointee: Box::new(pointee), } } ObjCObjectPointer => { let ty = ty.get_pointee_type().expect("pointer type to have pointee"); - let tokens = match ty.get_kind() { + match ty.get_kind() { ObjCInterface => { let base_ty = ty .get_objc_object_base_type() @@ -118,46 +124,42 @@ impl RustType { // TODO: Figure out what the base type is panic!("base {:?} was not equal to {:?}", base_ty, ty); } - let ident = format_ident!("{}", ty.get_display_name()); - quote!(#ident) - } - ObjCObject => { - quote!(TodoGenerics) - } - Attributed => { - quote!(TodoAttributed) + let name = ty.get_display_name(); + Self::Id { + name, + is_return, + nullability, + } } + ObjCObject => Self::TypeDef("TodoGenerics".to_string()), + Attributed => Self::TypeDef("TodoAttributed".to_string()), _ => panic!("pointee was not objcinterface: {:?}", ty), - }; - return Self::new_id(tokens, is_return, nullability); - } - Typedef if ty.get_display_name() == "instancetype" => { - if !is_return { - panic!("instancetype in non-return position") } - return Self::new_id(quote!(Self), is_return, nullability); } Typedef => { let display_name = ty.get_display_name(); let display_name = display_name.strip_prefix("const ").unwrap_or(&display_name); // TODO: Handle typedefs properly match &*display_name { - "BOOL" => quote!(bool), - display_name => { - let ident = format_ident!("{}", display_name); - quote!(#ident) + "BOOL" => Self::ObjcBool, + "instancetype" => { + if !is_return { + panic!("instancetype in non-return position") + } + Self::Id { + name: "Self".to_string(), + is_return, + nullability, + } } + display_name => Self::TypeDef(display_name.to_string()), } } - BlockPointer => { - quote!(TodoBlock) - } - FunctionPrototype => { - quote!(TodoFunction) - } - IncompleteArray => quote!(TodoArray), + BlockPointer => Self::TypeDef("TodoBlock".to_string()), + FunctionPrototype => Self::TypeDef("TodoFunction".to_string()), + IncompleteArray => Self::TypeDef("TodoArray".to_string()), ConstantArray => { - let Self { tokens, .. } = Self::parse( + let element_type = Self::parse( ty.get_element_type().expect("array to have element type"), false, is_consumed, @@ -165,18 +167,98 @@ impl RustType { let num_elements = ty .get_size() .expect("constant array to have element length"); - quote!([#tokens; #num_elements]) + Self::Array { + element_type: Box::new(element_type), + num_elements, + } } _ => { panic!("Unsupported type: {:?}", ty) } - }; - Self::new(tokens) + } } } impl ToTokens for RustType { fn to_tokens(&self, tokens: &mut TokenStream) { - tokens.append_all(self.tokens.clone()); + use RustType::*; + let result = match self { + // Primitives + Void => quote!(c_void), + C99Bool => panic!("C99's bool is unsupported"), // quote!(bool) + Char => quote!(c_char), + SChar => quote!(c_schar), + UChar => quote!(c_uchar), + Short => quote!(c_short), + UShort => quote!(c_ushort), + Int => quote!(c_int), + UInt => quote!(c_uint), + Long => quote!(c_long), + ULong => quote!(c_ulong), + LongLong => quote!(c_longlong), + ULongLong => quote!(c_ulonglong), + Float => quote!(c_float), + Double => quote!(c_double), + + // Objective-C + Id { + name, + is_return, + nullability, + } => { + let tokens = format_ident!("{}", name); + let tokens = if *is_return { + quote!(Id<#tokens, Shared>) + } else { + quote!(&#tokens) + }; + if *nullability == Nullability::NonNull { + tokens + } else { + quote!(Option<#tokens>) + } + } + Class { nullability } => { + if *nullability == Nullability::NonNull { + quote!(&Class) + } else { + quote!(Option<&Class>) + } + } + Sel { nullability } => { + if *nullability == Nullability::NonNull { + quote!(Sel) + } else { + quote!(Option) + } + } + ObjcBool => quote!(bool), + + // Others + Pointer { + nullability, + is_const, + pointee, + } => { + if *nullability == Nullability::NonNull { + quote!(NonNull<#pointee>) + } else { + if *is_const { + quote!(*const #pointee) + } else { + quote!(*mut #pointee) + } + } + } + Array { + element_type, + num_elements, + } => quote!([#element_type; #num_elements]), + TypeDef(s) => { + let x = format_ident!("{}", s); + quote!(#x) + } + }; + tokens.append_all(result); } } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index f480a6be6..ea3d32ffb 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -237,6 +237,8 @@ impl ToTokens for Stmt { let superclass_name = format_ident!("{}", superclass.as_deref().unwrap_or("Object")); + // TODO: Use ty.get_objc_protocol_declarations() + quote! { extern_class!( #[derive(Debug)] From 69a3d467196217239d3121b95cfc5af4536d0330 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 8 Dec 2022 11:46:30 +0100 Subject: [PATCH 023/131] Add icrate --- crates/icrate/Cargo.toml | 359 ++++++++++++++++++ crates/icrate/README.md | 8 + crates/icrate/src/AppKit/mod.rs | 4 + crates/icrate/src/Foundation/mod.rs | 8 + crates/icrate/src/generated/AppKit/mod.rs | 1 + crates/icrate/src/generated/Foundation/mod.rs | 1 + crates/icrate/src/lib.rs | 22 ++ 7 files changed, 403 insertions(+) create mode 100644 crates/icrate/Cargo.toml create mode 100644 crates/icrate/README.md create mode 100644 crates/icrate/src/AppKit/mod.rs create mode 100644 crates/icrate/src/Foundation/mod.rs create mode 100644 crates/icrate/src/generated/AppKit/mod.rs create mode 100644 crates/icrate/src/generated/Foundation/mod.rs create mode 100644 crates/icrate/src/lib.rs diff --git a/crates/icrate/Cargo.toml b/crates/icrate/Cargo.toml new file mode 100644 index 000000000..c66d3738a --- /dev/null +++ b/crates/icrate/Cargo.toml @@ -0,0 +1,359 @@ +[package] +name = "icrate" +version = "0.0.1" +authors = ["Mads Marquart "] +edition = "2021" + +description = "Bindings to Apple's frameworks" +keywords = ["macos", "ios", "cocoa", "apple", "framework"] +categories = [ + "accessibility", + "api-bindings", + "development-tools::ffi", + "external-ffi-bindings", + "os::macos-apis", +] +readme = "README.md" +repository = "https://github.com/madsmtm/objc2" +documentation = "https://docs.rs/icrate/" +license = "MIT" + +[dependencies] +# This does not support GNUStep or other runtimes +objc2 = { path = "../objc2", version = "=0.3.0-beta.3", default-features = false, optional = true, features = ["apple"] } +block2 = { path = "../block2", version = "=0.2.0-alpha.6", default-features = false, optional = true } + +[package.metadata.docs.rs] +default-target = "x86_64-apple-darwin" +all-features = true + +targets = [ + # MacOS + "x86_64-apple-darwin", + "aarch64-apple-darwin", + # "i686-apple-darwin", + # iOS + "aarch64-apple-ios", + "x86_64-apple-ios", + # "armv7-apple-ios", + # "i386-apple-ios", + # GNUStep + "x86_64-unknown-linux-gnu", + "i686-unknown-linux-gnu", + # Windows + "x86_64-pc-windows-msvc", +] + +[features] +default = ["std", "objc"] + +# Currently not possible to turn off, put here for forwards compatibility. +std = ["alloc", "objc2?/std"] +alloc = ["objc2?/alloc"] + +# Expose features that requires Objective-C. +objc = ["objc2"] + +# Expose features that requires creating blocks. +block = ["objc2?/block", "block2"] + +# For better documentation on docs.rs +unstable-docsrs = [] + +# Frameworks +# Based on: +# - https://developer.apple.com/documentation/technologies +# - https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html +# - https://github.com/youknowone/apple-sys + +# Accelerate = [] +# Accessibility = [] +# Accounts = [] +# AddressBook = [] # + AddressBookUI.h +# AdServices = [] +# AdSupport = [] +# AGL = [] +# AppClip = [] +# AppIntents = [] +# AppTrackingTransparency = [] +AppKit = ["Foundation"] +# AppleScriptKit = [] +# AppleScriptObjC = [] +# ApplicationServices = [] +# AppTrackingTransparency = [] +# ARKit = [] +# AssetsLibrary = [] # iOS +# AudioToolbox = [] +# AudioUnit = [] +# AudioDriverKit = [] +# AudioVideoBridging = [] +# AuthenticationServices = [] +# AutomaticAssessmentConfiguration = [] +# Automator = [] +# AVFAudio = [] +# AVFoundation = [] +# AVKit = [] +# BackgroundTasks = [] +# BusinessChat = [] +# CalendarStore = [] +# CallKit = [] +# Carbon = [] +# CareKit = [] +# CarPlay = [] # iOS +# CFNetwork = [] +# CHIP = [] +# ClassKit = [] +# ClockKit = [] +# CloudKit = [] +# Cocoa = [] +# Collaboration = [] +# ColorSync = [] +# Combine = [] +# Compression = [] +# Contacts = [] +# ContactsUI = [] +# CoreAudio = [] +# CoreAudioKit = [] +# CoreAudioTypes = [] +# CoreBluetooth = [] +# CoreData = [] +# CoreFoundation = [] +# CoreGraphics = [] +# CoreHaptics = [] +# CoreImage = [] +# CoreLocation = [] +# CoreLocationUI = [] +# CoreMedia = [] +# CoreMediaIO = [] +# CoreMIDI = [] +# CoreML = [] +# CoreMotion = [] +# CoreNFC = [] +# CoreServices = [] +# CoreSpotlight = [] +# CoreTelephony = [] +# CoreText = [] +# CoreTransferable = [] +# CoreVideo = [] +# CoreWLAN = [] +# CreateML = [] +# CreateMLComponents = [] +# CryptoTokenKit = [] +# DataDetection = [] +# DeveloperToolsSupport = [] +# DeviceActivity = [] +# DeviceManagement = [] +# DeviceCheck = [] +# DeviceDiscoveryExtension = [] +# DeviceDiscoveryUI = [] +# DirectoryService = [] +# DiscRecording = [] +# DiscRecordingUI = [] +# DiskArbitration = [] +# dispatch = [] +# Distributed = [] +# dnssd = [] +# DocC = [] +# DriverKit = [] +# DVDPlayback = [] +# Endpoint Security = [] +# EventKit = [] +# EventKitUI = [] +# ExceptionHandling = [] +# ExecutionPolicy = [] +# ExposureNotification = [] +# ExtensionFoundation = [] +# ExtensionKit = [] +# ExternalAccessory = [] +# Family Controls = [] +# FileProvider = [] +# FileProviderUI = [] +# FinderSync = [] +# ForceFeedback = [] +Foundation = ["objc", "objc2/foundation"] +# FWAUserLib = [] +# GameController = [] +# GameKit = [] +# GameplayKit = [] +# GLKit = [] +# GLUT = [] +# GroupActivities = [] +# GSS = [] +# HealthKit = [] +# HIDDriverKit = [] +# HomeKit = [] +# HTTP Live Streaming = [] +# Hypervisor = [] +# iAd = [] +# ICADevices = [] +# IdentityLookup = [] +# ImageCaptureCore = [] +# ImageIO = [] +# IMServicePlugIn = [] +# InputMethodKit = [] +# InstallerJS = [] +# InstallerPlugins = [] +# InstantMessage = [] +# Intents = [] +# IntentsUI = [] +# IOBluetooth = [] +# IOBluetoothUI = [] +# IOKit = [] +# IOSurface = [] +# IOUSBHost = [] +# iTunesLibrary = [] +# JavaNativeFoundation = [] +# JavaRuntimeSupport = [] +# JavaScriptCore = [] +# Kerberos = [] +# Kernel = [] +# KernelManagement = [] +# LatentSemanticMapping = [] +# LDAP = [] +# LinkPresentation = [] +# LivePhotosKit JS = [] +# LocalAuthentication = [] +# LocalAuthenticationEmbeddedUI = [] +# MailKit = [] +# ManagedSettings = [] +# ManagedSettingsUI = [] +# MapKit = [] +# Maps Web Snapshots = [] +# MediaAccessibility = [] +# MediaLibrary = [] +# MediaPlayer = [] +# MediaSetup = [] +# MediaToolbox = [] +# Message UI = [] +# Messages = [] +# Metal = [] +# MetalPerformanceShaders = [] +# MetalPerformanceShadersGraph = [] +# MetalFX = [] +# MetalKit = [] +# MetricKit = [] +# MLCompute = [] +# ModelIO = [] +# MultipeerConnectivity = [] +# MusicKit = [] +# NaturalLanguage = [] +# NearbyInteraction = [] +# NetFS = [] +# Network = [] +# NetworkExtension = [] +# NetworkingDriverKit = [] +# NewsstandKit = [] +# NotificationCenter = [] +# OpenAL = [] +# OpenCL = [] +# OpenDirectory = [] +# OpenGL = [] # ES? +# os = [] +# OSAKit = [] +# OSLog = [] +# PackageDescription = [] +# ParavirtualizedGraphics = [] +# PassKit = [] +# PCIDriverKit = [] +# PCSC = [] +# PDFKit = [] +# PencilKit = [] +# PHASE = [] +# PhotoKit = [] +# Photos = [] +# PhotosUI = [] +# Playground Bluetooth = [] +# Playground Support = [] +# PreferencePanes = [] +# Professional Video Applications = [] +# ProximityReader = [] +# Push to Talk = [] +# PushKit = [] +# Quartz = [] +# QuartzCore = [] # Core Animation +# QuickLook = [] +# QuickLookThumbnailing = [] +# QuickLookUI = [] +# RealityKit = [] +# RegexBuilder = [] +# ReplayKit = [] +# RoomPlan = [] +# Roster API = [] +# Safari app extensions = [] +# SafariServices = [] +# SafetyKit = [] +# SceneKit = [] +# ScreenCaptureKit = [] +# ScreenSaver = [] +# ScreenTime = [] +# ScriptingBridge = [] +# SCSIControllerDriverKit = [] +# SCSIPeripheralsDriverKit = [] +# Security = [] +# SecurityFoundation = [] +# SecurityInterface = [] +# SensorKit = [] +# SerialDriverKit = [] +# ServiceManagement = [] +# Shared with You = [] +# ShazamKit = [] +# Sign in with Apple = [] +# simd = [] +# Siri Event Suggestions Markup = [] +# SiriKit = [] +# SiriKit Cloud Media = [] +# SMS and Call Reporting = [] +# Social = [] +# SoundAnalysis = [] +# Spatial = [] +# Speech = [] +# SpriteKit = [] +# StoreKit = [] +# StoreKit Test = [] +# Swift = [] +# Swift Charts = [] +# Swift Packages = [] +# Swift Playgrounds = [] +# SwiftUI = [] +# System = [] +# SyncServices = [] +# SystemConfiguration = [] +# SystemExtensions = [] +# Tabular Data = [] +# Tcl = [] +# Technotes = [] +# Thread Network = [] +# TV Services = [] +# TVML = [] +# TVMLKit = [] +# TVMLKit JS = [] +# TVUIKit = [] +# TWAIN = [] +# UIKit = [] +# UniformTypeIdentifiers = [] +# USBDriverKit = [] +# USBSerialDriverKit = [] +# UserNotifications = [] +# UserNotificationsUI = [] +# VideoDecodeAcceleration = [] +# VideoSubscriberAccount = [] +# VideoToolbox = [] +# Virtualization = [] +# Vision = [] +# VisionKit = [] +# vmnet = [] +# Wallet Orders = [] +# Wallet Passes = [] +# Watch Connectivity = [] +# WatchKit = [] +# watchOS Apps = [] +# WeatherKit = [] +# WeatherKit REST API = [] +# WebKit = [] +# WidgetKit = [] +# Xcode = [] +# Xcode Cloud = [] +# XcodeKit = [] +# xcselect = [] +# XCTest = [] +# XPC = [] diff --git a/crates/icrate/README.md b/crates/icrate/README.md new file mode 100644 index 000000000..431f73ea4 --- /dev/null +++ b/crates/icrate/README.md @@ -0,0 +1,8 @@ +# `icrate` + +[![Latest version](https://badgen.net/crates/v/icrate)](https://crates.io/crates/icrate) +[![License](https://badgen.net/badge/license/MIT/blue)](../LICENSE.txt) +[![Documentation](https://docs.rs/icrate/badge.svg)](https://docs.rs/icrate/) +[![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml) + +Rust bindings to Apple's frameworks. diff --git a/crates/icrate/src/AppKit/mod.rs b/crates/icrate/src/AppKit/mod.rs new file mode 100644 index 000000000..a17e607ff --- /dev/null +++ b/crates/icrate/src/AppKit/mod.rs @@ -0,0 +1,4 @@ +#[path = "../generated/AppKit/mod.rs"] +mod generated; + +pub use self::generated::*; diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs new file mode 100644 index 000000000..446c368eb --- /dev/null +++ b/crates/icrate/src/Foundation/mod.rs @@ -0,0 +1,8 @@ +#[path = "../generated/Foundation/mod.rs"] +mod generated; + +// TODO +pub use objc2::foundation::*; +pub use objc2::ns_string; + +pub use self::generated::*; diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs new file mode 100644 index 000000000..3c468bc8b --- /dev/null +++ b/crates/icrate/src/lib.rs @@ -0,0 +1,22 @@ +#![no_std] +#![warn(elided_lifetimes_in_paths)] +#![deny(non_ascii_idents)] +#![warn(unreachable_pub)] +#![deny(unsafe_op_in_unsafe_fn)] +#![warn(clippy::cargo)] +#![warn(clippy::ptr_as_ptr)] +#![allow(clippy::upper_case_acronyms)] +#![allow(non_camel_case_types)] +#![allow(non_upper_case_globals)] +#![allow(non_snake_case)] +// Update in Cargo.toml as well. +#![doc(html_root_url = "https://docs.rs/icrate/0.0.1")] + +#[cfg(feature = "objc")] +pub use objc2; + +// Frameworks +#[cfg(feature = "AppKit")] +pub mod AppKit; +#[cfg(feature = "Foundation")] +pub mod Foundation; From 595602519542f24f59220381ccd685f8b02e9067 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 15:57:41 +0200 Subject: [PATCH 024/131] Add config files --- crates/header-translator/Cargo.toml | 2 + crates/header-translator/src/config.rs | 69 ++++++++++++++++++++++++++ crates/header-translator/src/lib.rs | 3 ++ crates/header-translator/src/main.rs | 6 ++- crates/icrate/src/AppKit.toml | 0 crates/icrate/src/Foundation.toml | 28 +++++++++++ 6 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 crates/header-translator/src/config.rs create mode 100644 crates/icrate/src/AppKit.toml create mode 100644 crates/icrate/src/Foundation.toml diff --git a/crates/header-translator/Cargo.toml b/crates/header-translator/Cargo.toml index 19fb9d18e..8ce4386d5 100644 --- a/crates/header-translator/Cargo.toml +++ b/crates/header-translator/Cargo.toml @@ -12,3 +12,5 @@ clang = { version = "2.0", features = ["runtime", "clang_10_0"] } clang-sys = "1.0" quote = "1.0" proc-macro2 = "1.0" +toml = "0.5.9" +serde = { version = "1.0.144", features = ["derive"] } diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs new file mode 100644 index 000000000..3355b91ad --- /dev/null +++ b/crates/header-translator/src/config.rs @@ -0,0 +1,69 @@ +use std::collections::HashMap; +use std::fs; +use std::io::Result; +use std::path::{Path, PathBuf}; + +use serde::Deserialize; + +type ClassName = String; +type Selector = String; + +#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize)] +pub struct Unsafe { + #[serde(rename = "safe-methods")] + pub safe_methods: HashMap>, +} + +#[derive(Deserialize)] +#[serde(deny_unknown_fields)] +struct InnerConfig { + name: Option, + headers: Option>, + output: Option, + #[serde(rename = "unsafe")] + #[serde(default)] + unsafe_: Unsafe, + #[serde(rename = "mutating-methods")] + #[serde(default)] + mutating_methods: HashMap>, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Config { + pub name: String, + pub headers: Vec, + /// The output path, relative to the toml file. + pub output: PathBuf, + pub unsafe_: Unsafe, + pub mutating_methods: HashMap>, +} + +impl Config { + pub fn from_file(file: &Path) -> Result { + let s = fs::read_to_string(file)?; + + let config: InnerConfig = toml::from_str(&s)?; + + let name = config.name.unwrap_or_else(|| { + file.file_stem() + .expect("file stem") + .to_string_lossy() + .into_owned() + }); + let headers = config.headers.unwrap_or_else(|| vec![format!("{name}.h")]); + let parent = file.parent().expect("parent"); + let output = parent.join( + config + .output + .unwrap_or_else(|| Path::new("generated").join(&name)), + ); + + Ok(Self { + name, + headers, + output, + unsafe_: config.unsafe_, + mutating_methods: config.mutating_methods, + }) + } +} diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index de3fe3aec..83dd0804e 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -3,11 +3,14 @@ use proc_macro2::TokenStream; use quote::quote; mod availability; +mod config; mod method; mod objc2_utils; mod rust_type; mod stmt; +pub use self::config::Config; + use self::stmt::Stmt; pub fn create_rust_file(entities: &[Entity<'_>]) -> TokenStream { diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 233c70ea7..cd0dace7e 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -6,7 +6,7 @@ use std::process::{Command, Stdio}; use clang::source::File; use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index}; -use header_translator::create_rust_file; +use header_translator::{create_rust_file, Config}; fn main() { // let sysroot = Path::new("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"); @@ -17,6 +17,10 @@ fn main() { let index = Index::new(&clang, true, true); + let config = dbg!(Config::from_file(Path::new("icrate/src/AppKit.toml")).unwrap()); + let config = + dbg!(Config::from_file(Path::new("objc2/src/foundation/Foundation.toml")).unwrap()); + let _module_path = framework_path.join("module.map"); // for entry in framework_path.read_dir().unwrap() { diff --git a/crates/icrate/src/AppKit.toml b/crates/icrate/src/AppKit.toml new file mode 100644 index 000000000..e69de29bb diff --git a/crates/icrate/src/Foundation.toml b/crates/icrate/src/Foundation.toml new file mode 100644 index 000000000..e09ee4500 --- /dev/null +++ b/crates/icrate/src/Foundation.toml @@ -0,0 +1,28 @@ +name = "Foundation" +headers = ["Foundation.h"] +output = "generated/Foundation" + +[unsafe.safe-methods] +NSString = [ + "new", + # Assuming that (non-)nullability is properly set + "stringByAppendingString:", + "stringByAppendingPathComponent:", + # Assuming `NSStringEncoding` can be made safe + "lengthOfBytesUsingEncoding:", + "length", + # Safe to call, but the returned pointer may not be safe to use + "UTF8String", +] +NSMutableString = [ + "new", + "initWithString:", + "appendString:", + "setString:", +] + +[mutating-methods] +NSMutableString = [ + "appendString:", + "setString:", +] From cb9da7d5413d92872e8f11eb5eec1692e5d44950 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 15:31:34 +0200 Subject: [PATCH 025/131] Temporarily disable protocol generation --- crates/header-translator/src/stmt.rs | 29 +++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index ea3d32ffb..df3f94755 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -283,20 +283,23 @@ impl ToTokens for Stmt { } => { let name = format_ident!("{}", name); - quote! { - extern_protocol!( - #[derive(Debug)] - struct #name; - - unsafe impl ProtocolType for #name { - type Super = todo!(); - } - ); + // TODO - impl #name { - #(#methods)* - } - } + // quote! { + // extern_protocol!( + // #[derive(Debug)] + // struct #name; + // + // unsafe impl ProtocolType for #name { + // type Super = todo!(); + // } + // ); + // + // impl #name { + // #(#methods)* + // } + // } + quote!() } }; tokens.append_all(result); From e7d9e138ac83dfb1aec0270d689999b8ee0f1a27 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 15:58:55 +0200 Subject: [PATCH 026/131] Generate files --- crates/header-translator/src/config.rs | 8 ++-- crates/header-translator/src/lib.rs | 7 ++- crates/header-translator/src/main.rs | 63 +++++++++++++++++++------- crates/header-translator/src/method.rs | 11 ++++- crates/header-translator/src/stmt.rs | 40 ++++++++++------ 5 files changed, 91 insertions(+), 38 deletions(-) diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index 3355b91ad..c2f3c2ffd 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::{HashMap, HashSet}; use std::fs; use std::io::Result; use std::path::{Path, PathBuf}; @@ -11,7 +11,7 @@ type Selector = String; #[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize)] pub struct Unsafe { #[serde(rename = "safe-methods")] - pub safe_methods: HashMap>, + pub safe_methods: HashMap>, } #[derive(Deserialize)] @@ -25,7 +25,7 @@ struct InnerConfig { unsafe_: Unsafe, #[serde(rename = "mutating-methods")] #[serde(default)] - mutating_methods: HashMap>, + mutating_methods: HashMap>, } #[derive(Debug, Clone, PartialEq, Eq)] @@ -35,7 +35,7 @@ pub struct Config { /// The output path, relative to the toml file. pub output: PathBuf, pub unsafe_: Unsafe, - pub mutating_methods: HashMap>, + pub mutating_methods: HashMap>, } impl Config { diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 83dd0804e..1e8b01892 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -11,10 +11,13 @@ mod stmt; pub use self::config::Config; +use self::config::Unsafe; use self::stmt::Stmt; -pub fn create_rust_file(entities: &[Entity<'_>]) -> TokenStream { - let iter = entities.iter().filter_map(Stmt::parse); +pub fn create_rust_file(entities: &[Entity<'_>], unsafe_: &Unsafe) -> TokenStream { + let iter = entities + .iter() + .filter_map(|entity| Stmt::parse(entity, &unsafe_)); quote! { #(#iter)* } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index cd0dace7e..9d5c656ed 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,13 +1,36 @@ use std::collections::BTreeMap; -use std::io::Write; +use std::fs; +use std::io::{Result, Write}; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; use clang::source::File; use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index}; +use proc_macro2::TokenStream; +use quote::{format_ident, quote, TokenStreamExt}; use header_translator::{create_rust_file, Config}; +fn run_rustfmt(tokens: TokenStream) -> Vec { + let mut child = Command::new("rustfmt") + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .spawn() + .expect("failed running rustfmt"); + + let mut stdin = child.stdin.take().expect("failed to open stdin"); + write!(stdin, "{}", tokens).expect("failed writing"); + drop(stdin); + + let output = child.wait_with_output().expect("failed formatting"); + + if !output.status.success() { + panic!("failed running rustfmt with exit code {}", output.status) + } + + output.stdout +} + fn main() { // let sysroot = Path::new("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"); let sysroot = Path::new("./ideas/MacOSX-SDK-changes/MacOSXA.B.C.sdk"); @@ -17,9 +40,7 @@ fn main() { let index = Index::new(&clang, true, true); - let config = dbg!(Config::from_file(Path::new("icrate/src/AppKit.toml")).unwrap()); - let config = - dbg!(Config::from_file(Path::new("objc2/src/foundation/Foundation.toml")).unwrap()); + let _config = dbg!(Config::from_file(Path::new("icrate/src/AppKit.toml")).unwrap()); let _module_path = framework_path.join("module.map"); @@ -132,25 +153,35 @@ fn main() { // } // } - for res in result.values() { - let res = format!("{}", create_rust_file(&res)); + let config = dbg!(Config::from_file(Path::new("icrate/src/Foundation.toml")).unwrap()); + + let mut mod_tokens = TokenStream::new(); + + for (path, res) in result { + let tokens = create_rust_file(&res, &config.unsafe_); + let formatted = run_rustfmt(tokens); // println!("{}\n\n\n\n", res); - let mut child = Command::new("rustfmt") - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .spawn() - .expect("failed running rustfmt"); + let mut path = config + .output + .join(path.file_name().expect("header file name")); + path.set_extension("rs"); - let mut stdin = child.stdin.take().expect("failed to open stdin"); - stdin.write_all(res.as_bytes()).expect("failed writing"); - drop(stdin); + // truncate if the file exists + fs::write(&path, formatted).unwrap(); - let output = child.wait_with_output().expect("failed formatting"); - // println!("{}", String::from_utf8(output.stdout).unwrap()); + let name = format_ident!("{}", path.file_stem().unwrap().to_string_lossy()); + + mod_tokens.append_all(quote! { + mod #name; + pub use self::#name::*; + }); } + // truncate if the file exists + fs::write(config.output.join("mod.rs"), run_rustfmt(mod_tokens)).unwrap(); + // } // } } diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 040a17931..eb453b2e7 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -1,3 +1,5 @@ +use std::collections::HashSet; + use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; @@ -71,14 +73,20 @@ pub struct Method { designated_initializer: bool, arguments: Vec<(String, RustType)>, result_type: Option, + safe: bool, } impl Method { /// Takes one of `EntityKind::ObjCInstanceMethodDecl` or /// `EntityKind::ObjCClassMethodDecl`. - pub fn parse(entity: Entity<'_>) -> Option { + pub fn parse(entity: Entity<'_>, safe_methods: Option<&HashSet>) -> Option { // println!("Method {:?}", entity.get_display_name()); let selector = entity.get_name().expect("method selector"); + let safe = if let Some(safe_methods) = safe_methods { + safe_methods.contains(&selector) + } else { + false + }; if entity.is_variadic() { println!("Can't handle variadic method {}", selector); @@ -217,6 +225,7 @@ impl Method { designated_initializer, arguments, result_type, + safe, }) } } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index df3f94755..ca6feb0cf 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -3,11 +3,12 @@ use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; +use crate::config::Unsafe; use crate::method::Method; #[derive(Debug, Clone)] pub enum Stmt { - /// @interface + /// @interface name: superclass ClassDecl { name: String, availability: Availability, @@ -16,6 +17,7 @@ pub enum Stmt { protocols: Vec, methods: Vec, }, + /// @interface class_name (name) CategoryDecl { class_name: String, availability: Availability, @@ -25,6 +27,7 @@ pub enum Stmt { protocols: Vec, methods: Vec, }, + /// @protocol name ProtocolDecl { name: String, availability: Availability, @@ -34,7 +37,7 @@ pub enum Stmt { } impl Stmt { - pub fn parse(entity: &Entity<'_>) -> Option { + pub fn parse(entity: &Entity<'_>, unsafe_: &Unsafe) -> Option { match entity.get_kind() { EntityKind::InclusionDirective | EntityKind::MacroExpansion @@ -44,6 +47,7 @@ impl Stmt { EntityKind::ObjCInterfaceDecl => { // entity.get_mangled_objc_names() let name = entity.get_name().expect("class name"); + let safe_methods = unsafe_.safe_methods.get(&name); let availability = Availability::parse( entity .get_platform_availability() @@ -73,7 +77,7 @@ impl Stmt { protocols.push(entity.get_name().expect("protocolref to have name")); } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - if let Some(method) = Method::parse(entity) { + if let Some(method) = Method::parse(entity, safe_methods) { methods.push(method); } } @@ -115,7 +119,7 @@ impl Stmt { }) } EntityKind::ObjCCategoryDecl => { - let mut class = None; + let mut class_name = None; let availability = Availability::parse( entity .get_platform_availability() @@ -127,25 +131,31 @@ impl Stmt { entity.visit_children(|entity, _parent| { match entity.get_kind() { EntityKind::ObjCClassRef => { - if class.is_some() { + if class_name.is_some() { panic!("could not find unique category class") } - class = Some(entity); + class_name = Some(entity.get_name().expect("class name")); } EntityKind::ObjCProtocolRef => { protocols.push(entity.get_name().expect("protocolref to have name")); } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - if let Some(method) = Method::parse(entity) { + let safe_methods = unsafe_.safe_methods.get( + class_name + .as_ref() + .expect("no category class before methods"), + ); + if let Some(method) = Method::parse(entity, safe_methods) { methods.push(method); } } EntityKind::ObjCPropertyDecl => { - // println!( - // "Property {:?}, {:?}", - // entity.get_display_name().unwrap(), - // entity.get_objc_attributes().unwrap() - // ); + println!( + "Property {:?}, {:?}, {:?}", + class_name, + entity.get_display_name(), + entity.get_objc_attributes(), + ); // methods.push(quote! {}); } EntityKind::TemplateTypeParameter => { @@ -157,8 +167,7 @@ impl Stmt { EntityVisitResult::Continue }); - let class = class.expect("could not find category class"); - let class_name = class.get_name().expect("class name"); + let class_name = class_name.expect("could not find category class"); Some(Self::CategoryDecl { class_name, @@ -170,6 +179,7 @@ impl Stmt { } EntityKind::ObjCProtocolDecl => { let name = entity.get_name().expect("protocol name"); + let safe_methods = unsafe_.safe_methods.get(&name); let availability = Availability::parse( entity .get_platform_availability() @@ -188,7 +198,7 @@ impl Stmt { } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { // TODO: Required vs. optional methods - if let Some(method) = Method::parse(entity) { + if let Some(method) = Method::parse(entity, safe_methods) { methods.push(method); } } From f4165ee5c88d73a17e010fa7b676ac317c3b3750 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 15:59:33 +0200 Subject: [PATCH 027/131] Add initial generated files for Foundation --- .../src/generated/Foundation/Foundation.rs | 1 + .../generated/Foundation/FoundationErrors.rs | 1 + .../FoundationLegacySwiftCompatibility.rs | 1 + .../generated/Foundation/NSAffineTransform.rs | 54 + .../Foundation/NSAppleEventDescriptor.rs | 290 ++++++ .../Foundation/NSAppleEventManager.rs | 84 ++ .../src/generated/Foundation/NSAppleScript.rs | 41 + .../src/generated/Foundation/NSArchiver.rs | 120 +++ .../src/generated/Foundation/NSArray.rs | 494 +++++++++ .../Foundation/NSAttributedString.rs | 485 +++++++++ .../generated/Foundation/NSAutoreleasePool.rs | 18 + .../NSBackgroundActivityScheduler.rs | 48 + .../src/generated/Foundation/NSBundle.rs | 417 ++++++++ .../Foundation/NSByteCountFormatter.rs | 98 ++ .../src/generated/Foundation/NSByteOrder.rs | 1 + .../src/generated/Foundation/NSCache.rs | 60 ++ .../src/generated/Foundation/NSCalendar.rs | 642 ++++++++++++ .../generated/Foundation/NSCalendarDate.rs | 238 +++++ .../generated/Foundation/NSCharacterSet.rs | 186 ++++ .../Foundation/NSClassDescription.rs | 63 ++ .../src/generated/Foundation/NSCoder.rs | 293 ++++++ .../Foundation/NSComparisonPredicate.rs | 74 ++ .../Foundation/NSCompoundPredicate.rs | 40 + .../src/generated/Foundation/NSConnection.rs | 216 ++++ .../icrate/src/generated/Foundation/NSData.rs | 390 ++++++++ .../icrate/src/generated/Foundation/NSDate.rs | 110 ++ .../Foundation/NSDateComponentsFormatter.rs | 132 +++ .../generated/Foundation/NSDateFormatter.rs | 313 ++++++ .../generated/Foundation/NSDateInterval.rs | 56 ++ .../Foundation/NSDateIntervalFormatter.rs | 58 ++ .../src/generated/Foundation/NSDecimal.rs | 1 + .../generated/Foundation/NSDecimalNumber.rs | 270 +++++ .../src/generated/Foundation/NSDictionary.rs | 307 ++++++ .../generated/Foundation/NSDistantObject.rs | 52 + .../generated/Foundation/NSDistributedLock.rs | 30 + .../NSDistributedNotificationCenter.rs | 121 +++ .../generated/Foundation/NSEnergyFormatter.rs | 64 ++ .../src/generated/Foundation/NSEnumerator.rs | 18 + .../src/generated/Foundation/NSError.rs | 103 ++ .../src/generated/Foundation/NSException.rs | 79 ++ .../src/generated/Foundation/NSExpression.rs | 179 ++++ .../Foundation/NSExtensionContext.rs | 29 + .../generated/Foundation/NSExtensionItem.rs | 36 + .../Foundation/NSExtensionRequestHandling.rs | 1 + .../generated/Foundation/NSFileCoordinator.rs | 174 ++++ .../src/generated/Foundation/NSFileHandle.rs | 213 ++++ .../src/generated/Foundation/NSFileManager.rs | 663 +++++++++++++ .../generated/Foundation/NSFilePresenter.rs | 1 + .../src/generated/Foundation/NSFileVersion.rs | 118 +++ .../src/generated/Foundation/NSFileWrapper.rs | 171 ++++ .../src/generated/Foundation/NSFormatter.rs | 72 ++ .../Foundation/NSGarbageCollector.rs | 39 + .../src/generated/Foundation/NSGeometry.rs | 69 ++ .../generated/Foundation/NSHFSFileTypes.rs | 1 + .../src/generated/Foundation/NSHTTPCookie.rs | 72 ++ .../Foundation/NSHTTPCookieStorage.rs | 74 ++ .../src/generated/Foundation/NSHashTable.rs | 87 ++ .../icrate/src/generated/Foundation/NSHost.rs | 45 + .../Foundation/NSISO8601DateFormatter.rs | 42 + .../src/generated/Foundation/NSIndexPath.rs | 52 + .../src/generated/Foundation/NSIndexSet.rs | 204 ++++ .../generated/Foundation/NSInflectionRule.rs | 39 + .../src/generated/Foundation/NSInvocation.rs | 53 + .../generated/Foundation/NSItemProvider.rs | 196 ++++ .../Foundation/NSJSONSerialization.rs | 62 ++ .../generated/Foundation/NSKeyValueCoding.rs | 153 +++ .../Foundation/NSKeyValueObserving.rs | 288 ++++++ .../generated/Foundation/NSKeyedArchiver.rs | 303 ++++++ .../generated/Foundation/NSLengthFormatter.rs | 64 ++ .../Foundation/NSLinguisticTagger.rs | 277 ++++++ .../generated/Foundation/NSListFormatter.rs | 33 + .../src/generated/Foundation/NSLocale.rs | 215 ++++ .../icrate/src/generated/Foundation/NSLock.rs | 112 +++ .../src/generated/Foundation/NSMapTable.rs | 99 ++ .../generated/Foundation/NSMassFormatter.rs | 68 ++ .../src/generated/Foundation/NSMeasurement.rs | 40 + .../Foundation/NSMeasurementFormatter.rs | 42 + .../src/generated/Foundation/NSMetadata.rs | 191 ++++ .../Foundation/NSMetadataAttributes.rs | 1 + .../generated/Foundation/NSMethodSignature.rs | 32 + .../src/generated/Foundation/NSMorphology.rs | 103 ++ .../src/generated/Foundation/NSNetServices.rs | 152 +++ .../generated/Foundation/NSNotification.rs | 134 +++ .../Foundation/NSNotificationQueue.rs | 55 + .../icrate/src/generated/Foundation/NSNull.rs | 12 + .../generated/Foundation/NSNumberFormatter.rs | 490 +++++++++ .../src/generated/Foundation/NSObjCRuntime.rs | 1 + .../src/generated/Foundation/NSObject.rs | 30 + .../generated/Foundation/NSObjectScripting.rs | 43 + .../src/generated/Foundation/NSOperation.rs | 200 ++++ .../Foundation/NSOrderedCollectionChange.rs | 56 ++ .../NSOrderedCollectionDifference.rs | 62 ++ .../src/generated/Foundation/NSOrderedSet.rs | 463 +++++++++ .../src/generated/Foundation/NSOrthography.rs | 62 ++ .../generated/Foundation/NSPathUtilities.rs | 79 ++ .../Foundation/NSPersonNameComponents.rs | 54 + .../NSPersonNameComponentsFormatter.rs | 70 ++ .../generated/Foundation/NSPointerArray.rs | 73 ++ .../Foundation/NSPointerFunctions.rs | 68 ++ .../icrate/src/generated/Foundation/NSPort.rs | 219 ++++ .../src/generated/Foundation/NSPortCoder.rs | 64 ++ .../src/generated/Foundation/NSPortMessage.rs | 40 + .../generated/Foundation/NSPortNameServer.rs | 141 +++ .../src/generated/Foundation/NSPredicate.rs | 102 ++ .../src/generated/Foundation/NSProcessInfo.rs | 154 +++ .../src/generated/Foundation/NSProgress.rs | 219 ++++ .../generated/Foundation/NSPropertyList.rs | 99 ++ .../generated/Foundation/NSProtocolChecker.rs | 35 + .../src/generated/Foundation/NSProxy.rs | 48 + .../src/generated/Foundation/NSRange.rs | 9 + .../Foundation/NSRegularExpression.rs | 196 ++++ .../Foundation/NSRelativeDateTimeFormatter.rs | 68 ++ .../src/generated/Foundation/NSRunLoop.rs | 142 +++ .../src/generated/Foundation/NSScanner.rs | 109 ++ .../Foundation/NSScriptClassDescription.rs | 111 +++ .../Foundation/NSScriptCoercionHandler.rs | 34 + .../generated/Foundation/NSScriptCommand.rs | 109 ++ .../Foundation/NSScriptCommandDescription.rs | 76 ++ .../Foundation/NSScriptExecutionContext.rs | 30 + .../Foundation/NSScriptKeyValueCoding.rs | 63 ++ .../Foundation/NSScriptObjectSpecifiers.rs | 443 +++++++++ .../NSScriptStandardSuiteCommands.rs | 123 +++ .../Foundation/NSScriptSuiteRegistry.rs | 79 ++ .../Foundation/NSScriptWhoseTests.rs | 121 +++ .../icrate/src/generated/Foundation/NSSet.rs | 209 ++++ .../generated/Foundation/NSSortDescriptor.rs | 143 +++ .../src/generated/Foundation/NSSpellServer.rs | 32 + .../src/generated/Foundation/NSStream.rs | 207 ++++ .../src/generated/Foundation/NSString.rs | 938 ++++++++++++++++++ .../icrate/src/generated/Foundation/NSTask.rs | 141 +++ .../Foundation/NSTextCheckingResult.rs | 219 ++++ .../src/generated/Foundation/NSThread.rs | 198 ++++ .../src/generated/Foundation/NSTimeZone.rs | 122 +++ .../src/generated/Foundation/NSTimer.rs | 150 +++ .../icrate/src/generated/Foundation/NSURL.rs | 773 +++++++++++++++ .../NSURLAuthenticationChallenge.rs | 57 ++ .../src/generated/Foundation/NSURLCache.rs | 156 +++ .../generated/Foundation/NSURLConnection.rs | 93 ++ .../generated/Foundation/NSURLCredential.rs | 92 ++ .../Foundation/NSURLCredentialStorage.rs | 139 +++ .../src/generated/Foundation/NSURLDownload.rs | 53 + .../src/generated/Foundation/NSURLError.rs | 1 + .../src/generated/Foundation/NSURLHandle.rs | 95 ++ .../Foundation/NSURLProtectionSpace.rs | 72 ++ .../src/generated/Foundation/NSURLProtocol.rs | 95 ++ .../src/generated/Foundation/NSURLRequest.rs | 217 ++++ .../src/generated/Foundation/NSURLResponse.rs | 75 ++ .../src/generated/Foundation/NSURLSession.rs | 937 +++++++++++++++++ .../icrate/src/generated/Foundation/NSUUID.rs | 30 + .../Foundation/NSUbiquitousKeyValueStore.rs | 69 ++ .../src/generated/Foundation/NSUndoManager.rs | 127 +++ .../icrate/src/generated/Foundation/NSUnit.rs | 898 +++++++++++++++++ .../generated/Foundation/NSUserActivity.rs | 157 +++ .../generated/Foundation/NSUserDefaults.rs | 126 +++ .../Foundation/NSUserNotification.rs | 198 ++++ .../generated/Foundation/NSUserScriptTask.rs | 102 ++ .../src/generated/Foundation/NSValue.rs | 226 +++++ .../Foundation/NSValueTransformer.rs | 54 + .../src/generated/Foundation/NSXMLDTD.rs | 104 ++ .../src/generated/Foundation/NSXMLDTDNode.rs | 49 + .../src/generated/Foundation/NSXMLDocument.rs | 155 +++ .../src/generated/Foundation/NSXMLElement.rs | 126 +++ .../src/generated/Foundation/NSXMLNode.rs | 229 +++++ .../generated/Foundation/NSXMLNodeOptions.rs | 1 + .../src/generated/Foundation/NSXMLParser.rs | 93 ++ .../generated/Foundation/NSXPCConnection.rs | 277 ++++++ .../icrate/src/generated/Foundation/NSZone.rs | 1 + crates/icrate/src/generated/Foundation/mod.rs | 334 +++++++ 168 files changed, 24290 insertions(+) create mode 100644 crates/icrate/src/generated/Foundation/Foundation.rs create mode 100644 crates/icrate/src/generated/Foundation/FoundationErrors.rs create mode 100644 crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs create mode 100644 crates/icrate/src/generated/Foundation/NSAffineTransform.rs create mode 100644 crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs create mode 100644 crates/icrate/src/generated/Foundation/NSAppleEventManager.rs create mode 100644 crates/icrate/src/generated/Foundation/NSAppleScript.rs create mode 100644 crates/icrate/src/generated/Foundation/NSArchiver.rs create mode 100644 crates/icrate/src/generated/Foundation/NSArray.rs create mode 100644 crates/icrate/src/generated/Foundation/NSAttributedString.rs create mode 100644 crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs create mode 100644 crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs create mode 100644 crates/icrate/src/generated/Foundation/NSBundle.rs create mode 100644 crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSByteOrder.rs create mode 100644 crates/icrate/src/generated/Foundation/NSCache.rs create mode 100644 crates/icrate/src/generated/Foundation/NSCalendar.rs create mode 100644 crates/icrate/src/generated/Foundation/NSCalendarDate.rs create mode 100644 crates/icrate/src/generated/Foundation/NSCharacterSet.rs create mode 100644 crates/icrate/src/generated/Foundation/NSClassDescription.rs create mode 100644 crates/icrate/src/generated/Foundation/NSCoder.rs create mode 100644 crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs create mode 100644 crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs create mode 100644 crates/icrate/src/generated/Foundation/NSConnection.rs create mode 100644 crates/icrate/src/generated/Foundation/NSData.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDate.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDateFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDateInterval.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDecimal.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDecimalNumber.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDictionary.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDistantObject.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDistributedLock.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSEnumerator.rs create mode 100644 crates/icrate/src/generated/Foundation/NSError.rs create mode 100644 crates/icrate/src/generated/Foundation/NSException.rs create mode 100644 crates/icrate/src/generated/Foundation/NSExpression.rs create mode 100644 crates/icrate/src/generated/Foundation/NSExtensionContext.rs create mode 100644 crates/icrate/src/generated/Foundation/NSExtensionItem.rs create mode 100644 crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs create mode 100644 crates/icrate/src/generated/Foundation/NSFileCoordinator.rs create mode 100644 crates/icrate/src/generated/Foundation/NSFileHandle.rs create mode 100644 crates/icrate/src/generated/Foundation/NSFileManager.rs create mode 100644 crates/icrate/src/generated/Foundation/NSFilePresenter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSFileVersion.rs create mode 100644 crates/icrate/src/generated/Foundation/NSFileWrapper.rs create mode 100644 crates/icrate/src/generated/Foundation/NSFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSGarbageCollector.rs create mode 100644 crates/icrate/src/generated/Foundation/NSGeometry.rs create mode 100644 crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs create mode 100644 crates/icrate/src/generated/Foundation/NSHTTPCookie.rs create mode 100644 crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs create mode 100644 crates/icrate/src/generated/Foundation/NSHashTable.rs create mode 100644 crates/icrate/src/generated/Foundation/NSHost.rs create mode 100644 crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSIndexPath.rs create mode 100644 crates/icrate/src/generated/Foundation/NSIndexSet.rs create mode 100644 crates/icrate/src/generated/Foundation/NSInflectionRule.rs create mode 100644 crates/icrate/src/generated/Foundation/NSInvocation.rs create mode 100644 crates/icrate/src/generated/Foundation/NSItemProvider.rs create mode 100644 crates/icrate/src/generated/Foundation/NSJSONSerialization.rs create mode 100644 crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs create mode 100644 crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs create mode 100644 crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs create mode 100644 crates/icrate/src/generated/Foundation/NSLengthFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs create mode 100644 crates/icrate/src/generated/Foundation/NSListFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSLocale.rs create mode 100644 crates/icrate/src/generated/Foundation/NSLock.rs create mode 100644 crates/icrate/src/generated/Foundation/NSMapTable.rs create mode 100644 crates/icrate/src/generated/Foundation/NSMassFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSMeasurement.rs create mode 100644 crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSMetadata.rs create mode 100644 crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs create mode 100644 crates/icrate/src/generated/Foundation/NSMethodSignature.rs create mode 100644 crates/icrate/src/generated/Foundation/NSMorphology.rs create mode 100644 crates/icrate/src/generated/Foundation/NSNetServices.rs create mode 100644 crates/icrate/src/generated/Foundation/NSNotification.rs create mode 100644 crates/icrate/src/generated/Foundation/NSNotificationQueue.rs create mode 100644 crates/icrate/src/generated/Foundation/NSNull.rs create mode 100644 crates/icrate/src/generated/Foundation/NSNumberFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSObjCRuntime.rs create mode 100644 crates/icrate/src/generated/Foundation/NSObject.rs create mode 100644 crates/icrate/src/generated/Foundation/NSObjectScripting.rs create mode 100644 crates/icrate/src/generated/Foundation/NSOperation.rs create mode 100644 crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs create mode 100644 crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs create mode 100644 crates/icrate/src/generated/Foundation/NSOrderedSet.rs create mode 100644 crates/icrate/src/generated/Foundation/NSOrthography.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPathUtilities.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPointerArray.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPointerFunctions.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPort.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPortCoder.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPortMessage.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPortNameServer.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPredicate.rs create mode 100644 crates/icrate/src/generated/Foundation/NSProcessInfo.rs create mode 100644 crates/icrate/src/generated/Foundation/NSProgress.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPropertyList.rs create mode 100644 crates/icrate/src/generated/Foundation/NSProtocolChecker.rs create mode 100644 crates/icrate/src/generated/Foundation/NSProxy.rs create mode 100644 crates/icrate/src/generated/Foundation/NSRange.rs create mode 100644 crates/icrate/src/generated/Foundation/NSRegularExpression.rs create mode 100644 crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs create mode 100644 crates/icrate/src/generated/Foundation/NSRunLoop.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScanner.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptCommand.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs create mode 100644 crates/icrate/src/generated/Foundation/NSSet.rs create mode 100644 crates/icrate/src/generated/Foundation/NSSortDescriptor.rs create mode 100644 crates/icrate/src/generated/Foundation/NSSpellServer.rs create mode 100644 crates/icrate/src/generated/Foundation/NSStream.rs create mode 100644 crates/icrate/src/generated/Foundation/NSString.rs create mode 100644 crates/icrate/src/generated/Foundation/NSTask.rs create mode 100644 crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs create mode 100644 crates/icrate/src/generated/Foundation/NSThread.rs create mode 100644 crates/icrate/src/generated/Foundation/NSTimeZone.rs create mode 100644 crates/icrate/src/generated/Foundation/NSTimer.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURL.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLCache.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLConnection.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLCredential.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLDownload.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLError.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLHandle.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLProtocol.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLRequest.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLResponse.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLSession.rs create mode 100644 crates/icrate/src/generated/Foundation/NSUUID.rs create mode 100644 crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs create mode 100644 crates/icrate/src/generated/Foundation/NSUndoManager.rs create mode 100644 crates/icrate/src/generated/Foundation/NSUnit.rs create mode 100644 crates/icrate/src/generated/Foundation/NSUserActivity.rs create mode 100644 crates/icrate/src/generated/Foundation/NSUserDefaults.rs create mode 100644 crates/icrate/src/generated/Foundation/NSUserNotification.rs create mode 100644 crates/icrate/src/generated/Foundation/NSUserScriptTask.rs create mode 100644 crates/icrate/src/generated/Foundation/NSValue.rs create mode 100644 crates/icrate/src/generated/Foundation/NSValueTransformer.rs create mode 100644 crates/icrate/src/generated/Foundation/NSXMLDTD.rs create mode 100644 crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs create mode 100644 crates/icrate/src/generated/Foundation/NSXMLDocument.rs create mode 100644 crates/icrate/src/generated/Foundation/NSXMLElement.rs create mode 100644 crates/icrate/src/generated/Foundation/NSXMLNode.rs create mode 100644 crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs create mode 100644 crates/icrate/src/generated/Foundation/NSXMLParser.rs create mode 100644 crates/icrate/src/generated/Foundation/NSXPCConnection.rs create mode 100644 crates/icrate/src/generated/Foundation/NSZone.rs diff --git a/crates/icrate/src/generated/Foundation/Foundation.rs b/crates/icrate/src/generated/Foundation/Foundation.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/Foundation.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs new file mode 100644 index 000000000..c69243353 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -0,0 +1,54 @@ +extern_class!( + #[derive(Debug)] + struct NSAffineTransform; + unsafe impl ClassType for NSAffineTransform { + type Super = NSObject; + } +); +impl NSAffineTransform { + pub unsafe fn transform() -> Id { + msg_send_id![Self::class(), transform] + } + pub unsafe fn initWithTransform(&self, transform: &NSAffineTransform) -> Id { + msg_send_id![self, initWithTransform: transform] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn translateXBy_yBy(&self, deltaX: CGFloat, deltaY: CGFloat) { + msg_send![self, translateXBy: deltaX, yBy: deltaY] + } + pub unsafe fn rotateByDegrees(&self, angle: CGFloat) { + msg_send![self, rotateByDegrees: angle] + } + pub unsafe fn rotateByRadians(&self, angle: CGFloat) { + msg_send![self, rotateByRadians: angle] + } + pub unsafe fn scaleBy(&self, scale: CGFloat) { + msg_send![self, scaleBy: scale] + } + pub unsafe fn scaleXBy_yBy(&self, scaleX: CGFloat, scaleY: CGFloat) { + msg_send![self, scaleXBy: scaleX, yBy: scaleY] + } + pub unsafe fn invert(&self) { + msg_send![self, invert] + } + pub unsafe fn appendTransform(&self, transform: &NSAffineTransform) { + msg_send![self, appendTransform: transform] + } + pub unsafe fn prependTransform(&self, transform: &NSAffineTransform) { + msg_send![self, prependTransform: transform] + } + pub unsafe fn transformPoint(&self, aPoint: NSPoint) -> NSPoint { + msg_send![self, transformPoint: aPoint] + } + pub unsafe fn transformSize(&self, aSize: NSSize) -> NSSize { + msg_send![self, transformSize: aSize] + } + pub unsafe fn transformStruct(&self) -> NSAffineTransformStruct { + msg_send![self, transformStruct] + } + pub unsafe fn setTransformStruct(&self, transformStruct: NSAffineTransformStruct) { + msg_send![self, setTransformStruct: transformStruct] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs new file mode 100644 index 000000000..ab9ec83d8 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -0,0 +1,290 @@ +extern_class!( + #[derive(Debug)] + struct NSAppleEventDescriptor; + unsafe impl ClassType for NSAppleEventDescriptor { + type Super = NSObject; + } +); +impl NSAppleEventDescriptor { + pub unsafe fn nullDescriptor() -> Id { + msg_send_id![Self::class(), nullDescriptor] + } + pub unsafe fn descriptorWithDescriptorType_bytes_length( + descriptorType: DescType, + bytes: *mut c_void, + byteCount: NSUInteger, + ) -> Option> { + msg_send_id![ + Self::class(), + descriptorWithDescriptorType: descriptorType, + bytes: bytes, + length: byteCount + ] + } + pub unsafe fn descriptorWithDescriptorType_data( + descriptorType: DescType, + data: Option<&NSData>, + ) -> Option> { + msg_send_id![ + Self::class(), + descriptorWithDescriptorType: descriptorType, + data: data + ] + } + pub unsafe fn descriptorWithBoolean(boolean: Boolean) -> Id { + msg_send_id![Self::class(), descriptorWithBoolean: boolean] + } + pub unsafe fn descriptorWithEnumCode(enumerator: OSType) -> Id { + msg_send_id![Self::class(), descriptorWithEnumCode: enumerator] + } + pub unsafe fn descriptorWithInt32(signedInt: SInt32) -> Id { + msg_send_id![Self::class(), descriptorWithInt32: signedInt] + } + pub unsafe fn descriptorWithDouble( + doubleValue: c_double, + ) -> Id { + msg_send_id![Self::class(), descriptorWithDouble: doubleValue] + } + pub unsafe fn descriptorWithTypeCode(typeCode: OSType) -> Id { + msg_send_id![Self::class(), descriptorWithTypeCode: typeCode] + } + pub unsafe fn descriptorWithString(string: &NSString) -> Id { + msg_send_id![Self::class(), descriptorWithString: string] + } + pub unsafe fn descriptorWithDate(date: &NSDate) -> Id { + msg_send_id![Self::class(), descriptorWithDate: date] + } + pub unsafe fn descriptorWithFileURL(fileURL: &NSURL) -> Id { + msg_send_id![Self::class(), descriptorWithFileURL: fileURL] + } + pub unsafe fn appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID( + eventClass: AEEventClass, + eventID: AEEventID, + targetDescriptor: Option<&NSAppleEventDescriptor>, + returnID: AEReturnID, + transactionID: AETransactionID, + ) -> Id { + msg_send_id![ + Self::class(), + appleEventWithEventClass: eventClass, + eventID: eventID, + targetDescriptor: targetDescriptor, + returnID: returnID, + transactionID: transactionID + ] + } + pub unsafe fn listDescriptor() -> Id { + msg_send_id![Self::class(), listDescriptor] + } + pub unsafe fn recordDescriptor() -> Id { + msg_send_id![Self::class(), recordDescriptor] + } + pub unsafe fn currentProcessDescriptor() -> Id { + msg_send_id![Self::class(), currentProcessDescriptor] + } + pub unsafe fn descriptorWithProcessIdentifier( + processIdentifier: pid_t, + ) -> Id { + msg_send_id![ + Self::class(), + descriptorWithProcessIdentifier: processIdentifier + ] + } + pub unsafe fn descriptorWithBundleIdentifier( + bundleIdentifier: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + descriptorWithBundleIdentifier: bundleIdentifier + ] + } + pub unsafe fn descriptorWithApplicationURL( + applicationURL: &NSURL, + ) -> Id { + msg_send_id![Self::class(), descriptorWithApplicationURL: applicationURL] + } + pub unsafe fn initWithAEDescNoCopy(&self, aeDesc: NonNull) -> Id { + msg_send_id![self, initWithAEDescNoCopy: aeDesc] + } + pub unsafe fn initWithDescriptorType_bytes_length( + &self, + descriptorType: DescType, + bytes: *mut c_void, + byteCount: NSUInteger, + ) -> Option> { + msg_send_id![ + self, + initWithDescriptorType: descriptorType, + bytes: bytes, + length: byteCount + ] + } + pub unsafe fn initWithDescriptorType_data( + &self, + descriptorType: DescType, + data: Option<&NSData>, + ) -> Option> { + msg_send_id![self, initWithDescriptorType: descriptorType, data: data] + } + pub unsafe fn initWithEventClass_eventID_targetDescriptor_returnID_transactionID( + &self, + eventClass: AEEventClass, + eventID: AEEventID, + targetDescriptor: Option<&NSAppleEventDescriptor>, + returnID: AEReturnID, + transactionID: AETransactionID, + ) -> Id { + msg_send_id![ + self, + initWithEventClass: eventClass, + eventID: eventID, + targetDescriptor: targetDescriptor, + returnID: returnID, + transactionID: transactionID + ] + } + pub unsafe fn initListDescriptor(&self) -> Id { + msg_send_id![self, initListDescriptor] + } + pub unsafe fn initRecordDescriptor(&self) -> Id { + msg_send_id![self, initRecordDescriptor] + } + pub unsafe fn setParamDescriptor_forKeyword( + &self, + descriptor: &NSAppleEventDescriptor, + keyword: AEKeyword, + ) { + msg_send![self, setParamDescriptor: descriptor, forKeyword: keyword] + } + pub unsafe fn paramDescriptorForKeyword( + &self, + keyword: AEKeyword, + ) -> Option> { + msg_send_id![self, paramDescriptorForKeyword: keyword] + } + pub unsafe fn removeParamDescriptorWithKeyword(&self, keyword: AEKeyword) { + msg_send![self, removeParamDescriptorWithKeyword: keyword] + } + pub unsafe fn setAttributeDescriptor_forKeyword( + &self, + descriptor: &NSAppleEventDescriptor, + keyword: AEKeyword, + ) { + msg_send![ + self, + setAttributeDescriptor: descriptor, + forKeyword: keyword + ] + } + pub unsafe fn attributeDescriptorForKeyword( + &self, + keyword: AEKeyword, + ) -> Option> { + msg_send_id![self, attributeDescriptorForKeyword: keyword] + } + pub unsafe fn sendEventWithOptions_timeout_error( + &self, + sendOptions: NSAppleEventSendOptions, + timeoutInSeconds: NSTimeInterval, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + sendEventWithOptions: sendOptions, + timeout: timeoutInSeconds, + error: error + ] + } + pub unsafe fn insertDescriptor_atIndex( + &self, + descriptor: &NSAppleEventDescriptor, + index: NSInteger, + ) { + msg_send![self, insertDescriptor: descriptor, atIndex: index] + } + pub unsafe fn descriptorAtIndex( + &self, + index: NSInteger, + ) -> Option> { + msg_send_id![self, descriptorAtIndex: index] + } + pub unsafe fn removeDescriptorAtIndex(&self, index: NSInteger) { + msg_send![self, removeDescriptorAtIndex: index] + } + pub unsafe fn setDescriptor_forKeyword( + &self, + descriptor: &NSAppleEventDescriptor, + keyword: AEKeyword, + ) { + msg_send![self, setDescriptor: descriptor, forKeyword: keyword] + } + pub unsafe fn descriptorForKeyword( + &self, + keyword: AEKeyword, + ) -> Option> { + msg_send_id![self, descriptorForKeyword: keyword] + } + pub unsafe fn removeDescriptorWithKeyword(&self, keyword: AEKeyword) { + msg_send![self, removeDescriptorWithKeyword: keyword] + } + pub unsafe fn keywordForDescriptorAtIndex(&self, index: NSInteger) -> AEKeyword { + msg_send![self, keywordForDescriptorAtIndex: index] + } + pub unsafe fn coerceToDescriptorType( + &self, + descriptorType: DescType, + ) -> Option> { + msg_send_id![self, coerceToDescriptorType: descriptorType] + } + pub unsafe fn aeDesc(&self) -> *mut AEDesc { + msg_send![self, aeDesc] + } + pub unsafe fn descriptorType(&self) -> DescType { + msg_send![self, descriptorType] + } + pub unsafe fn data(&self) -> Id { + msg_send_id![self, data] + } + pub unsafe fn booleanValue(&self) -> Boolean { + msg_send![self, booleanValue] + } + pub unsafe fn enumCodeValue(&self) -> OSType { + msg_send![self, enumCodeValue] + } + pub unsafe fn int32Value(&self) -> SInt32 { + msg_send![self, int32Value] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } + pub unsafe fn typeCodeValue(&self) -> OSType { + msg_send![self, typeCodeValue] + } + pub unsafe fn stringValue(&self) -> Option> { + msg_send_id![self, stringValue] + } + pub unsafe fn dateValue(&self) -> Option> { + msg_send_id![self, dateValue] + } + pub unsafe fn fileURLValue(&self) -> Option> { + msg_send_id![self, fileURLValue] + } + pub unsafe fn eventClass(&self) -> AEEventClass { + msg_send![self, eventClass] + } + pub unsafe fn eventID(&self) -> AEEventID { + msg_send![self, eventID] + } + pub unsafe fn returnID(&self) -> AEReturnID { + msg_send![self, returnID] + } + pub unsafe fn transactionID(&self) -> AETransactionID { + msg_send![self, transactionID] + } + pub unsafe fn isRecordDescriptor(&self) -> bool { + msg_send![self, isRecordDescriptor] + } + pub unsafe fn numberOfItems(&self) -> NSInteger { + msg_send![self, numberOfItems] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs new file mode 100644 index 000000000..13bc3b3e4 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -0,0 +1,84 @@ +extern_class!( + #[derive(Debug)] + struct NSAppleEventManager; + unsafe impl ClassType for NSAppleEventManager { + type Super = NSObject; + } +); +impl NSAppleEventManager { + pub unsafe fn sharedAppleEventManager() -> Id { + msg_send_id![Self::class(), sharedAppleEventManager] + } + pub unsafe fn setEventHandler_andSelector_forEventClass_andEventID( + &self, + handler: &Object, + handleEventSelector: Sel, + eventClass: AEEventClass, + eventID: AEEventID, + ) { + msg_send![ + self, + setEventHandler: handler, + andSelector: handleEventSelector, + forEventClass: eventClass, + andEventID: eventID + ] + } + pub unsafe fn removeEventHandlerForEventClass_andEventID( + &self, + eventClass: AEEventClass, + eventID: AEEventID, + ) { + msg_send![ + self, + removeEventHandlerForEventClass: eventClass, + andEventID: eventID + ] + } + pub unsafe fn dispatchRawAppleEvent_withRawReply_handlerRefCon( + &self, + theAppleEvent: NonNull, + theReply: NonNull, + handlerRefCon: SRefCon, + ) -> OSErr { + msg_send![ + self, + dispatchRawAppleEvent: theAppleEvent, + withRawReply: theReply, + handlerRefCon: handlerRefCon + ] + } + pub unsafe fn suspendCurrentAppleEvent(&self) -> NSAppleEventManagerSuspensionID { + msg_send![self, suspendCurrentAppleEvent] + } + pub unsafe fn appleEventForSuspensionID( + &self, + suspensionID: NSAppleEventManagerSuspensionID, + ) -> Id { + msg_send_id![self, appleEventForSuspensionID: suspensionID] + } + pub unsafe fn replyAppleEventForSuspensionID( + &self, + suspensionID: NSAppleEventManagerSuspensionID, + ) -> Id { + msg_send_id![self, replyAppleEventForSuspensionID: suspensionID] + } + pub unsafe fn setCurrentAppleEventAndReplyEventWithSuspensionID( + &self, + suspensionID: NSAppleEventManagerSuspensionID, + ) { + msg_send![ + self, + setCurrentAppleEventAndReplyEventWithSuspensionID: suspensionID + ] + } + pub unsafe fn resumeWithSuspensionID(&self, suspensionID: NSAppleEventManagerSuspensionID) { + msg_send![self, resumeWithSuspensionID: suspensionID] + } + pub unsafe fn currentAppleEvent(&self) -> Option> { + msg_send_id![self, currentAppleEvent] + } + pub unsafe fn currentReplyAppleEvent(&self) -> Option> { + msg_send_id![self, currentReplyAppleEvent] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs new file mode 100644 index 000000000..08195ecb4 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -0,0 +1,41 @@ +extern_class!( + #[derive(Debug)] + struct NSAppleScript; + unsafe impl ClassType for NSAppleScript { + type Super = NSObject; + } +); +impl NSAppleScript { + pub unsafe fn initWithContentsOfURL_error( + &self, + url: &NSURL, + errorInfo: *mut TodoGenerics, + ) -> Option> { + msg_send_id![self, initWithContentsOfURL: url, error: errorInfo] + } + pub unsafe fn initWithSource(&self, source: &NSString) -> Option> { + msg_send_id![self, initWithSource: source] + } + pub unsafe fn compileAndReturnError(&self, errorInfo: *mut TodoGenerics) -> bool { + msg_send![self, compileAndReturnError: errorInfo] + } + pub unsafe fn executeAndReturnError( + &self, + errorInfo: *mut TodoGenerics, + ) -> Id { + msg_send_id![self, executeAndReturnError: errorInfo] + } + pub unsafe fn executeAppleEvent_error( + &self, + event: &NSAppleEventDescriptor, + errorInfo: *mut TodoGenerics, + ) -> Id { + msg_send_id![self, executeAppleEvent: event, error: errorInfo] + } + pub unsafe fn source(&self) -> Option> { + msg_send_id![self, source] + } + pub unsafe fn isCompiled(&self) -> bool { + msg_send![self, isCompiled] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs new file mode 100644 index 000000000..e296c932d --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -0,0 +1,120 @@ +extern_class!( + #[derive(Debug)] + struct NSArchiver; + unsafe impl ClassType for NSArchiver { + type Super = NSCoder; + } +); +impl NSArchiver { + pub unsafe fn initForWritingWithMutableData(&self, mdata: &NSMutableData) -> Id { + msg_send_id![self, initForWritingWithMutableData: mdata] + } + pub unsafe fn encodeRootObject(&self, rootObject: &Object) { + msg_send![self, encodeRootObject: rootObject] + } + pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>) { + msg_send![self, encodeConditionalObject: object] + } + pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id { + msg_send_id![Self::class(), archivedDataWithRootObject: rootObject] + } + pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool { + msg_send![Self::class(), archiveRootObject: rootObject, toFile: path] + } + pub unsafe fn encodeClassName_intoClassName( + &self, + trueName: &NSString, + inArchiveName: &NSString, + ) { + msg_send![ + self, + encodeClassName: trueName, + intoClassName: inArchiveName + ] + } + pub unsafe fn classNameEncodedForTrueClassName( + &self, + trueName: &NSString, + ) -> Option> { + msg_send_id![self, classNameEncodedForTrueClassName: trueName] + } + pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object) { + msg_send![self, replaceObject: object, withObject: newObject] + } + pub unsafe fn archiverData(&self) -> Id { + msg_send_id![self, archiverData] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnarchiver; + unsafe impl ClassType for NSUnarchiver { + type Super = NSCoder; + } +); +impl NSUnarchiver { + pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Option> { + msg_send_id![self, initForReadingWithData: data] + } + pub unsafe fn setObjectZone(&self, zone: *mut NSZone) { + msg_send![self, setObjectZone: zone] + } + pub unsafe fn objectZone(&self) -> *mut NSZone { + msg_send![self, objectZone] + } + pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option> { + msg_send_id![Self::class(), unarchiveObjectWithData: data] + } + pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option> { + msg_send_id![Self::class(), unarchiveObjectWithFile: path] + } + pub unsafe fn decodeClassName_asClassName(inArchiveName: &NSString, trueName: &NSString) { + msg_send![ + Self::class(), + decodeClassName: inArchiveName, + asClassName: trueName + ] + } + pub unsafe fn decodeClassName_asClassName( + &self, + inArchiveName: &NSString, + trueName: &NSString, + ) { + msg_send![self, decodeClassName: inArchiveName, asClassName: trueName] + } + pub unsafe fn classNameDecodedForArchiveClassName( + inArchiveName: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + classNameDecodedForArchiveClassName: inArchiveName + ] + } + pub unsafe fn classNameDecodedForArchiveClassName( + &self, + inArchiveName: &NSString, + ) -> Id { + msg_send_id![self, classNameDecodedForArchiveClassName: inArchiveName] + } + pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object) { + msg_send![self, replaceObject: object, withObject: newObject] + } + pub unsafe fn isAtEnd(&self) -> bool { + msg_send![self, isAtEnd] + } + pub unsafe fn systemVersion(&self) -> c_uint { + msg_send![self, systemVersion] + } +} +#[doc = "NSArchiverCallback"] +impl NSObject { + pub unsafe fn replacementObjectForArchiver( + &self, + archiver: &NSArchiver, + ) -> Option> { + msg_send_id![self, replacementObjectForArchiver: archiver] + } + pub unsafe fn classForArchiver(&self) -> Option<&Class> { + msg_send![self, classForArchiver] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs new file mode 100644 index 000000000..5c582c6a6 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -0,0 +1,494 @@ +extern_class!( + #[derive(Debug)] + struct NSArray; + unsafe impl ClassType for NSArray { + type Super = NSObject; + } +); +impl NSArray { + pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> ObjectType { + msg_send![self, objectAtIndex: index] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithObjects_count( + &self, + objects: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![self, initWithObjects: objects, count: cnt] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } +} +#[doc = "NSExtendedArray"] +impl NSArray { + pub unsafe fn arrayByAddingObject(&self, anObject: ObjectType) -> TodoGenerics { + msg_send![self, arrayByAddingObject: anObject] + } + pub unsafe fn arrayByAddingObjectsFromArray(&self, otherArray: TodoGenerics) -> TodoGenerics { + msg_send![self, arrayByAddingObjectsFromArray: otherArray] + } + pub unsafe fn componentsJoinedByString(&self, separator: &NSString) -> Id { + msg_send_id![self, componentsJoinedByString: separator] + } + pub unsafe fn containsObject(&self, anObject: ObjectType) -> bool { + msg_send![self, containsObject: anObject] + } + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn descriptionWithLocale_indent( + &self, + locale: Option<&Object>, + level: NSUInteger, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale, indent: level] + } + pub unsafe fn firstObjectCommonWithArray(&self, otherArray: TodoGenerics) -> ObjectType { + msg_send![self, firstObjectCommonWithArray: otherArray] + } + pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { + msg_send![self, getObjects: objects, range: range] + } + pub unsafe fn indexOfObject(&self, anObject: ObjectType) -> NSUInteger { + msg_send![self, indexOfObject: anObject] + } + pub unsafe fn indexOfObject_inRange(&self, anObject: ObjectType, range: NSRange) -> NSUInteger { + msg_send![self, indexOfObject: anObject, inRange: range] + } + pub unsafe fn indexOfObjectIdenticalTo(&self, anObject: ObjectType) -> NSUInteger { + msg_send![self, indexOfObjectIdenticalTo: anObject] + } + pub unsafe fn indexOfObjectIdenticalTo_inRange( + &self, + anObject: ObjectType, + range: NSRange, + ) -> NSUInteger { + msg_send![self, indexOfObjectIdenticalTo: anObject, inRange: range] + } + pub unsafe fn isEqualToArray(&self, otherArray: TodoGenerics) -> bool { + msg_send![self, isEqualToArray: otherArray] + } + pub unsafe fn objectEnumerator(&self) -> TodoGenerics { + msg_send![self, objectEnumerator] + } + pub unsafe fn reverseObjectEnumerator(&self) -> TodoGenerics { + msg_send![self, reverseObjectEnumerator] + } + pub unsafe fn sortedArrayUsingFunction_context( + &self, + comparator: NonNull, + context: *mut c_void, + ) -> TodoGenerics { + msg_send![self, sortedArrayUsingFunction: comparator, context: context] + } + pub unsafe fn sortedArrayUsingFunction_context_hint( + &self, + comparator: NonNull, + context: *mut c_void, + hint: Option<&NSData>, + ) -> TodoGenerics { + msg_send![ + self, + sortedArrayUsingFunction: comparator, + context: context, + hint: hint + ] + } + pub unsafe fn sortedArrayUsingSelector(&self, comparator: Sel) -> TodoGenerics { + msg_send![self, sortedArrayUsingSelector: comparator] + } + pub unsafe fn subarrayWithRange(&self, range: NSRange) -> TodoGenerics { + msg_send![self, subarrayWithRange: range] + } + pub unsafe fn writeToURL_error(&self, url: &NSURL, error: *mut Option<&NSError>) -> bool { + msg_send![self, writeToURL: url, error: error] + } + pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { + msg_send![self, makeObjectsPerformSelector: aSelector] + } + pub unsafe fn makeObjectsPerformSelector_withObject( + &self, + aSelector: Sel, + argument: Option<&Object>, + ) { + msg_send![ + self, + makeObjectsPerformSelector: aSelector, + withObject: argument + ] + } + pub unsafe fn objectsAtIndexes(&self, indexes: &NSIndexSet) -> TodoGenerics { + msg_send![self, objectsAtIndexes: indexes] + } + pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> ObjectType { + msg_send![self, objectAtIndexedSubscript: idx] + } + pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateObjectsUsingBlock: block] + } + pub unsafe fn enumerateObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] + } + pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateObjectsAtIndexes: s, + options: opts, + usingBlock: block + ] + } + pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger { + msg_send![self, indexOfObjectPassingTest: predicate] + } + pub unsafe fn indexOfObjectWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![self, indexOfObjectWithOptions: opts, passingTest: predicate] + } + pub unsafe fn indexOfObjectAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![ + self, + indexOfObjectAtIndexes: s, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn indexesOfObjectsPassingTest( + &self, + predicate: TodoBlock, + ) -> Id { + msg_send_id![self, indexesOfObjectsPassingTest: predicate] + } + pub unsafe fn indexesOfObjectsWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![ + self, + indexesOfObjectsWithOptions: opts, + passingTest: predicate + ] + } + pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![ + self, + indexesOfObjectsAtIndexes: s, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn sortedArrayUsingComparator(&self, cmptr: NSComparator) -> TodoGenerics { + msg_send![self, sortedArrayUsingComparator: cmptr] + } + pub unsafe fn sortedArrayWithOptions_usingComparator( + &self, + opts: NSSortOptions, + cmptr: NSComparator, + ) -> TodoGenerics { + msg_send![self, sortedArrayWithOptions: opts, usingComparator: cmptr] + } + pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( + &self, + obj: ObjectType, + r: NSRange, + opts: NSBinarySearchingOptions, + cmp: NSComparator, + ) -> NSUInteger { + msg_send![ + self, + indexOfObject: obj, + inSortedRange: r, + options: opts, + usingComparator: cmp + ] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn firstObject(&self) -> ObjectType { + msg_send![self, firstObject] + } + pub unsafe fn lastObject(&self) -> ObjectType { + msg_send![self, lastObject] + } + pub unsafe fn sortedArrayHint(&self) -> Id { + msg_send_id![self, sortedArrayHint] + } +} +#[doc = "NSArrayCreation"] +impl NSArray { + pub unsafe fn array() -> Id { + msg_send_id![Self::class(), array] + } + pub unsafe fn arrayWithObject(anObject: ObjectType) -> Id { + msg_send_id![Self::class(), arrayWithObject: anObject] + } + pub unsafe fn arrayWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id { + msg_send_id![Self::class(), arrayWithObjects: objects, count: cnt] + } + pub unsafe fn arrayWithArray(array: TodoGenerics) -> Id { + msg_send_id![Self::class(), arrayWithArray: array] + } + pub unsafe fn initWithArray(&self, array: TodoGenerics) -> Id { + msg_send_id![self, initWithArray: array] + } + pub unsafe fn initWithArray_copyItems( + &self, + array: TodoGenerics, + flag: bool, + ) -> Id { + msg_send_id![self, initWithArray: array, copyItems: flag] + } + pub unsafe fn initWithContentsOfURL_error( + &self, + url: &NSURL, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![self, initWithContentsOfURL: url, error: error] + } + pub unsafe fn arrayWithContentsOfURL_error( + url: &NSURL, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![Self::class(), arrayWithContentsOfURL: url, error: error] + } +} +#[doc = "NSArrayDiffing"] +impl NSArray { + pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( + &self, + other: TodoGenerics, + options: NSOrderedCollectionDifferenceCalculationOptions, + block: TodoBlock, + ) -> TodoGenerics { + msg_send![ + self, + differenceFromArray: other, + withOptions: options, + usingEquivalenceTest: block + ] + } + pub unsafe fn differenceFromArray_withOptions( + &self, + other: TodoGenerics, + options: NSOrderedCollectionDifferenceCalculationOptions, + ) -> TodoGenerics { + msg_send![self, differenceFromArray: other, withOptions: options] + } + pub unsafe fn differenceFromArray(&self, other: TodoGenerics) -> TodoGenerics { + msg_send![self, differenceFromArray: other] + } + pub unsafe fn arrayByApplyingDifference(&self, difference: TodoGenerics) -> TodoGenerics { + msg_send![self, arrayByApplyingDifference: difference] + } +} +#[doc = "NSDeprecated"] +impl NSArray { + pub unsafe fn getObjects(&self, objects: TodoArray) { + msg_send![self, getObjects: objects] + } + pub unsafe fn arrayWithContentsOfFile(path: &NSString) -> TodoGenerics { + msg_send![Self::class(), arrayWithContentsOfFile: path] + } + pub unsafe fn arrayWithContentsOfURL(url: &NSURL) -> TodoGenerics { + msg_send![Self::class(), arrayWithContentsOfURL: url] + } + pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> TodoGenerics { + msg_send![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> TodoGenerics { + msg_send![self, initWithContentsOfURL: url] + } + pub unsafe fn writeToFile_atomically(&self, path: &NSString, useAuxiliaryFile: bool) -> bool { + msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] + } + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { + msg_send![self, writeToURL: url, atomically: atomically] + } +} +extern_class!( + #[derive(Debug)] + struct NSMutableArray; + unsafe impl ClassType for NSMutableArray { + type Super = NSArray; + } +); +impl NSMutableArray { + pub unsafe fn addObject(&self, anObject: ObjectType) { + msg_send![self, addObject: anObject] + } + pub unsafe fn insertObject_atIndex(&self, anObject: ObjectType, index: NSUInteger) { + msg_send![self, insertObject: anObject, atIndex: index] + } + pub unsafe fn removeLastObject(&self) { + msg_send![self, removeLastObject] + } + pub unsafe fn removeObjectAtIndex(&self, index: NSUInteger) { + msg_send![self, removeObjectAtIndex: index] + } + pub unsafe fn replaceObjectAtIndex_withObject(&self, index: NSUInteger, anObject: ObjectType) { + msg_send![self, replaceObjectAtIndex: index, withObject: anObject] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: numItems] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } +} +#[doc = "NSExtendedMutableArray"] +impl NSMutableArray { + pub unsafe fn addObjectsFromArray(&self, otherArray: TodoGenerics) { + msg_send![self, addObjectsFromArray: otherArray] + } + pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( + &self, + idx1: NSUInteger, + idx2: NSUInteger, + ) { + msg_send![self, exchangeObjectAtIndex: idx1, withObjectAtIndex: idx2] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn removeObject_inRange(&self, anObject: ObjectType, range: NSRange) { + msg_send![self, removeObject: anObject, inRange: range] + } + pub unsafe fn removeObject(&self, anObject: ObjectType) { + msg_send![self, removeObject: anObject] + } + pub unsafe fn removeObjectIdenticalTo_inRange(&self, anObject: ObjectType, range: NSRange) { + msg_send![self, removeObjectIdenticalTo: anObject, inRange: range] + } + pub unsafe fn removeObjectIdenticalTo(&self, anObject: ObjectType) { + msg_send![self, removeObjectIdenticalTo: anObject] + } + pub unsafe fn removeObjectsFromIndices_numIndices( + &self, + indices: NonNull, + cnt: NSUInteger, + ) { + msg_send![self, removeObjectsFromIndices: indices, numIndices: cnt] + } + pub unsafe fn removeObjectsInArray(&self, otherArray: TodoGenerics) { + msg_send![self, removeObjectsInArray: otherArray] + } + pub unsafe fn removeObjectsInRange(&self, range: NSRange) { + msg_send![self, removeObjectsInRange: range] + } + pub unsafe fn replaceObjectsInRange_withObjectsFromArray_range( + &self, + range: NSRange, + otherArray: TodoGenerics, + otherRange: NSRange, + ) { + msg_send![ + self, + replaceObjectsInRange: range, + withObjectsFromArray: otherArray, + range: otherRange + ] + } + pub unsafe fn replaceObjectsInRange_withObjectsFromArray( + &self, + range: NSRange, + otherArray: TodoGenerics, + ) { + msg_send![ + self, + replaceObjectsInRange: range, + withObjectsFromArray: otherArray + ] + } + pub unsafe fn setArray(&self, otherArray: TodoGenerics) { + msg_send![self, setArray: otherArray] + } + pub unsafe fn sortUsingFunction_context( + &self, + compare: NonNull, + context: *mut c_void, + ) { + msg_send![self, sortUsingFunction: compare, context: context] + } + pub unsafe fn sortUsingSelector(&self, comparator: Sel) { + msg_send![self, sortUsingSelector: comparator] + } + pub unsafe fn insertObjects_atIndexes(&self, objects: TodoGenerics, indexes: &NSIndexSet) { + msg_send![self, insertObjects: objects, atIndexes: indexes] + } + pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet) { + msg_send![self, removeObjectsAtIndexes: indexes] + } + pub unsafe fn replaceObjectsAtIndexes_withObjects( + &self, + indexes: &NSIndexSet, + objects: TodoGenerics, + ) { + msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] + } + pub unsafe fn setObject_atIndexedSubscript(&self, obj: ObjectType, idx: NSUInteger) { + msg_send![self, setObject: obj, atIndexedSubscript: idx] + } + pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator) { + msg_send![self, sortUsingComparator: cmptr] + } + pub unsafe fn sortWithOptions_usingComparator(&self, opts: NSSortOptions, cmptr: NSComparator) { + msg_send![self, sortWithOptions: opts, usingComparator: cmptr] + } +} +#[doc = "NSMutableArrayCreation"] +impl NSMutableArray { + pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id { + msg_send_id![Self::class(), arrayWithCapacity: numItems] + } + pub unsafe fn arrayWithContentsOfFile(path: &NSString) -> TodoGenerics { + msg_send![Self::class(), arrayWithContentsOfFile: path] + } + pub unsafe fn arrayWithContentsOfURL(url: &NSURL) -> TodoGenerics { + msg_send![Self::class(), arrayWithContentsOfURL: url] + } + pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> TodoGenerics { + msg_send![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> TodoGenerics { + msg_send![self, initWithContentsOfURL: url] + } +} +#[doc = "NSMutableArrayDiffing"] +impl NSMutableArray { + pub unsafe fn applyDifference(&self, difference: TodoGenerics) { + msg_send![self, applyDifference: difference] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs new file mode 100644 index 000000000..ca8cdc05f --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -0,0 +1,485 @@ +extern_class!( + #[derive(Debug)] + struct NSAttributedString; + unsafe impl ClassType for NSAttributedString { + type Super = NSObject; + } +); +impl NSAttributedString { + pub unsafe fn attributesAtIndex_effectiveRange( + &self, + location: NSUInteger, + range: NSRangePointer, + ) -> TodoGenerics { + msg_send![self, attributesAtIndex: location, effectiveRange: range] + } + pub unsafe fn string(&self) -> Id { + msg_send_id![self, string] + } +} +#[doc = "NSExtendedAttributedString"] +impl NSAttributedString { + pub unsafe fn attribute_atIndex_effectiveRange( + &self, + attrName: NSAttributedStringKey, + location: NSUInteger, + range: NSRangePointer, + ) -> Option> { + msg_send_id![ + self, + attribute: attrName, + atIndex: location, + effectiveRange: range + ] + } + pub unsafe fn attributedSubstringFromRange( + &self, + range: NSRange, + ) -> Id { + msg_send_id![self, attributedSubstringFromRange: range] + } + pub unsafe fn attributesAtIndex_longestEffectiveRange_inRange( + &self, + location: NSUInteger, + range: NSRangePointer, + rangeLimit: NSRange, + ) -> TodoGenerics { + msg_send![ + self, + attributesAtIndex: location, + longestEffectiveRange: range, + inRange: rangeLimit + ] + } + pub unsafe fn attribute_atIndex_longestEffectiveRange_inRange( + &self, + attrName: NSAttributedStringKey, + location: NSUInteger, + range: NSRangePointer, + rangeLimit: NSRange, + ) -> Option> { + msg_send_id![ + self, + attribute: attrName, + atIndex: location, + longestEffectiveRange: range, + inRange: rangeLimit + ] + } + pub unsafe fn isEqualToAttributedString(&self, other: &NSAttributedString) -> bool { + msg_send![self, isEqualToAttributedString: other] + } + pub unsafe fn initWithString(&self, str: &NSString) -> Id { + msg_send_id![self, initWithString: str] + } + pub unsafe fn initWithString_attributes( + &self, + str: &NSString, + attrs: TodoGenerics, + ) -> Id { + msg_send_id![self, initWithString: str, attributes: attrs] + } + pub unsafe fn initWithAttributedString( + &self, + attrStr: &NSAttributedString, + ) -> Id { + msg_send_id![self, initWithAttributedString: attrStr] + } + pub unsafe fn enumerateAttributesInRange_options_usingBlock( + &self, + enumerationRange: NSRange, + opts: NSAttributedStringEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateAttributesInRange: enumerationRange, + options: opts, + usingBlock: block + ] + } + pub unsafe fn enumerateAttribute_inRange_options_usingBlock( + &self, + attrName: NSAttributedStringKey, + enumerationRange: NSRange, + opts: NSAttributedStringEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateAttribute: attrName, + inRange: enumerationRange, + options: opts, + usingBlock: block + ] + } + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } +} +extern_class!( + #[derive(Debug)] + struct NSMutableAttributedString; + unsafe impl ClassType for NSMutableAttributedString { + type Super = NSAttributedString; + } +); +impl NSMutableAttributedString { + pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, str: &NSString) { + msg_send![self, replaceCharactersInRange: range, withString: str] + } + pub unsafe fn setAttributes_range(&self, attrs: TodoGenerics, range: NSRange) { + msg_send![self, setAttributes: attrs, range: range] + } +} +#[doc = "NSExtendedMutableAttributedString"] +impl NSMutableAttributedString { + pub unsafe fn addAttribute_value_range( + &self, + name: NSAttributedStringKey, + value: &Object, + range: NSRange, + ) { + msg_send![self, addAttribute: name, value: value, range: range] + } + pub unsafe fn addAttributes_range(&self, attrs: TodoGenerics, range: NSRange) { + msg_send![self, addAttributes: attrs, range: range] + } + pub unsafe fn removeAttribute_range(&self, name: NSAttributedStringKey, range: NSRange) { + msg_send![self, removeAttribute: name, range: range] + } + pub unsafe fn replaceCharactersInRange_withAttributedString( + &self, + range: NSRange, + attrString: &NSAttributedString, + ) { + msg_send![ + self, + replaceCharactersInRange: range, + withAttributedString: attrString + ] + } + pub unsafe fn insertAttributedString_atIndex( + &self, + attrString: &NSAttributedString, + loc: NSUInteger, + ) { + msg_send![self, insertAttributedString: attrString, atIndex: loc] + } + pub unsafe fn appendAttributedString(&self, attrString: &NSAttributedString) { + msg_send![self, appendAttributedString: attrString] + } + pub unsafe fn deleteCharactersInRange(&self, range: NSRange) { + msg_send![self, deleteCharactersInRange: range] + } + pub unsafe fn setAttributedString(&self, attrString: &NSAttributedString) { + msg_send![self, setAttributedString: attrString] + } + pub unsafe fn beginEditing(&self) { + msg_send![self, beginEditing] + } + pub unsafe fn endEditing(&self) { + msg_send![self, endEditing] + } + pub unsafe fn mutableString(&self) -> Id { + msg_send_id![self, mutableString] + } +} +extern_class!( + #[derive(Debug)] + struct NSAttributedStringMarkdownParsingOptions; + unsafe impl ClassType for NSAttributedStringMarkdownParsingOptions { + type Super = NSObject; + } +); +impl NSAttributedStringMarkdownParsingOptions { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn allowsExtendedAttributes(&self) -> bool { + msg_send![self, allowsExtendedAttributes] + } + pub unsafe fn setAllowsExtendedAttributes(&self, allowsExtendedAttributes: bool) { + msg_send![self, setAllowsExtendedAttributes: allowsExtendedAttributes] + } + pub unsafe fn interpretedSyntax(&self) -> NSAttributedStringMarkdownInterpretedSyntax { + msg_send![self, interpretedSyntax] + } + pub unsafe fn setInterpretedSyntax( + &self, + interpretedSyntax: NSAttributedStringMarkdownInterpretedSyntax, + ) { + msg_send![self, setInterpretedSyntax: interpretedSyntax] + } + pub unsafe fn failurePolicy(&self) -> NSAttributedStringMarkdownParsingFailurePolicy { + msg_send![self, failurePolicy] + } + pub unsafe fn setFailurePolicy( + &self, + failurePolicy: NSAttributedStringMarkdownParsingFailurePolicy, + ) { + msg_send![self, setFailurePolicy: failurePolicy] + } + pub unsafe fn languageCode(&self) -> Option> { + msg_send_id![self, languageCode] + } + pub unsafe fn setLanguageCode(&self, languageCode: Option<&NSString>) { + msg_send![self, setLanguageCode: languageCode] + } +} +#[doc = "NSAttributedStringCreateFromMarkdown"] +impl NSAttributedString { + pub unsafe fn initWithContentsOfMarkdownFileAtURL_options_baseURL_error( + &self, + markdownFile: &NSURL, + options: Option<&NSAttributedStringMarkdownParsingOptions>, + baseURL: Option<&NSURL>, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithContentsOfMarkdownFileAtURL: markdownFile, + options: options, + baseURL: baseURL, + error: error + ] + } + pub unsafe fn initWithMarkdown_options_baseURL_error( + &self, + markdown: &NSData, + options: Option<&NSAttributedStringMarkdownParsingOptions>, + baseURL: Option<&NSURL>, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithMarkdown: markdown, + options: options, + baseURL: baseURL, + error: error + ] + } + pub unsafe fn initWithMarkdownString_options_baseURL_error( + &self, + markdownString: &NSString, + options: Option<&NSAttributedStringMarkdownParsingOptions>, + baseURL: Option<&NSURL>, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithMarkdownString: markdownString, + options: options, + baseURL: baseURL, + error: error + ] + } +} +#[doc = "NSAttributedStringFormatting"] +impl NSAttributedString { + pub unsafe fn initWithFormat_options_locale_arguments( + &self, + format: &NSAttributedString, + options: NSAttributedStringFormattingOptions, + locale: Option<&NSLocale>, + arguments: va_list, + ) -> Id { + msg_send_id![ + self, + initWithFormat: format, + options: options, + locale: locale, + arguments: arguments + ] + } +} +#[doc = "NSMutableAttributedStringFormatting"] +impl NSMutableAttributedString {} +#[doc = "NSMorphology"] +impl NSAttributedString { + pub unsafe fn attributedStringByInflectingString(&self) -> Id { + msg_send_id![self, attributedStringByInflectingString] + } +} +extern_class!( + #[derive(Debug)] + struct NSPresentationIntent; + unsafe impl ClassType for NSPresentationIntent { + type Super = NSObject; + } +); +impl NSPresentationIntent { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn paragraphIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + paragraphIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn headerIntentWithIdentity_level_nestedInsideIntent( + identity: NSInteger, + level: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + headerIntentWithIdentity: identity, + level: level, + nestedInsideIntent: parent + ] + } + pub unsafe fn codeBlockIntentWithIdentity_languageHint_nestedInsideIntent( + identity: NSInteger, + languageHint: Option<&NSString>, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + codeBlockIntentWithIdentity: identity, + languageHint: languageHint, + nestedInsideIntent: parent + ] + } + pub unsafe fn thematicBreakIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + thematicBreakIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn orderedListIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + orderedListIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn unorderedListIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + unorderedListIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn listItemIntentWithIdentity_ordinal_nestedInsideIntent( + identity: NSInteger, + ordinal: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + listItemIntentWithIdentity: identity, + ordinal: ordinal, + nestedInsideIntent: parent + ] + } + pub unsafe fn blockQuoteIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + blockQuoteIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn tableIntentWithIdentity_columnCount_alignments_nestedInsideIntent( + identity: NSInteger, + columnCount: NSInteger, + alignments: TodoGenerics, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + tableIntentWithIdentity: identity, + columnCount: columnCount, + alignments: alignments, + nestedInsideIntent: parent + ] + } + pub unsafe fn tableHeaderRowIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + tableHeaderRowIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn tableRowIntentWithIdentity_row_nestedInsideIntent( + identity: NSInteger, + row: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + tableRowIntentWithIdentity: identity, + row: row, + nestedInsideIntent: parent + ] + } + pub unsafe fn tableCellIntentWithIdentity_column_nestedInsideIntent( + identity: NSInteger, + column: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + tableCellIntentWithIdentity: identity, + column: column, + nestedInsideIntent: parent + ] + } + pub unsafe fn isEquivalentToPresentationIntent(&self, other: &NSPresentationIntent) -> bool { + msg_send![self, isEquivalentToPresentationIntent: other] + } + pub unsafe fn intentKind(&self) -> NSPresentationIntentKind { + msg_send![self, intentKind] + } + pub unsafe fn parentIntent(&self) -> Option> { + msg_send_id![self, parentIntent] + } + pub unsafe fn identity(&self) -> NSInteger { + msg_send![self, identity] + } + pub unsafe fn ordinal(&self) -> NSInteger { + msg_send![self, ordinal] + } + pub unsafe fn columnAlignments(&self) -> TodoGenerics { + msg_send![self, columnAlignments] + } + pub unsafe fn columnCount(&self) -> NSInteger { + msg_send![self, columnCount] + } + pub unsafe fn headerLevel(&self) -> NSInteger { + msg_send![self, headerLevel] + } + pub unsafe fn languageHint(&self) -> Option> { + msg_send_id![self, languageHint] + } + pub unsafe fn column(&self) -> NSInteger { + msg_send![self, column] + } + pub unsafe fn row(&self) -> NSInteger { + msg_send![self, row] + } + pub unsafe fn indentationLevel(&self) -> NSInteger { + msg_send![self, indentationLevel] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs new file mode 100644 index 000000000..5afe27200 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -0,0 +1,18 @@ +extern_class!( + #[derive(Debug)] + struct NSAutoreleasePool; + unsafe impl ClassType for NSAutoreleasePool { + type Super = NSObject; + } +); +impl NSAutoreleasePool { + pub unsafe fn addObject(anObject: &Object) { + msg_send![Self::class(), addObject: anObject] + } + pub unsafe fn addObject(&self, anObject: &Object) { + msg_send![self, addObject: anObject] + } + pub unsafe fn drain(&self) { + msg_send![self, drain] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs new file mode 100644 index 000000000..a8836be5e --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -0,0 +1,48 @@ +extern_class!( + #[derive(Debug)] + struct NSBackgroundActivityScheduler; + unsafe impl ClassType for NSBackgroundActivityScheduler { + type Super = NSObject; + } +); +impl NSBackgroundActivityScheduler { + pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id { + msg_send_id![self, initWithIdentifier: identifier] + } + pub unsafe fn scheduleWithBlock(&self, block: TodoBlock) { + msg_send![self, scheduleWithBlock: block] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn identifier(&self) -> Id { + msg_send_id![self, identifier] + } + pub unsafe fn qualityOfService(&self) -> NSQualityOfService { + msg_send![self, qualityOfService] + } + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { + msg_send![self, setQualityOfService: qualityOfService] + } + pub unsafe fn repeats(&self) -> bool { + msg_send![self, repeats] + } + pub unsafe fn setRepeats(&self, repeats: bool) { + msg_send![self, setRepeats: repeats] + } + pub unsafe fn interval(&self) -> NSTimeInterval { + msg_send![self, interval] + } + pub unsafe fn setInterval(&self, interval: NSTimeInterval) { + msg_send![self, setInterval: interval] + } + pub unsafe fn tolerance(&self) -> NSTimeInterval { + msg_send![self, tolerance] + } + pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval) { + msg_send![self, setTolerance: tolerance] + } + pub unsafe fn shouldDefer(&self) -> bool { + msg_send![self, shouldDefer] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs new file mode 100644 index 000000000..4fd948e81 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -0,0 +1,417 @@ +extern_class!( + #[derive(Debug)] + struct NSBundle; + unsafe impl ClassType for NSBundle { + type Super = NSObject; + } +); +impl NSBundle { + pub unsafe fn bundleWithPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), bundleWithPath: path] + } + pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithPath: path] + } + pub unsafe fn bundleWithURL(url: &NSURL) -> Option> { + msg_send_id![Self::class(), bundleWithURL: url] + } + pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithURL: url] + } + pub unsafe fn bundleForClass(aClass: &Class) -> Id { + msg_send_id![Self::class(), bundleForClass: aClass] + } + pub unsafe fn bundleWithIdentifier(identifier: &NSString) -> Option> { + msg_send_id![Self::class(), bundleWithIdentifier: identifier] + } + pub unsafe fn load(&self) -> bool { + msg_send![self, load] + } + pub unsafe fn unload(&self) -> bool { + msg_send![self, unload] + } + pub unsafe fn preflightAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + msg_send![self, preflightAndReturnError: error] + } + pub unsafe fn loadAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + msg_send![self, loadAndReturnError: error] + } + pub unsafe fn URLForAuxiliaryExecutable( + &self, + executableName: &NSString, + ) -> Option> { + msg_send_id![self, URLForAuxiliaryExecutable: executableName] + } + pub unsafe fn pathForAuxiliaryExecutable( + &self, + executableName: &NSString, + ) -> Option> { + msg_send_id![self, pathForAuxiliaryExecutable: executableName] + } + pub unsafe fn URLForResource_withExtension_subdirectory_inBundleWithURL( + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + bundleURL: &NSURL, + ) -> Option> { + msg_send_id![ + Self::class(), + URLForResource: name, + withExtension: ext, + subdirectory: subpath, + inBundleWithURL: bundleURL + ] + } + pub unsafe fn URLsForResourcesWithExtension_subdirectory_inBundleWithURL( + ext: Option<&NSString>, + subpath: Option<&NSString>, + bundleURL: &NSURL, + ) -> TodoGenerics { + msg_send![ + Self::class(), + URLsForResourcesWithExtension: ext, + subdirectory: subpath, + inBundleWithURL: bundleURL + ] + } + pub unsafe fn URLForResource_withExtension( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + ) -> Option> { + msg_send_id![self, URLForResource: name, withExtension: ext] + } + pub unsafe fn URLForResource_withExtension_subdirectory( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + ) -> Option> { + msg_send_id![ + self, + URLForResource: name, + withExtension: ext, + subdirectory: subpath + ] + } + pub unsafe fn URLForResource_withExtension_subdirectory_localization( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + localizationName: Option<&NSString>, + ) -> Option> { + msg_send_id![ + self, + URLForResource: name, + withExtension: ext, + subdirectory: subpath, + localization: localizationName + ] + } + pub unsafe fn URLsForResourcesWithExtension_subdirectory( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + ) -> TodoGenerics { + msg_send![ + self, + URLsForResourcesWithExtension: ext, + subdirectory: subpath + ] + } + pub unsafe fn URLsForResourcesWithExtension_subdirectory_localization( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + localizationName: Option<&NSString>, + ) -> TodoGenerics { + msg_send![ + self, + URLsForResourcesWithExtension: ext, + subdirectory: subpath, + localization: localizationName + ] + } + pub unsafe fn pathForResource_ofType_inDirectory( + name: Option<&NSString>, + ext: Option<&NSString>, + bundlePath: &NSString, + ) -> Option> { + msg_send_id![ + Self::class(), + pathForResource: name, + ofType: ext, + inDirectory: bundlePath + ] + } + pub unsafe fn pathsForResourcesOfType_inDirectory( + ext: Option<&NSString>, + bundlePath: &NSString, + ) -> TodoGenerics { + msg_send![ + Self::class(), + pathsForResourcesOfType: ext, + inDirectory: bundlePath + ] + } + pub unsafe fn pathForResource_ofType( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + ) -> Option> { + msg_send_id![self, pathForResource: name, ofType: ext] + } + pub unsafe fn pathForResource_ofType_inDirectory( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + ) -> Option> { + msg_send_id![ + self, + pathForResource: name, + ofType: ext, + inDirectory: subpath + ] + } + pub unsafe fn pathForResource_ofType_inDirectory_forLocalization( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + localizationName: Option<&NSString>, + ) -> Option> { + msg_send_id![ + self, + pathForResource: name, + ofType: ext, + inDirectory: subpath, + forLocalization: localizationName + ] + } + pub unsafe fn pathsForResourcesOfType_inDirectory( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + ) -> TodoGenerics { + msg_send![self, pathsForResourcesOfType: ext, inDirectory: subpath] + } + pub unsafe fn pathsForResourcesOfType_inDirectory_forLocalization( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + localizationName: Option<&NSString>, + ) -> TodoGenerics { + msg_send![ + self, + pathsForResourcesOfType: ext, + inDirectory: subpath, + forLocalization: localizationName + ] + } + pub unsafe fn localizedStringForKey_value_table( + &self, + key: &NSString, + value: Option<&NSString>, + tableName: Option<&NSString>, + ) -> Id { + msg_send_id![ + self, + localizedStringForKey: key, + value: value, + table: tableName + ] + } + pub unsafe fn localizedAttributedStringForKey_value_table( + &self, + key: &NSString, + value: Option<&NSString>, + tableName: Option<&NSString>, + ) -> Id { + msg_send_id![ + self, + localizedAttributedStringForKey: key, + value: value, + table: tableName + ] + } + pub unsafe fn objectForInfoDictionaryKey(&self, key: &NSString) -> Option> { + msg_send_id![self, objectForInfoDictionaryKey: key] + } + pub unsafe fn classNamed(&self, className: &NSString) -> Option<&Class> { + msg_send![self, classNamed: className] + } + pub unsafe fn preferredLocalizationsFromArray( + localizationsArray: TodoGenerics, + ) -> TodoGenerics { + msg_send![ + Self::class(), + preferredLocalizationsFromArray: localizationsArray + ] + } + pub unsafe fn preferredLocalizationsFromArray_forPreferences( + localizationsArray: TodoGenerics, + preferencesArray: TodoGenerics, + ) -> TodoGenerics { + msg_send![ + Self::class(), + preferredLocalizationsFromArray: localizationsArray, + forPreferences: preferencesArray + ] + } + pub unsafe fn mainBundle() -> Id { + msg_send_id![Self::class(), mainBundle] + } + pub unsafe fn allBundles() -> TodoGenerics { + msg_send![Self::class(), allBundles] + } + pub unsafe fn allFrameworks() -> TodoGenerics { + msg_send![Self::class(), allFrameworks] + } + pub unsafe fn isLoaded(&self) -> bool { + msg_send![self, isLoaded] + } + pub unsafe fn bundleURL(&self) -> Id { + msg_send_id![self, bundleURL] + } + pub unsafe fn resourceURL(&self) -> Option> { + msg_send_id![self, resourceURL] + } + pub unsafe fn executableURL(&self) -> Option> { + msg_send_id![self, executableURL] + } + pub unsafe fn privateFrameworksURL(&self) -> Option> { + msg_send_id![self, privateFrameworksURL] + } + pub unsafe fn sharedFrameworksURL(&self) -> Option> { + msg_send_id![self, sharedFrameworksURL] + } + pub unsafe fn sharedSupportURL(&self) -> Option> { + msg_send_id![self, sharedSupportURL] + } + pub unsafe fn builtInPlugInsURL(&self) -> Option> { + msg_send_id![self, builtInPlugInsURL] + } + pub unsafe fn appStoreReceiptURL(&self) -> Option> { + msg_send_id![self, appStoreReceiptURL] + } + pub unsafe fn bundlePath(&self) -> Id { + msg_send_id![self, bundlePath] + } + pub unsafe fn resourcePath(&self) -> Option> { + msg_send_id![self, resourcePath] + } + pub unsafe fn executablePath(&self) -> Option> { + msg_send_id![self, executablePath] + } + pub unsafe fn privateFrameworksPath(&self) -> Option> { + msg_send_id![self, privateFrameworksPath] + } + pub unsafe fn sharedFrameworksPath(&self) -> Option> { + msg_send_id![self, sharedFrameworksPath] + } + pub unsafe fn sharedSupportPath(&self) -> Option> { + msg_send_id![self, sharedSupportPath] + } + pub unsafe fn builtInPlugInsPath(&self) -> Option> { + msg_send_id![self, builtInPlugInsPath] + } + pub unsafe fn bundleIdentifier(&self) -> Option> { + msg_send_id![self, bundleIdentifier] + } + pub unsafe fn infoDictionary(&self) -> TodoGenerics { + msg_send![self, infoDictionary] + } + pub unsafe fn localizedInfoDictionary(&self) -> TodoGenerics { + msg_send![self, localizedInfoDictionary] + } + pub unsafe fn principalClass(&self) -> Option<&Class> { + msg_send![self, principalClass] + } + pub unsafe fn preferredLocalizations(&self) -> TodoGenerics { + msg_send![self, preferredLocalizations] + } + pub unsafe fn localizations(&self) -> TodoGenerics { + msg_send![self, localizations] + } + pub unsafe fn developmentLocalization(&self) -> Option> { + msg_send_id![self, developmentLocalization] + } + pub unsafe fn executableArchitectures(&self) -> TodoGenerics { + msg_send![self, executableArchitectures] + } +} +#[doc = "NSBundleExtensionMethods"] +impl NSString { + pub unsafe fn variantFittingPresentationWidth(&self, width: NSInteger) -> Id { + msg_send_id![self, variantFittingPresentationWidth: width] + } +} +extern_class!( + #[derive(Debug)] + struct NSBundleResourceRequest; + unsafe impl ClassType for NSBundleResourceRequest { + type Super = NSObject; + } +); +impl NSBundleResourceRequest { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithTags(&self, tags: TodoGenerics) -> Id { + msg_send_id![self, initWithTags: tags] + } + pub unsafe fn initWithTags_bundle( + &self, + tags: TodoGenerics, + bundle: &NSBundle, + ) -> Id { + msg_send_id![self, initWithTags: tags, bundle: bundle] + } + pub unsafe fn beginAccessingResourcesWithCompletionHandler( + &self, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + beginAccessingResourcesWithCompletionHandler: completionHandler + ] + } + pub unsafe fn conditionallyBeginAccessingResourcesWithCompletionHandler( + &self, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + conditionallyBeginAccessingResourcesWithCompletionHandler: completionHandler + ] + } + pub unsafe fn endAccessingResources(&self) { + msg_send![self, endAccessingResources] + } + pub unsafe fn loadingPriority(&self) -> c_double { + msg_send![self, loadingPriority] + } + pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double) { + msg_send![self, setLoadingPriority: loadingPriority] + } + pub unsafe fn tags(&self) -> TodoGenerics { + msg_send![self, tags] + } + pub unsafe fn bundle(&self) -> Id { + msg_send_id![self, bundle] + } + pub unsafe fn progress(&self) -> Id { + msg_send_id![self, progress] + } +} +#[doc = "NSBundleResourceRequestAdditions"] +impl NSBundle { + pub unsafe fn setPreservationPriority_forTags(&self, priority: c_double, tags: TodoGenerics) { + msg_send![self, setPreservationPriority: priority, forTags: tags] + } + pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double { + msg_send![self, preservationPriorityForTag: tag] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs new file mode 100644 index 000000000..63604feba --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -0,0 +1,98 @@ +extern_class!( + #[derive(Debug)] + struct NSByteCountFormatter; + unsafe impl ClassType for NSByteCountFormatter { + type Super = NSFormatter; + } +); +impl NSByteCountFormatter { + pub unsafe fn stringFromByteCount_countStyle( + byteCount: c_longlong, + countStyle: NSByteCountFormatterCountStyle, + ) -> Id { + msg_send_id![ + Self::class(), + stringFromByteCount: byteCount, + countStyle: countStyle + ] + } + pub unsafe fn stringFromByteCount(&self, byteCount: c_longlong) -> Id { + msg_send_id![self, stringFromByteCount: byteCount] + } + pub unsafe fn stringFromMeasurement_countStyle( + measurement: TodoGenerics, + countStyle: NSByteCountFormatterCountStyle, + ) -> Id { + msg_send_id![ + Self::class(), + stringFromMeasurement: measurement, + countStyle: countStyle + ] + } + pub unsafe fn stringFromMeasurement(&self, measurement: TodoGenerics) -> Id { + msg_send_id![self, stringFromMeasurement: measurement] + } + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } + pub unsafe fn allowedUnits(&self) -> NSByteCountFormatterUnits { + msg_send![self, allowedUnits] + } + pub unsafe fn setAllowedUnits(&self, allowedUnits: NSByteCountFormatterUnits) { + msg_send![self, setAllowedUnits: allowedUnits] + } + pub unsafe fn countStyle(&self) -> NSByteCountFormatterCountStyle { + msg_send![self, countStyle] + } + pub unsafe fn setCountStyle(&self, countStyle: NSByteCountFormatterCountStyle) { + msg_send![self, setCountStyle: countStyle] + } + pub unsafe fn allowsNonnumericFormatting(&self) -> bool { + msg_send![self, allowsNonnumericFormatting] + } + pub unsafe fn setAllowsNonnumericFormatting(&self, allowsNonnumericFormatting: bool) { + msg_send![ + self, + setAllowsNonnumericFormatting: allowsNonnumericFormatting + ] + } + pub unsafe fn includesUnit(&self) -> bool { + msg_send![self, includesUnit] + } + pub unsafe fn setIncludesUnit(&self, includesUnit: bool) { + msg_send![self, setIncludesUnit: includesUnit] + } + pub unsafe fn includesCount(&self) -> bool { + msg_send![self, includesCount] + } + pub unsafe fn setIncludesCount(&self, includesCount: bool) { + msg_send![self, setIncludesCount: includesCount] + } + pub unsafe fn includesActualByteCount(&self) -> bool { + msg_send![self, includesActualByteCount] + } + pub unsafe fn setIncludesActualByteCount(&self, includesActualByteCount: bool) { + msg_send![self, setIncludesActualByteCount: includesActualByteCount] + } + pub unsafe fn isAdaptive(&self) -> bool { + msg_send![self, isAdaptive] + } + pub unsafe fn setAdaptive(&self, adaptive: bool) { + msg_send![self, setAdaptive: adaptive] + } + pub unsafe fn zeroPadsFractionDigits(&self) -> bool { + msg_send![self, zeroPadsFractionDigits] + } + pub unsafe fn setZeroPadsFractionDigits(&self, zeroPadsFractionDigits: bool) { + msg_send![self, setZeroPadsFractionDigits: zeroPadsFractionDigits] + } + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs new file mode 100644 index 000000000..80f38a13d --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -0,0 +1,60 @@ +extern_class!( + #[derive(Debug)] + struct NSCache; + unsafe impl ClassType for NSCache { + type Super = NSObject; + } +); +impl NSCache { + pub unsafe fn objectForKey(&self, key: KeyType) -> ObjectType { + msg_send![self, objectForKey: key] + } + pub unsafe fn setObject_forKey(&self, obj: ObjectType, key: KeyType) { + msg_send![self, setObject: obj, forKey: key] + } + pub unsafe fn setObject_forKey_cost(&self, obj: ObjectType, key: KeyType, g: NSUInteger) { + msg_send![self, setObject: obj, forKey: key, cost: g] + } + pub unsafe fn removeObjectForKey(&self, key: KeyType) { + msg_send![self, removeObjectForKey: key] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: &NSString) { + msg_send![self, setName: name] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn totalCostLimit(&self) -> NSUInteger { + msg_send![self, totalCostLimit] + } + pub unsafe fn setTotalCostLimit(&self, totalCostLimit: NSUInteger) { + msg_send![self, setTotalCostLimit: totalCostLimit] + } + pub unsafe fn countLimit(&self) -> NSUInteger { + msg_send![self, countLimit] + } + pub unsafe fn setCountLimit(&self, countLimit: NSUInteger) { + msg_send![self, setCountLimit: countLimit] + } + pub unsafe fn evictsObjectsWithDiscardedContent(&self) -> bool { + msg_send![self, evictsObjectsWithDiscardedContent] + } + pub unsafe fn setEvictsObjectsWithDiscardedContent( + &self, + evictsObjectsWithDiscardedContent: bool, + ) { + msg_send![ + self, + setEvictsObjectsWithDiscardedContent: evictsObjectsWithDiscardedContent + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs new file mode 100644 index 000000000..d0f15326f --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -0,0 +1,642 @@ +extern_class!( + #[derive(Debug)] + struct NSCalendar; + unsafe impl ClassType for NSCalendar { + type Super = NSObject; + } +); +impl NSCalendar { + pub unsafe fn calendarWithIdentifier( + calendarIdentifierConstant: NSCalendarIdentifier, + ) -> Option> { + msg_send_id![ + Self::class(), + calendarWithIdentifier: calendarIdentifierConstant + ] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCalendarIdentifier( + &self, + ident: NSCalendarIdentifier, + ) -> Option> { + msg_send_id![self, initWithCalendarIdentifier: ident] + } + pub unsafe fn minimumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange { + msg_send![self, minimumRangeOfUnit: unit] + } + pub unsafe fn maximumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange { + msg_send![self, maximumRangeOfUnit: unit] + } + pub unsafe fn rangeOfUnit_inUnit_forDate( + &self, + smaller: NSCalendarUnit, + larger: NSCalendarUnit, + date: &NSDate, + ) -> NSRange { + msg_send![self, rangeOfUnit: smaller, inUnit: larger, forDate: date] + } + pub unsafe fn ordinalityOfUnit_inUnit_forDate( + &self, + smaller: NSCalendarUnit, + larger: NSCalendarUnit, + date: &NSDate, + ) -> NSUInteger { + msg_send![ + self, + ordinalityOfUnit: smaller, + inUnit: larger, + forDate: date + ] + } + pub unsafe fn rangeOfUnit_startDate_interval_forDate( + &self, + unit: NSCalendarUnit, + datep: *mut Option<&NSDate>, + tip: *mut NSTimeInterval, + date: &NSDate, + ) -> bool { + msg_send![ + self, + rangeOfUnit: unit, + startDate: datep, + interval: tip, + forDate: date + ] + } + pub unsafe fn dateFromComponents( + &self, + comps: &NSDateComponents, + ) -> Option> { + msg_send_id![self, dateFromComponents: comps] + } + pub unsafe fn components_fromDate( + &self, + unitFlags: NSCalendarUnit, + date: &NSDate, + ) -> Id { + msg_send_id![self, components: unitFlags, fromDate: date] + } + pub unsafe fn dateByAddingComponents_toDate_options( + &self, + comps: &NSDateComponents, + date: &NSDate, + opts: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + dateByAddingComponents: comps, + toDate: date, + options: opts + ] + } + pub unsafe fn components_fromDate_toDate_options( + &self, + unitFlags: NSCalendarUnit, + startingDate: &NSDate, + resultDate: &NSDate, + opts: NSCalendarOptions, + ) -> Id { + msg_send_id![ + self, + components: unitFlags, + fromDate: startingDate, + toDate: resultDate, + options: opts + ] + } + pub unsafe fn getEra_year_month_day_fromDate( + &self, + eraValuePointer: *mut NSInteger, + yearValuePointer: *mut NSInteger, + monthValuePointer: *mut NSInteger, + dayValuePointer: *mut NSInteger, + date: &NSDate, + ) { + msg_send![ + self, + getEra: eraValuePointer, + year: yearValuePointer, + month: monthValuePointer, + day: dayValuePointer, + fromDate: date + ] + } + pub unsafe fn getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate( + &self, + eraValuePointer: *mut NSInteger, + yearValuePointer: *mut NSInteger, + weekValuePointer: *mut NSInteger, + weekdayValuePointer: *mut NSInteger, + date: &NSDate, + ) { + msg_send![ + self, + getEra: eraValuePointer, + yearForWeekOfYear: yearValuePointer, + weekOfYear: weekValuePointer, + weekday: weekdayValuePointer, + fromDate: date + ] + } + pub unsafe fn getHour_minute_second_nanosecond_fromDate( + &self, + hourValuePointer: *mut NSInteger, + minuteValuePointer: *mut NSInteger, + secondValuePointer: *mut NSInteger, + nanosecondValuePointer: *mut NSInteger, + date: &NSDate, + ) { + msg_send![ + self, + getHour: hourValuePointer, + minute: minuteValuePointer, + second: secondValuePointer, + nanosecond: nanosecondValuePointer, + fromDate: date + ] + } + pub unsafe fn component_fromDate(&self, unit: NSCalendarUnit, date: &NSDate) -> NSInteger { + msg_send![self, component: unit, fromDate: date] + } + pub unsafe fn dateWithEra_year_month_day_hour_minute_second_nanosecond( + &self, + eraValue: NSInteger, + yearValue: NSInteger, + monthValue: NSInteger, + dayValue: NSInteger, + hourValue: NSInteger, + minuteValue: NSInteger, + secondValue: NSInteger, + nanosecondValue: NSInteger, + ) -> Option> { + msg_send_id![ + self, + dateWithEra: eraValue, + year: yearValue, + month: monthValue, + day: dayValue, + hour: hourValue, + minute: minuteValue, + second: secondValue, + nanosecond: nanosecondValue + ] + } + pub unsafe fn dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond( + &self, + eraValue: NSInteger, + yearValue: NSInteger, + weekValue: NSInteger, + weekdayValue: NSInteger, + hourValue: NSInteger, + minuteValue: NSInteger, + secondValue: NSInteger, + nanosecondValue: NSInteger, + ) -> Option> { + msg_send_id![ + self, + dateWithEra: eraValue, + yearForWeekOfYear: yearValue, + weekOfYear: weekValue, + weekday: weekdayValue, + hour: hourValue, + minute: minuteValue, + second: secondValue, + nanosecond: nanosecondValue + ] + } + pub unsafe fn startOfDayForDate(&self, date: &NSDate) -> Id { + msg_send_id![self, startOfDayForDate: date] + } + pub unsafe fn componentsInTimeZone_fromDate( + &self, + timezone: &NSTimeZone, + date: &NSDate, + ) -> Id { + msg_send_id![self, componentsInTimeZone: timezone, fromDate: date] + } + pub unsafe fn compareDate_toDate_toUnitGranularity( + &self, + date1: &NSDate, + date2: &NSDate, + unit: NSCalendarUnit, + ) -> NSComparisonResult { + msg_send![ + self, + compareDate: date1, + toDate: date2, + toUnitGranularity: unit + ] + } + pub unsafe fn isDate_equalToDate_toUnitGranularity( + &self, + date1: &NSDate, + date2: &NSDate, + unit: NSCalendarUnit, + ) -> bool { + msg_send![ + self, + isDate: date1, + equalToDate: date2, + toUnitGranularity: unit + ] + } + pub unsafe fn isDate_inSameDayAsDate(&self, date1: &NSDate, date2: &NSDate) -> bool { + msg_send![self, isDate: date1, inSameDayAsDate: date2] + } + pub unsafe fn isDateInToday(&self, date: &NSDate) -> bool { + msg_send![self, isDateInToday: date] + } + pub unsafe fn isDateInYesterday(&self, date: &NSDate) -> bool { + msg_send![self, isDateInYesterday: date] + } + pub unsafe fn isDateInTomorrow(&self, date: &NSDate) -> bool { + msg_send![self, isDateInTomorrow: date] + } + pub unsafe fn isDateInWeekend(&self, date: &NSDate) -> bool { + msg_send![self, isDateInWeekend: date] + } + pub unsafe fn rangeOfWeekendStartDate_interval_containingDate( + &self, + datep: *mut Option<&NSDate>, + tip: *mut NSTimeInterval, + date: &NSDate, + ) -> bool { + msg_send![ + self, + rangeOfWeekendStartDate: datep, + interval: tip, + containingDate: date + ] + } + pub unsafe fn nextWeekendStartDate_interval_options_afterDate( + &self, + datep: *mut Option<&NSDate>, + tip: *mut NSTimeInterval, + options: NSCalendarOptions, + date: &NSDate, + ) -> bool { + msg_send![ + self, + nextWeekendStartDate: datep, + interval: tip, + options: options, + afterDate: date + ] + } + pub unsafe fn components_fromDateComponents_toDateComponents_options( + &self, + unitFlags: NSCalendarUnit, + startingDateComp: &NSDateComponents, + resultDateComp: &NSDateComponents, + options: NSCalendarOptions, + ) -> Id { + msg_send_id![ + self, + components: unitFlags, + fromDateComponents: startingDateComp, + toDateComponents: resultDateComp, + options: options + ] + } + pub unsafe fn dateByAddingUnit_value_toDate_options( + &self, + unit: NSCalendarUnit, + value: NSInteger, + date: &NSDate, + options: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + dateByAddingUnit: unit, + value: value, + toDate: date, + options: options + ] + } + pub unsafe fn enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock( + &self, + start: &NSDate, + comps: &NSDateComponents, + opts: NSCalendarOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateDatesStartingAfterDate: start, + matchingComponents: comps, + options: opts, + usingBlock: block + ] + } + pub unsafe fn nextDateAfterDate_matchingComponents_options( + &self, + date: &NSDate, + comps: &NSDateComponents, + options: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + nextDateAfterDate: date, + matchingComponents: comps, + options: options + ] + } + pub unsafe fn nextDateAfterDate_matchingUnit_value_options( + &self, + date: &NSDate, + unit: NSCalendarUnit, + value: NSInteger, + options: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + nextDateAfterDate: date, + matchingUnit: unit, + value: value, + options: options + ] + } + pub unsafe fn nextDateAfterDate_matchingHour_minute_second_options( + &self, + date: &NSDate, + hourValue: NSInteger, + minuteValue: NSInteger, + secondValue: NSInteger, + options: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + nextDateAfterDate: date, + matchingHour: hourValue, + minute: minuteValue, + second: secondValue, + options: options + ] + } + pub unsafe fn dateBySettingUnit_value_ofDate_options( + &self, + unit: NSCalendarUnit, + v: NSInteger, + date: &NSDate, + opts: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + dateBySettingUnit: unit, + value: v, + ofDate: date, + options: opts + ] + } + pub unsafe fn dateBySettingHour_minute_second_ofDate_options( + &self, + h: NSInteger, + m: NSInteger, + s: NSInteger, + date: &NSDate, + opts: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + dateBySettingHour: h, + minute: m, + second: s, + ofDate: date, + options: opts + ] + } + pub unsafe fn date_matchesComponents( + &self, + date: &NSDate, + components: &NSDateComponents, + ) -> bool { + msg_send![self, date: date, matchesComponents: components] + } + pub unsafe fn currentCalendar() -> Id { + msg_send_id![Self::class(), currentCalendar] + } + pub unsafe fn autoupdatingCurrentCalendar() -> Id { + msg_send_id![Self::class(), autoupdatingCurrentCalendar] + } + pub unsafe fn calendarIdentifier(&self) -> NSCalendarIdentifier { + msg_send![self, calendarIdentifier] + } + pub unsafe fn locale(&self) -> Option> { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: &NSTimeZone) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn firstWeekday(&self) -> NSUInteger { + msg_send![self, firstWeekday] + } + pub unsafe fn setFirstWeekday(&self, firstWeekday: NSUInteger) { + msg_send![self, setFirstWeekday: firstWeekday] + } + pub unsafe fn minimumDaysInFirstWeek(&self) -> NSUInteger { + msg_send![self, minimumDaysInFirstWeek] + } + pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger) { + msg_send![self, setMinimumDaysInFirstWeek: minimumDaysInFirstWeek] + } + pub unsafe fn eraSymbols(&self) -> TodoGenerics { + msg_send![self, eraSymbols] + } + pub unsafe fn longEraSymbols(&self) -> TodoGenerics { + msg_send![self, longEraSymbols] + } + pub unsafe fn monthSymbols(&self) -> TodoGenerics { + msg_send![self, monthSymbols] + } + pub unsafe fn shortMonthSymbols(&self) -> TodoGenerics { + msg_send![self, shortMonthSymbols] + } + pub unsafe fn veryShortMonthSymbols(&self) -> TodoGenerics { + msg_send![self, veryShortMonthSymbols] + } + pub unsafe fn standaloneMonthSymbols(&self) -> TodoGenerics { + msg_send![self, standaloneMonthSymbols] + } + pub unsafe fn shortStandaloneMonthSymbols(&self) -> TodoGenerics { + msg_send![self, shortStandaloneMonthSymbols] + } + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> TodoGenerics { + msg_send![self, veryShortStandaloneMonthSymbols] + } + pub unsafe fn weekdaySymbols(&self) -> TodoGenerics { + msg_send![self, weekdaySymbols] + } + pub unsafe fn shortWeekdaySymbols(&self) -> TodoGenerics { + msg_send![self, shortWeekdaySymbols] + } + pub unsafe fn veryShortWeekdaySymbols(&self) -> TodoGenerics { + msg_send![self, veryShortWeekdaySymbols] + } + pub unsafe fn standaloneWeekdaySymbols(&self) -> TodoGenerics { + msg_send![self, standaloneWeekdaySymbols] + } + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> TodoGenerics { + msg_send![self, shortStandaloneWeekdaySymbols] + } + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> TodoGenerics { + msg_send![self, veryShortStandaloneWeekdaySymbols] + } + pub unsafe fn quarterSymbols(&self) -> TodoGenerics { + msg_send![self, quarterSymbols] + } + pub unsafe fn shortQuarterSymbols(&self) -> TodoGenerics { + msg_send![self, shortQuarterSymbols] + } + pub unsafe fn standaloneQuarterSymbols(&self) -> TodoGenerics { + msg_send![self, standaloneQuarterSymbols] + } + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> TodoGenerics { + msg_send![self, shortStandaloneQuarterSymbols] + } + pub unsafe fn AMSymbol(&self) -> Id { + msg_send_id![self, AMSymbol] + } + pub unsafe fn PMSymbol(&self) -> Id { + msg_send_id![self, PMSymbol] + } +} +extern_class!( + #[derive(Debug)] + struct NSDateComponents; + unsafe impl ClassType for NSDateComponents { + type Super = NSObject; + } +); +impl NSDateComponents { + pub unsafe fn week(&self) -> NSInteger { + msg_send![self, week] + } + pub unsafe fn setWeek(&self, v: NSInteger) { + msg_send![self, setWeek: v] + } + pub unsafe fn setValue_forComponent(&self, value: NSInteger, unit: NSCalendarUnit) { + msg_send![self, setValue: value, forComponent: unit] + } + pub unsafe fn valueForComponent(&self, unit: NSCalendarUnit) -> NSInteger { + msg_send![self, valueForComponent: unit] + } + pub unsafe fn isValidDateInCalendar(&self, calendar: &NSCalendar) -> bool { + msg_send![self, isValidDateInCalendar: calendar] + } + pub unsafe fn calendar(&self) -> Option> { + msg_send_id![self, calendar] + } + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { + msg_send![self, setCalendar: calendar] + } + pub unsafe fn timeZone(&self) -> Option> { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn era(&self) -> NSInteger { + msg_send![self, era] + } + pub unsafe fn setEra(&self, era: NSInteger) { + msg_send![self, setEra: era] + } + pub unsafe fn year(&self) -> NSInteger { + msg_send![self, year] + } + pub unsafe fn setYear(&self, year: NSInteger) { + msg_send![self, setYear: year] + } + pub unsafe fn month(&self) -> NSInteger { + msg_send![self, month] + } + pub unsafe fn setMonth(&self, month: NSInteger) { + msg_send![self, setMonth: month] + } + pub unsafe fn day(&self) -> NSInteger { + msg_send![self, day] + } + pub unsafe fn setDay(&self, day: NSInteger) { + msg_send![self, setDay: day] + } + pub unsafe fn hour(&self) -> NSInteger { + msg_send![self, hour] + } + pub unsafe fn setHour(&self, hour: NSInteger) { + msg_send![self, setHour: hour] + } + pub unsafe fn minute(&self) -> NSInteger { + msg_send![self, minute] + } + pub unsafe fn setMinute(&self, minute: NSInteger) { + msg_send![self, setMinute: minute] + } + pub unsafe fn second(&self) -> NSInteger { + msg_send![self, second] + } + pub unsafe fn setSecond(&self, second: NSInteger) { + msg_send![self, setSecond: second] + } + pub unsafe fn nanosecond(&self) -> NSInteger { + msg_send![self, nanosecond] + } + pub unsafe fn setNanosecond(&self, nanosecond: NSInteger) { + msg_send![self, setNanosecond: nanosecond] + } + pub unsafe fn weekday(&self) -> NSInteger { + msg_send![self, weekday] + } + pub unsafe fn setWeekday(&self, weekday: NSInteger) { + msg_send![self, setWeekday: weekday] + } + pub unsafe fn weekdayOrdinal(&self) -> NSInteger { + msg_send![self, weekdayOrdinal] + } + pub unsafe fn setWeekdayOrdinal(&self, weekdayOrdinal: NSInteger) { + msg_send![self, setWeekdayOrdinal: weekdayOrdinal] + } + pub unsafe fn quarter(&self) -> NSInteger { + msg_send![self, quarter] + } + pub unsafe fn setQuarter(&self, quarter: NSInteger) { + msg_send![self, setQuarter: quarter] + } + pub unsafe fn weekOfMonth(&self) -> NSInteger { + msg_send![self, weekOfMonth] + } + pub unsafe fn setWeekOfMonth(&self, weekOfMonth: NSInteger) { + msg_send![self, setWeekOfMonth: weekOfMonth] + } + pub unsafe fn weekOfYear(&self) -> NSInteger { + msg_send![self, weekOfYear] + } + pub unsafe fn setWeekOfYear(&self, weekOfYear: NSInteger) { + msg_send![self, setWeekOfYear: weekOfYear] + } + pub unsafe fn yearForWeekOfYear(&self) -> NSInteger { + msg_send![self, yearForWeekOfYear] + } + pub unsafe fn setYearForWeekOfYear(&self, yearForWeekOfYear: NSInteger) { + msg_send![self, setYearForWeekOfYear: yearForWeekOfYear] + } + pub unsafe fn isLeapMonth(&self) -> bool { + msg_send![self, isLeapMonth] + } + pub unsafe fn setLeapMonth(&self, leapMonth: bool) { + msg_send![self, setLeapMonth: leapMonth] + } + pub unsafe fn date(&self) -> Option> { + msg_send_id![self, date] + } + pub unsafe fn isValidDate(&self) -> bool { + msg_send![self, isValidDate] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs new file mode 100644 index 000000000..1556a22d6 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -0,0 +1,238 @@ +extern_class!( + #[derive(Debug)] + struct NSCalendarDate; + unsafe impl ClassType for NSCalendarDate { + type Super = NSDate; + } +); +impl NSCalendarDate { + pub unsafe fn calendarDate() -> Id { + msg_send_id![Self::class(), calendarDate] + } + pub unsafe fn dateWithString_calendarFormat_locale( + description: &NSString, + format: &NSString, + locale: Option<&Object>, + ) -> Option> { + msg_send_id![ + Self::class(), + dateWithString: description, + calendarFormat: format, + locale: locale + ] + } + pub unsafe fn dateWithString_calendarFormat( + description: &NSString, + format: &NSString, + ) -> Option> { + msg_send_id![ + Self::class(), + dateWithString: description, + calendarFormat: format + ] + } + pub unsafe fn dateWithYear_month_day_hour_minute_second_timeZone( + year: NSInteger, + month: NSUInteger, + day: NSUInteger, + hour: NSUInteger, + minute: NSUInteger, + second: NSUInteger, + aTimeZone: Option<&NSTimeZone>, + ) -> Id { + msg_send_id![ + Self::class(), + dateWithYear: year, + month: month, + day: day, + hour: hour, + minute: minute, + second: second, + timeZone: aTimeZone + ] + } + pub unsafe fn dateByAddingYears_months_days_hours_minutes_seconds( + &self, + year: NSInteger, + month: NSInteger, + day: NSInteger, + hour: NSInteger, + minute: NSInteger, + second: NSInteger, + ) -> Id { + msg_send_id![ + self, + dateByAddingYears: year, + months: month, + days: day, + hours: hour, + minutes: minute, + seconds: second + ] + } + pub unsafe fn dayOfCommonEra(&self) -> NSInteger { + msg_send![self, dayOfCommonEra] + } + pub unsafe fn dayOfMonth(&self) -> NSInteger { + msg_send![self, dayOfMonth] + } + pub unsafe fn dayOfWeek(&self) -> NSInteger { + msg_send![self, dayOfWeek] + } + pub unsafe fn dayOfYear(&self) -> NSInteger { + msg_send![self, dayOfYear] + } + pub unsafe fn hourOfDay(&self) -> NSInteger { + msg_send![self, hourOfDay] + } + pub unsafe fn minuteOfHour(&self) -> NSInteger { + msg_send![self, minuteOfHour] + } + pub unsafe fn monthOfYear(&self) -> NSInteger { + msg_send![self, monthOfYear] + } + pub unsafe fn secondOfMinute(&self) -> NSInteger { + msg_send![self, secondOfMinute] + } + pub unsafe fn yearOfCommonEra(&self) -> NSInteger { + msg_send![self, yearOfCommonEra] + } + pub unsafe fn calendarFormat(&self) -> Id { + msg_send_id![self, calendarFormat] + } + pub unsafe fn descriptionWithCalendarFormat_locale( + &self, + format: &NSString, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, descriptionWithCalendarFormat: format, locale: locale] + } + pub unsafe fn descriptionWithCalendarFormat(&self, format: &NSString) -> Id { + msg_send_id![self, descriptionWithCalendarFormat: format] + } + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn initWithString_calendarFormat_locale( + &self, + description: &NSString, + format: &NSString, + locale: Option<&Object>, + ) -> Option> { + msg_send_id![ + self, + initWithString: description, + calendarFormat: format, + locale: locale + ] + } + pub unsafe fn initWithString_calendarFormat( + &self, + description: &NSString, + format: &NSString, + ) -> Option> { + msg_send_id![self, initWithString: description, calendarFormat: format] + } + pub unsafe fn initWithString(&self, description: &NSString) -> Option> { + msg_send_id![self, initWithString: description] + } + pub unsafe fn initWithYear_month_day_hour_minute_second_timeZone( + &self, + year: NSInteger, + month: NSUInteger, + day: NSUInteger, + hour: NSUInteger, + minute: NSUInteger, + second: NSUInteger, + aTimeZone: Option<&NSTimeZone>, + ) -> Id { + msg_send_id![ + self, + initWithYear: year, + month: month, + day: day, + hour: hour, + minute: minute, + second: second, + timeZone: aTimeZone + ] + } + pub unsafe fn setCalendarFormat(&self, format: Option<&NSString>) { + msg_send![self, setCalendarFormat: format] + } + pub unsafe fn setTimeZone(&self, aTimeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: aTimeZone] + } + pub unsafe fn years_months_days_hours_minutes_seconds_sinceDate( + &self, + yp: *mut NSInteger, + mop: *mut NSInteger, + dp: *mut NSInteger, + hp: *mut NSInteger, + mip: *mut NSInteger, + sp: *mut NSInteger, + date: &NSCalendarDate, + ) { + msg_send![ + self, + years: yp, + months: mop, + days: dp, + hours: hp, + minutes: mip, + seconds: sp, + sinceDate: date + ] + } + pub unsafe fn distantFuture() -> Id { + msg_send_id![Self::class(), distantFuture] + } + pub unsafe fn distantPast() -> Id { + msg_send_id![Self::class(), distantPast] + } +} +#[doc = "NSCalendarDateExtras"] +impl NSDate { + pub unsafe fn dateWithNaturalLanguageString_locale( + string: &NSString, + locale: Option<&Object>, + ) -> Option> { + msg_send_id![ + Self::class(), + dateWithNaturalLanguageString: string, + locale: locale + ] + } + pub unsafe fn dateWithNaturalLanguageString(string: &NSString) -> Option> { + msg_send_id![Self::class(), dateWithNaturalLanguageString: string] + } + pub unsafe fn dateWithString(aString: &NSString) -> Id { + msg_send_id![Self::class(), dateWithString: aString] + } + pub unsafe fn dateWithCalendarFormat_timeZone( + &self, + format: Option<&NSString>, + aTimeZone: Option<&NSTimeZone>, + ) -> Id { + msg_send_id![self, dateWithCalendarFormat: format, timeZone: aTimeZone] + } + pub unsafe fn descriptionWithCalendarFormat_timeZone_locale( + &self, + format: Option<&NSString>, + aTimeZone: Option<&NSTimeZone>, + locale: Option<&Object>, + ) -> Option> { + msg_send_id![ + self, + descriptionWithCalendarFormat: format, + timeZone: aTimeZone, + locale: locale + ] + } + pub unsafe fn initWithString(&self, description: &NSString) -> Option> { + msg_send_id![self, initWithString: description] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs new file mode 100644 index 000000000..b5cd9db55 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -0,0 +1,186 @@ +extern_class!( + #[derive(Debug)] + struct NSCharacterSet; + unsafe impl ClassType for NSCharacterSet { + type Super = NSObject; + } +); +impl NSCharacterSet { + pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id { + msg_send_id![Self::class(), characterSetWithRange: aRange] + } + pub unsafe fn characterSetWithCharactersInString( + aString: &NSString, + ) -> Id { + msg_send_id![Self::class(), characterSetWithCharactersInString: aString] + } + pub unsafe fn characterSetWithBitmapRepresentation( + data: &NSData, + ) -> Id { + msg_send_id![Self::class(), characterSetWithBitmapRepresentation: data] + } + pub unsafe fn characterSetWithContentsOfFile( + fName: &NSString, + ) -> Option> { + msg_send_id![Self::class(), characterSetWithContentsOfFile: fName] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool { + msg_send![self, characterIsMember: aCharacter] + } + pub unsafe fn longCharacterIsMember(&self, theLongChar: UTF32Char) -> bool { + msg_send![self, longCharacterIsMember: theLongChar] + } + pub unsafe fn isSupersetOfSet(&self, theOtherSet: &NSCharacterSet) -> bool { + msg_send![self, isSupersetOfSet: theOtherSet] + } + pub unsafe fn hasMemberInPlane(&self, thePlane: uint8_t) -> bool { + msg_send![self, hasMemberInPlane: thePlane] + } + pub unsafe fn controlCharacterSet() -> Id { + msg_send_id![Self::class(), controlCharacterSet] + } + pub unsafe fn whitespaceCharacterSet() -> Id { + msg_send_id![Self::class(), whitespaceCharacterSet] + } + pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id { + msg_send_id![Self::class(), whitespaceAndNewlineCharacterSet] + } + pub unsafe fn decimalDigitCharacterSet() -> Id { + msg_send_id![Self::class(), decimalDigitCharacterSet] + } + pub unsafe fn letterCharacterSet() -> Id { + msg_send_id![Self::class(), letterCharacterSet] + } + pub unsafe fn lowercaseLetterCharacterSet() -> Id { + msg_send_id![Self::class(), lowercaseLetterCharacterSet] + } + pub unsafe fn uppercaseLetterCharacterSet() -> Id { + msg_send_id![Self::class(), uppercaseLetterCharacterSet] + } + pub unsafe fn nonBaseCharacterSet() -> Id { + msg_send_id![Self::class(), nonBaseCharacterSet] + } + pub unsafe fn alphanumericCharacterSet() -> Id { + msg_send_id![Self::class(), alphanumericCharacterSet] + } + pub unsafe fn decomposableCharacterSet() -> Id { + msg_send_id![Self::class(), decomposableCharacterSet] + } + pub unsafe fn illegalCharacterSet() -> Id { + msg_send_id![Self::class(), illegalCharacterSet] + } + pub unsafe fn punctuationCharacterSet() -> Id { + msg_send_id![Self::class(), punctuationCharacterSet] + } + pub unsafe fn capitalizedLetterCharacterSet() -> Id { + msg_send_id![Self::class(), capitalizedLetterCharacterSet] + } + pub unsafe fn symbolCharacterSet() -> Id { + msg_send_id![Self::class(), symbolCharacterSet] + } + pub unsafe fn newlineCharacterSet() -> Id { + msg_send_id![Self::class(), newlineCharacterSet] + } + pub unsafe fn bitmapRepresentation(&self) -> Id { + msg_send_id![self, bitmapRepresentation] + } + pub unsafe fn invertedSet(&self) -> Id { + msg_send_id![self, invertedSet] + } +} +extern_class!( + #[derive(Debug)] + struct NSMutableCharacterSet; + unsafe impl ClassType for NSMutableCharacterSet { + type Super = NSCharacterSet; + } +); +impl NSMutableCharacterSet { + pub unsafe fn addCharactersInRange(&self, aRange: NSRange) { + msg_send![self, addCharactersInRange: aRange] + } + pub unsafe fn removeCharactersInRange(&self, aRange: NSRange) { + msg_send![self, removeCharactersInRange: aRange] + } + pub unsafe fn addCharactersInString(&self, aString: &NSString) { + msg_send![self, addCharactersInString: aString] + } + pub unsafe fn removeCharactersInString(&self, aString: &NSString) { + msg_send![self, removeCharactersInString: aString] + } + pub unsafe fn formUnionWithCharacterSet(&self, otherSet: &NSCharacterSet) { + msg_send![self, formUnionWithCharacterSet: otherSet] + } + pub unsafe fn formIntersectionWithCharacterSet(&self, otherSet: &NSCharacterSet) { + msg_send![self, formIntersectionWithCharacterSet: otherSet] + } + pub unsafe fn invert(&self) { + msg_send![self, invert] + } + pub unsafe fn controlCharacterSet() -> Id { + msg_send_id![Self::class(), controlCharacterSet] + } + pub unsafe fn whitespaceCharacterSet() -> Id { + msg_send_id![Self::class(), whitespaceCharacterSet] + } + pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id { + msg_send_id![Self::class(), whitespaceAndNewlineCharacterSet] + } + pub unsafe fn decimalDigitCharacterSet() -> Id { + msg_send_id![Self::class(), decimalDigitCharacterSet] + } + pub unsafe fn letterCharacterSet() -> Id { + msg_send_id![Self::class(), letterCharacterSet] + } + pub unsafe fn lowercaseLetterCharacterSet() -> Id { + msg_send_id![Self::class(), lowercaseLetterCharacterSet] + } + pub unsafe fn uppercaseLetterCharacterSet() -> Id { + msg_send_id![Self::class(), uppercaseLetterCharacterSet] + } + pub unsafe fn nonBaseCharacterSet() -> Id { + msg_send_id![Self::class(), nonBaseCharacterSet] + } + pub unsafe fn alphanumericCharacterSet() -> Id { + msg_send_id![Self::class(), alphanumericCharacterSet] + } + pub unsafe fn decomposableCharacterSet() -> Id { + msg_send_id![Self::class(), decomposableCharacterSet] + } + pub unsafe fn illegalCharacterSet() -> Id { + msg_send_id![Self::class(), illegalCharacterSet] + } + pub unsafe fn punctuationCharacterSet() -> Id { + msg_send_id![Self::class(), punctuationCharacterSet] + } + pub unsafe fn capitalizedLetterCharacterSet() -> Id { + msg_send_id![Self::class(), capitalizedLetterCharacterSet] + } + pub unsafe fn symbolCharacterSet() -> Id { + msg_send_id![Self::class(), symbolCharacterSet] + } + pub unsafe fn newlineCharacterSet() -> Id { + msg_send_id![Self::class(), newlineCharacterSet] + } + pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id { + msg_send_id![Self::class(), characterSetWithRange: aRange] + } + pub unsafe fn characterSetWithCharactersInString( + aString: &NSString, + ) -> Id { + msg_send_id![Self::class(), characterSetWithCharactersInString: aString] + } + pub unsafe fn characterSetWithBitmapRepresentation( + data: &NSData, + ) -> Id { + msg_send_id![Self::class(), characterSetWithBitmapRepresentation: data] + } + pub unsafe fn characterSetWithContentsOfFile( + fName: &NSString, + ) -> Option> { + msg_send_id![Self::class(), characterSetWithContentsOfFile: fName] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs new file mode 100644 index 000000000..ea9f470df --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -0,0 +1,63 @@ +extern_class!( + #[derive(Debug)] + struct NSClassDescription; + unsafe impl ClassType for NSClassDescription { + type Super = NSObject; + } +); +impl NSClassDescription { + pub unsafe fn registerClassDescription_forClass( + description: &NSClassDescription, + aClass: &Class, + ) { + msg_send![ + Self::class(), + registerClassDescription: description, + forClass: aClass + ] + } + pub unsafe fn invalidateClassDescriptionCache() { + msg_send![Self::class(), invalidateClassDescriptionCache] + } + pub unsafe fn classDescriptionForClass( + aClass: &Class, + ) -> Option> { + msg_send_id![Self::class(), classDescriptionForClass: aClass] + } + pub unsafe fn inverseForRelationshipKey( + &self, + relationshipKey: &NSString, + ) -> Option> { + msg_send_id![self, inverseForRelationshipKey: relationshipKey] + } + pub unsafe fn attributeKeys(&self) -> TodoGenerics { + msg_send![self, attributeKeys] + } + pub unsafe fn toOneRelationshipKeys(&self) -> TodoGenerics { + msg_send![self, toOneRelationshipKeys] + } + pub unsafe fn toManyRelationshipKeys(&self) -> TodoGenerics { + msg_send![self, toManyRelationshipKeys] + } +} +#[doc = "NSClassDescriptionPrimitives"] +impl NSObject { + pub unsafe fn inverseForRelationshipKey( + &self, + relationshipKey: &NSString, + ) -> Option> { + msg_send_id![self, inverseForRelationshipKey: relationshipKey] + } + pub unsafe fn classDescription(&self) -> Id { + msg_send_id![self, classDescription] + } + pub unsafe fn attributeKeys(&self) -> TodoGenerics { + msg_send![self, attributeKeys] + } + pub unsafe fn toOneRelationshipKeys(&self) -> TodoGenerics { + msg_send![self, toOneRelationshipKeys] + } + pub unsafe fn toManyRelationshipKeys(&self) -> TodoGenerics { + msg_send![self, toManyRelationshipKeys] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs new file mode 100644 index 000000000..a80c663d2 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -0,0 +1,293 @@ +extern_class!( + #[derive(Debug)] + struct NSCoder; + unsafe impl ClassType for NSCoder { + type Super = NSObject; + } +); +impl NSCoder { + pub unsafe fn encodeValueOfObjCType_at(&self, type_: NonNull, addr: NonNull) { + msg_send![self, encodeValueOfObjCType: type_, at: addr] + } + pub unsafe fn encodeDataObject(&self, data: &NSData) { + msg_send![self, encodeDataObject: data] + } + pub unsafe fn decodeDataObject(&self) -> Option> { + msg_send_id![self, decodeDataObject] + } + pub unsafe fn decodeValueOfObjCType_at_size( + &self, + type_: NonNull, + data: NonNull, + size: NSUInteger, + ) { + msg_send![self, decodeValueOfObjCType: type_, at: data, size: size] + } + pub unsafe fn versionForClassName(&self, className: &NSString) -> NSInteger { + msg_send![self, versionForClassName: className] + } +} +#[doc = "NSExtendedCoder"] +impl NSCoder { + pub unsafe fn encodeObject(&self, object: Option<&Object>) { + msg_send![self, encodeObject: object] + } + pub unsafe fn encodeRootObject(&self, rootObject: &Object) { + msg_send![self, encodeRootObject: rootObject] + } + pub unsafe fn encodeBycopyObject(&self, anObject: Option<&Object>) { + msg_send![self, encodeBycopyObject: anObject] + } + pub unsafe fn encodeByrefObject(&self, anObject: Option<&Object>) { + msg_send![self, encodeByrefObject: anObject] + } + pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>) { + msg_send![self, encodeConditionalObject: object] + } + pub unsafe fn encodeArrayOfObjCType_count_at( + &self, + type_: NonNull, + count: NSUInteger, + array: NonNull, + ) { + msg_send![self, encodeArrayOfObjCType: type_, count: count, at: array] + } + pub unsafe fn encodeBytes_length(&self, byteaddr: *mut c_void, length: NSUInteger) { + msg_send![self, encodeBytes: byteaddr, length: length] + } + pub unsafe fn decodeObject(&self) -> Option> { + msg_send_id![self, decodeObject] + } + pub unsafe fn decodeTopLevelObjectAndReturnError( + &self, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, decodeTopLevelObjectAndReturnError: error] + } + pub unsafe fn decodeArrayOfObjCType_count_at( + &self, + itemType: NonNull, + count: NSUInteger, + array: NonNull, + ) { + msg_send![ + self, + decodeArrayOfObjCType: itemType, + count: count, + at: array + ] + } + pub unsafe fn decodeBytesWithReturnedLength( + &self, + lengthp: NonNull, + ) -> *mut c_void { + msg_send![self, decodeBytesWithReturnedLength: lengthp] + } + pub unsafe fn encodePropertyList(&self, aPropertyList: &Object) { + msg_send![self, encodePropertyList: aPropertyList] + } + pub unsafe fn decodePropertyList(&self) -> Option> { + msg_send_id![self, decodePropertyList] + } + pub unsafe fn setObjectZone(&self, zone: *mut NSZone) { + msg_send![self, setObjectZone: zone] + } + pub unsafe fn objectZone(&self) -> *mut NSZone { + msg_send![self, objectZone] + } + pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString) { + msg_send![self, encodeObject: object, forKey: key] + } + pub unsafe fn encodeConditionalObject_forKey(&self, object: Option<&Object>, key: &NSString) { + msg_send![self, encodeConditionalObject: object, forKey: key] + } + pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString) { + msg_send![self, encodeBool: value, forKey: key] + } + pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString) { + msg_send![self, encodeInt: value, forKey: key] + } + pub unsafe fn encodeInt32_forKey(&self, value: int32_t, key: &NSString) { + msg_send![self, encodeInt32: value, forKey: key] + } + pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString) { + msg_send![self, encodeInt64: value, forKey: key] + } + pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString) { + msg_send![self, encodeFloat: value, forKey: key] + } + pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString) { + msg_send![self, encodeDouble: value, forKey: key] + } + pub unsafe fn encodeBytes_length_forKey( + &self, + bytes: *mut uint8_t, + length: NSUInteger, + key: &NSString, + ) { + msg_send![self, encodeBytes: bytes, length: length, forKey: key] + } + pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool { + msg_send![self, containsValueForKey: key] + } + pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, decodeObjectForKey: key] + } + pub unsafe fn decodeTopLevelObjectForKey_error( + &self, + key: &NSString, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, decodeTopLevelObjectForKey: key, error: error] + } + pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool { + msg_send![self, decodeBoolForKey: key] + } + pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int { + msg_send![self, decodeIntForKey: key] + } + pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> int32_t { + msg_send![self, decodeInt32ForKey: key] + } + pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t { + msg_send![self, decodeInt64ForKey: key] + } + pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float { + msg_send![self, decodeFloatForKey: key] + } + pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double { + msg_send![self, decodeDoubleForKey: key] + } + pub unsafe fn decodeBytesForKey_returnedLength( + &self, + key: &NSString, + lengthp: *mut NSUInteger, + ) -> *mut uint8_t { + msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] + } + pub unsafe fn encodeInteger_forKey(&self, value: NSInteger, key: &NSString) { + msg_send![self, encodeInteger: value, forKey: key] + } + pub unsafe fn decodeIntegerForKey(&self, key: &NSString) -> NSInteger { + msg_send![self, decodeIntegerForKey: key] + } + pub unsafe fn decodeObjectOfClass_forKey( + &self, + aClass: &Class, + key: &NSString, + ) -> Option> { + msg_send_id![self, decodeObjectOfClass: aClass, forKey: key] + } + pub unsafe fn decodeTopLevelObjectOfClass_forKey_error( + &self, + aClass: &Class, + key: &NSString, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + decodeTopLevelObjectOfClass: aClass, + forKey: key, + error: error + ] + } + pub unsafe fn decodeArrayOfObjectsOfClass_forKey( + &self, + cls: &Class, + key: &NSString, + ) -> Option> { + msg_send_id![self, decodeArrayOfObjectsOfClass: cls, forKey: key] + } + pub unsafe fn decodeDictionaryWithKeysOfClass_objectsOfClass_forKey( + &self, + keyCls: &Class, + objectCls: &Class, + key: &NSString, + ) -> Option> { + msg_send_id![ + self, + decodeDictionaryWithKeysOfClass: keyCls, + objectsOfClass: objectCls, + forKey: key + ] + } + pub unsafe fn decodeObjectOfClasses_forKey( + &self, + classes: TodoGenerics, + key: &NSString, + ) -> Option> { + msg_send_id![self, decodeObjectOfClasses: classes, forKey: key] + } + pub unsafe fn decodeTopLevelObjectOfClasses_forKey_error( + &self, + classes: TodoGenerics, + key: &NSString, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + decodeTopLevelObjectOfClasses: classes, + forKey: key, + error: error + ] + } + pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( + &self, + classes: TodoGenerics, + key: &NSString, + ) -> Option> { + msg_send_id![self, decodeArrayOfObjectsOfClasses: classes, forKey: key] + } + pub unsafe fn decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey( + &self, + keyClasses: TodoGenerics, + objectClasses: TodoGenerics, + key: &NSString, + ) -> Option> { + msg_send_id![ + self, + decodeDictionaryWithKeysOfClasses: keyClasses, + objectsOfClasses: objectClasses, + forKey: key + ] + } + pub unsafe fn decodePropertyListForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, decodePropertyListForKey: key] + } + pub unsafe fn failWithError(&self, error: &NSError) { + msg_send![self, failWithError: error] + } + pub unsafe fn systemVersion(&self) -> c_uint { + msg_send![self, systemVersion] + } + pub unsafe fn allowsKeyedCoding(&self) -> bool { + msg_send![self, allowsKeyedCoding] + } + pub unsafe fn requiresSecureCoding(&self) -> bool { + msg_send![self, requiresSecureCoding] + } + pub unsafe fn allowedClasses(&self) -> TodoGenerics { + msg_send![self, allowedClasses] + } + pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy { + msg_send![self, decodingFailurePolicy] + } + pub unsafe fn error(&self) -> Option> { + msg_send_id![self, error] + } +} +#[doc = "NSTypedstreamCompatibility"] +impl NSCoder { + pub unsafe fn encodeNXObject(&self, object: &Object) { + msg_send![self, encodeNXObject: object] + } + pub unsafe fn decodeNXObject(&self) -> Option> { + msg_send_id![self, decodeNXObject] + } +} +#[doc = "NSDeprecated"] +impl NSCoder { + pub unsafe fn decodeValueOfObjCType_at(&self, type_: NonNull, data: NonNull) { + msg_send![self, decodeValueOfObjCType: type_, at: data] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs new file mode 100644 index 000000000..60a293ab7 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -0,0 +1,74 @@ +extern_class!( + #[derive(Debug)] + struct NSComparisonPredicate; + unsafe impl ClassType for NSComparisonPredicate { + type Super = NSPredicate; + } +); +impl NSComparisonPredicate { + pub unsafe fn predicateWithLeftExpression_rightExpression_modifier_type_options( + lhs: &NSExpression, + rhs: &NSExpression, + modifier: NSComparisonPredicateModifier, + type_: NSPredicateOperatorType, + options: NSComparisonPredicateOptions, + ) -> Id { + msg_send_id ! [Self :: class () , predicateWithLeftExpression : lhs , rightExpression : rhs , modifier : modifier , type : type_ , options : options] + } + pub unsafe fn predicateWithLeftExpression_rightExpression_customSelector( + lhs: &NSExpression, + rhs: &NSExpression, + selector: Sel, + ) -> Id { + msg_send_id![ + Self::class(), + predicateWithLeftExpression: lhs, + rightExpression: rhs, + customSelector: selector + ] + } + pub unsafe fn initWithLeftExpression_rightExpression_modifier_type_options( + &self, + lhs: &NSExpression, + rhs: &NSExpression, + modifier: NSComparisonPredicateModifier, + type_: NSPredicateOperatorType, + options: NSComparisonPredicateOptions, + ) -> Id { + msg_send_id ! [self , initWithLeftExpression : lhs , rightExpression : rhs , modifier : modifier , type : type_ , options : options] + } + pub unsafe fn initWithLeftExpression_rightExpression_customSelector( + &self, + lhs: &NSExpression, + rhs: &NSExpression, + selector: Sel, + ) -> Id { + msg_send_id![ + self, + initWithLeftExpression: lhs, + rightExpression: rhs, + customSelector: selector + ] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn predicateOperatorType(&self) -> NSPredicateOperatorType { + msg_send![self, predicateOperatorType] + } + pub unsafe fn comparisonPredicateModifier(&self) -> NSComparisonPredicateModifier { + msg_send![self, comparisonPredicateModifier] + } + pub unsafe fn leftExpression(&self) -> Id { + msg_send_id![self, leftExpression] + } + pub unsafe fn rightExpression(&self) -> Id { + msg_send_id![self, rightExpression] + } + pub unsafe fn customSelector(&self) -> Option { + msg_send![self, customSelector] + } + pub unsafe fn options(&self) -> NSComparisonPredicateOptions { + msg_send![self, options] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs new file mode 100644 index 000000000..6a45885b3 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -0,0 +1,40 @@ +extern_class!( + #[derive(Debug)] + struct NSCompoundPredicate; + unsafe impl ClassType for NSCompoundPredicate { + type Super = NSPredicate; + } +); +impl NSCompoundPredicate { + pub unsafe fn initWithType_subpredicates( + &self, + type_: NSCompoundPredicateType, + subpredicates: TodoGenerics, + ) -> Id { + msg_send_id![self, initWithType: type_, subpredicates: subpredicates] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn andPredicateWithSubpredicates( + subpredicates: TodoGenerics, + ) -> Id { + msg_send_id![Self::class(), andPredicateWithSubpredicates: subpredicates] + } + pub unsafe fn orPredicateWithSubpredicates( + subpredicates: TodoGenerics, + ) -> Id { + msg_send_id![Self::class(), orPredicateWithSubpredicates: subpredicates] + } + pub unsafe fn notPredicateWithSubpredicate( + predicate: &NSPredicate, + ) -> Id { + msg_send_id![Self::class(), notPredicateWithSubpredicate: predicate] + } + pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType { + msg_send![self, compoundPredicateType] + } + pub unsafe fn subpredicates(&self) -> Id { + msg_send_id![self, subpredicates] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs new file mode 100644 index 000000000..ea737381e --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -0,0 +1,216 @@ +extern_class!( + #[derive(Debug)] + struct NSConnection; + unsafe impl ClassType for NSConnection { + type Super = NSObject; + } +); +impl NSConnection { + pub unsafe fn allConnections() -> TodoGenerics { + msg_send![Self::class(), allConnections] + } + pub unsafe fn defaultConnection() -> Id { + msg_send_id![Self::class(), defaultConnection] + } + pub unsafe fn connectionWithRegisteredName_host( + name: &NSString, + hostName: Option<&NSString>, + ) -> Option> { + msg_send_id![ + Self::class(), + connectionWithRegisteredName: name, + host: hostName + ] + } + pub unsafe fn connectionWithRegisteredName_host_usingNameServer( + name: &NSString, + hostName: Option<&NSString>, + server: &NSPortNameServer, + ) -> Option> { + msg_send_id![ + Self::class(), + connectionWithRegisteredName: name, + host: hostName, + usingNameServer: server + ] + } + pub unsafe fn rootProxyForConnectionWithRegisteredName_host( + name: &NSString, + hostName: Option<&NSString>, + ) -> Option> { + msg_send_id![ + Self::class(), + rootProxyForConnectionWithRegisteredName: name, + host: hostName + ] + } + pub unsafe fn rootProxyForConnectionWithRegisteredName_host_usingNameServer( + name: &NSString, + hostName: Option<&NSString>, + server: &NSPortNameServer, + ) -> Option> { + msg_send_id![ + Self::class(), + rootProxyForConnectionWithRegisteredName: name, + host: hostName, + usingNameServer: server + ] + } + pub unsafe fn serviceConnectionWithName_rootObject_usingNameServer( + name: &NSString, + root: &Object, + server: &NSPortNameServer, + ) -> Option> { + msg_send_id![ + Self::class(), + serviceConnectionWithName: name, + rootObject: root, + usingNameServer: server + ] + } + pub unsafe fn serviceConnectionWithName_rootObject( + name: &NSString, + root: &Object, + ) -> Option> { + msg_send_id![ + Self::class(), + serviceConnectionWithName: name, + rootObject: root + ] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn addRequestMode(&self, rmode: &NSString) { + msg_send![self, addRequestMode: rmode] + } + pub unsafe fn removeRequestMode(&self, rmode: &NSString) { + msg_send![self, removeRequestMode: rmode] + } + pub unsafe fn registerName(&self, name: Option<&NSString>) -> bool { + msg_send![self, registerName: name] + } + pub unsafe fn registerName_withNameServer( + &self, + name: Option<&NSString>, + server: &NSPortNameServer, + ) -> bool { + msg_send![self, registerName: name, withNameServer: server] + } + pub unsafe fn connectionWithReceivePort_sendPort( + receivePort: Option<&NSPort>, + sendPort: Option<&NSPort>, + ) -> Option> { + msg_send_id![ + Self::class(), + connectionWithReceivePort: receivePort, + sendPort: sendPort + ] + } + pub unsafe fn currentConversation() -> Option> { + msg_send_id![Self::class(), currentConversation] + } + pub unsafe fn initWithReceivePort_sendPort( + &self, + receivePort: Option<&NSPort>, + sendPort: Option<&NSPort>, + ) -> Option> { + msg_send_id![self, initWithReceivePort: receivePort, sendPort: sendPort] + } + pub unsafe fn enableMultipleThreads(&self) { + msg_send![self, enableMultipleThreads] + } + pub unsafe fn addRunLoop(&self, runloop: &NSRunLoop) { + msg_send![self, addRunLoop: runloop] + } + pub unsafe fn removeRunLoop(&self, runloop: &NSRunLoop) { + msg_send![self, removeRunLoop: runloop] + } + pub unsafe fn runInNewThread(&self) { + msg_send![self, runInNewThread] + } + pub unsafe fn dispatchWithComponents(&self, components: &NSArray) { + msg_send![self, dispatchWithComponents: components] + } + pub unsafe fn statistics(&self) -> TodoGenerics { + msg_send![self, statistics] + } + pub unsafe fn requestTimeout(&self) -> NSTimeInterval { + msg_send![self, requestTimeout] + } + pub unsafe fn setRequestTimeout(&self, requestTimeout: NSTimeInterval) { + msg_send![self, setRequestTimeout: requestTimeout] + } + pub unsafe fn replyTimeout(&self) -> NSTimeInterval { + msg_send![self, replyTimeout] + } + pub unsafe fn setReplyTimeout(&self, replyTimeout: NSTimeInterval) { + msg_send![self, setReplyTimeout: replyTimeout] + } + pub unsafe fn rootObject(&self) -> Option> { + msg_send_id![self, rootObject] + } + pub unsafe fn setRootObject(&self, rootObject: Option<&Object>) { + msg_send![self, setRootObject: rootObject] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn independentConversationQueueing(&self) -> bool { + msg_send![self, independentConversationQueueing] + } + pub unsafe fn setIndependentConversationQueueing(&self, independentConversationQueueing: bool) { + msg_send![ + self, + setIndependentConversationQueueing: independentConversationQueueing + ] + } + pub unsafe fn isValid(&self) -> bool { + msg_send![self, isValid] + } + pub unsafe fn rootProxy(&self) -> Id { + msg_send_id![self, rootProxy] + } + pub unsafe fn requestModes(&self) -> TodoGenerics { + msg_send![self, requestModes] + } + pub unsafe fn sendPort(&self) -> Id { + msg_send_id![self, sendPort] + } + pub unsafe fn receivePort(&self) -> Id { + msg_send_id![self, receivePort] + } + pub unsafe fn multipleThreadsEnabled(&self) -> bool { + msg_send![self, multipleThreadsEnabled] + } + pub unsafe fn remoteObjects(&self) -> Id { + msg_send_id![self, remoteObjects] + } + pub unsafe fn localObjects(&self) -> Id { + msg_send_id![self, localObjects] + } +} +extern_class!( + #[derive(Debug)] + struct NSDistantObjectRequest; + unsafe impl ClassType for NSDistantObjectRequest { + type Super = NSObject; + } +); +impl NSDistantObjectRequest { + pub unsafe fn replyWithException(&self, exception: Option<&NSException>) { + msg_send![self, replyWithException: exception] + } + pub unsafe fn invocation(&self) -> Id { + msg_send_id![self, invocation] + } + pub unsafe fn connection(&self) -> Id { + msg_send_id![self, connection] + } + pub unsafe fn conversation(&self) -> Id { + msg_send_id![self, conversation] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs new file mode 100644 index 000000000..decce1420 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -0,0 +1,390 @@ +extern_class!( + #[derive(Debug)] + struct NSData; + unsafe impl ClassType for NSData { + type Super = NSObject; + } +); +impl NSData { + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } + pub unsafe fn bytes(&self) -> NonNull { + msg_send![self, bytes] + } +} +#[doc = "NSExtendedData"] +impl NSData { + pub unsafe fn getBytes_length(&self, buffer: NonNull, length: NSUInteger) { + msg_send![self, getBytes: buffer, length: length] + } + pub unsafe fn getBytes_range(&self, buffer: NonNull, range: NSRange) { + msg_send![self, getBytes: buffer, range: range] + } + pub unsafe fn isEqualToData(&self, other: &NSData) -> bool { + msg_send![self, isEqualToData: other] + } + pub unsafe fn subdataWithRange(&self, range: NSRange) -> Id { + msg_send_id![self, subdataWithRange: range] + } + pub unsafe fn writeToFile_atomically(&self, path: &NSString, useAuxiliaryFile: bool) -> bool { + msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] + } + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { + msg_send![self, writeToURL: url, atomically: atomically] + } + pub unsafe fn writeToFile_options_error( + &self, + path: &NSString, + writeOptionsMask: NSDataWritingOptions, + errorPtr: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + writeToFile: path, + options: writeOptionsMask, + error: errorPtr + ] + } + pub unsafe fn writeToURL_options_error( + &self, + url: &NSURL, + writeOptionsMask: NSDataWritingOptions, + errorPtr: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + writeToURL: url, + options: writeOptionsMask, + error: errorPtr + ] + } + pub unsafe fn rangeOfData_options_range( + &self, + dataToFind: &NSData, + mask: NSDataSearchOptions, + searchRange: NSRange, + ) -> NSRange { + msg_send![ + self, + rangeOfData: dataToFind, + options: mask, + range: searchRange + ] + } + pub unsafe fn enumerateByteRangesUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateByteRangesUsingBlock: block] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } +} +#[doc = "NSDataCreation"] +impl NSData { + pub unsafe fn data() -> Id { + msg_send_id![Self::class(), data] + } + pub unsafe fn dataWithBytes_length(bytes: *mut c_void, length: NSUInteger) -> Id { + msg_send_id![Self::class(), dataWithBytes: bytes, length: length] + } + pub unsafe fn dataWithBytesNoCopy_length( + bytes: NonNull, + length: NSUInteger, + ) -> Id { + msg_send_id![Self::class(), dataWithBytesNoCopy: bytes, length: length] + } + pub unsafe fn dataWithBytesNoCopy_length_freeWhenDone( + bytes: NonNull, + length: NSUInteger, + b: bool, + ) -> Id { + msg_send_id![ + Self::class(), + dataWithBytesNoCopy: bytes, + length: length, + freeWhenDone: b + ] + } + pub unsafe fn dataWithContentsOfFile_options_error( + path: &NSString, + readOptionsMask: NSDataReadingOptions, + errorPtr: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + dataWithContentsOfFile: path, + options: readOptionsMask, + error: errorPtr + ] + } + pub unsafe fn dataWithContentsOfURL_options_error( + url: &NSURL, + readOptionsMask: NSDataReadingOptions, + errorPtr: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + dataWithContentsOfURL: url, + options: readOptionsMask, + error: errorPtr + ] + } + pub unsafe fn dataWithContentsOfFile(path: &NSString) -> Option> { + msg_send_id![Self::class(), dataWithContentsOfFile: path] + } + pub unsafe fn dataWithContentsOfURL(url: &NSURL) -> Option> { + msg_send_id![Self::class(), dataWithContentsOfURL: url] + } + pub unsafe fn initWithBytes_length( + &self, + bytes: *mut c_void, + length: NSUInteger, + ) -> Id { + msg_send_id![self, initWithBytes: bytes, length: length] + } + pub unsafe fn initWithBytesNoCopy_length( + &self, + bytes: NonNull, + length: NSUInteger, + ) -> Id { + msg_send_id![self, initWithBytesNoCopy: bytes, length: length] + } + pub unsafe fn initWithBytesNoCopy_length_freeWhenDone( + &self, + bytes: NonNull, + length: NSUInteger, + b: bool, + ) -> Id { + msg_send_id![ + self, + initWithBytesNoCopy: bytes, + length: length, + freeWhenDone: b + ] + } + pub unsafe fn initWithBytesNoCopy_length_deallocator( + &self, + bytes: NonNull, + length: NSUInteger, + deallocator: TodoBlock, + ) -> Id { + msg_send_id![ + self, + initWithBytesNoCopy: bytes, + length: length, + deallocator: deallocator + ] + } + pub unsafe fn initWithContentsOfFile_options_error( + &self, + path: &NSString, + readOptionsMask: NSDataReadingOptions, + errorPtr: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithContentsOfFile: path, + options: readOptionsMask, + error: errorPtr + ] + } + pub unsafe fn initWithContentsOfURL_options_error( + &self, + url: &NSURL, + readOptionsMask: NSDataReadingOptions, + errorPtr: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithContentsOfURL: url, + options: readOptionsMask, + error: errorPtr + ] + } + pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithContentsOfURL: url] + } + pub unsafe fn initWithData(&self, data: &NSData) -> Id { + msg_send_id![self, initWithData: data] + } + pub unsafe fn dataWithData(data: &NSData) -> Id { + msg_send_id![Self::class(), dataWithData: data] + } +} +#[doc = "NSDataBase64Encoding"] +impl NSData { + pub unsafe fn initWithBase64EncodedString_options( + &self, + base64String: &NSString, + options: NSDataBase64DecodingOptions, + ) -> Option> { + msg_send_id![ + self, + initWithBase64EncodedString: base64String, + options: options + ] + } + pub unsafe fn base64EncodedStringWithOptions( + &self, + options: NSDataBase64EncodingOptions, + ) -> Id { + msg_send_id![self, base64EncodedStringWithOptions: options] + } + pub unsafe fn initWithBase64EncodedData_options( + &self, + base64Data: &NSData, + options: NSDataBase64DecodingOptions, + ) -> Option> { + msg_send_id![ + self, + initWithBase64EncodedData: base64Data, + options: options + ] + } + pub unsafe fn base64EncodedDataWithOptions( + &self, + options: NSDataBase64EncodingOptions, + ) -> Id { + msg_send_id![self, base64EncodedDataWithOptions: options] + } +} +#[doc = "NSDataCompression"] +impl NSData { + pub unsafe fn decompressedDataUsingAlgorithm_error( + &self, + algorithm: NSDataCompressionAlgorithm, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + decompressedDataUsingAlgorithm: algorithm, + error: error + ] + } + pub unsafe fn compressedDataUsingAlgorithm_error( + &self, + algorithm: NSDataCompressionAlgorithm, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, compressedDataUsingAlgorithm: algorithm, error: error] + } +} +#[doc = "NSDeprecated"] +impl NSData { + pub unsafe fn getBytes(&self, buffer: NonNull) { + msg_send![self, getBytes: buffer] + } + pub unsafe fn dataWithContentsOfMappedFile(path: &NSString) -> Option> { + msg_send_id![Self::class(), dataWithContentsOfMappedFile: path] + } + pub unsafe fn initWithContentsOfMappedFile( + &self, + path: &NSString, + ) -> Option> { + msg_send_id![self, initWithContentsOfMappedFile: path] + } + pub unsafe fn initWithBase64Encoding( + &self, + base64String: &NSString, + ) -> Option> { + msg_send_id![self, initWithBase64Encoding: base64String] + } + pub unsafe fn base64Encoding(&self) -> Id { + msg_send_id![self, base64Encoding] + } +} +extern_class!( + #[derive(Debug)] + struct NSMutableData; + unsafe impl ClassType for NSMutableData { + type Super = NSData; + } +); +impl NSMutableData { + pub unsafe fn mutableBytes(&self) -> NonNull { + msg_send![self, mutableBytes] + } + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } + pub unsafe fn setLength(&self, length: NSUInteger) { + msg_send![self, setLength: length] + } +} +#[doc = "NSExtendedMutableData"] +impl NSMutableData { + pub unsafe fn appendBytes_length(&self, bytes: NonNull, length: NSUInteger) { + msg_send![self, appendBytes: bytes, length: length] + } + pub unsafe fn appendData(&self, other: &NSData) { + msg_send![self, appendData: other] + } + pub unsafe fn increaseLengthBy(&self, extraLength: NSUInteger) { + msg_send![self, increaseLengthBy: extraLength] + } + pub unsafe fn replaceBytesInRange_withBytes(&self, range: NSRange, bytes: NonNull) { + msg_send![self, replaceBytesInRange: range, withBytes: bytes] + } + pub unsafe fn resetBytesInRange(&self, range: NSRange) { + msg_send![self, resetBytesInRange: range] + } + pub unsafe fn setData(&self, data: &NSData) { + msg_send![self, setData: data] + } + pub unsafe fn replaceBytesInRange_withBytes_length( + &self, + range: NSRange, + replacementBytes: *mut c_void, + replacementLength: NSUInteger, + ) { + msg_send![ + self, + replaceBytesInRange: range, + withBytes: replacementBytes, + length: replacementLength + ] + } +} +#[doc = "NSMutableDataCreation"] +impl NSMutableData { + pub unsafe fn dataWithCapacity(aNumItems: NSUInteger) -> Option> { + msg_send_id![Self::class(), dataWithCapacity: aNumItems] + } + pub unsafe fn dataWithLength(length: NSUInteger) -> Option> { + msg_send_id![Self::class(), dataWithLength: length] + } + pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Option> { + msg_send_id![self, initWithCapacity: capacity] + } + pub unsafe fn initWithLength(&self, length: NSUInteger) -> Option> { + msg_send_id![self, initWithLength: length] + } +} +#[doc = "NSMutableDataCompression"] +impl NSMutableData { + pub unsafe fn decompressUsingAlgorithm_error( + &self, + algorithm: NSDataCompressionAlgorithm, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, decompressUsingAlgorithm: algorithm, error: error] + } + pub unsafe fn compressUsingAlgorithm_error( + &self, + algorithm: NSDataCompressionAlgorithm, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, compressUsingAlgorithm: algorithm, error: error] + } +} +extern_class!( + #[derive(Debug)] + struct NSPurgeableData; + unsafe impl ClassType for NSPurgeableData { + type Super = NSMutableData; + } +); +impl NSPurgeableData {} diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs new file mode 100644 index 000000000..5315d6ccd --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -0,0 +1,110 @@ +extern_class!( + #[derive(Debug)] + struct NSDate; + unsafe impl ClassType for NSDate { + type Super = NSObject; + } +); +impl NSDate { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithTimeIntervalSinceReferenceDate( + &self, + ti: NSTimeInterval, + ) -> Id { + msg_send_id![self, initWithTimeIntervalSinceReferenceDate: ti] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval { + msg_send![self, timeIntervalSinceReferenceDate] + } +} +#[doc = "NSExtendedDate"] +impl NSDate { + pub unsafe fn timeIntervalSinceDate(&self, anotherDate: &NSDate) -> NSTimeInterval { + msg_send![self, timeIntervalSinceDate: anotherDate] + } + pub unsafe fn addTimeInterval(&self, seconds: NSTimeInterval) -> Id { + msg_send_id![self, addTimeInterval: seconds] + } + pub unsafe fn dateByAddingTimeInterval(&self, ti: NSTimeInterval) -> Id { + msg_send_id![self, dateByAddingTimeInterval: ti] + } + pub unsafe fn earlierDate(&self, anotherDate: &NSDate) -> Id { + msg_send_id![self, earlierDate: anotherDate] + } + pub unsafe fn laterDate(&self, anotherDate: &NSDate) -> Id { + msg_send_id![self, laterDate: anotherDate] + } + pub unsafe fn compare(&self, other: &NSDate) -> NSComparisonResult { + msg_send![self, compare: other] + } + pub unsafe fn isEqualToDate(&self, otherDate: &NSDate) -> bool { + msg_send![self, isEqualToDate: otherDate] + } + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn timeIntervalSinceNow(&self) -> NSTimeInterval { + msg_send![self, timeIntervalSinceNow] + } + pub unsafe fn timeIntervalSince1970(&self) -> NSTimeInterval { + msg_send![self, timeIntervalSince1970] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn timeIntervalSinceReferenceDate() -> NSTimeInterval { + msg_send![Self::class(), timeIntervalSinceReferenceDate] + } +} +#[doc = "NSDateCreation"] +impl NSDate { + pub unsafe fn date() -> Id { + msg_send_id![Self::class(), date] + } + pub unsafe fn dateWithTimeIntervalSinceNow(secs: NSTimeInterval) -> Id { + msg_send_id![Self::class(), dateWithTimeIntervalSinceNow: secs] + } + pub unsafe fn dateWithTimeIntervalSinceReferenceDate(ti: NSTimeInterval) -> Id { + msg_send_id![Self::class(), dateWithTimeIntervalSinceReferenceDate: ti] + } + pub unsafe fn dateWithTimeIntervalSince1970(secs: NSTimeInterval) -> Id { + msg_send_id![Self::class(), dateWithTimeIntervalSince1970: secs] + } + pub unsafe fn dateWithTimeInterval_sinceDate( + secsToBeAdded: NSTimeInterval, + date: &NSDate, + ) -> Id { + msg_send_id![ + Self::class(), + dateWithTimeInterval: secsToBeAdded, + sinceDate: date + ] + } + pub unsafe fn initWithTimeIntervalSinceNow(&self, secs: NSTimeInterval) -> Id { + msg_send_id![self, initWithTimeIntervalSinceNow: secs] + } + pub unsafe fn initWithTimeIntervalSince1970(&self, secs: NSTimeInterval) -> Id { + msg_send_id![self, initWithTimeIntervalSince1970: secs] + } + pub unsafe fn initWithTimeInterval_sinceDate( + &self, + secsToBeAdded: NSTimeInterval, + date: &NSDate, + ) -> Id { + msg_send_id![self, initWithTimeInterval: secsToBeAdded, sinceDate: date] + } + pub unsafe fn distantFuture() -> Id { + msg_send_id![Self::class(), distantFuture] + } + pub unsafe fn distantPast() -> Id { + msg_send_id![Self::class(), distantPast] + } + pub unsafe fn now() -> Id { + msg_send_id![Self::class(), now] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs new file mode 100644 index 000000000..0c7a44a21 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -0,0 +1,132 @@ +extern_class!( + #[derive(Debug)] + struct NSDateComponentsFormatter; + unsafe impl ClassType for NSDateComponentsFormatter { + type Super = NSFormatter; + } +); +impl NSDateComponentsFormatter { + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } + pub unsafe fn stringFromDateComponents( + &self, + components: &NSDateComponents, + ) -> Option> { + msg_send_id![self, stringFromDateComponents: components] + } + pub unsafe fn stringFromDate_toDate( + &self, + startDate: &NSDate, + endDate: &NSDate, + ) -> Option> { + msg_send_id![self, stringFromDate: startDate, toDate: endDate] + } + pub unsafe fn stringFromTimeInterval( + &self, + ti: NSTimeInterval, + ) -> Option> { + msg_send_id![self, stringFromTimeInterval: ti] + } + pub unsafe fn localizedStringFromDateComponents_unitsStyle( + components: &NSDateComponents, + unitsStyle: NSDateComponentsFormatterUnitsStyle, + ) -> Option> { + msg_send_id![ + Self::class(), + localizedStringFromDateComponents: components, + unitsStyle: unitsStyle + ] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: *mut Option<&Object>, + string: &NSString, + error: *mut Option<&NSString>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } + pub unsafe fn unitsStyle(&self) -> NSDateComponentsFormatterUnitsStyle { + msg_send![self, unitsStyle] + } + pub unsafe fn setUnitsStyle(&self, unitsStyle: NSDateComponentsFormatterUnitsStyle) { + msg_send![self, setUnitsStyle: unitsStyle] + } + pub unsafe fn allowedUnits(&self) -> NSCalendarUnit { + msg_send![self, allowedUnits] + } + pub unsafe fn setAllowedUnits(&self, allowedUnits: NSCalendarUnit) { + msg_send![self, setAllowedUnits: allowedUnits] + } + pub unsafe fn zeroFormattingBehavior(&self) -> NSDateComponentsFormatterZeroFormattingBehavior { + msg_send![self, zeroFormattingBehavior] + } + pub unsafe fn setZeroFormattingBehavior( + &self, + zeroFormattingBehavior: NSDateComponentsFormatterZeroFormattingBehavior, + ) { + msg_send![self, setZeroFormattingBehavior: zeroFormattingBehavior] + } + pub unsafe fn calendar(&self) -> Option> { + msg_send_id![self, calendar] + } + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { + msg_send![self, setCalendar: calendar] + } + pub unsafe fn referenceDate(&self) -> Option> { + msg_send_id![self, referenceDate] + } + pub unsafe fn setReferenceDate(&self, referenceDate: Option<&NSDate>) { + msg_send![self, setReferenceDate: referenceDate] + } + pub unsafe fn allowsFractionalUnits(&self) -> bool { + msg_send![self, allowsFractionalUnits] + } + pub unsafe fn setAllowsFractionalUnits(&self, allowsFractionalUnits: bool) { + msg_send![self, setAllowsFractionalUnits: allowsFractionalUnits] + } + pub unsafe fn maximumUnitCount(&self) -> NSInteger { + msg_send![self, maximumUnitCount] + } + pub unsafe fn setMaximumUnitCount(&self, maximumUnitCount: NSInteger) { + msg_send![self, setMaximumUnitCount: maximumUnitCount] + } + pub unsafe fn collapsesLargestUnit(&self) -> bool { + msg_send![self, collapsesLargestUnit] + } + pub unsafe fn setCollapsesLargestUnit(&self, collapsesLargestUnit: bool) { + msg_send![self, setCollapsesLargestUnit: collapsesLargestUnit] + } + pub unsafe fn includesApproximationPhrase(&self) -> bool { + msg_send![self, includesApproximationPhrase] + } + pub unsafe fn setIncludesApproximationPhrase(&self, includesApproximationPhrase: bool) { + msg_send![ + self, + setIncludesApproximationPhrase: includesApproximationPhrase + ] + } + pub unsafe fn includesTimeRemainingPhrase(&self) -> bool { + msg_send![self, includesTimeRemainingPhrase] + } + pub unsafe fn setIncludesTimeRemainingPhrase(&self, includesTimeRemainingPhrase: bool) { + msg_send![ + self, + setIncludesTimeRemainingPhrase: includesTimeRemainingPhrase + ] + } + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs new file mode 100644 index 000000000..bebbad93d --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -0,0 +1,313 @@ +extern_class!( + #[derive(Debug)] + struct NSDateFormatter; + unsafe impl ClassType for NSDateFormatter { + type Super = NSFormatter; + } +); +impl NSDateFormatter { + pub unsafe fn getObjectValue_forString_range_error( + &self, + obj: *mut Option<&Object>, + string: &NSString, + rangep: *mut NSRange, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + range: rangep, + error: error + ] + } + pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id { + msg_send_id![self, stringFromDate: date] + } + pub unsafe fn dateFromString(&self, string: &NSString) -> Option> { + msg_send_id![self, dateFromString: string] + } + pub unsafe fn localizedStringFromDate_dateStyle_timeStyle( + date: &NSDate, + dstyle: NSDateFormatterStyle, + tstyle: NSDateFormatterStyle, + ) -> Id { + msg_send_id![ + Self::class(), + localizedStringFromDate: date, + dateStyle: dstyle, + timeStyle: tstyle + ] + } + pub unsafe fn dateFormatFromTemplate_options_locale( + tmplate: &NSString, + opts: NSUInteger, + locale: Option<&NSLocale>, + ) -> Option> { + msg_send_id![ + Self::class(), + dateFormatFromTemplate: tmplate, + options: opts, + locale: locale + ] + } + pub unsafe fn setLocalizedDateFormatFromTemplate(&self, dateFormatTemplate: &NSString) { + msg_send![self, setLocalizedDateFormatFromTemplate: dateFormatTemplate] + } + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } + pub unsafe fn defaultFormatterBehavior() -> NSDateFormatterBehavior { + msg_send![Self::class(), defaultFormatterBehavior] + } + pub unsafe fn setDefaultFormatterBehavior(defaultFormatterBehavior: NSDateFormatterBehavior) { + msg_send![ + Self::class(), + setDefaultFormatterBehavior: defaultFormatterBehavior + ] + } + pub unsafe fn dateFormat(&self) -> Id { + msg_send_id![self, dateFormat] + } + pub unsafe fn setDateFormat(&self, dateFormat: Option<&NSString>) { + msg_send![self, setDateFormat: dateFormat] + } + pub unsafe fn dateStyle(&self) -> NSDateFormatterStyle { + msg_send![self, dateStyle] + } + pub unsafe fn setDateStyle(&self, dateStyle: NSDateFormatterStyle) { + msg_send![self, setDateStyle: dateStyle] + } + pub unsafe fn timeStyle(&self) -> NSDateFormatterStyle { + msg_send![self, timeStyle] + } + pub unsafe fn setTimeStyle(&self, timeStyle: NSDateFormatterStyle) { + msg_send![self, setTimeStyle: timeStyle] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn generatesCalendarDates(&self) -> bool { + msg_send![self, generatesCalendarDates] + } + pub unsafe fn setGeneratesCalendarDates(&self, generatesCalendarDates: bool) { + msg_send![self, setGeneratesCalendarDates: generatesCalendarDates] + } + pub unsafe fn formatterBehavior(&self) -> NSDateFormatterBehavior { + msg_send![self, formatterBehavior] + } + pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSDateFormatterBehavior) { + msg_send![self, setFormatterBehavior: formatterBehavior] + } + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn calendar(&self) -> Id { + msg_send_id![self, calendar] + } + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { + msg_send![self, setCalendar: calendar] + } + pub unsafe fn isLenient(&self) -> bool { + msg_send![self, isLenient] + } + pub unsafe fn setLenient(&self, lenient: bool) { + msg_send![self, setLenient: lenient] + } + pub unsafe fn twoDigitStartDate(&self) -> Option> { + msg_send_id![self, twoDigitStartDate] + } + pub unsafe fn setTwoDigitStartDate(&self, twoDigitStartDate: Option<&NSDate>) { + msg_send![self, setTwoDigitStartDate: twoDigitStartDate] + } + pub unsafe fn defaultDate(&self) -> Option> { + msg_send_id![self, defaultDate] + } + pub unsafe fn setDefaultDate(&self, defaultDate: Option<&NSDate>) { + msg_send![self, setDefaultDate: defaultDate] + } + pub unsafe fn eraSymbols(&self) -> TodoGenerics { + msg_send![self, eraSymbols] + } + pub unsafe fn setEraSymbols(&self, eraSymbols: TodoGenerics) { + msg_send![self, setEraSymbols: eraSymbols] + } + pub unsafe fn monthSymbols(&self) -> TodoGenerics { + msg_send![self, monthSymbols] + } + pub unsafe fn setMonthSymbols(&self, monthSymbols: TodoGenerics) { + msg_send![self, setMonthSymbols: monthSymbols] + } + pub unsafe fn shortMonthSymbols(&self) -> TodoGenerics { + msg_send![self, shortMonthSymbols] + } + pub unsafe fn setShortMonthSymbols(&self, shortMonthSymbols: TodoGenerics) { + msg_send![self, setShortMonthSymbols: shortMonthSymbols] + } + pub unsafe fn weekdaySymbols(&self) -> TodoGenerics { + msg_send![self, weekdaySymbols] + } + pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: TodoGenerics) { + msg_send![self, setWeekdaySymbols: weekdaySymbols] + } + pub unsafe fn shortWeekdaySymbols(&self) -> TodoGenerics { + msg_send![self, shortWeekdaySymbols] + } + pub unsafe fn setShortWeekdaySymbols(&self, shortWeekdaySymbols: TodoGenerics) { + msg_send![self, setShortWeekdaySymbols: shortWeekdaySymbols] + } + pub unsafe fn AMSymbol(&self) -> Id { + msg_send_id![self, AMSymbol] + } + pub unsafe fn setAMSymbol(&self, AMSymbol: Option<&NSString>) { + msg_send![self, setAMSymbol: AMSymbol] + } + pub unsafe fn PMSymbol(&self) -> Id { + msg_send_id![self, PMSymbol] + } + pub unsafe fn setPMSymbol(&self, PMSymbol: Option<&NSString>) { + msg_send![self, setPMSymbol: PMSymbol] + } + pub unsafe fn longEraSymbols(&self) -> TodoGenerics { + msg_send![self, longEraSymbols] + } + pub unsafe fn setLongEraSymbols(&self, longEraSymbols: TodoGenerics) { + msg_send![self, setLongEraSymbols: longEraSymbols] + } + pub unsafe fn veryShortMonthSymbols(&self) -> TodoGenerics { + msg_send![self, veryShortMonthSymbols] + } + pub unsafe fn setVeryShortMonthSymbols(&self, veryShortMonthSymbols: TodoGenerics) { + msg_send![self, setVeryShortMonthSymbols: veryShortMonthSymbols] + } + pub unsafe fn standaloneMonthSymbols(&self) -> TodoGenerics { + msg_send![self, standaloneMonthSymbols] + } + pub unsafe fn setStandaloneMonthSymbols(&self, standaloneMonthSymbols: TodoGenerics) { + msg_send![self, setStandaloneMonthSymbols: standaloneMonthSymbols] + } + pub unsafe fn shortStandaloneMonthSymbols(&self) -> TodoGenerics { + msg_send![self, shortStandaloneMonthSymbols] + } + pub unsafe fn setShortStandaloneMonthSymbols(&self, shortStandaloneMonthSymbols: TodoGenerics) { + msg_send![ + self, + setShortStandaloneMonthSymbols: shortStandaloneMonthSymbols + ] + } + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> TodoGenerics { + msg_send![self, veryShortStandaloneMonthSymbols] + } + pub unsafe fn setVeryShortStandaloneMonthSymbols( + &self, + veryShortStandaloneMonthSymbols: TodoGenerics, + ) { + msg_send![ + self, + setVeryShortStandaloneMonthSymbols: veryShortStandaloneMonthSymbols + ] + } + pub unsafe fn veryShortWeekdaySymbols(&self) -> TodoGenerics { + msg_send![self, veryShortWeekdaySymbols] + } + pub unsafe fn setVeryShortWeekdaySymbols(&self, veryShortWeekdaySymbols: TodoGenerics) { + msg_send![self, setVeryShortWeekdaySymbols: veryShortWeekdaySymbols] + } + pub unsafe fn standaloneWeekdaySymbols(&self) -> TodoGenerics { + msg_send![self, standaloneWeekdaySymbols] + } + pub unsafe fn setStandaloneWeekdaySymbols(&self, standaloneWeekdaySymbols: TodoGenerics) { + msg_send![self, setStandaloneWeekdaySymbols: standaloneWeekdaySymbols] + } + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> TodoGenerics { + msg_send![self, shortStandaloneWeekdaySymbols] + } + pub unsafe fn setShortStandaloneWeekdaySymbols( + &self, + shortStandaloneWeekdaySymbols: TodoGenerics, + ) { + msg_send![ + self, + setShortStandaloneWeekdaySymbols: shortStandaloneWeekdaySymbols + ] + } + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> TodoGenerics { + msg_send![self, veryShortStandaloneWeekdaySymbols] + } + pub unsafe fn setVeryShortStandaloneWeekdaySymbols( + &self, + veryShortStandaloneWeekdaySymbols: TodoGenerics, + ) { + msg_send![ + self, + setVeryShortStandaloneWeekdaySymbols: veryShortStandaloneWeekdaySymbols + ] + } + pub unsafe fn quarterSymbols(&self) -> TodoGenerics { + msg_send![self, quarterSymbols] + } + pub unsafe fn setQuarterSymbols(&self, quarterSymbols: TodoGenerics) { + msg_send![self, setQuarterSymbols: quarterSymbols] + } + pub unsafe fn shortQuarterSymbols(&self) -> TodoGenerics { + msg_send![self, shortQuarterSymbols] + } + pub unsafe fn setShortQuarterSymbols(&self, shortQuarterSymbols: TodoGenerics) { + msg_send![self, setShortQuarterSymbols: shortQuarterSymbols] + } + pub unsafe fn standaloneQuarterSymbols(&self) -> TodoGenerics { + msg_send![self, standaloneQuarterSymbols] + } + pub unsafe fn setStandaloneQuarterSymbols(&self, standaloneQuarterSymbols: TodoGenerics) { + msg_send![self, setStandaloneQuarterSymbols: standaloneQuarterSymbols] + } + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> TodoGenerics { + msg_send![self, shortStandaloneQuarterSymbols] + } + pub unsafe fn setShortStandaloneQuarterSymbols( + &self, + shortStandaloneQuarterSymbols: TodoGenerics, + ) { + msg_send![ + self, + setShortStandaloneQuarterSymbols: shortStandaloneQuarterSymbols + ] + } + pub unsafe fn gregorianStartDate(&self) -> Option> { + msg_send_id![self, gregorianStartDate] + } + pub unsafe fn setGregorianStartDate(&self, gregorianStartDate: Option<&NSDate>) { + msg_send![self, setGregorianStartDate: gregorianStartDate] + } + pub unsafe fn doesRelativeDateFormatting(&self) -> bool { + msg_send![self, doesRelativeDateFormatting] + } + pub unsafe fn setDoesRelativeDateFormatting(&self, doesRelativeDateFormatting: bool) { + msg_send![ + self, + setDoesRelativeDateFormatting: doesRelativeDateFormatting + ] + } +} +#[doc = "NSDateFormatterCompatibility"] +impl NSDateFormatter { + pub unsafe fn initWithDateFormat_allowNaturalLanguage( + &self, + format: &NSString, + flag: bool, + ) -> Id { + msg_send_id![self, initWithDateFormat: format, allowNaturalLanguage: flag] + } + pub unsafe fn allowsNaturalLanguage(&self) -> bool { + msg_send![self, allowsNaturalLanguage] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs new file mode 100644 index 000000000..2523d86ba --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -0,0 +1,56 @@ +extern_class!( + #[derive(Debug)] + struct NSDateInterval; + unsafe impl ClassType for NSDateInterval { + type Super = NSObject; + } +); +impl NSDateInterval { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn initWithStartDate_duration( + &self, + startDate: &NSDate, + duration: NSTimeInterval, + ) -> Id { + msg_send_id![self, initWithStartDate: startDate, duration: duration] + } + pub unsafe fn initWithStartDate_endDate( + &self, + startDate: &NSDate, + endDate: &NSDate, + ) -> Id { + msg_send_id![self, initWithStartDate: startDate, endDate: endDate] + } + pub unsafe fn compare(&self, dateInterval: &NSDateInterval) -> NSComparisonResult { + msg_send![self, compare: dateInterval] + } + pub unsafe fn isEqualToDateInterval(&self, dateInterval: &NSDateInterval) -> bool { + msg_send![self, isEqualToDateInterval: dateInterval] + } + pub unsafe fn intersectsDateInterval(&self, dateInterval: &NSDateInterval) -> bool { + msg_send![self, intersectsDateInterval: dateInterval] + } + pub unsafe fn intersectionWithDateInterval( + &self, + dateInterval: &NSDateInterval, + ) -> Option> { + msg_send_id![self, intersectionWithDateInterval: dateInterval] + } + pub unsafe fn containsDate(&self, date: &NSDate) -> bool { + msg_send![self, containsDate: date] + } + pub unsafe fn startDate(&self) -> Id { + msg_send_id![self, startDate] + } + pub unsafe fn endDate(&self) -> Id { + msg_send_id![self, endDate] + } + pub unsafe fn duration(&self) -> NSTimeInterval { + msg_send![self, duration] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs new file mode 100644 index 000000000..cbabcea51 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -0,0 +1,58 @@ +extern_class!( + #[derive(Debug)] + struct NSDateIntervalFormatter; + unsafe impl ClassType for NSDateIntervalFormatter { + type Super = NSFormatter; + } +); +impl NSDateIntervalFormatter { + pub unsafe fn stringFromDate_toDate( + &self, + fromDate: &NSDate, + toDate: &NSDate, + ) -> Id { + msg_send_id![self, stringFromDate: fromDate, toDate: toDate] + } + pub unsafe fn stringFromDateInterval( + &self, + dateInterval: &NSDateInterval, + ) -> Option> { + msg_send_id![self, stringFromDateInterval: dateInterval] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn calendar(&self) -> Id { + msg_send_id![self, calendar] + } + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { + msg_send![self, setCalendar: calendar] + } + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn dateTemplate(&self) -> Id { + msg_send_id![self, dateTemplate] + } + pub unsafe fn setDateTemplate(&self, dateTemplate: Option<&NSString>) { + msg_send![self, setDateTemplate: dateTemplate] + } + pub unsafe fn dateStyle(&self) -> NSDateIntervalFormatterStyle { + msg_send![self, dateStyle] + } + pub unsafe fn setDateStyle(&self, dateStyle: NSDateIntervalFormatterStyle) { + msg_send![self, setDateStyle: dateStyle] + } + pub unsafe fn timeStyle(&self) -> NSDateIntervalFormatterStyle { + msg_send![self, timeStyle] + } + pub unsafe fn setTimeStyle(&self, timeStyle: NSDateIntervalFormatterStyle) { + msg_send![self, setTimeStyle: timeStyle] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs new file mode 100644 index 000000000..e63c07765 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -0,0 +1,270 @@ +extern_class!( + #[derive(Debug)] + struct NSDecimalNumber; + unsafe impl ClassType for NSDecimalNumber { + type Super = NSNumber; + } +); +impl NSDecimalNumber { + pub unsafe fn initWithMantissa_exponent_isNegative( + &self, + mantissa: c_ulonglong, + exponent: c_short, + flag: bool, + ) -> Id { + msg_send_id![ + self, + initWithMantissa: mantissa, + exponent: exponent, + isNegative: flag + ] + } + pub unsafe fn initWithDecimal(&self, dcm: NSDecimal) -> Id { + msg_send_id![self, initWithDecimal: dcm] + } + pub unsafe fn initWithString(&self, numberValue: Option<&NSString>) -> Id { + msg_send_id![self, initWithString: numberValue] + } + pub unsafe fn initWithString_locale( + &self, + numberValue: Option<&NSString>, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, initWithString: numberValue, locale: locale] + } + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn decimalNumberWithMantissa_exponent_isNegative( + mantissa: c_ulonglong, + exponent: c_short, + flag: bool, + ) -> Id { + msg_send_id![ + Self::class(), + decimalNumberWithMantissa: mantissa, + exponent: exponent, + isNegative: flag + ] + } + pub unsafe fn decimalNumberWithDecimal(dcm: NSDecimal) -> Id { + msg_send_id![Self::class(), decimalNumberWithDecimal: dcm] + } + pub unsafe fn decimalNumberWithString( + numberValue: Option<&NSString>, + ) -> Id { + msg_send_id![Self::class(), decimalNumberWithString: numberValue] + } + pub unsafe fn decimalNumberWithString_locale( + numberValue: Option<&NSString>, + locale: Option<&Object>, + ) -> Id { + msg_send_id![ + Self::class(), + decimalNumberWithString: numberValue, + locale: locale + ] + } + pub unsafe fn decimalNumberByAdding( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id { + msg_send_id![self, decimalNumberByAdding: decimalNumber] + } + pub unsafe fn decimalNumberByAdding_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + decimalNumberByAdding: decimalNumber, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberBySubtracting( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id { + msg_send_id![self, decimalNumberBySubtracting: decimalNumber] + } + pub unsafe fn decimalNumberBySubtracting_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + decimalNumberBySubtracting: decimalNumber, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberByMultiplyingBy( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id { + msg_send_id![self, decimalNumberByMultiplyingBy: decimalNumber] + } + pub unsafe fn decimalNumberByMultiplyingBy_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + decimalNumberByMultiplyingBy: decimalNumber, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberByDividingBy( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id { + msg_send_id![self, decimalNumberByDividingBy: decimalNumber] + } + pub unsafe fn decimalNumberByDividingBy_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + decimalNumberByDividingBy: decimalNumber, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberByRaisingToPower( + &self, + power: NSUInteger, + ) -> Id { + msg_send_id![self, decimalNumberByRaisingToPower: power] + } + pub unsafe fn decimalNumberByRaisingToPower_withBehavior( + &self, + power: NSUInteger, + behavior: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + decimalNumberByRaisingToPower: power, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberByMultiplyingByPowerOf10( + &self, + power: c_short, + ) -> Id { + msg_send_id![self, decimalNumberByMultiplyingByPowerOf10: power] + } + pub unsafe fn decimalNumberByMultiplyingByPowerOf10_withBehavior( + &self, + power: c_short, + behavior: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + decimalNumberByMultiplyingByPowerOf10: power, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberByRoundingAccordingToBehavior( + &self, + behavior: TodoGenerics, + ) -> Id { + msg_send_id![self, decimalNumberByRoundingAccordingToBehavior: behavior] + } + pub unsafe fn compare(&self, decimalNumber: &NSNumber) -> NSComparisonResult { + msg_send![self, compare: decimalNumber] + } + pub unsafe fn decimalValue(&self) -> NSDecimal { + msg_send![self, decimalValue] + } + pub unsafe fn zero() -> Id { + msg_send_id![Self::class(), zero] + } + pub unsafe fn one() -> Id { + msg_send_id![Self::class(), one] + } + pub unsafe fn minimumDecimalNumber() -> Id { + msg_send_id![Self::class(), minimumDecimalNumber] + } + pub unsafe fn maximumDecimalNumber() -> Id { + msg_send_id![Self::class(), maximumDecimalNumber] + } + pub unsafe fn notANumber() -> Id { + msg_send_id![Self::class(), notANumber] + } + pub unsafe fn defaultBehavior() -> TodoGenerics { + msg_send![Self::class(), defaultBehavior] + } + pub unsafe fn setDefaultBehavior(defaultBehavior: TodoGenerics) { + msg_send![Self::class(), setDefaultBehavior: defaultBehavior] + } + pub unsafe fn objCType(&self) -> NonNull { + msg_send![self, objCType] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } +} +extern_class!( + #[derive(Debug)] + struct NSDecimalNumberHandler; + unsafe impl ClassType for NSDecimalNumberHandler { + type Super = NSObject; + } +); +impl NSDecimalNumberHandler { + pub unsafe fn initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( + &self, + roundingMode: NSRoundingMode, + scale: c_short, + exact: bool, + overflow: bool, + underflow: bool, + divideByZero: bool, + ) -> Id { + msg_send_id![ + self, + initWithRoundingMode: roundingMode, + scale: scale, + raiseOnExactness: exact, + raiseOnOverflow: overflow, + raiseOnUnderflow: underflow, + raiseOnDivideByZero: divideByZero + ] + } + pub unsafe fn decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( + roundingMode: NSRoundingMode, + scale: c_short, + exact: bool, + overflow: bool, + underflow: bool, + divideByZero: bool, + ) -> Id { + msg_send_id![ + Self::class(), + decimalNumberHandlerWithRoundingMode: roundingMode, + scale: scale, + raiseOnExactness: exact, + raiseOnOverflow: overflow, + raiseOnUnderflow: underflow, + raiseOnDivideByZero: divideByZero + ] + } + pub unsafe fn defaultDecimalNumberHandler() -> Id { + msg_send_id![Self::class(), defaultDecimalNumberHandler] + } +} +#[doc = "NSDecimalNumberExtensions"] +impl NSNumber { + pub unsafe fn decimalValue(&self) -> NSDecimal { + msg_send![self, decimalValue] + } +} +#[doc = "NSDecimalNumberScanning"] +impl NSScanner { + pub unsafe fn scanDecimal(&self, dcm: *mut NSDecimal) -> bool { + msg_send![self, scanDecimal: dcm] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs new file mode 100644 index 000000000..811072b9a --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -0,0 +1,307 @@ +extern_class!( + #[derive(Debug)] + struct NSDictionary; + unsafe impl ClassType for NSDictionary { + type Super = NSObject; + } +); +impl NSDictionary { + pub unsafe fn objectForKey(&self, aKey: KeyType) -> ObjectType { + msg_send![self, objectForKey: aKey] + } + pub unsafe fn keyEnumerator(&self) -> TodoGenerics { + msg_send![self, keyEnumerator] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithObjects_forKeys_count( + &self, + objects: TodoArray, + keys: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![self, initWithObjects: objects, forKeys: keys, count: cnt] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } +} +#[doc = "NSExtendedDictionary"] +impl NSDictionary { + pub unsafe fn allKeysForObject(&self, anObject: ObjectType) -> TodoGenerics { + msg_send![self, allKeysForObject: anObject] + } + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn descriptionWithLocale_indent( + &self, + locale: Option<&Object>, + level: NSUInteger, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale, indent: level] + } + pub unsafe fn isEqualToDictionary(&self, otherDictionary: TodoGenerics) -> bool { + msg_send![self, isEqualToDictionary: otherDictionary] + } + pub unsafe fn objectEnumerator(&self) -> TodoGenerics { + msg_send![self, objectEnumerator] + } + pub unsafe fn objectsForKeys_notFoundMarker( + &self, + keys: TodoGenerics, + marker: ObjectType, + ) -> TodoGenerics { + msg_send![self, objectsForKeys: keys, notFoundMarker: marker] + } + pub unsafe fn writeToURL_error(&self, url: &NSURL, error: *mut Option<&NSError>) -> bool { + msg_send![self, writeToURL: url, error: error] + } + pub unsafe fn keysSortedByValueUsingSelector(&self, comparator: Sel) -> TodoGenerics { + msg_send![self, keysSortedByValueUsingSelector: comparator] + } + pub unsafe fn getObjects_andKeys_count( + &self, + objects: TodoArray, + keys: TodoArray, + count: NSUInteger, + ) { + msg_send![self, getObjects: objects, andKeys: keys, count: count] + } + pub unsafe fn objectForKeyedSubscript(&self, key: KeyType) -> ObjectType { + msg_send![self, objectForKeyedSubscript: key] + } + pub unsafe fn enumerateKeysAndObjectsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateKeysAndObjectsUsingBlock: block] + } + pub unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateKeysAndObjectsWithOptions: opts, + usingBlock: block + ] + } + pub unsafe fn keysSortedByValueUsingComparator(&self, cmptr: NSComparator) -> TodoGenerics { + msg_send![self, keysSortedByValueUsingComparator: cmptr] + } + pub unsafe fn keysSortedByValueWithOptions_usingComparator( + &self, + opts: NSSortOptions, + cmptr: NSComparator, + ) -> TodoGenerics { + msg_send![ + self, + keysSortedByValueWithOptions: opts, + usingComparator: cmptr + ] + } + pub unsafe fn keysOfEntriesPassingTest(&self, predicate: TodoBlock) -> TodoGenerics { + msg_send![self, keysOfEntriesPassingTest: predicate] + } + pub unsafe fn keysOfEntriesWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> TodoGenerics { + msg_send![self, keysOfEntriesWithOptions: opts, passingTest: predicate] + } + pub unsafe fn allKeys(&self) -> TodoGenerics { + msg_send![self, allKeys] + } + pub unsafe fn allValues(&self) -> TodoGenerics { + msg_send![self, allValues] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn descriptionInStringsFileFormat(&self) -> Id { + msg_send_id![self, descriptionInStringsFileFormat] + } +} +#[doc = "NSDeprecated"] +impl NSDictionary { + pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray) { + msg_send![self, getObjects: objects, andKeys: keys] + } + pub unsafe fn dictionaryWithContentsOfFile(path: &NSString) -> TodoGenerics { + msg_send![Self::class(), dictionaryWithContentsOfFile: path] + } + pub unsafe fn dictionaryWithContentsOfURL(url: &NSURL) -> TodoGenerics { + msg_send![Self::class(), dictionaryWithContentsOfURL: url] + } + pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> TodoGenerics { + msg_send![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> TodoGenerics { + msg_send![self, initWithContentsOfURL: url] + } + pub unsafe fn writeToFile_atomically(&self, path: &NSString, useAuxiliaryFile: bool) -> bool { + msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] + } + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { + msg_send![self, writeToURL: url, atomically: atomically] + } +} +#[doc = "NSDictionaryCreation"] +impl NSDictionary { + pub unsafe fn dictionary() -> Id { + msg_send_id![Self::class(), dictionary] + } + pub unsafe fn dictionaryWithObject_forKey( + object: ObjectType, + key: TodoGenerics, + ) -> Id { + msg_send_id![Self::class(), dictionaryWithObject: object, forKey: key] + } + pub unsafe fn dictionaryWithObjects_forKeys_count( + objects: TodoArray, + keys: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![ + Self::class(), + dictionaryWithObjects: objects, + forKeys: keys, + count: cnt + ] + } + pub unsafe fn dictionaryWithDictionary(dict: TodoGenerics) -> Id { + msg_send_id![Self::class(), dictionaryWithDictionary: dict] + } + pub unsafe fn dictionaryWithObjects_forKeys( + objects: TodoGenerics, + keys: TodoGenerics, + ) -> Id { + msg_send_id![Self::class(), dictionaryWithObjects: objects, forKeys: keys] + } + pub unsafe fn initWithDictionary(&self, otherDictionary: TodoGenerics) -> Id { + msg_send_id![self, initWithDictionary: otherDictionary] + } + pub unsafe fn initWithDictionary_copyItems( + &self, + otherDictionary: TodoGenerics, + flag: bool, + ) -> Id { + msg_send_id![self, initWithDictionary: otherDictionary, copyItems: flag] + } + pub unsafe fn initWithObjects_forKeys( + &self, + objects: TodoGenerics, + keys: TodoGenerics, + ) -> Id { + msg_send_id![self, initWithObjects: objects, forKeys: keys] + } + pub unsafe fn initWithContentsOfURL_error( + &self, + url: &NSURL, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![self, initWithContentsOfURL: url, error: error] + } + pub unsafe fn dictionaryWithContentsOfURL_error( + url: &NSURL, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![ + Self::class(), + dictionaryWithContentsOfURL: url, + error: error + ] + } +} +extern_class!( + #[derive(Debug)] + struct NSMutableDictionary; + unsafe impl ClassType for NSMutableDictionary { + type Super = NSDictionary; + } +); +impl NSMutableDictionary { + pub unsafe fn removeObjectForKey(&self, aKey: KeyType) { + msg_send![self, removeObjectForKey: aKey] + } + pub unsafe fn setObject_forKey(&self, anObject: ObjectType, aKey: TodoGenerics) { + msg_send![self, setObject: anObject, forKey: aKey] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: numItems] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } +} +#[doc = "NSExtendedMutableDictionary"] +impl NSMutableDictionary { + pub unsafe fn addEntriesFromDictionary(&self, otherDictionary: TodoGenerics) { + msg_send![self, addEntriesFromDictionary: otherDictionary] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn removeObjectsForKeys(&self, keyArray: TodoGenerics) { + msg_send![self, removeObjectsForKeys: keyArray] + } + pub unsafe fn setDictionary(&self, otherDictionary: TodoGenerics) { + msg_send![self, setDictionary: otherDictionary] + } + pub unsafe fn setObject_forKeyedSubscript(&self, obj: ObjectType, key: TodoGenerics) { + msg_send![self, setObject: obj, forKeyedSubscript: key] + } +} +#[doc = "NSMutableDictionaryCreation"] +impl NSMutableDictionary { + pub unsafe fn dictionaryWithCapacity(numItems: NSUInteger) -> Id { + msg_send_id![Self::class(), dictionaryWithCapacity: numItems] + } + pub unsafe fn dictionaryWithContentsOfFile(path: &NSString) -> TodoGenerics { + msg_send![Self::class(), dictionaryWithContentsOfFile: path] + } + pub unsafe fn dictionaryWithContentsOfURL(url: &NSURL) -> TodoGenerics { + msg_send![Self::class(), dictionaryWithContentsOfURL: url] + } + pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> TodoGenerics { + msg_send![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> TodoGenerics { + msg_send![self, initWithContentsOfURL: url] + } +} +#[doc = "NSSharedKeySetDictionary"] +impl NSDictionary { + pub unsafe fn sharedKeySetForKeys(keys: TodoGenerics) -> Id { + msg_send_id![Self::class(), sharedKeySetForKeys: keys] + } +} +#[doc = "NSSharedKeySetDictionary"] +impl NSMutableDictionary { + pub unsafe fn dictionaryWithSharedKeySet(keyset: &Object) -> TodoGenerics { + msg_send![Self::class(), dictionaryWithSharedKeySet: keyset] + } +} +#[doc = "NSGenericFastEnumeraiton"] +impl NSDictionary { + pub unsafe fn countByEnumeratingWithState_objects_count( + &self, + state: NonNull, + buffer: TodoArray, + len: NSUInteger, + ) -> NSUInteger { + msg_send![ + self, + countByEnumeratingWithState: state, + objects: buffer, + count: len + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs new file mode 100644 index 000000000..c842353c2 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -0,0 +1,52 @@ +extern_class!( + #[derive(Debug)] + struct NSDistantObject; + unsafe impl ClassType for NSDistantObject { + type Super = NSProxy; + } +); +impl NSDistantObject { + pub unsafe fn proxyWithTarget_connection( + target: &Object, + connection: &NSConnection, + ) -> Option> { + msg_send_id![ + Self::class(), + proxyWithTarget: target, + connection: connection + ] + } + pub unsafe fn initWithTarget_connection( + &self, + target: &Object, + connection: &NSConnection, + ) -> Option> { + msg_send_id![self, initWithTarget: target, connection: connection] + } + pub unsafe fn proxyWithLocal_connection( + target: &Object, + connection: &NSConnection, + ) -> Id { + msg_send_id![ + Self::class(), + proxyWithLocal: target, + connection: connection + ] + } + pub unsafe fn initWithLocal_connection( + &self, + target: &Object, + connection: &NSConnection, + ) -> Id { + msg_send_id![self, initWithLocal: target, connection: connection] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn setProtocolForProxy(&self, proto: Option<&Protocol>) { + msg_send![self, setProtocolForProxy: proto] + } + pub unsafe fn connectionForProxy(&self) -> Id { + msg_send_id![self, connectionForProxy] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs new file mode 100644 index 000000000..94bbe64c4 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -0,0 +1,30 @@ +extern_class!( + #[derive(Debug)] + struct NSDistributedLock; + unsafe impl ClassType for NSDistributedLock { + type Super = NSObject; + } +); +impl NSDistributedLock { + pub unsafe fn lockWithPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), lockWithPath: path] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithPath: path] + } + pub unsafe fn tryLock(&self) -> bool { + msg_send![self, tryLock] + } + pub unsafe fn unlock(&self) { + msg_send![self, unlock] + } + pub unsafe fn breakLock(&self) { + msg_send![self, breakLock] + } + pub unsafe fn lockDate(&self) -> Id { + msg_send_id![self, lockDate] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs new file mode 100644 index 000000000..8fbd7bd08 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -0,0 +1,121 @@ +extern_class!( + #[derive(Debug)] + struct NSDistributedNotificationCenter; + unsafe impl ClassType for NSDistributedNotificationCenter { + type Super = NSNotificationCenter; + } +); +impl NSDistributedNotificationCenter { + pub unsafe fn notificationCenterForType( + notificationCenterType: NSDistributedNotificationCenterType, + ) -> Id { + msg_send_id![ + Self::class(), + notificationCenterForType: notificationCenterType + ] + } + pub unsafe fn defaultCenter() -> Id { + msg_send_id![Self::class(), defaultCenter] + } + pub unsafe fn addObserver_selector_name_object_suspensionBehavior( + &self, + observer: &Object, + selector: Sel, + name: NSNotificationName, + object: Option<&NSString>, + suspensionBehavior: NSNotificationSuspensionBehavior, + ) { + msg_send![ + self, + addObserver: observer, + selector: selector, + name: name, + object: object, + suspensionBehavior: suspensionBehavior + ] + } + pub unsafe fn postNotificationName_object_userInfo_deliverImmediately( + &self, + name: NSNotificationName, + object: Option<&NSString>, + userInfo: Option<&NSDictionary>, + deliverImmediately: bool, + ) { + msg_send![ + self, + postNotificationName: name, + object: object, + userInfo: userInfo, + deliverImmediately: deliverImmediately + ] + } + pub unsafe fn postNotificationName_object_userInfo_options( + &self, + name: NSNotificationName, + object: Option<&NSString>, + userInfo: Option<&NSDictionary>, + options: NSDistributedNotificationOptions, + ) { + msg_send![ + self, + postNotificationName: name, + object: object, + userInfo: userInfo, + options: options + ] + } + pub unsafe fn addObserver_selector_name_object( + &self, + observer: &Object, + aSelector: Sel, + aName: NSNotificationName, + anObject: Option<&NSString>, + ) { + msg_send![ + self, + addObserver: observer, + selector: aSelector, + name: aName, + object: anObject + ] + } + pub unsafe fn postNotificationName_object( + &self, + aName: NSNotificationName, + anObject: Option<&NSString>, + ) { + msg_send![self, postNotificationName: aName, object: anObject] + } + pub unsafe fn postNotificationName_object_userInfo( + &self, + aName: NSNotificationName, + anObject: Option<&NSString>, + aUserInfo: Option<&NSDictionary>, + ) { + msg_send![ + self, + postNotificationName: aName, + object: anObject, + userInfo: aUserInfo + ] + } + pub unsafe fn removeObserver_name_object( + &self, + observer: &Object, + aName: NSNotificationName, + anObject: Option<&NSString>, + ) { + msg_send![ + self, + removeObserver: observer, + name: aName, + object: anObject + ] + } + pub unsafe fn suspended(&self) -> bool { + msg_send![self, suspended] + } + pub unsafe fn setSuspended(&self, suspended: bool) { + msg_send![self, setSuspended: suspended] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs new file mode 100644 index 000000000..6e18bf197 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -0,0 +1,64 @@ +extern_class!( + #[derive(Debug)] + struct NSEnergyFormatter; + unsafe impl ClassType for NSEnergyFormatter { + type Super = NSFormatter; + } +); +impl NSEnergyFormatter { + pub unsafe fn stringFromValue_unit( + &self, + value: c_double, + unit: NSEnergyFormatterUnit, + ) -> Id { + msg_send_id![self, stringFromValue: value, unit: unit] + } + pub unsafe fn stringFromJoules(&self, numberInJoules: c_double) -> Id { + msg_send_id![self, stringFromJoules: numberInJoules] + } + pub unsafe fn unitStringFromValue_unit( + &self, + value: c_double, + unit: NSEnergyFormatterUnit, + ) -> Id { + msg_send_id![self, unitStringFromValue: value, unit: unit] + } + pub unsafe fn unitStringFromJoules_usedUnit( + &self, + numberInJoules: c_double, + unitp: *mut NSEnergyFormatterUnit, + ) -> Id { + msg_send_id![self, unitStringFromJoules: numberInJoules, usedUnit: unitp] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: *mut Option<&Object>, + string: &NSString, + error: *mut Option<&NSString>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn isForFoodEnergyUse(&self) -> bool { + msg_send![self, isForFoodEnergyUse] + } + pub unsafe fn setForFoodEnergyUse(&self, forFoodEnergyUse: bool) { + msg_send![self, setForFoodEnergyUse: forFoodEnergyUse] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs new file mode 100644 index 000000000..afce934ef --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -0,0 +1,18 @@ +extern_class!( + #[derive(Debug)] + struct NSEnumerator; + unsafe impl ClassType for NSEnumerator { + type Super = NSObject; + } +); +impl NSEnumerator { + pub unsafe fn nextObject(&self) -> ObjectType { + msg_send![self, nextObject] + } +} +#[doc = "NSExtendedEnumerator"] +impl NSEnumerator { + pub unsafe fn allObjects(&self) -> TodoGenerics { + msg_send![self, allObjects] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs new file mode 100644 index 000000000..021b58a82 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -0,0 +1,103 @@ +extern_class!( + #[derive(Debug)] + struct NSError; + unsafe impl ClassType for NSError { + type Super = NSObject; + } +); +impl NSError { + pub unsafe fn initWithDomain_code_userInfo( + &self, + domain: NSErrorDomain, + code: NSInteger, + dict: TodoGenerics, + ) -> Id { + msg_send_id![self, initWithDomain: domain, code: code, userInfo: dict] + } + pub unsafe fn errorWithDomain_code_userInfo( + domain: NSErrorDomain, + code: NSInteger, + dict: TodoGenerics, + ) -> Id { + msg_send_id![ + Self::class(), + errorWithDomain: domain, + code: code, + userInfo: dict + ] + } + pub unsafe fn setUserInfoValueProviderForDomain_provider( + errorDomain: NSErrorDomain, + provider: TodoBlock, + ) { + msg_send![ + Self::class(), + setUserInfoValueProviderForDomain: errorDomain, + provider: provider + ] + } + pub unsafe fn userInfoValueProviderForDomain(errorDomain: NSErrorDomain) -> TodoBlock { + msg_send![Self::class(), userInfoValueProviderForDomain: errorDomain] + } + pub unsafe fn domain(&self) -> NSErrorDomain { + msg_send![self, domain] + } + pub unsafe fn code(&self) -> NSInteger { + msg_send![self, code] + } + pub unsafe fn userInfo(&self) -> TodoGenerics { + msg_send![self, userInfo] + } + pub unsafe fn localizedDescription(&self) -> Id { + msg_send_id![self, localizedDescription] + } + pub unsafe fn localizedFailureReason(&self) -> Option> { + msg_send_id![self, localizedFailureReason] + } + pub unsafe fn localizedRecoverySuggestion(&self) -> Option> { + msg_send_id![self, localizedRecoverySuggestion] + } + pub unsafe fn localizedRecoveryOptions(&self) -> TodoGenerics { + msg_send![self, localizedRecoveryOptions] + } + pub unsafe fn recoveryAttempter(&self) -> Option> { + msg_send_id![self, recoveryAttempter] + } + pub unsafe fn helpAnchor(&self) -> Option> { + msg_send_id![self, helpAnchor] + } + pub unsafe fn underlyingErrors(&self) -> TodoGenerics { + msg_send![self, underlyingErrors] + } +} +#[doc = "NSErrorRecoveryAttempting"] +impl NSObject { + pub unsafe fn attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo( + &self, + error: &NSError, + recoveryOptionIndex: NSUInteger, + delegate: Option<&Object>, + didRecoverSelector: Option, + contextInfo: *mut c_void, + ) { + msg_send![ + self, + attemptRecoveryFromError: error, + optionIndex: recoveryOptionIndex, + delegate: delegate, + didRecoverSelector: didRecoverSelector, + contextInfo: contextInfo + ] + } + pub unsafe fn attemptRecoveryFromError_optionIndex( + &self, + error: &NSError, + recoveryOptionIndex: NSUInteger, + ) -> bool { + msg_send![ + self, + attemptRecoveryFromError: error, + optionIndex: recoveryOptionIndex + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs new file mode 100644 index 000000000..00e483687 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -0,0 +1,79 @@ +extern_class!( + #[derive(Debug)] + struct NSException; + unsafe impl ClassType for NSException { + type Super = NSObject; + } +); +impl NSException { + pub unsafe fn exceptionWithName_reason_userInfo( + name: NSExceptionName, + reason: Option<&NSString>, + userInfo: Option<&NSDictionary>, + ) -> Id { + msg_send_id![ + Self::class(), + exceptionWithName: name, + reason: reason, + userInfo: userInfo + ] + } + pub unsafe fn initWithName_reason_userInfo( + &self, + aName: NSExceptionName, + aReason: Option<&NSString>, + aUserInfo: Option<&NSDictionary>, + ) -> Id { + msg_send_id![ + self, + initWithName: aName, + reason: aReason, + userInfo: aUserInfo + ] + } + pub unsafe fn raise(&self) { + msg_send![self, raise] + } + pub unsafe fn name(&self) -> NSExceptionName { + msg_send![self, name] + } + pub unsafe fn reason(&self) -> Option> { + msg_send_id![self, reason] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } + pub unsafe fn callStackReturnAddresses(&self) -> TodoGenerics { + msg_send![self, callStackReturnAddresses] + } + pub unsafe fn callStackSymbols(&self) -> TodoGenerics { + msg_send![self, callStackSymbols] + } +} +#[doc = "NSExceptionRaisingConveniences"] +impl NSException { + pub unsafe fn raise_format_arguments( + name: NSExceptionName, + format: &NSString, + argList: va_list, + ) { + msg_send![ + Self::class(), + raise: name, + format: format, + arguments: argList + ] + } +} +extern_class!( + #[derive(Debug)] + struct NSAssertionHandler; + unsafe impl ClassType for NSAssertionHandler { + type Super = NSObject; + } +); +impl NSAssertionHandler { + pub unsafe fn currentHandler() -> Id { + msg_send_id![Self::class(), currentHandler] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs new file mode 100644 index 000000000..d36746d91 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -0,0 +1,179 @@ +extern_class!( + #[derive(Debug)] + struct NSExpression; + unsafe impl ClassType for NSExpression { + type Super = NSObject; + } +); +impl NSExpression { + pub unsafe fn expressionWithFormat_argumentArray( + expressionFormat: &NSString, + arguments: &NSArray, + ) -> Id { + msg_send_id![ + Self::class(), + expressionWithFormat: expressionFormat, + argumentArray: arguments + ] + } + pub unsafe fn expressionWithFormat_arguments( + expressionFormat: &NSString, + argList: va_list, + ) -> Id { + msg_send_id![ + Self::class(), + expressionWithFormat: expressionFormat, + arguments: argList + ] + } + pub unsafe fn expressionForConstantValue(obj: Option<&Object>) -> Id { + msg_send_id![Self::class(), expressionForConstantValue: obj] + } + pub unsafe fn expressionForEvaluatedObject() -> Id { + msg_send_id![Self::class(), expressionForEvaluatedObject] + } + pub unsafe fn expressionForVariable(string: &NSString) -> Id { + msg_send_id![Self::class(), expressionForVariable: string] + } + pub unsafe fn expressionForKeyPath(keyPath: &NSString) -> Id { + msg_send_id![Self::class(), expressionForKeyPath: keyPath] + } + pub unsafe fn expressionForFunction_arguments( + name: &NSString, + parameters: &NSArray, + ) -> Id { + msg_send_id![ + Self::class(), + expressionForFunction: name, + arguments: parameters + ] + } + pub unsafe fn expressionForAggregate(subexpressions: TodoGenerics) -> Id { + msg_send_id![Self::class(), expressionForAggregate: subexpressions] + } + pub unsafe fn expressionForUnionSet_with( + left: &NSExpression, + right: &NSExpression, + ) -> Id { + msg_send_id![Self::class(), expressionForUnionSet: left, with: right] + } + pub unsafe fn expressionForIntersectSet_with( + left: &NSExpression, + right: &NSExpression, + ) -> Id { + msg_send_id![Self::class(), expressionForIntersectSet: left, with: right] + } + pub unsafe fn expressionForMinusSet_with( + left: &NSExpression, + right: &NSExpression, + ) -> Id { + msg_send_id![Self::class(), expressionForMinusSet: left, with: right] + } + pub unsafe fn expressionForSubquery_usingIteratorVariable_predicate( + expression: &NSExpression, + variable: &NSString, + predicate: &NSPredicate, + ) -> Id { + msg_send_id![ + Self::class(), + expressionForSubquery: expression, + usingIteratorVariable: variable, + predicate: predicate + ] + } + pub unsafe fn expressionForFunction_selectorName_arguments( + target: &NSExpression, + name: &NSString, + parameters: Option<&NSArray>, + ) -> Id { + msg_send_id![ + Self::class(), + expressionForFunction: target, + selectorName: name, + arguments: parameters + ] + } + pub unsafe fn expressionForAnyKey() -> Id { + msg_send_id![Self::class(), expressionForAnyKey] + } + pub unsafe fn expressionForBlock_arguments( + block: TodoBlock, + arguments: TodoGenerics, + ) -> Id { + msg_send_id![ + Self::class(), + expressionForBlock: block, + arguments: arguments + ] + } + pub unsafe fn expressionForConditional_trueExpression_falseExpression( + predicate: &NSPredicate, + trueExpression: &NSExpression, + falseExpression: &NSExpression, + ) -> Id { + msg_send_id![ + Self::class(), + expressionForConditional: predicate, + trueExpression: trueExpression, + falseExpression: falseExpression + ] + } + pub unsafe fn initWithExpressionType(&self, type_: NSExpressionType) -> Id { + msg_send_id![self, initWithExpressionType: type_] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn expressionValueWithObject_context( + &self, + object: Option<&Object>, + context: Option<&NSMutableDictionary>, + ) -> Option> { + msg_send_id![self, expressionValueWithObject: object, context: context] + } + pub unsafe fn allowEvaluation(&self) { + msg_send![self, allowEvaluation] + } + pub unsafe fn expressionType(&self) -> NSExpressionType { + msg_send![self, expressionType] + } + pub unsafe fn constantValue(&self) -> Option> { + msg_send_id![self, constantValue] + } + pub unsafe fn keyPath(&self) -> Id { + msg_send_id![self, keyPath] + } + pub unsafe fn function(&self) -> Id { + msg_send_id![self, function] + } + pub unsafe fn variable(&self) -> Id { + msg_send_id![self, variable] + } + pub unsafe fn operand(&self) -> Id { + msg_send_id![self, operand] + } + pub unsafe fn arguments(&self) -> TodoGenerics { + msg_send![self, arguments] + } + pub unsafe fn collection(&self) -> Id { + msg_send_id![self, collection] + } + pub unsafe fn predicate(&self) -> Id { + msg_send_id![self, predicate] + } + pub unsafe fn leftExpression(&self) -> Id { + msg_send_id![self, leftExpression] + } + pub unsafe fn rightExpression(&self) -> Id { + msg_send_id![self, rightExpression] + } + pub unsafe fn trueExpression(&self) -> Id { + msg_send_id![self, trueExpression] + } + pub unsafe fn falseExpression(&self) -> Id { + msg_send_id![self, falseExpression] + } + pub unsafe fn expressionBlock(&self) -> TodoBlock { + msg_send![self, expressionBlock] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs new file mode 100644 index 000000000..925889964 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -0,0 +1,29 @@ +extern_class!( + #[derive(Debug)] + struct NSExtensionContext; + unsafe impl ClassType for NSExtensionContext { + type Super = NSObject; + } +); +impl NSExtensionContext { + pub unsafe fn completeRequestReturningItems_completionHandler( + &self, + items: Option<&NSArray>, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + completeRequestReturningItems: items, + completionHandler: completionHandler + ] + } + pub unsafe fn cancelRequestWithError(&self, error: &NSError) { + msg_send![self, cancelRequestWithError: error] + } + pub unsafe fn openURL_completionHandler(&self, URL: &NSURL, completionHandler: TodoBlock) { + msg_send![self, openURL: URL, completionHandler: completionHandler] + } + pub unsafe fn inputItems(&self) -> Id { + msg_send_id![self, inputItems] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs new file mode 100644 index 000000000..de20b39d6 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -0,0 +1,36 @@ +extern_class!( + #[derive(Debug)] + struct NSExtensionItem; + unsafe impl ClassType for NSExtensionItem { + type Super = NSObject; + } +); +impl NSExtensionItem { + pub unsafe fn attributedTitle(&self) -> Option> { + msg_send_id![self, attributedTitle] + } + pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>) { + msg_send![self, setAttributedTitle: attributedTitle] + } + pub unsafe fn attributedContentText(&self) -> Option> { + msg_send_id![self, attributedContentText] + } + pub unsafe fn setAttributedContentText( + &self, + attributedContentText: Option<&NSAttributedString>, + ) { + msg_send![self, setAttributedContentText: attributedContentText] + } + pub unsafe fn attachments(&self) -> TodoGenerics { + msg_send![self, attachments] + } + pub unsafe fn setAttachments(&self, attachments: TodoGenerics) { + msg_send![self, setAttachments: attachments] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { + msg_send![self, setUserInfo: userInfo] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs new file mode 100644 index 000000000..45f750de1 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -0,0 +1,174 @@ +extern_class!( + #[derive(Debug)] + struct NSFileAccessIntent; + unsafe impl ClassType for NSFileAccessIntent { + type Super = NSObject; + } +); +impl NSFileAccessIntent { + pub unsafe fn readingIntentWithURL_options( + url: &NSURL, + options: NSFileCoordinatorReadingOptions, + ) -> Id { + msg_send_id![Self::class(), readingIntentWithURL: url, options: options] + } + pub unsafe fn writingIntentWithURL_options( + url: &NSURL, + options: NSFileCoordinatorWritingOptions, + ) -> Id { + msg_send_id![Self::class(), writingIntentWithURL: url, options: options] + } + pub unsafe fn URL(&self) -> Id { + msg_send_id![self, URL] + } +} +extern_class!( + #[derive(Debug)] + struct NSFileCoordinator; + unsafe impl ClassType for NSFileCoordinator { + type Super = NSObject; + } +); +impl NSFileCoordinator { + pub unsafe fn addFilePresenter(filePresenter: TodoGenerics) { + msg_send![Self::class(), addFilePresenter: filePresenter] + } + pub unsafe fn removeFilePresenter(filePresenter: TodoGenerics) { + msg_send![Self::class(), removeFilePresenter: filePresenter] + } + pub unsafe fn initWithFilePresenter( + &self, + filePresenterOrNil: TodoGenerics, + ) -> Id { + msg_send_id![self, initWithFilePresenter: filePresenterOrNil] + } + pub unsafe fn coordinateAccessWithIntents_queue_byAccessor( + &self, + intents: TodoGenerics, + queue: &NSOperationQueue, + accessor: TodoBlock, + ) { + msg_send![ + self, + coordinateAccessWithIntents: intents, + queue: queue, + byAccessor: accessor + ] + } + pub unsafe fn coordinateReadingItemAtURL_options_error_byAccessor( + &self, + url: &NSURL, + options: NSFileCoordinatorReadingOptions, + outError: *mut Option<&NSError>, + reader: TodoBlock, + ) { + msg_send![ + self, + coordinateReadingItemAtURL: url, + options: options, + error: outError, + byAccessor: reader + ] + } + pub unsafe fn coordinateWritingItemAtURL_options_error_byAccessor( + &self, + url: &NSURL, + options: NSFileCoordinatorWritingOptions, + outError: *mut Option<&NSError>, + writer: TodoBlock, + ) { + msg_send![ + self, + coordinateWritingItemAtURL: url, + options: options, + error: outError, + byAccessor: writer + ] + } + pub unsafe fn coordinateReadingItemAtURL_options_writingItemAtURL_options_error_byAccessor( + &self, + readingURL: &NSURL, + readingOptions: NSFileCoordinatorReadingOptions, + writingURL: &NSURL, + writingOptions: NSFileCoordinatorWritingOptions, + outError: *mut Option<&NSError>, + readerWriter: TodoBlock, + ) { + msg_send![ + self, + coordinateReadingItemAtURL: readingURL, + options: readingOptions, + writingItemAtURL: writingURL, + options: writingOptions, + error: outError, + byAccessor: readerWriter + ] + } + pub unsafe fn coordinateWritingItemAtURL_options_writingItemAtURL_options_error_byAccessor( + &self, + url1: &NSURL, + options1: NSFileCoordinatorWritingOptions, + url2: &NSURL, + options2: NSFileCoordinatorWritingOptions, + outError: *mut Option<&NSError>, + writer: TodoBlock, + ) { + msg_send![ + self, + coordinateWritingItemAtURL: url1, + options: options1, + writingItemAtURL: url2, + options: options2, + error: outError, + byAccessor: writer + ] + } + pub unsafe fn prepareForReadingItemsAtURLs_options_writingItemsAtURLs_options_error_byAccessor( + &self, + readingURLs: TodoGenerics, + readingOptions: NSFileCoordinatorReadingOptions, + writingURLs: TodoGenerics, + writingOptions: NSFileCoordinatorWritingOptions, + outError: *mut Option<&NSError>, + batchAccessor: TodoBlock, + ) { + msg_send![ + self, + prepareForReadingItemsAtURLs: readingURLs, + options: readingOptions, + writingItemsAtURLs: writingURLs, + options: writingOptions, + error: outError, + byAccessor: batchAccessor + ] + } + pub unsafe fn itemAtURL_willMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL) { + msg_send![self, itemAtURL: oldURL, willMoveToURL: newURL] + } + pub unsafe fn itemAtURL_didMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL) { + msg_send![self, itemAtURL: oldURL, didMoveToURL: newURL] + } + pub unsafe fn itemAtURL_didChangeUbiquityAttributes( + &self, + url: &NSURL, + attributes: TodoGenerics, + ) { + msg_send![ + self, + itemAtURL: url, + didChangeUbiquityAttributes: attributes + ] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn filePresenters() -> TodoGenerics { + msg_send![Self::class(), filePresenters] + } + pub unsafe fn purposeIdentifier(&self) -> Id { + msg_send_id![self, purposeIdentifier] + } + pub unsafe fn setPurposeIdentifier(&self, purposeIdentifier: &NSString) { + msg_send![self, setPurposeIdentifier: purposeIdentifier] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs new file mode 100644 index 000000000..bd184b5ea --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -0,0 +1,213 @@ +extern_class!( + #[derive(Debug)] + struct NSFileHandle; + unsafe impl ClassType for NSFileHandle { + type Super = NSObject; + } +); +impl NSFileHandle { + pub unsafe fn initWithFileDescriptor_closeOnDealloc( + &self, + fd: c_int, + closeopt: bool, + ) -> Id { + msg_send_id![self, initWithFileDescriptor: fd, closeOnDealloc: closeopt] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn readDataToEndOfFileAndReturnError( + &self, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, readDataToEndOfFileAndReturnError: error] + } + pub unsafe fn readDataUpToLength_error( + &self, + length: NSUInteger, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, readDataUpToLength: length, error: error] + } + pub unsafe fn writeData_error(&self, data: &NSData, error: *mut Option<&NSError>) -> bool { + msg_send![self, writeData: data, error: error] + } + pub unsafe fn getOffset_error( + &self, + offsetInFile: NonNull, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, getOffset: offsetInFile, error: error] + } + pub unsafe fn seekToEndReturningOffset_error( + &self, + offsetInFile: *mut c_ulonglong, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, seekToEndReturningOffset: offsetInFile, error: error] + } + pub unsafe fn seekToOffset_error( + &self, + offset: c_ulonglong, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, seekToOffset: offset, error: error] + } + pub unsafe fn truncateAtOffset_error( + &self, + offset: c_ulonglong, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, truncateAtOffset: offset, error: error] + } + pub unsafe fn synchronizeAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + msg_send![self, synchronizeAndReturnError: error] + } + pub unsafe fn closeAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + msg_send![self, closeAndReturnError: error] + } + pub unsafe fn availableData(&self) -> Id { + msg_send_id![self, availableData] + } +} +#[doc = "NSFileHandleCreation"] +impl NSFileHandle { + pub unsafe fn fileHandleForReadingAtPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), fileHandleForReadingAtPath: path] + } + pub unsafe fn fileHandleForWritingAtPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), fileHandleForWritingAtPath: path] + } + pub unsafe fn fileHandleForUpdatingAtPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), fileHandleForUpdatingAtPath: path] + } + pub unsafe fn fileHandleForReadingFromURL_error( + url: &NSURL, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + fileHandleForReadingFromURL: url, + error: error + ] + } + pub unsafe fn fileHandleForWritingToURL_error( + url: &NSURL, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![Self::class(), fileHandleForWritingToURL: url, error: error] + } + pub unsafe fn fileHandleForUpdatingURL_error( + url: &NSURL, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![Self::class(), fileHandleForUpdatingURL: url, error: error] + } + pub unsafe fn fileHandleWithStandardInput() -> Id { + msg_send_id![Self::class(), fileHandleWithStandardInput] + } + pub unsafe fn fileHandleWithStandardOutput() -> Id { + msg_send_id![Self::class(), fileHandleWithStandardOutput] + } + pub unsafe fn fileHandleWithStandardError() -> Id { + msg_send_id![Self::class(), fileHandleWithStandardError] + } + pub unsafe fn fileHandleWithNullDevice() -> Id { + msg_send_id![Self::class(), fileHandleWithNullDevice] + } +} +#[doc = "NSFileHandleAsynchronousAccess"] +impl NSFileHandle { + pub unsafe fn readInBackgroundAndNotifyForModes(&self, modes: TodoGenerics) { + msg_send![self, readInBackgroundAndNotifyForModes: modes] + } + pub unsafe fn readInBackgroundAndNotify(&self) { + msg_send![self, readInBackgroundAndNotify] + } + pub unsafe fn readToEndOfFileInBackgroundAndNotifyForModes(&self, modes: TodoGenerics) { + msg_send![self, readToEndOfFileInBackgroundAndNotifyForModes: modes] + } + pub unsafe fn readToEndOfFileInBackgroundAndNotify(&self) { + msg_send![self, readToEndOfFileInBackgroundAndNotify] + } + pub unsafe fn acceptConnectionInBackgroundAndNotifyForModes(&self, modes: TodoGenerics) { + msg_send![self, acceptConnectionInBackgroundAndNotifyForModes: modes] + } + pub unsafe fn acceptConnectionInBackgroundAndNotify(&self) { + msg_send![self, acceptConnectionInBackgroundAndNotify] + } + pub unsafe fn waitForDataInBackgroundAndNotifyForModes(&self, modes: TodoGenerics) { + msg_send![self, waitForDataInBackgroundAndNotifyForModes: modes] + } + pub unsafe fn waitForDataInBackgroundAndNotify(&self) { + msg_send![self, waitForDataInBackgroundAndNotify] + } + pub unsafe fn readabilityHandler(&self) -> TodoBlock { + msg_send![self, readabilityHandler] + } + pub unsafe fn setReadabilityHandler(&self, readabilityHandler: TodoBlock) { + msg_send![self, setReadabilityHandler: readabilityHandler] + } + pub unsafe fn writeabilityHandler(&self) -> TodoBlock { + msg_send![self, writeabilityHandler] + } + pub unsafe fn setWriteabilityHandler(&self, writeabilityHandler: TodoBlock) { + msg_send![self, setWriteabilityHandler: writeabilityHandler] + } +} +#[doc = "NSFileHandlePlatformSpecific"] +impl NSFileHandle { + pub unsafe fn initWithFileDescriptor(&self, fd: c_int) -> Id { + msg_send_id![self, initWithFileDescriptor: fd] + } + pub unsafe fn fileDescriptor(&self) -> c_int { + msg_send![self, fileDescriptor] + } +} +impl NSFileHandle { + pub unsafe fn readDataToEndOfFile(&self) -> Id { + msg_send_id![self, readDataToEndOfFile] + } + pub unsafe fn readDataOfLength(&self, length: NSUInteger) -> Id { + msg_send_id![self, readDataOfLength: length] + } + pub unsafe fn writeData(&self, data: &NSData) { + msg_send![self, writeData: data] + } + pub unsafe fn offsetInFile(&self) -> c_ulonglong { + msg_send![self, offsetInFile] + } + pub unsafe fn seekToEndOfFile(&self) -> c_ulonglong { + msg_send![self, seekToEndOfFile] + } + pub unsafe fn seekToFileOffset(&self, offset: c_ulonglong) { + msg_send![self, seekToFileOffset: offset] + } + pub unsafe fn truncateFileAtOffset(&self, offset: c_ulonglong) { + msg_send![self, truncateFileAtOffset: offset] + } + pub unsafe fn synchronizeFile(&self) { + msg_send![self, synchronizeFile] + } + pub unsafe fn closeFile(&self) { + msg_send![self, closeFile] + } +} +extern_class!( + #[derive(Debug)] + struct NSPipe; + unsafe impl ClassType for NSPipe { + type Super = NSObject; + } +); +impl NSPipe { + pub unsafe fn pipe() -> Id { + msg_send_id![Self::class(), pipe] + } + pub unsafe fn fileHandleForReading(&self) -> Id { + msg_send_id![self, fileHandleForReading] + } + pub unsafe fn fileHandleForWriting(&self) -> Id { + msg_send_id![self, fileHandleForWriting] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs new file mode 100644 index 000000000..cb6a89d5b --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -0,0 +1,663 @@ +extern_class!( + #[derive(Debug)] + struct NSFileManager; + unsafe impl ClassType for NSFileManager { + type Super = NSObject; + } +); +impl NSFileManager { + pub unsafe fn mountedVolumeURLsIncludingResourceValuesForKeys_options( + &self, + propertyKeys: TodoGenerics, + options: NSVolumeEnumerationOptions, + ) -> TodoGenerics { + msg_send![ + self, + mountedVolumeURLsIncludingResourceValuesForKeys: propertyKeys, + options: options + ] + } + pub unsafe fn unmountVolumeAtURL_options_completionHandler( + &self, + url: &NSURL, + mask: NSFileManagerUnmountOptions, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + unmountVolumeAtURL: url, + options: mask, + completionHandler: completionHandler + ] + } + pub unsafe fn contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error( + &self, + url: &NSURL, + keys: TodoGenerics, + mask: NSDirectoryEnumerationOptions, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![ + self, + contentsOfDirectoryAtURL: url, + includingPropertiesForKeys: keys, + options: mask, + error: error + ] + } + pub unsafe fn URLsForDirectory_inDomains( + &self, + directory: NSSearchPathDirectory, + domainMask: NSSearchPathDomainMask, + ) -> TodoGenerics { + msg_send![self, URLsForDirectory: directory, inDomains: domainMask] + } + pub unsafe fn URLForDirectory_inDomain_appropriateForURL_create_error( + &self, + directory: NSSearchPathDirectory, + domain: NSSearchPathDomainMask, + url: Option<&NSURL>, + shouldCreate: bool, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + URLForDirectory: directory, + inDomain: domain, + appropriateForURL: url, + create: shouldCreate, + error: error + ] + } + pub unsafe fn getRelationship_ofDirectoryAtURL_toItemAtURL_error( + &self, + outRelationship: NonNull, + directoryURL: &NSURL, + otherURL: &NSURL, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + getRelationship: outRelationship, + ofDirectoryAtURL: directoryURL, + toItemAtURL: otherURL, + error: error + ] + } + pub unsafe fn getRelationship_ofDirectory_inDomain_toItemAtURL_error( + &self, + outRelationship: NonNull, + directory: NSSearchPathDirectory, + domainMask: NSSearchPathDomainMask, + url: &NSURL, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + getRelationship: outRelationship, + ofDirectory: directory, + inDomain: domainMask, + toItemAtURL: url, + error: error + ] + } + pub unsafe fn createDirectoryAtURL_withIntermediateDirectories_attributes_error( + &self, + url: &NSURL, + createIntermediates: bool, + attributes: TodoGenerics, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + createDirectoryAtURL: url, + withIntermediateDirectories: createIntermediates, + attributes: attributes, + error: error + ] + } + pub unsafe fn createSymbolicLinkAtURL_withDestinationURL_error( + &self, + url: &NSURL, + destURL: &NSURL, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + createSymbolicLinkAtURL: url, + withDestinationURL: destURL, + error: error + ] + } + pub unsafe fn setAttributes_ofItemAtPath_error( + &self, + attributes: TodoGenerics, + path: &NSString, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + setAttributes: attributes, + ofItemAtPath: path, + error: error + ] + } + pub unsafe fn createDirectoryAtPath_withIntermediateDirectories_attributes_error( + &self, + path: &NSString, + createIntermediates: bool, + attributes: TodoGenerics, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + createDirectoryAtPath: path, + withIntermediateDirectories: createIntermediates, + attributes: attributes, + error: error + ] + } + pub unsafe fn contentsOfDirectoryAtPath_error( + &self, + path: &NSString, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![self, contentsOfDirectoryAtPath: path, error: error] + } + pub unsafe fn subpathsOfDirectoryAtPath_error( + &self, + path: &NSString, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![self, subpathsOfDirectoryAtPath: path, error: error] + } + pub unsafe fn attributesOfItemAtPath_error( + &self, + path: &NSString, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![self, attributesOfItemAtPath: path, error: error] + } + pub unsafe fn attributesOfFileSystemForPath_error( + &self, + path: &NSString, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![self, attributesOfFileSystemForPath: path, error: error] + } + pub unsafe fn createSymbolicLinkAtPath_withDestinationPath_error( + &self, + path: &NSString, + destPath: &NSString, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + createSymbolicLinkAtPath: path, + withDestinationPath: destPath, + error: error + ] + } + pub unsafe fn destinationOfSymbolicLinkAtPath_error( + &self, + path: &NSString, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, destinationOfSymbolicLinkAtPath: path, error: error] + } + pub unsafe fn copyItemAtPath_toPath_error( + &self, + srcPath: &NSString, + dstPath: &NSString, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, copyItemAtPath: srcPath, toPath: dstPath, error: error] + } + pub unsafe fn moveItemAtPath_toPath_error( + &self, + srcPath: &NSString, + dstPath: &NSString, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, moveItemAtPath: srcPath, toPath: dstPath, error: error] + } + pub unsafe fn linkItemAtPath_toPath_error( + &self, + srcPath: &NSString, + dstPath: &NSString, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, linkItemAtPath: srcPath, toPath: dstPath, error: error] + } + pub unsafe fn removeItemAtPath_error( + &self, + path: &NSString, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, removeItemAtPath: path, error: error] + } + pub unsafe fn copyItemAtURL_toURL_error( + &self, + srcURL: &NSURL, + dstURL: &NSURL, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, copyItemAtURL: srcURL, toURL: dstURL, error: error] + } + pub unsafe fn moveItemAtURL_toURL_error( + &self, + srcURL: &NSURL, + dstURL: &NSURL, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, moveItemAtURL: srcURL, toURL: dstURL, error: error] + } + pub unsafe fn linkItemAtURL_toURL_error( + &self, + srcURL: &NSURL, + dstURL: &NSURL, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, linkItemAtURL: srcURL, toURL: dstURL, error: error] + } + pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL, error: *mut Option<&NSError>) -> bool { + msg_send![self, removeItemAtURL: URL, error: error] + } + pub unsafe fn trashItemAtURL_resultingItemURL_error( + &self, + url: &NSURL, + outResultingURL: *mut Option<&NSURL>, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + trashItemAtURL: url, + resultingItemURL: outResultingURL, + error: error + ] + } + pub unsafe fn fileAttributesAtPath_traverseLink( + &self, + path: &NSString, + yorn: bool, + ) -> Option> { + msg_send_id![self, fileAttributesAtPath: path, traverseLink: yorn] + } + pub unsafe fn changeFileAttributes_atPath( + &self, + attributes: &NSDictionary, + path: &NSString, + ) -> bool { + msg_send![self, changeFileAttributes: attributes, atPath: path] + } + pub unsafe fn directoryContentsAtPath(&self, path: &NSString) -> Option> { + msg_send_id![self, directoryContentsAtPath: path] + } + pub unsafe fn fileSystemAttributesAtPath( + &self, + path: &NSString, + ) -> Option> { + msg_send_id![self, fileSystemAttributesAtPath: path] + } + pub unsafe fn pathContentOfSymbolicLinkAtPath( + &self, + path: &NSString, + ) -> Option> { + msg_send_id![self, pathContentOfSymbolicLinkAtPath: path] + } + pub unsafe fn createSymbolicLinkAtPath_pathContent( + &self, + path: &NSString, + otherpath: &NSString, + ) -> bool { + msg_send![self, createSymbolicLinkAtPath: path, pathContent: otherpath] + } + pub unsafe fn createDirectoryAtPath_attributes( + &self, + path: &NSString, + attributes: &NSDictionary, + ) -> bool { + msg_send![self, createDirectoryAtPath: path, attributes: attributes] + } + pub unsafe fn linkPath_toPath_handler( + &self, + src: &NSString, + dest: &NSString, + handler: Option<&Object>, + ) -> bool { + msg_send![self, linkPath: src, toPath: dest, handler: handler] + } + pub unsafe fn copyPath_toPath_handler( + &self, + src: &NSString, + dest: &NSString, + handler: Option<&Object>, + ) -> bool { + msg_send![self, copyPath: src, toPath: dest, handler: handler] + } + pub unsafe fn movePath_toPath_handler( + &self, + src: &NSString, + dest: &NSString, + handler: Option<&Object>, + ) -> bool { + msg_send![self, movePath: src, toPath: dest, handler: handler] + } + pub unsafe fn removeFileAtPath_handler( + &self, + path: &NSString, + handler: Option<&Object>, + ) -> bool { + msg_send![self, removeFileAtPath: path, handler: handler] + } + pub unsafe fn changeCurrentDirectoryPath(&self, path: &NSString) -> bool { + msg_send![self, changeCurrentDirectoryPath: path] + } + pub unsafe fn fileExistsAtPath(&self, path: &NSString) -> bool { + msg_send![self, fileExistsAtPath: path] + } + pub unsafe fn fileExistsAtPath_isDirectory( + &self, + path: &NSString, + isDirectory: *mut bool, + ) -> bool { + msg_send![self, fileExistsAtPath: path, isDirectory: isDirectory] + } + pub unsafe fn isReadableFileAtPath(&self, path: &NSString) -> bool { + msg_send![self, isReadableFileAtPath: path] + } + pub unsafe fn isWritableFileAtPath(&self, path: &NSString) -> bool { + msg_send![self, isWritableFileAtPath: path] + } + pub unsafe fn isExecutableFileAtPath(&self, path: &NSString) -> bool { + msg_send![self, isExecutableFileAtPath: path] + } + pub unsafe fn isDeletableFileAtPath(&self, path: &NSString) -> bool { + msg_send![self, isDeletableFileAtPath: path] + } + pub unsafe fn contentsEqualAtPath_andPath(&self, path1: &NSString, path2: &NSString) -> bool { + msg_send![self, contentsEqualAtPath: path1, andPath: path2] + } + pub unsafe fn displayNameAtPath(&self, path: &NSString) -> Id { + msg_send_id![self, displayNameAtPath: path] + } + pub unsafe fn componentsToDisplayForPath(&self, path: &NSString) -> TodoGenerics { + msg_send![self, componentsToDisplayForPath: path] + } + pub unsafe fn enumeratorAtPath(&self, path: &NSString) -> TodoGenerics { + msg_send![self, enumeratorAtPath: path] + } + pub unsafe fn enumeratorAtURL_includingPropertiesForKeys_options_errorHandler( + &self, + url: &NSURL, + keys: TodoGenerics, + mask: NSDirectoryEnumerationOptions, + handler: TodoBlock, + ) -> TodoGenerics { + msg_send![ + self, + enumeratorAtURL: url, + includingPropertiesForKeys: keys, + options: mask, + errorHandler: handler + ] + } + pub unsafe fn subpathsAtPath(&self, path: &NSString) -> TodoGenerics { + msg_send![self, subpathsAtPath: path] + } + pub unsafe fn contentsAtPath(&self, path: &NSString) -> Option> { + msg_send_id![self, contentsAtPath: path] + } + pub unsafe fn createFileAtPath_contents_attributes( + &self, + path: &NSString, + data: Option<&NSData>, + attr: TodoGenerics, + ) -> bool { + msg_send![ + self, + createFileAtPath: path, + contents: data, + attributes: attr + ] + } + pub unsafe fn fileSystemRepresentationWithPath(&self, path: &NSString) -> NonNull { + msg_send![self, fileSystemRepresentationWithPath: path] + } + pub unsafe fn stringWithFileSystemRepresentation_length( + &self, + str: NonNull, + len: NSUInteger, + ) -> Id { + msg_send_id![self, stringWithFileSystemRepresentation: str, length: len] + } + pub unsafe fn replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error( + &self, + originalItemURL: &NSURL, + newItemURL: &NSURL, + backupItemName: Option<&NSString>, + options: NSFileManagerItemReplacementOptions, + resultingURL: *mut Option<&NSURL>, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + replaceItemAtURL: originalItemURL, + withItemAtURL: newItemURL, + backupItemName: backupItemName, + options: options, + resultingItemURL: resultingURL, + error: error + ] + } + pub unsafe fn setUbiquitous_itemAtURL_destinationURL_error( + &self, + flag: bool, + url: &NSURL, + destinationURL: &NSURL, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + setUbiquitous: flag, + itemAtURL: url, + destinationURL: destinationURL, + error: error + ] + } + pub unsafe fn isUbiquitousItemAtURL(&self, url: &NSURL) -> bool { + msg_send![self, isUbiquitousItemAtURL: url] + } + pub unsafe fn startDownloadingUbiquitousItemAtURL_error( + &self, + url: &NSURL, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, startDownloadingUbiquitousItemAtURL: url, error: error] + } + pub unsafe fn evictUbiquitousItemAtURL_error( + &self, + url: &NSURL, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, evictUbiquitousItemAtURL: url, error: error] + } + pub unsafe fn URLForUbiquityContainerIdentifier( + &self, + containerIdentifier: Option<&NSString>, + ) -> Option> { + msg_send_id![self, URLForUbiquityContainerIdentifier: containerIdentifier] + } + pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( + &self, + url: &NSURL, + outDate: *mut Option<&NSDate>, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + URLForPublishingUbiquitousItemAtURL: url, + expirationDate: outDate, + error: error + ] + } + pub unsafe fn getFileProviderServicesForItemAtURL_completionHandler( + &self, + url: &NSURL, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getFileProviderServicesForItemAtURL: url, + completionHandler: completionHandler + ] + } + pub unsafe fn containerURLForSecurityApplicationGroupIdentifier( + &self, + groupIdentifier: &NSString, + ) -> Option> { + msg_send_id![ + self, + containerURLForSecurityApplicationGroupIdentifier: groupIdentifier + ] + } + pub unsafe fn defaultManager() -> Id { + msg_send_id![Self::class(), defaultManager] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn currentDirectoryPath(&self) -> Id { + msg_send_id![self, currentDirectoryPath] + } + pub unsafe fn ubiquityIdentityToken(&self) -> TodoGenerics { + msg_send![self, ubiquityIdentityToken] + } +} +#[doc = "NSUserInformation"] +impl NSFileManager { + pub unsafe fn homeDirectoryForUser(&self, userName: &NSString) -> Option> { + msg_send_id![self, homeDirectoryForUser: userName] + } + pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id { + msg_send_id![self, homeDirectoryForCurrentUser] + } + pub unsafe fn temporaryDirectory(&self) -> Id { + msg_send_id![self, temporaryDirectory] + } +} +#[doc = "NSCopyLinkMoveHandler"] +impl NSObject { + pub unsafe fn fileManager_shouldProceedAfterError( + &self, + fm: &NSFileManager, + errorInfo: &NSDictionary, + ) -> bool { + msg_send![self, fileManager: fm, shouldProceedAfterError: errorInfo] + } + pub unsafe fn fileManager_willProcessPath(&self, fm: &NSFileManager, path: &NSString) { + msg_send![self, fileManager: fm, willProcessPath: path] + } +} +extern_class!( + #[derive(Debug)] + struct NSDirectoryEnumerator; + unsafe impl ClassType for NSDirectoryEnumerator { + type Super = NSEnumerator; + } +); +impl NSDirectoryEnumerator { + pub unsafe fn skipDescendents(&self) { + msg_send![self, skipDescendents] + } + pub unsafe fn skipDescendants(&self) { + msg_send![self, skipDescendants] + } + pub unsafe fn fileAttributes(&self) -> TodoGenerics { + msg_send![self, fileAttributes] + } + pub unsafe fn directoryAttributes(&self) -> TodoGenerics { + msg_send![self, directoryAttributes] + } + pub unsafe fn isEnumeratingDirectoryPostOrder(&self) -> bool { + msg_send![self, isEnumeratingDirectoryPostOrder] + } + pub unsafe fn level(&self) -> NSUInteger { + msg_send![self, level] + } +} +extern_class!( + #[derive(Debug)] + struct NSFileProviderService; + unsafe impl ClassType for NSFileProviderService { + type Super = NSObject; + } +); +impl NSFileProviderService { + pub unsafe fn getFileProviderConnectionWithCompletionHandler( + &self, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getFileProviderConnectionWithCompletionHandler: completionHandler + ] + } + pub unsafe fn name(&self) -> NSFileProviderServiceName { + msg_send![self, name] + } +} +#[doc = "NSFileAttributes"] +impl NSDictionary { + pub unsafe fn fileSize(&self) -> c_ulonglong { + msg_send![self, fileSize] + } + pub unsafe fn fileModificationDate(&self) -> Option> { + msg_send_id![self, fileModificationDate] + } + pub unsafe fn fileType(&self) -> Option> { + msg_send_id![self, fileType] + } + pub unsafe fn filePosixPermissions(&self) -> NSUInteger { + msg_send![self, filePosixPermissions] + } + pub unsafe fn fileOwnerAccountName(&self) -> Option> { + msg_send_id![self, fileOwnerAccountName] + } + pub unsafe fn fileGroupOwnerAccountName(&self) -> Option> { + msg_send_id![self, fileGroupOwnerAccountName] + } + pub unsafe fn fileSystemNumber(&self) -> NSInteger { + msg_send![self, fileSystemNumber] + } + pub unsafe fn fileSystemFileNumber(&self) -> NSUInteger { + msg_send![self, fileSystemFileNumber] + } + pub unsafe fn fileExtensionHidden(&self) -> bool { + msg_send![self, fileExtensionHidden] + } + pub unsafe fn fileHFSCreatorCode(&self) -> OSType { + msg_send![self, fileHFSCreatorCode] + } + pub unsafe fn fileHFSTypeCode(&self) -> OSType { + msg_send![self, fileHFSTypeCode] + } + pub unsafe fn fileIsImmutable(&self) -> bool { + msg_send![self, fileIsImmutable] + } + pub unsafe fn fileIsAppendOnly(&self) -> bool { + msg_send![self, fileIsAppendOnly] + } + pub unsafe fn fileCreationDate(&self) -> Option> { + msg_send_id![self, fileCreationDate] + } + pub unsafe fn fileOwnerAccountID(&self) -> Option> { + msg_send_id![self, fileOwnerAccountID] + } + pub unsafe fn fileGroupOwnerAccountID(&self) -> Option> { + msg_send_id![self, fileGroupOwnerAccountID] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs new file mode 100644 index 000000000..a57a305d4 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -0,0 +1,118 @@ +extern_class!( + #[derive(Debug)] + struct NSFileVersion; + unsafe impl ClassType for NSFileVersion { + type Super = NSObject; + } +); +impl NSFileVersion { + pub unsafe fn currentVersionOfItemAtURL(url: &NSURL) -> Option> { + msg_send_id![Self::class(), currentVersionOfItemAtURL: url] + } + pub unsafe fn otherVersionsOfItemAtURL(url: &NSURL) -> TodoGenerics { + msg_send![Self::class(), otherVersionsOfItemAtURL: url] + } + pub unsafe fn unresolvedConflictVersionsOfItemAtURL(url: &NSURL) -> TodoGenerics { + msg_send![Self::class(), unresolvedConflictVersionsOfItemAtURL: url] + } + pub unsafe fn getNonlocalVersionsOfItemAtURL_completionHandler( + url: &NSURL, + completionHandler: TodoBlock, + ) { + msg_send![ + Self::class(), + getNonlocalVersionsOfItemAtURL: url, + completionHandler: completionHandler + ] + } + pub unsafe fn versionOfItemAtURL_forPersistentIdentifier( + url: &NSURL, + persistentIdentifier: &Object, + ) -> Option> { + msg_send_id![ + Self::class(), + versionOfItemAtURL: url, + forPersistentIdentifier: persistentIdentifier + ] + } + pub unsafe fn addVersionOfItemAtURL_withContentsOfURL_options_error( + url: &NSURL, + contentsURL: &NSURL, + options: NSFileVersionAddingOptions, + outError: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + addVersionOfItemAtURL: url, + withContentsOfURL: contentsURL, + options: options, + error: outError + ] + } + pub unsafe fn temporaryDirectoryURLForNewVersionOfItemAtURL(url: &NSURL) -> Id { + msg_send_id![ + Self::class(), + temporaryDirectoryURLForNewVersionOfItemAtURL: url + ] + } + pub unsafe fn replaceItemAtURL_options_error( + &self, + url: &NSURL, + options: NSFileVersionReplacingOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, replaceItemAtURL: url, options: options, error: error] + } + pub unsafe fn removeAndReturnError(&self, outError: *mut Option<&NSError>) -> bool { + msg_send![self, removeAndReturnError: outError] + } + pub unsafe fn removeOtherVersionsOfItemAtURL_error( + url: &NSURL, + outError: *mut Option<&NSError>, + ) -> bool { + msg_send![ + Self::class(), + removeOtherVersionsOfItemAtURL: url, + error: outError + ] + } + pub unsafe fn URL(&self) -> Id { + msg_send_id![self, URL] + } + pub unsafe fn localizedName(&self) -> Option> { + msg_send_id![self, localizedName] + } + pub unsafe fn localizedNameOfSavingComputer(&self) -> Option> { + msg_send_id![self, localizedNameOfSavingComputer] + } + pub unsafe fn originatorNameComponents(&self) -> Option> { + msg_send_id![self, originatorNameComponents] + } + pub unsafe fn modificationDate(&self) -> Option> { + msg_send_id![self, modificationDate] + } + pub unsafe fn persistentIdentifier(&self) -> TodoGenerics { + msg_send![self, persistentIdentifier] + } + pub unsafe fn isConflict(&self) -> bool { + msg_send![self, isConflict] + } + pub unsafe fn isResolved(&self) -> bool { + msg_send![self, isResolved] + } + pub unsafe fn setResolved(&self, resolved: bool) { + msg_send![self, setResolved: resolved] + } + pub unsafe fn isDiscardable(&self) -> bool { + msg_send![self, isDiscardable] + } + pub unsafe fn setDiscardable(&self, discardable: bool) { + msg_send![self, setDiscardable: discardable] + } + pub unsafe fn hasLocalContents(&self) -> bool { + msg_send![self, hasLocalContents] + } + pub unsafe fn hasThumbnail(&self) -> bool { + msg_send![self, hasThumbnail] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs new file mode 100644 index 000000000..9b8decbc3 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -0,0 +1,171 @@ +extern_class!( + #[derive(Debug)] + struct NSFileWrapper; + unsafe impl ClassType for NSFileWrapper { + type Super = NSObject; + } +); +impl NSFileWrapper { + pub unsafe fn initWithURL_options_error( + &self, + url: &NSURL, + options: NSFileWrapperReadingOptions, + outError: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, initWithURL: url, options: options, error: outError] + } + pub unsafe fn initDirectoryWithFileWrappers( + &self, + childrenByPreferredName: TodoGenerics, + ) -> Id { + msg_send_id![self, initDirectoryWithFileWrappers: childrenByPreferredName] + } + pub unsafe fn initRegularFileWithContents(&self, contents: &NSData) -> Id { + msg_send_id![self, initRegularFileWithContents: contents] + } + pub unsafe fn initSymbolicLinkWithDestinationURL(&self, url: &NSURL) -> Id { + msg_send_id![self, initSymbolicLinkWithDestinationURL: url] + } + pub unsafe fn initWithSerializedRepresentation( + &self, + serializeRepresentation: &NSData, + ) -> Option> { + msg_send_id![ + self, + initWithSerializedRepresentation: serializeRepresentation + ] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn matchesContentsOfURL(&self, url: &NSURL) -> bool { + msg_send![self, matchesContentsOfURL: url] + } + pub unsafe fn readFromURL_options_error( + &self, + url: &NSURL, + options: NSFileWrapperReadingOptions, + outError: *mut Option<&NSError>, + ) -> bool { + msg_send![self, readFromURL: url, options: options, error: outError] + } + pub unsafe fn writeToURL_options_originalContentsURL_error( + &self, + url: &NSURL, + options: NSFileWrapperWritingOptions, + originalContentsURL: Option<&NSURL>, + outError: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + writeToURL: url, + options: options, + originalContentsURL: originalContentsURL, + error: outError + ] + } + pub unsafe fn addFileWrapper(&self, child: &NSFileWrapper) -> Id { + msg_send_id![self, addFileWrapper: child] + } + pub unsafe fn addRegularFileWithContents_preferredFilename( + &self, + data: &NSData, + fileName: &NSString, + ) -> Id { + msg_send_id![ + self, + addRegularFileWithContents: data, + preferredFilename: fileName + ] + } + pub unsafe fn removeFileWrapper(&self, child: &NSFileWrapper) { + msg_send![self, removeFileWrapper: child] + } + pub unsafe fn keyForFileWrapper(&self, child: &NSFileWrapper) -> Option> { + msg_send_id![self, keyForFileWrapper: child] + } + pub unsafe fn isDirectory(&self) -> bool { + msg_send![self, isDirectory] + } + pub unsafe fn isRegularFile(&self) -> bool { + msg_send![self, isRegularFile] + } + pub unsafe fn isSymbolicLink(&self) -> bool { + msg_send![self, isSymbolicLink] + } + pub unsafe fn preferredFilename(&self) -> Option> { + msg_send_id![self, preferredFilename] + } + pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>) { + msg_send![self, setPreferredFilename: preferredFilename] + } + pub unsafe fn filename(&self) -> Option> { + msg_send_id![self, filename] + } + pub unsafe fn setFilename(&self, filename: Option<&NSString>) { + msg_send![self, setFilename: filename] + } + pub unsafe fn fileAttributes(&self) -> TodoGenerics { + msg_send![self, fileAttributes] + } + pub unsafe fn setFileAttributes(&self, fileAttributes: TodoGenerics) { + msg_send![self, setFileAttributes: fileAttributes] + } + pub unsafe fn serializedRepresentation(&self) -> Option> { + msg_send_id![self, serializedRepresentation] + } + pub unsafe fn fileWrappers(&self) -> TodoGenerics { + msg_send![self, fileWrappers] + } + pub unsafe fn regularFileContents(&self) -> Option> { + msg_send_id![self, regularFileContents] + } + pub unsafe fn symbolicLinkDestinationURL(&self) -> Option> { + msg_send_id![self, symbolicLinkDestinationURL] + } +} +#[doc = "NSDeprecated"] +impl NSFileWrapper { + pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithPath: path] + } + pub unsafe fn initSymbolicLinkWithDestination(&self, path: &NSString) -> Id { + msg_send_id![self, initSymbolicLinkWithDestination: path] + } + pub unsafe fn needsToBeUpdatedFromPath(&self, path: &NSString) -> bool { + msg_send![self, needsToBeUpdatedFromPath: path] + } + pub unsafe fn updateFromPath(&self, path: &NSString) -> bool { + msg_send![self, updateFromPath: path] + } + pub unsafe fn writeToFile_atomically_updateFilenames( + &self, + path: &NSString, + atomicFlag: bool, + updateFilenamesFlag: bool, + ) -> bool { + msg_send![ + self, + writeToFile: path, + atomically: atomicFlag, + updateFilenames: updateFilenamesFlag + ] + } + pub unsafe fn addFileWithPath(&self, path: &NSString) -> Id { + msg_send_id![self, addFileWithPath: path] + } + pub unsafe fn addSymbolicLinkWithDestination_preferredFilename( + &self, + path: &NSString, + filename: &NSString, + ) -> Id { + msg_send_id![ + self, + addSymbolicLinkWithDestination: path, + preferredFilename: filename + ] + } + pub unsafe fn symbolicLinkDestination(&self) -> Id { + msg_send_id![self, symbolicLinkDestination] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs new file mode 100644 index 000000000..2a9dbccf4 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -0,0 +1,72 @@ +extern_class!( + #[derive(Debug)] + struct NSFormatter; + unsafe impl ClassType for NSFormatter { + type Super = NSObject; + } +); +impl NSFormatter { + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } + pub unsafe fn attributedStringForObjectValue_withDefaultAttributes( + &self, + obj: &Object, + attrs: TodoGenerics, + ) -> Option> { + msg_send_id![ + self, + attributedStringForObjectValue: obj, + withDefaultAttributes: attrs + ] + } + pub unsafe fn editingStringForObjectValue(&self, obj: &Object) -> Option> { + msg_send_id![self, editingStringForObjectValue: obj] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: *mut Option<&Object>, + string: &NSString, + error: *mut Option<&NSString>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } + pub unsafe fn isPartialStringValid_newEditingString_errorDescription( + &self, + partialString: &NSString, + newString: *mut Option<&NSString>, + error: *mut Option<&NSString>, + ) -> bool { + msg_send![ + self, + isPartialStringValid: partialString, + newEditingString: newString, + errorDescription: error + ] + } + pub unsafe fn isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription( + &self, + partialStringPtr: NonNull<&NSString>, + proposedSelRangePtr: NSRangePointer, + origString: &NSString, + origSelRange: NSRange, + error: *mut Option<&NSString>, + ) -> bool { + msg_send![ + self, + isPartialStringValid: partialStringPtr, + proposedSelectedRange: proposedSelRangePtr, + originalString: origString, + originalSelectedRange: origSelRange, + errorDescription: error + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs new file mode 100644 index 000000000..18652c5e3 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -0,0 +1,39 @@ +extern_class!( + #[derive(Debug)] + struct NSGarbageCollector; + unsafe impl ClassType for NSGarbageCollector { + type Super = NSObject; + } +); +impl NSGarbageCollector { + pub unsafe fn defaultCollector() -> Id { + msg_send_id![Self::class(), defaultCollector] + } + pub unsafe fn isCollecting(&self) -> bool { + msg_send![self, isCollecting] + } + pub unsafe fn disable(&self) { + msg_send![self, disable] + } + pub unsafe fn enable(&self) { + msg_send![self, enable] + } + pub unsafe fn isEnabled(&self) -> bool { + msg_send![self, isEnabled] + } + pub unsafe fn collectIfNeeded(&self) { + msg_send![self, collectIfNeeded] + } + pub unsafe fn collectExhaustively(&self) { + msg_send![self, collectExhaustively] + } + pub unsafe fn disableCollectorForPointer(&self, ptr: NonNull) { + msg_send![self, disableCollectorForPointer: ptr] + } + pub unsafe fn enableCollectorForPointer(&self, ptr: NonNull) { + msg_send![self, enableCollectorForPointer: ptr] + } + pub unsafe fn zone(&self) -> NonNull { + msg_send![self, zone] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs new file mode 100644 index 000000000..0d77c2c66 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -0,0 +1,69 @@ +#[doc = "NSValueGeometryExtensions"] +impl NSValue { + pub unsafe fn valueWithPoint(point: NSPoint) -> Id { + msg_send_id![Self::class(), valueWithPoint: point] + } + pub unsafe fn valueWithSize(size: NSSize) -> Id { + msg_send_id![Self::class(), valueWithSize: size] + } + pub unsafe fn valueWithRect(rect: NSRect) -> Id { + msg_send_id![Self::class(), valueWithRect: rect] + } + pub unsafe fn valueWithEdgeInsets(insets: NSEdgeInsets) -> Id { + msg_send_id![Self::class(), valueWithEdgeInsets: insets] + } + pub unsafe fn pointValue(&self) -> NSPoint { + msg_send![self, pointValue] + } + pub unsafe fn sizeValue(&self) -> NSSize { + msg_send![self, sizeValue] + } + pub unsafe fn rectValue(&self) -> NSRect { + msg_send![self, rectValue] + } + pub unsafe fn edgeInsetsValue(&self) -> NSEdgeInsets { + msg_send![self, edgeInsetsValue] + } +} +#[doc = "NSGeometryCoding"] +impl NSCoder { + pub unsafe fn encodePoint(&self, point: NSPoint) { + msg_send![self, encodePoint: point] + } + pub unsafe fn decodePoint(&self) -> NSPoint { + msg_send![self, decodePoint] + } + pub unsafe fn encodeSize(&self, size: NSSize) { + msg_send![self, encodeSize: size] + } + pub unsafe fn decodeSize(&self) -> NSSize { + msg_send![self, decodeSize] + } + pub unsafe fn encodeRect(&self, rect: NSRect) { + msg_send![self, encodeRect: rect] + } + pub unsafe fn decodeRect(&self) -> NSRect { + msg_send![self, decodeRect] + } +} +#[doc = "NSGeometryKeyedCoding"] +impl NSCoder { + pub unsafe fn encodePoint_forKey(&self, point: NSPoint, key: &NSString) { + msg_send![self, encodePoint: point, forKey: key] + } + pub unsafe fn encodeSize_forKey(&self, size: NSSize, key: &NSString) { + msg_send![self, encodeSize: size, forKey: key] + } + pub unsafe fn encodeRect_forKey(&self, rect: NSRect, key: &NSString) { + msg_send![self, encodeRect: rect, forKey: key] + } + pub unsafe fn decodePointForKey(&self, key: &NSString) -> NSPoint { + msg_send![self, decodePointForKey: key] + } + pub unsafe fn decodeSizeForKey(&self, key: &NSString) -> NSSize { + msg_send![self, decodeSizeForKey: key] + } + pub unsafe fn decodeRectForKey(&self, key: &NSString) -> NSRect { + msg_send![self, decodeRectForKey: key] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs new file mode 100644 index 000000000..d706bda74 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -0,0 +1,72 @@ +extern_class!( + #[derive(Debug)] + struct NSHTTPCookie; + unsafe impl ClassType for NSHTTPCookie { + type Super = NSObject; + } +); +impl NSHTTPCookie { + pub unsafe fn initWithProperties(&self, properties: TodoGenerics) -> Option> { + msg_send_id![self, initWithProperties: properties] + } + pub unsafe fn cookieWithProperties( + properties: TodoGenerics, + ) -> Option> { + msg_send_id![Self::class(), cookieWithProperties: properties] + } + pub unsafe fn requestHeaderFieldsWithCookies(cookies: TodoGenerics) -> TodoGenerics { + msg_send![Self::class(), requestHeaderFieldsWithCookies: cookies] + } + pub unsafe fn cookiesWithResponseHeaderFields_forURL( + headerFields: TodoGenerics, + URL: &NSURL, + ) -> TodoGenerics { + msg_send![ + Self::class(), + cookiesWithResponseHeaderFields: headerFields, + forURL: URL + ] + } + pub unsafe fn properties(&self) -> TodoGenerics { + msg_send![self, properties] + } + pub unsafe fn version(&self) -> NSUInteger { + msg_send![self, version] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn value(&self) -> Id { + msg_send_id![self, value] + } + pub unsafe fn expiresDate(&self) -> Option> { + msg_send_id![self, expiresDate] + } + pub unsafe fn isSessionOnly(&self) -> bool { + msg_send![self, isSessionOnly] + } + pub unsafe fn domain(&self) -> Id { + msg_send_id![self, domain] + } + pub unsafe fn path(&self) -> Id { + msg_send_id![self, path] + } + pub unsafe fn isSecure(&self) -> bool { + msg_send![self, isSecure] + } + pub unsafe fn isHTTPOnly(&self) -> bool { + msg_send![self, isHTTPOnly] + } + pub unsafe fn comment(&self) -> Option> { + msg_send_id![self, comment] + } + pub unsafe fn commentURL(&self) -> Option> { + msg_send_id![self, commentURL] + } + pub unsafe fn portList(&self) -> TodoGenerics { + msg_send![self, portList] + } + pub unsafe fn sameSitePolicy(&self) -> NSHTTPCookieStringPolicy { + msg_send![self, sameSitePolicy] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs new file mode 100644 index 000000000..f21978951 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -0,0 +1,74 @@ +extern_class!( + #[derive(Debug)] + struct NSHTTPCookieStorage; + unsafe impl ClassType for NSHTTPCookieStorage { + type Super = NSObject; + } +); +impl NSHTTPCookieStorage { + pub unsafe fn sharedCookieStorageForGroupContainerIdentifier( + identifier: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + sharedCookieStorageForGroupContainerIdentifier: identifier + ] + } + pub unsafe fn setCookie(&self, cookie: &NSHTTPCookie) { + msg_send![self, setCookie: cookie] + } + pub unsafe fn deleteCookie(&self, cookie: &NSHTTPCookie) { + msg_send![self, deleteCookie: cookie] + } + pub unsafe fn removeCookiesSinceDate(&self, date: &NSDate) { + msg_send![self, removeCookiesSinceDate: date] + } + pub unsafe fn cookiesForURL(&self, URL: &NSURL) -> TodoGenerics { + msg_send![self, cookiesForURL: URL] + } + pub unsafe fn setCookies_forURL_mainDocumentURL( + &self, + cookies: TodoGenerics, + URL: Option<&NSURL>, + mainDocumentURL: Option<&NSURL>, + ) { + msg_send![ + self, + setCookies: cookies, + forURL: URL, + mainDocumentURL: mainDocumentURL + ] + } + pub unsafe fn sortedCookiesUsingDescriptors(&self, sortOrder: TodoGenerics) -> TodoGenerics { + msg_send![self, sortedCookiesUsingDescriptors: sortOrder] + } + pub unsafe fn sharedHTTPCookieStorage() -> Id { + msg_send_id![Self::class(), sharedHTTPCookieStorage] + } + pub unsafe fn cookies(&self) -> TodoGenerics { + msg_send![self, cookies] + } + pub unsafe fn cookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy { + msg_send![self, cookieAcceptPolicy] + } + pub unsafe fn setCookieAcceptPolicy(&self, cookieAcceptPolicy: NSHTTPCookieAcceptPolicy) { + msg_send![self, setCookieAcceptPolicy: cookieAcceptPolicy] + } +} +#[doc = "NSURLSessionTaskAdditions"] +impl NSHTTPCookieStorage { + pub unsafe fn storeCookies_forTask(&self, cookies: TodoGenerics, task: &NSURLSessionTask) { + msg_send![self, storeCookies: cookies, forTask: task] + } + pub unsafe fn getCookiesForTask_completionHandler( + &self, + task: &NSURLSessionTask, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getCookiesForTask: task, + completionHandler: completionHandler + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs new file mode 100644 index 000000000..4d0ceef77 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -0,0 +1,87 @@ +extern_class!( + #[derive(Debug)] + struct NSHashTable; + unsafe impl ClassType for NSHashTable { + type Super = NSObject; + } +); +impl NSHashTable { + pub unsafe fn initWithOptions_capacity( + &self, + options: NSPointerFunctionsOptions, + initialCapacity: NSUInteger, + ) -> Id { + msg_send_id![self, initWithOptions: options, capacity: initialCapacity] + } + pub unsafe fn initWithPointerFunctions_capacity( + &self, + functions: &NSPointerFunctions, + initialCapacity: NSUInteger, + ) -> Id { + msg_send_id![ + self, + initWithPointerFunctions: functions, + capacity: initialCapacity + ] + } + pub unsafe fn hashTableWithOptions(options: NSPointerFunctionsOptions) -> TodoGenerics { + msg_send![Self::class(), hashTableWithOptions: options] + } + pub unsafe fn hashTableWithWeakObjects() -> Id { + msg_send_id![Self::class(), hashTableWithWeakObjects] + } + pub unsafe fn weakObjectsHashTable() -> TodoGenerics { + msg_send![Self::class(), weakObjectsHashTable] + } + pub unsafe fn member(&self, object: ObjectType) -> ObjectType { + msg_send![self, member: object] + } + pub unsafe fn objectEnumerator(&self) -> TodoGenerics { + msg_send![self, objectEnumerator] + } + pub unsafe fn addObject(&self, object: ObjectType) { + msg_send![self, addObject: object] + } + pub unsafe fn removeObject(&self, object: ObjectType) { + msg_send![self, removeObject: object] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn containsObject(&self, anObject: ObjectType) -> bool { + msg_send![self, containsObject: anObject] + } + pub unsafe fn intersectsHashTable(&self, other: TodoGenerics) -> bool { + msg_send![self, intersectsHashTable: other] + } + pub unsafe fn isEqualToHashTable(&self, other: TodoGenerics) -> bool { + msg_send![self, isEqualToHashTable: other] + } + pub unsafe fn isSubsetOfHashTable(&self, other: TodoGenerics) -> bool { + msg_send![self, isSubsetOfHashTable: other] + } + pub unsafe fn intersectHashTable(&self, other: TodoGenerics) { + msg_send![self, intersectHashTable: other] + } + pub unsafe fn unionHashTable(&self, other: TodoGenerics) { + msg_send![self, unionHashTable: other] + } + pub unsafe fn minusHashTable(&self, other: TodoGenerics) { + msg_send![self, minusHashTable: other] + } + pub unsafe fn pointerFunctions(&self) -> Id { + msg_send_id![self, pointerFunctions] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn allObjects(&self) -> TodoGenerics { + msg_send![self, allObjects] + } + pub unsafe fn anyObject(&self) -> ObjectType { + msg_send![self, anyObject] + } + pub unsafe fn setRepresentation(&self) -> TodoGenerics { + msg_send![self, setRepresentation] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs new file mode 100644 index 000000000..5a1c14f63 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -0,0 +1,45 @@ +extern_class!( + #[derive(Debug)] + struct NSHost; + unsafe impl ClassType for NSHost { + type Super = NSObject; + } +); +impl NSHost { + pub unsafe fn currentHost() -> Id { + msg_send_id![Self::class(), currentHost] + } + pub unsafe fn hostWithName(name: Option<&NSString>) -> Id { + msg_send_id![Self::class(), hostWithName: name] + } + pub unsafe fn hostWithAddress(address: &NSString) -> Id { + msg_send_id![Self::class(), hostWithAddress: address] + } + pub unsafe fn isEqualToHost(&self, aHost: &NSHost) -> bool { + msg_send![self, isEqualToHost: aHost] + } + pub unsafe fn setHostCacheEnabled(flag: bool) { + msg_send![Self::class(), setHostCacheEnabled: flag] + } + pub unsafe fn isHostCacheEnabled() -> bool { + msg_send![Self::class(), isHostCacheEnabled] + } + pub unsafe fn flushHostCache() { + msg_send![Self::class(), flushHostCache] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn names(&self) -> TodoGenerics { + msg_send![self, names] + } + pub unsafe fn address(&self) -> Option> { + msg_send_id![self, address] + } + pub unsafe fn addresses(&self) -> TodoGenerics { + msg_send![self, addresses] + } + pub unsafe fn localizedName(&self) -> Option> { + msg_send_id![self, localizedName] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs new file mode 100644 index 000000000..dc9ae2b97 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -0,0 +1,42 @@ +extern_class!( + #[derive(Debug)] + struct NSISO8601DateFormatter; + unsafe impl ClassType for NSISO8601DateFormatter { + type Super = NSFormatter; + } +); +impl NSISO8601DateFormatter { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id { + msg_send_id![self, stringFromDate: date] + } + pub unsafe fn dateFromString(&self, string: &NSString) -> Option> { + msg_send_id![self, dateFromString: string] + } + pub unsafe fn stringFromDate_timeZone_formatOptions( + date: &NSDate, + timeZone: &NSTimeZone, + formatOptions: NSISO8601DateFormatOptions, + ) -> Id { + msg_send_id![ + Self::class(), + stringFromDate: date, + timeZone: timeZone, + formatOptions: formatOptions + ] + } + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn formatOptions(&self) -> NSISO8601DateFormatOptions { + msg_send![self, formatOptions] + } + pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions) { + msg_send![self, setFormatOptions: formatOptions] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs new file mode 100644 index 000000000..a0c8babb8 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -0,0 +1,52 @@ +extern_class!( + #[derive(Debug)] + struct NSIndexPath; + unsafe impl ClassType for NSIndexPath { + type Super = NSObject; + } +); +impl NSIndexPath { + pub unsafe fn indexPathWithIndex(index: NSUInteger) -> Id { + msg_send_id![Self::class(), indexPathWithIndex: index] + } + pub unsafe fn indexPathWithIndexes_length( + indexes: TodoArray, + length: NSUInteger, + ) -> Id { + msg_send_id![Self::class(), indexPathWithIndexes: indexes, length: length] + } + pub unsafe fn initWithIndexes_length( + &self, + indexes: TodoArray, + length: NSUInteger, + ) -> Id { + msg_send_id![self, initWithIndexes: indexes, length: length] + } + pub unsafe fn initWithIndex(&self, index: NSUInteger) -> Id { + msg_send_id![self, initWithIndex: index] + } + pub unsafe fn indexPathByAddingIndex(&self, index: NSUInteger) -> Id { + msg_send_id![self, indexPathByAddingIndex: index] + } + pub unsafe fn indexPathByRemovingLastIndex(&self) -> Id { + msg_send_id![self, indexPathByRemovingLastIndex] + } + pub unsafe fn indexAtPosition(&self, position: NSUInteger) -> NSUInteger { + msg_send![self, indexAtPosition: position] + } + pub unsafe fn getIndexes_range(&self, indexes: NonNull, positionRange: NSRange) { + msg_send![self, getIndexes: indexes, range: positionRange] + } + pub unsafe fn compare(&self, otherObject: &NSIndexPath) -> NSComparisonResult { + msg_send![self, compare: otherObject] + } + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } +} +#[doc = "NSDeprecated"] +impl NSIndexPath { + pub unsafe fn getIndexes(&self, indexes: NonNull) { + msg_send![self, getIndexes: indexes] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs new file mode 100644 index 000000000..a1e351647 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -0,0 +1,204 @@ +extern_class!( + #[derive(Debug)] + struct NSIndexSet; + unsafe impl ClassType for NSIndexSet { + type Super = NSObject; + } +); +impl NSIndexSet { + pub unsafe fn indexSet() -> Id { + msg_send_id![Self::class(), indexSet] + } + pub unsafe fn indexSetWithIndex(value: NSUInteger) -> Id { + msg_send_id![Self::class(), indexSetWithIndex: value] + } + pub unsafe fn indexSetWithIndexesInRange(range: NSRange) -> Id { + msg_send_id![Self::class(), indexSetWithIndexesInRange: range] + } + pub unsafe fn initWithIndexesInRange(&self, range: NSRange) -> Id { + msg_send_id![self, initWithIndexesInRange: range] + } + pub unsafe fn initWithIndexSet(&self, indexSet: &NSIndexSet) -> Id { + msg_send_id![self, initWithIndexSet: indexSet] + } + pub unsafe fn initWithIndex(&self, value: NSUInteger) -> Id { + msg_send_id![self, initWithIndex: value] + } + pub unsafe fn isEqualToIndexSet(&self, indexSet: &NSIndexSet) -> bool { + msg_send![self, isEqualToIndexSet: indexSet] + } + pub unsafe fn indexGreaterThanIndex(&self, value: NSUInteger) -> NSUInteger { + msg_send![self, indexGreaterThanIndex: value] + } + pub unsafe fn indexLessThanIndex(&self, value: NSUInteger) -> NSUInteger { + msg_send![self, indexLessThanIndex: value] + } + pub unsafe fn indexGreaterThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger { + msg_send![self, indexGreaterThanOrEqualToIndex: value] + } + pub unsafe fn indexLessThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger { + msg_send![self, indexLessThanOrEqualToIndex: value] + } + pub unsafe fn getIndexes_maxCount_inIndexRange( + &self, + indexBuffer: NonNull, + bufferSize: NSUInteger, + range: NSRangePointer, + ) -> NSUInteger { + msg_send![ + self, + getIndexes: indexBuffer, + maxCount: bufferSize, + inIndexRange: range + ] + } + pub unsafe fn countOfIndexesInRange(&self, range: NSRange) -> NSUInteger { + msg_send![self, countOfIndexesInRange: range] + } + pub unsafe fn containsIndex(&self, value: NSUInteger) -> bool { + msg_send![self, containsIndex: value] + } + pub unsafe fn containsIndexesInRange(&self, range: NSRange) -> bool { + msg_send![self, containsIndexesInRange: range] + } + pub unsafe fn containsIndexes(&self, indexSet: &NSIndexSet) -> bool { + msg_send![self, containsIndexes: indexSet] + } + pub unsafe fn intersectsIndexesInRange(&self, range: NSRange) -> bool { + msg_send![self, intersectsIndexesInRange: range] + } + pub unsafe fn enumerateIndexesUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateIndexesUsingBlock: block] + } + pub unsafe fn enumerateIndexesWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateIndexesWithOptions: opts, usingBlock: block] + } + pub unsafe fn enumerateIndexesInRange_options_usingBlock( + &self, + range: NSRange, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateIndexesInRange: range, + options: opts, + usingBlock: block + ] + } + pub unsafe fn indexPassingTest(&self, predicate: TodoBlock) -> NSUInteger { + msg_send![self, indexPassingTest: predicate] + } + pub unsafe fn indexWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![self, indexWithOptions: opts, passingTest: predicate] + } + pub unsafe fn indexInRange_options_passingTest( + &self, + range: NSRange, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![ + self, + indexInRange: range, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn indexesPassingTest(&self, predicate: TodoBlock) -> Id { + msg_send_id![self, indexesPassingTest: predicate] + } + pub unsafe fn indexesWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![self, indexesWithOptions: opts, passingTest: predicate] + } + pub unsafe fn indexesInRange_options_passingTest( + &self, + range: NSRange, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![ + self, + indexesInRange: range, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn enumerateRangesUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateRangesUsingBlock: block] + } + pub unsafe fn enumerateRangesWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateRangesWithOptions: opts, usingBlock: block] + } + pub unsafe fn enumerateRangesInRange_options_usingBlock( + &self, + range: NSRange, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateRangesInRange: range, + options: opts, + usingBlock: block + ] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn firstIndex(&self) -> NSUInteger { + msg_send![self, firstIndex] + } + pub unsafe fn lastIndex(&self) -> NSUInteger { + msg_send![self, lastIndex] + } +} +extern_class!( + #[derive(Debug)] + struct NSMutableIndexSet; + unsafe impl ClassType for NSMutableIndexSet { + type Super = NSIndexSet; + } +); +impl NSMutableIndexSet { + pub unsafe fn addIndexes(&self, indexSet: &NSIndexSet) { + msg_send![self, addIndexes: indexSet] + } + pub unsafe fn removeIndexes(&self, indexSet: &NSIndexSet) { + msg_send![self, removeIndexes: indexSet] + } + pub unsafe fn removeAllIndexes(&self) { + msg_send![self, removeAllIndexes] + } + pub unsafe fn addIndex(&self, value: NSUInteger) { + msg_send![self, addIndex: value] + } + pub unsafe fn removeIndex(&self, value: NSUInteger) { + msg_send![self, removeIndex: value] + } + pub unsafe fn addIndexesInRange(&self, range: NSRange) { + msg_send![self, addIndexesInRange: range] + } + pub unsafe fn removeIndexesInRange(&self, range: NSRange) { + msg_send![self, removeIndexesInRange: range] + } + pub unsafe fn shiftIndexesStartingAtIndex_by(&self, index: NSUInteger, delta: NSInteger) { + msg_send![self, shiftIndexesStartingAtIndex: index, by: delta] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs new file mode 100644 index 000000000..0110a6e65 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -0,0 +1,39 @@ +extern_class!( + #[derive(Debug)] + struct NSInflectionRule; + unsafe impl ClassType for NSInflectionRule { + type Super = NSObject; + } +); +impl NSInflectionRule { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn automaticRule() -> Id { + msg_send_id![Self::class(), automaticRule] + } +} +extern_class!( + #[derive(Debug)] + struct NSInflectionRuleExplicit; + unsafe impl ClassType for NSInflectionRuleExplicit { + type Super = NSInflectionRule; + } +); +impl NSInflectionRuleExplicit { + pub unsafe fn initWithMorphology(&self, morphology: &NSMorphology) -> Id { + msg_send_id![self, initWithMorphology: morphology] + } + pub unsafe fn morphology(&self) -> Id { + msg_send_id![self, morphology] + } +} +#[doc = "NSInflectionAvailability"] +impl NSInflectionRule { + pub unsafe fn canInflectLanguage(language: &NSString) -> bool { + msg_send![Self::class(), canInflectLanguage: language] + } + pub unsafe fn canInflectPreferredLocalization() -> bool { + msg_send![Self::class(), canInflectPreferredLocalization] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs new file mode 100644 index 000000000..f02abd8b4 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -0,0 +1,53 @@ +extern_class!( + #[derive(Debug)] + struct NSInvocation; + unsafe impl ClassType for NSInvocation { + type Super = NSObject; + } +); +impl NSInvocation { + pub unsafe fn invocationWithMethodSignature( + sig: &NSMethodSignature, + ) -> Id { + msg_send_id![Self::class(), invocationWithMethodSignature: sig] + } + pub unsafe fn retainArguments(&self) { + msg_send![self, retainArguments] + } + pub unsafe fn getReturnValue(&self, retLoc: NonNull) { + msg_send![self, getReturnValue: retLoc] + } + pub unsafe fn setReturnValue(&self, retLoc: NonNull) { + msg_send![self, setReturnValue: retLoc] + } + pub unsafe fn getArgument_atIndex(&self, argumentLocation: NonNull, idx: NSInteger) { + msg_send![self, getArgument: argumentLocation, atIndex: idx] + } + pub unsafe fn setArgument_atIndex(&self, argumentLocation: NonNull, idx: NSInteger) { + msg_send![self, setArgument: argumentLocation, atIndex: idx] + } + pub unsafe fn invoke(&self) { + msg_send![self, invoke] + } + pub unsafe fn invokeWithTarget(&self, target: &Object) { + msg_send![self, invokeWithTarget: target] + } + pub unsafe fn methodSignature(&self) -> Id { + msg_send_id![self, methodSignature] + } + pub unsafe fn argumentsRetained(&self) -> bool { + msg_send![self, argumentsRetained] + } + pub unsafe fn target(&self) -> Option> { + msg_send_id![self, target] + } + pub unsafe fn setTarget(&self, target: Option<&Object>) { + msg_send![self, setTarget: target] + } + pub unsafe fn selector(&self) -> Sel { + msg_send![self, selector] + } + pub unsafe fn setSelector(&self, selector: Sel) { + msg_send![self, setSelector: selector] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs new file mode 100644 index 000000000..02d440d79 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -0,0 +1,196 @@ +extern_class!( + #[derive(Debug)] + struct NSItemProvider; + unsafe impl ClassType for NSItemProvider { + type Super = NSObject; + } +); +impl NSItemProvider { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn registerDataRepresentationForTypeIdentifier_visibility_loadHandler( + &self, + typeIdentifier: &NSString, + visibility: NSItemProviderRepresentationVisibility, + loadHandler: TodoBlock, + ) { + msg_send![ + self, + registerDataRepresentationForTypeIdentifier: typeIdentifier, + visibility: visibility, + loadHandler: loadHandler + ] + } + pub unsafe fn registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler( + &self, + typeIdentifier: &NSString, + fileOptions: NSItemProviderFileOptions, + visibility: NSItemProviderRepresentationVisibility, + loadHandler: TodoBlock, + ) { + msg_send![ + self, + registerFileRepresentationForTypeIdentifier: typeIdentifier, + fileOptions: fileOptions, + visibility: visibility, + loadHandler: loadHandler + ] + } + pub unsafe fn registeredTypeIdentifiersWithFileOptions( + &self, + fileOptions: NSItemProviderFileOptions, + ) -> TodoGenerics { + msg_send![self, registeredTypeIdentifiersWithFileOptions: fileOptions] + } + pub unsafe fn hasItemConformingToTypeIdentifier(&self, typeIdentifier: &NSString) -> bool { + msg_send![self, hasItemConformingToTypeIdentifier: typeIdentifier] + } + pub unsafe fn hasRepresentationConformingToTypeIdentifier_fileOptions( + &self, + typeIdentifier: &NSString, + fileOptions: NSItemProviderFileOptions, + ) -> bool { + msg_send![ + self, + hasRepresentationConformingToTypeIdentifier: typeIdentifier, + fileOptions: fileOptions + ] + } + pub unsafe fn loadDataRepresentationForTypeIdentifier_completionHandler( + &self, + typeIdentifier: &NSString, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + loadDataRepresentationForTypeIdentifier: typeIdentifier, + completionHandler: completionHandler + ] + } + pub unsafe fn loadFileRepresentationForTypeIdentifier_completionHandler( + &self, + typeIdentifier: &NSString, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + loadFileRepresentationForTypeIdentifier: typeIdentifier, + completionHandler: completionHandler + ] + } + pub unsafe fn loadInPlaceFileRepresentationForTypeIdentifier_completionHandler( + &self, + typeIdentifier: &NSString, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + loadInPlaceFileRepresentationForTypeIdentifier: typeIdentifier, + completionHandler: completionHandler + ] + } + pub unsafe fn initWithObject(&self, object: TodoGenerics) -> Id { + msg_send_id![self, initWithObject: object] + } + pub unsafe fn registerObject_visibility( + &self, + object: TodoGenerics, + visibility: NSItemProviderRepresentationVisibility, + ) { + msg_send![self, registerObject: object, visibility: visibility] + } + pub unsafe fn registerObjectOfClass_visibility_loadHandler( + &self, + aClass: TodoGenerics, + visibility: NSItemProviderRepresentationVisibility, + loadHandler: TodoBlock, + ) { + msg_send![ + self, + registerObjectOfClass: aClass, + visibility: visibility, + loadHandler: loadHandler + ] + } + pub unsafe fn canLoadObjectOfClass(&self, aClass: TodoGenerics) -> bool { + msg_send![self, canLoadObjectOfClass: aClass] + } + pub unsafe fn loadObjectOfClass_completionHandler( + &self, + aClass: TodoGenerics, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + loadObjectOfClass: aClass, + completionHandler: completionHandler + ] + } + pub unsafe fn initWithItem_typeIdentifier( + &self, + item: TodoGenerics, + typeIdentifier: Option<&NSString>, + ) -> Id { + msg_send_id![self, initWithItem: item, typeIdentifier: typeIdentifier] + } + pub unsafe fn initWithContentsOfURL( + &self, + fileURL: Option<&NSURL>, + ) -> Option> { + msg_send_id![self, initWithContentsOfURL: fileURL] + } + pub unsafe fn registerItemForTypeIdentifier_loadHandler( + &self, + typeIdentifier: &NSString, + loadHandler: NSItemProviderLoadHandler, + ) { + msg_send![ + self, + registerItemForTypeIdentifier: typeIdentifier, + loadHandler: loadHandler + ] + } + pub unsafe fn loadItemForTypeIdentifier_options_completionHandler( + &self, + typeIdentifier: &NSString, + options: Option<&NSDictionary>, + completionHandler: NSItemProviderCompletionHandler, + ) { + msg_send![ + self, + loadItemForTypeIdentifier: typeIdentifier, + options: options, + completionHandler: completionHandler + ] + } + pub unsafe fn registeredTypeIdentifiers(&self) -> TodoGenerics { + msg_send![self, registeredTypeIdentifiers] + } + pub unsafe fn suggestedName(&self) -> Option> { + msg_send_id![self, suggestedName] + } + pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>) { + msg_send![self, setSuggestedName: suggestedName] + } +} +#[doc = "NSPreviewSupport"] +impl NSItemProvider { + pub unsafe fn loadPreviewImageWithOptions_completionHandler( + &self, + options: Option<&NSDictionary>, + completionHandler: NSItemProviderCompletionHandler, + ) { + msg_send![ + self, + loadPreviewImageWithOptions: options, + completionHandler: completionHandler + ] + } + pub unsafe fn previewImageHandler(&self) -> NSItemProviderLoadHandler { + msg_send![self, previewImageHandler] + } + pub unsafe fn setPreviewImageHandler(&self, previewImageHandler: NSItemProviderLoadHandler) { + msg_send![self, setPreviewImageHandler: previewImageHandler] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs new file mode 100644 index 000000000..858dba5e8 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -0,0 +1,62 @@ +extern_class!( + #[derive(Debug)] + struct NSJSONSerialization; + unsafe impl ClassType for NSJSONSerialization { + type Super = NSObject; + } +); +impl NSJSONSerialization { + pub unsafe fn isValidJSONObject(obj: &Object) -> bool { + msg_send![Self::class(), isValidJSONObject: obj] + } + pub unsafe fn dataWithJSONObject_options_error( + obj: &Object, + opt: NSJSONWritingOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + dataWithJSONObject: obj, + options: opt, + error: error + ] + } + pub unsafe fn JSONObjectWithData_options_error( + data: &NSData, + opt: NSJSONReadingOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + JSONObjectWithData: data, + options: opt, + error: error + ] + } + pub unsafe fn writeJSONObject_toStream_options_error( + obj: &Object, + stream: &NSOutputStream, + opt: NSJSONWritingOptions, + error: *mut Option<&NSError>, + ) -> NSInteger { + msg_send![ + Self::class(), + writeJSONObject: obj, + toStream: stream, + options: opt, + error: error + ] + } + pub unsafe fn JSONObjectWithStream_options_error( + stream: &NSInputStream, + opt: NSJSONReadingOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + JSONObjectWithStream: stream, + options: opt, + error: error + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs new file mode 100644 index 000000000..98ede10dd --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -0,0 +1,153 @@ +#[doc = "NSKeyValueCoding"] +impl NSObject { + pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } + pub unsafe fn validateValue_forKey_error( + &self, + ioValue: NonNull>, + inKey: &NSString, + outError: *mut Option<&NSError>, + ) -> bool { + msg_send![self, validateValue: ioValue, forKey: inKey, error: outError] + } + pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, mutableArrayValueForKey: key] + } + pub unsafe fn mutableOrderedSetValueForKey( + &self, + key: &NSString, + ) -> Id { + msg_send_id![self, mutableOrderedSetValueForKey: key] + } + pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, mutableSetValueForKey: key] + } + pub unsafe fn valueForKeyPath(&self, keyPath: &NSString) -> Option> { + msg_send_id![self, valueForKeyPath: keyPath] + } + pub unsafe fn setValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { + msg_send![self, setValue: value, forKeyPath: keyPath] + } + pub unsafe fn validateValue_forKeyPath_error( + &self, + ioValue: NonNull>, + inKeyPath: &NSString, + outError: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + validateValue: ioValue, + forKeyPath: inKeyPath, + error: outError + ] + } + pub unsafe fn mutableArrayValueForKeyPath( + &self, + keyPath: &NSString, + ) -> Id { + msg_send_id![self, mutableArrayValueForKeyPath: keyPath] + } + pub unsafe fn mutableOrderedSetValueForKeyPath( + &self, + keyPath: &NSString, + ) -> Id { + msg_send_id![self, mutableOrderedSetValueForKeyPath: keyPath] + } + pub unsafe fn mutableSetValueForKeyPath(&self, keyPath: &NSString) -> Id { + msg_send_id![self, mutableSetValueForKeyPath: keyPath] + } + pub unsafe fn valueForUndefinedKey(&self, key: &NSString) -> Option> { + msg_send_id![self, valueForUndefinedKey: key] + } + pub unsafe fn setValue_forUndefinedKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forUndefinedKey: key] + } + pub unsafe fn setNilValueForKey(&self, key: &NSString) { + msg_send![self, setNilValueForKey: key] + } + pub unsafe fn dictionaryWithValuesForKeys(&self, keys: TodoGenerics) -> TodoGenerics { + msg_send![self, dictionaryWithValuesForKeys: keys] + } + pub unsafe fn setValuesForKeysWithDictionary(&self, keyedValues: TodoGenerics) { + msg_send![self, setValuesForKeysWithDictionary: keyedValues] + } + pub unsafe fn accessInstanceVariablesDirectly() -> bool { + msg_send![Self::class(), accessInstanceVariablesDirectly] + } +} +#[doc = "NSKeyValueCoding"] +impl NSArray { + pub unsafe fn valueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } +} +#[doc = "NSKeyValueCoding"] +impl NSDictionary { + pub unsafe fn valueForKey(&self, key: &NSString) -> ObjectType { + msg_send![self, valueForKey: key] + } +} +#[doc = "NSKeyValueCoding"] +impl NSMutableDictionary { + pub unsafe fn setValue_forKey(&self, value: ObjectType, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } +} +#[doc = "NSKeyValueCoding"] +impl NSOrderedSet { + pub unsafe fn valueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } +} +#[doc = "NSKeyValueCoding"] +impl NSSet { + pub unsafe fn valueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } +} +#[doc = "NSDeprecatedKeyValueCoding"] +impl NSObject { + pub unsafe fn useStoredAccessor() -> bool { + msg_send![Self::class(), useStoredAccessor] + } + pub unsafe fn storedValueForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, storedValueForKey: key] + } + pub unsafe fn takeStoredValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, takeStoredValue: value, forKey: key] + } + pub unsafe fn takeValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, takeValue: value, forKey: key] + } + pub unsafe fn takeValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { + msg_send![self, takeValue: value, forKeyPath: keyPath] + } + pub unsafe fn handleQueryWithUnboundKey(&self, key: &NSString) -> Option> { + msg_send_id![self, handleQueryWithUnboundKey: key] + } + pub unsafe fn handleTakeValue_forUnboundKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, handleTakeValue: value, forUnboundKey: key] + } + pub unsafe fn unableToSetNilForKey(&self, key: &NSString) { + msg_send![self, unableToSetNilForKey: key] + } + pub unsafe fn valuesForKeys(&self, keys: &NSArray) -> Id { + msg_send_id![self, valuesForKeys: keys] + } + pub unsafe fn takeValuesFromDictionary(&self, properties: &NSDictionary) { + msg_send![self, takeValuesFromDictionary: properties] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs new file mode 100644 index 000000000..707ada86a --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -0,0 +1,288 @@ +#[doc = "NSKeyValueObserving"] +impl NSObject { + pub unsafe fn observeValueForKeyPath_ofObject_change_context( + &self, + keyPath: Option<&NSString>, + object: Option<&Object>, + change: TodoGenerics, + context: *mut c_void, + ) { + msg_send![ + self, + observeValueForKeyPath: keyPath, + ofObject: object, + change: change, + context: context + ] + } +} +#[doc = "NSKeyValueObserverRegistration"] +impl NSObject { + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } +} +#[doc = "NSKeyValueObserverRegistration"] +impl NSArray { + pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + toObjectsAtIndexes: indexes, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath_context( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + fromObjectsAtIndexes: indexes, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + ) { + msg_send![ + self, + removeObserver: observer, + fromObjectsAtIndexes: indexes, + forKeyPath: keyPath + ] + } + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } +} +#[doc = "NSKeyValueObserverRegistration"] +impl NSOrderedSet { + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } +} +#[doc = "NSKeyValueObserverRegistration"] +impl NSSet { + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } +} +#[doc = "NSKeyValueObserverNotification"] +impl NSObject { + pub unsafe fn willChangeValueForKey(&self, key: &NSString) { + msg_send![self, willChangeValueForKey: key] + } + pub unsafe fn didChangeValueForKey(&self, key: &NSString) { + msg_send![self, didChangeValueForKey: key] + } + pub unsafe fn willChange_valuesAtIndexes_forKey( + &self, + changeKind: NSKeyValueChange, + indexes: &NSIndexSet, + key: &NSString, + ) { + msg_send![ + self, + willChange: changeKind, + valuesAtIndexes: indexes, + forKey: key + ] + } + pub unsafe fn didChange_valuesAtIndexes_forKey( + &self, + changeKind: NSKeyValueChange, + indexes: &NSIndexSet, + key: &NSString, + ) { + msg_send![ + self, + didChange: changeKind, + valuesAtIndexes: indexes, + forKey: key + ] + } + pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects( + &self, + key: &NSString, + mutationKind: NSKeyValueSetMutationKind, + objects: &NSSet, + ) { + msg_send![ + self, + willChangeValueForKey: key, + withSetMutation: mutationKind, + usingObjects: objects + ] + } + pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects( + &self, + key: &NSString, + mutationKind: NSKeyValueSetMutationKind, + objects: &NSSet, + ) { + msg_send![ + self, + didChangeValueForKey: key, + withSetMutation: mutationKind, + usingObjects: objects + ] + } +} +#[doc = "NSKeyValueObservingCustomization"] +impl NSObject { + pub unsafe fn keyPathsForValuesAffectingValueForKey(key: &NSString) -> TodoGenerics { + msg_send![Self::class(), keyPathsForValuesAffectingValueForKey: key] + } + pub unsafe fn automaticallyNotifiesObserversForKey(key: &NSString) -> bool { + msg_send![Self::class(), automaticallyNotifiesObserversForKey: key] + } + pub unsafe fn observationInfo(&self) -> *mut c_void { + msg_send![self, observationInfo] + } + pub unsafe fn setObservationInfo(&self, observationInfo: *mut c_void) { + msg_send![self, setObservationInfo: observationInfo] + } +} +#[doc = "NSDeprecatedKeyValueObservingCustomization"] +impl NSObject { + pub unsafe fn setKeys_triggerChangeNotificationsForDependentKey( + keys: &NSArray, + dependentKey: &NSString, + ) { + msg_send![ + Self::class(), + setKeys: keys, + triggerChangeNotificationsForDependentKey: dependentKey + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs new file mode 100644 index 000000000..b29abc318 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -0,0 +1,303 @@ +extern_class!( + #[derive(Debug)] + struct NSKeyedArchiver; + unsafe impl ClassType for NSKeyedArchiver { + type Super = NSCoder; + } +); +impl NSKeyedArchiver { + pub unsafe fn initRequiringSecureCoding(&self, requiresSecureCoding: bool) -> Id { + msg_send_id![self, initRequiringSecureCoding: requiresSecureCoding] + } + pub unsafe fn archivedDataWithRootObject_requiringSecureCoding_error( + object: &Object, + requiresSecureCoding: bool, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + archivedDataWithRootObject: object, + requiringSecureCoding: requiresSecureCoding, + error: error + ] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initForWritingWithMutableData(&self, data: &NSMutableData) -> Id { + msg_send_id![self, initForWritingWithMutableData: data] + } + pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id { + msg_send_id![Self::class(), archivedDataWithRootObject: rootObject] + } + pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool { + msg_send![Self::class(), archiveRootObject: rootObject, toFile: path] + } + pub unsafe fn finishEncoding(&self) { + msg_send![self, finishEncoding] + } + pub unsafe fn setClassName_forClass(codedName: Option<&NSString>, cls: &Class) { + msg_send![Self::class(), setClassName: codedName, forClass: cls] + } + pub unsafe fn setClassName_forClass(&self, codedName: Option<&NSString>, cls: &Class) { + msg_send![self, setClassName: codedName, forClass: cls] + } + pub unsafe fn classNameForClass(cls: &Class) -> Option> { + msg_send_id![Self::class(), classNameForClass: cls] + } + pub unsafe fn classNameForClass(&self, cls: &Class) -> Option> { + msg_send_id![self, classNameForClass: cls] + } + pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString) { + msg_send![self, encodeObject: object, forKey: key] + } + pub unsafe fn encodeConditionalObject_forKey(&self, object: Option<&Object>, key: &NSString) { + msg_send![self, encodeConditionalObject: object, forKey: key] + } + pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString) { + msg_send![self, encodeBool: value, forKey: key] + } + pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString) { + msg_send![self, encodeInt: value, forKey: key] + } + pub unsafe fn encodeInt32_forKey(&self, value: int32_t, key: &NSString) { + msg_send![self, encodeInt32: value, forKey: key] + } + pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString) { + msg_send![self, encodeInt64: value, forKey: key] + } + pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString) { + msg_send![self, encodeFloat: value, forKey: key] + } + pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString) { + msg_send![self, encodeDouble: value, forKey: key] + } + pub unsafe fn encodeBytes_length_forKey( + &self, + bytes: *mut uint8_t, + length: NSUInteger, + key: &NSString, + ) { + msg_send![self, encodeBytes: bytes, length: length, forKey: key] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn outputFormat(&self) -> NSPropertyListFormat { + msg_send![self, outputFormat] + } + pub unsafe fn setOutputFormat(&self, outputFormat: NSPropertyListFormat) { + msg_send![self, setOutputFormat: outputFormat] + } + pub unsafe fn encodedData(&self) -> Id { + msg_send_id![self, encodedData] + } + pub unsafe fn requiresSecureCoding(&self) -> bool { + msg_send![self, requiresSecureCoding] + } + pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool) { + msg_send![self, setRequiresSecureCoding: requiresSecureCoding] + } +} +extern_class!( + #[derive(Debug)] + struct NSKeyedUnarchiver; + unsafe impl ClassType for NSKeyedUnarchiver { + type Super = NSCoder; + } +); +impl NSKeyedUnarchiver { + pub unsafe fn initForReadingFromData_error( + &self, + data: &NSData, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, initForReadingFromData: data, error: error] + } + pub unsafe fn unarchivedObjectOfClass_fromData_error( + cls: &Class, + data: &NSData, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + unarchivedObjectOfClass: cls, + fromData: data, + error: error + ] + } + pub unsafe fn unarchivedArrayOfObjectsOfClass_fromData_error( + cls: &Class, + data: &NSData, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + unarchivedArrayOfObjectsOfClass: cls, + fromData: data, + error: error + ] + } + pub unsafe fn unarchivedDictionaryWithKeysOfClass_objectsOfClass_fromData_error( + keyCls: &Class, + valueCls: &Class, + data: &NSData, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + unarchivedDictionaryWithKeysOfClass: keyCls, + objectsOfClass: valueCls, + fromData: data, + error: error + ] + } + pub unsafe fn unarchivedObjectOfClasses_fromData_error( + classes: TodoGenerics, + data: &NSData, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + unarchivedObjectOfClasses: classes, + fromData: data, + error: error + ] + } + pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( + classes: TodoGenerics, + data: &NSData, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + unarchivedArrayOfObjectsOfClasses: classes, + fromData: data, + error: error + ] + } + pub unsafe fn unarchivedDictionaryWithKeysOfClasses_objectsOfClasses_fromData_error( + keyClasses: TodoGenerics, + valueClasses: TodoGenerics, + data: &NSData, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + unarchivedDictionaryWithKeysOfClasses: keyClasses, + objectsOfClasses: valueClasses, + fromData: data, + error: error + ] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Id { + msg_send_id![self, initForReadingWithData: data] + } + pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option> { + msg_send_id![Self::class(), unarchiveObjectWithData: data] + } + pub unsafe fn unarchiveTopLevelObjectWithData_error( + data: &NSData, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + unarchiveTopLevelObjectWithData: data, + error: error + ] + } + pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option> { + msg_send_id![Self::class(), unarchiveObjectWithFile: path] + } + pub unsafe fn finishDecoding(&self) { + msg_send![self, finishDecoding] + } + pub unsafe fn setClass_forClassName(cls: Option<&Class>, codedName: &NSString) { + msg_send![Self::class(), setClass: cls, forClassName: codedName] + } + pub unsafe fn setClass_forClassName(&self, cls: Option<&Class>, codedName: &NSString) { + msg_send![self, setClass: cls, forClassName: codedName] + } + pub unsafe fn classForClassName(codedName: &NSString) -> Option<&Class> { + msg_send![Self::class(), classForClassName: codedName] + } + pub unsafe fn classForClassName(&self, codedName: &NSString) -> Option<&Class> { + msg_send![self, classForClassName: codedName] + } + pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool { + msg_send![self, containsValueForKey: key] + } + pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, decodeObjectForKey: key] + } + pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool { + msg_send![self, decodeBoolForKey: key] + } + pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int { + msg_send![self, decodeIntForKey: key] + } + pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> int32_t { + msg_send![self, decodeInt32ForKey: key] + } + pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t { + msg_send![self, decodeInt64ForKey: key] + } + pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float { + msg_send![self, decodeFloatForKey: key] + } + pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double { + msg_send![self, decodeDoubleForKey: key] + } + pub unsafe fn decodeBytesForKey_returnedLength( + &self, + key: &NSString, + lengthp: *mut NSUInteger, + ) -> *mut uint8_t { + msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn requiresSecureCoding(&self) -> bool { + msg_send![self, requiresSecureCoding] + } + pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool) { + msg_send![self, setRequiresSecureCoding: requiresSecureCoding] + } + pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy { + msg_send![self, decodingFailurePolicy] + } + pub unsafe fn setDecodingFailurePolicy(&self, decodingFailurePolicy: NSDecodingFailurePolicy) { + msg_send![self, setDecodingFailurePolicy: decodingFailurePolicy] + } +} +#[doc = "NSKeyedArchiverObjectSubstitution"] +impl NSObject { + pub unsafe fn replacementObjectForKeyedArchiver( + &self, + archiver: &NSKeyedArchiver, + ) -> Option> { + msg_send_id![self, replacementObjectForKeyedArchiver: archiver] + } + pub unsafe fn classFallbacksForKeyedArchiver() -> TodoGenerics { + msg_send![Self::class(), classFallbacksForKeyedArchiver] + } + pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class> { + msg_send![self, classForKeyedArchiver] + } +} +#[doc = "NSKeyedUnarchiverObjectSubstitution"] +impl NSObject { + pub unsafe fn classForKeyedUnarchiver() -> &Class { + msg_send![Self::class(), classForKeyedUnarchiver] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs new file mode 100644 index 000000000..2c708f427 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -0,0 +1,64 @@ +extern_class!( + #[derive(Debug)] + struct NSLengthFormatter; + unsafe impl ClassType for NSLengthFormatter { + type Super = NSFormatter; + } +); +impl NSLengthFormatter { + pub unsafe fn stringFromValue_unit( + &self, + value: c_double, + unit: NSLengthFormatterUnit, + ) -> Id { + msg_send_id![self, stringFromValue: value, unit: unit] + } + pub unsafe fn stringFromMeters(&self, numberInMeters: c_double) -> Id { + msg_send_id![self, stringFromMeters: numberInMeters] + } + pub unsafe fn unitStringFromValue_unit( + &self, + value: c_double, + unit: NSLengthFormatterUnit, + ) -> Id { + msg_send_id![self, unitStringFromValue: value, unit: unit] + } + pub unsafe fn unitStringFromMeters_usedUnit( + &self, + numberInMeters: c_double, + unitp: *mut NSLengthFormatterUnit, + ) -> Id { + msg_send_id![self, unitStringFromMeters: numberInMeters, usedUnit: unitp] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: *mut Option<&Object>, + string: &NSString, + error: *mut Option<&NSString>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn isForPersonHeightUse(&self) -> bool { + msg_send![self, isForPersonHeightUse] + } + pub unsafe fn setForPersonHeightUse(&self, forPersonHeightUse: bool) { + msg_send![self, setForPersonHeightUse: forPersonHeightUse] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs new file mode 100644 index 000000000..44dff1ca0 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -0,0 +1,277 @@ +extern_class!( + #[derive(Debug)] + struct NSLinguisticTagger; + unsafe impl ClassType for NSLinguisticTagger { + type Super = NSObject; + } +); +impl NSLinguisticTagger { + pub unsafe fn initWithTagSchemes_options( + &self, + tagSchemes: TodoGenerics, + opts: NSUInteger, + ) -> Id { + msg_send_id![self, initWithTagSchemes: tagSchemes, options: opts] + } + pub unsafe fn availableTagSchemesForUnit_language( + unit: NSLinguisticTaggerUnit, + language: &NSString, + ) -> TodoGenerics { + msg_send![ + Self::class(), + availableTagSchemesForUnit: unit, + language: language + ] + } + pub unsafe fn availableTagSchemesForLanguage(language: &NSString) -> TodoGenerics { + msg_send![Self::class(), availableTagSchemesForLanguage: language] + } + pub unsafe fn setOrthography_range(&self, orthography: Option<&NSOrthography>, range: NSRange) { + msg_send![self, setOrthography: orthography, range: range] + } + pub unsafe fn orthographyAtIndex_effectiveRange( + &self, + charIndex: NSUInteger, + effectiveRange: NSRangePointer, + ) -> Option> { + msg_send_id![ + self, + orthographyAtIndex: charIndex, + effectiveRange: effectiveRange + ] + } + pub unsafe fn stringEditedInRange_changeInLength(&self, newRange: NSRange, delta: NSInteger) { + msg_send![self, stringEditedInRange: newRange, changeInLength: delta] + } + pub unsafe fn tokenRangeAtIndex_unit( + &self, + charIndex: NSUInteger, + unit: NSLinguisticTaggerUnit, + ) -> NSRange { + msg_send![self, tokenRangeAtIndex: charIndex, unit: unit] + } + pub unsafe fn sentenceRangeForRange(&self, range: NSRange) -> NSRange { + msg_send![self, sentenceRangeForRange: range] + } + pub unsafe fn enumerateTagsInRange_unit_scheme_options_usingBlock( + &self, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateTagsInRange: range, + unit: unit, + scheme: scheme, + options: options, + usingBlock: block + ] + } + pub unsafe fn tagAtIndex_unit_scheme_tokenRange( + &self, + charIndex: NSUInteger, + unit: NSLinguisticTaggerUnit, + scheme: NSLinguisticTagScheme, + tokenRange: NSRangePointer, + ) -> NSLinguisticTag { + msg_send![ + self, + tagAtIndex: charIndex, + unit: unit, + scheme: scheme, + tokenRange: tokenRange + ] + } + pub unsafe fn tagsInRange_unit_scheme_options_tokenRanges( + &self, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + tokenRanges: *mut TodoGenerics, + ) -> TodoGenerics { + msg_send![ + self, + tagsInRange: range, + unit: unit, + scheme: scheme, + options: options, + tokenRanges: tokenRanges + ] + } + pub unsafe fn enumerateTagsInRange_scheme_options_usingBlock( + &self, + range: NSRange, + tagScheme: NSLinguisticTagScheme, + opts: NSLinguisticTaggerOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateTagsInRange: range, + scheme: tagScheme, + options: opts, + usingBlock: block + ] + } + pub unsafe fn tagAtIndex_scheme_tokenRange_sentenceRange( + &self, + charIndex: NSUInteger, + scheme: NSLinguisticTagScheme, + tokenRange: NSRangePointer, + sentenceRange: NSRangePointer, + ) -> NSLinguisticTag { + msg_send![ + self, + tagAtIndex: charIndex, + scheme: scheme, + tokenRange: tokenRange, + sentenceRange: sentenceRange + ] + } + pub unsafe fn tagsInRange_scheme_options_tokenRanges( + &self, + range: NSRange, + tagScheme: &NSString, + opts: NSLinguisticTaggerOptions, + tokenRanges: *mut TodoGenerics, + ) -> TodoGenerics { + msg_send![ + self, + tagsInRange: range, + scheme: tagScheme, + options: opts, + tokenRanges: tokenRanges + ] + } + pub unsafe fn dominantLanguageForString(string: &NSString) -> Option> { + msg_send_id![Self::class(), dominantLanguageForString: string] + } + pub unsafe fn tagForString_atIndex_unit_scheme_orthography_tokenRange( + string: &NSString, + charIndex: NSUInteger, + unit: NSLinguisticTaggerUnit, + scheme: NSLinguisticTagScheme, + orthography: Option<&NSOrthography>, + tokenRange: NSRangePointer, + ) -> NSLinguisticTag { + msg_send![ + Self::class(), + tagForString: string, + atIndex: charIndex, + unit: unit, + scheme: scheme, + orthography: orthography, + tokenRange: tokenRange + ] + } + pub unsafe fn tagsForString_range_unit_scheme_options_orthography_tokenRanges( + string: &NSString, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + tokenRanges: *mut TodoGenerics, + ) -> TodoGenerics { + msg_send![ + Self::class(), + tagsForString: string, + range: range, + unit: unit, + scheme: scheme, + options: options, + orthography: orthography, + tokenRanges: tokenRanges + ] + } + pub unsafe fn enumerateTagsForString_range_unit_scheme_options_orthography_usingBlock( + string: &NSString, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + block: TodoBlock, + ) { + msg_send![ + Self::class(), + enumerateTagsForString: string, + range: range, + unit: unit, + scheme: scheme, + options: options, + orthography: orthography, + usingBlock: block + ] + } + pub unsafe fn possibleTagsAtIndex_scheme_tokenRange_sentenceRange_scores( + &self, + charIndex: NSUInteger, + tagScheme: &NSString, + tokenRange: NSRangePointer, + sentenceRange: NSRangePointer, + scores: *mut TodoGenerics, + ) -> TodoGenerics { + msg_send![ + self, + possibleTagsAtIndex: charIndex, + scheme: tagScheme, + tokenRange: tokenRange, + sentenceRange: sentenceRange, + scores: scores + ] + } + pub unsafe fn tagSchemes(&self) -> TodoGenerics { + msg_send![self, tagSchemes] + } + pub unsafe fn string(&self) -> Option> { + msg_send_id![self, string] + } + pub unsafe fn setString(&self, string: Option<&NSString>) { + msg_send![self, setString: string] + } + pub unsafe fn dominantLanguage(&self) -> Option> { + msg_send_id![self, dominantLanguage] + } +} +#[doc = "NSLinguisticAnalysis"] +impl NSString { + pub unsafe fn linguisticTagsInRange_scheme_options_orthography_tokenRanges( + &self, + range: NSRange, + scheme: NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + tokenRanges: *mut TodoGenerics, + ) -> TodoGenerics { + msg_send![ + self, + linguisticTagsInRange: range, + scheme: scheme, + options: options, + orthography: orthography, + tokenRanges: tokenRanges + ] + } + pub unsafe fn enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock( + &self, + range: NSRange, + scheme: NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateLinguisticTagsInRange: range, + scheme: scheme, + options: options, + orthography: orthography, + usingBlock: block + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs new file mode 100644 index 000000000..793032f4c --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -0,0 +1,33 @@ +extern_class!( + #[derive(Debug)] + struct NSListFormatter; + unsafe impl ClassType for NSListFormatter { + type Super = NSFormatter; + } +); +impl NSListFormatter { + pub unsafe fn localizedStringByJoiningStrings(strings: TodoGenerics) -> Id { + msg_send_id![Self::class(), localizedStringByJoiningStrings: strings] + } + pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option> { + msg_send_id![self, stringFromItems: items] + } + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn itemFormatter(&self) -> Option> { + msg_send_id![self, itemFormatter] + } + pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>) { + msg_send![self, setItemFormatter: itemFormatter] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs new file mode 100644 index 000000000..2b55f6ebc --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -0,0 +1,215 @@ +extern_class!( + #[derive(Debug)] + struct NSLocale; + unsafe impl ClassType for NSLocale { + type Super = NSObject; + } +); +impl NSLocale { + pub unsafe fn objectForKey(&self, key: NSLocaleKey) -> Option> { + msg_send_id![self, objectForKey: key] + } + pub unsafe fn displayNameForKey_value( + &self, + key: NSLocaleKey, + value: &Object, + ) -> Option> { + msg_send_id![self, displayNameForKey: key, value: value] + } + pub unsafe fn initWithLocaleIdentifier(&self, string: &NSString) -> Id { + msg_send_id![self, initWithLocaleIdentifier: string] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } +} +#[doc = "NSExtendedLocale"] +impl NSLocale { + pub unsafe fn localizedStringForLocaleIdentifier( + &self, + localeIdentifier: &NSString, + ) -> Id { + msg_send_id![self, localizedStringForLocaleIdentifier: localeIdentifier] + } + pub unsafe fn localizedStringForLanguageCode( + &self, + languageCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForLanguageCode: languageCode] + } + pub unsafe fn localizedStringForCountryCode( + &self, + countryCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForCountryCode: countryCode] + } + pub unsafe fn localizedStringForScriptCode( + &self, + scriptCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForScriptCode: scriptCode] + } + pub unsafe fn localizedStringForVariantCode( + &self, + variantCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForVariantCode: variantCode] + } + pub unsafe fn localizedStringForCalendarIdentifier( + &self, + calendarIdentifier: &NSString, + ) -> Option> { + msg_send_id![ + self, + localizedStringForCalendarIdentifier: calendarIdentifier + ] + } + pub unsafe fn localizedStringForCollationIdentifier( + &self, + collationIdentifier: &NSString, + ) -> Option> { + msg_send_id![ + self, + localizedStringForCollationIdentifier: collationIdentifier + ] + } + pub unsafe fn localizedStringForCurrencyCode( + &self, + currencyCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForCurrencyCode: currencyCode] + } + pub unsafe fn localizedStringForCollatorIdentifier( + &self, + collatorIdentifier: &NSString, + ) -> Option> { + msg_send_id![ + self, + localizedStringForCollatorIdentifier: collatorIdentifier + ] + } + pub unsafe fn localeIdentifier(&self) -> Id { + msg_send_id![self, localeIdentifier] + } + pub unsafe fn languageCode(&self) -> Id { + msg_send_id![self, languageCode] + } + pub unsafe fn countryCode(&self) -> Option> { + msg_send_id![self, countryCode] + } + pub unsafe fn scriptCode(&self) -> Option> { + msg_send_id![self, scriptCode] + } + pub unsafe fn variantCode(&self) -> Option> { + msg_send_id![self, variantCode] + } + pub unsafe fn exemplarCharacterSet(&self) -> Id { + msg_send_id![self, exemplarCharacterSet] + } + pub unsafe fn calendarIdentifier(&self) -> Id { + msg_send_id![self, calendarIdentifier] + } + pub unsafe fn collationIdentifier(&self) -> Option> { + msg_send_id![self, collationIdentifier] + } + pub unsafe fn usesMetricSystem(&self) -> bool { + msg_send![self, usesMetricSystem] + } + pub unsafe fn decimalSeparator(&self) -> Id { + msg_send_id![self, decimalSeparator] + } + pub unsafe fn groupingSeparator(&self) -> Id { + msg_send_id![self, groupingSeparator] + } + pub unsafe fn currencySymbol(&self) -> Id { + msg_send_id![self, currencySymbol] + } + pub unsafe fn currencyCode(&self) -> Option> { + msg_send_id![self, currencyCode] + } + pub unsafe fn collatorIdentifier(&self) -> Id { + msg_send_id![self, collatorIdentifier] + } + pub unsafe fn quotationBeginDelimiter(&self) -> Id { + msg_send_id![self, quotationBeginDelimiter] + } + pub unsafe fn quotationEndDelimiter(&self) -> Id { + msg_send_id![self, quotationEndDelimiter] + } + pub unsafe fn alternateQuotationBeginDelimiter(&self) -> Id { + msg_send_id![self, alternateQuotationBeginDelimiter] + } + pub unsafe fn alternateQuotationEndDelimiter(&self) -> Id { + msg_send_id![self, alternateQuotationEndDelimiter] + } +} +#[doc = "NSLocaleCreation"] +impl NSLocale { + pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id { + msg_send_id![Self::class(), localeWithLocaleIdentifier: ident] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn autoupdatingCurrentLocale() -> Id { + msg_send_id![Self::class(), autoupdatingCurrentLocale] + } + pub unsafe fn currentLocale() -> Id { + msg_send_id![Self::class(), currentLocale] + } + pub unsafe fn systemLocale() -> Id { + msg_send_id![Self::class(), systemLocale] + } +} +#[doc = "NSLocaleGeneralInfo"] +impl NSLocale { + pub unsafe fn componentsFromLocaleIdentifier(string: &NSString) -> TodoGenerics { + msg_send![Self::class(), componentsFromLocaleIdentifier: string] + } + pub unsafe fn localeIdentifierFromComponents(dict: TodoGenerics) -> Id { + msg_send_id![Self::class(), localeIdentifierFromComponents: dict] + } + pub unsafe fn canonicalLocaleIdentifierFromString(string: &NSString) -> Id { + msg_send_id![Self::class(), canonicalLocaleIdentifierFromString: string] + } + pub unsafe fn canonicalLanguageIdentifierFromString(string: &NSString) -> Id { + msg_send_id![Self::class(), canonicalLanguageIdentifierFromString: string] + } + pub unsafe fn localeIdentifierFromWindowsLocaleCode( + lcid: uint32_t, + ) -> Option> { + msg_send_id![Self::class(), localeIdentifierFromWindowsLocaleCode: lcid] + } + pub unsafe fn windowsLocaleCodeFromLocaleIdentifier(localeIdentifier: &NSString) -> uint32_t { + msg_send![ + Self::class(), + windowsLocaleCodeFromLocaleIdentifier: localeIdentifier + ] + } + pub unsafe fn characterDirectionForLanguage( + isoLangCode: &NSString, + ) -> NSLocaleLanguageDirection { + msg_send![Self::class(), characterDirectionForLanguage: isoLangCode] + } + pub unsafe fn lineDirectionForLanguage(isoLangCode: &NSString) -> NSLocaleLanguageDirection { + msg_send![Self::class(), lineDirectionForLanguage: isoLangCode] + } + pub unsafe fn availableLocaleIdentifiers() -> TodoGenerics { + msg_send![Self::class(), availableLocaleIdentifiers] + } + pub unsafe fn ISOLanguageCodes() -> TodoGenerics { + msg_send![Self::class(), ISOLanguageCodes] + } + pub unsafe fn ISOCountryCodes() -> TodoGenerics { + msg_send![Self::class(), ISOCountryCodes] + } + pub unsafe fn ISOCurrencyCodes() -> TodoGenerics { + msg_send![Self::class(), ISOCurrencyCodes] + } + pub unsafe fn commonISOCurrencyCodes() -> TodoGenerics { + msg_send![Self::class(), commonISOCurrencyCodes] + } + pub unsafe fn preferredLanguages() -> TodoGenerics { + msg_send![Self::class(), preferredLanguages] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs new file mode 100644 index 000000000..e1ad2467d --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -0,0 +1,112 @@ +extern_class!( + #[derive(Debug)] + struct NSLock; + unsafe impl ClassType for NSLock { + type Super = NSObject; + } +); +impl NSLock { + pub unsafe fn tryLock(&self) -> bool { + msg_send![self, tryLock] + } + pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { + msg_send![self, lockBeforeDate: limit] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } +} +extern_class!( + #[derive(Debug)] + struct NSConditionLock; + unsafe impl ClassType for NSConditionLock { + type Super = NSObject; + } +); +impl NSConditionLock { + pub unsafe fn initWithCondition(&self, condition: NSInteger) -> Id { + msg_send_id![self, initWithCondition: condition] + } + pub unsafe fn lockWhenCondition(&self, condition: NSInteger) { + msg_send![self, lockWhenCondition: condition] + } + pub unsafe fn tryLock(&self) -> bool { + msg_send![self, tryLock] + } + pub unsafe fn tryLockWhenCondition(&self, condition: NSInteger) -> bool { + msg_send![self, tryLockWhenCondition: condition] + } + pub unsafe fn unlockWithCondition(&self, condition: NSInteger) { + msg_send![self, unlockWithCondition: condition] + } + pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { + msg_send![self, lockBeforeDate: limit] + } + pub unsafe fn lockWhenCondition_beforeDate( + &self, + condition: NSInteger, + limit: &NSDate, + ) -> bool { + msg_send![self, lockWhenCondition: condition, beforeDate: limit] + } + pub unsafe fn condition(&self) -> NSInteger { + msg_send![self, condition] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } +} +extern_class!( + #[derive(Debug)] + struct NSRecursiveLock; + unsafe impl ClassType for NSRecursiveLock { + type Super = NSObject; + } +); +impl NSRecursiveLock { + pub unsafe fn tryLock(&self) -> bool { + msg_send![self, tryLock] + } + pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { + msg_send![self, lockBeforeDate: limit] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } +} +extern_class!( + #[derive(Debug)] + struct NSCondition; + unsafe impl ClassType for NSCondition { + type Super = NSObject; + } +); +impl NSCondition { + pub unsafe fn wait(&self) { + msg_send![self, wait] + } + pub unsafe fn waitUntilDate(&self, limit: &NSDate) -> bool { + msg_send![self, waitUntilDate: limit] + } + pub unsafe fn signal(&self) { + msg_send![self, signal] + } + pub unsafe fn broadcast(&self) { + msg_send![self, broadcast] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs new file mode 100644 index 000000000..762c7e203 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -0,0 +1,99 @@ +extern_class!( + #[derive(Debug)] + struct NSMapTable; + unsafe impl ClassType for NSMapTable { + type Super = NSObject; + } +); +impl NSMapTable { + pub unsafe fn initWithKeyOptions_valueOptions_capacity( + &self, + keyOptions: NSPointerFunctionsOptions, + valueOptions: NSPointerFunctionsOptions, + initialCapacity: NSUInteger, + ) -> Id { + msg_send_id![ + self, + initWithKeyOptions: keyOptions, + valueOptions: valueOptions, + capacity: initialCapacity + ] + } + pub unsafe fn initWithKeyPointerFunctions_valuePointerFunctions_capacity( + &self, + keyFunctions: &NSPointerFunctions, + valueFunctions: &NSPointerFunctions, + initialCapacity: NSUInteger, + ) -> Id { + msg_send_id![ + self, + initWithKeyPointerFunctions: keyFunctions, + valuePointerFunctions: valueFunctions, + capacity: initialCapacity + ] + } + pub unsafe fn mapTableWithKeyOptions_valueOptions( + keyOptions: NSPointerFunctionsOptions, + valueOptions: NSPointerFunctionsOptions, + ) -> TodoGenerics { + msg_send![ + Self::class(), + mapTableWithKeyOptions: keyOptions, + valueOptions: valueOptions + ] + } + pub unsafe fn mapTableWithStrongToStrongObjects() -> Id { + msg_send_id![Self::class(), mapTableWithStrongToStrongObjects] + } + pub unsafe fn mapTableWithWeakToStrongObjects() -> Id { + msg_send_id![Self::class(), mapTableWithWeakToStrongObjects] + } + pub unsafe fn mapTableWithStrongToWeakObjects() -> Id { + msg_send_id![Self::class(), mapTableWithStrongToWeakObjects] + } + pub unsafe fn mapTableWithWeakToWeakObjects() -> Id { + msg_send_id![Self::class(), mapTableWithWeakToWeakObjects] + } + pub unsafe fn strongToStrongObjectsMapTable() -> TodoGenerics { + msg_send![Self::class(), strongToStrongObjectsMapTable] + } + pub unsafe fn weakToStrongObjectsMapTable() -> TodoGenerics { + msg_send![Self::class(), weakToStrongObjectsMapTable] + } + pub unsafe fn strongToWeakObjectsMapTable() -> TodoGenerics { + msg_send![Self::class(), strongToWeakObjectsMapTable] + } + pub unsafe fn weakToWeakObjectsMapTable() -> TodoGenerics { + msg_send![Self::class(), weakToWeakObjectsMapTable] + } + pub unsafe fn objectForKey(&self, aKey: KeyType) -> ObjectType { + msg_send![self, objectForKey: aKey] + } + pub unsafe fn removeObjectForKey(&self, aKey: KeyType) { + msg_send![self, removeObjectForKey: aKey] + } + pub unsafe fn setObject_forKey(&self, anObject: ObjectType, aKey: KeyType) { + msg_send![self, setObject: anObject, forKey: aKey] + } + pub unsafe fn keyEnumerator(&self) -> TodoGenerics { + msg_send![self, keyEnumerator] + } + pub unsafe fn objectEnumerator(&self) -> TodoGenerics { + msg_send![self, objectEnumerator] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn dictionaryRepresentation(&self) -> TodoGenerics { + msg_send![self, dictionaryRepresentation] + } + pub unsafe fn keyPointerFunctions(&self) -> Id { + msg_send_id![self, keyPointerFunctions] + } + pub unsafe fn valuePointerFunctions(&self) -> Id { + msg_send_id![self, valuePointerFunctions] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs new file mode 100644 index 000000000..50ce8784e --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -0,0 +1,68 @@ +extern_class!( + #[derive(Debug)] + struct NSMassFormatter; + unsafe impl ClassType for NSMassFormatter { + type Super = NSFormatter; + } +); +impl NSMassFormatter { + pub unsafe fn stringFromValue_unit( + &self, + value: c_double, + unit: NSMassFormatterUnit, + ) -> Id { + msg_send_id![self, stringFromValue: value, unit: unit] + } + pub unsafe fn stringFromKilograms(&self, numberInKilograms: c_double) -> Id { + msg_send_id![self, stringFromKilograms: numberInKilograms] + } + pub unsafe fn unitStringFromValue_unit( + &self, + value: c_double, + unit: NSMassFormatterUnit, + ) -> Id { + msg_send_id![self, unitStringFromValue: value, unit: unit] + } + pub unsafe fn unitStringFromKilograms_usedUnit( + &self, + numberInKilograms: c_double, + unitp: *mut NSMassFormatterUnit, + ) -> Id { + msg_send_id![ + self, + unitStringFromKilograms: numberInKilograms, + usedUnit: unitp + ] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: *mut Option<&Object>, + string: &NSString, + error: *mut Option<&NSString>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn isForPersonMassUse(&self) -> bool { + msg_send![self, isForPersonMassUse] + } + pub unsafe fn setForPersonMassUse(&self, forPersonMassUse: bool) { + msg_send![self, setForPersonMassUse: forPersonMassUse] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs new file mode 100644 index 000000000..d736cbbcf --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -0,0 +1,40 @@ +extern_class!( + #[derive(Debug)] + struct NSMeasurement; + unsafe impl ClassType for NSMeasurement { + type Super = NSObject; + } +); +impl NSMeasurement { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithDoubleValue_unit( + &self, + doubleValue: c_double, + unit: UnitType, + ) -> Id { + msg_send_id![self, initWithDoubleValue: doubleValue, unit: unit] + } + pub unsafe fn canBeConvertedToUnit(&self, unit: &NSUnit) -> bool { + msg_send![self, canBeConvertedToUnit: unit] + } + pub unsafe fn measurementByConvertingToUnit(&self, unit: &NSUnit) -> Id { + msg_send_id![self, measurementByConvertingToUnit: unit] + } + pub unsafe fn measurementByAddingMeasurement(&self, measurement: TodoGenerics) -> TodoGenerics { + msg_send![self, measurementByAddingMeasurement: measurement] + } + pub unsafe fn measurementBySubtractingMeasurement( + &self, + measurement: TodoGenerics, + ) -> TodoGenerics { + msg_send![self, measurementBySubtractingMeasurement: measurement] + } + pub unsafe fn unit(&self) -> UnitType { + msg_send![self, unit] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs new file mode 100644 index 000000000..3120ccdda --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -0,0 +1,42 @@ +extern_class!( + #[derive(Debug)] + struct NSMeasurementFormatter; + unsafe impl ClassType for NSMeasurementFormatter { + type Super = NSFormatter; + } +); +impl NSMeasurementFormatter { + pub unsafe fn stringFromMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id { + msg_send_id![self, stringFromMeasurement: measurement] + } + pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id { + msg_send_id![self, stringFromUnit: unit] + } + pub unsafe fn unitOptions(&self) -> NSMeasurementFormatterUnitOptions { + msg_send![self, unitOptions] + } + pub unsafe fn setUnitOptions(&self, unitOptions: NSMeasurementFormatterUnitOptions) { + msg_send![self, setUnitOptions: unitOptions] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs new file mode 100644 index 000000000..0ad9c916d --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -0,0 +1,191 @@ +extern_class!( + #[derive(Debug)] + struct NSMetadataQuery; + unsafe impl ClassType for NSMetadataQuery { + type Super = NSObject; + } +); +impl NSMetadataQuery { + pub unsafe fn startQuery(&self) -> bool { + msg_send![self, startQuery] + } + pub unsafe fn stopQuery(&self) { + msg_send![self, stopQuery] + } + pub unsafe fn disableUpdates(&self) { + msg_send![self, disableUpdates] + } + pub unsafe fn enableUpdates(&self) { + msg_send![self, enableUpdates] + } + pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { + msg_send_id![self, resultAtIndex: idx] + } + pub unsafe fn enumerateResultsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateResultsUsingBlock: block] + } + pub unsafe fn enumerateResultsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateResultsWithOptions: opts, usingBlock: block] + } + pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger { + msg_send![self, indexOfResult: result] + } + pub unsafe fn valueOfAttribute_forResultAtIndex( + &self, + attrName: &NSString, + idx: NSUInteger, + ) -> Option> { + msg_send_id![self, valueOfAttribute: attrName, forResultAtIndex: idx] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn predicate(&self) -> Option> { + msg_send_id![self, predicate] + } + pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>) { + msg_send![self, setPredicate: predicate] + } + pub unsafe fn sortDescriptors(&self) -> TodoGenerics { + msg_send![self, sortDescriptors] + } + pub unsafe fn setSortDescriptors(&self, sortDescriptors: TodoGenerics) { + msg_send![self, setSortDescriptors: sortDescriptors] + } + pub unsafe fn valueListAttributes(&self) -> TodoGenerics { + msg_send![self, valueListAttributes] + } + pub unsafe fn setValueListAttributes(&self, valueListAttributes: TodoGenerics) { + msg_send![self, setValueListAttributes: valueListAttributes] + } + pub unsafe fn groupingAttributes(&self) -> TodoGenerics { + msg_send![self, groupingAttributes] + } + pub unsafe fn setGroupingAttributes(&self, groupingAttributes: TodoGenerics) { + msg_send![self, setGroupingAttributes: groupingAttributes] + } + pub unsafe fn notificationBatchingInterval(&self) -> NSTimeInterval { + msg_send![self, notificationBatchingInterval] + } + pub unsafe fn setNotificationBatchingInterval( + &self, + notificationBatchingInterval: NSTimeInterval, + ) { + msg_send![ + self, + setNotificationBatchingInterval: notificationBatchingInterval + ] + } + pub unsafe fn searchScopes(&self) -> Id { + msg_send_id![self, searchScopes] + } + pub unsafe fn setSearchScopes(&self, searchScopes: &NSArray) { + msg_send![self, setSearchScopes: searchScopes] + } + pub unsafe fn searchItems(&self) -> Option> { + msg_send_id![self, searchItems] + } + pub unsafe fn setSearchItems(&self, searchItems: Option<&NSArray>) { + msg_send![self, setSearchItems: searchItems] + } + pub unsafe fn operationQueue(&self) -> Option> { + msg_send_id![self, operationQueue] + } + pub unsafe fn setOperationQueue(&self, operationQueue: Option<&NSOperationQueue>) { + msg_send![self, setOperationQueue: operationQueue] + } + pub unsafe fn isStarted(&self) -> bool { + msg_send![self, isStarted] + } + pub unsafe fn isGathering(&self) -> bool { + msg_send![self, isGathering] + } + pub unsafe fn isStopped(&self) -> bool { + msg_send![self, isStopped] + } + pub unsafe fn resultCount(&self) -> NSUInteger { + msg_send![self, resultCount] + } + pub unsafe fn results(&self) -> Id { + msg_send_id![self, results] + } + pub unsafe fn valueLists(&self) -> TodoGenerics { + msg_send![self, valueLists] + } + pub unsafe fn groupedResults(&self) -> TodoGenerics { + msg_send![self, groupedResults] + } +} +extern_class!( + #[derive(Debug)] + struct NSMetadataItem; + unsafe impl ClassType for NSMetadataItem { + type Super = NSObject; + } +); +impl NSMetadataItem { + pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithURL: url] + } + pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option> { + msg_send_id![self, valueForAttribute: key] + } + pub unsafe fn valuesForAttributes(&self, keys: TodoGenerics) -> TodoGenerics { + msg_send![self, valuesForAttributes: keys] + } + pub unsafe fn attributes(&self) -> TodoGenerics { + msg_send![self, attributes] + } +} +extern_class!( + #[derive(Debug)] + struct NSMetadataQueryAttributeValueTuple; + unsafe impl ClassType for NSMetadataQueryAttributeValueTuple { + type Super = NSObject; + } +); +impl NSMetadataQueryAttributeValueTuple { + pub unsafe fn attribute(&self) -> Id { + msg_send_id![self, attribute] + } + pub unsafe fn value(&self) -> Option> { + msg_send_id![self, value] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } +} +extern_class!( + #[derive(Debug)] + struct NSMetadataQueryResultGroup; + unsafe impl ClassType for NSMetadataQueryResultGroup { + type Super = NSObject; + } +); +impl NSMetadataQueryResultGroup { + pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { + msg_send_id![self, resultAtIndex: idx] + } + pub unsafe fn attribute(&self) -> Id { + msg_send_id![self, attribute] + } + pub unsafe fn value(&self) -> Id { + msg_send_id![self, value] + } + pub unsafe fn subgroups(&self) -> TodoGenerics { + msg_send![self, subgroups] + } + pub unsafe fn resultCount(&self) -> NSUInteger { + msg_send![self, resultCount] + } + pub unsafe fn results(&self) -> Id { + msg_send_id![self, results] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs new file mode 100644 index 000000000..9dcbf17a1 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -0,0 +1,32 @@ +extern_class!( + #[derive(Debug)] + struct NSMethodSignature; + unsafe impl ClassType for NSMethodSignature { + type Super = NSObject; + } +); +impl NSMethodSignature { + pub unsafe fn signatureWithObjCTypes( + types: NonNull, + ) -> Option> { + msg_send_id![Self::class(), signatureWithObjCTypes: types] + } + pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull { + msg_send![self, getArgumentTypeAtIndex: idx] + } + pub unsafe fn isOneway(&self) -> bool { + msg_send![self, isOneway] + } + pub unsafe fn numberOfArguments(&self) -> NSUInteger { + msg_send![self, numberOfArguments] + } + pub unsafe fn frameLength(&self) -> NSUInteger { + msg_send![self, frameLength] + } + pub unsafe fn methodReturnType(&self) -> NonNull { + msg_send![self, methodReturnType] + } + pub unsafe fn methodReturnLength(&self) -> NSUInteger { + msg_send![self, methodReturnLength] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs new file mode 100644 index 000000000..712804012 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -0,0 +1,103 @@ +extern_class!( + #[derive(Debug)] + struct NSMorphology; + unsafe impl ClassType for NSMorphology { + type Super = NSObject; + } +); +impl NSMorphology { + pub unsafe fn grammaticalGender(&self) -> NSGrammaticalGender { + msg_send![self, grammaticalGender] + } + pub unsafe fn setGrammaticalGender(&self, grammaticalGender: NSGrammaticalGender) { + msg_send![self, setGrammaticalGender: grammaticalGender] + } + pub unsafe fn partOfSpeech(&self) -> NSGrammaticalPartOfSpeech { + msg_send![self, partOfSpeech] + } + pub unsafe fn setPartOfSpeech(&self, partOfSpeech: NSGrammaticalPartOfSpeech) { + msg_send![self, setPartOfSpeech: partOfSpeech] + } + pub unsafe fn number(&self) -> NSGrammaticalNumber { + msg_send![self, number] + } + pub unsafe fn setNumber(&self, number: NSGrammaticalNumber) { + msg_send![self, setNumber: number] + } +} +#[doc = "NSCustomPronouns"] +impl NSMorphology { + pub unsafe fn customPronounForLanguage( + &self, + language: &NSString, + ) -> Option> { + msg_send_id![self, customPronounForLanguage: language] + } + pub unsafe fn setCustomPronoun_forLanguage_error( + &self, + features: Option<&NSMorphologyCustomPronoun>, + language: &NSString, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + setCustomPronoun: features, + forLanguage: language, + error: error + ] + } +} +extern_class!( + #[derive(Debug)] + struct NSMorphologyCustomPronoun; + unsafe impl ClassType for NSMorphologyCustomPronoun { + type Super = NSObject; + } +); +impl NSMorphologyCustomPronoun { + pub unsafe fn isSupportedForLanguage(language: &NSString) -> bool { + msg_send![Self::class(), isSupportedForLanguage: language] + } + pub unsafe fn requiredKeysForLanguage(language: &NSString) -> TodoGenerics { + msg_send![Self::class(), requiredKeysForLanguage: language] + } + pub unsafe fn subjectForm(&self) -> Option> { + msg_send_id![self, subjectForm] + } + pub unsafe fn setSubjectForm(&self, subjectForm: Option<&NSString>) { + msg_send![self, setSubjectForm: subjectForm] + } + pub unsafe fn objectForm(&self) -> Option> { + msg_send_id![self, objectForm] + } + pub unsafe fn setObjectForm(&self, objectForm: Option<&NSString>) { + msg_send![self, setObjectForm: objectForm] + } + pub unsafe fn possessiveForm(&self) -> Option> { + msg_send_id![self, possessiveForm] + } + pub unsafe fn setPossessiveForm(&self, possessiveForm: Option<&NSString>) { + msg_send![self, setPossessiveForm: possessiveForm] + } + pub unsafe fn possessiveAdjectiveForm(&self) -> Option> { + msg_send_id![self, possessiveAdjectiveForm] + } + pub unsafe fn setPossessiveAdjectiveForm(&self, possessiveAdjectiveForm: Option<&NSString>) { + msg_send![self, setPossessiveAdjectiveForm: possessiveAdjectiveForm] + } + pub unsafe fn reflexiveForm(&self) -> Option> { + msg_send_id![self, reflexiveForm] + } + pub unsafe fn setReflexiveForm(&self, reflexiveForm: Option<&NSString>) { + msg_send![self, setReflexiveForm: reflexiveForm] + } +} +#[doc = "NSMorphologyUserSettings"] +impl NSMorphology { + pub unsafe fn isUnspecified(&self) -> bool { + msg_send![self, isUnspecified] + } + pub unsafe fn userMorphology() -> Id { + msg_send_id![Self::class(), userMorphology] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs new file mode 100644 index 000000000..723f2d9e5 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -0,0 +1,152 @@ +extern_class!( + #[derive(Debug)] + struct NSNetService; + unsafe impl ClassType for NSNetService { + type Super = NSObject; + } +); +impl NSNetService { + pub unsafe fn initWithDomain_type_name_port( + &self, + domain: &NSString, + type_: &NSString, + name: &NSString, + port: c_int, + ) -> Id { + msg_send_id ! [self , initWithDomain : domain , type : type_ , name : name , port : port] + } + pub unsafe fn initWithDomain_type_name( + &self, + domain: &NSString, + type_: &NSString, + name: &NSString, + ) -> Id { + msg_send_id ! [self , initWithDomain : domain , type : type_ , name : name] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn publish(&self) { + msg_send![self, publish] + } + pub unsafe fn publishWithOptions(&self, options: NSNetServiceOptions) { + msg_send![self, publishWithOptions: options] + } + pub unsafe fn resolve(&self) { + msg_send![self, resolve] + } + pub unsafe fn stop(&self) { + msg_send![self, stop] + } + pub unsafe fn dictionaryFromTXTRecordData(txtData: &NSData) -> TodoGenerics { + msg_send![Self::class(), dictionaryFromTXTRecordData: txtData] + } + pub unsafe fn dataFromTXTRecordDictionary(txtDictionary: TodoGenerics) -> Id { + msg_send_id![Self::class(), dataFromTXTRecordDictionary: txtDictionary] + } + pub unsafe fn resolveWithTimeout(&self, timeout: NSTimeInterval) { + msg_send![self, resolveWithTimeout: timeout] + } + pub unsafe fn getInputStream_outputStream( + &self, + inputStream: *mut Option<&NSInputStream>, + outputStream: *mut Option<&NSOutputStream>, + ) -> bool { + msg_send![ + self, + getInputStream: inputStream, + outputStream: outputStream + ] + } + pub unsafe fn setTXTRecordData(&self, recordData: Option<&NSData>) -> bool { + msg_send![self, setTXTRecordData: recordData] + } + pub unsafe fn TXTRecordData(&self) -> Option> { + msg_send_id![self, TXTRecordData] + } + pub unsafe fn startMonitoring(&self) { + msg_send![self, startMonitoring] + } + pub unsafe fn stopMonitoring(&self) { + msg_send![self, stopMonitoring] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn includesPeerToPeer(&self) -> bool { + msg_send![self, includesPeerToPeer] + } + pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { + msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn type_(&self) -> Id { + msg_send_id![self, type] + } + pub unsafe fn domain(&self) -> Id { + msg_send_id![self, domain] + } + pub unsafe fn hostName(&self) -> Option> { + msg_send_id![self, hostName] + } + pub unsafe fn addresses(&self) -> TodoGenerics { + msg_send![self, addresses] + } + pub unsafe fn port(&self) -> NSInteger { + msg_send![self, port] + } +} +extern_class!( + #[derive(Debug)] + struct NSNetServiceBrowser; + unsafe impl ClassType for NSNetServiceBrowser { + type Super = NSObject; + } +); +impl NSNetServiceBrowser { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn searchForBrowsableDomains(&self) { + msg_send![self, searchForBrowsableDomains] + } + pub unsafe fn searchForRegistrationDomains(&self) { + msg_send![self, searchForRegistrationDomains] + } + pub unsafe fn searchForServicesOfType_inDomain( + &self, + type_: &NSString, + domainString: &NSString, + ) { + msg_send![self, searchForServicesOfType: type_, inDomain: domainString] + } + pub unsafe fn stop(&self) { + msg_send![self, stop] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn includesPeerToPeer(&self) -> bool { + msg_send![self, includesPeerToPeer] + } + pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { + msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs new file mode 100644 index 000000000..13f860010 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -0,0 +1,134 @@ +extern_class!( + #[derive(Debug)] + struct NSNotification; + unsafe impl ClassType for NSNotification { + type Super = NSObject; + } +); +impl NSNotification { + pub unsafe fn initWithName_object_userInfo( + &self, + name: NSNotificationName, + object: Option<&Object>, + userInfo: Option<&NSDictionary>, + ) -> Id { + msg_send_id![self, initWithName: name, object: object, userInfo: userInfo] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn name(&self) -> NSNotificationName { + msg_send![self, name] + } + pub unsafe fn object(&self) -> Option> { + msg_send_id![self, object] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } +} +#[doc = "NSNotificationCreation"] +impl NSNotification { + pub unsafe fn notificationWithName_object( + aName: NSNotificationName, + anObject: Option<&Object>, + ) -> Id { + msg_send_id![Self::class(), notificationWithName: aName, object: anObject] + } + pub unsafe fn notificationWithName_object_userInfo( + aName: NSNotificationName, + anObject: Option<&Object>, + aUserInfo: Option<&NSDictionary>, + ) -> Id { + msg_send_id![ + Self::class(), + notificationWithName: aName, + object: anObject, + userInfo: aUserInfo + ] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } +} +extern_class!( + #[derive(Debug)] + struct NSNotificationCenter; + unsafe impl ClassType for NSNotificationCenter { + type Super = NSObject; + } +); +impl NSNotificationCenter { + pub unsafe fn addObserver_selector_name_object( + &self, + observer: &Object, + aSelector: Sel, + aName: NSNotificationName, + anObject: Option<&Object>, + ) { + msg_send![ + self, + addObserver: observer, + selector: aSelector, + name: aName, + object: anObject + ] + } + pub unsafe fn postNotification(&self, notification: &NSNotification) { + msg_send![self, postNotification: notification] + } + pub unsafe fn postNotificationName_object( + &self, + aName: NSNotificationName, + anObject: Option<&Object>, + ) { + msg_send![self, postNotificationName: aName, object: anObject] + } + pub unsafe fn postNotificationName_object_userInfo( + &self, + aName: NSNotificationName, + anObject: Option<&Object>, + aUserInfo: Option<&NSDictionary>, + ) { + msg_send![ + self, + postNotificationName: aName, + object: anObject, + userInfo: aUserInfo + ] + } + pub unsafe fn removeObserver(&self, observer: &Object) { + msg_send![self, removeObserver: observer] + } + pub unsafe fn removeObserver_name_object( + &self, + observer: &Object, + aName: NSNotificationName, + anObject: Option<&Object>, + ) { + msg_send![ + self, + removeObserver: observer, + name: aName, + object: anObject + ] + } + pub unsafe fn addObserverForName_object_queue_usingBlock( + &self, + name: NSNotificationName, + obj: Option<&Object>, + queue: Option<&NSOperationQueue>, + block: TodoBlock, + ) -> TodoGenerics { + msg_send![ + self, + addObserverForName: name, + object: obj, + queue: queue, + usingBlock: block + ] + } + pub unsafe fn defaultCenter() -> Id { + msg_send_id![Self::class(), defaultCenter] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs new file mode 100644 index 000000000..5e0d6091f --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -0,0 +1,55 @@ +extern_class!( + #[derive(Debug)] + struct NSNotificationQueue; + unsafe impl ClassType for NSNotificationQueue { + type Super = NSObject; + } +); +impl NSNotificationQueue { + pub unsafe fn initWithNotificationCenter( + &self, + notificationCenter: &NSNotificationCenter, + ) -> Id { + msg_send_id![self, initWithNotificationCenter: notificationCenter] + } + pub unsafe fn enqueueNotification_postingStyle( + &self, + notification: &NSNotification, + postingStyle: NSPostingStyle, + ) { + msg_send![ + self, + enqueueNotification: notification, + postingStyle: postingStyle + ] + } + pub unsafe fn enqueueNotification_postingStyle_coalesceMask_forModes( + &self, + notification: &NSNotification, + postingStyle: NSPostingStyle, + coalesceMask: NSNotificationCoalescing, + modes: TodoGenerics, + ) { + msg_send![ + self, + enqueueNotification: notification, + postingStyle: postingStyle, + coalesceMask: coalesceMask, + forModes: modes + ] + } + pub unsafe fn dequeueNotificationsMatching_coalesceMask( + &self, + notification: &NSNotification, + coalesceMask: NSUInteger, + ) { + msg_send![ + self, + dequeueNotificationsMatching: notification, + coalesceMask: coalesceMask + ] + } + pub unsafe fn defaultQueue() -> Id { + msg_send_id![Self::class(), defaultQueue] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSNull.rs b/crates/icrate/src/generated/Foundation/NSNull.rs new file mode 100644 index 000000000..8fe6cdc09 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSNull.rs @@ -0,0 +1,12 @@ +extern_class!( + #[derive(Debug)] + struct NSNull; + unsafe impl ClassType for NSNull { + type Super = NSObject; + } +); +impl NSNull { + pub unsafe fn null() -> Id { + msg_send_id![Self::class(), null] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs new file mode 100644 index 000000000..c17d0df64 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -0,0 +1,490 @@ +extern_class!( + #[derive(Debug)] + struct NSNumberFormatter; + unsafe impl ClassType for NSNumberFormatter { + type Super = NSFormatter; + } +); +impl NSNumberFormatter { + pub unsafe fn getObjectValue_forString_range_error( + &self, + obj: *mut Option<&Object>, + string: &NSString, + rangep: *mut NSRange, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + range: rangep, + error: error + ] + } + pub unsafe fn stringFromNumber(&self, number: &NSNumber) -> Option> { + msg_send_id![self, stringFromNumber: number] + } + pub unsafe fn numberFromString(&self, string: &NSString) -> Option> { + msg_send_id![self, numberFromString: string] + } + pub unsafe fn localizedStringFromNumber_numberStyle( + num: &NSNumber, + nstyle: NSNumberFormatterStyle, + ) -> Id { + msg_send_id![ + Self::class(), + localizedStringFromNumber: num, + numberStyle: nstyle + ] + } + pub unsafe fn defaultFormatterBehavior() -> NSNumberFormatterBehavior { + msg_send![Self::class(), defaultFormatterBehavior] + } + pub unsafe fn setDefaultFormatterBehavior(behavior: NSNumberFormatterBehavior) { + msg_send![Self::class(), setDefaultFormatterBehavior: behavior] + } + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } + pub unsafe fn numberStyle(&self) -> NSNumberFormatterStyle { + msg_send![self, numberStyle] + } + pub unsafe fn setNumberStyle(&self, numberStyle: NSNumberFormatterStyle) { + msg_send![self, setNumberStyle: numberStyle] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn generatesDecimalNumbers(&self) -> bool { + msg_send![self, generatesDecimalNumbers] + } + pub unsafe fn setGeneratesDecimalNumbers(&self, generatesDecimalNumbers: bool) { + msg_send![self, setGeneratesDecimalNumbers: generatesDecimalNumbers] + } + pub unsafe fn formatterBehavior(&self) -> NSNumberFormatterBehavior { + msg_send![self, formatterBehavior] + } + pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSNumberFormatterBehavior) { + msg_send![self, setFormatterBehavior: formatterBehavior] + } + pub unsafe fn negativeFormat(&self) -> Id { + msg_send_id![self, negativeFormat] + } + pub unsafe fn setNegativeFormat(&self, negativeFormat: Option<&NSString>) { + msg_send![self, setNegativeFormat: negativeFormat] + } + pub unsafe fn textAttributesForNegativeValues(&self) -> TodoGenerics { + msg_send![self, textAttributesForNegativeValues] + } + pub unsafe fn setTextAttributesForNegativeValues( + &self, + textAttributesForNegativeValues: TodoGenerics, + ) { + msg_send![ + self, + setTextAttributesForNegativeValues: textAttributesForNegativeValues + ] + } + pub unsafe fn positiveFormat(&self) -> Id { + msg_send_id![self, positiveFormat] + } + pub unsafe fn setPositiveFormat(&self, positiveFormat: Option<&NSString>) { + msg_send![self, setPositiveFormat: positiveFormat] + } + pub unsafe fn textAttributesForPositiveValues(&self) -> TodoGenerics { + msg_send![self, textAttributesForPositiveValues] + } + pub unsafe fn setTextAttributesForPositiveValues( + &self, + textAttributesForPositiveValues: TodoGenerics, + ) { + msg_send![ + self, + setTextAttributesForPositiveValues: textAttributesForPositiveValues + ] + } + pub unsafe fn allowsFloats(&self) -> bool { + msg_send![self, allowsFloats] + } + pub unsafe fn setAllowsFloats(&self, allowsFloats: bool) { + msg_send![self, setAllowsFloats: allowsFloats] + } + pub unsafe fn decimalSeparator(&self) -> Id { + msg_send_id![self, decimalSeparator] + } + pub unsafe fn setDecimalSeparator(&self, decimalSeparator: Option<&NSString>) { + msg_send![self, setDecimalSeparator: decimalSeparator] + } + pub unsafe fn alwaysShowsDecimalSeparator(&self) -> bool { + msg_send![self, alwaysShowsDecimalSeparator] + } + pub unsafe fn setAlwaysShowsDecimalSeparator(&self, alwaysShowsDecimalSeparator: bool) { + msg_send![ + self, + setAlwaysShowsDecimalSeparator: alwaysShowsDecimalSeparator + ] + } + pub unsafe fn currencyDecimalSeparator(&self) -> Id { + msg_send_id![self, currencyDecimalSeparator] + } + pub unsafe fn setCurrencyDecimalSeparator(&self, currencyDecimalSeparator: Option<&NSString>) { + msg_send![self, setCurrencyDecimalSeparator: currencyDecimalSeparator] + } + pub unsafe fn usesGroupingSeparator(&self) -> bool { + msg_send![self, usesGroupingSeparator] + } + pub unsafe fn setUsesGroupingSeparator(&self, usesGroupingSeparator: bool) { + msg_send![self, setUsesGroupingSeparator: usesGroupingSeparator] + } + pub unsafe fn groupingSeparator(&self) -> Id { + msg_send_id![self, groupingSeparator] + } + pub unsafe fn setGroupingSeparator(&self, groupingSeparator: Option<&NSString>) { + msg_send![self, setGroupingSeparator: groupingSeparator] + } + pub unsafe fn zeroSymbol(&self) -> Option> { + msg_send_id![self, zeroSymbol] + } + pub unsafe fn setZeroSymbol(&self, zeroSymbol: Option<&NSString>) { + msg_send![self, setZeroSymbol: zeroSymbol] + } + pub unsafe fn textAttributesForZero(&self) -> TodoGenerics { + msg_send![self, textAttributesForZero] + } + pub unsafe fn setTextAttributesForZero(&self, textAttributesForZero: TodoGenerics) { + msg_send![self, setTextAttributesForZero: textAttributesForZero] + } + pub unsafe fn nilSymbol(&self) -> Id { + msg_send_id![self, nilSymbol] + } + pub unsafe fn setNilSymbol(&self, nilSymbol: &NSString) { + msg_send![self, setNilSymbol: nilSymbol] + } + pub unsafe fn textAttributesForNil(&self) -> TodoGenerics { + msg_send![self, textAttributesForNil] + } + pub unsafe fn setTextAttributesForNil(&self, textAttributesForNil: TodoGenerics) { + msg_send![self, setTextAttributesForNil: textAttributesForNil] + } + pub unsafe fn notANumberSymbol(&self) -> Id { + msg_send_id![self, notANumberSymbol] + } + pub unsafe fn setNotANumberSymbol(&self, notANumberSymbol: Option<&NSString>) { + msg_send![self, setNotANumberSymbol: notANumberSymbol] + } + pub unsafe fn textAttributesForNotANumber(&self) -> TodoGenerics { + msg_send![self, textAttributesForNotANumber] + } + pub unsafe fn setTextAttributesForNotANumber(&self, textAttributesForNotANumber: TodoGenerics) { + msg_send![ + self, + setTextAttributesForNotANumber: textAttributesForNotANumber + ] + } + pub unsafe fn positiveInfinitySymbol(&self) -> Id { + msg_send_id![self, positiveInfinitySymbol] + } + pub unsafe fn setPositiveInfinitySymbol(&self, positiveInfinitySymbol: &NSString) { + msg_send![self, setPositiveInfinitySymbol: positiveInfinitySymbol] + } + pub unsafe fn textAttributesForPositiveInfinity(&self) -> TodoGenerics { + msg_send![self, textAttributesForPositiveInfinity] + } + pub unsafe fn setTextAttributesForPositiveInfinity( + &self, + textAttributesForPositiveInfinity: TodoGenerics, + ) { + msg_send![ + self, + setTextAttributesForPositiveInfinity: textAttributesForPositiveInfinity + ] + } + pub unsafe fn negativeInfinitySymbol(&self) -> Id { + msg_send_id![self, negativeInfinitySymbol] + } + pub unsafe fn setNegativeInfinitySymbol(&self, negativeInfinitySymbol: &NSString) { + msg_send![self, setNegativeInfinitySymbol: negativeInfinitySymbol] + } + pub unsafe fn textAttributesForNegativeInfinity(&self) -> TodoGenerics { + msg_send![self, textAttributesForNegativeInfinity] + } + pub unsafe fn setTextAttributesForNegativeInfinity( + &self, + textAttributesForNegativeInfinity: TodoGenerics, + ) { + msg_send![ + self, + setTextAttributesForNegativeInfinity: textAttributesForNegativeInfinity + ] + } + pub unsafe fn positivePrefix(&self) -> Id { + msg_send_id![self, positivePrefix] + } + pub unsafe fn setPositivePrefix(&self, positivePrefix: Option<&NSString>) { + msg_send![self, setPositivePrefix: positivePrefix] + } + pub unsafe fn positiveSuffix(&self) -> Id { + msg_send_id![self, positiveSuffix] + } + pub unsafe fn setPositiveSuffix(&self, positiveSuffix: Option<&NSString>) { + msg_send![self, setPositiveSuffix: positiveSuffix] + } + pub unsafe fn negativePrefix(&self) -> Id { + msg_send_id![self, negativePrefix] + } + pub unsafe fn setNegativePrefix(&self, negativePrefix: Option<&NSString>) { + msg_send![self, setNegativePrefix: negativePrefix] + } + pub unsafe fn negativeSuffix(&self) -> Id { + msg_send_id![self, negativeSuffix] + } + pub unsafe fn setNegativeSuffix(&self, negativeSuffix: Option<&NSString>) { + msg_send![self, setNegativeSuffix: negativeSuffix] + } + pub unsafe fn currencyCode(&self) -> Id { + msg_send_id![self, currencyCode] + } + pub unsafe fn setCurrencyCode(&self, currencyCode: Option<&NSString>) { + msg_send![self, setCurrencyCode: currencyCode] + } + pub unsafe fn currencySymbol(&self) -> Id { + msg_send_id![self, currencySymbol] + } + pub unsafe fn setCurrencySymbol(&self, currencySymbol: Option<&NSString>) { + msg_send![self, setCurrencySymbol: currencySymbol] + } + pub unsafe fn internationalCurrencySymbol(&self) -> Id { + msg_send_id![self, internationalCurrencySymbol] + } + pub unsafe fn setInternationalCurrencySymbol( + &self, + internationalCurrencySymbol: Option<&NSString>, + ) { + msg_send![ + self, + setInternationalCurrencySymbol: internationalCurrencySymbol + ] + } + pub unsafe fn percentSymbol(&self) -> Id { + msg_send_id![self, percentSymbol] + } + pub unsafe fn setPercentSymbol(&self, percentSymbol: Option<&NSString>) { + msg_send![self, setPercentSymbol: percentSymbol] + } + pub unsafe fn perMillSymbol(&self) -> Id { + msg_send_id![self, perMillSymbol] + } + pub unsafe fn setPerMillSymbol(&self, perMillSymbol: Option<&NSString>) { + msg_send![self, setPerMillSymbol: perMillSymbol] + } + pub unsafe fn minusSign(&self) -> Id { + msg_send_id![self, minusSign] + } + pub unsafe fn setMinusSign(&self, minusSign: Option<&NSString>) { + msg_send![self, setMinusSign: minusSign] + } + pub unsafe fn plusSign(&self) -> Id { + msg_send_id![self, plusSign] + } + pub unsafe fn setPlusSign(&self, plusSign: Option<&NSString>) { + msg_send![self, setPlusSign: plusSign] + } + pub unsafe fn exponentSymbol(&self) -> Id { + msg_send_id![self, exponentSymbol] + } + pub unsafe fn setExponentSymbol(&self, exponentSymbol: Option<&NSString>) { + msg_send![self, setExponentSymbol: exponentSymbol] + } + pub unsafe fn groupingSize(&self) -> NSUInteger { + msg_send![self, groupingSize] + } + pub unsafe fn setGroupingSize(&self, groupingSize: NSUInteger) { + msg_send![self, setGroupingSize: groupingSize] + } + pub unsafe fn secondaryGroupingSize(&self) -> NSUInteger { + msg_send![self, secondaryGroupingSize] + } + pub unsafe fn setSecondaryGroupingSize(&self, secondaryGroupingSize: NSUInteger) { + msg_send![self, setSecondaryGroupingSize: secondaryGroupingSize] + } + pub unsafe fn multiplier(&self) -> Option> { + msg_send_id![self, multiplier] + } + pub unsafe fn setMultiplier(&self, multiplier: Option<&NSNumber>) { + msg_send![self, setMultiplier: multiplier] + } + pub unsafe fn formatWidth(&self) -> NSUInteger { + msg_send![self, formatWidth] + } + pub unsafe fn setFormatWidth(&self, formatWidth: NSUInteger) { + msg_send![self, setFormatWidth: formatWidth] + } + pub unsafe fn paddingCharacter(&self) -> Id { + msg_send_id![self, paddingCharacter] + } + pub unsafe fn setPaddingCharacter(&self, paddingCharacter: Option<&NSString>) { + msg_send![self, setPaddingCharacter: paddingCharacter] + } + pub unsafe fn paddingPosition(&self) -> NSNumberFormatterPadPosition { + msg_send![self, paddingPosition] + } + pub unsafe fn setPaddingPosition(&self, paddingPosition: NSNumberFormatterPadPosition) { + msg_send![self, setPaddingPosition: paddingPosition] + } + pub unsafe fn roundingMode(&self) -> NSNumberFormatterRoundingMode { + msg_send![self, roundingMode] + } + pub unsafe fn setRoundingMode(&self, roundingMode: NSNumberFormatterRoundingMode) { + msg_send![self, setRoundingMode: roundingMode] + } + pub unsafe fn roundingIncrement(&self) -> Id { + msg_send_id![self, roundingIncrement] + } + pub unsafe fn setRoundingIncrement(&self, roundingIncrement: Option<&NSNumber>) { + msg_send![self, setRoundingIncrement: roundingIncrement] + } + pub unsafe fn minimumIntegerDigits(&self) -> NSUInteger { + msg_send![self, minimumIntegerDigits] + } + pub unsafe fn setMinimumIntegerDigits(&self, minimumIntegerDigits: NSUInteger) { + msg_send![self, setMinimumIntegerDigits: minimumIntegerDigits] + } + pub unsafe fn maximumIntegerDigits(&self) -> NSUInteger { + msg_send![self, maximumIntegerDigits] + } + pub unsafe fn setMaximumIntegerDigits(&self, maximumIntegerDigits: NSUInteger) { + msg_send![self, setMaximumIntegerDigits: maximumIntegerDigits] + } + pub unsafe fn minimumFractionDigits(&self) -> NSUInteger { + msg_send![self, minimumFractionDigits] + } + pub unsafe fn setMinimumFractionDigits(&self, minimumFractionDigits: NSUInteger) { + msg_send![self, setMinimumFractionDigits: minimumFractionDigits] + } + pub unsafe fn maximumFractionDigits(&self) -> NSUInteger { + msg_send![self, maximumFractionDigits] + } + pub unsafe fn setMaximumFractionDigits(&self, maximumFractionDigits: NSUInteger) { + msg_send![self, setMaximumFractionDigits: maximumFractionDigits] + } + pub unsafe fn minimum(&self) -> Option> { + msg_send_id![self, minimum] + } + pub unsafe fn setMinimum(&self, minimum: Option<&NSNumber>) { + msg_send![self, setMinimum: minimum] + } + pub unsafe fn maximum(&self) -> Option> { + msg_send_id![self, maximum] + } + pub unsafe fn setMaximum(&self, maximum: Option<&NSNumber>) { + msg_send![self, setMaximum: maximum] + } + pub unsafe fn currencyGroupingSeparator(&self) -> Id { + msg_send_id![self, currencyGroupingSeparator] + } + pub unsafe fn setCurrencyGroupingSeparator( + &self, + currencyGroupingSeparator: Option<&NSString>, + ) { + msg_send![ + self, + setCurrencyGroupingSeparator: currencyGroupingSeparator + ] + } + pub unsafe fn isLenient(&self) -> bool { + msg_send![self, isLenient] + } + pub unsafe fn setLenient(&self, lenient: bool) { + msg_send![self, setLenient: lenient] + } + pub unsafe fn usesSignificantDigits(&self) -> bool { + msg_send![self, usesSignificantDigits] + } + pub unsafe fn setUsesSignificantDigits(&self, usesSignificantDigits: bool) { + msg_send![self, setUsesSignificantDigits: usesSignificantDigits] + } + pub unsafe fn minimumSignificantDigits(&self) -> NSUInteger { + msg_send![self, minimumSignificantDigits] + } + pub unsafe fn setMinimumSignificantDigits(&self, minimumSignificantDigits: NSUInteger) { + msg_send![self, setMinimumSignificantDigits: minimumSignificantDigits] + } + pub unsafe fn maximumSignificantDigits(&self) -> NSUInteger { + msg_send![self, maximumSignificantDigits] + } + pub unsafe fn setMaximumSignificantDigits(&self, maximumSignificantDigits: NSUInteger) { + msg_send![self, setMaximumSignificantDigits: maximumSignificantDigits] + } + pub unsafe fn isPartialStringValidationEnabled(&self) -> bool { + msg_send![self, isPartialStringValidationEnabled] + } + pub unsafe fn setPartialStringValidationEnabled(&self, partialStringValidationEnabled: bool) { + msg_send![ + self, + setPartialStringValidationEnabled: partialStringValidationEnabled + ] + } +} +#[doc = "NSNumberFormatterCompatibility"] +impl NSNumberFormatter { + pub unsafe fn hasThousandSeparators(&self) -> bool { + msg_send![self, hasThousandSeparators] + } + pub unsafe fn setHasThousandSeparators(&self, hasThousandSeparators: bool) { + msg_send![self, setHasThousandSeparators: hasThousandSeparators] + } + pub unsafe fn thousandSeparator(&self) -> Id { + msg_send_id![self, thousandSeparator] + } + pub unsafe fn setThousandSeparator(&self, thousandSeparator: Option<&NSString>) { + msg_send![self, setThousandSeparator: thousandSeparator] + } + pub unsafe fn localizesFormat(&self) -> bool { + msg_send![self, localizesFormat] + } + pub unsafe fn setLocalizesFormat(&self, localizesFormat: bool) { + msg_send![self, setLocalizesFormat: localizesFormat] + } + pub unsafe fn format(&self) -> Id { + msg_send_id![self, format] + } + pub unsafe fn setFormat(&self, format: &NSString) { + msg_send![self, setFormat: format] + } + pub unsafe fn attributedStringForZero(&self) -> Id { + msg_send_id![self, attributedStringForZero] + } + pub unsafe fn setAttributedStringForZero(&self, attributedStringForZero: &NSAttributedString) { + msg_send![self, setAttributedStringForZero: attributedStringForZero] + } + pub unsafe fn attributedStringForNil(&self) -> Id { + msg_send_id![self, attributedStringForNil] + } + pub unsafe fn setAttributedStringForNil(&self, attributedStringForNil: &NSAttributedString) { + msg_send![self, setAttributedStringForNil: attributedStringForNil] + } + pub unsafe fn attributedStringForNotANumber(&self) -> Id { + msg_send_id![self, attributedStringForNotANumber] + } + pub unsafe fn setAttributedStringForNotANumber( + &self, + attributedStringForNotANumber: &NSAttributedString, + ) { + msg_send![ + self, + setAttributedStringForNotANumber: attributedStringForNotANumber + ] + } + pub unsafe fn roundingBehavior(&self) -> Id { + msg_send_id![self, roundingBehavior] + } + pub unsafe fn setRoundingBehavior(&self, roundingBehavior: &NSDecimalNumberHandler) { + msg_send![self, setRoundingBehavior: roundingBehavior] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs new file mode 100644 index 000000000..a7f4c5921 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -0,0 +1,30 @@ +#[doc = "NSCoderMethods"] +impl NSObject { + pub unsafe fn version() -> NSInteger { + msg_send![Self::class(), version] + } + pub unsafe fn setVersion(aVersion: NSInteger) { + msg_send![Self::class(), setVersion: aVersion] + } + pub unsafe fn replacementObjectForCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, replacementObjectForCoder: coder] + } + pub unsafe fn awakeAfterUsingCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, awakeAfterUsingCoder: coder] + } + pub unsafe fn classForCoder(&self) -> &Class { + msg_send![self, classForCoder] + } +} +#[doc = "NSDeprecatedMethods"] +impl NSObject { + pub unsafe fn poseAsClass(aClass: &Class) { + msg_send![Self::class(), poseAsClass: aClass] + } +} +#[doc = "NSDiscardableContentProxy"] +impl NSObject { + pub unsafe fn autoContentAccessingProxy(&self) -> Id { + msg_send_id![self, autoContentAccessingProxy] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs new file mode 100644 index 000000000..52761ceb7 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -0,0 +1,43 @@ +#[doc = "NSScripting"] +impl NSObject { + pub unsafe fn scriptingValueForSpecifier( + &self, + objectSpecifier: &NSScriptObjectSpecifier, + ) -> Option> { + msg_send_id![self, scriptingValueForSpecifier: objectSpecifier] + } + pub unsafe fn copyScriptingValue_forKey_withProperties( + &self, + value: &Object, + key: &NSString, + properties: TodoGenerics, + ) -> Option> { + msg_send_id![ + self, + copyScriptingValue: value, + forKey: key, + withProperties: properties + ] + } + pub unsafe fn newScriptingObjectOfClass_forValueForKey_withContentsValue_properties( + &self, + objectClass: &Class, + key: &NSString, + contentsValue: Option<&Object>, + properties: TodoGenerics, + ) -> Option> { + msg_send_id![ + self, + newScriptingObjectOfClass: objectClass, + forValueForKey: key, + withContentsValue: contentsValue, + properties: properties + ] + } + pub unsafe fn scriptingProperties(&self) -> TodoGenerics { + msg_send![self, scriptingProperties] + } + pub unsafe fn setScriptingProperties(&self, scriptingProperties: TodoGenerics) { + msg_send![self, setScriptingProperties: scriptingProperties] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs new file mode 100644 index 000000000..4dc1223fb --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -0,0 +1,200 @@ +extern_class!( + #[derive(Debug)] + struct NSOperation; + unsafe impl ClassType for NSOperation { + type Super = NSObject; + } +); +impl NSOperation { + pub unsafe fn start(&self) { + msg_send![self, start] + } + pub unsafe fn main(&self) { + msg_send![self, main] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn addDependency(&self, op: &NSOperation) { + msg_send![self, addDependency: op] + } + pub unsafe fn removeDependency(&self, op: &NSOperation) { + msg_send![self, removeDependency: op] + } + pub unsafe fn waitUntilFinished(&self) { + msg_send![self, waitUntilFinished] + } + pub unsafe fn isCancelled(&self) -> bool { + msg_send![self, isCancelled] + } + pub unsafe fn isExecuting(&self) -> bool { + msg_send![self, isExecuting] + } + pub unsafe fn isFinished(&self) -> bool { + msg_send![self, isFinished] + } + pub unsafe fn isConcurrent(&self) -> bool { + msg_send![self, isConcurrent] + } + pub unsafe fn isAsynchronous(&self) -> bool { + msg_send![self, isAsynchronous] + } + pub unsafe fn isReady(&self) -> bool { + msg_send![self, isReady] + } + pub unsafe fn dependencies(&self) -> TodoGenerics { + msg_send![self, dependencies] + } + pub unsafe fn queuePriority(&self) -> NSOperationQueuePriority { + msg_send![self, queuePriority] + } + pub unsafe fn setQueuePriority(&self, queuePriority: NSOperationQueuePriority) { + msg_send![self, setQueuePriority: queuePriority] + } + pub unsafe fn completionBlock(&self) -> TodoBlock { + msg_send![self, completionBlock] + } + pub unsafe fn setCompletionBlock(&self, completionBlock: TodoBlock) { + msg_send![self, setCompletionBlock: completionBlock] + } + pub unsafe fn threadPriority(&self) -> c_double { + msg_send![self, threadPriority] + } + pub unsafe fn setThreadPriority(&self, threadPriority: c_double) { + msg_send![self, setThreadPriority: threadPriority] + } + pub unsafe fn qualityOfService(&self) -> NSQualityOfService { + msg_send![self, qualityOfService] + } + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { + msg_send![self, setQualityOfService: qualityOfService] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } +} +extern_class!( + #[derive(Debug)] + struct NSBlockOperation; + unsafe impl ClassType for NSBlockOperation { + type Super = NSOperation; + } +); +impl NSBlockOperation { + pub unsafe fn blockOperationWithBlock(block: TodoBlock) -> Id { + msg_send_id![Self::class(), blockOperationWithBlock: block] + } + pub unsafe fn addExecutionBlock(&self, block: TodoBlock) { + msg_send![self, addExecutionBlock: block] + } + pub unsafe fn executionBlocks(&self) -> TodoGenerics { + msg_send![self, executionBlocks] + } +} +extern_class!( + #[derive(Debug)] + struct NSInvocationOperation; + unsafe impl ClassType for NSInvocationOperation { + type Super = NSOperation; + } +); +impl NSInvocationOperation { + pub unsafe fn initWithTarget_selector_object( + &self, + target: &Object, + sel: Sel, + arg: Option<&Object>, + ) -> Option> { + msg_send_id![self, initWithTarget: target, selector: sel, object: arg] + } + pub unsafe fn initWithInvocation(&self, inv: &NSInvocation) -> Id { + msg_send_id![self, initWithInvocation: inv] + } + pub unsafe fn invocation(&self) -> Id { + msg_send_id![self, invocation] + } + pub unsafe fn result(&self) -> Option> { + msg_send_id![self, result] + } +} +extern_class!( + #[derive(Debug)] + struct NSOperationQueue; + unsafe impl ClassType for NSOperationQueue { + type Super = NSObject; + } +); +impl NSOperationQueue { + pub unsafe fn addOperation(&self, op: &NSOperation) { + msg_send![self, addOperation: op] + } + pub unsafe fn addOperations_waitUntilFinished(&self, ops: TodoGenerics, wait: bool) { + msg_send![self, addOperations: ops, waitUntilFinished: wait] + } + pub unsafe fn addOperationWithBlock(&self, block: TodoBlock) { + msg_send![self, addOperationWithBlock: block] + } + pub unsafe fn addBarrierBlock(&self, barrier: TodoBlock) { + msg_send![self, addBarrierBlock: barrier] + } + pub unsafe fn cancelAllOperations(&self) { + msg_send![self, cancelAllOperations] + } + pub unsafe fn waitUntilAllOperationsAreFinished(&self) { + msg_send![self, waitUntilAllOperationsAreFinished] + } + pub unsafe fn progress(&self) -> Id { + msg_send_id![self, progress] + } + pub unsafe fn maxConcurrentOperationCount(&self) -> NSInteger { + msg_send![self, maxConcurrentOperationCount] + } + pub unsafe fn setMaxConcurrentOperationCount(&self, maxConcurrentOperationCount: NSInteger) { + msg_send![ + self, + setMaxConcurrentOperationCount: maxConcurrentOperationCount + ] + } + pub unsafe fn isSuspended(&self) -> bool { + msg_send![self, isSuspended] + } + pub unsafe fn setSuspended(&self, suspended: bool) { + msg_send![self, setSuspended: suspended] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } + pub unsafe fn qualityOfService(&self) -> NSQualityOfService { + msg_send![self, qualityOfService] + } + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { + msg_send![self, setQualityOfService: qualityOfService] + } + pub unsafe fn underlyingQueue(&self) -> dispatch_queue_t { + msg_send![self, underlyingQueue] + } + pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: dispatch_queue_t) { + msg_send![self, setUnderlyingQueue: underlyingQueue] + } + pub unsafe fn currentQueue() -> Option> { + msg_send_id![Self::class(), currentQueue] + } + pub unsafe fn mainQueue() -> Id { + msg_send_id![Self::class(), mainQueue] + } +} +#[doc = "NSDeprecated"] +impl NSOperationQueue { + pub unsafe fn operations(&self) -> TodoGenerics { + msg_send![self, operations] + } + pub unsafe fn operationCount(&self) -> NSUInteger { + msg_send![self, operationCount] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs new file mode 100644 index 000000000..bae074275 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -0,0 +1,56 @@ +extern_class!( + #[derive(Debug)] + struct NSOrderedCollectionChange; + unsafe impl ClassType for NSOrderedCollectionChange { + type Super = NSObject; + } +); +impl NSOrderedCollectionChange { + pub unsafe fn changeWithObject_type_index( + anObject: ObjectType, + type_: NSCollectionChangeType, + index: NSUInteger, + ) -> TodoGenerics { + msg_send ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index] + } + pub unsafe fn changeWithObject_type_index_associatedIndex( + anObject: ObjectType, + type_: NSCollectionChangeType, + index: NSUInteger, + associatedIndex: NSUInteger, + ) -> TodoGenerics { + msg_send ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithObject_type_index( + &self, + anObject: ObjectType, + type_: NSCollectionChangeType, + index: NSUInteger, + ) -> Id { + msg_send_id ! [self , initWithObject : anObject , type : type_ , index : index] + } + pub unsafe fn initWithObject_type_index_associatedIndex( + &self, + anObject: ObjectType, + type_: NSCollectionChangeType, + index: NSUInteger, + associatedIndex: NSUInteger, + ) -> Id { + msg_send_id ! [self , initWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] + } + pub unsafe fn object(&self) -> ObjectType { + msg_send![self, object] + } + pub unsafe fn changeType(&self) -> NSCollectionChangeType { + msg_send![self, changeType] + } + pub unsafe fn index(&self) -> NSUInteger { + msg_send![self, index] + } + pub unsafe fn associatedIndex(&self) -> NSUInteger { + msg_send![self, associatedIndex] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs new file mode 100644 index 000000000..f30237dbb --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -0,0 +1,62 @@ +extern_class!( + #[derive(Debug)] + struct NSOrderedCollectionDifference; + unsafe impl ClassType for NSOrderedCollectionDifference { + type Super = NSObject; + } +); +impl NSOrderedCollectionDifference { + pub unsafe fn initWithChanges(&self, changes: TodoGenerics) -> Id { + msg_send_id![self, initWithChanges: changes] + } + pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges( + &self, + inserts: &NSIndexSet, + insertedObjects: TodoGenerics, + removes: &NSIndexSet, + removedObjects: TodoGenerics, + changes: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + initWithInsertIndexes: inserts, + insertedObjects: insertedObjects, + removeIndexes: removes, + removedObjects: removedObjects, + additionalChanges: changes + ] + } + pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects( + &self, + inserts: &NSIndexSet, + insertedObjects: TodoGenerics, + removes: &NSIndexSet, + removedObjects: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + initWithInsertIndexes: inserts, + insertedObjects: insertedObjects, + removeIndexes: removes, + removedObjects: removedObjects + ] + } + pub unsafe fn differenceByTransformingChangesWithBlock( + &self, + block: TodoBlock, + ) -> TodoGenerics { + msg_send![self, differenceByTransformingChangesWithBlock: block] + } + pub unsafe fn inverseDifference(&self) -> Id { + msg_send_id![self, inverseDifference] + } + pub unsafe fn insertions(&self) -> TodoGenerics { + msg_send![self, insertions] + } + pub unsafe fn removals(&self) -> TodoGenerics { + msg_send![self, removals] + } + pub unsafe fn hasChanges(&self) -> bool { + msg_send![self, hasChanges] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs new file mode 100644 index 000000000..43bd22128 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -0,0 +1,463 @@ +extern_class!( + #[derive(Debug)] + struct NSOrderedSet; + unsafe impl ClassType for NSOrderedSet { + type Super = NSObject; + } +); +impl NSOrderedSet { + pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> ObjectType { + msg_send![self, objectAtIndex: idx] + } + pub unsafe fn indexOfObject(&self, object: ObjectType) -> NSUInteger { + msg_send![self, indexOfObject: object] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithObjects_count( + &self, + objects: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![self, initWithObjects: objects, count: cnt] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } +} +#[doc = "NSExtendedOrderedSet"] +impl NSOrderedSet { + pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { + msg_send![self, getObjects: objects, range: range] + } + pub unsafe fn objectsAtIndexes(&self, indexes: &NSIndexSet) -> TodoGenerics { + msg_send![self, objectsAtIndexes: indexes] + } + pub unsafe fn isEqualToOrderedSet(&self, other: TodoGenerics) -> bool { + msg_send![self, isEqualToOrderedSet: other] + } + pub unsafe fn containsObject(&self, object: ObjectType) -> bool { + msg_send![self, containsObject: object] + } + pub unsafe fn intersectsOrderedSet(&self, other: TodoGenerics) -> bool { + msg_send![self, intersectsOrderedSet: other] + } + pub unsafe fn intersectsSet(&self, set: TodoGenerics) -> bool { + msg_send![self, intersectsSet: set] + } + pub unsafe fn isSubsetOfOrderedSet(&self, other: TodoGenerics) -> bool { + msg_send![self, isSubsetOfOrderedSet: other] + } + pub unsafe fn isSubsetOfSet(&self, set: TodoGenerics) -> bool { + msg_send![self, isSubsetOfSet: set] + } + pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> ObjectType { + msg_send![self, objectAtIndexedSubscript: idx] + } + pub unsafe fn objectEnumerator(&self) -> TodoGenerics { + msg_send![self, objectEnumerator] + } + pub unsafe fn reverseObjectEnumerator(&self) -> TodoGenerics { + msg_send![self, reverseObjectEnumerator] + } + pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateObjectsUsingBlock: block] + } + pub unsafe fn enumerateObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] + } + pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateObjectsAtIndexes: s, + options: opts, + usingBlock: block + ] + } + pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger { + msg_send![self, indexOfObjectPassingTest: predicate] + } + pub unsafe fn indexOfObjectWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![self, indexOfObjectWithOptions: opts, passingTest: predicate] + } + pub unsafe fn indexOfObjectAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![ + self, + indexOfObjectAtIndexes: s, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn indexesOfObjectsPassingTest( + &self, + predicate: TodoBlock, + ) -> Id { + msg_send_id![self, indexesOfObjectsPassingTest: predicate] + } + pub unsafe fn indexesOfObjectsWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![ + self, + indexesOfObjectsWithOptions: opts, + passingTest: predicate + ] + } + pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![ + self, + indexesOfObjectsAtIndexes: s, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( + &self, + object: ObjectType, + range: NSRange, + opts: NSBinarySearchingOptions, + cmp: NSComparator, + ) -> NSUInteger { + msg_send![ + self, + indexOfObject: object, + inSortedRange: range, + options: opts, + usingComparator: cmp + ] + } + pub unsafe fn sortedArrayUsingComparator(&self, cmptr: NSComparator) -> TodoGenerics { + msg_send![self, sortedArrayUsingComparator: cmptr] + } + pub unsafe fn sortedArrayWithOptions_usingComparator( + &self, + opts: NSSortOptions, + cmptr: NSComparator, + ) -> TodoGenerics { + msg_send![self, sortedArrayWithOptions: opts, usingComparator: cmptr] + } + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn descriptionWithLocale_indent( + &self, + locale: Option<&Object>, + level: NSUInteger, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale, indent: level] + } + pub unsafe fn firstObject(&self) -> ObjectType { + msg_send![self, firstObject] + } + pub unsafe fn lastObject(&self) -> ObjectType { + msg_send![self, lastObject] + } + pub unsafe fn reversedOrderedSet(&self) -> TodoGenerics { + msg_send![self, reversedOrderedSet] + } + pub unsafe fn array(&self) -> TodoGenerics { + msg_send![self, array] + } + pub unsafe fn set(&self) -> TodoGenerics { + msg_send![self, set] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } +} +#[doc = "NSOrderedSetCreation"] +impl NSOrderedSet { + pub unsafe fn orderedSet() -> Id { + msg_send_id![Self::class(), orderedSet] + } + pub unsafe fn orderedSetWithObject(object: ObjectType) -> Id { + msg_send_id![Self::class(), orderedSetWithObject: object] + } + pub unsafe fn orderedSetWithObjects_count( + objects: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![Self::class(), orderedSetWithObjects: objects, count: cnt] + } + pub unsafe fn orderedSetWithOrderedSet(set: TodoGenerics) -> Id { + msg_send_id![Self::class(), orderedSetWithOrderedSet: set] + } + pub unsafe fn orderedSetWithOrderedSet_range_copyItems( + set: TodoGenerics, + range: NSRange, + flag: bool, + ) -> Id { + msg_send_id![ + Self::class(), + orderedSetWithOrderedSet: set, + range: range, + copyItems: flag + ] + } + pub unsafe fn orderedSetWithArray(array: TodoGenerics) -> Id { + msg_send_id![Self::class(), orderedSetWithArray: array] + } + pub unsafe fn orderedSetWithArray_range_copyItems( + array: TodoGenerics, + range: NSRange, + flag: bool, + ) -> Id { + msg_send_id![ + Self::class(), + orderedSetWithArray: array, + range: range, + copyItems: flag + ] + } + pub unsafe fn orderedSetWithSet(set: TodoGenerics) -> Id { + msg_send_id![Self::class(), orderedSetWithSet: set] + } + pub unsafe fn orderedSetWithSet_copyItems(set: TodoGenerics, flag: bool) -> Id { + msg_send_id![Self::class(), orderedSetWithSet: set, copyItems: flag] + } + pub unsafe fn initWithObject(&self, object: ObjectType) -> Id { + msg_send_id![self, initWithObject: object] + } + pub unsafe fn initWithOrderedSet(&self, set: TodoGenerics) -> Id { + msg_send_id![self, initWithOrderedSet: set] + } + pub unsafe fn initWithOrderedSet_copyItems( + &self, + set: TodoGenerics, + flag: bool, + ) -> Id { + msg_send_id![self, initWithOrderedSet: set, copyItems: flag] + } + pub unsafe fn initWithOrderedSet_range_copyItems( + &self, + set: TodoGenerics, + range: NSRange, + flag: bool, + ) -> Id { + msg_send_id![self, initWithOrderedSet: set, range: range, copyItems: flag] + } + pub unsafe fn initWithArray(&self, array: TodoGenerics) -> Id { + msg_send_id![self, initWithArray: array] + } + pub unsafe fn initWithArray_copyItems( + &self, + set: TodoGenerics, + flag: bool, + ) -> Id { + msg_send_id![self, initWithArray: set, copyItems: flag] + } + pub unsafe fn initWithArray_range_copyItems( + &self, + set: TodoGenerics, + range: NSRange, + flag: bool, + ) -> Id { + msg_send_id![self, initWithArray: set, range: range, copyItems: flag] + } + pub unsafe fn initWithSet(&self, set: TodoGenerics) -> Id { + msg_send_id![self, initWithSet: set] + } + pub unsafe fn initWithSet_copyItems(&self, set: TodoGenerics, flag: bool) -> Id { + msg_send_id![self, initWithSet: set, copyItems: flag] + } +} +#[doc = "NSOrderedSetDiffing"] +impl NSOrderedSet { + pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( + &self, + other: TodoGenerics, + options: NSOrderedCollectionDifferenceCalculationOptions, + block: TodoBlock, + ) -> TodoGenerics { + msg_send![ + self, + differenceFromOrderedSet: other, + withOptions: options, + usingEquivalenceTest: block + ] + } + pub unsafe fn differenceFromOrderedSet_withOptions( + &self, + other: TodoGenerics, + options: NSOrderedCollectionDifferenceCalculationOptions, + ) -> TodoGenerics { + msg_send![self, differenceFromOrderedSet: other, withOptions: options] + } + pub unsafe fn differenceFromOrderedSet(&self, other: TodoGenerics) -> TodoGenerics { + msg_send![self, differenceFromOrderedSet: other] + } + pub unsafe fn orderedSetByApplyingDifference(&self, difference: TodoGenerics) -> TodoGenerics { + msg_send![self, orderedSetByApplyingDifference: difference] + } +} +extern_class!( + #[derive(Debug)] + struct NSMutableOrderedSet; + unsafe impl ClassType for NSMutableOrderedSet { + type Super = NSOrderedSet; + } +); +impl NSMutableOrderedSet { + pub unsafe fn insertObject_atIndex(&self, object: ObjectType, idx: NSUInteger) { + msg_send![self, insertObject: object, atIndex: idx] + } + pub unsafe fn removeObjectAtIndex(&self, idx: NSUInteger) { + msg_send![self, removeObjectAtIndex: idx] + } + pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: ObjectType) { + msg_send![self, replaceObjectAtIndex: idx, withObject: object] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: numItems] + } +} +#[doc = "NSExtendedMutableOrderedSet"] +impl NSMutableOrderedSet { + pub unsafe fn addObject(&self, object: ObjectType) { + msg_send![self, addObject: object] + } + pub unsafe fn addObjects_count(&self, objects: TodoArray, count: NSUInteger) { + msg_send![self, addObjects: objects, count: count] + } + pub unsafe fn addObjectsFromArray(&self, array: TodoGenerics) { + msg_send![self, addObjectsFromArray: array] + } + pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( + &self, + idx1: NSUInteger, + idx2: NSUInteger, + ) { + msg_send![self, exchangeObjectAtIndex: idx1, withObjectAtIndex: idx2] + } + pub unsafe fn moveObjectsAtIndexes_toIndex(&self, indexes: &NSIndexSet, idx: NSUInteger) { + msg_send![self, moveObjectsAtIndexes: indexes, toIndex: idx] + } + pub unsafe fn insertObjects_atIndexes(&self, objects: TodoGenerics, indexes: &NSIndexSet) { + msg_send![self, insertObjects: objects, atIndexes: indexes] + } + pub unsafe fn setObject_atIndex(&self, obj: ObjectType, idx: NSUInteger) { + msg_send![self, setObject: obj, atIndex: idx] + } + pub unsafe fn setObject_atIndexedSubscript(&self, obj: ObjectType, idx: NSUInteger) { + msg_send![self, setObject: obj, atIndexedSubscript: idx] + } + pub unsafe fn replaceObjectsInRange_withObjects_count( + &self, + range: NSRange, + objects: TodoArray, + count: NSUInteger, + ) { + msg_send![ + self, + replaceObjectsInRange: range, + withObjects: objects, + count: count + ] + } + pub unsafe fn replaceObjectsAtIndexes_withObjects( + &self, + indexes: &NSIndexSet, + objects: TodoGenerics, + ) { + msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] + } + pub unsafe fn removeObjectsInRange(&self, range: NSRange) { + msg_send![self, removeObjectsInRange: range] + } + pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet) { + msg_send![self, removeObjectsAtIndexes: indexes] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn removeObject(&self, object: ObjectType) { + msg_send![self, removeObject: object] + } + pub unsafe fn removeObjectsInArray(&self, array: TodoGenerics) { + msg_send![self, removeObjectsInArray: array] + } + pub unsafe fn intersectOrderedSet(&self, other: TodoGenerics) { + msg_send![self, intersectOrderedSet: other] + } + pub unsafe fn minusOrderedSet(&self, other: TodoGenerics) { + msg_send![self, minusOrderedSet: other] + } + pub unsafe fn unionOrderedSet(&self, other: TodoGenerics) { + msg_send![self, unionOrderedSet: other] + } + pub unsafe fn intersectSet(&self, other: TodoGenerics) { + msg_send![self, intersectSet: other] + } + pub unsafe fn minusSet(&self, other: TodoGenerics) { + msg_send![self, minusSet: other] + } + pub unsafe fn unionSet(&self, other: TodoGenerics) { + msg_send![self, unionSet: other] + } + pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator) { + msg_send![self, sortUsingComparator: cmptr] + } + pub unsafe fn sortWithOptions_usingComparator(&self, opts: NSSortOptions, cmptr: NSComparator) { + msg_send![self, sortWithOptions: opts, usingComparator: cmptr] + } + pub unsafe fn sortRange_options_usingComparator( + &self, + range: NSRange, + opts: NSSortOptions, + cmptr: NSComparator, + ) { + msg_send![ + self, + sortRange: range, + options: opts, + usingComparator: cmptr + ] + } +} +#[doc = "NSMutableOrderedSetCreation"] +impl NSMutableOrderedSet { + pub unsafe fn orderedSetWithCapacity(numItems: NSUInteger) -> Id { + msg_send_id![Self::class(), orderedSetWithCapacity: numItems] + } +} +#[doc = "NSMutableOrderedSetDiffing"] +impl NSMutableOrderedSet { + pub unsafe fn applyDifference(&self, difference: TodoGenerics) { + msg_send![self, applyDifference: difference] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs new file mode 100644 index 000000000..f67e35ae4 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -0,0 +1,62 @@ +extern_class!( + #[derive(Debug)] + struct NSOrthography; + unsafe impl ClassType for NSOrthography { + type Super = NSObject; + } +); +impl NSOrthography { + pub unsafe fn initWithDominantScript_languageMap( + &self, + script: &NSString, + map: TodoGenerics, + ) -> Id { + msg_send_id![self, initWithDominantScript: script, languageMap: map] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn dominantScript(&self) -> Id { + msg_send_id![self, dominantScript] + } + pub unsafe fn languageMap(&self) -> TodoGenerics { + msg_send![self, languageMap] + } +} +#[doc = "NSOrthographyExtended"] +impl NSOrthography { + pub unsafe fn languagesForScript(&self, script: &NSString) -> TodoGenerics { + msg_send![self, languagesForScript: script] + } + pub unsafe fn dominantLanguageForScript( + &self, + script: &NSString, + ) -> Option> { + msg_send_id![self, dominantLanguageForScript: script] + } + pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id { + msg_send_id![Self::class(), defaultOrthographyForLanguage: language] + } + pub unsafe fn dominantLanguage(&self) -> Id { + msg_send_id![self, dominantLanguage] + } + pub unsafe fn allScripts(&self) -> TodoGenerics { + msg_send![self, allScripts] + } + pub unsafe fn allLanguages(&self) -> TodoGenerics { + msg_send![self, allLanguages] + } +} +#[doc = "NSOrthographyCreation"] +impl NSOrthography { + pub unsafe fn orthographyWithDominantScript_languageMap( + script: &NSString, + map: TodoGenerics, + ) -> Id { + msg_send_id![ + Self::class(), + orthographyWithDominantScript: script, + languageMap: map + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs new file mode 100644 index 000000000..6af257e61 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -0,0 +1,79 @@ +#[doc = "NSStringPathExtensions"] +impl NSString { + pub unsafe fn pathWithComponents(components: TodoGenerics) -> Id { + msg_send_id![Self::class(), pathWithComponents: components] + } + pub unsafe fn stringByAppendingPathComponent(&self, str: &NSString) -> Id { + msg_send_id![self, stringByAppendingPathComponent: str] + } + pub unsafe fn stringByAppendingPathExtension( + &self, + str: &NSString, + ) -> Option> { + msg_send_id![self, stringByAppendingPathExtension: str] + } + pub unsafe fn stringsByAppendingPaths(&self, paths: TodoGenerics) -> TodoGenerics { + msg_send![self, stringsByAppendingPaths: paths] + } + pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( + &self, + outputName: *mut Option<&NSString>, + flag: bool, + outputArray: *mut TodoGenerics, + filterTypes: TodoGenerics, + ) -> NSUInteger { + msg_send![ + self, + completePathIntoString: outputName, + caseSensitive: flag, + matchesIntoArray: outputArray, + filterTypes: filterTypes + ] + } + pub unsafe fn getFileSystemRepresentation_maxLength( + &self, + cname: NonNull, + max: NSUInteger, + ) -> bool { + msg_send![self, getFileSystemRepresentation: cname, maxLength: max] + } + pub unsafe fn pathComponents(&self) -> TodoGenerics { + msg_send![self, pathComponents] + } + pub unsafe fn isAbsolutePath(&self) -> bool { + msg_send![self, isAbsolutePath] + } + pub unsafe fn lastPathComponent(&self) -> Id { + msg_send_id![self, lastPathComponent] + } + pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id { + msg_send_id![self, stringByDeletingLastPathComponent] + } + pub unsafe fn pathExtension(&self) -> Id { + msg_send_id![self, pathExtension] + } + pub unsafe fn stringByDeletingPathExtension(&self) -> Id { + msg_send_id![self, stringByDeletingPathExtension] + } + pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id { + msg_send_id![self, stringByAbbreviatingWithTildeInPath] + } + pub unsafe fn stringByExpandingTildeInPath(&self) -> Id { + msg_send_id![self, stringByExpandingTildeInPath] + } + pub unsafe fn stringByStandardizingPath(&self) -> Id { + msg_send_id![self, stringByStandardizingPath] + } + pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id { + msg_send_id![self, stringByResolvingSymlinksInPath] + } + pub unsafe fn fileSystemRepresentation(&self) -> NonNull { + msg_send![self, fileSystemRepresentation] + } +} +#[doc = "NSArrayPathExtensions"] +impl NSArray { + pub unsafe fn pathsMatchingExtensions(&self, filterTypes: TodoGenerics) -> TodoGenerics { + msg_send![self, pathsMatchingExtensions: filterTypes] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs new file mode 100644 index 000000000..311595de3 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -0,0 +1,54 @@ +extern_class!( + #[derive(Debug)] + struct NSPersonNameComponents; + unsafe impl ClassType for NSPersonNameComponents { + type Super = NSObject; + } +); +impl NSPersonNameComponents { + pub unsafe fn namePrefix(&self) -> Option> { + msg_send_id![self, namePrefix] + } + pub unsafe fn setNamePrefix(&self, namePrefix: Option<&NSString>) { + msg_send![self, setNamePrefix: namePrefix] + } + pub unsafe fn givenName(&self) -> Option> { + msg_send_id![self, givenName] + } + pub unsafe fn setGivenName(&self, givenName: Option<&NSString>) { + msg_send![self, setGivenName: givenName] + } + pub unsafe fn middleName(&self) -> Option> { + msg_send_id![self, middleName] + } + pub unsafe fn setMiddleName(&self, middleName: Option<&NSString>) { + msg_send![self, setMiddleName: middleName] + } + pub unsafe fn familyName(&self) -> Option> { + msg_send_id![self, familyName] + } + pub unsafe fn setFamilyName(&self, familyName: Option<&NSString>) { + msg_send![self, setFamilyName: familyName] + } + pub unsafe fn nameSuffix(&self) -> Option> { + msg_send_id![self, nameSuffix] + } + pub unsafe fn setNameSuffix(&self, nameSuffix: Option<&NSString>) { + msg_send![self, setNameSuffix: nameSuffix] + } + pub unsafe fn nickname(&self) -> Option> { + msg_send_id![self, nickname] + } + pub unsafe fn setNickname(&self, nickname: Option<&NSString>) { + msg_send![self, setNickname: nickname] + } + pub unsafe fn phoneticRepresentation(&self) -> Option> { + msg_send_id![self, phoneticRepresentation] + } + pub unsafe fn setPhoneticRepresentation( + &self, + phoneticRepresentation: Option<&NSPersonNameComponents>, + ) { + msg_send![self, setPhoneticRepresentation: phoneticRepresentation] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs new file mode 100644 index 000000000..beb3084f6 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -0,0 +1,70 @@ +extern_class!( + #[derive(Debug)] + struct NSPersonNameComponentsFormatter; + unsafe impl ClassType for NSPersonNameComponentsFormatter { + type Super = NSFormatter; + } +); +impl NSPersonNameComponentsFormatter { + pub unsafe fn localizedStringFromPersonNameComponents_style_options( + components: &NSPersonNameComponents, + nameFormatStyle: NSPersonNameComponentsFormatterStyle, + nameOptions: NSPersonNameComponentsFormatterOptions, + ) -> Id { + msg_send_id![ + Self::class(), + localizedStringFromPersonNameComponents: components, + style: nameFormatStyle, + options: nameOptions + ] + } + pub unsafe fn stringFromPersonNameComponents( + &self, + components: &NSPersonNameComponents, + ) -> Id { + msg_send_id![self, stringFromPersonNameComponents: components] + } + pub unsafe fn annotatedStringFromPersonNameComponents( + &self, + components: &NSPersonNameComponents, + ) -> Id { + msg_send_id![self, annotatedStringFromPersonNameComponents: components] + } + pub unsafe fn personNameComponentsFromString( + &self, + string: &NSString, + ) -> Option> { + msg_send_id![self, personNameComponentsFromString: string] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: *mut Option<&Object>, + string: &NSString, + error: *mut Option<&NSString>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } + pub unsafe fn style(&self) -> NSPersonNameComponentsFormatterStyle { + msg_send![self, style] + } + pub unsafe fn setStyle(&self, style: NSPersonNameComponentsFormatterStyle) { + msg_send![self, setStyle: style] + } + pub unsafe fn isPhonetic(&self) -> bool { + msg_send![self, isPhonetic] + } + pub unsafe fn setPhonetic(&self, phonetic: bool) { + msg_send![self, setPhonetic: phonetic] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs new file mode 100644 index 000000000..ab00af33d --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -0,0 +1,73 @@ +extern_class!( + #[derive(Debug)] + struct NSPointerArray; + unsafe impl ClassType for NSPointerArray { + type Super = NSObject; + } +); +impl NSPointerArray { + pub unsafe fn initWithOptions(&self, options: NSPointerFunctionsOptions) -> Id { + msg_send_id![self, initWithOptions: options] + } + pub unsafe fn initWithPointerFunctions( + &self, + functions: &NSPointerFunctions, + ) -> Id { + msg_send_id![self, initWithPointerFunctions: functions] + } + pub unsafe fn pointerArrayWithOptions( + options: NSPointerFunctionsOptions, + ) -> Id { + msg_send_id![Self::class(), pointerArrayWithOptions: options] + } + pub unsafe fn pointerArrayWithPointerFunctions( + functions: &NSPointerFunctions, + ) -> Id { + msg_send_id![Self::class(), pointerArrayWithPointerFunctions: functions] + } + pub unsafe fn pointerAtIndex(&self, index: NSUInteger) -> *mut c_void { + msg_send![self, pointerAtIndex: index] + } + pub unsafe fn addPointer(&self, pointer: *mut c_void) { + msg_send![self, addPointer: pointer] + } + pub unsafe fn removePointerAtIndex(&self, index: NSUInteger) { + msg_send![self, removePointerAtIndex: index] + } + pub unsafe fn insertPointer_atIndex(&self, item: *mut c_void, index: NSUInteger) { + msg_send![self, insertPointer: item, atIndex: index] + } + pub unsafe fn replacePointerAtIndex_withPointer(&self, index: NSUInteger, item: *mut c_void) { + msg_send![self, replacePointerAtIndex: index, withPointer: item] + } + pub unsafe fn compact(&self) { + msg_send![self, compact] + } + pub unsafe fn pointerFunctions(&self) -> Id { + msg_send_id![self, pointerFunctions] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn setCount(&self, count: NSUInteger) { + msg_send![self, setCount: count] + } +} +#[doc = "NSPointerArrayConveniences"] +impl NSPointerArray { + pub unsafe fn pointerArrayWithStrongObjects() -> Id { + msg_send_id![Self::class(), pointerArrayWithStrongObjects] + } + pub unsafe fn pointerArrayWithWeakObjects() -> Id { + msg_send_id![Self::class(), pointerArrayWithWeakObjects] + } + pub unsafe fn strongObjectsPointerArray() -> Id { + msg_send_id![Self::class(), strongObjectsPointerArray] + } + pub unsafe fn weakObjectsPointerArray() -> Id { + msg_send_id![Self::class(), weakObjectsPointerArray] + } + pub unsafe fn allObjects(&self) -> Id { + msg_send_id![self, allObjects] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs new file mode 100644 index 000000000..7917967f2 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -0,0 +1,68 @@ +extern_class!( + #[derive(Debug)] + struct NSPointerFunctions; + unsafe impl ClassType for NSPointerFunctions { + type Super = NSObject; + } +); +impl NSPointerFunctions { + pub unsafe fn initWithOptions(&self, options: NSPointerFunctionsOptions) -> Id { + msg_send_id![self, initWithOptions: options] + } + pub unsafe fn pointerFunctionsWithOptions( + options: NSPointerFunctionsOptions, + ) -> Id { + msg_send_id![Self::class(), pointerFunctionsWithOptions: options] + } + pub unsafe fn hashFunction(&self) -> *mut TodoFunction { + msg_send![self, hashFunction] + } + pub unsafe fn setHashFunction(&self, hashFunction: *mut TodoFunction) { + msg_send![self, setHashFunction: hashFunction] + } + pub unsafe fn isEqualFunction(&self) -> *mut TodoFunction { + msg_send![self, isEqualFunction] + } + pub unsafe fn setIsEqualFunction(&self, isEqualFunction: *mut TodoFunction) { + msg_send![self, setIsEqualFunction: isEqualFunction] + } + pub unsafe fn sizeFunction(&self) -> *mut TodoFunction { + msg_send![self, sizeFunction] + } + pub unsafe fn setSizeFunction(&self, sizeFunction: *mut TodoFunction) { + msg_send![self, setSizeFunction: sizeFunction] + } + pub unsafe fn descriptionFunction(&self) -> *mut TodoFunction { + msg_send![self, descriptionFunction] + } + pub unsafe fn setDescriptionFunction(&self, descriptionFunction: *mut TodoFunction) { + msg_send![self, setDescriptionFunction: descriptionFunction] + } + pub unsafe fn relinquishFunction(&self) -> *mut TodoFunction { + msg_send![self, relinquishFunction] + } + pub unsafe fn setRelinquishFunction(&self, relinquishFunction: *mut TodoFunction) { + msg_send![self, setRelinquishFunction: relinquishFunction] + } + pub unsafe fn acquireFunction(&self) -> *mut TodoFunction { + msg_send![self, acquireFunction] + } + pub unsafe fn setAcquireFunction(&self, acquireFunction: *mut TodoFunction) { + msg_send![self, setAcquireFunction: acquireFunction] + } + pub unsafe fn usesStrongWriteBarrier(&self) -> bool { + msg_send![self, usesStrongWriteBarrier] + } + pub unsafe fn setUsesStrongWriteBarrier(&self, usesStrongWriteBarrier: bool) { + msg_send![self, setUsesStrongWriteBarrier: usesStrongWriteBarrier] + } + pub unsafe fn usesWeakReadAndWriteBarriers(&self) -> bool { + msg_send![self, usesWeakReadAndWriteBarriers] + } + pub unsafe fn setUsesWeakReadAndWriteBarriers(&self, usesWeakReadAndWriteBarriers: bool) { + msg_send![ + self, + setUsesWeakReadAndWriteBarriers: usesWeakReadAndWriteBarriers + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs new file mode 100644 index 000000000..8ac4f9533 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -0,0 +1,219 @@ +extern_class!( + #[derive(Debug)] + struct NSPort; + unsafe impl ClassType for NSPort { + type Super = NSObject; + } +); +impl NSPort { + pub unsafe fn port() -> Id { + msg_send_id![Self::class(), port] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn setDelegate(&self, anObject: TodoGenerics) { + msg_send![self, setDelegate: anObject] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] + } + pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, removeFromRunLoop: runLoop, forMode: mode] + } + pub unsafe fn sendBeforeDate_components_from_reserved( + &self, + limitDate: &NSDate, + components: Option<&NSMutableArray>, + receivePort: Option<&NSPort>, + headerSpaceReserved: NSUInteger, + ) -> bool { + msg_send![ + self, + sendBeforeDate: limitDate, + components: components, + from: receivePort, + reserved: headerSpaceReserved + ] + } + pub unsafe fn sendBeforeDate_msgid_components_from_reserved( + &self, + limitDate: &NSDate, + msgID: NSUInteger, + components: Option<&NSMutableArray>, + receivePort: Option<&NSPort>, + headerSpaceReserved: NSUInteger, + ) -> bool { + msg_send![ + self, + sendBeforeDate: limitDate, + msgid: msgID, + components: components, + from: receivePort, + reserved: headerSpaceReserved + ] + } + pub unsafe fn addConnection_toRunLoop_forMode( + &self, + conn: &NSConnection, + runLoop: &NSRunLoop, + mode: NSRunLoopMode, + ) { + msg_send![self, addConnection: conn, toRunLoop: runLoop, forMode: mode] + } + pub unsafe fn removeConnection_fromRunLoop_forMode( + &self, + conn: &NSConnection, + runLoop: &NSRunLoop, + mode: NSRunLoopMode, + ) { + msg_send![ + self, + removeConnection: conn, + fromRunLoop: runLoop, + forMode: mode + ] + } + pub unsafe fn isValid(&self) -> bool { + msg_send![self, isValid] + } + pub unsafe fn reservedSpaceLength(&self) -> NSUInteger { + msg_send![self, reservedSpaceLength] + } +} +extern_class!( + #[derive(Debug)] + struct NSMachPort; + unsafe impl ClassType for NSMachPort { + type Super = NSPort; + } +); +impl NSMachPort { + pub unsafe fn portWithMachPort(machPort: uint32_t) -> Id { + msg_send_id![Self::class(), portWithMachPort: machPort] + } + pub unsafe fn initWithMachPort(&self, machPort: uint32_t) -> Id { + msg_send_id![self, initWithMachPort: machPort] + } + pub unsafe fn setDelegate(&self, anObject: TodoGenerics) { + msg_send![self, setDelegate: anObject] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn portWithMachPort_options( + machPort: uint32_t, + f: NSMachPortOptions, + ) -> Id { + msg_send_id![Self::class(), portWithMachPort: machPort, options: f] + } + pub unsafe fn initWithMachPort_options( + &self, + machPort: uint32_t, + f: NSMachPortOptions, + ) -> Id { + msg_send_id![self, initWithMachPort: machPort, options: f] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] + } + pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, removeFromRunLoop: runLoop, forMode: mode] + } + pub unsafe fn machPort(&self) -> uint32_t { + msg_send![self, machPort] + } +} +extern_class!( + #[derive(Debug)] + struct NSMessagePort; + unsafe impl ClassType for NSMessagePort { + type Super = NSPort; + } +); +impl NSMessagePort {} +extern_class!( + #[derive(Debug)] + struct NSSocketPort; + unsafe impl ClassType for NSSocketPort { + type Super = NSPort; + } +); +impl NSSocketPort { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithTCPPort(&self, port: c_ushort) -> Option> { + msg_send_id![self, initWithTCPPort: port] + } + pub unsafe fn initWithProtocolFamily_socketType_protocol_address( + &self, + family: c_int, + type_: c_int, + protocol: c_int, + address: &NSData, + ) -> Option> { + msg_send_id![ + self, + initWithProtocolFamily: family, + socketType: type_, + protocol: protocol, + address: address + ] + } + pub unsafe fn initWithProtocolFamily_socketType_protocol_socket( + &self, + family: c_int, + type_: c_int, + protocol: c_int, + sock: NSSocketNativeHandle, + ) -> Option> { + msg_send_id![ + self, + initWithProtocolFamily: family, + socketType: type_, + protocol: protocol, + socket: sock + ] + } + pub unsafe fn initRemoteWithTCPPort_host( + &self, + port: c_ushort, + hostName: Option<&NSString>, + ) -> Option> { + msg_send_id![self, initRemoteWithTCPPort: port, host: hostName] + } + pub unsafe fn initRemoteWithProtocolFamily_socketType_protocol_address( + &self, + family: c_int, + type_: c_int, + protocol: c_int, + address: &NSData, + ) -> Id { + msg_send_id![ + self, + initRemoteWithProtocolFamily: family, + socketType: type_, + protocol: protocol, + address: address + ] + } + pub unsafe fn protocolFamily(&self) -> c_int { + msg_send![self, protocolFamily] + } + pub unsafe fn socketType(&self) -> c_int { + msg_send![self, socketType] + } + pub unsafe fn protocol(&self) -> c_int { + msg_send![self, protocol] + } + pub unsafe fn address(&self) -> Id { + msg_send_id![self, address] + } + pub unsafe fn socket(&self) -> NSSocketNativeHandle { + msg_send![self, socket] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs new file mode 100644 index 000000000..7656009f1 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -0,0 +1,64 @@ +extern_class!( + #[derive(Debug)] + struct NSPortCoder; + unsafe impl ClassType for NSPortCoder { + type Super = NSCoder; + } +); +impl NSPortCoder { + pub unsafe fn isBycopy(&self) -> bool { + msg_send![self, isBycopy] + } + pub unsafe fn isByref(&self) -> bool { + msg_send![self, isByref] + } + pub unsafe fn encodePortObject(&self, aport: &NSPort) { + msg_send![self, encodePortObject: aport] + } + pub unsafe fn decodePortObject(&self) -> Option> { + msg_send_id![self, decodePortObject] + } + pub unsafe fn connection(&self) -> Option> { + msg_send_id![self, connection] + } + pub unsafe fn portCoderWithReceivePort_sendPort_components( + rcvPort: Option<&NSPort>, + sndPort: Option<&NSPort>, + comps: Option<&NSArray>, + ) -> Id { + msg_send_id![ + Self::class(), + portCoderWithReceivePort: rcvPort, + sendPort: sndPort, + components: comps + ] + } + pub unsafe fn initWithReceivePort_sendPort_components( + &self, + rcvPort: Option<&NSPort>, + sndPort: Option<&NSPort>, + comps: Option<&NSArray>, + ) -> Id { + msg_send_id![ + self, + initWithReceivePort: rcvPort, + sendPort: sndPort, + components: comps + ] + } + pub unsafe fn dispatch(&self) { + msg_send![self, dispatch] + } +} +#[doc = "NSDistributedObjects"] +impl NSObject { + pub unsafe fn replacementObjectForPortCoder( + &self, + coder: &NSPortCoder, + ) -> Option> { + msg_send_id![self, replacementObjectForPortCoder: coder] + } + pub unsafe fn classForPortCoder(&self) -> &Class { + msg_send![self, classForPortCoder] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs new file mode 100644 index 000000000..8c060d59b --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -0,0 +1,40 @@ +extern_class!( + #[derive(Debug)] + struct NSPortMessage; + unsafe impl ClassType for NSPortMessage { + type Super = NSObject; + } +); +impl NSPortMessage { + pub unsafe fn initWithSendPort_receivePort_components( + &self, + sendPort: Option<&NSPort>, + replyPort: Option<&NSPort>, + components: Option<&NSArray>, + ) -> Id { + msg_send_id![ + self, + initWithSendPort: sendPort, + receivePort: replyPort, + components: components + ] + } + pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool { + msg_send![self, sendBeforeDate: date] + } + pub unsafe fn components(&self) -> Option> { + msg_send_id![self, components] + } + pub unsafe fn receivePort(&self) -> Option> { + msg_send_id![self, receivePort] + } + pub unsafe fn sendPort(&self) -> Option> { + msg_send_id![self, sendPort] + } + pub unsafe fn msgid(&self) -> uint32_t { + msg_send![self, msgid] + } + pub unsafe fn setMsgid(&self, msgid: uint32_t) { + msg_send![self, setMsgid: msgid] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs new file mode 100644 index 000000000..385aa5f45 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -0,0 +1,141 @@ +extern_class!( + #[derive(Debug)] + struct NSPortNameServer; + unsafe impl ClassType for NSPortNameServer { + type Super = NSObject; + } +); +impl NSPortNameServer { + pub unsafe fn systemDefaultPortNameServer() -> Id { + msg_send_id![Self::class(), systemDefaultPortNameServer] + } + pub unsafe fn portForName(&self, name: &NSString) -> Option> { + msg_send_id![self, portForName: name] + } + pub unsafe fn portForName_host( + &self, + name: &NSString, + host: Option<&NSString>, + ) -> Option> { + msg_send_id![self, portForName: name, host: host] + } + pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { + msg_send![self, registerPort: port, name: name] + } + pub unsafe fn removePortForName(&self, name: &NSString) -> bool { + msg_send![self, removePortForName: name] + } +} +extern_class!( + #[derive(Debug)] + struct NSMachBootstrapServer; + unsafe impl ClassType for NSMachBootstrapServer { + type Super = NSPortNameServer; + } +); +impl NSMachBootstrapServer { + pub unsafe fn sharedInstance() -> Id { + msg_send_id![Self::class(), sharedInstance] + } + pub unsafe fn portForName(&self, name: &NSString) -> Option> { + msg_send_id![self, portForName: name] + } + pub unsafe fn portForName_host( + &self, + name: &NSString, + host: Option<&NSString>, + ) -> Option> { + msg_send_id![self, portForName: name, host: host] + } + pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { + msg_send![self, registerPort: port, name: name] + } + pub unsafe fn servicePortWithName(&self, name: &NSString) -> Option> { + msg_send_id![self, servicePortWithName: name] + } +} +extern_class!( + #[derive(Debug)] + struct NSMessagePortNameServer; + unsafe impl ClassType for NSMessagePortNameServer { + type Super = NSPortNameServer; + } +); +impl NSMessagePortNameServer { + pub unsafe fn sharedInstance() -> Id { + msg_send_id![Self::class(), sharedInstance] + } + pub unsafe fn portForName(&self, name: &NSString) -> Option> { + msg_send_id![self, portForName: name] + } + pub unsafe fn portForName_host( + &self, + name: &NSString, + host: Option<&NSString>, + ) -> Option> { + msg_send_id![self, portForName: name, host: host] + } +} +extern_class!( + #[derive(Debug)] + struct NSSocketPortNameServer; + unsafe impl ClassType for NSSocketPortNameServer { + type Super = NSPortNameServer; + } +); +impl NSSocketPortNameServer { + pub unsafe fn sharedInstance() -> Id { + msg_send_id![Self::class(), sharedInstance] + } + pub unsafe fn portForName(&self, name: &NSString) -> Option> { + msg_send_id![self, portForName: name] + } + pub unsafe fn portForName_host( + &self, + name: &NSString, + host: Option<&NSString>, + ) -> Option> { + msg_send_id![self, portForName: name, host: host] + } + pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { + msg_send![self, registerPort: port, name: name] + } + pub unsafe fn removePortForName(&self, name: &NSString) -> bool { + msg_send![self, removePortForName: name] + } + pub unsafe fn portForName_host_nameServerPortNumber( + &self, + name: &NSString, + host: Option<&NSString>, + portNumber: uint16_t, + ) -> Option> { + msg_send_id![ + self, + portForName: name, + host: host, + nameServerPortNumber: portNumber + ] + } + pub unsafe fn registerPort_name_nameServerPortNumber( + &self, + port: &NSPort, + name: &NSString, + portNumber: uint16_t, + ) -> bool { + msg_send![ + self, + registerPort: port, + name: name, + nameServerPortNumber: portNumber + ] + } + pub unsafe fn defaultNameServerPortNumber(&self) -> uint16_t { + msg_send![self, defaultNameServerPortNumber] + } + pub unsafe fn setDefaultNameServerPortNumber(&self, defaultNameServerPortNumber: uint16_t) { + msg_send![ + self, + setDefaultNameServerPortNumber: defaultNameServerPortNumber + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs new file mode 100644 index 000000000..8b1f2630a --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -0,0 +1,102 @@ +extern_class!( + #[derive(Debug)] + struct NSPredicate; + unsafe impl ClassType for NSPredicate { + type Super = NSObject; + } +); +impl NSPredicate { + pub unsafe fn predicateWithFormat_argumentArray( + predicateFormat: &NSString, + arguments: Option<&NSArray>, + ) -> Id { + msg_send_id![ + Self::class(), + predicateWithFormat: predicateFormat, + argumentArray: arguments + ] + } + pub unsafe fn predicateWithFormat_arguments( + predicateFormat: &NSString, + argList: va_list, + ) -> Id { + msg_send_id![ + Self::class(), + predicateWithFormat: predicateFormat, + arguments: argList + ] + } + pub unsafe fn predicateFromMetadataQueryString( + queryString: &NSString, + ) -> Option> { + msg_send_id![Self::class(), predicateFromMetadataQueryString: queryString] + } + pub unsafe fn predicateWithValue(value: bool) -> Id { + msg_send_id![Self::class(), predicateWithValue: value] + } + pub unsafe fn predicateWithBlock(block: TodoBlock) -> Id { + msg_send_id![Self::class(), predicateWithBlock: block] + } + pub unsafe fn predicateWithSubstitutionVariables( + &self, + variables: TodoGenerics, + ) -> Id { + msg_send_id![self, predicateWithSubstitutionVariables: variables] + } + pub unsafe fn evaluateWithObject(&self, object: Option<&Object>) -> bool { + msg_send![self, evaluateWithObject: object] + } + pub unsafe fn evaluateWithObject_substitutionVariables( + &self, + object: Option<&Object>, + bindings: TodoGenerics, + ) -> bool { + msg_send![ + self, + evaluateWithObject: object, + substitutionVariables: bindings + ] + } + pub unsafe fn allowEvaluation(&self) { + msg_send![self, allowEvaluation] + } + pub unsafe fn predicateFormat(&self) -> Id { + msg_send_id![self, predicateFormat] + } +} +#[doc = "NSPredicateSupport"] +impl NSArray { + pub unsafe fn filteredArrayUsingPredicate(&self, predicate: &NSPredicate) -> TodoGenerics { + msg_send![self, filteredArrayUsingPredicate: predicate] + } +} +#[doc = "NSPredicateSupport"] +impl NSMutableArray { + pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate) { + msg_send![self, filterUsingPredicate: predicate] + } +} +#[doc = "NSPredicateSupport"] +impl NSSet { + pub unsafe fn filteredSetUsingPredicate(&self, predicate: &NSPredicate) -> TodoGenerics { + msg_send![self, filteredSetUsingPredicate: predicate] + } +} +#[doc = "NSPredicateSupport"] +impl NSMutableSet { + pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate) { + msg_send![self, filterUsingPredicate: predicate] + } +} +#[doc = "NSPredicateSupport"] +impl NSOrderedSet { + pub unsafe fn filteredOrderedSetUsingPredicate(&self, p: &NSPredicate) -> TodoGenerics { + msg_send![self, filteredOrderedSetUsingPredicate: p] + } +} +#[doc = "NSPredicateSupport"] +impl NSMutableOrderedSet { + pub unsafe fn filterUsingPredicate(&self, p: &NSPredicate) { + msg_send![self, filterUsingPredicate: p] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs new file mode 100644 index 000000000..fc3dc1216 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -0,0 +1,154 @@ +extern_class!( + #[derive(Debug)] + struct NSProcessInfo; + unsafe impl ClassType for NSProcessInfo { + type Super = NSObject; + } +); +impl NSProcessInfo { + pub unsafe fn operatingSystem(&self) -> NSUInteger { + msg_send![self, operatingSystem] + } + pub unsafe fn operatingSystemName(&self) -> Id { + msg_send_id![self, operatingSystemName] + } + pub unsafe fn isOperatingSystemAtLeastVersion( + &self, + version: NSOperatingSystemVersion, + ) -> bool { + msg_send![self, isOperatingSystemAtLeastVersion: version] + } + pub unsafe fn disableSuddenTermination(&self) { + msg_send![self, disableSuddenTermination] + } + pub unsafe fn enableSuddenTermination(&self) { + msg_send![self, enableSuddenTermination] + } + pub unsafe fn disableAutomaticTermination(&self, reason: &NSString) { + msg_send![self, disableAutomaticTermination: reason] + } + pub unsafe fn enableAutomaticTermination(&self, reason: &NSString) { + msg_send![self, enableAutomaticTermination: reason] + } + pub unsafe fn processInfo() -> Id { + msg_send_id![Self::class(), processInfo] + } + pub unsafe fn environment(&self) -> TodoGenerics { + msg_send![self, environment] + } + pub unsafe fn arguments(&self) -> TodoGenerics { + msg_send![self, arguments] + } + pub unsafe fn hostName(&self) -> Id { + msg_send_id![self, hostName] + } + pub unsafe fn processName(&self) -> Id { + msg_send_id![self, processName] + } + pub unsafe fn setProcessName(&self, processName: &NSString) { + msg_send![self, setProcessName: processName] + } + pub unsafe fn processIdentifier(&self) -> c_int { + msg_send![self, processIdentifier] + } + pub unsafe fn globallyUniqueString(&self) -> Id { + msg_send_id![self, globallyUniqueString] + } + pub unsafe fn operatingSystemVersionString(&self) -> Id { + msg_send_id![self, operatingSystemVersionString] + } + pub unsafe fn operatingSystemVersion(&self) -> NSOperatingSystemVersion { + msg_send![self, operatingSystemVersion] + } + pub unsafe fn processorCount(&self) -> NSUInteger { + msg_send![self, processorCount] + } + pub unsafe fn activeProcessorCount(&self) -> NSUInteger { + msg_send![self, activeProcessorCount] + } + pub unsafe fn physicalMemory(&self) -> c_ulonglong { + msg_send![self, physicalMemory] + } + pub unsafe fn systemUptime(&self) -> NSTimeInterval { + msg_send![self, systemUptime] + } + pub unsafe fn automaticTerminationSupportEnabled(&self) -> bool { + msg_send![self, automaticTerminationSupportEnabled] + } + pub unsafe fn setAutomaticTerminationSupportEnabled( + &self, + automaticTerminationSupportEnabled: bool, + ) { + msg_send![ + self, + setAutomaticTerminationSupportEnabled: automaticTerminationSupportEnabled + ] + } +} +#[doc = "NSProcessInfoActivity"] +impl NSProcessInfo { + pub unsafe fn beginActivityWithOptions_reason( + &self, + options: NSActivityOptions, + reason: &NSString, + ) -> TodoGenerics { + msg_send![self, beginActivityWithOptions: options, reason: reason] + } + pub unsafe fn endActivity(&self, activity: TodoGenerics) { + msg_send![self, endActivity: activity] + } + pub unsafe fn performActivityWithOptions_reason_usingBlock( + &self, + options: NSActivityOptions, + reason: &NSString, + block: TodoBlock, + ) { + msg_send![ + self, + performActivityWithOptions: options, + reason: reason, + usingBlock: block + ] + } + pub unsafe fn performExpiringActivityWithReason_usingBlock( + &self, + reason: &NSString, + block: TodoBlock, + ) { + msg_send![ + self, + performExpiringActivityWithReason: reason, + usingBlock: block + ] + } +} +#[doc = "NSUserInformation"] +impl NSProcessInfo { + pub unsafe fn userName(&self) -> Id { + msg_send_id![self, userName] + } + pub unsafe fn fullUserName(&self) -> Id { + msg_send_id![self, fullUserName] + } +} +#[doc = "NSProcessInfoThermalState"] +impl NSProcessInfo { + pub unsafe fn thermalState(&self) -> NSProcessInfoThermalState { + msg_send![self, thermalState] + } +} +#[doc = "NSProcessInfoPowerState"] +impl NSProcessInfo { + pub unsafe fn isLowPowerModeEnabled(&self) -> bool { + msg_send![self, isLowPowerModeEnabled] + } +} +#[doc = "NSProcessInfoPlatform"] +impl NSProcessInfo { + pub unsafe fn isMacCatalystApp(&self) -> bool { + msg_send![self, isMacCatalystApp] + } + pub unsafe fn isiOSAppOnMac(&self) -> bool { + msg_send![self, isiOSAppOnMac] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs new file mode 100644 index 000000000..e4c05bfed --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -0,0 +1,219 @@ +extern_class!( + #[derive(Debug)] + struct NSProgress; + unsafe impl ClassType for NSProgress { + type Super = NSObject; + } +); +impl NSProgress { + pub unsafe fn currentProgress() -> Option> { + msg_send_id![Self::class(), currentProgress] + } + pub unsafe fn progressWithTotalUnitCount(unitCount: int64_t) -> Id { + msg_send_id![Self::class(), progressWithTotalUnitCount: unitCount] + } + pub unsafe fn discreteProgressWithTotalUnitCount(unitCount: int64_t) -> Id { + msg_send_id![Self::class(), discreteProgressWithTotalUnitCount: unitCount] + } + pub unsafe fn progressWithTotalUnitCount_parent_pendingUnitCount( + unitCount: int64_t, + parent: &NSProgress, + portionOfParentTotalUnitCount: int64_t, + ) -> Id { + msg_send_id![ + Self::class(), + progressWithTotalUnitCount: unitCount, + parent: parent, + pendingUnitCount: portionOfParentTotalUnitCount + ] + } + pub unsafe fn initWithParent_userInfo( + &self, + parentProgressOrNil: Option<&NSProgress>, + userInfoOrNil: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + initWithParent: parentProgressOrNil, + userInfo: userInfoOrNil + ] + } + pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unitCount: int64_t) { + msg_send![self, becomeCurrentWithPendingUnitCount: unitCount] + } + pub unsafe fn performAsCurrentWithPendingUnitCount_usingBlock( + &self, + unitCount: int64_t, + work: TodoBlock, + ) { + msg_send![ + self, + performAsCurrentWithPendingUnitCount: unitCount, + usingBlock: work + ] + } + pub unsafe fn resignCurrent(&self) { + msg_send![self, resignCurrent] + } + pub unsafe fn addChild_withPendingUnitCount(&self, child: &NSProgress, inUnitCount: int64_t) { + msg_send![self, addChild: child, withPendingUnitCount: inUnitCount] + } + pub unsafe fn setUserInfoObject_forKey( + &self, + objectOrNil: Option<&Object>, + key: NSProgressUserInfoKey, + ) { + msg_send![self, setUserInfoObject: objectOrNil, forKey: key] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn pause(&self) { + msg_send![self, pause] + } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } + pub unsafe fn publish(&self) { + msg_send![self, publish] + } + pub unsafe fn unpublish(&self) { + msg_send![self, unpublish] + } + pub unsafe fn addSubscriberForFileURL_withPublishingHandler( + url: &NSURL, + publishingHandler: NSProgressPublishingHandler, + ) -> Id { + msg_send_id![ + Self::class(), + addSubscriberForFileURL: url, + withPublishingHandler: publishingHandler + ] + } + pub unsafe fn removeSubscriber(subscriber: &Object) { + msg_send![Self::class(), removeSubscriber: subscriber] + } + pub unsafe fn totalUnitCount(&self) -> int64_t { + msg_send![self, totalUnitCount] + } + pub unsafe fn setTotalUnitCount(&self, totalUnitCount: int64_t) { + msg_send![self, setTotalUnitCount: totalUnitCount] + } + pub unsafe fn completedUnitCount(&self) -> int64_t { + msg_send![self, completedUnitCount] + } + pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: int64_t) { + msg_send![self, setCompletedUnitCount: completedUnitCount] + } + pub unsafe fn localizedDescription(&self) -> Id { + msg_send_id![self, localizedDescription] + } + pub unsafe fn setLocalizedDescription(&self, localizedDescription: Option<&NSString>) { + msg_send![self, setLocalizedDescription: localizedDescription] + } + pub unsafe fn localizedAdditionalDescription(&self) -> Id { + msg_send_id![self, localizedAdditionalDescription] + } + pub unsafe fn setLocalizedAdditionalDescription( + &self, + localizedAdditionalDescription: Option<&NSString>, + ) { + msg_send![ + self, + setLocalizedAdditionalDescription: localizedAdditionalDescription + ] + } + pub unsafe fn isCancellable(&self) -> bool { + msg_send![self, isCancellable] + } + pub unsafe fn setCancellable(&self, cancellable: bool) { + msg_send![self, setCancellable: cancellable] + } + pub unsafe fn isPausable(&self) -> bool { + msg_send![self, isPausable] + } + pub unsafe fn setPausable(&self, pausable: bool) { + msg_send![self, setPausable: pausable] + } + pub unsafe fn isCancelled(&self) -> bool { + msg_send![self, isCancelled] + } + pub unsafe fn isPaused(&self) -> bool { + msg_send![self, isPaused] + } + pub unsafe fn cancellationHandler(&self) -> TodoBlock { + msg_send![self, cancellationHandler] + } + pub unsafe fn setCancellationHandler(&self, cancellationHandler: TodoBlock) { + msg_send![self, setCancellationHandler: cancellationHandler] + } + pub unsafe fn pausingHandler(&self) -> TodoBlock { + msg_send![self, pausingHandler] + } + pub unsafe fn setPausingHandler(&self, pausingHandler: TodoBlock) { + msg_send![self, setPausingHandler: pausingHandler] + } + pub unsafe fn resumingHandler(&self) -> TodoBlock { + msg_send![self, resumingHandler] + } + pub unsafe fn setResumingHandler(&self, resumingHandler: TodoBlock) { + msg_send![self, setResumingHandler: resumingHandler] + } + pub unsafe fn isIndeterminate(&self) -> bool { + msg_send![self, isIndeterminate] + } + pub unsafe fn fractionCompleted(&self) -> c_double { + msg_send![self, fractionCompleted] + } + pub unsafe fn isFinished(&self) -> bool { + msg_send![self, isFinished] + } + pub unsafe fn userInfo(&self) -> TodoGenerics { + msg_send![self, userInfo] + } + pub unsafe fn kind(&self) -> NSProgressKind { + msg_send![self, kind] + } + pub unsafe fn setKind(&self, kind: NSProgressKind) { + msg_send![self, setKind: kind] + } + pub unsafe fn estimatedTimeRemaining(&self) -> Option> { + msg_send_id![self, estimatedTimeRemaining] + } + pub unsafe fn setEstimatedTimeRemaining(&self, estimatedTimeRemaining: Option<&NSNumber>) { + msg_send![self, setEstimatedTimeRemaining: estimatedTimeRemaining] + } + pub unsafe fn throughput(&self) -> Option> { + msg_send_id![self, throughput] + } + pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>) { + msg_send![self, setThroughput: throughput] + } + pub unsafe fn fileOperationKind(&self) -> NSProgressFileOperationKind { + msg_send![self, fileOperationKind] + } + pub unsafe fn setFileOperationKind(&self, fileOperationKind: NSProgressFileOperationKind) { + msg_send![self, setFileOperationKind: fileOperationKind] + } + pub unsafe fn fileURL(&self) -> Option> { + msg_send_id![self, fileURL] + } + pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>) { + msg_send![self, setFileURL: fileURL] + } + pub unsafe fn fileTotalCount(&self) -> Option> { + msg_send_id![self, fileTotalCount] + } + pub unsafe fn setFileTotalCount(&self, fileTotalCount: Option<&NSNumber>) { + msg_send![self, setFileTotalCount: fileTotalCount] + } + pub unsafe fn fileCompletedCount(&self) -> Option> { + msg_send_id![self, fileCompletedCount] + } + pub unsafe fn setFileCompletedCount(&self, fileCompletedCount: Option<&NSNumber>) { + msg_send![self, setFileCompletedCount: fileCompletedCount] + } + pub unsafe fn isOld(&self) -> bool { + msg_send![self, isOld] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs new file mode 100644 index 000000000..01e67f5c4 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -0,0 +1,99 @@ +extern_class!( + #[derive(Debug)] + struct NSPropertyListSerialization; + unsafe impl ClassType for NSPropertyListSerialization { + type Super = NSObject; + } +); +impl NSPropertyListSerialization { + pub unsafe fn propertyList_isValidForFormat( + plist: &Object, + format: NSPropertyListFormat, + ) -> bool { + msg_send![Self::class(), propertyList: plist, isValidForFormat: format] + } + pub unsafe fn dataWithPropertyList_format_options_error( + plist: &Object, + format: NSPropertyListFormat, + opt: NSPropertyListWriteOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + dataWithPropertyList: plist, + format: format, + options: opt, + error: error + ] + } + pub unsafe fn writePropertyList_toStream_format_options_error( + plist: &Object, + stream: &NSOutputStream, + format: NSPropertyListFormat, + opt: NSPropertyListWriteOptions, + error: *mut Option<&NSError>, + ) -> NSInteger { + msg_send![ + Self::class(), + writePropertyList: plist, + toStream: stream, + format: format, + options: opt, + error: error + ] + } + pub unsafe fn propertyListWithData_options_format_error( + data: &NSData, + opt: NSPropertyListReadOptions, + format: *mut NSPropertyListFormat, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + propertyListWithData: data, + options: opt, + format: format, + error: error + ] + } + pub unsafe fn propertyListWithStream_options_format_error( + stream: &NSInputStream, + opt: NSPropertyListReadOptions, + format: *mut NSPropertyListFormat, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + propertyListWithStream: stream, + options: opt, + format: format, + error: error + ] + } + pub unsafe fn dataFromPropertyList_format_errorDescription( + plist: &Object, + format: NSPropertyListFormat, + errorString: *mut Option<&NSString>, + ) -> Option> { + msg_send_id![ + Self::class(), + dataFromPropertyList: plist, + format: format, + errorDescription: errorString + ] + } + pub unsafe fn propertyListFromData_mutabilityOption_format_errorDescription( + data: &NSData, + opt: NSPropertyListMutabilityOptions, + format: *mut NSPropertyListFormat, + errorString: *mut Option<&NSString>, + ) -> Option> { + msg_send_id![ + Self::class(), + propertyListFromData: data, + mutabilityOption: opt, + format: format, + errorDescription: errorString + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs new file mode 100644 index 000000000..e63068db9 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -0,0 +1,35 @@ +extern_class!( + #[derive(Debug)] + struct NSProtocolChecker; + unsafe impl ClassType for NSProtocolChecker { + type Super = NSProxy; + } +); +impl NSProtocolChecker { + pub unsafe fn protocol(&self) -> Id { + msg_send_id![self, protocol] + } + pub unsafe fn target(&self) -> Option> { + msg_send_id![self, target] + } +} +#[doc = "NSProtocolCheckerCreation"] +impl NSProtocolChecker { + pub unsafe fn protocolCheckerWithTarget_protocol( + anObject: &NSObject, + aProtocol: &Protocol, + ) -> Id { + msg_send_id![ + Self::class(), + protocolCheckerWithTarget: anObject, + protocol: aProtocol + ] + } + pub unsafe fn initWithTarget_protocol( + &self, + anObject: &NSObject, + aProtocol: &Protocol, + ) -> Id { + msg_send_id![self, initWithTarget: anObject, protocol: aProtocol] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs new file mode 100644 index 000000000..49d1582d5 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -0,0 +1,48 @@ +extern_class!( + #[derive(Debug)] + struct NSProxy; + unsafe impl ClassType for NSProxy { + type Super = Object; + } +); +impl NSProxy { + pub unsafe fn alloc() -> Id { + msg_send_id![Self::class(), alloc] + } + pub unsafe fn allocWithZone(zone: *mut NSZone) -> Id { + msg_send_id![Self::class(), allocWithZone: zone] + } + pub unsafe fn class() -> &Class { + msg_send![Self::class(), class] + } + pub unsafe fn forwardInvocation(&self, invocation: &NSInvocation) { + msg_send![self, forwardInvocation: invocation] + } + pub unsafe fn methodSignatureForSelector( + &self, + sel: Sel, + ) -> Option> { + msg_send_id![self, methodSignatureForSelector: sel] + } + pub unsafe fn dealloc(&self) { + msg_send![self, dealloc] + } + pub unsafe fn finalize(&self) { + msg_send![self, finalize] + } + pub unsafe fn respondsToSelector(aSelector: Sel) -> bool { + msg_send![Self::class(), respondsToSelector: aSelector] + } + pub unsafe fn allowsWeakReference(&self) -> bool { + msg_send![self, allowsWeakReference] + } + pub unsafe fn retainWeakReference(&self) -> bool { + msg_send![self, retainWeakReference] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn debugDescription(&self) -> Id { + msg_send_id![self, debugDescription] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs new file mode 100644 index 000000000..deff844eb --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -0,0 +1,9 @@ +#[doc = "NSValueRangeExtensions"] +impl NSValue { + pub unsafe fn valueWithRange(range: NSRange) -> Id { + msg_send_id![Self::class(), valueWithRange: range] + } + pub unsafe fn rangeValue(&self) -> NSRange { + msg_send![self, rangeValue] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs new file mode 100644 index 000000000..ce014614f --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -0,0 +1,196 @@ +extern_class!( + #[derive(Debug)] + struct NSRegularExpression; + unsafe impl ClassType for NSRegularExpression { + type Super = NSObject; + } +); +impl NSRegularExpression { + pub unsafe fn regularExpressionWithPattern_options_error( + pattern: &NSString, + options: NSRegularExpressionOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + regularExpressionWithPattern: pattern, + options: options, + error: error + ] + } + pub unsafe fn initWithPattern_options_error( + &self, + pattern: &NSString, + options: NSRegularExpressionOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithPattern: pattern, + options: options, + error: error + ] + } + pub unsafe fn escapedPatternForString(string: &NSString) -> Id { + msg_send_id![Self::class(), escapedPatternForString: string] + } + pub unsafe fn pattern(&self) -> Id { + msg_send_id![self, pattern] + } + pub unsafe fn options(&self) -> NSRegularExpressionOptions { + msg_send![self, options] + } + pub unsafe fn numberOfCaptureGroups(&self) -> NSUInteger { + msg_send![self, numberOfCaptureGroups] + } +} +#[doc = "NSMatching"] +impl NSRegularExpression { + pub unsafe fn enumerateMatchesInString_options_range_usingBlock( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateMatchesInString: string, + options: options, + range: range, + usingBlock: block + ] + } + pub unsafe fn matchesInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> TodoGenerics { + msg_send![ + self, + matchesInString: string, + options: options, + range: range + ] + } + pub unsafe fn numberOfMatchesInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> NSUInteger { + msg_send![ + self, + numberOfMatchesInString: string, + options: options, + range: range + ] + } + pub unsafe fn firstMatchInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> Option> { + msg_send_id![ + self, + firstMatchInString: string, + options: options, + range: range + ] + } + pub unsafe fn rangeOfFirstMatchInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> NSRange { + msg_send![ + self, + rangeOfFirstMatchInString: string, + options: options, + range: range + ] + } +} +#[doc = "NSReplacement"] +impl NSRegularExpression { + pub unsafe fn stringByReplacingMatchesInString_options_range_withTemplate( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + templ: &NSString, + ) -> Id { + msg_send_id![ + self, + stringByReplacingMatchesInString: string, + options: options, + range: range, + withTemplate: templ + ] + } + pub unsafe fn replaceMatchesInString_options_range_withTemplate( + &self, + string: &NSMutableString, + options: NSMatchingOptions, + range: NSRange, + templ: &NSString, + ) -> NSUInteger { + msg_send![ + self, + replaceMatchesInString: string, + options: options, + range: range, + withTemplate: templ + ] + } + pub unsafe fn replacementStringForResult_inString_offset_template( + &self, + result: &NSTextCheckingResult, + string: &NSString, + offset: NSInteger, + templ: &NSString, + ) -> Id { + msg_send_id![ + self, + replacementStringForResult: result, + inString: string, + offset: offset, + template: templ + ] + } + pub unsafe fn escapedTemplateForString(string: &NSString) -> Id { + msg_send_id![Self::class(), escapedTemplateForString: string] + } +} +extern_class!( + #[derive(Debug)] + struct NSDataDetector; + unsafe impl ClassType for NSDataDetector { + type Super = NSRegularExpression; + } +); +impl NSDataDetector { + pub unsafe fn dataDetectorWithTypes_error( + checkingTypes: NSTextCheckingTypes, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + dataDetectorWithTypes: checkingTypes, + error: error + ] + } + pub unsafe fn initWithTypes_error( + &self, + checkingTypes: NSTextCheckingTypes, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, initWithTypes: checkingTypes, error: error] + } + pub unsafe fn checkingTypes(&self) -> NSTextCheckingTypes { + msg_send![self, checkingTypes] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs new file mode 100644 index 000000000..a42592a1e --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -0,0 +1,68 @@ +extern_class!( + #[derive(Debug)] + struct NSRelativeDateTimeFormatter; + unsafe impl ClassType for NSRelativeDateTimeFormatter { + type Super = NSFormatter; + } +); +impl NSRelativeDateTimeFormatter { + pub unsafe fn localizedStringFromDateComponents( + &self, + dateComponents: &NSDateComponents, + ) -> Id { + msg_send_id![self, localizedStringFromDateComponents: dateComponents] + } + pub unsafe fn localizedStringFromTimeInterval( + &self, + timeInterval: NSTimeInterval, + ) -> Id { + msg_send_id![self, localizedStringFromTimeInterval: timeInterval] + } + pub unsafe fn localizedStringForDate_relativeToDate( + &self, + date: &NSDate, + referenceDate: &NSDate, + ) -> Id { + msg_send_id![ + self, + localizedStringForDate: date, + relativeToDate: referenceDate + ] + } + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } + pub unsafe fn dateTimeStyle(&self) -> NSRelativeDateTimeFormatterStyle { + msg_send![self, dateTimeStyle] + } + pub unsafe fn setDateTimeStyle(&self, dateTimeStyle: NSRelativeDateTimeFormatterStyle) { + msg_send![self, setDateTimeStyle: dateTimeStyle] + } + pub unsafe fn unitsStyle(&self) -> NSRelativeDateTimeFormatterUnitsStyle { + msg_send![self, unitsStyle] + } + pub unsafe fn setUnitsStyle(&self, unitsStyle: NSRelativeDateTimeFormatterUnitsStyle) { + msg_send![self, setUnitsStyle: unitsStyle] + } + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } + pub unsafe fn calendar(&self) -> Id { + msg_send_id![self, calendar] + } + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { + msg_send![self, setCalendar: calendar] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs new file mode 100644 index 000000000..48286865e --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -0,0 +1,142 @@ +extern_class!( + #[derive(Debug)] + struct NSRunLoop; + unsafe impl ClassType for NSRunLoop { + type Super = NSObject; + } +); +impl NSRunLoop { + pub unsafe fn getCFRunLoop(&self) -> CFRunLoopRef { + msg_send![self, getCFRunLoop] + } + pub unsafe fn addTimer_forMode(&self, timer: &NSTimer, mode: NSRunLoopMode) { + msg_send![self, addTimer: timer, forMode: mode] + } + pub unsafe fn addPort_forMode(&self, aPort: &NSPort, mode: NSRunLoopMode) { + msg_send![self, addPort: aPort, forMode: mode] + } + pub unsafe fn removePort_forMode(&self, aPort: &NSPort, mode: NSRunLoopMode) { + msg_send![self, removePort: aPort, forMode: mode] + } + pub unsafe fn limitDateForMode(&self, mode: NSRunLoopMode) -> Option> { + msg_send_id![self, limitDateForMode: mode] + } + pub unsafe fn acceptInputForMode_beforeDate(&self, mode: NSRunLoopMode, limitDate: &NSDate) { + msg_send![self, acceptInputForMode: mode, beforeDate: limitDate] + } + pub unsafe fn currentRunLoop() -> Id { + msg_send_id![Self::class(), currentRunLoop] + } + pub unsafe fn mainRunLoop() -> Id { + msg_send_id![Self::class(), mainRunLoop] + } + pub unsafe fn currentMode(&self) -> NSRunLoopMode { + msg_send![self, currentMode] + } +} +#[doc = "NSRunLoopConveniences"] +impl NSRunLoop { + pub unsafe fn run(&self) { + msg_send![self, run] + } + pub unsafe fn runUntilDate(&self, limitDate: &NSDate) { + msg_send![self, runUntilDate: limitDate] + } + pub unsafe fn runMode_beforeDate(&self, mode: NSRunLoopMode, limitDate: &NSDate) -> bool { + msg_send![self, runMode: mode, beforeDate: limitDate] + } + pub unsafe fn configureAsServer(&self) { + msg_send![self, configureAsServer] + } + pub unsafe fn performInModes_block(&self, modes: TodoGenerics, block: TodoBlock) { + msg_send![self, performInModes: modes, block: block] + } + pub unsafe fn performBlock(&self, block: TodoBlock) { + msg_send![self, performBlock: block] + } +} +#[doc = "NSDelayedPerforming"] +impl NSObject { + pub unsafe fn performSelector_withObject_afterDelay_inModes( + &self, + aSelector: Sel, + anArgument: Option<&Object>, + delay: NSTimeInterval, + modes: TodoGenerics, + ) { + msg_send![ + self, + performSelector: aSelector, + withObject: anArgument, + afterDelay: delay, + inModes: modes + ] + } + pub unsafe fn performSelector_withObject_afterDelay( + &self, + aSelector: Sel, + anArgument: Option<&Object>, + delay: NSTimeInterval, + ) { + msg_send![ + self, + performSelector: aSelector, + withObject: anArgument, + afterDelay: delay + ] + } + pub unsafe fn cancelPreviousPerformRequestsWithTarget_selector_object( + aTarget: &Object, + aSelector: Sel, + anArgument: Option<&Object>, + ) { + msg_send![ + Self::class(), + cancelPreviousPerformRequestsWithTarget: aTarget, + selector: aSelector, + object: anArgument + ] + } + pub unsafe fn cancelPreviousPerformRequestsWithTarget(aTarget: &Object) { + msg_send![ + Self::class(), + cancelPreviousPerformRequestsWithTarget: aTarget + ] + } +} +#[doc = "NSOrderedPerform"] +impl NSRunLoop { + pub unsafe fn performSelector_target_argument_order_modes( + &self, + aSelector: Sel, + target: &Object, + arg: Option<&Object>, + order: NSUInteger, + modes: TodoGenerics, + ) { + msg_send![ + self, + performSelector: aSelector, + target: target, + argument: arg, + order: order, + modes: modes + ] + } + pub unsafe fn cancelPerformSelector_target_argument( + &self, + aSelector: Sel, + target: &Object, + arg: Option<&Object>, + ) { + msg_send![ + self, + cancelPerformSelector: aSelector, + target: target, + argument: arg + ] + } + pub unsafe fn cancelPerformSelectorsWithTarget(&self, target: &Object) { + msg_send![self, cancelPerformSelectorsWithTarget: target] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs new file mode 100644 index 000000000..37906001a --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -0,0 +1,109 @@ +extern_class!( + #[derive(Debug)] + struct NSScanner; + unsafe impl ClassType for NSScanner { + type Super = NSObject; + } +); +impl NSScanner { + pub unsafe fn initWithString(&self, string: &NSString) -> Id { + msg_send_id![self, initWithString: string] + } + pub unsafe fn string(&self) -> Id { + msg_send_id![self, string] + } + pub unsafe fn scanLocation(&self) -> NSUInteger { + msg_send![self, scanLocation] + } + pub unsafe fn setScanLocation(&self, scanLocation: NSUInteger) { + msg_send![self, setScanLocation: scanLocation] + } + pub unsafe fn charactersToBeSkipped(&self) -> Option> { + msg_send_id![self, charactersToBeSkipped] + } + pub unsafe fn setCharactersToBeSkipped(&self, charactersToBeSkipped: Option<&NSCharacterSet>) { + msg_send![self, setCharactersToBeSkipped: charactersToBeSkipped] + } + pub unsafe fn caseSensitive(&self) -> bool { + msg_send![self, caseSensitive] + } + pub unsafe fn setCaseSensitive(&self, caseSensitive: bool) { + msg_send![self, setCaseSensitive: caseSensitive] + } + pub unsafe fn locale(&self) -> Option> { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&Object>) { + msg_send![self, setLocale: locale] + } +} +#[doc = "NSExtendedScanner"] +impl NSScanner { + pub unsafe fn scanInt(&self, result: *mut c_int) -> bool { + msg_send![self, scanInt: result] + } + pub unsafe fn scanInteger(&self, result: *mut NSInteger) -> bool { + msg_send![self, scanInteger: result] + } + pub unsafe fn scanLongLong(&self, result: *mut c_longlong) -> bool { + msg_send![self, scanLongLong: result] + } + pub unsafe fn scanUnsignedLongLong(&self, result: *mut c_ulonglong) -> bool { + msg_send![self, scanUnsignedLongLong: result] + } + pub unsafe fn scanFloat(&self, result: *mut c_float) -> bool { + msg_send![self, scanFloat: result] + } + pub unsafe fn scanDouble(&self, result: *mut c_double) -> bool { + msg_send![self, scanDouble: result] + } + pub unsafe fn scanHexInt(&self, result: *mut c_uint) -> bool { + msg_send![self, scanHexInt: result] + } + pub unsafe fn scanHexLongLong(&self, result: *mut c_ulonglong) -> bool { + msg_send![self, scanHexLongLong: result] + } + pub unsafe fn scanHexFloat(&self, result: *mut c_float) -> bool { + msg_send![self, scanHexFloat: result] + } + pub unsafe fn scanHexDouble(&self, result: *mut c_double) -> bool { + msg_send![self, scanHexDouble: result] + } + pub unsafe fn scanString_intoString( + &self, + string: &NSString, + result: *mut Option<&NSString>, + ) -> bool { + msg_send![self, scanString: string, intoString: result] + } + pub unsafe fn scanCharactersFromSet_intoString( + &self, + set: &NSCharacterSet, + result: *mut Option<&NSString>, + ) -> bool { + msg_send![self, scanCharactersFromSet: set, intoString: result] + } + pub unsafe fn scanUpToString_intoString( + &self, + string: &NSString, + result: *mut Option<&NSString>, + ) -> bool { + msg_send![self, scanUpToString: string, intoString: result] + } + pub unsafe fn scanUpToCharactersFromSet_intoString( + &self, + set: &NSCharacterSet, + result: *mut Option<&NSString>, + ) -> bool { + msg_send![self, scanUpToCharactersFromSet: set, intoString: result] + } + pub unsafe fn scannerWithString(string: &NSString) -> Id { + msg_send_id![Self::class(), scannerWithString: string] + } + pub unsafe fn localizedScannerWithString(string: &NSString) -> Id { + msg_send_id![Self::class(), localizedScannerWithString: string] + } + pub unsafe fn isAtEnd(&self) -> bool { + msg_send![self, isAtEnd] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs new file mode 100644 index 000000000..442e236c9 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -0,0 +1,111 @@ +extern_class!( + #[derive(Debug)] + struct NSScriptClassDescription; + unsafe impl ClassType for NSScriptClassDescription { + type Super = NSClassDescription; + } +); +impl NSScriptClassDescription { + pub unsafe fn classDescriptionForClass( + aClass: &Class, + ) -> Option> { + msg_send_id![Self::class(), classDescriptionForClass: aClass] + } + pub unsafe fn initWithSuiteName_className_dictionary( + &self, + suiteName: &NSString, + className: &NSString, + classDeclaration: Option<&NSDictionary>, + ) -> Option> { + msg_send_id![ + self, + initWithSuiteName: suiteName, + className: className, + dictionary: classDeclaration + ] + } + pub unsafe fn matchesAppleEventCode(&self, appleEventCode: FourCharCode) -> bool { + msg_send![self, matchesAppleEventCode: appleEventCode] + } + pub unsafe fn supportsCommand(&self, commandDescription: &NSScriptCommandDescription) -> bool { + msg_send![self, supportsCommand: commandDescription] + } + pub unsafe fn selectorForCommand( + &self, + commandDescription: &NSScriptCommandDescription, + ) -> Option { + msg_send![self, selectorForCommand: commandDescription] + } + pub unsafe fn typeForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, typeForKey: key] + } + pub unsafe fn classDescriptionForKey( + &self, + key: &NSString, + ) -> Option> { + msg_send_id![self, classDescriptionForKey: key] + } + pub unsafe fn appleEventCodeForKey(&self, key: &NSString) -> FourCharCode { + msg_send![self, appleEventCodeForKey: key] + } + pub unsafe fn keyWithAppleEventCode( + &self, + appleEventCode: FourCharCode, + ) -> Option> { + msg_send_id![self, keyWithAppleEventCode: appleEventCode] + } + pub unsafe fn isLocationRequiredToCreateForKey( + &self, + toManyRelationshipKey: &NSString, + ) -> bool { + msg_send![ + self, + isLocationRequiredToCreateForKey: toManyRelationshipKey + ] + } + pub unsafe fn hasPropertyForKey(&self, key: &NSString) -> bool { + msg_send![self, hasPropertyForKey: key] + } + pub unsafe fn hasOrderedToManyRelationshipForKey(&self, key: &NSString) -> bool { + msg_send![self, hasOrderedToManyRelationshipForKey: key] + } + pub unsafe fn hasReadablePropertyForKey(&self, key: &NSString) -> bool { + msg_send![self, hasReadablePropertyForKey: key] + } + pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool { + msg_send![self, hasWritablePropertyForKey: key] + } + pub unsafe fn suiteName(&self) -> Option> { + msg_send_id![self, suiteName] + } + pub unsafe fn className(&self) -> Option> { + msg_send_id![self, className] + } + pub unsafe fn implementationClassName(&self) -> Option> { + msg_send_id![self, implementationClassName] + } + pub unsafe fn superclassDescription(&self) -> Option> { + msg_send_id![self, superclassDescription] + } + pub unsafe fn appleEventCode(&self) -> FourCharCode { + msg_send![self, appleEventCode] + } + pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option> { + msg_send_id![self, defaultSubcontainerAttributeKey] + } +} +#[doc = "NSDeprecated"] +impl NSScriptClassDescription { + pub unsafe fn isReadOnlyKey(&self, key: &NSString) -> bool { + msg_send![self, isReadOnlyKey: key] + } +} +#[doc = "NSScriptClassDescription"] +impl NSObject { + pub unsafe fn classCode(&self) -> FourCharCode { + msg_send![self, classCode] + } + pub unsafe fn className(&self) -> Id { + msg_send_id![self, className] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs new file mode 100644 index 000000000..bef23ea32 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -0,0 +1,34 @@ +extern_class!( + #[derive(Debug)] + struct NSScriptCoercionHandler; + unsafe impl ClassType for NSScriptCoercionHandler { + type Super = NSObject; + } +); +impl NSScriptCoercionHandler { + pub unsafe fn sharedCoercionHandler() -> Id { + msg_send_id![Self::class(), sharedCoercionHandler] + } + pub unsafe fn coerceValue_toClass( + &self, + value: &Object, + toClass: &Class, + ) -> Option> { + msg_send_id![self, coerceValue: value, toClass: toClass] + } + pub unsafe fn registerCoercer_selector_toConvertFromClass_toClass( + &self, + coercer: &Object, + selector: Sel, + fromClass: &Class, + toClass: &Class, + ) { + msg_send![ + self, + registerCoercer: coercer, + selector: selector, + toConvertFromClass: fromClass, + toClass: toClass + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs new file mode 100644 index 000000000..304f0e079 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -0,0 +1,109 @@ +extern_class!( + #[derive(Debug)] + struct NSScriptCommand; + unsafe impl ClassType for NSScriptCommand { + type Super = NSObject; + } +); +impl NSScriptCommand { + pub unsafe fn initWithCommandDescription( + &self, + commandDef: &NSScriptCommandDescription, + ) -> Id { + msg_send_id![self, initWithCommandDescription: commandDef] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn performDefaultImplementation(&self) -> Option> { + msg_send_id![self, performDefaultImplementation] + } + pub unsafe fn executeCommand(&self) -> Option> { + msg_send_id![self, executeCommand] + } + pub unsafe fn currentCommand() -> Option> { + msg_send_id![Self::class(), currentCommand] + } + pub unsafe fn suspendExecution(&self) { + msg_send![self, suspendExecution] + } + pub unsafe fn resumeExecutionWithResult(&self, result: Option<&Object>) { + msg_send![self, resumeExecutionWithResult: result] + } + pub unsafe fn commandDescription(&self) -> Id { + msg_send_id![self, commandDescription] + } + pub unsafe fn directParameter(&self) -> Option> { + msg_send_id![self, directParameter] + } + pub unsafe fn setDirectParameter(&self, directParameter: Option<&Object>) { + msg_send![self, setDirectParameter: directParameter] + } + pub unsafe fn receiversSpecifier(&self) -> Option> { + msg_send_id![self, receiversSpecifier] + } + pub unsafe fn setReceiversSpecifier( + &self, + receiversSpecifier: Option<&NSScriptObjectSpecifier>, + ) { + msg_send![self, setReceiversSpecifier: receiversSpecifier] + } + pub unsafe fn evaluatedReceivers(&self) -> Option> { + msg_send_id![self, evaluatedReceivers] + } + pub unsafe fn arguments(&self) -> TodoGenerics { + msg_send![self, arguments] + } + pub unsafe fn setArguments(&self, arguments: TodoGenerics) { + msg_send![self, setArguments: arguments] + } + pub unsafe fn evaluatedArguments(&self) -> TodoGenerics { + msg_send![self, evaluatedArguments] + } + pub unsafe fn isWellFormed(&self) -> bool { + msg_send![self, isWellFormed] + } + pub unsafe fn scriptErrorNumber(&self) -> NSInteger { + msg_send![self, scriptErrorNumber] + } + pub unsafe fn setScriptErrorNumber(&self, scriptErrorNumber: NSInteger) { + msg_send![self, setScriptErrorNumber: scriptErrorNumber] + } + pub unsafe fn scriptErrorOffendingObjectDescriptor( + &self, + ) -> Option> { + msg_send_id![self, scriptErrorOffendingObjectDescriptor] + } + pub unsafe fn setScriptErrorOffendingObjectDescriptor( + &self, + scriptErrorOffendingObjectDescriptor: Option<&NSAppleEventDescriptor>, + ) { + msg_send![ + self, + setScriptErrorOffendingObjectDescriptor: scriptErrorOffendingObjectDescriptor + ] + } + pub unsafe fn scriptErrorExpectedTypeDescriptor( + &self, + ) -> Option> { + msg_send_id![self, scriptErrorExpectedTypeDescriptor] + } + pub unsafe fn setScriptErrorExpectedTypeDescriptor( + &self, + scriptErrorExpectedTypeDescriptor: Option<&NSAppleEventDescriptor>, + ) { + msg_send![ + self, + setScriptErrorExpectedTypeDescriptor: scriptErrorExpectedTypeDescriptor + ] + } + pub unsafe fn scriptErrorString(&self) -> Option> { + msg_send_id![self, scriptErrorString] + } + pub unsafe fn setScriptErrorString(&self, scriptErrorString: Option<&NSString>) { + msg_send![self, setScriptErrorString: scriptErrorString] + } + pub unsafe fn appleEvent(&self) -> Option> { + msg_send_id![self, appleEvent] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs new file mode 100644 index 000000000..3978bc969 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -0,0 +1,76 @@ +extern_class!( + #[derive(Debug)] + struct NSScriptCommandDescription; + unsafe impl ClassType for NSScriptCommandDescription { + type Super = NSObject; + } +); +impl NSScriptCommandDescription { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithSuiteName_commandName_dictionary( + &self, + suiteName: &NSString, + commandName: &NSString, + commandDeclaration: Option<&NSDictionary>, + ) -> Option> { + msg_send_id![ + self, + initWithSuiteName: suiteName, + commandName: commandName, + dictionary: commandDeclaration + ] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn typeForArgumentWithName( + &self, + argumentName: &NSString, + ) -> Option> { + msg_send_id![self, typeForArgumentWithName: argumentName] + } + pub unsafe fn appleEventCodeForArgumentWithName( + &self, + argumentName: &NSString, + ) -> FourCharCode { + msg_send![self, appleEventCodeForArgumentWithName: argumentName] + } + pub unsafe fn isOptionalArgumentWithName(&self, argumentName: &NSString) -> bool { + msg_send![self, isOptionalArgumentWithName: argumentName] + } + pub unsafe fn createCommandInstance(&self) -> Id { + msg_send_id![self, createCommandInstance] + } + pub unsafe fn createCommandInstanceWithZone( + &self, + zone: *mut NSZone, + ) -> Id { + msg_send_id![self, createCommandInstanceWithZone: zone] + } + pub unsafe fn suiteName(&self) -> Id { + msg_send_id![self, suiteName] + } + pub unsafe fn commandName(&self) -> Id { + msg_send_id![self, commandName] + } + pub unsafe fn appleEventClassCode(&self) -> FourCharCode { + msg_send![self, appleEventClassCode] + } + pub unsafe fn appleEventCode(&self) -> FourCharCode { + msg_send![self, appleEventCode] + } + pub unsafe fn commandClassName(&self) -> Id { + msg_send_id![self, commandClassName] + } + pub unsafe fn returnType(&self) -> Option> { + msg_send_id![self, returnType] + } + pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode { + msg_send![self, appleEventCodeForReturnType] + } + pub unsafe fn argumentNames(&self) -> TodoGenerics { + msg_send![self, argumentNames] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs new file mode 100644 index 000000000..e16b7c32b --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -0,0 +1,30 @@ +extern_class!( + #[derive(Debug)] + struct NSScriptExecutionContext; + unsafe impl ClassType for NSScriptExecutionContext { + type Super = NSObject; + } +); +impl NSScriptExecutionContext { + pub unsafe fn sharedScriptExecutionContext() -> Id { + msg_send_id![Self::class(), sharedScriptExecutionContext] + } + pub unsafe fn topLevelObject(&self) -> Option> { + msg_send_id![self, topLevelObject] + } + pub unsafe fn setTopLevelObject(&self, topLevelObject: Option<&Object>) { + msg_send![self, setTopLevelObject: topLevelObject] + } + pub unsafe fn objectBeingTested(&self) -> Option> { + msg_send_id![self, objectBeingTested] + } + pub unsafe fn setObjectBeingTested(&self, objectBeingTested: Option<&Object>) { + msg_send![self, setObjectBeingTested: objectBeingTested] + } + pub unsafe fn rangeContainerObject(&self) -> Option> { + msg_send_id![self, rangeContainerObject] + } + pub unsafe fn setRangeContainerObject(&self, rangeContainerObject: Option<&Object>) { + msg_send![self, setRangeContainerObject: rangeContainerObject] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs new file mode 100644 index 000000000..28e4e7818 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -0,0 +1,63 @@ +#[doc = "NSScriptKeyValueCoding"] +impl NSObject { + pub unsafe fn valueAtIndex_inPropertyWithKey( + &self, + index: NSUInteger, + key: &NSString, + ) -> Option> { + msg_send_id![self, valueAtIndex: index, inPropertyWithKey: key] + } + pub unsafe fn valueWithName_inPropertyWithKey( + &self, + name: &NSString, + key: &NSString, + ) -> Option> { + msg_send_id![self, valueWithName: name, inPropertyWithKey: key] + } + pub unsafe fn valueWithUniqueID_inPropertyWithKey( + &self, + uniqueID: &Object, + key: &NSString, + ) -> Option> { + msg_send_id![self, valueWithUniqueID: uniqueID, inPropertyWithKey: key] + } + pub unsafe fn insertValue_atIndex_inPropertyWithKey( + &self, + value: &Object, + index: NSUInteger, + key: &NSString, + ) { + msg_send![ + self, + insertValue: value, + atIndex: index, + inPropertyWithKey: key + ] + } + pub unsafe fn removeValueAtIndex_fromPropertyWithKey(&self, index: NSUInteger, key: &NSString) { + msg_send![self, removeValueAtIndex: index, fromPropertyWithKey: key] + } + pub unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue( + &self, + index: NSUInteger, + key: &NSString, + value: &Object, + ) { + msg_send![ + self, + replaceValueAtIndex: index, + inPropertyWithKey: key, + withValue: value + ] + } + pub unsafe fn insertValue_inPropertyWithKey(&self, value: &Object, key: &NSString) { + msg_send![self, insertValue: value, inPropertyWithKey: key] + } + pub unsafe fn coerceValue_forKey( + &self, + value: Option<&Object>, + key: &NSString, + ) -> Option> { + msg_send_id![self, coerceValue: value, forKey: key] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs new file mode 100644 index 000000000..a46759ddf --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -0,0 +1,443 @@ +extern_class!( + #[derive(Debug)] + struct NSScriptObjectSpecifier; + unsafe impl ClassType for NSScriptObjectSpecifier { + type Super = NSObject; + } +); +impl NSScriptObjectSpecifier { + pub unsafe fn objectSpecifierWithDescriptor( + descriptor: &NSAppleEventDescriptor, + ) -> Option> { + msg_send_id![Self::class(), objectSpecifierWithDescriptor: descriptor] + } + pub unsafe fn initWithContainerSpecifier_key( + &self, + container: &NSScriptObjectSpecifier, + property: &NSString, + ) -> Id { + msg_send_id![self, initWithContainerSpecifier: container, key: property] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property + ] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn indicesOfObjectsByEvaluatingWithContainer_count( + &self, + container: &Object, + count: NonNull, + ) -> *mut NSInteger { + msg_send![ + self, + indicesOfObjectsByEvaluatingWithContainer: container, + count: count + ] + } + pub unsafe fn objectsByEvaluatingWithContainers( + &self, + containers: &Object, + ) -> Option> { + msg_send_id![self, objectsByEvaluatingWithContainers: containers] + } + pub unsafe fn childSpecifier(&self) -> Option> { + msg_send_id![self, childSpecifier] + } + pub unsafe fn setChildSpecifier(&self, childSpecifier: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setChildSpecifier: childSpecifier] + } + pub unsafe fn containerSpecifier(&self) -> Option> { + msg_send_id![self, containerSpecifier] + } + pub unsafe fn setContainerSpecifier( + &self, + containerSpecifier: Option<&NSScriptObjectSpecifier>, + ) { + msg_send![self, setContainerSpecifier: containerSpecifier] + } + pub unsafe fn containerIsObjectBeingTested(&self) -> bool { + msg_send![self, containerIsObjectBeingTested] + } + pub unsafe fn setContainerIsObjectBeingTested(&self, containerIsObjectBeingTested: bool) { + msg_send![ + self, + setContainerIsObjectBeingTested: containerIsObjectBeingTested + ] + } + pub unsafe fn containerIsRangeContainerObject(&self) -> bool { + msg_send![self, containerIsRangeContainerObject] + } + pub unsafe fn setContainerIsRangeContainerObject(&self, containerIsRangeContainerObject: bool) { + msg_send![ + self, + setContainerIsRangeContainerObject: containerIsRangeContainerObject + ] + } + pub unsafe fn key(&self) -> Id { + msg_send_id![self, key] + } + pub unsafe fn setKey(&self, key: &NSString) { + msg_send![self, setKey: key] + } + pub unsafe fn containerClassDescription(&self) -> Option> { + msg_send_id![self, containerClassDescription] + } + pub unsafe fn setContainerClassDescription( + &self, + containerClassDescription: Option<&NSScriptClassDescription>, + ) { + msg_send![ + self, + setContainerClassDescription: containerClassDescription + ] + } + pub unsafe fn keyClassDescription(&self) -> Option> { + msg_send_id![self, keyClassDescription] + } + pub unsafe fn objectsByEvaluatingSpecifier(&self) -> Option> { + msg_send_id![self, objectsByEvaluatingSpecifier] + } + pub unsafe fn evaluationErrorNumber(&self) -> NSInteger { + msg_send![self, evaluationErrorNumber] + } + pub unsafe fn setEvaluationErrorNumber(&self, evaluationErrorNumber: NSInteger) { + msg_send![self, setEvaluationErrorNumber: evaluationErrorNumber] + } + pub unsafe fn evaluationErrorSpecifier(&self) -> Option> { + msg_send_id![self, evaluationErrorSpecifier] + } + pub unsafe fn descriptor(&self) -> Option> { + msg_send_id![self, descriptor] + } +} +#[doc = "NSScriptObjectSpecifiers"] +impl NSObject { + pub unsafe fn indicesOfObjectsByEvaluatingObjectSpecifier( + &self, + specifier: &NSScriptObjectSpecifier, + ) -> TodoGenerics { + msg_send![self, indicesOfObjectsByEvaluatingObjectSpecifier: specifier] + } + pub unsafe fn objectSpecifier(&self) -> Option> { + msg_send_id![self, objectSpecifier] + } +} +extern_class!( + #[derive(Debug)] + struct NSIndexSpecifier; + unsafe impl ClassType for NSIndexSpecifier { + type Super = NSScriptObjectSpecifier; + } +); +impl NSIndexSpecifier { + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_index( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + index: NSInteger, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + index: index + ] + } + pub unsafe fn index(&self) -> NSInteger { + msg_send![self, index] + } + pub unsafe fn setIndex(&self, index: NSInteger) { + msg_send![self, setIndex: index] + } +} +extern_class!( + #[derive(Debug)] + struct NSMiddleSpecifier; + unsafe impl ClassType for NSMiddleSpecifier { + type Super = NSScriptObjectSpecifier; + } +); +impl NSMiddleSpecifier {} +extern_class!( + #[derive(Debug)] + struct NSNameSpecifier; + unsafe impl ClassType for NSNameSpecifier { + type Super = NSScriptObjectSpecifier; + } +); +impl NSNameSpecifier { + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_name( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + name: &NSString, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + name: name + ] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: &NSString) { + msg_send![self, setName: name] + } +} +extern_class!( + #[derive(Debug)] + struct NSPositionalSpecifier; + unsafe impl ClassType for NSPositionalSpecifier { + type Super = NSObject; + } +); +impl NSPositionalSpecifier { + pub unsafe fn initWithPosition_objectSpecifier( + &self, + position: NSInsertionPosition, + specifier: &NSScriptObjectSpecifier, + ) -> Id { + msg_send_id![self, initWithPosition: position, objectSpecifier: specifier] + } + pub unsafe fn setInsertionClassDescription(&self, classDescription: &NSScriptClassDescription) { + msg_send![self, setInsertionClassDescription: classDescription] + } + pub unsafe fn evaluate(&self) { + msg_send![self, evaluate] + } + pub unsafe fn position(&self) -> NSInsertionPosition { + msg_send![self, position] + } + pub unsafe fn objectSpecifier(&self) -> Id { + msg_send_id![self, objectSpecifier] + } + pub unsafe fn insertionContainer(&self) -> Option> { + msg_send_id![self, insertionContainer] + } + pub unsafe fn insertionKey(&self) -> Option> { + msg_send_id![self, insertionKey] + } + pub unsafe fn insertionIndex(&self) -> NSInteger { + msg_send![self, insertionIndex] + } + pub unsafe fn insertionReplaces(&self) -> bool { + msg_send![self, insertionReplaces] + } +} +extern_class!( + #[derive(Debug)] + struct NSPropertySpecifier; + unsafe impl ClassType for NSPropertySpecifier { + type Super = NSScriptObjectSpecifier; + } +); +impl NSPropertySpecifier {} +extern_class!( + #[derive(Debug)] + struct NSRandomSpecifier; + unsafe impl ClassType for NSRandomSpecifier { + type Super = NSScriptObjectSpecifier; + } +); +impl NSRandomSpecifier {} +extern_class!( + #[derive(Debug)] + struct NSRangeSpecifier; + unsafe impl ClassType for NSRangeSpecifier { + type Super = NSScriptObjectSpecifier; + } +); +impl NSRangeSpecifier { + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_startSpecifier_endSpecifier( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + startSpec: Option<&NSScriptObjectSpecifier>, + endSpec: Option<&NSScriptObjectSpecifier>, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + startSpecifier: startSpec, + endSpecifier: endSpec + ] + } + pub unsafe fn startSpecifier(&self) -> Option> { + msg_send_id![self, startSpecifier] + } + pub unsafe fn setStartSpecifier(&self, startSpecifier: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setStartSpecifier: startSpecifier] + } + pub unsafe fn endSpecifier(&self) -> Option> { + msg_send_id![self, endSpecifier] + } + pub unsafe fn setEndSpecifier(&self, endSpecifier: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setEndSpecifier: endSpecifier] + } +} +extern_class!( + #[derive(Debug)] + struct NSRelativeSpecifier; + unsafe impl ClassType for NSRelativeSpecifier { + type Super = NSScriptObjectSpecifier; + } +); +impl NSRelativeSpecifier { + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_relativePosition_baseSpecifier( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + relPos: NSRelativePosition, + baseSpecifier: Option<&NSScriptObjectSpecifier>, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + relativePosition: relPos, + baseSpecifier: baseSpecifier + ] + } + pub unsafe fn relativePosition(&self) -> NSRelativePosition { + msg_send![self, relativePosition] + } + pub unsafe fn setRelativePosition(&self, relativePosition: NSRelativePosition) { + msg_send![self, setRelativePosition: relativePosition] + } + pub unsafe fn baseSpecifier(&self) -> Option> { + msg_send_id![self, baseSpecifier] + } + pub unsafe fn setBaseSpecifier(&self, baseSpecifier: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setBaseSpecifier: baseSpecifier] + } +} +extern_class!( + #[derive(Debug)] + struct NSUniqueIDSpecifier; + unsafe impl ClassType for NSUniqueIDSpecifier { + type Super = NSScriptObjectSpecifier; + } +); +impl NSUniqueIDSpecifier { + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_uniqueID( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + uniqueID: &Object, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + uniqueID: uniqueID + ] + } + pub unsafe fn uniqueID(&self) -> Id { + msg_send_id![self, uniqueID] + } + pub unsafe fn setUniqueID(&self, uniqueID: &Object) { + msg_send![self, setUniqueID: uniqueID] + } +} +extern_class!( + #[derive(Debug)] + struct NSWhoseSpecifier; + unsafe impl ClassType for NSWhoseSpecifier { + type Super = NSScriptObjectSpecifier; + } +); +impl NSWhoseSpecifier { + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_test( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + test: &NSScriptWhoseTest, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + test: test + ] + } + pub unsafe fn test(&self) -> Id { + msg_send_id![self, test] + } + pub unsafe fn setTest(&self, test: &NSScriptWhoseTest) { + msg_send![self, setTest: test] + } + pub unsafe fn startSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier { + msg_send![self, startSubelementIdentifier] + } + pub unsafe fn setStartSubelementIdentifier( + &self, + startSubelementIdentifier: NSWhoseSubelementIdentifier, + ) { + msg_send![ + self, + setStartSubelementIdentifier: startSubelementIdentifier + ] + } + pub unsafe fn startSubelementIndex(&self) -> NSInteger { + msg_send![self, startSubelementIndex] + } + pub unsafe fn setStartSubelementIndex(&self, startSubelementIndex: NSInteger) { + msg_send![self, setStartSubelementIndex: startSubelementIndex] + } + pub unsafe fn endSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier { + msg_send![self, endSubelementIdentifier] + } + pub unsafe fn setEndSubelementIdentifier( + &self, + endSubelementIdentifier: NSWhoseSubelementIdentifier, + ) { + msg_send![self, setEndSubelementIdentifier: endSubelementIdentifier] + } + pub unsafe fn endSubelementIndex(&self) -> NSInteger { + msg_send![self, endSubelementIndex] + } + pub unsafe fn setEndSubelementIndex(&self, endSubelementIndex: NSInteger) { + msg_send![self, setEndSubelementIndex: endSubelementIndex] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs new file mode 100644 index 000000000..589cf41a0 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -0,0 +1,123 @@ +extern_class!( + #[derive(Debug)] + struct NSCloneCommand; + unsafe impl ClassType for NSCloneCommand { + type Super = NSScriptCommand; + } +); +impl NSCloneCommand { + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setReceiversSpecifier: receiversRef] + } + pub unsafe fn keySpecifier(&self) -> Id { + msg_send_id![self, keySpecifier] + } +} +extern_class!( + #[derive(Debug)] + struct NSCloseCommand; + unsafe impl ClassType for NSCloseCommand { + type Super = NSScriptCommand; + } +); +impl NSCloseCommand { + pub unsafe fn saveOptions(&self) -> NSSaveOptions { + msg_send![self, saveOptions] + } +} +extern_class!( + #[derive(Debug)] + struct NSCountCommand; + unsafe impl ClassType for NSCountCommand { + type Super = NSScriptCommand; + } +); +impl NSCountCommand {} +extern_class!( + #[derive(Debug)] + struct NSCreateCommand; + unsafe impl ClassType for NSCreateCommand { + type Super = NSScriptCommand; + } +); +impl NSCreateCommand { + pub unsafe fn createClassDescription(&self) -> Id { + msg_send_id![self, createClassDescription] + } + pub unsafe fn resolvedKeyDictionary(&self) -> TodoGenerics { + msg_send![self, resolvedKeyDictionary] + } +} +extern_class!( + #[derive(Debug)] + struct NSDeleteCommand; + unsafe impl ClassType for NSDeleteCommand { + type Super = NSScriptCommand; + } +); +impl NSDeleteCommand { + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setReceiversSpecifier: receiversRef] + } + pub unsafe fn keySpecifier(&self) -> Id { + msg_send_id![self, keySpecifier] + } +} +extern_class!( + #[derive(Debug)] + struct NSExistsCommand; + unsafe impl ClassType for NSExistsCommand { + type Super = NSScriptCommand; + } +); +impl NSExistsCommand {} +extern_class!( + #[derive(Debug)] + struct NSGetCommand; + unsafe impl ClassType for NSGetCommand { + type Super = NSScriptCommand; + } +); +impl NSGetCommand {} +extern_class!( + #[derive(Debug)] + struct NSMoveCommand; + unsafe impl ClassType for NSMoveCommand { + type Super = NSScriptCommand; + } +); +impl NSMoveCommand { + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setReceiversSpecifier: receiversRef] + } + pub unsafe fn keySpecifier(&self) -> Id { + msg_send_id![self, keySpecifier] + } +} +extern_class!( + #[derive(Debug)] + struct NSQuitCommand; + unsafe impl ClassType for NSQuitCommand { + type Super = NSScriptCommand; + } +); +impl NSQuitCommand { + pub unsafe fn saveOptions(&self) -> NSSaveOptions { + msg_send![self, saveOptions] + } +} +extern_class!( + #[derive(Debug)] + struct NSSetCommand; + unsafe impl ClassType for NSSetCommand { + type Super = NSScriptCommand; + } +); +impl NSSetCommand { + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setReceiversSpecifier: receiversRef] + } + pub unsafe fn keySpecifier(&self) -> Id { + msg_send_id![self, keySpecifier] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs new file mode 100644 index 000000000..78aeb7095 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -0,0 +1,79 @@ +extern_class!( + #[derive(Debug)] + struct NSScriptSuiteRegistry; + unsafe impl ClassType for NSScriptSuiteRegistry { + type Super = NSObject; + } +); +impl NSScriptSuiteRegistry { + pub unsafe fn sharedScriptSuiteRegistry() -> Id { + msg_send_id![Self::class(), sharedScriptSuiteRegistry] + } + pub unsafe fn setSharedScriptSuiteRegistry(registry: &NSScriptSuiteRegistry) { + msg_send![Self::class(), setSharedScriptSuiteRegistry: registry] + } + pub unsafe fn loadSuitesFromBundle(&self, bundle: &NSBundle) { + msg_send![self, loadSuitesFromBundle: bundle] + } + pub unsafe fn loadSuiteWithDictionary_fromBundle( + &self, + suiteDeclaration: &NSDictionary, + bundle: &NSBundle, + ) { + msg_send![ + self, + loadSuiteWithDictionary: suiteDeclaration, + fromBundle: bundle + ] + } + pub unsafe fn registerClassDescription(&self, classDescription: &NSScriptClassDescription) { + msg_send![self, registerClassDescription: classDescription] + } + pub unsafe fn registerCommandDescription( + &self, + commandDescription: &NSScriptCommandDescription, + ) { + msg_send![self, registerCommandDescription: commandDescription] + } + pub unsafe fn appleEventCodeForSuite(&self, suiteName: &NSString) -> FourCharCode { + msg_send![self, appleEventCodeForSuite: suiteName] + } + pub unsafe fn bundleForSuite(&self, suiteName: &NSString) -> Option> { + msg_send_id![self, bundleForSuite: suiteName] + } + pub unsafe fn classDescriptionsInSuite(&self, suiteName: &NSString) -> TodoGenerics { + msg_send![self, classDescriptionsInSuite: suiteName] + } + pub unsafe fn commandDescriptionsInSuite(&self, suiteName: &NSString) -> TodoGenerics { + msg_send![self, commandDescriptionsInSuite: suiteName] + } + pub unsafe fn suiteForAppleEventCode( + &self, + appleEventCode: FourCharCode, + ) -> Option> { + msg_send_id![self, suiteForAppleEventCode: appleEventCode] + } + pub unsafe fn classDescriptionWithAppleEventCode( + &self, + appleEventCode: FourCharCode, + ) -> Option> { + msg_send_id![self, classDescriptionWithAppleEventCode: appleEventCode] + } + pub unsafe fn commandDescriptionWithAppleEventClass_andAppleEventCode( + &self, + appleEventClassCode: FourCharCode, + appleEventIDCode: FourCharCode, + ) -> Option> { + msg_send_id![ + self, + commandDescriptionWithAppleEventClass: appleEventClassCode, + andAppleEventCode: appleEventIDCode + ] + } + pub unsafe fn aeteResource(&self, languageName: &NSString) -> Option> { + msg_send_id![self, aeteResource: languageName] + } + pub unsafe fn suiteNames(&self) -> TodoGenerics { + msg_send![self, suiteNames] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs new file mode 100644 index 000000000..47d440b4b --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -0,0 +1,121 @@ +extern_class!( + #[derive(Debug)] + struct NSScriptWhoseTest; + unsafe impl ClassType for NSScriptWhoseTest { + type Super = NSObject; + } +); +impl NSScriptWhoseTest { + pub unsafe fn isTrue(&self) -> bool { + msg_send![self, isTrue] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } +} +extern_class!( + #[derive(Debug)] + struct NSLogicalTest; + unsafe impl ClassType for NSLogicalTest { + type Super = NSScriptWhoseTest; + } +); +impl NSLogicalTest { + pub unsafe fn initAndTestWithTests(&self, subTests: TodoGenerics) -> Id { + msg_send_id![self, initAndTestWithTests: subTests] + } + pub unsafe fn initOrTestWithTests(&self, subTests: TodoGenerics) -> Id { + msg_send_id![self, initOrTestWithTests: subTests] + } + pub unsafe fn initNotTestWithTest(&self, subTest: &NSScriptWhoseTest) -> Id { + msg_send_id![self, initNotTestWithTest: subTest] + } +} +extern_class!( + #[derive(Debug)] + struct NSSpecifierTest; + unsafe impl ClassType for NSSpecifierTest { + type Super = NSScriptWhoseTest; + } +); +impl NSSpecifierTest { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithObjectSpecifier_comparisonOperator_testObject( + &self, + obj1: Option<&NSScriptObjectSpecifier>, + compOp: NSTestComparisonOperation, + obj2: Option<&Object>, + ) -> Id { + msg_send_id![ + self, + initWithObjectSpecifier: obj1, + comparisonOperator: compOp, + testObject: obj2 + ] + } +} +#[doc = "NSComparisonMethods"] +impl NSObject { + pub unsafe fn isEqualTo(&self, object: Option<&Object>) -> bool { + msg_send![self, isEqualTo: object] + } + pub unsafe fn isLessThanOrEqualTo(&self, object: Option<&Object>) -> bool { + msg_send![self, isLessThanOrEqualTo: object] + } + pub unsafe fn isLessThan(&self, object: Option<&Object>) -> bool { + msg_send![self, isLessThan: object] + } + pub unsafe fn isGreaterThanOrEqualTo(&self, object: Option<&Object>) -> bool { + msg_send![self, isGreaterThanOrEqualTo: object] + } + pub unsafe fn isGreaterThan(&self, object: Option<&Object>) -> bool { + msg_send![self, isGreaterThan: object] + } + pub unsafe fn isNotEqualTo(&self, object: Option<&Object>) -> bool { + msg_send![self, isNotEqualTo: object] + } + pub unsafe fn doesContain(&self, object: &Object) -> bool { + msg_send![self, doesContain: object] + } + pub unsafe fn isLike(&self, object: &NSString) -> bool { + msg_send![self, isLike: object] + } + pub unsafe fn isCaseInsensitiveLike(&self, object: &NSString) -> bool { + msg_send![self, isCaseInsensitiveLike: object] + } +} +#[doc = "NSScriptingComparisonMethods"] +impl NSObject { + pub unsafe fn scriptingIsEqualTo(&self, object: &Object) -> bool { + msg_send![self, scriptingIsEqualTo: object] + } + pub unsafe fn scriptingIsLessThanOrEqualTo(&self, object: &Object) -> bool { + msg_send![self, scriptingIsLessThanOrEqualTo: object] + } + pub unsafe fn scriptingIsLessThan(&self, object: &Object) -> bool { + msg_send![self, scriptingIsLessThan: object] + } + pub unsafe fn scriptingIsGreaterThanOrEqualTo(&self, object: &Object) -> bool { + msg_send![self, scriptingIsGreaterThanOrEqualTo: object] + } + pub unsafe fn scriptingIsGreaterThan(&self, object: &Object) -> bool { + msg_send![self, scriptingIsGreaterThan: object] + } + pub unsafe fn scriptingBeginsWith(&self, object: &Object) -> bool { + msg_send![self, scriptingBeginsWith: object] + } + pub unsafe fn scriptingEndsWith(&self, object: &Object) -> bool { + msg_send![self, scriptingEndsWith: object] + } + pub unsafe fn scriptingContains(&self, object: &Object) -> bool { + msg_send![self, scriptingContains: object] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs new file mode 100644 index 000000000..f2320a292 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -0,0 +1,209 @@ +extern_class!( + #[derive(Debug)] + struct NSSet; + unsafe impl ClassType for NSSet { + type Super = NSObject; + } +); +impl NSSet { + pub unsafe fn member(&self, object: ObjectType) -> ObjectType { + msg_send![self, member: object] + } + pub unsafe fn objectEnumerator(&self) -> TodoGenerics { + msg_send![self, objectEnumerator] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithObjects_count( + &self, + objects: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![self, initWithObjects: objects, count: cnt] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } +} +#[doc = "NSExtendedSet"] +impl NSSet { + pub unsafe fn anyObject(&self) -> ObjectType { + msg_send![self, anyObject] + } + pub unsafe fn containsObject(&self, anObject: ObjectType) -> bool { + msg_send![self, containsObject: anObject] + } + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn intersectsSet(&self, otherSet: TodoGenerics) -> bool { + msg_send![self, intersectsSet: otherSet] + } + pub unsafe fn isEqualToSet(&self, otherSet: TodoGenerics) -> bool { + msg_send![self, isEqualToSet: otherSet] + } + pub unsafe fn isSubsetOfSet(&self, otherSet: TodoGenerics) -> bool { + msg_send![self, isSubsetOfSet: otherSet] + } + pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { + msg_send![self, makeObjectsPerformSelector: aSelector] + } + pub unsafe fn makeObjectsPerformSelector_withObject( + &self, + aSelector: Sel, + argument: Option<&Object>, + ) { + msg_send![ + self, + makeObjectsPerformSelector: aSelector, + withObject: argument + ] + } + pub unsafe fn setByAddingObject(&self, anObject: ObjectType) -> TodoGenerics { + msg_send![self, setByAddingObject: anObject] + } + pub unsafe fn setByAddingObjectsFromSet(&self, other: TodoGenerics) -> TodoGenerics { + msg_send![self, setByAddingObjectsFromSet: other] + } + pub unsafe fn setByAddingObjectsFromArray(&self, other: TodoGenerics) -> TodoGenerics { + msg_send![self, setByAddingObjectsFromArray: other] + } + pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateObjectsUsingBlock: block] + } + pub unsafe fn enumerateObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] + } + pub unsafe fn objectsPassingTest(&self, predicate: TodoBlock) -> TodoGenerics { + msg_send![self, objectsPassingTest: predicate] + } + pub unsafe fn objectsWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> TodoGenerics { + msg_send![self, objectsWithOptions: opts, passingTest: predicate] + } + pub unsafe fn allObjects(&self) -> TodoGenerics { + msg_send![self, allObjects] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } +} +#[doc = "NSSetCreation"] +impl NSSet { + pub unsafe fn set() -> Id { + msg_send_id![Self::class(), set] + } + pub unsafe fn setWithObject(object: ObjectType) -> Id { + msg_send_id![Self::class(), setWithObject: object] + } + pub unsafe fn setWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id { + msg_send_id![Self::class(), setWithObjects: objects, count: cnt] + } + pub unsafe fn setWithSet(set: TodoGenerics) -> Id { + msg_send_id![Self::class(), setWithSet: set] + } + pub unsafe fn setWithArray(array: TodoGenerics) -> Id { + msg_send_id![Self::class(), setWithArray: array] + } + pub unsafe fn initWithSet(&self, set: TodoGenerics) -> Id { + msg_send_id![self, initWithSet: set] + } + pub unsafe fn initWithSet_copyItems(&self, set: TodoGenerics, flag: bool) -> Id { + msg_send_id![self, initWithSet: set, copyItems: flag] + } + pub unsafe fn initWithArray(&self, array: TodoGenerics) -> Id { + msg_send_id![self, initWithArray: array] + } +} +extern_class!( + #[derive(Debug)] + struct NSMutableSet; + unsafe impl ClassType for NSMutableSet { + type Super = NSSet; + } +); +impl NSMutableSet { + pub unsafe fn addObject(&self, object: ObjectType) { + msg_send![self, addObject: object] + } + pub unsafe fn removeObject(&self, object: ObjectType) { + msg_send![self, removeObject: object] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: numItems] + } +} +#[doc = "NSExtendedMutableSet"] +impl NSMutableSet { + pub unsafe fn addObjectsFromArray(&self, array: TodoGenerics) { + msg_send![self, addObjectsFromArray: array] + } + pub unsafe fn intersectSet(&self, otherSet: TodoGenerics) { + msg_send![self, intersectSet: otherSet] + } + pub unsafe fn minusSet(&self, otherSet: TodoGenerics) { + msg_send![self, minusSet: otherSet] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn unionSet(&self, otherSet: TodoGenerics) { + msg_send![self, unionSet: otherSet] + } + pub unsafe fn setSet(&self, otherSet: TodoGenerics) { + msg_send![self, setSet: otherSet] + } +} +#[doc = "NSMutableSetCreation"] +impl NSMutableSet { + pub unsafe fn setWithCapacity(numItems: NSUInteger) -> Id { + msg_send_id![Self::class(), setWithCapacity: numItems] + } +} +extern_class!( + #[derive(Debug)] + struct NSCountedSet; + unsafe impl ClassType for NSCountedSet { + type Super = NSMutableSet; + } +); +impl NSCountedSet { + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: numItems] + } + pub unsafe fn initWithArray(&self, array: TodoGenerics) -> Id { + msg_send_id![self, initWithArray: array] + } + pub unsafe fn initWithSet(&self, set: TodoGenerics) -> Id { + msg_send_id![self, initWithSet: set] + } + pub unsafe fn countForObject(&self, object: ObjectType) -> NSUInteger { + msg_send![self, countForObject: object] + } + pub unsafe fn objectEnumerator(&self) -> TodoGenerics { + msg_send![self, objectEnumerator] + } + pub unsafe fn addObject(&self, object: ObjectType) { + msg_send![self, addObject: object] + } + pub unsafe fn removeObject(&self, object: ObjectType) { + msg_send![self, removeObject: object] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs new file mode 100644 index 000000000..ecd8ec10e --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -0,0 +1,143 @@ +extern_class!( + #[derive(Debug)] + struct NSSortDescriptor; + unsafe impl ClassType for NSSortDescriptor { + type Super = NSObject; + } +); +impl NSSortDescriptor { + pub unsafe fn sortDescriptorWithKey_ascending( + key: Option<&NSString>, + ascending: bool, + ) -> Id { + msg_send_id![ + Self::class(), + sortDescriptorWithKey: key, + ascending: ascending + ] + } + pub unsafe fn sortDescriptorWithKey_ascending_selector( + key: Option<&NSString>, + ascending: bool, + selector: Option, + ) -> Id { + msg_send_id![ + Self::class(), + sortDescriptorWithKey: key, + ascending: ascending, + selector: selector + ] + } + pub unsafe fn initWithKey_ascending( + &self, + key: Option<&NSString>, + ascending: bool, + ) -> Id { + msg_send_id![self, initWithKey: key, ascending: ascending] + } + pub unsafe fn initWithKey_ascending_selector( + &self, + key: Option<&NSString>, + ascending: bool, + selector: Option, + ) -> Id { + msg_send_id![ + self, + initWithKey: key, + ascending: ascending, + selector: selector + ] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn allowEvaluation(&self) { + msg_send![self, allowEvaluation] + } + pub unsafe fn sortDescriptorWithKey_ascending_comparator( + key: Option<&NSString>, + ascending: bool, + cmptr: NSComparator, + ) -> Id { + msg_send_id![ + Self::class(), + sortDescriptorWithKey: key, + ascending: ascending, + comparator: cmptr + ] + } + pub unsafe fn initWithKey_ascending_comparator( + &self, + key: Option<&NSString>, + ascending: bool, + cmptr: NSComparator, + ) -> Id { + msg_send_id![ + self, + initWithKey: key, + ascending: ascending, + comparator: cmptr + ] + } + pub unsafe fn compareObject_toObject( + &self, + object1: &Object, + object2: &Object, + ) -> NSComparisonResult { + msg_send![self, compareObject: object1, toObject: object2] + } + pub unsafe fn key(&self) -> Option> { + msg_send_id![self, key] + } + pub unsafe fn ascending(&self) -> bool { + msg_send![self, ascending] + } + pub unsafe fn selector(&self) -> Option { + msg_send![self, selector] + } + pub unsafe fn comparator(&self) -> NSComparator { + msg_send![self, comparator] + } + pub unsafe fn reversedSortDescriptor(&self) -> Id { + msg_send_id![self, reversedSortDescriptor] + } +} +#[doc = "NSSortDescriptorSorting"] +impl NSSet { + pub unsafe fn sortedArrayUsingDescriptors( + &self, + sortDescriptors: TodoGenerics, + ) -> TodoGenerics { + msg_send![self, sortedArrayUsingDescriptors: sortDescriptors] + } +} +#[doc = "NSSortDescriptorSorting"] +impl NSArray { + pub unsafe fn sortedArrayUsingDescriptors( + &self, + sortDescriptors: TodoGenerics, + ) -> TodoGenerics { + msg_send![self, sortedArrayUsingDescriptors: sortDescriptors] + } +} +#[doc = "NSSortDescriptorSorting"] +impl NSMutableArray { + pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: TodoGenerics) { + msg_send![self, sortUsingDescriptors: sortDescriptors] + } +} +#[doc = "NSKeyValueSorting"] +impl NSOrderedSet { + pub unsafe fn sortedArrayUsingDescriptors( + &self, + sortDescriptors: TodoGenerics, + ) -> TodoGenerics { + msg_send![self, sortedArrayUsingDescriptors: sortDescriptors] + } +} +#[doc = "NSKeyValueSorting"] +impl NSMutableOrderedSet { + pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: TodoGenerics) { + msg_send![self, sortUsingDescriptors: sortDescriptors] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs new file mode 100644 index 000000000..833d743ef --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -0,0 +1,32 @@ +extern_class!( + #[derive(Debug)] + struct NSSpellServer; + unsafe impl ClassType for NSSpellServer { + type Super = NSObject; + } +); +impl NSSpellServer { + pub unsafe fn registerLanguage_byVendor( + &self, + language: Option<&NSString>, + vendor: Option<&NSString>, + ) -> bool { + msg_send![self, registerLanguage: language, byVendor: vendor] + } + pub unsafe fn isWordInUserDictionaries_caseSensitive( + &self, + word: &NSString, + flag: bool, + ) -> bool { + msg_send![self, isWordInUserDictionaries: word, caseSensitive: flag] + } + pub unsafe fn run(&self) { + msg_send![self, run] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs new file mode 100644 index 000000000..bceea756d --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -0,0 +1,207 @@ +extern_class!( + #[derive(Debug)] + struct NSStream; + unsafe impl ClassType for NSStream { + type Super = NSObject; + } +); +impl NSStream { + pub unsafe fn open(&self) { + msg_send![self, open] + } + pub unsafe fn close(&self) { + msg_send![self, close] + } + pub unsafe fn propertyForKey(&self, key: NSStreamPropertyKey) -> Option> { + msg_send_id![self, propertyForKey: key] + } + pub unsafe fn setProperty_forKey( + &self, + property: Option<&Object>, + key: NSStreamPropertyKey, + ) -> bool { + msg_send![self, setProperty: property, forKey: key] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn streamStatus(&self) -> NSStreamStatus { + msg_send![self, streamStatus] + } + pub unsafe fn streamError(&self) -> Option> { + msg_send_id![self, streamError] + } +} +extern_class!( + #[derive(Debug)] + struct NSInputStream; + unsafe impl ClassType for NSInputStream { + type Super = NSStream; + } +); +impl NSInputStream { + pub unsafe fn read_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { + msg_send![self, read: buffer, maxLength: len] + } + pub unsafe fn getBuffer_length( + &self, + buffer: NonNull<*mut uint8_t>, + len: NonNull, + ) -> bool { + msg_send![self, getBuffer: buffer, length: len] + } + pub unsafe fn initWithData(&self, data: &NSData) -> Id { + msg_send_id![self, initWithData: data] + } + pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithURL: url] + } + pub unsafe fn hasBytesAvailable(&self) -> bool { + msg_send![self, hasBytesAvailable] + } +} +extern_class!( + #[derive(Debug)] + struct NSOutputStream; + unsafe impl ClassType for NSOutputStream { + type Super = NSStream; + } +); +impl NSOutputStream { + pub unsafe fn write_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { + msg_send![self, write: buffer, maxLength: len] + } + pub unsafe fn initToMemory(&self) -> Id { + msg_send_id![self, initToMemory] + } + pub unsafe fn initToBuffer_capacity( + &self, + buffer: NonNull, + capacity: NSUInteger, + ) -> Id { + msg_send_id![self, initToBuffer: buffer, capacity: capacity] + } + pub unsafe fn initWithURL_append( + &self, + url: &NSURL, + shouldAppend: bool, + ) -> Option> { + msg_send_id![self, initWithURL: url, append: shouldAppend] + } + pub unsafe fn hasSpaceAvailable(&self) -> bool { + msg_send![self, hasSpaceAvailable] + } +} +#[doc = "NSSocketStreamCreationExtensions"] +impl NSStream { + pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( + hostname: &NSString, + port: NSInteger, + inputStream: *mut Option<&NSInputStream>, + outputStream: *mut Option<&NSOutputStream>, + ) { + msg_send![ + Self::class(), + getStreamsToHostWithName: hostname, + port: port, + inputStream: inputStream, + outputStream: outputStream + ] + } + pub unsafe fn getStreamsToHost_port_inputStream_outputStream( + host: &NSHost, + port: NSInteger, + inputStream: *mut Option<&NSInputStream>, + outputStream: *mut Option<&NSOutputStream>, + ) { + msg_send![ + Self::class(), + getStreamsToHost: host, + port: port, + inputStream: inputStream, + outputStream: outputStream + ] + } +} +#[doc = "NSStreamBoundPairCreationExtensions"] +impl NSStream { + pub unsafe fn getBoundStreamsWithBufferSize_inputStream_outputStream( + bufferSize: NSUInteger, + inputStream: *mut Option<&NSInputStream>, + outputStream: *mut Option<&NSOutputStream>, + ) { + msg_send![ + Self::class(), + getBoundStreamsWithBufferSize: bufferSize, + inputStream: inputStream, + outputStream: outputStream + ] + } +} +#[doc = "NSInputStreamExtensions"] +impl NSInputStream { + pub unsafe fn initWithFileAtPath(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithFileAtPath: path] + } + pub unsafe fn inputStreamWithData(data: &NSData) -> Option> { + msg_send_id![Self::class(), inputStreamWithData: data] + } + pub unsafe fn inputStreamWithFileAtPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), inputStreamWithFileAtPath: path] + } + pub unsafe fn inputStreamWithURL(url: &NSURL) -> Option> { + msg_send_id![Self::class(), inputStreamWithURL: url] + } +} +#[doc = "NSOutputStreamExtensions"] +impl NSOutputStream { + pub unsafe fn initToFileAtPath_append( + &self, + path: &NSString, + shouldAppend: bool, + ) -> Option> { + msg_send_id![self, initToFileAtPath: path, append: shouldAppend] + } + pub unsafe fn outputStreamToMemory() -> Id { + msg_send_id![Self::class(), outputStreamToMemory] + } + pub unsafe fn outputStreamToBuffer_capacity( + buffer: NonNull, + capacity: NSUInteger, + ) -> Id { + msg_send_id![ + Self::class(), + outputStreamToBuffer: buffer, + capacity: capacity + ] + } + pub unsafe fn outputStreamToFileAtPath_append( + path: &NSString, + shouldAppend: bool, + ) -> Id { + msg_send_id![ + Self::class(), + outputStreamToFileAtPath: path, + append: shouldAppend + ] + } + pub unsafe fn outputStreamWithURL_append( + url: &NSURL, + shouldAppend: bool, + ) -> Option> { + msg_send_id![ + Self::class(), + outputStreamWithURL: url, + append: shouldAppend + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs new file mode 100644 index 000000000..84953c60a --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -0,0 +1,938 @@ +extern_class!( + #[derive(Debug)] + struct NSString; + unsafe impl ClassType for NSString { + type Super = NSObject; + } +); +impl NSString { + pub unsafe fn characterAtIndex(&self, index: NSUInteger) -> unichar { + msg_send![self, characterAtIndex: index] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } +} +#[doc = "NSStringExtensionMethods"] +impl NSString { + pub unsafe fn substringFromIndex(&self, from: NSUInteger) -> Id { + msg_send_id![self, substringFromIndex: from] + } + pub unsafe fn substringToIndex(&self, to: NSUInteger) -> Id { + msg_send_id![self, substringToIndex: to] + } + pub unsafe fn substringWithRange(&self, range: NSRange) -> Id { + msg_send_id![self, substringWithRange: range] + } + pub unsafe fn getCharacters_range(&self, buffer: NonNull, range: NSRange) { + msg_send![self, getCharacters: buffer, range: range] + } + pub unsafe fn compare(&self, string: &NSString) -> NSComparisonResult { + msg_send![self, compare: string] + } + pub unsafe fn compare_options( + &self, + string: &NSString, + mask: NSStringCompareOptions, + ) -> NSComparisonResult { + msg_send![self, compare: string, options: mask] + } + pub unsafe fn compare_options_range( + &self, + string: &NSString, + mask: NSStringCompareOptions, + rangeOfReceiverToCompare: NSRange, + ) -> NSComparisonResult { + msg_send![ + self, + compare: string, + options: mask, + range: rangeOfReceiverToCompare + ] + } + pub unsafe fn compare_options_range_locale( + &self, + string: &NSString, + mask: NSStringCompareOptions, + rangeOfReceiverToCompare: NSRange, + locale: Option<&Object>, + ) -> NSComparisonResult { + msg_send![ + self, + compare: string, + options: mask, + range: rangeOfReceiverToCompare, + locale: locale + ] + } + pub unsafe fn caseInsensitiveCompare(&self, string: &NSString) -> NSComparisonResult { + msg_send![self, caseInsensitiveCompare: string] + } + pub unsafe fn localizedCompare(&self, string: &NSString) -> NSComparisonResult { + msg_send![self, localizedCompare: string] + } + pub unsafe fn localizedCaseInsensitiveCompare(&self, string: &NSString) -> NSComparisonResult { + msg_send![self, localizedCaseInsensitiveCompare: string] + } + pub unsafe fn localizedStandardCompare(&self, string: &NSString) -> NSComparisonResult { + msg_send![self, localizedStandardCompare: string] + } + pub unsafe fn isEqualToString(&self, aString: &NSString) -> bool { + msg_send![self, isEqualToString: aString] + } + pub unsafe fn hasPrefix(&self, str: &NSString) -> bool { + msg_send![self, hasPrefix: str] + } + pub unsafe fn hasSuffix(&self, str: &NSString) -> bool { + msg_send![self, hasSuffix: str] + } + pub unsafe fn commonPrefixWithString_options( + &self, + str: &NSString, + mask: NSStringCompareOptions, + ) -> Id { + msg_send_id![self, commonPrefixWithString: str, options: mask] + } + pub unsafe fn containsString(&self, str: &NSString) -> bool { + msg_send![self, containsString: str] + } + pub unsafe fn localizedCaseInsensitiveContainsString(&self, str: &NSString) -> bool { + msg_send![self, localizedCaseInsensitiveContainsString: str] + } + pub unsafe fn localizedStandardContainsString(&self, str: &NSString) -> bool { + msg_send![self, localizedStandardContainsString: str] + } + pub unsafe fn localizedStandardRangeOfString(&self, str: &NSString) -> NSRange { + msg_send![self, localizedStandardRangeOfString: str] + } + pub unsafe fn rangeOfString(&self, searchString: &NSString) -> NSRange { + msg_send![self, rangeOfString: searchString] + } + pub unsafe fn rangeOfString_options( + &self, + searchString: &NSString, + mask: NSStringCompareOptions, + ) -> NSRange { + msg_send![self, rangeOfString: searchString, options: mask] + } + pub unsafe fn rangeOfString_options_range( + &self, + searchString: &NSString, + mask: NSStringCompareOptions, + rangeOfReceiverToSearch: NSRange, + ) -> NSRange { + msg_send![ + self, + rangeOfString: searchString, + options: mask, + range: rangeOfReceiverToSearch + ] + } + pub unsafe fn rangeOfString_options_range_locale( + &self, + searchString: &NSString, + mask: NSStringCompareOptions, + rangeOfReceiverToSearch: NSRange, + locale: Option<&NSLocale>, + ) -> NSRange { + msg_send![ + self, + rangeOfString: searchString, + options: mask, + range: rangeOfReceiverToSearch, + locale: locale + ] + } + pub unsafe fn rangeOfCharacterFromSet(&self, searchSet: &NSCharacterSet) -> NSRange { + msg_send![self, rangeOfCharacterFromSet: searchSet] + } + pub unsafe fn rangeOfCharacterFromSet_options( + &self, + searchSet: &NSCharacterSet, + mask: NSStringCompareOptions, + ) -> NSRange { + msg_send![self, rangeOfCharacterFromSet: searchSet, options: mask] + } + pub unsafe fn rangeOfCharacterFromSet_options_range( + &self, + searchSet: &NSCharacterSet, + mask: NSStringCompareOptions, + rangeOfReceiverToSearch: NSRange, + ) -> NSRange { + msg_send![ + self, + rangeOfCharacterFromSet: searchSet, + options: mask, + range: rangeOfReceiverToSearch + ] + } + pub unsafe fn rangeOfComposedCharacterSequenceAtIndex(&self, index: NSUInteger) -> NSRange { + msg_send![self, rangeOfComposedCharacterSequenceAtIndex: index] + } + pub unsafe fn rangeOfComposedCharacterSequencesForRange(&self, range: NSRange) -> NSRange { + msg_send![self, rangeOfComposedCharacterSequencesForRange: range] + } + pub unsafe fn stringByAppendingString(&self, aString: &NSString) -> Id { + msg_send_id![self, stringByAppendingString: aString] + } + pub unsafe fn uppercaseStringWithLocale( + &self, + locale: Option<&NSLocale>, + ) -> Id { + msg_send_id![self, uppercaseStringWithLocale: locale] + } + pub unsafe fn lowercaseStringWithLocale( + &self, + locale: Option<&NSLocale>, + ) -> Id { + msg_send_id![self, lowercaseStringWithLocale: locale] + } + pub unsafe fn capitalizedStringWithLocale( + &self, + locale: Option<&NSLocale>, + ) -> Id { + msg_send_id![self, capitalizedStringWithLocale: locale] + } + pub unsafe fn getLineStart_end_contentsEnd_forRange( + &self, + startPtr: *mut NSUInteger, + lineEndPtr: *mut NSUInteger, + contentsEndPtr: *mut NSUInteger, + range: NSRange, + ) { + msg_send![ + self, + getLineStart: startPtr, + end: lineEndPtr, + contentsEnd: contentsEndPtr, + forRange: range + ] + } + pub unsafe fn lineRangeForRange(&self, range: NSRange) -> NSRange { + msg_send![self, lineRangeForRange: range] + } + pub unsafe fn getParagraphStart_end_contentsEnd_forRange( + &self, + startPtr: *mut NSUInteger, + parEndPtr: *mut NSUInteger, + contentsEndPtr: *mut NSUInteger, + range: NSRange, + ) { + msg_send![ + self, + getParagraphStart: startPtr, + end: parEndPtr, + contentsEnd: contentsEndPtr, + forRange: range + ] + } + pub unsafe fn paragraphRangeForRange(&self, range: NSRange) -> NSRange { + msg_send![self, paragraphRangeForRange: range] + } + pub unsafe fn enumerateSubstringsInRange_options_usingBlock( + &self, + range: NSRange, + opts: NSStringEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateSubstringsInRange: range, + options: opts, + usingBlock: block + ] + } + pub unsafe fn enumerateLinesUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateLinesUsingBlock: block] + } + pub unsafe fn dataUsingEncoding_allowLossyConversion( + &self, + encoding: NSStringEncoding, + lossy: bool, + ) -> Option> { + msg_send_id![ + self, + dataUsingEncoding: encoding, + allowLossyConversion: lossy + ] + } + pub unsafe fn dataUsingEncoding( + &self, + encoding: NSStringEncoding, + ) -> Option> { + msg_send_id![self, dataUsingEncoding: encoding] + } + pub unsafe fn canBeConvertedToEncoding(&self, encoding: NSStringEncoding) -> bool { + msg_send![self, canBeConvertedToEncoding: encoding] + } + pub unsafe fn cStringUsingEncoding(&self, encoding: NSStringEncoding) -> *mut c_char { + msg_send![self, cStringUsingEncoding: encoding] + } + pub unsafe fn getCString_maxLength_encoding( + &self, + buffer: NonNull, + maxBufferCount: NSUInteger, + encoding: NSStringEncoding, + ) -> bool { + msg_send![ + self, + getCString: buffer, + maxLength: maxBufferCount, + encoding: encoding + ] + } + pub unsafe fn getBytes_maxLength_usedLength_encoding_options_range_remainingRange( + &self, + buffer: *mut c_void, + maxBufferCount: NSUInteger, + usedBufferCount: *mut NSUInteger, + encoding: NSStringEncoding, + options: NSStringEncodingConversionOptions, + range: NSRange, + leftover: NSRangePointer, + ) -> bool { + msg_send![ + self, + getBytes: buffer, + maxLength: maxBufferCount, + usedLength: usedBufferCount, + encoding: encoding, + options: options, + range: range, + remainingRange: leftover + ] + } + pub unsafe fn maximumLengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger { + msg_send![self, maximumLengthOfBytesUsingEncoding: enc] + } + pub unsafe fn lengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger { + msg_send![self, lengthOfBytesUsingEncoding: enc] + } + pub unsafe fn localizedNameOfStringEncoding( + encoding: NSStringEncoding, + ) -> Id { + msg_send_id![Self::class(), localizedNameOfStringEncoding: encoding] + } + pub unsafe fn componentsSeparatedByString(&self, separator: &NSString) -> TodoGenerics { + msg_send![self, componentsSeparatedByString: separator] + } + pub unsafe fn componentsSeparatedByCharactersInSet( + &self, + separator: &NSCharacterSet, + ) -> TodoGenerics { + msg_send![self, componentsSeparatedByCharactersInSet: separator] + } + pub unsafe fn stringByTrimmingCharactersInSet( + &self, + set: &NSCharacterSet, + ) -> Id { + msg_send_id![self, stringByTrimmingCharactersInSet: set] + } + pub unsafe fn stringByPaddingToLength_withString_startingAtIndex( + &self, + newLength: NSUInteger, + padString: &NSString, + padIndex: NSUInteger, + ) -> Id { + msg_send_id![ + self, + stringByPaddingToLength: newLength, + withString: padString, + startingAtIndex: padIndex + ] + } + pub unsafe fn stringByFoldingWithOptions_locale( + &self, + options: NSStringCompareOptions, + locale: Option<&NSLocale>, + ) -> Id { + msg_send_id![self, stringByFoldingWithOptions: options, locale: locale] + } + pub unsafe fn stringByReplacingOccurrencesOfString_withString_options_range( + &self, + target: &NSString, + replacement: &NSString, + options: NSStringCompareOptions, + searchRange: NSRange, + ) -> Id { + msg_send_id![ + self, + stringByReplacingOccurrencesOfString: target, + withString: replacement, + options: options, + range: searchRange + ] + } + pub unsafe fn stringByReplacingOccurrencesOfString_withString( + &self, + target: &NSString, + replacement: &NSString, + ) -> Id { + msg_send_id![ + self, + stringByReplacingOccurrencesOfString: target, + withString: replacement + ] + } + pub unsafe fn stringByReplacingCharactersInRange_withString( + &self, + range: NSRange, + replacement: &NSString, + ) -> Id { + msg_send_id![ + self, + stringByReplacingCharactersInRange: range, + withString: replacement + ] + } + pub unsafe fn stringByApplyingTransform_reverse( + &self, + transform: NSStringTransform, + reverse: bool, + ) -> Option> { + msg_send_id![self, stringByApplyingTransform: transform, reverse: reverse] + } + pub unsafe fn writeToURL_atomically_encoding_error( + &self, + url: &NSURL, + useAuxiliaryFile: bool, + enc: NSStringEncoding, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + writeToURL: url, + atomically: useAuxiliaryFile, + encoding: enc, + error: error + ] + } + pub unsafe fn writeToFile_atomically_encoding_error( + &self, + path: &NSString, + useAuxiliaryFile: bool, + enc: NSStringEncoding, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + writeToFile: path, + atomically: useAuxiliaryFile, + encoding: enc, + error: error + ] + } + pub unsafe fn initWithCharactersNoCopy_length_freeWhenDone( + &self, + characters: NonNull, + length: NSUInteger, + freeBuffer: bool, + ) -> Id { + msg_send_id![ + self, + initWithCharactersNoCopy: characters, + length: length, + freeWhenDone: freeBuffer + ] + } + pub unsafe fn initWithCharactersNoCopy_length_deallocator( + &self, + chars: NonNull, + len: NSUInteger, + deallocator: TodoBlock, + ) -> Id { + msg_send_id![ + self, + initWithCharactersNoCopy: chars, + length: len, + deallocator: deallocator + ] + } + pub unsafe fn initWithCharacters_length( + &self, + characters: NonNull, + length: NSUInteger, + ) -> Id { + msg_send_id![self, initWithCharacters: characters, length: length] + } + pub unsafe fn initWithUTF8String( + &self, + nullTerminatedCString: NonNull, + ) -> Option> { + msg_send_id![self, initWithUTF8String: nullTerminatedCString] + } + pub unsafe fn initWithString(&self, aString: &NSString) -> Id { + msg_send_id![self, initWithString: aString] + } + pub unsafe fn initWithFormat_arguments( + &self, + format: &NSString, + argList: va_list, + ) -> Id { + msg_send_id![self, initWithFormat: format, arguments: argList] + } + pub unsafe fn initWithFormat_locale_arguments( + &self, + format: &NSString, + locale: Option<&Object>, + argList: va_list, + ) -> Id { + msg_send_id![ + self, + initWithFormat: format, + locale: locale, + arguments: argList + ] + } + pub unsafe fn initWithData_encoding( + &self, + data: &NSData, + encoding: NSStringEncoding, + ) -> Option> { + msg_send_id![self, initWithData: data, encoding: encoding] + } + pub unsafe fn initWithBytes_length_encoding( + &self, + bytes: NonNull, + len: NSUInteger, + encoding: NSStringEncoding, + ) -> Option> { + msg_send_id![self, initWithBytes: bytes, length: len, encoding: encoding] + } + pub unsafe fn initWithBytesNoCopy_length_encoding_freeWhenDone( + &self, + bytes: NonNull, + len: NSUInteger, + encoding: NSStringEncoding, + freeBuffer: bool, + ) -> Option> { + msg_send_id![ + self, + initWithBytesNoCopy: bytes, + length: len, + encoding: encoding, + freeWhenDone: freeBuffer + ] + } + pub unsafe fn initWithBytesNoCopy_length_encoding_deallocator( + &self, + bytes: NonNull, + len: NSUInteger, + encoding: NSStringEncoding, + deallocator: TodoBlock, + ) -> Option> { + msg_send_id![ + self, + initWithBytesNoCopy: bytes, + length: len, + encoding: encoding, + deallocator: deallocator + ] + } + pub unsafe fn string() -> Id { + msg_send_id![Self::class(), string] + } + pub unsafe fn stringWithString(string: &NSString) -> Id { + msg_send_id![Self::class(), stringWithString: string] + } + pub unsafe fn stringWithCharacters_length( + characters: NonNull, + length: NSUInteger, + ) -> Id { + msg_send_id![ + Self::class(), + stringWithCharacters: characters, + length: length + ] + } + pub unsafe fn stringWithUTF8String( + nullTerminatedCString: NonNull, + ) -> Option> { + msg_send_id![Self::class(), stringWithUTF8String: nullTerminatedCString] + } + pub unsafe fn initWithCString_encoding( + &self, + nullTerminatedCString: NonNull, + encoding: NSStringEncoding, + ) -> Option> { + msg_send_id![ + self, + initWithCString: nullTerminatedCString, + encoding: encoding + ] + } + pub unsafe fn stringWithCString_encoding( + cString: NonNull, + enc: NSStringEncoding, + ) -> Option> { + msg_send_id![Self::class(), stringWithCString: cString, encoding: enc] + } + pub unsafe fn initWithContentsOfURL_encoding_error( + &self, + url: &NSURL, + enc: NSStringEncoding, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithContentsOfURL: url, + encoding: enc, + error: error + ] + } + pub unsafe fn initWithContentsOfFile_encoding_error( + &self, + path: &NSString, + enc: NSStringEncoding, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithContentsOfFile: path, + encoding: enc, + error: error + ] + } + pub unsafe fn stringWithContentsOfURL_encoding_error( + url: &NSURL, + enc: NSStringEncoding, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + stringWithContentsOfURL: url, + encoding: enc, + error: error + ] + } + pub unsafe fn stringWithContentsOfFile_encoding_error( + path: &NSString, + enc: NSStringEncoding, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + stringWithContentsOfFile: path, + encoding: enc, + error: error + ] + } + pub unsafe fn initWithContentsOfURL_usedEncoding_error( + &self, + url: &NSURL, + enc: *mut NSStringEncoding, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithContentsOfURL: url, + usedEncoding: enc, + error: error + ] + } + pub unsafe fn initWithContentsOfFile_usedEncoding_error( + &self, + path: &NSString, + enc: *mut NSStringEncoding, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithContentsOfFile: path, + usedEncoding: enc, + error: error + ] + } + pub unsafe fn stringWithContentsOfURL_usedEncoding_error( + url: &NSURL, + enc: *mut NSStringEncoding, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + stringWithContentsOfURL: url, + usedEncoding: enc, + error: error + ] + } + pub unsafe fn stringWithContentsOfFile_usedEncoding_error( + path: &NSString, + enc: *mut NSStringEncoding, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + stringWithContentsOfFile: path, + usedEncoding: enc, + error: error + ] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } + pub unsafe fn floatValue(&self) -> c_float { + msg_send![self, floatValue] + } + pub unsafe fn intValue(&self) -> c_int { + msg_send![self, intValue] + } + pub unsafe fn integerValue(&self) -> NSInteger { + msg_send![self, integerValue] + } + pub unsafe fn longLongValue(&self) -> c_longlong { + msg_send![self, longLongValue] + } + pub unsafe fn boolValue(&self) -> bool { + msg_send![self, boolValue] + } + pub unsafe fn uppercaseString(&self) -> Id { + msg_send_id![self, uppercaseString] + } + pub unsafe fn lowercaseString(&self) -> Id { + msg_send_id![self, lowercaseString] + } + pub unsafe fn capitalizedString(&self) -> Id { + msg_send_id![self, capitalizedString] + } + pub unsafe fn localizedUppercaseString(&self) -> Id { + msg_send_id![self, localizedUppercaseString] + } + pub unsafe fn localizedLowercaseString(&self) -> Id { + msg_send_id![self, localizedLowercaseString] + } + pub unsafe fn localizedCapitalizedString(&self) -> Id { + msg_send_id![self, localizedCapitalizedString] + } + pub unsafe fn UTF8String(&self) -> *mut c_char { + msg_send![self, UTF8String] + } + pub unsafe fn fastestEncoding(&self) -> NSStringEncoding { + msg_send![self, fastestEncoding] + } + pub unsafe fn smallestEncoding(&self) -> NSStringEncoding { + msg_send![self, smallestEncoding] + } + pub unsafe fn availableStringEncodings() -> NonNull { + msg_send![Self::class(), availableStringEncodings] + } + pub unsafe fn defaultCStringEncoding() -> NSStringEncoding { + msg_send![Self::class(), defaultCStringEncoding] + } + pub unsafe fn decomposedStringWithCanonicalMapping(&self) -> Id { + msg_send_id![self, decomposedStringWithCanonicalMapping] + } + pub unsafe fn precomposedStringWithCanonicalMapping(&self) -> Id { + msg_send_id![self, precomposedStringWithCanonicalMapping] + } + pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id { + msg_send_id![self, decomposedStringWithCompatibilityMapping] + } + pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id { + msg_send_id![self, precomposedStringWithCompatibilityMapping] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn hash(&self) -> NSUInteger { + msg_send![self, hash] + } +} +#[doc = "NSStringEncodingDetection"] +impl NSString { + pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( + data: &NSData, + opts: TodoGenerics, + string: *mut Option<&NSString>, + usedLossyConversion: *mut bool, + ) -> NSStringEncoding { + msg_send![ + Self::class(), + stringEncodingForData: data, + encodingOptions: opts, + convertedString: string, + usedLossyConversion: usedLossyConversion + ] + } +} +#[doc = "NSItemProvider"] +impl NSString {} +extern_class!( + #[derive(Debug)] + struct NSMutableString; + unsafe impl ClassType for NSMutableString { + type Super = NSString; + } +); +impl NSMutableString { + pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, aString: &NSString) { + msg_send![self, replaceCharactersInRange: range, withString: aString] + } +} +#[doc = "NSMutableStringExtensionMethods"] +impl NSMutableString { + pub unsafe fn insertString_atIndex(&self, aString: &NSString, loc: NSUInteger) { + msg_send![self, insertString: aString, atIndex: loc] + } + pub unsafe fn deleteCharactersInRange(&self, range: NSRange) { + msg_send![self, deleteCharactersInRange: range] + } + pub unsafe fn appendString(&self, aString: &NSString) { + msg_send![self, appendString: aString] + } + pub unsafe fn setString(&self, aString: &NSString) { + msg_send![self, setString: aString] + } + pub unsafe fn replaceOccurrencesOfString_withString_options_range( + &self, + target: &NSString, + replacement: &NSString, + options: NSStringCompareOptions, + searchRange: NSRange, + ) -> NSUInteger { + msg_send![ + self, + replaceOccurrencesOfString: target, + withString: replacement, + options: options, + range: searchRange + ] + } + pub unsafe fn applyTransform_reverse_range_updatedRange( + &self, + transform: NSStringTransform, + reverse: bool, + range: NSRange, + resultingRange: NSRangePointer, + ) -> bool { + msg_send![ + self, + applyTransform: transform, + reverse: reverse, + range: range, + updatedRange: resultingRange + ] + } + pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: capacity] + } + pub unsafe fn stringWithCapacity(capacity: NSUInteger) -> Id { + msg_send_id![Self::class(), stringWithCapacity: capacity] + } +} +#[doc = "NSExtendedStringPropertyListParsing"] +impl NSString { + pub unsafe fn propertyList(&self) -> Id { + msg_send_id![self, propertyList] + } + pub unsafe fn propertyListFromStringsFileFormat(&self) -> Option> { + msg_send_id![self, propertyListFromStringsFileFormat] + } +} +#[doc = "NSStringDeprecated"] +impl NSString { + pub unsafe fn cString(&self) -> *mut c_char { + msg_send![self, cString] + } + pub unsafe fn lossyCString(&self) -> *mut c_char { + msg_send![self, lossyCString] + } + pub unsafe fn cStringLength(&self) -> NSUInteger { + msg_send![self, cStringLength] + } + pub unsafe fn getCString(&self, bytes: NonNull) { + msg_send![self, getCString: bytes] + } + pub unsafe fn getCString_maxLength(&self, bytes: NonNull, maxLength: NSUInteger) { + msg_send![self, getCString: bytes, maxLength: maxLength] + } + pub unsafe fn getCString_maxLength_range_remainingRange( + &self, + bytes: NonNull, + maxLength: NSUInteger, + aRange: NSRange, + leftoverRange: NSRangePointer, + ) { + msg_send![ + self, + getCString: bytes, + maxLength: maxLength, + range: aRange, + remainingRange: leftoverRange + ] + } + pub unsafe fn writeToFile_atomically(&self, path: &NSString, useAuxiliaryFile: bool) -> bool { + msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] + } + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { + msg_send![self, writeToURL: url, atomically: atomically] + } + pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithContentsOfURL: url] + } + pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option> { + msg_send_id![Self::class(), stringWithContentsOfFile: path] + } + pub unsafe fn stringWithContentsOfURL(url: &NSURL) -> Option> { + msg_send_id![Self::class(), stringWithContentsOfURL: url] + } + pub unsafe fn initWithCStringNoCopy_length_freeWhenDone( + &self, + bytes: NonNull, + length: NSUInteger, + freeBuffer: bool, + ) -> Option> { + msg_send_id![ + self, + initWithCStringNoCopy: bytes, + length: length, + freeWhenDone: freeBuffer + ] + } + pub unsafe fn initWithCString_length( + &self, + bytes: NonNull, + length: NSUInteger, + ) -> Option> { + msg_send_id![self, initWithCString: bytes, length: length] + } + pub unsafe fn initWithCString(&self, bytes: NonNull) -> Option> { + msg_send_id![self, initWithCString: bytes] + } + pub unsafe fn stringWithCString_length( + bytes: NonNull, + length: NSUInteger, + ) -> Option> { + msg_send_id![Self::class(), stringWithCString: bytes, length: length] + } + pub unsafe fn stringWithCString(bytes: NonNull) -> Option> { + msg_send_id![Self::class(), stringWithCString: bytes] + } + pub unsafe fn getCharacters(&self, buffer: NonNull) { + msg_send![self, getCharacters: buffer] + } +} +extern_class!( + #[derive(Debug)] + struct NSSimpleCString; + unsafe impl ClassType for NSSimpleCString { + type Super = NSString; + } +); +impl NSSimpleCString {} +extern_class!( + #[derive(Debug)] + struct NSConstantString; + unsafe impl ClassType for NSConstantString { + type Super = NSSimpleCString; + } +); +impl NSConstantString {} diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs new file mode 100644 index 000000000..e905c3d89 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -0,0 +1,141 @@ +extern_class!( + #[derive(Debug)] + struct NSTask; + unsafe impl ClassType for NSTask { + type Super = NSObject; + } +); +impl NSTask { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn launchAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + msg_send![self, launchAndReturnError: error] + } + pub unsafe fn interrupt(&self) { + msg_send![self, interrupt] + } + pub unsafe fn terminate(&self) { + msg_send![self, terminate] + } + pub unsafe fn suspend(&self) -> bool { + msg_send![self, suspend] + } + pub unsafe fn resume(&self) -> bool { + msg_send![self, resume] + } + pub unsafe fn executableURL(&self) -> Option> { + msg_send_id![self, executableURL] + } + pub unsafe fn setExecutableURL(&self, executableURL: Option<&NSURL>) { + msg_send![self, setExecutableURL: executableURL] + } + pub unsafe fn arguments(&self) -> TodoGenerics { + msg_send![self, arguments] + } + pub unsafe fn setArguments(&self, arguments: TodoGenerics) { + msg_send![self, setArguments: arguments] + } + pub unsafe fn environment(&self) -> TodoGenerics { + msg_send![self, environment] + } + pub unsafe fn setEnvironment(&self, environment: TodoGenerics) { + msg_send![self, setEnvironment: environment] + } + pub unsafe fn currentDirectoryURL(&self) -> Option> { + msg_send_id![self, currentDirectoryURL] + } + pub unsafe fn setCurrentDirectoryURL(&self, currentDirectoryURL: Option<&NSURL>) { + msg_send![self, setCurrentDirectoryURL: currentDirectoryURL] + } + pub unsafe fn standardInput(&self) -> Option> { + msg_send_id![self, standardInput] + } + pub unsafe fn setStandardInput(&self, standardInput: Option<&Object>) { + msg_send![self, setStandardInput: standardInput] + } + pub unsafe fn standardOutput(&self) -> Option> { + msg_send_id![self, standardOutput] + } + pub unsafe fn setStandardOutput(&self, standardOutput: Option<&Object>) { + msg_send![self, setStandardOutput: standardOutput] + } + pub unsafe fn standardError(&self) -> Option> { + msg_send_id![self, standardError] + } + pub unsafe fn setStandardError(&self, standardError: Option<&Object>) { + msg_send![self, setStandardError: standardError] + } + pub unsafe fn processIdentifier(&self) -> c_int { + msg_send![self, processIdentifier] + } + pub unsafe fn isRunning(&self) -> bool { + msg_send![self, isRunning] + } + pub unsafe fn terminationStatus(&self) -> c_int { + msg_send![self, terminationStatus] + } + pub unsafe fn terminationReason(&self) -> NSTaskTerminationReason { + msg_send![self, terminationReason] + } + pub unsafe fn terminationHandler(&self) -> TodoBlock { + msg_send![self, terminationHandler] + } + pub unsafe fn setTerminationHandler(&self, terminationHandler: TodoBlock) { + msg_send![self, setTerminationHandler: terminationHandler] + } + pub unsafe fn qualityOfService(&self) -> NSQualityOfService { + msg_send![self, qualityOfService] + } + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { + msg_send![self, setQualityOfService: qualityOfService] + } +} +#[doc = "NSTaskConveniences"] +impl NSTask { + pub unsafe fn launchedTaskWithExecutableURL_arguments_error_terminationHandler( + url: &NSURL, + arguments: TodoGenerics, + error: *mut Option<&NSError>, + terminationHandler: TodoBlock, + ) -> Option> { + msg_send_id![ + Self::class(), + launchedTaskWithExecutableURL: url, + arguments: arguments, + error: error, + terminationHandler: terminationHandler + ] + } + pub unsafe fn waitUntilExit(&self) { + msg_send![self, waitUntilExit] + } +} +#[doc = "NSDeprecated"] +impl NSTask { + pub unsafe fn launch(&self) { + msg_send![self, launch] + } + pub unsafe fn launchedTaskWithLaunchPath_arguments( + path: &NSString, + arguments: TodoGenerics, + ) -> Id { + msg_send_id![ + Self::class(), + launchedTaskWithLaunchPath: path, + arguments: arguments + ] + } + pub unsafe fn launchPath(&self) -> Option> { + msg_send_id![self, launchPath] + } + pub unsafe fn setLaunchPath(&self, launchPath: Option<&NSString>) { + msg_send![self, setLaunchPath: launchPath] + } + pub unsafe fn currentDirectoryPath(&self) -> Id { + msg_send_id![self, currentDirectoryPath] + } + pub unsafe fn setCurrentDirectoryPath(&self, currentDirectoryPath: &NSString) { + msg_send![self, setCurrentDirectoryPath: currentDirectoryPath] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs new file mode 100644 index 000000000..22ac3ddd3 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -0,0 +1,219 @@ +extern_class!( + #[derive(Debug)] + struct NSTextCheckingResult; + unsafe impl ClassType for NSTextCheckingResult { + type Super = NSObject; + } +); +impl NSTextCheckingResult { + pub unsafe fn resultType(&self) -> NSTextCheckingType { + msg_send![self, resultType] + } + pub unsafe fn range(&self) -> NSRange { + msg_send![self, range] + } +} +#[doc = "NSTextCheckingResultOptional"] +impl NSTextCheckingResult { + pub unsafe fn rangeAtIndex(&self, idx: NSUInteger) -> NSRange { + msg_send![self, rangeAtIndex: idx] + } + pub unsafe fn rangeWithName(&self, name: &NSString) -> NSRange { + msg_send![self, rangeWithName: name] + } + pub unsafe fn resultByAdjustingRangesWithOffset( + &self, + offset: NSInteger, + ) -> Id { + msg_send_id![self, resultByAdjustingRangesWithOffset: offset] + } + pub unsafe fn orthography(&self) -> Option> { + msg_send_id![self, orthography] + } + pub unsafe fn grammarDetails(&self) -> TodoGenerics { + msg_send![self, grammarDetails] + } + pub unsafe fn date(&self) -> Option> { + msg_send_id![self, date] + } + pub unsafe fn timeZone(&self) -> Option> { + msg_send_id![self, timeZone] + } + pub unsafe fn duration(&self) -> NSTimeInterval { + msg_send![self, duration] + } + pub unsafe fn components(&self) -> TodoGenerics { + msg_send![self, components] + } + pub unsafe fn URL(&self) -> Option> { + msg_send_id![self, URL] + } + pub unsafe fn replacementString(&self) -> Option> { + msg_send_id![self, replacementString] + } + pub unsafe fn alternativeStrings(&self) -> TodoGenerics { + msg_send![self, alternativeStrings] + } + pub unsafe fn regularExpression(&self) -> Option> { + msg_send_id![self, regularExpression] + } + pub unsafe fn phoneNumber(&self) -> Option> { + msg_send_id![self, phoneNumber] + } + pub unsafe fn numberOfRanges(&self) -> NSUInteger { + msg_send![self, numberOfRanges] + } + pub unsafe fn addressComponents(&self) -> TodoGenerics { + msg_send![self, addressComponents] + } +} +#[doc = "NSTextCheckingResultCreation"] +impl NSTextCheckingResult { + pub unsafe fn orthographyCheckingResultWithRange_orthography( + range: NSRange, + orthography: &NSOrthography, + ) -> Id { + msg_send_id![ + Self::class(), + orthographyCheckingResultWithRange: range, + orthography: orthography + ] + } + pub unsafe fn spellCheckingResultWithRange(range: NSRange) -> Id { + msg_send_id![Self::class(), spellCheckingResultWithRange: range] + } + pub unsafe fn grammarCheckingResultWithRange_details( + range: NSRange, + details: TodoGenerics, + ) -> Id { + msg_send_id![ + Self::class(), + grammarCheckingResultWithRange: range, + details: details + ] + } + pub unsafe fn dateCheckingResultWithRange_date( + range: NSRange, + date: &NSDate, + ) -> Id { + msg_send_id![ + Self::class(), + dateCheckingResultWithRange: range, + date: date + ] + } + pub unsafe fn dateCheckingResultWithRange_date_timeZone_duration( + range: NSRange, + date: &NSDate, + timeZone: &NSTimeZone, + duration: NSTimeInterval, + ) -> Id { + msg_send_id![ + Self::class(), + dateCheckingResultWithRange: range, + date: date, + timeZone: timeZone, + duration: duration + ] + } + pub unsafe fn addressCheckingResultWithRange_components( + range: NSRange, + components: TodoGenerics, + ) -> Id { + msg_send_id![ + Self::class(), + addressCheckingResultWithRange: range, + components: components + ] + } + pub unsafe fn linkCheckingResultWithRange_URL( + range: NSRange, + url: &NSURL, + ) -> Id { + msg_send_id![Self::class(), linkCheckingResultWithRange: range, URL: url] + } + pub unsafe fn quoteCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + quoteCheckingResultWithRange: range, + replacementString: replacementString + ] + } + pub unsafe fn dashCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + dashCheckingResultWithRange: range, + replacementString: replacementString + ] + } + pub unsafe fn replacementCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + replacementCheckingResultWithRange: range, + replacementString: replacementString + ] + } + pub unsafe fn correctionCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + correctionCheckingResultWithRange: range, + replacementString: replacementString + ] + } + pub unsafe fn correctionCheckingResultWithRange_replacementString_alternativeStrings( + range: NSRange, + replacementString: &NSString, + alternativeStrings: TodoGenerics, + ) -> Id { + msg_send_id![ + Self::class(), + correctionCheckingResultWithRange: range, + replacementString: replacementString, + alternativeStrings: alternativeStrings + ] + } + pub unsafe fn regularExpressionCheckingResultWithRanges_count_regularExpression( + ranges: NSRangePointer, + count: NSUInteger, + regularExpression: &NSRegularExpression, + ) -> Id { + msg_send_id![ + Self::class(), + regularExpressionCheckingResultWithRanges: ranges, + count: count, + regularExpression: regularExpression + ] + } + pub unsafe fn phoneNumberCheckingResultWithRange_phoneNumber( + range: NSRange, + phoneNumber: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + phoneNumberCheckingResultWithRange: range, + phoneNumber: phoneNumber + ] + } + pub unsafe fn transitInformationCheckingResultWithRange_components( + range: NSRange, + components: TodoGenerics, + ) -> Id { + msg_send_id![ + Self::class(), + transitInformationCheckingResultWithRange: range, + components: components + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs new file mode 100644 index 000000000..6ca6e0024 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -0,0 +1,198 @@ +extern_class!( + #[derive(Debug)] + struct NSThread; + unsafe impl ClassType for NSThread { + type Super = NSObject; + } +); +impl NSThread { + pub unsafe fn detachNewThreadWithBlock(block: TodoBlock) { + msg_send![Self::class(), detachNewThreadWithBlock: block] + } + pub unsafe fn detachNewThreadSelector_toTarget_withObject( + selector: Sel, + target: &Object, + argument: Option<&Object>, + ) { + msg_send![ + Self::class(), + detachNewThreadSelector: selector, + toTarget: target, + withObject: argument + ] + } + pub unsafe fn isMultiThreaded() -> bool { + msg_send![Self::class(), isMultiThreaded] + } + pub unsafe fn sleepUntilDate(date: &NSDate) { + msg_send![Self::class(), sleepUntilDate: date] + } + pub unsafe fn sleepForTimeInterval(ti: NSTimeInterval) { + msg_send![Self::class(), sleepForTimeInterval: ti] + } + pub unsafe fn exit() { + msg_send![Self::class(), exit] + } + pub unsafe fn threadPriority() -> c_double { + msg_send![Self::class(), threadPriority] + } + pub unsafe fn setThreadPriority(p: c_double) -> bool { + msg_send![Self::class(), setThreadPriority: p] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithTarget_selector_object( + &self, + target: &Object, + selector: Sel, + argument: Option<&Object>, + ) -> Id { + msg_send_id![ + self, + initWithTarget: target, + selector: selector, + object: argument + ] + } + pub unsafe fn initWithBlock(&self, block: TodoBlock) -> Id { + msg_send_id![self, initWithBlock: block] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn start(&self) { + msg_send![self, start] + } + pub unsafe fn main(&self) { + msg_send![self, main] + } + pub unsafe fn currentThread() -> Id { + msg_send_id![Self::class(), currentThread] + } + pub unsafe fn threadDictionary(&self) -> Id { + msg_send_id![self, threadDictionary] + } + pub unsafe fn threadPriority(&self) -> c_double { + msg_send![self, threadPriority] + } + pub unsafe fn setThreadPriority(&self, threadPriority: c_double) { + msg_send![self, setThreadPriority: threadPriority] + } + pub unsafe fn qualityOfService(&self) -> NSQualityOfService { + msg_send![self, qualityOfService] + } + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { + msg_send![self, setQualityOfService: qualityOfService] + } + pub unsafe fn callStackReturnAddresses() -> TodoGenerics { + msg_send![Self::class(), callStackReturnAddresses] + } + pub unsafe fn callStackSymbols() -> TodoGenerics { + msg_send![Self::class(), callStackSymbols] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } + pub unsafe fn stackSize(&self) -> NSUInteger { + msg_send![self, stackSize] + } + pub unsafe fn setStackSize(&self, stackSize: NSUInteger) { + msg_send![self, setStackSize: stackSize] + } + pub unsafe fn isMainThread(&self) -> bool { + msg_send![self, isMainThread] + } + pub unsafe fn isMainThread() -> bool { + msg_send![Self::class(), isMainThread] + } + pub unsafe fn mainThread() -> Id { + msg_send_id![Self::class(), mainThread] + } + pub unsafe fn isExecuting(&self) -> bool { + msg_send![self, isExecuting] + } + pub unsafe fn isFinished(&self) -> bool { + msg_send![self, isFinished] + } + pub unsafe fn isCancelled(&self) -> bool { + msg_send![self, isCancelled] + } +} +#[doc = "NSThreadPerformAdditions"] +impl NSObject { + pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone_modes( + &self, + aSelector: Sel, + arg: Option<&Object>, + wait: bool, + array: TodoGenerics, + ) { + msg_send![ + self, + performSelectorOnMainThread: aSelector, + withObject: arg, + waitUntilDone: wait, + modes: array + ] + } + pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone( + &self, + aSelector: Sel, + arg: Option<&Object>, + wait: bool, + ) { + msg_send![ + self, + performSelectorOnMainThread: aSelector, + withObject: arg, + waitUntilDone: wait + ] + } + pub unsafe fn performSelector_onThread_withObject_waitUntilDone_modes( + &self, + aSelector: Sel, + thr: &NSThread, + arg: Option<&Object>, + wait: bool, + array: TodoGenerics, + ) { + msg_send![ + self, + performSelector: aSelector, + onThread: thr, + withObject: arg, + waitUntilDone: wait, + modes: array + ] + } + pub unsafe fn performSelector_onThread_withObject_waitUntilDone( + &self, + aSelector: Sel, + thr: &NSThread, + arg: Option<&Object>, + wait: bool, + ) { + msg_send![ + self, + performSelector: aSelector, + onThread: thr, + withObject: arg, + waitUntilDone: wait + ] + } + pub unsafe fn performSelectorInBackground_withObject( + &self, + aSelector: Sel, + arg: Option<&Object>, + ) { + msg_send![ + self, + performSelectorInBackground: aSelector, + withObject: arg + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs new file mode 100644 index 000000000..1a1d6434a --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -0,0 +1,122 @@ +extern_class!( + #[derive(Debug)] + struct NSTimeZone; + unsafe impl ClassType for NSTimeZone { + type Super = NSObject; + } +); +impl NSTimeZone { + pub unsafe fn secondsFromGMTForDate(&self, aDate: &NSDate) -> NSInteger { + msg_send![self, secondsFromGMTForDate: aDate] + } + pub unsafe fn abbreviationForDate(&self, aDate: &NSDate) -> Option> { + msg_send_id![self, abbreviationForDate: aDate] + } + pub unsafe fn isDaylightSavingTimeForDate(&self, aDate: &NSDate) -> bool { + msg_send![self, isDaylightSavingTimeForDate: aDate] + } + pub unsafe fn daylightSavingTimeOffsetForDate(&self, aDate: &NSDate) -> NSTimeInterval { + msg_send![self, daylightSavingTimeOffsetForDate: aDate] + } + pub unsafe fn nextDaylightSavingTimeTransitionAfterDate( + &self, + aDate: &NSDate, + ) -> Option> { + msg_send_id![self, nextDaylightSavingTimeTransitionAfterDate: aDate] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn data(&self) -> Id { + msg_send_id![self, data] + } +} +#[doc = "NSExtendedTimeZone"] +impl NSTimeZone { + pub unsafe fn resetSystemTimeZone() { + msg_send![Self::class(), resetSystemTimeZone] + } + pub unsafe fn abbreviationDictionary() -> TodoGenerics { + msg_send![Self::class(), abbreviationDictionary] + } + pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool { + msg_send![self, isEqualToTimeZone: aTimeZone] + } + pub unsafe fn localizedName_locale( + &self, + style: NSTimeZoneNameStyle, + locale: Option<&NSLocale>, + ) -> Option> { + msg_send_id![self, localizedName: style, locale: locale] + } + pub unsafe fn systemTimeZone() -> Id { + msg_send_id![Self::class(), systemTimeZone] + } + pub unsafe fn defaultTimeZone() -> Id { + msg_send_id![Self::class(), defaultTimeZone] + } + pub unsafe fn setDefaultTimeZone(defaultTimeZone: &NSTimeZone) { + msg_send![Self::class(), setDefaultTimeZone: defaultTimeZone] + } + pub unsafe fn localTimeZone() -> Id { + msg_send_id![Self::class(), localTimeZone] + } + pub unsafe fn knownTimeZoneNames() -> TodoGenerics { + msg_send![Self::class(), knownTimeZoneNames] + } + pub unsafe fn setAbbreviationDictionary(abbreviationDictionary: TodoGenerics) { + msg_send![ + Self::class(), + setAbbreviationDictionary: abbreviationDictionary + ] + } + pub unsafe fn timeZoneDataVersion() -> Id { + msg_send_id![Self::class(), timeZoneDataVersion] + } + pub unsafe fn secondsFromGMT(&self) -> NSInteger { + msg_send![self, secondsFromGMT] + } + pub unsafe fn abbreviation(&self) -> Option> { + msg_send_id![self, abbreviation] + } + pub unsafe fn isDaylightSavingTime(&self) -> bool { + msg_send![self, isDaylightSavingTime] + } + pub unsafe fn daylightSavingTimeOffset(&self) -> NSTimeInterval { + msg_send![self, daylightSavingTimeOffset] + } + pub unsafe fn nextDaylightSavingTimeTransition(&self) -> Option> { + msg_send_id![self, nextDaylightSavingTimeTransition] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } +} +#[doc = "NSTimeZoneCreation"] +impl NSTimeZone { + pub unsafe fn timeZoneWithName(tzName: &NSString) -> Option> { + msg_send_id![Self::class(), timeZoneWithName: tzName] + } + pub unsafe fn timeZoneWithName_data( + tzName: &NSString, + aData: Option<&NSData>, + ) -> Option> { + msg_send_id![Self::class(), timeZoneWithName: tzName, data: aData] + } + pub unsafe fn initWithName(&self, tzName: &NSString) -> Option> { + msg_send_id![self, initWithName: tzName] + } + pub unsafe fn initWithName_data( + &self, + tzName: &NSString, + aData: Option<&NSData>, + ) -> Option> { + msg_send_id![self, initWithName: tzName, data: aData] + } + pub unsafe fn timeZoneForSecondsFromGMT(seconds: NSInteger) -> Id { + msg_send_id![Self::class(), timeZoneForSecondsFromGMT: seconds] + } + pub unsafe fn timeZoneWithAbbreviation(abbreviation: &NSString) -> Option> { + msg_send_id![Self::class(), timeZoneWithAbbreviation: abbreviation] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs new file mode 100644 index 000000000..92ff51ad0 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -0,0 +1,150 @@ +extern_class!( + #[derive(Debug)] + struct NSTimer; + unsafe impl ClassType for NSTimer { + type Super = NSObject; + } +); +impl NSTimer { + pub unsafe fn timerWithTimeInterval_invocation_repeats( + ti: NSTimeInterval, + invocation: &NSInvocation, + yesOrNo: bool, + ) -> Id { + msg_send_id![ + Self::class(), + timerWithTimeInterval: ti, + invocation: invocation, + repeats: yesOrNo + ] + } + pub unsafe fn scheduledTimerWithTimeInterval_invocation_repeats( + ti: NSTimeInterval, + invocation: &NSInvocation, + yesOrNo: bool, + ) -> Id { + msg_send_id![ + Self::class(), + scheduledTimerWithTimeInterval: ti, + invocation: invocation, + repeats: yesOrNo + ] + } + pub unsafe fn timerWithTimeInterval_target_selector_userInfo_repeats( + ti: NSTimeInterval, + aTarget: &Object, + aSelector: Sel, + userInfo: Option<&Object>, + yesOrNo: bool, + ) -> Id { + msg_send_id![ + Self::class(), + timerWithTimeInterval: ti, + target: aTarget, + selector: aSelector, + userInfo: userInfo, + repeats: yesOrNo + ] + } + pub unsafe fn scheduledTimerWithTimeInterval_target_selector_userInfo_repeats( + ti: NSTimeInterval, + aTarget: &Object, + aSelector: Sel, + userInfo: Option<&Object>, + yesOrNo: bool, + ) -> Id { + msg_send_id![ + Self::class(), + scheduledTimerWithTimeInterval: ti, + target: aTarget, + selector: aSelector, + userInfo: userInfo, + repeats: yesOrNo + ] + } + pub unsafe fn timerWithTimeInterval_repeats_block( + interval: NSTimeInterval, + repeats: bool, + block: TodoBlock, + ) -> Id { + msg_send_id![ + Self::class(), + timerWithTimeInterval: interval, + repeats: repeats, + block: block + ] + } + pub unsafe fn scheduledTimerWithTimeInterval_repeats_block( + interval: NSTimeInterval, + repeats: bool, + block: TodoBlock, + ) -> Id { + msg_send_id![ + Self::class(), + scheduledTimerWithTimeInterval: interval, + repeats: repeats, + block: block + ] + } + pub unsafe fn initWithFireDate_interval_repeats_block( + &self, + date: &NSDate, + interval: NSTimeInterval, + repeats: bool, + block: TodoBlock, + ) -> Id { + msg_send_id![ + self, + initWithFireDate: date, + interval: interval, + repeats: repeats, + block: block + ] + } + pub unsafe fn initWithFireDate_interval_target_selector_userInfo_repeats( + &self, + date: &NSDate, + ti: NSTimeInterval, + t: &Object, + s: Sel, + ui: Option<&Object>, + rep: bool, + ) -> Id { + msg_send_id![ + self, + initWithFireDate: date, + interval: ti, + target: t, + selector: s, + userInfo: ui, + repeats: rep + ] + } + pub unsafe fn fire(&self) { + msg_send![self, fire] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn fireDate(&self) -> Id { + msg_send_id![self, fireDate] + } + pub unsafe fn setFireDate(&self, fireDate: &NSDate) { + msg_send![self, setFireDate: fireDate] + } + pub unsafe fn timeInterval(&self) -> NSTimeInterval { + msg_send![self, timeInterval] + } + pub unsafe fn tolerance(&self) -> NSTimeInterval { + msg_send![self, tolerance] + } + pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval) { + msg_send![self, setTolerance: tolerance] + } + pub unsafe fn isValid(&self) -> bool { + msg_send![self, isValid] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs new file mode 100644 index 000000000..61d8d3c12 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -0,0 +1,773 @@ +extern_class!( + #[derive(Debug)] + struct NSURL; + unsafe impl ClassType for NSURL { + type Super = NSObject; + } +); +impl NSURL { + pub unsafe fn initWithScheme_host_path( + &self, + scheme: &NSString, + host: Option<&NSString>, + path: &NSString, + ) -> Option> { + msg_send_id![self, initWithScheme: scheme, host: host, path: path] + } + pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL( + &self, + path: &NSString, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + self, + initFileURLWithPath: path, + isDirectory: isDir, + relativeToURL: baseURL + ] + } + pub unsafe fn initFileURLWithPath_relativeToURL( + &self, + path: &NSString, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![self, initFileURLWithPath: path, relativeToURL: baseURL] + } + pub unsafe fn initFileURLWithPath_isDirectory( + &self, + path: &NSString, + isDir: bool, + ) -> Id { + msg_send_id![self, initFileURLWithPath: path, isDirectory: isDir] + } + pub unsafe fn initFileURLWithPath(&self, path: &NSString) -> Id { + msg_send_id![self, initFileURLWithPath: path] + } + pub unsafe fn fileURLWithPath_isDirectory_relativeToURL( + path: &NSString, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + Self::class(), + fileURLWithPath: path, + isDirectory: isDir, + relativeToURL: baseURL + ] + } + pub unsafe fn fileURLWithPath_relativeToURL( + path: &NSString, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![Self::class(), fileURLWithPath: path, relativeToURL: baseURL] + } + pub unsafe fn fileURLWithPath_isDirectory(path: &NSString, isDir: bool) -> Id { + msg_send_id![Self::class(), fileURLWithPath: path, isDirectory: isDir] + } + pub unsafe fn fileURLWithPath(path: &NSString) -> Id { + msg_send_id![Self::class(), fileURLWithPath: path] + } + pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL( + &self, + path: NonNull, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + self, + initFileURLWithFileSystemRepresentation: path, + isDirectory: isDir, + relativeToURL: baseURL + ] + } + pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL( + path: NonNull, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + Self::class(), + fileURLWithFileSystemRepresentation: path, + isDirectory: isDir, + relativeToURL: baseURL + ] + } + pub unsafe fn initWithString(&self, URLString: &NSString) -> Option> { + msg_send_id![self, initWithString: URLString] + } + pub unsafe fn initWithString_relativeToURL( + &self, + URLString: &NSString, + baseURL: Option<&NSURL>, + ) -> Option> { + msg_send_id![self, initWithString: URLString, relativeToURL: baseURL] + } + pub unsafe fn URLWithString(URLString: &NSString) -> Option> { + msg_send_id![Self::class(), URLWithString: URLString] + } + pub unsafe fn URLWithString_relativeToURL( + URLString: &NSString, + baseURL: Option<&NSURL>, + ) -> Option> { + msg_send_id![ + Self::class(), + URLWithString: URLString, + relativeToURL: baseURL + ] + } + pub unsafe fn initWithDataRepresentation_relativeToURL( + &self, + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + self, + initWithDataRepresentation: data, + relativeToURL: baseURL + ] + } + pub unsafe fn URLWithDataRepresentation_relativeToURL( + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + Self::class(), + URLWithDataRepresentation: data, + relativeToURL: baseURL + ] + } + pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL( + &self, + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + self, + initAbsoluteURLWithDataRepresentation: data, + relativeToURL: baseURL + ] + } + pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL( + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + Self::class(), + absoluteURLWithDataRepresentation: data, + relativeToURL: baseURL + ] + } + pub unsafe fn getFileSystemRepresentation_maxLength( + &self, + buffer: NonNull, + maxBufferLength: NSUInteger, + ) -> bool { + msg_send![ + self, + getFileSystemRepresentation: buffer, + maxLength: maxBufferLength + ] + } + pub unsafe fn checkResourceIsReachableAndReturnError( + &self, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, checkResourceIsReachableAndReturnError: error] + } + pub unsafe fn isFileReferenceURL(&self) -> bool { + msg_send![self, isFileReferenceURL] + } + pub unsafe fn fileReferenceURL(&self) -> Option> { + msg_send_id![self, fileReferenceURL] + } + pub unsafe fn getResourceValue_forKey_error( + &self, + value: NonNull>, + key: NSURLResourceKey, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, getResourceValue: value, forKey: key, error: error] + } + pub unsafe fn resourceValuesForKeys_error( + &self, + keys: TodoGenerics, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![self, resourceValuesForKeys: keys, error: error] + } + pub unsafe fn setResourceValue_forKey_error( + &self, + value: Option<&Object>, + key: NSURLResourceKey, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, setResourceValue: value, forKey: key, error: error] + } + pub unsafe fn setResourceValues_error( + &self, + keyedValues: TodoGenerics, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, setResourceValues: keyedValues, error: error] + } + pub unsafe fn removeCachedResourceValueForKey(&self, key: NSURLResourceKey) { + msg_send![self, removeCachedResourceValueForKey: key] + } + pub unsafe fn removeAllCachedResourceValues(&self) { + msg_send![self, removeAllCachedResourceValues] + } + pub unsafe fn setTemporaryResourceValue_forKey( + &self, + value: Option<&Object>, + key: NSURLResourceKey, + ) { + msg_send![self, setTemporaryResourceValue: value, forKey: key] + } + pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error( + &self, + options: NSURLBookmarkCreationOptions, + keys: TodoGenerics, + relativeURL: Option<&NSURL>, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + bookmarkDataWithOptions: options, + includingResourceValuesForKeys: keys, + relativeToURL: relativeURL, + error: error + ] + } + pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( + &self, + bookmarkData: &NSData, + options: NSURLBookmarkResolutionOptions, + relativeURL: Option<&NSURL>, + isStale: *mut bool, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initByResolvingBookmarkData: bookmarkData, + options: options, + relativeToURL: relativeURL, + bookmarkDataIsStale: isStale, + error: error + ] + } + pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( + bookmarkData: &NSData, + options: NSURLBookmarkResolutionOptions, + relativeURL: Option<&NSURL>, + isStale: *mut bool, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + URLByResolvingBookmarkData: bookmarkData, + options: options, + relativeToURL: relativeURL, + bookmarkDataIsStale: isStale, + error: error + ] + } + pub unsafe fn resourceValuesForKeys_fromBookmarkData( + keys: TodoGenerics, + bookmarkData: &NSData, + ) -> TodoGenerics { + msg_send![ + Self::class(), + resourceValuesForKeys: keys, + fromBookmarkData: bookmarkData + ] + } + pub unsafe fn writeBookmarkData_toURL_options_error( + bookmarkData: &NSData, + bookmarkFileURL: &NSURL, + options: NSURLBookmarkFileCreationOptions, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + Self::class(), + writeBookmarkData: bookmarkData, + toURL: bookmarkFileURL, + options: options, + error: error + ] + } + pub unsafe fn bookmarkDataWithContentsOfURL_error( + bookmarkFileURL: &NSURL, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + bookmarkDataWithContentsOfURL: bookmarkFileURL, + error: error + ] + } + pub unsafe fn URLByResolvingAliasFileAtURL_options_error( + url: &NSURL, + options: NSURLBookmarkResolutionOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + URLByResolvingAliasFileAtURL: url, + options: options, + error: error + ] + } + pub unsafe fn startAccessingSecurityScopedResource(&self) -> bool { + msg_send![self, startAccessingSecurityScopedResource] + } + pub unsafe fn stopAccessingSecurityScopedResource(&self) { + msg_send![self, stopAccessingSecurityScopedResource] + } + pub unsafe fn dataRepresentation(&self) -> Id { + msg_send_id![self, dataRepresentation] + } + pub unsafe fn absoluteString(&self) -> Option> { + msg_send_id![self, absoluteString] + } + pub unsafe fn relativeString(&self) -> Id { + msg_send_id![self, relativeString] + } + pub unsafe fn baseURL(&self) -> Option> { + msg_send_id![self, baseURL] + } + pub unsafe fn absoluteURL(&self) -> Option> { + msg_send_id![self, absoluteURL] + } + pub unsafe fn scheme(&self) -> Option> { + msg_send_id![self, scheme] + } + pub unsafe fn resourceSpecifier(&self) -> Option> { + msg_send_id![self, resourceSpecifier] + } + pub unsafe fn host(&self) -> Option> { + msg_send_id![self, host] + } + pub unsafe fn port(&self) -> Option> { + msg_send_id![self, port] + } + pub unsafe fn user(&self) -> Option> { + msg_send_id![self, user] + } + pub unsafe fn password(&self) -> Option> { + msg_send_id![self, password] + } + pub unsafe fn path(&self) -> Option> { + msg_send_id![self, path] + } + pub unsafe fn fragment(&self) -> Option> { + msg_send_id![self, fragment] + } + pub unsafe fn parameterString(&self) -> Option> { + msg_send_id![self, parameterString] + } + pub unsafe fn query(&self) -> Option> { + msg_send_id![self, query] + } + pub unsafe fn relativePath(&self) -> Option> { + msg_send_id![self, relativePath] + } + pub unsafe fn hasDirectoryPath(&self) -> bool { + msg_send![self, hasDirectoryPath] + } + pub unsafe fn fileSystemRepresentation(&self) -> NonNull { + msg_send![self, fileSystemRepresentation] + } + pub unsafe fn isFileURL(&self) -> bool { + msg_send![self, isFileURL] + } + pub unsafe fn standardizedURL(&self) -> Option> { + msg_send_id![self, standardizedURL] + } + pub unsafe fn filePathURL(&self) -> Option> { + msg_send_id![self, filePathURL] + } +} +#[doc = "NSPromisedItems"] +impl NSURL { + pub unsafe fn getPromisedItemResourceValue_forKey_error( + &self, + value: NonNull>, + key: NSURLResourceKey, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + getPromisedItemResourceValue: value, + forKey: key, + error: error + ] + } + pub unsafe fn promisedItemResourceValuesForKeys_error( + &self, + keys: TodoGenerics, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![self, promisedItemResourceValuesForKeys: keys, error: error] + } + pub unsafe fn checkPromisedItemIsReachableAndReturnError( + &self, + error: *mut Option<&NSError>, + ) -> bool { + msg_send![self, checkPromisedItemIsReachableAndReturnError: error] + } +} +#[doc = "NSItemProvider"] +impl NSURL {} +extern_class!( + #[derive(Debug)] + struct NSURLQueryItem; + unsafe impl ClassType for NSURLQueryItem { + type Super = NSObject; + } +); +impl NSURLQueryItem { + pub unsafe fn initWithName_value( + &self, + name: &NSString, + value: Option<&NSString>, + ) -> Id { + msg_send_id![self, initWithName: name, value: value] + } + pub unsafe fn queryItemWithName_value( + name: &NSString, + value: Option<&NSString>, + ) -> Id { + msg_send_id![Self::class(), queryItemWithName: name, value: value] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn value(&self) -> Option> { + msg_send_id![self, value] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLComponents; + unsafe impl ClassType for NSURLComponents { + type Super = NSObject; + } +); +impl NSURLComponents { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithURL_resolvingAgainstBaseURL( + &self, + url: &NSURL, + resolve: bool, + ) -> Option> { + msg_send_id![self, initWithURL: url, resolvingAgainstBaseURL: resolve] + } + pub unsafe fn componentsWithURL_resolvingAgainstBaseURL( + url: &NSURL, + resolve: bool, + ) -> Option> { + msg_send_id![ + Self::class(), + componentsWithURL: url, + resolvingAgainstBaseURL: resolve + ] + } + pub unsafe fn initWithString(&self, URLString: &NSString) -> Option> { + msg_send_id![self, initWithString: URLString] + } + pub unsafe fn componentsWithString(URLString: &NSString) -> Option> { + msg_send_id![Self::class(), componentsWithString: URLString] + } + pub unsafe fn URLRelativeToURL(&self, baseURL: Option<&NSURL>) -> Option> { + msg_send_id![self, URLRelativeToURL: baseURL] + } + pub unsafe fn URL(&self) -> Option> { + msg_send_id![self, URL] + } + pub unsafe fn string(&self) -> Option> { + msg_send_id![self, string] + } + pub unsafe fn scheme(&self) -> Option> { + msg_send_id![self, scheme] + } + pub unsafe fn setScheme(&self, scheme: Option<&NSString>) { + msg_send![self, setScheme: scheme] + } + pub unsafe fn user(&self) -> Option> { + msg_send_id![self, user] + } + pub unsafe fn setUser(&self, user: Option<&NSString>) { + msg_send![self, setUser: user] + } + pub unsafe fn password(&self) -> Option> { + msg_send_id![self, password] + } + pub unsafe fn setPassword(&self, password: Option<&NSString>) { + msg_send![self, setPassword: password] + } + pub unsafe fn host(&self) -> Option> { + msg_send_id![self, host] + } + pub unsafe fn setHost(&self, host: Option<&NSString>) { + msg_send![self, setHost: host] + } + pub unsafe fn port(&self) -> Option> { + msg_send_id![self, port] + } + pub unsafe fn setPort(&self, port: Option<&NSNumber>) { + msg_send![self, setPort: port] + } + pub unsafe fn path(&self) -> Option> { + msg_send_id![self, path] + } + pub unsafe fn setPath(&self, path: Option<&NSString>) { + msg_send![self, setPath: path] + } + pub unsafe fn query(&self) -> Option> { + msg_send_id![self, query] + } + pub unsafe fn setQuery(&self, query: Option<&NSString>) { + msg_send![self, setQuery: query] + } + pub unsafe fn fragment(&self) -> Option> { + msg_send_id![self, fragment] + } + pub unsafe fn setFragment(&self, fragment: Option<&NSString>) { + msg_send![self, setFragment: fragment] + } + pub unsafe fn percentEncodedUser(&self) -> Option> { + msg_send_id![self, percentEncodedUser] + } + pub unsafe fn setPercentEncodedUser(&self, percentEncodedUser: Option<&NSString>) { + msg_send![self, setPercentEncodedUser: percentEncodedUser] + } + pub unsafe fn percentEncodedPassword(&self) -> Option> { + msg_send_id![self, percentEncodedPassword] + } + pub unsafe fn setPercentEncodedPassword(&self, percentEncodedPassword: Option<&NSString>) { + msg_send![self, setPercentEncodedPassword: percentEncodedPassword] + } + pub unsafe fn percentEncodedHost(&self) -> Option> { + msg_send_id![self, percentEncodedHost] + } + pub unsafe fn setPercentEncodedHost(&self, percentEncodedHost: Option<&NSString>) { + msg_send![self, setPercentEncodedHost: percentEncodedHost] + } + pub unsafe fn percentEncodedPath(&self) -> Option> { + msg_send_id![self, percentEncodedPath] + } + pub unsafe fn setPercentEncodedPath(&self, percentEncodedPath: Option<&NSString>) { + msg_send![self, setPercentEncodedPath: percentEncodedPath] + } + pub unsafe fn percentEncodedQuery(&self) -> Option> { + msg_send_id![self, percentEncodedQuery] + } + pub unsafe fn setPercentEncodedQuery(&self, percentEncodedQuery: Option<&NSString>) { + msg_send![self, setPercentEncodedQuery: percentEncodedQuery] + } + pub unsafe fn percentEncodedFragment(&self) -> Option> { + msg_send_id![self, percentEncodedFragment] + } + pub unsafe fn setPercentEncodedFragment(&self, percentEncodedFragment: Option<&NSString>) { + msg_send![self, setPercentEncodedFragment: percentEncodedFragment] + } + pub unsafe fn rangeOfScheme(&self) -> NSRange { + msg_send![self, rangeOfScheme] + } + pub unsafe fn rangeOfUser(&self) -> NSRange { + msg_send![self, rangeOfUser] + } + pub unsafe fn rangeOfPassword(&self) -> NSRange { + msg_send![self, rangeOfPassword] + } + pub unsafe fn rangeOfHost(&self) -> NSRange { + msg_send![self, rangeOfHost] + } + pub unsafe fn rangeOfPort(&self) -> NSRange { + msg_send![self, rangeOfPort] + } + pub unsafe fn rangeOfPath(&self) -> NSRange { + msg_send![self, rangeOfPath] + } + pub unsafe fn rangeOfQuery(&self) -> NSRange { + msg_send![self, rangeOfQuery] + } + pub unsafe fn rangeOfFragment(&self) -> NSRange { + msg_send![self, rangeOfFragment] + } + pub unsafe fn queryItems(&self) -> TodoGenerics { + msg_send![self, queryItems] + } + pub unsafe fn setQueryItems(&self, queryItems: TodoGenerics) { + msg_send![self, setQueryItems: queryItems] + } + pub unsafe fn percentEncodedQueryItems(&self) -> TodoGenerics { + msg_send![self, percentEncodedQueryItems] + } + pub unsafe fn setPercentEncodedQueryItems(&self, percentEncodedQueryItems: TodoGenerics) { + msg_send![self, setPercentEncodedQueryItems: percentEncodedQueryItems] + } +} +#[doc = "NSURLUtilities"] +impl NSCharacterSet { + pub unsafe fn URLUserAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLUserAllowedCharacterSet] + } + pub unsafe fn URLPasswordAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLPasswordAllowedCharacterSet] + } + pub unsafe fn URLHostAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLHostAllowedCharacterSet] + } + pub unsafe fn URLPathAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLPathAllowedCharacterSet] + } + pub unsafe fn URLQueryAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLQueryAllowedCharacterSet] + } + pub unsafe fn URLFragmentAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLFragmentAllowedCharacterSet] + } +} +#[doc = "NSURLUtilities"] +impl NSString { + pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters( + &self, + allowedCharacters: &NSCharacterSet, + ) -> Option> { + msg_send_id![ + self, + stringByAddingPercentEncodingWithAllowedCharacters: allowedCharacters + ] + } + pub unsafe fn stringByAddingPercentEscapesUsingEncoding( + &self, + enc: NSStringEncoding, + ) -> Option> { + msg_send_id![self, stringByAddingPercentEscapesUsingEncoding: enc] + } + pub unsafe fn stringByReplacingPercentEscapesUsingEncoding( + &self, + enc: NSStringEncoding, + ) -> Option> { + msg_send_id![self, stringByReplacingPercentEscapesUsingEncoding: enc] + } + pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option> { + msg_send_id![self, stringByRemovingPercentEncoding] + } +} +#[doc = "NSURLPathUtilities"] +impl NSURL { + pub unsafe fn fileURLWithPathComponents(components: TodoGenerics) -> Option> { + msg_send_id![Self::class(), fileURLWithPathComponents: components] + } + pub unsafe fn URLByAppendingPathComponent( + &self, + pathComponent: &NSString, + ) -> Option> { + msg_send_id![self, URLByAppendingPathComponent: pathComponent] + } + pub unsafe fn URLByAppendingPathComponent_isDirectory( + &self, + pathComponent: &NSString, + isDirectory: bool, + ) -> Option> { + msg_send_id![ + self, + URLByAppendingPathComponent: pathComponent, + isDirectory: isDirectory + ] + } + pub unsafe fn URLByAppendingPathExtension( + &self, + pathExtension: &NSString, + ) -> Option> { + msg_send_id![self, URLByAppendingPathExtension: pathExtension] + } + pub unsafe fn pathComponents(&self) -> TodoGenerics { + msg_send![self, pathComponents] + } + pub unsafe fn lastPathComponent(&self) -> Option> { + msg_send_id![self, lastPathComponent] + } + pub unsafe fn pathExtension(&self) -> Option> { + msg_send_id![self, pathExtension] + } + pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option> { + msg_send_id![self, URLByDeletingLastPathComponent] + } + pub unsafe fn URLByDeletingPathExtension(&self) -> Option> { + msg_send_id![self, URLByDeletingPathExtension] + } + pub unsafe fn URLByStandardizingPath(&self) -> Option> { + msg_send_id![self, URLByStandardizingPath] + } + pub unsafe fn URLByResolvingSymlinksInPath(&self) -> Option> { + msg_send_id![self, URLByResolvingSymlinksInPath] + } +} +extern_class!( + #[derive(Debug)] + struct NSFileSecurity; + unsafe impl ClassType for NSFileSecurity { + type Super = NSObject; + } +); +impl NSFileSecurity { + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } +} +#[doc = "NSURLClient"] +impl NSObject { + pub unsafe fn URL_resourceDataDidBecomeAvailable(&self, sender: &NSURL, newBytes: &NSData) { + msg_send![self, URL: sender, resourceDataDidBecomeAvailable: newBytes] + } + pub unsafe fn URLResourceDidFinishLoading(&self, sender: &NSURL) { + msg_send![self, URLResourceDidFinishLoading: sender] + } + pub unsafe fn URLResourceDidCancelLoading(&self, sender: &NSURL) { + msg_send![self, URLResourceDidCancelLoading: sender] + } + pub unsafe fn URL_resourceDidFailLoadingWithReason(&self, sender: &NSURL, reason: &NSString) { + msg_send![self, URL: sender, resourceDidFailLoadingWithReason: reason] + } +} +#[doc = "NSURLLoading"] +impl NSURL { + pub unsafe fn resourceDataUsingCache( + &self, + shouldUseCache: bool, + ) -> Option> { + msg_send_id![self, resourceDataUsingCache: shouldUseCache] + } + pub unsafe fn loadResourceDataNotifyingClient_usingCache( + &self, + client: &Object, + shouldUseCache: bool, + ) { + msg_send![ + self, + loadResourceDataNotifyingClient: client, + usingCache: shouldUseCache + ] + } + pub unsafe fn propertyForKey(&self, propertyKey: &NSString) -> Option> { + msg_send_id![self, propertyForKey: propertyKey] + } + pub unsafe fn setResourceData(&self, data: &NSData) -> bool { + msg_send![self, setResourceData: data] + } + pub unsafe fn setProperty_forKey(&self, property: &Object, propertyKey: &NSString) -> bool { + msg_send![self, setProperty: property, forKey: propertyKey] + } + pub unsafe fn URLHandleUsingCache( + &self, + shouldUseCache: bool, + ) -> Option> { + msg_send_id![self, URLHandleUsingCache: shouldUseCache] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs new file mode 100644 index 000000000..ec9affe56 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -0,0 +1,57 @@ +extern_class!( + #[derive(Debug)] + struct NSURLAuthenticationChallenge; + unsafe impl ClassType for NSURLAuthenticationChallenge { + type Super = NSObject; + } +); +impl NSURLAuthenticationChallenge { + pub unsafe fn initWithProtectionSpace_proposedCredential_previousFailureCount_failureResponse_error_sender( + &self, + space: &NSURLProtectionSpace, + credential: Option<&NSURLCredential>, + previousFailureCount: NSInteger, + response: Option<&NSURLResponse>, + error: Option<&NSError>, + sender: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + initWithProtectionSpace: space, + proposedCredential: credential, + previousFailureCount: previousFailureCount, + failureResponse: response, + error: error, + sender: sender + ] + } + pub unsafe fn initWithAuthenticationChallenge_sender( + &self, + challenge: &NSURLAuthenticationChallenge, + sender: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + initWithAuthenticationChallenge: challenge, + sender: sender + ] + } + pub unsafe fn protectionSpace(&self) -> Id { + msg_send_id![self, protectionSpace] + } + pub unsafe fn proposedCredential(&self) -> Option> { + msg_send_id![self, proposedCredential] + } + pub unsafe fn previousFailureCount(&self) -> NSInteger { + msg_send![self, previousFailureCount] + } + pub unsafe fn failureResponse(&self) -> Option> { + msg_send_id![self, failureResponse] + } + pub unsafe fn error(&self) -> Option> { + msg_send_id![self, error] + } + pub unsafe fn sender(&self) -> TodoGenerics { + msg_send![self, sender] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs new file mode 100644 index 000000000..67b4d4144 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -0,0 +1,156 @@ +extern_class!( + #[derive(Debug)] + struct NSCachedURLResponse; + unsafe impl ClassType for NSCachedURLResponse { + type Super = NSObject; + } +); +impl NSCachedURLResponse { + pub unsafe fn initWithResponse_data( + &self, + response: &NSURLResponse, + data: &NSData, + ) -> Id { + msg_send_id![self, initWithResponse: response, data: data] + } + pub unsafe fn initWithResponse_data_userInfo_storagePolicy( + &self, + response: &NSURLResponse, + data: &NSData, + userInfo: Option<&NSDictionary>, + storagePolicy: NSURLCacheStoragePolicy, + ) -> Id { + msg_send_id![ + self, + initWithResponse: response, + data: data, + userInfo: userInfo, + storagePolicy: storagePolicy + ] + } + pub unsafe fn response(&self) -> Id { + msg_send_id![self, response] + } + pub unsafe fn data(&self) -> Id { + msg_send_id![self, data] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } + pub unsafe fn storagePolicy(&self) -> NSURLCacheStoragePolicy { + msg_send![self, storagePolicy] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLCache; + unsafe impl ClassType for NSURLCache { + type Super = NSObject; + } +); +impl NSURLCache { + pub unsafe fn initWithMemoryCapacity_diskCapacity_diskPath( + &self, + memoryCapacity: NSUInteger, + diskCapacity: NSUInteger, + path: Option<&NSString>, + ) -> Id { + msg_send_id![ + self, + initWithMemoryCapacity: memoryCapacity, + diskCapacity: diskCapacity, + diskPath: path + ] + } + pub unsafe fn initWithMemoryCapacity_diskCapacity_directoryURL( + &self, + memoryCapacity: NSUInteger, + diskCapacity: NSUInteger, + directoryURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + self, + initWithMemoryCapacity: memoryCapacity, + diskCapacity: diskCapacity, + directoryURL: directoryURL + ] + } + pub unsafe fn cachedResponseForRequest( + &self, + request: &NSURLRequest, + ) -> Option> { + msg_send_id![self, cachedResponseForRequest: request] + } + pub unsafe fn storeCachedResponse_forRequest( + &self, + cachedResponse: &NSCachedURLResponse, + request: &NSURLRequest, + ) { + msg_send![ + self, + storeCachedResponse: cachedResponse, + forRequest: request + ] + } + pub unsafe fn removeCachedResponseForRequest(&self, request: &NSURLRequest) { + msg_send![self, removeCachedResponseForRequest: request] + } + pub unsafe fn removeAllCachedResponses(&self) { + msg_send![self, removeAllCachedResponses] + } + pub unsafe fn removeCachedResponsesSinceDate(&self, date: &NSDate) { + msg_send![self, removeCachedResponsesSinceDate: date] + } + pub unsafe fn sharedURLCache() -> Id { + msg_send_id![Self::class(), sharedURLCache] + } + pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache) { + msg_send![Self::class(), setSharedURLCache: sharedURLCache] + } + pub unsafe fn memoryCapacity(&self) -> NSUInteger { + msg_send![self, memoryCapacity] + } + pub unsafe fn setMemoryCapacity(&self, memoryCapacity: NSUInteger) { + msg_send![self, setMemoryCapacity: memoryCapacity] + } + pub unsafe fn diskCapacity(&self) -> NSUInteger { + msg_send![self, diskCapacity] + } + pub unsafe fn setDiskCapacity(&self, diskCapacity: NSUInteger) { + msg_send![self, setDiskCapacity: diskCapacity] + } + pub unsafe fn currentMemoryUsage(&self) -> NSUInteger { + msg_send![self, currentMemoryUsage] + } + pub unsafe fn currentDiskUsage(&self) -> NSUInteger { + msg_send![self, currentDiskUsage] + } +} +#[doc = "NSURLSessionTaskAdditions"] +impl NSURLCache { + pub unsafe fn storeCachedResponse_forDataTask( + &self, + cachedResponse: &NSCachedURLResponse, + dataTask: &NSURLSessionDataTask, + ) { + msg_send![ + self, + storeCachedResponse: cachedResponse, + forDataTask: dataTask + ] + } + pub unsafe fn getCachedResponseForDataTask_completionHandler( + &self, + dataTask: &NSURLSessionDataTask, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getCachedResponseForDataTask: dataTask, + completionHandler: completionHandler + ] + } + pub unsafe fn removeCachedResponseForDataTask(&self, dataTask: &NSURLSessionDataTask) { + msg_send![self, removeCachedResponseForDataTask: dataTask] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs new file mode 100644 index 000000000..784778bd8 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -0,0 +1,93 @@ +extern_class!( + #[derive(Debug)] + struct NSURLConnection; + unsafe impl ClassType for NSURLConnection { + type Super = NSObject; + } +); +impl NSURLConnection { + pub unsafe fn initWithRequest_delegate_startImmediately( + &self, + request: &NSURLRequest, + delegate: Option<&Object>, + startImmediately: bool, + ) -> Option> { + msg_send_id![ + self, + initWithRequest: request, + delegate: delegate, + startImmediately: startImmediately + ] + } + pub unsafe fn initWithRequest_delegate( + &self, + request: &NSURLRequest, + delegate: Option<&Object>, + ) -> Option> { + msg_send_id![self, initWithRequest: request, delegate: delegate] + } + pub unsafe fn connectionWithRequest_delegate( + request: &NSURLRequest, + delegate: Option<&Object>, + ) -> Option> { + msg_send_id![ + Self::class(), + connectionWithRequest: request, + delegate: delegate + ] + } + pub unsafe fn start(&self) { + msg_send![self, start] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn unscheduleFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + msg_send![self, unscheduleFromRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn setDelegateQueue(&self, queue: Option<&NSOperationQueue>) { + msg_send![self, setDelegateQueue: queue] + } + pub unsafe fn canHandleRequest(request: &NSURLRequest) -> bool { + msg_send![Self::class(), canHandleRequest: request] + } + pub unsafe fn originalRequest(&self) -> Id { + msg_send_id![self, originalRequest] + } + pub unsafe fn currentRequest(&self) -> Id { + msg_send_id![self, currentRequest] + } +} +#[doc = "NSURLConnectionSynchronousLoading"] +impl NSURLConnection { + pub unsafe fn sendSynchronousRequest_returningResponse_error( + request: &NSURLRequest, + response: *mut Option<&NSURLResponse>, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + Self::class(), + sendSynchronousRequest: request, + returningResponse: response, + error: error + ] + } +} +#[doc = "NSURLConnectionQueuedLoading"] +impl NSURLConnection { + pub unsafe fn sendAsynchronousRequest_queue_completionHandler( + request: &NSURLRequest, + queue: &NSOperationQueue, + handler: TodoBlock, + ) { + msg_send![ + Self::class(), + sendAsynchronousRequest: request, + queue: queue, + completionHandler: handler + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs new file mode 100644 index 000000000..f449b0253 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -0,0 +1,92 @@ +extern_class!( + #[derive(Debug)] + struct NSURLCredential; + unsafe impl ClassType for NSURLCredential { + type Super = NSObject; + } +); +impl NSURLCredential { + pub unsafe fn persistence(&self) -> NSURLCredentialPersistence { + msg_send![self, persistence] + } +} +#[doc = "NSInternetPassword"] +impl NSURLCredential { + pub unsafe fn initWithUser_password_persistence( + &self, + user: &NSString, + password: &NSString, + persistence: NSURLCredentialPersistence, + ) -> Id { + msg_send_id![ + self, + initWithUser: user, + password: password, + persistence: persistence + ] + } + pub unsafe fn credentialWithUser_password_persistence( + user: &NSString, + password: &NSString, + persistence: NSURLCredentialPersistence, + ) -> Id { + msg_send_id![ + Self::class(), + credentialWithUser: user, + password: password, + persistence: persistence + ] + } + pub unsafe fn user(&self) -> Option> { + msg_send_id![self, user] + } + pub unsafe fn password(&self) -> Option> { + msg_send_id![self, password] + } + pub unsafe fn hasPassword(&self) -> bool { + msg_send![self, hasPassword] + } +} +#[doc = "NSClientCertificate"] +impl NSURLCredential { + pub unsafe fn initWithIdentity_certificates_persistence( + &self, + identity: SecIdentityRef, + certArray: Option<&NSArray>, + persistence: NSURLCredentialPersistence, + ) -> Id { + msg_send_id![ + self, + initWithIdentity: identity, + certificates: certArray, + persistence: persistence + ] + } + pub unsafe fn credentialWithIdentity_certificates_persistence( + identity: SecIdentityRef, + certArray: Option<&NSArray>, + persistence: NSURLCredentialPersistence, + ) -> Id { + msg_send_id![ + Self::class(), + credentialWithIdentity: identity, + certificates: certArray, + persistence: persistence + ] + } + pub unsafe fn identity(&self) -> SecIdentityRef { + msg_send![self, identity] + } + pub unsafe fn certificates(&self) -> Id { + msg_send_id![self, certificates] + } +} +#[doc = "NSServerTrust"] +impl NSURLCredential { + pub unsafe fn initWithTrust(&self, trust: SecTrustRef) -> Id { + msg_send_id![self, initWithTrust: trust] + } + pub unsafe fn credentialForTrust(trust: SecTrustRef) -> Id { + msg_send_id![Self::class(), credentialForTrust: trust] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs new file mode 100644 index 000000000..e8f38bf7f --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -0,0 +1,139 @@ +extern_class!( + #[derive(Debug)] + struct NSURLCredentialStorage; + unsafe impl ClassType for NSURLCredentialStorage { + type Super = NSObject; + } +); +impl NSURLCredentialStorage { + pub unsafe fn credentialsForProtectionSpace( + &self, + space: &NSURLProtectionSpace, + ) -> TodoGenerics { + msg_send![self, credentialsForProtectionSpace: space] + } + pub unsafe fn setCredential_forProtectionSpace( + &self, + credential: &NSURLCredential, + space: &NSURLProtectionSpace, + ) { + msg_send![self, setCredential: credential, forProtectionSpace: space] + } + pub unsafe fn removeCredential_forProtectionSpace( + &self, + credential: &NSURLCredential, + space: &NSURLProtectionSpace, + ) { + msg_send![ + self, + removeCredential: credential, + forProtectionSpace: space + ] + } + pub unsafe fn removeCredential_forProtectionSpace_options( + &self, + credential: &NSURLCredential, + space: &NSURLProtectionSpace, + options: TodoGenerics, + ) { + msg_send![ + self, + removeCredential: credential, + forProtectionSpace: space, + options: options + ] + } + pub unsafe fn defaultCredentialForProtectionSpace( + &self, + space: &NSURLProtectionSpace, + ) -> Option> { + msg_send_id![self, defaultCredentialForProtectionSpace: space] + } + pub unsafe fn setDefaultCredential_forProtectionSpace( + &self, + credential: &NSURLCredential, + space: &NSURLProtectionSpace, + ) { + msg_send![ + self, + setDefaultCredential: credential, + forProtectionSpace: space + ] + } + pub unsafe fn sharedCredentialStorage() -> Id { + msg_send_id![Self::class(), sharedCredentialStorage] + } + pub unsafe fn allCredentials(&self) -> TodoGenerics { + msg_send![self, allCredentials] + } +} +#[doc = "NSURLSessionTaskAdditions"] +impl NSURLCredentialStorage { + pub unsafe fn getCredentialsForProtectionSpace_task_completionHandler( + &self, + protectionSpace: &NSURLProtectionSpace, + task: &NSURLSessionTask, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getCredentialsForProtectionSpace: protectionSpace, + task: task, + completionHandler: completionHandler + ] + } + pub unsafe fn setCredential_forProtectionSpace_task( + &self, + credential: &NSURLCredential, + protectionSpace: &NSURLProtectionSpace, + task: &NSURLSessionTask, + ) { + msg_send![ + self, + setCredential: credential, + forProtectionSpace: protectionSpace, + task: task + ] + } + pub unsafe fn removeCredential_forProtectionSpace_options_task( + &self, + credential: &NSURLCredential, + protectionSpace: &NSURLProtectionSpace, + options: TodoGenerics, + task: &NSURLSessionTask, + ) { + msg_send![ + self, + removeCredential: credential, + forProtectionSpace: protectionSpace, + options: options, + task: task + ] + } + pub unsafe fn getDefaultCredentialForProtectionSpace_task_completionHandler( + &self, + space: &NSURLProtectionSpace, + task: &NSURLSessionTask, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getDefaultCredentialForProtectionSpace: space, + task: task, + completionHandler: completionHandler + ] + } + pub unsafe fn setDefaultCredential_forProtectionSpace_task( + &self, + credential: &NSURLCredential, + protectionSpace: &NSURLProtectionSpace, + task: &NSURLSessionTask, + ) { + msg_send![ + self, + setDefaultCredential: credential, + forProtectionSpace: protectionSpace, + task: task + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs new file mode 100644 index 000000000..fdbf78a18 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -0,0 +1,53 @@ +extern_class!( + #[derive(Debug)] + struct NSURLDownload; + unsafe impl ClassType for NSURLDownload { + type Super = NSObject; + } +); +impl NSURLDownload { + pub unsafe fn canResumeDownloadDecodedWithEncodingMIMEType(MIMEType: &NSString) -> bool { + msg_send![ + Self::class(), + canResumeDownloadDecodedWithEncodingMIMEType: MIMEType + ] + } + pub unsafe fn initWithRequest_delegate( + &self, + request: &NSURLRequest, + delegate: TodoGenerics, + ) -> Id { + msg_send_id![self, initWithRequest: request, delegate: delegate] + } + pub unsafe fn initWithResumeData_delegate_path( + &self, + resumeData: &NSData, + delegate: TodoGenerics, + path: &NSString, + ) -> Id { + msg_send_id![ + self, + initWithResumeData: resumeData, + delegate: delegate, + path: path + ] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn setDestination_allowOverwrite(&self, path: &NSString, allowOverwrite: bool) { + msg_send![self, setDestination: path, allowOverwrite: allowOverwrite] + } + pub unsafe fn request(&self) -> Id { + msg_send_id![self, request] + } + pub unsafe fn resumeData(&self) -> Option> { + msg_send_id![self, resumeData] + } + pub unsafe fn deletesFileUponFailure(&self) -> bool { + msg_send![self, deletesFileUponFailure] + } + pub unsafe fn setDeletesFileUponFailure(&self, deletesFileUponFailure: bool) { + msg_send![self, setDeletesFileUponFailure: deletesFileUponFailure] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs new file mode 100644 index 000000000..4065f5791 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -0,0 +1,95 @@ +extern_class!( + #[derive(Debug)] + struct NSURLHandle; + unsafe impl ClassType for NSURLHandle { + type Super = NSObject; + } +); +impl NSURLHandle { + pub unsafe fn registerURLHandleClass(anURLHandleSubclass: Option<&Class>) { + msg_send![Self::class(), registerURLHandleClass: anURLHandleSubclass] + } + pub unsafe fn URLHandleClassForURL(anURL: Option<&NSURL>) -> Option<&Class> { + msg_send![Self::class(), URLHandleClassForURL: anURL] + } + pub unsafe fn status(&self) -> NSURLHandleStatus { + msg_send![self, status] + } + pub unsafe fn failureReason(&self) -> Option> { + msg_send_id![self, failureReason] + } + pub unsafe fn addClient(&self, client: TodoGenerics) { + msg_send![self, addClient: client] + } + pub unsafe fn removeClient(&self, client: TodoGenerics) { + msg_send![self, removeClient: client] + } + pub unsafe fn loadInBackground(&self) { + msg_send![self, loadInBackground] + } + pub unsafe fn cancelLoadInBackground(&self) { + msg_send![self, cancelLoadInBackground] + } + pub unsafe fn resourceData(&self) -> Option> { + msg_send_id![self, resourceData] + } + pub unsafe fn availableResourceData(&self) -> Option> { + msg_send_id![self, availableResourceData] + } + pub unsafe fn expectedResourceDataSize(&self) -> c_longlong { + msg_send![self, expectedResourceDataSize] + } + pub unsafe fn flushCachedData(&self) { + msg_send![self, flushCachedData] + } + pub unsafe fn backgroundLoadDidFailWithReason(&self, reason: Option<&NSString>) { + msg_send![self, backgroundLoadDidFailWithReason: reason] + } + pub unsafe fn didLoadBytes_loadComplete(&self, newBytes: Option<&NSData>, yorn: bool) { + msg_send![self, didLoadBytes: newBytes, loadComplete: yorn] + } + pub unsafe fn canInitWithURL(anURL: Option<&NSURL>) -> bool { + msg_send![Self::class(), canInitWithURL: anURL] + } + pub unsafe fn cachedHandleForURL(anURL: Option<&NSURL>) -> Option> { + msg_send_id![Self::class(), cachedHandleForURL: anURL] + } + pub unsafe fn initWithURL_cached( + &self, + anURL: Option<&NSURL>, + willCache: bool, + ) -> Option> { + msg_send_id![self, initWithURL: anURL, cached: willCache] + } + pub unsafe fn propertyForKey( + &self, + propertyKey: Option<&NSString>, + ) -> Option> { + msg_send_id![self, propertyForKey: propertyKey] + } + pub unsafe fn propertyForKeyIfAvailable( + &self, + propertyKey: Option<&NSString>, + ) -> Option> { + msg_send_id![self, propertyForKeyIfAvailable: propertyKey] + } + pub unsafe fn writeProperty_forKey( + &self, + propertyValue: Option<&Object>, + propertyKey: Option<&NSString>, + ) -> bool { + msg_send![self, writeProperty: propertyValue, forKey: propertyKey] + } + pub unsafe fn writeData(&self, data: Option<&NSData>) -> bool { + msg_send![self, writeData: data] + } + pub unsafe fn loadInForeground(&self) -> Option> { + msg_send_id![self, loadInForeground] + } + pub unsafe fn beginLoadInBackground(&self) { + msg_send![self, beginLoadInBackground] + } + pub unsafe fn endLoadInBackground(&self) { + msg_send![self, endLoadInBackground] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs new file mode 100644 index 000000000..8a509acf7 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -0,0 +1,72 @@ +extern_class!( + #[derive(Debug)] + struct NSURLProtectionSpace; + unsafe impl ClassType for NSURLProtectionSpace { + type Super = NSObject; + } +); +impl NSURLProtectionSpace { + pub unsafe fn initWithHost_port_protocol_realm_authenticationMethod( + &self, + host: &NSString, + port: NSInteger, + protocol: Option<&NSString>, + realm: Option<&NSString>, + authenticationMethod: Option<&NSString>, + ) -> Id { + msg_send_id![ + self, + initWithHost: host, + port: port, + protocol: protocol, + realm: realm, + authenticationMethod: authenticationMethod + ] + } + pub unsafe fn initWithProxyHost_port_type_realm_authenticationMethod( + &self, + host: &NSString, + port: NSInteger, + type_: Option<&NSString>, + realm: Option<&NSString>, + authenticationMethod: Option<&NSString>, + ) -> Id { + msg_send_id ! [self , initWithProxyHost : host , port : port , type : type_ , realm : realm , authenticationMethod : authenticationMethod] + } + pub unsafe fn realm(&self) -> Option> { + msg_send_id![self, realm] + } + pub unsafe fn receivesCredentialSecurely(&self) -> bool { + msg_send![self, receivesCredentialSecurely] + } + pub unsafe fn isProxy(&self) -> bool { + msg_send![self, isProxy] + } + pub unsafe fn host(&self) -> Id { + msg_send_id![self, host] + } + pub unsafe fn port(&self) -> NSInteger { + msg_send![self, port] + } + pub unsafe fn proxyType(&self) -> Option> { + msg_send_id![self, proxyType] + } + pub unsafe fn protocol(&self) -> Option> { + msg_send_id![self, protocol] + } + pub unsafe fn authenticationMethod(&self) -> Id { + msg_send_id![self, authenticationMethod] + } +} +#[doc = "NSClientCertificateSpace"] +impl NSURLProtectionSpace { + pub unsafe fn distinguishedNames(&self) -> TodoGenerics { + msg_send![self, distinguishedNames] + } +} +#[doc = "NSServerTrustValidationSpace"] +impl NSURLProtectionSpace { + pub unsafe fn serverTrust(&self) -> SecTrustRef { + msg_send![self, serverTrust] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs new file mode 100644 index 000000000..76fe273b3 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -0,0 +1,95 @@ +extern_class!( + #[derive(Debug)] + struct NSURLProtocol; + unsafe impl ClassType for NSURLProtocol { + type Super = NSObject; + } +); +impl NSURLProtocol { + pub unsafe fn initWithRequest_cachedResponse_client( + &self, + request: &NSURLRequest, + cachedResponse: Option<&NSCachedURLResponse>, + client: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + initWithRequest: request, + cachedResponse: cachedResponse, + client: client + ] + } + pub unsafe fn canInitWithRequest(request: &NSURLRequest) -> bool { + msg_send![Self::class(), canInitWithRequest: request] + } + pub unsafe fn canonicalRequestForRequest(request: &NSURLRequest) -> Id { + msg_send_id![Self::class(), canonicalRequestForRequest: request] + } + pub unsafe fn requestIsCacheEquivalent_toRequest(a: &NSURLRequest, b: &NSURLRequest) -> bool { + msg_send![Self::class(), requestIsCacheEquivalent: a, toRequest: b] + } + pub unsafe fn startLoading(&self) { + msg_send![self, startLoading] + } + pub unsafe fn stopLoading(&self) { + msg_send![self, stopLoading] + } + pub unsafe fn propertyForKey_inRequest( + key: &NSString, + request: &NSURLRequest, + ) -> Option> { + msg_send_id![Self::class(), propertyForKey: key, inRequest: request] + } + pub unsafe fn setProperty_forKey_inRequest( + value: &Object, + key: &NSString, + request: &NSMutableURLRequest, + ) { + msg_send![ + Self::class(), + setProperty: value, + forKey: key, + inRequest: request + ] + } + pub unsafe fn removePropertyForKey_inRequest(key: &NSString, request: &NSMutableURLRequest) { + msg_send![Self::class(), removePropertyForKey: key, inRequest: request] + } + pub unsafe fn registerClass(protocolClass: &Class) -> bool { + msg_send![Self::class(), registerClass: protocolClass] + } + pub unsafe fn unregisterClass(protocolClass: &Class) { + msg_send![Self::class(), unregisterClass: protocolClass] + } + pub unsafe fn client(&self) -> TodoGenerics { + msg_send![self, client] + } + pub unsafe fn request(&self) -> Id { + msg_send_id![self, request] + } + pub unsafe fn cachedResponse(&self) -> Option> { + msg_send_id![self, cachedResponse] + } +} +#[doc = "NSURLSessionTaskAdditions"] +impl NSURLProtocol { + pub unsafe fn canInitWithTask(task: &NSURLSessionTask) -> bool { + msg_send![Self::class(), canInitWithTask: task] + } + pub unsafe fn initWithTask_cachedResponse_client( + &self, + task: &NSURLSessionTask, + cachedResponse: Option<&NSCachedURLResponse>, + client: TodoGenerics, + ) -> Id { + msg_send_id![ + self, + initWithTask: task, + cachedResponse: cachedResponse, + client: client + ] + } + pub unsafe fn task(&self) -> Option> { + msg_send_id![self, task] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs new file mode 100644 index 000000000..f13c475b3 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -0,0 +1,217 @@ +extern_class!( + #[derive(Debug)] + struct NSURLRequest; + unsafe impl ClassType for NSURLRequest { + type Super = NSObject; + } +); +impl NSURLRequest { + pub unsafe fn requestWithURL(URL: &NSURL) -> Id { + msg_send_id![Self::class(), requestWithURL: URL] + } + pub unsafe fn requestWithURL_cachePolicy_timeoutInterval( + URL: &NSURL, + cachePolicy: NSURLRequestCachePolicy, + timeoutInterval: NSTimeInterval, + ) -> Id { + msg_send_id![ + Self::class(), + requestWithURL: URL, + cachePolicy: cachePolicy, + timeoutInterval: timeoutInterval + ] + } + pub unsafe fn initWithURL(&self, URL: &NSURL) -> Id { + msg_send_id![self, initWithURL: URL] + } + pub unsafe fn initWithURL_cachePolicy_timeoutInterval( + &self, + URL: &NSURL, + cachePolicy: NSURLRequestCachePolicy, + timeoutInterval: NSTimeInterval, + ) -> Id { + msg_send_id![ + self, + initWithURL: URL, + cachePolicy: cachePolicy, + timeoutInterval: timeoutInterval + ] + } + pub unsafe fn supportsSecureCoding() -> bool { + msg_send![Self::class(), supportsSecureCoding] + } + pub unsafe fn URL(&self) -> Option> { + msg_send_id![self, URL] + } + pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy { + msg_send![self, cachePolicy] + } + pub unsafe fn timeoutInterval(&self) -> NSTimeInterval { + msg_send![self, timeoutInterval] + } + pub unsafe fn mainDocumentURL(&self) -> Option> { + msg_send_id![self, mainDocumentURL] + } + pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { + msg_send![self, networkServiceType] + } + pub unsafe fn allowsCellularAccess(&self) -> bool { + msg_send![self, allowsCellularAccess] + } + pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { + msg_send![self, allowsExpensiveNetworkAccess] + } + pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { + msg_send![self, allowsConstrainedNetworkAccess] + } + pub unsafe fn assumesHTTP3Capable(&self) -> bool { + msg_send![self, assumesHTTP3Capable] + } + pub unsafe fn attribution(&self) -> NSURLRequestAttribution { + msg_send![self, attribution] + } +} +extern_class!( + #[derive(Debug)] + struct NSMutableURLRequest; + unsafe impl ClassType for NSMutableURLRequest { + type Super = NSURLRequest; + } +); +impl NSMutableURLRequest { + pub unsafe fn URL(&self) -> Option> { + msg_send_id![self, URL] + } + pub unsafe fn setURL(&self, URL: Option<&NSURL>) { + msg_send![self, setURL: URL] + } + pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy { + msg_send![self, cachePolicy] + } + pub unsafe fn setCachePolicy(&self, cachePolicy: NSURLRequestCachePolicy) { + msg_send![self, setCachePolicy: cachePolicy] + } + pub unsafe fn timeoutInterval(&self) -> NSTimeInterval { + msg_send![self, timeoutInterval] + } + pub unsafe fn setTimeoutInterval(&self, timeoutInterval: NSTimeInterval) { + msg_send![self, setTimeoutInterval: timeoutInterval] + } + pub unsafe fn mainDocumentURL(&self) -> Option> { + msg_send_id![self, mainDocumentURL] + } + pub unsafe fn setMainDocumentURL(&self, mainDocumentURL: Option<&NSURL>) { + msg_send![self, setMainDocumentURL: mainDocumentURL] + } + pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { + msg_send![self, networkServiceType] + } + pub unsafe fn setNetworkServiceType(&self, networkServiceType: NSURLRequestNetworkServiceType) { + msg_send![self, setNetworkServiceType: networkServiceType] + } + pub unsafe fn allowsCellularAccess(&self) -> bool { + msg_send![self, allowsCellularAccess] + } + pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool) { + msg_send![self, setAllowsCellularAccess: allowsCellularAccess] + } + pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { + msg_send![self, allowsExpensiveNetworkAccess] + } + pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool) { + msg_send![ + self, + setAllowsExpensiveNetworkAccess: allowsExpensiveNetworkAccess + ] + } + pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { + msg_send![self, allowsConstrainedNetworkAccess] + } + pub unsafe fn setAllowsConstrainedNetworkAccess(&self, allowsConstrainedNetworkAccess: bool) { + msg_send![ + self, + setAllowsConstrainedNetworkAccess: allowsConstrainedNetworkAccess + ] + } + pub unsafe fn assumesHTTP3Capable(&self) -> bool { + msg_send![self, assumesHTTP3Capable] + } + pub unsafe fn setAssumesHTTP3Capable(&self, assumesHTTP3Capable: bool) { + msg_send![self, setAssumesHTTP3Capable: assumesHTTP3Capable] + } + pub unsafe fn attribution(&self) -> NSURLRequestAttribution { + msg_send![self, attribution] + } + pub unsafe fn setAttribution(&self, attribution: NSURLRequestAttribution) { + msg_send![self, setAttribution: attribution] + } +} +#[doc = "NSHTTPURLRequest"] +impl NSURLRequest { + pub unsafe fn valueForHTTPHeaderField(&self, field: &NSString) -> Option> { + msg_send_id![self, valueForHTTPHeaderField: field] + } + pub unsafe fn HTTPMethod(&self) -> Option> { + msg_send_id![self, HTTPMethod] + } + pub unsafe fn allHTTPHeaderFields(&self) -> TodoGenerics { + msg_send![self, allHTTPHeaderFields] + } + pub unsafe fn HTTPBody(&self) -> Option> { + msg_send_id![self, HTTPBody] + } + pub unsafe fn HTTPBodyStream(&self) -> Option> { + msg_send_id![self, HTTPBodyStream] + } + pub unsafe fn HTTPShouldHandleCookies(&self) -> bool { + msg_send![self, HTTPShouldHandleCookies] + } + pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { + msg_send![self, HTTPShouldUsePipelining] + } +} +#[doc = "NSMutableHTTPURLRequest"] +impl NSMutableURLRequest { + pub unsafe fn setValue_forHTTPHeaderField(&self, value: Option<&NSString>, field: &NSString) { + msg_send![self, setValue: value, forHTTPHeaderField: field] + } + pub unsafe fn addValue_forHTTPHeaderField(&self, value: &NSString, field: &NSString) { + msg_send![self, addValue: value, forHTTPHeaderField: field] + } + pub unsafe fn HTTPMethod(&self) -> Id { + msg_send_id![self, HTTPMethod] + } + pub unsafe fn setHTTPMethod(&self, HTTPMethod: &NSString) { + msg_send![self, setHTTPMethod: HTTPMethod] + } + pub unsafe fn allHTTPHeaderFields(&self) -> TodoGenerics { + msg_send![self, allHTTPHeaderFields] + } + pub unsafe fn setAllHTTPHeaderFields(&self, allHTTPHeaderFields: TodoGenerics) { + msg_send![self, setAllHTTPHeaderFields: allHTTPHeaderFields] + } + pub unsafe fn HTTPBody(&self) -> Option> { + msg_send_id![self, HTTPBody] + } + pub unsafe fn setHTTPBody(&self, HTTPBody: Option<&NSData>) { + msg_send![self, setHTTPBody: HTTPBody] + } + pub unsafe fn HTTPBodyStream(&self) -> Option> { + msg_send_id![self, HTTPBodyStream] + } + pub unsafe fn setHTTPBodyStream(&self, HTTPBodyStream: Option<&NSInputStream>) { + msg_send![self, setHTTPBodyStream: HTTPBodyStream] + } + pub unsafe fn HTTPShouldHandleCookies(&self) -> bool { + msg_send![self, HTTPShouldHandleCookies] + } + pub unsafe fn setHTTPShouldHandleCookies(&self, HTTPShouldHandleCookies: bool) { + msg_send![self, setHTTPShouldHandleCookies: HTTPShouldHandleCookies] + } + pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { + msg_send![self, HTTPShouldUsePipelining] + } + pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool) { + msg_send![self, setHTTPShouldUsePipelining: HTTPShouldUsePipelining] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs new file mode 100644 index 000000000..f65d1978e --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -0,0 +1,75 @@ +extern_class!( + #[derive(Debug)] + struct NSURLResponse; + unsafe impl ClassType for NSURLResponse { + type Super = NSObject; + } +); +impl NSURLResponse { + pub unsafe fn initWithURL_MIMEType_expectedContentLength_textEncodingName( + &self, + URL: &NSURL, + MIMEType: Option<&NSString>, + length: NSInteger, + name: Option<&NSString>, + ) -> Id { + msg_send_id![ + self, + initWithURL: URL, + MIMEType: MIMEType, + expectedContentLength: length, + textEncodingName: name + ] + } + pub unsafe fn URL(&self) -> Option> { + msg_send_id![self, URL] + } + pub unsafe fn MIMEType(&self) -> Option> { + msg_send_id![self, MIMEType] + } + pub unsafe fn expectedContentLength(&self) -> c_longlong { + msg_send![self, expectedContentLength] + } + pub unsafe fn textEncodingName(&self) -> Option> { + msg_send_id![self, textEncodingName] + } + pub unsafe fn suggestedFilename(&self) -> Option> { + msg_send_id![self, suggestedFilename] + } +} +extern_class!( + #[derive(Debug)] + struct NSHTTPURLResponse; + unsafe impl ClassType for NSHTTPURLResponse { + type Super = NSURLResponse; + } +); +impl NSHTTPURLResponse { + pub unsafe fn initWithURL_statusCode_HTTPVersion_headerFields( + &self, + url: &NSURL, + statusCode: NSInteger, + HTTPVersion: Option<&NSString>, + headerFields: TodoGenerics, + ) -> Option> { + msg_send_id![ + self, + initWithURL: url, + statusCode: statusCode, + HTTPVersion: HTTPVersion, + headerFields: headerFields + ] + } + pub unsafe fn valueForHTTPHeaderField(&self, field: &NSString) -> Option> { + msg_send_id![self, valueForHTTPHeaderField: field] + } + pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id { + msg_send_id![Self::class(), localizedStringForStatusCode: statusCode] + } + pub unsafe fn statusCode(&self) -> NSInteger { + msg_send![self, statusCode] + } + pub unsafe fn allHeaderFields(&self) -> Id { + msg_send_id![self, allHeaderFields] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs new file mode 100644 index 000000000..f19207b0e --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -0,0 +1,937 @@ +extern_class!( + #[derive(Debug)] + struct NSURLSession; + unsafe impl ClassType for NSURLSession { + type Super = NSObject; + } +); +impl NSURLSession { + pub unsafe fn sessionWithConfiguration( + configuration: &NSURLSessionConfiguration, + ) -> Id { + msg_send_id![Self::class(), sessionWithConfiguration: configuration] + } + pub unsafe fn sessionWithConfiguration_delegate_delegateQueue( + configuration: &NSURLSessionConfiguration, + delegate: TodoGenerics, + queue: Option<&NSOperationQueue>, + ) -> Id { + msg_send_id![ + Self::class(), + sessionWithConfiguration: configuration, + delegate: delegate, + delegateQueue: queue + ] + } + pub unsafe fn finishTasksAndInvalidate(&self) { + msg_send![self, finishTasksAndInvalidate] + } + pub unsafe fn invalidateAndCancel(&self) { + msg_send![self, invalidateAndCancel] + } + pub unsafe fn resetWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![self, resetWithCompletionHandler: completionHandler] + } + pub unsafe fn flushWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![self, flushWithCompletionHandler: completionHandler] + } + pub unsafe fn getTasksWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![self, getTasksWithCompletionHandler: completionHandler] + } + pub unsafe fn getAllTasksWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![self, getAllTasksWithCompletionHandler: completionHandler] + } + pub unsafe fn dataTaskWithRequest( + &self, + request: &NSURLRequest, + ) -> Id { + msg_send_id![self, dataTaskWithRequest: request] + } + pub unsafe fn dataTaskWithURL(&self, url: &NSURL) -> Id { + msg_send_id![self, dataTaskWithURL: url] + } + pub unsafe fn uploadTaskWithRequest_fromFile( + &self, + request: &NSURLRequest, + fileURL: &NSURL, + ) -> Id { + msg_send_id![self, uploadTaskWithRequest: request, fromFile: fileURL] + } + pub unsafe fn uploadTaskWithRequest_fromData( + &self, + request: &NSURLRequest, + bodyData: &NSData, + ) -> Id { + msg_send_id![self, uploadTaskWithRequest: request, fromData: bodyData] + } + pub unsafe fn uploadTaskWithStreamedRequest( + &self, + request: &NSURLRequest, + ) -> Id { + msg_send_id![self, uploadTaskWithStreamedRequest: request] + } + pub unsafe fn downloadTaskWithRequest( + &self, + request: &NSURLRequest, + ) -> Id { + msg_send_id![self, downloadTaskWithRequest: request] + } + pub unsafe fn downloadTaskWithURL(&self, url: &NSURL) -> Id { + msg_send_id![self, downloadTaskWithURL: url] + } + pub unsafe fn downloadTaskWithResumeData( + &self, + resumeData: &NSData, + ) -> Id { + msg_send_id![self, downloadTaskWithResumeData: resumeData] + } + pub unsafe fn streamTaskWithHostName_port( + &self, + hostname: &NSString, + port: NSInteger, + ) -> Id { + msg_send_id![self, streamTaskWithHostName: hostname, port: port] + } + pub unsafe fn streamTaskWithNetService( + &self, + service: &NSNetService, + ) -> Id { + msg_send_id![self, streamTaskWithNetService: service] + } + pub unsafe fn webSocketTaskWithURL( + &self, + url: &NSURL, + ) -> Id { + msg_send_id![self, webSocketTaskWithURL: url] + } + pub unsafe fn webSocketTaskWithURL_protocols( + &self, + url: &NSURL, + protocols: TodoGenerics, + ) -> Id { + msg_send_id![self, webSocketTaskWithURL: url, protocols: protocols] + } + pub unsafe fn webSocketTaskWithRequest( + &self, + request: &NSURLRequest, + ) -> Id { + msg_send_id![self, webSocketTaskWithRequest: request] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } + pub unsafe fn sharedSession() -> Id { + msg_send_id![Self::class(), sharedSession] + } + pub unsafe fn delegateQueue(&self) -> Id { + msg_send_id![self, delegateQueue] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn configuration(&self) -> Id { + msg_send_id![self, configuration] + } + pub unsafe fn sessionDescription(&self) -> Option> { + msg_send_id![self, sessionDescription] + } + pub unsafe fn setSessionDescription(&self, sessionDescription: Option<&NSString>) { + msg_send![self, setSessionDescription: sessionDescription] + } +} +#[doc = "NSURLSessionAsynchronousConvenience"] +impl NSURLSession { + pub unsafe fn dataTaskWithRequest_completionHandler( + &self, + request: &NSURLRequest, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + dataTaskWithRequest: request, + completionHandler: completionHandler + ] + } + pub unsafe fn dataTaskWithURL_completionHandler( + &self, + url: &NSURL, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + dataTaskWithURL: url, + completionHandler: completionHandler + ] + } + pub unsafe fn uploadTaskWithRequest_fromFile_completionHandler( + &self, + request: &NSURLRequest, + fileURL: &NSURL, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + uploadTaskWithRequest: request, + fromFile: fileURL, + completionHandler: completionHandler + ] + } + pub unsafe fn uploadTaskWithRequest_fromData_completionHandler( + &self, + request: &NSURLRequest, + bodyData: Option<&NSData>, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + uploadTaskWithRequest: request, + fromData: bodyData, + completionHandler: completionHandler + ] + } + pub unsafe fn downloadTaskWithRequest_completionHandler( + &self, + request: &NSURLRequest, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + downloadTaskWithRequest: request, + completionHandler: completionHandler + ] + } + pub unsafe fn downloadTaskWithURL_completionHandler( + &self, + url: &NSURL, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + downloadTaskWithURL: url, + completionHandler: completionHandler + ] + } + pub unsafe fn downloadTaskWithResumeData_completionHandler( + &self, + resumeData: &NSData, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + downloadTaskWithResumeData: resumeData, + completionHandler: completionHandler + ] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLSessionTask; + unsafe impl ClassType for NSURLSessionTask { + type Super = NSObject; + } +); +impl NSURLSessionTask { + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn suspend(&self) { + msg_send![self, suspend] + } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } + pub unsafe fn taskIdentifier(&self) -> NSUInteger { + msg_send![self, taskIdentifier] + } + pub unsafe fn originalRequest(&self) -> Option> { + msg_send_id![self, originalRequest] + } + pub unsafe fn currentRequest(&self) -> Option> { + msg_send_id![self, currentRequest] + } + pub unsafe fn response(&self) -> Option> { + msg_send_id![self, response] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn progress(&self) -> Id { + msg_send_id![self, progress] + } + pub unsafe fn earliestBeginDate(&self) -> Option> { + msg_send_id![self, earliestBeginDate] + } + pub unsafe fn setEarliestBeginDate(&self, earliestBeginDate: Option<&NSDate>) { + msg_send![self, setEarliestBeginDate: earliestBeginDate] + } + pub unsafe fn countOfBytesClientExpectsToSend(&self) -> int64_t { + msg_send![self, countOfBytesClientExpectsToSend] + } + pub unsafe fn setCountOfBytesClientExpectsToSend( + &self, + countOfBytesClientExpectsToSend: int64_t, + ) { + msg_send![ + self, + setCountOfBytesClientExpectsToSend: countOfBytesClientExpectsToSend + ] + } + pub unsafe fn countOfBytesClientExpectsToReceive(&self) -> int64_t { + msg_send![self, countOfBytesClientExpectsToReceive] + } + pub unsafe fn setCountOfBytesClientExpectsToReceive( + &self, + countOfBytesClientExpectsToReceive: int64_t, + ) { + msg_send![ + self, + setCountOfBytesClientExpectsToReceive: countOfBytesClientExpectsToReceive + ] + } + pub unsafe fn countOfBytesSent(&self) -> int64_t { + msg_send![self, countOfBytesSent] + } + pub unsafe fn countOfBytesReceived(&self) -> int64_t { + msg_send![self, countOfBytesReceived] + } + pub unsafe fn countOfBytesExpectedToSend(&self) -> int64_t { + msg_send![self, countOfBytesExpectedToSend] + } + pub unsafe fn countOfBytesExpectedToReceive(&self) -> int64_t { + msg_send![self, countOfBytesExpectedToReceive] + } + pub unsafe fn taskDescription(&self) -> Option> { + msg_send_id![self, taskDescription] + } + pub unsafe fn setTaskDescription(&self, taskDescription: Option<&NSString>) { + msg_send![self, setTaskDescription: taskDescription] + } + pub unsafe fn state(&self) -> NSURLSessionTaskState { + msg_send![self, state] + } + pub unsafe fn error(&self) -> Option> { + msg_send_id![self, error] + } + pub unsafe fn priority(&self) -> c_float { + msg_send![self, priority] + } + pub unsafe fn setPriority(&self, priority: c_float) { + msg_send![self, setPriority: priority] + } + pub unsafe fn prefersIncrementalDelivery(&self) -> bool { + msg_send![self, prefersIncrementalDelivery] + } + pub unsafe fn setPrefersIncrementalDelivery(&self, prefersIncrementalDelivery: bool) { + msg_send![ + self, + setPrefersIncrementalDelivery: prefersIncrementalDelivery + ] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLSessionDataTask; + unsafe impl ClassType for NSURLSessionDataTask { + type Super = NSURLSessionTask; + } +); +impl NSURLSessionDataTask { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLSessionUploadTask; + unsafe impl ClassType for NSURLSessionUploadTask { + type Super = NSURLSessionDataTask; + } +); +impl NSURLSessionUploadTask { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLSessionDownloadTask; + unsafe impl ClassType for NSURLSessionDownloadTask { + type Super = NSURLSessionTask; + } +); +impl NSURLSessionDownloadTask { + pub unsafe fn cancelByProducingResumeData(&self, completionHandler: TodoBlock) { + msg_send![self, cancelByProducingResumeData: completionHandler] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLSessionStreamTask; + unsafe impl ClassType for NSURLSessionStreamTask { + type Super = NSURLSessionTask; + } +); +impl NSURLSessionStreamTask { + pub unsafe fn readDataOfMinLength_maxLength_timeout_completionHandler( + &self, + minBytes: NSUInteger, + maxBytes: NSUInteger, + timeout: NSTimeInterval, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + readDataOfMinLength: minBytes, + maxLength: maxBytes, + timeout: timeout, + completionHandler: completionHandler + ] + } + pub unsafe fn writeData_timeout_completionHandler( + &self, + data: &NSData, + timeout: NSTimeInterval, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + writeData: data, + timeout: timeout, + completionHandler: completionHandler + ] + } + pub unsafe fn captureStreams(&self) { + msg_send![self, captureStreams] + } + pub unsafe fn closeWrite(&self) { + msg_send![self, closeWrite] + } + pub unsafe fn closeRead(&self) { + msg_send![self, closeRead] + } + pub unsafe fn startSecureConnection(&self) { + msg_send![self, startSecureConnection] + } + pub unsafe fn stopSecureConnection(&self) { + msg_send![self, stopSecureConnection] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLSessionWebSocketMessage; + unsafe impl ClassType for NSURLSessionWebSocketMessage { + type Super = NSObject; + } +); +impl NSURLSessionWebSocketMessage { + pub unsafe fn initWithData(&self, data: &NSData) -> Id { + msg_send_id![self, initWithData: data] + } + pub unsafe fn initWithString(&self, string: &NSString) -> Id { + msg_send_id![self, initWithString: string] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } + pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType { + msg_send![self, type] + } + pub unsafe fn data(&self) -> Option> { + msg_send_id![self, data] + } + pub unsafe fn string(&self) -> Option> { + msg_send_id![self, string] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLSessionWebSocketTask; + unsafe impl ClassType for NSURLSessionWebSocketTask { + type Super = NSURLSessionTask; + } +); +impl NSURLSessionWebSocketTask { + pub unsafe fn sendMessage_completionHandler( + &self, + message: &NSURLSessionWebSocketMessage, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + sendMessage: message, + completionHandler: completionHandler + ] + } + pub unsafe fn receiveMessageWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![self, receiveMessageWithCompletionHandler: completionHandler] + } + pub unsafe fn sendPingWithPongReceiveHandler(&self, pongReceiveHandler: TodoBlock) { + msg_send![self, sendPingWithPongReceiveHandler: pongReceiveHandler] + } + pub unsafe fn cancelWithCloseCode_reason( + &self, + closeCode: NSURLSessionWebSocketCloseCode, + reason: Option<&NSData>, + ) { + msg_send![self, cancelWithCloseCode: closeCode, reason: reason] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } + pub unsafe fn maximumMessageSize(&self) -> NSInteger { + msg_send![self, maximumMessageSize] + } + pub unsafe fn setMaximumMessageSize(&self, maximumMessageSize: NSInteger) { + msg_send![self, setMaximumMessageSize: maximumMessageSize] + } + pub unsafe fn closeCode(&self) -> NSURLSessionWebSocketCloseCode { + msg_send![self, closeCode] + } + pub unsafe fn closeReason(&self) -> Option> { + msg_send_id![self, closeReason] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLSessionConfiguration; + unsafe impl ClassType for NSURLSessionConfiguration { + type Super = NSObject; + } +); +impl NSURLSessionConfiguration { + pub unsafe fn backgroundSessionConfigurationWithIdentifier( + identifier: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + backgroundSessionConfigurationWithIdentifier: identifier + ] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } + pub unsafe fn defaultSessionConfiguration() -> Id { + msg_send_id![Self::class(), defaultSessionConfiguration] + } + pub unsafe fn ephemeralSessionConfiguration() -> Id { + msg_send_id![Self::class(), ephemeralSessionConfiguration] + } + pub unsafe fn identifier(&self) -> Option> { + msg_send_id![self, identifier] + } + pub unsafe fn requestCachePolicy(&self) -> NSURLRequestCachePolicy { + msg_send![self, requestCachePolicy] + } + pub unsafe fn setRequestCachePolicy(&self, requestCachePolicy: NSURLRequestCachePolicy) { + msg_send![self, setRequestCachePolicy: requestCachePolicy] + } + pub unsafe fn timeoutIntervalForRequest(&self) -> NSTimeInterval { + msg_send![self, timeoutIntervalForRequest] + } + pub unsafe fn setTimeoutIntervalForRequest(&self, timeoutIntervalForRequest: NSTimeInterval) { + msg_send![ + self, + setTimeoutIntervalForRequest: timeoutIntervalForRequest + ] + } + pub unsafe fn timeoutIntervalForResource(&self) -> NSTimeInterval { + msg_send![self, timeoutIntervalForResource] + } + pub unsafe fn setTimeoutIntervalForResource(&self, timeoutIntervalForResource: NSTimeInterval) { + msg_send![ + self, + setTimeoutIntervalForResource: timeoutIntervalForResource + ] + } + pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { + msg_send![self, networkServiceType] + } + pub unsafe fn setNetworkServiceType(&self, networkServiceType: NSURLRequestNetworkServiceType) { + msg_send![self, setNetworkServiceType: networkServiceType] + } + pub unsafe fn allowsCellularAccess(&self) -> bool { + msg_send![self, allowsCellularAccess] + } + pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool) { + msg_send![self, setAllowsCellularAccess: allowsCellularAccess] + } + pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { + msg_send![self, allowsExpensiveNetworkAccess] + } + pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool) { + msg_send![ + self, + setAllowsExpensiveNetworkAccess: allowsExpensiveNetworkAccess + ] + } + pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { + msg_send![self, allowsConstrainedNetworkAccess] + } + pub unsafe fn setAllowsConstrainedNetworkAccess(&self, allowsConstrainedNetworkAccess: bool) { + msg_send![ + self, + setAllowsConstrainedNetworkAccess: allowsConstrainedNetworkAccess + ] + } + pub unsafe fn waitsForConnectivity(&self) -> bool { + msg_send![self, waitsForConnectivity] + } + pub unsafe fn setWaitsForConnectivity(&self, waitsForConnectivity: bool) { + msg_send![self, setWaitsForConnectivity: waitsForConnectivity] + } + pub unsafe fn isDiscretionary(&self) -> bool { + msg_send![self, isDiscretionary] + } + pub unsafe fn setDiscretionary(&self, discretionary: bool) { + msg_send![self, setDiscretionary: discretionary] + } + pub unsafe fn sharedContainerIdentifier(&self) -> Option> { + msg_send_id![self, sharedContainerIdentifier] + } + pub unsafe fn setSharedContainerIdentifier( + &self, + sharedContainerIdentifier: Option<&NSString>, + ) { + msg_send![ + self, + setSharedContainerIdentifier: sharedContainerIdentifier + ] + } + pub unsafe fn sessionSendsLaunchEvents(&self) -> bool { + msg_send![self, sessionSendsLaunchEvents] + } + pub unsafe fn setSessionSendsLaunchEvents(&self, sessionSendsLaunchEvents: bool) { + msg_send![self, setSessionSendsLaunchEvents: sessionSendsLaunchEvents] + } + pub unsafe fn connectionProxyDictionary(&self) -> Option> { + msg_send_id![self, connectionProxyDictionary] + } + pub unsafe fn setConnectionProxyDictionary( + &self, + connectionProxyDictionary: Option<&NSDictionary>, + ) { + msg_send![ + self, + setConnectionProxyDictionary: connectionProxyDictionary + ] + } + pub unsafe fn TLSMinimumSupportedProtocol(&self) -> SSLProtocol { + msg_send![self, TLSMinimumSupportedProtocol] + } + pub unsafe fn setTLSMinimumSupportedProtocol(&self, TLSMinimumSupportedProtocol: SSLProtocol) { + msg_send![ + self, + setTLSMinimumSupportedProtocol: TLSMinimumSupportedProtocol + ] + } + pub unsafe fn TLSMaximumSupportedProtocol(&self) -> SSLProtocol { + msg_send![self, TLSMaximumSupportedProtocol] + } + pub unsafe fn setTLSMaximumSupportedProtocol(&self, TLSMaximumSupportedProtocol: SSLProtocol) { + msg_send![ + self, + setTLSMaximumSupportedProtocol: TLSMaximumSupportedProtocol + ] + } + pub unsafe fn TLSMinimumSupportedProtocolVersion(&self) -> tls_protocol_version_t { + msg_send![self, TLSMinimumSupportedProtocolVersion] + } + pub unsafe fn setTLSMinimumSupportedProtocolVersion( + &self, + TLSMinimumSupportedProtocolVersion: tls_protocol_version_t, + ) { + msg_send![ + self, + setTLSMinimumSupportedProtocolVersion: TLSMinimumSupportedProtocolVersion + ] + } + pub unsafe fn TLSMaximumSupportedProtocolVersion(&self) -> tls_protocol_version_t { + msg_send![self, TLSMaximumSupportedProtocolVersion] + } + pub unsafe fn setTLSMaximumSupportedProtocolVersion( + &self, + TLSMaximumSupportedProtocolVersion: tls_protocol_version_t, + ) { + msg_send![ + self, + setTLSMaximumSupportedProtocolVersion: TLSMaximumSupportedProtocolVersion + ] + } + pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { + msg_send![self, HTTPShouldUsePipelining] + } + pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool) { + msg_send![self, setHTTPShouldUsePipelining: HTTPShouldUsePipelining] + } + pub unsafe fn HTTPShouldSetCookies(&self) -> bool { + msg_send![self, HTTPShouldSetCookies] + } + pub unsafe fn setHTTPShouldSetCookies(&self, HTTPShouldSetCookies: bool) { + msg_send![self, setHTTPShouldSetCookies: HTTPShouldSetCookies] + } + pub unsafe fn HTTPCookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy { + msg_send![self, HTTPCookieAcceptPolicy] + } + pub unsafe fn setHTTPCookieAcceptPolicy( + &self, + HTTPCookieAcceptPolicy: NSHTTPCookieAcceptPolicy, + ) { + msg_send![self, setHTTPCookieAcceptPolicy: HTTPCookieAcceptPolicy] + } + pub unsafe fn HTTPAdditionalHeaders(&self) -> Option> { + msg_send_id![self, HTTPAdditionalHeaders] + } + pub unsafe fn setHTTPAdditionalHeaders(&self, HTTPAdditionalHeaders: Option<&NSDictionary>) { + msg_send![self, setHTTPAdditionalHeaders: HTTPAdditionalHeaders] + } + pub unsafe fn HTTPMaximumConnectionsPerHost(&self) -> NSInteger { + msg_send![self, HTTPMaximumConnectionsPerHost] + } + pub unsafe fn setHTTPMaximumConnectionsPerHost( + &self, + HTTPMaximumConnectionsPerHost: NSInteger, + ) { + msg_send![ + self, + setHTTPMaximumConnectionsPerHost: HTTPMaximumConnectionsPerHost + ] + } + pub unsafe fn HTTPCookieStorage(&self) -> Option> { + msg_send_id![self, HTTPCookieStorage] + } + pub unsafe fn setHTTPCookieStorage(&self, HTTPCookieStorage: Option<&NSHTTPCookieStorage>) { + msg_send![self, setHTTPCookieStorage: HTTPCookieStorage] + } + pub unsafe fn URLCredentialStorage(&self) -> Option> { + msg_send_id![self, URLCredentialStorage] + } + pub unsafe fn setURLCredentialStorage( + &self, + URLCredentialStorage: Option<&NSURLCredentialStorage>, + ) { + msg_send![self, setURLCredentialStorage: URLCredentialStorage] + } + pub unsafe fn URLCache(&self) -> Option> { + msg_send_id![self, URLCache] + } + pub unsafe fn setURLCache(&self, URLCache: Option<&NSURLCache>) { + msg_send![self, setURLCache: URLCache] + } + pub unsafe fn shouldUseExtendedBackgroundIdleMode(&self) -> bool { + msg_send![self, shouldUseExtendedBackgroundIdleMode] + } + pub unsafe fn setShouldUseExtendedBackgroundIdleMode( + &self, + shouldUseExtendedBackgroundIdleMode: bool, + ) { + msg_send![ + self, + setShouldUseExtendedBackgroundIdleMode: shouldUseExtendedBackgroundIdleMode + ] + } + pub unsafe fn protocolClasses(&self) -> TodoGenerics { + msg_send![self, protocolClasses] + } + pub unsafe fn setProtocolClasses(&self, protocolClasses: TodoGenerics) { + msg_send![self, setProtocolClasses: protocolClasses] + } + pub unsafe fn multipathServiceType(&self) -> NSURLSessionMultipathServiceType { + msg_send![self, multipathServiceType] + } + pub unsafe fn setMultipathServiceType( + &self, + multipathServiceType: NSURLSessionMultipathServiceType, + ) { + msg_send![self, setMultipathServiceType: multipathServiceType] + } +} +#[doc = "NSURLSessionDeprecated"] +impl NSURLSessionConfiguration { + pub unsafe fn backgroundSessionConfiguration( + identifier: &NSString, + ) -> Id { + msg_send_id![Self::class(), backgroundSessionConfiguration: identifier] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLSessionTaskTransactionMetrics; + unsafe impl ClassType for NSURLSessionTaskTransactionMetrics { + type Super = NSObject; + } +); +impl NSURLSessionTaskTransactionMetrics { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } + pub unsafe fn request(&self) -> Id { + msg_send_id![self, request] + } + pub unsafe fn response(&self) -> Option> { + msg_send_id![self, response] + } + pub unsafe fn fetchStartDate(&self) -> Option> { + msg_send_id![self, fetchStartDate] + } + pub unsafe fn domainLookupStartDate(&self) -> Option> { + msg_send_id![self, domainLookupStartDate] + } + pub unsafe fn domainLookupEndDate(&self) -> Option> { + msg_send_id![self, domainLookupEndDate] + } + pub unsafe fn connectStartDate(&self) -> Option> { + msg_send_id![self, connectStartDate] + } + pub unsafe fn secureConnectionStartDate(&self) -> Option> { + msg_send_id![self, secureConnectionStartDate] + } + pub unsafe fn secureConnectionEndDate(&self) -> Option> { + msg_send_id![self, secureConnectionEndDate] + } + pub unsafe fn connectEndDate(&self) -> Option> { + msg_send_id![self, connectEndDate] + } + pub unsafe fn requestStartDate(&self) -> Option> { + msg_send_id![self, requestStartDate] + } + pub unsafe fn requestEndDate(&self) -> Option> { + msg_send_id![self, requestEndDate] + } + pub unsafe fn responseStartDate(&self) -> Option> { + msg_send_id![self, responseStartDate] + } + pub unsafe fn responseEndDate(&self) -> Option> { + msg_send_id![self, responseEndDate] + } + pub unsafe fn networkProtocolName(&self) -> Option> { + msg_send_id![self, networkProtocolName] + } + pub unsafe fn isProxyConnection(&self) -> bool { + msg_send![self, isProxyConnection] + } + pub unsafe fn isReusedConnection(&self) -> bool { + msg_send![self, isReusedConnection] + } + pub unsafe fn resourceFetchType(&self) -> NSURLSessionTaskMetricsResourceFetchType { + msg_send![self, resourceFetchType] + } + pub unsafe fn countOfRequestHeaderBytesSent(&self) -> int64_t { + msg_send![self, countOfRequestHeaderBytesSent] + } + pub unsafe fn countOfRequestBodyBytesSent(&self) -> int64_t { + msg_send![self, countOfRequestBodyBytesSent] + } + pub unsafe fn countOfRequestBodyBytesBeforeEncoding(&self) -> int64_t { + msg_send![self, countOfRequestBodyBytesBeforeEncoding] + } + pub unsafe fn countOfResponseHeaderBytesReceived(&self) -> int64_t { + msg_send![self, countOfResponseHeaderBytesReceived] + } + pub unsafe fn countOfResponseBodyBytesReceived(&self) -> int64_t { + msg_send![self, countOfResponseBodyBytesReceived] + } + pub unsafe fn countOfResponseBodyBytesAfterDecoding(&self) -> int64_t { + msg_send![self, countOfResponseBodyBytesAfterDecoding] + } + pub unsafe fn localAddress(&self) -> Option> { + msg_send_id![self, localAddress] + } + pub unsafe fn localPort(&self) -> Option> { + msg_send_id![self, localPort] + } + pub unsafe fn remoteAddress(&self) -> Option> { + msg_send_id![self, remoteAddress] + } + pub unsafe fn remotePort(&self) -> Option> { + msg_send_id![self, remotePort] + } + pub unsafe fn negotiatedTLSProtocolVersion(&self) -> Option> { + msg_send_id![self, negotiatedTLSProtocolVersion] + } + pub unsafe fn negotiatedTLSCipherSuite(&self) -> Option> { + msg_send_id![self, negotiatedTLSCipherSuite] + } + pub unsafe fn isCellular(&self) -> bool { + msg_send![self, isCellular] + } + pub unsafe fn isExpensive(&self) -> bool { + msg_send![self, isExpensive] + } + pub unsafe fn isConstrained(&self) -> bool { + msg_send![self, isConstrained] + } + pub unsafe fn isMultipath(&self) -> bool { + msg_send![self, isMultipath] + } + pub unsafe fn domainResolutionProtocol( + &self, + ) -> NSURLSessionTaskMetricsDomainResolutionProtocol { + msg_send![self, domainResolutionProtocol] + } +} +extern_class!( + #[derive(Debug)] + struct NSURLSessionTaskMetrics; + unsafe impl ClassType for NSURLSessionTaskMetrics { + type Super = NSObject; + } +); +impl NSURLSessionTaskMetrics { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } + pub unsafe fn transactionMetrics(&self) -> TodoGenerics { + msg_send![self, transactionMetrics] + } + pub unsafe fn taskInterval(&self) -> Id { + msg_send_id![self, taskInterval] + } + pub unsafe fn redirectCount(&self) -> NSUInteger { + msg_send![self, redirectCount] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs new file mode 100644 index 000000000..03153d06a --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -0,0 +1,30 @@ +extern_class!( + #[derive(Debug)] + struct NSUUID; + unsafe impl ClassType for NSUUID { + type Super = NSObject; + } +); +impl NSUUID { + pub unsafe fn UUID() -> Id { + msg_send_id![Self::class(), UUID] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithUUIDString(&self, string: &NSString) -> Option> { + msg_send_id![self, initWithUUIDString: string] + } + pub unsafe fn initWithUUIDBytes(&self, bytes: uuid_t) -> Id { + msg_send_id![self, initWithUUIDBytes: bytes] + } + pub unsafe fn getUUIDBytes(&self, uuid: uuid_t) { + msg_send![self, getUUIDBytes: uuid] + } + pub unsafe fn compare(&self, otherUUID: &NSUUID) -> NSComparisonResult { + msg_send![self, compare: otherUUID] + } + pub unsafe fn UUIDString(&self) -> Id { + msg_send_id![self, UUIDString] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs new file mode 100644 index 000000000..82a046231 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -0,0 +1,69 @@ +extern_class!( + #[derive(Debug)] + struct NSUbiquitousKeyValueStore; + unsafe impl ClassType for NSUbiquitousKeyValueStore { + type Super = NSObject; + } +); +impl NSUbiquitousKeyValueStore { + pub unsafe fn objectForKey(&self, aKey: &NSString) -> Option> { + msg_send_id![self, objectForKey: aKey] + } + pub unsafe fn setObject_forKey(&self, anObject: Option<&Object>, aKey: &NSString) { + msg_send![self, setObject: anObject, forKey: aKey] + } + pub unsafe fn removeObjectForKey(&self, aKey: &NSString) { + msg_send![self, removeObjectForKey: aKey] + } + pub unsafe fn stringForKey(&self, aKey: &NSString) -> Option> { + msg_send_id![self, stringForKey: aKey] + } + pub unsafe fn arrayForKey(&self, aKey: &NSString) -> Option> { + msg_send_id![self, arrayForKey: aKey] + } + pub unsafe fn dictionaryForKey(&self, aKey: &NSString) -> TodoGenerics { + msg_send![self, dictionaryForKey: aKey] + } + pub unsafe fn dataForKey(&self, aKey: &NSString) -> Option> { + msg_send_id![self, dataForKey: aKey] + } + pub unsafe fn longLongForKey(&self, aKey: &NSString) -> c_longlong { + msg_send![self, longLongForKey: aKey] + } + pub unsafe fn doubleForKey(&self, aKey: &NSString) -> c_double { + msg_send![self, doubleForKey: aKey] + } + pub unsafe fn boolForKey(&self, aKey: &NSString) -> bool { + msg_send![self, boolForKey: aKey] + } + pub unsafe fn setString_forKey(&self, aString: Option<&NSString>, aKey: &NSString) { + msg_send![self, setString: aString, forKey: aKey] + } + pub unsafe fn setData_forKey(&self, aData: Option<&NSData>, aKey: &NSString) { + msg_send![self, setData: aData, forKey: aKey] + } + pub unsafe fn setArray_forKey(&self, anArray: Option<&NSArray>, aKey: &NSString) { + msg_send![self, setArray: anArray, forKey: aKey] + } + pub unsafe fn setDictionary_forKey(&self, aDictionary: TodoGenerics, aKey: &NSString) { + msg_send![self, setDictionary: aDictionary, forKey: aKey] + } + pub unsafe fn setLongLong_forKey(&self, value: c_longlong, aKey: &NSString) { + msg_send![self, setLongLong: value, forKey: aKey] + } + pub unsafe fn setDouble_forKey(&self, value: c_double, aKey: &NSString) { + msg_send![self, setDouble: value, forKey: aKey] + } + pub unsafe fn setBool_forKey(&self, value: bool, aKey: &NSString) { + msg_send![self, setBool: value, forKey: aKey] + } + pub unsafe fn synchronize(&self) -> bool { + msg_send![self, synchronize] + } + pub unsafe fn defaultStore() -> Id { + msg_send_id![Self::class(), defaultStore] + } + pub unsafe fn dictionaryRepresentation(&self) -> TodoGenerics { + msg_send![self, dictionaryRepresentation] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs new file mode 100644 index 000000000..2a93ffa36 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -0,0 +1,127 @@ +extern_class!( + #[derive(Debug)] + struct NSUndoManager; + unsafe impl ClassType for NSUndoManager { + type Super = NSObject; + } +); +impl NSUndoManager { + pub unsafe fn beginUndoGrouping(&self) { + msg_send![self, beginUndoGrouping] + } + pub unsafe fn endUndoGrouping(&self) { + msg_send![self, endUndoGrouping] + } + pub unsafe fn disableUndoRegistration(&self) { + msg_send![self, disableUndoRegistration] + } + pub unsafe fn enableUndoRegistration(&self) { + msg_send![self, enableUndoRegistration] + } + pub unsafe fn undo(&self) { + msg_send![self, undo] + } + pub unsafe fn redo(&self) { + msg_send![self, redo] + } + pub unsafe fn undoNestedGroup(&self) { + msg_send![self, undoNestedGroup] + } + pub unsafe fn removeAllActions(&self) { + msg_send![self, removeAllActions] + } + pub unsafe fn removeAllActionsWithTarget(&self, target: &Object) { + msg_send![self, removeAllActionsWithTarget: target] + } + pub unsafe fn registerUndoWithTarget_selector_object( + &self, + target: &Object, + selector: Sel, + anObject: Option<&Object>, + ) { + msg_send![ + self, + registerUndoWithTarget: target, + selector: selector, + object: anObject + ] + } + pub unsafe fn prepareWithInvocationTarget(&self, target: &Object) -> Id { + msg_send_id![self, prepareWithInvocationTarget: target] + } + pub unsafe fn registerUndoWithTarget_handler(&self, target: &Object, undoHandler: TodoBlock) { + msg_send![self, registerUndoWithTarget: target, handler: undoHandler] + } + pub unsafe fn setActionIsDiscardable(&self, discardable: bool) { + msg_send![self, setActionIsDiscardable: discardable] + } + pub unsafe fn setActionName(&self, actionName: &NSString) { + msg_send![self, setActionName: actionName] + } + pub unsafe fn undoMenuTitleForUndoActionName( + &self, + actionName: &NSString, + ) -> Id { + msg_send_id![self, undoMenuTitleForUndoActionName: actionName] + } + pub unsafe fn redoMenuTitleForUndoActionName( + &self, + actionName: &NSString, + ) -> Id { + msg_send_id![self, redoMenuTitleForUndoActionName: actionName] + } + pub unsafe fn groupingLevel(&self) -> NSInteger { + msg_send![self, groupingLevel] + } + pub unsafe fn isUndoRegistrationEnabled(&self) -> bool { + msg_send![self, isUndoRegistrationEnabled] + } + pub unsafe fn groupsByEvent(&self) -> bool { + msg_send![self, groupsByEvent] + } + pub unsafe fn setGroupsByEvent(&self, groupsByEvent: bool) { + msg_send![self, setGroupsByEvent: groupsByEvent] + } + pub unsafe fn levelsOfUndo(&self) -> NSUInteger { + msg_send![self, levelsOfUndo] + } + pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger) { + msg_send![self, setLevelsOfUndo: levelsOfUndo] + } + pub unsafe fn runLoopModes(&self) -> TodoGenerics { + msg_send![self, runLoopModes] + } + pub unsafe fn setRunLoopModes(&self, runLoopModes: TodoGenerics) { + msg_send![self, setRunLoopModes: runLoopModes] + } + pub unsafe fn canUndo(&self) -> bool { + msg_send![self, canUndo] + } + pub unsafe fn canRedo(&self) -> bool { + msg_send![self, canRedo] + } + pub unsafe fn isUndoing(&self) -> bool { + msg_send![self, isUndoing] + } + pub unsafe fn isRedoing(&self) -> bool { + msg_send![self, isRedoing] + } + pub unsafe fn undoActionIsDiscardable(&self) -> bool { + msg_send![self, undoActionIsDiscardable] + } + pub unsafe fn redoActionIsDiscardable(&self) -> bool { + msg_send![self, redoActionIsDiscardable] + } + pub unsafe fn undoActionName(&self) -> Id { + msg_send_id![self, undoActionName] + } + pub unsafe fn redoActionName(&self) -> Id { + msg_send_id![self, redoActionName] + } + pub unsafe fn undoMenuItemTitle(&self) -> Id { + msg_send_id![self, undoMenuItemTitle] + } + pub unsafe fn redoMenuItemTitle(&self) -> Id { + msg_send_id![self, redoMenuItemTitle] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs new file mode 100644 index 000000000..eaad1597c --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -0,0 +1,898 @@ +extern_class!( + #[derive(Debug)] + struct NSUnitConverter; + unsafe impl ClassType for NSUnitConverter { + type Super = NSObject; + } +); +impl NSUnitConverter { + pub unsafe fn baseUnitValueFromValue(&self, value: c_double) -> c_double { + msg_send![self, baseUnitValueFromValue: value] + } + pub unsafe fn valueFromBaseUnitValue(&self, baseUnitValue: c_double) -> c_double { + msg_send![self, valueFromBaseUnitValue: baseUnitValue] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitConverterLinear; + unsafe impl ClassType for NSUnitConverterLinear { + type Super = NSUnitConverter; + } +); +impl NSUnitConverterLinear { + pub unsafe fn initWithCoefficient(&self, coefficient: c_double) -> Id { + msg_send_id![self, initWithCoefficient: coefficient] + } + pub unsafe fn initWithCoefficient_constant( + &self, + coefficient: c_double, + constant: c_double, + ) -> Id { + msg_send_id![self, initWithCoefficient: coefficient, constant: constant] + } + pub unsafe fn coefficient(&self) -> c_double { + msg_send![self, coefficient] + } + pub unsafe fn constant(&self) -> c_double { + msg_send![self, constant] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnit; + unsafe impl ClassType for NSUnit { + type Super = NSObject; + } +); +impl NSUnit { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } + pub unsafe fn initWithSymbol(&self, symbol: &NSString) -> Id { + msg_send_id![self, initWithSymbol: symbol] + } + pub unsafe fn symbol(&self) -> Id { + msg_send_id![self, symbol] + } +} +extern_class!( + #[derive(Debug)] + struct NSDimension; + unsafe impl ClassType for NSDimension { + type Super = NSUnit; + } +); +impl NSDimension { + pub unsafe fn initWithSymbol_converter( + &self, + symbol: &NSString, + converter: &NSUnitConverter, + ) -> Id { + msg_send_id![self, initWithSymbol: symbol, converter: converter] + } + pub unsafe fn baseUnit() -> Id { + msg_send_id![Self::class(), baseUnit] + } + pub unsafe fn converter(&self) -> Id { + msg_send_id![self, converter] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitAcceleration; + unsafe impl ClassType for NSUnitAcceleration { + type Super = NSDimension; + } +); +impl NSUnitAcceleration { + pub unsafe fn metersPerSecondSquared() -> Id { + msg_send_id![Self::class(), metersPerSecondSquared] + } + pub unsafe fn gravity() -> Id { + msg_send_id![Self::class(), gravity] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitAngle; + unsafe impl ClassType for NSUnitAngle { + type Super = NSDimension; + } +); +impl NSUnitAngle { + pub unsafe fn degrees() -> Id { + msg_send_id![Self::class(), degrees] + } + pub unsafe fn arcMinutes() -> Id { + msg_send_id![Self::class(), arcMinutes] + } + pub unsafe fn arcSeconds() -> Id { + msg_send_id![Self::class(), arcSeconds] + } + pub unsafe fn radians() -> Id { + msg_send_id![Self::class(), radians] + } + pub unsafe fn gradians() -> Id { + msg_send_id![Self::class(), gradians] + } + pub unsafe fn revolutions() -> Id { + msg_send_id![Self::class(), revolutions] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitArea; + unsafe impl ClassType for NSUnitArea { + type Super = NSDimension; + } +); +impl NSUnitArea { + pub unsafe fn squareMegameters() -> Id { + msg_send_id![Self::class(), squareMegameters] + } + pub unsafe fn squareKilometers() -> Id { + msg_send_id![Self::class(), squareKilometers] + } + pub unsafe fn squareMeters() -> Id { + msg_send_id![Self::class(), squareMeters] + } + pub unsafe fn squareCentimeters() -> Id { + msg_send_id![Self::class(), squareCentimeters] + } + pub unsafe fn squareMillimeters() -> Id { + msg_send_id![Self::class(), squareMillimeters] + } + pub unsafe fn squareMicrometers() -> Id { + msg_send_id![Self::class(), squareMicrometers] + } + pub unsafe fn squareNanometers() -> Id { + msg_send_id![Self::class(), squareNanometers] + } + pub unsafe fn squareInches() -> Id { + msg_send_id![Self::class(), squareInches] + } + pub unsafe fn squareFeet() -> Id { + msg_send_id![Self::class(), squareFeet] + } + pub unsafe fn squareYards() -> Id { + msg_send_id![Self::class(), squareYards] + } + pub unsafe fn squareMiles() -> Id { + msg_send_id![Self::class(), squareMiles] + } + pub unsafe fn acres() -> Id { + msg_send_id![Self::class(), acres] + } + pub unsafe fn ares() -> Id { + msg_send_id![Self::class(), ares] + } + pub unsafe fn hectares() -> Id { + msg_send_id![Self::class(), hectares] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitConcentrationMass; + unsafe impl ClassType for NSUnitConcentrationMass { + type Super = NSDimension; + } +); +impl NSUnitConcentrationMass { + pub unsafe fn millimolesPerLiterWithGramsPerMole( + gramsPerMole: c_double, + ) -> Id { + msg_send_id![ + Self::class(), + millimolesPerLiterWithGramsPerMole: gramsPerMole + ] + } + pub unsafe fn gramsPerLiter() -> Id { + msg_send_id![Self::class(), gramsPerLiter] + } + pub unsafe fn milligramsPerDeciliter() -> Id { + msg_send_id![Self::class(), milligramsPerDeciliter] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitDispersion; + unsafe impl ClassType for NSUnitDispersion { + type Super = NSDimension; + } +); +impl NSUnitDispersion { + pub unsafe fn partsPerMillion() -> Id { + msg_send_id![Self::class(), partsPerMillion] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitDuration; + unsafe impl ClassType for NSUnitDuration { + type Super = NSDimension; + } +); +impl NSUnitDuration { + pub unsafe fn hours() -> Id { + msg_send_id![Self::class(), hours] + } + pub unsafe fn minutes() -> Id { + msg_send_id![Self::class(), minutes] + } + pub unsafe fn seconds() -> Id { + msg_send_id![Self::class(), seconds] + } + pub unsafe fn milliseconds() -> Id { + msg_send_id![Self::class(), milliseconds] + } + pub unsafe fn microseconds() -> Id { + msg_send_id![Self::class(), microseconds] + } + pub unsafe fn nanoseconds() -> Id { + msg_send_id![Self::class(), nanoseconds] + } + pub unsafe fn picoseconds() -> Id { + msg_send_id![Self::class(), picoseconds] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitElectricCharge; + unsafe impl ClassType for NSUnitElectricCharge { + type Super = NSDimension; + } +); +impl NSUnitElectricCharge { + pub unsafe fn coulombs() -> Id { + msg_send_id![Self::class(), coulombs] + } + pub unsafe fn megaampereHours() -> Id { + msg_send_id![Self::class(), megaampereHours] + } + pub unsafe fn kiloampereHours() -> Id { + msg_send_id![Self::class(), kiloampereHours] + } + pub unsafe fn ampereHours() -> Id { + msg_send_id![Self::class(), ampereHours] + } + pub unsafe fn milliampereHours() -> Id { + msg_send_id![Self::class(), milliampereHours] + } + pub unsafe fn microampereHours() -> Id { + msg_send_id![Self::class(), microampereHours] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitElectricCurrent; + unsafe impl ClassType for NSUnitElectricCurrent { + type Super = NSDimension; + } +); +impl NSUnitElectricCurrent { + pub unsafe fn megaamperes() -> Id { + msg_send_id![Self::class(), megaamperes] + } + pub unsafe fn kiloamperes() -> Id { + msg_send_id![Self::class(), kiloamperes] + } + pub unsafe fn amperes() -> Id { + msg_send_id![Self::class(), amperes] + } + pub unsafe fn milliamperes() -> Id { + msg_send_id![Self::class(), milliamperes] + } + pub unsafe fn microamperes() -> Id { + msg_send_id![Self::class(), microamperes] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitElectricPotentialDifference; + unsafe impl ClassType for NSUnitElectricPotentialDifference { + type Super = NSDimension; + } +); +impl NSUnitElectricPotentialDifference { + pub unsafe fn megavolts() -> Id { + msg_send_id![Self::class(), megavolts] + } + pub unsafe fn kilovolts() -> Id { + msg_send_id![Self::class(), kilovolts] + } + pub unsafe fn volts() -> Id { + msg_send_id![Self::class(), volts] + } + pub unsafe fn millivolts() -> Id { + msg_send_id![Self::class(), millivolts] + } + pub unsafe fn microvolts() -> Id { + msg_send_id![Self::class(), microvolts] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitElectricResistance; + unsafe impl ClassType for NSUnitElectricResistance { + type Super = NSDimension; + } +); +impl NSUnitElectricResistance { + pub unsafe fn megaohms() -> Id { + msg_send_id![Self::class(), megaohms] + } + pub unsafe fn kiloohms() -> Id { + msg_send_id![Self::class(), kiloohms] + } + pub unsafe fn ohms() -> Id { + msg_send_id![Self::class(), ohms] + } + pub unsafe fn milliohms() -> Id { + msg_send_id![Self::class(), milliohms] + } + pub unsafe fn microohms() -> Id { + msg_send_id![Self::class(), microohms] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitEnergy; + unsafe impl ClassType for NSUnitEnergy { + type Super = NSDimension; + } +); +impl NSUnitEnergy { + pub unsafe fn kilojoules() -> Id { + msg_send_id![Self::class(), kilojoules] + } + pub unsafe fn joules() -> Id { + msg_send_id![Self::class(), joules] + } + pub unsafe fn kilocalories() -> Id { + msg_send_id![Self::class(), kilocalories] + } + pub unsafe fn calories() -> Id { + msg_send_id![Self::class(), calories] + } + pub unsafe fn kilowattHours() -> Id { + msg_send_id![Self::class(), kilowattHours] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitFrequency; + unsafe impl ClassType for NSUnitFrequency { + type Super = NSDimension; + } +); +impl NSUnitFrequency { + pub unsafe fn terahertz() -> Id { + msg_send_id![Self::class(), terahertz] + } + pub unsafe fn gigahertz() -> Id { + msg_send_id![Self::class(), gigahertz] + } + pub unsafe fn megahertz() -> Id { + msg_send_id![Self::class(), megahertz] + } + pub unsafe fn kilohertz() -> Id { + msg_send_id![Self::class(), kilohertz] + } + pub unsafe fn hertz() -> Id { + msg_send_id![Self::class(), hertz] + } + pub unsafe fn millihertz() -> Id { + msg_send_id![Self::class(), millihertz] + } + pub unsafe fn microhertz() -> Id { + msg_send_id![Self::class(), microhertz] + } + pub unsafe fn nanohertz() -> Id { + msg_send_id![Self::class(), nanohertz] + } + pub unsafe fn framesPerSecond() -> Id { + msg_send_id![Self::class(), framesPerSecond] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitFuelEfficiency; + unsafe impl ClassType for NSUnitFuelEfficiency { + type Super = NSDimension; + } +); +impl NSUnitFuelEfficiency { + pub unsafe fn litersPer100Kilometers() -> Id { + msg_send_id![Self::class(), litersPer100Kilometers] + } + pub unsafe fn milesPerImperialGallon() -> Id { + msg_send_id![Self::class(), milesPerImperialGallon] + } + pub unsafe fn milesPerGallon() -> Id { + msg_send_id![Self::class(), milesPerGallon] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitInformationStorage; + unsafe impl ClassType for NSUnitInformationStorage { + type Super = NSDimension; + } +); +impl NSUnitInformationStorage { + pub unsafe fn bytes() -> Id { + msg_send_id![Self::class(), bytes] + } + pub unsafe fn bits() -> Id { + msg_send_id![Self::class(), bits] + } + pub unsafe fn nibbles() -> Id { + msg_send_id![Self::class(), nibbles] + } + pub unsafe fn yottabytes() -> Id { + msg_send_id![Self::class(), yottabytes] + } + pub unsafe fn zettabytes() -> Id { + msg_send_id![Self::class(), zettabytes] + } + pub unsafe fn exabytes() -> Id { + msg_send_id![Self::class(), exabytes] + } + pub unsafe fn petabytes() -> Id { + msg_send_id![Self::class(), petabytes] + } + pub unsafe fn terabytes() -> Id { + msg_send_id![Self::class(), terabytes] + } + pub unsafe fn gigabytes() -> Id { + msg_send_id![Self::class(), gigabytes] + } + pub unsafe fn megabytes() -> Id { + msg_send_id![Self::class(), megabytes] + } + pub unsafe fn kilobytes() -> Id { + msg_send_id![Self::class(), kilobytes] + } + pub unsafe fn yottabits() -> Id { + msg_send_id![Self::class(), yottabits] + } + pub unsafe fn zettabits() -> Id { + msg_send_id![Self::class(), zettabits] + } + pub unsafe fn exabits() -> Id { + msg_send_id![Self::class(), exabits] + } + pub unsafe fn petabits() -> Id { + msg_send_id![Self::class(), petabits] + } + pub unsafe fn terabits() -> Id { + msg_send_id![Self::class(), terabits] + } + pub unsafe fn gigabits() -> Id { + msg_send_id![Self::class(), gigabits] + } + pub unsafe fn megabits() -> Id { + msg_send_id![Self::class(), megabits] + } + pub unsafe fn kilobits() -> Id { + msg_send_id![Self::class(), kilobits] + } + pub unsafe fn yobibytes() -> Id { + msg_send_id![Self::class(), yobibytes] + } + pub unsafe fn zebibytes() -> Id { + msg_send_id![Self::class(), zebibytes] + } + pub unsafe fn exbibytes() -> Id { + msg_send_id![Self::class(), exbibytes] + } + pub unsafe fn pebibytes() -> Id { + msg_send_id![Self::class(), pebibytes] + } + pub unsafe fn tebibytes() -> Id { + msg_send_id![Self::class(), tebibytes] + } + pub unsafe fn gibibytes() -> Id { + msg_send_id![Self::class(), gibibytes] + } + pub unsafe fn mebibytes() -> Id { + msg_send_id![Self::class(), mebibytes] + } + pub unsafe fn kibibytes() -> Id { + msg_send_id![Self::class(), kibibytes] + } + pub unsafe fn yobibits() -> Id { + msg_send_id![Self::class(), yobibits] + } + pub unsafe fn zebibits() -> Id { + msg_send_id![Self::class(), zebibits] + } + pub unsafe fn exbibits() -> Id { + msg_send_id![Self::class(), exbibits] + } + pub unsafe fn pebibits() -> Id { + msg_send_id![Self::class(), pebibits] + } + pub unsafe fn tebibits() -> Id { + msg_send_id![Self::class(), tebibits] + } + pub unsafe fn gibibits() -> Id { + msg_send_id![Self::class(), gibibits] + } + pub unsafe fn mebibits() -> Id { + msg_send_id![Self::class(), mebibits] + } + pub unsafe fn kibibits() -> Id { + msg_send_id![Self::class(), kibibits] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitLength; + unsafe impl ClassType for NSUnitLength { + type Super = NSDimension; + } +); +impl NSUnitLength { + pub unsafe fn megameters() -> Id { + msg_send_id![Self::class(), megameters] + } + pub unsafe fn kilometers() -> Id { + msg_send_id![Self::class(), kilometers] + } + pub unsafe fn hectometers() -> Id { + msg_send_id![Self::class(), hectometers] + } + pub unsafe fn decameters() -> Id { + msg_send_id![Self::class(), decameters] + } + pub unsafe fn meters() -> Id { + msg_send_id![Self::class(), meters] + } + pub unsafe fn decimeters() -> Id { + msg_send_id![Self::class(), decimeters] + } + pub unsafe fn centimeters() -> Id { + msg_send_id![Self::class(), centimeters] + } + pub unsafe fn millimeters() -> Id { + msg_send_id![Self::class(), millimeters] + } + pub unsafe fn micrometers() -> Id { + msg_send_id![Self::class(), micrometers] + } + pub unsafe fn nanometers() -> Id { + msg_send_id![Self::class(), nanometers] + } + pub unsafe fn picometers() -> Id { + msg_send_id![Self::class(), picometers] + } + pub unsafe fn inches() -> Id { + msg_send_id![Self::class(), inches] + } + pub unsafe fn feet() -> Id { + msg_send_id![Self::class(), feet] + } + pub unsafe fn yards() -> Id { + msg_send_id![Self::class(), yards] + } + pub unsafe fn miles() -> Id { + msg_send_id![Self::class(), miles] + } + pub unsafe fn scandinavianMiles() -> Id { + msg_send_id![Self::class(), scandinavianMiles] + } + pub unsafe fn lightyears() -> Id { + msg_send_id![Self::class(), lightyears] + } + pub unsafe fn nauticalMiles() -> Id { + msg_send_id![Self::class(), nauticalMiles] + } + pub unsafe fn fathoms() -> Id { + msg_send_id![Self::class(), fathoms] + } + pub unsafe fn furlongs() -> Id { + msg_send_id![Self::class(), furlongs] + } + pub unsafe fn astronomicalUnits() -> Id { + msg_send_id![Self::class(), astronomicalUnits] + } + pub unsafe fn parsecs() -> Id { + msg_send_id![Self::class(), parsecs] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitIlluminance; + unsafe impl ClassType for NSUnitIlluminance { + type Super = NSDimension; + } +); +impl NSUnitIlluminance { + pub unsafe fn lux() -> Id { + msg_send_id![Self::class(), lux] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitMass; + unsafe impl ClassType for NSUnitMass { + type Super = NSDimension; + } +); +impl NSUnitMass { + pub unsafe fn kilograms() -> Id { + msg_send_id![Self::class(), kilograms] + } + pub unsafe fn grams() -> Id { + msg_send_id![Self::class(), grams] + } + pub unsafe fn decigrams() -> Id { + msg_send_id![Self::class(), decigrams] + } + pub unsafe fn centigrams() -> Id { + msg_send_id![Self::class(), centigrams] + } + pub unsafe fn milligrams() -> Id { + msg_send_id![Self::class(), milligrams] + } + pub unsafe fn micrograms() -> Id { + msg_send_id![Self::class(), micrograms] + } + pub unsafe fn nanograms() -> Id { + msg_send_id![Self::class(), nanograms] + } + pub unsafe fn picograms() -> Id { + msg_send_id![Self::class(), picograms] + } + pub unsafe fn ounces() -> Id { + msg_send_id![Self::class(), ounces] + } + pub unsafe fn poundsMass() -> Id { + msg_send_id![Self::class(), poundsMass] + } + pub unsafe fn stones() -> Id { + msg_send_id![Self::class(), stones] + } + pub unsafe fn metricTons() -> Id { + msg_send_id![Self::class(), metricTons] + } + pub unsafe fn shortTons() -> Id { + msg_send_id![Self::class(), shortTons] + } + pub unsafe fn carats() -> Id { + msg_send_id![Self::class(), carats] + } + pub unsafe fn ouncesTroy() -> Id { + msg_send_id![Self::class(), ouncesTroy] + } + pub unsafe fn slugs() -> Id { + msg_send_id![Self::class(), slugs] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitPower; + unsafe impl ClassType for NSUnitPower { + type Super = NSDimension; + } +); +impl NSUnitPower { + pub unsafe fn terawatts() -> Id { + msg_send_id![Self::class(), terawatts] + } + pub unsafe fn gigawatts() -> Id { + msg_send_id![Self::class(), gigawatts] + } + pub unsafe fn megawatts() -> Id { + msg_send_id![Self::class(), megawatts] + } + pub unsafe fn kilowatts() -> Id { + msg_send_id![Self::class(), kilowatts] + } + pub unsafe fn watts() -> Id { + msg_send_id![Self::class(), watts] + } + pub unsafe fn milliwatts() -> Id { + msg_send_id![Self::class(), milliwatts] + } + pub unsafe fn microwatts() -> Id { + msg_send_id![Self::class(), microwatts] + } + pub unsafe fn nanowatts() -> Id { + msg_send_id![Self::class(), nanowatts] + } + pub unsafe fn picowatts() -> Id { + msg_send_id![Self::class(), picowatts] + } + pub unsafe fn femtowatts() -> Id { + msg_send_id![Self::class(), femtowatts] + } + pub unsafe fn horsepower() -> Id { + msg_send_id![Self::class(), horsepower] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitPressure; + unsafe impl ClassType for NSUnitPressure { + type Super = NSDimension; + } +); +impl NSUnitPressure { + pub unsafe fn newtonsPerMetersSquared() -> Id { + msg_send_id![Self::class(), newtonsPerMetersSquared] + } + pub unsafe fn gigapascals() -> Id { + msg_send_id![Self::class(), gigapascals] + } + pub unsafe fn megapascals() -> Id { + msg_send_id![Self::class(), megapascals] + } + pub unsafe fn kilopascals() -> Id { + msg_send_id![Self::class(), kilopascals] + } + pub unsafe fn hectopascals() -> Id { + msg_send_id![Self::class(), hectopascals] + } + pub unsafe fn inchesOfMercury() -> Id { + msg_send_id![Self::class(), inchesOfMercury] + } + pub unsafe fn bars() -> Id { + msg_send_id![Self::class(), bars] + } + pub unsafe fn millibars() -> Id { + msg_send_id![Self::class(), millibars] + } + pub unsafe fn millimetersOfMercury() -> Id { + msg_send_id![Self::class(), millimetersOfMercury] + } + pub unsafe fn poundsForcePerSquareInch() -> Id { + msg_send_id![Self::class(), poundsForcePerSquareInch] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitSpeed; + unsafe impl ClassType for NSUnitSpeed { + type Super = NSDimension; + } +); +impl NSUnitSpeed { + pub unsafe fn metersPerSecond() -> Id { + msg_send_id![Self::class(), metersPerSecond] + } + pub unsafe fn kilometersPerHour() -> Id { + msg_send_id![Self::class(), kilometersPerHour] + } + pub unsafe fn milesPerHour() -> Id { + msg_send_id![Self::class(), milesPerHour] + } + pub unsafe fn knots() -> Id { + msg_send_id![Self::class(), knots] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitTemperature; + unsafe impl ClassType for NSUnitTemperature { + type Super = NSDimension; + } +); +impl NSUnitTemperature { + pub unsafe fn kelvin() -> Id { + msg_send_id![Self::class(), kelvin] + } + pub unsafe fn celsius() -> Id { + msg_send_id![Self::class(), celsius] + } + pub unsafe fn fahrenheit() -> Id { + msg_send_id![Self::class(), fahrenheit] + } +} +extern_class!( + #[derive(Debug)] + struct NSUnitVolume; + unsafe impl ClassType for NSUnitVolume { + type Super = NSDimension; + } +); +impl NSUnitVolume { + pub unsafe fn megaliters() -> Id { + msg_send_id![Self::class(), megaliters] + } + pub unsafe fn kiloliters() -> Id { + msg_send_id![Self::class(), kiloliters] + } + pub unsafe fn liters() -> Id { + msg_send_id![Self::class(), liters] + } + pub unsafe fn deciliters() -> Id { + msg_send_id![Self::class(), deciliters] + } + pub unsafe fn centiliters() -> Id { + msg_send_id![Self::class(), centiliters] + } + pub unsafe fn milliliters() -> Id { + msg_send_id![Self::class(), milliliters] + } + pub unsafe fn cubicKilometers() -> Id { + msg_send_id![Self::class(), cubicKilometers] + } + pub unsafe fn cubicMeters() -> Id { + msg_send_id![Self::class(), cubicMeters] + } + pub unsafe fn cubicDecimeters() -> Id { + msg_send_id![Self::class(), cubicDecimeters] + } + pub unsafe fn cubicCentimeters() -> Id { + msg_send_id![Self::class(), cubicCentimeters] + } + pub unsafe fn cubicMillimeters() -> Id { + msg_send_id![Self::class(), cubicMillimeters] + } + pub unsafe fn cubicInches() -> Id { + msg_send_id![Self::class(), cubicInches] + } + pub unsafe fn cubicFeet() -> Id { + msg_send_id![Self::class(), cubicFeet] + } + pub unsafe fn cubicYards() -> Id { + msg_send_id![Self::class(), cubicYards] + } + pub unsafe fn cubicMiles() -> Id { + msg_send_id![Self::class(), cubicMiles] + } + pub unsafe fn acreFeet() -> Id { + msg_send_id![Self::class(), acreFeet] + } + pub unsafe fn bushels() -> Id { + msg_send_id![Self::class(), bushels] + } + pub unsafe fn teaspoons() -> Id { + msg_send_id![Self::class(), teaspoons] + } + pub unsafe fn tablespoons() -> Id { + msg_send_id![Self::class(), tablespoons] + } + pub unsafe fn fluidOunces() -> Id { + msg_send_id![Self::class(), fluidOunces] + } + pub unsafe fn cups() -> Id { + msg_send_id![Self::class(), cups] + } + pub unsafe fn pints() -> Id { + msg_send_id![Self::class(), pints] + } + pub unsafe fn quarts() -> Id { + msg_send_id![Self::class(), quarts] + } + pub unsafe fn gallons() -> Id { + msg_send_id![Self::class(), gallons] + } + pub unsafe fn imperialTeaspoons() -> Id { + msg_send_id![Self::class(), imperialTeaspoons] + } + pub unsafe fn imperialTablespoons() -> Id { + msg_send_id![Self::class(), imperialTablespoons] + } + pub unsafe fn imperialFluidOunces() -> Id { + msg_send_id![Self::class(), imperialFluidOunces] + } + pub unsafe fn imperialPints() -> Id { + msg_send_id![Self::class(), imperialPints] + } + pub unsafe fn imperialQuarts() -> Id { + msg_send_id![Self::class(), imperialQuarts] + } + pub unsafe fn imperialGallons() -> Id { + msg_send_id![Self::class(), imperialGallons] + } + pub unsafe fn metricCups() -> Id { + msg_send_id![Self::class(), metricCups] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs new file mode 100644 index 000000000..472f29ce9 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -0,0 +1,157 @@ +extern_class!( + #[derive(Debug)] + struct NSUserActivity; + unsafe impl ClassType for NSUserActivity { + type Super = NSObject; + } +); +impl NSUserActivity { + pub unsafe fn initWithActivityType(&self, activityType: &NSString) -> Id { + msg_send_id![self, initWithActivityType: activityType] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn addUserInfoEntriesFromDictionary(&self, otherDictionary: &NSDictionary) { + msg_send![self, addUserInfoEntriesFromDictionary: otherDictionary] + } + pub unsafe fn becomeCurrent(&self) { + msg_send![self, becomeCurrent] + } + pub unsafe fn resignCurrent(&self) { + msg_send![self, resignCurrent] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn getContinuationStreamsWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![ + self, + getContinuationStreamsWithCompletionHandler: completionHandler + ] + } + pub unsafe fn deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler( + persistentIdentifiers: TodoGenerics, + handler: TodoBlock, + ) { + msg_send![ + Self::class(), + deleteSavedUserActivitiesWithPersistentIdentifiers: persistentIdentifiers, + completionHandler: handler + ] + } + pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: TodoBlock) { + msg_send![ + Self::class(), + deleteAllSavedUserActivitiesWithCompletionHandler: handler + ] + } + pub unsafe fn activityType(&self) -> Id { + msg_send_id![self, activityType] + } + pub unsafe fn title(&self) -> Option> { + msg_send_id![self, title] + } + pub unsafe fn setTitle(&self, title: Option<&NSString>) { + msg_send![self, setTitle: title] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { + msg_send![self, setUserInfo: userInfo] + } + pub unsafe fn requiredUserInfoKeys(&self) -> TodoGenerics { + msg_send![self, requiredUserInfoKeys] + } + pub unsafe fn setRequiredUserInfoKeys(&self, requiredUserInfoKeys: TodoGenerics) { + msg_send![self, setRequiredUserInfoKeys: requiredUserInfoKeys] + } + pub unsafe fn needsSave(&self) -> bool { + msg_send![self, needsSave] + } + pub unsafe fn setNeedsSave(&self, needsSave: bool) { + msg_send![self, setNeedsSave: needsSave] + } + pub unsafe fn webpageURL(&self) -> Option> { + msg_send_id![self, webpageURL] + } + pub unsafe fn setWebpageURL(&self, webpageURL: Option<&NSURL>) { + msg_send![self, setWebpageURL: webpageURL] + } + pub unsafe fn referrerURL(&self) -> Option> { + msg_send_id![self, referrerURL] + } + pub unsafe fn setReferrerURL(&self, referrerURL: Option<&NSURL>) { + msg_send![self, setReferrerURL: referrerURL] + } + pub unsafe fn expirationDate(&self) -> Option> { + msg_send_id![self, expirationDate] + } + pub unsafe fn setExpirationDate(&self, expirationDate: Option<&NSDate>) { + msg_send![self, setExpirationDate: expirationDate] + } + pub unsafe fn keywords(&self) -> TodoGenerics { + msg_send![self, keywords] + } + pub unsafe fn setKeywords(&self, keywords: TodoGenerics) { + msg_send![self, setKeywords: keywords] + } + pub unsafe fn supportsContinuationStreams(&self) -> bool { + msg_send![self, supportsContinuationStreams] + } + pub unsafe fn setSupportsContinuationStreams(&self, supportsContinuationStreams: bool) { + msg_send![ + self, + setSupportsContinuationStreams: supportsContinuationStreams + ] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn targetContentIdentifier(&self) -> Option> { + msg_send_id![self, targetContentIdentifier] + } + pub unsafe fn setTargetContentIdentifier(&self, targetContentIdentifier: Option<&NSString>) { + msg_send![self, setTargetContentIdentifier: targetContentIdentifier] + } + pub unsafe fn isEligibleForHandoff(&self) -> bool { + msg_send![self, isEligibleForHandoff] + } + pub unsafe fn setEligibleForHandoff(&self, eligibleForHandoff: bool) { + msg_send![self, setEligibleForHandoff: eligibleForHandoff] + } + pub unsafe fn isEligibleForSearch(&self) -> bool { + msg_send![self, isEligibleForSearch] + } + pub unsafe fn setEligibleForSearch(&self, eligibleForSearch: bool) { + msg_send![self, setEligibleForSearch: eligibleForSearch] + } + pub unsafe fn isEligibleForPublicIndexing(&self) -> bool { + msg_send![self, isEligibleForPublicIndexing] + } + pub unsafe fn setEligibleForPublicIndexing(&self, eligibleForPublicIndexing: bool) { + msg_send![ + self, + setEligibleForPublicIndexing: eligibleForPublicIndexing + ] + } + pub unsafe fn isEligibleForPrediction(&self) -> bool { + msg_send![self, isEligibleForPrediction] + } + pub unsafe fn setEligibleForPrediction(&self, eligibleForPrediction: bool) { + msg_send![self, setEligibleForPrediction: eligibleForPrediction] + } + pub unsafe fn persistentIdentifier(&self) -> NSUserActivityPersistentIdentifier { + msg_send![self, persistentIdentifier] + } + pub unsafe fn setPersistentIdentifier( + &self, + persistentIdentifier: NSUserActivityPersistentIdentifier, + ) { + msg_send![self, setPersistentIdentifier: persistentIdentifier] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs new file mode 100644 index 000000000..e9ef361b4 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -0,0 +1,126 @@ +extern_class!( + #[derive(Debug)] + struct NSUserDefaults; + unsafe impl ClassType for NSUserDefaults { + type Super = NSObject; + } +); +impl NSUserDefaults { + pub unsafe fn resetStandardUserDefaults() { + msg_send![Self::class(), resetStandardUserDefaults] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithSuiteName( + &self, + suitename: Option<&NSString>, + ) -> Option> { + msg_send_id![self, initWithSuiteName: suitename] + } + pub unsafe fn initWithUser(&self, username: &NSString) -> Option> { + msg_send_id![self, initWithUser: username] + } + pub unsafe fn objectForKey(&self, defaultName: &NSString) -> Option> { + msg_send_id![self, objectForKey: defaultName] + } + pub unsafe fn setObject_forKey(&self, value: Option<&Object>, defaultName: &NSString) { + msg_send![self, setObject: value, forKey: defaultName] + } + pub unsafe fn removeObjectForKey(&self, defaultName: &NSString) { + msg_send![self, removeObjectForKey: defaultName] + } + pub unsafe fn stringForKey(&self, defaultName: &NSString) -> Option> { + msg_send_id![self, stringForKey: defaultName] + } + pub unsafe fn arrayForKey(&self, defaultName: &NSString) -> Option> { + msg_send_id![self, arrayForKey: defaultName] + } + pub unsafe fn dictionaryForKey(&self, defaultName: &NSString) -> TodoGenerics { + msg_send![self, dictionaryForKey: defaultName] + } + pub unsafe fn dataForKey(&self, defaultName: &NSString) -> Option> { + msg_send_id![self, dataForKey: defaultName] + } + pub unsafe fn stringArrayForKey(&self, defaultName: &NSString) -> TodoGenerics { + msg_send![self, stringArrayForKey: defaultName] + } + pub unsafe fn integerForKey(&self, defaultName: &NSString) -> NSInteger { + msg_send![self, integerForKey: defaultName] + } + pub unsafe fn floatForKey(&self, defaultName: &NSString) -> c_float { + msg_send![self, floatForKey: defaultName] + } + pub unsafe fn doubleForKey(&self, defaultName: &NSString) -> c_double { + msg_send![self, doubleForKey: defaultName] + } + pub unsafe fn boolForKey(&self, defaultName: &NSString) -> bool { + msg_send![self, boolForKey: defaultName] + } + pub unsafe fn URLForKey(&self, defaultName: &NSString) -> Option> { + msg_send_id![self, URLForKey: defaultName] + } + pub unsafe fn setInteger_forKey(&self, value: NSInteger, defaultName: &NSString) { + msg_send![self, setInteger: value, forKey: defaultName] + } + pub unsafe fn setFloat_forKey(&self, value: c_float, defaultName: &NSString) { + msg_send![self, setFloat: value, forKey: defaultName] + } + pub unsafe fn setDouble_forKey(&self, value: c_double, defaultName: &NSString) { + msg_send![self, setDouble: value, forKey: defaultName] + } + pub unsafe fn setBool_forKey(&self, value: bool, defaultName: &NSString) { + msg_send![self, setBool: value, forKey: defaultName] + } + pub unsafe fn setURL_forKey(&self, url: Option<&NSURL>, defaultName: &NSString) { + msg_send![self, setURL: url, forKey: defaultName] + } + pub unsafe fn registerDefaults(&self, registrationDictionary: TodoGenerics) { + msg_send![self, registerDefaults: registrationDictionary] + } + pub unsafe fn addSuiteNamed(&self, suiteName: &NSString) { + msg_send![self, addSuiteNamed: suiteName] + } + pub unsafe fn removeSuiteNamed(&self, suiteName: &NSString) { + msg_send![self, removeSuiteNamed: suiteName] + } + pub unsafe fn dictionaryRepresentation(&self) -> TodoGenerics { + msg_send![self, dictionaryRepresentation] + } + pub unsafe fn volatileDomainForName(&self, domainName: &NSString) -> TodoGenerics { + msg_send![self, volatileDomainForName: domainName] + } + pub unsafe fn setVolatileDomain_forName(&self, domain: TodoGenerics, domainName: &NSString) { + msg_send![self, setVolatileDomain: domain, forName: domainName] + } + pub unsafe fn removeVolatileDomainForName(&self, domainName: &NSString) { + msg_send![self, removeVolatileDomainForName: domainName] + } + pub unsafe fn persistentDomainNames(&self) -> Id { + msg_send_id![self, persistentDomainNames] + } + pub unsafe fn persistentDomainForName(&self, domainName: &NSString) -> TodoGenerics { + msg_send![self, persistentDomainForName: domainName] + } + pub unsafe fn setPersistentDomain_forName(&self, domain: TodoGenerics, domainName: &NSString) { + msg_send![self, setPersistentDomain: domain, forName: domainName] + } + pub unsafe fn removePersistentDomainForName(&self, domainName: &NSString) { + msg_send![self, removePersistentDomainForName: domainName] + } + pub unsafe fn synchronize(&self) -> bool { + msg_send![self, synchronize] + } + pub unsafe fn objectIsForcedForKey(&self, key: &NSString) -> bool { + msg_send![self, objectIsForcedForKey: key] + } + pub unsafe fn objectIsForcedForKey_inDomain(&self, key: &NSString, domain: &NSString) -> bool { + msg_send![self, objectIsForcedForKey: key, inDomain: domain] + } + pub unsafe fn standardUserDefaults() -> Id { + msg_send_id![Self::class(), standardUserDefaults] + } + pub unsafe fn volatileDomainNames(&self) -> TodoGenerics { + msg_send![self, volatileDomainNames] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs new file mode 100644 index 000000000..dc0c6fa48 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -0,0 +1,198 @@ +extern_class!( + #[derive(Debug)] + struct NSUserNotification; + unsafe impl ClassType for NSUserNotification { + type Super = NSObject; + } +); +impl NSUserNotification { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn title(&self) -> Option> { + msg_send_id![self, title] + } + pub unsafe fn setTitle(&self, title: Option<&NSString>) { + msg_send![self, setTitle: title] + } + pub unsafe fn subtitle(&self) -> Option> { + msg_send_id![self, subtitle] + } + pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>) { + msg_send![self, setSubtitle: subtitle] + } + pub unsafe fn informativeText(&self) -> Option> { + msg_send_id![self, informativeText] + } + pub unsafe fn setInformativeText(&self, informativeText: Option<&NSString>) { + msg_send![self, setInformativeText: informativeText] + } + pub unsafe fn actionButtonTitle(&self) -> Id { + msg_send_id![self, actionButtonTitle] + } + pub unsafe fn setActionButtonTitle(&self, actionButtonTitle: &NSString) { + msg_send![self, setActionButtonTitle: actionButtonTitle] + } + pub unsafe fn userInfo(&self) -> TodoGenerics { + msg_send![self, userInfo] + } + pub unsafe fn setUserInfo(&self, userInfo: TodoGenerics) { + msg_send![self, setUserInfo: userInfo] + } + pub unsafe fn deliveryDate(&self) -> Option> { + msg_send_id![self, deliveryDate] + } + pub unsafe fn setDeliveryDate(&self, deliveryDate: Option<&NSDate>) { + msg_send![self, setDeliveryDate: deliveryDate] + } + pub unsafe fn deliveryTimeZone(&self) -> Option> { + msg_send_id![self, deliveryTimeZone] + } + pub unsafe fn setDeliveryTimeZone(&self, deliveryTimeZone: Option<&NSTimeZone>) { + msg_send![self, setDeliveryTimeZone: deliveryTimeZone] + } + pub unsafe fn deliveryRepeatInterval(&self) -> Option> { + msg_send_id![self, deliveryRepeatInterval] + } + pub unsafe fn setDeliveryRepeatInterval( + &self, + deliveryRepeatInterval: Option<&NSDateComponents>, + ) { + msg_send![self, setDeliveryRepeatInterval: deliveryRepeatInterval] + } + pub unsafe fn actualDeliveryDate(&self) -> Option> { + msg_send_id![self, actualDeliveryDate] + } + pub unsafe fn isPresented(&self) -> bool { + msg_send![self, isPresented] + } + pub unsafe fn isRemote(&self) -> bool { + msg_send![self, isRemote] + } + pub unsafe fn soundName(&self) -> Option> { + msg_send_id![self, soundName] + } + pub unsafe fn setSoundName(&self, soundName: Option<&NSString>) { + msg_send![self, setSoundName: soundName] + } + pub unsafe fn hasActionButton(&self) -> bool { + msg_send![self, hasActionButton] + } + pub unsafe fn setHasActionButton(&self, hasActionButton: bool) { + msg_send![self, setHasActionButton: hasActionButton] + } + pub unsafe fn activationType(&self) -> NSUserNotificationActivationType { + msg_send![self, activationType] + } + pub unsafe fn otherButtonTitle(&self) -> Id { + msg_send_id![self, otherButtonTitle] + } + pub unsafe fn setOtherButtonTitle(&self, otherButtonTitle: &NSString) { + msg_send![self, setOtherButtonTitle: otherButtonTitle] + } + pub unsafe fn identifier(&self) -> Option> { + msg_send_id![self, identifier] + } + pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>) { + msg_send![self, setIdentifier: identifier] + } + pub unsafe fn contentImage(&self) -> Option> { + msg_send_id![self, contentImage] + } + pub unsafe fn setContentImage(&self, contentImage: Option<&NSImage>) { + msg_send![self, setContentImage: contentImage] + } + pub unsafe fn hasReplyButton(&self) -> bool { + msg_send![self, hasReplyButton] + } + pub unsafe fn setHasReplyButton(&self, hasReplyButton: bool) { + msg_send![self, setHasReplyButton: hasReplyButton] + } + pub unsafe fn responsePlaceholder(&self) -> Option> { + msg_send_id![self, responsePlaceholder] + } + pub unsafe fn setResponsePlaceholder(&self, responsePlaceholder: Option<&NSString>) { + msg_send![self, setResponsePlaceholder: responsePlaceholder] + } + pub unsafe fn response(&self) -> Option> { + msg_send_id![self, response] + } + pub unsafe fn additionalActions(&self) -> TodoGenerics { + msg_send![self, additionalActions] + } + pub unsafe fn setAdditionalActions(&self, additionalActions: TodoGenerics) { + msg_send![self, setAdditionalActions: additionalActions] + } + pub unsafe fn additionalActivationAction( + &self, + ) -> Option> { + msg_send_id![self, additionalActivationAction] + } +} +extern_class!( + #[derive(Debug)] + struct NSUserNotificationAction; + unsafe impl ClassType for NSUserNotificationAction { + type Super = NSObject; + } +); +impl NSUserNotificationAction { + pub unsafe fn actionWithIdentifier_title( + identifier: Option<&NSString>, + title: Option<&NSString>, + ) -> Id { + msg_send_id![ + Self::class(), + actionWithIdentifier: identifier, + title: title + ] + } + pub unsafe fn identifier(&self) -> Option> { + msg_send_id![self, identifier] + } + pub unsafe fn title(&self) -> Option> { + msg_send_id![self, title] + } +} +extern_class!( + #[derive(Debug)] + struct NSUserNotificationCenter; + unsafe impl ClassType for NSUserNotificationCenter { + type Super = NSObject; + } +); +impl NSUserNotificationCenter { + pub unsafe fn scheduleNotification(&self, notification: &NSUserNotification) { + msg_send![self, scheduleNotification: notification] + } + pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification) { + msg_send![self, removeScheduledNotification: notification] + } + pub unsafe fn deliverNotification(&self, notification: &NSUserNotification) { + msg_send![self, deliverNotification: notification] + } + pub unsafe fn removeDeliveredNotification(&self, notification: &NSUserNotification) { + msg_send![self, removeDeliveredNotification: notification] + } + pub unsafe fn removeAllDeliveredNotifications(&self) { + msg_send![self, removeAllDeliveredNotifications] + } + pub unsafe fn defaultUserNotificationCenter() -> Id { + msg_send_id![Self::class(), defaultUserNotificationCenter] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn scheduledNotifications(&self) -> TodoGenerics { + msg_send![self, scheduledNotifications] + } + pub unsafe fn setScheduledNotifications(&self, scheduledNotifications: TodoGenerics) { + msg_send![self, setScheduledNotifications: scheduledNotifications] + } + pub unsafe fn deliveredNotifications(&self) -> TodoGenerics { + msg_send![self, deliveredNotifications] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs new file mode 100644 index 000000000..67a90b502 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -0,0 +1,102 @@ +extern_class!( + #[derive(Debug)] + struct NSUserScriptTask; + unsafe impl ClassType for NSUserScriptTask { + type Super = NSObject; + } +); +impl NSUserScriptTask { + pub unsafe fn initWithURL_error( + &self, + url: &NSURL, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, initWithURL: url, error: error] + } + pub unsafe fn executeWithCompletionHandler(&self, handler: NSUserScriptTaskCompletionHandler) { + msg_send![self, executeWithCompletionHandler: handler] + } + pub unsafe fn scriptURL(&self) -> Id { + msg_send_id![self, scriptURL] + } +} +extern_class!( + #[derive(Debug)] + struct NSUserUnixTask; + unsafe impl ClassType for NSUserUnixTask { + type Super = NSUserScriptTask; + } +); +impl NSUserUnixTask { + pub unsafe fn executeWithArguments_completionHandler( + &self, + arguments: TodoGenerics, + handler: NSUserUnixTaskCompletionHandler, + ) { + msg_send![ + self, + executeWithArguments: arguments, + completionHandler: handler + ] + } + pub unsafe fn standardInput(&self) -> Option> { + msg_send_id![self, standardInput] + } + pub unsafe fn setStandardInput(&self, standardInput: Option<&NSFileHandle>) { + msg_send![self, setStandardInput: standardInput] + } + pub unsafe fn standardOutput(&self) -> Option> { + msg_send_id![self, standardOutput] + } + pub unsafe fn setStandardOutput(&self, standardOutput: Option<&NSFileHandle>) { + msg_send![self, setStandardOutput: standardOutput] + } + pub unsafe fn standardError(&self) -> Option> { + msg_send_id![self, standardError] + } + pub unsafe fn setStandardError(&self, standardError: Option<&NSFileHandle>) { + msg_send![self, setStandardError: standardError] + } +} +extern_class!( + #[derive(Debug)] + struct NSUserAppleScriptTask; + unsafe impl ClassType for NSUserAppleScriptTask { + type Super = NSUserScriptTask; + } +); +impl NSUserAppleScriptTask { + pub unsafe fn executeWithAppleEvent_completionHandler( + &self, + event: Option<&NSAppleEventDescriptor>, + handler: NSUserAppleScriptTaskCompletionHandler, + ) { + msg_send![ + self, + executeWithAppleEvent: event, + completionHandler: handler + ] + } +} +extern_class!( + #[derive(Debug)] + struct NSUserAutomatorTask; + unsafe impl ClassType for NSUserAutomatorTask { + type Super = NSUserScriptTask; + } +); +impl NSUserAutomatorTask { + pub unsafe fn executeWithInput_completionHandler( + &self, + input: TodoGenerics, + handler: NSUserAutomatorTaskCompletionHandler, + ) { + msg_send![self, executeWithInput: input, completionHandler: handler] + } + pub unsafe fn variables(&self) -> TodoGenerics { + msg_send![self, variables] + } + pub unsafe fn setVariables(&self, variables: TodoGenerics) { + msg_send![self, setVariables: variables] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs new file mode 100644 index 000000000..d2495271c --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -0,0 +1,226 @@ +extern_class!( + #[derive(Debug)] + struct NSValue; + unsafe impl ClassType for NSValue { + type Super = NSObject; + } +); +impl NSValue { + pub unsafe fn getValue_size(&self, value: NonNull, size: NSUInteger) { + msg_send![self, getValue: value, size: size] + } + pub unsafe fn initWithBytes_objCType( + &self, + value: NonNull, + type_: NonNull, + ) -> Id { + msg_send_id![self, initWithBytes: value, objCType: type_] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn objCType(&self) -> NonNull { + msg_send![self, objCType] + } +} +#[doc = "NSValueCreation"] +impl NSValue { + pub unsafe fn valueWithBytes_objCType( + value: NonNull, + type_: NonNull, + ) -> Id { + msg_send_id![Self::class(), valueWithBytes: value, objCType: type_] + } + pub unsafe fn value_withObjCType( + value: NonNull, + type_: NonNull, + ) -> Id { + msg_send_id![Self::class(), value: value, withObjCType: type_] + } +} +#[doc = "NSValueExtensionMethods"] +impl NSValue { + pub unsafe fn valueWithNonretainedObject(anObject: Option<&Object>) -> Id { + msg_send_id![Self::class(), valueWithNonretainedObject: anObject] + } + pub unsafe fn valueWithPointer(pointer: *mut c_void) -> Id { + msg_send_id![Self::class(), valueWithPointer: pointer] + } + pub unsafe fn isEqualToValue(&self, value: &NSValue) -> bool { + msg_send![self, isEqualToValue: value] + } + pub unsafe fn nonretainedObjectValue(&self) -> Option> { + msg_send_id![self, nonretainedObjectValue] + } + pub unsafe fn pointerValue(&self) -> *mut c_void { + msg_send![self, pointerValue] + } +} +extern_class!( + #[derive(Debug)] + struct NSNumber; + unsafe impl ClassType for NSNumber { + type Super = NSValue; + } +); +impl NSNumber { + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn initWithChar(&self, value: c_char) -> Id { + msg_send_id![self, initWithChar: value] + } + pub unsafe fn initWithUnsignedChar(&self, value: c_uchar) -> Id { + msg_send_id![self, initWithUnsignedChar: value] + } + pub unsafe fn initWithShort(&self, value: c_short) -> Id { + msg_send_id![self, initWithShort: value] + } + pub unsafe fn initWithUnsignedShort(&self, value: c_ushort) -> Id { + msg_send_id![self, initWithUnsignedShort: value] + } + pub unsafe fn initWithInt(&self, value: c_int) -> Id { + msg_send_id![self, initWithInt: value] + } + pub unsafe fn initWithUnsignedInt(&self, value: c_uint) -> Id { + msg_send_id![self, initWithUnsignedInt: value] + } + pub unsafe fn initWithLong(&self, value: c_long) -> Id { + msg_send_id![self, initWithLong: value] + } + pub unsafe fn initWithUnsignedLong(&self, value: c_ulong) -> Id { + msg_send_id![self, initWithUnsignedLong: value] + } + pub unsafe fn initWithLongLong(&self, value: c_longlong) -> Id { + msg_send_id![self, initWithLongLong: value] + } + pub unsafe fn initWithUnsignedLongLong(&self, value: c_ulonglong) -> Id { + msg_send_id![self, initWithUnsignedLongLong: value] + } + pub unsafe fn initWithFloat(&self, value: c_float) -> Id { + msg_send_id![self, initWithFloat: value] + } + pub unsafe fn initWithDouble(&self, value: c_double) -> Id { + msg_send_id![self, initWithDouble: value] + } + pub unsafe fn initWithBool(&self, value: bool) -> Id { + msg_send_id![self, initWithBool: value] + } + pub unsafe fn initWithInteger(&self, value: NSInteger) -> Id { + msg_send_id![self, initWithInteger: value] + } + pub unsafe fn initWithUnsignedInteger(&self, value: NSUInteger) -> Id { + msg_send_id![self, initWithUnsignedInteger: value] + } + pub unsafe fn compare(&self, otherNumber: &NSNumber) -> NSComparisonResult { + msg_send![self, compare: otherNumber] + } + pub unsafe fn isEqualToNumber(&self, number: &NSNumber) -> bool { + msg_send![self, isEqualToNumber: number] + } + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn charValue(&self) -> c_char { + msg_send![self, charValue] + } + pub unsafe fn unsignedCharValue(&self) -> c_uchar { + msg_send![self, unsignedCharValue] + } + pub unsafe fn shortValue(&self) -> c_short { + msg_send![self, shortValue] + } + pub unsafe fn unsignedShortValue(&self) -> c_ushort { + msg_send![self, unsignedShortValue] + } + pub unsafe fn intValue(&self) -> c_int { + msg_send![self, intValue] + } + pub unsafe fn unsignedIntValue(&self) -> c_uint { + msg_send![self, unsignedIntValue] + } + pub unsafe fn longValue(&self) -> c_long { + msg_send![self, longValue] + } + pub unsafe fn unsignedLongValue(&self) -> c_ulong { + msg_send![self, unsignedLongValue] + } + pub unsafe fn longLongValue(&self) -> c_longlong { + msg_send![self, longLongValue] + } + pub unsafe fn unsignedLongLongValue(&self) -> c_ulonglong { + msg_send![self, unsignedLongLongValue] + } + pub unsafe fn floatValue(&self) -> c_float { + msg_send![self, floatValue] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } + pub unsafe fn boolValue(&self) -> bool { + msg_send![self, boolValue] + } + pub unsafe fn integerValue(&self) -> NSInteger { + msg_send![self, integerValue] + } + pub unsafe fn unsignedIntegerValue(&self) -> NSUInteger { + msg_send![self, unsignedIntegerValue] + } + pub unsafe fn stringValue(&self) -> Id { + msg_send_id![self, stringValue] + } +} +#[doc = "NSNumberCreation"] +impl NSNumber { + pub unsafe fn numberWithChar(value: c_char) -> Id { + msg_send_id![Self::class(), numberWithChar: value] + } + pub unsafe fn numberWithUnsignedChar(value: c_uchar) -> Id { + msg_send_id![Self::class(), numberWithUnsignedChar: value] + } + pub unsafe fn numberWithShort(value: c_short) -> Id { + msg_send_id![Self::class(), numberWithShort: value] + } + pub unsafe fn numberWithUnsignedShort(value: c_ushort) -> Id { + msg_send_id![Self::class(), numberWithUnsignedShort: value] + } + pub unsafe fn numberWithInt(value: c_int) -> Id { + msg_send_id![Self::class(), numberWithInt: value] + } + pub unsafe fn numberWithUnsignedInt(value: c_uint) -> Id { + msg_send_id![Self::class(), numberWithUnsignedInt: value] + } + pub unsafe fn numberWithLong(value: c_long) -> Id { + msg_send_id![Self::class(), numberWithLong: value] + } + pub unsafe fn numberWithUnsignedLong(value: c_ulong) -> Id { + msg_send_id![Self::class(), numberWithUnsignedLong: value] + } + pub unsafe fn numberWithLongLong(value: c_longlong) -> Id { + msg_send_id![Self::class(), numberWithLongLong: value] + } + pub unsafe fn numberWithUnsignedLongLong(value: c_ulonglong) -> Id { + msg_send_id![Self::class(), numberWithUnsignedLongLong: value] + } + pub unsafe fn numberWithFloat(value: c_float) -> Id { + msg_send_id![Self::class(), numberWithFloat: value] + } + pub unsafe fn numberWithDouble(value: c_double) -> Id { + msg_send_id![Self::class(), numberWithDouble: value] + } + pub unsafe fn numberWithBool(value: bool) -> Id { + msg_send_id![Self::class(), numberWithBool: value] + } + pub unsafe fn numberWithInteger(value: NSInteger) -> Id { + msg_send_id![Self::class(), numberWithInteger: value] + } + pub unsafe fn numberWithUnsignedInteger(value: NSUInteger) -> Id { + msg_send_id![Self::class(), numberWithUnsignedInteger: value] + } +} +#[doc = "NSDeprecated"] +impl NSValue { + pub unsafe fn getValue(&self, value: NonNull) { + msg_send![self, getValue: value] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs new file mode 100644 index 000000000..5af6b5dcc --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -0,0 +1,54 @@ +extern_class!( + #[derive(Debug)] + struct NSValueTransformer; + unsafe impl ClassType for NSValueTransformer { + type Super = NSObject; + } +); +impl NSValueTransformer { + pub unsafe fn setValueTransformer_forName( + transformer: Option<&NSValueTransformer>, + name: NSValueTransformerName, + ) { + msg_send![ + Self::class(), + setValueTransformer: transformer, + forName: name + ] + } + pub unsafe fn valueTransformerForName( + name: NSValueTransformerName, + ) -> Option> { + msg_send_id![Self::class(), valueTransformerForName: name] + } + pub unsafe fn valueTransformerNames() -> TodoGenerics { + msg_send![Self::class(), valueTransformerNames] + } + pub unsafe fn transformedValueClass() -> &Class { + msg_send![Self::class(), transformedValueClass] + } + pub unsafe fn allowsReverseTransformation() -> bool { + msg_send![Self::class(), allowsReverseTransformation] + } + pub unsafe fn transformedValue(&self, value: Option<&Object>) -> Option> { + msg_send_id![self, transformedValue: value] + } + pub unsafe fn reverseTransformedValue( + &self, + value: Option<&Object>, + ) -> Option> { + msg_send_id![self, reverseTransformedValue: value] + } +} +extern_class!( + #[derive(Debug)] + struct NSSecureUnarchiveFromDataTransformer; + unsafe impl ClassType for NSSecureUnarchiveFromDataTransformer { + type Super = NSValueTransformer; + } +); +impl NSSecureUnarchiveFromDataTransformer { + pub unsafe fn allowedTopLevelClasses() -> TodoGenerics { + msg_send![Self::class(), allowedTopLevelClasses] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs new file mode 100644 index 000000000..2b40c7864 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -0,0 +1,104 @@ +extern_class!( + #[derive(Debug)] + struct NSXMLDTD; + unsafe impl ClassType for NSXMLDTD { + type Super = NSXMLNode; + } +); +impl NSXMLDTD { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithKind_options( + &self, + kind: NSXMLNodeKind, + options: NSXMLNodeOptions, + ) -> Id { + msg_send_id![self, initWithKind: kind, options: options] + } + pub unsafe fn initWithContentsOfURL_options_error( + &self, + url: &NSURL, + mask: NSXMLNodeOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithContentsOfURL: url, + options: mask, + error: error + ] + } + pub unsafe fn initWithData_options_error( + &self, + data: &NSData, + mask: NSXMLNodeOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, initWithData: data, options: mask, error: error] + } + pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { + msg_send![self, insertChild: child, atIndex: index] + } + pub unsafe fn insertChildren_atIndex(&self, children: TodoGenerics, index: NSUInteger) { + msg_send![self, insertChildren: children, atIndex: index] + } + pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { + msg_send![self, removeChildAtIndex: index] + } + pub unsafe fn setChildren(&self, children: TodoGenerics) { + msg_send![self, setChildren: children] + } + pub unsafe fn addChild(&self, child: &NSXMLNode) { + msg_send![self, addChild: child] + } + pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { + msg_send![self, replaceChildAtIndex: index, withNode: node] + } + pub unsafe fn entityDeclarationForName( + &self, + name: &NSString, + ) -> Option> { + msg_send_id![self, entityDeclarationForName: name] + } + pub unsafe fn notationDeclarationForName( + &self, + name: &NSString, + ) -> Option> { + msg_send_id![self, notationDeclarationForName: name] + } + pub unsafe fn elementDeclarationForName( + &self, + name: &NSString, + ) -> Option> { + msg_send_id![self, elementDeclarationForName: name] + } + pub unsafe fn attributeDeclarationForName_elementName( + &self, + name: &NSString, + elementName: &NSString, + ) -> Option> { + msg_send_id![ + self, + attributeDeclarationForName: name, + elementName: elementName + ] + } + pub unsafe fn predefinedEntityDeclarationForName( + name: &NSString, + ) -> Option> { + msg_send_id![Self::class(), predefinedEntityDeclarationForName: name] + } + pub unsafe fn publicID(&self) -> Option> { + msg_send_id![self, publicID] + } + pub unsafe fn setPublicID(&self, publicID: Option<&NSString>) { + msg_send![self, setPublicID: publicID] + } + pub unsafe fn systemID(&self) -> Option> { + msg_send_id![self, systemID] + } + pub unsafe fn setSystemID(&self, systemID: Option<&NSString>) { + msg_send![self, setSystemID: systemID] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs new file mode 100644 index 000000000..db02a4ce3 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -0,0 +1,49 @@ +extern_class!( + #[derive(Debug)] + struct NSXMLDTDNode; + unsafe impl ClassType for NSXMLDTDNode { + type Super = NSXMLNode; + } +); +impl NSXMLDTDNode { + pub unsafe fn initWithXMLString(&self, string: &NSString) -> Option> { + msg_send_id![self, initWithXMLString: string] + } + pub unsafe fn initWithKind_options( + &self, + kind: NSXMLNodeKind, + options: NSXMLNodeOptions, + ) -> Id { + msg_send_id![self, initWithKind: kind, options: options] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn DTDKind(&self) -> NSXMLDTDNodeKind { + msg_send![self, DTDKind] + } + pub unsafe fn setDTDKind(&self, DTDKind: NSXMLDTDNodeKind) { + msg_send![self, setDTDKind: DTDKind] + } + pub unsafe fn isExternal(&self) -> bool { + msg_send![self, isExternal] + } + pub unsafe fn publicID(&self) -> Option> { + msg_send_id![self, publicID] + } + pub unsafe fn setPublicID(&self, publicID: Option<&NSString>) { + msg_send![self, setPublicID: publicID] + } + pub unsafe fn systemID(&self) -> Option> { + msg_send_id![self, systemID] + } + pub unsafe fn setSystemID(&self, systemID: Option<&NSString>) { + msg_send![self, setSystemID: systemID] + } + pub unsafe fn notationName(&self) -> Option> { + msg_send_id![self, notationName] + } + pub unsafe fn setNotationName(&self, notationName: Option<&NSString>) { + msg_send![self, setNotationName: notationName] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs new file mode 100644 index 000000000..a437ed02c --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -0,0 +1,155 @@ +extern_class!( + #[derive(Debug)] + struct NSXMLDocument; + unsafe impl ClassType for NSXMLDocument { + type Super = NSXMLNode; + } +); +impl NSXMLDocument { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithXMLString_options_error( + &self, + string: &NSString, + mask: NSXMLNodeOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, initWithXMLString: string, options: mask, error: error] + } + pub unsafe fn initWithContentsOfURL_options_error( + &self, + url: &NSURL, + mask: NSXMLNodeOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + initWithContentsOfURL: url, + options: mask, + error: error + ] + } + pub unsafe fn initWithData_options_error( + &self, + data: &NSData, + mask: NSXMLNodeOptions, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, initWithData: data, options: mask, error: error] + } + pub unsafe fn initWithRootElement(&self, element: Option<&NSXMLElement>) -> Id { + msg_send_id![self, initWithRootElement: element] + } + pub unsafe fn replacementClassForClass(cls: &Class) -> &Class { + msg_send![Self::class(), replacementClassForClass: cls] + } + pub unsafe fn setRootElement(&self, root: &NSXMLElement) { + msg_send![self, setRootElement: root] + } + pub unsafe fn rootElement(&self) -> Option> { + msg_send_id![self, rootElement] + } + pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { + msg_send![self, insertChild: child, atIndex: index] + } + pub unsafe fn insertChildren_atIndex(&self, children: TodoGenerics, index: NSUInteger) { + msg_send![self, insertChildren: children, atIndex: index] + } + pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { + msg_send![self, removeChildAtIndex: index] + } + pub unsafe fn setChildren(&self, children: TodoGenerics) { + msg_send![self, setChildren: children] + } + pub unsafe fn addChild(&self, child: &NSXMLNode) { + msg_send![self, addChild: child] + } + pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { + msg_send![self, replaceChildAtIndex: index, withNode: node] + } + pub unsafe fn XMLDataWithOptions(&self, options: NSXMLNodeOptions) -> Id { + msg_send_id![self, XMLDataWithOptions: options] + } + pub unsafe fn objectByApplyingXSLT_arguments_error( + &self, + xslt: &NSData, + arguments: TodoGenerics, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + objectByApplyingXSLT: xslt, + arguments: arguments, + error: error + ] + } + pub unsafe fn objectByApplyingXSLTString_arguments_error( + &self, + xslt: &NSString, + arguments: TodoGenerics, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + objectByApplyingXSLTString: xslt, + arguments: arguments, + error: error + ] + } + pub unsafe fn objectByApplyingXSLTAtURL_arguments_error( + &self, + xsltURL: &NSURL, + argument: TodoGenerics, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + objectByApplyingXSLTAtURL: xsltURL, + arguments: argument, + error: error + ] + } + pub unsafe fn validateAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + msg_send![self, validateAndReturnError: error] + } + pub unsafe fn characterEncoding(&self) -> Option> { + msg_send_id![self, characterEncoding] + } + pub unsafe fn setCharacterEncoding(&self, characterEncoding: Option<&NSString>) { + msg_send![self, setCharacterEncoding: characterEncoding] + } + pub unsafe fn version(&self) -> Option> { + msg_send_id![self, version] + } + pub unsafe fn setVersion(&self, version: Option<&NSString>) { + msg_send![self, setVersion: version] + } + pub unsafe fn isStandalone(&self) -> bool { + msg_send![self, isStandalone] + } + pub unsafe fn setStandalone(&self, standalone: bool) { + msg_send![self, setStandalone: standalone] + } + pub unsafe fn documentContentKind(&self) -> NSXMLDocumentContentKind { + msg_send![self, documentContentKind] + } + pub unsafe fn setDocumentContentKind(&self, documentContentKind: NSXMLDocumentContentKind) { + msg_send![self, setDocumentContentKind: documentContentKind] + } + pub unsafe fn MIMEType(&self) -> Option> { + msg_send_id![self, MIMEType] + } + pub unsafe fn setMIMEType(&self, MIMEType: Option<&NSString>) { + msg_send![self, setMIMEType: MIMEType] + } + pub unsafe fn DTD(&self) -> Option> { + msg_send_id![self, DTD] + } + pub unsafe fn setDTD(&self, DTD: Option<&NSXMLDTD>) { + msg_send![self, setDTD: DTD] + } + pub unsafe fn XMLData(&self) -> Id { + msg_send_id![self, XMLData] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs new file mode 100644 index 000000000..262d3071f --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -0,0 +1,126 @@ +extern_class!( + #[derive(Debug)] + struct NSXMLElement; + unsafe impl ClassType for NSXMLElement { + type Super = NSXMLNode; + } +); +impl NSXMLElement { + pub unsafe fn initWithName(&self, name: &NSString) -> Id { + msg_send_id![self, initWithName: name] + } + pub unsafe fn initWithName_URI( + &self, + name: &NSString, + URI: Option<&NSString>, + ) -> Id { + msg_send_id![self, initWithName: name, URI: URI] + } + pub unsafe fn initWithName_stringValue( + &self, + name: &NSString, + string: Option<&NSString>, + ) -> Id { + msg_send_id![self, initWithName: name, stringValue: string] + } + pub unsafe fn initWithXMLString_error( + &self, + string: &NSString, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, initWithXMLString: string, error: error] + } + pub unsafe fn initWithKind_options( + &self, + kind: NSXMLNodeKind, + options: NSXMLNodeOptions, + ) -> Id { + msg_send_id![self, initWithKind: kind, options: options] + } + pub unsafe fn elementsForName(&self, name: &NSString) -> TodoGenerics { + msg_send![self, elementsForName: name] + } + pub unsafe fn elementsForLocalName_URI( + &self, + localName: &NSString, + URI: Option<&NSString>, + ) -> TodoGenerics { + msg_send![self, elementsForLocalName: localName, URI: URI] + } + pub unsafe fn addAttribute(&self, attribute: &NSXMLNode) { + msg_send![self, addAttribute: attribute] + } + pub unsafe fn removeAttributeForName(&self, name: &NSString) { + msg_send![self, removeAttributeForName: name] + } + pub unsafe fn setAttributesWithDictionary(&self, attributes: TodoGenerics) { + msg_send![self, setAttributesWithDictionary: attributes] + } + pub unsafe fn attributeForName(&self, name: &NSString) -> Option> { + msg_send_id![self, attributeForName: name] + } + pub unsafe fn attributeForLocalName_URI( + &self, + localName: &NSString, + URI: Option<&NSString>, + ) -> Option> { + msg_send_id![self, attributeForLocalName: localName, URI: URI] + } + pub unsafe fn addNamespace(&self, aNamespace: &NSXMLNode) { + msg_send![self, addNamespace: aNamespace] + } + pub unsafe fn removeNamespaceForPrefix(&self, name: &NSString) { + msg_send![self, removeNamespaceForPrefix: name] + } + pub unsafe fn namespaceForPrefix(&self, name: &NSString) -> Option> { + msg_send_id![self, namespaceForPrefix: name] + } + pub unsafe fn resolveNamespaceForName(&self, name: &NSString) -> Option> { + msg_send_id![self, resolveNamespaceForName: name] + } + pub unsafe fn resolvePrefixForNamespaceURI( + &self, + namespaceURI: &NSString, + ) -> Option> { + msg_send_id![self, resolvePrefixForNamespaceURI: namespaceURI] + } + pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { + msg_send![self, insertChild: child, atIndex: index] + } + pub unsafe fn insertChildren_atIndex(&self, children: TodoGenerics, index: NSUInteger) { + msg_send![self, insertChildren: children, atIndex: index] + } + pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { + msg_send![self, removeChildAtIndex: index] + } + pub unsafe fn setChildren(&self, children: TodoGenerics) { + msg_send![self, setChildren: children] + } + pub unsafe fn addChild(&self, child: &NSXMLNode) { + msg_send![self, addChild: child] + } + pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { + msg_send![self, replaceChildAtIndex: index, withNode: node] + } + pub unsafe fn normalizeAdjacentTextNodesPreservingCDATA(&self, preserve: bool) { + msg_send![self, normalizeAdjacentTextNodesPreservingCDATA: preserve] + } + pub unsafe fn attributes(&self) -> TodoGenerics { + msg_send![self, attributes] + } + pub unsafe fn setAttributes(&self, attributes: TodoGenerics) { + msg_send![self, setAttributes: attributes] + } + pub unsafe fn namespaces(&self) -> TodoGenerics { + msg_send![self, namespaces] + } + pub unsafe fn setNamespaces(&self, namespaces: TodoGenerics) { + msg_send![self, setNamespaces: namespaces] + } +} +#[doc = "NSDeprecated"] +impl NSXMLElement { + pub unsafe fn setAttributesAsDictionary(&self, attributes: &NSDictionary) { + msg_send![self, setAttributesAsDictionary: attributes] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs new file mode 100644 index 000000000..b08e56f2c --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -0,0 +1,229 @@ +extern_class!( + #[derive(Debug)] + struct NSXMLNode; + unsafe impl ClassType for NSXMLNode { + type Super = NSObject; + } +); +impl NSXMLNode { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithKind(&self, kind: NSXMLNodeKind) -> Id { + msg_send_id![self, initWithKind: kind] + } + pub unsafe fn initWithKind_options( + &self, + kind: NSXMLNodeKind, + options: NSXMLNodeOptions, + ) -> Id { + msg_send_id![self, initWithKind: kind, options: options] + } + pub unsafe fn document() -> Id { + msg_send_id![Self::class(), document] + } + pub unsafe fn documentWithRootElement(element: &NSXMLElement) -> Id { + msg_send_id![Self::class(), documentWithRootElement: element] + } + pub unsafe fn elementWithName(name: &NSString) -> Id { + msg_send_id![Self::class(), elementWithName: name] + } + pub unsafe fn elementWithName_URI(name: &NSString, URI: &NSString) -> Id { + msg_send_id![Self::class(), elementWithName: name, URI: URI] + } + pub unsafe fn elementWithName_stringValue( + name: &NSString, + string: &NSString, + ) -> Id { + msg_send_id![Self::class(), elementWithName: name, stringValue: string] + } + pub unsafe fn elementWithName_children_attributes( + name: &NSString, + children: TodoGenerics, + attributes: TodoGenerics, + ) -> Id { + msg_send_id![ + Self::class(), + elementWithName: name, + children: children, + attributes: attributes + ] + } + pub unsafe fn attributeWithName_stringValue( + name: &NSString, + stringValue: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + attributeWithName: name, + stringValue: stringValue + ] + } + pub unsafe fn attributeWithName_URI_stringValue( + name: &NSString, + URI: &NSString, + stringValue: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + attributeWithName: name, + URI: URI, + stringValue: stringValue + ] + } + pub unsafe fn namespaceWithName_stringValue( + name: &NSString, + stringValue: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + namespaceWithName: name, + stringValue: stringValue + ] + } + pub unsafe fn processingInstructionWithName_stringValue( + name: &NSString, + stringValue: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + processingInstructionWithName: name, + stringValue: stringValue + ] + } + pub unsafe fn commentWithStringValue(stringValue: &NSString) -> Id { + msg_send_id![Self::class(), commentWithStringValue: stringValue] + } + pub unsafe fn textWithStringValue(stringValue: &NSString) -> Id { + msg_send_id![Self::class(), textWithStringValue: stringValue] + } + pub unsafe fn DTDNodeWithXMLString(string: &NSString) -> Option> { + msg_send_id![Self::class(), DTDNodeWithXMLString: string] + } + pub unsafe fn setStringValue_resolvingEntities(&self, string: &NSString, resolve: bool) { + msg_send![self, setStringValue: string, resolvingEntities: resolve] + } + pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option> { + msg_send_id![self, childAtIndex: index] + } + pub unsafe fn detach(&self) { + msg_send![self, detach] + } + pub unsafe fn localNameForName(name: &NSString) -> Id { + msg_send_id![Self::class(), localNameForName: name] + } + pub unsafe fn prefixForName(name: &NSString) -> Option> { + msg_send_id![Self::class(), prefixForName: name] + } + pub unsafe fn predefinedNamespaceForPrefix(name: &NSString) -> Option> { + msg_send_id![Self::class(), predefinedNamespaceForPrefix: name] + } + pub unsafe fn XMLStringWithOptions(&self, options: NSXMLNodeOptions) -> Id { + msg_send_id![self, XMLStringWithOptions: options] + } + pub unsafe fn canonicalXMLStringPreservingComments( + &self, + comments: bool, + ) -> Id { + msg_send_id![self, canonicalXMLStringPreservingComments: comments] + } + pub unsafe fn nodesForXPath_error( + &self, + xpath: &NSString, + error: *mut Option<&NSError>, + ) -> TodoGenerics { + msg_send![self, nodesForXPath: xpath, error: error] + } + pub unsafe fn objectsForXQuery_constants_error( + &self, + xquery: &NSString, + constants: TodoGenerics, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![ + self, + objectsForXQuery: xquery, + constants: constants, + error: error + ] + } + pub unsafe fn objectsForXQuery_error( + &self, + xquery: &NSString, + error: *mut Option<&NSError>, + ) -> Option> { + msg_send_id![self, objectsForXQuery: xquery, error: error] + } + pub unsafe fn kind(&self) -> NSXMLNodeKind { + msg_send![self, kind] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } + pub unsafe fn objectValue(&self) -> Option> { + msg_send_id![self, objectValue] + } + pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>) { + msg_send![self, setObjectValue: objectValue] + } + pub unsafe fn stringValue(&self) -> Option> { + msg_send_id![self, stringValue] + } + pub unsafe fn setStringValue(&self, stringValue: Option<&NSString>) { + msg_send![self, setStringValue: stringValue] + } + pub unsafe fn index(&self) -> NSUInteger { + msg_send![self, index] + } + pub unsafe fn level(&self) -> NSUInteger { + msg_send![self, level] + } + pub unsafe fn rootDocument(&self) -> Option> { + msg_send_id![self, rootDocument] + } + pub unsafe fn parent(&self) -> Option> { + msg_send_id![self, parent] + } + pub unsafe fn childCount(&self) -> NSUInteger { + msg_send![self, childCount] + } + pub unsafe fn children(&self) -> TodoGenerics { + msg_send![self, children] + } + pub unsafe fn previousSibling(&self) -> Option> { + msg_send_id![self, previousSibling] + } + pub unsafe fn nextSibling(&self) -> Option> { + msg_send_id![self, nextSibling] + } + pub unsafe fn previousNode(&self) -> Option> { + msg_send_id![self, previousNode] + } + pub unsafe fn nextNode(&self) -> Option> { + msg_send_id![self, nextNode] + } + pub unsafe fn XPath(&self) -> Option> { + msg_send_id![self, XPath] + } + pub unsafe fn localName(&self) -> Option> { + msg_send_id![self, localName] + } + pub unsafe fn prefix(&self) -> Option> { + msg_send_id![self, prefix] + } + pub unsafe fn URI(&self) -> Option> { + msg_send_id![self, URI] + } + pub unsafe fn setURI(&self, URI: Option<&NSString>) { + msg_send![self, setURI: URI] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn XMLString(&self) -> Id { + msg_send_id![self, XMLString] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs new file mode 100644 index 000000000..4cd310fb7 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -0,0 +1,93 @@ +extern_class!( + #[derive(Debug)] + struct NSXMLParser; + unsafe impl ClassType for NSXMLParser { + type Super = NSObject; + } +); +impl NSXMLParser { + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithContentsOfURL: url] + } + pub unsafe fn initWithData(&self, data: &NSData) -> Id { + msg_send_id![self, initWithData: data] + } + pub unsafe fn initWithStream(&self, stream: &NSInputStream) -> Id { + msg_send_id![self, initWithStream: stream] + } + pub unsafe fn parse(&self) -> bool { + msg_send![self, parse] + } + pub unsafe fn abortParsing(&self) { + msg_send![self, abortParsing] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn shouldProcessNamespaces(&self) -> bool { + msg_send![self, shouldProcessNamespaces] + } + pub unsafe fn setShouldProcessNamespaces(&self, shouldProcessNamespaces: bool) { + msg_send![self, setShouldProcessNamespaces: shouldProcessNamespaces] + } + pub unsafe fn shouldReportNamespacePrefixes(&self) -> bool { + msg_send![self, shouldReportNamespacePrefixes] + } + pub unsafe fn setShouldReportNamespacePrefixes(&self, shouldReportNamespacePrefixes: bool) { + msg_send![ + self, + setShouldReportNamespacePrefixes: shouldReportNamespacePrefixes + ] + } + pub unsafe fn externalEntityResolvingPolicy(&self) -> NSXMLParserExternalEntityResolvingPolicy { + msg_send![self, externalEntityResolvingPolicy] + } + pub unsafe fn setExternalEntityResolvingPolicy( + &self, + externalEntityResolvingPolicy: NSXMLParserExternalEntityResolvingPolicy, + ) { + msg_send![ + self, + setExternalEntityResolvingPolicy: externalEntityResolvingPolicy + ] + } + pub unsafe fn allowedExternalEntityURLs(&self) -> TodoGenerics { + msg_send![self, allowedExternalEntityURLs] + } + pub unsafe fn setAllowedExternalEntityURLs(&self, allowedExternalEntityURLs: TodoGenerics) { + msg_send![ + self, + setAllowedExternalEntityURLs: allowedExternalEntityURLs + ] + } + pub unsafe fn parserError(&self) -> Option> { + msg_send_id![self, parserError] + } + pub unsafe fn shouldResolveExternalEntities(&self) -> bool { + msg_send![self, shouldResolveExternalEntities] + } + pub unsafe fn setShouldResolveExternalEntities(&self, shouldResolveExternalEntities: bool) { + msg_send![ + self, + setShouldResolveExternalEntities: shouldResolveExternalEntities + ] + } +} +#[doc = "NSXMLParserLocatorAdditions"] +impl NSXMLParser { + pub unsafe fn publicID(&self) -> Option> { + msg_send_id![self, publicID] + } + pub unsafe fn systemID(&self) -> Option> { + msg_send_id![self, systemID] + } + pub unsafe fn lineNumber(&self) -> NSInteger { + msg_send![self, lineNumber] + } + pub unsafe fn columnNumber(&self) -> NSInteger { + msg_send![self, columnNumber] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs new file mode 100644 index 000000000..3720b32c7 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -0,0 +1,277 @@ +extern_class!( + #[derive(Debug)] + struct NSXPCConnection; + unsafe impl ClassType for NSXPCConnection { + type Super = NSObject; + } +); +impl NSXPCConnection { + pub unsafe fn initWithServiceName(&self, serviceName: &NSString) -> Id { + msg_send_id![self, initWithServiceName: serviceName] + } + pub unsafe fn initWithMachServiceName_options( + &self, + name: &NSString, + options: NSXPCConnectionOptions, + ) -> Id { + msg_send_id![self, initWithMachServiceName: name, options: options] + } + pub unsafe fn initWithListenerEndpoint( + &self, + endpoint: &NSXPCListenerEndpoint, + ) -> Id { + msg_send_id![self, initWithListenerEndpoint: endpoint] + } + pub unsafe fn remoteObjectProxyWithErrorHandler( + &self, + handler: TodoBlock, + ) -> Id { + msg_send_id![self, remoteObjectProxyWithErrorHandler: handler] + } + pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( + &self, + handler: TodoBlock, + ) -> Id { + msg_send_id![self, synchronousRemoteObjectProxyWithErrorHandler: handler] + } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } + pub unsafe fn suspend(&self) { + msg_send![self, suspend] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn currentConnection() -> Option> { + msg_send_id![Self::class(), currentConnection] + } + pub unsafe fn scheduleSendBarrierBlock(&self, block: TodoBlock) { + msg_send![self, scheduleSendBarrierBlock: block] + } + pub unsafe fn serviceName(&self) -> Option> { + msg_send_id![self, serviceName] + } + pub unsafe fn endpoint(&self) -> Id { + msg_send_id![self, endpoint] + } + pub unsafe fn exportedInterface(&self) -> Option> { + msg_send_id![self, exportedInterface] + } + pub unsafe fn setExportedInterface(&self, exportedInterface: Option<&NSXPCInterface>) { + msg_send![self, setExportedInterface: exportedInterface] + } + pub unsafe fn exportedObject(&self) -> Option> { + msg_send_id![self, exportedObject] + } + pub unsafe fn setExportedObject(&self, exportedObject: Option<&Object>) { + msg_send![self, setExportedObject: exportedObject] + } + pub unsafe fn remoteObjectInterface(&self) -> Option> { + msg_send_id![self, remoteObjectInterface] + } + pub unsafe fn setRemoteObjectInterface(&self, remoteObjectInterface: Option<&NSXPCInterface>) { + msg_send![self, setRemoteObjectInterface: remoteObjectInterface] + } + pub unsafe fn remoteObjectProxy(&self) -> Id { + msg_send_id![self, remoteObjectProxy] + } + pub unsafe fn interruptionHandler(&self) -> TodoBlock { + msg_send![self, interruptionHandler] + } + pub unsafe fn setInterruptionHandler(&self, interruptionHandler: TodoBlock) { + msg_send![self, setInterruptionHandler: interruptionHandler] + } + pub unsafe fn invalidationHandler(&self) -> TodoBlock { + msg_send![self, invalidationHandler] + } + pub unsafe fn setInvalidationHandler(&self, invalidationHandler: TodoBlock) { + msg_send![self, setInvalidationHandler: invalidationHandler] + } + pub unsafe fn auditSessionIdentifier(&self) -> au_asid_t { + msg_send![self, auditSessionIdentifier] + } + pub unsafe fn processIdentifier(&self) -> pid_t { + msg_send![self, processIdentifier] + } + pub unsafe fn effectiveUserIdentifier(&self) -> uid_t { + msg_send![self, effectiveUserIdentifier] + } + pub unsafe fn effectiveGroupIdentifier(&self) -> gid_t { + msg_send![self, effectiveGroupIdentifier] + } +} +extern_class!( + #[derive(Debug)] + struct NSXPCListener; + unsafe impl ClassType for NSXPCListener { + type Super = NSObject; + } +); +impl NSXPCListener { + pub unsafe fn serviceListener() -> Id { + msg_send_id![Self::class(), serviceListener] + } + pub unsafe fn anonymousListener() -> Id { + msg_send_id![Self::class(), anonymousListener] + } + pub unsafe fn initWithMachServiceName(&self, name: &NSString) -> Id { + msg_send_id![self, initWithMachServiceName: name] + } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } + pub unsafe fn suspend(&self) { + msg_send![self, suspend] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn delegate(&self) -> TodoGenerics { + msg_send![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn endpoint(&self) -> Id { + msg_send_id![self, endpoint] + } +} +extern_class!( + #[derive(Debug)] + struct NSXPCInterface; + unsafe impl ClassType for NSXPCInterface { + type Super = NSObject; + } +); +impl NSXPCInterface { + pub unsafe fn interfaceWithProtocol(protocol: &Protocol) -> Id { + msg_send_id![Self::class(), interfaceWithProtocol: protocol] + } + pub unsafe fn setClasses_forSelector_argumentIndex_ofReply( + &self, + classes: TodoGenerics, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) { + msg_send![ + self, + setClasses: classes, + forSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn classesForSelector_argumentIndex_ofReply( + &self, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) -> TodoGenerics { + msg_send![ + self, + classesForSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn setInterface_forSelector_argumentIndex_ofReply( + &self, + ifc: &NSXPCInterface, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) { + msg_send![ + self, + setInterface: ifc, + forSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn interfaceForSelector_argumentIndex_ofReply( + &self, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) -> Option> { + msg_send_id![ + self, + interfaceForSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn setXPCType_forSelector_argumentIndex_ofReply( + &self, + type_: xpc_type_t, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) { + msg_send![ + self, + setXPCType: type_, + forSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn XPCTypeForSelector_argumentIndex_ofReply( + &self, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) -> xpc_type_t { + msg_send![ + self, + XPCTypeForSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn protocol(&self) -> Id { + msg_send_id![self, protocol] + } + pub unsafe fn setProtocol(&self, protocol: &Protocol) { + msg_send![self, setProtocol: protocol] + } +} +extern_class!( + #[derive(Debug)] + struct NSXPCListenerEndpoint; + unsafe impl ClassType for NSXPCListenerEndpoint { + type Super = NSObject; + } +); +impl NSXPCListenerEndpoint {} +extern_class!( + #[derive(Debug)] + struct NSXPCCoder; + unsafe impl ClassType for NSXPCCoder { + type Super = NSCoder; + } +); +impl NSXPCCoder { + pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: xpc_object_t, key: &NSString) { + msg_send![self, encodeXPCObject: xpcObject, forKey: key] + } + pub unsafe fn decodeXPCObjectOfType_forKey( + &self, + type_: xpc_type_t, + key: &NSString, + ) -> xpc_object_t { + msg_send![self, decodeXPCObjectOfType: type_, forKey: key] + } + pub unsafe fn userInfo(&self) -> TodoGenerics { + msg_send![self, userInfo] + } + pub unsafe fn setUserInfo(&self, userInfo: TodoGenerics) { + msg_send![self, setUserInfo: userInfo] + } + pub unsafe fn connection(&self) -> Option> { + msg_send_id![self, connection] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -0,0 +1 @@ + diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 8b1378917..8d1f7337b 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -1 +1,335 @@ +mod Foundation; +pub use self::Foundation::*; +mod FoundationErrors; +pub use self::FoundationErrors::*; +mod FoundationLegacySwiftCompatibility; +pub use self::FoundationLegacySwiftCompatibility::*; +mod NSAffineTransform; +pub use self::NSAffineTransform::*; +mod NSAppleEventDescriptor; +pub use self::NSAppleEventDescriptor::*; +mod NSAppleEventManager; +pub use self::NSAppleEventManager::*; +mod NSAppleScript; +pub use self::NSAppleScript::*; +mod NSArchiver; +pub use self::NSArchiver::*; +mod NSArray; +pub use self::NSArray::*; +mod NSAttributedString; +pub use self::NSAttributedString::*; +mod NSAutoreleasePool; +pub use self::NSAutoreleasePool::*; +mod NSBackgroundActivityScheduler; +pub use self::NSBackgroundActivityScheduler::*; +mod NSBundle; +pub use self::NSBundle::*; +mod NSByteCountFormatter; +pub use self::NSByteCountFormatter::*; +mod NSByteOrder; +pub use self::NSByteOrder::*; +mod NSCache; +pub use self::NSCache::*; +mod NSCalendar; +pub use self::NSCalendar::*; +mod NSCalendarDate; +pub use self::NSCalendarDate::*; +mod NSCharacterSet; +pub use self::NSCharacterSet::*; +mod NSClassDescription; +pub use self::NSClassDescription::*; +mod NSCoder; +pub use self::NSCoder::*; +mod NSComparisonPredicate; +pub use self::NSComparisonPredicate::*; +mod NSCompoundPredicate; +pub use self::NSCompoundPredicate::*; +mod NSConnection; +pub use self::NSConnection::*; +mod NSData; +pub use self::NSData::*; +mod NSDate; +pub use self::NSDate::*; +mod NSDateComponentsFormatter; +pub use self::NSDateComponentsFormatter::*; +mod NSDateFormatter; +pub use self::NSDateFormatter::*; +mod NSDateInterval; +pub use self::NSDateInterval::*; +mod NSDateIntervalFormatter; +pub use self::NSDateIntervalFormatter::*; +mod NSDecimal; +pub use self::NSDecimal::*; +mod NSDecimalNumber; +pub use self::NSDecimalNumber::*; +mod NSDictionary; +pub use self::NSDictionary::*; +mod NSDistantObject; +pub use self::NSDistantObject::*; +mod NSDistributedLock; +pub use self::NSDistributedLock::*; +mod NSDistributedNotificationCenter; +pub use self::NSDistributedNotificationCenter::*; +mod NSEnergyFormatter; +pub use self::NSEnergyFormatter::*; +mod NSEnumerator; +pub use self::NSEnumerator::*; +mod NSError; +pub use self::NSError::*; +mod NSException; +pub use self::NSException::*; +mod NSExpression; +pub use self::NSExpression::*; +mod NSExtensionContext; +pub use self::NSExtensionContext::*; +mod NSExtensionItem; +pub use self::NSExtensionItem::*; +mod NSExtensionRequestHandling; +pub use self::NSExtensionRequestHandling::*; +mod NSFileCoordinator; +pub use self::NSFileCoordinator::*; +mod NSFileHandle; +pub use self::NSFileHandle::*; +mod NSFileManager; +pub use self::NSFileManager::*; +mod NSFilePresenter; +pub use self::NSFilePresenter::*; +mod NSFileVersion; +pub use self::NSFileVersion::*; +mod NSFileWrapper; +pub use self::NSFileWrapper::*; +mod NSFormatter; +pub use self::NSFormatter::*; +mod NSGarbageCollector; +pub use self::NSGarbageCollector::*; +mod NSGeometry; +pub use self::NSGeometry::*; +mod NSHFSFileTypes; +pub use self::NSHFSFileTypes::*; +mod NSHTTPCookie; +pub use self::NSHTTPCookie::*; +mod NSHTTPCookieStorage; +pub use self::NSHTTPCookieStorage::*; +mod NSHashTable; +pub use self::NSHashTable::*; +mod NSHost; +pub use self::NSHost::*; +mod NSISO8601DateFormatter; +pub use self::NSISO8601DateFormatter::*; +mod NSIndexPath; +pub use self::NSIndexPath::*; +mod NSIndexSet; +pub use self::NSIndexSet::*; +mod NSInflectionRule; +pub use self::NSInflectionRule::*; +mod NSInvocation; +pub use self::NSInvocation::*; +mod NSItemProvider; +pub use self::NSItemProvider::*; +mod NSJSONSerialization; +pub use self::NSJSONSerialization::*; +mod NSKeyValueCoding; +pub use self::NSKeyValueCoding::*; +mod NSKeyValueObserving; +pub use self::NSKeyValueObserving::*; +mod NSKeyedArchiver; +pub use self::NSKeyedArchiver::*; +mod NSLengthFormatter; +pub use self::NSLengthFormatter::*; +mod NSLinguisticTagger; +pub use self::NSLinguisticTagger::*; +mod NSListFormatter; +pub use self::NSListFormatter::*; +mod NSLocale; +pub use self::NSLocale::*; +mod NSLock; +pub use self::NSLock::*; +mod NSMapTable; +pub use self::NSMapTable::*; +mod NSMassFormatter; +pub use self::NSMassFormatter::*; +mod NSMeasurement; +pub use self::NSMeasurement::*; +mod NSMeasurementFormatter; +pub use self::NSMeasurementFormatter::*; +mod NSMetadata; +pub use self::NSMetadata::*; +mod NSMetadataAttributes; +pub use self::NSMetadataAttributes::*; +mod NSMethodSignature; +pub use self::NSMethodSignature::*; +mod NSMorphology; +pub use self::NSMorphology::*; +mod NSNetServices; +pub use self::NSNetServices::*; +mod NSNotification; +pub use self::NSNotification::*; +mod NSNotificationQueue; +pub use self::NSNotificationQueue::*; +mod NSNull; +pub use self::NSNull::*; +mod NSNumberFormatter; +pub use self::NSNumberFormatter::*; +mod NSObjCRuntime; +pub use self::NSObjCRuntime::*; +mod NSObject; +pub use self::NSObject::*; +mod NSObjectScripting; +pub use self::NSObjectScripting::*; +mod NSOperation; +pub use self::NSOperation::*; +mod NSOrderedCollectionChange; +pub use self::NSOrderedCollectionChange::*; +mod NSOrderedCollectionDifference; +pub use self::NSOrderedCollectionDifference::*; +mod NSOrderedSet; +pub use self::NSOrderedSet::*; +mod NSOrthography; +pub use self::NSOrthography::*; +mod NSPathUtilities; +pub use self::NSPathUtilities::*; +mod NSPersonNameComponents; +pub use self::NSPersonNameComponents::*; +mod NSPersonNameComponentsFormatter; +pub use self::NSPersonNameComponentsFormatter::*; +mod NSPointerArray; +pub use self::NSPointerArray::*; +mod NSPointerFunctions; +pub use self::NSPointerFunctions::*; +mod NSPort; +pub use self::NSPort::*; +mod NSPortCoder; +pub use self::NSPortCoder::*; +mod NSPortMessage; +pub use self::NSPortMessage::*; +mod NSPortNameServer; +pub use self::NSPortNameServer::*; +mod NSPredicate; +pub use self::NSPredicate::*; +mod NSProcessInfo; +pub use self::NSProcessInfo::*; +mod NSProgress; +pub use self::NSProgress::*; +mod NSPropertyList; +pub use self::NSPropertyList::*; +mod NSProtocolChecker; +pub use self::NSProtocolChecker::*; +mod NSProxy; +pub use self::NSProxy::*; +mod NSRange; +pub use self::NSRange::*; +mod NSRegularExpression; +pub use self::NSRegularExpression::*; +mod NSRelativeDateTimeFormatter; +pub use self::NSRelativeDateTimeFormatter::*; +mod NSRunLoop; +pub use self::NSRunLoop::*; +mod NSScanner; +pub use self::NSScanner::*; +mod NSScriptClassDescription; +pub use self::NSScriptClassDescription::*; +mod NSScriptCoercionHandler; +pub use self::NSScriptCoercionHandler::*; +mod NSScriptCommand; +pub use self::NSScriptCommand::*; +mod NSScriptCommandDescription; +pub use self::NSScriptCommandDescription::*; +mod NSScriptExecutionContext; +pub use self::NSScriptExecutionContext::*; +mod NSScriptKeyValueCoding; +pub use self::NSScriptKeyValueCoding::*; +mod NSScriptObjectSpecifiers; +pub use self::NSScriptObjectSpecifiers::*; +mod NSScriptStandardSuiteCommands; +pub use self::NSScriptStandardSuiteCommands::*; +mod NSScriptSuiteRegistry; +pub use self::NSScriptSuiteRegistry::*; +mod NSScriptWhoseTests; +pub use self::NSScriptWhoseTests::*; +mod NSSet; +pub use self::NSSet::*; +mod NSSortDescriptor; +pub use self::NSSortDescriptor::*; +mod NSSpellServer; +pub use self::NSSpellServer::*; +mod NSStream; +pub use self::NSStream::*; +mod NSString; +pub use self::NSString::*; +mod NSTask; +pub use self::NSTask::*; +mod NSTextCheckingResult; +pub use self::NSTextCheckingResult::*; +mod NSThread; +pub use self::NSThread::*; +mod NSTimeZone; +pub use self::NSTimeZone::*; +mod NSTimer; +pub use self::NSTimer::*; +mod NSURL; +pub use self::NSURL::*; +mod NSURLAuthenticationChallenge; +pub use self::NSURLAuthenticationChallenge::*; +mod NSURLCache; +pub use self::NSURLCache::*; +mod NSURLConnection; +pub use self::NSURLConnection::*; +mod NSURLCredential; +pub use self::NSURLCredential::*; +mod NSURLCredentialStorage; +pub use self::NSURLCredentialStorage::*; +mod NSURLDownload; +pub use self::NSURLDownload::*; +mod NSURLError; +pub use self::NSURLError::*; +mod NSURLHandle; +pub use self::NSURLHandle::*; +mod NSURLProtectionSpace; +pub use self::NSURLProtectionSpace::*; +mod NSURLProtocol; +pub use self::NSURLProtocol::*; +mod NSURLRequest; +pub use self::NSURLRequest::*; +mod NSURLResponse; +pub use self::NSURLResponse::*; +mod NSURLSession; +pub use self::NSURLSession::*; +mod NSUUID; +pub use self::NSUUID::*; +mod NSUbiquitousKeyValueStore; +pub use self::NSUbiquitousKeyValueStore::*; +mod NSUndoManager; +pub use self::NSUndoManager::*; +mod NSUnit; +pub use self::NSUnit::*; +mod NSUserActivity; +pub use self::NSUserActivity::*; +mod NSUserDefaults; +pub use self::NSUserDefaults::*; +mod NSUserNotification; +pub use self::NSUserNotification::*; +mod NSUserScriptTask; +pub use self::NSUserScriptTask::*; +mod NSValue; +pub use self::NSValue::*; +mod NSValueTransformer; +pub use self::NSValueTransformer::*; +mod NSXMLDTD; +pub use self::NSXMLDTD::*; +mod NSXMLDTDNode; +pub use self::NSXMLDTDNode::*; +mod NSXMLDocument; +pub use self::NSXMLDocument::*; +mod NSXMLElement; +pub use self::NSXMLElement::*; +mod NSXMLNode; +pub use self::NSXMLNode::*; +mod NSXMLNodeOptions; +pub use self::NSXMLNodeOptions::*; +mod NSXMLParser; +pub use self::NSXMLParser::*; +mod NSXPCConnection; +pub use self::NSXPCConnection::*; +mod NSZone; +pub use self::NSZone::*; From 88f545974161ca9a42bc27f83515ba7699532f5d Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 15:38:50 +0200 Subject: [PATCH 028/131] Skip "index" header --- crates/header-translator/src/main.rs | 4 ++++ crates/icrate/src/generated/Foundation/Foundation.rs | 1 - crates/icrate/src/generated/Foundation/mod.rs | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) delete mode 100644 crates/icrate/src/generated/Foundation/Foundation.rs diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 9d5c656ed..2ba10c650 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -158,6 +158,10 @@ fn main() { let mut mod_tokens = TokenStream::new(); for (path, res) in result { + if path == header { + continue; + } + let tokens = create_rust_file(&res, &config.unsafe_); let formatted = run_rustfmt(tokens); diff --git a/crates/icrate/src/generated/Foundation/Foundation.rs b/crates/icrate/src/generated/Foundation/Foundation.rs deleted file mode 100644 index 8b1378917..000000000 --- a/crates/icrate/src/generated/Foundation/Foundation.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 8d1f7337b..23c249941 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -1,6 +1,3 @@ - -mod Foundation; -pub use self::Foundation::*; mod FoundationErrors; pub use self::FoundationErrors::*; mod FoundationLegacySwiftCompatibility; From 0044e4df1228d929571f26dbd5bc81e2d287dbe2 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 15:54:21 +0200 Subject: [PATCH 029/131] Add basic imports --- crates/header-translator/src/lib.rs | 5 +++++ crates/icrate/src/generated/Foundation/FoundationErrors.rs | 5 ++++- .../Foundation/FoundationLegacySwiftCompatibility.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSAffineTransform.rs | 4 ++++ .../src/generated/Foundation/NSAppleEventDescriptor.rs | 4 ++++ .../icrate/src/generated/Foundation/NSAppleEventManager.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSAppleScript.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSArchiver.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSArray.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSAttributedString.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs | 4 ++++ .../generated/Foundation/NSBackgroundActivityScheduler.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSBundle.rs | 4 ++++ .../icrate/src/generated/Foundation/NSByteCountFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSByteOrder.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSCache.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSCalendar.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSCalendarDate.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSCharacterSet.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSClassDescription.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSCoder.rs | 4 ++++ .../icrate/src/generated/Foundation/NSComparisonPredicate.rs | 4 ++++ .../icrate/src/generated/Foundation/NSCompoundPredicate.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSConnection.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSData.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSDate.rs | 4 ++++ .../src/generated/Foundation/NSDateComponentsFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSDateFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSDateInterval.rs | 4 ++++ .../src/generated/Foundation/NSDateIntervalFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSDecimal.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSDecimalNumber.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSDictionary.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSDistantObject.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSDistributedLock.rs | 4 ++++ .../generated/Foundation/NSDistributedNotificationCenter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSEnumerator.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSError.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSException.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSExpression.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSExtensionContext.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSExtensionItem.rs | 4 ++++ .../src/generated/Foundation/NSExtensionRequestHandling.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSFileCoordinator.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSFileHandle.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSFileManager.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSFilePresenter.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSFileVersion.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSFileWrapper.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSGarbageCollector.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSGeometry.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSHTTPCookie.rs | 4 ++++ .../icrate/src/generated/Foundation/NSHTTPCookieStorage.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSHashTable.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSHost.rs | 4 ++++ .../src/generated/Foundation/NSISO8601DateFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSIndexPath.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSIndexSet.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSInflectionRule.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSInvocation.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSItemProvider.rs | 4 ++++ .../icrate/src/generated/Foundation/NSJSONSerialization.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs | 4 ++++ .../icrate/src/generated/Foundation/NSKeyValueObserving.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSLengthFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSListFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSLocale.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSLock.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSMapTable.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSMassFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSMeasurement.rs | 4 ++++ .../src/generated/Foundation/NSMeasurementFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSMetadata.rs | 4 ++++ .../icrate/src/generated/Foundation/NSMetadataAttributes.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSMethodSignature.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSMorphology.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSNetServices.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSNotification.rs | 4 ++++ .../icrate/src/generated/Foundation/NSNotificationQueue.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSNull.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSNumberFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSObjCRuntime.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSObject.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSObjectScripting.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSOperation.rs | 4 ++++ .../src/generated/Foundation/NSOrderedCollectionChange.rs | 4 ++++ .../generated/Foundation/NSOrderedCollectionDifference.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSOrderedSet.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSOrthography.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSPathUtilities.rs | 4 ++++ .../src/generated/Foundation/NSPersonNameComponents.rs | 4 ++++ .../generated/Foundation/NSPersonNameComponentsFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSPointerArray.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSPointerFunctions.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSPort.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSPortCoder.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSPortMessage.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSPortNameServer.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSPredicate.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSProcessInfo.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSProgress.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSPropertyList.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSProtocolChecker.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSProxy.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSRange.rs | 4 ++++ .../icrate/src/generated/Foundation/NSRegularExpression.rs | 4 ++++ .../src/generated/Foundation/NSRelativeDateTimeFormatter.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSRunLoop.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSScanner.rs | 4 ++++ .../src/generated/Foundation/NSScriptClassDescription.rs | 4 ++++ .../src/generated/Foundation/NSScriptCoercionHandler.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSScriptCommand.rs | 4 ++++ .../src/generated/Foundation/NSScriptCommandDescription.rs | 4 ++++ .../src/generated/Foundation/NSScriptExecutionContext.rs | 4 ++++ .../src/generated/Foundation/NSScriptKeyValueCoding.rs | 4 ++++ .../src/generated/Foundation/NSScriptObjectSpecifiers.rs | 4 ++++ .../generated/Foundation/NSScriptStandardSuiteCommands.rs | 4 ++++ .../icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSSet.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSSortDescriptor.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSSpellServer.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSStream.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSString.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSTask.rs | 4 ++++ .../icrate/src/generated/Foundation/NSTextCheckingResult.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSThread.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSTimeZone.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSTimer.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSURL.rs | 4 ++++ .../src/generated/Foundation/NSURLAuthenticationChallenge.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSURLCache.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSURLConnection.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSURLCredential.rs | 4 ++++ .../src/generated/Foundation/NSURLCredentialStorage.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSURLDownload.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSURLError.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSURLHandle.rs | 4 ++++ .../icrate/src/generated/Foundation/NSURLProtectionSpace.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSURLProtocol.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSURLRequest.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSURLResponse.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSURLSession.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSUUID.rs | 4 ++++ .../src/generated/Foundation/NSUbiquitousKeyValueStore.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSUndoManager.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSUnit.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSUserActivity.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSUserDefaults.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSUserNotification.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSUserScriptTask.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSValue.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSValueTransformer.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSXMLDTD.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSXMLDocument.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSXMLElement.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSXMLNode.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSXMLParser.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSXPCConnection.rs | 4 ++++ crates/icrate/src/generated/Foundation/NSZone.rs | 5 ++++- 167 files changed, 669 insertions(+), 12 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 1e8b01892..6472aaa7f 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -19,6 +19,11 @@ pub fn create_rust_file(entities: &[Entity<'_>], unsafe_: &Unsafe) -> TokenStrea .iter() .filter_map(|entity| Stmt::parse(entity, &unsafe_)); quote! { + #[allow(unused_imports)] + use objc2::{ClassType, extern_class, msg_send, msg_send_id}; + #[allow(unused_imports)] + use objc2::rc::{Id, Shared}; + #(#iter)* } } diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/FoundationErrors.rs +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs +++ b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index c69243353..1c36c572b 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSAffineTransform; diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index ab9ec83d8..6f0eba5fd 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSAppleEventDescriptor; diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index 13bc3b3e4..870921e83 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSAppleEventManager; diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index 08195ecb4..75090c5c1 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSAppleScript; diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index e296c932d..2ad15a6cd 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSArchiver; diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 5c582c6a6..3fdc061c2 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSArray; diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index ca8cdc05f..a5a4ff114 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSAttributedString; diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs index 5afe27200..070bf16b9 100644 --- a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSAutoreleasePool; diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index a8836be5e..49624a3ad 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSBackgroundActivityScheduler; diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 4fd948e81..c559adffd 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSBundle; diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 63604feba..884c808b0 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSByteCountFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 80f38a13d..5175ca8cc 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSCache; diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index d0f15326f..30150fee6 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSCalendar; diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index 1556a22d6..4601b76f0 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSCalendarDate; diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index b5cd9db55..ec68b60e8 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSCharacterSet; diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index ea9f470df..f6f39d76a 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSClassDescription; diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index a80c663d2..75be70250 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSCoder; diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index 60a293ab7..0a041df00 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSComparisonPredicate; diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 6a45885b3..37ebe0acc 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSCompoundPredicate; diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index ea737381e..170adf3d8 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSConnection; diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index decce1420..c6896995a 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSData; diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 5315d6ccd..8fb10858c 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSDate; diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 0c7a44a21..505fe3f63 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSDateComponentsFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index bebbad93d..3feae3d07 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSDateFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index 2523d86ba..cf9e0f3e2 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSDateInterval; diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index cbabcea51..88385c4cd 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSDateIntervalFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimal.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index e63c07765..10df8436f 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSDecimalNumber; diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 811072b9a..c47ea6869 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSDictionary; diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index c842353c2..a7c551a04 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSDistantObject; diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index 94bbe64c4..f73fa108b 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSDistributedLock; diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 8fbd7bd08..d24f00b03 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSDistributedNotificationCenter; diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 6e18bf197..be26d9a9a 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSEnergyFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index afce934ef..38772eadb 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSEnumerator; diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 021b58a82..74162008e 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSError; diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 00e483687..fd4501b05 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSException; diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index d36746d91..ff6b2f848 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSExpression; diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index 925889964..c9d561f2f 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSExtensionContext; diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index de20b39d6..54d71dd0e 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSExtensionItem; diff --git a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 45f750de1..3435c1186 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSFileAccessIntent; diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index bd184b5ea..d93903836 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSFileHandle; diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index cb6a89d5b..0011a0852 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSFileManager; diff --git a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs +++ b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index a57a305d4..a827018a5 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSFileVersion; diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 9b8decbc3..9ae7534b2 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSFileWrapper; diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index 2a9dbccf4..97ba85f2f 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs index 18652c5e3..593567eff 100644 --- a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSGarbageCollector; diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 0d77c2c66..13bf608ea 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; #[doc = "NSValueGeometryExtensions"] impl NSValue { pub unsafe fn valueWithPoint(point: NSPoint) -> Id { diff --git a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs +++ b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index d706bda74..a72b5d82f 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSHTTPCookie; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index f21978951..db3e83300 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSHTTPCookieStorage; diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 4d0ceef77..7f784b24f 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSHashTable; diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index 5a1c14f63..e86cc5f3a 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSHost; diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index dc9ae2b97..75790039d 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSISO8601DateFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index a0c8babb8..f00d04f8f 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSIndexPath; diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index a1e351647..23f427b05 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSIndexSet; diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index 0110a6e65..6cc0b6b2c 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSInflectionRule; diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index f02abd8b4..d8042a62b 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSInvocation; diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 02d440d79..2dce373af 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSItemProvider; diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 858dba5e8..ddcfaede6 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSJSONSerialization; diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index 98ede10dd..865ff4732 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; #[doc = "NSKeyValueCoding"] impl NSObject { pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 707ada86a..21f7f4df0 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; #[doc = "NSKeyValueObserving"] impl NSObject { pub unsafe fn observeValueForKeyPath_ofObject_change_context( diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index b29abc318..bca8ad0b2 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSKeyedArchiver; diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index 2c708f427..de787d586 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSLengthFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 44dff1ca0..a2413ff9d 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSLinguisticTagger; diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index 793032f4c..b0bf9c4f1 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSListFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 2b55f6ebc..2107ebdde 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSLocale; diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index e1ad2467d..23cf87a75 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSLock; diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 762c7e203..fbacfa4c1 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSMapTable; diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 50ce8784e..24f34153b 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSMassFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index d736cbbcf..39c448642 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSMeasurement; diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 3120ccdda..67046912d 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSMeasurementFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 0ad9c916d..3a4e3f28a 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSMetadataQuery; diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index 9dcbf17a1..ce28717d4 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSMethodSignature; diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index 712804012..e02b31397 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSMorphology; diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 723f2d9e5..8f3efb85c 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSNetService; diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 13f860010..5cf2f652c 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSNotification; diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index 5e0d6091f..ac924b57e 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSNotificationQueue; diff --git a/crates/icrate/src/generated/Foundation/NSNull.rs b/crates/icrate/src/generated/Foundation/NSNull.rs index 8fe6cdc09..e8b0863ad 100644 --- a/crates/icrate/src/generated/Foundation/NSNull.rs +++ b/crates/icrate/src/generated/Foundation/NSNull.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSNull; diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index c17d0df64..9d3e69b41 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSNumberFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index a7f4c5921..ca94a565e 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; #[doc = "NSCoderMethods"] impl NSObject { pub unsafe fn version() -> NSInteger { diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs index 52761ceb7..0ae574d08 100644 --- a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; #[doc = "NSScripting"] impl NSObject { pub unsafe fn scriptingValueForSpecifier( diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 4dc1223fb..2ac3329b5 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSOperation; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index bae074275..97a07c395 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSOrderedCollectionChange; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index f30237dbb..aa01182bf 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSOrderedCollectionDifference; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 43bd22128..82b9ea463 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSOrderedSet; diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index f67e35ae4..4a5edffed 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSOrthography; diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index 6af257e61..c26d5f36f 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; #[doc = "NSStringPathExtensions"] impl NSString { pub unsafe fn pathWithComponents(components: TodoGenerics) -> Id { diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs index 311595de3..ab153d1ab 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSPersonNameComponents; diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index beb3084f6..c317e73b2 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSPersonNameComponentsFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index ab00af33d..5b9121129 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSPointerArray; diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 7917967f2..8a4dd7a26 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSPointerFunctions; diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 8ac4f9533..b9cfb9fb8 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSPort; diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index 7656009f1..4efd2f93a 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSPortCoder; diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index 8c060d59b..c293d5068 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSPortMessage; diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index 385aa5f45..41e4fd998 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSPortNameServer; diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 8b1f2630a..e4b4bb994 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSPredicate; diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index fc3dc1216..c35706553 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSProcessInfo; diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index e4c05bfed..2a34ba14e 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSProgress; diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 01e67f5c4..f4aaadcbd 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSPropertyListSerialization; diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index e63068db9..08cc742da 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSProtocolChecker; diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 49d1582d5..958948bb3 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSProxy; diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index deff844eb..87f16d503 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; #[doc = "NSValueRangeExtensions"] impl NSValue { pub unsafe fn valueWithRange(range: NSRange) -> Id { diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index ce014614f..55499edf5 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSRegularExpression; diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index a42592a1e..28bcdbb30 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSRelativeDateTimeFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 48286865e..3282c369c 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSRunLoop; diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 37906001a..a0c8c127e 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSScanner; diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index 442e236c9..7d1d0cc21 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSScriptClassDescription; diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs index bef23ea32..7b8c298ac 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSScriptCoercionHandler; diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 304f0e079..beb5e4a95 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSScriptCommand; diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index 3978bc969..4745a74ab 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSScriptCommandDescription; diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index e16b7c32b..c3ebc8687 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSScriptExecutionContext; diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index 28e4e7818..f666b280e 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; #[doc = "NSScriptKeyValueCoding"] impl NSObject { pub unsafe fn valueAtIndex_inPropertyWithKey( diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index a46759ddf..68736e283 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSScriptObjectSpecifier; diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index 589cf41a0..b4111ab21 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSCloneCommand; diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 78aeb7095..dd0e7d4e7 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSScriptSuiteRegistry; diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index 47d440b4b..b2e294dd3 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSScriptWhoseTest; diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index f2320a292..5d68c7c0d 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSSet; diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index ecd8ec10e..536af24a1 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSSortDescriptor; diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 833d743ef..19b411d49 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSSpellServer; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index bceea756d..e5c671d98 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSStream; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 84953c60a..798c2cfdd 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSString; diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index e905c3d89..1a15c533a 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSTask; diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 22ac3ddd3..5ecf2adbb 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSTextCheckingResult; diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 6ca6e0024..8dc754006 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSThread; diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 1a1d6434a..c05a615f0 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSTimeZone; diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 92ff51ad0..49e872c74 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSTimer; diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index 61d8d3c12..08328a620 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURL; diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index ec9affe56..3fdae1afb 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLAuthenticationChallenge; diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 67b4d4144..550a2c9f1 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSCachedURLResponse; diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 784778bd8..78011eb75 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLConnection; diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index f449b0253..e50cd66a9 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLCredential; diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index e8f38bf7f..41bf87003 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLCredentialStorage; diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index fdbf78a18..481520c31 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLDownload; diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 4065f5791..6314f6292 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLHandle; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 8a509acf7..18bc71f6c 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLProtectionSpace; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 76fe273b3..2745512ba 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLProtocol; diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index f13c475b3..8c3319b71 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLRequest; diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index f65d1978e..cf35fc3cc 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLResponse; diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index f19207b0e..7e50b5702 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSURLSession; diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index 03153d06a..28e38a064 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSUUID; diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 82a046231..65b709f53 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSUbiquitousKeyValueStore; diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index 2a93ffa36..06eaecf5b 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSUndoManager; diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index eaad1597c..c2dc820dd 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSUnitConverter; diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 472f29ce9..f758e5b1a 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSUserActivity; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index e9ef361b4..4b90aef3d 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSUserDefaults; diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index dc0c6fa48..2adbeefa1 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSUserNotification; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index 67a90b502..24cbba6a0 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSUserScriptTask; diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index d2495271c..32ad81ad4 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSValue; diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index 5af6b5dcc..4df0d7d29 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSValueTransformer; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index 2b40c7864..6bb96af35 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSXMLDTD; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index db02a4ce3..572cc9738 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSXMLDTDNode; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index a437ed02c..bb01b467e 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSXMLDocument; diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index 262d3071f..6d6774d6b 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSXMLElement; diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index b08e56f2c..ee9866530 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSXMLNode; diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 4cd310fb7..88da5df61 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSXMLParser; diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 3720b32c7..af96ee89b 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -1,3 +1,7 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] struct NSXPCConnection; diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index 8b1378917..71ec80437 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -1 +1,4 @@ - +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; From c6a60580fb8f7abb54a36d6771248a80f30f45c7 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 16:37:57 +0200 Subject: [PATCH 030/131] Allow skipping methods --- crates/header-translator/src/config.rs | 51 +++++++++++++++---- crates/header-translator/src/lib.rs | 5 +- crates/header-translator/src/main.rs | 2 +- crates/header-translator/src/method.rs | 34 ++++++------- crates/header-translator/src/stmt.rs | 16 +++--- crates/icrate/src/Foundation.toml | 10 ++++ .../src/generated/Foundation/NSObject.rs | 3 -- 7 files changed, 80 insertions(+), 41 deletions(-) diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index c2f3c2ffd..6dbd541ff 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -1,4 +1,4 @@ -use std::collections::{HashMap, HashSet}; +use std::collections::HashMap; use std::fs; use std::io::Result; use std::path::{Path, PathBuf}; @@ -8,10 +8,15 @@ use serde::Deserialize; type ClassName = String; type Selector = String; -#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize)] -pub struct Unsafe { +#[derive(Default, Deserialize)] +struct Unsafe { #[serde(rename = "safe-methods")] - pub safe_methods: HashMap>, + safe_methods: HashMap>, +} + +#[derive(Default, Deserialize)] +struct Skipped { + methods: HashMap>, } #[derive(Deserialize)] @@ -25,7 +30,21 @@ struct InnerConfig { unsafe_: Unsafe, #[serde(rename = "mutating-methods")] #[serde(default)] - mutating_methods: HashMap>, + mutating_methods: HashMap>, + #[serde(default)] + skipped: Skipped, +} + +#[derive(Debug, Default, Clone, PartialEq, Eq)] +pub struct ClassData { + pub selector_data: HashMap, +} + +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +pub struct MethodData { + pub safe: bool, + pub skipped: bool, + // TODO: mutating } #[derive(Debug, Clone, PartialEq, Eq)] @@ -34,8 +53,7 @@ pub struct Config { pub headers: Vec, /// The output path, relative to the toml file. pub output: PathBuf, - pub unsafe_: Unsafe, - pub mutating_methods: HashMap>, + pub class_data: HashMap, } impl Config { @@ -58,12 +76,27 @@ impl Config { .unwrap_or_else(|| Path::new("generated").join(&name)), ); + let mut class_data: HashMap = HashMap::new(); + + for (class_name, selectors) in config.unsafe_.safe_methods { + let data = class_data.entry(class_name).or_default(); + for sel in selectors { + data.selector_data.entry(sel).or_default().safe = true; + } + } + + for (class_name, selectors) in config.skipped.methods { + let data = class_data.entry(class_name).or_default(); + for sel in selectors { + data.selector_data.entry(sel).or_default().skipped = true; + } + } + Ok(Self { name, headers, output, - unsafe_: config.unsafe_, - mutating_methods: config.mutating_methods, + class_data, }) } } diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 6472aaa7f..1425450d0 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -11,13 +11,12 @@ mod stmt; pub use self::config::Config; -use self::config::Unsafe; use self::stmt::Stmt; -pub fn create_rust_file(entities: &[Entity<'_>], unsafe_: &Unsafe) -> TokenStream { +pub fn create_rust_file(entities: &[Entity<'_>], config: &Config) -> TokenStream { let iter = entities .iter() - .filter_map(|entity| Stmt::parse(entity, &unsafe_)); + .filter_map(|entity| Stmt::parse(entity, config)); quote! { #[allow(unused_imports)] use objc2::{ClassType, extern_class, msg_send, msg_send_id}; diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 2ba10c650..4f7d64c3a 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -162,7 +162,7 @@ fn main() { continue; } - let tokens = create_rust_file(&res, &config.unsafe_); + let tokens = create_rust_file(&res, &config); let formatted = run_rustfmt(tokens); // println!("{}\n\n\n\n", res); diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index eb453b2e7..677744d05 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -1,10 +1,9 @@ -use std::collections::HashSet; - use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; +use crate::config::ClassData; use crate::objc2_utils::in_selector_family; use crate::rust_type::RustType; @@ -21,14 +20,6 @@ impl MemoryManagement { /// Verifies that the selector and the memory management rules match up /// in a way that we can just use `msg_send_id!`. fn verify_sel(self, sel: &str) { - // TODO: Handle these differently - if sel == "unarchiver:didDecodeObject:" { - return; - } - if sel == "awakeAfterUsingCoder:" { - return; - } - let bytes = sel.as_bytes(); if in_selector_family(bytes, b"new") { assert!( @@ -79,14 +70,23 @@ pub struct Method { impl Method { /// Takes one of `EntityKind::ObjCInstanceMethodDecl` or /// `EntityKind::ObjCClassMethodDecl`. - pub fn parse(entity: Entity<'_>, safe_methods: Option<&HashSet>) -> Option { + pub fn parse(entity: Entity<'_>, class_data: Option<&ClassData>) -> Option { // println!("Method {:?}", entity.get_display_name()); let selector = entity.get_name().expect("method selector"); - let safe = if let Some(safe_methods) = safe_methods { - safe_methods.contains(&selector) - } else { - false - }; + + let data = class_data + .map(|class_data| { + class_data + .selector_data + .get(&selector) + .copied() + .unwrap_or_default() + }) + .unwrap_or_default(); + + if data.skipped { + return None; + } if entity.is_variadic() { println!("Can't handle variadic method {}", selector); @@ -225,7 +225,7 @@ impl Method { designated_initializer, arguments, result_type, - safe, + safe: data.safe, }) } } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index ca6feb0cf..bf9d02efd 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -3,7 +3,7 @@ use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; -use crate::config::Unsafe; +use crate::config::Config; use crate::method::Method; #[derive(Debug, Clone)] @@ -37,7 +37,7 @@ pub enum Stmt { } impl Stmt { - pub fn parse(entity: &Entity<'_>, unsafe_: &Unsafe) -> Option { + pub fn parse(entity: &Entity<'_>, config: &Config) -> Option { match entity.get_kind() { EntityKind::InclusionDirective | EntityKind::MacroExpansion @@ -47,7 +47,7 @@ impl Stmt { EntityKind::ObjCInterfaceDecl => { // entity.get_mangled_objc_names() let name = entity.get_name().expect("class name"); - let safe_methods = unsafe_.safe_methods.get(&name); + let class_data = config.class_data.get(&name); let availability = Availability::parse( entity .get_platform_availability() @@ -77,7 +77,7 @@ impl Stmt { protocols.push(entity.get_name().expect("protocolref to have name")); } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - if let Some(method) = Method::parse(entity, safe_methods) { + if let Some(method) = Method::parse(entity, class_data) { methods.push(method); } } @@ -140,12 +140,12 @@ impl Stmt { protocols.push(entity.get_name().expect("protocolref to have name")); } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - let safe_methods = unsafe_.safe_methods.get( + let class_data = config.class_data.get( class_name .as_ref() .expect("no category class before methods"), ); - if let Some(method) = Method::parse(entity, safe_methods) { + if let Some(method) = Method::parse(entity, class_data) { methods.push(method); } } @@ -179,7 +179,7 @@ impl Stmt { } EntityKind::ObjCProtocolDecl => { let name = entity.get_name().expect("protocol name"); - let safe_methods = unsafe_.safe_methods.get(&name); + let class_data = config.class_data.get(&name); let availability = Availability::parse( entity .get_platform_availability() @@ -198,7 +198,7 @@ impl Stmt { } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { // TODO: Required vs. optional methods - if let Some(method) = Method::parse(entity, safe_methods) { + if let Some(method) = Method::parse(entity, class_data) { methods.push(method); } } diff --git a/crates/icrate/src/Foundation.toml b/crates/icrate/src/Foundation.toml index e09ee4500..d2a544eee 100644 --- a/crates/icrate/src/Foundation.toml +++ b/crates/icrate/src/Foundation.toml @@ -26,3 +26,13 @@ NSMutableString = [ "appendString:", "setString:", ] + +[skipped.methods] +NSKeyedUnarchiverDelegate = [ + # Uses NS_RELEASES_ARGUMENT and NS_RETURNS_RETAINED + "unarchiver:didDecodeObject:", +] +NSObject = [ + # Uses NS_REPLACES_RECEIVER + "awakeAfterUsingCoder:", +] diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index ca94a565e..597a9ff88 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -13,9 +13,6 @@ impl NSObject { pub unsafe fn replacementObjectForCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, replacementObjectForCoder: coder] } - pub unsafe fn awakeAfterUsingCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, awakeAfterUsingCoder: coder] - } pub unsafe fn classForCoder(&self) -> &Class { msg_send![self, classForCoder] } From 1aecbea0910f05e86d12d9a425ede3d13a57a9d1 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 16:47:30 +0200 Subject: [PATCH 031/131] Properly emit `unsafe` --- crates/header-translator/src/method.rs | 6 ++++-- crates/icrate/src/Foundation.toml | 8 ++++---- crates/icrate/src/generated/Foundation/NSPathUtilities.rs | 2 +- crates/icrate/src/generated/Foundation/NSString.rs | 8 ++++---- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 677744d05..6630cdb1d 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -289,15 +289,17 @@ impl ToTokens for Method { format_ident!("msg_send") }; + let unsafe_ = if self.safe { quote!() } else { quote!(unsafe) }; + let result = if self.is_class_method { quote! { - pub unsafe fn #fn_name(#(#fn_args),*) #ret { + pub #unsafe_ fn #fn_name(#(#fn_args),*) #ret { #macro_name![Self::class(), #method_call] } } } else { quote! { - pub unsafe fn #fn_name(&self #(, #fn_args)*) #ret { + pub #unsafe_ fn #fn_name(&self #(, #fn_args)*) #ret { #macro_name![self, #method_call] } } diff --git a/crates/icrate/src/Foundation.toml b/crates/icrate/src/Foundation.toml index d2a544eee..4580a3abf 100644 --- a/crates/icrate/src/Foundation.toml +++ b/crates/icrate/src/Foundation.toml @@ -17,14 +17,14 @@ NSString = [ NSMutableString = [ "new", "initWithString:", - "appendString:", - "setString:", + # "appendString:", + # "setString:", ] [mutating-methods] NSMutableString = [ - "appendString:", - "setString:", + # "appendString:", + # "setString:", ] [skipped.methods] diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index c26d5f36f..47729fad3 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -7,7 +7,7 @@ impl NSString { pub unsafe fn pathWithComponents(components: TodoGenerics) -> Id { msg_send_id![Self::class(), pathWithComponents: components] } - pub unsafe fn stringByAppendingPathComponent(&self, str: &NSString) -> Id { + pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id { msg_send_id![self, stringByAppendingPathComponent: str] } pub unsafe fn stringByAppendingPathExtension( diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 798c2cfdd..ac740d998 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -19,7 +19,7 @@ impl NSString { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn length(&self) -> NSUInteger { + pub fn length(&self) -> NSUInteger { msg_send![self, length] } } @@ -182,7 +182,7 @@ impl NSString { pub unsafe fn rangeOfComposedCharacterSequencesForRange(&self, range: NSRange) -> NSRange { msg_send![self, rangeOfComposedCharacterSequencesForRange: range] } - pub unsafe fn stringByAppendingString(&self, aString: &NSString) -> Id { + pub fn stringByAppendingString(&self, aString: &NSString) -> Id { msg_send_id![self, stringByAppendingString: aString] } pub unsafe fn uppercaseStringWithLocale( @@ -315,7 +315,7 @@ impl NSString { pub unsafe fn maximumLengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger { msg_send![self, maximumLengthOfBytesUsingEncoding: enc] } - pub unsafe fn lengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger { + pub fn lengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger { msg_send![self, lengthOfBytesUsingEncoding: enc] } pub unsafe fn localizedNameOfStringEncoding( @@ -713,7 +713,7 @@ impl NSString { pub unsafe fn localizedCapitalizedString(&self) -> Id { msg_send_id![self, localizedCapitalizedString] } - pub unsafe fn UTF8String(&self) -> *mut c_char { + pub fn UTF8String(&self) -> *mut c_char { msg_send![self, UTF8String] } pub unsafe fn fastestEncoding(&self) -> NSStringEncoding { From 522955aa52740be29e080612e7553a133a7f5d52 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 17:09:48 +0200 Subject: [PATCH 032/131] Make classes public --- crates/header-translator/src/stmt.rs | 2 +- .../generated/Foundation/NSAffineTransform.rs | 2 +- .../Foundation/NSAppleEventDescriptor.rs | 2 +- .../Foundation/NSAppleEventManager.rs | 2 +- .../src/generated/Foundation/NSAppleScript.rs | 2 +- .../src/generated/Foundation/NSArchiver.rs | 4 +- .../src/generated/Foundation/NSArray.rs | 4 +- .../Foundation/NSAttributedString.rs | 8 +-- .../generated/Foundation/NSAutoreleasePool.rs | 2 +- .../NSBackgroundActivityScheduler.rs | 2 +- .../src/generated/Foundation/NSBundle.rs | 4 +- .../Foundation/NSByteCountFormatter.rs | 2 +- .../src/generated/Foundation/NSCache.rs | 2 +- .../src/generated/Foundation/NSCalendar.rs | 4 +- .../generated/Foundation/NSCalendarDate.rs | 2 +- .../generated/Foundation/NSCharacterSet.rs | 4 +- .../Foundation/NSClassDescription.rs | 2 +- .../src/generated/Foundation/NSCoder.rs | 2 +- .../Foundation/NSComparisonPredicate.rs | 2 +- .../Foundation/NSCompoundPredicate.rs | 2 +- .../src/generated/Foundation/NSConnection.rs | 4 +- .../icrate/src/generated/Foundation/NSData.rs | 6 +-- .../icrate/src/generated/Foundation/NSDate.rs | 2 +- .../Foundation/NSDateComponentsFormatter.rs | 2 +- .../generated/Foundation/NSDateFormatter.rs | 2 +- .../generated/Foundation/NSDateInterval.rs | 2 +- .../Foundation/NSDateIntervalFormatter.rs | 2 +- .../generated/Foundation/NSDecimalNumber.rs | 4 +- .../src/generated/Foundation/NSDictionary.rs | 4 +- .../generated/Foundation/NSDistantObject.rs | 2 +- .../generated/Foundation/NSDistributedLock.rs | 2 +- .../NSDistributedNotificationCenter.rs | 2 +- .../generated/Foundation/NSEnergyFormatter.rs | 2 +- .../src/generated/Foundation/NSEnumerator.rs | 2 +- .../src/generated/Foundation/NSError.rs | 2 +- .../src/generated/Foundation/NSException.rs | 4 +- .../src/generated/Foundation/NSExpression.rs | 2 +- .../Foundation/NSExtensionContext.rs | 2 +- .../generated/Foundation/NSExtensionItem.rs | 2 +- .../generated/Foundation/NSFileCoordinator.rs | 4 +- .../src/generated/Foundation/NSFileHandle.rs | 4 +- .../src/generated/Foundation/NSFileManager.rs | 6 +-- .../src/generated/Foundation/NSFileVersion.rs | 2 +- .../src/generated/Foundation/NSFileWrapper.rs | 2 +- .../src/generated/Foundation/NSFormatter.rs | 2 +- .../Foundation/NSGarbageCollector.rs | 2 +- .../src/generated/Foundation/NSHTTPCookie.rs | 2 +- .../Foundation/NSHTTPCookieStorage.rs | 2 +- .../src/generated/Foundation/NSHashTable.rs | 2 +- .../icrate/src/generated/Foundation/NSHost.rs | 2 +- .../Foundation/NSISO8601DateFormatter.rs | 2 +- .../src/generated/Foundation/NSIndexPath.rs | 2 +- .../src/generated/Foundation/NSIndexSet.rs | 4 +- .../generated/Foundation/NSInflectionRule.rs | 4 +- .../src/generated/Foundation/NSInvocation.rs | 2 +- .../generated/Foundation/NSItemProvider.rs | 2 +- .../Foundation/NSJSONSerialization.rs | 2 +- .../generated/Foundation/NSKeyedArchiver.rs | 4 +- .../generated/Foundation/NSLengthFormatter.rs | 2 +- .../Foundation/NSLinguisticTagger.rs | 2 +- .../generated/Foundation/NSListFormatter.rs | 2 +- .../src/generated/Foundation/NSLocale.rs | 2 +- .../icrate/src/generated/Foundation/NSLock.rs | 8 +-- .../src/generated/Foundation/NSMapTable.rs | 2 +- .../generated/Foundation/NSMassFormatter.rs | 2 +- .../src/generated/Foundation/NSMeasurement.rs | 2 +- .../Foundation/NSMeasurementFormatter.rs | 2 +- .../src/generated/Foundation/NSMetadata.rs | 8 +-- .../generated/Foundation/NSMethodSignature.rs | 2 +- .../src/generated/Foundation/NSMorphology.rs | 4 +- .../src/generated/Foundation/NSNetServices.rs | 4 +- .../generated/Foundation/NSNotification.rs | 4 +- .../Foundation/NSNotificationQueue.rs | 2 +- .../icrate/src/generated/Foundation/NSNull.rs | 2 +- .../generated/Foundation/NSNumberFormatter.rs | 2 +- .../src/generated/Foundation/NSOperation.rs | 8 +-- .../Foundation/NSOrderedCollectionChange.rs | 2 +- .../NSOrderedCollectionDifference.rs | 2 +- .../src/generated/Foundation/NSOrderedSet.rs | 4 +- .../src/generated/Foundation/NSOrthography.rs | 2 +- .../Foundation/NSPersonNameComponents.rs | 2 +- .../NSPersonNameComponentsFormatter.rs | 2 +- .../generated/Foundation/NSPointerArray.rs | 2 +- .../Foundation/NSPointerFunctions.rs | 2 +- .../icrate/src/generated/Foundation/NSPort.rs | 8 +-- .../src/generated/Foundation/NSPortCoder.rs | 2 +- .../src/generated/Foundation/NSPortMessage.rs | 2 +- .../generated/Foundation/NSPortNameServer.rs | 8 +-- .../src/generated/Foundation/NSPredicate.rs | 2 +- .../src/generated/Foundation/NSProcessInfo.rs | 2 +- .../src/generated/Foundation/NSProgress.rs | 2 +- .../generated/Foundation/NSPropertyList.rs | 2 +- .../generated/Foundation/NSProtocolChecker.rs | 2 +- .../src/generated/Foundation/NSProxy.rs | 2 +- .../Foundation/NSRegularExpression.rs | 4 +- .../Foundation/NSRelativeDateTimeFormatter.rs | 2 +- .../src/generated/Foundation/NSRunLoop.rs | 2 +- .../src/generated/Foundation/NSScanner.rs | 2 +- .../Foundation/NSScriptClassDescription.rs | 2 +- .../Foundation/NSScriptCoercionHandler.rs | 2 +- .../generated/Foundation/NSScriptCommand.rs | 2 +- .../Foundation/NSScriptCommandDescription.rs | 2 +- .../Foundation/NSScriptExecutionContext.rs | 2 +- .../Foundation/NSScriptObjectSpecifiers.rs | 22 ++++---- .../NSScriptStandardSuiteCommands.rs | 20 +++---- .../Foundation/NSScriptSuiteRegistry.rs | 2 +- .../Foundation/NSScriptWhoseTests.rs | 6 +-- .../icrate/src/generated/Foundation/NSSet.rs | 6 +-- .../generated/Foundation/NSSortDescriptor.rs | 2 +- .../src/generated/Foundation/NSSpellServer.rs | 2 +- .../src/generated/Foundation/NSStream.rs | 6 +-- .../src/generated/Foundation/NSString.rs | 8 +-- .../icrate/src/generated/Foundation/NSTask.rs | 2 +- .../Foundation/NSTextCheckingResult.rs | 2 +- .../src/generated/Foundation/NSThread.rs | 2 +- .../src/generated/Foundation/NSTimeZone.rs | 2 +- .../src/generated/Foundation/NSTimer.rs | 2 +- .../icrate/src/generated/Foundation/NSURL.rs | 8 +-- .../NSURLAuthenticationChallenge.rs | 2 +- .../src/generated/Foundation/NSURLCache.rs | 4 +- .../generated/Foundation/NSURLConnection.rs | 2 +- .../generated/Foundation/NSURLCredential.rs | 2 +- .../Foundation/NSURLCredentialStorage.rs | 2 +- .../src/generated/Foundation/NSURLDownload.rs | 2 +- .../src/generated/Foundation/NSURLHandle.rs | 2 +- .../Foundation/NSURLProtectionSpace.rs | 2 +- .../src/generated/Foundation/NSURLProtocol.rs | 2 +- .../src/generated/Foundation/NSURLRequest.rs | 4 +- .../src/generated/Foundation/NSURLResponse.rs | 4 +- .../src/generated/Foundation/NSURLSession.rs | 22 ++++---- .../icrate/src/generated/Foundation/NSUUID.rs | 2 +- .../Foundation/NSUbiquitousKeyValueStore.rs | 2 +- .../src/generated/Foundation/NSUndoManager.rs | 2 +- .../icrate/src/generated/Foundation/NSUnit.rs | 52 +++++++++---------- .../generated/Foundation/NSUserActivity.rs | 2 +- .../generated/Foundation/NSUserDefaults.rs | 2 +- .../Foundation/NSUserNotification.rs | 6 +-- .../generated/Foundation/NSUserScriptTask.rs | 8 +-- .../src/generated/Foundation/NSValue.rs | 4 +- .../Foundation/NSValueTransformer.rs | 4 +- .../src/generated/Foundation/NSXMLDTD.rs | 2 +- .../src/generated/Foundation/NSXMLDTDNode.rs | 2 +- .../src/generated/Foundation/NSXMLDocument.rs | 2 +- .../src/generated/Foundation/NSXMLElement.rs | 2 +- .../src/generated/Foundation/NSXMLNode.rs | 2 +- .../src/generated/Foundation/NSXMLParser.rs | 2 +- .../generated/Foundation/NSXPCConnection.rs | 10 ++-- 147 files changed, 268 insertions(+), 268 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index bf9d02efd..8afac73fe 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -252,7 +252,7 @@ impl ToTokens for Stmt { quote! { extern_class!( #[derive(Debug)] - struct #name; + pub struct #name; unsafe impl ClassType for #name { type Super = #superclass_name; diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index 1c36c572b..148f957a4 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSAffineTransform; + pub struct NSAffineTransform; unsafe impl ClassType for NSAffineTransform { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 6f0eba5fd..e22e3a971 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSAppleEventDescriptor; + pub struct NSAppleEventDescriptor; unsafe impl ClassType for NSAppleEventDescriptor { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index 870921e83..ac60470d8 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSAppleEventManager; + pub struct NSAppleEventManager; unsafe impl ClassType for NSAppleEventManager { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index 75090c5c1..85ae25790 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSAppleScript; + pub struct NSAppleScript; unsafe impl ClassType for NSAppleScript { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 2ad15a6cd..1057d28cc 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSArchiver; + pub struct NSArchiver; unsafe impl ClassType for NSArchiver { type Super = NSCoder; } @@ -51,7 +51,7 @@ impl NSArchiver { } extern_class!( #[derive(Debug)] - struct NSUnarchiver; + pub struct NSUnarchiver; unsafe impl ClassType for NSUnarchiver { type Super = NSCoder; } diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 3fdc061c2..ede87940d 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSArray; + pub struct NSArray; unsafe impl ClassType for NSArray { type Super = NSObject; } @@ -341,7 +341,7 @@ impl NSArray { } extern_class!( #[derive(Debug)] - struct NSMutableArray; + pub struct NSMutableArray; unsafe impl ClassType for NSMutableArray { type Super = NSArray; } diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index a5a4ff114..db506c29d 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSAttributedString; + pub struct NSAttributedString; unsafe impl ClassType for NSAttributedString { type Super = NSObject; } @@ -123,7 +123,7 @@ impl NSAttributedString { } extern_class!( #[derive(Debug)] - struct NSMutableAttributedString; + pub struct NSMutableAttributedString; unsafe impl ClassType for NSMutableAttributedString { type Super = NSAttributedString; } @@ -191,7 +191,7 @@ impl NSMutableAttributedString { } extern_class!( #[derive(Debug)] - struct NSAttributedStringMarkdownParsingOptions; + pub struct NSAttributedStringMarkdownParsingOptions; unsafe impl ClassType for NSAttributedStringMarkdownParsingOptions { type Super = NSObject; } @@ -307,7 +307,7 @@ impl NSAttributedString { } extern_class!( #[derive(Debug)] - struct NSPresentationIntent; + pub struct NSPresentationIntent; unsafe impl ClassType for NSPresentationIntent { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs index 070bf16b9..41965331b 100644 --- a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSAutoreleasePool; + pub struct NSAutoreleasePool; unsafe impl ClassType for NSAutoreleasePool { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 49624a3ad..752d85484 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSBackgroundActivityScheduler; + pub struct NSBackgroundActivityScheduler; unsafe impl ClassType for NSBackgroundActivityScheduler { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index c559adffd..dde3cb1d8 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSBundle; + pub struct NSBundle; unsafe impl ClassType for NSBundle { type Super = NSObject; } @@ -354,7 +354,7 @@ impl NSString { } extern_class!( #[derive(Debug)] - struct NSBundleResourceRequest; + pub struct NSBundleResourceRequest; unsafe impl ClassType for NSBundleResourceRequest { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 884c808b0..5f8c01aa6 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSByteCountFormatter; + pub struct NSByteCountFormatter; unsafe impl ClassType for NSByteCountFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 5175ca8cc..ef88e3585 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSCache; + pub struct NSCache; unsafe impl ClassType for NSCache { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 30150fee6..ac4f4ecca 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSCalendar; + pub struct NSCalendar; unsafe impl ClassType for NSCalendar { type Super = NSObject; } @@ -514,7 +514,7 @@ impl NSCalendar { } extern_class!( #[derive(Debug)] - struct NSDateComponents; + pub struct NSDateComponents; unsafe impl ClassType for NSDateComponents { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index 4601b76f0..587e94410 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSCalendarDate; + pub struct NSCalendarDate; unsafe impl ClassType for NSCalendarDate { type Super = NSDate; } diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index ec68b60e8..f3ebe1d01 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSCharacterSet; + pub struct NSCharacterSet; unsafe impl ClassType for NSCharacterSet { type Super = NSObject; } @@ -97,7 +97,7 @@ impl NSCharacterSet { } extern_class!( #[derive(Debug)] - struct NSMutableCharacterSet; + pub struct NSMutableCharacterSet; unsafe impl ClassType for NSMutableCharacterSet { type Super = NSCharacterSet; } diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index f6f39d76a..304d2d186 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSClassDescription; + pub struct NSClassDescription; unsafe impl ClassType for NSClassDescription { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 75be70250..c32ac6bf1 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSCoder; + pub struct NSCoder; unsafe impl ClassType for NSCoder { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index 0a041df00..bffa6429d 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSComparisonPredicate; + pub struct NSComparisonPredicate; unsafe impl ClassType for NSComparisonPredicate { type Super = NSPredicate; } diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 37ebe0acc..678579503 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSCompoundPredicate; + pub struct NSCompoundPredicate; unsafe impl ClassType for NSCompoundPredicate { type Super = NSPredicate; } diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 170adf3d8..c886cb3d2 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSConnection; + pub struct NSConnection; unsafe impl ClassType for NSConnection { type Super = NSObject; } @@ -199,7 +199,7 @@ impl NSConnection { } extern_class!( #[derive(Debug)] - struct NSDistantObjectRequest; + pub struct NSDistantObjectRequest; unsafe impl ClassType for NSDistantObjectRequest { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index c6896995a..b341bf6a9 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSData; + pub struct NSData; unsafe impl ClassType for NSData { type Super = NSObject; } @@ -302,7 +302,7 @@ impl NSData { } extern_class!( #[derive(Debug)] - struct NSMutableData; + pub struct NSMutableData; unsafe impl ClassType for NSMutableData { type Super = NSData; } @@ -386,7 +386,7 @@ impl NSMutableData { } extern_class!( #[derive(Debug)] - struct NSPurgeableData; + pub struct NSPurgeableData; unsafe impl ClassType for NSPurgeableData { type Super = NSMutableData; } diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 8fb10858c..9c0d2ec2e 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSDate; + pub struct NSDate; unsafe impl ClassType for NSDate { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 505fe3f63..6a8e537ae 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSDateComponentsFormatter; + pub struct NSDateComponentsFormatter; unsafe impl ClassType for NSDateComponentsFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 3feae3d07..3158a843d 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSDateFormatter; + pub struct NSDateFormatter; unsafe impl ClassType for NSDateFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index cf9e0f3e2..fcce6c578 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSDateInterval; + pub struct NSDateInterval; unsafe impl ClassType for NSDateInterval { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index 88385c4cd..0bf20b74a 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSDateIntervalFormatter; + pub struct NSDateIntervalFormatter; unsafe impl ClassType for NSDateIntervalFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index 10df8436f..d97959a4a 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSDecimalNumber; + pub struct NSDecimalNumber; unsafe impl ClassType for NSDecimalNumber { type Super = NSNumber; } @@ -213,7 +213,7 @@ impl NSDecimalNumber { } extern_class!( #[derive(Debug)] - struct NSDecimalNumberHandler; + pub struct NSDecimalNumberHandler; unsafe impl ClassType for NSDecimalNumberHandler { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index c47ea6869..05e9f35e4 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSDictionary; + pub struct NSDictionary; unsafe impl ClassType for NSDictionary { type Super = NSObject; } @@ -223,7 +223,7 @@ impl NSDictionary { } extern_class!( #[derive(Debug)] - struct NSMutableDictionary; + pub struct NSMutableDictionary; unsafe impl ClassType for NSMutableDictionary { type Super = NSDictionary; } diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index a7c551a04..2f6117043 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSDistantObject; + pub struct NSDistantObject; unsafe impl ClassType for NSDistantObject { type Super = NSProxy; } diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index f73fa108b..a333c521b 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSDistributedLock; + pub struct NSDistributedLock; unsafe impl ClassType for NSDistributedLock { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index d24f00b03..1c2e2aaff 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSDistributedNotificationCenter; + pub struct NSDistributedNotificationCenter; unsafe impl ClassType for NSDistributedNotificationCenter { type Super = NSNotificationCenter; } diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index be26d9a9a..63d67d94b 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSEnergyFormatter; + pub struct NSEnergyFormatter; unsafe impl ClassType for NSEnergyFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 38772eadb..47a6e7d64 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSEnumerator; + pub struct NSEnumerator; unsafe impl ClassType for NSEnumerator { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 74162008e..a946c1e67 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSError; + pub struct NSError; unsafe impl ClassType for NSError { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index fd4501b05..5d04686d9 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSException; + pub struct NSException; unsafe impl ClassType for NSException { type Super = NSObject; } @@ -71,7 +71,7 @@ impl NSException { } extern_class!( #[derive(Debug)] - struct NSAssertionHandler; + pub struct NSAssertionHandler; unsafe impl ClassType for NSAssertionHandler { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index ff6b2f848..ec9d305e2 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSExpression; + pub struct NSExpression; unsafe impl ClassType for NSExpression { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index c9d561f2f..836b1fa35 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSExtensionContext; + pub struct NSExtensionContext; unsafe impl ClassType for NSExtensionContext { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index 54d71dd0e..4a5431173 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSExtensionItem; + pub struct NSExtensionItem; unsafe impl ClassType for NSExtensionItem { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 3435c1186..a908e4453 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSFileAccessIntent; + pub struct NSFileAccessIntent; unsafe impl ClassType for NSFileAccessIntent { type Super = NSObject; } @@ -28,7 +28,7 @@ impl NSFileAccessIntent { } extern_class!( #[derive(Debug)] - struct NSFileCoordinator; + pub struct NSFileCoordinator; unsafe impl ClassType for NSFileCoordinator { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index d93903836..59180249b 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSFileHandle; + pub struct NSFileHandle; unsafe impl ClassType for NSFileHandle { type Super = NSObject; } @@ -199,7 +199,7 @@ impl NSFileHandle { } extern_class!( #[derive(Debug)] - struct NSPipe; + pub struct NSPipe; unsafe impl ClassType for NSPipe { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 0011a0852..501018949 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSFileManager; + pub struct NSFileManager; unsafe impl ClassType for NSFileManager { type Super = NSObject; } @@ -568,7 +568,7 @@ impl NSObject { } extern_class!( #[derive(Debug)] - struct NSDirectoryEnumerator; + pub struct NSDirectoryEnumerator; unsafe impl ClassType for NSDirectoryEnumerator { type Super = NSEnumerator; } @@ -595,7 +595,7 @@ impl NSDirectoryEnumerator { } extern_class!( #[derive(Debug)] - struct NSFileProviderService; + pub struct NSFileProviderService; unsafe impl ClassType for NSFileProviderService { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index a827018a5..2feb1b918 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSFileVersion; + pub struct NSFileVersion; unsafe impl ClassType for NSFileVersion { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 9ae7534b2..5a21d9c51 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSFileWrapper; + pub struct NSFileWrapper; unsafe impl ClassType for NSFileWrapper { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index 97ba85f2f..c0c1a4f05 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSFormatter; + pub struct NSFormatter; unsafe impl ClassType for NSFormatter { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs index 593567eff..6f6233419 100644 --- a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSGarbageCollector; + pub struct NSGarbageCollector; unsafe impl ClassType for NSGarbageCollector { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index a72b5d82f..6a6db702b 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSHTTPCookie; + pub struct NSHTTPCookie; unsafe impl ClassType for NSHTTPCookie { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index db3e83300..a4a3fb59d 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSHTTPCookieStorage; + pub struct NSHTTPCookieStorage; unsafe impl ClassType for NSHTTPCookieStorage { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 7f784b24f..526e56d34 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSHashTable; + pub struct NSHashTable; unsafe impl ClassType for NSHashTable { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index e86cc5f3a..d6d80c981 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSHost; + pub struct NSHost; unsafe impl ClassType for NSHost { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 75790039d..793f8a0a6 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSISO8601DateFormatter; + pub struct NSISO8601DateFormatter; unsafe impl ClassType for NSISO8601DateFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index f00d04f8f..2a30e4c9a 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSIndexPath; + pub struct NSIndexPath; unsafe impl ClassType for NSIndexPath { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index 23f427b05..d459d397b 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSIndexSet; + pub struct NSIndexSet; unsafe impl ClassType for NSIndexSet { type Super = NSObject; } @@ -175,7 +175,7 @@ impl NSIndexSet { } extern_class!( #[derive(Debug)] - struct NSMutableIndexSet; + pub struct NSMutableIndexSet; unsafe impl ClassType for NSMutableIndexSet { type Super = NSIndexSet; } diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index 6cc0b6b2c..3c75801c7 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSInflectionRule; + pub struct NSInflectionRule; unsafe impl ClassType for NSInflectionRule { type Super = NSObject; } @@ -19,7 +19,7 @@ impl NSInflectionRule { } extern_class!( #[derive(Debug)] - struct NSInflectionRuleExplicit; + pub struct NSInflectionRuleExplicit; unsafe impl ClassType for NSInflectionRuleExplicit { type Super = NSInflectionRule; } diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index d8042a62b..92f6150a4 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSInvocation; + pub struct NSInvocation; unsafe impl ClassType for NSInvocation { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 2dce373af..1110b4c13 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSItemProvider; + pub struct NSItemProvider; unsafe impl ClassType for NSItemProvider { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index ddcfaede6..7609be2e7 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSJSONSerialization; + pub struct NSJSONSerialization; unsafe impl ClassType for NSJSONSerialization { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index bca8ad0b2..920abacbf 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSKeyedArchiver; + pub struct NSKeyedArchiver; unsafe impl ClassType for NSKeyedArchiver { type Super = NSCoder; } @@ -108,7 +108,7 @@ impl NSKeyedArchiver { } extern_class!( #[derive(Debug)] - struct NSKeyedUnarchiver; + pub struct NSKeyedUnarchiver; unsafe impl ClassType for NSKeyedUnarchiver { type Super = NSCoder; } diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index de787d586..02e3fbf2d 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSLengthFormatter; + pub struct NSLengthFormatter; unsafe impl ClassType for NSLengthFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index a2413ff9d..bf46ef4d1 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSLinguisticTagger; + pub struct NSLinguisticTagger; unsafe impl ClassType for NSLinguisticTagger { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index b0bf9c4f1..d9a777af2 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSListFormatter; + pub struct NSListFormatter; unsafe impl ClassType for NSListFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 2107ebdde..3387c3e61 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSLocale; + pub struct NSLocale; unsafe impl ClassType for NSLocale { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index 23cf87a75..e0cc05666 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSLock; + pub struct NSLock; unsafe impl ClassType for NSLock { type Super = NSObject; } @@ -25,7 +25,7 @@ impl NSLock { } extern_class!( #[derive(Debug)] - struct NSConditionLock; + pub struct NSConditionLock; unsafe impl ClassType for NSConditionLock { type Super = NSObject; } @@ -68,7 +68,7 @@ impl NSConditionLock { } extern_class!( #[derive(Debug)] - struct NSRecursiveLock; + pub struct NSRecursiveLock; unsafe impl ClassType for NSRecursiveLock { type Super = NSObject; } @@ -89,7 +89,7 @@ impl NSRecursiveLock { } extern_class!( #[derive(Debug)] - struct NSCondition; + pub struct NSCondition; unsafe impl ClassType for NSCondition { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index fbacfa4c1..f9ac5ab41 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSMapTable; + pub struct NSMapTable; unsafe impl ClassType for NSMapTable { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 24f34153b..f9280c5ae 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSMassFormatter; + pub struct NSMassFormatter; unsafe impl ClassType for NSMassFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index 39c448642..25b80b089 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSMeasurement; + pub struct NSMeasurement; unsafe impl ClassType for NSMeasurement { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 67046912d..e1c23f02f 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSMeasurementFormatter; + pub struct NSMeasurementFormatter; unsafe impl ClassType for NSMeasurementFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 3a4e3f28a..829364086 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSMetadataQuery; + pub struct NSMetadataQuery; unsafe impl ClassType for NSMetadataQuery { type Super = NSObject; } @@ -129,7 +129,7 @@ impl NSMetadataQuery { } extern_class!( #[derive(Debug)] - struct NSMetadataItem; + pub struct NSMetadataItem; unsafe impl ClassType for NSMetadataItem { type Super = NSObject; } @@ -150,7 +150,7 @@ impl NSMetadataItem { } extern_class!( #[derive(Debug)] - struct NSMetadataQueryAttributeValueTuple; + pub struct NSMetadataQueryAttributeValueTuple; unsafe impl ClassType for NSMetadataQueryAttributeValueTuple { type Super = NSObject; } @@ -168,7 +168,7 @@ impl NSMetadataQueryAttributeValueTuple { } extern_class!( #[derive(Debug)] - struct NSMetadataQueryResultGroup; + pub struct NSMetadataQueryResultGroup; unsafe impl ClassType for NSMetadataQueryResultGroup { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index ce28717d4..c6bd64ade 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSMethodSignature; + pub struct NSMethodSignature; unsafe impl ClassType for NSMethodSignature { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index e02b31397..d9e5c3ba1 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSMorphology; + pub struct NSMorphology; unsafe impl ClassType for NSMorphology { type Super = NSObject; } @@ -53,7 +53,7 @@ impl NSMorphology { } extern_class!( #[derive(Debug)] - struct NSMorphologyCustomPronoun; + pub struct NSMorphologyCustomPronoun; unsafe impl ClassType for NSMorphologyCustomPronoun { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 8f3efb85c..741ea11ba 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSNetService; + pub struct NSNetService; unsafe impl ClassType for NSNetService { type Super = NSObject; } @@ -110,7 +110,7 @@ impl NSNetService { } extern_class!( #[derive(Debug)] - struct NSNetServiceBrowser; + pub struct NSNetServiceBrowser; unsafe impl ClassType for NSNetServiceBrowser { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 5cf2f652c..3f4234aff 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSNotification; + pub struct NSNotification; unsafe impl ClassType for NSNotification { type Super = NSObject; } @@ -57,7 +57,7 @@ impl NSNotification { } extern_class!( #[derive(Debug)] - struct NSNotificationCenter; + pub struct NSNotificationCenter; unsafe impl ClassType for NSNotificationCenter { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index ac924b57e..69b3b25f8 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSNotificationQueue; + pub struct NSNotificationQueue; unsafe impl ClassType for NSNotificationQueue { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSNull.rs b/crates/icrate/src/generated/Foundation/NSNull.rs index e8b0863ad..c91edfd71 100644 --- a/crates/icrate/src/generated/Foundation/NSNull.rs +++ b/crates/icrate/src/generated/Foundation/NSNull.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSNull; + pub struct NSNull; unsafe impl ClassType for NSNull { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 9d3e69b41..37eeec0af 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSNumberFormatter; + pub struct NSNumberFormatter; unsafe impl ClassType for NSNumberFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 2ac3329b5..c57b7e56b 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSOperation; + pub struct NSOperation; unsafe impl ClassType for NSOperation { type Super = NSObject; } @@ -82,7 +82,7 @@ impl NSOperation { } extern_class!( #[derive(Debug)] - struct NSBlockOperation; + pub struct NSBlockOperation; unsafe impl ClassType for NSBlockOperation { type Super = NSOperation; } @@ -100,7 +100,7 @@ impl NSBlockOperation { } extern_class!( #[derive(Debug)] - struct NSInvocationOperation; + pub struct NSInvocationOperation; unsafe impl ClassType for NSInvocationOperation { type Super = NSOperation; } @@ -126,7 +126,7 @@ impl NSInvocationOperation { } extern_class!( #[derive(Debug)] - struct NSOperationQueue; + pub struct NSOperationQueue; unsafe impl ClassType for NSOperationQueue { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 97a07c395..b6782963e 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSOrderedCollectionChange; + pub struct NSOrderedCollectionChange; unsafe impl ClassType for NSOrderedCollectionChange { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index aa01182bf..77bb4f00f 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSOrderedCollectionDifference; + pub struct NSOrderedCollectionDifference; unsafe impl ClassType for NSOrderedCollectionDifference { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 82b9ea463..ecbdb5072 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSOrderedSet; + pub struct NSOrderedSet; unsafe impl ClassType for NSOrderedSet { type Super = NSObject; } @@ -325,7 +325,7 @@ impl NSOrderedSet { } extern_class!( #[derive(Debug)] - struct NSMutableOrderedSet; + pub struct NSMutableOrderedSet; unsafe impl ClassType for NSMutableOrderedSet { type Super = NSOrderedSet; } diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index 4a5edffed..a7055522b 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSOrthography; + pub struct NSOrthography; unsafe impl ClassType for NSOrthography { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs index ab153d1ab..985e40589 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSPersonNameComponents; + pub struct NSPersonNameComponents; unsafe impl ClassType for NSPersonNameComponents { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index c317e73b2..4c856cb0a 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSPersonNameComponentsFormatter; + pub struct NSPersonNameComponentsFormatter; unsafe impl ClassType for NSPersonNameComponentsFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index 5b9121129..01ae2daf8 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSPointerArray; + pub struct NSPointerArray; unsafe impl ClassType for NSPointerArray { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 8a4dd7a26..9326588db 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSPointerFunctions; + pub struct NSPointerFunctions; unsafe impl ClassType for NSPointerFunctions { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index b9cfb9fb8..fff94854a 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSPort; + pub struct NSPort; unsafe impl ClassType for NSPort { type Super = NSObject; } @@ -90,7 +90,7 @@ impl NSPort { } extern_class!( #[derive(Debug)] - struct NSMachPort; + pub struct NSMachPort; unsafe impl ClassType for NSMachPort { type Super = NSPort; } @@ -133,7 +133,7 @@ impl NSMachPort { } extern_class!( #[derive(Debug)] - struct NSMessagePort; + pub struct NSMessagePort; unsafe impl ClassType for NSMessagePort { type Super = NSPort; } @@ -141,7 +141,7 @@ extern_class!( impl NSMessagePort {} extern_class!( #[derive(Debug)] - struct NSSocketPort; + pub struct NSSocketPort; unsafe impl ClassType for NSSocketPort { type Super = NSPort; } diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index 4efd2f93a..4bfbf18cb 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSPortCoder; + pub struct NSPortCoder; unsafe impl ClassType for NSPortCoder { type Super = NSCoder; } diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index c293d5068..fd5bae5e4 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSPortMessage; + pub struct NSPortMessage; unsafe impl ClassType for NSPortMessage { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index 41e4fd998..4f688bcee 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSPortNameServer; + pub struct NSPortNameServer; unsafe impl ClassType for NSPortNameServer { type Super = NSObject; } @@ -32,7 +32,7 @@ impl NSPortNameServer { } extern_class!( #[derive(Debug)] - struct NSMachBootstrapServer; + pub struct NSMachBootstrapServer; unsafe impl ClassType for NSMachBootstrapServer { type Super = NSPortNameServer; } @@ -60,7 +60,7 @@ impl NSMachBootstrapServer { } extern_class!( #[derive(Debug)] - struct NSMessagePortNameServer; + pub struct NSMessagePortNameServer; unsafe impl ClassType for NSMessagePortNameServer { type Super = NSPortNameServer; } @@ -82,7 +82,7 @@ impl NSMessagePortNameServer { } extern_class!( #[derive(Debug)] - struct NSSocketPortNameServer; + pub struct NSSocketPortNameServer; unsafe impl ClassType for NSSocketPortNameServer { type Super = NSPortNameServer; } diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index e4b4bb994..04d4c3a7a 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSPredicate; + pub struct NSPredicate; unsafe impl ClassType for NSPredicate { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index c35706553..4503b7ff5 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSProcessInfo; + pub struct NSProcessInfo; unsafe impl ClassType for NSProcessInfo { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 2a34ba14e..37aeb72aa 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSProgress; + pub struct NSProgress; unsafe impl ClassType for NSProgress { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index f4aaadcbd..74ae5fd13 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSPropertyListSerialization; + pub struct NSPropertyListSerialization; unsafe impl ClassType for NSPropertyListSerialization { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index 08cc742da..c476ef029 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSProtocolChecker; + pub struct NSProtocolChecker; unsafe impl ClassType for NSProtocolChecker { type Super = NSProxy; } diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 958948bb3..cf8a46d00 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSProxy; + pub struct NSProxy; unsafe impl ClassType for NSProxy { type Super = Object; } diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 55499edf5..6595a1382 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSRegularExpression; + pub struct NSRegularExpression; unsafe impl ClassType for NSRegularExpression { type Super = NSObject; } @@ -171,7 +171,7 @@ impl NSRegularExpression { } extern_class!( #[derive(Debug)] - struct NSDataDetector; + pub struct NSDataDetector; unsafe impl ClassType for NSDataDetector { type Super = NSRegularExpression; } diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index 28bcdbb30..b8a3745a4 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSRelativeDateTimeFormatter; + pub struct NSRelativeDateTimeFormatter; unsafe impl ClassType for NSRelativeDateTimeFormatter { type Super = NSFormatter; } diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 3282c369c..2a54ca810 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSRunLoop; + pub struct NSRunLoop; unsafe impl ClassType for NSRunLoop { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index a0c8c127e..3adeb683c 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSScanner; + pub struct NSScanner; unsafe impl ClassType for NSScanner { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index 7d1d0cc21..b37133430 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSScriptClassDescription; + pub struct NSScriptClassDescription; unsafe impl ClassType for NSScriptClassDescription { type Super = NSClassDescription; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs index 7b8c298ac..880483a0b 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSScriptCoercionHandler; + pub struct NSScriptCoercionHandler; unsafe impl ClassType for NSScriptCoercionHandler { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index beb5e4a95..02ad888d4 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSScriptCommand; + pub struct NSScriptCommand; unsafe impl ClassType for NSScriptCommand { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index 4745a74ab..ab5346048 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSScriptCommandDescription; + pub struct NSScriptCommandDescription; unsafe impl ClassType for NSScriptCommandDescription { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index c3ebc8687..2ee159aa1 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSScriptExecutionContext; + pub struct NSScriptExecutionContext; unsafe impl ClassType for NSScriptExecutionContext { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index 68736e283..e05e0613c 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSScriptObjectSpecifier; + pub struct NSScriptObjectSpecifier; unsafe impl ClassType for NSScriptObjectSpecifier { type Super = NSObject; } @@ -139,7 +139,7 @@ impl NSObject { } extern_class!( #[derive(Debug)] - struct NSIndexSpecifier; + pub struct NSIndexSpecifier; unsafe impl ClassType for NSIndexSpecifier { type Super = NSScriptObjectSpecifier; } @@ -169,7 +169,7 @@ impl NSIndexSpecifier { } extern_class!( #[derive(Debug)] - struct NSMiddleSpecifier; + pub struct NSMiddleSpecifier; unsafe impl ClassType for NSMiddleSpecifier { type Super = NSScriptObjectSpecifier; } @@ -177,7 +177,7 @@ extern_class!( impl NSMiddleSpecifier {} extern_class!( #[derive(Debug)] - struct NSNameSpecifier; + pub struct NSNameSpecifier; unsafe impl ClassType for NSNameSpecifier { type Super = NSScriptObjectSpecifier; } @@ -210,7 +210,7 @@ impl NSNameSpecifier { } extern_class!( #[derive(Debug)] - struct NSPositionalSpecifier; + pub struct NSPositionalSpecifier; unsafe impl ClassType for NSPositionalSpecifier { type Super = NSObject; } @@ -250,7 +250,7 @@ impl NSPositionalSpecifier { } extern_class!( #[derive(Debug)] - struct NSPropertySpecifier; + pub struct NSPropertySpecifier; unsafe impl ClassType for NSPropertySpecifier { type Super = NSScriptObjectSpecifier; } @@ -258,7 +258,7 @@ extern_class!( impl NSPropertySpecifier {} extern_class!( #[derive(Debug)] - struct NSRandomSpecifier; + pub struct NSRandomSpecifier; unsafe impl ClassType for NSRandomSpecifier { type Super = NSScriptObjectSpecifier; } @@ -266,7 +266,7 @@ extern_class!( impl NSRandomSpecifier {} extern_class!( #[derive(Debug)] - struct NSRangeSpecifier; + pub struct NSRangeSpecifier; unsafe impl ClassType for NSRangeSpecifier { type Super = NSScriptObjectSpecifier; } @@ -307,7 +307,7 @@ impl NSRangeSpecifier { } extern_class!( #[derive(Debug)] - struct NSRelativeSpecifier; + pub struct NSRelativeSpecifier; unsafe impl ClassType for NSRelativeSpecifier { type Super = NSScriptObjectSpecifier; } @@ -348,7 +348,7 @@ impl NSRelativeSpecifier { } extern_class!( #[derive(Debug)] - struct NSUniqueIDSpecifier; + pub struct NSUniqueIDSpecifier; unsafe impl ClassType for NSUniqueIDSpecifier { type Super = NSScriptObjectSpecifier; } @@ -381,7 +381,7 @@ impl NSUniqueIDSpecifier { } extern_class!( #[derive(Debug)] - struct NSWhoseSpecifier; + pub struct NSWhoseSpecifier; unsafe impl ClassType for NSWhoseSpecifier { type Super = NSScriptObjectSpecifier; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index b4111ab21..7202b88d9 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSCloneCommand; + pub struct NSCloneCommand; unsafe impl ClassType for NSCloneCommand { type Super = NSScriptCommand; } @@ -19,7 +19,7 @@ impl NSCloneCommand { } extern_class!( #[derive(Debug)] - struct NSCloseCommand; + pub struct NSCloseCommand; unsafe impl ClassType for NSCloseCommand { type Super = NSScriptCommand; } @@ -31,7 +31,7 @@ impl NSCloseCommand { } extern_class!( #[derive(Debug)] - struct NSCountCommand; + pub struct NSCountCommand; unsafe impl ClassType for NSCountCommand { type Super = NSScriptCommand; } @@ -39,7 +39,7 @@ extern_class!( impl NSCountCommand {} extern_class!( #[derive(Debug)] - struct NSCreateCommand; + pub struct NSCreateCommand; unsafe impl ClassType for NSCreateCommand { type Super = NSScriptCommand; } @@ -54,7 +54,7 @@ impl NSCreateCommand { } extern_class!( #[derive(Debug)] - struct NSDeleteCommand; + pub struct NSDeleteCommand; unsafe impl ClassType for NSDeleteCommand { type Super = NSScriptCommand; } @@ -69,7 +69,7 @@ impl NSDeleteCommand { } extern_class!( #[derive(Debug)] - struct NSExistsCommand; + pub struct NSExistsCommand; unsafe impl ClassType for NSExistsCommand { type Super = NSScriptCommand; } @@ -77,7 +77,7 @@ extern_class!( impl NSExistsCommand {} extern_class!( #[derive(Debug)] - struct NSGetCommand; + pub struct NSGetCommand; unsafe impl ClassType for NSGetCommand { type Super = NSScriptCommand; } @@ -85,7 +85,7 @@ extern_class!( impl NSGetCommand {} extern_class!( #[derive(Debug)] - struct NSMoveCommand; + pub struct NSMoveCommand; unsafe impl ClassType for NSMoveCommand { type Super = NSScriptCommand; } @@ -100,7 +100,7 @@ impl NSMoveCommand { } extern_class!( #[derive(Debug)] - struct NSQuitCommand; + pub struct NSQuitCommand; unsafe impl ClassType for NSQuitCommand { type Super = NSScriptCommand; } @@ -112,7 +112,7 @@ impl NSQuitCommand { } extern_class!( #[derive(Debug)] - struct NSSetCommand; + pub struct NSSetCommand; unsafe impl ClassType for NSSetCommand { type Super = NSScriptCommand; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index dd0e7d4e7..5b0685448 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSScriptSuiteRegistry; + pub struct NSScriptSuiteRegistry; unsafe impl ClassType for NSScriptSuiteRegistry { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index b2e294dd3..1dc1d17c2 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSScriptWhoseTest; + pub struct NSScriptWhoseTest; unsafe impl ClassType for NSScriptWhoseTest { type Super = NSObject; } @@ -22,7 +22,7 @@ impl NSScriptWhoseTest { } extern_class!( #[derive(Debug)] - struct NSLogicalTest; + pub struct NSLogicalTest; unsafe impl ClassType for NSLogicalTest { type Super = NSScriptWhoseTest; } @@ -40,7 +40,7 @@ impl NSLogicalTest { } extern_class!( #[derive(Debug)] - struct NSSpecifierTest; + pub struct NSSpecifierTest; unsafe impl ClassType for NSSpecifierTest { type Super = NSScriptWhoseTest; } diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index 5d68c7c0d..84651754d 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSSet; + pub struct NSSet; unsafe impl ClassType for NSSet { type Super = NSObject; } @@ -132,7 +132,7 @@ impl NSSet { } extern_class!( #[derive(Debug)] - struct NSMutableSet; + pub struct NSMutableSet; unsafe impl ClassType for NSMutableSet { type Super = NSSet; } @@ -183,7 +183,7 @@ impl NSMutableSet { } extern_class!( #[derive(Debug)] - struct NSCountedSet; + pub struct NSCountedSet; unsafe impl ClassType for NSCountedSet { type Super = NSMutableSet; } diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index 536af24a1..d8449ac94 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSSortDescriptor; + pub struct NSSortDescriptor; unsafe impl ClassType for NSSortDescriptor { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 19b411d49..6b714b6f3 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSSpellServer; + pub struct NSSpellServer; unsafe impl ClassType for NSSpellServer { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index e5c671d98..c27c507fa 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSStream; + pub struct NSStream; unsafe impl ClassType for NSStream { type Super = NSObject; } @@ -47,7 +47,7 @@ impl NSStream { } extern_class!( #[derive(Debug)] - struct NSInputStream; + pub struct NSInputStream; unsafe impl ClassType for NSInputStream { type Super = NSStream; } @@ -75,7 +75,7 @@ impl NSInputStream { } extern_class!( #[derive(Debug)] - struct NSOutputStream; + pub struct NSOutputStream; unsafe impl ClassType for NSOutputStream { type Super = NSStream; } diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index ac740d998..3803338c5 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSString; + pub struct NSString; unsafe impl ClassType for NSString { type Super = NSObject; } @@ -768,7 +768,7 @@ impl NSString { impl NSString {} extern_class!( #[derive(Debug)] - struct NSMutableString; + pub struct NSMutableString; unsafe impl ClassType for NSMutableString { type Super = NSString; } @@ -926,7 +926,7 @@ impl NSString { } extern_class!( #[derive(Debug)] - struct NSSimpleCString; + pub struct NSSimpleCString; unsafe impl ClassType for NSSimpleCString { type Super = NSString; } @@ -934,7 +934,7 @@ extern_class!( impl NSSimpleCString {} extern_class!( #[derive(Debug)] - struct NSConstantString; + pub struct NSConstantString; unsafe impl ClassType for NSConstantString { type Super = NSSimpleCString; } diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 1a15c533a..ed3ef2f69 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSTask; + pub struct NSTask; unsafe impl ClassType for NSTask { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 5ecf2adbb..651d1ced4 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSTextCheckingResult; + pub struct NSTextCheckingResult; unsafe impl ClassType for NSTextCheckingResult { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 8dc754006..d4969c93e 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSThread; + pub struct NSThread; unsafe impl ClassType for NSThread { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index c05a615f0..c6fa7ea39 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSTimeZone; + pub struct NSTimeZone; unsafe impl ClassType for NSTimeZone { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 49e872c74..1f16436ab 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSTimer; + pub struct NSTimer; unsafe impl ClassType for NSTimer { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index 08328a620..97ec7a8c6 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURL; + pub struct NSURL; unsafe impl ClassType for NSURL { type Super = NSObject; } @@ -425,7 +425,7 @@ impl NSURL { impl NSURL {} extern_class!( #[derive(Debug)] - struct NSURLQueryItem; + pub struct NSURLQueryItem; unsafe impl ClassType for NSURLQueryItem { type Super = NSObject; } @@ -453,7 +453,7 @@ impl NSURLQueryItem { } extern_class!( #[derive(Debug)] - struct NSURLComponents; + pub struct NSURLComponents; unsafe impl ClassType for NSURLComponents { type Super = NSObject; } @@ -715,7 +715,7 @@ impl NSURL { } extern_class!( #[derive(Debug)] - struct NSFileSecurity; + pub struct NSFileSecurity; unsafe impl ClassType for NSFileSecurity { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index 3fdae1afb..5afb015c6 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLAuthenticationChallenge; + pub struct NSURLAuthenticationChallenge; unsafe impl ClassType for NSURLAuthenticationChallenge { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 550a2c9f1..c19d1ffed 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSCachedURLResponse; + pub struct NSCachedURLResponse; unsafe impl ClassType for NSCachedURLResponse { type Super = NSObject; } @@ -47,7 +47,7 @@ impl NSCachedURLResponse { } extern_class!( #[derive(Debug)] - struct NSURLCache; + pub struct NSURLCache; unsafe impl ClassType for NSURLCache { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 78011eb75..55ad84060 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLConnection; + pub struct NSURLConnection; unsafe impl ClassType for NSURLConnection { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index e50cd66a9..eba61beab 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLCredential; + pub struct NSURLCredential; unsafe impl ClassType for NSURLCredential { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 41bf87003..1af95bca4 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLCredentialStorage; + pub struct NSURLCredentialStorage; unsafe impl ClassType for NSURLCredentialStorage { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index 481520c31..daf0c57ff 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLDownload; + pub struct NSURLDownload; unsafe impl ClassType for NSURLDownload { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 6314f6292..76e5d7dee 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLHandle; + pub struct NSURLHandle; unsafe impl ClassType for NSURLHandle { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 18bc71f6c..c95e99e89 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLProtectionSpace; + pub struct NSURLProtectionSpace; unsafe impl ClassType for NSURLProtectionSpace { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 2745512ba..1b24f9ed8 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLProtocol; + pub struct NSURLProtocol; unsafe impl ClassType for NSURLProtocol { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 8c3319b71..f1682b077 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLRequest; + pub struct NSURLRequest; unsafe impl ClassType for NSURLRequest { type Super = NSObject; } @@ -77,7 +77,7 @@ impl NSURLRequest { } extern_class!( #[derive(Debug)] - struct NSMutableURLRequest; + pub struct NSMutableURLRequest; unsafe impl ClassType for NSMutableURLRequest { type Super = NSURLRequest; } diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index cf35fc3cc..36b976be5 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLResponse; + pub struct NSURLResponse; unsafe impl ClassType for NSURLResponse { type Super = NSObject; } @@ -43,7 +43,7 @@ impl NSURLResponse { } extern_class!( #[derive(Debug)] - struct NSHTTPURLResponse; + pub struct NSHTTPURLResponse; unsafe impl ClassType for NSHTTPURLResponse { type Super = NSURLResponse; } diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 7e50b5702..bb1b4d493 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSURLSession; + pub struct NSURLSession; unsafe impl ClassType for NSURLSession { type Super = NSObject; } @@ -232,7 +232,7 @@ impl NSURLSession { } extern_class!( #[derive(Debug)] - struct NSURLSessionTask; + pub struct NSURLSessionTask; unsafe impl ClassType for NSURLSessionTask { type Super = NSObject; } @@ -346,7 +346,7 @@ impl NSURLSessionTask { } extern_class!( #[derive(Debug)] - struct NSURLSessionDataTask; + pub struct NSURLSessionDataTask; unsafe impl ClassType for NSURLSessionDataTask { type Super = NSURLSessionTask; } @@ -361,7 +361,7 @@ impl NSURLSessionDataTask { } extern_class!( #[derive(Debug)] - struct NSURLSessionUploadTask; + pub struct NSURLSessionUploadTask; unsafe impl ClassType for NSURLSessionUploadTask { type Super = NSURLSessionDataTask; } @@ -376,7 +376,7 @@ impl NSURLSessionUploadTask { } extern_class!( #[derive(Debug)] - struct NSURLSessionDownloadTask; + pub struct NSURLSessionDownloadTask; unsafe impl ClassType for NSURLSessionDownloadTask { type Super = NSURLSessionTask; } @@ -394,7 +394,7 @@ impl NSURLSessionDownloadTask { } extern_class!( #[derive(Debug)] - struct NSURLSessionStreamTask; + pub struct NSURLSessionStreamTask; unsafe impl ClassType for NSURLSessionStreamTask { type Super = NSURLSessionTask; } @@ -452,7 +452,7 @@ impl NSURLSessionStreamTask { } extern_class!( #[derive(Debug)] - struct NSURLSessionWebSocketMessage; + pub struct NSURLSessionWebSocketMessage; unsafe impl ClassType for NSURLSessionWebSocketMessage { type Super = NSObject; } @@ -482,7 +482,7 @@ impl NSURLSessionWebSocketMessage { } extern_class!( #[derive(Debug)] - struct NSURLSessionWebSocketTask; + pub struct NSURLSessionWebSocketTask; unsafe impl ClassType for NSURLSessionWebSocketTask { type Super = NSURLSessionTask; } @@ -533,7 +533,7 @@ impl NSURLSessionWebSocketTask { } extern_class!( #[derive(Debug)] - struct NSURLSessionConfiguration; + pub struct NSURLSessionConfiguration; unsafe impl ClassType for NSURLSessionConfiguration { type Super = NSObject; } @@ -798,7 +798,7 @@ impl NSURLSessionConfiguration { } extern_class!( #[derive(Debug)] - struct NSURLSessionTaskTransactionMetrics; + pub struct NSURLSessionTaskTransactionMetrics; unsafe impl ClassType for NSURLSessionTaskTransactionMetrics { type Super = NSObject; } @@ -917,7 +917,7 @@ impl NSURLSessionTaskTransactionMetrics { } extern_class!( #[derive(Debug)] - struct NSURLSessionTaskMetrics; + pub struct NSURLSessionTaskMetrics; unsafe impl ClassType for NSURLSessionTaskMetrics { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index 28e38a064..0eb27bcf4 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSUUID; + pub struct NSUUID; unsafe impl ClassType for NSUUID { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 65b709f53..a107ecd22 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSUbiquitousKeyValueStore; + pub struct NSUbiquitousKeyValueStore; unsafe impl ClassType for NSUbiquitousKeyValueStore { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index 06eaecf5b..a30badce0 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSUndoManager; + pub struct NSUndoManager; unsafe impl ClassType for NSUndoManager { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index c2dc820dd..9df2e76f7 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSUnitConverter; + pub struct NSUnitConverter; unsafe impl ClassType for NSUnitConverter { type Super = NSObject; } @@ -19,7 +19,7 @@ impl NSUnitConverter { } extern_class!( #[derive(Debug)] - struct NSUnitConverterLinear; + pub struct NSUnitConverterLinear; unsafe impl ClassType for NSUnitConverterLinear { type Super = NSUnitConverter; } @@ -44,7 +44,7 @@ impl NSUnitConverterLinear { } extern_class!( #[derive(Debug)] - struct NSUnit; + pub struct NSUnit; unsafe impl ClassType for NSUnit { type Super = NSObject; } @@ -65,7 +65,7 @@ impl NSUnit { } extern_class!( #[derive(Debug)] - struct NSDimension; + pub struct NSDimension; unsafe impl ClassType for NSDimension { type Super = NSUnit; } @@ -87,7 +87,7 @@ impl NSDimension { } extern_class!( #[derive(Debug)] - struct NSUnitAcceleration; + pub struct NSUnitAcceleration; unsafe impl ClassType for NSUnitAcceleration { type Super = NSDimension; } @@ -102,7 +102,7 @@ impl NSUnitAcceleration { } extern_class!( #[derive(Debug)] - struct NSUnitAngle; + pub struct NSUnitAngle; unsafe impl ClassType for NSUnitAngle { type Super = NSDimension; } @@ -129,7 +129,7 @@ impl NSUnitAngle { } extern_class!( #[derive(Debug)] - struct NSUnitArea; + pub struct NSUnitArea; unsafe impl ClassType for NSUnitArea { type Super = NSDimension; } @@ -180,7 +180,7 @@ impl NSUnitArea { } extern_class!( #[derive(Debug)] - struct NSUnitConcentrationMass; + pub struct NSUnitConcentrationMass; unsafe impl ClassType for NSUnitConcentrationMass { type Super = NSDimension; } @@ -203,7 +203,7 @@ impl NSUnitConcentrationMass { } extern_class!( #[derive(Debug)] - struct NSUnitDispersion; + pub struct NSUnitDispersion; unsafe impl ClassType for NSUnitDispersion { type Super = NSDimension; } @@ -215,7 +215,7 @@ impl NSUnitDispersion { } extern_class!( #[derive(Debug)] - struct NSUnitDuration; + pub struct NSUnitDuration; unsafe impl ClassType for NSUnitDuration { type Super = NSDimension; } @@ -245,7 +245,7 @@ impl NSUnitDuration { } extern_class!( #[derive(Debug)] - struct NSUnitElectricCharge; + pub struct NSUnitElectricCharge; unsafe impl ClassType for NSUnitElectricCharge { type Super = NSDimension; } @@ -272,7 +272,7 @@ impl NSUnitElectricCharge { } extern_class!( #[derive(Debug)] - struct NSUnitElectricCurrent; + pub struct NSUnitElectricCurrent; unsafe impl ClassType for NSUnitElectricCurrent { type Super = NSDimension; } @@ -296,7 +296,7 @@ impl NSUnitElectricCurrent { } extern_class!( #[derive(Debug)] - struct NSUnitElectricPotentialDifference; + pub struct NSUnitElectricPotentialDifference; unsafe impl ClassType for NSUnitElectricPotentialDifference { type Super = NSDimension; } @@ -320,7 +320,7 @@ impl NSUnitElectricPotentialDifference { } extern_class!( #[derive(Debug)] - struct NSUnitElectricResistance; + pub struct NSUnitElectricResistance; unsafe impl ClassType for NSUnitElectricResistance { type Super = NSDimension; } @@ -344,7 +344,7 @@ impl NSUnitElectricResistance { } extern_class!( #[derive(Debug)] - struct NSUnitEnergy; + pub struct NSUnitEnergy; unsafe impl ClassType for NSUnitEnergy { type Super = NSDimension; } @@ -368,7 +368,7 @@ impl NSUnitEnergy { } extern_class!( #[derive(Debug)] - struct NSUnitFrequency; + pub struct NSUnitFrequency; unsafe impl ClassType for NSUnitFrequency { type Super = NSDimension; } @@ -404,7 +404,7 @@ impl NSUnitFrequency { } extern_class!( #[derive(Debug)] - struct NSUnitFuelEfficiency; + pub struct NSUnitFuelEfficiency; unsafe impl ClassType for NSUnitFuelEfficiency { type Super = NSDimension; } @@ -422,7 +422,7 @@ impl NSUnitFuelEfficiency { } extern_class!( #[derive(Debug)] - struct NSUnitInformationStorage; + pub struct NSUnitInformationStorage; unsafe impl ClassType for NSUnitInformationStorage { type Super = NSDimension; } @@ -536,7 +536,7 @@ impl NSUnitInformationStorage { } extern_class!( #[derive(Debug)] - struct NSUnitLength; + pub struct NSUnitLength; unsafe impl ClassType for NSUnitLength { type Super = NSDimension; } @@ -611,7 +611,7 @@ impl NSUnitLength { } extern_class!( #[derive(Debug)] - struct NSUnitIlluminance; + pub struct NSUnitIlluminance; unsafe impl ClassType for NSUnitIlluminance { type Super = NSDimension; } @@ -623,7 +623,7 @@ impl NSUnitIlluminance { } extern_class!( #[derive(Debug)] - struct NSUnitMass; + pub struct NSUnitMass; unsafe impl ClassType for NSUnitMass { type Super = NSDimension; } @@ -680,7 +680,7 @@ impl NSUnitMass { } extern_class!( #[derive(Debug)] - struct NSUnitPower; + pub struct NSUnitPower; unsafe impl ClassType for NSUnitPower { type Super = NSDimension; } @@ -722,7 +722,7 @@ impl NSUnitPower { } extern_class!( #[derive(Debug)] - struct NSUnitPressure; + pub struct NSUnitPressure; unsafe impl ClassType for NSUnitPressure { type Super = NSDimension; } @@ -761,7 +761,7 @@ impl NSUnitPressure { } extern_class!( #[derive(Debug)] - struct NSUnitSpeed; + pub struct NSUnitSpeed; unsafe impl ClassType for NSUnitSpeed { type Super = NSDimension; } @@ -782,7 +782,7 @@ impl NSUnitSpeed { } extern_class!( #[derive(Debug)] - struct NSUnitTemperature; + pub struct NSUnitTemperature; unsafe impl ClassType for NSUnitTemperature { type Super = NSDimension; } @@ -800,7 +800,7 @@ impl NSUnitTemperature { } extern_class!( #[derive(Debug)] - struct NSUnitVolume; + pub struct NSUnitVolume; unsafe impl ClassType for NSUnitVolume { type Super = NSDimension; } diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index f758e5b1a..eb265e7b2 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSUserActivity; + pub struct NSUserActivity; unsafe impl ClassType for NSUserActivity { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index 4b90aef3d..2d93323f2 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSUserDefaults; + pub struct NSUserDefaults; unsafe impl ClassType for NSUserDefaults { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 2adbeefa1..9ba1acc9a 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSUserNotification; + pub struct NSUserNotification; unsafe impl ClassType for NSUserNotification { type Super = NSObject; } @@ -135,7 +135,7 @@ impl NSUserNotification { } extern_class!( #[derive(Debug)] - struct NSUserNotificationAction; + pub struct NSUserNotificationAction; unsafe impl ClassType for NSUserNotificationAction { type Super = NSObject; } @@ -160,7 +160,7 @@ impl NSUserNotificationAction { } extern_class!( #[derive(Debug)] - struct NSUserNotificationCenter; + pub struct NSUserNotificationCenter; unsafe impl ClassType for NSUserNotificationCenter { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index 24cbba6a0..976ac0327 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSUserScriptTask; + pub struct NSUserScriptTask; unsafe impl ClassType for NSUserScriptTask { type Super = NSObject; } @@ -26,7 +26,7 @@ impl NSUserScriptTask { } extern_class!( #[derive(Debug)] - struct NSUserUnixTask; + pub struct NSUserUnixTask; unsafe impl ClassType for NSUserUnixTask { type Super = NSUserScriptTask; } @@ -64,7 +64,7 @@ impl NSUserUnixTask { } extern_class!( #[derive(Debug)] - struct NSUserAppleScriptTask; + pub struct NSUserAppleScriptTask; unsafe impl ClassType for NSUserAppleScriptTask { type Super = NSUserScriptTask; } @@ -84,7 +84,7 @@ impl NSUserAppleScriptTask { } extern_class!( #[derive(Debug)] - struct NSUserAutomatorTask; + pub struct NSUserAutomatorTask; unsafe impl ClassType for NSUserAutomatorTask { type Super = NSUserScriptTask; } diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index 32ad81ad4..ed2b742ed 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSValue; + pub struct NSValue; unsafe impl ClassType for NSValue { type Super = NSObject; } @@ -62,7 +62,7 @@ impl NSValue { } extern_class!( #[derive(Debug)] - struct NSNumber; + pub struct NSNumber; unsafe impl ClassType for NSNumber { type Super = NSValue; } diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index 4df0d7d29..e899f4749 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSValueTransformer; + pub struct NSValueTransformer; unsafe impl ClassType for NSValueTransformer { type Super = NSObject; } @@ -46,7 +46,7 @@ impl NSValueTransformer { } extern_class!( #[derive(Debug)] - struct NSSecureUnarchiveFromDataTransformer; + pub struct NSSecureUnarchiveFromDataTransformer; unsafe impl ClassType for NSSecureUnarchiveFromDataTransformer { type Super = NSValueTransformer; } diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index 6bb96af35..aefd844d0 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSXMLDTD; + pub struct NSXMLDTD; unsafe impl ClassType for NSXMLDTD { type Super = NSXMLNode; } diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index 572cc9738..8e2e19a6e 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSXMLDTDNode; + pub struct NSXMLDTDNode; unsafe impl ClassType for NSXMLDTDNode { type Super = NSXMLNode; } diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index bb01b467e..3e8c34d56 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSXMLDocument; + pub struct NSXMLDocument; unsafe impl ClassType for NSXMLDocument { type Super = NSXMLNode; } diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index 6d6774d6b..03ef57e36 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSXMLElement; + pub struct NSXMLElement; unsafe impl ClassType for NSXMLElement { type Super = NSXMLNode; } diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index ee9866530..e58409d31 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSXMLNode; + pub struct NSXMLNode; unsafe impl ClassType for NSXMLNode { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 88da5df61..653906d25 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSXMLParser; + pub struct NSXMLParser; unsafe impl ClassType for NSXMLParser { type Super = NSObject; } diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index af96ee89b..272f2e9b0 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -4,7 +4,7 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] - struct NSXPCConnection; + pub struct NSXPCConnection; unsafe impl ClassType for NSXPCConnection { type Super = NSObject; } @@ -107,7 +107,7 @@ impl NSXPCConnection { } extern_class!( #[derive(Debug)] - struct NSXPCListener; + pub struct NSXPCListener; unsafe impl ClassType for NSXPCListener { type Super = NSObject; } @@ -143,7 +143,7 @@ impl NSXPCListener { } extern_class!( #[derive(Debug)] - struct NSXPCInterface; + pub struct NSXPCInterface; unsafe impl ClassType for NSXPCInterface { type Super = NSObject; } @@ -245,7 +245,7 @@ impl NSXPCInterface { } extern_class!( #[derive(Debug)] - struct NSXPCListenerEndpoint; + pub struct NSXPCListenerEndpoint; unsafe impl ClassType for NSXPCListenerEndpoint { type Super = NSObject; } @@ -253,7 +253,7 @@ extern_class!( impl NSXPCListenerEndpoint {} extern_class!( #[derive(Debug)] - struct NSXPCCoder; + pub struct NSXPCCoder; unsafe impl ClassType for NSXPCCoder { type Super = NSCoder; } From 1a59c176afe4fa22538350f87548743b150112ce Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 17:12:26 +0200 Subject: [PATCH 033/131] Rename objc feature flag --- crates/icrate/Cargo.toml | 8 ++++---- crates/icrate/src/lib.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/icrate/Cargo.toml b/crates/icrate/Cargo.toml index c66d3738a..c4015a580 100644 --- a/crates/icrate/Cargo.toml +++ b/crates/icrate/Cargo.toml @@ -45,14 +45,14 @@ targets = [ ] [features] -default = ["std", "objc"] +default = ["std"] # Currently not possible to turn off, put here for forwards compatibility. std = ["alloc", "objc2?/std"] alloc = ["objc2?/alloc"] # Expose features that requires Objective-C. -objc = ["objc2"] +objective-c = ["objc2"] # Expose features that requires creating blocks. block = ["objc2?/block", "block2"] @@ -76,7 +76,7 @@ unstable-docsrs = [] # AppClip = [] # AppIntents = [] # AppTrackingTransparency = [] -AppKit = ["Foundation"] +AppKit = ["objective-c", "Foundation"] # AppleScriptKit = [] # AppleScriptObjC = [] # ApplicationServices = [] @@ -170,7 +170,7 @@ AppKit = ["Foundation"] # FileProviderUI = [] # FinderSync = [] # ForceFeedback = [] -Foundation = ["objc", "objc2/foundation"] +Foundation = ["objective-c", "objc2/foundation"] # FWAUserLib = [] # GameController = [] # GameKit = [] diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 3c468bc8b..ef250573c 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -12,7 +12,7 @@ // Update in Cargo.toml as well. #![doc(html_root_url = "https://docs.rs/icrate/0.0.1")] -#[cfg(feature = "objc")] +#[cfg(feature = "objective-c")] pub use objc2; // Frameworks From 9ba52d1133e0a4bff4be0e4ab0c74c486a9c46e0 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 17:50:01 +0200 Subject: [PATCH 034/131] Improve imports somewhat --- crates/header-translator/src/lib.rs | 37 +- crates/header-translator/src/main.rs | 12 +- crates/header-translator/src/stmt.rs | 52 ++- .../generated/Foundation/FoundationErrors.rs | 4 - .../FoundationLegacySwiftCompatibility.rs | 4 - .../generated/Foundation/NSAffineTransform.rs | 3 + .../Foundation/NSAppleEventDescriptor.rs | 4 + .../Foundation/NSAppleEventManager.rs | 4 + .../src/generated/Foundation/NSAppleScript.rs | 5 + .../src/generated/Foundation/NSArchiver.rs | 7 + .../src/generated/Foundation/NSArray.rs | 9 + .../Foundation/NSAttributedString.rs | 2 + .../generated/Foundation/NSAutoreleasePool.rs | 1 + .../NSBackgroundActivityScheduler.rs | 3 + .../src/generated/Foundation/NSBundle.rs | 13 + .../Foundation/NSByteCountFormatter.rs | 2 + .../src/generated/Foundation/NSByteOrder.rs | 4 - .../src/generated/Foundation/NSCache.rs | 3 + .../src/generated/Foundation/NSCalendar.rs | 9 + .../generated/Foundation/NSCalendarDate.rs | 4 + .../generated/Foundation/NSCharacterSet.rs | 5 + .../Foundation/NSClassDescription.rs | 6 + .../src/generated/Foundation/NSCoder.rs | 4 + .../Foundation/NSComparisonPredicate.rs | 3 + .../Foundation/NSCompoundPredicate.rs | 2 + .../src/generated/Foundation/NSConnection.rs | 14 + .../icrate/src/generated/Foundation/NSData.rs | 5 + .../icrate/src/generated/Foundation/NSDate.rs | 3 + .../Foundation/NSDateComponentsFormatter.rs | 3 + .../generated/Foundation/NSDateFormatter.rs | 10 + .../generated/Foundation/NSDateInterval.rs | 3 + .../Foundation/NSDateIntervalFormatter.rs | 7 + .../src/generated/Foundation/NSDecimal.rs | 4 - .../generated/Foundation/NSDecimalNumber.rs | 6 + .../src/generated/Foundation/NSDictionary.rs | 6 + .../generated/Foundation/NSDistantObject.rs | 4 + .../generated/Foundation/NSDistributedLock.rs | 2 + .../NSDistributedNotificationCenter.rs | 3 + .../generated/Foundation/NSEnergyFormatter.rs | 1 + .../src/generated/Foundation/NSEnumerator.rs | 3 + .../src/generated/Foundation/NSError.rs | 4 + .../src/generated/Foundation/NSException.rs | 6 + .../src/generated/Foundation/NSExpression.rs | 5 + .../Foundation/NSExtensionContext.rs | 1 + .../generated/Foundation/NSExtensionItem.rs | 2 + .../Foundation/NSExtensionRequestHandling.rs | 3 + .../generated/Foundation/NSFileCoordinator.rs | 8 + .../src/generated/Foundation/NSFileHandle.rs | 9 + .../src/generated/Foundation/NSFileManager.rs | 17 + .../generated/Foundation/NSFilePresenter.rs | 7 + .../src/generated/Foundation/NSFileVersion.rs | 8 + .../src/generated/Foundation/NSFileWrapper.rs | 6 + .../src/generated/Foundation/NSFormatter.rs | 6 + .../Foundation/NSGarbageCollector.rs | 1 + .../src/generated/Foundation/NSGeometry.rs | 73 ---- .../generated/Foundation/NSHFSFileTypes.rs | 4 - .../src/generated/Foundation/NSHTTPCookie.rs | 8 + .../Foundation/NSHTTPCookieStorage.rs | 9 + .../src/generated/Foundation/NSHashTable.rs | 5 + .../icrate/src/generated/Foundation/NSHost.rs | 4 + .../Foundation/NSISO8601DateFormatter.rs | 5 + .../src/generated/Foundation/NSIndexPath.rs | 2 + .../src/generated/Foundation/NSIndexSet.rs | 2 + .../generated/Foundation/NSInflectionRule.rs | 2 + .../src/generated/Foundation/NSInvocation.rs | 2 + .../generated/Foundation/NSItemProvider.rs | 4 + .../Foundation/NSJSONSerialization.rs | 5 + .../generated/Foundation/NSKeyValueCoding.rs | 157 ------- .../Foundation/NSKeyValueObserving.rs | 292 ------------- .../generated/Foundation/NSKeyedArchiver.rs | 10 + .../generated/Foundation/NSLengthFormatter.rs | 1 + .../Foundation/NSLinguisticTagger.rs | 5 + .../generated/Foundation/NSListFormatter.rs | 3 + .../src/generated/Foundation/NSLocale.rs | 7 + .../icrate/src/generated/Foundation/NSLock.rs | 3 + .../src/generated/Foundation/NSMapTable.rs | 5 + .../generated/Foundation/NSMassFormatter.rs | 2 + .../src/generated/Foundation/NSMeasurement.rs | 2 + .../Foundation/NSMeasurementFormatter.rs | 5 + .../src/generated/Foundation/NSMetadata.rs | 12 + .../Foundation/NSMetadataAttributes.rs | 4 - .../generated/Foundation/NSMethodSignature.rs | 1 + .../src/generated/Foundation/NSMorphology.rs | 4 + .../src/generated/Foundation/NSNetServices.rs | 14 + .../generated/Foundation/NSNotification.rs | 4 + .../Foundation/NSNotificationQueue.rs | 6 + .../icrate/src/generated/Foundation/NSNull.rs | 1 + .../generated/Foundation/NSNumberFormatter.rs | 9 + .../src/generated/Foundation/NSObjCRuntime.rs | 4 - .../src/generated/Foundation/NSObject.rs | 14 + .../generated/Foundation/NSObjectScripting.rs | 47 --- .../src/generated/Foundation/NSOperation.rs | 7 + .../Foundation/NSOrderedCollectionChange.rs | 1 + .../NSOrderedCollectionDifference.rs | 4 + .../src/generated/Foundation/NSOrderedSet.rs | 9 + .../src/generated/Foundation/NSOrthography.rs | 4 + .../generated/Foundation/NSPathUtilities.rs | 83 ---- .../Foundation/NSPersonNameComponents.rs | 3 + .../NSPersonNameComponentsFormatter.rs | 2 + .../generated/Foundation/NSPointerArray.rs | 3 + .../Foundation/NSPointerFunctions.rs | 1 + .../icrate/src/generated/Foundation/NSPort.rs | 11 + .../src/generated/Foundation/NSPortCoder.rs | 4 + .../src/generated/Foundation/NSPortMessage.rs | 5 + .../generated/Foundation/NSPortNameServer.rs | 3 + .../src/generated/Foundation/NSPredicate.rs | 6 + .../src/generated/Foundation/NSProcessInfo.rs | 6 + .../src/generated/Foundation/NSProgress.rs | 10 + .../generated/Foundation/NSPropertyList.rs | 7 + .../generated/Foundation/NSProtocolChecker.rs | 2 + .../src/generated/Foundation/NSProxy.rs | 3 + .../src/generated/Foundation/NSRange.rs | 13 - .../Foundation/NSRegularExpression.rs | 4 + .../Foundation/NSRelativeDateTimeFormatter.rs | 5 + .../src/generated/Foundation/NSRunLoop.rs | 7 + .../src/generated/Foundation/NSScanner.rs | 4 + .../Foundation/NSScriptClassDescription.rs | 2 + .../Foundation/NSScriptCoercionHandler.rs | 1 + .../generated/Foundation/NSScriptCommand.rs | 7 + .../Foundation/NSScriptCommandDescription.rs | 5 + .../Foundation/NSScriptExecutionContext.rs | 2 + .../Foundation/NSScriptKeyValueCoding.rs | 67 --- .../Foundation/NSScriptObjectSpecifiers.rs | 7 + .../NSScriptStandardSuiteCommands.rs | 5 + .../Foundation/NSScriptSuiteRegistry.rs | 10 + .../Foundation/NSScriptWhoseTests.rs | 4 + .../icrate/src/generated/Foundation/NSSet.rs | 5 + .../generated/Foundation/NSSortDescriptor.rs | 3 + .../src/generated/Foundation/NSSpellServer.rs | 7 + .../src/generated/Foundation/NSStream.rs | 10 + .../src/generated/Foundation/NSString.rs | 10 + .../icrate/src/generated/Foundation/NSTask.rs | 5 + .../Foundation/NSTextCheckingResult.rs | 11 + .../src/generated/Foundation/NSThread.rs | 8 + .../src/generated/Foundation/NSTimeZone.rs | 9 + .../src/generated/Foundation/NSTimer.rs | 2 + .../icrate/src/generated/Foundation/NSURL.rs | 9 + .../NSURLAuthenticationChallenge.rs | 7 + .../src/generated/Foundation/NSURLCache.rs | 10 + .../generated/Foundation/NSURLConnection.rs | 18 + .../generated/Foundation/NSURLCredential.rs | 5 + .../Foundation/NSURLCredentialStorage.rs | 8 + .../src/generated/Foundation/NSURLDownload.rs | 10 + .../src/generated/Foundation/NSURLError.rs | 4 - .../src/generated/Foundation/NSURLHandle.rs | 6 + .../Foundation/NSURLProtectionSpace.rs | 6 + .../src/generated/Foundation/NSURLProtocol.rs | 12 + .../src/generated/Foundation/NSURLRequest.rs | 8 + .../src/generated/Foundation/NSURLResponse.rs | 7 + .../src/generated/Foundation/NSURLSession.rs | 31 ++ .../icrate/src/generated/Foundation/NSUUID.rs | 3 + .../Foundation/NSUbiquitousKeyValueStore.rs | 6 + .../src/generated/Foundation/NSUndoManager.rs | 5 + .../icrate/src/generated/Foundation/NSUnit.rs | 1 + .../generated/Foundation/NSUserActivity.rs | 12 + .../generated/Foundation/NSUserDefaults.rs | 8 + .../Foundation/NSUserNotification.rs | 10 + .../generated/Foundation/NSUserScriptTask.rs | 9 + .../src/generated/Foundation/NSValue.rs | 3 + .../Foundation/NSValueTransformer.rs | 3 + .../src/generated/Foundation/NSXMLDTD.rs | 5 + .../src/generated/Foundation/NSXMLDTDNode.rs | 1 + .../src/generated/Foundation/NSXMLDocument.rs | 5 + .../src/generated/Foundation/NSXMLElement.rs | 6 + .../src/generated/Foundation/NSXMLNode.rs | 9 + .../generated/Foundation/NSXMLNodeOptions.rs | 4 - .../src/generated/Foundation/NSXMLParser.rs | 10 + .../generated/Foundation/NSXPCConnection.rs | 14 + .../icrate/src/generated/Foundation/NSZone.rs | 4 - crates/icrate/src/generated/Foundation/mod.rs | 387 +++++++++--------- 170 files changed, 1164 insertions(+), 965 deletions(-) delete mode 100644 crates/icrate/src/generated/Foundation/FoundationErrors.rs delete mode 100644 crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSByteOrder.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSDecimal.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSGeometry.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSObjCRuntime.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSObjectScripting.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSPathUtilities.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSRange.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSURLError.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs delete mode 100644 crates/icrate/src/generated/Foundation/NSZone.rs diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 1425450d0..975f6e4dc 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -1,3 +1,5 @@ +use std::collections::HashSet; + use clang::Entity; use proc_macro2::TokenStream; use quote::quote; @@ -13,16 +15,41 @@ pub use self::config::Config; use self::stmt::Stmt; -pub fn create_rust_file(entities: &[Entity<'_>], config: &Config) -> TokenStream { - let iter = entities +pub fn create_rust_file( + entities: &[Entity<'_>], + config: &Config, +) -> (HashSet, TokenStream) { + let stmts: Vec<_> = entities .iter() - .filter_map(|entity| Stmt::parse(entity, config)); - quote! { + .filter_map(|entity| Stmt::parse(entity, config)) + .collect(); + + let mut declared_types = HashSet::new(); + for stmt in stmts.iter() { + match stmt { + Stmt::ClassDecl { name, .. } => { + declared_types.insert(name.clone()); + } + Stmt::ProtocolDecl { name, .. } => { + declared_types.insert(name.clone()); + } + _ => {} + } + } + + let iter = stmts.iter().filter(|stmt| match stmt { + Stmt::ItemImport { name } => !declared_types.contains(name), + _ => true, + }); + + let tokens = quote! { #[allow(unused_imports)] use objc2::{ClassType, extern_class, msg_send, msg_send_id}; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #(#iter)* - } + }; + + (declared_types, tokens) } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 4f7d64c3a..c7ca32273 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -162,7 +162,13 @@ fn main() { continue; } - let tokens = create_rust_file(&res, &config); + let (declared_types, tokens) = create_rust_file(&res, &config); + + if declared_types.is_empty() { + // Skip files that don't declare anything + continue; + } + let formatted = run_rustfmt(tokens); // println!("{}\n\n\n\n", res); @@ -177,9 +183,11 @@ fn main() { let name = format_ident!("{}", path.file_stem().unwrap().to_string_lossy()); + let declared_types = declared_types.iter().map(|name| format_ident!("{}", name)); + mod_tokens.append_all(quote! { mod #name; - pub use self::#name::*; + pub use self::#name::{#(#declared_types,)*}; }); } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 8afac73fe..fb663a272 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -8,6 +8,11 @@ use crate::method::Method; #[derive(Debug, Clone)] pub enum Stmt { + /// #import + FileImport { framework: String, file: String }, + /// @class Name; + /// @protocol Name; + ItemImport { name: String }, /// @interface name: superclass ClassDecl { name: String, @@ -39,8 +44,34 @@ pub enum Stmt { impl Stmt { pub fn parse(entity: &Entity<'_>, config: &Config) -> Option { match entity.get_kind() { - EntityKind::InclusionDirective - | EntityKind::MacroExpansion + EntityKind::InclusionDirective => { + // let file = entity.get_file().expect("inclusion file"); + let name = dbg!(entity.get_name().expect("inclusion name")); + let mut iter = name.split("/"); + let framework = iter.next().expect("inclusion name has framework"); + let file = if let Some(file) = iter.next() { + file + } else { + // Ignore + return None; + }; + assert!(iter.count() == 0, "no more left"); + + Some(Self::FileImport { + framework: framework.to_string(), + file: file + .strip_suffix(".h") + .expect("inclusion name file is header") + .to_string(), + }) + } + EntityKind::ObjCClassRef | EntityKind::ObjCProtocolRef => { + let name = entity.get_name().expect("objc ref has name"); + + // We intentionally don't handle generics here + Some(Self::ItemImport { name }) + } + EntityKind::MacroExpansion | EntityKind::ObjCClassRef | EntityKind::ObjCProtocolRef | EntityKind::MacroDefinition => None, @@ -236,6 +267,21 @@ impl Stmt { impl ToTokens for Stmt { fn to_tokens(&self, tokens: &mut TokenStream) { let result = match self { + Self::FileImport { framework, file } => { + let framework = format_ident!("{}", framework); + let file = format_ident!("{}", file); + + quote! { + use crate::#framework::generated::#file::*; + } + } + Self::ItemImport { name } => { + let name = format_ident!("{}", name); + + quote! { + use super::#name; + } + } Self::ClassDecl { name, availability, @@ -309,7 +355,7 @@ impl ToTokens for Stmt { // #(#methods)* // } // } - quote!() + quote!(pub type #name = NSObject;) } }; tokens.append_all(result); diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs deleted file mode 100644 index 71ec80437..000000000 --- a/crates/icrate/src/generated/Foundation/FoundationErrors.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs deleted file mode 100644 index 71ec80437..000000000 --- a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index 148f957a4..d025b8c6c 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -1,3 +1,6 @@ +use crate::CoreGraphics::generated::CGAffineTransform::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index e22e3a971..5a2038530 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -1,3 +1,7 @@ +use super::NSData; +use crate::CoreServices::generated::CoreServices::*; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index ac60470d8..6c8317868 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -1,3 +1,7 @@ +use super::NSAppleEventDescriptor; +use crate::CoreServices::generated::CoreServices::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index 85ae25790..f0a2a8d32 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -1,3 +1,8 @@ +use super::NSAppleEventDescriptor; +use super::NSDictionary; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 1057d28cc..851694683 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -1,3 +1,10 @@ +use super::NSData; +use super::NSMutableArray; +use super::NSMutableData; +use super::NSMutableDictionary; +use super::NSString; +use crate::Foundation::generated::NSCoder::*; +use crate::Foundation::generated::NSException::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index ede87940d..26860b6be 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -1,3 +1,12 @@ +use super::NSData; +use super::NSIndexSet; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSEnumerator::*; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSOrderedCollectionDifference::*; +use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index db506c29d..a392d9923 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -1,3 +1,5 @@ +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs index 41965331b..f11522679 100644 --- a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 752d85484..444a0c5a0 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -1,3 +1,6 @@ +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index dde3cb1d8..3e288066d 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -1,3 +1,16 @@ +use super::NSError; +use super::NSLock; +use super::NSNumber; +use super::NSString; +use super::NSURL; +use super::NSUUID; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSProgress::*; +use crate::Foundation::generated::NSSet::*; +use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 5f8c01aa6..3afc24771 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -1,3 +1,5 @@ +use crate::Foundation::generated::NSFormatter::*; +use crate::Foundation::generated::NSMeasurement::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs deleted file mode 100644 index 71ec80437..000000000 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index ef88e3585..6520cf8f8 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -1,3 +1,5 @@ +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -62,3 +64,4 @@ impl NSCache { ] } } +pub type NSCacheDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index ac4f4ecca..fc22517fb 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -1,3 +1,12 @@ +use super::NSArray; +use super::NSLocale; +use super::NSString; +use super::NSTimeZone; +use crate::CoreFoundation::generated::CFCalendar::*; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index 587e94410..5d189d9bf 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -1,3 +1,7 @@ +use super::NSArray; +use super::NSString; +use super::NSTimeZone; +use crate::Foundation::generated::NSDate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index f3ebe1d01..16dc16d36 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -1,3 +1,8 @@ +use super::NSData; +use crate::CoreFoundation::generated::CFCharacterSet::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index 304d2d186..8baa103d6 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -1,3 +1,9 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSException::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index c32ac6bf1..2e41bc886 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -1,3 +1,7 @@ +use super::NSData; +use super::NSSet; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index bffa6429d..c82a15eda 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -1,3 +1,6 @@ +use super::NSExpression; +use super::NSPredicateOperator; +use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 678579503..7fbfcaa40 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -1,3 +1,5 @@ +use super::NSArray; +use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index c886cb3d2..03d569f2a 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -1,3 +1,16 @@ +use super::NSArray; +use super::NSData; +use super::NSDictionary; +use super::NSDistantObject; +use super::NSException; +use super::NSMutableData; +use super::NSNumber; +use super::NSPort; +use super::NSPortNameServer; +use super::NSRunLoop; +use super::NSString; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -197,6 +210,7 @@ impl NSConnection { msg_send_id![self, localObjects] } } +pub type NSConnectionDelegate = NSObject; extern_class!( #[derive(Debug)] pub struct NSDistantObjectRequest; diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index b341bf6a9..53becdbed 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -1,3 +1,8 @@ +use super::NSError; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 9c0d2ec2e..58ca7f6c7 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -1,3 +1,6 @@ +use super::NSString; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 6a8e537ae..1755c903f 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -1,3 +1,6 @@ +use crate::Foundation::generated::NSCalendar::*; +use crate::Foundation::generated::NSFormatter::*; +use crate::Foundation::generated::NSNumberFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 3158a843d..a34998b7a 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -1,3 +1,13 @@ +use super::NSArray; +use super::NSCalendar; +use super::NSDate; +use super::NSError; +use super::NSLocale; +use super::NSMutableDictionary; +use super::NSString; +use super::NSTimeZone; +use crate::CoreFoundation::generated::CFDateFormatter::*; +use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index fcce6c578..5001773da 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -1,3 +1,6 @@ +use crate::Foundation::generated::NSCoder::*; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index 0bf20b74a..5c0596601 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -1,3 +1,10 @@ +use super::NSCalendar; +use super::NSDate; +use super::NSLocale; +use super::NSTimeZone; +use crate::dispatch::generated::dispatch::*; +use crate::Foundation::generated::NSDateInterval::*; +use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs deleted file mode 100644 index 71ec80437..000000000 --- a/crates/icrate/src/generated/Foundation/NSDecimal.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index d97959a4a..b4b56976b 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -1,7 +1,13 @@ +use crate::Foundation::generated::NSDecimal::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSException::*; +use crate::Foundation::generated::NSScanner::*; +use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSDecimalNumberBehaviors = NSObject; extern_class!( #[derive(Debug)] pub struct NSDecimalNumber; diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 05e9f35e4..3f1198724 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -1,3 +1,9 @@ +use super::NSArray; +use super::NSSet; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSEnumerator::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index 2f6117043..926448aab 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -1,3 +1,7 @@ +use super::NSCoder; +use super::NSConnection; +use super::Protocol; +use crate::Foundation::generated::NSProxy::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index a333c521b..81324a36a 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -1,3 +1,5 @@ +use super::NSDate; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 1c2e2aaff..58291b726 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -1,3 +1,6 @@ +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSNotification::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 63d67d94b..a6abded6c 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 47a6e7d64..ca1440b3b 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -1,7 +1,10 @@ +use super::NSArray; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSFastEnumeration = NSObject; extern_class!( #[derive(Debug)] pub struct NSEnumerator; diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index a946c1e67..fd3b89f22 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -1,3 +1,7 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 5d04686d9..ee4b763d7 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -1,3 +1,9 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSNumber; +use super::NSString; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index ec9d305e2..847dd2b2b 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSMutableDictionary; +use super::NSPredicate; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index 836b1fa35..59dc1d51e 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index 4a5431173..465d50ed5 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -1,3 +1,5 @@ +use crate::Foundation::generated::Foundation::*; +use crate::Foundation::generated::NSItemProvider::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs index 71ec80437..f14c4707c 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs @@ -1,4 +1,7 @@ +use super::NSExtensionContext; +use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSExtensionRequestHandling = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index a908e4453..d34cb6a92 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -1,3 +1,11 @@ +use super::NSArray; +use super::NSError; +use super::NSFilePresenter; +use super::NSMutableDictionary; +use super::NSOperationQueue; +use super::NSSet; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 59180249b..8f4144611 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -1,3 +1,12 @@ +use super::NSData; +use super::NSError; +use super::NSString; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSException::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 501018949..635cbf0c8 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -1,3 +1,19 @@ +use super::NSArray; +use super::NSData; +use super::NSDate; +use super::NSError; +use super::NSLock; +use super::NSNumber; +use super::NSXPCConnection; +use crate::dispatch::generated::dispatch::*; +use crate::CoreFoundation::generated::CFBase::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSEnumerator::*; +use crate::Foundation::generated::NSError::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSPathUtilities::*; +use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -566,6 +582,7 @@ impl NSObject { msg_send![self, fileManager: fm, willProcessPath: path] } } +pub type NSFileManagerDelegate = NSObject; extern_class!( #[derive(Debug)] pub struct NSDirectoryEnumerator; diff --git a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs index 71ec80437..b07ae41a8 100644 --- a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs +++ b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs @@ -1,4 +1,11 @@ +use super::NSError; +use super::NSFileVersion; +use super::NSOperationQueue; +use super::NSSet; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSFilePresenter = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index 2feb1b918..3b74ffc29 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -1,3 +1,11 @@ +use super::NSArray; +use super::NSDate; +use super::NSDictionary; +use super::NSError; +use super::NSPersonNameComponents; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 5a21d9c51..cfbbff9cc 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -1,3 +1,9 @@ +use super::NSData; +use super::NSDictionary; +use super::NSError; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index c0c1a4f05..d615f408c 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -1,3 +1,9 @@ +use super::NSAttributedString; +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSAttributedString::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs index 6f6233419..9d6132c7c 100644 --- a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs deleted file mode 100644 index 13bf608ea..000000000 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ /dev/null @@ -1,73 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSValueGeometryExtensions"] -impl NSValue { - pub unsafe fn valueWithPoint(point: NSPoint) -> Id { - msg_send_id![Self::class(), valueWithPoint: point] - } - pub unsafe fn valueWithSize(size: NSSize) -> Id { - msg_send_id![Self::class(), valueWithSize: size] - } - pub unsafe fn valueWithRect(rect: NSRect) -> Id { - msg_send_id![Self::class(), valueWithRect: rect] - } - pub unsafe fn valueWithEdgeInsets(insets: NSEdgeInsets) -> Id { - msg_send_id![Self::class(), valueWithEdgeInsets: insets] - } - pub unsafe fn pointValue(&self) -> NSPoint { - msg_send![self, pointValue] - } - pub unsafe fn sizeValue(&self) -> NSSize { - msg_send![self, sizeValue] - } - pub unsafe fn rectValue(&self) -> NSRect { - msg_send![self, rectValue] - } - pub unsafe fn edgeInsetsValue(&self) -> NSEdgeInsets { - msg_send![self, edgeInsetsValue] - } -} -#[doc = "NSGeometryCoding"] -impl NSCoder { - pub unsafe fn encodePoint(&self, point: NSPoint) { - msg_send![self, encodePoint: point] - } - pub unsafe fn decodePoint(&self) -> NSPoint { - msg_send![self, decodePoint] - } - pub unsafe fn encodeSize(&self, size: NSSize) { - msg_send![self, encodeSize: size] - } - pub unsafe fn decodeSize(&self) -> NSSize { - msg_send![self, decodeSize] - } - pub unsafe fn encodeRect(&self, rect: NSRect) { - msg_send![self, encodeRect: rect] - } - pub unsafe fn decodeRect(&self) -> NSRect { - msg_send![self, decodeRect] - } -} -#[doc = "NSGeometryKeyedCoding"] -impl NSCoder { - pub unsafe fn encodePoint_forKey(&self, point: NSPoint, key: &NSString) { - msg_send![self, encodePoint: point, forKey: key] - } - pub unsafe fn encodeSize_forKey(&self, size: NSSize, key: &NSString) { - msg_send![self, encodeSize: size, forKey: key] - } - pub unsafe fn encodeRect_forKey(&self, rect: NSRect, key: &NSString) { - msg_send![self, encodeRect: rect, forKey: key] - } - pub unsafe fn decodePointForKey(&self, key: &NSString) -> NSPoint { - msg_send![self, decodePointForKey: key] - } - pub unsafe fn decodeSizeForKey(&self, key: &NSString) -> NSSize { - msg_send![self, decodeSizeForKey: key] - } - pub unsafe fn decodeRectForKey(&self, key: &NSString) -> NSRect { - msg_send![self, decodeRectForKey: key] - } -} diff --git a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs deleted file mode 100644 index 71ec80437..000000000 --- a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index 6a6db702b..314e0f013 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -1,3 +1,11 @@ +use super::NSArray; +use super::NSDate; +use super::NSDictionary; +use super::NSHTTPCookieInternal; +use super::NSNumber; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index a4a3fb59d..6f019e109 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -1,3 +1,12 @@ +use super::NSArray; +use super::NSDate; +use super::NSHTTPCookie; +use super::NSHTTPCookieStorageInternal; +use super::NSSortDescriptor; +use super::NSURLSessionTask; +use super::NSURL; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 526e56d34..7f91602e4 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSSet; +use crate::Foundation::generated::NSEnumerator::*; +use crate::Foundation::generated::NSPointerFunctions::*; +use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index d6d80c981..dddf8e172 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -1,3 +1,7 @@ +use super::NSArray; +use super::NSMutableArray; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 793f8a0a6..6c71ff797 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -1,3 +1,8 @@ +use super::NSDate; +use super::NSString; +use super::NSTimeZone; +use crate::CoreFoundation::generated::CFDateFormatter::*; +use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index 2a30e4c9a..b73839ec1 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -1,3 +1,5 @@ +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index d459d397b..da1d8239c 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -1,3 +1,5 @@ +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index 3c75801c7..7538eb577 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -1,3 +1,5 @@ +use super::NSMorphology; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index 92f6150a4..4287076d2 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -1,3 +1,5 @@ +use super::NSMethodSignature; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 1110b4c13..c9331b964 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -1,7 +1,11 @@ +use super::NSProgress; +use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSItemProviderWriting = NSObject; +pub type NSItemProviderReading = NSObject; extern_class!( #[derive(Debug)] pub struct NSItemProvider; diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 7609be2e7..5aa5ad548 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -1,3 +1,8 @@ +use super::NSData; +use super::NSError; +use super::NSInputStream; +use super::NSOutputStream; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs deleted file mode 100644 index 865ff4732..000000000 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ /dev/null @@ -1,157 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSKeyValueCoding"] -impl NSObject { - pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } - pub unsafe fn validateValue_forKey_error( - &self, - ioValue: NonNull>, - inKey: &NSString, - outError: *mut Option<&NSError>, - ) -> bool { - msg_send![self, validateValue: ioValue, forKey: inKey, error: outError] - } - pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, mutableArrayValueForKey: key] - } - pub unsafe fn mutableOrderedSetValueForKey( - &self, - key: &NSString, - ) -> Id { - msg_send_id![self, mutableOrderedSetValueForKey: key] - } - pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, mutableSetValueForKey: key] - } - pub unsafe fn valueForKeyPath(&self, keyPath: &NSString) -> Option> { - msg_send_id![self, valueForKeyPath: keyPath] - } - pub unsafe fn setValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { - msg_send![self, setValue: value, forKeyPath: keyPath] - } - pub unsafe fn validateValue_forKeyPath_error( - &self, - ioValue: NonNull>, - inKeyPath: &NSString, - outError: *mut Option<&NSError>, - ) -> bool { - msg_send![ - self, - validateValue: ioValue, - forKeyPath: inKeyPath, - error: outError - ] - } - pub unsafe fn mutableArrayValueForKeyPath( - &self, - keyPath: &NSString, - ) -> Id { - msg_send_id![self, mutableArrayValueForKeyPath: keyPath] - } - pub unsafe fn mutableOrderedSetValueForKeyPath( - &self, - keyPath: &NSString, - ) -> Id { - msg_send_id![self, mutableOrderedSetValueForKeyPath: keyPath] - } - pub unsafe fn mutableSetValueForKeyPath(&self, keyPath: &NSString) -> Id { - msg_send_id![self, mutableSetValueForKeyPath: keyPath] - } - pub unsafe fn valueForUndefinedKey(&self, key: &NSString) -> Option> { - msg_send_id![self, valueForUndefinedKey: key] - } - pub unsafe fn setValue_forUndefinedKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forUndefinedKey: key] - } - pub unsafe fn setNilValueForKey(&self, key: &NSString) { - msg_send![self, setNilValueForKey: key] - } - pub unsafe fn dictionaryWithValuesForKeys(&self, keys: TodoGenerics) -> TodoGenerics { - msg_send![self, dictionaryWithValuesForKeys: keys] - } - pub unsafe fn setValuesForKeysWithDictionary(&self, keyedValues: TodoGenerics) { - msg_send![self, setValuesForKeysWithDictionary: keyedValues] - } - pub unsafe fn accessInstanceVariablesDirectly() -> bool { - msg_send![Self::class(), accessInstanceVariablesDirectly] - } -} -#[doc = "NSKeyValueCoding"] -impl NSArray { - pub unsafe fn valueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } -} -#[doc = "NSKeyValueCoding"] -impl NSDictionary { - pub unsafe fn valueForKey(&self, key: &NSString) -> ObjectType { - msg_send![self, valueForKey: key] - } -} -#[doc = "NSKeyValueCoding"] -impl NSMutableDictionary { - pub unsafe fn setValue_forKey(&self, value: ObjectType, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } -} -#[doc = "NSKeyValueCoding"] -impl NSOrderedSet { - pub unsafe fn valueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } -} -#[doc = "NSKeyValueCoding"] -impl NSSet { - pub unsafe fn valueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } -} -#[doc = "NSDeprecatedKeyValueCoding"] -impl NSObject { - pub unsafe fn useStoredAccessor() -> bool { - msg_send![Self::class(), useStoredAccessor] - } - pub unsafe fn storedValueForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, storedValueForKey: key] - } - pub unsafe fn takeStoredValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, takeStoredValue: value, forKey: key] - } - pub unsafe fn takeValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, takeValue: value, forKey: key] - } - pub unsafe fn takeValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { - msg_send![self, takeValue: value, forKeyPath: keyPath] - } - pub unsafe fn handleQueryWithUnboundKey(&self, key: &NSString) -> Option> { - msg_send_id![self, handleQueryWithUnboundKey: key] - } - pub unsafe fn handleTakeValue_forUnboundKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, handleTakeValue: value, forUnboundKey: key] - } - pub unsafe fn unableToSetNilForKey(&self, key: &NSString) { - msg_send![self, unableToSetNilForKey: key] - } - pub unsafe fn valuesForKeys(&self, keys: &NSArray) -> Id { - msg_send_id![self, valuesForKeys: keys] - } - pub unsafe fn takeValuesFromDictionary(&self, properties: &NSDictionary) { - msg_send![self, takeValuesFromDictionary: properties] - } -} diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs deleted file mode 100644 index 21f7f4df0..000000000 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ /dev/null @@ -1,292 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSKeyValueObserving"] -impl NSObject { - pub unsafe fn observeValueForKeyPath_ofObject_change_context( - &self, - keyPath: Option<&NSString>, - object: Option<&Object>, - change: TodoGenerics, - context: *mut c_void, - ) { - msg_send![ - self, - observeValueForKeyPath: keyPath, - ofObject: object, - change: change, - context: context - ] - } -} -#[doc = "NSKeyValueObserverRegistration"] -impl NSObject { - pub unsafe fn addObserver_forKeyPath_options_context( - &self, - observer: &NSObject, - keyPath: &NSString, - options: NSKeyValueObservingOptions, - context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath_context( - &self, - observer: &NSObject, - keyPath: &NSString, - context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } -} -#[doc = "NSKeyValueObserverRegistration"] -impl NSArray { - pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( - &self, - observer: &NSObject, - indexes: &NSIndexSet, - keyPath: &NSString, - options: NSKeyValueObservingOptions, - context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - toObjectsAtIndexes: indexes, - forKeyPath: keyPath, - options: options, - context: context - ] - } - pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath_context( - &self, - observer: &NSObject, - indexes: &NSIndexSet, - keyPath: &NSString, - context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - fromObjectsAtIndexes: indexes, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( - &self, - observer: &NSObject, - indexes: &NSIndexSet, - keyPath: &NSString, - ) { - msg_send![ - self, - removeObserver: observer, - fromObjectsAtIndexes: indexes, - forKeyPath: keyPath - ] - } - pub unsafe fn addObserver_forKeyPath_options_context( - &self, - observer: &NSObject, - keyPath: &NSString, - options: NSKeyValueObservingOptions, - context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath_context( - &self, - observer: &NSObject, - keyPath: &NSString, - context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } -} -#[doc = "NSKeyValueObserverRegistration"] -impl NSOrderedSet { - pub unsafe fn addObserver_forKeyPath_options_context( - &self, - observer: &NSObject, - keyPath: &NSString, - options: NSKeyValueObservingOptions, - context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath_context( - &self, - observer: &NSObject, - keyPath: &NSString, - context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } -} -#[doc = "NSKeyValueObserverRegistration"] -impl NSSet { - pub unsafe fn addObserver_forKeyPath_options_context( - &self, - observer: &NSObject, - keyPath: &NSString, - options: NSKeyValueObservingOptions, - context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath_context( - &self, - observer: &NSObject, - keyPath: &NSString, - context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } -} -#[doc = "NSKeyValueObserverNotification"] -impl NSObject { - pub unsafe fn willChangeValueForKey(&self, key: &NSString) { - msg_send![self, willChangeValueForKey: key] - } - pub unsafe fn didChangeValueForKey(&self, key: &NSString) { - msg_send![self, didChangeValueForKey: key] - } - pub unsafe fn willChange_valuesAtIndexes_forKey( - &self, - changeKind: NSKeyValueChange, - indexes: &NSIndexSet, - key: &NSString, - ) { - msg_send![ - self, - willChange: changeKind, - valuesAtIndexes: indexes, - forKey: key - ] - } - pub unsafe fn didChange_valuesAtIndexes_forKey( - &self, - changeKind: NSKeyValueChange, - indexes: &NSIndexSet, - key: &NSString, - ) { - msg_send![ - self, - didChange: changeKind, - valuesAtIndexes: indexes, - forKey: key - ] - } - pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects( - &self, - key: &NSString, - mutationKind: NSKeyValueSetMutationKind, - objects: &NSSet, - ) { - msg_send![ - self, - willChangeValueForKey: key, - withSetMutation: mutationKind, - usingObjects: objects - ] - } - pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects( - &self, - key: &NSString, - mutationKind: NSKeyValueSetMutationKind, - objects: &NSSet, - ) { - msg_send![ - self, - didChangeValueForKey: key, - withSetMutation: mutationKind, - usingObjects: objects - ] - } -} -#[doc = "NSKeyValueObservingCustomization"] -impl NSObject { - pub unsafe fn keyPathsForValuesAffectingValueForKey(key: &NSString) -> TodoGenerics { - msg_send![Self::class(), keyPathsForValuesAffectingValueForKey: key] - } - pub unsafe fn automaticallyNotifiesObserversForKey(key: &NSString) -> bool { - msg_send![Self::class(), automaticallyNotifiesObserversForKey: key] - } - pub unsafe fn observationInfo(&self) -> *mut c_void { - msg_send![self, observationInfo] - } - pub unsafe fn setObservationInfo(&self, observationInfo: *mut c_void) { - msg_send![self, setObservationInfo: observationInfo] - } -} -#[doc = "NSDeprecatedKeyValueObservingCustomization"] -impl NSObject { - pub unsafe fn setKeys_triggerChangeNotificationsForDependentKey( - keys: &NSArray, - dependentKey: &NSString, - ) { - msg_send![ - Self::class(), - setKeys: keys, - triggerChangeNotificationsForDependentKey: dependentKey - ] - } -} diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 920abacbf..d38a48672 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -1,3 +1,11 @@ +use super::NSArray; +use super::NSData; +use super::NSMutableData; +use super::NSString; +use crate::Foundation::generated::NSCoder::*; +use crate::Foundation::generated::NSException::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSPropertyList::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -284,6 +292,8 @@ impl NSKeyedUnarchiver { msg_send![self, setDecodingFailurePolicy: decodingFailurePolicy] } } +pub type NSKeyedArchiverDelegate = NSObject; +pub type NSKeyedUnarchiverDelegate = NSObject; #[doc = "NSKeyedArchiverObjectSubstitution"] impl NSObject { pub unsafe fn replacementObjectForKeyedArchiver( diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index 02e3fbf2d..b6c68262b 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index bf46ef4d1..8a696f671 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSOrthography; +use super::NSValue; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index d9a777af2..2f5ef5ca3 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -1,3 +1,6 @@ +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSFormatter::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 3387c3e61..1892260d5 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -1,3 +1,10 @@ +use super::NSArray; +use super::NSCalendar; +use super::NSDictionary; +use super::NSString; +use crate::CoreFoundation::generated::CFLocale::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index e0cc05666..957d7e93d 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -1,7 +1,10 @@ +use super::NSDate; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSLocking = NSObject; extern_class!( #[derive(Debug)] pub struct NSLock; diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index f9ac5ab41..fe8cfb2ba 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSDictionary; +use crate::Foundation::generated::NSEnumerator::*; +use crate::Foundation::generated::NSPointerFunctions::*; +use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index f9280c5ae..d2d3ccacd 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -1,3 +1,5 @@ +use super::NSNumberFormatter; +use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index 25b80b089..6608cc9a1 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -1,3 +1,5 @@ +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSUnit::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index e1c23f02f..e531a7c95 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -1,3 +1,8 @@ +use crate::Foundation::generated::NSFormatter::*; +use crate::Foundation::generated::NSLocale::*; +use crate::Foundation::generated::NSMeasurement::*; +use crate::Foundation::generated::NSNumberFormatter::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 829364086..451e5f48d 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -1,3 +1,14 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSOperationQueue; +use super::NSPredicate; +use super::NSSortDescriptor; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSMetadataAttributes::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -127,6 +138,7 @@ impl NSMetadataQuery { msg_send![self, groupedResults] } } +pub type NSMetadataQueryDelegate = NSObject; extern_class!( #[derive(Debug)] pub struct NSMetadataItem; diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs deleted file mode 100644 index 71ec80437..000000000 --- a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index c6bd64ade..0603d41e5 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index d9e5c3ba1..ccb536086 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -1,3 +1,7 @@ +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSError::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 741ea11ba..907e6ba50 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -1,3 +1,15 @@ +use super::NSArray; +use super::NSData; +use super::NSDictionary; +use super::NSInputStream; +use super::NSNumber; +use super::NSOutputStream; +use super::NSRunLoop; +use super::NSString; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSError::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -154,3 +166,5 @@ impl NSNetServiceBrowser { msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] } } +pub type NSNetServiceDelegate = NSObject; +pub type NSNetServiceBrowserDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 3f4234aff..849c35e24 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -1,3 +1,7 @@ +use super::NSDictionary; +use super::NSOperationQueue; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index 69b3b25f8..4d74e0ef5 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -1,3 +1,9 @@ +use super::NSArray; +use super::NSNotification; +use super::NSNotificationCenter; +use super::NSString; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSNull.rs b/crates/icrate/src/generated/Foundation/NSNull.rs index c91edfd71..ffd8ab519 100644 --- a/crates/icrate/src/generated/Foundation/NSNull.rs +++ b/crates/icrate/src/generated/Foundation/NSNull.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 37eeec0af..19cbe1b80 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -1,3 +1,11 @@ +use super::NSCache; +use super::NSError; +use super::NSLocale; +use super::NSMutableDictionary; +use super::NSRecursiveLock; +use super::NSString; +use crate::CoreFoundation::generated::CFNumberFormatter::*; +use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -435,6 +443,7 @@ impl NSNumberFormatter { ] } } +use super::NSDecimalNumberHandler; #[doc = "NSNumberFormatterCompatibility"] impl NSNumberFormatter { pub unsafe fn hasThousandSeparators(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs deleted file mode 100644 index 71ec80437..000000000 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index 597a9ff88..448ab9cae 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -1,7 +1,20 @@ +use super::NSCoder; +use super::NSEnumerator; +use super::NSInvocation; +use super::NSMethodSignature; +use super::NSString; +use super::Protocol; +use crate::objc::generated::NSObject::*; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSZone::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSCopying = NSObject; +pub type NSMutableCopying = NSObject; +pub type NSCoding = NSObject; +pub type NSSecureCoding = NSObject; #[doc = "NSCoderMethods"] impl NSObject { pub unsafe fn version() -> NSInteger { @@ -23,6 +36,7 @@ impl NSObject { msg_send![Self::class(), poseAsClass: aClass] } } +pub type NSDiscardableContent = NSObject; #[doc = "NSDiscardableContentProxy"] impl NSObject { pub unsafe fn autoContentAccessingProxy(&self) -> Id { diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs deleted file mode 100644 index 0ae574d08..000000000 --- a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs +++ /dev/null @@ -1,47 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSScripting"] -impl NSObject { - pub unsafe fn scriptingValueForSpecifier( - &self, - objectSpecifier: &NSScriptObjectSpecifier, - ) -> Option> { - msg_send_id![self, scriptingValueForSpecifier: objectSpecifier] - } - pub unsafe fn copyScriptingValue_forKey_withProperties( - &self, - value: &Object, - key: &NSString, - properties: TodoGenerics, - ) -> Option> { - msg_send_id![ - self, - copyScriptingValue: value, - forKey: key, - withProperties: properties - ] - } - pub unsafe fn newScriptingObjectOfClass_forValueForKey_withContentsValue_properties( - &self, - objectClass: &Class, - key: &NSString, - contentsValue: Option<&Object>, - properties: TodoGenerics, - ) -> Option> { - msg_send_id![ - self, - newScriptingObjectOfClass: objectClass, - forValueForKey: key, - withContentsValue: contentsValue, - properties: properties - ] - } - pub unsafe fn scriptingProperties(&self) -> TodoGenerics { - msg_send![self, scriptingProperties] - } - pub unsafe fn setScriptingProperties(&self, scriptingProperties: TodoGenerics) { - msg_send![self, setScriptingProperties: scriptingProperties] - } -} diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index c57b7e56b..0e226fa63 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -1,3 +1,10 @@ +use super::NSArray; +use super::NSSet; +use crate::dispatch::generated::dispatch::*; +use crate::sys::generated::qos::*; +use crate::Foundation::generated::NSException::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSProgress::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index b6782963e..4bcca9079 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 77bb4f00f..75e4ac638 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -1,3 +1,7 @@ +use super::NSArray; +use crate::Foundation::generated::NSEnumerator::*; +use crate::Foundation::generated::NSIndexSet::*; +use crate::Foundation::generated::NSOrderedCollectionChange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index ecbdb5072..004155e89 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -1,3 +1,12 @@ +use super::NSArray; +use super::NSIndexSet; +use super::NSSet; +use super::NSString; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSEnumerator::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSOrderedCollectionDifference::*; +use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index a7055522b..4ed97dc83 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -1,3 +1,7 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs deleted file mode 100644 index 47729fad3..000000000 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ /dev/null @@ -1,83 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSStringPathExtensions"] -impl NSString { - pub unsafe fn pathWithComponents(components: TodoGenerics) -> Id { - msg_send_id![Self::class(), pathWithComponents: components] - } - pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id { - msg_send_id![self, stringByAppendingPathComponent: str] - } - pub unsafe fn stringByAppendingPathExtension( - &self, - str: &NSString, - ) -> Option> { - msg_send_id![self, stringByAppendingPathExtension: str] - } - pub unsafe fn stringsByAppendingPaths(&self, paths: TodoGenerics) -> TodoGenerics { - msg_send![self, stringsByAppendingPaths: paths] - } - pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( - &self, - outputName: *mut Option<&NSString>, - flag: bool, - outputArray: *mut TodoGenerics, - filterTypes: TodoGenerics, - ) -> NSUInteger { - msg_send![ - self, - completePathIntoString: outputName, - caseSensitive: flag, - matchesIntoArray: outputArray, - filterTypes: filterTypes - ] - } - pub unsafe fn getFileSystemRepresentation_maxLength( - &self, - cname: NonNull, - max: NSUInteger, - ) -> bool { - msg_send![self, getFileSystemRepresentation: cname, maxLength: max] - } - pub unsafe fn pathComponents(&self) -> TodoGenerics { - msg_send![self, pathComponents] - } - pub unsafe fn isAbsolutePath(&self) -> bool { - msg_send![self, isAbsolutePath] - } - pub unsafe fn lastPathComponent(&self) -> Id { - msg_send_id![self, lastPathComponent] - } - pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id { - msg_send_id![self, stringByDeletingLastPathComponent] - } - pub unsafe fn pathExtension(&self) -> Id { - msg_send_id![self, pathExtension] - } - pub unsafe fn stringByDeletingPathExtension(&self) -> Id { - msg_send_id![self, stringByDeletingPathExtension] - } - pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id { - msg_send_id![self, stringByAbbreviatingWithTildeInPath] - } - pub unsafe fn stringByExpandingTildeInPath(&self) -> Id { - msg_send_id![self, stringByExpandingTildeInPath] - } - pub unsafe fn stringByStandardizingPath(&self) -> Id { - msg_send_id![self, stringByStandardizingPath] - } - pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id { - msg_send_id![self, stringByResolvingSymlinksInPath] - } - pub unsafe fn fileSystemRepresentation(&self) -> NonNull { - msg_send![self, fileSystemRepresentation] - } -} -#[doc = "NSArrayPathExtensions"] -impl NSArray { - pub unsafe fn pathsMatchingExtensions(&self, filterTypes: TodoGenerics) -> TodoGenerics { - msg_send![self, pathsMatchingExtensions: filterTypes] - } -} diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs index 985e40589..e5d413853 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -1,3 +1,6 @@ +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index 4c856cb0a..79c40bd61 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -1,3 +1,5 @@ +use crate::Foundation::generated::NSFormatter::*; +use crate::Foundation::generated::NSPersonNameComponents::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index 01ae2daf8..239283ccf 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -1,3 +1,6 @@ +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSPointerFunctions::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 9326588db..16a64bcc6 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index fff94854a..06eb145f1 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -1,3 +1,12 @@ +use super::NSConnection; +use super::NSData; +use super::NSDate; +use super::NSMutableArray; +use super::NSPortMessage; +use super::NSRunLoop; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -88,6 +97,7 @@ impl NSPort { msg_send![self, reservedSpaceLength] } } +pub type NSPortDelegate = NSObject; extern_class!( #[derive(Debug)] pub struct NSMachPort; @@ -131,6 +141,7 @@ impl NSMachPort { msg_send![self, machPort] } } +pub type NSMachPortDelegate = NSObject; extern_class!( #[derive(Debug)] pub struct NSMessagePort; diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index 4bfbf18cb..e1ff74bbb 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -1,3 +1,7 @@ +use super::NSArray; +use super::NSConnection; +use super::NSPort; +use crate::Foundation::generated::NSCoder::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index fd5bae5e4..90835e1a8 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSDate; +use super::NSMutableArray; +use super::NSPort; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index 4f688bcee..3f2b86298 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -1,3 +1,6 @@ +use super::NSPort; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 04d4c3a7a..c266a8a4f 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -1,3 +1,9 @@ +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSOrderedSet::*; +use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 4503b7ff5..dbb720039 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -1,3 +1,9 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 37aeb72aa..7ef8e9124 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -1,3 +1,12 @@ +use super::NSDictionary; +use super::NSLock; +use super::NSMutableDictionary; +use super::NSMutableSet; +use super::NSXPCConnection; +use super::NSURL; +use super::NSUUID; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -221,3 +230,4 @@ impl NSProgress { msg_send![self, isOld] } } +pub type NSProgressReporting = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 74ae5fd13..671e5b69e 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -1,3 +1,10 @@ +use super::NSData; +use super::NSError; +use super::NSInputStream; +use super::NSOutputStream; +use super::NSString; +use crate::CoreFoundation::generated::CFPropertyList::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index c476ef029..8e621cc68 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -1,3 +1,5 @@ +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSProxy::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index cf8a46d00..569e43394 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -1,3 +1,6 @@ +use super::NSInvocation; +use super::NSMethodSignature; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs deleted file mode 100644 index 87f16d503..000000000 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ /dev/null @@ -1,13 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSValueRangeExtensions"] -impl NSValue { - pub unsafe fn valueWithRange(range: NSRange) -> Id { - msg_send_id![Self::class(), valueWithRange: range] - } - pub unsafe fn rangeValue(&self) -> NSRange { - msg_send![self, rangeValue] - } -} diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 6595a1382..0d4ebccd6 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -1,3 +1,7 @@ +use super::NSArray; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSString::*; +use crate::Foundation::generated::NSTextCheckingResult::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index b8a3745a4..4ed98f344 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -1,3 +1,8 @@ +use super::NSCalendar; +use super::NSDateComponents; +use super::NSLocale; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 2a54ca810..a7ef6fe28 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -1,3 +1,10 @@ +use super::NSArray; +use super::NSPort; +use super::NSString; +use super::NSTimer; +use crate::CoreFoundation::generated::CFRunLoop::*; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 3adeb683c..4544dd21c 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -1,3 +1,7 @@ +use super::NSCharacterSet; +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index b37133430..a300456ef 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -1,3 +1,5 @@ +use super::NSScriptCommandDescription; +use crate::Foundation::generated::NSClassDescription::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs index 880483a0b..b897eb5fd 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 02ad888d4..3bef5be9c 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -1,3 +1,10 @@ +use super::NSAppleEventDescriptor; +use super::NSDictionary; +use super::NSMutableDictionary; +use super::NSScriptCommandDescription; +use super::NSScriptObjectSpecifier; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index ab5346048..df15ec17e 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSScriptCommand; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index 2ee159aa1..fa28c4edd 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -1,3 +1,5 @@ +use super::NSConnection; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs deleted file mode 100644 index f666b280e..000000000 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ /dev/null @@ -1,67 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSScriptKeyValueCoding"] -impl NSObject { - pub unsafe fn valueAtIndex_inPropertyWithKey( - &self, - index: NSUInteger, - key: &NSString, - ) -> Option> { - msg_send_id![self, valueAtIndex: index, inPropertyWithKey: key] - } - pub unsafe fn valueWithName_inPropertyWithKey( - &self, - name: &NSString, - key: &NSString, - ) -> Option> { - msg_send_id![self, valueWithName: name, inPropertyWithKey: key] - } - pub unsafe fn valueWithUniqueID_inPropertyWithKey( - &self, - uniqueID: &Object, - key: &NSString, - ) -> Option> { - msg_send_id![self, valueWithUniqueID: uniqueID, inPropertyWithKey: key] - } - pub unsafe fn insertValue_atIndex_inPropertyWithKey( - &self, - value: &Object, - index: NSUInteger, - key: &NSString, - ) { - msg_send![ - self, - insertValue: value, - atIndex: index, - inPropertyWithKey: key - ] - } - pub unsafe fn removeValueAtIndex_fromPropertyWithKey(&self, index: NSUInteger, key: &NSString) { - msg_send![self, removeValueAtIndex: index, fromPropertyWithKey: key] - } - pub unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue( - &self, - index: NSUInteger, - key: &NSString, - value: &Object, - ) { - msg_send![ - self, - replaceValueAtIndex: index, - inPropertyWithKey: key, - withValue: value - ] - } - pub unsafe fn insertValue_inPropertyWithKey(&self, value: &Object, key: &NSString) { - msg_send![self, insertValue: value, inPropertyWithKey: key] - } - pub unsafe fn coerceValue_forKey( - &self, - value: Option<&Object>, - key: &NSString, - ) -> Option> { - msg_send_id![self, coerceValue: value, forKey: key] - } -} diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index e05e0613c..90e224ec8 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -1,3 +1,10 @@ +use super::NSAppleEventDescriptor; +use super::NSArray; +use super::NSNumber; +use super::NSScriptClassDescription; +use super::NSScriptWhoseTest; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index 7202b88d9..72890957e 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -1,3 +1,8 @@ +use super::NSDictionary; +use super::NSScriptClassDescription; +use super::NSScriptObjectSpecifier; +use super::NSString; +use crate::Foundation::generated::NSScriptCommand::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 5b0685448..5b8d25371 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -1,3 +1,13 @@ +use super::NSArray; +use super::NSBundle; +use super::NSData; +use super::NSDictionary; +use super::NSMutableArray; +use super::NSMutableDictionary; +use super::NSMutableSet; +use super::NSScriptClassDescription; +use super::NSScriptCommandDescription; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index 1dc1d17c2..24495a2c4 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -1,3 +1,7 @@ +use super::NSArray; +use super::NSScriptObjectSpecifier; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index 84651754d..e5635ce74 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSEnumerator::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index d8449ac94..dbc83bc29 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -1,3 +1,6 @@ +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSOrderedSet::*; +use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 6b714b6f3..3fdb410dd 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -1,3 +1,9 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSOrthography; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +use crate::Foundation::generated::NSTextCheckingResult::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -34,3 +40,4 @@ impl NSSpellServer { msg_send![self, setDelegate: delegate] } } +pub type NSSpellServerDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index c27c507fa..92eecbdee 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -1,3 +1,12 @@ +use super::NSData; +use super::NSDictionary; +use super::NSError; +use super::NSHost; +use super::NSRunLoop; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSError::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -209,3 +218,4 @@ impl NSOutputStream { ] } } +pub type NSStreamDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 3803338c5..baa8bd3f2 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -1,3 +1,13 @@ +use super::NSArray; +use super::NSCharacterSet; +use super::NSData; +use super::NSDictionary; +use super::NSError; +use super::NSLocale; +use super::NSURL; +use crate::Foundation::generated::NSItemProvider::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index ed3ef2f69..6b607fed0 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 651d1ced4..ac64f56ac 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -1,3 +1,14 @@ +use super::NSArray; +use super::NSDate; +use super::NSDictionary; +use super::NSOrthography; +use super::NSRegularExpression; +use super::NSString; +use super::NSTimeZone; +use super::NSURL; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index d4969c93e..6caf931bb 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -1,3 +1,11 @@ +use super::NSArray; +use super::NSDate; +use super::NSMutableDictionary; +use super::NSNumber; +use super::NSString; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index c6fa7ea39..6b0870d5e 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -1,3 +1,12 @@ +use super::NSArray; +use super::NSData; +use super::NSDate; +use super::NSDictionary; +use super::NSLocale; +use super::NSString; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 1f16436ab..6b3d40396 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -1,3 +1,5 @@ +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index 97ec7a8c6..ea9d3b77f 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -1,3 +1,12 @@ +use super::NSArray; +use super::NSData; +use super::NSDictionary; +use super::NSNumber; +use crate::Foundation::generated::NSCharacterSet::*; +use crate::Foundation::generated::NSItemProvider::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSString::*; +use crate::Foundation::generated::NSURLHandle::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index 5afb015c6..e3b0ab2e3 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -1,7 +1,14 @@ +use super::NSError; +use super::NSURLCredential; +use super::NSURLProtectionSpace; +use super::NSURLResponse; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSURLAuthenticationChallengeSender = NSObject; +use super::NSURLAuthenticationChallengeInternal; extern_class!( #[derive(Debug)] pub struct NSURLAuthenticationChallenge; diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index c19d1ffed..40928945b 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -1,3 +1,11 @@ +use super::NSCachedURLResponseInternal; +use super::NSData; +use super::NSDate; +use super::NSDictionary; +use super::NSURLRequest; +use super::NSURLResponse; +use super::NSURLSessionDataTask; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -45,6 +53,8 @@ impl NSCachedURLResponse { msg_send![self, storagePolicy] } } +use super::NSURLCacheInternal; +use super::NSURLRequest; extern_class!( #[derive(Debug)] pub struct NSURLCache; diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 55ad84060..69118695f 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -1,3 +1,18 @@ +use super::NSArray; +use super::NSCachedURLResponse; +use super::NSData; +use super::NSError; +use super::NSInputStream; +use super::NSOperationQueue; +use super::NSRunLoop; +use super::NSURLAuthenticationChallenge; +use super::NSURLConnectionInternal; +use super::NSURLProtectionSpace; +use super::NSURLRequest; +use super::NSURLResponse; +use super::NSURL; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -65,6 +80,9 @@ impl NSURLConnection { msg_send_id![self, currentRequest] } } +pub type NSURLConnectionDelegate = NSObject; +pub type NSURLConnectionDataDelegate = NSObject; +pub type NSURLConnectionDownloadDelegate = NSObject; #[doc = "NSURLConnectionSynchronousLoading"] impl NSURLConnection { pub unsafe fn sendSynchronousRequest_returningResponse_error( diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index eba61beab..1c040bb24 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSString; +use super::NSURLCredentialInternal; +use crate::Foundation::generated::NSObject::*; +use crate::Security::generated::Security::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 1af95bca4..7fc4770b6 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -1,3 +1,11 @@ +use super::NSDictionary; +use super::NSString; +use super::NSURLCredential; +use super::NSURLCredentialStorageInternal; +use super::NSURLSessionTask; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSURLProtectionSpace::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index daf0c57ff..fd163fb92 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -1,3 +1,12 @@ +use super::NSData; +use super::NSError; +use super::NSString; +use super::NSURLAuthenticationChallenge; +use super::NSURLDownloadInternal; +use super::NSURLProtectionSpace; +use super::NSURLRequest; +use super::NSURLResponse; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -55,3 +64,4 @@ impl NSURLDownload { msg_send![self, setDeletesFileUponFailure: deletesFileUponFailure] } } +pub type NSURLDownloadDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs deleted file mode 100644 index 71ec80437..000000000 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 76e5d7dee..345d17bc5 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -1,7 +1,13 @@ +use super::NSData; +use super::NSMutableArray; +use super::NSMutableData; +use super::NSURL; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSURLHandleClient = NSObject; extern_class!( #[derive(Debug)] pub struct NSURLHandle; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index c95e99e89..01f2948cc 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -1,3 +1,9 @@ +use super::NSArray; +use super::NSData; +use super::NSString; +use super::NSURLProtectionSpaceInternal; +use crate::Foundation::generated::NSObject::*; +use crate::Security::generated::Security::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 1b24f9ed8..f279c8c50 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -1,7 +1,19 @@ +use super::NSCachedURLResponse; +use super::NSError; +use super::NSMutableURLRequest; +use super::NSURLAuthenticationChallenge; +use super::NSURLConnection; +use super::NSURLProtocolInternal; +use super::NSURLRequest; +use super::NSURLResponse; +use super::NSURLSessionTask; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSURLCache::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSURLProtocolClient = NSObject; extern_class!( #[derive(Debug)] pub struct NSURLProtocol; diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index f1682b077..c274450b6 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -1,3 +1,11 @@ +use super::NSData; +use super::NSDictionary; +use super::NSInputStream; +use super::NSString; +use super::NSURLRequestInternal; +use super::NSURL; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index 36b976be5..9cf422297 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -1,3 +1,9 @@ +use super::NSDictionary; +use super::NSString; +use super::NSURLRequest; +use super::NSURLResponseInternal; +use super::NSURL; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -41,6 +47,7 @@ impl NSURLResponse { msg_send_id![self, suggestedFilename] } } +use super::NSHTTPURLResponseInternal; extern_class!( #[derive(Debug)] pub struct NSHTTPURLResponse; diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index bb1b4d493..e7b8e9282 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -1,3 +1,28 @@ +use super::NSArray; +use super::NSCachedURLResponse; +use super::NSData; +use super::NSDateInterval; +use super::NSDictionary; +use super::NSError; +use super::NSHTTPCookie; +use super::NSHTTPURLResponse; +use super::NSInputStream; +use super::NSNetService; +use super::NSOperationQueue; +use super::NSOutputStream; +use super::NSString; +use super::NSURLAuthenticationChallenge; +use super::NSURLCache; +use super::NSURLCredential; +use super::NSURLCredentialStorage; +use super::NSURLProtectionSpace; +use super::NSURLResponse; +use super::NSURL; +use crate::Foundation::generated::NSHTTPCookieStorage::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSProgress::*; +use crate::Foundation::generated::NSURLRequest::*; +use crate::Security::generated::SecureTransport::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -788,6 +813,12 @@ impl NSURLSessionConfiguration { msg_send![self, setMultipathServiceType: multipathServiceType] } } +pub type NSURLSessionDelegate = NSObject; +pub type NSURLSessionTaskDelegate = NSObject; +pub type NSURLSessionDataDelegate = NSObject; +pub type NSURLSessionDownloadDelegate = NSObject; +pub type NSURLSessionStreamDelegate = NSObject; +pub type NSURLSessionWebSocketDelegate = NSObject; #[doc = "NSURLSessionDeprecated"] impl NSURLSessionConfiguration { pub unsafe fn backgroundSessionConfiguration( diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index 0eb27bcf4..93ed9764c 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -1,3 +1,6 @@ +use crate::uuid::generated::uuid::*; +use crate::CoreFoundation::generated::CFUUID::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index a107ecd22..ce6545cff 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -1,3 +1,9 @@ +use super::NSArray; +use super::NSData; +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index a30badce0..2dd70a5f4 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSString; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index 9df2e76f7..155e9fad1 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index eb265e7b2..dda7c9cf4 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -1,3 +1,14 @@ +use super::NSArray; +use super::NSArray; +use super::NSDictionary; +use super::NSError; +use super::NSInputStream; +use super::NSOutputStream; +use super::NSSet; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -159,3 +170,4 @@ impl NSUserActivity { msg_send![self, setPersistentIdentifier: persistentIdentifier] } } +pub type NSUserActivityDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index 2d93323f2..07404cb65 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -1,3 +1,11 @@ +use super::NSArray; +use super::NSData; +use super::NSDictionary; +use super::NSMutableDictionary; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 9ba1acc9a..4a1c76a37 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -1,3 +1,12 @@ +use super::NSArray; +use super::NSAttributedString; +use super::NSDate; +use super::NSDateComponents; +use super::NSDictionary; +use super::NSImage; +use super::NSString; +use super::NSTimeZone; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -200,3 +209,4 @@ impl NSUserNotificationCenter { msg_send![self, deliveredNotifications] } } +pub type NSUserNotificationCenterDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index 976ac0327..f8cf6b214 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -1,3 +1,12 @@ +use super::NSAppleEventDescriptor; +use super::NSArray; +use super::NSDictionary; +use super::NSError; +use super::NSFileHandle; +use super::NSString; +use super::NSXPCConnection; +use super::NSURL; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index ed2b742ed..c6348c14b 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -1,3 +1,6 @@ +use super::NSDictionary; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index e899f4749..934ee61f4 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -1,3 +1,6 @@ +use super::NSArray; +use super::NSString; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index aefd844d0..79ebee2d6 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSData; +use super::NSMutableDictionary; +use super::NSXMLDTDNode; +use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index 8e2e19a6e..c4c0a2887 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -1,3 +1,4 @@ +use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index 3e8c34d56..150087191 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -1,3 +1,8 @@ +use super::NSArray; +use super::NSData; +use super::NSDictionary; +use super::NSXMLDTD; +use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index 03ef57e36..3037c78f0 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -1,3 +1,9 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSEnumerator; +use super::NSMutableArray; +use super::NSString; +use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index e58409d31..1a4e87890 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -1,3 +1,12 @@ +use super::NSArray; +use super::NSDictionary; +use super::NSError; +use super::NSString; +use super::NSXMLDocument; +use super::NSXMLElement; +use super::NSURL; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSXMLNodeOptions::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs deleted file mode 100644 index 71ec80437..000000000 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 653906d25..743f64d33 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -1,3 +1,12 @@ +use super::NSData; +use super::NSDictionary; +use super::NSError; +use super::NSInputStream; +use super::NSSet; +use super::NSString; +use super::NSURL; +use crate::Foundation::generated::NSError::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -95,3 +104,4 @@ impl NSXMLParser { msg_send![self, columnNumber] } } +pub type NSXMLParserDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 272f2e9b0..414711ff0 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -1,7 +1,20 @@ +use super::NSError; +use super::NSLock; +use super::NSMutableDictionary; +use super::NSOperationQueue; +use super::NSSet; +use super::NSString; +use crate::bsm::generated::audit::*; +use crate::dispatch::generated::dispatch::*; +use crate::xpc::generated::xpc::*; +use crate::CoreFoundation::generated::CFDictionary::*; +use crate::Foundation::generated::NSCoder::*; +use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSXPCProxyCreating = NSObject; extern_class!( #[derive(Debug)] pub struct NSXPCConnection; @@ -141,6 +154,7 @@ impl NSXPCListener { msg_send_id![self, endpoint] } } +pub type NSXPCListenerDelegate = NSObject; extern_class!( #[derive(Debug)] pub struct NSXPCInterface; diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs deleted file mode 100644 index 71ec80437..000000000 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 23c249941..2005b14ab 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -1,332 +1,353 @@ -mod FoundationErrors; -pub use self::FoundationErrors::*; -mod FoundationLegacySwiftCompatibility; -pub use self::FoundationLegacySwiftCompatibility::*; mod NSAffineTransform; -pub use self::NSAffineTransform::*; +pub use self::NSAffineTransform::NSAffineTransform; mod NSAppleEventDescriptor; -pub use self::NSAppleEventDescriptor::*; +pub use self::NSAppleEventDescriptor::NSAppleEventDescriptor; mod NSAppleEventManager; -pub use self::NSAppleEventManager::*; +pub use self::NSAppleEventManager::NSAppleEventManager; mod NSAppleScript; -pub use self::NSAppleScript::*; +pub use self::NSAppleScript::NSAppleScript; mod NSArchiver; -pub use self::NSArchiver::*; +pub use self::NSArchiver::{NSArchiver, NSUnarchiver}; mod NSArray; -pub use self::NSArray::*; +pub use self::NSArray::{NSArray, NSMutableArray}; mod NSAttributedString; -pub use self::NSAttributedString::*; +pub use self::NSAttributedString::{ + NSAttributedString, NSAttributedStringMarkdownParsingOptions, NSMutableAttributedString, + NSPresentationIntent, +}; mod NSAutoreleasePool; -pub use self::NSAutoreleasePool::*; +pub use self::NSAutoreleasePool::NSAutoreleasePool; mod NSBackgroundActivityScheduler; -pub use self::NSBackgroundActivityScheduler::*; +pub use self::NSBackgroundActivityScheduler::NSBackgroundActivityScheduler; mod NSBundle; -pub use self::NSBundle::*; +pub use self::NSBundle::{NSBundle, NSBundleResourceRequest}; mod NSByteCountFormatter; -pub use self::NSByteCountFormatter::*; -mod NSByteOrder; -pub use self::NSByteOrder::*; +pub use self::NSByteCountFormatter::NSByteCountFormatter; mod NSCache; -pub use self::NSCache::*; +pub use self::NSCache::{NSCache, NSCacheDelegate}; mod NSCalendar; -pub use self::NSCalendar::*; +pub use self::NSCalendar::{NSCalendar, NSDateComponents}; mod NSCalendarDate; -pub use self::NSCalendarDate::*; +pub use self::NSCalendarDate::NSCalendarDate; mod NSCharacterSet; -pub use self::NSCharacterSet::*; +pub use self::NSCharacterSet::{NSCharacterSet, NSMutableCharacterSet}; mod NSClassDescription; -pub use self::NSClassDescription::*; +pub use self::NSClassDescription::NSClassDescription; mod NSCoder; -pub use self::NSCoder::*; +pub use self::NSCoder::NSCoder; mod NSComparisonPredicate; -pub use self::NSComparisonPredicate::*; +pub use self::NSComparisonPredicate::NSComparisonPredicate; mod NSCompoundPredicate; -pub use self::NSCompoundPredicate::*; +pub use self::NSCompoundPredicate::NSCompoundPredicate; mod NSConnection; -pub use self::NSConnection::*; +pub use self::NSConnection::{NSConnection, NSConnectionDelegate, NSDistantObjectRequest}; mod NSData; -pub use self::NSData::*; +pub use self::NSData::{NSData, NSMutableData, NSPurgeableData}; mod NSDate; -pub use self::NSDate::*; +pub use self::NSDate::NSDate; mod NSDateComponentsFormatter; -pub use self::NSDateComponentsFormatter::*; +pub use self::NSDateComponentsFormatter::NSDateComponentsFormatter; mod NSDateFormatter; -pub use self::NSDateFormatter::*; +pub use self::NSDateFormatter::NSDateFormatter; mod NSDateInterval; -pub use self::NSDateInterval::*; +pub use self::NSDateInterval::NSDateInterval; mod NSDateIntervalFormatter; -pub use self::NSDateIntervalFormatter::*; -mod NSDecimal; -pub use self::NSDecimal::*; +pub use self::NSDateIntervalFormatter::NSDateIntervalFormatter; mod NSDecimalNumber; -pub use self::NSDecimalNumber::*; +pub use self::NSDecimalNumber::{ + NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberHandler, +}; mod NSDictionary; -pub use self::NSDictionary::*; +pub use self::NSDictionary::{NSDictionary, NSMutableDictionary}; mod NSDistantObject; -pub use self::NSDistantObject::*; +pub use self::NSDistantObject::NSDistantObject; mod NSDistributedLock; -pub use self::NSDistributedLock::*; +pub use self::NSDistributedLock::NSDistributedLock; mod NSDistributedNotificationCenter; -pub use self::NSDistributedNotificationCenter::*; +pub use self::NSDistributedNotificationCenter::NSDistributedNotificationCenter; mod NSEnergyFormatter; -pub use self::NSEnergyFormatter::*; +pub use self::NSEnergyFormatter::NSEnergyFormatter; mod NSEnumerator; -pub use self::NSEnumerator::*; +pub use self::NSEnumerator::{NSEnumerator, NSFastEnumeration}; mod NSError; -pub use self::NSError::*; +pub use self::NSError::NSError; mod NSException; -pub use self::NSException::*; +pub use self::NSException::{NSAssertionHandler, NSException}; mod NSExpression; -pub use self::NSExpression::*; +pub use self::NSExpression::NSExpression; mod NSExtensionContext; -pub use self::NSExtensionContext::*; +pub use self::NSExtensionContext::NSExtensionContext; mod NSExtensionItem; -pub use self::NSExtensionItem::*; +pub use self::NSExtensionItem::NSExtensionItem; mod NSExtensionRequestHandling; -pub use self::NSExtensionRequestHandling::*; +pub use self::NSExtensionRequestHandling::NSExtensionRequestHandling; mod NSFileCoordinator; -pub use self::NSFileCoordinator::*; +pub use self::NSFileCoordinator::{NSFileAccessIntent, NSFileCoordinator}; mod NSFileHandle; -pub use self::NSFileHandle::*; +pub use self::NSFileHandle::{NSFileHandle, NSPipe}; mod NSFileManager; -pub use self::NSFileManager::*; +pub use self::NSFileManager::{ + NSDirectoryEnumerator, NSFileManager, NSFileManagerDelegate, NSFileProviderService, +}; mod NSFilePresenter; -pub use self::NSFilePresenter::*; +pub use self::NSFilePresenter::NSFilePresenter; mod NSFileVersion; -pub use self::NSFileVersion::*; +pub use self::NSFileVersion::NSFileVersion; mod NSFileWrapper; -pub use self::NSFileWrapper::*; +pub use self::NSFileWrapper::NSFileWrapper; mod NSFormatter; -pub use self::NSFormatter::*; +pub use self::NSFormatter::NSFormatter; mod NSGarbageCollector; -pub use self::NSGarbageCollector::*; -mod NSGeometry; -pub use self::NSGeometry::*; -mod NSHFSFileTypes; -pub use self::NSHFSFileTypes::*; +pub use self::NSGarbageCollector::NSGarbageCollector; mod NSHTTPCookie; -pub use self::NSHTTPCookie::*; +pub use self::NSHTTPCookie::NSHTTPCookie; mod NSHTTPCookieStorage; -pub use self::NSHTTPCookieStorage::*; +pub use self::NSHTTPCookieStorage::NSHTTPCookieStorage; mod NSHashTable; -pub use self::NSHashTable::*; +pub use self::NSHashTable::NSHashTable; mod NSHost; -pub use self::NSHost::*; +pub use self::NSHost::NSHost; mod NSISO8601DateFormatter; -pub use self::NSISO8601DateFormatter::*; +pub use self::NSISO8601DateFormatter::NSISO8601DateFormatter; mod NSIndexPath; -pub use self::NSIndexPath::*; +pub use self::NSIndexPath::NSIndexPath; mod NSIndexSet; -pub use self::NSIndexSet::*; +pub use self::NSIndexSet::{NSIndexSet, NSMutableIndexSet}; mod NSInflectionRule; -pub use self::NSInflectionRule::*; +pub use self::NSInflectionRule::{NSInflectionRule, NSInflectionRuleExplicit}; mod NSInvocation; -pub use self::NSInvocation::*; +pub use self::NSInvocation::NSInvocation; mod NSItemProvider; -pub use self::NSItemProvider::*; +pub use self::NSItemProvider::{NSItemProvider, NSItemProviderReading, NSItemProviderWriting}; mod NSJSONSerialization; -pub use self::NSJSONSerialization::*; -mod NSKeyValueCoding; -pub use self::NSKeyValueCoding::*; -mod NSKeyValueObserving; -pub use self::NSKeyValueObserving::*; +pub use self::NSJSONSerialization::NSJSONSerialization; mod NSKeyedArchiver; -pub use self::NSKeyedArchiver::*; +pub use self::NSKeyedArchiver::{ + NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, NSKeyedUnarchiverDelegate, +}; mod NSLengthFormatter; -pub use self::NSLengthFormatter::*; +pub use self::NSLengthFormatter::NSLengthFormatter; mod NSLinguisticTagger; -pub use self::NSLinguisticTagger::*; +pub use self::NSLinguisticTagger::NSLinguisticTagger; mod NSListFormatter; -pub use self::NSListFormatter::*; +pub use self::NSListFormatter::NSListFormatter; mod NSLocale; -pub use self::NSLocale::*; +pub use self::NSLocale::NSLocale; mod NSLock; -pub use self::NSLock::*; +pub use self::NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; mod NSMapTable; -pub use self::NSMapTable::*; +pub use self::NSMapTable::NSMapTable; mod NSMassFormatter; -pub use self::NSMassFormatter::*; +pub use self::NSMassFormatter::NSMassFormatter; mod NSMeasurement; -pub use self::NSMeasurement::*; +pub use self::NSMeasurement::NSMeasurement; mod NSMeasurementFormatter; -pub use self::NSMeasurementFormatter::*; +pub use self::NSMeasurementFormatter::NSMeasurementFormatter; mod NSMetadata; -pub use self::NSMetadata::*; -mod NSMetadataAttributes; -pub use self::NSMetadataAttributes::*; +pub use self::NSMetadata::{ + NSMetadataItem, NSMetadataQuery, NSMetadataQueryAttributeValueTuple, NSMetadataQueryDelegate, + NSMetadataQueryResultGroup, +}; mod NSMethodSignature; -pub use self::NSMethodSignature::*; +pub use self::NSMethodSignature::NSMethodSignature; mod NSMorphology; -pub use self::NSMorphology::*; +pub use self::NSMorphology::{NSMorphology, NSMorphologyCustomPronoun}; mod NSNetServices; -pub use self::NSNetServices::*; +pub use self::NSNetServices::{ + NSNetService, NSNetServiceBrowser, NSNetServiceBrowserDelegate, NSNetServiceDelegate, +}; mod NSNotification; -pub use self::NSNotification::*; +pub use self::NSNotification::{NSNotification, NSNotificationCenter}; mod NSNotificationQueue; -pub use self::NSNotificationQueue::*; +pub use self::NSNotificationQueue::NSNotificationQueue; mod NSNull; -pub use self::NSNull::*; +pub use self::NSNull::NSNull; mod NSNumberFormatter; -pub use self::NSNumberFormatter::*; -mod NSObjCRuntime; -pub use self::NSObjCRuntime::*; +pub use self::NSNumberFormatter::NSNumberFormatter; mod NSObject; -pub use self::NSObject::*; -mod NSObjectScripting; -pub use self::NSObjectScripting::*; +pub use self::NSObject::{ + NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, +}; mod NSOperation; -pub use self::NSOperation::*; +pub use self::NSOperation::{ + NSBlockOperation, NSInvocationOperation, NSOperation, NSOperationQueue, +}; mod NSOrderedCollectionChange; -pub use self::NSOrderedCollectionChange::*; +pub use self::NSOrderedCollectionChange::NSOrderedCollectionChange; mod NSOrderedCollectionDifference; -pub use self::NSOrderedCollectionDifference::*; +pub use self::NSOrderedCollectionDifference::NSOrderedCollectionDifference; mod NSOrderedSet; -pub use self::NSOrderedSet::*; +pub use self::NSOrderedSet::{NSMutableOrderedSet, NSOrderedSet}; mod NSOrthography; -pub use self::NSOrthography::*; -mod NSPathUtilities; -pub use self::NSPathUtilities::*; +pub use self::NSOrthography::NSOrthography; mod NSPersonNameComponents; -pub use self::NSPersonNameComponents::*; +pub use self::NSPersonNameComponents::NSPersonNameComponents; mod NSPersonNameComponentsFormatter; -pub use self::NSPersonNameComponentsFormatter::*; +pub use self::NSPersonNameComponentsFormatter::NSPersonNameComponentsFormatter; mod NSPointerArray; -pub use self::NSPointerArray::*; +pub use self::NSPointerArray::NSPointerArray; mod NSPointerFunctions; -pub use self::NSPointerFunctions::*; +pub use self::NSPointerFunctions::NSPointerFunctions; mod NSPort; -pub use self::NSPort::*; +pub use self::NSPort::{ + NSMachPort, NSMachPortDelegate, NSMessagePort, NSPort, NSPortDelegate, NSSocketPort, +}; mod NSPortCoder; -pub use self::NSPortCoder::*; +pub use self::NSPortCoder::NSPortCoder; mod NSPortMessage; -pub use self::NSPortMessage::*; +pub use self::NSPortMessage::NSPortMessage; mod NSPortNameServer; -pub use self::NSPortNameServer::*; +pub use self::NSPortNameServer::{ + NSMachBootstrapServer, NSMessagePortNameServer, NSPortNameServer, NSSocketPortNameServer, +}; mod NSPredicate; -pub use self::NSPredicate::*; +pub use self::NSPredicate::NSPredicate; mod NSProcessInfo; -pub use self::NSProcessInfo::*; +pub use self::NSProcessInfo::NSProcessInfo; mod NSProgress; -pub use self::NSProgress::*; +pub use self::NSProgress::{NSProgress, NSProgressReporting}; mod NSPropertyList; -pub use self::NSPropertyList::*; +pub use self::NSPropertyList::NSPropertyListSerialization; mod NSProtocolChecker; -pub use self::NSProtocolChecker::*; +pub use self::NSProtocolChecker::NSProtocolChecker; mod NSProxy; -pub use self::NSProxy::*; -mod NSRange; -pub use self::NSRange::*; +pub use self::NSProxy::NSProxy; mod NSRegularExpression; -pub use self::NSRegularExpression::*; +pub use self::NSRegularExpression::{NSDataDetector, NSRegularExpression}; mod NSRelativeDateTimeFormatter; -pub use self::NSRelativeDateTimeFormatter::*; +pub use self::NSRelativeDateTimeFormatter::NSRelativeDateTimeFormatter; mod NSRunLoop; -pub use self::NSRunLoop::*; +pub use self::NSRunLoop::NSRunLoop; mod NSScanner; -pub use self::NSScanner::*; +pub use self::NSScanner::NSScanner; mod NSScriptClassDescription; -pub use self::NSScriptClassDescription::*; +pub use self::NSScriptClassDescription::NSScriptClassDescription; mod NSScriptCoercionHandler; -pub use self::NSScriptCoercionHandler::*; +pub use self::NSScriptCoercionHandler::NSScriptCoercionHandler; mod NSScriptCommand; -pub use self::NSScriptCommand::*; +pub use self::NSScriptCommand::NSScriptCommand; mod NSScriptCommandDescription; -pub use self::NSScriptCommandDescription::*; +pub use self::NSScriptCommandDescription::NSScriptCommandDescription; mod NSScriptExecutionContext; -pub use self::NSScriptExecutionContext::*; -mod NSScriptKeyValueCoding; -pub use self::NSScriptKeyValueCoding::*; +pub use self::NSScriptExecutionContext::NSScriptExecutionContext; mod NSScriptObjectSpecifiers; -pub use self::NSScriptObjectSpecifiers::*; +pub use self::NSScriptObjectSpecifiers::{ + NSIndexSpecifier, NSMiddleSpecifier, NSNameSpecifier, NSPositionalSpecifier, + NSPropertySpecifier, NSRandomSpecifier, NSRangeSpecifier, NSRelativeSpecifier, + NSScriptObjectSpecifier, NSUniqueIDSpecifier, NSWhoseSpecifier, +}; mod NSScriptStandardSuiteCommands; -pub use self::NSScriptStandardSuiteCommands::*; +pub use self::NSScriptStandardSuiteCommands::{ + NSCloneCommand, NSCloseCommand, NSCountCommand, NSCreateCommand, NSDeleteCommand, + NSExistsCommand, NSGetCommand, NSMoveCommand, NSQuitCommand, NSSetCommand, +}; mod NSScriptSuiteRegistry; -pub use self::NSScriptSuiteRegistry::*; +pub use self::NSScriptSuiteRegistry::NSScriptSuiteRegistry; mod NSScriptWhoseTests; -pub use self::NSScriptWhoseTests::*; +pub use self::NSScriptWhoseTests::{NSLogicalTest, NSScriptWhoseTest, NSSpecifierTest}; mod NSSet; -pub use self::NSSet::*; +pub use self::NSSet::{NSCountedSet, NSMutableSet, NSSet}; mod NSSortDescriptor; -pub use self::NSSortDescriptor::*; +pub use self::NSSortDescriptor::NSSortDescriptor; mod NSSpellServer; -pub use self::NSSpellServer::*; +pub use self::NSSpellServer::{NSSpellServer, NSSpellServerDelegate}; mod NSStream; -pub use self::NSStream::*; +pub use self::NSStream::{NSInputStream, NSOutputStream, NSStream, NSStreamDelegate}; mod NSString; -pub use self::NSString::*; +pub use self::NSString::{NSConstantString, NSMutableString, NSSimpleCString, NSString}; mod NSTask; -pub use self::NSTask::*; +pub use self::NSTask::NSTask; mod NSTextCheckingResult; -pub use self::NSTextCheckingResult::*; +pub use self::NSTextCheckingResult::NSTextCheckingResult; mod NSThread; -pub use self::NSThread::*; +pub use self::NSThread::NSThread; mod NSTimeZone; -pub use self::NSTimeZone::*; +pub use self::NSTimeZone::NSTimeZone; mod NSTimer; -pub use self::NSTimer::*; +pub use self::NSTimer::NSTimer; mod NSURL; -pub use self::NSURL::*; +pub use self::NSURL::{NSFileSecurity, NSURLComponents, NSURLQueryItem, NSURL}; mod NSURLAuthenticationChallenge; -pub use self::NSURLAuthenticationChallenge::*; +pub use self::NSURLAuthenticationChallenge::{ + NSURLAuthenticationChallenge, NSURLAuthenticationChallengeSender, +}; mod NSURLCache; -pub use self::NSURLCache::*; +pub use self::NSURLCache::{NSCachedURLResponse, NSURLCache}; mod NSURLConnection; -pub use self::NSURLConnection::*; +pub use self::NSURLConnection::{ + NSURLConnection, NSURLConnectionDataDelegate, NSURLConnectionDelegate, + NSURLConnectionDownloadDelegate, +}; mod NSURLCredential; -pub use self::NSURLCredential::*; +pub use self::NSURLCredential::NSURLCredential; mod NSURLCredentialStorage; -pub use self::NSURLCredentialStorage::*; +pub use self::NSURLCredentialStorage::NSURLCredentialStorage; mod NSURLDownload; -pub use self::NSURLDownload::*; -mod NSURLError; -pub use self::NSURLError::*; +pub use self::NSURLDownload::{NSURLDownload, NSURLDownloadDelegate}; mod NSURLHandle; -pub use self::NSURLHandle::*; +pub use self::NSURLHandle::{NSURLHandle, NSURLHandleClient}; mod NSURLProtectionSpace; -pub use self::NSURLProtectionSpace::*; +pub use self::NSURLProtectionSpace::NSURLProtectionSpace; mod NSURLProtocol; -pub use self::NSURLProtocol::*; +pub use self::NSURLProtocol::{NSURLProtocol, NSURLProtocolClient}; mod NSURLRequest; -pub use self::NSURLRequest::*; +pub use self::NSURLRequest::{NSMutableURLRequest, NSURLRequest}; mod NSURLResponse; -pub use self::NSURLResponse::*; +pub use self::NSURLResponse::{NSHTTPURLResponse, NSURLResponse}; mod NSURLSession; -pub use self::NSURLSession::*; +pub use self::NSURLSession::{ + NSURLSession, NSURLSessionConfiguration, NSURLSessionDataDelegate, NSURLSessionDataTask, + NSURLSessionDelegate, NSURLSessionDownloadDelegate, NSURLSessionDownloadTask, + NSURLSessionStreamDelegate, NSURLSessionStreamTask, NSURLSessionTask, NSURLSessionTaskDelegate, + NSURLSessionTaskMetrics, NSURLSessionTaskTransactionMetrics, NSURLSessionUploadTask, + NSURLSessionWebSocketDelegate, NSURLSessionWebSocketMessage, NSURLSessionWebSocketTask, +}; mod NSUUID; -pub use self::NSUUID::*; +pub use self::NSUUID::NSUUID; mod NSUbiquitousKeyValueStore; -pub use self::NSUbiquitousKeyValueStore::*; +pub use self::NSUbiquitousKeyValueStore::NSUbiquitousKeyValueStore; mod NSUndoManager; -pub use self::NSUndoManager::*; +pub use self::NSUndoManager::NSUndoManager; mod NSUnit; -pub use self::NSUnit::*; +pub use self::NSUnit::{ + NSDimension, NSUnit, NSUnitAcceleration, NSUnitAngle, NSUnitArea, NSUnitConcentrationMass, + NSUnitConverter, NSUnitConverterLinear, NSUnitDispersion, NSUnitDuration, NSUnitElectricCharge, + NSUnitElectricCurrent, NSUnitElectricPotentialDifference, NSUnitElectricResistance, + NSUnitEnergy, NSUnitFrequency, NSUnitFuelEfficiency, NSUnitIlluminance, + NSUnitInformationStorage, NSUnitLength, NSUnitMass, NSUnitPower, NSUnitPressure, NSUnitSpeed, + NSUnitTemperature, NSUnitVolume, +}; mod NSUserActivity; -pub use self::NSUserActivity::*; +pub use self::NSUserActivity::{NSUserActivity, NSUserActivityDelegate}; mod NSUserDefaults; -pub use self::NSUserDefaults::*; +pub use self::NSUserDefaults::NSUserDefaults; mod NSUserNotification; -pub use self::NSUserNotification::*; +pub use self::NSUserNotification::{ + NSUserNotification, NSUserNotificationAction, NSUserNotificationCenter, + NSUserNotificationCenterDelegate, +}; mod NSUserScriptTask; -pub use self::NSUserScriptTask::*; +pub use self::NSUserScriptTask::{ + NSUserAppleScriptTask, NSUserAutomatorTask, NSUserScriptTask, NSUserUnixTask, +}; mod NSValue; -pub use self::NSValue::*; +pub use self::NSValue::{NSNumber, NSValue}; mod NSValueTransformer; -pub use self::NSValueTransformer::*; +pub use self::NSValueTransformer::{NSSecureUnarchiveFromDataTransformer, NSValueTransformer}; mod NSXMLDTD; -pub use self::NSXMLDTD::*; +pub use self::NSXMLDTD::NSXMLDTD; mod NSXMLDTDNode; -pub use self::NSXMLDTDNode::*; +pub use self::NSXMLDTDNode::NSXMLDTDNode; mod NSXMLDocument; -pub use self::NSXMLDocument::*; +pub use self::NSXMLDocument::NSXMLDocument; mod NSXMLElement; -pub use self::NSXMLElement::*; +pub use self::NSXMLElement::NSXMLElement; mod NSXMLNode; -pub use self::NSXMLNode::*; -mod NSXMLNodeOptions; -pub use self::NSXMLNodeOptions::*; +pub use self::NSXMLNode::NSXMLNode; mod NSXMLParser; -pub use self::NSXMLParser::*; +pub use self::NSXMLParser::{NSXMLParser, NSXMLParserDelegate}; mod NSXPCConnection; -pub use self::NSXPCConnection::*; -mod NSZone; -pub use self::NSZone::*; +pub use self::NSXPCConnection::{ + NSXPCCoder, NSXPCConnection, NSXPCInterface, NSXPCListener, NSXPCListenerDelegate, + NSXPCListenerEndpoint, NSXPCProxyCreating, +}; From 0d9a20c1281b3d248e001d569a6cd1105efe1515 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 17 Sep 2022 18:15:39 +0200 Subject: [PATCH 035/131] Further import improvements --- crates/header-translator/src/main.rs | 25 +- crates/header-translator/src/stmt.rs | 2 +- crates/icrate/src/AppKit/mod.rs | 4 +- crates/icrate/src/Foundation/mod.rs | 4 +- .../Foundation/NSAppleEventDescriptor.rs | 2 +- .../Foundation/NSAppleEventManager.rs | 2 +- .../src/generated/Foundation/NSAppleScript.rs | 8 +- .../src/generated/Foundation/NSArchiver.rs | 10 +- .../src/generated/Foundation/NSArray.rs | 8 +- .../src/generated/Foundation/NSBundle.rs | 12 +- .../src/generated/Foundation/NSCache.rs | 2 +- .../src/generated/Foundation/NSCalendar.rs | 8 +- .../generated/Foundation/NSCalendarDate.rs | 6 +- .../generated/Foundation/NSCharacterSet.rs | 2 +- .../Foundation/NSClassDescription.rs | 6 +- .../src/generated/Foundation/NSCoder.rs | 6 +- .../Foundation/NSComparisonPredicate.rs | 4 +- .../Foundation/NSCompoundPredicate.rs | 2 +- .../src/generated/Foundation/NSConnection.rs | 22 +- .../icrate/src/generated/Foundation/NSData.rs | 6 +- .../icrate/src/generated/Foundation/NSDate.rs | 2 +- .../generated/Foundation/NSDateFormatter.rs | 16 +- .../Foundation/NSDateIntervalFormatter.rs | 8 +- .../src/generated/Foundation/NSDictionary.rs | 8 +- .../generated/Foundation/NSDistantObject.rs | 6 +- .../generated/Foundation/NSDistributedLock.rs | 2 +- .../NSDistributedNotificationCenter.rs | 4 +- .../src/generated/Foundation/NSEnumerator.rs | 2 +- .../src/generated/Foundation/NSError.rs | 6 +- .../src/generated/Foundation/NSException.rs | 8 +- .../src/generated/Foundation/NSExpression.rs | 8 +- .../Foundation/NSExtensionRequestHandling.rs | 2 +- .../generated/Foundation/NSFileCoordinator.rs | 12 +- .../src/generated/Foundation/NSFileHandle.rs | 6 +- .../src/generated/Foundation/NSFileManager.rs | 14 +- .../generated/Foundation/NSFilePresenter.rs | 8 +- .../src/generated/Foundation/NSFileVersion.rs | 14 +- .../src/generated/Foundation/NSFileWrapper.rs | 10 +- .../src/generated/Foundation/NSFormatter.rs | 6 +- .../src/generated/Foundation/NSHTTPCookie.rs | 14 +- .../Foundation/NSHTTPCookieStorage.rs | 14 +- .../src/generated/Foundation/NSHashTable.rs | 4 +- .../icrate/src/generated/Foundation/NSHost.rs | 6 +- .../Foundation/NSISO8601DateFormatter.rs | 6 +- .../generated/Foundation/NSInflectionRule.rs | 2 +- .../src/generated/Foundation/NSInvocation.rs | 2 +- .../generated/Foundation/NSItemProvider.rs | 2 +- .../Foundation/NSJSONSerialization.rs | 8 +- .../generated/Foundation/NSKeyedArchiver.rs | 8 +- .../Foundation/NSLinguisticTagger.rs | 6 +- .../src/generated/Foundation/NSLocale.rs | 8 +- .../icrate/src/generated/Foundation/NSLock.rs | 2 +- .../src/generated/Foundation/NSMapTable.rs | 4 +- .../generated/Foundation/NSMassFormatter.rs | 2 +- .../src/generated/Foundation/NSMetadata.rs | 14 +- .../src/generated/Foundation/NSNetServices.rs | 16 +- .../generated/Foundation/NSNotification.rs | 6 +- .../Foundation/NSNotificationQueue.rs | 8 +- .../generated/Foundation/NSNumberFormatter.rs | 14 +- .../src/generated/Foundation/NSObject.rs | 12 +- .../src/generated/Foundation/NSOperation.rs | 4 +- .../NSOrderedCollectionDifference.rs | 2 +- .../src/generated/Foundation/NSOrderedSet.rs | 8 +- .../src/generated/Foundation/NSOrthography.rs | 6 +- .../icrate/src/generated/Foundation/NSPort.rs | 12 +- .../src/generated/Foundation/NSPortCoder.rs | 6 +- .../src/generated/Foundation/NSPortMessage.rs | 8 +- .../generated/Foundation/NSPortNameServer.rs | 4 +- .../src/generated/Foundation/NSPredicate.rs | 4 +- .../src/generated/Foundation/NSProcessInfo.rs | 6 +- .../src/generated/Foundation/NSProgress.rs | 14 +- .../generated/Foundation/NSPropertyList.rs | 10 +- .../src/generated/Foundation/NSProxy.rs | 4 +- .../Foundation/NSRegularExpression.rs | 2 +- .../Foundation/NSRelativeDateTimeFormatter.rs | 6 +- .../src/generated/Foundation/NSRunLoop.rs | 8 +- .../src/generated/Foundation/NSScanner.rs | 6 +- .../Foundation/NSScriptClassDescription.rs | 2 +- .../generated/Foundation/NSScriptCommand.rs | 12 +- .../Foundation/NSScriptCommandDescription.rs | 8 +- .../Foundation/NSScriptExecutionContext.rs | 2 +- .../Foundation/NSScriptObjectSpecifiers.rs | 12 +- .../NSScriptStandardSuiteCommands.rs | 8 +- .../Foundation/NSScriptSuiteRegistry.rs | 18 +- .../Foundation/NSScriptWhoseTests.rs | 6 +- .../icrate/src/generated/Foundation/NSSet.rs | 6 +- .../src/generated/Foundation/NSSpellServer.rs | 6 +- .../src/generated/Foundation/NSStream.rs | 14 +- .../src/generated/Foundation/NSString.rs | 14 +- .../icrate/src/generated/Foundation/NSTask.rs | 6 +- .../Foundation/NSTextCheckingResult.rs | 16 +- .../src/generated/Foundation/NSThread.rs | 10 +- .../src/generated/Foundation/NSTimeZone.rs | 12 +- .../icrate/src/generated/Foundation/NSURL.rs | 8 +- .../NSURLAuthenticationChallenge.rs | 10 +- .../src/generated/Foundation/NSURLCache.rs | 18 +- .../generated/Foundation/NSURLConnection.rs | 26 +- .../generated/Foundation/NSURLCredential.rs | 6 +- .../Foundation/NSURLCredentialStorage.rs | 10 +- .../src/generated/Foundation/NSURLDownload.rs | 16 +- .../src/generated/Foundation/NSURLHandle.rs | 8 +- .../Foundation/NSURLProtectionSpace.rs | 8 +- .../src/generated/Foundation/NSURLProtocol.rs | 18 +- .../src/generated/Foundation/NSURLRequest.rs | 12 +- .../src/generated/Foundation/NSURLResponse.rs | 12 +- .../src/generated/Foundation/NSURLSession.rs | 40 +- .../Foundation/NSUbiquitousKeyValueStore.rs | 8 +- .../src/generated/Foundation/NSUndoManager.rs | 4 +- .../generated/Foundation/NSUserActivity.rs | 18 +- .../generated/Foundation/NSUserDefaults.rs | 12 +- .../Foundation/NSUserNotification.rs | 16 +- .../generated/Foundation/NSUserScriptTask.rs | 16 +- .../src/generated/Foundation/NSValue.rs | 4 +- .../Foundation/NSValueTransformer.rs | 4 +- .../src/generated/Foundation/NSXMLDTD.rs | 8 +- .../src/generated/Foundation/NSXMLDocument.rs | 8 +- .../src/generated/Foundation/NSXMLElement.rs | 10 +- .../src/generated/Foundation/NSXMLNode.rs | 14 +- .../src/generated/Foundation/NSXMLParser.rs | 14 +- .../generated/Foundation/NSXPCConnection.rs | 12 +- crates/icrate/src/generated/Foundation/mod.rs | 709 +++++++++--------- 121 files changed, 882 insertions(+), 870 deletions(-) diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index c7ca32273..ba871ab39 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,4 +1,4 @@ -use std::collections::BTreeMap; +use std::collections::{BTreeMap, HashSet}; use std::fs; use std::io::{Result, Write}; use std::path::{Path, PathBuf}; @@ -6,7 +6,7 @@ use std::process::{Command, Stdio}; use clang::source::File; use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index}; -use proc_macro2::TokenStream; +use proc_macro2::{Ident, TokenStream}; use quote::{format_ident, quote, TokenStreamExt}; use header_translator::{create_rust_file, Config}; @@ -155,7 +155,7 @@ fn main() { let config = dbg!(Config::from_file(Path::new("icrate/src/Foundation.toml")).unwrap()); - let mut mod_tokens = TokenStream::new(); + let mut declared: Vec<(Ident, HashSet)> = Vec::new(); for (path, res) in result { if path == header { @@ -183,13 +183,22 @@ fn main() { let name = format_ident!("{}", path.file_stem().unwrap().to_string_lossy()); + declared.push((name, declared_types)); + } + + let mod_names = declared.iter().map(|(name, _)| name); + let mod_imports = declared.iter().map(|(name, declared_types)| { let declared_types = declared_types.iter().map(|name| format_ident!("{}", name)); + quote!(super::#name::{#(#declared_types,)*}) + }); - mod_tokens.append_all(quote! { - mod #name; - pub use self::#name::{#(#declared_types,)*}; - }); - } + let mut mod_tokens = quote! { + #(pub(crate) mod #mod_names;)* + + mod __exported { + #(pub use #mod_imports;)* + } + }; // truncate if the file exists fs::write(config.output.join("mod.rs"), run_rustfmt(mod_tokens)).unwrap(); diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index fb663a272..e45fbb1c6 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -279,7 +279,7 @@ impl ToTokens for Stmt { let name = format_ident!("{}", name); quote! { - use super::#name; + use super::__exported::#name; } } Self::ClassDecl { diff --git a/crates/icrate/src/AppKit/mod.rs b/crates/icrate/src/AppKit/mod.rs index a17e607ff..9f7595c06 100644 --- a/crates/icrate/src/AppKit/mod.rs +++ b/crates/icrate/src/AppKit/mod.rs @@ -1,4 +1,4 @@ #[path = "../generated/AppKit/mod.rs"] -mod generated; +pub(crate) mod generated; -pub use self::generated::*; +pub use self::generated::__exported::*; diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index 446c368eb..efafbc8da 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -1,8 +1,8 @@ #[path = "../generated/Foundation/mod.rs"] -mod generated; +pub(crate) mod generated; // TODO pub use objc2::foundation::*; pub use objc2::ns_string; -pub use self::generated::*; +pub use self::generated::__exported::*; diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 5a2038530..7cd3ad0c5 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -1,4 +1,4 @@ -use super::NSData; +use super::__exported::NSData; use crate::CoreServices::generated::CoreServices::*; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index 6c8317868..4dfa8ab37 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -1,4 +1,4 @@ -use super::NSAppleEventDescriptor; +use super::__exported::NSAppleEventDescriptor; use crate::CoreServices::generated::CoreServices::*; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index f0a2a8d32..e91812f6d 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -1,7 +1,7 @@ -use super::NSAppleEventDescriptor; -use super::NSDictionary; -use super::NSString; -use super::NSURL; +use super::__exported::NSAppleEventDescriptor; +use super::__exported::NSDictionary; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 851694683..fb8dc629d 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -1,8 +1,8 @@ -use super::NSData; -use super::NSMutableArray; -use super::NSMutableData; -use super::NSMutableDictionary; -use super::NSString; +use super::__exported::NSData; +use super::__exported::NSMutableArray; +use super::__exported::NSMutableData; +use super::__exported::NSMutableDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSCoder::*; use crate::Foundation::generated::NSException::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 26860b6be..6d7ee8436 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -1,7 +1,7 @@ -use super::NSData; -use super::NSIndexSet; -use super::NSString; -use super::NSURL; +use super::__exported::NSData; +use super::__exported::NSIndexSet; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSEnumerator::*; use crate::Foundation::generated::NSObjCRuntime::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 3e288066d..f4349837d 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -1,9 +1,9 @@ -use super::NSError; -use super::NSLock; -use super::NSNumber; -use super::NSString; -use super::NSURL; -use super::NSUUID; +use super::__exported::NSError; +use super::__exported::NSLock; +use super::__exported::NSNumber; +use super::__exported::NSString; +use super::__exported::NSURL; +use super::__exported::NSUUID; use crate::Foundation::generated::NSArray::*; use crate::Foundation::generated::NSDictionary::*; use crate::Foundation::generated::NSNotification::*; diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 6520cf8f8..2c501b8cf 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -1,4 +1,4 @@ -use super::NSString; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index fc22517fb..a5c61f623 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSLocale; -use super::NSString; -use super::NSTimeZone; +use super::__exported::NSArray; +use super::__exported::NSLocale; +use super::__exported::NSString; +use super::__exported::NSTimeZone; use crate::CoreFoundation::generated::CFCalendar::*; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSNotification::*; diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index 5d189d9bf..e3e8ff6a9 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSString; -use super::NSTimeZone; +use super::__exported::NSArray; +use super::__exported::NSString; +use super::__exported::NSTimeZone; use crate::Foundation::generated::NSDate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 16dc16d36..c5c13f093 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -1,4 +1,4 @@ -use super::NSData; +use super::__exported::NSData; use crate::CoreFoundation::generated::CFCharacterSet::*; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSRange::*; diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index 8baa103d6..b083d1960 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSException::*; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 2e41bc886..676cddb30 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -1,6 +1,6 @@ -use super::NSData; -use super::NSSet; -use super::NSString; +use super::__exported::NSData; +use super::__exported::NSSet; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index c82a15eda..f4448c86c 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -1,5 +1,5 @@ -use super::NSExpression; -use super::NSPredicateOperator; +use super::__exported::NSExpression; +use super::__exported::NSPredicateOperator; use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 7fbfcaa40..d9e34d12c 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -1,4 +1,4 @@ -use super::NSArray; +use super::__exported::NSArray; use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 03d569f2a..53aad2d62 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -1,14 +1,14 @@ -use super::NSArray; -use super::NSData; -use super::NSDictionary; -use super::NSDistantObject; -use super::NSException; -use super::NSMutableData; -use super::NSNumber; -use super::NSPort; -use super::NSPortNameServer; -use super::NSRunLoop; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSDistantObject; +use super::__exported::NSException; +use super::__exported::NSMutableData; +use super::__exported::NSNumber; +use super::__exported::NSPort; +use super::__exported::NSPortNameServer; +use super::__exported::NSRunLoop; +use super::__exported::NSString; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 53becdbed..07d95044c 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -1,6 +1,6 @@ -use super::NSError; -use super::NSString; -use super::NSURL; +use super::__exported::NSError; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 58ca7f6c7..7e8d0c0ce 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -1,4 +1,4 @@ -use super::NSString; +use super::__exported::NSString; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index a34998b7a..20b5cc321 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -1,11 +1,11 @@ -use super::NSArray; -use super::NSCalendar; -use super::NSDate; -use super::NSError; -use super::NSLocale; -use super::NSMutableDictionary; -use super::NSString; -use super::NSTimeZone; +use super::__exported::NSArray; +use super::__exported::NSCalendar; +use super::__exported::NSDate; +use super::__exported::NSError; +use super::__exported::NSLocale; +use super::__exported::NSMutableDictionary; +use super::__exported::NSString; +use super::__exported::NSTimeZone; use crate::CoreFoundation::generated::CFDateFormatter::*; use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index 5c0596601..54de0138b 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -1,7 +1,7 @@ -use super::NSCalendar; -use super::NSDate; -use super::NSLocale; -use super::NSTimeZone; +use super::__exported::NSCalendar; +use super::__exported::NSDate; +use super::__exported::NSLocale; +use super::__exported::NSTimeZone; use crate::dispatch::generated::dispatch::*; use crate::Foundation::generated::NSDateInterval::*; use crate::Foundation::generated::NSFormatter::*; diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 3f1198724..60372c716 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSSet; -use super::NSString; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSSet; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSEnumerator::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index 926448aab..8e2918de5 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -1,6 +1,6 @@ -use super::NSCoder; -use super::NSConnection; -use super::Protocol; +use super::__exported::NSCoder; +use super::__exported::NSConnection; +use super::__exported::Protocol; use crate::Foundation::generated::NSProxy::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index 81324a36a..e0560a2b4 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -1,4 +1,4 @@ -use super::NSDate; +use super::__exported::NSDate; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 58291b726..7be0e476b 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -1,5 +1,5 @@ -use super::NSDictionary; -use super::NSString; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSNotification::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index ca1440b3b..05a0e4be3 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -1,4 +1,4 @@ -use super::NSArray; +use super::__exported::NSArray; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index fd3b89f22..1cd8d994f 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index ee4b763d7..80772e0db 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSNumber; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSNumber; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index 847dd2b2b..b42cdbea6 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSMutableDictionary; -use super::NSPredicate; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSMutableDictionary; +use super::__exported::NSPredicate; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs index f14c4707c..a84eb23a1 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs @@ -1,4 +1,4 @@ -use super::NSExtensionContext; +use super::__exported::NSExtensionContext; use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index d34cb6a92..4d7b7a845 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -1,9 +1,9 @@ -use super::NSArray; -use super::NSError; -use super::NSFilePresenter; -use super::NSMutableDictionary; -use super::NSOperationQueue; -use super::NSSet; +use super::__exported::NSArray; +use super::__exported::NSError; +use super::__exported::NSFilePresenter; +use super::__exported::NSMutableDictionary; +use super::__exported::NSOperationQueue; +use super::__exported::NSSet; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 8f4144611..8e9a65fa0 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -1,6 +1,6 @@ -use super::NSData; -use super::NSError; -use super::NSString; +use super::__exported::NSData; +use super::__exported::NSError; +use super::__exported::NSString; use crate::Foundation::generated::NSArray::*; use crate::Foundation::generated::NSException::*; use crate::Foundation::generated::NSNotification::*; diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 635cbf0c8..b48867484 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -1,10 +1,10 @@ -use super::NSArray; -use super::NSData; -use super::NSDate; -use super::NSError; -use super::NSLock; -use super::NSNumber; -use super::NSXPCConnection; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSDate; +use super::__exported::NSError; +use super::__exported::NSLock; +use super::__exported::NSNumber; +use super::__exported::NSXPCConnection; use crate::dispatch::generated::dispatch::*; use crate::CoreFoundation::generated::CFBase::*; use crate::Foundation::generated::NSDictionary::*; diff --git a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs index b07ae41a8..44fb37779 100644 --- a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs +++ b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs @@ -1,7 +1,7 @@ -use super::NSError; -use super::NSFileVersion; -use super::NSOperationQueue; -use super::NSSet; +use super::__exported::NSError; +use super::__exported::NSFileVersion; +use super::__exported::NSOperationQueue; +use super::__exported::NSSet; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index 3b74ffc29..395578548 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -1,10 +1,10 @@ -use super::NSArray; -use super::NSDate; -use super::NSDictionary; -use super::NSError; -use super::NSPersonNameComponents; -use super::NSString; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSDate; +use super::__exported::NSDictionary; +use super::__exported::NSError; +use super::__exported::NSPersonNameComponents; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index cfbbff9cc..67e362b9b 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -1,8 +1,8 @@ -use super::NSData; -use super::NSDictionary; -use super::NSError; -use super::NSString; -use super::NSURL; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSError; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index d615f408c..04c390851 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -1,6 +1,6 @@ -use super::NSAttributedString; -use super::NSDictionary; -use super::NSString; +use super::__exported::NSAttributedString; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSAttributedString::*; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSRange::*; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index 314e0f013..78dad70ef 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -1,10 +1,10 @@ -use super::NSArray; -use super::NSDate; -use super::NSDictionary; -use super::NSHTTPCookieInternal; -use super::NSNumber; -use super::NSString; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSDate; +use super::__exported::NSDictionary; +use super::__exported::NSHTTPCookieInternal; +use super::__exported::NSNumber; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index 6f019e109..d1360c447 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -1,10 +1,10 @@ -use super::NSArray; -use super::NSDate; -use super::NSHTTPCookie; -use super::NSHTTPCookieStorageInternal; -use super::NSSortDescriptor; -use super::NSURLSessionTask; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSDate; +use super::__exported::NSHTTPCookie; +use super::__exported::NSHTTPCookieStorageInternal; +use super::__exported::NSSortDescriptor; +use super::__exported::NSURLSessionTask; +use super::__exported::NSURL; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 7f91602e4..1bc68caae 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -1,5 +1,5 @@ -use super::NSArray; -use super::NSSet; +use super::__exported::NSArray; +use super::__exported::NSSet; use crate::Foundation::generated::NSEnumerator::*; use crate::Foundation::generated::NSPointerFunctions::*; use crate::Foundation::generated::NSString::*; diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index dddf8e172..c81a2540c 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSMutableArray; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSMutableArray; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 6c71ff797..689388022 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -1,6 +1,6 @@ -use super::NSDate; -use super::NSString; -use super::NSTimeZone; +use super::__exported::NSDate; +use super::__exported::NSString; +use super::__exported::NSTimeZone; use crate::CoreFoundation::generated::CFDateFormatter::*; use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index 7538eb577..964dfa526 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -1,4 +1,4 @@ -use super::NSMorphology; +use super::__exported::NSMorphology; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index 4287076d2..823d0323e 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -1,4 +1,4 @@ -use super::NSMethodSignature; +use super::__exported::NSMethodSignature; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index c9331b964..5ff65292a 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -1,4 +1,4 @@ -use super::NSProgress; +use super::__exported::NSProgress; use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 5aa5ad548..8ee0b6b85 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -1,7 +1,7 @@ -use super::NSData; -use super::NSError; -use super::NSInputStream; -use super::NSOutputStream; +use super::__exported::NSData; +use super::__exported::NSError; +use super::__exported::NSInputStream; +use super::__exported::NSOutputStream; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index d38a48672..845901887 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSData; -use super::NSMutableData; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSMutableData; +use super::__exported::NSString; use crate::Foundation::generated::NSCoder::*; use crate::Foundation::generated::NSException::*; use crate::Foundation::generated::NSGeometry::*; diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 8a696f671..fbf85cb5c 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSOrthography; -use super::NSValue; +use super::__exported::NSArray; +use super::__exported::NSOrthography; +use super::__exported::NSValue; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 1892260d5..ae2f79f18 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSCalendar; -use super::NSDictionary; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSCalendar; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::CoreFoundation::generated::CFLocale::*; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index 957d7e93d..b62092c72 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -1,4 +1,4 @@ -use super::NSDate; +use super::__exported::NSDate; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index fe8cfb2ba..30ba799e4 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -1,5 +1,5 @@ -use super::NSArray; -use super::NSDictionary; +use super::__exported::NSArray; +use super::__exported::NSDictionary; use crate::Foundation::generated::NSEnumerator::*; use crate::Foundation::generated::NSPointerFunctions::*; use crate::Foundation::generated::NSString::*; diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index d2d3ccacd..b2338ea39 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -1,4 +1,4 @@ -use super::NSNumberFormatter; +use super::__exported::NSNumberFormatter; use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 451e5f48d..2d7a3123c 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -1,10 +1,10 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSOperationQueue; -use super::NSPredicate; -use super::NSSortDescriptor; -use super::NSString; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSOperationQueue; +use super::__exported::NSPredicate; +use super::__exported::NSSortDescriptor; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSMetadataAttributes::*; use crate::Foundation::generated::NSNotification::*; diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 907e6ba50..eb915a3ce 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -1,11 +1,11 @@ -use super::NSArray; -use super::NSData; -use super::NSDictionary; -use super::NSInputStream; -use super::NSNumber; -use super::NSOutputStream; -use super::NSRunLoop; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSInputStream; +use super::__exported::NSNumber; +use super::__exported::NSOutputStream; +use super::__exported::NSRunLoop; +use super::__exported::NSString; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSError::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 849c35e24..d9e6f8424 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -1,6 +1,6 @@ -use super::NSDictionary; -use super::NSOperationQueue; -use super::NSString; +use super::__exported::NSDictionary; +use super::__exported::NSOperationQueue; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index 4d74e0ef5..88f670f01 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSNotification; -use super::NSNotificationCenter; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSNotification; +use super::__exported::NSNotificationCenter; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 19cbe1b80..0e41c37cc 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -1,9 +1,9 @@ -use super::NSCache; -use super::NSError; -use super::NSLocale; -use super::NSMutableDictionary; -use super::NSRecursiveLock; -use super::NSString; +use super::__exported::NSCache; +use super::__exported::NSError; +use super::__exported::NSLocale; +use super::__exported::NSMutableDictionary; +use super::__exported::NSRecursiveLock; +use super::__exported::NSString; use crate::CoreFoundation::generated::CFNumberFormatter::*; use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] @@ -443,7 +443,7 @@ impl NSNumberFormatter { ] } } -use super::NSDecimalNumberHandler; +use super::__exported::NSDecimalNumberHandler; #[doc = "NSNumberFormatterCompatibility"] impl NSNumberFormatter { pub unsafe fn hasThousandSeparators(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index 448ab9cae..c244f856e 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -1,9 +1,9 @@ -use super::NSCoder; -use super::NSEnumerator; -use super::NSInvocation; -use super::NSMethodSignature; -use super::NSString; -use super::Protocol; +use super::__exported::NSCoder; +use super::__exported::NSEnumerator; +use super::__exported::NSInvocation; +use super::__exported::NSMethodSignature; +use super::__exported::NSString; +use super::__exported::Protocol; use crate::objc::generated::NSObject::*; use crate::Foundation::generated::NSObjCRuntime::*; use crate::Foundation::generated::NSZone::*; diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 0e226fa63..a74ff2bd7 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -1,5 +1,5 @@ -use super::NSArray; -use super::NSSet; +use super::__exported::NSArray; +use super::__exported::NSSet; use crate::dispatch::generated::dispatch::*; use crate::sys::generated::qos::*; use crate::Foundation::generated::NSException::*; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 75e4ac638..9b607bada 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -1,4 +1,4 @@ -use super::NSArray; +use super::__exported::NSArray; use crate::Foundation::generated::NSEnumerator::*; use crate::Foundation::generated::NSIndexSet::*; use crate::Foundation::generated::NSOrderedCollectionChange::*; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 004155e89..94bf615b8 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSIndexSet; -use super::NSSet; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSIndexSet; +use super::__exported::NSSet; +use super::__exported::NSString; use crate::Foundation::generated::NSArray::*; use crate::Foundation::generated::NSEnumerator::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index 4ed97dc83..259ac325b 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 06eb145f1..6bc16bb9d 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -1,9 +1,9 @@ -use super::NSConnection; -use super::NSData; -use super::NSDate; -use super::NSMutableArray; -use super::NSPortMessage; -use super::NSRunLoop; +use super::__exported::NSConnection; +use super::__exported::NSData; +use super::__exported::NSDate; +use super::__exported::NSMutableArray; +use super::__exported::NSPortMessage; +use super::__exported::NSRunLoop; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSRunLoop::*; diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index e1ff74bbb..444b12d5a 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSConnection; -use super::NSPort; +use super::__exported::NSArray; +use super::__exported::NSConnection; +use super::__exported::NSPort; use crate::Foundation::generated::NSCoder::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index 90835e1a8..d1bbfe46a 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSDate; -use super::NSMutableArray; -use super::NSPort; +use super::__exported::NSArray; +use super::__exported::NSDate; +use super::__exported::NSMutableArray; +use super::__exported::NSPort; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index 3f2b86298..19e6453aa 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -1,5 +1,5 @@ -use super::NSPort; -use super::NSString; +use super::__exported::NSPort; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index c266a8a4f..6eea9959a 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -1,5 +1,5 @@ -use super::NSDictionary; -use super::NSString; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSArray::*; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSOrderedSet::*; diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index dbb720039..f8215958e 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 7ef8e9124..1dd7de66d 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -1,10 +1,10 @@ -use super::NSDictionary; -use super::NSLock; -use super::NSMutableDictionary; -use super::NSMutableSet; -use super::NSXPCConnection; -use super::NSURL; -use super::NSUUID; +use super::__exported::NSDictionary; +use super::__exported::NSLock; +use super::__exported::NSMutableDictionary; +use super::__exported::NSMutableSet; +use super::__exported::NSXPCConnection; +use super::__exported::NSURL; +use super::__exported::NSUUID; use crate::Foundation::generated::NSDictionary::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 671e5b69e..88f751d5d 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -1,8 +1,8 @@ -use super::NSData; -use super::NSError; -use super::NSInputStream; -use super::NSOutputStream; -use super::NSString; +use super::__exported::NSData; +use super::__exported::NSError; +use super::__exported::NSInputStream; +use super::__exported::NSOutputStream; +use super::__exported::NSString; use crate::CoreFoundation::generated::CFPropertyList::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 569e43394..50b7efd61 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -1,5 +1,5 @@ -use super::NSInvocation; -use super::NSMethodSignature; +use super::__exported::NSInvocation; +use super::__exported::NSMethodSignature; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 0d4ebccd6..e887fc2a6 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -1,4 +1,4 @@ -use super::NSArray; +use super::__exported::NSArray; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSString::*; use crate::Foundation::generated::NSTextCheckingResult::*; diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index 4ed98f344..d454c3509 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -1,6 +1,6 @@ -use super::NSCalendar; -use super::NSDateComponents; -use super::NSLocale; +use super::__exported::NSCalendar; +use super::__exported::NSDateComponents; +use super::__exported::NSLocale; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index a7ef6fe28..946bbeb79 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSPort; -use super::NSString; -use super::NSTimer; +use super::__exported::NSArray; +use super::__exported::NSPort; +use super::__exported::NSString; +use super::__exported::NSTimer; use crate::CoreFoundation::generated::CFRunLoop::*; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 4544dd21c..4468617de 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -1,6 +1,6 @@ -use super::NSCharacterSet; -use super::NSDictionary; -use super::NSString; +use super::__exported::NSCharacterSet; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index a300456ef..bedd7dff1 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -1,4 +1,4 @@ -use super::NSScriptCommandDescription; +use super::__exported::NSScriptCommandDescription; use crate::Foundation::generated::NSClassDescription::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 3bef5be9c..deede373e 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -1,9 +1,9 @@ -use super::NSAppleEventDescriptor; -use super::NSDictionary; -use super::NSMutableDictionary; -use super::NSScriptCommandDescription; -use super::NSScriptObjectSpecifier; -use super::NSString; +use super::__exported::NSAppleEventDescriptor; +use super::__exported::NSDictionary; +use super::__exported::NSMutableDictionary; +use super::__exported::NSScriptCommandDescription; +use super::__exported::NSScriptObjectSpecifier; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index df15ec17e..2769aa846 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSScriptCommand; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSScriptCommand; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index fa28c4edd..befdb3388 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -1,4 +1,4 @@ -use super::NSConnection; +use super::__exported::NSConnection; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index 90e224ec8..a0f4e7ebb 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -1,9 +1,9 @@ -use super::NSAppleEventDescriptor; -use super::NSArray; -use super::NSNumber; -use super::NSScriptClassDescription; -use super::NSScriptWhoseTest; -use super::NSString; +use super::__exported::NSAppleEventDescriptor; +use super::__exported::NSArray; +use super::__exported::NSNumber; +use super::__exported::NSScriptClassDescription; +use super::__exported::NSScriptWhoseTest; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index 72890957e..d9e3cfea7 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -1,7 +1,7 @@ -use super::NSDictionary; -use super::NSScriptClassDescription; -use super::NSScriptObjectSpecifier; -use super::NSString; +use super::__exported::NSDictionary; +use super::__exported::NSScriptClassDescription; +use super::__exported::NSScriptObjectSpecifier; +use super::__exported::NSString; use crate::Foundation::generated::NSScriptCommand::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 5b8d25371..d6f9ec2cd 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -1,12 +1,12 @@ -use super::NSArray; -use super::NSBundle; -use super::NSData; -use super::NSDictionary; -use super::NSMutableArray; -use super::NSMutableDictionary; -use super::NSMutableSet; -use super::NSScriptClassDescription; -use super::NSScriptCommandDescription; +use super::__exported::NSArray; +use super::__exported::NSBundle; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSMutableArray; +use super::__exported::NSMutableDictionary; +use super::__exported::NSMutableSet; +use super::__exported::NSScriptClassDescription; +use super::__exported::NSScriptCommandDescription; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index 24495a2c4..5d5665a24 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSScriptObjectSpecifier; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSScriptObjectSpecifier; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index e5635ce74..454ded30e 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSEnumerator::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 3fdb410dd..bae01234a 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSOrthography; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSOrthography; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSRange::*; use crate::Foundation::generated::NSTextCheckingResult::*; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 92eecbdee..a32ca3605 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -1,10 +1,10 @@ -use super::NSData; -use super::NSDictionary; -use super::NSError; -use super::NSHost; -use super::NSRunLoop; -use super::NSString; -use super::NSURL; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSError; +use super::__exported::NSHost; +use super::__exported::NSRunLoop; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSError::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index baa8bd3f2..1551a6822 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -1,10 +1,10 @@ -use super::NSArray; -use super::NSCharacterSet; -use super::NSData; -use super::NSDictionary; -use super::NSError; -use super::NSLocale; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSCharacterSet; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSError; +use super::__exported::NSLocale; +use super::__exported::NSURL; use crate::Foundation::generated::NSItemProvider::*; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSRange::*; diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 6b607fed0..c2851feef 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index ac64f56ac..3a48ae4c8 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -1,11 +1,11 @@ -use super::NSArray; -use super::NSDate; -use super::NSDictionary; -use super::NSOrthography; -use super::NSRegularExpression; -use super::NSString; -use super::NSTimeZone; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSDate; +use super::__exported::NSDictionary; +use super::__exported::NSOrthography; +use super::__exported::NSRegularExpression; +use super::__exported::NSString; +use super::__exported::NSTimeZone; +use super::__exported::NSURL; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSRange::*; diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 6caf931bb..d0afb55e3 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -1,8 +1,8 @@ -use super::NSArray; -use super::NSDate; -use super::NSMutableDictionary; -use super::NSNumber; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSDate; +use super::__exported::NSMutableDictionary; +use super::__exported::NSNumber; +use super::__exported::NSString; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 6b0870d5e..354c3b8f7 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -1,9 +1,9 @@ -use super::NSArray; -use super::NSData; -use super::NSDate; -use super::NSDictionary; -use super::NSLocale; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSDate; +use super::__exported::NSDictionary; +use super::__exported::NSLocale; +use super::__exported::NSString; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index ea9d3b77f..f649c59d4 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSData; -use super::NSDictionary; -use super::NSNumber; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSNumber; use crate::Foundation::generated::NSCharacterSet::*; use crate::Foundation::generated::NSItemProvider::*; use crate::Foundation::generated::NSObject::*; diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index e3b0ab2e3..99443062c 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -1,14 +1,14 @@ -use super::NSError; -use super::NSURLCredential; -use super::NSURLProtectionSpace; -use super::NSURLResponse; +use super::__exported::NSError; +use super::__exported::NSURLCredential; +use super::__exported::NSURLProtectionSpace; +use super::__exported::NSURLResponse; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; pub type NSURLAuthenticationChallengeSender = NSObject; -use super::NSURLAuthenticationChallengeInternal; +use super::__exported::NSURLAuthenticationChallengeInternal; extern_class!( #[derive(Debug)] pub struct NSURLAuthenticationChallenge; diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 40928945b..42c841409 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -1,10 +1,10 @@ -use super::NSCachedURLResponseInternal; -use super::NSData; -use super::NSDate; -use super::NSDictionary; -use super::NSURLRequest; -use super::NSURLResponse; -use super::NSURLSessionDataTask; +use super::__exported::NSCachedURLResponseInternal; +use super::__exported::NSData; +use super::__exported::NSDate; +use super::__exported::NSDictionary; +use super::__exported::NSURLRequest; +use super::__exported::NSURLResponse; +use super::__exported::NSURLSessionDataTask; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; @@ -53,8 +53,8 @@ impl NSCachedURLResponse { msg_send![self, storagePolicy] } } -use super::NSURLCacheInternal; -use super::NSURLRequest; +use super::__exported::NSURLCacheInternal; +use super::__exported::NSURLRequest; extern_class!( #[derive(Debug)] pub struct NSURLCache; diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 69118695f..4d69d7dc1 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -1,16 +1,16 @@ -use super::NSArray; -use super::NSCachedURLResponse; -use super::NSData; -use super::NSError; -use super::NSInputStream; -use super::NSOperationQueue; -use super::NSRunLoop; -use super::NSURLAuthenticationChallenge; -use super::NSURLConnectionInternal; -use super::NSURLProtectionSpace; -use super::NSURLRequest; -use super::NSURLResponse; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSCachedURLResponse; +use super::__exported::NSData; +use super::__exported::NSError; +use super::__exported::NSInputStream; +use super::__exported::NSOperationQueue; +use super::__exported::NSRunLoop; +use super::__exported::NSURLAuthenticationChallenge; +use super::__exported::NSURLConnectionInternal; +use super::__exported::NSURLProtectionSpace; +use super::__exported::NSURLRequest; +use super::__exported::NSURLResponse; +use super::__exported::NSURL; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index 1c040bb24..6c71e9b56 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -1,6 +1,6 @@ -use super::NSArray; -use super::NSString; -use super::NSURLCredentialInternal; +use super::__exported::NSArray; +use super::__exported::NSString; +use super::__exported::NSURLCredentialInternal; use crate::Foundation::generated::NSObject::*; use crate::Security::generated::Security::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 7fc4770b6..3b8a94507 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -1,8 +1,8 @@ -use super::NSDictionary; -use super::NSString; -use super::NSURLCredential; -use super::NSURLCredentialStorageInternal; -use super::NSURLSessionTask; +use super::__exported::NSDictionary; +use super::__exported::NSString; +use super::__exported::NSURLCredential; +use super::__exported::NSURLCredentialStorageInternal; +use super::__exported::NSURLSessionTask; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSURLProtectionSpace::*; diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index fd163fb92..8a8a518c3 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -1,11 +1,11 @@ -use super::NSData; -use super::NSError; -use super::NSString; -use super::NSURLAuthenticationChallenge; -use super::NSURLDownloadInternal; -use super::NSURLProtectionSpace; -use super::NSURLRequest; -use super::NSURLResponse; +use super::__exported::NSData; +use super::__exported::NSError; +use super::__exported::NSString; +use super::__exported::NSURLAuthenticationChallenge; +use super::__exported::NSURLDownloadInternal; +use super::__exported::NSURLProtectionSpace; +use super::__exported::NSURLRequest; +use super::__exported::NSURLResponse; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 345d17bc5..be047d09d 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -1,7 +1,7 @@ -use super::NSData; -use super::NSMutableArray; -use super::NSMutableData; -use super::NSURL; +use super::__exported::NSData; +use super::__exported::NSMutableArray; +use super::__exported::NSMutableData; +use super::__exported::NSURL; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 01f2948cc..0d64e860e 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSData; -use super::NSString; -use super::NSURLProtectionSpaceInternal; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSString; +use super::__exported::NSURLProtectionSpaceInternal; use crate::Foundation::generated::NSObject::*; use crate::Security::generated::Security::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index f279c8c50..1fdfa02aa 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -1,12 +1,12 @@ -use super::NSCachedURLResponse; -use super::NSError; -use super::NSMutableURLRequest; -use super::NSURLAuthenticationChallenge; -use super::NSURLConnection; -use super::NSURLProtocolInternal; -use super::NSURLRequest; -use super::NSURLResponse; -use super::NSURLSessionTask; +use super::__exported::NSCachedURLResponse; +use super::__exported::NSError; +use super::__exported::NSMutableURLRequest; +use super::__exported::NSURLAuthenticationChallenge; +use super::__exported::NSURLConnection; +use super::__exported::NSURLProtocolInternal; +use super::__exported::NSURLRequest; +use super::__exported::NSURLResponse; +use super::__exported::NSURLSessionTask; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSURLCache::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index c274450b6..3006c6722 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -1,9 +1,9 @@ -use super::NSData; -use super::NSDictionary; -use super::NSInputStream; -use super::NSString; -use super::NSURLRequestInternal; -use super::NSURL; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSInputStream; +use super::__exported::NSString; +use super::__exported::NSURLRequestInternal; +use super::__exported::NSURL; use crate::Foundation::generated::NSDate::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index 9cf422297..535183816 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -1,8 +1,8 @@ -use super::NSDictionary; -use super::NSString; -use super::NSURLRequest; -use super::NSURLResponseInternal; -use super::NSURL; +use super::__exported::NSDictionary; +use super::__exported::NSString; +use super::__exported::NSURLRequest; +use super::__exported::NSURLResponseInternal; +use super::__exported::NSURL; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; @@ -47,7 +47,7 @@ impl NSURLResponse { msg_send_id![self, suggestedFilename] } } -use super::NSHTTPURLResponseInternal; +use super::__exported::NSHTTPURLResponseInternal; extern_class!( #[derive(Debug)] pub struct NSHTTPURLResponse; diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index e7b8e9282..421bf67d0 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -1,23 +1,23 @@ -use super::NSArray; -use super::NSCachedURLResponse; -use super::NSData; -use super::NSDateInterval; -use super::NSDictionary; -use super::NSError; -use super::NSHTTPCookie; -use super::NSHTTPURLResponse; -use super::NSInputStream; -use super::NSNetService; -use super::NSOperationQueue; -use super::NSOutputStream; -use super::NSString; -use super::NSURLAuthenticationChallenge; -use super::NSURLCache; -use super::NSURLCredential; -use super::NSURLCredentialStorage; -use super::NSURLProtectionSpace; -use super::NSURLResponse; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSCachedURLResponse; +use super::__exported::NSData; +use super::__exported::NSDateInterval; +use super::__exported::NSDictionary; +use super::__exported::NSError; +use super::__exported::NSHTTPCookie; +use super::__exported::NSHTTPURLResponse; +use super::__exported::NSInputStream; +use super::__exported::NSNetService; +use super::__exported::NSOperationQueue; +use super::__exported::NSOutputStream; +use super::__exported::NSString; +use super::__exported::NSURLAuthenticationChallenge; +use super::__exported::NSURLCache; +use super::__exported::NSURLCredential; +use super::__exported::NSURLCredentialStorage; +use super::__exported::NSURLProtectionSpace; +use super::__exported::NSURLResponse; +use super::__exported::NSURL; use crate::Foundation::generated::NSHTTPCookieStorage::*; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSProgress::*; diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index ce6545cff..e1d74f7ed 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSData; -use super::NSDictionary; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index 2dd70a5f4..120995c41 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -1,5 +1,5 @@ -use super::NSArray; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSString; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSRunLoop::*; diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index dda7c9cf4..18abeb03e 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -1,12 +1,12 @@ -use super::NSArray; -use super::NSArray; -use super::NSDictionary; -use super::NSError; -use super::NSInputStream; -use super::NSOutputStream; -use super::NSSet; -use super::NSString; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSError; +use super::__exported::NSInputStream; +use super::__exported::NSOutputStream; +use super::__exported::NSSet; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSObjCRuntime::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index 07404cb65..ccf0c0852 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -1,9 +1,9 @@ -use super::NSArray; -use super::NSData; -use super::NSDictionary; -use super::NSMutableDictionary; -use super::NSString; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSMutableDictionary; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 4a1c76a37..55fa0fb7e 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -1,11 +1,11 @@ -use super::NSArray; -use super::NSAttributedString; -use super::NSDate; -use super::NSDateComponents; -use super::NSDictionary; -use super::NSImage; -use super::NSString; -use super::NSTimeZone; +use super::__exported::NSArray; +use super::__exported::NSAttributedString; +use super::__exported::NSDate; +use super::__exported::NSDateComponents; +use super::__exported::NSDictionary; +use super::__exported::NSImage; +use super::__exported::NSString; +use super::__exported::NSTimeZone; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index f8cf6b214..e92f76026 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -1,11 +1,11 @@ -use super::NSAppleEventDescriptor; -use super::NSArray; -use super::NSDictionary; -use super::NSError; -use super::NSFileHandle; -use super::NSString; -use super::NSXPCConnection; -use super::NSURL; +use super::__exported::NSAppleEventDescriptor; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSError; +use super::__exported::NSFileHandle; +use super::__exported::NSString; +use super::__exported::NSXPCConnection; +use super::__exported::NSURL; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index c6348c14b..7c40c408d 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -1,5 +1,5 @@ -use super::NSDictionary; -use super::NSString; +use super::__exported::NSDictionary; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index 934ee61f4..40dc3a34e 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -1,5 +1,5 @@ -use super::NSArray; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index 79ebee2d6..8c4342365 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSData; -use super::NSMutableDictionary; -use super::NSXMLDTDNode; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSMutableDictionary; +use super::__exported::NSXMLDTDNode; use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index 150087191..a9e761ef6 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -1,7 +1,7 @@ -use super::NSArray; -use super::NSData; -use super::NSDictionary; -use super::NSXMLDTD; +use super::__exported::NSArray; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSXMLDTD; use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index 3037c78f0..02351f01b 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -1,8 +1,8 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSEnumerator; -use super::NSMutableArray; -use super::NSString; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSEnumerator; +use super::__exported::NSMutableArray; +use super::__exported::NSString; use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 1a4e87890..6d7d0f3f6 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -1,10 +1,10 @@ -use super::NSArray; -use super::NSDictionary; -use super::NSError; -use super::NSString; -use super::NSXMLDocument; -use super::NSXMLElement; -use super::NSURL; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSError; +use super::__exported::NSString; +use super::__exported::NSXMLDocument; +use super::__exported::NSXMLElement; +use super::__exported::NSURL; use crate::Foundation::generated::NSObject::*; use crate::Foundation::generated::NSXMLNodeOptions::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 743f64d33..a38055a69 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -1,10 +1,10 @@ -use super::NSData; -use super::NSDictionary; -use super::NSError; -use super::NSInputStream; -use super::NSSet; -use super::NSString; -use super::NSURL; +use super::__exported::NSData; +use super::__exported::NSDictionary; +use super::__exported::NSError; +use super::__exported::NSInputStream; +use super::__exported::NSSet; +use super::__exported::NSString; +use super::__exported::NSURL; use crate::Foundation::generated::NSError::*; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 414711ff0..0c1a1c8b5 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -1,9 +1,9 @@ -use super::NSError; -use super::NSLock; -use super::NSMutableDictionary; -use super::NSOperationQueue; -use super::NSSet; -use super::NSString; +use super::__exported::NSError; +use super::__exported::NSLock; +use super::__exported::NSMutableDictionary; +use super::__exported::NSOperationQueue; +use super::__exported::NSSet; +use super::__exported::NSString; use crate::bsm::generated::audit::*; use crate::dispatch::generated::dispatch::*; use crate::xpc::generated::xpc::*; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 2005b14ab..6d40366f2 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -1,353 +1,356 @@ -mod NSAffineTransform; -pub use self::NSAffineTransform::NSAffineTransform; -mod NSAppleEventDescriptor; -pub use self::NSAppleEventDescriptor::NSAppleEventDescriptor; -mod NSAppleEventManager; -pub use self::NSAppleEventManager::NSAppleEventManager; -mod NSAppleScript; -pub use self::NSAppleScript::NSAppleScript; -mod NSArchiver; -pub use self::NSArchiver::{NSArchiver, NSUnarchiver}; -mod NSArray; -pub use self::NSArray::{NSArray, NSMutableArray}; -mod NSAttributedString; -pub use self::NSAttributedString::{ - NSAttributedString, NSAttributedStringMarkdownParsingOptions, NSMutableAttributedString, - NSPresentationIntent, -}; -mod NSAutoreleasePool; -pub use self::NSAutoreleasePool::NSAutoreleasePool; -mod NSBackgroundActivityScheduler; -pub use self::NSBackgroundActivityScheduler::NSBackgroundActivityScheduler; -mod NSBundle; -pub use self::NSBundle::{NSBundle, NSBundleResourceRequest}; -mod NSByteCountFormatter; -pub use self::NSByteCountFormatter::NSByteCountFormatter; -mod NSCache; -pub use self::NSCache::{NSCache, NSCacheDelegate}; -mod NSCalendar; -pub use self::NSCalendar::{NSCalendar, NSDateComponents}; -mod NSCalendarDate; -pub use self::NSCalendarDate::NSCalendarDate; -mod NSCharacterSet; -pub use self::NSCharacterSet::{NSCharacterSet, NSMutableCharacterSet}; -mod NSClassDescription; -pub use self::NSClassDescription::NSClassDescription; -mod NSCoder; -pub use self::NSCoder::NSCoder; -mod NSComparisonPredicate; -pub use self::NSComparisonPredicate::NSComparisonPredicate; -mod NSCompoundPredicate; -pub use self::NSCompoundPredicate::NSCompoundPredicate; -mod NSConnection; -pub use self::NSConnection::{NSConnection, NSConnectionDelegate, NSDistantObjectRequest}; -mod NSData; -pub use self::NSData::{NSData, NSMutableData, NSPurgeableData}; -mod NSDate; -pub use self::NSDate::NSDate; -mod NSDateComponentsFormatter; -pub use self::NSDateComponentsFormatter::NSDateComponentsFormatter; -mod NSDateFormatter; -pub use self::NSDateFormatter::NSDateFormatter; -mod NSDateInterval; -pub use self::NSDateInterval::NSDateInterval; -mod NSDateIntervalFormatter; -pub use self::NSDateIntervalFormatter::NSDateIntervalFormatter; -mod NSDecimalNumber; -pub use self::NSDecimalNumber::{ - NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberHandler, -}; -mod NSDictionary; -pub use self::NSDictionary::{NSDictionary, NSMutableDictionary}; -mod NSDistantObject; -pub use self::NSDistantObject::NSDistantObject; -mod NSDistributedLock; -pub use self::NSDistributedLock::NSDistributedLock; -mod NSDistributedNotificationCenter; -pub use self::NSDistributedNotificationCenter::NSDistributedNotificationCenter; -mod NSEnergyFormatter; -pub use self::NSEnergyFormatter::NSEnergyFormatter; -mod NSEnumerator; -pub use self::NSEnumerator::{NSEnumerator, NSFastEnumeration}; -mod NSError; -pub use self::NSError::NSError; -mod NSException; -pub use self::NSException::{NSAssertionHandler, NSException}; -mod NSExpression; -pub use self::NSExpression::NSExpression; -mod NSExtensionContext; -pub use self::NSExtensionContext::NSExtensionContext; -mod NSExtensionItem; -pub use self::NSExtensionItem::NSExtensionItem; -mod NSExtensionRequestHandling; -pub use self::NSExtensionRequestHandling::NSExtensionRequestHandling; -mod NSFileCoordinator; -pub use self::NSFileCoordinator::{NSFileAccessIntent, NSFileCoordinator}; -mod NSFileHandle; -pub use self::NSFileHandle::{NSFileHandle, NSPipe}; -mod NSFileManager; -pub use self::NSFileManager::{ - NSDirectoryEnumerator, NSFileManager, NSFileManagerDelegate, NSFileProviderService, -}; -mod NSFilePresenter; -pub use self::NSFilePresenter::NSFilePresenter; -mod NSFileVersion; -pub use self::NSFileVersion::NSFileVersion; -mod NSFileWrapper; -pub use self::NSFileWrapper::NSFileWrapper; -mod NSFormatter; -pub use self::NSFormatter::NSFormatter; -mod NSGarbageCollector; -pub use self::NSGarbageCollector::NSGarbageCollector; -mod NSHTTPCookie; -pub use self::NSHTTPCookie::NSHTTPCookie; -mod NSHTTPCookieStorage; -pub use self::NSHTTPCookieStorage::NSHTTPCookieStorage; -mod NSHashTable; -pub use self::NSHashTable::NSHashTable; -mod NSHost; -pub use self::NSHost::NSHost; -mod NSISO8601DateFormatter; -pub use self::NSISO8601DateFormatter::NSISO8601DateFormatter; -mod NSIndexPath; -pub use self::NSIndexPath::NSIndexPath; -mod NSIndexSet; -pub use self::NSIndexSet::{NSIndexSet, NSMutableIndexSet}; -mod NSInflectionRule; -pub use self::NSInflectionRule::{NSInflectionRule, NSInflectionRuleExplicit}; -mod NSInvocation; -pub use self::NSInvocation::NSInvocation; -mod NSItemProvider; -pub use self::NSItemProvider::{NSItemProvider, NSItemProviderReading, NSItemProviderWriting}; -mod NSJSONSerialization; -pub use self::NSJSONSerialization::NSJSONSerialization; -mod NSKeyedArchiver; -pub use self::NSKeyedArchiver::{ - NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, NSKeyedUnarchiverDelegate, -}; -mod NSLengthFormatter; -pub use self::NSLengthFormatter::NSLengthFormatter; -mod NSLinguisticTagger; -pub use self::NSLinguisticTagger::NSLinguisticTagger; -mod NSListFormatter; -pub use self::NSListFormatter::NSListFormatter; -mod NSLocale; -pub use self::NSLocale::NSLocale; -mod NSLock; -pub use self::NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; -mod NSMapTable; -pub use self::NSMapTable::NSMapTable; -mod NSMassFormatter; -pub use self::NSMassFormatter::NSMassFormatter; -mod NSMeasurement; -pub use self::NSMeasurement::NSMeasurement; -mod NSMeasurementFormatter; -pub use self::NSMeasurementFormatter::NSMeasurementFormatter; -mod NSMetadata; -pub use self::NSMetadata::{ - NSMetadataItem, NSMetadataQuery, NSMetadataQueryAttributeValueTuple, NSMetadataQueryDelegate, - NSMetadataQueryResultGroup, -}; -mod NSMethodSignature; -pub use self::NSMethodSignature::NSMethodSignature; -mod NSMorphology; -pub use self::NSMorphology::{NSMorphology, NSMorphologyCustomPronoun}; -mod NSNetServices; -pub use self::NSNetServices::{ - NSNetService, NSNetServiceBrowser, NSNetServiceBrowserDelegate, NSNetServiceDelegate, -}; -mod NSNotification; -pub use self::NSNotification::{NSNotification, NSNotificationCenter}; -mod NSNotificationQueue; -pub use self::NSNotificationQueue::NSNotificationQueue; -mod NSNull; -pub use self::NSNull::NSNull; -mod NSNumberFormatter; -pub use self::NSNumberFormatter::NSNumberFormatter; -mod NSObject; -pub use self::NSObject::{ - NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, -}; -mod NSOperation; -pub use self::NSOperation::{ - NSBlockOperation, NSInvocationOperation, NSOperation, NSOperationQueue, -}; -mod NSOrderedCollectionChange; -pub use self::NSOrderedCollectionChange::NSOrderedCollectionChange; -mod NSOrderedCollectionDifference; -pub use self::NSOrderedCollectionDifference::NSOrderedCollectionDifference; -mod NSOrderedSet; -pub use self::NSOrderedSet::{NSMutableOrderedSet, NSOrderedSet}; -mod NSOrthography; -pub use self::NSOrthography::NSOrthography; -mod NSPersonNameComponents; -pub use self::NSPersonNameComponents::NSPersonNameComponents; -mod NSPersonNameComponentsFormatter; -pub use self::NSPersonNameComponentsFormatter::NSPersonNameComponentsFormatter; -mod NSPointerArray; -pub use self::NSPointerArray::NSPointerArray; -mod NSPointerFunctions; -pub use self::NSPointerFunctions::NSPointerFunctions; -mod NSPort; -pub use self::NSPort::{ - NSMachPort, NSMachPortDelegate, NSMessagePort, NSPort, NSPortDelegate, NSSocketPort, -}; -mod NSPortCoder; -pub use self::NSPortCoder::NSPortCoder; -mod NSPortMessage; -pub use self::NSPortMessage::NSPortMessage; -mod NSPortNameServer; -pub use self::NSPortNameServer::{ - NSMachBootstrapServer, NSMessagePortNameServer, NSPortNameServer, NSSocketPortNameServer, -}; -mod NSPredicate; -pub use self::NSPredicate::NSPredicate; -mod NSProcessInfo; -pub use self::NSProcessInfo::NSProcessInfo; -mod NSProgress; -pub use self::NSProgress::{NSProgress, NSProgressReporting}; -mod NSPropertyList; -pub use self::NSPropertyList::NSPropertyListSerialization; -mod NSProtocolChecker; -pub use self::NSProtocolChecker::NSProtocolChecker; -mod NSProxy; -pub use self::NSProxy::NSProxy; -mod NSRegularExpression; -pub use self::NSRegularExpression::{NSDataDetector, NSRegularExpression}; -mod NSRelativeDateTimeFormatter; -pub use self::NSRelativeDateTimeFormatter::NSRelativeDateTimeFormatter; -mod NSRunLoop; -pub use self::NSRunLoop::NSRunLoop; -mod NSScanner; -pub use self::NSScanner::NSScanner; -mod NSScriptClassDescription; -pub use self::NSScriptClassDescription::NSScriptClassDescription; -mod NSScriptCoercionHandler; -pub use self::NSScriptCoercionHandler::NSScriptCoercionHandler; -mod NSScriptCommand; -pub use self::NSScriptCommand::NSScriptCommand; -mod NSScriptCommandDescription; -pub use self::NSScriptCommandDescription::NSScriptCommandDescription; -mod NSScriptExecutionContext; -pub use self::NSScriptExecutionContext::NSScriptExecutionContext; -mod NSScriptObjectSpecifiers; -pub use self::NSScriptObjectSpecifiers::{ - NSIndexSpecifier, NSMiddleSpecifier, NSNameSpecifier, NSPositionalSpecifier, - NSPropertySpecifier, NSRandomSpecifier, NSRangeSpecifier, NSRelativeSpecifier, - NSScriptObjectSpecifier, NSUniqueIDSpecifier, NSWhoseSpecifier, -}; -mod NSScriptStandardSuiteCommands; -pub use self::NSScriptStandardSuiteCommands::{ - NSCloneCommand, NSCloseCommand, NSCountCommand, NSCreateCommand, NSDeleteCommand, - NSExistsCommand, NSGetCommand, NSMoveCommand, NSQuitCommand, NSSetCommand, -}; -mod NSScriptSuiteRegistry; -pub use self::NSScriptSuiteRegistry::NSScriptSuiteRegistry; -mod NSScriptWhoseTests; -pub use self::NSScriptWhoseTests::{NSLogicalTest, NSScriptWhoseTest, NSSpecifierTest}; -mod NSSet; -pub use self::NSSet::{NSCountedSet, NSMutableSet, NSSet}; -mod NSSortDescriptor; -pub use self::NSSortDescriptor::NSSortDescriptor; -mod NSSpellServer; -pub use self::NSSpellServer::{NSSpellServer, NSSpellServerDelegate}; -mod NSStream; -pub use self::NSStream::{NSInputStream, NSOutputStream, NSStream, NSStreamDelegate}; -mod NSString; -pub use self::NSString::{NSConstantString, NSMutableString, NSSimpleCString, NSString}; -mod NSTask; -pub use self::NSTask::NSTask; -mod NSTextCheckingResult; -pub use self::NSTextCheckingResult::NSTextCheckingResult; -mod NSThread; -pub use self::NSThread::NSThread; -mod NSTimeZone; -pub use self::NSTimeZone::NSTimeZone; -mod NSTimer; -pub use self::NSTimer::NSTimer; -mod NSURL; -pub use self::NSURL::{NSFileSecurity, NSURLComponents, NSURLQueryItem, NSURL}; -mod NSURLAuthenticationChallenge; -pub use self::NSURLAuthenticationChallenge::{ - NSURLAuthenticationChallenge, NSURLAuthenticationChallengeSender, -}; -mod NSURLCache; -pub use self::NSURLCache::{NSCachedURLResponse, NSURLCache}; -mod NSURLConnection; -pub use self::NSURLConnection::{ - NSURLConnection, NSURLConnectionDataDelegate, NSURLConnectionDelegate, - NSURLConnectionDownloadDelegate, -}; -mod NSURLCredential; -pub use self::NSURLCredential::NSURLCredential; -mod NSURLCredentialStorage; -pub use self::NSURLCredentialStorage::NSURLCredentialStorage; -mod NSURLDownload; -pub use self::NSURLDownload::{NSURLDownload, NSURLDownloadDelegate}; -mod NSURLHandle; -pub use self::NSURLHandle::{NSURLHandle, NSURLHandleClient}; -mod NSURLProtectionSpace; -pub use self::NSURLProtectionSpace::NSURLProtectionSpace; -mod NSURLProtocol; -pub use self::NSURLProtocol::{NSURLProtocol, NSURLProtocolClient}; -mod NSURLRequest; -pub use self::NSURLRequest::{NSMutableURLRequest, NSURLRequest}; -mod NSURLResponse; -pub use self::NSURLResponse::{NSHTTPURLResponse, NSURLResponse}; -mod NSURLSession; -pub use self::NSURLSession::{ - NSURLSession, NSURLSessionConfiguration, NSURLSessionDataDelegate, NSURLSessionDataTask, - NSURLSessionDelegate, NSURLSessionDownloadDelegate, NSURLSessionDownloadTask, - NSURLSessionStreamDelegate, NSURLSessionStreamTask, NSURLSessionTask, NSURLSessionTaskDelegate, - NSURLSessionTaskMetrics, NSURLSessionTaskTransactionMetrics, NSURLSessionUploadTask, - NSURLSessionWebSocketDelegate, NSURLSessionWebSocketMessage, NSURLSessionWebSocketTask, -}; -mod NSUUID; -pub use self::NSUUID::NSUUID; -mod NSUbiquitousKeyValueStore; -pub use self::NSUbiquitousKeyValueStore::NSUbiquitousKeyValueStore; -mod NSUndoManager; -pub use self::NSUndoManager::NSUndoManager; -mod NSUnit; -pub use self::NSUnit::{ - NSDimension, NSUnit, NSUnitAcceleration, NSUnitAngle, NSUnitArea, NSUnitConcentrationMass, - NSUnitConverter, NSUnitConverterLinear, NSUnitDispersion, NSUnitDuration, NSUnitElectricCharge, - NSUnitElectricCurrent, NSUnitElectricPotentialDifference, NSUnitElectricResistance, - NSUnitEnergy, NSUnitFrequency, NSUnitFuelEfficiency, NSUnitIlluminance, - NSUnitInformationStorage, NSUnitLength, NSUnitMass, NSUnitPower, NSUnitPressure, NSUnitSpeed, - NSUnitTemperature, NSUnitVolume, -}; -mod NSUserActivity; -pub use self::NSUserActivity::{NSUserActivity, NSUserActivityDelegate}; -mod NSUserDefaults; -pub use self::NSUserDefaults::NSUserDefaults; -mod NSUserNotification; -pub use self::NSUserNotification::{ - NSUserNotification, NSUserNotificationAction, NSUserNotificationCenter, - NSUserNotificationCenterDelegate, -}; -mod NSUserScriptTask; -pub use self::NSUserScriptTask::{ - NSUserAppleScriptTask, NSUserAutomatorTask, NSUserScriptTask, NSUserUnixTask, -}; -mod NSValue; -pub use self::NSValue::{NSNumber, NSValue}; -mod NSValueTransformer; -pub use self::NSValueTransformer::{NSSecureUnarchiveFromDataTransformer, NSValueTransformer}; -mod NSXMLDTD; -pub use self::NSXMLDTD::NSXMLDTD; -mod NSXMLDTDNode; -pub use self::NSXMLDTDNode::NSXMLDTDNode; -mod NSXMLDocument; -pub use self::NSXMLDocument::NSXMLDocument; -mod NSXMLElement; -pub use self::NSXMLElement::NSXMLElement; -mod NSXMLNode; -pub use self::NSXMLNode::NSXMLNode; -mod NSXMLParser; -pub use self::NSXMLParser::{NSXMLParser, NSXMLParserDelegate}; -mod NSXPCConnection; -pub use self::NSXPCConnection::{ - NSXPCCoder, NSXPCConnection, NSXPCInterface, NSXPCListener, NSXPCListenerDelegate, - NSXPCListenerEndpoint, NSXPCProxyCreating, -}; +pub(crate) mod NSAffineTransform; +pub(crate) mod NSAppleEventDescriptor; +pub(crate) mod NSAppleEventManager; +pub(crate) mod NSAppleScript; +pub(crate) mod NSArchiver; +pub(crate) mod NSArray; +pub(crate) mod NSAttributedString; +pub(crate) mod NSAutoreleasePool; +pub(crate) mod NSBackgroundActivityScheduler; +pub(crate) mod NSBundle; +pub(crate) mod NSByteCountFormatter; +pub(crate) mod NSCache; +pub(crate) mod NSCalendar; +pub(crate) mod NSCalendarDate; +pub(crate) mod NSCharacterSet; +pub(crate) mod NSClassDescription; +pub(crate) mod NSCoder; +pub(crate) mod NSComparisonPredicate; +pub(crate) mod NSCompoundPredicate; +pub(crate) mod NSConnection; +pub(crate) mod NSData; +pub(crate) mod NSDate; +pub(crate) mod NSDateComponentsFormatter; +pub(crate) mod NSDateFormatter; +pub(crate) mod NSDateInterval; +pub(crate) mod NSDateIntervalFormatter; +pub(crate) mod NSDecimalNumber; +pub(crate) mod NSDictionary; +pub(crate) mod NSDistantObject; +pub(crate) mod NSDistributedLock; +pub(crate) mod NSDistributedNotificationCenter; +pub(crate) mod NSEnergyFormatter; +pub(crate) mod NSEnumerator; +pub(crate) mod NSError; +pub(crate) mod NSException; +pub(crate) mod NSExpression; +pub(crate) mod NSExtensionContext; +pub(crate) mod NSExtensionItem; +pub(crate) mod NSExtensionRequestHandling; +pub(crate) mod NSFileCoordinator; +pub(crate) mod NSFileHandle; +pub(crate) mod NSFileManager; +pub(crate) mod NSFilePresenter; +pub(crate) mod NSFileVersion; +pub(crate) mod NSFileWrapper; +pub(crate) mod NSFormatter; +pub(crate) mod NSGarbageCollector; +pub(crate) mod NSHTTPCookie; +pub(crate) mod NSHTTPCookieStorage; +pub(crate) mod NSHashTable; +pub(crate) mod NSHost; +pub(crate) mod NSISO8601DateFormatter; +pub(crate) mod NSIndexPath; +pub(crate) mod NSIndexSet; +pub(crate) mod NSInflectionRule; +pub(crate) mod NSInvocation; +pub(crate) mod NSItemProvider; +pub(crate) mod NSJSONSerialization; +pub(crate) mod NSKeyedArchiver; +pub(crate) mod NSLengthFormatter; +pub(crate) mod NSLinguisticTagger; +pub(crate) mod NSListFormatter; +pub(crate) mod NSLocale; +pub(crate) mod NSLock; +pub(crate) mod NSMapTable; +pub(crate) mod NSMassFormatter; +pub(crate) mod NSMeasurement; +pub(crate) mod NSMeasurementFormatter; +pub(crate) mod NSMetadata; +pub(crate) mod NSMethodSignature; +pub(crate) mod NSMorphology; +pub(crate) mod NSNetServices; +pub(crate) mod NSNotification; +pub(crate) mod NSNotificationQueue; +pub(crate) mod NSNull; +pub(crate) mod NSNumberFormatter; +pub(crate) mod NSObject; +pub(crate) mod NSOperation; +pub(crate) mod NSOrderedCollectionChange; +pub(crate) mod NSOrderedCollectionDifference; +pub(crate) mod NSOrderedSet; +pub(crate) mod NSOrthography; +pub(crate) mod NSPersonNameComponents; +pub(crate) mod NSPersonNameComponentsFormatter; +pub(crate) mod NSPointerArray; +pub(crate) mod NSPointerFunctions; +pub(crate) mod NSPort; +pub(crate) mod NSPortCoder; +pub(crate) mod NSPortMessage; +pub(crate) mod NSPortNameServer; +pub(crate) mod NSPredicate; +pub(crate) mod NSProcessInfo; +pub(crate) mod NSProgress; +pub(crate) mod NSPropertyList; +pub(crate) mod NSProtocolChecker; +pub(crate) mod NSProxy; +pub(crate) mod NSRegularExpression; +pub(crate) mod NSRelativeDateTimeFormatter; +pub(crate) mod NSRunLoop; +pub(crate) mod NSScanner; +pub(crate) mod NSScriptClassDescription; +pub(crate) mod NSScriptCoercionHandler; +pub(crate) mod NSScriptCommand; +pub(crate) mod NSScriptCommandDescription; +pub(crate) mod NSScriptExecutionContext; +pub(crate) mod NSScriptObjectSpecifiers; +pub(crate) mod NSScriptStandardSuiteCommands; +pub(crate) mod NSScriptSuiteRegistry; +pub(crate) mod NSScriptWhoseTests; +pub(crate) mod NSSet; +pub(crate) mod NSSortDescriptor; +pub(crate) mod NSSpellServer; +pub(crate) mod NSStream; +pub(crate) mod NSString; +pub(crate) mod NSTask; +pub(crate) mod NSTextCheckingResult; +pub(crate) mod NSThread; +pub(crate) mod NSTimeZone; +pub(crate) mod NSTimer; +pub(crate) mod NSURL; +pub(crate) mod NSURLAuthenticationChallenge; +pub(crate) mod NSURLCache; +pub(crate) mod NSURLConnection; +pub(crate) mod NSURLCredential; +pub(crate) mod NSURLCredentialStorage; +pub(crate) mod NSURLDownload; +pub(crate) mod NSURLHandle; +pub(crate) mod NSURLProtectionSpace; +pub(crate) mod NSURLProtocol; +pub(crate) mod NSURLRequest; +pub(crate) mod NSURLResponse; +pub(crate) mod NSURLSession; +pub(crate) mod NSUUID; +pub(crate) mod NSUbiquitousKeyValueStore; +pub(crate) mod NSUndoManager; +pub(crate) mod NSUnit; +pub(crate) mod NSUserActivity; +pub(crate) mod NSUserDefaults; +pub(crate) mod NSUserNotification; +pub(crate) mod NSUserScriptTask; +pub(crate) mod NSValue; +pub(crate) mod NSValueTransformer; +pub(crate) mod NSXMLDTD; +pub(crate) mod NSXMLDTDNode; +pub(crate) mod NSXMLDocument; +pub(crate) mod NSXMLElement; +pub(crate) mod NSXMLNode; +pub(crate) mod NSXMLParser; +pub(crate) mod NSXPCConnection; +mod __exported { + pub use super::NSAffineTransform::NSAffineTransform; + pub use super::NSAppleEventDescriptor::NSAppleEventDescriptor; + pub use super::NSAppleEventManager::NSAppleEventManager; + pub use super::NSAppleScript::NSAppleScript; + pub use super::NSArchiver::{NSArchiver, NSUnarchiver}; + pub use super::NSArray::{NSArray, NSMutableArray}; + pub use super::NSAttributedString::{ + NSAttributedString, NSAttributedStringMarkdownParsingOptions, NSMutableAttributedString, + NSPresentationIntent, + }; + pub use super::NSAutoreleasePool::NSAutoreleasePool; + pub use super::NSBackgroundActivityScheduler::NSBackgroundActivityScheduler; + pub use super::NSBundle::{NSBundle, NSBundleResourceRequest}; + pub use super::NSByteCountFormatter::NSByteCountFormatter; + pub use super::NSCache::{NSCache, NSCacheDelegate}; + pub use super::NSCalendar::{NSCalendar, NSDateComponents}; + pub use super::NSCalendarDate::NSCalendarDate; + pub use super::NSCharacterSet::{NSCharacterSet, NSMutableCharacterSet}; + pub use super::NSClassDescription::NSClassDescription; + pub use super::NSCoder::NSCoder; + pub use super::NSComparisonPredicate::NSComparisonPredicate; + pub use super::NSCompoundPredicate::NSCompoundPredicate; + pub use super::NSConnection::{NSConnection, NSConnectionDelegate, NSDistantObjectRequest}; + pub use super::NSData::{NSData, NSMutableData, NSPurgeableData}; + pub use super::NSDate::NSDate; + pub use super::NSDateComponentsFormatter::NSDateComponentsFormatter; + pub use super::NSDateFormatter::NSDateFormatter; + pub use super::NSDateInterval::NSDateInterval; + pub use super::NSDateIntervalFormatter::NSDateIntervalFormatter; + pub use super::NSDecimalNumber::{ + NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberHandler, + }; + pub use super::NSDictionary::{NSDictionary, NSMutableDictionary}; + pub use super::NSDistantObject::NSDistantObject; + pub use super::NSDistributedLock::NSDistributedLock; + pub use super::NSDistributedNotificationCenter::NSDistributedNotificationCenter; + pub use super::NSEnergyFormatter::NSEnergyFormatter; + pub use super::NSEnumerator::{NSEnumerator, NSFastEnumeration}; + pub use super::NSError::NSError; + pub use super::NSException::{NSAssertionHandler, NSException}; + pub use super::NSExpression::NSExpression; + pub use super::NSExtensionContext::NSExtensionContext; + pub use super::NSExtensionItem::NSExtensionItem; + pub use super::NSExtensionRequestHandling::NSExtensionRequestHandling; + pub use super::NSFileCoordinator::{NSFileAccessIntent, NSFileCoordinator}; + pub use super::NSFileHandle::{NSFileHandle, NSPipe}; + pub use super::NSFileManager::{ + NSDirectoryEnumerator, NSFileManager, NSFileManagerDelegate, NSFileProviderService, + }; + pub use super::NSFilePresenter::NSFilePresenter; + pub use super::NSFileVersion::NSFileVersion; + pub use super::NSFileWrapper::NSFileWrapper; + pub use super::NSFormatter::NSFormatter; + pub use super::NSGarbageCollector::NSGarbageCollector; + pub use super::NSHTTPCookie::NSHTTPCookie; + pub use super::NSHTTPCookieStorage::NSHTTPCookieStorage; + pub use super::NSHashTable::NSHashTable; + pub use super::NSHost::NSHost; + pub use super::NSISO8601DateFormatter::NSISO8601DateFormatter; + pub use super::NSIndexPath::NSIndexPath; + pub use super::NSIndexSet::{NSIndexSet, NSMutableIndexSet}; + pub use super::NSInflectionRule::{NSInflectionRule, NSInflectionRuleExplicit}; + pub use super::NSInvocation::NSInvocation; + pub use super::NSItemProvider::{NSItemProvider, NSItemProviderReading, NSItemProviderWriting}; + pub use super::NSJSONSerialization::NSJSONSerialization; + pub use super::NSKeyedArchiver::{ + NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, NSKeyedUnarchiverDelegate, + }; + pub use super::NSLengthFormatter::NSLengthFormatter; + pub use super::NSLinguisticTagger::NSLinguisticTagger; + pub use super::NSListFormatter::NSListFormatter; + pub use super::NSLocale::NSLocale; + pub use super::NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; + pub use super::NSMapTable::NSMapTable; + pub use super::NSMassFormatter::NSMassFormatter; + pub use super::NSMeasurement::NSMeasurement; + pub use super::NSMeasurementFormatter::NSMeasurementFormatter; + pub use super::NSMetadata::{ + NSMetadataItem, NSMetadataQuery, NSMetadataQueryAttributeValueTuple, + NSMetadataQueryDelegate, NSMetadataQueryResultGroup, + }; + pub use super::NSMethodSignature::NSMethodSignature; + pub use super::NSMorphology::{NSMorphology, NSMorphologyCustomPronoun}; + pub use super::NSNetServices::{ + NSNetService, NSNetServiceBrowser, NSNetServiceBrowserDelegate, NSNetServiceDelegate, + }; + pub use super::NSNotification::{NSNotification, NSNotificationCenter}; + pub use super::NSNotificationQueue::NSNotificationQueue; + pub use super::NSNull::NSNull; + pub use super::NSNumberFormatter::NSNumberFormatter; + pub use super::NSObject::{ + NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, + }; + pub use super::NSOperation::{ + NSBlockOperation, NSInvocationOperation, NSOperation, NSOperationQueue, + }; + pub use super::NSOrderedCollectionChange::NSOrderedCollectionChange; + pub use super::NSOrderedCollectionDifference::NSOrderedCollectionDifference; + pub use super::NSOrderedSet::{NSMutableOrderedSet, NSOrderedSet}; + pub use super::NSOrthography::NSOrthography; + pub use super::NSPersonNameComponents::NSPersonNameComponents; + pub use super::NSPersonNameComponentsFormatter::NSPersonNameComponentsFormatter; + pub use super::NSPointerArray::NSPointerArray; + pub use super::NSPointerFunctions::NSPointerFunctions; + pub use super::NSPort::{ + NSMachPort, NSMachPortDelegate, NSMessagePort, NSPort, NSPortDelegate, NSSocketPort, + }; + pub use super::NSPortCoder::NSPortCoder; + pub use super::NSPortMessage::NSPortMessage; + pub use super::NSPortNameServer::{ + NSMachBootstrapServer, NSMessagePortNameServer, NSPortNameServer, NSSocketPortNameServer, + }; + pub use super::NSPredicate::NSPredicate; + pub use super::NSProcessInfo::NSProcessInfo; + pub use super::NSProgress::{NSProgress, NSProgressReporting}; + pub use super::NSPropertyList::NSPropertyListSerialization; + pub use super::NSProtocolChecker::NSProtocolChecker; + pub use super::NSProxy::NSProxy; + pub use super::NSRegularExpression::{NSDataDetector, NSRegularExpression}; + pub use super::NSRelativeDateTimeFormatter::NSRelativeDateTimeFormatter; + pub use super::NSRunLoop::NSRunLoop; + pub use super::NSScanner::NSScanner; + pub use super::NSScriptClassDescription::NSScriptClassDescription; + pub use super::NSScriptCoercionHandler::NSScriptCoercionHandler; + pub use super::NSScriptCommand::NSScriptCommand; + pub use super::NSScriptCommandDescription::NSScriptCommandDescription; + pub use super::NSScriptExecutionContext::NSScriptExecutionContext; + pub use super::NSScriptObjectSpecifiers::{ + NSIndexSpecifier, NSMiddleSpecifier, NSNameSpecifier, NSPositionalSpecifier, + NSPropertySpecifier, NSRandomSpecifier, NSRangeSpecifier, NSRelativeSpecifier, + NSScriptObjectSpecifier, NSUniqueIDSpecifier, NSWhoseSpecifier, + }; + pub use super::NSScriptStandardSuiteCommands::{ + NSCloneCommand, NSCloseCommand, NSCountCommand, NSCreateCommand, NSDeleteCommand, + NSExistsCommand, NSGetCommand, NSMoveCommand, NSQuitCommand, NSSetCommand, + }; + pub use super::NSScriptSuiteRegistry::NSScriptSuiteRegistry; + pub use super::NSScriptWhoseTests::{NSLogicalTest, NSScriptWhoseTest, NSSpecifierTest}; + pub use super::NSSet::{NSCountedSet, NSMutableSet, NSSet}; + pub use super::NSSortDescriptor::NSSortDescriptor; + pub use super::NSSpellServer::{NSSpellServer, NSSpellServerDelegate}; + pub use super::NSStream::{NSInputStream, NSOutputStream, NSStream, NSStreamDelegate}; + pub use super::NSString::{NSConstantString, NSMutableString, NSSimpleCString, NSString}; + pub use super::NSTask::NSTask; + pub use super::NSTextCheckingResult::NSTextCheckingResult; + pub use super::NSThread::NSThread; + pub use super::NSTimeZone::NSTimeZone; + pub use super::NSTimer::NSTimer; + pub use super::NSURLAuthenticationChallenge::{ + NSURLAuthenticationChallenge, NSURLAuthenticationChallengeSender, + }; + pub use super::NSURLCache::{NSCachedURLResponse, NSURLCache}; + pub use super::NSURLConnection::{ + NSURLConnection, NSURLConnectionDataDelegate, NSURLConnectionDelegate, + NSURLConnectionDownloadDelegate, + }; + pub use super::NSURLCredential::NSURLCredential; + pub use super::NSURLCredentialStorage::NSURLCredentialStorage; + pub use super::NSURLDownload::{NSURLDownload, NSURLDownloadDelegate}; + pub use super::NSURLHandle::{NSURLHandle, NSURLHandleClient}; + pub use super::NSURLProtectionSpace::NSURLProtectionSpace; + pub use super::NSURLProtocol::{NSURLProtocol, NSURLProtocolClient}; + pub use super::NSURLRequest::{NSMutableURLRequest, NSURLRequest}; + pub use super::NSURLResponse::{NSHTTPURLResponse, NSURLResponse}; + pub use super::NSURLSession::{ + NSURLSession, NSURLSessionConfiguration, NSURLSessionDataDelegate, NSURLSessionDataTask, + NSURLSessionDelegate, NSURLSessionDownloadDelegate, NSURLSessionDownloadTask, + NSURLSessionStreamDelegate, NSURLSessionStreamTask, NSURLSessionTask, + NSURLSessionTaskDelegate, NSURLSessionTaskMetrics, NSURLSessionTaskTransactionMetrics, + NSURLSessionUploadTask, NSURLSessionWebSocketDelegate, NSURLSessionWebSocketMessage, + NSURLSessionWebSocketTask, + }; + pub use super::NSUbiquitousKeyValueStore::NSUbiquitousKeyValueStore; + pub use super::NSUndoManager::NSUndoManager; + pub use super::NSUnit::{ + NSDimension, NSUnit, NSUnitAcceleration, NSUnitAngle, NSUnitArea, NSUnitConcentrationMass, + NSUnitConverter, NSUnitConverterLinear, NSUnitDispersion, NSUnitDuration, + NSUnitElectricCharge, NSUnitElectricCurrent, NSUnitElectricPotentialDifference, + NSUnitElectricResistance, NSUnitEnergy, NSUnitFrequency, NSUnitFuelEfficiency, + NSUnitIlluminance, NSUnitInformationStorage, NSUnitLength, NSUnitMass, NSUnitPower, + NSUnitPressure, NSUnitSpeed, NSUnitTemperature, NSUnitVolume, + }; + pub use super::NSUserActivity::{NSUserActivity, NSUserActivityDelegate}; + pub use super::NSUserDefaults::NSUserDefaults; + pub use super::NSUserNotification::{ + NSUserNotification, NSUserNotificationAction, NSUserNotificationCenter, + NSUserNotificationCenterDelegate, + }; + pub use super::NSUserScriptTask::{ + NSUserAppleScriptTask, NSUserAutomatorTask, NSUserScriptTask, NSUserUnixTask, + }; + pub use super::NSValue::{NSNumber, NSValue}; + pub use super::NSValueTransformer::{NSSecureUnarchiveFromDataTransformer, NSValueTransformer}; + pub use super::NSXMLDTDNode::NSXMLDTDNode; + pub use super::NSXMLDocument::NSXMLDocument; + pub use super::NSXMLElement::NSXMLElement; + pub use super::NSXMLNode::NSXMLNode; + pub use super::NSXMLParser::{NSXMLParser, NSXMLParserDelegate}; + pub use super::NSXPCConnection::{ + NSXPCCoder, NSXPCConnection, NSXPCInterface, NSXPCListener, NSXPCListenerDelegate, + NSXPCListenerEndpoint, NSXPCProxyCreating, + }; + pub use super::NSURL::{NSFileSecurity, NSURLComponents, NSURLQueryItem, NSURL}; + pub use super::NSUUID::NSUUID; + pub use super::NSXMLDTD::NSXMLDTD; +} From 09381b2159662d08349162390eb5c7757c099b64 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 14:51:13 +0200 Subject: [PATCH 036/131] Handle basic typedefs --- crates/header-translator/src/lib.rs | 7 +- crates/header-translator/src/rust_type.rs | 54 +++- crates/header-translator/src/stmt.rs | 42 ++- .../src/generated/Foundation/NSArray.rs | 59 ++-- .../Foundation/NSAttributedString.rs | 11 +- .../src/generated/Foundation/NSCache.rs | 10 +- .../src/generated/Foundation/NSCalendar.rs | 9 +- .../src/generated/Foundation/NSDictionary.rs | 20 +- .../NSDistributedNotificationCenter.rs | 17 +- .../src/generated/Foundation/NSEnumerator.rs | 4 +- .../src/generated/Foundation/NSError.rs | 14 +- .../src/generated/Foundation/NSException.rs | 10 +- .../src/generated/Foundation/NSFileManager.rs | 8 +- .../src/generated/Foundation/NSHTTPCookie.rs | 8 +- .../src/generated/Foundation/NSHashTable.rs | 14 +- .../generated/Foundation/NSKeyValueCoding.rs | 165 ++++++++++ .../Foundation/NSKeyValueObserving.rs | 299 ++++++++++++++++++ .../Foundation/NSLinguisticTagger.rs | 34 +- .../src/generated/Foundation/NSLocale.rs | 11 +- .../src/generated/Foundation/NSMapTable.rs | 8 +- .../src/generated/Foundation/NSMeasurement.rs | 6 +- .../src/generated/Foundation/NSNetServices.rs | 8 +- .../generated/Foundation/NSNotification.rs | 27 +- .../src/generated/Foundation/NSObjCRuntime.rs | 10 + .../src/generated/Foundation/NSOperation.rs | 6 +- .../Foundation/NSOrderedCollectionChange.rs | 12 +- .../src/generated/Foundation/NSOrderedSet.rs | 38 +-- .../icrate/src/generated/Foundation/NSPort.rs | 12 +- .../src/generated/Foundation/NSProgress.rs | 20 +- .../src/generated/Foundation/NSRunLoop.rs | 16 +- .../icrate/src/generated/Foundation/NSSet.rs | 24 +- .../src/generated/Foundation/NSStream.rs | 13 +- .../src/generated/Foundation/NSString.rs | 6 +- .../Foundation/NSTextCheckingResult.rs | 1 + .../icrate/src/generated/Foundation/NSURL.rs | 17 +- .../generated/Foundation/NSURLConnection.rs | 4 +- .../generated/Foundation/NSUserActivity.rs | 9 +- .../Foundation/NSValueTransformer.rs | 5 +- .../generated/Foundation/NSXPCConnection.rs | 6 +- crates/icrate/src/generated/Foundation/mod.rs | 67 +++- 40 files changed, 872 insertions(+), 239 deletions(-) create mode 100644 crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs create mode 100644 crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs create mode 100644 crates/icrate/src/generated/Foundation/NSObjCRuntime.rs diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 975f6e4dc..c773847f8 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -27,13 +27,18 @@ pub fn create_rust_file( let mut declared_types = HashSet::new(); for stmt in stmts.iter() { match stmt { + Stmt::FileImport { .. } => {} + Stmt::ItemImport { .. } => {} Stmt::ClassDecl { name, .. } => { declared_types.insert(name.clone()); } + Stmt::CategoryDecl { .. } => {} Stmt::ProtocolDecl { name, .. } => { declared_types.insert(name.clone()); } - _ => {} + Stmt::AliasDecl { name, .. } => { + declared_types.insert(name.clone()); + } } } diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 7664555fe..fe7a54c00 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -55,6 +55,42 @@ impl RustType { matches!(self, Self::Id { .. }) } + pub fn typedef_is_id(ty: Type<'_>) -> Option { + use TypeKind::*; + + // Note: When we encounter a typedef declaration like this: + // typedef NSString* NSAbc; + // + // We parse it as one of: + // type NSAbc = NSString; + // struct NSAbc(NSString); + // + // Instead of: + // type NSAbc = *const NSString; + // + // Because that means we can use ordinary Id<...> handling. + match ty.get_kind() { + ObjCObjectPointer => { + let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + let name = ty.get_display_name(); + match ty.get_kind() { + ObjCInterface => { + match &*name { + "NSString" => {} + "NSUnit" => {} // TODO: Handle this differently + _ => panic!("typedef interface was not NSString {:?}", ty), + } + Some(name) + } + ObjCObject => Some(name), + _ => panic!("pointee was not objcinterface nor objcobject: {:?}", ty), + } + } + ObjCId => panic!("unexpected ObjCId {:?}", ty), + _ => None, + } + } + pub fn parse(mut ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { use TypeKind::*; @@ -137,10 +173,8 @@ impl RustType { } } Typedef => { - let display_name = ty.get_display_name(); - let display_name = display_name.strip_prefix("const ").unwrap_or(&display_name); - // TODO: Handle typedefs properly - match &*display_name { + let typedef_name = ty.get_typedef_name().expect("typedef has name"); + match &*typedef_name { "BOOL" => Self::ObjcBool, "instancetype" => { if !is_return { @@ -152,7 +186,17 @@ impl RustType { nullability, } } - display_name => Self::TypeDef(display_name.to_string()), + _ => { + if Self::typedef_is_id(ty.get_canonical_type()).is_some() { + Self::Id { + name: typedef_name, + is_return, + nullability, + } + } else { + Self::TypeDef(typedef_name) + } + } } } BlockPointer => Self::TypeDef("TodoBlock".to_string()), diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index e45fbb1c6..d62d34e13 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -5,6 +5,7 @@ use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; use crate::config::Config; use crate::method::Method; +use crate::rust_type::RustType; #[derive(Debug, Clone)] pub enum Stmt { @@ -39,6 +40,10 @@ pub enum Stmt { protocols: Vec, methods: Vec, }, + /// typedef Type TypedefName; + AliasDecl { name: String, type_name: String }, + // /// typedef struct Name { fields } TypedefName; + // X, } impl Stmt { @@ -46,7 +51,7 @@ impl Stmt { match entity.get_kind() { EntityKind::InclusionDirective => { // let file = entity.get_file().expect("inclusion file"); - let name = dbg!(entity.get_name().expect("inclusion name")); + let name = entity.get_name().expect("inclusion name"); let mut iter = name.split("/"); let framework = iter.next().expect("inclusion name has framework"); let file = if let Some(file) = iter.next() { @@ -249,11 +254,30 @@ impl Stmt { methods, }) } - EntityKind::EnumDecl - | EntityKind::VarDecl - | EntityKind::FunctionDecl - | EntityKind::TypedefDecl - | EntityKind::StructDecl => { + EntityKind::TypedefDecl => { + let name = entity.get_name().expect("typedef name"); + let underlying_ty = entity + .get_typedef_underlying_type() + .expect("typedef underlying type"); + if let Some(type_name) = RustType::typedef_is_id(underlying_ty) { + // println!("typedef: {:?}, {:?}", name, type_name); + Some(Self::AliasDecl { name, type_name }) + } else { + // println!( + // "typedef: {:?}, {:?}, {:?}, {:?}", + // entity.get_display_name(), + // entity.has_attributes(), + // entity.get_children(), + // underlying_ty, + // ); + None + } + } + EntityKind::StructDecl => { + // println!("struct: {:?}", entity.get_display_name()); + None + } + EntityKind::EnumDecl | EntityKind::VarDecl | EntityKind::FunctionDecl => { // TODO None } @@ -357,6 +381,12 @@ impl ToTokens for Stmt { // } quote!(pub type #name = NSObject;) } + Self::AliasDecl { name, type_name } => { + let name = format_ident!("{}", name); + let type_name = format_ident!("{}", type_name); + + quote!(pub type #name = #type_name;) + } }; tokens.append_all(result); } diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 6d7ee8436..852deb88c 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -19,8 +19,8 @@ extern_class!( } ); impl NSArray { - pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> ObjectType { - msg_send![self, objectAtIndex: index] + pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id { + msg_send_id![self, objectAtIndex: index] } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] @@ -41,7 +41,7 @@ impl NSArray { } #[doc = "NSExtendedArray"] impl NSArray { - pub unsafe fn arrayByAddingObject(&self, anObject: ObjectType) -> TodoGenerics { + pub unsafe fn arrayByAddingObject(&self, anObject: &ObjectType) -> TodoGenerics { msg_send![self, arrayByAddingObject: anObject] } pub unsafe fn arrayByAddingObjectsFromArray(&self, otherArray: TodoGenerics) -> TodoGenerics { @@ -50,7 +50,7 @@ impl NSArray { pub unsafe fn componentsJoinedByString(&self, separator: &NSString) -> Id { msg_send_id![self, componentsJoinedByString: separator] } - pub unsafe fn containsObject(&self, anObject: ObjectType) -> bool { + pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool { msg_send![self, containsObject: anObject] } pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { @@ -63,24 +63,31 @@ impl NSArray { ) -> Id { msg_send_id![self, descriptionWithLocale: locale, indent: level] } - pub unsafe fn firstObjectCommonWithArray(&self, otherArray: TodoGenerics) -> ObjectType { - msg_send![self, firstObjectCommonWithArray: otherArray] + pub unsafe fn firstObjectCommonWithArray( + &self, + otherArray: TodoGenerics, + ) -> Option> { + msg_send_id![self, firstObjectCommonWithArray: otherArray] } pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { msg_send![self, getObjects: objects, range: range] } - pub unsafe fn indexOfObject(&self, anObject: ObjectType) -> NSUInteger { + pub unsafe fn indexOfObject(&self, anObject: &ObjectType) -> NSUInteger { msg_send![self, indexOfObject: anObject] } - pub unsafe fn indexOfObject_inRange(&self, anObject: ObjectType, range: NSRange) -> NSUInteger { + pub unsafe fn indexOfObject_inRange( + &self, + anObject: &ObjectType, + range: NSRange, + ) -> NSUInteger { msg_send![self, indexOfObject: anObject, inRange: range] } - pub unsafe fn indexOfObjectIdenticalTo(&self, anObject: ObjectType) -> NSUInteger { + pub unsafe fn indexOfObjectIdenticalTo(&self, anObject: &ObjectType) -> NSUInteger { msg_send![self, indexOfObjectIdenticalTo: anObject] } pub unsafe fn indexOfObjectIdenticalTo_inRange( &self, - anObject: ObjectType, + anObject: &ObjectType, range: NSRange, ) -> NSUInteger { msg_send![self, indexOfObjectIdenticalTo: anObject, inRange: range] @@ -140,8 +147,8 @@ impl NSArray { pub unsafe fn objectsAtIndexes(&self, indexes: &NSIndexSet) -> TodoGenerics { msg_send![self, objectsAtIndexes: indexes] } - pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> ObjectType { - msg_send![self, objectAtIndexedSubscript: idx] + pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id { + msg_send_id![self, objectAtIndexedSubscript: idx] } pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { msg_send![self, enumerateObjectsUsingBlock: block] @@ -231,7 +238,7 @@ impl NSArray { } pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, - obj: ObjectType, + obj: &ObjectType, r: NSRange, opts: NSBinarySearchingOptions, cmp: NSComparator, @@ -247,11 +254,11 @@ impl NSArray { pub unsafe fn description(&self) -> Id { msg_send_id![self, description] } - pub unsafe fn firstObject(&self) -> ObjectType { - msg_send![self, firstObject] + pub unsafe fn firstObject(&self) -> Option> { + msg_send_id![self, firstObject] } - pub unsafe fn lastObject(&self) -> ObjectType { - msg_send![self, lastObject] + pub unsafe fn lastObject(&self) -> Option> { + msg_send_id![self, lastObject] } pub unsafe fn sortedArrayHint(&self) -> Id { msg_send_id![self, sortedArrayHint] @@ -262,7 +269,7 @@ impl NSArray { pub unsafe fn array() -> Id { msg_send_id![Self::class(), array] } - pub unsafe fn arrayWithObject(anObject: ObjectType) -> Id { + pub unsafe fn arrayWithObject(anObject: &ObjectType) -> Id { msg_send_id![Self::class(), arrayWithObject: anObject] } pub unsafe fn arrayWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id { @@ -356,10 +363,10 @@ extern_class!( } ); impl NSMutableArray { - pub unsafe fn addObject(&self, anObject: ObjectType) { + pub unsafe fn addObject(&self, anObject: &ObjectType) { msg_send![self, addObject: anObject] } - pub unsafe fn insertObject_atIndex(&self, anObject: ObjectType, index: NSUInteger) { + pub unsafe fn insertObject_atIndex(&self, anObject: &ObjectType, index: NSUInteger) { msg_send![self, insertObject: anObject, atIndex: index] } pub unsafe fn removeLastObject(&self) { @@ -368,7 +375,7 @@ impl NSMutableArray { pub unsafe fn removeObjectAtIndex(&self, index: NSUInteger) { msg_send![self, removeObjectAtIndex: index] } - pub unsafe fn replaceObjectAtIndex_withObject(&self, index: NSUInteger, anObject: ObjectType) { + pub unsafe fn replaceObjectAtIndex_withObject(&self, index: NSUInteger, anObject: &ObjectType) { msg_send![self, replaceObjectAtIndex: index, withObject: anObject] } pub unsafe fn init(&self) -> Id { @@ -396,16 +403,16 @@ impl NSMutableArray { pub unsafe fn removeAllObjects(&self) { msg_send![self, removeAllObjects] } - pub unsafe fn removeObject_inRange(&self, anObject: ObjectType, range: NSRange) { + pub unsafe fn removeObject_inRange(&self, anObject: &ObjectType, range: NSRange) { msg_send![self, removeObject: anObject, inRange: range] } - pub unsafe fn removeObject(&self, anObject: ObjectType) { + pub unsafe fn removeObject(&self, anObject: &ObjectType) { msg_send![self, removeObject: anObject] } - pub unsafe fn removeObjectIdenticalTo_inRange(&self, anObject: ObjectType, range: NSRange) { + pub unsafe fn removeObjectIdenticalTo_inRange(&self, anObject: &ObjectType, range: NSRange) { msg_send![self, removeObjectIdenticalTo: anObject, inRange: range] } - pub unsafe fn removeObjectIdenticalTo(&self, anObject: ObjectType) { + pub unsafe fn removeObjectIdenticalTo(&self, anObject: &ObjectType) { msg_send![self, removeObjectIdenticalTo: anObject] } pub unsafe fn removeObjectsFromIndices_numIndices( @@ -471,7 +478,7 @@ impl NSMutableArray { ) { msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] } - pub unsafe fn setObject_atIndexedSubscript(&self, obj: ObjectType, idx: NSUInteger) { + pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger) { msg_send![self, setObject: obj, atIndexedSubscript: idx] } pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator) { diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index a392d9923..f0042a53b 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -4,6 +4,7 @@ use crate::Foundation::generated::NSString::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSAttributedStringKey = NSString; extern_class!( #[derive(Debug)] pub struct NSAttributedString; @@ -27,7 +28,7 @@ impl NSAttributedString { impl NSAttributedString { pub unsafe fn attribute_atIndex_effectiveRange( &self, - attrName: NSAttributedStringKey, + attrName: &NSAttributedStringKey, location: NSUInteger, range: NSRangePointer, ) -> Option> { @@ -59,7 +60,7 @@ impl NSAttributedString { } pub unsafe fn attribute_atIndex_longestEffectiveRange_inRange( &self, - attrName: NSAttributedStringKey, + attrName: &NSAttributedStringKey, location: NSUInteger, range: NSRangePointer, rangeLimit: NSRange, @@ -106,7 +107,7 @@ impl NSAttributedString { } pub unsafe fn enumerateAttribute_inRange_options_usingBlock( &self, - attrName: NSAttributedStringKey, + attrName: &NSAttributedStringKey, enumerationRange: NSRange, opts: NSAttributedStringEnumerationOptions, block: TodoBlock, @@ -142,7 +143,7 @@ impl NSMutableAttributedString { impl NSMutableAttributedString { pub unsafe fn addAttribute_value_range( &self, - name: NSAttributedStringKey, + name: &NSAttributedStringKey, value: &Object, range: NSRange, ) { @@ -151,7 +152,7 @@ impl NSMutableAttributedString { pub unsafe fn addAttributes_range(&self, attrs: TodoGenerics, range: NSRange) { msg_send![self, addAttributes: attrs, range: range] } - pub unsafe fn removeAttribute_range(&self, name: NSAttributedStringKey, range: NSRange) { + pub unsafe fn removeAttribute_range(&self, name: &NSAttributedStringKey, range: NSRange) { msg_send![self, removeAttribute: name, range: range] } pub unsafe fn replaceCharactersInRange_withAttributedString( diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 2c501b8cf..10c06d928 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -12,16 +12,16 @@ extern_class!( } ); impl NSCache { - pub unsafe fn objectForKey(&self, key: KeyType) -> ObjectType { - msg_send![self, objectForKey: key] + pub unsafe fn objectForKey(&self, key: &KeyType) -> Option> { + msg_send_id![self, objectForKey: key] } - pub unsafe fn setObject_forKey(&self, obj: ObjectType, key: KeyType) { + pub unsafe fn setObject_forKey(&self, obj: &ObjectType, key: &KeyType) { msg_send![self, setObject: obj, forKey: key] } - pub unsafe fn setObject_forKey_cost(&self, obj: ObjectType, key: KeyType, g: NSUInteger) { + pub unsafe fn setObject_forKey_cost(&self, obj: &ObjectType, key: &KeyType, g: NSUInteger) { msg_send![self, setObject: obj, forKey: key, cost: g] } - pub unsafe fn removeObjectForKey(&self, key: KeyType) { + pub unsafe fn removeObjectForKey(&self, key: &KeyType) { msg_send![self, removeObjectForKey: key] } pub unsafe fn removeAllObjects(&self) { diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index a5c61f623..58a6d520e 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -11,6 +11,7 @@ use crate::Foundation::generated::NSRange::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSCalendarIdentifier = NSString; extern_class!( #[derive(Debug)] pub struct NSCalendar; @@ -20,7 +21,7 @@ extern_class!( ); impl NSCalendar { pub unsafe fn calendarWithIdentifier( - calendarIdentifierConstant: NSCalendarIdentifier, + calendarIdentifierConstant: &NSCalendarIdentifier, ) -> Option> { msg_send_id![ Self::class(), @@ -32,7 +33,7 @@ impl NSCalendar { } pub unsafe fn initWithCalendarIdentifier( &self, - ident: NSCalendarIdentifier, + ident: &NSCalendarIdentifier, ) -> Option> { msg_send_id![self, initWithCalendarIdentifier: ident] } @@ -433,8 +434,8 @@ impl NSCalendar { pub unsafe fn autoupdatingCurrentCalendar() -> Id { msg_send_id![Self::class(), autoupdatingCurrentCalendar] } - pub unsafe fn calendarIdentifier(&self) -> NSCalendarIdentifier { - msg_send![self, calendarIdentifier] + pub unsafe fn calendarIdentifier(&self) -> Id { + msg_send_id![self, calendarIdentifier] } pub unsafe fn locale(&self) -> Option> { msg_send_id![self, locale] diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 60372c716..27b4fdb08 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -16,8 +16,8 @@ extern_class!( } ); impl NSDictionary { - pub unsafe fn objectForKey(&self, aKey: KeyType) -> ObjectType { - msg_send![self, objectForKey: aKey] + pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option> { + msg_send_id![self, objectForKey: aKey] } pub unsafe fn keyEnumerator(&self) -> TodoGenerics { msg_send![self, keyEnumerator] @@ -42,7 +42,7 @@ impl NSDictionary { } #[doc = "NSExtendedDictionary"] impl NSDictionary { - pub unsafe fn allKeysForObject(&self, anObject: ObjectType) -> TodoGenerics { + pub unsafe fn allKeysForObject(&self, anObject: &ObjectType) -> TodoGenerics { msg_send![self, allKeysForObject: anObject] } pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { @@ -64,7 +64,7 @@ impl NSDictionary { pub unsafe fn objectsForKeys_notFoundMarker( &self, keys: TodoGenerics, - marker: ObjectType, + marker: &ObjectType, ) -> TodoGenerics { msg_send![self, objectsForKeys: keys, notFoundMarker: marker] } @@ -82,8 +82,8 @@ impl NSDictionary { ) { msg_send![self, getObjects: objects, andKeys: keys, count: count] } - pub unsafe fn objectForKeyedSubscript(&self, key: KeyType) -> ObjectType { - msg_send![self, objectForKeyedSubscript: key] + pub unsafe fn objectForKeyedSubscript(&self, key: &KeyType) -> Option> { + msg_send_id![self, objectForKeyedSubscript: key] } pub unsafe fn enumerateKeysAndObjectsUsingBlock(&self, block: TodoBlock) { msg_send![self, enumerateKeysAndObjectsUsingBlock: block] @@ -166,7 +166,7 @@ impl NSDictionary { msg_send_id![Self::class(), dictionary] } pub unsafe fn dictionaryWithObject_forKey( - object: ObjectType, + object: &ObjectType, key: TodoGenerics, ) -> Id { msg_send_id![Self::class(), dictionaryWithObject: object, forKey: key] @@ -235,10 +235,10 @@ extern_class!( } ); impl NSMutableDictionary { - pub unsafe fn removeObjectForKey(&self, aKey: KeyType) { + pub unsafe fn removeObjectForKey(&self, aKey: &KeyType) { msg_send![self, removeObjectForKey: aKey] } - pub unsafe fn setObject_forKey(&self, anObject: ObjectType, aKey: TodoGenerics) { + pub unsafe fn setObject_forKey(&self, anObject: &ObjectType, aKey: TodoGenerics) { msg_send![self, setObject: anObject, forKey: aKey] } pub unsafe fn init(&self) -> Id { @@ -265,7 +265,7 @@ impl NSMutableDictionary { pub unsafe fn setDictionary(&self, otherDictionary: TodoGenerics) { msg_send![self, setDictionary: otherDictionary] } - pub unsafe fn setObject_forKeyedSubscript(&self, obj: ObjectType, key: TodoGenerics) { + pub unsafe fn setObject_forKeyedSubscript(&self, obj: Option<&ObjectType>, key: TodoGenerics) { msg_send![self, setObject: obj, forKeyedSubscript: key] } } diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 7be0e476b..5b9514c00 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -5,6 +5,7 @@ use crate::Foundation::generated::NSNotification::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSDistributedNotificationCenterType = NSString; extern_class!( #[derive(Debug)] pub struct NSDistributedNotificationCenter; @@ -14,7 +15,7 @@ extern_class!( ); impl NSDistributedNotificationCenter { pub unsafe fn notificationCenterForType( - notificationCenterType: NSDistributedNotificationCenterType, + notificationCenterType: &NSDistributedNotificationCenterType, ) -> Id { msg_send_id![ Self::class(), @@ -28,7 +29,7 @@ impl NSDistributedNotificationCenter { &self, observer: &Object, selector: Sel, - name: NSNotificationName, + name: Option<&NSNotificationName>, object: Option<&NSString>, suspensionBehavior: NSNotificationSuspensionBehavior, ) { @@ -43,7 +44,7 @@ impl NSDistributedNotificationCenter { } pub unsafe fn postNotificationName_object_userInfo_deliverImmediately( &self, - name: NSNotificationName, + name: &NSNotificationName, object: Option<&NSString>, userInfo: Option<&NSDictionary>, deliverImmediately: bool, @@ -58,7 +59,7 @@ impl NSDistributedNotificationCenter { } pub unsafe fn postNotificationName_object_userInfo_options( &self, - name: NSNotificationName, + name: &NSNotificationName, object: Option<&NSString>, userInfo: Option<&NSDictionary>, options: NSDistributedNotificationOptions, @@ -75,7 +76,7 @@ impl NSDistributedNotificationCenter { &self, observer: &Object, aSelector: Sel, - aName: NSNotificationName, + aName: Option<&NSNotificationName>, anObject: Option<&NSString>, ) { msg_send![ @@ -88,14 +89,14 @@ impl NSDistributedNotificationCenter { } pub unsafe fn postNotificationName_object( &self, - aName: NSNotificationName, + aName: &NSNotificationName, anObject: Option<&NSString>, ) { msg_send![self, postNotificationName: aName, object: anObject] } pub unsafe fn postNotificationName_object_userInfo( &self, - aName: NSNotificationName, + aName: &NSNotificationName, anObject: Option<&NSString>, aUserInfo: Option<&NSDictionary>, ) { @@ -109,7 +110,7 @@ impl NSDistributedNotificationCenter { pub unsafe fn removeObserver_name_object( &self, observer: &Object, - aName: NSNotificationName, + aName: Option<&NSNotificationName>, anObject: Option<&NSString>, ) { msg_send![ diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 05a0e4be3..dbbf56ada 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -13,8 +13,8 @@ extern_class!( } ); impl NSEnumerator { - pub unsafe fn nextObject(&self) -> ObjectType { - msg_send![self, nextObject] + pub unsafe fn nextObject(&self) -> Option> { + msg_send_id![self, nextObject] } } #[doc = "NSExtendedEnumerator"] diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 1cd8d994f..1d4b32795 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -6,6 +6,8 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSErrorDomain = NSString; +pub type NSErrorUserInfoKey = NSString; extern_class!( #[derive(Debug)] pub struct NSError; @@ -16,14 +18,14 @@ extern_class!( impl NSError { pub unsafe fn initWithDomain_code_userInfo( &self, - domain: NSErrorDomain, + domain: &NSErrorDomain, code: NSInteger, dict: TodoGenerics, ) -> Id { msg_send_id![self, initWithDomain: domain, code: code, userInfo: dict] } pub unsafe fn errorWithDomain_code_userInfo( - domain: NSErrorDomain, + domain: &NSErrorDomain, code: NSInteger, dict: TodoGenerics, ) -> Id { @@ -35,7 +37,7 @@ impl NSError { ] } pub unsafe fn setUserInfoValueProviderForDomain_provider( - errorDomain: NSErrorDomain, + errorDomain: &NSErrorDomain, provider: TodoBlock, ) { msg_send![ @@ -44,11 +46,11 @@ impl NSError { provider: provider ] } - pub unsafe fn userInfoValueProviderForDomain(errorDomain: NSErrorDomain) -> TodoBlock { + pub unsafe fn userInfoValueProviderForDomain(errorDomain: &NSErrorDomain) -> TodoBlock { msg_send![Self::class(), userInfoValueProviderForDomain: errorDomain] } - pub unsafe fn domain(&self) -> NSErrorDomain { - msg_send![self, domain] + pub unsafe fn domain(&self) -> Id { + msg_send_id![self, domain] } pub unsafe fn code(&self) -> NSInteger { msg_send![self, code] diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 80772e0db..db3beef08 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -17,7 +17,7 @@ extern_class!( ); impl NSException { pub unsafe fn exceptionWithName_reason_userInfo( - name: NSExceptionName, + name: &NSExceptionName, reason: Option<&NSString>, userInfo: Option<&NSDictionary>, ) -> Id { @@ -30,7 +30,7 @@ impl NSException { } pub unsafe fn initWithName_reason_userInfo( &self, - aName: NSExceptionName, + aName: &NSExceptionName, aReason: Option<&NSString>, aUserInfo: Option<&NSDictionary>, ) -> Id { @@ -44,8 +44,8 @@ impl NSException { pub unsafe fn raise(&self) { msg_send![self, raise] } - pub unsafe fn name(&self) -> NSExceptionName { - msg_send![self, name] + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] } pub unsafe fn reason(&self) -> Option> { msg_send_id![self, reason] @@ -63,7 +63,7 @@ impl NSException { #[doc = "NSExceptionRaisingConveniences"] impl NSException { pub unsafe fn raise_format_arguments( - name: NSExceptionName, + name: &NSExceptionName, format: &NSString, argList: va_list, ) { diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index b48867484..24403b9e6 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -18,6 +18,10 @@ use crate::Foundation::generated::NSURL::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSFileAttributeKey = NSString; +pub type NSFileAttributeType = NSString; +pub type NSFileProtectionType = NSString; +pub type NSFileProviderServiceName = NSString; extern_class!( #[derive(Debug)] pub struct NSFileManager; @@ -627,8 +631,8 @@ impl NSFileProviderService { getFileProviderConnectionWithCompletionHandler: completionHandler ] } - pub unsafe fn name(&self) -> NSFileProviderServiceName { - msg_send![self, name] + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] } } #[doc = "NSFileAttributes"] diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index 78dad70ef..2ac3965a1 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -1,7 +1,6 @@ use super::__exported::NSArray; use super::__exported::NSDate; use super::__exported::NSDictionary; -use super::__exported::NSHTTPCookieInternal; use super::__exported::NSNumber; use super::__exported::NSString; use super::__exported::NSURL; @@ -10,6 +9,9 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSHTTPCookiePropertyKey = NSString; +pub type NSHTTPCookieStringPolicy = NSString; +use super::__exported::NSHTTPCookieInternal; extern_class!( #[derive(Debug)] pub struct NSHTTPCookie; @@ -78,7 +80,7 @@ impl NSHTTPCookie { pub unsafe fn portList(&self) -> TodoGenerics { msg_send![self, portList] } - pub unsafe fn sameSitePolicy(&self) -> NSHTTPCookieStringPolicy { - msg_send![self, sameSitePolicy] + pub unsafe fn sameSitePolicy(&self) -> Option> { + msg_send_id![self, sameSitePolicy] } } diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 1bc68caae..d03394a7b 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -42,22 +42,22 @@ impl NSHashTable { pub unsafe fn weakObjectsHashTable() -> TodoGenerics { msg_send![Self::class(), weakObjectsHashTable] } - pub unsafe fn member(&self, object: ObjectType) -> ObjectType { - msg_send![self, member: object] + pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option> { + msg_send_id![self, member: object] } pub unsafe fn objectEnumerator(&self) -> TodoGenerics { msg_send![self, objectEnumerator] } - pub unsafe fn addObject(&self, object: ObjectType) { + pub unsafe fn addObject(&self, object: Option<&ObjectType>) { msg_send![self, addObject: object] } - pub unsafe fn removeObject(&self, object: ObjectType) { + pub unsafe fn removeObject(&self, object: Option<&ObjectType>) { msg_send![self, removeObject: object] } pub unsafe fn removeAllObjects(&self) { msg_send![self, removeAllObjects] } - pub unsafe fn containsObject(&self, anObject: ObjectType) -> bool { + pub unsafe fn containsObject(&self, anObject: Option<&ObjectType>) -> bool { msg_send![self, containsObject: anObject] } pub unsafe fn intersectsHashTable(&self, other: TodoGenerics) -> bool { @@ -87,8 +87,8 @@ impl NSHashTable { pub unsafe fn allObjects(&self) -> TodoGenerics { msg_send![self, allObjects] } - pub unsafe fn anyObject(&self) -> ObjectType { - msg_send![self, anyObject] + pub unsafe fn anyObject(&self) -> Option> { + msg_send_id![self, anyObject] } pub unsafe fn setRepresentation(&self) -> TodoGenerics { msg_send![self, setRepresentation] diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs new file mode 100644 index 000000000..be3a2a90f --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -0,0 +1,165 @@ +use super::__exported::NSError; +use super::__exported::NSString; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSException::*; +use crate::Foundation::generated::NSOrderedSet::*; +use crate::Foundation::generated::NSSet::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSKeyValueOperator = NSString; +#[doc = "NSKeyValueCoding"] +impl NSObject { + pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } + pub unsafe fn validateValue_forKey_error( + &self, + ioValue: NonNull>, + inKey: &NSString, + outError: *mut Option<&NSError>, + ) -> bool { + msg_send![self, validateValue: ioValue, forKey: inKey, error: outError] + } + pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, mutableArrayValueForKey: key] + } + pub unsafe fn mutableOrderedSetValueForKey( + &self, + key: &NSString, + ) -> Id { + msg_send_id![self, mutableOrderedSetValueForKey: key] + } + pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, mutableSetValueForKey: key] + } + pub unsafe fn valueForKeyPath(&self, keyPath: &NSString) -> Option> { + msg_send_id![self, valueForKeyPath: keyPath] + } + pub unsafe fn setValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { + msg_send![self, setValue: value, forKeyPath: keyPath] + } + pub unsafe fn validateValue_forKeyPath_error( + &self, + ioValue: NonNull>, + inKeyPath: &NSString, + outError: *mut Option<&NSError>, + ) -> bool { + msg_send![ + self, + validateValue: ioValue, + forKeyPath: inKeyPath, + error: outError + ] + } + pub unsafe fn mutableArrayValueForKeyPath( + &self, + keyPath: &NSString, + ) -> Id { + msg_send_id![self, mutableArrayValueForKeyPath: keyPath] + } + pub unsafe fn mutableOrderedSetValueForKeyPath( + &self, + keyPath: &NSString, + ) -> Id { + msg_send_id![self, mutableOrderedSetValueForKeyPath: keyPath] + } + pub unsafe fn mutableSetValueForKeyPath(&self, keyPath: &NSString) -> Id { + msg_send_id![self, mutableSetValueForKeyPath: keyPath] + } + pub unsafe fn valueForUndefinedKey(&self, key: &NSString) -> Option> { + msg_send_id![self, valueForUndefinedKey: key] + } + pub unsafe fn setValue_forUndefinedKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forUndefinedKey: key] + } + pub unsafe fn setNilValueForKey(&self, key: &NSString) { + msg_send![self, setNilValueForKey: key] + } + pub unsafe fn dictionaryWithValuesForKeys(&self, keys: TodoGenerics) -> TodoGenerics { + msg_send![self, dictionaryWithValuesForKeys: keys] + } + pub unsafe fn setValuesForKeysWithDictionary(&self, keyedValues: TodoGenerics) { + msg_send![self, setValuesForKeysWithDictionary: keyedValues] + } + pub unsafe fn accessInstanceVariablesDirectly() -> bool { + msg_send![Self::class(), accessInstanceVariablesDirectly] + } +} +#[doc = "NSKeyValueCoding"] +impl NSArray { + pub unsafe fn valueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } +} +#[doc = "NSKeyValueCoding"] +impl NSDictionary { + pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, valueForKey: key] + } +} +#[doc = "NSKeyValueCoding"] +impl NSMutableDictionary { + pub unsafe fn setValue_forKey(&self, value: Option<&ObjectType>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } +} +#[doc = "NSKeyValueCoding"] +impl NSOrderedSet { + pub unsafe fn valueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } +} +#[doc = "NSKeyValueCoding"] +impl NSSet { + pub unsafe fn valueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } +} +#[doc = "NSDeprecatedKeyValueCoding"] +impl NSObject { + pub unsafe fn useStoredAccessor() -> bool { + msg_send![Self::class(), useStoredAccessor] + } + pub unsafe fn storedValueForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, storedValueForKey: key] + } + pub unsafe fn takeStoredValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, takeStoredValue: value, forKey: key] + } + pub unsafe fn takeValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, takeValue: value, forKey: key] + } + pub unsafe fn takeValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { + msg_send![self, takeValue: value, forKeyPath: keyPath] + } + pub unsafe fn handleQueryWithUnboundKey(&self, key: &NSString) -> Option> { + msg_send_id![self, handleQueryWithUnboundKey: key] + } + pub unsafe fn handleTakeValue_forUnboundKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, handleTakeValue: value, forUnboundKey: key] + } + pub unsafe fn unableToSetNilForKey(&self, key: &NSString) { + msg_send![self, unableToSetNilForKey: key] + } + pub unsafe fn valuesForKeys(&self, keys: &NSArray) -> Id { + msg_send_id![self, valuesForKeys: keys] + } + pub unsafe fn takeValuesFromDictionary(&self, properties: &NSDictionary) { + msg_send![self, takeValuesFromDictionary: properties] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs new file mode 100644 index 000000000..9c072d155 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -0,0 +1,299 @@ +use super::__exported::NSIndexSet; +use super::__exported::NSString; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSOrderedSet::*; +use crate::Foundation::generated::NSSet::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSKeyValueChangeKey = NSString; +#[doc = "NSKeyValueObserving"] +impl NSObject { + pub unsafe fn observeValueForKeyPath_ofObject_change_context( + &self, + keyPath: Option<&NSString>, + object: Option<&Object>, + change: TodoGenerics, + context: *mut c_void, + ) { + msg_send![ + self, + observeValueForKeyPath: keyPath, + ofObject: object, + change: change, + context: context + ] + } +} +#[doc = "NSKeyValueObserverRegistration"] +impl NSObject { + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } +} +#[doc = "NSKeyValueObserverRegistration"] +impl NSArray { + pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + toObjectsAtIndexes: indexes, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath_context( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + fromObjectsAtIndexes: indexes, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + ) { + msg_send![ + self, + removeObserver: observer, + fromObjectsAtIndexes: indexes, + forKeyPath: keyPath + ] + } + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } +} +#[doc = "NSKeyValueObserverRegistration"] +impl NSOrderedSet { + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } +} +#[doc = "NSKeyValueObserverRegistration"] +impl NSSet { + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } +} +#[doc = "NSKeyValueObserverNotification"] +impl NSObject { + pub unsafe fn willChangeValueForKey(&self, key: &NSString) { + msg_send![self, willChangeValueForKey: key] + } + pub unsafe fn didChangeValueForKey(&self, key: &NSString) { + msg_send![self, didChangeValueForKey: key] + } + pub unsafe fn willChange_valuesAtIndexes_forKey( + &self, + changeKind: NSKeyValueChange, + indexes: &NSIndexSet, + key: &NSString, + ) { + msg_send![ + self, + willChange: changeKind, + valuesAtIndexes: indexes, + forKey: key + ] + } + pub unsafe fn didChange_valuesAtIndexes_forKey( + &self, + changeKind: NSKeyValueChange, + indexes: &NSIndexSet, + key: &NSString, + ) { + msg_send![ + self, + didChange: changeKind, + valuesAtIndexes: indexes, + forKey: key + ] + } + pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects( + &self, + key: &NSString, + mutationKind: NSKeyValueSetMutationKind, + objects: &NSSet, + ) { + msg_send![ + self, + willChangeValueForKey: key, + withSetMutation: mutationKind, + usingObjects: objects + ] + } + pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects( + &self, + key: &NSString, + mutationKind: NSKeyValueSetMutationKind, + objects: &NSSet, + ) { + msg_send![ + self, + didChangeValueForKey: key, + withSetMutation: mutationKind, + usingObjects: objects + ] + } +} +#[doc = "NSKeyValueObservingCustomization"] +impl NSObject { + pub unsafe fn keyPathsForValuesAffectingValueForKey(key: &NSString) -> TodoGenerics { + msg_send![Self::class(), keyPathsForValuesAffectingValueForKey: key] + } + pub unsafe fn automaticallyNotifiesObserversForKey(key: &NSString) -> bool { + msg_send![Self::class(), automaticallyNotifiesObserversForKey: key] + } + pub unsafe fn observationInfo(&self) -> *mut c_void { + msg_send![self, observationInfo] + } + pub unsafe fn setObservationInfo(&self, observationInfo: *mut c_void) { + msg_send![self, setObservationInfo: observationInfo] + } +} +#[doc = "NSDeprecatedKeyValueObservingCustomization"] +impl NSObject { + pub unsafe fn setKeys_triggerChangeNotificationsForDependentKey( + keys: &NSArray, + dependentKey: &NSString, + ) { + msg_send![ + Self::class(), + setKeys: keys, + triggerChangeNotificationsForDependentKey: dependentKey + ] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index fbf85cb5c..3daafb523 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -7,6 +7,8 @@ use crate::Foundation::generated::NSString::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSLinguisticTagScheme = NSString; +pub type NSLinguisticTag = NSString; extern_class!( #[derive(Debug)] pub struct NSLinguisticTagger; @@ -66,7 +68,7 @@ impl NSLinguisticTagger { &self, range: NSRange, unit: NSLinguisticTaggerUnit, - scheme: NSLinguisticTagScheme, + scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, block: TodoBlock, ) { @@ -83,10 +85,10 @@ impl NSLinguisticTagger { &self, charIndex: NSUInteger, unit: NSLinguisticTaggerUnit, - scheme: NSLinguisticTagScheme, + scheme: &NSLinguisticTagScheme, tokenRange: NSRangePointer, - ) -> NSLinguisticTag { - msg_send![ + ) -> Option> { + msg_send_id![ self, tagAtIndex: charIndex, unit: unit, @@ -98,7 +100,7 @@ impl NSLinguisticTagger { &self, range: NSRange, unit: NSLinguisticTaggerUnit, - scheme: NSLinguisticTagScheme, + scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, tokenRanges: *mut TodoGenerics, ) -> TodoGenerics { @@ -114,7 +116,7 @@ impl NSLinguisticTagger { pub unsafe fn enumerateTagsInRange_scheme_options_usingBlock( &self, range: NSRange, - tagScheme: NSLinguisticTagScheme, + tagScheme: &NSLinguisticTagScheme, opts: NSLinguisticTaggerOptions, block: TodoBlock, ) { @@ -129,11 +131,11 @@ impl NSLinguisticTagger { pub unsafe fn tagAtIndex_scheme_tokenRange_sentenceRange( &self, charIndex: NSUInteger, - scheme: NSLinguisticTagScheme, + scheme: &NSLinguisticTagScheme, tokenRange: NSRangePointer, sentenceRange: NSRangePointer, - ) -> NSLinguisticTag { - msg_send![ + ) -> Option> { + msg_send_id![ self, tagAtIndex: charIndex, scheme: scheme, @@ -163,11 +165,11 @@ impl NSLinguisticTagger { string: &NSString, charIndex: NSUInteger, unit: NSLinguisticTaggerUnit, - scheme: NSLinguisticTagScheme, + scheme: &NSLinguisticTagScheme, orthography: Option<&NSOrthography>, tokenRange: NSRangePointer, - ) -> NSLinguisticTag { - msg_send![ + ) -> Option> { + msg_send_id![ Self::class(), tagForString: string, atIndex: charIndex, @@ -181,7 +183,7 @@ impl NSLinguisticTagger { string: &NSString, range: NSRange, unit: NSLinguisticTaggerUnit, - scheme: NSLinguisticTagScheme, + scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, tokenRanges: *mut TodoGenerics, @@ -201,7 +203,7 @@ impl NSLinguisticTagger { string: &NSString, range: NSRange, unit: NSLinguisticTaggerUnit, - scheme: NSLinguisticTagScheme, + scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, block: TodoBlock, @@ -252,7 +254,7 @@ impl NSString { pub unsafe fn linguisticTagsInRange_scheme_options_orthography_tokenRanges( &self, range: NSRange, - scheme: NSLinguisticTagScheme, + scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, tokenRanges: *mut TodoGenerics, @@ -269,7 +271,7 @@ impl NSString { pub unsafe fn enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock( &self, range: NSRange, - scheme: NSLinguisticTagScheme, + scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, block: TodoBlock, diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index ae2f79f18..6b11b84a8 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -1,7 +1,4 @@ -use super::__exported::NSArray; use super::__exported::NSCalendar; -use super::__exported::NSDictionary; -use super::__exported::NSString; use crate::CoreFoundation::generated::CFLocale::*; use crate::Foundation::generated::NSNotification::*; use crate::Foundation::generated::NSObject::*; @@ -9,6 +6,10 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSLocaleKey = NSString; +use super::__exported::NSArray; +use super::__exported::NSDictionary; +use super::__exported::NSString; extern_class!( #[derive(Debug)] pub struct NSLocale; @@ -17,12 +18,12 @@ extern_class!( } ); impl NSLocale { - pub unsafe fn objectForKey(&self, key: NSLocaleKey) -> Option> { + pub unsafe fn objectForKey(&self, key: &NSLocaleKey) -> Option> { msg_send_id![self, objectForKey: key] } pub unsafe fn displayNameForKey_value( &self, - key: NSLocaleKey, + key: &NSLocaleKey, value: &Object, ) -> Option> { msg_send_id![self, displayNameForKey: key, value: value] diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 30ba799e4..7b52e983a 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -75,13 +75,13 @@ impl NSMapTable { pub unsafe fn weakToWeakObjectsMapTable() -> TodoGenerics { msg_send![Self::class(), weakToWeakObjectsMapTable] } - pub unsafe fn objectForKey(&self, aKey: KeyType) -> ObjectType { - msg_send![self, objectForKey: aKey] + pub unsafe fn objectForKey(&self, aKey: Option<&KeyType>) -> Option> { + msg_send_id![self, objectForKey: aKey] } - pub unsafe fn removeObjectForKey(&self, aKey: KeyType) { + pub unsafe fn removeObjectForKey(&self, aKey: Option<&KeyType>) { msg_send![self, removeObjectForKey: aKey] } - pub unsafe fn setObject_forKey(&self, anObject: ObjectType, aKey: KeyType) { + pub unsafe fn setObject_forKey(&self, anObject: Option<&ObjectType>, aKey: Option<&KeyType>) { msg_send![self, setObject: anObject, forKey: aKey] } pub unsafe fn keyEnumerator(&self) -> TodoGenerics { diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index 6608cc9a1..acc17700c 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -18,7 +18,7 @@ impl NSMeasurement { pub unsafe fn initWithDoubleValue_unit( &self, doubleValue: c_double, - unit: UnitType, + unit: &UnitType, ) -> Id { msg_send_id![self, initWithDoubleValue: doubleValue, unit: unit] } @@ -37,8 +37,8 @@ impl NSMeasurement { ) -> TodoGenerics { msg_send![self, measurementBySubtractingMeasurement: measurement] } - pub unsafe fn unit(&self) -> UnitType { - msg_send![self, unit] + pub unsafe fn unit(&self) -> Id { + msg_send_id![self, unit] } pub unsafe fn doubleValue(&self) -> c_double { msg_send![self, doubleValue] diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index eb915a3ce..7e8349345 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -39,10 +39,10 @@ impl NSNetService { ) -> Id { msg_send_id ! [self , initWithDomain : domain , type : type_ , name : name] } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] } - pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] } pub unsafe fn publish(&self) { @@ -131,10 +131,10 @@ impl NSNetServiceBrowser { pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] } - pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] } pub unsafe fn searchForBrowsableDomains(&self) { diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index d9e6f8424..6d01ea07b 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -1,11 +1,12 @@ -use super::__exported::NSDictionary; -use super::__exported::NSOperationQueue; -use super::__exported::NSString; use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSNotificationName = NSString; +use super::__exported::NSDictionary; +use super::__exported::NSOperationQueue; +use super::__exported::NSString; extern_class!( #[derive(Debug)] pub struct NSNotification; @@ -16,7 +17,7 @@ extern_class!( impl NSNotification { pub unsafe fn initWithName_object_userInfo( &self, - name: NSNotificationName, + name: &NSNotificationName, object: Option<&Object>, userInfo: Option<&NSDictionary>, ) -> Id { @@ -25,8 +26,8 @@ impl NSNotification { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn name(&self) -> NSNotificationName { - msg_send![self, name] + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] } pub unsafe fn object(&self) -> Option> { msg_send_id![self, object] @@ -38,13 +39,13 @@ impl NSNotification { #[doc = "NSNotificationCreation"] impl NSNotification { pub unsafe fn notificationWithName_object( - aName: NSNotificationName, + aName: &NSNotificationName, anObject: Option<&Object>, ) -> Id { msg_send_id![Self::class(), notificationWithName: aName, object: anObject] } pub unsafe fn notificationWithName_object_userInfo( - aName: NSNotificationName, + aName: &NSNotificationName, anObject: Option<&Object>, aUserInfo: Option<&NSDictionary>, ) -> Id { @@ -71,7 +72,7 @@ impl NSNotificationCenter { &self, observer: &Object, aSelector: Sel, - aName: NSNotificationName, + aName: Option<&NSNotificationName>, anObject: Option<&Object>, ) { msg_send![ @@ -87,14 +88,14 @@ impl NSNotificationCenter { } pub unsafe fn postNotificationName_object( &self, - aName: NSNotificationName, + aName: &NSNotificationName, anObject: Option<&Object>, ) { msg_send![self, postNotificationName: aName, object: anObject] } pub unsafe fn postNotificationName_object_userInfo( &self, - aName: NSNotificationName, + aName: &NSNotificationName, anObject: Option<&Object>, aUserInfo: Option<&NSDictionary>, ) { @@ -111,7 +112,7 @@ impl NSNotificationCenter { pub unsafe fn removeObserver_name_object( &self, observer: &Object, - aName: NSNotificationName, + aName: Option<&NSNotificationName>, anObject: Option<&Object>, ) { msg_send![ @@ -123,7 +124,7 @@ impl NSNotificationCenter { } pub unsafe fn addObserverForName_object_queue_usingBlock( &self, - name: NSNotificationName, + name: Option<&NSNotificationName>, obj: Option<&Object>, queue: Option<&NSOperationQueue>, block: TodoBlock, diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs new file mode 100644 index 000000000..dda05f636 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -0,0 +1,10 @@ +use super::__exported::NSString; +use super::__exported::Protocol; +use crate::objc::generated::NSObjCRuntime::*; +use crate::CoreFoundation::generated::CFAvailability::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSExceptionName = NSString; +pub type NSRunLoopMode = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index a74ff2bd7..383a6de90 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -187,10 +187,10 @@ impl NSOperationQueue { pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { msg_send![self, setQualityOfService: qualityOfService] } - pub unsafe fn underlyingQueue(&self) -> dispatch_queue_t { - msg_send![self, underlyingQueue] + pub unsafe fn underlyingQueue(&self) -> Option> { + msg_send_id![self, underlyingQueue] } - pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: dispatch_queue_t) { + pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: Option<&dispatch_queue_t>) { msg_send![self, setUnderlyingQueue: underlyingQueue] } pub unsafe fn currentQueue() -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 4bcca9079..d3b10260e 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -12,14 +12,14 @@ extern_class!( ); impl NSOrderedCollectionChange { pub unsafe fn changeWithObject_type_index( - anObject: ObjectType, + anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, ) -> TodoGenerics { msg_send ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index] } pub unsafe fn changeWithObject_type_index_associatedIndex( - anObject: ObjectType, + anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, associatedIndex: NSUInteger, @@ -31,7 +31,7 @@ impl NSOrderedCollectionChange { } pub unsafe fn initWithObject_type_index( &self, - anObject: ObjectType, + anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, ) -> Id { @@ -39,15 +39,15 @@ impl NSOrderedCollectionChange { } pub unsafe fn initWithObject_type_index_associatedIndex( &self, - anObject: ObjectType, + anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, associatedIndex: NSUInteger, ) -> Id { msg_send_id ! [self , initWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] } - pub unsafe fn object(&self) -> ObjectType { - msg_send![self, object] + pub unsafe fn object(&self) -> Option> { + msg_send_id![self, object] } pub unsafe fn changeType(&self) -> NSCollectionChangeType { msg_send![self, changeType] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 94bf615b8..1a4de3e07 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -19,10 +19,10 @@ extern_class!( } ); impl NSOrderedSet { - pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> ObjectType { - msg_send![self, objectAtIndex: idx] + pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Id { + msg_send_id![self, objectAtIndex: idx] } - pub unsafe fn indexOfObject(&self, object: ObjectType) -> NSUInteger { + pub unsafe fn indexOfObject(&self, object: &ObjectType) -> NSUInteger { msg_send![self, indexOfObject: object] } pub unsafe fn init(&self) -> Id { @@ -53,7 +53,7 @@ impl NSOrderedSet { pub unsafe fn isEqualToOrderedSet(&self, other: TodoGenerics) -> bool { msg_send![self, isEqualToOrderedSet: other] } - pub unsafe fn containsObject(&self, object: ObjectType) -> bool { + pub unsafe fn containsObject(&self, object: &ObjectType) -> bool { msg_send![self, containsObject: object] } pub unsafe fn intersectsOrderedSet(&self, other: TodoGenerics) -> bool { @@ -68,8 +68,8 @@ impl NSOrderedSet { pub unsafe fn isSubsetOfSet(&self, set: TodoGenerics) -> bool { msg_send![self, isSubsetOfSet: set] } - pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> ObjectType { - msg_send![self, objectAtIndexedSubscript: idx] + pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id { + msg_send_id![self, objectAtIndexedSubscript: idx] } pub unsafe fn objectEnumerator(&self) -> TodoGenerics { msg_send![self, objectEnumerator] @@ -155,7 +155,7 @@ impl NSOrderedSet { } pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, - object: ObjectType, + object: &ObjectType, range: NSRange, opts: NSBinarySearchingOptions, cmp: NSComparator, @@ -188,11 +188,11 @@ impl NSOrderedSet { ) -> Id { msg_send_id![self, descriptionWithLocale: locale, indent: level] } - pub unsafe fn firstObject(&self) -> ObjectType { - msg_send![self, firstObject] + pub unsafe fn firstObject(&self) -> Option> { + msg_send_id![self, firstObject] } - pub unsafe fn lastObject(&self) -> ObjectType { - msg_send![self, lastObject] + pub unsafe fn lastObject(&self) -> Option> { + msg_send_id![self, lastObject] } pub unsafe fn reversedOrderedSet(&self) -> TodoGenerics { msg_send![self, reversedOrderedSet] @@ -212,7 +212,7 @@ impl NSOrderedSet { pub unsafe fn orderedSet() -> Id { msg_send_id![Self::class(), orderedSet] } - pub unsafe fn orderedSetWithObject(object: ObjectType) -> Id { + pub unsafe fn orderedSetWithObject(object: &ObjectType) -> Id { msg_send_id![Self::class(), orderedSetWithObject: object] } pub unsafe fn orderedSetWithObjects_count( @@ -257,7 +257,7 @@ impl NSOrderedSet { pub unsafe fn orderedSetWithSet_copyItems(set: TodoGenerics, flag: bool) -> Id { msg_send_id![Self::class(), orderedSetWithSet: set, copyItems: flag] } - pub unsafe fn initWithObject(&self, object: ObjectType) -> Id { + pub unsafe fn initWithObject(&self, object: &ObjectType) -> Id { msg_send_id![self, initWithObject: object] } pub unsafe fn initWithOrderedSet(&self, set: TodoGenerics) -> Id { @@ -340,13 +340,13 @@ extern_class!( } ); impl NSMutableOrderedSet { - pub unsafe fn insertObject_atIndex(&self, object: ObjectType, idx: NSUInteger) { + pub unsafe fn insertObject_atIndex(&self, object: &ObjectType, idx: NSUInteger) { msg_send![self, insertObject: object, atIndex: idx] } pub unsafe fn removeObjectAtIndex(&self, idx: NSUInteger) { msg_send![self, removeObjectAtIndex: idx] } - pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: ObjectType) { + pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: &ObjectType) { msg_send![self, replaceObjectAtIndex: idx, withObject: object] } pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { @@ -361,7 +361,7 @@ impl NSMutableOrderedSet { } #[doc = "NSExtendedMutableOrderedSet"] impl NSMutableOrderedSet { - pub unsafe fn addObject(&self, object: ObjectType) { + pub unsafe fn addObject(&self, object: &ObjectType) { msg_send![self, addObject: object] } pub unsafe fn addObjects_count(&self, objects: TodoArray, count: NSUInteger) { @@ -383,10 +383,10 @@ impl NSMutableOrderedSet { pub unsafe fn insertObjects_atIndexes(&self, objects: TodoGenerics, indexes: &NSIndexSet) { msg_send![self, insertObjects: objects, atIndexes: indexes] } - pub unsafe fn setObject_atIndex(&self, obj: ObjectType, idx: NSUInteger) { + pub unsafe fn setObject_atIndex(&self, obj: &ObjectType, idx: NSUInteger) { msg_send![self, setObject: obj, atIndex: idx] } - pub unsafe fn setObject_atIndexedSubscript(&self, obj: ObjectType, idx: NSUInteger) { + pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger) { msg_send![self, setObject: obj, atIndexedSubscript: idx] } pub unsafe fn replaceObjectsInRange_withObjects_count( @@ -418,7 +418,7 @@ impl NSMutableOrderedSet { pub unsafe fn removeAllObjects(&self) { msg_send![self, removeAllObjects] } - pub unsafe fn removeObject(&self, object: ObjectType) { + pub unsafe fn removeObject(&self, object: &ObjectType) { msg_send![self, removeObject: object] } pub unsafe fn removeObjectsInArray(&self, array: TodoGenerics) { diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 6bc16bb9d..316c041d1 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -31,10 +31,10 @@ impl NSPort { pub unsafe fn delegate(&self) -> TodoGenerics { msg_send![self, delegate] } - pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] } - pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: runLoop, forMode: mode] } pub unsafe fn sendBeforeDate_components_from_reserved( @@ -73,7 +73,7 @@ impl NSPort { &self, conn: &NSConnection, runLoop: &NSRunLoop, - mode: NSRunLoopMode, + mode: &NSRunLoopMode, ) { msg_send![self, addConnection: conn, toRunLoop: runLoop, forMode: mode] } @@ -81,7 +81,7 @@ impl NSPort { &self, conn: &NSConnection, runLoop: &NSRunLoop, - mode: NSRunLoopMode, + mode: &NSRunLoopMode, ) { msg_send![ self, @@ -131,10 +131,10 @@ impl NSMachPort { ) -> Id { msg_send_id![self, initWithMachPort: machPort, options: f] } - pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] } - pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: runLoop, forMode: mode] } pub unsafe fn machPort(&self) -> uint32_t { diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 1dd7de66d..73515f3b5 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -11,6 +11,9 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSProgressKind = NSString; +pub type NSProgressUserInfoKey = NSString; +pub type NSProgressFileOperationKind = NSString; extern_class!( #[derive(Debug)] pub struct NSProgress; @@ -74,7 +77,7 @@ impl NSProgress { pub unsafe fn setUserInfoObject_forKey( &self, objectOrNil: Option<&Object>, - key: NSProgressUserInfoKey, + key: &NSProgressUserInfoKey, ) { msg_send![self, setUserInfoObject: objectOrNil, forKey: key] } @@ -184,10 +187,10 @@ impl NSProgress { pub unsafe fn userInfo(&self) -> TodoGenerics { msg_send![self, userInfo] } - pub unsafe fn kind(&self) -> NSProgressKind { - msg_send![self, kind] + pub unsafe fn kind(&self) -> Option> { + msg_send_id![self, kind] } - pub unsafe fn setKind(&self, kind: NSProgressKind) { + pub unsafe fn setKind(&self, kind: Option<&NSProgressKind>) { msg_send![self, setKind: kind] } pub unsafe fn estimatedTimeRemaining(&self) -> Option> { @@ -202,10 +205,13 @@ impl NSProgress { pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>) { msg_send![self, setThroughput: throughput] } - pub unsafe fn fileOperationKind(&self) -> NSProgressFileOperationKind { - msg_send![self, fileOperationKind] + pub unsafe fn fileOperationKind(&self) -> Option> { + msg_send_id![self, fileOperationKind] } - pub unsafe fn setFileOperationKind(&self, fileOperationKind: NSProgressFileOperationKind) { + pub unsafe fn setFileOperationKind( + &self, + fileOperationKind: Option<&NSProgressFileOperationKind>, + ) { msg_send![self, setFileOperationKind: fileOperationKind] } pub unsafe fn fileURL(&self) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 946bbeb79..cc05a8bf5 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -20,19 +20,19 @@ impl NSRunLoop { pub unsafe fn getCFRunLoop(&self) -> CFRunLoopRef { msg_send![self, getCFRunLoop] } - pub unsafe fn addTimer_forMode(&self, timer: &NSTimer, mode: NSRunLoopMode) { + pub unsafe fn addTimer_forMode(&self, timer: &NSTimer, mode: &NSRunLoopMode) { msg_send![self, addTimer: timer, forMode: mode] } - pub unsafe fn addPort_forMode(&self, aPort: &NSPort, mode: NSRunLoopMode) { + pub unsafe fn addPort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode) { msg_send![self, addPort: aPort, forMode: mode] } - pub unsafe fn removePort_forMode(&self, aPort: &NSPort, mode: NSRunLoopMode) { + pub unsafe fn removePort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode) { msg_send![self, removePort: aPort, forMode: mode] } - pub unsafe fn limitDateForMode(&self, mode: NSRunLoopMode) -> Option> { + pub unsafe fn limitDateForMode(&self, mode: &NSRunLoopMode) -> Option> { msg_send_id![self, limitDateForMode: mode] } - pub unsafe fn acceptInputForMode_beforeDate(&self, mode: NSRunLoopMode, limitDate: &NSDate) { + pub unsafe fn acceptInputForMode_beforeDate(&self, mode: &NSRunLoopMode, limitDate: &NSDate) { msg_send![self, acceptInputForMode: mode, beforeDate: limitDate] } pub unsafe fn currentRunLoop() -> Id { @@ -41,8 +41,8 @@ impl NSRunLoop { pub unsafe fn mainRunLoop() -> Id { msg_send_id![Self::class(), mainRunLoop] } - pub unsafe fn currentMode(&self) -> NSRunLoopMode { - msg_send![self, currentMode] + pub unsafe fn currentMode(&self) -> Option> { + msg_send_id![self, currentMode] } } #[doc = "NSRunLoopConveniences"] @@ -53,7 +53,7 @@ impl NSRunLoop { pub unsafe fn runUntilDate(&self, limitDate: &NSDate) { msg_send![self, runUntilDate: limitDate] } - pub unsafe fn runMode_beforeDate(&self, mode: NSRunLoopMode, limitDate: &NSDate) -> bool { + pub unsafe fn runMode_beforeDate(&self, mode: &NSRunLoopMode, limitDate: &NSDate) -> bool { msg_send![self, runMode: mode, beforeDate: limitDate] } pub unsafe fn configureAsServer(&self) { diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index 454ded30e..f6b7d225f 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -15,8 +15,8 @@ extern_class!( } ); impl NSSet { - pub unsafe fn member(&self, object: ObjectType) -> ObjectType { - msg_send![self, member: object] + pub unsafe fn member(&self, object: &ObjectType) -> Option> { + msg_send_id![self, member: object] } pub unsafe fn objectEnumerator(&self) -> TodoGenerics { msg_send![self, objectEnumerator] @@ -40,10 +40,10 @@ impl NSSet { } #[doc = "NSExtendedSet"] impl NSSet { - pub unsafe fn anyObject(&self) -> ObjectType { - msg_send![self, anyObject] + pub unsafe fn anyObject(&self) -> Option> { + msg_send_id![self, anyObject] } - pub unsafe fn containsObject(&self, anObject: ObjectType) -> bool { + pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool { msg_send![self, containsObject: anObject] } pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { @@ -72,7 +72,7 @@ impl NSSet { withObject: argument ] } - pub unsafe fn setByAddingObject(&self, anObject: ObjectType) -> TodoGenerics { + pub unsafe fn setByAddingObject(&self, anObject: &ObjectType) -> TodoGenerics { msg_send![self, setByAddingObject: anObject] } pub unsafe fn setByAddingObjectsFromSet(&self, other: TodoGenerics) -> TodoGenerics { @@ -113,7 +113,7 @@ impl NSSet { pub unsafe fn set() -> Id { msg_send_id![Self::class(), set] } - pub unsafe fn setWithObject(object: ObjectType) -> Id { + pub unsafe fn setWithObject(object: &ObjectType) -> Id { msg_send_id![Self::class(), setWithObject: object] } pub unsafe fn setWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id { @@ -143,10 +143,10 @@ extern_class!( } ); impl NSMutableSet { - pub unsafe fn addObject(&self, object: ObjectType) { + pub unsafe fn addObject(&self, object: &ObjectType) { msg_send![self, addObject: object] } - pub unsafe fn removeObject(&self, object: ObjectType) { + pub unsafe fn removeObject(&self, object: &ObjectType) { msg_send![self, removeObject: object] } pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { @@ -203,16 +203,16 @@ impl NSCountedSet { pub unsafe fn initWithSet(&self, set: TodoGenerics) -> Id { msg_send_id![self, initWithSet: set] } - pub unsafe fn countForObject(&self, object: ObjectType) -> NSUInteger { + pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger { msg_send![self, countForObject: object] } pub unsafe fn objectEnumerator(&self) -> TodoGenerics { msg_send![self, objectEnumerator] } - pub unsafe fn addObject(&self, object: ObjectType) { + pub unsafe fn addObject(&self, object: &ObjectType) { msg_send![self, addObject: object] } - pub unsafe fn removeObject(&self, object: ObjectType) { + pub unsafe fn removeObject(&self, object: &ObjectType) { msg_send![self, removeObject: object] } } diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index a32ca3605..a2cea94f1 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -11,6 +11,7 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSStreamPropertyKey = NSString; extern_class!( #[derive(Debug)] pub struct NSStream; @@ -25,20 +26,20 @@ impl NSStream { pub unsafe fn close(&self) { msg_send![self, close] } - pub unsafe fn propertyForKey(&self, key: NSStreamPropertyKey) -> Option> { + pub unsafe fn propertyForKey(&self, key: &NSStreamPropertyKey) -> Option> { msg_send_id![self, propertyForKey: key] } pub unsafe fn setProperty_forKey( &self, property: Option<&Object>, - key: NSStreamPropertyKey, + key: &NSStreamPropertyKey, ) -> bool { msg_send![self, setProperty: property, forKey: key] } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] } - pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] } pub unsafe fn delegate(&self) -> TodoGenerics { @@ -219,3 +220,7 @@ impl NSOutputStream { } } pub type NSStreamDelegate = NSObject; +pub type NSStreamSocketSecurityLevel = NSString; +pub type NSStreamSOCKSProxyConfiguration = NSString; +pub type NSStreamSOCKSProxyVersion = NSString; +pub type NSStreamNetworkServiceTypeValue = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 1551a6822..f065d4b4a 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -33,6 +33,7 @@ impl NSString { msg_send![self, length] } } +pub type NSStringTransform = NSString; #[doc = "NSStringExtensionMethods"] impl NSString { pub unsafe fn substringFromIndex(&self, from: NSUInteger) -> Id { @@ -407,7 +408,7 @@ impl NSString { } pub unsafe fn stringByApplyingTransform_reverse( &self, - transform: NSStringTransform, + transform: &NSStringTransform, reverse: bool, ) -> Option> { msg_send_id![self, stringByApplyingTransform: transform, reverse: reverse] @@ -757,6 +758,7 @@ impl NSString { msg_send![self, hash] } } +pub type NSStringEncodingDetectionOptionsKey = NSString; #[doc = "NSStringEncodingDetection"] impl NSString { pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( @@ -819,7 +821,7 @@ impl NSMutableString { } pub unsafe fn applyTransform_reverse_range_updatedRange( &self, - transform: NSStringTransform, + transform: &NSStringTransform, reverse: bool, range: NSRange, resultingRange: NSRangePointer, diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 3a48ae4c8..5d83e4950 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -13,6 +13,7 @@ use crate::Foundation::generated::NSRange::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSTextCheckingKey = NSString; extern_class!( #[derive(Debug)] pub struct NSTextCheckingResult; diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index f649c59d4..70d20bf27 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -11,6 +11,13 @@ use crate::Foundation::generated::NSURLHandle::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSURLResourceKey = NSString; +pub type NSURLFileResourceType = NSString; +pub type NSURLThumbnailDictionaryItem = NSString; +pub type NSURLFileProtectionType = NSString; +pub type NSURLUbiquitousItemDownloadingStatus = NSString; +pub type NSURLUbiquitousSharedItemRole = NSString; +pub type NSURLUbiquitousSharedItemPermissions = NSString; extern_class!( #[derive(Debug)] pub struct NSURL; @@ -197,7 +204,7 @@ impl NSURL { pub unsafe fn getResourceValue_forKey_error( &self, value: NonNull>, - key: NSURLResourceKey, + key: &NSURLResourceKey, error: *mut Option<&NSError>, ) -> bool { msg_send![self, getResourceValue: value, forKey: key, error: error] @@ -212,7 +219,7 @@ impl NSURL { pub unsafe fn setResourceValue_forKey_error( &self, value: Option<&Object>, - key: NSURLResourceKey, + key: &NSURLResourceKey, error: *mut Option<&NSError>, ) -> bool { msg_send![self, setResourceValue: value, forKey: key, error: error] @@ -224,7 +231,7 @@ impl NSURL { ) -> bool { msg_send![self, setResourceValues: keyedValues, error: error] } - pub unsafe fn removeCachedResourceValueForKey(&self, key: NSURLResourceKey) { + pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey) { msg_send![self, removeCachedResourceValueForKey: key] } pub unsafe fn removeAllCachedResourceValues(&self) { @@ -233,7 +240,7 @@ impl NSURL { pub unsafe fn setTemporaryResourceValue_forKey( &self, value: Option<&Object>, - key: NSURLResourceKey, + key: &NSURLResourceKey, ) { msg_send![self, setTemporaryResourceValue: value, forKey: key] } @@ -406,7 +413,7 @@ impl NSURL { pub unsafe fn getPromisedItemResourceValue_forKey_error( &self, value: NonNull>, - key: NSURLResourceKey, + key: &NSURLResourceKey, error: *mut Option<&NSError>, ) -> bool { msg_send![ diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 4d69d7dc1..fb80e5507 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -61,10 +61,10 @@ impl NSURLConnection { pub unsafe fn cancel(&self) { msg_send![self, cancel] } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] } - pub unsafe fn unscheduleFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: NSRunLoopMode) { + pub unsafe fn unscheduleFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, unscheduleFromRunLoop: aRunLoop, forMode: mode] } pub unsafe fn setDelegateQueue(&self, queue: Option<&NSOperationQueue>) { diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 18abeb03e..8dd5188df 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -13,6 +13,7 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSUserActivityPersistentIdentifier = NSString; extern_class!( #[derive(Debug)] pub struct NSUserActivity; @@ -160,12 +161,14 @@ impl NSUserActivity { pub unsafe fn setEligibleForPrediction(&self, eligibleForPrediction: bool) { msg_send![self, setEligibleForPrediction: eligibleForPrediction] } - pub unsafe fn persistentIdentifier(&self) -> NSUserActivityPersistentIdentifier { - msg_send![self, persistentIdentifier] + pub unsafe fn persistentIdentifier( + &self, + ) -> Option> { + msg_send_id![self, persistentIdentifier] } pub unsafe fn setPersistentIdentifier( &self, - persistentIdentifier: NSUserActivityPersistentIdentifier, + persistentIdentifier: Option<&NSUserActivityPersistentIdentifier>, ) { msg_send![self, setPersistentIdentifier: persistentIdentifier] } diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index 40dc3a34e..abd014935 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -5,6 +5,7 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSValueTransformerName = NSString; extern_class!( #[derive(Debug)] pub struct NSValueTransformer; @@ -15,7 +16,7 @@ extern_class!( impl NSValueTransformer { pub unsafe fn setValueTransformer_forName( transformer: Option<&NSValueTransformer>, - name: NSValueTransformerName, + name: &NSValueTransformerName, ) { msg_send![ Self::class(), @@ -24,7 +25,7 @@ impl NSValueTransformer { ] } pub unsafe fn valueTransformerForName( - name: NSValueTransformerName, + name: &NSValueTransformerName, ) -> Option> { msg_send_id![Self::class(), valueTransformerForName: name] } diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 0c1a1c8b5..3ffc5a7ef 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -273,15 +273,15 @@ extern_class!( } ); impl NSXPCCoder { - pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: xpc_object_t, key: &NSString) { + pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: &xpc_object_t, key: &NSString) { msg_send![self, encodeXPCObject: xpcObject, forKey: key] } pub unsafe fn decodeXPCObjectOfType_forKey( &self, type_: xpc_type_t, key: &NSString, - ) -> xpc_object_t { - msg_send![self, decodeXPCObjectOfType: type_, forKey: key] + ) -> Option> { + msg_send_id![self, decodeXPCObjectOfType: type_, forKey: key] } pub unsafe fn userInfo(&self) -> TodoGenerics { msg_send![self, userInfo] diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 6d40366f2..33179487b 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -56,6 +56,8 @@ pub(crate) mod NSInflectionRule; pub(crate) mod NSInvocation; pub(crate) mod NSItemProvider; pub(crate) mod NSJSONSerialization; +pub(crate) mod NSKeyValueCoding; +pub(crate) mod NSKeyValueObserving; pub(crate) mod NSKeyedArchiver; pub(crate) mod NSLengthFormatter; pub(crate) mod NSLinguisticTagger; @@ -74,6 +76,7 @@ pub(crate) mod NSNotification; pub(crate) mod NSNotificationQueue; pub(crate) mod NSNull; pub(crate) mod NSNumberFormatter; +pub(crate) mod NSObjCRuntime; pub(crate) mod NSObject; pub(crate) mod NSOperation; pub(crate) mod NSOrderedCollectionChange; @@ -155,15 +158,15 @@ mod __exported { pub use super::NSArchiver::{NSArchiver, NSUnarchiver}; pub use super::NSArray::{NSArray, NSMutableArray}; pub use super::NSAttributedString::{ - NSAttributedString, NSAttributedStringMarkdownParsingOptions, NSMutableAttributedString, - NSPresentationIntent, + NSAttributedString, NSAttributedStringKey, NSAttributedStringMarkdownParsingOptions, + NSMutableAttributedString, NSPresentationIntent, }; pub use super::NSAutoreleasePool::NSAutoreleasePool; pub use super::NSBackgroundActivityScheduler::NSBackgroundActivityScheduler; pub use super::NSBundle::{NSBundle, NSBundleResourceRequest}; pub use super::NSByteCountFormatter::NSByteCountFormatter; pub use super::NSCache::{NSCache, NSCacheDelegate}; - pub use super::NSCalendar::{NSCalendar, NSDateComponents}; + pub use super::NSCalendar::{NSCalendar, NSCalendarIdentifier, NSDateComponents}; pub use super::NSCalendarDate::NSCalendarDate; pub use super::NSCharacterSet::{NSCharacterSet, NSMutableCharacterSet}; pub use super::NSClassDescription::NSClassDescription; @@ -183,10 +186,12 @@ mod __exported { pub use super::NSDictionary::{NSDictionary, NSMutableDictionary}; pub use super::NSDistantObject::NSDistantObject; pub use super::NSDistributedLock::NSDistributedLock; - pub use super::NSDistributedNotificationCenter::NSDistributedNotificationCenter; + pub use super::NSDistributedNotificationCenter::{ + NSDistributedNotificationCenter, NSDistributedNotificationCenterType, + }; pub use super::NSEnergyFormatter::NSEnergyFormatter; pub use super::NSEnumerator::{NSEnumerator, NSFastEnumeration}; - pub use super::NSError::NSError; + pub use super::NSError::{NSError, NSErrorDomain, NSErrorUserInfoKey}; pub use super::NSException::{NSAssertionHandler, NSException}; pub use super::NSExpression::NSExpression; pub use super::NSExtensionContext::NSExtensionContext; @@ -195,14 +200,18 @@ mod __exported { pub use super::NSFileCoordinator::{NSFileAccessIntent, NSFileCoordinator}; pub use super::NSFileHandle::{NSFileHandle, NSPipe}; pub use super::NSFileManager::{ - NSDirectoryEnumerator, NSFileManager, NSFileManagerDelegate, NSFileProviderService, + NSDirectoryEnumerator, NSFileAttributeKey, NSFileAttributeType, NSFileManager, + NSFileManagerDelegate, NSFileProtectionType, NSFileProviderService, + NSFileProviderServiceName, }; pub use super::NSFilePresenter::NSFilePresenter; pub use super::NSFileVersion::NSFileVersion; pub use super::NSFileWrapper::NSFileWrapper; pub use super::NSFormatter::NSFormatter; pub use super::NSGarbageCollector::NSGarbageCollector; - pub use super::NSHTTPCookie::NSHTTPCookie; + pub use super::NSHTTPCookie::{ + NSHTTPCookie, NSHTTPCookiePropertyKey, NSHTTPCookieStringPolicy, + }; pub use super::NSHTTPCookieStorage::NSHTTPCookieStorage; pub use super::NSHashTable::NSHashTable; pub use super::NSHost::NSHost; @@ -213,13 +222,17 @@ mod __exported { pub use super::NSInvocation::NSInvocation; pub use super::NSItemProvider::{NSItemProvider, NSItemProviderReading, NSItemProviderWriting}; pub use super::NSJSONSerialization::NSJSONSerialization; + pub use super::NSKeyValueCoding::NSKeyValueOperator; + pub use super::NSKeyValueObserving::NSKeyValueChangeKey; pub use super::NSKeyedArchiver::{ NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, NSKeyedUnarchiverDelegate, }; pub use super::NSLengthFormatter::NSLengthFormatter; - pub use super::NSLinguisticTagger::NSLinguisticTagger; + pub use super::NSLinguisticTagger::{ + NSLinguisticTag, NSLinguisticTagScheme, NSLinguisticTagger, + }; pub use super::NSListFormatter::NSListFormatter; - pub use super::NSLocale::NSLocale; + pub use super::NSLocale::{NSLocale, NSLocaleKey}; pub use super::NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; pub use super::NSMapTable::NSMapTable; pub use super::NSMassFormatter::NSMassFormatter; @@ -234,10 +247,11 @@ mod __exported { pub use super::NSNetServices::{ NSNetService, NSNetServiceBrowser, NSNetServiceBrowserDelegate, NSNetServiceDelegate, }; - pub use super::NSNotification::{NSNotification, NSNotificationCenter}; + pub use super::NSNotification::{NSNotification, NSNotificationCenter, NSNotificationName}; pub use super::NSNotificationQueue::NSNotificationQueue; pub use super::NSNull::NSNull; pub use super::NSNumberFormatter::NSNumberFormatter; + pub use super::NSObjCRuntime::{NSExceptionName, NSRunLoopMode}; pub use super::NSObject::{ NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, }; @@ -262,7 +276,10 @@ mod __exported { }; pub use super::NSPredicate::NSPredicate; pub use super::NSProcessInfo::NSProcessInfo; - pub use super::NSProgress::{NSProgress, NSProgressReporting}; + pub use super::NSProgress::{ + NSProgress, NSProgressFileOperationKind, NSProgressKind, NSProgressReporting, + NSProgressUserInfoKey, + }; pub use super::NSPropertyList::NSPropertyListSerialization; pub use super::NSProtocolChecker::NSProtocolChecker; pub use super::NSProxy::NSProxy; @@ -289,10 +306,17 @@ mod __exported { pub use super::NSSet::{NSCountedSet, NSMutableSet, NSSet}; pub use super::NSSortDescriptor::NSSortDescriptor; pub use super::NSSpellServer::{NSSpellServer, NSSpellServerDelegate}; - pub use super::NSStream::{NSInputStream, NSOutputStream, NSStream, NSStreamDelegate}; - pub use super::NSString::{NSConstantString, NSMutableString, NSSimpleCString, NSString}; + pub use super::NSStream::{ + NSInputStream, NSOutputStream, NSStream, NSStreamDelegate, NSStreamNetworkServiceTypeValue, + NSStreamPropertyKey, NSStreamSOCKSProxyConfiguration, NSStreamSOCKSProxyVersion, + NSStreamSocketSecurityLevel, + }; + pub use super::NSString::{ + NSConstantString, NSMutableString, NSSimpleCString, NSString, + NSStringEncodingDetectionOptionsKey, NSStringTransform, + }; pub use super::NSTask::NSTask; - pub use super::NSTextCheckingResult::NSTextCheckingResult; + pub use super::NSTextCheckingResult::{NSTextCheckingKey, NSTextCheckingResult}; pub use super::NSThread::NSThread; pub use super::NSTimeZone::NSTimeZone; pub use super::NSTimer::NSTimer; @@ -330,7 +354,9 @@ mod __exported { NSUnitIlluminance, NSUnitInformationStorage, NSUnitLength, NSUnitMass, NSUnitPower, NSUnitPressure, NSUnitSpeed, NSUnitTemperature, NSUnitVolume, }; - pub use super::NSUserActivity::{NSUserActivity, NSUserActivityDelegate}; + pub use super::NSUserActivity::{ + NSUserActivity, NSUserActivityDelegate, NSUserActivityPersistentIdentifier, + }; pub use super::NSUserDefaults::NSUserDefaults; pub use super::NSUserNotification::{ NSUserNotification, NSUserNotificationAction, NSUserNotificationCenter, @@ -340,7 +366,9 @@ mod __exported { NSUserAppleScriptTask, NSUserAutomatorTask, NSUserScriptTask, NSUserUnixTask, }; pub use super::NSValue::{NSNumber, NSValue}; - pub use super::NSValueTransformer::{NSSecureUnarchiveFromDataTransformer, NSValueTransformer}; + pub use super::NSValueTransformer::{ + NSSecureUnarchiveFromDataTransformer, NSValueTransformer, NSValueTransformerName, + }; pub use super::NSXMLDTDNode::NSXMLDTDNode; pub use super::NSXMLDocument::NSXMLDocument; pub use super::NSXMLElement::NSXMLElement; @@ -350,7 +378,12 @@ mod __exported { NSXPCCoder, NSXPCConnection, NSXPCInterface, NSXPCListener, NSXPCListenerDelegate, NSXPCListenerEndpoint, NSXPCProxyCreating, }; - pub use super::NSURL::{NSFileSecurity, NSURLComponents, NSURLQueryItem, NSURL}; + pub use super::NSURL::{ + NSFileSecurity, NSURLComponents, NSURLFileProtectionType, NSURLFileResourceType, + NSURLQueryItem, NSURLResourceKey, NSURLThumbnailDictionaryItem, + NSURLUbiquitousItemDownloadingStatus, NSURLUbiquitousSharedItemPermissions, + NSURLUbiquitousSharedItemRole, NSURL, + }; pub use super::NSUUID::NSUUID; pub use super::NSXMLDTD::NSXMLDTD; } From ca1093feace03f312b8cc29307f5fe263399442a Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 15:33:20 +0200 Subject: [PATCH 037/131] Improve generics handling --- crates/header-translator/src/stmt.rs | 57 ++++++++++++++++--- .../src/generated/Foundation/NSArray.rs | 30 +++++----- .../src/generated/Foundation/NSCache.rs | 8 +-- .../src/generated/Foundation/NSDictionary.rs | 34 +++++------ .../src/generated/Foundation/NSEnumerator.rs | 10 ++-- .../src/generated/Foundation/NSFileManager.rs | 10 ++-- .../src/generated/Foundation/NSHashTable.rs | 8 +-- .../generated/Foundation/NSKeyValueCoding.rs | 10 ++-- .../Foundation/NSKeyValueObserving.rs | 6 +- .../src/generated/Foundation/NSMapTable.rs | 8 +-- .../src/generated/Foundation/NSMeasurement.rs | 8 +-- .../Foundation/NSOrderedCollectionChange.rs | 8 +-- .../NSOrderedCollectionDifference.rs | 8 +-- .../src/generated/Foundation/NSOrderedSet.rs | 28 ++++----- .../src/generated/Foundation/NSPredicate.rs | 12 ++-- .../icrate/src/generated/Foundation/NSSet.rs | 32 +++++------ .../generated/Foundation/NSSortDescriptor.rs | 10 ++-- 17 files changed, 165 insertions(+), 122 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index d62d34e13..b5ff20759 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -20,6 +20,7 @@ pub enum Stmt { availability: Availability, // TODO: Generics superclass: Option, + generics: Vec, protocols: Vec, methods: Vec, }, @@ -29,6 +30,7 @@ pub enum Stmt { availability: Availability, /// Some categories don't have a name. Example: NSClipView name: Option, + generics: Vec, /// I don't quite know what this means? protocols: Vec, methods: Vec, @@ -91,6 +93,7 @@ impl Stmt { ); // println!("Availability: {:?}", entity.get_platform_availability()); let mut superclass = None; + let mut generics = Vec::new(); let mut protocols = Vec::new(); let mut methods = Vec::new(); @@ -126,7 +129,10 @@ impl Stmt { // methods.push(quote! {}); } EntityKind::TemplateTypeParameter => { - println!("TODO: Template parameters") + // TODO: Generics with bounds (like NSMeasurement) + // let ty = entity.get_type().expect("template type"); + let name = entity.get_display_name().expect("template name"); + generics.push(name); } EntityKind::VisibilityAttr => { // NS_CLASS_AVAILABLE_MAC?? @@ -150,12 +156,15 @@ impl Stmt { name, availability, superclass, + generics, protocols, methods, }) } EntityKind::ObjCCategoryDecl => { + let name = entity.get_name(); let mut class_name = None; + let mut generics = Vec::new(); let availability = Availability::parse( entity .get_platform_availability() @@ -195,7 +204,8 @@ impl Stmt { // methods.push(quote! {}); } EntityKind::TemplateTypeParameter => { - println!("TODO: Template parameters") + let name = entity.get_display_name().expect("template name"); + generics.push(name); } EntityKind::UnexposedAttr => {} _ => panic!("Unknown in ObjCCategoryDecl {:?}", entity), @@ -208,7 +218,8 @@ impl Stmt { Some(Self::CategoryDecl { class_name, availability, - name: entity.get_name(), + name, + generics, protocols, methods, }) @@ -310,26 +321,50 @@ impl ToTokens for Stmt { name, availability, superclass, + generics, protocols, methods, } => { let name = format_ident!("{}", name); + let generics: Vec<_> = generics + .iter() + .map(|name| format_ident!("{}", name)) + .collect(); + + let generic_params = if generics.is_empty() { + quote!() + } else { + quote!(<#(#generics: Message),*>) + }; + + let type_ = if generics.is_empty() { + quote!(#name) + } else { + quote!(#name<#(#generics),*>) + }; + let superclass_name = format_ident!("{}", superclass.as_deref().unwrap_or("Object")); // TODO: Use ty.get_objc_protocol_declarations() + let macro_name = if generics.is_empty() { + quote!(extern_class) + } else { + quote!(__inner_extern_class) + }; + quote! { - extern_class!( + #macro_name!( #[derive(Debug)] - pub struct #name; + pub struct #name #generic_params; - unsafe impl ClassType for #name { + unsafe impl #generic_params ClassType for #type_ { type Super = #superclass_name; } ); - impl #name { + impl #generic_params #type_ { #(#methods)* } } @@ -338,6 +373,7 @@ impl ToTokens for Stmt { class_name, availability, name, + generics, protocols, methods, } => { @@ -348,9 +384,14 @@ impl ToTokens for Stmt { }; let class_name = format_ident!("{}", class_name); + let generics: Vec<_> = generics + .iter() + .map(|name| format_ident!("{}", name)) + .collect(); + quote! { #meta - impl #class_name { + impl<#(#generics: Message),*> #class_name<#(#generics),*> { #(#methods)* } } diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 852deb88c..add7b8e3f 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -11,14 +11,14 @@ use crate::Foundation::generated::NSRange::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSArray; - unsafe impl ClassType for NSArray { + pub struct NSArray; + unsafe impl ClassType for NSArray { type Super = NSObject; } ); -impl NSArray { +impl NSArray { pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id { msg_send_id![self, objectAtIndex: index] } @@ -40,7 +40,7 @@ impl NSArray { } } #[doc = "NSExtendedArray"] -impl NSArray { +impl NSArray { pub unsafe fn arrayByAddingObject(&self, anObject: &ObjectType) -> TodoGenerics { msg_send![self, arrayByAddingObject: anObject] } @@ -265,7 +265,7 @@ impl NSArray { } } #[doc = "NSArrayCreation"] -impl NSArray { +impl NSArray { pub unsafe fn array() -> Id { msg_send_id![Self::class(), array] } @@ -303,7 +303,7 @@ impl NSArray { } } #[doc = "NSArrayDiffing"] -impl NSArray { +impl NSArray { pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( &self, other: TodoGenerics, @@ -332,7 +332,7 @@ impl NSArray { } } #[doc = "NSDeprecated"] -impl NSArray { +impl NSArray { pub unsafe fn getObjects(&self, objects: TodoArray) { msg_send![self, getObjects: objects] } @@ -355,14 +355,14 @@ impl NSArray { msg_send![self, writeToURL: url, atomically: atomically] } } -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSMutableArray; - unsafe impl ClassType for NSMutableArray { + pub struct NSMutableArray; + unsafe impl ClassType for NSMutableArray { type Super = NSArray; } ); -impl NSMutableArray { +impl NSMutableArray { pub unsafe fn addObject(&self, anObject: &ObjectType) { msg_send![self, addObject: anObject] } @@ -389,7 +389,7 @@ impl NSMutableArray { } } #[doc = "NSExtendedMutableArray"] -impl NSMutableArray { +impl NSMutableArray { pub unsafe fn addObjectsFromArray(&self, otherArray: TodoGenerics) { msg_send![self, addObjectsFromArray: otherArray] } @@ -489,7 +489,7 @@ impl NSMutableArray { } } #[doc = "NSMutableArrayCreation"] -impl NSMutableArray { +impl NSMutableArray { pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id { msg_send_id![Self::class(), arrayWithCapacity: numItems] } @@ -507,7 +507,7 @@ impl NSMutableArray { } } #[doc = "NSMutableArrayDiffing"] -impl NSMutableArray { +impl NSMutableArray { pub unsafe fn applyDifference(&self, difference: TodoGenerics) { msg_send![self, applyDifference: difference] } diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 10c06d928..52e8dfdd6 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -4,14 +4,14 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSCache; - unsafe impl ClassType for NSCache { + pub struct NSCache; + unsafe impl ClassType for NSCache { type Super = NSObject; } ); -impl NSCache { +impl NSCache { pub unsafe fn objectForKey(&self, key: &KeyType) -> Option> { msg_send_id![self, objectForKey: key] } diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 27b4fdb08..33f6e754a 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -8,14 +8,14 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSDictionary; - unsafe impl ClassType for NSDictionary { + pub struct NSDictionary; + unsafe impl ClassType for NSDictionary { type Super = NSObject; } ); -impl NSDictionary { +impl NSDictionary { pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option> { msg_send_id![self, objectForKey: aKey] } @@ -41,7 +41,7 @@ impl NSDictionary { } } #[doc = "NSExtendedDictionary"] -impl NSDictionary { +impl NSDictionary { pub unsafe fn allKeysForObject(&self, anObject: &ObjectType) -> TodoGenerics { msg_send![self, allKeysForObject: anObject] } @@ -137,7 +137,7 @@ impl NSDictionary { } } #[doc = "NSDeprecated"] -impl NSDictionary { +impl NSDictionary { pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray) { msg_send![self, getObjects: objects, andKeys: keys] } @@ -161,7 +161,7 @@ impl NSDictionary { } } #[doc = "NSDictionaryCreation"] -impl NSDictionary { +impl NSDictionary { pub unsafe fn dictionary() -> Id { msg_send_id![Self::class(), dictionary] } @@ -227,14 +227,16 @@ impl NSDictionary { ] } } -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSMutableDictionary; - unsafe impl ClassType for NSMutableDictionary { + pub struct NSMutableDictionary; + unsafe impl ClassType + for NSMutableDictionary + { type Super = NSDictionary; } ); -impl NSMutableDictionary { +impl NSMutableDictionary { pub unsafe fn removeObjectForKey(&self, aKey: &KeyType) { msg_send![self, removeObjectForKey: aKey] } @@ -252,7 +254,7 @@ impl NSMutableDictionary { } } #[doc = "NSExtendedMutableDictionary"] -impl NSMutableDictionary { +impl NSMutableDictionary { pub unsafe fn addEntriesFromDictionary(&self, otherDictionary: TodoGenerics) { msg_send![self, addEntriesFromDictionary: otherDictionary] } @@ -270,7 +272,7 @@ impl NSMutableDictionary { } } #[doc = "NSMutableDictionaryCreation"] -impl NSMutableDictionary { +impl NSMutableDictionary { pub unsafe fn dictionaryWithCapacity(numItems: NSUInteger) -> Id { msg_send_id![Self::class(), dictionaryWithCapacity: numItems] } @@ -288,19 +290,19 @@ impl NSMutableDictionary { } } #[doc = "NSSharedKeySetDictionary"] -impl NSDictionary { +impl NSDictionary { pub unsafe fn sharedKeySetForKeys(keys: TodoGenerics) -> Id { msg_send_id![Self::class(), sharedKeySetForKeys: keys] } } #[doc = "NSSharedKeySetDictionary"] -impl NSMutableDictionary { +impl NSMutableDictionary { pub unsafe fn dictionaryWithSharedKeySet(keyset: &Object) -> TodoGenerics { msg_send![Self::class(), dictionaryWithSharedKeySet: keyset] } } #[doc = "NSGenericFastEnumeraiton"] -impl NSDictionary { +impl NSDictionary { pub unsafe fn countByEnumeratingWithState_objects_count( &self, state: NonNull, diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index dbbf56ada..f2661a8ae 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -5,20 +5,20 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; pub type NSFastEnumeration = NSObject; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSEnumerator; - unsafe impl ClassType for NSEnumerator { + pub struct NSEnumerator; + unsafe impl ClassType for NSEnumerator { type Super = NSObject; } ); -impl NSEnumerator { +impl NSEnumerator { pub unsafe fn nextObject(&self) -> Option> { msg_send_id![self, nextObject] } } #[doc = "NSExtendedEnumerator"] -impl NSEnumerator { +impl NSEnumerator { pub unsafe fn allObjects(&self) -> TodoGenerics { msg_send![self, allObjects] } diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 24403b9e6..84a6b4a68 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -587,14 +587,14 @@ impl NSObject { } } pub type NSFileManagerDelegate = NSObject; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSDirectoryEnumerator; - unsafe impl ClassType for NSDirectoryEnumerator { + pub struct NSDirectoryEnumerator; + unsafe impl ClassType for NSDirectoryEnumerator { type Super = NSEnumerator; } ); -impl NSDirectoryEnumerator { +impl NSDirectoryEnumerator { pub unsafe fn skipDescendents(&self) { msg_send![self, skipDescendents] } @@ -636,7 +636,7 @@ impl NSFileProviderService { } } #[doc = "NSFileAttributes"] -impl NSDictionary { +impl NSDictionary { pub unsafe fn fileSize(&self) -> c_ulonglong { msg_send![self, fileSize] } diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index d03394a7b..f61288656 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -7,14 +7,14 @@ use crate::Foundation::generated::NSString::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSHashTable; - unsafe impl ClassType for NSHashTable { + pub struct NSHashTable; + unsafe impl ClassType for NSHashTable { type Super = NSObject; } ); -impl NSHashTable { +impl NSHashTable { pub unsafe fn initWithOptions_capacity( &self, options: NSPointerFunctionsOptions, diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index be3a2a90f..410992348 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -92,7 +92,7 @@ impl NSObject { } } #[doc = "NSKeyValueCoding"] -impl NSArray { +impl NSArray { pub unsafe fn valueForKey(&self, key: &NSString) -> Id { msg_send_id![self, valueForKey: key] } @@ -101,19 +101,19 @@ impl NSArray { } } #[doc = "NSKeyValueCoding"] -impl NSDictionary { +impl NSDictionary { pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { msg_send_id![self, valueForKey: key] } } #[doc = "NSKeyValueCoding"] -impl NSMutableDictionary { +impl NSMutableDictionary { pub unsafe fn setValue_forKey(&self, value: Option<&ObjectType>, key: &NSString) { msg_send![self, setValue: value, forKey: key] } } #[doc = "NSKeyValueCoding"] -impl NSOrderedSet { +impl NSOrderedSet { pub unsafe fn valueForKey(&self, key: &NSString) -> Id { msg_send_id![self, valueForKey: key] } @@ -122,7 +122,7 @@ impl NSOrderedSet { } } #[doc = "NSKeyValueCoding"] -impl NSSet { +impl NSSet { pub unsafe fn valueForKey(&self, key: &NSString) -> Id { msg_send_id![self, valueForKey: key] } diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 9c072d155..9433bc9fc 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -62,7 +62,7 @@ impl NSObject { } } #[doc = "NSKeyValueObserverRegistration"] -impl NSArray { +impl NSArray { pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( &self, observer: &NSObject, @@ -141,7 +141,7 @@ impl NSArray { } } #[doc = "NSKeyValueObserverRegistration"] -impl NSOrderedSet { +impl NSOrderedSet { pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, @@ -175,7 +175,7 @@ impl NSOrderedSet { } } #[doc = "NSKeyValueObserverRegistration"] -impl NSSet { +impl NSSet { pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 7b52e983a..b1be00d6d 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -7,14 +7,14 @@ use crate::Foundation::generated::NSString::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSMapTable; - unsafe impl ClassType for NSMapTable { + pub struct NSMapTable; + unsafe impl ClassType for NSMapTable { type Super = NSObject; } ); -impl NSMapTable { +impl NSMapTable { pub unsafe fn initWithKeyOptions_valueOptions_capacity( &self, keyOptions: NSPointerFunctionsOptions, diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index acc17700c..65f53cfb5 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -4,14 +4,14 @@ use crate::Foundation::generated::NSUnit::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSMeasurement; - unsafe impl ClassType for NSMeasurement { + pub struct NSMeasurement; + unsafe impl ClassType for NSMeasurement { type Super = NSObject; } ); -impl NSMeasurement { +impl NSMeasurement { pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index d3b10260e..105c6d9ee 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -3,14 +3,14 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSOrderedCollectionChange; - unsafe impl ClassType for NSOrderedCollectionChange { + pub struct NSOrderedCollectionChange; + unsafe impl ClassType for NSOrderedCollectionChange { type Super = NSObject; } ); -impl NSOrderedCollectionChange { +impl NSOrderedCollectionChange { pub unsafe fn changeWithObject_type_index( anObject: Option<&ObjectType>, type_: NSCollectionChangeType, diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 9b607bada..cd2ec0058 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -6,14 +6,14 @@ use crate::Foundation::generated::NSOrderedCollectionChange::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSOrderedCollectionDifference; - unsafe impl ClassType for NSOrderedCollectionDifference { + pub struct NSOrderedCollectionDifference; + unsafe impl ClassType for NSOrderedCollectionDifference { type Super = NSObject; } ); -impl NSOrderedCollectionDifference { +impl NSOrderedCollectionDifference { pub unsafe fn initWithChanges(&self, changes: TodoGenerics) -> Id { msg_send_id![self, initWithChanges: changes] } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 1a4de3e07..90100d0a9 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -11,14 +11,14 @@ use crate::Foundation::generated::NSRange::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSOrderedSet; - unsafe impl ClassType for NSOrderedSet { + pub struct NSOrderedSet; + unsafe impl ClassType for NSOrderedSet { type Super = NSObject; } ); -impl NSOrderedSet { +impl NSOrderedSet { pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Id { msg_send_id![self, objectAtIndex: idx] } @@ -43,7 +43,7 @@ impl NSOrderedSet { } } #[doc = "NSExtendedOrderedSet"] -impl NSOrderedSet { +impl NSOrderedSet { pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { msg_send![self, getObjects: objects, range: range] } @@ -208,7 +208,7 @@ impl NSOrderedSet { } } #[doc = "NSOrderedSetCreation"] -impl NSOrderedSet { +impl NSOrderedSet { pub unsafe fn orderedSet() -> Id { msg_send_id![Self::class(), orderedSet] } @@ -304,7 +304,7 @@ impl NSOrderedSet { } } #[doc = "NSOrderedSetDiffing"] -impl NSOrderedSet { +impl NSOrderedSet { pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( &self, other: TodoGenerics, @@ -332,14 +332,14 @@ impl NSOrderedSet { msg_send![self, orderedSetByApplyingDifference: difference] } } -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSMutableOrderedSet; - unsafe impl ClassType for NSMutableOrderedSet { + pub struct NSMutableOrderedSet; + unsafe impl ClassType for NSMutableOrderedSet { type Super = NSOrderedSet; } ); -impl NSMutableOrderedSet { +impl NSMutableOrderedSet { pub unsafe fn insertObject_atIndex(&self, object: &ObjectType, idx: NSUInteger) { msg_send![self, insertObject: object, atIndex: idx] } @@ -360,7 +360,7 @@ impl NSMutableOrderedSet { } } #[doc = "NSExtendedMutableOrderedSet"] -impl NSMutableOrderedSet { +impl NSMutableOrderedSet { pub unsafe fn addObject(&self, object: &ObjectType) { msg_send![self, addObject: object] } @@ -463,13 +463,13 @@ impl NSMutableOrderedSet { } } #[doc = "NSMutableOrderedSetCreation"] -impl NSMutableOrderedSet { +impl NSMutableOrderedSet { pub unsafe fn orderedSetWithCapacity(numItems: NSUInteger) -> Id { msg_send_id![Self::class(), orderedSetWithCapacity: numItems] } } #[doc = "NSMutableOrderedSetDiffing"] -impl NSMutableOrderedSet { +impl NSMutableOrderedSet { pub unsafe fn applyDifference(&self, difference: TodoGenerics) { msg_send![self, applyDifference: difference] } diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 6eea9959a..8b04b04f3 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -75,37 +75,37 @@ impl NSPredicate { } } #[doc = "NSPredicateSupport"] -impl NSArray { +impl NSArray { pub unsafe fn filteredArrayUsingPredicate(&self, predicate: &NSPredicate) -> TodoGenerics { msg_send![self, filteredArrayUsingPredicate: predicate] } } #[doc = "NSPredicateSupport"] -impl NSMutableArray { +impl NSMutableArray { pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate) { msg_send![self, filterUsingPredicate: predicate] } } #[doc = "NSPredicateSupport"] -impl NSSet { +impl NSSet { pub unsafe fn filteredSetUsingPredicate(&self, predicate: &NSPredicate) -> TodoGenerics { msg_send![self, filteredSetUsingPredicate: predicate] } } #[doc = "NSPredicateSupport"] -impl NSMutableSet { +impl NSMutableSet { pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate) { msg_send![self, filterUsingPredicate: predicate] } } #[doc = "NSPredicateSupport"] -impl NSOrderedSet { +impl NSOrderedSet { pub unsafe fn filteredOrderedSetUsingPredicate(&self, p: &NSPredicate) -> TodoGenerics { msg_send![self, filteredOrderedSetUsingPredicate: p] } } #[doc = "NSPredicateSupport"] -impl NSMutableOrderedSet { +impl NSMutableOrderedSet { pub unsafe fn filterUsingPredicate(&self, p: &NSPredicate) { msg_send![self, filterUsingPredicate: p] } diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index f6b7d225f..335e73b2c 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -7,14 +7,14 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSSet; - unsafe impl ClassType for NSSet { + pub struct NSSet; + unsafe impl ClassType for NSSet { type Super = NSObject; } ); -impl NSSet { +impl NSSet { pub unsafe fn member(&self, object: &ObjectType) -> Option> { msg_send_id![self, member: object] } @@ -39,7 +39,7 @@ impl NSSet { } } #[doc = "NSExtendedSet"] -impl NSSet { +impl NSSet { pub unsafe fn anyObject(&self) -> Option> { msg_send_id![self, anyObject] } @@ -109,7 +109,7 @@ impl NSSet { } } #[doc = "NSSetCreation"] -impl NSSet { +impl NSSet { pub unsafe fn set() -> Id { msg_send_id![Self::class(), set] } @@ -135,14 +135,14 @@ impl NSSet { msg_send_id![self, initWithArray: array] } } -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSMutableSet; - unsafe impl ClassType for NSMutableSet { + pub struct NSMutableSet; + unsafe impl ClassType for NSMutableSet { type Super = NSSet; } ); -impl NSMutableSet { +impl NSMutableSet { pub unsafe fn addObject(&self, object: &ObjectType) { msg_send![self, addObject: object] } @@ -160,7 +160,7 @@ impl NSMutableSet { } } #[doc = "NSExtendedMutableSet"] -impl NSMutableSet { +impl NSMutableSet { pub unsafe fn addObjectsFromArray(&self, array: TodoGenerics) { msg_send![self, addObjectsFromArray: array] } @@ -181,19 +181,19 @@ impl NSMutableSet { } } #[doc = "NSMutableSetCreation"] -impl NSMutableSet { +impl NSMutableSet { pub unsafe fn setWithCapacity(numItems: NSUInteger) -> Id { msg_send_id![Self::class(), setWithCapacity: numItems] } } -extern_class!( +__inner_extern_class!( #[derive(Debug)] - pub struct NSCountedSet; - unsafe impl ClassType for NSCountedSet { + pub struct NSCountedSet; + unsafe impl ClassType for NSCountedSet { type Super = NSMutableSet; } ); -impl NSCountedSet { +impl NSCountedSet { pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { msg_send_id![self, initWithCapacity: numItems] } diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index dbc83bc29..ebde52ddf 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -110,7 +110,7 @@ impl NSSortDescriptor { } } #[doc = "NSSortDescriptorSorting"] -impl NSSet { +impl NSSet { pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: TodoGenerics, @@ -119,7 +119,7 @@ impl NSSet { } } #[doc = "NSSortDescriptorSorting"] -impl NSArray { +impl NSArray { pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: TodoGenerics, @@ -128,13 +128,13 @@ impl NSArray { } } #[doc = "NSSortDescriptorSorting"] -impl NSMutableArray { +impl NSMutableArray { pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: TodoGenerics) { msg_send![self, sortUsingDescriptors: sortDescriptors] } } #[doc = "NSKeyValueSorting"] -impl NSOrderedSet { +impl NSOrderedSet { pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: TodoGenerics, @@ -143,7 +143,7 @@ impl NSOrderedSet { } } #[doc = "NSKeyValueSorting"] -impl NSMutableOrderedSet { +impl NSMutableOrderedSet { pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: TodoGenerics) { msg_send![self, sortUsingDescriptors: sortDescriptors] } From ac6a7062b8a5234aab7479f5c6849b7f95f2b875 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 16:03:57 +0200 Subject: [PATCH 038/131] Improve pointers to objects --- crates/header-translator/src/rust_type.rs | 24 +++++-- .../Foundation/NSAppleEventDescriptor.rs | 2 +- .../src/generated/Foundation/NSArray.rs | 6 +- .../Foundation/NSAttributedString.rs | 6 +- .../src/generated/Foundation/NSBundle.rs | 4 +- .../src/generated/Foundation/NSCalendar.rs | 6 +- .../src/generated/Foundation/NSCoder.rs | 8 +-- .../icrate/src/generated/Foundation/NSData.rs | 20 +++--- .../Foundation/NSDateComponentsFormatter.rs | 4 +- .../generated/Foundation/NSDateFormatter.rs | 4 +- .../src/generated/Foundation/NSDictionary.rs | 6 +- .../generated/Foundation/NSEnergyFormatter.rs | 4 +- .../generated/Foundation/NSFileCoordinator.rs | 10 +-- .../src/generated/Foundation/NSFileHandle.rs | 28 ++++---- .../src/generated/Foundation/NSFileManager.rs | 66 +++++++++---------- .../src/generated/Foundation/NSFileVersion.rs | 8 +-- .../src/generated/Foundation/NSFileWrapper.rs | 6 +- .../src/generated/Foundation/NSFormatter.rs | 12 ++-- .../Foundation/NSJSONSerialization.rs | 8 +-- .../generated/Foundation/NSKeyValueCoding.rs | 8 +-- .../generated/Foundation/NSKeyedArchiver.rs | 18 ++--- .../generated/Foundation/NSLengthFormatter.rs | 4 +- .../generated/Foundation/NSMassFormatter.rs | 4 +- .../src/generated/Foundation/NSMorphology.rs | 2 +- .../src/generated/Foundation/NSNetServices.rs | 4 +- .../generated/Foundation/NSNumberFormatter.rs | 4 +- .../NSPersonNameComponentsFormatter.rs | 4 +- .../generated/Foundation/NSPropertyList.rs | 12 ++-- .../Foundation/NSRegularExpression.rs | 8 +-- .../src/generated/Foundation/NSScanner.rs | 8 +-- .../src/generated/Foundation/NSStream.rs | 12 ++-- .../src/generated/Foundation/NSString.rs | 22 +++---- .../icrate/src/generated/Foundation/NSTask.rs | 4 +- .../icrate/src/generated/Foundation/NSURL.rs | 35 +++++----- .../generated/Foundation/NSURLConnection.rs | 4 +- .../generated/Foundation/NSUserScriptTask.rs | 2 +- .../src/generated/Foundation/NSXMLDTD.rs | 4 +- .../src/generated/Foundation/NSXMLDocument.rs | 14 ++-- .../src/generated/Foundation/NSXMLElement.rs | 2 +- .../src/generated/Foundation/NSXMLNode.rs | 6 +- 40 files changed, 208 insertions(+), 205 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index fe7a54c00..878914093 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -138,14 +138,28 @@ impl RustType { ObjCClass => Self::Class { nullability }, ObjCSel => Self::Sel { nullability }, Pointer => { - println!("{:?}", &ty); - let pointee = ty.get_pointee_type().expect("pointer type to have pointee"); - println!("{:?}", &pointee); - let pointee = Self::parse(pointee, false, is_consumed); + let is_const = ty.is_const_qualified(); + let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + let pointee = Self::parse(ty, false, is_consumed); + let pointee = match pointee { + Self::Id { + name, + is_return, + nullability, + } => { + let is_const = ty.is_const_qualified(); + Self::Pointer { + nullability, + is_const, + pointee: Box::new(Self::TypeDef(name)), + } + } + pointee => pointee, + }; Self::Pointer { nullability, - is_const: ty.is_const_qualified(), + is_const, pointee: Box::new(pointee), } } diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 7cd3ad0c5..fca8bcfba 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -194,7 +194,7 @@ impl NSAppleEventDescriptor { &self, sendOptions: NSAppleEventSendOptions, timeoutInSeconds: NSTimeInterval, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index add7b8e3f..f01766267 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -127,7 +127,7 @@ impl NSArray { pub unsafe fn subarrayWithRange(&self, range: NSRange) -> TodoGenerics { msg_send![self, subarrayWithRange: range] } - pub unsafe fn writeToURL_error(&self, url: &NSURL, error: *mut Option<&NSError>) -> bool { + pub unsafe fn writeToURL_error(&self, url: &NSURL, error: *mut *mut NSError) -> bool { msg_send![self, writeToURL: url, error: error] } pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { @@ -291,13 +291,13 @@ impl NSArray { pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![self, initWithContentsOfURL: url, error: error] } pub unsafe fn arrayWithContentsOfURL_error( url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![Self::class(), arrayWithContentsOfURL: url, error: error] } diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index f0042a53b..2cb3687cd 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -241,7 +241,7 @@ impl NSAttributedString { markdownFile: &NSURL, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -256,7 +256,7 @@ impl NSAttributedString { markdown: &NSData, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -271,7 +271,7 @@ impl NSAttributedString { markdownString: &NSString, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index f4349837d..c168121b4 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -47,10 +47,10 @@ impl NSBundle { pub unsafe fn unload(&self) -> bool { msg_send![self, unload] } - pub unsafe fn preflightAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + pub unsafe fn preflightAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, preflightAndReturnError: error] } - pub unsafe fn loadAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + pub unsafe fn loadAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, loadAndReturnError: error] } pub unsafe fn URLForAuxiliaryExecutable( diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 58a6d520e..f1469a61d 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -67,7 +67,7 @@ impl NSCalendar { pub unsafe fn rangeOfUnit_startDate_interval_forDate( &self, unit: NSCalendarUnit, - datep: *mut Option<&NSDate>, + datep: *mut *mut NSDate, tip: *mut NSTimeInterval, date: &NSDate, ) -> bool { @@ -273,7 +273,7 @@ impl NSCalendar { } pub unsafe fn rangeOfWeekendStartDate_interval_containingDate( &self, - datep: *mut Option<&NSDate>, + datep: *mut *mut NSDate, tip: *mut NSTimeInterval, date: &NSDate, ) -> bool { @@ -286,7 +286,7 @@ impl NSCalendar { } pub unsafe fn nextWeekendStartDate_interval_options_afterDate( &self, - datep: *mut Option<&NSDate>, + datep: *mut *mut NSDate, tip: *mut NSTimeInterval, options: NSCalendarOptions, date: &NSDate, diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 676cddb30..21eee5eb8 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -68,7 +68,7 @@ impl NSCoder { } pub unsafe fn decodeTopLevelObjectAndReturnError( &self, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, decodeTopLevelObjectAndReturnError: error] } @@ -144,7 +144,7 @@ impl NSCoder { pub unsafe fn decodeTopLevelObjectForKey_error( &self, key: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, decodeTopLevelObjectForKey: key, error: error] } @@ -190,7 +190,7 @@ impl NSCoder { &self, aClass: &Class, key: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -230,7 +230,7 @@ impl NSCoder { &self, classes: TodoGenerics, key: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 07d95044c..9b7822afd 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -46,7 +46,7 @@ impl NSData { &self, path: &NSString, writeOptionsMask: NSDataWritingOptions, - errorPtr: *mut Option<&NSError>, + errorPtr: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -59,7 +59,7 @@ impl NSData { &self, url: &NSURL, writeOptionsMask: NSDataWritingOptions, - errorPtr: *mut Option<&NSError>, + errorPtr: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -117,7 +117,7 @@ impl NSData { pub unsafe fn dataWithContentsOfFile_options_error( path: &NSString, readOptionsMask: NSDataReadingOptions, - errorPtr: *mut Option<&NSError>, + errorPtr: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -129,7 +129,7 @@ impl NSData { pub unsafe fn dataWithContentsOfURL_options_error( url: &NSURL, readOptionsMask: NSDataReadingOptions, - errorPtr: *mut Option<&NSError>, + errorPtr: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -188,7 +188,7 @@ impl NSData { &self, path: &NSString, readOptionsMask: NSDataReadingOptions, - errorPtr: *mut Option<&NSError>, + errorPtr: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -201,7 +201,7 @@ impl NSData { &self, url: &NSURL, readOptionsMask: NSDataReadingOptions, - errorPtr: *mut Option<&NSError>, + errorPtr: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -265,7 +265,7 @@ impl NSData { pub unsafe fn decompressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -276,7 +276,7 @@ impl NSData { pub unsafe fn compressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, compressedDataUsingAlgorithm: algorithm, error: error] } @@ -377,14 +377,14 @@ impl NSMutableData { pub unsafe fn decompressUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, decompressUsingAlgorithm: algorithm, error: error] } pub unsafe fn compressUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, compressUsingAlgorithm: algorithm, error: error] } diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 1755c903f..b24c18994 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -50,9 +50,9 @@ impl NSDateComponentsFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut Option<&Object>, + obj: *mut *mut Object, string: &NSString, - error: *mut Option<&NSString>, + error: *mut *mut NSString, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 20b5cc321..eaf0bdf33 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -22,10 +22,10 @@ extern_class!( impl NSDateFormatter { pub unsafe fn getObjectValue_forString_range_error( &self, - obj: *mut Option<&Object>, + obj: *mut *mut Object, string: &NSString, rangep: *mut NSRange, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 33f6e754a..6539d8af4 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -68,7 +68,7 @@ impl NSDictionary { ) -> TodoGenerics { msg_send![self, objectsForKeys: keys, notFoundMarker: marker] } - pub unsafe fn writeToURL_error(&self, url: &NSURL, error: *mut Option<&NSError>) -> bool { + pub unsafe fn writeToURL_error(&self, url: &NSURL, error: *mut *mut NSError) -> bool { msg_send![self, writeToURL: url, error: error] } pub unsafe fn keysSortedByValueUsingSelector(&self, comparator: Sel) -> TodoGenerics { @@ -212,13 +212,13 @@ impl NSDictionary { pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![self, initWithContentsOfURL: url, error: error] } pub unsafe fn dictionaryWithContentsOfURL_error( url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index a6abded6c..4eef5e1c3 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -37,9 +37,9 @@ impl NSEnergyFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut Option<&Object>, + obj: *mut *mut Object, string: &NSString, - error: *mut Option<&NSString>, + error: *mut *mut NSString, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 4d7b7a845..e1b8a5406 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -71,7 +71,7 @@ impl NSFileCoordinator { &self, url: &NSURL, options: NSFileCoordinatorReadingOptions, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, reader: TodoBlock, ) { msg_send![ @@ -86,7 +86,7 @@ impl NSFileCoordinator { &self, url: &NSURL, options: NSFileCoordinatorWritingOptions, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, writer: TodoBlock, ) { msg_send![ @@ -103,7 +103,7 @@ impl NSFileCoordinator { readingOptions: NSFileCoordinatorReadingOptions, writingURL: &NSURL, writingOptions: NSFileCoordinatorWritingOptions, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, readerWriter: TodoBlock, ) { msg_send![ @@ -122,7 +122,7 @@ impl NSFileCoordinator { options1: NSFileCoordinatorWritingOptions, url2: &NSURL, options2: NSFileCoordinatorWritingOptions, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, writer: TodoBlock, ) { msg_send![ @@ -141,7 +141,7 @@ impl NSFileCoordinator { readingOptions: NSFileCoordinatorReadingOptions, writingURLs: TodoGenerics, writingOptions: NSFileCoordinatorWritingOptions, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, batchAccessor: TodoBlock, ) { msg_send![ diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 8e9a65fa0..50403e3f4 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -31,52 +31,48 @@ impl NSFileHandle { } pub unsafe fn readDataToEndOfFileAndReturnError( &self, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, readDataToEndOfFileAndReturnError: error] } pub unsafe fn readDataUpToLength_error( &self, length: NSUInteger, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, readDataUpToLength: length, error: error] } - pub unsafe fn writeData_error(&self, data: &NSData, error: *mut Option<&NSError>) -> bool { + pub unsafe fn writeData_error(&self, data: &NSData, error: *mut *mut NSError) -> bool { msg_send![self, writeData: data, error: error] } pub unsafe fn getOffset_error( &self, offsetInFile: NonNull, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, getOffset: offsetInFile, error: error] } pub unsafe fn seekToEndReturningOffset_error( &self, offsetInFile: *mut c_ulonglong, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, seekToEndReturningOffset: offsetInFile, error: error] } - pub unsafe fn seekToOffset_error( - &self, - offset: c_ulonglong, - error: *mut Option<&NSError>, - ) -> bool { + pub unsafe fn seekToOffset_error(&self, offset: c_ulonglong, error: *mut *mut NSError) -> bool { msg_send![self, seekToOffset: offset, error: error] } pub unsafe fn truncateAtOffset_error( &self, offset: c_ulonglong, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, truncateAtOffset: offset, error: error] } - pub unsafe fn synchronizeAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + pub unsafe fn synchronizeAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, synchronizeAndReturnError: error] } - pub unsafe fn closeAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + pub unsafe fn closeAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, closeAndReturnError: error] } pub unsafe fn availableData(&self) -> Id { @@ -96,7 +92,7 @@ impl NSFileHandle { } pub unsafe fn fileHandleForReadingFromURL_error( url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -106,13 +102,13 @@ impl NSFileHandle { } pub unsafe fn fileHandleForWritingToURL_error( url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![Self::class(), fileHandleForWritingToURL: url, error: error] } pub unsafe fn fileHandleForUpdatingURL_error( url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![Self::class(), fileHandleForUpdatingURL: url, error: error] } diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 84a6b4a68..321d92a50 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -59,7 +59,7 @@ impl NSFileManager { url: &NSURL, keys: TodoGenerics, mask: NSDirectoryEnumerationOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![ self, @@ -82,7 +82,7 @@ impl NSFileManager { domain: NSSearchPathDomainMask, url: Option<&NSURL>, shouldCreate: bool, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -98,7 +98,7 @@ impl NSFileManager { outRelationship: NonNull, directoryURL: &NSURL, otherURL: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -114,7 +114,7 @@ impl NSFileManager { directory: NSSearchPathDirectory, domainMask: NSSearchPathDomainMask, url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -130,7 +130,7 @@ impl NSFileManager { url: &NSURL, createIntermediates: bool, attributes: TodoGenerics, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -144,7 +144,7 @@ impl NSFileManager { &self, url: &NSURL, destURL: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -157,7 +157,7 @@ impl NSFileManager { &self, attributes: TodoGenerics, path: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -171,7 +171,7 @@ impl NSFileManager { path: &NSString, createIntermediates: bool, attributes: TodoGenerics, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -184,28 +184,28 @@ impl NSFileManager { pub unsafe fn contentsOfDirectoryAtPath_error( &self, path: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![self, contentsOfDirectoryAtPath: path, error: error] } pub unsafe fn subpathsOfDirectoryAtPath_error( &self, path: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![self, subpathsOfDirectoryAtPath: path, error: error] } pub unsafe fn attributesOfItemAtPath_error( &self, path: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![self, attributesOfItemAtPath: path, error: error] } pub unsafe fn attributesOfFileSystemForPath_error( &self, path: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![self, attributesOfFileSystemForPath: path, error: error] } @@ -213,7 +213,7 @@ impl NSFileManager { &self, path: &NSString, destPath: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -225,7 +225,7 @@ impl NSFileManager { pub unsafe fn destinationOfSymbolicLinkAtPath_error( &self, path: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, destinationOfSymbolicLinkAtPath: path, error: error] } @@ -233,7 +233,7 @@ impl NSFileManager { &self, srcPath: &NSString, dstPath: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, copyItemAtPath: srcPath, toPath: dstPath, error: error] } @@ -241,7 +241,7 @@ impl NSFileManager { &self, srcPath: &NSString, dstPath: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, moveItemAtPath: srcPath, toPath: dstPath, error: error] } @@ -249,22 +249,18 @@ impl NSFileManager { &self, srcPath: &NSString, dstPath: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, linkItemAtPath: srcPath, toPath: dstPath, error: error] } - pub unsafe fn removeItemAtPath_error( - &self, - path: &NSString, - error: *mut Option<&NSError>, - ) -> bool { + pub unsafe fn removeItemAtPath_error(&self, path: &NSString, error: *mut *mut NSError) -> bool { msg_send![self, removeItemAtPath: path, error: error] } pub unsafe fn copyItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, copyItemAtURL: srcURL, toURL: dstURL, error: error] } @@ -272,7 +268,7 @@ impl NSFileManager { &self, srcURL: &NSURL, dstURL: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, moveItemAtURL: srcURL, toURL: dstURL, error: error] } @@ -280,18 +276,18 @@ impl NSFileManager { &self, srcURL: &NSURL, dstURL: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, linkItemAtURL: srcURL, toURL: dstURL, error: error] } - pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL, error: *mut Option<&NSError>) -> bool { + pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL, error: *mut *mut NSError) -> bool { msg_send![self, removeItemAtURL: URL, error: error] } pub unsafe fn trashItemAtURL_resultingItemURL_error( &self, url: &NSURL, - outResultingURL: *mut Option<&NSURL>, - error: *mut Option<&NSError>, + outResultingURL: *mut *mut NSURL, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -461,8 +457,8 @@ impl NSFileManager { newItemURL: &NSURL, backupItemName: Option<&NSString>, options: NSFileManagerItemReplacementOptions, - resultingURL: *mut Option<&NSURL>, - error: *mut Option<&NSError>, + resultingURL: *mut *mut NSURL, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -479,7 +475,7 @@ impl NSFileManager { flag: bool, url: &NSURL, destinationURL: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -495,14 +491,14 @@ impl NSFileManager { pub unsafe fn startDownloadingUbiquitousItemAtURL_error( &self, url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, startDownloadingUbiquitousItemAtURL: url, error: error] } pub unsafe fn evictUbiquitousItemAtURL_error( &self, url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, evictUbiquitousItemAtURL: url, error: error] } @@ -515,8 +511,8 @@ impl NSFileManager { pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( &self, url: &NSURL, - outDate: *mut Option<&NSDate>, - error: *mut Option<&NSError>, + outDate: *mut *mut NSDate, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index 395578548..ee18b23e8 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -51,7 +51,7 @@ impl NSFileVersion { url: &NSURL, contentsURL: &NSURL, options: NSFileVersionAddingOptions, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -71,16 +71,16 @@ impl NSFileVersion { &self, url: &NSURL, options: NSFileVersionReplacingOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, replaceItemAtURL: url, options: options, error: error] } - pub unsafe fn removeAndReturnError(&self, outError: *mut Option<&NSError>) -> bool { + pub unsafe fn removeAndReturnError(&self, outError: *mut *mut NSError) -> bool { msg_send![self, removeAndReturnError: outError] } pub unsafe fn removeOtherVersionsOfItemAtURL_error( url: &NSURL, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, ) -> bool { msg_send![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 67e362b9b..0eca09a0a 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -20,7 +20,7 @@ impl NSFileWrapper { &self, url: &NSURL, options: NSFileWrapperReadingOptions, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, ) -> Option> { msg_send_id![self, initWithURL: url, options: options, error: outError] } @@ -55,7 +55,7 @@ impl NSFileWrapper { &self, url: &NSURL, options: NSFileWrapperReadingOptions, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, ) -> bool { msg_send![self, readFromURL: url, options: options, error: outError] } @@ -64,7 +64,7 @@ impl NSFileWrapper { url: &NSURL, options: NSFileWrapperWritingOptions, originalContentsURL: Option<&NSURL>, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index 04c390851..cf5b56787 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -38,9 +38,9 @@ impl NSFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut Option<&Object>, + obj: *mut *mut Object, string: &NSString, - error: *mut Option<&NSString>, + error: *mut *mut NSString, ) -> bool { msg_send![ self, @@ -52,8 +52,8 @@ impl NSFormatter { pub unsafe fn isPartialStringValid_newEditingString_errorDescription( &self, partialString: &NSString, - newString: *mut Option<&NSString>, - error: *mut Option<&NSString>, + newString: *mut *mut NSString, + error: *mut *mut NSString, ) -> bool { msg_send![ self, @@ -64,11 +64,11 @@ impl NSFormatter { } pub unsafe fn isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription( &self, - partialStringPtr: NonNull<&NSString>, + partialStringPtr: NonNull>, proposedSelRangePtr: NSRangePointer, origString: &NSString, origSelRange: NSRange, - error: *mut Option<&NSString>, + error: *mut *mut NSString, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 8ee0b6b85..9b45ec133 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -21,7 +21,7 @@ impl NSJSONSerialization { pub unsafe fn dataWithJSONObject_options_error( obj: &Object, opt: NSJSONWritingOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -33,7 +33,7 @@ impl NSJSONSerialization { pub unsafe fn JSONObjectWithData_options_error( data: &NSData, opt: NSJSONReadingOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -46,7 +46,7 @@ impl NSJSONSerialization { obj: &Object, stream: &NSOutputStream, opt: NSJSONWritingOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> NSInteger { msg_send![ Self::class(), @@ -59,7 +59,7 @@ impl NSJSONSerialization { pub unsafe fn JSONObjectWithStream_options_error( stream: &NSInputStream, opt: NSJSONReadingOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index 410992348..3baa1282c 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -20,9 +20,9 @@ impl NSObject { } pub unsafe fn validateValue_forKey_error( &self, - ioValue: NonNull>, + ioValue: NonNull<*mut Object>, inKey: &NSString, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, ) -> bool { msg_send![self, validateValue: ioValue, forKey: inKey, error: outError] } @@ -46,9 +46,9 @@ impl NSObject { } pub unsafe fn validateValue_forKeyPath_error( &self, - ioValue: NonNull>, + ioValue: NonNull<*mut Object>, inKeyPath: &NSString, - outError: *mut Option<&NSError>, + outError: *mut *mut NSError, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 845901887..10b516be1 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -24,7 +24,7 @@ impl NSKeyedArchiver { pub unsafe fn archivedDataWithRootObject_requiringSecureCoding_error( object: &Object, requiresSecureCoding: bool, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -125,14 +125,14 @@ impl NSKeyedUnarchiver { pub unsafe fn initForReadingFromData_error( &self, data: &NSData, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, initForReadingFromData: data, error: error] } pub unsafe fn unarchivedObjectOfClass_fromData_error( cls: &Class, data: &NSData, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -144,7 +144,7 @@ impl NSKeyedUnarchiver { pub unsafe fn unarchivedArrayOfObjectsOfClass_fromData_error( cls: &Class, data: &NSData, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -157,7 +157,7 @@ impl NSKeyedUnarchiver { keyCls: &Class, valueCls: &Class, data: &NSData, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -170,7 +170,7 @@ impl NSKeyedUnarchiver { pub unsafe fn unarchivedObjectOfClasses_fromData_error( classes: TodoGenerics, data: &NSData, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -182,7 +182,7 @@ impl NSKeyedUnarchiver { pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( classes: TodoGenerics, data: &NSData, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -195,7 +195,7 @@ impl NSKeyedUnarchiver { keyClasses: TodoGenerics, valueClasses: TodoGenerics, data: &NSData, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -216,7 +216,7 @@ impl NSKeyedUnarchiver { } pub unsafe fn unarchiveTopLevelObjectWithData_error( data: &NSData, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index b6c68262b..f57031b05 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -37,9 +37,9 @@ impl NSLengthFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut Option<&Object>, + obj: *mut *mut Object, string: &NSString, - error: *mut Option<&NSString>, + error: *mut *mut NSString, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index b2338ea39..39b4a1c5f 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -42,9 +42,9 @@ impl NSMassFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut Option<&Object>, + obj: *mut *mut Object, string: &NSString, - error: *mut Option<&NSString>, + error: *mut *mut NSString, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index ccb536086..1fae224f6 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -45,7 +45,7 @@ impl NSMorphology { &self, features: Option<&NSMorphologyCustomPronoun>, language: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 7e8349345..772906513 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -68,8 +68,8 @@ impl NSNetService { } pub unsafe fn getInputStream_outputStream( &self, - inputStream: *mut Option<&NSInputStream>, - outputStream: *mut Option<&NSOutputStream>, + inputStream: *mut *mut NSInputStream, + outputStream: *mut *mut NSOutputStream, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 0e41c37cc..9bdf99560 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -20,10 +20,10 @@ extern_class!( impl NSNumberFormatter { pub unsafe fn getObjectValue_forString_range_error( &self, - obj: *mut Option<&Object>, + obj: *mut *mut Object, string: &NSString, rangep: *mut NSRange, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index 79c40bd61..fcc275e02 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -44,9 +44,9 @@ impl NSPersonNameComponentsFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut Option<&Object>, + obj: *mut *mut Object, string: &NSString, - error: *mut Option<&NSString>, + error: *mut *mut NSString, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 88f751d5d..4a2b12d3d 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -27,7 +27,7 @@ impl NSPropertyListSerialization { plist: &Object, format: NSPropertyListFormat, opt: NSPropertyListWriteOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -42,7 +42,7 @@ impl NSPropertyListSerialization { stream: &NSOutputStream, format: NSPropertyListFormat, opt: NSPropertyListWriteOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> NSInteger { msg_send![ Self::class(), @@ -57,7 +57,7 @@ impl NSPropertyListSerialization { data: &NSData, opt: NSPropertyListReadOptions, format: *mut NSPropertyListFormat, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -71,7 +71,7 @@ impl NSPropertyListSerialization { stream: &NSInputStream, opt: NSPropertyListReadOptions, format: *mut NSPropertyListFormat, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -84,7 +84,7 @@ impl NSPropertyListSerialization { pub unsafe fn dataFromPropertyList_format_errorDescription( plist: &Object, format: NSPropertyListFormat, - errorString: *mut Option<&NSString>, + errorString: *mut *mut NSString, ) -> Option> { msg_send_id![ Self::class(), @@ -97,7 +97,7 @@ impl NSPropertyListSerialization { data: &NSData, opt: NSPropertyListMutabilityOptions, format: *mut NSPropertyListFormat, - errorString: *mut Option<&NSString>, + errorString: *mut *mut NSString, ) -> Option> { msg_send_id![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index e887fc2a6..01427f475 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -17,7 +17,7 @@ impl NSRegularExpression { pub unsafe fn regularExpressionWithPattern_options_error( pattern: &NSString, options: NSRegularExpressionOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -30,7 +30,7 @@ impl NSRegularExpression { &self, pattern: &NSString, options: NSRegularExpressionOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -183,7 +183,7 @@ extern_class!( impl NSDataDetector { pub unsafe fn dataDetectorWithTypes_error( checkingTypes: NSTextCheckingTypes, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -194,7 +194,7 @@ impl NSDataDetector { pub unsafe fn initWithTypes_error( &self, checkingTypes: NSTextCheckingTypes, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, initWithTypes: checkingTypes, error: error] } diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 4468617de..5c3d569c7 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -80,28 +80,28 @@ impl NSScanner { pub unsafe fn scanString_intoString( &self, string: &NSString, - result: *mut Option<&NSString>, + result: *mut *mut NSString, ) -> bool { msg_send![self, scanString: string, intoString: result] } pub unsafe fn scanCharactersFromSet_intoString( &self, set: &NSCharacterSet, - result: *mut Option<&NSString>, + result: *mut *mut NSString, ) -> bool { msg_send![self, scanCharactersFromSet: set, intoString: result] } pub unsafe fn scanUpToString_intoString( &self, string: &NSString, - result: *mut Option<&NSString>, + result: *mut *mut NSString, ) -> bool { msg_send![self, scanUpToString: string, intoString: result] } pub unsafe fn scanUpToCharactersFromSet_intoString( &self, set: &NSCharacterSet, - result: *mut Option<&NSString>, + result: *mut *mut NSString, ) -> bool { msg_send![self, scanUpToCharactersFromSet: set, intoString: result] } diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index a2cea94f1..ecb3defd5 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -120,8 +120,8 @@ impl NSStream { pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( hostname: &NSString, port: NSInteger, - inputStream: *mut Option<&NSInputStream>, - outputStream: *mut Option<&NSOutputStream>, + inputStream: *mut *mut NSInputStream, + outputStream: *mut *mut NSOutputStream, ) { msg_send![ Self::class(), @@ -134,8 +134,8 @@ impl NSStream { pub unsafe fn getStreamsToHost_port_inputStream_outputStream( host: &NSHost, port: NSInteger, - inputStream: *mut Option<&NSInputStream>, - outputStream: *mut Option<&NSOutputStream>, + inputStream: *mut *mut NSInputStream, + outputStream: *mut *mut NSOutputStream, ) { msg_send![ Self::class(), @@ -150,8 +150,8 @@ impl NSStream { impl NSStream { pub unsafe fn getBoundStreamsWithBufferSize_inputStream_outputStream( bufferSize: NSUInteger, - inputStream: *mut Option<&NSInputStream>, - outputStream: *mut Option<&NSOutputStream>, + inputStream: *mut *mut NSInputStream, + outputStream: *mut *mut NSOutputStream, ) { msg_send![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index f065d4b4a..6640a0ffa 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -418,7 +418,7 @@ impl NSString { url: &NSURL, useAuxiliaryFile: bool, enc: NSStringEncoding, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -433,7 +433,7 @@ impl NSString { path: &NSString, useAuxiliaryFile: bool, enc: NSStringEncoding, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -592,7 +592,7 @@ impl NSString { &self, url: &NSURL, enc: NSStringEncoding, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -605,7 +605,7 @@ impl NSString { &self, path: &NSString, enc: NSStringEncoding, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -617,7 +617,7 @@ impl NSString { pub unsafe fn stringWithContentsOfURL_encoding_error( url: &NSURL, enc: NSStringEncoding, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -629,7 +629,7 @@ impl NSString { pub unsafe fn stringWithContentsOfFile_encoding_error( path: &NSString, enc: NSStringEncoding, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -642,7 +642,7 @@ impl NSString { &self, url: &NSURL, enc: *mut NSStringEncoding, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -655,7 +655,7 @@ impl NSString { &self, path: &NSString, enc: *mut NSStringEncoding, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -667,7 +667,7 @@ impl NSString { pub unsafe fn stringWithContentsOfURL_usedEncoding_error( url: &NSURL, enc: *mut NSStringEncoding, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -679,7 +679,7 @@ impl NSString { pub unsafe fn stringWithContentsOfFile_usedEncoding_error( path: &NSString, enc: *mut NSStringEncoding, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -764,7 +764,7 @@ impl NSString { pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( data: &NSData, opts: TodoGenerics, - string: *mut Option<&NSString>, + string: *mut *mut NSString, usedLossyConversion: *mut bool, ) -> NSStringEncoding { msg_send![ diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index c2851feef..d549cd0a9 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -18,7 +18,7 @@ impl NSTask { pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } - pub unsafe fn launchAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + pub unsafe fn launchAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, launchAndReturnError: error] } pub unsafe fn interrupt(&self) { @@ -105,7 +105,7 @@ impl NSTask { pub unsafe fn launchedTaskWithExecutableURL_arguments_error_terminationHandler( url: &NSURL, arguments: TodoGenerics, - error: *mut Option<&NSError>, + error: *mut *mut NSError, terminationHandler: TodoBlock, ) -> Option> { msg_send_id![ diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index 70d20bf27..dd2495eb6 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -189,10 +189,7 @@ impl NSURL { maxLength: maxBufferLength ] } - pub unsafe fn checkResourceIsReachableAndReturnError( - &self, - error: *mut Option<&NSError>, - ) -> bool { + pub unsafe fn checkResourceIsReachableAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, checkResourceIsReachableAndReturnError: error] } pub unsafe fn isFileReferenceURL(&self) -> bool { @@ -203,16 +200,16 @@ impl NSURL { } pub unsafe fn getResourceValue_forKey_error( &self, - value: NonNull>, + value: NonNull<*mut Object>, key: &NSURLResourceKey, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, getResourceValue: value, forKey: key, error: error] } pub unsafe fn resourceValuesForKeys_error( &self, keys: TodoGenerics, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![self, resourceValuesForKeys: keys, error: error] } @@ -220,14 +217,14 @@ impl NSURL { &self, value: Option<&Object>, key: &NSURLResourceKey, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, setResourceValue: value, forKey: key, error: error] } pub unsafe fn setResourceValues_error( &self, keyedValues: TodoGenerics, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, setResourceValues: keyedValues, error: error] } @@ -249,7 +246,7 @@ impl NSURL { options: NSURLBookmarkCreationOptions, keys: TodoGenerics, relativeURL: Option<&NSURL>, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -265,7 +262,7 @@ impl NSURL { options: NSURLBookmarkResolutionOptions, relativeURL: Option<&NSURL>, isStale: *mut bool, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -281,7 +278,7 @@ impl NSURL { options: NSURLBookmarkResolutionOptions, relativeURL: Option<&NSURL>, isStale: *mut bool, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -306,7 +303,7 @@ impl NSURL { bookmarkData: &NSData, bookmarkFileURL: &NSURL, options: NSURLBookmarkFileCreationOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ Self::class(), @@ -318,7 +315,7 @@ impl NSURL { } pub unsafe fn bookmarkDataWithContentsOfURL_error( bookmarkFileURL: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -329,7 +326,7 @@ impl NSURL { pub unsafe fn URLByResolvingAliasFileAtURL_options_error( url: &NSURL, options: NSURLBookmarkResolutionOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), @@ -412,9 +409,9 @@ impl NSURL { impl NSURL { pub unsafe fn getPromisedItemResourceValue_forKey_error( &self, - value: NonNull>, + value: NonNull<*mut Object>, key: &NSURLResourceKey, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![ self, @@ -426,13 +423,13 @@ impl NSURL { pub unsafe fn promisedItemResourceValuesForKeys_error( &self, keys: TodoGenerics, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![self, promisedItemResourceValuesForKeys: keys, error: error] } pub unsafe fn checkPromisedItemIsReachableAndReturnError( &self, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> bool { msg_send![self, checkPromisedItemIsReachableAndReturnError: error] } diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index fb80e5507..93b15a657 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -87,8 +87,8 @@ pub type NSURLConnectionDownloadDelegate = NSObject; impl NSURLConnection { pub unsafe fn sendSynchronousRequest_returningResponse_error( request: &NSURLRequest, - response: *mut Option<&NSURLResponse>, - error: *mut Option<&NSError>, + response: *mut *mut NSURLResponse, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index e92f76026..f43bd804c 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -22,7 +22,7 @@ impl NSUserScriptTask { pub unsafe fn initWithURL_error( &self, url: &NSURL, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, initWithURL: url, error: error] } diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index 8c4342365..0d18d3538 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -29,7 +29,7 @@ impl NSXMLDTD { &self, url: &NSURL, mask: NSXMLNodeOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -42,7 +42,7 @@ impl NSXMLDTD { &self, data: &NSData, mask: NSXMLNodeOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, initWithData: data, options: mask, error: error] } diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index a9e761ef6..115739c8f 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -22,7 +22,7 @@ impl NSXMLDocument { &self, string: &NSString, mask: NSXMLNodeOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, initWithXMLString: string, options: mask, error: error] } @@ -30,7 +30,7 @@ impl NSXMLDocument { &self, url: &NSURL, mask: NSXMLNodeOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -43,7 +43,7 @@ impl NSXMLDocument { &self, data: &NSData, mask: NSXMLNodeOptions, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, initWithData: data, options: mask, error: error] } @@ -84,7 +84,7 @@ impl NSXMLDocument { &self, xslt: &NSData, arguments: TodoGenerics, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -97,7 +97,7 @@ impl NSXMLDocument { &self, xslt: &NSString, arguments: TodoGenerics, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -110,7 +110,7 @@ impl NSXMLDocument { &self, xsltURL: &NSURL, argument: TodoGenerics, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -119,7 +119,7 @@ impl NSXMLDocument { error: error ] } - pub unsafe fn validateAndReturnError(&self, error: *mut Option<&NSError>) -> bool { + pub unsafe fn validateAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, validateAndReturnError: error] } pub unsafe fn characterEncoding(&self) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index 02351f01b..a8fe1b087 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -36,7 +36,7 @@ impl NSXMLElement { pub unsafe fn initWithXMLString_error( &self, string: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, initWithXMLString: string, error: error] } diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 6d7d0f3f6..8e4bde297 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -143,7 +143,7 @@ impl NSXMLNode { pub unsafe fn nodesForXPath_error( &self, xpath: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> TodoGenerics { msg_send![self, nodesForXPath: xpath, error: error] } @@ -151,7 +151,7 @@ impl NSXMLNode { &self, xquery: &NSString, constants: TodoGenerics, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![ self, @@ -163,7 +163,7 @@ impl NSXMLNode { pub unsafe fn objectsForXQuery_error( &self, xquery: &NSString, - error: *mut Option<&NSError>, + error: *mut *mut NSError, ) -> Option> { msg_send_id![self, objectsForXQuery: xquery, error: error] } From 5a4c02f5f480df71bc0623a9b37853c47dadaedc Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 16:06:50 +0200 Subject: [PATCH 039/131] Refactor RustType::TypeDef --- crates/header-translator/src/rust_type.rs | 34 +++++++++++++++-------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 878914093..ce0324648 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -47,7 +47,9 @@ pub enum RustType { num_elements: usize, }, - TypeDef(String), + TypeDef { + name: String, + }, } impl RustType { @@ -151,7 +153,7 @@ impl RustType { Self::Pointer { nullability, is_const, - pointee: Box::new(Self::TypeDef(name)), + pointee: Box::new(Self::TypeDef { name }), } } pointee => pointee, @@ -181,8 +183,12 @@ impl RustType { nullability, } } - ObjCObject => Self::TypeDef("TodoGenerics".to_string()), - Attributed => Self::TypeDef("TodoAttributed".to_string()), + ObjCObject => Self::TypeDef { + name: "TodoGenerics".to_string(), + }, + Attributed => Self::TypeDef { + name: "TodoAttributed".to_string(), + }, _ => panic!("pointee was not objcinterface: {:?}", ty), } } @@ -208,14 +214,20 @@ impl RustType { nullability, } } else { - Self::TypeDef(typedef_name) + Self::TypeDef { name: typedef_name } } } } } - BlockPointer => Self::TypeDef("TodoBlock".to_string()), - FunctionPrototype => Self::TypeDef("TodoFunction".to_string()), - IncompleteArray => Self::TypeDef("TodoArray".to_string()), + BlockPointer => Self::TypeDef { + name: "TodoBlock".to_string(), + }, + FunctionPrototype => Self::TypeDef { + name: "TodoFunction".to_string(), + }, + IncompleteArray => Self::TypeDef { + name: "TodoArray".to_string(), + }, ConstantArray => { let element_type = Self::parse( ty.get_element_type().expect("array to have element type"), @@ -312,9 +324,9 @@ impl ToTokens for RustType { element_type, num_elements, } => quote!([#element_type; #num_elements]), - TypeDef(s) => { - let x = format_ident!("{}", s); - quote!(#x) + TypeDef { name } => { + let name = format_ident!("{}", name); + quote!(#name) } }; tokens.append_all(result); From 765227953002780c17bed24da105dfb016dde66a Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 16:35:35 +0200 Subject: [PATCH 040/131] Mostly support generics --- crates/header-translator/src/rust_type.rs | 97 +++++++--- .../src/generated/Foundation/NSAppleScript.rs | 8 +- .../src/generated/Foundation/NSArray.rs | 170 +++++++++++------- .../Foundation/NSAttributedString.rs | 28 +-- .../src/generated/Foundation/NSBundle.rs | 82 +++++---- .../Foundation/NSByteCountFormatter.rs | 7 +- .../src/generated/Foundation/NSCache.rs | 6 +- .../src/generated/Foundation/NSCalendar.rs | 72 ++++---- .../Foundation/NSClassDescription.rs | 24 +-- .../src/generated/Foundation/NSCoder.rs | 14 +- .../Foundation/NSCompoundPredicate.rs | 6 +- .../src/generated/Foundation/NSConnection.rs | 18 +- .../generated/Foundation/NSDateFormatter.rs | 126 +++++++------ .../generated/Foundation/NSDecimalNumber.rs | 20 +-- .../src/generated/Foundation/NSDictionary.rs | 165 ++++++++++------- .../src/generated/Foundation/NSEnumerator.rs | 4 +- .../src/generated/Foundation/NSError.rs | 16 +- .../src/generated/Foundation/NSException.rs | 8 +- .../src/generated/Foundation/NSExpression.rs | 10 +- .../generated/Foundation/NSExtensionItem.rs | 6 +- .../generated/Foundation/NSFileCoordinator.rs | 18 +- .../src/generated/Foundation/NSFileHandle.rs | 17 +- .../src/generated/Foundation/NSFileManager.rs | 86 +++++---- .../src/generated/Foundation/NSFileVersion.rs | 16 +- .../src/generated/Foundation/NSFileWrapper.rs | 12 +- .../src/generated/Foundation/NSFormatter.rs | 2 +- .../src/generated/Foundation/NSHTTPCookie.rs | 29 +-- .../Foundation/NSHTTPCookieStorage.rs | 23 ++- .../src/generated/Foundation/NSHashTable.rs | 34 ++-- .../icrate/src/generated/Foundation/NSHost.rs | 8 +- .../generated/Foundation/NSItemProvider.rs | 20 +-- .../generated/Foundation/NSKeyValueCoding.rs | 12 +- .../Foundation/NSKeyValueObserving.rs | 8 +- .../generated/Foundation/NSKeyedArchiver.rs | 24 +-- .../Foundation/NSLinguisticTagger.rs | 46 ++--- .../generated/Foundation/NSListFormatter.rs | 4 +- .../src/generated/Foundation/NSLocale.rs | 34 ++-- .../src/generated/Foundation/NSMapTable.rs | 32 ++-- .../src/generated/Foundation/NSMeasurement.rs | 13 +- .../src/generated/Foundation/NSMetadata.rs | 47 ++--- .../src/generated/Foundation/NSMorphology.rs | 4 +- .../src/generated/Foundation/NSNetServices.rs | 28 +-- .../generated/Foundation/NSNotification.rs | 4 +- .../Foundation/NSNotificationQueue.rs | 2 +- .../generated/Foundation/NSNumberFormatter.rs | 65 ++++--- .../src/generated/Foundation/NSOperation.rs | 14 +- .../Foundation/NSOrderedCollectionChange.rs | 8 +- .../NSOrderedCollectionDifference.rs | 27 +-- .../src/generated/Foundation/NSOrderedSet.rs | 132 ++++++++------ .../src/generated/Foundation/NSOrthography.rs | 23 +-- .../icrate/src/generated/Foundation/NSPort.rs | 12 +- .../src/generated/Foundation/NSPredicate.rs | 25 ++- .../src/generated/Foundation/NSProcessInfo.rs | 14 +- .../src/generated/Foundation/NSProgress.rs | 6 +- .../Foundation/NSRegularExpression.rs | 4 +- .../src/generated/Foundation/NSRunLoop.rs | 6 +- .../generated/Foundation/NSScriptCommand.rs | 10 +- .../Foundation/NSScriptCommandDescription.rs | 4 +- .../Foundation/NSScriptObjectSpecifiers.rs | 4 +- .../NSScriptStandardSuiteCommands.rs | 4 +- .../Foundation/NSScriptSuiteRegistry.rs | 18 +- .../Foundation/NSScriptWhoseTests.rs | 10 +- .../icrate/src/generated/Foundation/NSSet.rs | 72 ++++---- .../generated/Foundation/NSSortDescriptor.rs | 22 +-- .../src/generated/Foundation/NSSpellServer.rs | 6 +- .../src/generated/Foundation/NSStream.rs | 6 +- .../src/generated/Foundation/NSString.rs | 13 +- .../icrate/src/generated/Foundation/NSTask.rs | 16 +- .../Foundation/NSTextCheckingResult.rs | 28 +-- .../src/generated/Foundation/NSThread.rs | 12 +- .../src/generated/Foundation/NSTimeZone.rs | 12 +- .../icrate/src/generated/Foundation/NSURL.rs | 45 ++--- .../NSURLAuthenticationChallenge.rs | 8 +- .../Foundation/NSURLCredentialStorage.rs | 14 +- .../src/generated/Foundation/NSURLDownload.rs | 4 +- .../src/generated/Foundation/NSURLHandle.rs | 4 +- .../Foundation/NSURLProtectionSpace.rs | 4 +- .../src/generated/Foundation/NSURLProtocol.rs | 8 +- .../src/generated/Foundation/NSURLRequest.rs | 17 +- .../src/generated/Foundation/NSURLResponse.rs | 2 +- .../src/generated/Foundation/NSURLSession.rs | 26 +-- .../Foundation/NSUbiquitousKeyValueStore.rs | 17 +- .../src/generated/Foundation/NSUndoManager.rs | 6 +- .../generated/Foundation/NSUserActivity.rs | 20 +-- .../generated/Foundation/NSUserDefaults.rs | 50 ++++-- .../Foundation/NSUserNotification.rs | 36 ++-- .../generated/Foundation/NSUserScriptTask.rs | 10 +- .../Foundation/NSValueTransformer.rs | 8 +- .../src/generated/Foundation/NSXMLDTD.rs | 4 +- .../src/generated/Foundation/NSXMLDocument.rs | 10 +- .../src/generated/Foundation/NSXMLElement.rs | 29 +-- .../src/generated/Foundation/NSXMLNode.rs | 14 +- .../src/generated/Foundation/NSXMLParser.rs | 15 +- .../generated/Foundation/NSXPCConnection.rs | 18 +- 94 files changed, 1359 insertions(+), 993 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index ce0324648..87b903d8b 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -24,7 +24,7 @@ pub enum RustType { // Objective-C Id { name: String, - // generics: Vec, + generics: Vec, is_return: bool, nullability: Nullability, }, @@ -134,6 +134,7 @@ impl RustType { Double => Self::Double, ObjCId => Self::Id { name: "Object".to_string(), + generics: Vec::new(), is_return, nullability, }, @@ -142,23 +143,9 @@ impl RustType { Pointer => { let is_const = ty.is_const_qualified(); let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + // Note: Can't handle const id pointers + // assert!(!ty.is_const_qualified(), "expected pointee to not be const"); let pointee = Self::parse(ty, false, is_consumed); - let pointee = match pointee { - Self::Id { - name, - is_return, - nullability, - } => { - let is_const = ty.is_const_qualified(); - Self::Pointer { - nullability, - is_const, - pointee: Box::new(Self::TypeDef { name }), - } - } - pointee => pointee, - }; - Self::Pointer { nullability, is_const, @@ -169,23 +156,48 @@ impl RustType { let ty = ty.get_pointee_type().expect("pointer type to have pointee"); match ty.get_kind() { ObjCInterface => { - let base_ty = ty - .get_objc_object_base_type() - .expect("interface to have base type"); - if base_ty != ty { - // TODO: Figure out what the base type is - panic!("base {:?} was not equal to {:?}", base_ty, ty); + let generics = ty.get_objc_type_arguments(); + if !generics.is_empty() { + panic!("not empty: {:?}, {:?}", ty, generics); } let name = ty.get_display_name(); Self::Id { name, + generics: Vec::new(), + is_return, + nullability, + } + } + ObjCObject => { + let generics = ty + .get_objc_type_arguments() + .into_iter() + .map(|ty| { + match Self::parse(ty, false, false) { + Self::Id { + name, + generics, + is_return, + nullability, + } => name, + // TODO: Handle these two better + Self::Class { nullability } => "TodoClass".to_string(), + Self::TypeDef { name } => "TodoTypedef".to_string(), + ty => panic!("invalid {:?}", ty), + } + }) + .collect(); + let base_ty = ty + .get_objc_object_base_type() + .expect("object to have base type"); + let name = base_ty.get_display_name(); + Self::Id { + name, + generics, is_return, nullability, } } - ObjCObject => Self::TypeDef { - name: "TodoGenerics".to_string(), - }, Attributed => Self::TypeDef { name: "TodoAttributed".to_string(), }, @@ -202,14 +214,20 @@ impl RustType { } Self::Id { name: "Self".to_string(), + generics: Vec::new(), is_return, nullability, } } _ => { if Self::typedef_is_id(ty.get_canonical_type()).is_some() { + let generics = ty.get_objc_type_arguments(); + if !generics.is_empty() { + panic!("not empty: {:?}, {:?}", ty, generics); + } Self::Id { name: typedef_name, + generics: Vec::new(), is_return, nullability, } @@ -273,10 +291,13 @@ impl ToTokens for RustType { // Objective-C Id { name, + generics, is_return, nullability, } => { let tokens = format_ident!("{}", name); + let generics = generics.iter().map(|param| format_ident!("{}", param)); + let tokens = quote!(#tokens <#(#generics),*>); let tokens = if *is_return { quote!(Id<#tokens, Shared>) } else { @@ -310,13 +331,31 @@ impl ToTokens for RustType { is_const, pointee, } => { + let tokens = match &**pointee { + Self::Id { + name, + generics, + is_return, + nullability, + } => { + let name = format_ident!("{}", name); + let generics = generics.iter().map(|param| format_ident!("{}", param)); + if *nullability == Nullability::NonNull { + quote!(NonNull<#name <#(#generics),*>>) + } else { + // TODO: const? + quote!(*mut #name) + } + } + pointee => quote!(#pointee), + }; if *nullability == Nullability::NonNull { - quote!(NonNull<#pointee>) + quote!(NonNull<#tokens>) } else { if *is_const { - quote!(*const #pointee) + quote!(*const #tokens) } else { - quote!(*mut #pointee) + quote!(*mut #tokens) } } } diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index e91812f6d..57100819f 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -18,26 +18,26 @@ impl NSAppleScript { pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, - errorInfo: *mut TodoGenerics, + errorInfo: *mut *mut NSDictionary, ) -> Option> { msg_send_id![self, initWithContentsOfURL: url, error: errorInfo] } pub unsafe fn initWithSource(&self, source: &NSString) -> Option> { msg_send_id![self, initWithSource: source] } - pub unsafe fn compileAndReturnError(&self, errorInfo: *mut TodoGenerics) -> bool { + pub unsafe fn compileAndReturnError(&self, errorInfo: *mut *mut NSDictionary) -> bool { msg_send![self, compileAndReturnError: errorInfo] } pub unsafe fn executeAndReturnError( &self, - errorInfo: *mut TodoGenerics, + errorInfo: *mut *mut NSDictionary, ) -> Id { msg_send_id![self, executeAndReturnError: errorInfo] } pub unsafe fn executeAppleEvent_error( &self, event: &NSAppleEventDescriptor, - errorInfo: *mut TodoGenerics, + errorInfo: *mut *mut NSDictionary, ) -> Id { msg_send_id![self, executeAppleEvent: event, error: errorInfo] } diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index f01766267..daf7101cf 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -41,11 +41,17 @@ impl NSArray { } #[doc = "NSExtendedArray"] impl NSArray { - pub unsafe fn arrayByAddingObject(&self, anObject: &ObjectType) -> TodoGenerics { - msg_send![self, arrayByAddingObject: anObject] + pub unsafe fn arrayByAddingObject( + &self, + anObject: &ObjectType, + ) -> Id, Shared> { + msg_send_id![self, arrayByAddingObject: anObject] } - pub unsafe fn arrayByAddingObjectsFromArray(&self, otherArray: TodoGenerics) -> TodoGenerics { - msg_send![self, arrayByAddingObjectsFromArray: otherArray] + pub unsafe fn arrayByAddingObjectsFromArray( + &self, + otherArray: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, arrayByAddingObjectsFromArray: otherArray] } pub unsafe fn componentsJoinedByString(&self, separator: &NSString) -> Id { msg_send_id![self, componentsJoinedByString: separator] @@ -65,7 +71,7 @@ impl NSArray { } pub unsafe fn firstObjectCommonWithArray( &self, - otherArray: TodoGenerics, + otherArray: &NSArray, ) -> Option> { msg_send_id![self, firstObjectCommonWithArray: otherArray] } @@ -92,40 +98,43 @@ impl NSArray { ) -> NSUInteger { msg_send![self, indexOfObjectIdenticalTo: anObject, inRange: range] } - pub unsafe fn isEqualToArray(&self, otherArray: TodoGenerics) -> bool { + pub unsafe fn isEqualToArray(&self, otherArray: &NSArray) -> bool { msg_send![self, isEqualToArray: otherArray] } - pub unsafe fn objectEnumerator(&self) -> TodoGenerics { - msg_send![self, objectEnumerator] + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] } - pub unsafe fn reverseObjectEnumerator(&self) -> TodoGenerics { - msg_send![self, reverseObjectEnumerator] + pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, reverseObjectEnumerator] } pub unsafe fn sortedArrayUsingFunction_context( &self, comparator: NonNull, context: *mut c_void, - ) -> TodoGenerics { - msg_send![self, sortedArrayUsingFunction: comparator, context: context] + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingFunction: comparator, context: context] } pub unsafe fn sortedArrayUsingFunction_context_hint( &self, comparator: NonNull, context: *mut c_void, hint: Option<&NSData>, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ self, sortedArrayUsingFunction: comparator, context: context, hint: hint ] } - pub unsafe fn sortedArrayUsingSelector(&self, comparator: Sel) -> TodoGenerics { - msg_send![self, sortedArrayUsingSelector: comparator] + pub unsafe fn sortedArrayUsingSelector( + &self, + comparator: Sel, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingSelector: comparator] } - pub unsafe fn subarrayWithRange(&self, range: NSRange) -> TodoGenerics { - msg_send![self, subarrayWithRange: range] + pub unsafe fn subarrayWithRange(&self, range: NSRange) -> Id, Shared> { + msg_send_id![self, subarrayWithRange: range] } pub unsafe fn writeToURL_error(&self, url: &NSURL, error: *mut *mut NSError) -> bool { msg_send![self, writeToURL: url, error: error] @@ -144,8 +153,8 @@ impl NSArray { withObject: argument ] } - pub unsafe fn objectsAtIndexes(&self, indexes: &NSIndexSet) -> TodoGenerics { - msg_send![self, objectsAtIndexes: indexes] + pub unsafe fn objectsAtIndexes(&self, indexes: &NSIndexSet) -> Id, Shared> { + msg_send_id![self, objectsAtIndexes: indexes] } pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id { msg_send_id![self, objectAtIndexedSubscript: idx] @@ -226,15 +235,18 @@ impl NSArray { passingTest: predicate ] } - pub unsafe fn sortedArrayUsingComparator(&self, cmptr: NSComparator) -> TodoGenerics { - msg_send![self, sortedArrayUsingComparator: cmptr] + pub unsafe fn sortedArrayUsingComparator( + &self, + cmptr: NSComparator, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingComparator: cmptr] } pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, - ) -> TodoGenerics { - msg_send![self, sortedArrayWithOptions: opts, usingComparator: cmptr] + ) -> Id, Shared> { + msg_send_id![self, sortedArrayWithOptions: opts, usingComparator: cmptr] } pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, @@ -275,15 +287,15 @@ impl NSArray { pub unsafe fn arrayWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id { msg_send_id![Self::class(), arrayWithObjects: objects, count: cnt] } - pub unsafe fn arrayWithArray(array: TodoGenerics) -> Id { + pub unsafe fn arrayWithArray(array: &NSArray) -> Id { msg_send_id![Self::class(), arrayWithArray: array] } - pub unsafe fn initWithArray(&self, array: TodoGenerics) -> Id { + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { msg_send_id![self, initWithArray: array] } pub unsafe fn initWithArray_copyItems( &self, - array: TodoGenerics, + array: &NSArray, flag: bool, ) -> Id { msg_send_id![self, initWithArray: array, copyItems: flag] @@ -292,25 +304,25 @@ impl NSArray { &self, url: &NSURL, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![self, initWithContentsOfURL: url, error: error] + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfURL: url, error: error] } pub unsafe fn arrayWithContentsOfURL_error( url: &NSURL, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![Self::class(), arrayWithContentsOfURL: url, error: error] + ) -> Option, Shared>> { + msg_send_id![Self::class(), arrayWithContentsOfURL: url, error: error] } } #[doc = "NSArrayDiffing"] impl NSArray { pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( &self, - other: TodoGenerics, + other: &NSArray, options: NSOrderedCollectionDifferenceCalculationOptions, block: TodoBlock, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ self, differenceFromArray: other, withOptions: options, @@ -319,16 +331,22 @@ impl NSArray { } pub unsafe fn differenceFromArray_withOptions( &self, - other: TodoGenerics, + other: &NSArray, options: NSOrderedCollectionDifferenceCalculationOptions, - ) -> TodoGenerics { - msg_send![self, differenceFromArray: other, withOptions: options] + ) -> Id, Shared> { + msg_send_id![self, differenceFromArray: other, withOptions: options] } - pub unsafe fn differenceFromArray(&self, other: TodoGenerics) -> TodoGenerics { - msg_send![self, differenceFromArray: other] + pub unsafe fn differenceFromArray( + &self, + other: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, differenceFromArray: other] } - pub unsafe fn arrayByApplyingDifference(&self, difference: TodoGenerics) -> TodoGenerics { - msg_send![self, arrayByApplyingDifference: difference] + pub unsafe fn arrayByApplyingDifference( + &self, + difference: &NSOrderedCollectionDifference, + ) -> Option, Shared>> { + msg_send_id![self, arrayByApplyingDifference: difference] } } #[doc = "NSDeprecated"] @@ -336,17 +354,25 @@ impl NSArray { pub unsafe fn getObjects(&self, objects: TodoArray) { msg_send![self, getObjects: objects] } - pub unsafe fn arrayWithContentsOfFile(path: &NSString) -> TodoGenerics { - msg_send![Self::class(), arrayWithContentsOfFile: path] + pub unsafe fn arrayWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![Self::class(), arrayWithContentsOfFile: path] } - pub unsafe fn arrayWithContentsOfURL(url: &NSURL) -> TodoGenerics { - msg_send![Self::class(), arrayWithContentsOfURL: url] + pub unsafe fn arrayWithContentsOfURL(url: &NSURL) -> Option, Shared>> { + msg_send_id![Self::class(), arrayWithContentsOfURL: url] } - pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> TodoGenerics { - msg_send![self, initWithContentsOfFile: path] + pub unsafe fn initWithContentsOfFile( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfFile: path] } - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> TodoGenerics { - msg_send![self, initWithContentsOfURL: url] + pub unsafe fn initWithContentsOfURL( + &self, + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfURL: url] } pub unsafe fn writeToFile_atomically(&self, path: &NSString, useAuxiliaryFile: bool) -> bool { msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] @@ -390,7 +416,7 @@ impl NSMutableArray { } #[doc = "NSExtendedMutableArray"] impl NSMutableArray { - pub unsafe fn addObjectsFromArray(&self, otherArray: TodoGenerics) { + pub unsafe fn addObjectsFromArray(&self, otherArray: &NSArray) { msg_send![self, addObjectsFromArray: otherArray] } pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( @@ -422,7 +448,7 @@ impl NSMutableArray { ) { msg_send![self, removeObjectsFromIndices: indices, numIndices: cnt] } - pub unsafe fn removeObjectsInArray(&self, otherArray: TodoGenerics) { + pub unsafe fn removeObjectsInArray(&self, otherArray: &NSArray) { msg_send![self, removeObjectsInArray: otherArray] } pub unsafe fn removeObjectsInRange(&self, range: NSRange) { @@ -431,7 +457,7 @@ impl NSMutableArray { pub unsafe fn replaceObjectsInRange_withObjectsFromArray_range( &self, range: NSRange, - otherArray: TodoGenerics, + otherArray: &NSArray, otherRange: NSRange, ) { msg_send![ @@ -444,7 +470,7 @@ impl NSMutableArray { pub unsafe fn replaceObjectsInRange_withObjectsFromArray( &self, range: NSRange, - otherArray: TodoGenerics, + otherArray: &NSArray, ) { msg_send![ self, @@ -452,7 +478,7 @@ impl NSMutableArray { withObjectsFromArray: otherArray ] } - pub unsafe fn setArray(&self, otherArray: TodoGenerics) { + pub unsafe fn setArray(&self, otherArray: &NSArray) { msg_send![self, setArray: otherArray] } pub unsafe fn sortUsingFunction_context( @@ -465,7 +491,11 @@ impl NSMutableArray { pub unsafe fn sortUsingSelector(&self, comparator: Sel) { msg_send![self, sortUsingSelector: comparator] } - pub unsafe fn insertObjects_atIndexes(&self, objects: TodoGenerics, indexes: &NSIndexSet) { + pub unsafe fn insertObjects_atIndexes( + &self, + objects: &NSArray, + indexes: &NSIndexSet, + ) { msg_send![self, insertObjects: objects, atIndexes: indexes] } pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet) { @@ -474,7 +504,7 @@ impl NSMutableArray { pub unsafe fn replaceObjectsAtIndexes_withObjects( &self, indexes: &NSIndexSet, - objects: TodoGenerics, + objects: &NSArray, ) { msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] } @@ -493,22 +523,32 @@ impl NSMutableArray { pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id { msg_send_id![Self::class(), arrayWithCapacity: numItems] } - pub unsafe fn arrayWithContentsOfFile(path: &NSString) -> TodoGenerics { - msg_send![Self::class(), arrayWithContentsOfFile: path] + pub unsafe fn arrayWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![Self::class(), arrayWithContentsOfFile: path] } - pub unsafe fn arrayWithContentsOfURL(url: &NSURL) -> TodoGenerics { - msg_send![Self::class(), arrayWithContentsOfURL: url] + pub unsafe fn arrayWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), arrayWithContentsOfURL: url] } - pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> TodoGenerics { - msg_send![self, initWithContentsOfFile: path] + pub unsafe fn initWithContentsOfFile( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfFile: path] } - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> TodoGenerics { - msg_send![self, initWithContentsOfURL: url] + pub unsafe fn initWithContentsOfURL( + &self, + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfURL: url] } } #[doc = "NSMutableArrayDiffing"] impl NSMutableArray { - pub unsafe fn applyDifference(&self, difference: TodoGenerics) { + pub unsafe fn applyDifference(&self, difference: &NSOrderedCollectionDifference) { msg_send![self, applyDifference: difference] } } diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index 2cb3687cd..b074603c7 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -17,8 +17,8 @@ impl NSAttributedString { &self, location: NSUInteger, range: NSRangePointer, - ) -> TodoGenerics { - msg_send![self, attributesAtIndex: location, effectiveRange: range] + ) -> Id, Shared> { + msg_send_id![self, attributesAtIndex: location, effectiveRange: range] } pub unsafe fn string(&self) -> Id { msg_send_id![self, string] @@ -50,8 +50,8 @@ impl NSAttributedString { location: NSUInteger, range: NSRangePointer, rangeLimit: NSRange, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ self, attributesAtIndex: location, longestEffectiveRange: range, @@ -82,7 +82,7 @@ impl NSAttributedString { pub unsafe fn initWithString_attributes( &self, str: &NSString, - attrs: TodoGenerics, + attrs: Option<&NSDictionary>, ) -> Id { msg_send_id![self, initWithString: str, attributes: attrs] } @@ -135,7 +135,11 @@ impl NSMutableAttributedString { pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, str: &NSString) { msg_send![self, replaceCharactersInRange: range, withString: str] } - pub unsafe fn setAttributes_range(&self, attrs: TodoGenerics, range: NSRange) { + pub unsafe fn setAttributes_range( + &self, + attrs: Option<&NSDictionary>, + range: NSRange, + ) { msg_send![self, setAttributes: attrs, range: range] } } @@ -149,7 +153,11 @@ impl NSMutableAttributedString { ) { msg_send![self, addAttribute: name, value: value, range: range] } - pub unsafe fn addAttributes_range(&self, attrs: TodoGenerics, range: NSRange) { + pub unsafe fn addAttributes_range( + &self, + attrs: &NSDictionary, + range: NSRange, + ) { msg_send![self, addAttributes: attrs, range: range] } pub unsafe fn removeAttribute_range(&self, name: &NSAttributedStringKey, range: NSRange) { @@ -408,7 +416,7 @@ impl NSPresentationIntent { pub unsafe fn tableIntentWithIdentity_columnCount_alignments_nestedInsideIntent( identity: NSInteger, columnCount: NSInteger, - alignments: TodoGenerics, + alignments: &NSArray, parent: Option<&NSPresentationIntent>, ) -> Id { msg_send_id![ @@ -468,8 +476,8 @@ impl NSPresentationIntent { pub unsafe fn ordinal(&self) -> NSInteger { msg_send![self, ordinal] } - pub unsafe fn columnAlignments(&self) -> TodoGenerics { - msg_send![self, columnAlignments] + pub unsafe fn columnAlignments(&self) -> Option, Shared>> { + msg_send_id![self, columnAlignments] } pub unsafe fn columnCount(&self) -> NSInteger { msg_send![self, columnCount] diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index c168121b4..f2a083562 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -83,8 +83,8 @@ impl NSBundle { ext: Option<&NSString>, subpath: Option<&NSString>, bundleURL: &NSURL, - ) -> TodoGenerics { - msg_send![ + ) -> Option, Shared>> { + msg_send_id![ Self::class(), URLsForResourcesWithExtension: ext, subdirectory: subpath, @@ -130,8 +130,8 @@ impl NSBundle { &self, ext: Option<&NSString>, subpath: Option<&NSString>, - ) -> TodoGenerics { - msg_send![ + ) -> Option, Shared>> { + msg_send_id![ self, URLsForResourcesWithExtension: ext, subdirectory: subpath @@ -142,8 +142,8 @@ impl NSBundle { ext: Option<&NSString>, subpath: Option<&NSString>, localizationName: Option<&NSString>, - ) -> TodoGenerics { - msg_send![ + ) -> Option, Shared>> { + msg_send_id![ self, URLsForResourcesWithExtension: ext, subdirectory: subpath, @@ -165,8 +165,8 @@ impl NSBundle { pub unsafe fn pathsForResourcesOfType_inDirectory( ext: Option<&NSString>, bundlePath: &NSString, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ Self::class(), pathsForResourcesOfType: ext, inDirectory: bundlePath @@ -211,16 +211,16 @@ impl NSBundle { &self, ext: Option<&NSString>, subpath: Option<&NSString>, - ) -> TodoGenerics { - msg_send![self, pathsForResourcesOfType: ext, inDirectory: subpath] + ) -> Id, Shared> { + msg_send_id![self, pathsForResourcesOfType: ext, inDirectory: subpath] } pub unsafe fn pathsForResourcesOfType_inDirectory_forLocalization( &self, ext: Option<&NSString>, subpath: Option<&NSString>, localizationName: Option<&NSString>, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ self, pathsForResourcesOfType: ext, inDirectory: subpath, @@ -260,18 +260,18 @@ impl NSBundle { msg_send![self, classNamed: className] } pub unsafe fn preferredLocalizationsFromArray( - localizationsArray: TodoGenerics, - ) -> TodoGenerics { - msg_send![ + localizationsArray: &NSArray, + ) -> Id, Shared> { + msg_send_id![ Self::class(), preferredLocalizationsFromArray: localizationsArray ] } pub unsafe fn preferredLocalizationsFromArray_forPreferences( - localizationsArray: TodoGenerics, - preferencesArray: TodoGenerics, - ) -> TodoGenerics { - msg_send![ + localizationsArray: &NSArray, + preferencesArray: Option<&NSArray>, + ) -> Id, Shared> { + msg_send_id![ Self::class(), preferredLocalizationsFromArray: localizationsArray, forPreferences: preferencesArray @@ -280,11 +280,11 @@ impl NSBundle { pub unsafe fn mainBundle() -> Id { msg_send_id![Self::class(), mainBundle] } - pub unsafe fn allBundles() -> TodoGenerics { - msg_send![Self::class(), allBundles] + pub unsafe fn allBundles() -> Id, Shared> { + msg_send_id![Self::class(), allBundles] } - pub unsafe fn allFrameworks() -> TodoGenerics { - msg_send![Self::class(), allFrameworks] + pub unsafe fn allFrameworks() -> Id, Shared> { + msg_send_id![Self::class(), allFrameworks] } pub unsafe fn isLoaded(&self) -> bool { msg_send![self, isLoaded] @@ -337,26 +337,28 @@ impl NSBundle { pub unsafe fn bundleIdentifier(&self) -> Option> { msg_send_id![self, bundleIdentifier] } - pub unsafe fn infoDictionary(&self) -> TodoGenerics { - msg_send![self, infoDictionary] + pub unsafe fn infoDictionary(&self) -> Option, Shared>> { + msg_send_id![self, infoDictionary] } - pub unsafe fn localizedInfoDictionary(&self) -> TodoGenerics { - msg_send![self, localizedInfoDictionary] + pub unsafe fn localizedInfoDictionary( + &self, + ) -> Option, Shared>> { + msg_send_id![self, localizedInfoDictionary] } pub unsafe fn principalClass(&self) -> Option<&Class> { msg_send![self, principalClass] } - pub unsafe fn preferredLocalizations(&self) -> TodoGenerics { - msg_send![self, preferredLocalizations] + pub unsafe fn preferredLocalizations(&self) -> Id, Shared> { + msg_send_id![self, preferredLocalizations] } - pub unsafe fn localizations(&self) -> TodoGenerics { - msg_send![self, localizations] + pub unsafe fn localizations(&self) -> Id, Shared> { + msg_send_id![self, localizations] } pub unsafe fn developmentLocalization(&self) -> Option> { msg_send_id![self, developmentLocalization] } - pub unsafe fn executableArchitectures(&self) -> TodoGenerics { - msg_send![self, executableArchitectures] + pub unsafe fn executableArchitectures(&self) -> Option, Shared>> { + msg_send_id![self, executableArchitectures] } } #[doc = "NSBundleExtensionMethods"] @@ -376,12 +378,12 @@ impl NSBundleResourceRequest { pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } - pub unsafe fn initWithTags(&self, tags: TodoGenerics) -> Id { + pub unsafe fn initWithTags(&self, tags: &NSSet) -> Id { msg_send_id![self, initWithTags: tags] } pub unsafe fn initWithTags_bundle( &self, - tags: TodoGenerics, + tags: &NSSet, bundle: &NSBundle, ) -> Id { msg_send_id![self, initWithTags: tags, bundle: bundle] @@ -413,8 +415,8 @@ impl NSBundleResourceRequest { pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double) { msg_send![self, setLoadingPriority: loadingPriority] } - pub unsafe fn tags(&self) -> TodoGenerics { - msg_send![self, tags] + pub unsafe fn tags(&self) -> Id, Shared> { + msg_send_id![self, tags] } pub unsafe fn bundle(&self) -> Id { msg_send_id![self, bundle] @@ -425,7 +427,11 @@ impl NSBundleResourceRequest { } #[doc = "NSBundleResourceRequestAdditions"] impl NSBundle { - pub unsafe fn setPreservationPriority_forTags(&self, priority: c_double, tags: TodoGenerics) { + pub unsafe fn setPreservationPriority_forTags( + &self, + priority: c_double, + tags: &NSSet, + ) { msg_send![self, setPreservationPriority: priority, forTags: tags] } pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double { diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 3afc24771..78ee973a2 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -26,7 +26,7 @@ impl NSByteCountFormatter { msg_send_id![self, stringFromByteCount: byteCount] } pub unsafe fn stringFromMeasurement_countStyle( - measurement: TodoGenerics, + measurement: &NSMeasurement, countStyle: NSByteCountFormatterCountStyle, ) -> Id { msg_send_id![ @@ -35,7 +35,10 @@ impl NSByteCountFormatter { countStyle: countStyle ] } - pub unsafe fn stringFromMeasurement(&self, measurement: TodoGenerics) -> Id { + pub unsafe fn stringFromMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id { msg_send_id![self, stringFromMeasurement: measurement] } pub unsafe fn stringForObjectValue( diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 52e8dfdd6..5655c1e2c 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -33,10 +33,10 @@ impl NSCache { pub unsafe fn setName(&self, name: &NSString) { msg_send![self, setName: name] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn totalCostLimit(&self) -> NSUInteger { diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index f1469a61d..fb8437ccb 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -461,59 +461,59 @@ impl NSCalendar { pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger) { msg_send![self, setMinimumDaysInFirstWeek: minimumDaysInFirstWeek] } - pub unsafe fn eraSymbols(&self) -> TodoGenerics { - msg_send![self, eraSymbols] + pub unsafe fn eraSymbols(&self) -> Id, Shared> { + msg_send_id![self, eraSymbols] } - pub unsafe fn longEraSymbols(&self) -> TodoGenerics { - msg_send![self, longEraSymbols] + pub unsafe fn longEraSymbols(&self) -> Id, Shared> { + msg_send_id![self, longEraSymbols] } - pub unsafe fn monthSymbols(&self) -> TodoGenerics { - msg_send![self, monthSymbols] + pub unsafe fn monthSymbols(&self) -> Id, Shared> { + msg_send_id![self, monthSymbols] } - pub unsafe fn shortMonthSymbols(&self) -> TodoGenerics { - msg_send![self, shortMonthSymbols] + pub unsafe fn shortMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortMonthSymbols] } - pub unsafe fn veryShortMonthSymbols(&self) -> TodoGenerics { - msg_send![self, veryShortMonthSymbols] + pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortMonthSymbols] } - pub unsafe fn standaloneMonthSymbols(&self) -> TodoGenerics { - msg_send![self, standaloneMonthSymbols] + pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneMonthSymbols] } - pub unsafe fn shortStandaloneMonthSymbols(&self) -> TodoGenerics { - msg_send![self, shortStandaloneMonthSymbols] + pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneMonthSymbols] } - pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> TodoGenerics { - msg_send![self, veryShortStandaloneMonthSymbols] + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortStandaloneMonthSymbols] } - pub unsafe fn weekdaySymbols(&self) -> TodoGenerics { - msg_send![self, weekdaySymbols] + pub unsafe fn weekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, weekdaySymbols] } - pub unsafe fn shortWeekdaySymbols(&self) -> TodoGenerics { - msg_send![self, shortWeekdaySymbols] + pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, shortWeekdaySymbols] } - pub unsafe fn veryShortWeekdaySymbols(&self) -> TodoGenerics { - msg_send![self, veryShortWeekdaySymbols] + pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortWeekdaySymbols] } - pub unsafe fn standaloneWeekdaySymbols(&self) -> TodoGenerics { - msg_send![self, standaloneWeekdaySymbols] + pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneWeekdaySymbols] } - pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> TodoGenerics { - msg_send![self, shortStandaloneWeekdaySymbols] + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneWeekdaySymbols] } - pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> TodoGenerics { - msg_send![self, veryShortStandaloneWeekdaySymbols] + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortStandaloneWeekdaySymbols] } - pub unsafe fn quarterSymbols(&self) -> TodoGenerics { - msg_send![self, quarterSymbols] + pub unsafe fn quarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, quarterSymbols] } - pub unsafe fn shortQuarterSymbols(&self) -> TodoGenerics { - msg_send![self, shortQuarterSymbols] + pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortQuarterSymbols] } - pub unsafe fn standaloneQuarterSymbols(&self) -> TodoGenerics { - msg_send![self, standaloneQuarterSymbols] + pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneQuarterSymbols] } - pub unsafe fn shortStandaloneQuarterSymbols(&self) -> TodoGenerics { - msg_send![self, shortStandaloneQuarterSymbols] + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneQuarterSymbols] } pub unsafe fn AMSymbol(&self) -> Id { msg_send_id![self, AMSymbol] diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index b083d1960..3b7c3b9d4 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -40,14 +40,14 @@ impl NSClassDescription { ) -> Option> { msg_send_id![self, inverseForRelationshipKey: relationshipKey] } - pub unsafe fn attributeKeys(&self) -> TodoGenerics { - msg_send![self, attributeKeys] + pub unsafe fn attributeKeys(&self) -> Id, Shared> { + msg_send_id![self, attributeKeys] } - pub unsafe fn toOneRelationshipKeys(&self) -> TodoGenerics { - msg_send![self, toOneRelationshipKeys] + pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared> { + msg_send_id![self, toOneRelationshipKeys] } - pub unsafe fn toManyRelationshipKeys(&self) -> TodoGenerics { - msg_send![self, toManyRelationshipKeys] + pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared> { + msg_send_id![self, toManyRelationshipKeys] } } #[doc = "NSClassDescriptionPrimitives"] @@ -61,13 +61,13 @@ impl NSObject { pub unsafe fn classDescription(&self) -> Id { msg_send_id![self, classDescription] } - pub unsafe fn attributeKeys(&self) -> TodoGenerics { - msg_send![self, attributeKeys] + pub unsafe fn attributeKeys(&self) -> Id, Shared> { + msg_send_id![self, attributeKeys] } - pub unsafe fn toOneRelationshipKeys(&self) -> TodoGenerics { - msg_send![self, toOneRelationshipKeys] + pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared> { + msg_send_id![self, toOneRelationshipKeys] } - pub unsafe fn toManyRelationshipKeys(&self) -> TodoGenerics { - msg_send![self, toManyRelationshipKeys] + pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared> { + msg_send_id![self, toManyRelationshipKeys] } } diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 21eee5eb8..917a0d405 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -221,14 +221,14 @@ impl NSCoder { } pub unsafe fn decodeObjectOfClasses_forKey( &self, - classes: TodoGenerics, + classes: Option<&NSSet>, key: &NSString, ) -> Option> { msg_send_id![self, decodeObjectOfClasses: classes, forKey: key] } pub unsafe fn decodeTopLevelObjectOfClasses_forKey_error( &self, - classes: TodoGenerics, + classes: Option<&NSSet>, key: &NSString, error: *mut *mut NSError, ) -> Option> { @@ -241,15 +241,15 @@ impl NSCoder { } pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( &self, - classes: TodoGenerics, + classes: &NSSet, key: &NSString, ) -> Option> { msg_send_id![self, decodeArrayOfObjectsOfClasses: classes, forKey: key] } pub unsafe fn decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey( &self, - keyClasses: TodoGenerics, - objectClasses: TodoGenerics, + keyClasses: &NSSet, + objectClasses: &NSSet, key: &NSString, ) -> Option> { msg_send_id![ @@ -274,8 +274,8 @@ impl NSCoder { pub unsafe fn requiresSecureCoding(&self) -> bool { msg_send![self, requiresSecureCoding] } - pub unsafe fn allowedClasses(&self) -> TodoGenerics { - msg_send![self, allowedClasses] + pub unsafe fn allowedClasses(&self) -> Option, Shared>> { + msg_send_id![self, allowedClasses] } pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy { msg_send![self, decodingFailurePolicy] diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index d9e34d12c..64626f5d5 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -15,7 +15,7 @@ impl NSCompoundPredicate { pub unsafe fn initWithType_subpredicates( &self, type_: NSCompoundPredicateType, - subpredicates: TodoGenerics, + subpredicates: &NSArray, ) -> Id { msg_send_id![self, initWithType: type_, subpredicates: subpredicates] } @@ -23,12 +23,12 @@ impl NSCompoundPredicate { msg_send_id![self, initWithCoder: coder] } pub unsafe fn andPredicateWithSubpredicates( - subpredicates: TodoGenerics, + subpredicates: &NSArray, ) -> Id { msg_send_id![Self::class(), andPredicateWithSubpredicates: subpredicates] } pub unsafe fn orPredicateWithSubpredicates( - subpredicates: TodoGenerics, + subpredicates: &NSArray, ) -> Id { msg_send_id![Self::class(), orPredicateWithSubpredicates: subpredicates] } diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 53aad2d62..992cda961 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -23,8 +23,8 @@ extern_class!( } ); impl NSConnection { - pub unsafe fn allConnections() -> TodoGenerics { - msg_send![Self::class(), allConnections] + pub unsafe fn allConnections() -> Id, Shared> { + msg_send_id![Self::class(), allConnections] } pub unsafe fn defaultConnection() -> Id { msg_send_id![Self::class(), defaultConnection] @@ -149,8 +149,8 @@ impl NSConnection { pub unsafe fn dispatchWithComponents(&self, components: &NSArray) { msg_send![self, dispatchWithComponents: components] } - pub unsafe fn statistics(&self) -> TodoGenerics { - msg_send![self, statistics] + pub unsafe fn statistics(&self) -> Id, Shared> { + msg_send_id![self, statistics] } pub unsafe fn requestTimeout(&self) -> NSTimeInterval { msg_send![self, requestTimeout] @@ -170,10 +170,10 @@ impl NSConnection { pub unsafe fn setRootObject(&self, rootObject: Option<&Object>) { msg_send![self, setRootObject: rootObject] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn independentConversationQueueing(&self) -> bool { @@ -191,8 +191,8 @@ impl NSConnection { pub unsafe fn rootProxy(&self) -> Id { msg_send_id![self, rootProxy] } - pub unsafe fn requestModes(&self) -> TodoGenerics { - msg_send![self, requestModes] + pub unsafe fn requestModes(&self) -> Id, Shared> { + msg_send_id![self, requestModes] } pub unsafe fn sendPort(&self) -> Id { msg_send_id![self, sendPort] diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index eaf0bdf33..599af7aba 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -149,34 +149,34 @@ impl NSDateFormatter { pub unsafe fn setDefaultDate(&self, defaultDate: Option<&NSDate>) { msg_send![self, setDefaultDate: defaultDate] } - pub unsafe fn eraSymbols(&self) -> TodoGenerics { - msg_send![self, eraSymbols] + pub unsafe fn eraSymbols(&self) -> Id, Shared> { + msg_send_id![self, eraSymbols] } - pub unsafe fn setEraSymbols(&self, eraSymbols: TodoGenerics) { + pub unsafe fn setEraSymbols(&self, eraSymbols: Option<&NSArray>) { msg_send![self, setEraSymbols: eraSymbols] } - pub unsafe fn monthSymbols(&self) -> TodoGenerics { - msg_send![self, monthSymbols] + pub unsafe fn monthSymbols(&self) -> Id, Shared> { + msg_send_id![self, monthSymbols] } - pub unsafe fn setMonthSymbols(&self, monthSymbols: TodoGenerics) { + pub unsafe fn setMonthSymbols(&self, monthSymbols: Option<&NSArray>) { msg_send![self, setMonthSymbols: monthSymbols] } - pub unsafe fn shortMonthSymbols(&self) -> TodoGenerics { - msg_send![self, shortMonthSymbols] + pub unsafe fn shortMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortMonthSymbols] } - pub unsafe fn setShortMonthSymbols(&self, shortMonthSymbols: TodoGenerics) { + pub unsafe fn setShortMonthSymbols(&self, shortMonthSymbols: Option<&NSArray>) { msg_send![self, setShortMonthSymbols: shortMonthSymbols] } - pub unsafe fn weekdaySymbols(&self) -> TodoGenerics { - msg_send![self, weekdaySymbols] + pub unsafe fn weekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, weekdaySymbols] } - pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: TodoGenerics) { + pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: Option<&NSArray>) { msg_send![self, setWeekdaySymbols: weekdaySymbols] } - pub unsafe fn shortWeekdaySymbols(&self) -> TodoGenerics { - msg_send![self, shortWeekdaySymbols] + pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, shortWeekdaySymbols] } - pub unsafe fn setShortWeekdaySymbols(&self, shortWeekdaySymbols: TodoGenerics) { + pub unsafe fn setShortWeekdaySymbols(&self, shortWeekdaySymbols: Option<&NSArray>) { msg_send![self, setShortWeekdaySymbols: shortWeekdaySymbols] } pub unsafe fn AMSymbol(&self) -> Id { @@ -191,105 +191,123 @@ impl NSDateFormatter { pub unsafe fn setPMSymbol(&self, PMSymbol: Option<&NSString>) { msg_send![self, setPMSymbol: PMSymbol] } - pub unsafe fn longEraSymbols(&self) -> TodoGenerics { - msg_send![self, longEraSymbols] + pub unsafe fn longEraSymbols(&self) -> Id, Shared> { + msg_send_id![self, longEraSymbols] } - pub unsafe fn setLongEraSymbols(&self, longEraSymbols: TodoGenerics) { + pub unsafe fn setLongEraSymbols(&self, longEraSymbols: Option<&NSArray>) { msg_send![self, setLongEraSymbols: longEraSymbols] } - pub unsafe fn veryShortMonthSymbols(&self) -> TodoGenerics { - msg_send![self, veryShortMonthSymbols] + pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortMonthSymbols] } - pub unsafe fn setVeryShortMonthSymbols(&self, veryShortMonthSymbols: TodoGenerics) { + pub unsafe fn setVeryShortMonthSymbols( + &self, + veryShortMonthSymbols: Option<&NSArray>, + ) { msg_send![self, setVeryShortMonthSymbols: veryShortMonthSymbols] } - pub unsafe fn standaloneMonthSymbols(&self) -> TodoGenerics { - msg_send![self, standaloneMonthSymbols] + pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneMonthSymbols] } - pub unsafe fn setStandaloneMonthSymbols(&self, standaloneMonthSymbols: TodoGenerics) { + pub unsafe fn setStandaloneMonthSymbols( + &self, + standaloneMonthSymbols: Option<&NSArray>, + ) { msg_send![self, setStandaloneMonthSymbols: standaloneMonthSymbols] } - pub unsafe fn shortStandaloneMonthSymbols(&self) -> TodoGenerics { - msg_send![self, shortStandaloneMonthSymbols] + pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneMonthSymbols] } - pub unsafe fn setShortStandaloneMonthSymbols(&self, shortStandaloneMonthSymbols: TodoGenerics) { + pub unsafe fn setShortStandaloneMonthSymbols( + &self, + shortStandaloneMonthSymbols: Option<&NSArray>, + ) { msg_send![ self, setShortStandaloneMonthSymbols: shortStandaloneMonthSymbols ] } - pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> TodoGenerics { - msg_send![self, veryShortStandaloneMonthSymbols] + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortStandaloneMonthSymbols] } pub unsafe fn setVeryShortStandaloneMonthSymbols( &self, - veryShortStandaloneMonthSymbols: TodoGenerics, + veryShortStandaloneMonthSymbols: Option<&NSArray>, ) { msg_send![ self, setVeryShortStandaloneMonthSymbols: veryShortStandaloneMonthSymbols ] } - pub unsafe fn veryShortWeekdaySymbols(&self) -> TodoGenerics { - msg_send![self, veryShortWeekdaySymbols] + pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortWeekdaySymbols] } - pub unsafe fn setVeryShortWeekdaySymbols(&self, veryShortWeekdaySymbols: TodoGenerics) { + pub unsafe fn setVeryShortWeekdaySymbols( + &self, + veryShortWeekdaySymbols: Option<&NSArray>, + ) { msg_send![self, setVeryShortWeekdaySymbols: veryShortWeekdaySymbols] } - pub unsafe fn standaloneWeekdaySymbols(&self) -> TodoGenerics { - msg_send![self, standaloneWeekdaySymbols] + pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneWeekdaySymbols] } - pub unsafe fn setStandaloneWeekdaySymbols(&self, standaloneWeekdaySymbols: TodoGenerics) { + pub unsafe fn setStandaloneWeekdaySymbols( + &self, + standaloneWeekdaySymbols: Option<&NSArray>, + ) { msg_send![self, setStandaloneWeekdaySymbols: standaloneWeekdaySymbols] } - pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> TodoGenerics { - msg_send![self, shortStandaloneWeekdaySymbols] + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneWeekdaySymbols] } pub unsafe fn setShortStandaloneWeekdaySymbols( &self, - shortStandaloneWeekdaySymbols: TodoGenerics, + shortStandaloneWeekdaySymbols: Option<&NSArray>, ) { msg_send![ self, setShortStandaloneWeekdaySymbols: shortStandaloneWeekdaySymbols ] } - pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> TodoGenerics { - msg_send![self, veryShortStandaloneWeekdaySymbols] + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortStandaloneWeekdaySymbols] } pub unsafe fn setVeryShortStandaloneWeekdaySymbols( &self, - veryShortStandaloneWeekdaySymbols: TodoGenerics, + veryShortStandaloneWeekdaySymbols: Option<&NSArray>, ) { msg_send![ self, setVeryShortStandaloneWeekdaySymbols: veryShortStandaloneWeekdaySymbols ] } - pub unsafe fn quarterSymbols(&self) -> TodoGenerics { - msg_send![self, quarterSymbols] + pub unsafe fn quarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, quarterSymbols] } - pub unsafe fn setQuarterSymbols(&self, quarterSymbols: TodoGenerics) { + pub unsafe fn setQuarterSymbols(&self, quarterSymbols: Option<&NSArray>) { msg_send![self, setQuarterSymbols: quarterSymbols] } - pub unsafe fn shortQuarterSymbols(&self) -> TodoGenerics { - msg_send![self, shortQuarterSymbols] + pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortQuarterSymbols] } - pub unsafe fn setShortQuarterSymbols(&self, shortQuarterSymbols: TodoGenerics) { + pub unsafe fn setShortQuarterSymbols(&self, shortQuarterSymbols: Option<&NSArray>) { msg_send![self, setShortQuarterSymbols: shortQuarterSymbols] } - pub unsafe fn standaloneQuarterSymbols(&self) -> TodoGenerics { - msg_send![self, standaloneQuarterSymbols] + pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneQuarterSymbols] } - pub unsafe fn setStandaloneQuarterSymbols(&self, standaloneQuarterSymbols: TodoGenerics) { + pub unsafe fn setStandaloneQuarterSymbols( + &self, + standaloneQuarterSymbols: Option<&NSArray>, + ) { msg_send![self, setStandaloneQuarterSymbols: standaloneQuarterSymbols] } - pub unsafe fn shortStandaloneQuarterSymbols(&self) -> TodoGenerics { - msg_send![self, shortStandaloneQuarterSymbols] + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneQuarterSymbols] } pub unsafe fn setShortStandaloneQuarterSymbols( &self, - shortStandaloneQuarterSymbols: TodoGenerics, + shortStandaloneQuarterSymbols: Option<&NSArray>, ) { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index b4b56976b..cac927577 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -84,7 +84,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberByAdding_withBehavior( &self, decimalNumber: &NSDecimalNumber, - behavior: TodoGenerics, + behavior: Option<&id>, ) -> Id { msg_send_id![ self, @@ -101,7 +101,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberBySubtracting_withBehavior( &self, decimalNumber: &NSDecimalNumber, - behavior: TodoGenerics, + behavior: Option<&id>, ) -> Id { msg_send_id![ self, @@ -118,7 +118,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberByMultiplyingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, - behavior: TodoGenerics, + behavior: Option<&id>, ) -> Id { msg_send_id![ self, @@ -135,7 +135,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberByDividingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, - behavior: TodoGenerics, + behavior: Option<&id>, ) -> Id { msg_send_id![ self, @@ -152,7 +152,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberByRaisingToPower_withBehavior( &self, power: NSUInteger, - behavior: TodoGenerics, + behavior: Option<&id>, ) -> Id { msg_send_id![ self, @@ -169,7 +169,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberByMultiplyingByPowerOf10_withBehavior( &self, power: c_short, - behavior: TodoGenerics, + behavior: Option<&id>, ) -> Id { msg_send_id![ self, @@ -179,7 +179,7 @@ impl NSDecimalNumber { } pub unsafe fn decimalNumberByRoundingAccordingToBehavior( &self, - behavior: TodoGenerics, + behavior: Option<&id>, ) -> Id { msg_send_id![self, decimalNumberByRoundingAccordingToBehavior: behavior] } @@ -204,10 +204,10 @@ impl NSDecimalNumber { pub unsafe fn notANumber() -> Id { msg_send_id![Self::class(), notANumber] } - pub unsafe fn defaultBehavior() -> TodoGenerics { - msg_send![Self::class(), defaultBehavior] + pub unsafe fn defaultBehavior() -> Id { + msg_send_id![Self::class(), defaultBehavior] } - pub unsafe fn setDefaultBehavior(defaultBehavior: TodoGenerics) { + pub unsafe fn setDefaultBehavior(defaultBehavior: &id) { msg_send![Self::class(), setDefaultBehavior: defaultBehavior] } pub unsafe fn objCType(&self) -> NonNull { diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 6539d8af4..9bc37d409 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -19,8 +19,8 @@ impl NSDictionary { pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option> { msg_send_id![self, objectForKey: aKey] } - pub unsafe fn keyEnumerator(&self) -> TodoGenerics { - msg_send![self, keyEnumerator] + pub unsafe fn keyEnumerator(&self) -> Id, Shared> { + msg_send_id![self, keyEnumerator] } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] @@ -42,8 +42,8 @@ impl NSDictionary { } #[doc = "NSExtendedDictionary"] impl NSDictionary { - pub unsafe fn allKeysForObject(&self, anObject: &ObjectType) -> TodoGenerics { - msg_send![self, allKeysForObject: anObject] + pub unsafe fn allKeysForObject(&self, anObject: &ObjectType) -> Id, Shared> { + msg_send_id![self, allKeysForObject: anObject] } pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { msg_send_id![self, descriptionWithLocale: locale] @@ -55,24 +55,30 @@ impl NSDictionary { ) -> Id { msg_send_id![self, descriptionWithLocale: locale, indent: level] } - pub unsafe fn isEqualToDictionary(&self, otherDictionary: TodoGenerics) -> bool { + pub unsafe fn isEqualToDictionary( + &self, + otherDictionary: &NSDictionary, + ) -> bool { msg_send![self, isEqualToDictionary: otherDictionary] } - pub unsafe fn objectEnumerator(&self) -> TodoGenerics { - msg_send![self, objectEnumerator] + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] } pub unsafe fn objectsForKeys_notFoundMarker( &self, - keys: TodoGenerics, + keys: &NSArray, marker: &ObjectType, - ) -> TodoGenerics { - msg_send![self, objectsForKeys: keys, notFoundMarker: marker] + ) -> Id, Shared> { + msg_send_id![self, objectsForKeys: keys, notFoundMarker: marker] } pub unsafe fn writeToURL_error(&self, url: &NSURL, error: *mut *mut NSError) -> bool { msg_send![self, writeToURL: url, error: error] } - pub unsafe fn keysSortedByValueUsingSelector(&self, comparator: Sel) -> TodoGenerics { - msg_send![self, keysSortedByValueUsingSelector: comparator] + pub unsafe fn keysSortedByValueUsingSelector( + &self, + comparator: Sel, + ) -> Id, Shared> { + msg_send_id![self, keysSortedByValueUsingSelector: comparator] } pub unsafe fn getObjects_andKeys_count( &self, @@ -99,35 +105,41 @@ impl NSDictionary { usingBlock: block ] } - pub unsafe fn keysSortedByValueUsingComparator(&self, cmptr: NSComparator) -> TodoGenerics { - msg_send![self, keysSortedByValueUsingComparator: cmptr] + pub unsafe fn keysSortedByValueUsingComparator( + &self, + cmptr: NSComparator, + ) -> Id, Shared> { + msg_send_id![self, keysSortedByValueUsingComparator: cmptr] } pub unsafe fn keysSortedByValueWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ self, keysSortedByValueWithOptions: opts, usingComparator: cmptr ] } - pub unsafe fn keysOfEntriesPassingTest(&self, predicate: TodoBlock) -> TodoGenerics { - msg_send![self, keysOfEntriesPassingTest: predicate] + pub unsafe fn keysOfEntriesPassingTest( + &self, + predicate: TodoBlock, + ) -> Id, Shared> { + msg_send_id![self, keysOfEntriesPassingTest: predicate] } pub unsafe fn keysOfEntriesWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> TodoGenerics { - msg_send![self, keysOfEntriesWithOptions: opts, passingTest: predicate] + ) -> Id, Shared> { + msg_send_id![self, keysOfEntriesWithOptions: opts, passingTest: predicate] } - pub unsafe fn allKeys(&self) -> TodoGenerics { - msg_send![self, allKeys] + pub unsafe fn allKeys(&self) -> Id, Shared> { + msg_send_id![self, allKeys] } - pub unsafe fn allValues(&self) -> TodoGenerics { - msg_send![self, allValues] + pub unsafe fn allValues(&self) -> Id, Shared> { + msg_send_id![self, allValues] } pub unsafe fn description(&self) -> Id { msg_send_id![self, description] @@ -141,17 +153,27 @@ impl NSDictionary { pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray) { msg_send![self, getObjects: objects, andKeys: keys] } - pub unsafe fn dictionaryWithContentsOfFile(path: &NSString) -> TodoGenerics { - msg_send![Self::class(), dictionaryWithContentsOfFile: path] + pub unsafe fn dictionaryWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![Self::class(), dictionaryWithContentsOfFile: path] } - pub unsafe fn dictionaryWithContentsOfURL(url: &NSURL) -> TodoGenerics { - msg_send![Self::class(), dictionaryWithContentsOfURL: url] + pub unsafe fn dictionaryWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), dictionaryWithContentsOfURL: url] } - pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> TodoGenerics { - msg_send![self, initWithContentsOfFile: path] + pub unsafe fn initWithContentsOfFile( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfFile: path] } - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> TodoGenerics { - msg_send![self, initWithContentsOfURL: url] + pub unsafe fn initWithContentsOfURL( + &self, + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfURL: url] } pub unsafe fn writeToFile_atomically(&self, path: &NSString, useAuxiliaryFile: bool) -> bool { msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] @@ -165,10 +187,7 @@ impl NSDictionary { pub unsafe fn dictionary() -> Id { msg_send_id![Self::class(), dictionary] } - pub unsafe fn dictionaryWithObject_forKey( - object: &ObjectType, - key: TodoGenerics, - ) -> Id { + pub unsafe fn dictionaryWithObject_forKey(object: &ObjectType, key: &id) -> Id { msg_send_id![Self::class(), dictionaryWithObject: object, forKey: key] } pub unsafe fn dictionaryWithObjects_forKeys_count( @@ -183,29 +202,34 @@ impl NSDictionary { count: cnt ] } - pub unsafe fn dictionaryWithDictionary(dict: TodoGenerics) -> Id { + pub unsafe fn dictionaryWithDictionary( + dict: &NSDictionary, + ) -> Id { msg_send_id![Self::class(), dictionaryWithDictionary: dict] } pub unsafe fn dictionaryWithObjects_forKeys( - objects: TodoGenerics, - keys: TodoGenerics, + objects: &NSArray, + keys: &NSArray, ) -> Id { msg_send_id![Self::class(), dictionaryWithObjects: objects, forKeys: keys] } - pub unsafe fn initWithDictionary(&self, otherDictionary: TodoGenerics) -> Id { + pub unsafe fn initWithDictionary( + &self, + otherDictionary: &NSDictionary, + ) -> Id { msg_send_id![self, initWithDictionary: otherDictionary] } pub unsafe fn initWithDictionary_copyItems( &self, - otherDictionary: TodoGenerics, + otherDictionary: &NSDictionary, flag: bool, ) -> Id { msg_send_id![self, initWithDictionary: otherDictionary, copyItems: flag] } pub unsafe fn initWithObjects_forKeys( &self, - objects: TodoGenerics, - keys: TodoGenerics, + objects: &NSArray, + keys: &NSArray, ) -> Id { msg_send_id![self, initWithObjects: objects, forKeys: keys] } @@ -213,14 +237,14 @@ impl NSDictionary { &self, url: &NSURL, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![self, initWithContentsOfURL: url, error: error] + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfURL: url, error: error] } pub unsafe fn dictionaryWithContentsOfURL_error( url: &NSURL, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![ + ) -> Option, Shared>> { + msg_send_id![ Self::class(), dictionaryWithContentsOfURL: url, error: error @@ -240,7 +264,7 @@ impl NSMutableDictionary Id { @@ -255,19 +279,22 @@ impl NSMutableDictionary NSMutableDictionary { - pub unsafe fn addEntriesFromDictionary(&self, otherDictionary: TodoGenerics) { + pub unsafe fn addEntriesFromDictionary( + &self, + otherDictionary: &NSDictionary, + ) { msg_send![self, addEntriesFromDictionary: otherDictionary] } pub unsafe fn removeAllObjects(&self) { msg_send![self, removeAllObjects] } - pub unsafe fn removeObjectsForKeys(&self, keyArray: TodoGenerics) { + pub unsafe fn removeObjectsForKeys(&self, keyArray: &NSArray) { msg_send![self, removeObjectsForKeys: keyArray] } - pub unsafe fn setDictionary(&self, otherDictionary: TodoGenerics) { + pub unsafe fn setDictionary(&self, otherDictionary: &NSDictionary) { msg_send![self, setDictionary: otherDictionary] } - pub unsafe fn setObject_forKeyedSubscript(&self, obj: Option<&ObjectType>, key: TodoGenerics) { + pub unsafe fn setObject_forKeyedSubscript(&self, obj: Option<&ObjectType>, key: &id) { msg_send![self, setObject: obj, forKeyedSubscript: key] } } @@ -276,29 +303,41 @@ impl NSMutableDictionary Id { msg_send_id![Self::class(), dictionaryWithCapacity: numItems] } - pub unsafe fn dictionaryWithContentsOfFile(path: &NSString) -> TodoGenerics { - msg_send![Self::class(), dictionaryWithContentsOfFile: path] + pub unsafe fn dictionaryWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![Self::class(), dictionaryWithContentsOfFile: path] } - pub unsafe fn dictionaryWithContentsOfURL(url: &NSURL) -> TodoGenerics { - msg_send![Self::class(), dictionaryWithContentsOfURL: url] + pub unsafe fn dictionaryWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), dictionaryWithContentsOfURL: url] } - pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> TodoGenerics { - msg_send![self, initWithContentsOfFile: path] + pub unsafe fn initWithContentsOfFile( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfFile: path] } - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> TodoGenerics { - msg_send![self, initWithContentsOfURL: url] + pub unsafe fn initWithContentsOfURL( + &self, + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfURL: url] } } #[doc = "NSSharedKeySetDictionary"] impl NSDictionary { - pub unsafe fn sharedKeySetForKeys(keys: TodoGenerics) -> Id { + pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id { msg_send_id![Self::class(), sharedKeySetForKeys: keys] } } #[doc = "NSSharedKeySetDictionary"] impl NSMutableDictionary { - pub unsafe fn dictionaryWithSharedKeySet(keyset: &Object) -> TodoGenerics { - msg_send![Self::class(), dictionaryWithSharedKeySet: keyset] + pub unsafe fn dictionaryWithSharedKeySet( + keyset: &Object, + ) -> Id, Shared> { + msg_send_id![Self::class(), dictionaryWithSharedKeySet: keyset] } } #[doc = "NSGenericFastEnumeraiton"] diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index f2661a8ae..9ce37a9e2 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -19,7 +19,7 @@ impl NSEnumerator { } #[doc = "NSExtendedEnumerator"] impl NSEnumerator { - pub unsafe fn allObjects(&self) -> TodoGenerics { - msg_send![self, allObjects] + pub unsafe fn allObjects(&self) -> Id, Shared> { + msg_send_id![self, allObjects] } } diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 1d4b32795..5418c5585 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -20,14 +20,14 @@ impl NSError { &self, domain: &NSErrorDomain, code: NSInteger, - dict: TodoGenerics, + dict: Option<&NSDictionary>, ) -> Id { msg_send_id![self, initWithDomain: domain, code: code, userInfo: dict] } pub unsafe fn errorWithDomain_code_userInfo( domain: &NSErrorDomain, code: NSInteger, - dict: TodoGenerics, + dict: Option<&NSDictionary>, ) -> Id { msg_send_id![ Self::class(), @@ -55,8 +55,8 @@ impl NSError { pub unsafe fn code(&self) -> NSInteger { msg_send![self, code] } - pub unsafe fn userInfo(&self) -> TodoGenerics { - msg_send![self, userInfo] + pub unsafe fn userInfo(&self) -> Id, Shared> { + msg_send_id![self, userInfo] } pub unsafe fn localizedDescription(&self) -> Id { msg_send_id![self, localizedDescription] @@ -67,8 +67,8 @@ impl NSError { pub unsafe fn localizedRecoverySuggestion(&self) -> Option> { msg_send_id![self, localizedRecoverySuggestion] } - pub unsafe fn localizedRecoveryOptions(&self) -> TodoGenerics { - msg_send![self, localizedRecoveryOptions] + pub unsafe fn localizedRecoveryOptions(&self) -> Option, Shared>> { + msg_send_id![self, localizedRecoveryOptions] } pub unsafe fn recoveryAttempter(&self) -> Option> { msg_send_id![self, recoveryAttempter] @@ -76,8 +76,8 @@ impl NSError { pub unsafe fn helpAnchor(&self) -> Option> { msg_send_id![self, helpAnchor] } - pub unsafe fn underlyingErrors(&self) -> TodoGenerics { - msg_send![self, underlyingErrors] + pub unsafe fn underlyingErrors(&self) -> Id, Shared> { + msg_send_id![self, underlyingErrors] } } #[doc = "NSErrorRecoveryAttempting"] diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index db3beef08..a4ee18c54 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -53,11 +53,11 @@ impl NSException { pub unsafe fn userInfo(&self) -> Option> { msg_send_id![self, userInfo] } - pub unsafe fn callStackReturnAddresses(&self) -> TodoGenerics { - msg_send![self, callStackReturnAddresses] + pub unsafe fn callStackReturnAddresses(&self) -> Id, Shared> { + msg_send_id![self, callStackReturnAddresses] } - pub unsafe fn callStackSymbols(&self) -> TodoGenerics { - msg_send![self, callStackSymbols] + pub unsafe fn callStackSymbols(&self) -> Id, Shared> { + msg_send_id![self, callStackSymbols] } } #[doc = "NSExceptionRaisingConveniences"] diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index b42cdbea6..7d99253e0 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -57,7 +57,9 @@ impl NSExpression { arguments: parameters ] } - pub unsafe fn expressionForAggregate(subexpressions: TodoGenerics) -> Id { + pub unsafe fn expressionForAggregate( + subexpressions: &NSArray, + ) -> Id { msg_send_id![Self::class(), expressionForAggregate: subexpressions] } pub unsafe fn expressionForUnionSet_with( @@ -107,7 +109,7 @@ impl NSExpression { } pub unsafe fn expressionForBlock_arguments( block: TodoBlock, - arguments: TodoGenerics, + arguments: Option<&NSArray>, ) -> Id { msg_send_id![ Self::class(), @@ -161,8 +163,8 @@ impl NSExpression { pub unsafe fn operand(&self) -> Id { msg_send_id![self, operand] } - pub unsafe fn arguments(&self) -> TodoGenerics { - msg_send![self, arguments] + pub unsafe fn arguments(&self) -> Option, Shared>> { + msg_send_id![self, arguments] } pub unsafe fn collection(&self) -> Id { msg_send_id![self, collection] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index 465d50ed5..1c83b9dc7 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -27,10 +27,10 @@ impl NSExtensionItem { ) { msg_send![self, setAttributedContentText: attributedContentText] } - pub unsafe fn attachments(&self) -> TodoGenerics { - msg_send![self, attachments] + pub unsafe fn attachments(&self) -> Option, Shared>> { + msg_send_id![self, attachments] } - pub unsafe fn setAttachments(&self, attachments: TodoGenerics) { + pub unsafe fn setAttachments(&self, attachments: Option<&NSArray>) { msg_send![self, setAttachments: attachments] } pub unsafe fn userInfo(&self) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index e1b8a5406..cccb9b930 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -42,21 +42,21 @@ extern_class!( } ); impl NSFileCoordinator { - pub unsafe fn addFilePresenter(filePresenter: TodoGenerics) { + pub unsafe fn addFilePresenter(filePresenter: &id) { msg_send![Self::class(), addFilePresenter: filePresenter] } - pub unsafe fn removeFilePresenter(filePresenter: TodoGenerics) { + pub unsafe fn removeFilePresenter(filePresenter: &id) { msg_send![Self::class(), removeFilePresenter: filePresenter] } pub unsafe fn initWithFilePresenter( &self, - filePresenterOrNil: TodoGenerics, + filePresenterOrNil: Option<&id>, ) -> Id { msg_send_id![self, initWithFilePresenter: filePresenterOrNil] } pub unsafe fn coordinateAccessWithIntents_queue_byAccessor( &self, - intents: TodoGenerics, + intents: &NSArray, queue: &NSOperationQueue, accessor: TodoBlock, ) { @@ -137,9 +137,9 @@ impl NSFileCoordinator { } pub unsafe fn prepareForReadingItemsAtURLs_options_writingItemsAtURLs_options_error_byAccessor( &self, - readingURLs: TodoGenerics, + readingURLs: &NSArray, readingOptions: NSFileCoordinatorReadingOptions, - writingURLs: TodoGenerics, + writingURLs: &NSArray, writingOptions: NSFileCoordinatorWritingOptions, outError: *mut *mut NSError, batchAccessor: TodoBlock, @@ -163,7 +163,7 @@ impl NSFileCoordinator { pub unsafe fn itemAtURL_didChangeUbiquityAttributes( &self, url: &NSURL, - attributes: TodoGenerics, + attributes: &NSSet, ) { msg_send![ self, @@ -174,8 +174,8 @@ impl NSFileCoordinator { pub unsafe fn cancel(&self) { msg_send![self, cancel] } - pub unsafe fn filePresenters() -> TodoGenerics { - msg_send![Self::class(), filePresenters] + pub unsafe fn filePresenters() -> Id, Shared> { + msg_send_id![Self::class(), filePresenters] } pub unsafe fn purposeIdentifier(&self) -> Id { msg_send_id![self, purposeIdentifier] diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 50403e3f4..3f39c1791 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -127,25 +127,34 @@ impl NSFileHandle { } #[doc = "NSFileHandleAsynchronousAccess"] impl NSFileHandle { - pub unsafe fn readInBackgroundAndNotifyForModes(&self, modes: TodoGenerics) { + pub unsafe fn readInBackgroundAndNotifyForModes(&self, modes: Option<&NSArray>) { msg_send![self, readInBackgroundAndNotifyForModes: modes] } pub unsafe fn readInBackgroundAndNotify(&self) { msg_send![self, readInBackgroundAndNotify] } - pub unsafe fn readToEndOfFileInBackgroundAndNotifyForModes(&self, modes: TodoGenerics) { + pub unsafe fn readToEndOfFileInBackgroundAndNotifyForModes( + &self, + modes: Option<&NSArray>, + ) { msg_send![self, readToEndOfFileInBackgroundAndNotifyForModes: modes] } pub unsafe fn readToEndOfFileInBackgroundAndNotify(&self) { msg_send![self, readToEndOfFileInBackgroundAndNotify] } - pub unsafe fn acceptConnectionInBackgroundAndNotifyForModes(&self, modes: TodoGenerics) { + pub unsafe fn acceptConnectionInBackgroundAndNotifyForModes( + &self, + modes: Option<&NSArray>, + ) { msg_send![self, acceptConnectionInBackgroundAndNotifyForModes: modes] } pub unsafe fn acceptConnectionInBackgroundAndNotify(&self) { msg_send![self, acceptConnectionInBackgroundAndNotify] } - pub unsafe fn waitForDataInBackgroundAndNotifyForModes(&self, modes: TodoGenerics) { + pub unsafe fn waitForDataInBackgroundAndNotifyForModes( + &self, + modes: Option<&NSArray>, + ) { msg_send![self, waitForDataInBackgroundAndNotifyForModes: modes] } pub unsafe fn waitForDataInBackgroundAndNotify(&self) { diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 321d92a50..67c5c992b 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -32,10 +32,10 @@ extern_class!( impl NSFileManager { pub unsafe fn mountedVolumeURLsIncludingResourceValuesForKeys_options( &self, - propertyKeys: TodoGenerics, + propertyKeys: Option<&NSArray>, options: NSVolumeEnumerationOptions, - ) -> TodoGenerics { - msg_send![ + ) -> Option, Shared>> { + msg_send_id![ self, mountedVolumeURLsIncludingResourceValuesForKeys: propertyKeys, options: options @@ -57,11 +57,11 @@ impl NSFileManager { pub unsafe fn contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error( &self, url: &NSURL, - keys: TodoGenerics, + keys: Option<&NSArray>, mask: NSDirectoryEnumerationOptions, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![ + ) -> Option, Shared>> { + msg_send_id![ self, contentsOfDirectoryAtURL: url, includingPropertiesForKeys: keys, @@ -73,8 +73,8 @@ impl NSFileManager { &self, directory: NSSearchPathDirectory, domainMask: NSSearchPathDomainMask, - ) -> TodoGenerics { - msg_send![self, URLsForDirectory: directory, inDomains: domainMask] + ) -> Id, Shared> { + msg_send_id![self, URLsForDirectory: directory, inDomains: domainMask] } pub unsafe fn URLForDirectory_inDomain_appropriateForURL_create_error( &self, @@ -129,7 +129,7 @@ impl NSFileManager { &self, url: &NSURL, createIntermediates: bool, - attributes: TodoGenerics, + attributes: Option<&NSDictionary>, error: *mut *mut NSError, ) -> bool { msg_send![ @@ -155,7 +155,7 @@ impl NSFileManager { } pub unsafe fn setAttributes_ofItemAtPath_error( &self, - attributes: TodoGenerics, + attributes: &NSDictionary, path: &NSString, error: *mut *mut NSError, ) -> bool { @@ -170,7 +170,7 @@ impl NSFileManager { &self, path: &NSString, createIntermediates: bool, - attributes: TodoGenerics, + attributes: Option<&NSDictionary>, error: *mut *mut NSError, ) -> bool { msg_send![ @@ -185,29 +185,29 @@ impl NSFileManager { &self, path: &NSString, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![self, contentsOfDirectoryAtPath: path, error: error] + ) -> Option, Shared>> { + msg_send_id![self, contentsOfDirectoryAtPath: path, error: error] } pub unsafe fn subpathsOfDirectoryAtPath_error( &self, path: &NSString, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![self, subpathsOfDirectoryAtPath: path, error: error] + ) -> Option, Shared>> { + msg_send_id![self, subpathsOfDirectoryAtPath: path, error: error] } pub unsafe fn attributesOfItemAtPath_error( &self, path: &NSString, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![self, attributesOfItemAtPath: path, error: error] + ) -> Option, Shared>> { + msg_send_id![self, attributesOfItemAtPath: path, error: error] } pub unsafe fn attributesOfFileSystemForPath_error( &self, path: &NSString, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![self, attributesOfFileSystemForPath: path, error: error] + ) -> Option, Shared>> { + msg_send_id![self, attributesOfFileSystemForPath: path, error: error] } pub unsafe fn createSymbolicLinkAtPath_withDestinationPath_error( &self, @@ -401,20 +401,26 @@ impl NSFileManager { pub unsafe fn displayNameAtPath(&self, path: &NSString) -> Id { msg_send_id![self, displayNameAtPath: path] } - pub unsafe fn componentsToDisplayForPath(&self, path: &NSString) -> TodoGenerics { - msg_send![self, componentsToDisplayForPath: path] + pub unsafe fn componentsToDisplayForPath( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, componentsToDisplayForPath: path] } - pub unsafe fn enumeratorAtPath(&self, path: &NSString) -> TodoGenerics { - msg_send![self, enumeratorAtPath: path] + pub unsafe fn enumeratorAtPath( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, enumeratorAtPath: path] } pub unsafe fn enumeratorAtURL_includingPropertiesForKeys_options_errorHandler( &self, url: &NSURL, - keys: TodoGenerics, + keys: Option<&NSArray>, mask: NSDirectoryEnumerationOptions, handler: TodoBlock, - ) -> TodoGenerics { - msg_send![ + ) -> Option, Shared>> { + msg_send_id![ self, enumeratorAtURL: url, includingPropertiesForKeys: keys, @@ -422,8 +428,8 @@ impl NSFileManager { errorHandler: handler ] } - pub unsafe fn subpathsAtPath(&self, path: &NSString) -> TodoGenerics { - msg_send![self, subpathsAtPath: path] + pub unsafe fn subpathsAtPath(&self, path: &NSString) -> Option, Shared>> { + msg_send_id![self, subpathsAtPath: path] } pub unsafe fn contentsAtPath(&self, path: &NSString) -> Option> { msg_send_id![self, contentsAtPath: path] @@ -432,7 +438,7 @@ impl NSFileManager { &self, path: &NSString, data: Option<&NSData>, - attr: TodoGenerics, + attr: Option<&NSDictionary>, ) -> bool { msg_send![ self, @@ -544,17 +550,17 @@ impl NSFileManager { pub unsafe fn defaultManager() -> Id { msg_send_id![Self::class(), defaultManager] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn currentDirectoryPath(&self) -> Id { msg_send_id![self, currentDirectoryPath] } - pub unsafe fn ubiquityIdentityToken(&self) -> TodoGenerics { - msg_send![self, ubiquityIdentityToken] + pub unsafe fn ubiquityIdentityToken(&self) -> Option> { + msg_send_id![self, ubiquityIdentityToken] } } #[doc = "NSUserInformation"] @@ -597,11 +603,15 @@ impl NSDirectoryEnumerator { pub unsafe fn skipDescendants(&self) { msg_send![self, skipDescendants] } - pub unsafe fn fileAttributes(&self) -> TodoGenerics { - msg_send![self, fileAttributes] + pub unsafe fn fileAttributes( + &self, + ) -> Option, Shared>> { + msg_send_id![self, fileAttributes] } - pub unsafe fn directoryAttributes(&self) -> TodoGenerics { - msg_send![self, directoryAttributes] + pub unsafe fn directoryAttributes( + &self, + ) -> Option, Shared>> { + msg_send_id![self, directoryAttributes] } pub unsafe fn isEnumeratingDirectoryPostOrder(&self) -> bool { msg_send![self, isEnumeratingDirectoryPostOrder] diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index ee18b23e8..78e1aa564 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -21,11 +21,15 @@ impl NSFileVersion { pub unsafe fn currentVersionOfItemAtURL(url: &NSURL) -> Option> { msg_send_id![Self::class(), currentVersionOfItemAtURL: url] } - pub unsafe fn otherVersionsOfItemAtURL(url: &NSURL) -> TodoGenerics { - msg_send![Self::class(), otherVersionsOfItemAtURL: url] + pub unsafe fn otherVersionsOfItemAtURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), otherVersionsOfItemAtURL: url] } - pub unsafe fn unresolvedConflictVersionsOfItemAtURL(url: &NSURL) -> TodoGenerics { - msg_send![Self::class(), unresolvedConflictVersionsOfItemAtURL: url] + pub unsafe fn unresolvedConflictVersionsOfItemAtURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), unresolvedConflictVersionsOfItemAtURL: url] } pub unsafe fn getNonlocalVersionsOfItemAtURL_completionHandler( url: &NSURL, @@ -103,8 +107,8 @@ impl NSFileVersion { pub unsafe fn modificationDate(&self) -> Option> { msg_send_id![self, modificationDate] } - pub unsafe fn persistentIdentifier(&self) -> TodoGenerics { - msg_send![self, persistentIdentifier] + pub unsafe fn persistentIdentifier(&self) -> Id { + msg_send_id![self, persistentIdentifier] } pub unsafe fn isConflict(&self) -> bool { msg_send![self, isConflict] diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 0eca09a0a..e8306442a 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -26,7 +26,7 @@ impl NSFileWrapper { } pub unsafe fn initDirectoryWithFileWrappers( &self, - childrenByPreferredName: TodoGenerics, + childrenByPreferredName: &NSDictionary, ) -> Id { msg_send_id![self, initDirectoryWithFileWrappers: childrenByPreferredName] } @@ -115,17 +115,17 @@ impl NSFileWrapper { pub unsafe fn setFilename(&self, filename: Option<&NSString>) { msg_send![self, setFilename: filename] } - pub unsafe fn fileAttributes(&self) -> TodoGenerics { - msg_send![self, fileAttributes] + pub unsafe fn fileAttributes(&self) -> Id, Shared> { + msg_send_id![self, fileAttributes] } - pub unsafe fn setFileAttributes(&self, fileAttributes: TodoGenerics) { + pub unsafe fn setFileAttributes(&self, fileAttributes: &NSDictionary) { msg_send![self, setFileAttributes: fileAttributes] } pub unsafe fn serializedRepresentation(&self) -> Option> { msg_send_id![self, serializedRepresentation] } - pub unsafe fn fileWrappers(&self) -> TodoGenerics { - msg_send![self, fileWrappers] + pub unsafe fn fileWrappers(&self) -> Option, Shared>> { + msg_send_id![self, fileWrappers] } pub unsafe fn regularFileContents(&self) -> Option> { msg_send_id![self, regularFileContents] diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index cf5b56787..2c2f419d6 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -25,7 +25,7 @@ impl NSFormatter { pub unsafe fn attributedStringForObjectValue_withDefaultAttributes( &self, obj: &Object, - attrs: TodoGenerics, + attrs: Option<&NSDictionary>, ) -> Option> { msg_send_id![ self, diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index 2ac3965a1..bc4854633 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -20,29 +20,36 @@ extern_class!( } ); impl NSHTTPCookie { - pub unsafe fn initWithProperties(&self, properties: TodoGenerics) -> Option> { + pub unsafe fn initWithProperties( + &self, + properties: &NSDictionary, + ) -> Option> { msg_send_id![self, initWithProperties: properties] } pub unsafe fn cookieWithProperties( - properties: TodoGenerics, + properties: &NSDictionary, ) -> Option> { msg_send_id![Self::class(), cookieWithProperties: properties] } - pub unsafe fn requestHeaderFieldsWithCookies(cookies: TodoGenerics) -> TodoGenerics { - msg_send![Self::class(), requestHeaderFieldsWithCookies: cookies] + pub unsafe fn requestHeaderFieldsWithCookies( + cookies: &NSArray, + ) -> Id, Shared> { + msg_send_id![Self::class(), requestHeaderFieldsWithCookies: cookies] } pub unsafe fn cookiesWithResponseHeaderFields_forURL( - headerFields: TodoGenerics, + headerFields: &NSDictionary, URL: &NSURL, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ Self::class(), cookiesWithResponseHeaderFields: headerFields, forURL: URL ] } - pub unsafe fn properties(&self) -> TodoGenerics { - msg_send![self, properties] + pub unsafe fn properties( + &self, + ) -> Option, Shared>> { + msg_send_id![self, properties] } pub unsafe fn version(&self) -> NSUInteger { msg_send![self, version] @@ -77,8 +84,8 @@ impl NSHTTPCookie { pub unsafe fn commentURL(&self) -> Option> { msg_send_id![self, commentURL] } - pub unsafe fn portList(&self) -> TodoGenerics { - msg_send![self, portList] + pub unsafe fn portList(&self) -> Option, Shared>> { + msg_send_id![self, portList] } pub unsafe fn sameSitePolicy(&self) -> Option> { msg_send_id![self, sameSitePolicy] diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index d1360c447..cbc4adbef 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -36,12 +36,12 @@ impl NSHTTPCookieStorage { pub unsafe fn removeCookiesSinceDate(&self, date: &NSDate) { msg_send![self, removeCookiesSinceDate: date] } - pub unsafe fn cookiesForURL(&self, URL: &NSURL) -> TodoGenerics { - msg_send![self, cookiesForURL: URL] + pub unsafe fn cookiesForURL(&self, URL: &NSURL) -> Option, Shared>> { + msg_send_id![self, cookiesForURL: URL] } pub unsafe fn setCookies_forURL_mainDocumentURL( &self, - cookies: TodoGenerics, + cookies: &NSArray, URL: Option<&NSURL>, mainDocumentURL: Option<&NSURL>, ) { @@ -52,14 +52,17 @@ impl NSHTTPCookieStorage { mainDocumentURL: mainDocumentURL ] } - pub unsafe fn sortedCookiesUsingDescriptors(&self, sortOrder: TodoGenerics) -> TodoGenerics { - msg_send![self, sortedCookiesUsingDescriptors: sortOrder] + pub unsafe fn sortedCookiesUsingDescriptors( + &self, + sortOrder: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, sortedCookiesUsingDescriptors: sortOrder] } pub unsafe fn sharedHTTPCookieStorage() -> Id { msg_send_id![Self::class(), sharedHTTPCookieStorage] } - pub unsafe fn cookies(&self) -> TodoGenerics { - msg_send![self, cookies] + pub unsafe fn cookies(&self) -> Option, Shared>> { + msg_send_id![self, cookies] } pub unsafe fn cookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy { msg_send![self, cookieAcceptPolicy] @@ -70,7 +73,11 @@ impl NSHTTPCookieStorage { } #[doc = "NSURLSessionTaskAdditions"] impl NSHTTPCookieStorage { - pub unsafe fn storeCookies_forTask(&self, cookies: TodoGenerics, task: &NSURLSessionTask) { + pub unsafe fn storeCookies_forTask( + &self, + cookies: &NSArray, + task: &NSURLSessionTask, + ) { msg_send![self, storeCookies: cookies, forTask: task] } pub unsafe fn getCookiesForTask_completionHandler( diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index f61288656..c3226fff1 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -33,20 +33,22 @@ impl NSHashTable { capacity: initialCapacity ] } - pub unsafe fn hashTableWithOptions(options: NSPointerFunctionsOptions) -> TodoGenerics { - msg_send![Self::class(), hashTableWithOptions: options] + pub unsafe fn hashTableWithOptions( + options: NSPointerFunctionsOptions, + ) -> Id, Shared> { + msg_send_id![Self::class(), hashTableWithOptions: options] } pub unsafe fn hashTableWithWeakObjects() -> Id { msg_send_id![Self::class(), hashTableWithWeakObjects] } - pub unsafe fn weakObjectsHashTable() -> TodoGenerics { - msg_send![Self::class(), weakObjectsHashTable] + pub unsafe fn weakObjectsHashTable() -> Id, Shared> { + msg_send_id![Self::class(), weakObjectsHashTable] } pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option> { msg_send_id![self, member: object] } - pub unsafe fn objectEnumerator(&self) -> TodoGenerics { - msg_send![self, objectEnumerator] + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] } pub unsafe fn addObject(&self, object: Option<&ObjectType>) { msg_send![self, addObject: object] @@ -60,22 +62,22 @@ impl NSHashTable { pub unsafe fn containsObject(&self, anObject: Option<&ObjectType>) -> bool { msg_send![self, containsObject: anObject] } - pub unsafe fn intersectsHashTable(&self, other: TodoGenerics) -> bool { + pub unsafe fn intersectsHashTable(&self, other: &NSHashTable) -> bool { msg_send![self, intersectsHashTable: other] } - pub unsafe fn isEqualToHashTable(&self, other: TodoGenerics) -> bool { + pub unsafe fn isEqualToHashTable(&self, other: &NSHashTable) -> bool { msg_send![self, isEqualToHashTable: other] } - pub unsafe fn isSubsetOfHashTable(&self, other: TodoGenerics) -> bool { + pub unsafe fn isSubsetOfHashTable(&self, other: &NSHashTable) -> bool { msg_send![self, isSubsetOfHashTable: other] } - pub unsafe fn intersectHashTable(&self, other: TodoGenerics) { + pub unsafe fn intersectHashTable(&self, other: &NSHashTable) { msg_send![self, intersectHashTable: other] } - pub unsafe fn unionHashTable(&self, other: TodoGenerics) { + pub unsafe fn unionHashTable(&self, other: &NSHashTable) { msg_send![self, unionHashTable: other] } - pub unsafe fn minusHashTable(&self, other: TodoGenerics) { + pub unsafe fn minusHashTable(&self, other: &NSHashTable) { msg_send![self, minusHashTable: other] } pub unsafe fn pointerFunctions(&self) -> Id { @@ -84,13 +86,13 @@ impl NSHashTable { pub unsafe fn count(&self) -> NSUInteger { msg_send![self, count] } - pub unsafe fn allObjects(&self) -> TodoGenerics { - msg_send![self, allObjects] + pub unsafe fn allObjects(&self) -> Id, Shared> { + msg_send_id![self, allObjects] } pub unsafe fn anyObject(&self) -> Option> { msg_send_id![self, anyObject] } - pub unsafe fn setRepresentation(&self) -> TodoGenerics { - msg_send![self, setRepresentation] + pub unsafe fn setRepresentation(&self) -> Id, Shared> { + msg_send_id![self, setRepresentation] } } diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index c81a2540c..16b57969f 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -38,14 +38,14 @@ impl NSHost { pub unsafe fn name(&self) -> Option> { msg_send_id![self, name] } - pub unsafe fn names(&self) -> TodoGenerics { - msg_send![self, names] + pub unsafe fn names(&self) -> Id, Shared> { + msg_send_id![self, names] } pub unsafe fn address(&self) -> Option> { msg_send_id![self, address] } - pub unsafe fn addresses(&self) -> TodoGenerics { - msg_send![self, addresses] + pub unsafe fn addresses(&self) -> Id, Shared> { + msg_send_id![self, addresses] } pub unsafe fn localizedName(&self) -> Option> { msg_send_id![self, localizedName] diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 5ff65292a..3350902cb 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -48,8 +48,8 @@ impl NSItemProvider { pub unsafe fn registeredTypeIdentifiersWithFileOptions( &self, fileOptions: NSItemProviderFileOptions, - ) -> TodoGenerics { - msg_send![self, registeredTypeIdentifiersWithFileOptions: fileOptions] + ) -> Id, Shared> { + msg_send_id![self, registeredTypeIdentifiersWithFileOptions: fileOptions] } pub unsafe fn hasItemConformingToTypeIdentifier(&self, typeIdentifier: &NSString) -> bool { msg_send![self, hasItemConformingToTypeIdentifier: typeIdentifier] @@ -98,19 +98,19 @@ impl NSItemProvider { completionHandler: completionHandler ] } - pub unsafe fn initWithObject(&self, object: TodoGenerics) -> Id { + pub unsafe fn initWithObject(&self, object: &id) -> Id { msg_send_id![self, initWithObject: object] } pub unsafe fn registerObject_visibility( &self, - object: TodoGenerics, + object: &id, visibility: NSItemProviderRepresentationVisibility, ) { msg_send![self, registerObject: object, visibility: visibility] } pub unsafe fn registerObjectOfClass_visibility_loadHandler( &self, - aClass: TodoGenerics, + aClass: &Class, visibility: NSItemProviderRepresentationVisibility, loadHandler: TodoBlock, ) { @@ -121,12 +121,12 @@ impl NSItemProvider { loadHandler: loadHandler ] } - pub unsafe fn canLoadObjectOfClass(&self, aClass: TodoGenerics) -> bool { + pub unsafe fn canLoadObjectOfClass(&self, aClass: &Class) -> bool { msg_send![self, canLoadObjectOfClass: aClass] } pub unsafe fn loadObjectOfClass_completionHandler( &self, - aClass: TodoGenerics, + aClass: &Class, completionHandler: TodoBlock, ) -> Id { msg_send_id![ @@ -137,7 +137,7 @@ impl NSItemProvider { } pub unsafe fn initWithItem_typeIdentifier( &self, - item: TodoGenerics, + item: Option<&id>, typeIdentifier: Option<&NSString>, ) -> Id { msg_send_id![self, initWithItem: item, typeIdentifier: typeIdentifier] @@ -172,8 +172,8 @@ impl NSItemProvider { completionHandler: completionHandler ] } - pub unsafe fn registeredTypeIdentifiers(&self) -> TodoGenerics { - msg_send![self, registeredTypeIdentifiers] + pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared> { + msg_send_id![self, registeredTypeIdentifiers] } pub unsafe fn suggestedName(&self) -> Option> { msg_send_id![self, suggestedName] diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index 3baa1282c..eea58f859 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -81,10 +81,16 @@ impl NSObject { pub unsafe fn setNilValueForKey(&self, key: &NSString) { msg_send![self, setNilValueForKey: key] } - pub unsafe fn dictionaryWithValuesForKeys(&self, keys: TodoGenerics) -> TodoGenerics { - msg_send![self, dictionaryWithValuesForKeys: keys] + pub unsafe fn dictionaryWithValuesForKeys( + &self, + keys: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, dictionaryWithValuesForKeys: keys] } - pub unsafe fn setValuesForKeysWithDictionary(&self, keyedValues: TodoGenerics) { + pub unsafe fn setValuesForKeysWithDictionary( + &self, + keyedValues: &NSDictionary, + ) { msg_send![self, setValuesForKeysWithDictionary: keyedValues] } pub unsafe fn accessInstanceVariablesDirectly() -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 9433bc9fc..3ad894fdf 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -15,7 +15,7 @@ impl NSObject { &self, keyPath: Option<&NSString>, object: Option<&Object>, - change: TodoGenerics, + change: Option<&NSDictionary>, context: *mut c_void, ) { msg_send![ @@ -271,8 +271,10 @@ impl NSObject { } #[doc = "NSKeyValueObservingCustomization"] impl NSObject { - pub unsafe fn keyPathsForValuesAffectingValueForKey(key: &NSString) -> TodoGenerics { - msg_send![Self::class(), keyPathsForValuesAffectingValueForKey: key] + pub unsafe fn keyPathsForValuesAffectingValueForKey( + key: &NSString, + ) -> Id, Shared> { + msg_send_id![Self::class(), keyPathsForValuesAffectingValueForKey: key] } pub unsafe fn automaticallyNotifiesObserversForKey(key: &NSString) -> bool { msg_send![Self::class(), automaticallyNotifiesObserversForKey: key] diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 10b516be1..b219d94d0 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -92,10 +92,10 @@ impl NSKeyedArchiver { ) { msg_send![self, encodeBytes: bytes, length: length, forKey: key] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn outputFormat(&self) -> NSPropertyListFormat { @@ -168,7 +168,7 @@ impl NSKeyedUnarchiver { ] } pub unsafe fn unarchivedObjectOfClasses_fromData_error( - classes: TodoGenerics, + classes: &NSSet, data: &NSData, error: *mut *mut NSError, ) -> Option> { @@ -180,7 +180,7 @@ impl NSKeyedUnarchiver { ] } pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( - classes: TodoGenerics, + classes: &NSSet, data: &NSData, error: *mut *mut NSError, ) -> Option> { @@ -192,8 +192,8 @@ impl NSKeyedUnarchiver { ] } pub unsafe fn unarchivedDictionaryWithKeysOfClasses_objectsOfClasses_fromData_error( - keyClasses: TodoGenerics, - valueClasses: TodoGenerics, + keyClasses: &NSSet, + valueClasses: &NSSet, data: &NSData, error: *mut *mut NSError, ) -> Option> { @@ -273,10 +273,10 @@ impl NSKeyedUnarchiver { ) -> *mut uint8_t { msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn requiresSecureCoding(&self) -> bool { @@ -302,8 +302,8 @@ impl NSObject { ) -> Option> { msg_send_id![self, replacementObjectForKeyedArchiver: archiver] } - pub unsafe fn classFallbacksForKeyedArchiver() -> TodoGenerics { - msg_send![Self::class(), classFallbacksForKeyedArchiver] + pub unsafe fn classFallbacksForKeyedArchiver() -> Id, Shared> { + msg_send_id![Self::class(), classFallbacksForKeyedArchiver] } pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class> { msg_send![self, classForKeyedArchiver] diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 3daafb523..a00282add 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -19,7 +19,7 @@ extern_class!( impl NSLinguisticTagger { pub unsafe fn initWithTagSchemes_options( &self, - tagSchemes: TodoGenerics, + tagSchemes: &NSArray, opts: NSUInteger, ) -> Id { msg_send_id![self, initWithTagSchemes: tagSchemes, options: opts] @@ -27,15 +27,17 @@ impl NSLinguisticTagger { pub unsafe fn availableTagSchemesForUnit_language( unit: NSLinguisticTaggerUnit, language: &NSString, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ Self::class(), availableTagSchemesForUnit: unit, language: language ] } - pub unsafe fn availableTagSchemesForLanguage(language: &NSString) -> TodoGenerics { - msg_send![Self::class(), availableTagSchemesForLanguage: language] + pub unsafe fn availableTagSchemesForLanguage( + language: &NSString, + ) -> Id, Shared> { + msg_send_id![Self::class(), availableTagSchemesForLanguage: language] } pub unsafe fn setOrthography_range(&self, orthography: Option<&NSOrthography>, range: NSRange) { msg_send![self, setOrthography: orthography, range: range] @@ -102,9 +104,9 @@ impl NSLinguisticTagger { unit: NSLinguisticTaggerUnit, scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, - tokenRanges: *mut TodoGenerics, - ) -> TodoGenerics { - msg_send![ + tokenRanges: *mut *mut NSArray, + ) -> Id, Shared> { + msg_send_id![ self, tagsInRange: range, unit: unit, @@ -148,9 +150,9 @@ impl NSLinguisticTagger { range: NSRange, tagScheme: &NSString, opts: NSLinguisticTaggerOptions, - tokenRanges: *mut TodoGenerics, - ) -> TodoGenerics { - msg_send![ + tokenRanges: *mut *mut NSArray, + ) -> Id, Shared> { + msg_send_id![ self, tagsInRange: range, scheme: tagScheme, @@ -186,9 +188,9 @@ impl NSLinguisticTagger { scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, - tokenRanges: *mut TodoGenerics, - ) -> TodoGenerics { - msg_send![ + tokenRanges: *mut *mut NSArray, + ) -> Id, Shared> { + msg_send_id![ Self::class(), tagsForString: string, range: range, @@ -225,9 +227,9 @@ impl NSLinguisticTagger { tagScheme: &NSString, tokenRange: NSRangePointer, sentenceRange: NSRangePointer, - scores: *mut TodoGenerics, - ) -> TodoGenerics { - msg_send![ + scores: *mut *mut NSArray, + ) -> Option, Shared>> { + msg_send_id![ self, possibleTagsAtIndex: charIndex, scheme: tagScheme, @@ -236,8 +238,8 @@ impl NSLinguisticTagger { scores: scores ] } - pub unsafe fn tagSchemes(&self) -> TodoGenerics { - msg_send![self, tagSchemes] + pub unsafe fn tagSchemes(&self) -> Id, Shared> { + msg_send_id![self, tagSchemes] } pub unsafe fn string(&self) -> Option> { msg_send_id![self, string] @@ -257,9 +259,9 @@ impl NSString { scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, - tokenRanges: *mut TodoGenerics, - ) -> TodoGenerics { - msg_send![ + tokenRanges: *mut *mut NSArray, + ) -> Id, Shared> { + msg_send_id![ self, linguisticTagsInRange: range, scheme: scheme, diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index 2f5ef5ca3..7c95bf246 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -13,7 +13,9 @@ extern_class!( } ); impl NSListFormatter { - pub unsafe fn localizedStringByJoiningStrings(strings: TodoGenerics) -> Id { + pub unsafe fn localizedStringByJoiningStrings( + strings: &NSArray, + ) -> Id { msg_send_id![Self::class(), localizedStringByJoiningStrings: strings] } pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 6b11b84a8..301bffcea 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -175,10 +175,14 @@ impl NSLocale { } #[doc = "NSLocaleGeneralInfo"] impl NSLocale { - pub unsafe fn componentsFromLocaleIdentifier(string: &NSString) -> TodoGenerics { - msg_send![Self::class(), componentsFromLocaleIdentifier: string] + pub unsafe fn componentsFromLocaleIdentifier( + string: &NSString, + ) -> Id, Shared> { + msg_send_id![Self::class(), componentsFromLocaleIdentifier: string] } - pub unsafe fn localeIdentifierFromComponents(dict: TodoGenerics) -> Id { + pub unsafe fn localeIdentifierFromComponents( + dict: &NSDictionary, + ) -> Id { msg_send_id![Self::class(), localeIdentifierFromComponents: dict] } pub unsafe fn canonicalLocaleIdentifierFromString(string: &NSString) -> Id { @@ -206,22 +210,22 @@ impl NSLocale { pub unsafe fn lineDirectionForLanguage(isoLangCode: &NSString) -> NSLocaleLanguageDirection { msg_send![Self::class(), lineDirectionForLanguage: isoLangCode] } - pub unsafe fn availableLocaleIdentifiers() -> TodoGenerics { - msg_send![Self::class(), availableLocaleIdentifiers] + pub unsafe fn availableLocaleIdentifiers() -> Id, Shared> { + msg_send_id![Self::class(), availableLocaleIdentifiers] } - pub unsafe fn ISOLanguageCodes() -> TodoGenerics { - msg_send![Self::class(), ISOLanguageCodes] + pub unsafe fn ISOLanguageCodes() -> Id, Shared> { + msg_send_id![Self::class(), ISOLanguageCodes] } - pub unsafe fn ISOCountryCodes() -> TodoGenerics { - msg_send![Self::class(), ISOCountryCodes] + pub unsafe fn ISOCountryCodes() -> Id, Shared> { + msg_send_id![Self::class(), ISOCountryCodes] } - pub unsafe fn ISOCurrencyCodes() -> TodoGenerics { - msg_send![Self::class(), ISOCurrencyCodes] + pub unsafe fn ISOCurrencyCodes() -> Id, Shared> { + msg_send_id![Self::class(), ISOCurrencyCodes] } - pub unsafe fn commonISOCurrencyCodes() -> TodoGenerics { - msg_send![Self::class(), commonISOCurrencyCodes] + pub unsafe fn commonISOCurrencyCodes() -> Id, Shared> { + msg_send_id![Self::class(), commonISOCurrencyCodes] } - pub unsafe fn preferredLanguages() -> TodoGenerics { - msg_send![Self::class(), preferredLanguages] + pub unsafe fn preferredLanguages() -> Id, Shared> { + msg_send_id![Self::class(), preferredLanguages] } } diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index b1be00d6d..341373ec2 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -44,8 +44,8 @@ impl NSMapTable { pub unsafe fn mapTableWithKeyOptions_valueOptions( keyOptions: NSPointerFunctionsOptions, valueOptions: NSPointerFunctionsOptions, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ Self::class(), mapTableWithKeyOptions: keyOptions, valueOptions: valueOptions @@ -63,17 +63,17 @@ impl NSMapTable { pub unsafe fn mapTableWithWeakToWeakObjects() -> Id { msg_send_id![Self::class(), mapTableWithWeakToWeakObjects] } - pub unsafe fn strongToStrongObjectsMapTable() -> TodoGenerics { - msg_send![Self::class(), strongToStrongObjectsMapTable] + pub unsafe fn strongToStrongObjectsMapTable() -> Id, Shared> { + msg_send_id![Self::class(), strongToStrongObjectsMapTable] } - pub unsafe fn weakToStrongObjectsMapTable() -> TodoGenerics { - msg_send![Self::class(), weakToStrongObjectsMapTable] + pub unsafe fn weakToStrongObjectsMapTable() -> Id, Shared> { + msg_send_id![Self::class(), weakToStrongObjectsMapTable] } - pub unsafe fn strongToWeakObjectsMapTable() -> TodoGenerics { - msg_send![Self::class(), strongToWeakObjectsMapTable] + pub unsafe fn strongToWeakObjectsMapTable() -> Id, Shared> { + msg_send_id![Self::class(), strongToWeakObjectsMapTable] } - pub unsafe fn weakToWeakObjectsMapTable() -> TodoGenerics { - msg_send![Self::class(), weakToWeakObjectsMapTable] + pub unsafe fn weakToWeakObjectsMapTable() -> Id, Shared> { + msg_send_id![Self::class(), weakToWeakObjectsMapTable] } pub unsafe fn objectForKey(&self, aKey: Option<&KeyType>) -> Option> { msg_send_id![self, objectForKey: aKey] @@ -84,17 +84,17 @@ impl NSMapTable { pub unsafe fn setObject_forKey(&self, anObject: Option<&ObjectType>, aKey: Option<&KeyType>) { msg_send![self, setObject: anObject, forKey: aKey] } - pub unsafe fn keyEnumerator(&self) -> TodoGenerics { - msg_send![self, keyEnumerator] + pub unsafe fn keyEnumerator(&self) -> Id, Shared> { + msg_send_id![self, keyEnumerator] } - pub unsafe fn objectEnumerator(&self) -> TodoGenerics { - msg_send![self, objectEnumerator] + pub unsafe fn objectEnumerator(&self) -> Option, Shared>> { + msg_send_id![self, objectEnumerator] } pub unsafe fn removeAllObjects(&self) { msg_send![self, removeAllObjects] } - pub unsafe fn dictionaryRepresentation(&self) -> TodoGenerics { - msg_send![self, dictionaryRepresentation] + pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared> { + msg_send_id![self, dictionaryRepresentation] } pub unsafe fn keyPointerFunctions(&self) -> Id { msg_send_id![self, keyPointerFunctions] diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index 65f53cfb5..b92ac392f 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -28,14 +28,17 @@ impl NSMeasurement { pub unsafe fn measurementByConvertingToUnit(&self, unit: &NSUnit) -> Id { msg_send_id![self, measurementByConvertingToUnit: unit] } - pub unsafe fn measurementByAddingMeasurement(&self, measurement: TodoGenerics) -> TodoGenerics { - msg_send![self, measurementByAddingMeasurement: measurement] + pub unsafe fn measurementByAddingMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id, Shared> { + msg_send_id![self, measurementByAddingMeasurement: measurement] } pub unsafe fn measurementBySubtractingMeasurement( &self, - measurement: TodoGenerics, - ) -> TodoGenerics { - msg_send![self, measurementBySubtractingMeasurement: measurement] + measurement: &NSMeasurement, + ) -> Id, Shared> { + msg_send_id![self, measurementBySubtractingMeasurement: measurement] } pub unsafe fn unit(&self) -> Id { msg_send_id![self, unit] diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 2d7a3123c..5ff1659a9 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -56,10 +56,10 @@ impl NSMetadataQuery { ) -> Option> { msg_send_id![self, valueOfAttribute: attrName, forResultAtIndex: idx] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn predicate(&self) -> Option> { @@ -68,22 +68,22 @@ impl NSMetadataQuery { pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>) { msg_send![self, setPredicate: predicate] } - pub unsafe fn sortDescriptors(&self) -> TodoGenerics { - msg_send![self, sortDescriptors] + pub unsafe fn sortDescriptors(&self) -> Id, Shared> { + msg_send_id![self, sortDescriptors] } - pub unsafe fn setSortDescriptors(&self, sortDescriptors: TodoGenerics) { + pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray) { msg_send![self, setSortDescriptors: sortDescriptors] } - pub unsafe fn valueListAttributes(&self) -> TodoGenerics { - msg_send![self, valueListAttributes] + pub unsafe fn valueListAttributes(&self) -> Id, Shared> { + msg_send_id![self, valueListAttributes] } - pub unsafe fn setValueListAttributes(&self, valueListAttributes: TodoGenerics) { + pub unsafe fn setValueListAttributes(&self, valueListAttributes: &NSArray) { msg_send![self, setValueListAttributes: valueListAttributes] } - pub unsafe fn groupingAttributes(&self) -> TodoGenerics { - msg_send![self, groupingAttributes] + pub unsafe fn groupingAttributes(&self) -> Option, Shared>> { + msg_send_id![self, groupingAttributes] } - pub unsafe fn setGroupingAttributes(&self, groupingAttributes: TodoGenerics) { + pub unsafe fn setGroupingAttributes(&self, groupingAttributes: Option<&NSArray>) { msg_send![self, setGroupingAttributes: groupingAttributes] } pub unsafe fn notificationBatchingInterval(&self) -> NSTimeInterval { @@ -131,11 +131,11 @@ impl NSMetadataQuery { pub unsafe fn results(&self) -> Id { msg_send_id![self, results] } - pub unsafe fn valueLists(&self) -> TodoGenerics { - msg_send![self, valueLists] + pub unsafe fn valueLists(&self) -> Id, Shared> { + msg_send_id![self, valueLists] } - pub unsafe fn groupedResults(&self) -> TodoGenerics { - msg_send![self, groupedResults] + pub unsafe fn groupedResults(&self) -> Id, Shared> { + msg_send_id![self, groupedResults] } } pub type NSMetadataQueryDelegate = NSObject; @@ -153,11 +153,14 @@ impl NSMetadataItem { pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option> { msg_send_id![self, valueForAttribute: key] } - pub unsafe fn valuesForAttributes(&self, keys: TodoGenerics) -> TodoGenerics { - msg_send![self, valuesForAttributes: keys] + pub unsafe fn valuesForAttributes( + &self, + keys: &NSArray, + ) -> Option, Shared>> { + msg_send_id![self, valuesForAttributes: keys] } - pub unsafe fn attributes(&self) -> TodoGenerics { - msg_send![self, attributes] + pub unsafe fn attributes(&self) -> Id, Shared> { + msg_send_id![self, attributes] } } extern_class!( @@ -195,8 +198,8 @@ impl NSMetadataQueryResultGroup { pub unsafe fn value(&self) -> Id { msg_send_id![self, value] } - pub unsafe fn subgroups(&self) -> TodoGenerics { - msg_send![self, subgroups] + pub unsafe fn subgroups(&self) -> Option, Shared>> { + msg_send_id![self, subgroups] } pub unsafe fn resultCount(&self) -> NSUInteger { msg_send![self, resultCount] diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index 1fae224f6..8b26ed0c9 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -66,8 +66,8 @@ impl NSMorphologyCustomPronoun { pub unsafe fn isSupportedForLanguage(language: &NSString) -> bool { msg_send![Self::class(), isSupportedForLanguage: language] } - pub unsafe fn requiredKeysForLanguage(language: &NSString) -> TodoGenerics { - msg_send![Self::class(), requiredKeysForLanguage: language] + pub unsafe fn requiredKeysForLanguage(language: &NSString) -> Id, Shared> { + msg_send_id![Self::class(), requiredKeysForLanguage: language] } pub unsafe fn subjectForm(&self) -> Option> { msg_send_id![self, subjectForm] diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 772906513..4d7ee75f1 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -57,10 +57,14 @@ impl NSNetService { pub unsafe fn stop(&self) { msg_send![self, stop] } - pub unsafe fn dictionaryFromTXTRecordData(txtData: &NSData) -> TodoGenerics { - msg_send![Self::class(), dictionaryFromTXTRecordData: txtData] - } - pub unsafe fn dataFromTXTRecordDictionary(txtDictionary: TodoGenerics) -> Id { + pub unsafe fn dictionaryFromTXTRecordData( + txtData: &NSData, + ) -> Id, Shared> { + msg_send_id![Self::class(), dictionaryFromTXTRecordData: txtData] + } + pub unsafe fn dataFromTXTRecordDictionary( + txtDictionary: &NSDictionary, + ) -> Id { msg_send_id![Self::class(), dataFromTXTRecordDictionary: txtDictionary] } pub unsafe fn resolveWithTimeout(&self, timeout: NSTimeInterval) { @@ -89,10 +93,10 @@ impl NSNetService { pub unsafe fn stopMonitoring(&self) { msg_send![self, stopMonitoring] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn includesPeerToPeer(&self) -> bool { @@ -113,8 +117,8 @@ impl NSNetService { pub unsafe fn hostName(&self) -> Option> { msg_send_id![self, hostName] } - pub unsafe fn addresses(&self) -> TodoGenerics { - msg_send![self, addresses] + pub unsafe fn addresses(&self) -> Option, Shared>> { + msg_send_id![self, addresses] } pub unsafe fn port(&self) -> NSInteger { msg_send![self, port] @@ -153,10 +157,10 @@ impl NSNetServiceBrowser { pub unsafe fn stop(&self) { msg_send![self, stop] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn includesPeerToPeer(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 6d01ea07b..2a08ddf1e 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -128,8 +128,8 @@ impl NSNotificationCenter { obj: Option<&Object>, queue: Option<&NSOperationQueue>, block: TodoBlock, - ) -> TodoGenerics { - msg_send![ + ) -> Id { + msg_send_id![ self, addObserverForName: name, object: obj, diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index 88f670f01..4a7c55ffb 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -38,7 +38,7 @@ impl NSNotificationQueue { notification: &NSNotification, postingStyle: NSPostingStyle, coalesceMask: NSNotificationCoalescing, - modes: TodoGenerics, + modes: Option<&NSArray>, ) { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 9bdf99560..10942f27d 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -91,12 +91,14 @@ impl NSNumberFormatter { pub unsafe fn setNegativeFormat(&self, negativeFormat: Option<&NSString>) { msg_send![self, setNegativeFormat: negativeFormat] } - pub unsafe fn textAttributesForNegativeValues(&self) -> TodoGenerics { - msg_send![self, textAttributesForNegativeValues] + pub unsafe fn textAttributesForNegativeValues( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForNegativeValues] } pub unsafe fn setTextAttributesForNegativeValues( &self, - textAttributesForNegativeValues: TodoGenerics, + textAttributesForNegativeValues: Option<&NSDictionary>, ) { msg_send![ self, @@ -109,12 +111,14 @@ impl NSNumberFormatter { pub unsafe fn setPositiveFormat(&self, positiveFormat: Option<&NSString>) { msg_send![self, setPositiveFormat: positiveFormat] } - pub unsafe fn textAttributesForPositiveValues(&self) -> TodoGenerics { - msg_send![self, textAttributesForPositiveValues] + pub unsafe fn textAttributesForPositiveValues( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForPositiveValues] } pub unsafe fn setTextAttributesForPositiveValues( &self, - textAttributesForPositiveValues: TodoGenerics, + textAttributesForPositiveValues: Option<&NSDictionary>, ) { msg_send![ self, @@ -166,10 +170,15 @@ impl NSNumberFormatter { pub unsafe fn setZeroSymbol(&self, zeroSymbol: Option<&NSString>) { msg_send![self, setZeroSymbol: zeroSymbol] } - pub unsafe fn textAttributesForZero(&self) -> TodoGenerics { - msg_send![self, textAttributesForZero] + pub unsafe fn textAttributesForZero( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForZero] } - pub unsafe fn setTextAttributesForZero(&self, textAttributesForZero: TodoGenerics) { + pub unsafe fn setTextAttributesForZero( + &self, + textAttributesForZero: Option<&NSDictionary>, + ) { msg_send![self, setTextAttributesForZero: textAttributesForZero] } pub unsafe fn nilSymbol(&self) -> Id { @@ -178,10 +187,15 @@ impl NSNumberFormatter { pub unsafe fn setNilSymbol(&self, nilSymbol: &NSString) { msg_send![self, setNilSymbol: nilSymbol] } - pub unsafe fn textAttributesForNil(&self) -> TodoGenerics { - msg_send![self, textAttributesForNil] + pub unsafe fn textAttributesForNil( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForNil] } - pub unsafe fn setTextAttributesForNil(&self, textAttributesForNil: TodoGenerics) { + pub unsafe fn setTextAttributesForNil( + &self, + textAttributesForNil: Option<&NSDictionary>, + ) { msg_send![self, setTextAttributesForNil: textAttributesForNil] } pub unsafe fn notANumberSymbol(&self) -> Id { @@ -190,10 +204,15 @@ impl NSNumberFormatter { pub unsafe fn setNotANumberSymbol(&self, notANumberSymbol: Option<&NSString>) { msg_send![self, setNotANumberSymbol: notANumberSymbol] } - pub unsafe fn textAttributesForNotANumber(&self) -> TodoGenerics { - msg_send![self, textAttributesForNotANumber] + pub unsafe fn textAttributesForNotANumber( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForNotANumber] } - pub unsafe fn setTextAttributesForNotANumber(&self, textAttributesForNotANumber: TodoGenerics) { + pub unsafe fn setTextAttributesForNotANumber( + &self, + textAttributesForNotANumber: Option<&NSDictionary>, + ) { msg_send![ self, setTextAttributesForNotANumber: textAttributesForNotANumber @@ -205,12 +224,14 @@ impl NSNumberFormatter { pub unsafe fn setPositiveInfinitySymbol(&self, positiveInfinitySymbol: &NSString) { msg_send![self, setPositiveInfinitySymbol: positiveInfinitySymbol] } - pub unsafe fn textAttributesForPositiveInfinity(&self) -> TodoGenerics { - msg_send![self, textAttributesForPositiveInfinity] + pub unsafe fn textAttributesForPositiveInfinity( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForPositiveInfinity] } pub unsafe fn setTextAttributesForPositiveInfinity( &self, - textAttributesForPositiveInfinity: TodoGenerics, + textAttributesForPositiveInfinity: Option<&NSDictionary>, ) { msg_send![ self, @@ -223,12 +244,14 @@ impl NSNumberFormatter { pub unsafe fn setNegativeInfinitySymbol(&self, negativeInfinitySymbol: &NSString) { msg_send![self, setNegativeInfinitySymbol: negativeInfinitySymbol] } - pub unsafe fn textAttributesForNegativeInfinity(&self) -> TodoGenerics { - msg_send![self, textAttributesForNegativeInfinity] + pub unsafe fn textAttributesForNegativeInfinity( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForNegativeInfinity] } pub unsafe fn setTextAttributesForNegativeInfinity( &self, - textAttributesForNegativeInfinity: TodoGenerics, + textAttributesForNegativeInfinity: Option<&NSDictionary>, ) { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 383a6de90..612450a48 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -53,8 +53,8 @@ impl NSOperation { pub unsafe fn isReady(&self) -> bool { msg_send![self, isReady] } - pub unsafe fn dependencies(&self) -> TodoGenerics { - msg_send![self, dependencies] + pub unsafe fn dependencies(&self) -> Id, Shared> { + msg_send_id![self, dependencies] } pub unsafe fn queuePriority(&self) -> NSOperationQueuePriority { msg_send![self, queuePriority] @@ -101,8 +101,8 @@ impl NSBlockOperation { pub unsafe fn addExecutionBlock(&self, block: TodoBlock) { msg_send![self, addExecutionBlock: block] } - pub unsafe fn executionBlocks(&self) -> TodoGenerics { - msg_send![self, executionBlocks] + pub unsafe fn executionBlocks(&self) -> Id, Shared> { + msg_send_id![self, executionBlocks] } } extern_class!( @@ -142,7 +142,7 @@ impl NSOperationQueue { pub unsafe fn addOperation(&self, op: &NSOperation) { msg_send![self, addOperation: op] } - pub unsafe fn addOperations_waitUntilFinished(&self, ops: TodoGenerics, wait: bool) { + pub unsafe fn addOperations_waitUntilFinished(&self, ops: &NSArray, wait: bool) { msg_send![self, addOperations: ops, waitUntilFinished: wait] } pub unsafe fn addOperationWithBlock(&self, block: TodoBlock) { @@ -202,8 +202,8 @@ impl NSOperationQueue { } #[doc = "NSDeprecated"] impl NSOperationQueue { - pub unsafe fn operations(&self) -> TodoGenerics { - msg_send![self, operations] + pub unsafe fn operations(&self) -> Id, Shared> { + msg_send_id![self, operations] } pub unsafe fn operationCount(&self) -> NSUInteger { msg_send![self, operationCount] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 105c6d9ee..9aec5b53b 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -15,16 +15,16 @@ impl NSOrderedCollectionChange { anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, - ) -> TodoGenerics { - msg_send ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index] + ) -> Id, Shared> { + msg_send_id ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index] } pub unsafe fn changeWithObject_type_index_associatedIndex( anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, associatedIndex: NSUInteger, - ) -> TodoGenerics { - msg_send ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] + ) -> Id, Shared> { + msg_send_id ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index cd2ec0058..8da46cf08 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -14,16 +14,19 @@ __inner_extern_class!( } ); impl NSOrderedCollectionDifference { - pub unsafe fn initWithChanges(&self, changes: TodoGenerics) -> Id { + pub unsafe fn initWithChanges( + &self, + changes: &NSArray, + ) -> Id { msg_send_id![self, initWithChanges: changes] } pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges( &self, inserts: &NSIndexSet, - insertedObjects: TodoGenerics, + insertedObjects: Option<&NSArray>, removes: &NSIndexSet, - removedObjects: TodoGenerics, - changes: TodoGenerics, + removedObjects: Option<&NSArray>, + changes: &NSArray, ) -> Id { msg_send_id![ self, @@ -37,9 +40,9 @@ impl NSOrderedCollectionDifference { pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects( &self, inserts: &NSIndexSet, - insertedObjects: TodoGenerics, + insertedObjects: Option<&NSArray>, removes: &NSIndexSet, - removedObjects: TodoGenerics, + removedObjects: Option<&NSArray>, ) -> Id { msg_send_id![ self, @@ -52,17 +55,17 @@ impl NSOrderedCollectionDifference { pub unsafe fn differenceByTransformingChangesWithBlock( &self, block: TodoBlock, - ) -> TodoGenerics { - msg_send![self, differenceByTransformingChangesWithBlock: block] + ) -> Id, Shared> { + msg_send_id![self, differenceByTransformingChangesWithBlock: block] } pub unsafe fn inverseDifference(&self) -> Id { msg_send_id![self, inverseDifference] } - pub unsafe fn insertions(&self) -> TodoGenerics { - msg_send![self, insertions] + pub unsafe fn insertions(&self) -> Id, Shared> { + msg_send_id![self, insertions] } - pub unsafe fn removals(&self) -> TodoGenerics { - msg_send![self, removals] + pub unsafe fn removals(&self) -> Id, Shared> { + msg_send_id![self, removals] } pub unsafe fn hasChanges(&self) -> bool { msg_send![self, hasChanges] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 90100d0a9..ce1bdeef0 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -47,35 +47,35 @@ impl NSOrderedSet { pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { msg_send![self, getObjects: objects, range: range] } - pub unsafe fn objectsAtIndexes(&self, indexes: &NSIndexSet) -> TodoGenerics { - msg_send![self, objectsAtIndexes: indexes] + pub unsafe fn objectsAtIndexes(&self, indexes: &NSIndexSet) -> Id, Shared> { + msg_send_id![self, objectsAtIndexes: indexes] } - pub unsafe fn isEqualToOrderedSet(&self, other: TodoGenerics) -> bool { + pub unsafe fn isEqualToOrderedSet(&self, other: &NSOrderedSet) -> bool { msg_send![self, isEqualToOrderedSet: other] } pub unsafe fn containsObject(&self, object: &ObjectType) -> bool { msg_send![self, containsObject: object] } - pub unsafe fn intersectsOrderedSet(&self, other: TodoGenerics) -> bool { + pub unsafe fn intersectsOrderedSet(&self, other: &NSOrderedSet) -> bool { msg_send![self, intersectsOrderedSet: other] } - pub unsafe fn intersectsSet(&self, set: TodoGenerics) -> bool { + pub unsafe fn intersectsSet(&self, set: &NSSet) -> bool { msg_send![self, intersectsSet: set] } - pub unsafe fn isSubsetOfOrderedSet(&self, other: TodoGenerics) -> bool { + pub unsafe fn isSubsetOfOrderedSet(&self, other: &NSOrderedSet) -> bool { msg_send![self, isSubsetOfOrderedSet: other] } - pub unsafe fn isSubsetOfSet(&self, set: TodoGenerics) -> bool { + pub unsafe fn isSubsetOfSet(&self, set: &NSSet) -> bool { msg_send![self, isSubsetOfSet: set] } pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id { msg_send_id![self, objectAtIndexedSubscript: idx] } - pub unsafe fn objectEnumerator(&self) -> TodoGenerics { - msg_send![self, objectEnumerator] + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] } - pub unsafe fn reverseObjectEnumerator(&self) -> TodoGenerics { - msg_send![self, reverseObjectEnumerator] + pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, reverseObjectEnumerator] } pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { msg_send![self, enumerateObjectsUsingBlock: block] @@ -168,15 +168,18 @@ impl NSOrderedSet { usingComparator: cmp ] } - pub unsafe fn sortedArrayUsingComparator(&self, cmptr: NSComparator) -> TodoGenerics { - msg_send![self, sortedArrayUsingComparator: cmptr] + pub unsafe fn sortedArrayUsingComparator( + &self, + cmptr: NSComparator, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingComparator: cmptr] } pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, - ) -> TodoGenerics { - msg_send![self, sortedArrayWithOptions: opts, usingComparator: cmptr] + ) -> Id, Shared> { + msg_send_id![self, sortedArrayWithOptions: opts, usingComparator: cmptr] } pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { msg_send_id![self, descriptionWithLocale: locale] @@ -194,14 +197,14 @@ impl NSOrderedSet { pub unsafe fn lastObject(&self) -> Option> { msg_send_id![self, lastObject] } - pub unsafe fn reversedOrderedSet(&self) -> TodoGenerics { - msg_send![self, reversedOrderedSet] + pub unsafe fn reversedOrderedSet(&self) -> Id, Shared> { + msg_send_id![self, reversedOrderedSet] } - pub unsafe fn array(&self) -> TodoGenerics { - msg_send![self, array] + pub unsafe fn array(&self) -> Id, Shared> { + msg_send_id![self, array] } - pub unsafe fn set(&self) -> TodoGenerics { - msg_send![self, set] + pub unsafe fn set(&self) -> Id, Shared> { + msg_send_id![self, set] } pub unsafe fn description(&self) -> Id { msg_send_id![self, description] @@ -221,11 +224,11 @@ impl NSOrderedSet { ) -> Id { msg_send_id![Self::class(), orderedSetWithObjects: objects, count: cnt] } - pub unsafe fn orderedSetWithOrderedSet(set: TodoGenerics) -> Id { + pub unsafe fn orderedSetWithOrderedSet(set: &NSOrderedSet) -> Id { msg_send_id![Self::class(), orderedSetWithOrderedSet: set] } pub unsafe fn orderedSetWithOrderedSet_range_copyItems( - set: TodoGenerics, + set: &NSOrderedSet, range: NSRange, flag: bool, ) -> Id { @@ -236,11 +239,11 @@ impl NSOrderedSet { copyItems: flag ] } - pub unsafe fn orderedSetWithArray(array: TodoGenerics) -> Id { + pub unsafe fn orderedSetWithArray(array: &NSArray) -> Id { msg_send_id![Self::class(), orderedSetWithArray: array] } pub unsafe fn orderedSetWithArray_range_copyItems( - array: TodoGenerics, + array: &NSArray, range: NSRange, flag: bool, ) -> Id { @@ -251,55 +254,62 @@ impl NSOrderedSet { copyItems: flag ] } - pub unsafe fn orderedSetWithSet(set: TodoGenerics) -> Id { + pub unsafe fn orderedSetWithSet(set: &NSSet) -> Id { msg_send_id![Self::class(), orderedSetWithSet: set] } - pub unsafe fn orderedSetWithSet_copyItems(set: TodoGenerics, flag: bool) -> Id { + pub unsafe fn orderedSetWithSet_copyItems( + set: &NSSet, + flag: bool, + ) -> Id { msg_send_id![Self::class(), orderedSetWithSet: set, copyItems: flag] } pub unsafe fn initWithObject(&self, object: &ObjectType) -> Id { msg_send_id![self, initWithObject: object] } - pub unsafe fn initWithOrderedSet(&self, set: TodoGenerics) -> Id { + pub unsafe fn initWithOrderedSet(&self, set: &NSOrderedSet) -> Id { msg_send_id![self, initWithOrderedSet: set] } pub unsafe fn initWithOrderedSet_copyItems( &self, - set: TodoGenerics, + set: &NSOrderedSet, flag: bool, ) -> Id { msg_send_id![self, initWithOrderedSet: set, copyItems: flag] } pub unsafe fn initWithOrderedSet_range_copyItems( &self, - set: TodoGenerics, + set: &NSOrderedSet, range: NSRange, flag: bool, ) -> Id { msg_send_id![self, initWithOrderedSet: set, range: range, copyItems: flag] } - pub unsafe fn initWithArray(&self, array: TodoGenerics) -> Id { + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { msg_send_id![self, initWithArray: array] } pub unsafe fn initWithArray_copyItems( &self, - set: TodoGenerics, + set: &NSArray, flag: bool, ) -> Id { msg_send_id![self, initWithArray: set, copyItems: flag] } pub unsafe fn initWithArray_range_copyItems( &self, - set: TodoGenerics, + set: &NSArray, range: NSRange, flag: bool, ) -> Id { msg_send_id![self, initWithArray: set, range: range, copyItems: flag] } - pub unsafe fn initWithSet(&self, set: TodoGenerics) -> Id { + pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { msg_send_id![self, initWithSet: set] } - pub unsafe fn initWithSet_copyItems(&self, set: TodoGenerics, flag: bool) -> Id { + pub unsafe fn initWithSet_copyItems( + &self, + set: &NSSet, + flag: bool, + ) -> Id { msg_send_id![self, initWithSet: set, copyItems: flag] } } @@ -307,11 +317,11 @@ impl NSOrderedSet { impl NSOrderedSet { pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( &self, - other: TodoGenerics, + other: &NSOrderedSet, options: NSOrderedCollectionDifferenceCalculationOptions, block: TodoBlock, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ self, differenceFromOrderedSet: other, withOptions: options, @@ -320,16 +330,22 @@ impl NSOrderedSet { } pub unsafe fn differenceFromOrderedSet_withOptions( &self, - other: TodoGenerics, + other: &NSOrderedSet, options: NSOrderedCollectionDifferenceCalculationOptions, - ) -> TodoGenerics { - msg_send![self, differenceFromOrderedSet: other, withOptions: options] + ) -> Id, Shared> { + msg_send_id![self, differenceFromOrderedSet: other, withOptions: options] } - pub unsafe fn differenceFromOrderedSet(&self, other: TodoGenerics) -> TodoGenerics { - msg_send![self, differenceFromOrderedSet: other] + pub unsafe fn differenceFromOrderedSet( + &self, + other: &NSOrderedSet, + ) -> Id, Shared> { + msg_send_id![self, differenceFromOrderedSet: other] } - pub unsafe fn orderedSetByApplyingDifference(&self, difference: TodoGenerics) -> TodoGenerics { - msg_send![self, orderedSetByApplyingDifference: difference] + pub unsafe fn orderedSetByApplyingDifference( + &self, + difference: &NSOrderedCollectionDifference, + ) -> Option, Shared>> { + msg_send_id![self, orderedSetByApplyingDifference: difference] } } __inner_extern_class!( @@ -367,7 +383,7 @@ impl NSMutableOrderedSet { pub unsafe fn addObjects_count(&self, objects: TodoArray, count: NSUInteger) { msg_send![self, addObjects: objects, count: count] } - pub unsafe fn addObjectsFromArray(&self, array: TodoGenerics) { + pub unsafe fn addObjectsFromArray(&self, array: &NSArray) { msg_send![self, addObjectsFromArray: array] } pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( @@ -380,7 +396,11 @@ impl NSMutableOrderedSet { pub unsafe fn moveObjectsAtIndexes_toIndex(&self, indexes: &NSIndexSet, idx: NSUInteger) { msg_send![self, moveObjectsAtIndexes: indexes, toIndex: idx] } - pub unsafe fn insertObjects_atIndexes(&self, objects: TodoGenerics, indexes: &NSIndexSet) { + pub unsafe fn insertObjects_atIndexes( + &self, + objects: &NSArray, + indexes: &NSIndexSet, + ) { msg_send![self, insertObjects: objects, atIndexes: indexes] } pub unsafe fn setObject_atIndex(&self, obj: &ObjectType, idx: NSUInteger) { @@ -405,7 +425,7 @@ impl NSMutableOrderedSet { pub unsafe fn replaceObjectsAtIndexes_withObjects( &self, indexes: &NSIndexSet, - objects: TodoGenerics, + objects: &NSArray, ) { msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] } @@ -421,25 +441,25 @@ impl NSMutableOrderedSet { pub unsafe fn removeObject(&self, object: &ObjectType) { msg_send![self, removeObject: object] } - pub unsafe fn removeObjectsInArray(&self, array: TodoGenerics) { + pub unsafe fn removeObjectsInArray(&self, array: &NSArray) { msg_send![self, removeObjectsInArray: array] } - pub unsafe fn intersectOrderedSet(&self, other: TodoGenerics) { + pub unsafe fn intersectOrderedSet(&self, other: &NSOrderedSet) { msg_send![self, intersectOrderedSet: other] } - pub unsafe fn minusOrderedSet(&self, other: TodoGenerics) { + pub unsafe fn minusOrderedSet(&self, other: &NSOrderedSet) { msg_send![self, minusOrderedSet: other] } - pub unsafe fn unionOrderedSet(&self, other: TodoGenerics) { + pub unsafe fn unionOrderedSet(&self, other: &NSOrderedSet) { msg_send![self, unionOrderedSet: other] } - pub unsafe fn intersectSet(&self, other: TodoGenerics) { + pub unsafe fn intersectSet(&self, other: &NSSet) { msg_send![self, intersectSet: other] } - pub unsafe fn minusSet(&self, other: TodoGenerics) { + pub unsafe fn minusSet(&self, other: &NSSet) { msg_send![self, minusSet: other] } - pub unsafe fn unionSet(&self, other: TodoGenerics) { + pub unsafe fn unionSet(&self, other: &NSSet) { msg_send![self, unionSet: other] } pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator) { @@ -470,7 +490,7 @@ impl NSMutableOrderedSet { } #[doc = "NSMutableOrderedSetDiffing"] impl NSMutableOrderedSet { - pub unsafe fn applyDifference(&self, difference: TodoGenerics) { + pub unsafe fn applyDifference(&self, difference: &NSOrderedCollectionDifference) { msg_send![self, applyDifference: difference] } } diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index 259ac325b..c855d1f9d 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -17,7 +17,7 @@ impl NSOrthography { pub unsafe fn initWithDominantScript_languageMap( &self, script: &NSString, - map: TodoGenerics, + map: &NSDictionary, ) -> Id { msg_send_id![self, initWithDominantScript: script, languageMap: map] } @@ -27,14 +27,17 @@ impl NSOrthography { pub unsafe fn dominantScript(&self) -> Id { msg_send_id![self, dominantScript] } - pub unsafe fn languageMap(&self) -> TodoGenerics { - msg_send![self, languageMap] + pub unsafe fn languageMap(&self) -> Id, Shared> { + msg_send_id![self, languageMap] } } #[doc = "NSOrthographyExtended"] impl NSOrthography { - pub unsafe fn languagesForScript(&self, script: &NSString) -> TodoGenerics { - msg_send![self, languagesForScript: script] + pub unsafe fn languagesForScript( + &self, + script: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, languagesForScript: script] } pub unsafe fn dominantLanguageForScript( &self, @@ -48,18 +51,18 @@ impl NSOrthography { pub unsafe fn dominantLanguage(&self) -> Id { msg_send_id![self, dominantLanguage] } - pub unsafe fn allScripts(&self) -> TodoGenerics { - msg_send![self, allScripts] + pub unsafe fn allScripts(&self) -> Id, Shared> { + msg_send_id![self, allScripts] } - pub unsafe fn allLanguages(&self) -> TodoGenerics { - msg_send![self, allLanguages] + pub unsafe fn allLanguages(&self) -> Id, Shared> { + msg_send_id![self, allLanguages] } } #[doc = "NSOrthographyCreation"] impl NSOrthography { pub unsafe fn orthographyWithDominantScript_languageMap( script: &NSString, - map: TodoGenerics, + map: &NSDictionary, ) -> Id { msg_send_id![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 316c041d1..ad256ebd8 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -25,11 +25,11 @@ impl NSPort { pub unsafe fn invalidate(&self) { msg_send![self, invalidate] } - pub unsafe fn setDelegate(&self, anObject: TodoGenerics) { + pub unsafe fn setDelegate(&self, anObject: Option<&id>) { msg_send![self, setDelegate: anObject] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] @@ -112,11 +112,11 @@ impl NSMachPort { pub unsafe fn initWithMachPort(&self, machPort: uint32_t) -> Id { msg_send_id![self, initWithMachPort: machPort] } - pub unsafe fn setDelegate(&self, anObject: TodoGenerics) { + pub unsafe fn setDelegate(&self, anObject: Option<&id>) { msg_send![self, setDelegate: anObject] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } pub unsafe fn portWithMachPort_options( machPort: uint32_t, diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 8b04b04f3..3eb923727 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -49,7 +49,7 @@ impl NSPredicate { } pub unsafe fn predicateWithSubstitutionVariables( &self, - variables: TodoGenerics, + variables: &NSDictionary, ) -> Id { msg_send_id![self, predicateWithSubstitutionVariables: variables] } @@ -59,7 +59,7 @@ impl NSPredicate { pub unsafe fn evaluateWithObject_substitutionVariables( &self, object: Option<&Object>, - bindings: TodoGenerics, + bindings: Option<&NSDictionary>, ) -> bool { msg_send![ self, @@ -76,8 +76,11 @@ impl NSPredicate { } #[doc = "NSPredicateSupport"] impl NSArray { - pub unsafe fn filteredArrayUsingPredicate(&self, predicate: &NSPredicate) -> TodoGenerics { - msg_send![self, filteredArrayUsingPredicate: predicate] + pub unsafe fn filteredArrayUsingPredicate( + &self, + predicate: &NSPredicate, + ) -> Id, Shared> { + msg_send_id![self, filteredArrayUsingPredicate: predicate] } } #[doc = "NSPredicateSupport"] @@ -88,8 +91,11 @@ impl NSMutableArray { } #[doc = "NSPredicateSupport"] impl NSSet { - pub unsafe fn filteredSetUsingPredicate(&self, predicate: &NSPredicate) -> TodoGenerics { - msg_send![self, filteredSetUsingPredicate: predicate] + pub unsafe fn filteredSetUsingPredicate( + &self, + predicate: &NSPredicate, + ) -> Id, Shared> { + msg_send_id![self, filteredSetUsingPredicate: predicate] } } #[doc = "NSPredicateSupport"] @@ -100,8 +106,11 @@ impl NSMutableSet { } #[doc = "NSPredicateSupport"] impl NSOrderedSet { - pub unsafe fn filteredOrderedSetUsingPredicate(&self, p: &NSPredicate) -> TodoGenerics { - msg_send![self, filteredOrderedSetUsingPredicate: p] + pub unsafe fn filteredOrderedSetUsingPredicate( + &self, + p: &NSPredicate, + ) -> Id, Shared> { + msg_send_id![self, filteredOrderedSetUsingPredicate: p] } } #[doc = "NSPredicateSupport"] diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index f8215958e..83e7efdb6 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -43,11 +43,11 @@ impl NSProcessInfo { pub unsafe fn processInfo() -> Id { msg_send_id![Self::class(), processInfo] } - pub unsafe fn environment(&self) -> TodoGenerics { - msg_send![self, environment] + pub unsafe fn environment(&self) -> Id, Shared> { + msg_send_id![self, environment] } - pub unsafe fn arguments(&self) -> TodoGenerics { - msg_send![self, arguments] + pub unsafe fn arguments(&self) -> Id, Shared> { + msg_send_id![self, arguments] } pub unsafe fn hostName(&self) -> Id { msg_send_id![self, hostName] @@ -101,10 +101,10 @@ impl NSProcessInfo { &self, options: NSActivityOptions, reason: &NSString, - ) -> TodoGenerics { - msg_send![self, beginActivityWithOptions: options, reason: reason] + ) -> Id { + msg_send_id![self, beginActivityWithOptions: options, reason: reason] } - pub unsafe fn endActivity(&self, activity: TodoGenerics) { + pub unsafe fn endActivity(&self, activity: &id) { msg_send![self, endActivity: activity] } pub unsafe fn performActivityWithOptions_reason_usingBlock( diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 73515f3b5..75b2f4b41 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -46,7 +46,7 @@ impl NSProgress { pub unsafe fn initWithParent_userInfo( &self, parentProgressOrNil: Option<&NSProgress>, - userInfoOrNil: TodoGenerics, + userInfoOrNil: Option<&NSDictionary>, ) -> Id { msg_send_id![ self, @@ -184,8 +184,8 @@ impl NSProgress { pub unsafe fn isFinished(&self) -> bool { msg_send![self, isFinished] } - pub unsafe fn userInfo(&self) -> TodoGenerics { - msg_send![self, userInfo] + pub unsafe fn userInfo(&self) -> Id, Shared> { + msg_send_id![self, userInfo] } pub unsafe fn kind(&self) -> Option> { msg_send_id![self, kind] diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 01427f475..5acbb95e3 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -74,8 +74,8 @@ impl NSRegularExpression { string: &NSString, options: NSMatchingOptions, range: NSRange, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ self, matchesInString: string, options: options, diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index cc05a8bf5..59f7ef277 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -59,7 +59,7 @@ impl NSRunLoop { pub unsafe fn configureAsServer(&self) { msg_send![self, configureAsServer] } - pub unsafe fn performInModes_block(&self, modes: TodoGenerics, block: TodoBlock) { + pub unsafe fn performInModes_block(&self, modes: &NSArray, block: TodoBlock) { msg_send![self, performInModes: modes, block: block] } pub unsafe fn performBlock(&self, block: TodoBlock) { @@ -73,7 +73,7 @@ impl NSObject { aSelector: Sel, anArgument: Option<&Object>, delay: NSTimeInterval, - modes: TodoGenerics, + modes: &NSArray, ) { msg_send![ self, @@ -123,7 +123,7 @@ impl NSRunLoop { target: &Object, arg: Option<&Object>, order: NSUInteger, - modes: TodoGenerics, + modes: &NSArray, ) { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index deede373e..6236ace7e 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -62,14 +62,14 @@ impl NSScriptCommand { pub unsafe fn evaluatedReceivers(&self) -> Option> { msg_send_id![self, evaluatedReceivers] } - pub unsafe fn arguments(&self) -> TodoGenerics { - msg_send![self, arguments] + pub unsafe fn arguments(&self) -> Option, Shared>> { + msg_send_id![self, arguments] } - pub unsafe fn setArguments(&self, arguments: TodoGenerics) { + pub unsafe fn setArguments(&self, arguments: Option<&NSDictionary>) { msg_send![self, setArguments: arguments] } - pub unsafe fn evaluatedArguments(&self) -> TodoGenerics { - msg_send![self, evaluatedArguments] + pub unsafe fn evaluatedArguments(&self) -> Option, Shared>> { + msg_send_id![self, evaluatedArguments] } pub unsafe fn isWellFormed(&self) -> bool { msg_send![self, isWellFormed] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index 2769aa846..21905fb7c 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -79,7 +79,7 @@ impl NSScriptCommandDescription { pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode { msg_send![self, appleEventCodeForReturnType] } - pub unsafe fn argumentNames(&self) -> TodoGenerics { - msg_send![self, argumentNames] + pub unsafe fn argumentNames(&self) -> Id, Shared> { + msg_send_id![self, argumentNames] } } diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index a0f4e7ebb..d39692480 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -137,8 +137,8 @@ impl NSObject { pub unsafe fn indicesOfObjectsByEvaluatingObjectSpecifier( &self, specifier: &NSScriptObjectSpecifier, - ) -> TodoGenerics { - msg_send![self, indicesOfObjectsByEvaluatingObjectSpecifier: specifier] + ) -> Option, Shared>> { + msg_send_id![self, indicesOfObjectsByEvaluatingObjectSpecifier: specifier] } pub unsafe fn objectSpecifier(&self) -> Option> { msg_send_id![self, objectSpecifier] diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index d9e3cfea7..c3b644858 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -53,8 +53,8 @@ impl NSCreateCommand { pub unsafe fn createClassDescription(&self) -> Id { msg_send_id![self, createClassDescription] } - pub unsafe fn resolvedKeyDictionary(&self) -> TodoGenerics { - msg_send![self, resolvedKeyDictionary] + pub unsafe fn resolvedKeyDictionary(&self) -> Id, Shared> { + msg_send_id![self, resolvedKeyDictionary] } } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index d6f9ec2cd..3e79e85fa 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -55,11 +55,17 @@ impl NSScriptSuiteRegistry { pub unsafe fn bundleForSuite(&self, suiteName: &NSString) -> Option> { msg_send_id![self, bundleForSuite: suiteName] } - pub unsafe fn classDescriptionsInSuite(&self, suiteName: &NSString) -> TodoGenerics { - msg_send![self, classDescriptionsInSuite: suiteName] + pub unsafe fn classDescriptionsInSuite( + &self, + suiteName: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, classDescriptionsInSuite: suiteName] } - pub unsafe fn commandDescriptionsInSuite(&self, suiteName: &NSString) -> TodoGenerics { - msg_send![self, commandDescriptionsInSuite: suiteName] + pub unsafe fn commandDescriptionsInSuite( + &self, + suiteName: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, commandDescriptionsInSuite: suiteName] } pub unsafe fn suiteForAppleEventCode( &self, @@ -87,7 +93,7 @@ impl NSScriptSuiteRegistry { pub unsafe fn aeteResource(&self, languageName: &NSString) -> Option> { msg_send_id![self, aeteResource: languageName] } - pub unsafe fn suiteNames(&self) -> TodoGenerics { - msg_send![self, suiteNames] + pub unsafe fn suiteNames(&self) -> Id, Shared> { + msg_send_id![self, suiteNames] } } diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index 5d5665a24..22bae2d96 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -32,10 +32,16 @@ extern_class!( } ); impl NSLogicalTest { - pub unsafe fn initAndTestWithTests(&self, subTests: TodoGenerics) -> Id { + pub unsafe fn initAndTestWithTests( + &self, + subTests: &NSArray, + ) -> Id { msg_send_id![self, initAndTestWithTests: subTests] } - pub unsafe fn initOrTestWithTests(&self, subTests: TodoGenerics) -> Id { + pub unsafe fn initOrTestWithTests( + &self, + subTests: &NSArray, + ) -> Id { msg_send_id![self, initOrTestWithTests: subTests] } pub unsafe fn initNotTestWithTest(&self, subTest: &NSScriptWhoseTest) -> Id { diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index 335e73b2c..fd5d36e24 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -18,8 +18,8 @@ impl NSSet { pub unsafe fn member(&self, object: &ObjectType) -> Option> { msg_send_id![self, member: object] } - pub unsafe fn objectEnumerator(&self) -> TodoGenerics { - msg_send![self, objectEnumerator] + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] @@ -49,13 +49,13 @@ impl NSSet { pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { msg_send_id![self, descriptionWithLocale: locale] } - pub unsafe fn intersectsSet(&self, otherSet: TodoGenerics) -> bool { + pub unsafe fn intersectsSet(&self, otherSet: &NSSet) -> bool { msg_send![self, intersectsSet: otherSet] } - pub unsafe fn isEqualToSet(&self, otherSet: TodoGenerics) -> bool { + pub unsafe fn isEqualToSet(&self, otherSet: &NSSet) -> bool { msg_send![self, isEqualToSet: otherSet] } - pub unsafe fn isSubsetOfSet(&self, otherSet: TodoGenerics) -> bool { + pub unsafe fn isSubsetOfSet(&self, otherSet: &NSSet) -> bool { msg_send![self, isSubsetOfSet: otherSet] } pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { @@ -72,14 +72,20 @@ impl NSSet { withObject: argument ] } - pub unsafe fn setByAddingObject(&self, anObject: &ObjectType) -> TodoGenerics { - msg_send![self, setByAddingObject: anObject] + pub unsafe fn setByAddingObject(&self, anObject: &ObjectType) -> Id, Shared> { + msg_send_id![self, setByAddingObject: anObject] } - pub unsafe fn setByAddingObjectsFromSet(&self, other: TodoGenerics) -> TodoGenerics { - msg_send![self, setByAddingObjectsFromSet: other] + pub unsafe fn setByAddingObjectsFromSet( + &self, + other: &NSSet, + ) -> Id, Shared> { + msg_send_id![self, setByAddingObjectsFromSet: other] } - pub unsafe fn setByAddingObjectsFromArray(&self, other: TodoGenerics) -> TodoGenerics { - msg_send![self, setByAddingObjectsFromArray: other] + pub unsafe fn setByAddingObjectsFromArray( + &self, + other: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, setByAddingObjectsFromArray: other] } pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { msg_send![self, enumerateObjectsUsingBlock: block] @@ -91,18 +97,18 @@ impl NSSet { ) { msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] } - pub unsafe fn objectsPassingTest(&self, predicate: TodoBlock) -> TodoGenerics { - msg_send![self, objectsPassingTest: predicate] + pub unsafe fn objectsPassingTest(&self, predicate: TodoBlock) -> Id, Shared> { + msg_send_id![self, objectsPassingTest: predicate] } pub unsafe fn objectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> TodoGenerics { - msg_send![self, objectsWithOptions: opts, passingTest: predicate] + ) -> Id, Shared> { + msg_send_id![self, objectsWithOptions: opts, passingTest: predicate] } - pub unsafe fn allObjects(&self) -> TodoGenerics { - msg_send![self, allObjects] + pub unsafe fn allObjects(&self) -> Id, Shared> { + msg_send_id![self, allObjects] } pub unsafe fn description(&self) -> Id { msg_send_id![self, description] @@ -119,19 +125,23 @@ impl NSSet { pub unsafe fn setWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id { msg_send_id![Self::class(), setWithObjects: objects, count: cnt] } - pub unsafe fn setWithSet(set: TodoGenerics) -> Id { + pub unsafe fn setWithSet(set: &NSSet) -> Id { msg_send_id![Self::class(), setWithSet: set] } - pub unsafe fn setWithArray(array: TodoGenerics) -> Id { + pub unsafe fn setWithArray(array: &NSArray) -> Id { msg_send_id![Self::class(), setWithArray: array] } - pub unsafe fn initWithSet(&self, set: TodoGenerics) -> Id { + pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { msg_send_id![self, initWithSet: set] } - pub unsafe fn initWithSet_copyItems(&self, set: TodoGenerics, flag: bool) -> Id { + pub unsafe fn initWithSet_copyItems( + &self, + set: &NSSet, + flag: bool, + ) -> Id { msg_send_id![self, initWithSet: set, copyItems: flag] } - pub unsafe fn initWithArray(&self, array: TodoGenerics) -> Id { + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { msg_send_id![self, initWithArray: array] } } @@ -161,22 +171,22 @@ impl NSMutableSet { } #[doc = "NSExtendedMutableSet"] impl NSMutableSet { - pub unsafe fn addObjectsFromArray(&self, array: TodoGenerics) { + pub unsafe fn addObjectsFromArray(&self, array: &NSArray) { msg_send![self, addObjectsFromArray: array] } - pub unsafe fn intersectSet(&self, otherSet: TodoGenerics) { + pub unsafe fn intersectSet(&self, otherSet: &NSSet) { msg_send![self, intersectSet: otherSet] } - pub unsafe fn minusSet(&self, otherSet: TodoGenerics) { + pub unsafe fn minusSet(&self, otherSet: &NSSet) { msg_send![self, minusSet: otherSet] } pub unsafe fn removeAllObjects(&self) { msg_send![self, removeAllObjects] } - pub unsafe fn unionSet(&self, otherSet: TodoGenerics) { + pub unsafe fn unionSet(&self, otherSet: &NSSet) { msg_send![self, unionSet: otherSet] } - pub unsafe fn setSet(&self, otherSet: TodoGenerics) { + pub unsafe fn setSet(&self, otherSet: &NSSet) { msg_send![self, setSet: otherSet] } } @@ -197,17 +207,17 @@ impl NSCountedSet { pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { msg_send_id![self, initWithCapacity: numItems] } - pub unsafe fn initWithArray(&self, array: TodoGenerics) -> Id { + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { msg_send_id![self, initWithArray: array] } - pub unsafe fn initWithSet(&self, set: TodoGenerics) -> Id { + pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { msg_send_id![self, initWithSet: set] } pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger { msg_send![self, countForObject: object] } - pub unsafe fn objectEnumerator(&self) -> TodoGenerics { - msg_send![self, objectEnumerator] + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] } pub unsafe fn addObject(&self, object: &ObjectType) { msg_send![self, addObject: object] diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index ebde52ddf..613f327a7 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -113,23 +113,23 @@ impl NSSortDescriptor { impl NSSet { pub unsafe fn sortedArrayUsingDescriptors( &self, - sortDescriptors: TodoGenerics, - ) -> TodoGenerics { - msg_send![self, sortedArrayUsingDescriptors: sortDescriptors] + sortDescriptors: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] } } #[doc = "NSSortDescriptorSorting"] impl NSArray { pub unsafe fn sortedArrayUsingDescriptors( &self, - sortDescriptors: TodoGenerics, - ) -> TodoGenerics { - msg_send![self, sortedArrayUsingDescriptors: sortDescriptors] + sortDescriptors: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] } } #[doc = "NSSortDescriptorSorting"] impl NSMutableArray { - pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: TodoGenerics) { + pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray) { msg_send![self, sortUsingDescriptors: sortDescriptors] } } @@ -137,14 +137,14 @@ impl NSMutableArray { impl NSOrderedSet { pub unsafe fn sortedArrayUsingDescriptors( &self, - sortDescriptors: TodoGenerics, - ) -> TodoGenerics { - msg_send![self, sortedArrayUsingDescriptors: sortDescriptors] + sortDescriptors: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] } } #[doc = "NSKeyValueSorting"] impl NSMutableOrderedSet { - pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: TodoGenerics) { + pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray) { msg_send![self, sortUsingDescriptors: sortDescriptors] } } diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index bae01234a..9fe27a907 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -33,10 +33,10 @@ impl NSSpellServer { pub unsafe fn run(&self) { msg_send![self, run] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } } diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index ecb3defd5..eaa06a3ea 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -42,10 +42,10 @@ impl NSStream { pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn streamStatus(&self) -> NSStreamStatus { diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 6640a0ffa..e44b2ceac 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -334,14 +334,17 @@ impl NSString { ) -> Id { msg_send_id![Self::class(), localizedNameOfStringEncoding: encoding] } - pub unsafe fn componentsSeparatedByString(&self, separator: &NSString) -> TodoGenerics { - msg_send![self, componentsSeparatedByString: separator] + pub unsafe fn componentsSeparatedByString( + &self, + separator: &NSString, + ) -> Id, Shared> { + msg_send_id![self, componentsSeparatedByString: separator] } pub unsafe fn componentsSeparatedByCharactersInSet( &self, separator: &NSCharacterSet, - ) -> TodoGenerics { - msg_send![self, componentsSeparatedByCharactersInSet: separator] + ) -> Id, Shared> { + msg_send_id![self, componentsSeparatedByCharactersInSet: separator] } pub unsafe fn stringByTrimmingCharactersInSet( &self, @@ -763,7 +766,7 @@ pub type NSStringEncodingDetectionOptionsKey = NSString; impl NSString { pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( data: &NSData, - opts: TodoGenerics, + opts: Option<&NSDictionary>, string: *mut *mut NSString, usedLossyConversion: *mut bool, ) -> NSStringEncoding { diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index d549cd0a9..3a9300623 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -39,16 +39,16 @@ impl NSTask { pub unsafe fn setExecutableURL(&self, executableURL: Option<&NSURL>) { msg_send![self, setExecutableURL: executableURL] } - pub unsafe fn arguments(&self) -> TodoGenerics { - msg_send![self, arguments] + pub unsafe fn arguments(&self) -> Option, Shared>> { + msg_send_id![self, arguments] } - pub unsafe fn setArguments(&self, arguments: TodoGenerics) { + pub unsafe fn setArguments(&self, arguments: Option<&NSArray>) { msg_send![self, setArguments: arguments] } - pub unsafe fn environment(&self) -> TodoGenerics { - msg_send![self, environment] + pub unsafe fn environment(&self) -> Option, Shared>> { + msg_send_id![self, environment] } - pub unsafe fn setEnvironment(&self, environment: TodoGenerics) { + pub unsafe fn setEnvironment(&self, environment: Option<&NSDictionary>) { msg_send![self, setEnvironment: environment] } pub unsafe fn currentDirectoryURL(&self) -> Option> { @@ -104,7 +104,7 @@ impl NSTask { impl NSTask { pub unsafe fn launchedTaskWithExecutableURL_arguments_error_terminationHandler( url: &NSURL, - arguments: TodoGenerics, + arguments: &NSArray, error: *mut *mut NSError, terminationHandler: TodoBlock, ) -> Option> { @@ -127,7 +127,7 @@ impl NSTask { } pub unsafe fn launchedTaskWithLaunchPath_arguments( path: &NSString, - arguments: TodoGenerics, + arguments: &NSArray, ) -> Id { msg_send_id![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 5d83e4950..0303b776f 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -46,8 +46,8 @@ impl NSTextCheckingResult { pub unsafe fn orthography(&self) -> Option> { msg_send_id![self, orthography] } - pub unsafe fn grammarDetails(&self) -> TodoGenerics { - msg_send![self, grammarDetails] + pub unsafe fn grammarDetails(&self) -> Option, Shared>> { + msg_send_id![self, grammarDetails] } pub unsafe fn date(&self) -> Option> { msg_send_id![self, date] @@ -58,8 +58,10 @@ impl NSTextCheckingResult { pub unsafe fn duration(&self) -> NSTimeInterval { msg_send![self, duration] } - pub unsafe fn components(&self) -> TodoGenerics { - msg_send![self, components] + pub unsafe fn components( + &self, + ) -> Option, Shared>> { + msg_send_id![self, components] } pub unsafe fn URL(&self) -> Option> { msg_send_id![self, URL] @@ -67,8 +69,8 @@ impl NSTextCheckingResult { pub unsafe fn replacementString(&self) -> Option> { msg_send_id![self, replacementString] } - pub unsafe fn alternativeStrings(&self) -> TodoGenerics { - msg_send![self, alternativeStrings] + pub unsafe fn alternativeStrings(&self) -> Option, Shared>> { + msg_send_id![self, alternativeStrings] } pub unsafe fn regularExpression(&self) -> Option> { msg_send_id![self, regularExpression] @@ -79,8 +81,10 @@ impl NSTextCheckingResult { pub unsafe fn numberOfRanges(&self) -> NSUInteger { msg_send![self, numberOfRanges] } - pub unsafe fn addressComponents(&self) -> TodoGenerics { - msg_send![self, addressComponents] + pub unsafe fn addressComponents( + &self, + ) -> Option, Shared>> { + msg_send_id![self, addressComponents] } } #[doc = "NSTextCheckingResultCreation"] @@ -100,7 +104,7 @@ impl NSTextCheckingResult { } pub unsafe fn grammarCheckingResultWithRange_details( range: NSRange, - details: TodoGenerics, + details: &NSArray, ) -> Id { msg_send_id![ Self::class(), @@ -134,7 +138,7 @@ impl NSTextCheckingResult { } pub unsafe fn addressCheckingResultWithRange_components( range: NSRange, - components: TodoGenerics, + components: &NSDictionary, ) -> Id { msg_send_id![ Self::class(), @@ -191,7 +195,7 @@ impl NSTextCheckingResult { pub unsafe fn correctionCheckingResultWithRange_replacementString_alternativeStrings( range: NSRange, replacementString: &NSString, - alternativeStrings: TodoGenerics, + alternativeStrings: &NSArray, ) -> Id { msg_send_id![ Self::class(), @@ -224,7 +228,7 @@ impl NSTextCheckingResult { } pub unsafe fn transitInformationCheckingResultWithRange_components( range: NSRange, - components: TodoGenerics, + components: &NSDictionary, ) -> Id { msg_send_id![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index d0afb55e3..451a43006 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -97,11 +97,11 @@ impl NSThread { pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { msg_send![self, setQualityOfService: qualityOfService] } - pub unsafe fn callStackReturnAddresses() -> TodoGenerics { - msg_send![Self::class(), callStackReturnAddresses] + pub unsafe fn callStackReturnAddresses() -> Id, Shared> { + msg_send_id![Self::class(), callStackReturnAddresses] } - pub unsafe fn callStackSymbols() -> TodoGenerics { - msg_send![Self::class(), callStackSymbols] + pub unsafe fn callStackSymbols() -> Id, Shared> { + msg_send_id![Self::class(), callStackSymbols] } pub unsafe fn name(&self) -> Option> { msg_send_id![self, name] @@ -141,7 +141,7 @@ impl NSObject { aSelector: Sel, arg: Option<&Object>, wait: bool, - array: TodoGenerics, + array: Option<&NSArray>, ) { msg_send![ self, @@ -170,7 +170,7 @@ impl NSObject { thr: &NSThread, arg: Option<&Object>, wait: bool, - array: TodoGenerics, + array: Option<&NSArray>, ) { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 354c3b8f7..d32579226 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -49,8 +49,8 @@ impl NSTimeZone { pub unsafe fn resetSystemTimeZone() { msg_send![Self::class(), resetSystemTimeZone] } - pub unsafe fn abbreviationDictionary() -> TodoGenerics { - msg_send![Self::class(), abbreviationDictionary] + pub unsafe fn abbreviationDictionary() -> Id, Shared> { + msg_send_id![Self::class(), abbreviationDictionary] } pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool { msg_send![self, isEqualToTimeZone: aTimeZone] @@ -74,10 +74,12 @@ impl NSTimeZone { pub unsafe fn localTimeZone() -> Id { msg_send_id![Self::class(), localTimeZone] } - pub unsafe fn knownTimeZoneNames() -> TodoGenerics { - msg_send![Self::class(), knownTimeZoneNames] + pub unsafe fn knownTimeZoneNames() -> Id, Shared> { + msg_send_id![Self::class(), knownTimeZoneNames] } - pub unsafe fn setAbbreviationDictionary(abbreviationDictionary: TodoGenerics) { + pub unsafe fn setAbbreviationDictionary( + abbreviationDictionary: &NSDictionary, + ) { msg_send![ Self::class(), setAbbreviationDictionary: abbreviationDictionary diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index dd2495eb6..4d119f500 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -208,10 +208,10 @@ impl NSURL { } pub unsafe fn resourceValuesForKeys_error( &self, - keys: TodoGenerics, + keys: &NSArray, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![self, resourceValuesForKeys: keys, error: error] + ) -> Option, Shared>> { + msg_send_id![self, resourceValuesForKeys: keys, error: error] } pub unsafe fn setResourceValue_forKey_error( &self, @@ -223,7 +223,7 @@ impl NSURL { } pub unsafe fn setResourceValues_error( &self, - keyedValues: TodoGenerics, + keyedValues: &NSDictionary, error: *mut *mut NSError, ) -> bool { msg_send![self, setResourceValues: keyedValues, error: error] @@ -244,7 +244,7 @@ impl NSURL { pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error( &self, options: NSURLBookmarkCreationOptions, - keys: TodoGenerics, + keys: Option<&NSArray>, relativeURL: Option<&NSURL>, error: *mut *mut NSError, ) -> Option> { @@ -290,10 +290,10 @@ impl NSURL { ] } pub unsafe fn resourceValuesForKeys_fromBookmarkData( - keys: TodoGenerics, + keys: &NSArray, bookmarkData: &NSData, - ) -> TodoGenerics { - msg_send![ + ) -> Option, Shared>> { + msg_send_id![ Self::class(), resourceValuesForKeys: keys, fromBookmarkData: bookmarkData @@ -422,10 +422,10 @@ impl NSURL { } pub unsafe fn promisedItemResourceValuesForKeys_error( &self, - keys: TodoGenerics, + keys: &NSArray, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![self, promisedItemResourceValuesForKeys: keys, error: error] + ) -> Option, Shared>> { + msg_send_id![self, promisedItemResourceValuesForKeys: keys, error: error] } pub unsafe fn checkPromisedItemIsReachableAndReturnError( &self, @@ -615,16 +615,19 @@ impl NSURLComponents { pub unsafe fn rangeOfFragment(&self) -> NSRange { msg_send![self, rangeOfFragment] } - pub unsafe fn queryItems(&self) -> TodoGenerics { - msg_send![self, queryItems] + pub unsafe fn queryItems(&self) -> Option, Shared>> { + msg_send_id![self, queryItems] } - pub unsafe fn setQueryItems(&self, queryItems: TodoGenerics) { + pub unsafe fn setQueryItems(&self, queryItems: Option<&NSArray>) { msg_send![self, setQueryItems: queryItems] } - pub unsafe fn percentEncodedQueryItems(&self) -> TodoGenerics { - msg_send![self, percentEncodedQueryItems] + pub unsafe fn percentEncodedQueryItems(&self) -> Option, Shared>> { + msg_send_id![self, percentEncodedQueryItems] } - pub unsafe fn setPercentEncodedQueryItems(&self, percentEncodedQueryItems: TodoGenerics) { + pub unsafe fn setPercentEncodedQueryItems( + &self, + percentEncodedQueryItems: Option<&NSArray>, + ) { msg_send![self, setPercentEncodedQueryItems: percentEncodedQueryItems] } } @@ -678,7 +681,9 @@ impl NSString { } #[doc = "NSURLPathUtilities"] impl NSURL { - pub unsafe fn fileURLWithPathComponents(components: TodoGenerics) -> Option> { + pub unsafe fn fileURLWithPathComponents( + components: &NSArray, + ) -> Option> { msg_send_id![Self::class(), fileURLWithPathComponents: components] } pub unsafe fn URLByAppendingPathComponent( @@ -704,8 +709,8 @@ impl NSURL { ) -> Option> { msg_send_id![self, URLByAppendingPathExtension: pathExtension] } - pub unsafe fn pathComponents(&self) -> TodoGenerics { - msg_send![self, pathComponents] + pub unsafe fn pathComponents(&self) -> Option, Shared>> { + msg_send_id![self, pathComponents] } pub unsafe fn lastPathComponent(&self) -> Option> { msg_send_id![self, lastPathComponent] diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index 99443062c..3ed66bb08 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -24,7 +24,7 @@ impl NSURLAuthenticationChallenge { previousFailureCount: NSInteger, response: Option<&NSURLResponse>, error: Option<&NSError>, - sender: TodoGenerics, + sender: &id, ) -> Id { msg_send_id![ self, @@ -39,7 +39,7 @@ impl NSURLAuthenticationChallenge { pub unsafe fn initWithAuthenticationChallenge_sender( &self, challenge: &NSURLAuthenticationChallenge, - sender: TodoGenerics, + sender: &id, ) -> Id { msg_send_id![ self, @@ -62,7 +62,7 @@ impl NSURLAuthenticationChallenge { pub unsafe fn error(&self) -> Option> { msg_send_id![self, error] } - pub unsafe fn sender(&self) -> TodoGenerics { - msg_send![self, sender] + pub unsafe fn sender(&self) -> Option> { + msg_send_id![self, sender] } } diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 3b8a94507..06f93fa7a 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -21,8 +21,8 @@ impl NSURLCredentialStorage { pub unsafe fn credentialsForProtectionSpace( &self, space: &NSURLProtectionSpace, - ) -> TodoGenerics { - msg_send![self, credentialsForProtectionSpace: space] + ) -> Option, Shared>> { + msg_send_id![self, credentialsForProtectionSpace: space] } pub unsafe fn setCredential_forProtectionSpace( &self, @@ -46,7 +46,7 @@ impl NSURLCredentialStorage { &self, credential: &NSURLCredential, space: &NSURLProtectionSpace, - options: TodoGenerics, + options: Option<&NSDictionary>, ) { msg_send![ self, @@ -75,8 +75,10 @@ impl NSURLCredentialStorage { pub unsafe fn sharedCredentialStorage() -> Id { msg_send_id![Self::class(), sharedCredentialStorage] } - pub unsafe fn allCredentials(&self) -> TodoGenerics { - msg_send![self, allCredentials] + pub unsafe fn allCredentials( + &self, + ) -> Id, Shared> { + msg_send_id![self, allCredentials] } } #[doc = "NSURLSessionTaskAdditions"] @@ -111,7 +113,7 @@ impl NSURLCredentialStorage { &self, credential: &NSURLCredential, protectionSpace: &NSURLProtectionSpace, - options: TodoGenerics, + options: Option<&NSDictionary>, task: &NSURLSessionTask, ) { msg_send![ diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index 8a8a518c3..a33be349b 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -28,14 +28,14 @@ impl NSURLDownload { pub unsafe fn initWithRequest_delegate( &self, request: &NSURLRequest, - delegate: TodoGenerics, + delegate: Option<&id>, ) -> Id { msg_send_id![self, initWithRequest: request, delegate: delegate] } pub unsafe fn initWithResumeData_delegate_path( &self, resumeData: &NSData, - delegate: TodoGenerics, + delegate: Option<&id>, path: &NSString, ) -> Id { msg_send_id![ diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index be047d09d..d6a042eb4 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -28,10 +28,10 @@ impl NSURLHandle { pub unsafe fn failureReason(&self) -> Option> { msg_send_id![self, failureReason] } - pub unsafe fn addClient(&self, client: TodoGenerics) { + pub unsafe fn addClient(&self, client: Option<&id>) { msg_send![self, addClient: client] } - pub unsafe fn removeClient(&self, client: TodoGenerics) { + pub unsafe fn removeClient(&self, client: Option<&id>) { msg_send![self, removeClient: client] } pub unsafe fn loadInBackground(&self) { diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 0d64e860e..0cf7282c8 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -70,8 +70,8 @@ impl NSURLProtectionSpace { } #[doc = "NSClientCertificateSpace"] impl NSURLProtectionSpace { - pub unsafe fn distinguishedNames(&self) -> TodoGenerics { - msg_send![self, distinguishedNames] + pub unsafe fn distinguishedNames(&self) -> Option, Shared>> { + msg_send_id![self, distinguishedNames] } } #[doc = "NSServerTrustValidationSpace"] diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 1fdfa02aa..722baa1be 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -26,7 +26,7 @@ impl NSURLProtocol { &self, request: &NSURLRequest, cachedResponse: Option<&NSCachedURLResponse>, - client: TodoGenerics, + client: Option<&id>, ) -> Id { msg_send_id![ self, @@ -77,8 +77,8 @@ impl NSURLProtocol { pub unsafe fn unregisterClass(protocolClass: &Class) { msg_send![Self::class(), unregisterClass: protocolClass] } - pub unsafe fn client(&self) -> TodoGenerics { - msg_send![self, client] + pub unsafe fn client(&self) -> Option> { + msg_send_id![self, client] } pub unsafe fn request(&self) -> Id { msg_send_id![self, request] @@ -96,7 +96,7 @@ impl NSURLProtocol { &self, task: &NSURLSessionTask, cachedResponse: Option<&NSCachedURLResponse>, - client: TodoGenerics, + client: Option<&id>, ) -> Id { msg_send_id![ self, diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 3006c6722..10b316b56 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -166,8 +166,10 @@ impl NSURLRequest { pub unsafe fn HTTPMethod(&self) -> Option> { msg_send_id![self, HTTPMethod] } - pub unsafe fn allHTTPHeaderFields(&self) -> TodoGenerics { - msg_send![self, allHTTPHeaderFields] + pub unsafe fn allHTTPHeaderFields( + &self, + ) -> Option, Shared>> { + msg_send_id![self, allHTTPHeaderFields] } pub unsafe fn HTTPBody(&self) -> Option> { msg_send_id![self, HTTPBody] @@ -196,10 +198,15 @@ impl NSMutableURLRequest { pub unsafe fn setHTTPMethod(&self, HTTPMethod: &NSString) { msg_send![self, setHTTPMethod: HTTPMethod] } - pub unsafe fn allHTTPHeaderFields(&self) -> TodoGenerics { - msg_send![self, allHTTPHeaderFields] + pub unsafe fn allHTTPHeaderFields( + &self, + ) -> Option, Shared>> { + msg_send_id![self, allHTTPHeaderFields] } - pub unsafe fn setAllHTTPHeaderFields(&self, allHTTPHeaderFields: TodoGenerics) { + pub unsafe fn setAllHTTPHeaderFields( + &self, + allHTTPHeaderFields: Option<&NSDictionary>, + ) { msg_send![self, setAllHTTPHeaderFields: allHTTPHeaderFields] } pub unsafe fn HTTPBody(&self) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index 535183816..9a4a2c7c6 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -61,7 +61,7 @@ impl NSHTTPURLResponse { url: &NSURL, statusCode: NSInteger, HTTPVersion: Option<&NSString>, - headerFields: TodoGenerics, + headerFields: Option<&NSDictionary>, ) -> Option> { msg_send_id![ self, diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 421bf67d0..ab4c0acdc 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -42,7 +42,7 @@ impl NSURLSession { } pub unsafe fn sessionWithConfiguration_delegate_delegateQueue( configuration: &NSURLSessionConfiguration, - delegate: TodoGenerics, + delegate: Option<&id>, queue: Option<&NSOperationQueue>, ) -> Id { msg_send_id![ @@ -136,7 +136,7 @@ impl NSURLSession { pub unsafe fn webSocketTaskWithURL_protocols( &self, url: &NSURL, - protocols: TodoGenerics, + protocols: &NSArray, ) -> Id { msg_send_id![self, webSocketTaskWithURL: url, protocols: protocols] } @@ -158,8 +158,8 @@ impl NSURLSession { pub unsafe fn delegateQueue(&self) -> Id { msg_send_id![self, delegateQueue] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } pub unsafe fn configuration(&self) -> Id { msg_send_id![self, configuration] @@ -290,10 +290,10 @@ impl NSURLSessionTask { pub unsafe fn response(&self) -> Option> { msg_send_id![self, response] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn progress(&self) -> Id { @@ -797,10 +797,10 @@ impl NSURLSessionConfiguration { setShouldUseExtendedBackgroundIdleMode: shouldUseExtendedBackgroundIdleMode ] } - pub unsafe fn protocolClasses(&self) -> TodoGenerics { - msg_send![self, protocolClasses] + pub unsafe fn protocolClasses(&self) -> Option, Shared>> { + msg_send_id![self, protocolClasses] } - pub unsafe fn setProtocolClasses(&self, protocolClasses: TodoGenerics) { + pub unsafe fn setProtocolClasses(&self, protocolClasses: Option<&NSArray>) { msg_send![self, setProtocolClasses: protocolClasses] } pub unsafe fn multipathServiceType(&self) -> NSURLSessionMultipathServiceType { @@ -960,8 +960,10 @@ impl NSURLSessionTaskMetrics { pub unsafe fn new() -> Id { msg_send_id![Self::class(), new] } - pub unsafe fn transactionMetrics(&self) -> TodoGenerics { - msg_send![self, transactionMetrics] + pub unsafe fn transactionMetrics( + &self, + ) -> Id, Shared> { + msg_send_id![self, transactionMetrics] } pub unsafe fn taskInterval(&self) -> Id { msg_send_id![self, taskInterval] diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index e1d74f7ed..e49785bdc 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -31,8 +31,11 @@ impl NSUbiquitousKeyValueStore { pub unsafe fn arrayForKey(&self, aKey: &NSString) -> Option> { msg_send_id![self, arrayForKey: aKey] } - pub unsafe fn dictionaryForKey(&self, aKey: &NSString) -> TodoGenerics { - msg_send![self, dictionaryForKey: aKey] + pub unsafe fn dictionaryForKey( + &self, + aKey: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, dictionaryForKey: aKey] } pub unsafe fn dataForKey(&self, aKey: &NSString) -> Option> { msg_send_id![self, dataForKey: aKey] @@ -55,7 +58,11 @@ impl NSUbiquitousKeyValueStore { pub unsafe fn setArray_forKey(&self, anArray: Option<&NSArray>, aKey: &NSString) { msg_send![self, setArray: anArray, forKey: aKey] } - pub unsafe fn setDictionary_forKey(&self, aDictionary: TodoGenerics, aKey: &NSString) { + pub unsafe fn setDictionary_forKey( + &self, + aDictionary: Option<&NSDictionary>, + aKey: &NSString, + ) { msg_send![self, setDictionary: aDictionary, forKey: aKey] } pub unsafe fn setLongLong_forKey(&self, value: c_longlong, aKey: &NSString) { @@ -73,7 +80,7 @@ impl NSUbiquitousKeyValueStore { pub unsafe fn defaultStore() -> Id { msg_send_id![Self::class(), defaultStore] } - pub unsafe fn dictionaryRepresentation(&self) -> TodoGenerics { - msg_send![self, dictionaryRepresentation] + pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared> { + msg_send_id![self, dictionaryRepresentation] } } diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index 120995c41..7940c1c3e 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -97,10 +97,10 @@ impl NSUndoManager { pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger) { msg_send![self, setLevelsOfUndo: levelsOfUndo] } - pub unsafe fn runLoopModes(&self) -> TodoGenerics { - msg_send![self, runLoopModes] + pub unsafe fn runLoopModes(&self) -> Id, Shared> { + msg_send_id![self, runLoopModes] } - pub unsafe fn setRunLoopModes(&self, runLoopModes: TodoGenerics) { + pub unsafe fn setRunLoopModes(&self, runLoopModes: &NSArray) { msg_send![self, setRunLoopModes: runLoopModes] } pub unsafe fn canUndo(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 8dd5188df..38bdf1e2f 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -47,7 +47,7 @@ impl NSUserActivity { ] } pub unsafe fn deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler( - persistentIdentifiers: TodoGenerics, + persistentIdentifiers: &NSArray, handler: TodoBlock, ) { msg_send![ @@ -77,10 +77,10 @@ impl NSUserActivity { pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { msg_send![self, setUserInfo: userInfo] } - pub unsafe fn requiredUserInfoKeys(&self) -> TodoGenerics { - msg_send![self, requiredUserInfoKeys] + pub unsafe fn requiredUserInfoKeys(&self) -> Option, Shared>> { + msg_send_id![self, requiredUserInfoKeys] } - pub unsafe fn setRequiredUserInfoKeys(&self, requiredUserInfoKeys: TodoGenerics) { + pub unsafe fn setRequiredUserInfoKeys(&self, requiredUserInfoKeys: Option<&NSSet>) { msg_send![self, setRequiredUserInfoKeys: requiredUserInfoKeys] } pub unsafe fn needsSave(&self) -> bool { @@ -107,10 +107,10 @@ impl NSUserActivity { pub unsafe fn setExpirationDate(&self, expirationDate: Option<&NSDate>) { msg_send![self, setExpirationDate: expirationDate] } - pub unsafe fn keywords(&self) -> TodoGenerics { - msg_send![self, keywords] + pub unsafe fn keywords(&self) -> Id, Shared> { + msg_send_id![self, keywords] } - pub unsafe fn setKeywords(&self, keywords: TodoGenerics) { + pub unsafe fn setKeywords(&self, keywords: &NSSet) { msg_send![self, setKeywords: keywords] } pub unsafe fn supportsContinuationStreams(&self) -> bool { @@ -122,10 +122,10 @@ impl NSUserActivity { setSupportsContinuationStreams: supportsContinuationStreams ] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn targetContentIdentifier(&self) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index ccf0c0852..6b7c991d9 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -48,14 +48,20 @@ impl NSUserDefaults { pub unsafe fn arrayForKey(&self, defaultName: &NSString) -> Option> { msg_send_id![self, arrayForKey: defaultName] } - pub unsafe fn dictionaryForKey(&self, defaultName: &NSString) -> TodoGenerics { - msg_send![self, dictionaryForKey: defaultName] + pub unsafe fn dictionaryForKey( + &self, + defaultName: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, dictionaryForKey: defaultName] } pub unsafe fn dataForKey(&self, defaultName: &NSString) -> Option> { msg_send_id![self, dataForKey: defaultName] } - pub unsafe fn stringArrayForKey(&self, defaultName: &NSString) -> TodoGenerics { - msg_send![self, stringArrayForKey: defaultName] + pub unsafe fn stringArrayForKey( + &self, + defaultName: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, stringArrayForKey: defaultName] } pub unsafe fn integerForKey(&self, defaultName: &NSString) -> NSInteger { msg_send![self, integerForKey: defaultName] @@ -87,7 +93,7 @@ impl NSUserDefaults { pub unsafe fn setURL_forKey(&self, url: Option<&NSURL>, defaultName: &NSString) { msg_send![self, setURL: url, forKey: defaultName] } - pub unsafe fn registerDefaults(&self, registrationDictionary: TodoGenerics) { + pub unsafe fn registerDefaults(&self, registrationDictionary: &NSDictionary) { msg_send![self, registerDefaults: registrationDictionary] } pub unsafe fn addSuiteNamed(&self, suiteName: &NSString) { @@ -96,13 +102,20 @@ impl NSUserDefaults { pub unsafe fn removeSuiteNamed(&self, suiteName: &NSString) { msg_send![self, removeSuiteNamed: suiteName] } - pub unsafe fn dictionaryRepresentation(&self) -> TodoGenerics { - msg_send![self, dictionaryRepresentation] + pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared> { + msg_send_id![self, dictionaryRepresentation] } - pub unsafe fn volatileDomainForName(&self, domainName: &NSString) -> TodoGenerics { - msg_send![self, volatileDomainForName: domainName] + pub unsafe fn volatileDomainForName( + &self, + domainName: &NSString, + ) -> Id, Shared> { + msg_send_id![self, volatileDomainForName: domainName] } - pub unsafe fn setVolatileDomain_forName(&self, domain: TodoGenerics, domainName: &NSString) { + pub unsafe fn setVolatileDomain_forName( + &self, + domain: &NSDictionary, + domainName: &NSString, + ) { msg_send![self, setVolatileDomain: domain, forName: domainName] } pub unsafe fn removeVolatileDomainForName(&self, domainName: &NSString) { @@ -111,10 +124,17 @@ impl NSUserDefaults { pub unsafe fn persistentDomainNames(&self) -> Id { msg_send_id![self, persistentDomainNames] } - pub unsafe fn persistentDomainForName(&self, domainName: &NSString) -> TodoGenerics { - msg_send![self, persistentDomainForName: domainName] + pub unsafe fn persistentDomainForName( + &self, + domainName: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, persistentDomainForName: domainName] } - pub unsafe fn setPersistentDomain_forName(&self, domain: TodoGenerics, domainName: &NSString) { + pub unsafe fn setPersistentDomain_forName( + &self, + domain: &NSDictionary, + domainName: &NSString, + ) { msg_send![self, setPersistentDomain: domain, forName: domainName] } pub unsafe fn removePersistentDomainForName(&self, domainName: &NSString) { @@ -132,7 +152,7 @@ impl NSUserDefaults { pub unsafe fn standardUserDefaults() -> Id { msg_send_id![Self::class(), standardUserDefaults] } - pub unsafe fn volatileDomainNames(&self) -> TodoGenerics { - msg_send![self, volatileDomainNames] + pub unsafe fn volatileDomainNames(&self) -> Id, Shared> { + msg_send_id![self, volatileDomainNames] } } diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 55fa0fb7e..0c2b4dc72 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -46,10 +46,10 @@ impl NSUserNotification { pub unsafe fn setActionButtonTitle(&self, actionButtonTitle: &NSString) { msg_send![self, setActionButtonTitle: actionButtonTitle] } - pub unsafe fn userInfo(&self) -> TodoGenerics { - msg_send![self, userInfo] + pub unsafe fn userInfo(&self) -> Option, Shared>> { + msg_send_id![self, userInfo] } - pub unsafe fn setUserInfo(&self, userInfo: TodoGenerics) { + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { msg_send![self, setUserInfo: userInfo] } pub unsafe fn deliveryDate(&self) -> Option> { @@ -130,10 +130,15 @@ impl NSUserNotification { pub unsafe fn response(&self) -> Option> { msg_send_id![self, response] } - pub unsafe fn additionalActions(&self) -> TodoGenerics { - msg_send![self, additionalActions] + pub unsafe fn additionalActions( + &self, + ) -> Option, Shared>> { + msg_send_id![self, additionalActions] } - pub unsafe fn setAdditionalActions(&self, additionalActions: TodoGenerics) { + pub unsafe fn setAdditionalActions( + &self, + additionalActions: Option<&NSArray>, + ) { msg_send![self, setAdditionalActions: additionalActions] } pub unsafe fn additionalActivationAction( @@ -193,20 +198,23 @@ impl NSUserNotificationCenter { pub unsafe fn defaultUserNotificationCenter() -> Id { msg_send_id![Self::class(), defaultUserNotificationCenter] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } - pub unsafe fn scheduledNotifications(&self) -> TodoGenerics { - msg_send![self, scheduledNotifications] + pub unsafe fn scheduledNotifications(&self) -> Id, Shared> { + msg_send_id![self, scheduledNotifications] } - pub unsafe fn setScheduledNotifications(&self, scheduledNotifications: TodoGenerics) { + pub unsafe fn setScheduledNotifications( + &self, + scheduledNotifications: &NSArray, + ) { msg_send![self, setScheduledNotifications: scheduledNotifications] } - pub unsafe fn deliveredNotifications(&self) -> TodoGenerics { - msg_send![self, deliveredNotifications] + pub unsafe fn deliveredNotifications(&self) -> Id, Shared> { + msg_send_id![self, deliveredNotifications] } } pub type NSUserNotificationCenterDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index f43bd804c..e24897521 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -43,7 +43,7 @@ extern_class!( impl NSUserUnixTask { pub unsafe fn executeWithArguments_completionHandler( &self, - arguments: TodoGenerics, + arguments: Option<&NSArray>, handler: NSUserUnixTaskCompletionHandler, ) { msg_send![ @@ -101,15 +101,15 @@ extern_class!( impl NSUserAutomatorTask { pub unsafe fn executeWithInput_completionHandler( &self, - input: TodoGenerics, + input: Option<&id>, handler: NSUserAutomatorTaskCompletionHandler, ) { msg_send![self, executeWithInput: input, completionHandler: handler] } - pub unsafe fn variables(&self) -> TodoGenerics { - msg_send![self, variables] + pub unsafe fn variables(&self) -> Option, Shared>> { + msg_send_id![self, variables] } - pub unsafe fn setVariables(&self, variables: TodoGenerics) { + pub unsafe fn setVariables(&self, variables: Option<&NSDictionary>) { msg_send![self, setVariables: variables] } } diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index abd014935..f786e5346 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -29,8 +29,8 @@ impl NSValueTransformer { ) -> Option> { msg_send_id![Self::class(), valueTransformerForName: name] } - pub unsafe fn valueTransformerNames() -> TodoGenerics { - msg_send![Self::class(), valueTransformerNames] + pub unsafe fn valueTransformerNames() -> Id, Shared> { + msg_send_id![Self::class(), valueTransformerNames] } pub unsafe fn transformedValueClass() -> &Class { msg_send![Self::class(), transformedValueClass] @@ -56,7 +56,7 @@ extern_class!( } ); impl NSSecureUnarchiveFromDataTransformer { - pub unsafe fn allowedTopLevelClasses() -> TodoGenerics { - msg_send![Self::class(), allowedTopLevelClasses] + pub unsafe fn allowedTopLevelClasses() -> Id, Shared> { + msg_send_id![Self::class(), allowedTopLevelClasses] } } diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index 0d18d3538..766537654 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -49,13 +49,13 @@ impl NSXMLDTD { pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { msg_send![self, insertChild: child, atIndex: index] } - pub unsafe fn insertChildren_atIndex(&self, children: TodoGenerics, index: NSUInteger) { + pub unsafe fn insertChildren_atIndex(&self, children: &NSArray, index: NSUInteger) { msg_send![self, insertChildren: children, atIndex: index] } pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { msg_send![self, removeChildAtIndex: index] } - pub unsafe fn setChildren(&self, children: TodoGenerics) { + pub unsafe fn setChildren(&self, children: Option<&NSArray>) { msg_send![self, setChildren: children] } pub unsafe fn addChild(&self, child: &NSXMLNode) { diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index 115739c8f..c15d3bd0f 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -62,13 +62,13 @@ impl NSXMLDocument { pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { msg_send![self, insertChild: child, atIndex: index] } - pub unsafe fn insertChildren_atIndex(&self, children: TodoGenerics, index: NSUInteger) { + pub unsafe fn insertChildren_atIndex(&self, children: &NSArray, index: NSUInteger) { msg_send![self, insertChildren: children, atIndex: index] } pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { msg_send![self, removeChildAtIndex: index] } - pub unsafe fn setChildren(&self, children: TodoGenerics) { + pub unsafe fn setChildren(&self, children: Option<&NSArray>) { msg_send![self, setChildren: children] } pub unsafe fn addChild(&self, child: &NSXMLNode) { @@ -83,7 +83,7 @@ impl NSXMLDocument { pub unsafe fn objectByApplyingXSLT_arguments_error( &self, xslt: &NSData, - arguments: TodoGenerics, + arguments: Option<&NSDictionary>, error: *mut *mut NSError, ) -> Option> { msg_send_id![ @@ -96,7 +96,7 @@ impl NSXMLDocument { pub unsafe fn objectByApplyingXSLTString_arguments_error( &self, xslt: &NSString, - arguments: TodoGenerics, + arguments: Option<&NSDictionary>, error: *mut *mut NSError, ) -> Option> { msg_send_id![ @@ -109,7 +109,7 @@ impl NSXMLDocument { pub unsafe fn objectByApplyingXSLTAtURL_arguments_error( &self, xsltURL: &NSURL, - argument: TodoGenerics, + argument: Option<&NSDictionary>, error: *mut *mut NSError, ) -> Option> { msg_send_id![ diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index a8fe1b087..6cd99bc41 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -47,15 +47,15 @@ impl NSXMLElement { ) -> Id { msg_send_id![self, initWithKind: kind, options: options] } - pub unsafe fn elementsForName(&self, name: &NSString) -> TodoGenerics { - msg_send![self, elementsForName: name] + pub unsafe fn elementsForName(&self, name: &NSString) -> Id, Shared> { + msg_send_id![self, elementsForName: name] } pub unsafe fn elementsForLocalName_URI( &self, localName: &NSString, URI: Option<&NSString>, - ) -> TodoGenerics { - msg_send![self, elementsForLocalName: localName, URI: URI] + ) -> Id, Shared> { + msg_send_id![self, elementsForLocalName: localName, URI: URI] } pub unsafe fn addAttribute(&self, attribute: &NSXMLNode) { msg_send![self, addAttribute: attribute] @@ -63,7 +63,10 @@ impl NSXMLElement { pub unsafe fn removeAttributeForName(&self, name: &NSString) { msg_send![self, removeAttributeForName: name] } - pub unsafe fn setAttributesWithDictionary(&self, attributes: TodoGenerics) { + pub unsafe fn setAttributesWithDictionary( + &self, + attributes: &NSDictionary, + ) { msg_send![self, setAttributesWithDictionary: attributes] } pub unsafe fn attributeForName(&self, name: &NSString) -> Option> { @@ -97,13 +100,13 @@ impl NSXMLElement { pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { msg_send![self, insertChild: child, atIndex: index] } - pub unsafe fn insertChildren_atIndex(&self, children: TodoGenerics, index: NSUInteger) { + pub unsafe fn insertChildren_atIndex(&self, children: &NSArray, index: NSUInteger) { msg_send![self, insertChildren: children, atIndex: index] } pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { msg_send![self, removeChildAtIndex: index] } - pub unsafe fn setChildren(&self, children: TodoGenerics) { + pub unsafe fn setChildren(&self, children: Option<&NSArray>) { msg_send![self, setChildren: children] } pub unsafe fn addChild(&self, child: &NSXMLNode) { @@ -115,16 +118,16 @@ impl NSXMLElement { pub unsafe fn normalizeAdjacentTextNodesPreservingCDATA(&self, preserve: bool) { msg_send![self, normalizeAdjacentTextNodesPreservingCDATA: preserve] } - pub unsafe fn attributes(&self) -> TodoGenerics { - msg_send![self, attributes] + pub unsafe fn attributes(&self) -> Option, Shared>> { + msg_send_id![self, attributes] } - pub unsafe fn setAttributes(&self, attributes: TodoGenerics) { + pub unsafe fn setAttributes(&self, attributes: Option<&NSArray>) { msg_send![self, setAttributes: attributes] } - pub unsafe fn namespaces(&self) -> TodoGenerics { - msg_send![self, namespaces] + pub unsafe fn namespaces(&self) -> Option, Shared>> { + msg_send_id![self, namespaces] } - pub unsafe fn setNamespaces(&self, namespaces: TodoGenerics) { + pub unsafe fn setNamespaces(&self, namespaces: Option<&NSArray>) { msg_send![self, setNamespaces: namespaces] } } diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 8e4bde297..3c63b347c 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -52,8 +52,8 @@ impl NSXMLNode { } pub unsafe fn elementWithName_children_attributes( name: &NSString, - children: TodoGenerics, - attributes: TodoGenerics, + children: Option<&NSArray>, + attributes: Option<&NSArray>, ) -> Id { msg_send_id![ Self::class(), @@ -144,13 +144,13 @@ impl NSXMLNode { &self, xpath: &NSString, error: *mut *mut NSError, - ) -> TodoGenerics { - msg_send![self, nodesForXPath: xpath, error: error] + ) -> Option, Shared>> { + msg_send_id![self, nodesForXPath: xpath, error: error] } pub unsafe fn objectsForXQuery_constants_error( &self, xquery: &NSString, - constants: TodoGenerics, + constants: Option<&NSDictionary>, error: *mut *mut NSError, ) -> Option> { msg_send_id![ @@ -203,8 +203,8 @@ impl NSXMLNode { pub unsafe fn childCount(&self) -> NSUInteger { msg_send![self, childCount] } - pub unsafe fn children(&self) -> TodoGenerics { - msg_send![self, children] + pub unsafe fn children(&self) -> Option, Shared>> { + msg_send_id![self, children] } pub unsafe fn previousSibling(&self) -> Option> { msg_send_id![self, previousSibling] diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index a38055a69..a2daded07 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -34,10 +34,10 @@ impl NSXMLParser { pub unsafe fn abortParsing(&self) { msg_send![self, abortParsing] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn shouldProcessNamespaces(&self) -> bool { @@ -67,10 +67,13 @@ impl NSXMLParser { setExternalEntityResolvingPolicy: externalEntityResolvingPolicy ] } - pub unsafe fn allowedExternalEntityURLs(&self) -> TodoGenerics { - msg_send![self, allowedExternalEntityURLs] + pub unsafe fn allowedExternalEntityURLs(&self) -> Option, Shared>> { + msg_send_id![self, allowedExternalEntityURLs] } - pub unsafe fn setAllowedExternalEntityURLs(&self, allowedExternalEntityURLs: TodoGenerics) { + pub unsafe fn setAllowedExternalEntityURLs( + &self, + allowedExternalEntityURLs: Option<&NSSet>, + ) { msg_send![ self, setAllowedExternalEntityURLs: allowedExternalEntityURLs diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 3ffc5a7ef..75fcf2f94 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -144,10 +144,10 @@ impl NSXPCListener { pub unsafe fn invalidate(&self) { msg_send![self, invalidate] } - pub unsafe fn delegate(&self) -> TodoGenerics { - msg_send![self, delegate] + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: TodoGenerics) { + pub unsafe fn setDelegate(&self, delegate: Option<&id>) { msg_send![self, setDelegate: delegate] } pub unsafe fn endpoint(&self) -> Id { @@ -168,7 +168,7 @@ impl NSXPCInterface { } pub unsafe fn setClasses_forSelector_argumentIndex_ofReply( &self, - classes: TodoGenerics, + classes: &NSSet, sel: Sel, arg: NSUInteger, ofReply: bool, @@ -186,8 +186,8 @@ impl NSXPCInterface { sel: Sel, arg: NSUInteger, ofReply: bool, - ) -> TodoGenerics { - msg_send![ + ) -> Id, Shared> { + msg_send_id![ self, classesForSelector: sel, argumentIndex: arg, @@ -283,10 +283,10 @@ impl NSXPCCoder { ) -> Option> { msg_send_id![self, decodeXPCObjectOfType: type_, forKey: key] } - pub unsafe fn userInfo(&self) -> TodoGenerics { - msg_send![self, userInfo] + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] } - pub unsafe fn setUserInfo(&self, userInfo: TodoGenerics) { + pub unsafe fn setUserInfo(&self, userInfo: Option<&id>) { msg_send![self, setUserInfo: userInfo] } pub unsafe fn connection(&self) -> Option> { From d9f642442e86e250eed15aafafeacb7e6a35f95f Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 16:56:06 +0200 Subject: [PATCH 041/131] Refactor config setup --- crates/header-translator/src/config.rs | 107 +++++++------------------ crates/header-translator/src/main.rs | 8 +- crates/header-translator/src/method.rs | 19 ++--- crates/icrate/src/Foundation.toml | 56 +++++-------- 4 files changed, 63 insertions(+), 127 deletions(-) diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index 6dbd541ff..fca1084f1 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -1,102 +1,57 @@ use std::collections::HashMap; use std::fs; use std::io::Result; -use std::path::{Path, PathBuf}; +use std::path::Path; use serde::Deserialize; -type ClassName = String; -type Selector = String; - -#[derive(Default, Deserialize)] -struct Unsafe { - #[serde(rename = "safe-methods")] - safe_methods: HashMap>, -} - -#[derive(Default, Deserialize)] -struct Skipped { - methods: HashMap>, -} - -#[derive(Deserialize)] +#[derive(Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(deny_unknown_fields)] -struct InnerConfig { - name: Option, - headers: Option>, - output: Option, - #[serde(rename = "unsafe")] - #[serde(default)] - unsafe_: Unsafe, - #[serde(rename = "mutating-methods")] - #[serde(default)] - mutating_methods: HashMap>, +pub struct Config { + #[serde(rename = "class")] #[serde(default)] - skipped: Skipped, + pub class_data: HashMap, } -#[derive(Debug, Default, Clone, PartialEq, Eq)] +#[derive(Deserialize, Debug, Default, Clone, PartialEq, Eq)] +#[serde(deny_unknown_fields)] pub struct ClassData { - pub selector_data: HashMap, + #[serde(default)] + pub methods: HashMap, } -#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] +#[derive(Deserialize, Debug, Clone, Copy, PartialEq, Eq)] +#[serde(deny_unknown_fields)] pub struct MethodData { - pub safe: bool, + #[serde(rename = "unsafe")] + #[serde(default = "unsafe_default")] + pub unsafe_: bool, + #[serde(default = "skipped_default")] pub skipped: bool, // TODO: mutating } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Config { - pub name: String, - pub headers: Vec, - /// The output path, relative to the toml file. - pub output: PathBuf, - pub class_data: HashMap, +fn unsafe_default() -> bool { + true } -impl Config { - pub fn from_file(file: &Path) -> Result { - let s = fs::read_to_string(file)?; - - let config: InnerConfig = toml::from_str(&s)?; - - let name = config.name.unwrap_or_else(|| { - file.file_stem() - .expect("file stem") - .to_string_lossy() - .into_owned() - }); - let headers = config.headers.unwrap_or_else(|| vec![format!("{name}.h")]); - let parent = file.parent().expect("parent"); - let output = parent.join( - config - .output - .unwrap_or_else(|| Path::new("generated").join(&name)), - ); - - let mut class_data: HashMap = HashMap::new(); +fn skipped_default() -> bool { + false +} - for (class_name, selectors) in config.unsafe_.safe_methods { - let data = class_data.entry(class_name).or_default(); - for sel in selectors { - data.selector_data.entry(sel).or_default().safe = true; - } +impl Default for MethodData { + fn default() -> Self { + Self { + unsafe_: unsafe_default(), + skipped: skipped_default(), } + } +} - for (class_name, selectors) in config.skipped.methods { - let data = class_data.entry(class_name).or_default(); - for sel in selectors { - data.selector_data.entry(sel).or_default().skipped = true; - } - } +impl Config { + pub fn from_file(file: &Path) -> Result { + let s = fs::read_to_string(file)?; - Ok(Self { - name, - headers, - output, - class_data, - }) + Ok(toml::from_str(&s)?) } } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index ba871ab39..a6e7e8b2a 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -153,6 +153,8 @@ fn main() { // } // } + let output_path = Path::new("icrate/src/generated/Foundation"); + let config = dbg!(Config::from_file(Path::new("icrate/src/Foundation.toml")).unwrap()); let mut declared: Vec<(Ident, HashSet)> = Vec::new(); @@ -173,9 +175,7 @@ fn main() { // println!("{}\n\n\n\n", res); - let mut path = config - .output - .join(path.file_name().expect("header file name")); + let mut path = output_path.join(path.file_name().expect("header file name")); path.set_extension("rs"); // truncate if the file exists @@ -201,7 +201,7 @@ fn main() { }; // truncate if the file exists - fs::write(config.output.join("mod.rs"), run_rustfmt(mod_tokens)).unwrap(); + fs::write(output_path.join("mod.rs"), run_rustfmt(mod_tokens)).unwrap(); // } // } diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 6630cdb1d..32ad07f4e 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -57,6 +57,7 @@ impl MemoryManagement { #[derive(Debug, Clone)] pub struct Method { selector: String, + fn_name: String, availability: Availability, is_class_method: bool, is_optional_protocol_method: bool, @@ -73,12 +74,13 @@ impl Method { pub fn parse(entity: Entity<'_>, class_data: Option<&ClassData>) -> Option { // println!("Method {:?}", entity.get_display_name()); let selector = entity.get_name().expect("method selector"); + let fn_name = selector.trim_end_matches(|c| c == ':').replace(':', "_"); let data = class_data .map(|class_data| { class_data - .selector_data - .get(&selector) + .methods + .get(&fn_name) .copied() .unwrap_or_default() }) @@ -218,6 +220,7 @@ impl Method { Some(Self { selector, + fn_name, availability, is_class_method, is_optional_protocol_method: entity.is_objc_optional(), @@ -225,22 +228,14 @@ impl Method { designated_initializer, arguments, result_type, - safe: data.safe, + safe: !data.unsafe_, }) } } impl ToTokens for Method { fn to_tokens(&self, tokens: &mut TokenStream) { - let fn_name = format_ident!( - "{}", - handle_reserved( - &self - .selector - .trim_end_matches(|c| c == ':') - .replace(':', "_") - ) - ); + let fn_name = format_ident!("{}", handle_reserved(&self.fn_name)); let arguments: Vec<_> = self .arguments diff --git a/crates/icrate/src/Foundation.toml b/crates/icrate/src/Foundation.toml index 4580a3abf..b2f2d3d63 100644 --- a/crates/icrate/src/Foundation.toml +++ b/crates/icrate/src/Foundation.toml @@ -1,38 +1,24 @@ -name = "Foundation" -headers = ["Foundation.h"] -output = "generated/Foundation" +[class.NSObject.methods] +# Uses NS_REPLACES_RECEIVER +awakeAfterUsingCoder = { skipped = true } -[unsafe.safe-methods] -NSString = [ - "new", - # Assuming that (non-)nullability is properly set - "stringByAppendingString:", - "stringByAppendingPathComponent:", - # Assuming `NSStringEncoding` can be made safe - "lengthOfBytesUsingEncoding:", - "length", - # Safe to call, but the returned pointer may not be safe to use - "UTF8String", -] -NSMutableString = [ - "new", - "initWithString:", - # "appendString:", - # "setString:", -] +[class.NSKeyedUnarchiverDelegate.methods] +# Uses NS_RELEASES_ARGUMENT and NS_RETURNS_RETAINED +unarchiver_didDecodeObject = { skipped = true } -[mutating-methods] -NSMutableString = [ - # "appendString:", - # "setString:", -] +[class.NSString.methods] +new = { unsafe = false } +# Assuming that (non-)nullability is properly set +stringByAppendingString = { unsafe = false } +stringByAppendingPathComponent = { unsafe = false } +# Assuming `NSStringEncoding` can be made safe +lengthOfBytesUsingEncoding = { unsafe = false } +length = { unsafe = false } +# Safe to call, but the returned pointer may not be safe to use +UTF8String = { unsafe = false } -[skipped.methods] -NSKeyedUnarchiverDelegate = [ - # Uses NS_RELEASES_ARGUMENT and NS_RETURNS_RETAINED - "unarchiver:didDecodeObject:", -] -NSObject = [ - # Uses NS_REPLACES_RECEIVER - "awakeAfterUsingCoder:", -] +[class.NSMutableString.methods] +new = { unsafe = false } +initWithString = { unsafe = false } +# "appendString:" = { unsafe = false, mutable = true } +# "setString:" = { unsafe = false, mutable = true } From 3cd224ae402f5c88917d43f6abd0fec99150aa30 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 17:25:58 +0200 Subject: [PATCH 042/131] Small fixes --- crates/header-translator/src/rust_type.rs | 60 +++++++++++-------- crates/icrate/src/Foundation.toml | 4 ++ .../src/generated/Foundation/NSOperation.rs | 5 +- .../src/generated/Foundation/NSXMLNode.rs | 2 +- 4 files changed, 40 insertions(+), 31 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 87b903d8b..42ec77491 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -93,30 +93,39 @@ impl RustType { } } + pub fn parse_attributed(ty: &mut Type<'_>, nullability: &mut Nullability, kindof: &mut bool) { + while ty.get_kind() == TypeKind::Attributed { + match ( + ty.get_display_name().starts_with("__kindof"), + ty.get_nullability(), + ) { + (false, Some(new)) => { + *nullability = match (*nullability, new) { + (Nullability::NonNull, Nullability::Nullable) => Nullability::Nullable, + (Nullability::NonNull, _) => Nullability::NonNull, + (Nullability::Nullable, _) => Nullability::Nullable, + (Nullability::Unspecified, new) => new, + } + } + (true, None) => *kindof = true, + _ => panic!("invalid attributed type: {:?}", ty), + } + *ty = ty + .get_modified_type() + .expect("attributed type to have modified type"); + } + } + pub fn parse(mut ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { use TypeKind::*; // println!("{:?}, {:?}", ty, ty.get_class_type()); let mut nullability = Nullability::Unspecified; - let mut kind = ty.get_kind(); - while kind == Attributed { - let new = ty - .get_nullability() - .expect("attributed type to have nullability"); - nullability = match (nullability, new) { - (Nullability::NonNull, Nullability::Nullable) => Nullability::Nullable, - (Nullability::NonNull, _) => Nullability::NonNull, - (Nullability::Nullable, _) => Nullability::Nullable, - (Nullability::Unspecified, new) => new, - }; - ty = ty - .get_modified_type() - .expect("attributed type to have modified type"); - kind = ty.get_kind(); - } + let mut kindof = false; + Self::parse_attributed(&mut ty, &mut nullability, &mut kindof); - match kind { + match ty.get_kind() { Void => Self::Void, Bool => Self::C99Bool, CharS | CharU => Self::Char, @@ -153,7 +162,8 @@ impl RustType { } } ObjCObjectPointer => { - let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + let mut ty = ty.get_pointee_type().expect("pointer type to have pointee"); + Self::parse_attributed(&mut ty, &mut nullability, &mut kindof); match ty.get_kind() { ObjCInterface => { let generics = ty.get_objc_type_arguments(); @@ -172,18 +182,19 @@ impl RustType { let generics = ty .get_objc_type_arguments() .into_iter() - .map(|ty| { - match Self::parse(ty, false, false) { + .map(|param| { + match Self::parse(param, false, false) { Self::Id { name, generics, is_return, nullability, } => name, - // TODO: Handle these two better + // TODO: Handle this better Self::Class { nullability } => "TodoClass".to_string(), - Self::TypeDef { name } => "TodoTypedef".to_string(), - ty => panic!("invalid {:?}", ty), + param => { + panic!("invalid generic parameter {:?} in {:?}", param, ty) + } } }) .collect(); @@ -198,9 +209,6 @@ impl RustType { nullability, } } - Attributed => Self::TypeDef { - name: "TodoAttributed".to_string(), - }, _ => panic!("pointee was not objcinterface: {:?}", ty), } } diff --git a/crates/icrate/src/Foundation.toml b/crates/icrate/src/Foundation.toml index b2f2d3d63..418379d44 100644 --- a/crates/icrate/src/Foundation.toml +++ b/crates/icrate/src/Foundation.toml @@ -22,3 +22,7 @@ new = { unsafe = false } initWithString = { unsafe = false } # "appendString:" = { unsafe = false, mutable = true } # "setString:" = { unsafe = false, mutable = true } + +[class.NSBlockOperation.methods] +# Uses `NSArray`, which is difficult to handle +executionBlocks = { skipped = true } diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 612450a48..93ccb95f3 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -101,9 +101,6 @@ impl NSBlockOperation { pub unsafe fn addExecutionBlock(&self, block: TodoBlock) { msg_send![self, addExecutionBlock: block] } - pub unsafe fn executionBlocks(&self) -> Id, Shared> { - msg_send_id![self, executionBlocks] - } } extern_class!( #[derive(Debug)] @@ -202,7 +199,7 @@ impl NSOperationQueue { } #[doc = "NSDeprecated"] impl NSOperationQueue { - pub unsafe fn operations(&self) -> Id, Shared> { + pub unsafe fn operations(&self) -> Id, Shared> { msg_send_id![self, operations] } pub unsafe fn operationCount(&self) -> NSUInteger { diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 3c63b347c..96dcb7473 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -144,7 +144,7 @@ impl NSXMLNode { &self, xpath: &NSString, error: *mut *mut NSError, - ) -> Option, Shared>> { + ) -> Option, Shared>> { msg_send_id![self, nodesForXPath: xpath, error: error] } pub unsafe fn objectsForXQuery_constants_error( From fc07a0cb3049fd07eda8c90c7546aa899d2315da Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 17:37:12 +0200 Subject: [PATCH 043/131] Support nested generics --- crates/header-translator/src/rust_type.rs | 73 +++++++++++-------- .../src/generated/Foundation/NSAppleScript.rs | 11 ++- .../Foundation/NSLinguisticTagger.rs | 10 +-- .../src/generated/Foundation/NSMetadata.rs | 4 +- .../NSOrderedCollectionDifference.rs | 8 +- .../src/generated/Foundation/NSOrthography.rs | 6 +- .../Foundation/NSTextCheckingResult.rs | 6 +- .../Foundation/NSURLCredentialStorage.rs | 3 +- 8 files changed, 72 insertions(+), 49 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 42ec77491..b6bb98e1f 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -2,6 +2,20 @@ use clang::{Nullability, Type, TypeKind}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct GenericType { + pub name: String, + pub generics: Vec, +} + +impl ToTokens for GenericType { + fn to_tokens(&self, tokens: &mut TokenStream) { + let name = format_ident!("{}", self.name); + let generics = &self.generics; + tokens.append_all(quote!(#name <#(#generics),*>)); + } +} + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum RustType { // Primitives @@ -23,8 +37,7 @@ pub enum RustType { // Objective-C Id { - name: String, - generics: Vec, + type_: GenericType, is_return: bool, nullability: Nullability, }, @@ -142,8 +155,10 @@ impl RustType { Float => Self::Float, Double => Self::Double, ObjCId => Self::Id { - name: "Object".to_string(), - generics: Vec::new(), + type_: GenericType { + name: "Object".to_string(), + generics: Vec::new(), + }, is_return, nullability, }, @@ -172,8 +187,10 @@ impl RustType { } let name = ty.get_display_name(); Self::Id { - name, - generics: Vec::new(), + type_: GenericType { + name, + generics: Vec::new(), + }, is_return, nullability, } @@ -185,13 +202,15 @@ impl RustType { .map(|param| { match Self::parse(param, false, false) { Self::Id { - name, - generics, + type_, is_return, nullability, - } => name, + } => type_, // TODO: Handle this better - Self::Class { nullability } => "TodoClass".to_string(), + Self::Class { nullability } => GenericType { + name: "TodoClass".to_string(), + generics: Vec::new(), + }, param => { panic!("invalid generic parameter {:?} in {:?}", param, ty) } @@ -203,8 +222,7 @@ impl RustType { .expect("object to have base type"); let name = base_ty.get_display_name(); Self::Id { - name, - generics, + type_: GenericType { name, generics }, is_return, nullability, } @@ -221,8 +239,10 @@ impl RustType { panic!("instancetype in non-return position") } Self::Id { - name: "Self".to_string(), - generics: Vec::new(), + type_: GenericType { + name: "Self".to_string(), + generics: Vec::new(), + }, is_return, nullability, } @@ -234,8 +254,10 @@ impl RustType { panic!("not empty: {:?}, {:?}", ty, generics); } Self::Id { - name: typedef_name, - generics: Vec::new(), + type_: GenericType { + name: typedef_name, + generics: Vec::new(), + }, is_return, nullability, } @@ -298,18 +320,14 @@ impl ToTokens for RustType { // Objective-C Id { - name, - generics, + type_, is_return, nullability, } => { - let tokens = format_ident!("{}", name); - let generics = generics.iter().map(|param| format_ident!("{}", param)); - let tokens = quote!(#tokens <#(#generics),*>); let tokens = if *is_return { - quote!(Id<#tokens, Shared>) + quote!(Id<#type_, Shared>) } else { - quote!(&#tokens) + quote!(&#type_) }; if *nullability == Nullability::NonNull { tokens @@ -341,18 +359,15 @@ impl ToTokens for RustType { } => { let tokens = match &**pointee { Self::Id { - name, - generics, + type_, is_return, nullability, } => { - let name = format_ident!("{}", name); - let generics = generics.iter().map(|param| format_ident!("{}", param)); if *nullability == Nullability::NonNull { - quote!(NonNull<#name <#(#generics),*>>) + quote!(NonNull<#type_>) } else { // TODO: const? - quote!(*mut #name) + quote!(*mut #type_) } } pointee => quote!(#pointee), diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index 57100819f..873174e0b 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -18,26 +18,29 @@ impl NSAppleScript { pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, - errorInfo: *mut *mut NSDictionary, + errorInfo: *mut *mut NSDictionary, ) -> Option> { msg_send_id![self, initWithContentsOfURL: url, error: errorInfo] } pub unsafe fn initWithSource(&self, source: &NSString) -> Option> { msg_send_id![self, initWithSource: source] } - pub unsafe fn compileAndReturnError(&self, errorInfo: *mut *mut NSDictionary) -> bool { + pub unsafe fn compileAndReturnError( + &self, + errorInfo: *mut *mut NSDictionary, + ) -> bool { msg_send![self, compileAndReturnError: errorInfo] } pub unsafe fn executeAndReturnError( &self, - errorInfo: *mut *mut NSDictionary, + errorInfo: *mut *mut NSDictionary, ) -> Id { msg_send_id![self, executeAndReturnError: errorInfo] } pub unsafe fn executeAppleEvent_error( &self, event: &NSAppleEventDescriptor, - errorInfo: *mut *mut NSDictionary, + errorInfo: *mut *mut NSDictionary, ) -> Id { msg_send_id![self, executeAppleEvent: event, error: errorInfo] } diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index a00282add..6cae856b7 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -104,7 +104,7 @@ impl NSLinguisticTagger { unit: NSLinguisticTaggerUnit, scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, - tokenRanges: *mut *mut NSArray, + tokenRanges: *mut *mut NSArray, ) -> Id, Shared> { msg_send_id![ self, @@ -150,7 +150,7 @@ impl NSLinguisticTagger { range: NSRange, tagScheme: &NSString, opts: NSLinguisticTaggerOptions, - tokenRanges: *mut *mut NSArray, + tokenRanges: *mut *mut NSArray, ) -> Id, Shared> { msg_send_id![ self, @@ -188,7 +188,7 @@ impl NSLinguisticTagger { scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, - tokenRanges: *mut *mut NSArray, + tokenRanges: *mut *mut NSArray, ) -> Id, Shared> { msg_send_id![ Self::class(), @@ -227,7 +227,7 @@ impl NSLinguisticTagger { tagScheme: &NSString, tokenRange: NSRangePointer, sentenceRange: NSRangePointer, - scores: *mut *mut NSArray, + scores: *mut *mut NSArray, ) -> Option, Shared>> { msg_send_id![ self, @@ -259,7 +259,7 @@ impl NSString { scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, - tokenRanges: *mut *mut NSArray, + tokenRanges: *mut *mut NSArray, ) -> Id, Shared> { msg_send_id![ self, diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 5ff1659a9..70e035a13 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -131,7 +131,9 @@ impl NSMetadataQuery { pub unsafe fn results(&self) -> Id { msg_send_id![self, results] } - pub unsafe fn valueLists(&self) -> Id, Shared> { + pub unsafe fn valueLists( + &self, + ) -> Id>, Shared> { msg_send_id![self, valueLists] } pub unsafe fn groupedResults(&self) -> Id, Shared> { diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 8da46cf08..0f964237d 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -16,7 +16,7 @@ __inner_extern_class!( impl NSOrderedCollectionDifference { pub unsafe fn initWithChanges( &self, - changes: &NSArray, + changes: &NSArray>, ) -> Id { msg_send_id![self, initWithChanges: changes] } @@ -26,7 +26,7 @@ impl NSOrderedCollectionDifference { insertedObjects: Option<&NSArray>, removes: &NSIndexSet, removedObjects: Option<&NSArray>, - changes: &NSArray, + changes: &NSArray>, ) -> Id { msg_send_id![ self, @@ -61,10 +61,10 @@ impl NSOrderedCollectionDifference { pub unsafe fn inverseDifference(&self) -> Id { msg_send_id![self, inverseDifference] } - pub unsafe fn insertions(&self) -> Id, Shared> { + pub unsafe fn insertions(&self) -> Id>, Shared> { msg_send_id![self, insertions] } - pub unsafe fn removals(&self) -> Id, Shared> { + pub unsafe fn removals(&self) -> Id>, Shared> { msg_send_id![self, removals] } pub unsafe fn hasChanges(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index c855d1f9d..9b9d11665 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -17,7 +17,7 @@ impl NSOrthography { pub unsafe fn initWithDominantScript_languageMap( &self, script: &NSString, - map: &NSDictionary, + map: &NSDictionary>, ) -> Id { msg_send_id![self, initWithDominantScript: script, languageMap: map] } @@ -27,7 +27,7 @@ impl NSOrthography { pub unsafe fn dominantScript(&self) -> Id { msg_send_id![self, dominantScript] } - pub unsafe fn languageMap(&self) -> Id, Shared> { + pub unsafe fn languageMap(&self) -> Id>, Shared> { msg_send_id![self, languageMap] } } @@ -62,7 +62,7 @@ impl NSOrthography { impl NSOrthography { pub unsafe fn orthographyWithDominantScript_languageMap( script: &NSString, - map: &NSDictionary, + map: &NSDictionary>, ) -> Id { msg_send_id![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 0303b776f..93d852ff5 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -46,7 +46,9 @@ impl NSTextCheckingResult { pub unsafe fn orthography(&self) -> Option> { msg_send_id![self, orthography] } - pub unsafe fn grammarDetails(&self) -> Option, Shared>> { + pub unsafe fn grammarDetails( + &self, + ) -> Option>, Shared>> { msg_send_id![self, grammarDetails] } pub unsafe fn date(&self) -> Option> { @@ -104,7 +106,7 @@ impl NSTextCheckingResult { } pub unsafe fn grammarCheckingResultWithRange_details( range: NSRange, - details: &NSArray, + details: &NSArray>, ) -> Id { msg_send_id![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 06f93fa7a..027548385 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -77,7 +77,8 @@ impl NSURLCredentialStorage { } pub unsafe fn allCredentials( &self, - ) -> Id, Shared> { + ) -> Id>, Shared> + { msg_send_id![self, allCredentials] } } From 2b181beb6fe9cf636a211d87f94956b1c365caec Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 17:41:03 +0200 Subject: [PATCH 044/131] Comment out a bit of debug logging --- crates/header-translator/src/stmt.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index b5ff20759..5251100d4 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -110,7 +110,7 @@ impl Stmt { superclass = Some(None); } EntityKind::ObjCClassRef => { - println!("ObjCClassRef: {:?}", entity.get_display_name()); + // println!("ObjCClassRef: {:?}", entity.get_display_name()); } EntityKind::ObjCProtocolRef => { protocols.push(entity.get_name().expect("protocolref to have name")); @@ -195,12 +195,12 @@ impl Stmt { } } EntityKind::ObjCPropertyDecl => { - println!( - "Property {:?}, {:?}, {:?}", - class_name, - entity.get_display_name(), - entity.get_objc_attributes(), - ); + // println!( + // "Property {:?}, {:?}, {:?}", + // class_name, + // entity.get_display_name(), + // entity.get_objc_attributes(), + // ); // methods.push(quote! {}); } EntityKind::TemplateTypeParameter => { From 0cd5ee879fc1397a951aee64b8fdc2314a1b6238 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 17:56:13 +0200 Subject: [PATCH 045/131] Emit all files --- crates/header-translator/src/main.rs | 15 ++- .../generated/Foundation/FoundationErrors.rs | 6 ++ .../FoundationLegacySwiftCompatibility.rs | 5 + .../src/generated/Foundation/NSByteOrder.rs | 6 ++ .../src/generated/Foundation/NSDecimal.rs | 6 ++ .../src/generated/Foundation/NSGeometry.rs | 78 ++++++++++++++++ .../generated/Foundation/NSHFSFileTypes.rs | 7 ++ .../Foundation/NSMetadataAttributes.rs | 6 ++ .../generated/Foundation/NSObjectScripting.rs | 54 +++++++++++ .../generated/Foundation/NSPathUtilities.rs | 91 +++++++++++++++++++ .../src/generated/Foundation/NSRange.rs | 16 ++++ .../Foundation/NSScriptKeyValueCoding.rs | 69 ++++++++++++++ .../src/generated/Foundation/NSURLError.rs | 8 ++ .../generated/Foundation/NSXMLNodeOptions.rs | 5 + .../icrate/src/generated/Foundation/NSZone.rs | 7 ++ crates/icrate/src/generated/Foundation/mod.rs | 14 +++ 16 files changed, 385 insertions(+), 8 deletions(-) create mode 100644 crates/icrate/src/generated/Foundation/FoundationErrors.rs create mode 100644 crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs create mode 100644 crates/icrate/src/generated/Foundation/NSByteOrder.rs create mode 100644 crates/icrate/src/generated/Foundation/NSDecimal.rs create mode 100644 crates/icrate/src/generated/Foundation/NSGeometry.rs create mode 100644 crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs create mode 100644 crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs create mode 100644 crates/icrate/src/generated/Foundation/NSObjectScripting.rs create mode 100644 crates/icrate/src/generated/Foundation/NSPathUtilities.rs create mode 100644 crates/icrate/src/generated/Foundation/NSRange.rs create mode 100644 crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs create mode 100644 crates/icrate/src/generated/Foundation/NSURLError.rs create mode 100644 crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs create mode 100644 crates/icrate/src/generated/Foundation/NSZone.rs diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index a6e7e8b2a..0e07548fc 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -166,11 +166,6 @@ fn main() { let (declared_types, tokens) = create_rust_file(&res, &config); - if declared_types.is_empty() { - // Skip files that don't declare anything - continue; - } - let formatted = run_rustfmt(tokens); // println!("{}\n\n\n\n", res); @@ -187,9 +182,13 @@ fn main() { } let mod_names = declared.iter().map(|(name, _)| name); - let mod_imports = declared.iter().map(|(name, declared_types)| { - let declared_types = declared_types.iter().map(|name| format_ident!("{}", name)); - quote!(super::#name::{#(#declared_types,)*}) + let mod_imports = declared.iter().filter_map(|(name, declared_types)| { + if !declared_types.is_empty() { + let declared_types = declared_types.iter().map(|name| format_ident!("{}", name)); + Some(quote!(super::#name::{#(#declared_types,)*})) + } else { + None + } }); let mut mod_tokens = quote! { diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs new file mode 100644 index 000000000..dbd322108 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -0,0 +1,6 @@ +use crate::Foundation::generated::NSError::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs new file mode 100644 index 000000000..b795ad452 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs @@ -0,0 +1,5 @@ +use crate::Foundation::generated::NSObjCRuntime::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs new file mode 100644 index 000000000..b2988d2a8 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -0,0 +1,6 @@ +use crate::CoreFoundation::generated::CFByteOrder::*; +use crate::Foundation::generated::NSObjCRuntime::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs new file mode 100644 index 000000000..d7e9fc12f --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -0,0 +1,6 @@ +use super::__exported::NSDictionary; +use crate::Foundation::generated::NSObjCRuntime::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs new file mode 100644 index 000000000..f3faf983a --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -0,0 +1,78 @@ +use super::__exported::NSString; +use crate::CoreGraphics::generated::CGBase::*; +use crate::CoreGraphics::generated::CGGeometry::*; +use crate::Foundation::generated::NSCoder::*; +use crate::Foundation::generated::NSValue::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +#[doc = "NSValueGeometryExtensions"] +impl NSValue { + pub unsafe fn valueWithPoint(point: NSPoint) -> Id { + msg_send_id![Self::class(), valueWithPoint: point] + } + pub unsafe fn valueWithSize(size: NSSize) -> Id { + msg_send_id![Self::class(), valueWithSize: size] + } + pub unsafe fn valueWithRect(rect: NSRect) -> Id { + msg_send_id![Self::class(), valueWithRect: rect] + } + pub unsafe fn valueWithEdgeInsets(insets: NSEdgeInsets) -> Id { + msg_send_id![Self::class(), valueWithEdgeInsets: insets] + } + pub unsafe fn pointValue(&self) -> NSPoint { + msg_send![self, pointValue] + } + pub unsafe fn sizeValue(&self) -> NSSize { + msg_send![self, sizeValue] + } + pub unsafe fn rectValue(&self) -> NSRect { + msg_send![self, rectValue] + } + pub unsafe fn edgeInsetsValue(&self) -> NSEdgeInsets { + msg_send![self, edgeInsetsValue] + } +} +#[doc = "NSGeometryCoding"] +impl NSCoder { + pub unsafe fn encodePoint(&self, point: NSPoint) { + msg_send![self, encodePoint: point] + } + pub unsafe fn decodePoint(&self) -> NSPoint { + msg_send![self, decodePoint] + } + pub unsafe fn encodeSize(&self, size: NSSize) { + msg_send![self, encodeSize: size] + } + pub unsafe fn decodeSize(&self) -> NSSize { + msg_send![self, decodeSize] + } + pub unsafe fn encodeRect(&self, rect: NSRect) { + msg_send![self, encodeRect: rect] + } + pub unsafe fn decodeRect(&self) -> NSRect { + msg_send![self, decodeRect] + } +} +#[doc = "NSGeometryKeyedCoding"] +impl NSCoder { + pub unsafe fn encodePoint_forKey(&self, point: NSPoint, key: &NSString) { + msg_send![self, encodePoint: point, forKey: key] + } + pub unsafe fn encodeSize_forKey(&self, size: NSSize, key: &NSString) { + msg_send![self, encodeSize: size, forKey: key] + } + pub unsafe fn encodeRect_forKey(&self, rect: NSRect, key: &NSString) { + msg_send![self, encodeRect: rect, forKey: key] + } + pub unsafe fn decodePointForKey(&self, key: &NSString) -> NSPoint { + msg_send![self, decodePointForKey: key] + } + pub unsafe fn decodeSizeForKey(&self, key: &NSString) -> NSSize { + msg_send![self, decodeSizeForKey: key] + } + pub unsafe fn decodeRectForKey(&self, key: &NSString) -> NSRect { + msg_send![self, decodeRectForKey: key] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs new file mode 100644 index 000000000..aeb9dcf24 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs @@ -0,0 +1,7 @@ +use super::__exported::NSString; +use crate::CoreFoundation::generated::CFBase::*; +use crate::Foundation::generated::NSObjCRuntime::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs new file mode 100644 index 000000000..52f499a6d --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -0,0 +1,6 @@ +use super::__exported::NSString; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs new file mode 100644 index 000000000..e54174c68 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -0,0 +1,54 @@ +use super::__exported::NSDictionary; +use super::__exported::NSScriptObjectSpecifier; +use super::__exported::NSString; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +#[doc = "NSScripting"] +impl NSObject { + pub unsafe fn scriptingValueForSpecifier( + &self, + objectSpecifier: &NSScriptObjectSpecifier, + ) -> Option> { + msg_send_id![self, scriptingValueForSpecifier: objectSpecifier] + } + pub unsafe fn copyScriptingValue_forKey_withProperties( + &self, + value: &Object, + key: &NSString, + properties: &NSDictionary, + ) -> Option> { + msg_send_id![ + self, + copyScriptingValue: value, + forKey: key, + withProperties: properties + ] + } + pub unsafe fn newScriptingObjectOfClass_forValueForKey_withContentsValue_properties( + &self, + objectClass: &Class, + key: &NSString, + contentsValue: Option<&Object>, + properties: &NSDictionary, + ) -> Option> { + msg_send_id![ + self, + newScriptingObjectOfClass: objectClass, + forValueForKey: key, + withContentsValue: contentsValue, + properties: properties + ] + } + pub unsafe fn scriptingProperties(&self) -> Option, Shared>> { + msg_send_id![self, scriptingProperties] + } + pub unsafe fn setScriptingProperties( + &self, + scriptingProperties: Option<&NSDictionary>, + ) { + msg_send![self, setScriptingProperties: scriptingProperties] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs new file mode 100644 index 000000000..df0f014a3 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -0,0 +1,91 @@ +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +#[doc = "NSStringPathExtensions"] +impl NSString { + pub unsafe fn pathWithComponents(components: &NSArray) -> Id { + msg_send_id![Self::class(), pathWithComponents: components] + } + pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id { + msg_send_id![self, stringByAppendingPathComponent: str] + } + pub unsafe fn stringByAppendingPathExtension( + &self, + str: &NSString, + ) -> Option> { + msg_send_id![self, stringByAppendingPathExtension: str] + } + pub unsafe fn stringsByAppendingPaths( + &self, + paths: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, stringsByAppendingPaths: paths] + } + pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( + &self, + outputName: *mut *mut NSString, + flag: bool, + outputArray: *mut *mut NSArray, + filterTypes: Option<&NSArray>, + ) -> NSUInteger { + msg_send![ + self, + completePathIntoString: outputName, + caseSensitive: flag, + matchesIntoArray: outputArray, + filterTypes: filterTypes + ] + } + pub unsafe fn getFileSystemRepresentation_maxLength( + &self, + cname: NonNull, + max: NSUInteger, + ) -> bool { + msg_send![self, getFileSystemRepresentation: cname, maxLength: max] + } + pub unsafe fn pathComponents(&self) -> Id, Shared> { + msg_send_id![self, pathComponents] + } + pub unsafe fn isAbsolutePath(&self) -> bool { + msg_send![self, isAbsolutePath] + } + pub unsafe fn lastPathComponent(&self) -> Id { + msg_send_id![self, lastPathComponent] + } + pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id { + msg_send_id![self, stringByDeletingLastPathComponent] + } + pub unsafe fn pathExtension(&self) -> Id { + msg_send_id![self, pathExtension] + } + pub unsafe fn stringByDeletingPathExtension(&self) -> Id { + msg_send_id![self, stringByDeletingPathExtension] + } + pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id { + msg_send_id![self, stringByAbbreviatingWithTildeInPath] + } + pub unsafe fn stringByExpandingTildeInPath(&self) -> Id { + msg_send_id![self, stringByExpandingTildeInPath] + } + pub unsafe fn stringByStandardizingPath(&self) -> Id { + msg_send_id![self, stringByStandardizingPath] + } + pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id { + msg_send_id![self, stringByResolvingSymlinksInPath] + } + pub unsafe fn fileSystemRepresentation(&self) -> NonNull { + msg_send![self, fileSystemRepresentation] + } +} +#[doc = "NSArrayPathExtensions"] +impl NSArray { + pub unsafe fn pathsMatchingExtensions( + &self, + filterTypes: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, pathsMatchingExtensions: filterTypes] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs new file mode 100644 index 000000000..f7b3021e1 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -0,0 +1,16 @@ +use super::__exported::NSString; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSValue::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +#[doc = "NSValueRangeExtensions"] +impl NSValue { + pub unsafe fn valueWithRange(range: NSRange) -> Id { + msg_send_id![Self::class(), valueWithRange: range] + } + pub unsafe fn rangeValue(&self) -> NSRange { + msg_send![self, rangeValue] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs new file mode 100644 index 000000000..e4a7e1c12 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -0,0 +1,69 @@ +use super::__exported::NSString; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +#[doc = "NSScriptKeyValueCoding"] +impl NSObject { + pub unsafe fn valueAtIndex_inPropertyWithKey( + &self, + index: NSUInteger, + key: &NSString, + ) -> Option> { + msg_send_id![self, valueAtIndex: index, inPropertyWithKey: key] + } + pub unsafe fn valueWithName_inPropertyWithKey( + &self, + name: &NSString, + key: &NSString, + ) -> Option> { + msg_send_id![self, valueWithName: name, inPropertyWithKey: key] + } + pub unsafe fn valueWithUniqueID_inPropertyWithKey( + &self, + uniqueID: &Object, + key: &NSString, + ) -> Option> { + msg_send_id![self, valueWithUniqueID: uniqueID, inPropertyWithKey: key] + } + pub unsafe fn insertValue_atIndex_inPropertyWithKey( + &self, + value: &Object, + index: NSUInteger, + key: &NSString, + ) { + msg_send![ + self, + insertValue: value, + atIndex: index, + inPropertyWithKey: key + ] + } + pub unsafe fn removeValueAtIndex_fromPropertyWithKey(&self, index: NSUInteger, key: &NSString) { + msg_send![self, removeValueAtIndex: index, fromPropertyWithKey: key] + } + pub unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue( + &self, + index: NSUInteger, + key: &NSString, + value: &Object, + ) { + msg_send![ + self, + replaceValueAtIndex: index, + inPropertyWithKey: key, + withValue: value + ] + } + pub unsafe fn insertValue_inPropertyWithKey(&self, value: &Object, key: &NSString) { + msg_send![self, insertValue: value, inPropertyWithKey: key] + } + pub unsafe fn coerceValue_forKey( + &self, + value: Option<&Object>, + key: &NSString, + ) -> Option> { + msg_send_id![self, coerceValue: value, forKey: key] + } +} diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs new file mode 100644 index 000000000..e751036f7 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -0,0 +1,8 @@ +use super::__exported::NSString; +use crate::CoreServices::generated::CoreServices::*; +use crate::Foundation::generated::NSError::*; +use crate::Foundation::generated::NSObjCRuntime::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs new file mode 100644 index 000000000..b795ad452 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -0,0 +1,5 @@ +use crate::Foundation::generated::NSObjCRuntime::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs new file mode 100644 index 000000000..aeb9dcf24 --- /dev/null +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -0,0 +1,7 @@ +use super::__exported::NSString; +use crate::CoreFoundation::generated::CFBase::*; +use crate::Foundation::generated::NSObjCRuntime::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 33179487b..5478035af 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -1,3 +1,5 @@ +pub(crate) mod FoundationErrors; +pub(crate) mod FoundationLegacySwiftCompatibility; pub(crate) mod NSAffineTransform; pub(crate) mod NSAppleEventDescriptor; pub(crate) mod NSAppleEventManager; @@ -9,6 +11,7 @@ pub(crate) mod NSAutoreleasePool; pub(crate) mod NSBackgroundActivityScheduler; pub(crate) mod NSBundle; pub(crate) mod NSByteCountFormatter; +pub(crate) mod NSByteOrder; pub(crate) mod NSCache; pub(crate) mod NSCalendar; pub(crate) mod NSCalendarDate; @@ -24,6 +27,7 @@ pub(crate) mod NSDateComponentsFormatter; pub(crate) mod NSDateFormatter; pub(crate) mod NSDateInterval; pub(crate) mod NSDateIntervalFormatter; +pub(crate) mod NSDecimal; pub(crate) mod NSDecimalNumber; pub(crate) mod NSDictionary; pub(crate) mod NSDistantObject; @@ -45,6 +49,8 @@ pub(crate) mod NSFileVersion; pub(crate) mod NSFileWrapper; pub(crate) mod NSFormatter; pub(crate) mod NSGarbageCollector; +pub(crate) mod NSGeometry; +pub(crate) mod NSHFSFileTypes; pub(crate) mod NSHTTPCookie; pub(crate) mod NSHTTPCookieStorage; pub(crate) mod NSHashTable; @@ -69,6 +75,7 @@ pub(crate) mod NSMassFormatter; pub(crate) mod NSMeasurement; pub(crate) mod NSMeasurementFormatter; pub(crate) mod NSMetadata; +pub(crate) mod NSMetadataAttributes; pub(crate) mod NSMethodSignature; pub(crate) mod NSMorphology; pub(crate) mod NSNetServices; @@ -78,11 +85,13 @@ pub(crate) mod NSNull; pub(crate) mod NSNumberFormatter; pub(crate) mod NSObjCRuntime; pub(crate) mod NSObject; +pub(crate) mod NSObjectScripting; pub(crate) mod NSOperation; pub(crate) mod NSOrderedCollectionChange; pub(crate) mod NSOrderedCollectionDifference; pub(crate) mod NSOrderedSet; pub(crate) mod NSOrthography; +pub(crate) mod NSPathUtilities; pub(crate) mod NSPersonNameComponents; pub(crate) mod NSPersonNameComponentsFormatter; pub(crate) mod NSPointerArray; @@ -97,6 +106,7 @@ pub(crate) mod NSProgress; pub(crate) mod NSPropertyList; pub(crate) mod NSProtocolChecker; pub(crate) mod NSProxy; +pub(crate) mod NSRange; pub(crate) mod NSRegularExpression; pub(crate) mod NSRelativeDateTimeFormatter; pub(crate) mod NSRunLoop; @@ -106,6 +116,7 @@ pub(crate) mod NSScriptCoercionHandler; pub(crate) mod NSScriptCommand; pub(crate) mod NSScriptCommandDescription; pub(crate) mod NSScriptExecutionContext; +pub(crate) mod NSScriptKeyValueCoding; pub(crate) mod NSScriptObjectSpecifiers; pub(crate) mod NSScriptStandardSuiteCommands; pub(crate) mod NSScriptSuiteRegistry; @@ -127,6 +138,7 @@ pub(crate) mod NSURLConnection; pub(crate) mod NSURLCredential; pub(crate) mod NSURLCredentialStorage; pub(crate) mod NSURLDownload; +pub(crate) mod NSURLError; pub(crate) mod NSURLHandle; pub(crate) mod NSURLProtectionSpace; pub(crate) mod NSURLProtocol; @@ -148,8 +160,10 @@ pub(crate) mod NSXMLDTDNode; pub(crate) mod NSXMLDocument; pub(crate) mod NSXMLElement; pub(crate) mod NSXMLNode; +pub(crate) mod NSXMLNodeOptions; pub(crate) mod NSXMLParser; pub(crate) mod NSXPCConnection; +pub(crate) mod NSZone; mod __exported { pub use super::NSAffineTransform::NSAffineTransform; pub use super::NSAppleEventDescriptor::NSAppleEventDescriptor; From 02792f1ed286c44230a97596806dd0e59b2af54f Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 18:09:22 +0200 Subject: [PATCH 046/131] Parse sized integer types --- crates/header-translator/src/rust_type.rs | 24 +++++++++++++++++++ .../generated/Foundation/NSCharacterSet.rs | 2 +- .../src/generated/Foundation/NSCoder.rs | 8 +++---- .../generated/Foundation/NSKeyedArchiver.rs | 8 +++---- .../src/generated/Foundation/NSLocale.rs | 6 ++--- .../icrate/src/generated/Foundation/NSPort.rs | 10 ++++---- .../src/generated/Foundation/NSPortMessage.rs | 4 ++-- .../generated/Foundation/NSPortNameServer.rs | 8 +++---- .../src/generated/Foundation/NSStream.rs | 10 ++++---- 9 files changed, 51 insertions(+), 29 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index b6bb98e1f..d60439994 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -34,6 +34,14 @@ pub enum RustType { ULongLong, Float, Double, + I8, + U8, + I16, + U16, + I32, + U32, + I64, + U64, // Objective-C Id { @@ -234,6 +242,14 @@ impl RustType { let typedef_name = ty.get_typedef_name().expect("typedef has name"); match &*typedef_name { "BOOL" => Self::ObjcBool, + "int8_t" => Self::I8, + "uint8_t" => Self::U8, + "int16_t" => Self::I16, + "uint16_t" => Self::U16, + "int32_t" => Self::I32, + "uint32_t" => Self::U32, + "int164_t" => Self::I64, + "uint64_t" => Self::U64, "instancetype" => { if !is_return { panic!("instancetype in non-return position") @@ -317,6 +333,14 @@ impl ToTokens for RustType { ULongLong => quote!(c_ulonglong), Float => quote!(c_float), Double => quote!(c_double), + I8 => quote!(i8), + U8 => quote!(u8), + I16 => quote!(i16), + U16 => quote!(u16), + I32 => quote!(i32), + U32 => quote!(u32), + I64 => quote!(i64), + U64 => quote!(u64), // Objective-C Id { diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index c5c13f093..f60e3027c 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -45,7 +45,7 @@ impl NSCharacterSet { pub unsafe fn isSupersetOfSet(&self, theOtherSet: &NSCharacterSet) -> bool { msg_send![self, isSupersetOfSet: theOtherSet] } - pub unsafe fn hasMemberInPlane(&self, thePlane: uint8_t) -> bool { + pub unsafe fn hasMemberInPlane(&self, thePlane: u8) -> bool { msg_send![self, hasMemberInPlane: thePlane] } pub unsafe fn controlCharacterSet() -> Id { diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 917a0d405..947dff1e7 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -115,7 +115,7 @@ impl NSCoder { pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString) { msg_send![self, encodeInt: value, forKey: key] } - pub unsafe fn encodeInt32_forKey(&self, value: int32_t, key: &NSString) { + pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString) { msg_send![self, encodeInt32: value, forKey: key] } pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString) { @@ -129,7 +129,7 @@ impl NSCoder { } pub unsafe fn encodeBytes_length_forKey( &self, - bytes: *mut uint8_t, + bytes: *mut u8, length: NSUInteger, key: &NSString, ) { @@ -154,7 +154,7 @@ impl NSCoder { pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int { msg_send![self, decodeIntForKey: key] } - pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> int32_t { + pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32 { msg_send![self, decodeInt32ForKey: key] } pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t { @@ -170,7 +170,7 @@ impl NSCoder { &self, key: &NSString, lengthp: *mut NSUInteger, - ) -> *mut uint8_t { + ) -> *mut u8 { msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] } pub unsafe fn encodeInteger_forKey(&self, value: NSInteger, key: &NSString) { diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index b219d94d0..7144aacfa 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -72,7 +72,7 @@ impl NSKeyedArchiver { pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString) { msg_send![self, encodeInt: value, forKey: key] } - pub unsafe fn encodeInt32_forKey(&self, value: int32_t, key: &NSString) { + pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString) { msg_send![self, encodeInt32: value, forKey: key] } pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString) { @@ -86,7 +86,7 @@ impl NSKeyedArchiver { } pub unsafe fn encodeBytes_length_forKey( &self, - bytes: *mut uint8_t, + bytes: *mut u8, length: NSUInteger, key: &NSString, ) { @@ -254,7 +254,7 @@ impl NSKeyedUnarchiver { pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int { msg_send![self, decodeIntForKey: key] } - pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> int32_t { + pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32 { msg_send![self, decodeInt32ForKey: key] } pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t { @@ -270,7 +270,7 @@ impl NSKeyedUnarchiver { &self, key: &NSString, lengthp: *mut NSUInteger, - ) -> *mut uint8_t { + ) -> *mut u8 { msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] } pub unsafe fn delegate(&self) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 301bffcea..969fff2c3 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -191,12 +191,10 @@ impl NSLocale { pub unsafe fn canonicalLanguageIdentifierFromString(string: &NSString) -> Id { msg_send_id![Self::class(), canonicalLanguageIdentifierFromString: string] } - pub unsafe fn localeIdentifierFromWindowsLocaleCode( - lcid: uint32_t, - ) -> Option> { + pub unsafe fn localeIdentifierFromWindowsLocaleCode(lcid: u32) -> Option> { msg_send_id![Self::class(), localeIdentifierFromWindowsLocaleCode: lcid] } - pub unsafe fn windowsLocaleCodeFromLocaleIdentifier(localeIdentifier: &NSString) -> uint32_t { + pub unsafe fn windowsLocaleCodeFromLocaleIdentifier(localeIdentifier: &NSString) -> u32 { msg_send![ Self::class(), windowsLocaleCodeFromLocaleIdentifier: localeIdentifier diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index ad256ebd8..30ec0bea0 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -106,10 +106,10 @@ extern_class!( } ); impl NSMachPort { - pub unsafe fn portWithMachPort(machPort: uint32_t) -> Id { + pub unsafe fn portWithMachPort(machPort: u32) -> Id { msg_send_id![Self::class(), portWithMachPort: machPort] } - pub unsafe fn initWithMachPort(&self, machPort: uint32_t) -> Id { + pub unsafe fn initWithMachPort(&self, machPort: u32) -> Id { msg_send_id![self, initWithMachPort: machPort] } pub unsafe fn setDelegate(&self, anObject: Option<&id>) { @@ -119,14 +119,14 @@ impl NSMachPort { msg_send_id![self, delegate] } pub unsafe fn portWithMachPort_options( - machPort: uint32_t, + machPort: u32, f: NSMachPortOptions, ) -> Id { msg_send_id![Self::class(), portWithMachPort: machPort, options: f] } pub unsafe fn initWithMachPort_options( &self, - machPort: uint32_t, + machPort: u32, f: NSMachPortOptions, ) -> Id { msg_send_id![self, initWithMachPort: machPort, options: f] @@ -137,7 +137,7 @@ impl NSMachPort { pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: runLoop, forMode: mode] } - pub unsafe fn machPort(&self) -> uint32_t { + pub unsafe fn machPort(&self) -> u32 { msg_send![self, machPort] } } diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index d1bbfe46a..8b679eb6f 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -40,10 +40,10 @@ impl NSPortMessage { pub unsafe fn sendPort(&self) -> Option> { msg_send_id![self, sendPort] } - pub unsafe fn msgid(&self) -> uint32_t { + pub unsafe fn msgid(&self) -> u32 { msg_send![self, msgid] } - pub unsafe fn setMsgid(&self, msgid: uint32_t) { + pub unsafe fn setMsgid(&self, msgid: u32) { msg_send![self, setMsgid: msgid] } } diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index 19e6453aa..c85ae8a5e 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -114,7 +114,7 @@ impl NSSocketPortNameServer { &self, name: &NSString, host: Option<&NSString>, - portNumber: uint16_t, + portNumber: u16, ) -> Option> { msg_send_id![ self, @@ -127,7 +127,7 @@ impl NSSocketPortNameServer { &self, port: &NSPort, name: &NSString, - portNumber: uint16_t, + portNumber: u16, ) -> bool { msg_send![ self, @@ -136,10 +136,10 @@ impl NSSocketPortNameServer { nameServerPortNumber: portNumber ] } - pub unsafe fn defaultNameServerPortNumber(&self) -> uint16_t { + pub unsafe fn defaultNameServerPortNumber(&self) -> u16 { msg_send![self, defaultNameServerPortNumber] } - pub unsafe fn setDefaultNameServerPortNumber(&self, defaultNameServerPortNumber: uint16_t) { + pub unsafe fn setDefaultNameServerPortNumber(&self, defaultNameServerPortNumber: u16) { msg_send![ self, setDefaultNameServerPortNumber: defaultNameServerPortNumber diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index eaa06a3ea..44e7e35a0 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -63,12 +63,12 @@ extern_class!( } ); impl NSInputStream { - pub unsafe fn read_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { + pub unsafe fn read_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { msg_send![self, read: buffer, maxLength: len] } pub unsafe fn getBuffer_length( &self, - buffer: NonNull<*mut uint8_t>, + buffer: NonNull<*mut u8>, len: NonNull, ) -> bool { msg_send![self, getBuffer: buffer, length: len] @@ -91,7 +91,7 @@ extern_class!( } ); impl NSOutputStream { - pub unsafe fn write_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { + pub unsafe fn write_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { msg_send![self, write: buffer, maxLength: len] } pub unsafe fn initToMemory(&self) -> Id { @@ -99,7 +99,7 @@ impl NSOutputStream { } pub unsafe fn initToBuffer_capacity( &self, - buffer: NonNull, + buffer: NonNull, capacity: NSUInteger, ) -> Id { msg_send_id![self, initToBuffer: buffer, capacity: capacity] @@ -189,7 +189,7 @@ impl NSOutputStream { msg_send_id![Self::class(), outputStreamToMemory] } pub unsafe fn outputStreamToBuffer_capacity( - buffer: NonNull, + buffer: NonNull, capacity: NSUInteger, ) -> Id { msg_send_id![ From 5ee3e7717786a292c5a42f9f6d8bf218c86da4e6 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 19 Sep 2022 18:12:40 +0200 Subject: [PATCH 047/131] Parse typedefs that map to other typedefs --- crates/header-translator/src/stmt.rs | 43 +++++++++++-------- .../src/generated/Foundation/NSGeometry.rs | 5 ++- .../src/generated/Foundation/NSHashTable.rs | 1 + .../src/generated/Foundation/NSMapTable.rs | 1 + .../generated/Foundation/NSPropertyList.rs | 2 + .../src/generated/Foundation/NSString.rs | 1 + .../Foundation/NSTextCheckingResult.rs | 1 + .../icrate/src/generated/Foundation/NSURL.rs | 1 + crates/icrate/src/generated/Foundation/mod.rs | 19 +++++--- 9 files changed, 49 insertions(+), 25 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 5251100d4..24de13e72 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -1,4 +1,4 @@ -use clang::{Entity, EntityKind, EntityVisitResult}; +use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; @@ -43,7 +43,7 @@ pub enum Stmt { methods: Vec, }, /// typedef Type TypedefName; - AliasDecl { name: String, type_name: String }, + AliasDecl { name: String, type_: RustType }, // /// typedef struct Name { fields } TypedefName; // X, } @@ -270,18 +270,28 @@ impl Stmt { let underlying_ty = entity .get_typedef_underlying_type() .expect("typedef underlying type"); - if let Some(type_name) = RustType::typedef_is_id(underlying_ty) { - // println!("typedef: {:?}, {:?}", name, type_name); - Some(Self::AliasDecl { name, type_name }) - } else { - // println!( - // "typedef: {:?}, {:?}, {:?}, {:?}", - // entity.get_display_name(), - // entity.has_attributes(), - // entity.get_children(), - // underlying_ty, - // ); - None + match underlying_ty.get_kind() { + TypeKind::ObjCObjectPointer => { + let type_name = RustType::typedef_is_id(underlying_ty).expect("typedef id"); + Some(Self::AliasDecl { + name, + type_: RustType::TypeDef { name: type_name }, + }) + } + TypeKind::Typedef => { + let type_ = RustType::parse(underlying_ty, false, false); + Some(Self::AliasDecl { name, type_ }) + } + _ => { + // println!( + // "typedef: {:#?}, {:#?}, {:#?}, {:#?}", + // entity.get_display_name(), + // entity.has_attributes(), + // entity.get_children(), + // underlying_ty, + // ); + None + } } } EntityKind::StructDecl => { @@ -422,11 +432,10 @@ impl ToTokens for Stmt { // } quote!(pub type #name = NSObject;) } - Self::AliasDecl { name, type_name } => { + Self::AliasDecl { name, type_ } => { let name = format_ident!("{}", name); - let type_name = format_ident!("{}", type_name); - quote!(pub type #name = #type_name;) + quote!(pub type #name = #type_;) } }; tokens.append_all(result); diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index f3faf983a..dae38bb61 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -1,4 +1,3 @@ -use super::__exported::NSString; use crate::CoreGraphics::generated::CGBase::*; use crate::CoreGraphics::generated::CGGeometry::*; use crate::Foundation::generated::NSCoder::*; @@ -7,6 +6,10 @@ use crate::Foundation::generated::NSValue::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSPoint = CGPoint; +pub type NSSize = CGSize; +pub type NSRect = CGRect; +use super::__exported::NSString; #[doc = "NSValueGeometryExtensions"] impl NSValue { pub unsafe fn valueWithPoint(point: NSPoint) -> Id { diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index c3226fff1..73ac50d6d 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -7,6 +7,7 @@ use crate::Foundation::generated::NSString::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSHashTableOptions = NSUInteger; __inner_extern_class!( #[derive(Debug)] pub struct NSHashTable; diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 341373ec2..247aed168 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -7,6 +7,7 @@ use crate::Foundation::generated::NSString::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSMapTableOptions = NSUInteger; __inner_extern_class!( #[derive(Debug)] pub struct NSMapTable; diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 4a2b12d3d..49b47c75f 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -9,6 +9,8 @@ use crate::Foundation::generated::NSObject::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSPropertyListReadOptions = NSPropertyListMutabilityOptions; +pub type NSPropertyListWriteOptions = NSUInteger; extern_class!( #[derive(Debug)] pub struct NSPropertyListSerialization; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index e44b2ceac..141431c4e 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -12,6 +12,7 @@ use crate::Foundation::generated::NSRange::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSStringEncoding = NSUInteger; extern_class!( #[derive(Debug)] pub struct NSString; diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 93d852ff5..8ab003748 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -13,6 +13,7 @@ use crate::Foundation::generated::NSRange::*; use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +pub type NSTextCheckingTypes = u64; pub type NSTextCheckingKey = NSString; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index 4d119f500..063f7e466 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -18,6 +18,7 @@ pub type NSURLFileProtectionType = NSString; pub type NSURLUbiquitousItemDownloadingStatus = NSString; pub type NSURLUbiquitousSharedItemRole = NSString; pub type NSURLUbiquitousSharedItemPermissions = NSString; +pub type NSURLBookmarkFileCreationOptions = NSUInteger; extern_class!( #[derive(Debug)] pub struct NSURL; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 5478035af..55bccf75b 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -223,11 +223,12 @@ mod __exported { pub use super::NSFileWrapper::NSFileWrapper; pub use super::NSFormatter::NSFormatter; pub use super::NSGarbageCollector::NSGarbageCollector; + pub use super::NSGeometry::{NSPoint, NSRect, NSSize}; pub use super::NSHTTPCookie::{ NSHTTPCookie, NSHTTPCookiePropertyKey, NSHTTPCookieStringPolicy, }; pub use super::NSHTTPCookieStorage::NSHTTPCookieStorage; - pub use super::NSHashTable::NSHashTable; + pub use super::NSHashTable::{NSHashTable, NSHashTableOptions}; pub use super::NSHost::NSHost; pub use super::NSISO8601DateFormatter::NSISO8601DateFormatter; pub use super::NSIndexPath::NSIndexPath; @@ -248,7 +249,7 @@ mod __exported { pub use super::NSListFormatter::NSListFormatter; pub use super::NSLocale::{NSLocale, NSLocaleKey}; pub use super::NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; - pub use super::NSMapTable::NSMapTable; + pub use super::NSMapTable::{NSMapTable, NSMapTableOptions}; pub use super::NSMassFormatter::NSMassFormatter; pub use super::NSMeasurement::NSMeasurement; pub use super::NSMeasurementFormatter::NSMeasurementFormatter; @@ -294,7 +295,9 @@ mod __exported { NSProgress, NSProgressFileOperationKind, NSProgressKind, NSProgressReporting, NSProgressUserInfoKey, }; - pub use super::NSPropertyList::NSPropertyListSerialization; + pub use super::NSPropertyList::{ + NSPropertyListReadOptions, NSPropertyListSerialization, NSPropertyListWriteOptions, + }; pub use super::NSProtocolChecker::NSProtocolChecker; pub use super::NSProxy::NSProxy; pub use super::NSRegularExpression::{NSDataDetector, NSRegularExpression}; @@ -326,11 +329,13 @@ mod __exported { NSStreamSocketSecurityLevel, }; pub use super::NSString::{ - NSConstantString, NSMutableString, NSSimpleCString, NSString, + NSConstantString, NSMutableString, NSSimpleCString, NSString, NSStringEncoding, NSStringEncodingDetectionOptionsKey, NSStringTransform, }; pub use super::NSTask::NSTask; - pub use super::NSTextCheckingResult::{NSTextCheckingKey, NSTextCheckingResult}; + pub use super::NSTextCheckingResult::{ + NSTextCheckingKey, NSTextCheckingResult, NSTextCheckingTypes, + }; pub use super::NSThread::NSThread; pub use super::NSTimeZone::NSTimeZone; pub use super::NSTimer::NSTimer; @@ -393,8 +398,8 @@ mod __exported { NSXPCListenerEndpoint, NSXPCProxyCreating, }; pub use super::NSURL::{ - NSFileSecurity, NSURLComponents, NSURLFileProtectionType, NSURLFileResourceType, - NSURLQueryItem, NSURLResourceKey, NSURLThumbnailDictionaryItem, + NSFileSecurity, NSURLBookmarkFileCreationOptions, NSURLComponents, NSURLFileProtectionType, + NSURLFileResourceType, NSURLQueryItem, NSURLResourceKey, NSURLThumbnailDictionaryItem, NSURLUbiquitousItemDownloadingStatus, NSURLUbiquitousSharedItemPermissions, NSURLUbiquitousSharedItemRole, NSURL, }; From 39b448cfeab51797966e3aeef40419b7e9e551da Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 23 Sep 2022 16:43:27 +0200 Subject: [PATCH 048/131] Appease clippy --- crates/header-translator/src/availability.rs | 1 + crates/header-translator/src/main.rs | 11 ++++---- crates/header-translator/src/method.rs | 24 +++++------------ crates/header-translator/src/rust_type.rs | 16 +++++------ crates/header-translator/src/stmt.rs | 28 +++++++------------- 5 files changed, 30 insertions(+), 50 deletions(-) diff --git a/crates/header-translator/src/availability.rs b/crates/header-translator/src/availability.rs index f00b07f53..d86af499b 100644 --- a/crates/header-translator/src/availability.rs +++ b/crates/header-translator/src/availability.rs @@ -2,6 +2,7 @@ use clang::PlatformAvailability; #[derive(Debug, Clone)] pub struct Availability { + #[allow(dead_code)] inner: Vec, } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 0e07548fc..9a5bf5f84 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,13 +1,12 @@ use std::collections::{BTreeMap, HashSet}; use std::fs; -use std::io::{Result, Write}; +use std::io::Write; use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; -use clang::source::File; -use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index}; +use clang::{Clang, Entity, EntityVisitResult, Index}; use proc_macro2::{Ident, TokenStream}; -use quote::{format_ident, quote, TokenStreamExt}; +use quote::{format_ident, quote}; use header_translator::{create_rust_file, Config}; @@ -100,7 +99,7 @@ fn main() { dbg!(&entity); dbg!(entity.get_availability()); - let mut entities_left = usize::MAX; + let _entities_left = usize::MAX; let mut result: BTreeMap>> = BTreeMap::new(); @@ -191,7 +190,7 @@ fn main() { } }); - let mut mod_tokens = quote! { + let mod_tokens = quote! { #(pub(crate) mod #mod_names;)* mod __exported { diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 32ad07f4e..7e3201e37 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -21,23 +21,13 @@ impl MemoryManagement { /// in a way that we can just use `msg_send_id!`. fn verify_sel(self, sel: &str) { let bytes = sel.as_bytes(); - if in_selector_family(bytes, b"new") { - assert!( - self == Self::ReturnsRetained, - "{:?} did not match {}", - self, - sel - ); - } else if in_selector_family(bytes, b"alloc") { - assert!( - self == Self::ReturnsRetained, - "{:?} did not match {}", - self, - sel - ); - } else if in_selector_family(bytes, b"init") { + if in_selector_family(bytes, b"init") { assert!(self == Self::Init, "{:?} did not match {}", self, sel); - } else if in_selector_family(bytes, b"copy") || in_selector_family(bytes, b"mutableCopy") { + } else if in_selector_family(bytes, b"new") + || in_selector_family(bytes, b"alloc") + || in_selector_family(bytes, b"copy") + || in_selector_family(bytes, b"mutableCopy") + { assert!( self == Self::ReturnsRetained, "{:?} did not match {}", @@ -240,7 +230,7 @@ impl ToTokens for Method { let arguments: Vec<_> = self .arguments .iter() - .map(|(param, ty)| (format_ident!("{}", handle_reserved(¶m)), ty)) + .map(|(param, ty)| (format_ident!("{}", handle_reserved(param)), ty)) .collect(); let fn_args = arguments diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index d60439994..e83ec6cca 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -211,11 +211,11 @@ impl RustType { match Self::parse(param, false, false) { Self::Id { type_, - is_return, - nullability, + is_return: _, + nullability: _, } => type_, // TODO: Handle this better - Self::Class { nullability } => GenericType { + Self::Class { nullability: _ } => GenericType { name: "TodoClass".to_string(), generics: Vec::new(), }, @@ -384,7 +384,7 @@ impl ToTokens for RustType { let tokens = match &**pointee { Self::Id { type_, - is_return, + is_return: _, nullability, } => { if *nullability == Nullability::NonNull { @@ -398,12 +398,10 @@ impl ToTokens for RustType { }; if *nullability == Nullability::NonNull { quote!(NonNull<#tokens>) + } else if *is_const { + quote!(*const #tokens) } else { - if *is_const { - quote!(*const #tokens) - } else { - quote!(*mut #tokens) - } + quote!(*mut #tokens) } } Array { diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 24de13e72..727b4b012 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -54,14 +54,9 @@ impl Stmt { EntityKind::InclusionDirective => { // let file = entity.get_file().expect("inclusion file"); let name = entity.get_name().expect("inclusion name"); - let mut iter = name.split("/"); + let mut iter = name.split('/'); let framework = iter.next().expect("inclusion name has framework"); - let file = if let Some(file) = iter.next() { - file - } else { - // Ignore - return None; - }; + let file = iter.next()?; assert!(iter.count() == 0, "no more left"); Some(Self::FileImport { @@ -78,10 +73,7 @@ impl Stmt { // We intentionally don't handle generics here Some(Self::ItemImport { name }) } - EntityKind::MacroExpansion - | EntityKind::ObjCClassRef - | EntityKind::ObjCProtocolRef - | EntityKind::MacroDefinition => None, + EntityKind::MacroExpansion | EntityKind::MacroDefinition => None, EntityKind::ObjCInterfaceDecl => { // entity.get_mangled_objc_names() let name = entity.get_name().expect("class name"); @@ -329,10 +321,10 @@ impl ToTokens for Stmt { } Self::ClassDecl { name, - availability, + availability: _, superclass, generics, - protocols, + protocols: _, methods, } => { let name = format_ident!("{}", name); @@ -381,10 +373,10 @@ impl ToTokens for Stmt { } Self::CategoryDecl { class_name, - availability, + availability: _, name, generics, - protocols, + protocols: _, methods, } => { let meta = if let Some(name) = name { @@ -408,9 +400,9 @@ impl ToTokens for Stmt { } Self::ProtocolDecl { name, - availability, - protocols, - methods, + availability: _, + protocols: _, + methods: _, } => { let name = format_ident!("{}", name); From 3bc700953a5c07f037c909eef66a9a97755ff3e8 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 4 Oct 2022 00:10:08 +0200 Subject: [PATCH 049/131] Add `const`-parsing for RustType::Id --- crates/header-translator/src/rust_type.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index e83ec6cca..70b75857e 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -47,6 +47,7 @@ pub enum RustType { Id { type_: GenericType, is_return: bool, + is_const: bool, nullability: Nullability, }, Class { @@ -168,6 +169,7 @@ impl RustType { generics: Vec::new(), }, is_return, + is_const: ty.is_const_qualified(), nullability, }, ObjCClass => Self::Class { nullability }, @@ -200,6 +202,7 @@ impl RustType { generics: Vec::new(), }, is_return, + is_const: ty.is_const_qualified(), nullability, } } @@ -212,6 +215,7 @@ impl RustType { Self::Id { type_, is_return: _, + is_const: _, nullability: _, } => type_, // TODO: Handle this better @@ -232,6 +236,7 @@ impl RustType { Self::Id { type_: GenericType { name, generics }, is_return, + is_const: ty.is_const_qualified(), nullability, } } @@ -260,6 +265,7 @@ impl RustType { generics: Vec::new(), }, is_return, + is_const: ty.is_const_qualified(), nullability, } } @@ -275,6 +281,7 @@ impl RustType { generics: Vec::new(), }, is_return, + is_const: ty.is_const_qualified(), nullability, } } else { @@ -346,6 +353,8 @@ impl ToTokens for RustType { Id { type_, is_return, + // Ignore + is_const: _, nullability, } => { let tokens = if *is_return { @@ -385,12 +394,14 @@ impl ToTokens for RustType { Self::Id { type_, is_return: _, + is_const, nullability, } => { if *nullability == Nullability::NonNull { quote!(NonNull<#type_>) + } else if *is_const { + quote!(*const #type_) } else { - // TODO: const? quote!(*mut #type_) } } From 9bdc5b6fde480ae3730a7ee1ef7fb71f7ba03704 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 4 Oct 2022 00:14:57 +0200 Subject: [PATCH 050/131] Parse Objective-C in/out/inout/bycopy/byref/oneway qualifiers --- crates/header-translator/src/method.rs | 84 ++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 4 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 7e3201e37..3ec0afe6f 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -1,4 +1,4 @@ -use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; +use clang::{Entity, EntityKind, EntityVisitResult, ObjCQualifiers, TypeKind}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; @@ -7,6 +7,72 @@ use crate::config::ClassData; use crate::objc2_utils::in_selector_family; use crate::rust_type::RustType; +#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] +enum Qualifier { + In, + Inout, + Out, + Bycopy, + Byref, + Oneway, +} + +impl Qualifier { + fn parse(qualifiers: ObjCQualifiers) -> Self { + match qualifiers { + ObjCQualifiers { + in_: true, + inout: false, + out: false, + bycopy: false, + byref: false, + oneway: false, + } => Self::In, + ObjCQualifiers { + in_: false, + inout: true, + out: false, + bycopy: false, + byref: false, + oneway: false, + } => Self::Inout, + ObjCQualifiers { + in_: false, + inout: false, + out: true, + bycopy: false, + byref: false, + oneway: false, + } => Self::Out, + ObjCQualifiers { + in_: false, + inout: false, + out: false, + bycopy: true, + byref: false, + oneway: false, + } => Self::Bycopy, + ObjCQualifiers { + in_: false, + inout: false, + out: false, + bycopy: false, + byref: true, + oneway: false, + } => Self::Byref, + ObjCQualifiers { + in_: false, + inout: false, + out: false, + bycopy: false, + byref: false, + oneway: true, + } => Self::Oneway, + _ => unreachable!("invalid qualifiers: {:?}", qualifiers), + } + } +} + #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] enum MemoryManagement { /// Consumes self and returns retained pointer @@ -53,7 +119,7 @@ pub struct Method { is_optional_protocol_method: bool, memory_management: MemoryManagement, designated_initializer: bool, - arguments: Vec<(String, RustType)>, + arguments: Vec<(String, Option, RustType)>, result_type: Option, safe: bool, } @@ -102,6 +168,8 @@ impl Method { .expect("method arguments") .into_iter() .map(|entity| { + let name = entity.get_name().expect("arg display name"); + let qualifier = entity.get_objc_qualifiers().map(Qualifier::parse); let mut is_consumed = false; entity.visit_children(|entity, _parent| { @@ -127,7 +195,8 @@ impl Method { }); ( - entity.get_name().expect("arg display name"), + name, + qualifier, RustType::parse( entity.get_type().expect("argument type"), false, @@ -138,6 +207,13 @@ impl Method { .collect(); let result_type = entity.get_result_type().expect("method return type"); + if let Some(qualifiers) = entity.get_objc_qualifiers() { + let qualifier = Qualifier::parse(qualifiers); + panic!( + "unexpected qualifier `{:?}` on return type: {:?}", + qualifier, entity + ); + } let result_type = if result_type.get_kind() != TypeKind::Void { Some(RustType::parse(result_type, true, false)) } else { @@ -230,7 +306,7 @@ impl ToTokens for Method { let arguments: Vec<_> = self .arguments .iter() - .map(|(param, ty)| (format_ident!("{}", handle_reserved(param)), ty)) + .map(|(param, _qualifier, ty)| (format_ident!("{}", handle_reserved(param)), ty)) .collect(); let fn_args = arguments From 0aa92115ec7c1cba9bf5cdfdfd2c0326b2e3d481 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 6 Oct 2022 07:34:16 +0200 Subject: [PATCH 051/131] Fix `id` being emitted when it actually specifies a protocol --- crates/header-translator/src/rust_type.rs | 26 ++++++++++++++++--- .../src/generated/Foundation/NSCache.rs | 4 +-- .../src/generated/Foundation/NSConnection.rs | 4 +-- .../generated/Foundation/NSDecimalNumber.rs | 18 ++++++------- .../src/generated/Foundation/NSDictionary.rs | 15 ++++++----- .../generated/Foundation/NSFileCoordinator.rs | 8 +++--- .../src/generated/Foundation/NSFileManager.rs | 6 ++--- .../src/generated/Foundation/NSFileVersion.rs | 2 +- .../generated/Foundation/NSItemProvider.rs | 12 ++++----- .../generated/Foundation/NSKeyedArchiver.rs | 8 +++--- .../src/generated/Foundation/NSMetadata.rs | 4 +-- .../src/generated/Foundation/NSNetServices.rs | 8 +++--- .../generated/Foundation/NSNotification.rs | 2 +- .../icrate/src/generated/Foundation/NSPort.rs | 8 +++--- .../src/generated/Foundation/NSProcessInfo.rs | 4 +-- .../src/generated/Foundation/NSSpellServer.rs | 4 +-- .../src/generated/Foundation/NSStream.rs | 4 +-- .../NSURLAuthenticationChallenge.rs | 6 ++--- .../src/generated/Foundation/NSURLDownload.rs | 4 +-- .../src/generated/Foundation/NSURLHandle.rs | 4 +-- .../src/generated/Foundation/NSURLProtocol.rs | 6 ++--- .../src/generated/Foundation/NSURLSession.rs | 8 +++--- .../generated/Foundation/NSUserActivity.rs | 4 +-- .../Foundation/NSUserNotification.rs | 4 +-- .../generated/Foundation/NSUserScriptTask.rs | 2 +- .../src/generated/Foundation/NSXMLParser.rs | 4 +-- .../generated/Foundation/NSXPCConnection.rs | 8 +++--- 27 files changed, 105 insertions(+), 82 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 70b75857e..85a15f58a 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -106,7 +106,15 @@ impl RustType { } Some(name) } - ObjCObject => Some(name), + ObjCObject => { + if !ty.get_objc_type_arguments().is_empty() { + Some("TodoGenerics".to_owned()) + } else if !ty.get_objc_protocol_declarations().is_empty() { + Some("TodoProtocols".to_owned()) + } else { + Some(name) + } + } _ => panic!("pointee was not objcinterface nor objcobject: {:?}", ty), } } @@ -207,7 +215,7 @@ impl RustType { } } ObjCObject => { - let generics = ty + let generics: Vec<_> = ty .get_objc_type_arguments() .into_iter() .map(|param| { @@ -232,7 +240,19 @@ impl RustType { let base_ty = ty .get_objc_object_base_type() .expect("object to have base type"); - let name = base_ty.get_display_name(); + let mut name = base_ty.get_display_name(); + let protocols: Vec<_> = ty + .get_objc_protocol_declarations() + .into_iter() + .map(|entity| entity.get_display_name().expect("protocol name")) + .collect(); + if !protocols.is_empty() { + if name == "id" && generics.is_empty() && protocols.len() == 1 { + name = protocols[0].clone(); + } else { + name = "TodoProtocols".to_string(); + } + } Self::Id { type_: GenericType { name, generics }, is_return, diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 5655c1e2c..ce24f26e9 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -33,10 +33,10 @@ impl NSCache { pub unsafe fn setName(&self, name: &NSString) { msg_send![self, setName: name] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn totalCostLimit(&self) -> NSUInteger { diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 992cda961..5ffe1894f 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -170,10 +170,10 @@ impl NSConnection { pub unsafe fn setRootObject(&self, rootObject: Option<&Object>) { msg_send![self, setRootObject: rootObject] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSConnectionDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn independentConversationQueueing(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index cac927577..aaef3fd8d 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -84,7 +84,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberByAdding_withBehavior( &self, decimalNumber: &NSDecimalNumber, - behavior: Option<&id>, + behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id { msg_send_id![ self, @@ -101,7 +101,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberBySubtracting_withBehavior( &self, decimalNumber: &NSDecimalNumber, - behavior: Option<&id>, + behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id { msg_send_id![ self, @@ -118,7 +118,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberByMultiplyingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, - behavior: Option<&id>, + behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id { msg_send_id![ self, @@ -135,7 +135,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberByDividingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, - behavior: Option<&id>, + behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id { msg_send_id![ self, @@ -152,7 +152,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberByRaisingToPower_withBehavior( &self, power: NSUInteger, - behavior: Option<&id>, + behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id { msg_send_id![ self, @@ -169,7 +169,7 @@ impl NSDecimalNumber { pub unsafe fn decimalNumberByMultiplyingByPowerOf10_withBehavior( &self, power: c_short, - behavior: Option<&id>, + behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id { msg_send_id![ self, @@ -179,7 +179,7 @@ impl NSDecimalNumber { } pub unsafe fn decimalNumberByRoundingAccordingToBehavior( &self, - behavior: Option<&id>, + behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id { msg_send_id![self, decimalNumberByRoundingAccordingToBehavior: behavior] } @@ -204,10 +204,10 @@ impl NSDecimalNumber { pub unsafe fn notANumber() -> Id { msg_send_id![Self::class(), notANumber] } - pub unsafe fn defaultBehavior() -> Id { + pub unsafe fn defaultBehavior() -> Id { msg_send_id![Self::class(), defaultBehavior] } - pub unsafe fn setDefaultBehavior(defaultBehavior: &id) { + pub unsafe fn setDefaultBehavior(defaultBehavior: &NSDecimalNumberBehaviors) { msg_send![Self::class(), setDefaultBehavior: defaultBehavior] } pub unsafe fn objCType(&self) -> NonNull { diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 9bc37d409..2c893f987 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -187,7 +187,10 @@ impl NSDictionary { pub unsafe fn dictionary() -> Id { msg_send_id![Self::class(), dictionary] } - pub unsafe fn dictionaryWithObject_forKey(object: &ObjectType, key: &id) -> Id { + pub unsafe fn dictionaryWithObject_forKey( + object: &ObjectType, + key: &NSCopying, + ) -> Id { msg_send_id![Self::class(), dictionaryWithObject: object, forKey: key] } pub unsafe fn dictionaryWithObjects_forKeys_count( @@ -209,7 +212,7 @@ impl NSDictionary { } pub unsafe fn dictionaryWithObjects_forKeys( objects: &NSArray, - keys: &NSArray, + keys: &NSArray, ) -> Id { msg_send_id![Self::class(), dictionaryWithObjects: objects, forKeys: keys] } @@ -229,7 +232,7 @@ impl NSDictionary { pub unsafe fn initWithObjects_forKeys( &self, objects: &NSArray, - keys: &NSArray, + keys: &NSArray, ) -> Id { msg_send_id![self, initWithObjects: objects, forKeys: keys] } @@ -264,7 +267,7 @@ impl NSMutableDictionary Id { @@ -294,7 +297,7 @@ impl NSMutableDictionary) { msg_send![self, setDictionary: otherDictionary] } - pub unsafe fn setObject_forKeyedSubscript(&self, obj: Option<&ObjectType>, key: &id) { + pub unsafe fn setObject_forKeyedSubscript(&self, obj: Option<&ObjectType>, key: &NSCopying) { msg_send![self, setObject: obj, forKeyedSubscript: key] } } @@ -328,7 +331,7 @@ impl NSMutableDictionary NSDictionary { - pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id { + pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id { msg_send_id![Self::class(), sharedKeySetForKeys: keys] } } diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index cccb9b930..91ed0c381 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -42,15 +42,15 @@ extern_class!( } ); impl NSFileCoordinator { - pub unsafe fn addFilePresenter(filePresenter: &id) { + pub unsafe fn addFilePresenter(filePresenter: &NSFilePresenter) { msg_send![Self::class(), addFilePresenter: filePresenter] } - pub unsafe fn removeFilePresenter(filePresenter: &id) { + pub unsafe fn removeFilePresenter(filePresenter: &NSFilePresenter) { msg_send![Self::class(), removeFilePresenter: filePresenter] } pub unsafe fn initWithFilePresenter( &self, - filePresenterOrNil: Option<&id>, + filePresenterOrNil: Option<&NSFilePresenter>, ) -> Id { msg_send_id![self, initWithFilePresenter: filePresenterOrNil] } @@ -174,7 +174,7 @@ impl NSFileCoordinator { pub unsafe fn cancel(&self) { msg_send![self, cancel] } - pub unsafe fn filePresenters() -> Id, Shared> { + pub unsafe fn filePresenters() -> Id, Shared> { msg_send_id![Self::class(), filePresenters] } pub unsafe fn purposeIdentifier(&self) -> Id { diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 67c5c992b..45e0af211 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -550,16 +550,16 @@ impl NSFileManager { pub unsafe fn defaultManager() -> Id { msg_send_id![Self::class(), defaultManager] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSFileManagerDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn currentDirectoryPath(&self) -> Id { msg_send_id![self, currentDirectoryPath] } - pub unsafe fn ubiquityIdentityToken(&self) -> Option> { + pub unsafe fn ubiquityIdentityToken(&self) -> Option> { msg_send_id![self, ubiquityIdentityToken] } } diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index 78e1aa564..385504281 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -107,7 +107,7 @@ impl NSFileVersion { pub unsafe fn modificationDate(&self) -> Option> { msg_send_id![self, modificationDate] } - pub unsafe fn persistentIdentifier(&self) -> Id { + pub unsafe fn persistentIdentifier(&self) -> Id { msg_send_id![self, persistentIdentifier] } pub unsafe fn isConflict(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 3350902cb..b3e806e09 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -98,19 +98,19 @@ impl NSItemProvider { completionHandler: completionHandler ] } - pub unsafe fn initWithObject(&self, object: &id) -> Id { + pub unsafe fn initWithObject(&self, object: &NSItemProviderWriting) -> Id { msg_send_id![self, initWithObject: object] } pub unsafe fn registerObject_visibility( &self, - object: &id, + object: &NSItemProviderWriting, visibility: NSItemProviderRepresentationVisibility, ) { msg_send![self, registerObject: object, visibility: visibility] } pub unsafe fn registerObjectOfClass_visibility_loadHandler( &self, - aClass: &Class, + aClass: &TodoProtocols, visibility: NSItemProviderRepresentationVisibility, loadHandler: TodoBlock, ) { @@ -121,12 +121,12 @@ impl NSItemProvider { loadHandler: loadHandler ] } - pub unsafe fn canLoadObjectOfClass(&self, aClass: &Class) -> bool { + pub unsafe fn canLoadObjectOfClass(&self, aClass: &TodoProtocols) -> bool { msg_send![self, canLoadObjectOfClass: aClass] } pub unsafe fn loadObjectOfClass_completionHandler( &self, - aClass: &Class, + aClass: &TodoProtocols, completionHandler: TodoBlock, ) -> Id { msg_send_id![ @@ -137,7 +137,7 @@ impl NSItemProvider { } pub unsafe fn initWithItem_typeIdentifier( &self, - item: Option<&id>, + item: Option<&NSSecureCoding>, typeIdentifier: Option<&NSString>, ) -> Id { msg_send_id![self, initWithItem: item, typeIdentifier: typeIdentifier] diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 7144aacfa..dec116651 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -92,10 +92,10 @@ impl NSKeyedArchiver { ) { msg_send![self, encodeBytes: bytes, length: length, forKey: key] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedArchiverDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn outputFormat(&self) -> NSPropertyListFormat { @@ -273,10 +273,10 @@ impl NSKeyedUnarchiver { ) -> *mut u8 { msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedUnarchiverDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn requiresSecureCoding(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 70e035a13..bc3ce7350 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -56,10 +56,10 @@ impl NSMetadataQuery { ) -> Option> { msg_send_id![self, valueOfAttribute: attrName, forResultAtIndex: idx] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSMetadataQueryDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn predicate(&self) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 4d7ee75f1..67b19933c 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -93,10 +93,10 @@ impl NSNetService { pub unsafe fn stopMonitoring(&self) { msg_send![self, stopMonitoring] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn includesPeerToPeer(&self) -> bool { @@ -157,10 +157,10 @@ impl NSNetServiceBrowser { pub unsafe fn stop(&self) { msg_send![self, stop] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceBrowserDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn includesPeerToPeer(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 2a08ddf1e..29499a5ab 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -128,7 +128,7 @@ impl NSNotificationCenter { obj: Option<&Object>, queue: Option<&NSOperationQueue>, block: TodoBlock, - ) -> Id { + ) -> Id { msg_send_id![ self, addObserverForName: name, diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 30ec0bea0..1518459ab 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -25,10 +25,10 @@ impl NSPort { pub unsafe fn invalidate(&self) { msg_send![self, invalidate] } - pub unsafe fn setDelegate(&self, anObject: Option<&id>) { + pub unsafe fn setDelegate(&self, anObject: Option<&NSPortDelegate>) { msg_send![self, setDelegate: anObject] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { @@ -112,10 +112,10 @@ impl NSMachPort { pub unsafe fn initWithMachPort(&self, machPort: u32) -> Id { msg_send_id![self, initWithMachPort: machPort] } - pub unsafe fn setDelegate(&self, anObject: Option<&id>) { + pub unsafe fn setDelegate(&self, anObject: Option<&NSMachPortDelegate>) { msg_send![self, setDelegate: anObject] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } pub unsafe fn portWithMachPort_options( diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 83e7efdb6..654e8c715 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -101,10 +101,10 @@ impl NSProcessInfo { &self, options: NSActivityOptions, reason: &NSString, - ) -> Id { + ) -> Id { msg_send_id![self, beginActivityWithOptions: options, reason: reason] } - pub unsafe fn endActivity(&self, activity: &id) { + pub unsafe fn endActivity(&self, activity: &NSObject) { msg_send![self, endActivity: activity] } pub unsafe fn performActivityWithOptions_reason_usingBlock( diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 9fe27a907..a62dcc421 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -33,10 +33,10 @@ impl NSSpellServer { pub unsafe fn run(&self) { msg_send![self, run] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSSpellServerDelegate>) { msg_send![self, setDelegate: delegate] } } diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 44e7e35a0..ed8d53fe3 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -42,10 +42,10 @@ impl NSStream { pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn streamStatus(&self) -> NSStreamStatus { diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index 3ed66bb08..3f0b662c2 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -24,7 +24,7 @@ impl NSURLAuthenticationChallenge { previousFailureCount: NSInteger, response: Option<&NSURLResponse>, error: Option<&NSError>, - sender: &id, + sender: &NSURLAuthenticationChallengeSender, ) -> Id { msg_send_id![ self, @@ -39,7 +39,7 @@ impl NSURLAuthenticationChallenge { pub unsafe fn initWithAuthenticationChallenge_sender( &self, challenge: &NSURLAuthenticationChallenge, - sender: &id, + sender: &NSURLAuthenticationChallengeSender, ) -> Id { msg_send_id![ self, @@ -62,7 +62,7 @@ impl NSURLAuthenticationChallenge { pub unsafe fn error(&self) -> Option> { msg_send_id![self, error] } - pub unsafe fn sender(&self) -> Option> { + pub unsafe fn sender(&self) -> Option> { msg_send_id![self, sender] } } diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index a33be349b..cb69757cd 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -28,14 +28,14 @@ impl NSURLDownload { pub unsafe fn initWithRequest_delegate( &self, request: &NSURLRequest, - delegate: Option<&id>, + delegate: Option<&NSURLDownloadDelegate>, ) -> Id { msg_send_id![self, initWithRequest: request, delegate: delegate] } pub unsafe fn initWithResumeData_delegate_path( &self, resumeData: &NSData, - delegate: Option<&id>, + delegate: Option<&NSURLDownloadDelegate>, path: &NSString, ) -> Id { msg_send_id![ diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index d6a042eb4..a439091cd 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -28,10 +28,10 @@ impl NSURLHandle { pub unsafe fn failureReason(&self) -> Option> { msg_send_id![self, failureReason] } - pub unsafe fn addClient(&self, client: Option<&id>) { + pub unsafe fn addClient(&self, client: Option<&NSURLHandleClient>) { msg_send![self, addClient: client] } - pub unsafe fn removeClient(&self, client: Option<&id>) { + pub unsafe fn removeClient(&self, client: Option<&NSURLHandleClient>) { msg_send![self, removeClient: client] } pub unsafe fn loadInBackground(&self) { diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 722baa1be..7c2676e4b 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -26,7 +26,7 @@ impl NSURLProtocol { &self, request: &NSURLRequest, cachedResponse: Option<&NSCachedURLResponse>, - client: Option<&id>, + client: Option<&NSURLProtocolClient>, ) -> Id { msg_send_id![ self, @@ -77,7 +77,7 @@ impl NSURLProtocol { pub unsafe fn unregisterClass(protocolClass: &Class) { msg_send![Self::class(), unregisterClass: protocolClass] } - pub unsafe fn client(&self) -> Option> { + pub unsafe fn client(&self) -> Option> { msg_send_id![self, client] } pub unsafe fn request(&self) -> Id { @@ -96,7 +96,7 @@ impl NSURLProtocol { &self, task: &NSURLSessionTask, cachedResponse: Option<&NSCachedURLResponse>, - client: Option<&id>, + client: Option<&NSURLProtocolClient>, ) -> Id { msg_send_id![ self, diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index ab4c0acdc..57c9bb937 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -42,7 +42,7 @@ impl NSURLSession { } pub unsafe fn sessionWithConfiguration_delegate_delegateQueue( configuration: &NSURLSessionConfiguration, - delegate: Option<&id>, + delegate: Option<&NSURLSessionDelegate>, queue: Option<&NSOperationQueue>, ) -> Id { msg_send_id![ @@ -158,7 +158,7 @@ impl NSURLSession { pub unsafe fn delegateQueue(&self) -> Id { msg_send_id![self, delegateQueue] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } pub unsafe fn configuration(&self) -> Id { @@ -290,10 +290,10 @@ impl NSURLSessionTask { pub unsafe fn response(&self) -> Option> { msg_send_id![self, response] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSURLSessionTaskDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn progress(&self) -> Id { diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 38bdf1e2f..7f97e43e5 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -122,10 +122,10 @@ impl NSUserActivity { setSupportsContinuationStreams: supportsContinuationStreams ] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSUserActivityDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn targetContentIdentifier(&self) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 0c2b4dc72..d2a17c5a0 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -198,10 +198,10 @@ impl NSUserNotificationCenter { pub unsafe fn defaultUserNotificationCenter() -> Id { msg_send_id![Self::class(), defaultUserNotificationCenter] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSUserNotificationCenterDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn scheduledNotifications(&self) -> Id, Shared> { diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index e24897521..da8fbb118 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -101,7 +101,7 @@ extern_class!( impl NSUserAutomatorTask { pub unsafe fn executeWithInput_completionHandler( &self, - input: Option<&id>, + input: Option<&NSSecureCoding>, handler: NSUserAutomatorTaskCompletionHandler, ) { msg_send![self, executeWithInput: input, completionHandler: handler] diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index a2daded07..c35bcae0e 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -34,10 +34,10 @@ impl NSXMLParser { pub unsafe fn abortParsing(&self) { msg_send![self, abortParsing] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSXMLParserDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn shouldProcessNamespaces(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 75fcf2f94..17d22aec5 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -144,10 +144,10 @@ impl NSXPCListener { pub unsafe fn invalidate(&self) { msg_send![self, invalidate] } - pub unsafe fn delegate(&self) -> Option> { + pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } - pub unsafe fn setDelegate(&self, delegate: Option<&id>) { + pub unsafe fn setDelegate(&self, delegate: Option<&NSXPCListenerDelegate>) { msg_send![self, setDelegate: delegate] } pub unsafe fn endpoint(&self) -> Id { @@ -283,10 +283,10 @@ impl NSXPCCoder { ) -> Option> { msg_send_id![self, decodeXPCObjectOfType: type_, forKey: key] } - pub unsafe fn userInfo(&self) -> Option> { + pub unsafe fn userInfo(&self) -> Option> { msg_send_id![self, userInfo] } - pub unsafe fn setUserInfo(&self, userInfo: Option<&id>) { + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSObject>) { msg_send![self, setUserInfo: userInfo] } pub unsafe fn connection(&self) -> Option> { From 78cc5b837a5d9815f67425a302c4b5f780164526 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 6 Oct 2022 04:24:08 +0200 Subject: [PATCH 052/131] Make AppKit work again --- crates/header-translator/src/rust_type.rs | 30 ++++++++++++----------- crates/header-translator/src/stmt.rs | 6 ++++- crates/icrate/src/AppKit.toml | 5 ++++ 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 85a15f58a..88335237f 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -125,20 +125,22 @@ impl RustType { pub fn parse_attributed(ty: &mut Type<'_>, nullability: &mut Nullability, kindof: &mut bool) { while ty.get_kind() == TypeKind::Attributed { - match ( - ty.get_display_name().starts_with("__kindof"), - ty.get_nullability(), - ) { - (false, Some(new)) => { - *nullability = match (*nullability, new) { - (Nullability::NonNull, Nullability::Nullable) => Nullability::Nullable, - (Nullability::NonNull, _) => Nullability::NonNull, - (Nullability::Nullable, _) => Nullability::Nullable, - (Nullability::Unspecified, new) => new, - } - } - (true, None) => *kindof = true, - _ => panic!("invalid attributed type: {:?}", ty), + let mut found_attribute = false; + if ty.get_display_name().starts_with("__kindof") { + *kindof = true; + found_attribute = true; + } + if let Some(new) = ty.get_nullability() { + *nullability = match (*nullability, new) { + (Nullability::NonNull, Nullability::Nullable) => Nullability::Nullable, + (Nullability::NonNull, _) => Nullability::NonNull, + (Nullability::Nullable, _) => Nullability::Nullable, + (Nullability::Unspecified, new) => new, + }; + found_attribute = true; + } + if !found_attribute { + panic!("could not extract attribute from attributed type: {ty:?}"); } *ty = ty .get_modified_type() diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 727b4b012..b994cce62 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -57,7 +57,11 @@ impl Stmt { let mut iter = name.split('/'); let framework = iter.next().expect("inclusion name has framework"); let file = iter.next()?; - assert!(iter.count() == 0, "no more left"); + if iter.count() != 0 { + // TODO: Fix this + println!("skipping inclusion of {name:?}"); + return None; + } Some(Self::FileImport { framework: framework.to_string(), diff --git a/crates/icrate/src/AppKit.toml b/crates/icrate/src/AppKit.toml index e69de29bb..0cefe738d 100644 --- a/crates/icrate/src/AppKit.toml +++ b/crates/icrate/src/AppKit.toml @@ -0,0 +1,5 @@ +# These return `oneway void`, which is a bit tricky to handle. +[class.NSPasteboard.methods.releaseGlobally] +skipped = true +[class.NSView.methods.releaseGState] +skipped = true From 6781ccbd13bbcaee2617854dde88f2daf4827976 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 6 Oct 2022 07:09:38 +0200 Subject: [PATCH 053/131] Parse all qualifiers, in particular lifetime qualifiers --- crates/header-translator/src/method.rs | 13 +- crates/header-translator/src/rust_type.rs | 338 ++++++++++++++++------ 2 files changed, 248 insertions(+), 103 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 3ec0afe6f..29ec44239 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -194,15 +194,10 @@ impl Method { EntityVisitResult::Continue }); - ( - name, - qualifier, - RustType::parse( - entity.get_type().expect("argument type"), - false, - is_consumed, - ), - ) + let ty = entity.get_type().expect("argument type"); + let ty = RustType::parse(ty, false, is_consumed); + + (name, qualifier, ty) }) .collect(); diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 88335237f..13c13099c 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -8,6 +8,74 @@ pub struct GenericType { pub generics: Vec, } +impl GenericType { + fn parse_objc_pointer(ty: Type<'_>) -> Self { + match ty.get_kind() { + TypeKind::ObjCInterface => { + let generics = ty.get_objc_type_arguments(); + if !generics.is_empty() { + panic!("generics not empty: {ty:?}, {generics:?}"); + } + let protocols = ty.get_objc_protocol_declarations(); + if !protocols.is_empty() { + panic!("protocols not empty: {ty:?}, {protocols:?}"); + } + let name = ty.get_display_name(); + Self { + name, + generics: Vec::new(), + } + } + TypeKind::ObjCObject => { + let base_ty = ty + .get_objc_object_base_type() + .expect("object to have base type"); + let mut name = base_ty.get_display_name(); + + let generics: Vec<_> = ty + .get_objc_type_arguments() + .into_iter() + .map(|param| { + match RustType::parse(param, false, false) { + RustType::Id { + type_, + is_return: _, + is_const: _, + lifetime: _, + nullability: _, + } => type_, + // TODO: Handle this better + RustType::Class { nullability: _ } => Self { + name: "TodoClass".to_string(), + generics: Vec::new(), + }, + param => { + panic!("invalid generic parameter {:?} in {:?}", param, ty) + } + } + }) + .collect(); + + let protocols: Vec<_> = ty + .get_objc_protocol_declarations() + .into_iter() + .map(|entity| entity.get_display_name().expect("protocol name")) + .collect(); + if !protocols.is_empty() { + if name == "id" && generics.is_empty() && protocols.len() == 1 { + name = protocols[0].clone(); + } else { + name = "TodoProtocols".to_string(); + } + } + + Self { name, generics } + } + _ => panic!("pointee was neither objcinterface nor objcobject: {ty:?}"), + } + } +} + impl ToTokens for GenericType { fn to_tokens(&self, tokens: &mut TokenStream) { let name = format_ident!("{}", self.name); @@ -16,6 +84,159 @@ impl ToTokens for GenericType { } } +/// ObjCLifetime +#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] +pub enum Lifetime { + Unspecified, + /// OCL_ExplicitNone + Unretained, + /// OCL_Strong + Strong, + /// OCL_Weak + Weak, + /// OCL_Autoreleasing + Autoreleasing, +} + +/// Parse attributes. +/// +/// This is _very_ ugly, but required because libclang doesn't expose most +/// of these. +fn parse_attributed<'a>( + ty: Type<'a>, + nullability: &mut Nullability, + lifetime: &mut Lifetime, + kindof: Option<&mut bool>, +) -> Type<'a> { + let mut modified_ty = ty.clone(); + while modified_ty.get_kind() == TypeKind::Attributed { + // println!("{ty:?}, {modified_ty:?}"); + modified_ty = modified_ty + .get_modified_type() + .expect("attributed type to have modified type"); + } + + if modified_ty == ty { + return ty; + } + + let mut name = &*ty.get_display_name(); + let mut modified_name = &*modified_ty.get_display_name(); + + fn get_inner_fn(name: &str) -> &str { + let (_, name) = name.split_once('(').expect("fn to have begin parenthesis"); + let (name, _) = name.split_once(')').expect("fn to have end parenthesis"); + name.trim() + } + + match modified_ty.get_kind() { + TypeKind::ConstantArray => { + let (res, _) = name.split_once("[").expect("array to end with ["); + name = res.trim(); + let (res, _) = modified_name.split_once("[").expect("array to end with ["); + modified_name = res.trim(); + } + TypeKind::IncompleteArray => { + name = name + .strip_suffix("[]") + .expect("array to end with []") + .trim(); + modified_name = modified_name + .strip_suffix("[]") + .expect("array to end with []") + .trim(); + } + TypeKind::BlockPointer => { + name = get_inner_fn(name); + modified_name = get_inner_fn(modified_name); + } + TypeKind::Pointer => { + if modified_ty + .get_pointee_type() + .expect("pointer to have pointee") + .get_kind() + == TypeKind::FunctionPrototype + { + name = get_inner_fn(name); + modified_name = get_inner_fn(modified_name); + } + } + _ => {} + } + + if let Some(kindof) = kindof { + if let Some(rest) = name.strip_prefix("__kindof") { + name = rest.trim(); + *kindof = true; + } + } + + if ty.is_const_qualified() { + if let Some(rest) = name.strip_suffix("const") { + name = rest.trim(); + } + if !modified_ty.is_const_qualified() { + // TODO: Fix this + println!("unnecessarily stripped const"); + } + } + + if let Some(rest) = name.strip_suffix("__unsafe_unretained") { + *lifetime = Lifetime::Unretained; + name = rest.trim(); + } else if let Some(rest) = name.strip_suffix("__strong") { + *lifetime = Lifetime::Strong; + name = rest.trim(); + } else if let Some(rest) = name.strip_suffix("__weak") { + *lifetime = Lifetime::Weak; + name = rest.trim(); + } else if let Some(rest) = name.strip_suffix("__autoreleasing") { + *lifetime = Lifetime::Autoreleasing; + name = rest.trim(); + } + + if let Some(rest) = name.strip_suffix("_Nullable") { + assert_eq!( + ty.get_nullability(), + Some(Nullability::Nullable), + "nullable" + ); + *nullability = Nullability::Nullable; + name = rest.trim(); + } else if let Some(rest) = name.strip_suffix("_Nonnull") { + assert_eq!(ty.get_nullability(), Some(Nullability::NonNull), "nonnull"); + *nullability = match nullability { + Nullability::Nullable => Nullability::Nullable, + _ => Nullability::NonNull, + }; + name = rest.trim(); + } else if let Some(rest) = name.strip_suffix("_Null_unspecified") { + assert_eq!( + ty.get_nullability(), + Some(Nullability::Unspecified), + "unspecified" + ); + // Do nothing + name = rest.trim(); + } else { + assert_eq!( + ty.get_nullability(), + None, + "expected no nullability attribute on {name:?}" + ); + } + + if name != modified_name { + let original_name = ty.get_display_name(); + println!("attributes: {original_name:?} -> {name:?} != {modified_name:?}"); + panic!( + "could not extract all attributes from attributed type. Inner: {ty:?}, {modified_ty:?}" + ); + } + + modified_ty +} + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum RustType { // Primitives @@ -48,6 +269,7 @@ pub enum RustType { type_: GenericType, is_return: bool, is_const: bool, + lifetime: Lifetime, nullability: Nullability, }, Class { @@ -123,39 +345,16 @@ impl RustType { } } - pub fn parse_attributed(ty: &mut Type<'_>, nullability: &mut Nullability, kindof: &mut bool) { - while ty.get_kind() == TypeKind::Attributed { - let mut found_attribute = false; - if ty.get_display_name().starts_with("__kindof") { - *kindof = true; - found_attribute = true; - } - if let Some(new) = ty.get_nullability() { - *nullability = match (*nullability, new) { - (Nullability::NonNull, Nullability::Nullable) => Nullability::Nullable, - (Nullability::NonNull, _) => Nullability::NonNull, - (Nullability::Nullable, _) => Nullability::Nullable, - (Nullability::Unspecified, new) => new, - }; - found_attribute = true; - } - if !found_attribute { - panic!("could not extract attribute from attributed type: {ty:?}"); - } - *ty = ty - .get_modified_type() - .expect("attributed type to have modified type"); - } - } - - pub fn parse(mut ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { + pub fn parse(ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { use TypeKind::*; // println!("{:?}, {:?}", ty, ty.get_class_type()); let mut nullability = Nullability::Unspecified; - let mut kindof = false; - Self::parse_attributed(&mut ty, &mut nullability, &mut kindof); + let mut lifetime = Lifetime::Unspecified; + let ty = parse_attributed(ty, &mut nullability, &mut lifetime, None); + + // println!("{:?}: {:?}", ty.get_kind(), ty.get_display_name()); match ty.get_kind() { Void => Self::Void, @@ -180,6 +379,7 @@ impl RustType { }, is_return, is_const: ty.is_const_qualified(), + lifetime, nullability, }, ObjCClass => Self::Class { nullability }, @@ -197,72 +397,17 @@ impl RustType { } } ObjCObjectPointer => { - let mut ty = ty.get_pointee_type().expect("pointer type to have pointee"); - Self::parse_attributed(&mut ty, &mut nullability, &mut kindof); - match ty.get_kind() { - ObjCInterface => { - let generics = ty.get_objc_type_arguments(); - if !generics.is_empty() { - panic!("not empty: {:?}, {:?}", ty, generics); - } - let name = ty.get_display_name(); - Self::Id { - type_: GenericType { - name, - generics: Vec::new(), - }, - is_return, - is_const: ty.is_const_qualified(), - nullability, - } - } - ObjCObject => { - let generics: Vec<_> = ty - .get_objc_type_arguments() - .into_iter() - .map(|param| { - match Self::parse(param, false, false) { - Self::Id { - type_, - is_return: _, - is_const: _, - nullability: _, - } => type_, - // TODO: Handle this better - Self::Class { nullability: _ } => GenericType { - name: "TodoClass".to_string(), - generics: Vec::new(), - }, - param => { - panic!("invalid generic parameter {:?} in {:?}", param, ty) - } - } - }) - .collect(); - let base_ty = ty - .get_objc_object_base_type() - .expect("object to have base type"); - let mut name = base_ty.get_display_name(); - let protocols: Vec<_> = ty - .get_objc_protocol_declarations() - .into_iter() - .map(|entity| entity.get_display_name().expect("protocol name")) - .collect(); - if !protocols.is_empty() { - if name == "id" && generics.is_empty() && protocols.len() == 1 { - name = protocols[0].clone(); - } else { - name = "TodoProtocols".to_string(); - } - } - Self::Id { - type_: GenericType { name, generics }, - is_return, - is_const: ty.is_const_qualified(), - nullability, - } - } - _ => panic!("pointee was not objcinterface: {:?}", ty), + let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + let mut kindof = false; + let ty = parse_attributed(ty, &mut nullability, &mut lifetime, Some(&mut kindof)); + let type_ = GenericType::parse_objc_pointer(ty); + + Self::Id { + type_, + is_return, + is_const: ty.is_const_qualified(), + lifetime, + nullability, } } Typedef => { @@ -288,6 +433,7 @@ impl RustType { }, is_return, is_const: ty.is_const_qualified(), + lifetime, nullability, } } @@ -304,6 +450,7 @@ impl RustType { }, is_return, is_const: ty.is_const_qualified(), + lifetime, nullability, } } else { @@ -377,6 +524,8 @@ impl ToTokens for RustType { is_return, // Ignore is_const: _, + // Ignore + lifetime: _, nullability, } => { let tokens = if *is_return { @@ -417,6 +566,7 @@ impl ToTokens for RustType { type_, is_return: _, is_const, + lifetime: _, nullability, } => { if *nullability == Nullability::NonNull { From 932e3644d6b368a71c071a57f14c6f386534a2ba Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 6 Oct 2022 08:00:10 +0200 Subject: [PATCH 054/131] More consistent ObjCObjectPointer parsing --- crates/header-translator/src/rust_type.rs | 83 ++++++----------------- crates/header-translator/src/stmt.rs | 38 +++++++++-- 2 files changed, 53 insertions(+), 68 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 13c13099c..9dc7235ae 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -9,7 +9,7 @@ pub struct GenericType { } impl GenericType { - fn parse_objc_pointer(ty: Type<'_>) -> Self { + pub fn parse_objc_pointer(ty: Type<'_>) -> Self { match ty.get_kind() { TypeKind::ObjCInterface => { let generics = ty.get_objc_type_arguments(); @@ -301,50 +301,6 @@ impl RustType { matches!(self, Self::Id { .. }) } - pub fn typedef_is_id(ty: Type<'_>) -> Option { - use TypeKind::*; - - // Note: When we encounter a typedef declaration like this: - // typedef NSString* NSAbc; - // - // We parse it as one of: - // type NSAbc = NSString; - // struct NSAbc(NSString); - // - // Instead of: - // type NSAbc = *const NSString; - // - // Because that means we can use ordinary Id<...> handling. - match ty.get_kind() { - ObjCObjectPointer => { - let ty = ty.get_pointee_type().expect("pointer type to have pointee"); - let name = ty.get_display_name(); - match ty.get_kind() { - ObjCInterface => { - match &*name { - "NSString" => {} - "NSUnit" => {} // TODO: Handle this differently - _ => panic!("typedef interface was not NSString {:?}", ty), - } - Some(name) - } - ObjCObject => { - if !ty.get_objc_type_arguments().is_empty() { - Some("TodoGenerics".to_owned()) - } else if !ty.get_objc_protocol_declarations().is_empty() { - Some("TodoProtocols".to_owned()) - } else { - Some(name) - } - } - _ => panic!("pointee was not objcinterface nor objcobject: {:?}", ty), - } - } - ObjCId => panic!("unexpected ObjCId {:?}", ty), - _ => None, - } - } - pub fn parse(ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { use TypeKind::*; @@ -438,23 +394,28 @@ impl RustType { } } _ => { - if Self::typedef_is_id(ty.get_canonical_type()).is_some() { - let generics = ty.get_objc_type_arguments(); - if !generics.is_empty() { - panic!("not empty: {:?}, {:?}", ty, generics); + let ty = ty.get_canonical_type(); + match ty.get_kind() { + ObjCObjectPointer => { + let ty = + ty.get_pointee_type().expect("pointer type to have pointee"); + let type_ = GenericType::parse_objc_pointer(ty); + if !type_.generics.is_empty() { + panic!("typedef generics not empty"); + } + + Self::Id { + type_: GenericType { + name: typedef_name, + generics: Vec::new(), + }, + is_return, + is_const: ty.is_const_qualified(), + lifetime, + nullability, + } } - Self::Id { - type_: GenericType { - name: typedef_name, - generics: Vec::new(), - }, - is_return, - is_const: ty.is_const_qualified(), - lifetime, - nullability, - } - } else { - Self::TypeDef { name: typedef_name } + _ => Self::TypeDef { name: typedef_name }, } } } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index b994cce62..038648621 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -5,7 +5,7 @@ use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; use crate::config::Config; use crate::method::Method; -use crate::rust_type::RustType; +use crate::rust_type::{GenericType, RustType}; #[derive(Debug, Clone)] pub enum Stmt { @@ -263,19 +263,43 @@ impl Stmt { } EntityKind::TypedefDecl => { let name = entity.get_name().expect("typedef name"); - let underlying_ty = entity + let ty = entity .get_typedef_underlying_type() .expect("typedef underlying type"); - match underlying_ty.get_kind() { + match ty.get_kind() { + // Note: When we encounter a typedef declaration like this: + // typedef NSString* NSAbc; + // + // We parse it as one of: + // type NSAbc = NSString; + // struct NSAbc(NSString); + // + // Instead of: + // type NSAbc = *const NSString; + // + // Because that means we can use ordinary Id<...> handling. TypeKind::ObjCObjectPointer => { - let type_name = RustType::typedef_is_id(underlying_ty).expect("typedef id"); + let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + let type_ = GenericType::parse_objc_pointer(ty); + + match &*type_.name { + "NSString" => {} + "NSUnit" => {} // TODO: Handle this differently + "TodoProtocols" => {} // TODO + _ => panic!("typedef declaration was not NSString: {type_:?}"), + } + + if !type_.generics.is_empty() { + panic!("typedef declaration generics not empty"); + } + Some(Self::AliasDecl { name, - type_: RustType::TypeDef { name: type_name }, + type_: RustType::TypeDef { name: type_.name }, }) } TypeKind::Typedef => { - let type_ = RustType::parse(underlying_ty, false, false); + let type_ = RustType::parse(ty, false, false); Some(Self::AliasDecl { name, type_ }) } _ => { @@ -284,7 +308,7 @@ impl Stmt { // entity.get_display_name(), // entity.has_attributes(), // entity.get_children(), - // underlying_ty, + // ty, // ); None } From d59a273e5f7b938ca2feeeb771e0227c37b9b1b9 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 6 Oct 2022 08:48:42 +0200 Subject: [PATCH 055/131] Validate some lifetime attributes --- crates/header-translator/src/method.rs | 4 +- crates/header-translator/src/rust_type.rs | 56 ++++++++++++++++++- crates/header-translator/src/stmt.rs | 2 +- crates/icrate/src/Foundation.toml | 13 +++++ .../generated/Foundation/NSItemProvider.rs | 27 --------- .../src/generated/Foundation/NSNetServices.rs | 11 ---- .../generated/Foundation/NSPropertyList.rs | 26 --------- 7 files changed, 71 insertions(+), 68 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 29ec44239..7a8ee56a6 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -195,7 +195,7 @@ impl Method { }); let ty = entity.get_type().expect("argument type"); - let ty = RustType::parse(ty, false, is_consumed); + let ty = RustType::parse_argument(ty, is_consumed); (name, qualifier, ty) }) @@ -210,7 +210,7 @@ impl Method { ); } let result_type = if result_type.get_kind() != TypeKind::Void { - Some(RustType::parse(result_type, true, false)) + Some(RustType::parse_return(result_type)) } else { None }; diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 9dc7235ae..1149bb3db 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -301,7 +301,7 @@ impl RustType { matches!(self, Self::Id { .. }) } - pub fn parse(ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { + fn parse(ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { use TypeKind::*; // println!("{:?}, {:?}", ty, ty.get_class_type()); @@ -450,6 +450,60 @@ impl RustType { } } +impl RustType { + fn visit_lifetime(&self, mut f: impl FnMut(Lifetime)) { + match self { + Self::Id { lifetime, .. } => f(*lifetime), + Self::Pointer { pointee, .. } => pointee.visit_lifetime(f), + Self::Array { element_type, .. } => element_type.visit_lifetime(f), + _ => {} + } + } + + pub fn parse_return(ty: Type<'_>) -> Self { + let this = Self::parse(ty, true, false); + + this.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in return {this:?}"); + } + }); + + this + } + + pub fn parse_argument(ty: Type<'_>, is_consumed: bool) -> Self { + let this = Self::parse(ty, false, is_consumed); + + match &this { + Self::Pointer { pointee, .. } => pointee.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Autoreleasing && lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime {lifetime:?} in pointer argument {ty:?}"); + } + }), + _ => this.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Strong && lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime {lifetime:?} in argument {ty:?}"); + } + }), + } + + this + } + + pub fn parse_typedef(ty: Type<'_>) -> Self { + let this = Self::parse(ty, false, false); + + this.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in typedef {this:?}"); + } + }); + + this + } +} + impl ToTokens for RustType { fn to_tokens(&self, tokens: &mut TokenStream) { use RustType::*; diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 038648621..b2fbac0aa 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -299,7 +299,7 @@ impl Stmt { }) } TypeKind::Typedef => { - let type_ = RustType::parse(ty, false, false); + let type_ = RustType::parse_typedef(ty); Some(Self::AliasDecl { name, type_ }) } _ => { diff --git a/crates/icrate/src/Foundation.toml b/crates/icrate/src/Foundation.toml index 418379d44..9b7162c2d 100644 --- a/crates/icrate/src/Foundation.toml +++ b/crates/icrate/src/Foundation.toml @@ -26,3 +26,16 @@ initWithString = { unsafe = false } [class.NSBlockOperation.methods] # Uses `NSArray`, which is difficult to handle executionBlocks = { skipped = true } + +# These use `Class`, which is unsupported +[class.NSItemProvider.methods] +registerObjectOfClass_visibility_loadHandler = { skipped = true } +canLoadObjectOfClass = { skipped = true } +loadObjectOfClass_completionHandler = { skipped = true } + +# These use `SomeObject * __strong *`, which is unsupported +[class.NSNetService.methods] +getInputStream_outputStream = { skipped = true } +[class.NSPropertyListSerialization.methods] +dataFromPropertyList_format_errorDescription = { skipped = true } +propertyListFromData_mutabilityOption_format_errorDescription = { skipped = true } diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index b3e806e09..ac08b003f 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -108,33 +108,6 @@ impl NSItemProvider { ) { msg_send![self, registerObject: object, visibility: visibility] } - pub unsafe fn registerObjectOfClass_visibility_loadHandler( - &self, - aClass: &TodoProtocols, - visibility: NSItemProviderRepresentationVisibility, - loadHandler: TodoBlock, - ) { - msg_send![ - self, - registerObjectOfClass: aClass, - visibility: visibility, - loadHandler: loadHandler - ] - } - pub unsafe fn canLoadObjectOfClass(&self, aClass: &TodoProtocols) -> bool { - msg_send![self, canLoadObjectOfClass: aClass] - } - pub unsafe fn loadObjectOfClass_completionHandler( - &self, - aClass: &TodoProtocols, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - loadObjectOfClass: aClass, - completionHandler: completionHandler - ] - } pub unsafe fn initWithItem_typeIdentifier( &self, item: Option<&NSSecureCoding>, diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 67b19933c..f958b2990 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -70,17 +70,6 @@ impl NSNetService { pub unsafe fn resolveWithTimeout(&self, timeout: NSTimeInterval) { msg_send![self, resolveWithTimeout: timeout] } - pub unsafe fn getInputStream_outputStream( - &self, - inputStream: *mut *mut NSInputStream, - outputStream: *mut *mut NSOutputStream, - ) -> bool { - msg_send![ - self, - getInputStream: inputStream, - outputStream: outputStream - ] - } pub unsafe fn setTXTRecordData(&self, recordData: Option<&NSData>) -> bool { msg_send![self, setTXTRecordData: recordData] } diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 49b47c75f..9afbb9d78 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -83,30 +83,4 @@ impl NSPropertyListSerialization { error: error ] } - pub unsafe fn dataFromPropertyList_format_errorDescription( - plist: &Object, - format: NSPropertyListFormat, - errorString: *mut *mut NSString, - ) -> Option> { - msg_send_id![ - Self::class(), - dataFromPropertyList: plist, - format: format, - errorDescription: errorString - ] - } - pub unsafe fn propertyListFromData_mutabilityOption_format_errorDescription( - data: &NSData, - opt: NSPropertyListMutabilityOptions, - format: *mut NSPropertyListFormat, - errorString: *mut *mut NSString, - ) -> Option> { - msg_send_id![ - Self::class(), - propertyListFromData: data, - mutabilityOption: opt, - format: format, - errorDescription: errorString - ] - } } From ce48683365ab935a34b2bf29a76a715c9b152c35 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 6 Oct 2022 09:22:12 +0200 Subject: [PATCH 056/131] Fix out parameters (except for NSError) Assuming we find a good solution to https://github.com/madsmtm/objc2/pull/277 --- crates/header-translator/src/rust_type.rs | 85 +++++++++++++------ .../src/generated/Foundation/NSAppleScript.rs | 8 +- .../src/generated/Foundation/NSCalendar.rs | 6 +- .../Foundation/NSDateComponentsFormatter.rs | 4 +- .../generated/Foundation/NSDateFormatter.rs | 2 +- .../generated/Foundation/NSEnergyFormatter.rs | 4 +- .../src/generated/Foundation/NSFileManager.rs | 6 +- .../src/generated/Foundation/NSFormatter.rs | 12 +-- .../generated/Foundation/NSKeyValueCoding.rs | 4 +- .../generated/Foundation/NSLengthFormatter.rs | 4 +- .../Foundation/NSLinguisticTagger.rs | 10 +-- .../generated/Foundation/NSMassFormatter.rs | 4 +- .../generated/Foundation/NSNumberFormatter.rs | 2 +- .../generated/Foundation/NSPathUtilities.rs | 4 +- .../NSPersonNameComponentsFormatter.rs | 4 +- .../src/generated/Foundation/NSScanner.rs | 8 +- .../src/generated/Foundation/NSStream.rs | 12 +-- .../src/generated/Foundation/NSString.rs | 2 +- .../icrate/src/generated/Foundation/NSURL.rs | 4 +- .../generated/Foundation/NSURLConnection.rs | 2 +- 20 files changed, 111 insertions(+), 76 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 1149bb3db..c66b2dc37 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -575,33 +575,68 @@ impl ToTokens for RustType { nullability, is_const, pointee, - } => { - let tokens = match &**pointee { - Self::Id { - type_, - is_return: _, - is_const, - lifetime: _, - nullability, - } => { - if *nullability == Nullability::NonNull { - quote!(NonNull<#type_>) - } else if *is_const { - quote!(*const #type_) - } else { - quote!(*mut #type_) - } + } => match &**pointee { + Self::Id { + type_: tokens, + is_return: false, + is_const: false, + lifetime: Lifetime::Autoreleasing, + nullability: inner_nullability, + } => { + let tokens = quote!(Id<#tokens, Shared>); + let tokens = if *inner_nullability == Nullability::NonNull { + tokens + } else { + quote!(Option<#tokens>) + }; + + let tokens = if *is_const { + quote!(&#tokens) + } else { + quote!(&mut #tokens) + }; + if *nullability == Nullability::NonNull { + tokens + } else { + quote!(Option<#tokens>) } - pointee => quote!(#pointee), - }; - if *nullability == Nullability::NonNull { - quote!(NonNull<#tokens>) - } else if *is_const { - quote!(*const #tokens) - } else { - quote!(*mut #tokens) } - } + Self::Id { + type_: tokens, + is_return: false, + is_const: false, + lifetime: Lifetime::Unspecified, + nullability: inner_nullability, + } => { + if tokens.name != "NSError" { + println!("id*: {self:?}"); + } + let tokens = if *inner_nullability == Nullability::NonNull { + quote!(NonNull<#tokens>) + } else { + quote!(*mut #tokens) + }; + if *nullability == Nullability::NonNull { + quote!(NonNull<#tokens>) + } else if *is_const { + quote!(*const #tokens) + } else { + quote!(*mut #tokens) + } + } + Self::Id { .. } => { + unreachable!("there should be no id with other values: {self:?}") + } + pointee => { + if *nullability == Nullability::NonNull { + quote!(NonNull<#pointee>) + } else if *is_const { + quote!(*const #pointee) + } else { + quote!(*mut #pointee) + } + } + }, Array { element_type, num_elements, diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index 873174e0b..6d0832277 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -18,7 +18,7 @@ impl NSAppleScript { pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, - errorInfo: *mut *mut NSDictionary, + errorInfo: Option<&mut Option, Shared>>>, ) -> Option> { msg_send_id![self, initWithContentsOfURL: url, error: errorInfo] } @@ -27,20 +27,20 @@ impl NSAppleScript { } pub unsafe fn compileAndReturnError( &self, - errorInfo: *mut *mut NSDictionary, + errorInfo: Option<&mut Option, Shared>>>, ) -> bool { msg_send![self, compileAndReturnError: errorInfo] } pub unsafe fn executeAndReturnError( &self, - errorInfo: *mut *mut NSDictionary, + errorInfo: Option<&mut Option, Shared>>>, ) -> Id { msg_send_id![self, executeAndReturnError: errorInfo] } pub unsafe fn executeAppleEvent_error( &self, event: &NSAppleEventDescriptor, - errorInfo: *mut *mut NSDictionary, + errorInfo: Option<&mut Option, Shared>>>, ) -> Id { msg_send_id![self, executeAppleEvent: event, error: errorInfo] } diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index fb8437ccb..ebd88f032 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -67,7 +67,7 @@ impl NSCalendar { pub unsafe fn rangeOfUnit_startDate_interval_forDate( &self, unit: NSCalendarUnit, - datep: *mut *mut NSDate, + datep: Option<&mut Option>>, tip: *mut NSTimeInterval, date: &NSDate, ) -> bool { @@ -273,7 +273,7 @@ impl NSCalendar { } pub unsafe fn rangeOfWeekendStartDate_interval_containingDate( &self, - datep: *mut *mut NSDate, + datep: Option<&mut Option>>, tip: *mut NSTimeInterval, date: &NSDate, ) -> bool { @@ -286,7 +286,7 @@ impl NSCalendar { } pub unsafe fn nextWeekendStartDate_interval_options_afterDate( &self, - datep: *mut *mut NSDate, + datep: Option<&mut Option>>, tip: *mut NSTimeInterval, options: NSCalendarOptions, date: &NSDate, diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index b24c18994..ed284ef87 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -50,9 +50,9 @@ impl NSDateComponentsFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut *mut Object, + obj: Option<&mut Option>>, string: &NSString, - error: *mut *mut NSString, + error: Option<&mut Option>>, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 599af7aba..8a24f3dea 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -22,7 +22,7 @@ extern_class!( impl NSDateFormatter { pub unsafe fn getObjectValue_forString_range_error( &self, - obj: *mut *mut Object, + obj: Option<&mut Option>>, string: &NSString, rangep: *mut NSRange, error: *mut *mut NSError, diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 4eef5e1c3..11a887cd8 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -37,9 +37,9 @@ impl NSEnergyFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut *mut Object, + obj: Option<&mut Option>>, string: &NSString, - error: *mut *mut NSString, + error: Option<&mut Option>>, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 45e0af211..618186fe2 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -286,7 +286,7 @@ impl NSFileManager { pub unsafe fn trashItemAtURL_resultingItemURL_error( &self, url: &NSURL, - outResultingURL: *mut *mut NSURL, + outResultingURL: Option<&mut Option>>, error: *mut *mut NSError, ) -> bool { msg_send![ @@ -463,7 +463,7 @@ impl NSFileManager { newItemURL: &NSURL, backupItemName: Option<&NSString>, options: NSFileManagerItemReplacementOptions, - resultingURL: *mut *mut NSURL, + resultingURL: Option<&mut Option>>, error: *mut *mut NSError, ) -> bool { msg_send![ @@ -517,7 +517,7 @@ impl NSFileManager { pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( &self, url: &NSURL, - outDate: *mut *mut NSDate, + outDate: Option<&mut Option>>, error: *mut *mut NSError, ) -> Option> { msg_send_id![ diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index 2c2f419d6..ad167c183 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -38,9 +38,9 @@ impl NSFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut *mut Object, + obj: Option<&mut Option>>, string: &NSString, - error: *mut *mut NSString, + error: Option<&mut Option>>, ) -> bool { msg_send![ self, @@ -52,8 +52,8 @@ impl NSFormatter { pub unsafe fn isPartialStringValid_newEditingString_errorDescription( &self, partialString: &NSString, - newString: *mut *mut NSString, - error: *mut *mut NSString, + newString: Option<&mut Option>>, + error: Option<&mut Option>>, ) -> bool { msg_send![ self, @@ -64,11 +64,11 @@ impl NSFormatter { } pub unsafe fn isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription( &self, - partialStringPtr: NonNull>, + partialStringPtr: &mut Id, proposedSelRangePtr: NSRangePointer, origString: &NSString, origSelRange: NSRange, - error: *mut *mut NSString, + error: Option<&mut Option>>, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index eea58f859..45b90c887 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -20,7 +20,7 @@ impl NSObject { } pub unsafe fn validateValue_forKey_error( &self, - ioValue: NonNull<*mut Object>, + ioValue: &mut Option>, inKey: &NSString, outError: *mut *mut NSError, ) -> bool { @@ -46,7 +46,7 @@ impl NSObject { } pub unsafe fn validateValue_forKeyPath_error( &self, - ioValue: NonNull<*mut Object>, + ioValue: &mut Option>, inKeyPath: &NSString, outError: *mut *mut NSError, ) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index f57031b05..40e2ddafc 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -37,9 +37,9 @@ impl NSLengthFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut *mut Object, + obj: Option<&mut Option>>, string: &NSString, - error: *mut *mut NSString, + error: Option<&mut Option>>, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 6cae856b7..1ec2edd54 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -104,7 +104,7 @@ impl NSLinguisticTagger { unit: NSLinguisticTaggerUnit, scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, - tokenRanges: *mut *mut NSArray, + tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared> { msg_send_id![ self, @@ -150,7 +150,7 @@ impl NSLinguisticTagger { range: NSRange, tagScheme: &NSString, opts: NSLinguisticTaggerOptions, - tokenRanges: *mut *mut NSArray, + tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared> { msg_send_id![ self, @@ -188,7 +188,7 @@ impl NSLinguisticTagger { scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, - tokenRanges: *mut *mut NSArray, + tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared> { msg_send_id![ Self::class(), @@ -227,7 +227,7 @@ impl NSLinguisticTagger { tagScheme: &NSString, tokenRange: NSRangePointer, sentenceRange: NSRangePointer, - scores: *mut *mut NSArray, + scores: Option<&mut Option, Shared>>>, ) -> Option, Shared>> { msg_send_id![ self, @@ -259,7 +259,7 @@ impl NSString { scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, - tokenRanges: *mut *mut NSArray, + tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared> { msg_send_id![ self, diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 39b4a1c5f..1eeb09405 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -42,9 +42,9 @@ impl NSMassFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut *mut Object, + obj: Option<&mut Option>>, string: &NSString, - error: *mut *mut NSString, + error: Option<&mut Option>>, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 10942f27d..6b8cb7883 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -20,7 +20,7 @@ extern_class!( impl NSNumberFormatter { pub unsafe fn getObjectValue_forString_range_error( &self, - obj: *mut *mut Object, + obj: Option<&mut Option>>, string: &NSString, rangep: *mut NSRange, error: *mut *mut NSError, diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index df0f014a3..731daeb29 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -26,9 +26,9 @@ impl NSString { } pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( &self, - outputName: *mut *mut NSString, + outputName: Option<&mut Option>>, flag: bool, - outputArray: *mut *mut NSArray, + outputArray: Option<&mut Option, Shared>>>, filterTypes: Option<&NSArray>, ) -> NSUInteger { msg_send![ diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index fcc275e02..d6a6e15f5 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -44,9 +44,9 @@ impl NSPersonNameComponentsFormatter { } pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: *mut *mut Object, + obj: Option<&mut Option>>, string: &NSString, - error: *mut *mut NSString, + error: Option<&mut Option>>, ) -> bool { msg_send![ self, diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 5c3d569c7..5a38e7ca9 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -80,28 +80,28 @@ impl NSScanner { pub unsafe fn scanString_intoString( &self, string: &NSString, - result: *mut *mut NSString, + result: Option<&mut Option>>, ) -> bool { msg_send![self, scanString: string, intoString: result] } pub unsafe fn scanCharactersFromSet_intoString( &self, set: &NSCharacterSet, - result: *mut *mut NSString, + result: Option<&mut Option>>, ) -> bool { msg_send![self, scanCharactersFromSet: set, intoString: result] } pub unsafe fn scanUpToString_intoString( &self, string: &NSString, - result: *mut *mut NSString, + result: Option<&mut Option>>, ) -> bool { msg_send![self, scanUpToString: string, intoString: result] } pub unsafe fn scanUpToCharactersFromSet_intoString( &self, set: &NSCharacterSet, - result: *mut *mut NSString, + result: Option<&mut Option>>, ) -> bool { msg_send![self, scanUpToCharactersFromSet: set, intoString: result] } diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index ed8d53fe3..5c3f3a3c0 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -120,8 +120,8 @@ impl NSStream { pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( hostname: &NSString, port: NSInteger, - inputStream: *mut *mut NSInputStream, - outputStream: *mut *mut NSOutputStream, + inputStream: Option<&mut Option>>, + outputStream: Option<&mut Option>>, ) { msg_send![ Self::class(), @@ -134,8 +134,8 @@ impl NSStream { pub unsafe fn getStreamsToHost_port_inputStream_outputStream( host: &NSHost, port: NSInteger, - inputStream: *mut *mut NSInputStream, - outputStream: *mut *mut NSOutputStream, + inputStream: Option<&mut Option>>, + outputStream: Option<&mut Option>>, ) { msg_send![ Self::class(), @@ -150,8 +150,8 @@ impl NSStream { impl NSStream { pub unsafe fn getBoundStreamsWithBufferSize_inputStream_outputStream( bufferSize: NSUInteger, - inputStream: *mut *mut NSInputStream, - outputStream: *mut *mut NSOutputStream, + inputStream: Option<&mut Option>>, + outputStream: Option<&mut Option>>, ) { msg_send![ Self::class(), diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 141431c4e..2a1e22991 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -768,7 +768,7 @@ impl NSString { pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( data: &NSData, opts: Option<&NSDictionary>, - string: *mut *mut NSString, + string: Option<&mut Option>>, usedLossyConversion: *mut bool, ) -> NSStringEncoding { msg_send![ diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index 063f7e466..b25ff772e 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -201,7 +201,7 @@ impl NSURL { } pub unsafe fn getResourceValue_forKey_error( &self, - value: NonNull<*mut Object>, + value: &mut Option>, key: &NSURLResourceKey, error: *mut *mut NSError, ) -> bool { @@ -410,7 +410,7 @@ impl NSURL { impl NSURL { pub unsafe fn getPromisedItemResourceValue_forKey_error( &self, - value: NonNull<*mut Object>, + value: &mut Option>, key: &NSURLResourceKey, error: *mut *mut NSError, ) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 93b15a657..39d6cb4c9 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -87,7 +87,7 @@ pub type NSURLConnectionDownloadDelegate = NSObject; impl NSURLConnection { pub unsafe fn sendSynchronousRequest_returningResponse_error( request: &NSURLRequest, - response: *mut *mut NSURLResponse, + response: Option<&mut Option>>, error: *mut *mut NSError, ) -> Option> { msg_send_id![ From d0ae01ed861d6b3b294a16ae2731059cbf50e9e1 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 7 Oct 2022 16:40:28 +0200 Subject: [PATCH 057/131] Refactor Stmt objc declaration parsing --- crates/header-translator/src/stmt.rs | 225 +++++++++++++-------------- 1 file changed, 106 insertions(+), 119 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index b2fbac0aa..d9740d082 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -3,10 +3,94 @@ use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; -use crate::config::Config; +use crate::config::{ClassData, Config}; use crate::method::Method; use crate::rust_type::{GenericType, RustType}; +/// Takes one of: +/// - `EntityKind::ObjCInterfaceDecl` +/// - `EntityKind::ObjCProtocolDecl` +/// - `EntityKind::ObjCCategoryDecl` +fn parse_objc_decl( + entity: &Entity<'_>, + mut superclass: Option<&mut Option>>, + mut generics: Option<&mut Vec>, + class_data: Option<&ClassData>, +) -> (Vec, Vec) { + let mut protocols = Vec::new(); + let mut methods = Vec::new(); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::ObjCExplicitProtocolImpl if generics.is_some() && superclass.is_none() => { + // TODO + } + EntityKind::ObjCIvarDecl if superclass.is_some() => { + // Explicitly ignored + } + EntityKind::ObjCSuperClassRef => { + if let Some(superclass) = &mut superclass { + **superclass = Some(Some(entity.get_name().expect("superclass name"))); + } else { + panic!("unsupported superclass {entity:?}"); + } + } + EntityKind::ObjCRootClass => { + if let Some(superclass) = &mut superclass { + // TODO: Maybe just skip root classes entirely? + **superclass = Some(None); + } else { + panic!("unsupported root class {entity:?}"); + } + } + EntityKind::ObjCClassRef if generics.is_some() => { + // println!("ObjCClassRef: {:?}", entity.get_display_name()); + } + EntityKind::TemplateTypeParameter => { + if let Some(generics) = &mut generics { + // TODO: Generics with bounds (like NSMeasurement) + // let ty = entity.get_type().expect("template type"); + let name = entity.get_display_name().expect("template name"); + generics.push(name); + } else { + panic!("unsupported generics {entity:?}"); + } + } + EntityKind::ObjCProtocolRef => { + protocols.push(entity.get_name().expect("protocolref to have name")); + } + EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { + if let Some(method) = Method::parse(entity, class_data) { + methods.push(method); + } + } + EntityKind::ObjCPropertyDecl => { + // println!( + // "Property {:?}, {:?}", + // entity.get_display_name().unwrap(), + // entity.get_objc_attributes().unwrap() + // ); + // methods.push(quote! {}); + } + EntityKind::VisibilityAttr if superclass.is_some() => { + // NS_CLASS_AVAILABLE_MAC?? + println!("TODO: VisibilityAttr") + } + EntityKind::TypeRef if superclass.is_some() => { + // TODO + } + EntityKind::ObjCException if superclass.is_some() => { + // Maybe useful for knowing when to implement `Error` for the type + } + EntityKind::UnexposedAttr => {} + _ => panic!("unknown objc decl child {entity:?}"), + }; + EntityVisitResult::Continue + }); + + (protocols, methods) +} + #[derive(Debug, Clone)] pub enum Stmt { /// #import @@ -90,61 +174,13 @@ impl Stmt { // println!("Availability: {:?}", entity.get_platform_availability()); let mut superclass = None; let mut generics = Vec::new(); - let mut protocols = Vec::new(); - let mut methods = Vec::new(); - entity.visit_children(|entity, _parent| { - match entity.get_kind() { - EntityKind::ObjCIvarDecl => { - // Explicitly ignored - } - EntityKind::ObjCSuperClassRef => { - superclass = Some(Some(entity.get_name().expect("superclass name"))); - } - EntityKind::ObjCRootClass => { - // TODO: Maybe just skip root classes entirely? - superclass = Some(None); - } - EntityKind::ObjCClassRef => { - // println!("ObjCClassRef: {:?}", entity.get_display_name()); - } - EntityKind::ObjCProtocolRef => { - protocols.push(entity.get_name().expect("protocolref to have name")); - } - EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - if let Some(method) = Method::parse(entity, class_data) { - methods.push(method); - } - } - EntityKind::ObjCPropertyDecl => { - // println!( - // "Property {:?}, {:?}", - // entity.get_display_name().unwrap(), - // entity.get_objc_attributes().unwrap() - // ); - // methods.push(quote! {}); - } - EntityKind::TemplateTypeParameter => { - // TODO: Generics with bounds (like NSMeasurement) - // let ty = entity.get_type().expect("template type"); - let name = entity.get_display_name().expect("template name"); - generics.push(name); - } - EntityKind::VisibilityAttr => { - // NS_CLASS_AVAILABLE_MAC?? - println!("TODO: VisibilityAttr") - } - EntityKind::TypeRef => { - // TODO - } - EntityKind::ObjCException => { - // Maybe useful for knowing when to implement `Error` for the type - } - EntityKind::UnexposedAttr => {} - _ => panic!("Unknown in ObjCInterfaceDecl {:?}", entity), - } - EntityVisitResult::Continue - }); + let (protocols, methods) = parse_objc_decl( + &entity, + Some(&mut superclass), + Some(&mut generics), + class_data, + ); let superclass = superclass.expect("no superclass found"); @@ -159,57 +195,31 @@ impl Stmt { } EntityKind::ObjCCategoryDecl => { let name = entity.get_name(); - let mut class_name = None; - let mut generics = Vec::new(); let availability = Availability::parse( entity .get_platform_availability() .expect("category availability"), ); - let mut protocols = Vec::new(); - let mut methods = Vec::new(); + let mut class_name = None; entity.visit_children(|entity, _parent| { - match entity.get_kind() { - EntityKind::ObjCClassRef => { - if class_name.is_some() { - panic!("could not find unique category class") - } - class_name = Some(entity.get_name().expect("class name")); - } - EntityKind::ObjCProtocolRef => { - protocols.push(entity.get_name().expect("protocolref to have name")); + if entity.get_kind() == EntityKind::ObjCClassRef { + if class_name.is_some() { + panic!("could not find unique category class") } - EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - let class_data = config.class_data.get( - class_name - .as_ref() - .expect("no category class before methods"), - ); - if let Some(method) = Method::parse(entity, class_data) { - methods.push(method); - } - } - EntityKind::ObjCPropertyDecl => { - // println!( - // "Property {:?}, {:?}, {:?}", - // class_name, - // entity.get_display_name(), - // entity.get_objc_attributes(), - // ); - // methods.push(quote! {}); - } - EntityKind::TemplateTypeParameter => { - let name = entity.get_display_name().expect("template name"); - generics.push(name); - } - EntityKind::UnexposedAttr => {} - _ => panic!("Unknown in ObjCCategoryDecl {:?}", entity), + class_name = Some(entity.get_name().expect("class name")); + EntityVisitResult::Break + } else { + EntityVisitResult::Continue } - EntityVisitResult::Continue }); - let class_name = class_name.expect("could not find category class"); + let class_data = config.class_data.get(&class_name); + + let mut generics = Vec::new(); + + let (protocols, methods) = + parse_objc_decl(&entity, None, Some(&mut generics), class_data); Some(Self::CategoryDecl { class_name, @@ -228,31 +238,8 @@ impl Stmt { .get_platform_availability() .expect("protocol availability"), ); - let mut protocols = Vec::new(); - let mut methods = Vec::new(); - entity.visit_children(|entity, _parent| { - match entity.get_kind() { - EntityKind::ObjCExplicitProtocolImpl => { - // TODO - } - EntityKind::ObjCProtocolRef => { - protocols.push(entity.get_name().expect("protocolref to have name")); - } - EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - // TODO: Required vs. optional methods - if let Some(method) = Method::parse(entity, class_data) { - methods.push(method); - } - } - EntityKind::ObjCPropertyDecl => { - // TODO - } - EntityKind::UnexposedAttr => {} - _ => panic!("Unknown in ObjCProtocolDecl {:?}", entity), - } - EntityVisitResult::Continue - }); + let (protocols, methods) = parse_objc_decl(&entity, None, None, class_data); Some(Self::ProtocolDecl { name, From 8e2719cbcbad5f10796652a306f4f0e4b7c434da Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 7 Oct 2022 16:07:28 +0200 Subject: [PATCH 058/131] Clean up how return types work --- crates/header-translator/src/method.rs | 29 ++---- crates/header-translator/src/rust_type.rs | 116 ++++++++++++---------- 2 files changed, 76 insertions(+), 69 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 7a8ee56a6..fdf5a7270 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -1,11 +1,11 @@ -use clang::{Entity, EntityKind, EntityVisitResult, ObjCQualifiers, TypeKind}; +use clang::{Entity, EntityKind, EntityVisitResult, ObjCQualifiers}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; use crate::config::ClassData; use crate::objc2_utils::in_selector_family; -use crate::rust_type::RustType; +use crate::rust_type::{RustType, RustTypeReturn}; #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] enum Qualifier { @@ -120,7 +120,7 @@ pub struct Method { memory_management: MemoryManagement, designated_initializer: bool, arguments: Vec<(String, Option, RustType)>, - result_type: Option, + result_type: RustTypeReturn, safe: bool, } @@ -201,7 +201,6 @@ impl Method { }) .collect(); - let result_type = entity.get_result_type().expect("method return type"); if let Some(qualifiers) = entity.get_objc_qualifiers() { let qualifier = Qualifier::parse(qualifiers); panic!( @@ -209,11 +208,9 @@ impl Method { qualifier, entity ); } - let result_type = if result_type.get_kind() != TypeKind::Void { - Some(RustType::parse_return(result_type)) - } else { - None - }; + + let result_type = entity.get_result_type().expect("method return type"); + let result_type = RustTypeReturn::parse(result_type); let mut designated_initializer = false; let mut consumes_self = false; @@ -273,10 +270,8 @@ impl Method { } // Verify that memory management is as expected - if let Some(type_) = &result_type { - if type_.is_id() { - memory_management.verify_sel(&selector); - } + if result_type.is_id() { + memory_management.verify_sel(&selector); } Some(Self { @@ -333,13 +328,9 @@ impl ToTokens for Method { quote!(#sel) }; - let (ret, is_id) = if let Some(type_) = &self.result_type { - (quote!(-> #type_), type_.is_id()) - } else { - (quote!(), false) - }; + let ret = &self.result_type; - let macro_name = if is_id { + let macro_name = if self.result_type.is_id() { format_ident!("msg_send_id") } else { format_ident!("msg_send") diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index c66b2dc37..f78a45713 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -36,10 +36,9 @@ impl GenericType { .get_objc_type_arguments() .into_iter() .map(|param| { - match RustType::parse(param, false, false) { + match RustType::parse(param, false) { RustType::Id { type_, - is_return: _, is_const: _, lifetime: _, nullability: _, @@ -267,7 +266,6 @@ pub enum RustType { // Objective-C Id { type_: GenericType, - is_return: bool, is_const: bool, lifetime: Lifetime, nullability: Nullability, @@ -297,11 +295,7 @@ pub enum RustType { } impl RustType { - pub fn is_id(&self) -> bool { - matches!(self, Self::Id { .. }) - } - - fn parse(ty: Type<'_>, is_return: bool, is_consumed: bool) -> Self { + fn parse(ty: Type<'_>, is_consumed: bool) -> Self { use TypeKind::*; // println!("{:?}, {:?}", ty, ty.get_class_type()); @@ -333,7 +327,6 @@ impl RustType { name: "Object".to_string(), generics: Vec::new(), }, - is_return, is_const: ty.is_const_qualified(), lifetime, nullability, @@ -345,7 +338,7 @@ impl RustType { let ty = ty.get_pointee_type().expect("pointer type to have pointee"); // Note: Can't handle const id pointers // assert!(!ty.is_const_qualified(), "expected pointee to not be const"); - let pointee = Self::parse(ty, false, is_consumed); + let pointee = Self::parse(ty, is_consumed); Self::Pointer { nullability, is_const, @@ -360,7 +353,6 @@ impl RustType { Self::Id { type_, - is_return, is_const: ty.is_const_qualified(), lifetime, nullability, @@ -378,21 +370,15 @@ impl RustType { "uint32_t" => Self::U32, "int164_t" => Self::I64, "uint64_t" => Self::U64, - "instancetype" => { - if !is_return { - panic!("instancetype in non-return position") - } - Self::Id { - type_: GenericType { - name: "Self".to_string(), - generics: Vec::new(), - }, - is_return, - is_const: ty.is_const_qualified(), - lifetime, - nullability, - } - } + "instancetype" => Self::Id { + type_: GenericType { + name: "Self".to_string(), + generics: Vec::new(), + }, + is_const: ty.is_const_qualified(), + lifetime, + nullability, + }, _ => { let ty = ty.get_canonical_type(); match ty.get_kind() { @@ -409,7 +395,6 @@ impl RustType { name: typedef_name, generics: Vec::new(), }, - is_return, is_const: ty.is_const_qualified(), lifetime, nullability, @@ -432,7 +417,6 @@ impl RustType { ConstantArray => { let element_type = Self::parse( ty.get_element_type().expect("array to have element type"), - false, is_consumed, ); let num_elements = ty @@ -460,20 +444,8 @@ impl RustType { } } - pub fn parse_return(ty: Type<'_>) -> Self { - let this = Self::parse(ty, true, false); - - this.visit_lifetime(|lifetime| { - if lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime in return {this:?}"); - } - }); - - this - } - pub fn parse_argument(ty: Type<'_>, is_consumed: bool) -> Self { - let this = Self::parse(ty, false, is_consumed); + let this = Self::parse(ty, is_consumed); match &this { Self::Pointer { pointee, .. } => pointee.visit_lifetime(|lifetime| { @@ -492,7 +464,7 @@ impl RustType { } pub fn parse_typedef(ty: Type<'_>) -> Self { - let this = Self::parse(ty, false, false); + let this = Self::parse(ty, false); this.visit_lifetime(|lifetime| { if lifetime != Lifetime::Unspecified { @@ -536,18 +508,13 @@ impl ToTokens for RustType { // Objective-C Id { type_, - is_return, // Ignore is_const: _, // Ignore lifetime: _, nullability, } => { - let tokens = if *is_return { - quote!(Id<#type_, Shared>) - } else { - quote!(&#type_) - }; + let tokens = quote!(&#type_); if *nullability == Nullability::NonNull { tokens } else { @@ -578,7 +545,6 @@ impl ToTokens for RustType { } => match &**pointee { Self::Id { type_: tokens, - is_return: false, is_const: false, lifetime: Lifetime::Autoreleasing, nullability: inner_nullability, @@ -603,7 +569,6 @@ impl ToTokens for RustType { } Self::Id { type_: tokens, - is_return: false, is_const: false, lifetime: Lifetime::Unspecified, nullability: inner_nullability, @@ -649,3 +614,54 @@ impl ToTokens for RustType { tokens.append_all(result); } } + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct RustTypeReturn { + inner: RustType, +} + +impl RustTypeReturn { + pub fn is_id(&self) -> bool { + matches!(self.inner, RustType::Id { .. }) + } + + pub fn new(inner: RustType) -> Self { + Self { inner } + } + + pub fn parse(ty: Type<'_>) -> Self { + let inner = RustType::parse(ty, false); + + inner.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in return {inner:?}"); + } + }); + + Self::new(inner) + } +} + +impl ToTokens for RustTypeReturn { + fn to_tokens(&self, tokens: &mut TokenStream) { + let result = match &self.inner { + RustType::Void => return, + RustType::Id { + type_, + // Ignore + is_const: _, + // Ignore + lifetime: _, + nullability, + } => { + if *nullability == Nullability::NonNull { + quote!(Id<#type_, Shared>) + } else { + quote!(Option>) + } + } + type_ => quote!(#type_), + }; + tokens.append_all(quote!(-> #result)); + } +} From 1be48286ae08c1cad3de95f9b015f3a6ff17204c Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 7 Oct 2022 16:17:23 +0200 Subject: [PATCH 059/131] Refactor property parsing Fixes their order to be the same as in the source file --- crates/header-translator/src/config.rs | 2 + crates/header-translator/src/lib.rs | 1 + crates/header-translator/src/method.rs | 88 ++++--- crates/header-translator/src/property.rs | 176 ++++++++++++++ crates/header-translator/src/rust_type.rs | 36 +-- crates/header-translator/src/stmt.rs | 89 ++++++-- crates/icrate/src/AppKit.toml | 4 + crates/icrate/src/Foundation.toml | 4 +- .../Foundation/NSAppleEventDescriptor.rs | 102 ++++----- .../Foundation/NSAppleEventManager.rs | 12 +- .../src/generated/Foundation/NSAppleScript.rs | 12 +- .../src/generated/Foundation/NSArchiver.rs | 24 +- .../src/generated/Foundation/NSArray.rs | 30 +-- .../Foundation/NSAttributedString.rs | 36 +-- .../NSBackgroundActivityScheduler.rs | 12 +- .../src/generated/Foundation/NSBundle.rs | 184 +++++++-------- .../src/generated/Foundation/NSCache.rs | 24 +- .../src/generated/Foundation/NSCalendar.rs | 216 +++++++++--------- .../generated/Foundation/NSCharacterSet.rs | 66 +++--- .../Foundation/NSClassDescription.rs | 18 +- .../src/generated/Foundation/NSCoder.rs | 24 +- .../Foundation/NSCompoundPredicate.rs | 12 +- .../src/generated/Foundation/NSConnection.rs | 120 +++++----- .../icrate/src/generated/Foundation/NSData.rs | 6 +- .../icrate/src/generated/Foundation/NSDate.rs | 42 ++-- .../Foundation/NSDateComponentsFormatter.rs | 26 +-- .../generated/Foundation/NSDateFormatter.rs | 18 +- .../generated/Foundation/NSDateInterval.rs | 18 +- .../Foundation/NSDateIntervalFormatter.rs | 26 +-- .../generated/Foundation/NSDecimalNumber.rs | 42 ++-- .../src/generated/Foundation/NSDictionary.rs | 30 +-- .../NSDistributedNotificationCenter.rs | 12 +- .../generated/Foundation/NSEnergyFormatter.rs | 36 +-- .../src/generated/Foundation/NSError.rs | 26 +-- .../src/generated/Foundation/NSException.rs | 6 +- .../src/generated/Foundation/NSExpression.rs | 20 +- .../Foundation/NSExtensionContext.rs | 6 +- .../generated/Foundation/NSFileCoordinator.rs | 18 +- .../src/generated/Foundation/NSFileHandle.rs | 36 +-- .../src/generated/Foundation/NSFileManager.rs | 48 ++-- .../src/generated/Foundation/NSFileVersion.rs | 42 ++-- .../src/generated/Foundation/NSFileWrapper.rs | 66 +++--- .../Foundation/NSHTTPCookieStorage.rs | 24 +- .../src/generated/Foundation/NSHashTable.rs | 24 +- .../icrate/src/generated/Foundation/NSHost.rs | 18 +- .../Foundation/NSISO8601DateFormatter.rs | 24 +- .../src/generated/Foundation/NSIndexPath.rs | 6 +- .../src/generated/Foundation/NSIndexSet.rs | 18 +- .../src/generated/Foundation/NSInvocation.rs | 36 +-- .../generated/Foundation/NSItemProvider.rs | 30 +-- .../generated/Foundation/NSKeyValueCoding.rs | 6 +- .../generated/Foundation/NSKeyedArchiver.rs | 48 ++-- .../generated/Foundation/NSLengthFormatter.rs | 36 +-- .../Foundation/NSLinguisticTagger.rs | 24 +- .../generated/Foundation/NSListFormatter.rs | 24 +- .../src/generated/Foundation/NSLocale.rs | 126 +++++----- .../icrate/src/generated/Foundation/NSLock.rs | 6 +- .../src/generated/Foundation/NSMapTable.rs | 18 +- .../generated/Foundation/NSMassFormatter.rs | 36 +-- .../src/generated/Foundation/NSMeasurement.rs | 12 +- .../Foundation/NSMeasurementFormatter.rs | 18 +- .../src/generated/Foundation/NSMetadata.rs | 76 +++--- .../generated/Foundation/NSMethodSignature.rs | 12 +- .../src/generated/Foundation/NSNetServices.rs | 84 +++---- .../generated/Foundation/NSNotification.rs | 24 +- .../Foundation/NSNotificationQueue.rs | 6 +- .../generated/Foundation/NSNumberFormatter.rs | 12 +- .../src/generated/Foundation/NSObject.rs | 6 +- .../generated/Foundation/NSObjectScripting.rs | 18 +- .../src/generated/Foundation/NSOperation.rs | 42 ++-- .../Foundation/NSOrderedCollectionChange.rs | 24 +- .../NSOrderedCollectionDifference.rs | 18 +- .../src/generated/Foundation/NSOrderedSet.rs | 42 ++-- .../src/generated/Foundation/NSOrthography.rs | 18 +- .../generated/Foundation/NSPathUtilities.rs | 66 +++--- .../NSPersonNameComponentsFormatter.rs | 36 +-- .../generated/Foundation/NSPointerArray.rs | 6 +- .../icrate/src/generated/Foundation/NSPort.rs | 18 +- .../src/generated/Foundation/NSPortCoder.rs | 6 +- .../src/generated/Foundation/NSPortMessage.rs | 6 +- .../src/generated/Foundation/NSPredicate.rs | 6 +- .../src/generated/Foundation/NSProcessInfo.rs | 48 ++-- .../src/generated/Foundation/NSProgress.rs | 70 +++--- .../src/generated/Foundation/NSProxy.rs | 12 +- .../Foundation/NSRegularExpression.rs | 6 +- .../Foundation/NSRelativeDateTimeFormatter.rs | 58 ++--- .../src/generated/Foundation/NSRunLoop.rs | 18 +- .../src/generated/Foundation/NSScanner.rs | 12 +- .../Foundation/NSScriptClassDescription.rs | 36 +-- .../generated/Foundation/NSScriptCommand.rs | 30 +-- .../Foundation/NSScriptCommandDescription.rs | 48 ++-- .../Foundation/NSScriptObjectSpecifiers.rs | 52 ++--- .../Foundation/NSScriptSuiteRegistry.rs | 6 +- .../icrate/src/generated/Foundation/NSSet.rs | 18 +- .../generated/Foundation/NSSortDescriptor.rs | 24 +- .../src/generated/Foundation/NSSpellServer.rs | 12 +- .../src/generated/Foundation/NSStream.rs | 24 +- .../src/generated/Foundation/NSString.rs | 144 ++++++------ .../icrate/src/generated/Foundation/NSTask.rs | 54 ++--- .../Foundation/NSTextCheckingResult.rs | 24 +- .../src/generated/Foundation/NSThread.rs | 68 +++--- .../src/generated/Foundation/NSTimeZone.rs | 44 ++-- .../src/generated/Foundation/NSTimer.rs | 6 +- .../icrate/src/generated/Foundation/NSURL.rs | 162 ++++++------- .../src/generated/Foundation/NSURLCache.rs | 12 +- .../generated/Foundation/NSURLConnection.rs | 12 +- .../Foundation/NSURLCredentialStorage.rs | 18 +- .../src/generated/Foundation/NSURLProtocol.rs | 18 +- .../src/generated/Foundation/NSURLRequest.rs | 24 +- .../src/generated/Foundation/NSURLResponse.rs | 12 +- .../src/generated/Foundation/NSURLSession.rs | 138 +++++------ .../Foundation/NSUbiquitousKeyValueStore.rs | 12 +- .../src/generated/Foundation/NSUndoManager.rs | 102 ++++----- .../icrate/src/generated/Foundation/NSUnit.rs | 36 +-- .../generated/Foundation/NSUserActivity.rs | 68 +++--- .../generated/Foundation/NSUserDefaults.rs | 12 +- .../Foundation/NSUserNotification.rs | 30 +-- .../generated/Foundation/NSUserScriptTask.rs | 40 ++-- .../src/generated/Foundation/NSValue.rs | 36 +-- .../src/generated/Foundation/NSXMLDTD.rs | 24 +- .../src/generated/Foundation/NSXMLDocument.rs | 78 +++---- .../src/generated/Foundation/NSXMLElement.rs | 24 +- .../src/generated/Foundation/NSXMLNode.rs | 108 ++++----- .../src/generated/Foundation/NSXMLParser.rs | 12 +- .../generated/Foundation/NSXPCConnection.rs | 90 ++++---- 125 files changed, 2515 insertions(+), 2243 deletions(-) create mode 100644 crates/header-translator/src/property.rs diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index fca1084f1..d776088f7 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -18,6 +18,8 @@ pub struct Config { pub struct ClassData { #[serde(default)] pub methods: HashMap, + #[serde(default)] + pub properties: HashMap, } #[derive(Deserialize, Debug, Clone, Copy, PartialEq, Eq)] diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index c773847f8..787814b50 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -8,6 +8,7 @@ mod availability; mod config; mod method; mod objc2_utils; +mod property; mod rust_type; mod stmt; diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index fdf5a7270..7b29271bf 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -3,12 +3,12 @@ use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; -use crate::config::ClassData; +use crate::config::MethodData; use crate::objc2_utils::in_selector_family; use crate::rust_type::{RustType, RustTypeReturn}; #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] -enum Qualifier { +pub enum Qualifier { In, Inout, Out, @@ -18,7 +18,7 @@ enum Qualifier { } impl Qualifier { - fn parse(qualifiers: ObjCQualifiers) -> Self { + pub fn parse(qualifiers: ObjCQualifiers) -> Self { match qualifiers { ObjCQualifiers { in_: true, @@ -74,7 +74,7 @@ impl Qualifier { } #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] -enum MemoryManagement { +pub enum MemoryManagement { /// Consumes self and returns retained pointer Init, ReturnsRetained, @@ -112,36 +112,58 @@ impl MemoryManagement { #[allow(dead_code)] #[derive(Debug, Clone)] pub struct Method { - selector: String, - fn_name: String, - availability: Availability, - is_class_method: bool, - is_optional_protocol_method: bool, - memory_management: MemoryManagement, - designated_initializer: bool, - arguments: Vec<(String, Option, RustType)>, - result_type: RustTypeReturn, - safe: bool, + pub selector: String, + pub fn_name: String, + pub availability: Availability, + pub is_class: bool, + pub is_optional_protocol: bool, + pub memory_management: MemoryManagement, + pub designated_initializer: bool, + pub arguments: Vec<(String, Option, RustType)>, + pub result_type: RustTypeReturn, + pub safe: bool, } impl Method { /// Takes one of `EntityKind::ObjCInstanceMethodDecl` or /// `EntityKind::ObjCClassMethodDecl`. - pub fn parse(entity: Entity<'_>, class_data: Option<&ClassData>) -> Option { - // println!("Method {:?}", entity.get_display_name()); + pub fn partial(entity: Entity<'_>) -> PartialMethod<'_> { let selector = entity.get_name().expect("method selector"); let fn_name = selector.trim_end_matches(|c| c == ':').replace(':', "_"); - let data = class_data - .map(|class_data| { - class_data - .methods - .get(&fn_name) - .copied() - .unwrap_or_default() - }) - .unwrap_or_default(); + let is_class = match entity.get_kind() { + EntityKind::ObjCInstanceMethodDecl => false, + EntityKind::ObjCClassMethodDecl => true, + _ => unreachable!("unknown method kind"), + }; + + PartialMethod { + entity, + selector, + is_class, + fn_name, + } + } +} +#[derive(Debug, Clone)] +pub struct PartialMethod<'tu> { + entity: Entity<'tu>, + selector: String, + pub is_class: bool, + pub fn_name: String, +} + +impl<'tu> PartialMethod<'tu> { + pub fn parse(self, data: MethodData) -> Option { + let Self { + entity, + selector, + is_class, + fn_name, + } = self; + + // println!("Method {:?}", selector); if data.skipped { return None; } @@ -157,12 +179,6 @@ impl Method { .expect("method availability"), ); - let is_class_method = match entity.get_kind() { - EntityKind::ObjCInstanceMethodDecl => false, - EntityKind::ObjCClassMethodDecl => true, - _ => unreachable!("unknown method kind"), - }; - let arguments: Vec<_> = entity .get_arguments() .expect("method arguments") @@ -274,12 +290,12 @@ impl Method { memory_management.verify_sel(&selector); } - Some(Self { + Some(Method { selector, fn_name, availability, - is_class_method, - is_optional_protocol_method: entity.is_objc_optional(), + is_class, + is_optional_protocol: entity.is_objc_optional(), memory_management, designated_initializer, arguments, @@ -338,7 +354,7 @@ impl ToTokens for Method { let unsafe_ = if self.safe { quote!() } else { quote!(unsafe) }; - let result = if self.is_class_method { + let result = if self.is_class { quote! { pub #unsafe_ fn #fn_name(#(#fn_args),*) #ret { #macro_name![Self::class(), #method_call] @@ -355,7 +371,7 @@ impl ToTokens for Method { } } -fn handle_reserved(s: &str) -> &str { +pub(crate) fn handle_reserved(s: &str) -> &str { match s { "type" => "type_", "trait" => "trait_", diff --git a/crates/header-translator/src/property.rs b/crates/header-translator/src/property.rs new file mode 100644 index 000000000..28ce3bcc3 --- /dev/null +++ b/crates/header-translator/src/property.rs @@ -0,0 +1,176 @@ +use clang::{Entity, EntityKind, EntityVisitResult, Nullability, ObjCAttributes}; +use proc_macro2::TokenStream; +use quote::ToTokens; + +use crate::availability::Availability; +use crate::config::MethodData; +use crate::method::{MemoryManagement, Method, Qualifier}; +use crate::rust_type::{RustType, RustTypeReturn}; + +#[allow(dead_code)] +#[derive(Debug, Clone)] +pub struct Property { + name: String, + getter_name: String, + setter_name: Option, + availability: Availability, + is_class: bool, + is_optional_protocol: bool, + type_in: RustType, + type_out: RustType, + safe: bool, +} + +impl Property { + /// Takes `EntityKind::ObjCPropertyDecl`. + pub fn partial(entity: Entity<'_>) -> PartialProperty<'_> { + let attributes = entity.get_objc_attributes(); + let has_setter = attributes.map(|a| !a.readonly).unwrap_or(true); + + PartialProperty { + entity, + name: entity.get_display_name().expect("property getter name"), + getter_name: entity.get_objc_getter_name().expect("property getter name"), + setter_name: has_setter.then(|| { + entity + .get_objc_setter_name() + .expect("property setter name") + .trim_end_matches(|c| c == ':') + .to_string() + }), + is_class: attributes.map(|a| a.class).unwrap_or(false), + attributes: entity.get_objc_attributes(), + } + } +} + +#[derive(Debug, Clone)] +pub struct PartialProperty<'tu> { + entity: Entity<'tu>, + pub name: String, + pub getter_name: String, + pub setter_name: Option, + pub is_class: bool, + attributes: Option, +} + +impl PartialProperty<'_> { + pub fn parse(self, data: MethodData) -> Option { + let Self { + entity, + name, + getter_name, + setter_name, + is_class, + attributes, + } = self; + + if data.skipped { + return None; + } + + // println!("Property {getter_name:?}/{setter_name:?}: {attributes:?}"); + + let availability = Availability::parse( + entity + .get_platform_availability() + .expect("method availability"), + ); + + // `@property(copy)` for some reason returns nonnull? + // + // Swift signifies that they use forced unwrapping here, perhaps + // because they know that it can fail (e.g. in OOM situations), but + // is very unlikely to? + let default_nullability = if attributes.map(|a| a.copy).unwrap_or(false) { + Nullability::NonNull + } else { + Nullability::Unspecified + }; + + let type_in = RustType::parse_property( + entity.get_type().expect("property type"), + Nullability::Unspecified, + ); + let type_out = RustType::parse_property( + entity.get_type().expect("property type"), + default_nullability, + ); + + let mut memory_management = MemoryManagement::Normal; + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::ObjCClassRef + | EntityKind::ObjCProtocolRef + | EntityKind::TypeRef + | EntityKind::ParmDecl => { + // Ignore + } + EntityKind::ObjCReturnsInnerPointer => { + if memory_management != MemoryManagement::Normal { + panic!("got unexpected ObjCReturnsInnerPointer") + } + memory_management = MemoryManagement::ReturnsInnerPointer; + } + EntityKind::ObjCInstanceMethodDecl => { + println!("method in property: {entity:?}"); + } + EntityKind::IbOutletAttr => { + // TODO: What is this? + } + EntityKind::UnexposedAttr => {} + _ => panic!("Unknown property child: {:?}, {:?}", entity, _parent), + }; + EntityVisitResult::Continue + }); + + let qualifier = entity.get_objc_qualifiers().map(Qualifier::parse); + assert_eq!(qualifier, None, "properties do not support qualifiers"); + + Some(Property { + name, + getter_name, + setter_name, + availability, + is_class, + is_optional_protocol: entity.is_objc_optional(), + type_in, + type_out, + safe: !data.unsafe_, + }) + } +} + +impl ToTokens for Property { + fn to_tokens(&self, tokens: &mut TokenStream) { + let method = Method { + selector: self.getter_name.clone(), + fn_name: self.getter_name.clone(), + availability: self.availability.clone(), + is_class: self.is_class, + is_optional_protocol: self.is_optional_protocol, + memory_management: MemoryManagement::Normal, + designated_initializer: false, + arguments: Vec::new(), + result_type: RustTypeReturn::new(self.type_out.clone()), + safe: self.safe, + }; + method.to_tokens(tokens); + if let Some(setter_name) = &self.setter_name { + let method = Method { + selector: setter_name.clone() + ":", + fn_name: setter_name.clone(), + availability: self.availability.clone(), + is_class: self.is_class, + is_optional_protocol: self.is_optional_protocol, + memory_management: MemoryManagement::Normal, + designated_initializer: false, + arguments: Vec::from([(self.name.clone(), None, self.type_in.clone())]), + result_type: RustTypeReturn::new(RustType::Void), + safe: self.safe, + }; + method.to_tokens(tokens); + } + } +} diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index f78a45713..82f30e44d 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -36,7 +36,7 @@ impl GenericType { .get_objc_type_arguments() .into_iter() .map(|param| { - match RustType::parse(param, false) { + match RustType::parse(param, false, Nullability::Unspecified) { RustType::Id { type_, is_const: _, @@ -295,12 +295,11 @@ pub enum RustType { } impl RustType { - fn parse(ty: Type<'_>, is_consumed: bool) -> Self { + fn parse(ty: Type<'_>, is_consumed: bool, mut nullability: Nullability) -> Self { use TypeKind::*; // println!("{:?}, {:?}", ty, ty.get_class_type()); - let mut nullability = Nullability::Unspecified; let mut lifetime = Lifetime::Unspecified; let ty = parse_attributed(ty, &mut nullability, &mut lifetime, None); @@ -338,7 +337,7 @@ impl RustType { let ty = ty.get_pointee_type().expect("pointer type to have pointee"); // Note: Can't handle const id pointers // assert!(!ty.is_const_qualified(), "expected pointee to not be const"); - let pointee = Self::parse(ty, is_consumed); + let pointee = Self::parse(ty, is_consumed, Nullability::Unspecified); Self::Pointer { nullability, is_const, @@ -418,6 +417,7 @@ impl RustType { let element_type = Self::parse( ty.get_element_type().expect("array to have element type"), is_consumed, + Nullability::Unspecified, ); let num_elements = ty .get_size() @@ -445,7 +445,7 @@ impl RustType { } pub fn parse_argument(ty: Type<'_>, is_consumed: bool) -> Self { - let this = Self::parse(ty, is_consumed); + let this = Self::parse(ty, is_consumed, Nullability::Unspecified); match &this { Self::Pointer { pointee, .. } => pointee.visit_lifetime(|lifetime| { @@ -464,7 +464,7 @@ impl RustType { } pub fn parse_typedef(ty: Type<'_>) -> Self { - let this = Self::parse(ty, false); + let this = Self::parse(ty, false, Nullability::Unspecified); this.visit_lifetime(|lifetime| { if lifetime != Lifetime::Unspecified { @@ -474,6 +474,18 @@ impl RustType { this } + + pub fn parse_property(ty: Type<'_>, default_nullability: Nullability) -> Self { + let this = Self::parse(ty, false, default_nullability); + + this.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in property {this:?}"); + } + }); + + this + } } impl ToTokens for RustType { @@ -626,19 +638,17 @@ impl RustTypeReturn { } pub fn new(inner: RustType) -> Self { - Self { inner } - } - - pub fn parse(ty: Type<'_>) -> Self { - let inner = RustType::parse(ty, false); - inner.visit_lifetime(|lifetime| { if lifetime != Lifetime::Unspecified { panic!("unexpected lifetime in return {inner:?}"); } }); - Self::new(inner) + Self { inner } + } + + pub fn parse(ty: Type<'_>) -> Self { + Self::new(RustType::parse(ty, false, Nullability::Unspecified)) } } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index d9740d082..1e7e424b5 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -1,3 +1,5 @@ +use std::collections::HashSet; + use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; use proc_macro2::TokenStream; use quote::{format_ident, quote, ToTokens, TokenStreamExt}; @@ -5,8 +7,24 @@ use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; use crate::config::{ClassData, Config}; use crate::method::Method; +use crate::property::Property; use crate::rust_type::{GenericType, RustType}; +#[derive(Debug, Clone)] +pub enum MethodOrProperty { + Method(Method), + Property(Property), +} + +impl ToTokens for MethodOrProperty { + fn to_tokens(&self, tokens: &mut TokenStream) { + match self { + Self::Method(method) => method.to_tokens(tokens), + Self::Property(property) => property.to_tokens(tokens), + } + } +} + /// Takes one of: /// - `EntityKind::ObjCInterfaceDecl` /// - `EntityKind::ObjCProtocolDecl` @@ -16,14 +34,18 @@ fn parse_objc_decl( mut superclass: Option<&mut Option>>, mut generics: Option<&mut Vec>, class_data: Option<&ClassData>, -) -> (Vec, Vec) { +) -> (Vec, Vec) { let mut protocols = Vec::new(); let mut methods = Vec::new(); + // Track seen properties, so that when methods are autogenerated by the + // compiler from them, we can skip them + let mut properties = HashSet::new(); + entity.visit_children(|entity, _parent| { match entity.get_kind() { - EntityKind::ObjCExplicitProtocolImpl if generics.is_some() && superclass.is_none() => { - // TODO + EntityKind::ObjCExplicitProtocolImpl if generics.is_none() && superclass.is_none() => { + // TODO NS_PROTOCOL_REQUIRES_EXPLICIT_IMPLEMENTATION } EntityKind::ObjCIvarDecl if superclass.is_some() => { // Explicitly ignored @@ -60,17 +82,48 @@ fn parse_objc_decl( protocols.push(entity.get_name().expect("protocolref to have name")); } EntityKind::ObjCInstanceMethodDecl | EntityKind::ObjCClassMethodDecl => { - if let Some(method) = Method::parse(entity, class_data) { - methods.push(method); + let partial = Method::partial(entity); + + if !properties.remove(&(partial.is_class, partial.fn_name.clone())) { + let data = class_data + .map(|class_data| { + class_data + .methods + .get(&partial.fn_name) + .copied() + .unwrap_or_default() + }) + .unwrap_or_default(); + if let Some(method) = partial.parse(data) { + methods.push(MethodOrProperty::Method(method)); + } } } EntityKind::ObjCPropertyDecl => { - // println!( - // "Property {:?}, {:?}", - // entity.get_display_name().unwrap(), - // entity.get_objc_attributes().unwrap() - // ); - // methods.push(quote! {}); + let partial = Property::partial(entity); + let data = class_data + .map(|class_data| { + class_data + .properties + .get(&partial.name) + .copied() + .unwrap_or_default() + }) + .unwrap_or_default(); + + assert!( + properties.insert((partial.is_class, partial.getter_name.clone())), + "already exisiting property" + ); + if let Some(setter_name) = partial.setter_name.clone() { + assert!( + properties.insert((partial.is_class, setter_name)), + "already exisiting property" + ); + } + if let Some(property) = partial.parse(data) { + methods.push(MethodOrProperty::Property(property)); + } } EntityKind::VisibilityAttr if superclass.is_some() => { // NS_CLASS_AVAILABLE_MAC?? @@ -88,6 +141,14 @@ fn parse_objc_decl( EntityVisitResult::Continue }); + if !properties.is_empty() { + if properties == HashSet::from([(false, "setDisplayName".to_owned())]) { + // TODO + } else { + panic!("did not properly add methods to properties:\n{methods:?}\n{properties:?}"); + } + } + (protocols, methods) } @@ -106,7 +167,7 @@ pub enum Stmt { superclass: Option, generics: Vec, protocols: Vec, - methods: Vec, + methods: Vec, }, /// @interface class_name (name) CategoryDecl { @@ -117,14 +178,14 @@ pub enum Stmt { generics: Vec, /// I don't quite know what this means? protocols: Vec, - methods: Vec, + methods: Vec, }, /// @protocol name ProtocolDecl { name: String, availability: Availability, protocols: Vec, - methods: Vec, + methods: Vec, }, /// typedef Type TypedefName; AliasDecl { name: String, type_: RustType }, diff --git a/crates/icrate/src/AppKit.toml b/crates/icrate/src/AppKit.toml index 0cefe738d..da4a9a57a 100644 --- a/crates/icrate/src/AppKit.toml +++ b/crates/icrate/src/AppKit.toml @@ -3,3 +3,7 @@ skipped = true [class.NSView.methods.releaseGState] skipped = true + +# Works weirdly since it's defined both as a property, and as a method. +[class.NSDocument.methods.setDisplayName] +skipped = true diff --git a/crates/icrate/src/Foundation.toml b/crates/icrate/src/Foundation.toml index 9b7162c2d..f0655624a 100644 --- a/crates/icrate/src/Foundation.toml +++ b/crates/icrate/src/Foundation.toml @@ -13,6 +13,8 @@ stringByAppendingString = { unsafe = false } stringByAppendingPathComponent = { unsafe = false } # Assuming `NSStringEncoding` can be made safe lengthOfBytesUsingEncoding = { unsafe = false } + +[class.NSString.properties] length = { unsafe = false } # Safe to call, but the returned pointer may not be safe to use UTF8String = { unsafe = false } @@ -23,7 +25,7 @@ initWithString = { unsafe = false } # "appendString:" = { unsafe = false, mutable = true } # "setString:" = { unsafe = false, mutable = true } -[class.NSBlockOperation.methods] +[class.NSBlockOperation.properties] # Uses `NSArray`, which is difficult to handle executionBlocks = { skipped = true } diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index fca8bcfba..599ecbc36 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -157,6 +157,51 @@ impl NSAppleEventDescriptor { pub unsafe fn initRecordDescriptor(&self) -> Id { msg_send_id![self, initRecordDescriptor] } + pub unsafe fn aeDesc(&self) -> *mut AEDesc { + msg_send![self, aeDesc] + } + pub unsafe fn descriptorType(&self) -> DescType { + msg_send![self, descriptorType] + } + pub unsafe fn data(&self) -> Id { + msg_send_id![self, data] + } + pub unsafe fn booleanValue(&self) -> Boolean { + msg_send![self, booleanValue] + } + pub unsafe fn enumCodeValue(&self) -> OSType { + msg_send![self, enumCodeValue] + } + pub unsafe fn int32Value(&self) -> SInt32 { + msg_send![self, int32Value] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } + pub unsafe fn typeCodeValue(&self) -> OSType { + msg_send![self, typeCodeValue] + } + pub unsafe fn stringValue(&self) -> Option> { + msg_send_id![self, stringValue] + } + pub unsafe fn dateValue(&self) -> Option> { + msg_send_id![self, dateValue] + } + pub unsafe fn fileURLValue(&self) -> Option> { + msg_send_id![self, fileURLValue] + } + pub unsafe fn eventClass(&self) -> AEEventClass { + msg_send![self, eventClass] + } + pub unsafe fn eventID(&self) -> AEEventID { + msg_send![self, eventID] + } + pub unsafe fn returnID(&self) -> AEReturnID { + msg_send![self, returnID] + } + pub unsafe fn transactionID(&self) -> AETransactionID { + msg_send![self, transactionID] + } pub unsafe fn setParamDescriptor_forKeyword( &self, descriptor: &NSAppleEventDescriptor, @@ -203,6 +248,12 @@ impl NSAppleEventDescriptor { error: error ] } + pub unsafe fn isRecordDescriptor(&self) -> bool { + msg_send![self, isRecordDescriptor] + } + pub unsafe fn numberOfItems(&self) -> NSInteger { + msg_send![self, numberOfItems] + } pub unsafe fn insertDescriptor_atIndex( &self, descriptor: &NSAppleEventDescriptor, @@ -244,55 +295,4 @@ impl NSAppleEventDescriptor { ) -> Option> { msg_send_id![self, coerceToDescriptorType: descriptorType] } - pub unsafe fn aeDesc(&self) -> *mut AEDesc { - msg_send![self, aeDesc] - } - pub unsafe fn descriptorType(&self) -> DescType { - msg_send![self, descriptorType] - } - pub unsafe fn data(&self) -> Id { - msg_send_id![self, data] - } - pub unsafe fn booleanValue(&self) -> Boolean { - msg_send![self, booleanValue] - } - pub unsafe fn enumCodeValue(&self) -> OSType { - msg_send![self, enumCodeValue] - } - pub unsafe fn int32Value(&self) -> SInt32 { - msg_send![self, int32Value] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } - pub unsafe fn typeCodeValue(&self) -> OSType { - msg_send![self, typeCodeValue] - } - pub unsafe fn stringValue(&self) -> Option> { - msg_send_id![self, stringValue] - } - pub unsafe fn dateValue(&self) -> Option> { - msg_send_id![self, dateValue] - } - pub unsafe fn fileURLValue(&self) -> Option> { - msg_send_id![self, fileURLValue] - } - pub unsafe fn eventClass(&self) -> AEEventClass { - msg_send![self, eventClass] - } - pub unsafe fn eventID(&self) -> AEEventID { - msg_send![self, eventID] - } - pub unsafe fn returnID(&self) -> AEReturnID { - msg_send![self, returnID] - } - pub unsafe fn transactionID(&self) -> AETransactionID { - msg_send![self, transactionID] - } - pub unsafe fn isRecordDescriptor(&self) -> bool { - msg_send![self, isRecordDescriptor] - } - pub unsafe fn numberOfItems(&self) -> NSInteger { - msg_send![self, numberOfItems] - } } diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index 4dfa8ab37..c74086e2f 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -56,6 +56,12 @@ impl NSAppleEventManager { handlerRefCon: handlerRefCon ] } + pub unsafe fn currentAppleEvent(&self) -> Option> { + msg_send_id![self, currentAppleEvent] + } + pub unsafe fn currentReplyAppleEvent(&self) -> Option> { + msg_send_id![self, currentReplyAppleEvent] + } pub unsafe fn suspendCurrentAppleEvent(&self) -> NSAppleEventManagerSuspensionID { msg_send![self, suspendCurrentAppleEvent] } @@ -83,10 +89,4 @@ impl NSAppleEventManager { pub unsafe fn resumeWithSuspensionID(&self, suspensionID: NSAppleEventManagerSuspensionID) { msg_send![self, resumeWithSuspensionID: suspensionID] } - pub unsafe fn currentAppleEvent(&self) -> Option> { - msg_send_id![self, currentAppleEvent] - } - pub unsafe fn currentReplyAppleEvent(&self) -> Option> { - msg_send_id![self, currentReplyAppleEvent] - } } diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index 6d0832277..5008fc853 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -25,6 +25,12 @@ impl NSAppleScript { pub unsafe fn initWithSource(&self, source: &NSString) -> Option> { msg_send_id![self, initWithSource: source] } + pub unsafe fn source(&self) -> Option> { + msg_send_id![self, source] + } + pub unsafe fn isCompiled(&self) -> bool { + msg_send![self, isCompiled] + } pub unsafe fn compileAndReturnError( &self, errorInfo: Option<&mut Option, Shared>>>, @@ -44,10 +50,4 @@ impl NSAppleScript { ) -> Id { msg_send_id![self, executeAppleEvent: event, error: errorInfo] } - pub unsafe fn source(&self) -> Option> { - msg_send_id![self, source] - } - pub unsafe fn isCompiled(&self) -> bool { - msg_send![self, isCompiled] - } } diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index fb8dc629d..516b1cee7 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -20,6 +20,9 @@ impl NSArchiver { pub unsafe fn initForWritingWithMutableData(&self, mdata: &NSMutableData) -> Id { msg_send_id![self, initForWritingWithMutableData: mdata] } + pub unsafe fn archiverData(&self) -> Id { + msg_send_id![self, archiverData] + } pub unsafe fn encodeRootObject(&self, rootObject: &Object) { msg_send![self, encodeRootObject: rootObject] } @@ -52,9 +55,6 @@ impl NSArchiver { pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object) { msg_send![self, replaceObject: object, withObject: newObject] } - pub unsafe fn archiverData(&self) -> Id { - msg_send_id![self, archiverData] - } } extern_class!( #[derive(Debug)] @@ -73,6 +73,12 @@ impl NSUnarchiver { pub unsafe fn objectZone(&self) -> *mut NSZone { msg_send![self, objectZone] } + pub unsafe fn isAtEnd(&self) -> bool { + msg_send![self, isAtEnd] + } + pub unsafe fn systemVersion(&self) -> c_uint { + msg_send![self, systemVersion] + } pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option> { msg_send_id![Self::class(), unarchiveObjectWithData: data] } @@ -110,22 +116,16 @@ impl NSUnarchiver { pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object) { msg_send![self, replaceObject: object, withObject: newObject] } - pub unsafe fn isAtEnd(&self) -> bool { - msg_send![self, isAtEnd] - } - pub unsafe fn systemVersion(&self) -> c_uint { - msg_send![self, systemVersion] - } } #[doc = "NSArchiverCallback"] impl NSObject { + pub unsafe fn classForArchiver(&self) -> Option<&Class> { + msg_send![self, classForArchiver] + } pub unsafe fn replacementObjectForArchiver( &self, archiver: &NSArchiver, ) -> Option> { msg_send_id![self, replacementObjectForArchiver: archiver] } - pub unsafe fn classForArchiver(&self) -> Option<&Class> { - msg_send![self, classForArchiver] - } } diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index daf7101cf..735eabf4d 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -19,6 +19,9 @@ __inner_extern_class!( } ); impl NSArray { + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id { msg_send_id![self, objectAtIndex: index] } @@ -35,9 +38,6 @@ impl NSArray { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } } #[doc = "NSExtendedArray"] impl NSArray { @@ -59,6 +59,9 @@ impl NSArray { pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool { msg_send![self, containsObject: anObject] } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { msg_send_id![self, descriptionWithLocale: locale] } @@ -101,12 +104,21 @@ impl NSArray { pub unsafe fn isEqualToArray(&self, otherArray: &NSArray) -> bool { msg_send![self, isEqualToArray: otherArray] } + pub unsafe fn firstObject(&self) -> Option> { + msg_send_id![self, firstObject] + } + pub unsafe fn lastObject(&self) -> Option> { + msg_send_id![self, lastObject] + } pub unsafe fn objectEnumerator(&self) -> Id, Shared> { msg_send_id![self, objectEnumerator] } pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared> { msg_send_id![self, reverseObjectEnumerator] } + pub unsafe fn sortedArrayHint(&self) -> Id { + msg_send_id![self, sortedArrayHint] + } pub unsafe fn sortedArrayUsingFunction_context( &self, comparator: NonNull, @@ -263,18 +275,6 @@ impl NSArray { usingComparator: cmp ] } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn firstObject(&self) -> Option> { - msg_send_id![self, firstObject] - } - pub unsafe fn lastObject(&self) -> Option> { - msg_send_id![self, lastObject] - } - pub unsafe fn sortedArrayHint(&self) -> Id { - msg_send_id![self, sortedArrayHint] - } } #[doc = "NSArrayCreation"] impl NSArray { diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index b074603c7..e67a95064 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -13,6 +13,9 @@ extern_class!( } ); impl NSAttributedString { + pub unsafe fn string(&self) -> Id { + msg_send_id![self, string] + } pub unsafe fn attributesAtIndex_effectiveRange( &self, location: NSUInteger, @@ -20,12 +23,12 @@ impl NSAttributedString { ) -> Id, Shared> { msg_send_id![self, attributesAtIndex: location, effectiveRange: range] } - pub unsafe fn string(&self) -> Id { - msg_send_id![self, string] - } } #[doc = "NSExtendedAttributedString"] impl NSAttributedString { + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } pub unsafe fn attribute_atIndex_effectiveRange( &self, attrName: &NSAttributedStringKey, @@ -120,9 +123,6 @@ impl NSAttributedString { usingBlock: block ] } - pub unsafe fn length(&self) -> NSUInteger { - msg_send![self, length] - } } extern_class!( #[derive(Debug)] @@ -145,6 +145,9 @@ impl NSMutableAttributedString { } #[doc = "NSExtendedMutableAttributedString"] impl NSMutableAttributedString { + pub unsafe fn mutableString(&self) -> Id { + msg_send_id![self, mutableString] + } pub unsafe fn addAttribute_value_range( &self, name: &NSAttributedStringKey, @@ -196,9 +199,6 @@ impl NSMutableAttributedString { pub unsafe fn endEditing(&self) { msg_send![self, endEditing] } - pub unsafe fn mutableString(&self) -> Id { - msg_send_id![self, mutableString] - } } extern_class!( #[derive(Debug)] @@ -324,9 +324,15 @@ extern_class!( } ); impl NSPresentationIntent { + pub unsafe fn intentKind(&self) -> NSPresentationIntentKind { + msg_send![self, intentKind] + } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } + pub unsafe fn parentIntent(&self) -> Option> { + msg_send_id![self, parentIntent] + } pub unsafe fn paragraphIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, @@ -461,15 +467,6 @@ impl NSPresentationIntent { nestedInsideIntent: parent ] } - pub unsafe fn isEquivalentToPresentationIntent(&self, other: &NSPresentationIntent) -> bool { - msg_send![self, isEquivalentToPresentationIntent: other] - } - pub unsafe fn intentKind(&self) -> NSPresentationIntentKind { - msg_send![self, intentKind] - } - pub unsafe fn parentIntent(&self) -> Option> { - msg_send_id![self, parentIntent] - } pub unsafe fn identity(&self) -> NSInteger { msg_send![self, identity] } @@ -497,4 +494,7 @@ impl NSPresentationIntent { pub unsafe fn indentationLevel(&self) -> NSInteger { msg_send![self, indentationLevel] } + pub unsafe fn isEquivalentToPresentationIntent(&self, other: &NSPresentationIntent) -> bool { + msg_send![self, isEquivalentToPresentationIntent: other] + } } diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 444a0c5a0..1b9332b4a 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -16,12 +16,6 @@ impl NSBackgroundActivityScheduler { pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id { msg_send_id![self, initWithIdentifier: identifier] } - pub unsafe fn scheduleWithBlock(&self, block: TodoBlock) { - msg_send![self, scheduleWithBlock: block] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } pub unsafe fn identifier(&self) -> Id { msg_send_id![self, identifier] } @@ -49,6 +43,12 @@ impl NSBackgroundActivityScheduler { pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval) { msg_send![self, setTolerance: tolerance] } + pub unsafe fn scheduleWithBlock(&self, block: TodoBlock) { + msg_send![self, scheduleWithBlock: block] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } pub unsafe fn shouldDefer(&self) -> bool { msg_send![self, shouldDefer] } diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index f2a083562..bd2077917 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -23,6 +23,9 @@ extern_class!( } ); impl NSBundle { + pub unsafe fn mainBundle() -> Id { + msg_send_id![Self::class(), mainBundle] + } pub unsafe fn bundleWithPath(path: &NSString) -> Option> { msg_send_id![Self::class(), bundleWithPath: path] } @@ -41,9 +44,18 @@ impl NSBundle { pub unsafe fn bundleWithIdentifier(identifier: &NSString) -> Option> { msg_send_id![Self::class(), bundleWithIdentifier: identifier] } + pub unsafe fn allBundles() -> Id, Shared> { + msg_send_id![Self::class(), allBundles] + } + pub unsafe fn allFrameworks() -> Id, Shared> { + msg_send_id![Self::class(), allFrameworks] + } pub unsafe fn load(&self) -> bool { msg_send![self, load] } + pub unsafe fn isLoaded(&self) -> bool { + msg_send![self, isLoaded] + } pub unsafe fn unload(&self) -> bool { msg_send![self, unload] } @@ -53,18 +65,63 @@ impl NSBundle { pub unsafe fn loadAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, loadAndReturnError: error] } + pub unsafe fn bundleURL(&self) -> Id { + msg_send_id![self, bundleURL] + } + pub unsafe fn resourceURL(&self) -> Option> { + msg_send_id![self, resourceURL] + } + pub unsafe fn executableURL(&self) -> Option> { + msg_send_id![self, executableURL] + } pub unsafe fn URLForAuxiliaryExecutable( &self, executableName: &NSString, ) -> Option> { msg_send_id![self, URLForAuxiliaryExecutable: executableName] } + pub unsafe fn privateFrameworksURL(&self) -> Option> { + msg_send_id![self, privateFrameworksURL] + } + pub unsafe fn sharedFrameworksURL(&self) -> Option> { + msg_send_id![self, sharedFrameworksURL] + } + pub unsafe fn sharedSupportURL(&self) -> Option> { + msg_send_id![self, sharedSupportURL] + } + pub unsafe fn builtInPlugInsURL(&self) -> Option> { + msg_send_id![self, builtInPlugInsURL] + } + pub unsafe fn appStoreReceiptURL(&self) -> Option> { + msg_send_id![self, appStoreReceiptURL] + } + pub unsafe fn bundlePath(&self) -> Id { + msg_send_id![self, bundlePath] + } + pub unsafe fn resourcePath(&self) -> Option> { + msg_send_id![self, resourcePath] + } + pub unsafe fn executablePath(&self) -> Option> { + msg_send_id![self, executablePath] + } pub unsafe fn pathForAuxiliaryExecutable( &self, executableName: &NSString, ) -> Option> { msg_send_id![self, pathForAuxiliaryExecutable: executableName] } + pub unsafe fn privateFrameworksPath(&self) -> Option> { + msg_send_id![self, privateFrameworksPath] + } + pub unsafe fn sharedFrameworksPath(&self) -> Option> { + msg_send_id![self, sharedFrameworksPath] + } + pub unsafe fn sharedSupportPath(&self) -> Option> { + msg_send_id![self, sharedSupportPath] + } + pub unsafe fn builtInPlugInsPath(&self) -> Option> { + msg_send_id![self, builtInPlugInsPath] + } pub unsafe fn URLForResource_withExtension_subdirectory_inBundleWithURL( name: Option<&NSString>, ext: Option<&NSString>, @@ -253,12 +310,35 @@ impl NSBundle { table: tableName ] } + pub unsafe fn bundleIdentifier(&self) -> Option> { + msg_send_id![self, bundleIdentifier] + } + pub unsafe fn infoDictionary(&self) -> Option, Shared>> { + msg_send_id![self, infoDictionary] + } + pub unsafe fn localizedInfoDictionary( + &self, + ) -> Option, Shared>> { + msg_send_id![self, localizedInfoDictionary] + } pub unsafe fn objectForInfoDictionaryKey(&self, key: &NSString) -> Option> { msg_send_id![self, objectForInfoDictionaryKey: key] } pub unsafe fn classNamed(&self, className: &NSString) -> Option<&Class> { msg_send![self, classNamed: className] } + pub unsafe fn principalClass(&self) -> Option<&Class> { + msg_send![self, principalClass] + } + pub unsafe fn preferredLocalizations(&self) -> Id, Shared> { + msg_send_id![self, preferredLocalizations] + } + pub unsafe fn localizations(&self) -> Id, Shared> { + msg_send_id![self, localizations] + } + pub unsafe fn developmentLocalization(&self) -> Option> { + msg_send_id![self, developmentLocalization] + } pub unsafe fn preferredLocalizationsFromArray( localizationsArray: &NSArray, ) -> Id, Shared> { @@ -277,86 +357,6 @@ impl NSBundle { forPreferences: preferencesArray ] } - pub unsafe fn mainBundle() -> Id { - msg_send_id![Self::class(), mainBundle] - } - pub unsafe fn allBundles() -> Id, Shared> { - msg_send_id![Self::class(), allBundles] - } - pub unsafe fn allFrameworks() -> Id, Shared> { - msg_send_id![Self::class(), allFrameworks] - } - pub unsafe fn isLoaded(&self) -> bool { - msg_send![self, isLoaded] - } - pub unsafe fn bundleURL(&self) -> Id { - msg_send_id![self, bundleURL] - } - pub unsafe fn resourceURL(&self) -> Option> { - msg_send_id![self, resourceURL] - } - pub unsafe fn executableURL(&self) -> Option> { - msg_send_id![self, executableURL] - } - pub unsafe fn privateFrameworksURL(&self) -> Option> { - msg_send_id![self, privateFrameworksURL] - } - pub unsafe fn sharedFrameworksURL(&self) -> Option> { - msg_send_id![self, sharedFrameworksURL] - } - pub unsafe fn sharedSupportURL(&self) -> Option> { - msg_send_id![self, sharedSupportURL] - } - pub unsafe fn builtInPlugInsURL(&self) -> Option> { - msg_send_id![self, builtInPlugInsURL] - } - pub unsafe fn appStoreReceiptURL(&self) -> Option> { - msg_send_id![self, appStoreReceiptURL] - } - pub unsafe fn bundlePath(&self) -> Id { - msg_send_id![self, bundlePath] - } - pub unsafe fn resourcePath(&self) -> Option> { - msg_send_id![self, resourcePath] - } - pub unsafe fn executablePath(&self) -> Option> { - msg_send_id![self, executablePath] - } - pub unsafe fn privateFrameworksPath(&self) -> Option> { - msg_send_id![self, privateFrameworksPath] - } - pub unsafe fn sharedFrameworksPath(&self) -> Option> { - msg_send_id![self, sharedFrameworksPath] - } - pub unsafe fn sharedSupportPath(&self) -> Option> { - msg_send_id![self, sharedSupportPath] - } - pub unsafe fn builtInPlugInsPath(&self) -> Option> { - msg_send_id![self, builtInPlugInsPath] - } - pub unsafe fn bundleIdentifier(&self) -> Option> { - msg_send_id![self, bundleIdentifier] - } - pub unsafe fn infoDictionary(&self) -> Option, Shared>> { - msg_send_id![self, infoDictionary] - } - pub unsafe fn localizedInfoDictionary( - &self, - ) -> Option, Shared>> { - msg_send_id![self, localizedInfoDictionary] - } - pub unsafe fn principalClass(&self) -> Option<&Class> { - msg_send![self, principalClass] - } - pub unsafe fn preferredLocalizations(&self) -> Id, Shared> { - msg_send_id![self, preferredLocalizations] - } - pub unsafe fn localizations(&self) -> Id, Shared> { - msg_send_id![self, localizations] - } - pub unsafe fn developmentLocalization(&self) -> Option> { - msg_send_id![self, developmentLocalization] - } pub unsafe fn executableArchitectures(&self) -> Option, Shared>> { msg_send_id![self, executableArchitectures] } @@ -388,6 +388,18 @@ impl NSBundleResourceRequest { ) -> Id { msg_send_id![self, initWithTags: tags, bundle: bundle] } + pub unsafe fn loadingPriority(&self) -> c_double { + msg_send![self, loadingPriority] + } + pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double) { + msg_send![self, setLoadingPriority: loadingPriority] + } + pub unsafe fn tags(&self) -> Id, Shared> { + msg_send_id![self, tags] + } + pub unsafe fn bundle(&self) -> Id { + msg_send_id![self, bundle] + } pub unsafe fn beginAccessingResourcesWithCompletionHandler( &self, completionHandler: TodoBlock, @@ -409,18 +421,6 @@ impl NSBundleResourceRequest { pub unsafe fn endAccessingResources(&self) { msg_send![self, endAccessingResources] } - pub unsafe fn loadingPriority(&self) -> c_double { - msg_send![self, loadingPriority] - } - pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double) { - msg_send![self, setLoadingPriority: loadingPriority] - } - pub unsafe fn tags(&self) -> Id, Shared> { - msg_send_id![self, tags] - } - pub unsafe fn bundle(&self) -> Id { - msg_send_id![self, bundle] - } pub unsafe fn progress(&self) -> Id { msg_send_id![self, progress] } diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index ce24f26e9..bf2079fa3 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -12,6 +12,18 @@ __inner_extern_class!( } ); impl NSCache { + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: &NSString) { + msg_send![self, setName: name] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>) { + msg_send![self, setDelegate: delegate] + } pub unsafe fn objectForKey(&self, key: &KeyType) -> Option> { msg_send_id![self, objectForKey: key] } @@ -27,18 +39,6 @@ impl NSCache { pub unsafe fn removeAllObjects(&self) { msg_send![self, removeAllObjects] } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: &NSString) { - msg_send![self, setName: name] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>) { - msg_send![self, setDelegate: delegate] - } pub unsafe fn totalCostLimit(&self) -> NSUInteger { msg_send![self, totalCostLimit] } diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index ebd88f032..1b090b58e 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -20,6 +20,12 @@ extern_class!( } ); impl NSCalendar { + pub unsafe fn currentCalendar() -> Id { + msg_send_id![Self::class(), currentCalendar] + } + pub unsafe fn autoupdatingCurrentCalendar() -> Id { + msg_send_id![Self::class(), autoupdatingCurrentCalendar] + } pub unsafe fn calendarWithIdentifier( calendarIdentifierConstant: &NSCalendarIdentifier, ) -> Option> { @@ -37,6 +43,93 @@ impl NSCalendar { ) -> Option> { msg_send_id![self, initWithCalendarIdentifier: ident] } + pub unsafe fn calendarIdentifier(&self) -> Id { + msg_send_id![self, calendarIdentifier] + } + pub unsafe fn locale(&self) -> Option> { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: &NSTimeZone) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn firstWeekday(&self) -> NSUInteger { + msg_send![self, firstWeekday] + } + pub unsafe fn setFirstWeekday(&self, firstWeekday: NSUInteger) { + msg_send![self, setFirstWeekday: firstWeekday] + } + pub unsafe fn minimumDaysInFirstWeek(&self) -> NSUInteger { + msg_send![self, minimumDaysInFirstWeek] + } + pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger) { + msg_send![self, setMinimumDaysInFirstWeek: minimumDaysInFirstWeek] + } + pub unsafe fn eraSymbols(&self) -> Id, Shared> { + msg_send_id![self, eraSymbols] + } + pub unsafe fn longEraSymbols(&self) -> Id, Shared> { + msg_send_id![self, longEraSymbols] + } + pub unsafe fn monthSymbols(&self) -> Id, Shared> { + msg_send_id![self, monthSymbols] + } + pub unsafe fn shortMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortMonthSymbols] + } + pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortMonthSymbols] + } + pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneMonthSymbols] + } + pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneMonthSymbols] + } + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortStandaloneMonthSymbols] + } + pub unsafe fn weekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, weekdaySymbols] + } + pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, shortWeekdaySymbols] + } + pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortWeekdaySymbols] + } + pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneWeekdaySymbols] + } + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneWeekdaySymbols] + } + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortStandaloneWeekdaySymbols] + } + pub unsafe fn quarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, quarterSymbols] + } + pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortQuarterSymbols] + } + pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneQuarterSymbols] + } + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneQuarterSymbols] + } + pub unsafe fn AMSymbol(&self) -> Id { + msg_send_id![self, AMSymbol] + } + pub unsafe fn PMSymbol(&self) -> Id { + msg_send_id![self, PMSymbol] + } pub unsafe fn minimumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange { msg_send![self, minimumRangeOfUnit: unit] } @@ -428,99 +521,6 @@ impl NSCalendar { ) -> bool { msg_send![self, date: date, matchesComponents: components] } - pub unsafe fn currentCalendar() -> Id { - msg_send_id![Self::class(), currentCalendar] - } - pub unsafe fn autoupdatingCurrentCalendar() -> Id { - msg_send_id![Self::class(), autoupdatingCurrentCalendar] - } - pub unsafe fn calendarIdentifier(&self) -> Id { - msg_send_id![self, calendarIdentifier] - } - pub unsafe fn locale(&self) -> Option> { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: &NSTimeZone) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn firstWeekday(&self) -> NSUInteger { - msg_send![self, firstWeekday] - } - pub unsafe fn setFirstWeekday(&self, firstWeekday: NSUInteger) { - msg_send![self, setFirstWeekday: firstWeekday] - } - pub unsafe fn minimumDaysInFirstWeek(&self) -> NSUInteger { - msg_send![self, minimumDaysInFirstWeek] - } - pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger) { - msg_send![self, setMinimumDaysInFirstWeek: minimumDaysInFirstWeek] - } - pub unsafe fn eraSymbols(&self) -> Id, Shared> { - msg_send_id![self, eraSymbols] - } - pub unsafe fn longEraSymbols(&self) -> Id, Shared> { - msg_send_id![self, longEraSymbols] - } - pub unsafe fn monthSymbols(&self) -> Id, Shared> { - msg_send_id![self, monthSymbols] - } - pub unsafe fn shortMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortMonthSymbols] - } - pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortMonthSymbols] - } - pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneMonthSymbols] - } - pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneMonthSymbols] - } - pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortStandaloneMonthSymbols] - } - pub unsafe fn weekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, weekdaySymbols] - } - pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, shortWeekdaySymbols] - } - pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortWeekdaySymbols] - } - pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneWeekdaySymbols] - } - pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneWeekdaySymbols] - } - pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortStandaloneWeekdaySymbols] - } - pub unsafe fn quarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, quarterSymbols] - } - pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortQuarterSymbols] - } - pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneQuarterSymbols] - } - pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneQuarterSymbols] - } - pub unsafe fn AMSymbol(&self) -> Id { - msg_send_id![self, AMSymbol] - } - pub unsafe fn PMSymbol(&self) -> Id { - msg_send_id![self, PMSymbol] - } } extern_class!( #[derive(Debug)] @@ -530,21 +530,6 @@ extern_class!( } ); impl NSDateComponents { - pub unsafe fn week(&self) -> NSInteger { - msg_send![self, week] - } - pub unsafe fn setWeek(&self, v: NSInteger) { - msg_send![self, setWeek: v] - } - pub unsafe fn setValue_forComponent(&self, value: NSInteger, unit: NSCalendarUnit) { - msg_send![self, setValue: value, forComponent: unit] - } - pub unsafe fn valueForComponent(&self, unit: NSCalendarUnit) -> NSInteger { - msg_send![self, valueForComponent: unit] - } - pub unsafe fn isValidDateInCalendar(&self, calendar: &NSCalendar) -> bool { - msg_send![self, isValidDateInCalendar: calendar] - } pub unsafe fn calendar(&self) -> Option> { msg_send_id![self, calendar] } @@ -650,7 +635,22 @@ impl NSDateComponents { pub unsafe fn date(&self) -> Option> { msg_send_id![self, date] } + pub unsafe fn week(&self) -> NSInteger { + msg_send![self, week] + } + pub unsafe fn setWeek(&self, v: NSInteger) { + msg_send![self, setWeek: v] + } + pub unsafe fn setValue_forComponent(&self, value: NSInteger, unit: NSCalendarUnit) { + msg_send![self, setValue: value, forComponent: unit] + } + pub unsafe fn valueForComponent(&self, unit: NSCalendarUnit) -> NSInteger { + msg_send![self, valueForComponent: unit] + } pub unsafe fn isValidDate(&self) -> bool { msg_send![self, isValidDate] } + pub unsafe fn isValidDateInCalendar(&self, calendar: &NSCalendar) -> bool { + msg_send![self, isValidDateInCalendar: calendar] + } } diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index f60e3027c..08c1013a8 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -15,39 +15,6 @@ extern_class!( } ); impl NSCharacterSet { - pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id { - msg_send_id![Self::class(), characterSetWithRange: aRange] - } - pub unsafe fn characterSetWithCharactersInString( - aString: &NSString, - ) -> Id { - msg_send_id![Self::class(), characterSetWithCharactersInString: aString] - } - pub unsafe fn characterSetWithBitmapRepresentation( - data: &NSData, - ) -> Id { - msg_send_id![Self::class(), characterSetWithBitmapRepresentation: data] - } - pub unsafe fn characterSetWithContentsOfFile( - fName: &NSString, - ) -> Option> { - msg_send_id![Self::class(), characterSetWithContentsOfFile: fName] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool { - msg_send![self, characterIsMember: aCharacter] - } - pub unsafe fn longCharacterIsMember(&self, theLongChar: UTF32Char) -> bool { - msg_send![self, longCharacterIsMember: theLongChar] - } - pub unsafe fn isSupersetOfSet(&self, theOtherSet: &NSCharacterSet) -> bool { - msg_send![self, isSupersetOfSet: theOtherSet] - } - pub unsafe fn hasMemberInPlane(&self, thePlane: u8) -> bool { - msg_send![self, hasMemberInPlane: thePlane] - } pub unsafe fn controlCharacterSet() -> Id { msg_send_id![Self::class(), controlCharacterSet] } @@ -93,12 +60,45 @@ impl NSCharacterSet { pub unsafe fn newlineCharacterSet() -> Id { msg_send_id![Self::class(), newlineCharacterSet] } + pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id { + msg_send_id![Self::class(), characterSetWithRange: aRange] + } + pub unsafe fn characterSetWithCharactersInString( + aString: &NSString, + ) -> Id { + msg_send_id![Self::class(), characterSetWithCharactersInString: aString] + } + pub unsafe fn characterSetWithBitmapRepresentation( + data: &NSData, + ) -> Id { + msg_send_id![Self::class(), characterSetWithBitmapRepresentation: data] + } + pub unsafe fn characterSetWithContentsOfFile( + fName: &NSString, + ) -> Option> { + msg_send_id![Self::class(), characterSetWithContentsOfFile: fName] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool { + msg_send![self, characterIsMember: aCharacter] + } pub unsafe fn bitmapRepresentation(&self) -> Id { msg_send_id![self, bitmapRepresentation] } pub unsafe fn invertedSet(&self) -> Id { msg_send_id![self, invertedSet] } + pub unsafe fn longCharacterIsMember(&self, theLongChar: UTF32Char) -> bool { + msg_send![self, longCharacterIsMember: theLongChar] + } + pub unsafe fn isSupersetOfSet(&self, theOtherSet: &NSCharacterSet) -> bool { + msg_send![self, isSupersetOfSet: theOtherSet] + } + pub unsafe fn hasMemberInPlane(&self, thePlane: u8) -> bool { + msg_send![self, hasMemberInPlane: thePlane] + } } extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index 3b7c3b9d4..b63435474 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -34,12 +34,6 @@ impl NSClassDescription { ) -> Option> { msg_send_id![Self::class(), classDescriptionForClass: aClass] } - pub unsafe fn inverseForRelationshipKey( - &self, - relationshipKey: &NSString, - ) -> Option> { - msg_send_id![self, inverseForRelationshipKey: relationshipKey] - } pub unsafe fn attributeKeys(&self) -> Id, Shared> { msg_send_id![self, attributeKeys] } @@ -49,15 +43,15 @@ impl NSClassDescription { pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared> { msg_send_id![self, toManyRelationshipKeys] } -} -#[doc = "NSClassDescriptionPrimitives"] -impl NSObject { pub unsafe fn inverseForRelationshipKey( &self, relationshipKey: &NSString, ) -> Option> { msg_send_id![self, inverseForRelationshipKey: relationshipKey] } +} +#[doc = "NSClassDescriptionPrimitives"] +impl NSObject { pub unsafe fn classDescription(&self) -> Id { msg_send_id![self, classDescription] } @@ -70,4 +64,10 @@ impl NSObject { pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared> { msg_send_id![self, toManyRelationshipKeys] } + pub unsafe fn inverseForRelationshipKey( + &self, + relationshipKey: &NSString, + ) -> Option> { + msg_send_id![self, inverseForRelationshipKey: relationshipKey] + } } diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 947dff1e7..04b058757 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -103,6 +103,12 @@ impl NSCoder { pub unsafe fn objectZone(&self) -> *mut NSZone { msg_send![self, objectZone] } + pub unsafe fn systemVersion(&self) -> c_uint { + msg_send![self, systemVersion] + } + pub unsafe fn allowsKeyedCoding(&self) -> bool { + msg_send![self, allowsKeyedCoding] + } pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString) { msg_send![self, encodeObject: object, forKey: key] } @@ -179,6 +185,9 @@ impl NSCoder { pub unsafe fn decodeIntegerForKey(&self, key: &NSString) -> NSInteger { msg_send![self, decodeIntegerForKey: key] } + pub unsafe fn requiresSecureCoding(&self) -> bool { + msg_send![self, requiresSecureCoding] + } pub unsafe fn decodeObjectOfClass_forKey( &self, aClass: &Class, @@ -262,21 +271,12 @@ impl NSCoder { pub unsafe fn decodePropertyListForKey(&self, key: &NSString) -> Option> { msg_send_id![self, decodePropertyListForKey: key] } - pub unsafe fn failWithError(&self, error: &NSError) { - msg_send![self, failWithError: error] - } - pub unsafe fn systemVersion(&self) -> c_uint { - msg_send![self, systemVersion] - } - pub unsafe fn allowsKeyedCoding(&self) -> bool { - msg_send![self, allowsKeyedCoding] - } - pub unsafe fn requiresSecureCoding(&self) -> bool { - msg_send![self, requiresSecureCoding] - } pub unsafe fn allowedClasses(&self) -> Option, Shared>> { msg_send_id![self, allowedClasses] } + pub unsafe fn failWithError(&self, error: &NSError) { + msg_send![self, failWithError: error] + } pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy { msg_send![self, decodingFailurePolicy] } diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 64626f5d5..7154999e3 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -22,6 +22,12 @@ impl NSCompoundPredicate { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } + pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType { + msg_send![self, compoundPredicateType] + } + pub unsafe fn subpredicates(&self) -> Id { + msg_send_id![self, subpredicates] + } pub unsafe fn andPredicateWithSubpredicates( subpredicates: &NSArray, ) -> Id { @@ -37,10 +43,4 @@ impl NSCompoundPredicate { ) -> Id { msg_send_id![Self::class(), notPredicateWithSubpredicate: predicate] } - pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType { - msg_send![self, compoundPredicateType] - } - pub unsafe fn subpredicates(&self) -> Id { - msg_send_id![self, subpredicates] - } } diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 5ffe1894f..308abcaba 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -23,6 +23,9 @@ extern_class!( } ); impl NSConnection { + pub unsafe fn statistics(&self) -> Id, Shared> { + msg_send_id![self, statistics] + } pub unsafe fn allConnections() -> Id, Shared> { msg_send_id![Self::class(), allConnections] } @@ -95,63 +98,6 @@ impl NSConnection { rootObject: root ] } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn addRequestMode(&self, rmode: &NSString) { - msg_send![self, addRequestMode: rmode] - } - pub unsafe fn removeRequestMode(&self, rmode: &NSString) { - msg_send![self, removeRequestMode: rmode] - } - pub unsafe fn registerName(&self, name: Option<&NSString>) -> bool { - msg_send![self, registerName: name] - } - pub unsafe fn registerName_withNameServer( - &self, - name: Option<&NSString>, - server: &NSPortNameServer, - ) -> bool { - msg_send![self, registerName: name, withNameServer: server] - } - pub unsafe fn connectionWithReceivePort_sendPort( - receivePort: Option<&NSPort>, - sendPort: Option<&NSPort>, - ) -> Option> { - msg_send_id![ - Self::class(), - connectionWithReceivePort: receivePort, - sendPort: sendPort - ] - } - pub unsafe fn currentConversation() -> Option> { - msg_send_id![Self::class(), currentConversation] - } - pub unsafe fn initWithReceivePort_sendPort( - &self, - receivePort: Option<&NSPort>, - sendPort: Option<&NSPort>, - ) -> Option> { - msg_send_id![self, initWithReceivePort: receivePort, sendPort: sendPort] - } - pub unsafe fn enableMultipleThreads(&self) { - msg_send![self, enableMultipleThreads] - } - pub unsafe fn addRunLoop(&self, runloop: &NSRunLoop) { - msg_send![self, addRunLoop: runloop] - } - pub unsafe fn removeRunLoop(&self, runloop: &NSRunLoop) { - msg_send![self, removeRunLoop: runloop] - } - pub unsafe fn runInNewThread(&self) { - msg_send![self, runInNewThread] - } - pub unsafe fn dispatchWithComponents(&self, components: &NSArray) { - msg_send![self, dispatchWithComponents: components] - } - pub unsafe fn statistics(&self) -> Id, Shared> { - msg_send_id![self, statistics] - } pub unsafe fn requestTimeout(&self) -> NSTimeInterval { msg_send![self, requestTimeout] } @@ -191,24 +137,78 @@ impl NSConnection { pub unsafe fn rootProxy(&self) -> Id { msg_send_id![self, rootProxy] } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn addRequestMode(&self, rmode: &NSString) { + msg_send![self, addRequestMode: rmode] + } + pub unsafe fn removeRequestMode(&self, rmode: &NSString) { + msg_send![self, removeRequestMode: rmode] + } pub unsafe fn requestModes(&self) -> Id, Shared> { msg_send_id![self, requestModes] } + pub unsafe fn registerName(&self, name: Option<&NSString>) -> bool { + msg_send![self, registerName: name] + } + pub unsafe fn registerName_withNameServer( + &self, + name: Option<&NSString>, + server: &NSPortNameServer, + ) -> bool { + msg_send![self, registerName: name, withNameServer: server] + } + pub unsafe fn connectionWithReceivePort_sendPort( + receivePort: Option<&NSPort>, + sendPort: Option<&NSPort>, + ) -> Option> { + msg_send_id![ + Self::class(), + connectionWithReceivePort: receivePort, + sendPort: sendPort + ] + } + pub unsafe fn currentConversation() -> Option> { + msg_send_id![Self::class(), currentConversation] + } + pub unsafe fn initWithReceivePort_sendPort( + &self, + receivePort: Option<&NSPort>, + sendPort: Option<&NSPort>, + ) -> Option> { + msg_send_id![self, initWithReceivePort: receivePort, sendPort: sendPort] + } pub unsafe fn sendPort(&self) -> Id { msg_send_id![self, sendPort] } pub unsafe fn receivePort(&self) -> Id { msg_send_id![self, receivePort] } + pub unsafe fn enableMultipleThreads(&self) { + msg_send![self, enableMultipleThreads] + } pub unsafe fn multipleThreadsEnabled(&self) -> bool { msg_send![self, multipleThreadsEnabled] } + pub unsafe fn addRunLoop(&self, runloop: &NSRunLoop) { + msg_send![self, addRunLoop: runloop] + } + pub unsafe fn removeRunLoop(&self, runloop: &NSRunLoop) { + msg_send![self, removeRunLoop: runloop] + } + pub unsafe fn runInNewThread(&self) { + msg_send![self, runInNewThread] + } pub unsafe fn remoteObjects(&self) -> Id { msg_send_id![self, remoteObjects] } pub unsafe fn localObjects(&self) -> Id { msg_send_id![self, localObjects] } + pub unsafe fn dispatchWithComponents(&self, components: &NSArray) { + msg_send![self, dispatchWithComponents: components] + } } pub type NSConnectionDelegate = NSObject; extern_class!( @@ -219,9 +219,6 @@ extern_class!( } ); impl NSDistantObjectRequest { - pub unsafe fn replyWithException(&self, exception: Option<&NSException>) { - msg_send![self, replyWithException: exception] - } pub unsafe fn invocation(&self) -> Id { msg_send_id![self, invocation] } @@ -231,4 +228,7 @@ impl NSDistantObjectRequest { pub unsafe fn conversation(&self) -> Id { msg_send_id![self, conversation] } + pub unsafe fn replyWithException(&self, exception: Option<&NSException>) { + msg_send![self, replyWithException: exception] + } } diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 9b7822afd..718f218b1 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -24,6 +24,9 @@ impl NSData { } #[doc = "NSExtendedData"] impl NSData { + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } pub unsafe fn getBytes_length(&self, buffer: NonNull, length: NSUInteger) { msg_send![self, getBytes: buffer, length: length] } @@ -84,9 +87,6 @@ impl NSData { pub unsafe fn enumerateByteRangesUsingBlock(&self, block: TodoBlock) { msg_send![self, enumerateByteRangesUsingBlock: block] } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } } #[doc = "NSDataCreation"] impl NSData { diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 7e8d0c0ce..3b8634759 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -13,6 +13,9 @@ extern_class!( } ); impl NSDate { + pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval { + msg_send![self, timeIntervalSinceReferenceDate] + } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } @@ -25,15 +28,18 @@ impl NSDate { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval { - msg_send![self, timeIntervalSinceReferenceDate] - } } #[doc = "NSExtendedDate"] impl NSDate { pub unsafe fn timeIntervalSinceDate(&self, anotherDate: &NSDate) -> NSTimeInterval { msg_send![self, timeIntervalSinceDate: anotherDate] } + pub unsafe fn timeIntervalSinceNow(&self) -> NSTimeInterval { + msg_send![self, timeIntervalSinceNow] + } + pub unsafe fn timeIntervalSince1970(&self) -> NSTimeInterval { + msg_send![self, timeIntervalSince1970] + } pub unsafe fn addTimeInterval(&self, seconds: NSTimeInterval) -> Id { msg_send_id![self, addTimeInterval: seconds] } @@ -52,18 +58,12 @@ impl NSDate { pub unsafe fn isEqualToDate(&self, otherDate: &NSDate) -> bool { msg_send![self, isEqualToDate: otherDate] } - pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn timeIntervalSinceNow(&self) -> NSTimeInterval { - msg_send![self, timeIntervalSinceNow] - } - pub unsafe fn timeIntervalSince1970(&self) -> NSTimeInterval { - msg_send![self, timeIntervalSince1970] - } pub unsafe fn description(&self) -> Id { msg_send_id![self, description] } + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } pub unsafe fn timeIntervalSinceReferenceDate() -> NSTimeInterval { msg_send![Self::class(), timeIntervalSinceReferenceDate] } @@ -92,6 +92,15 @@ impl NSDate { sinceDate: date ] } + pub unsafe fn distantFuture() -> Id { + msg_send_id![Self::class(), distantFuture] + } + pub unsafe fn distantPast() -> Id { + msg_send_id![Self::class(), distantPast] + } + pub unsafe fn now() -> Id { + msg_send_id![Self::class(), now] + } pub unsafe fn initWithTimeIntervalSinceNow(&self, secs: NSTimeInterval) -> Id { msg_send_id![self, initWithTimeIntervalSinceNow: secs] } @@ -105,13 +114,4 @@ impl NSDate { ) -> Id { msg_send_id![self, initWithTimeInterval: secsToBeAdded, sinceDate: date] } - pub unsafe fn distantFuture() -> Id { - msg_send_id![Self::class(), distantFuture] - } - pub unsafe fn distantPast() -> Id { - msg_send_id![Self::class(), distantPast] - } - pub unsafe fn now() -> Id { - msg_send_id![Self::class(), now] - } } diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index ed284ef87..c9e63617d 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -48,19 +48,6 @@ impl NSDateComponentsFormatter { unitsStyle: unitsStyle ] } - pub unsafe fn getObjectValue_forString_errorDescription( - &self, - obj: Option<&mut Option>>, - string: &NSString, - error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } pub unsafe fn unitsStyle(&self) -> NSDateComponentsFormatterUnitsStyle { msg_send![self, unitsStyle] } @@ -136,4 +123,17 @@ impl NSDateComponentsFormatter { pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { msg_send![self, setFormattingContext: formattingContext] } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: Option<&mut Option>>, + string: &NSString, + error: Option<&mut Option>>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } } diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 8a24f3dea..e9dcd974e 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -20,6 +20,12 @@ extern_class!( } ); impl NSDateFormatter { + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } pub unsafe fn getObjectValue_forString_range_error( &self, obj: Option<&mut Option>>, @@ -65,15 +71,6 @@ impl NSDateFormatter { locale: locale ] } - pub unsafe fn setLocalizedDateFormatFromTemplate(&self, dateFormatTemplate: &NSString) { - msg_send![self, setLocalizedDateFormatFromTemplate: dateFormatTemplate] - } - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] - } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } pub unsafe fn defaultFormatterBehavior() -> NSDateFormatterBehavior { msg_send![Self::class(), defaultFormatterBehavior] } @@ -83,6 +80,9 @@ impl NSDateFormatter { setDefaultFormatterBehavior: defaultFormatterBehavior ] } + pub unsafe fn setLocalizedDateFormatFromTemplate(&self, dateFormatTemplate: &NSString) { + msg_send![self, setLocalizedDateFormatFromTemplate: dateFormatTemplate] + } pub unsafe fn dateFormat(&self) -> Id { msg_send_id![self, dateFormat] } diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index 5001773da..3400a181e 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -13,6 +13,15 @@ extern_class!( } ); impl NSDateInterval { + pub unsafe fn startDate(&self) -> Id { + msg_send_id![self, startDate] + } + pub unsafe fn endDate(&self) -> Id { + msg_send_id![self, endDate] + } + pub unsafe fn duration(&self) -> NSTimeInterval { + msg_send![self, duration] + } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } @@ -51,13 +60,4 @@ impl NSDateInterval { pub unsafe fn containsDate(&self, date: &NSDate) -> bool { msg_send![self, containsDate: date] } - pub unsafe fn startDate(&self) -> Id { - msg_send_id![self, startDate] - } - pub unsafe fn endDate(&self) -> Id { - msg_send_id![self, endDate] - } - pub unsafe fn duration(&self) -> NSTimeInterval { - msg_send![self, duration] - } } diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index 54de0138b..f47339b0c 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -17,19 +17,6 @@ extern_class!( } ); impl NSDateIntervalFormatter { - pub unsafe fn stringFromDate_toDate( - &self, - fromDate: &NSDate, - toDate: &NSDate, - ) -> Id { - msg_send_id![self, stringFromDate: fromDate, toDate: toDate] - } - pub unsafe fn stringFromDateInterval( - &self, - dateInterval: &NSDateInterval, - ) -> Option> { - msg_send_id![self, stringFromDateInterval: dateInterval] - } pub unsafe fn locale(&self) -> Id { msg_send_id![self, locale] } @@ -66,4 +53,17 @@ impl NSDateIntervalFormatter { pub unsafe fn setTimeStyle(&self, timeStyle: NSDateIntervalFormatterStyle) { msg_send![self, setTimeStyle: timeStyle] } + pub unsafe fn stringFromDate_toDate( + &self, + fromDate: &NSDate, + toDate: &NSDate, + ) -> Id { + msg_send_id![self, stringFromDate: fromDate, toDate: toDate] + } + pub unsafe fn stringFromDateInterval( + &self, + dateInterval: &NSDateInterval, + ) -> Option> { + msg_send_id![self, stringFromDateInterval: dateInterval] + } } diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index aaef3fd8d..c964bbb3a 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -45,6 +45,9 @@ impl NSDecimalNumber { pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { msg_send_id![self, descriptionWithLocale: locale] } + pub unsafe fn decimalValue(&self) -> NSDecimal { + msg_send![self, decimalValue] + } pub unsafe fn decimalNumberWithMantissa_exponent_isNegative( mantissa: c_ulonglong, exponent: c_short, @@ -75,6 +78,21 @@ impl NSDecimalNumber { locale: locale ] } + pub unsafe fn zero() -> Id { + msg_send_id![Self::class(), zero] + } + pub unsafe fn one() -> Id { + msg_send_id![Self::class(), one] + } + pub unsafe fn minimumDecimalNumber() -> Id { + msg_send_id![Self::class(), minimumDecimalNumber] + } + pub unsafe fn maximumDecimalNumber() -> Id { + msg_send_id![Self::class(), maximumDecimalNumber] + } + pub unsafe fn notANumber() -> Id { + msg_send_id![Self::class(), notANumber] + } pub unsafe fn decimalNumberByAdding( &self, decimalNumber: &NSDecimalNumber, @@ -186,24 +204,6 @@ impl NSDecimalNumber { pub unsafe fn compare(&self, decimalNumber: &NSNumber) -> NSComparisonResult { msg_send![self, compare: decimalNumber] } - pub unsafe fn decimalValue(&self) -> NSDecimal { - msg_send![self, decimalValue] - } - pub unsafe fn zero() -> Id { - msg_send_id![Self::class(), zero] - } - pub unsafe fn one() -> Id { - msg_send_id![Self::class(), one] - } - pub unsafe fn minimumDecimalNumber() -> Id { - msg_send_id![Self::class(), minimumDecimalNumber] - } - pub unsafe fn maximumDecimalNumber() -> Id { - msg_send_id![Self::class(), maximumDecimalNumber] - } - pub unsafe fn notANumber() -> Id { - msg_send_id![Self::class(), notANumber] - } pub unsafe fn defaultBehavior() -> Id { msg_send_id![Self::class(), defaultBehavior] } @@ -225,6 +225,9 @@ extern_class!( } ); impl NSDecimalNumberHandler { + pub unsafe fn defaultDecimalNumberHandler() -> Id { + msg_send_id![Self::class(), defaultDecimalNumberHandler] + } pub unsafe fn initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( &self, roundingMode: NSRoundingMode, @@ -262,9 +265,6 @@ impl NSDecimalNumberHandler { raiseOnDivideByZero: divideByZero ] } - pub unsafe fn defaultDecimalNumberHandler() -> Id { - msg_send_id![Self::class(), defaultDecimalNumberHandler] - } } #[doc = "NSDecimalNumberExtensions"] impl NSNumber { diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 2c893f987..f64878140 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -16,6 +16,9 @@ __inner_extern_class!( } ); impl NSDictionary { + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option> { msg_send_id![self, objectForKey: aKey] } @@ -36,15 +39,24 @@ impl NSDictionary { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } } #[doc = "NSExtendedDictionary"] impl NSDictionary { + pub unsafe fn allKeys(&self) -> Id, Shared> { + msg_send_id![self, allKeys] + } pub unsafe fn allKeysForObject(&self, anObject: &ObjectType) -> Id, Shared> { msg_send_id![self, allKeysForObject: anObject] } + pub unsafe fn allValues(&self) -> Id, Shared> { + msg_send_id![self, allValues] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn descriptionInStringsFileFormat(&self) -> Id { + msg_send_id![self, descriptionInStringsFileFormat] + } pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { msg_send_id![self, descriptionWithLocale: locale] } @@ -135,18 +147,6 @@ impl NSDictionary { ) -> Id, Shared> { msg_send_id![self, keysOfEntriesWithOptions: opts, passingTest: predicate] } - pub unsafe fn allKeys(&self) -> Id, Shared> { - msg_send_id![self, allKeys] - } - pub unsafe fn allValues(&self) -> Id, Shared> { - msg_send_id![self, allValues] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionInStringsFileFormat(&self) -> Id { - msg_send_id![self, descriptionInStringsFileFormat] - } } #[doc = "NSDeprecated"] impl NSDictionary { diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 5b9514c00..08bce5f6a 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -72,6 +72,12 @@ impl NSDistributedNotificationCenter { options: options ] } + pub unsafe fn suspended(&self) -> bool { + msg_send![self, suspended] + } + pub unsafe fn setSuspended(&self, suspended: bool) { + msg_send![self, setSuspended: suspended] + } pub unsafe fn addObserver_selector_name_object( &self, observer: &Object, @@ -120,10 +126,4 @@ impl NSDistributedNotificationCenter { object: anObject ] } - pub unsafe fn suspended(&self) -> bool { - msg_send![self, suspended] - } - pub unsafe fn setSuspended(&self, suspended: bool) { - msg_send![self, setSuspended: suspended] - } } diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 11a887cd8..aee8ef3ba 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -11,6 +11,24 @@ extern_class!( } ); impl NSEnergyFormatter { + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn isForFoodEnergyUse(&self) -> bool { + msg_send![self, isForFoodEnergyUse] + } + pub unsafe fn setForFoodEnergyUse(&self, forFoodEnergyUse: bool) { + msg_send![self, setForFoodEnergyUse: forFoodEnergyUse] + } pub unsafe fn stringFromValue_unit( &self, value: c_double, @@ -48,22 +66,4 @@ impl NSEnergyFormatter { errorDescription: error ] } - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] - } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn isForFoodEnergyUse(&self) -> bool { - msg_send![self, isForFoodEnergyUse] - } - pub unsafe fn setForFoodEnergyUse(&self, forFoodEnergyUse: bool) { - msg_send![self, setForFoodEnergyUse: forFoodEnergyUse] - } } diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 5418c5585..58d3322d0 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -36,19 +36,6 @@ impl NSError { userInfo: dict ] } - pub unsafe fn setUserInfoValueProviderForDomain_provider( - errorDomain: &NSErrorDomain, - provider: TodoBlock, - ) { - msg_send![ - Self::class(), - setUserInfoValueProviderForDomain: errorDomain, - provider: provider - ] - } - pub unsafe fn userInfoValueProviderForDomain(errorDomain: &NSErrorDomain) -> TodoBlock { - msg_send![Self::class(), userInfoValueProviderForDomain: errorDomain] - } pub unsafe fn domain(&self) -> Id { msg_send_id![self, domain] } @@ -79,6 +66,19 @@ impl NSError { pub unsafe fn underlyingErrors(&self) -> Id, Shared> { msg_send_id![self, underlyingErrors] } + pub unsafe fn setUserInfoValueProviderForDomain_provider( + errorDomain: &NSErrorDomain, + provider: TodoBlock, + ) { + msg_send![ + Self::class(), + setUserInfoValueProviderForDomain: errorDomain, + provider: provider + ] + } + pub unsafe fn userInfoValueProviderForDomain(errorDomain: &NSErrorDomain) -> TodoBlock { + msg_send![Self::class(), userInfoValueProviderForDomain: errorDomain] + } } #[doc = "NSErrorRecoveryAttempting"] impl NSObject { diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index a4ee18c54..988f4bd3c 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -41,9 +41,6 @@ impl NSException { userInfo: aUserInfo ] } - pub unsafe fn raise(&self) { - msg_send![self, raise] - } pub unsafe fn name(&self) -> Id { msg_send_id![self, name] } @@ -59,6 +56,9 @@ impl NSException { pub unsafe fn callStackSymbols(&self) -> Id, Shared> { msg_send_id![self, callStackSymbols] } + pub unsafe fn raise(&self) { + msg_send![self, raise] + } } #[doc = "NSExceptionRaisingConveniences"] impl NSException { diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index 7d99253e0..f8462618c 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -135,16 +135,6 @@ impl NSExpression { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn expressionValueWithObject_context( - &self, - object: Option<&Object>, - context: Option<&NSMutableDictionary>, - ) -> Option> { - msg_send_id![self, expressionValueWithObject: object, context: context] - } - pub unsafe fn allowEvaluation(&self) { - msg_send![self, allowEvaluation] - } pub unsafe fn expressionType(&self) -> NSExpressionType { msg_send![self, expressionType] } @@ -187,4 +177,14 @@ impl NSExpression { pub unsafe fn expressionBlock(&self) -> TodoBlock { msg_send![self, expressionBlock] } + pub unsafe fn expressionValueWithObject_context( + &self, + object: Option<&Object>, + context: Option<&NSMutableDictionary>, + ) -> Option> { + msg_send_id![self, expressionValueWithObject: object, context: context] + } + pub unsafe fn allowEvaluation(&self) { + msg_send![self, allowEvaluation] + } } diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index 59dc1d51e..7e63e58ef 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -11,6 +11,9 @@ extern_class!( } ); impl NSExtensionContext { + pub unsafe fn inputItems(&self) -> Id { + msg_send_id![self, inputItems] + } pub unsafe fn completeRequestReturningItems_completionHandler( &self, items: Option<&NSArray>, @@ -28,7 +31,4 @@ impl NSExtensionContext { pub unsafe fn openURL_completionHandler(&self, URL: &NSURL, completionHandler: TodoBlock) { msg_send![self, openURL: URL, completionHandler: completionHandler] } - pub unsafe fn inputItems(&self) -> Id { - msg_send_id![self, inputItems] - } } diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 91ed0c381..dd1ffbecb 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -48,12 +48,21 @@ impl NSFileCoordinator { pub unsafe fn removeFilePresenter(filePresenter: &NSFilePresenter) { msg_send![Self::class(), removeFilePresenter: filePresenter] } + pub unsafe fn filePresenters() -> Id, Shared> { + msg_send_id![Self::class(), filePresenters] + } pub unsafe fn initWithFilePresenter( &self, filePresenterOrNil: Option<&NSFilePresenter>, ) -> Id { msg_send_id![self, initWithFilePresenter: filePresenterOrNil] } + pub unsafe fn purposeIdentifier(&self) -> Id { + msg_send_id![self, purposeIdentifier] + } + pub unsafe fn setPurposeIdentifier(&self, purposeIdentifier: &NSString) { + msg_send![self, setPurposeIdentifier: purposeIdentifier] + } pub unsafe fn coordinateAccessWithIntents_queue_byAccessor( &self, intents: &NSArray, @@ -174,13 +183,4 @@ impl NSFileCoordinator { pub unsafe fn cancel(&self) { msg_send![self, cancel] } - pub unsafe fn filePresenters() -> Id, Shared> { - msg_send_id![Self::class(), filePresenters] - } - pub unsafe fn purposeIdentifier(&self) -> Id { - msg_send_id![self, purposeIdentifier] - } - pub unsafe fn setPurposeIdentifier(&self, purposeIdentifier: &NSString) { - msg_send![self, setPurposeIdentifier: purposeIdentifier] - } } diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 3f39c1791..8ae64fa58 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -19,6 +19,9 @@ extern_class!( } ); impl NSFileHandle { + pub unsafe fn availableData(&self) -> Id { + msg_send_id![self, availableData] + } pub unsafe fn initWithFileDescriptor_closeOnDealloc( &self, fd: c_int, @@ -75,12 +78,21 @@ impl NSFileHandle { pub unsafe fn closeAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, closeAndReturnError: error] } - pub unsafe fn availableData(&self) -> Id { - msg_send_id![self, availableData] - } } #[doc = "NSFileHandleCreation"] impl NSFileHandle { + pub unsafe fn fileHandleWithStandardInput() -> Id { + msg_send_id![Self::class(), fileHandleWithStandardInput] + } + pub unsafe fn fileHandleWithStandardOutput() -> Id { + msg_send_id![Self::class(), fileHandleWithStandardOutput] + } + pub unsafe fn fileHandleWithStandardError() -> Id { + msg_send_id![Self::class(), fileHandleWithStandardError] + } + pub unsafe fn fileHandleWithNullDevice() -> Id { + msg_send_id![Self::class(), fileHandleWithNullDevice] + } pub unsafe fn fileHandleForReadingAtPath(path: &NSString) -> Option> { msg_send_id![Self::class(), fileHandleForReadingAtPath: path] } @@ -112,18 +124,6 @@ impl NSFileHandle { ) -> Option> { msg_send_id![Self::class(), fileHandleForUpdatingURL: url, error: error] } - pub unsafe fn fileHandleWithStandardInput() -> Id { - msg_send_id![Self::class(), fileHandleWithStandardInput] - } - pub unsafe fn fileHandleWithStandardOutput() -> Id { - msg_send_id![Self::class(), fileHandleWithStandardOutput] - } - pub unsafe fn fileHandleWithStandardError() -> Id { - msg_send_id![Self::class(), fileHandleWithStandardError] - } - pub unsafe fn fileHandleWithNullDevice() -> Id { - msg_send_id![Self::class(), fileHandleWithNullDevice] - } } #[doc = "NSFileHandleAsynchronousAccess"] impl NSFileHandle { @@ -219,13 +219,13 @@ extern_class!( } ); impl NSPipe { - pub unsafe fn pipe() -> Id { - msg_send_id![Self::class(), pipe] - } pub unsafe fn fileHandleForReading(&self) -> Id { msg_send_id![self, fileHandleForReading] } pub unsafe fn fileHandleForWriting(&self) -> Id { msg_send_id![self, fileHandleForWriting] } + pub unsafe fn pipe() -> Id { + msg_send_id![Self::class(), pipe] + } } diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 618186fe2..d90d99b3e 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -30,6 +30,9 @@ extern_class!( } ); impl NSFileManager { + pub unsafe fn defaultManager() -> Id { + msg_send_id![Self::class(), defaultManager] + } pub unsafe fn mountedVolumeURLsIncludingResourceValuesForKeys_options( &self, propertyKeys: Option<&NSArray>, @@ -153,6 +156,12 @@ impl NSFileManager { error: error ] } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSFileManagerDelegate>) { + msg_send![self, setDelegate: delegate] + } pub unsafe fn setAttributes_ofItemAtPath_error( &self, attributes: &NSDictionary, @@ -370,6 +379,9 @@ impl NSFileManager { ) -> bool { msg_send![self, removeFileAtPath: path, handler: handler] } + pub unsafe fn currentDirectoryPath(&self) -> Id { + msg_send_id![self, currentDirectoryPath] + } pub unsafe fn changeCurrentDirectoryPath(&self, path: &NSString) -> bool { msg_send![self, changeCurrentDirectoryPath: path] } @@ -527,6 +539,9 @@ impl NSFileManager { error: error ] } + pub unsafe fn ubiquityIdentityToken(&self) -> Option> { + msg_send_id![self, ubiquityIdentityToken] + } pub unsafe fn getFileProviderServicesForItemAtURL_completionHandler( &self, url: &NSURL, @@ -547,33 +562,18 @@ impl NSFileManager { containerURLForSecurityApplicationGroupIdentifier: groupIdentifier ] } - pub unsafe fn defaultManager() -> Id { - msg_send_id![Self::class(), defaultManager] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSFileManagerDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn currentDirectoryPath(&self) -> Id { - msg_send_id![self, currentDirectoryPath] - } - pub unsafe fn ubiquityIdentityToken(&self) -> Option> { - msg_send_id![self, ubiquityIdentityToken] - } } #[doc = "NSUserInformation"] impl NSFileManager { - pub unsafe fn homeDirectoryForUser(&self, userName: &NSString) -> Option> { - msg_send_id![self, homeDirectoryForUser: userName] - } pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id { msg_send_id![self, homeDirectoryForCurrentUser] } pub unsafe fn temporaryDirectory(&self) -> Id { msg_send_id![self, temporaryDirectory] } + pub unsafe fn homeDirectoryForUser(&self, userName: &NSString) -> Option> { + msg_send_id![self, homeDirectoryForUser: userName] + } } #[doc = "NSCopyLinkMoveHandler"] impl NSObject { @@ -597,12 +597,6 @@ __inner_extern_class!( } ); impl NSDirectoryEnumerator { - pub unsafe fn skipDescendents(&self) { - msg_send![self, skipDescendents] - } - pub unsafe fn skipDescendants(&self) { - msg_send![self, skipDescendants] - } pub unsafe fn fileAttributes( &self, ) -> Option, Shared>> { @@ -616,9 +610,15 @@ impl NSDirectoryEnumerator { pub unsafe fn isEnumeratingDirectoryPostOrder(&self) -> bool { msg_send![self, isEnumeratingDirectoryPostOrder] } + pub unsafe fn skipDescendents(&self) { + msg_send![self, skipDescendents] + } pub unsafe fn level(&self) -> NSUInteger { msg_send![self, level] } + pub unsafe fn skipDescendants(&self) { + msg_send![self, skipDescendants] + } } extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index 385504281..ca566e8ef 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -71,27 +71,6 @@ impl NSFileVersion { temporaryDirectoryURLForNewVersionOfItemAtURL: url ] } - pub unsafe fn replaceItemAtURL_options_error( - &self, - url: &NSURL, - options: NSFileVersionReplacingOptions, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, replaceItemAtURL: url, options: options, error: error] - } - pub unsafe fn removeAndReturnError(&self, outError: *mut *mut NSError) -> bool { - msg_send![self, removeAndReturnError: outError] - } - pub unsafe fn removeOtherVersionsOfItemAtURL_error( - url: &NSURL, - outError: *mut *mut NSError, - ) -> bool { - msg_send![ - Self::class(), - removeOtherVersionsOfItemAtURL: url, - error: outError - ] - } pub unsafe fn URL(&self) -> Id { msg_send_id![self, URL] } @@ -131,4 +110,25 @@ impl NSFileVersion { pub unsafe fn hasThumbnail(&self) -> bool { msg_send![self, hasThumbnail] } + pub unsafe fn replaceItemAtURL_options_error( + &self, + url: &NSURL, + options: NSFileVersionReplacingOptions, + error: *mut *mut NSError, + ) -> Option> { + msg_send_id![self, replaceItemAtURL: url, options: options, error: error] + } + pub unsafe fn removeAndReturnError(&self, outError: *mut *mut NSError) -> bool { + msg_send![self, removeAndReturnError: outError] + } + pub unsafe fn removeOtherVersionsOfItemAtURL_error( + url: &NSURL, + outError: *mut *mut NSError, + ) -> bool { + msg_send![ + Self::class(), + removeOtherVersionsOfItemAtURL: url, + error: outError + ] + } } diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index e8306442a..e87325dc6 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -48,6 +48,33 @@ impl NSFileWrapper { pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: inCoder] } + pub unsafe fn isDirectory(&self) -> bool { + msg_send![self, isDirectory] + } + pub unsafe fn isRegularFile(&self) -> bool { + msg_send![self, isRegularFile] + } + pub unsafe fn isSymbolicLink(&self) -> bool { + msg_send![self, isSymbolicLink] + } + pub unsafe fn preferredFilename(&self) -> Option> { + msg_send_id![self, preferredFilename] + } + pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>) { + msg_send![self, setPreferredFilename: preferredFilename] + } + pub unsafe fn filename(&self) -> Option> { + msg_send_id![self, filename] + } + pub unsafe fn setFilename(&self, filename: Option<&NSString>) { + msg_send![self, setFilename: filename] + } + pub unsafe fn fileAttributes(&self) -> Id, Shared> { + msg_send_id![self, fileAttributes] + } + pub unsafe fn setFileAttributes(&self, fileAttributes: &NSDictionary) { + msg_send![self, setFileAttributes: fileAttributes] + } pub unsafe fn matchesContentsOfURL(&self, url: &NSURL) -> bool { msg_send![self, matchesContentsOfURL: url] } @@ -74,6 +101,9 @@ impl NSFileWrapper { error: outError ] } + pub unsafe fn serializedRepresentation(&self) -> Option> { + msg_send_id![self, serializedRepresentation] + } pub unsafe fn addFileWrapper(&self, child: &NSFileWrapper) -> Id { msg_send_id![self, addFileWrapper: child] } @@ -91,42 +121,12 @@ impl NSFileWrapper { pub unsafe fn removeFileWrapper(&self, child: &NSFileWrapper) { msg_send![self, removeFileWrapper: child] } - pub unsafe fn keyForFileWrapper(&self, child: &NSFileWrapper) -> Option> { - msg_send_id![self, keyForFileWrapper: child] - } - pub unsafe fn isDirectory(&self) -> bool { - msg_send![self, isDirectory] - } - pub unsafe fn isRegularFile(&self) -> bool { - msg_send![self, isRegularFile] - } - pub unsafe fn isSymbolicLink(&self) -> bool { - msg_send![self, isSymbolicLink] - } - pub unsafe fn preferredFilename(&self) -> Option> { - msg_send_id![self, preferredFilename] - } - pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>) { - msg_send![self, setPreferredFilename: preferredFilename] - } - pub unsafe fn filename(&self) -> Option> { - msg_send_id![self, filename] - } - pub unsafe fn setFilename(&self, filename: Option<&NSString>) { - msg_send![self, setFilename: filename] - } - pub unsafe fn fileAttributes(&self) -> Id, Shared> { - msg_send_id![self, fileAttributes] - } - pub unsafe fn setFileAttributes(&self, fileAttributes: &NSDictionary) { - msg_send![self, setFileAttributes: fileAttributes] - } - pub unsafe fn serializedRepresentation(&self) -> Option> { - msg_send_id![self, serializedRepresentation] - } pub unsafe fn fileWrappers(&self) -> Option, Shared>> { msg_send_id![self, fileWrappers] } + pub unsafe fn keyForFileWrapper(&self, child: &NSFileWrapper) -> Option> { + msg_send_id![self, keyForFileWrapper: child] + } pub unsafe fn regularFileContents(&self) -> Option> { msg_send_id![self, regularFileContents] } diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index cbc4adbef..07b6486d1 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -19,6 +19,9 @@ extern_class!( } ); impl NSHTTPCookieStorage { + pub unsafe fn sharedHTTPCookieStorage() -> Id { + msg_send_id![Self::class(), sharedHTTPCookieStorage] + } pub unsafe fn sharedCookieStorageForGroupContainerIdentifier( identifier: &NSString, ) -> Id { @@ -27,6 +30,9 @@ impl NSHTTPCookieStorage { sharedCookieStorageForGroupContainerIdentifier: identifier ] } + pub unsafe fn cookies(&self) -> Option, Shared>> { + msg_send_id![self, cookies] + } pub unsafe fn setCookie(&self, cookie: &NSHTTPCookie) { msg_send![self, setCookie: cookie] } @@ -52,24 +58,18 @@ impl NSHTTPCookieStorage { mainDocumentURL: mainDocumentURL ] } - pub unsafe fn sortedCookiesUsingDescriptors( - &self, - sortOrder: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, sortedCookiesUsingDescriptors: sortOrder] - } - pub unsafe fn sharedHTTPCookieStorage() -> Id { - msg_send_id![Self::class(), sharedHTTPCookieStorage] - } - pub unsafe fn cookies(&self) -> Option, Shared>> { - msg_send_id![self, cookies] - } pub unsafe fn cookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy { msg_send![self, cookieAcceptPolicy] } pub unsafe fn setCookieAcceptPolicy(&self, cookieAcceptPolicy: NSHTTPCookieAcceptPolicy) { msg_send![self, setCookieAcceptPolicy: cookieAcceptPolicy] } + pub unsafe fn sortedCookiesUsingDescriptors( + &self, + sortOrder: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, sortedCookiesUsingDescriptors: sortOrder] + } } #[doc = "NSURLSessionTaskAdditions"] impl NSHTTPCookieStorage { diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 73ac50d6d..f5b1c48b2 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -45,6 +45,12 @@ impl NSHashTable { pub unsafe fn weakObjectsHashTable() -> Id, Shared> { msg_send_id![Self::class(), weakObjectsHashTable] } + pub unsafe fn pointerFunctions(&self) -> Id { + msg_send_id![self, pointerFunctions] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option> { msg_send_id![self, member: object] } @@ -60,6 +66,12 @@ impl NSHashTable { pub unsafe fn removeAllObjects(&self) { msg_send![self, removeAllObjects] } + pub unsafe fn allObjects(&self) -> Id, Shared> { + msg_send_id![self, allObjects] + } + pub unsafe fn anyObject(&self) -> Option> { + msg_send_id![self, anyObject] + } pub unsafe fn containsObject(&self, anObject: Option<&ObjectType>) -> bool { msg_send![self, containsObject: anObject] } @@ -81,18 +93,6 @@ impl NSHashTable { pub unsafe fn minusHashTable(&self, other: &NSHashTable) { msg_send![self, minusHashTable: other] } - pub unsafe fn pointerFunctions(&self) -> Id { - msg_send_id![self, pointerFunctions] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn allObjects(&self) -> Id, Shared> { - msg_send_id![self, allObjects] - } - pub unsafe fn anyObject(&self) -> Option> { - msg_send_id![self, anyObject] - } pub unsafe fn setRepresentation(&self) -> Id, Shared> { msg_send_id![self, setRepresentation] } diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index 16b57969f..38958feba 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -26,15 +26,6 @@ impl NSHost { pub unsafe fn isEqualToHost(&self, aHost: &NSHost) -> bool { msg_send![self, isEqualToHost: aHost] } - pub unsafe fn setHostCacheEnabled(flag: bool) { - msg_send![Self::class(), setHostCacheEnabled: flag] - } - pub unsafe fn isHostCacheEnabled() -> bool { - msg_send![Self::class(), isHostCacheEnabled] - } - pub unsafe fn flushHostCache() { - msg_send![Self::class(), flushHostCache] - } pub unsafe fn name(&self) -> Option> { msg_send_id![self, name] } @@ -50,4 +41,13 @@ impl NSHost { pub unsafe fn localizedName(&self) -> Option> { msg_send_id![self, localizedName] } + pub unsafe fn setHostCacheEnabled(flag: bool) { + msg_send![Self::class(), setHostCacheEnabled: flag] + } + pub unsafe fn isHostCacheEnabled() -> bool { + msg_send![Self::class(), isHostCacheEnabled] + } + pub unsafe fn flushHostCache() { + msg_send![Self::class(), flushHostCache] + } } diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 689388022..22e86e724 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -15,6 +15,18 @@ extern_class!( } ); impl NSISO8601DateFormatter { + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn formatOptions(&self) -> NSISO8601DateFormatOptions { + msg_send![self, formatOptions] + } + pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions) { + msg_send![self, setFormatOptions: formatOptions] + } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } @@ -36,16 +48,4 @@ impl NSISO8601DateFormatter { formatOptions: formatOptions ] } - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn formatOptions(&self) -> NSISO8601DateFormatOptions { - msg_send![self, formatOptions] - } - pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions) { - msg_send![self, setFormatOptions: formatOptions] - } } diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index b73839ec1..d6b9a687a 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -40,15 +40,15 @@ impl NSIndexPath { pub unsafe fn indexAtPosition(&self, position: NSUInteger) -> NSUInteger { msg_send![self, indexAtPosition: position] } + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } pub unsafe fn getIndexes_range(&self, indexes: NonNull, positionRange: NSRange) { msg_send![self, getIndexes: indexes, range: positionRange] } pub unsafe fn compare(&self, otherObject: &NSIndexPath) -> NSComparisonResult { msg_send![self, compare: otherObject] } - pub unsafe fn length(&self) -> NSUInteger { - msg_send![self, length] - } } #[doc = "NSDeprecated"] impl NSIndexPath { diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index da1d8239c..6a42383f1 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -33,6 +33,15 @@ impl NSIndexSet { pub unsafe fn isEqualToIndexSet(&self, indexSet: &NSIndexSet) -> bool { msg_send![self, isEqualToIndexSet: indexSet] } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn firstIndex(&self) -> NSUInteger { + msg_send![self, firstIndex] + } + pub unsafe fn lastIndex(&self) -> NSUInteger { + msg_send![self, lastIndex] + } pub unsafe fn indexGreaterThanIndex(&self, value: NSUInteger) -> NSUInteger { msg_send![self, indexGreaterThanIndex: value] } @@ -165,15 +174,6 @@ impl NSIndexSet { usingBlock: block ] } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn firstIndex(&self) -> NSUInteger { - msg_send![self, firstIndex] - } - pub unsafe fn lastIndex(&self) -> NSUInteger { - msg_send![self, lastIndex] - } } extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index 823d0323e..1b8f8baef 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -17,9 +17,27 @@ impl NSInvocation { ) -> Id { msg_send_id![Self::class(), invocationWithMethodSignature: sig] } + pub unsafe fn methodSignature(&self) -> Id { + msg_send_id![self, methodSignature] + } pub unsafe fn retainArguments(&self) { msg_send![self, retainArguments] } + pub unsafe fn argumentsRetained(&self) -> bool { + msg_send![self, argumentsRetained] + } + pub unsafe fn target(&self) -> Option> { + msg_send_id![self, target] + } + pub unsafe fn setTarget(&self, target: Option<&Object>) { + msg_send![self, setTarget: target] + } + pub unsafe fn selector(&self) -> Sel { + msg_send![self, selector] + } + pub unsafe fn setSelector(&self, selector: Sel) { + msg_send![self, setSelector: selector] + } pub unsafe fn getReturnValue(&self, retLoc: NonNull) { msg_send![self, getReturnValue: retLoc] } @@ -38,22 +56,4 @@ impl NSInvocation { pub unsafe fn invokeWithTarget(&self, target: &Object) { msg_send![self, invokeWithTarget: target] } - pub unsafe fn methodSignature(&self) -> Id { - msg_send_id![self, methodSignature] - } - pub unsafe fn argumentsRetained(&self) -> bool { - msg_send![self, argumentsRetained] - } - pub unsafe fn target(&self) -> Option> { - msg_send_id![self, target] - } - pub unsafe fn setTarget(&self, target: Option<&Object>) { - msg_send![self, setTarget: target] - } - pub unsafe fn selector(&self) -> Sel { - msg_send![self, selector] - } - pub unsafe fn setSelector(&self, selector: Sel) { - msg_send![self, setSelector: selector] - } } diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index ac08b003f..524b59c6f 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -45,6 +45,9 @@ impl NSItemProvider { loadHandler: loadHandler ] } + pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared> { + msg_send_id![self, registeredTypeIdentifiers] + } pub unsafe fn registeredTypeIdentifiersWithFileOptions( &self, fileOptions: NSItemProviderFileOptions, @@ -98,6 +101,12 @@ impl NSItemProvider { completionHandler: completionHandler ] } + pub unsafe fn suggestedName(&self) -> Option> { + msg_send_id![self, suggestedName] + } + pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>) { + msg_send![self, setSuggestedName: suggestedName] + } pub unsafe fn initWithObject(&self, object: &NSItemProviderWriting) -> Id { msg_send_id![self, initWithObject: object] } @@ -145,18 +154,15 @@ impl NSItemProvider { completionHandler: completionHandler ] } - pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared> { - msg_send_id![self, registeredTypeIdentifiers] - } - pub unsafe fn suggestedName(&self) -> Option> { - msg_send_id![self, suggestedName] - } - pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>) { - msg_send![self, setSuggestedName: suggestedName] - } } #[doc = "NSPreviewSupport"] impl NSItemProvider { + pub unsafe fn previewImageHandler(&self) -> NSItemProviderLoadHandler { + msg_send![self, previewImageHandler] + } + pub unsafe fn setPreviewImageHandler(&self, previewImageHandler: NSItemProviderLoadHandler) { + msg_send![self, setPreviewImageHandler: previewImageHandler] + } pub unsafe fn loadPreviewImageWithOptions_completionHandler( &self, options: Option<&NSDictionary>, @@ -168,10 +174,4 @@ impl NSItemProvider { completionHandler: completionHandler ] } - pub unsafe fn previewImageHandler(&self) -> NSItemProviderLoadHandler { - msg_send![self, previewImageHandler] - } - pub unsafe fn setPreviewImageHandler(&self, previewImageHandler: NSItemProviderLoadHandler) { - msg_send![self, setPreviewImageHandler: previewImageHandler] - } } diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index 45b90c887..aec1db378 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -12,6 +12,9 @@ use objc2::{extern_class, msg_send, msg_send_id, ClassType}; pub type NSKeyValueOperator = NSString; #[doc = "NSKeyValueCoding"] impl NSObject { + pub unsafe fn accessInstanceVariablesDirectly() -> bool { + msg_send![Self::class(), accessInstanceVariablesDirectly] + } pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { msg_send_id![self, valueForKey: key] } @@ -93,9 +96,6 @@ impl NSObject { ) { msg_send![self, setValuesForKeysWithDictionary: keyedValues] } - pub unsafe fn accessInstanceVariablesDirectly() -> bool { - msg_send![Self::class(), accessInstanceVariablesDirectly] - } } #[doc = "NSKeyValueCoding"] impl NSArray { diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index dec116651..2f229af6d 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -45,6 +45,21 @@ impl NSKeyedArchiver { pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool { msg_send![Self::class(), archiveRootObject: rootObject, toFile: path] } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedArchiverDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn outputFormat(&self) -> NSPropertyListFormat { + msg_send![self, outputFormat] + } + pub unsafe fn setOutputFormat(&self, outputFormat: NSPropertyListFormat) { + msg_send![self, setOutputFormat: outputFormat] + } + pub unsafe fn encodedData(&self) -> Id { + msg_send_id![self, encodedData] + } pub unsafe fn finishEncoding(&self) { msg_send![self, finishEncoding] } @@ -92,21 +107,6 @@ impl NSKeyedArchiver { ) { msg_send![self, encodeBytes: bytes, length: length, forKey: key] } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedArchiverDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn outputFormat(&self) -> NSPropertyListFormat { - msg_send![self, outputFormat] - } - pub unsafe fn setOutputFormat(&self, outputFormat: NSPropertyListFormat) { - msg_send![self, setOutputFormat: outputFormat] - } - pub unsafe fn encodedData(&self) -> Id { - msg_send_id![self, encodedData] - } pub unsafe fn requiresSecureCoding(&self) -> bool { msg_send![self, requiresSecureCoding] } @@ -227,6 +227,12 @@ impl NSKeyedUnarchiver { pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option> { msg_send_id![Self::class(), unarchiveObjectWithFile: path] } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedUnarchiverDelegate>) { + msg_send![self, setDelegate: delegate] + } pub unsafe fn finishDecoding(&self) { msg_send![self, finishDecoding] } @@ -273,12 +279,6 @@ impl NSKeyedUnarchiver { ) -> *mut u8 { msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedUnarchiverDelegate>) { - msg_send![self, setDelegate: delegate] - } pub unsafe fn requiresSecureCoding(&self) -> bool { msg_send![self, requiresSecureCoding] } @@ -296,6 +296,9 @@ pub type NSKeyedArchiverDelegate = NSObject; pub type NSKeyedUnarchiverDelegate = NSObject; #[doc = "NSKeyedArchiverObjectSubstitution"] impl NSObject { + pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class> { + msg_send![self, classForKeyedArchiver] + } pub unsafe fn replacementObjectForKeyedArchiver( &self, archiver: &NSKeyedArchiver, @@ -305,9 +308,6 @@ impl NSObject { pub unsafe fn classFallbacksForKeyedArchiver() -> Id, Shared> { msg_send_id![Self::class(), classFallbacksForKeyedArchiver] } - pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class> { - msg_send![self, classForKeyedArchiver] - } } #[doc = "NSKeyedUnarchiverObjectSubstitution"] impl NSObject { diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index 40e2ddafc..44b3f7c7c 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -11,6 +11,24 @@ extern_class!( } ); impl NSLengthFormatter { + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn isForPersonHeightUse(&self) -> bool { + msg_send![self, isForPersonHeightUse] + } + pub unsafe fn setForPersonHeightUse(&self, forPersonHeightUse: bool) { + msg_send![self, setForPersonHeightUse: forPersonHeightUse] + } pub unsafe fn stringFromValue_unit( &self, value: c_double, @@ -48,22 +66,4 @@ impl NSLengthFormatter { errorDescription: error ] } - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] - } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn isForPersonHeightUse(&self) -> bool { - msg_send![self, isForPersonHeightUse] - } - pub unsafe fn setForPersonHeightUse(&self, forPersonHeightUse: bool) { - msg_send![self, setForPersonHeightUse: forPersonHeightUse] - } } diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 1ec2edd54..94125035d 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -24,6 +24,15 @@ impl NSLinguisticTagger { ) -> Id { msg_send_id![self, initWithTagSchemes: tagSchemes, options: opts] } + pub unsafe fn tagSchemes(&self) -> Id, Shared> { + msg_send_id![self, tagSchemes] + } + pub unsafe fn string(&self) -> Option> { + msg_send_id![self, string] + } + pub unsafe fn setString(&self, string: Option<&NSString>) { + msg_send![self, setString: string] + } pub unsafe fn availableTagSchemesForUnit_language( unit: NSLinguisticTaggerUnit, language: &NSString, @@ -160,6 +169,9 @@ impl NSLinguisticTagger { tokenRanges: tokenRanges ] } + pub unsafe fn dominantLanguage(&self) -> Option> { + msg_send_id![self, dominantLanguage] + } pub unsafe fn dominantLanguageForString(string: &NSString) -> Option> { msg_send_id![Self::class(), dominantLanguageForString: string] } @@ -238,18 +250,6 @@ impl NSLinguisticTagger { scores: scores ] } - pub unsafe fn tagSchemes(&self) -> Id, Shared> { - msg_send_id![self, tagSchemes] - } - pub unsafe fn string(&self) -> Option> { - msg_send_id![self, string] - } - pub unsafe fn setString(&self, string: Option<&NSString>) { - msg_send![self, setString: string] - } - pub unsafe fn dominantLanguage(&self) -> Option> { - msg_send_id![self, dominantLanguage] - } } #[doc = "NSLinguisticAnalysis"] impl NSString { diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index 7c95bf246..faeac2e54 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -13,6 +13,18 @@ extern_class!( } ); impl NSListFormatter { + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn itemFormatter(&self) -> Option> { + msg_send_id![self, itemFormatter] + } + pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>) { + msg_send![self, setItemFormatter: itemFormatter] + } pub unsafe fn localizedStringByJoiningStrings( strings: &NSArray, ) -> Id { @@ -27,16 +39,4 @@ impl NSListFormatter { ) -> Option> { msg_send_id![self, stringForObjectValue: obj] } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn itemFormatter(&self) -> Option> { - msg_send_id![self, itemFormatter] - } - pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>) { - msg_send![self, setItemFormatter: itemFormatter] - } } diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 969fff2c3..1c79c2a78 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -37,36 +37,57 @@ impl NSLocale { } #[doc = "NSExtendedLocale"] impl NSLocale { + pub unsafe fn localeIdentifier(&self) -> Id { + msg_send_id![self, localeIdentifier] + } pub unsafe fn localizedStringForLocaleIdentifier( &self, localeIdentifier: &NSString, ) -> Id { msg_send_id![self, localizedStringForLocaleIdentifier: localeIdentifier] } + pub unsafe fn languageCode(&self) -> Id { + msg_send_id![self, languageCode] + } pub unsafe fn localizedStringForLanguageCode( &self, languageCode: &NSString, ) -> Option> { msg_send_id![self, localizedStringForLanguageCode: languageCode] } + pub unsafe fn countryCode(&self) -> Option> { + msg_send_id![self, countryCode] + } pub unsafe fn localizedStringForCountryCode( &self, countryCode: &NSString, ) -> Option> { msg_send_id![self, localizedStringForCountryCode: countryCode] } + pub unsafe fn scriptCode(&self) -> Option> { + msg_send_id![self, scriptCode] + } pub unsafe fn localizedStringForScriptCode( &self, scriptCode: &NSString, ) -> Option> { msg_send_id![self, localizedStringForScriptCode: scriptCode] } + pub unsafe fn variantCode(&self) -> Option> { + msg_send_id![self, variantCode] + } pub unsafe fn localizedStringForVariantCode( &self, variantCode: &NSString, ) -> Option> { msg_send_id![self, localizedStringForVariantCode: variantCode] } + pub unsafe fn exemplarCharacterSet(&self) -> Id { + msg_send_id![self, exemplarCharacterSet] + } + pub unsafe fn calendarIdentifier(&self) -> Id { + msg_send_id![self, calendarIdentifier] + } pub unsafe fn localizedStringForCalendarIdentifier( &self, calendarIdentifier: &NSString, @@ -76,6 +97,9 @@ impl NSLocale { localizedStringForCalendarIdentifier: calendarIdentifier ] } + pub unsafe fn collationIdentifier(&self) -> Option> { + msg_send_id![self, collationIdentifier] + } pub unsafe fn localizedStringForCollationIdentifier( &self, collationIdentifier: &NSString, @@ -85,45 +109,6 @@ impl NSLocale { localizedStringForCollationIdentifier: collationIdentifier ] } - pub unsafe fn localizedStringForCurrencyCode( - &self, - currencyCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForCurrencyCode: currencyCode] - } - pub unsafe fn localizedStringForCollatorIdentifier( - &self, - collatorIdentifier: &NSString, - ) -> Option> { - msg_send_id![ - self, - localizedStringForCollatorIdentifier: collatorIdentifier - ] - } - pub unsafe fn localeIdentifier(&self) -> Id { - msg_send_id![self, localeIdentifier] - } - pub unsafe fn languageCode(&self) -> Id { - msg_send_id![self, languageCode] - } - pub unsafe fn countryCode(&self) -> Option> { - msg_send_id![self, countryCode] - } - pub unsafe fn scriptCode(&self) -> Option> { - msg_send_id![self, scriptCode] - } - pub unsafe fn variantCode(&self) -> Option> { - msg_send_id![self, variantCode] - } - pub unsafe fn exemplarCharacterSet(&self) -> Id { - msg_send_id![self, exemplarCharacterSet] - } - pub unsafe fn calendarIdentifier(&self) -> Id { - msg_send_id![self, calendarIdentifier] - } - pub unsafe fn collationIdentifier(&self) -> Option> { - msg_send_id![self, collationIdentifier] - } pub unsafe fn usesMetricSystem(&self) -> bool { msg_send![self, usesMetricSystem] } @@ -139,9 +124,24 @@ impl NSLocale { pub unsafe fn currencyCode(&self) -> Option> { msg_send_id![self, currencyCode] } + pub unsafe fn localizedStringForCurrencyCode( + &self, + currencyCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForCurrencyCode: currencyCode] + } pub unsafe fn collatorIdentifier(&self) -> Id { msg_send_id![self, collatorIdentifier] } + pub unsafe fn localizedStringForCollatorIdentifier( + &self, + collatorIdentifier: &NSString, + ) -> Option> { + msg_send_id![ + self, + localizedStringForCollatorIdentifier: collatorIdentifier + ] + } pub unsafe fn quotationBeginDelimiter(&self) -> Id { msg_send_id![self, quotationBeginDelimiter] } @@ -157,12 +157,6 @@ impl NSLocale { } #[doc = "NSLocaleCreation"] impl NSLocale { - pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id { - msg_send_id![Self::class(), localeWithLocaleIdentifier: ident] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } pub unsafe fn autoupdatingCurrentLocale() -> Id { msg_send_id![Self::class(), autoupdatingCurrentLocale] } @@ -172,9 +166,33 @@ impl NSLocale { pub unsafe fn systemLocale() -> Id { msg_send_id![Self::class(), systemLocale] } + pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id { + msg_send_id![Self::class(), localeWithLocaleIdentifier: ident] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } } #[doc = "NSLocaleGeneralInfo"] impl NSLocale { + pub unsafe fn availableLocaleIdentifiers() -> Id, Shared> { + msg_send_id![Self::class(), availableLocaleIdentifiers] + } + pub unsafe fn ISOLanguageCodes() -> Id, Shared> { + msg_send_id![Self::class(), ISOLanguageCodes] + } + pub unsafe fn ISOCountryCodes() -> Id, Shared> { + msg_send_id![Self::class(), ISOCountryCodes] + } + pub unsafe fn ISOCurrencyCodes() -> Id, Shared> { + msg_send_id![Self::class(), ISOCurrencyCodes] + } + pub unsafe fn commonISOCurrencyCodes() -> Id, Shared> { + msg_send_id![Self::class(), commonISOCurrencyCodes] + } + pub unsafe fn preferredLanguages() -> Id, Shared> { + msg_send_id![Self::class(), preferredLanguages] + } pub unsafe fn componentsFromLocaleIdentifier( string: &NSString, ) -> Id, Shared> { @@ -208,22 +226,4 @@ impl NSLocale { pub unsafe fn lineDirectionForLanguage(isoLangCode: &NSString) -> NSLocaleLanguageDirection { msg_send![Self::class(), lineDirectionForLanguage: isoLangCode] } - pub unsafe fn availableLocaleIdentifiers() -> Id, Shared> { - msg_send_id![Self::class(), availableLocaleIdentifiers] - } - pub unsafe fn ISOLanguageCodes() -> Id, Shared> { - msg_send_id![Self::class(), ISOLanguageCodes] - } - pub unsafe fn ISOCountryCodes() -> Id, Shared> { - msg_send_id![Self::class(), ISOCountryCodes] - } - pub unsafe fn ISOCurrencyCodes() -> Id, Shared> { - msg_send_id![Self::class(), ISOCurrencyCodes] - } - pub unsafe fn commonISOCurrencyCodes() -> Id, Shared> { - msg_send_id![Self::class(), commonISOCurrencyCodes] - } - pub unsafe fn preferredLanguages() -> Id, Shared> { - msg_send_id![Self::class(), preferredLanguages] - } } diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index b62092c72..8a481d36c 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -37,6 +37,9 @@ impl NSConditionLock { pub unsafe fn initWithCondition(&self, condition: NSInteger) -> Id { msg_send_id![self, initWithCondition: condition] } + pub unsafe fn condition(&self) -> NSInteger { + msg_send![self, condition] + } pub unsafe fn lockWhenCondition(&self, condition: NSInteger) { msg_send![self, lockWhenCondition: condition] } @@ -59,9 +62,6 @@ impl NSConditionLock { ) -> bool { msg_send![self, lockWhenCondition: condition, beforeDate: limit] } - pub unsafe fn condition(&self) -> NSInteger { - msg_send![self, condition] - } pub unsafe fn name(&self) -> Option> { msg_send_id![self, name] } diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 247aed168..a54160684 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -76,6 +76,12 @@ impl NSMapTable { pub unsafe fn weakToWeakObjectsMapTable() -> Id, Shared> { msg_send_id![Self::class(), weakToWeakObjectsMapTable] } + pub unsafe fn keyPointerFunctions(&self) -> Id { + msg_send_id![self, keyPointerFunctions] + } + pub unsafe fn valuePointerFunctions(&self) -> Id { + msg_send_id![self, valuePointerFunctions] + } pub unsafe fn objectForKey(&self, aKey: Option<&KeyType>) -> Option> { msg_send_id![self, objectForKey: aKey] } @@ -85,6 +91,9 @@ impl NSMapTable { pub unsafe fn setObject_forKey(&self, anObject: Option<&ObjectType>, aKey: Option<&KeyType>) { msg_send![self, setObject: anObject, forKey: aKey] } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } pub unsafe fn keyEnumerator(&self) -> Id, Shared> { msg_send_id![self, keyEnumerator] } @@ -97,13 +106,4 @@ impl NSMapTable { pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared> { msg_send_id![self, dictionaryRepresentation] } - pub unsafe fn keyPointerFunctions(&self) -> Id { - msg_send_id![self, keyPointerFunctions] - } - pub unsafe fn valuePointerFunctions(&self) -> Id { - msg_send_id![self, valuePointerFunctions] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } } diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 1eeb09405..0121b5e1a 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -12,6 +12,24 @@ extern_class!( } ); impl NSMassFormatter { + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn isForPersonMassUse(&self) -> bool { + msg_send![self, isForPersonMassUse] + } + pub unsafe fn setForPersonMassUse(&self, forPersonMassUse: bool) { + msg_send![self, setForPersonMassUse: forPersonMassUse] + } pub unsafe fn stringFromValue_unit( &self, value: c_double, @@ -53,22 +71,4 @@ impl NSMassFormatter { errorDescription: error ] } - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] - } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn isForPersonMassUse(&self) -> bool { - msg_send![self, isForPersonMassUse] - } - pub unsafe fn setForPersonMassUse(&self, forPersonMassUse: bool) { - msg_send![self, setForPersonMassUse: forPersonMassUse] - } } diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index b92ac392f..e223cfe4c 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -12,6 +12,12 @@ __inner_extern_class!( } ); impl NSMeasurement { + pub unsafe fn unit(&self) -> Id { + msg_send_id![self, unit] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } @@ -40,10 +46,4 @@ impl NSMeasurement { ) -> Id, Shared> { msg_send_id![self, measurementBySubtractingMeasurement: measurement] } - pub unsafe fn unit(&self) -> Id { - msg_send_id![self, unit] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } } diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index e531a7c95..9683bc43e 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -15,15 +15,6 @@ extern_class!( } ); impl NSMeasurementFormatter { - pub unsafe fn stringFromMeasurement( - &self, - measurement: &NSMeasurement, - ) -> Id { - msg_send_id![self, stringFromMeasurement: measurement] - } - pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id { - msg_send_id![self, stringFromUnit: unit] - } pub unsafe fn unitOptions(&self) -> NSMeasurementFormatterUnitOptions { msg_send![self, unitOptions] } @@ -48,4 +39,13 @@ impl NSMeasurementFormatter { pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { msg_send![self, setNumberFormatter: numberFormatter] } + pub unsafe fn stringFromMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id { + msg_send_id![self, stringFromMeasurement: measurement] + } + pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id { + msg_send_id![self, stringFromUnit: unit] + } } diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index bc3ce7350..66ddba5f9 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -21,41 +21,6 @@ extern_class!( } ); impl NSMetadataQuery { - pub unsafe fn startQuery(&self) -> bool { - msg_send![self, startQuery] - } - pub unsafe fn stopQuery(&self) { - msg_send![self, stopQuery] - } - pub unsafe fn disableUpdates(&self) { - msg_send![self, disableUpdates] - } - pub unsafe fn enableUpdates(&self) { - msg_send![self, enableUpdates] - } - pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { - msg_send_id![self, resultAtIndex: idx] - } - pub unsafe fn enumerateResultsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateResultsUsingBlock: block] - } - pub unsafe fn enumerateResultsWithOptions_usingBlock( - &self, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![self, enumerateResultsWithOptions: opts, usingBlock: block] - } - pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger { - msg_send![self, indexOfResult: result] - } - pub unsafe fn valueOfAttribute_forResultAtIndex( - &self, - attrName: &NSString, - idx: NSUInteger, - ) -> Option> { - msg_send_id![self, valueOfAttribute: attrName, forResultAtIndex: idx] - } pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } @@ -116,6 +81,12 @@ impl NSMetadataQuery { pub unsafe fn setOperationQueue(&self, operationQueue: Option<&NSOperationQueue>) { msg_send![self, setOperationQueue: operationQueue] } + pub unsafe fn startQuery(&self) -> bool { + msg_send![self, startQuery] + } + pub unsafe fn stopQuery(&self) { + msg_send![self, stopQuery] + } pub unsafe fn isStarted(&self) -> bool { msg_send![self, isStarted] } @@ -125,12 +96,34 @@ impl NSMetadataQuery { pub unsafe fn isStopped(&self) -> bool { msg_send![self, isStopped] } + pub unsafe fn disableUpdates(&self) { + msg_send![self, disableUpdates] + } + pub unsafe fn enableUpdates(&self) { + msg_send![self, enableUpdates] + } pub unsafe fn resultCount(&self) -> NSUInteger { msg_send![self, resultCount] } + pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { + msg_send_id![self, resultAtIndex: idx] + } + pub unsafe fn enumerateResultsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateResultsUsingBlock: block] + } + pub unsafe fn enumerateResultsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateResultsWithOptions: opts, usingBlock: block] + } pub unsafe fn results(&self) -> Id { msg_send_id![self, results] } + pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger { + msg_send![self, indexOfResult: result] + } pub unsafe fn valueLists( &self, ) -> Id>, Shared> { @@ -139,6 +132,13 @@ impl NSMetadataQuery { pub unsafe fn groupedResults(&self) -> Id, Shared> { msg_send_id![self, groupedResults] } + pub unsafe fn valueOfAttribute_forResultAtIndex( + &self, + attrName: &NSString, + idx: NSUInteger, + ) -> Option> { + msg_send_id![self, valueOfAttribute: attrName, forResultAtIndex: idx] + } } pub type NSMetadataQueryDelegate = NSObject; extern_class!( @@ -191,9 +191,6 @@ extern_class!( } ); impl NSMetadataQueryResultGroup { - pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { - msg_send_id![self, resultAtIndex: idx] - } pub unsafe fn attribute(&self) -> Id { msg_send_id![self, attribute] } @@ -206,6 +203,9 @@ impl NSMetadataQueryResultGroup { pub unsafe fn resultCount(&self) -> NSUInteger { msg_send![self, resultCount] } + pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { + msg_send_id![self, resultAtIndex: idx] + } pub unsafe fn results(&self) -> Id { msg_send_id![self, results] } diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index 0603d41e5..990f2e664 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -16,18 +16,18 @@ impl NSMethodSignature { ) -> Option> { msg_send_id![Self::class(), signatureWithObjCTypes: types] } - pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull { - msg_send![self, getArgumentTypeAtIndex: idx] - } - pub unsafe fn isOneway(&self) -> bool { - msg_send![self, isOneway] - } pub unsafe fn numberOfArguments(&self) -> NSUInteger { msg_send![self, numberOfArguments] } + pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull { + msg_send![self, getArgumentTypeAtIndex: idx] + } pub unsafe fn frameLength(&self) -> NSUInteger { msg_send![self, frameLength] } + pub unsafe fn isOneway(&self) -> bool { + msg_send![self, isOneway] + } pub unsafe fn methodReturnType(&self) -> NonNull { msg_send![self, methodReturnType] } diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index f958b2990..01e1cc5ef 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -45,6 +45,36 @@ impl NSNetService { pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn includesPeerToPeer(&self) -> bool { + msg_send![self, includesPeerToPeer] + } + pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { + msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn type_(&self) -> Id { + msg_send_id![self, type] + } + pub unsafe fn domain(&self) -> Id { + msg_send_id![self, domain] + } + pub unsafe fn hostName(&self) -> Option> { + msg_send_id![self, hostName] + } + pub unsafe fn addresses(&self) -> Option, Shared>> { + msg_send_id![self, addresses] + } + pub unsafe fn port(&self) -> NSInteger { + msg_send![self, port] + } pub unsafe fn publish(&self) { msg_send![self, publish] } @@ -82,36 +112,6 @@ impl NSNetService { pub unsafe fn stopMonitoring(&self) { msg_send![self, stopMonitoring] } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn includesPeerToPeer(&self) -> bool { - msg_send![self, includesPeerToPeer] - } - pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { - msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn type_(&self) -> Id { - msg_send_id![self, type] - } - pub unsafe fn domain(&self) -> Id { - msg_send_id![self, domain] - } - pub unsafe fn hostName(&self) -> Option> { - msg_send_id![self, hostName] - } - pub unsafe fn addresses(&self) -> Option, Shared>> { - msg_send_id![self, addresses] - } - pub unsafe fn port(&self) -> NSInteger { - msg_send![self, port] - } } extern_class!( #[derive(Debug)] @@ -124,6 +124,18 @@ impl NSNetServiceBrowser { pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceBrowserDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn includesPeerToPeer(&self) -> bool { + msg_send![self, includesPeerToPeer] + } + pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { + msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] + } pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] } @@ -146,18 +158,6 @@ impl NSNetServiceBrowser { pub unsafe fn stop(&self) { msg_send![self, stop] } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceBrowserDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn includesPeerToPeer(&self) -> bool { - msg_send![self, includesPeerToPeer] - } - pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { - msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] - } } pub type NSNetServiceDelegate = NSObject; pub type NSNetServiceBrowserDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 29499a5ab..89119478d 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -15,6 +15,15 @@ extern_class!( } ); impl NSNotification { + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn object(&self) -> Option> { + msg_send_id![self, object] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } pub unsafe fn initWithName_object_userInfo( &self, name: &NSNotificationName, @@ -26,15 +35,6 @@ impl NSNotification { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn object(&self) -> Option> { - msg_send_id![self, object] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } } #[doc = "NSNotificationCreation"] impl NSNotification { @@ -68,6 +68,9 @@ extern_class!( } ); impl NSNotificationCenter { + pub unsafe fn defaultCenter() -> Id { + msg_send_id![Self::class(), defaultCenter] + } pub unsafe fn addObserver_selector_name_object( &self, observer: &Object, @@ -137,7 +140,4 @@ impl NSNotificationCenter { usingBlock: block ] } - pub unsafe fn defaultCenter() -> Id { - msg_send_id![Self::class(), defaultCenter] - } } diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index 4a7c55ffb..51fc8a242 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -16,6 +16,9 @@ extern_class!( } ); impl NSNotificationQueue { + pub unsafe fn defaultQueue() -> Id { + msg_send_id![Self::class(), defaultQueue] + } pub unsafe fn initWithNotificationCenter( &self, notificationCenter: &NSNotificationCenter, @@ -59,7 +62,4 @@ impl NSNotificationQueue { coalesceMask: coalesceMask ] } - pub unsafe fn defaultQueue() -> Id { - msg_send_id![Self::class(), defaultQueue] - } } diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 6b8cb7883..ca35042a0 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -18,6 +18,12 @@ extern_class!( } ); impl NSNumberFormatter { + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } pub unsafe fn getObjectValue_forString_range_error( &self, obj: Option<&mut Option>>, @@ -55,12 +61,6 @@ impl NSNumberFormatter { pub unsafe fn setDefaultFormatterBehavior(behavior: NSNumberFormatterBehavior) { msg_send![Self::class(), setDefaultFormatterBehavior: behavior] } - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] - } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } pub unsafe fn numberStyle(&self) -> NSNumberFormatterStyle { msg_send![self, numberStyle] } diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index c244f856e..7a9930f44 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -23,12 +23,12 @@ impl NSObject { pub unsafe fn setVersion(aVersion: NSInteger) { msg_send![Self::class(), setVersion: aVersion] } - pub unsafe fn replacementObjectForCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, replacementObjectForCoder: coder] - } pub unsafe fn classForCoder(&self) -> &Class { msg_send![self, classForCoder] } + pub unsafe fn replacementObjectForCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, replacementObjectForCoder: coder] + } } #[doc = "NSDeprecatedMethods"] impl NSObject { diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs index e54174c68..c237ac9d6 100644 --- a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -14,6 +14,15 @@ impl NSObject { ) -> Option> { msg_send_id![self, scriptingValueForSpecifier: objectSpecifier] } + pub unsafe fn scriptingProperties(&self) -> Option, Shared>> { + msg_send_id![self, scriptingProperties] + } + pub unsafe fn setScriptingProperties( + &self, + scriptingProperties: Option<&NSDictionary>, + ) { + msg_send![self, setScriptingProperties: scriptingProperties] + } pub unsafe fn copyScriptingValue_forKey_withProperties( &self, value: &Object, @@ -42,13 +51,4 @@ impl NSObject { properties: properties ] } - pub unsafe fn scriptingProperties(&self) -> Option, Shared>> { - msg_send_id![self, scriptingProperties] - } - pub unsafe fn setScriptingProperties( - &self, - scriptingProperties: Option<&NSDictionary>, - ) { - msg_send![self, setScriptingProperties: scriptingProperties] - } } diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 93ccb95f3..a50e63e00 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -23,21 +23,12 @@ impl NSOperation { pub unsafe fn main(&self) { msg_send![self, main] } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn addDependency(&self, op: &NSOperation) { - msg_send![self, addDependency: op] - } - pub unsafe fn removeDependency(&self, op: &NSOperation) { - msg_send![self, removeDependency: op] - } - pub unsafe fn waitUntilFinished(&self) { - msg_send![self, waitUntilFinished] - } pub unsafe fn isCancelled(&self) -> bool { msg_send![self, isCancelled] } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } pub unsafe fn isExecuting(&self) -> bool { msg_send![self, isExecuting] } @@ -53,6 +44,12 @@ impl NSOperation { pub unsafe fn isReady(&self) -> bool { msg_send![self, isReady] } + pub unsafe fn addDependency(&self, op: &NSOperation) { + msg_send![self, addDependency: op] + } + pub unsafe fn removeDependency(&self, op: &NSOperation) { + msg_send![self, removeDependency: op] + } pub unsafe fn dependencies(&self) -> Id, Shared> { msg_send_id![self, dependencies] } @@ -68,6 +65,9 @@ impl NSOperation { pub unsafe fn setCompletionBlock(&self, completionBlock: TodoBlock) { msg_send![self, setCompletionBlock: completionBlock] } + pub unsafe fn waitUntilFinished(&self) { + msg_send![self, waitUntilFinished] + } pub unsafe fn threadPriority(&self) -> c_double { msg_send![self, threadPriority] } @@ -136,6 +136,9 @@ extern_class!( } ); impl NSOperationQueue { + pub unsafe fn progress(&self) -> Id { + msg_send_id![self, progress] + } pub unsafe fn addOperation(&self, op: &NSOperation) { msg_send![self, addOperation: op] } @@ -148,15 +151,6 @@ impl NSOperationQueue { pub unsafe fn addBarrierBlock(&self, barrier: TodoBlock) { msg_send![self, addBarrierBlock: barrier] } - pub unsafe fn cancelAllOperations(&self) { - msg_send![self, cancelAllOperations] - } - pub unsafe fn waitUntilAllOperationsAreFinished(&self) { - msg_send![self, waitUntilAllOperationsAreFinished] - } - pub unsafe fn progress(&self) -> Id { - msg_send_id![self, progress] - } pub unsafe fn maxConcurrentOperationCount(&self) -> NSInteger { msg_send![self, maxConcurrentOperationCount] } @@ -190,6 +184,12 @@ impl NSOperationQueue { pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: Option<&dispatch_queue_t>) { msg_send![self, setUnderlyingQueue: underlyingQueue] } + pub unsafe fn cancelAllOperations(&self) { + msg_send![self, cancelAllOperations] + } + pub unsafe fn waitUntilAllOperationsAreFinished(&self) { + msg_send![self, waitUntilAllOperationsAreFinished] + } pub unsafe fn currentQueue() -> Option> { msg_send_id![Self::class(), currentQueue] } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 9aec5b53b..ab16e40d5 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -26,6 +26,18 @@ impl NSOrderedCollectionChange { ) -> Id, Shared> { msg_send_id ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] } + pub unsafe fn object(&self) -> Option> { + msg_send_id![self, object] + } + pub unsafe fn changeType(&self) -> NSCollectionChangeType { + msg_send![self, changeType] + } + pub unsafe fn index(&self) -> NSUInteger { + msg_send![self, index] + } + pub unsafe fn associatedIndex(&self) -> NSUInteger { + msg_send![self, associatedIndex] + } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } @@ -46,16 +58,4 @@ impl NSOrderedCollectionChange { ) -> Id { msg_send_id ! [self , initWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] } - pub unsafe fn object(&self) -> Option> { - msg_send_id![self, object] - } - pub unsafe fn changeType(&self) -> NSCollectionChangeType { - msg_send![self, changeType] - } - pub unsafe fn index(&self) -> NSUInteger { - msg_send![self, index] - } - pub unsafe fn associatedIndex(&self) -> NSUInteger { - msg_send![self, associatedIndex] - } } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 0f964237d..6c083a2b9 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -52,15 +52,6 @@ impl NSOrderedCollectionDifference { removedObjects: removedObjects ] } - pub unsafe fn differenceByTransformingChangesWithBlock( - &self, - block: TodoBlock, - ) -> Id, Shared> { - msg_send_id![self, differenceByTransformingChangesWithBlock: block] - } - pub unsafe fn inverseDifference(&self) -> Id { - msg_send_id![self, inverseDifference] - } pub unsafe fn insertions(&self) -> Id>, Shared> { msg_send_id![self, insertions] } @@ -70,4 +61,13 @@ impl NSOrderedCollectionDifference { pub unsafe fn hasChanges(&self) -> bool { msg_send![self, hasChanges] } + pub unsafe fn differenceByTransformingChangesWithBlock( + &self, + block: TodoBlock, + ) -> Id, Shared> { + msg_send_id![self, differenceByTransformingChangesWithBlock: block] + } + pub unsafe fn inverseDifference(&self) -> Id { + msg_send_id![self, inverseDifference] + } } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index ce1bdeef0..0087e0e8d 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -19,6 +19,9 @@ __inner_extern_class!( } ); impl NSOrderedSet { + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Id { msg_send_id![self, objectAtIndex: idx] } @@ -38,9 +41,6 @@ impl NSOrderedSet { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } } #[doc = "NSExtendedOrderedSet"] impl NSOrderedSet { @@ -50,6 +50,12 @@ impl NSOrderedSet { pub unsafe fn objectsAtIndexes(&self, indexes: &NSIndexSet) -> Id, Shared> { msg_send_id![self, objectsAtIndexes: indexes] } + pub unsafe fn firstObject(&self) -> Option> { + msg_send_id![self, firstObject] + } + pub unsafe fn lastObject(&self) -> Option> { + msg_send_id![self, lastObject] + } pub unsafe fn isEqualToOrderedSet(&self, other: &NSOrderedSet) -> bool { msg_send![self, isEqualToOrderedSet: other] } @@ -77,6 +83,15 @@ impl NSOrderedSet { pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared> { msg_send_id![self, reverseObjectEnumerator] } + pub unsafe fn reversedOrderedSet(&self) -> Id, Shared> { + msg_send_id![self, reversedOrderedSet] + } + pub unsafe fn array(&self) -> Id, Shared> { + msg_send_id![self, array] + } + pub unsafe fn set(&self) -> Id, Shared> { + msg_send_id![self, set] + } pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { msg_send![self, enumerateObjectsUsingBlock: block] } @@ -181,6 +196,9 @@ impl NSOrderedSet { ) -> Id, Shared> { msg_send_id![self, sortedArrayWithOptions: opts, usingComparator: cmptr] } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { msg_send_id![self, descriptionWithLocale: locale] } @@ -191,24 +209,6 @@ impl NSOrderedSet { ) -> Id { msg_send_id![self, descriptionWithLocale: locale, indent: level] } - pub unsafe fn firstObject(&self) -> Option> { - msg_send_id![self, firstObject] - } - pub unsafe fn lastObject(&self) -> Option> { - msg_send_id![self, lastObject] - } - pub unsafe fn reversedOrderedSet(&self) -> Id, Shared> { - msg_send_id![self, reversedOrderedSet] - } - pub unsafe fn array(&self) -> Id, Shared> { - msg_send_id![self, array] - } - pub unsafe fn set(&self) -> Id, Shared> { - msg_send_id![self, set] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } } #[doc = "NSOrderedSetCreation"] impl NSOrderedSet { diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index 9b9d11665..581457410 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -14,6 +14,12 @@ extern_class!( } ); impl NSOrthography { + pub unsafe fn dominantScript(&self) -> Id { + msg_send_id![self, dominantScript] + } + pub unsafe fn languageMap(&self) -> Id>, Shared> { + msg_send_id![self, languageMap] + } pub unsafe fn initWithDominantScript_languageMap( &self, script: &NSString, @@ -24,12 +30,6 @@ impl NSOrthography { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn dominantScript(&self) -> Id { - msg_send_id![self, dominantScript] - } - pub unsafe fn languageMap(&self) -> Id>, Shared> { - msg_send_id![self, languageMap] - } } #[doc = "NSOrthographyExtended"] impl NSOrthography { @@ -45,9 +45,6 @@ impl NSOrthography { ) -> Option> { msg_send_id![self, dominantLanguageForScript: script] } - pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id { - msg_send_id![Self::class(), defaultOrthographyForLanguage: language] - } pub unsafe fn dominantLanguage(&self) -> Id { msg_send_id![self, dominantLanguage] } @@ -57,6 +54,9 @@ impl NSOrthography { pub unsafe fn allLanguages(&self) -> Id, Shared> { msg_send_id![self, allLanguages] } + pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id { + msg_send_id![Self::class(), defaultOrthographyForLanguage: language] + } } #[doc = "NSOrthographyCreation"] impl NSOrthography { diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index 731daeb29..450915269 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -9,15 +9,45 @@ impl NSString { pub unsafe fn pathWithComponents(components: &NSArray) -> Id { msg_send_id![Self::class(), pathWithComponents: components] } + pub unsafe fn pathComponents(&self) -> Id, Shared> { + msg_send_id![self, pathComponents] + } + pub unsafe fn isAbsolutePath(&self) -> bool { + msg_send![self, isAbsolutePath] + } + pub unsafe fn lastPathComponent(&self) -> Id { + msg_send_id![self, lastPathComponent] + } + pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id { + msg_send_id![self, stringByDeletingLastPathComponent] + } pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id { msg_send_id![self, stringByAppendingPathComponent: str] } + pub unsafe fn pathExtension(&self) -> Id { + msg_send_id![self, pathExtension] + } + pub unsafe fn stringByDeletingPathExtension(&self) -> Id { + msg_send_id![self, stringByDeletingPathExtension] + } pub unsafe fn stringByAppendingPathExtension( &self, str: &NSString, ) -> Option> { msg_send_id![self, stringByAppendingPathExtension: str] } + pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id { + msg_send_id![self, stringByAbbreviatingWithTildeInPath] + } + pub unsafe fn stringByExpandingTildeInPath(&self) -> Id { + msg_send_id![self, stringByExpandingTildeInPath] + } + pub unsafe fn stringByStandardizingPath(&self) -> Id { + msg_send_id![self, stringByStandardizingPath] + } + pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id { + msg_send_id![self, stringByResolvingSymlinksInPath] + } pub unsafe fn stringsByAppendingPaths( &self, paths: &NSArray, @@ -39,6 +69,9 @@ impl NSString { filterTypes: filterTypes ] } + pub unsafe fn fileSystemRepresentation(&self) -> NonNull { + msg_send![self, fileSystemRepresentation] + } pub unsafe fn getFileSystemRepresentation_maxLength( &self, cname: NonNull, @@ -46,39 +79,6 @@ impl NSString { ) -> bool { msg_send![self, getFileSystemRepresentation: cname, maxLength: max] } - pub unsafe fn pathComponents(&self) -> Id, Shared> { - msg_send_id![self, pathComponents] - } - pub unsafe fn isAbsolutePath(&self) -> bool { - msg_send![self, isAbsolutePath] - } - pub unsafe fn lastPathComponent(&self) -> Id { - msg_send_id![self, lastPathComponent] - } - pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id { - msg_send_id![self, stringByDeletingLastPathComponent] - } - pub unsafe fn pathExtension(&self) -> Id { - msg_send_id![self, pathExtension] - } - pub unsafe fn stringByDeletingPathExtension(&self) -> Id { - msg_send_id![self, stringByDeletingPathExtension] - } - pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id { - msg_send_id![self, stringByAbbreviatingWithTildeInPath] - } - pub unsafe fn stringByExpandingTildeInPath(&self) -> Id { - msg_send_id![self, stringByExpandingTildeInPath] - } - pub unsafe fn stringByStandardizingPath(&self) -> Id { - msg_send_id![self, stringByStandardizingPath] - } - pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id { - msg_send_id![self, stringByResolvingSymlinksInPath] - } - pub unsafe fn fileSystemRepresentation(&self) -> NonNull { - msg_send![self, fileSystemRepresentation] - } } #[doc = "NSArrayPathExtensions"] impl NSArray { diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index d6a6e15f5..3b4554824 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -12,6 +12,24 @@ extern_class!( } ); impl NSPersonNameComponentsFormatter { + pub unsafe fn style(&self) -> NSPersonNameComponentsFormatterStyle { + msg_send![self, style] + } + pub unsafe fn setStyle(&self, style: NSPersonNameComponentsFormatterStyle) { + msg_send![self, setStyle: style] + } + pub unsafe fn isPhonetic(&self) -> bool { + msg_send![self, isPhonetic] + } + pub unsafe fn setPhonetic(&self, phonetic: bool) { + msg_send![self, setPhonetic: phonetic] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } pub unsafe fn localizedStringFromPersonNameComponents_style_options( components: &NSPersonNameComponents, nameFormatStyle: NSPersonNameComponentsFormatterStyle, @@ -55,22 +73,4 @@ impl NSPersonNameComponentsFormatter { errorDescription: error ] } - pub unsafe fn style(&self) -> NSPersonNameComponentsFormatterStyle { - msg_send![self, style] - } - pub unsafe fn setStyle(&self, style: NSPersonNameComponentsFormatterStyle) { - msg_send![self, setStyle: style] - } - pub unsafe fn isPhonetic(&self) -> bool { - msg_send![self, isPhonetic] - } - pub unsafe fn setPhonetic(&self, phonetic: bool) { - msg_send![self, setPhonetic: phonetic] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } } diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index 239283ccf..9f8979bc4 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -32,6 +32,9 @@ impl NSPointerArray { ) -> Id { msg_send_id![Self::class(), pointerArrayWithPointerFunctions: functions] } + pub unsafe fn pointerFunctions(&self) -> Id { + msg_send_id![self, pointerFunctions] + } pub unsafe fn pointerAtIndex(&self, index: NSUInteger) -> *mut c_void { msg_send![self, pointerAtIndex: index] } @@ -50,9 +53,6 @@ impl NSPointerArray { pub unsafe fn compact(&self) { msg_send![self, compact] } - pub unsafe fn pointerFunctions(&self) -> Id { - msg_send_id![self, pointerFunctions] - } pub unsafe fn count(&self) -> NSUInteger { msg_send![self, count] } diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 1518459ab..0896ca8b4 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -25,6 +25,9 @@ impl NSPort { pub unsafe fn invalidate(&self) { msg_send![self, invalidate] } + pub unsafe fn isValid(&self) -> bool { + msg_send![self, isValid] + } pub unsafe fn setDelegate(&self, anObject: Option<&NSPortDelegate>) { msg_send![self, setDelegate: anObject] } @@ -37,6 +40,9 @@ impl NSPort { pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: runLoop, forMode: mode] } + pub unsafe fn reservedSpaceLength(&self) -> NSUInteger { + msg_send![self, reservedSpaceLength] + } pub unsafe fn sendBeforeDate_components_from_reserved( &self, limitDate: &NSDate, @@ -90,12 +96,6 @@ impl NSPort { forMode: mode ] } - pub unsafe fn isValid(&self) -> bool { - msg_send![self, isValid] - } - pub unsafe fn reservedSpaceLength(&self) -> NSUInteger { - msg_send![self, reservedSpaceLength] - } } pub type NSPortDelegate = NSObject; extern_class!( @@ -131,15 +131,15 @@ impl NSMachPort { ) -> Id { msg_send_id![self, initWithMachPort: machPort, options: f] } + pub unsafe fn machPort(&self) -> u32 { + msg_send![self, machPort] + } pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] } pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: runLoop, forMode: mode] } - pub unsafe fn machPort(&self) -> u32 { - msg_send![self, machPort] - } } pub type NSMachPortDelegate = NSObject; extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index 444b12d5a..557eea20f 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -60,13 +60,13 @@ impl NSPortCoder { } #[doc = "NSDistributedObjects"] impl NSObject { + pub unsafe fn classForPortCoder(&self) -> &Class { + msg_send![self, classForPortCoder] + } pub unsafe fn replacementObjectForPortCoder( &self, coder: &NSPortCoder, ) -> Option> { msg_send_id![self, replacementObjectForPortCoder: coder] } - pub unsafe fn classForPortCoder(&self) -> &Class { - msg_send![self, classForPortCoder] - } } diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index 8b679eb6f..3e92e4968 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -28,9 +28,6 @@ impl NSPortMessage { components: components ] } - pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool { - msg_send![self, sendBeforeDate: date] - } pub unsafe fn components(&self) -> Option> { msg_send_id![self, components] } @@ -40,6 +37,9 @@ impl NSPortMessage { pub unsafe fn sendPort(&self) -> Option> { msg_send_id![self, sendPort] } + pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool { + msg_send![self, sendBeforeDate: date] + } pub unsafe fn msgid(&self) -> u32 { msg_send![self, msgid] } diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 3eb923727..ccc929e32 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -47,6 +47,9 @@ impl NSPredicate { pub unsafe fn predicateWithBlock(block: TodoBlock) -> Id { msg_send_id![Self::class(), predicateWithBlock: block] } + pub unsafe fn predicateFormat(&self) -> Id { + msg_send_id![self, predicateFormat] + } pub unsafe fn predicateWithSubstitutionVariables( &self, variables: &NSDictionary, @@ -70,9 +73,6 @@ impl NSPredicate { pub unsafe fn allowEvaluation(&self) { msg_send![self, allowEvaluation] } - pub unsafe fn predicateFormat(&self) -> Id { - msg_send_id![self, predicateFormat] - } } #[doc = "NSPredicateSupport"] impl NSArray { diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 654e8c715..fe84258ae 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -16,30 +16,6 @@ extern_class!( } ); impl NSProcessInfo { - pub unsafe fn operatingSystem(&self) -> NSUInteger { - msg_send![self, operatingSystem] - } - pub unsafe fn operatingSystemName(&self) -> Id { - msg_send_id![self, operatingSystemName] - } - pub unsafe fn isOperatingSystemAtLeastVersion( - &self, - version: NSOperatingSystemVersion, - ) -> bool { - msg_send![self, isOperatingSystemAtLeastVersion: version] - } - pub unsafe fn disableSuddenTermination(&self) { - msg_send![self, disableSuddenTermination] - } - pub unsafe fn enableSuddenTermination(&self) { - msg_send![self, enableSuddenTermination] - } - pub unsafe fn disableAutomaticTermination(&self, reason: &NSString) { - msg_send![self, disableAutomaticTermination: reason] - } - pub unsafe fn enableAutomaticTermination(&self, reason: &NSString) { - msg_send![self, enableAutomaticTermination: reason] - } pub unsafe fn processInfo() -> Id { msg_send_id![Self::class(), processInfo] } @@ -64,6 +40,12 @@ impl NSProcessInfo { pub unsafe fn globallyUniqueString(&self) -> Id { msg_send_id![self, globallyUniqueString] } + pub unsafe fn operatingSystem(&self) -> NSUInteger { + msg_send![self, operatingSystem] + } + pub unsafe fn operatingSystemName(&self) -> Id { + msg_send_id![self, operatingSystemName] + } pub unsafe fn operatingSystemVersionString(&self) -> Id { msg_send_id![self, operatingSystemVersionString] } @@ -79,9 +61,27 @@ impl NSProcessInfo { pub unsafe fn physicalMemory(&self) -> c_ulonglong { msg_send![self, physicalMemory] } + pub unsafe fn isOperatingSystemAtLeastVersion( + &self, + version: NSOperatingSystemVersion, + ) -> bool { + msg_send![self, isOperatingSystemAtLeastVersion: version] + } pub unsafe fn systemUptime(&self) -> NSTimeInterval { msg_send![self, systemUptime] } + pub unsafe fn disableSuddenTermination(&self) { + msg_send![self, disableSuddenTermination] + } + pub unsafe fn enableSuddenTermination(&self) { + msg_send![self, enableSuddenTermination] + } + pub unsafe fn disableAutomaticTermination(&self, reason: &NSString) { + msg_send![self, disableAutomaticTermination: reason] + } + pub unsafe fn enableAutomaticTermination(&self, reason: &NSString) { + msg_send![self, enableAutomaticTermination: reason] + } pub unsafe fn automaticTerminationSupportEnabled(&self) -> bool { msg_send![self, automaticTerminationSupportEnabled] } diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 75b2f4b41..746408573 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -74,41 +74,6 @@ impl NSProgress { pub unsafe fn addChild_withPendingUnitCount(&self, child: &NSProgress, inUnitCount: int64_t) { msg_send![self, addChild: child, withPendingUnitCount: inUnitCount] } - pub unsafe fn setUserInfoObject_forKey( - &self, - objectOrNil: Option<&Object>, - key: &NSProgressUserInfoKey, - ) { - msg_send![self, setUserInfoObject: objectOrNil, forKey: key] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn pause(&self) { - msg_send![self, pause] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn publish(&self) { - msg_send![self, publish] - } - pub unsafe fn unpublish(&self) { - msg_send![self, unpublish] - } - pub unsafe fn addSubscriberForFileURL_withPublishingHandler( - url: &NSURL, - publishingHandler: NSProgressPublishingHandler, - ) -> Id { - msg_send_id![ - Self::class(), - addSubscriberForFileURL: url, - withPublishingHandler: publishingHandler - ] - } - pub unsafe fn removeSubscriber(subscriber: &Object) { - msg_send![Self::class(), removeSubscriber: subscriber] - } pub unsafe fn totalUnitCount(&self) -> int64_t { msg_send![self, totalUnitCount] } @@ -175,6 +140,13 @@ impl NSProgress { pub unsafe fn setResumingHandler(&self, resumingHandler: TodoBlock) { msg_send![self, setResumingHandler: resumingHandler] } + pub unsafe fn setUserInfoObject_forKey( + &self, + objectOrNil: Option<&Object>, + key: &NSProgressUserInfoKey, + ) { + msg_send![self, setUserInfoObject: objectOrNil, forKey: key] + } pub unsafe fn isIndeterminate(&self) -> bool { msg_send![self, isIndeterminate] } @@ -184,6 +156,15 @@ impl NSProgress { pub unsafe fn isFinished(&self) -> bool { msg_send![self, isFinished] } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn pause(&self) { + msg_send![self, pause] + } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } pub unsafe fn userInfo(&self) -> Id, Shared> { msg_send_id![self, userInfo] } @@ -232,6 +213,25 @@ impl NSProgress { pub unsafe fn setFileCompletedCount(&self, fileCompletedCount: Option<&NSNumber>) { msg_send![self, setFileCompletedCount: fileCompletedCount] } + pub unsafe fn publish(&self) { + msg_send![self, publish] + } + pub unsafe fn unpublish(&self) { + msg_send![self, unpublish] + } + pub unsafe fn addSubscriberForFileURL_withPublishingHandler( + url: &NSURL, + publishingHandler: NSProgressPublishingHandler, + ) -> Id { + msg_send_id![ + Self::class(), + addSubscriberForFileURL: url, + withPublishingHandler: publishingHandler + ] + } + pub unsafe fn removeSubscriber(subscriber: &Object) { + msg_send![Self::class(), removeSubscriber: subscriber] + } pub unsafe fn isOld(&self) -> bool { msg_send![self, isOld] } diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 50b7efd61..89d5afbc2 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -37,6 +37,12 @@ impl NSProxy { pub unsafe fn finalize(&self) { msg_send![self, finalize] } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn debugDescription(&self) -> Id { + msg_send_id![self, debugDescription] + } pub unsafe fn respondsToSelector(aSelector: Sel) -> bool { msg_send![Self::class(), respondsToSelector: aSelector] } @@ -46,10 +52,4 @@ impl NSProxy { pub unsafe fn retainWeakReference(&self) -> bool { msg_send![self, retainWeakReference] } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn debugDescription(&self) -> Id { - msg_send_id![self, debugDescription] - } } diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 5acbb95e3..8d06baa8b 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -39,9 +39,6 @@ impl NSRegularExpression { error: error ] } - pub unsafe fn escapedPatternForString(string: &NSString) -> Id { - msg_send_id![Self::class(), escapedPatternForString: string] - } pub unsafe fn pattern(&self) -> Id { msg_send_id![self, pattern] } @@ -51,6 +48,9 @@ impl NSRegularExpression { pub unsafe fn numberOfCaptureGroups(&self) -> NSUInteger { msg_send![self, numberOfCaptureGroups] } + pub unsafe fn escapedPatternForString(string: &NSString) -> Id { + msg_send_id![Self::class(), escapedPatternForString: string] + } } #[doc = "NSMatching"] impl NSRegularExpression { diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index d454c3509..9e9400721 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -15,35 +15,6 @@ extern_class!( } ); impl NSRelativeDateTimeFormatter { - pub unsafe fn localizedStringFromDateComponents( - &self, - dateComponents: &NSDateComponents, - ) -> Id { - msg_send_id![self, localizedStringFromDateComponents: dateComponents] - } - pub unsafe fn localizedStringFromTimeInterval( - &self, - timeInterval: NSTimeInterval, - ) -> Id { - msg_send_id![self, localizedStringFromTimeInterval: timeInterval] - } - pub unsafe fn localizedStringForDate_relativeToDate( - &self, - date: &NSDate, - referenceDate: &NSDate, - ) -> Id { - msg_send_id![ - self, - localizedStringForDate: date, - relativeToDate: referenceDate - ] - } - pub unsafe fn stringForObjectValue( - &self, - obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] - } pub unsafe fn dateTimeStyle(&self) -> NSRelativeDateTimeFormatterStyle { msg_send![self, dateTimeStyle] } @@ -74,4 +45,33 @@ impl NSRelativeDateTimeFormatter { pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { msg_send![self, setLocale: locale] } + pub unsafe fn localizedStringFromDateComponents( + &self, + dateComponents: &NSDateComponents, + ) -> Id { + msg_send_id![self, localizedStringFromDateComponents: dateComponents] + } + pub unsafe fn localizedStringFromTimeInterval( + &self, + timeInterval: NSTimeInterval, + ) -> Id { + msg_send_id![self, localizedStringFromTimeInterval: timeInterval] + } + pub unsafe fn localizedStringForDate_relativeToDate( + &self, + date: &NSDate, + referenceDate: &NSDate, + ) -> Id { + msg_send_id![ + self, + localizedStringForDate: date, + relativeToDate: referenceDate + ] + } + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } } diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 59f7ef277..dce7d194a 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -17,6 +17,15 @@ extern_class!( } ); impl NSRunLoop { + pub unsafe fn currentRunLoop() -> Id { + msg_send_id![Self::class(), currentRunLoop] + } + pub unsafe fn mainRunLoop() -> Id { + msg_send_id![Self::class(), mainRunLoop] + } + pub unsafe fn currentMode(&self) -> Option> { + msg_send_id![self, currentMode] + } pub unsafe fn getCFRunLoop(&self) -> CFRunLoopRef { msg_send![self, getCFRunLoop] } @@ -35,15 +44,6 @@ impl NSRunLoop { pub unsafe fn acceptInputForMode_beforeDate(&self, mode: &NSRunLoopMode, limitDate: &NSDate) { msg_send![self, acceptInputForMode: mode, beforeDate: limitDate] } - pub unsafe fn currentRunLoop() -> Id { - msg_send_id![Self::class(), currentRunLoop] - } - pub unsafe fn mainRunLoop() -> Id { - msg_send_id![Self::class(), mainRunLoop] - } - pub unsafe fn currentMode(&self) -> Option> { - msg_send_id![self, currentMode] - } } #[doc = "NSRunLoopConveniences"] impl NSRunLoop { diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 5a38e7ca9..007eb193c 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -14,9 +14,6 @@ extern_class!( } ); impl NSScanner { - pub unsafe fn initWithString(&self, string: &NSString) -> Id { - msg_send_id![self, initWithString: string] - } pub unsafe fn string(&self) -> Id { msg_send_id![self, string] } @@ -44,6 +41,9 @@ impl NSScanner { pub unsafe fn setLocale(&self, locale: Option<&Object>) { msg_send![self, setLocale: locale] } + pub unsafe fn initWithString(&self, string: &NSString) -> Id { + msg_send_id![self, initWithString: string] + } } #[doc = "NSExtendedScanner"] impl NSScanner { @@ -105,13 +105,13 @@ impl NSScanner { ) -> bool { msg_send![self, scanUpToCharactersFromSet: set, intoString: result] } + pub unsafe fn isAtEnd(&self) -> bool { + msg_send![self, isAtEnd] + } pub unsafe fn scannerWithString(string: &NSString) -> Id { msg_send_id![Self::class(), scannerWithString: string] } pub unsafe fn localizedScannerWithString(string: &NSString) -> Id { msg_send_id![Self::class(), localizedScannerWithString: string] } - pub unsafe fn isAtEnd(&self) -> bool { - msg_send![self, isAtEnd] - } } diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index bedd7dff1..47407a3cf 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -30,6 +30,21 @@ impl NSScriptClassDescription { dictionary: classDeclaration ] } + pub unsafe fn suiteName(&self) -> Option> { + msg_send_id![self, suiteName] + } + pub unsafe fn className(&self) -> Option> { + msg_send_id![self, className] + } + pub unsafe fn implementationClassName(&self) -> Option> { + msg_send_id![self, implementationClassName] + } + pub unsafe fn superclassDescription(&self) -> Option> { + msg_send_id![self, superclassDescription] + } + pub unsafe fn appleEventCode(&self) -> FourCharCode { + msg_send![self, appleEventCode] + } pub unsafe fn matchesAppleEventCode(&self, appleEventCode: FourCharCode) -> bool { msg_send![self, matchesAppleEventCode: appleEventCode] } @@ -60,6 +75,9 @@ impl NSScriptClassDescription { ) -> Option> { msg_send_id![self, keyWithAppleEventCode: appleEventCode] } + pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option> { + msg_send_id![self, defaultSubcontainerAttributeKey] + } pub unsafe fn isLocationRequiredToCreateForKey( &self, toManyRelationshipKey: &NSString, @@ -81,24 +99,6 @@ impl NSScriptClassDescription { pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool { msg_send![self, hasWritablePropertyForKey: key] } - pub unsafe fn suiteName(&self) -> Option> { - msg_send_id![self, suiteName] - } - pub unsafe fn className(&self) -> Option> { - msg_send_id![self, className] - } - pub unsafe fn implementationClassName(&self) -> Option> { - msg_send_id![self, implementationClassName] - } - pub unsafe fn superclassDescription(&self) -> Option> { - msg_send_id![self, superclassDescription] - } - pub unsafe fn appleEventCode(&self) -> FourCharCode { - msg_send![self, appleEventCode] - } - pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option> { - msg_send_id![self, defaultSubcontainerAttributeKey] - } } #[doc = "NSDeprecated"] impl NSScriptClassDescription { diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 6236ace7e..41dcf5138 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -26,21 +26,6 @@ impl NSScriptCommand { pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: inCoder] } - pub unsafe fn performDefaultImplementation(&self) -> Option> { - msg_send_id![self, performDefaultImplementation] - } - pub unsafe fn executeCommand(&self) -> Option> { - msg_send_id![self, executeCommand] - } - pub unsafe fn currentCommand() -> Option> { - msg_send_id![Self::class(), currentCommand] - } - pub unsafe fn suspendExecution(&self) { - msg_send![self, suspendExecution] - } - pub unsafe fn resumeExecutionWithResult(&self, result: Option<&Object>) { - msg_send![self, resumeExecutionWithResult: result] - } pub unsafe fn commandDescription(&self) -> Id { msg_send_id![self, commandDescription] } @@ -74,6 +59,12 @@ impl NSScriptCommand { pub unsafe fn isWellFormed(&self) -> bool { msg_send![self, isWellFormed] } + pub unsafe fn performDefaultImplementation(&self) -> Option> { + msg_send_id![self, performDefaultImplementation] + } + pub unsafe fn executeCommand(&self) -> Option> { + msg_send_id![self, executeCommand] + } pub unsafe fn scriptErrorNumber(&self) -> NSInteger { msg_send![self, scriptErrorNumber] } @@ -114,7 +105,16 @@ impl NSScriptCommand { pub unsafe fn setScriptErrorString(&self, scriptErrorString: Option<&NSString>) { msg_send![self, setScriptErrorString: scriptErrorString] } + pub unsafe fn currentCommand() -> Option> { + msg_send_id![Self::class(), currentCommand] + } pub unsafe fn appleEvent(&self) -> Option> { msg_send_id![self, appleEvent] } + pub unsafe fn suspendExecution(&self) { + msg_send![self, suspendExecution] + } + pub unsafe fn resumeExecutionWithResult(&self, result: Option<&Object>) { + msg_send![self, resumeExecutionWithResult: result] + } } diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index 21905fb7c..53b2a89fe 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -34,30 +34,6 @@ impl NSScriptCommandDescription { pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: inCoder] } - pub unsafe fn typeForArgumentWithName( - &self, - argumentName: &NSString, - ) -> Option> { - msg_send_id![self, typeForArgumentWithName: argumentName] - } - pub unsafe fn appleEventCodeForArgumentWithName( - &self, - argumentName: &NSString, - ) -> FourCharCode { - msg_send![self, appleEventCodeForArgumentWithName: argumentName] - } - pub unsafe fn isOptionalArgumentWithName(&self, argumentName: &NSString) -> bool { - msg_send![self, isOptionalArgumentWithName: argumentName] - } - pub unsafe fn createCommandInstance(&self) -> Id { - msg_send_id![self, createCommandInstance] - } - pub unsafe fn createCommandInstanceWithZone( - &self, - zone: *mut NSZone, - ) -> Id { - msg_send_id![self, createCommandInstanceWithZone: zone] - } pub unsafe fn suiteName(&self) -> Id { msg_send_id![self, suiteName] } @@ -82,4 +58,28 @@ impl NSScriptCommandDescription { pub unsafe fn argumentNames(&self) -> Id, Shared> { msg_send_id![self, argumentNames] } + pub unsafe fn typeForArgumentWithName( + &self, + argumentName: &NSString, + ) -> Option> { + msg_send_id![self, typeForArgumentWithName: argumentName] + } + pub unsafe fn appleEventCodeForArgumentWithName( + &self, + argumentName: &NSString, + ) -> FourCharCode { + msg_send![self, appleEventCodeForArgumentWithName: argumentName] + } + pub unsafe fn isOptionalArgumentWithName(&self, argumentName: &NSString) -> bool { + msg_send![self, isOptionalArgumentWithName: argumentName] + } + pub unsafe fn createCommandInstance(&self) -> Id { + msg_send_id![self, createCommandInstance] + } + pub unsafe fn createCommandInstanceWithZone( + &self, + zone: *mut NSZone, + ) -> Id { + msg_send_id![self, createCommandInstanceWithZone: zone] + } } diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index d39692480..19f259071 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -45,23 +45,6 @@ impl NSScriptObjectSpecifier { pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: inCoder] } - pub unsafe fn indicesOfObjectsByEvaluatingWithContainer_count( - &self, - container: &Object, - count: NonNull, - ) -> *mut NSInteger { - msg_send![ - self, - indicesOfObjectsByEvaluatingWithContainer: container, - count: count - ] - } - pub unsafe fn objectsByEvaluatingWithContainers( - &self, - containers: &Object, - ) -> Option> { - msg_send_id![self, objectsByEvaluatingWithContainers: containers] - } pub unsafe fn childSpecifier(&self) -> Option> { msg_send_id![self, childSpecifier] } @@ -116,6 +99,23 @@ impl NSScriptObjectSpecifier { pub unsafe fn keyClassDescription(&self) -> Option> { msg_send_id![self, keyClassDescription] } + pub unsafe fn indicesOfObjectsByEvaluatingWithContainer_count( + &self, + container: &Object, + count: NonNull, + ) -> *mut NSInteger { + msg_send![ + self, + indicesOfObjectsByEvaluatingWithContainer: container, + count: count + ] + } + pub unsafe fn objectsByEvaluatingWithContainers( + &self, + containers: &Object, + ) -> Option> { + msg_send_id![self, objectsByEvaluatingWithContainers: containers] + } pub unsafe fn objectsByEvaluatingSpecifier(&self) -> Option> { msg_send_id![self, objectsByEvaluatingSpecifier] } @@ -134,15 +134,15 @@ impl NSScriptObjectSpecifier { } #[doc = "NSScriptObjectSpecifiers"] impl NSObject { + pub unsafe fn objectSpecifier(&self) -> Option> { + msg_send_id![self, objectSpecifier] + } pub unsafe fn indicesOfObjectsByEvaluatingObjectSpecifier( &self, specifier: &NSScriptObjectSpecifier, ) -> Option, Shared>> { msg_send_id![self, indicesOfObjectsByEvaluatingObjectSpecifier: specifier] } - pub unsafe fn objectSpecifier(&self) -> Option> { - msg_send_id![self, objectSpecifier] - } } extern_class!( #[derive(Debug)] @@ -230,18 +230,18 @@ impl NSPositionalSpecifier { ) -> Id { msg_send_id![self, initWithPosition: position, objectSpecifier: specifier] } - pub unsafe fn setInsertionClassDescription(&self, classDescription: &NSScriptClassDescription) { - msg_send![self, setInsertionClassDescription: classDescription] - } - pub unsafe fn evaluate(&self) { - msg_send![self, evaluate] - } pub unsafe fn position(&self) -> NSInsertionPosition { msg_send![self, position] } pub unsafe fn objectSpecifier(&self) -> Id { msg_send_id![self, objectSpecifier] } + pub unsafe fn setInsertionClassDescription(&self, classDescription: &NSScriptClassDescription) { + msg_send![self, setInsertionClassDescription: classDescription] + } + pub unsafe fn evaluate(&self) { + msg_send![self, evaluate] + } pub unsafe fn insertionContainer(&self) -> Option> { msg_send_id![self, insertionContainer] } diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 3e79e85fa..71d6bd463 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -49,6 +49,9 @@ impl NSScriptSuiteRegistry { ) { msg_send![self, registerCommandDescription: commandDescription] } + pub unsafe fn suiteNames(&self) -> Id, Shared> { + msg_send_id![self, suiteNames] + } pub unsafe fn appleEventCodeForSuite(&self, suiteName: &NSString) -> FourCharCode { msg_send![self, appleEventCodeForSuite: suiteName] } @@ -93,7 +96,4 @@ impl NSScriptSuiteRegistry { pub unsafe fn aeteResource(&self, languageName: &NSString) -> Option> { msg_send_id![self, aeteResource: languageName] } - pub unsafe fn suiteNames(&self) -> Id, Shared> { - msg_send_id![self, suiteNames] - } } diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index fd5d36e24..a686275df 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -15,6 +15,9 @@ __inner_extern_class!( } ); impl NSSet { + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } pub unsafe fn member(&self, object: &ObjectType) -> Option> { msg_send_id![self, member: object] } @@ -34,18 +37,21 @@ impl NSSet { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } } #[doc = "NSExtendedSet"] impl NSSet { + pub unsafe fn allObjects(&self) -> Id, Shared> { + msg_send_id![self, allObjects] + } pub unsafe fn anyObject(&self) -> Option> { msg_send_id![self, anyObject] } pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool { msg_send![self, containsObject: anObject] } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { msg_send_id![self, descriptionWithLocale: locale] } @@ -107,12 +113,6 @@ impl NSSet { ) -> Id, Shared> { msg_send_id![self, objectsWithOptions: opts, passingTest: predicate] } - pub unsafe fn allObjects(&self) -> Id, Shared> { - msg_send_id![self, allObjects] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } } #[doc = "NSSetCreation"] impl NSSet { diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index 613f327a7..14efbf44a 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -58,6 +58,15 @@ impl NSSortDescriptor { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } + pub unsafe fn key(&self) -> Option> { + msg_send_id![self, key] + } + pub unsafe fn ascending(&self) -> bool { + msg_send![self, ascending] + } + pub unsafe fn selector(&self) -> Option { + msg_send![self, selector] + } pub unsafe fn allowEvaluation(&self) { msg_send![self, allowEvaluation] } @@ -86,6 +95,9 @@ impl NSSortDescriptor { comparator: cmptr ] } + pub unsafe fn comparator(&self) -> NSComparator { + msg_send![self, comparator] + } pub unsafe fn compareObject_toObject( &self, object1: &Object, @@ -93,18 +105,6 @@ impl NSSortDescriptor { ) -> NSComparisonResult { msg_send![self, compareObject: object1, toObject: object2] } - pub unsafe fn key(&self) -> Option> { - msg_send_id![self, key] - } - pub unsafe fn ascending(&self) -> bool { - msg_send![self, ascending] - } - pub unsafe fn selector(&self) -> Option { - msg_send![self, selector] - } - pub unsafe fn comparator(&self) -> NSComparator { - msg_send![self, comparator] - } pub unsafe fn reversedSortDescriptor(&self) -> Id { msg_send_id![self, reversedSortDescriptor] } diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index a62dcc421..a5b5c8bb3 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -16,6 +16,12 @@ extern_class!( } ); impl NSSpellServer { + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSSpellServerDelegate>) { + msg_send![self, setDelegate: delegate] + } pub unsafe fn registerLanguage_byVendor( &self, language: Option<&NSString>, @@ -33,11 +39,5 @@ impl NSSpellServer { pub unsafe fn run(&self) { msg_send![self, run] } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSSpellServerDelegate>) { - msg_send![self, setDelegate: delegate] - } } pub type NSSpellServerDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 5c3f3a3c0..1a55c0038 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -26,6 +26,12 @@ impl NSStream { pub unsafe fn close(&self) { msg_send![self, close] } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>) { + msg_send![self, setDelegate: delegate] + } pub unsafe fn propertyForKey(&self, key: &NSStreamPropertyKey) -> Option> { msg_send_id![self, propertyForKey: key] } @@ -42,12 +48,6 @@ impl NSStream { pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>) { - msg_send![self, setDelegate: delegate] - } pub unsafe fn streamStatus(&self) -> NSStreamStatus { msg_send![self, streamStatus] } @@ -73,15 +73,15 @@ impl NSInputStream { ) -> bool { msg_send![self, getBuffer: buffer, length: len] } + pub unsafe fn hasBytesAvailable(&self) -> bool { + msg_send![self, hasBytesAvailable] + } pub unsafe fn initWithData(&self, data: &NSData) -> Id { msg_send_id![self, initWithData: data] } pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { msg_send_id![self, initWithURL: url] } - pub unsafe fn hasBytesAvailable(&self) -> bool { - msg_send![self, hasBytesAvailable] - } } extern_class!( #[derive(Debug)] @@ -94,6 +94,9 @@ impl NSOutputStream { pub unsafe fn write_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { msg_send![self, write: buffer, maxLength: len] } + pub unsafe fn hasSpaceAvailable(&self) -> bool { + msg_send![self, hasSpaceAvailable] + } pub unsafe fn initToMemory(&self) -> Id { msg_send_id![self, initToMemory] } @@ -111,9 +114,6 @@ impl NSOutputStream { ) -> Option> { msg_send_id![self, initWithURL: url, append: shouldAppend] } - pub unsafe fn hasSpaceAvailable(&self) -> bool { - msg_send![self, hasSpaceAvailable] - } } #[doc = "NSSocketStreamCreationExtensions"] impl NSStream { diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 2a1e22991..446e8ef10 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -21,6 +21,9 @@ extern_class!( } ); impl NSString { + pub fn length(&self) -> NSUInteger { + msg_send![self, length] + } pub unsafe fn characterAtIndex(&self, index: NSUInteger) -> unichar { msg_send![self, characterAtIndex: index] } @@ -30,9 +33,6 @@ impl NSString { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub fn length(&self) -> NSUInteger { - msg_send![self, length] - } } pub type NSStringTransform = NSString; #[doc = "NSStringExtensionMethods"] @@ -197,6 +197,42 @@ impl NSString { pub fn stringByAppendingString(&self, aString: &NSString) -> Id { msg_send_id![self, stringByAppendingString: aString] } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } + pub unsafe fn floatValue(&self) -> c_float { + msg_send![self, floatValue] + } + pub unsafe fn intValue(&self) -> c_int { + msg_send![self, intValue] + } + pub unsafe fn integerValue(&self) -> NSInteger { + msg_send![self, integerValue] + } + pub unsafe fn longLongValue(&self) -> c_longlong { + msg_send![self, longLongValue] + } + pub unsafe fn boolValue(&self) -> bool { + msg_send![self, boolValue] + } + pub unsafe fn uppercaseString(&self) -> Id { + msg_send_id![self, uppercaseString] + } + pub unsafe fn lowercaseString(&self) -> Id { + msg_send_id![self, lowercaseString] + } + pub unsafe fn capitalizedString(&self) -> Id { + msg_send_id![self, capitalizedString] + } + pub unsafe fn localizedUppercaseString(&self) -> Id { + msg_send_id![self, localizedUppercaseString] + } + pub unsafe fn localizedLowercaseString(&self) -> Id { + msg_send_id![self, localizedLowercaseString] + } + pub unsafe fn localizedCapitalizedString(&self) -> Id { + msg_send_id![self, localizedCapitalizedString] + } pub unsafe fn uppercaseStringWithLocale( &self, locale: Option<&NSLocale>, @@ -267,6 +303,15 @@ impl NSString { pub unsafe fn enumerateLinesUsingBlock(&self, block: TodoBlock) { msg_send![self, enumerateLinesUsingBlock: block] } + pub fn UTF8String(&self) -> *mut c_char { + msg_send![self, UTF8String] + } + pub unsafe fn fastestEncoding(&self) -> NSStringEncoding { + msg_send![self, fastestEncoding] + } + pub unsafe fn smallestEncoding(&self) -> NSStringEncoding { + msg_send![self, smallestEncoding] + } pub unsafe fn dataUsingEncoding_allowLossyConversion( &self, encoding: NSStringEncoding, @@ -330,11 +375,29 @@ impl NSString { pub fn lengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger { msg_send![self, lengthOfBytesUsingEncoding: enc] } + pub unsafe fn availableStringEncodings() -> NonNull { + msg_send![Self::class(), availableStringEncodings] + } pub unsafe fn localizedNameOfStringEncoding( encoding: NSStringEncoding, ) -> Id { msg_send_id![Self::class(), localizedNameOfStringEncoding: encoding] } + pub unsafe fn defaultCStringEncoding() -> NSStringEncoding { + msg_send![Self::class(), defaultCStringEncoding] + } + pub unsafe fn decomposedStringWithCanonicalMapping(&self) -> Id { + msg_send_id![self, decomposedStringWithCanonicalMapping] + } + pub unsafe fn precomposedStringWithCanonicalMapping(&self) -> Id { + msg_send_id![self, precomposedStringWithCanonicalMapping] + } + pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id { + msg_send_id![self, decomposedStringWithCompatibilityMapping] + } + pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id { + msg_send_id![self, precomposedStringWithCompatibilityMapping] + } pub unsafe fn componentsSeparatedByString( &self, separator: &NSString, @@ -447,6 +510,12 @@ impl NSString { error: error ] } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn hash(&self) -> NSUInteger { + msg_send![self, hash] + } pub unsafe fn initWithCharactersNoCopy_length_freeWhenDone( &self, characters: NonNull, @@ -692,75 +761,6 @@ impl NSString { error: error ] } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } - pub unsafe fn floatValue(&self) -> c_float { - msg_send![self, floatValue] - } - pub unsafe fn intValue(&self) -> c_int { - msg_send![self, intValue] - } - pub unsafe fn integerValue(&self) -> NSInteger { - msg_send![self, integerValue] - } - pub unsafe fn longLongValue(&self) -> c_longlong { - msg_send![self, longLongValue] - } - pub unsafe fn boolValue(&self) -> bool { - msg_send![self, boolValue] - } - pub unsafe fn uppercaseString(&self) -> Id { - msg_send_id![self, uppercaseString] - } - pub unsafe fn lowercaseString(&self) -> Id { - msg_send_id![self, lowercaseString] - } - pub unsafe fn capitalizedString(&self) -> Id { - msg_send_id![self, capitalizedString] - } - pub unsafe fn localizedUppercaseString(&self) -> Id { - msg_send_id![self, localizedUppercaseString] - } - pub unsafe fn localizedLowercaseString(&self) -> Id { - msg_send_id![self, localizedLowercaseString] - } - pub unsafe fn localizedCapitalizedString(&self) -> Id { - msg_send_id![self, localizedCapitalizedString] - } - pub fn UTF8String(&self) -> *mut c_char { - msg_send![self, UTF8String] - } - pub unsafe fn fastestEncoding(&self) -> NSStringEncoding { - msg_send![self, fastestEncoding] - } - pub unsafe fn smallestEncoding(&self) -> NSStringEncoding { - msg_send![self, smallestEncoding] - } - pub unsafe fn availableStringEncodings() -> NonNull { - msg_send![Self::class(), availableStringEncodings] - } - pub unsafe fn defaultCStringEncoding() -> NSStringEncoding { - msg_send![Self::class(), defaultCStringEncoding] - } - pub unsafe fn decomposedStringWithCanonicalMapping(&self) -> Id { - msg_send_id![self, decomposedStringWithCanonicalMapping] - } - pub unsafe fn precomposedStringWithCanonicalMapping(&self) -> Id { - msg_send_id![self, precomposedStringWithCanonicalMapping] - } - pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id { - msg_send_id![self, decomposedStringWithCompatibilityMapping] - } - pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id { - msg_send_id![self, precomposedStringWithCompatibilityMapping] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn hash(&self) -> NSUInteger { - msg_send![self, hash] - } } pub type NSStringEncodingDetectionOptionsKey = NSString; #[doc = "NSStringEncodingDetection"] diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 3a9300623..e84829129 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -18,21 +18,6 @@ impl NSTask { pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } - pub unsafe fn launchAndReturnError(&self, error: *mut *mut NSError) -> bool { - msg_send![self, launchAndReturnError: error] - } - pub unsafe fn interrupt(&self) { - msg_send![self, interrupt] - } - pub unsafe fn terminate(&self) { - msg_send![self, terminate] - } - pub unsafe fn suspend(&self) -> bool { - msg_send![self, suspend] - } - pub unsafe fn resume(&self) -> bool { - msg_send![self, resume] - } pub unsafe fn executableURL(&self) -> Option> { msg_send_id![self, executableURL] } @@ -75,6 +60,21 @@ impl NSTask { pub unsafe fn setStandardError(&self, standardError: Option<&Object>) { msg_send![self, setStandardError: standardError] } + pub unsafe fn launchAndReturnError(&self, error: *mut *mut NSError) -> bool { + msg_send![self, launchAndReturnError: error] + } + pub unsafe fn interrupt(&self) { + msg_send![self, interrupt] + } + pub unsafe fn terminate(&self) { + msg_send![self, terminate] + } + pub unsafe fn suspend(&self) -> bool { + msg_send![self, suspend] + } + pub unsafe fn resume(&self) -> bool { + msg_send![self, resume] + } pub unsafe fn processIdentifier(&self) -> c_int { msg_send![self, processIdentifier] } @@ -122,6 +122,18 @@ impl NSTask { } #[doc = "NSDeprecated"] impl NSTask { + pub unsafe fn launchPath(&self) -> Option> { + msg_send_id![self, launchPath] + } + pub unsafe fn setLaunchPath(&self, launchPath: Option<&NSString>) { + msg_send![self, setLaunchPath: launchPath] + } + pub unsafe fn currentDirectoryPath(&self) -> Id { + msg_send_id![self, currentDirectoryPath] + } + pub unsafe fn setCurrentDirectoryPath(&self, currentDirectoryPath: &NSString) { + msg_send![self, setCurrentDirectoryPath: currentDirectoryPath] + } pub unsafe fn launch(&self) { msg_send![self, launch] } @@ -135,16 +147,4 @@ impl NSTask { arguments: arguments ] } - pub unsafe fn launchPath(&self) -> Option> { - msg_send_id![self, launchPath] - } - pub unsafe fn setLaunchPath(&self, launchPath: Option<&NSString>) { - msg_send![self, setLaunchPath: launchPath] - } - pub unsafe fn currentDirectoryPath(&self) -> Id { - msg_send_id![self, currentDirectoryPath] - } - pub unsafe fn setCurrentDirectoryPath(&self, currentDirectoryPath: &NSString) { - msg_send![self, setCurrentDirectoryPath: currentDirectoryPath] - } } diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 8ab003748..037fd84fd 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -32,18 +32,6 @@ impl NSTextCheckingResult { } #[doc = "NSTextCheckingResultOptional"] impl NSTextCheckingResult { - pub unsafe fn rangeAtIndex(&self, idx: NSUInteger) -> NSRange { - msg_send![self, rangeAtIndex: idx] - } - pub unsafe fn rangeWithName(&self, name: &NSString) -> NSRange { - msg_send![self, rangeWithName: name] - } - pub unsafe fn resultByAdjustingRangesWithOffset( - &self, - offset: NSInteger, - ) -> Id { - msg_send_id![self, resultByAdjustingRangesWithOffset: offset] - } pub unsafe fn orthography(&self) -> Option> { msg_send_id![self, orthography] } @@ -84,6 +72,18 @@ impl NSTextCheckingResult { pub unsafe fn numberOfRanges(&self) -> NSUInteger { msg_send![self, numberOfRanges] } + pub unsafe fn rangeAtIndex(&self, idx: NSUInteger) -> NSRange { + msg_send![self, rangeAtIndex: idx] + } + pub unsafe fn rangeWithName(&self, name: &NSString) -> NSRange { + msg_send![self, rangeWithName: name] + } + pub unsafe fn resultByAdjustingRangesWithOffset( + &self, + offset: NSInteger, + ) -> Id { + msg_send_id![self, resultByAdjustingRangesWithOffset: offset] + } pub unsafe fn addressComponents( &self, ) -> Option, Shared>> { diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 451a43006..f061da8b0 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -18,6 +18,9 @@ extern_class!( } ); impl NSThread { + pub unsafe fn currentThread() -> Id { + msg_send_id![Self::class(), currentThread] + } pub unsafe fn detachNewThreadWithBlock(block: TodoBlock) { msg_send![Self::class(), detachNewThreadWithBlock: block] } @@ -36,6 +39,9 @@ impl NSThread { pub unsafe fn isMultiThreaded() -> bool { msg_send![Self::class(), isMultiThreaded] } + pub unsafe fn threadDictionary(&self) -> Id { + msg_send_id![self, threadDictionary] + } pub unsafe fn sleepUntilDate(date: &NSDate) { msg_send![Self::class(), sleepUntilDate: date] } @@ -51,40 +57,6 @@ impl NSThread { pub unsafe fn setThreadPriority(p: c_double) -> bool { msg_send![Self::class(), setThreadPriority: p] } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithTarget_selector_object( - &self, - target: &Object, - selector: Sel, - argument: Option<&Object>, - ) -> Id { - msg_send_id![ - self, - initWithTarget: target, - selector: selector, - object: argument - ] - } - pub unsafe fn initWithBlock(&self, block: TodoBlock) -> Id { - msg_send_id![self, initWithBlock: block] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn start(&self) { - msg_send![self, start] - } - pub unsafe fn main(&self) { - msg_send![self, main] - } - pub unsafe fn currentThread() -> Id { - msg_send_id![Self::class(), currentThread] - } - pub unsafe fn threadDictionary(&self) -> Id { - msg_send_id![self, threadDictionary] - } pub unsafe fn threadPriority(&self) -> c_double { msg_send![self, threadPriority] } @@ -124,6 +96,25 @@ impl NSThread { pub unsafe fn mainThread() -> Id { msg_send_id![Self::class(), mainThread] } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithTarget_selector_object( + &self, + target: &Object, + selector: Sel, + argument: Option<&Object>, + ) -> Id { + msg_send_id![ + self, + initWithTarget: target, + selector: selector, + object: argument + ] + } + pub unsafe fn initWithBlock(&self, block: TodoBlock) -> Id { + msg_send_id![self, initWithBlock: block] + } pub unsafe fn isExecuting(&self) -> bool { msg_send![self, isExecuting] } @@ -133,6 +124,15 @@ impl NSThread { pub unsafe fn isCancelled(&self) -> bool { msg_send![self, isCancelled] } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn start(&self) { + msg_send![self, start] + } + pub unsafe fn main(&self) { + msg_send![self, main] + } } #[doc = "NSThreadPerformAdditions"] impl NSObject { diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index d32579226..a411169f9 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -19,6 +19,12 @@ extern_class!( } ); impl NSTimeZone { + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn data(&self) -> Id { + msg_send_id![self, data] + } pub unsafe fn secondsFromGMTForDate(&self, aDate: &NSDate) -> NSInteger { msg_send![self, secondsFromGMTForDate: aDate] } @@ -37,34 +43,15 @@ impl NSTimeZone { ) -> Option> { msg_send_id![self, nextDaylightSavingTimeTransitionAfterDate: aDate] } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn data(&self) -> Id { - msg_send_id![self, data] - } } #[doc = "NSExtendedTimeZone"] impl NSTimeZone { - pub unsafe fn resetSystemTimeZone() { - msg_send![Self::class(), resetSystemTimeZone] - } - pub unsafe fn abbreviationDictionary() -> Id, Shared> { - msg_send_id![Self::class(), abbreviationDictionary] - } - pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool { - msg_send![self, isEqualToTimeZone: aTimeZone] - } - pub unsafe fn localizedName_locale( - &self, - style: NSTimeZoneNameStyle, - locale: Option<&NSLocale>, - ) -> Option> { - msg_send_id![self, localizedName: style, locale: locale] - } pub unsafe fn systemTimeZone() -> Id { msg_send_id![Self::class(), systemTimeZone] } + pub unsafe fn resetSystemTimeZone() { + msg_send![Self::class(), resetSystemTimeZone] + } pub unsafe fn defaultTimeZone() -> Id { msg_send_id![Self::class(), defaultTimeZone] } @@ -77,6 +64,9 @@ impl NSTimeZone { pub unsafe fn knownTimeZoneNames() -> Id, Shared> { msg_send_id![Self::class(), knownTimeZoneNames] } + pub unsafe fn abbreviationDictionary() -> Id, Shared> { + msg_send_id![Self::class(), abbreviationDictionary] + } pub unsafe fn setAbbreviationDictionary( abbreviationDictionary: &NSDictionary, ) { @@ -106,6 +96,16 @@ impl NSTimeZone { pub unsafe fn description(&self) -> Id { msg_send_id![self, description] } + pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool { + msg_send![self, isEqualToTimeZone: aTimeZone] + } + pub unsafe fn localizedName_locale( + &self, + style: NSTimeZoneNameStyle, + locale: Option<&NSLocale>, + ) -> Option> { + msg_send_id![self, localizedName: style, locale: locale] + } } #[doc = "NSTimeZoneCreation"] impl NSTimeZone { diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 6b3d40396..7463d956e 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -129,9 +129,6 @@ impl NSTimer { pub unsafe fn fire(&self) { msg_send![self, fire] } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } pub unsafe fn fireDate(&self) -> Id { msg_send_id![self, fireDate] } @@ -147,6 +144,9 @@ impl NSTimer { pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval) { msg_send![self, setTolerance: tolerance] } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } pub unsafe fn isValid(&self) -> bool { msg_send![self, isValid] } diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index b25ff772e..d6f584c7a 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -179,6 +179,57 @@ impl NSURL { relativeToURL: baseURL ] } + pub unsafe fn dataRepresentation(&self) -> Id { + msg_send_id![self, dataRepresentation] + } + pub unsafe fn absoluteString(&self) -> Option> { + msg_send_id![self, absoluteString] + } + pub unsafe fn relativeString(&self) -> Id { + msg_send_id![self, relativeString] + } + pub unsafe fn baseURL(&self) -> Option> { + msg_send_id![self, baseURL] + } + pub unsafe fn absoluteURL(&self) -> Option> { + msg_send_id![self, absoluteURL] + } + pub unsafe fn scheme(&self) -> Option> { + msg_send_id![self, scheme] + } + pub unsafe fn resourceSpecifier(&self) -> Option> { + msg_send_id![self, resourceSpecifier] + } + pub unsafe fn host(&self) -> Option> { + msg_send_id![self, host] + } + pub unsafe fn port(&self) -> Option> { + msg_send_id![self, port] + } + pub unsafe fn user(&self) -> Option> { + msg_send_id![self, user] + } + pub unsafe fn password(&self) -> Option> { + msg_send_id![self, password] + } + pub unsafe fn path(&self) -> Option> { + msg_send_id![self, path] + } + pub unsafe fn fragment(&self) -> Option> { + msg_send_id![self, fragment] + } + pub unsafe fn parameterString(&self) -> Option> { + msg_send_id![self, parameterString] + } + pub unsafe fn query(&self) -> Option> { + msg_send_id![self, query] + } + pub unsafe fn relativePath(&self) -> Option> { + msg_send_id![self, relativePath] + } + pub unsafe fn hasDirectoryPath(&self) -> bool { + msg_send![self, hasDirectoryPath] + } pub unsafe fn getFileSystemRepresentation_maxLength( &self, buffer: NonNull, @@ -190,6 +241,15 @@ impl NSURL { maxLength: maxBufferLength ] } + pub unsafe fn fileSystemRepresentation(&self) -> NonNull { + msg_send![self, fileSystemRepresentation] + } + pub unsafe fn isFileURL(&self) -> bool { + msg_send![self, isFileURL] + } + pub unsafe fn standardizedURL(&self) -> Option> { + msg_send_id![self, standardizedURL] + } pub unsafe fn checkResourceIsReachableAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, checkResourceIsReachableAndReturnError: error] } @@ -199,6 +259,9 @@ impl NSURL { pub unsafe fn fileReferenceURL(&self) -> Option> { msg_send_id![self, fileReferenceURL] } + pub unsafe fn filePathURL(&self) -> Option> { + msg_send_id![self, filePathURL] + } pub unsafe fn getResourceValue_forKey_error( &self, value: &mut Option>, @@ -342,69 +405,6 @@ impl NSURL { pub unsafe fn stopAccessingSecurityScopedResource(&self) { msg_send![self, stopAccessingSecurityScopedResource] } - pub unsafe fn dataRepresentation(&self) -> Id { - msg_send_id![self, dataRepresentation] - } - pub unsafe fn absoluteString(&self) -> Option> { - msg_send_id![self, absoluteString] - } - pub unsafe fn relativeString(&self) -> Id { - msg_send_id![self, relativeString] - } - pub unsafe fn baseURL(&self) -> Option> { - msg_send_id![self, baseURL] - } - pub unsafe fn absoluteURL(&self) -> Option> { - msg_send_id![self, absoluteURL] - } - pub unsafe fn scheme(&self) -> Option> { - msg_send_id![self, scheme] - } - pub unsafe fn resourceSpecifier(&self) -> Option> { - msg_send_id![self, resourceSpecifier] - } - pub unsafe fn host(&self) -> Option> { - msg_send_id![self, host] - } - pub unsafe fn port(&self) -> Option> { - msg_send_id![self, port] - } - pub unsafe fn user(&self) -> Option> { - msg_send_id![self, user] - } - pub unsafe fn password(&self) -> Option> { - msg_send_id![self, password] - } - pub unsafe fn path(&self) -> Option> { - msg_send_id![self, path] - } - pub unsafe fn fragment(&self) -> Option> { - msg_send_id![self, fragment] - } - pub unsafe fn parameterString(&self) -> Option> { - msg_send_id![self, parameterString] - } - pub unsafe fn query(&self) -> Option> { - msg_send_id![self, query] - } - pub unsafe fn relativePath(&self) -> Option> { - msg_send_id![self, relativePath] - } - pub unsafe fn hasDirectoryPath(&self) -> bool { - msg_send![self, hasDirectoryPath] - } - pub unsafe fn fileSystemRepresentation(&self) -> NonNull { - msg_send![self, fileSystemRepresentation] - } - pub unsafe fn isFileURL(&self) -> bool { - msg_send![self, isFileURL] - } - pub unsafe fn standardizedURL(&self) -> Option> { - msg_send_id![self, standardizedURL] - } - pub unsafe fn filePathURL(&self) -> Option> { - msg_send_id![self, filePathURL] - } } #[doc = "NSPromisedItems"] impl NSURL { @@ -499,12 +499,12 @@ impl NSURLComponents { pub unsafe fn componentsWithString(URLString: &NSString) -> Option> { msg_send_id![Self::class(), componentsWithString: URLString] } - pub unsafe fn URLRelativeToURL(&self, baseURL: Option<&NSURL>) -> Option> { - msg_send_id![self, URLRelativeToURL: baseURL] - } pub unsafe fn URL(&self) -> Option> { msg_send_id![self, URL] } + pub unsafe fn URLRelativeToURL(&self, baseURL: Option<&NSURL>) -> Option> { + msg_send_id![self, URLRelativeToURL: baseURL] + } pub unsafe fn string(&self) -> Option> { msg_send_id![self, string] } @@ -664,6 +664,9 @@ impl NSString { stringByAddingPercentEncodingWithAllowedCharacters: allowedCharacters ] } + pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option> { + msg_send_id![self, stringByRemovingPercentEncoding] + } pub unsafe fn stringByAddingPercentEscapesUsingEncoding( &self, enc: NSStringEncoding, @@ -676,9 +679,6 @@ impl NSString { ) -> Option> { msg_send_id![self, stringByReplacingPercentEscapesUsingEncoding: enc] } - pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option> { - msg_send_id![self, stringByRemovingPercentEncoding] - } } #[doc = "NSURLPathUtilities"] impl NSURL { @@ -687,6 +687,15 @@ impl NSURL { ) -> Option> { msg_send_id![Self::class(), fileURLWithPathComponents: components] } + pub unsafe fn pathComponents(&self) -> Option, Shared>> { + msg_send_id![self, pathComponents] + } + pub unsafe fn lastPathComponent(&self) -> Option> { + msg_send_id![self, lastPathComponent] + } + pub unsafe fn pathExtension(&self) -> Option> { + msg_send_id![self, pathExtension] + } pub unsafe fn URLByAppendingPathComponent( &self, pathComponent: &NSString, @@ -704,24 +713,15 @@ impl NSURL { isDirectory: isDirectory ] } + pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option> { + msg_send_id![self, URLByDeletingLastPathComponent] + } pub unsafe fn URLByAppendingPathExtension( &self, pathExtension: &NSString, ) -> Option> { msg_send_id![self, URLByAppendingPathExtension: pathExtension] } - pub unsafe fn pathComponents(&self) -> Option, Shared>> { - msg_send_id![self, pathComponents] - } - pub unsafe fn lastPathComponent(&self) -> Option> { - msg_send_id![self, lastPathComponent] - } - pub unsafe fn pathExtension(&self) -> Option> { - msg_send_id![self, pathExtension] - } - pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option> { - msg_send_id![self, URLByDeletingLastPathComponent] - } pub unsafe fn URLByDeletingPathExtension(&self) -> Option> { msg_send_id![self, URLByDeletingPathExtension] } diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 42c841409..782419e15 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -63,6 +63,12 @@ extern_class!( } ); impl NSURLCache { + pub unsafe fn sharedURLCache() -> Id { + msg_send_id![Self::class(), sharedURLCache] + } + pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache) { + msg_send![Self::class(), setSharedURLCache: sharedURLCache] + } pub unsafe fn initWithMemoryCapacity_diskCapacity_diskPath( &self, memoryCapacity: NSUInteger, @@ -115,12 +121,6 @@ impl NSURLCache { pub unsafe fn removeCachedResponsesSinceDate(&self, date: &NSDate) { msg_send![self, removeCachedResponsesSinceDate: date] } - pub unsafe fn sharedURLCache() -> Id { - msg_send_id![Self::class(), sharedURLCache] - } - pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache) { - msg_send![Self::class(), setSharedURLCache: sharedURLCache] - } pub unsafe fn memoryCapacity(&self) -> NSUInteger { msg_send![self, memoryCapacity] } diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 39d6cb4c9..d3a730fa3 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -55,6 +55,12 @@ impl NSURLConnection { delegate: delegate ] } + pub unsafe fn originalRequest(&self) -> Id { + msg_send_id![self, originalRequest] + } + pub unsafe fn currentRequest(&self) -> Id { + msg_send_id![self, currentRequest] + } pub unsafe fn start(&self) { msg_send![self, start] } @@ -73,12 +79,6 @@ impl NSURLConnection { pub unsafe fn canHandleRequest(request: &NSURLRequest) -> bool { msg_send![Self::class(), canHandleRequest: request] } - pub unsafe fn originalRequest(&self) -> Id { - msg_send_id![self, originalRequest] - } - pub unsafe fn currentRequest(&self) -> Id { - msg_send_id![self, currentRequest] - } } pub type NSURLConnectionDelegate = NSObject; pub type NSURLConnectionDataDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 027548385..0fdfbb30b 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -18,12 +18,21 @@ extern_class!( } ); impl NSURLCredentialStorage { + pub unsafe fn sharedCredentialStorage() -> Id { + msg_send_id![Self::class(), sharedCredentialStorage] + } pub unsafe fn credentialsForProtectionSpace( &self, space: &NSURLProtectionSpace, ) -> Option, Shared>> { msg_send_id![self, credentialsForProtectionSpace: space] } + pub unsafe fn allCredentials( + &self, + ) -> Id>, Shared> + { + msg_send_id![self, allCredentials] + } pub unsafe fn setCredential_forProtectionSpace( &self, credential: &NSURLCredential, @@ -72,15 +81,6 @@ impl NSURLCredentialStorage { forProtectionSpace: space ] } - pub unsafe fn sharedCredentialStorage() -> Id { - msg_send_id![Self::class(), sharedCredentialStorage] - } - pub unsafe fn allCredentials( - &self, - ) -> Id>, Shared> - { - msg_send_id![self, allCredentials] - } } #[doc = "NSURLSessionTaskAdditions"] impl NSURLCredentialStorage { diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 7c2676e4b..86be87b8f 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -35,6 +35,15 @@ impl NSURLProtocol { client: client ] } + pub unsafe fn client(&self) -> Option> { + msg_send_id![self, client] + } + pub unsafe fn request(&self) -> Id { + msg_send_id![self, request] + } + pub unsafe fn cachedResponse(&self) -> Option> { + msg_send_id![self, cachedResponse] + } pub unsafe fn canInitWithRequest(request: &NSURLRequest) -> bool { msg_send![Self::class(), canInitWithRequest: request] } @@ -77,15 +86,6 @@ impl NSURLProtocol { pub unsafe fn unregisterClass(protocolClass: &Class) { msg_send![Self::class(), unregisterClass: protocolClass] } - pub unsafe fn client(&self) -> Option> { - msg_send_id![self, client] - } - pub unsafe fn request(&self) -> Id { - msg_send_id![self, request] - } - pub unsafe fn cachedResponse(&self) -> Option> { - msg_send_id![self, cachedResponse] - } } #[doc = "NSURLSessionTaskAdditions"] impl NSURLProtocol { diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 10b316b56..4233d7720 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -21,6 +21,9 @@ impl NSURLRequest { pub unsafe fn requestWithURL(URL: &NSURL) -> Id { msg_send_id![Self::class(), requestWithURL: URL] } + pub unsafe fn supportsSecureCoding() -> bool { + msg_send![Self::class(), supportsSecureCoding] + } pub unsafe fn requestWithURL_cachePolicy_timeoutInterval( URL: &NSURL, cachePolicy: NSURLRequestCachePolicy, @@ -49,9 +52,6 @@ impl NSURLRequest { timeoutInterval: timeoutInterval ] } - pub unsafe fn supportsSecureCoding() -> bool { - msg_send![Self::class(), supportsSecureCoding] - } pub unsafe fn URL(&self) -> Option> { msg_send_id![self, URL] } @@ -160,9 +160,6 @@ impl NSMutableURLRequest { } #[doc = "NSHTTPURLRequest"] impl NSURLRequest { - pub unsafe fn valueForHTTPHeaderField(&self, field: &NSString) -> Option> { - msg_send_id![self, valueForHTTPHeaderField: field] - } pub unsafe fn HTTPMethod(&self) -> Option> { msg_send_id![self, HTTPMethod] } @@ -171,6 +168,9 @@ impl NSURLRequest { ) -> Option, Shared>> { msg_send_id![self, allHTTPHeaderFields] } + pub unsafe fn valueForHTTPHeaderField(&self, field: &NSString) -> Option> { + msg_send_id![self, valueForHTTPHeaderField: field] + } pub unsafe fn HTTPBody(&self) -> Option> { msg_send_id![self, HTTPBody] } @@ -186,12 +186,6 @@ impl NSURLRequest { } #[doc = "NSMutableHTTPURLRequest"] impl NSMutableURLRequest { - pub unsafe fn setValue_forHTTPHeaderField(&self, value: Option<&NSString>, field: &NSString) { - msg_send![self, setValue: value, forHTTPHeaderField: field] - } - pub unsafe fn addValue_forHTTPHeaderField(&self, value: &NSString, field: &NSString) { - msg_send![self, addValue: value, forHTTPHeaderField: field] - } pub unsafe fn HTTPMethod(&self) -> Id { msg_send_id![self, HTTPMethod] } @@ -209,6 +203,12 @@ impl NSMutableURLRequest { ) { msg_send![self, setAllHTTPHeaderFields: allHTTPHeaderFields] } + pub unsafe fn setValue_forHTTPHeaderField(&self, value: Option<&NSString>, field: &NSString) { + msg_send![self, setValue: value, forHTTPHeaderField: field] + } + pub unsafe fn addValue_forHTTPHeaderField(&self, value: &NSString, field: &NSString) { + msg_send![self, addValue: value, forHTTPHeaderField: field] + } pub unsafe fn HTTPBody(&self) -> Option> { msg_send_id![self, HTTPBody] } diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index 9a4a2c7c6..ace66b702 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -71,16 +71,16 @@ impl NSHTTPURLResponse { headerFields: headerFields ] } - pub unsafe fn valueForHTTPHeaderField(&self, field: &NSString) -> Option> { - msg_send_id![self, valueForHTTPHeaderField: field] - } - pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id { - msg_send_id![Self::class(), localizedStringForStatusCode: statusCode] - } pub unsafe fn statusCode(&self) -> NSInteger { msg_send![self, statusCode] } pub unsafe fn allHeaderFields(&self) -> Id { msg_send_id![self, allHeaderFields] } + pub unsafe fn valueForHTTPHeaderField(&self, field: &NSString) -> Option> { + msg_send_id![self, valueForHTTPHeaderField: field] + } + pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id { + msg_send_id![Self::class(), localizedStringForStatusCode: statusCode] + } } diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 57c9bb937..88171492d 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -35,6 +35,9 @@ extern_class!( } ); impl NSURLSession { + pub unsafe fn sharedSession() -> Id { + msg_send_id![Self::class(), sharedSession] + } pub unsafe fn sessionWithConfiguration( configuration: &NSURLSessionConfiguration, ) -> Id { @@ -52,6 +55,21 @@ impl NSURLSession { delegateQueue: queue ] } + pub unsafe fn delegateQueue(&self) -> Id { + msg_send_id![self, delegateQueue] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn configuration(&self) -> Id { + msg_send_id![self, configuration] + } + pub unsafe fn sessionDescription(&self) -> Option> { + msg_send_id![self, sessionDescription] + } + pub unsafe fn setSessionDescription(&self, sessionDescription: Option<&NSString>) { + msg_send![self, setSessionDescription: sessionDescription] + } pub unsafe fn finishTasksAndInvalidate(&self) { msg_send![self, finishTasksAndInvalidate] } @@ -152,24 +170,6 @@ impl NSURLSession { pub unsafe fn new() -> Id { msg_send_id![Self::class(), new] } - pub unsafe fn sharedSession() -> Id { - msg_send_id![Self::class(), sharedSession] - } - pub unsafe fn delegateQueue(&self) -> Id { - msg_send_id![self, delegateQueue] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn configuration(&self) -> Id { - msg_send_id![self, configuration] - } - pub unsafe fn sessionDescription(&self) -> Option> { - msg_send_id![self, sessionDescription] - } - pub unsafe fn setSessionDescription(&self, sessionDescription: Option<&NSString>) { - msg_send![self, setSessionDescription: sessionDescription] - } } #[doc = "NSURLSessionAsynchronousConvenience"] impl NSURLSession { @@ -263,21 +263,6 @@ extern_class!( } ); impl NSURLSessionTask { - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn suspend(&self) { - msg_send![self, suspend] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } pub unsafe fn taskIdentifier(&self) -> NSUInteger { msg_send![self, taskIdentifier] } @@ -347,12 +332,21 @@ impl NSURLSessionTask { pub unsafe fn setTaskDescription(&self, taskDescription: Option<&NSString>) { msg_send![self, setTaskDescription: taskDescription] } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } pub unsafe fn state(&self) -> NSURLSessionTaskState { msg_send![self, state] } pub unsafe fn error(&self) -> Option> { msg_send_id![self, error] } + pub unsafe fn suspend(&self) { + msg_send![self, suspend] + } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } pub unsafe fn priority(&self) -> c_float { msg_send![self, priority] } @@ -368,6 +362,12 @@ impl NSURLSessionTask { setPrefersIncrementalDelivery: prefersIncrementalDelivery ] } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } extern_class!( #[derive(Debug)] @@ -489,12 +489,6 @@ impl NSURLSessionWebSocketMessage { pub unsafe fn initWithString(&self, string: &NSString) -> Id { msg_send_id![self, initWithString: string] } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType { msg_send![self, type] } @@ -504,6 +498,12 @@ impl NSURLSessionWebSocketMessage { pub unsafe fn string(&self) -> Option> { msg_send_id![self, string] } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } extern_class!( #[derive(Debug)] @@ -537,12 +537,6 @@ impl NSURLSessionWebSocketTask { ) { msg_send![self, cancelWithCloseCode: closeCode, reason: reason] } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } pub unsafe fn maximumMessageSize(&self) -> NSInteger { msg_send![self, maximumMessageSize] } @@ -555,6 +549,12 @@ impl NSURLSessionWebSocketTask { pub unsafe fn closeReason(&self) -> Option> { msg_send_id![self, closeReason] } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } extern_class!( #[derive(Debug)] @@ -564,6 +564,12 @@ extern_class!( } ); impl NSURLSessionConfiguration { + pub unsafe fn defaultSessionConfiguration() -> Id { + msg_send_id![Self::class(), defaultSessionConfiguration] + } + pub unsafe fn ephemeralSessionConfiguration() -> Id { + msg_send_id![Self::class(), ephemeralSessionConfiguration] + } pub unsafe fn backgroundSessionConfigurationWithIdentifier( identifier: &NSString, ) -> Id { @@ -572,18 +578,6 @@ impl NSURLSessionConfiguration { backgroundSessionConfigurationWithIdentifier: identifier ] } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } - pub unsafe fn defaultSessionConfiguration() -> Id { - msg_send_id![Self::class(), defaultSessionConfiguration] - } - pub unsafe fn ephemeralSessionConfiguration() -> Id { - msg_send_id![Self::class(), ephemeralSessionConfiguration] - } pub unsafe fn identifier(&self) -> Option> { msg_send_id![self, identifier] } @@ -812,6 +806,12 @@ impl NSURLSessionConfiguration { ) { msg_send![self, setMultipathServiceType: multipathServiceType] } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } pub type NSURLSessionDelegate = NSObject; pub type NSURLSessionTaskDelegate = NSObject; @@ -835,12 +835,6 @@ extern_class!( } ); impl NSURLSessionTaskTransactionMetrics { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } pub unsafe fn request(&self) -> Id { msg_send_id![self, request] } @@ -945,6 +939,12 @@ impl NSURLSessionTaskTransactionMetrics { ) -> NSURLSessionTaskMetricsDomainResolutionProtocol { msg_send![self, domainResolutionProtocol] } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } extern_class!( #[derive(Debug)] @@ -954,12 +954,6 @@ extern_class!( } ); impl NSURLSessionTaskMetrics { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } pub unsafe fn transactionMetrics( &self, ) -> Id, Shared> { @@ -971,4 +965,10 @@ impl NSURLSessionTaskMetrics { pub unsafe fn redirectCount(&self) -> NSUInteger { msg_send![self, redirectCount] } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index e49785bdc..691919b85 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -16,6 +16,9 @@ extern_class!( } ); impl NSUbiquitousKeyValueStore { + pub unsafe fn defaultStore() -> Id { + msg_send_id![Self::class(), defaultStore] + } pub unsafe fn objectForKey(&self, aKey: &NSString) -> Option> { msg_send_id![self, objectForKey: aKey] } @@ -74,13 +77,10 @@ impl NSUbiquitousKeyValueStore { pub unsafe fn setBool_forKey(&self, value: bool, aKey: &NSString) { msg_send![self, setBool: value, forKey: aKey] } - pub unsafe fn synchronize(&self) -> bool { - msg_send![self, synchronize] - } - pub unsafe fn defaultStore() -> Id { - msg_send_id![Self::class(), defaultStore] - } pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared> { msg_send_id![self, dictionaryRepresentation] } + pub unsafe fn synchronize(&self) -> bool { + msg_send![self, synchronize] + } } diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index 7940c1c3e..b1d33dcbf 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -21,12 +21,36 @@ impl NSUndoManager { pub unsafe fn endUndoGrouping(&self) { msg_send![self, endUndoGrouping] } + pub unsafe fn groupingLevel(&self) -> NSInteger { + msg_send![self, groupingLevel] + } pub unsafe fn disableUndoRegistration(&self) { msg_send![self, disableUndoRegistration] } pub unsafe fn enableUndoRegistration(&self) { msg_send![self, enableUndoRegistration] } + pub unsafe fn isUndoRegistrationEnabled(&self) -> bool { + msg_send![self, isUndoRegistrationEnabled] + } + pub unsafe fn groupsByEvent(&self) -> bool { + msg_send![self, groupsByEvent] + } + pub unsafe fn setGroupsByEvent(&self, groupsByEvent: bool) { + msg_send![self, setGroupsByEvent: groupsByEvent] + } + pub unsafe fn levelsOfUndo(&self) -> NSUInteger { + msg_send![self, levelsOfUndo] + } + pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger) { + msg_send![self, setLevelsOfUndo: levelsOfUndo] + } + pub unsafe fn runLoopModes(&self) -> Id, Shared> { + msg_send_id![self, runLoopModes] + } + pub unsafe fn setRunLoopModes(&self, runLoopModes: &NSArray) { + msg_send![self, setRunLoopModes: runLoopModes] + } pub unsafe fn undo(&self) { msg_send![self, undo] } @@ -36,6 +60,18 @@ impl NSUndoManager { pub unsafe fn undoNestedGroup(&self) { msg_send![self, undoNestedGroup] } + pub unsafe fn canUndo(&self) -> bool { + msg_send![self, canUndo] + } + pub unsafe fn canRedo(&self) -> bool { + msg_send![self, canRedo] + } + pub unsafe fn isUndoing(&self) -> bool { + msg_send![self, isUndoing] + } + pub unsafe fn isRedoing(&self) -> bool { + msg_send![self, isRedoing] + } pub unsafe fn removeAllActions(&self) { msg_send![self, removeAllActions] } @@ -64,57 +100,6 @@ impl NSUndoManager { pub unsafe fn setActionIsDiscardable(&self, discardable: bool) { msg_send![self, setActionIsDiscardable: discardable] } - pub unsafe fn setActionName(&self, actionName: &NSString) { - msg_send![self, setActionName: actionName] - } - pub unsafe fn undoMenuTitleForUndoActionName( - &self, - actionName: &NSString, - ) -> Id { - msg_send_id![self, undoMenuTitleForUndoActionName: actionName] - } - pub unsafe fn redoMenuTitleForUndoActionName( - &self, - actionName: &NSString, - ) -> Id { - msg_send_id![self, redoMenuTitleForUndoActionName: actionName] - } - pub unsafe fn groupingLevel(&self) -> NSInteger { - msg_send![self, groupingLevel] - } - pub unsafe fn isUndoRegistrationEnabled(&self) -> bool { - msg_send![self, isUndoRegistrationEnabled] - } - pub unsafe fn groupsByEvent(&self) -> bool { - msg_send![self, groupsByEvent] - } - pub unsafe fn setGroupsByEvent(&self, groupsByEvent: bool) { - msg_send![self, setGroupsByEvent: groupsByEvent] - } - pub unsafe fn levelsOfUndo(&self) -> NSUInteger { - msg_send![self, levelsOfUndo] - } - pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger) { - msg_send![self, setLevelsOfUndo: levelsOfUndo] - } - pub unsafe fn runLoopModes(&self) -> Id, Shared> { - msg_send_id![self, runLoopModes] - } - pub unsafe fn setRunLoopModes(&self, runLoopModes: &NSArray) { - msg_send![self, setRunLoopModes: runLoopModes] - } - pub unsafe fn canUndo(&self) -> bool { - msg_send![self, canUndo] - } - pub unsafe fn canRedo(&self) -> bool { - msg_send![self, canRedo] - } - pub unsafe fn isUndoing(&self) -> bool { - msg_send![self, isUndoing] - } - pub unsafe fn isRedoing(&self) -> bool { - msg_send![self, isRedoing] - } pub unsafe fn undoActionIsDiscardable(&self) -> bool { msg_send![self, undoActionIsDiscardable] } @@ -127,10 +112,25 @@ impl NSUndoManager { pub unsafe fn redoActionName(&self) -> Id { msg_send_id![self, redoActionName] } + pub unsafe fn setActionName(&self, actionName: &NSString) { + msg_send![self, setActionName: actionName] + } pub unsafe fn undoMenuItemTitle(&self) -> Id { msg_send_id![self, undoMenuItemTitle] } pub unsafe fn redoMenuItemTitle(&self) -> Id { msg_send_id![self, redoMenuItemTitle] } + pub unsafe fn undoMenuTitleForUndoActionName( + &self, + actionName: &NSString, + ) -> Id { + msg_send_id![self, undoMenuTitleForUndoActionName: actionName] + } + pub unsafe fn redoMenuTitleForUndoActionName( + &self, + actionName: &NSString, + ) -> Id { + msg_send_id![self, redoMenuTitleForUndoActionName: actionName] + } } diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index 155e9fad1..0c57d40e1 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -26,6 +26,12 @@ extern_class!( } ); impl NSUnitConverterLinear { + pub unsafe fn coefficient(&self) -> c_double { + msg_send![self, coefficient] + } + pub unsafe fn constant(&self) -> c_double { + msg_send![self, constant] + } pub unsafe fn initWithCoefficient(&self, coefficient: c_double) -> Id { msg_send_id![self, initWithCoefficient: coefficient] } @@ -36,12 +42,6 @@ impl NSUnitConverterLinear { ) -> Id { msg_send_id![self, initWithCoefficient: coefficient, constant: constant] } - pub unsafe fn coefficient(&self) -> c_double { - msg_send![self, coefficient] - } - pub unsafe fn constant(&self) -> c_double { - msg_send![self, constant] - } } extern_class!( #[derive(Debug)] @@ -51,6 +51,9 @@ extern_class!( } ); impl NSUnit { + pub unsafe fn symbol(&self) -> Id { + msg_send_id![self, symbol] + } pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } @@ -60,9 +63,6 @@ impl NSUnit { pub unsafe fn initWithSymbol(&self, symbol: &NSString) -> Id { msg_send_id![self, initWithSymbol: symbol] } - pub unsafe fn symbol(&self) -> Id { - msg_send_id![self, symbol] - } } extern_class!( #[derive(Debug)] @@ -72,6 +72,9 @@ extern_class!( } ); impl NSDimension { + pub unsafe fn converter(&self) -> Id { + msg_send_id![self, converter] + } pub unsafe fn initWithSymbol_converter( &self, symbol: &NSString, @@ -82,9 +85,6 @@ impl NSDimension { pub unsafe fn baseUnit() -> Id { msg_send_id![Self::class(), baseUnit] } - pub unsafe fn converter(&self) -> Id { - msg_send_id![self, converter] - } } extern_class!( #[derive(Debug)] @@ -187,6 +187,12 @@ extern_class!( } ); impl NSUnitConcentrationMass { + pub unsafe fn gramsPerLiter() -> Id { + msg_send_id![Self::class(), gramsPerLiter] + } + pub unsafe fn milligramsPerDeciliter() -> Id { + msg_send_id![Self::class(), milligramsPerDeciliter] + } pub unsafe fn millimolesPerLiterWithGramsPerMole( gramsPerMole: c_double, ) -> Id { @@ -195,12 +201,6 @@ impl NSUnitConcentrationMass { millimolesPerLiterWithGramsPerMole: gramsPerMole ] } - pub unsafe fn gramsPerLiter() -> Id { - msg_send_id![Self::class(), gramsPerLiter] - } - pub unsafe fn milligramsPerDeciliter() -> Id { - msg_send_id![Self::class(), milligramsPerDeciliter] - } } extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 7f97e43e5..941b647fc 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -28,40 +28,6 @@ impl NSUserActivity { pub unsafe fn init(&self) -> Id { msg_send_id![self, init] } - pub unsafe fn addUserInfoEntriesFromDictionary(&self, otherDictionary: &NSDictionary) { - msg_send![self, addUserInfoEntriesFromDictionary: otherDictionary] - } - pub unsafe fn becomeCurrent(&self) { - msg_send![self, becomeCurrent] - } - pub unsafe fn resignCurrent(&self) { - msg_send![self, resignCurrent] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn getContinuationStreamsWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![ - self, - getContinuationStreamsWithCompletionHandler: completionHandler - ] - } - pub unsafe fn deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler( - persistentIdentifiers: &NSArray, - handler: TodoBlock, - ) { - msg_send![ - Self::class(), - deleteSavedUserActivitiesWithPersistentIdentifiers: persistentIdentifiers, - completionHandler: handler - ] - } - pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: TodoBlock) { - msg_send![ - Self::class(), - deleteAllSavedUserActivitiesWithCompletionHandler: handler - ] - } pub unsafe fn activityType(&self) -> Id { msg_send_id![self, activityType] } @@ -77,6 +43,9 @@ impl NSUserActivity { pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { msg_send![self, setUserInfo: userInfo] } + pub unsafe fn addUserInfoEntriesFromDictionary(&self, otherDictionary: &NSDictionary) { + msg_send![self, addUserInfoEntriesFromDictionary: otherDictionary] + } pub unsafe fn requiredUserInfoKeys(&self) -> Option, Shared>> { msg_send_id![self, requiredUserInfoKeys] } @@ -134,6 +103,21 @@ impl NSUserActivity { pub unsafe fn setTargetContentIdentifier(&self, targetContentIdentifier: Option<&NSString>) { msg_send![self, setTargetContentIdentifier: targetContentIdentifier] } + pub unsafe fn becomeCurrent(&self) { + msg_send![self, becomeCurrent] + } + pub unsafe fn resignCurrent(&self) { + msg_send![self, resignCurrent] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn getContinuationStreamsWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![ + self, + getContinuationStreamsWithCompletionHandler: completionHandler + ] + } pub unsafe fn isEligibleForHandoff(&self) -> bool { msg_send![self, isEligibleForHandoff] } @@ -172,5 +156,21 @@ impl NSUserActivity { ) { msg_send![self, setPersistentIdentifier: persistentIdentifier] } + pub unsafe fn deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler( + persistentIdentifiers: &NSArray, + handler: TodoBlock, + ) { + msg_send![ + Self::class(), + deleteSavedUserActivitiesWithPersistentIdentifiers: persistentIdentifiers, + completionHandler: handler + ] + } + pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: TodoBlock) { + msg_send![ + Self::class(), + deleteAllSavedUserActivitiesWithCompletionHandler: handler + ] + } } pub type NSUserActivityDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index 6b7c991d9..1249337c6 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -18,6 +18,9 @@ extern_class!( } ); impl NSUserDefaults { + pub unsafe fn standardUserDefaults() -> Id { + msg_send_id![Self::class(), standardUserDefaults] + } pub unsafe fn resetStandardUserDefaults() { msg_send![Self::class(), resetStandardUserDefaults] } @@ -105,6 +108,9 @@ impl NSUserDefaults { pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared> { msg_send_id![self, dictionaryRepresentation] } + pub unsafe fn volatileDomainNames(&self) -> Id, Shared> { + msg_send_id![self, volatileDomainNames] + } pub unsafe fn volatileDomainForName( &self, domainName: &NSString, @@ -149,10 +155,4 @@ impl NSUserDefaults { pub unsafe fn objectIsForcedForKey_inDomain(&self, key: &NSString, domain: &NSString) -> bool { msg_send![self, objectIsForcedForKey: key, inDomain: domain] } - pub unsafe fn standardUserDefaults() -> Id { - msg_send_id![Self::class(), standardUserDefaults] - } - pub unsafe fn volatileDomainNames(&self) -> Id, Shared> { - msg_send_id![self, volatileDomainNames] - } } diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index d2a17c5a0..50c863df6 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -180,21 +180,6 @@ extern_class!( } ); impl NSUserNotificationCenter { - pub unsafe fn scheduleNotification(&self, notification: &NSUserNotification) { - msg_send![self, scheduleNotification: notification] - } - pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification) { - msg_send![self, removeScheduledNotification: notification] - } - pub unsafe fn deliverNotification(&self, notification: &NSUserNotification) { - msg_send![self, deliverNotification: notification] - } - pub unsafe fn removeDeliveredNotification(&self, notification: &NSUserNotification) { - msg_send![self, removeDeliveredNotification: notification] - } - pub unsafe fn removeAllDeliveredNotifications(&self) { - msg_send![self, removeAllDeliveredNotifications] - } pub unsafe fn defaultUserNotificationCenter() -> Id { msg_send_id![Self::class(), defaultUserNotificationCenter] } @@ -213,8 +198,23 @@ impl NSUserNotificationCenter { ) { msg_send![self, setScheduledNotifications: scheduledNotifications] } + pub unsafe fn scheduleNotification(&self, notification: &NSUserNotification) { + msg_send![self, scheduleNotification: notification] + } + pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification) { + msg_send![self, removeScheduledNotification: notification] + } pub unsafe fn deliveredNotifications(&self) -> Id, Shared> { msg_send_id![self, deliveredNotifications] } + pub unsafe fn deliverNotification(&self, notification: &NSUserNotification) { + msg_send![self, deliverNotification: notification] + } + pub unsafe fn removeDeliveredNotification(&self, notification: &NSUserNotification) { + msg_send![self, removeDeliveredNotification: notification] + } + pub unsafe fn removeAllDeliveredNotifications(&self) { + msg_send![self, removeAllDeliveredNotifications] + } } pub type NSUserNotificationCenterDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index da8fbb118..c0daf0dc2 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -26,12 +26,12 @@ impl NSUserScriptTask { ) -> Option> { msg_send_id![self, initWithURL: url, error: error] } - pub unsafe fn executeWithCompletionHandler(&self, handler: NSUserScriptTaskCompletionHandler) { - msg_send![self, executeWithCompletionHandler: handler] - } pub unsafe fn scriptURL(&self) -> Id { msg_send_id![self, scriptURL] } + pub unsafe fn executeWithCompletionHandler(&self, handler: NSUserScriptTaskCompletionHandler) { + msg_send![self, executeWithCompletionHandler: handler] + } } extern_class!( #[derive(Debug)] @@ -41,17 +41,6 @@ extern_class!( } ); impl NSUserUnixTask { - pub unsafe fn executeWithArguments_completionHandler( - &self, - arguments: Option<&NSArray>, - handler: NSUserUnixTaskCompletionHandler, - ) { - msg_send![ - self, - executeWithArguments: arguments, - completionHandler: handler - ] - } pub unsafe fn standardInput(&self) -> Option> { msg_send_id![self, standardInput] } @@ -70,6 +59,17 @@ impl NSUserUnixTask { pub unsafe fn setStandardError(&self, standardError: Option<&NSFileHandle>) { msg_send![self, setStandardError: standardError] } + pub unsafe fn executeWithArguments_completionHandler( + &self, + arguments: Option<&NSArray>, + handler: NSUserUnixTaskCompletionHandler, + ) { + msg_send![ + self, + executeWithArguments: arguments, + completionHandler: handler + ] + } } extern_class!( #[derive(Debug)] @@ -99,6 +99,12 @@ extern_class!( } ); impl NSUserAutomatorTask { + pub unsafe fn variables(&self) -> Option, Shared>> { + msg_send_id![self, variables] + } + pub unsafe fn setVariables(&self, variables: Option<&NSDictionary>) { + msg_send![self, setVariables: variables] + } pub unsafe fn executeWithInput_completionHandler( &self, input: Option<&NSSecureCoding>, @@ -106,10 +112,4 @@ impl NSUserAutomatorTask { ) { msg_send![self, executeWithInput: input, completionHandler: handler] } - pub unsafe fn variables(&self) -> Option, Shared>> { - msg_send_id![self, variables] - } - pub unsafe fn setVariables(&self, variables: Option<&NSDictionary>) { - msg_send![self, setVariables: variables] - } } diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index 7c40c408d..0f470b920 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -16,6 +16,9 @@ impl NSValue { pub unsafe fn getValue_size(&self, value: NonNull, size: NSUInteger) { msg_send![self, getValue: value, size: size] } + pub unsafe fn objCType(&self) -> NonNull { + msg_send![self, objCType] + } pub unsafe fn initWithBytes_objCType( &self, value: NonNull, @@ -26,9 +29,6 @@ impl NSValue { pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { msg_send_id![self, initWithCoder: coder] } - pub unsafe fn objCType(&self) -> NonNull { - msg_send![self, objCType] - } } #[doc = "NSValueCreation"] impl NSValue { @@ -50,18 +50,18 @@ impl NSValue { pub unsafe fn valueWithNonretainedObject(anObject: Option<&Object>) -> Id { msg_send_id![Self::class(), valueWithNonretainedObject: anObject] } - pub unsafe fn valueWithPointer(pointer: *mut c_void) -> Id { - msg_send_id![Self::class(), valueWithPointer: pointer] - } - pub unsafe fn isEqualToValue(&self, value: &NSValue) -> bool { - msg_send![self, isEqualToValue: value] - } pub unsafe fn nonretainedObjectValue(&self) -> Option> { msg_send_id![self, nonretainedObjectValue] } + pub unsafe fn valueWithPointer(pointer: *mut c_void) -> Id { + msg_send_id![Self::class(), valueWithPointer: pointer] + } pub unsafe fn pointerValue(&self) -> *mut c_void { msg_send![self, pointerValue] } + pub unsafe fn isEqualToValue(&self, value: &NSValue) -> bool { + msg_send![self, isEqualToValue: value] + } } extern_class!( #[derive(Debug)] @@ -119,15 +119,6 @@ impl NSNumber { pub unsafe fn initWithUnsignedInteger(&self, value: NSUInteger) -> Id { msg_send_id![self, initWithUnsignedInteger: value] } - pub unsafe fn compare(&self, otherNumber: &NSNumber) -> NSComparisonResult { - msg_send![self, compare: otherNumber] - } - pub unsafe fn isEqualToNumber(&self, number: &NSNumber) -> bool { - msg_send![self, isEqualToNumber: number] - } - pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } pub unsafe fn charValue(&self) -> c_char { msg_send![self, charValue] } @@ -176,6 +167,15 @@ impl NSNumber { pub unsafe fn stringValue(&self) -> Id { msg_send_id![self, stringValue] } + pub unsafe fn compare(&self, otherNumber: &NSNumber) -> NSComparisonResult { + msg_send![self, compare: otherNumber] + } + pub unsafe fn isEqualToNumber(&self, number: &NSNumber) -> bool { + msg_send![self, isEqualToNumber: number] + } + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } } #[doc = "NSNumberCreation"] impl NSNumber { diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index 766537654..a87acc402 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -46,6 +46,18 @@ impl NSXMLDTD { ) -> Option> { msg_send_id![self, initWithData: data, options: mask, error: error] } + pub unsafe fn publicID(&self) -> Option> { + msg_send_id![self, publicID] + } + pub unsafe fn setPublicID(&self, publicID: Option<&NSString>) { + msg_send![self, setPublicID: publicID] + } + pub unsafe fn systemID(&self) -> Option> { + msg_send_id![self, systemID] + } + pub unsafe fn setSystemID(&self, systemID: Option<&NSString>) { + msg_send![self, setSystemID: systemID] + } pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { msg_send![self, insertChild: child, atIndex: index] } @@ -98,16 +110,4 @@ impl NSXMLDTD { ) -> Option> { msg_send_id![Self::class(), predefinedEntityDeclarationForName: name] } - pub unsafe fn publicID(&self) -> Option> { - msg_send_id![self, publicID] - } - pub unsafe fn setPublicID(&self, publicID: Option<&NSString>) { - msg_send![self, setPublicID: publicID] - } - pub unsafe fn systemID(&self) -> Option> { - msg_send_id![self, systemID] - } - pub unsafe fn setSystemID(&self, systemID: Option<&NSString>) { - msg_send![self, setSystemID: systemID] - } } diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index c15d3bd0f..b0a8031ac 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -53,6 +53,42 @@ impl NSXMLDocument { pub unsafe fn replacementClassForClass(cls: &Class) -> &Class { msg_send![Self::class(), replacementClassForClass: cls] } + pub unsafe fn characterEncoding(&self) -> Option> { + msg_send_id![self, characterEncoding] + } + pub unsafe fn setCharacterEncoding(&self, characterEncoding: Option<&NSString>) { + msg_send![self, setCharacterEncoding: characterEncoding] + } + pub unsafe fn version(&self) -> Option> { + msg_send_id![self, version] + } + pub unsafe fn setVersion(&self, version: Option<&NSString>) { + msg_send![self, setVersion: version] + } + pub unsafe fn isStandalone(&self) -> bool { + msg_send![self, isStandalone] + } + pub unsafe fn setStandalone(&self, standalone: bool) { + msg_send![self, setStandalone: standalone] + } + pub unsafe fn documentContentKind(&self) -> NSXMLDocumentContentKind { + msg_send![self, documentContentKind] + } + pub unsafe fn setDocumentContentKind(&self, documentContentKind: NSXMLDocumentContentKind) { + msg_send![self, setDocumentContentKind: documentContentKind] + } + pub unsafe fn MIMEType(&self) -> Option> { + msg_send_id![self, MIMEType] + } + pub unsafe fn setMIMEType(&self, MIMEType: Option<&NSString>) { + msg_send![self, setMIMEType: MIMEType] + } + pub unsafe fn DTD(&self) -> Option> { + msg_send_id![self, DTD] + } + pub unsafe fn setDTD(&self, DTD: Option<&NSXMLDTD>) { + msg_send![self, setDTD: DTD] + } pub unsafe fn setRootElement(&self, root: &NSXMLElement) { msg_send![self, setRootElement: root] } @@ -77,6 +113,9 @@ impl NSXMLDocument { pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { msg_send![self, replaceChildAtIndex: index, withNode: node] } + pub unsafe fn XMLData(&self) -> Id { + msg_send_id![self, XMLData] + } pub unsafe fn XMLDataWithOptions(&self, options: NSXMLNodeOptions) -> Id { msg_send_id![self, XMLDataWithOptions: options] } @@ -122,43 +161,4 @@ impl NSXMLDocument { pub unsafe fn validateAndReturnError(&self, error: *mut *mut NSError) -> bool { msg_send![self, validateAndReturnError: error] } - pub unsafe fn characterEncoding(&self) -> Option> { - msg_send_id![self, characterEncoding] - } - pub unsafe fn setCharacterEncoding(&self, characterEncoding: Option<&NSString>) { - msg_send![self, setCharacterEncoding: characterEncoding] - } - pub unsafe fn version(&self) -> Option> { - msg_send_id![self, version] - } - pub unsafe fn setVersion(&self, version: Option<&NSString>) { - msg_send![self, setVersion: version] - } - pub unsafe fn isStandalone(&self) -> bool { - msg_send![self, isStandalone] - } - pub unsafe fn setStandalone(&self, standalone: bool) { - msg_send![self, setStandalone: standalone] - } - pub unsafe fn documentContentKind(&self) -> NSXMLDocumentContentKind { - msg_send![self, documentContentKind] - } - pub unsafe fn setDocumentContentKind(&self, documentContentKind: NSXMLDocumentContentKind) { - msg_send![self, setDocumentContentKind: documentContentKind] - } - pub unsafe fn MIMEType(&self) -> Option> { - msg_send_id![self, MIMEType] - } - pub unsafe fn setMIMEType(&self, MIMEType: Option<&NSString>) { - msg_send![self, setMIMEType: MIMEType] - } - pub unsafe fn DTD(&self) -> Option> { - msg_send_id![self, DTD] - } - pub unsafe fn setDTD(&self, DTD: Option<&NSXMLDTD>) { - msg_send![self, setDTD: DTD] - } - pub unsafe fn XMLData(&self) -> Id { - msg_send_id![self, XMLData] - } } diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index 6cd99bc41..e5827131b 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -63,6 +63,12 @@ impl NSXMLElement { pub unsafe fn removeAttributeForName(&self, name: &NSString) { msg_send![self, removeAttributeForName: name] } + pub unsafe fn attributes(&self) -> Option, Shared>> { + msg_send_id![self, attributes] + } + pub unsafe fn setAttributes(&self, attributes: Option<&NSArray>) { + msg_send![self, setAttributes: attributes] + } pub unsafe fn setAttributesWithDictionary( &self, attributes: &NSDictionary, @@ -85,6 +91,12 @@ impl NSXMLElement { pub unsafe fn removeNamespaceForPrefix(&self, name: &NSString) { msg_send![self, removeNamespaceForPrefix: name] } + pub unsafe fn namespaces(&self) -> Option, Shared>> { + msg_send_id![self, namespaces] + } + pub unsafe fn setNamespaces(&self, namespaces: Option<&NSArray>) { + msg_send![self, setNamespaces: namespaces] + } pub unsafe fn namespaceForPrefix(&self, name: &NSString) -> Option> { msg_send_id![self, namespaceForPrefix: name] } @@ -118,18 +130,6 @@ impl NSXMLElement { pub unsafe fn normalizeAdjacentTextNodesPreservingCDATA(&self, preserve: bool) { msg_send![self, normalizeAdjacentTextNodesPreservingCDATA: preserve] } - pub unsafe fn attributes(&self) -> Option, Shared>> { - msg_send_id![self, attributes] - } - pub unsafe fn setAttributes(&self, attributes: Option<&NSArray>) { - msg_send![self, setAttributes: attributes] - } - pub unsafe fn namespaces(&self) -> Option, Shared>> { - msg_send_id![self, namespaces] - } - pub unsafe fn setNamespaces(&self, namespaces: Option<&NSArray>) { - msg_send![self, setNamespaces: namespaces] - } } #[doc = "NSDeprecated"] impl NSXMLElement { diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 96dcb7473..da19070a2 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -113,60 +113,6 @@ impl NSXMLNode { pub unsafe fn DTDNodeWithXMLString(string: &NSString) -> Option> { msg_send_id![Self::class(), DTDNodeWithXMLString: string] } - pub unsafe fn setStringValue_resolvingEntities(&self, string: &NSString, resolve: bool) { - msg_send![self, setStringValue: string, resolvingEntities: resolve] - } - pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option> { - msg_send_id![self, childAtIndex: index] - } - pub unsafe fn detach(&self) { - msg_send![self, detach] - } - pub unsafe fn localNameForName(name: &NSString) -> Id { - msg_send_id![Self::class(), localNameForName: name] - } - pub unsafe fn prefixForName(name: &NSString) -> Option> { - msg_send_id![Self::class(), prefixForName: name] - } - pub unsafe fn predefinedNamespaceForPrefix(name: &NSString) -> Option> { - msg_send_id![Self::class(), predefinedNamespaceForPrefix: name] - } - pub unsafe fn XMLStringWithOptions(&self, options: NSXMLNodeOptions) -> Id { - msg_send_id![self, XMLStringWithOptions: options] - } - pub unsafe fn canonicalXMLStringPreservingComments( - &self, - comments: bool, - ) -> Id { - msg_send_id![self, canonicalXMLStringPreservingComments: comments] - } - pub unsafe fn nodesForXPath_error( - &self, - xpath: &NSString, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![self, nodesForXPath: xpath, error: error] - } - pub unsafe fn objectsForXQuery_constants_error( - &self, - xquery: &NSString, - constants: Option<&NSDictionary>, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![ - self, - objectsForXQuery: xquery, - constants: constants, - error: error - ] - } - pub unsafe fn objectsForXQuery_error( - &self, - xquery: &NSString, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, objectsForXQuery: xquery, error: error] - } pub unsafe fn kind(&self) -> NSXMLNodeKind { msg_send![self, kind] } @@ -188,6 +134,9 @@ impl NSXMLNode { pub unsafe fn setStringValue(&self, stringValue: Option<&NSString>) { msg_send![self, setStringValue: stringValue] } + pub unsafe fn setStringValue_resolvingEntities(&self, string: &NSString, resolve: bool) { + msg_send![self, setStringValue: string, resolvingEntities: resolve] + } pub unsafe fn index(&self) -> NSUInteger { msg_send![self, index] } @@ -206,6 +155,9 @@ impl NSXMLNode { pub unsafe fn children(&self) -> Option, Shared>> { msg_send_id![self, children] } + pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option> { + msg_send_id![self, childAtIndex: index] + } pub unsafe fn previousSibling(&self) -> Option> { msg_send_id![self, previousSibling] } @@ -218,6 +170,9 @@ impl NSXMLNode { pub unsafe fn nextNode(&self) -> Option> { msg_send_id![self, nextNode] } + pub unsafe fn detach(&self) { + msg_send![self, detach] + } pub unsafe fn XPath(&self) -> Option> { msg_send_id![self, XPath] } @@ -233,10 +188,55 @@ impl NSXMLNode { pub unsafe fn setURI(&self, URI: Option<&NSString>) { msg_send![self, setURI: URI] } + pub unsafe fn localNameForName(name: &NSString) -> Id { + msg_send_id![Self::class(), localNameForName: name] + } + pub unsafe fn prefixForName(name: &NSString) -> Option> { + msg_send_id![Self::class(), prefixForName: name] + } + pub unsafe fn predefinedNamespaceForPrefix(name: &NSString) -> Option> { + msg_send_id![Self::class(), predefinedNamespaceForPrefix: name] + } pub unsafe fn description(&self) -> Id { msg_send_id![self, description] } pub unsafe fn XMLString(&self) -> Id { msg_send_id![self, XMLString] } + pub unsafe fn XMLStringWithOptions(&self, options: NSXMLNodeOptions) -> Id { + msg_send_id![self, XMLStringWithOptions: options] + } + pub unsafe fn canonicalXMLStringPreservingComments( + &self, + comments: bool, + ) -> Id { + msg_send_id![self, canonicalXMLStringPreservingComments: comments] + } + pub unsafe fn nodesForXPath_error( + &self, + xpath: &NSString, + error: *mut *mut NSError, + ) -> Option, Shared>> { + msg_send_id![self, nodesForXPath: xpath, error: error] + } + pub unsafe fn objectsForXQuery_constants_error( + &self, + xquery: &NSString, + constants: Option<&NSDictionary>, + error: *mut *mut NSError, + ) -> Option> { + msg_send_id![ + self, + objectsForXQuery: xquery, + constants: constants, + error: error + ] + } + pub unsafe fn objectsForXQuery_error( + &self, + xquery: &NSString, + error: *mut *mut NSError, + ) -> Option> { + msg_send_id![self, objectsForXQuery: xquery, error: error] + } } diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index c35bcae0e..d4a266fd7 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -28,12 +28,6 @@ impl NSXMLParser { pub unsafe fn initWithStream(&self, stream: &NSInputStream) -> Id { msg_send_id![self, initWithStream: stream] } - pub unsafe fn parse(&self) -> bool { - msg_send![self, parse] - } - pub unsafe fn abortParsing(&self) { - msg_send![self, abortParsing] - } pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } @@ -79,6 +73,12 @@ impl NSXMLParser { setAllowedExternalEntityURLs: allowedExternalEntityURLs ] } + pub unsafe fn parse(&self) -> bool { + msg_send![self, parse] + } + pub unsafe fn abortParsing(&self) { + msg_send![self, abortParsing] + } pub unsafe fn parserError(&self) -> Option> { msg_send_id![self, parserError] } diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 17d22aec5..74c0d92dc 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -26,6 +26,9 @@ impl NSXPCConnection { pub unsafe fn initWithServiceName(&self, serviceName: &NSString) -> Id { msg_send_id![self, initWithServiceName: serviceName] } + pub unsafe fn serviceName(&self) -> Option> { + msg_send_id![self, serviceName] + } pub unsafe fn initWithMachServiceName_options( &self, name: &NSString, @@ -39,36 +42,6 @@ impl NSXPCConnection { ) -> Id { msg_send_id![self, initWithListenerEndpoint: endpoint] } - pub unsafe fn remoteObjectProxyWithErrorHandler( - &self, - handler: TodoBlock, - ) -> Id { - msg_send_id![self, remoteObjectProxyWithErrorHandler: handler] - } - pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( - &self, - handler: TodoBlock, - ) -> Id { - msg_send_id![self, synchronousRemoteObjectProxyWithErrorHandler: handler] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn suspend(&self) { - msg_send![self, suspend] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn currentConnection() -> Option> { - msg_send_id![Self::class(), currentConnection] - } - pub unsafe fn scheduleSendBarrierBlock(&self, block: TodoBlock) { - msg_send![self, scheduleSendBarrierBlock: block] - } - pub unsafe fn serviceName(&self) -> Option> { - msg_send_id![self, serviceName] - } pub unsafe fn endpoint(&self) -> Id { msg_send_id![self, endpoint] } @@ -93,6 +66,18 @@ impl NSXPCConnection { pub unsafe fn remoteObjectProxy(&self) -> Id { msg_send_id![self, remoteObjectProxy] } + pub unsafe fn remoteObjectProxyWithErrorHandler( + &self, + handler: TodoBlock, + ) -> Id { + msg_send_id![self, remoteObjectProxyWithErrorHandler: handler] + } + pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( + &self, + handler: TodoBlock, + ) -> Id { + msg_send_id![self, synchronousRemoteObjectProxyWithErrorHandler: handler] + } pub unsafe fn interruptionHandler(&self) -> TodoBlock { msg_send![self, interruptionHandler] } @@ -105,6 +90,15 @@ impl NSXPCConnection { pub unsafe fn setInvalidationHandler(&self, invalidationHandler: TodoBlock) { msg_send![self, setInvalidationHandler: invalidationHandler] } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } + pub unsafe fn suspend(&self) { + msg_send![self, suspend] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } pub unsafe fn auditSessionIdentifier(&self) -> au_asid_t { msg_send![self, auditSessionIdentifier] } @@ -117,6 +111,12 @@ impl NSXPCConnection { pub unsafe fn effectiveGroupIdentifier(&self) -> gid_t { msg_send![self, effectiveGroupIdentifier] } + pub unsafe fn currentConnection() -> Option> { + msg_send_id![Self::class(), currentConnection] + } + pub unsafe fn scheduleSendBarrierBlock(&self, block: TodoBlock) { + msg_send![self, scheduleSendBarrierBlock: block] + } } extern_class!( #[derive(Debug)] @@ -135,15 +135,6 @@ impl NSXPCListener { pub unsafe fn initWithMachServiceName(&self, name: &NSString) -> Id { msg_send_id![self, initWithMachServiceName: name] } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn suspend(&self) { - msg_send![self, suspend] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } pub unsafe fn delegate(&self) -> Option> { msg_send_id![self, delegate] } @@ -153,6 +144,15 @@ impl NSXPCListener { pub unsafe fn endpoint(&self) -> Id { msg_send_id![self, endpoint] } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } + pub unsafe fn suspend(&self) { + msg_send![self, suspend] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } } pub type NSXPCListenerDelegate = NSObject; extern_class!( @@ -166,6 +166,12 @@ impl NSXPCInterface { pub unsafe fn interfaceWithProtocol(protocol: &Protocol) -> Id { msg_send_id![Self::class(), interfaceWithProtocol: protocol] } + pub unsafe fn protocol(&self) -> Id { + msg_send_id![self, protocol] + } + pub unsafe fn setProtocol(&self, protocol: &Protocol) { + msg_send![self, setProtocol: protocol] + } pub unsafe fn setClasses_forSelector_argumentIndex_ofReply( &self, classes: &NSSet, @@ -250,12 +256,6 @@ impl NSXPCInterface { ofReply: ofReply ] } - pub unsafe fn protocol(&self) -> Id { - msg_send_id![self, protocol] - } - pub unsafe fn setProtocol(&self, protocol: &Protocol) { - msg_send![self, setProtocol: protocol] - } } extern_class!( #[derive(Debug)] From f05e4cb5f0cb61adf51035bdb0f3175642067f60 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 8 Oct 2022 03:04:21 +0200 Subject: [PATCH 060/131] Add support for functions taking NSError as an out parameter Assuming we do https://github.com/madsmtm/objc2/pull/276 --- crates/header-translator/src/method.rs | 36 ++++- crates/header-translator/src/rust_type.rs | 66 ++++++++ crates/icrate/src/Foundation.toml | 6 + .../Foundation/NSAppleEventDescriptor.rs | 5 +- .../src/generated/Foundation/NSArray.rs | 14 +- .../Foundation/NSAttributedString.rs | 15 +- .../src/generated/Foundation/NSBundle.rs | 8 +- .../src/generated/Foundation/NSCoder.rs | 20 +-- .../icrate/src/generated/Foundation/NSData.rs | 64 +++----- .../generated/Foundation/NSDateFormatter.rs | 5 +- .../src/generated/Foundation/NSDictionary.rs | 18 +-- .../src/generated/Foundation/NSFileHandle.rs | 63 ++++---- .../src/generated/Foundation/NSFileManager.rs | 141 ++++++++---------- .../src/generated/Foundation/NSFileVersion.rs | 23 +-- .../src/generated/Foundation/NSFileWrapper.rs | 15 +- .../Foundation/NSJSONSerialization.rs | 29 +--- .../generated/Foundation/NSKeyValueCoding.rs | 10 +- .../generated/Foundation/NSKeyedArchiver.rs | 45 +++--- .../src/generated/Foundation/NSMorphology.rs | 5 +- .../generated/Foundation/NSNumberFormatter.rs | 5 +- .../generated/Foundation/NSPropertyList.rs | 31 +--- .../Foundation/NSRegularExpression.rs | 25 +--- .../src/generated/Foundation/NSString.rs | 60 +++----- .../icrate/src/generated/Foundation/NSTask.rs | 4 +- .../icrate/src/generated/Foundation/NSURL.rs | 69 ++++----- .../generated/Foundation/NSURLConnection.rs | 5 +- .../generated/Foundation/NSUserScriptTask.rs | 5 +- .../src/generated/Foundation/NSXMLDTD.rs | 15 +- .../src/generated/Foundation/NSXMLDocument.rs | 39 ++--- .../src/generated/Foundation/NSXMLElement.rs | 5 +- .../src/generated/Foundation/NSXMLNode.rs | 15 +- 31 files changed, 381 insertions(+), 485 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 7b29271bf..d8b1078e6 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -309,15 +309,28 @@ impl ToTokens for Method { fn to_tokens(&self, tokens: &mut TokenStream) { let fn_name = format_ident!("{}", handle_reserved(&self.fn_name)); - let arguments: Vec<_> = self + let mut arguments: Vec<_> = self .arguments .iter() .map(|(param, _qualifier, ty)| (format_ident!("{}", handle_reserved(param)), ty)) .collect(); - let fn_args = arguments + let is_error = + if self.selector.ends_with("error:") || self.selector.ends_with("AndReturnError:") { + let (_, ty) = arguments.last().expect("arguments last"); + ty.is_error_out() + } else { + false + }; + + if is_error { + arguments.pop(); + } + + let fn_args: Vec<_> = arguments .iter() - .map(|(param, arg_ty)| quote!(#param: #arg_ty)); + .map(|(param, arg_ty)| quote!(#param: #arg_ty)) + .collect(); let method_call = if self.selector.contains(':') { let split_selector: Vec<_> = self @@ -325,18 +338,22 @@ impl ToTokens for Method { .split(':') .filter(|sel| !sel.is_empty()) .collect(); + assert!( - arguments.len() == split_selector.len(), + arguments.len() + (is_error as usize) == split_selector.len(), "incorrect method argument length", ); let iter = arguments - .iter() + .into_iter() + .map(|(param, _)| param) + .chain(is_error.then(|| format_ident!("_"))) .zip(split_selector) - .map(|((param, _), sel)| { + .map(|(param, sel)| { let sel = format_ident!("{}", sel); quote!(#sel: #param) }); + quote!(#(#iter),*) } else { assert_eq!(arguments.len(), 0, "too many arguments"); @@ -344,7 +361,12 @@ impl ToTokens for Method { quote!(#sel) }; - let ret = &self.result_type; + let ret = if is_error { + self.result_type.as_error() + } else { + let ret = &self.result_type; + quote!(#ret) + }; let macro_name = if self.result_type.is_id() { format_ident!("msg_send_id") diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 82f30e44d..7d8d8a7bb 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -295,6 +295,53 @@ pub enum RustType { } impl RustType { + pub fn is_error_out(&self) -> bool { + if let Self::Pointer { + nullability, + is_const, + pointee, + } = self + { + assert_eq!( + *nullability, + Nullability::Nullable, + "invalid error nullability {self:?}" + ); + assert!(!is_const, "expected error not const {self:?}"); + if let Self::Id { + type_, + is_const, + lifetime, + nullability, + } = &**pointee + { + if type_.name != "NSError" { + return false; + } + assert!( + type_.generics.is_empty(), + "expected error generics to be empty {self:?}" + ); + assert_eq!( + *nullability, + Nullability::Nullable, + "invalid inner error nullability {self:?}" + ); + assert!(!is_const, "expected inner error not const {self:?}"); + assert_eq!( + *lifetime, + Lifetime::Unspecified, + "invalid error lifetime {self:?}" + ); + true + } else { + panic!("invalid error parameter {self:?}") + } + } else { + false + } + } + fn parse(ty: Type<'_>, is_consumed: bool, mut nullability: Nullability) -> Self { use TypeKind::*; @@ -650,6 +697,25 @@ impl RustTypeReturn { pub fn parse(ty: Type<'_>) -> Self { Self::new(RustType::parse(ty, false, Nullability::Unspecified)) } + + pub fn as_error(&self) -> TokenStream { + match &self.inner { + RustType::Id { + type_, + lifetime: Lifetime::Unspecified, + is_const: false, + nullability: Nullability::Nullable, + } => { + // NULL -> error + quote!(-> Result, Id>) + } + RustType::ObjcBool => { + // NO -> error + quote!(-> Result<(), Id>) + } + _ => panic!("unknown error result type {self:?}"), + } + } } impl ToTokens for RustTypeReturn { diff --git a/crates/icrate/src/Foundation.toml b/crates/icrate/src/Foundation.toml index f0655624a..0294540a7 100644 --- a/crates/icrate/src/Foundation.toml +++ b/crates/icrate/src/Foundation.toml @@ -41,3 +41,9 @@ getInputStream_outputStream = { skipped = true } [class.NSPropertyListSerialization.methods] dataFromPropertyList_format_errorDescription = { skipped = true } propertyListFromData_mutabilityOption_format_errorDescription = { skipped = true } + +# Has `error:` parameter, but returns NSInteger (where 0 means error) +[class.NSJSONSerialization.methods.writeJSONObject_toStream_options_error] +skipped = true +[class.NSPropertyListSerialization.methods.writePropertyList_toStream_format_options_error] +skipped = true diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 599ecbc36..d5c41eb96 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -239,13 +239,12 @@ impl NSAppleEventDescriptor { &self, sendOptions: NSAppleEventSendOptions, timeoutInSeconds: NSTimeInterval, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, sendEventWithOptions: sendOptions, timeout: timeoutInSeconds, - error: error + error: _ ] } pub unsafe fn isRecordDescriptor(&self) -> bool { diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 735eabf4d..da155e0f4 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -148,8 +148,8 @@ impl NSArray { pub unsafe fn subarrayWithRange(&self, range: NSRange) -> Id, Shared> { msg_send_id![self, subarrayWithRange: range] } - pub unsafe fn writeToURL_error(&self, url: &NSURL, error: *mut *mut NSError) -> bool { - msg_send![self, writeToURL: url, error: error] + pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id> { + msg_send![self, writeToURL: url, error: _] } pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { msg_send![self, makeObjectsPerformSelector: aSelector] @@ -303,15 +303,13 @@ impl NSArray { pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfURL: url, error: error] + ) -> Result, Shared>, Id> { + msg_send_id![self, initWithContentsOfURL: url, error: _] } pub unsafe fn arrayWithContentsOfURL_error( url: &NSURL, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![Self::class(), arrayWithContentsOfURL: url, error: error] + ) -> Result, Shared>, Id> { + msg_send_id![Self::class(), arrayWithContentsOfURL: url, error: _] } } #[doc = "NSArrayDiffing"] diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index e67a95064..4e1652722 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -249,14 +249,13 @@ impl NSAttributedString { markdownFile: &NSURL, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, initWithContentsOfMarkdownFileAtURL: markdownFile, options: options, baseURL: baseURL, - error: error + error: _ ] } pub unsafe fn initWithMarkdown_options_baseURL_error( @@ -264,14 +263,13 @@ impl NSAttributedString { markdown: &NSData, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, initWithMarkdown: markdown, options: options, baseURL: baseURL, - error: error + error: _ ] } pub unsafe fn initWithMarkdownString_options_baseURL_error( @@ -279,14 +277,13 @@ impl NSAttributedString { markdownString: &NSString, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, initWithMarkdownString: markdownString, options: options, baseURL: baseURL, - error: error + error: _ ] } } diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index bd2077917..b31ed17d0 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -59,11 +59,11 @@ impl NSBundle { pub unsafe fn unload(&self) -> bool { msg_send![self, unload] } - pub unsafe fn preflightAndReturnError(&self, error: *mut *mut NSError) -> bool { - msg_send![self, preflightAndReturnError: error] + pub unsafe fn preflightAndReturnError(&self) -> Result<(), Id> { + msg_send![self, preflightAndReturnError: _] } - pub unsafe fn loadAndReturnError(&self, error: *mut *mut NSError) -> bool { - msg_send![self, loadAndReturnError: error] + pub unsafe fn loadAndReturnError(&self) -> Result<(), Id> { + msg_send![self, loadAndReturnError: _] } pub unsafe fn bundleURL(&self) -> Id { msg_send_id![self, bundleURL] diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 04b058757..2414daa76 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -68,9 +68,8 @@ impl NSCoder { } pub unsafe fn decodeTopLevelObjectAndReturnError( &self, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, decodeTopLevelObjectAndReturnError: error] + ) -> Result, Id> { + msg_send_id![self, decodeTopLevelObjectAndReturnError: _] } pub unsafe fn decodeArrayOfObjCType_count_at( &self, @@ -150,9 +149,8 @@ impl NSCoder { pub unsafe fn decodeTopLevelObjectForKey_error( &self, key: &NSString, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, decodeTopLevelObjectForKey: key, error: error] + ) -> Result, Id> { + msg_send_id![self, decodeTopLevelObjectForKey: key, error: _] } pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool { msg_send![self, decodeBoolForKey: key] @@ -199,13 +197,12 @@ impl NSCoder { &self, aClass: &Class, key: &NSString, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, decodeTopLevelObjectOfClass: aClass, forKey: key, - error: error + error: _ ] } pub unsafe fn decodeArrayOfObjectsOfClass_forKey( @@ -239,13 +236,12 @@ impl NSCoder { &self, classes: Option<&NSSet>, key: &NSString, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, decodeTopLevelObjectOfClasses: classes, forKey: key, - error: error + error: _ ] } pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 718f218b1..64b7146f6 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -49,27 +49,15 @@ impl NSData { &self, path: &NSString, writeOptionsMask: NSDataWritingOptions, - errorPtr: *mut *mut NSError, - ) -> bool { - msg_send![ - self, - writeToFile: path, - options: writeOptionsMask, - error: errorPtr - ] + ) -> Result<(), Id> { + msg_send![self, writeToFile: path, options: writeOptionsMask, error: _] } pub unsafe fn writeToURL_options_error( &self, url: &NSURL, writeOptionsMask: NSDataWritingOptions, - errorPtr: *mut *mut NSError, - ) -> bool { - msg_send![ - self, - writeToURL: url, - options: writeOptionsMask, - error: errorPtr - ] + ) -> Result<(), Id> { + msg_send![self, writeToURL: url, options: writeOptionsMask, error: _] } pub unsafe fn rangeOfData_options_range( &self, @@ -117,25 +105,23 @@ impl NSData { pub unsafe fn dataWithContentsOfFile_options_error( path: &NSString, readOptionsMask: NSDataReadingOptions, - errorPtr: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), dataWithContentsOfFile: path, options: readOptionsMask, - error: errorPtr + error: _ ] } pub unsafe fn dataWithContentsOfURL_options_error( url: &NSURL, readOptionsMask: NSDataReadingOptions, - errorPtr: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), dataWithContentsOfURL: url, options: readOptionsMask, - error: errorPtr + error: _ ] } pub unsafe fn dataWithContentsOfFile(path: &NSString) -> Option> { @@ -188,26 +174,24 @@ impl NSData { &self, path: &NSString, readOptionsMask: NSDataReadingOptions, - errorPtr: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, initWithContentsOfFile: path, options: readOptionsMask, - error: errorPtr + error: _ ] } pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, readOptionsMask: NSDataReadingOptions, - errorPtr: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, initWithContentsOfURL: url, options: readOptionsMask, - error: errorPtr + error: _ ] } pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option> { @@ -265,20 +249,14 @@ impl NSData { pub unsafe fn decompressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![ - self, - decompressedDataUsingAlgorithm: algorithm, - error: error - ] + ) -> Result, Id> { + msg_send_id![self, decompressedDataUsingAlgorithm: algorithm, error: _] } pub unsafe fn compressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, compressedDataUsingAlgorithm: algorithm, error: error] + ) -> Result, Id> { + msg_send_id![self, compressedDataUsingAlgorithm: algorithm, error: _] } } #[doc = "NSDeprecated"] @@ -377,16 +355,14 @@ impl NSMutableData { pub unsafe fn decompressUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, decompressUsingAlgorithm: algorithm, error: error] + ) -> Result<(), Id> { + msg_send![self, decompressUsingAlgorithm: algorithm, error: _] } pub unsafe fn compressUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, compressUsingAlgorithm: algorithm, error: error] + ) -> Result<(), Id> { + msg_send![self, compressUsingAlgorithm: algorithm, error: _] } } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index e9dcd974e..3e75b866d 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -31,14 +31,13 @@ impl NSDateFormatter { obj: Option<&mut Option>>, string: &NSString, rangep: *mut NSRange, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, getObjectValue: obj, forString: string, range: rangep, - error: error + error: _ ] } pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id { diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index f64878140..e2c4ce39b 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -83,8 +83,8 @@ impl NSDictionary { ) -> Id, Shared> { msg_send_id![self, objectsForKeys: keys, notFoundMarker: marker] } - pub unsafe fn writeToURL_error(&self, url: &NSURL, error: *mut *mut NSError) -> bool { - msg_send![self, writeToURL: url, error: error] + pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id> { + msg_send![self, writeToURL: url, error: _] } pub unsafe fn keysSortedByValueUsingSelector( &self, @@ -239,19 +239,13 @@ impl NSDictionary { pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfURL: url, error: error] + ) -> Result, Shared>, Id> { + msg_send_id![self, initWithContentsOfURL: url, error: _] } pub unsafe fn dictionaryWithContentsOfURL_error( url: &NSURL, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![ - Self::class(), - dictionaryWithContentsOfURL: url, - error: error - ] + ) -> Result, Shared>, Id> { + msg_send_id![Self::class(), dictionaryWithContentsOfURL: url, error: _] } } __inner_extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 8ae64fa58..d762ac320 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -34,49 +34,47 @@ impl NSFileHandle { } pub unsafe fn readDataToEndOfFileAndReturnError( &self, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, readDataToEndOfFileAndReturnError: error] + ) -> Result, Id> { + msg_send_id![self, readDataToEndOfFileAndReturnError: _] } pub unsafe fn readDataUpToLength_error( &self, length: NSUInteger, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, readDataUpToLength: length, error: error] + ) -> Result, Id> { + msg_send_id![self, readDataUpToLength: length, error: _] } - pub unsafe fn writeData_error(&self, data: &NSData, error: *mut *mut NSError) -> bool { - msg_send![self, writeData: data, error: error] + pub unsafe fn writeData_error(&self, data: &NSData) -> Result<(), Id> { + msg_send![self, writeData: data, error: _] } pub unsafe fn getOffset_error( &self, offsetInFile: NonNull, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, getOffset: offsetInFile, error: error] + ) -> Result<(), Id> { + msg_send![self, getOffset: offsetInFile, error: _] } pub unsafe fn seekToEndReturningOffset_error( &self, offsetInFile: *mut c_ulonglong, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, seekToEndReturningOffset: offsetInFile, error: error] + ) -> Result<(), Id> { + msg_send![self, seekToEndReturningOffset: offsetInFile, error: _] } - pub unsafe fn seekToOffset_error(&self, offset: c_ulonglong, error: *mut *mut NSError) -> bool { - msg_send![self, seekToOffset: offset, error: error] + pub unsafe fn seekToOffset_error( + &self, + offset: c_ulonglong, + ) -> Result<(), Id> { + msg_send![self, seekToOffset: offset, error: _] } pub unsafe fn truncateAtOffset_error( &self, offset: c_ulonglong, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, truncateAtOffset: offset, error: error] + ) -> Result<(), Id> { + msg_send![self, truncateAtOffset: offset, error: _] } - pub unsafe fn synchronizeAndReturnError(&self, error: *mut *mut NSError) -> bool { - msg_send![self, synchronizeAndReturnError: error] + pub unsafe fn synchronizeAndReturnError(&self) -> Result<(), Id> { + msg_send![self, synchronizeAndReturnError: _] } - pub unsafe fn closeAndReturnError(&self, error: *mut *mut NSError) -> bool { - msg_send![self, closeAndReturnError: error] + pub unsafe fn closeAndReturnError(&self) -> Result<(), Id> { + msg_send![self, closeAndReturnError: _] } } #[doc = "NSFileHandleCreation"] @@ -104,25 +102,18 @@ impl NSFileHandle { } pub unsafe fn fileHandleForReadingFromURL_error( url: &NSURL, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![ - Self::class(), - fileHandleForReadingFromURL: url, - error: error - ] + ) -> Result, Id> { + msg_send_id![Self::class(), fileHandleForReadingFromURL: url, error: _] } pub unsafe fn fileHandleForWritingToURL_error( url: &NSURL, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![Self::class(), fileHandleForWritingToURL: url, error: error] + ) -> Result, Id> { + msg_send_id![Self::class(), fileHandleForWritingToURL: url, error: _] } pub unsafe fn fileHandleForUpdatingURL_error( url: &NSURL, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![Self::class(), fileHandleForUpdatingURL: url, error: error] + ) -> Result, Id> { + msg_send_id![Self::class(), fileHandleForUpdatingURL: url, error: _] } } #[doc = "NSFileHandleAsynchronousAccess"] diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index d90d99b3e..dfba5883c 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -62,14 +62,13 @@ impl NSFileManager { url: &NSURL, keys: Option<&NSArray>, mask: NSDirectoryEnumerationOptions, - error: *mut *mut NSError, - ) -> Option, Shared>> { + ) -> Result, Shared>, Id> { msg_send_id![ self, contentsOfDirectoryAtURL: url, includingPropertiesForKeys: keys, options: mask, - error: error + error: _ ] } pub unsafe fn URLsForDirectory_inDomains( @@ -85,15 +84,14 @@ impl NSFileManager { domain: NSSearchPathDomainMask, url: Option<&NSURL>, shouldCreate: bool, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, URLForDirectory: directory, inDomain: domain, appropriateForURL: url, create: shouldCreate, - error: error + error: _ ] } pub unsafe fn getRelationship_ofDirectoryAtURL_toItemAtURL_error( @@ -101,14 +99,13 @@ impl NSFileManager { outRelationship: NonNull, directoryURL: &NSURL, otherURL: &NSURL, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, getRelationship: outRelationship, ofDirectoryAtURL: directoryURL, toItemAtURL: otherURL, - error: error + error: _ ] } pub unsafe fn getRelationship_ofDirectory_inDomain_toItemAtURL_error( @@ -117,15 +114,14 @@ impl NSFileManager { directory: NSSearchPathDirectory, domainMask: NSSearchPathDomainMask, url: &NSURL, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, getRelationship: outRelationship, ofDirectory: directory, inDomain: domainMask, toItemAtURL: url, - error: error + error: _ ] } pub unsafe fn createDirectoryAtURL_withIntermediateDirectories_attributes_error( @@ -133,27 +129,25 @@ impl NSFileManager { url: &NSURL, createIntermediates: bool, attributes: Option<&NSDictionary>, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, createDirectoryAtURL: url, withIntermediateDirectories: createIntermediates, attributes: attributes, - error: error + error: _ ] } pub unsafe fn createSymbolicLinkAtURL_withDestinationURL_error( &self, url: &NSURL, destURL: &NSURL, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, createSymbolicLinkAtURL: url, withDestinationURL: destURL, - error: error + error: _ ] } pub unsafe fn delegate(&self) -> Option> { @@ -166,13 +160,12 @@ impl NSFileManager { &self, attributes: &NSDictionary, path: &NSString, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, setAttributes: attributes, ofItemAtPath: path, - error: error + error: _ ] } pub unsafe fn createDirectoryAtPath_withIntermediateDirectories_attributes_error( @@ -180,129 +173,118 @@ impl NSFileManager { path: &NSString, createIntermediates: bool, attributes: Option<&NSDictionary>, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, createDirectoryAtPath: path, withIntermediateDirectories: createIntermediates, attributes: attributes, - error: error + error: _ ] } pub unsafe fn contentsOfDirectoryAtPath_error( &self, path: &NSString, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![self, contentsOfDirectoryAtPath: path, error: error] + ) -> Result, Shared>, Id> { + msg_send_id![self, contentsOfDirectoryAtPath: path, error: _] } pub unsafe fn subpathsOfDirectoryAtPath_error( &self, path: &NSString, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![self, subpathsOfDirectoryAtPath: path, error: error] + ) -> Result, Shared>, Id> { + msg_send_id![self, subpathsOfDirectoryAtPath: path, error: _] } pub unsafe fn attributesOfItemAtPath_error( &self, path: &NSString, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![self, attributesOfItemAtPath: path, error: error] + ) -> Result, Shared>, Id> { + msg_send_id![self, attributesOfItemAtPath: path, error: _] } pub unsafe fn attributesOfFileSystemForPath_error( &self, path: &NSString, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![self, attributesOfFileSystemForPath: path, error: error] + ) -> Result, Shared>, Id> { + msg_send_id![self, attributesOfFileSystemForPath: path, error: _] } pub unsafe fn createSymbolicLinkAtPath_withDestinationPath_error( &self, path: &NSString, destPath: &NSString, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, createSymbolicLinkAtPath: path, withDestinationPath: destPath, - error: error + error: _ ] } pub unsafe fn destinationOfSymbolicLinkAtPath_error( &self, path: &NSString, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, destinationOfSymbolicLinkAtPath: path, error: error] + ) -> Result, Id> { + msg_send_id![self, destinationOfSymbolicLinkAtPath: path, error: _] } pub unsafe fn copyItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, copyItemAtPath: srcPath, toPath: dstPath, error: error] + ) -> Result<(), Id> { + msg_send![self, copyItemAtPath: srcPath, toPath: dstPath, error: _] } pub unsafe fn moveItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, moveItemAtPath: srcPath, toPath: dstPath, error: error] + ) -> Result<(), Id> { + msg_send![self, moveItemAtPath: srcPath, toPath: dstPath, error: _] } pub unsafe fn linkItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, linkItemAtPath: srcPath, toPath: dstPath, error: error] + ) -> Result<(), Id> { + msg_send![self, linkItemAtPath: srcPath, toPath: dstPath, error: _] } - pub unsafe fn removeItemAtPath_error(&self, path: &NSString, error: *mut *mut NSError) -> bool { - msg_send![self, removeItemAtPath: path, error: error] + pub unsafe fn removeItemAtPath_error( + &self, + path: &NSString, + ) -> Result<(), Id> { + msg_send![self, removeItemAtPath: path, error: _] } pub unsafe fn copyItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, copyItemAtURL: srcURL, toURL: dstURL, error: error] + ) -> Result<(), Id> { + msg_send![self, copyItemAtURL: srcURL, toURL: dstURL, error: _] } pub unsafe fn moveItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, moveItemAtURL: srcURL, toURL: dstURL, error: error] + ) -> Result<(), Id> { + msg_send![self, moveItemAtURL: srcURL, toURL: dstURL, error: _] } pub unsafe fn linkItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, linkItemAtURL: srcURL, toURL: dstURL, error: error] + ) -> Result<(), Id> { + msg_send![self, linkItemAtURL: srcURL, toURL: dstURL, error: _] } - pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL, error: *mut *mut NSError) -> bool { - msg_send![self, removeItemAtURL: URL, error: error] + pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL) -> Result<(), Id> { + msg_send![self, removeItemAtURL: URL, error: _] } pub unsafe fn trashItemAtURL_resultingItemURL_error( &self, url: &NSURL, outResultingURL: Option<&mut Option>>, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, trashItemAtURL: url, resultingItemURL: outResultingURL, - error: error + error: _ ] } pub unsafe fn fileAttributesAtPath_traverseLink( @@ -476,8 +458,7 @@ impl NSFileManager { backupItemName: Option<&NSString>, options: NSFileManagerItemReplacementOptions, resultingURL: Option<&mut Option>>, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, replaceItemAtURL: originalItemURL, @@ -485,7 +466,7 @@ impl NSFileManager { backupItemName: backupItemName, options: options, resultingItemURL: resultingURL, - error: error + error: _ ] } pub unsafe fn setUbiquitous_itemAtURL_destinationURL_error( @@ -493,14 +474,13 @@ impl NSFileManager { flag: bool, url: &NSURL, destinationURL: &NSURL, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, setUbiquitous: flag, itemAtURL: url, destinationURL: destinationURL, - error: error + error: _ ] } pub unsafe fn isUbiquitousItemAtURL(&self, url: &NSURL) -> bool { @@ -509,16 +489,14 @@ impl NSFileManager { pub unsafe fn startDownloadingUbiquitousItemAtURL_error( &self, url: &NSURL, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, startDownloadingUbiquitousItemAtURL: url, error: error] + ) -> Result<(), Id> { + msg_send![self, startDownloadingUbiquitousItemAtURL: url, error: _] } pub unsafe fn evictUbiquitousItemAtURL_error( &self, url: &NSURL, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, evictUbiquitousItemAtURL: url, error: error] + ) -> Result<(), Id> { + msg_send![self, evictUbiquitousItemAtURL: url, error: _] } pub unsafe fn URLForUbiquityContainerIdentifier( &self, @@ -530,13 +508,12 @@ impl NSFileManager { &self, url: &NSURL, outDate: Option<&mut Option>>, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, URLForPublishingUbiquitousItemAtURL: url, expirationDate: outDate, - error: error + error: _ ] } pub unsafe fn ubiquityIdentityToken(&self) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index ca566e8ef..e9227efd4 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -55,14 +55,13 @@ impl NSFileVersion { url: &NSURL, contentsURL: &NSURL, options: NSFileVersionAddingOptions, - outError: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), addVersionOfItemAtURL: url, withContentsOfURL: contentsURL, options: options, - error: outError + error: _ ] } pub unsafe fn temporaryDirectoryURLForNewVersionOfItemAtURL(url: &NSURL) -> Id { @@ -114,21 +113,15 @@ impl NSFileVersion { &self, url: &NSURL, options: NSFileVersionReplacingOptions, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, replaceItemAtURL: url, options: options, error: error] + ) -> Result, Id> { + msg_send_id![self, replaceItemAtURL: url, options: options, error: _] } - pub unsafe fn removeAndReturnError(&self, outError: *mut *mut NSError) -> bool { - msg_send![self, removeAndReturnError: outError] + pub unsafe fn removeAndReturnError(&self) -> Result<(), Id> { + msg_send![self, removeAndReturnError: _] } pub unsafe fn removeOtherVersionsOfItemAtURL_error( url: &NSURL, - outError: *mut *mut NSError, - ) -> bool { - msg_send![ - Self::class(), - removeOtherVersionsOfItemAtURL: url, - error: outError - ] + ) -> Result<(), Id> { + msg_send![Self::class(), removeOtherVersionsOfItemAtURL: url, error: _] } } diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index e87325dc6..3df66f710 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -20,9 +20,8 @@ impl NSFileWrapper { &self, url: &NSURL, options: NSFileWrapperReadingOptions, - outError: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, initWithURL: url, options: options, error: outError] + ) -> Result, Id> { + msg_send_id![self, initWithURL: url, options: options, error: _] } pub unsafe fn initDirectoryWithFileWrappers( &self, @@ -82,23 +81,21 @@ impl NSFileWrapper { &self, url: &NSURL, options: NSFileWrapperReadingOptions, - outError: *mut *mut NSError, - ) -> bool { - msg_send![self, readFromURL: url, options: options, error: outError] + ) -> Result<(), Id> { + msg_send![self, readFromURL: url, options: options, error: _] } pub unsafe fn writeToURL_options_originalContentsURL_error( &self, url: &NSURL, options: NSFileWrapperWritingOptions, originalContentsURL: Option<&NSURL>, - outError: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, writeToURL: url, options: options, originalContentsURL: originalContentsURL, - error: outError + error: _ ] } pub unsafe fn serializedRepresentation(&self) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 9b45ec133..6ed79c4a9 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -21,51 +21,34 @@ impl NSJSONSerialization { pub unsafe fn dataWithJSONObject_options_error( obj: &Object, opt: NSJSONWritingOptions, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), dataWithJSONObject: obj, options: opt, - error: error + error: _ ] } pub unsafe fn JSONObjectWithData_options_error( data: &NSData, opt: NSJSONReadingOptions, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), JSONObjectWithData: data, options: opt, - error: error - ] - } - pub unsafe fn writeJSONObject_toStream_options_error( - obj: &Object, - stream: &NSOutputStream, - opt: NSJSONWritingOptions, - error: *mut *mut NSError, - ) -> NSInteger { - msg_send![ - Self::class(), - writeJSONObject: obj, - toStream: stream, - options: opt, - error: error + error: _ ] } pub unsafe fn JSONObjectWithStream_options_error( stream: &NSInputStream, opt: NSJSONReadingOptions, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), JSONObjectWithStream: stream, options: opt, - error: error + error: _ ] } } diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index aec1db378..dd1b694ce 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -25,9 +25,8 @@ impl NSObject { &self, ioValue: &mut Option>, inKey: &NSString, - outError: *mut *mut NSError, - ) -> bool { - msg_send![self, validateValue: ioValue, forKey: inKey, error: outError] + ) -> Result<(), Id> { + msg_send![self, validateValue: ioValue, forKey: inKey, error: _] } pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id { msg_send_id![self, mutableArrayValueForKey: key] @@ -51,13 +50,12 @@ impl NSObject { &self, ioValue: &mut Option>, inKeyPath: &NSString, - outError: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, validateValue: ioValue, forKeyPath: inKeyPath, - error: outError + error: _ ] } pub unsafe fn mutableArrayValueForKeyPath( diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 2f229af6d..42185fb39 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -24,13 +24,12 @@ impl NSKeyedArchiver { pub unsafe fn archivedDataWithRootObject_requiringSecureCoding_error( object: &Object, requiresSecureCoding: bool, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), archivedDataWithRootObject: object, requiringSecureCoding: requiresSecureCoding, - error: error + error: _ ] } pub unsafe fn init(&self) -> Id { @@ -125,84 +124,77 @@ impl NSKeyedUnarchiver { pub unsafe fn initForReadingFromData_error( &self, data: &NSData, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, initForReadingFromData: data, error: error] + ) -> Result, Id> { + msg_send_id![self, initForReadingFromData: data, error: _] } pub unsafe fn unarchivedObjectOfClass_fromData_error( cls: &Class, data: &NSData, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), unarchivedObjectOfClass: cls, fromData: data, - error: error + error: _ ] } pub unsafe fn unarchivedArrayOfObjectsOfClass_fromData_error( cls: &Class, data: &NSData, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), unarchivedArrayOfObjectsOfClass: cls, fromData: data, - error: error + error: _ ] } pub unsafe fn unarchivedDictionaryWithKeysOfClass_objectsOfClass_fromData_error( keyCls: &Class, valueCls: &Class, data: &NSData, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), unarchivedDictionaryWithKeysOfClass: keyCls, objectsOfClass: valueCls, fromData: data, - error: error + error: _ ] } pub unsafe fn unarchivedObjectOfClasses_fromData_error( classes: &NSSet, data: &NSData, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), unarchivedObjectOfClasses: classes, fromData: data, - error: error + error: _ ] } pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( classes: &NSSet, data: &NSData, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), unarchivedArrayOfObjectsOfClasses: classes, fromData: data, - error: error + error: _ ] } pub unsafe fn unarchivedDictionaryWithKeysOfClasses_objectsOfClasses_fromData_error( keyClasses: &NSSet, valueClasses: &NSSet, data: &NSData, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), unarchivedDictionaryWithKeysOfClasses: keyClasses, objectsOfClasses: valueClasses, fromData: data, - error: error + error: _ ] } pub unsafe fn init(&self) -> Id { @@ -216,12 +208,11 @@ impl NSKeyedUnarchiver { } pub unsafe fn unarchiveTopLevelObjectWithData_error( data: &NSData, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), unarchiveTopLevelObjectWithData: data, - error: error + error: _ ] } pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index 8b26ed0c9..87d8dc971 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -45,13 +45,12 @@ impl NSMorphology { &self, features: Option<&NSMorphologyCustomPronoun>, language: &NSString, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, setCustomPronoun: features, forLanguage: language, - error: error + error: _ ] } } diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index ca35042a0..97f09deb3 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -29,14 +29,13 @@ impl NSNumberFormatter { obj: Option<&mut Option>>, string: &NSString, rangep: *mut NSRange, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, getObjectValue: obj, forString: string, range: rangep, - error: error + error: _ ] } pub unsafe fn stringFromNumber(&self, number: &NSNumber) -> Option> { diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 9afbb9d78..60fda07d1 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -29,58 +29,39 @@ impl NSPropertyListSerialization { plist: &Object, format: NSPropertyListFormat, opt: NSPropertyListWriteOptions, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), dataWithPropertyList: plist, format: format, options: opt, - error: error - ] - } - pub unsafe fn writePropertyList_toStream_format_options_error( - plist: &Object, - stream: &NSOutputStream, - format: NSPropertyListFormat, - opt: NSPropertyListWriteOptions, - error: *mut *mut NSError, - ) -> NSInteger { - msg_send![ - Self::class(), - writePropertyList: plist, - toStream: stream, - format: format, - options: opt, - error: error + error: _ ] } pub unsafe fn propertyListWithData_options_format_error( data: &NSData, opt: NSPropertyListReadOptions, format: *mut NSPropertyListFormat, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), propertyListWithData: data, options: opt, format: format, - error: error + error: _ ] } pub unsafe fn propertyListWithStream_options_format_error( stream: &NSInputStream, opt: NSPropertyListReadOptions, format: *mut NSPropertyListFormat, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), propertyListWithStream: stream, options: opt, format: format, - error: error + error: _ ] } } diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 8d06baa8b..099ebb534 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -17,27 +17,20 @@ impl NSRegularExpression { pub unsafe fn regularExpressionWithPattern_options_error( pattern: &NSString, options: NSRegularExpressionOptions, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), regularExpressionWithPattern: pattern, options: options, - error: error + error: _ ] } pub unsafe fn initWithPattern_options_error( &self, pattern: &NSString, options: NSRegularExpressionOptions, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![ - self, - initWithPattern: pattern, - options: options, - error: error - ] + ) -> Result, Id> { + msg_send_id![self, initWithPattern: pattern, options: options, error: _] } pub unsafe fn pattern(&self) -> Id { msg_send_id![self, pattern] @@ -183,20 +176,18 @@ extern_class!( impl NSDataDetector { pub unsafe fn dataDetectorWithTypes_error( checkingTypes: NSTextCheckingTypes, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), dataDetectorWithTypes: checkingTypes, - error: error + error: _ ] } pub unsafe fn initWithTypes_error( &self, checkingTypes: NSTextCheckingTypes, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, initWithTypes: checkingTypes, error: error] + ) -> Result, Id> { + msg_send_id![self, initWithTypes: checkingTypes, error: _] } pub unsafe fn checkingTypes(&self) -> NSTextCheckingTypes { msg_send![self, checkingTypes] diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 446e8ef10..10fe10934 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -485,14 +485,13 @@ impl NSString { url: &NSURL, useAuxiliaryFile: bool, enc: NSStringEncoding, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, writeToURL: url, atomically: useAuxiliaryFile, encoding: enc, - error: error + error: _ ] } pub unsafe fn writeToFile_atomically_encoding_error( @@ -500,14 +499,13 @@ impl NSString { path: &NSString, useAuxiliaryFile: bool, enc: NSStringEncoding, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, writeToFile: path, atomically: useAuxiliaryFile, encoding: enc, - error: error + error: _ ] } pub unsafe fn description(&self) -> Id { @@ -665,100 +663,82 @@ impl NSString { &self, url: &NSURL, enc: NSStringEncoding, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![ - self, - initWithContentsOfURL: url, - encoding: enc, - error: error - ] + ) -> Result, Id> { + msg_send_id![self, initWithContentsOfURL: url, encoding: enc, error: _] } pub unsafe fn initWithContentsOfFile_encoding_error( &self, path: &NSString, enc: NSStringEncoding, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![ - self, - initWithContentsOfFile: path, - encoding: enc, - error: error - ] + ) -> Result, Id> { + msg_send_id![self, initWithContentsOfFile: path, encoding: enc, error: _] } pub unsafe fn stringWithContentsOfURL_encoding_error( url: &NSURL, enc: NSStringEncoding, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), stringWithContentsOfURL: url, encoding: enc, - error: error + error: _ ] } pub unsafe fn stringWithContentsOfFile_encoding_error( path: &NSString, enc: NSStringEncoding, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), stringWithContentsOfFile: path, encoding: enc, - error: error + error: _ ] } pub unsafe fn initWithContentsOfURL_usedEncoding_error( &self, url: &NSURL, enc: *mut NSStringEncoding, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, initWithContentsOfURL: url, usedEncoding: enc, - error: error + error: _ ] } pub unsafe fn initWithContentsOfFile_usedEncoding_error( &self, path: &NSString, enc: *mut NSStringEncoding, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, initWithContentsOfFile: path, usedEncoding: enc, - error: error + error: _ ] } pub unsafe fn stringWithContentsOfURL_usedEncoding_error( url: &NSURL, enc: *mut NSStringEncoding, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), stringWithContentsOfURL: url, usedEncoding: enc, - error: error + error: _ ] } pub unsafe fn stringWithContentsOfFile_usedEncoding_error( path: &NSString, enc: *mut NSStringEncoding, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), stringWithContentsOfFile: path, usedEncoding: enc, - error: error + error: _ ] } } diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index e84829129..c630555be 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -60,8 +60,8 @@ impl NSTask { pub unsafe fn setStandardError(&self, standardError: Option<&Object>) { msg_send![self, setStandardError: standardError] } - pub unsafe fn launchAndReturnError(&self, error: *mut *mut NSError) -> bool { - msg_send![self, launchAndReturnError: error] + pub unsafe fn launchAndReturnError(&self) -> Result<(), Id> { + msg_send![self, launchAndReturnError: _] } pub unsafe fn interrupt(&self) { msg_send![self, interrupt] diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index d6f584c7a..b613af899 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -250,8 +250,8 @@ impl NSURL { pub unsafe fn standardizedURL(&self) -> Option> { msg_send_id![self, standardizedURL] } - pub unsafe fn checkResourceIsReachableAndReturnError(&self, error: *mut *mut NSError) -> bool { - msg_send![self, checkResourceIsReachableAndReturnError: error] + pub unsafe fn checkResourceIsReachableAndReturnError(&self) -> Result<(), Id> { + msg_send![self, checkResourceIsReachableAndReturnError: _] } pub unsafe fn isFileReferenceURL(&self) -> bool { msg_send![self, isFileReferenceURL] @@ -266,31 +266,27 @@ impl NSURL { &self, value: &mut Option>, key: &NSURLResourceKey, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, getResourceValue: value, forKey: key, error: error] + ) -> Result<(), Id> { + msg_send![self, getResourceValue: value, forKey: key, error: _] } pub unsafe fn resourceValuesForKeys_error( &self, keys: &NSArray, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![self, resourceValuesForKeys: keys, error: error] + ) -> Result, Shared>, Id> { + msg_send_id![self, resourceValuesForKeys: keys, error: _] } pub unsafe fn setResourceValue_forKey_error( &self, value: Option<&Object>, key: &NSURLResourceKey, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, setResourceValue: value, forKey: key, error: error] + ) -> Result<(), Id> { + msg_send![self, setResourceValue: value, forKey: key, error: _] } pub unsafe fn setResourceValues_error( &self, keyedValues: &NSDictionary, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, setResourceValues: keyedValues, error: error] + ) -> Result<(), Id> { + msg_send![self, setResourceValues: keyedValues, error: _] } pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey) { msg_send![self, removeCachedResourceValueForKey: key] @@ -310,14 +306,13 @@ impl NSURL { options: NSURLBookmarkCreationOptions, keys: Option<&NSArray>, relativeURL: Option<&NSURL>, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, bookmarkDataWithOptions: options, includingResourceValuesForKeys: keys, relativeToURL: relativeURL, - error: error + error: _ ] } pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( @@ -326,15 +321,14 @@ impl NSURL { options: NSURLBookmarkResolutionOptions, relativeURL: Option<&NSURL>, isStale: *mut bool, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, initByResolvingBookmarkData: bookmarkData, options: options, relativeToURL: relativeURL, bookmarkDataIsStale: isStale, - error: error + error: _ ] } pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( @@ -342,15 +336,14 @@ impl NSURL { options: NSURLBookmarkResolutionOptions, relativeURL: Option<&NSURL>, isStale: *mut bool, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), URLByResolvingBookmarkData: bookmarkData, options: options, relativeToURL: relativeURL, bookmarkDataIsStale: isStale, - error: error + error: _ ] } pub unsafe fn resourceValuesForKeys_fromBookmarkData( @@ -367,36 +360,33 @@ impl NSURL { bookmarkData: &NSData, bookmarkFileURL: &NSURL, options: NSURLBookmarkFileCreationOptions, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ Self::class(), writeBookmarkData: bookmarkData, toURL: bookmarkFileURL, options: options, - error: error + error: _ ] } pub unsafe fn bookmarkDataWithContentsOfURL_error( bookmarkFileURL: &NSURL, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), bookmarkDataWithContentsOfURL: bookmarkFileURL, - error: error + error: _ ] } pub unsafe fn URLByResolvingAliasFileAtURL_options_error( url: &NSURL, options: NSURLBookmarkResolutionOptions, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), URLByResolvingAliasFileAtURL: url, options: options, - error: error + error: _ ] } pub unsafe fn startAccessingSecurityScopedResource(&self) -> bool { @@ -412,27 +402,24 @@ impl NSURL { &self, value: &mut Option>, key: &NSURLResourceKey, - error: *mut *mut NSError, - ) -> bool { + ) -> Result<(), Id> { msg_send![ self, getPromisedItemResourceValue: value, forKey: key, - error: error + error: _ ] } pub unsafe fn promisedItemResourceValuesForKeys_error( &self, keys: &NSArray, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![self, promisedItemResourceValuesForKeys: keys, error: error] + ) -> Result, Shared>, Id> { + msg_send_id![self, promisedItemResourceValuesForKeys: keys, error: _] } pub unsafe fn checkPromisedItemIsReachableAndReturnError( &self, - error: *mut *mut NSError, - ) -> bool { - msg_send![self, checkPromisedItemIsReachableAndReturnError: error] + ) -> Result<(), Id> { + msg_send![self, checkPromisedItemIsReachableAndReturnError: _] } } #[doc = "NSItemProvider"] diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index d3a730fa3..a54bf4e67 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -88,13 +88,12 @@ impl NSURLConnection { pub unsafe fn sendSynchronousRequest_returningResponse_error( request: &NSURLRequest, response: Option<&mut Option>>, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ Self::class(), sendSynchronousRequest: request, returningResponse: response, - error: error + error: _ ] } } diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index c0daf0dc2..92dab5fa7 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -22,9 +22,8 @@ impl NSUserScriptTask { pub unsafe fn initWithURL_error( &self, url: &NSURL, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, initWithURL: url, error: error] + ) -> Result, Id> { + msg_send_id![self, initWithURL: url, error: _] } pub unsafe fn scriptURL(&self) -> Id { msg_send_id![self, scriptURL] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index a87acc402..ae550bb1d 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -29,22 +29,15 @@ impl NSXMLDTD { &self, url: &NSURL, mask: NSXMLNodeOptions, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![ - self, - initWithContentsOfURL: url, - options: mask, - error: error - ] + ) -> Result, Id> { + msg_send_id![self, initWithContentsOfURL: url, options: mask, error: _] } pub unsafe fn initWithData_options_error( &self, data: &NSData, mask: NSXMLNodeOptions, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, initWithData: data, options: mask, error: error] + ) -> Result, Id> { + msg_send_id![self, initWithData: data, options: mask, error: _] } pub unsafe fn publicID(&self) -> Option> { msg_send_id![self, publicID] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index b0a8031ac..26cf5d315 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -22,30 +22,22 @@ impl NSXMLDocument { &self, string: &NSString, mask: NSXMLNodeOptions, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, initWithXMLString: string, options: mask, error: error] + ) -> Result, Id> { + msg_send_id![self, initWithXMLString: string, options: mask, error: _] } pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, mask: NSXMLNodeOptions, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![ - self, - initWithContentsOfURL: url, - options: mask, - error: error - ] + ) -> Result, Id> { + msg_send_id![self, initWithContentsOfURL: url, options: mask, error: _] } pub unsafe fn initWithData_options_error( &self, data: &NSData, mask: NSXMLNodeOptions, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, initWithData: data, options: mask, error: error] + ) -> Result, Id> { + msg_send_id![self, initWithData: data, options: mask, error: _] } pub unsafe fn initWithRootElement(&self, element: Option<&NSXMLElement>) -> Id { msg_send_id![self, initWithRootElement: element] @@ -123,42 +115,39 @@ impl NSXMLDocument { &self, xslt: &NSData, arguments: Option<&NSDictionary>, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, objectByApplyingXSLT: xslt, arguments: arguments, - error: error + error: _ ] } pub unsafe fn objectByApplyingXSLTString_arguments_error( &self, xslt: &NSString, arguments: Option<&NSDictionary>, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, objectByApplyingXSLTString: xslt, arguments: arguments, - error: error + error: _ ] } pub unsafe fn objectByApplyingXSLTAtURL_arguments_error( &self, xsltURL: &NSURL, argument: Option<&NSDictionary>, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, objectByApplyingXSLTAtURL: xsltURL, arguments: argument, - error: error + error: _ ] } - pub unsafe fn validateAndReturnError(&self, error: *mut *mut NSError) -> bool { - msg_send![self, validateAndReturnError: error] + pub unsafe fn validateAndReturnError(&self) -> Result<(), Id> { + msg_send![self, validateAndReturnError: _] } } diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index e5827131b..8ddaf111e 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -36,9 +36,8 @@ impl NSXMLElement { pub unsafe fn initWithXMLString_error( &self, string: &NSString, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, initWithXMLString: string, error: error] + ) -> Result, Id> { + msg_send_id![self, initWithXMLString: string, error: _] } pub unsafe fn initWithKind_options( &self, diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index da19070a2..5475acc48 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -215,28 +215,25 @@ impl NSXMLNode { pub unsafe fn nodesForXPath_error( &self, xpath: &NSString, - error: *mut *mut NSError, - ) -> Option, Shared>> { - msg_send_id![self, nodesForXPath: xpath, error: error] + ) -> Result, Shared>, Id> { + msg_send_id![self, nodesForXPath: xpath, error: _] } pub unsafe fn objectsForXQuery_constants_error( &self, xquery: &NSString, constants: Option<&NSDictionary>, - error: *mut *mut NSError, - ) -> Option> { + ) -> Result, Id> { msg_send_id![ self, objectsForXQuery: xquery, constants: constants, - error: error + error: _ ] } pub unsafe fn objectsForXQuery_error( &self, xquery: &NSString, - error: *mut *mut NSError, - ) -> Option> { - msg_send_id![self, objectsForXQuery: xquery, error: error] + ) -> Result, Id> { + msg_send_id![self, objectsForXQuery: xquery, error: _] } } From 7ae7089cbe9eb43986583fc6c92996bcd840830c Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 8 Dec 2022 11:09:44 +0100 Subject: [PATCH 061/131] Change icrate directory layout --- crates/header-translator/src/main.rs | 8 ++++++-- .../src/{AppKit.toml => AppKit/translation-config.toml} | 0 .../translation-config.toml} | 0 3 files changed, 6 insertions(+), 2 deletions(-) rename crates/icrate/src/{AppKit.toml => AppKit/translation-config.toml} (100%) rename crates/icrate/src/{Foundation.toml => Foundation/translation-config.toml} (100%) diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 9a5bf5f84..cffdd45e3 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -39,7 +39,8 @@ fn main() { let index = Index::new(&clang, true, true); - let _config = dbg!(Config::from_file(Path::new("icrate/src/AppKit.toml")).unwrap()); + let _config = + dbg!(Config::from_file(Path::new("icrate/src/AppKit/translation-config.toml")).unwrap()); let _module_path = framework_path.join("module.map"); @@ -154,7 +155,10 @@ fn main() { let output_path = Path::new("icrate/src/generated/Foundation"); - let config = dbg!(Config::from_file(Path::new("icrate/src/Foundation.toml")).unwrap()); + let config = dbg!(Config::from_file(Path::new( + "icrate/src/Foundation/translation-config.toml" + )) + .unwrap()); let mut declared: Vec<(Ident, HashSet)> = Vec::new(); diff --git a/crates/icrate/src/AppKit.toml b/crates/icrate/src/AppKit/translation-config.toml similarity index 100% rename from crates/icrate/src/AppKit.toml rename to crates/icrate/src/AppKit/translation-config.toml diff --git a/crates/icrate/src/Foundation.toml b/crates/icrate/src/Foundation/translation-config.toml similarity index 100% rename from crates/icrate/src/Foundation.toml rename to crates/icrate/src/Foundation/translation-config.toml From eb969882897ab35344062a4a3bd2e1c6c7b6123b Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 8 Oct 2022 03:58:02 +0200 Subject: [PATCH 062/131] Refactor slightly --- crates/header-translator/src/lib.rs | 83 ++++++++++++++++++---------- crates/header-translator/src/main.rs | 38 +++---------- 2 files changed, 64 insertions(+), 57 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 787814b50..5ee51736a 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -1,6 +1,7 @@ use std::collections::HashSet; +use std::io::Write; +use std::process::{Command, Stdio}; -use clang::Entity; use proc_macro2::TokenStream; use quote::quote; @@ -13,49 +14,75 @@ mod rust_type; mod stmt; pub use self::config::Config; +pub use self::stmt::Stmt; -use self::stmt::Stmt; +#[derive(Debug)] +pub struct RustFile { + declared_types: HashSet, + stmts: Vec, +} -pub fn create_rust_file( - entities: &[Entity<'_>], - config: &Config, -) -> (HashSet, TokenStream) { - let stmts: Vec<_> = entities - .iter() - .filter_map(|entity| Stmt::parse(entity, config)) - .collect(); +impl RustFile { + pub fn new() -> Self { + Self { + declared_types: HashSet::new(), + stmts: Vec::new(), + } + } - let mut declared_types = HashSet::new(); - for stmt in stmts.iter() { - match stmt { + pub fn add_stmt(&mut self, stmt: Stmt) { + match &stmt { Stmt::FileImport { .. } => {} Stmt::ItemImport { .. } => {} Stmt::ClassDecl { name, .. } => { - declared_types.insert(name.clone()); + self.declared_types.insert(name.clone()); } Stmt::CategoryDecl { .. } => {} Stmt::ProtocolDecl { name, .. } => { - declared_types.insert(name.clone()); + self.declared_types.insert(name.clone()); } Stmt::AliasDecl { name, .. } => { - declared_types.insert(name.clone()); + self.declared_types.insert(name.clone()); } } + self.stmts.push(stmt); } - let iter = stmts.iter().filter(|stmt| match stmt { - Stmt::ItemImport { name } => !declared_types.contains(name), - _ => true, - }); + pub fn finish(self) -> (HashSet, Vec) { + let iter = self.stmts.iter().filter(|stmt| match stmt { + Stmt::ItemImport { name } => !self.declared_types.contains(name), + _ => true, + }); - let tokens = quote! { - #[allow(unused_imports)] - use objc2::{ClassType, extern_class, msg_send, msg_send_id}; - #[allow(unused_imports)] - use objc2::rc::{Id, Shared}; + let tokens = quote! { + #[allow(unused_imports)] + use objc2::{ClassType, extern_class, msg_send, msg_send_id}; + #[allow(unused_imports)] + use objc2::rc::{Id, Shared}; - #(#iter)* - }; + #(#iter)* + }; + + (self.declared_types, run_rustfmt(tokens)) + } +} + +pub fn run_rustfmt(tokens: TokenStream) -> Vec { + let mut child = Command::new("rustfmt") + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .spawn() + .expect("failed running rustfmt"); + + let mut stdin = child.stdin.take().expect("failed to open stdin"); + write!(stdin, "{}", tokens).expect("failed writing"); + drop(stdin); + + let output = child.wait_with_output().expect("failed formatting"); + + if !output.status.success() { + panic!("failed running rustfmt with exit code {}", output.status) + } - (declared_types, tokens) + output.stdout } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index cffdd45e3..3fb071bb8 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,34 +1,12 @@ use std::collections::{BTreeMap, HashSet}; use std::fs; -use std::io::Write; use std::path::{Path, PathBuf}; -use std::process::{Command, Stdio}; use clang::{Clang, Entity, EntityVisitResult, Index}; -use proc_macro2::{Ident, TokenStream}; +use proc_macro2::Ident; use quote::{format_ident, quote}; -use header_translator::{create_rust_file, Config}; - -fn run_rustfmt(tokens: TokenStream) -> Vec { - let mut child = Command::new("rustfmt") - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .spawn() - .expect("failed running rustfmt"); - - let mut stdin = child.stdin.take().expect("failed to open stdin"); - write!(stdin, "{}", tokens).expect("failed writing"); - drop(stdin); - - let output = child.wait_with_output().expect("failed formatting"); - - if !output.status.success() { - panic!("failed running rustfmt with exit code {}", output.status) - } - - output.stdout -} +use header_translator::{run_rustfmt, Config, RustFile, Stmt}; fn main() { // let sysroot = Path::new("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"); @@ -167,11 +145,13 @@ fn main() { continue; } - let (declared_types, tokens) = create_rust_file(&res, &config); - - let formatted = run_rustfmt(tokens); - - // println!("{}\n\n\n\n", res); + let mut f = RustFile::new(); + res.iter().for_each(|entity| { + if let Some(stmt) = Stmt::parse(entity, &config) { + f.add_stmt(stmt); + } + }); + let (declared_types, formatted) = f.finish(); let mut path = output_path.join(path.file_name().expect("header file name")); path.set_extension("rs"); From baf291885a71f953c01eb3cff64e6697eb01381e Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 8 Oct 2022 05:32:16 +0200 Subject: [PATCH 063/131] Refactor file handling to allow for multiple frameworks simultaneously --- crates/header-translator/framework-includes.h | 1 + crates/header-translator/src/lib.rs | 18 +- crates/header-translator/src/main.rs | 204 +++++++++--------- 3 files changed, 114 insertions(+), 109 deletions(-) create mode 100644 crates/header-translator/framework-includes.h diff --git a/crates/header-translator/framework-includes.h b/crates/header-translator/framework-includes.h new file mode 100644 index 000000000..0b8c4b8fb --- /dev/null +++ b/crates/header-translator/framework-includes.h @@ -0,0 +1 @@ +#import diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 5ee51736a..122c29ff7 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -1,5 +1,6 @@ use std::collections::HashSet; use std::io::Write; +use std::path::Path; use std::process::{Command, Stdio}; use proc_macro2::TokenStream; @@ -48,7 +49,7 @@ impl RustFile { self.stmts.push(stmt); } - pub fn finish(self) -> (HashSet, Vec) { + pub fn finish(self) -> (HashSet, TokenStream) { let iter = self.stmts.iter().filter(|stmt| match stmt { Stmt::ItemImport { name } => !self.declared_types.contains(name), _ => true, @@ -63,10 +64,23 @@ impl RustFile { #(#iter)* }; - (self.declared_types, run_rustfmt(tokens)) + (self.declared_types, tokens) } } +pub fn run_cargo_fmt() { + let status = Command::new("cargo") + .args(["fmt", "--package=icrate"]) + .current_dir(Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap()) + .status() + .expect("failed running cargo fmt"); + + assert!( + status.success(), + "failed running cargo fmt with exit code {status}" + ); +} + pub fn run_rustfmt(tokens: TokenStream) -> Vec { let mut child = Command::new("rustfmt") .stdin(Stdio::piped()) diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 3fb071bb8..05e603cae 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,37 +1,26 @@ -use std::collections::{BTreeMap, HashSet}; +use std::collections::{BTreeMap, HashMap}; use std::fs; -use std::path::{Path, PathBuf}; +use std::io; +use std::path::Path; -use clang::{Clang, Entity, EntityVisitResult, Index}; -use proc_macro2::Ident; +use clang::{Clang, EntityVisitResult, Index}; use quote::{format_ident, quote}; use header_translator::{run_rustfmt, Config, RustFile, Stmt}; fn main() { + let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); + let workspace_dir = manifest_dir.parent().unwrap(); + let crate_src = workspace_dir.join("icrate/src"); + // let sysroot = Path::new("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"); - let sysroot = Path::new("./ideas/MacOSX-SDK-changes/MacOSXA.B.C.sdk"); - let framework_path = sysroot.join("System/Library/Frameworks"); + let sysroot = workspace_dir.join("ideas/MacOSX-SDK-changes/MacOSXA.B.C.sdk"); + let framework_dir = sysroot.join("System/Library/Frameworks"); let clang = Clang::new().unwrap(); - let index = Index::new(&clang, true, true); - - let _config = - dbg!(Config::from_file(Path::new("icrate/src/AppKit/translation-config.toml")).unwrap()); - - let _module_path = framework_path.join("module.map"); - - // for entry in framework_path.read_dir().unwrap() { - // let dir = entry.unwrap(); - // println!("{:?}", dir.file_name()); - // if dir.file_type().unwrap().is_dir() { - - let dir = framework_path.join("Foundation.framework").join("Headers"); - let header = dir.join("Foundation.h"); - let tu = index - .parser(&header) + .parser(&manifest_dir.join("framework-includes.h")) .detailed_preprocessing_record(true) // .single_file_parse(true) .skip_function_bodies(true) @@ -52,6 +41,8 @@ fn main() { .parse() .unwrap(); + println!("status: initialized clang"); + dbg!(&tu); dbg!(tu.get_target()); dbg!(tu.get_memory_usage()); @@ -78,113 +69,112 @@ fn main() { dbg!(&entity); dbg!(entity.get_availability()); - let _entities_left = usize::MAX; + let configs: HashMap = crate_src + .read_dir() + .expect("read_dir") + .filter_map(|dir| { + let dir = dir.expect("dir"); + if !dir.file_type().expect("file type").is_dir() { + return None; + } + let path = dir.path(); + let file = path.join("translation-config.toml"); + match Config::from_file(&file) { + Ok(config) => Some(( + path.file_name() + .expect("framework name") + .to_string_lossy() + .to_string(), + config, + )), + Err(err) if err.kind() == io::ErrorKind::NotFound => None, + Err(err) => panic!("{file:?}: {err}"), + } + }) + .collect(); + + println!("status: loaded {} configs", configs.len()); - let mut result: BTreeMap>> = BTreeMap::new(); + let mut result: HashMap> = HashMap::new(); entity.visit_children(|entity, _parent| { - // EntityKind::InclusionDirective - // if let Some(file) = entity.get_file() { - // let path = file.get_path(); - // if path.starts_with(&dir) { - // result.entry(path).or_default().push(entity); - // } - // } if let Some(location) = entity.get_location() { if let Some(file) = location.get_file_location().file { let path = file.get_path(); - if path.starts_with(&dir) { - result.entry(path).or_default().push(entity); + if let Ok(path) = path.strip_prefix(&framework_dir) { + let mut components = path.components(); + let library = components + .next() + .expect("components next") + .as_os_str() + .to_str() + .expect("component to_str") + .strip_suffix(".framework") + .expect("framework fileending"); + let path = components.as_path(); + + if let Some(config) = configs.get(library) { + let name = path + .file_stem() + .expect("path file stem") + .to_string_lossy() + .to_owned(); + if name != library { + let files = result.entry(library.to_string()).or_default(); + let file = files.entry(name.to_string()).or_insert_with(RustFile::new); + if let Some(stmt) = Stmt::parse(&entity, &config) { + file.add_stmt(stmt); + } + } + } else { + // println!("library not found {library}"); + } } - // entities_left = 20; - // println!("{:?}: {}", entity.get_kind(), entity.get_display_name().unwrap_or_else(|| "`None`".to_string())); - // if entity.get_display_name().as_deref() == Some("TARGET_OS_IPHONE") { - // dbg!(&entity); - // dbg!(&entity.get_range()); - // dbg!(&entity.get_children()); - // } } } - - // if entities_left < 100 { - // dbg!(&entity); - // } - - // if let Some(left) = entities_left.checked_sub(1) { - // entities_left = left; - // EntityVisitResult::Recurse - // } else { - // EntityVisitResult::Break - // } - // if e.get_kind() == EntityKind::StructDecl { - // // EntityVisitResult::Recurse - // } else { - // EntityVisitResult::Break - // } EntityVisitResult::Continue }); - // for entity in &result[&dir.join("NSCursor.h")] { - // println!("{:?}: {}", entity.get_kind(), entity.get_display_name().unwrap_or_else(|| "`None`".to_string())); - // if let Some(comment) = entity.get_comment() { - // println!("{}", comment); - // } - // } + println!("status: loaded data"); - let output_path = Path::new("icrate/src/generated/Foundation"); + for (library, files) in result.into_iter() { + let output_path = crate_src.join("generated").join(&library); - let config = dbg!(Config::from_file(Path::new( - "icrate/src/Foundation/translation-config.toml" - )) - .unwrap()); + let declared: Vec<_> = files + .into_iter() + .map(|(name, file)| { + let (declared_types, tokens) = file.finish(); - let mut declared: Vec<(Ident, HashSet)> = Vec::new(); + let mut path = output_path.join(&name); + path.set_extension("rs"); - for (path, res) in result { - if path == header { - continue; - } + fs::write(&path, run_rustfmt(tokens)).unwrap(); - let mut f = RustFile::new(); - res.iter().for_each(|entity| { - if let Some(stmt) = Stmt::parse(entity, &config) { - f.add_stmt(stmt); + (format_ident!("{}", name), declared_types) + }) + .collect(); + + let mod_names = declared.iter().map(|(name, _)| name); + let mod_imports = declared.iter().filter_map(|(name, declared_types)| { + if !declared_types.is_empty() { + let declared_types = declared_types.iter().map(|name| format_ident!("{}", name)); + Some(quote!(super::#name::{#(#declared_types,)*})) + } else { + None } }); - let (declared_types, formatted) = f.finish(); - let mut path = output_path.join(path.file_name().expect("header file name")); - path.set_extension("rs"); + let tokens = quote! { + #(pub(crate) mod #mod_names;)* - // truncate if the file exists - fs::write(&path, formatted).unwrap(); + mod __exported { + #(pub use #mod_imports;)* + } + }; - let name = format_ident!("{}", path.file_stem().unwrap().to_string_lossy()); + // truncate if the file exists + fs::write(output_path.join("mod.rs"), run_rustfmt(tokens)).unwrap(); - declared.push((name, declared_types)); + println!("status: written framework {library}"); } - - let mod_names = declared.iter().map(|(name, _)| name); - let mod_imports = declared.iter().filter_map(|(name, declared_types)| { - if !declared_types.is_empty() { - let declared_types = declared_types.iter().map(|name| format_ident!("{}", name)); - Some(quote!(super::#name::{#(#declared_types,)*})) - } else { - None - } - }); - - let mod_tokens = quote! { - #(pub(crate) mod #mod_names;)* - - mod __exported { - #(pub use #mod_imports;)* - } - }; - - // truncate if the file exists - fs::write(output_path.join("mod.rs"), run_rustfmt(mod_tokens)).unwrap(); - - // } - // } } From 7243dba176de80e60528957a8746ae13134b18ec Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 8 Oct 2022 06:20:52 +0200 Subject: [PATCH 064/131] Put method output inside an extern_methods! call We'll want this no matter what, since it'll allow us to extend things with availability attributes in the future. --- crates/header-translator/src/lib.rs | 2 +- crates/header-translator/src/stmt.rs | 18 +- .../generated/Foundation/FoundationErrors.rs | 2 +- .../FoundationLegacySwiftCompatibility.rs | 2 +- .../generated/Foundation/NSAffineTransform.rs | 96 +- .../Foundation/NSAppleEventDescriptor.rs | 574 +++--- .../Foundation/NSAppleEventManager.rs | 156 +- .../src/generated/Foundation/NSAppleScript.rs | 76 +- .../src/generated/Foundation/NSArchiver.rs | 217 +- .../src/generated/Foundation/NSArray.rs | 1085 +++++----- .../Foundation/NSAttributedString.rs | 931 ++++----- .../generated/Foundation/NSAutoreleasePool.rs | 24 +- .../NSBackgroundActivityScheduler.rs | 84 +- .../src/generated/Foundation/NSBundle.rs | 826 ++++---- .../Foundation/NSByteCountFormatter.rs | 190 +- .../src/generated/Foundation/NSByteOrder.rs | 2 +- .../src/generated/Foundation/NSCache.rs | 108 +- .../src/generated/Foundation/NSCalendar.rs | 1258 ++++++------ .../generated/Foundation/NSCalendarDate.rs | 472 ++--- .../generated/Foundation/NSCharacterSet.rs | 346 ++-- .../Foundation/NSClassDescription.rs | 114 +- .../src/generated/Foundation/NSCoder.rs | 581 +++--- .../Foundation/NSComparisonPredicate.rs | 136 +- .../Foundation/NSCompoundPredicate.rs | 68 +- .../src/generated/Foundation/NSConnection.rs | 409 ++-- .../icrate/src/generated/Foundation/NSData.rs | 701 ++++--- .../icrate/src/generated/Foundation/NSDate.rs | 219 +- .../Foundation/NSDateComponentsFormatter.rs | 254 +-- .../generated/Foundation/NSDateFormatter.rs | 656 +++--- .../generated/Foundation/NSDateInterval.rs | 100 +- .../Foundation/NSDateIntervalFormatter.rs | 104 +- .../src/generated/Foundation/NSDecimal.rs | 2 +- .../generated/Foundation/NSDecimalNumber.rs | 517 ++--- .../src/generated/Foundation/NSDictionary.rs | 677 +++--- .../generated/Foundation/NSDistantObject.rs | 92 +- .../generated/Foundation/NSDistributedLock.rs | 48 +- .../NSDistributedNotificationCenter.rs | 230 +-- .../generated/Foundation/NSEnergyFormatter.rs | 116 +- .../src/generated/Foundation/NSEnumerator.rs | 24 +- .../src/generated/Foundation/NSError.rs | 194 +- .../src/generated/Foundation/NSException.rs | 132 +- .../src/generated/Foundation/NSExpression.rs | 350 ++-- .../Foundation/NSExtensionContext.rs | 46 +- .../generated/Foundation/NSExtensionItem.rs | 60 +- .../Foundation/NSExtensionRequestHandling.rs | 2 +- .../generated/Foundation/NSFileCoordinator.rs | 322 +-- .../src/generated/Foundation/NSFileHandle.rs | 395 ++-- .../src/generated/Foundation/NSFileManager.rs | 1267 ++++++------ .../generated/Foundation/NSFilePresenter.rs | 2 +- .../src/generated/Foundation/NSFileVersion.rs | 222 +- .../src/generated/Foundation/NSFileWrapper.rs | 332 +-- .../src/generated/Foundation/NSFormatter.rs | 135 +- .../Foundation/NSGarbageCollector.rs | 66 +- .../src/generated/Foundation/NSGeometry.rs | 146 +- .../generated/Foundation/NSHFSFileTypes.rs | 2 +- .../src/generated/Foundation/NSHTTPCookie.rs | 146 +- .../Foundation/NSHTTPCookieStorage.rs | 153 +- .../src/generated/Foundation/NSHashTable.rs | 166 +- .../icrate/src/generated/Foundation/NSHost.rs | 78 +- .../Foundation/NSISO8601DateFormatter.rs | 72 +- .../src/generated/Foundation/NSIndexPath.rs | 96 +- .../src/generated/Foundation/NSIndexSet.rs | 382 ++-- .../generated/Foundation/NSInflectionRule.rs | 52 +- .../src/generated/Foundation/NSInvocation.rs | 102 +- .../generated/Foundation/NSItemProvider.rs | 329 +-- .../Foundation/NSJSONSerialization.rs | 78 +- .../generated/Foundation/NSKeyValueCoding.rs | 336 +-- .../Foundation/NSKeyValueObserving.rs | 582 +++--- .../generated/Foundation/NSKeyedArchiver.rs | 575 +++--- .../generated/Foundation/NSLengthFormatter.rs | 116 +- .../Foundation/NSLinguisticTagger.rs | 554 ++--- .../generated/Foundation/NSListFormatter.rs | 58 +- .../src/generated/Foundation/NSLocale.rs | 430 ++-- .../icrate/src/generated/Foundation/NSLock.rs | 170 +- .../src/generated/Foundation/NSMapTable.rs | 196 +- .../generated/Foundation/NSMassFormatter.rs | 127 +- .../src/generated/Foundation/NSMeasurement.rs | 77 +- .../Foundation/NSMeasurementFormatter.rs | 72 +- .../src/generated/Foundation/NSMetadata.rs | 339 ++-- .../Foundation/NSMetadataAttributes.rs | 2 +- .../generated/Foundation/NSMethodSignature.rs | 52 +- .../src/generated/Foundation/NSMorphology.rs | 183 +- .../src/generated/Foundation/NSNetServices.rs | 264 +-- .../generated/Foundation/NSNotification.rs | 242 +-- .../Foundation/NSNotificationQueue.rs | 98 +- .../icrate/src/generated/Foundation/NSNull.rs | 12 +- .../generated/Foundation/NSNumberFormatter.rs | 1024 +++++----- .../src/generated/Foundation/NSObjCRuntime.rs | 2 +- .../src/generated/Foundation/NSObject.rs | 59 +- .../generated/Foundation/NSObjectScripting.rs | 96 +- .../src/generated/Foundation/NSOperation.rs | 347 ++-- .../Foundation/NSOrderedCollectionChange.rs | 100 +- .../NSOrderedCollectionDifference.rs | 122 +- .../src/generated/Foundation/NSOrderedSet.rs | 956 ++++----- .../src/generated/Foundation/NSOrthography.rs | 118 +- .../generated/Foundation/NSPathUtilities.rs | 176 +- .../Foundation/NSPersonNameComponents.rs | 96 +- .../NSPersonNameComponentsFormatter.rs | 128 +- .../generated/Foundation/NSPointerArray.rs | 141 +- .../Foundation/NSPointerFunctions.rs | 127 +- .../icrate/src/generated/Foundation/NSPort.rs | 386 ++-- .../src/generated/Foundation/NSPortCoder.rs | 116 +- .../src/generated/Foundation/NSPortMessage.rs | 68 +- .../generated/Foundation/NSPortNameServer.rs | 228 ++- .../src/generated/Foundation/NSPredicate.rs | 210 +- .../src/generated/Foundation/NSProcessInfo.rs | 296 +-- .../src/generated/Foundation/NSProgress.rs | 438 ++-- .../generated/Foundation/NSPropertyList.rs | 96 +- .../generated/Foundation/NSProtocolChecker.rs | 58 +- .../src/generated/Foundation/NSProxy.rs | 84 +- .../src/generated/Foundation/NSRange.rs | 20 +- .../Foundation/NSRegularExpression.rs | 348 ++-- .../Foundation/NSRelativeDateTimeFormatter.rs | 124 +- .../src/generated/Foundation/NSRunLoop.rs | 280 +-- .../src/generated/Foundation/NSScanner.rs | 209 +- .../Foundation/NSScriptClassDescription.rs | 213 +- .../Foundation/NSScriptCoercionHandler.rs | 56 +- .../generated/Foundation/NSScriptCommand.rs | 208 +- .../Foundation/NSScriptCommandDescription.rs | 140 +- .../Foundation/NSScriptExecutionContext.rs | 48 +- .../Foundation/NSScriptKeyValueCoding.rs | 132 +- .../Foundation/NSScriptObjectSpecifiers.rs | 750 +++---- .../NSScriptStandardSuiteCommands.rs | 114 +- .../Foundation/NSScriptSuiteRegistry.rs | 158 +- .../Foundation/NSScriptWhoseTests.rs | 214 +- .../icrate/src/generated/Foundation/NSSet.rs | 410 ++-- .../generated/Foundation/NSSortDescriptor.rs | 274 +-- .../src/generated/Foundation/NSSpellServer.rs | 52 +- .../src/generated/Foundation/NSStream.rs | 377 ++-- .../src/generated/Foundation/NSString.rs | 1808 +++++++++-------- .../icrate/src/generated/Foundation/NSTask.rs | 273 +-- .../Foundation/NSTextCheckingResult.rs | 440 ++-- .../src/generated/Foundation/NSThread.rs | 384 ++-- .../src/generated/Foundation/NSTimeZone.rs | 238 +-- .../src/generated/Foundation/NSTimer.rs | 288 +-- .../icrate/src/generated/Foundation/NSURL.rs | 1488 +++++++------- .../NSURLAuthenticationChallenge.rs | 102 +- .../src/generated/Foundation/NSURLCache.rs | 286 +-- .../generated/Foundation/NSURLConnection.rs | 176 +- .../generated/Foundation/NSURLCredential.rs | 172 +- .../Foundation/NSURLCredentialStorage.rs | 272 +-- .../src/generated/Foundation/NSURLDownload.rs | 94 +- .../src/generated/Foundation/NSURLError.rs | 2 +- .../src/generated/Foundation/NSURLHandle.rs | 178 +- .../Foundation/NSURLProtectionSpace.rs | 132 +- .../src/generated/Foundation/NSURLProtocol.rs | 186 +- .../src/generated/Foundation/NSURLRequest.rs | 435 ++-- .../src/generated/Foundation/NSURLResponse.rs | 127 +- .../src/generated/Foundation/NSURLSession.rs | 1750 ++++++++-------- .../icrate/src/generated/Foundation/NSUUID.rs | 48 +- .../Foundation/NSUbiquitousKeyValueStore.rs | 142 +- .../src/generated/Foundation/NSUndoManager.rs | 246 +-- .../icrate/src/generated/Foundation/NSUnit.rs | 1434 ++++++------- .../generated/Foundation/NSUserActivity.rs | 315 +-- .../generated/Foundation/NSUserDefaults.rs | 289 +-- .../Foundation/NSUserNotification.rs | 372 ++-- .../generated/Foundation/NSUserScriptTask.rs | 151 +- .../src/generated/Foundation/NSValue.rs | 429 ++-- .../Foundation/NSValueTransformer.rs | 85 +- .../src/generated/Foundation/NSXMLDTD.rs | 186 +- .../src/generated/Foundation/NSXMLDTDNode.rs | 86 +- .../src/generated/Foundation/NSXMLDocument.rs | 283 +-- .../src/generated/Foundation/NSXMLElement.rs | 251 +-- .../src/generated/Foundation/NSXMLNode.rs | 445 ++-- .../generated/Foundation/NSXMLNodeOptions.rs | 2 +- .../src/generated/Foundation/NSXMLParser.rs | 182 +- .../generated/Foundation/NSXPCConnection.rs | 491 ++--- .../icrate/src/generated/Foundation/NSZone.rs | 2 +- 168 files changed, 23293 insertions(+), 21905 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 122c29ff7..98d3d1782 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -57,7 +57,7 @@ impl RustFile { let tokens = quote! { #[allow(unused_imports)] - use objc2::{ClassType, extern_class, msg_send, msg_send_id}; + use objc2::{ClassType, extern_class, extern_methods, msg_send, msg_send_id}; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 1e7e424b5..1bb17461d 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -442,9 +442,11 @@ impl ToTokens for Stmt { } ); - impl #generic_params #type_ { - #(#methods)* - } + extern_methods!( + unsafe impl #generic_params #type_ { + #(#methods)* + } + ); } } Self::CategoryDecl { @@ -468,10 +470,12 @@ impl ToTokens for Stmt { .collect(); quote! { - #meta - impl<#(#generics: Message),*> #class_name<#(#generics),*> { - #(#methods)* - } + extern_methods!( + #meta + unsafe impl<#(#generics: Message),*> #class_name<#(#generics),*> { + #(#methods)* + } + ); } } Self::ProtocolDecl { diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs index dbd322108..b935fd6ce 100644 --- a/crates/icrate/src/generated/Foundation/FoundationErrors.rs +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -3,4 +3,4 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs index b795ad452..97bb9cbef 100644 --- a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs +++ b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs @@ -2,4 +2,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index d025b8c6c..5093f720f 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSAffineTransform; @@ -12,50 +12,52 @@ extern_class!( type Super = NSObject; } ); -impl NSAffineTransform { - pub unsafe fn transform() -> Id { - msg_send_id![Self::class(), transform] +extern_methods!( + unsafe impl NSAffineTransform { + pub unsafe fn transform() -> Id { + msg_send_id![Self::class(), transform] + } + pub unsafe fn initWithTransform(&self, transform: &NSAffineTransform) -> Id { + msg_send_id![self, initWithTransform: transform] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn translateXBy_yBy(&self, deltaX: CGFloat, deltaY: CGFloat) { + msg_send![self, translateXBy: deltaX, yBy: deltaY] + } + pub unsafe fn rotateByDegrees(&self, angle: CGFloat) { + msg_send![self, rotateByDegrees: angle] + } + pub unsafe fn rotateByRadians(&self, angle: CGFloat) { + msg_send![self, rotateByRadians: angle] + } + pub unsafe fn scaleBy(&self, scale: CGFloat) { + msg_send![self, scaleBy: scale] + } + pub unsafe fn scaleXBy_yBy(&self, scaleX: CGFloat, scaleY: CGFloat) { + msg_send![self, scaleXBy: scaleX, yBy: scaleY] + } + pub unsafe fn invert(&self) { + msg_send![self, invert] + } + pub unsafe fn appendTransform(&self, transform: &NSAffineTransform) { + msg_send![self, appendTransform: transform] + } + pub unsafe fn prependTransform(&self, transform: &NSAffineTransform) { + msg_send![self, prependTransform: transform] + } + pub unsafe fn transformPoint(&self, aPoint: NSPoint) -> NSPoint { + msg_send![self, transformPoint: aPoint] + } + pub unsafe fn transformSize(&self, aSize: NSSize) -> NSSize { + msg_send![self, transformSize: aSize] + } + pub unsafe fn transformStruct(&self) -> NSAffineTransformStruct { + msg_send![self, transformStruct] + } + pub unsafe fn setTransformStruct(&self, transformStruct: NSAffineTransformStruct) { + msg_send![self, setTransformStruct: transformStruct] + } } - pub unsafe fn initWithTransform(&self, transform: &NSAffineTransform) -> Id { - msg_send_id![self, initWithTransform: transform] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn translateXBy_yBy(&self, deltaX: CGFloat, deltaY: CGFloat) { - msg_send![self, translateXBy: deltaX, yBy: deltaY] - } - pub unsafe fn rotateByDegrees(&self, angle: CGFloat) { - msg_send![self, rotateByDegrees: angle] - } - pub unsafe fn rotateByRadians(&self, angle: CGFloat) { - msg_send![self, rotateByRadians: angle] - } - pub unsafe fn scaleBy(&self, scale: CGFloat) { - msg_send![self, scaleBy: scale] - } - pub unsafe fn scaleXBy_yBy(&self, scaleX: CGFloat, scaleY: CGFloat) { - msg_send![self, scaleXBy: scaleX, yBy: scaleY] - } - pub unsafe fn invert(&self) { - msg_send![self, invert] - } - pub unsafe fn appendTransform(&self, transform: &NSAffineTransform) { - msg_send![self, appendTransform: transform] - } - pub unsafe fn prependTransform(&self, transform: &NSAffineTransform) { - msg_send![self, prependTransform: transform] - } - pub unsafe fn transformPoint(&self, aPoint: NSPoint) -> NSPoint { - msg_send![self, transformPoint: aPoint] - } - pub unsafe fn transformSize(&self, aSize: NSSize) -> NSSize { - msg_send![self, transformSize: aSize] - } - pub unsafe fn transformStruct(&self) -> NSAffineTransformStruct { - msg_send![self, transformStruct] - } - pub unsafe fn setTransformStruct(&self, transformStruct: NSAffineTransformStruct) { - msg_send![self, setTransformStruct: transformStruct] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index d5c41eb96..42f560343 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSAppleEventDescriptor; @@ -13,285 +13,295 @@ extern_class!( type Super = NSObject; } ); -impl NSAppleEventDescriptor { - pub unsafe fn nullDescriptor() -> Id { - msg_send_id![Self::class(), nullDescriptor] +extern_methods!( + unsafe impl NSAppleEventDescriptor { + pub unsafe fn nullDescriptor() -> Id { + msg_send_id![Self::class(), nullDescriptor] + } + pub unsafe fn descriptorWithDescriptorType_bytes_length( + descriptorType: DescType, + bytes: *mut c_void, + byteCount: NSUInteger, + ) -> Option> { + msg_send_id![ + Self::class(), + descriptorWithDescriptorType: descriptorType, + bytes: bytes, + length: byteCount + ] + } + pub unsafe fn descriptorWithDescriptorType_data( + descriptorType: DescType, + data: Option<&NSData>, + ) -> Option> { + msg_send_id![ + Self::class(), + descriptorWithDescriptorType: descriptorType, + data: data + ] + } + pub unsafe fn descriptorWithBoolean( + boolean: Boolean, + ) -> Id { + msg_send_id![Self::class(), descriptorWithBoolean: boolean] + } + pub unsafe fn descriptorWithEnumCode( + enumerator: OSType, + ) -> Id { + msg_send_id![Self::class(), descriptorWithEnumCode: enumerator] + } + pub unsafe fn descriptorWithInt32(signedInt: SInt32) -> Id { + msg_send_id![Self::class(), descriptorWithInt32: signedInt] + } + pub unsafe fn descriptorWithDouble( + doubleValue: c_double, + ) -> Id { + msg_send_id![Self::class(), descriptorWithDouble: doubleValue] + } + pub unsafe fn descriptorWithTypeCode( + typeCode: OSType, + ) -> Id { + msg_send_id![Self::class(), descriptorWithTypeCode: typeCode] + } + pub unsafe fn descriptorWithString( + string: &NSString, + ) -> Id { + msg_send_id![Self::class(), descriptorWithString: string] + } + pub unsafe fn descriptorWithDate(date: &NSDate) -> Id { + msg_send_id![Self::class(), descriptorWithDate: date] + } + pub unsafe fn descriptorWithFileURL(fileURL: &NSURL) -> Id { + msg_send_id![Self::class(), descriptorWithFileURL: fileURL] + } + pub unsafe fn appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID( + eventClass: AEEventClass, + eventID: AEEventID, + targetDescriptor: Option<&NSAppleEventDescriptor>, + returnID: AEReturnID, + transactionID: AETransactionID, + ) -> Id { + msg_send_id![ + Self::class(), + appleEventWithEventClass: eventClass, + eventID: eventID, + targetDescriptor: targetDescriptor, + returnID: returnID, + transactionID: transactionID + ] + } + pub unsafe fn listDescriptor() -> Id { + msg_send_id![Self::class(), listDescriptor] + } + pub unsafe fn recordDescriptor() -> Id { + msg_send_id![Self::class(), recordDescriptor] + } + pub unsafe fn currentProcessDescriptor() -> Id { + msg_send_id![Self::class(), currentProcessDescriptor] + } + pub unsafe fn descriptorWithProcessIdentifier( + processIdentifier: pid_t, + ) -> Id { + msg_send_id![ + Self::class(), + descriptorWithProcessIdentifier: processIdentifier + ] + } + pub unsafe fn descriptorWithBundleIdentifier( + bundleIdentifier: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + descriptorWithBundleIdentifier: bundleIdentifier + ] + } + pub unsafe fn descriptorWithApplicationURL( + applicationURL: &NSURL, + ) -> Id { + msg_send_id![Self::class(), descriptorWithApplicationURL: applicationURL] + } + pub unsafe fn initWithAEDescNoCopy(&self, aeDesc: NonNull) -> Id { + msg_send_id![self, initWithAEDescNoCopy: aeDesc] + } + pub unsafe fn initWithDescriptorType_bytes_length( + &self, + descriptorType: DescType, + bytes: *mut c_void, + byteCount: NSUInteger, + ) -> Option> { + msg_send_id![ + self, + initWithDescriptorType: descriptorType, + bytes: bytes, + length: byteCount + ] + } + pub unsafe fn initWithDescriptorType_data( + &self, + descriptorType: DescType, + data: Option<&NSData>, + ) -> Option> { + msg_send_id![self, initWithDescriptorType: descriptorType, data: data] + } + pub unsafe fn initWithEventClass_eventID_targetDescriptor_returnID_transactionID( + &self, + eventClass: AEEventClass, + eventID: AEEventID, + targetDescriptor: Option<&NSAppleEventDescriptor>, + returnID: AEReturnID, + transactionID: AETransactionID, + ) -> Id { + msg_send_id![ + self, + initWithEventClass: eventClass, + eventID: eventID, + targetDescriptor: targetDescriptor, + returnID: returnID, + transactionID: transactionID + ] + } + pub unsafe fn initListDescriptor(&self) -> Id { + msg_send_id![self, initListDescriptor] + } + pub unsafe fn initRecordDescriptor(&self) -> Id { + msg_send_id![self, initRecordDescriptor] + } + pub unsafe fn aeDesc(&self) -> *mut AEDesc { + msg_send![self, aeDesc] + } + pub unsafe fn descriptorType(&self) -> DescType { + msg_send![self, descriptorType] + } + pub unsafe fn data(&self) -> Id { + msg_send_id![self, data] + } + pub unsafe fn booleanValue(&self) -> Boolean { + msg_send![self, booleanValue] + } + pub unsafe fn enumCodeValue(&self) -> OSType { + msg_send![self, enumCodeValue] + } + pub unsafe fn int32Value(&self) -> SInt32 { + msg_send![self, int32Value] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } + pub unsafe fn typeCodeValue(&self) -> OSType { + msg_send![self, typeCodeValue] + } + pub unsafe fn stringValue(&self) -> Option> { + msg_send_id![self, stringValue] + } + pub unsafe fn dateValue(&self) -> Option> { + msg_send_id![self, dateValue] + } + pub unsafe fn fileURLValue(&self) -> Option> { + msg_send_id![self, fileURLValue] + } + pub unsafe fn eventClass(&self) -> AEEventClass { + msg_send![self, eventClass] + } + pub unsafe fn eventID(&self) -> AEEventID { + msg_send![self, eventID] + } + pub unsafe fn returnID(&self) -> AEReturnID { + msg_send![self, returnID] + } + pub unsafe fn transactionID(&self) -> AETransactionID { + msg_send![self, transactionID] + } + pub unsafe fn setParamDescriptor_forKeyword( + &self, + descriptor: &NSAppleEventDescriptor, + keyword: AEKeyword, + ) { + msg_send![self, setParamDescriptor: descriptor, forKeyword: keyword] + } + pub unsafe fn paramDescriptorForKeyword( + &self, + keyword: AEKeyword, + ) -> Option> { + msg_send_id![self, paramDescriptorForKeyword: keyword] + } + pub unsafe fn removeParamDescriptorWithKeyword(&self, keyword: AEKeyword) { + msg_send![self, removeParamDescriptorWithKeyword: keyword] + } + pub unsafe fn setAttributeDescriptor_forKeyword( + &self, + descriptor: &NSAppleEventDescriptor, + keyword: AEKeyword, + ) { + msg_send![ + self, + setAttributeDescriptor: descriptor, + forKeyword: keyword + ] + } + pub unsafe fn attributeDescriptorForKeyword( + &self, + keyword: AEKeyword, + ) -> Option> { + msg_send_id![self, attributeDescriptorForKeyword: keyword] + } + pub unsafe fn sendEventWithOptions_timeout_error( + &self, + sendOptions: NSAppleEventSendOptions, + timeoutInSeconds: NSTimeInterval, + ) -> Result, Id> { + msg_send_id![ + self, + sendEventWithOptions: sendOptions, + timeout: timeoutInSeconds, + error: _ + ] + } + pub unsafe fn isRecordDescriptor(&self) -> bool { + msg_send![self, isRecordDescriptor] + } + pub unsafe fn numberOfItems(&self) -> NSInteger { + msg_send![self, numberOfItems] + } + pub unsafe fn insertDescriptor_atIndex( + &self, + descriptor: &NSAppleEventDescriptor, + index: NSInteger, + ) { + msg_send![self, insertDescriptor: descriptor, atIndex: index] + } + pub unsafe fn descriptorAtIndex( + &self, + index: NSInteger, + ) -> Option> { + msg_send_id![self, descriptorAtIndex: index] + } + pub unsafe fn removeDescriptorAtIndex(&self, index: NSInteger) { + msg_send![self, removeDescriptorAtIndex: index] + } + pub unsafe fn setDescriptor_forKeyword( + &self, + descriptor: &NSAppleEventDescriptor, + keyword: AEKeyword, + ) { + msg_send![self, setDescriptor: descriptor, forKeyword: keyword] + } + pub unsafe fn descriptorForKeyword( + &self, + keyword: AEKeyword, + ) -> Option> { + msg_send_id![self, descriptorForKeyword: keyword] + } + pub unsafe fn removeDescriptorWithKeyword(&self, keyword: AEKeyword) { + msg_send![self, removeDescriptorWithKeyword: keyword] + } + pub unsafe fn keywordForDescriptorAtIndex(&self, index: NSInteger) -> AEKeyword { + msg_send![self, keywordForDescriptorAtIndex: index] + } + pub unsafe fn coerceToDescriptorType( + &self, + descriptorType: DescType, + ) -> Option> { + msg_send_id![self, coerceToDescriptorType: descriptorType] + } } - pub unsafe fn descriptorWithDescriptorType_bytes_length( - descriptorType: DescType, - bytes: *mut c_void, - byteCount: NSUInteger, - ) -> Option> { - msg_send_id![ - Self::class(), - descriptorWithDescriptorType: descriptorType, - bytes: bytes, - length: byteCount - ] - } - pub unsafe fn descriptorWithDescriptorType_data( - descriptorType: DescType, - data: Option<&NSData>, - ) -> Option> { - msg_send_id![ - Self::class(), - descriptorWithDescriptorType: descriptorType, - data: data - ] - } - pub unsafe fn descriptorWithBoolean(boolean: Boolean) -> Id { - msg_send_id![Self::class(), descriptorWithBoolean: boolean] - } - pub unsafe fn descriptorWithEnumCode(enumerator: OSType) -> Id { - msg_send_id![Self::class(), descriptorWithEnumCode: enumerator] - } - pub unsafe fn descriptorWithInt32(signedInt: SInt32) -> Id { - msg_send_id![Self::class(), descriptorWithInt32: signedInt] - } - pub unsafe fn descriptorWithDouble( - doubleValue: c_double, - ) -> Id { - msg_send_id![Self::class(), descriptorWithDouble: doubleValue] - } - pub unsafe fn descriptorWithTypeCode(typeCode: OSType) -> Id { - msg_send_id![Self::class(), descriptorWithTypeCode: typeCode] - } - pub unsafe fn descriptorWithString(string: &NSString) -> Id { - msg_send_id![Self::class(), descriptorWithString: string] - } - pub unsafe fn descriptorWithDate(date: &NSDate) -> Id { - msg_send_id![Self::class(), descriptorWithDate: date] - } - pub unsafe fn descriptorWithFileURL(fileURL: &NSURL) -> Id { - msg_send_id![Self::class(), descriptorWithFileURL: fileURL] - } - pub unsafe fn appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID( - eventClass: AEEventClass, - eventID: AEEventID, - targetDescriptor: Option<&NSAppleEventDescriptor>, - returnID: AEReturnID, - transactionID: AETransactionID, - ) -> Id { - msg_send_id![ - Self::class(), - appleEventWithEventClass: eventClass, - eventID: eventID, - targetDescriptor: targetDescriptor, - returnID: returnID, - transactionID: transactionID - ] - } - pub unsafe fn listDescriptor() -> Id { - msg_send_id![Self::class(), listDescriptor] - } - pub unsafe fn recordDescriptor() -> Id { - msg_send_id![Self::class(), recordDescriptor] - } - pub unsafe fn currentProcessDescriptor() -> Id { - msg_send_id![Self::class(), currentProcessDescriptor] - } - pub unsafe fn descriptorWithProcessIdentifier( - processIdentifier: pid_t, - ) -> Id { - msg_send_id![ - Self::class(), - descriptorWithProcessIdentifier: processIdentifier - ] - } - pub unsafe fn descriptorWithBundleIdentifier( - bundleIdentifier: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - descriptorWithBundleIdentifier: bundleIdentifier - ] - } - pub unsafe fn descriptorWithApplicationURL( - applicationURL: &NSURL, - ) -> Id { - msg_send_id![Self::class(), descriptorWithApplicationURL: applicationURL] - } - pub unsafe fn initWithAEDescNoCopy(&self, aeDesc: NonNull) -> Id { - msg_send_id![self, initWithAEDescNoCopy: aeDesc] - } - pub unsafe fn initWithDescriptorType_bytes_length( - &self, - descriptorType: DescType, - bytes: *mut c_void, - byteCount: NSUInteger, - ) -> Option> { - msg_send_id![ - self, - initWithDescriptorType: descriptorType, - bytes: bytes, - length: byteCount - ] - } - pub unsafe fn initWithDescriptorType_data( - &self, - descriptorType: DescType, - data: Option<&NSData>, - ) -> Option> { - msg_send_id![self, initWithDescriptorType: descriptorType, data: data] - } - pub unsafe fn initWithEventClass_eventID_targetDescriptor_returnID_transactionID( - &self, - eventClass: AEEventClass, - eventID: AEEventID, - targetDescriptor: Option<&NSAppleEventDescriptor>, - returnID: AEReturnID, - transactionID: AETransactionID, - ) -> Id { - msg_send_id![ - self, - initWithEventClass: eventClass, - eventID: eventID, - targetDescriptor: targetDescriptor, - returnID: returnID, - transactionID: transactionID - ] - } - pub unsafe fn initListDescriptor(&self) -> Id { - msg_send_id![self, initListDescriptor] - } - pub unsafe fn initRecordDescriptor(&self) -> Id { - msg_send_id![self, initRecordDescriptor] - } - pub unsafe fn aeDesc(&self) -> *mut AEDesc { - msg_send![self, aeDesc] - } - pub unsafe fn descriptorType(&self) -> DescType { - msg_send![self, descriptorType] - } - pub unsafe fn data(&self) -> Id { - msg_send_id![self, data] - } - pub unsafe fn booleanValue(&self) -> Boolean { - msg_send![self, booleanValue] - } - pub unsafe fn enumCodeValue(&self) -> OSType { - msg_send![self, enumCodeValue] - } - pub unsafe fn int32Value(&self) -> SInt32 { - msg_send![self, int32Value] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } - pub unsafe fn typeCodeValue(&self) -> OSType { - msg_send![self, typeCodeValue] - } - pub unsafe fn stringValue(&self) -> Option> { - msg_send_id![self, stringValue] - } - pub unsafe fn dateValue(&self) -> Option> { - msg_send_id![self, dateValue] - } - pub unsafe fn fileURLValue(&self) -> Option> { - msg_send_id![self, fileURLValue] - } - pub unsafe fn eventClass(&self) -> AEEventClass { - msg_send![self, eventClass] - } - pub unsafe fn eventID(&self) -> AEEventID { - msg_send![self, eventID] - } - pub unsafe fn returnID(&self) -> AEReturnID { - msg_send![self, returnID] - } - pub unsafe fn transactionID(&self) -> AETransactionID { - msg_send![self, transactionID] - } - pub unsafe fn setParamDescriptor_forKeyword( - &self, - descriptor: &NSAppleEventDescriptor, - keyword: AEKeyword, - ) { - msg_send![self, setParamDescriptor: descriptor, forKeyword: keyword] - } - pub unsafe fn paramDescriptorForKeyword( - &self, - keyword: AEKeyword, - ) -> Option> { - msg_send_id![self, paramDescriptorForKeyword: keyword] - } - pub unsafe fn removeParamDescriptorWithKeyword(&self, keyword: AEKeyword) { - msg_send![self, removeParamDescriptorWithKeyword: keyword] - } - pub unsafe fn setAttributeDescriptor_forKeyword( - &self, - descriptor: &NSAppleEventDescriptor, - keyword: AEKeyword, - ) { - msg_send![ - self, - setAttributeDescriptor: descriptor, - forKeyword: keyword - ] - } - pub unsafe fn attributeDescriptorForKeyword( - &self, - keyword: AEKeyword, - ) -> Option> { - msg_send_id![self, attributeDescriptorForKeyword: keyword] - } - pub unsafe fn sendEventWithOptions_timeout_error( - &self, - sendOptions: NSAppleEventSendOptions, - timeoutInSeconds: NSTimeInterval, - ) -> Result, Id> { - msg_send_id![ - self, - sendEventWithOptions: sendOptions, - timeout: timeoutInSeconds, - error: _ - ] - } - pub unsafe fn isRecordDescriptor(&self) -> bool { - msg_send![self, isRecordDescriptor] - } - pub unsafe fn numberOfItems(&self) -> NSInteger { - msg_send![self, numberOfItems] - } - pub unsafe fn insertDescriptor_atIndex( - &self, - descriptor: &NSAppleEventDescriptor, - index: NSInteger, - ) { - msg_send![self, insertDescriptor: descriptor, atIndex: index] - } - pub unsafe fn descriptorAtIndex( - &self, - index: NSInteger, - ) -> Option> { - msg_send_id![self, descriptorAtIndex: index] - } - pub unsafe fn removeDescriptorAtIndex(&self, index: NSInteger) { - msg_send![self, removeDescriptorAtIndex: index] - } - pub unsafe fn setDescriptor_forKeyword( - &self, - descriptor: &NSAppleEventDescriptor, - keyword: AEKeyword, - ) { - msg_send![self, setDescriptor: descriptor, forKeyword: keyword] - } - pub unsafe fn descriptorForKeyword( - &self, - keyword: AEKeyword, - ) -> Option> { - msg_send_id![self, descriptorForKeyword: keyword] - } - pub unsafe fn removeDescriptorWithKeyword(&self, keyword: AEKeyword) { - msg_send![self, removeDescriptorWithKeyword: keyword] - } - pub unsafe fn keywordForDescriptorAtIndex(&self, index: NSInteger) -> AEKeyword { - msg_send![self, keywordForDescriptorAtIndex: index] - } - pub unsafe fn coerceToDescriptorType( - &self, - descriptorType: DescType, - ) -> Option> { - msg_send_id![self, coerceToDescriptorType: descriptorType] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index c74086e2f..8e6f0f7c6 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSAppleEventManager; @@ -13,80 +13,82 @@ extern_class!( type Super = NSObject; } ); -impl NSAppleEventManager { - pub unsafe fn sharedAppleEventManager() -> Id { - msg_send_id![Self::class(), sharedAppleEventManager] +extern_methods!( + unsafe impl NSAppleEventManager { + pub unsafe fn sharedAppleEventManager() -> Id { + msg_send_id![Self::class(), sharedAppleEventManager] + } + pub unsafe fn setEventHandler_andSelector_forEventClass_andEventID( + &self, + handler: &Object, + handleEventSelector: Sel, + eventClass: AEEventClass, + eventID: AEEventID, + ) { + msg_send![ + self, + setEventHandler: handler, + andSelector: handleEventSelector, + forEventClass: eventClass, + andEventID: eventID + ] + } + pub unsafe fn removeEventHandlerForEventClass_andEventID( + &self, + eventClass: AEEventClass, + eventID: AEEventID, + ) { + msg_send![ + self, + removeEventHandlerForEventClass: eventClass, + andEventID: eventID + ] + } + pub unsafe fn dispatchRawAppleEvent_withRawReply_handlerRefCon( + &self, + theAppleEvent: NonNull, + theReply: NonNull, + handlerRefCon: SRefCon, + ) -> OSErr { + msg_send![ + self, + dispatchRawAppleEvent: theAppleEvent, + withRawReply: theReply, + handlerRefCon: handlerRefCon + ] + } + pub unsafe fn currentAppleEvent(&self) -> Option> { + msg_send_id![self, currentAppleEvent] + } + pub unsafe fn currentReplyAppleEvent(&self) -> Option> { + msg_send_id![self, currentReplyAppleEvent] + } + pub unsafe fn suspendCurrentAppleEvent(&self) -> NSAppleEventManagerSuspensionID { + msg_send![self, suspendCurrentAppleEvent] + } + pub unsafe fn appleEventForSuspensionID( + &self, + suspensionID: NSAppleEventManagerSuspensionID, + ) -> Id { + msg_send_id![self, appleEventForSuspensionID: suspensionID] + } + pub unsafe fn replyAppleEventForSuspensionID( + &self, + suspensionID: NSAppleEventManagerSuspensionID, + ) -> Id { + msg_send_id![self, replyAppleEventForSuspensionID: suspensionID] + } + pub unsafe fn setCurrentAppleEventAndReplyEventWithSuspensionID( + &self, + suspensionID: NSAppleEventManagerSuspensionID, + ) { + msg_send![ + self, + setCurrentAppleEventAndReplyEventWithSuspensionID: suspensionID + ] + } + pub unsafe fn resumeWithSuspensionID(&self, suspensionID: NSAppleEventManagerSuspensionID) { + msg_send![self, resumeWithSuspensionID: suspensionID] + } } - pub unsafe fn setEventHandler_andSelector_forEventClass_andEventID( - &self, - handler: &Object, - handleEventSelector: Sel, - eventClass: AEEventClass, - eventID: AEEventID, - ) { - msg_send![ - self, - setEventHandler: handler, - andSelector: handleEventSelector, - forEventClass: eventClass, - andEventID: eventID - ] - } - pub unsafe fn removeEventHandlerForEventClass_andEventID( - &self, - eventClass: AEEventClass, - eventID: AEEventID, - ) { - msg_send![ - self, - removeEventHandlerForEventClass: eventClass, - andEventID: eventID - ] - } - pub unsafe fn dispatchRawAppleEvent_withRawReply_handlerRefCon( - &self, - theAppleEvent: NonNull, - theReply: NonNull, - handlerRefCon: SRefCon, - ) -> OSErr { - msg_send![ - self, - dispatchRawAppleEvent: theAppleEvent, - withRawReply: theReply, - handlerRefCon: handlerRefCon - ] - } - pub unsafe fn currentAppleEvent(&self) -> Option> { - msg_send_id![self, currentAppleEvent] - } - pub unsafe fn currentReplyAppleEvent(&self) -> Option> { - msg_send_id![self, currentReplyAppleEvent] - } - pub unsafe fn suspendCurrentAppleEvent(&self) -> NSAppleEventManagerSuspensionID { - msg_send![self, suspendCurrentAppleEvent] - } - pub unsafe fn appleEventForSuspensionID( - &self, - suspensionID: NSAppleEventManagerSuspensionID, - ) -> Id { - msg_send_id![self, appleEventForSuspensionID: suspensionID] - } - pub unsafe fn replyAppleEventForSuspensionID( - &self, - suspensionID: NSAppleEventManagerSuspensionID, - ) -> Id { - msg_send_id![self, replyAppleEventForSuspensionID: suspensionID] - } - pub unsafe fn setCurrentAppleEventAndReplyEventWithSuspensionID( - &self, - suspensionID: NSAppleEventManagerSuspensionID, - ) { - msg_send![ - self, - setCurrentAppleEventAndReplyEventWithSuspensionID: suspensionID - ] - } - pub unsafe fn resumeWithSuspensionID(&self, suspensionID: NSAppleEventManagerSuspensionID) { - msg_send![self, resumeWithSuspensionID: suspensionID] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index 5008fc853..a435eabd1 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSAppleScript; @@ -14,40 +14,42 @@ extern_class!( type Super = NSObject; } ); -impl NSAppleScript { - pub unsafe fn initWithContentsOfURL_error( - &self, - url: &NSURL, - errorInfo: Option<&mut Option, Shared>>>, - ) -> Option> { - msg_send_id![self, initWithContentsOfURL: url, error: errorInfo] +extern_methods!( + unsafe impl NSAppleScript { + pub unsafe fn initWithContentsOfURL_error( + &self, + url: &NSURL, + errorInfo: Option<&mut Option, Shared>>>, + ) -> Option> { + msg_send_id![self, initWithContentsOfURL: url, error: errorInfo] + } + pub unsafe fn initWithSource(&self, source: &NSString) -> Option> { + msg_send_id![self, initWithSource: source] + } + pub unsafe fn source(&self) -> Option> { + msg_send_id![self, source] + } + pub unsafe fn isCompiled(&self) -> bool { + msg_send![self, isCompiled] + } + pub unsafe fn compileAndReturnError( + &self, + errorInfo: Option<&mut Option, Shared>>>, + ) -> bool { + msg_send![self, compileAndReturnError: errorInfo] + } + pub unsafe fn executeAndReturnError( + &self, + errorInfo: Option<&mut Option, Shared>>>, + ) -> Id { + msg_send_id![self, executeAndReturnError: errorInfo] + } + pub unsafe fn executeAppleEvent_error( + &self, + event: &NSAppleEventDescriptor, + errorInfo: Option<&mut Option, Shared>>>, + ) -> Id { + msg_send_id![self, executeAppleEvent: event, error: errorInfo] + } } - pub unsafe fn initWithSource(&self, source: &NSString) -> Option> { - msg_send_id![self, initWithSource: source] - } - pub unsafe fn source(&self) -> Option> { - msg_send_id![self, source] - } - pub unsafe fn isCompiled(&self) -> bool { - msg_send![self, isCompiled] - } - pub unsafe fn compileAndReturnError( - &self, - errorInfo: Option<&mut Option, Shared>>>, - ) -> bool { - msg_send![self, compileAndReturnError: errorInfo] - } - pub unsafe fn executeAndReturnError( - &self, - errorInfo: Option<&mut Option, Shared>>>, - ) -> Id { - msg_send_id![self, executeAndReturnError: errorInfo] - } - pub unsafe fn executeAppleEvent_error( - &self, - event: &NSAppleEventDescriptor, - errorInfo: Option<&mut Option, Shared>>>, - ) -> Id { - msg_send_id![self, executeAppleEvent: event, error: errorInfo] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 516b1cee7..55addd1f0 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSException::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSArchiver; @@ -16,46 +16,51 @@ extern_class!( type Super = NSCoder; } ); -impl NSArchiver { - pub unsafe fn initForWritingWithMutableData(&self, mdata: &NSMutableData) -> Id { - msg_send_id![self, initForWritingWithMutableData: mdata] +extern_methods!( + unsafe impl NSArchiver { + pub unsafe fn initForWritingWithMutableData( + &self, + mdata: &NSMutableData, + ) -> Id { + msg_send_id![self, initForWritingWithMutableData: mdata] + } + pub unsafe fn archiverData(&self) -> Id { + msg_send_id![self, archiverData] + } + pub unsafe fn encodeRootObject(&self, rootObject: &Object) { + msg_send![self, encodeRootObject: rootObject] + } + pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>) { + msg_send![self, encodeConditionalObject: object] + } + pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id { + msg_send_id![Self::class(), archivedDataWithRootObject: rootObject] + } + pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool { + msg_send![Self::class(), archiveRootObject: rootObject, toFile: path] + } + pub unsafe fn encodeClassName_intoClassName( + &self, + trueName: &NSString, + inArchiveName: &NSString, + ) { + msg_send![ + self, + encodeClassName: trueName, + intoClassName: inArchiveName + ] + } + pub unsafe fn classNameEncodedForTrueClassName( + &self, + trueName: &NSString, + ) -> Option> { + msg_send_id![self, classNameEncodedForTrueClassName: trueName] + } + pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object) { + msg_send![self, replaceObject: object, withObject: newObject] + } } - pub unsafe fn archiverData(&self) -> Id { - msg_send_id![self, archiverData] - } - pub unsafe fn encodeRootObject(&self, rootObject: &Object) { - msg_send![self, encodeRootObject: rootObject] - } - pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>) { - msg_send![self, encodeConditionalObject: object] - } - pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id { - msg_send_id![Self::class(), archivedDataWithRootObject: rootObject] - } - pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool { - msg_send![Self::class(), archiveRootObject: rootObject, toFile: path] - } - pub unsafe fn encodeClassName_intoClassName( - &self, - trueName: &NSString, - inArchiveName: &NSString, - ) { - msg_send![ - self, - encodeClassName: trueName, - intoClassName: inArchiveName - ] - } - pub unsafe fn classNameEncodedForTrueClassName( - &self, - trueName: &NSString, - ) -> Option> { - msg_send_id![self, classNameEncodedForTrueClassName: trueName] - } - pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object) { - msg_send![self, replaceObject: object, withObject: newObject] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnarchiver; @@ -63,69 +68,73 @@ extern_class!( type Super = NSCoder; } ); -impl NSUnarchiver { - pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Option> { - msg_send_id![self, initForReadingWithData: data] - } - pub unsafe fn setObjectZone(&self, zone: *mut NSZone) { - msg_send![self, setObjectZone: zone] - } - pub unsafe fn objectZone(&self) -> *mut NSZone { - msg_send![self, objectZone] - } - pub unsafe fn isAtEnd(&self) -> bool { - msg_send![self, isAtEnd] +extern_methods!( + unsafe impl NSUnarchiver { + pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Option> { + msg_send_id![self, initForReadingWithData: data] + } + pub unsafe fn setObjectZone(&self, zone: *mut NSZone) { + msg_send![self, setObjectZone: zone] + } + pub unsafe fn objectZone(&self) -> *mut NSZone { + msg_send![self, objectZone] + } + pub unsafe fn isAtEnd(&self) -> bool { + msg_send![self, isAtEnd] + } + pub unsafe fn systemVersion(&self) -> c_uint { + msg_send![self, systemVersion] + } + pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option> { + msg_send_id![Self::class(), unarchiveObjectWithData: data] + } + pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option> { + msg_send_id![Self::class(), unarchiveObjectWithFile: path] + } + pub unsafe fn decodeClassName_asClassName(inArchiveName: &NSString, trueName: &NSString) { + msg_send![ + Self::class(), + decodeClassName: inArchiveName, + asClassName: trueName + ] + } + pub unsafe fn decodeClassName_asClassName( + &self, + inArchiveName: &NSString, + trueName: &NSString, + ) { + msg_send![self, decodeClassName: inArchiveName, asClassName: trueName] + } + pub unsafe fn classNameDecodedForArchiveClassName( + inArchiveName: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + classNameDecodedForArchiveClassName: inArchiveName + ] + } + pub unsafe fn classNameDecodedForArchiveClassName( + &self, + inArchiveName: &NSString, + ) -> Id { + msg_send_id![self, classNameDecodedForArchiveClassName: inArchiveName] + } + pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object) { + msg_send![self, replaceObject: object, withObject: newObject] + } } - pub unsafe fn systemVersion(&self) -> c_uint { - msg_send![self, systemVersion] - } - pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option> { - msg_send_id![Self::class(), unarchiveObjectWithData: data] - } - pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option> { - msg_send_id![Self::class(), unarchiveObjectWithFile: path] - } - pub unsafe fn decodeClassName_asClassName(inArchiveName: &NSString, trueName: &NSString) { - msg_send![ - Self::class(), - decodeClassName: inArchiveName, - asClassName: trueName - ] - } - pub unsafe fn decodeClassName_asClassName( - &self, - inArchiveName: &NSString, - trueName: &NSString, - ) { - msg_send![self, decodeClassName: inArchiveName, asClassName: trueName] - } - pub unsafe fn classNameDecodedForArchiveClassName( - inArchiveName: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - classNameDecodedForArchiveClassName: inArchiveName - ] - } - pub unsafe fn classNameDecodedForArchiveClassName( - &self, - inArchiveName: &NSString, - ) -> Id { - msg_send_id![self, classNameDecodedForArchiveClassName: inArchiveName] - } - pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object) { - msg_send![self, replaceObject: object, withObject: newObject] - } -} -#[doc = "NSArchiverCallback"] -impl NSObject { - pub unsafe fn classForArchiver(&self) -> Option<&Class> { - msg_send![self, classForArchiver] - } - pub unsafe fn replacementObjectForArchiver( - &self, - archiver: &NSArchiver, - ) -> Option> { - msg_send_id![self, replacementObjectForArchiver: archiver] +); +extern_methods!( + #[doc = "NSArchiverCallback"] + unsafe impl NSObject { + pub unsafe fn classForArchiver(&self) -> Option<&Class> { + msg_send![self, classForArchiver] + } + pub unsafe fn replacementObjectForArchiver( + &self, + archiver: &NSArchiver, + ) -> Option> { + msg_send_id![self, replacementObjectForArchiver: archiver] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index da155e0f4..1849d0190 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSArray; @@ -18,367 +18,395 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSArray { - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] +extern_methods!( + unsafe impl NSArray { + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id { + msg_send_id![self, objectAtIndex: index] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithObjects_count( + &self, + objects: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![self, initWithObjects: objects, count: cnt] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id { - msg_send_id![self, objectAtIndex: index] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithObjects_count( - &self, - objects: TodoArray, - cnt: NSUInteger, - ) -> Id { - msg_send_id![self, initWithObjects: objects, count: cnt] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSExtendedArray"] -impl NSArray { - pub unsafe fn arrayByAddingObject( - &self, - anObject: &ObjectType, - ) -> Id, Shared> { - msg_send_id![self, arrayByAddingObject: anObject] - } - pub unsafe fn arrayByAddingObjectsFromArray( - &self, - otherArray: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, arrayByAddingObjectsFromArray: otherArray] - } - pub unsafe fn componentsJoinedByString(&self, separator: &NSString) -> Id { - msg_send_id![self, componentsJoinedByString: separator] - } - pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool { - msg_send![self, containsObject: anObject] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn descriptionWithLocale_indent( - &self, - locale: Option<&Object>, - level: NSUInteger, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale, indent: level] - } - pub unsafe fn firstObjectCommonWithArray( - &self, - otherArray: &NSArray, - ) -> Option> { - msg_send_id![self, firstObjectCommonWithArray: otherArray] - } - pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { - msg_send![self, getObjects: objects, range: range] - } - pub unsafe fn indexOfObject(&self, anObject: &ObjectType) -> NSUInteger { - msg_send![self, indexOfObject: anObject] - } - pub unsafe fn indexOfObject_inRange( - &self, - anObject: &ObjectType, - range: NSRange, - ) -> NSUInteger { - msg_send![self, indexOfObject: anObject, inRange: range] - } - pub unsafe fn indexOfObjectIdenticalTo(&self, anObject: &ObjectType) -> NSUInteger { - msg_send![self, indexOfObjectIdenticalTo: anObject] - } - pub unsafe fn indexOfObjectIdenticalTo_inRange( - &self, - anObject: &ObjectType, - range: NSRange, - ) -> NSUInteger { - msg_send![self, indexOfObjectIdenticalTo: anObject, inRange: range] - } - pub unsafe fn isEqualToArray(&self, otherArray: &NSArray) -> bool { - msg_send![self, isEqualToArray: otherArray] - } - pub unsafe fn firstObject(&self) -> Option> { - msg_send_id![self, firstObject] - } - pub unsafe fn lastObject(&self) -> Option> { - msg_send_id![self, lastObject] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, reverseObjectEnumerator] - } - pub unsafe fn sortedArrayHint(&self) -> Id { - msg_send_id![self, sortedArrayHint] - } - pub unsafe fn sortedArrayUsingFunction_context( - &self, - comparator: NonNull, - context: *mut c_void, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingFunction: comparator, context: context] - } - pub unsafe fn sortedArrayUsingFunction_context_hint( - &self, - comparator: NonNull, - context: *mut c_void, - hint: Option<&NSData>, - ) -> Id, Shared> { - msg_send_id![ - self, - sortedArrayUsingFunction: comparator, - context: context, - hint: hint - ] - } - pub unsafe fn sortedArrayUsingSelector( - &self, - comparator: Sel, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingSelector: comparator] - } - pub unsafe fn subarrayWithRange(&self, range: NSRange) -> Id, Shared> { - msg_send_id![self, subarrayWithRange: range] - } - pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id> { - msg_send![self, writeToURL: url, error: _] - } - pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { - msg_send![self, makeObjectsPerformSelector: aSelector] - } - pub unsafe fn makeObjectsPerformSelector_withObject( - &self, - aSelector: Sel, - argument: Option<&Object>, - ) { - msg_send![ - self, - makeObjectsPerformSelector: aSelector, - withObject: argument - ] - } - pub unsafe fn objectsAtIndexes(&self, indexes: &NSIndexSet) -> Id, Shared> { - msg_send_id![self, objectsAtIndexes: indexes] - } - pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id { - msg_send_id![self, objectAtIndexedSubscript: idx] - } - pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateObjectsUsingBlock: block] - } - pub unsafe fn enumerateObjectsWithOptions_usingBlock( - &self, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] - } - pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( - &self, - s: &NSIndexSet, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateObjectsAtIndexes: s, - options: opts, - usingBlock: block - ] - } - pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger { - msg_send![self, indexOfObjectPassingTest: predicate] - } - pub unsafe fn indexOfObjectWithOptions_passingTest( - &self, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> NSUInteger { - msg_send![self, indexOfObjectWithOptions: opts, passingTest: predicate] - } - pub unsafe fn indexOfObjectAtIndexes_options_passingTest( - &self, - s: &NSIndexSet, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> NSUInteger { - msg_send![ - self, - indexOfObjectAtIndexes: s, - options: opts, - passingTest: predicate - ] - } - pub unsafe fn indexesOfObjectsPassingTest( - &self, - predicate: TodoBlock, - ) -> Id { - msg_send_id![self, indexesOfObjectsPassingTest: predicate] - } - pub unsafe fn indexesOfObjectsWithOptions_passingTest( - &self, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> Id { - msg_send_id![ - self, - indexesOfObjectsWithOptions: opts, - passingTest: predicate - ] - } - pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( - &self, - s: &NSIndexSet, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> Id { - msg_send_id![ - self, - indexesOfObjectsAtIndexes: s, - options: opts, - passingTest: predicate - ] - } - pub unsafe fn sortedArrayUsingComparator( - &self, - cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingComparator: cmptr] - } - pub unsafe fn sortedArrayWithOptions_usingComparator( - &self, - opts: NSSortOptions, - cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayWithOptions: opts, usingComparator: cmptr] - } - pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( - &self, - obj: &ObjectType, - r: NSRange, - opts: NSBinarySearchingOptions, - cmp: NSComparator, - ) -> NSUInteger { - msg_send![ - self, - indexOfObject: obj, - inSortedRange: r, - options: opts, - usingComparator: cmp - ] - } -} -#[doc = "NSArrayCreation"] -impl NSArray { - pub unsafe fn array() -> Id { - msg_send_id![Self::class(), array] - } - pub unsafe fn arrayWithObject(anObject: &ObjectType) -> Id { - msg_send_id![Self::class(), arrayWithObject: anObject] - } - pub unsafe fn arrayWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id { - msg_send_id![Self::class(), arrayWithObjects: objects, count: cnt] - } - pub unsafe fn arrayWithArray(array: &NSArray) -> Id { - msg_send_id![Self::class(), arrayWithArray: array] - } - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { - msg_send_id![self, initWithArray: array] - } - pub unsafe fn initWithArray_copyItems( - &self, - array: &NSArray, - flag: bool, - ) -> Id { - msg_send_id![self, initWithArray: array, copyItems: flag] - } - pub unsafe fn initWithContentsOfURL_error( - &self, - url: &NSURL, - ) -> Result, Shared>, Id> { - msg_send_id![self, initWithContentsOfURL: url, error: _] - } - pub unsafe fn arrayWithContentsOfURL_error( - url: &NSURL, - ) -> Result, Shared>, Id> { - msg_send_id![Self::class(), arrayWithContentsOfURL: url, error: _] - } -} -#[doc = "NSArrayDiffing"] -impl NSArray { - pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( - &self, - other: &NSArray, - options: NSOrderedCollectionDifferenceCalculationOptions, - block: TodoBlock, - ) -> Id, Shared> { - msg_send_id![ - self, - differenceFromArray: other, - withOptions: options, - usingEquivalenceTest: block - ] - } - pub unsafe fn differenceFromArray_withOptions( - &self, - other: &NSArray, - options: NSOrderedCollectionDifferenceCalculationOptions, - ) -> Id, Shared> { - msg_send_id![self, differenceFromArray: other, withOptions: options] - } - pub unsafe fn differenceFromArray( - &self, - other: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, differenceFromArray: other] - } - pub unsafe fn arrayByApplyingDifference( - &self, - difference: &NSOrderedCollectionDifference, - ) -> Option, Shared>> { - msg_send_id![self, arrayByApplyingDifference: difference] - } -} -#[doc = "NSDeprecated"] -impl NSArray { - pub unsafe fn getObjects(&self, objects: TodoArray) { - msg_send![self, getObjects: objects] - } - pub unsafe fn arrayWithContentsOfFile( - path: &NSString, - ) -> Option, Shared>> { - msg_send_id![Self::class(), arrayWithContentsOfFile: path] - } - pub unsafe fn arrayWithContentsOfURL(url: &NSURL) -> Option, Shared>> { - msg_send_id![Self::class(), arrayWithContentsOfURL: url] - } - pub unsafe fn initWithContentsOfFile( - &self, - path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfFile: path] +); +extern_methods!( + #[doc = "NSExtendedArray"] + unsafe impl NSArray { + pub unsafe fn arrayByAddingObject( + &self, + anObject: &ObjectType, + ) -> Id, Shared> { + msg_send_id![self, arrayByAddingObject: anObject] + } + pub unsafe fn arrayByAddingObjectsFromArray( + &self, + otherArray: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, arrayByAddingObjectsFromArray: otherArray] + } + pub unsafe fn componentsJoinedByString( + &self, + separator: &NSString, + ) -> Id { + msg_send_id![self, componentsJoinedByString: separator] + } + pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool { + msg_send![self, containsObject: anObject] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn descriptionWithLocale( + &self, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn descriptionWithLocale_indent( + &self, + locale: Option<&Object>, + level: NSUInteger, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale, indent: level] + } + pub unsafe fn firstObjectCommonWithArray( + &self, + otherArray: &NSArray, + ) -> Option> { + msg_send_id![self, firstObjectCommonWithArray: otherArray] + } + pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { + msg_send![self, getObjects: objects, range: range] + } + pub unsafe fn indexOfObject(&self, anObject: &ObjectType) -> NSUInteger { + msg_send![self, indexOfObject: anObject] + } + pub unsafe fn indexOfObject_inRange( + &self, + anObject: &ObjectType, + range: NSRange, + ) -> NSUInteger { + msg_send![self, indexOfObject: anObject, inRange: range] + } + pub unsafe fn indexOfObjectIdenticalTo(&self, anObject: &ObjectType) -> NSUInteger { + msg_send![self, indexOfObjectIdenticalTo: anObject] + } + pub unsafe fn indexOfObjectIdenticalTo_inRange( + &self, + anObject: &ObjectType, + range: NSRange, + ) -> NSUInteger { + msg_send![self, indexOfObjectIdenticalTo: anObject, inRange: range] + } + pub unsafe fn isEqualToArray(&self, otherArray: &NSArray) -> bool { + msg_send![self, isEqualToArray: otherArray] + } + pub unsafe fn firstObject(&self) -> Option> { + msg_send_id![self, firstObject] + } + pub unsafe fn lastObject(&self) -> Option> { + msg_send_id![self, lastObject] + } + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] + } + pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, reverseObjectEnumerator] + } + pub unsafe fn sortedArrayHint(&self) -> Id { + msg_send_id![self, sortedArrayHint] + } + pub unsafe fn sortedArrayUsingFunction_context( + &self, + comparator: NonNull, + context: *mut c_void, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingFunction: comparator, context: context] + } + pub unsafe fn sortedArrayUsingFunction_context_hint( + &self, + comparator: NonNull, + context: *mut c_void, + hint: Option<&NSData>, + ) -> Id, Shared> { + msg_send_id![ + self, + sortedArrayUsingFunction: comparator, + context: context, + hint: hint + ] + } + pub unsafe fn sortedArrayUsingSelector( + &self, + comparator: Sel, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingSelector: comparator] + } + pub unsafe fn subarrayWithRange(&self, range: NSRange) -> Id, Shared> { + msg_send_id![self, subarrayWithRange: range] + } + pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id> { + msg_send![self, writeToURL: url, error: _] + } + pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { + msg_send![self, makeObjectsPerformSelector: aSelector] + } + pub unsafe fn makeObjectsPerformSelector_withObject( + &self, + aSelector: Sel, + argument: Option<&Object>, + ) { + msg_send![ + self, + makeObjectsPerformSelector: aSelector, + withObject: argument + ] + } + pub unsafe fn objectsAtIndexes( + &self, + indexes: &NSIndexSet, + ) -> Id, Shared> { + msg_send_id![self, objectsAtIndexes: indexes] + } + pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id { + msg_send_id![self, objectAtIndexedSubscript: idx] + } + pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateObjectsUsingBlock: block] + } + pub unsafe fn enumerateObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] + } + pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateObjectsAtIndexes: s, + options: opts, + usingBlock: block + ] + } + pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger { + msg_send![self, indexOfObjectPassingTest: predicate] + } + pub unsafe fn indexOfObjectWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![self, indexOfObjectWithOptions: opts, passingTest: predicate] + } + pub unsafe fn indexOfObjectAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![ + self, + indexOfObjectAtIndexes: s, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn indexesOfObjectsPassingTest( + &self, + predicate: TodoBlock, + ) -> Id { + msg_send_id![self, indexesOfObjectsPassingTest: predicate] + } + pub unsafe fn indexesOfObjectsWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![ + self, + indexesOfObjectsWithOptions: opts, + passingTest: predicate + ] + } + pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![ + self, + indexesOfObjectsAtIndexes: s, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn sortedArrayUsingComparator( + &self, + cmptr: NSComparator, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingComparator: cmptr] + } + pub unsafe fn sortedArrayWithOptions_usingComparator( + &self, + opts: NSSortOptions, + cmptr: NSComparator, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayWithOptions: opts, usingComparator: cmptr] + } + pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( + &self, + obj: &ObjectType, + r: NSRange, + opts: NSBinarySearchingOptions, + cmp: NSComparator, + ) -> NSUInteger { + msg_send![ + self, + indexOfObject: obj, + inSortedRange: r, + options: opts, + usingComparator: cmp + ] + } } - pub unsafe fn initWithContentsOfURL( - &self, - url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfURL: url] +); +extern_methods!( + #[doc = "NSArrayCreation"] + unsafe impl NSArray { + pub unsafe fn array() -> Id { + msg_send_id![Self::class(), array] + } + pub unsafe fn arrayWithObject(anObject: &ObjectType) -> Id { + msg_send_id![Self::class(), arrayWithObject: anObject] + } + pub unsafe fn arrayWithObjects_count( + objects: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![Self::class(), arrayWithObjects: objects, count: cnt] + } + pub unsafe fn arrayWithArray(array: &NSArray) -> Id { + msg_send_id![Self::class(), arrayWithArray: array] + } + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { + msg_send_id![self, initWithArray: array] + } + pub unsafe fn initWithArray_copyItems( + &self, + array: &NSArray, + flag: bool, + ) -> Id { + msg_send_id![self, initWithArray: array, copyItems: flag] + } + pub unsafe fn initWithContentsOfURL_error( + &self, + url: &NSURL, + ) -> Result, Shared>, Id> { + msg_send_id![self, initWithContentsOfURL: url, error: _] + } + pub unsafe fn arrayWithContentsOfURL_error( + url: &NSURL, + ) -> Result, Shared>, Id> { + msg_send_id![Self::class(), arrayWithContentsOfURL: url, error: _] + } } - pub unsafe fn writeToFile_atomically(&self, path: &NSString, useAuxiliaryFile: bool) -> bool { - msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] +); +extern_methods!( + #[doc = "NSArrayDiffing"] + unsafe impl NSArray { + pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( + &self, + other: &NSArray, + options: NSOrderedCollectionDifferenceCalculationOptions, + block: TodoBlock, + ) -> Id, Shared> { + msg_send_id![ + self, + differenceFromArray: other, + withOptions: options, + usingEquivalenceTest: block + ] + } + pub unsafe fn differenceFromArray_withOptions( + &self, + other: &NSArray, + options: NSOrderedCollectionDifferenceCalculationOptions, + ) -> Id, Shared> { + msg_send_id![self, differenceFromArray: other, withOptions: options] + } + pub unsafe fn differenceFromArray( + &self, + other: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, differenceFromArray: other] + } + pub unsafe fn arrayByApplyingDifference( + &self, + difference: &NSOrderedCollectionDifference, + ) -> Option, Shared>> { + msg_send_id![self, arrayByApplyingDifference: difference] + } } - pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { - msg_send![self, writeToURL: url, atomically: atomically] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSArray { + pub unsafe fn getObjects(&self, objects: TodoArray) { + msg_send![self, getObjects: objects] + } + pub unsafe fn arrayWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![Self::class(), arrayWithContentsOfFile: path] + } + pub unsafe fn arrayWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), arrayWithContentsOfURL: url] + } + pub unsafe fn initWithContentsOfFile( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL( + &self, + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfURL: url] + } + pub unsafe fn writeToFile_atomically( + &self, + path: &NSString, + useAuxiliaryFile: bool, + ) -> bool { + msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] + } + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { + msg_send![self, writeToURL: url, atomically: atomically] + } } -} +); __inner_extern_class!( #[derive(Debug)] pub struct NSMutableArray; @@ -386,167 +414,190 @@ __inner_extern_class!( type Super = NSArray; } ); -impl NSMutableArray { - pub unsafe fn addObject(&self, anObject: &ObjectType) { - msg_send![self, addObject: anObject] - } - pub unsafe fn insertObject_atIndex(&self, anObject: &ObjectType, index: NSUInteger) { - msg_send![self, insertObject: anObject, atIndex: index] - } - pub unsafe fn removeLastObject(&self) { - msg_send![self, removeLastObject] - } - pub unsafe fn removeObjectAtIndex(&self, index: NSUInteger) { - msg_send![self, removeObjectAtIndex: index] - } - pub unsafe fn replaceObjectAtIndex_withObject(&self, index: NSUInteger, anObject: &ObjectType) { - msg_send![self, replaceObjectAtIndex: index, withObject: anObject] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: numItems] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSExtendedMutableArray"] -impl NSMutableArray { - pub unsafe fn addObjectsFromArray(&self, otherArray: &NSArray) { - msg_send![self, addObjectsFromArray: otherArray] - } - pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( - &self, - idx1: NSUInteger, - idx2: NSUInteger, - ) { - msg_send![self, exchangeObjectAtIndex: idx1, withObjectAtIndex: idx2] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn removeObject_inRange(&self, anObject: &ObjectType, range: NSRange) { - msg_send![self, removeObject: anObject, inRange: range] +extern_methods!( + unsafe impl NSMutableArray { + pub unsafe fn addObject(&self, anObject: &ObjectType) { + msg_send![self, addObject: anObject] + } + pub unsafe fn insertObject_atIndex(&self, anObject: &ObjectType, index: NSUInteger) { + msg_send![self, insertObject: anObject, atIndex: index] + } + pub unsafe fn removeLastObject(&self) { + msg_send![self, removeLastObject] + } + pub unsafe fn removeObjectAtIndex(&self, index: NSUInteger) { + msg_send![self, removeObjectAtIndex: index] + } + pub unsafe fn replaceObjectAtIndex_withObject( + &self, + index: NSUInteger, + anObject: &ObjectType, + ) { + msg_send![self, replaceObjectAtIndex: index, withObject: anObject] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: numItems] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn removeObject(&self, anObject: &ObjectType) { - msg_send![self, removeObject: anObject] - } - pub unsafe fn removeObjectIdenticalTo_inRange(&self, anObject: &ObjectType, range: NSRange) { - msg_send![self, removeObjectIdenticalTo: anObject, inRange: range] - } - pub unsafe fn removeObjectIdenticalTo(&self, anObject: &ObjectType) { - msg_send![self, removeObjectIdenticalTo: anObject] - } - pub unsafe fn removeObjectsFromIndices_numIndices( - &self, - indices: NonNull, - cnt: NSUInteger, - ) { - msg_send![self, removeObjectsFromIndices: indices, numIndices: cnt] - } - pub unsafe fn removeObjectsInArray(&self, otherArray: &NSArray) { - msg_send![self, removeObjectsInArray: otherArray] - } - pub unsafe fn removeObjectsInRange(&self, range: NSRange) { - msg_send![self, removeObjectsInRange: range] - } - pub unsafe fn replaceObjectsInRange_withObjectsFromArray_range( - &self, - range: NSRange, - otherArray: &NSArray, - otherRange: NSRange, - ) { - msg_send![ - self, - replaceObjectsInRange: range, - withObjectsFromArray: otherArray, - range: otherRange - ] - } - pub unsafe fn replaceObjectsInRange_withObjectsFromArray( - &self, - range: NSRange, - otherArray: &NSArray, - ) { - msg_send![ - self, - replaceObjectsInRange: range, - withObjectsFromArray: otherArray - ] - } - pub unsafe fn setArray(&self, otherArray: &NSArray) { - msg_send![self, setArray: otherArray] - } - pub unsafe fn sortUsingFunction_context( - &self, - compare: NonNull, - context: *mut c_void, - ) { - msg_send![self, sortUsingFunction: compare, context: context] - } - pub unsafe fn sortUsingSelector(&self, comparator: Sel) { - msg_send![self, sortUsingSelector: comparator] - } - pub unsafe fn insertObjects_atIndexes( - &self, - objects: &NSArray, - indexes: &NSIndexSet, - ) { - msg_send![self, insertObjects: objects, atIndexes: indexes] - } - pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet) { - msg_send![self, removeObjectsAtIndexes: indexes] - } - pub unsafe fn replaceObjectsAtIndexes_withObjects( - &self, - indexes: &NSIndexSet, - objects: &NSArray, - ) { - msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] - } - pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger) { - msg_send![self, setObject: obj, atIndexedSubscript: idx] - } - pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator) { - msg_send![self, sortUsingComparator: cmptr] - } - pub unsafe fn sortWithOptions_usingComparator(&self, opts: NSSortOptions, cmptr: NSComparator) { - msg_send![self, sortWithOptions: opts, usingComparator: cmptr] - } -} -#[doc = "NSMutableArrayCreation"] -impl NSMutableArray { - pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id { - msg_send_id![Self::class(), arrayWithCapacity: numItems] - } - pub unsafe fn arrayWithContentsOfFile( - path: &NSString, - ) -> Option, Shared>> { - msg_send_id![Self::class(), arrayWithContentsOfFile: path] - } - pub unsafe fn arrayWithContentsOfURL( - url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), arrayWithContentsOfURL: url] - } - pub unsafe fn initWithContentsOfFile( - &self, - path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfFile: path] +); +extern_methods!( + #[doc = "NSExtendedMutableArray"] + unsafe impl NSMutableArray { + pub unsafe fn addObjectsFromArray(&self, otherArray: &NSArray) { + msg_send![self, addObjectsFromArray: otherArray] + } + pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( + &self, + idx1: NSUInteger, + idx2: NSUInteger, + ) { + msg_send![self, exchangeObjectAtIndex: idx1, withObjectAtIndex: idx2] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn removeObject_inRange(&self, anObject: &ObjectType, range: NSRange) { + msg_send![self, removeObject: anObject, inRange: range] + } + pub unsafe fn removeObject(&self, anObject: &ObjectType) { + msg_send![self, removeObject: anObject] + } + pub unsafe fn removeObjectIdenticalTo_inRange( + &self, + anObject: &ObjectType, + range: NSRange, + ) { + msg_send![self, removeObjectIdenticalTo: anObject, inRange: range] + } + pub unsafe fn removeObjectIdenticalTo(&self, anObject: &ObjectType) { + msg_send![self, removeObjectIdenticalTo: anObject] + } + pub unsafe fn removeObjectsFromIndices_numIndices( + &self, + indices: NonNull, + cnt: NSUInteger, + ) { + msg_send![self, removeObjectsFromIndices: indices, numIndices: cnt] + } + pub unsafe fn removeObjectsInArray(&self, otherArray: &NSArray) { + msg_send![self, removeObjectsInArray: otherArray] + } + pub unsafe fn removeObjectsInRange(&self, range: NSRange) { + msg_send![self, removeObjectsInRange: range] + } + pub unsafe fn replaceObjectsInRange_withObjectsFromArray_range( + &self, + range: NSRange, + otherArray: &NSArray, + otherRange: NSRange, + ) { + msg_send![ + self, + replaceObjectsInRange: range, + withObjectsFromArray: otherArray, + range: otherRange + ] + } + pub unsafe fn replaceObjectsInRange_withObjectsFromArray( + &self, + range: NSRange, + otherArray: &NSArray, + ) { + msg_send![ + self, + replaceObjectsInRange: range, + withObjectsFromArray: otherArray + ] + } + pub unsafe fn setArray(&self, otherArray: &NSArray) { + msg_send![self, setArray: otherArray] + } + pub unsafe fn sortUsingFunction_context( + &self, + compare: NonNull, + context: *mut c_void, + ) { + msg_send![self, sortUsingFunction: compare, context: context] + } + pub unsafe fn sortUsingSelector(&self, comparator: Sel) { + msg_send![self, sortUsingSelector: comparator] + } + pub unsafe fn insertObjects_atIndexes( + &self, + objects: &NSArray, + indexes: &NSIndexSet, + ) { + msg_send![self, insertObjects: objects, atIndexes: indexes] + } + pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet) { + msg_send![self, removeObjectsAtIndexes: indexes] + } + pub unsafe fn replaceObjectsAtIndexes_withObjects( + &self, + indexes: &NSIndexSet, + objects: &NSArray, + ) { + msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] + } + pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger) { + msg_send![self, setObject: obj, atIndexedSubscript: idx] + } + pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator) { + msg_send![self, sortUsingComparator: cmptr] + } + pub unsafe fn sortWithOptions_usingComparator( + &self, + opts: NSSortOptions, + cmptr: NSComparator, + ) { + msg_send![self, sortWithOptions: opts, usingComparator: cmptr] + } } - pub unsafe fn initWithContentsOfURL( - &self, - url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfURL: url] +); +extern_methods!( + #[doc = "NSMutableArrayCreation"] + unsafe impl NSMutableArray { + pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id { + msg_send_id![Self::class(), arrayWithCapacity: numItems] + } + pub unsafe fn arrayWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![Self::class(), arrayWithContentsOfFile: path] + } + pub unsafe fn arrayWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), arrayWithContentsOfURL: url] + } + pub unsafe fn initWithContentsOfFile( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL( + &self, + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfURL: url] + } } -} -#[doc = "NSMutableArrayDiffing"] -impl NSMutableArray { - pub unsafe fn applyDifference(&self, difference: &NSOrderedCollectionDifference) { - msg_send![self, applyDifference: difference] +); +extern_methods!( + #[doc = "NSMutableArrayDiffing"] + unsafe impl NSMutableArray { + pub unsafe fn applyDifference( + &self, + difference: &NSOrderedCollectionDifference, + ) { + msg_send![self, applyDifference: difference] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index 4e1652722..09c3be12d 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSAttributedStringKey = NSString; extern_class!( #[derive(Debug)] @@ -12,118 +12,122 @@ extern_class!( type Super = NSObject; } ); -impl NSAttributedString { - pub unsafe fn string(&self) -> Id { - msg_send_id![self, string] +extern_methods!( + unsafe impl NSAttributedString { + pub unsafe fn string(&self) -> Id { + msg_send_id![self, string] + } + pub unsafe fn attributesAtIndex_effectiveRange( + &self, + location: NSUInteger, + range: NSRangePointer, + ) -> Id, Shared> { + msg_send_id![self, attributesAtIndex: location, effectiveRange: range] + } } - pub unsafe fn attributesAtIndex_effectiveRange( - &self, - location: NSUInteger, - range: NSRangePointer, - ) -> Id, Shared> { - msg_send_id![self, attributesAtIndex: location, effectiveRange: range] - } -} -#[doc = "NSExtendedAttributedString"] -impl NSAttributedString { - pub unsafe fn length(&self) -> NSUInteger { - msg_send![self, length] - } - pub unsafe fn attribute_atIndex_effectiveRange( - &self, - attrName: &NSAttributedStringKey, - location: NSUInteger, - range: NSRangePointer, - ) -> Option> { - msg_send_id![ - self, - attribute: attrName, - atIndex: location, - effectiveRange: range - ] - } - pub unsafe fn attributedSubstringFromRange( - &self, - range: NSRange, - ) -> Id { - msg_send_id![self, attributedSubstringFromRange: range] - } - pub unsafe fn attributesAtIndex_longestEffectiveRange_inRange( - &self, - location: NSUInteger, - range: NSRangePointer, - rangeLimit: NSRange, - ) -> Id, Shared> { - msg_send_id![ - self, - attributesAtIndex: location, - longestEffectiveRange: range, - inRange: rangeLimit - ] - } - pub unsafe fn attribute_atIndex_longestEffectiveRange_inRange( - &self, - attrName: &NSAttributedStringKey, - location: NSUInteger, - range: NSRangePointer, - rangeLimit: NSRange, - ) -> Option> { - msg_send_id![ - self, - attribute: attrName, - atIndex: location, - longestEffectiveRange: range, - inRange: rangeLimit - ] - } - pub unsafe fn isEqualToAttributedString(&self, other: &NSAttributedString) -> bool { - msg_send![self, isEqualToAttributedString: other] - } - pub unsafe fn initWithString(&self, str: &NSString) -> Id { - msg_send_id![self, initWithString: str] - } - pub unsafe fn initWithString_attributes( - &self, - str: &NSString, - attrs: Option<&NSDictionary>, - ) -> Id { - msg_send_id![self, initWithString: str, attributes: attrs] - } - pub unsafe fn initWithAttributedString( - &self, - attrStr: &NSAttributedString, - ) -> Id { - msg_send_id![self, initWithAttributedString: attrStr] - } - pub unsafe fn enumerateAttributesInRange_options_usingBlock( - &self, - enumerationRange: NSRange, - opts: NSAttributedStringEnumerationOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateAttributesInRange: enumerationRange, - options: opts, - usingBlock: block - ] - } - pub unsafe fn enumerateAttribute_inRange_options_usingBlock( - &self, - attrName: &NSAttributedStringKey, - enumerationRange: NSRange, - opts: NSAttributedStringEnumerationOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateAttribute: attrName, - inRange: enumerationRange, - options: opts, - usingBlock: block - ] +); +extern_methods!( + #[doc = "NSExtendedAttributedString"] + unsafe impl NSAttributedString { + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } + pub unsafe fn attribute_atIndex_effectiveRange( + &self, + attrName: &NSAttributedStringKey, + location: NSUInteger, + range: NSRangePointer, + ) -> Option> { + msg_send_id![ + self, + attribute: attrName, + atIndex: location, + effectiveRange: range + ] + } + pub unsafe fn attributedSubstringFromRange( + &self, + range: NSRange, + ) -> Id { + msg_send_id![self, attributedSubstringFromRange: range] + } + pub unsafe fn attributesAtIndex_longestEffectiveRange_inRange( + &self, + location: NSUInteger, + range: NSRangePointer, + rangeLimit: NSRange, + ) -> Id, Shared> { + msg_send_id![ + self, + attributesAtIndex: location, + longestEffectiveRange: range, + inRange: rangeLimit + ] + } + pub unsafe fn attribute_atIndex_longestEffectiveRange_inRange( + &self, + attrName: &NSAttributedStringKey, + location: NSUInteger, + range: NSRangePointer, + rangeLimit: NSRange, + ) -> Option> { + msg_send_id![ + self, + attribute: attrName, + atIndex: location, + longestEffectiveRange: range, + inRange: rangeLimit + ] + } + pub unsafe fn isEqualToAttributedString(&self, other: &NSAttributedString) -> bool { + msg_send![self, isEqualToAttributedString: other] + } + pub unsafe fn initWithString(&self, str: &NSString) -> Id { + msg_send_id![self, initWithString: str] + } + pub unsafe fn initWithString_attributes( + &self, + str: &NSString, + attrs: Option<&NSDictionary>, + ) -> Id { + msg_send_id![self, initWithString: str, attributes: attrs] + } + pub unsafe fn initWithAttributedString( + &self, + attrStr: &NSAttributedString, + ) -> Id { + msg_send_id![self, initWithAttributedString: attrStr] + } + pub unsafe fn enumerateAttributesInRange_options_usingBlock( + &self, + enumerationRange: NSRange, + opts: NSAttributedStringEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateAttributesInRange: enumerationRange, + options: opts, + usingBlock: block + ] + } + pub unsafe fn enumerateAttribute_inRange_options_usingBlock( + &self, + attrName: &NSAttributedStringKey, + enumerationRange: NSRange, + opts: NSAttributedStringEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateAttribute: attrName, + inRange: enumerationRange, + options: opts, + usingBlock: block + ] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSMutableAttributedString; @@ -131,75 +135,79 @@ extern_class!( type Super = NSAttributedString; } ); -impl NSMutableAttributedString { - pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, str: &NSString) { - msg_send![self, replaceCharactersInRange: range, withString: str] - } - pub unsafe fn setAttributes_range( - &self, - attrs: Option<&NSDictionary>, - range: NSRange, - ) { - msg_send![self, setAttributes: attrs, range: range] - } -} -#[doc = "NSExtendedMutableAttributedString"] -impl NSMutableAttributedString { - pub unsafe fn mutableString(&self) -> Id { - msg_send_id![self, mutableString] - } - pub unsafe fn addAttribute_value_range( - &self, - name: &NSAttributedStringKey, - value: &Object, - range: NSRange, - ) { - msg_send![self, addAttribute: name, value: value, range: range] - } - pub unsafe fn addAttributes_range( - &self, - attrs: &NSDictionary, - range: NSRange, - ) { - msg_send![self, addAttributes: attrs, range: range] +extern_methods!( + unsafe impl NSMutableAttributedString { + pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, str: &NSString) { + msg_send![self, replaceCharactersInRange: range, withString: str] + } + pub unsafe fn setAttributes_range( + &self, + attrs: Option<&NSDictionary>, + range: NSRange, + ) { + msg_send![self, setAttributes: attrs, range: range] + } } - pub unsafe fn removeAttribute_range(&self, name: &NSAttributedStringKey, range: NSRange) { - msg_send![self, removeAttribute: name, range: range] - } - pub unsafe fn replaceCharactersInRange_withAttributedString( - &self, - range: NSRange, - attrString: &NSAttributedString, - ) { - msg_send![ - self, - replaceCharactersInRange: range, - withAttributedString: attrString - ] - } - pub unsafe fn insertAttributedString_atIndex( - &self, - attrString: &NSAttributedString, - loc: NSUInteger, - ) { - msg_send![self, insertAttributedString: attrString, atIndex: loc] - } - pub unsafe fn appendAttributedString(&self, attrString: &NSAttributedString) { - msg_send![self, appendAttributedString: attrString] - } - pub unsafe fn deleteCharactersInRange(&self, range: NSRange) { - msg_send![self, deleteCharactersInRange: range] - } - pub unsafe fn setAttributedString(&self, attrString: &NSAttributedString) { - msg_send![self, setAttributedString: attrString] - } - pub unsafe fn beginEditing(&self) { - msg_send![self, beginEditing] - } - pub unsafe fn endEditing(&self) { - msg_send![self, endEditing] +); +extern_methods!( + #[doc = "NSExtendedMutableAttributedString"] + unsafe impl NSMutableAttributedString { + pub unsafe fn mutableString(&self) -> Id { + msg_send_id![self, mutableString] + } + pub unsafe fn addAttribute_value_range( + &self, + name: &NSAttributedStringKey, + value: &Object, + range: NSRange, + ) { + msg_send![self, addAttribute: name, value: value, range: range] + } + pub unsafe fn addAttributes_range( + &self, + attrs: &NSDictionary, + range: NSRange, + ) { + msg_send![self, addAttributes: attrs, range: range] + } + pub unsafe fn removeAttribute_range(&self, name: &NSAttributedStringKey, range: NSRange) { + msg_send![self, removeAttribute: name, range: range] + } + pub unsafe fn replaceCharactersInRange_withAttributedString( + &self, + range: NSRange, + attrString: &NSAttributedString, + ) { + msg_send![ + self, + replaceCharactersInRange: range, + withAttributedString: attrString + ] + } + pub unsafe fn insertAttributedString_atIndex( + &self, + attrString: &NSAttributedString, + loc: NSUInteger, + ) { + msg_send![self, insertAttributedString: attrString, atIndex: loc] + } + pub unsafe fn appendAttributedString(&self, attrString: &NSAttributedString) { + msg_send![self, appendAttributedString: attrString] + } + pub unsafe fn deleteCharactersInRange(&self, range: NSRange) { + msg_send![self, deleteCharactersInRange: range] + } + pub unsafe fn setAttributedString(&self, attrString: &NSAttributedString) { + msg_send![self, setAttributedString: attrString] + } + pub unsafe fn beginEditing(&self) { + msg_send![self, beginEditing] + } + pub unsafe fn endEditing(&self) { + msg_send![self, endEditing] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSAttributedStringMarkdownParsingOptions; @@ -207,112 +215,122 @@ extern_class!( type Super = NSObject; } ); -impl NSAttributedStringMarkdownParsingOptions { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn allowsExtendedAttributes(&self) -> bool { - msg_send![self, allowsExtendedAttributes] - } - pub unsafe fn setAllowsExtendedAttributes(&self, allowsExtendedAttributes: bool) { - msg_send![self, setAllowsExtendedAttributes: allowsExtendedAttributes] - } - pub unsafe fn interpretedSyntax(&self) -> NSAttributedStringMarkdownInterpretedSyntax { - msg_send![self, interpretedSyntax] - } - pub unsafe fn setInterpretedSyntax( - &self, - interpretedSyntax: NSAttributedStringMarkdownInterpretedSyntax, - ) { - msg_send![self, setInterpretedSyntax: interpretedSyntax] - } - pub unsafe fn failurePolicy(&self) -> NSAttributedStringMarkdownParsingFailurePolicy { - msg_send![self, failurePolicy] - } - pub unsafe fn setFailurePolicy( - &self, - failurePolicy: NSAttributedStringMarkdownParsingFailurePolicy, - ) { - msg_send![self, setFailurePolicy: failurePolicy] - } - pub unsafe fn languageCode(&self) -> Option> { - msg_send_id![self, languageCode] +extern_methods!( + unsafe impl NSAttributedStringMarkdownParsingOptions { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn allowsExtendedAttributes(&self) -> bool { + msg_send![self, allowsExtendedAttributes] + } + pub unsafe fn setAllowsExtendedAttributes(&self, allowsExtendedAttributes: bool) { + msg_send![self, setAllowsExtendedAttributes: allowsExtendedAttributes] + } + pub unsafe fn interpretedSyntax(&self) -> NSAttributedStringMarkdownInterpretedSyntax { + msg_send![self, interpretedSyntax] + } + pub unsafe fn setInterpretedSyntax( + &self, + interpretedSyntax: NSAttributedStringMarkdownInterpretedSyntax, + ) { + msg_send![self, setInterpretedSyntax: interpretedSyntax] + } + pub unsafe fn failurePolicy(&self) -> NSAttributedStringMarkdownParsingFailurePolicy { + msg_send![self, failurePolicy] + } + pub unsafe fn setFailurePolicy( + &self, + failurePolicy: NSAttributedStringMarkdownParsingFailurePolicy, + ) { + msg_send![self, setFailurePolicy: failurePolicy] + } + pub unsafe fn languageCode(&self) -> Option> { + msg_send_id![self, languageCode] + } + pub unsafe fn setLanguageCode(&self, languageCode: Option<&NSString>) { + msg_send![self, setLanguageCode: languageCode] + } } - pub unsafe fn setLanguageCode(&self, languageCode: Option<&NSString>) { - msg_send![self, setLanguageCode: languageCode] - } -} -#[doc = "NSAttributedStringCreateFromMarkdown"] -impl NSAttributedString { - pub unsafe fn initWithContentsOfMarkdownFileAtURL_options_baseURL_error( - &self, - markdownFile: &NSURL, - options: Option<&NSAttributedStringMarkdownParsingOptions>, - baseURL: Option<&NSURL>, - ) -> Result, Id> { - msg_send_id![ - self, - initWithContentsOfMarkdownFileAtURL: markdownFile, - options: options, - baseURL: baseURL, - error: _ - ] - } - pub unsafe fn initWithMarkdown_options_baseURL_error( - &self, - markdown: &NSData, - options: Option<&NSAttributedStringMarkdownParsingOptions>, - baseURL: Option<&NSURL>, - ) -> Result, Id> { - msg_send_id![ - self, - initWithMarkdown: markdown, - options: options, - baseURL: baseURL, - error: _ - ] - } - pub unsafe fn initWithMarkdownString_options_baseURL_error( - &self, - markdownString: &NSString, - options: Option<&NSAttributedStringMarkdownParsingOptions>, - baseURL: Option<&NSURL>, - ) -> Result, Id> { - msg_send_id![ - self, - initWithMarkdownString: markdownString, - options: options, - baseURL: baseURL, - error: _ - ] +); +extern_methods!( + #[doc = "NSAttributedStringCreateFromMarkdown"] + unsafe impl NSAttributedString { + pub unsafe fn initWithContentsOfMarkdownFileAtURL_options_baseURL_error( + &self, + markdownFile: &NSURL, + options: Option<&NSAttributedStringMarkdownParsingOptions>, + baseURL: Option<&NSURL>, + ) -> Result, Id> { + msg_send_id![ + self, + initWithContentsOfMarkdownFileAtURL: markdownFile, + options: options, + baseURL: baseURL, + error: _ + ] + } + pub unsafe fn initWithMarkdown_options_baseURL_error( + &self, + markdown: &NSData, + options: Option<&NSAttributedStringMarkdownParsingOptions>, + baseURL: Option<&NSURL>, + ) -> Result, Id> { + msg_send_id![ + self, + initWithMarkdown: markdown, + options: options, + baseURL: baseURL, + error: _ + ] + } + pub unsafe fn initWithMarkdownString_options_baseURL_error( + &self, + markdownString: &NSString, + options: Option<&NSAttributedStringMarkdownParsingOptions>, + baseURL: Option<&NSURL>, + ) -> Result, Id> { + msg_send_id![ + self, + initWithMarkdownString: markdownString, + options: options, + baseURL: baseURL, + error: _ + ] + } } -} -#[doc = "NSAttributedStringFormatting"] -impl NSAttributedString { - pub unsafe fn initWithFormat_options_locale_arguments( - &self, - format: &NSAttributedString, - options: NSAttributedStringFormattingOptions, - locale: Option<&NSLocale>, - arguments: va_list, - ) -> Id { - msg_send_id![ - self, - initWithFormat: format, - options: options, - locale: locale, - arguments: arguments - ] +); +extern_methods!( + #[doc = "NSAttributedStringFormatting"] + unsafe impl NSAttributedString { + pub unsafe fn initWithFormat_options_locale_arguments( + &self, + format: &NSAttributedString, + options: NSAttributedStringFormattingOptions, + locale: Option<&NSLocale>, + arguments: va_list, + ) -> Id { + msg_send_id![ + self, + initWithFormat: format, + options: options, + locale: locale, + arguments: arguments + ] + } } -} -#[doc = "NSMutableAttributedStringFormatting"] -impl NSMutableAttributedString {} -#[doc = "NSMorphology"] -impl NSAttributedString { - pub unsafe fn attributedStringByInflectingString(&self) -> Id { - msg_send_id![self, attributedStringByInflectingString] +); +extern_methods!( + #[doc = "NSMutableAttributedStringFormatting"] + unsafe impl NSMutableAttributedString {} +); +extern_methods!( + #[doc = "NSMorphology"] + unsafe impl NSAttributedString { + pub unsafe fn attributedStringByInflectingString(&self) -> Id { + msg_send_id![self, attributedStringByInflectingString] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSPresentationIntent; @@ -320,178 +338,183 @@ extern_class!( type Super = NSObject; } ); -impl NSPresentationIntent { - pub unsafe fn intentKind(&self) -> NSPresentationIntentKind { - msg_send![self, intentKind] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn parentIntent(&self) -> Option> { - msg_send_id![self, parentIntent] - } - pub unsafe fn paragraphIntentWithIdentity_nestedInsideIntent( - identity: NSInteger, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - paragraphIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } - pub unsafe fn headerIntentWithIdentity_level_nestedInsideIntent( - identity: NSInteger, - level: NSInteger, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - headerIntentWithIdentity: identity, - level: level, - nestedInsideIntent: parent - ] - } - pub unsafe fn codeBlockIntentWithIdentity_languageHint_nestedInsideIntent( - identity: NSInteger, - languageHint: Option<&NSString>, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - codeBlockIntentWithIdentity: identity, - languageHint: languageHint, - nestedInsideIntent: parent - ] - } - pub unsafe fn thematicBreakIntentWithIdentity_nestedInsideIntent( - identity: NSInteger, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - thematicBreakIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } - pub unsafe fn orderedListIntentWithIdentity_nestedInsideIntent( - identity: NSInteger, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - orderedListIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } - pub unsafe fn unorderedListIntentWithIdentity_nestedInsideIntent( - identity: NSInteger, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - unorderedListIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } - pub unsafe fn listItemIntentWithIdentity_ordinal_nestedInsideIntent( - identity: NSInteger, - ordinal: NSInteger, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - listItemIntentWithIdentity: identity, - ordinal: ordinal, - nestedInsideIntent: parent - ] +extern_methods!( + unsafe impl NSPresentationIntent { + pub unsafe fn intentKind(&self) -> NSPresentationIntentKind { + msg_send![self, intentKind] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn parentIntent(&self) -> Option> { + msg_send_id![self, parentIntent] + } + pub unsafe fn paragraphIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + paragraphIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn headerIntentWithIdentity_level_nestedInsideIntent( + identity: NSInteger, + level: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + headerIntentWithIdentity: identity, + level: level, + nestedInsideIntent: parent + ] + } + pub unsafe fn codeBlockIntentWithIdentity_languageHint_nestedInsideIntent( + identity: NSInteger, + languageHint: Option<&NSString>, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + codeBlockIntentWithIdentity: identity, + languageHint: languageHint, + nestedInsideIntent: parent + ] + } + pub unsafe fn thematicBreakIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + thematicBreakIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn orderedListIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + orderedListIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn unorderedListIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + unorderedListIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn listItemIntentWithIdentity_ordinal_nestedInsideIntent( + identity: NSInteger, + ordinal: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + listItemIntentWithIdentity: identity, + ordinal: ordinal, + nestedInsideIntent: parent + ] + } + pub unsafe fn blockQuoteIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + blockQuoteIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn tableIntentWithIdentity_columnCount_alignments_nestedInsideIntent( + identity: NSInteger, + columnCount: NSInteger, + alignments: &NSArray, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + tableIntentWithIdentity: identity, + columnCount: columnCount, + alignments: alignments, + nestedInsideIntent: parent + ] + } + pub unsafe fn tableHeaderRowIntentWithIdentity_nestedInsideIntent( + identity: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + tableHeaderRowIntentWithIdentity: identity, + nestedInsideIntent: parent + ] + } + pub unsafe fn tableRowIntentWithIdentity_row_nestedInsideIntent( + identity: NSInteger, + row: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + tableRowIntentWithIdentity: identity, + row: row, + nestedInsideIntent: parent + ] + } + pub unsafe fn tableCellIntentWithIdentity_column_nestedInsideIntent( + identity: NSInteger, + column: NSInteger, + parent: Option<&NSPresentationIntent>, + ) -> Id { + msg_send_id![ + Self::class(), + tableCellIntentWithIdentity: identity, + column: column, + nestedInsideIntent: parent + ] + } + pub unsafe fn identity(&self) -> NSInteger { + msg_send![self, identity] + } + pub unsafe fn ordinal(&self) -> NSInteger { + msg_send![self, ordinal] + } + pub unsafe fn columnAlignments(&self) -> Option, Shared>> { + msg_send_id![self, columnAlignments] + } + pub unsafe fn columnCount(&self) -> NSInteger { + msg_send![self, columnCount] + } + pub unsafe fn headerLevel(&self) -> NSInteger { + msg_send![self, headerLevel] + } + pub unsafe fn languageHint(&self) -> Option> { + msg_send_id![self, languageHint] + } + pub unsafe fn column(&self) -> NSInteger { + msg_send![self, column] + } + pub unsafe fn row(&self) -> NSInteger { + msg_send![self, row] + } + pub unsafe fn indentationLevel(&self) -> NSInteger { + msg_send![self, indentationLevel] + } + pub unsafe fn isEquivalentToPresentationIntent( + &self, + other: &NSPresentationIntent, + ) -> bool { + msg_send![self, isEquivalentToPresentationIntent: other] + } } - pub unsafe fn blockQuoteIntentWithIdentity_nestedInsideIntent( - identity: NSInteger, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - blockQuoteIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } - pub unsafe fn tableIntentWithIdentity_columnCount_alignments_nestedInsideIntent( - identity: NSInteger, - columnCount: NSInteger, - alignments: &NSArray, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - tableIntentWithIdentity: identity, - columnCount: columnCount, - alignments: alignments, - nestedInsideIntent: parent - ] - } - pub unsafe fn tableHeaderRowIntentWithIdentity_nestedInsideIntent( - identity: NSInteger, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - tableHeaderRowIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } - pub unsafe fn tableRowIntentWithIdentity_row_nestedInsideIntent( - identity: NSInteger, - row: NSInteger, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - tableRowIntentWithIdentity: identity, - row: row, - nestedInsideIntent: parent - ] - } - pub unsafe fn tableCellIntentWithIdentity_column_nestedInsideIntent( - identity: NSInteger, - column: NSInteger, - parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - tableCellIntentWithIdentity: identity, - column: column, - nestedInsideIntent: parent - ] - } - pub unsafe fn identity(&self) -> NSInteger { - msg_send![self, identity] - } - pub unsafe fn ordinal(&self) -> NSInteger { - msg_send![self, ordinal] - } - pub unsafe fn columnAlignments(&self) -> Option, Shared>> { - msg_send_id![self, columnAlignments] - } - pub unsafe fn columnCount(&self) -> NSInteger { - msg_send![self, columnCount] - } - pub unsafe fn headerLevel(&self) -> NSInteger { - msg_send![self, headerLevel] - } - pub unsafe fn languageHint(&self) -> Option> { - msg_send_id![self, languageHint] - } - pub unsafe fn column(&self) -> NSInteger { - msg_send![self, column] - } - pub unsafe fn row(&self) -> NSInteger { - msg_send![self, row] - } - pub unsafe fn indentationLevel(&self) -> NSInteger { - msg_send![self, indentationLevel] - } - pub unsafe fn isEquivalentToPresentationIntent(&self, other: &NSPresentationIntent) -> bool { - msg_send![self, isEquivalentToPresentationIntent: other] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs index f11522679..b6063842e 100644 --- a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSAutoreleasePool; @@ -10,14 +10,16 @@ extern_class!( type Super = NSObject; } ); -impl NSAutoreleasePool { - pub unsafe fn addObject(anObject: &Object) { - msg_send![Self::class(), addObject: anObject] +extern_methods!( + unsafe impl NSAutoreleasePool { + pub unsafe fn addObject(anObject: &Object) { + msg_send![Self::class(), addObject: anObject] + } + pub unsafe fn addObject(&self, anObject: &Object) { + msg_send![self, addObject: anObject] + } + pub unsafe fn drain(&self) { + msg_send![self, drain] + } } - pub unsafe fn addObject(&self, anObject: &Object) { - msg_send![self, addObject: anObject] - } - pub unsafe fn drain(&self) { - msg_send![self, drain] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 1b9332b4a..f0f9fa33d 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSBackgroundActivityScheduler; @@ -12,44 +12,46 @@ extern_class!( type Super = NSObject; } ); -impl NSBackgroundActivityScheduler { - pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id { - msg_send_id![self, initWithIdentifier: identifier] +extern_methods!( + unsafe impl NSBackgroundActivityScheduler { + pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id { + msg_send_id![self, initWithIdentifier: identifier] + } + pub unsafe fn identifier(&self) -> Id { + msg_send_id![self, identifier] + } + pub unsafe fn qualityOfService(&self) -> NSQualityOfService { + msg_send![self, qualityOfService] + } + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { + msg_send![self, setQualityOfService: qualityOfService] + } + pub unsafe fn repeats(&self) -> bool { + msg_send![self, repeats] + } + pub unsafe fn setRepeats(&self, repeats: bool) { + msg_send![self, setRepeats: repeats] + } + pub unsafe fn interval(&self) -> NSTimeInterval { + msg_send![self, interval] + } + pub unsafe fn setInterval(&self, interval: NSTimeInterval) { + msg_send![self, setInterval: interval] + } + pub unsafe fn tolerance(&self) -> NSTimeInterval { + msg_send![self, tolerance] + } + pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval) { + msg_send![self, setTolerance: tolerance] + } + pub unsafe fn scheduleWithBlock(&self, block: TodoBlock) { + msg_send![self, scheduleWithBlock: block] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn shouldDefer(&self) -> bool { + msg_send![self, shouldDefer] + } } - pub unsafe fn identifier(&self) -> Id { - msg_send_id![self, identifier] - } - pub unsafe fn qualityOfService(&self) -> NSQualityOfService { - msg_send![self, qualityOfService] - } - pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { - msg_send![self, setQualityOfService: qualityOfService] - } - pub unsafe fn repeats(&self) -> bool { - msg_send![self, repeats] - } - pub unsafe fn setRepeats(&self, repeats: bool) { - msg_send![self, setRepeats: repeats] - } - pub unsafe fn interval(&self) -> NSTimeInterval { - msg_send![self, interval] - } - pub unsafe fn setInterval(&self, interval: NSTimeInterval) { - msg_send![self, setInterval: interval] - } - pub unsafe fn tolerance(&self) -> NSTimeInterval { - msg_send![self, tolerance] - } - pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval) { - msg_send![self, setTolerance: tolerance] - } - pub unsafe fn scheduleWithBlock(&self, block: TodoBlock) { - msg_send![self, scheduleWithBlock: block] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn shouldDefer(&self) -> bool { - msg_send![self, shouldDefer] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index b31ed17d0..47f385858 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -14,7 +14,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSBundle; @@ -22,351 +22,361 @@ extern_class!( type Super = NSObject; } ); -impl NSBundle { - pub unsafe fn mainBundle() -> Id { - msg_send_id![Self::class(), mainBundle] +extern_methods!( + unsafe impl NSBundle { + pub unsafe fn mainBundle() -> Id { + msg_send_id![Self::class(), mainBundle] + } + pub unsafe fn bundleWithPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), bundleWithPath: path] + } + pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithPath: path] + } + pub unsafe fn bundleWithURL(url: &NSURL) -> Option> { + msg_send_id![Self::class(), bundleWithURL: url] + } + pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithURL: url] + } + pub unsafe fn bundleForClass(aClass: &Class) -> Id { + msg_send_id![Self::class(), bundleForClass: aClass] + } + pub unsafe fn bundleWithIdentifier(identifier: &NSString) -> Option> { + msg_send_id![Self::class(), bundleWithIdentifier: identifier] + } + pub unsafe fn allBundles() -> Id, Shared> { + msg_send_id![Self::class(), allBundles] + } + pub unsafe fn allFrameworks() -> Id, Shared> { + msg_send_id![Self::class(), allFrameworks] + } + pub unsafe fn load(&self) -> bool { + msg_send![self, load] + } + pub unsafe fn isLoaded(&self) -> bool { + msg_send![self, isLoaded] + } + pub unsafe fn unload(&self) -> bool { + msg_send![self, unload] + } + pub unsafe fn preflightAndReturnError(&self) -> Result<(), Id> { + msg_send![self, preflightAndReturnError: _] + } + pub unsafe fn loadAndReturnError(&self) -> Result<(), Id> { + msg_send![self, loadAndReturnError: _] + } + pub unsafe fn bundleURL(&self) -> Id { + msg_send_id![self, bundleURL] + } + pub unsafe fn resourceURL(&self) -> Option> { + msg_send_id![self, resourceURL] + } + pub unsafe fn executableURL(&self) -> Option> { + msg_send_id![self, executableURL] + } + pub unsafe fn URLForAuxiliaryExecutable( + &self, + executableName: &NSString, + ) -> Option> { + msg_send_id![self, URLForAuxiliaryExecutable: executableName] + } + pub unsafe fn privateFrameworksURL(&self) -> Option> { + msg_send_id![self, privateFrameworksURL] + } + pub unsafe fn sharedFrameworksURL(&self) -> Option> { + msg_send_id![self, sharedFrameworksURL] + } + pub unsafe fn sharedSupportURL(&self) -> Option> { + msg_send_id![self, sharedSupportURL] + } + pub unsafe fn builtInPlugInsURL(&self) -> Option> { + msg_send_id![self, builtInPlugInsURL] + } + pub unsafe fn appStoreReceiptURL(&self) -> Option> { + msg_send_id![self, appStoreReceiptURL] + } + pub unsafe fn bundlePath(&self) -> Id { + msg_send_id![self, bundlePath] + } + pub unsafe fn resourcePath(&self) -> Option> { + msg_send_id![self, resourcePath] + } + pub unsafe fn executablePath(&self) -> Option> { + msg_send_id![self, executablePath] + } + pub unsafe fn pathForAuxiliaryExecutable( + &self, + executableName: &NSString, + ) -> Option> { + msg_send_id![self, pathForAuxiliaryExecutable: executableName] + } + pub unsafe fn privateFrameworksPath(&self) -> Option> { + msg_send_id![self, privateFrameworksPath] + } + pub unsafe fn sharedFrameworksPath(&self) -> Option> { + msg_send_id![self, sharedFrameworksPath] + } + pub unsafe fn sharedSupportPath(&self) -> Option> { + msg_send_id![self, sharedSupportPath] + } + pub unsafe fn builtInPlugInsPath(&self) -> Option> { + msg_send_id![self, builtInPlugInsPath] + } + pub unsafe fn URLForResource_withExtension_subdirectory_inBundleWithURL( + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + bundleURL: &NSURL, + ) -> Option> { + msg_send_id![ + Self::class(), + URLForResource: name, + withExtension: ext, + subdirectory: subpath, + inBundleWithURL: bundleURL + ] + } + pub unsafe fn URLsForResourcesWithExtension_subdirectory_inBundleWithURL( + ext: Option<&NSString>, + subpath: Option<&NSString>, + bundleURL: &NSURL, + ) -> Option, Shared>> { + msg_send_id![ + Self::class(), + URLsForResourcesWithExtension: ext, + subdirectory: subpath, + inBundleWithURL: bundleURL + ] + } + pub unsafe fn URLForResource_withExtension( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + ) -> Option> { + msg_send_id![self, URLForResource: name, withExtension: ext] + } + pub unsafe fn URLForResource_withExtension_subdirectory( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + ) -> Option> { + msg_send_id![ + self, + URLForResource: name, + withExtension: ext, + subdirectory: subpath + ] + } + pub unsafe fn URLForResource_withExtension_subdirectory_localization( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + localizationName: Option<&NSString>, + ) -> Option> { + msg_send_id![ + self, + URLForResource: name, + withExtension: ext, + subdirectory: subpath, + localization: localizationName + ] + } + pub unsafe fn URLsForResourcesWithExtension_subdirectory( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + ) -> Option, Shared>> { + msg_send_id![ + self, + URLsForResourcesWithExtension: ext, + subdirectory: subpath + ] + } + pub unsafe fn URLsForResourcesWithExtension_subdirectory_localization( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + localizationName: Option<&NSString>, + ) -> Option, Shared>> { + msg_send_id![ + self, + URLsForResourcesWithExtension: ext, + subdirectory: subpath, + localization: localizationName + ] + } + pub unsafe fn pathForResource_ofType_inDirectory( + name: Option<&NSString>, + ext: Option<&NSString>, + bundlePath: &NSString, + ) -> Option> { + msg_send_id![ + Self::class(), + pathForResource: name, + ofType: ext, + inDirectory: bundlePath + ] + } + pub unsafe fn pathsForResourcesOfType_inDirectory( + ext: Option<&NSString>, + bundlePath: &NSString, + ) -> Id, Shared> { + msg_send_id![ + Self::class(), + pathsForResourcesOfType: ext, + inDirectory: bundlePath + ] + } + pub unsafe fn pathForResource_ofType( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + ) -> Option> { + msg_send_id![self, pathForResource: name, ofType: ext] + } + pub unsafe fn pathForResource_ofType_inDirectory( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + ) -> Option> { + msg_send_id![ + self, + pathForResource: name, + ofType: ext, + inDirectory: subpath + ] + } + pub unsafe fn pathForResource_ofType_inDirectory_forLocalization( + &self, + name: Option<&NSString>, + ext: Option<&NSString>, + subpath: Option<&NSString>, + localizationName: Option<&NSString>, + ) -> Option> { + msg_send_id![ + self, + pathForResource: name, + ofType: ext, + inDirectory: subpath, + forLocalization: localizationName + ] + } + pub unsafe fn pathsForResourcesOfType_inDirectory( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + ) -> Id, Shared> { + msg_send_id![self, pathsForResourcesOfType: ext, inDirectory: subpath] + } + pub unsafe fn pathsForResourcesOfType_inDirectory_forLocalization( + &self, + ext: Option<&NSString>, + subpath: Option<&NSString>, + localizationName: Option<&NSString>, + ) -> Id, Shared> { + msg_send_id![ + self, + pathsForResourcesOfType: ext, + inDirectory: subpath, + forLocalization: localizationName + ] + } + pub unsafe fn localizedStringForKey_value_table( + &self, + key: &NSString, + value: Option<&NSString>, + tableName: Option<&NSString>, + ) -> Id { + msg_send_id![ + self, + localizedStringForKey: key, + value: value, + table: tableName + ] + } + pub unsafe fn localizedAttributedStringForKey_value_table( + &self, + key: &NSString, + value: Option<&NSString>, + tableName: Option<&NSString>, + ) -> Id { + msg_send_id![ + self, + localizedAttributedStringForKey: key, + value: value, + table: tableName + ] + } + pub unsafe fn bundleIdentifier(&self) -> Option> { + msg_send_id![self, bundleIdentifier] + } + pub unsafe fn infoDictionary(&self) -> Option, Shared>> { + msg_send_id![self, infoDictionary] + } + pub unsafe fn localizedInfoDictionary( + &self, + ) -> Option, Shared>> { + msg_send_id![self, localizedInfoDictionary] + } + pub unsafe fn objectForInfoDictionaryKey( + &self, + key: &NSString, + ) -> Option> { + msg_send_id![self, objectForInfoDictionaryKey: key] + } + pub unsafe fn classNamed(&self, className: &NSString) -> Option<&Class> { + msg_send![self, classNamed: className] + } + pub unsafe fn principalClass(&self) -> Option<&Class> { + msg_send![self, principalClass] + } + pub unsafe fn preferredLocalizations(&self) -> Id, Shared> { + msg_send_id![self, preferredLocalizations] + } + pub unsafe fn localizations(&self) -> Id, Shared> { + msg_send_id![self, localizations] + } + pub unsafe fn developmentLocalization(&self) -> Option> { + msg_send_id![self, developmentLocalization] + } + pub unsafe fn preferredLocalizationsFromArray( + localizationsArray: &NSArray, + ) -> Id, Shared> { + msg_send_id![ + Self::class(), + preferredLocalizationsFromArray: localizationsArray + ] + } + pub unsafe fn preferredLocalizationsFromArray_forPreferences( + localizationsArray: &NSArray, + preferencesArray: Option<&NSArray>, + ) -> Id, Shared> { + msg_send_id![ + Self::class(), + preferredLocalizationsFromArray: localizationsArray, + forPreferences: preferencesArray + ] + } + pub unsafe fn executableArchitectures(&self) -> Option, Shared>> { + msg_send_id![self, executableArchitectures] + } } - pub unsafe fn bundleWithPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), bundleWithPath: path] - } - pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithPath: path] - } - pub unsafe fn bundleWithURL(url: &NSURL) -> Option> { - msg_send_id![Self::class(), bundleWithURL: url] - } - pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithURL: url] - } - pub unsafe fn bundleForClass(aClass: &Class) -> Id { - msg_send_id![Self::class(), bundleForClass: aClass] - } - pub unsafe fn bundleWithIdentifier(identifier: &NSString) -> Option> { - msg_send_id![Self::class(), bundleWithIdentifier: identifier] - } - pub unsafe fn allBundles() -> Id, Shared> { - msg_send_id![Self::class(), allBundles] - } - pub unsafe fn allFrameworks() -> Id, Shared> { - msg_send_id![Self::class(), allFrameworks] - } - pub unsafe fn load(&self) -> bool { - msg_send![self, load] - } - pub unsafe fn isLoaded(&self) -> bool { - msg_send![self, isLoaded] - } - pub unsafe fn unload(&self) -> bool { - msg_send![self, unload] - } - pub unsafe fn preflightAndReturnError(&self) -> Result<(), Id> { - msg_send![self, preflightAndReturnError: _] - } - pub unsafe fn loadAndReturnError(&self) -> Result<(), Id> { - msg_send![self, loadAndReturnError: _] - } - pub unsafe fn bundleURL(&self) -> Id { - msg_send_id![self, bundleURL] - } - pub unsafe fn resourceURL(&self) -> Option> { - msg_send_id![self, resourceURL] - } - pub unsafe fn executableURL(&self) -> Option> { - msg_send_id![self, executableURL] - } - pub unsafe fn URLForAuxiliaryExecutable( - &self, - executableName: &NSString, - ) -> Option> { - msg_send_id![self, URLForAuxiliaryExecutable: executableName] - } - pub unsafe fn privateFrameworksURL(&self) -> Option> { - msg_send_id![self, privateFrameworksURL] - } - pub unsafe fn sharedFrameworksURL(&self) -> Option> { - msg_send_id![self, sharedFrameworksURL] - } - pub unsafe fn sharedSupportURL(&self) -> Option> { - msg_send_id![self, sharedSupportURL] - } - pub unsafe fn builtInPlugInsURL(&self) -> Option> { - msg_send_id![self, builtInPlugInsURL] - } - pub unsafe fn appStoreReceiptURL(&self) -> Option> { - msg_send_id![self, appStoreReceiptURL] - } - pub unsafe fn bundlePath(&self) -> Id { - msg_send_id![self, bundlePath] - } - pub unsafe fn resourcePath(&self) -> Option> { - msg_send_id![self, resourcePath] - } - pub unsafe fn executablePath(&self) -> Option> { - msg_send_id![self, executablePath] - } - pub unsafe fn pathForAuxiliaryExecutable( - &self, - executableName: &NSString, - ) -> Option> { - msg_send_id![self, pathForAuxiliaryExecutable: executableName] - } - pub unsafe fn privateFrameworksPath(&self) -> Option> { - msg_send_id![self, privateFrameworksPath] - } - pub unsafe fn sharedFrameworksPath(&self) -> Option> { - msg_send_id![self, sharedFrameworksPath] - } - pub unsafe fn sharedSupportPath(&self) -> Option> { - msg_send_id![self, sharedSupportPath] - } - pub unsafe fn builtInPlugInsPath(&self) -> Option> { - msg_send_id![self, builtInPlugInsPath] - } - pub unsafe fn URLForResource_withExtension_subdirectory_inBundleWithURL( - name: Option<&NSString>, - ext: Option<&NSString>, - subpath: Option<&NSString>, - bundleURL: &NSURL, - ) -> Option> { - msg_send_id![ - Self::class(), - URLForResource: name, - withExtension: ext, - subdirectory: subpath, - inBundleWithURL: bundleURL - ] - } - pub unsafe fn URLsForResourcesWithExtension_subdirectory_inBundleWithURL( - ext: Option<&NSString>, - subpath: Option<&NSString>, - bundleURL: &NSURL, - ) -> Option, Shared>> { - msg_send_id![ - Self::class(), - URLsForResourcesWithExtension: ext, - subdirectory: subpath, - inBundleWithURL: bundleURL - ] - } - pub unsafe fn URLForResource_withExtension( - &self, - name: Option<&NSString>, - ext: Option<&NSString>, - ) -> Option> { - msg_send_id![self, URLForResource: name, withExtension: ext] - } - pub unsafe fn URLForResource_withExtension_subdirectory( - &self, - name: Option<&NSString>, - ext: Option<&NSString>, - subpath: Option<&NSString>, - ) -> Option> { - msg_send_id![ - self, - URLForResource: name, - withExtension: ext, - subdirectory: subpath - ] - } - pub unsafe fn URLForResource_withExtension_subdirectory_localization( - &self, - name: Option<&NSString>, - ext: Option<&NSString>, - subpath: Option<&NSString>, - localizationName: Option<&NSString>, - ) -> Option> { - msg_send_id![ - self, - URLForResource: name, - withExtension: ext, - subdirectory: subpath, - localization: localizationName - ] - } - pub unsafe fn URLsForResourcesWithExtension_subdirectory( - &self, - ext: Option<&NSString>, - subpath: Option<&NSString>, - ) -> Option, Shared>> { - msg_send_id![ - self, - URLsForResourcesWithExtension: ext, - subdirectory: subpath - ] - } - pub unsafe fn URLsForResourcesWithExtension_subdirectory_localization( - &self, - ext: Option<&NSString>, - subpath: Option<&NSString>, - localizationName: Option<&NSString>, - ) -> Option, Shared>> { - msg_send_id![ - self, - URLsForResourcesWithExtension: ext, - subdirectory: subpath, - localization: localizationName - ] - } - pub unsafe fn pathForResource_ofType_inDirectory( - name: Option<&NSString>, - ext: Option<&NSString>, - bundlePath: &NSString, - ) -> Option> { - msg_send_id![ - Self::class(), - pathForResource: name, - ofType: ext, - inDirectory: bundlePath - ] - } - pub unsafe fn pathsForResourcesOfType_inDirectory( - ext: Option<&NSString>, - bundlePath: &NSString, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - pathsForResourcesOfType: ext, - inDirectory: bundlePath - ] - } - pub unsafe fn pathForResource_ofType( - &self, - name: Option<&NSString>, - ext: Option<&NSString>, - ) -> Option> { - msg_send_id![self, pathForResource: name, ofType: ext] - } - pub unsafe fn pathForResource_ofType_inDirectory( - &self, - name: Option<&NSString>, - ext: Option<&NSString>, - subpath: Option<&NSString>, - ) -> Option> { - msg_send_id![ - self, - pathForResource: name, - ofType: ext, - inDirectory: subpath - ] - } - pub unsafe fn pathForResource_ofType_inDirectory_forLocalization( - &self, - name: Option<&NSString>, - ext: Option<&NSString>, - subpath: Option<&NSString>, - localizationName: Option<&NSString>, - ) -> Option> { - msg_send_id![ - self, - pathForResource: name, - ofType: ext, - inDirectory: subpath, - forLocalization: localizationName - ] - } - pub unsafe fn pathsForResourcesOfType_inDirectory( - &self, - ext: Option<&NSString>, - subpath: Option<&NSString>, - ) -> Id, Shared> { - msg_send_id![self, pathsForResourcesOfType: ext, inDirectory: subpath] - } - pub unsafe fn pathsForResourcesOfType_inDirectory_forLocalization( - &self, - ext: Option<&NSString>, - subpath: Option<&NSString>, - localizationName: Option<&NSString>, - ) -> Id, Shared> { - msg_send_id![ - self, - pathsForResourcesOfType: ext, - inDirectory: subpath, - forLocalization: localizationName - ] - } - pub unsafe fn localizedStringForKey_value_table( - &self, - key: &NSString, - value: Option<&NSString>, - tableName: Option<&NSString>, - ) -> Id { - msg_send_id![ - self, - localizedStringForKey: key, - value: value, - table: tableName - ] - } - pub unsafe fn localizedAttributedStringForKey_value_table( - &self, - key: &NSString, - value: Option<&NSString>, - tableName: Option<&NSString>, - ) -> Id { - msg_send_id![ - self, - localizedAttributedStringForKey: key, - value: value, - table: tableName - ] - } - pub unsafe fn bundleIdentifier(&self) -> Option> { - msg_send_id![self, bundleIdentifier] - } - pub unsafe fn infoDictionary(&self) -> Option, Shared>> { - msg_send_id![self, infoDictionary] - } - pub unsafe fn localizedInfoDictionary( - &self, - ) -> Option, Shared>> { - msg_send_id![self, localizedInfoDictionary] - } - pub unsafe fn objectForInfoDictionaryKey(&self, key: &NSString) -> Option> { - msg_send_id![self, objectForInfoDictionaryKey: key] - } - pub unsafe fn classNamed(&self, className: &NSString) -> Option<&Class> { - msg_send![self, classNamed: className] - } - pub unsafe fn principalClass(&self) -> Option<&Class> { - msg_send![self, principalClass] - } - pub unsafe fn preferredLocalizations(&self) -> Id, Shared> { - msg_send_id![self, preferredLocalizations] - } - pub unsafe fn localizations(&self) -> Id, Shared> { - msg_send_id![self, localizations] - } - pub unsafe fn developmentLocalization(&self) -> Option> { - msg_send_id![self, developmentLocalization] - } - pub unsafe fn preferredLocalizationsFromArray( - localizationsArray: &NSArray, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - preferredLocalizationsFromArray: localizationsArray - ] - } - pub unsafe fn preferredLocalizationsFromArray_forPreferences( - localizationsArray: &NSArray, - preferencesArray: Option<&NSArray>, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - preferredLocalizationsFromArray: localizationsArray, - forPreferences: preferencesArray - ] - } - pub unsafe fn executableArchitectures(&self) -> Option, Shared>> { - msg_send_id![self, executableArchitectures] - } -} -#[doc = "NSBundleExtensionMethods"] -impl NSString { - pub unsafe fn variantFittingPresentationWidth(&self, width: NSInteger) -> Id { - msg_send_id![self, variantFittingPresentationWidth: width] +); +extern_methods!( + #[doc = "NSBundleExtensionMethods"] + unsafe impl NSString { + pub unsafe fn variantFittingPresentationWidth( + &self, + width: NSInteger, + ) -> Id { + msg_send_id![self, variantFittingPresentationWidth: width] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSBundleResourceRequest; @@ -374,67 +384,71 @@ extern_class!( type Super = NSObject; } ); -impl NSBundleResourceRequest { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithTags(&self, tags: &NSSet) -> Id { - msg_send_id![self, initWithTags: tags] - } - pub unsafe fn initWithTags_bundle( - &self, - tags: &NSSet, - bundle: &NSBundle, - ) -> Id { - msg_send_id![self, initWithTags: tags, bundle: bundle] - } - pub unsafe fn loadingPriority(&self) -> c_double { - msg_send![self, loadingPriority] - } - pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double) { - msg_send![self, setLoadingPriority: loadingPriority] +extern_methods!( + unsafe impl NSBundleResourceRequest { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithTags(&self, tags: &NSSet) -> Id { + msg_send_id![self, initWithTags: tags] + } + pub unsafe fn initWithTags_bundle( + &self, + tags: &NSSet, + bundle: &NSBundle, + ) -> Id { + msg_send_id![self, initWithTags: tags, bundle: bundle] + } + pub unsafe fn loadingPriority(&self) -> c_double { + msg_send![self, loadingPriority] + } + pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double) { + msg_send![self, setLoadingPriority: loadingPriority] + } + pub unsafe fn tags(&self) -> Id, Shared> { + msg_send_id![self, tags] + } + pub unsafe fn bundle(&self) -> Id { + msg_send_id![self, bundle] + } + pub unsafe fn beginAccessingResourcesWithCompletionHandler( + &self, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + beginAccessingResourcesWithCompletionHandler: completionHandler + ] + } + pub unsafe fn conditionallyBeginAccessingResourcesWithCompletionHandler( + &self, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + conditionallyBeginAccessingResourcesWithCompletionHandler: completionHandler + ] + } + pub unsafe fn endAccessingResources(&self) { + msg_send![self, endAccessingResources] + } + pub unsafe fn progress(&self) -> Id { + msg_send_id![self, progress] + } } - pub unsafe fn tags(&self) -> Id, Shared> { - msg_send_id![self, tags] - } - pub unsafe fn bundle(&self) -> Id { - msg_send_id![self, bundle] - } - pub unsafe fn beginAccessingResourcesWithCompletionHandler( - &self, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - beginAccessingResourcesWithCompletionHandler: completionHandler - ] - } - pub unsafe fn conditionallyBeginAccessingResourcesWithCompletionHandler( - &self, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - conditionallyBeginAccessingResourcesWithCompletionHandler: completionHandler - ] - } - pub unsafe fn endAccessingResources(&self) { - msg_send![self, endAccessingResources] - } - pub unsafe fn progress(&self) -> Id { - msg_send_id![self, progress] - } -} -#[doc = "NSBundleResourceRequestAdditions"] -impl NSBundle { - pub unsafe fn setPreservationPriority_forTags( - &self, - priority: c_double, - tags: &NSSet, - ) { - msg_send![self, setPreservationPriority: priority, forTags: tags] - } - pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double { - msg_send![self, preservationPriorityForTag: tag] +); +extern_methods!( + #[doc = "NSBundleResourceRequestAdditions"] + unsafe impl NSBundle { + pub unsafe fn setPreservationPriority_forTags( + &self, + priority: c_double, + tags: &NSSet, + ) { + msg_send![self, setPreservationPriority: priority, forTags: tags] + } + pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double { + msg_send![self, preservationPriorityForTag: tag] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 78ee973a2..4db8aa132 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSMeasurement::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSByteCountFormatter; @@ -11,97 +11,99 @@ extern_class!( type Super = NSFormatter; } ); -impl NSByteCountFormatter { - pub unsafe fn stringFromByteCount_countStyle( - byteCount: c_longlong, - countStyle: NSByteCountFormatterCountStyle, - ) -> Id { - msg_send_id![ - Self::class(), - stringFromByteCount: byteCount, - countStyle: countStyle - ] +extern_methods!( + unsafe impl NSByteCountFormatter { + pub unsafe fn stringFromByteCount_countStyle( + byteCount: c_longlong, + countStyle: NSByteCountFormatterCountStyle, + ) -> Id { + msg_send_id![ + Self::class(), + stringFromByteCount: byteCount, + countStyle: countStyle + ] + } + pub unsafe fn stringFromByteCount(&self, byteCount: c_longlong) -> Id { + msg_send_id![self, stringFromByteCount: byteCount] + } + pub unsafe fn stringFromMeasurement_countStyle( + measurement: &NSMeasurement, + countStyle: NSByteCountFormatterCountStyle, + ) -> Id { + msg_send_id![ + Self::class(), + stringFromMeasurement: measurement, + countStyle: countStyle + ] + } + pub unsafe fn stringFromMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id { + msg_send_id![self, stringFromMeasurement: measurement] + } + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } + pub unsafe fn allowedUnits(&self) -> NSByteCountFormatterUnits { + msg_send![self, allowedUnits] + } + pub unsafe fn setAllowedUnits(&self, allowedUnits: NSByteCountFormatterUnits) { + msg_send![self, setAllowedUnits: allowedUnits] + } + pub unsafe fn countStyle(&self) -> NSByteCountFormatterCountStyle { + msg_send![self, countStyle] + } + pub unsafe fn setCountStyle(&self, countStyle: NSByteCountFormatterCountStyle) { + msg_send![self, setCountStyle: countStyle] + } + pub unsafe fn allowsNonnumericFormatting(&self) -> bool { + msg_send![self, allowsNonnumericFormatting] + } + pub unsafe fn setAllowsNonnumericFormatting(&self, allowsNonnumericFormatting: bool) { + msg_send![ + self, + setAllowsNonnumericFormatting: allowsNonnumericFormatting + ] + } + pub unsafe fn includesUnit(&self) -> bool { + msg_send![self, includesUnit] + } + pub unsafe fn setIncludesUnit(&self, includesUnit: bool) { + msg_send![self, setIncludesUnit: includesUnit] + } + pub unsafe fn includesCount(&self) -> bool { + msg_send![self, includesCount] + } + pub unsafe fn setIncludesCount(&self, includesCount: bool) { + msg_send![self, setIncludesCount: includesCount] + } + pub unsafe fn includesActualByteCount(&self) -> bool { + msg_send![self, includesActualByteCount] + } + pub unsafe fn setIncludesActualByteCount(&self, includesActualByteCount: bool) { + msg_send![self, setIncludesActualByteCount: includesActualByteCount] + } + pub unsafe fn isAdaptive(&self) -> bool { + msg_send![self, isAdaptive] + } + pub unsafe fn setAdaptive(&self, adaptive: bool) { + msg_send![self, setAdaptive: adaptive] + } + pub unsafe fn zeroPadsFractionDigits(&self) -> bool { + msg_send![self, zeroPadsFractionDigits] + } + pub unsafe fn setZeroPadsFractionDigits(&self, zeroPadsFractionDigits: bool) { + msg_send![self, setZeroPadsFractionDigits: zeroPadsFractionDigits] + } + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } } - pub unsafe fn stringFromByteCount(&self, byteCount: c_longlong) -> Id { - msg_send_id![self, stringFromByteCount: byteCount] - } - pub unsafe fn stringFromMeasurement_countStyle( - measurement: &NSMeasurement, - countStyle: NSByteCountFormatterCountStyle, - ) -> Id { - msg_send_id![ - Self::class(), - stringFromMeasurement: measurement, - countStyle: countStyle - ] - } - pub unsafe fn stringFromMeasurement( - &self, - measurement: &NSMeasurement, - ) -> Id { - msg_send_id![self, stringFromMeasurement: measurement] - } - pub unsafe fn stringForObjectValue( - &self, - obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] - } - pub unsafe fn allowedUnits(&self) -> NSByteCountFormatterUnits { - msg_send![self, allowedUnits] - } - pub unsafe fn setAllowedUnits(&self, allowedUnits: NSByteCountFormatterUnits) { - msg_send![self, setAllowedUnits: allowedUnits] - } - pub unsafe fn countStyle(&self) -> NSByteCountFormatterCountStyle { - msg_send![self, countStyle] - } - pub unsafe fn setCountStyle(&self, countStyle: NSByteCountFormatterCountStyle) { - msg_send![self, setCountStyle: countStyle] - } - pub unsafe fn allowsNonnumericFormatting(&self) -> bool { - msg_send![self, allowsNonnumericFormatting] - } - pub unsafe fn setAllowsNonnumericFormatting(&self, allowsNonnumericFormatting: bool) { - msg_send![ - self, - setAllowsNonnumericFormatting: allowsNonnumericFormatting - ] - } - pub unsafe fn includesUnit(&self) -> bool { - msg_send![self, includesUnit] - } - pub unsafe fn setIncludesUnit(&self, includesUnit: bool) { - msg_send![self, setIncludesUnit: includesUnit] - } - pub unsafe fn includesCount(&self) -> bool { - msg_send![self, includesCount] - } - pub unsafe fn setIncludesCount(&self, includesCount: bool) { - msg_send![self, setIncludesCount: includesCount] - } - pub unsafe fn includesActualByteCount(&self) -> bool { - msg_send![self, includesActualByteCount] - } - pub unsafe fn setIncludesActualByteCount(&self, includesActualByteCount: bool) { - msg_send![self, setIncludesActualByteCount: includesActualByteCount] - } - pub unsafe fn isAdaptive(&self) -> bool { - msg_send![self, isAdaptive] - } - pub unsafe fn setAdaptive(&self, adaptive: bool) { - msg_send![self, setAdaptive: adaptive] - } - pub unsafe fn zeroPadsFractionDigits(&self) -> bool { - msg_send![self, zeroPadsFractionDigits] - } - pub unsafe fn setZeroPadsFractionDigits(&self, zeroPadsFractionDigits: bool) { - msg_send![self, setZeroPadsFractionDigits: zeroPadsFractionDigits] - } - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] - } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index b2988d2a8..88346ff8e 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -3,4 +3,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index bf2079fa3..c797b694c 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSCache; @@ -11,57 +11,59 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSCache { - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] +extern_methods!( + unsafe impl NSCache { + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: &NSString) { + msg_send![self, setName: name] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn objectForKey(&self, key: &KeyType) -> Option> { + msg_send_id![self, objectForKey: key] + } + pub unsafe fn setObject_forKey(&self, obj: &ObjectType, key: &KeyType) { + msg_send![self, setObject: obj, forKey: key] + } + pub unsafe fn setObject_forKey_cost(&self, obj: &ObjectType, key: &KeyType, g: NSUInteger) { + msg_send![self, setObject: obj, forKey: key, cost: g] + } + pub unsafe fn removeObjectForKey(&self, key: &KeyType) { + msg_send![self, removeObjectForKey: key] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn totalCostLimit(&self) -> NSUInteger { + msg_send![self, totalCostLimit] + } + pub unsafe fn setTotalCostLimit(&self, totalCostLimit: NSUInteger) { + msg_send![self, setTotalCostLimit: totalCostLimit] + } + pub unsafe fn countLimit(&self) -> NSUInteger { + msg_send![self, countLimit] + } + pub unsafe fn setCountLimit(&self, countLimit: NSUInteger) { + msg_send![self, setCountLimit: countLimit] + } + pub unsafe fn evictsObjectsWithDiscardedContent(&self) -> bool { + msg_send![self, evictsObjectsWithDiscardedContent] + } + pub unsafe fn setEvictsObjectsWithDiscardedContent( + &self, + evictsObjectsWithDiscardedContent: bool, + ) { + msg_send![ + self, + setEvictsObjectsWithDiscardedContent: evictsObjectsWithDiscardedContent + ] + } } - pub unsafe fn setName(&self, name: &NSString) { - msg_send![self, setName: name] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn objectForKey(&self, key: &KeyType) -> Option> { - msg_send_id![self, objectForKey: key] - } - pub unsafe fn setObject_forKey(&self, obj: &ObjectType, key: &KeyType) { - msg_send![self, setObject: obj, forKey: key] - } - pub unsafe fn setObject_forKey_cost(&self, obj: &ObjectType, key: &KeyType, g: NSUInteger) { - msg_send![self, setObject: obj, forKey: key, cost: g] - } - pub unsafe fn removeObjectForKey(&self, key: &KeyType) { - msg_send![self, removeObjectForKey: key] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn totalCostLimit(&self) -> NSUInteger { - msg_send![self, totalCostLimit] - } - pub unsafe fn setTotalCostLimit(&self, totalCostLimit: NSUInteger) { - msg_send![self, setTotalCostLimit: totalCostLimit] - } - pub unsafe fn countLimit(&self) -> NSUInteger { - msg_send![self, countLimit] - } - pub unsafe fn setCountLimit(&self, countLimit: NSUInteger) { - msg_send![self, setCountLimit: countLimit] - } - pub unsafe fn evictsObjectsWithDiscardedContent(&self) -> bool { - msg_send![self, evictsObjectsWithDiscardedContent] - } - pub unsafe fn setEvictsObjectsWithDiscardedContent( - &self, - evictsObjectsWithDiscardedContent: bool, - ) { - msg_send![ - self, - setEvictsObjectsWithDiscardedContent: evictsObjectsWithDiscardedContent - ] - } -} +); pub type NSCacheDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 1b090b58e..a152e2b67 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSCalendarIdentifier = NSString; extern_class!( #[derive(Debug)] @@ -19,509 +19,511 @@ extern_class!( type Super = NSObject; } ); -impl NSCalendar { - pub unsafe fn currentCalendar() -> Id { - msg_send_id![Self::class(), currentCalendar] +extern_methods!( + unsafe impl NSCalendar { + pub unsafe fn currentCalendar() -> Id { + msg_send_id![Self::class(), currentCalendar] + } + pub unsafe fn autoupdatingCurrentCalendar() -> Id { + msg_send_id![Self::class(), autoupdatingCurrentCalendar] + } + pub unsafe fn calendarWithIdentifier( + calendarIdentifierConstant: &NSCalendarIdentifier, + ) -> Option> { + msg_send_id![ + Self::class(), + calendarWithIdentifier: calendarIdentifierConstant + ] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCalendarIdentifier( + &self, + ident: &NSCalendarIdentifier, + ) -> Option> { + msg_send_id![self, initWithCalendarIdentifier: ident] + } + pub unsafe fn calendarIdentifier(&self) -> Id { + msg_send_id![self, calendarIdentifier] + } + pub unsafe fn locale(&self) -> Option> { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: &NSTimeZone) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn firstWeekday(&self) -> NSUInteger { + msg_send![self, firstWeekday] + } + pub unsafe fn setFirstWeekday(&self, firstWeekday: NSUInteger) { + msg_send![self, setFirstWeekday: firstWeekday] + } + pub unsafe fn minimumDaysInFirstWeek(&self) -> NSUInteger { + msg_send![self, minimumDaysInFirstWeek] + } + pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger) { + msg_send![self, setMinimumDaysInFirstWeek: minimumDaysInFirstWeek] + } + pub unsafe fn eraSymbols(&self) -> Id, Shared> { + msg_send_id![self, eraSymbols] + } + pub unsafe fn longEraSymbols(&self) -> Id, Shared> { + msg_send_id![self, longEraSymbols] + } + pub unsafe fn monthSymbols(&self) -> Id, Shared> { + msg_send_id![self, monthSymbols] + } + pub unsafe fn shortMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortMonthSymbols] + } + pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortMonthSymbols] + } + pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneMonthSymbols] + } + pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneMonthSymbols] + } + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortStandaloneMonthSymbols] + } + pub unsafe fn weekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, weekdaySymbols] + } + pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, shortWeekdaySymbols] + } + pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortWeekdaySymbols] + } + pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneWeekdaySymbols] + } + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneWeekdaySymbols] + } + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortStandaloneWeekdaySymbols] + } + pub unsafe fn quarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, quarterSymbols] + } + pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortQuarterSymbols] + } + pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneQuarterSymbols] + } + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneQuarterSymbols] + } + pub unsafe fn AMSymbol(&self) -> Id { + msg_send_id![self, AMSymbol] + } + pub unsafe fn PMSymbol(&self) -> Id { + msg_send_id![self, PMSymbol] + } + pub unsafe fn minimumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange { + msg_send![self, minimumRangeOfUnit: unit] + } + pub unsafe fn maximumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange { + msg_send![self, maximumRangeOfUnit: unit] + } + pub unsafe fn rangeOfUnit_inUnit_forDate( + &self, + smaller: NSCalendarUnit, + larger: NSCalendarUnit, + date: &NSDate, + ) -> NSRange { + msg_send![self, rangeOfUnit: smaller, inUnit: larger, forDate: date] + } + pub unsafe fn ordinalityOfUnit_inUnit_forDate( + &self, + smaller: NSCalendarUnit, + larger: NSCalendarUnit, + date: &NSDate, + ) -> NSUInteger { + msg_send![ + self, + ordinalityOfUnit: smaller, + inUnit: larger, + forDate: date + ] + } + pub unsafe fn rangeOfUnit_startDate_interval_forDate( + &self, + unit: NSCalendarUnit, + datep: Option<&mut Option>>, + tip: *mut NSTimeInterval, + date: &NSDate, + ) -> bool { + msg_send![ + self, + rangeOfUnit: unit, + startDate: datep, + interval: tip, + forDate: date + ] + } + pub unsafe fn dateFromComponents( + &self, + comps: &NSDateComponents, + ) -> Option> { + msg_send_id![self, dateFromComponents: comps] + } + pub unsafe fn components_fromDate( + &self, + unitFlags: NSCalendarUnit, + date: &NSDate, + ) -> Id { + msg_send_id![self, components: unitFlags, fromDate: date] + } + pub unsafe fn dateByAddingComponents_toDate_options( + &self, + comps: &NSDateComponents, + date: &NSDate, + opts: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + dateByAddingComponents: comps, + toDate: date, + options: opts + ] + } + pub unsafe fn components_fromDate_toDate_options( + &self, + unitFlags: NSCalendarUnit, + startingDate: &NSDate, + resultDate: &NSDate, + opts: NSCalendarOptions, + ) -> Id { + msg_send_id![ + self, + components: unitFlags, + fromDate: startingDate, + toDate: resultDate, + options: opts + ] + } + pub unsafe fn getEra_year_month_day_fromDate( + &self, + eraValuePointer: *mut NSInteger, + yearValuePointer: *mut NSInteger, + monthValuePointer: *mut NSInteger, + dayValuePointer: *mut NSInteger, + date: &NSDate, + ) { + msg_send![ + self, + getEra: eraValuePointer, + year: yearValuePointer, + month: monthValuePointer, + day: dayValuePointer, + fromDate: date + ] + } + pub unsafe fn getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate( + &self, + eraValuePointer: *mut NSInteger, + yearValuePointer: *mut NSInteger, + weekValuePointer: *mut NSInteger, + weekdayValuePointer: *mut NSInteger, + date: &NSDate, + ) { + msg_send![ + self, + getEra: eraValuePointer, + yearForWeekOfYear: yearValuePointer, + weekOfYear: weekValuePointer, + weekday: weekdayValuePointer, + fromDate: date + ] + } + pub unsafe fn getHour_minute_second_nanosecond_fromDate( + &self, + hourValuePointer: *mut NSInteger, + minuteValuePointer: *mut NSInteger, + secondValuePointer: *mut NSInteger, + nanosecondValuePointer: *mut NSInteger, + date: &NSDate, + ) { + msg_send![ + self, + getHour: hourValuePointer, + minute: minuteValuePointer, + second: secondValuePointer, + nanosecond: nanosecondValuePointer, + fromDate: date + ] + } + pub unsafe fn component_fromDate(&self, unit: NSCalendarUnit, date: &NSDate) -> NSInteger { + msg_send![self, component: unit, fromDate: date] + } + pub unsafe fn dateWithEra_year_month_day_hour_minute_second_nanosecond( + &self, + eraValue: NSInteger, + yearValue: NSInteger, + monthValue: NSInteger, + dayValue: NSInteger, + hourValue: NSInteger, + minuteValue: NSInteger, + secondValue: NSInteger, + nanosecondValue: NSInteger, + ) -> Option> { + msg_send_id![ + self, + dateWithEra: eraValue, + year: yearValue, + month: monthValue, + day: dayValue, + hour: hourValue, + minute: minuteValue, + second: secondValue, + nanosecond: nanosecondValue + ] + } + pub unsafe fn dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond( + &self, + eraValue: NSInteger, + yearValue: NSInteger, + weekValue: NSInteger, + weekdayValue: NSInteger, + hourValue: NSInteger, + minuteValue: NSInteger, + secondValue: NSInteger, + nanosecondValue: NSInteger, + ) -> Option> { + msg_send_id![ + self, + dateWithEra: eraValue, + yearForWeekOfYear: yearValue, + weekOfYear: weekValue, + weekday: weekdayValue, + hour: hourValue, + minute: minuteValue, + second: secondValue, + nanosecond: nanosecondValue + ] + } + pub unsafe fn startOfDayForDate(&self, date: &NSDate) -> Id { + msg_send_id![self, startOfDayForDate: date] + } + pub unsafe fn componentsInTimeZone_fromDate( + &self, + timezone: &NSTimeZone, + date: &NSDate, + ) -> Id { + msg_send_id![self, componentsInTimeZone: timezone, fromDate: date] + } + pub unsafe fn compareDate_toDate_toUnitGranularity( + &self, + date1: &NSDate, + date2: &NSDate, + unit: NSCalendarUnit, + ) -> NSComparisonResult { + msg_send![ + self, + compareDate: date1, + toDate: date2, + toUnitGranularity: unit + ] + } + pub unsafe fn isDate_equalToDate_toUnitGranularity( + &self, + date1: &NSDate, + date2: &NSDate, + unit: NSCalendarUnit, + ) -> bool { + msg_send![ + self, + isDate: date1, + equalToDate: date2, + toUnitGranularity: unit + ] + } + pub unsafe fn isDate_inSameDayAsDate(&self, date1: &NSDate, date2: &NSDate) -> bool { + msg_send![self, isDate: date1, inSameDayAsDate: date2] + } + pub unsafe fn isDateInToday(&self, date: &NSDate) -> bool { + msg_send![self, isDateInToday: date] + } + pub unsafe fn isDateInYesterday(&self, date: &NSDate) -> bool { + msg_send![self, isDateInYesterday: date] + } + pub unsafe fn isDateInTomorrow(&self, date: &NSDate) -> bool { + msg_send![self, isDateInTomorrow: date] + } + pub unsafe fn isDateInWeekend(&self, date: &NSDate) -> bool { + msg_send![self, isDateInWeekend: date] + } + pub unsafe fn rangeOfWeekendStartDate_interval_containingDate( + &self, + datep: Option<&mut Option>>, + tip: *mut NSTimeInterval, + date: &NSDate, + ) -> bool { + msg_send![ + self, + rangeOfWeekendStartDate: datep, + interval: tip, + containingDate: date + ] + } + pub unsafe fn nextWeekendStartDate_interval_options_afterDate( + &self, + datep: Option<&mut Option>>, + tip: *mut NSTimeInterval, + options: NSCalendarOptions, + date: &NSDate, + ) -> bool { + msg_send![ + self, + nextWeekendStartDate: datep, + interval: tip, + options: options, + afterDate: date + ] + } + pub unsafe fn components_fromDateComponents_toDateComponents_options( + &self, + unitFlags: NSCalendarUnit, + startingDateComp: &NSDateComponents, + resultDateComp: &NSDateComponents, + options: NSCalendarOptions, + ) -> Id { + msg_send_id![ + self, + components: unitFlags, + fromDateComponents: startingDateComp, + toDateComponents: resultDateComp, + options: options + ] + } + pub unsafe fn dateByAddingUnit_value_toDate_options( + &self, + unit: NSCalendarUnit, + value: NSInteger, + date: &NSDate, + options: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + dateByAddingUnit: unit, + value: value, + toDate: date, + options: options + ] + } + pub unsafe fn enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock( + &self, + start: &NSDate, + comps: &NSDateComponents, + opts: NSCalendarOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateDatesStartingAfterDate: start, + matchingComponents: comps, + options: opts, + usingBlock: block + ] + } + pub unsafe fn nextDateAfterDate_matchingComponents_options( + &self, + date: &NSDate, + comps: &NSDateComponents, + options: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + nextDateAfterDate: date, + matchingComponents: comps, + options: options + ] + } + pub unsafe fn nextDateAfterDate_matchingUnit_value_options( + &self, + date: &NSDate, + unit: NSCalendarUnit, + value: NSInteger, + options: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + nextDateAfterDate: date, + matchingUnit: unit, + value: value, + options: options + ] + } + pub unsafe fn nextDateAfterDate_matchingHour_minute_second_options( + &self, + date: &NSDate, + hourValue: NSInteger, + minuteValue: NSInteger, + secondValue: NSInteger, + options: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + nextDateAfterDate: date, + matchingHour: hourValue, + minute: minuteValue, + second: secondValue, + options: options + ] + } + pub unsafe fn dateBySettingUnit_value_ofDate_options( + &self, + unit: NSCalendarUnit, + v: NSInteger, + date: &NSDate, + opts: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + dateBySettingUnit: unit, + value: v, + ofDate: date, + options: opts + ] + } + pub unsafe fn dateBySettingHour_minute_second_ofDate_options( + &self, + h: NSInteger, + m: NSInteger, + s: NSInteger, + date: &NSDate, + opts: NSCalendarOptions, + ) -> Option> { + msg_send_id![ + self, + dateBySettingHour: h, + minute: m, + second: s, + ofDate: date, + options: opts + ] + } + pub unsafe fn date_matchesComponents( + &self, + date: &NSDate, + components: &NSDateComponents, + ) -> bool { + msg_send![self, date: date, matchesComponents: components] + } } - pub unsafe fn autoupdatingCurrentCalendar() -> Id { - msg_send_id![Self::class(), autoupdatingCurrentCalendar] - } - pub unsafe fn calendarWithIdentifier( - calendarIdentifierConstant: &NSCalendarIdentifier, - ) -> Option> { - msg_send_id![ - Self::class(), - calendarWithIdentifier: calendarIdentifierConstant - ] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCalendarIdentifier( - &self, - ident: &NSCalendarIdentifier, - ) -> Option> { - msg_send_id![self, initWithCalendarIdentifier: ident] - } - pub unsafe fn calendarIdentifier(&self) -> Id { - msg_send_id![self, calendarIdentifier] - } - pub unsafe fn locale(&self) -> Option> { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: &NSTimeZone) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn firstWeekday(&self) -> NSUInteger { - msg_send![self, firstWeekday] - } - pub unsafe fn setFirstWeekday(&self, firstWeekday: NSUInteger) { - msg_send![self, setFirstWeekday: firstWeekday] - } - pub unsafe fn minimumDaysInFirstWeek(&self) -> NSUInteger { - msg_send![self, minimumDaysInFirstWeek] - } - pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger) { - msg_send![self, setMinimumDaysInFirstWeek: minimumDaysInFirstWeek] - } - pub unsafe fn eraSymbols(&self) -> Id, Shared> { - msg_send_id![self, eraSymbols] - } - pub unsafe fn longEraSymbols(&self) -> Id, Shared> { - msg_send_id![self, longEraSymbols] - } - pub unsafe fn monthSymbols(&self) -> Id, Shared> { - msg_send_id![self, monthSymbols] - } - pub unsafe fn shortMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortMonthSymbols] - } - pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortMonthSymbols] - } - pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneMonthSymbols] - } - pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneMonthSymbols] - } - pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortStandaloneMonthSymbols] - } - pub unsafe fn weekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, weekdaySymbols] - } - pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, shortWeekdaySymbols] - } - pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortWeekdaySymbols] - } - pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneWeekdaySymbols] - } - pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneWeekdaySymbols] - } - pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortStandaloneWeekdaySymbols] - } - pub unsafe fn quarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, quarterSymbols] - } - pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortQuarterSymbols] - } - pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneQuarterSymbols] - } - pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneQuarterSymbols] - } - pub unsafe fn AMSymbol(&self) -> Id { - msg_send_id![self, AMSymbol] - } - pub unsafe fn PMSymbol(&self) -> Id { - msg_send_id![self, PMSymbol] - } - pub unsafe fn minimumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange { - msg_send![self, minimumRangeOfUnit: unit] - } - pub unsafe fn maximumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange { - msg_send![self, maximumRangeOfUnit: unit] - } - pub unsafe fn rangeOfUnit_inUnit_forDate( - &self, - smaller: NSCalendarUnit, - larger: NSCalendarUnit, - date: &NSDate, - ) -> NSRange { - msg_send![self, rangeOfUnit: smaller, inUnit: larger, forDate: date] - } - pub unsafe fn ordinalityOfUnit_inUnit_forDate( - &self, - smaller: NSCalendarUnit, - larger: NSCalendarUnit, - date: &NSDate, - ) -> NSUInteger { - msg_send![ - self, - ordinalityOfUnit: smaller, - inUnit: larger, - forDate: date - ] - } - pub unsafe fn rangeOfUnit_startDate_interval_forDate( - &self, - unit: NSCalendarUnit, - datep: Option<&mut Option>>, - tip: *mut NSTimeInterval, - date: &NSDate, - ) -> bool { - msg_send![ - self, - rangeOfUnit: unit, - startDate: datep, - interval: tip, - forDate: date - ] - } - pub unsafe fn dateFromComponents( - &self, - comps: &NSDateComponents, - ) -> Option> { - msg_send_id![self, dateFromComponents: comps] - } - pub unsafe fn components_fromDate( - &self, - unitFlags: NSCalendarUnit, - date: &NSDate, - ) -> Id { - msg_send_id![self, components: unitFlags, fromDate: date] - } - pub unsafe fn dateByAddingComponents_toDate_options( - &self, - comps: &NSDateComponents, - date: &NSDate, - opts: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - dateByAddingComponents: comps, - toDate: date, - options: opts - ] - } - pub unsafe fn components_fromDate_toDate_options( - &self, - unitFlags: NSCalendarUnit, - startingDate: &NSDate, - resultDate: &NSDate, - opts: NSCalendarOptions, - ) -> Id { - msg_send_id![ - self, - components: unitFlags, - fromDate: startingDate, - toDate: resultDate, - options: opts - ] - } - pub unsafe fn getEra_year_month_day_fromDate( - &self, - eraValuePointer: *mut NSInteger, - yearValuePointer: *mut NSInteger, - monthValuePointer: *mut NSInteger, - dayValuePointer: *mut NSInteger, - date: &NSDate, - ) { - msg_send![ - self, - getEra: eraValuePointer, - year: yearValuePointer, - month: monthValuePointer, - day: dayValuePointer, - fromDate: date - ] - } - pub unsafe fn getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate( - &self, - eraValuePointer: *mut NSInteger, - yearValuePointer: *mut NSInteger, - weekValuePointer: *mut NSInteger, - weekdayValuePointer: *mut NSInteger, - date: &NSDate, - ) { - msg_send![ - self, - getEra: eraValuePointer, - yearForWeekOfYear: yearValuePointer, - weekOfYear: weekValuePointer, - weekday: weekdayValuePointer, - fromDate: date - ] - } - pub unsafe fn getHour_minute_second_nanosecond_fromDate( - &self, - hourValuePointer: *mut NSInteger, - minuteValuePointer: *mut NSInteger, - secondValuePointer: *mut NSInteger, - nanosecondValuePointer: *mut NSInteger, - date: &NSDate, - ) { - msg_send![ - self, - getHour: hourValuePointer, - minute: minuteValuePointer, - second: secondValuePointer, - nanosecond: nanosecondValuePointer, - fromDate: date - ] - } - pub unsafe fn component_fromDate(&self, unit: NSCalendarUnit, date: &NSDate) -> NSInteger { - msg_send![self, component: unit, fromDate: date] - } - pub unsafe fn dateWithEra_year_month_day_hour_minute_second_nanosecond( - &self, - eraValue: NSInteger, - yearValue: NSInteger, - monthValue: NSInteger, - dayValue: NSInteger, - hourValue: NSInteger, - minuteValue: NSInteger, - secondValue: NSInteger, - nanosecondValue: NSInteger, - ) -> Option> { - msg_send_id![ - self, - dateWithEra: eraValue, - year: yearValue, - month: monthValue, - day: dayValue, - hour: hourValue, - minute: minuteValue, - second: secondValue, - nanosecond: nanosecondValue - ] - } - pub unsafe fn dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond( - &self, - eraValue: NSInteger, - yearValue: NSInteger, - weekValue: NSInteger, - weekdayValue: NSInteger, - hourValue: NSInteger, - minuteValue: NSInteger, - secondValue: NSInteger, - nanosecondValue: NSInteger, - ) -> Option> { - msg_send_id![ - self, - dateWithEra: eraValue, - yearForWeekOfYear: yearValue, - weekOfYear: weekValue, - weekday: weekdayValue, - hour: hourValue, - minute: minuteValue, - second: secondValue, - nanosecond: nanosecondValue - ] - } - pub unsafe fn startOfDayForDate(&self, date: &NSDate) -> Id { - msg_send_id![self, startOfDayForDate: date] - } - pub unsafe fn componentsInTimeZone_fromDate( - &self, - timezone: &NSTimeZone, - date: &NSDate, - ) -> Id { - msg_send_id![self, componentsInTimeZone: timezone, fromDate: date] - } - pub unsafe fn compareDate_toDate_toUnitGranularity( - &self, - date1: &NSDate, - date2: &NSDate, - unit: NSCalendarUnit, - ) -> NSComparisonResult { - msg_send![ - self, - compareDate: date1, - toDate: date2, - toUnitGranularity: unit - ] - } - pub unsafe fn isDate_equalToDate_toUnitGranularity( - &self, - date1: &NSDate, - date2: &NSDate, - unit: NSCalendarUnit, - ) -> bool { - msg_send![ - self, - isDate: date1, - equalToDate: date2, - toUnitGranularity: unit - ] - } - pub unsafe fn isDate_inSameDayAsDate(&self, date1: &NSDate, date2: &NSDate) -> bool { - msg_send![self, isDate: date1, inSameDayAsDate: date2] - } - pub unsafe fn isDateInToday(&self, date: &NSDate) -> bool { - msg_send![self, isDateInToday: date] - } - pub unsafe fn isDateInYesterday(&self, date: &NSDate) -> bool { - msg_send![self, isDateInYesterday: date] - } - pub unsafe fn isDateInTomorrow(&self, date: &NSDate) -> bool { - msg_send![self, isDateInTomorrow: date] - } - pub unsafe fn isDateInWeekend(&self, date: &NSDate) -> bool { - msg_send![self, isDateInWeekend: date] - } - pub unsafe fn rangeOfWeekendStartDate_interval_containingDate( - &self, - datep: Option<&mut Option>>, - tip: *mut NSTimeInterval, - date: &NSDate, - ) -> bool { - msg_send![ - self, - rangeOfWeekendStartDate: datep, - interval: tip, - containingDate: date - ] - } - pub unsafe fn nextWeekendStartDate_interval_options_afterDate( - &self, - datep: Option<&mut Option>>, - tip: *mut NSTimeInterval, - options: NSCalendarOptions, - date: &NSDate, - ) -> bool { - msg_send![ - self, - nextWeekendStartDate: datep, - interval: tip, - options: options, - afterDate: date - ] - } - pub unsafe fn components_fromDateComponents_toDateComponents_options( - &self, - unitFlags: NSCalendarUnit, - startingDateComp: &NSDateComponents, - resultDateComp: &NSDateComponents, - options: NSCalendarOptions, - ) -> Id { - msg_send_id![ - self, - components: unitFlags, - fromDateComponents: startingDateComp, - toDateComponents: resultDateComp, - options: options - ] - } - pub unsafe fn dateByAddingUnit_value_toDate_options( - &self, - unit: NSCalendarUnit, - value: NSInteger, - date: &NSDate, - options: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - dateByAddingUnit: unit, - value: value, - toDate: date, - options: options - ] - } - pub unsafe fn enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock( - &self, - start: &NSDate, - comps: &NSDateComponents, - opts: NSCalendarOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateDatesStartingAfterDate: start, - matchingComponents: comps, - options: opts, - usingBlock: block - ] - } - pub unsafe fn nextDateAfterDate_matchingComponents_options( - &self, - date: &NSDate, - comps: &NSDateComponents, - options: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - nextDateAfterDate: date, - matchingComponents: comps, - options: options - ] - } - pub unsafe fn nextDateAfterDate_matchingUnit_value_options( - &self, - date: &NSDate, - unit: NSCalendarUnit, - value: NSInteger, - options: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - nextDateAfterDate: date, - matchingUnit: unit, - value: value, - options: options - ] - } - pub unsafe fn nextDateAfterDate_matchingHour_minute_second_options( - &self, - date: &NSDate, - hourValue: NSInteger, - minuteValue: NSInteger, - secondValue: NSInteger, - options: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - nextDateAfterDate: date, - matchingHour: hourValue, - minute: minuteValue, - second: secondValue, - options: options - ] - } - pub unsafe fn dateBySettingUnit_value_ofDate_options( - &self, - unit: NSCalendarUnit, - v: NSInteger, - date: &NSDate, - opts: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - dateBySettingUnit: unit, - value: v, - ofDate: date, - options: opts - ] - } - pub unsafe fn dateBySettingHour_minute_second_ofDate_options( - &self, - h: NSInteger, - m: NSInteger, - s: NSInteger, - date: &NSDate, - opts: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - dateBySettingHour: h, - minute: m, - second: s, - ofDate: date, - options: opts - ] - } - pub unsafe fn date_matchesComponents( - &self, - date: &NSDate, - components: &NSDateComponents, - ) -> bool { - msg_send![self, date: date, matchesComponents: components] - } -} +); extern_class!( #[derive(Debug)] pub struct NSDateComponents; @@ -529,128 +531,130 @@ extern_class!( type Super = NSObject; } ); -impl NSDateComponents { - pub unsafe fn calendar(&self) -> Option> { - msg_send_id![self, calendar] - } - pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { - msg_send![self, setCalendar: calendar] - } - pub unsafe fn timeZone(&self) -> Option> { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn era(&self) -> NSInteger { - msg_send![self, era] - } - pub unsafe fn setEra(&self, era: NSInteger) { - msg_send![self, setEra: era] - } - pub unsafe fn year(&self) -> NSInteger { - msg_send![self, year] - } - pub unsafe fn setYear(&self, year: NSInteger) { - msg_send![self, setYear: year] - } - pub unsafe fn month(&self) -> NSInteger { - msg_send![self, month] - } - pub unsafe fn setMonth(&self, month: NSInteger) { - msg_send![self, setMonth: month] - } - pub unsafe fn day(&self) -> NSInteger { - msg_send![self, day] - } - pub unsafe fn setDay(&self, day: NSInteger) { - msg_send![self, setDay: day] - } - pub unsafe fn hour(&self) -> NSInteger { - msg_send![self, hour] - } - pub unsafe fn setHour(&self, hour: NSInteger) { - msg_send![self, setHour: hour] - } - pub unsafe fn minute(&self) -> NSInteger { - msg_send![self, minute] +extern_methods!( + unsafe impl NSDateComponents { + pub unsafe fn calendar(&self) -> Option> { + msg_send_id![self, calendar] + } + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { + msg_send![self, setCalendar: calendar] + } + pub unsafe fn timeZone(&self) -> Option> { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn era(&self) -> NSInteger { + msg_send![self, era] + } + pub unsafe fn setEra(&self, era: NSInteger) { + msg_send![self, setEra: era] + } + pub unsafe fn year(&self) -> NSInteger { + msg_send![self, year] + } + pub unsafe fn setYear(&self, year: NSInteger) { + msg_send![self, setYear: year] + } + pub unsafe fn month(&self) -> NSInteger { + msg_send![self, month] + } + pub unsafe fn setMonth(&self, month: NSInteger) { + msg_send![self, setMonth: month] + } + pub unsafe fn day(&self) -> NSInteger { + msg_send![self, day] + } + pub unsafe fn setDay(&self, day: NSInteger) { + msg_send![self, setDay: day] + } + pub unsafe fn hour(&self) -> NSInteger { + msg_send![self, hour] + } + pub unsafe fn setHour(&self, hour: NSInteger) { + msg_send![self, setHour: hour] + } + pub unsafe fn minute(&self) -> NSInteger { + msg_send![self, minute] + } + pub unsafe fn setMinute(&self, minute: NSInteger) { + msg_send![self, setMinute: minute] + } + pub unsafe fn second(&self) -> NSInteger { + msg_send![self, second] + } + pub unsafe fn setSecond(&self, second: NSInteger) { + msg_send![self, setSecond: second] + } + pub unsafe fn nanosecond(&self) -> NSInteger { + msg_send![self, nanosecond] + } + pub unsafe fn setNanosecond(&self, nanosecond: NSInteger) { + msg_send![self, setNanosecond: nanosecond] + } + pub unsafe fn weekday(&self) -> NSInteger { + msg_send![self, weekday] + } + pub unsafe fn setWeekday(&self, weekday: NSInteger) { + msg_send![self, setWeekday: weekday] + } + pub unsafe fn weekdayOrdinal(&self) -> NSInteger { + msg_send![self, weekdayOrdinal] + } + pub unsafe fn setWeekdayOrdinal(&self, weekdayOrdinal: NSInteger) { + msg_send![self, setWeekdayOrdinal: weekdayOrdinal] + } + pub unsafe fn quarter(&self) -> NSInteger { + msg_send![self, quarter] + } + pub unsafe fn setQuarter(&self, quarter: NSInteger) { + msg_send![self, setQuarter: quarter] + } + pub unsafe fn weekOfMonth(&self) -> NSInteger { + msg_send![self, weekOfMonth] + } + pub unsafe fn setWeekOfMonth(&self, weekOfMonth: NSInteger) { + msg_send![self, setWeekOfMonth: weekOfMonth] + } + pub unsafe fn weekOfYear(&self) -> NSInteger { + msg_send![self, weekOfYear] + } + pub unsafe fn setWeekOfYear(&self, weekOfYear: NSInteger) { + msg_send![self, setWeekOfYear: weekOfYear] + } + pub unsafe fn yearForWeekOfYear(&self) -> NSInteger { + msg_send![self, yearForWeekOfYear] + } + pub unsafe fn setYearForWeekOfYear(&self, yearForWeekOfYear: NSInteger) { + msg_send![self, setYearForWeekOfYear: yearForWeekOfYear] + } + pub unsafe fn isLeapMonth(&self) -> bool { + msg_send![self, isLeapMonth] + } + pub unsafe fn setLeapMonth(&self, leapMonth: bool) { + msg_send![self, setLeapMonth: leapMonth] + } + pub unsafe fn date(&self) -> Option> { + msg_send_id![self, date] + } + pub unsafe fn week(&self) -> NSInteger { + msg_send![self, week] + } + pub unsafe fn setWeek(&self, v: NSInteger) { + msg_send![self, setWeek: v] + } + pub unsafe fn setValue_forComponent(&self, value: NSInteger, unit: NSCalendarUnit) { + msg_send![self, setValue: value, forComponent: unit] + } + pub unsafe fn valueForComponent(&self, unit: NSCalendarUnit) -> NSInteger { + msg_send![self, valueForComponent: unit] + } + pub unsafe fn isValidDate(&self) -> bool { + msg_send![self, isValidDate] + } + pub unsafe fn isValidDateInCalendar(&self, calendar: &NSCalendar) -> bool { + msg_send![self, isValidDateInCalendar: calendar] + } } - pub unsafe fn setMinute(&self, minute: NSInteger) { - msg_send![self, setMinute: minute] - } - pub unsafe fn second(&self) -> NSInteger { - msg_send![self, second] - } - pub unsafe fn setSecond(&self, second: NSInteger) { - msg_send![self, setSecond: second] - } - pub unsafe fn nanosecond(&self) -> NSInteger { - msg_send![self, nanosecond] - } - pub unsafe fn setNanosecond(&self, nanosecond: NSInteger) { - msg_send![self, setNanosecond: nanosecond] - } - pub unsafe fn weekday(&self) -> NSInteger { - msg_send![self, weekday] - } - pub unsafe fn setWeekday(&self, weekday: NSInteger) { - msg_send![self, setWeekday: weekday] - } - pub unsafe fn weekdayOrdinal(&self) -> NSInteger { - msg_send![self, weekdayOrdinal] - } - pub unsafe fn setWeekdayOrdinal(&self, weekdayOrdinal: NSInteger) { - msg_send![self, setWeekdayOrdinal: weekdayOrdinal] - } - pub unsafe fn quarter(&self) -> NSInteger { - msg_send![self, quarter] - } - pub unsafe fn setQuarter(&self, quarter: NSInteger) { - msg_send![self, setQuarter: quarter] - } - pub unsafe fn weekOfMonth(&self) -> NSInteger { - msg_send![self, weekOfMonth] - } - pub unsafe fn setWeekOfMonth(&self, weekOfMonth: NSInteger) { - msg_send![self, setWeekOfMonth: weekOfMonth] - } - pub unsafe fn weekOfYear(&self) -> NSInteger { - msg_send![self, weekOfYear] - } - pub unsafe fn setWeekOfYear(&self, weekOfYear: NSInteger) { - msg_send![self, setWeekOfYear: weekOfYear] - } - pub unsafe fn yearForWeekOfYear(&self) -> NSInteger { - msg_send![self, yearForWeekOfYear] - } - pub unsafe fn setYearForWeekOfYear(&self, yearForWeekOfYear: NSInteger) { - msg_send![self, setYearForWeekOfYear: yearForWeekOfYear] - } - pub unsafe fn isLeapMonth(&self) -> bool { - msg_send![self, isLeapMonth] - } - pub unsafe fn setLeapMonth(&self, leapMonth: bool) { - msg_send![self, setLeapMonth: leapMonth] - } - pub unsafe fn date(&self) -> Option> { - msg_send_id![self, date] - } - pub unsafe fn week(&self) -> NSInteger { - msg_send![self, week] - } - pub unsafe fn setWeek(&self, v: NSInteger) { - msg_send![self, setWeek: v] - } - pub unsafe fn setValue_forComponent(&self, value: NSInteger, unit: NSCalendarUnit) { - msg_send![self, setValue: value, forComponent: unit] - } - pub unsafe fn valueForComponent(&self, unit: NSCalendarUnit) -> NSInteger { - msg_send![self, valueForComponent: unit] - } - pub unsafe fn isValidDate(&self) -> bool { - msg_send![self, isValidDate] - } - pub unsafe fn isValidDateInCalendar(&self, calendar: &NSCalendar) -> bool { - msg_send![self, isValidDateInCalendar: calendar] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index e3e8ff6a9..444b49044 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSDate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCalendarDate; @@ -13,234 +13,246 @@ extern_class!( type Super = NSDate; } ); -impl NSCalendarDate { - pub unsafe fn calendarDate() -> Id { - msg_send_id![Self::class(), calendarDate] +extern_methods!( + unsafe impl NSCalendarDate { + pub unsafe fn calendarDate() -> Id { + msg_send_id![Self::class(), calendarDate] + } + pub unsafe fn dateWithString_calendarFormat_locale( + description: &NSString, + format: &NSString, + locale: Option<&Object>, + ) -> Option> { + msg_send_id![ + Self::class(), + dateWithString: description, + calendarFormat: format, + locale: locale + ] + } + pub unsafe fn dateWithString_calendarFormat( + description: &NSString, + format: &NSString, + ) -> Option> { + msg_send_id![ + Self::class(), + dateWithString: description, + calendarFormat: format + ] + } + pub unsafe fn dateWithYear_month_day_hour_minute_second_timeZone( + year: NSInteger, + month: NSUInteger, + day: NSUInteger, + hour: NSUInteger, + minute: NSUInteger, + second: NSUInteger, + aTimeZone: Option<&NSTimeZone>, + ) -> Id { + msg_send_id![ + Self::class(), + dateWithYear: year, + month: month, + day: day, + hour: hour, + minute: minute, + second: second, + timeZone: aTimeZone + ] + } + pub unsafe fn dateByAddingYears_months_days_hours_minutes_seconds( + &self, + year: NSInteger, + month: NSInteger, + day: NSInteger, + hour: NSInteger, + minute: NSInteger, + second: NSInteger, + ) -> Id { + msg_send_id![ + self, + dateByAddingYears: year, + months: month, + days: day, + hours: hour, + minutes: minute, + seconds: second + ] + } + pub unsafe fn dayOfCommonEra(&self) -> NSInteger { + msg_send![self, dayOfCommonEra] + } + pub unsafe fn dayOfMonth(&self) -> NSInteger { + msg_send![self, dayOfMonth] + } + pub unsafe fn dayOfWeek(&self) -> NSInteger { + msg_send![self, dayOfWeek] + } + pub unsafe fn dayOfYear(&self) -> NSInteger { + msg_send![self, dayOfYear] + } + pub unsafe fn hourOfDay(&self) -> NSInteger { + msg_send![self, hourOfDay] + } + pub unsafe fn minuteOfHour(&self) -> NSInteger { + msg_send![self, minuteOfHour] + } + pub unsafe fn monthOfYear(&self) -> NSInteger { + msg_send![self, monthOfYear] + } + pub unsafe fn secondOfMinute(&self) -> NSInteger { + msg_send![self, secondOfMinute] + } + pub unsafe fn yearOfCommonEra(&self) -> NSInteger { + msg_send![self, yearOfCommonEra] + } + pub unsafe fn calendarFormat(&self) -> Id { + msg_send_id![self, calendarFormat] + } + pub unsafe fn descriptionWithCalendarFormat_locale( + &self, + format: &NSString, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, descriptionWithCalendarFormat: format, locale: locale] + } + pub unsafe fn descriptionWithCalendarFormat( + &self, + format: &NSString, + ) -> Id { + msg_send_id![self, descriptionWithCalendarFormat: format] + } + pub unsafe fn descriptionWithLocale( + &self, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn initWithString_calendarFormat_locale( + &self, + description: &NSString, + format: &NSString, + locale: Option<&Object>, + ) -> Option> { + msg_send_id![ + self, + initWithString: description, + calendarFormat: format, + locale: locale + ] + } + pub unsafe fn initWithString_calendarFormat( + &self, + description: &NSString, + format: &NSString, + ) -> Option> { + msg_send_id![self, initWithString: description, calendarFormat: format] + } + pub unsafe fn initWithString(&self, description: &NSString) -> Option> { + msg_send_id![self, initWithString: description] + } + pub unsafe fn initWithYear_month_day_hour_minute_second_timeZone( + &self, + year: NSInteger, + month: NSUInteger, + day: NSUInteger, + hour: NSUInteger, + minute: NSUInteger, + second: NSUInteger, + aTimeZone: Option<&NSTimeZone>, + ) -> Id { + msg_send_id![ + self, + initWithYear: year, + month: month, + day: day, + hour: hour, + minute: minute, + second: second, + timeZone: aTimeZone + ] + } + pub unsafe fn setCalendarFormat(&self, format: Option<&NSString>) { + msg_send![self, setCalendarFormat: format] + } + pub unsafe fn setTimeZone(&self, aTimeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: aTimeZone] + } + pub unsafe fn years_months_days_hours_minutes_seconds_sinceDate( + &self, + yp: *mut NSInteger, + mop: *mut NSInteger, + dp: *mut NSInteger, + hp: *mut NSInteger, + mip: *mut NSInteger, + sp: *mut NSInteger, + date: &NSCalendarDate, + ) { + msg_send![ + self, + years: yp, + months: mop, + days: dp, + hours: hp, + minutes: mip, + seconds: sp, + sinceDate: date + ] + } + pub unsafe fn distantFuture() -> Id { + msg_send_id![Self::class(), distantFuture] + } + pub unsafe fn distantPast() -> Id { + msg_send_id![Self::class(), distantPast] + } } - pub unsafe fn dateWithString_calendarFormat_locale( - description: &NSString, - format: &NSString, - locale: Option<&Object>, - ) -> Option> { - msg_send_id![ - Self::class(), - dateWithString: description, - calendarFormat: format, - locale: locale - ] - } - pub unsafe fn dateWithString_calendarFormat( - description: &NSString, - format: &NSString, - ) -> Option> { - msg_send_id![ - Self::class(), - dateWithString: description, - calendarFormat: format - ] - } - pub unsafe fn dateWithYear_month_day_hour_minute_second_timeZone( - year: NSInteger, - month: NSUInteger, - day: NSUInteger, - hour: NSUInteger, - minute: NSUInteger, - second: NSUInteger, - aTimeZone: Option<&NSTimeZone>, - ) -> Id { - msg_send_id![ - Self::class(), - dateWithYear: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - timeZone: aTimeZone - ] - } - pub unsafe fn dateByAddingYears_months_days_hours_minutes_seconds( - &self, - year: NSInteger, - month: NSInteger, - day: NSInteger, - hour: NSInteger, - minute: NSInteger, - second: NSInteger, - ) -> Id { - msg_send_id![ - self, - dateByAddingYears: year, - months: month, - days: day, - hours: hour, - minutes: minute, - seconds: second - ] - } - pub unsafe fn dayOfCommonEra(&self) -> NSInteger { - msg_send![self, dayOfCommonEra] - } - pub unsafe fn dayOfMonth(&self) -> NSInteger { - msg_send![self, dayOfMonth] - } - pub unsafe fn dayOfWeek(&self) -> NSInteger { - msg_send![self, dayOfWeek] - } - pub unsafe fn dayOfYear(&self) -> NSInteger { - msg_send![self, dayOfYear] - } - pub unsafe fn hourOfDay(&self) -> NSInteger { - msg_send![self, hourOfDay] - } - pub unsafe fn minuteOfHour(&self) -> NSInteger { - msg_send![self, minuteOfHour] - } - pub unsafe fn monthOfYear(&self) -> NSInteger { - msg_send![self, monthOfYear] - } - pub unsafe fn secondOfMinute(&self) -> NSInteger { - msg_send![self, secondOfMinute] - } - pub unsafe fn yearOfCommonEra(&self) -> NSInteger { - msg_send![self, yearOfCommonEra] - } - pub unsafe fn calendarFormat(&self) -> Id { - msg_send_id![self, calendarFormat] - } - pub unsafe fn descriptionWithCalendarFormat_locale( - &self, - format: &NSString, - locale: Option<&Object>, - ) -> Id { - msg_send_id![self, descriptionWithCalendarFormat: format, locale: locale] - } - pub unsafe fn descriptionWithCalendarFormat(&self, format: &NSString) -> Id { - msg_send_id![self, descriptionWithCalendarFormat: format] - } - pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } - pub unsafe fn initWithString_calendarFormat_locale( - &self, - description: &NSString, - format: &NSString, - locale: Option<&Object>, - ) -> Option> { - msg_send_id![ - self, - initWithString: description, - calendarFormat: format, - locale: locale - ] - } - pub unsafe fn initWithString_calendarFormat( - &self, - description: &NSString, - format: &NSString, - ) -> Option> { - msg_send_id![self, initWithString: description, calendarFormat: format] - } - pub unsafe fn initWithString(&self, description: &NSString) -> Option> { - msg_send_id![self, initWithString: description] - } - pub unsafe fn initWithYear_month_day_hour_minute_second_timeZone( - &self, - year: NSInteger, - month: NSUInteger, - day: NSUInteger, - hour: NSUInteger, - minute: NSUInteger, - second: NSUInteger, - aTimeZone: Option<&NSTimeZone>, - ) -> Id { - msg_send_id![ - self, - initWithYear: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - timeZone: aTimeZone - ] - } - pub unsafe fn setCalendarFormat(&self, format: Option<&NSString>) { - msg_send![self, setCalendarFormat: format] - } - pub unsafe fn setTimeZone(&self, aTimeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: aTimeZone] - } - pub unsafe fn years_months_days_hours_minutes_seconds_sinceDate( - &self, - yp: *mut NSInteger, - mop: *mut NSInteger, - dp: *mut NSInteger, - hp: *mut NSInteger, - mip: *mut NSInteger, - sp: *mut NSInteger, - date: &NSCalendarDate, - ) { - msg_send![ - self, - years: yp, - months: mop, - days: dp, - hours: hp, - minutes: mip, - seconds: sp, - sinceDate: date - ] - } - pub unsafe fn distantFuture() -> Id { - msg_send_id![Self::class(), distantFuture] - } - pub unsafe fn distantPast() -> Id { - msg_send_id![Self::class(), distantPast] - } -} -#[doc = "NSCalendarDateExtras"] -impl NSDate { - pub unsafe fn dateWithNaturalLanguageString_locale( - string: &NSString, - locale: Option<&Object>, - ) -> Option> { - msg_send_id![ - Self::class(), - dateWithNaturalLanguageString: string, - locale: locale - ] - } - pub unsafe fn dateWithNaturalLanguageString(string: &NSString) -> Option> { - msg_send_id![Self::class(), dateWithNaturalLanguageString: string] - } - pub unsafe fn dateWithString(aString: &NSString) -> Id { - msg_send_id![Self::class(), dateWithString: aString] - } - pub unsafe fn dateWithCalendarFormat_timeZone( - &self, - format: Option<&NSString>, - aTimeZone: Option<&NSTimeZone>, - ) -> Id { - msg_send_id![self, dateWithCalendarFormat: format, timeZone: aTimeZone] - } - pub unsafe fn descriptionWithCalendarFormat_timeZone_locale( - &self, - format: Option<&NSString>, - aTimeZone: Option<&NSTimeZone>, - locale: Option<&Object>, - ) -> Option> { - msg_send_id![ - self, - descriptionWithCalendarFormat: format, - timeZone: aTimeZone, - locale: locale - ] - } - pub unsafe fn initWithString(&self, description: &NSString) -> Option> { - msg_send_id![self, initWithString: description] +); +extern_methods!( + #[doc = "NSCalendarDateExtras"] + unsafe impl NSDate { + pub unsafe fn dateWithNaturalLanguageString_locale( + string: &NSString, + locale: Option<&Object>, + ) -> Option> { + msg_send_id![ + Self::class(), + dateWithNaturalLanguageString: string, + locale: locale + ] + } + pub unsafe fn dateWithNaturalLanguageString( + string: &NSString, + ) -> Option> { + msg_send_id![Self::class(), dateWithNaturalLanguageString: string] + } + pub unsafe fn dateWithString(aString: &NSString) -> Id { + msg_send_id![Self::class(), dateWithString: aString] + } + pub unsafe fn dateWithCalendarFormat_timeZone( + &self, + format: Option<&NSString>, + aTimeZone: Option<&NSTimeZone>, + ) -> Id { + msg_send_id![self, dateWithCalendarFormat: format, timeZone: aTimeZone] + } + pub unsafe fn descriptionWithCalendarFormat_timeZone_locale( + &self, + format: Option<&NSString>, + aTimeZone: Option<&NSTimeZone>, + locale: Option<&Object>, + ) -> Option> { + msg_send_id![ + self, + descriptionWithCalendarFormat: format, + timeZone: aTimeZone, + locale: locale + ] + } + pub unsafe fn initWithString(&self, description: &NSString) -> Option> { + msg_send_id![self, initWithString: description] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 08c1013a8..36e6a9c5b 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCharacterSet; @@ -14,92 +14,94 @@ extern_class!( type Super = NSObject; } ); -impl NSCharacterSet { - pub unsafe fn controlCharacterSet() -> Id { - msg_send_id![Self::class(), controlCharacterSet] +extern_methods!( + unsafe impl NSCharacterSet { + pub unsafe fn controlCharacterSet() -> Id { + msg_send_id![Self::class(), controlCharacterSet] + } + pub unsafe fn whitespaceCharacterSet() -> Id { + msg_send_id![Self::class(), whitespaceCharacterSet] + } + pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id { + msg_send_id![Self::class(), whitespaceAndNewlineCharacterSet] + } + pub unsafe fn decimalDigitCharacterSet() -> Id { + msg_send_id![Self::class(), decimalDigitCharacterSet] + } + pub unsafe fn letterCharacterSet() -> Id { + msg_send_id![Self::class(), letterCharacterSet] + } + pub unsafe fn lowercaseLetterCharacterSet() -> Id { + msg_send_id![Self::class(), lowercaseLetterCharacterSet] + } + pub unsafe fn uppercaseLetterCharacterSet() -> Id { + msg_send_id![Self::class(), uppercaseLetterCharacterSet] + } + pub unsafe fn nonBaseCharacterSet() -> Id { + msg_send_id![Self::class(), nonBaseCharacterSet] + } + pub unsafe fn alphanumericCharacterSet() -> Id { + msg_send_id![Self::class(), alphanumericCharacterSet] + } + pub unsafe fn decomposableCharacterSet() -> Id { + msg_send_id![Self::class(), decomposableCharacterSet] + } + pub unsafe fn illegalCharacterSet() -> Id { + msg_send_id![Self::class(), illegalCharacterSet] + } + pub unsafe fn punctuationCharacterSet() -> Id { + msg_send_id![Self::class(), punctuationCharacterSet] + } + pub unsafe fn capitalizedLetterCharacterSet() -> Id { + msg_send_id![Self::class(), capitalizedLetterCharacterSet] + } + pub unsafe fn symbolCharacterSet() -> Id { + msg_send_id![Self::class(), symbolCharacterSet] + } + pub unsafe fn newlineCharacterSet() -> Id { + msg_send_id![Self::class(), newlineCharacterSet] + } + pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id { + msg_send_id![Self::class(), characterSetWithRange: aRange] + } + pub unsafe fn characterSetWithCharactersInString( + aString: &NSString, + ) -> Id { + msg_send_id![Self::class(), characterSetWithCharactersInString: aString] + } + pub unsafe fn characterSetWithBitmapRepresentation( + data: &NSData, + ) -> Id { + msg_send_id![Self::class(), characterSetWithBitmapRepresentation: data] + } + pub unsafe fn characterSetWithContentsOfFile( + fName: &NSString, + ) -> Option> { + msg_send_id![Self::class(), characterSetWithContentsOfFile: fName] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool { + msg_send![self, characterIsMember: aCharacter] + } + pub unsafe fn bitmapRepresentation(&self) -> Id { + msg_send_id![self, bitmapRepresentation] + } + pub unsafe fn invertedSet(&self) -> Id { + msg_send_id![self, invertedSet] + } + pub unsafe fn longCharacterIsMember(&self, theLongChar: UTF32Char) -> bool { + msg_send![self, longCharacterIsMember: theLongChar] + } + pub unsafe fn isSupersetOfSet(&self, theOtherSet: &NSCharacterSet) -> bool { + msg_send![self, isSupersetOfSet: theOtherSet] + } + pub unsafe fn hasMemberInPlane(&self, thePlane: u8) -> bool { + msg_send![self, hasMemberInPlane: thePlane] + } } - pub unsafe fn whitespaceCharacterSet() -> Id { - msg_send_id![Self::class(), whitespaceCharacterSet] - } - pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id { - msg_send_id![Self::class(), whitespaceAndNewlineCharacterSet] - } - pub unsafe fn decimalDigitCharacterSet() -> Id { - msg_send_id![Self::class(), decimalDigitCharacterSet] - } - pub unsafe fn letterCharacterSet() -> Id { - msg_send_id![Self::class(), letterCharacterSet] - } - pub unsafe fn lowercaseLetterCharacterSet() -> Id { - msg_send_id![Self::class(), lowercaseLetterCharacterSet] - } - pub unsafe fn uppercaseLetterCharacterSet() -> Id { - msg_send_id![Self::class(), uppercaseLetterCharacterSet] - } - pub unsafe fn nonBaseCharacterSet() -> Id { - msg_send_id![Self::class(), nonBaseCharacterSet] - } - pub unsafe fn alphanumericCharacterSet() -> Id { - msg_send_id![Self::class(), alphanumericCharacterSet] - } - pub unsafe fn decomposableCharacterSet() -> Id { - msg_send_id![Self::class(), decomposableCharacterSet] - } - pub unsafe fn illegalCharacterSet() -> Id { - msg_send_id![Self::class(), illegalCharacterSet] - } - pub unsafe fn punctuationCharacterSet() -> Id { - msg_send_id![Self::class(), punctuationCharacterSet] - } - pub unsafe fn capitalizedLetterCharacterSet() -> Id { - msg_send_id![Self::class(), capitalizedLetterCharacterSet] - } - pub unsafe fn symbolCharacterSet() -> Id { - msg_send_id![Self::class(), symbolCharacterSet] - } - pub unsafe fn newlineCharacterSet() -> Id { - msg_send_id![Self::class(), newlineCharacterSet] - } - pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id { - msg_send_id![Self::class(), characterSetWithRange: aRange] - } - pub unsafe fn characterSetWithCharactersInString( - aString: &NSString, - ) -> Id { - msg_send_id![Self::class(), characterSetWithCharactersInString: aString] - } - pub unsafe fn characterSetWithBitmapRepresentation( - data: &NSData, - ) -> Id { - msg_send_id![Self::class(), characterSetWithBitmapRepresentation: data] - } - pub unsafe fn characterSetWithContentsOfFile( - fName: &NSString, - ) -> Option> { - msg_send_id![Self::class(), characterSetWithContentsOfFile: fName] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool { - msg_send![self, characterIsMember: aCharacter] - } - pub unsafe fn bitmapRepresentation(&self) -> Id { - msg_send_id![self, bitmapRepresentation] - } - pub unsafe fn invertedSet(&self) -> Id { - msg_send_id![self, invertedSet] - } - pub unsafe fn longCharacterIsMember(&self, theLongChar: UTF32Char) -> bool { - msg_send![self, longCharacterIsMember: theLongChar] - } - pub unsafe fn isSupersetOfSet(&self, theOtherSet: &NSCharacterSet) -> bool { - msg_send![self, isSupersetOfSet: theOtherSet] - } - pub unsafe fn hasMemberInPlane(&self, thePlane: u8) -> bool { - msg_send![self, hasMemberInPlane: thePlane] - } -} +); extern_class!( #[derive(Debug)] pub struct NSMutableCharacterSet; @@ -107,89 +109,91 @@ extern_class!( type Super = NSCharacterSet; } ); -impl NSMutableCharacterSet { - pub unsafe fn addCharactersInRange(&self, aRange: NSRange) { - msg_send![self, addCharactersInRange: aRange] +extern_methods!( + unsafe impl NSMutableCharacterSet { + pub unsafe fn addCharactersInRange(&self, aRange: NSRange) { + msg_send![self, addCharactersInRange: aRange] + } + pub unsafe fn removeCharactersInRange(&self, aRange: NSRange) { + msg_send![self, removeCharactersInRange: aRange] + } + pub unsafe fn addCharactersInString(&self, aString: &NSString) { + msg_send![self, addCharactersInString: aString] + } + pub unsafe fn removeCharactersInString(&self, aString: &NSString) { + msg_send![self, removeCharactersInString: aString] + } + pub unsafe fn formUnionWithCharacterSet(&self, otherSet: &NSCharacterSet) { + msg_send![self, formUnionWithCharacterSet: otherSet] + } + pub unsafe fn formIntersectionWithCharacterSet(&self, otherSet: &NSCharacterSet) { + msg_send![self, formIntersectionWithCharacterSet: otherSet] + } + pub unsafe fn invert(&self) { + msg_send![self, invert] + } + pub unsafe fn controlCharacterSet() -> Id { + msg_send_id![Self::class(), controlCharacterSet] + } + pub unsafe fn whitespaceCharacterSet() -> Id { + msg_send_id![Self::class(), whitespaceCharacterSet] + } + pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id { + msg_send_id![Self::class(), whitespaceAndNewlineCharacterSet] + } + pub unsafe fn decimalDigitCharacterSet() -> Id { + msg_send_id![Self::class(), decimalDigitCharacterSet] + } + pub unsafe fn letterCharacterSet() -> Id { + msg_send_id![Self::class(), letterCharacterSet] + } + pub unsafe fn lowercaseLetterCharacterSet() -> Id { + msg_send_id![Self::class(), lowercaseLetterCharacterSet] + } + pub unsafe fn uppercaseLetterCharacterSet() -> Id { + msg_send_id![Self::class(), uppercaseLetterCharacterSet] + } + pub unsafe fn nonBaseCharacterSet() -> Id { + msg_send_id![Self::class(), nonBaseCharacterSet] + } + pub unsafe fn alphanumericCharacterSet() -> Id { + msg_send_id![Self::class(), alphanumericCharacterSet] + } + pub unsafe fn decomposableCharacterSet() -> Id { + msg_send_id![Self::class(), decomposableCharacterSet] + } + pub unsafe fn illegalCharacterSet() -> Id { + msg_send_id![Self::class(), illegalCharacterSet] + } + pub unsafe fn punctuationCharacterSet() -> Id { + msg_send_id![Self::class(), punctuationCharacterSet] + } + pub unsafe fn capitalizedLetterCharacterSet() -> Id { + msg_send_id![Self::class(), capitalizedLetterCharacterSet] + } + pub unsafe fn symbolCharacterSet() -> Id { + msg_send_id![Self::class(), symbolCharacterSet] + } + pub unsafe fn newlineCharacterSet() -> Id { + msg_send_id![Self::class(), newlineCharacterSet] + } + pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id { + msg_send_id![Self::class(), characterSetWithRange: aRange] + } + pub unsafe fn characterSetWithCharactersInString( + aString: &NSString, + ) -> Id { + msg_send_id![Self::class(), characterSetWithCharactersInString: aString] + } + pub unsafe fn characterSetWithBitmapRepresentation( + data: &NSData, + ) -> Id { + msg_send_id![Self::class(), characterSetWithBitmapRepresentation: data] + } + pub unsafe fn characterSetWithContentsOfFile( + fName: &NSString, + ) -> Option> { + msg_send_id![Self::class(), characterSetWithContentsOfFile: fName] + } } - pub unsafe fn removeCharactersInRange(&self, aRange: NSRange) { - msg_send![self, removeCharactersInRange: aRange] - } - pub unsafe fn addCharactersInString(&self, aString: &NSString) { - msg_send![self, addCharactersInString: aString] - } - pub unsafe fn removeCharactersInString(&self, aString: &NSString) { - msg_send![self, removeCharactersInString: aString] - } - pub unsafe fn formUnionWithCharacterSet(&self, otherSet: &NSCharacterSet) { - msg_send![self, formUnionWithCharacterSet: otherSet] - } - pub unsafe fn formIntersectionWithCharacterSet(&self, otherSet: &NSCharacterSet) { - msg_send![self, formIntersectionWithCharacterSet: otherSet] - } - pub unsafe fn invert(&self) { - msg_send![self, invert] - } - pub unsafe fn controlCharacterSet() -> Id { - msg_send_id![Self::class(), controlCharacterSet] - } - pub unsafe fn whitespaceCharacterSet() -> Id { - msg_send_id![Self::class(), whitespaceCharacterSet] - } - pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id { - msg_send_id![Self::class(), whitespaceAndNewlineCharacterSet] - } - pub unsafe fn decimalDigitCharacterSet() -> Id { - msg_send_id![Self::class(), decimalDigitCharacterSet] - } - pub unsafe fn letterCharacterSet() -> Id { - msg_send_id![Self::class(), letterCharacterSet] - } - pub unsafe fn lowercaseLetterCharacterSet() -> Id { - msg_send_id![Self::class(), lowercaseLetterCharacterSet] - } - pub unsafe fn uppercaseLetterCharacterSet() -> Id { - msg_send_id![Self::class(), uppercaseLetterCharacterSet] - } - pub unsafe fn nonBaseCharacterSet() -> Id { - msg_send_id![Self::class(), nonBaseCharacterSet] - } - pub unsafe fn alphanumericCharacterSet() -> Id { - msg_send_id![Self::class(), alphanumericCharacterSet] - } - pub unsafe fn decomposableCharacterSet() -> Id { - msg_send_id![Self::class(), decomposableCharacterSet] - } - pub unsafe fn illegalCharacterSet() -> Id { - msg_send_id![Self::class(), illegalCharacterSet] - } - pub unsafe fn punctuationCharacterSet() -> Id { - msg_send_id![Self::class(), punctuationCharacterSet] - } - pub unsafe fn capitalizedLetterCharacterSet() -> Id { - msg_send_id![Self::class(), capitalizedLetterCharacterSet] - } - pub unsafe fn symbolCharacterSet() -> Id { - msg_send_id![Self::class(), symbolCharacterSet] - } - pub unsafe fn newlineCharacterSet() -> Id { - msg_send_id![Self::class(), newlineCharacterSet] - } - pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id { - msg_send_id![Self::class(), characterSetWithRange: aRange] - } - pub unsafe fn characterSetWithCharactersInString( - aString: &NSString, - ) -> Id { - msg_send_id![Self::class(), characterSetWithCharactersInString: aString] - } - pub unsafe fn characterSetWithBitmapRepresentation( - data: &NSData, - ) -> Id { - msg_send_id![Self::class(), characterSetWithBitmapRepresentation: data] - } - pub unsafe fn characterSetWithContentsOfFile( - fName: &NSString, - ) -> Option> { - msg_send_id![Self::class(), characterSetWithContentsOfFile: fName] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index b63435474..1affb260e 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSClassDescription; @@ -15,59 +15,63 @@ extern_class!( type Super = NSObject; } ); -impl NSClassDescription { - pub unsafe fn registerClassDescription_forClass( - description: &NSClassDescription, - aClass: &Class, - ) { - msg_send![ - Self::class(), - registerClassDescription: description, - forClass: aClass - ] +extern_methods!( + unsafe impl NSClassDescription { + pub unsafe fn registerClassDescription_forClass( + description: &NSClassDescription, + aClass: &Class, + ) { + msg_send![ + Self::class(), + registerClassDescription: description, + forClass: aClass + ] + } + pub unsafe fn invalidateClassDescriptionCache() { + msg_send![Self::class(), invalidateClassDescriptionCache] + } + pub unsafe fn classDescriptionForClass( + aClass: &Class, + ) -> Option> { + msg_send_id![Self::class(), classDescriptionForClass: aClass] + } + pub unsafe fn attributeKeys(&self) -> Id, Shared> { + msg_send_id![self, attributeKeys] + } + pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared> { + msg_send_id![self, toOneRelationshipKeys] + } + pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared> { + msg_send_id![self, toManyRelationshipKeys] + } + pub unsafe fn inverseForRelationshipKey( + &self, + relationshipKey: &NSString, + ) -> Option> { + msg_send_id![self, inverseForRelationshipKey: relationshipKey] + } } - pub unsafe fn invalidateClassDescriptionCache() { - msg_send![Self::class(), invalidateClassDescriptionCache] - } - pub unsafe fn classDescriptionForClass( - aClass: &Class, - ) -> Option> { - msg_send_id![Self::class(), classDescriptionForClass: aClass] - } - pub unsafe fn attributeKeys(&self) -> Id, Shared> { - msg_send_id![self, attributeKeys] - } - pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared> { - msg_send_id![self, toOneRelationshipKeys] - } - pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared> { - msg_send_id![self, toManyRelationshipKeys] - } - pub unsafe fn inverseForRelationshipKey( - &self, - relationshipKey: &NSString, - ) -> Option> { - msg_send_id![self, inverseForRelationshipKey: relationshipKey] - } -} -#[doc = "NSClassDescriptionPrimitives"] -impl NSObject { - pub unsafe fn classDescription(&self) -> Id { - msg_send_id![self, classDescription] - } - pub unsafe fn attributeKeys(&self) -> Id, Shared> { - msg_send_id![self, attributeKeys] - } - pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared> { - msg_send_id![self, toOneRelationshipKeys] - } - pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared> { - msg_send_id![self, toManyRelationshipKeys] - } - pub unsafe fn inverseForRelationshipKey( - &self, - relationshipKey: &NSString, - ) -> Option> { - msg_send_id![self, inverseForRelationshipKey: relationshipKey] +); +extern_methods!( + #[doc = "NSClassDescriptionPrimitives"] + unsafe impl NSObject { + pub unsafe fn classDescription(&self) -> Id { + msg_send_id![self, classDescription] + } + pub unsafe fn attributeKeys(&self) -> Id, Shared> { + msg_send_id![self, attributeKeys] + } + pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared> { + msg_send_id![self, toOneRelationshipKeys] + } + pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared> { + msg_send_id![self, toManyRelationshipKeys] + } + pub unsafe fn inverseForRelationshipKey( + &self, + relationshipKey: &NSString, + ) -> Option> { + msg_send_id![self, inverseForRelationshipKey: relationshipKey] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 2414daa76..78d4f9e45 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCoder; @@ -13,285 +13,308 @@ extern_class!( type Super = NSObject; } ); -impl NSCoder { - pub unsafe fn encodeValueOfObjCType_at(&self, type_: NonNull, addr: NonNull) { - msg_send![self, encodeValueOfObjCType: type_, at: addr] +extern_methods!( + unsafe impl NSCoder { + pub unsafe fn encodeValueOfObjCType_at( + &self, + type_: NonNull, + addr: NonNull, + ) { + msg_send![self, encodeValueOfObjCType: type_, at: addr] + } + pub unsafe fn encodeDataObject(&self, data: &NSData) { + msg_send![self, encodeDataObject: data] + } + pub unsafe fn decodeDataObject(&self) -> Option> { + msg_send_id![self, decodeDataObject] + } + pub unsafe fn decodeValueOfObjCType_at_size( + &self, + type_: NonNull, + data: NonNull, + size: NSUInteger, + ) { + msg_send![self, decodeValueOfObjCType: type_, at: data, size: size] + } + pub unsafe fn versionForClassName(&self, className: &NSString) -> NSInteger { + msg_send![self, versionForClassName: className] + } } - pub unsafe fn encodeDataObject(&self, data: &NSData) { - msg_send![self, encodeDataObject: data] - } - pub unsafe fn decodeDataObject(&self) -> Option> { - msg_send_id![self, decodeDataObject] - } - pub unsafe fn decodeValueOfObjCType_at_size( - &self, - type_: NonNull, - data: NonNull, - size: NSUInteger, - ) { - msg_send![self, decodeValueOfObjCType: type_, at: data, size: size] - } - pub unsafe fn versionForClassName(&self, className: &NSString) -> NSInteger { - msg_send![self, versionForClassName: className] - } -} -#[doc = "NSExtendedCoder"] -impl NSCoder { - pub unsafe fn encodeObject(&self, object: Option<&Object>) { - msg_send![self, encodeObject: object] - } - pub unsafe fn encodeRootObject(&self, rootObject: &Object) { - msg_send![self, encodeRootObject: rootObject] - } - pub unsafe fn encodeBycopyObject(&self, anObject: Option<&Object>) { - msg_send![self, encodeBycopyObject: anObject] - } - pub unsafe fn encodeByrefObject(&self, anObject: Option<&Object>) { - msg_send![self, encodeByrefObject: anObject] - } - pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>) { - msg_send![self, encodeConditionalObject: object] - } - pub unsafe fn encodeArrayOfObjCType_count_at( - &self, - type_: NonNull, - count: NSUInteger, - array: NonNull, - ) { - msg_send![self, encodeArrayOfObjCType: type_, count: count, at: array] - } - pub unsafe fn encodeBytes_length(&self, byteaddr: *mut c_void, length: NSUInteger) { - msg_send![self, encodeBytes: byteaddr, length: length] - } - pub unsafe fn decodeObject(&self) -> Option> { - msg_send_id![self, decodeObject] - } - pub unsafe fn decodeTopLevelObjectAndReturnError( - &self, - ) -> Result, Id> { - msg_send_id![self, decodeTopLevelObjectAndReturnError: _] - } - pub unsafe fn decodeArrayOfObjCType_count_at( - &self, - itemType: NonNull, - count: NSUInteger, - array: NonNull, - ) { - msg_send![ - self, - decodeArrayOfObjCType: itemType, - count: count, - at: array - ] - } - pub unsafe fn decodeBytesWithReturnedLength( - &self, - lengthp: NonNull, - ) -> *mut c_void { - msg_send![self, decodeBytesWithReturnedLength: lengthp] - } - pub unsafe fn encodePropertyList(&self, aPropertyList: &Object) { - msg_send![self, encodePropertyList: aPropertyList] - } - pub unsafe fn decodePropertyList(&self) -> Option> { - msg_send_id![self, decodePropertyList] - } - pub unsafe fn setObjectZone(&self, zone: *mut NSZone) { - msg_send![self, setObjectZone: zone] - } - pub unsafe fn objectZone(&self) -> *mut NSZone { - msg_send![self, objectZone] - } - pub unsafe fn systemVersion(&self) -> c_uint { - msg_send![self, systemVersion] - } - pub unsafe fn allowsKeyedCoding(&self) -> bool { - msg_send![self, allowsKeyedCoding] - } - pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString) { - msg_send![self, encodeObject: object, forKey: key] - } - pub unsafe fn encodeConditionalObject_forKey(&self, object: Option<&Object>, key: &NSString) { - msg_send![self, encodeConditionalObject: object, forKey: key] - } - pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString) { - msg_send![self, encodeBool: value, forKey: key] - } - pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString) { - msg_send![self, encodeInt: value, forKey: key] - } - pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString) { - msg_send![self, encodeInt32: value, forKey: key] - } - pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString) { - msg_send![self, encodeInt64: value, forKey: key] - } - pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString) { - msg_send![self, encodeFloat: value, forKey: key] - } - pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString) { - msg_send![self, encodeDouble: value, forKey: key] - } - pub unsafe fn encodeBytes_length_forKey( - &self, - bytes: *mut u8, - length: NSUInteger, - key: &NSString, - ) { - msg_send![self, encodeBytes: bytes, length: length, forKey: key] - } - pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool { - msg_send![self, containsValueForKey: key] - } - pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, decodeObjectForKey: key] - } - pub unsafe fn decodeTopLevelObjectForKey_error( - &self, - key: &NSString, - ) -> Result, Id> { - msg_send_id![self, decodeTopLevelObjectForKey: key, error: _] - } - pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool { - msg_send![self, decodeBoolForKey: key] - } - pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int { - msg_send![self, decodeIntForKey: key] - } - pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32 { - msg_send![self, decodeInt32ForKey: key] - } - pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t { - msg_send![self, decodeInt64ForKey: key] - } - pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float { - msg_send![self, decodeFloatForKey: key] - } - pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double { - msg_send![self, decodeDoubleForKey: key] - } - pub unsafe fn decodeBytesForKey_returnedLength( - &self, - key: &NSString, - lengthp: *mut NSUInteger, - ) -> *mut u8 { - msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] - } - pub unsafe fn encodeInteger_forKey(&self, value: NSInteger, key: &NSString) { - msg_send![self, encodeInteger: value, forKey: key] - } - pub unsafe fn decodeIntegerForKey(&self, key: &NSString) -> NSInteger { - msg_send![self, decodeIntegerForKey: key] - } - pub unsafe fn requiresSecureCoding(&self) -> bool { - msg_send![self, requiresSecureCoding] - } - pub unsafe fn decodeObjectOfClass_forKey( - &self, - aClass: &Class, - key: &NSString, - ) -> Option> { - msg_send_id![self, decodeObjectOfClass: aClass, forKey: key] - } - pub unsafe fn decodeTopLevelObjectOfClass_forKey_error( - &self, - aClass: &Class, - key: &NSString, - ) -> Result, Id> { - msg_send_id![ - self, - decodeTopLevelObjectOfClass: aClass, - forKey: key, - error: _ - ] - } - pub unsafe fn decodeArrayOfObjectsOfClass_forKey( - &self, - cls: &Class, - key: &NSString, - ) -> Option> { - msg_send_id![self, decodeArrayOfObjectsOfClass: cls, forKey: key] - } - pub unsafe fn decodeDictionaryWithKeysOfClass_objectsOfClass_forKey( - &self, - keyCls: &Class, - objectCls: &Class, - key: &NSString, - ) -> Option> { - msg_send_id![ - self, - decodeDictionaryWithKeysOfClass: keyCls, - objectsOfClass: objectCls, - forKey: key - ] - } - pub unsafe fn decodeObjectOfClasses_forKey( - &self, - classes: Option<&NSSet>, - key: &NSString, - ) -> Option> { - msg_send_id![self, decodeObjectOfClasses: classes, forKey: key] - } - pub unsafe fn decodeTopLevelObjectOfClasses_forKey_error( - &self, - classes: Option<&NSSet>, - key: &NSString, - ) -> Result, Id> { - msg_send_id![ - self, - decodeTopLevelObjectOfClasses: classes, - forKey: key, - error: _ - ] - } - pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( - &self, - classes: &NSSet, - key: &NSString, - ) -> Option> { - msg_send_id![self, decodeArrayOfObjectsOfClasses: classes, forKey: key] - } - pub unsafe fn decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey( - &self, - keyClasses: &NSSet, - objectClasses: &NSSet, - key: &NSString, - ) -> Option> { - msg_send_id![ - self, - decodeDictionaryWithKeysOfClasses: keyClasses, - objectsOfClasses: objectClasses, - forKey: key - ] - } - pub unsafe fn decodePropertyListForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, decodePropertyListForKey: key] - } - pub unsafe fn allowedClasses(&self) -> Option, Shared>> { - msg_send_id![self, allowedClasses] - } - pub unsafe fn failWithError(&self, error: &NSError) { - msg_send![self, failWithError: error] - } - pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy { - msg_send![self, decodingFailurePolicy] - } - pub unsafe fn error(&self) -> Option> { - msg_send_id![self, error] - } -} -#[doc = "NSTypedstreamCompatibility"] -impl NSCoder { - pub unsafe fn encodeNXObject(&self, object: &Object) { - msg_send![self, encodeNXObject: object] +); +extern_methods!( + #[doc = "NSExtendedCoder"] + unsafe impl NSCoder { + pub unsafe fn encodeObject(&self, object: Option<&Object>) { + msg_send![self, encodeObject: object] + } + pub unsafe fn encodeRootObject(&self, rootObject: &Object) { + msg_send![self, encodeRootObject: rootObject] + } + pub unsafe fn encodeBycopyObject(&self, anObject: Option<&Object>) { + msg_send![self, encodeBycopyObject: anObject] + } + pub unsafe fn encodeByrefObject(&self, anObject: Option<&Object>) { + msg_send![self, encodeByrefObject: anObject] + } + pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>) { + msg_send![self, encodeConditionalObject: object] + } + pub unsafe fn encodeArrayOfObjCType_count_at( + &self, + type_: NonNull, + count: NSUInteger, + array: NonNull, + ) { + msg_send![self, encodeArrayOfObjCType: type_, count: count, at: array] + } + pub unsafe fn encodeBytes_length(&self, byteaddr: *mut c_void, length: NSUInteger) { + msg_send![self, encodeBytes: byteaddr, length: length] + } + pub unsafe fn decodeObject(&self) -> Option> { + msg_send_id![self, decodeObject] + } + pub unsafe fn decodeTopLevelObjectAndReturnError( + &self, + ) -> Result, Id> { + msg_send_id![self, decodeTopLevelObjectAndReturnError: _] + } + pub unsafe fn decodeArrayOfObjCType_count_at( + &self, + itemType: NonNull, + count: NSUInteger, + array: NonNull, + ) { + msg_send![ + self, + decodeArrayOfObjCType: itemType, + count: count, + at: array + ] + } + pub unsafe fn decodeBytesWithReturnedLength( + &self, + lengthp: NonNull, + ) -> *mut c_void { + msg_send![self, decodeBytesWithReturnedLength: lengthp] + } + pub unsafe fn encodePropertyList(&self, aPropertyList: &Object) { + msg_send![self, encodePropertyList: aPropertyList] + } + pub unsafe fn decodePropertyList(&self) -> Option> { + msg_send_id![self, decodePropertyList] + } + pub unsafe fn setObjectZone(&self, zone: *mut NSZone) { + msg_send![self, setObjectZone: zone] + } + pub unsafe fn objectZone(&self) -> *mut NSZone { + msg_send![self, objectZone] + } + pub unsafe fn systemVersion(&self) -> c_uint { + msg_send![self, systemVersion] + } + pub unsafe fn allowsKeyedCoding(&self) -> bool { + msg_send![self, allowsKeyedCoding] + } + pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString) { + msg_send![self, encodeObject: object, forKey: key] + } + pub unsafe fn encodeConditionalObject_forKey( + &self, + object: Option<&Object>, + key: &NSString, + ) { + msg_send![self, encodeConditionalObject: object, forKey: key] + } + pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString) { + msg_send![self, encodeBool: value, forKey: key] + } + pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString) { + msg_send![self, encodeInt: value, forKey: key] + } + pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString) { + msg_send![self, encodeInt32: value, forKey: key] + } + pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString) { + msg_send![self, encodeInt64: value, forKey: key] + } + pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString) { + msg_send![self, encodeFloat: value, forKey: key] + } + pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString) { + msg_send![self, encodeDouble: value, forKey: key] + } + pub unsafe fn encodeBytes_length_forKey( + &self, + bytes: *mut u8, + length: NSUInteger, + key: &NSString, + ) { + msg_send![self, encodeBytes: bytes, length: length, forKey: key] + } + pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool { + msg_send![self, containsValueForKey: key] + } + pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, decodeObjectForKey: key] + } + pub unsafe fn decodeTopLevelObjectForKey_error( + &self, + key: &NSString, + ) -> Result, Id> { + msg_send_id![self, decodeTopLevelObjectForKey: key, error: _] + } + pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool { + msg_send![self, decodeBoolForKey: key] + } + pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int { + msg_send![self, decodeIntForKey: key] + } + pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32 { + msg_send![self, decodeInt32ForKey: key] + } + pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t { + msg_send![self, decodeInt64ForKey: key] + } + pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float { + msg_send![self, decodeFloatForKey: key] + } + pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double { + msg_send![self, decodeDoubleForKey: key] + } + pub unsafe fn decodeBytesForKey_returnedLength( + &self, + key: &NSString, + lengthp: *mut NSUInteger, + ) -> *mut u8 { + msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] + } + pub unsafe fn encodeInteger_forKey(&self, value: NSInteger, key: &NSString) { + msg_send![self, encodeInteger: value, forKey: key] + } + pub unsafe fn decodeIntegerForKey(&self, key: &NSString) -> NSInteger { + msg_send![self, decodeIntegerForKey: key] + } + pub unsafe fn requiresSecureCoding(&self) -> bool { + msg_send![self, requiresSecureCoding] + } + pub unsafe fn decodeObjectOfClass_forKey( + &self, + aClass: &Class, + key: &NSString, + ) -> Option> { + msg_send_id![self, decodeObjectOfClass: aClass, forKey: key] + } + pub unsafe fn decodeTopLevelObjectOfClass_forKey_error( + &self, + aClass: &Class, + key: &NSString, + ) -> Result, Id> { + msg_send_id![ + self, + decodeTopLevelObjectOfClass: aClass, + forKey: key, + error: _ + ] + } + pub unsafe fn decodeArrayOfObjectsOfClass_forKey( + &self, + cls: &Class, + key: &NSString, + ) -> Option> { + msg_send_id![self, decodeArrayOfObjectsOfClass: cls, forKey: key] + } + pub unsafe fn decodeDictionaryWithKeysOfClass_objectsOfClass_forKey( + &self, + keyCls: &Class, + objectCls: &Class, + key: &NSString, + ) -> Option> { + msg_send_id![ + self, + decodeDictionaryWithKeysOfClass: keyCls, + objectsOfClass: objectCls, + forKey: key + ] + } + pub unsafe fn decodeObjectOfClasses_forKey( + &self, + classes: Option<&NSSet>, + key: &NSString, + ) -> Option> { + msg_send_id![self, decodeObjectOfClasses: classes, forKey: key] + } + pub unsafe fn decodeTopLevelObjectOfClasses_forKey_error( + &self, + classes: Option<&NSSet>, + key: &NSString, + ) -> Result, Id> { + msg_send_id![ + self, + decodeTopLevelObjectOfClasses: classes, + forKey: key, + error: _ + ] + } + pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( + &self, + classes: &NSSet, + key: &NSString, + ) -> Option> { + msg_send_id![self, decodeArrayOfObjectsOfClasses: classes, forKey: key] + } + pub unsafe fn decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey( + &self, + keyClasses: &NSSet, + objectClasses: &NSSet, + key: &NSString, + ) -> Option> { + msg_send_id![ + self, + decodeDictionaryWithKeysOfClasses: keyClasses, + objectsOfClasses: objectClasses, + forKey: key + ] + } + pub unsafe fn decodePropertyListForKey( + &self, + key: &NSString, + ) -> Option> { + msg_send_id![self, decodePropertyListForKey: key] + } + pub unsafe fn allowedClasses(&self) -> Option, Shared>> { + msg_send_id![self, allowedClasses] + } + pub unsafe fn failWithError(&self, error: &NSError) { + msg_send![self, failWithError: error] + } + pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy { + msg_send![self, decodingFailurePolicy] + } + pub unsafe fn error(&self) -> Option> { + msg_send_id![self, error] + } } - pub unsafe fn decodeNXObject(&self) -> Option> { - msg_send_id![self, decodeNXObject] +); +extern_methods!( + #[doc = "NSTypedstreamCompatibility"] + unsafe impl NSCoder { + pub unsafe fn encodeNXObject(&self, object: &Object) { + msg_send![self, encodeNXObject: object] + } + pub unsafe fn decodeNXObject(&self) -> Option> { + msg_send_id![self, decodeNXObject] + } } -} -#[doc = "NSDeprecated"] -impl NSCoder { - pub unsafe fn decodeValueOfObjCType_at(&self, type_: NonNull, data: NonNull) { - msg_send![self, decodeValueOfObjCType: type_, at: data] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSCoder { + pub unsafe fn decodeValueOfObjCType_at( + &self, + type_: NonNull, + data: NonNull, + ) { + msg_send![self, decodeValueOfObjCType: type_, at: data] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index f4448c86c..4489be1db 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSComparisonPredicate; @@ -12,70 +12,72 @@ extern_class!( type Super = NSPredicate; } ); -impl NSComparisonPredicate { - pub unsafe fn predicateWithLeftExpression_rightExpression_modifier_type_options( - lhs: &NSExpression, - rhs: &NSExpression, - modifier: NSComparisonPredicateModifier, - type_: NSPredicateOperatorType, - options: NSComparisonPredicateOptions, - ) -> Id { - msg_send_id ! [Self :: class () , predicateWithLeftExpression : lhs , rightExpression : rhs , modifier : modifier , type : type_ , options : options] +extern_methods!( + unsafe impl NSComparisonPredicate { + pub unsafe fn predicateWithLeftExpression_rightExpression_modifier_type_options( + lhs: &NSExpression, + rhs: &NSExpression, + modifier: NSComparisonPredicateModifier, + type_: NSPredicateOperatorType, + options: NSComparisonPredicateOptions, + ) -> Id { + msg_send_id ! [Self :: class () , predicateWithLeftExpression : lhs , rightExpression : rhs , modifier : modifier , type : type_ , options : options] + } + pub unsafe fn predicateWithLeftExpression_rightExpression_customSelector( + lhs: &NSExpression, + rhs: &NSExpression, + selector: Sel, + ) -> Id { + msg_send_id![ + Self::class(), + predicateWithLeftExpression: lhs, + rightExpression: rhs, + customSelector: selector + ] + } + pub unsafe fn initWithLeftExpression_rightExpression_modifier_type_options( + &self, + lhs: &NSExpression, + rhs: &NSExpression, + modifier: NSComparisonPredicateModifier, + type_: NSPredicateOperatorType, + options: NSComparisonPredicateOptions, + ) -> Id { + msg_send_id ! [self , initWithLeftExpression : lhs , rightExpression : rhs , modifier : modifier , type : type_ , options : options] + } + pub unsafe fn initWithLeftExpression_rightExpression_customSelector( + &self, + lhs: &NSExpression, + rhs: &NSExpression, + selector: Sel, + ) -> Id { + msg_send_id![ + self, + initWithLeftExpression: lhs, + rightExpression: rhs, + customSelector: selector + ] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn predicateOperatorType(&self) -> NSPredicateOperatorType { + msg_send![self, predicateOperatorType] + } + pub unsafe fn comparisonPredicateModifier(&self) -> NSComparisonPredicateModifier { + msg_send![self, comparisonPredicateModifier] + } + pub unsafe fn leftExpression(&self) -> Id { + msg_send_id![self, leftExpression] + } + pub unsafe fn rightExpression(&self) -> Id { + msg_send_id![self, rightExpression] + } + pub unsafe fn customSelector(&self) -> Option { + msg_send![self, customSelector] + } + pub unsafe fn options(&self) -> NSComparisonPredicateOptions { + msg_send![self, options] + } } - pub unsafe fn predicateWithLeftExpression_rightExpression_customSelector( - lhs: &NSExpression, - rhs: &NSExpression, - selector: Sel, - ) -> Id { - msg_send_id![ - Self::class(), - predicateWithLeftExpression: lhs, - rightExpression: rhs, - customSelector: selector - ] - } - pub unsafe fn initWithLeftExpression_rightExpression_modifier_type_options( - &self, - lhs: &NSExpression, - rhs: &NSExpression, - modifier: NSComparisonPredicateModifier, - type_: NSPredicateOperatorType, - options: NSComparisonPredicateOptions, - ) -> Id { - msg_send_id ! [self , initWithLeftExpression : lhs , rightExpression : rhs , modifier : modifier , type : type_ , options : options] - } - pub unsafe fn initWithLeftExpression_rightExpression_customSelector( - &self, - lhs: &NSExpression, - rhs: &NSExpression, - selector: Sel, - ) -> Id { - msg_send_id![ - self, - initWithLeftExpression: lhs, - rightExpression: rhs, - customSelector: selector - ] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn predicateOperatorType(&self) -> NSPredicateOperatorType { - msg_send![self, predicateOperatorType] - } - pub unsafe fn comparisonPredicateModifier(&self) -> NSComparisonPredicateModifier { - msg_send![self, comparisonPredicateModifier] - } - pub unsafe fn leftExpression(&self) -> Id { - msg_send_id![self, leftExpression] - } - pub unsafe fn rightExpression(&self) -> Id { - msg_send_id![self, rightExpression] - } - pub unsafe fn customSelector(&self) -> Option { - msg_send![self, customSelector] - } - pub unsafe fn options(&self) -> NSComparisonPredicateOptions { - msg_send![self, options] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 7154999e3..7e3ccfdcb 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCompoundPredicate; @@ -11,36 +11,38 @@ extern_class!( type Super = NSPredicate; } ); -impl NSCompoundPredicate { - pub unsafe fn initWithType_subpredicates( - &self, - type_: NSCompoundPredicateType, - subpredicates: &NSArray, - ) -> Id { - msg_send_id![self, initWithType: type_, subpredicates: subpredicates] +extern_methods!( + unsafe impl NSCompoundPredicate { + pub unsafe fn initWithType_subpredicates( + &self, + type_: NSCompoundPredicateType, + subpredicates: &NSArray, + ) -> Id { + msg_send_id![self, initWithType: type_, subpredicates: subpredicates] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType { + msg_send![self, compoundPredicateType] + } + pub unsafe fn subpredicates(&self) -> Id { + msg_send_id![self, subpredicates] + } + pub unsafe fn andPredicateWithSubpredicates( + subpredicates: &NSArray, + ) -> Id { + msg_send_id![Self::class(), andPredicateWithSubpredicates: subpredicates] + } + pub unsafe fn orPredicateWithSubpredicates( + subpredicates: &NSArray, + ) -> Id { + msg_send_id![Self::class(), orPredicateWithSubpredicates: subpredicates] + } + pub unsafe fn notPredicateWithSubpredicate( + predicate: &NSPredicate, + ) -> Id { + msg_send_id![Self::class(), notPredicateWithSubpredicate: predicate] + } } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType { - msg_send![self, compoundPredicateType] - } - pub unsafe fn subpredicates(&self) -> Id { - msg_send_id![self, subpredicates] - } - pub unsafe fn andPredicateWithSubpredicates( - subpredicates: &NSArray, - ) -> Id { - msg_send_id![Self::class(), andPredicateWithSubpredicates: subpredicates] - } - pub unsafe fn orPredicateWithSubpredicates( - subpredicates: &NSArray, - ) -> Id { - msg_send_id![Self::class(), orPredicateWithSubpredicates: subpredicates] - } - pub unsafe fn notPredicateWithSubpredicate( - predicate: &NSPredicate, - ) -> Id { - msg_send_id![Self::class(), notPredicateWithSubpredicate: predicate] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 308abcaba..c7c0cd8c9 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -14,7 +14,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSConnection; @@ -22,194 +22,199 @@ extern_class!( type Super = NSObject; } ); -impl NSConnection { - pub unsafe fn statistics(&self) -> Id, Shared> { - msg_send_id![self, statistics] +extern_methods!( + unsafe impl NSConnection { + pub unsafe fn statistics(&self) -> Id, Shared> { + msg_send_id![self, statistics] + } + pub unsafe fn allConnections() -> Id, Shared> { + msg_send_id![Self::class(), allConnections] + } + pub unsafe fn defaultConnection() -> Id { + msg_send_id![Self::class(), defaultConnection] + } + pub unsafe fn connectionWithRegisteredName_host( + name: &NSString, + hostName: Option<&NSString>, + ) -> Option> { + msg_send_id![ + Self::class(), + connectionWithRegisteredName: name, + host: hostName + ] + } + pub unsafe fn connectionWithRegisteredName_host_usingNameServer( + name: &NSString, + hostName: Option<&NSString>, + server: &NSPortNameServer, + ) -> Option> { + msg_send_id![ + Self::class(), + connectionWithRegisteredName: name, + host: hostName, + usingNameServer: server + ] + } + pub unsafe fn rootProxyForConnectionWithRegisteredName_host( + name: &NSString, + hostName: Option<&NSString>, + ) -> Option> { + msg_send_id![ + Self::class(), + rootProxyForConnectionWithRegisteredName: name, + host: hostName + ] + } + pub unsafe fn rootProxyForConnectionWithRegisteredName_host_usingNameServer( + name: &NSString, + hostName: Option<&NSString>, + server: &NSPortNameServer, + ) -> Option> { + msg_send_id![ + Self::class(), + rootProxyForConnectionWithRegisteredName: name, + host: hostName, + usingNameServer: server + ] + } + pub unsafe fn serviceConnectionWithName_rootObject_usingNameServer( + name: &NSString, + root: &Object, + server: &NSPortNameServer, + ) -> Option> { + msg_send_id![ + Self::class(), + serviceConnectionWithName: name, + rootObject: root, + usingNameServer: server + ] + } + pub unsafe fn serviceConnectionWithName_rootObject( + name: &NSString, + root: &Object, + ) -> Option> { + msg_send_id![ + Self::class(), + serviceConnectionWithName: name, + rootObject: root + ] + } + pub unsafe fn requestTimeout(&self) -> NSTimeInterval { + msg_send![self, requestTimeout] + } + pub unsafe fn setRequestTimeout(&self, requestTimeout: NSTimeInterval) { + msg_send![self, setRequestTimeout: requestTimeout] + } + pub unsafe fn replyTimeout(&self) -> NSTimeInterval { + msg_send![self, replyTimeout] + } + pub unsafe fn setReplyTimeout(&self, replyTimeout: NSTimeInterval) { + msg_send![self, setReplyTimeout: replyTimeout] + } + pub unsafe fn rootObject(&self) -> Option> { + msg_send_id![self, rootObject] + } + pub unsafe fn setRootObject(&self, rootObject: Option<&Object>) { + msg_send![self, setRootObject: rootObject] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSConnectionDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn independentConversationQueueing(&self) -> bool { + msg_send![self, independentConversationQueueing] + } + pub unsafe fn setIndependentConversationQueueing( + &self, + independentConversationQueueing: bool, + ) { + msg_send![ + self, + setIndependentConversationQueueing: independentConversationQueueing + ] + } + pub unsafe fn isValid(&self) -> bool { + msg_send![self, isValid] + } + pub unsafe fn rootProxy(&self) -> Id { + msg_send_id![self, rootProxy] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn addRequestMode(&self, rmode: &NSString) { + msg_send![self, addRequestMode: rmode] + } + pub unsafe fn removeRequestMode(&self, rmode: &NSString) { + msg_send![self, removeRequestMode: rmode] + } + pub unsafe fn requestModes(&self) -> Id, Shared> { + msg_send_id![self, requestModes] + } + pub unsafe fn registerName(&self, name: Option<&NSString>) -> bool { + msg_send![self, registerName: name] + } + pub unsafe fn registerName_withNameServer( + &self, + name: Option<&NSString>, + server: &NSPortNameServer, + ) -> bool { + msg_send![self, registerName: name, withNameServer: server] + } + pub unsafe fn connectionWithReceivePort_sendPort( + receivePort: Option<&NSPort>, + sendPort: Option<&NSPort>, + ) -> Option> { + msg_send_id![ + Self::class(), + connectionWithReceivePort: receivePort, + sendPort: sendPort + ] + } + pub unsafe fn currentConversation() -> Option> { + msg_send_id![Self::class(), currentConversation] + } + pub unsafe fn initWithReceivePort_sendPort( + &self, + receivePort: Option<&NSPort>, + sendPort: Option<&NSPort>, + ) -> Option> { + msg_send_id![self, initWithReceivePort: receivePort, sendPort: sendPort] + } + pub unsafe fn sendPort(&self) -> Id { + msg_send_id![self, sendPort] + } + pub unsafe fn receivePort(&self) -> Id { + msg_send_id![self, receivePort] + } + pub unsafe fn enableMultipleThreads(&self) { + msg_send![self, enableMultipleThreads] + } + pub unsafe fn multipleThreadsEnabled(&self) -> bool { + msg_send![self, multipleThreadsEnabled] + } + pub unsafe fn addRunLoop(&self, runloop: &NSRunLoop) { + msg_send![self, addRunLoop: runloop] + } + pub unsafe fn removeRunLoop(&self, runloop: &NSRunLoop) { + msg_send![self, removeRunLoop: runloop] + } + pub unsafe fn runInNewThread(&self) { + msg_send![self, runInNewThread] + } + pub unsafe fn remoteObjects(&self) -> Id { + msg_send_id![self, remoteObjects] + } + pub unsafe fn localObjects(&self) -> Id { + msg_send_id![self, localObjects] + } + pub unsafe fn dispatchWithComponents(&self, components: &NSArray) { + msg_send![self, dispatchWithComponents: components] + } } - pub unsafe fn allConnections() -> Id, Shared> { - msg_send_id![Self::class(), allConnections] - } - pub unsafe fn defaultConnection() -> Id { - msg_send_id![Self::class(), defaultConnection] - } - pub unsafe fn connectionWithRegisteredName_host( - name: &NSString, - hostName: Option<&NSString>, - ) -> Option> { - msg_send_id![ - Self::class(), - connectionWithRegisteredName: name, - host: hostName - ] - } - pub unsafe fn connectionWithRegisteredName_host_usingNameServer( - name: &NSString, - hostName: Option<&NSString>, - server: &NSPortNameServer, - ) -> Option> { - msg_send_id![ - Self::class(), - connectionWithRegisteredName: name, - host: hostName, - usingNameServer: server - ] - } - pub unsafe fn rootProxyForConnectionWithRegisteredName_host( - name: &NSString, - hostName: Option<&NSString>, - ) -> Option> { - msg_send_id![ - Self::class(), - rootProxyForConnectionWithRegisteredName: name, - host: hostName - ] - } - pub unsafe fn rootProxyForConnectionWithRegisteredName_host_usingNameServer( - name: &NSString, - hostName: Option<&NSString>, - server: &NSPortNameServer, - ) -> Option> { - msg_send_id![ - Self::class(), - rootProxyForConnectionWithRegisteredName: name, - host: hostName, - usingNameServer: server - ] - } - pub unsafe fn serviceConnectionWithName_rootObject_usingNameServer( - name: &NSString, - root: &Object, - server: &NSPortNameServer, - ) -> Option> { - msg_send_id![ - Self::class(), - serviceConnectionWithName: name, - rootObject: root, - usingNameServer: server - ] - } - pub unsafe fn serviceConnectionWithName_rootObject( - name: &NSString, - root: &Object, - ) -> Option> { - msg_send_id![ - Self::class(), - serviceConnectionWithName: name, - rootObject: root - ] - } - pub unsafe fn requestTimeout(&self) -> NSTimeInterval { - msg_send![self, requestTimeout] - } - pub unsafe fn setRequestTimeout(&self, requestTimeout: NSTimeInterval) { - msg_send![self, setRequestTimeout: requestTimeout] - } - pub unsafe fn replyTimeout(&self) -> NSTimeInterval { - msg_send![self, replyTimeout] - } - pub unsafe fn setReplyTimeout(&self, replyTimeout: NSTimeInterval) { - msg_send![self, setReplyTimeout: replyTimeout] - } - pub unsafe fn rootObject(&self) -> Option> { - msg_send_id![self, rootObject] - } - pub unsafe fn setRootObject(&self, rootObject: Option<&Object>) { - msg_send![self, setRootObject: rootObject] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSConnectionDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn independentConversationQueueing(&self) -> bool { - msg_send![self, independentConversationQueueing] - } - pub unsafe fn setIndependentConversationQueueing(&self, independentConversationQueueing: bool) { - msg_send![ - self, - setIndependentConversationQueueing: independentConversationQueueing - ] - } - pub unsafe fn isValid(&self) -> bool { - msg_send![self, isValid] - } - pub unsafe fn rootProxy(&self) -> Id { - msg_send_id![self, rootProxy] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn addRequestMode(&self, rmode: &NSString) { - msg_send![self, addRequestMode: rmode] - } - pub unsafe fn removeRequestMode(&self, rmode: &NSString) { - msg_send![self, removeRequestMode: rmode] - } - pub unsafe fn requestModes(&self) -> Id, Shared> { - msg_send_id![self, requestModes] - } - pub unsafe fn registerName(&self, name: Option<&NSString>) -> bool { - msg_send![self, registerName: name] - } - pub unsafe fn registerName_withNameServer( - &self, - name: Option<&NSString>, - server: &NSPortNameServer, - ) -> bool { - msg_send![self, registerName: name, withNameServer: server] - } - pub unsafe fn connectionWithReceivePort_sendPort( - receivePort: Option<&NSPort>, - sendPort: Option<&NSPort>, - ) -> Option> { - msg_send_id![ - Self::class(), - connectionWithReceivePort: receivePort, - sendPort: sendPort - ] - } - pub unsafe fn currentConversation() -> Option> { - msg_send_id![Self::class(), currentConversation] - } - pub unsafe fn initWithReceivePort_sendPort( - &self, - receivePort: Option<&NSPort>, - sendPort: Option<&NSPort>, - ) -> Option> { - msg_send_id![self, initWithReceivePort: receivePort, sendPort: sendPort] - } - pub unsafe fn sendPort(&self) -> Id { - msg_send_id![self, sendPort] - } - pub unsafe fn receivePort(&self) -> Id { - msg_send_id![self, receivePort] - } - pub unsafe fn enableMultipleThreads(&self) { - msg_send![self, enableMultipleThreads] - } - pub unsafe fn multipleThreadsEnabled(&self) -> bool { - msg_send![self, multipleThreadsEnabled] - } - pub unsafe fn addRunLoop(&self, runloop: &NSRunLoop) { - msg_send![self, addRunLoop: runloop] - } - pub unsafe fn removeRunLoop(&self, runloop: &NSRunLoop) { - msg_send![self, removeRunLoop: runloop] - } - pub unsafe fn runInNewThread(&self) { - msg_send![self, runInNewThread] - } - pub unsafe fn remoteObjects(&self) -> Id { - msg_send_id![self, remoteObjects] - } - pub unsafe fn localObjects(&self) -> Id { - msg_send_id![self, localObjects] - } - pub unsafe fn dispatchWithComponents(&self, components: &NSArray) { - msg_send![self, dispatchWithComponents: components] - } -} +); pub type NSConnectionDelegate = NSObject; extern_class!( #[derive(Debug)] @@ -218,17 +223,19 @@ extern_class!( type Super = NSObject; } ); -impl NSDistantObjectRequest { - pub unsafe fn invocation(&self) -> Id { - msg_send_id![self, invocation] - } - pub unsafe fn connection(&self) -> Id { - msg_send_id![self, connection] - } - pub unsafe fn conversation(&self) -> Id { - msg_send_id![self, conversation] +extern_methods!( + unsafe impl NSDistantObjectRequest { + pub unsafe fn invocation(&self) -> Id { + msg_send_id![self, invocation] + } + pub unsafe fn connection(&self) -> Id { + msg_send_id![self, connection] + } + pub unsafe fn conversation(&self) -> Id { + msg_send_id![self, conversation] + } + pub unsafe fn replyWithException(&self, exception: Option<&NSException>) { + msg_send![self, replyWithException: exception] + } } - pub unsafe fn replyWithException(&self, exception: Option<&NSException>) { - msg_send![self, replyWithException: exception] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 64b7146f6..e60d4ff6c 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSData; @@ -14,275 +14,294 @@ extern_class!( type Super = NSObject; } ); -impl NSData { - pub unsafe fn length(&self) -> NSUInteger { - msg_send![self, length] +extern_methods!( + unsafe impl NSData { + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } + pub unsafe fn bytes(&self) -> NonNull { + msg_send![self, bytes] + } } - pub unsafe fn bytes(&self) -> NonNull { - msg_send![self, bytes] - } -} -#[doc = "NSExtendedData"] -impl NSData { - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn getBytes_length(&self, buffer: NonNull, length: NSUInteger) { - msg_send![self, getBytes: buffer, length: length] - } - pub unsafe fn getBytes_range(&self, buffer: NonNull, range: NSRange) { - msg_send![self, getBytes: buffer, range: range] - } - pub unsafe fn isEqualToData(&self, other: &NSData) -> bool { - msg_send![self, isEqualToData: other] - } - pub unsafe fn subdataWithRange(&self, range: NSRange) -> Id { - msg_send_id![self, subdataWithRange: range] - } - pub unsafe fn writeToFile_atomically(&self, path: &NSString, useAuxiliaryFile: bool) -> bool { - msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] - } - pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { - msg_send![self, writeToURL: url, atomically: atomically] - } - pub unsafe fn writeToFile_options_error( - &self, - path: &NSString, - writeOptionsMask: NSDataWritingOptions, - ) -> Result<(), Id> { - msg_send![self, writeToFile: path, options: writeOptionsMask, error: _] - } - pub unsafe fn writeToURL_options_error( - &self, - url: &NSURL, - writeOptionsMask: NSDataWritingOptions, - ) -> Result<(), Id> { - msg_send![self, writeToURL: url, options: writeOptionsMask, error: _] - } - pub unsafe fn rangeOfData_options_range( - &self, - dataToFind: &NSData, - mask: NSDataSearchOptions, - searchRange: NSRange, - ) -> NSRange { - msg_send![ - self, - rangeOfData: dataToFind, - options: mask, - range: searchRange - ] - } - pub unsafe fn enumerateByteRangesUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateByteRangesUsingBlock: block] - } -} -#[doc = "NSDataCreation"] -impl NSData { - pub unsafe fn data() -> Id { - msg_send_id![Self::class(), data] - } - pub unsafe fn dataWithBytes_length(bytes: *mut c_void, length: NSUInteger) -> Id { - msg_send_id![Self::class(), dataWithBytes: bytes, length: length] - } - pub unsafe fn dataWithBytesNoCopy_length( - bytes: NonNull, - length: NSUInteger, - ) -> Id { - msg_send_id![Self::class(), dataWithBytesNoCopy: bytes, length: length] - } - pub unsafe fn dataWithBytesNoCopy_length_freeWhenDone( - bytes: NonNull, - length: NSUInteger, - b: bool, - ) -> Id { - msg_send_id![ - Self::class(), - dataWithBytesNoCopy: bytes, - length: length, - freeWhenDone: b - ] - } - pub unsafe fn dataWithContentsOfFile_options_error( - path: &NSString, - readOptionsMask: NSDataReadingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - dataWithContentsOfFile: path, - options: readOptionsMask, - error: _ - ] - } - pub unsafe fn dataWithContentsOfURL_options_error( - url: &NSURL, - readOptionsMask: NSDataReadingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - dataWithContentsOfURL: url, - options: readOptionsMask, - error: _ - ] - } - pub unsafe fn dataWithContentsOfFile(path: &NSString) -> Option> { - msg_send_id![Self::class(), dataWithContentsOfFile: path] - } - pub unsafe fn dataWithContentsOfURL(url: &NSURL) -> Option> { - msg_send_id![Self::class(), dataWithContentsOfURL: url] - } - pub unsafe fn initWithBytes_length( - &self, - bytes: *mut c_void, - length: NSUInteger, - ) -> Id { - msg_send_id![self, initWithBytes: bytes, length: length] - } - pub unsafe fn initWithBytesNoCopy_length( - &self, - bytes: NonNull, - length: NSUInteger, - ) -> Id { - msg_send_id![self, initWithBytesNoCopy: bytes, length: length] - } - pub unsafe fn initWithBytesNoCopy_length_freeWhenDone( - &self, - bytes: NonNull, - length: NSUInteger, - b: bool, - ) -> Id { - msg_send_id![ - self, - initWithBytesNoCopy: bytes, - length: length, - freeWhenDone: b - ] - } - pub unsafe fn initWithBytesNoCopy_length_deallocator( - &self, - bytes: NonNull, - length: NSUInteger, - deallocator: TodoBlock, - ) -> Id { - msg_send_id![ - self, - initWithBytesNoCopy: bytes, - length: length, - deallocator: deallocator - ] - } - pub unsafe fn initWithContentsOfFile_options_error( - &self, - path: &NSString, - readOptionsMask: NSDataReadingOptions, - ) -> Result, Id> { - msg_send_id![ - self, - initWithContentsOfFile: path, - options: readOptionsMask, - error: _ - ] - } - pub unsafe fn initWithContentsOfURL_options_error( - &self, - url: &NSURL, - readOptionsMask: NSDataReadingOptions, - ) -> Result, Id> { - msg_send_id![ - self, - initWithContentsOfURL: url, - options: readOptionsMask, - error: _ - ] - } - pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithContentsOfFile: path] - } - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithContentsOfURL: url] - } - pub unsafe fn initWithData(&self, data: &NSData) -> Id { - msg_send_id![self, initWithData: data] - } - pub unsafe fn dataWithData(data: &NSData) -> Id { - msg_send_id![Self::class(), dataWithData: data] - } -} -#[doc = "NSDataBase64Encoding"] -impl NSData { - pub unsafe fn initWithBase64EncodedString_options( - &self, - base64String: &NSString, - options: NSDataBase64DecodingOptions, - ) -> Option> { - msg_send_id![ - self, - initWithBase64EncodedString: base64String, - options: options - ] - } - pub unsafe fn base64EncodedStringWithOptions( - &self, - options: NSDataBase64EncodingOptions, - ) -> Id { - msg_send_id![self, base64EncodedStringWithOptions: options] - } - pub unsafe fn initWithBase64EncodedData_options( - &self, - base64Data: &NSData, - options: NSDataBase64DecodingOptions, - ) -> Option> { - msg_send_id![ - self, - initWithBase64EncodedData: base64Data, - options: options - ] - } - pub unsafe fn base64EncodedDataWithOptions( - &self, - options: NSDataBase64EncodingOptions, - ) -> Id { - msg_send_id![self, base64EncodedDataWithOptions: options] - } -} -#[doc = "NSDataCompression"] -impl NSData { - pub unsafe fn decompressedDataUsingAlgorithm_error( - &self, - algorithm: NSDataCompressionAlgorithm, - ) -> Result, Id> { - msg_send_id![self, decompressedDataUsingAlgorithm: algorithm, error: _] - } - pub unsafe fn compressedDataUsingAlgorithm_error( - &self, - algorithm: NSDataCompressionAlgorithm, - ) -> Result, Id> { - msg_send_id![self, compressedDataUsingAlgorithm: algorithm, error: _] - } -} -#[doc = "NSDeprecated"] -impl NSData { - pub unsafe fn getBytes(&self, buffer: NonNull) { - msg_send![self, getBytes: buffer] +); +extern_methods!( + #[doc = "NSExtendedData"] + unsafe impl NSData { + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn getBytes_length(&self, buffer: NonNull, length: NSUInteger) { + msg_send![self, getBytes: buffer, length: length] + } + pub unsafe fn getBytes_range(&self, buffer: NonNull, range: NSRange) { + msg_send![self, getBytes: buffer, range: range] + } + pub unsafe fn isEqualToData(&self, other: &NSData) -> bool { + msg_send![self, isEqualToData: other] + } + pub unsafe fn subdataWithRange(&self, range: NSRange) -> Id { + msg_send_id![self, subdataWithRange: range] + } + pub unsafe fn writeToFile_atomically( + &self, + path: &NSString, + useAuxiliaryFile: bool, + ) -> bool { + msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] + } + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { + msg_send![self, writeToURL: url, atomically: atomically] + } + pub unsafe fn writeToFile_options_error( + &self, + path: &NSString, + writeOptionsMask: NSDataWritingOptions, + ) -> Result<(), Id> { + msg_send![self, writeToFile: path, options: writeOptionsMask, error: _] + } + pub unsafe fn writeToURL_options_error( + &self, + url: &NSURL, + writeOptionsMask: NSDataWritingOptions, + ) -> Result<(), Id> { + msg_send![self, writeToURL: url, options: writeOptionsMask, error: _] + } + pub unsafe fn rangeOfData_options_range( + &self, + dataToFind: &NSData, + mask: NSDataSearchOptions, + searchRange: NSRange, + ) -> NSRange { + msg_send![ + self, + rangeOfData: dataToFind, + options: mask, + range: searchRange + ] + } + pub unsafe fn enumerateByteRangesUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateByteRangesUsingBlock: block] + } } - pub unsafe fn dataWithContentsOfMappedFile(path: &NSString) -> Option> { - msg_send_id![Self::class(), dataWithContentsOfMappedFile: path] +); +extern_methods!( + #[doc = "NSDataCreation"] + unsafe impl NSData { + pub unsafe fn data() -> Id { + msg_send_id![Self::class(), data] + } + pub unsafe fn dataWithBytes_length( + bytes: *mut c_void, + length: NSUInteger, + ) -> Id { + msg_send_id![Self::class(), dataWithBytes: bytes, length: length] + } + pub unsafe fn dataWithBytesNoCopy_length( + bytes: NonNull, + length: NSUInteger, + ) -> Id { + msg_send_id![Self::class(), dataWithBytesNoCopy: bytes, length: length] + } + pub unsafe fn dataWithBytesNoCopy_length_freeWhenDone( + bytes: NonNull, + length: NSUInteger, + b: bool, + ) -> Id { + msg_send_id![ + Self::class(), + dataWithBytesNoCopy: bytes, + length: length, + freeWhenDone: b + ] + } + pub unsafe fn dataWithContentsOfFile_options_error( + path: &NSString, + readOptionsMask: NSDataReadingOptions, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + dataWithContentsOfFile: path, + options: readOptionsMask, + error: _ + ] + } + pub unsafe fn dataWithContentsOfURL_options_error( + url: &NSURL, + readOptionsMask: NSDataReadingOptions, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + dataWithContentsOfURL: url, + options: readOptionsMask, + error: _ + ] + } + pub unsafe fn dataWithContentsOfFile(path: &NSString) -> Option> { + msg_send_id![Self::class(), dataWithContentsOfFile: path] + } + pub unsafe fn dataWithContentsOfURL(url: &NSURL) -> Option> { + msg_send_id![Self::class(), dataWithContentsOfURL: url] + } + pub unsafe fn initWithBytes_length( + &self, + bytes: *mut c_void, + length: NSUInteger, + ) -> Id { + msg_send_id![self, initWithBytes: bytes, length: length] + } + pub unsafe fn initWithBytesNoCopy_length( + &self, + bytes: NonNull, + length: NSUInteger, + ) -> Id { + msg_send_id![self, initWithBytesNoCopy: bytes, length: length] + } + pub unsafe fn initWithBytesNoCopy_length_freeWhenDone( + &self, + bytes: NonNull, + length: NSUInteger, + b: bool, + ) -> Id { + msg_send_id![ + self, + initWithBytesNoCopy: bytes, + length: length, + freeWhenDone: b + ] + } + pub unsafe fn initWithBytesNoCopy_length_deallocator( + &self, + bytes: NonNull, + length: NSUInteger, + deallocator: TodoBlock, + ) -> Id { + msg_send_id![ + self, + initWithBytesNoCopy: bytes, + length: length, + deallocator: deallocator + ] + } + pub unsafe fn initWithContentsOfFile_options_error( + &self, + path: &NSString, + readOptionsMask: NSDataReadingOptions, + ) -> Result, Id> { + msg_send_id![ + self, + initWithContentsOfFile: path, + options: readOptionsMask, + error: _ + ] + } + pub unsafe fn initWithContentsOfURL_options_error( + &self, + url: &NSURL, + readOptionsMask: NSDataReadingOptions, + ) -> Result, Id> { + msg_send_id![ + self, + initWithContentsOfURL: url, + options: readOptionsMask, + error: _ + ] + } + pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithContentsOfURL: url] + } + pub unsafe fn initWithData(&self, data: &NSData) -> Id { + msg_send_id![self, initWithData: data] + } + pub unsafe fn dataWithData(data: &NSData) -> Id { + msg_send_id![Self::class(), dataWithData: data] + } } - pub unsafe fn initWithContentsOfMappedFile( - &self, - path: &NSString, - ) -> Option> { - msg_send_id![self, initWithContentsOfMappedFile: path] +); +extern_methods!( + #[doc = "NSDataBase64Encoding"] + unsafe impl NSData { + pub unsafe fn initWithBase64EncodedString_options( + &self, + base64String: &NSString, + options: NSDataBase64DecodingOptions, + ) -> Option> { + msg_send_id![ + self, + initWithBase64EncodedString: base64String, + options: options + ] + } + pub unsafe fn base64EncodedStringWithOptions( + &self, + options: NSDataBase64EncodingOptions, + ) -> Id { + msg_send_id![self, base64EncodedStringWithOptions: options] + } + pub unsafe fn initWithBase64EncodedData_options( + &self, + base64Data: &NSData, + options: NSDataBase64DecodingOptions, + ) -> Option> { + msg_send_id![ + self, + initWithBase64EncodedData: base64Data, + options: options + ] + } + pub unsafe fn base64EncodedDataWithOptions( + &self, + options: NSDataBase64EncodingOptions, + ) -> Id { + msg_send_id![self, base64EncodedDataWithOptions: options] + } } - pub unsafe fn initWithBase64Encoding( - &self, - base64String: &NSString, - ) -> Option> { - msg_send_id![self, initWithBase64Encoding: base64String] +); +extern_methods!( + #[doc = "NSDataCompression"] + unsafe impl NSData { + pub unsafe fn decompressedDataUsingAlgorithm_error( + &self, + algorithm: NSDataCompressionAlgorithm, + ) -> Result, Id> { + msg_send_id![self, decompressedDataUsingAlgorithm: algorithm, error: _] + } + pub unsafe fn compressedDataUsingAlgorithm_error( + &self, + algorithm: NSDataCompressionAlgorithm, + ) -> Result, Id> { + msg_send_id![self, compressedDataUsingAlgorithm: algorithm, error: _] + } } - pub unsafe fn base64Encoding(&self) -> Id { - msg_send_id![self, base64Encoding] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSData { + pub unsafe fn getBytes(&self, buffer: NonNull) { + msg_send![self, getBytes: buffer] + } + pub unsafe fn dataWithContentsOfMappedFile(path: &NSString) -> Option> { + msg_send_id![Self::class(), dataWithContentsOfMappedFile: path] + } + pub unsafe fn initWithContentsOfMappedFile( + &self, + path: &NSString, + ) -> Option> { + msg_send_id![self, initWithContentsOfMappedFile: path] + } + pub unsafe fn initWithBase64Encoding( + &self, + base64String: &NSString, + ) -> Option> { + msg_send_id![self, initWithBase64Encoding: base64String] + } + pub unsafe fn base64Encoding(&self) -> Id { + msg_send_id![self, base64Encoding] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSMutableData; @@ -290,81 +309,89 @@ extern_class!( type Super = NSData; } ); -impl NSMutableData { - pub unsafe fn mutableBytes(&self) -> NonNull { - msg_send![self, mutableBytes] - } - pub unsafe fn length(&self) -> NSUInteger { - msg_send![self, length] - } - pub unsafe fn setLength(&self, length: NSUInteger) { - msg_send![self, setLength: length] - } -} -#[doc = "NSExtendedMutableData"] -impl NSMutableData { - pub unsafe fn appendBytes_length(&self, bytes: NonNull, length: NSUInteger) { - msg_send![self, appendBytes: bytes, length: length] +extern_methods!( + unsafe impl NSMutableData { + pub unsafe fn mutableBytes(&self) -> NonNull { + msg_send![self, mutableBytes] + } + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } + pub unsafe fn setLength(&self, length: NSUInteger) { + msg_send![self, setLength: length] + } } - pub unsafe fn appendData(&self, other: &NSData) { - msg_send![self, appendData: other] - } - pub unsafe fn increaseLengthBy(&self, extraLength: NSUInteger) { - msg_send![self, increaseLengthBy: extraLength] - } - pub unsafe fn replaceBytesInRange_withBytes(&self, range: NSRange, bytes: NonNull) { - msg_send![self, replaceBytesInRange: range, withBytes: bytes] - } - pub unsafe fn resetBytesInRange(&self, range: NSRange) { - msg_send![self, resetBytesInRange: range] - } - pub unsafe fn setData(&self, data: &NSData) { - msg_send![self, setData: data] - } - pub unsafe fn replaceBytesInRange_withBytes_length( - &self, - range: NSRange, - replacementBytes: *mut c_void, - replacementLength: NSUInteger, - ) { - msg_send![ - self, - replaceBytesInRange: range, - withBytes: replacementBytes, - length: replacementLength - ] - } -} -#[doc = "NSMutableDataCreation"] -impl NSMutableData { - pub unsafe fn dataWithCapacity(aNumItems: NSUInteger) -> Option> { - msg_send_id![Self::class(), dataWithCapacity: aNumItems] - } - pub unsafe fn dataWithLength(length: NSUInteger) -> Option> { - msg_send_id![Self::class(), dataWithLength: length] - } - pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Option> { - msg_send_id![self, initWithCapacity: capacity] - } - pub unsafe fn initWithLength(&self, length: NSUInteger) -> Option> { - msg_send_id![self, initWithLength: length] +); +extern_methods!( + #[doc = "NSExtendedMutableData"] + unsafe impl NSMutableData { + pub unsafe fn appendBytes_length(&self, bytes: NonNull, length: NSUInteger) { + msg_send![self, appendBytes: bytes, length: length] + } + pub unsafe fn appendData(&self, other: &NSData) { + msg_send![self, appendData: other] + } + pub unsafe fn increaseLengthBy(&self, extraLength: NSUInteger) { + msg_send![self, increaseLengthBy: extraLength] + } + pub unsafe fn replaceBytesInRange_withBytes(&self, range: NSRange, bytes: NonNull) { + msg_send![self, replaceBytesInRange: range, withBytes: bytes] + } + pub unsafe fn resetBytesInRange(&self, range: NSRange) { + msg_send![self, resetBytesInRange: range] + } + pub unsafe fn setData(&self, data: &NSData) { + msg_send![self, setData: data] + } + pub unsafe fn replaceBytesInRange_withBytes_length( + &self, + range: NSRange, + replacementBytes: *mut c_void, + replacementLength: NSUInteger, + ) { + msg_send![ + self, + replaceBytesInRange: range, + withBytes: replacementBytes, + length: replacementLength + ] + } } -} -#[doc = "NSMutableDataCompression"] -impl NSMutableData { - pub unsafe fn decompressUsingAlgorithm_error( - &self, - algorithm: NSDataCompressionAlgorithm, - ) -> Result<(), Id> { - msg_send![self, decompressUsingAlgorithm: algorithm, error: _] +); +extern_methods!( + #[doc = "NSMutableDataCreation"] + unsafe impl NSMutableData { + pub unsafe fn dataWithCapacity(aNumItems: NSUInteger) -> Option> { + msg_send_id![Self::class(), dataWithCapacity: aNumItems] + } + pub unsafe fn dataWithLength(length: NSUInteger) -> Option> { + msg_send_id![Self::class(), dataWithLength: length] + } + pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Option> { + msg_send_id![self, initWithCapacity: capacity] + } + pub unsafe fn initWithLength(&self, length: NSUInteger) -> Option> { + msg_send_id![self, initWithLength: length] + } } - pub unsafe fn compressUsingAlgorithm_error( - &self, - algorithm: NSDataCompressionAlgorithm, - ) -> Result<(), Id> { - msg_send![self, compressUsingAlgorithm: algorithm, error: _] +); +extern_methods!( + #[doc = "NSMutableDataCompression"] + unsafe impl NSMutableData { + pub unsafe fn decompressUsingAlgorithm_error( + &self, + algorithm: NSDataCompressionAlgorithm, + ) -> Result<(), Id> { + msg_send![self, decompressUsingAlgorithm: algorithm, error: _] + } + pub unsafe fn compressUsingAlgorithm_error( + &self, + algorithm: NSDataCompressionAlgorithm, + ) -> Result<(), Id> { + msg_send![self, compressUsingAlgorithm: algorithm, error: _] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSPurgeableData; @@ -372,4 +399,6 @@ extern_class!( type Super = NSMutableData; } ); -impl NSPurgeableData {} +extern_methods!( + unsafe impl NSPurgeableData {} +); diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 3b8634759..d6d934560 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDate; @@ -12,106 +12,123 @@ extern_class!( type Super = NSObject; } ); -impl NSDate { - pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval { - msg_send![self, timeIntervalSinceReferenceDate] +extern_methods!( + unsafe impl NSDate { + pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval { + msg_send![self, timeIntervalSinceReferenceDate] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithTimeIntervalSinceReferenceDate( + &self, + ti: NSTimeInterval, + ) -> Id { + msg_send_id![self, initWithTimeIntervalSinceReferenceDate: ti] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithTimeIntervalSinceReferenceDate( - &self, - ti: NSTimeInterval, - ) -> Id { - msg_send_id![self, initWithTimeIntervalSinceReferenceDate: ti] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSExtendedDate"] -impl NSDate { - pub unsafe fn timeIntervalSinceDate(&self, anotherDate: &NSDate) -> NSTimeInterval { - msg_send![self, timeIntervalSinceDate: anotherDate] - } - pub unsafe fn timeIntervalSinceNow(&self) -> NSTimeInterval { - msg_send![self, timeIntervalSinceNow] - } - pub unsafe fn timeIntervalSince1970(&self) -> NSTimeInterval { - msg_send![self, timeIntervalSince1970] - } - pub unsafe fn addTimeInterval(&self, seconds: NSTimeInterval) -> Id { - msg_send_id![self, addTimeInterval: seconds] - } - pub unsafe fn dateByAddingTimeInterval(&self, ti: NSTimeInterval) -> Id { - msg_send_id![self, dateByAddingTimeInterval: ti] - } - pub unsafe fn earlierDate(&self, anotherDate: &NSDate) -> Id { - msg_send_id![self, earlierDate: anotherDate] - } - pub unsafe fn laterDate(&self, anotherDate: &NSDate) -> Id { - msg_send_id![self, laterDate: anotherDate] - } - pub unsafe fn compare(&self, other: &NSDate) -> NSComparisonResult { - msg_send![self, compare: other] - } - pub unsafe fn isEqualToDate(&self, otherDate: &NSDate) -> bool { - msg_send![self, isEqualToDate: otherDate] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn timeIntervalSinceReferenceDate() -> NSTimeInterval { - msg_send![Self::class(), timeIntervalSinceReferenceDate] - } -} -#[doc = "NSDateCreation"] -impl NSDate { - pub unsafe fn date() -> Id { - msg_send_id![Self::class(), date] - } - pub unsafe fn dateWithTimeIntervalSinceNow(secs: NSTimeInterval) -> Id { - msg_send_id![Self::class(), dateWithTimeIntervalSinceNow: secs] - } - pub unsafe fn dateWithTimeIntervalSinceReferenceDate(ti: NSTimeInterval) -> Id { - msg_send_id![Self::class(), dateWithTimeIntervalSinceReferenceDate: ti] - } - pub unsafe fn dateWithTimeIntervalSince1970(secs: NSTimeInterval) -> Id { - msg_send_id![Self::class(), dateWithTimeIntervalSince1970: secs] - } - pub unsafe fn dateWithTimeInterval_sinceDate( - secsToBeAdded: NSTimeInterval, - date: &NSDate, - ) -> Id { - msg_send_id![ - Self::class(), - dateWithTimeInterval: secsToBeAdded, - sinceDate: date - ] - } - pub unsafe fn distantFuture() -> Id { - msg_send_id![Self::class(), distantFuture] - } - pub unsafe fn distantPast() -> Id { - msg_send_id![Self::class(), distantPast] - } - pub unsafe fn now() -> Id { - msg_send_id![Self::class(), now] - } - pub unsafe fn initWithTimeIntervalSinceNow(&self, secs: NSTimeInterval) -> Id { - msg_send_id![self, initWithTimeIntervalSinceNow: secs] - } - pub unsafe fn initWithTimeIntervalSince1970(&self, secs: NSTimeInterval) -> Id { - msg_send_id![self, initWithTimeIntervalSince1970: secs] +); +extern_methods!( + #[doc = "NSExtendedDate"] + unsafe impl NSDate { + pub unsafe fn timeIntervalSinceDate(&self, anotherDate: &NSDate) -> NSTimeInterval { + msg_send![self, timeIntervalSinceDate: anotherDate] + } + pub unsafe fn timeIntervalSinceNow(&self) -> NSTimeInterval { + msg_send![self, timeIntervalSinceNow] + } + pub unsafe fn timeIntervalSince1970(&self) -> NSTimeInterval { + msg_send![self, timeIntervalSince1970] + } + pub unsafe fn addTimeInterval(&self, seconds: NSTimeInterval) -> Id { + msg_send_id![self, addTimeInterval: seconds] + } + pub unsafe fn dateByAddingTimeInterval(&self, ti: NSTimeInterval) -> Id { + msg_send_id![self, dateByAddingTimeInterval: ti] + } + pub unsafe fn earlierDate(&self, anotherDate: &NSDate) -> Id { + msg_send_id![self, earlierDate: anotherDate] + } + pub unsafe fn laterDate(&self, anotherDate: &NSDate) -> Id { + msg_send_id![self, laterDate: anotherDate] + } + pub unsafe fn compare(&self, other: &NSDate) -> NSComparisonResult { + msg_send![self, compare: other] + } + pub unsafe fn isEqualToDate(&self, otherDate: &NSDate) -> bool { + msg_send![self, isEqualToDate: otherDate] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn descriptionWithLocale( + &self, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn timeIntervalSinceReferenceDate() -> NSTimeInterval { + msg_send![Self::class(), timeIntervalSinceReferenceDate] + } } - pub unsafe fn initWithTimeInterval_sinceDate( - &self, - secsToBeAdded: NSTimeInterval, - date: &NSDate, - ) -> Id { - msg_send_id![self, initWithTimeInterval: secsToBeAdded, sinceDate: date] +); +extern_methods!( + #[doc = "NSDateCreation"] + unsafe impl NSDate { + pub unsafe fn date() -> Id { + msg_send_id![Self::class(), date] + } + pub unsafe fn dateWithTimeIntervalSinceNow(secs: NSTimeInterval) -> Id { + msg_send_id![Self::class(), dateWithTimeIntervalSinceNow: secs] + } + pub unsafe fn dateWithTimeIntervalSinceReferenceDate( + ti: NSTimeInterval, + ) -> Id { + msg_send_id![Self::class(), dateWithTimeIntervalSinceReferenceDate: ti] + } + pub unsafe fn dateWithTimeIntervalSince1970(secs: NSTimeInterval) -> Id { + msg_send_id![Self::class(), dateWithTimeIntervalSince1970: secs] + } + pub unsafe fn dateWithTimeInterval_sinceDate( + secsToBeAdded: NSTimeInterval, + date: &NSDate, + ) -> Id { + msg_send_id![ + Self::class(), + dateWithTimeInterval: secsToBeAdded, + sinceDate: date + ] + } + pub unsafe fn distantFuture() -> Id { + msg_send_id![Self::class(), distantFuture] + } + pub unsafe fn distantPast() -> Id { + msg_send_id![Self::class(), distantPast] + } + pub unsafe fn now() -> Id { + msg_send_id![Self::class(), now] + } + pub unsafe fn initWithTimeIntervalSinceNow( + &self, + secs: NSTimeInterval, + ) -> Id { + msg_send_id![self, initWithTimeIntervalSinceNow: secs] + } + pub unsafe fn initWithTimeIntervalSince1970( + &self, + secs: NSTimeInterval, + ) -> Id { + msg_send_id![self, initWithTimeIntervalSince1970: secs] + } + pub unsafe fn initWithTimeInterval_sinceDate( + &self, + secsToBeAdded: NSTimeInterval, + date: &NSDate, + ) -> Id { + msg_send_id![self, initWithTimeInterval: secsToBeAdded, sinceDate: date] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index c9e63617d..dccfb9a81 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSNumberFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDateComponentsFormatter; @@ -12,128 +12,132 @@ extern_class!( type Super = NSFormatter; } ); -impl NSDateComponentsFormatter { - pub unsafe fn stringForObjectValue( - &self, - obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] +extern_methods!( + unsafe impl NSDateComponentsFormatter { + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } + pub unsafe fn stringFromDateComponents( + &self, + components: &NSDateComponents, + ) -> Option> { + msg_send_id![self, stringFromDateComponents: components] + } + pub unsafe fn stringFromDate_toDate( + &self, + startDate: &NSDate, + endDate: &NSDate, + ) -> Option> { + msg_send_id![self, stringFromDate: startDate, toDate: endDate] + } + pub unsafe fn stringFromTimeInterval( + &self, + ti: NSTimeInterval, + ) -> Option> { + msg_send_id![self, stringFromTimeInterval: ti] + } + pub unsafe fn localizedStringFromDateComponents_unitsStyle( + components: &NSDateComponents, + unitsStyle: NSDateComponentsFormatterUnitsStyle, + ) -> Option> { + msg_send_id![ + Self::class(), + localizedStringFromDateComponents: components, + unitsStyle: unitsStyle + ] + } + pub unsafe fn unitsStyle(&self) -> NSDateComponentsFormatterUnitsStyle { + msg_send![self, unitsStyle] + } + pub unsafe fn setUnitsStyle(&self, unitsStyle: NSDateComponentsFormatterUnitsStyle) { + msg_send![self, setUnitsStyle: unitsStyle] + } + pub unsafe fn allowedUnits(&self) -> NSCalendarUnit { + msg_send![self, allowedUnits] + } + pub unsafe fn setAllowedUnits(&self, allowedUnits: NSCalendarUnit) { + msg_send![self, setAllowedUnits: allowedUnits] + } + pub unsafe fn zeroFormattingBehavior( + &self, + ) -> NSDateComponentsFormatterZeroFormattingBehavior { + msg_send![self, zeroFormattingBehavior] + } + pub unsafe fn setZeroFormattingBehavior( + &self, + zeroFormattingBehavior: NSDateComponentsFormatterZeroFormattingBehavior, + ) { + msg_send![self, setZeroFormattingBehavior: zeroFormattingBehavior] + } + pub unsafe fn calendar(&self) -> Option> { + msg_send_id![self, calendar] + } + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { + msg_send![self, setCalendar: calendar] + } + pub unsafe fn referenceDate(&self) -> Option> { + msg_send_id![self, referenceDate] + } + pub unsafe fn setReferenceDate(&self, referenceDate: Option<&NSDate>) { + msg_send![self, setReferenceDate: referenceDate] + } + pub unsafe fn allowsFractionalUnits(&self) -> bool { + msg_send![self, allowsFractionalUnits] + } + pub unsafe fn setAllowsFractionalUnits(&self, allowsFractionalUnits: bool) { + msg_send![self, setAllowsFractionalUnits: allowsFractionalUnits] + } + pub unsafe fn maximumUnitCount(&self) -> NSInteger { + msg_send![self, maximumUnitCount] + } + pub unsafe fn setMaximumUnitCount(&self, maximumUnitCount: NSInteger) { + msg_send![self, setMaximumUnitCount: maximumUnitCount] + } + pub unsafe fn collapsesLargestUnit(&self) -> bool { + msg_send![self, collapsesLargestUnit] + } + pub unsafe fn setCollapsesLargestUnit(&self, collapsesLargestUnit: bool) { + msg_send![self, setCollapsesLargestUnit: collapsesLargestUnit] + } + pub unsafe fn includesApproximationPhrase(&self) -> bool { + msg_send![self, includesApproximationPhrase] + } + pub unsafe fn setIncludesApproximationPhrase(&self, includesApproximationPhrase: bool) { + msg_send![ + self, + setIncludesApproximationPhrase: includesApproximationPhrase + ] + } + pub unsafe fn includesTimeRemainingPhrase(&self) -> bool { + msg_send![self, includesTimeRemainingPhrase] + } + pub unsafe fn setIncludesTimeRemainingPhrase(&self, includesTimeRemainingPhrase: bool) { + msg_send![ + self, + setIncludesTimeRemainingPhrase: includesTimeRemainingPhrase + ] + } + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: Option<&mut Option>>, + string: &NSString, + error: Option<&mut Option>>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } } - pub unsafe fn stringFromDateComponents( - &self, - components: &NSDateComponents, - ) -> Option> { - msg_send_id![self, stringFromDateComponents: components] - } - pub unsafe fn stringFromDate_toDate( - &self, - startDate: &NSDate, - endDate: &NSDate, - ) -> Option> { - msg_send_id![self, stringFromDate: startDate, toDate: endDate] - } - pub unsafe fn stringFromTimeInterval( - &self, - ti: NSTimeInterval, - ) -> Option> { - msg_send_id![self, stringFromTimeInterval: ti] - } - pub unsafe fn localizedStringFromDateComponents_unitsStyle( - components: &NSDateComponents, - unitsStyle: NSDateComponentsFormatterUnitsStyle, - ) -> Option> { - msg_send_id![ - Self::class(), - localizedStringFromDateComponents: components, - unitsStyle: unitsStyle - ] - } - pub unsafe fn unitsStyle(&self) -> NSDateComponentsFormatterUnitsStyle { - msg_send![self, unitsStyle] - } - pub unsafe fn setUnitsStyle(&self, unitsStyle: NSDateComponentsFormatterUnitsStyle) { - msg_send![self, setUnitsStyle: unitsStyle] - } - pub unsafe fn allowedUnits(&self) -> NSCalendarUnit { - msg_send![self, allowedUnits] - } - pub unsafe fn setAllowedUnits(&self, allowedUnits: NSCalendarUnit) { - msg_send![self, setAllowedUnits: allowedUnits] - } - pub unsafe fn zeroFormattingBehavior(&self) -> NSDateComponentsFormatterZeroFormattingBehavior { - msg_send![self, zeroFormattingBehavior] - } - pub unsafe fn setZeroFormattingBehavior( - &self, - zeroFormattingBehavior: NSDateComponentsFormatterZeroFormattingBehavior, - ) { - msg_send![self, setZeroFormattingBehavior: zeroFormattingBehavior] - } - pub unsafe fn calendar(&self) -> Option> { - msg_send_id![self, calendar] - } - pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { - msg_send![self, setCalendar: calendar] - } - pub unsafe fn referenceDate(&self) -> Option> { - msg_send_id![self, referenceDate] - } - pub unsafe fn setReferenceDate(&self, referenceDate: Option<&NSDate>) { - msg_send![self, setReferenceDate: referenceDate] - } - pub unsafe fn allowsFractionalUnits(&self) -> bool { - msg_send![self, allowsFractionalUnits] - } - pub unsafe fn setAllowsFractionalUnits(&self, allowsFractionalUnits: bool) { - msg_send![self, setAllowsFractionalUnits: allowsFractionalUnits] - } - pub unsafe fn maximumUnitCount(&self) -> NSInteger { - msg_send![self, maximumUnitCount] - } - pub unsafe fn setMaximumUnitCount(&self, maximumUnitCount: NSInteger) { - msg_send![self, setMaximumUnitCount: maximumUnitCount] - } - pub unsafe fn collapsesLargestUnit(&self) -> bool { - msg_send![self, collapsesLargestUnit] - } - pub unsafe fn setCollapsesLargestUnit(&self, collapsesLargestUnit: bool) { - msg_send![self, setCollapsesLargestUnit: collapsesLargestUnit] - } - pub unsafe fn includesApproximationPhrase(&self) -> bool { - msg_send![self, includesApproximationPhrase] - } - pub unsafe fn setIncludesApproximationPhrase(&self, includesApproximationPhrase: bool) { - msg_send![ - self, - setIncludesApproximationPhrase: includesApproximationPhrase - ] - } - pub unsafe fn includesTimeRemainingPhrase(&self) -> bool { - msg_send![self, includesTimeRemainingPhrase] - } - pub unsafe fn setIncludesTimeRemainingPhrase(&self, includesTimeRemainingPhrase: bool) { - msg_send![ - self, - setIncludesTimeRemainingPhrase: includesTimeRemainingPhrase - ] - } - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] - } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } - pub unsafe fn getObjectValue_forString_errorDescription( - &self, - obj: Option<&mut Option>>, - string: &NSString, - error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 3e75b866d..9c1210a3b 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -11,7 +11,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDateFormatter; @@ -19,326 +19,338 @@ extern_class!( type Super = NSFormatter; } ); -impl NSDateFormatter { - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] +extern_methods!( + unsafe impl NSDateFormatter { + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } + pub unsafe fn getObjectValue_forString_range_error( + &self, + obj: Option<&mut Option>>, + string: &NSString, + rangep: *mut NSRange, + ) -> Result<(), Id> { + msg_send![ + self, + getObjectValue: obj, + forString: string, + range: rangep, + error: _ + ] + } + pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id { + msg_send_id![self, stringFromDate: date] + } + pub unsafe fn dateFromString(&self, string: &NSString) -> Option> { + msg_send_id![self, dateFromString: string] + } + pub unsafe fn localizedStringFromDate_dateStyle_timeStyle( + date: &NSDate, + dstyle: NSDateFormatterStyle, + tstyle: NSDateFormatterStyle, + ) -> Id { + msg_send_id![ + Self::class(), + localizedStringFromDate: date, + dateStyle: dstyle, + timeStyle: tstyle + ] + } + pub unsafe fn dateFormatFromTemplate_options_locale( + tmplate: &NSString, + opts: NSUInteger, + locale: Option<&NSLocale>, + ) -> Option> { + msg_send_id![ + Self::class(), + dateFormatFromTemplate: tmplate, + options: opts, + locale: locale + ] + } + pub unsafe fn defaultFormatterBehavior() -> NSDateFormatterBehavior { + msg_send![Self::class(), defaultFormatterBehavior] + } + pub unsafe fn setDefaultFormatterBehavior( + defaultFormatterBehavior: NSDateFormatterBehavior, + ) { + msg_send![ + Self::class(), + setDefaultFormatterBehavior: defaultFormatterBehavior + ] + } + pub unsafe fn setLocalizedDateFormatFromTemplate(&self, dateFormatTemplate: &NSString) { + msg_send![self, setLocalizedDateFormatFromTemplate: dateFormatTemplate] + } + pub unsafe fn dateFormat(&self) -> Id { + msg_send_id![self, dateFormat] + } + pub unsafe fn setDateFormat(&self, dateFormat: Option<&NSString>) { + msg_send![self, setDateFormat: dateFormat] + } + pub unsafe fn dateStyle(&self) -> NSDateFormatterStyle { + msg_send![self, dateStyle] + } + pub unsafe fn setDateStyle(&self, dateStyle: NSDateFormatterStyle) { + msg_send![self, setDateStyle: dateStyle] + } + pub unsafe fn timeStyle(&self) -> NSDateFormatterStyle { + msg_send![self, timeStyle] + } + pub unsafe fn setTimeStyle(&self, timeStyle: NSDateFormatterStyle) { + msg_send![self, setTimeStyle: timeStyle] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn generatesCalendarDates(&self) -> bool { + msg_send![self, generatesCalendarDates] + } + pub unsafe fn setGeneratesCalendarDates(&self, generatesCalendarDates: bool) { + msg_send![self, setGeneratesCalendarDates: generatesCalendarDates] + } + pub unsafe fn formatterBehavior(&self) -> NSDateFormatterBehavior { + msg_send![self, formatterBehavior] + } + pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSDateFormatterBehavior) { + msg_send![self, setFormatterBehavior: formatterBehavior] + } + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn calendar(&self) -> Id { + msg_send_id![self, calendar] + } + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { + msg_send![self, setCalendar: calendar] + } + pub unsafe fn isLenient(&self) -> bool { + msg_send![self, isLenient] + } + pub unsafe fn setLenient(&self, lenient: bool) { + msg_send![self, setLenient: lenient] + } + pub unsafe fn twoDigitStartDate(&self) -> Option> { + msg_send_id![self, twoDigitStartDate] + } + pub unsafe fn setTwoDigitStartDate(&self, twoDigitStartDate: Option<&NSDate>) { + msg_send![self, setTwoDigitStartDate: twoDigitStartDate] + } + pub unsafe fn defaultDate(&self) -> Option> { + msg_send_id![self, defaultDate] + } + pub unsafe fn setDefaultDate(&self, defaultDate: Option<&NSDate>) { + msg_send![self, setDefaultDate: defaultDate] + } + pub unsafe fn eraSymbols(&self) -> Id, Shared> { + msg_send_id![self, eraSymbols] + } + pub unsafe fn setEraSymbols(&self, eraSymbols: Option<&NSArray>) { + msg_send![self, setEraSymbols: eraSymbols] + } + pub unsafe fn monthSymbols(&self) -> Id, Shared> { + msg_send_id![self, monthSymbols] + } + pub unsafe fn setMonthSymbols(&self, monthSymbols: Option<&NSArray>) { + msg_send![self, setMonthSymbols: monthSymbols] + } + pub unsafe fn shortMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortMonthSymbols] + } + pub unsafe fn setShortMonthSymbols(&self, shortMonthSymbols: Option<&NSArray>) { + msg_send![self, setShortMonthSymbols: shortMonthSymbols] + } + pub unsafe fn weekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, weekdaySymbols] + } + pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: Option<&NSArray>) { + msg_send![self, setWeekdaySymbols: weekdaySymbols] + } + pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, shortWeekdaySymbols] + } + pub unsafe fn setShortWeekdaySymbols( + &self, + shortWeekdaySymbols: Option<&NSArray>, + ) { + msg_send![self, setShortWeekdaySymbols: shortWeekdaySymbols] + } + pub unsafe fn AMSymbol(&self) -> Id { + msg_send_id![self, AMSymbol] + } + pub unsafe fn setAMSymbol(&self, AMSymbol: Option<&NSString>) { + msg_send![self, setAMSymbol: AMSymbol] + } + pub unsafe fn PMSymbol(&self) -> Id { + msg_send_id![self, PMSymbol] + } + pub unsafe fn setPMSymbol(&self, PMSymbol: Option<&NSString>) { + msg_send![self, setPMSymbol: PMSymbol] + } + pub unsafe fn longEraSymbols(&self) -> Id, Shared> { + msg_send_id![self, longEraSymbols] + } + pub unsafe fn setLongEraSymbols(&self, longEraSymbols: Option<&NSArray>) { + msg_send![self, setLongEraSymbols: longEraSymbols] + } + pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortMonthSymbols] + } + pub unsafe fn setVeryShortMonthSymbols( + &self, + veryShortMonthSymbols: Option<&NSArray>, + ) { + msg_send![self, setVeryShortMonthSymbols: veryShortMonthSymbols] + } + pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneMonthSymbols] + } + pub unsafe fn setStandaloneMonthSymbols( + &self, + standaloneMonthSymbols: Option<&NSArray>, + ) { + msg_send![self, setStandaloneMonthSymbols: standaloneMonthSymbols] + } + pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneMonthSymbols] + } + pub unsafe fn setShortStandaloneMonthSymbols( + &self, + shortStandaloneMonthSymbols: Option<&NSArray>, + ) { + msg_send![ + self, + setShortStandaloneMonthSymbols: shortStandaloneMonthSymbols + ] + } + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortStandaloneMonthSymbols] + } + pub unsafe fn setVeryShortStandaloneMonthSymbols( + &self, + veryShortStandaloneMonthSymbols: Option<&NSArray>, + ) { + msg_send![ + self, + setVeryShortStandaloneMonthSymbols: veryShortStandaloneMonthSymbols + ] + } + pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortWeekdaySymbols] + } + pub unsafe fn setVeryShortWeekdaySymbols( + &self, + veryShortWeekdaySymbols: Option<&NSArray>, + ) { + msg_send![self, setVeryShortWeekdaySymbols: veryShortWeekdaySymbols] + } + pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneWeekdaySymbols] + } + pub unsafe fn setStandaloneWeekdaySymbols( + &self, + standaloneWeekdaySymbols: Option<&NSArray>, + ) { + msg_send![self, setStandaloneWeekdaySymbols: standaloneWeekdaySymbols] + } + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneWeekdaySymbols] + } + pub unsafe fn setShortStandaloneWeekdaySymbols( + &self, + shortStandaloneWeekdaySymbols: Option<&NSArray>, + ) { + msg_send![ + self, + setShortStandaloneWeekdaySymbols: shortStandaloneWeekdaySymbols + ] + } + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared> { + msg_send_id![self, veryShortStandaloneWeekdaySymbols] + } + pub unsafe fn setVeryShortStandaloneWeekdaySymbols( + &self, + veryShortStandaloneWeekdaySymbols: Option<&NSArray>, + ) { + msg_send![ + self, + setVeryShortStandaloneWeekdaySymbols: veryShortStandaloneWeekdaySymbols + ] + } + pub unsafe fn quarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, quarterSymbols] + } + pub unsafe fn setQuarterSymbols(&self, quarterSymbols: Option<&NSArray>) { + msg_send![self, setQuarterSymbols: quarterSymbols] + } + pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortQuarterSymbols] + } + pub unsafe fn setShortQuarterSymbols( + &self, + shortQuarterSymbols: Option<&NSArray>, + ) { + msg_send![self, setShortQuarterSymbols: shortQuarterSymbols] + } + pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, standaloneQuarterSymbols] + } + pub unsafe fn setStandaloneQuarterSymbols( + &self, + standaloneQuarterSymbols: Option<&NSArray>, + ) { + msg_send![self, setStandaloneQuarterSymbols: standaloneQuarterSymbols] + } + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared> { + msg_send_id![self, shortStandaloneQuarterSymbols] + } + pub unsafe fn setShortStandaloneQuarterSymbols( + &self, + shortStandaloneQuarterSymbols: Option<&NSArray>, + ) { + msg_send![ + self, + setShortStandaloneQuarterSymbols: shortStandaloneQuarterSymbols + ] + } + pub unsafe fn gregorianStartDate(&self) -> Option> { + msg_send_id![self, gregorianStartDate] + } + pub unsafe fn setGregorianStartDate(&self, gregorianStartDate: Option<&NSDate>) { + msg_send![self, setGregorianStartDate: gregorianStartDate] + } + pub unsafe fn doesRelativeDateFormatting(&self) -> bool { + msg_send![self, doesRelativeDateFormatting] + } + pub unsafe fn setDoesRelativeDateFormatting(&self, doesRelativeDateFormatting: bool) { + msg_send![ + self, + setDoesRelativeDateFormatting: doesRelativeDateFormatting + ] + } } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } - pub unsafe fn getObjectValue_forString_range_error( - &self, - obj: Option<&mut Option>>, - string: &NSString, - rangep: *mut NSRange, - ) -> Result<(), Id> { - msg_send![ - self, - getObjectValue: obj, - forString: string, - range: rangep, - error: _ - ] - } - pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id { - msg_send_id![self, stringFromDate: date] - } - pub unsafe fn dateFromString(&self, string: &NSString) -> Option> { - msg_send_id![self, dateFromString: string] - } - pub unsafe fn localizedStringFromDate_dateStyle_timeStyle( - date: &NSDate, - dstyle: NSDateFormatterStyle, - tstyle: NSDateFormatterStyle, - ) -> Id { - msg_send_id![ - Self::class(), - localizedStringFromDate: date, - dateStyle: dstyle, - timeStyle: tstyle - ] - } - pub unsafe fn dateFormatFromTemplate_options_locale( - tmplate: &NSString, - opts: NSUInteger, - locale: Option<&NSLocale>, - ) -> Option> { - msg_send_id![ - Self::class(), - dateFormatFromTemplate: tmplate, - options: opts, - locale: locale - ] - } - pub unsafe fn defaultFormatterBehavior() -> NSDateFormatterBehavior { - msg_send![Self::class(), defaultFormatterBehavior] - } - pub unsafe fn setDefaultFormatterBehavior(defaultFormatterBehavior: NSDateFormatterBehavior) { - msg_send![ - Self::class(), - setDefaultFormatterBehavior: defaultFormatterBehavior - ] - } - pub unsafe fn setLocalizedDateFormatFromTemplate(&self, dateFormatTemplate: &NSString) { - msg_send![self, setLocalizedDateFormatFromTemplate: dateFormatTemplate] - } - pub unsafe fn dateFormat(&self) -> Id { - msg_send_id![self, dateFormat] - } - pub unsafe fn setDateFormat(&self, dateFormat: Option<&NSString>) { - msg_send![self, setDateFormat: dateFormat] - } - pub unsafe fn dateStyle(&self) -> NSDateFormatterStyle { - msg_send![self, dateStyle] - } - pub unsafe fn setDateStyle(&self, dateStyle: NSDateFormatterStyle) { - msg_send![self, setDateStyle: dateStyle] - } - pub unsafe fn timeStyle(&self) -> NSDateFormatterStyle { - msg_send![self, timeStyle] - } - pub unsafe fn setTimeStyle(&self, timeStyle: NSDateFormatterStyle) { - msg_send![self, setTimeStyle: timeStyle] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn generatesCalendarDates(&self) -> bool { - msg_send![self, generatesCalendarDates] - } - pub unsafe fn setGeneratesCalendarDates(&self, generatesCalendarDates: bool) { - msg_send![self, setGeneratesCalendarDates: generatesCalendarDates] - } - pub unsafe fn formatterBehavior(&self) -> NSDateFormatterBehavior { - msg_send![self, formatterBehavior] - } - pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSDateFormatterBehavior) { - msg_send![self, setFormatterBehavior: formatterBehavior] - } - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn calendar(&self) -> Id { - msg_send_id![self, calendar] - } - pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { - msg_send![self, setCalendar: calendar] - } - pub unsafe fn isLenient(&self) -> bool { - msg_send![self, isLenient] - } - pub unsafe fn setLenient(&self, lenient: bool) { - msg_send![self, setLenient: lenient] - } - pub unsafe fn twoDigitStartDate(&self) -> Option> { - msg_send_id![self, twoDigitStartDate] - } - pub unsafe fn setTwoDigitStartDate(&self, twoDigitStartDate: Option<&NSDate>) { - msg_send![self, setTwoDigitStartDate: twoDigitStartDate] - } - pub unsafe fn defaultDate(&self) -> Option> { - msg_send_id![self, defaultDate] - } - pub unsafe fn setDefaultDate(&self, defaultDate: Option<&NSDate>) { - msg_send![self, setDefaultDate: defaultDate] - } - pub unsafe fn eraSymbols(&self) -> Id, Shared> { - msg_send_id![self, eraSymbols] - } - pub unsafe fn setEraSymbols(&self, eraSymbols: Option<&NSArray>) { - msg_send![self, setEraSymbols: eraSymbols] - } - pub unsafe fn monthSymbols(&self) -> Id, Shared> { - msg_send_id![self, monthSymbols] - } - pub unsafe fn setMonthSymbols(&self, monthSymbols: Option<&NSArray>) { - msg_send![self, setMonthSymbols: monthSymbols] - } - pub unsafe fn shortMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortMonthSymbols] - } - pub unsafe fn setShortMonthSymbols(&self, shortMonthSymbols: Option<&NSArray>) { - msg_send![self, setShortMonthSymbols: shortMonthSymbols] - } - pub unsafe fn weekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, weekdaySymbols] - } - pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: Option<&NSArray>) { - msg_send![self, setWeekdaySymbols: weekdaySymbols] - } - pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, shortWeekdaySymbols] - } - pub unsafe fn setShortWeekdaySymbols(&self, shortWeekdaySymbols: Option<&NSArray>) { - msg_send![self, setShortWeekdaySymbols: shortWeekdaySymbols] - } - pub unsafe fn AMSymbol(&self) -> Id { - msg_send_id![self, AMSymbol] - } - pub unsafe fn setAMSymbol(&self, AMSymbol: Option<&NSString>) { - msg_send![self, setAMSymbol: AMSymbol] - } - pub unsafe fn PMSymbol(&self) -> Id { - msg_send_id![self, PMSymbol] - } - pub unsafe fn setPMSymbol(&self, PMSymbol: Option<&NSString>) { - msg_send![self, setPMSymbol: PMSymbol] - } - pub unsafe fn longEraSymbols(&self) -> Id, Shared> { - msg_send_id![self, longEraSymbols] - } - pub unsafe fn setLongEraSymbols(&self, longEraSymbols: Option<&NSArray>) { - msg_send![self, setLongEraSymbols: longEraSymbols] - } - pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortMonthSymbols] - } - pub unsafe fn setVeryShortMonthSymbols( - &self, - veryShortMonthSymbols: Option<&NSArray>, - ) { - msg_send![self, setVeryShortMonthSymbols: veryShortMonthSymbols] - } - pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneMonthSymbols] - } - pub unsafe fn setStandaloneMonthSymbols( - &self, - standaloneMonthSymbols: Option<&NSArray>, - ) { - msg_send![self, setStandaloneMonthSymbols: standaloneMonthSymbols] - } - pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneMonthSymbols] - } - pub unsafe fn setShortStandaloneMonthSymbols( - &self, - shortStandaloneMonthSymbols: Option<&NSArray>, - ) { - msg_send![ - self, - setShortStandaloneMonthSymbols: shortStandaloneMonthSymbols - ] - } - pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortStandaloneMonthSymbols] - } - pub unsafe fn setVeryShortStandaloneMonthSymbols( - &self, - veryShortStandaloneMonthSymbols: Option<&NSArray>, - ) { - msg_send![ - self, - setVeryShortStandaloneMonthSymbols: veryShortStandaloneMonthSymbols - ] - } - pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortWeekdaySymbols] - } - pub unsafe fn setVeryShortWeekdaySymbols( - &self, - veryShortWeekdaySymbols: Option<&NSArray>, - ) { - msg_send![self, setVeryShortWeekdaySymbols: veryShortWeekdaySymbols] - } - pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneWeekdaySymbols] - } - pub unsafe fn setStandaloneWeekdaySymbols( - &self, - standaloneWeekdaySymbols: Option<&NSArray>, - ) { - msg_send![self, setStandaloneWeekdaySymbols: standaloneWeekdaySymbols] - } - pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneWeekdaySymbols] - } - pub unsafe fn setShortStandaloneWeekdaySymbols( - &self, - shortStandaloneWeekdaySymbols: Option<&NSArray>, - ) { - msg_send![ - self, - setShortStandaloneWeekdaySymbols: shortStandaloneWeekdaySymbols - ] - } - pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortStandaloneWeekdaySymbols] - } - pub unsafe fn setVeryShortStandaloneWeekdaySymbols( - &self, - veryShortStandaloneWeekdaySymbols: Option<&NSArray>, - ) { - msg_send![ - self, - setVeryShortStandaloneWeekdaySymbols: veryShortStandaloneWeekdaySymbols - ] - } - pub unsafe fn quarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, quarterSymbols] - } - pub unsafe fn setQuarterSymbols(&self, quarterSymbols: Option<&NSArray>) { - msg_send![self, setQuarterSymbols: quarterSymbols] - } - pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortQuarterSymbols] - } - pub unsafe fn setShortQuarterSymbols(&self, shortQuarterSymbols: Option<&NSArray>) { - msg_send![self, setShortQuarterSymbols: shortQuarterSymbols] - } - pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneQuarterSymbols] - } - pub unsafe fn setStandaloneQuarterSymbols( - &self, - standaloneQuarterSymbols: Option<&NSArray>, - ) { - msg_send![self, setStandaloneQuarterSymbols: standaloneQuarterSymbols] - } - pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneQuarterSymbols] - } - pub unsafe fn setShortStandaloneQuarterSymbols( - &self, - shortStandaloneQuarterSymbols: Option<&NSArray>, - ) { - msg_send![ - self, - setShortStandaloneQuarterSymbols: shortStandaloneQuarterSymbols - ] - } - pub unsafe fn gregorianStartDate(&self) -> Option> { - msg_send_id![self, gregorianStartDate] - } - pub unsafe fn setGregorianStartDate(&self, gregorianStartDate: Option<&NSDate>) { - msg_send![self, setGregorianStartDate: gregorianStartDate] - } - pub unsafe fn doesRelativeDateFormatting(&self) -> bool { - msg_send![self, doesRelativeDateFormatting] - } - pub unsafe fn setDoesRelativeDateFormatting(&self, doesRelativeDateFormatting: bool) { - msg_send![ - self, - setDoesRelativeDateFormatting: doesRelativeDateFormatting - ] - } -} -#[doc = "NSDateFormatterCompatibility"] -impl NSDateFormatter { - pub unsafe fn initWithDateFormat_allowNaturalLanguage( - &self, - format: &NSString, - flag: bool, - ) -> Id { - msg_send_id![self, initWithDateFormat: format, allowNaturalLanguage: flag] - } - pub unsafe fn allowsNaturalLanguage(&self) -> bool { - msg_send![self, allowsNaturalLanguage] +); +extern_methods!( + #[doc = "NSDateFormatterCompatibility"] + unsafe impl NSDateFormatter { + pub unsafe fn initWithDateFormat_allowNaturalLanguage( + &self, + format: &NSString, + flag: bool, + ) -> Id { + msg_send_id![self, initWithDateFormat: format, allowNaturalLanguage: flag] + } + pub unsafe fn allowsNaturalLanguage(&self) -> bool { + msg_send![self, allowsNaturalLanguage] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index 3400a181e..8cefe0a51 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDateInterval; @@ -12,52 +12,54 @@ extern_class!( type Super = NSObject; } ); -impl NSDateInterval { - pub unsafe fn startDate(&self) -> Id { - msg_send_id![self, startDate] +extern_methods!( + unsafe impl NSDateInterval { + pub unsafe fn startDate(&self) -> Id { + msg_send_id![self, startDate] + } + pub unsafe fn endDate(&self) -> Id { + msg_send_id![self, endDate] + } + pub unsafe fn duration(&self) -> NSTimeInterval { + msg_send![self, duration] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn initWithStartDate_duration( + &self, + startDate: &NSDate, + duration: NSTimeInterval, + ) -> Id { + msg_send_id![self, initWithStartDate: startDate, duration: duration] + } + pub unsafe fn initWithStartDate_endDate( + &self, + startDate: &NSDate, + endDate: &NSDate, + ) -> Id { + msg_send_id![self, initWithStartDate: startDate, endDate: endDate] + } + pub unsafe fn compare(&self, dateInterval: &NSDateInterval) -> NSComparisonResult { + msg_send![self, compare: dateInterval] + } + pub unsafe fn isEqualToDateInterval(&self, dateInterval: &NSDateInterval) -> bool { + msg_send![self, isEqualToDateInterval: dateInterval] + } + pub unsafe fn intersectsDateInterval(&self, dateInterval: &NSDateInterval) -> bool { + msg_send![self, intersectsDateInterval: dateInterval] + } + pub unsafe fn intersectionWithDateInterval( + &self, + dateInterval: &NSDateInterval, + ) -> Option> { + msg_send_id![self, intersectionWithDateInterval: dateInterval] + } + pub unsafe fn containsDate(&self, date: &NSDate) -> bool { + msg_send![self, containsDate: date] + } } - pub unsafe fn endDate(&self) -> Id { - msg_send_id![self, endDate] - } - pub unsafe fn duration(&self) -> NSTimeInterval { - msg_send![self, duration] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn initWithStartDate_duration( - &self, - startDate: &NSDate, - duration: NSTimeInterval, - ) -> Id { - msg_send_id![self, initWithStartDate: startDate, duration: duration] - } - pub unsafe fn initWithStartDate_endDate( - &self, - startDate: &NSDate, - endDate: &NSDate, - ) -> Id { - msg_send_id![self, initWithStartDate: startDate, endDate: endDate] - } - pub unsafe fn compare(&self, dateInterval: &NSDateInterval) -> NSComparisonResult { - msg_send![self, compare: dateInterval] - } - pub unsafe fn isEqualToDateInterval(&self, dateInterval: &NSDateInterval) -> bool { - msg_send![self, isEqualToDateInterval: dateInterval] - } - pub unsafe fn intersectsDateInterval(&self, dateInterval: &NSDateInterval) -> bool { - msg_send![self, intersectsDateInterval: dateInterval] - } - pub unsafe fn intersectionWithDateInterval( - &self, - dateInterval: &NSDateInterval, - ) -> Option> { - msg_send_id![self, intersectionWithDateInterval: dateInterval] - } - pub unsafe fn containsDate(&self, date: &NSDate) -> bool { - msg_send![self, containsDate: date] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index f47339b0c..bc4bb6e15 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDateIntervalFormatter; @@ -16,54 +16,56 @@ extern_class!( type Super = NSFormatter; } ); -impl NSDateIntervalFormatter { - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] +extern_methods!( + unsafe impl NSDateIntervalFormatter { + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn calendar(&self) -> Id { + msg_send_id![self, calendar] + } + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { + msg_send![self, setCalendar: calendar] + } + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn dateTemplate(&self) -> Id { + msg_send_id![self, dateTemplate] + } + pub unsafe fn setDateTemplate(&self, dateTemplate: Option<&NSString>) { + msg_send![self, setDateTemplate: dateTemplate] + } + pub unsafe fn dateStyle(&self) -> NSDateIntervalFormatterStyle { + msg_send![self, dateStyle] + } + pub unsafe fn setDateStyle(&self, dateStyle: NSDateIntervalFormatterStyle) { + msg_send![self, setDateStyle: dateStyle] + } + pub unsafe fn timeStyle(&self) -> NSDateIntervalFormatterStyle { + msg_send![self, timeStyle] + } + pub unsafe fn setTimeStyle(&self, timeStyle: NSDateIntervalFormatterStyle) { + msg_send![self, setTimeStyle: timeStyle] + } + pub unsafe fn stringFromDate_toDate( + &self, + fromDate: &NSDate, + toDate: &NSDate, + ) -> Id { + msg_send_id![self, stringFromDate: fromDate, toDate: toDate] + } + pub unsafe fn stringFromDateInterval( + &self, + dateInterval: &NSDateInterval, + ) -> Option> { + msg_send_id![self, stringFromDateInterval: dateInterval] + } } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn calendar(&self) -> Id { - msg_send_id![self, calendar] - } - pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { - msg_send![self, setCalendar: calendar] - } - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn dateTemplate(&self) -> Id { - msg_send_id![self, dateTemplate] - } - pub unsafe fn setDateTemplate(&self, dateTemplate: Option<&NSString>) { - msg_send![self, setDateTemplate: dateTemplate] - } - pub unsafe fn dateStyle(&self) -> NSDateIntervalFormatterStyle { - msg_send![self, dateStyle] - } - pub unsafe fn setDateStyle(&self, dateStyle: NSDateIntervalFormatterStyle) { - msg_send![self, setDateStyle: dateStyle] - } - pub unsafe fn timeStyle(&self) -> NSDateIntervalFormatterStyle { - msg_send![self, timeStyle] - } - pub unsafe fn setTimeStyle(&self, timeStyle: NSDateIntervalFormatterStyle) { - msg_send![self, setTimeStyle: timeStyle] - } - pub unsafe fn stringFromDate_toDate( - &self, - fromDate: &NSDate, - toDate: &NSDate, - ) -> Id { - msg_send_id![self, stringFromDate: fromDate, toDate: toDate] - } - pub unsafe fn stringFromDateInterval( - &self, - dateInterval: &NSDateInterval, - ) -> Option> { - msg_send_id![self, stringFromDateInterval: dateInterval] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs index d7e9fc12f..51f969af1 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimal.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -3,4 +3,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index c964bbb3a..862a40f29 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSDecimalNumberBehaviors = NSObject; extern_class!( #[derive(Debug)] @@ -15,208 +15,213 @@ extern_class!( type Super = NSNumber; } ); -impl NSDecimalNumber { - pub unsafe fn initWithMantissa_exponent_isNegative( - &self, - mantissa: c_ulonglong, - exponent: c_short, - flag: bool, - ) -> Id { - msg_send_id![ - self, - initWithMantissa: mantissa, - exponent: exponent, - isNegative: flag - ] +extern_methods!( + unsafe impl NSDecimalNumber { + pub unsafe fn initWithMantissa_exponent_isNegative( + &self, + mantissa: c_ulonglong, + exponent: c_short, + flag: bool, + ) -> Id { + msg_send_id![ + self, + initWithMantissa: mantissa, + exponent: exponent, + isNegative: flag + ] + } + pub unsafe fn initWithDecimal(&self, dcm: NSDecimal) -> Id { + msg_send_id![self, initWithDecimal: dcm] + } + pub unsafe fn initWithString(&self, numberValue: Option<&NSString>) -> Id { + msg_send_id![self, initWithString: numberValue] + } + pub unsafe fn initWithString_locale( + &self, + numberValue: Option<&NSString>, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, initWithString: numberValue, locale: locale] + } + pub unsafe fn descriptionWithLocale( + &self, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn decimalValue(&self) -> NSDecimal { + msg_send![self, decimalValue] + } + pub unsafe fn decimalNumberWithMantissa_exponent_isNegative( + mantissa: c_ulonglong, + exponent: c_short, + flag: bool, + ) -> Id { + msg_send_id![ + Self::class(), + decimalNumberWithMantissa: mantissa, + exponent: exponent, + isNegative: flag + ] + } + pub unsafe fn decimalNumberWithDecimal(dcm: NSDecimal) -> Id { + msg_send_id![Self::class(), decimalNumberWithDecimal: dcm] + } + pub unsafe fn decimalNumberWithString( + numberValue: Option<&NSString>, + ) -> Id { + msg_send_id![Self::class(), decimalNumberWithString: numberValue] + } + pub unsafe fn decimalNumberWithString_locale( + numberValue: Option<&NSString>, + locale: Option<&Object>, + ) -> Id { + msg_send_id![ + Self::class(), + decimalNumberWithString: numberValue, + locale: locale + ] + } + pub unsafe fn zero() -> Id { + msg_send_id![Self::class(), zero] + } + pub unsafe fn one() -> Id { + msg_send_id![Self::class(), one] + } + pub unsafe fn minimumDecimalNumber() -> Id { + msg_send_id![Self::class(), minimumDecimalNumber] + } + pub unsafe fn maximumDecimalNumber() -> Id { + msg_send_id![Self::class(), maximumDecimalNumber] + } + pub unsafe fn notANumber() -> Id { + msg_send_id![Self::class(), notANumber] + } + pub unsafe fn decimalNumberByAdding( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id { + msg_send_id![self, decimalNumberByAdding: decimalNumber] + } + pub unsafe fn decimalNumberByAdding_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id { + msg_send_id![ + self, + decimalNumberByAdding: decimalNumber, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberBySubtracting( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id { + msg_send_id![self, decimalNumberBySubtracting: decimalNumber] + } + pub unsafe fn decimalNumberBySubtracting_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id { + msg_send_id![ + self, + decimalNumberBySubtracting: decimalNumber, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberByMultiplyingBy( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id { + msg_send_id![self, decimalNumberByMultiplyingBy: decimalNumber] + } + pub unsafe fn decimalNumberByMultiplyingBy_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id { + msg_send_id![ + self, + decimalNumberByMultiplyingBy: decimalNumber, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberByDividingBy( + &self, + decimalNumber: &NSDecimalNumber, + ) -> Id { + msg_send_id![self, decimalNumberByDividingBy: decimalNumber] + } + pub unsafe fn decimalNumberByDividingBy_withBehavior( + &self, + decimalNumber: &NSDecimalNumber, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id { + msg_send_id![ + self, + decimalNumberByDividingBy: decimalNumber, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberByRaisingToPower( + &self, + power: NSUInteger, + ) -> Id { + msg_send_id![self, decimalNumberByRaisingToPower: power] + } + pub unsafe fn decimalNumberByRaisingToPower_withBehavior( + &self, + power: NSUInteger, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id { + msg_send_id![ + self, + decimalNumberByRaisingToPower: power, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberByMultiplyingByPowerOf10( + &self, + power: c_short, + ) -> Id { + msg_send_id![self, decimalNumberByMultiplyingByPowerOf10: power] + } + pub unsafe fn decimalNumberByMultiplyingByPowerOf10_withBehavior( + &self, + power: c_short, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id { + msg_send_id![ + self, + decimalNumberByMultiplyingByPowerOf10: power, + withBehavior: behavior + ] + } + pub unsafe fn decimalNumberByRoundingAccordingToBehavior( + &self, + behavior: Option<&NSDecimalNumberBehaviors>, + ) -> Id { + msg_send_id![self, decimalNumberByRoundingAccordingToBehavior: behavior] + } + pub unsafe fn compare(&self, decimalNumber: &NSNumber) -> NSComparisonResult { + msg_send![self, compare: decimalNumber] + } + pub unsafe fn defaultBehavior() -> Id { + msg_send_id![Self::class(), defaultBehavior] + } + pub unsafe fn setDefaultBehavior(defaultBehavior: &NSDecimalNumberBehaviors) { + msg_send![Self::class(), setDefaultBehavior: defaultBehavior] + } + pub unsafe fn objCType(&self) -> NonNull { + msg_send![self, objCType] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } } - pub unsafe fn initWithDecimal(&self, dcm: NSDecimal) -> Id { - msg_send_id![self, initWithDecimal: dcm] - } - pub unsafe fn initWithString(&self, numberValue: Option<&NSString>) -> Id { - msg_send_id![self, initWithString: numberValue] - } - pub unsafe fn initWithString_locale( - &self, - numberValue: Option<&NSString>, - locale: Option<&Object>, - ) -> Id { - msg_send_id![self, initWithString: numberValue, locale: locale] - } - pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn decimalValue(&self) -> NSDecimal { - msg_send![self, decimalValue] - } - pub unsafe fn decimalNumberWithMantissa_exponent_isNegative( - mantissa: c_ulonglong, - exponent: c_short, - flag: bool, - ) -> Id { - msg_send_id![ - Self::class(), - decimalNumberWithMantissa: mantissa, - exponent: exponent, - isNegative: flag - ] - } - pub unsafe fn decimalNumberWithDecimal(dcm: NSDecimal) -> Id { - msg_send_id![Self::class(), decimalNumberWithDecimal: dcm] - } - pub unsafe fn decimalNumberWithString( - numberValue: Option<&NSString>, - ) -> Id { - msg_send_id![Self::class(), decimalNumberWithString: numberValue] - } - pub unsafe fn decimalNumberWithString_locale( - numberValue: Option<&NSString>, - locale: Option<&Object>, - ) -> Id { - msg_send_id![ - Self::class(), - decimalNumberWithString: numberValue, - locale: locale - ] - } - pub unsafe fn zero() -> Id { - msg_send_id![Self::class(), zero] - } - pub unsafe fn one() -> Id { - msg_send_id![Self::class(), one] - } - pub unsafe fn minimumDecimalNumber() -> Id { - msg_send_id![Self::class(), minimumDecimalNumber] - } - pub unsafe fn maximumDecimalNumber() -> Id { - msg_send_id![Self::class(), maximumDecimalNumber] - } - pub unsafe fn notANumber() -> Id { - msg_send_id![Self::class(), notANumber] - } - pub unsafe fn decimalNumberByAdding( - &self, - decimalNumber: &NSDecimalNumber, - ) -> Id { - msg_send_id![self, decimalNumberByAdding: decimalNumber] - } - pub unsafe fn decimalNumberByAdding_withBehavior( - &self, - decimalNumber: &NSDecimalNumber, - behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberByAdding: decimalNumber, - withBehavior: behavior - ] - } - pub unsafe fn decimalNumberBySubtracting( - &self, - decimalNumber: &NSDecimalNumber, - ) -> Id { - msg_send_id![self, decimalNumberBySubtracting: decimalNumber] - } - pub unsafe fn decimalNumberBySubtracting_withBehavior( - &self, - decimalNumber: &NSDecimalNumber, - behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberBySubtracting: decimalNumber, - withBehavior: behavior - ] - } - pub unsafe fn decimalNumberByMultiplyingBy( - &self, - decimalNumber: &NSDecimalNumber, - ) -> Id { - msg_send_id![self, decimalNumberByMultiplyingBy: decimalNumber] - } - pub unsafe fn decimalNumberByMultiplyingBy_withBehavior( - &self, - decimalNumber: &NSDecimalNumber, - behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberByMultiplyingBy: decimalNumber, - withBehavior: behavior - ] - } - pub unsafe fn decimalNumberByDividingBy( - &self, - decimalNumber: &NSDecimalNumber, - ) -> Id { - msg_send_id![self, decimalNumberByDividingBy: decimalNumber] - } - pub unsafe fn decimalNumberByDividingBy_withBehavior( - &self, - decimalNumber: &NSDecimalNumber, - behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberByDividingBy: decimalNumber, - withBehavior: behavior - ] - } - pub unsafe fn decimalNumberByRaisingToPower( - &self, - power: NSUInteger, - ) -> Id { - msg_send_id![self, decimalNumberByRaisingToPower: power] - } - pub unsafe fn decimalNumberByRaisingToPower_withBehavior( - &self, - power: NSUInteger, - behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberByRaisingToPower: power, - withBehavior: behavior - ] - } - pub unsafe fn decimalNumberByMultiplyingByPowerOf10( - &self, - power: c_short, - ) -> Id { - msg_send_id![self, decimalNumberByMultiplyingByPowerOf10: power] - } - pub unsafe fn decimalNumberByMultiplyingByPowerOf10_withBehavior( - &self, - power: c_short, - behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberByMultiplyingByPowerOf10: power, - withBehavior: behavior - ] - } - pub unsafe fn decimalNumberByRoundingAccordingToBehavior( - &self, - behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![self, decimalNumberByRoundingAccordingToBehavior: behavior] - } - pub unsafe fn compare(&self, decimalNumber: &NSNumber) -> NSComparisonResult { - msg_send![self, compare: decimalNumber] - } - pub unsafe fn defaultBehavior() -> Id { - msg_send_id![Self::class(), defaultBehavior] - } - pub unsafe fn setDefaultBehavior(defaultBehavior: &NSDecimalNumberBehaviors) { - msg_send![Self::class(), setDefaultBehavior: defaultBehavior] - } - pub unsafe fn objCType(&self) -> NonNull { - msg_send![self, objCType] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } -} +); extern_class!( #[derive(Debug)] pub struct NSDecimalNumberHandler; @@ -224,57 +229,63 @@ extern_class!( type Super = NSObject; } ); -impl NSDecimalNumberHandler { - pub unsafe fn defaultDecimalNumberHandler() -> Id { - msg_send_id![Self::class(), defaultDecimalNumberHandler] - } - pub unsafe fn initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( - &self, - roundingMode: NSRoundingMode, - scale: c_short, - exact: bool, - overflow: bool, - underflow: bool, - divideByZero: bool, - ) -> Id { - msg_send_id![ - self, - initWithRoundingMode: roundingMode, - scale: scale, - raiseOnExactness: exact, - raiseOnOverflow: overflow, - raiseOnUnderflow: underflow, - raiseOnDivideByZero: divideByZero - ] +extern_methods!( + unsafe impl NSDecimalNumberHandler { + pub unsafe fn defaultDecimalNumberHandler() -> Id { + msg_send_id![Self::class(), defaultDecimalNumberHandler] + } + pub unsafe fn initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( + &self, + roundingMode: NSRoundingMode, + scale: c_short, + exact: bool, + overflow: bool, + underflow: bool, + divideByZero: bool, + ) -> Id { + msg_send_id![ + self, + initWithRoundingMode: roundingMode, + scale: scale, + raiseOnExactness: exact, + raiseOnOverflow: overflow, + raiseOnUnderflow: underflow, + raiseOnDivideByZero: divideByZero + ] + } + pub unsafe fn decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( + roundingMode: NSRoundingMode, + scale: c_short, + exact: bool, + overflow: bool, + underflow: bool, + divideByZero: bool, + ) -> Id { + msg_send_id![ + Self::class(), + decimalNumberHandlerWithRoundingMode: roundingMode, + scale: scale, + raiseOnExactness: exact, + raiseOnOverflow: overflow, + raiseOnUnderflow: underflow, + raiseOnDivideByZero: divideByZero + ] + } } - pub unsafe fn decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( - roundingMode: NSRoundingMode, - scale: c_short, - exact: bool, - overflow: bool, - underflow: bool, - divideByZero: bool, - ) -> Id { - msg_send_id![ - Self::class(), - decimalNumberHandlerWithRoundingMode: roundingMode, - scale: scale, - raiseOnExactness: exact, - raiseOnOverflow: overflow, - raiseOnUnderflow: underflow, - raiseOnDivideByZero: divideByZero - ] - } -} -#[doc = "NSDecimalNumberExtensions"] -impl NSNumber { - pub unsafe fn decimalValue(&self) -> NSDecimal { - msg_send![self, decimalValue] +); +extern_methods!( + #[doc = "NSDecimalNumberExtensions"] + unsafe impl NSNumber { + pub unsafe fn decimalValue(&self) -> NSDecimal { + msg_send![self, decimalValue] + } } -} -#[doc = "NSDecimalNumberScanning"] -impl NSScanner { - pub unsafe fn scanDecimal(&self, dcm: *mut NSDecimal) -> bool { - msg_send![self, scanDecimal: dcm] +); +extern_methods!( + #[doc = "NSDecimalNumberScanning"] + unsafe impl NSScanner { + pub unsafe fn scanDecimal(&self, dcm: *mut NSDecimal) -> bool { + msg_send![self, scanDecimal: dcm] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index e2c4ce39b..d3806e855 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSDictionary; @@ -15,239 +15,260 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSDictionary { - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] +extern_methods!( + unsafe impl NSDictionary { + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option> { + msg_send_id![self, objectForKey: aKey] + } + pub unsafe fn keyEnumerator(&self) -> Id, Shared> { + msg_send_id![self, keyEnumerator] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithObjects_forKeys_count( + &self, + objects: TodoArray, + keys: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![self, initWithObjects: objects, forKeys: keys, count: cnt] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option> { - msg_send_id![self, objectForKey: aKey] - } - pub unsafe fn keyEnumerator(&self) -> Id, Shared> { - msg_send_id![self, keyEnumerator] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithObjects_forKeys_count( - &self, - objects: TodoArray, - keys: TodoArray, - cnt: NSUInteger, - ) -> Id { - msg_send_id![self, initWithObjects: objects, forKeys: keys, count: cnt] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSExtendedDictionary"] -impl NSDictionary { - pub unsafe fn allKeys(&self) -> Id, Shared> { - msg_send_id![self, allKeys] - } - pub unsafe fn allKeysForObject(&self, anObject: &ObjectType) -> Id, Shared> { - msg_send_id![self, allKeysForObject: anObject] - } - pub unsafe fn allValues(&self) -> Id, Shared> { - msg_send_id![self, allValues] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionInStringsFileFormat(&self) -> Id { - msg_send_id![self, descriptionInStringsFileFormat] - } - pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn descriptionWithLocale_indent( - &self, - locale: Option<&Object>, - level: NSUInteger, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale, indent: level] - } - pub unsafe fn isEqualToDictionary( - &self, - otherDictionary: &NSDictionary, - ) -> bool { - msg_send![self, isEqualToDictionary: otherDictionary] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn objectsForKeys_notFoundMarker( - &self, - keys: &NSArray, - marker: &ObjectType, - ) -> Id, Shared> { - msg_send_id![self, objectsForKeys: keys, notFoundMarker: marker] - } - pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id> { - msg_send![self, writeToURL: url, error: _] - } - pub unsafe fn keysSortedByValueUsingSelector( - &self, - comparator: Sel, - ) -> Id, Shared> { - msg_send_id![self, keysSortedByValueUsingSelector: comparator] - } - pub unsafe fn getObjects_andKeys_count( - &self, - objects: TodoArray, - keys: TodoArray, - count: NSUInteger, - ) { - msg_send![self, getObjects: objects, andKeys: keys, count: count] - } - pub unsafe fn objectForKeyedSubscript(&self, key: &KeyType) -> Option> { - msg_send_id![self, objectForKeyedSubscript: key] - } - pub unsafe fn enumerateKeysAndObjectsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateKeysAndObjectsUsingBlock: block] - } - pub unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock( - &self, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateKeysAndObjectsWithOptions: opts, - usingBlock: block - ] - } - pub unsafe fn keysSortedByValueUsingComparator( - &self, - cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![self, keysSortedByValueUsingComparator: cmptr] - } - pub unsafe fn keysSortedByValueWithOptions_usingComparator( - &self, - opts: NSSortOptions, - cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![ - self, - keysSortedByValueWithOptions: opts, - usingComparator: cmptr - ] - } - pub unsafe fn keysOfEntriesPassingTest( - &self, - predicate: TodoBlock, - ) -> Id, Shared> { - msg_send_id![self, keysOfEntriesPassingTest: predicate] - } - pub unsafe fn keysOfEntriesWithOptions_passingTest( - &self, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> Id, Shared> { - msg_send_id![self, keysOfEntriesWithOptions: opts, passingTest: predicate] - } -} -#[doc = "NSDeprecated"] -impl NSDictionary { - pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray) { - msg_send![self, getObjects: objects, andKeys: keys] - } - pub unsafe fn dictionaryWithContentsOfFile( - path: &NSString, - ) -> Option, Shared>> { - msg_send_id![Self::class(), dictionaryWithContentsOfFile: path] - } - pub unsafe fn dictionaryWithContentsOfURL( - url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), dictionaryWithContentsOfURL: url] - } - pub unsafe fn initWithContentsOfFile( - &self, - path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfFile: path] - } - pub unsafe fn initWithContentsOfURL( - &self, - url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfURL: url] - } - pub unsafe fn writeToFile_atomically(&self, path: &NSString, useAuxiliaryFile: bool) -> bool { - msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] - } - pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { - msg_send![self, writeToURL: url, atomically: atomically] - } -} -#[doc = "NSDictionaryCreation"] -impl NSDictionary { - pub unsafe fn dictionary() -> Id { - msg_send_id![Self::class(), dictionary] - } - pub unsafe fn dictionaryWithObject_forKey( - object: &ObjectType, - key: &NSCopying, - ) -> Id { - msg_send_id![Self::class(), dictionaryWithObject: object, forKey: key] - } - pub unsafe fn dictionaryWithObjects_forKeys_count( - objects: TodoArray, - keys: TodoArray, - cnt: NSUInteger, - ) -> Id { - msg_send_id![ - Self::class(), - dictionaryWithObjects: objects, - forKeys: keys, - count: cnt - ] - } - pub unsafe fn dictionaryWithDictionary( - dict: &NSDictionary, - ) -> Id { - msg_send_id![Self::class(), dictionaryWithDictionary: dict] - } - pub unsafe fn dictionaryWithObjects_forKeys( - objects: &NSArray, - keys: &NSArray, - ) -> Id { - msg_send_id![Self::class(), dictionaryWithObjects: objects, forKeys: keys] - } - pub unsafe fn initWithDictionary( - &self, - otherDictionary: &NSDictionary, - ) -> Id { - msg_send_id![self, initWithDictionary: otherDictionary] - } - pub unsafe fn initWithDictionary_copyItems( - &self, - otherDictionary: &NSDictionary, - flag: bool, - ) -> Id { - msg_send_id![self, initWithDictionary: otherDictionary, copyItems: flag] - } - pub unsafe fn initWithObjects_forKeys( - &self, - objects: &NSArray, - keys: &NSArray, - ) -> Id { - msg_send_id![self, initWithObjects: objects, forKeys: keys] +); +extern_methods!( + #[doc = "NSExtendedDictionary"] + unsafe impl NSDictionary { + pub unsafe fn allKeys(&self) -> Id, Shared> { + msg_send_id![self, allKeys] + } + pub unsafe fn allKeysForObject( + &self, + anObject: &ObjectType, + ) -> Id, Shared> { + msg_send_id![self, allKeysForObject: anObject] + } + pub unsafe fn allValues(&self) -> Id, Shared> { + msg_send_id![self, allValues] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn descriptionInStringsFileFormat(&self) -> Id { + msg_send_id![self, descriptionInStringsFileFormat] + } + pub unsafe fn descriptionWithLocale( + &self, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn descriptionWithLocale_indent( + &self, + locale: Option<&Object>, + level: NSUInteger, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale, indent: level] + } + pub unsafe fn isEqualToDictionary( + &self, + otherDictionary: &NSDictionary, + ) -> bool { + msg_send![self, isEqualToDictionary: otherDictionary] + } + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] + } + pub unsafe fn objectsForKeys_notFoundMarker( + &self, + keys: &NSArray, + marker: &ObjectType, + ) -> Id, Shared> { + msg_send_id![self, objectsForKeys: keys, notFoundMarker: marker] + } + pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id> { + msg_send![self, writeToURL: url, error: _] + } + pub unsafe fn keysSortedByValueUsingSelector( + &self, + comparator: Sel, + ) -> Id, Shared> { + msg_send_id![self, keysSortedByValueUsingSelector: comparator] + } + pub unsafe fn getObjects_andKeys_count( + &self, + objects: TodoArray, + keys: TodoArray, + count: NSUInteger, + ) { + msg_send![self, getObjects: objects, andKeys: keys, count: count] + } + pub unsafe fn objectForKeyedSubscript( + &self, + key: &KeyType, + ) -> Option> { + msg_send_id![self, objectForKeyedSubscript: key] + } + pub unsafe fn enumerateKeysAndObjectsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateKeysAndObjectsUsingBlock: block] + } + pub unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateKeysAndObjectsWithOptions: opts, + usingBlock: block + ] + } + pub unsafe fn keysSortedByValueUsingComparator( + &self, + cmptr: NSComparator, + ) -> Id, Shared> { + msg_send_id![self, keysSortedByValueUsingComparator: cmptr] + } + pub unsafe fn keysSortedByValueWithOptions_usingComparator( + &self, + opts: NSSortOptions, + cmptr: NSComparator, + ) -> Id, Shared> { + msg_send_id![ + self, + keysSortedByValueWithOptions: opts, + usingComparator: cmptr + ] + } + pub unsafe fn keysOfEntriesPassingTest( + &self, + predicate: TodoBlock, + ) -> Id, Shared> { + msg_send_id![self, keysOfEntriesPassingTest: predicate] + } + pub unsafe fn keysOfEntriesWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id, Shared> { + msg_send_id![self, keysOfEntriesWithOptions: opts, passingTest: predicate] + } } - pub unsafe fn initWithContentsOfURL_error( - &self, - url: &NSURL, - ) -> Result, Shared>, Id> { - msg_send_id![self, initWithContentsOfURL: url, error: _] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSDictionary { + pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray) { + msg_send![self, getObjects: objects, andKeys: keys] + } + pub unsafe fn dictionaryWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![Self::class(), dictionaryWithContentsOfFile: path] + } + pub unsafe fn dictionaryWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), dictionaryWithContentsOfURL: url] + } + pub unsafe fn initWithContentsOfFile( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL( + &self, + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfURL: url] + } + pub unsafe fn writeToFile_atomically( + &self, + path: &NSString, + useAuxiliaryFile: bool, + ) -> bool { + msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] + } + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { + msg_send![self, writeToURL: url, atomically: atomically] + } } - pub unsafe fn dictionaryWithContentsOfURL_error( - url: &NSURL, - ) -> Result, Shared>, Id> { - msg_send_id![Self::class(), dictionaryWithContentsOfURL: url, error: _] +); +extern_methods!( + #[doc = "NSDictionaryCreation"] + unsafe impl NSDictionary { + pub unsafe fn dictionary() -> Id { + msg_send_id![Self::class(), dictionary] + } + pub unsafe fn dictionaryWithObject_forKey( + object: &ObjectType, + key: &NSCopying, + ) -> Id { + msg_send_id![Self::class(), dictionaryWithObject: object, forKey: key] + } + pub unsafe fn dictionaryWithObjects_forKeys_count( + objects: TodoArray, + keys: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![ + Self::class(), + dictionaryWithObjects: objects, + forKeys: keys, + count: cnt + ] + } + pub unsafe fn dictionaryWithDictionary( + dict: &NSDictionary, + ) -> Id { + msg_send_id![Self::class(), dictionaryWithDictionary: dict] + } + pub unsafe fn dictionaryWithObjects_forKeys( + objects: &NSArray, + keys: &NSArray, + ) -> Id { + msg_send_id![Self::class(), dictionaryWithObjects: objects, forKeys: keys] + } + pub unsafe fn initWithDictionary( + &self, + otherDictionary: &NSDictionary, + ) -> Id { + msg_send_id![self, initWithDictionary: otherDictionary] + } + pub unsafe fn initWithDictionary_copyItems( + &self, + otherDictionary: &NSDictionary, + flag: bool, + ) -> Id { + msg_send_id![self, initWithDictionary: otherDictionary, copyItems: flag] + } + pub unsafe fn initWithObjects_forKeys( + &self, + objects: &NSArray, + keys: &NSArray, + ) -> Id { + msg_send_id![self, initWithObjects: objects, forKeys: keys] + } + pub unsafe fn initWithContentsOfURL_error( + &self, + url: &NSURL, + ) -> Result, Shared>, Id> { + msg_send_id![self, initWithContentsOfURL: url, error: _] + } + pub unsafe fn dictionaryWithContentsOfURL_error( + url: &NSURL, + ) -> Result, Shared>, Id> { + msg_send_id![Self::class(), dictionaryWithContentsOfURL: url, error: _] + } } -} +); __inner_extern_class!( #[derive(Debug)] pub struct NSMutableDictionary; @@ -257,99 +278,115 @@ __inner_extern_class!( type Super = NSDictionary; } ); -impl NSMutableDictionary { - pub unsafe fn removeObjectForKey(&self, aKey: &KeyType) { - msg_send![self, removeObjectForKey: aKey] - } - pub unsafe fn setObject_forKey(&self, anObject: &ObjectType, aKey: &NSCopying) { - msg_send![self, setObject: anObject, forKey: aKey] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: numItems] +extern_methods!( + unsafe impl NSMutableDictionary { + pub unsafe fn removeObjectForKey(&self, aKey: &KeyType) { + msg_send![self, removeObjectForKey: aKey] + } + pub unsafe fn setObject_forKey(&self, anObject: &ObjectType, aKey: &NSCopying) { + msg_send![self, setObject: anObject, forKey: aKey] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: numItems] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSExtendedMutableDictionary"] -impl NSMutableDictionary { - pub unsafe fn addEntriesFromDictionary( - &self, - otherDictionary: &NSDictionary, - ) { - msg_send![self, addEntriesFromDictionary: otherDictionary] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn removeObjectsForKeys(&self, keyArray: &NSArray) { - msg_send![self, removeObjectsForKeys: keyArray] - } - pub unsafe fn setDictionary(&self, otherDictionary: &NSDictionary) { - msg_send![self, setDictionary: otherDictionary] - } - pub unsafe fn setObject_forKeyedSubscript(&self, obj: Option<&ObjectType>, key: &NSCopying) { - msg_send![self, setObject: obj, forKeyedSubscript: key] - } -} -#[doc = "NSMutableDictionaryCreation"] -impl NSMutableDictionary { - pub unsafe fn dictionaryWithCapacity(numItems: NSUInteger) -> Id { - msg_send_id![Self::class(), dictionaryWithCapacity: numItems] - } - pub unsafe fn dictionaryWithContentsOfFile( - path: &NSString, - ) -> Option, Shared>> { - msg_send_id![Self::class(), dictionaryWithContentsOfFile: path] - } - pub unsafe fn dictionaryWithContentsOfURL( - url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), dictionaryWithContentsOfURL: url] - } - pub unsafe fn initWithContentsOfFile( - &self, - path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfFile: path] +); +extern_methods!( + #[doc = "NSExtendedMutableDictionary"] + unsafe impl NSMutableDictionary { + pub unsafe fn addEntriesFromDictionary( + &self, + otherDictionary: &NSDictionary, + ) { + msg_send![self, addEntriesFromDictionary: otherDictionary] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn removeObjectsForKeys(&self, keyArray: &NSArray) { + msg_send![self, removeObjectsForKeys: keyArray] + } + pub unsafe fn setDictionary(&self, otherDictionary: &NSDictionary) { + msg_send![self, setDictionary: otherDictionary] + } + pub unsafe fn setObject_forKeyedSubscript( + &self, + obj: Option<&ObjectType>, + key: &NSCopying, + ) { + msg_send![self, setObject: obj, forKeyedSubscript: key] + } } - pub unsafe fn initWithContentsOfURL( - &self, - url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfURL: url] +); +extern_methods!( + #[doc = "NSMutableDictionaryCreation"] + unsafe impl NSMutableDictionary { + pub unsafe fn dictionaryWithCapacity(numItems: NSUInteger) -> Id { + msg_send_id![Self::class(), dictionaryWithCapacity: numItems] + } + pub unsafe fn dictionaryWithContentsOfFile( + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![Self::class(), dictionaryWithContentsOfFile: path] + } + pub unsafe fn dictionaryWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), dictionaryWithContentsOfURL: url] + } + pub unsafe fn initWithContentsOfFile( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL( + &self, + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![self, initWithContentsOfURL: url] + } } -} -#[doc = "NSSharedKeySetDictionary"] -impl NSDictionary { - pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id { - msg_send_id![Self::class(), sharedKeySetForKeys: keys] +); +extern_methods!( + #[doc = "NSSharedKeySetDictionary"] + unsafe impl NSDictionary { + pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id { + msg_send_id![Self::class(), sharedKeySetForKeys: keys] + } } -} -#[doc = "NSSharedKeySetDictionary"] -impl NSMutableDictionary { - pub unsafe fn dictionaryWithSharedKeySet( - keyset: &Object, - ) -> Id, Shared> { - msg_send_id![Self::class(), dictionaryWithSharedKeySet: keyset] +); +extern_methods!( + #[doc = "NSSharedKeySetDictionary"] + unsafe impl NSMutableDictionary { + pub unsafe fn dictionaryWithSharedKeySet( + keyset: &Object, + ) -> Id, Shared> { + msg_send_id![Self::class(), dictionaryWithSharedKeySet: keyset] + } } -} -#[doc = "NSGenericFastEnumeraiton"] -impl NSDictionary { - pub unsafe fn countByEnumeratingWithState_objects_count( - &self, - state: NonNull, - buffer: TodoArray, - len: NSUInteger, - ) -> NSUInteger { - msg_send![ - self, - countByEnumeratingWithState: state, - objects: buffer, - count: len - ] +); +extern_methods!( + #[doc = "NSGenericFastEnumeraiton"] + unsafe impl NSDictionary { + pub unsafe fn countByEnumeratingWithState_objects_count( + &self, + state: NonNull, + buffer: TodoArray, + len: NSUInteger, + ) -> NSUInteger { + msg_send![ + self, + countByEnumeratingWithState: state, + objects: buffer, + count: len + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index 8e2918de5..06d141997 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSProxy::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDistantObject; @@ -13,48 +13,50 @@ extern_class!( type Super = NSProxy; } ); -impl NSDistantObject { - pub unsafe fn proxyWithTarget_connection( - target: &Object, - connection: &NSConnection, - ) -> Option> { - msg_send_id![ - Self::class(), - proxyWithTarget: target, - connection: connection - ] +extern_methods!( + unsafe impl NSDistantObject { + pub unsafe fn proxyWithTarget_connection( + target: &Object, + connection: &NSConnection, + ) -> Option> { + msg_send_id![ + Self::class(), + proxyWithTarget: target, + connection: connection + ] + } + pub unsafe fn initWithTarget_connection( + &self, + target: &Object, + connection: &NSConnection, + ) -> Option> { + msg_send_id![self, initWithTarget: target, connection: connection] + } + pub unsafe fn proxyWithLocal_connection( + target: &Object, + connection: &NSConnection, + ) -> Id { + msg_send_id![ + Self::class(), + proxyWithLocal: target, + connection: connection + ] + } + pub unsafe fn initWithLocal_connection( + &self, + target: &Object, + connection: &NSConnection, + ) -> Id { + msg_send_id![self, initWithLocal: target, connection: connection] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn setProtocolForProxy(&self, proto: Option<&Protocol>) { + msg_send![self, setProtocolForProxy: proto] + } + pub unsafe fn connectionForProxy(&self) -> Id { + msg_send_id![self, connectionForProxy] + } } - pub unsafe fn initWithTarget_connection( - &self, - target: &Object, - connection: &NSConnection, - ) -> Option> { - msg_send_id![self, initWithTarget: target, connection: connection] - } - pub unsafe fn proxyWithLocal_connection( - target: &Object, - connection: &NSConnection, - ) -> Id { - msg_send_id![ - Self::class(), - proxyWithLocal: target, - connection: connection - ] - } - pub unsafe fn initWithLocal_connection( - &self, - target: &Object, - connection: &NSConnection, - ) -> Id { - msg_send_id![self, initWithLocal: target, connection: connection] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn setProtocolForProxy(&self, proto: Option<&Protocol>) { - msg_send![self, setProtocolForProxy: proto] - } - pub unsafe fn connectionForProxy(&self) -> Id { - msg_send_id![self, connectionForProxy] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index e0560a2b4..071354ac1 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDistributedLock; @@ -11,26 +11,28 @@ extern_class!( type Super = NSObject; } ); -impl NSDistributedLock { - pub unsafe fn lockWithPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), lockWithPath: path] +extern_methods!( + unsafe impl NSDistributedLock { + pub unsafe fn lockWithPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), lockWithPath: path] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithPath: path] + } + pub unsafe fn tryLock(&self) -> bool { + msg_send![self, tryLock] + } + pub unsafe fn unlock(&self) { + msg_send![self, unlock] + } + pub unsafe fn breakLock(&self) { + msg_send![self, breakLock] + } + pub unsafe fn lockDate(&self) -> Id { + msg_send_id![self, lockDate] + } } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithPath: path] - } - pub unsafe fn tryLock(&self) -> bool { - msg_send![self, tryLock] - } - pub unsafe fn unlock(&self) { - msg_send![self, unlock] - } - pub unsafe fn breakLock(&self) { - msg_send![self, breakLock] - } - pub unsafe fn lockDate(&self) -> Id { - msg_send_id![self, lockDate] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 08bce5f6a..e4037c029 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSNotification::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSDistributedNotificationCenterType = NSString; extern_class!( #[derive(Debug)] @@ -13,117 +13,119 @@ extern_class!( type Super = NSNotificationCenter; } ); -impl NSDistributedNotificationCenter { - pub unsafe fn notificationCenterForType( - notificationCenterType: &NSDistributedNotificationCenterType, - ) -> Id { - msg_send_id![ - Self::class(), - notificationCenterForType: notificationCenterType - ] +extern_methods!( + unsafe impl NSDistributedNotificationCenter { + pub unsafe fn notificationCenterForType( + notificationCenterType: &NSDistributedNotificationCenterType, + ) -> Id { + msg_send_id![ + Self::class(), + notificationCenterForType: notificationCenterType + ] + } + pub unsafe fn defaultCenter() -> Id { + msg_send_id![Self::class(), defaultCenter] + } + pub unsafe fn addObserver_selector_name_object_suspensionBehavior( + &self, + observer: &Object, + selector: Sel, + name: Option<&NSNotificationName>, + object: Option<&NSString>, + suspensionBehavior: NSNotificationSuspensionBehavior, + ) { + msg_send![ + self, + addObserver: observer, + selector: selector, + name: name, + object: object, + suspensionBehavior: suspensionBehavior + ] + } + pub unsafe fn postNotificationName_object_userInfo_deliverImmediately( + &self, + name: &NSNotificationName, + object: Option<&NSString>, + userInfo: Option<&NSDictionary>, + deliverImmediately: bool, + ) { + msg_send![ + self, + postNotificationName: name, + object: object, + userInfo: userInfo, + deliverImmediately: deliverImmediately + ] + } + pub unsafe fn postNotificationName_object_userInfo_options( + &self, + name: &NSNotificationName, + object: Option<&NSString>, + userInfo: Option<&NSDictionary>, + options: NSDistributedNotificationOptions, + ) { + msg_send![ + self, + postNotificationName: name, + object: object, + userInfo: userInfo, + options: options + ] + } + pub unsafe fn suspended(&self) -> bool { + msg_send![self, suspended] + } + pub unsafe fn setSuspended(&self, suspended: bool) { + msg_send![self, setSuspended: suspended] + } + pub unsafe fn addObserver_selector_name_object( + &self, + observer: &Object, + aSelector: Sel, + aName: Option<&NSNotificationName>, + anObject: Option<&NSString>, + ) { + msg_send![ + self, + addObserver: observer, + selector: aSelector, + name: aName, + object: anObject + ] + } + pub unsafe fn postNotificationName_object( + &self, + aName: &NSNotificationName, + anObject: Option<&NSString>, + ) { + msg_send![self, postNotificationName: aName, object: anObject] + } + pub unsafe fn postNotificationName_object_userInfo( + &self, + aName: &NSNotificationName, + anObject: Option<&NSString>, + aUserInfo: Option<&NSDictionary>, + ) { + msg_send![ + self, + postNotificationName: aName, + object: anObject, + userInfo: aUserInfo + ] + } + pub unsafe fn removeObserver_name_object( + &self, + observer: &Object, + aName: Option<&NSNotificationName>, + anObject: Option<&NSString>, + ) { + msg_send![ + self, + removeObserver: observer, + name: aName, + object: anObject + ] + } } - pub unsafe fn defaultCenter() -> Id { - msg_send_id![Self::class(), defaultCenter] - } - pub unsafe fn addObserver_selector_name_object_suspensionBehavior( - &self, - observer: &Object, - selector: Sel, - name: Option<&NSNotificationName>, - object: Option<&NSString>, - suspensionBehavior: NSNotificationSuspensionBehavior, - ) { - msg_send![ - self, - addObserver: observer, - selector: selector, - name: name, - object: object, - suspensionBehavior: suspensionBehavior - ] - } - pub unsafe fn postNotificationName_object_userInfo_deliverImmediately( - &self, - name: &NSNotificationName, - object: Option<&NSString>, - userInfo: Option<&NSDictionary>, - deliverImmediately: bool, - ) { - msg_send![ - self, - postNotificationName: name, - object: object, - userInfo: userInfo, - deliverImmediately: deliverImmediately - ] - } - pub unsafe fn postNotificationName_object_userInfo_options( - &self, - name: &NSNotificationName, - object: Option<&NSString>, - userInfo: Option<&NSDictionary>, - options: NSDistributedNotificationOptions, - ) { - msg_send![ - self, - postNotificationName: name, - object: object, - userInfo: userInfo, - options: options - ] - } - pub unsafe fn suspended(&self) -> bool { - msg_send![self, suspended] - } - pub unsafe fn setSuspended(&self, suspended: bool) { - msg_send![self, setSuspended: suspended] - } - pub unsafe fn addObserver_selector_name_object( - &self, - observer: &Object, - aSelector: Sel, - aName: Option<&NSNotificationName>, - anObject: Option<&NSString>, - ) { - msg_send![ - self, - addObserver: observer, - selector: aSelector, - name: aName, - object: anObject - ] - } - pub unsafe fn postNotificationName_object( - &self, - aName: &NSNotificationName, - anObject: Option<&NSString>, - ) { - msg_send![self, postNotificationName: aName, object: anObject] - } - pub unsafe fn postNotificationName_object_userInfo( - &self, - aName: &NSNotificationName, - anObject: Option<&NSString>, - aUserInfo: Option<&NSDictionary>, - ) { - msg_send![ - self, - postNotificationName: aName, - object: anObject, - userInfo: aUserInfo - ] - } - pub unsafe fn removeObserver_name_object( - &self, - observer: &Object, - aName: Option<&NSNotificationName>, - anObject: Option<&NSString>, - ) { - msg_send![ - self, - removeObserver: observer, - name: aName, - object: anObject - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index aee8ef3ba..812933d0e 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSEnergyFormatter; @@ -10,60 +10,62 @@ extern_class!( type Super = NSFormatter; } ); -impl NSEnergyFormatter { - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] +extern_methods!( + unsafe impl NSEnergyFormatter { + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn isForFoodEnergyUse(&self) -> bool { + msg_send![self, isForFoodEnergyUse] + } + pub unsafe fn setForFoodEnergyUse(&self, forFoodEnergyUse: bool) { + msg_send![self, setForFoodEnergyUse: forFoodEnergyUse] + } + pub unsafe fn stringFromValue_unit( + &self, + value: c_double, + unit: NSEnergyFormatterUnit, + ) -> Id { + msg_send_id![self, stringFromValue: value, unit: unit] + } + pub unsafe fn stringFromJoules(&self, numberInJoules: c_double) -> Id { + msg_send_id![self, stringFromJoules: numberInJoules] + } + pub unsafe fn unitStringFromValue_unit( + &self, + value: c_double, + unit: NSEnergyFormatterUnit, + ) -> Id { + msg_send_id![self, unitStringFromValue: value, unit: unit] + } + pub unsafe fn unitStringFromJoules_usedUnit( + &self, + numberInJoules: c_double, + unitp: *mut NSEnergyFormatterUnit, + ) -> Id { + msg_send_id![self, unitStringFromJoules: numberInJoules, usedUnit: unitp] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: Option<&mut Option>>, + string: &NSString, + error: Option<&mut Option>>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn isForFoodEnergyUse(&self) -> bool { - msg_send![self, isForFoodEnergyUse] - } - pub unsafe fn setForFoodEnergyUse(&self, forFoodEnergyUse: bool) { - msg_send![self, setForFoodEnergyUse: forFoodEnergyUse] - } - pub unsafe fn stringFromValue_unit( - &self, - value: c_double, - unit: NSEnergyFormatterUnit, - ) -> Id { - msg_send_id![self, stringFromValue: value, unit: unit] - } - pub unsafe fn stringFromJoules(&self, numberInJoules: c_double) -> Id { - msg_send_id![self, stringFromJoules: numberInJoules] - } - pub unsafe fn unitStringFromValue_unit( - &self, - value: c_double, - unit: NSEnergyFormatterUnit, - ) -> Id { - msg_send_id![self, unitStringFromValue: value, unit: unit] - } - pub unsafe fn unitStringFromJoules_usedUnit( - &self, - numberInJoules: c_double, - unitp: *mut NSEnergyFormatterUnit, - ) -> Id { - msg_send_id![self, unitStringFromJoules: numberInJoules, usedUnit: unitp] - } - pub unsafe fn getObjectValue_forString_errorDescription( - &self, - obj: Option<&mut Option>>, - string: &NSString, - error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 9ce37a9e2..44d9be9c8 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSFastEnumeration = NSObject; __inner_extern_class!( #[derive(Debug)] @@ -12,14 +12,18 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSEnumerator { - pub unsafe fn nextObject(&self) -> Option> { - msg_send_id![self, nextObject] +extern_methods!( + unsafe impl NSEnumerator { + pub unsafe fn nextObject(&self) -> Option> { + msg_send_id![self, nextObject] + } } -} -#[doc = "NSExtendedEnumerator"] -impl NSEnumerator { - pub unsafe fn allObjects(&self) -> Id, Shared> { - msg_send_id![self, allObjects] +); +extern_methods!( + #[doc = "NSExtendedEnumerator"] + unsafe impl NSEnumerator { + pub unsafe fn allObjects(&self) -> Id, Shared> { + msg_send_id![self, allObjects] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 58d3322d0..d64e1b386 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSErrorDomain = NSString; pub type NSErrorUserInfoKey = NSString; extern_class!( @@ -15,99 +15,103 @@ extern_class!( type Super = NSObject; } ); -impl NSError { - pub unsafe fn initWithDomain_code_userInfo( - &self, - domain: &NSErrorDomain, - code: NSInteger, - dict: Option<&NSDictionary>, - ) -> Id { - msg_send_id![self, initWithDomain: domain, code: code, userInfo: dict] +extern_methods!( + unsafe impl NSError { + pub unsafe fn initWithDomain_code_userInfo( + &self, + domain: &NSErrorDomain, + code: NSInteger, + dict: Option<&NSDictionary>, + ) -> Id { + msg_send_id![self, initWithDomain: domain, code: code, userInfo: dict] + } + pub unsafe fn errorWithDomain_code_userInfo( + domain: &NSErrorDomain, + code: NSInteger, + dict: Option<&NSDictionary>, + ) -> Id { + msg_send_id![ + Self::class(), + errorWithDomain: domain, + code: code, + userInfo: dict + ] + } + pub unsafe fn domain(&self) -> Id { + msg_send_id![self, domain] + } + pub unsafe fn code(&self) -> NSInteger { + msg_send![self, code] + } + pub unsafe fn userInfo(&self) -> Id, Shared> { + msg_send_id![self, userInfo] + } + pub unsafe fn localizedDescription(&self) -> Id { + msg_send_id![self, localizedDescription] + } + pub unsafe fn localizedFailureReason(&self) -> Option> { + msg_send_id![self, localizedFailureReason] + } + pub unsafe fn localizedRecoverySuggestion(&self) -> Option> { + msg_send_id![self, localizedRecoverySuggestion] + } + pub unsafe fn localizedRecoveryOptions(&self) -> Option, Shared>> { + msg_send_id![self, localizedRecoveryOptions] + } + pub unsafe fn recoveryAttempter(&self) -> Option> { + msg_send_id![self, recoveryAttempter] + } + pub unsafe fn helpAnchor(&self) -> Option> { + msg_send_id![self, helpAnchor] + } + pub unsafe fn underlyingErrors(&self) -> Id, Shared> { + msg_send_id![self, underlyingErrors] + } + pub unsafe fn setUserInfoValueProviderForDomain_provider( + errorDomain: &NSErrorDomain, + provider: TodoBlock, + ) { + msg_send![ + Self::class(), + setUserInfoValueProviderForDomain: errorDomain, + provider: provider + ] + } + pub unsafe fn userInfoValueProviderForDomain(errorDomain: &NSErrorDomain) -> TodoBlock { + msg_send![Self::class(), userInfoValueProviderForDomain: errorDomain] + } } - pub unsafe fn errorWithDomain_code_userInfo( - domain: &NSErrorDomain, - code: NSInteger, - dict: Option<&NSDictionary>, - ) -> Id { - msg_send_id![ - Self::class(), - errorWithDomain: domain, - code: code, - userInfo: dict - ] - } - pub unsafe fn domain(&self) -> Id { - msg_send_id![self, domain] - } - pub unsafe fn code(&self) -> NSInteger { - msg_send![self, code] - } - pub unsafe fn userInfo(&self) -> Id, Shared> { - msg_send_id![self, userInfo] - } - pub unsafe fn localizedDescription(&self) -> Id { - msg_send_id![self, localizedDescription] - } - pub unsafe fn localizedFailureReason(&self) -> Option> { - msg_send_id![self, localizedFailureReason] - } - pub unsafe fn localizedRecoverySuggestion(&self) -> Option> { - msg_send_id![self, localizedRecoverySuggestion] - } - pub unsafe fn localizedRecoveryOptions(&self) -> Option, Shared>> { - msg_send_id![self, localizedRecoveryOptions] - } - pub unsafe fn recoveryAttempter(&self) -> Option> { - msg_send_id![self, recoveryAttempter] - } - pub unsafe fn helpAnchor(&self) -> Option> { - msg_send_id![self, helpAnchor] - } - pub unsafe fn underlyingErrors(&self) -> Id, Shared> { - msg_send_id![self, underlyingErrors] - } - pub unsafe fn setUserInfoValueProviderForDomain_provider( - errorDomain: &NSErrorDomain, - provider: TodoBlock, - ) { - msg_send![ - Self::class(), - setUserInfoValueProviderForDomain: errorDomain, - provider: provider - ] - } - pub unsafe fn userInfoValueProviderForDomain(errorDomain: &NSErrorDomain) -> TodoBlock { - msg_send![Self::class(), userInfoValueProviderForDomain: errorDomain] - } -} -#[doc = "NSErrorRecoveryAttempting"] -impl NSObject { - pub unsafe fn attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo( - &self, - error: &NSError, - recoveryOptionIndex: NSUInteger, - delegate: Option<&Object>, - didRecoverSelector: Option, - contextInfo: *mut c_void, - ) { - msg_send![ - self, - attemptRecoveryFromError: error, - optionIndex: recoveryOptionIndex, - delegate: delegate, - didRecoverSelector: didRecoverSelector, - contextInfo: contextInfo - ] - } - pub unsafe fn attemptRecoveryFromError_optionIndex( - &self, - error: &NSError, - recoveryOptionIndex: NSUInteger, - ) -> bool { - msg_send![ - self, - attemptRecoveryFromError: error, - optionIndex: recoveryOptionIndex - ] +); +extern_methods!( + #[doc = "NSErrorRecoveryAttempting"] + unsafe impl NSObject { + pub unsafe fn attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo( + &self, + error: &NSError, + recoveryOptionIndex: NSUInteger, + delegate: Option<&Object>, + didRecoverSelector: Option, + contextInfo: *mut c_void, + ) { + msg_send![ + self, + attemptRecoveryFromError: error, + optionIndex: recoveryOptionIndex, + delegate: delegate, + didRecoverSelector: didRecoverSelector, + contextInfo: contextInfo + ] + } + pub unsafe fn attemptRecoveryFromError_optionIndex( + &self, + error: &NSError, + recoveryOptionIndex: NSUInteger, + ) -> bool { + msg_send![ + self, + attemptRecoveryFromError: error, + optionIndex: recoveryOptionIndex + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 988f4bd3c..3d9dca65c 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSException; @@ -15,66 +15,70 @@ extern_class!( type Super = NSObject; } ); -impl NSException { - pub unsafe fn exceptionWithName_reason_userInfo( - name: &NSExceptionName, - reason: Option<&NSString>, - userInfo: Option<&NSDictionary>, - ) -> Id { - msg_send_id![ - Self::class(), - exceptionWithName: name, - reason: reason, - userInfo: userInfo - ] +extern_methods!( + unsafe impl NSException { + pub unsafe fn exceptionWithName_reason_userInfo( + name: &NSExceptionName, + reason: Option<&NSString>, + userInfo: Option<&NSDictionary>, + ) -> Id { + msg_send_id![ + Self::class(), + exceptionWithName: name, + reason: reason, + userInfo: userInfo + ] + } + pub unsafe fn initWithName_reason_userInfo( + &self, + aName: &NSExceptionName, + aReason: Option<&NSString>, + aUserInfo: Option<&NSDictionary>, + ) -> Id { + msg_send_id![ + self, + initWithName: aName, + reason: aReason, + userInfo: aUserInfo + ] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn reason(&self) -> Option> { + msg_send_id![self, reason] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } + pub unsafe fn callStackReturnAddresses(&self) -> Id, Shared> { + msg_send_id![self, callStackReturnAddresses] + } + pub unsafe fn callStackSymbols(&self) -> Id, Shared> { + msg_send_id![self, callStackSymbols] + } + pub unsafe fn raise(&self) { + msg_send![self, raise] + } } - pub unsafe fn initWithName_reason_userInfo( - &self, - aName: &NSExceptionName, - aReason: Option<&NSString>, - aUserInfo: Option<&NSDictionary>, - ) -> Id { - msg_send_id![ - self, - initWithName: aName, - reason: aReason, - userInfo: aUserInfo - ] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn reason(&self) -> Option> { - msg_send_id![self, reason] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } - pub unsafe fn callStackReturnAddresses(&self) -> Id, Shared> { - msg_send_id![self, callStackReturnAddresses] - } - pub unsafe fn callStackSymbols(&self) -> Id, Shared> { - msg_send_id![self, callStackSymbols] - } - pub unsafe fn raise(&self) { - msg_send![self, raise] - } -} -#[doc = "NSExceptionRaisingConveniences"] -impl NSException { - pub unsafe fn raise_format_arguments( - name: &NSExceptionName, - format: &NSString, - argList: va_list, - ) { - msg_send![ - Self::class(), - raise: name, - format: format, - arguments: argList - ] +); +extern_methods!( + #[doc = "NSExceptionRaisingConveniences"] + unsafe impl NSException { + pub unsafe fn raise_format_arguments( + name: &NSExceptionName, + format: &NSString, + argList: va_list, + ) { + msg_send![ + Self::class(), + raise: name, + format: format, + arguments: argList + ] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSAssertionHandler; @@ -82,8 +86,10 @@ extern_class!( type Super = NSObject; } ); -impl NSAssertionHandler { - pub unsafe fn currentHandler() -> Id { - msg_send_id![Self::class(), currentHandler] +extern_methods!( + unsafe impl NSAssertionHandler { + pub unsafe fn currentHandler() -> Id { + msg_send_id![Self::class(), currentHandler] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index f8462618c..6522ab851 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSExpression; @@ -14,177 +14,179 @@ extern_class!( type Super = NSObject; } ); -impl NSExpression { - pub unsafe fn expressionWithFormat_argumentArray( - expressionFormat: &NSString, - arguments: &NSArray, - ) -> Id { - msg_send_id![ - Self::class(), - expressionWithFormat: expressionFormat, - argumentArray: arguments - ] +extern_methods!( + unsafe impl NSExpression { + pub unsafe fn expressionWithFormat_argumentArray( + expressionFormat: &NSString, + arguments: &NSArray, + ) -> Id { + msg_send_id![ + Self::class(), + expressionWithFormat: expressionFormat, + argumentArray: arguments + ] + } + pub unsafe fn expressionWithFormat_arguments( + expressionFormat: &NSString, + argList: va_list, + ) -> Id { + msg_send_id![ + Self::class(), + expressionWithFormat: expressionFormat, + arguments: argList + ] + } + pub unsafe fn expressionForConstantValue(obj: Option<&Object>) -> Id { + msg_send_id![Self::class(), expressionForConstantValue: obj] + } + pub unsafe fn expressionForEvaluatedObject() -> Id { + msg_send_id![Self::class(), expressionForEvaluatedObject] + } + pub unsafe fn expressionForVariable(string: &NSString) -> Id { + msg_send_id![Self::class(), expressionForVariable: string] + } + pub unsafe fn expressionForKeyPath(keyPath: &NSString) -> Id { + msg_send_id![Self::class(), expressionForKeyPath: keyPath] + } + pub unsafe fn expressionForFunction_arguments( + name: &NSString, + parameters: &NSArray, + ) -> Id { + msg_send_id![ + Self::class(), + expressionForFunction: name, + arguments: parameters + ] + } + pub unsafe fn expressionForAggregate( + subexpressions: &NSArray, + ) -> Id { + msg_send_id![Self::class(), expressionForAggregate: subexpressions] + } + pub unsafe fn expressionForUnionSet_with( + left: &NSExpression, + right: &NSExpression, + ) -> Id { + msg_send_id![Self::class(), expressionForUnionSet: left, with: right] + } + pub unsafe fn expressionForIntersectSet_with( + left: &NSExpression, + right: &NSExpression, + ) -> Id { + msg_send_id![Self::class(), expressionForIntersectSet: left, with: right] + } + pub unsafe fn expressionForMinusSet_with( + left: &NSExpression, + right: &NSExpression, + ) -> Id { + msg_send_id![Self::class(), expressionForMinusSet: left, with: right] + } + pub unsafe fn expressionForSubquery_usingIteratorVariable_predicate( + expression: &NSExpression, + variable: &NSString, + predicate: &NSPredicate, + ) -> Id { + msg_send_id![ + Self::class(), + expressionForSubquery: expression, + usingIteratorVariable: variable, + predicate: predicate + ] + } + pub unsafe fn expressionForFunction_selectorName_arguments( + target: &NSExpression, + name: &NSString, + parameters: Option<&NSArray>, + ) -> Id { + msg_send_id![ + Self::class(), + expressionForFunction: target, + selectorName: name, + arguments: parameters + ] + } + pub unsafe fn expressionForAnyKey() -> Id { + msg_send_id![Self::class(), expressionForAnyKey] + } + pub unsafe fn expressionForBlock_arguments( + block: TodoBlock, + arguments: Option<&NSArray>, + ) -> Id { + msg_send_id![ + Self::class(), + expressionForBlock: block, + arguments: arguments + ] + } + pub unsafe fn expressionForConditional_trueExpression_falseExpression( + predicate: &NSPredicate, + trueExpression: &NSExpression, + falseExpression: &NSExpression, + ) -> Id { + msg_send_id![ + Self::class(), + expressionForConditional: predicate, + trueExpression: trueExpression, + falseExpression: falseExpression + ] + } + pub unsafe fn initWithExpressionType(&self, type_: NSExpressionType) -> Id { + msg_send_id![self, initWithExpressionType: type_] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn expressionType(&self) -> NSExpressionType { + msg_send![self, expressionType] + } + pub unsafe fn constantValue(&self) -> Option> { + msg_send_id![self, constantValue] + } + pub unsafe fn keyPath(&self) -> Id { + msg_send_id![self, keyPath] + } + pub unsafe fn function(&self) -> Id { + msg_send_id![self, function] + } + pub unsafe fn variable(&self) -> Id { + msg_send_id![self, variable] + } + pub unsafe fn operand(&self) -> Id { + msg_send_id![self, operand] + } + pub unsafe fn arguments(&self) -> Option, Shared>> { + msg_send_id![self, arguments] + } + pub unsafe fn collection(&self) -> Id { + msg_send_id![self, collection] + } + pub unsafe fn predicate(&self) -> Id { + msg_send_id![self, predicate] + } + pub unsafe fn leftExpression(&self) -> Id { + msg_send_id![self, leftExpression] + } + pub unsafe fn rightExpression(&self) -> Id { + msg_send_id![self, rightExpression] + } + pub unsafe fn trueExpression(&self) -> Id { + msg_send_id![self, trueExpression] + } + pub unsafe fn falseExpression(&self) -> Id { + msg_send_id![self, falseExpression] + } + pub unsafe fn expressionBlock(&self) -> TodoBlock { + msg_send![self, expressionBlock] + } + pub unsafe fn expressionValueWithObject_context( + &self, + object: Option<&Object>, + context: Option<&NSMutableDictionary>, + ) -> Option> { + msg_send_id![self, expressionValueWithObject: object, context: context] + } + pub unsafe fn allowEvaluation(&self) { + msg_send![self, allowEvaluation] + } } - pub unsafe fn expressionWithFormat_arguments( - expressionFormat: &NSString, - argList: va_list, - ) -> Id { - msg_send_id![ - Self::class(), - expressionWithFormat: expressionFormat, - arguments: argList - ] - } - pub unsafe fn expressionForConstantValue(obj: Option<&Object>) -> Id { - msg_send_id![Self::class(), expressionForConstantValue: obj] - } - pub unsafe fn expressionForEvaluatedObject() -> Id { - msg_send_id![Self::class(), expressionForEvaluatedObject] - } - pub unsafe fn expressionForVariable(string: &NSString) -> Id { - msg_send_id![Self::class(), expressionForVariable: string] - } - pub unsafe fn expressionForKeyPath(keyPath: &NSString) -> Id { - msg_send_id![Self::class(), expressionForKeyPath: keyPath] - } - pub unsafe fn expressionForFunction_arguments( - name: &NSString, - parameters: &NSArray, - ) -> Id { - msg_send_id![ - Self::class(), - expressionForFunction: name, - arguments: parameters - ] - } - pub unsafe fn expressionForAggregate( - subexpressions: &NSArray, - ) -> Id { - msg_send_id![Self::class(), expressionForAggregate: subexpressions] - } - pub unsafe fn expressionForUnionSet_with( - left: &NSExpression, - right: &NSExpression, - ) -> Id { - msg_send_id![Self::class(), expressionForUnionSet: left, with: right] - } - pub unsafe fn expressionForIntersectSet_with( - left: &NSExpression, - right: &NSExpression, - ) -> Id { - msg_send_id![Self::class(), expressionForIntersectSet: left, with: right] - } - pub unsafe fn expressionForMinusSet_with( - left: &NSExpression, - right: &NSExpression, - ) -> Id { - msg_send_id![Self::class(), expressionForMinusSet: left, with: right] - } - pub unsafe fn expressionForSubquery_usingIteratorVariable_predicate( - expression: &NSExpression, - variable: &NSString, - predicate: &NSPredicate, - ) -> Id { - msg_send_id![ - Self::class(), - expressionForSubquery: expression, - usingIteratorVariable: variable, - predicate: predicate - ] - } - pub unsafe fn expressionForFunction_selectorName_arguments( - target: &NSExpression, - name: &NSString, - parameters: Option<&NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - expressionForFunction: target, - selectorName: name, - arguments: parameters - ] - } - pub unsafe fn expressionForAnyKey() -> Id { - msg_send_id![Self::class(), expressionForAnyKey] - } - pub unsafe fn expressionForBlock_arguments( - block: TodoBlock, - arguments: Option<&NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - expressionForBlock: block, - arguments: arguments - ] - } - pub unsafe fn expressionForConditional_trueExpression_falseExpression( - predicate: &NSPredicate, - trueExpression: &NSExpression, - falseExpression: &NSExpression, - ) -> Id { - msg_send_id![ - Self::class(), - expressionForConditional: predicate, - trueExpression: trueExpression, - falseExpression: falseExpression - ] - } - pub unsafe fn initWithExpressionType(&self, type_: NSExpressionType) -> Id { - msg_send_id![self, initWithExpressionType: type_] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn expressionType(&self) -> NSExpressionType { - msg_send![self, expressionType] - } - pub unsafe fn constantValue(&self) -> Option> { - msg_send_id![self, constantValue] - } - pub unsafe fn keyPath(&self) -> Id { - msg_send_id![self, keyPath] - } - pub unsafe fn function(&self) -> Id { - msg_send_id![self, function] - } - pub unsafe fn variable(&self) -> Id { - msg_send_id![self, variable] - } - pub unsafe fn operand(&self) -> Id { - msg_send_id![self, operand] - } - pub unsafe fn arguments(&self) -> Option, Shared>> { - msg_send_id![self, arguments] - } - pub unsafe fn collection(&self) -> Id { - msg_send_id![self, collection] - } - pub unsafe fn predicate(&self) -> Id { - msg_send_id![self, predicate] - } - pub unsafe fn leftExpression(&self) -> Id { - msg_send_id![self, leftExpression] - } - pub unsafe fn rightExpression(&self) -> Id { - msg_send_id![self, rightExpression] - } - pub unsafe fn trueExpression(&self) -> Id { - msg_send_id![self, trueExpression] - } - pub unsafe fn falseExpression(&self) -> Id { - msg_send_id![self, falseExpression] - } - pub unsafe fn expressionBlock(&self) -> TodoBlock { - msg_send![self, expressionBlock] - } - pub unsafe fn expressionValueWithObject_context( - &self, - object: Option<&Object>, - context: Option<&NSMutableDictionary>, - ) -> Option> { - msg_send_id![self, expressionValueWithObject: object, context: context] - } - pub unsafe fn allowEvaluation(&self) { - msg_send![self, allowEvaluation] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index 7e63e58ef..8ba02b6fc 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSExtensionContext; @@ -10,25 +10,27 @@ extern_class!( type Super = NSObject; } ); -impl NSExtensionContext { - pub unsafe fn inputItems(&self) -> Id { - msg_send_id![self, inputItems] +extern_methods!( + unsafe impl NSExtensionContext { + pub unsafe fn inputItems(&self) -> Id { + msg_send_id![self, inputItems] + } + pub unsafe fn completeRequestReturningItems_completionHandler( + &self, + items: Option<&NSArray>, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + completeRequestReturningItems: items, + completionHandler: completionHandler + ] + } + pub unsafe fn cancelRequestWithError(&self, error: &NSError) { + msg_send![self, cancelRequestWithError: error] + } + pub unsafe fn openURL_completionHandler(&self, URL: &NSURL, completionHandler: TodoBlock) { + msg_send![self, openURL: URL, completionHandler: completionHandler] + } } - pub unsafe fn completeRequestReturningItems_completionHandler( - &self, - items: Option<&NSArray>, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - completeRequestReturningItems: items, - completionHandler: completionHandler - ] - } - pub unsafe fn cancelRequestWithError(&self, error: &NSError) { - msg_send![self, cancelRequestWithError: error] - } - pub unsafe fn openURL_completionHandler(&self, URL: &NSURL, completionHandler: TodoBlock) { - msg_send![self, openURL: URL, completionHandler: completionHandler] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index 1c83b9dc7..9b6e9ad21 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSItemProvider::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSExtensionItem; @@ -11,32 +11,34 @@ extern_class!( type Super = NSObject; } ); -impl NSExtensionItem { - pub unsafe fn attributedTitle(&self) -> Option> { - msg_send_id![self, attributedTitle] +extern_methods!( + unsafe impl NSExtensionItem { + pub unsafe fn attributedTitle(&self) -> Option> { + msg_send_id![self, attributedTitle] + } + pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>) { + msg_send![self, setAttributedTitle: attributedTitle] + } + pub unsafe fn attributedContentText(&self) -> Option> { + msg_send_id![self, attributedContentText] + } + pub unsafe fn setAttributedContentText( + &self, + attributedContentText: Option<&NSAttributedString>, + ) { + msg_send![self, setAttributedContentText: attributedContentText] + } + pub unsafe fn attachments(&self) -> Option, Shared>> { + msg_send_id![self, attachments] + } + pub unsafe fn setAttachments(&self, attachments: Option<&NSArray>) { + msg_send![self, setAttachments: attachments] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { + msg_send![self, setUserInfo: userInfo] + } } - pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>) { - msg_send![self, setAttributedTitle: attributedTitle] - } - pub unsafe fn attributedContentText(&self) -> Option> { - msg_send_id![self, attributedContentText] - } - pub unsafe fn setAttributedContentText( - &self, - attributedContentText: Option<&NSAttributedString>, - ) { - msg_send![self, setAttributedContentText: attributedContentText] - } - pub unsafe fn attachments(&self) -> Option, Shared>> { - msg_send_id![self, attachments] - } - pub unsafe fn setAttachments(&self, attachments: Option<&NSArray>) { - msg_send![self, setAttachments: attachments] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } - pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { - msg_send![self, setUserInfo: userInfo] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs index a84eb23a1..339014c66 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs @@ -3,5 +3,5 @@ use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSExtensionRequestHandling = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index dd1ffbecb..28d845024 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSFileAccessIntent; @@ -17,23 +17,25 @@ extern_class!( type Super = NSObject; } ); -impl NSFileAccessIntent { - pub unsafe fn readingIntentWithURL_options( - url: &NSURL, - options: NSFileCoordinatorReadingOptions, - ) -> Id { - msg_send_id![Self::class(), readingIntentWithURL: url, options: options] +extern_methods!( + unsafe impl NSFileAccessIntent { + pub unsafe fn readingIntentWithURL_options( + url: &NSURL, + options: NSFileCoordinatorReadingOptions, + ) -> Id { + msg_send_id![Self::class(), readingIntentWithURL: url, options: options] + } + pub unsafe fn writingIntentWithURL_options( + url: &NSURL, + options: NSFileCoordinatorWritingOptions, + ) -> Id { + msg_send_id![Self::class(), writingIntentWithURL: url, options: options] + } + pub unsafe fn URL(&self) -> Id { + msg_send_id![self, URL] + } } - pub unsafe fn writingIntentWithURL_options( - url: &NSURL, - options: NSFileCoordinatorWritingOptions, - ) -> Id { - msg_send_id![Self::class(), writingIntentWithURL: url, options: options] - } - pub unsafe fn URL(&self) -> Id { - msg_send_id![self, URL] - } -} +); extern_class!( #[derive(Debug)] pub struct NSFileCoordinator; @@ -41,146 +43,148 @@ extern_class!( type Super = NSObject; } ); -impl NSFileCoordinator { - pub unsafe fn addFilePresenter(filePresenter: &NSFilePresenter) { - msg_send![Self::class(), addFilePresenter: filePresenter] - } - pub unsafe fn removeFilePresenter(filePresenter: &NSFilePresenter) { - msg_send![Self::class(), removeFilePresenter: filePresenter] - } - pub unsafe fn filePresenters() -> Id, Shared> { - msg_send_id![Self::class(), filePresenters] - } - pub unsafe fn initWithFilePresenter( - &self, - filePresenterOrNil: Option<&NSFilePresenter>, - ) -> Id { - msg_send_id![self, initWithFilePresenter: filePresenterOrNil] - } - pub unsafe fn purposeIdentifier(&self) -> Id { - msg_send_id![self, purposeIdentifier] - } - pub unsafe fn setPurposeIdentifier(&self, purposeIdentifier: &NSString) { - msg_send![self, setPurposeIdentifier: purposeIdentifier] - } - pub unsafe fn coordinateAccessWithIntents_queue_byAccessor( - &self, - intents: &NSArray, - queue: &NSOperationQueue, - accessor: TodoBlock, - ) { - msg_send![ - self, - coordinateAccessWithIntents: intents, - queue: queue, - byAccessor: accessor - ] - } - pub unsafe fn coordinateReadingItemAtURL_options_error_byAccessor( - &self, - url: &NSURL, - options: NSFileCoordinatorReadingOptions, - outError: *mut *mut NSError, - reader: TodoBlock, - ) { - msg_send![ - self, - coordinateReadingItemAtURL: url, - options: options, - error: outError, - byAccessor: reader - ] +extern_methods!( + unsafe impl NSFileCoordinator { + pub unsafe fn addFilePresenter(filePresenter: &NSFilePresenter) { + msg_send![Self::class(), addFilePresenter: filePresenter] + } + pub unsafe fn removeFilePresenter(filePresenter: &NSFilePresenter) { + msg_send![Self::class(), removeFilePresenter: filePresenter] + } + pub unsafe fn filePresenters() -> Id, Shared> { + msg_send_id![Self::class(), filePresenters] + } + pub unsafe fn initWithFilePresenter( + &self, + filePresenterOrNil: Option<&NSFilePresenter>, + ) -> Id { + msg_send_id![self, initWithFilePresenter: filePresenterOrNil] + } + pub unsafe fn purposeIdentifier(&self) -> Id { + msg_send_id![self, purposeIdentifier] + } + pub unsafe fn setPurposeIdentifier(&self, purposeIdentifier: &NSString) { + msg_send![self, setPurposeIdentifier: purposeIdentifier] + } + pub unsafe fn coordinateAccessWithIntents_queue_byAccessor( + &self, + intents: &NSArray, + queue: &NSOperationQueue, + accessor: TodoBlock, + ) { + msg_send![ + self, + coordinateAccessWithIntents: intents, + queue: queue, + byAccessor: accessor + ] + } + pub unsafe fn coordinateReadingItemAtURL_options_error_byAccessor( + &self, + url: &NSURL, + options: NSFileCoordinatorReadingOptions, + outError: *mut *mut NSError, + reader: TodoBlock, + ) { + msg_send![ + self, + coordinateReadingItemAtURL: url, + options: options, + error: outError, + byAccessor: reader + ] + } + pub unsafe fn coordinateWritingItemAtURL_options_error_byAccessor( + &self, + url: &NSURL, + options: NSFileCoordinatorWritingOptions, + outError: *mut *mut NSError, + writer: TodoBlock, + ) { + msg_send![ + self, + coordinateWritingItemAtURL: url, + options: options, + error: outError, + byAccessor: writer + ] + } + pub unsafe fn coordinateReadingItemAtURL_options_writingItemAtURL_options_error_byAccessor( + &self, + readingURL: &NSURL, + readingOptions: NSFileCoordinatorReadingOptions, + writingURL: &NSURL, + writingOptions: NSFileCoordinatorWritingOptions, + outError: *mut *mut NSError, + readerWriter: TodoBlock, + ) { + msg_send![ + self, + coordinateReadingItemAtURL: readingURL, + options: readingOptions, + writingItemAtURL: writingURL, + options: writingOptions, + error: outError, + byAccessor: readerWriter + ] + } + pub unsafe fn coordinateWritingItemAtURL_options_writingItemAtURL_options_error_byAccessor( + &self, + url1: &NSURL, + options1: NSFileCoordinatorWritingOptions, + url2: &NSURL, + options2: NSFileCoordinatorWritingOptions, + outError: *mut *mut NSError, + writer: TodoBlock, + ) { + msg_send![ + self, + coordinateWritingItemAtURL: url1, + options: options1, + writingItemAtURL: url2, + options: options2, + error: outError, + byAccessor: writer + ] + } + pub unsafe fn prepareForReadingItemsAtURLs_options_writingItemsAtURLs_options_error_byAccessor( + &self, + readingURLs: &NSArray, + readingOptions: NSFileCoordinatorReadingOptions, + writingURLs: &NSArray, + writingOptions: NSFileCoordinatorWritingOptions, + outError: *mut *mut NSError, + batchAccessor: TodoBlock, + ) { + msg_send![ + self, + prepareForReadingItemsAtURLs: readingURLs, + options: readingOptions, + writingItemsAtURLs: writingURLs, + options: writingOptions, + error: outError, + byAccessor: batchAccessor + ] + } + pub unsafe fn itemAtURL_willMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL) { + msg_send![self, itemAtURL: oldURL, willMoveToURL: newURL] + } + pub unsafe fn itemAtURL_didMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL) { + msg_send![self, itemAtURL: oldURL, didMoveToURL: newURL] + } + pub unsafe fn itemAtURL_didChangeUbiquityAttributes( + &self, + url: &NSURL, + attributes: &NSSet, + ) { + msg_send![ + self, + itemAtURL: url, + didChangeUbiquityAttributes: attributes + ] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } } - pub unsafe fn coordinateWritingItemAtURL_options_error_byAccessor( - &self, - url: &NSURL, - options: NSFileCoordinatorWritingOptions, - outError: *mut *mut NSError, - writer: TodoBlock, - ) { - msg_send![ - self, - coordinateWritingItemAtURL: url, - options: options, - error: outError, - byAccessor: writer - ] - } - pub unsafe fn coordinateReadingItemAtURL_options_writingItemAtURL_options_error_byAccessor( - &self, - readingURL: &NSURL, - readingOptions: NSFileCoordinatorReadingOptions, - writingURL: &NSURL, - writingOptions: NSFileCoordinatorWritingOptions, - outError: *mut *mut NSError, - readerWriter: TodoBlock, - ) { - msg_send![ - self, - coordinateReadingItemAtURL: readingURL, - options: readingOptions, - writingItemAtURL: writingURL, - options: writingOptions, - error: outError, - byAccessor: readerWriter - ] - } - pub unsafe fn coordinateWritingItemAtURL_options_writingItemAtURL_options_error_byAccessor( - &self, - url1: &NSURL, - options1: NSFileCoordinatorWritingOptions, - url2: &NSURL, - options2: NSFileCoordinatorWritingOptions, - outError: *mut *mut NSError, - writer: TodoBlock, - ) { - msg_send![ - self, - coordinateWritingItemAtURL: url1, - options: options1, - writingItemAtURL: url2, - options: options2, - error: outError, - byAccessor: writer - ] - } - pub unsafe fn prepareForReadingItemsAtURLs_options_writingItemsAtURLs_options_error_byAccessor( - &self, - readingURLs: &NSArray, - readingOptions: NSFileCoordinatorReadingOptions, - writingURLs: &NSArray, - writingOptions: NSFileCoordinatorWritingOptions, - outError: *mut *mut NSError, - batchAccessor: TodoBlock, - ) { - msg_send![ - self, - prepareForReadingItemsAtURLs: readingURLs, - options: readingOptions, - writingItemsAtURLs: writingURLs, - options: writingOptions, - error: outError, - byAccessor: batchAccessor - ] - } - pub unsafe fn itemAtURL_willMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL) { - msg_send![self, itemAtURL: oldURL, willMoveToURL: newURL] - } - pub unsafe fn itemAtURL_didMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL) { - msg_send![self, itemAtURL: oldURL, didMoveToURL: newURL] - } - pub unsafe fn itemAtURL_didChangeUbiquityAttributes( - &self, - url: &NSURL, - attributes: &NSSet, - ) { - msg_send![ - self, - itemAtURL: url, - didChangeUbiquityAttributes: attributes - ] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index d762ac320..df342edd6 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSFileHandle; @@ -18,190 +18,203 @@ extern_class!( type Super = NSObject; } ); -impl NSFileHandle { - pub unsafe fn availableData(&self) -> Id { - msg_send_id![self, availableData] +extern_methods!( + unsafe impl NSFileHandle { + pub unsafe fn availableData(&self) -> Id { + msg_send_id![self, availableData] + } + pub unsafe fn initWithFileDescriptor_closeOnDealloc( + &self, + fd: c_int, + closeopt: bool, + ) -> Id { + msg_send_id![self, initWithFileDescriptor: fd, closeOnDealloc: closeopt] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn readDataToEndOfFileAndReturnError( + &self, + ) -> Result, Id> { + msg_send_id![self, readDataToEndOfFileAndReturnError: _] + } + pub unsafe fn readDataUpToLength_error( + &self, + length: NSUInteger, + ) -> Result, Id> { + msg_send_id![self, readDataUpToLength: length, error: _] + } + pub unsafe fn writeData_error(&self, data: &NSData) -> Result<(), Id> { + msg_send![self, writeData: data, error: _] + } + pub unsafe fn getOffset_error( + &self, + offsetInFile: NonNull, + ) -> Result<(), Id> { + msg_send![self, getOffset: offsetInFile, error: _] + } + pub unsafe fn seekToEndReturningOffset_error( + &self, + offsetInFile: *mut c_ulonglong, + ) -> Result<(), Id> { + msg_send![self, seekToEndReturningOffset: offsetInFile, error: _] + } + pub unsafe fn seekToOffset_error( + &self, + offset: c_ulonglong, + ) -> Result<(), Id> { + msg_send![self, seekToOffset: offset, error: _] + } + pub unsafe fn truncateAtOffset_error( + &self, + offset: c_ulonglong, + ) -> Result<(), Id> { + msg_send![self, truncateAtOffset: offset, error: _] + } + pub unsafe fn synchronizeAndReturnError(&self) -> Result<(), Id> { + msg_send![self, synchronizeAndReturnError: _] + } + pub unsafe fn closeAndReturnError(&self) -> Result<(), Id> { + msg_send![self, closeAndReturnError: _] + } } - pub unsafe fn initWithFileDescriptor_closeOnDealloc( - &self, - fd: c_int, - closeopt: bool, - ) -> Id { - msg_send_id![self, initWithFileDescriptor: fd, closeOnDealloc: closeopt] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn readDataToEndOfFileAndReturnError( - &self, - ) -> Result, Id> { - msg_send_id![self, readDataToEndOfFileAndReturnError: _] - } - pub unsafe fn readDataUpToLength_error( - &self, - length: NSUInteger, - ) -> Result, Id> { - msg_send_id![self, readDataUpToLength: length, error: _] - } - pub unsafe fn writeData_error(&self, data: &NSData) -> Result<(), Id> { - msg_send![self, writeData: data, error: _] - } - pub unsafe fn getOffset_error( - &self, - offsetInFile: NonNull, - ) -> Result<(), Id> { - msg_send![self, getOffset: offsetInFile, error: _] - } - pub unsafe fn seekToEndReturningOffset_error( - &self, - offsetInFile: *mut c_ulonglong, - ) -> Result<(), Id> { - msg_send![self, seekToEndReturningOffset: offsetInFile, error: _] - } - pub unsafe fn seekToOffset_error( - &self, - offset: c_ulonglong, - ) -> Result<(), Id> { - msg_send![self, seekToOffset: offset, error: _] - } - pub unsafe fn truncateAtOffset_error( - &self, - offset: c_ulonglong, - ) -> Result<(), Id> { - msg_send![self, truncateAtOffset: offset, error: _] - } - pub unsafe fn synchronizeAndReturnError(&self) -> Result<(), Id> { - msg_send![self, synchronizeAndReturnError: _] - } - pub unsafe fn closeAndReturnError(&self) -> Result<(), Id> { - msg_send![self, closeAndReturnError: _] - } -} -#[doc = "NSFileHandleCreation"] -impl NSFileHandle { - pub unsafe fn fileHandleWithStandardInput() -> Id { - msg_send_id![Self::class(), fileHandleWithStandardInput] - } - pub unsafe fn fileHandleWithStandardOutput() -> Id { - msg_send_id![Self::class(), fileHandleWithStandardOutput] - } - pub unsafe fn fileHandleWithStandardError() -> Id { - msg_send_id![Self::class(), fileHandleWithStandardError] - } - pub unsafe fn fileHandleWithNullDevice() -> Id { - msg_send_id![Self::class(), fileHandleWithNullDevice] - } - pub unsafe fn fileHandleForReadingAtPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), fileHandleForReadingAtPath: path] - } - pub unsafe fn fileHandleForWritingAtPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), fileHandleForWritingAtPath: path] - } - pub unsafe fn fileHandleForUpdatingAtPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), fileHandleForUpdatingAtPath: path] - } - pub unsafe fn fileHandleForReadingFromURL_error( - url: &NSURL, - ) -> Result, Id> { - msg_send_id![Self::class(), fileHandleForReadingFromURL: url, error: _] - } - pub unsafe fn fileHandleForWritingToURL_error( - url: &NSURL, - ) -> Result, Id> { - msg_send_id![Self::class(), fileHandleForWritingToURL: url, error: _] - } - pub unsafe fn fileHandleForUpdatingURL_error( - url: &NSURL, - ) -> Result, Id> { - msg_send_id![Self::class(), fileHandleForUpdatingURL: url, error: _] - } -} -#[doc = "NSFileHandleAsynchronousAccess"] -impl NSFileHandle { - pub unsafe fn readInBackgroundAndNotifyForModes(&self, modes: Option<&NSArray>) { - msg_send![self, readInBackgroundAndNotifyForModes: modes] - } - pub unsafe fn readInBackgroundAndNotify(&self) { - msg_send![self, readInBackgroundAndNotify] - } - pub unsafe fn readToEndOfFileInBackgroundAndNotifyForModes( - &self, - modes: Option<&NSArray>, - ) { - msg_send![self, readToEndOfFileInBackgroundAndNotifyForModes: modes] - } - pub unsafe fn readToEndOfFileInBackgroundAndNotify(&self) { - msg_send![self, readToEndOfFileInBackgroundAndNotify] - } - pub unsafe fn acceptConnectionInBackgroundAndNotifyForModes( - &self, - modes: Option<&NSArray>, - ) { - msg_send![self, acceptConnectionInBackgroundAndNotifyForModes: modes] - } - pub unsafe fn acceptConnectionInBackgroundAndNotify(&self) { - msg_send![self, acceptConnectionInBackgroundAndNotify] - } - pub unsafe fn waitForDataInBackgroundAndNotifyForModes( - &self, - modes: Option<&NSArray>, - ) { - msg_send![self, waitForDataInBackgroundAndNotifyForModes: modes] - } - pub unsafe fn waitForDataInBackgroundAndNotify(&self) { - msg_send![self, waitForDataInBackgroundAndNotify] - } - pub unsafe fn readabilityHandler(&self) -> TodoBlock { - msg_send![self, readabilityHandler] - } - pub unsafe fn setReadabilityHandler(&self, readabilityHandler: TodoBlock) { - msg_send![self, setReadabilityHandler: readabilityHandler] - } - pub unsafe fn writeabilityHandler(&self) -> TodoBlock { - msg_send![self, writeabilityHandler] - } - pub unsafe fn setWriteabilityHandler(&self, writeabilityHandler: TodoBlock) { - msg_send![self, setWriteabilityHandler: writeabilityHandler] - } -} -#[doc = "NSFileHandlePlatformSpecific"] -impl NSFileHandle { - pub unsafe fn initWithFileDescriptor(&self, fd: c_int) -> Id { - msg_send_id![self, initWithFileDescriptor: fd] - } - pub unsafe fn fileDescriptor(&self) -> c_int { - msg_send![self, fileDescriptor] - } -} -impl NSFileHandle { - pub unsafe fn readDataToEndOfFile(&self) -> Id { - msg_send_id![self, readDataToEndOfFile] - } - pub unsafe fn readDataOfLength(&self, length: NSUInteger) -> Id { - msg_send_id![self, readDataOfLength: length] - } - pub unsafe fn writeData(&self, data: &NSData) { - msg_send![self, writeData: data] - } - pub unsafe fn offsetInFile(&self) -> c_ulonglong { - msg_send![self, offsetInFile] - } - pub unsafe fn seekToEndOfFile(&self) -> c_ulonglong { - msg_send![self, seekToEndOfFile] - } - pub unsafe fn seekToFileOffset(&self, offset: c_ulonglong) { - msg_send![self, seekToFileOffset: offset] +); +extern_methods!( + #[doc = "NSFileHandleCreation"] + unsafe impl NSFileHandle { + pub unsafe fn fileHandleWithStandardInput() -> Id { + msg_send_id![Self::class(), fileHandleWithStandardInput] + } + pub unsafe fn fileHandleWithStandardOutput() -> Id { + msg_send_id![Self::class(), fileHandleWithStandardOutput] + } + pub unsafe fn fileHandleWithStandardError() -> Id { + msg_send_id![Self::class(), fileHandleWithStandardError] + } + pub unsafe fn fileHandleWithNullDevice() -> Id { + msg_send_id![Self::class(), fileHandleWithNullDevice] + } + pub unsafe fn fileHandleForReadingAtPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), fileHandleForReadingAtPath: path] + } + pub unsafe fn fileHandleForWritingAtPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), fileHandleForWritingAtPath: path] + } + pub unsafe fn fileHandleForUpdatingAtPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), fileHandleForUpdatingAtPath: path] + } + pub unsafe fn fileHandleForReadingFromURL_error( + url: &NSURL, + ) -> Result, Id> { + msg_send_id![Self::class(), fileHandleForReadingFromURL: url, error: _] + } + pub unsafe fn fileHandleForWritingToURL_error( + url: &NSURL, + ) -> Result, Id> { + msg_send_id![Self::class(), fileHandleForWritingToURL: url, error: _] + } + pub unsafe fn fileHandleForUpdatingURL_error( + url: &NSURL, + ) -> Result, Id> { + msg_send_id![Self::class(), fileHandleForUpdatingURL: url, error: _] + } } - pub unsafe fn truncateFileAtOffset(&self, offset: c_ulonglong) { - msg_send![self, truncateFileAtOffset: offset] +); +extern_methods!( + #[doc = "NSFileHandleAsynchronousAccess"] + unsafe impl NSFileHandle { + pub unsafe fn readInBackgroundAndNotifyForModes( + &self, + modes: Option<&NSArray>, + ) { + msg_send![self, readInBackgroundAndNotifyForModes: modes] + } + pub unsafe fn readInBackgroundAndNotify(&self) { + msg_send![self, readInBackgroundAndNotify] + } + pub unsafe fn readToEndOfFileInBackgroundAndNotifyForModes( + &self, + modes: Option<&NSArray>, + ) { + msg_send![self, readToEndOfFileInBackgroundAndNotifyForModes: modes] + } + pub unsafe fn readToEndOfFileInBackgroundAndNotify(&self) { + msg_send![self, readToEndOfFileInBackgroundAndNotify] + } + pub unsafe fn acceptConnectionInBackgroundAndNotifyForModes( + &self, + modes: Option<&NSArray>, + ) { + msg_send![self, acceptConnectionInBackgroundAndNotifyForModes: modes] + } + pub unsafe fn acceptConnectionInBackgroundAndNotify(&self) { + msg_send![self, acceptConnectionInBackgroundAndNotify] + } + pub unsafe fn waitForDataInBackgroundAndNotifyForModes( + &self, + modes: Option<&NSArray>, + ) { + msg_send![self, waitForDataInBackgroundAndNotifyForModes: modes] + } + pub unsafe fn waitForDataInBackgroundAndNotify(&self) { + msg_send![self, waitForDataInBackgroundAndNotify] + } + pub unsafe fn readabilityHandler(&self) -> TodoBlock { + msg_send![self, readabilityHandler] + } + pub unsafe fn setReadabilityHandler(&self, readabilityHandler: TodoBlock) { + msg_send![self, setReadabilityHandler: readabilityHandler] + } + pub unsafe fn writeabilityHandler(&self) -> TodoBlock { + msg_send![self, writeabilityHandler] + } + pub unsafe fn setWriteabilityHandler(&self, writeabilityHandler: TodoBlock) { + msg_send![self, setWriteabilityHandler: writeabilityHandler] + } } - pub unsafe fn synchronizeFile(&self) { - msg_send![self, synchronizeFile] +); +extern_methods!( + #[doc = "NSFileHandlePlatformSpecific"] + unsafe impl NSFileHandle { + pub unsafe fn initWithFileDescriptor(&self, fd: c_int) -> Id { + msg_send_id![self, initWithFileDescriptor: fd] + } + pub unsafe fn fileDescriptor(&self) -> c_int { + msg_send![self, fileDescriptor] + } } - pub unsafe fn closeFile(&self) { - msg_send![self, closeFile] +); +extern_methods!( + unsafe impl NSFileHandle { + pub unsafe fn readDataToEndOfFile(&self) -> Id { + msg_send_id![self, readDataToEndOfFile] + } + pub unsafe fn readDataOfLength(&self, length: NSUInteger) -> Id { + msg_send_id![self, readDataOfLength: length] + } + pub unsafe fn writeData(&self, data: &NSData) { + msg_send![self, writeData: data] + } + pub unsafe fn offsetInFile(&self) -> c_ulonglong { + msg_send![self, offsetInFile] + } + pub unsafe fn seekToEndOfFile(&self) -> c_ulonglong { + msg_send![self, seekToEndOfFile] + } + pub unsafe fn seekToFileOffset(&self, offset: c_ulonglong) { + msg_send![self, seekToFileOffset: offset] + } + pub unsafe fn truncateFileAtOffset(&self, offset: c_ulonglong) { + msg_send![self, truncateFileAtOffset: offset] + } + pub unsafe fn synchronizeFile(&self) { + msg_send![self, synchronizeFile] + } + pub unsafe fn closeFile(&self) { + msg_send![self, closeFile] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSPipe; @@ -209,14 +222,16 @@ extern_class!( type Super = NSObject; } ); -impl NSPipe { - pub unsafe fn fileHandleForReading(&self) -> Id { - msg_send_id![self, fileHandleForReading] +extern_methods!( + unsafe impl NSPipe { + pub unsafe fn fileHandleForReading(&self) -> Id { + msg_send_id![self, fileHandleForReading] + } + pub unsafe fn fileHandleForWriting(&self) -> Id { + msg_send_id![self, fileHandleForWriting] + } + pub unsafe fn pipe() -> Id { + msg_send_id![Self::class(), pipe] + } } - pub unsafe fn fileHandleForWriting(&self) -> Id { - msg_send_id![self, fileHandleForWriting] - } - pub unsafe fn pipe() -> Id { - msg_send_id![Self::class(), pipe] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index dfba5883c..11207c9b2 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -17,7 +17,7 @@ use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSFileAttributeKey = NSString; pub type NSFileAttributeType = NSString; pub type NSFileProtectionType = NSString; @@ -29,542 +29,563 @@ extern_class!( type Super = NSObject; } ); -impl NSFileManager { - pub unsafe fn defaultManager() -> Id { - msg_send_id![Self::class(), defaultManager] +extern_methods!( + unsafe impl NSFileManager { + pub unsafe fn defaultManager() -> Id { + msg_send_id![Self::class(), defaultManager] + } + pub unsafe fn mountedVolumeURLsIncludingResourceValuesForKeys_options( + &self, + propertyKeys: Option<&NSArray>, + options: NSVolumeEnumerationOptions, + ) -> Option, Shared>> { + msg_send_id![ + self, + mountedVolumeURLsIncludingResourceValuesForKeys: propertyKeys, + options: options + ] + } + pub unsafe fn unmountVolumeAtURL_options_completionHandler( + &self, + url: &NSURL, + mask: NSFileManagerUnmountOptions, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + unmountVolumeAtURL: url, + options: mask, + completionHandler: completionHandler + ] + } + pub unsafe fn contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error( + &self, + url: &NSURL, + keys: Option<&NSArray>, + mask: NSDirectoryEnumerationOptions, + ) -> Result, Shared>, Id> { + msg_send_id![ + self, + contentsOfDirectoryAtURL: url, + includingPropertiesForKeys: keys, + options: mask, + error: _ + ] + } + pub unsafe fn URLsForDirectory_inDomains( + &self, + directory: NSSearchPathDirectory, + domainMask: NSSearchPathDomainMask, + ) -> Id, Shared> { + msg_send_id![self, URLsForDirectory: directory, inDomains: domainMask] + } + pub unsafe fn URLForDirectory_inDomain_appropriateForURL_create_error( + &self, + directory: NSSearchPathDirectory, + domain: NSSearchPathDomainMask, + url: Option<&NSURL>, + shouldCreate: bool, + ) -> Result, Id> { + msg_send_id![ + self, + URLForDirectory: directory, + inDomain: domain, + appropriateForURL: url, + create: shouldCreate, + error: _ + ] + } + pub unsafe fn getRelationship_ofDirectoryAtURL_toItemAtURL_error( + &self, + outRelationship: NonNull, + directoryURL: &NSURL, + otherURL: &NSURL, + ) -> Result<(), Id> { + msg_send![ + self, + getRelationship: outRelationship, + ofDirectoryAtURL: directoryURL, + toItemAtURL: otherURL, + error: _ + ] + } + pub unsafe fn getRelationship_ofDirectory_inDomain_toItemAtURL_error( + &self, + outRelationship: NonNull, + directory: NSSearchPathDirectory, + domainMask: NSSearchPathDomainMask, + url: &NSURL, + ) -> Result<(), Id> { + msg_send![ + self, + getRelationship: outRelationship, + ofDirectory: directory, + inDomain: domainMask, + toItemAtURL: url, + error: _ + ] + } + pub unsafe fn createDirectoryAtURL_withIntermediateDirectories_attributes_error( + &self, + url: &NSURL, + createIntermediates: bool, + attributes: Option<&NSDictionary>, + ) -> Result<(), Id> { + msg_send![ + self, + createDirectoryAtURL: url, + withIntermediateDirectories: createIntermediates, + attributes: attributes, + error: _ + ] + } + pub unsafe fn createSymbolicLinkAtURL_withDestinationURL_error( + &self, + url: &NSURL, + destURL: &NSURL, + ) -> Result<(), Id> { + msg_send![ + self, + createSymbolicLinkAtURL: url, + withDestinationURL: destURL, + error: _ + ] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSFileManagerDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn setAttributes_ofItemAtPath_error( + &self, + attributes: &NSDictionary, + path: &NSString, + ) -> Result<(), Id> { + msg_send![ + self, + setAttributes: attributes, + ofItemAtPath: path, + error: _ + ] + } + pub unsafe fn createDirectoryAtPath_withIntermediateDirectories_attributes_error( + &self, + path: &NSString, + createIntermediates: bool, + attributes: Option<&NSDictionary>, + ) -> Result<(), Id> { + msg_send![ + self, + createDirectoryAtPath: path, + withIntermediateDirectories: createIntermediates, + attributes: attributes, + error: _ + ] + } + pub unsafe fn contentsOfDirectoryAtPath_error( + &self, + path: &NSString, + ) -> Result, Shared>, Id> { + msg_send_id![self, contentsOfDirectoryAtPath: path, error: _] + } + pub unsafe fn subpathsOfDirectoryAtPath_error( + &self, + path: &NSString, + ) -> Result, Shared>, Id> { + msg_send_id![self, subpathsOfDirectoryAtPath: path, error: _] + } + pub unsafe fn attributesOfItemAtPath_error( + &self, + path: &NSString, + ) -> Result, Shared>, Id> + { + msg_send_id![self, attributesOfItemAtPath: path, error: _] + } + pub unsafe fn attributesOfFileSystemForPath_error( + &self, + path: &NSString, + ) -> Result, Shared>, Id> + { + msg_send_id![self, attributesOfFileSystemForPath: path, error: _] + } + pub unsafe fn createSymbolicLinkAtPath_withDestinationPath_error( + &self, + path: &NSString, + destPath: &NSString, + ) -> Result<(), Id> { + msg_send![ + self, + createSymbolicLinkAtPath: path, + withDestinationPath: destPath, + error: _ + ] + } + pub unsafe fn destinationOfSymbolicLinkAtPath_error( + &self, + path: &NSString, + ) -> Result, Id> { + msg_send_id![self, destinationOfSymbolicLinkAtPath: path, error: _] + } + pub unsafe fn copyItemAtPath_toPath_error( + &self, + srcPath: &NSString, + dstPath: &NSString, + ) -> Result<(), Id> { + msg_send![self, copyItemAtPath: srcPath, toPath: dstPath, error: _] + } + pub unsafe fn moveItemAtPath_toPath_error( + &self, + srcPath: &NSString, + dstPath: &NSString, + ) -> Result<(), Id> { + msg_send![self, moveItemAtPath: srcPath, toPath: dstPath, error: _] + } + pub unsafe fn linkItemAtPath_toPath_error( + &self, + srcPath: &NSString, + dstPath: &NSString, + ) -> Result<(), Id> { + msg_send![self, linkItemAtPath: srcPath, toPath: dstPath, error: _] + } + pub unsafe fn removeItemAtPath_error( + &self, + path: &NSString, + ) -> Result<(), Id> { + msg_send![self, removeItemAtPath: path, error: _] + } + pub unsafe fn copyItemAtURL_toURL_error( + &self, + srcURL: &NSURL, + dstURL: &NSURL, + ) -> Result<(), Id> { + msg_send![self, copyItemAtURL: srcURL, toURL: dstURL, error: _] + } + pub unsafe fn moveItemAtURL_toURL_error( + &self, + srcURL: &NSURL, + dstURL: &NSURL, + ) -> Result<(), Id> { + msg_send![self, moveItemAtURL: srcURL, toURL: dstURL, error: _] + } + pub unsafe fn linkItemAtURL_toURL_error( + &self, + srcURL: &NSURL, + dstURL: &NSURL, + ) -> Result<(), Id> { + msg_send![self, linkItemAtURL: srcURL, toURL: dstURL, error: _] + } + pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL) -> Result<(), Id> { + msg_send![self, removeItemAtURL: URL, error: _] + } + pub unsafe fn trashItemAtURL_resultingItemURL_error( + &self, + url: &NSURL, + outResultingURL: Option<&mut Option>>, + ) -> Result<(), Id> { + msg_send![ + self, + trashItemAtURL: url, + resultingItemURL: outResultingURL, + error: _ + ] + } + pub unsafe fn fileAttributesAtPath_traverseLink( + &self, + path: &NSString, + yorn: bool, + ) -> Option> { + msg_send_id![self, fileAttributesAtPath: path, traverseLink: yorn] + } + pub unsafe fn changeFileAttributes_atPath( + &self, + attributes: &NSDictionary, + path: &NSString, + ) -> bool { + msg_send![self, changeFileAttributes: attributes, atPath: path] + } + pub unsafe fn directoryContentsAtPath( + &self, + path: &NSString, + ) -> Option> { + msg_send_id![self, directoryContentsAtPath: path] + } + pub unsafe fn fileSystemAttributesAtPath( + &self, + path: &NSString, + ) -> Option> { + msg_send_id![self, fileSystemAttributesAtPath: path] + } + pub unsafe fn pathContentOfSymbolicLinkAtPath( + &self, + path: &NSString, + ) -> Option> { + msg_send_id![self, pathContentOfSymbolicLinkAtPath: path] + } + pub unsafe fn createSymbolicLinkAtPath_pathContent( + &self, + path: &NSString, + otherpath: &NSString, + ) -> bool { + msg_send![self, createSymbolicLinkAtPath: path, pathContent: otherpath] + } + pub unsafe fn createDirectoryAtPath_attributes( + &self, + path: &NSString, + attributes: &NSDictionary, + ) -> bool { + msg_send![self, createDirectoryAtPath: path, attributes: attributes] + } + pub unsafe fn linkPath_toPath_handler( + &self, + src: &NSString, + dest: &NSString, + handler: Option<&Object>, + ) -> bool { + msg_send![self, linkPath: src, toPath: dest, handler: handler] + } + pub unsafe fn copyPath_toPath_handler( + &self, + src: &NSString, + dest: &NSString, + handler: Option<&Object>, + ) -> bool { + msg_send![self, copyPath: src, toPath: dest, handler: handler] + } + pub unsafe fn movePath_toPath_handler( + &self, + src: &NSString, + dest: &NSString, + handler: Option<&Object>, + ) -> bool { + msg_send![self, movePath: src, toPath: dest, handler: handler] + } + pub unsafe fn removeFileAtPath_handler( + &self, + path: &NSString, + handler: Option<&Object>, + ) -> bool { + msg_send![self, removeFileAtPath: path, handler: handler] + } + pub unsafe fn currentDirectoryPath(&self) -> Id { + msg_send_id![self, currentDirectoryPath] + } + pub unsafe fn changeCurrentDirectoryPath(&self, path: &NSString) -> bool { + msg_send![self, changeCurrentDirectoryPath: path] + } + pub unsafe fn fileExistsAtPath(&self, path: &NSString) -> bool { + msg_send![self, fileExistsAtPath: path] + } + pub unsafe fn fileExistsAtPath_isDirectory( + &self, + path: &NSString, + isDirectory: *mut bool, + ) -> bool { + msg_send![self, fileExistsAtPath: path, isDirectory: isDirectory] + } + pub unsafe fn isReadableFileAtPath(&self, path: &NSString) -> bool { + msg_send![self, isReadableFileAtPath: path] + } + pub unsafe fn isWritableFileAtPath(&self, path: &NSString) -> bool { + msg_send![self, isWritableFileAtPath: path] + } + pub unsafe fn isExecutableFileAtPath(&self, path: &NSString) -> bool { + msg_send![self, isExecutableFileAtPath: path] + } + pub unsafe fn isDeletableFileAtPath(&self, path: &NSString) -> bool { + msg_send![self, isDeletableFileAtPath: path] + } + pub unsafe fn contentsEqualAtPath_andPath( + &self, + path1: &NSString, + path2: &NSString, + ) -> bool { + msg_send![self, contentsEqualAtPath: path1, andPath: path2] + } + pub unsafe fn displayNameAtPath(&self, path: &NSString) -> Id { + msg_send_id![self, displayNameAtPath: path] + } + pub unsafe fn componentsToDisplayForPath( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, componentsToDisplayForPath: path] + } + pub unsafe fn enumeratorAtPath( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, enumeratorAtPath: path] + } + pub unsafe fn enumeratorAtURL_includingPropertiesForKeys_options_errorHandler( + &self, + url: &NSURL, + keys: Option<&NSArray>, + mask: NSDirectoryEnumerationOptions, + handler: TodoBlock, + ) -> Option, Shared>> { + msg_send_id![ + self, + enumeratorAtURL: url, + includingPropertiesForKeys: keys, + options: mask, + errorHandler: handler + ] + } + pub unsafe fn subpathsAtPath( + &self, + path: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, subpathsAtPath: path] + } + pub unsafe fn contentsAtPath(&self, path: &NSString) -> Option> { + msg_send_id![self, contentsAtPath: path] + } + pub unsafe fn createFileAtPath_contents_attributes( + &self, + path: &NSString, + data: Option<&NSData>, + attr: Option<&NSDictionary>, + ) -> bool { + msg_send![ + self, + createFileAtPath: path, + contents: data, + attributes: attr + ] + } + pub unsafe fn fileSystemRepresentationWithPath(&self, path: &NSString) -> NonNull { + msg_send![self, fileSystemRepresentationWithPath: path] + } + pub unsafe fn stringWithFileSystemRepresentation_length( + &self, + str: NonNull, + len: NSUInteger, + ) -> Id { + msg_send_id![self, stringWithFileSystemRepresentation: str, length: len] + } + pub unsafe fn replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error( + &self, + originalItemURL: &NSURL, + newItemURL: &NSURL, + backupItemName: Option<&NSString>, + options: NSFileManagerItemReplacementOptions, + resultingURL: Option<&mut Option>>, + ) -> Result<(), Id> { + msg_send![ + self, + replaceItemAtURL: originalItemURL, + withItemAtURL: newItemURL, + backupItemName: backupItemName, + options: options, + resultingItemURL: resultingURL, + error: _ + ] + } + pub unsafe fn setUbiquitous_itemAtURL_destinationURL_error( + &self, + flag: bool, + url: &NSURL, + destinationURL: &NSURL, + ) -> Result<(), Id> { + msg_send![ + self, + setUbiquitous: flag, + itemAtURL: url, + destinationURL: destinationURL, + error: _ + ] + } + pub unsafe fn isUbiquitousItemAtURL(&self, url: &NSURL) -> bool { + msg_send![self, isUbiquitousItemAtURL: url] + } + pub unsafe fn startDownloadingUbiquitousItemAtURL_error( + &self, + url: &NSURL, + ) -> Result<(), Id> { + msg_send![self, startDownloadingUbiquitousItemAtURL: url, error: _] + } + pub unsafe fn evictUbiquitousItemAtURL_error( + &self, + url: &NSURL, + ) -> Result<(), Id> { + msg_send![self, evictUbiquitousItemAtURL: url, error: _] + } + pub unsafe fn URLForUbiquityContainerIdentifier( + &self, + containerIdentifier: Option<&NSString>, + ) -> Option> { + msg_send_id![self, URLForUbiquityContainerIdentifier: containerIdentifier] + } + pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( + &self, + url: &NSURL, + outDate: Option<&mut Option>>, + ) -> Result, Id> { + msg_send_id![ + self, + URLForPublishingUbiquitousItemAtURL: url, + expirationDate: outDate, + error: _ + ] + } + pub unsafe fn ubiquityIdentityToken(&self) -> Option> { + msg_send_id![self, ubiquityIdentityToken] + } + pub unsafe fn getFileProviderServicesForItemAtURL_completionHandler( + &self, + url: &NSURL, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getFileProviderServicesForItemAtURL: url, + completionHandler: completionHandler + ] + } + pub unsafe fn containerURLForSecurityApplicationGroupIdentifier( + &self, + groupIdentifier: &NSString, + ) -> Option> { + msg_send_id![ + self, + containerURLForSecurityApplicationGroupIdentifier: groupIdentifier + ] + } } - pub unsafe fn mountedVolumeURLsIncludingResourceValuesForKeys_options( - &self, - propertyKeys: Option<&NSArray>, - options: NSVolumeEnumerationOptions, - ) -> Option, Shared>> { - msg_send_id![ - self, - mountedVolumeURLsIncludingResourceValuesForKeys: propertyKeys, - options: options - ] - } - pub unsafe fn unmountVolumeAtURL_options_completionHandler( - &self, - url: &NSURL, - mask: NSFileManagerUnmountOptions, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - unmountVolumeAtURL: url, - options: mask, - completionHandler: completionHandler - ] - } - pub unsafe fn contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error( - &self, - url: &NSURL, - keys: Option<&NSArray>, - mask: NSDirectoryEnumerationOptions, - ) -> Result, Shared>, Id> { - msg_send_id![ - self, - contentsOfDirectoryAtURL: url, - includingPropertiesForKeys: keys, - options: mask, - error: _ - ] - } - pub unsafe fn URLsForDirectory_inDomains( - &self, - directory: NSSearchPathDirectory, - domainMask: NSSearchPathDomainMask, - ) -> Id, Shared> { - msg_send_id![self, URLsForDirectory: directory, inDomains: domainMask] - } - pub unsafe fn URLForDirectory_inDomain_appropriateForURL_create_error( - &self, - directory: NSSearchPathDirectory, - domain: NSSearchPathDomainMask, - url: Option<&NSURL>, - shouldCreate: bool, - ) -> Result, Id> { - msg_send_id![ - self, - URLForDirectory: directory, - inDomain: domain, - appropriateForURL: url, - create: shouldCreate, - error: _ - ] - } - pub unsafe fn getRelationship_ofDirectoryAtURL_toItemAtURL_error( - &self, - outRelationship: NonNull, - directoryURL: &NSURL, - otherURL: &NSURL, - ) -> Result<(), Id> { - msg_send![ - self, - getRelationship: outRelationship, - ofDirectoryAtURL: directoryURL, - toItemAtURL: otherURL, - error: _ - ] - } - pub unsafe fn getRelationship_ofDirectory_inDomain_toItemAtURL_error( - &self, - outRelationship: NonNull, - directory: NSSearchPathDirectory, - domainMask: NSSearchPathDomainMask, - url: &NSURL, - ) -> Result<(), Id> { - msg_send![ - self, - getRelationship: outRelationship, - ofDirectory: directory, - inDomain: domainMask, - toItemAtURL: url, - error: _ - ] - } - pub unsafe fn createDirectoryAtURL_withIntermediateDirectories_attributes_error( - &self, - url: &NSURL, - createIntermediates: bool, - attributes: Option<&NSDictionary>, - ) -> Result<(), Id> { - msg_send![ - self, - createDirectoryAtURL: url, - withIntermediateDirectories: createIntermediates, - attributes: attributes, - error: _ - ] - } - pub unsafe fn createSymbolicLinkAtURL_withDestinationURL_error( - &self, - url: &NSURL, - destURL: &NSURL, - ) -> Result<(), Id> { - msg_send![ - self, - createSymbolicLinkAtURL: url, - withDestinationURL: destURL, - error: _ - ] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSFileManagerDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn setAttributes_ofItemAtPath_error( - &self, - attributes: &NSDictionary, - path: &NSString, - ) -> Result<(), Id> { - msg_send![ - self, - setAttributes: attributes, - ofItemAtPath: path, - error: _ - ] - } - pub unsafe fn createDirectoryAtPath_withIntermediateDirectories_attributes_error( - &self, - path: &NSString, - createIntermediates: bool, - attributes: Option<&NSDictionary>, - ) -> Result<(), Id> { - msg_send![ - self, - createDirectoryAtPath: path, - withIntermediateDirectories: createIntermediates, - attributes: attributes, - error: _ - ] - } - pub unsafe fn contentsOfDirectoryAtPath_error( - &self, - path: &NSString, - ) -> Result, Shared>, Id> { - msg_send_id![self, contentsOfDirectoryAtPath: path, error: _] - } - pub unsafe fn subpathsOfDirectoryAtPath_error( - &self, - path: &NSString, - ) -> Result, Shared>, Id> { - msg_send_id![self, subpathsOfDirectoryAtPath: path, error: _] - } - pub unsafe fn attributesOfItemAtPath_error( - &self, - path: &NSString, - ) -> Result, Shared>, Id> { - msg_send_id![self, attributesOfItemAtPath: path, error: _] - } - pub unsafe fn attributesOfFileSystemForPath_error( - &self, - path: &NSString, - ) -> Result, Shared>, Id> { - msg_send_id![self, attributesOfFileSystemForPath: path, error: _] - } - pub unsafe fn createSymbolicLinkAtPath_withDestinationPath_error( - &self, - path: &NSString, - destPath: &NSString, - ) -> Result<(), Id> { - msg_send![ - self, - createSymbolicLinkAtPath: path, - withDestinationPath: destPath, - error: _ - ] - } - pub unsafe fn destinationOfSymbolicLinkAtPath_error( - &self, - path: &NSString, - ) -> Result, Id> { - msg_send_id![self, destinationOfSymbolicLinkAtPath: path, error: _] - } - pub unsafe fn copyItemAtPath_toPath_error( - &self, - srcPath: &NSString, - dstPath: &NSString, - ) -> Result<(), Id> { - msg_send![self, copyItemAtPath: srcPath, toPath: dstPath, error: _] - } - pub unsafe fn moveItemAtPath_toPath_error( - &self, - srcPath: &NSString, - dstPath: &NSString, - ) -> Result<(), Id> { - msg_send![self, moveItemAtPath: srcPath, toPath: dstPath, error: _] - } - pub unsafe fn linkItemAtPath_toPath_error( - &self, - srcPath: &NSString, - dstPath: &NSString, - ) -> Result<(), Id> { - msg_send![self, linkItemAtPath: srcPath, toPath: dstPath, error: _] - } - pub unsafe fn removeItemAtPath_error( - &self, - path: &NSString, - ) -> Result<(), Id> { - msg_send![self, removeItemAtPath: path, error: _] - } - pub unsafe fn copyItemAtURL_toURL_error( - &self, - srcURL: &NSURL, - dstURL: &NSURL, - ) -> Result<(), Id> { - msg_send![self, copyItemAtURL: srcURL, toURL: dstURL, error: _] - } - pub unsafe fn moveItemAtURL_toURL_error( - &self, - srcURL: &NSURL, - dstURL: &NSURL, - ) -> Result<(), Id> { - msg_send![self, moveItemAtURL: srcURL, toURL: dstURL, error: _] - } - pub unsafe fn linkItemAtURL_toURL_error( - &self, - srcURL: &NSURL, - dstURL: &NSURL, - ) -> Result<(), Id> { - msg_send![self, linkItemAtURL: srcURL, toURL: dstURL, error: _] - } - pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL) -> Result<(), Id> { - msg_send![self, removeItemAtURL: URL, error: _] - } - pub unsafe fn trashItemAtURL_resultingItemURL_error( - &self, - url: &NSURL, - outResultingURL: Option<&mut Option>>, - ) -> Result<(), Id> { - msg_send![ - self, - trashItemAtURL: url, - resultingItemURL: outResultingURL, - error: _ - ] - } - pub unsafe fn fileAttributesAtPath_traverseLink( - &self, - path: &NSString, - yorn: bool, - ) -> Option> { - msg_send_id![self, fileAttributesAtPath: path, traverseLink: yorn] - } - pub unsafe fn changeFileAttributes_atPath( - &self, - attributes: &NSDictionary, - path: &NSString, - ) -> bool { - msg_send![self, changeFileAttributes: attributes, atPath: path] - } - pub unsafe fn directoryContentsAtPath(&self, path: &NSString) -> Option> { - msg_send_id![self, directoryContentsAtPath: path] - } - pub unsafe fn fileSystemAttributesAtPath( - &self, - path: &NSString, - ) -> Option> { - msg_send_id![self, fileSystemAttributesAtPath: path] - } - pub unsafe fn pathContentOfSymbolicLinkAtPath( - &self, - path: &NSString, - ) -> Option> { - msg_send_id![self, pathContentOfSymbolicLinkAtPath: path] - } - pub unsafe fn createSymbolicLinkAtPath_pathContent( - &self, - path: &NSString, - otherpath: &NSString, - ) -> bool { - msg_send![self, createSymbolicLinkAtPath: path, pathContent: otherpath] - } - pub unsafe fn createDirectoryAtPath_attributes( - &self, - path: &NSString, - attributes: &NSDictionary, - ) -> bool { - msg_send![self, createDirectoryAtPath: path, attributes: attributes] - } - pub unsafe fn linkPath_toPath_handler( - &self, - src: &NSString, - dest: &NSString, - handler: Option<&Object>, - ) -> bool { - msg_send![self, linkPath: src, toPath: dest, handler: handler] - } - pub unsafe fn copyPath_toPath_handler( - &self, - src: &NSString, - dest: &NSString, - handler: Option<&Object>, - ) -> bool { - msg_send![self, copyPath: src, toPath: dest, handler: handler] - } - pub unsafe fn movePath_toPath_handler( - &self, - src: &NSString, - dest: &NSString, - handler: Option<&Object>, - ) -> bool { - msg_send![self, movePath: src, toPath: dest, handler: handler] - } - pub unsafe fn removeFileAtPath_handler( - &self, - path: &NSString, - handler: Option<&Object>, - ) -> bool { - msg_send![self, removeFileAtPath: path, handler: handler] - } - pub unsafe fn currentDirectoryPath(&self) -> Id { - msg_send_id![self, currentDirectoryPath] - } - pub unsafe fn changeCurrentDirectoryPath(&self, path: &NSString) -> bool { - msg_send![self, changeCurrentDirectoryPath: path] - } - pub unsafe fn fileExistsAtPath(&self, path: &NSString) -> bool { - msg_send![self, fileExistsAtPath: path] - } - pub unsafe fn fileExistsAtPath_isDirectory( - &self, - path: &NSString, - isDirectory: *mut bool, - ) -> bool { - msg_send![self, fileExistsAtPath: path, isDirectory: isDirectory] - } - pub unsafe fn isReadableFileAtPath(&self, path: &NSString) -> bool { - msg_send![self, isReadableFileAtPath: path] - } - pub unsafe fn isWritableFileAtPath(&self, path: &NSString) -> bool { - msg_send![self, isWritableFileAtPath: path] - } - pub unsafe fn isExecutableFileAtPath(&self, path: &NSString) -> bool { - msg_send![self, isExecutableFileAtPath: path] - } - pub unsafe fn isDeletableFileAtPath(&self, path: &NSString) -> bool { - msg_send![self, isDeletableFileAtPath: path] - } - pub unsafe fn contentsEqualAtPath_andPath(&self, path1: &NSString, path2: &NSString) -> bool { - msg_send![self, contentsEqualAtPath: path1, andPath: path2] - } - pub unsafe fn displayNameAtPath(&self, path: &NSString) -> Id { - msg_send_id![self, displayNameAtPath: path] - } - pub unsafe fn componentsToDisplayForPath( - &self, - path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, componentsToDisplayForPath: path] - } - pub unsafe fn enumeratorAtPath( - &self, - path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, enumeratorAtPath: path] - } - pub unsafe fn enumeratorAtURL_includingPropertiesForKeys_options_errorHandler( - &self, - url: &NSURL, - keys: Option<&NSArray>, - mask: NSDirectoryEnumerationOptions, - handler: TodoBlock, - ) -> Option, Shared>> { - msg_send_id![ - self, - enumeratorAtURL: url, - includingPropertiesForKeys: keys, - options: mask, - errorHandler: handler - ] - } - pub unsafe fn subpathsAtPath(&self, path: &NSString) -> Option, Shared>> { - msg_send_id![self, subpathsAtPath: path] - } - pub unsafe fn contentsAtPath(&self, path: &NSString) -> Option> { - msg_send_id![self, contentsAtPath: path] - } - pub unsafe fn createFileAtPath_contents_attributes( - &self, - path: &NSString, - data: Option<&NSData>, - attr: Option<&NSDictionary>, - ) -> bool { - msg_send![ - self, - createFileAtPath: path, - contents: data, - attributes: attr - ] - } - pub unsafe fn fileSystemRepresentationWithPath(&self, path: &NSString) -> NonNull { - msg_send![self, fileSystemRepresentationWithPath: path] - } - pub unsafe fn stringWithFileSystemRepresentation_length( - &self, - str: NonNull, - len: NSUInteger, - ) -> Id { - msg_send_id![self, stringWithFileSystemRepresentation: str, length: len] - } - pub unsafe fn replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error( - &self, - originalItemURL: &NSURL, - newItemURL: &NSURL, - backupItemName: Option<&NSString>, - options: NSFileManagerItemReplacementOptions, - resultingURL: Option<&mut Option>>, - ) -> Result<(), Id> { - msg_send![ - self, - replaceItemAtURL: originalItemURL, - withItemAtURL: newItemURL, - backupItemName: backupItemName, - options: options, - resultingItemURL: resultingURL, - error: _ - ] - } - pub unsafe fn setUbiquitous_itemAtURL_destinationURL_error( - &self, - flag: bool, - url: &NSURL, - destinationURL: &NSURL, - ) -> Result<(), Id> { - msg_send![ - self, - setUbiquitous: flag, - itemAtURL: url, - destinationURL: destinationURL, - error: _ - ] - } - pub unsafe fn isUbiquitousItemAtURL(&self, url: &NSURL) -> bool { - msg_send![self, isUbiquitousItemAtURL: url] - } - pub unsafe fn startDownloadingUbiquitousItemAtURL_error( - &self, - url: &NSURL, - ) -> Result<(), Id> { - msg_send![self, startDownloadingUbiquitousItemAtURL: url, error: _] - } - pub unsafe fn evictUbiquitousItemAtURL_error( - &self, - url: &NSURL, - ) -> Result<(), Id> { - msg_send![self, evictUbiquitousItemAtURL: url, error: _] - } - pub unsafe fn URLForUbiquityContainerIdentifier( - &self, - containerIdentifier: Option<&NSString>, - ) -> Option> { - msg_send_id![self, URLForUbiquityContainerIdentifier: containerIdentifier] - } - pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( - &self, - url: &NSURL, - outDate: Option<&mut Option>>, - ) -> Result, Id> { - msg_send_id![ - self, - URLForPublishingUbiquitousItemAtURL: url, - expirationDate: outDate, - error: _ - ] - } - pub unsafe fn ubiquityIdentityToken(&self) -> Option> { - msg_send_id![self, ubiquityIdentityToken] - } - pub unsafe fn getFileProviderServicesForItemAtURL_completionHandler( - &self, - url: &NSURL, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - getFileProviderServicesForItemAtURL: url, - completionHandler: completionHandler - ] - } - pub unsafe fn containerURLForSecurityApplicationGroupIdentifier( - &self, - groupIdentifier: &NSString, - ) -> Option> { - msg_send_id![ - self, - containerURLForSecurityApplicationGroupIdentifier: groupIdentifier - ] - } -} -#[doc = "NSUserInformation"] -impl NSFileManager { - pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id { - msg_send_id![self, homeDirectoryForCurrentUser] - } - pub unsafe fn temporaryDirectory(&self) -> Id { - msg_send_id![self, temporaryDirectory] - } - pub unsafe fn homeDirectoryForUser(&self, userName: &NSString) -> Option> { - msg_send_id![self, homeDirectoryForUser: userName] - } -} -#[doc = "NSCopyLinkMoveHandler"] -impl NSObject { - pub unsafe fn fileManager_shouldProceedAfterError( - &self, - fm: &NSFileManager, - errorInfo: &NSDictionary, - ) -> bool { - msg_send![self, fileManager: fm, shouldProceedAfterError: errorInfo] +); +extern_methods!( + #[doc = "NSUserInformation"] + unsafe impl NSFileManager { + pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id { + msg_send_id![self, homeDirectoryForCurrentUser] + } + pub unsafe fn temporaryDirectory(&self) -> Id { + msg_send_id![self, temporaryDirectory] + } + pub unsafe fn homeDirectoryForUser( + &self, + userName: &NSString, + ) -> Option> { + msg_send_id![self, homeDirectoryForUser: userName] + } } - pub unsafe fn fileManager_willProcessPath(&self, fm: &NSFileManager, path: &NSString) { - msg_send![self, fileManager: fm, willProcessPath: path] +); +extern_methods!( + #[doc = "NSCopyLinkMoveHandler"] + unsafe impl NSObject { + pub unsafe fn fileManager_shouldProceedAfterError( + &self, + fm: &NSFileManager, + errorInfo: &NSDictionary, + ) -> bool { + msg_send![self, fileManager: fm, shouldProceedAfterError: errorInfo] + } + pub unsafe fn fileManager_willProcessPath(&self, fm: &NSFileManager, path: &NSString) { + msg_send![self, fileManager: fm, willProcessPath: path] + } } -} +); pub type NSFileManagerDelegate = NSObject; __inner_extern_class!( #[derive(Debug)] @@ -573,30 +594,32 @@ __inner_extern_class!( type Super = NSEnumerator; } ); -impl NSDirectoryEnumerator { - pub unsafe fn fileAttributes( - &self, - ) -> Option, Shared>> { - msg_send_id![self, fileAttributes] +extern_methods!( + unsafe impl NSDirectoryEnumerator { + pub unsafe fn fileAttributes( + &self, + ) -> Option, Shared>> { + msg_send_id![self, fileAttributes] + } + pub unsafe fn directoryAttributes( + &self, + ) -> Option, Shared>> { + msg_send_id![self, directoryAttributes] + } + pub unsafe fn isEnumeratingDirectoryPostOrder(&self) -> bool { + msg_send![self, isEnumeratingDirectoryPostOrder] + } + pub unsafe fn skipDescendents(&self) { + msg_send![self, skipDescendents] + } + pub unsafe fn level(&self) -> NSUInteger { + msg_send![self, level] + } + pub unsafe fn skipDescendants(&self) { + msg_send![self, skipDescendants] + } } - pub unsafe fn directoryAttributes( - &self, - ) -> Option, Shared>> { - msg_send_id![self, directoryAttributes] - } - pub unsafe fn isEnumeratingDirectoryPostOrder(&self) -> bool { - msg_send![self, isEnumeratingDirectoryPostOrder] - } - pub unsafe fn skipDescendents(&self) { - msg_send![self, skipDescendents] - } - pub unsafe fn level(&self) -> NSUInteger { - msg_send![self, level] - } - pub unsafe fn skipDescendants(&self) { - msg_send![self, skipDescendants] - } -} +); extern_class!( #[derive(Debug)] pub struct NSFileProviderService; @@ -604,68 +627,72 @@ extern_class!( type Super = NSObject; } ); -impl NSFileProviderService { - pub unsafe fn getFileProviderConnectionWithCompletionHandler( - &self, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - getFileProviderConnectionWithCompletionHandler: completionHandler - ] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } -} -#[doc = "NSFileAttributes"] -impl NSDictionary { - pub unsafe fn fileSize(&self) -> c_ulonglong { - msg_send![self, fileSize] - } - pub unsafe fn fileModificationDate(&self) -> Option> { - msg_send_id![self, fileModificationDate] - } - pub unsafe fn fileType(&self) -> Option> { - msg_send_id![self, fileType] - } - pub unsafe fn filePosixPermissions(&self) -> NSUInteger { - msg_send![self, filePosixPermissions] - } - pub unsafe fn fileOwnerAccountName(&self) -> Option> { - msg_send_id![self, fileOwnerAccountName] +extern_methods!( + unsafe impl NSFileProviderService { + pub unsafe fn getFileProviderConnectionWithCompletionHandler( + &self, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getFileProviderConnectionWithCompletionHandler: completionHandler + ] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } } - pub unsafe fn fileGroupOwnerAccountName(&self) -> Option> { - msg_send_id![self, fileGroupOwnerAccountName] - } - pub unsafe fn fileSystemNumber(&self) -> NSInteger { - msg_send![self, fileSystemNumber] - } - pub unsafe fn fileSystemFileNumber(&self) -> NSUInteger { - msg_send![self, fileSystemFileNumber] - } - pub unsafe fn fileExtensionHidden(&self) -> bool { - msg_send![self, fileExtensionHidden] - } - pub unsafe fn fileHFSCreatorCode(&self) -> OSType { - msg_send![self, fileHFSCreatorCode] - } - pub unsafe fn fileHFSTypeCode(&self) -> OSType { - msg_send![self, fileHFSTypeCode] - } - pub unsafe fn fileIsImmutable(&self) -> bool { - msg_send![self, fileIsImmutable] - } - pub unsafe fn fileIsAppendOnly(&self) -> bool { - msg_send![self, fileIsAppendOnly] - } - pub unsafe fn fileCreationDate(&self) -> Option> { - msg_send_id![self, fileCreationDate] - } - pub unsafe fn fileOwnerAccountID(&self) -> Option> { - msg_send_id![self, fileOwnerAccountID] - } - pub unsafe fn fileGroupOwnerAccountID(&self) -> Option> { - msg_send_id![self, fileGroupOwnerAccountID] +); +extern_methods!( + #[doc = "NSFileAttributes"] + unsafe impl NSDictionary { + pub unsafe fn fileSize(&self) -> c_ulonglong { + msg_send![self, fileSize] + } + pub unsafe fn fileModificationDate(&self) -> Option> { + msg_send_id![self, fileModificationDate] + } + pub unsafe fn fileType(&self) -> Option> { + msg_send_id![self, fileType] + } + pub unsafe fn filePosixPermissions(&self) -> NSUInteger { + msg_send![self, filePosixPermissions] + } + pub unsafe fn fileOwnerAccountName(&self) -> Option> { + msg_send_id![self, fileOwnerAccountName] + } + pub unsafe fn fileGroupOwnerAccountName(&self) -> Option> { + msg_send_id![self, fileGroupOwnerAccountName] + } + pub unsafe fn fileSystemNumber(&self) -> NSInteger { + msg_send![self, fileSystemNumber] + } + pub unsafe fn fileSystemFileNumber(&self) -> NSUInteger { + msg_send![self, fileSystemFileNumber] + } + pub unsafe fn fileExtensionHidden(&self) -> bool { + msg_send![self, fileExtensionHidden] + } + pub unsafe fn fileHFSCreatorCode(&self) -> OSType { + msg_send![self, fileHFSCreatorCode] + } + pub unsafe fn fileHFSTypeCode(&self) -> OSType { + msg_send![self, fileHFSTypeCode] + } + pub unsafe fn fileIsImmutable(&self) -> bool { + msg_send![self, fileIsImmutable] + } + pub unsafe fn fileIsAppendOnly(&self) -> bool { + msg_send![self, fileIsAppendOnly] + } + pub unsafe fn fileCreationDate(&self) -> Option> { + msg_send_id![self, fileCreationDate] + } + pub unsafe fn fileOwnerAccountID(&self) -> Option> { + msg_send_id![self, fileOwnerAccountID] + } + pub unsafe fn fileGroupOwnerAccountID(&self) -> Option> { + msg_send_id![self, fileGroupOwnerAccountID] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs index 44fb37779..84aba91c0 100644 --- a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs +++ b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs @@ -7,5 +7,5 @@ use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSFilePresenter = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index e9227efd4..b48f7e8c8 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSFileVersion; @@ -17,111 +17,117 @@ extern_class!( type Super = NSObject; } ); -impl NSFileVersion { - pub unsafe fn currentVersionOfItemAtURL(url: &NSURL) -> Option> { - msg_send_id![Self::class(), currentVersionOfItemAtURL: url] +extern_methods!( + unsafe impl NSFileVersion { + pub unsafe fn currentVersionOfItemAtURL(url: &NSURL) -> Option> { + msg_send_id![Self::class(), currentVersionOfItemAtURL: url] + } + pub unsafe fn otherVersionsOfItemAtURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), otherVersionsOfItemAtURL: url] + } + pub unsafe fn unresolvedConflictVersionsOfItemAtURL( + url: &NSURL, + ) -> Option, Shared>> { + msg_send_id![Self::class(), unresolvedConflictVersionsOfItemAtURL: url] + } + pub unsafe fn getNonlocalVersionsOfItemAtURL_completionHandler( + url: &NSURL, + completionHandler: TodoBlock, + ) { + msg_send![ + Self::class(), + getNonlocalVersionsOfItemAtURL: url, + completionHandler: completionHandler + ] + } + pub unsafe fn versionOfItemAtURL_forPersistentIdentifier( + url: &NSURL, + persistentIdentifier: &Object, + ) -> Option> { + msg_send_id![ + Self::class(), + versionOfItemAtURL: url, + forPersistentIdentifier: persistentIdentifier + ] + } + pub unsafe fn addVersionOfItemAtURL_withContentsOfURL_options_error( + url: &NSURL, + contentsURL: &NSURL, + options: NSFileVersionAddingOptions, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + addVersionOfItemAtURL: url, + withContentsOfURL: contentsURL, + options: options, + error: _ + ] + } + pub unsafe fn temporaryDirectoryURLForNewVersionOfItemAtURL( + url: &NSURL, + ) -> Id { + msg_send_id![ + Self::class(), + temporaryDirectoryURLForNewVersionOfItemAtURL: url + ] + } + pub unsafe fn URL(&self) -> Id { + msg_send_id![self, URL] + } + pub unsafe fn localizedName(&self) -> Option> { + msg_send_id![self, localizedName] + } + pub unsafe fn localizedNameOfSavingComputer(&self) -> Option> { + msg_send_id![self, localizedNameOfSavingComputer] + } + pub unsafe fn originatorNameComponents( + &self, + ) -> Option> { + msg_send_id![self, originatorNameComponents] + } + pub unsafe fn modificationDate(&self) -> Option> { + msg_send_id![self, modificationDate] + } + pub unsafe fn persistentIdentifier(&self) -> Id { + msg_send_id![self, persistentIdentifier] + } + pub unsafe fn isConflict(&self) -> bool { + msg_send![self, isConflict] + } + pub unsafe fn isResolved(&self) -> bool { + msg_send![self, isResolved] + } + pub unsafe fn setResolved(&self, resolved: bool) { + msg_send![self, setResolved: resolved] + } + pub unsafe fn isDiscardable(&self) -> bool { + msg_send![self, isDiscardable] + } + pub unsafe fn setDiscardable(&self, discardable: bool) { + msg_send![self, setDiscardable: discardable] + } + pub unsafe fn hasLocalContents(&self) -> bool { + msg_send![self, hasLocalContents] + } + pub unsafe fn hasThumbnail(&self) -> bool { + msg_send![self, hasThumbnail] + } + pub unsafe fn replaceItemAtURL_options_error( + &self, + url: &NSURL, + options: NSFileVersionReplacingOptions, + ) -> Result, Id> { + msg_send_id![self, replaceItemAtURL: url, options: options, error: _] + } + pub unsafe fn removeAndReturnError(&self) -> Result<(), Id> { + msg_send![self, removeAndReturnError: _] + } + pub unsafe fn removeOtherVersionsOfItemAtURL_error( + url: &NSURL, + ) -> Result<(), Id> { + msg_send![Self::class(), removeOtherVersionsOfItemAtURL: url, error: _] + } } - pub unsafe fn otherVersionsOfItemAtURL( - url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), otherVersionsOfItemAtURL: url] - } - pub unsafe fn unresolvedConflictVersionsOfItemAtURL( - url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), unresolvedConflictVersionsOfItemAtURL: url] - } - pub unsafe fn getNonlocalVersionsOfItemAtURL_completionHandler( - url: &NSURL, - completionHandler: TodoBlock, - ) { - msg_send![ - Self::class(), - getNonlocalVersionsOfItemAtURL: url, - completionHandler: completionHandler - ] - } - pub unsafe fn versionOfItemAtURL_forPersistentIdentifier( - url: &NSURL, - persistentIdentifier: &Object, - ) -> Option> { - msg_send_id![ - Self::class(), - versionOfItemAtURL: url, - forPersistentIdentifier: persistentIdentifier - ] - } - pub unsafe fn addVersionOfItemAtURL_withContentsOfURL_options_error( - url: &NSURL, - contentsURL: &NSURL, - options: NSFileVersionAddingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - addVersionOfItemAtURL: url, - withContentsOfURL: contentsURL, - options: options, - error: _ - ] - } - pub unsafe fn temporaryDirectoryURLForNewVersionOfItemAtURL(url: &NSURL) -> Id { - msg_send_id![ - Self::class(), - temporaryDirectoryURLForNewVersionOfItemAtURL: url - ] - } - pub unsafe fn URL(&self) -> Id { - msg_send_id![self, URL] - } - pub unsafe fn localizedName(&self) -> Option> { - msg_send_id![self, localizedName] - } - pub unsafe fn localizedNameOfSavingComputer(&self) -> Option> { - msg_send_id![self, localizedNameOfSavingComputer] - } - pub unsafe fn originatorNameComponents(&self) -> Option> { - msg_send_id![self, originatorNameComponents] - } - pub unsafe fn modificationDate(&self) -> Option> { - msg_send_id![self, modificationDate] - } - pub unsafe fn persistentIdentifier(&self) -> Id { - msg_send_id![self, persistentIdentifier] - } - pub unsafe fn isConflict(&self) -> bool { - msg_send![self, isConflict] - } - pub unsafe fn isResolved(&self) -> bool { - msg_send![self, isResolved] - } - pub unsafe fn setResolved(&self, resolved: bool) { - msg_send![self, setResolved: resolved] - } - pub unsafe fn isDiscardable(&self) -> bool { - msg_send![self, isDiscardable] - } - pub unsafe fn setDiscardable(&self, discardable: bool) { - msg_send![self, setDiscardable: discardable] - } - pub unsafe fn hasLocalContents(&self) -> bool { - msg_send![self, hasLocalContents] - } - pub unsafe fn hasThumbnail(&self) -> bool { - msg_send![self, hasThumbnail] - } - pub unsafe fn replaceItemAtURL_options_error( - &self, - url: &NSURL, - options: NSFileVersionReplacingOptions, - ) -> Result, Id> { - msg_send_id![self, replaceItemAtURL: url, options: options, error: _] - } - pub unsafe fn removeAndReturnError(&self) -> Result<(), Id> { - msg_send![self, removeAndReturnError: _] - } - pub unsafe fn removeOtherVersionsOfItemAtURL_error( - url: &NSURL, - ) -> Result<(), Id> { - msg_send![Self::class(), removeOtherVersionsOfItemAtURL: url, error: _] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 3df66f710..d0f2e665f 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSFileWrapper; @@ -15,164 +15,176 @@ extern_class!( type Super = NSObject; } ); -impl NSFileWrapper { - pub unsafe fn initWithURL_options_error( - &self, - url: &NSURL, - options: NSFileWrapperReadingOptions, - ) -> Result, Id> { - msg_send_id![self, initWithURL: url, options: options, error: _] +extern_methods!( + unsafe impl NSFileWrapper { + pub unsafe fn initWithURL_options_error( + &self, + url: &NSURL, + options: NSFileWrapperReadingOptions, + ) -> Result, Id> { + msg_send_id![self, initWithURL: url, options: options, error: _] + } + pub unsafe fn initDirectoryWithFileWrappers( + &self, + childrenByPreferredName: &NSDictionary, + ) -> Id { + msg_send_id![self, initDirectoryWithFileWrappers: childrenByPreferredName] + } + pub unsafe fn initRegularFileWithContents(&self, contents: &NSData) -> Id { + msg_send_id![self, initRegularFileWithContents: contents] + } + pub unsafe fn initSymbolicLinkWithDestinationURL(&self, url: &NSURL) -> Id { + msg_send_id![self, initSymbolicLinkWithDestinationURL: url] + } + pub unsafe fn initWithSerializedRepresentation( + &self, + serializeRepresentation: &NSData, + ) -> Option> { + msg_send_id![ + self, + initWithSerializedRepresentation: serializeRepresentation + ] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn isDirectory(&self) -> bool { + msg_send![self, isDirectory] + } + pub unsafe fn isRegularFile(&self) -> bool { + msg_send![self, isRegularFile] + } + pub unsafe fn isSymbolicLink(&self) -> bool { + msg_send![self, isSymbolicLink] + } + pub unsafe fn preferredFilename(&self) -> Option> { + msg_send_id![self, preferredFilename] + } + pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>) { + msg_send![self, setPreferredFilename: preferredFilename] + } + pub unsafe fn filename(&self) -> Option> { + msg_send_id![self, filename] + } + pub unsafe fn setFilename(&self, filename: Option<&NSString>) { + msg_send![self, setFilename: filename] + } + pub unsafe fn fileAttributes(&self) -> Id, Shared> { + msg_send_id![self, fileAttributes] + } + pub unsafe fn setFileAttributes(&self, fileAttributes: &NSDictionary) { + msg_send![self, setFileAttributes: fileAttributes] + } + pub unsafe fn matchesContentsOfURL(&self, url: &NSURL) -> bool { + msg_send![self, matchesContentsOfURL: url] + } + pub unsafe fn readFromURL_options_error( + &self, + url: &NSURL, + options: NSFileWrapperReadingOptions, + ) -> Result<(), Id> { + msg_send![self, readFromURL: url, options: options, error: _] + } + pub unsafe fn writeToURL_options_originalContentsURL_error( + &self, + url: &NSURL, + options: NSFileWrapperWritingOptions, + originalContentsURL: Option<&NSURL>, + ) -> Result<(), Id> { + msg_send![ + self, + writeToURL: url, + options: options, + originalContentsURL: originalContentsURL, + error: _ + ] + } + pub unsafe fn serializedRepresentation(&self) -> Option> { + msg_send_id![self, serializedRepresentation] + } + pub unsafe fn addFileWrapper(&self, child: &NSFileWrapper) -> Id { + msg_send_id![self, addFileWrapper: child] + } + pub unsafe fn addRegularFileWithContents_preferredFilename( + &self, + data: &NSData, + fileName: &NSString, + ) -> Id { + msg_send_id![ + self, + addRegularFileWithContents: data, + preferredFilename: fileName + ] + } + pub unsafe fn removeFileWrapper(&self, child: &NSFileWrapper) { + msg_send![self, removeFileWrapper: child] + } + pub unsafe fn fileWrappers( + &self, + ) -> Option, Shared>> { + msg_send_id![self, fileWrappers] + } + pub unsafe fn keyForFileWrapper( + &self, + child: &NSFileWrapper, + ) -> Option> { + msg_send_id![self, keyForFileWrapper: child] + } + pub unsafe fn regularFileContents(&self) -> Option> { + msg_send_id![self, regularFileContents] + } + pub unsafe fn symbolicLinkDestinationURL(&self) -> Option> { + msg_send_id![self, symbolicLinkDestinationURL] + } } - pub unsafe fn initDirectoryWithFileWrappers( - &self, - childrenByPreferredName: &NSDictionary, - ) -> Id { - msg_send_id![self, initDirectoryWithFileWrappers: childrenByPreferredName] - } - pub unsafe fn initRegularFileWithContents(&self, contents: &NSData) -> Id { - msg_send_id![self, initRegularFileWithContents: contents] - } - pub unsafe fn initSymbolicLinkWithDestinationURL(&self, url: &NSURL) -> Id { - msg_send_id![self, initSymbolicLinkWithDestinationURL: url] - } - pub unsafe fn initWithSerializedRepresentation( - &self, - serializeRepresentation: &NSData, - ) -> Option> { - msg_send_id![ - self, - initWithSerializedRepresentation: serializeRepresentation - ] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn isDirectory(&self) -> bool { - msg_send![self, isDirectory] - } - pub unsafe fn isRegularFile(&self) -> bool { - msg_send![self, isRegularFile] - } - pub unsafe fn isSymbolicLink(&self) -> bool { - msg_send![self, isSymbolicLink] - } - pub unsafe fn preferredFilename(&self) -> Option> { - msg_send_id![self, preferredFilename] - } - pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>) { - msg_send![self, setPreferredFilename: preferredFilename] - } - pub unsafe fn filename(&self) -> Option> { - msg_send_id![self, filename] - } - pub unsafe fn setFilename(&self, filename: Option<&NSString>) { - msg_send![self, setFilename: filename] - } - pub unsafe fn fileAttributes(&self) -> Id, Shared> { - msg_send_id![self, fileAttributes] - } - pub unsafe fn setFileAttributes(&self, fileAttributes: &NSDictionary) { - msg_send![self, setFileAttributes: fileAttributes] - } - pub unsafe fn matchesContentsOfURL(&self, url: &NSURL) -> bool { - msg_send![self, matchesContentsOfURL: url] - } - pub unsafe fn readFromURL_options_error( - &self, - url: &NSURL, - options: NSFileWrapperReadingOptions, - ) -> Result<(), Id> { - msg_send![self, readFromURL: url, options: options, error: _] - } - pub unsafe fn writeToURL_options_originalContentsURL_error( - &self, - url: &NSURL, - options: NSFileWrapperWritingOptions, - originalContentsURL: Option<&NSURL>, - ) -> Result<(), Id> { - msg_send![ - self, - writeToURL: url, - options: options, - originalContentsURL: originalContentsURL, - error: _ - ] - } - pub unsafe fn serializedRepresentation(&self) -> Option> { - msg_send_id![self, serializedRepresentation] - } - pub unsafe fn addFileWrapper(&self, child: &NSFileWrapper) -> Id { - msg_send_id![self, addFileWrapper: child] - } - pub unsafe fn addRegularFileWithContents_preferredFilename( - &self, - data: &NSData, - fileName: &NSString, - ) -> Id { - msg_send_id![ - self, - addRegularFileWithContents: data, - preferredFilename: fileName - ] - } - pub unsafe fn removeFileWrapper(&self, child: &NSFileWrapper) { - msg_send![self, removeFileWrapper: child] - } - pub unsafe fn fileWrappers(&self) -> Option, Shared>> { - msg_send_id![self, fileWrappers] - } - pub unsafe fn keyForFileWrapper(&self, child: &NSFileWrapper) -> Option> { - msg_send_id![self, keyForFileWrapper: child] - } - pub unsafe fn regularFileContents(&self) -> Option> { - msg_send_id![self, regularFileContents] - } - pub unsafe fn symbolicLinkDestinationURL(&self) -> Option> { - msg_send_id![self, symbolicLinkDestinationURL] - } -} -#[doc = "NSDeprecated"] -impl NSFileWrapper { - pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithPath: path] - } - pub unsafe fn initSymbolicLinkWithDestination(&self, path: &NSString) -> Id { - msg_send_id![self, initSymbolicLinkWithDestination: path] - } - pub unsafe fn needsToBeUpdatedFromPath(&self, path: &NSString) -> bool { - msg_send![self, needsToBeUpdatedFromPath: path] - } - pub unsafe fn updateFromPath(&self, path: &NSString) -> bool { - msg_send![self, updateFromPath: path] - } - pub unsafe fn writeToFile_atomically_updateFilenames( - &self, - path: &NSString, - atomicFlag: bool, - updateFilenamesFlag: bool, - ) -> bool { - msg_send![ - self, - writeToFile: path, - atomically: atomicFlag, - updateFilenames: updateFilenamesFlag - ] - } - pub unsafe fn addFileWithPath(&self, path: &NSString) -> Id { - msg_send_id![self, addFileWithPath: path] - } - pub unsafe fn addSymbolicLinkWithDestination_preferredFilename( - &self, - path: &NSString, - filename: &NSString, - ) -> Id { - msg_send_id![ - self, - addSymbolicLinkWithDestination: path, - preferredFilename: filename - ] - } - pub unsafe fn symbolicLinkDestination(&self) -> Id { - msg_send_id![self, symbolicLinkDestination] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSFileWrapper { + pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithPath: path] + } + pub unsafe fn initSymbolicLinkWithDestination( + &self, + path: &NSString, + ) -> Id { + msg_send_id![self, initSymbolicLinkWithDestination: path] + } + pub unsafe fn needsToBeUpdatedFromPath(&self, path: &NSString) -> bool { + msg_send![self, needsToBeUpdatedFromPath: path] + } + pub unsafe fn updateFromPath(&self, path: &NSString) -> bool { + msg_send![self, updateFromPath: path] + } + pub unsafe fn writeToFile_atomically_updateFilenames( + &self, + path: &NSString, + atomicFlag: bool, + updateFilenamesFlag: bool, + ) -> bool { + msg_send![ + self, + writeToFile: path, + atomically: atomicFlag, + updateFilenames: updateFilenamesFlag + ] + } + pub unsafe fn addFileWithPath(&self, path: &NSString) -> Id { + msg_send_id![self, addFileWithPath: path] + } + pub unsafe fn addSymbolicLinkWithDestination_preferredFilename( + &self, + path: &NSString, + filename: &NSString, + ) -> Id { + msg_send_id![ + self, + addSymbolicLinkWithDestination: path, + preferredFilename: filename + ] + } + pub unsafe fn symbolicLinkDestination(&self) -> Id { + msg_send_id![self, symbolicLinkDestination] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index ad167c183..44215812a 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSFormatter; @@ -15,68 +15,73 @@ extern_class!( type Super = NSObject; } ); -impl NSFormatter { - pub unsafe fn stringForObjectValue( - &self, - obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] +extern_methods!( + unsafe impl NSFormatter { + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } + pub unsafe fn attributedStringForObjectValue_withDefaultAttributes( + &self, + obj: &Object, + attrs: Option<&NSDictionary>, + ) -> Option> { + msg_send_id![ + self, + attributedStringForObjectValue: obj, + withDefaultAttributes: attrs + ] + } + pub unsafe fn editingStringForObjectValue( + &self, + obj: &Object, + ) -> Option> { + msg_send_id![self, editingStringForObjectValue: obj] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: Option<&mut Option>>, + string: &NSString, + error: Option<&mut Option>>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } + pub unsafe fn isPartialStringValid_newEditingString_errorDescription( + &self, + partialString: &NSString, + newString: Option<&mut Option>>, + error: Option<&mut Option>>, + ) -> bool { + msg_send![ + self, + isPartialStringValid: partialString, + newEditingString: newString, + errorDescription: error + ] + } + pub unsafe fn isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription( + &self, + partialStringPtr: &mut Id, + proposedSelRangePtr: NSRangePointer, + origString: &NSString, + origSelRange: NSRange, + error: Option<&mut Option>>, + ) -> bool { + msg_send![ + self, + isPartialStringValid: partialStringPtr, + proposedSelectedRange: proposedSelRangePtr, + originalString: origString, + originalSelectedRange: origSelRange, + errorDescription: error + ] + } } - pub unsafe fn attributedStringForObjectValue_withDefaultAttributes( - &self, - obj: &Object, - attrs: Option<&NSDictionary>, - ) -> Option> { - msg_send_id![ - self, - attributedStringForObjectValue: obj, - withDefaultAttributes: attrs - ] - } - pub unsafe fn editingStringForObjectValue(&self, obj: &Object) -> Option> { - msg_send_id![self, editingStringForObjectValue: obj] - } - pub unsafe fn getObjectValue_forString_errorDescription( - &self, - obj: Option<&mut Option>>, - string: &NSString, - error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } - pub unsafe fn isPartialStringValid_newEditingString_errorDescription( - &self, - partialString: &NSString, - newString: Option<&mut Option>>, - error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - isPartialStringValid: partialString, - newEditingString: newString, - errorDescription: error - ] - } - pub unsafe fn isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription( - &self, - partialStringPtr: &mut Id, - proposedSelRangePtr: NSRangePointer, - origString: &NSString, - origSelRange: NSRange, - error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - isPartialStringValid: partialStringPtr, - proposedSelectedRange: proposedSelRangePtr, - originalString: origString, - originalSelectedRange: origSelRange, - errorDescription: error - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs index 9d6132c7c..ff664530b 100644 --- a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSGarbageCollector; @@ -10,35 +10,37 @@ extern_class!( type Super = NSObject; } ); -impl NSGarbageCollector { - pub unsafe fn defaultCollector() -> Id { - msg_send_id![Self::class(), defaultCollector] +extern_methods!( + unsafe impl NSGarbageCollector { + pub unsafe fn defaultCollector() -> Id { + msg_send_id![Self::class(), defaultCollector] + } + pub unsafe fn isCollecting(&self) -> bool { + msg_send![self, isCollecting] + } + pub unsafe fn disable(&self) { + msg_send![self, disable] + } + pub unsafe fn enable(&self) { + msg_send![self, enable] + } + pub unsafe fn isEnabled(&self) -> bool { + msg_send![self, isEnabled] + } + pub unsafe fn collectIfNeeded(&self) { + msg_send![self, collectIfNeeded] + } + pub unsafe fn collectExhaustively(&self) { + msg_send![self, collectExhaustively] + } + pub unsafe fn disableCollectorForPointer(&self, ptr: NonNull) { + msg_send![self, disableCollectorForPointer: ptr] + } + pub unsafe fn enableCollectorForPointer(&self, ptr: NonNull) { + msg_send![self, enableCollectorForPointer: ptr] + } + pub unsafe fn zone(&self) -> NonNull { + msg_send![self, zone] + } } - pub unsafe fn isCollecting(&self) -> bool { - msg_send![self, isCollecting] - } - pub unsafe fn disable(&self) { - msg_send![self, disable] - } - pub unsafe fn enable(&self) { - msg_send![self, enable] - } - pub unsafe fn isEnabled(&self) -> bool { - msg_send![self, isEnabled] - } - pub unsafe fn collectIfNeeded(&self) { - msg_send![self, collectIfNeeded] - } - pub unsafe fn collectExhaustively(&self) { - msg_send![self, collectExhaustively] - } - pub unsafe fn disableCollectorForPointer(&self, ptr: NonNull) { - msg_send![self, disableCollectorForPointer: ptr] - } - pub unsafe fn enableCollectorForPointer(&self, ptr: NonNull) { - msg_send![self, enableCollectorForPointer: ptr] - } - pub unsafe fn zone(&self) -> NonNull { - msg_send![self, zone] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index dae38bb61..2d77b74ad 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -5,77 +5,83 @@ use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSPoint = CGPoint; pub type NSSize = CGSize; pub type NSRect = CGRect; use super::__exported::NSString; -#[doc = "NSValueGeometryExtensions"] -impl NSValue { - pub unsafe fn valueWithPoint(point: NSPoint) -> Id { - msg_send_id![Self::class(), valueWithPoint: point] - } - pub unsafe fn valueWithSize(size: NSSize) -> Id { - msg_send_id![Self::class(), valueWithSize: size] - } - pub unsafe fn valueWithRect(rect: NSRect) -> Id { - msg_send_id![Self::class(), valueWithRect: rect] - } - pub unsafe fn valueWithEdgeInsets(insets: NSEdgeInsets) -> Id { - msg_send_id![Self::class(), valueWithEdgeInsets: insets] - } - pub unsafe fn pointValue(&self) -> NSPoint { - msg_send![self, pointValue] - } - pub unsafe fn sizeValue(&self) -> NSSize { - msg_send![self, sizeValue] - } - pub unsafe fn rectValue(&self) -> NSRect { - msg_send![self, rectValue] - } - pub unsafe fn edgeInsetsValue(&self) -> NSEdgeInsets { - msg_send![self, edgeInsetsValue] - } -} -#[doc = "NSGeometryCoding"] -impl NSCoder { - pub unsafe fn encodePoint(&self, point: NSPoint) { - msg_send![self, encodePoint: point] - } - pub unsafe fn decodePoint(&self) -> NSPoint { - msg_send![self, decodePoint] - } - pub unsafe fn encodeSize(&self, size: NSSize) { - msg_send![self, encodeSize: size] - } - pub unsafe fn decodeSize(&self) -> NSSize { - msg_send![self, decodeSize] - } - pub unsafe fn encodeRect(&self, rect: NSRect) { - msg_send![self, encodeRect: rect] - } - pub unsafe fn decodeRect(&self) -> NSRect { - msg_send![self, decodeRect] - } -} -#[doc = "NSGeometryKeyedCoding"] -impl NSCoder { - pub unsafe fn encodePoint_forKey(&self, point: NSPoint, key: &NSString) { - msg_send![self, encodePoint: point, forKey: key] - } - pub unsafe fn encodeSize_forKey(&self, size: NSSize, key: &NSString) { - msg_send![self, encodeSize: size, forKey: key] - } - pub unsafe fn encodeRect_forKey(&self, rect: NSRect, key: &NSString) { - msg_send![self, encodeRect: rect, forKey: key] - } - pub unsafe fn decodePointForKey(&self, key: &NSString) -> NSPoint { - msg_send![self, decodePointForKey: key] - } - pub unsafe fn decodeSizeForKey(&self, key: &NSString) -> NSSize { - msg_send![self, decodeSizeForKey: key] - } - pub unsafe fn decodeRectForKey(&self, key: &NSString) -> NSRect { - msg_send![self, decodeRectForKey: key] - } -} +extern_methods!( + #[doc = "NSValueGeometryExtensions"] + unsafe impl NSValue { + pub unsafe fn valueWithPoint(point: NSPoint) -> Id { + msg_send_id![Self::class(), valueWithPoint: point] + } + pub unsafe fn valueWithSize(size: NSSize) -> Id { + msg_send_id![Self::class(), valueWithSize: size] + } + pub unsafe fn valueWithRect(rect: NSRect) -> Id { + msg_send_id![Self::class(), valueWithRect: rect] + } + pub unsafe fn valueWithEdgeInsets(insets: NSEdgeInsets) -> Id { + msg_send_id![Self::class(), valueWithEdgeInsets: insets] + } + pub unsafe fn pointValue(&self) -> NSPoint { + msg_send![self, pointValue] + } + pub unsafe fn sizeValue(&self) -> NSSize { + msg_send![self, sizeValue] + } + pub unsafe fn rectValue(&self) -> NSRect { + msg_send![self, rectValue] + } + pub unsafe fn edgeInsetsValue(&self) -> NSEdgeInsets { + msg_send![self, edgeInsetsValue] + } + } +); +extern_methods!( + #[doc = "NSGeometryCoding"] + unsafe impl NSCoder { + pub unsafe fn encodePoint(&self, point: NSPoint) { + msg_send![self, encodePoint: point] + } + pub unsafe fn decodePoint(&self) -> NSPoint { + msg_send![self, decodePoint] + } + pub unsafe fn encodeSize(&self, size: NSSize) { + msg_send![self, encodeSize: size] + } + pub unsafe fn decodeSize(&self) -> NSSize { + msg_send![self, decodeSize] + } + pub unsafe fn encodeRect(&self, rect: NSRect) { + msg_send![self, encodeRect: rect] + } + pub unsafe fn decodeRect(&self) -> NSRect { + msg_send![self, decodeRect] + } + } +); +extern_methods!( + #[doc = "NSGeometryKeyedCoding"] + unsafe impl NSCoder { + pub unsafe fn encodePoint_forKey(&self, point: NSPoint, key: &NSString) { + msg_send![self, encodePoint: point, forKey: key] + } + pub unsafe fn encodeSize_forKey(&self, size: NSSize, key: &NSString) { + msg_send![self, encodeSize: size, forKey: key] + } + pub unsafe fn encodeRect_forKey(&self, rect: NSRect, key: &NSString) { + msg_send![self, encodeRect: rect, forKey: key] + } + pub unsafe fn decodePointForKey(&self, key: &NSString) -> NSPoint { + msg_send![self, decodePointForKey: key] + } + pub unsafe fn decodeSizeForKey(&self, key: &NSString) -> NSSize { + msg_send![self, decodeSizeForKey: key] + } + pub unsafe fn decodeRectForKey(&self, key: &NSString) -> NSRect { + msg_send![self, decodeRectForKey: key] + } + } +); diff --git a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs index aeb9dcf24..3df022269 100644 --- a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs +++ b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs @@ -4,4 +4,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index bc4854633..859f2fae5 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSHTTPCookiePropertyKey = NSString; pub type NSHTTPCookieStringPolicy = NSString; use super::__exported::NSHTTPCookieInternal; @@ -19,75 +19,77 @@ extern_class!( type Super = NSObject; } ); -impl NSHTTPCookie { - pub unsafe fn initWithProperties( - &self, - properties: &NSDictionary, - ) -> Option> { - msg_send_id![self, initWithProperties: properties] +extern_methods!( + unsafe impl NSHTTPCookie { + pub unsafe fn initWithProperties( + &self, + properties: &NSDictionary, + ) -> Option> { + msg_send_id![self, initWithProperties: properties] + } + pub unsafe fn cookieWithProperties( + properties: &NSDictionary, + ) -> Option> { + msg_send_id![Self::class(), cookieWithProperties: properties] + } + pub unsafe fn requestHeaderFieldsWithCookies( + cookies: &NSArray, + ) -> Id, Shared> { + msg_send_id![Self::class(), requestHeaderFieldsWithCookies: cookies] + } + pub unsafe fn cookiesWithResponseHeaderFields_forURL( + headerFields: &NSDictionary, + URL: &NSURL, + ) -> Id, Shared> { + msg_send_id![ + Self::class(), + cookiesWithResponseHeaderFields: headerFields, + forURL: URL + ] + } + pub unsafe fn properties( + &self, + ) -> Option, Shared>> { + msg_send_id![self, properties] + } + pub unsafe fn version(&self) -> NSUInteger { + msg_send![self, version] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn value(&self) -> Id { + msg_send_id![self, value] + } + pub unsafe fn expiresDate(&self) -> Option> { + msg_send_id![self, expiresDate] + } + pub unsafe fn isSessionOnly(&self) -> bool { + msg_send![self, isSessionOnly] + } + pub unsafe fn domain(&self) -> Id { + msg_send_id![self, domain] + } + pub unsafe fn path(&self) -> Id { + msg_send_id![self, path] + } + pub unsafe fn isSecure(&self) -> bool { + msg_send![self, isSecure] + } + pub unsafe fn isHTTPOnly(&self) -> bool { + msg_send![self, isHTTPOnly] + } + pub unsafe fn comment(&self) -> Option> { + msg_send_id![self, comment] + } + pub unsafe fn commentURL(&self) -> Option> { + msg_send_id![self, commentURL] + } + pub unsafe fn portList(&self) -> Option, Shared>> { + msg_send_id![self, portList] + } + pub unsafe fn sameSitePolicy(&self) -> Option> { + msg_send_id![self, sameSitePolicy] + } } - pub unsafe fn cookieWithProperties( - properties: &NSDictionary, - ) -> Option> { - msg_send_id![Self::class(), cookieWithProperties: properties] - } - pub unsafe fn requestHeaderFieldsWithCookies( - cookies: &NSArray, - ) -> Id, Shared> { - msg_send_id![Self::class(), requestHeaderFieldsWithCookies: cookies] - } - pub unsafe fn cookiesWithResponseHeaderFields_forURL( - headerFields: &NSDictionary, - URL: &NSURL, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - cookiesWithResponseHeaderFields: headerFields, - forURL: URL - ] - } - pub unsafe fn properties( - &self, - ) -> Option, Shared>> { - msg_send_id![self, properties] - } - pub unsafe fn version(&self) -> NSUInteger { - msg_send![self, version] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn value(&self) -> Id { - msg_send_id![self, value] - } - pub unsafe fn expiresDate(&self) -> Option> { - msg_send_id![self, expiresDate] - } - pub unsafe fn isSessionOnly(&self) -> bool { - msg_send![self, isSessionOnly] - } - pub unsafe fn domain(&self) -> Id { - msg_send_id![self, domain] - } - pub unsafe fn path(&self) -> Id { - msg_send_id![self, path] - } - pub unsafe fn isSecure(&self) -> bool { - msg_send![self, isSecure] - } - pub unsafe fn isHTTPOnly(&self) -> bool { - msg_send![self, isHTTPOnly] - } - pub unsafe fn comment(&self) -> Option> { - msg_send_id![self, comment] - } - pub unsafe fn commentURL(&self) -> Option> { - msg_send_id![self, commentURL] - } - pub unsafe fn portList(&self) -> Option, Shared>> { - msg_send_id![self, portList] - } - pub unsafe fn sameSitePolicy(&self) -> Option> { - msg_send_id![self, sameSitePolicy] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index 07b6486d1..0b41795e1 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSHTTPCookieStorage; @@ -18,77 +18,84 @@ extern_class!( type Super = NSObject; } ); -impl NSHTTPCookieStorage { - pub unsafe fn sharedHTTPCookieStorage() -> Id { - msg_send_id![Self::class(), sharedHTTPCookieStorage] +extern_methods!( + unsafe impl NSHTTPCookieStorage { + pub unsafe fn sharedHTTPCookieStorage() -> Id { + msg_send_id![Self::class(), sharedHTTPCookieStorage] + } + pub unsafe fn sharedCookieStorageForGroupContainerIdentifier( + identifier: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + sharedCookieStorageForGroupContainerIdentifier: identifier + ] + } + pub unsafe fn cookies(&self) -> Option, Shared>> { + msg_send_id![self, cookies] + } + pub unsafe fn setCookie(&self, cookie: &NSHTTPCookie) { + msg_send![self, setCookie: cookie] + } + pub unsafe fn deleteCookie(&self, cookie: &NSHTTPCookie) { + msg_send![self, deleteCookie: cookie] + } + pub unsafe fn removeCookiesSinceDate(&self, date: &NSDate) { + msg_send![self, removeCookiesSinceDate: date] + } + pub unsafe fn cookiesForURL( + &self, + URL: &NSURL, + ) -> Option, Shared>> { + msg_send_id![self, cookiesForURL: URL] + } + pub unsafe fn setCookies_forURL_mainDocumentURL( + &self, + cookies: &NSArray, + URL: Option<&NSURL>, + mainDocumentURL: Option<&NSURL>, + ) { + msg_send![ + self, + setCookies: cookies, + forURL: URL, + mainDocumentURL: mainDocumentURL + ] + } + pub unsafe fn cookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy { + msg_send![self, cookieAcceptPolicy] + } + pub unsafe fn setCookieAcceptPolicy(&self, cookieAcceptPolicy: NSHTTPCookieAcceptPolicy) { + msg_send![self, setCookieAcceptPolicy: cookieAcceptPolicy] + } + pub unsafe fn sortedCookiesUsingDescriptors( + &self, + sortOrder: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, sortedCookiesUsingDescriptors: sortOrder] + } } - pub unsafe fn sharedCookieStorageForGroupContainerIdentifier( - identifier: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - sharedCookieStorageForGroupContainerIdentifier: identifier - ] - } - pub unsafe fn cookies(&self) -> Option, Shared>> { - msg_send_id![self, cookies] - } - pub unsafe fn setCookie(&self, cookie: &NSHTTPCookie) { - msg_send![self, setCookie: cookie] - } - pub unsafe fn deleteCookie(&self, cookie: &NSHTTPCookie) { - msg_send![self, deleteCookie: cookie] - } - pub unsafe fn removeCookiesSinceDate(&self, date: &NSDate) { - msg_send![self, removeCookiesSinceDate: date] - } - pub unsafe fn cookiesForURL(&self, URL: &NSURL) -> Option, Shared>> { - msg_send_id![self, cookiesForURL: URL] - } - pub unsafe fn setCookies_forURL_mainDocumentURL( - &self, - cookies: &NSArray, - URL: Option<&NSURL>, - mainDocumentURL: Option<&NSURL>, - ) { - msg_send![ - self, - setCookies: cookies, - forURL: URL, - mainDocumentURL: mainDocumentURL - ] - } - pub unsafe fn cookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy { - msg_send![self, cookieAcceptPolicy] - } - pub unsafe fn setCookieAcceptPolicy(&self, cookieAcceptPolicy: NSHTTPCookieAcceptPolicy) { - msg_send![self, setCookieAcceptPolicy: cookieAcceptPolicy] - } - pub unsafe fn sortedCookiesUsingDescriptors( - &self, - sortOrder: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, sortedCookiesUsingDescriptors: sortOrder] - } -} -#[doc = "NSURLSessionTaskAdditions"] -impl NSHTTPCookieStorage { - pub unsafe fn storeCookies_forTask( - &self, - cookies: &NSArray, - task: &NSURLSessionTask, - ) { - msg_send![self, storeCookies: cookies, forTask: task] - } - pub unsafe fn getCookiesForTask_completionHandler( - &self, - task: &NSURLSessionTask, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - getCookiesForTask: task, - completionHandler: completionHandler - ] +); +extern_methods!( + #[doc = "NSURLSessionTaskAdditions"] + unsafe impl NSHTTPCookieStorage { + pub unsafe fn storeCookies_forTask( + &self, + cookies: &NSArray, + task: &NSURLSessionTask, + ) { + msg_send![self, storeCookies: cookies, forTask: task] + } + pub unsafe fn getCookiesForTask_completionHandler( + &self, + task: &NSURLSessionTask, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getCookiesForTask: task, + completionHandler: completionHandler + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index f5b1c48b2..ecbeaf0d9 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSHashTableOptions = NSUInteger; __inner_extern_class!( #[derive(Debug)] @@ -15,85 +15,87 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSHashTable { - pub unsafe fn initWithOptions_capacity( - &self, - options: NSPointerFunctionsOptions, - initialCapacity: NSUInteger, - ) -> Id { - msg_send_id![self, initWithOptions: options, capacity: initialCapacity] +extern_methods!( + unsafe impl NSHashTable { + pub unsafe fn initWithOptions_capacity( + &self, + options: NSPointerFunctionsOptions, + initialCapacity: NSUInteger, + ) -> Id { + msg_send_id![self, initWithOptions: options, capacity: initialCapacity] + } + pub unsafe fn initWithPointerFunctions_capacity( + &self, + functions: &NSPointerFunctions, + initialCapacity: NSUInteger, + ) -> Id { + msg_send_id![ + self, + initWithPointerFunctions: functions, + capacity: initialCapacity + ] + } + pub unsafe fn hashTableWithOptions( + options: NSPointerFunctionsOptions, + ) -> Id, Shared> { + msg_send_id![Self::class(), hashTableWithOptions: options] + } + pub unsafe fn hashTableWithWeakObjects() -> Id { + msg_send_id![Self::class(), hashTableWithWeakObjects] + } + pub unsafe fn weakObjectsHashTable() -> Id, Shared> { + msg_send_id![Self::class(), weakObjectsHashTable] + } + pub unsafe fn pointerFunctions(&self) -> Id { + msg_send_id![self, pointerFunctions] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option> { + msg_send_id![self, member: object] + } + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] + } + pub unsafe fn addObject(&self, object: Option<&ObjectType>) { + msg_send![self, addObject: object] + } + pub unsafe fn removeObject(&self, object: Option<&ObjectType>) { + msg_send![self, removeObject: object] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn allObjects(&self) -> Id, Shared> { + msg_send_id![self, allObjects] + } + pub unsafe fn anyObject(&self) -> Option> { + msg_send_id![self, anyObject] + } + pub unsafe fn containsObject(&self, anObject: Option<&ObjectType>) -> bool { + msg_send![self, containsObject: anObject] + } + pub unsafe fn intersectsHashTable(&self, other: &NSHashTable) -> bool { + msg_send![self, intersectsHashTable: other] + } + pub unsafe fn isEqualToHashTable(&self, other: &NSHashTable) -> bool { + msg_send![self, isEqualToHashTable: other] + } + pub unsafe fn isSubsetOfHashTable(&self, other: &NSHashTable) -> bool { + msg_send![self, isSubsetOfHashTable: other] + } + pub unsafe fn intersectHashTable(&self, other: &NSHashTable) { + msg_send![self, intersectHashTable: other] + } + pub unsafe fn unionHashTable(&self, other: &NSHashTable) { + msg_send![self, unionHashTable: other] + } + pub unsafe fn minusHashTable(&self, other: &NSHashTable) { + msg_send![self, minusHashTable: other] + } + pub unsafe fn setRepresentation(&self) -> Id, Shared> { + msg_send_id![self, setRepresentation] + } } - pub unsafe fn initWithPointerFunctions_capacity( - &self, - functions: &NSPointerFunctions, - initialCapacity: NSUInteger, - ) -> Id { - msg_send_id![ - self, - initWithPointerFunctions: functions, - capacity: initialCapacity - ] - } - pub unsafe fn hashTableWithOptions( - options: NSPointerFunctionsOptions, - ) -> Id, Shared> { - msg_send_id![Self::class(), hashTableWithOptions: options] - } - pub unsafe fn hashTableWithWeakObjects() -> Id { - msg_send_id![Self::class(), hashTableWithWeakObjects] - } - pub unsafe fn weakObjectsHashTable() -> Id, Shared> { - msg_send_id![Self::class(), weakObjectsHashTable] - } - pub unsafe fn pointerFunctions(&self) -> Id { - msg_send_id![self, pointerFunctions] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option> { - msg_send_id![self, member: object] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn addObject(&self, object: Option<&ObjectType>) { - msg_send![self, addObject: object] - } - pub unsafe fn removeObject(&self, object: Option<&ObjectType>) { - msg_send![self, removeObject: object] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn allObjects(&self) -> Id, Shared> { - msg_send_id![self, allObjects] - } - pub unsafe fn anyObject(&self) -> Option> { - msg_send_id![self, anyObject] - } - pub unsafe fn containsObject(&self, anObject: Option<&ObjectType>) -> bool { - msg_send![self, containsObject: anObject] - } - pub unsafe fn intersectsHashTable(&self, other: &NSHashTable) -> bool { - msg_send![self, intersectsHashTable: other] - } - pub unsafe fn isEqualToHashTable(&self, other: &NSHashTable) -> bool { - msg_send![self, isEqualToHashTable: other] - } - pub unsafe fn isSubsetOfHashTable(&self, other: &NSHashTable) -> bool { - msg_send![self, isSubsetOfHashTable: other] - } - pub unsafe fn intersectHashTable(&self, other: &NSHashTable) { - msg_send![self, intersectHashTable: other] - } - pub unsafe fn unionHashTable(&self, other: &NSHashTable) { - msg_send![self, unionHashTable: other] - } - pub unsafe fn minusHashTable(&self, other: &NSHashTable) { - msg_send![self, minusHashTable: other] - } - pub unsafe fn setRepresentation(&self) -> Id, Shared> { - msg_send_id![self, setRepresentation] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index 38958feba..6a6b74fe0 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSHost; @@ -13,41 +13,43 @@ extern_class!( type Super = NSObject; } ); -impl NSHost { - pub unsafe fn currentHost() -> Id { - msg_send_id![Self::class(), currentHost] +extern_methods!( + unsafe impl NSHost { + pub unsafe fn currentHost() -> Id { + msg_send_id![Self::class(), currentHost] + } + pub unsafe fn hostWithName(name: Option<&NSString>) -> Id { + msg_send_id![Self::class(), hostWithName: name] + } + pub unsafe fn hostWithAddress(address: &NSString) -> Id { + msg_send_id![Self::class(), hostWithAddress: address] + } + pub unsafe fn isEqualToHost(&self, aHost: &NSHost) -> bool { + msg_send![self, isEqualToHost: aHost] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn names(&self) -> Id, Shared> { + msg_send_id![self, names] + } + pub unsafe fn address(&self) -> Option> { + msg_send_id![self, address] + } + pub unsafe fn addresses(&self) -> Id, Shared> { + msg_send_id![self, addresses] + } + pub unsafe fn localizedName(&self) -> Option> { + msg_send_id![self, localizedName] + } + pub unsafe fn setHostCacheEnabled(flag: bool) { + msg_send![Self::class(), setHostCacheEnabled: flag] + } + pub unsafe fn isHostCacheEnabled() -> bool { + msg_send![Self::class(), isHostCacheEnabled] + } + pub unsafe fn flushHostCache() { + msg_send![Self::class(), flushHostCache] + } } - pub unsafe fn hostWithName(name: Option<&NSString>) -> Id { - msg_send_id![Self::class(), hostWithName: name] - } - pub unsafe fn hostWithAddress(address: &NSString) -> Id { - msg_send_id![Self::class(), hostWithAddress: address] - } - pub unsafe fn isEqualToHost(&self, aHost: &NSHost) -> bool { - msg_send![self, isEqualToHost: aHost] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn names(&self) -> Id, Shared> { - msg_send_id![self, names] - } - pub unsafe fn address(&self) -> Option> { - msg_send_id![self, address] - } - pub unsafe fn addresses(&self) -> Id, Shared> { - msg_send_id![self, addresses] - } - pub unsafe fn localizedName(&self) -> Option> { - msg_send_id![self, localizedName] - } - pub unsafe fn setHostCacheEnabled(flag: bool) { - msg_send![Self::class(), setHostCacheEnabled: flag] - } - pub unsafe fn isHostCacheEnabled() -> bool { - msg_send![Self::class(), isHostCacheEnabled] - } - pub unsafe fn flushHostCache() { - msg_send![Self::class(), flushHostCache] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 22e86e724..cb65c83d2 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSISO8601DateFormatter; @@ -14,38 +14,40 @@ extern_class!( type Super = NSFormatter; } ); -impl NSISO8601DateFormatter { - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] +extern_methods!( + unsafe impl NSISO8601DateFormatter { + pub unsafe fn timeZone(&self) -> Id { + msg_send_id![self, timeZone] + } + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { + msg_send![self, setTimeZone: timeZone] + } + pub unsafe fn formatOptions(&self) -> NSISO8601DateFormatOptions { + msg_send![self, formatOptions] + } + pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions) { + msg_send![self, setFormatOptions: formatOptions] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id { + msg_send_id![self, stringFromDate: date] + } + pub unsafe fn dateFromString(&self, string: &NSString) -> Option> { + msg_send_id![self, dateFromString: string] + } + pub unsafe fn stringFromDate_timeZone_formatOptions( + date: &NSDate, + timeZone: &NSTimeZone, + formatOptions: NSISO8601DateFormatOptions, + ) -> Id { + msg_send_id![ + Self::class(), + stringFromDate: date, + timeZone: timeZone, + formatOptions: formatOptions + ] + } } - pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn formatOptions(&self) -> NSISO8601DateFormatOptions { - msg_send![self, formatOptions] - } - pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions) { - msg_send![self, setFormatOptions: formatOptions] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id { - msg_send_id![self, stringFromDate: date] - } - pub unsafe fn dateFromString(&self, string: &NSString) -> Option> { - msg_send_id![self, dateFromString: string] - } - pub unsafe fn stringFromDate_timeZone_formatOptions( - date: &NSDate, - timeZone: &NSTimeZone, - formatOptions: NSISO8601DateFormatOptions, - ) -> Id { - msg_send_id![ - Self::class(), - stringFromDate: date, - timeZone: timeZone, - formatOptions: formatOptions - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index d6b9a687a..6335f4478 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSIndexPath; @@ -11,48 +11,56 @@ extern_class!( type Super = NSObject; } ); -impl NSIndexPath { - pub unsafe fn indexPathWithIndex(index: NSUInteger) -> Id { - msg_send_id![Self::class(), indexPathWithIndex: index] +extern_methods!( + unsafe impl NSIndexPath { + pub unsafe fn indexPathWithIndex(index: NSUInteger) -> Id { + msg_send_id![Self::class(), indexPathWithIndex: index] + } + pub unsafe fn indexPathWithIndexes_length( + indexes: TodoArray, + length: NSUInteger, + ) -> Id { + msg_send_id![Self::class(), indexPathWithIndexes: indexes, length: length] + } + pub unsafe fn initWithIndexes_length( + &self, + indexes: TodoArray, + length: NSUInteger, + ) -> Id { + msg_send_id![self, initWithIndexes: indexes, length: length] + } + pub unsafe fn initWithIndex(&self, index: NSUInteger) -> Id { + msg_send_id![self, initWithIndex: index] + } + pub unsafe fn indexPathByAddingIndex(&self, index: NSUInteger) -> Id { + msg_send_id![self, indexPathByAddingIndex: index] + } + pub unsafe fn indexPathByRemovingLastIndex(&self) -> Id { + msg_send_id![self, indexPathByRemovingLastIndex] + } + pub unsafe fn indexAtPosition(&self, position: NSUInteger) -> NSUInteger { + msg_send![self, indexAtPosition: position] + } + pub unsafe fn length(&self) -> NSUInteger { + msg_send![self, length] + } + pub unsafe fn getIndexes_range( + &self, + indexes: NonNull, + positionRange: NSRange, + ) { + msg_send![self, getIndexes: indexes, range: positionRange] + } + pub unsafe fn compare(&self, otherObject: &NSIndexPath) -> NSComparisonResult { + msg_send![self, compare: otherObject] + } } - pub unsafe fn indexPathWithIndexes_length( - indexes: TodoArray, - length: NSUInteger, - ) -> Id { - msg_send_id![Self::class(), indexPathWithIndexes: indexes, length: length] - } - pub unsafe fn initWithIndexes_length( - &self, - indexes: TodoArray, - length: NSUInteger, - ) -> Id { - msg_send_id![self, initWithIndexes: indexes, length: length] - } - pub unsafe fn initWithIndex(&self, index: NSUInteger) -> Id { - msg_send_id![self, initWithIndex: index] - } - pub unsafe fn indexPathByAddingIndex(&self, index: NSUInteger) -> Id { - msg_send_id![self, indexPathByAddingIndex: index] - } - pub unsafe fn indexPathByRemovingLastIndex(&self) -> Id { - msg_send_id![self, indexPathByRemovingLastIndex] - } - pub unsafe fn indexAtPosition(&self, position: NSUInteger) -> NSUInteger { - msg_send![self, indexAtPosition: position] - } - pub unsafe fn length(&self) -> NSUInteger { - msg_send![self, length] - } - pub unsafe fn getIndexes_range(&self, indexes: NonNull, positionRange: NSRange) { - msg_send![self, getIndexes: indexes, range: positionRange] - } - pub unsafe fn compare(&self, otherObject: &NSIndexPath) -> NSComparisonResult { - msg_send![self, compare: otherObject] - } -} -#[doc = "NSDeprecated"] -impl NSIndexPath { - pub unsafe fn getIndexes(&self, indexes: NonNull) { - msg_send![self, getIndexes: indexes] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSIndexPath { + pub unsafe fn getIndexes(&self, indexes: NonNull) { + msg_send![self, getIndexes: indexes] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index 6a42383f1..fd4ab5675 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSIndexSet; @@ -11,170 +11,172 @@ extern_class!( type Super = NSObject; } ); -impl NSIndexSet { - pub unsafe fn indexSet() -> Id { - msg_send_id![Self::class(), indexSet] +extern_methods!( + unsafe impl NSIndexSet { + pub unsafe fn indexSet() -> Id { + msg_send_id![Self::class(), indexSet] + } + pub unsafe fn indexSetWithIndex(value: NSUInteger) -> Id { + msg_send_id![Self::class(), indexSetWithIndex: value] + } + pub unsafe fn indexSetWithIndexesInRange(range: NSRange) -> Id { + msg_send_id![Self::class(), indexSetWithIndexesInRange: range] + } + pub unsafe fn initWithIndexesInRange(&self, range: NSRange) -> Id { + msg_send_id![self, initWithIndexesInRange: range] + } + pub unsafe fn initWithIndexSet(&self, indexSet: &NSIndexSet) -> Id { + msg_send_id![self, initWithIndexSet: indexSet] + } + pub unsafe fn initWithIndex(&self, value: NSUInteger) -> Id { + msg_send_id![self, initWithIndex: value] + } + pub unsafe fn isEqualToIndexSet(&self, indexSet: &NSIndexSet) -> bool { + msg_send![self, isEqualToIndexSet: indexSet] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn firstIndex(&self) -> NSUInteger { + msg_send![self, firstIndex] + } + pub unsafe fn lastIndex(&self) -> NSUInteger { + msg_send![self, lastIndex] + } + pub unsafe fn indexGreaterThanIndex(&self, value: NSUInteger) -> NSUInteger { + msg_send![self, indexGreaterThanIndex: value] + } + pub unsafe fn indexLessThanIndex(&self, value: NSUInteger) -> NSUInteger { + msg_send![self, indexLessThanIndex: value] + } + pub unsafe fn indexGreaterThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger { + msg_send![self, indexGreaterThanOrEqualToIndex: value] + } + pub unsafe fn indexLessThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger { + msg_send![self, indexLessThanOrEqualToIndex: value] + } + pub unsafe fn getIndexes_maxCount_inIndexRange( + &self, + indexBuffer: NonNull, + bufferSize: NSUInteger, + range: NSRangePointer, + ) -> NSUInteger { + msg_send![ + self, + getIndexes: indexBuffer, + maxCount: bufferSize, + inIndexRange: range + ] + } + pub unsafe fn countOfIndexesInRange(&self, range: NSRange) -> NSUInteger { + msg_send![self, countOfIndexesInRange: range] + } + pub unsafe fn containsIndex(&self, value: NSUInteger) -> bool { + msg_send![self, containsIndex: value] + } + pub unsafe fn containsIndexesInRange(&self, range: NSRange) -> bool { + msg_send![self, containsIndexesInRange: range] + } + pub unsafe fn containsIndexes(&self, indexSet: &NSIndexSet) -> bool { + msg_send![self, containsIndexes: indexSet] + } + pub unsafe fn intersectsIndexesInRange(&self, range: NSRange) -> bool { + msg_send![self, intersectsIndexesInRange: range] + } + pub unsafe fn enumerateIndexesUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateIndexesUsingBlock: block] + } + pub unsafe fn enumerateIndexesWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateIndexesWithOptions: opts, usingBlock: block] + } + pub unsafe fn enumerateIndexesInRange_options_usingBlock( + &self, + range: NSRange, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateIndexesInRange: range, + options: opts, + usingBlock: block + ] + } + pub unsafe fn indexPassingTest(&self, predicate: TodoBlock) -> NSUInteger { + msg_send![self, indexPassingTest: predicate] + } + pub unsafe fn indexWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![self, indexWithOptions: opts, passingTest: predicate] + } + pub unsafe fn indexInRange_options_passingTest( + &self, + range: NSRange, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![ + self, + indexInRange: range, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn indexesPassingTest(&self, predicate: TodoBlock) -> Id { + msg_send_id![self, indexesPassingTest: predicate] + } + pub unsafe fn indexesWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![self, indexesWithOptions: opts, passingTest: predicate] + } + pub unsafe fn indexesInRange_options_passingTest( + &self, + range: NSRange, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![ + self, + indexesInRange: range, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn enumerateRangesUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateRangesUsingBlock: block] + } + pub unsafe fn enumerateRangesWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateRangesWithOptions: opts, usingBlock: block] + } + pub unsafe fn enumerateRangesInRange_options_usingBlock( + &self, + range: NSRange, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateRangesInRange: range, + options: opts, + usingBlock: block + ] + } } - pub unsafe fn indexSetWithIndex(value: NSUInteger) -> Id { - msg_send_id![Self::class(), indexSetWithIndex: value] - } - pub unsafe fn indexSetWithIndexesInRange(range: NSRange) -> Id { - msg_send_id![Self::class(), indexSetWithIndexesInRange: range] - } - pub unsafe fn initWithIndexesInRange(&self, range: NSRange) -> Id { - msg_send_id![self, initWithIndexesInRange: range] - } - pub unsafe fn initWithIndexSet(&self, indexSet: &NSIndexSet) -> Id { - msg_send_id![self, initWithIndexSet: indexSet] - } - pub unsafe fn initWithIndex(&self, value: NSUInteger) -> Id { - msg_send_id![self, initWithIndex: value] - } - pub unsafe fn isEqualToIndexSet(&self, indexSet: &NSIndexSet) -> bool { - msg_send![self, isEqualToIndexSet: indexSet] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn firstIndex(&self) -> NSUInteger { - msg_send![self, firstIndex] - } - pub unsafe fn lastIndex(&self) -> NSUInteger { - msg_send![self, lastIndex] - } - pub unsafe fn indexGreaterThanIndex(&self, value: NSUInteger) -> NSUInteger { - msg_send![self, indexGreaterThanIndex: value] - } - pub unsafe fn indexLessThanIndex(&self, value: NSUInteger) -> NSUInteger { - msg_send![self, indexLessThanIndex: value] - } - pub unsafe fn indexGreaterThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger { - msg_send![self, indexGreaterThanOrEqualToIndex: value] - } - pub unsafe fn indexLessThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger { - msg_send![self, indexLessThanOrEqualToIndex: value] - } - pub unsafe fn getIndexes_maxCount_inIndexRange( - &self, - indexBuffer: NonNull, - bufferSize: NSUInteger, - range: NSRangePointer, - ) -> NSUInteger { - msg_send![ - self, - getIndexes: indexBuffer, - maxCount: bufferSize, - inIndexRange: range - ] - } - pub unsafe fn countOfIndexesInRange(&self, range: NSRange) -> NSUInteger { - msg_send![self, countOfIndexesInRange: range] - } - pub unsafe fn containsIndex(&self, value: NSUInteger) -> bool { - msg_send![self, containsIndex: value] - } - pub unsafe fn containsIndexesInRange(&self, range: NSRange) -> bool { - msg_send![self, containsIndexesInRange: range] - } - pub unsafe fn containsIndexes(&self, indexSet: &NSIndexSet) -> bool { - msg_send![self, containsIndexes: indexSet] - } - pub unsafe fn intersectsIndexesInRange(&self, range: NSRange) -> bool { - msg_send![self, intersectsIndexesInRange: range] - } - pub unsafe fn enumerateIndexesUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateIndexesUsingBlock: block] - } - pub unsafe fn enumerateIndexesWithOptions_usingBlock( - &self, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![self, enumerateIndexesWithOptions: opts, usingBlock: block] - } - pub unsafe fn enumerateIndexesInRange_options_usingBlock( - &self, - range: NSRange, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateIndexesInRange: range, - options: opts, - usingBlock: block - ] - } - pub unsafe fn indexPassingTest(&self, predicate: TodoBlock) -> NSUInteger { - msg_send![self, indexPassingTest: predicate] - } - pub unsafe fn indexWithOptions_passingTest( - &self, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> NSUInteger { - msg_send![self, indexWithOptions: opts, passingTest: predicate] - } - pub unsafe fn indexInRange_options_passingTest( - &self, - range: NSRange, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> NSUInteger { - msg_send![ - self, - indexInRange: range, - options: opts, - passingTest: predicate - ] - } - pub unsafe fn indexesPassingTest(&self, predicate: TodoBlock) -> Id { - msg_send_id![self, indexesPassingTest: predicate] - } - pub unsafe fn indexesWithOptions_passingTest( - &self, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> Id { - msg_send_id![self, indexesWithOptions: opts, passingTest: predicate] - } - pub unsafe fn indexesInRange_options_passingTest( - &self, - range: NSRange, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> Id { - msg_send_id![ - self, - indexesInRange: range, - options: opts, - passingTest: predicate - ] - } - pub unsafe fn enumerateRangesUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateRangesUsingBlock: block] - } - pub unsafe fn enumerateRangesWithOptions_usingBlock( - &self, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![self, enumerateRangesWithOptions: opts, usingBlock: block] - } - pub unsafe fn enumerateRangesInRange_options_usingBlock( - &self, - range: NSRange, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateRangesInRange: range, - options: opts, - usingBlock: block - ] - } -} +); extern_class!( #[derive(Debug)] pub struct NSMutableIndexSet; @@ -182,29 +184,31 @@ extern_class!( type Super = NSIndexSet; } ); -impl NSMutableIndexSet { - pub unsafe fn addIndexes(&self, indexSet: &NSIndexSet) { - msg_send![self, addIndexes: indexSet] - } - pub unsafe fn removeIndexes(&self, indexSet: &NSIndexSet) { - msg_send![self, removeIndexes: indexSet] - } - pub unsafe fn removeAllIndexes(&self) { - msg_send![self, removeAllIndexes] - } - pub unsafe fn addIndex(&self, value: NSUInteger) { - msg_send![self, addIndex: value] +extern_methods!( + unsafe impl NSMutableIndexSet { + pub unsafe fn addIndexes(&self, indexSet: &NSIndexSet) { + msg_send![self, addIndexes: indexSet] + } + pub unsafe fn removeIndexes(&self, indexSet: &NSIndexSet) { + msg_send![self, removeIndexes: indexSet] + } + pub unsafe fn removeAllIndexes(&self) { + msg_send![self, removeAllIndexes] + } + pub unsafe fn addIndex(&self, value: NSUInteger) { + msg_send![self, addIndex: value] + } + pub unsafe fn removeIndex(&self, value: NSUInteger) { + msg_send![self, removeIndex: value] + } + pub unsafe fn addIndexesInRange(&self, range: NSRange) { + msg_send![self, addIndexesInRange: range] + } + pub unsafe fn removeIndexesInRange(&self, range: NSRange) { + msg_send![self, removeIndexesInRange: range] + } + pub unsafe fn shiftIndexesStartingAtIndex_by(&self, index: NSUInteger, delta: NSInteger) { + msg_send![self, shiftIndexesStartingAtIndex: index, by: delta] + } } - pub unsafe fn removeIndex(&self, value: NSUInteger) { - msg_send![self, removeIndex: value] - } - pub unsafe fn addIndexesInRange(&self, range: NSRange) { - msg_send![self, addIndexesInRange: range] - } - pub unsafe fn removeIndexesInRange(&self, range: NSRange) { - msg_send![self, removeIndexesInRange: range] - } - pub unsafe fn shiftIndexesStartingAtIndex_by(&self, index: NSUInteger, delta: NSInteger) { - msg_send![self, shiftIndexesStartingAtIndex: index, by: delta] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index 964dfa526..794f16a5a 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSInflectionRule; @@ -11,14 +11,16 @@ extern_class!( type Super = NSObject; } ); -impl NSInflectionRule { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] +extern_methods!( + unsafe impl NSInflectionRule { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn automaticRule() -> Id { + msg_send_id![Self::class(), automaticRule] + } } - pub unsafe fn automaticRule() -> Id { - msg_send_id![Self::class(), automaticRule] - } -} +); extern_class!( #[derive(Debug)] pub struct NSInflectionRuleExplicit; @@ -26,20 +28,24 @@ extern_class!( type Super = NSInflectionRule; } ); -impl NSInflectionRuleExplicit { - pub unsafe fn initWithMorphology(&self, morphology: &NSMorphology) -> Id { - msg_send_id![self, initWithMorphology: morphology] - } - pub unsafe fn morphology(&self) -> Id { - msg_send_id![self, morphology] +extern_methods!( + unsafe impl NSInflectionRuleExplicit { + pub unsafe fn initWithMorphology(&self, morphology: &NSMorphology) -> Id { + msg_send_id![self, initWithMorphology: morphology] + } + pub unsafe fn morphology(&self) -> Id { + msg_send_id![self, morphology] + } } -} -#[doc = "NSInflectionAvailability"] -impl NSInflectionRule { - pub unsafe fn canInflectLanguage(language: &NSString) -> bool { - msg_send![Self::class(), canInflectLanguage: language] - } - pub unsafe fn canInflectPreferredLocalization() -> bool { - msg_send![Self::class(), canInflectPreferredLocalization] +); +extern_methods!( + #[doc = "NSInflectionAvailability"] + unsafe impl NSInflectionRule { + pub unsafe fn canInflectLanguage(language: &NSString) -> bool { + msg_send![Self::class(), canInflectLanguage: language] + } + pub unsafe fn canInflectPreferredLocalization() -> bool { + msg_send![Self::class(), canInflectPreferredLocalization] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index 1b8f8baef..53c9c075d 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSInvocation; @@ -11,49 +11,59 @@ extern_class!( type Super = NSObject; } ); -impl NSInvocation { - pub unsafe fn invocationWithMethodSignature( - sig: &NSMethodSignature, - ) -> Id { - msg_send_id![Self::class(), invocationWithMethodSignature: sig] +extern_methods!( + unsafe impl NSInvocation { + pub unsafe fn invocationWithMethodSignature( + sig: &NSMethodSignature, + ) -> Id { + msg_send_id![Self::class(), invocationWithMethodSignature: sig] + } + pub unsafe fn methodSignature(&self) -> Id { + msg_send_id![self, methodSignature] + } + pub unsafe fn retainArguments(&self) { + msg_send![self, retainArguments] + } + pub unsafe fn argumentsRetained(&self) -> bool { + msg_send![self, argumentsRetained] + } + pub unsafe fn target(&self) -> Option> { + msg_send_id![self, target] + } + pub unsafe fn setTarget(&self, target: Option<&Object>) { + msg_send![self, setTarget: target] + } + pub unsafe fn selector(&self) -> Sel { + msg_send![self, selector] + } + pub unsafe fn setSelector(&self, selector: Sel) { + msg_send![self, setSelector: selector] + } + pub unsafe fn getReturnValue(&self, retLoc: NonNull) { + msg_send![self, getReturnValue: retLoc] + } + pub unsafe fn setReturnValue(&self, retLoc: NonNull) { + msg_send![self, setReturnValue: retLoc] + } + pub unsafe fn getArgument_atIndex( + &self, + argumentLocation: NonNull, + idx: NSInteger, + ) { + msg_send![self, getArgument: argumentLocation, atIndex: idx] + } + pub unsafe fn setArgument_atIndex( + &self, + argumentLocation: NonNull, + idx: NSInteger, + ) { + msg_send![self, setArgument: argumentLocation, atIndex: idx] + } + pub unsafe fn invoke(&self) { + msg_send![self, invoke] + } + pub unsafe fn invokeWithTarget(&self, target: &Object) { + msg_send![self, invokeWithTarget: target] + } } - pub unsafe fn methodSignature(&self) -> Id { - msg_send_id![self, methodSignature] - } - pub unsafe fn retainArguments(&self) { - msg_send![self, retainArguments] - } - pub unsafe fn argumentsRetained(&self) -> bool { - msg_send![self, argumentsRetained] - } - pub unsafe fn target(&self) -> Option> { - msg_send_id![self, target] - } - pub unsafe fn setTarget(&self, target: Option<&Object>) { - msg_send![self, setTarget: target] - } - pub unsafe fn selector(&self) -> Sel { - msg_send![self, selector] - } - pub unsafe fn setSelector(&self, selector: Sel) { - msg_send![self, setSelector: selector] - } - pub unsafe fn getReturnValue(&self, retLoc: NonNull) { - msg_send![self, getReturnValue: retLoc] - } - pub unsafe fn setReturnValue(&self, retLoc: NonNull) { - msg_send![self, setReturnValue: retLoc] - } - pub unsafe fn getArgument_atIndex(&self, argumentLocation: NonNull, idx: NSInteger) { - msg_send![self, getArgument: argumentLocation, atIndex: idx] - } - pub unsafe fn setArgument_atIndex(&self, argumentLocation: NonNull, idx: NSInteger) { - msg_send![self, setArgument: argumentLocation, atIndex: idx] - } - pub unsafe fn invoke(&self) { - msg_send![self, invoke] - } - pub unsafe fn invokeWithTarget(&self, target: &Object) { - msg_send![self, invokeWithTarget: target] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 524b59c6f..b58ee214b 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSItemProviderWriting = NSObject; pub type NSItemProviderReading = NSObject; extern_class!( @@ -13,165 +13,172 @@ extern_class!( type Super = NSObject; } ); -impl NSItemProvider { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] +extern_methods!( + unsafe impl NSItemProvider { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn registerDataRepresentationForTypeIdentifier_visibility_loadHandler( + &self, + typeIdentifier: &NSString, + visibility: NSItemProviderRepresentationVisibility, + loadHandler: TodoBlock, + ) { + msg_send![ + self, + registerDataRepresentationForTypeIdentifier: typeIdentifier, + visibility: visibility, + loadHandler: loadHandler + ] + } + pub unsafe fn registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler( + &self, + typeIdentifier: &NSString, + fileOptions: NSItemProviderFileOptions, + visibility: NSItemProviderRepresentationVisibility, + loadHandler: TodoBlock, + ) { + msg_send![ + self, + registerFileRepresentationForTypeIdentifier: typeIdentifier, + fileOptions: fileOptions, + visibility: visibility, + loadHandler: loadHandler + ] + } + pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared> { + msg_send_id![self, registeredTypeIdentifiers] + } + pub unsafe fn registeredTypeIdentifiersWithFileOptions( + &self, + fileOptions: NSItemProviderFileOptions, + ) -> Id, Shared> { + msg_send_id![self, registeredTypeIdentifiersWithFileOptions: fileOptions] + } + pub unsafe fn hasItemConformingToTypeIdentifier(&self, typeIdentifier: &NSString) -> bool { + msg_send![self, hasItemConformingToTypeIdentifier: typeIdentifier] + } + pub unsafe fn hasRepresentationConformingToTypeIdentifier_fileOptions( + &self, + typeIdentifier: &NSString, + fileOptions: NSItemProviderFileOptions, + ) -> bool { + msg_send![ + self, + hasRepresentationConformingToTypeIdentifier: typeIdentifier, + fileOptions: fileOptions + ] + } + pub unsafe fn loadDataRepresentationForTypeIdentifier_completionHandler( + &self, + typeIdentifier: &NSString, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + loadDataRepresentationForTypeIdentifier: typeIdentifier, + completionHandler: completionHandler + ] + } + pub unsafe fn loadFileRepresentationForTypeIdentifier_completionHandler( + &self, + typeIdentifier: &NSString, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + loadFileRepresentationForTypeIdentifier: typeIdentifier, + completionHandler: completionHandler + ] + } + pub unsafe fn loadInPlaceFileRepresentationForTypeIdentifier_completionHandler( + &self, + typeIdentifier: &NSString, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + loadInPlaceFileRepresentationForTypeIdentifier: typeIdentifier, + completionHandler: completionHandler + ] + } + pub unsafe fn suggestedName(&self) -> Option> { + msg_send_id![self, suggestedName] + } + pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>) { + msg_send![self, setSuggestedName: suggestedName] + } + pub unsafe fn initWithObject(&self, object: &NSItemProviderWriting) -> Id { + msg_send_id![self, initWithObject: object] + } + pub unsafe fn registerObject_visibility( + &self, + object: &NSItemProviderWriting, + visibility: NSItemProviderRepresentationVisibility, + ) { + msg_send![self, registerObject: object, visibility: visibility] + } + pub unsafe fn initWithItem_typeIdentifier( + &self, + item: Option<&NSSecureCoding>, + typeIdentifier: Option<&NSString>, + ) -> Id { + msg_send_id![self, initWithItem: item, typeIdentifier: typeIdentifier] + } + pub unsafe fn initWithContentsOfURL( + &self, + fileURL: Option<&NSURL>, + ) -> Option> { + msg_send_id![self, initWithContentsOfURL: fileURL] + } + pub unsafe fn registerItemForTypeIdentifier_loadHandler( + &self, + typeIdentifier: &NSString, + loadHandler: NSItemProviderLoadHandler, + ) { + msg_send![ + self, + registerItemForTypeIdentifier: typeIdentifier, + loadHandler: loadHandler + ] + } + pub unsafe fn loadItemForTypeIdentifier_options_completionHandler( + &self, + typeIdentifier: &NSString, + options: Option<&NSDictionary>, + completionHandler: NSItemProviderCompletionHandler, + ) { + msg_send![ + self, + loadItemForTypeIdentifier: typeIdentifier, + options: options, + completionHandler: completionHandler + ] + } } - pub unsafe fn registerDataRepresentationForTypeIdentifier_visibility_loadHandler( - &self, - typeIdentifier: &NSString, - visibility: NSItemProviderRepresentationVisibility, - loadHandler: TodoBlock, - ) { - msg_send![ - self, - registerDataRepresentationForTypeIdentifier: typeIdentifier, - visibility: visibility, - loadHandler: loadHandler - ] - } - pub unsafe fn registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler( - &self, - typeIdentifier: &NSString, - fileOptions: NSItemProviderFileOptions, - visibility: NSItemProviderRepresentationVisibility, - loadHandler: TodoBlock, - ) { - msg_send![ - self, - registerFileRepresentationForTypeIdentifier: typeIdentifier, - fileOptions: fileOptions, - visibility: visibility, - loadHandler: loadHandler - ] - } - pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared> { - msg_send_id![self, registeredTypeIdentifiers] - } - pub unsafe fn registeredTypeIdentifiersWithFileOptions( - &self, - fileOptions: NSItemProviderFileOptions, - ) -> Id, Shared> { - msg_send_id![self, registeredTypeIdentifiersWithFileOptions: fileOptions] - } - pub unsafe fn hasItemConformingToTypeIdentifier(&self, typeIdentifier: &NSString) -> bool { - msg_send![self, hasItemConformingToTypeIdentifier: typeIdentifier] - } - pub unsafe fn hasRepresentationConformingToTypeIdentifier_fileOptions( - &self, - typeIdentifier: &NSString, - fileOptions: NSItemProviderFileOptions, - ) -> bool { - msg_send![ - self, - hasRepresentationConformingToTypeIdentifier: typeIdentifier, - fileOptions: fileOptions - ] - } - pub unsafe fn loadDataRepresentationForTypeIdentifier_completionHandler( - &self, - typeIdentifier: &NSString, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - loadDataRepresentationForTypeIdentifier: typeIdentifier, - completionHandler: completionHandler - ] - } - pub unsafe fn loadFileRepresentationForTypeIdentifier_completionHandler( - &self, - typeIdentifier: &NSString, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - loadFileRepresentationForTypeIdentifier: typeIdentifier, - completionHandler: completionHandler - ] - } - pub unsafe fn loadInPlaceFileRepresentationForTypeIdentifier_completionHandler( - &self, - typeIdentifier: &NSString, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - loadInPlaceFileRepresentationForTypeIdentifier: typeIdentifier, - completionHandler: completionHandler - ] - } - pub unsafe fn suggestedName(&self) -> Option> { - msg_send_id![self, suggestedName] - } - pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>) { - msg_send![self, setSuggestedName: suggestedName] - } - pub unsafe fn initWithObject(&self, object: &NSItemProviderWriting) -> Id { - msg_send_id![self, initWithObject: object] - } - pub unsafe fn registerObject_visibility( - &self, - object: &NSItemProviderWriting, - visibility: NSItemProviderRepresentationVisibility, - ) { - msg_send![self, registerObject: object, visibility: visibility] - } - pub unsafe fn initWithItem_typeIdentifier( - &self, - item: Option<&NSSecureCoding>, - typeIdentifier: Option<&NSString>, - ) -> Id { - msg_send_id![self, initWithItem: item, typeIdentifier: typeIdentifier] - } - pub unsafe fn initWithContentsOfURL( - &self, - fileURL: Option<&NSURL>, - ) -> Option> { - msg_send_id![self, initWithContentsOfURL: fileURL] - } - pub unsafe fn registerItemForTypeIdentifier_loadHandler( - &self, - typeIdentifier: &NSString, - loadHandler: NSItemProviderLoadHandler, - ) { - msg_send![ - self, - registerItemForTypeIdentifier: typeIdentifier, - loadHandler: loadHandler - ] - } - pub unsafe fn loadItemForTypeIdentifier_options_completionHandler( - &self, - typeIdentifier: &NSString, - options: Option<&NSDictionary>, - completionHandler: NSItemProviderCompletionHandler, - ) { - msg_send![ - self, - loadItemForTypeIdentifier: typeIdentifier, - options: options, - completionHandler: completionHandler - ] - } -} -#[doc = "NSPreviewSupport"] -impl NSItemProvider { - pub unsafe fn previewImageHandler(&self) -> NSItemProviderLoadHandler { - msg_send![self, previewImageHandler] - } - pub unsafe fn setPreviewImageHandler(&self, previewImageHandler: NSItemProviderLoadHandler) { - msg_send![self, setPreviewImageHandler: previewImageHandler] - } - pub unsafe fn loadPreviewImageWithOptions_completionHandler( - &self, - options: Option<&NSDictionary>, - completionHandler: NSItemProviderCompletionHandler, - ) { - msg_send![ - self, - loadPreviewImageWithOptions: options, - completionHandler: completionHandler - ] +); +extern_methods!( + #[doc = "NSPreviewSupport"] + unsafe impl NSItemProvider { + pub unsafe fn previewImageHandler(&self) -> NSItemProviderLoadHandler { + msg_send![self, previewImageHandler] + } + pub unsafe fn setPreviewImageHandler( + &self, + previewImageHandler: NSItemProviderLoadHandler, + ) { + msg_send![self, setPreviewImageHandler: previewImageHandler] + } + pub unsafe fn loadPreviewImageWithOptions_completionHandler( + &self, + options: Option<&NSDictionary>, + completionHandler: NSItemProviderCompletionHandler, + ) { + msg_send![ + self, + loadPreviewImageWithOptions: options, + completionHandler: completionHandler + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 6ed79c4a9..4e6a06b09 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSJSONSerialization; @@ -14,41 +14,43 @@ extern_class!( type Super = NSObject; } ); -impl NSJSONSerialization { - pub unsafe fn isValidJSONObject(obj: &Object) -> bool { - msg_send![Self::class(), isValidJSONObject: obj] +extern_methods!( + unsafe impl NSJSONSerialization { + pub unsafe fn isValidJSONObject(obj: &Object) -> bool { + msg_send![Self::class(), isValidJSONObject: obj] + } + pub unsafe fn dataWithJSONObject_options_error( + obj: &Object, + opt: NSJSONWritingOptions, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + dataWithJSONObject: obj, + options: opt, + error: _ + ] + } + pub unsafe fn JSONObjectWithData_options_error( + data: &NSData, + opt: NSJSONReadingOptions, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + JSONObjectWithData: data, + options: opt, + error: _ + ] + } + pub unsafe fn JSONObjectWithStream_options_error( + stream: &NSInputStream, + opt: NSJSONReadingOptions, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + JSONObjectWithStream: stream, + options: opt, + error: _ + ] + } } - pub unsafe fn dataWithJSONObject_options_error( - obj: &Object, - opt: NSJSONWritingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - dataWithJSONObject: obj, - options: opt, - error: _ - ] - } - pub unsafe fn JSONObjectWithData_options_error( - data: &NSData, - opt: NSJSONReadingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - JSONObjectWithData: data, - options: opt, - error: _ - ] - } - pub unsafe fn JSONObjectWithStream_options_error( - stream: &NSInputStream, - opt: NSJSONReadingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - JSONObjectWithStream: stream, - options: opt, - error: _ - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index dd1b694ce..b817cad8b 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -8,162 +8,182 @@ use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSKeyValueOperator = NSString; -#[doc = "NSKeyValueCoding"] -impl NSObject { - pub unsafe fn accessInstanceVariablesDirectly() -> bool { - msg_send![Self::class(), accessInstanceVariablesDirectly] - } - pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } - pub unsafe fn validateValue_forKey_error( - &self, - ioValue: &mut Option>, - inKey: &NSString, - ) -> Result<(), Id> { - msg_send![self, validateValue: ioValue, forKey: inKey, error: _] - } - pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, mutableArrayValueForKey: key] - } - pub unsafe fn mutableOrderedSetValueForKey( - &self, - key: &NSString, - ) -> Id { - msg_send_id![self, mutableOrderedSetValueForKey: key] - } - pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, mutableSetValueForKey: key] - } - pub unsafe fn valueForKeyPath(&self, keyPath: &NSString) -> Option> { - msg_send_id![self, valueForKeyPath: keyPath] - } - pub unsafe fn setValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { - msg_send![self, setValue: value, forKeyPath: keyPath] - } - pub unsafe fn validateValue_forKeyPath_error( - &self, - ioValue: &mut Option>, - inKeyPath: &NSString, - ) -> Result<(), Id> { - msg_send![ - self, - validateValue: ioValue, - forKeyPath: inKeyPath, - error: _ - ] - } - pub unsafe fn mutableArrayValueForKeyPath( - &self, - keyPath: &NSString, - ) -> Id { - msg_send_id![self, mutableArrayValueForKeyPath: keyPath] - } - pub unsafe fn mutableOrderedSetValueForKeyPath( - &self, - keyPath: &NSString, - ) -> Id { - msg_send_id![self, mutableOrderedSetValueForKeyPath: keyPath] - } - pub unsafe fn mutableSetValueForKeyPath(&self, keyPath: &NSString) -> Id { - msg_send_id![self, mutableSetValueForKeyPath: keyPath] - } - pub unsafe fn valueForUndefinedKey(&self, key: &NSString) -> Option> { - msg_send_id![self, valueForUndefinedKey: key] - } - pub unsafe fn setValue_forUndefinedKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forUndefinedKey: key] - } - pub unsafe fn setNilValueForKey(&self, key: &NSString) { - msg_send![self, setNilValueForKey: key] - } - pub unsafe fn dictionaryWithValuesForKeys( - &self, - keys: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, dictionaryWithValuesForKeys: keys] - } - pub unsafe fn setValuesForKeysWithDictionary( - &self, - keyedValues: &NSDictionary, - ) { - msg_send![self, setValuesForKeysWithDictionary: keyedValues] - } -} -#[doc = "NSKeyValueCoding"] -impl NSArray { - pub unsafe fn valueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } -} -#[doc = "NSKeyValueCoding"] -impl NSDictionary { - pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, valueForKey: key] - } -} -#[doc = "NSKeyValueCoding"] -impl NSMutableDictionary { - pub unsafe fn setValue_forKey(&self, value: Option<&ObjectType>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } -} -#[doc = "NSKeyValueCoding"] -impl NSOrderedSet { - pub unsafe fn valueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } -} -#[doc = "NSKeyValueCoding"] -impl NSSet { - pub unsafe fn valueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } -} -#[doc = "NSDeprecatedKeyValueCoding"] -impl NSObject { - pub unsafe fn useStoredAccessor() -> bool { - msg_send![Self::class(), useStoredAccessor] - } - pub unsafe fn storedValueForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, storedValueForKey: key] - } - pub unsafe fn takeStoredValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, takeStoredValue: value, forKey: key] - } - pub unsafe fn takeValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, takeValue: value, forKey: key] - } - pub unsafe fn takeValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { - msg_send![self, takeValue: value, forKeyPath: keyPath] - } - pub unsafe fn handleQueryWithUnboundKey(&self, key: &NSString) -> Option> { - msg_send_id![self, handleQueryWithUnboundKey: key] - } - pub unsafe fn handleTakeValue_forUnboundKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, handleTakeValue: value, forUnboundKey: key] - } - pub unsafe fn unableToSetNilForKey(&self, key: &NSString) { - msg_send![self, unableToSetNilForKey: key] - } - pub unsafe fn valuesForKeys(&self, keys: &NSArray) -> Id { - msg_send_id![self, valuesForKeys: keys] - } - pub unsafe fn takeValuesFromDictionary(&self, properties: &NSDictionary) { - msg_send![self, takeValuesFromDictionary: properties] - } -} +extern_methods!( + #[doc = "NSKeyValueCoding"] + unsafe impl NSObject { + pub unsafe fn accessInstanceVariablesDirectly() -> bool { + msg_send![Self::class(), accessInstanceVariablesDirectly] + } + pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } + pub unsafe fn validateValue_forKey_error( + &self, + ioValue: &mut Option>, + inKey: &NSString, + ) -> Result<(), Id> { + msg_send![self, validateValue: ioValue, forKey: inKey, error: _] + } + pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, mutableArrayValueForKey: key] + } + pub unsafe fn mutableOrderedSetValueForKey( + &self, + key: &NSString, + ) -> Id { + msg_send_id![self, mutableOrderedSetValueForKey: key] + } + pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, mutableSetValueForKey: key] + } + pub unsafe fn valueForKeyPath(&self, keyPath: &NSString) -> Option> { + msg_send_id![self, valueForKeyPath: keyPath] + } + pub unsafe fn setValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { + msg_send![self, setValue: value, forKeyPath: keyPath] + } + pub unsafe fn validateValue_forKeyPath_error( + &self, + ioValue: &mut Option>, + inKeyPath: &NSString, + ) -> Result<(), Id> { + msg_send![ + self, + validateValue: ioValue, + forKeyPath: inKeyPath, + error: _ + ] + } + pub unsafe fn mutableArrayValueForKeyPath( + &self, + keyPath: &NSString, + ) -> Id { + msg_send_id![self, mutableArrayValueForKeyPath: keyPath] + } + pub unsafe fn mutableOrderedSetValueForKeyPath( + &self, + keyPath: &NSString, + ) -> Id { + msg_send_id![self, mutableOrderedSetValueForKeyPath: keyPath] + } + pub unsafe fn mutableSetValueForKeyPath( + &self, + keyPath: &NSString, + ) -> Id { + msg_send_id![self, mutableSetValueForKeyPath: keyPath] + } + pub unsafe fn valueForUndefinedKey(&self, key: &NSString) -> Option> { + msg_send_id![self, valueForUndefinedKey: key] + } + pub unsafe fn setValue_forUndefinedKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forUndefinedKey: key] + } + pub unsafe fn setNilValueForKey(&self, key: &NSString) { + msg_send![self, setNilValueForKey: key] + } + pub unsafe fn dictionaryWithValuesForKeys( + &self, + keys: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, dictionaryWithValuesForKeys: keys] + } + pub unsafe fn setValuesForKeysWithDictionary( + &self, + keyedValues: &NSDictionary, + ) { + msg_send![self, setValuesForKeysWithDictionary: keyedValues] + } + } +); +extern_methods!( + #[doc = "NSKeyValueCoding"] + unsafe impl NSArray { + pub unsafe fn valueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } + } +); +extern_methods!( + #[doc = "NSKeyValueCoding"] + unsafe impl NSDictionary { + pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, valueForKey: key] + } + } +); +extern_methods!( + #[doc = "NSKeyValueCoding"] + unsafe impl NSMutableDictionary { + pub unsafe fn setValue_forKey(&self, value: Option<&ObjectType>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } + } +); +extern_methods!( + #[doc = "NSKeyValueCoding"] + unsafe impl NSOrderedSet { + pub unsafe fn valueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } + } +); +extern_methods!( + #[doc = "NSKeyValueCoding"] + unsafe impl NSSet { + pub unsafe fn valueForKey(&self, key: &NSString) -> Id { + msg_send_id![self, valueForKey: key] + } + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, setValue: value, forKey: key] + } + } +); +extern_methods!( + #[doc = "NSDeprecatedKeyValueCoding"] + unsafe impl NSObject { + pub unsafe fn useStoredAccessor() -> bool { + msg_send![Self::class(), useStoredAccessor] + } + pub unsafe fn storedValueForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, storedValueForKey: key] + } + pub unsafe fn takeStoredValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, takeStoredValue: value, forKey: key] + } + pub unsafe fn takeValue_forKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, takeValue: value, forKey: key] + } + pub unsafe fn takeValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { + msg_send![self, takeValue: value, forKeyPath: keyPath] + } + pub unsafe fn handleQueryWithUnboundKey( + &self, + key: &NSString, + ) -> Option> { + msg_send_id![self, handleQueryWithUnboundKey: key] + } + pub unsafe fn handleTakeValue_forUnboundKey(&self, value: Option<&Object>, key: &NSString) { + msg_send![self, handleTakeValue: value, forUnboundKey: key] + } + pub unsafe fn unableToSetNilForKey(&self, key: &NSString) { + msg_send![self, unableToSetNilForKey: key] + } + pub unsafe fn valuesForKeys(&self, keys: &NSArray) -> Id { + msg_send_id![self, valuesForKeys: keys] + } + pub unsafe fn takeValuesFromDictionary(&self, properties: &NSDictionary) { + msg_send![self, takeValuesFromDictionary: properties] + } + } +); diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 3ad894fdf..b517c16b4 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -7,295 +7,311 @@ use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSKeyValueChangeKey = NSString; -#[doc = "NSKeyValueObserving"] -impl NSObject { - pub unsafe fn observeValueForKeyPath_ofObject_change_context( - &self, - keyPath: Option<&NSString>, - object: Option<&Object>, - change: Option<&NSDictionary>, - context: *mut c_void, - ) { - msg_send![ - self, - observeValueForKeyPath: keyPath, - ofObject: object, - change: change, - context: context - ] +extern_methods!( + #[doc = "NSKeyValueObserving"] + unsafe impl NSObject { + pub unsafe fn observeValueForKeyPath_ofObject_change_context( + &self, + keyPath: Option<&NSString>, + object: Option<&Object>, + change: Option<&NSDictionary>, + context: *mut c_void, + ) { + msg_send![ + self, + observeValueForKeyPath: keyPath, + ofObject: object, + change: change, + context: context + ] + } } -} -#[doc = "NSKeyValueObserverRegistration"] -impl NSObject { - pub unsafe fn addObserver_forKeyPath_options_context( - &self, - observer: &NSObject, - keyPath: &NSString, - options: NSKeyValueObservingOptions, - context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] +); +extern_methods!( + #[doc = "NSKeyValueObserverRegistration"] + unsafe impl NSObject { + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } } - pub unsafe fn removeObserver_forKeyPath_context( - &self, - observer: &NSObject, - keyPath: &NSString, - context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] +); +extern_methods!( + #[doc = "NSKeyValueObserverRegistration"] + unsafe impl NSArray { + pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + toObjectsAtIndexes: indexes, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath_context( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + fromObjectsAtIndexes: indexes, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( + &self, + observer: &NSObject, + indexes: &NSIndexSet, + keyPath: &NSString, + ) { + msg_send![ + self, + removeObserver: observer, + fromObjectsAtIndexes: indexes, + forKeyPath: keyPath + ] + } + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] +); +extern_methods!( + #[doc = "NSKeyValueObserverRegistration"] + unsafe impl NSOrderedSet { + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } } -} -#[doc = "NSKeyValueObserverRegistration"] -impl NSArray { - pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( - &self, - observer: &NSObject, - indexes: &NSIndexSet, - keyPath: &NSString, - options: NSKeyValueObservingOptions, - context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - toObjectsAtIndexes: indexes, - forKeyPath: keyPath, - options: options, - context: context - ] +); +extern_methods!( + #[doc = "NSKeyValueObserverRegistration"] + unsafe impl NSSet { + pub unsafe fn addObserver_forKeyPath_options_context( + &self, + observer: &NSObject, + keyPath: &NSString, + options: NSKeyValueObservingOptions, + context: *mut c_void, + ) { + msg_send![ + self, + addObserver: observer, + forKeyPath: keyPath, + options: options, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath_context( + &self, + observer: &NSObject, + keyPath: &NSString, + context: *mut c_void, + ) { + msg_send![ + self, + removeObserver: observer, + forKeyPath: keyPath, + context: context + ] + } + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { + msg_send![self, removeObserver: observer, forKeyPath: keyPath] + } } - pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath_context( - &self, - observer: &NSObject, - indexes: &NSIndexSet, - keyPath: &NSString, - context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - fromObjectsAtIndexes: indexes, - forKeyPath: keyPath, - context: context - ] +); +extern_methods!( + #[doc = "NSKeyValueObserverNotification"] + unsafe impl NSObject { + pub unsafe fn willChangeValueForKey(&self, key: &NSString) { + msg_send![self, willChangeValueForKey: key] + } + pub unsafe fn didChangeValueForKey(&self, key: &NSString) { + msg_send![self, didChangeValueForKey: key] + } + pub unsafe fn willChange_valuesAtIndexes_forKey( + &self, + changeKind: NSKeyValueChange, + indexes: &NSIndexSet, + key: &NSString, + ) { + msg_send![ + self, + willChange: changeKind, + valuesAtIndexes: indexes, + forKey: key + ] + } + pub unsafe fn didChange_valuesAtIndexes_forKey( + &self, + changeKind: NSKeyValueChange, + indexes: &NSIndexSet, + key: &NSString, + ) { + msg_send![ + self, + didChange: changeKind, + valuesAtIndexes: indexes, + forKey: key + ] + } + pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects( + &self, + key: &NSString, + mutationKind: NSKeyValueSetMutationKind, + objects: &NSSet, + ) { + msg_send![ + self, + willChangeValueForKey: key, + withSetMutation: mutationKind, + usingObjects: objects + ] + } + pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects( + &self, + key: &NSString, + mutationKind: NSKeyValueSetMutationKind, + objects: &NSSet, + ) { + msg_send![ + self, + didChangeValueForKey: key, + withSetMutation: mutationKind, + usingObjects: objects + ] + } } - pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( - &self, - observer: &NSObject, - indexes: &NSIndexSet, - keyPath: &NSString, - ) { - msg_send![ - self, - removeObserver: observer, - fromObjectsAtIndexes: indexes, - forKeyPath: keyPath - ] +); +extern_methods!( + #[doc = "NSKeyValueObservingCustomization"] + unsafe impl NSObject { + pub unsafe fn keyPathsForValuesAffectingValueForKey( + key: &NSString, + ) -> Id, Shared> { + msg_send_id![Self::class(), keyPathsForValuesAffectingValueForKey: key] + } + pub unsafe fn automaticallyNotifiesObserversForKey(key: &NSString) -> bool { + msg_send![Self::class(), automaticallyNotifiesObserversForKey: key] + } + pub unsafe fn observationInfo(&self) -> *mut c_void { + msg_send![self, observationInfo] + } + pub unsafe fn setObservationInfo(&self, observationInfo: *mut c_void) { + msg_send![self, setObservationInfo: observationInfo] + } } - pub unsafe fn addObserver_forKeyPath_options_context( - &self, - observer: &NSObject, - keyPath: &NSString, - options: NSKeyValueObservingOptions, - context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] +); +extern_methods!( + #[doc = "NSDeprecatedKeyValueObservingCustomization"] + unsafe impl NSObject { + pub unsafe fn setKeys_triggerChangeNotificationsForDependentKey( + keys: &NSArray, + dependentKey: &NSString, + ) { + msg_send![ + Self::class(), + setKeys: keys, + triggerChangeNotificationsForDependentKey: dependentKey + ] + } } - pub unsafe fn removeObserver_forKeyPath_context( - &self, - observer: &NSObject, - keyPath: &NSString, - context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } -} -#[doc = "NSKeyValueObserverRegistration"] -impl NSOrderedSet { - pub unsafe fn addObserver_forKeyPath_options_context( - &self, - observer: &NSObject, - keyPath: &NSString, - options: NSKeyValueObservingOptions, - context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath_context( - &self, - observer: &NSObject, - keyPath: &NSString, - context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } -} -#[doc = "NSKeyValueObserverRegistration"] -impl NSSet { - pub unsafe fn addObserver_forKeyPath_options_context( - &self, - observer: &NSObject, - keyPath: &NSString, - options: NSKeyValueObservingOptions, - context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath_context( - &self, - observer: &NSObject, - keyPath: &NSString, - context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } -} -#[doc = "NSKeyValueObserverNotification"] -impl NSObject { - pub unsafe fn willChangeValueForKey(&self, key: &NSString) { - msg_send![self, willChangeValueForKey: key] - } - pub unsafe fn didChangeValueForKey(&self, key: &NSString) { - msg_send![self, didChangeValueForKey: key] - } - pub unsafe fn willChange_valuesAtIndexes_forKey( - &self, - changeKind: NSKeyValueChange, - indexes: &NSIndexSet, - key: &NSString, - ) { - msg_send![ - self, - willChange: changeKind, - valuesAtIndexes: indexes, - forKey: key - ] - } - pub unsafe fn didChange_valuesAtIndexes_forKey( - &self, - changeKind: NSKeyValueChange, - indexes: &NSIndexSet, - key: &NSString, - ) { - msg_send![ - self, - didChange: changeKind, - valuesAtIndexes: indexes, - forKey: key - ] - } - pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects( - &self, - key: &NSString, - mutationKind: NSKeyValueSetMutationKind, - objects: &NSSet, - ) { - msg_send![ - self, - willChangeValueForKey: key, - withSetMutation: mutationKind, - usingObjects: objects - ] - } - pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects( - &self, - key: &NSString, - mutationKind: NSKeyValueSetMutationKind, - objects: &NSSet, - ) { - msg_send![ - self, - didChangeValueForKey: key, - withSetMutation: mutationKind, - usingObjects: objects - ] - } -} -#[doc = "NSKeyValueObservingCustomization"] -impl NSObject { - pub unsafe fn keyPathsForValuesAffectingValueForKey( - key: &NSString, - ) -> Id, Shared> { - msg_send_id![Self::class(), keyPathsForValuesAffectingValueForKey: key] - } - pub unsafe fn automaticallyNotifiesObserversForKey(key: &NSString) -> bool { - msg_send![Self::class(), automaticallyNotifiesObserversForKey: key] - } - pub unsafe fn observationInfo(&self) -> *mut c_void { - msg_send![self, observationInfo] - } - pub unsafe fn setObservationInfo(&self, observationInfo: *mut c_void) { - msg_send![self, setObservationInfo: observationInfo] - } -} -#[doc = "NSDeprecatedKeyValueObservingCustomization"] -impl NSObject { - pub unsafe fn setKeys_triggerChangeNotificationsForDependentKey( - keys: &NSArray, - dependentKey: &NSString, - ) { - msg_send![ - Self::class(), - setKeys: keys, - triggerChangeNotificationsForDependentKey: dependentKey - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 42185fb39..35e24be58 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSPropertyList::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSKeyedArchiver; @@ -17,102 +17,114 @@ extern_class!( type Super = NSCoder; } ); -impl NSKeyedArchiver { - pub unsafe fn initRequiringSecureCoding(&self, requiresSecureCoding: bool) -> Id { - msg_send_id![self, initRequiringSecureCoding: requiresSecureCoding] +extern_methods!( + unsafe impl NSKeyedArchiver { + pub unsafe fn initRequiringSecureCoding( + &self, + requiresSecureCoding: bool, + ) -> Id { + msg_send_id![self, initRequiringSecureCoding: requiresSecureCoding] + } + pub unsafe fn archivedDataWithRootObject_requiringSecureCoding_error( + object: &Object, + requiresSecureCoding: bool, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + archivedDataWithRootObject: object, + requiringSecureCoding: requiresSecureCoding, + error: _ + ] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initForWritingWithMutableData( + &self, + data: &NSMutableData, + ) -> Id { + msg_send_id![self, initForWritingWithMutableData: data] + } + pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id { + msg_send_id![Self::class(), archivedDataWithRootObject: rootObject] + } + pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool { + msg_send![Self::class(), archiveRootObject: rootObject, toFile: path] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedArchiverDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn outputFormat(&self) -> NSPropertyListFormat { + msg_send![self, outputFormat] + } + pub unsafe fn setOutputFormat(&self, outputFormat: NSPropertyListFormat) { + msg_send![self, setOutputFormat: outputFormat] + } + pub unsafe fn encodedData(&self) -> Id { + msg_send_id![self, encodedData] + } + pub unsafe fn finishEncoding(&self) { + msg_send![self, finishEncoding] + } + pub unsafe fn setClassName_forClass(codedName: Option<&NSString>, cls: &Class) { + msg_send![Self::class(), setClassName: codedName, forClass: cls] + } + pub unsafe fn setClassName_forClass(&self, codedName: Option<&NSString>, cls: &Class) { + msg_send![self, setClassName: codedName, forClass: cls] + } + pub unsafe fn classNameForClass(cls: &Class) -> Option> { + msg_send_id![Self::class(), classNameForClass: cls] + } + pub unsafe fn classNameForClass(&self, cls: &Class) -> Option> { + msg_send_id![self, classNameForClass: cls] + } + pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString) { + msg_send![self, encodeObject: object, forKey: key] + } + pub unsafe fn encodeConditionalObject_forKey( + &self, + object: Option<&Object>, + key: &NSString, + ) { + msg_send![self, encodeConditionalObject: object, forKey: key] + } + pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString) { + msg_send![self, encodeBool: value, forKey: key] + } + pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString) { + msg_send![self, encodeInt: value, forKey: key] + } + pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString) { + msg_send![self, encodeInt32: value, forKey: key] + } + pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString) { + msg_send![self, encodeInt64: value, forKey: key] + } + pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString) { + msg_send![self, encodeFloat: value, forKey: key] + } + pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString) { + msg_send![self, encodeDouble: value, forKey: key] + } + pub unsafe fn encodeBytes_length_forKey( + &self, + bytes: *mut u8, + length: NSUInteger, + key: &NSString, + ) { + msg_send![self, encodeBytes: bytes, length: length, forKey: key] + } + pub unsafe fn requiresSecureCoding(&self) -> bool { + msg_send![self, requiresSecureCoding] + } + pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool) { + msg_send![self, setRequiresSecureCoding: requiresSecureCoding] + } } - pub unsafe fn archivedDataWithRootObject_requiringSecureCoding_error( - object: &Object, - requiresSecureCoding: bool, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - archivedDataWithRootObject: object, - requiringSecureCoding: requiresSecureCoding, - error: _ - ] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initForWritingWithMutableData(&self, data: &NSMutableData) -> Id { - msg_send_id![self, initForWritingWithMutableData: data] - } - pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id { - msg_send_id![Self::class(), archivedDataWithRootObject: rootObject] - } - pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool { - msg_send![Self::class(), archiveRootObject: rootObject, toFile: path] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedArchiverDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn outputFormat(&self) -> NSPropertyListFormat { - msg_send![self, outputFormat] - } - pub unsafe fn setOutputFormat(&self, outputFormat: NSPropertyListFormat) { - msg_send![self, setOutputFormat: outputFormat] - } - pub unsafe fn encodedData(&self) -> Id { - msg_send_id![self, encodedData] - } - pub unsafe fn finishEncoding(&self) { - msg_send![self, finishEncoding] - } - pub unsafe fn setClassName_forClass(codedName: Option<&NSString>, cls: &Class) { - msg_send![Self::class(), setClassName: codedName, forClass: cls] - } - pub unsafe fn setClassName_forClass(&self, codedName: Option<&NSString>, cls: &Class) { - msg_send![self, setClassName: codedName, forClass: cls] - } - pub unsafe fn classNameForClass(cls: &Class) -> Option> { - msg_send_id![Self::class(), classNameForClass: cls] - } - pub unsafe fn classNameForClass(&self, cls: &Class) -> Option> { - msg_send_id![self, classNameForClass: cls] - } - pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString) { - msg_send![self, encodeObject: object, forKey: key] - } - pub unsafe fn encodeConditionalObject_forKey(&self, object: Option<&Object>, key: &NSString) { - msg_send![self, encodeConditionalObject: object, forKey: key] - } - pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString) { - msg_send![self, encodeBool: value, forKey: key] - } - pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString) { - msg_send![self, encodeInt: value, forKey: key] - } - pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString) { - msg_send![self, encodeInt32: value, forKey: key] - } - pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString) { - msg_send![self, encodeInt64: value, forKey: key] - } - pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString) { - msg_send![self, encodeFloat: value, forKey: key] - } - pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString) { - msg_send![self, encodeDouble: value, forKey: key] - } - pub unsafe fn encodeBytes_length_forKey( - &self, - bytes: *mut u8, - length: NSUInteger, - key: &NSString, - ) { - msg_send![self, encodeBytes: bytes, length: length, forKey: key] - } - pub unsafe fn requiresSecureCoding(&self) -> bool { - msg_send![self, requiresSecureCoding] - } - pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool) { - msg_send![self, setRequiresSecureCoding: requiresSecureCoding] - } -} +); extern_class!( #[derive(Debug)] pub struct NSKeyedUnarchiver; @@ -120,189 +132,198 @@ extern_class!( type Super = NSCoder; } ); -impl NSKeyedUnarchiver { - pub unsafe fn initForReadingFromData_error( - &self, - data: &NSData, - ) -> Result, Id> { - msg_send_id![self, initForReadingFromData: data, error: _] - } - pub unsafe fn unarchivedObjectOfClass_fromData_error( - cls: &Class, - data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedObjectOfClass: cls, - fromData: data, - error: _ - ] - } - pub unsafe fn unarchivedArrayOfObjectsOfClass_fromData_error( - cls: &Class, - data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedArrayOfObjectsOfClass: cls, - fromData: data, - error: _ - ] - } - pub unsafe fn unarchivedDictionaryWithKeysOfClass_objectsOfClass_fromData_error( - keyCls: &Class, - valueCls: &Class, - data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedDictionaryWithKeysOfClass: keyCls, - objectsOfClass: valueCls, - fromData: data, - error: _ - ] - } - pub unsafe fn unarchivedObjectOfClasses_fromData_error( - classes: &NSSet, - data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedObjectOfClasses: classes, - fromData: data, - error: _ - ] - } - pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( - classes: &NSSet, - data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedArrayOfObjectsOfClasses: classes, - fromData: data, - error: _ - ] +extern_methods!( + unsafe impl NSKeyedUnarchiver { + pub unsafe fn initForReadingFromData_error( + &self, + data: &NSData, + ) -> Result, Id> { + msg_send_id![self, initForReadingFromData: data, error: _] + } + pub unsafe fn unarchivedObjectOfClass_fromData_error( + cls: &Class, + data: &NSData, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + unarchivedObjectOfClass: cls, + fromData: data, + error: _ + ] + } + pub unsafe fn unarchivedArrayOfObjectsOfClass_fromData_error( + cls: &Class, + data: &NSData, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + unarchivedArrayOfObjectsOfClass: cls, + fromData: data, + error: _ + ] + } + pub unsafe fn unarchivedDictionaryWithKeysOfClass_objectsOfClass_fromData_error( + keyCls: &Class, + valueCls: &Class, + data: &NSData, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + unarchivedDictionaryWithKeysOfClass: keyCls, + objectsOfClass: valueCls, + fromData: data, + error: _ + ] + } + pub unsafe fn unarchivedObjectOfClasses_fromData_error( + classes: &NSSet, + data: &NSData, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + unarchivedObjectOfClasses: classes, + fromData: data, + error: _ + ] + } + pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( + classes: &NSSet, + data: &NSData, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + unarchivedArrayOfObjectsOfClasses: classes, + fromData: data, + error: _ + ] + } + pub unsafe fn unarchivedDictionaryWithKeysOfClasses_objectsOfClasses_fromData_error( + keyClasses: &NSSet, + valueClasses: &NSSet, + data: &NSData, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + unarchivedDictionaryWithKeysOfClasses: keyClasses, + objectsOfClasses: valueClasses, + fromData: data, + error: _ + ] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Id { + msg_send_id![self, initForReadingWithData: data] + } + pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option> { + msg_send_id![Self::class(), unarchiveObjectWithData: data] + } + pub unsafe fn unarchiveTopLevelObjectWithData_error( + data: &NSData, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + unarchiveTopLevelObjectWithData: data, + error: _ + ] + } + pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option> { + msg_send_id![Self::class(), unarchiveObjectWithFile: path] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedUnarchiverDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn finishDecoding(&self) { + msg_send![self, finishDecoding] + } + pub unsafe fn setClass_forClassName(cls: Option<&Class>, codedName: &NSString) { + msg_send![Self::class(), setClass: cls, forClassName: codedName] + } + pub unsafe fn setClass_forClassName(&self, cls: Option<&Class>, codedName: &NSString) { + msg_send![self, setClass: cls, forClassName: codedName] + } + pub unsafe fn classForClassName(codedName: &NSString) -> Option<&Class> { + msg_send![Self::class(), classForClassName: codedName] + } + pub unsafe fn classForClassName(&self, codedName: &NSString) -> Option<&Class> { + msg_send![self, classForClassName: codedName] + } + pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool { + msg_send![self, containsValueForKey: key] + } + pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, decodeObjectForKey: key] + } + pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool { + msg_send![self, decodeBoolForKey: key] + } + pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int { + msg_send![self, decodeIntForKey: key] + } + pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32 { + msg_send![self, decodeInt32ForKey: key] + } + pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t { + msg_send![self, decodeInt64ForKey: key] + } + pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float { + msg_send![self, decodeFloatForKey: key] + } + pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double { + msg_send![self, decodeDoubleForKey: key] + } + pub unsafe fn decodeBytesForKey_returnedLength( + &self, + key: &NSString, + lengthp: *mut NSUInteger, + ) -> *mut u8 { + msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] + } + pub unsafe fn requiresSecureCoding(&self) -> bool { + msg_send![self, requiresSecureCoding] + } + pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool) { + msg_send![self, setRequiresSecureCoding: requiresSecureCoding] + } + pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy { + msg_send![self, decodingFailurePolicy] + } + pub unsafe fn setDecodingFailurePolicy( + &self, + decodingFailurePolicy: NSDecodingFailurePolicy, + ) { + msg_send![self, setDecodingFailurePolicy: decodingFailurePolicy] + } } - pub unsafe fn unarchivedDictionaryWithKeysOfClasses_objectsOfClasses_fromData_error( - keyClasses: &NSSet, - valueClasses: &NSSet, - data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedDictionaryWithKeysOfClasses: keyClasses, - objectsOfClasses: valueClasses, - fromData: data, - error: _ - ] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Id { - msg_send_id![self, initForReadingWithData: data] - } - pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option> { - msg_send_id![Self::class(), unarchiveObjectWithData: data] - } - pub unsafe fn unarchiveTopLevelObjectWithData_error( - data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchiveTopLevelObjectWithData: data, - error: _ - ] - } - pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option> { - msg_send_id![Self::class(), unarchiveObjectWithFile: path] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedUnarchiverDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn finishDecoding(&self) { - msg_send![self, finishDecoding] - } - pub unsafe fn setClass_forClassName(cls: Option<&Class>, codedName: &NSString) { - msg_send![Self::class(), setClass: cls, forClassName: codedName] - } - pub unsafe fn setClass_forClassName(&self, cls: Option<&Class>, codedName: &NSString) { - msg_send![self, setClass: cls, forClassName: codedName] - } - pub unsafe fn classForClassName(codedName: &NSString) -> Option<&Class> { - msg_send![Self::class(), classForClassName: codedName] - } - pub unsafe fn classForClassName(&self, codedName: &NSString) -> Option<&Class> { - msg_send![self, classForClassName: codedName] - } - pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool { - msg_send![self, containsValueForKey: key] - } - pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, decodeObjectForKey: key] - } - pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool { - msg_send![self, decodeBoolForKey: key] - } - pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int { - msg_send![self, decodeIntForKey: key] - } - pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32 { - msg_send![self, decodeInt32ForKey: key] - } - pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t { - msg_send![self, decodeInt64ForKey: key] - } - pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float { - msg_send![self, decodeFloatForKey: key] - } - pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double { - msg_send![self, decodeDoubleForKey: key] - } - pub unsafe fn decodeBytesForKey_returnedLength( - &self, - key: &NSString, - lengthp: *mut NSUInteger, - ) -> *mut u8 { - msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] - } - pub unsafe fn requiresSecureCoding(&self) -> bool { - msg_send![self, requiresSecureCoding] - } - pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool) { - msg_send![self, setRequiresSecureCoding: requiresSecureCoding] - } - pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy { - msg_send![self, decodingFailurePolicy] - } - pub unsafe fn setDecodingFailurePolicy(&self, decodingFailurePolicy: NSDecodingFailurePolicy) { - msg_send![self, setDecodingFailurePolicy: decodingFailurePolicy] - } -} +); pub type NSKeyedArchiverDelegate = NSObject; pub type NSKeyedUnarchiverDelegate = NSObject; -#[doc = "NSKeyedArchiverObjectSubstitution"] -impl NSObject { - pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class> { - msg_send![self, classForKeyedArchiver] - } - pub unsafe fn replacementObjectForKeyedArchiver( - &self, - archiver: &NSKeyedArchiver, - ) -> Option> { - msg_send_id![self, replacementObjectForKeyedArchiver: archiver] +extern_methods!( + #[doc = "NSKeyedArchiverObjectSubstitution"] + unsafe impl NSObject { + pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class> { + msg_send![self, classForKeyedArchiver] + } + pub unsafe fn replacementObjectForKeyedArchiver( + &self, + archiver: &NSKeyedArchiver, + ) -> Option> { + msg_send_id![self, replacementObjectForKeyedArchiver: archiver] + } + pub unsafe fn classFallbacksForKeyedArchiver() -> Id, Shared> { + msg_send_id![Self::class(), classFallbacksForKeyedArchiver] + } } - pub unsafe fn classFallbacksForKeyedArchiver() -> Id, Shared> { - msg_send_id![Self::class(), classFallbacksForKeyedArchiver] - } -} -#[doc = "NSKeyedUnarchiverObjectSubstitution"] -impl NSObject { - pub unsafe fn classForKeyedUnarchiver() -> &Class { - msg_send![Self::class(), classForKeyedUnarchiver] +); +extern_methods!( + #[doc = "NSKeyedUnarchiverObjectSubstitution"] + unsafe impl NSObject { + pub unsafe fn classForKeyedUnarchiver() -> &Class { + msg_send![Self::class(), classForKeyedUnarchiver] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index 44b3f7c7c..aaa2f895a 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSLengthFormatter; @@ -10,60 +10,62 @@ extern_class!( type Super = NSFormatter; } ); -impl NSLengthFormatter { - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] +extern_methods!( + unsafe impl NSLengthFormatter { + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn isForPersonHeightUse(&self) -> bool { + msg_send![self, isForPersonHeightUse] + } + pub unsafe fn setForPersonHeightUse(&self, forPersonHeightUse: bool) { + msg_send![self, setForPersonHeightUse: forPersonHeightUse] + } + pub unsafe fn stringFromValue_unit( + &self, + value: c_double, + unit: NSLengthFormatterUnit, + ) -> Id { + msg_send_id![self, stringFromValue: value, unit: unit] + } + pub unsafe fn stringFromMeters(&self, numberInMeters: c_double) -> Id { + msg_send_id![self, stringFromMeters: numberInMeters] + } + pub unsafe fn unitStringFromValue_unit( + &self, + value: c_double, + unit: NSLengthFormatterUnit, + ) -> Id { + msg_send_id![self, unitStringFromValue: value, unit: unit] + } + pub unsafe fn unitStringFromMeters_usedUnit( + &self, + numberInMeters: c_double, + unitp: *mut NSLengthFormatterUnit, + ) -> Id { + msg_send_id![self, unitStringFromMeters: numberInMeters, usedUnit: unitp] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: Option<&mut Option>>, + string: &NSString, + error: Option<&mut Option>>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn isForPersonHeightUse(&self) -> bool { - msg_send![self, isForPersonHeightUse] - } - pub unsafe fn setForPersonHeightUse(&self, forPersonHeightUse: bool) { - msg_send![self, setForPersonHeightUse: forPersonHeightUse] - } - pub unsafe fn stringFromValue_unit( - &self, - value: c_double, - unit: NSLengthFormatterUnit, - ) -> Id { - msg_send_id![self, stringFromValue: value, unit: unit] - } - pub unsafe fn stringFromMeters(&self, numberInMeters: c_double) -> Id { - msg_send_id![self, stringFromMeters: numberInMeters] - } - pub unsafe fn unitStringFromValue_unit( - &self, - value: c_double, - unit: NSLengthFormatterUnit, - ) -> Id { - msg_send_id![self, unitStringFromValue: value, unit: unit] - } - pub unsafe fn unitStringFromMeters_usedUnit( - &self, - numberInMeters: c_double, - unitp: *mut NSLengthFormatterUnit, - ) -> Id { - msg_send_id![self, unitStringFromMeters: numberInMeters, usedUnit: unitp] - } - pub unsafe fn getObjectValue_forString_errorDescription( - &self, - obj: Option<&mut Option>>, - string: &NSString, - error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 94125035d..7a18d7e87 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSLinguisticTagScheme = NSString; pub type NSLinguisticTag = NSString; extern_class!( @@ -16,275 +16,287 @@ extern_class!( type Super = NSObject; } ); -impl NSLinguisticTagger { - pub unsafe fn initWithTagSchemes_options( - &self, - tagSchemes: &NSArray, - opts: NSUInteger, - ) -> Id { - msg_send_id![self, initWithTagSchemes: tagSchemes, options: opts] +extern_methods!( + unsafe impl NSLinguisticTagger { + pub unsafe fn initWithTagSchemes_options( + &self, + tagSchemes: &NSArray, + opts: NSUInteger, + ) -> Id { + msg_send_id![self, initWithTagSchemes: tagSchemes, options: opts] + } + pub unsafe fn tagSchemes(&self) -> Id, Shared> { + msg_send_id![self, tagSchemes] + } + pub unsafe fn string(&self) -> Option> { + msg_send_id![self, string] + } + pub unsafe fn setString(&self, string: Option<&NSString>) { + msg_send![self, setString: string] + } + pub unsafe fn availableTagSchemesForUnit_language( + unit: NSLinguisticTaggerUnit, + language: &NSString, + ) -> Id, Shared> { + msg_send_id![ + Self::class(), + availableTagSchemesForUnit: unit, + language: language + ] + } + pub unsafe fn availableTagSchemesForLanguage( + language: &NSString, + ) -> Id, Shared> { + msg_send_id![Self::class(), availableTagSchemesForLanguage: language] + } + pub unsafe fn setOrthography_range( + &self, + orthography: Option<&NSOrthography>, + range: NSRange, + ) { + msg_send![self, setOrthography: orthography, range: range] + } + pub unsafe fn orthographyAtIndex_effectiveRange( + &self, + charIndex: NSUInteger, + effectiveRange: NSRangePointer, + ) -> Option> { + msg_send_id![ + self, + orthographyAtIndex: charIndex, + effectiveRange: effectiveRange + ] + } + pub unsafe fn stringEditedInRange_changeInLength( + &self, + newRange: NSRange, + delta: NSInteger, + ) { + msg_send![self, stringEditedInRange: newRange, changeInLength: delta] + } + pub unsafe fn tokenRangeAtIndex_unit( + &self, + charIndex: NSUInteger, + unit: NSLinguisticTaggerUnit, + ) -> NSRange { + msg_send![self, tokenRangeAtIndex: charIndex, unit: unit] + } + pub unsafe fn sentenceRangeForRange(&self, range: NSRange) -> NSRange { + msg_send![self, sentenceRangeForRange: range] + } + pub unsafe fn enumerateTagsInRange_unit_scheme_options_usingBlock( + &self, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateTagsInRange: range, + unit: unit, + scheme: scheme, + options: options, + usingBlock: block + ] + } + pub unsafe fn tagAtIndex_unit_scheme_tokenRange( + &self, + charIndex: NSUInteger, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + tokenRange: NSRangePointer, + ) -> Option> { + msg_send_id![ + self, + tagAtIndex: charIndex, + unit: unit, + scheme: scheme, + tokenRange: tokenRange + ] + } + pub unsafe fn tagsInRange_unit_scheme_options_tokenRanges( + &self, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + tokenRanges: Option<&mut Option, Shared>>>, + ) -> Id, Shared> { + msg_send_id![ + self, + tagsInRange: range, + unit: unit, + scheme: scheme, + options: options, + tokenRanges: tokenRanges + ] + } + pub unsafe fn enumerateTagsInRange_scheme_options_usingBlock( + &self, + range: NSRange, + tagScheme: &NSLinguisticTagScheme, + opts: NSLinguisticTaggerOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateTagsInRange: range, + scheme: tagScheme, + options: opts, + usingBlock: block + ] + } + pub unsafe fn tagAtIndex_scheme_tokenRange_sentenceRange( + &self, + charIndex: NSUInteger, + scheme: &NSLinguisticTagScheme, + tokenRange: NSRangePointer, + sentenceRange: NSRangePointer, + ) -> Option> { + msg_send_id![ + self, + tagAtIndex: charIndex, + scheme: scheme, + tokenRange: tokenRange, + sentenceRange: sentenceRange + ] + } + pub unsafe fn tagsInRange_scheme_options_tokenRanges( + &self, + range: NSRange, + tagScheme: &NSString, + opts: NSLinguisticTaggerOptions, + tokenRanges: Option<&mut Option, Shared>>>, + ) -> Id, Shared> { + msg_send_id![ + self, + tagsInRange: range, + scheme: tagScheme, + options: opts, + tokenRanges: tokenRanges + ] + } + pub unsafe fn dominantLanguage(&self) -> Option> { + msg_send_id![self, dominantLanguage] + } + pub unsafe fn dominantLanguageForString(string: &NSString) -> Option> { + msg_send_id![Self::class(), dominantLanguageForString: string] + } + pub unsafe fn tagForString_atIndex_unit_scheme_orthography_tokenRange( + string: &NSString, + charIndex: NSUInteger, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + orthography: Option<&NSOrthography>, + tokenRange: NSRangePointer, + ) -> Option> { + msg_send_id![ + Self::class(), + tagForString: string, + atIndex: charIndex, + unit: unit, + scheme: scheme, + orthography: orthography, + tokenRange: tokenRange + ] + } + pub unsafe fn tagsForString_range_unit_scheme_options_orthography_tokenRanges( + string: &NSString, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + tokenRanges: Option<&mut Option, Shared>>>, + ) -> Id, Shared> { + msg_send_id![ + Self::class(), + tagsForString: string, + range: range, + unit: unit, + scheme: scheme, + options: options, + orthography: orthography, + tokenRanges: tokenRanges + ] + } + pub unsafe fn enumerateTagsForString_range_unit_scheme_options_orthography_usingBlock( + string: &NSString, + range: NSRange, + unit: NSLinguisticTaggerUnit, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + block: TodoBlock, + ) { + msg_send![ + Self::class(), + enumerateTagsForString: string, + range: range, + unit: unit, + scheme: scheme, + options: options, + orthography: orthography, + usingBlock: block + ] + } + pub unsafe fn possibleTagsAtIndex_scheme_tokenRange_sentenceRange_scores( + &self, + charIndex: NSUInteger, + tagScheme: &NSString, + tokenRange: NSRangePointer, + sentenceRange: NSRangePointer, + scores: Option<&mut Option, Shared>>>, + ) -> Option, Shared>> { + msg_send_id![ + self, + possibleTagsAtIndex: charIndex, + scheme: tagScheme, + tokenRange: tokenRange, + sentenceRange: sentenceRange, + scores: scores + ] + } } - pub unsafe fn tagSchemes(&self) -> Id, Shared> { - msg_send_id![self, tagSchemes] - } - pub unsafe fn string(&self) -> Option> { - msg_send_id![self, string] - } - pub unsafe fn setString(&self, string: Option<&NSString>) { - msg_send![self, setString: string] - } - pub unsafe fn availableTagSchemesForUnit_language( - unit: NSLinguisticTaggerUnit, - language: &NSString, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - availableTagSchemesForUnit: unit, - language: language - ] - } - pub unsafe fn availableTagSchemesForLanguage( - language: &NSString, - ) -> Id, Shared> { - msg_send_id![Self::class(), availableTagSchemesForLanguage: language] - } - pub unsafe fn setOrthography_range(&self, orthography: Option<&NSOrthography>, range: NSRange) { - msg_send![self, setOrthography: orthography, range: range] - } - pub unsafe fn orthographyAtIndex_effectiveRange( - &self, - charIndex: NSUInteger, - effectiveRange: NSRangePointer, - ) -> Option> { - msg_send_id![ - self, - orthographyAtIndex: charIndex, - effectiveRange: effectiveRange - ] - } - pub unsafe fn stringEditedInRange_changeInLength(&self, newRange: NSRange, delta: NSInteger) { - msg_send![self, stringEditedInRange: newRange, changeInLength: delta] - } - pub unsafe fn tokenRangeAtIndex_unit( - &self, - charIndex: NSUInteger, - unit: NSLinguisticTaggerUnit, - ) -> NSRange { - msg_send![self, tokenRangeAtIndex: charIndex, unit: unit] - } - pub unsafe fn sentenceRangeForRange(&self, range: NSRange) -> NSRange { - msg_send![self, sentenceRangeForRange: range] - } - pub unsafe fn enumerateTagsInRange_unit_scheme_options_usingBlock( - &self, - range: NSRange, - unit: NSLinguisticTaggerUnit, - scheme: &NSLinguisticTagScheme, - options: NSLinguisticTaggerOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateTagsInRange: range, - unit: unit, - scheme: scheme, - options: options, - usingBlock: block - ] - } - pub unsafe fn tagAtIndex_unit_scheme_tokenRange( - &self, - charIndex: NSUInteger, - unit: NSLinguisticTaggerUnit, - scheme: &NSLinguisticTagScheme, - tokenRange: NSRangePointer, - ) -> Option> { - msg_send_id![ - self, - tagAtIndex: charIndex, - unit: unit, - scheme: scheme, - tokenRange: tokenRange - ] - } - pub unsafe fn tagsInRange_unit_scheme_options_tokenRanges( - &self, - range: NSRange, - unit: NSLinguisticTaggerUnit, - scheme: &NSLinguisticTagScheme, - options: NSLinguisticTaggerOptions, - tokenRanges: Option<&mut Option, Shared>>>, - ) -> Id, Shared> { - msg_send_id![ - self, - tagsInRange: range, - unit: unit, - scheme: scheme, - options: options, - tokenRanges: tokenRanges - ] - } - pub unsafe fn enumerateTagsInRange_scheme_options_usingBlock( - &self, - range: NSRange, - tagScheme: &NSLinguisticTagScheme, - opts: NSLinguisticTaggerOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateTagsInRange: range, - scheme: tagScheme, - options: opts, - usingBlock: block - ] - } - pub unsafe fn tagAtIndex_scheme_tokenRange_sentenceRange( - &self, - charIndex: NSUInteger, - scheme: &NSLinguisticTagScheme, - tokenRange: NSRangePointer, - sentenceRange: NSRangePointer, - ) -> Option> { - msg_send_id![ - self, - tagAtIndex: charIndex, - scheme: scheme, - tokenRange: tokenRange, - sentenceRange: sentenceRange - ] - } - pub unsafe fn tagsInRange_scheme_options_tokenRanges( - &self, - range: NSRange, - tagScheme: &NSString, - opts: NSLinguisticTaggerOptions, - tokenRanges: Option<&mut Option, Shared>>>, - ) -> Id, Shared> { - msg_send_id![ - self, - tagsInRange: range, - scheme: tagScheme, - options: opts, - tokenRanges: tokenRanges - ] - } - pub unsafe fn dominantLanguage(&self) -> Option> { - msg_send_id![self, dominantLanguage] - } - pub unsafe fn dominantLanguageForString(string: &NSString) -> Option> { - msg_send_id![Self::class(), dominantLanguageForString: string] - } - pub unsafe fn tagForString_atIndex_unit_scheme_orthography_tokenRange( - string: &NSString, - charIndex: NSUInteger, - unit: NSLinguisticTaggerUnit, - scheme: &NSLinguisticTagScheme, - orthography: Option<&NSOrthography>, - tokenRange: NSRangePointer, - ) -> Option> { - msg_send_id![ - Self::class(), - tagForString: string, - atIndex: charIndex, - unit: unit, - scheme: scheme, - orthography: orthography, - tokenRange: tokenRange - ] - } - pub unsafe fn tagsForString_range_unit_scheme_options_orthography_tokenRanges( - string: &NSString, - range: NSRange, - unit: NSLinguisticTaggerUnit, - scheme: &NSLinguisticTagScheme, - options: NSLinguisticTaggerOptions, - orthography: Option<&NSOrthography>, - tokenRanges: Option<&mut Option, Shared>>>, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - tagsForString: string, - range: range, - unit: unit, - scheme: scheme, - options: options, - orthography: orthography, - tokenRanges: tokenRanges - ] - } - pub unsafe fn enumerateTagsForString_range_unit_scheme_options_orthography_usingBlock( - string: &NSString, - range: NSRange, - unit: NSLinguisticTaggerUnit, - scheme: &NSLinguisticTagScheme, - options: NSLinguisticTaggerOptions, - orthography: Option<&NSOrthography>, - block: TodoBlock, - ) { - msg_send![ - Self::class(), - enumerateTagsForString: string, - range: range, - unit: unit, - scheme: scheme, - options: options, - orthography: orthography, - usingBlock: block - ] - } - pub unsafe fn possibleTagsAtIndex_scheme_tokenRange_sentenceRange_scores( - &self, - charIndex: NSUInteger, - tagScheme: &NSString, - tokenRange: NSRangePointer, - sentenceRange: NSRangePointer, - scores: Option<&mut Option, Shared>>>, - ) -> Option, Shared>> { - msg_send_id![ - self, - possibleTagsAtIndex: charIndex, - scheme: tagScheme, - tokenRange: tokenRange, - sentenceRange: sentenceRange, - scores: scores - ] - } -} -#[doc = "NSLinguisticAnalysis"] -impl NSString { - pub unsafe fn linguisticTagsInRange_scheme_options_orthography_tokenRanges( - &self, - range: NSRange, - scheme: &NSLinguisticTagScheme, - options: NSLinguisticTaggerOptions, - orthography: Option<&NSOrthography>, - tokenRanges: Option<&mut Option, Shared>>>, - ) -> Id, Shared> { - msg_send_id![ - self, - linguisticTagsInRange: range, - scheme: scheme, - options: options, - orthography: orthography, - tokenRanges: tokenRanges - ] - } - pub unsafe fn enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock( - &self, - range: NSRange, - scheme: &NSLinguisticTagScheme, - options: NSLinguisticTaggerOptions, - orthography: Option<&NSOrthography>, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateLinguisticTagsInRange: range, - scheme: scheme, - options: options, - orthography: orthography, - usingBlock: block - ] +); +extern_methods!( + #[doc = "NSLinguisticAnalysis"] + unsafe impl NSString { + pub unsafe fn linguisticTagsInRange_scheme_options_orthography_tokenRanges( + &self, + range: NSRange, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + tokenRanges: Option<&mut Option, Shared>>>, + ) -> Id, Shared> { + msg_send_id![ + self, + linguisticTagsInRange: range, + scheme: scheme, + options: options, + orthography: orthography, + tokenRanges: tokenRanges + ] + } + pub unsafe fn enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock( + &self, + range: NSRange, + scheme: &NSLinguisticTagScheme, + options: NSLinguisticTaggerOptions, + orthography: Option<&NSOrthography>, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateLinguisticTagsInRange: range, + scheme: scheme, + options: options, + orthography: orthography, + usingBlock: block + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index faeac2e54..c07f79add 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSListFormatter; @@ -12,31 +12,33 @@ extern_class!( type Super = NSFormatter; } ); -impl NSListFormatter { - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] +extern_methods!( + unsafe impl NSListFormatter { + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn itemFormatter(&self) -> Option> { + msg_send_id![self, itemFormatter] + } + pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>) { + msg_send![self, setItemFormatter: itemFormatter] + } + pub unsafe fn localizedStringByJoiningStrings( + strings: &NSArray, + ) -> Id { + msg_send_id![Self::class(), localizedStringByJoiningStrings: strings] + } + pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option> { + msg_send_id![self, stringFromItems: items] + } + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn itemFormatter(&self) -> Option> { - msg_send_id![self, itemFormatter] - } - pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>) { - msg_send![self, setItemFormatter: itemFormatter] - } - pub unsafe fn localizedStringByJoiningStrings( - strings: &NSArray, - ) -> Id { - msg_send_id![Self::class(), localizedStringByJoiningStrings: strings] - } - pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option> { - msg_send_id![self, stringFromItems: items] - } - pub unsafe fn stringForObjectValue( - &self, - obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 1c79c2a78..98c30fd4f 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSLocaleKey = NSString; use super::__exported::NSArray; use super::__exported::NSDictionary; @@ -17,213 +17,229 @@ extern_class!( type Super = NSObject; } ); -impl NSLocale { - pub unsafe fn objectForKey(&self, key: &NSLocaleKey) -> Option> { - msg_send_id![self, objectForKey: key] +extern_methods!( + unsafe impl NSLocale { + pub unsafe fn objectForKey(&self, key: &NSLocaleKey) -> Option> { + msg_send_id![self, objectForKey: key] + } + pub unsafe fn displayNameForKey_value( + &self, + key: &NSLocaleKey, + value: &Object, + ) -> Option> { + msg_send_id![self, displayNameForKey: key, value: value] + } + pub unsafe fn initWithLocaleIdentifier(&self, string: &NSString) -> Id { + msg_send_id![self, initWithLocaleIdentifier: string] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn displayNameForKey_value( - &self, - key: &NSLocaleKey, - value: &Object, - ) -> Option> { - msg_send_id![self, displayNameForKey: key, value: value] - } - pub unsafe fn initWithLocaleIdentifier(&self, string: &NSString) -> Id { - msg_send_id![self, initWithLocaleIdentifier: string] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSExtendedLocale"] -impl NSLocale { - pub unsafe fn localeIdentifier(&self) -> Id { - msg_send_id![self, localeIdentifier] - } - pub unsafe fn localizedStringForLocaleIdentifier( - &self, - localeIdentifier: &NSString, - ) -> Id { - msg_send_id![self, localizedStringForLocaleIdentifier: localeIdentifier] - } - pub unsafe fn languageCode(&self) -> Id { - msg_send_id![self, languageCode] - } - pub unsafe fn localizedStringForLanguageCode( - &self, - languageCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForLanguageCode: languageCode] - } - pub unsafe fn countryCode(&self) -> Option> { - msg_send_id![self, countryCode] - } - pub unsafe fn localizedStringForCountryCode( - &self, - countryCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForCountryCode: countryCode] - } - pub unsafe fn scriptCode(&self) -> Option> { - msg_send_id![self, scriptCode] - } - pub unsafe fn localizedStringForScriptCode( - &self, - scriptCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForScriptCode: scriptCode] - } - pub unsafe fn variantCode(&self) -> Option> { - msg_send_id![self, variantCode] - } - pub unsafe fn localizedStringForVariantCode( - &self, - variantCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForVariantCode: variantCode] - } - pub unsafe fn exemplarCharacterSet(&self) -> Id { - msg_send_id![self, exemplarCharacterSet] - } - pub unsafe fn calendarIdentifier(&self) -> Id { - msg_send_id![self, calendarIdentifier] - } - pub unsafe fn localizedStringForCalendarIdentifier( - &self, - calendarIdentifier: &NSString, - ) -> Option> { - msg_send_id![ - self, - localizedStringForCalendarIdentifier: calendarIdentifier - ] - } - pub unsafe fn collationIdentifier(&self) -> Option> { - msg_send_id![self, collationIdentifier] - } - pub unsafe fn localizedStringForCollationIdentifier( - &self, - collationIdentifier: &NSString, - ) -> Option> { - msg_send_id![ - self, - localizedStringForCollationIdentifier: collationIdentifier - ] - } - pub unsafe fn usesMetricSystem(&self) -> bool { - msg_send![self, usesMetricSystem] - } - pub unsafe fn decimalSeparator(&self) -> Id { - msg_send_id![self, decimalSeparator] - } - pub unsafe fn groupingSeparator(&self) -> Id { - msg_send_id![self, groupingSeparator] - } - pub unsafe fn currencySymbol(&self) -> Id { - msg_send_id![self, currencySymbol] - } - pub unsafe fn currencyCode(&self) -> Option> { - msg_send_id![self, currencyCode] - } - pub unsafe fn localizedStringForCurrencyCode( - &self, - currencyCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForCurrencyCode: currencyCode] - } - pub unsafe fn collatorIdentifier(&self) -> Id { - msg_send_id![self, collatorIdentifier] - } - pub unsafe fn localizedStringForCollatorIdentifier( - &self, - collatorIdentifier: &NSString, - ) -> Option> { - msg_send_id![ - self, - localizedStringForCollatorIdentifier: collatorIdentifier - ] - } - pub unsafe fn quotationBeginDelimiter(&self) -> Id { - msg_send_id![self, quotationBeginDelimiter] - } - pub unsafe fn quotationEndDelimiter(&self) -> Id { - msg_send_id![self, quotationEndDelimiter] - } - pub unsafe fn alternateQuotationBeginDelimiter(&self) -> Id { - msg_send_id![self, alternateQuotationBeginDelimiter] - } - pub unsafe fn alternateQuotationEndDelimiter(&self) -> Id { - msg_send_id![self, alternateQuotationEndDelimiter] - } -} -#[doc = "NSLocaleCreation"] -impl NSLocale { - pub unsafe fn autoupdatingCurrentLocale() -> Id { - msg_send_id![Self::class(), autoupdatingCurrentLocale] - } - pub unsafe fn currentLocale() -> Id { - msg_send_id![Self::class(), currentLocale] - } - pub unsafe fn systemLocale() -> Id { - msg_send_id![Self::class(), systemLocale] - } - pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id { - msg_send_id![Self::class(), localeWithLocaleIdentifier: ident] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } -} -#[doc = "NSLocaleGeneralInfo"] -impl NSLocale { - pub unsafe fn availableLocaleIdentifiers() -> Id, Shared> { - msg_send_id![Self::class(), availableLocaleIdentifiers] - } - pub unsafe fn ISOLanguageCodes() -> Id, Shared> { - msg_send_id![Self::class(), ISOLanguageCodes] - } - pub unsafe fn ISOCountryCodes() -> Id, Shared> { - msg_send_id![Self::class(), ISOCountryCodes] - } - pub unsafe fn ISOCurrencyCodes() -> Id, Shared> { - msg_send_id![Self::class(), ISOCurrencyCodes] - } - pub unsafe fn commonISOCurrencyCodes() -> Id, Shared> { - msg_send_id![Self::class(), commonISOCurrencyCodes] - } - pub unsafe fn preferredLanguages() -> Id, Shared> { - msg_send_id![Self::class(), preferredLanguages] - } - pub unsafe fn componentsFromLocaleIdentifier( - string: &NSString, - ) -> Id, Shared> { - msg_send_id![Self::class(), componentsFromLocaleIdentifier: string] - } - pub unsafe fn localeIdentifierFromComponents( - dict: &NSDictionary, - ) -> Id { - msg_send_id![Self::class(), localeIdentifierFromComponents: dict] - } - pub unsafe fn canonicalLocaleIdentifierFromString(string: &NSString) -> Id { - msg_send_id![Self::class(), canonicalLocaleIdentifierFromString: string] - } - pub unsafe fn canonicalLanguageIdentifierFromString(string: &NSString) -> Id { - msg_send_id![Self::class(), canonicalLanguageIdentifierFromString: string] - } - pub unsafe fn localeIdentifierFromWindowsLocaleCode(lcid: u32) -> Option> { - msg_send_id![Self::class(), localeIdentifierFromWindowsLocaleCode: lcid] - } - pub unsafe fn windowsLocaleCodeFromLocaleIdentifier(localeIdentifier: &NSString) -> u32 { - msg_send![ - Self::class(), - windowsLocaleCodeFromLocaleIdentifier: localeIdentifier - ] +); +extern_methods!( + #[doc = "NSExtendedLocale"] + unsafe impl NSLocale { + pub unsafe fn localeIdentifier(&self) -> Id { + msg_send_id![self, localeIdentifier] + } + pub unsafe fn localizedStringForLocaleIdentifier( + &self, + localeIdentifier: &NSString, + ) -> Id { + msg_send_id![self, localizedStringForLocaleIdentifier: localeIdentifier] + } + pub unsafe fn languageCode(&self) -> Id { + msg_send_id![self, languageCode] + } + pub unsafe fn localizedStringForLanguageCode( + &self, + languageCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForLanguageCode: languageCode] + } + pub unsafe fn countryCode(&self) -> Option> { + msg_send_id![self, countryCode] + } + pub unsafe fn localizedStringForCountryCode( + &self, + countryCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForCountryCode: countryCode] + } + pub unsafe fn scriptCode(&self) -> Option> { + msg_send_id![self, scriptCode] + } + pub unsafe fn localizedStringForScriptCode( + &self, + scriptCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForScriptCode: scriptCode] + } + pub unsafe fn variantCode(&self) -> Option> { + msg_send_id![self, variantCode] + } + pub unsafe fn localizedStringForVariantCode( + &self, + variantCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForVariantCode: variantCode] + } + pub unsafe fn exemplarCharacterSet(&self) -> Id { + msg_send_id![self, exemplarCharacterSet] + } + pub unsafe fn calendarIdentifier(&self) -> Id { + msg_send_id![self, calendarIdentifier] + } + pub unsafe fn localizedStringForCalendarIdentifier( + &self, + calendarIdentifier: &NSString, + ) -> Option> { + msg_send_id![ + self, + localizedStringForCalendarIdentifier: calendarIdentifier + ] + } + pub unsafe fn collationIdentifier(&self) -> Option> { + msg_send_id![self, collationIdentifier] + } + pub unsafe fn localizedStringForCollationIdentifier( + &self, + collationIdentifier: &NSString, + ) -> Option> { + msg_send_id![ + self, + localizedStringForCollationIdentifier: collationIdentifier + ] + } + pub unsafe fn usesMetricSystem(&self) -> bool { + msg_send![self, usesMetricSystem] + } + pub unsafe fn decimalSeparator(&self) -> Id { + msg_send_id![self, decimalSeparator] + } + pub unsafe fn groupingSeparator(&self) -> Id { + msg_send_id![self, groupingSeparator] + } + pub unsafe fn currencySymbol(&self) -> Id { + msg_send_id![self, currencySymbol] + } + pub unsafe fn currencyCode(&self) -> Option> { + msg_send_id![self, currencyCode] + } + pub unsafe fn localizedStringForCurrencyCode( + &self, + currencyCode: &NSString, + ) -> Option> { + msg_send_id![self, localizedStringForCurrencyCode: currencyCode] + } + pub unsafe fn collatorIdentifier(&self) -> Id { + msg_send_id![self, collatorIdentifier] + } + pub unsafe fn localizedStringForCollatorIdentifier( + &self, + collatorIdentifier: &NSString, + ) -> Option> { + msg_send_id![ + self, + localizedStringForCollatorIdentifier: collatorIdentifier + ] + } + pub unsafe fn quotationBeginDelimiter(&self) -> Id { + msg_send_id![self, quotationBeginDelimiter] + } + pub unsafe fn quotationEndDelimiter(&self) -> Id { + msg_send_id![self, quotationEndDelimiter] + } + pub unsafe fn alternateQuotationBeginDelimiter(&self) -> Id { + msg_send_id![self, alternateQuotationBeginDelimiter] + } + pub unsafe fn alternateQuotationEndDelimiter(&self) -> Id { + msg_send_id![self, alternateQuotationEndDelimiter] + } } - pub unsafe fn characterDirectionForLanguage( - isoLangCode: &NSString, - ) -> NSLocaleLanguageDirection { - msg_send![Self::class(), characterDirectionForLanguage: isoLangCode] +); +extern_methods!( + #[doc = "NSLocaleCreation"] + unsafe impl NSLocale { + pub unsafe fn autoupdatingCurrentLocale() -> Id { + msg_send_id![Self::class(), autoupdatingCurrentLocale] + } + pub unsafe fn currentLocale() -> Id { + msg_send_id![Self::class(), currentLocale] + } + pub unsafe fn systemLocale() -> Id { + msg_send_id![Self::class(), systemLocale] + } + pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id { + msg_send_id![Self::class(), localeWithLocaleIdentifier: ident] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } } - pub unsafe fn lineDirectionForLanguage(isoLangCode: &NSString) -> NSLocaleLanguageDirection { - msg_send![Self::class(), lineDirectionForLanguage: isoLangCode] +); +extern_methods!( + #[doc = "NSLocaleGeneralInfo"] + unsafe impl NSLocale { + pub unsafe fn availableLocaleIdentifiers() -> Id, Shared> { + msg_send_id![Self::class(), availableLocaleIdentifiers] + } + pub unsafe fn ISOLanguageCodes() -> Id, Shared> { + msg_send_id![Self::class(), ISOLanguageCodes] + } + pub unsafe fn ISOCountryCodes() -> Id, Shared> { + msg_send_id![Self::class(), ISOCountryCodes] + } + pub unsafe fn ISOCurrencyCodes() -> Id, Shared> { + msg_send_id![Self::class(), ISOCurrencyCodes] + } + pub unsafe fn commonISOCurrencyCodes() -> Id, Shared> { + msg_send_id![Self::class(), commonISOCurrencyCodes] + } + pub unsafe fn preferredLanguages() -> Id, Shared> { + msg_send_id![Self::class(), preferredLanguages] + } + pub unsafe fn componentsFromLocaleIdentifier( + string: &NSString, + ) -> Id, Shared> { + msg_send_id![Self::class(), componentsFromLocaleIdentifier: string] + } + pub unsafe fn localeIdentifierFromComponents( + dict: &NSDictionary, + ) -> Id { + msg_send_id![Self::class(), localeIdentifierFromComponents: dict] + } + pub unsafe fn canonicalLocaleIdentifierFromString( + string: &NSString, + ) -> Id { + msg_send_id![Self::class(), canonicalLocaleIdentifierFromString: string] + } + pub unsafe fn canonicalLanguageIdentifierFromString( + string: &NSString, + ) -> Id { + msg_send_id![Self::class(), canonicalLanguageIdentifierFromString: string] + } + pub unsafe fn localeIdentifierFromWindowsLocaleCode( + lcid: u32, + ) -> Option> { + msg_send_id![Self::class(), localeIdentifierFromWindowsLocaleCode: lcid] + } + pub unsafe fn windowsLocaleCodeFromLocaleIdentifier(localeIdentifier: &NSString) -> u32 { + msg_send![ + Self::class(), + windowsLocaleCodeFromLocaleIdentifier: localeIdentifier + ] + } + pub unsafe fn characterDirectionForLanguage( + isoLangCode: &NSString, + ) -> NSLocaleLanguageDirection { + msg_send![Self::class(), characterDirectionForLanguage: isoLangCode] + } + pub unsafe fn lineDirectionForLanguage( + isoLangCode: &NSString, + ) -> NSLocaleLanguageDirection { + msg_send![Self::class(), lineDirectionForLanguage: isoLangCode] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index 8a481d36c..39d663984 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSLocking = NSObject; extern_class!( #[derive(Debug)] @@ -12,20 +12,22 @@ extern_class!( type Super = NSObject; } ); -impl NSLock { - pub unsafe fn tryLock(&self) -> bool { - msg_send![self, tryLock] +extern_methods!( + unsafe impl NSLock { + pub unsafe fn tryLock(&self) -> bool { + msg_send![self, tryLock] + } + pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { + msg_send![self, lockBeforeDate: limit] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } } - pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { - msg_send![self, lockBeforeDate: limit] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } -} +); extern_class!( #[derive(Debug)] pub struct NSConditionLock; @@ -33,42 +35,44 @@ extern_class!( type Super = NSObject; } ); -impl NSConditionLock { - pub unsafe fn initWithCondition(&self, condition: NSInteger) -> Id { - msg_send_id![self, initWithCondition: condition] - } - pub unsafe fn condition(&self) -> NSInteger { - msg_send![self, condition] - } - pub unsafe fn lockWhenCondition(&self, condition: NSInteger) { - msg_send![self, lockWhenCondition: condition] - } - pub unsafe fn tryLock(&self) -> bool { - msg_send![self, tryLock] - } - pub unsafe fn tryLockWhenCondition(&self, condition: NSInteger) -> bool { - msg_send![self, tryLockWhenCondition: condition] - } - pub unsafe fn unlockWithCondition(&self, condition: NSInteger) { - msg_send![self, unlockWithCondition: condition] - } - pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { - msg_send![self, lockBeforeDate: limit] - } - pub unsafe fn lockWhenCondition_beforeDate( - &self, - condition: NSInteger, - limit: &NSDate, - ) -> bool { - msg_send![self, lockWhenCondition: condition, beforeDate: limit] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] +extern_methods!( + unsafe impl NSConditionLock { + pub unsafe fn initWithCondition(&self, condition: NSInteger) -> Id { + msg_send_id![self, initWithCondition: condition] + } + pub unsafe fn condition(&self) -> NSInteger { + msg_send![self, condition] + } + pub unsafe fn lockWhenCondition(&self, condition: NSInteger) { + msg_send![self, lockWhenCondition: condition] + } + pub unsafe fn tryLock(&self) -> bool { + msg_send![self, tryLock] + } + pub unsafe fn tryLockWhenCondition(&self, condition: NSInteger) -> bool { + msg_send![self, tryLockWhenCondition: condition] + } + pub unsafe fn unlockWithCondition(&self, condition: NSInteger) { + msg_send![self, unlockWithCondition: condition] + } + pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { + msg_send![self, lockBeforeDate: limit] + } + pub unsafe fn lockWhenCondition_beforeDate( + &self, + condition: NSInteger, + limit: &NSDate, + ) -> bool { + msg_send![self, lockWhenCondition: condition, beforeDate: limit] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } -} +); extern_class!( #[derive(Debug)] pub struct NSRecursiveLock; @@ -76,20 +80,22 @@ extern_class!( type Super = NSObject; } ); -impl NSRecursiveLock { - pub unsafe fn tryLock(&self) -> bool { - msg_send![self, tryLock] - } - pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { - msg_send![self, lockBeforeDate: limit] +extern_methods!( + unsafe impl NSRecursiveLock { + pub unsafe fn tryLock(&self) -> bool { + msg_send![self, tryLock] + } + pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { + msg_send![self, lockBeforeDate: limit] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } -} +); extern_class!( #[derive(Debug)] pub struct NSCondition; @@ -97,23 +103,25 @@ extern_class!( type Super = NSObject; } ); -impl NSCondition { - pub unsafe fn wait(&self) { - msg_send![self, wait] +extern_methods!( + unsafe impl NSCondition { + pub unsafe fn wait(&self) { + msg_send![self, wait] + } + pub unsafe fn waitUntilDate(&self, limit: &NSDate) -> bool { + msg_send![self, waitUntilDate: limit] + } + pub unsafe fn signal(&self) { + msg_send![self, signal] + } + pub unsafe fn broadcast(&self) { + msg_send![self, broadcast] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } } - pub unsafe fn waitUntilDate(&self, limit: &NSDate) -> bool { - msg_send![self, waitUntilDate: limit] - } - pub unsafe fn signal(&self) { - msg_send![self, signal] - } - pub unsafe fn broadcast(&self) { - msg_send![self, broadcast] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index a54160684..161985f53 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSMapTableOptions = NSUInteger; __inner_extern_class!( #[derive(Debug)] @@ -15,95 +15,107 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSMapTable { - pub unsafe fn initWithKeyOptions_valueOptions_capacity( - &self, - keyOptions: NSPointerFunctionsOptions, - valueOptions: NSPointerFunctionsOptions, - initialCapacity: NSUInteger, - ) -> Id { - msg_send_id![ - self, - initWithKeyOptions: keyOptions, - valueOptions: valueOptions, - capacity: initialCapacity - ] +extern_methods!( + unsafe impl NSMapTable { + pub unsafe fn initWithKeyOptions_valueOptions_capacity( + &self, + keyOptions: NSPointerFunctionsOptions, + valueOptions: NSPointerFunctionsOptions, + initialCapacity: NSUInteger, + ) -> Id { + msg_send_id![ + self, + initWithKeyOptions: keyOptions, + valueOptions: valueOptions, + capacity: initialCapacity + ] + } + pub unsafe fn initWithKeyPointerFunctions_valuePointerFunctions_capacity( + &self, + keyFunctions: &NSPointerFunctions, + valueFunctions: &NSPointerFunctions, + initialCapacity: NSUInteger, + ) -> Id { + msg_send_id![ + self, + initWithKeyPointerFunctions: keyFunctions, + valuePointerFunctions: valueFunctions, + capacity: initialCapacity + ] + } + pub unsafe fn mapTableWithKeyOptions_valueOptions( + keyOptions: NSPointerFunctionsOptions, + valueOptions: NSPointerFunctionsOptions, + ) -> Id, Shared> { + msg_send_id![ + Self::class(), + mapTableWithKeyOptions: keyOptions, + valueOptions: valueOptions + ] + } + pub unsafe fn mapTableWithStrongToStrongObjects() -> Id { + msg_send_id![Self::class(), mapTableWithStrongToStrongObjects] + } + pub unsafe fn mapTableWithWeakToStrongObjects() -> Id { + msg_send_id![Self::class(), mapTableWithWeakToStrongObjects] + } + pub unsafe fn mapTableWithStrongToWeakObjects() -> Id { + msg_send_id![Self::class(), mapTableWithStrongToWeakObjects] + } + pub unsafe fn mapTableWithWeakToWeakObjects() -> Id { + msg_send_id![Self::class(), mapTableWithWeakToWeakObjects] + } + pub unsafe fn strongToStrongObjectsMapTable() -> Id, Shared> + { + msg_send_id![Self::class(), strongToStrongObjectsMapTable] + } + pub unsafe fn weakToStrongObjectsMapTable() -> Id, Shared> { + msg_send_id![Self::class(), weakToStrongObjectsMapTable] + } + pub unsafe fn strongToWeakObjectsMapTable() -> Id, Shared> { + msg_send_id![Self::class(), strongToWeakObjectsMapTable] + } + pub unsafe fn weakToWeakObjectsMapTable() -> Id, Shared> { + msg_send_id![Self::class(), weakToWeakObjectsMapTable] + } + pub unsafe fn keyPointerFunctions(&self) -> Id { + msg_send_id![self, keyPointerFunctions] + } + pub unsafe fn valuePointerFunctions(&self) -> Id { + msg_send_id![self, valuePointerFunctions] + } + pub unsafe fn objectForKey( + &self, + aKey: Option<&KeyType>, + ) -> Option> { + msg_send_id![self, objectForKey: aKey] + } + pub unsafe fn removeObjectForKey(&self, aKey: Option<&KeyType>) { + msg_send![self, removeObjectForKey: aKey] + } + pub unsafe fn setObject_forKey( + &self, + anObject: Option<&ObjectType>, + aKey: Option<&KeyType>, + ) { + msg_send![self, setObject: anObject, forKey: aKey] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn keyEnumerator(&self) -> Id, Shared> { + msg_send_id![self, keyEnumerator] + } + pub unsafe fn objectEnumerator(&self) -> Option, Shared>> { + msg_send_id![self, objectEnumerator] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn dictionaryRepresentation( + &self, + ) -> Id, Shared> { + msg_send_id![self, dictionaryRepresentation] + } } - pub unsafe fn initWithKeyPointerFunctions_valuePointerFunctions_capacity( - &self, - keyFunctions: &NSPointerFunctions, - valueFunctions: &NSPointerFunctions, - initialCapacity: NSUInteger, - ) -> Id { - msg_send_id![ - self, - initWithKeyPointerFunctions: keyFunctions, - valuePointerFunctions: valueFunctions, - capacity: initialCapacity - ] - } - pub unsafe fn mapTableWithKeyOptions_valueOptions( - keyOptions: NSPointerFunctionsOptions, - valueOptions: NSPointerFunctionsOptions, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - mapTableWithKeyOptions: keyOptions, - valueOptions: valueOptions - ] - } - pub unsafe fn mapTableWithStrongToStrongObjects() -> Id { - msg_send_id![Self::class(), mapTableWithStrongToStrongObjects] - } - pub unsafe fn mapTableWithWeakToStrongObjects() -> Id { - msg_send_id![Self::class(), mapTableWithWeakToStrongObjects] - } - pub unsafe fn mapTableWithStrongToWeakObjects() -> Id { - msg_send_id![Self::class(), mapTableWithStrongToWeakObjects] - } - pub unsafe fn mapTableWithWeakToWeakObjects() -> Id { - msg_send_id![Self::class(), mapTableWithWeakToWeakObjects] - } - pub unsafe fn strongToStrongObjectsMapTable() -> Id, Shared> { - msg_send_id![Self::class(), strongToStrongObjectsMapTable] - } - pub unsafe fn weakToStrongObjectsMapTable() -> Id, Shared> { - msg_send_id![Self::class(), weakToStrongObjectsMapTable] - } - pub unsafe fn strongToWeakObjectsMapTable() -> Id, Shared> { - msg_send_id![Self::class(), strongToWeakObjectsMapTable] - } - pub unsafe fn weakToWeakObjectsMapTable() -> Id, Shared> { - msg_send_id![Self::class(), weakToWeakObjectsMapTable] - } - pub unsafe fn keyPointerFunctions(&self) -> Id { - msg_send_id![self, keyPointerFunctions] - } - pub unsafe fn valuePointerFunctions(&self) -> Id { - msg_send_id![self, valuePointerFunctions] - } - pub unsafe fn objectForKey(&self, aKey: Option<&KeyType>) -> Option> { - msg_send_id![self, objectForKey: aKey] - } - pub unsafe fn removeObjectForKey(&self, aKey: Option<&KeyType>) { - msg_send![self, removeObjectForKey: aKey] - } - pub unsafe fn setObject_forKey(&self, anObject: Option<&ObjectType>, aKey: Option<&KeyType>) { - msg_send![self, setObject: anObject, forKey: aKey] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn keyEnumerator(&self) -> Id, Shared> { - msg_send_id![self, keyEnumerator] - } - pub unsafe fn objectEnumerator(&self) -> Option, Shared>> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared> { - msg_send_id![self, dictionaryRepresentation] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 0121b5e1a..5f1461cbb 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSMassFormatter; @@ -11,64 +11,69 @@ extern_class!( type Super = NSFormatter; } ); -impl NSMassFormatter { - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] +extern_methods!( + unsafe impl NSMassFormatter { + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn isForPersonMassUse(&self) -> bool { + msg_send![self, isForPersonMassUse] + } + pub unsafe fn setForPersonMassUse(&self, forPersonMassUse: bool) { + msg_send![self, setForPersonMassUse: forPersonMassUse] + } + pub unsafe fn stringFromValue_unit( + &self, + value: c_double, + unit: NSMassFormatterUnit, + ) -> Id { + msg_send_id![self, stringFromValue: value, unit: unit] + } + pub unsafe fn stringFromKilograms( + &self, + numberInKilograms: c_double, + ) -> Id { + msg_send_id![self, stringFromKilograms: numberInKilograms] + } + pub unsafe fn unitStringFromValue_unit( + &self, + value: c_double, + unit: NSMassFormatterUnit, + ) -> Id { + msg_send_id![self, unitStringFromValue: value, unit: unit] + } + pub unsafe fn unitStringFromKilograms_usedUnit( + &self, + numberInKilograms: c_double, + unitp: *mut NSMassFormatterUnit, + ) -> Id { + msg_send_id![ + self, + unitStringFromKilograms: numberInKilograms, + usedUnit: unitp + ] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: Option<&mut Option>>, + string: &NSString, + error: Option<&mut Option>>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn isForPersonMassUse(&self) -> bool { - msg_send![self, isForPersonMassUse] - } - pub unsafe fn setForPersonMassUse(&self, forPersonMassUse: bool) { - msg_send![self, setForPersonMassUse: forPersonMassUse] - } - pub unsafe fn stringFromValue_unit( - &self, - value: c_double, - unit: NSMassFormatterUnit, - ) -> Id { - msg_send_id![self, stringFromValue: value, unit: unit] - } - pub unsafe fn stringFromKilograms(&self, numberInKilograms: c_double) -> Id { - msg_send_id![self, stringFromKilograms: numberInKilograms] - } - pub unsafe fn unitStringFromValue_unit( - &self, - value: c_double, - unit: NSMassFormatterUnit, - ) -> Id { - msg_send_id![self, unitStringFromValue: value, unit: unit] - } - pub unsafe fn unitStringFromKilograms_usedUnit( - &self, - numberInKilograms: c_double, - unitp: *mut NSMassFormatterUnit, - ) -> Id { - msg_send_id![ - self, - unitStringFromKilograms: numberInKilograms, - usedUnit: unitp - ] - } - pub unsafe fn getObjectValue_forString_errorDescription( - &self, - obj: Option<&mut Option>>, - string: &NSString, - error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index e223cfe4c..82a73cb7a 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSUnit::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSMeasurement; @@ -11,39 +11,44 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSMeasurement { - pub unsafe fn unit(&self) -> Id { - msg_send_id![self, unit] +extern_methods!( + unsafe impl NSMeasurement { + pub unsafe fn unit(&self) -> Id { + msg_send_id![self, unit] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithDoubleValue_unit( + &self, + doubleValue: c_double, + unit: &UnitType, + ) -> Id { + msg_send_id![self, initWithDoubleValue: doubleValue, unit: unit] + } + pub unsafe fn canBeConvertedToUnit(&self, unit: &NSUnit) -> bool { + msg_send![self, canBeConvertedToUnit: unit] + } + pub unsafe fn measurementByConvertingToUnit( + &self, + unit: &NSUnit, + ) -> Id { + msg_send_id![self, measurementByConvertingToUnit: unit] + } + pub unsafe fn measurementByAddingMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id, Shared> { + msg_send_id![self, measurementByAddingMeasurement: measurement] + } + pub unsafe fn measurementBySubtractingMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id, Shared> { + msg_send_id![self, measurementBySubtractingMeasurement: measurement] + } } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithDoubleValue_unit( - &self, - doubleValue: c_double, - unit: &UnitType, - ) -> Id { - msg_send_id![self, initWithDoubleValue: doubleValue, unit: unit] - } - pub unsafe fn canBeConvertedToUnit(&self, unit: &NSUnit) -> bool { - msg_send![self, canBeConvertedToUnit: unit] - } - pub unsafe fn measurementByConvertingToUnit(&self, unit: &NSUnit) -> Id { - msg_send_id![self, measurementByConvertingToUnit: unit] - } - pub unsafe fn measurementByAddingMeasurement( - &self, - measurement: &NSMeasurement, - ) -> Id, Shared> { - msg_send_id![self, measurementByAddingMeasurement: measurement] - } - pub unsafe fn measurementBySubtractingMeasurement( - &self, - measurement: &NSMeasurement, - ) -> Id, Shared> { - msg_send_id![self, measurementBySubtractingMeasurement: measurement] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 9683bc43e..8ba71bfc6 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSMeasurementFormatter; @@ -14,38 +14,40 @@ extern_class!( type Super = NSFormatter; } ); -impl NSMeasurementFormatter { - pub unsafe fn unitOptions(&self) -> NSMeasurementFormatterUnitOptions { - msg_send![self, unitOptions] +extern_methods!( + unsafe impl NSMeasurementFormatter { + pub unsafe fn unitOptions(&self) -> NSMeasurementFormatterUnitOptions { + msg_send![self, unitOptions] + } + pub unsafe fn setUnitOptions(&self, unitOptions: NSMeasurementFormatterUnitOptions) { + msg_send![self, setUnitOptions: unitOptions] + } + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { + msg_send![self, unitStyle] + } + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { + msg_send![self, setUnitStyle: unitStyle] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn numberFormatter(&self) -> Id { + msg_send_id![self, numberFormatter] + } + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { + msg_send![self, setNumberFormatter: numberFormatter] + } + pub unsafe fn stringFromMeasurement( + &self, + measurement: &NSMeasurement, + ) -> Id { + msg_send_id![self, stringFromMeasurement: measurement] + } + pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id { + msg_send_id![self, stringFromUnit: unit] + } } - pub unsafe fn setUnitOptions(&self, unitOptions: NSMeasurementFormatterUnitOptions) { - msg_send![self, setUnitOptions: unitOptions] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] - } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } - pub unsafe fn stringFromMeasurement( - &self, - measurement: &NSMeasurement, - ) -> Id { - msg_send_id![self, stringFromMeasurement: measurement] - } - pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id { - msg_send_id![self, stringFromUnit: unit] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 66ddba5f9..b02a7cc39 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -12,7 +12,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSMetadataQuery; @@ -20,126 +20,129 @@ extern_class!( type Super = NSObject; } ); -impl NSMetadataQuery { - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] +extern_methods!( + unsafe impl NSMetadataQuery { + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSMetadataQueryDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn predicate(&self) -> Option> { + msg_send_id![self, predicate] + } + pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>) { + msg_send![self, setPredicate: predicate] + } + pub unsafe fn sortDescriptors(&self) -> Id, Shared> { + msg_send_id![self, sortDescriptors] + } + pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray) { + msg_send![self, setSortDescriptors: sortDescriptors] + } + pub unsafe fn valueListAttributes(&self) -> Id, Shared> { + msg_send_id![self, valueListAttributes] + } + pub unsafe fn setValueListAttributes(&self, valueListAttributes: &NSArray) { + msg_send![self, setValueListAttributes: valueListAttributes] + } + pub unsafe fn groupingAttributes(&self) -> Option, Shared>> { + msg_send_id![self, groupingAttributes] + } + pub unsafe fn setGroupingAttributes(&self, groupingAttributes: Option<&NSArray>) { + msg_send![self, setGroupingAttributes: groupingAttributes] + } + pub unsafe fn notificationBatchingInterval(&self) -> NSTimeInterval { + msg_send![self, notificationBatchingInterval] + } + pub unsafe fn setNotificationBatchingInterval( + &self, + notificationBatchingInterval: NSTimeInterval, + ) { + msg_send![ + self, + setNotificationBatchingInterval: notificationBatchingInterval + ] + } + pub unsafe fn searchScopes(&self) -> Id { + msg_send_id![self, searchScopes] + } + pub unsafe fn setSearchScopes(&self, searchScopes: &NSArray) { + msg_send![self, setSearchScopes: searchScopes] + } + pub unsafe fn searchItems(&self) -> Option> { + msg_send_id![self, searchItems] + } + pub unsafe fn setSearchItems(&self, searchItems: Option<&NSArray>) { + msg_send![self, setSearchItems: searchItems] + } + pub unsafe fn operationQueue(&self) -> Option> { + msg_send_id![self, operationQueue] + } + pub unsafe fn setOperationQueue(&self, operationQueue: Option<&NSOperationQueue>) { + msg_send![self, setOperationQueue: operationQueue] + } + pub unsafe fn startQuery(&self) -> bool { + msg_send![self, startQuery] + } + pub unsafe fn stopQuery(&self) { + msg_send![self, stopQuery] + } + pub unsafe fn isStarted(&self) -> bool { + msg_send![self, isStarted] + } + pub unsafe fn isGathering(&self) -> bool { + msg_send![self, isGathering] + } + pub unsafe fn isStopped(&self) -> bool { + msg_send![self, isStopped] + } + pub unsafe fn disableUpdates(&self) { + msg_send![self, disableUpdates] + } + pub unsafe fn enableUpdates(&self) { + msg_send![self, enableUpdates] + } + pub unsafe fn resultCount(&self) -> NSUInteger { + msg_send![self, resultCount] + } + pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { + msg_send_id![self, resultAtIndex: idx] + } + pub unsafe fn enumerateResultsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateResultsUsingBlock: block] + } + pub unsafe fn enumerateResultsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateResultsWithOptions: opts, usingBlock: block] + } + pub unsafe fn results(&self) -> Id { + msg_send_id![self, results] + } + pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger { + msg_send![self, indexOfResult: result] + } + pub unsafe fn valueLists( + &self, + ) -> Id>, Shared> + { + msg_send_id![self, valueLists] + } + pub unsafe fn groupedResults(&self) -> Id, Shared> { + msg_send_id![self, groupedResults] + } + pub unsafe fn valueOfAttribute_forResultAtIndex( + &self, + attrName: &NSString, + idx: NSUInteger, + ) -> Option> { + msg_send_id![self, valueOfAttribute: attrName, forResultAtIndex: idx] + } } - pub unsafe fn setDelegate(&self, delegate: Option<&NSMetadataQueryDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn predicate(&self) -> Option> { - msg_send_id![self, predicate] - } - pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>) { - msg_send![self, setPredicate: predicate] - } - pub unsafe fn sortDescriptors(&self) -> Id, Shared> { - msg_send_id![self, sortDescriptors] - } - pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray) { - msg_send![self, setSortDescriptors: sortDescriptors] - } - pub unsafe fn valueListAttributes(&self) -> Id, Shared> { - msg_send_id![self, valueListAttributes] - } - pub unsafe fn setValueListAttributes(&self, valueListAttributes: &NSArray) { - msg_send![self, setValueListAttributes: valueListAttributes] - } - pub unsafe fn groupingAttributes(&self) -> Option, Shared>> { - msg_send_id![self, groupingAttributes] - } - pub unsafe fn setGroupingAttributes(&self, groupingAttributes: Option<&NSArray>) { - msg_send![self, setGroupingAttributes: groupingAttributes] - } - pub unsafe fn notificationBatchingInterval(&self) -> NSTimeInterval { - msg_send![self, notificationBatchingInterval] - } - pub unsafe fn setNotificationBatchingInterval( - &self, - notificationBatchingInterval: NSTimeInterval, - ) { - msg_send![ - self, - setNotificationBatchingInterval: notificationBatchingInterval - ] - } - pub unsafe fn searchScopes(&self) -> Id { - msg_send_id![self, searchScopes] - } - pub unsafe fn setSearchScopes(&self, searchScopes: &NSArray) { - msg_send![self, setSearchScopes: searchScopes] - } - pub unsafe fn searchItems(&self) -> Option> { - msg_send_id![self, searchItems] - } - pub unsafe fn setSearchItems(&self, searchItems: Option<&NSArray>) { - msg_send![self, setSearchItems: searchItems] - } - pub unsafe fn operationQueue(&self) -> Option> { - msg_send_id![self, operationQueue] - } - pub unsafe fn setOperationQueue(&self, operationQueue: Option<&NSOperationQueue>) { - msg_send![self, setOperationQueue: operationQueue] - } - pub unsafe fn startQuery(&self) -> bool { - msg_send![self, startQuery] - } - pub unsafe fn stopQuery(&self) { - msg_send![self, stopQuery] - } - pub unsafe fn isStarted(&self) -> bool { - msg_send![self, isStarted] - } - pub unsafe fn isGathering(&self) -> bool { - msg_send![self, isGathering] - } - pub unsafe fn isStopped(&self) -> bool { - msg_send![self, isStopped] - } - pub unsafe fn disableUpdates(&self) { - msg_send![self, disableUpdates] - } - pub unsafe fn enableUpdates(&self) { - msg_send![self, enableUpdates] - } - pub unsafe fn resultCount(&self) -> NSUInteger { - msg_send![self, resultCount] - } - pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { - msg_send_id![self, resultAtIndex: idx] - } - pub unsafe fn enumerateResultsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateResultsUsingBlock: block] - } - pub unsafe fn enumerateResultsWithOptions_usingBlock( - &self, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![self, enumerateResultsWithOptions: opts, usingBlock: block] - } - pub unsafe fn results(&self) -> Id { - msg_send_id![self, results] - } - pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger { - msg_send![self, indexOfResult: result] - } - pub unsafe fn valueLists( - &self, - ) -> Id>, Shared> { - msg_send_id![self, valueLists] - } - pub unsafe fn groupedResults(&self) -> Id, Shared> { - msg_send_id![self, groupedResults] - } - pub unsafe fn valueOfAttribute_forResultAtIndex( - &self, - attrName: &NSString, - idx: NSUInteger, - ) -> Option> { - msg_send_id![self, valueOfAttribute: attrName, forResultAtIndex: idx] - } -} +); pub type NSMetadataQueryDelegate = NSObject; extern_class!( #[derive(Debug)] @@ -148,23 +151,25 @@ extern_class!( type Super = NSObject; } ); -impl NSMetadataItem { - pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithURL: url] - } - pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option> { - msg_send_id![self, valueForAttribute: key] - } - pub unsafe fn valuesForAttributes( - &self, - keys: &NSArray, - ) -> Option, Shared>> { - msg_send_id![self, valuesForAttributes: keys] +extern_methods!( + unsafe impl NSMetadataItem { + pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithURL: url] + } + pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option> { + msg_send_id![self, valueForAttribute: key] + } + pub unsafe fn valuesForAttributes( + &self, + keys: &NSArray, + ) -> Option, Shared>> { + msg_send_id![self, valuesForAttributes: keys] + } + pub unsafe fn attributes(&self) -> Id, Shared> { + msg_send_id![self, attributes] + } } - pub unsafe fn attributes(&self) -> Id, Shared> { - msg_send_id![self, attributes] - } -} +); extern_class!( #[derive(Debug)] pub struct NSMetadataQueryAttributeValueTuple; @@ -172,17 +177,19 @@ extern_class!( type Super = NSObject; } ); -impl NSMetadataQueryAttributeValueTuple { - pub unsafe fn attribute(&self) -> Id { - msg_send_id![self, attribute] - } - pub unsafe fn value(&self) -> Option> { - msg_send_id![self, value] +extern_methods!( + unsafe impl NSMetadataQueryAttributeValueTuple { + pub unsafe fn attribute(&self) -> Id { + msg_send_id![self, attribute] + } + pub unsafe fn value(&self) -> Option> { + msg_send_id![self, value] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } -} +); extern_class!( #[derive(Debug)] pub struct NSMetadataQueryResultGroup; @@ -190,23 +197,25 @@ extern_class!( type Super = NSObject; } ); -impl NSMetadataQueryResultGroup { - pub unsafe fn attribute(&self) -> Id { - msg_send_id![self, attribute] - } - pub unsafe fn value(&self) -> Id { - msg_send_id![self, value] +extern_methods!( + unsafe impl NSMetadataQueryResultGroup { + pub unsafe fn attribute(&self) -> Id { + msg_send_id![self, attribute] + } + pub unsafe fn value(&self) -> Id { + msg_send_id![self, value] + } + pub unsafe fn subgroups(&self) -> Option, Shared>> { + msg_send_id![self, subgroups] + } + pub unsafe fn resultCount(&self) -> NSUInteger { + msg_send![self, resultCount] + } + pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { + msg_send_id![self, resultAtIndex: idx] + } + pub unsafe fn results(&self) -> Id { + msg_send_id![self, results] + } } - pub unsafe fn subgroups(&self) -> Option, Shared>> { - msg_send_id![self, subgroups] - } - pub unsafe fn resultCount(&self) -> NSUInteger { - msg_send![self, resultCount] - } - pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { - msg_send_id![self, resultAtIndex: idx] - } - pub unsafe fn results(&self) -> Id { - msg_send_id![self, results] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs index 52f499a6d..0e39aac60 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -3,4 +3,4 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index 990f2e664..073bb999e 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSMethodSignature; @@ -10,28 +10,30 @@ extern_class!( type Super = NSObject; } ); -impl NSMethodSignature { - pub unsafe fn signatureWithObjCTypes( - types: NonNull, - ) -> Option> { - msg_send_id![Self::class(), signatureWithObjCTypes: types] +extern_methods!( + unsafe impl NSMethodSignature { + pub unsafe fn signatureWithObjCTypes( + types: NonNull, + ) -> Option> { + msg_send_id![Self::class(), signatureWithObjCTypes: types] + } + pub unsafe fn numberOfArguments(&self) -> NSUInteger { + msg_send![self, numberOfArguments] + } + pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull { + msg_send![self, getArgumentTypeAtIndex: idx] + } + pub unsafe fn frameLength(&self) -> NSUInteger { + msg_send![self, frameLength] + } + pub unsafe fn isOneway(&self) -> bool { + msg_send![self, isOneway] + } + pub unsafe fn methodReturnType(&self) -> NonNull { + msg_send![self, methodReturnType] + } + pub unsafe fn methodReturnLength(&self) -> NSUInteger { + msg_send![self, methodReturnLength] + } } - pub unsafe fn numberOfArguments(&self) -> NSUInteger { - msg_send![self, numberOfArguments] - } - pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull { - msg_send![self, getArgumentTypeAtIndex: idx] - } - pub unsafe fn frameLength(&self) -> NSUInteger { - msg_send![self, frameLength] - } - pub unsafe fn isOneway(&self) -> bool { - msg_send![self, isOneway] - } - pub unsafe fn methodReturnType(&self) -> NonNull { - msg_send![self, methodReturnType] - } - pub unsafe fn methodReturnLength(&self) -> NSUInteger { - msg_send![self, methodReturnLength] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index 87d8dc971..d68d1f973 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSMorphology; @@ -13,47 +13,51 @@ extern_class!( type Super = NSObject; } ); -impl NSMorphology { - pub unsafe fn grammaticalGender(&self) -> NSGrammaticalGender { - msg_send![self, grammaticalGender] +extern_methods!( + unsafe impl NSMorphology { + pub unsafe fn grammaticalGender(&self) -> NSGrammaticalGender { + msg_send![self, grammaticalGender] + } + pub unsafe fn setGrammaticalGender(&self, grammaticalGender: NSGrammaticalGender) { + msg_send![self, setGrammaticalGender: grammaticalGender] + } + pub unsafe fn partOfSpeech(&self) -> NSGrammaticalPartOfSpeech { + msg_send![self, partOfSpeech] + } + pub unsafe fn setPartOfSpeech(&self, partOfSpeech: NSGrammaticalPartOfSpeech) { + msg_send![self, setPartOfSpeech: partOfSpeech] + } + pub unsafe fn number(&self) -> NSGrammaticalNumber { + msg_send![self, number] + } + pub unsafe fn setNumber(&self, number: NSGrammaticalNumber) { + msg_send![self, setNumber: number] + } } - pub unsafe fn setGrammaticalGender(&self, grammaticalGender: NSGrammaticalGender) { - msg_send![self, setGrammaticalGender: grammaticalGender] - } - pub unsafe fn partOfSpeech(&self) -> NSGrammaticalPartOfSpeech { - msg_send![self, partOfSpeech] - } - pub unsafe fn setPartOfSpeech(&self, partOfSpeech: NSGrammaticalPartOfSpeech) { - msg_send![self, setPartOfSpeech: partOfSpeech] - } - pub unsafe fn number(&self) -> NSGrammaticalNumber { - msg_send![self, number] - } - pub unsafe fn setNumber(&self, number: NSGrammaticalNumber) { - msg_send![self, setNumber: number] - } -} -#[doc = "NSCustomPronouns"] -impl NSMorphology { - pub unsafe fn customPronounForLanguage( - &self, - language: &NSString, - ) -> Option> { - msg_send_id![self, customPronounForLanguage: language] - } - pub unsafe fn setCustomPronoun_forLanguage_error( - &self, - features: Option<&NSMorphologyCustomPronoun>, - language: &NSString, - ) -> Result<(), Id> { - msg_send![ - self, - setCustomPronoun: features, - forLanguage: language, - error: _ - ] +); +extern_methods!( + #[doc = "NSCustomPronouns"] + unsafe impl NSMorphology { + pub unsafe fn customPronounForLanguage( + &self, + language: &NSString, + ) -> Option> { + msg_send_id![self, customPronounForLanguage: language] + } + pub unsafe fn setCustomPronoun_forLanguage_error( + &self, + features: Option<&NSMorphologyCustomPronoun>, + language: &NSString, + ) -> Result<(), Id> { + msg_send![ + self, + setCustomPronoun: features, + forLanguage: language, + error: _ + ] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSMorphologyCustomPronoun; @@ -61,50 +65,59 @@ extern_class!( type Super = NSObject; } ); -impl NSMorphologyCustomPronoun { - pub unsafe fn isSupportedForLanguage(language: &NSString) -> bool { - msg_send![Self::class(), isSupportedForLanguage: language] - } - pub unsafe fn requiredKeysForLanguage(language: &NSString) -> Id, Shared> { - msg_send_id![Self::class(), requiredKeysForLanguage: language] - } - pub unsafe fn subjectForm(&self) -> Option> { - msg_send_id![self, subjectForm] - } - pub unsafe fn setSubjectForm(&self, subjectForm: Option<&NSString>) { - msg_send![self, setSubjectForm: subjectForm] +extern_methods!( + unsafe impl NSMorphologyCustomPronoun { + pub unsafe fn isSupportedForLanguage(language: &NSString) -> bool { + msg_send![Self::class(), isSupportedForLanguage: language] + } + pub unsafe fn requiredKeysForLanguage( + language: &NSString, + ) -> Id, Shared> { + msg_send_id![Self::class(), requiredKeysForLanguage: language] + } + pub unsafe fn subjectForm(&self) -> Option> { + msg_send_id![self, subjectForm] + } + pub unsafe fn setSubjectForm(&self, subjectForm: Option<&NSString>) { + msg_send![self, setSubjectForm: subjectForm] + } + pub unsafe fn objectForm(&self) -> Option> { + msg_send_id![self, objectForm] + } + pub unsafe fn setObjectForm(&self, objectForm: Option<&NSString>) { + msg_send![self, setObjectForm: objectForm] + } + pub unsafe fn possessiveForm(&self) -> Option> { + msg_send_id![self, possessiveForm] + } + pub unsafe fn setPossessiveForm(&self, possessiveForm: Option<&NSString>) { + msg_send![self, setPossessiveForm: possessiveForm] + } + pub unsafe fn possessiveAdjectiveForm(&self) -> Option> { + msg_send_id![self, possessiveAdjectiveForm] + } + pub unsafe fn setPossessiveAdjectiveForm( + &self, + possessiveAdjectiveForm: Option<&NSString>, + ) { + msg_send![self, setPossessiveAdjectiveForm: possessiveAdjectiveForm] + } + pub unsafe fn reflexiveForm(&self) -> Option> { + msg_send_id![self, reflexiveForm] + } + pub unsafe fn setReflexiveForm(&self, reflexiveForm: Option<&NSString>) { + msg_send![self, setReflexiveForm: reflexiveForm] + } } - pub unsafe fn objectForm(&self) -> Option> { - msg_send_id![self, objectForm] - } - pub unsafe fn setObjectForm(&self, objectForm: Option<&NSString>) { - msg_send![self, setObjectForm: objectForm] - } - pub unsafe fn possessiveForm(&self) -> Option> { - msg_send_id![self, possessiveForm] - } - pub unsafe fn setPossessiveForm(&self, possessiveForm: Option<&NSString>) { - msg_send![self, setPossessiveForm: possessiveForm] - } - pub unsafe fn possessiveAdjectiveForm(&self) -> Option> { - msg_send_id![self, possessiveAdjectiveForm] - } - pub unsafe fn setPossessiveAdjectiveForm(&self, possessiveAdjectiveForm: Option<&NSString>) { - msg_send![self, setPossessiveAdjectiveForm: possessiveAdjectiveForm] - } - pub unsafe fn reflexiveForm(&self) -> Option> { - msg_send_id![self, reflexiveForm] - } - pub unsafe fn setReflexiveForm(&self, reflexiveForm: Option<&NSString>) { - msg_send![self, setReflexiveForm: reflexiveForm] - } -} -#[doc = "NSMorphologyUserSettings"] -impl NSMorphology { - pub unsafe fn isUnspecified(&self) -> bool { - msg_send![self, isUnspecified] - } - pub unsafe fn userMorphology() -> Id { - msg_send_id![Self::class(), userMorphology] +); +extern_methods!( + #[doc = "NSMorphologyUserSettings"] + unsafe impl NSMorphology { + pub unsafe fn isUnspecified(&self) -> bool { + msg_send![self, isUnspecified] + } + pub unsafe fn userMorphology() -> Id { + msg_send_id![Self::class(), userMorphology] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 01e1cc5ef..cc252bd03 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -13,7 +13,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSNetService; @@ -21,98 +21,100 @@ extern_class!( type Super = NSObject; } ); -impl NSNetService { - pub unsafe fn initWithDomain_type_name_port( - &self, - domain: &NSString, - type_: &NSString, - name: &NSString, - port: c_int, - ) -> Id { - msg_send_id ! [self , initWithDomain : domain , type : type_ , name : name , port : port] +extern_methods!( + unsafe impl NSNetService { + pub unsafe fn initWithDomain_type_name_port( + &self, + domain: &NSString, + type_: &NSString, + name: &NSString, + port: c_int, + ) -> Id { + msg_send_id ! [self , initWithDomain : domain , type : type_ , name : name , port : port] + } + pub unsafe fn initWithDomain_type_name( + &self, + domain: &NSString, + type_: &NSString, + name: &NSString, + ) -> Id { + msg_send_id ! [self , initWithDomain : domain , type : type_ , name : name] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn includesPeerToPeer(&self) -> bool { + msg_send![self, includesPeerToPeer] + } + pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { + msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn type_(&self) -> Id { + msg_send_id![self, type] + } + pub unsafe fn domain(&self) -> Id { + msg_send_id![self, domain] + } + pub unsafe fn hostName(&self) -> Option> { + msg_send_id![self, hostName] + } + pub unsafe fn addresses(&self) -> Option, Shared>> { + msg_send_id![self, addresses] + } + pub unsafe fn port(&self) -> NSInteger { + msg_send![self, port] + } + pub unsafe fn publish(&self) { + msg_send![self, publish] + } + pub unsafe fn publishWithOptions(&self, options: NSNetServiceOptions) { + msg_send![self, publishWithOptions: options] + } + pub unsafe fn resolve(&self) { + msg_send![self, resolve] + } + pub unsafe fn stop(&self) { + msg_send![self, stop] + } + pub unsafe fn dictionaryFromTXTRecordData( + txtData: &NSData, + ) -> Id, Shared> { + msg_send_id![Self::class(), dictionaryFromTXTRecordData: txtData] + } + pub unsafe fn dataFromTXTRecordDictionary( + txtDictionary: &NSDictionary, + ) -> Id { + msg_send_id![Self::class(), dataFromTXTRecordDictionary: txtDictionary] + } + pub unsafe fn resolveWithTimeout(&self, timeout: NSTimeInterval) { + msg_send![self, resolveWithTimeout: timeout] + } + pub unsafe fn setTXTRecordData(&self, recordData: Option<&NSData>) -> bool { + msg_send![self, setTXTRecordData: recordData] + } + pub unsafe fn TXTRecordData(&self) -> Option> { + msg_send_id![self, TXTRecordData] + } + pub unsafe fn startMonitoring(&self) { + msg_send![self, startMonitoring] + } + pub unsafe fn stopMonitoring(&self) { + msg_send![self, stopMonitoring] + } } - pub unsafe fn initWithDomain_type_name( - &self, - domain: &NSString, - type_: &NSString, - name: &NSString, - ) -> Id { - msg_send_id ! [self , initWithDomain : domain , type : type_ , name : name] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn includesPeerToPeer(&self) -> bool { - msg_send![self, includesPeerToPeer] - } - pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { - msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn type_(&self) -> Id { - msg_send_id![self, type] - } - pub unsafe fn domain(&self) -> Id { - msg_send_id![self, domain] - } - pub unsafe fn hostName(&self) -> Option> { - msg_send_id![self, hostName] - } - pub unsafe fn addresses(&self) -> Option, Shared>> { - msg_send_id![self, addresses] - } - pub unsafe fn port(&self) -> NSInteger { - msg_send![self, port] - } - pub unsafe fn publish(&self) { - msg_send![self, publish] - } - pub unsafe fn publishWithOptions(&self, options: NSNetServiceOptions) { - msg_send![self, publishWithOptions: options] - } - pub unsafe fn resolve(&self) { - msg_send![self, resolve] - } - pub unsafe fn stop(&self) { - msg_send![self, stop] - } - pub unsafe fn dictionaryFromTXTRecordData( - txtData: &NSData, - ) -> Id, Shared> { - msg_send_id![Self::class(), dictionaryFromTXTRecordData: txtData] - } - pub unsafe fn dataFromTXTRecordDictionary( - txtDictionary: &NSDictionary, - ) -> Id { - msg_send_id![Self::class(), dataFromTXTRecordDictionary: txtDictionary] - } - pub unsafe fn resolveWithTimeout(&self, timeout: NSTimeInterval) { - msg_send![self, resolveWithTimeout: timeout] - } - pub unsafe fn setTXTRecordData(&self, recordData: Option<&NSData>) -> bool { - msg_send![self, setTXTRecordData: recordData] - } - pub unsafe fn TXTRecordData(&self) -> Option> { - msg_send_id![self, TXTRecordData] - } - pub unsafe fn startMonitoring(&self) { - msg_send![self, startMonitoring] - } - pub unsafe fn stopMonitoring(&self) { - msg_send![self, stopMonitoring] - } -} +); extern_class!( #[derive(Debug)] pub struct NSNetServiceBrowser; @@ -120,44 +122,46 @@ extern_class!( type Super = NSObject; } ); -impl NSNetServiceBrowser { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceBrowserDelegate>) { - msg_send![self, setDelegate: delegate] +extern_methods!( + unsafe impl NSNetServiceBrowser { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceBrowserDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn includesPeerToPeer(&self) -> bool { + msg_send![self, includesPeerToPeer] + } + pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { + msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn searchForBrowsableDomains(&self) { + msg_send![self, searchForBrowsableDomains] + } + pub unsafe fn searchForRegistrationDomains(&self) { + msg_send![self, searchForRegistrationDomains] + } + pub unsafe fn searchForServicesOfType_inDomain( + &self, + type_: &NSString, + domainString: &NSString, + ) { + msg_send![self, searchForServicesOfType: type_, inDomain: domainString] + } + pub unsafe fn stop(&self) { + msg_send![self, stop] + } } - pub unsafe fn includesPeerToPeer(&self) -> bool { - msg_send![self, includesPeerToPeer] - } - pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { - msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn searchForBrowsableDomains(&self) { - msg_send![self, searchForBrowsableDomains] - } - pub unsafe fn searchForRegistrationDomains(&self) { - msg_send![self, searchForRegistrationDomains] - } - pub unsafe fn searchForServicesOfType_inDomain( - &self, - type_: &NSString, - domainString: &NSString, - ) { - msg_send![self, searchForServicesOfType: type_, inDomain: domainString] - } - pub unsafe fn stop(&self) { - msg_send![self, stop] - } -} +); pub type NSNetServiceDelegate = NSObject; pub type NSNetServiceBrowserDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 89119478d..bebf8a8dc 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSNotificationName = NSString; use super::__exported::NSDictionary; use super::__exported::NSOperationQueue; @@ -14,52 +14,56 @@ extern_class!( type Super = NSObject; } ); -impl NSNotification { - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] +extern_methods!( + unsafe impl NSNotification { + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn object(&self) -> Option> { + msg_send_id![self, object] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } + pub unsafe fn initWithName_object_userInfo( + &self, + name: &NSNotificationName, + object: Option<&Object>, + userInfo: Option<&NSDictionary>, + ) -> Id { + msg_send_id![self, initWithName: name, object: object, userInfo: userInfo] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn object(&self) -> Option> { - msg_send_id![self, object] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } - pub unsafe fn initWithName_object_userInfo( - &self, - name: &NSNotificationName, - object: Option<&Object>, - userInfo: Option<&NSDictionary>, - ) -> Id { - msg_send_id![self, initWithName: name, object: object, userInfo: userInfo] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSNotificationCreation"] -impl NSNotification { - pub unsafe fn notificationWithName_object( - aName: &NSNotificationName, - anObject: Option<&Object>, - ) -> Id { - msg_send_id![Self::class(), notificationWithName: aName, object: anObject] - } - pub unsafe fn notificationWithName_object_userInfo( - aName: &NSNotificationName, - anObject: Option<&Object>, - aUserInfo: Option<&NSDictionary>, - ) -> Id { - msg_send_id![ - Self::class(), - notificationWithName: aName, - object: anObject, - userInfo: aUserInfo - ] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] +); +extern_methods!( + #[doc = "NSNotificationCreation"] + unsafe impl NSNotification { + pub unsafe fn notificationWithName_object( + aName: &NSNotificationName, + anObject: Option<&Object>, + ) -> Id { + msg_send_id![Self::class(), notificationWithName: aName, object: anObject] + } + pub unsafe fn notificationWithName_object_userInfo( + aName: &NSNotificationName, + anObject: Option<&Object>, + aUserInfo: Option<&NSDictionary>, + ) -> Id { + msg_send_id![ + Self::class(), + notificationWithName: aName, + object: anObject, + userInfo: aUserInfo + ] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSNotificationCenter; @@ -67,77 +71,79 @@ extern_class!( type Super = NSObject; } ); -impl NSNotificationCenter { - pub unsafe fn defaultCenter() -> Id { - msg_send_id![Self::class(), defaultCenter] +extern_methods!( + unsafe impl NSNotificationCenter { + pub unsafe fn defaultCenter() -> Id { + msg_send_id![Self::class(), defaultCenter] + } + pub unsafe fn addObserver_selector_name_object( + &self, + observer: &Object, + aSelector: Sel, + aName: Option<&NSNotificationName>, + anObject: Option<&Object>, + ) { + msg_send![ + self, + addObserver: observer, + selector: aSelector, + name: aName, + object: anObject + ] + } + pub unsafe fn postNotification(&self, notification: &NSNotification) { + msg_send![self, postNotification: notification] + } + pub unsafe fn postNotificationName_object( + &self, + aName: &NSNotificationName, + anObject: Option<&Object>, + ) { + msg_send![self, postNotificationName: aName, object: anObject] + } + pub unsafe fn postNotificationName_object_userInfo( + &self, + aName: &NSNotificationName, + anObject: Option<&Object>, + aUserInfo: Option<&NSDictionary>, + ) { + msg_send![ + self, + postNotificationName: aName, + object: anObject, + userInfo: aUserInfo + ] + } + pub unsafe fn removeObserver(&self, observer: &Object) { + msg_send![self, removeObserver: observer] + } + pub unsafe fn removeObserver_name_object( + &self, + observer: &Object, + aName: Option<&NSNotificationName>, + anObject: Option<&Object>, + ) { + msg_send![ + self, + removeObserver: observer, + name: aName, + object: anObject + ] + } + pub unsafe fn addObserverForName_object_queue_usingBlock( + &self, + name: Option<&NSNotificationName>, + obj: Option<&Object>, + queue: Option<&NSOperationQueue>, + block: TodoBlock, + ) -> Id { + msg_send_id![ + self, + addObserverForName: name, + object: obj, + queue: queue, + usingBlock: block + ] + } } - pub unsafe fn addObserver_selector_name_object( - &self, - observer: &Object, - aSelector: Sel, - aName: Option<&NSNotificationName>, - anObject: Option<&Object>, - ) { - msg_send![ - self, - addObserver: observer, - selector: aSelector, - name: aName, - object: anObject - ] - } - pub unsafe fn postNotification(&self, notification: &NSNotification) { - msg_send![self, postNotification: notification] - } - pub unsafe fn postNotificationName_object( - &self, - aName: &NSNotificationName, - anObject: Option<&Object>, - ) { - msg_send![self, postNotificationName: aName, object: anObject] - } - pub unsafe fn postNotificationName_object_userInfo( - &self, - aName: &NSNotificationName, - anObject: Option<&Object>, - aUserInfo: Option<&NSDictionary>, - ) { - msg_send![ - self, - postNotificationName: aName, - object: anObject, - userInfo: aUserInfo - ] - } - pub unsafe fn removeObserver(&self, observer: &Object) { - msg_send![self, removeObserver: observer] - } - pub unsafe fn removeObserver_name_object( - &self, - observer: &Object, - aName: Option<&NSNotificationName>, - anObject: Option<&Object>, - ) { - msg_send![ - self, - removeObserver: observer, - name: aName, - object: anObject - ] - } - pub unsafe fn addObserverForName_object_queue_usingBlock( - &self, - name: Option<&NSNotificationName>, - obj: Option<&Object>, - queue: Option<&NSOperationQueue>, - block: TodoBlock, - ) -> Id { - msg_send_id![ - self, - addObserverForName: name, - object: obj, - queue: queue, - usingBlock: block - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index 51fc8a242..fc26345d3 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSNotificationQueue; @@ -15,51 +15,53 @@ extern_class!( type Super = NSObject; } ); -impl NSNotificationQueue { - pub unsafe fn defaultQueue() -> Id { - msg_send_id![Self::class(), defaultQueue] +extern_methods!( + unsafe impl NSNotificationQueue { + pub unsafe fn defaultQueue() -> Id { + msg_send_id![Self::class(), defaultQueue] + } + pub unsafe fn initWithNotificationCenter( + &self, + notificationCenter: &NSNotificationCenter, + ) -> Id { + msg_send_id![self, initWithNotificationCenter: notificationCenter] + } + pub unsafe fn enqueueNotification_postingStyle( + &self, + notification: &NSNotification, + postingStyle: NSPostingStyle, + ) { + msg_send![ + self, + enqueueNotification: notification, + postingStyle: postingStyle + ] + } + pub unsafe fn enqueueNotification_postingStyle_coalesceMask_forModes( + &self, + notification: &NSNotification, + postingStyle: NSPostingStyle, + coalesceMask: NSNotificationCoalescing, + modes: Option<&NSArray>, + ) { + msg_send![ + self, + enqueueNotification: notification, + postingStyle: postingStyle, + coalesceMask: coalesceMask, + forModes: modes + ] + } + pub unsafe fn dequeueNotificationsMatching_coalesceMask( + &self, + notification: &NSNotification, + coalesceMask: NSUInteger, + ) { + msg_send![ + self, + dequeueNotificationsMatching: notification, + coalesceMask: coalesceMask + ] + } } - pub unsafe fn initWithNotificationCenter( - &self, - notificationCenter: &NSNotificationCenter, - ) -> Id { - msg_send_id![self, initWithNotificationCenter: notificationCenter] - } - pub unsafe fn enqueueNotification_postingStyle( - &self, - notification: &NSNotification, - postingStyle: NSPostingStyle, - ) { - msg_send![ - self, - enqueueNotification: notification, - postingStyle: postingStyle - ] - } - pub unsafe fn enqueueNotification_postingStyle_coalesceMask_forModes( - &self, - notification: &NSNotification, - postingStyle: NSPostingStyle, - coalesceMask: NSNotificationCoalescing, - modes: Option<&NSArray>, - ) { - msg_send![ - self, - enqueueNotification: notification, - postingStyle: postingStyle, - coalesceMask: coalesceMask, - forModes: modes - ] - } - pub unsafe fn dequeueNotificationsMatching_coalesceMask( - &self, - notification: &NSNotification, - coalesceMask: NSUInteger, - ) { - msg_send![ - self, - dequeueNotificationsMatching: notification, - coalesceMask: coalesceMask - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSNull.rs b/crates/icrate/src/generated/Foundation/NSNull.rs index ffd8ab519..52c854d14 100644 --- a/crates/icrate/src/generated/Foundation/NSNull.rs +++ b/crates/icrate/src/generated/Foundation/NSNull.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSNull; @@ -10,8 +10,10 @@ extern_class!( type Super = NSObject; } ); -impl NSNull { - pub unsafe fn null() -> Id { - msg_send_id![Self::class(), null] +extern_methods!( + unsafe impl NSNull { + pub unsafe fn null() -> Id { + msg_send_id![Self::class(), null] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 97f09deb3..40b8f9e81 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSNumberFormatter; @@ -17,509 +17,525 @@ extern_class!( type Super = NSFormatter; } ); -impl NSNumberFormatter { - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] +extern_methods!( + unsafe impl NSNumberFormatter { + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } + pub unsafe fn getObjectValue_forString_range_error( + &self, + obj: Option<&mut Option>>, + string: &NSString, + rangep: *mut NSRange, + ) -> Result<(), Id> { + msg_send![ + self, + getObjectValue: obj, + forString: string, + range: rangep, + error: _ + ] + } + pub unsafe fn stringFromNumber(&self, number: &NSNumber) -> Option> { + msg_send_id![self, stringFromNumber: number] + } + pub unsafe fn numberFromString(&self, string: &NSString) -> Option> { + msg_send_id![self, numberFromString: string] + } + pub unsafe fn localizedStringFromNumber_numberStyle( + num: &NSNumber, + nstyle: NSNumberFormatterStyle, + ) -> Id { + msg_send_id![ + Self::class(), + localizedStringFromNumber: num, + numberStyle: nstyle + ] + } + pub unsafe fn defaultFormatterBehavior() -> NSNumberFormatterBehavior { + msg_send![Self::class(), defaultFormatterBehavior] + } + pub unsafe fn setDefaultFormatterBehavior(behavior: NSNumberFormatterBehavior) { + msg_send![Self::class(), setDefaultFormatterBehavior: behavior] + } + pub unsafe fn numberStyle(&self) -> NSNumberFormatterStyle { + msg_send![self, numberStyle] + } + pub unsafe fn setNumberStyle(&self, numberStyle: NSNumberFormatterStyle) { + msg_send![self, setNumberStyle: numberStyle] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn generatesDecimalNumbers(&self) -> bool { + msg_send![self, generatesDecimalNumbers] + } + pub unsafe fn setGeneratesDecimalNumbers(&self, generatesDecimalNumbers: bool) { + msg_send![self, setGeneratesDecimalNumbers: generatesDecimalNumbers] + } + pub unsafe fn formatterBehavior(&self) -> NSNumberFormatterBehavior { + msg_send![self, formatterBehavior] + } + pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSNumberFormatterBehavior) { + msg_send![self, setFormatterBehavior: formatterBehavior] + } + pub unsafe fn negativeFormat(&self) -> Id { + msg_send_id![self, negativeFormat] + } + pub unsafe fn setNegativeFormat(&self, negativeFormat: Option<&NSString>) { + msg_send![self, setNegativeFormat: negativeFormat] + } + pub unsafe fn textAttributesForNegativeValues( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForNegativeValues] + } + pub unsafe fn setTextAttributesForNegativeValues( + &self, + textAttributesForNegativeValues: Option<&NSDictionary>, + ) { + msg_send![ + self, + setTextAttributesForNegativeValues: textAttributesForNegativeValues + ] + } + pub unsafe fn positiveFormat(&self) -> Id { + msg_send_id![self, positiveFormat] + } + pub unsafe fn setPositiveFormat(&self, positiveFormat: Option<&NSString>) { + msg_send![self, setPositiveFormat: positiveFormat] + } + pub unsafe fn textAttributesForPositiveValues( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForPositiveValues] + } + pub unsafe fn setTextAttributesForPositiveValues( + &self, + textAttributesForPositiveValues: Option<&NSDictionary>, + ) { + msg_send![ + self, + setTextAttributesForPositiveValues: textAttributesForPositiveValues + ] + } + pub unsafe fn allowsFloats(&self) -> bool { + msg_send![self, allowsFloats] + } + pub unsafe fn setAllowsFloats(&self, allowsFloats: bool) { + msg_send![self, setAllowsFloats: allowsFloats] + } + pub unsafe fn decimalSeparator(&self) -> Id { + msg_send_id![self, decimalSeparator] + } + pub unsafe fn setDecimalSeparator(&self, decimalSeparator: Option<&NSString>) { + msg_send![self, setDecimalSeparator: decimalSeparator] + } + pub unsafe fn alwaysShowsDecimalSeparator(&self) -> bool { + msg_send![self, alwaysShowsDecimalSeparator] + } + pub unsafe fn setAlwaysShowsDecimalSeparator(&self, alwaysShowsDecimalSeparator: bool) { + msg_send![ + self, + setAlwaysShowsDecimalSeparator: alwaysShowsDecimalSeparator + ] + } + pub unsafe fn currencyDecimalSeparator(&self) -> Id { + msg_send_id![self, currencyDecimalSeparator] + } + pub unsafe fn setCurrencyDecimalSeparator( + &self, + currencyDecimalSeparator: Option<&NSString>, + ) { + msg_send![self, setCurrencyDecimalSeparator: currencyDecimalSeparator] + } + pub unsafe fn usesGroupingSeparator(&self) -> bool { + msg_send![self, usesGroupingSeparator] + } + pub unsafe fn setUsesGroupingSeparator(&self, usesGroupingSeparator: bool) { + msg_send![self, setUsesGroupingSeparator: usesGroupingSeparator] + } + pub unsafe fn groupingSeparator(&self) -> Id { + msg_send_id![self, groupingSeparator] + } + pub unsafe fn setGroupingSeparator(&self, groupingSeparator: Option<&NSString>) { + msg_send![self, setGroupingSeparator: groupingSeparator] + } + pub unsafe fn zeroSymbol(&self) -> Option> { + msg_send_id![self, zeroSymbol] + } + pub unsafe fn setZeroSymbol(&self, zeroSymbol: Option<&NSString>) { + msg_send![self, setZeroSymbol: zeroSymbol] + } + pub unsafe fn textAttributesForZero( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForZero] + } + pub unsafe fn setTextAttributesForZero( + &self, + textAttributesForZero: Option<&NSDictionary>, + ) { + msg_send![self, setTextAttributesForZero: textAttributesForZero] + } + pub unsafe fn nilSymbol(&self) -> Id { + msg_send_id![self, nilSymbol] + } + pub unsafe fn setNilSymbol(&self, nilSymbol: &NSString) { + msg_send![self, setNilSymbol: nilSymbol] + } + pub unsafe fn textAttributesForNil( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForNil] + } + pub unsafe fn setTextAttributesForNil( + &self, + textAttributesForNil: Option<&NSDictionary>, + ) { + msg_send![self, setTextAttributesForNil: textAttributesForNil] + } + pub unsafe fn notANumberSymbol(&self) -> Id { + msg_send_id![self, notANumberSymbol] + } + pub unsafe fn setNotANumberSymbol(&self, notANumberSymbol: Option<&NSString>) { + msg_send![self, setNotANumberSymbol: notANumberSymbol] + } + pub unsafe fn textAttributesForNotANumber( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForNotANumber] + } + pub unsafe fn setTextAttributesForNotANumber( + &self, + textAttributesForNotANumber: Option<&NSDictionary>, + ) { + msg_send![ + self, + setTextAttributesForNotANumber: textAttributesForNotANumber + ] + } + pub unsafe fn positiveInfinitySymbol(&self) -> Id { + msg_send_id![self, positiveInfinitySymbol] + } + pub unsafe fn setPositiveInfinitySymbol(&self, positiveInfinitySymbol: &NSString) { + msg_send![self, setPositiveInfinitySymbol: positiveInfinitySymbol] + } + pub unsafe fn textAttributesForPositiveInfinity( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForPositiveInfinity] + } + pub unsafe fn setTextAttributesForPositiveInfinity( + &self, + textAttributesForPositiveInfinity: Option<&NSDictionary>, + ) { + msg_send![ + self, + setTextAttributesForPositiveInfinity: textAttributesForPositiveInfinity + ] + } + pub unsafe fn negativeInfinitySymbol(&self) -> Id { + msg_send_id![self, negativeInfinitySymbol] + } + pub unsafe fn setNegativeInfinitySymbol(&self, negativeInfinitySymbol: &NSString) { + msg_send![self, setNegativeInfinitySymbol: negativeInfinitySymbol] + } + pub unsafe fn textAttributesForNegativeInfinity( + &self, + ) -> Option, Shared>> { + msg_send_id![self, textAttributesForNegativeInfinity] + } + pub unsafe fn setTextAttributesForNegativeInfinity( + &self, + textAttributesForNegativeInfinity: Option<&NSDictionary>, + ) { + msg_send![ + self, + setTextAttributesForNegativeInfinity: textAttributesForNegativeInfinity + ] + } + pub unsafe fn positivePrefix(&self) -> Id { + msg_send_id![self, positivePrefix] + } + pub unsafe fn setPositivePrefix(&self, positivePrefix: Option<&NSString>) { + msg_send![self, setPositivePrefix: positivePrefix] + } + pub unsafe fn positiveSuffix(&self) -> Id { + msg_send_id![self, positiveSuffix] + } + pub unsafe fn setPositiveSuffix(&self, positiveSuffix: Option<&NSString>) { + msg_send![self, setPositiveSuffix: positiveSuffix] + } + pub unsafe fn negativePrefix(&self) -> Id { + msg_send_id![self, negativePrefix] + } + pub unsafe fn setNegativePrefix(&self, negativePrefix: Option<&NSString>) { + msg_send![self, setNegativePrefix: negativePrefix] + } + pub unsafe fn negativeSuffix(&self) -> Id { + msg_send_id![self, negativeSuffix] + } + pub unsafe fn setNegativeSuffix(&self, negativeSuffix: Option<&NSString>) { + msg_send![self, setNegativeSuffix: negativeSuffix] + } + pub unsafe fn currencyCode(&self) -> Id { + msg_send_id![self, currencyCode] + } + pub unsafe fn setCurrencyCode(&self, currencyCode: Option<&NSString>) { + msg_send![self, setCurrencyCode: currencyCode] + } + pub unsafe fn currencySymbol(&self) -> Id { + msg_send_id![self, currencySymbol] + } + pub unsafe fn setCurrencySymbol(&self, currencySymbol: Option<&NSString>) { + msg_send![self, setCurrencySymbol: currencySymbol] + } + pub unsafe fn internationalCurrencySymbol(&self) -> Id { + msg_send_id![self, internationalCurrencySymbol] + } + pub unsafe fn setInternationalCurrencySymbol( + &self, + internationalCurrencySymbol: Option<&NSString>, + ) { + msg_send![ + self, + setInternationalCurrencySymbol: internationalCurrencySymbol + ] + } + pub unsafe fn percentSymbol(&self) -> Id { + msg_send_id![self, percentSymbol] + } + pub unsafe fn setPercentSymbol(&self, percentSymbol: Option<&NSString>) { + msg_send![self, setPercentSymbol: percentSymbol] + } + pub unsafe fn perMillSymbol(&self) -> Id { + msg_send_id![self, perMillSymbol] + } + pub unsafe fn setPerMillSymbol(&self, perMillSymbol: Option<&NSString>) { + msg_send![self, setPerMillSymbol: perMillSymbol] + } + pub unsafe fn minusSign(&self) -> Id { + msg_send_id![self, minusSign] + } + pub unsafe fn setMinusSign(&self, minusSign: Option<&NSString>) { + msg_send![self, setMinusSign: minusSign] + } + pub unsafe fn plusSign(&self) -> Id { + msg_send_id![self, plusSign] + } + pub unsafe fn setPlusSign(&self, plusSign: Option<&NSString>) { + msg_send![self, setPlusSign: plusSign] + } + pub unsafe fn exponentSymbol(&self) -> Id { + msg_send_id![self, exponentSymbol] + } + pub unsafe fn setExponentSymbol(&self, exponentSymbol: Option<&NSString>) { + msg_send![self, setExponentSymbol: exponentSymbol] + } + pub unsafe fn groupingSize(&self) -> NSUInteger { + msg_send![self, groupingSize] + } + pub unsafe fn setGroupingSize(&self, groupingSize: NSUInteger) { + msg_send![self, setGroupingSize: groupingSize] + } + pub unsafe fn secondaryGroupingSize(&self) -> NSUInteger { + msg_send![self, secondaryGroupingSize] + } + pub unsafe fn setSecondaryGroupingSize(&self, secondaryGroupingSize: NSUInteger) { + msg_send![self, setSecondaryGroupingSize: secondaryGroupingSize] + } + pub unsafe fn multiplier(&self) -> Option> { + msg_send_id![self, multiplier] + } + pub unsafe fn setMultiplier(&self, multiplier: Option<&NSNumber>) { + msg_send![self, setMultiplier: multiplier] + } + pub unsafe fn formatWidth(&self) -> NSUInteger { + msg_send![self, formatWidth] + } + pub unsafe fn setFormatWidth(&self, formatWidth: NSUInteger) { + msg_send![self, setFormatWidth: formatWidth] + } + pub unsafe fn paddingCharacter(&self) -> Id { + msg_send_id![self, paddingCharacter] + } + pub unsafe fn setPaddingCharacter(&self, paddingCharacter: Option<&NSString>) { + msg_send![self, setPaddingCharacter: paddingCharacter] + } + pub unsafe fn paddingPosition(&self) -> NSNumberFormatterPadPosition { + msg_send![self, paddingPosition] + } + pub unsafe fn setPaddingPosition(&self, paddingPosition: NSNumberFormatterPadPosition) { + msg_send![self, setPaddingPosition: paddingPosition] + } + pub unsafe fn roundingMode(&self) -> NSNumberFormatterRoundingMode { + msg_send![self, roundingMode] + } + pub unsafe fn setRoundingMode(&self, roundingMode: NSNumberFormatterRoundingMode) { + msg_send![self, setRoundingMode: roundingMode] + } + pub unsafe fn roundingIncrement(&self) -> Id { + msg_send_id![self, roundingIncrement] + } + pub unsafe fn setRoundingIncrement(&self, roundingIncrement: Option<&NSNumber>) { + msg_send![self, setRoundingIncrement: roundingIncrement] + } + pub unsafe fn minimumIntegerDigits(&self) -> NSUInteger { + msg_send![self, minimumIntegerDigits] + } + pub unsafe fn setMinimumIntegerDigits(&self, minimumIntegerDigits: NSUInteger) { + msg_send![self, setMinimumIntegerDigits: minimumIntegerDigits] + } + pub unsafe fn maximumIntegerDigits(&self) -> NSUInteger { + msg_send![self, maximumIntegerDigits] + } + pub unsafe fn setMaximumIntegerDigits(&self, maximumIntegerDigits: NSUInteger) { + msg_send![self, setMaximumIntegerDigits: maximumIntegerDigits] + } + pub unsafe fn minimumFractionDigits(&self) -> NSUInteger { + msg_send![self, minimumFractionDigits] + } + pub unsafe fn setMinimumFractionDigits(&self, minimumFractionDigits: NSUInteger) { + msg_send![self, setMinimumFractionDigits: minimumFractionDigits] + } + pub unsafe fn maximumFractionDigits(&self) -> NSUInteger { + msg_send![self, maximumFractionDigits] + } + pub unsafe fn setMaximumFractionDigits(&self, maximumFractionDigits: NSUInteger) { + msg_send![self, setMaximumFractionDigits: maximumFractionDigits] + } + pub unsafe fn minimum(&self) -> Option> { + msg_send_id![self, minimum] + } + pub unsafe fn setMinimum(&self, minimum: Option<&NSNumber>) { + msg_send![self, setMinimum: minimum] + } + pub unsafe fn maximum(&self) -> Option> { + msg_send_id![self, maximum] + } + pub unsafe fn setMaximum(&self, maximum: Option<&NSNumber>) { + msg_send![self, setMaximum: maximum] + } + pub unsafe fn currencyGroupingSeparator(&self) -> Id { + msg_send_id![self, currencyGroupingSeparator] + } + pub unsafe fn setCurrencyGroupingSeparator( + &self, + currencyGroupingSeparator: Option<&NSString>, + ) { + msg_send![ + self, + setCurrencyGroupingSeparator: currencyGroupingSeparator + ] + } + pub unsafe fn isLenient(&self) -> bool { + msg_send![self, isLenient] + } + pub unsafe fn setLenient(&self, lenient: bool) { + msg_send![self, setLenient: lenient] + } + pub unsafe fn usesSignificantDigits(&self) -> bool { + msg_send![self, usesSignificantDigits] + } + pub unsafe fn setUsesSignificantDigits(&self, usesSignificantDigits: bool) { + msg_send![self, setUsesSignificantDigits: usesSignificantDigits] + } + pub unsafe fn minimumSignificantDigits(&self) -> NSUInteger { + msg_send![self, minimumSignificantDigits] + } + pub unsafe fn setMinimumSignificantDigits(&self, minimumSignificantDigits: NSUInteger) { + msg_send![self, setMinimumSignificantDigits: minimumSignificantDigits] + } + pub unsafe fn maximumSignificantDigits(&self) -> NSUInteger { + msg_send![self, maximumSignificantDigits] + } + pub unsafe fn setMaximumSignificantDigits(&self, maximumSignificantDigits: NSUInteger) { + msg_send![self, setMaximumSignificantDigits: maximumSignificantDigits] + } + pub unsafe fn isPartialStringValidationEnabled(&self) -> bool { + msg_send![self, isPartialStringValidationEnabled] + } + pub unsafe fn setPartialStringValidationEnabled( + &self, + partialStringValidationEnabled: bool, + ) { + msg_send![ + self, + setPartialStringValidationEnabled: partialStringValidationEnabled + ] + } } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } - pub unsafe fn getObjectValue_forString_range_error( - &self, - obj: Option<&mut Option>>, - string: &NSString, - rangep: *mut NSRange, - ) -> Result<(), Id> { - msg_send![ - self, - getObjectValue: obj, - forString: string, - range: rangep, - error: _ - ] - } - pub unsafe fn stringFromNumber(&self, number: &NSNumber) -> Option> { - msg_send_id![self, stringFromNumber: number] - } - pub unsafe fn numberFromString(&self, string: &NSString) -> Option> { - msg_send_id![self, numberFromString: string] - } - pub unsafe fn localizedStringFromNumber_numberStyle( - num: &NSNumber, - nstyle: NSNumberFormatterStyle, - ) -> Id { - msg_send_id![ - Self::class(), - localizedStringFromNumber: num, - numberStyle: nstyle - ] - } - pub unsafe fn defaultFormatterBehavior() -> NSNumberFormatterBehavior { - msg_send![Self::class(), defaultFormatterBehavior] - } - pub unsafe fn setDefaultFormatterBehavior(behavior: NSNumberFormatterBehavior) { - msg_send![Self::class(), setDefaultFormatterBehavior: behavior] - } - pub unsafe fn numberStyle(&self) -> NSNumberFormatterStyle { - msg_send![self, numberStyle] - } - pub unsafe fn setNumberStyle(&self, numberStyle: NSNumberFormatterStyle) { - msg_send![self, setNumberStyle: numberStyle] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn generatesDecimalNumbers(&self) -> bool { - msg_send![self, generatesDecimalNumbers] - } - pub unsafe fn setGeneratesDecimalNumbers(&self, generatesDecimalNumbers: bool) { - msg_send![self, setGeneratesDecimalNumbers: generatesDecimalNumbers] - } - pub unsafe fn formatterBehavior(&self) -> NSNumberFormatterBehavior { - msg_send![self, formatterBehavior] - } - pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSNumberFormatterBehavior) { - msg_send![self, setFormatterBehavior: formatterBehavior] - } - pub unsafe fn negativeFormat(&self) -> Id { - msg_send_id![self, negativeFormat] - } - pub unsafe fn setNegativeFormat(&self, negativeFormat: Option<&NSString>) { - msg_send![self, setNegativeFormat: negativeFormat] - } - pub unsafe fn textAttributesForNegativeValues( - &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForNegativeValues] - } - pub unsafe fn setTextAttributesForNegativeValues( - &self, - textAttributesForNegativeValues: Option<&NSDictionary>, - ) { - msg_send![ - self, - setTextAttributesForNegativeValues: textAttributesForNegativeValues - ] - } - pub unsafe fn positiveFormat(&self) -> Id { - msg_send_id![self, positiveFormat] - } - pub unsafe fn setPositiveFormat(&self, positiveFormat: Option<&NSString>) { - msg_send![self, setPositiveFormat: positiveFormat] - } - pub unsafe fn textAttributesForPositiveValues( - &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForPositiveValues] - } - pub unsafe fn setTextAttributesForPositiveValues( - &self, - textAttributesForPositiveValues: Option<&NSDictionary>, - ) { - msg_send![ - self, - setTextAttributesForPositiveValues: textAttributesForPositiveValues - ] - } - pub unsafe fn allowsFloats(&self) -> bool { - msg_send![self, allowsFloats] - } - pub unsafe fn setAllowsFloats(&self, allowsFloats: bool) { - msg_send![self, setAllowsFloats: allowsFloats] - } - pub unsafe fn decimalSeparator(&self) -> Id { - msg_send_id![self, decimalSeparator] - } - pub unsafe fn setDecimalSeparator(&self, decimalSeparator: Option<&NSString>) { - msg_send![self, setDecimalSeparator: decimalSeparator] - } - pub unsafe fn alwaysShowsDecimalSeparator(&self) -> bool { - msg_send![self, alwaysShowsDecimalSeparator] - } - pub unsafe fn setAlwaysShowsDecimalSeparator(&self, alwaysShowsDecimalSeparator: bool) { - msg_send![ - self, - setAlwaysShowsDecimalSeparator: alwaysShowsDecimalSeparator - ] - } - pub unsafe fn currencyDecimalSeparator(&self) -> Id { - msg_send_id![self, currencyDecimalSeparator] - } - pub unsafe fn setCurrencyDecimalSeparator(&self, currencyDecimalSeparator: Option<&NSString>) { - msg_send![self, setCurrencyDecimalSeparator: currencyDecimalSeparator] - } - pub unsafe fn usesGroupingSeparator(&self) -> bool { - msg_send![self, usesGroupingSeparator] - } - pub unsafe fn setUsesGroupingSeparator(&self, usesGroupingSeparator: bool) { - msg_send![self, setUsesGroupingSeparator: usesGroupingSeparator] - } - pub unsafe fn groupingSeparator(&self) -> Id { - msg_send_id![self, groupingSeparator] - } - pub unsafe fn setGroupingSeparator(&self, groupingSeparator: Option<&NSString>) { - msg_send![self, setGroupingSeparator: groupingSeparator] - } - pub unsafe fn zeroSymbol(&self) -> Option> { - msg_send_id![self, zeroSymbol] - } - pub unsafe fn setZeroSymbol(&self, zeroSymbol: Option<&NSString>) { - msg_send![self, setZeroSymbol: zeroSymbol] - } - pub unsafe fn textAttributesForZero( - &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForZero] - } - pub unsafe fn setTextAttributesForZero( - &self, - textAttributesForZero: Option<&NSDictionary>, - ) { - msg_send![self, setTextAttributesForZero: textAttributesForZero] - } - pub unsafe fn nilSymbol(&self) -> Id { - msg_send_id![self, nilSymbol] - } - pub unsafe fn setNilSymbol(&self, nilSymbol: &NSString) { - msg_send![self, setNilSymbol: nilSymbol] - } - pub unsafe fn textAttributesForNil( - &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForNil] - } - pub unsafe fn setTextAttributesForNil( - &self, - textAttributesForNil: Option<&NSDictionary>, - ) { - msg_send![self, setTextAttributesForNil: textAttributesForNil] - } - pub unsafe fn notANumberSymbol(&self) -> Id { - msg_send_id![self, notANumberSymbol] - } - pub unsafe fn setNotANumberSymbol(&self, notANumberSymbol: Option<&NSString>) { - msg_send![self, setNotANumberSymbol: notANumberSymbol] - } - pub unsafe fn textAttributesForNotANumber( - &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForNotANumber] - } - pub unsafe fn setTextAttributesForNotANumber( - &self, - textAttributesForNotANumber: Option<&NSDictionary>, - ) { - msg_send![ - self, - setTextAttributesForNotANumber: textAttributesForNotANumber - ] - } - pub unsafe fn positiveInfinitySymbol(&self) -> Id { - msg_send_id![self, positiveInfinitySymbol] - } - pub unsafe fn setPositiveInfinitySymbol(&self, positiveInfinitySymbol: &NSString) { - msg_send![self, setPositiveInfinitySymbol: positiveInfinitySymbol] - } - pub unsafe fn textAttributesForPositiveInfinity( - &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForPositiveInfinity] - } - pub unsafe fn setTextAttributesForPositiveInfinity( - &self, - textAttributesForPositiveInfinity: Option<&NSDictionary>, - ) { - msg_send![ - self, - setTextAttributesForPositiveInfinity: textAttributesForPositiveInfinity - ] - } - pub unsafe fn negativeInfinitySymbol(&self) -> Id { - msg_send_id![self, negativeInfinitySymbol] - } - pub unsafe fn setNegativeInfinitySymbol(&self, negativeInfinitySymbol: &NSString) { - msg_send![self, setNegativeInfinitySymbol: negativeInfinitySymbol] - } - pub unsafe fn textAttributesForNegativeInfinity( - &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForNegativeInfinity] - } - pub unsafe fn setTextAttributesForNegativeInfinity( - &self, - textAttributesForNegativeInfinity: Option<&NSDictionary>, - ) { - msg_send![ - self, - setTextAttributesForNegativeInfinity: textAttributesForNegativeInfinity - ] - } - pub unsafe fn positivePrefix(&self) -> Id { - msg_send_id![self, positivePrefix] - } - pub unsafe fn setPositivePrefix(&self, positivePrefix: Option<&NSString>) { - msg_send![self, setPositivePrefix: positivePrefix] - } - pub unsafe fn positiveSuffix(&self) -> Id { - msg_send_id![self, positiveSuffix] - } - pub unsafe fn setPositiveSuffix(&self, positiveSuffix: Option<&NSString>) { - msg_send![self, setPositiveSuffix: positiveSuffix] - } - pub unsafe fn negativePrefix(&self) -> Id { - msg_send_id![self, negativePrefix] - } - pub unsafe fn setNegativePrefix(&self, negativePrefix: Option<&NSString>) { - msg_send![self, setNegativePrefix: negativePrefix] - } - pub unsafe fn negativeSuffix(&self) -> Id { - msg_send_id![self, negativeSuffix] - } - pub unsafe fn setNegativeSuffix(&self, negativeSuffix: Option<&NSString>) { - msg_send![self, setNegativeSuffix: negativeSuffix] - } - pub unsafe fn currencyCode(&self) -> Id { - msg_send_id![self, currencyCode] - } - pub unsafe fn setCurrencyCode(&self, currencyCode: Option<&NSString>) { - msg_send![self, setCurrencyCode: currencyCode] - } - pub unsafe fn currencySymbol(&self) -> Id { - msg_send_id![self, currencySymbol] - } - pub unsafe fn setCurrencySymbol(&self, currencySymbol: Option<&NSString>) { - msg_send![self, setCurrencySymbol: currencySymbol] - } - pub unsafe fn internationalCurrencySymbol(&self) -> Id { - msg_send_id![self, internationalCurrencySymbol] - } - pub unsafe fn setInternationalCurrencySymbol( - &self, - internationalCurrencySymbol: Option<&NSString>, - ) { - msg_send![ - self, - setInternationalCurrencySymbol: internationalCurrencySymbol - ] - } - pub unsafe fn percentSymbol(&self) -> Id { - msg_send_id![self, percentSymbol] - } - pub unsafe fn setPercentSymbol(&self, percentSymbol: Option<&NSString>) { - msg_send![self, setPercentSymbol: percentSymbol] - } - pub unsafe fn perMillSymbol(&self) -> Id { - msg_send_id![self, perMillSymbol] - } - pub unsafe fn setPerMillSymbol(&self, perMillSymbol: Option<&NSString>) { - msg_send![self, setPerMillSymbol: perMillSymbol] - } - pub unsafe fn minusSign(&self) -> Id { - msg_send_id![self, minusSign] - } - pub unsafe fn setMinusSign(&self, minusSign: Option<&NSString>) { - msg_send![self, setMinusSign: minusSign] - } - pub unsafe fn plusSign(&self) -> Id { - msg_send_id![self, plusSign] - } - pub unsafe fn setPlusSign(&self, plusSign: Option<&NSString>) { - msg_send![self, setPlusSign: plusSign] - } - pub unsafe fn exponentSymbol(&self) -> Id { - msg_send_id![self, exponentSymbol] - } - pub unsafe fn setExponentSymbol(&self, exponentSymbol: Option<&NSString>) { - msg_send![self, setExponentSymbol: exponentSymbol] - } - pub unsafe fn groupingSize(&self) -> NSUInteger { - msg_send![self, groupingSize] - } - pub unsafe fn setGroupingSize(&self, groupingSize: NSUInteger) { - msg_send![self, setGroupingSize: groupingSize] - } - pub unsafe fn secondaryGroupingSize(&self) -> NSUInteger { - msg_send![self, secondaryGroupingSize] - } - pub unsafe fn setSecondaryGroupingSize(&self, secondaryGroupingSize: NSUInteger) { - msg_send![self, setSecondaryGroupingSize: secondaryGroupingSize] - } - pub unsafe fn multiplier(&self) -> Option> { - msg_send_id![self, multiplier] - } - pub unsafe fn setMultiplier(&self, multiplier: Option<&NSNumber>) { - msg_send![self, setMultiplier: multiplier] - } - pub unsafe fn formatWidth(&self) -> NSUInteger { - msg_send![self, formatWidth] - } - pub unsafe fn setFormatWidth(&self, formatWidth: NSUInteger) { - msg_send![self, setFormatWidth: formatWidth] - } - pub unsafe fn paddingCharacter(&self) -> Id { - msg_send_id![self, paddingCharacter] - } - pub unsafe fn setPaddingCharacter(&self, paddingCharacter: Option<&NSString>) { - msg_send![self, setPaddingCharacter: paddingCharacter] - } - pub unsafe fn paddingPosition(&self) -> NSNumberFormatterPadPosition { - msg_send![self, paddingPosition] - } - pub unsafe fn setPaddingPosition(&self, paddingPosition: NSNumberFormatterPadPosition) { - msg_send![self, setPaddingPosition: paddingPosition] - } - pub unsafe fn roundingMode(&self) -> NSNumberFormatterRoundingMode { - msg_send![self, roundingMode] - } - pub unsafe fn setRoundingMode(&self, roundingMode: NSNumberFormatterRoundingMode) { - msg_send![self, setRoundingMode: roundingMode] - } - pub unsafe fn roundingIncrement(&self) -> Id { - msg_send_id![self, roundingIncrement] - } - pub unsafe fn setRoundingIncrement(&self, roundingIncrement: Option<&NSNumber>) { - msg_send![self, setRoundingIncrement: roundingIncrement] - } - pub unsafe fn minimumIntegerDigits(&self) -> NSUInteger { - msg_send![self, minimumIntegerDigits] - } - pub unsafe fn setMinimumIntegerDigits(&self, minimumIntegerDigits: NSUInteger) { - msg_send![self, setMinimumIntegerDigits: minimumIntegerDigits] - } - pub unsafe fn maximumIntegerDigits(&self) -> NSUInteger { - msg_send![self, maximumIntegerDigits] - } - pub unsafe fn setMaximumIntegerDigits(&self, maximumIntegerDigits: NSUInteger) { - msg_send![self, setMaximumIntegerDigits: maximumIntegerDigits] - } - pub unsafe fn minimumFractionDigits(&self) -> NSUInteger { - msg_send![self, minimumFractionDigits] - } - pub unsafe fn setMinimumFractionDigits(&self, minimumFractionDigits: NSUInteger) { - msg_send![self, setMinimumFractionDigits: minimumFractionDigits] - } - pub unsafe fn maximumFractionDigits(&self) -> NSUInteger { - msg_send![self, maximumFractionDigits] - } - pub unsafe fn setMaximumFractionDigits(&self, maximumFractionDigits: NSUInteger) { - msg_send![self, setMaximumFractionDigits: maximumFractionDigits] - } - pub unsafe fn minimum(&self) -> Option> { - msg_send_id![self, minimum] - } - pub unsafe fn setMinimum(&self, minimum: Option<&NSNumber>) { - msg_send![self, setMinimum: minimum] - } - pub unsafe fn maximum(&self) -> Option> { - msg_send_id![self, maximum] - } - pub unsafe fn setMaximum(&self, maximum: Option<&NSNumber>) { - msg_send![self, setMaximum: maximum] - } - pub unsafe fn currencyGroupingSeparator(&self) -> Id { - msg_send_id![self, currencyGroupingSeparator] - } - pub unsafe fn setCurrencyGroupingSeparator( - &self, - currencyGroupingSeparator: Option<&NSString>, - ) { - msg_send![ - self, - setCurrencyGroupingSeparator: currencyGroupingSeparator - ] - } - pub unsafe fn isLenient(&self) -> bool { - msg_send![self, isLenient] - } - pub unsafe fn setLenient(&self, lenient: bool) { - msg_send![self, setLenient: lenient] - } - pub unsafe fn usesSignificantDigits(&self) -> bool { - msg_send![self, usesSignificantDigits] - } - pub unsafe fn setUsesSignificantDigits(&self, usesSignificantDigits: bool) { - msg_send![self, setUsesSignificantDigits: usesSignificantDigits] - } - pub unsafe fn minimumSignificantDigits(&self) -> NSUInteger { - msg_send![self, minimumSignificantDigits] - } - pub unsafe fn setMinimumSignificantDigits(&self, minimumSignificantDigits: NSUInteger) { - msg_send![self, setMinimumSignificantDigits: minimumSignificantDigits] - } - pub unsafe fn maximumSignificantDigits(&self) -> NSUInteger { - msg_send![self, maximumSignificantDigits] - } - pub unsafe fn setMaximumSignificantDigits(&self, maximumSignificantDigits: NSUInteger) { - msg_send![self, setMaximumSignificantDigits: maximumSignificantDigits] - } - pub unsafe fn isPartialStringValidationEnabled(&self) -> bool { - msg_send![self, isPartialStringValidationEnabled] - } - pub unsafe fn setPartialStringValidationEnabled(&self, partialStringValidationEnabled: bool) { - msg_send![ - self, - setPartialStringValidationEnabled: partialStringValidationEnabled - ] - } -} +); use super::__exported::NSDecimalNumberHandler; -#[doc = "NSNumberFormatterCompatibility"] -impl NSNumberFormatter { - pub unsafe fn hasThousandSeparators(&self) -> bool { - msg_send![self, hasThousandSeparators] - } - pub unsafe fn setHasThousandSeparators(&self, hasThousandSeparators: bool) { - msg_send![self, setHasThousandSeparators: hasThousandSeparators] - } - pub unsafe fn thousandSeparator(&self) -> Id { - msg_send_id![self, thousandSeparator] - } - pub unsafe fn setThousandSeparator(&self, thousandSeparator: Option<&NSString>) { - msg_send![self, setThousandSeparator: thousandSeparator] - } - pub unsafe fn localizesFormat(&self) -> bool { - msg_send![self, localizesFormat] - } - pub unsafe fn setLocalizesFormat(&self, localizesFormat: bool) { - msg_send![self, setLocalizesFormat: localizesFormat] - } - pub unsafe fn format(&self) -> Id { - msg_send_id![self, format] - } - pub unsafe fn setFormat(&self, format: &NSString) { - msg_send![self, setFormat: format] - } - pub unsafe fn attributedStringForZero(&self) -> Id { - msg_send_id![self, attributedStringForZero] +extern_methods!( + #[doc = "NSNumberFormatterCompatibility"] + unsafe impl NSNumberFormatter { + pub unsafe fn hasThousandSeparators(&self) -> bool { + msg_send![self, hasThousandSeparators] + } + pub unsafe fn setHasThousandSeparators(&self, hasThousandSeparators: bool) { + msg_send![self, setHasThousandSeparators: hasThousandSeparators] + } + pub unsafe fn thousandSeparator(&self) -> Id { + msg_send_id![self, thousandSeparator] + } + pub unsafe fn setThousandSeparator(&self, thousandSeparator: Option<&NSString>) { + msg_send![self, setThousandSeparator: thousandSeparator] + } + pub unsafe fn localizesFormat(&self) -> bool { + msg_send![self, localizesFormat] + } + pub unsafe fn setLocalizesFormat(&self, localizesFormat: bool) { + msg_send![self, setLocalizesFormat: localizesFormat] + } + pub unsafe fn format(&self) -> Id { + msg_send_id![self, format] + } + pub unsafe fn setFormat(&self, format: &NSString) { + msg_send![self, setFormat: format] + } + pub unsafe fn attributedStringForZero(&self) -> Id { + msg_send_id![self, attributedStringForZero] + } + pub unsafe fn setAttributedStringForZero( + &self, + attributedStringForZero: &NSAttributedString, + ) { + msg_send![self, setAttributedStringForZero: attributedStringForZero] + } + pub unsafe fn attributedStringForNil(&self) -> Id { + msg_send_id![self, attributedStringForNil] + } + pub unsafe fn setAttributedStringForNil( + &self, + attributedStringForNil: &NSAttributedString, + ) { + msg_send![self, setAttributedStringForNil: attributedStringForNil] + } + pub unsafe fn attributedStringForNotANumber(&self) -> Id { + msg_send_id![self, attributedStringForNotANumber] + } + pub unsafe fn setAttributedStringForNotANumber( + &self, + attributedStringForNotANumber: &NSAttributedString, + ) { + msg_send![ + self, + setAttributedStringForNotANumber: attributedStringForNotANumber + ] + } + pub unsafe fn roundingBehavior(&self) -> Id { + msg_send_id![self, roundingBehavior] + } + pub unsafe fn setRoundingBehavior(&self, roundingBehavior: &NSDecimalNumberHandler) { + msg_send![self, setRoundingBehavior: roundingBehavior] + } } - pub unsafe fn setAttributedStringForZero(&self, attributedStringForZero: &NSAttributedString) { - msg_send![self, setAttributedStringForZero: attributedStringForZero] - } - pub unsafe fn attributedStringForNil(&self) -> Id { - msg_send_id![self, attributedStringForNil] - } - pub unsafe fn setAttributedStringForNil(&self, attributedStringForNil: &NSAttributedString) { - msg_send![self, setAttributedStringForNil: attributedStringForNil] - } - pub unsafe fn attributedStringForNotANumber(&self) -> Id { - msg_send_id![self, attributedStringForNotANumber] - } - pub unsafe fn setAttributedStringForNotANumber( - &self, - attributedStringForNotANumber: &NSAttributedString, - ) { - msg_send![ - self, - setAttributedStringForNotANumber: attributedStringForNotANumber - ] - } - pub unsafe fn roundingBehavior(&self) -> Id { - msg_send_id![self, roundingBehavior] - } - pub unsafe fn setRoundingBehavior(&self, roundingBehavior: &NSDecimalNumberHandler) { - msg_send![self, setRoundingBehavior: roundingBehavior] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index dda05f636..68571c85a 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -5,6 +5,6 @@ use crate::CoreFoundation::generated::CFAvailability::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSExceptionName = NSString; pub type NSRunLoopMode = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index 7a9930f44..35706ca04 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -10,36 +10,45 @@ use crate::Foundation::generated::NSZone::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSCopying = NSObject; pub type NSMutableCopying = NSObject; pub type NSCoding = NSObject; pub type NSSecureCoding = NSObject; -#[doc = "NSCoderMethods"] -impl NSObject { - pub unsafe fn version() -> NSInteger { - msg_send![Self::class(), version] +extern_methods!( + #[doc = "NSCoderMethods"] + unsafe impl NSObject { + pub unsafe fn version() -> NSInteger { + msg_send![Self::class(), version] + } + pub unsafe fn setVersion(aVersion: NSInteger) { + msg_send![Self::class(), setVersion: aVersion] + } + pub unsafe fn classForCoder(&self) -> &Class { + msg_send![self, classForCoder] + } + pub unsafe fn replacementObjectForCoder( + &self, + coder: &NSCoder, + ) -> Option> { + msg_send_id![self, replacementObjectForCoder: coder] + } } - pub unsafe fn setVersion(aVersion: NSInteger) { - msg_send![Self::class(), setVersion: aVersion] +); +extern_methods!( + #[doc = "NSDeprecatedMethods"] + unsafe impl NSObject { + pub unsafe fn poseAsClass(aClass: &Class) { + msg_send![Self::class(), poseAsClass: aClass] + } } - pub unsafe fn classForCoder(&self) -> &Class { - msg_send![self, classForCoder] - } - pub unsafe fn replacementObjectForCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, replacementObjectForCoder: coder] - } -} -#[doc = "NSDeprecatedMethods"] -impl NSObject { - pub unsafe fn poseAsClass(aClass: &Class) { - msg_send![Self::class(), poseAsClass: aClass] - } -} +); pub type NSDiscardableContent = NSObject; -#[doc = "NSDiscardableContentProxy"] -impl NSObject { - pub unsafe fn autoContentAccessingProxy(&self) -> Id { - msg_send_id![self, autoContentAccessingProxy] +extern_methods!( + #[doc = "NSDiscardableContentProxy"] + unsafe impl NSObject { + pub unsafe fn autoContentAccessingProxy(&self) -> Id { + msg_send_id![self, autoContentAccessingProxy] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs index c237ac9d6..d9a972a5c 100644 --- a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -5,50 +5,54 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSScripting"] -impl NSObject { - pub unsafe fn scriptingValueForSpecifier( - &self, - objectSpecifier: &NSScriptObjectSpecifier, - ) -> Option> { - msg_send_id![self, scriptingValueForSpecifier: objectSpecifier] +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +extern_methods!( + #[doc = "NSScripting"] + unsafe impl NSObject { + pub unsafe fn scriptingValueForSpecifier( + &self, + objectSpecifier: &NSScriptObjectSpecifier, + ) -> Option> { + msg_send_id![self, scriptingValueForSpecifier: objectSpecifier] + } + pub unsafe fn scriptingProperties( + &self, + ) -> Option, Shared>> { + msg_send_id![self, scriptingProperties] + } + pub unsafe fn setScriptingProperties( + &self, + scriptingProperties: Option<&NSDictionary>, + ) { + msg_send![self, setScriptingProperties: scriptingProperties] + } + pub unsafe fn copyScriptingValue_forKey_withProperties( + &self, + value: &Object, + key: &NSString, + properties: &NSDictionary, + ) -> Option> { + msg_send_id![ + self, + copyScriptingValue: value, + forKey: key, + withProperties: properties + ] + } + pub unsafe fn newScriptingObjectOfClass_forValueForKey_withContentsValue_properties( + &self, + objectClass: &Class, + key: &NSString, + contentsValue: Option<&Object>, + properties: &NSDictionary, + ) -> Option> { + msg_send_id![ + self, + newScriptingObjectOfClass: objectClass, + forValueForKey: key, + withContentsValue: contentsValue, + properties: properties + ] + } } - pub unsafe fn scriptingProperties(&self) -> Option, Shared>> { - msg_send_id![self, scriptingProperties] - } - pub unsafe fn setScriptingProperties( - &self, - scriptingProperties: Option<&NSDictionary>, - ) { - msg_send![self, setScriptingProperties: scriptingProperties] - } - pub unsafe fn copyScriptingValue_forKey_withProperties( - &self, - value: &Object, - key: &NSString, - properties: &NSDictionary, - ) -> Option> { - msg_send_id![ - self, - copyScriptingValue: value, - forKey: key, - withProperties: properties - ] - } - pub unsafe fn newScriptingObjectOfClass_forValueForKey_withContentsValue_properties( - &self, - objectClass: &Class, - key: &NSString, - contentsValue: Option<&Object>, - properties: &NSDictionary, - ) -> Option> { - msg_send_id![ - self, - newScriptingObjectOfClass: objectClass, - forValueForKey: key, - withContentsValue: contentsValue, - properties: properties - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index a50e63e00..03acffc42 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSProgress::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSOperation; @@ -16,77 +16,79 @@ extern_class!( type Super = NSObject; } ); -impl NSOperation { - pub unsafe fn start(&self) { - msg_send![self, start] +extern_methods!( + unsafe impl NSOperation { + pub unsafe fn start(&self) { + msg_send![self, start] + } + pub unsafe fn main(&self) { + msg_send![self, main] + } + pub unsafe fn isCancelled(&self) -> bool { + msg_send![self, isCancelled] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn isExecuting(&self) -> bool { + msg_send![self, isExecuting] + } + pub unsafe fn isFinished(&self) -> bool { + msg_send![self, isFinished] + } + pub unsafe fn isConcurrent(&self) -> bool { + msg_send![self, isConcurrent] + } + pub unsafe fn isAsynchronous(&self) -> bool { + msg_send![self, isAsynchronous] + } + pub unsafe fn isReady(&self) -> bool { + msg_send![self, isReady] + } + pub unsafe fn addDependency(&self, op: &NSOperation) { + msg_send![self, addDependency: op] + } + pub unsafe fn removeDependency(&self, op: &NSOperation) { + msg_send![self, removeDependency: op] + } + pub unsafe fn dependencies(&self) -> Id, Shared> { + msg_send_id![self, dependencies] + } + pub unsafe fn queuePriority(&self) -> NSOperationQueuePriority { + msg_send![self, queuePriority] + } + pub unsafe fn setQueuePriority(&self, queuePriority: NSOperationQueuePriority) { + msg_send![self, setQueuePriority: queuePriority] + } + pub unsafe fn completionBlock(&self) -> TodoBlock { + msg_send![self, completionBlock] + } + pub unsafe fn setCompletionBlock(&self, completionBlock: TodoBlock) { + msg_send![self, setCompletionBlock: completionBlock] + } + pub unsafe fn waitUntilFinished(&self) { + msg_send![self, waitUntilFinished] + } + pub unsafe fn threadPriority(&self) -> c_double { + msg_send![self, threadPriority] + } + pub unsafe fn setThreadPriority(&self, threadPriority: c_double) { + msg_send![self, setThreadPriority: threadPriority] + } + pub unsafe fn qualityOfService(&self) -> NSQualityOfService { + msg_send![self, qualityOfService] + } + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { + msg_send![self, setQualityOfService: qualityOfService] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } } - pub unsafe fn main(&self) { - msg_send![self, main] - } - pub unsafe fn isCancelled(&self) -> bool { - msg_send![self, isCancelled] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn isExecuting(&self) -> bool { - msg_send![self, isExecuting] - } - pub unsafe fn isFinished(&self) -> bool { - msg_send![self, isFinished] - } - pub unsafe fn isConcurrent(&self) -> bool { - msg_send![self, isConcurrent] - } - pub unsafe fn isAsynchronous(&self) -> bool { - msg_send![self, isAsynchronous] - } - pub unsafe fn isReady(&self) -> bool { - msg_send![self, isReady] - } - pub unsafe fn addDependency(&self, op: &NSOperation) { - msg_send![self, addDependency: op] - } - pub unsafe fn removeDependency(&self, op: &NSOperation) { - msg_send![self, removeDependency: op] - } - pub unsafe fn dependencies(&self) -> Id, Shared> { - msg_send_id![self, dependencies] - } - pub unsafe fn queuePriority(&self) -> NSOperationQueuePriority { - msg_send![self, queuePriority] - } - pub unsafe fn setQueuePriority(&self, queuePriority: NSOperationQueuePriority) { - msg_send![self, setQueuePriority: queuePriority] - } - pub unsafe fn completionBlock(&self) -> TodoBlock { - msg_send![self, completionBlock] - } - pub unsafe fn setCompletionBlock(&self, completionBlock: TodoBlock) { - msg_send![self, setCompletionBlock: completionBlock] - } - pub unsafe fn waitUntilFinished(&self) { - msg_send![self, waitUntilFinished] - } - pub unsafe fn threadPriority(&self) -> c_double { - msg_send![self, threadPriority] - } - pub unsafe fn setThreadPriority(&self, threadPriority: c_double) { - msg_send![self, setThreadPriority: threadPriority] - } - pub unsafe fn qualityOfService(&self) -> NSQualityOfService { - msg_send![self, qualityOfService] - } - pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { - msg_send![self, setQualityOfService: qualityOfService] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } -} +); extern_class!( #[derive(Debug)] pub struct NSBlockOperation; @@ -94,14 +96,16 @@ extern_class!( type Super = NSOperation; } ); -impl NSBlockOperation { - pub unsafe fn blockOperationWithBlock(block: TodoBlock) -> Id { - msg_send_id![Self::class(), blockOperationWithBlock: block] - } - pub unsafe fn addExecutionBlock(&self, block: TodoBlock) { - msg_send![self, addExecutionBlock: block] +extern_methods!( + unsafe impl NSBlockOperation { + pub unsafe fn blockOperationWithBlock(block: TodoBlock) -> Id { + msg_send_id![Self::class(), blockOperationWithBlock: block] + } + pub unsafe fn addExecutionBlock(&self, block: TodoBlock) { + msg_send![self, addExecutionBlock: block] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSInvocationOperation; @@ -109,25 +113,27 @@ extern_class!( type Super = NSOperation; } ); -impl NSInvocationOperation { - pub unsafe fn initWithTarget_selector_object( - &self, - target: &Object, - sel: Sel, - arg: Option<&Object>, - ) -> Option> { - msg_send_id![self, initWithTarget: target, selector: sel, object: arg] +extern_methods!( + unsafe impl NSInvocationOperation { + pub unsafe fn initWithTarget_selector_object( + &self, + target: &Object, + sel: Sel, + arg: Option<&Object>, + ) -> Option> { + msg_send_id![self, initWithTarget: target, selector: sel, object: arg] + } + pub unsafe fn initWithInvocation(&self, inv: &NSInvocation) -> Id { + msg_send_id![self, initWithInvocation: inv] + } + pub unsafe fn invocation(&self) -> Id { + msg_send_id![self, invocation] + } + pub unsafe fn result(&self) -> Option> { + msg_send_id![self, result] + } } - pub unsafe fn initWithInvocation(&self, inv: &NSInvocation) -> Id { - msg_send_id![self, initWithInvocation: inv] - } - pub unsafe fn invocation(&self) -> Id { - msg_send_id![self, invocation] - } - pub unsafe fn result(&self) -> Option> { - msg_send_id![self, result] - } -} +); extern_class!( #[derive(Debug)] pub struct NSOperationQueue; @@ -135,74 +141,85 @@ extern_class!( type Super = NSObject; } ); -impl NSOperationQueue { - pub unsafe fn progress(&self) -> Id { - msg_send_id![self, progress] - } - pub unsafe fn addOperation(&self, op: &NSOperation) { - msg_send![self, addOperation: op] - } - pub unsafe fn addOperations_waitUntilFinished(&self, ops: &NSArray, wait: bool) { - msg_send![self, addOperations: ops, waitUntilFinished: wait] - } - pub unsafe fn addOperationWithBlock(&self, block: TodoBlock) { - msg_send![self, addOperationWithBlock: block] - } - pub unsafe fn addBarrierBlock(&self, barrier: TodoBlock) { - msg_send![self, addBarrierBlock: barrier] - } - pub unsafe fn maxConcurrentOperationCount(&self) -> NSInteger { - msg_send![self, maxConcurrentOperationCount] - } - pub unsafe fn setMaxConcurrentOperationCount(&self, maxConcurrentOperationCount: NSInteger) { - msg_send![ - self, - setMaxConcurrentOperationCount: maxConcurrentOperationCount - ] - } - pub unsafe fn isSuspended(&self) -> bool { - msg_send![self, isSuspended] - } - pub unsafe fn setSuspended(&self, suspended: bool) { - msg_send![self, setSuspended: suspended] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] +extern_methods!( + unsafe impl NSOperationQueue { + pub unsafe fn progress(&self) -> Id { + msg_send_id![self, progress] + } + pub unsafe fn addOperation(&self, op: &NSOperation) { + msg_send![self, addOperation: op] + } + pub unsafe fn addOperations_waitUntilFinished( + &self, + ops: &NSArray, + wait: bool, + ) { + msg_send![self, addOperations: ops, waitUntilFinished: wait] + } + pub unsafe fn addOperationWithBlock(&self, block: TodoBlock) { + msg_send![self, addOperationWithBlock: block] + } + pub unsafe fn addBarrierBlock(&self, barrier: TodoBlock) { + msg_send![self, addBarrierBlock: barrier] + } + pub unsafe fn maxConcurrentOperationCount(&self) -> NSInteger { + msg_send![self, maxConcurrentOperationCount] + } + pub unsafe fn setMaxConcurrentOperationCount( + &self, + maxConcurrentOperationCount: NSInteger, + ) { + msg_send![ + self, + setMaxConcurrentOperationCount: maxConcurrentOperationCount + ] + } + pub unsafe fn isSuspended(&self) -> bool { + msg_send![self, isSuspended] + } + pub unsafe fn setSuspended(&self, suspended: bool) { + msg_send![self, setSuspended: suspended] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } + pub unsafe fn qualityOfService(&self) -> NSQualityOfService { + msg_send![self, qualityOfService] + } + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { + msg_send![self, setQualityOfService: qualityOfService] + } + pub unsafe fn underlyingQueue(&self) -> Option> { + msg_send_id![self, underlyingQueue] + } + pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: Option<&dispatch_queue_t>) { + msg_send![self, setUnderlyingQueue: underlyingQueue] + } + pub unsafe fn cancelAllOperations(&self) { + msg_send![self, cancelAllOperations] + } + pub unsafe fn waitUntilAllOperationsAreFinished(&self) { + msg_send![self, waitUntilAllOperationsAreFinished] + } + pub unsafe fn currentQueue() -> Option> { + msg_send_id![Self::class(), currentQueue] + } + pub unsafe fn mainQueue() -> Id { + msg_send_id![Self::class(), mainQueue] + } } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } - pub unsafe fn qualityOfService(&self) -> NSQualityOfService { - msg_send![self, qualityOfService] - } - pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { - msg_send![self, setQualityOfService: qualityOfService] - } - pub unsafe fn underlyingQueue(&self) -> Option> { - msg_send_id![self, underlyingQueue] - } - pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: Option<&dispatch_queue_t>) { - msg_send![self, setUnderlyingQueue: underlyingQueue] - } - pub unsafe fn cancelAllOperations(&self) { - msg_send![self, cancelAllOperations] - } - pub unsafe fn waitUntilAllOperationsAreFinished(&self) { - msg_send![self, waitUntilAllOperationsAreFinished] - } - pub unsafe fn currentQueue() -> Option> { - msg_send_id![Self::class(), currentQueue] - } - pub unsafe fn mainQueue() -> Id { - msg_send_id![Self::class(), mainQueue] - } -} -#[doc = "NSDeprecated"] -impl NSOperationQueue { - pub unsafe fn operations(&self) -> Id, Shared> { - msg_send_id![self, operations] - } - pub unsafe fn operationCount(&self) -> NSUInteger { - msg_send![self, operationCount] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSOperationQueue { + pub unsafe fn operations(&self) -> Id, Shared> { + msg_send_id![self, operations] + } + pub unsafe fn operationCount(&self) -> NSUInteger { + msg_send![self, operationCount] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index ab16e40d5..fb0cd6871 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedCollectionChange; @@ -10,52 +10,54 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSOrderedCollectionChange { - pub unsafe fn changeWithObject_type_index( - anObject: Option<&ObjectType>, - type_: NSCollectionChangeType, - index: NSUInteger, - ) -> Id, Shared> { - msg_send_id ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index] +extern_methods!( + unsafe impl NSOrderedCollectionChange { + pub unsafe fn changeWithObject_type_index( + anObject: Option<&ObjectType>, + type_: NSCollectionChangeType, + index: NSUInteger, + ) -> Id, Shared> { + msg_send_id ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index] + } + pub unsafe fn changeWithObject_type_index_associatedIndex( + anObject: Option<&ObjectType>, + type_: NSCollectionChangeType, + index: NSUInteger, + associatedIndex: NSUInteger, + ) -> Id, Shared> { + msg_send_id ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] + } + pub unsafe fn object(&self) -> Option> { + msg_send_id![self, object] + } + pub unsafe fn changeType(&self) -> NSCollectionChangeType { + msg_send![self, changeType] + } + pub unsafe fn index(&self) -> NSUInteger { + msg_send![self, index] + } + pub unsafe fn associatedIndex(&self) -> NSUInteger { + msg_send![self, associatedIndex] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithObject_type_index( + &self, + anObject: Option<&ObjectType>, + type_: NSCollectionChangeType, + index: NSUInteger, + ) -> Id { + msg_send_id ! [self , initWithObject : anObject , type : type_ , index : index] + } + pub unsafe fn initWithObject_type_index_associatedIndex( + &self, + anObject: Option<&ObjectType>, + type_: NSCollectionChangeType, + index: NSUInteger, + associatedIndex: NSUInteger, + ) -> Id { + msg_send_id ! [self , initWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] + } } - pub unsafe fn changeWithObject_type_index_associatedIndex( - anObject: Option<&ObjectType>, - type_: NSCollectionChangeType, - index: NSUInteger, - associatedIndex: NSUInteger, - ) -> Id, Shared> { - msg_send_id ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] - } - pub unsafe fn object(&self) -> Option> { - msg_send_id![self, object] - } - pub unsafe fn changeType(&self) -> NSCollectionChangeType { - msg_send![self, changeType] - } - pub unsafe fn index(&self) -> NSUInteger { - msg_send![self, index] - } - pub unsafe fn associatedIndex(&self) -> NSUInteger { - msg_send![self, associatedIndex] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithObject_type_index( - &self, - anObject: Option<&ObjectType>, - type_: NSCollectionChangeType, - index: NSUInteger, - ) -> Id { - msg_send_id ! [self , initWithObject : anObject , type : type_ , index : index] - } - pub unsafe fn initWithObject_type_index_associatedIndex( - &self, - anObject: Option<&ObjectType>, - type_: NSCollectionChangeType, - index: NSUInteger, - associatedIndex: NSUInteger, - ) -> Id { - msg_send_id ! [self , initWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 6c083a2b9..419be43ec 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSOrderedCollectionChange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedCollectionDifference; @@ -13,61 +13,67 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSOrderedCollectionDifference { - pub unsafe fn initWithChanges( - &self, - changes: &NSArray>, - ) -> Id { - msg_send_id![self, initWithChanges: changes] +extern_methods!( + unsafe impl NSOrderedCollectionDifference { + pub unsafe fn initWithChanges( + &self, + changes: &NSArray>, + ) -> Id { + msg_send_id![self, initWithChanges: changes] + } + pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges( + &self, + inserts: &NSIndexSet, + insertedObjects: Option<&NSArray>, + removes: &NSIndexSet, + removedObjects: Option<&NSArray>, + changes: &NSArray>, + ) -> Id { + msg_send_id![ + self, + initWithInsertIndexes: inserts, + insertedObjects: insertedObjects, + removeIndexes: removes, + removedObjects: removedObjects, + additionalChanges: changes + ] + } + pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects( + &self, + inserts: &NSIndexSet, + insertedObjects: Option<&NSArray>, + removes: &NSIndexSet, + removedObjects: Option<&NSArray>, + ) -> Id { + msg_send_id![ + self, + initWithInsertIndexes: inserts, + insertedObjects: insertedObjects, + removeIndexes: removes, + removedObjects: removedObjects + ] + } + pub unsafe fn insertions( + &self, + ) -> Id>, Shared> { + msg_send_id![self, insertions] + } + pub unsafe fn removals( + &self, + ) -> Id>, Shared> { + msg_send_id![self, removals] + } + pub unsafe fn hasChanges(&self) -> bool { + msg_send![self, hasChanges] + } + pub unsafe fn differenceByTransformingChangesWithBlock( + &self, + block: TodoBlock, + ) -> Id, Shared> { + msg_send_id![self, differenceByTransformingChangesWithBlock: block] + } + pub unsafe fn inverseDifference(&self) -> Id { + msg_send_id![self, inverseDifference] + } } - pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges( - &self, - inserts: &NSIndexSet, - insertedObjects: Option<&NSArray>, - removes: &NSIndexSet, - removedObjects: Option<&NSArray>, - changes: &NSArray>, - ) -> Id { - msg_send_id![ - self, - initWithInsertIndexes: inserts, - insertedObjects: insertedObjects, - removeIndexes: removes, - removedObjects: removedObjects, - additionalChanges: changes - ] - } - pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects( - &self, - inserts: &NSIndexSet, - insertedObjects: Option<&NSArray>, - removes: &NSIndexSet, - removedObjects: Option<&NSArray>, - ) -> Id { - msg_send_id![ - self, - initWithInsertIndexes: inserts, - insertedObjects: insertedObjects, - removeIndexes: removes, - removedObjects: removedObjects - ] - } - pub unsafe fn insertions(&self) -> Id>, Shared> { - msg_send_id![self, insertions] - } - pub unsafe fn removals(&self) -> Id>, Shared> { - msg_send_id![self, removals] - } - pub unsafe fn hasChanges(&self) -> bool { - msg_send![self, hasChanges] - } - pub unsafe fn differenceByTransformingChangesWithBlock( - &self, - block: TodoBlock, - ) -> Id, Shared> { - msg_send_id![self, differenceByTransformingChangesWithBlock: block] - } - pub unsafe fn inverseDifference(&self) -> Id { - msg_send_id![self, inverseDifference] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 0087e0e8d..7b7a74b20 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedSet; @@ -18,336 +18,353 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSOrderedSet { - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] +extern_methods!( + unsafe impl NSOrderedSet { + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Id { + msg_send_id![self, objectAtIndex: idx] + } + pub unsafe fn indexOfObject(&self, object: &ObjectType) -> NSUInteger { + msg_send![self, indexOfObject: object] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithObjects_count( + &self, + objects: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![self, initWithObjects: objects, count: cnt] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Id { - msg_send_id![self, objectAtIndex: idx] - } - pub unsafe fn indexOfObject(&self, object: &ObjectType) -> NSUInteger { - msg_send![self, indexOfObject: object] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithObjects_count( - &self, - objects: TodoArray, - cnt: NSUInteger, - ) -> Id { - msg_send_id![self, initWithObjects: objects, count: cnt] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSExtendedOrderedSet"] -impl NSOrderedSet { - pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { - msg_send![self, getObjects: objects, range: range] - } - pub unsafe fn objectsAtIndexes(&self, indexes: &NSIndexSet) -> Id, Shared> { - msg_send_id![self, objectsAtIndexes: indexes] - } - pub unsafe fn firstObject(&self) -> Option> { - msg_send_id![self, firstObject] - } - pub unsafe fn lastObject(&self) -> Option> { - msg_send_id![self, lastObject] - } - pub unsafe fn isEqualToOrderedSet(&self, other: &NSOrderedSet) -> bool { - msg_send![self, isEqualToOrderedSet: other] - } - pub unsafe fn containsObject(&self, object: &ObjectType) -> bool { - msg_send![self, containsObject: object] - } - pub unsafe fn intersectsOrderedSet(&self, other: &NSOrderedSet) -> bool { - msg_send![self, intersectsOrderedSet: other] - } - pub unsafe fn intersectsSet(&self, set: &NSSet) -> bool { - msg_send![self, intersectsSet: set] - } - pub unsafe fn isSubsetOfOrderedSet(&self, other: &NSOrderedSet) -> bool { - msg_send![self, isSubsetOfOrderedSet: other] - } - pub unsafe fn isSubsetOfSet(&self, set: &NSSet) -> bool { - msg_send![self, isSubsetOfSet: set] - } - pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id { - msg_send_id![self, objectAtIndexedSubscript: idx] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, reverseObjectEnumerator] - } - pub unsafe fn reversedOrderedSet(&self) -> Id, Shared> { - msg_send_id![self, reversedOrderedSet] - } - pub unsafe fn array(&self) -> Id, Shared> { - msg_send_id![self, array] - } - pub unsafe fn set(&self) -> Id, Shared> { - msg_send_id![self, set] - } - pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateObjectsUsingBlock: block] - } - pub unsafe fn enumerateObjectsWithOptions_usingBlock( - &self, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] - } - pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( - &self, - s: &NSIndexSet, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateObjectsAtIndexes: s, - options: opts, - usingBlock: block - ] - } - pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger { - msg_send![self, indexOfObjectPassingTest: predicate] - } - pub unsafe fn indexOfObjectWithOptions_passingTest( - &self, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> NSUInteger { - msg_send![self, indexOfObjectWithOptions: opts, passingTest: predicate] - } - pub unsafe fn indexOfObjectAtIndexes_options_passingTest( - &self, - s: &NSIndexSet, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> NSUInteger { - msg_send![ - self, - indexOfObjectAtIndexes: s, - options: opts, - passingTest: predicate - ] - } - pub unsafe fn indexesOfObjectsPassingTest( - &self, - predicate: TodoBlock, - ) -> Id { - msg_send_id![self, indexesOfObjectsPassingTest: predicate] - } - pub unsafe fn indexesOfObjectsWithOptions_passingTest( - &self, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> Id { - msg_send_id![ - self, - indexesOfObjectsWithOptions: opts, - passingTest: predicate - ] - } - pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( - &self, - s: &NSIndexSet, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> Id { - msg_send_id![ - self, - indexesOfObjectsAtIndexes: s, - options: opts, - passingTest: predicate - ] - } - pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( - &self, - object: &ObjectType, - range: NSRange, - opts: NSBinarySearchingOptions, - cmp: NSComparator, - ) -> NSUInteger { - msg_send![ - self, - indexOfObject: object, - inSortedRange: range, - options: opts, - usingComparator: cmp - ] - } - pub unsafe fn sortedArrayUsingComparator( - &self, - cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingComparator: cmptr] - } - pub unsafe fn sortedArrayWithOptions_usingComparator( - &self, - opts: NSSortOptions, - cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayWithOptions: opts, usingComparator: cmptr] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn descriptionWithLocale_indent( - &self, - locale: Option<&Object>, - level: NSUInteger, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale, indent: level] - } -} -#[doc = "NSOrderedSetCreation"] -impl NSOrderedSet { - pub unsafe fn orderedSet() -> Id { - msg_send_id![Self::class(), orderedSet] - } - pub unsafe fn orderedSetWithObject(object: &ObjectType) -> Id { - msg_send_id![Self::class(), orderedSetWithObject: object] - } - pub unsafe fn orderedSetWithObjects_count( - objects: TodoArray, - cnt: NSUInteger, - ) -> Id { - msg_send_id![Self::class(), orderedSetWithObjects: objects, count: cnt] - } - pub unsafe fn orderedSetWithOrderedSet(set: &NSOrderedSet) -> Id { - msg_send_id![Self::class(), orderedSetWithOrderedSet: set] - } - pub unsafe fn orderedSetWithOrderedSet_range_copyItems( - set: &NSOrderedSet, - range: NSRange, - flag: bool, - ) -> Id { - msg_send_id![ - Self::class(), - orderedSetWithOrderedSet: set, - range: range, - copyItems: flag - ] - } - pub unsafe fn orderedSetWithArray(array: &NSArray) -> Id { - msg_send_id![Self::class(), orderedSetWithArray: array] - } - pub unsafe fn orderedSetWithArray_range_copyItems( - array: &NSArray, - range: NSRange, - flag: bool, - ) -> Id { - msg_send_id![ - Self::class(), - orderedSetWithArray: array, - range: range, - copyItems: flag - ] - } - pub unsafe fn orderedSetWithSet(set: &NSSet) -> Id { - msg_send_id![Self::class(), orderedSetWithSet: set] - } - pub unsafe fn orderedSetWithSet_copyItems( - set: &NSSet, - flag: bool, - ) -> Id { - msg_send_id![Self::class(), orderedSetWithSet: set, copyItems: flag] - } - pub unsafe fn initWithObject(&self, object: &ObjectType) -> Id { - msg_send_id![self, initWithObject: object] - } - pub unsafe fn initWithOrderedSet(&self, set: &NSOrderedSet) -> Id { - msg_send_id![self, initWithOrderedSet: set] - } - pub unsafe fn initWithOrderedSet_copyItems( - &self, - set: &NSOrderedSet, - flag: bool, - ) -> Id { - msg_send_id![self, initWithOrderedSet: set, copyItems: flag] - } - pub unsafe fn initWithOrderedSet_range_copyItems( - &self, - set: &NSOrderedSet, - range: NSRange, - flag: bool, - ) -> Id { - msg_send_id![self, initWithOrderedSet: set, range: range, copyItems: flag] - } - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { - msg_send_id![self, initWithArray: array] - } - pub unsafe fn initWithArray_copyItems( - &self, - set: &NSArray, - flag: bool, - ) -> Id { - msg_send_id![self, initWithArray: set, copyItems: flag] - } - pub unsafe fn initWithArray_range_copyItems( - &self, - set: &NSArray, - range: NSRange, - flag: bool, - ) -> Id { - msg_send_id![self, initWithArray: set, range: range, copyItems: flag] - } - pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { - msg_send_id![self, initWithSet: set] - } - pub unsafe fn initWithSet_copyItems( - &self, - set: &NSSet, - flag: bool, - ) -> Id { - msg_send_id![self, initWithSet: set, copyItems: flag] - } -} -#[doc = "NSOrderedSetDiffing"] -impl NSOrderedSet { - pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( - &self, - other: &NSOrderedSet, - options: NSOrderedCollectionDifferenceCalculationOptions, - block: TodoBlock, - ) -> Id, Shared> { - msg_send_id![ - self, - differenceFromOrderedSet: other, - withOptions: options, - usingEquivalenceTest: block - ] - } - pub unsafe fn differenceFromOrderedSet_withOptions( - &self, - other: &NSOrderedSet, - options: NSOrderedCollectionDifferenceCalculationOptions, - ) -> Id, Shared> { - msg_send_id![self, differenceFromOrderedSet: other, withOptions: options] +); +extern_methods!( + #[doc = "NSExtendedOrderedSet"] + unsafe impl NSOrderedSet { + pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { + msg_send![self, getObjects: objects, range: range] + } + pub unsafe fn objectsAtIndexes( + &self, + indexes: &NSIndexSet, + ) -> Id, Shared> { + msg_send_id![self, objectsAtIndexes: indexes] + } + pub unsafe fn firstObject(&self) -> Option> { + msg_send_id![self, firstObject] + } + pub unsafe fn lastObject(&self) -> Option> { + msg_send_id![self, lastObject] + } + pub unsafe fn isEqualToOrderedSet(&self, other: &NSOrderedSet) -> bool { + msg_send![self, isEqualToOrderedSet: other] + } + pub unsafe fn containsObject(&self, object: &ObjectType) -> bool { + msg_send![self, containsObject: object] + } + pub unsafe fn intersectsOrderedSet(&self, other: &NSOrderedSet) -> bool { + msg_send![self, intersectsOrderedSet: other] + } + pub unsafe fn intersectsSet(&self, set: &NSSet) -> bool { + msg_send![self, intersectsSet: set] + } + pub unsafe fn isSubsetOfOrderedSet(&self, other: &NSOrderedSet) -> bool { + msg_send![self, isSubsetOfOrderedSet: other] + } + pub unsafe fn isSubsetOfSet(&self, set: &NSSet) -> bool { + msg_send![self, isSubsetOfSet: set] + } + pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id { + msg_send_id![self, objectAtIndexedSubscript: idx] + } + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] + } + pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, reverseObjectEnumerator] + } + pub unsafe fn reversedOrderedSet(&self) -> Id, Shared> { + msg_send_id![self, reversedOrderedSet] + } + pub unsafe fn array(&self) -> Id, Shared> { + msg_send_id![self, array] + } + pub unsafe fn set(&self) -> Id, Shared> { + msg_send_id![self, set] + } + pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateObjectsUsingBlock: block] + } + pub unsafe fn enumerateObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] + } + pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateObjectsAtIndexes: s, + options: opts, + usingBlock: block + ] + } + pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger { + msg_send![self, indexOfObjectPassingTest: predicate] + } + pub unsafe fn indexOfObjectWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![self, indexOfObjectWithOptions: opts, passingTest: predicate] + } + pub unsafe fn indexOfObjectAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> NSUInteger { + msg_send![ + self, + indexOfObjectAtIndexes: s, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn indexesOfObjectsPassingTest( + &self, + predicate: TodoBlock, + ) -> Id { + msg_send_id![self, indexesOfObjectsPassingTest: predicate] + } + pub unsafe fn indexesOfObjectsWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![ + self, + indexesOfObjectsWithOptions: opts, + passingTest: predicate + ] + } + pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( + &self, + s: &NSIndexSet, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id { + msg_send_id![ + self, + indexesOfObjectsAtIndexes: s, + options: opts, + passingTest: predicate + ] + } + pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( + &self, + object: &ObjectType, + range: NSRange, + opts: NSBinarySearchingOptions, + cmp: NSComparator, + ) -> NSUInteger { + msg_send![ + self, + indexOfObject: object, + inSortedRange: range, + options: opts, + usingComparator: cmp + ] + } + pub unsafe fn sortedArrayUsingComparator( + &self, + cmptr: NSComparator, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingComparator: cmptr] + } + pub unsafe fn sortedArrayWithOptions_usingComparator( + &self, + opts: NSSortOptions, + cmptr: NSComparator, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayWithOptions: opts, usingComparator: cmptr] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn descriptionWithLocale( + &self, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn descriptionWithLocale_indent( + &self, + locale: Option<&Object>, + level: NSUInteger, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale, indent: level] + } } - pub unsafe fn differenceFromOrderedSet( - &self, - other: &NSOrderedSet, - ) -> Id, Shared> { - msg_send_id![self, differenceFromOrderedSet: other] +); +extern_methods!( + #[doc = "NSOrderedSetCreation"] + unsafe impl NSOrderedSet { + pub unsafe fn orderedSet() -> Id { + msg_send_id![Self::class(), orderedSet] + } + pub unsafe fn orderedSetWithObject(object: &ObjectType) -> Id { + msg_send_id![Self::class(), orderedSetWithObject: object] + } + pub unsafe fn orderedSetWithObjects_count( + objects: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![Self::class(), orderedSetWithObjects: objects, count: cnt] + } + pub unsafe fn orderedSetWithOrderedSet(set: &NSOrderedSet) -> Id { + msg_send_id![Self::class(), orderedSetWithOrderedSet: set] + } + pub unsafe fn orderedSetWithOrderedSet_range_copyItems( + set: &NSOrderedSet, + range: NSRange, + flag: bool, + ) -> Id { + msg_send_id![ + Self::class(), + orderedSetWithOrderedSet: set, + range: range, + copyItems: flag + ] + } + pub unsafe fn orderedSetWithArray(array: &NSArray) -> Id { + msg_send_id![Self::class(), orderedSetWithArray: array] + } + pub unsafe fn orderedSetWithArray_range_copyItems( + array: &NSArray, + range: NSRange, + flag: bool, + ) -> Id { + msg_send_id![ + Self::class(), + orderedSetWithArray: array, + range: range, + copyItems: flag + ] + } + pub unsafe fn orderedSetWithSet(set: &NSSet) -> Id { + msg_send_id![Self::class(), orderedSetWithSet: set] + } + pub unsafe fn orderedSetWithSet_copyItems( + set: &NSSet, + flag: bool, + ) -> Id { + msg_send_id![Self::class(), orderedSetWithSet: set, copyItems: flag] + } + pub unsafe fn initWithObject(&self, object: &ObjectType) -> Id { + msg_send_id![self, initWithObject: object] + } + pub unsafe fn initWithOrderedSet( + &self, + set: &NSOrderedSet, + ) -> Id { + msg_send_id![self, initWithOrderedSet: set] + } + pub unsafe fn initWithOrderedSet_copyItems( + &self, + set: &NSOrderedSet, + flag: bool, + ) -> Id { + msg_send_id![self, initWithOrderedSet: set, copyItems: flag] + } + pub unsafe fn initWithOrderedSet_range_copyItems( + &self, + set: &NSOrderedSet, + range: NSRange, + flag: bool, + ) -> Id { + msg_send_id![self, initWithOrderedSet: set, range: range, copyItems: flag] + } + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { + msg_send_id![self, initWithArray: array] + } + pub unsafe fn initWithArray_copyItems( + &self, + set: &NSArray, + flag: bool, + ) -> Id { + msg_send_id![self, initWithArray: set, copyItems: flag] + } + pub unsafe fn initWithArray_range_copyItems( + &self, + set: &NSArray, + range: NSRange, + flag: bool, + ) -> Id { + msg_send_id![self, initWithArray: set, range: range, copyItems: flag] + } + pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { + msg_send_id![self, initWithSet: set] + } + pub unsafe fn initWithSet_copyItems( + &self, + set: &NSSet, + flag: bool, + ) -> Id { + msg_send_id![self, initWithSet: set, copyItems: flag] + } } - pub unsafe fn orderedSetByApplyingDifference( - &self, - difference: &NSOrderedCollectionDifference, - ) -> Option, Shared>> { - msg_send_id![self, orderedSetByApplyingDifference: difference] +); +extern_methods!( + #[doc = "NSOrderedSetDiffing"] + unsafe impl NSOrderedSet { + pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( + &self, + other: &NSOrderedSet, + options: NSOrderedCollectionDifferenceCalculationOptions, + block: TodoBlock, + ) -> Id, Shared> { + msg_send_id![ + self, + differenceFromOrderedSet: other, + withOptions: options, + usingEquivalenceTest: block + ] + } + pub unsafe fn differenceFromOrderedSet_withOptions( + &self, + other: &NSOrderedSet, + options: NSOrderedCollectionDifferenceCalculationOptions, + ) -> Id, Shared> { + msg_send_id![self, differenceFromOrderedSet: other, withOptions: options] + } + pub unsafe fn differenceFromOrderedSet( + &self, + other: &NSOrderedSet, + ) -> Id, Shared> { + msg_send_id![self, differenceFromOrderedSet: other] + } + pub unsafe fn orderedSetByApplyingDifference( + &self, + difference: &NSOrderedCollectionDifference, + ) -> Option, Shared>> { + msg_send_id![self, orderedSetByApplyingDifference: difference] + } } -} +); __inner_extern_class!( #[derive(Debug)] pub struct NSMutableOrderedSet; @@ -355,142 +372,157 @@ __inner_extern_class!( type Super = NSOrderedSet; } ); -impl NSMutableOrderedSet { - pub unsafe fn insertObject_atIndex(&self, object: &ObjectType, idx: NSUInteger) { - msg_send![self, insertObject: object, atIndex: idx] - } - pub unsafe fn removeObjectAtIndex(&self, idx: NSUInteger) { - msg_send![self, removeObjectAtIndex: idx] - } - pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: &ObjectType) { - msg_send![self, replaceObjectAtIndex: idx, withObject: object] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: numItems] - } -} -#[doc = "NSExtendedMutableOrderedSet"] -impl NSMutableOrderedSet { - pub unsafe fn addObject(&self, object: &ObjectType) { - msg_send![self, addObject: object] - } - pub unsafe fn addObjects_count(&self, objects: TodoArray, count: NSUInteger) { - msg_send![self, addObjects: objects, count: count] - } - pub unsafe fn addObjectsFromArray(&self, array: &NSArray) { - msg_send![self, addObjectsFromArray: array] - } - pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( - &self, - idx1: NSUInteger, - idx2: NSUInteger, - ) { - msg_send![self, exchangeObjectAtIndex: idx1, withObjectAtIndex: idx2] - } - pub unsafe fn moveObjectsAtIndexes_toIndex(&self, indexes: &NSIndexSet, idx: NSUInteger) { - msg_send![self, moveObjectsAtIndexes: indexes, toIndex: idx] +extern_methods!( + unsafe impl NSMutableOrderedSet { + pub unsafe fn insertObject_atIndex(&self, object: &ObjectType, idx: NSUInteger) { + msg_send![self, insertObject: object, atIndex: idx] + } + pub unsafe fn removeObjectAtIndex(&self, idx: NSUInteger) { + msg_send![self, removeObjectAtIndex: idx] + } + pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: &ObjectType) { + msg_send![self, replaceObjectAtIndex: idx, withObject: object] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: numItems] + } } - pub unsafe fn insertObjects_atIndexes( - &self, - objects: &NSArray, - indexes: &NSIndexSet, - ) { - msg_send![self, insertObjects: objects, atIndexes: indexes] - } - pub unsafe fn setObject_atIndex(&self, obj: &ObjectType, idx: NSUInteger) { - msg_send![self, setObject: obj, atIndex: idx] - } - pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger) { - msg_send![self, setObject: obj, atIndexedSubscript: idx] - } - pub unsafe fn replaceObjectsInRange_withObjects_count( - &self, - range: NSRange, - objects: TodoArray, - count: NSUInteger, - ) { - msg_send![ - self, - replaceObjectsInRange: range, - withObjects: objects, - count: count - ] - } - pub unsafe fn replaceObjectsAtIndexes_withObjects( - &self, - indexes: &NSIndexSet, - objects: &NSArray, - ) { - msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] - } - pub unsafe fn removeObjectsInRange(&self, range: NSRange) { - msg_send![self, removeObjectsInRange: range] - } - pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet) { - msg_send![self, removeObjectsAtIndexes: indexes] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn removeObject(&self, object: &ObjectType) { - msg_send![self, removeObject: object] - } - pub unsafe fn removeObjectsInArray(&self, array: &NSArray) { - msg_send![self, removeObjectsInArray: array] - } - pub unsafe fn intersectOrderedSet(&self, other: &NSOrderedSet) { - msg_send![self, intersectOrderedSet: other] - } - pub unsafe fn minusOrderedSet(&self, other: &NSOrderedSet) { - msg_send![self, minusOrderedSet: other] - } - pub unsafe fn unionOrderedSet(&self, other: &NSOrderedSet) { - msg_send![self, unionOrderedSet: other] - } - pub unsafe fn intersectSet(&self, other: &NSSet) { - msg_send![self, intersectSet: other] - } - pub unsafe fn minusSet(&self, other: &NSSet) { - msg_send![self, minusSet: other] - } - pub unsafe fn unionSet(&self, other: &NSSet) { - msg_send![self, unionSet: other] - } - pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator) { - msg_send![self, sortUsingComparator: cmptr] - } - pub unsafe fn sortWithOptions_usingComparator(&self, opts: NSSortOptions, cmptr: NSComparator) { - msg_send![self, sortWithOptions: opts, usingComparator: cmptr] - } - pub unsafe fn sortRange_options_usingComparator( - &self, - range: NSRange, - opts: NSSortOptions, - cmptr: NSComparator, - ) { - msg_send![ - self, - sortRange: range, - options: opts, - usingComparator: cmptr - ] +); +extern_methods!( + #[doc = "NSExtendedMutableOrderedSet"] + unsafe impl NSMutableOrderedSet { + pub unsafe fn addObject(&self, object: &ObjectType) { + msg_send![self, addObject: object] + } + pub unsafe fn addObjects_count(&self, objects: TodoArray, count: NSUInteger) { + msg_send![self, addObjects: objects, count: count] + } + pub unsafe fn addObjectsFromArray(&self, array: &NSArray) { + msg_send![self, addObjectsFromArray: array] + } + pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( + &self, + idx1: NSUInteger, + idx2: NSUInteger, + ) { + msg_send![self, exchangeObjectAtIndex: idx1, withObjectAtIndex: idx2] + } + pub unsafe fn moveObjectsAtIndexes_toIndex(&self, indexes: &NSIndexSet, idx: NSUInteger) { + msg_send![self, moveObjectsAtIndexes: indexes, toIndex: idx] + } + pub unsafe fn insertObjects_atIndexes( + &self, + objects: &NSArray, + indexes: &NSIndexSet, + ) { + msg_send![self, insertObjects: objects, atIndexes: indexes] + } + pub unsafe fn setObject_atIndex(&self, obj: &ObjectType, idx: NSUInteger) { + msg_send![self, setObject: obj, atIndex: idx] + } + pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger) { + msg_send![self, setObject: obj, atIndexedSubscript: idx] + } + pub unsafe fn replaceObjectsInRange_withObjects_count( + &self, + range: NSRange, + objects: TodoArray, + count: NSUInteger, + ) { + msg_send![ + self, + replaceObjectsInRange: range, + withObjects: objects, + count: count + ] + } + pub unsafe fn replaceObjectsAtIndexes_withObjects( + &self, + indexes: &NSIndexSet, + objects: &NSArray, + ) { + msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] + } + pub unsafe fn removeObjectsInRange(&self, range: NSRange) { + msg_send![self, removeObjectsInRange: range] + } + pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet) { + msg_send![self, removeObjectsAtIndexes: indexes] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn removeObject(&self, object: &ObjectType) { + msg_send![self, removeObject: object] + } + pub unsafe fn removeObjectsInArray(&self, array: &NSArray) { + msg_send![self, removeObjectsInArray: array] + } + pub unsafe fn intersectOrderedSet(&self, other: &NSOrderedSet) { + msg_send![self, intersectOrderedSet: other] + } + pub unsafe fn minusOrderedSet(&self, other: &NSOrderedSet) { + msg_send![self, minusOrderedSet: other] + } + pub unsafe fn unionOrderedSet(&self, other: &NSOrderedSet) { + msg_send![self, unionOrderedSet: other] + } + pub unsafe fn intersectSet(&self, other: &NSSet) { + msg_send![self, intersectSet: other] + } + pub unsafe fn minusSet(&self, other: &NSSet) { + msg_send![self, minusSet: other] + } + pub unsafe fn unionSet(&self, other: &NSSet) { + msg_send![self, unionSet: other] + } + pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator) { + msg_send![self, sortUsingComparator: cmptr] + } + pub unsafe fn sortWithOptions_usingComparator( + &self, + opts: NSSortOptions, + cmptr: NSComparator, + ) { + msg_send![self, sortWithOptions: opts, usingComparator: cmptr] + } + pub unsafe fn sortRange_options_usingComparator( + &self, + range: NSRange, + opts: NSSortOptions, + cmptr: NSComparator, + ) { + msg_send![ + self, + sortRange: range, + options: opts, + usingComparator: cmptr + ] + } } -} -#[doc = "NSMutableOrderedSetCreation"] -impl NSMutableOrderedSet { - pub unsafe fn orderedSetWithCapacity(numItems: NSUInteger) -> Id { - msg_send_id![Self::class(), orderedSetWithCapacity: numItems] +); +extern_methods!( + #[doc = "NSMutableOrderedSetCreation"] + unsafe impl NSMutableOrderedSet { + pub unsafe fn orderedSetWithCapacity(numItems: NSUInteger) -> Id { + msg_send_id![Self::class(), orderedSetWithCapacity: numItems] + } } -} -#[doc = "NSMutableOrderedSetDiffing"] -impl NSMutableOrderedSet { - pub unsafe fn applyDifference(&self, difference: &NSOrderedCollectionDifference) { - msg_send![self, applyDifference: difference] +); +extern_methods!( + #[doc = "NSMutableOrderedSetDiffing"] + unsafe impl NSMutableOrderedSet { + pub unsafe fn applyDifference( + &self, + difference: &NSOrderedCollectionDifference, + ) { + msg_send![self, applyDifference: difference] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index 581457410..79c5d4e6b 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSOrthography; @@ -13,61 +13,67 @@ extern_class!( type Super = NSObject; } ); -impl NSOrthography { - pub unsafe fn dominantScript(&self) -> Id { - msg_send_id![self, dominantScript] +extern_methods!( + unsafe impl NSOrthography { + pub unsafe fn dominantScript(&self) -> Id { + msg_send_id![self, dominantScript] + } + pub unsafe fn languageMap(&self) -> Id>, Shared> { + msg_send_id![self, languageMap] + } + pub unsafe fn initWithDominantScript_languageMap( + &self, + script: &NSString, + map: &NSDictionary>, + ) -> Id { + msg_send_id![self, initWithDominantScript: script, languageMap: map] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn languageMap(&self) -> Id>, Shared> { - msg_send_id![self, languageMap] - } - pub unsafe fn initWithDominantScript_languageMap( - &self, - script: &NSString, - map: &NSDictionary>, - ) -> Id { - msg_send_id![self, initWithDominantScript: script, languageMap: map] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSOrthographyExtended"] -impl NSOrthography { - pub unsafe fn languagesForScript( - &self, - script: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, languagesForScript: script] - } - pub unsafe fn dominantLanguageForScript( - &self, - script: &NSString, - ) -> Option> { - msg_send_id![self, dominantLanguageForScript: script] - } - pub unsafe fn dominantLanguage(&self) -> Id { - msg_send_id![self, dominantLanguage] - } - pub unsafe fn allScripts(&self) -> Id, Shared> { - msg_send_id![self, allScripts] - } - pub unsafe fn allLanguages(&self) -> Id, Shared> { - msg_send_id![self, allLanguages] - } - pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id { - msg_send_id![Self::class(), defaultOrthographyForLanguage: language] +); +extern_methods!( + #[doc = "NSOrthographyExtended"] + unsafe impl NSOrthography { + pub unsafe fn languagesForScript( + &self, + script: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, languagesForScript: script] + } + pub unsafe fn dominantLanguageForScript( + &self, + script: &NSString, + ) -> Option> { + msg_send_id![self, dominantLanguageForScript: script] + } + pub unsafe fn dominantLanguage(&self) -> Id { + msg_send_id![self, dominantLanguage] + } + pub unsafe fn allScripts(&self) -> Id, Shared> { + msg_send_id![self, allScripts] + } + pub unsafe fn allLanguages(&self) -> Id, Shared> { + msg_send_id![self, allLanguages] + } + pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id { + msg_send_id![Self::class(), defaultOrthographyForLanguage: language] + } } -} -#[doc = "NSOrthographyCreation"] -impl NSOrthography { - pub unsafe fn orthographyWithDominantScript_languageMap( - script: &NSString, - map: &NSDictionary>, - ) -> Id { - msg_send_id![ - Self::class(), - orthographyWithDominantScript: script, - languageMap: map - ] +); +extern_methods!( + #[doc = "NSOrthographyCreation"] + unsafe impl NSOrthography { + pub unsafe fn orthographyWithDominantScript_languageMap( + script: &NSString, + map: &NSDictionary>, + ) -> Id { + msg_send_id![ + Self::class(), + orthographyWithDominantScript: script, + languageMap: map + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index 450915269..2e3bd73f6 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -3,89 +3,93 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSStringPathExtensions"] -impl NSString { - pub unsafe fn pathWithComponents(components: &NSArray) -> Id { - msg_send_id![Self::class(), pathWithComponents: components] - } - pub unsafe fn pathComponents(&self) -> Id, Shared> { - msg_send_id![self, pathComponents] - } - pub unsafe fn isAbsolutePath(&self) -> bool { - msg_send![self, isAbsolutePath] - } - pub unsafe fn lastPathComponent(&self) -> Id { - msg_send_id![self, lastPathComponent] - } - pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id { - msg_send_id![self, stringByDeletingLastPathComponent] - } - pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id { - msg_send_id![self, stringByAppendingPathComponent: str] - } - pub unsafe fn pathExtension(&self) -> Id { - msg_send_id![self, pathExtension] - } - pub unsafe fn stringByDeletingPathExtension(&self) -> Id { - msg_send_id![self, stringByDeletingPathExtension] - } - pub unsafe fn stringByAppendingPathExtension( - &self, - str: &NSString, - ) -> Option> { - msg_send_id![self, stringByAppendingPathExtension: str] - } - pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id { - msg_send_id![self, stringByAbbreviatingWithTildeInPath] - } - pub unsafe fn stringByExpandingTildeInPath(&self) -> Id { - msg_send_id![self, stringByExpandingTildeInPath] - } - pub unsafe fn stringByStandardizingPath(&self) -> Id { - msg_send_id![self, stringByStandardizingPath] - } - pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id { - msg_send_id![self, stringByResolvingSymlinksInPath] - } - pub unsafe fn stringsByAppendingPaths( - &self, - paths: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, stringsByAppendingPaths: paths] - } - pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( - &self, - outputName: Option<&mut Option>>, - flag: bool, - outputArray: Option<&mut Option, Shared>>>, - filterTypes: Option<&NSArray>, - ) -> NSUInteger { - msg_send![ - self, - completePathIntoString: outputName, - caseSensitive: flag, - matchesIntoArray: outputArray, - filterTypes: filterTypes - ] - } - pub unsafe fn fileSystemRepresentation(&self) -> NonNull { - msg_send![self, fileSystemRepresentation] - } - pub unsafe fn getFileSystemRepresentation_maxLength( - &self, - cname: NonNull, - max: NSUInteger, - ) -> bool { - msg_send![self, getFileSystemRepresentation: cname, maxLength: max] - } -} -#[doc = "NSArrayPathExtensions"] -impl NSArray { - pub unsafe fn pathsMatchingExtensions( - &self, - filterTypes: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, pathsMatchingExtensions: filterTypes] - } -} +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +extern_methods!( + #[doc = "NSStringPathExtensions"] + unsafe impl NSString { + pub unsafe fn pathWithComponents(components: &NSArray) -> Id { + msg_send_id![Self::class(), pathWithComponents: components] + } + pub unsafe fn pathComponents(&self) -> Id, Shared> { + msg_send_id![self, pathComponents] + } + pub unsafe fn isAbsolutePath(&self) -> bool { + msg_send![self, isAbsolutePath] + } + pub unsafe fn lastPathComponent(&self) -> Id { + msg_send_id![self, lastPathComponent] + } + pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id { + msg_send_id![self, stringByDeletingLastPathComponent] + } + pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id { + msg_send_id![self, stringByAppendingPathComponent: str] + } + pub unsafe fn pathExtension(&self) -> Id { + msg_send_id![self, pathExtension] + } + pub unsafe fn stringByDeletingPathExtension(&self) -> Id { + msg_send_id![self, stringByDeletingPathExtension] + } + pub unsafe fn stringByAppendingPathExtension( + &self, + str: &NSString, + ) -> Option> { + msg_send_id![self, stringByAppendingPathExtension: str] + } + pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id { + msg_send_id![self, stringByAbbreviatingWithTildeInPath] + } + pub unsafe fn stringByExpandingTildeInPath(&self) -> Id { + msg_send_id![self, stringByExpandingTildeInPath] + } + pub unsafe fn stringByStandardizingPath(&self) -> Id { + msg_send_id![self, stringByStandardizingPath] + } + pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id { + msg_send_id![self, stringByResolvingSymlinksInPath] + } + pub unsafe fn stringsByAppendingPaths( + &self, + paths: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, stringsByAppendingPaths: paths] + } + pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( + &self, + outputName: Option<&mut Option>>, + flag: bool, + outputArray: Option<&mut Option, Shared>>>, + filterTypes: Option<&NSArray>, + ) -> NSUInteger { + msg_send![ + self, + completePathIntoString: outputName, + caseSensitive: flag, + matchesIntoArray: outputArray, + filterTypes: filterTypes + ] + } + pub unsafe fn fileSystemRepresentation(&self) -> NonNull { + msg_send![self, fileSystemRepresentation] + } + pub unsafe fn getFileSystemRepresentation_maxLength( + &self, + cname: NonNull, + max: NSUInteger, + ) -> bool { + msg_send![self, getFileSystemRepresentation: cname, maxLength: max] + } + } +); +extern_methods!( + #[doc = "NSArrayPathExtensions"] + unsafe impl NSArray { + pub unsafe fn pathsMatchingExtensions( + &self, + filterTypes: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, pathsMatchingExtensions: filterTypes] + } + } +); diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs index e5d413853..fa19b4320 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPersonNameComponents; @@ -12,50 +12,52 @@ extern_class!( type Super = NSObject; } ); -impl NSPersonNameComponents { - pub unsafe fn namePrefix(&self) -> Option> { - msg_send_id![self, namePrefix] +extern_methods!( + unsafe impl NSPersonNameComponents { + pub unsafe fn namePrefix(&self) -> Option> { + msg_send_id![self, namePrefix] + } + pub unsafe fn setNamePrefix(&self, namePrefix: Option<&NSString>) { + msg_send![self, setNamePrefix: namePrefix] + } + pub unsafe fn givenName(&self) -> Option> { + msg_send_id![self, givenName] + } + pub unsafe fn setGivenName(&self, givenName: Option<&NSString>) { + msg_send![self, setGivenName: givenName] + } + pub unsafe fn middleName(&self) -> Option> { + msg_send_id![self, middleName] + } + pub unsafe fn setMiddleName(&self, middleName: Option<&NSString>) { + msg_send![self, setMiddleName: middleName] + } + pub unsafe fn familyName(&self) -> Option> { + msg_send_id![self, familyName] + } + pub unsafe fn setFamilyName(&self, familyName: Option<&NSString>) { + msg_send![self, setFamilyName: familyName] + } + pub unsafe fn nameSuffix(&self) -> Option> { + msg_send_id![self, nameSuffix] + } + pub unsafe fn setNameSuffix(&self, nameSuffix: Option<&NSString>) { + msg_send![self, setNameSuffix: nameSuffix] + } + pub unsafe fn nickname(&self) -> Option> { + msg_send_id![self, nickname] + } + pub unsafe fn setNickname(&self, nickname: Option<&NSString>) { + msg_send![self, setNickname: nickname] + } + pub unsafe fn phoneticRepresentation(&self) -> Option> { + msg_send_id![self, phoneticRepresentation] + } + pub unsafe fn setPhoneticRepresentation( + &self, + phoneticRepresentation: Option<&NSPersonNameComponents>, + ) { + msg_send![self, setPhoneticRepresentation: phoneticRepresentation] + } } - pub unsafe fn setNamePrefix(&self, namePrefix: Option<&NSString>) { - msg_send![self, setNamePrefix: namePrefix] - } - pub unsafe fn givenName(&self) -> Option> { - msg_send_id![self, givenName] - } - pub unsafe fn setGivenName(&self, givenName: Option<&NSString>) { - msg_send![self, setGivenName: givenName] - } - pub unsafe fn middleName(&self) -> Option> { - msg_send_id![self, middleName] - } - pub unsafe fn setMiddleName(&self, middleName: Option<&NSString>) { - msg_send![self, setMiddleName: middleName] - } - pub unsafe fn familyName(&self) -> Option> { - msg_send_id![self, familyName] - } - pub unsafe fn setFamilyName(&self, familyName: Option<&NSString>) { - msg_send![self, setFamilyName: familyName] - } - pub unsafe fn nameSuffix(&self) -> Option> { - msg_send_id![self, nameSuffix] - } - pub unsafe fn setNameSuffix(&self, nameSuffix: Option<&NSString>) { - msg_send![self, setNameSuffix: nameSuffix] - } - pub unsafe fn nickname(&self) -> Option> { - msg_send_id![self, nickname] - } - pub unsafe fn setNickname(&self, nickname: Option<&NSString>) { - msg_send![self, setNickname: nickname] - } - pub unsafe fn phoneticRepresentation(&self) -> Option> { - msg_send_id![self, phoneticRepresentation] - } - pub unsafe fn setPhoneticRepresentation( - &self, - phoneticRepresentation: Option<&NSPersonNameComponents>, - ) { - msg_send![self, setPhoneticRepresentation: phoneticRepresentation] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index 3b4554824..5b13c8e6d 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSPersonNameComponents::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPersonNameComponentsFormatter; @@ -11,66 +11,68 @@ extern_class!( type Super = NSFormatter; } ); -impl NSPersonNameComponentsFormatter { - pub unsafe fn style(&self) -> NSPersonNameComponentsFormatterStyle { - msg_send![self, style] +extern_methods!( + unsafe impl NSPersonNameComponentsFormatter { + pub unsafe fn style(&self) -> NSPersonNameComponentsFormatterStyle { + msg_send![self, style] + } + pub unsafe fn setStyle(&self, style: NSPersonNameComponentsFormatterStyle) { + msg_send![self, setStyle: style] + } + pub unsafe fn isPhonetic(&self) -> bool { + msg_send![self, isPhonetic] + } + pub unsafe fn setPhonetic(&self, phonetic: bool) { + msg_send![self, setPhonetic: phonetic] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn localizedStringFromPersonNameComponents_style_options( + components: &NSPersonNameComponents, + nameFormatStyle: NSPersonNameComponentsFormatterStyle, + nameOptions: NSPersonNameComponentsFormatterOptions, + ) -> Id { + msg_send_id![ + Self::class(), + localizedStringFromPersonNameComponents: components, + style: nameFormatStyle, + options: nameOptions + ] + } + pub unsafe fn stringFromPersonNameComponents( + &self, + components: &NSPersonNameComponents, + ) -> Id { + msg_send_id![self, stringFromPersonNameComponents: components] + } + pub unsafe fn annotatedStringFromPersonNameComponents( + &self, + components: &NSPersonNameComponents, + ) -> Id { + msg_send_id![self, annotatedStringFromPersonNameComponents: components] + } + pub unsafe fn personNameComponentsFromString( + &self, + string: &NSString, + ) -> Option> { + msg_send_id![self, personNameComponentsFromString: string] + } + pub unsafe fn getObjectValue_forString_errorDescription( + &self, + obj: Option<&mut Option>>, + string: &NSString, + error: Option<&mut Option>>, + ) -> bool { + msg_send![ + self, + getObjectValue: obj, + forString: string, + errorDescription: error + ] + } } - pub unsafe fn setStyle(&self, style: NSPersonNameComponentsFormatterStyle) { - msg_send![self, setStyle: style] - } - pub unsafe fn isPhonetic(&self) -> bool { - msg_send![self, isPhonetic] - } - pub unsafe fn setPhonetic(&self, phonetic: bool) { - msg_send![self, setPhonetic: phonetic] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn localizedStringFromPersonNameComponents_style_options( - components: &NSPersonNameComponents, - nameFormatStyle: NSPersonNameComponentsFormatterStyle, - nameOptions: NSPersonNameComponentsFormatterOptions, - ) -> Id { - msg_send_id![ - Self::class(), - localizedStringFromPersonNameComponents: components, - style: nameFormatStyle, - options: nameOptions - ] - } - pub unsafe fn stringFromPersonNameComponents( - &self, - components: &NSPersonNameComponents, - ) -> Id { - msg_send_id![self, stringFromPersonNameComponents: components] - } - pub unsafe fn annotatedStringFromPersonNameComponents( - &self, - components: &NSPersonNameComponents, - ) -> Id { - msg_send_id![self, annotatedStringFromPersonNameComponents: components] - } - pub unsafe fn personNameComponentsFromString( - &self, - string: &NSString, - ) -> Option> { - msg_send_id![self, personNameComponentsFromString: string] - } - pub unsafe fn getObjectValue_forString_errorDescription( - &self, - obj: Option<&mut Option>>, - string: &NSString, - error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index 9f8979bc4..97dd2344d 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSPointerFunctions::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPointerArray; @@ -12,69 +12,80 @@ extern_class!( type Super = NSObject; } ); -impl NSPointerArray { - pub unsafe fn initWithOptions(&self, options: NSPointerFunctionsOptions) -> Id { - msg_send_id![self, initWithOptions: options] +extern_methods!( + unsafe impl NSPointerArray { + pub unsafe fn initWithOptions( + &self, + options: NSPointerFunctionsOptions, + ) -> Id { + msg_send_id![self, initWithOptions: options] + } + pub unsafe fn initWithPointerFunctions( + &self, + functions: &NSPointerFunctions, + ) -> Id { + msg_send_id![self, initWithPointerFunctions: functions] + } + pub unsafe fn pointerArrayWithOptions( + options: NSPointerFunctionsOptions, + ) -> Id { + msg_send_id![Self::class(), pointerArrayWithOptions: options] + } + pub unsafe fn pointerArrayWithPointerFunctions( + functions: &NSPointerFunctions, + ) -> Id { + msg_send_id![Self::class(), pointerArrayWithPointerFunctions: functions] + } + pub unsafe fn pointerFunctions(&self) -> Id { + msg_send_id![self, pointerFunctions] + } + pub unsafe fn pointerAtIndex(&self, index: NSUInteger) -> *mut c_void { + msg_send![self, pointerAtIndex: index] + } + pub unsafe fn addPointer(&self, pointer: *mut c_void) { + msg_send![self, addPointer: pointer] + } + pub unsafe fn removePointerAtIndex(&self, index: NSUInteger) { + msg_send![self, removePointerAtIndex: index] + } + pub unsafe fn insertPointer_atIndex(&self, item: *mut c_void, index: NSUInteger) { + msg_send![self, insertPointer: item, atIndex: index] + } + pub unsafe fn replacePointerAtIndex_withPointer( + &self, + index: NSUInteger, + item: *mut c_void, + ) { + msg_send![self, replacePointerAtIndex: index, withPointer: item] + } + pub unsafe fn compact(&self) { + msg_send![self, compact] + } + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn setCount(&self, count: NSUInteger) { + msg_send![self, setCount: count] + } } - pub unsafe fn initWithPointerFunctions( - &self, - functions: &NSPointerFunctions, - ) -> Id { - msg_send_id![self, initWithPointerFunctions: functions] - } - pub unsafe fn pointerArrayWithOptions( - options: NSPointerFunctionsOptions, - ) -> Id { - msg_send_id![Self::class(), pointerArrayWithOptions: options] - } - pub unsafe fn pointerArrayWithPointerFunctions( - functions: &NSPointerFunctions, - ) -> Id { - msg_send_id![Self::class(), pointerArrayWithPointerFunctions: functions] - } - pub unsafe fn pointerFunctions(&self) -> Id { - msg_send_id![self, pointerFunctions] - } - pub unsafe fn pointerAtIndex(&self, index: NSUInteger) -> *mut c_void { - msg_send![self, pointerAtIndex: index] - } - pub unsafe fn addPointer(&self, pointer: *mut c_void) { - msg_send![self, addPointer: pointer] - } - pub unsafe fn removePointerAtIndex(&self, index: NSUInteger) { - msg_send![self, removePointerAtIndex: index] - } - pub unsafe fn insertPointer_atIndex(&self, item: *mut c_void, index: NSUInteger) { - msg_send![self, insertPointer: item, atIndex: index] - } - pub unsafe fn replacePointerAtIndex_withPointer(&self, index: NSUInteger, item: *mut c_void) { - msg_send![self, replacePointerAtIndex: index, withPointer: item] - } - pub unsafe fn compact(&self) { - msg_send![self, compact] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn setCount(&self, count: NSUInteger) { - msg_send![self, setCount: count] - } -} -#[doc = "NSPointerArrayConveniences"] -impl NSPointerArray { - pub unsafe fn pointerArrayWithStrongObjects() -> Id { - msg_send_id![Self::class(), pointerArrayWithStrongObjects] - } - pub unsafe fn pointerArrayWithWeakObjects() -> Id { - msg_send_id![Self::class(), pointerArrayWithWeakObjects] - } - pub unsafe fn strongObjectsPointerArray() -> Id { - msg_send_id![Self::class(), strongObjectsPointerArray] - } - pub unsafe fn weakObjectsPointerArray() -> Id { - msg_send_id![Self::class(), weakObjectsPointerArray] - } - pub unsafe fn allObjects(&self) -> Id { - msg_send_id![self, allObjects] +); +extern_methods!( + #[doc = "NSPointerArrayConveniences"] + unsafe impl NSPointerArray { + pub unsafe fn pointerArrayWithStrongObjects() -> Id { + msg_send_id![Self::class(), pointerArrayWithStrongObjects] + } + pub unsafe fn pointerArrayWithWeakObjects() -> Id { + msg_send_id![Self::class(), pointerArrayWithWeakObjects] + } + pub unsafe fn strongObjectsPointerArray() -> Id { + msg_send_id![Self::class(), strongObjectsPointerArray] + } + pub unsafe fn weakObjectsPointerArray() -> Id { + msg_send_id![Self::class(), weakObjectsPointerArray] + } + pub unsafe fn allObjects(&self) -> Id { + msg_send_id![self, allObjects] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 16a64bcc6..32bc45080 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPointerFunctions; @@ -10,64 +10,69 @@ extern_class!( type Super = NSObject; } ); -impl NSPointerFunctions { - pub unsafe fn initWithOptions(&self, options: NSPointerFunctionsOptions) -> Id { - msg_send_id![self, initWithOptions: options] +extern_methods!( + unsafe impl NSPointerFunctions { + pub unsafe fn initWithOptions( + &self, + options: NSPointerFunctionsOptions, + ) -> Id { + msg_send_id![self, initWithOptions: options] + } + pub unsafe fn pointerFunctionsWithOptions( + options: NSPointerFunctionsOptions, + ) -> Id { + msg_send_id![Self::class(), pointerFunctionsWithOptions: options] + } + pub unsafe fn hashFunction(&self) -> *mut TodoFunction { + msg_send![self, hashFunction] + } + pub unsafe fn setHashFunction(&self, hashFunction: *mut TodoFunction) { + msg_send![self, setHashFunction: hashFunction] + } + pub unsafe fn isEqualFunction(&self) -> *mut TodoFunction { + msg_send![self, isEqualFunction] + } + pub unsafe fn setIsEqualFunction(&self, isEqualFunction: *mut TodoFunction) { + msg_send![self, setIsEqualFunction: isEqualFunction] + } + pub unsafe fn sizeFunction(&self) -> *mut TodoFunction { + msg_send![self, sizeFunction] + } + pub unsafe fn setSizeFunction(&self, sizeFunction: *mut TodoFunction) { + msg_send![self, setSizeFunction: sizeFunction] + } + pub unsafe fn descriptionFunction(&self) -> *mut TodoFunction { + msg_send![self, descriptionFunction] + } + pub unsafe fn setDescriptionFunction(&self, descriptionFunction: *mut TodoFunction) { + msg_send![self, setDescriptionFunction: descriptionFunction] + } + pub unsafe fn relinquishFunction(&self) -> *mut TodoFunction { + msg_send![self, relinquishFunction] + } + pub unsafe fn setRelinquishFunction(&self, relinquishFunction: *mut TodoFunction) { + msg_send![self, setRelinquishFunction: relinquishFunction] + } + pub unsafe fn acquireFunction(&self) -> *mut TodoFunction { + msg_send![self, acquireFunction] + } + pub unsafe fn setAcquireFunction(&self, acquireFunction: *mut TodoFunction) { + msg_send![self, setAcquireFunction: acquireFunction] + } + pub unsafe fn usesStrongWriteBarrier(&self) -> bool { + msg_send![self, usesStrongWriteBarrier] + } + pub unsafe fn setUsesStrongWriteBarrier(&self, usesStrongWriteBarrier: bool) { + msg_send![self, setUsesStrongWriteBarrier: usesStrongWriteBarrier] + } + pub unsafe fn usesWeakReadAndWriteBarriers(&self) -> bool { + msg_send![self, usesWeakReadAndWriteBarriers] + } + pub unsafe fn setUsesWeakReadAndWriteBarriers(&self, usesWeakReadAndWriteBarriers: bool) { + msg_send![ + self, + setUsesWeakReadAndWriteBarriers: usesWeakReadAndWriteBarriers + ] + } } - pub unsafe fn pointerFunctionsWithOptions( - options: NSPointerFunctionsOptions, - ) -> Id { - msg_send_id![Self::class(), pointerFunctionsWithOptions: options] - } - pub unsafe fn hashFunction(&self) -> *mut TodoFunction { - msg_send![self, hashFunction] - } - pub unsafe fn setHashFunction(&self, hashFunction: *mut TodoFunction) { - msg_send![self, setHashFunction: hashFunction] - } - pub unsafe fn isEqualFunction(&self) -> *mut TodoFunction { - msg_send![self, isEqualFunction] - } - pub unsafe fn setIsEqualFunction(&self, isEqualFunction: *mut TodoFunction) { - msg_send![self, setIsEqualFunction: isEqualFunction] - } - pub unsafe fn sizeFunction(&self) -> *mut TodoFunction { - msg_send![self, sizeFunction] - } - pub unsafe fn setSizeFunction(&self, sizeFunction: *mut TodoFunction) { - msg_send![self, setSizeFunction: sizeFunction] - } - pub unsafe fn descriptionFunction(&self) -> *mut TodoFunction { - msg_send![self, descriptionFunction] - } - pub unsafe fn setDescriptionFunction(&self, descriptionFunction: *mut TodoFunction) { - msg_send![self, setDescriptionFunction: descriptionFunction] - } - pub unsafe fn relinquishFunction(&self) -> *mut TodoFunction { - msg_send![self, relinquishFunction] - } - pub unsafe fn setRelinquishFunction(&self, relinquishFunction: *mut TodoFunction) { - msg_send![self, setRelinquishFunction: relinquishFunction] - } - pub unsafe fn acquireFunction(&self) -> *mut TodoFunction { - msg_send![self, acquireFunction] - } - pub unsafe fn setAcquireFunction(&self, acquireFunction: *mut TodoFunction) { - msg_send![self, setAcquireFunction: acquireFunction] - } - pub unsafe fn usesStrongWriteBarrier(&self) -> bool { - msg_send![self, usesStrongWriteBarrier] - } - pub unsafe fn setUsesStrongWriteBarrier(&self, usesStrongWriteBarrier: bool) { - msg_send![self, setUsesStrongWriteBarrier: usesStrongWriteBarrier] - } - pub unsafe fn usesWeakReadAndWriteBarriers(&self) -> bool { - msg_send![self, usesWeakReadAndWriteBarriers] - } - pub unsafe fn setUsesWeakReadAndWriteBarriers(&self, usesWeakReadAndWriteBarriers: bool) { - msg_send![ - self, - setUsesWeakReadAndWriteBarriers: usesWeakReadAndWriteBarriers - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 0896ca8b4..f1d1d5ede 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPort; @@ -18,85 +18,87 @@ extern_class!( type Super = NSObject; } ); -impl NSPort { - pub unsafe fn port() -> Id { - msg_send_id![Self::class(), port] +extern_methods!( + unsafe impl NSPort { + pub unsafe fn port() -> Id { + msg_send_id![Self::class(), port] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn isValid(&self) -> bool { + msg_send![self, isValid] + } + pub unsafe fn setDelegate(&self, anObject: Option<&NSPortDelegate>) { + msg_send![self, setDelegate: anObject] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] + } + pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, removeFromRunLoop: runLoop, forMode: mode] + } + pub unsafe fn reservedSpaceLength(&self) -> NSUInteger { + msg_send![self, reservedSpaceLength] + } + pub unsafe fn sendBeforeDate_components_from_reserved( + &self, + limitDate: &NSDate, + components: Option<&NSMutableArray>, + receivePort: Option<&NSPort>, + headerSpaceReserved: NSUInteger, + ) -> bool { + msg_send![ + self, + sendBeforeDate: limitDate, + components: components, + from: receivePort, + reserved: headerSpaceReserved + ] + } + pub unsafe fn sendBeforeDate_msgid_components_from_reserved( + &self, + limitDate: &NSDate, + msgID: NSUInteger, + components: Option<&NSMutableArray>, + receivePort: Option<&NSPort>, + headerSpaceReserved: NSUInteger, + ) -> bool { + msg_send![ + self, + sendBeforeDate: limitDate, + msgid: msgID, + components: components, + from: receivePort, + reserved: headerSpaceReserved + ] + } + pub unsafe fn addConnection_toRunLoop_forMode( + &self, + conn: &NSConnection, + runLoop: &NSRunLoop, + mode: &NSRunLoopMode, + ) { + msg_send![self, addConnection: conn, toRunLoop: runLoop, forMode: mode] + } + pub unsafe fn removeConnection_fromRunLoop_forMode( + &self, + conn: &NSConnection, + runLoop: &NSRunLoop, + mode: &NSRunLoopMode, + ) { + msg_send![ + self, + removeConnection: conn, + fromRunLoop: runLoop, + forMode: mode + ] + } } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn isValid(&self) -> bool { - msg_send![self, isValid] - } - pub unsafe fn setDelegate(&self, anObject: Option<&NSPortDelegate>) { - msg_send![self, setDelegate: anObject] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] - } - pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, removeFromRunLoop: runLoop, forMode: mode] - } - pub unsafe fn reservedSpaceLength(&self) -> NSUInteger { - msg_send![self, reservedSpaceLength] - } - pub unsafe fn sendBeforeDate_components_from_reserved( - &self, - limitDate: &NSDate, - components: Option<&NSMutableArray>, - receivePort: Option<&NSPort>, - headerSpaceReserved: NSUInteger, - ) -> bool { - msg_send![ - self, - sendBeforeDate: limitDate, - components: components, - from: receivePort, - reserved: headerSpaceReserved - ] - } - pub unsafe fn sendBeforeDate_msgid_components_from_reserved( - &self, - limitDate: &NSDate, - msgID: NSUInteger, - components: Option<&NSMutableArray>, - receivePort: Option<&NSPort>, - headerSpaceReserved: NSUInteger, - ) -> bool { - msg_send![ - self, - sendBeforeDate: limitDate, - msgid: msgID, - components: components, - from: receivePort, - reserved: headerSpaceReserved - ] - } - pub unsafe fn addConnection_toRunLoop_forMode( - &self, - conn: &NSConnection, - runLoop: &NSRunLoop, - mode: &NSRunLoopMode, - ) { - msg_send![self, addConnection: conn, toRunLoop: runLoop, forMode: mode] - } - pub unsafe fn removeConnection_fromRunLoop_forMode( - &self, - conn: &NSConnection, - runLoop: &NSRunLoop, - mode: &NSRunLoopMode, - ) { - msg_send![ - self, - removeConnection: conn, - fromRunLoop: runLoop, - forMode: mode - ] - } -} +); pub type NSPortDelegate = NSObject; extern_class!( #[derive(Debug)] @@ -105,42 +107,44 @@ extern_class!( type Super = NSPort; } ); -impl NSMachPort { - pub unsafe fn portWithMachPort(machPort: u32) -> Id { - msg_send_id![Self::class(), portWithMachPort: machPort] - } - pub unsafe fn initWithMachPort(&self, machPort: u32) -> Id { - msg_send_id![self, initWithMachPort: machPort] - } - pub unsafe fn setDelegate(&self, anObject: Option<&NSMachPortDelegate>) { - msg_send![self, setDelegate: anObject] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn portWithMachPort_options( - machPort: u32, - f: NSMachPortOptions, - ) -> Id { - msg_send_id![Self::class(), portWithMachPort: machPort, options: f] - } - pub unsafe fn initWithMachPort_options( - &self, - machPort: u32, - f: NSMachPortOptions, - ) -> Id { - msg_send_id![self, initWithMachPort: machPort, options: f] +extern_methods!( + unsafe impl NSMachPort { + pub unsafe fn portWithMachPort(machPort: u32) -> Id { + msg_send_id![Self::class(), portWithMachPort: machPort] + } + pub unsafe fn initWithMachPort(&self, machPort: u32) -> Id { + msg_send_id![self, initWithMachPort: machPort] + } + pub unsafe fn setDelegate(&self, anObject: Option<&NSMachPortDelegate>) { + msg_send![self, setDelegate: anObject] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn portWithMachPort_options( + machPort: u32, + f: NSMachPortOptions, + ) -> Id { + msg_send_id![Self::class(), portWithMachPort: machPort, options: f] + } + pub unsafe fn initWithMachPort_options( + &self, + machPort: u32, + f: NSMachPortOptions, + ) -> Id { + msg_send_id![self, initWithMachPort: machPort, options: f] + } + pub unsafe fn machPort(&self) -> u32 { + msg_send![self, machPort] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] + } + pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, removeFromRunLoop: runLoop, forMode: mode] + } } - pub unsafe fn machPort(&self) -> u32 { - msg_send![self, machPort] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] - } - pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, removeFromRunLoop: runLoop, forMode: mode] - } -} +); pub type NSMachPortDelegate = NSObject; extern_class!( #[derive(Debug)] @@ -149,7 +153,9 @@ extern_class!( type Super = NSPort; } ); -impl NSMessagePort {} +extern_methods!( + unsafe impl NSMessagePort {} +); extern_class!( #[derive(Debug)] pub struct NSSocketPort; @@ -157,78 +163,80 @@ extern_class!( type Super = NSPort; } ); -impl NSSocketPort { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithTCPPort(&self, port: c_ushort) -> Option> { - msg_send_id![self, initWithTCPPort: port] - } - pub unsafe fn initWithProtocolFamily_socketType_protocol_address( - &self, - family: c_int, - type_: c_int, - protocol: c_int, - address: &NSData, - ) -> Option> { - msg_send_id![ - self, - initWithProtocolFamily: family, - socketType: type_, - protocol: protocol, - address: address - ] - } - pub unsafe fn initWithProtocolFamily_socketType_protocol_socket( - &self, - family: c_int, - type_: c_int, - protocol: c_int, - sock: NSSocketNativeHandle, - ) -> Option> { - msg_send_id![ - self, - initWithProtocolFamily: family, - socketType: type_, - protocol: protocol, - socket: sock - ] +extern_methods!( + unsafe impl NSSocketPort { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithTCPPort(&self, port: c_ushort) -> Option> { + msg_send_id![self, initWithTCPPort: port] + } + pub unsafe fn initWithProtocolFamily_socketType_protocol_address( + &self, + family: c_int, + type_: c_int, + protocol: c_int, + address: &NSData, + ) -> Option> { + msg_send_id![ + self, + initWithProtocolFamily: family, + socketType: type_, + protocol: protocol, + address: address + ] + } + pub unsafe fn initWithProtocolFamily_socketType_protocol_socket( + &self, + family: c_int, + type_: c_int, + protocol: c_int, + sock: NSSocketNativeHandle, + ) -> Option> { + msg_send_id![ + self, + initWithProtocolFamily: family, + socketType: type_, + protocol: protocol, + socket: sock + ] + } + pub unsafe fn initRemoteWithTCPPort_host( + &self, + port: c_ushort, + hostName: Option<&NSString>, + ) -> Option> { + msg_send_id![self, initRemoteWithTCPPort: port, host: hostName] + } + pub unsafe fn initRemoteWithProtocolFamily_socketType_protocol_address( + &self, + family: c_int, + type_: c_int, + protocol: c_int, + address: &NSData, + ) -> Id { + msg_send_id![ + self, + initRemoteWithProtocolFamily: family, + socketType: type_, + protocol: protocol, + address: address + ] + } + pub unsafe fn protocolFamily(&self) -> c_int { + msg_send![self, protocolFamily] + } + pub unsafe fn socketType(&self) -> c_int { + msg_send![self, socketType] + } + pub unsafe fn protocol(&self) -> c_int { + msg_send![self, protocol] + } + pub unsafe fn address(&self) -> Id { + msg_send_id![self, address] + } + pub unsafe fn socket(&self) -> NSSocketNativeHandle { + msg_send![self, socket] + } } - pub unsafe fn initRemoteWithTCPPort_host( - &self, - port: c_ushort, - hostName: Option<&NSString>, - ) -> Option> { - msg_send_id![self, initRemoteWithTCPPort: port, host: hostName] - } - pub unsafe fn initRemoteWithProtocolFamily_socketType_protocol_address( - &self, - family: c_int, - type_: c_int, - protocol: c_int, - address: &NSData, - ) -> Id { - msg_send_id![ - self, - initRemoteWithProtocolFamily: family, - socketType: type_, - protocol: protocol, - address: address - ] - } - pub unsafe fn protocolFamily(&self) -> c_int { - msg_send![self, protocolFamily] - } - pub unsafe fn socketType(&self) -> c_int { - msg_send![self, socketType] - } - pub unsafe fn protocol(&self) -> c_int { - msg_send![self, protocol] - } - pub unsafe fn address(&self) -> Id { - msg_send_id![self, address] - } - pub unsafe fn socket(&self) -> NSSocketNativeHandle { - msg_send![self, socket] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index 557eea20f..cd6cbbd5d 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSCoder::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPortCoder; @@ -13,60 +13,64 @@ extern_class!( type Super = NSCoder; } ); -impl NSPortCoder { - pub unsafe fn isBycopy(&self) -> bool { - msg_send![self, isBycopy] +extern_methods!( + unsafe impl NSPortCoder { + pub unsafe fn isBycopy(&self) -> bool { + msg_send![self, isBycopy] + } + pub unsafe fn isByref(&self) -> bool { + msg_send![self, isByref] + } + pub unsafe fn encodePortObject(&self, aport: &NSPort) { + msg_send![self, encodePortObject: aport] + } + pub unsafe fn decodePortObject(&self) -> Option> { + msg_send_id![self, decodePortObject] + } + pub unsafe fn connection(&self) -> Option> { + msg_send_id![self, connection] + } + pub unsafe fn portCoderWithReceivePort_sendPort_components( + rcvPort: Option<&NSPort>, + sndPort: Option<&NSPort>, + comps: Option<&NSArray>, + ) -> Id { + msg_send_id![ + Self::class(), + portCoderWithReceivePort: rcvPort, + sendPort: sndPort, + components: comps + ] + } + pub unsafe fn initWithReceivePort_sendPort_components( + &self, + rcvPort: Option<&NSPort>, + sndPort: Option<&NSPort>, + comps: Option<&NSArray>, + ) -> Id { + msg_send_id![ + self, + initWithReceivePort: rcvPort, + sendPort: sndPort, + components: comps + ] + } + pub unsafe fn dispatch(&self) { + msg_send![self, dispatch] + } } - pub unsafe fn isByref(&self) -> bool { - msg_send![self, isByref] - } - pub unsafe fn encodePortObject(&self, aport: &NSPort) { - msg_send![self, encodePortObject: aport] - } - pub unsafe fn decodePortObject(&self) -> Option> { - msg_send_id![self, decodePortObject] - } - pub unsafe fn connection(&self) -> Option> { - msg_send_id![self, connection] - } - pub unsafe fn portCoderWithReceivePort_sendPort_components( - rcvPort: Option<&NSPort>, - sndPort: Option<&NSPort>, - comps: Option<&NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - portCoderWithReceivePort: rcvPort, - sendPort: sndPort, - components: comps - ] - } - pub unsafe fn initWithReceivePort_sendPort_components( - &self, - rcvPort: Option<&NSPort>, - sndPort: Option<&NSPort>, - comps: Option<&NSArray>, - ) -> Id { - msg_send_id![ - self, - initWithReceivePort: rcvPort, - sendPort: sndPort, - components: comps - ] - } - pub unsafe fn dispatch(&self) { - msg_send![self, dispatch] - } -} -#[doc = "NSDistributedObjects"] -impl NSObject { - pub unsafe fn classForPortCoder(&self) -> &Class { - msg_send![self, classForPortCoder] - } - pub unsafe fn replacementObjectForPortCoder( - &self, - coder: &NSPortCoder, - ) -> Option> { - msg_send_id![self, replacementObjectForPortCoder: coder] +); +extern_methods!( + #[doc = "NSDistributedObjects"] + unsafe impl NSObject { + pub unsafe fn classForPortCoder(&self) -> &Class { + msg_send![self, classForPortCoder] + } + pub unsafe fn replacementObjectForPortCoder( + &self, + coder: &NSPortCoder, + ) -> Option> { + msg_send_id![self, replacementObjectForPortCoder: coder] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index 3e92e4968..04fb92afa 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPortMessage; @@ -14,36 +14,38 @@ extern_class!( type Super = NSObject; } ); -impl NSPortMessage { - pub unsafe fn initWithSendPort_receivePort_components( - &self, - sendPort: Option<&NSPort>, - replyPort: Option<&NSPort>, - components: Option<&NSArray>, - ) -> Id { - msg_send_id![ - self, - initWithSendPort: sendPort, - receivePort: replyPort, - components: components - ] +extern_methods!( + unsafe impl NSPortMessage { + pub unsafe fn initWithSendPort_receivePort_components( + &self, + sendPort: Option<&NSPort>, + replyPort: Option<&NSPort>, + components: Option<&NSArray>, + ) -> Id { + msg_send_id![ + self, + initWithSendPort: sendPort, + receivePort: replyPort, + components: components + ] + } + pub unsafe fn components(&self) -> Option> { + msg_send_id![self, components] + } + pub unsafe fn receivePort(&self) -> Option> { + msg_send_id![self, receivePort] + } + pub unsafe fn sendPort(&self) -> Option> { + msg_send_id![self, sendPort] + } + pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool { + msg_send![self, sendBeforeDate: date] + } + pub unsafe fn msgid(&self) -> u32 { + msg_send![self, msgid] + } + pub unsafe fn setMsgid(&self, msgid: u32) { + msg_send![self, setMsgid: msgid] + } } - pub unsafe fn components(&self) -> Option> { - msg_send_id![self, components] - } - pub unsafe fn receivePort(&self) -> Option> { - msg_send_id![self, receivePort] - } - pub unsafe fn sendPort(&self) -> Option> { - msg_send_id![self, sendPort] - } - pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool { - msg_send![self, sendBeforeDate: date] - } - pub unsafe fn msgid(&self) -> u32 { - msg_send![self, msgid] - } - pub unsafe fn setMsgid(&self, msgid: u32) { - msg_send![self, setMsgid: msgid] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index c85ae8a5e..2d1f567cd 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPortNameServer; @@ -12,27 +12,29 @@ extern_class!( type Super = NSObject; } ); -impl NSPortNameServer { - pub unsafe fn systemDefaultPortNameServer() -> Id { - msg_send_id![Self::class(), systemDefaultPortNameServer] +extern_methods!( + unsafe impl NSPortNameServer { + pub unsafe fn systemDefaultPortNameServer() -> Id { + msg_send_id![Self::class(), systemDefaultPortNameServer] + } + pub unsafe fn portForName(&self, name: &NSString) -> Option> { + msg_send_id![self, portForName: name] + } + pub unsafe fn portForName_host( + &self, + name: &NSString, + host: Option<&NSString>, + ) -> Option> { + msg_send_id![self, portForName: name, host: host] + } + pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { + msg_send![self, registerPort: port, name: name] + } + pub unsafe fn removePortForName(&self, name: &NSString) -> bool { + msg_send![self, removePortForName: name] + } } - pub unsafe fn portForName(&self, name: &NSString) -> Option> { - msg_send_id![self, portForName: name] - } - pub unsafe fn portForName_host( - &self, - name: &NSString, - host: Option<&NSString>, - ) -> Option> { - msg_send_id![self, portForName: name, host: host] - } - pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { - msg_send![self, registerPort: port, name: name] - } - pub unsafe fn removePortForName(&self, name: &NSString) -> bool { - msg_send![self, removePortForName: name] - } -} +); extern_class!( #[derive(Debug)] pub struct NSMachBootstrapServer; @@ -40,27 +42,29 @@ extern_class!( type Super = NSPortNameServer; } ); -impl NSMachBootstrapServer { - pub unsafe fn sharedInstance() -> Id { - msg_send_id![Self::class(), sharedInstance] - } - pub unsafe fn portForName(&self, name: &NSString) -> Option> { - msg_send_id![self, portForName: name] +extern_methods!( + unsafe impl NSMachBootstrapServer { + pub unsafe fn sharedInstance() -> Id { + msg_send_id![Self::class(), sharedInstance] + } + pub unsafe fn portForName(&self, name: &NSString) -> Option> { + msg_send_id![self, portForName: name] + } + pub unsafe fn portForName_host( + &self, + name: &NSString, + host: Option<&NSString>, + ) -> Option> { + msg_send_id![self, portForName: name, host: host] + } + pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { + msg_send![self, registerPort: port, name: name] + } + pub unsafe fn servicePortWithName(&self, name: &NSString) -> Option> { + msg_send_id![self, servicePortWithName: name] + } } - pub unsafe fn portForName_host( - &self, - name: &NSString, - host: Option<&NSString>, - ) -> Option> { - msg_send_id![self, portForName: name, host: host] - } - pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { - msg_send![self, registerPort: port, name: name] - } - pub unsafe fn servicePortWithName(&self, name: &NSString) -> Option> { - msg_send_id![self, servicePortWithName: name] - } -} +); extern_class!( #[derive(Debug)] pub struct NSMessagePortNameServer; @@ -68,21 +72,23 @@ extern_class!( type Super = NSPortNameServer; } ); -impl NSMessagePortNameServer { - pub unsafe fn sharedInstance() -> Id { - msg_send_id![Self::class(), sharedInstance] - } - pub unsafe fn portForName(&self, name: &NSString) -> Option> { - msg_send_id![self, portForName: name] +extern_methods!( + unsafe impl NSMessagePortNameServer { + pub unsafe fn sharedInstance() -> Id { + msg_send_id![Self::class(), sharedInstance] + } + pub unsafe fn portForName(&self, name: &NSString) -> Option> { + msg_send_id![self, portForName: name] + } + pub unsafe fn portForName_host( + &self, + name: &NSString, + host: Option<&NSString>, + ) -> Option> { + msg_send_id![self, portForName: name, host: host] + } } - pub unsafe fn portForName_host( - &self, - name: &NSString, - host: Option<&NSString>, - ) -> Option> { - msg_send_id![self, portForName: name, host: host] - } -} +); extern_class!( #[derive(Debug)] pub struct NSSocketPortNameServer; @@ -90,59 +96,61 @@ extern_class!( type Super = NSPortNameServer; } ); -impl NSSocketPortNameServer { - pub unsafe fn sharedInstance() -> Id { - msg_send_id![Self::class(), sharedInstance] - } - pub unsafe fn portForName(&self, name: &NSString) -> Option> { - msg_send_id![self, portForName: name] - } - pub unsafe fn portForName_host( - &self, - name: &NSString, - host: Option<&NSString>, - ) -> Option> { - msg_send_id![self, portForName: name, host: host] - } - pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { - msg_send![self, registerPort: port, name: name] - } - pub unsafe fn removePortForName(&self, name: &NSString) -> bool { - msg_send![self, removePortForName: name] +extern_methods!( + unsafe impl NSSocketPortNameServer { + pub unsafe fn sharedInstance() -> Id { + msg_send_id![Self::class(), sharedInstance] + } + pub unsafe fn portForName(&self, name: &NSString) -> Option> { + msg_send_id![self, portForName: name] + } + pub unsafe fn portForName_host( + &self, + name: &NSString, + host: Option<&NSString>, + ) -> Option> { + msg_send_id![self, portForName: name, host: host] + } + pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { + msg_send![self, registerPort: port, name: name] + } + pub unsafe fn removePortForName(&self, name: &NSString) -> bool { + msg_send![self, removePortForName: name] + } + pub unsafe fn portForName_host_nameServerPortNumber( + &self, + name: &NSString, + host: Option<&NSString>, + portNumber: u16, + ) -> Option> { + msg_send_id![ + self, + portForName: name, + host: host, + nameServerPortNumber: portNumber + ] + } + pub unsafe fn registerPort_name_nameServerPortNumber( + &self, + port: &NSPort, + name: &NSString, + portNumber: u16, + ) -> bool { + msg_send![ + self, + registerPort: port, + name: name, + nameServerPortNumber: portNumber + ] + } + pub unsafe fn defaultNameServerPortNumber(&self) -> u16 { + msg_send![self, defaultNameServerPortNumber] + } + pub unsafe fn setDefaultNameServerPortNumber(&self, defaultNameServerPortNumber: u16) { + msg_send![ + self, + setDefaultNameServerPortNumber: defaultNameServerPortNumber + ] + } } - pub unsafe fn portForName_host_nameServerPortNumber( - &self, - name: &NSString, - host: Option<&NSString>, - portNumber: u16, - ) -> Option> { - msg_send_id![ - self, - portForName: name, - host: host, - nameServerPortNumber: portNumber - ] - } - pub unsafe fn registerPort_name_nameServerPortNumber( - &self, - port: &NSPort, - name: &NSString, - portNumber: u16, - ) -> bool { - msg_send![ - self, - registerPort: port, - name: name, - nameServerPortNumber: portNumber - ] - } - pub unsafe fn defaultNameServerPortNumber(&self) -> u16 { - msg_send![self, defaultNameServerPortNumber] - } - pub unsafe fn setDefaultNameServerPortNumber(&self, defaultNameServerPortNumber: u16) { - msg_send![ - self, - setDefaultNameServerPortNumber: defaultNameServerPortNumber - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index ccc929e32..526a60d31 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPredicate; @@ -15,107 +15,121 @@ extern_class!( type Super = NSObject; } ); -impl NSPredicate { - pub unsafe fn predicateWithFormat_argumentArray( - predicateFormat: &NSString, - arguments: Option<&NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - predicateWithFormat: predicateFormat, - argumentArray: arguments - ] +extern_methods!( + unsafe impl NSPredicate { + pub unsafe fn predicateWithFormat_argumentArray( + predicateFormat: &NSString, + arguments: Option<&NSArray>, + ) -> Id { + msg_send_id![ + Self::class(), + predicateWithFormat: predicateFormat, + argumentArray: arguments + ] + } + pub unsafe fn predicateWithFormat_arguments( + predicateFormat: &NSString, + argList: va_list, + ) -> Id { + msg_send_id![ + Self::class(), + predicateWithFormat: predicateFormat, + arguments: argList + ] + } + pub unsafe fn predicateFromMetadataQueryString( + queryString: &NSString, + ) -> Option> { + msg_send_id![Self::class(), predicateFromMetadataQueryString: queryString] + } + pub unsafe fn predicateWithValue(value: bool) -> Id { + msg_send_id![Self::class(), predicateWithValue: value] + } + pub unsafe fn predicateWithBlock(block: TodoBlock) -> Id { + msg_send_id![Self::class(), predicateWithBlock: block] + } + pub unsafe fn predicateFormat(&self) -> Id { + msg_send_id![self, predicateFormat] + } + pub unsafe fn predicateWithSubstitutionVariables( + &self, + variables: &NSDictionary, + ) -> Id { + msg_send_id![self, predicateWithSubstitutionVariables: variables] + } + pub unsafe fn evaluateWithObject(&self, object: Option<&Object>) -> bool { + msg_send![self, evaluateWithObject: object] + } + pub unsafe fn evaluateWithObject_substitutionVariables( + &self, + object: Option<&Object>, + bindings: Option<&NSDictionary>, + ) -> bool { + msg_send![ + self, + evaluateWithObject: object, + substitutionVariables: bindings + ] + } + pub unsafe fn allowEvaluation(&self) { + msg_send![self, allowEvaluation] + } } - pub unsafe fn predicateWithFormat_arguments( - predicateFormat: &NSString, - argList: va_list, - ) -> Id { - msg_send_id![ - Self::class(), - predicateWithFormat: predicateFormat, - arguments: argList - ] - } - pub unsafe fn predicateFromMetadataQueryString( - queryString: &NSString, - ) -> Option> { - msg_send_id![Self::class(), predicateFromMetadataQueryString: queryString] - } - pub unsafe fn predicateWithValue(value: bool) -> Id { - msg_send_id![Self::class(), predicateWithValue: value] - } - pub unsafe fn predicateWithBlock(block: TodoBlock) -> Id { - msg_send_id![Self::class(), predicateWithBlock: block] - } - pub unsafe fn predicateFormat(&self) -> Id { - msg_send_id![self, predicateFormat] - } - pub unsafe fn predicateWithSubstitutionVariables( - &self, - variables: &NSDictionary, - ) -> Id { - msg_send_id![self, predicateWithSubstitutionVariables: variables] - } - pub unsafe fn evaluateWithObject(&self, object: Option<&Object>) -> bool { - msg_send![self, evaluateWithObject: object] - } - pub unsafe fn evaluateWithObject_substitutionVariables( - &self, - object: Option<&Object>, - bindings: Option<&NSDictionary>, - ) -> bool { - msg_send![ - self, - evaluateWithObject: object, - substitutionVariables: bindings - ] - } - pub unsafe fn allowEvaluation(&self) { - msg_send![self, allowEvaluation] - } -} -#[doc = "NSPredicateSupport"] -impl NSArray { - pub unsafe fn filteredArrayUsingPredicate( - &self, - predicate: &NSPredicate, - ) -> Id, Shared> { - msg_send_id![self, filteredArrayUsingPredicate: predicate] +); +extern_methods!( + #[doc = "NSPredicateSupport"] + unsafe impl NSArray { + pub unsafe fn filteredArrayUsingPredicate( + &self, + predicate: &NSPredicate, + ) -> Id, Shared> { + msg_send_id![self, filteredArrayUsingPredicate: predicate] + } } -} -#[doc = "NSPredicateSupport"] -impl NSMutableArray { - pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate) { - msg_send![self, filterUsingPredicate: predicate] +); +extern_methods!( + #[doc = "NSPredicateSupport"] + unsafe impl NSMutableArray { + pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate) { + msg_send![self, filterUsingPredicate: predicate] + } } -} -#[doc = "NSPredicateSupport"] -impl NSSet { - pub unsafe fn filteredSetUsingPredicate( - &self, - predicate: &NSPredicate, - ) -> Id, Shared> { - msg_send_id![self, filteredSetUsingPredicate: predicate] +); +extern_methods!( + #[doc = "NSPredicateSupport"] + unsafe impl NSSet { + pub unsafe fn filteredSetUsingPredicate( + &self, + predicate: &NSPredicate, + ) -> Id, Shared> { + msg_send_id![self, filteredSetUsingPredicate: predicate] + } } -} -#[doc = "NSPredicateSupport"] -impl NSMutableSet { - pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate) { - msg_send![self, filterUsingPredicate: predicate] +); +extern_methods!( + #[doc = "NSPredicateSupport"] + unsafe impl NSMutableSet { + pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate) { + msg_send![self, filterUsingPredicate: predicate] + } } -} -#[doc = "NSPredicateSupport"] -impl NSOrderedSet { - pub unsafe fn filteredOrderedSetUsingPredicate( - &self, - p: &NSPredicate, - ) -> Id, Shared> { - msg_send_id![self, filteredOrderedSetUsingPredicate: p] +); +extern_methods!( + #[doc = "NSPredicateSupport"] + unsafe impl NSOrderedSet { + pub unsafe fn filteredOrderedSetUsingPredicate( + &self, + p: &NSPredicate, + ) -> Id, Shared> { + msg_send_id![self, filteredOrderedSetUsingPredicate: p] + } } -} -#[doc = "NSPredicateSupport"] -impl NSMutableOrderedSet { - pub unsafe fn filterUsingPredicate(&self, p: &NSPredicate) { - msg_send![self, filterUsingPredicate: p] +); +extern_methods!( + #[doc = "NSPredicateSupport"] + unsafe impl NSMutableOrderedSet { + pub unsafe fn filterUsingPredicate(&self, p: &NSPredicate) { + msg_send![self, filterUsingPredicate: p] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index fe84258ae..662de6557 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSProcessInfo; @@ -15,150 +15,162 @@ extern_class!( type Super = NSObject; } ); -impl NSProcessInfo { - pub unsafe fn processInfo() -> Id { - msg_send_id![Self::class(), processInfo] +extern_methods!( + unsafe impl NSProcessInfo { + pub unsafe fn processInfo() -> Id { + msg_send_id![Self::class(), processInfo] + } + pub unsafe fn environment(&self) -> Id, Shared> { + msg_send_id![self, environment] + } + pub unsafe fn arguments(&self) -> Id, Shared> { + msg_send_id![self, arguments] + } + pub unsafe fn hostName(&self) -> Id { + msg_send_id![self, hostName] + } + pub unsafe fn processName(&self) -> Id { + msg_send_id![self, processName] + } + pub unsafe fn setProcessName(&self, processName: &NSString) { + msg_send![self, setProcessName: processName] + } + pub unsafe fn processIdentifier(&self) -> c_int { + msg_send![self, processIdentifier] + } + pub unsafe fn globallyUniqueString(&self) -> Id { + msg_send_id![self, globallyUniqueString] + } + pub unsafe fn operatingSystem(&self) -> NSUInteger { + msg_send![self, operatingSystem] + } + pub unsafe fn operatingSystemName(&self) -> Id { + msg_send_id![self, operatingSystemName] + } + pub unsafe fn operatingSystemVersionString(&self) -> Id { + msg_send_id![self, operatingSystemVersionString] + } + pub unsafe fn operatingSystemVersion(&self) -> NSOperatingSystemVersion { + msg_send![self, operatingSystemVersion] + } + pub unsafe fn processorCount(&self) -> NSUInteger { + msg_send![self, processorCount] + } + pub unsafe fn activeProcessorCount(&self) -> NSUInteger { + msg_send![self, activeProcessorCount] + } + pub unsafe fn physicalMemory(&self) -> c_ulonglong { + msg_send![self, physicalMemory] + } + pub unsafe fn isOperatingSystemAtLeastVersion( + &self, + version: NSOperatingSystemVersion, + ) -> bool { + msg_send![self, isOperatingSystemAtLeastVersion: version] + } + pub unsafe fn systemUptime(&self) -> NSTimeInterval { + msg_send![self, systemUptime] + } + pub unsafe fn disableSuddenTermination(&self) { + msg_send![self, disableSuddenTermination] + } + pub unsafe fn enableSuddenTermination(&self) { + msg_send![self, enableSuddenTermination] + } + pub unsafe fn disableAutomaticTermination(&self, reason: &NSString) { + msg_send![self, disableAutomaticTermination: reason] + } + pub unsafe fn enableAutomaticTermination(&self, reason: &NSString) { + msg_send![self, enableAutomaticTermination: reason] + } + pub unsafe fn automaticTerminationSupportEnabled(&self) -> bool { + msg_send![self, automaticTerminationSupportEnabled] + } + pub unsafe fn setAutomaticTerminationSupportEnabled( + &self, + automaticTerminationSupportEnabled: bool, + ) { + msg_send![ + self, + setAutomaticTerminationSupportEnabled: automaticTerminationSupportEnabled + ] + } } - pub unsafe fn environment(&self) -> Id, Shared> { - msg_send_id![self, environment] - } - pub unsafe fn arguments(&self) -> Id, Shared> { - msg_send_id![self, arguments] - } - pub unsafe fn hostName(&self) -> Id { - msg_send_id![self, hostName] - } - pub unsafe fn processName(&self) -> Id { - msg_send_id![self, processName] - } - pub unsafe fn setProcessName(&self, processName: &NSString) { - msg_send![self, setProcessName: processName] - } - pub unsafe fn processIdentifier(&self) -> c_int { - msg_send![self, processIdentifier] - } - pub unsafe fn globallyUniqueString(&self) -> Id { - msg_send_id![self, globallyUniqueString] - } - pub unsafe fn operatingSystem(&self) -> NSUInteger { - msg_send![self, operatingSystem] - } - pub unsafe fn operatingSystemName(&self) -> Id { - msg_send_id![self, operatingSystemName] - } - pub unsafe fn operatingSystemVersionString(&self) -> Id { - msg_send_id![self, operatingSystemVersionString] - } - pub unsafe fn operatingSystemVersion(&self) -> NSOperatingSystemVersion { - msg_send![self, operatingSystemVersion] - } - pub unsafe fn processorCount(&self) -> NSUInteger { - msg_send![self, processorCount] - } - pub unsafe fn activeProcessorCount(&self) -> NSUInteger { - msg_send![self, activeProcessorCount] - } - pub unsafe fn physicalMemory(&self) -> c_ulonglong { - msg_send![self, physicalMemory] - } - pub unsafe fn isOperatingSystemAtLeastVersion( - &self, - version: NSOperatingSystemVersion, - ) -> bool { - msg_send![self, isOperatingSystemAtLeastVersion: version] - } - pub unsafe fn systemUptime(&self) -> NSTimeInterval { - msg_send![self, systemUptime] - } - pub unsafe fn disableSuddenTermination(&self) { - msg_send![self, disableSuddenTermination] - } - pub unsafe fn enableSuddenTermination(&self) { - msg_send![self, enableSuddenTermination] - } - pub unsafe fn disableAutomaticTermination(&self, reason: &NSString) { - msg_send![self, disableAutomaticTermination: reason] - } - pub unsafe fn enableAutomaticTermination(&self, reason: &NSString) { - msg_send![self, enableAutomaticTermination: reason] - } - pub unsafe fn automaticTerminationSupportEnabled(&self) -> bool { - msg_send![self, automaticTerminationSupportEnabled] - } - pub unsafe fn setAutomaticTerminationSupportEnabled( - &self, - automaticTerminationSupportEnabled: bool, - ) { - msg_send![ - self, - setAutomaticTerminationSupportEnabled: automaticTerminationSupportEnabled - ] - } -} -#[doc = "NSProcessInfoActivity"] -impl NSProcessInfo { - pub unsafe fn beginActivityWithOptions_reason( - &self, - options: NSActivityOptions, - reason: &NSString, - ) -> Id { - msg_send_id![self, beginActivityWithOptions: options, reason: reason] - } - pub unsafe fn endActivity(&self, activity: &NSObject) { - msg_send![self, endActivity: activity] - } - pub unsafe fn performActivityWithOptions_reason_usingBlock( - &self, - options: NSActivityOptions, - reason: &NSString, - block: TodoBlock, - ) { - msg_send![ - self, - performActivityWithOptions: options, - reason: reason, - usingBlock: block - ] - } - pub unsafe fn performExpiringActivityWithReason_usingBlock( - &self, - reason: &NSString, - block: TodoBlock, - ) { - msg_send![ - self, - performExpiringActivityWithReason: reason, - usingBlock: block - ] - } -} -#[doc = "NSUserInformation"] -impl NSProcessInfo { - pub unsafe fn userName(&self) -> Id { - msg_send_id![self, userName] - } - pub unsafe fn fullUserName(&self) -> Id { - msg_send_id![self, fullUserName] +); +extern_methods!( + #[doc = "NSProcessInfoActivity"] + unsafe impl NSProcessInfo { + pub unsafe fn beginActivityWithOptions_reason( + &self, + options: NSActivityOptions, + reason: &NSString, + ) -> Id { + msg_send_id![self, beginActivityWithOptions: options, reason: reason] + } + pub unsafe fn endActivity(&self, activity: &NSObject) { + msg_send![self, endActivity: activity] + } + pub unsafe fn performActivityWithOptions_reason_usingBlock( + &self, + options: NSActivityOptions, + reason: &NSString, + block: TodoBlock, + ) { + msg_send![ + self, + performActivityWithOptions: options, + reason: reason, + usingBlock: block + ] + } + pub unsafe fn performExpiringActivityWithReason_usingBlock( + &self, + reason: &NSString, + block: TodoBlock, + ) { + msg_send![ + self, + performExpiringActivityWithReason: reason, + usingBlock: block + ] + } } -} -#[doc = "NSProcessInfoThermalState"] -impl NSProcessInfo { - pub unsafe fn thermalState(&self) -> NSProcessInfoThermalState { - msg_send![self, thermalState] +); +extern_methods!( + #[doc = "NSUserInformation"] + unsafe impl NSProcessInfo { + pub unsafe fn userName(&self) -> Id { + msg_send_id![self, userName] + } + pub unsafe fn fullUserName(&self) -> Id { + msg_send_id![self, fullUserName] + } } -} -#[doc = "NSProcessInfoPowerState"] -impl NSProcessInfo { - pub unsafe fn isLowPowerModeEnabled(&self) -> bool { - msg_send![self, isLowPowerModeEnabled] +); +extern_methods!( + #[doc = "NSProcessInfoThermalState"] + unsafe impl NSProcessInfo { + pub unsafe fn thermalState(&self) -> NSProcessInfoThermalState { + msg_send![self, thermalState] + } } -} -#[doc = "NSProcessInfoPlatform"] -impl NSProcessInfo { - pub unsafe fn isMacCatalystApp(&self) -> bool { - msg_send![self, isMacCatalystApp] +); +extern_methods!( + #[doc = "NSProcessInfoPowerState"] + unsafe impl NSProcessInfo { + pub unsafe fn isLowPowerModeEnabled(&self) -> bool { + msg_send![self, isLowPowerModeEnabled] + } } - pub unsafe fn isiOSAppOnMac(&self) -> bool { - msg_send![self, isiOSAppOnMac] +); +extern_methods!( + #[doc = "NSProcessInfoPlatform"] + unsafe impl NSProcessInfo { + pub unsafe fn isMacCatalystApp(&self) -> bool { + msg_send![self, isMacCatalystApp] + } + pub unsafe fn isiOSAppOnMac(&self) -> bool { + msg_send![self, isiOSAppOnMac] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 746408573..8d7fc895e 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSProgressKind = NSString; pub type NSProgressUserInfoKey = NSString; pub type NSProgressFileOperationKind = NSString; @@ -21,219 +21,227 @@ extern_class!( type Super = NSObject; } ); -impl NSProgress { - pub unsafe fn currentProgress() -> Option> { - msg_send_id![Self::class(), currentProgress] +extern_methods!( + unsafe impl NSProgress { + pub unsafe fn currentProgress() -> Option> { + msg_send_id![Self::class(), currentProgress] + } + pub unsafe fn progressWithTotalUnitCount(unitCount: int64_t) -> Id { + msg_send_id![Self::class(), progressWithTotalUnitCount: unitCount] + } + pub unsafe fn discreteProgressWithTotalUnitCount( + unitCount: int64_t, + ) -> Id { + msg_send_id![Self::class(), discreteProgressWithTotalUnitCount: unitCount] + } + pub unsafe fn progressWithTotalUnitCount_parent_pendingUnitCount( + unitCount: int64_t, + parent: &NSProgress, + portionOfParentTotalUnitCount: int64_t, + ) -> Id { + msg_send_id![ + Self::class(), + progressWithTotalUnitCount: unitCount, + parent: parent, + pendingUnitCount: portionOfParentTotalUnitCount + ] + } + pub unsafe fn initWithParent_userInfo( + &self, + parentProgressOrNil: Option<&NSProgress>, + userInfoOrNil: Option<&NSDictionary>, + ) -> Id { + msg_send_id![ + self, + initWithParent: parentProgressOrNil, + userInfo: userInfoOrNil + ] + } + pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unitCount: int64_t) { + msg_send![self, becomeCurrentWithPendingUnitCount: unitCount] + } + pub unsafe fn performAsCurrentWithPendingUnitCount_usingBlock( + &self, + unitCount: int64_t, + work: TodoBlock, + ) { + msg_send![ + self, + performAsCurrentWithPendingUnitCount: unitCount, + usingBlock: work + ] + } + pub unsafe fn resignCurrent(&self) { + msg_send![self, resignCurrent] + } + pub unsafe fn addChild_withPendingUnitCount( + &self, + child: &NSProgress, + inUnitCount: int64_t, + ) { + msg_send![self, addChild: child, withPendingUnitCount: inUnitCount] + } + pub unsafe fn totalUnitCount(&self) -> int64_t { + msg_send![self, totalUnitCount] + } + pub unsafe fn setTotalUnitCount(&self, totalUnitCount: int64_t) { + msg_send![self, setTotalUnitCount: totalUnitCount] + } + pub unsafe fn completedUnitCount(&self) -> int64_t { + msg_send![self, completedUnitCount] + } + pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: int64_t) { + msg_send![self, setCompletedUnitCount: completedUnitCount] + } + pub unsafe fn localizedDescription(&self) -> Id { + msg_send_id![self, localizedDescription] + } + pub unsafe fn setLocalizedDescription(&self, localizedDescription: Option<&NSString>) { + msg_send![self, setLocalizedDescription: localizedDescription] + } + pub unsafe fn localizedAdditionalDescription(&self) -> Id { + msg_send_id![self, localizedAdditionalDescription] + } + pub unsafe fn setLocalizedAdditionalDescription( + &self, + localizedAdditionalDescription: Option<&NSString>, + ) { + msg_send![ + self, + setLocalizedAdditionalDescription: localizedAdditionalDescription + ] + } + pub unsafe fn isCancellable(&self) -> bool { + msg_send![self, isCancellable] + } + pub unsafe fn setCancellable(&self, cancellable: bool) { + msg_send![self, setCancellable: cancellable] + } + pub unsafe fn isPausable(&self) -> bool { + msg_send![self, isPausable] + } + pub unsafe fn setPausable(&self, pausable: bool) { + msg_send![self, setPausable: pausable] + } + pub unsafe fn isCancelled(&self) -> bool { + msg_send![self, isCancelled] + } + pub unsafe fn isPaused(&self) -> bool { + msg_send![self, isPaused] + } + pub unsafe fn cancellationHandler(&self) -> TodoBlock { + msg_send![self, cancellationHandler] + } + pub unsafe fn setCancellationHandler(&self, cancellationHandler: TodoBlock) { + msg_send![self, setCancellationHandler: cancellationHandler] + } + pub unsafe fn pausingHandler(&self) -> TodoBlock { + msg_send![self, pausingHandler] + } + pub unsafe fn setPausingHandler(&self, pausingHandler: TodoBlock) { + msg_send![self, setPausingHandler: pausingHandler] + } + pub unsafe fn resumingHandler(&self) -> TodoBlock { + msg_send![self, resumingHandler] + } + pub unsafe fn setResumingHandler(&self, resumingHandler: TodoBlock) { + msg_send![self, setResumingHandler: resumingHandler] + } + pub unsafe fn setUserInfoObject_forKey( + &self, + objectOrNil: Option<&Object>, + key: &NSProgressUserInfoKey, + ) { + msg_send![self, setUserInfoObject: objectOrNil, forKey: key] + } + pub unsafe fn isIndeterminate(&self) -> bool { + msg_send![self, isIndeterminate] + } + pub unsafe fn fractionCompleted(&self) -> c_double { + msg_send![self, fractionCompleted] + } + pub unsafe fn isFinished(&self) -> bool { + msg_send![self, isFinished] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn pause(&self) { + msg_send![self, pause] + } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } + pub unsafe fn userInfo(&self) -> Id, Shared> { + msg_send_id![self, userInfo] + } + pub unsafe fn kind(&self) -> Option> { + msg_send_id![self, kind] + } + pub unsafe fn setKind(&self, kind: Option<&NSProgressKind>) { + msg_send![self, setKind: kind] + } + pub unsafe fn estimatedTimeRemaining(&self) -> Option> { + msg_send_id![self, estimatedTimeRemaining] + } + pub unsafe fn setEstimatedTimeRemaining(&self, estimatedTimeRemaining: Option<&NSNumber>) { + msg_send![self, setEstimatedTimeRemaining: estimatedTimeRemaining] + } + pub unsafe fn throughput(&self) -> Option> { + msg_send_id![self, throughput] + } + pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>) { + msg_send![self, setThroughput: throughput] + } + pub unsafe fn fileOperationKind(&self) -> Option> { + msg_send_id![self, fileOperationKind] + } + pub unsafe fn setFileOperationKind( + &self, + fileOperationKind: Option<&NSProgressFileOperationKind>, + ) { + msg_send![self, setFileOperationKind: fileOperationKind] + } + pub unsafe fn fileURL(&self) -> Option> { + msg_send_id![self, fileURL] + } + pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>) { + msg_send![self, setFileURL: fileURL] + } + pub unsafe fn fileTotalCount(&self) -> Option> { + msg_send_id![self, fileTotalCount] + } + pub unsafe fn setFileTotalCount(&self, fileTotalCount: Option<&NSNumber>) { + msg_send![self, setFileTotalCount: fileTotalCount] + } + pub unsafe fn fileCompletedCount(&self) -> Option> { + msg_send_id![self, fileCompletedCount] + } + pub unsafe fn setFileCompletedCount(&self, fileCompletedCount: Option<&NSNumber>) { + msg_send![self, setFileCompletedCount: fileCompletedCount] + } + pub unsafe fn publish(&self) { + msg_send![self, publish] + } + pub unsafe fn unpublish(&self) { + msg_send![self, unpublish] + } + pub unsafe fn addSubscriberForFileURL_withPublishingHandler( + url: &NSURL, + publishingHandler: NSProgressPublishingHandler, + ) -> Id { + msg_send_id![ + Self::class(), + addSubscriberForFileURL: url, + withPublishingHandler: publishingHandler + ] + } + pub unsafe fn removeSubscriber(subscriber: &Object) { + msg_send![Self::class(), removeSubscriber: subscriber] + } + pub unsafe fn isOld(&self) -> bool { + msg_send![self, isOld] + } } - pub unsafe fn progressWithTotalUnitCount(unitCount: int64_t) -> Id { - msg_send_id![Self::class(), progressWithTotalUnitCount: unitCount] - } - pub unsafe fn discreteProgressWithTotalUnitCount(unitCount: int64_t) -> Id { - msg_send_id![Self::class(), discreteProgressWithTotalUnitCount: unitCount] - } - pub unsafe fn progressWithTotalUnitCount_parent_pendingUnitCount( - unitCount: int64_t, - parent: &NSProgress, - portionOfParentTotalUnitCount: int64_t, - ) -> Id { - msg_send_id![ - Self::class(), - progressWithTotalUnitCount: unitCount, - parent: parent, - pendingUnitCount: portionOfParentTotalUnitCount - ] - } - pub unsafe fn initWithParent_userInfo( - &self, - parentProgressOrNil: Option<&NSProgress>, - userInfoOrNil: Option<&NSDictionary>, - ) -> Id { - msg_send_id![ - self, - initWithParent: parentProgressOrNil, - userInfo: userInfoOrNil - ] - } - pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unitCount: int64_t) { - msg_send![self, becomeCurrentWithPendingUnitCount: unitCount] - } - pub unsafe fn performAsCurrentWithPendingUnitCount_usingBlock( - &self, - unitCount: int64_t, - work: TodoBlock, - ) { - msg_send![ - self, - performAsCurrentWithPendingUnitCount: unitCount, - usingBlock: work - ] - } - pub unsafe fn resignCurrent(&self) { - msg_send![self, resignCurrent] - } - pub unsafe fn addChild_withPendingUnitCount(&self, child: &NSProgress, inUnitCount: int64_t) { - msg_send![self, addChild: child, withPendingUnitCount: inUnitCount] - } - pub unsafe fn totalUnitCount(&self) -> int64_t { - msg_send![self, totalUnitCount] - } - pub unsafe fn setTotalUnitCount(&self, totalUnitCount: int64_t) { - msg_send![self, setTotalUnitCount: totalUnitCount] - } - pub unsafe fn completedUnitCount(&self) -> int64_t { - msg_send![self, completedUnitCount] - } - pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: int64_t) { - msg_send![self, setCompletedUnitCount: completedUnitCount] - } - pub unsafe fn localizedDescription(&self) -> Id { - msg_send_id![self, localizedDescription] - } - pub unsafe fn setLocalizedDescription(&self, localizedDescription: Option<&NSString>) { - msg_send![self, setLocalizedDescription: localizedDescription] - } - pub unsafe fn localizedAdditionalDescription(&self) -> Id { - msg_send_id![self, localizedAdditionalDescription] - } - pub unsafe fn setLocalizedAdditionalDescription( - &self, - localizedAdditionalDescription: Option<&NSString>, - ) { - msg_send![ - self, - setLocalizedAdditionalDescription: localizedAdditionalDescription - ] - } - pub unsafe fn isCancellable(&self) -> bool { - msg_send![self, isCancellable] - } - pub unsafe fn setCancellable(&self, cancellable: bool) { - msg_send![self, setCancellable: cancellable] - } - pub unsafe fn isPausable(&self) -> bool { - msg_send![self, isPausable] - } - pub unsafe fn setPausable(&self, pausable: bool) { - msg_send![self, setPausable: pausable] - } - pub unsafe fn isCancelled(&self) -> bool { - msg_send![self, isCancelled] - } - pub unsafe fn isPaused(&self) -> bool { - msg_send![self, isPaused] - } - pub unsafe fn cancellationHandler(&self) -> TodoBlock { - msg_send![self, cancellationHandler] - } - pub unsafe fn setCancellationHandler(&self, cancellationHandler: TodoBlock) { - msg_send![self, setCancellationHandler: cancellationHandler] - } - pub unsafe fn pausingHandler(&self) -> TodoBlock { - msg_send![self, pausingHandler] - } - pub unsafe fn setPausingHandler(&self, pausingHandler: TodoBlock) { - msg_send![self, setPausingHandler: pausingHandler] - } - pub unsafe fn resumingHandler(&self) -> TodoBlock { - msg_send![self, resumingHandler] - } - pub unsafe fn setResumingHandler(&self, resumingHandler: TodoBlock) { - msg_send![self, setResumingHandler: resumingHandler] - } - pub unsafe fn setUserInfoObject_forKey( - &self, - objectOrNil: Option<&Object>, - key: &NSProgressUserInfoKey, - ) { - msg_send![self, setUserInfoObject: objectOrNil, forKey: key] - } - pub unsafe fn isIndeterminate(&self) -> bool { - msg_send![self, isIndeterminate] - } - pub unsafe fn fractionCompleted(&self) -> c_double { - msg_send![self, fractionCompleted] - } - pub unsafe fn isFinished(&self) -> bool { - msg_send![self, isFinished] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn pause(&self) { - msg_send![self, pause] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn userInfo(&self) -> Id, Shared> { - msg_send_id![self, userInfo] - } - pub unsafe fn kind(&self) -> Option> { - msg_send_id![self, kind] - } - pub unsafe fn setKind(&self, kind: Option<&NSProgressKind>) { - msg_send![self, setKind: kind] - } - pub unsafe fn estimatedTimeRemaining(&self) -> Option> { - msg_send_id![self, estimatedTimeRemaining] - } - pub unsafe fn setEstimatedTimeRemaining(&self, estimatedTimeRemaining: Option<&NSNumber>) { - msg_send![self, setEstimatedTimeRemaining: estimatedTimeRemaining] - } - pub unsafe fn throughput(&self) -> Option> { - msg_send_id![self, throughput] - } - pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>) { - msg_send![self, setThroughput: throughput] - } - pub unsafe fn fileOperationKind(&self) -> Option> { - msg_send_id![self, fileOperationKind] - } - pub unsafe fn setFileOperationKind( - &self, - fileOperationKind: Option<&NSProgressFileOperationKind>, - ) { - msg_send![self, setFileOperationKind: fileOperationKind] - } - pub unsafe fn fileURL(&self) -> Option> { - msg_send_id![self, fileURL] - } - pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>) { - msg_send![self, setFileURL: fileURL] - } - pub unsafe fn fileTotalCount(&self) -> Option> { - msg_send_id![self, fileTotalCount] - } - pub unsafe fn setFileTotalCount(&self, fileTotalCount: Option<&NSNumber>) { - msg_send![self, setFileTotalCount: fileTotalCount] - } - pub unsafe fn fileCompletedCount(&self) -> Option> { - msg_send_id![self, fileCompletedCount] - } - pub unsafe fn setFileCompletedCount(&self, fileCompletedCount: Option<&NSNumber>) { - msg_send![self, setFileCompletedCount: fileCompletedCount] - } - pub unsafe fn publish(&self) { - msg_send![self, publish] - } - pub unsafe fn unpublish(&self) { - msg_send![self, unpublish] - } - pub unsafe fn addSubscriberForFileURL_withPublishingHandler( - url: &NSURL, - publishingHandler: NSProgressPublishingHandler, - ) -> Id { - msg_send_id![ - Self::class(), - addSubscriberForFileURL: url, - withPublishingHandler: publishingHandler - ] - } - pub unsafe fn removeSubscriber(subscriber: &Object) { - msg_send![Self::class(), removeSubscriber: subscriber] - } - pub unsafe fn isOld(&self) -> bool { - msg_send![self, isOld] - } -} +); pub type NSProgressReporting = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 60fda07d1..7061623c4 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSPropertyListReadOptions = NSPropertyListMutabilityOptions; pub type NSPropertyListWriteOptions = NSUInteger; extern_class!( @@ -18,50 +18,52 @@ extern_class!( type Super = NSObject; } ); -impl NSPropertyListSerialization { - pub unsafe fn propertyList_isValidForFormat( - plist: &Object, - format: NSPropertyListFormat, - ) -> bool { - msg_send![Self::class(), propertyList: plist, isValidForFormat: format] +extern_methods!( + unsafe impl NSPropertyListSerialization { + pub unsafe fn propertyList_isValidForFormat( + plist: &Object, + format: NSPropertyListFormat, + ) -> bool { + msg_send![Self::class(), propertyList: plist, isValidForFormat: format] + } + pub unsafe fn dataWithPropertyList_format_options_error( + plist: &Object, + format: NSPropertyListFormat, + opt: NSPropertyListWriteOptions, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + dataWithPropertyList: plist, + format: format, + options: opt, + error: _ + ] + } + pub unsafe fn propertyListWithData_options_format_error( + data: &NSData, + opt: NSPropertyListReadOptions, + format: *mut NSPropertyListFormat, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + propertyListWithData: data, + options: opt, + format: format, + error: _ + ] + } + pub unsafe fn propertyListWithStream_options_format_error( + stream: &NSInputStream, + opt: NSPropertyListReadOptions, + format: *mut NSPropertyListFormat, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + propertyListWithStream: stream, + options: opt, + format: format, + error: _ + ] + } } - pub unsafe fn dataWithPropertyList_format_options_error( - plist: &Object, - format: NSPropertyListFormat, - opt: NSPropertyListWriteOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - dataWithPropertyList: plist, - format: format, - options: opt, - error: _ - ] - } - pub unsafe fn propertyListWithData_options_format_error( - data: &NSData, - opt: NSPropertyListReadOptions, - format: *mut NSPropertyListFormat, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - propertyListWithData: data, - options: opt, - format: format, - error: _ - ] - } - pub unsafe fn propertyListWithStream_options_format_error( - stream: &NSInputStream, - opt: NSPropertyListReadOptions, - format: *mut NSPropertyListFormat, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - propertyListWithStream: stream, - options: opt, - format: format, - error: _ - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index 8e621cc68..c99ba9cd8 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSProxy::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSProtocolChecker; @@ -11,31 +11,35 @@ extern_class!( type Super = NSProxy; } ); -impl NSProtocolChecker { - pub unsafe fn protocol(&self) -> Id { - msg_send_id![self, protocol] +extern_methods!( + unsafe impl NSProtocolChecker { + pub unsafe fn protocol(&self) -> Id { + msg_send_id![self, protocol] + } + pub unsafe fn target(&self) -> Option> { + msg_send_id![self, target] + } } - pub unsafe fn target(&self) -> Option> { - msg_send_id![self, target] - } -} -#[doc = "NSProtocolCheckerCreation"] -impl NSProtocolChecker { - pub unsafe fn protocolCheckerWithTarget_protocol( - anObject: &NSObject, - aProtocol: &Protocol, - ) -> Id { - msg_send_id![ - Self::class(), - protocolCheckerWithTarget: anObject, - protocol: aProtocol - ] - } - pub unsafe fn initWithTarget_protocol( - &self, - anObject: &NSObject, - aProtocol: &Protocol, - ) -> Id { - msg_send_id![self, initWithTarget: anObject, protocol: aProtocol] +); +extern_methods!( + #[doc = "NSProtocolCheckerCreation"] + unsafe impl NSProtocolChecker { + pub unsafe fn protocolCheckerWithTarget_protocol( + anObject: &NSObject, + aProtocol: &Protocol, + ) -> Id { + msg_send_id![ + Self::class(), + protocolCheckerWithTarget: anObject, + protocol: aProtocol + ] + } + pub unsafe fn initWithTarget_protocol( + &self, + anObject: &NSObject, + aProtocol: &Protocol, + ) -> Id { + msg_send_id![self, initWithTarget: anObject, protocol: aProtocol] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 89d5afbc2..55d405dbe 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSProxy; @@ -12,44 +12,46 @@ extern_class!( type Super = Object; } ); -impl NSProxy { - pub unsafe fn alloc() -> Id { - msg_send_id![Self::class(), alloc] +extern_methods!( + unsafe impl NSProxy { + pub unsafe fn alloc() -> Id { + msg_send_id![Self::class(), alloc] + } + pub unsafe fn allocWithZone(zone: *mut NSZone) -> Id { + msg_send_id![Self::class(), allocWithZone: zone] + } + pub unsafe fn class() -> &Class { + msg_send![Self::class(), class] + } + pub unsafe fn forwardInvocation(&self, invocation: &NSInvocation) { + msg_send![self, forwardInvocation: invocation] + } + pub unsafe fn methodSignatureForSelector( + &self, + sel: Sel, + ) -> Option> { + msg_send_id![self, methodSignatureForSelector: sel] + } + pub unsafe fn dealloc(&self) { + msg_send![self, dealloc] + } + pub unsafe fn finalize(&self) { + msg_send![self, finalize] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn debugDescription(&self) -> Id { + msg_send_id![self, debugDescription] + } + pub unsafe fn respondsToSelector(aSelector: Sel) -> bool { + msg_send![Self::class(), respondsToSelector: aSelector] + } + pub unsafe fn allowsWeakReference(&self) -> bool { + msg_send![self, allowsWeakReference] + } + pub unsafe fn retainWeakReference(&self) -> bool { + msg_send![self, retainWeakReference] + } } - pub unsafe fn allocWithZone(zone: *mut NSZone) -> Id { - msg_send_id![Self::class(), allocWithZone: zone] - } - pub unsafe fn class() -> &Class { - msg_send![Self::class(), class] - } - pub unsafe fn forwardInvocation(&self, invocation: &NSInvocation) { - msg_send![self, forwardInvocation: invocation] - } - pub unsafe fn methodSignatureForSelector( - &self, - sel: Sel, - ) -> Option> { - msg_send_id![self, methodSignatureForSelector: sel] - } - pub unsafe fn dealloc(&self) { - msg_send![self, dealloc] - } - pub unsafe fn finalize(&self) { - msg_send![self, finalize] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn debugDescription(&self) -> Id { - msg_send_id![self, debugDescription] - } - pub unsafe fn respondsToSelector(aSelector: Sel) -> bool { - msg_send![Self::class(), respondsToSelector: aSelector] - } - pub unsafe fn allowsWeakReference(&self) -> bool { - msg_send![self, allowsWeakReference] - } - pub unsafe fn retainWeakReference(&self) -> bool { - msg_send![self, retainWeakReference] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index f7b3021e1..00bf4f774 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -4,13 +4,15 @@ use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSValueRangeExtensions"] -impl NSValue { - pub unsafe fn valueWithRange(range: NSRange) -> Id { - msg_send_id![Self::class(), valueWithRange: range] +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +extern_methods!( + #[doc = "NSValueRangeExtensions"] + unsafe impl NSValue { + pub unsafe fn valueWithRange(range: NSRange) -> Id { + msg_send_id![Self::class(), valueWithRange: range] + } + pub unsafe fn rangeValue(&self) -> NSRange { + msg_send![self, rangeValue] + } } - pub unsafe fn rangeValue(&self) -> NSRange { - msg_send![self, rangeValue] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 099ebb534..fa8758c0e 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSTextCheckingResult::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSRegularExpression; @@ -13,159 +13,165 @@ extern_class!( type Super = NSObject; } ); -impl NSRegularExpression { - pub unsafe fn regularExpressionWithPattern_options_error( - pattern: &NSString, - options: NSRegularExpressionOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - regularExpressionWithPattern: pattern, - options: options, - error: _ - ] +extern_methods!( + unsafe impl NSRegularExpression { + pub unsafe fn regularExpressionWithPattern_options_error( + pattern: &NSString, + options: NSRegularExpressionOptions, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + regularExpressionWithPattern: pattern, + options: options, + error: _ + ] + } + pub unsafe fn initWithPattern_options_error( + &self, + pattern: &NSString, + options: NSRegularExpressionOptions, + ) -> Result, Id> { + msg_send_id![self, initWithPattern: pattern, options: options, error: _] + } + pub unsafe fn pattern(&self) -> Id { + msg_send_id![self, pattern] + } + pub unsafe fn options(&self) -> NSRegularExpressionOptions { + msg_send![self, options] + } + pub unsafe fn numberOfCaptureGroups(&self) -> NSUInteger { + msg_send![self, numberOfCaptureGroups] + } + pub unsafe fn escapedPatternForString(string: &NSString) -> Id { + msg_send_id![Self::class(), escapedPatternForString: string] + } } - pub unsafe fn initWithPattern_options_error( - &self, - pattern: &NSString, - options: NSRegularExpressionOptions, - ) -> Result, Id> { - msg_send_id![self, initWithPattern: pattern, options: options, error: _] - } - pub unsafe fn pattern(&self) -> Id { - msg_send_id![self, pattern] - } - pub unsafe fn options(&self) -> NSRegularExpressionOptions { - msg_send![self, options] - } - pub unsafe fn numberOfCaptureGroups(&self) -> NSUInteger { - msg_send![self, numberOfCaptureGroups] - } - pub unsafe fn escapedPatternForString(string: &NSString) -> Id { - msg_send_id![Self::class(), escapedPatternForString: string] - } -} -#[doc = "NSMatching"] -impl NSRegularExpression { - pub unsafe fn enumerateMatchesInString_options_range_usingBlock( - &self, - string: &NSString, - options: NSMatchingOptions, - range: NSRange, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateMatchesInString: string, - options: options, - range: range, - usingBlock: block - ] - } - pub unsafe fn matchesInString_options_range( - &self, - string: &NSString, - options: NSMatchingOptions, - range: NSRange, - ) -> Id, Shared> { - msg_send_id![ - self, - matchesInString: string, - options: options, - range: range - ] - } - pub unsafe fn numberOfMatchesInString_options_range( - &self, - string: &NSString, - options: NSMatchingOptions, - range: NSRange, - ) -> NSUInteger { - msg_send![ - self, - numberOfMatchesInString: string, - options: options, - range: range - ] - } - pub unsafe fn firstMatchInString_options_range( - &self, - string: &NSString, - options: NSMatchingOptions, - range: NSRange, - ) -> Option> { - msg_send_id![ - self, - firstMatchInString: string, - options: options, - range: range - ] - } - pub unsafe fn rangeOfFirstMatchInString_options_range( - &self, - string: &NSString, - options: NSMatchingOptions, - range: NSRange, - ) -> NSRange { - msg_send![ - self, - rangeOfFirstMatchInString: string, - options: options, - range: range - ] - } -} -#[doc = "NSReplacement"] -impl NSRegularExpression { - pub unsafe fn stringByReplacingMatchesInString_options_range_withTemplate( - &self, - string: &NSString, - options: NSMatchingOptions, - range: NSRange, - templ: &NSString, - ) -> Id { - msg_send_id![ - self, - stringByReplacingMatchesInString: string, - options: options, - range: range, - withTemplate: templ - ] - } - pub unsafe fn replaceMatchesInString_options_range_withTemplate( - &self, - string: &NSMutableString, - options: NSMatchingOptions, - range: NSRange, - templ: &NSString, - ) -> NSUInteger { - msg_send![ - self, - replaceMatchesInString: string, - options: options, - range: range, - withTemplate: templ - ] - } - pub unsafe fn replacementStringForResult_inString_offset_template( - &self, - result: &NSTextCheckingResult, - string: &NSString, - offset: NSInteger, - templ: &NSString, - ) -> Id { - msg_send_id![ - self, - replacementStringForResult: result, - inString: string, - offset: offset, - template: templ - ] +); +extern_methods!( + #[doc = "NSMatching"] + unsafe impl NSRegularExpression { + pub unsafe fn enumerateMatchesInString_options_range_usingBlock( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateMatchesInString: string, + options: options, + range: range, + usingBlock: block + ] + } + pub unsafe fn matchesInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> Id, Shared> { + msg_send_id![ + self, + matchesInString: string, + options: options, + range: range + ] + } + pub unsafe fn numberOfMatchesInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> NSUInteger { + msg_send![ + self, + numberOfMatchesInString: string, + options: options, + range: range + ] + } + pub unsafe fn firstMatchInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> Option> { + msg_send_id![ + self, + firstMatchInString: string, + options: options, + range: range + ] + } + pub unsafe fn rangeOfFirstMatchInString_options_range( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + ) -> NSRange { + msg_send![ + self, + rangeOfFirstMatchInString: string, + options: options, + range: range + ] + } } - pub unsafe fn escapedTemplateForString(string: &NSString) -> Id { - msg_send_id![Self::class(), escapedTemplateForString: string] +); +extern_methods!( + #[doc = "NSReplacement"] + unsafe impl NSRegularExpression { + pub unsafe fn stringByReplacingMatchesInString_options_range_withTemplate( + &self, + string: &NSString, + options: NSMatchingOptions, + range: NSRange, + templ: &NSString, + ) -> Id { + msg_send_id![ + self, + stringByReplacingMatchesInString: string, + options: options, + range: range, + withTemplate: templ + ] + } + pub unsafe fn replaceMatchesInString_options_range_withTemplate( + &self, + string: &NSMutableString, + options: NSMatchingOptions, + range: NSRange, + templ: &NSString, + ) -> NSUInteger { + msg_send![ + self, + replaceMatchesInString: string, + options: options, + range: range, + withTemplate: templ + ] + } + pub unsafe fn replacementStringForResult_inString_offset_template( + &self, + result: &NSTextCheckingResult, + string: &NSString, + offset: NSInteger, + templ: &NSString, + ) -> Id { + msg_send_id![ + self, + replacementStringForResult: result, + inString: string, + offset: offset, + template: templ + ] + } + pub unsafe fn escapedTemplateForString(string: &NSString) -> Id { + msg_send_id![Self::class(), escapedTemplateForString: string] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSDataDetector; @@ -173,23 +179,25 @@ extern_class!( type Super = NSRegularExpression; } ); -impl NSDataDetector { - pub unsafe fn dataDetectorWithTypes_error( - checkingTypes: NSTextCheckingTypes, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - dataDetectorWithTypes: checkingTypes, - error: _ - ] - } - pub unsafe fn initWithTypes_error( - &self, - checkingTypes: NSTextCheckingTypes, - ) -> Result, Id> { - msg_send_id![self, initWithTypes: checkingTypes, error: _] +extern_methods!( + unsafe impl NSDataDetector { + pub unsafe fn dataDetectorWithTypes_error( + checkingTypes: NSTextCheckingTypes, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + dataDetectorWithTypes: checkingTypes, + error: _ + ] + } + pub unsafe fn initWithTypes_error( + &self, + checkingTypes: NSTextCheckingTypes, + ) -> Result, Id> { + msg_send_id![self, initWithTypes: checkingTypes, error: _] + } + pub unsafe fn checkingTypes(&self) -> NSTextCheckingTypes { + msg_send![self, checkingTypes] + } } - pub unsafe fn checkingTypes(&self) -> NSTextCheckingTypes { - msg_send![self, checkingTypes] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index 9e9400721..568968cf9 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSRelativeDateTimeFormatter; @@ -14,64 +14,66 @@ extern_class!( type Super = NSFormatter; } ); -impl NSRelativeDateTimeFormatter { - pub unsafe fn dateTimeStyle(&self) -> NSRelativeDateTimeFormatterStyle { - msg_send![self, dateTimeStyle] +extern_methods!( + unsafe impl NSRelativeDateTimeFormatter { + pub unsafe fn dateTimeStyle(&self) -> NSRelativeDateTimeFormatterStyle { + msg_send![self, dateTimeStyle] + } + pub unsafe fn setDateTimeStyle(&self, dateTimeStyle: NSRelativeDateTimeFormatterStyle) { + msg_send![self, setDateTimeStyle: dateTimeStyle] + } + pub unsafe fn unitsStyle(&self) -> NSRelativeDateTimeFormatterUnitsStyle { + msg_send![self, unitsStyle] + } + pub unsafe fn setUnitsStyle(&self, unitsStyle: NSRelativeDateTimeFormatterUnitsStyle) { + msg_send![self, setUnitsStyle: unitsStyle] + } + pub unsafe fn formattingContext(&self) -> NSFormattingContext { + msg_send![self, formattingContext] + } + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { + msg_send![self, setFormattingContext: formattingContext] + } + pub unsafe fn calendar(&self) -> Id { + msg_send_id![self, calendar] + } + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { + msg_send![self, setCalendar: calendar] + } + pub unsafe fn locale(&self) -> Id { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn localizedStringFromDateComponents( + &self, + dateComponents: &NSDateComponents, + ) -> Id { + msg_send_id![self, localizedStringFromDateComponents: dateComponents] + } + pub unsafe fn localizedStringFromTimeInterval( + &self, + timeInterval: NSTimeInterval, + ) -> Id { + msg_send_id![self, localizedStringFromTimeInterval: timeInterval] + } + pub unsafe fn localizedStringForDate_relativeToDate( + &self, + date: &NSDate, + referenceDate: &NSDate, + ) -> Id { + msg_send_id![ + self, + localizedStringForDate: date, + relativeToDate: referenceDate + ] + } + pub unsafe fn stringForObjectValue( + &self, + obj: Option<&Object>, + ) -> Option> { + msg_send_id![self, stringForObjectValue: obj] + } } - pub unsafe fn setDateTimeStyle(&self, dateTimeStyle: NSRelativeDateTimeFormatterStyle) { - msg_send![self, setDateTimeStyle: dateTimeStyle] - } - pub unsafe fn unitsStyle(&self) -> NSRelativeDateTimeFormatterUnitsStyle { - msg_send![self, unitsStyle] - } - pub unsafe fn setUnitsStyle(&self, unitsStyle: NSRelativeDateTimeFormatterUnitsStyle) { - msg_send![self, setUnitsStyle: unitsStyle] - } - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] - } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } - pub unsafe fn calendar(&self) -> Id { - msg_send_id![self, calendar] - } - pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { - msg_send![self, setCalendar: calendar] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn localizedStringFromDateComponents( - &self, - dateComponents: &NSDateComponents, - ) -> Id { - msg_send_id![self, localizedStringFromDateComponents: dateComponents] - } - pub unsafe fn localizedStringFromTimeInterval( - &self, - timeInterval: NSTimeInterval, - ) -> Id { - msg_send_id![self, localizedStringFromTimeInterval: timeInterval] - } - pub unsafe fn localizedStringForDate_relativeToDate( - &self, - date: &NSDate, - referenceDate: &NSDate, - ) -> Id { - msg_send_id![ - self, - localizedStringForDate: date, - relativeToDate: referenceDate - ] - } - pub unsafe fn stringForObjectValue( - &self, - obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index dce7d194a..1dffd8a1a 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSRunLoop; @@ -16,138 +16,154 @@ extern_class!( type Super = NSObject; } ); -impl NSRunLoop { - pub unsafe fn currentRunLoop() -> Id { - msg_send_id![Self::class(), currentRunLoop] +extern_methods!( + unsafe impl NSRunLoop { + pub unsafe fn currentRunLoop() -> Id { + msg_send_id![Self::class(), currentRunLoop] + } + pub unsafe fn mainRunLoop() -> Id { + msg_send_id![Self::class(), mainRunLoop] + } + pub unsafe fn currentMode(&self) -> Option> { + msg_send_id![self, currentMode] + } + pub unsafe fn getCFRunLoop(&self) -> CFRunLoopRef { + msg_send![self, getCFRunLoop] + } + pub unsafe fn addTimer_forMode(&self, timer: &NSTimer, mode: &NSRunLoopMode) { + msg_send![self, addTimer: timer, forMode: mode] + } + pub unsafe fn addPort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode) { + msg_send![self, addPort: aPort, forMode: mode] + } + pub unsafe fn removePort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode) { + msg_send![self, removePort: aPort, forMode: mode] + } + pub unsafe fn limitDateForMode(&self, mode: &NSRunLoopMode) -> Option> { + msg_send_id![self, limitDateForMode: mode] + } + pub unsafe fn acceptInputForMode_beforeDate( + &self, + mode: &NSRunLoopMode, + limitDate: &NSDate, + ) { + msg_send![self, acceptInputForMode: mode, beforeDate: limitDate] + } } - pub unsafe fn mainRunLoop() -> Id { - msg_send_id![Self::class(), mainRunLoop] - } - pub unsafe fn currentMode(&self) -> Option> { - msg_send_id![self, currentMode] - } - pub unsafe fn getCFRunLoop(&self) -> CFRunLoopRef { - msg_send![self, getCFRunLoop] - } - pub unsafe fn addTimer_forMode(&self, timer: &NSTimer, mode: &NSRunLoopMode) { - msg_send![self, addTimer: timer, forMode: mode] - } - pub unsafe fn addPort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode) { - msg_send![self, addPort: aPort, forMode: mode] - } - pub unsafe fn removePort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode) { - msg_send![self, removePort: aPort, forMode: mode] - } - pub unsafe fn limitDateForMode(&self, mode: &NSRunLoopMode) -> Option> { - msg_send_id![self, limitDateForMode: mode] - } - pub unsafe fn acceptInputForMode_beforeDate(&self, mode: &NSRunLoopMode, limitDate: &NSDate) { - msg_send![self, acceptInputForMode: mode, beforeDate: limitDate] - } -} -#[doc = "NSRunLoopConveniences"] -impl NSRunLoop { - pub unsafe fn run(&self) { - msg_send![self, run] - } - pub unsafe fn runUntilDate(&self, limitDate: &NSDate) { - msg_send![self, runUntilDate: limitDate] - } - pub unsafe fn runMode_beforeDate(&self, mode: &NSRunLoopMode, limitDate: &NSDate) -> bool { - msg_send![self, runMode: mode, beforeDate: limitDate] - } - pub unsafe fn configureAsServer(&self) { - msg_send![self, configureAsServer] - } - pub unsafe fn performInModes_block(&self, modes: &NSArray, block: TodoBlock) { - msg_send![self, performInModes: modes, block: block] - } - pub unsafe fn performBlock(&self, block: TodoBlock) { - msg_send![self, performBlock: block] - } -} -#[doc = "NSDelayedPerforming"] -impl NSObject { - pub unsafe fn performSelector_withObject_afterDelay_inModes( - &self, - aSelector: Sel, - anArgument: Option<&Object>, - delay: NSTimeInterval, - modes: &NSArray, - ) { - msg_send![ - self, - performSelector: aSelector, - withObject: anArgument, - afterDelay: delay, - inModes: modes - ] - } - pub unsafe fn performSelector_withObject_afterDelay( - &self, - aSelector: Sel, - anArgument: Option<&Object>, - delay: NSTimeInterval, - ) { - msg_send![ - self, - performSelector: aSelector, - withObject: anArgument, - afterDelay: delay - ] - } - pub unsafe fn cancelPreviousPerformRequestsWithTarget_selector_object( - aTarget: &Object, - aSelector: Sel, - anArgument: Option<&Object>, - ) { - msg_send![ - Self::class(), - cancelPreviousPerformRequestsWithTarget: aTarget, - selector: aSelector, - object: anArgument - ] - } - pub unsafe fn cancelPreviousPerformRequestsWithTarget(aTarget: &Object) { - msg_send![ - Self::class(), - cancelPreviousPerformRequestsWithTarget: aTarget - ] - } -} -#[doc = "NSOrderedPerform"] -impl NSRunLoop { - pub unsafe fn performSelector_target_argument_order_modes( - &self, - aSelector: Sel, - target: &Object, - arg: Option<&Object>, - order: NSUInteger, - modes: &NSArray, - ) { - msg_send![ - self, - performSelector: aSelector, - target: target, - argument: arg, - order: order, - modes: modes - ] +); +extern_methods!( + #[doc = "NSRunLoopConveniences"] + unsafe impl NSRunLoop { + pub unsafe fn run(&self) { + msg_send![self, run] + } + pub unsafe fn runUntilDate(&self, limitDate: &NSDate) { + msg_send![self, runUntilDate: limitDate] + } + pub unsafe fn runMode_beforeDate(&self, mode: &NSRunLoopMode, limitDate: &NSDate) -> bool { + msg_send![self, runMode: mode, beforeDate: limitDate] + } + pub unsafe fn configureAsServer(&self) { + msg_send![self, configureAsServer] + } + pub unsafe fn performInModes_block( + &self, + modes: &NSArray, + block: TodoBlock, + ) { + msg_send![self, performInModes: modes, block: block] + } + pub unsafe fn performBlock(&self, block: TodoBlock) { + msg_send![self, performBlock: block] + } } - pub unsafe fn cancelPerformSelector_target_argument( - &self, - aSelector: Sel, - target: &Object, - arg: Option<&Object>, - ) { - msg_send![ - self, - cancelPerformSelector: aSelector, - target: target, - argument: arg - ] +); +extern_methods!( + #[doc = "NSDelayedPerforming"] + unsafe impl NSObject { + pub unsafe fn performSelector_withObject_afterDelay_inModes( + &self, + aSelector: Sel, + anArgument: Option<&Object>, + delay: NSTimeInterval, + modes: &NSArray, + ) { + msg_send![ + self, + performSelector: aSelector, + withObject: anArgument, + afterDelay: delay, + inModes: modes + ] + } + pub unsafe fn performSelector_withObject_afterDelay( + &self, + aSelector: Sel, + anArgument: Option<&Object>, + delay: NSTimeInterval, + ) { + msg_send![ + self, + performSelector: aSelector, + withObject: anArgument, + afterDelay: delay + ] + } + pub unsafe fn cancelPreviousPerformRequestsWithTarget_selector_object( + aTarget: &Object, + aSelector: Sel, + anArgument: Option<&Object>, + ) { + msg_send![ + Self::class(), + cancelPreviousPerformRequestsWithTarget: aTarget, + selector: aSelector, + object: anArgument + ] + } + pub unsafe fn cancelPreviousPerformRequestsWithTarget(aTarget: &Object) { + msg_send![ + Self::class(), + cancelPreviousPerformRequestsWithTarget: aTarget + ] + } } - pub unsafe fn cancelPerformSelectorsWithTarget(&self, target: &Object) { - msg_send![self, cancelPerformSelectorsWithTarget: target] +); +extern_methods!( + #[doc = "NSOrderedPerform"] + unsafe impl NSRunLoop { + pub unsafe fn performSelector_target_argument_order_modes( + &self, + aSelector: Sel, + target: &Object, + arg: Option<&Object>, + order: NSUInteger, + modes: &NSArray, + ) { + msg_send![ + self, + performSelector: aSelector, + target: target, + argument: arg, + order: order, + modes: modes + ] + } + pub unsafe fn cancelPerformSelector_target_argument( + &self, + aSelector: Sel, + target: &Object, + arg: Option<&Object>, + ) { + msg_send![ + self, + cancelPerformSelector: aSelector, + target: target, + argument: arg + ] + } + pub unsafe fn cancelPerformSelectorsWithTarget(&self, target: &Object) { + msg_send![self, cancelPerformSelectorsWithTarget: target] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 007eb193c..3e1f0e1c1 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScanner; @@ -13,105 +13,112 @@ extern_class!( type Super = NSObject; } ); -impl NSScanner { - pub unsafe fn string(&self) -> Id { - msg_send_id![self, string] +extern_methods!( + unsafe impl NSScanner { + pub unsafe fn string(&self) -> Id { + msg_send_id![self, string] + } + pub unsafe fn scanLocation(&self) -> NSUInteger { + msg_send![self, scanLocation] + } + pub unsafe fn setScanLocation(&self, scanLocation: NSUInteger) { + msg_send![self, setScanLocation: scanLocation] + } + pub unsafe fn charactersToBeSkipped(&self) -> Option> { + msg_send_id![self, charactersToBeSkipped] + } + pub unsafe fn setCharactersToBeSkipped( + &self, + charactersToBeSkipped: Option<&NSCharacterSet>, + ) { + msg_send![self, setCharactersToBeSkipped: charactersToBeSkipped] + } + pub unsafe fn caseSensitive(&self) -> bool { + msg_send![self, caseSensitive] + } + pub unsafe fn setCaseSensitive(&self, caseSensitive: bool) { + msg_send![self, setCaseSensitive: caseSensitive] + } + pub unsafe fn locale(&self) -> Option> { + msg_send_id![self, locale] + } + pub unsafe fn setLocale(&self, locale: Option<&Object>) { + msg_send![self, setLocale: locale] + } + pub unsafe fn initWithString(&self, string: &NSString) -> Id { + msg_send_id![self, initWithString: string] + } } - pub unsafe fn scanLocation(&self) -> NSUInteger { - msg_send![self, scanLocation] - } - pub unsafe fn setScanLocation(&self, scanLocation: NSUInteger) { - msg_send![self, setScanLocation: scanLocation] - } - pub unsafe fn charactersToBeSkipped(&self) -> Option> { - msg_send_id![self, charactersToBeSkipped] - } - pub unsafe fn setCharactersToBeSkipped(&self, charactersToBeSkipped: Option<&NSCharacterSet>) { - msg_send![self, setCharactersToBeSkipped: charactersToBeSkipped] - } - pub unsafe fn caseSensitive(&self) -> bool { - msg_send![self, caseSensitive] - } - pub unsafe fn setCaseSensitive(&self, caseSensitive: bool) { - msg_send![self, setCaseSensitive: caseSensitive] - } - pub unsafe fn locale(&self) -> Option> { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&Object>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn initWithString(&self, string: &NSString) -> Id { - msg_send_id![self, initWithString: string] - } -} -#[doc = "NSExtendedScanner"] -impl NSScanner { - pub unsafe fn scanInt(&self, result: *mut c_int) -> bool { - msg_send![self, scanInt: result] - } - pub unsafe fn scanInteger(&self, result: *mut NSInteger) -> bool { - msg_send![self, scanInteger: result] - } - pub unsafe fn scanLongLong(&self, result: *mut c_longlong) -> bool { - msg_send![self, scanLongLong: result] - } - pub unsafe fn scanUnsignedLongLong(&self, result: *mut c_ulonglong) -> bool { - msg_send![self, scanUnsignedLongLong: result] - } - pub unsafe fn scanFloat(&self, result: *mut c_float) -> bool { - msg_send![self, scanFloat: result] - } - pub unsafe fn scanDouble(&self, result: *mut c_double) -> bool { - msg_send![self, scanDouble: result] - } - pub unsafe fn scanHexInt(&self, result: *mut c_uint) -> bool { - msg_send![self, scanHexInt: result] - } - pub unsafe fn scanHexLongLong(&self, result: *mut c_ulonglong) -> bool { - msg_send![self, scanHexLongLong: result] - } - pub unsafe fn scanHexFloat(&self, result: *mut c_float) -> bool { - msg_send![self, scanHexFloat: result] - } - pub unsafe fn scanHexDouble(&self, result: *mut c_double) -> bool { - msg_send![self, scanHexDouble: result] - } - pub unsafe fn scanString_intoString( - &self, - string: &NSString, - result: Option<&mut Option>>, - ) -> bool { - msg_send![self, scanString: string, intoString: result] - } - pub unsafe fn scanCharactersFromSet_intoString( - &self, - set: &NSCharacterSet, - result: Option<&mut Option>>, - ) -> bool { - msg_send![self, scanCharactersFromSet: set, intoString: result] - } - pub unsafe fn scanUpToString_intoString( - &self, - string: &NSString, - result: Option<&mut Option>>, - ) -> bool { - msg_send![self, scanUpToString: string, intoString: result] - } - pub unsafe fn scanUpToCharactersFromSet_intoString( - &self, - set: &NSCharacterSet, - result: Option<&mut Option>>, - ) -> bool { - msg_send![self, scanUpToCharactersFromSet: set, intoString: result] - } - pub unsafe fn isAtEnd(&self) -> bool { - msg_send![self, isAtEnd] - } - pub unsafe fn scannerWithString(string: &NSString) -> Id { - msg_send_id![Self::class(), scannerWithString: string] - } - pub unsafe fn localizedScannerWithString(string: &NSString) -> Id { - msg_send_id![Self::class(), localizedScannerWithString: string] +); +extern_methods!( + #[doc = "NSExtendedScanner"] + unsafe impl NSScanner { + pub unsafe fn scanInt(&self, result: *mut c_int) -> bool { + msg_send![self, scanInt: result] + } + pub unsafe fn scanInteger(&self, result: *mut NSInteger) -> bool { + msg_send![self, scanInteger: result] + } + pub unsafe fn scanLongLong(&self, result: *mut c_longlong) -> bool { + msg_send![self, scanLongLong: result] + } + pub unsafe fn scanUnsignedLongLong(&self, result: *mut c_ulonglong) -> bool { + msg_send![self, scanUnsignedLongLong: result] + } + pub unsafe fn scanFloat(&self, result: *mut c_float) -> bool { + msg_send![self, scanFloat: result] + } + pub unsafe fn scanDouble(&self, result: *mut c_double) -> bool { + msg_send![self, scanDouble: result] + } + pub unsafe fn scanHexInt(&self, result: *mut c_uint) -> bool { + msg_send![self, scanHexInt: result] + } + pub unsafe fn scanHexLongLong(&self, result: *mut c_ulonglong) -> bool { + msg_send![self, scanHexLongLong: result] + } + pub unsafe fn scanHexFloat(&self, result: *mut c_float) -> bool { + msg_send![self, scanHexFloat: result] + } + pub unsafe fn scanHexDouble(&self, result: *mut c_double) -> bool { + msg_send![self, scanHexDouble: result] + } + pub unsafe fn scanString_intoString( + &self, + string: &NSString, + result: Option<&mut Option>>, + ) -> bool { + msg_send![self, scanString: string, intoString: result] + } + pub unsafe fn scanCharactersFromSet_intoString( + &self, + set: &NSCharacterSet, + result: Option<&mut Option>>, + ) -> bool { + msg_send![self, scanCharactersFromSet: set, intoString: result] + } + pub unsafe fn scanUpToString_intoString( + &self, + string: &NSString, + result: Option<&mut Option>>, + ) -> bool { + msg_send![self, scanUpToString: string, intoString: result] + } + pub unsafe fn scanUpToCharactersFromSet_intoString( + &self, + set: &NSCharacterSet, + result: Option<&mut Option>>, + ) -> bool { + msg_send![self, scanUpToCharactersFromSet: set, intoString: result] + } + pub unsafe fn isAtEnd(&self) -> bool { + msg_send![self, isAtEnd] + } + pub unsafe fn scannerWithString(string: &NSString) -> Id { + msg_send_id![Self::class(), scannerWithString: string] + } + pub unsafe fn localizedScannerWithString(string: &NSString) -> Id { + msg_send_id![Self::class(), localizedScannerWithString: string] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index 47407a3cf..412568078 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSClassDescription::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptClassDescription; @@ -11,107 +11,116 @@ extern_class!( type Super = NSClassDescription; } ); -impl NSScriptClassDescription { - pub unsafe fn classDescriptionForClass( - aClass: &Class, - ) -> Option> { - msg_send_id![Self::class(), classDescriptionForClass: aClass] +extern_methods!( + unsafe impl NSScriptClassDescription { + pub unsafe fn classDescriptionForClass( + aClass: &Class, + ) -> Option> { + msg_send_id![Self::class(), classDescriptionForClass: aClass] + } + pub unsafe fn initWithSuiteName_className_dictionary( + &self, + suiteName: &NSString, + className: &NSString, + classDeclaration: Option<&NSDictionary>, + ) -> Option> { + msg_send_id![ + self, + initWithSuiteName: suiteName, + className: className, + dictionary: classDeclaration + ] + } + pub unsafe fn suiteName(&self) -> Option> { + msg_send_id![self, suiteName] + } + pub unsafe fn className(&self) -> Option> { + msg_send_id![self, className] + } + pub unsafe fn implementationClassName(&self) -> Option> { + msg_send_id![self, implementationClassName] + } + pub unsafe fn superclassDescription(&self) -> Option> { + msg_send_id![self, superclassDescription] + } + pub unsafe fn appleEventCode(&self) -> FourCharCode { + msg_send![self, appleEventCode] + } + pub unsafe fn matchesAppleEventCode(&self, appleEventCode: FourCharCode) -> bool { + msg_send![self, matchesAppleEventCode: appleEventCode] + } + pub unsafe fn supportsCommand( + &self, + commandDescription: &NSScriptCommandDescription, + ) -> bool { + msg_send![self, supportsCommand: commandDescription] + } + pub unsafe fn selectorForCommand( + &self, + commandDescription: &NSScriptCommandDescription, + ) -> Option { + msg_send![self, selectorForCommand: commandDescription] + } + pub unsafe fn typeForKey(&self, key: &NSString) -> Option> { + msg_send_id![self, typeForKey: key] + } + pub unsafe fn classDescriptionForKey( + &self, + key: &NSString, + ) -> Option> { + msg_send_id![self, classDescriptionForKey: key] + } + pub unsafe fn appleEventCodeForKey(&self, key: &NSString) -> FourCharCode { + msg_send![self, appleEventCodeForKey: key] + } + pub unsafe fn keyWithAppleEventCode( + &self, + appleEventCode: FourCharCode, + ) -> Option> { + msg_send_id![self, keyWithAppleEventCode: appleEventCode] + } + pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option> { + msg_send_id![self, defaultSubcontainerAttributeKey] + } + pub unsafe fn isLocationRequiredToCreateForKey( + &self, + toManyRelationshipKey: &NSString, + ) -> bool { + msg_send![ + self, + isLocationRequiredToCreateForKey: toManyRelationshipKey + ] + } + pub unsafe fn hasPropertyForKey(&self, key: &NSString) -> bool { + msg_send![self, hasPropertyForKey: key] + } + pub unsafe fn hasOrderedToManyRelationshipForKey(&self, key: &NSString) -> bool { + msg_send![self, hasOrderedToManyRelationshipForKey: key] + } + pub unsafe fn hasReadablePropertyForKey(&self, key: &NSString) -> bool { + msg_send![self, hasReadablePropertyForKey: key] + } + pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool { + msg_send![self, hasWritablePropertyForKey: key] + } } - pub unsafe fn initWithSuiteName_className_dictionary( - &self, - suiteName: &NSString, - className: &NSString, - classDeclaration: Option<&NSDictionary>, - ) -> Option> { - msg_send_id![ - self, - initWithSuiteName: suiteName, - className: className, - dictionary: classDeclaration - ] - } - pub unsafe fn suiteName(&self) -> Option> { - msg_send_id![self, suiteName] - } - pub unsafe fn className(&self) -> Option> { - msg_send_id![self, className] - } - pub unsafe fn implementationClassName(&self) -> Option> { - msg_send_id![self, implementationClassName] - } - pub unsafe fn superclassDescription(&self) -> Option> { - msg_send_id![self, superclassDescription] - } - pub unsafe fn appleEventCode(&self) -> FourCharCode { - msg_send![self, appleEventCode] - } - pub unsafe fn matchesAppleEventCode(&self, appleEventCode: FourCharCode) -> bool { - msg_send![self, matchesAppleEventCode: appleEventCode] - } - pub unsafe fn supportsCommand(&self, commandDescription: &NSScriptCommandDescription) -> bool { - msg_send![self, supportsCommand: commandDescription] - } - pub unsafe fn selectorForCommand( - &self, - commandDescription: &NSScriptCommandDescription, - ) -> Option { - msg_send![self, selectorForCommand: commandDescription] - } - pub unsafe fn typeForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, typeForKey: key] - } - pub unsafe fn classDescriptionForKey( - &self, - key: &NSString, - ) -> Option> { - msg_send_id![self, classDescriptionForKey: key] - } - pub unsafe fn appleEventCodeForKey(&self, key: &NSString) -> FourCharCode { - msg_send![self, appleEventCodeForKey: key] - } - pub unsafe fn keyWithAppleEventCode( - &self, - appleEventCode: FourCharCode, - ) -> Option> { - msg_send_id![self, keyWithAppleEventCode: appleEventCode] - } - pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option> { - msg_send_id![self, defaultSubcontainerAttributeKey] - } - pub unsafe fn isLocationRequiredToCreateForKey( - &self, - toManyRelationshipKey: &NSString, - ) -> bool { - msg_send![ - self, - isLocationRequiredToCreateForKey: toManyRelationshipKey - ] - } - pub unsafe fn hasPropertyForKey(&self, key: &NSString) -> bool { - msg_send![self, hasPropertyForKey: key] - } - pub unsafe fn hasOrderedToManyRelationshipForKey(&self, key: &NSString) -> bool { - msg_send![self, hasOrderedToManyRelationshipForKey: key] - } - pub unsafe fn hasReadablePropertyForKey(&self, key: &NSString) -> bool { - msg_send![self, hasReadablePropertyForKey: key] - } - pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool { - msg_send![self, hasWritablePropertyForKey: key] - } -} -#[doc = "NSDeprecated"] -impl NSScriptClassDescription { - pub unsafe fn isReadOnlyKey(&self, key: &NSString) -> bool { - msg_send![self, isReadOnlyKey: key] - } -} -#[doc = "NSScriptClassDescription"] -impl NSObject { - pub unsafe fn classCode(&self) -> FourCharCode { - msg_send![self, classCode] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSScriptClassDescription { + pub unsafe fn isReadOnlyKey(&self, key: &NSString) -> bool { + msg_send![self, isReadOnlyKey: key] + } } - pub unsafe fn className(&self) -> Id { - msg_send_id![self, className] +); +extern_methods!( + #[doc = "NSScriptClassDescription"] + unsafe impl NSObject { + pub unsafe fn classCode(&self) -> FourCharCode { + msg_send![self, classCode] + } + pub unsafe fn className(&self) -> Id { + msg_send_id![self, className] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs index b897eb5fd..09ae0e227 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptCoercionHandler; @@ -10,30 +10,32 @@ extern_class!( type Super = NSObject; } ); -impl NSScriptCoercionHandler { - pub unsafe fn sharedCoercionHandler() -> Id { - msg_send_id![Self::class(), sharedCoercionHandler] +extern_methods!( + unsafe impl NSScriptCoercionHandler { + pub unsafe fn sharedCoercionHandler() -> Id { + msg_send_id![Self::class(), sharedCoercionHandler] + } + pub unsafe fn coerceValue_toClass( + &self, + value: &Object, + toClass: &Class, + ) -> Option> { + msg_send_id![self, coerceValue: value, toClass: toClass] + } + pub unsafe fn registerCoercer_selector_toConvertFromClass_toClass( + &self, + coercer: &Object, + selector: Sel, + fromClass: &Class, + toClass: &Class, + ) { + msg_send![ + self, + registerCoercer: coercer, + selector: selector, + toConvertFromClass: fromClass, + toClass: toClass + ] + } } - pub unsafe fn coerceValue_toClass( - &self, - value: &Object, - toClass: &Class, - ) -> Option> { - msg_send_id![self, coerceValue: value, toClass: toClass] - } - pub unsafe fn registerCoercer_selector_toConvertFromClass_toClass( - &self, - coercer: &Object, - selector: Sel, - fromClass: &Class, - toClass: &Class, - ) { - msg_send![ - self, - registerCoercer: coercer, - selector: selector, - toConvertFromClass: fromClass, - toClass: toClass - ] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 41dcf5138..56dc4faa9 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptCommand; @@ -16,105 +16,109 @@ extern_class!( type Super = NSObject; } ); -impl NSScriptCommand { - pub unsafe fn initWithCommandDescription( - &self, - commandDef: &NSScriptCommandDescription, - ) -> Id { - msg_send_id![self, initWithCommandDescription: commandDef] +extern_methods!( + unsafe impl NSScriptCommand { + pub unsafe fn initWithCommandDescription( + &self, + commandDef: &NSScriptCommandDescription, + ) -> Id { + msg_send_id![self, initWithCommandDescription: commandDef] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn commandDescription(&self) -> Id { + msg_send_id![self, commandDescription] + } + pub unsafe fn directParameter(&self) -> Option> { + msg_send_id![self, directParameter] + } + pub unsafe fn setDirectParameter(&self, directParameter: Option<&Object>) { + msg_send![self, setDirectParameter: directParameter] + } + pub unsafe fn receiversSpecifier(&self) -> Option> { + msg_send_id![self, receiversSpecifier] + } + pub unsafe fn setReceiversSpecifier( + &self, + receiversSpecifier: Option<&NSScriptObjectSpecifier>, + ) { + msg_send![self, setReceiversSpecifier: receiversSpecifier] + } + pub unsafe fn evaluatedReceivers(&self) -> Option> { + msg_send_id![self, evaluatedReceivers] + } + pub unsafe fn arguments(&self) -> Option, Shared>> { + msg_send_id![self, arguments] + } + pub unsafe fn setArguments(&self, arguments: Option<&NSDictionary>) { + msg_send![self, setArguments: arguments] + } + pub unsafe fn evaluatedArguments( + &self, + ) -> Option, Shared>> { + msg_send_id![self, evaluatedArguments] + } + pub unsafe fn isWellFormed(&self) -> bool { + msg_send![self, isWellFormed] + } + pub unsafe fn performDefaultImplementation(&self) -> Option> { + msg_send_id![self, performDefaultImplementation] + } + pub unsafe fn executeCommand(&self) -> Option> { + msg_send_id![self, executeCommand] + } + pub unsafe fn scriptErrorNumber(&self) -> NSInteger { + msg_send![self, scriptErrorNumber] + } + pub unsafe fn setScriptErrorNumber(&self, scriptErrorNumber: NSInteger) { + msg_send![self, setScriptErrorNumber: scriptErrorNumber] + } + pub unsafe fn scriptErrorOffendingObjectDescriptor( + &self, + ) -> Option> { + msg_send_id![self, scriptErrorOffendingObjectDescriptor] + } + pub unsafe fn setScriptErrorOffendingObjectDescriptor( + &self, + scriptErrorOffendingObjectDescriptor: Option<&NSAppleEventDescriptor>, + ) { + msg_send![ + self, + setScriptErrorOffendingObjectDescriptor: scriptErrorOffendingObjectDescriptor + ] + } + pub unsafe fn scriptErrorExpectedTypeDescriptor( + &self, + ) -> Option> { + msg_send_id![self, scriptErrorExpectedTypeDescriptor] + } + pub unsafe fn setScriptErrorExpectedTypeDescriptor( + &self, + scriptErrorExpectedTypeDescriptor: Option<&NSAppleEventDescriptor>, + ) { + msg_send![ + self, + setScriptErrorExpectedTypeDescriptor: scriptErrorExpectedTypeDescriptor + ] + } + pub unsafe fn scriptErrorString(&self) -> Option> { + msg_send_id![self, scriptErrorString] + } + pub unsafe fn setScriptErrorString(&self, scriptErrorString: Option<&NSString>) { + msg_send![self, setScriptErrorString: scriptErrorString] + } + pub unsafe fn currentCommand() -> Option> { + msg_send_id![Self::class(), currentCommand] + } + pub unsafe fn appleEvent(&self) -> Option> { + msg_send_id![self, appleEvent] + } + pub unsafe fn suspendExecution(&self) { + msg_send![self, suspendExecution] + } + pub unsafe fn resumeExecutionWithResult(&self, result: Option<&Object>) { + msg_send![self, resumeExecutionWithResult: result] + } } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn commandDescription(&self) -> Id { - msg_send_id![self, commandDescription] - } - pub unsafe fn directParameter(&self) -> Option> { - msg_send_id![self, directParameter] - } - pub unsafe fn setDirectParameter(&self, directParameter: Option<&Object>) { - msg_send![self, setDirectParameter: directParameter] - } - pub unsafe fn receiversSpecifier(&self) -> Option> { - msg_send_id![self, receiversSpecifier] - } - pub unsafe fn setReceiversSpecifier( - &self, - receiversSpecifier: Option<&NSScriptObjectSpecifier>, - ) { - msg_send![self, setReceiversSpecifier: receiversSpecifier] - } - pub unsafe fn evaluatedReceivers(&self) -> Option> { - msg_send_id![self, evaluatedReceivers] - } - pub unsafe fn arguments(&self) -> Option, Shared>> { - msg_send_id![self, arguments] - } - pub unsafe fn setArguments(&self, arguments: Option<&NSDictionary>) { - msg_send![self, setArguments: arguments] - } - pub unsafe fn evaluatedArguments(&self) -> Option, Shared>> { - msg_send_id![self, evaluatedArguments] - } - pub unsafe fn isWellFormed(&self) -> bool { - msg_send![self, isWellFormed] - } - pub unsafe fn performDefaultImplementation(&self) -> Option> { - msg_send_id![self, performDefaultImplementation] - } - pub unsafe fn executeCommand(&self) -> Option> { - msg_send_id![self, executeCommand] - } - pub unsafe fn scriptErrorNumber(&self) -> NSInteger { - msg_send![self, scriptErrorNumber] - } - pub unsafe fn setScriptErrorNumber(&self, scriptErrorNumber: NSInteger) { - msg_send![self, setScriptErrorNumber: scriptErrorNumber] - } - pub unsafe fn scriptErrorOffendingObjectDescriptor( - &self, - ) -> Option> { - msg_send_id![self, scriptErrorOffendingObjectDescriptor] - } - pub unsafe fn setScriptErrorOffendingObjectDescriptor( - &self, - scriptErrorOffendingObjectDescriptor: Option<&NSAppleEventDescriptor>, - ) { - msg_send![ - self, - setScriptErrorOffendingObjectDescriptor: scriptErrorOffendingObjectDescriptor - ] - } - pub unsafe fn scriptErrorExpectedTypeDescriptor( - &self, - ) -> Option> { - msg_send_id![self, scriptErrorExpectedTypeDescriptor] - } - pub unsafe fn setScriptErrorExpectedTypeDescriptor( - &self, - scriptErrorExpectedTypeDescriptor: Option<&NSAppleEventDescriptor>, - ) { - msg_send![ - self, - setScriptErrorExpectedTypeDescriptor: scriptErrorExpectedTypeDescriptor - ] - } - pub unsafe fn scriptErrorString(&self) -> Option> { - msg_send_id![self, scriptErrorString] - } - pub unsafe fn setScriptErrorString(&self, scriptErrorString: Option<&NSString>) { - msg_send![self, setScriptErrorString: scriptErrorString] - } - pub unsafe fn currentCommand() -> Option> { - msg_send_id![Self::class(), currentCommand] - } - pub unsafe fn appleEvent(&self) -> Option> { - msg_send_id![self, appleEvent] - } - pub unsafe fn suspendExecution(&self) { - msg_send![self, suspendExecution] - } - pub unsafe fn resumeExecutionWithResult(&self, result: Option<&Object>) { - msg_send![self, resumeExecutionWithResult: result] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index 53b2a89fe..19b124953 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptCommandDescription; @@ -14,72 +14,74 @@ extern_class!( type Super = NSObject; } ); -impl NSScriptCommandDescription { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] +extern_methods!( + unsafe impl NSScriptCommandDescription { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithSuiteName_commandName_dictionary( + &self, + suiteName: &NSString, + commandName: &NSString, + commandDeclaration: Option<&NSDictionary>, + ) -> Option> { + msg_send_id![ + self, + initWithSuiteName: suiteName, + commandName: commandName, + dictionary: commandDeclaration + ] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn suiteName(&self) -> Id { + msg_send_id![self, suiteName] + } + pub unsafe fn commandName(&self) -> Id { + msg_send_id![self, commandName] + } + pub unsafe fn appleEventClassCode(&self) -> FourCharCode { + msg_send![self, appleEventClassCode] + } + pub unsafe fn appleEventCode(&self) -> FourCharCode { + msg_send![self, appleEventCode] + } + pub unsafe fn commandClassName(&self) -> Id { + msg_send_id![self, commandClassName] + } + pub unsafe fn returnType(&self) -> Option> { + msg_send_id![self, returnType] + } + pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode { + msg_send![self, appleEventCodeForReturnType] + } + pub unsafe fn argumentNames(&self) -> Id, Shared> { + msg_send_id![self, argumentNames] + } + pub unsafe fn typeForArgumentWithName( + &self, + argumentName: &NSString, + ) -> Option> { + msg_send_id![self, typeForArgumentWithName: argumentName] + } + pub unsafe fn appleEventCodeForArgumentWithName( + &self, + argumentName: &NSString, + ) -> FourCharCode { + msg_send![self, appleEventCodeForArgumentWithName: argumentName] + } + pub unsafe fn isOptionalArgumentWithName(&self, argumentName: &NSString) -> bool { + msg_send![self, isOptionalArgumentWithName: argumentName] + } + pub unsafe fn createCommandInstance(&self) -> Id { + msg_send_id![self, createCommandInstance] + } + pub unsafe fn createCommandInstanceWithZone( + &self, + zone: *mut NSZone, + ) -> Id { + msg_send_id![self, createCommandInstanceWithZone: zone] + } } - pub unsafe fn initWithSuiteName_commandName_dictionary( - &self, - suiteName: &NSString, - commandName: &NSString, - commandDeclaration: Option<&NSDictionary>, - ) -> Option> { - msg_send_id![ - self, - initWithSuiteName: suiteName, - commandName: commandName, - dictionary: commandDeclaration - ] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn suiteName(&self) -> Id { - msg_send_id![self, suiteName] - } - pub unsafe fn commandName(&self) -> Id { - msg_send_id![self, commandName] - } - pub unsafe fn appleEventClassCode(&self) -> FourCharCode { - msg_send![self, appleEventClassCode] - } - pub unsafe fn appleEventCode(&self) -> FourCharCode { - msg_send![self, appleEventCode] - } - pub unsafe fn commandClassName(&self) -> Id { - msg_send_id![self, commandClassName] - } - pub unsafe fn returnType(&self) -> Option> { - msg_send_id![self, returnType] - } - pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode { - msg_send![self, appleEventCodeForReturnType] - } - pub unsafe fn argumentNames(&self) -> Id, Shared> { - msg_send_id![self, argumentNames] - } - pub unsafe fn typeForArgumentWithName( - &self, - argumentName: &NSString, - ) -> Option> { - msg_send_id![self, typeForArgumentWithName: argumentName] - } - pub unsafe fn appleEventCodeForArgumentWithName( - &self, - argumentName: &NSString, - ) -> FourCharCode { - msg_send![self, appleEventCodeForArgumentWithName: argumentName] - } - pub unsafe fn isOptionalArgumentWithName(&self, argumentName: &NSString) -> bool { - msg_send![self, isOptionalArgumentWithName: argumentName] - } - pub unsafe fn createCommandInstance(&self) -> Id { - msg_send_id![self, createCommandInstance] - } - pub unsafe fn createCommandInstanceWithZone( - &self, - zone: *mut NSZone, - ) -> Id { - msg_send_id![self, createCommandInstanceWithZone: zone] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index befdb3388..2ecb01b1e 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptExecutionContext; @@ -11,26 +11,28 @@ extern_class!( type Super = NSObject; } ); -impl NSScriptExecutionContext { - pub unsafe fn sharedScriptExecutionContext() -> Id { - msg_send_id![Self::class(), sharedScriptExecutionContext] +extern_methods!( + unsafe impl NSScriptExecutionContext { + pub unsafe fn sharedScriptExecutionContext() -> Id { + msg_send_id![Self::class(), sharedScriptExecutionContext] + } + pub unsafe fn topLevelObject(&self) -> Option> { + msg_send_id![self, topLevelObject] + } + pub unsafe fn setTopLevelObject(&self, topLevelObject: Option<&Object>) { + msg_send![self, setTopLevelObject: topLevelObject] + } + pub unsafe fn objectBeingTested(&self) -> Option> { + msg_send_id![self, objectBeingTested] + } + pub unsafe fn setObjectBeingTested(&self, objectBeingTested: Option<&Object>) { + msg_send![self, setObjectBeingTested: objectBeingTested] + } + pub unsafe fn rangeContainerObject(&self) -> Option> { + msg_send_id![self, rangeContainerObject] + } + pub unsafe fn setRangeContainerObject(&self, rangeContainerObject: Option<&Object>) { + msg_send![self, setRangeContainerObject: rangeContainerObject] + } } - pub unsafe fn topLevelObject(&self) -> Option> { - msg_send_id![self, topLevelObject] - } - pub unsafe fn setTopLevelObject(&self, topLevelObject: Option<&Object>) { - msg_send![self, setTopLevelObject: topLevelObject] - } - pub unsafe fn objectBeingTested(&self) -> Option> { - msg_send_id![self, objectBeingTested] - } - pub unsafe fn setObjectBeingTested(&self, objectBeingTested: Option<&Object>) { - msg_send![self, setObjectBeingTested: objectBeingTested] - } - pub unsafe fn rangeContainerObject(&self) -> Option> { - msg_send_id![self, rangeContainerObject] - } - pub unsafe fn setRangeContainerObject(&self, rangeContainerObject: Option<&Object>) { - msg_send![self, setRangeContainerObject: rangeContainerObject] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index e4a7e1c12..10229bfea 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -3,67 +3,73 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; -#[doc = "NSScriptKeyValueCoding"] -impl NSObject { - pub unsafe fn valueAtIndex_inPropertyWithKey( - &self, - index: NSUInteger, - key: &NSString, - ) -> Option> { - msg_send_id![self, valueAtIndex: index, inPropertyWithKey: key] +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +extern_methods!( + #[doc = "NSScriptKeyValueCoding"] + unsafe impl NSObject { + pub unsafe fn valueAtIndex_inPropertyWithKey( + &self, + index: NSUInteger, + key: &NSString, + ) -> Option> { + msg_send_id![self, valueAtIndex: index, inPropertyWithKey: key] + } + pub unsafe fn valueWithName_inPropertyWithKey( + &self, + name: &NSString, + key: &NSString, + ) -> Option> { + msg_send_id![self, valueWithName: name, inPropertyWithKey: key] + } + pub unsafe fn valueWithUniqueID_inPropertyWithKey( + &self, + uniqueID: &Object, + key: &NSString, + ) -> Option> { + msg_send_id![self, valueWithUniqueID: uniqueID, inPropertyWithKey: key] + } + pub unsafe fn insertValue_atIndex_inPropertyWithKey( + &self, + value: &Object, + index: NSUInteger, + key: &NSString, + ) { + msg_send![ + self, + insertValue: value, + atIndex: index, + inPropertyWithKey: key + ] + } + pub unsafe fn removeValueAtIndex_fromPropertyWithKey( + &self, + index: NSUInteger, + key: &NSString, + ) { + msg_send![self, removeValueAtIndex: index, fromPropertyWithKey: key] + } + pub unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue( + &self, + index: NSUInteger, + key: &NSString, + value: &Object, + ) { + msg_send![ + self, + replaceValueAtIndex: index, + inPropertyWithKey: key, + withValue: value + ] + } + pub unsafe fn insertValue_inPropertyWithKey(&self, value: &Object, key: &NSString) { + msg_send![self, insertValue: value, inPropertyWithKey: key] + } + pub unsafe fn coerceValue_forKey( + &self, + value: Option<&Object>, + key: &NSString, + ) -> Option> { + msg_send_id![self, coerceValue: value, forKey: key] + } } - pub unsafe fn valueWithName_inPropertyWithKey( - &self, - name: &NSString, - key: &NSString, - ) -> Option> { - msg_send_id![self, valueWithName: name, inPropertyWithKey: key] - } - pub unsafe fn valueWithUniqueID_inPropertyWithKey( - &self, - uniqueID: &Object, - key: &NSString, - ) -> Option> { - msg_send_id![self, valueWithUniqueID: uniqueID, inPropertyWithKey: key] - } - pub unsafe fn insertValue_atIndex_inPropertyWithKey( - &self, - value: &Object, - index: NSUInteger, - key: &NSString, - ) { - msg_send![ - self, - insertValue: value, - atIndex: index, - inPropertyWithKey: key - ] - } - pub unsafe fn removeValueAtIndex_fromPropertyWithKey(&self, index: NSUInteger, key: &NSString) { - msg_send![self, removeValueAtIndex: index, fromPropertyWithKey: key] - } - pub unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue( - &self, - index: NSUInteger, - key: &NSString, - value: &Object, - ) { - msg_send![ - self, - replaceValueAtIndex: index, - inPropertyWithKey: key, - withValue: value - ] - } - pub unsafe fn insertValue_inPropertyWithKey(&self, value: &Object, key: &NSString) { - msg_send![self, insertValue: value, inPropertyWithKey: key] - } - pub unsafe fn coerceValue_forKey( - &self, - value: Option<&Object>, - key: &NSString, - ) -> Option> { - msg_send_id![self, coerceValue: value, forKey: key] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index 19f259071..96515f761 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptObjectSpecifier; @@ -16,134 +16,145 @@ extern_class!( type Super = NSObject; } ); -impl NSScriptObjectSpecifier { - pub unsafe fn objectSpecifierWithDescriptor( - descriptor: &NSAppleEventDescriptor, - ) -> Option> { - msg_send_id![Self::class(), objectSpecifierWithDescriptor: descriptor] +extern_methods!( + unsafe impl NSScriptObjectSpecifier { + pub unsafe fn objectSpecifierWithDescriptor( + descriptor: &NSAppleEventDescriptor, + ) -> Option> { + msg_send_id![Self::class(), objectSpecifierWithDescriptor: descriptor] + } + pub unsafe fn initWithContainerSpecifier_key( + &self, + container: &NSScriptObjectSpecifier, + property: &NSString, + ) -> Id { + msg_send_id![self, initWithContainerSpecifier: container, key: property] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property + ] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn childSpecifier(&self) -> Option> { + msg_send_id![self, childSpecifier] + } + pub unsafe fn setChildSpecifier(&self, childSpecifier: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setChildSpecifier: childSpecifier] + } + pub unsafe fn containerSpecifier(&self) -> Option> { + msg_send_id![self, containerSpecifier] + } + pub unsafe fn setContainerSpecifier( + &self, + containerSpecifier: Option<&NSScriptObjectSpecifier>, + ) { + msg_send![self, setContainerSpecifier: containerSpecifier] + } + pub unsafe fn containerIsObjectBeingTested(&self) -> bool { + msg_send![self, containerIsObjectBeingTested] + } + pub unsafe fn setContainerIsObjectBeingTested(&self, containerIsObjectBeingTested: bool) { + msg_send![ + self, + setContainerIsObjectBeingTested: containerIsObjectBeingTested + ] + } + pub unsafe fn containerIsRangeContainerObject(&self) -> bool { + msg_send![self, containerIsRangeContainerObject] + } + pub unsafe fn setContainerIsRangeContainerObject( + &self, + containerIsRangeContainerObject: bool, + ) { + msg_send![ + self, + setContainerIsRangeContainerObject: containerIsRangeContainerObject + ] + } + pub unsafe fn key(&self) -> Id { + msg_send_id![self, key] + } + pub unsafe fn setKey(&self, key: &NSString) { + msg_send![self, setKey: key] + } + pub unsafe fn containerClassDescription( + &self, + ) -> Option> { + msg_send_id![self, containerClassDescription] + } + pub unsafe fn setContainerClassDescription( + &self, + containerClassDescription: Option<&NSScriptClassDescription>, + ) { + msg_send![ + self, + setContainerClassDescription: containerClassDescription + ] + } + pub unsafe fn keyClassDescription(&self) -> Option> { + msg_send_id![self, keyClassDescription] + } + pub unsafe fn indicesOfObjectsByEvaluatingWithContainer_count( + &self, + container: &Object, + count: NonNull, + ) -> *mut NSInteger { + msg_send![ + self, + indicesOfObjectsByEvaluatingWithContainer: container, + count: count + ] + } + pub unsafe fn objectsByEvaluatingWithContainers( + &self, + containers: &Object, + ) -> Option> { + msg_send_id![self, objectsByEvaluatingWithContainers: containers] + } + pub unsafe fn objectsByEvaluatingSpecifier(&self) -> Option> { + msg_send_id![self, objectsByEvaluatingSpecifier] + } + pub unsafe fn evaluationErrorNumber(&self) -> NSInteger { + msg_send![self, evaluationErrorNumber] + } + pub unsafe fn setEvaluationErrorNumber(&self, evaluationErrorNumber: NSInteger) { + msg_send![self, setEvaluationErrorNumber: evaluationErrorNumber] + } + pub unsafe fn evaluationErrorSpecifier( + &self, + ) -> Option> { + msg_send_id![self, evaluationErrorSpecifier] + } + pub unsafe fn descriptor(&self) -> Option> { + msg_send_id![self, descriptor] + } } - pub unsafe fn initWithContainerSpecifier_key( - &self, - container: &NSScriptObjectSpecifier, - property: &NSString, - ) -> Id { - msg_send_id![self, initWithContainerSpecifier: container, key: property] - } - pub unsafe fn initWithContainerClassDescription_containerSpecifier_key( - &self, - classDesc: &NSScriptClassDescription, - container: Option<&NSScriptObjectSpecifier>, - property: &NSString, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property - ] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn childSpecifier(&self) -> Option> { - msg_send_id![self, childSpecifier] - } - pub unsafe fn setChildSpecifier(&self, childSpecifier: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setChildSpecifier: childSpecifier] - } - pub unsafe fn containerSpecifier(&self) -> Option> { - msg_send_id![self, containerSpecifier] - } - pub unsafe fn setContainerSpecifier( - &self, - containerSpecifier: Option<&NSScriptObjectSpecifier>, - ) { - msg_send![self, setContainerSpecifier: containerSpecifier] - } - pub unsafe fn containerIsObjectBeingTested(&self) -> bool { - msg_send![self, containerIsObjectBeingTested] - } - pub unsafe fn setContainerIsObjectBeingTested(&self, containerIsObjectBeingTested: bool) { - msg_send![ - self, - setContainerIsObjectBeingTested: containerIsObjectBeingTested - ] - } - pub unsafe fn containerIsRangeContainerObject(&self) -> bool { - msg_send![self, containerIsRangeContainerObject] - } - pub unsafe fn setContainerIsRangeContainerObject(&self, containerIsRangeContainerObject: bool) { - msg_send![ - self, - setContainerIsRangeContainerObject: containerIsRangeContainerObject - ] - } - pub unsafe fn key(&self) -> Id { - msg_send_id![self, key] - } - pub unsafe fn setKey(&self, key: &NSString) { - msg_send![self, setKey: key] - } - pub unsafe fn containerClassDescription(&self) -> Option> { - msg_send_id![self, containerClassDescription] - } - pub unsafe fn setContainerClassDescription( - &self, - containerClassDescription: Option<&NSScriptClassDescription>, - ) { - msg_send![ - self, - setContainerClassDescription: containerClassDescription - ] - } - pub unsafe fn keyClassDescription(&self) -> Option> { - msg_send_id![self, keyClassDescription] - } - pub unsafe fn indicesOfObjectsByEvaluatingWithContainer_count( - &self, - container: &Object, - count: NonNull, - ) -> *mut NSInteger { - msg_send![ - self, - indicesOfObjectsByEvaluatingWithContainer: container, - count: count - ] - } - pub unsafe fn objectsByEvaluatingWithContainers( - &self, - containers: &Object, - ) -> Option> { - msg_send_id![self, objectsByEvaluatingWithContainers: containers] - } - pub unsafe fn objectsByEvaluatingSpecifier(&self) -> Option> { - msg_send_id![self, objectsByEvaluatingSpecifier] - } - pub unsafe fn evaluationErrorNumber(&self) -> NSInteger { - msg_send![self, evaluationErrorNumber] - } - pub unsafe fn setEvaluationErrorNumber(&self, evaluationErrorNumber: NSInteger) { - msg_send![self, setEvaluationErrorNumber: evaluationErrorNumber] - } - pub unsafe fn evaluationErrorSpecifier(&self) -> Option> { - msg_send_id![self, evaluationErrorSpecifier] - } - pub unsafe fn descriptor(&self) -> Option> { - msg_send_id![self, descriptor] - } -} -#[doc = "NSScriptObjectSpecifiers"] -impl NSObject { - pub unsafe fn objectSpecifier(&self) -> Option> { - msg_send_id![self, objectSpecifier] - } - pub unsafe fn indicesOfObjectsByEvaluatingObjectSpecifier( - &self, - specifier: &NSScriptObjectSpecifier, - ) -> Option, Shared>> { - msg_send_id![self, indicesOfObjectsByEvaluatingObjectSpecifier: specifier] +); +extern_methods!( + #[doc = "NSScriptObjectSpecifiers"] + unsafe impl NSObject { + pub unsafe fn objectSpecifier(&self) -> Option> { + msg_send_id![self, objectSpecifier] + } + pub unsafe fn indicesOfObjectsByEvaluatingObjectSpecifier( + &self, + specifier: &NSScriptObjectSpecifier, + ) -> Option, Shared>> { + msg_send_id![self, indicesOfObjectsByEvaluatingObjectSpecifier: specifier] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSIndexSpecifier; @@ -151,29 +162,31 @@ extern_class!( type Super = NSScriptObjectSpecifier; } ); -impl NSIndexSpecifier { - pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_index( - &self, - classDesc: &NSScriptClassDescription, - container: Option<&NSScriptObjectSpecifier>, - property: &NSString, - index: NSInteger, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - index: index - ] - } - pub unsafe fn index(&self) -> NSInteger { - msg_send![self, index] - } - pub unsafe fn setIndex(&self, index: NSInteger) { - msg_send![self, setIndex: index] +extern_methods!( + unsafe impl NSIndexSpecifier { + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_index( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + index: NSInteger, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + index: index + ] + } + pub unsafe fn index(&self) -> NSInteger { + msg_send![self, index] + } + pub unsafe fn setIndex(&self, index: NSInteger) { + msg_send![self, setIndex: index] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSMiddleSpecifier; @@ -181,7 +194,9 @@ extern_class!( type Super = NSScriptObjectSpecifier; } ); -impl NSMiddleSpecifier {} +extern_methods!( + unsafe impl NSMiddleSpecifier {} +); extern_class!( #[derive(Debug)] pub struct NSNameSpecifier; @@ -189,32 +204,34 @@ extern_class!( type Super = NSScriptObjectSpecifier; } ); -impl NSNameSpecifier { - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_name( - &self, - classDesc: &NSScriptClassDescription, - container: Option<&NSScriptObjectSpecifier>, - property: &NSString, - name: &NSString, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - name: name - ] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: &NSString) { - msg_send![self, setName: name] +extern_methods!( + unsafe impl NSNameSpecifier { + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_name( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + name: &NSString, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + name: name + ] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: &NSString) { + msg_send![self, setName: name] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSPositionalSpecifier; @@ -222,39 +239,44 @@ extern_class!( type Super = NSObject; } ); -impl NSPositionalSpecifier { - pub unsafe fn initWithPosition_objectSpecifier( - &self, - position: NSInsertionPosition, - specifier: &NSScriptObjectSpecifier, - ) -> Id { - msg_send_id![self, initWithPosition: position, objectSpecifier: specifier] - } - pub unsafe fn position(&self) -> NSInsertionPosition { - msg_send![self, position] - } - pub unsafe fn objectSpecifier(&self) -> Id { - msg_send_id![self, objectSpecifier] - } - pub unsafe fn setInsertionClassDescription(&self, classDescription: &NSScriptClassDescription) { - msg_send![self, setInsertionClassDescription: classDescription] +extern_methods!( + unsafe impl NSPositionalSpecifier { + pub unsafe fn initWithPosition_objectSpecifier( + &self, + position: NSInsertionPosition, + specifier: &NSScriptObjectSpecifier, + ) -> Id { + msg_send_id![self, initWithPosition: position, objectSpecifier: specifier] + } + pub unsafe fn position(&self) -> NSInsertionPosition { + msg_send![self, position] + } + pub unsafe fn objectSpecifier(&self) -> Id { + msg_send_id![self, objectSpecifier] + } + pub unsafe fn setInsertionClassDescription( + &self, + classDescription: &NSScriptClassDescription, + ) { + msg_send![self, setInsertionClassDescription: classDescription] + } + pub unsafe fn evaluate(&self) { + msg_send![self, evaluate] + } + pub unsafe fn insertionContainer(&self) -> Option> { + msg_send_id![self, insertionContainer] + } + pub unsafe fn insertionKey(&self) -> Option> { + msg_send_id![self, insertionKey] + } + pub unsafe fn insertionIndex(&self) -> NSInteger { + msg_send![self, insertionIndex] + } + pub unsafe fn insertionReplaces(&self) -> bool { + msg_send![self, insertionReplaces] + } } - pub unsafe fn evaluate(&self) { - msg_send![self, evaluate] - } - pub unsafe fn insertionContainer(&self) -> Option> { - msg_send_id![self, insertionContainer] - } - pub unsafe fn insertionKey(&self) -> Option> { - msg_send_id![self, insertionKey] - } - pub unsafe fn insertionIndex(&self) -> NSInteger { - msg_send![self, insertionIndex] - } - pub unsafe fn insertionReplaces(&self) -> bool { - msg_send![self, insertionReplaces] - } -} +); extern_class!( #[derive(Debug)] pub struct NSPropertySpecifier; @@ -262,7 +284,9 @@ extern_class!( type Super = NSScriptObjectSpecifier; } ); -impl NSPropertySpecifier {} +extern_methods!( + unsafe impl NSPropertySpecifier {} +); extern_class!( #[derive(Debug)] pub struct NSRandomSpecifier; @@ -270,7 +294,9 @@ extern_class!( type Super = NSScriptObjectSpecifier; } ); -impl NSRandomSpecifier {} +extern_methods!( + unsafe impl NSRandomSpecifier {} +); extern_class!( #[derive(Debug)] pub struct NSRangeSpecifier; @@ -278,40 +304,42 @@ extern_class!( type Super = NSScriptObjectSpecifier; } ); -impl NSRangeSpecifier { - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_startSpecifier_endSpecifier( - &self, - classDesc: &NSScriptClassDescription, - container: Option<&NSScriptObjectSpecifier>, - property: &NSString, - startSpec: Option<&NSScriptObjectSpecifier>, - endSpec: Option<&NSScriptObjectSpecifier>, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - startSpecifier: startSpec, - endSpecifier: endSpec - ] +extern_methods!( + unsafe impl NSRangeSpecifier { + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_startSpecifier_endSpecifier( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + startSpec: Option<&NSScriptObjectSpecifier>, + endSpec: Option<&NSScriptObjectSpecifier>, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + startSpecifier: startSpec, + endSpecifier: endSpec + ] + } + pub unsafe fn startSpecifier(&self) -> Option> { + msg_send_id![self, startSpecifier] + } + pub unsafe fn setStartSpecifier(&self, startSpecifier: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setStartSpecifier: startSpecifier] + } + pub unsafe fn endSpecifier(&self) -> Option> { + msg_send_id![self, endSpecifier] + } + pub unsafe fn setEndSpecifier(&self, endSpecifier: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setEndSpecifier: endSpecifier] + } } - pub unsafe fn startSpecifier(&self) -> Option> { - msg_send_id![self, startSpecifier] - } - pub unsafe fn setStartSpecifier(&self, startSpecifier: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setStartSpecifier: startSpecifier] - } - pub unsafe fn endSpecifier(&self) -> Option> { - msg_send_id![self, endSpecifier] - } - pub unsafe fn setEndSpecifier(&self, endSpecifier: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setEndSpecifier: endSpecifier] - } -} +); extern_class!( #[derive(Debug)] pub struct NSRelativeSpecifier; @@ -319,40 +347,42 @@ extern_class!( type Super = NSScriptObjectSpecifier; } ); -impl NSRelativeSpecifier { - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_relativePosition_baseSpecifier( - &self, - classDesc: &NSScriptClassDescription, - container: Option<&NSScriptObjectSpecifier>, - property: &NSString, - relPos: NSRelativePosition, - baseSpecifier: Option<&NSScriptObjectSpecifier>, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - relativePosition: relPos, - baseSpecifier: baseSpecifier - ] - } - pub unsafe fn relativePosition(&self) -> NSRelativePosition { - msg_send![self, relativePosition] - } - pub unsafe fn setRelativePosition(&self, relativePosition: NSRelativePosition) { - msg_send![self, setRelativePosition: relativePosition] - } - pub unsafe fn baseSpecifier(&self) -> Option> { - msg_send_id![self, baseSpecifier] +extern_methods!( + unsafe impl NSRelativeSpecifier { + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_relativePosition_baseSpecifier( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + relPos: NSRelativePosition, + baseSpecifier: Option<&NSScriptObjectSpecifier>, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + relativePosition: relPos, + baseSpecifier: baseSpecifier + ] + } + pub unsafe fn relativePosition(&self) -> NSRelativePosition { + msg_send![self, relativePosition] + } + pub unsafe fn setRelativePosition(&self, relativePosition: NSRelativePosition) { + msg_send![self, setRelativePosition: relativePosition] + } + pub unsafe fn baseSpecifier(&self) -> Option> { + msg_send_id![self, baseSpecifier] + } + pub unsafe fn setBaseSpecifier(&self, baseSpecifier: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setBaseSpecifier: baseSpecifier] + } } - pub unsafe fn setBaseSpecifier(&self, baseSpecifier: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setBaseSpecifier: baseSpecifier] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUniqueIDSpecifier; @@ -360,32 +390,34 @@ extern_class!( type Super = NSScriptObjectSpecifier; } ); -impl NSUniqueIDSpecifier { - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_uniqueID( - &self, - classDesc: &NSScriptClassDescription, - container: Option<&NSScriptObjectSpecifier>, - property: &NSString, - uniqueID: &Object, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - uniqueID: uniqueID - ] - } - pub unsafe fn uniqueID(&self) -> Id { - msg_send_id![self, uniqueID] - } - pub unsafe fn setUniqueID(&self, uniqueID: &Object) { - msg_send![self, setUniqueID: uniqueID] +extern_methods!( + unsafe impl NSUniqueIDSpecifier { + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_uniqueID( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + uniqueID: &Object, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + uniqueID: uniqueID + ] + } + pub unsafe fn uniqueID(&self) -> Id { + msg_send_id![self, uniqueID] + } + pub unsafe fn setUniqueID(&self, uniqueID: &Object) { + msg_send![self, setUniqueID: uniqueID] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSWhoseSpecifier; @@ -393,62 +425,64 @@ extern_class!( type Super = NSScriptObjectSpecifier; } ); -impl NSWhoseSpecifier { - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_test( - &self, - classDesc: &NSScriptClassDescription, - container: Option<&NSScriptObjectSpecifier>, - property: &NSString, - test: &NSScriptWhoseTest, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - test: test - ] - } - pub unsafe fn test(&self) -> Id { - msg_send_id![self, test] - } - pub unsafe fn setTest(&self, test: &NSScriptWhoseTest) { - msg_send![self, setTest: test] +extern_methods!( + unsafe impl NSWhoseSpecifier { + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_test( + &self, + classDesc: &NSScriptClassDescription, + container: Option<&NSScriptObjectSpecifier>, + property: &NSString, + test: &NSScriptWhoseTest, + ) -> Id { + msg_send_id![ + self, + initWithContainerClassDescription: classDesc, + containerSpecifier: container, + key: property, + test: test + ] + } + pub unsafe fn test(&self) -> Id { + msg_send_id![self, test] + } + pub unsafe fn setTest(&self, test: &NSScriptWhoseTest) { + msg_send![self, setTest: test] + } + pub unsafe fn startSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier { + msg_send![self, startSubelementIdentifier] + } + pub unsafe fn setStartSubelementIdentifier( + &self, + startSubelementIdentifier: NSWhoseSubelementIdentifier, + ) { + msg_send![ + self, + setStartSubelementIdentifier: startSubelementIdentifier + ] + } + pub unsafe fn startSubelementIndex(&self) -> NSInteger { + msg_send![self, startSubelementIndex] + } + pub unsafe fn setStartSubelementIndex(&self, startSubelementIndex: NSInteger) { + msg_send![self, setStartSubelementIndex: startSubelementIndex] + } + pub unsafe fn endSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier { + msg_send![self, endSubelementIdentifier] + } + pub unsafe fn setEndSubelementIdentifier( + &self, + endSubelementIdentifier: NSWhoseSubelementIdentifier, + ) { + msg_send![self, setEndSubelementIdentifier: endSubelementIdentifier] + } + pub unsafe fn endSubelementIndex(&self) -> NSInteger { + msg_send![self, endSubelementIndex] + } + pub unsafe fn setEndSubelementIndex(&self, endSubelementIndex: NSInteger) { + msg_send![self, setEndSubelementIndex: endSubelementIndex] + } } - pub unsafe fn startSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier { - msg_send![self, startSubelementIdentifier] - } - pub unsafe fn setStartSubelementIdentifier( - &self, - startSubelementIdentifier: NSWhoseSubelementIdentifier, - ) { - msg_send![ - self, - setStartSubelementIdentifier: startSubelementIdentifier - ] - } - pub unsafe fn startSubelementIndex(&self) -> NSInteger { - msg_send![self, startSubelementIndex] - } - pub unsafe fn setStartSubelementIndex(&self, startSubelementIndex: NSInteger) { - msg_send![self, setStartSubelementIndex: startSubelementIndex] - } - pub unsafe fn endSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier { - msg_send![self, endSubelementIdentifier] - } - pub unsafe fn setEndSubelementIdentifier( - &self, - endSubelementIdentifier: NSWhoseSubelementIdentifier, - ) { - msg_send![self, setEndSubelementIdentifier: endSubelementIdentifier] - } - pub unsafe fn endSubelementIndex(&self) -> NSInteger { - msg_send![self, endSubelementIndex] - } - pub unsafe fn setEndSubelementIndex(&self, endSubelementIndex: NSInteger) { - msg_send![self, setEndSubelementIndex: endSubelementIndex] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index c3b644858..383dd84c6 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSScriptCommand::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCloneCommand; @@ -14,14 +14,16 @@ extern_class!( type Super = NSScriptCommand; } ); -impl NSCloneCommand { - pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setReceiversSpecifier: receiversRef] +extern_methods!( + unsafe impl NSCloneCommand { + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setReceiversSpecifier: receiversRef] + } + pub unsafe fn keySpecifier(&self) -> Id { + msg_send_id![self, keySpecifier] + } } - pub unsafe fn keySpecifier(&self) -> Id { - msg_send_id![self, keySpecifier] - } -} +); extern_class!( #[derive(Debug)] pub struct NSCloseCommand; @@ -29,11 +31,13 @@ extern_class!( type Super = NSScriptCommand; } ); -impl NSCloseCommand { - pub unsafe fn saveOptions(&self) -> NSSaveOptions { - msg_send![self, saveOptions] +extern_methods!( + unsafe impl NSCloseCommand { + pub unsafe fn saveOptions(&self) -> NSSaveOptions { + msg_send![self, saveOptions] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSCountCommand; @@ -41,7 +45,9 @@ extern_class!( type Super = NSScriptCommand; } ); -impl NSCountCommand {} +extern_methods!( + unsafe impl NSCountCommand {} +); extern_class!( #[derive(Debug)] pub struct NSCreateCommand; @@ -49,14 +55,16 @@ extern_class!( type Super = NSScriptCommand; } ); -impl NSCreateCommand { - pub unsafe fn createClassDescription(&self) -> Id { - msg_send_id![self, createClassDescription] +extern_methods!( + unsafe impl NSCreateCommand { + pub unsafe fn createClassDescription(&self) -> Id { + msg_send_id![self, createClassDescription] + } + pub unsafe fn resolvedKeyDictionary(&self) -> Id, Shared> { + msg_send_id![self, resolvedKeyDictionary] + } } - pub unsafe fn resolvedKeyDictionary(&self) -> Id, Shared> { - msg_send_id![self, resolvedKeyDictionary] - } -} +); extern_class!( #[derive(Debug)] pub struct NSDeleteCommand; @@ -64,14 +72,16 @@ extern_class!( type Super = NSScriptCommand; } ); -impl NSDeleteCommand { - pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setReceiversSpecifier: receiversRef] +extern_methods!( + unsafe impl NSDeleteCommand { + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setReceiversSpecifier: receiversRef] + } + pub unsafe fn keySpecifier(&self) -> Id { + msg_send_id![self, keySpecifier] + } } - pub unsafe fn keySpecifier(&self) -> Id { - msg_send_id![self, keySpecifier] - } -} +); extern_class!( #[derive(Debug)] pub struct NSExistsCommand; @@ -79,7 +89,9 @@ extern_class!( type Super = NSScriptCommand; } ); -impl NSExistsCommand {} +extern_methods!( + unsafe impl NSExistsCommand {} +); extern_class!( #[derive(Debug)] pub struct NSGetCommand; @@ -87,7 +99,9 @@ extern_class!( type Super = NSScriptCommand; } ); -impl NSGetCommand {} +extern_methods!( + unsafe impl NSGetCommand {} +); extern_class!( #[derive(Debug)] pub struct NSMoveCommand; @@ -95,14 +109,16 @@ extern_class!( type Super = NSScriptCommand; } ); -impl NSMoveCommand { - pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setReceiversSpecifier: receiversRef] +extern_methods!( + unsafe impl NSMoveCommand { + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setReceiversSpecifier: receiversRef] + } + pub unsafe fn keySpecifier(&self) -> Id { + msg_send_id![self, keySpecifier] + } } - pub unsafe fn keySpecifier(&self) -> Id { - msg_send_id![self, keySpecifier] - } -} +); extern_class!( #[derive(Debug)] pub struct NSQuitCommand; @@ -110,11 +126,13 @@ extern_class!( type Super = NSScriptCommand; } ); -impl NSQuitCommand { - pub unsafe fn saveOptions(&self) -> NSSaveOptions { - msg_send![self, saveOptions] +extern_methods!( + unsafe impl NSQuitCommand { + pub unsafe fn saveOptions(&self) -> NSSaveOptions { + msg_send![self, saveOptions] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSSetCommand; @@ -122,11 +140,13 @@ extern_class!( type Super = NSScriptCommand; } ); -impl NSSetCommand { - pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setReceiversSpecifier: receiversRef] - } - pub unsafe fn keySpecifier(&self) -> Id { - msg_send_id![self, keySpecifier] +extern_methods!( + unsafe impl NSSetCommand { + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { + msg_send![self, setReceiversSpecifier: receiversRef] + } + pub unsafe fn keySpecifier(&self) -> Id { + msg_send_id![self, keySpecifier] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 71d6bd463..7be399198 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -11,7 +11,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptSuiteRegistry; @@ -19,81 +19,83 @@ extern_class!( type Super = NSObject; } ); -impl NSScriptSuiteRegistry { - pub unsafe fn sharedScriptSuiteRegistry() -> Id { - msg_send_id![Self::class(), sharedScriptSuiteRegistry] +extern_methods!( + unsafe impl NSScriptSuiteRegistry { + pub unsafe fn sharedScriptSuiteRegistry() -> Id { + msg_send_id![Self::class(), sharedScriptSuiteRegistry] + } + pub unsafe fn setSharedScriptSuiteRegistry(registry: &NSScriptSuiteRegistry) { + msg_send![Self::class(), setSharedScriptSuiteRegistry: registry] + } + pub unsafe fn loadSuitesFromBundle(&self, bundle: &NSBundle) { + msg_send![self, loadSuitesFromBundle: bundle] + } + pub unsafe fn loadSuiteWithDictionary_fromBundle( + &self, + suiteDeclaration: &NSDictionary, + bundle: &NSBundle, + ) { + msg_send![ + self, + loadSuiteWithDictionary: suiteDeclaration, + fromBundle: bundle + ] + } + pub unsafe fn registerClassDescription(&self, classDescription: &NSScriptClassDescription) { + msg_send![self, registerClassDescription: classDescription] + } + pub unsafe fn registerCommandDescription( + &self, + commandDescription: &NSScriptCommandDescription, + ) { + msg_send![self, registerCommandDescription: commandDescription] + } + pub unsafe fn suiteNames(&self) -> Id, Shared> { + msg_send_id![self, suiteNames] + } + pub unsafe fn appleEventCodeForSuite(&self, suiteName: &NSString) -> FourCharCode { + msg_send![self, appleEventCodeForSuite: suiteName] + } + pub unsafe fn bundleForSuite(&self, suiteName: &NSString) -> Option> { + msg_send_id![self, bundleForSuite: suiteName] + } + pub unsafe fn classDescriptionsInSuite( + &self, + suiteName: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, classDescriptionsInSuite: suiteName] + } + pub unsafe fn commandDescriptionsInSuite( + &self, + suiteName: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, commandDescriptionsInSuite: suiteName] + } + pub unsafe fn suiteForAppleEventCode( + &self, + appleEventCode: FourCharCode, + ) -> Option> { + msg_send_id![self, suiteForAppleEventCode: appleEventCode] + } + pub unsafe fn classDescriptionWithAppleEventCode( + &self, + appleEventCode: FourCharCode, + ) -> Option> { + msg_send_id![self, classDescriptionWithAppleEventCode: appleEventCode] + } + pub unsafe fn commandDescriptionWithAppleEventClass_andAppleEventCode( + &self, + appleEventClassCode: FourCharCode, + appleEventIDCode: FourCharCode, + ) -> Option> { + msg_send_id![ + self, + commandDescriptionWithAppleEventClass: appleEventClassCode, + andAppleEventCode: appleEventIDCode + ] + } + pub unsafe fn aeteResource(&self, languageName: &NSString) -> Option> { + msg_send_id![self, aeteResource: languageName] + } } - pub unsafe fn setSharedScriptSuiteRegistry(registry: &NSScriptSuiteRegistry) { - msg_send![Self::class(), setSharedScriptSuiteRegistry: registry] - } - pub unsafe fn loadSuitesFromBundle(&self, bundle: &NSBundle) { - msg_send![self, loadSuitesFromBundle: bundle] - } - pub unsafe fn loadSuiteWithDictionary_fromBundle( - &self, - suiteDeclaration: &NSDictionary, - bundle: &NSBundle, - ) { - msg_send![ - self, - loadSuiteWithDictionary: suiteDeclaration, - fromBundle: bundle - ] - } - pub unsafe fn registerClassDescription(&self, classDescription: &NSScriptClassDescription) { - msg_send![self, registerClassDescription: classDescription] - } - pub unsafe fn registerCommandDescription( - &self, - commandDescription: &NSScriptCommandDescription, - ) { - msg_send![self, registerCommandDescription: commandDescription] - } - pub unsafe fn suiteNames(&self) -> Id, Shared> { - msg_send_id![self, suiteNames] - } - pub unsafe fn appleEventCodeForSuite(&self, suiteName: &NSString) -> FourCharCode { - msg_send![self, appleEventCodeForSuite: suiteName] - } - pub unsafe fn bundleForSuite(&self, suiteName: &NSString) -> Option> { - msg_send_id![self, bundleForSuite: suiteName] - } - pub unsafe fn classDescriptionsInSuite( - &self, - suiteName: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, classDescriptionsInSuite: suiteName] - } - pub unsafe fn commandDescriptionsInSuite( - &self, - suiteName: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, commandDescriptionsInSuite: suiteName] - } - pub unsafe fn suiteForAppleEventCode( - &self, - appleEventCode: FourCharCode, - ) -> Option> { - msg_send_id![self, suiteForAppleEventCode: appleEventCode] - } - pub unsafe fn classDescriptionWithAppleEventCode( - &self, - appleEventCode: FourCharCode, - ) -> Option> { - msg_send_id![self, classDescriptionWithAppleEventCode: appleEventCode] - } - pub unsafe fn commandDescriptionWithAppleEventClass_andAppleEventCode( - &self, - appleEventClassCode: FourCharCode, - appleEventIDCode: FourCharCode, - ) -> Option> { - msg_send_id![ - self, - commandDescriptionWithAppleEventClass: appleEventClassCode, - andAppleEventCode: appleEventIDCode - ] - } - pub unsafe fn aeteResource(&self, languageName: &NSString) -> Option> { - msg_send_id![self, aeteResource: languageName] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index 22bae2d96..c99a907cb 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptWhoseTest; @@ -13,17 +13,19 @@ extern_class!( type Super = NSObject; } ); -impl NSScriptWhoseTest { - pub unsafe fn isTrue(&self) -> bool { - msg_send![self, isTrue] +extern_methods!( + unsafe impl NSScriptWhoseTest { + pub unsafe fn isTrue(&self) -> bool { + msg_send![self, isTrue] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } -} +); extern_class!( #[derive(Debug)] pub struct NSLogicalTest; @@ -31,23 +33,25 @@ extern_class!( type Super = NSScriptWhoseTest; } ); -impl NSLogicalTest { - pub unsafe fn initAndTestWithTests( - &self, - subTests: &NSArray, - ) -> Id { - msg_send_id![self, initAndTestWithTests: subTests] - } - pub unsafe fn initOrTestWithTests( - &self, - subTests: &NSArray, - ) -> Id { - msg_send_id![self, initOrTestWithTests: subTests] +extern_methods!( + unsafe impl NSLogicalTest { + pub unsafe fn initAndTestWithTests( + &self, + subTests: &NSArray, + ) -> Id { + msg_send_id![self, initAndTestWithTests: subTests] + } + pub unsafe fn initOrTestWithTests( + &self, + subTests: &NSArray, + ) -> Id { + msg_send_id![self, initOrTestWithTests: subTests] + } + pub unsafe fn initNotTestWithTest(&self, subTest: &NSScriptWhoseTest) -> Id { + msg_send_id![self, initNotTestWithTest: subTest] + } } - pub unsafe fn initNotTestWithTest(&self, subTest: &NSScriptWhoseTest) -> Id { - msg_send_id![self, initNotTestWithTest: subTest] - } -} +); extern_class!( #[derive(Debug)] pub struct NSSpecifierTest; @@ -55,81 +59,87 @@ extern_class!( type Super = NSScriptWhoseTest; } ); -impl NSSpecifierTest { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn initWithObjectSpecifier_comparisonOperator_testObject( - &self, - obj1: Option<&NSScriptObjectSpecifier>, - compOp: NSTestComparisonOperation, - obj2: Option<&Object>, - ) -> Id { - msg_send_id![ - self, - initWithObjectSpecifier: obj1, - comparisonOperator: compOp, - testObject: obj2 - ] - } -} -#[doc = "NSComparisonMethods"] -impl NSObject { - pub unsafe fn isEqualTo(&self, object: Option<&Object>) -> bool { - msg_send![self, isEqualTo: object] - } - pub unsafe fn isLessThanOrEqualTo(&self, object: Option<&Object>) -> bool { - msg_send![self, isLessThanOrEqualTo: object] - } - pub unsafe fn isLessThan(&self, object: Option<&Object>) -> bool { - msg_send![self, isLessThan: object] - } - pub unsafe fn isGreaterThanOrEqualTo(&self, object: Option<&Object>) -> bool { - msg_send![self, isGreaterThanOrEqualTo: object] - } - pub unsafe fn isGreaterThan(&self, object: Option<&Object>) -> bool { - msg_send![self, isGreaterThan: object] +extern_methods!( + unsafe impl NSSpecifierTest { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: inCoder] + } + pub unsafe fn initWithObjectSpecifier_comparisonOperator_testObject( + &self, + obj1: Option<&NSScriptObjectSpecifier>, + compOp: NSTestComparisonOperation, + obj2: Option<&Object>, + ) -> Id { + msg_send_id![ + self, + initWithObjectSpecifier: obj1, + comparisonOperator: compOp, + testObject: obj2 + ] + } } - pub unsafe fn isNotEqualTo(&self, object: Option<&Object>) -> bool { - msg_send![self, isNotEqualTo: object] - } - pub unsafe fn doesContain(&self, object: &Object) -> bool { - msg_send![self, doesContain: object] - } - pub unsafe fn isLike(&self, object: &NSString) -> bool { - msg_send![self, isLike: object] - } - pub unsafe fn isCaseInsensitiveLike(&self, object: &NSString) -> bool { - msg_send![self, isCaseInsensitiveLike: object] - } -} -#[doc = "NSScriptingComparisonMethods"] -impl NSObject { - pub unsafe fn scriptingIsEqualTo(&self, object: &Object) -> bool { - msg_send![self, scriptingIsEqualTo: object] - } - pub unsafe fn scriptingIsLessThanOrEqualTo(&self, object: &Object) -> bool { - msg_send![self, scriptingIsLessThanOrEqualTo: object] - } - pub unsafe fn scriptingIsLessThan(&self, object: &Object) -> bool { - msg_send![self, scriptingIsLessThan: object] - } - pub unsafe fn scriptingIsGreaterThanOrEqualTo(&self, object: &Object) -> bool { - msg_send![self, scriptingIsGreaterThanOrEqualTo: object] - } - pub unsafe fn scriptingIsGreaterThan(&self, object: &Object) -> bool { - msg_send![self, scriptingIsGreaterThan: object] - } - pub unsafe fn scriptingBeginsWith(&self, object: &Object) -> bool { - msg_send![self, scriptingBeginsWith: object] - } - pub unsafe fn scriptingEndsWith(&self, object: &Object) -> bool { - msg_send![self, scriptingEndsWith: object] +); +extern_methods!( + #[doc = "NSComparisonMethods"] + unsafe impl NSObject { + pub unsafe fn isEqualTo(&self, object: Option<&Object>) -> bool { + msg_send![self, isEqualTo: object] + } + pub unsafe fn isLessThanOrEqualTo(&self, object: Option<&Object>) -> bool { + msg_send![self, isLessThanOrEqualTo: object] + } + pub unsafe fn isLessThan(&self, object: Option<&Object>) -> bool { + msg_send![self, isLessThan: object] + } + pub unsafe fn isGreaterThanOrEqualTo(&self, object: Option<&Object>) -> bool { + msg_send![self, isGreaterThanOrEqualTo: object] + } + pub unsafe fn isGreaterThan(&self, object: Option<&Object>) -> bool { + msg_send![self, isGreaterThan: object] + } + pub unsafe fn isNotEqualTo(&self, object: Option<&Object>) -> bool { + msg_send![self, isNotEqualTo: object] + } + pub unsafe fn doesContain(&self, object: &Object) -> bool { + msg_send![self, doesContain: object] + } + pub unsafe fn isLike(&self, object: &NSString) -> bool { + msg_send![self, isLike: object] + } + pub unsafe fn isCaseInsensitiveLike(&self, object: &NSString) -> bool { + msg_send![self, isCaseInsensitiveLike: object] + } } - pub unsafe fn scriptingContains(&self, object: &Object) -> bool { - msg_send![self, scriptingContains: object] +); +extern_methods!( + #[doc = "NSScriptingComparisonMethods"] + unsafe impl NSObject { + pub unsafe fn scriptingIsEqualTo(&self, object: &Object) -> bool { + msg_send![self, scriptingIsEqualTo: object] + } + pub unsafe fn scriptingIsLessThanOrEqualTo(&self, object: &Object) -> bool { + msg_send![self, scriptingIsLessThanOrEqualTo: object] + } + pub unsafe fn scriptingIsLessThan(&self, object: &Object) -> bool { + msg_send![self, scriptingIsLessThan: object] + } + pub unsafe fn scriptingIsGreaterThanOrEqualTo(&self, object: &Object) -> bool { + msg_send![self, scriptingIsGreaterThanOrEqualTo: object] + } + pub unsafe fn scriptingIsGreaterThan(&self, object: &Object) -> bool { + msg_send![self, scriptingIsGreaterThan: object] + } + pub unsafe fn scriptingBeginsWith(&self, object: &Object) -> bool { + msg_send![self, scriptingBeginsWith: object] + } + pub unsafe fn scriptingEndsWith(&self, object: &Object) -> bool { + msg_send![self, scriptingEndsWith: object] + } + pub unsafe fn scriptingContains(&self, object: &Object) -> bool { + msg_send![self, scriptingContains: object] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index a686275df..cd9b80645 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSSet; @@ -14,137 +14,155 @@ __inner_extern_class!( type Super = NSObject; } ); -impl NSSet { - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] +extern_methods!( + unsafe impl NSSet { + pub unsafe fn count(&self) -> NSUInteger { + msg_send![self, count] + } + pub unsafe fn member(&self, object: &ObjectType) -> Option> { + msg_send_id![self, member: object] + } + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithObjects_count( + &self, + objects: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![self, initWithObjects: objects, count: cnt] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn member(&self, object: &ObjectType) -> Option> { - msg_send_id![self, member: object] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithObjects_count( - &self, - objects: TodoArray, - cnt: NSUInteger, - ) -> Id { - msg_send_id![self, initWithObjects: objects, count: cnt] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSExtendedSet"] -impl NSSet { - pub unsafe fn allObjects(&self) -> Id, Shared> { - msg_send_id![self, allObjects] - } - pub unsafe fn anyObject(&self) -> Option> { - msg_send_id![self, anyObject] - } - pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool { - msg_send![self, containsObject: anObject] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn intersectsSet(&self, otherSet: &NSSet) -> bool { - msg_send![self, intersectsSet: otherSet] - } - pub unsafe fn isEqualToSet(&self, otherSet: &NSSet) -> bool { - msg_send![self, isEqualToSet: otherSet] - } - pub unsafe fn isSubsetOfSet(&self, otherSet: &NSSet) -> bool { - msg_send![self, isSubsetOfSet: otherSet] - } - pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { - msg_send![self, makeObjectsPerformSelector: aSelector] - } - pub unsafe fn makeObjectsPerformSelector_withObject( - &self, - aSelector: Sel, - argument: Option<&Object>, - ) { - msg_send![ - self, - makeObjectsPerformSelector: aSelector, - withObject: argument - ] - } - pub unsafe fn setByAddingObject(&self, anObject: &ObjectType) -> Id, Shared> { - msg_send_id![self, setByAddingObject: anObject] - } - pub unsafe fn setByAddingObjectsFromSet( - &self, - other: &NSSet, - ) -> Id, Shared> { - msg_send_id![self, setByAddingObjectsFromSet: other] - } - pub unsafe fn setByAddingObjectsFromArray( - &self, - other: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, setByAddingObjectsFromArray: other] - } - pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateObjectsUsingBlock: block] - } - pub unsafe fn enumerateObjectsWithOptions_usingBlock( - &self, - opts: NSEnumerationOptions, - block: TodoBlock, - ) { - msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] - } - pub unsafe fn objectsPassingTest(&self, predicate: TodoBlock) -> Id, Shared> { - msg_send_id![self, objectsPassingTest: predicate] - } - pub unsafe fn objectsWithOptions_passingTest( - &self, - opts: NSEnumerationOptions, - predicate: TodoBlock, - ) -> Id, Shared> { - msg_send_id![self, objectsWithOptions: opts, passingTest: predicate] - } -} -#[doc = "NSSetCreation"] -impl NSSet { - pub unsafe fn set() -> Id { - msg_send_id![Self::class(), set] - } - pub unsafe fn setWithObject(object: &ObjectType) -> Id { - msg_send_id![Self::class(), setWithObject: object] - } - pub unsafe fn setWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id { - msg_send_id![Self::class(), setWithObjects: objects, count: cnt] - } - pub unsafe fn setWithSet(set: &NSSet) -> Id { - msg_send_id![Self::class(), setWithSet: set] - } - pub unsafe fn setWithArray(array: &NSArray) -> Id { - msg_send_id![Self::class(), setWithArray: array] - } - pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { - msg_send_id![self, initWithSet: set] - } - pub unsafe fn initWithSet_copyItems( - &self, - set: &NSSet, - flag: bool, - ) -> Id { - msg_send_id![self, initWithSet: set, copyItems: flag] +); +extern_methods!( + #[doc = "NSExtendedSet"] + unsafe impl NSSet { + pub unsafe fn allObjects(&self) -> Id, Shared> { + msg_send_id![self, allObjects] + } + pub unsafe fn anyObject(&self) -> Option> { + msg_send_id![self, anyObject] + } + pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool { + msg_send![self, containsObject: anObject] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn descriptionWithLocale( + &self, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } + pub unsafe fn intersectsSet(&self, otherSet: &NSSet) -> bool { + msg_send![self, intersectsSet: otherSet] + } + pub unsafe fn isEqualToSet(&self, otherSet: &NSSet) -> bool { + msg_send![self, isEqualToSet: otherSet] + } + pub unsafe fn isSubsetOfSet(&self, otherSet: &NSSet) -> bool { + msg_send![self, isSubsetOfSet: otherSet] + } + pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { + msg_send![self, makeObjectsPerformSelector: aSelector] + } + pub unsafe fn makeObjectsPerformSelector_withObject( + &self, + aSelector: Sel, + argument: Option<&Object>, + ) { + msg_send![ + self, + makeObjectsPerformSelector: aSelector, + withObject: argument + ] + } + pub unsafe fn setByAddingObject( + &self, + anObject: &ObjectType, + ) -> Id, Shared> { + msg_send_id![self, setByAddingObject: anObject] + } + pub unsafe fn setByAddingObjectsFromSet( + &self, + other: &NSSet, + ) -> Id, Shared> { + msg_send_id![self, setByAddingObjectsFromSet: other] + } + pub unsafe fn setByAddingObjectsFromArray( + &self, + other: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, setByAddingObjectsFromArray: other] + } + pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateObjectsUsingBlock: block] + } + pub unsafe fn enumerateObjectsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ) { + msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] + } + pub unsafe fn objectsPassingTest( + &self, + predicate: TodoBlock, + ) -> Id, Shared> { + msg_send_id![self, objectsPassingTest: predicate] + } + pub unsafe fn objectsWithOptions_passingTest( + &self, + opts: NSEnumerationOptions, + predicate: TodoBlock, + ) -> Id, Shared> { + msg_send_id![self, objectsWithOptions: opts, passingTest: predicate] + } } - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { - msg_send_id![self, initWithArray: array] +); +extern_methods!( + #[doc = "NSSetCreation"] + unsafe impl NSSet { + pub unsafe fn set() -> Id { + msg_send_id![Self::class(), set] + } + pub unsafe fn setWithObject(object: &ObjectType) -> Id { + msg_send_id![Self::class(), setWithObject: object] + } + pub unsafe fn setWithObjects_count( + objects: TodoArray, + cnt: NSUInteger, + ) -> Id { + msg_send_id![Self::class(), setWithObjects: objects, count: cnt] + } + pub unsafe fn setWithSet(set: &NSSet) -> Id { + msg_send_id![Self::class(), setWithSet: set] + } + pub unsafe fn setWithArray(array: &NSArray) -> Id { + msg_send_id![Self::class(), setWithArray: array] + } + pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { + msg_send_id![self, initWithSet: set] + } + pub unsafe fn initWithSet_copyItems( + &self, + set: &NSSet, + flag: bool, + ) -> Id { + msg_send_id![self, initWithSet: set, copyItems: flag] + } + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { + msg_send_id![self, initWithArray: array] + } } -} +); __inner_extern_class!( #[derive(Debug)] pub struct NSMutableSet; @@ -152,50 +170,56 @@ __inner_extern_class!( type Super = NSSet; } ); -impl NSMutableSet { - pub unsafe fn addObject(&self, object: &ObjectType) { - msg_send![self, addObject: object] - } - pub unsafe fn removeObject(&self, object: &ObjectType) { - msg_send![self, removeObject: object] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: numItems] - } -} -#[doc = "NSExtendedMutableSet"] -impl NSMutableSet { - pub unsafe fn addObjectsFromArray(&self, array: &NSArray) { - msg_send![self, addObjectsFromArray: array] - } - pub unsafe fn intersectSet(&self, otherSet: &NSSet) { - msg_send![self, intersectSet: otherSet] - } - pub unsafe fn minusSet(&self, otherSet: &NSSet) { - msg_send![self, minusSet: otherSet] +extern_methods!( + unsafe impl NSMutableSet { + pub unsafe fn addObject(&self, object: &ObjectType) { + msg_send![self, addObject: object] + } + pub unsafe fn removeObject(&self, object: &ObjectType) { + msg_send![self, removeObject: object] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: numItems] + } } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn unionSet(&self, otherSet: &NSSet) { - msg_send![self, unionSet: otherSet] - } - pub unsafe fn setSet(&self, otherSet: &NSSet) { - msg_send![self, setSet: otherSet] +); +extern_methods!( + #[doc = "NSExtendedMutableSet"] + unsafe impl NSMutableSet { + pub unsafe fn addObjectsFromArray(&self, array: &NSArray) { + msg_send![self, addObjectsFromArray: array] + } + pub unsafe fn intersectSet(&self, otherSet: &NSSet) { + msg_send![self, intersectSet: otherSet] + } + pub unsafe fn minusSet(&self, otherSet: &NSSet) { + msg_send![self, minusSet: otherSet] + } + pub unsafe fn removeAllObjects(&self) { + msg_send![self, removeAllObjects] + } + pub unsafe fn unionSet(&self, otherSet: &NSSet) { + msg_send![self, unionSet: otherSet] + } + pub unsafe fn setSet(&self, otherSet: &NSSet) { + msg_send![self, setSet: otherSet] + } } -} -#[doc = "NSMutableSetCreation"] -impl NSMutableSet { - pub unsafe fn setWithCapacity(numItems: NSUInteger) -> Id { - msg_send_id![Self::class(), setWithCapacity: numItems] +); +extern_methods!( + #[doc = "NSMutableSetCreation"] + unsafe impl NSMutableSet { + pub unsafe fn setWithCapacity(numItems: NSUInteger) -> Id { + msg_send_id![Self::class(), setWithCapacity: numItems] + } } -} +); __inner_extern_class!( #[derive(Debug)] pub struct NSCountedSet; @@ -203,26 +227,28 @@ __inner_extern_class!( type Super = NSMutableSet; } ); -impl NSCountedSet { - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: numItems] - } - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { - msg_send_id![self, initWithArray: array] +extern_methods!( + unsafe impl NSCountedSet { + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: numItems] + } + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { + msg_send_id![self, initWithArray: array] + } + pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { + msg_send_id![self, initWithSet: set] + } + pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger { + msg_send![self, countForObject: object] + } + pub unsafe fn objectEnumerator(&self) -> Id, Shared> { + msg_send_id![self, objectEnumerator] + } + pub unsafe fn addObject(&self, object: &ObjectType) { + msg_send![self, addObject: object] + } + pub unsafe fn removeObject(&self, object: &ObjectType) { + msg_send![self, removeObject: object] + } } - pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { - msg_send_id![self, initWithSet: set] - } - pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger { - msg_send![self, countForObject: object] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn addObject(&self, object: &ObjectType) { - msg_send![self, addObject: object] - } - pub unsafe fn removeObject(&self, object: &ObjectType) { - msg_send![self, removeObject: object] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index 14efbf44a..8b4e5b2c5 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSSortDescriptor; @@ -12,139 +12,151 @@ extern_class!( type Super = NSObject; } ); -impl NSSortDescriptor { - pub unsafe fn sortDescriptorWithKey_ascending( - key: Option<&NSString>, - ascending: bool, - ) -> Id { - msg_send_id![ - Self::class(), - sortDescriptorWithKey: key, - ascending: ascending - ] +extern_methods!( + unsafe impl NSSortDescriptor { + pub unsafe fn sortDescriptorWithKey_ascending( + key: Option<&NSString>, + ascending: bool, + ) -> Id { + msg_send_id![ + Self::class(), + sortDescriptorWithKey: key, + ascending: ascending + ] + } + pub unsafe fn sortDescriptorWithKey_ascending_selector( + key: Option<&NSString>, + ascending: bool, + selector: Option, + ) -> Id { + msg_send_id![ + Self::class(), + sortDescriptorWithKey: key, + ascending: ascending, + selector: selector + ] + } + pub unsafe fn initWithKey_ascending( + &self, + key: Option<&NSString>, + ascending: bool, + ) -> Id { + msg_send_id![self, initWithKey: key, ascending: ascending] + } + pub unsafe fn initWithKey_ascending_selector( + &self, + key: Option<&NSString>, + ascending: bool, + selector: Option, + ) -> Id { + msg_send_id![ + self, + initWithKey: key, + ascending: ascending, + selector: selector + ] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn key(&self) -> Option> { + msg_send_id![self, key] + } + pub unsafe fn ascending(&self) -> bool { + msg_send![self, ascending] + } + pub unsafe fn selector(&self) -> Option { + msg_send![self, selector] + } + pub unsafe fn allowEvaluation(&self) { + msg_send![self, allowEvaluation] + } + pub unsafe fn sortDescriptorWithKey_ascending_comparator( + key: Option<&NSString>, + ascending: bool, + cmptr: NSComparator, + ) -> Id { + msg_send_id![ + Self::class(), + sortDescriptorWithKey: key, + ascending: ascending, + comparator: cmptr + ] + } + pub unsafe fn initWithKey_ascending_comparator( + &self, + key: Option<&NSString>, + ascending: bool, + cmptr: NSComparator, + ) -> Id { + msg_send_id![ + self, + initWithKey: key, + ascending: ascending, + comparator: cmptr + ] + } + pub unsafe fn comparator(&self) -> NSComparator { + msg_send![self, comparator] + } + pub unsafe fn compareObject_toObject( + &self, + object1: &Object, + object2: &Object, + ) -> NSComparisonResult { + msg_send![self, compareObject: object1, toObject: object2] + } + pub unsafe fn reversedSortDescriptor(&self) -> Id { + msg_send_id![self, reversedSortDescriptor] + } } - pub unsafe fn sortDescriptorWithKey_ascending_selector( - key: Option<&NSString>, - ascending: bool, - selector: Option, - ) -> Id { - msg_send_id![ - Self::class(), - sortDescriptorWithKey: key, - ascending: ascending, - selector: selector - ] - } - pub unsafe fn initWithKey_ascending( - &self, - key: Option<&NSString>, - ascending: bool, - ) -> Id { - msg_send_id![self, initWithKey: key, ascending: ascending] - } - pub unsafe fn initWithKey_ascending_selector( - &self, - key: Option<&NSString>, - ascending: bool, - selector: Option, - ) -> Id { - msg_send_id![ - self, - initWithKey: key, - ascending: ascending, - selector: selector - ] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn key(&self) -> Option> { - msg_send_id![self, key] - } - pub unsafe fn ascending(&self) -> bool { - msg_send![self, ascending] - } - pub unsafe fn selector(&self) -> Option { - msg_send![self, selector] - } - pub unsafe fn allowEvaluation(&self) { - msg_send![self, allowEvaluation] - } - pub unsafe fn sortDescriptorWithKey_ascending_comparator( - key: Option<&NSString>, - ascending: bool, - cmptr: NSComparator, - ) -> Id { - msg_send_id![ - Self::class(), - sortDescriptorWithKey: key, - ascending: ascending, - comparator: cmptr - ] - } - pub unsafe fn initWithKey_ascending_comparator( - &self, - key: Option<&NSString>, - ascending: bool, - cmptr: NSComparator, - ) -> Id { - msg_send_id![ - self, - initWithKey: key, - ascending: ascending, - comparator: cmptr - ] - } - pub unsafe fn comparator(&self) -> NSComparator { - msg_send![self, comparator] - } - pub unsafe fn compareObject_toObject( - &self, - object1: &Object, - object2: &Object, - ) -> NSComparisonResult { - msg_send![self, compareObject: object1, toObject: object2] - } - pub unsafe fn reversedSortDescriptor(&self) -> Id { - msg_send_id![self, reversedSortDescriptor] - } -} -#[doc = "NSSortDescriptorSorting"] -impl NSSet { - pub unsafe fn sortedArrayUsingDescriptors( - &self, - sortDescriptors: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] +); +extern_methods!( + #[doc = "NSSortDescriptorSorting"] + unsafe impl NSSet { + pub unsafe fn sortedArrayUsingDescriptors( + &self, + sortDescriptors: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] + } } -} -#[doc = "NSSortDescriptorSorting"] -impl NSArray { - pub unsafe fn sortedArrayUsingDescriptors( - &self, - sortDescriptors: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] +); +extern_methods!( + #[doc = "NSSortDescriptorSorting"] + unsafe impl NSArray { + pub unsafe fn sortedArrayUsingDescriptors( + &self, + sortDescriptors: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] + } } -} -#[doc = "NSSortDescriptorSorting"] -impl NSMutableArray { - pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray) { - msg_send![self, sortUsingDescriptors: sortDescriptors] +); +extern_methods!( + #[doc = "NSSortDescriptorSorting"] + unsafe impl NSMutableArray { + pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray) { + msg_send![self, sortUsingDescriptors: sortDescriptors] + } } -} -#[doc = "NSKeyValueSorting"] -impl NSOrderedSet { - pub unsafe fn sortedArrayUsingDescriptors( - &self, - sortDescriptors: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] +); +extern_methods!( + #[doc = "NSKeyValueSorting"] + unsafe impl NSOrderedSet { + pub unsafe fn sortedArrayUsingDescriptors( + &self, + sortDescriptors: &NSArray, + ) -> Id, Shared> { + msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] + } } -} -#[doc = "NSKeyValueSorting"] -impl NSMutableOrderedSet { - pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray) { - msg_send![self, sortUsingDescriptors: sortDescriptors] +); +extern_methods!( + #[doc = "NSKeyValueSorting"] + unsafe impl NSMutableOrderedSet { + pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray) { + msg_send![self, sortUsingDescriptors: sortDescriptors] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index a5b5c8bb3..a0b879c8c 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSTextCheckingResult::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSSpellServer; @@ -15,29 +15,31 @@ extern_class!( type Super = NSObject; } ); -impl NSSpellServer { - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] +extern_methods!( + unsafe impl NSSpellServer { + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSSpellServerDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn registerLanguage_byVendor( + &self, + language: Option<&NSString>, + vendor: Option<&NSString>, + ) -> bool { + msg_send![self, registerLanguage: language, byVendor: vendor] + } + pub unsafe fn isWordInUserDictionaries_caseSensitive( + &self, + word: &NSString, + flag: bool, + ) -> bool { + msg_send![self, isWordInUserDictionaries: word, caseSensitive: flag] + } + pub unsafe fn run(&self) { + msg_send![self, run] + } } - pub unsafe fn setDelegate(&self, delegate: Option<&NSSpellServerDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn registerLanguage_byVendor( - &self, - language: Option<&NSString>, - vendor: Option<&NSString>, - ) -> bool { - msg_send![self, registerLanguage: language, byVendor: vendor] - } - pub unsafe fn isWordInUserDictionaries_caseSensitive( - &self, - word: &NSString, - flag: bool, - ) -> bool { - msg_send![self, isWordInUserDictionaries: word, caseSensitive: flag] - } - pub unsafe fn run(&self) { - msg_send![self, run] - } -} +); pub type NSSpellServerDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 1a55c0038..d0e53a4c2 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSStreamPropertyKey = NSString; extern_class!( #[derive(Debug)] @@ -19,42 +19,47 @@ extern_class!( type Super = NSObject; } ); -impl NSStream { - pub unsafe fn open(&self) { - msg_send![self, open] +extern_methods!( + unsafe impl NSStream { + pub unsafe fn open(&self) { + msg_send![self, open] + } + pub unsafe fn close(&self) { + msg_send![self, close] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn propertyForKey( + &self, + key: &NSStreamPropertyKey, + ) -> Option> { + msg_send_id![self, propertyForKey: key] + } + pub unsafe fn setProperty_forKey( + &self, + property: Option<&Object>, + key: &NSStreamPropertyKey, + ) -> bool { + msg_send![self, setProperty: property, forKey: key] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn streamStatus(&self) -> NSStreamStatus { + msg_send![self, streamStatus] + } + pub unsafe fn streamError(&self) -> Option> { + msg_send_id![self, streamError] + } } - pub unsafe fn close(&self) { - msg_send![self, close] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn propertyForKey(&self, key: &NSStreamPropertyKey) -> Option> { - msg_send_id![self, propertyForKey: key] - } - pub unsafe fn setProperty_forKey( - &self, - property: Option<&Object>, - key: &NSStreamPropertyKey, - ) -> bool { - msg_send![self, setProperty: property, forKey: key] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn streamStatus(&self) -> NSStreamStatus { - msg_send![self, streamStatus] - } - pub unsafe fn streamError(&self) -> Option> { - msg_send_id![self, streamError] - } -} +); extern_class!( #[derive(Debug)] pub struct NSInputStream; @@ -62,27 +67,29 @@ extern_class!( type Super = NSStream; } ); -impl NSInputStream { - pub unsafe fn read_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { - msg_send![self, read: buffer, maxLength: len] - } - pub unsafe fn getBuffer_length( - &self, - buffer: NonNull<*mut u8>, - len: NonNull, - ) -> bool { - msg_send![self, getBuffer: buffer, length: len] - } - pub unsafe fn hasBytesAvailable(&self) -> bool { - msg_send![self, hasBytesAvailable] +extern_methods!( + unsafe impl NSInputStream { + pub unsafe fn read_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { + msg_send![self, read: buffer, maxLength: len] + } + pub unsafe fn getBuffer_length( + &self, + buffer: NonNull<*mut u8>, + len: NonNull, + ) -> bool { + msg_send![self, getBuffer: buffer, length: len] + } + pub unsafe fn hasBytesAvailable(&self) -> bool { + msg_send![self, hasBytesAvailable] + } + pub unsafe fn initWithData(&self, data: &NSData) -> Id { + msg_send_id![self, initWithData: data] + } + pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithURL: url] + } } - pub unsafe fn initWithData(&self, data: &NSData) -> Id { - msg_send_id![self, initWithData: data] - } - pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithURL: url] - } -} +); extern_class!( #[derive(Debug)] pub struct NSOutputStream; @@ -90,135 +97,145 @@ extern_class!( type Super = NSStream; } ); -impl NSOutputStream { - pub unsafe fn write_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { - msg_send![self, write: buffer, maxLength: len] - } - pub unsafe fn hasSpaceAvailable(&self) -> bool { - msg_send![self, hasSpaceAvailable] +extern_methods!( + unsafe impl NSOutputStream { + pub unsafe fn write_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { + msg_send![self, write: buffer, maxLength: len] + } + pub unsafe fn hasSpaceAvailable(&self) -> bool { + msg_send![self, hasSpaceAvailable] + } + pub unsafe fn initToMemory(&self) -> Id { + msg_send_id![self, initToMemory] + } + pub unsafe fn initToBuffer_capacity( + &self, + buffer: NonNull, + capacity: NSUInteger, + ) -> Id { + msg_send_id![self, initToBuffer: buffer, capacity: capacity] + } + pub unsafe fn initWithURL_append( + &self, + url: &NSURL, + shouldAppend: bool, + ) -> Option> { + msg_send_id![self, initWithURL: url, append: shouldAppend] + } } - pub unsafe fn initToMemory(&self) -> Id { - msg_send_id![self, initToMemory] - } - pub unsafe fn initToBuffer_capacity( - &self, - buffer: NonNull, - capacity: NSUInteger, - ) -> Id { - msg_send_id![self, initToBuffer: buffer, capacity: capacity] - } - pub unsafe fn initWithURL_append( - &self, - url: &NSURL, - shouldAppend: bool, - ) -> Option> { - msg_send_id![self, initWithURL: url, append: shouldAppend] - } -} -#[doc = "NSSocketStreamCreationExtensions"] -impl NSStream { - pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( - hostname: &NSString, - port: NSInteger, - inputStream: Option<&mut Option>>, - outputStream: Option<&mut Option>>, - ) { - msg_send![ - Self::class(), - getStreamsToHostWithName: hostname, - port: port, - inputStream: inputStream, - outputStream: outputStream - ] - } - pub unsafe fn getStreamsToHost_port_inputStream_outputStream( - host: &NSHost, - port: NSInteger, - inputStream: Option<&mut Option>>, - outputStream: Option<&mut Option>>, - ) { - msg_send![ - Self::class(), - getStreamsToHost: host, - port: port, - inputStream: inputStream, - outputStream: outputStream - ] - } -} -#[doc = "NSStreamBoundPairCreationExtensions"] -impl NSStream { - pub unsafe fn getBoundStreamsWithBufferSize_inputStream_outputStream( - bufferSize: NSUInteger, - inputStream: Option<&mut Option>>, - outputStream: Option<&mut Option>>, - ) { - msg_send![ - Self::class(), - getBoundStreamsWithBufferSize: bufferSize, - inputStream: inputStream, - outputStream: outputStream - ] - } -} -#[doc = "NSInputStreamExtensions"] -impl NSInputStream { - pub unsafe fn initWithFileAtPath(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithFileAtPath: path] - } - pub unsafe fn inputStreamWithData(data: &NSData) -> Option> { - msg_send_id![Self::class(), inputStreamWithData: data] - } - pub unsafe fn inputStreamWithFileAtPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), inputStreamWithFileAtPath: path] - } - pub unsafe fn inputStreamWithURL(url: &NSURL) -> Option> { - msg_send_id![Self::class(), inputStreamWithURL: url] - } -} -#[doc = "NSOutputStreamExtensions"] -impl NSOutputStream { - pub unsafe fn initToFileAtPath_append( - &self, - path: &NSString, - shouldAppend: bool, - ) -> Option> { - msg_send_id![self, initToFileAtPath: path, append: shouldAppend] - } - pub unsafe fn outputStreamToMemory() -> Id { - msg_send_id![Self::class(), outputStreamToMemory] +); +extern_methods!( + #[doc = "NSSocketStreamCreationExtensions"] + unsafe impl NSStream { + pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( + hostname: &NSString, + port: NSInteger, + inputStream: Option<&mut Option>>, + outputStream: Option<&mut Option>>, + ) { + msg_send![ + Self::class(), + getStreamsToHostWithName: hostname, + port: port, + inputStream: inputStream, + outputStream: outputStream + ] + } + pub unsafe fn getStreamsToHost_port_inputStream_outputStream( + host: &NSHost, + port: NSInteger, + inputStream: Option<&mut Option>>, + outputStream: Option<&mut Option>>, + ) { + msg_send![ + Self::class(), + getStreamsToHost: host, + port: port, + inputStream: inputStream, + outputStream: outputStream + ] + } } - pub unsafe fn outputStreamToBuffer_capacity( - buffer: NonNull, - capacity: NSUInteger, - ) -> Id { - msg_send_id![ - Self::class(), - outputStreamToBuffer: buffer, - capacity: capacity - ] +); +extern_methods!( + #[doc = "NSStreamBoundPairCreationExtensions"] + unsafe impl NSStream { + pub unsafe fn getBoundStreamsWithBufferSize_inputStream_outputStream( + bufferSize: NSUInteger, + inputStream: Option<&mut Option>>, + outputStream: Option<&mut Option>>, + ) { + msg_send![ + Self::class(), + getBoundStreamsWithBufferSize: bufferSize, + inputStream: inputStream, + outputStream: outputStream + ] + } } - pub unsafe fn outputStreamToFileAtPath_append( - path: &NSString, - shouldAppend: bool, - ) -> Id { - msg_send_id![ - Self::class(), - outputStreamToFileAtPath: path, - append: shouldAppend - ] +); +extern_methods!( + #[doc = "NSInputStreamExtensions"] + unsafe impl NSInputStream { + pub unsafe fn initWithFileAtPath(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithFileAtPath: path] + } + pub unsafe fn inputStreamWithData(data: &NSData) -> Option> { + msg_send_id![Self::class(), inputStreamWithData: data] + } + pub unsafe fn inputStreamWithFileAtPath(path: &NSString) -> Option> { + msg_send_id![Self::class(), inputStreamWithFileAtPath: path] + } + pub unsafe fn inputStreamWithURL(url: &NSURL) -> Option> { + msg_send_id![Self::class(), inputStreamWithURL: url] + } } - pub unsafe fn outputStreamWithURL_append( - url: &NSURL, - shouldAppend: bool, - ) -> Option> { - msg_send_id![ - Self::class(), - outputStreamWithURL: url, - append: shouldAppend - ] +); +extern_methods!( + #[doc = "NSOutputStreamExtensions"] + unsafe impl NSOutputStream { + pub unsafe fn initToFileAtPath_append( + &self, + path: &NSString, + shouldAppend: bool, + ) -> Option> { + msg_send_id![self, initToFileAtPath: path, append: shouldAppend] + } + pub unsafe fn outputStreamToMemory() -> Id { + msg_send_id![Self::class(), outputStreamToMemory] + } + pub unsafe fn outputStreamToBuffer_capacity( + buffer: NonNull, + capacity: NSUInteger, + ) -> Id { + msg_send_id![ + Self::class(), + outputStreamToBuffer: buffer, + capacity: capacity + ] + } + pub unsafe fn outputStreamToFileAtPath_append( + path: &NSString, + shouldAppend: bool, + ) -> Id { + msg_send_id![ + Self::class(), + outputStreamToFileAtPath: path, + append: shouldAppend + ] + } + pub unsafe fn outputStreamWithURL_append( + url: &NSURL, + shouldAppend: bool, + ) -> Option> { + msg_send_id![ + Self::class(), + outputStreamWithURL: url, + append: shouldAppend + ] + } } -} +); pub type NSStreamDelegate = NSObject; pub type NSStreamSocketSecurityLevel = NSString; pub type NSStreamSOCKSProxyConfiguration = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 10fe10934..c5ff11b2b 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -11,7 +11,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSStringEncoding = NSUInteger; extern_class!( #[derive(Debug)] @@ -20,748 +20,762 @@ extern_class!( type Super = NSObject; } ); -impl NSString { - pub fn length(&self) -> NSUInteger { - msg_send![self, length] +extern_methods!( + unsafe impl NSString { + pub fn length(&self) -> NSUInteger { + msg_send![self, length] + } + pub unsafe fn characterAtIndex(&self, index: NSUInteger) -> unichar { + msg_send![self, characterAtIndex: index] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn characterAtIndex(&self, index: NSUInteger) -> unichar { - msg_send![self, characterAtIndex: index] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} +); pub type NSStringTransform = NSString; -#[doc = "NSStringExtensionMethods"] -impl NSString { - pub unsafe fn substringFromIndex(&self, from: NSUInteger) -> Id { - msg_send_id![self, substringFromIndex: from] - } - pub unsafe fn substringToIndex(&self, to: NSUInteger) -> Id { - msg_send_id![self, substringToIndex: to] - } - pub unsafe fn substringWithRange(&self, range: NSRange) -> Id { - msg_send_id![self, substringWithRange: range] - } - pub unsafe fn getCharacters_range(&self, buffer: NonNull, range: NSRange) { - msg_send![self, getCharacters: buffer, range: range] - } - pub unsafe fn compare(&self, string: &NSString) -> NSComparisonResult { - msg_send![self, compare: string] - } - pub unsafe fn compare_options( - &self, - string: &NSString, - mask: NSStringCompareOptions, - ) -> NSComparisonResult { - msg_send![self, compare: string, options: mask] - } - pub unsafe fn compare_options_range( - &self, - string: &NSString, - mask: NSStringCompareOptions, - rangeOfReceiverToCompare: NSRange, - ) -> NSComparisonResult { - msg_send![ - self, - compare: string, - options: mask, - range: rangeOfReceiverToCompare - ] - } - pub unsafe fn compare_options_range_locale( - &self, - string: &NSString, - mask: NSStringCompareOptions, - rangeOfReceiverToCompare: NSRange, - locale: Option<&Object>, - ) -> NSComparisonResult { - msg_send![ - self, - compare: string, - options: mask, - range: rangeOfReceiverToCompare, - locale: locale - ] - } - pub unsafe fn caseInsensitiveCompare(&self, string: &NSString) -> NSComparisonResult { - msg_send![self, caseInsensitiveCompare: string] - } - pub unsafe fn localizedCompare(&self, string: &NSString) -> NSComparisonResult { - msg_send![self, localizedCompare: string] - } - pub unsafe fn localizedCaseInsensitiveCompare(&self, string: &NSString) -> NSComparisonResult { - msg_send![self, localizedCaseInsensitiveCompare: string] - } - pub unsafe fn localizedStandardCompare(&self, string: &NSString) -> NSComparisonResult { - msg_send![self, localizedStandardCompare: string] - } - pub unsafe fn isEqualToString(&self, aString: &NSString) -> bool { - msg_send![self, isEqualToString: aString] - } - pub unsafe fn hasPrefix(&self, str: &NSString) -> bool { - msg_send![self, hasPrefix: str] - } - pub unsafe fn hasSuffix(&self, str: &NSString) -> bool { - msg_send![self, hasSuffix: str] - } - pub unsafe fn commonPrefixWithString_options( - &self, - str: &NSString, - mask: NSStringCompareOptions, - ) -> Id { - msg_send_id![self, commonPrefixWithString: str, options: mask] - } - pub unsafe fn containsString(&self, str: &NSString) -> bool { - msg_send![self, containsString: str] - } - pub unsafe fn localizedCaseInsensitiveContainsString(&self, str: &NSString) -> bool { - msg_send![self, localizedCaseInsensitiveContainsString: str] - } - pub unsafe fn localizedStandardContainsString(&self, str: &NSString) -> bool { - msg_send![self, localizedStandardContainsString: str] - } - pub unsafe fn localizedStandardRangeOfString(&self, str: &NSString) -> NSRange { - msg_send![self, localizedStandardRangeOfString: str] - } - pub unsafe fn rangeOfString(&self, searchString: &NSString) -> NSRange { - msg_send![self, rangeOfString: searchString] - } - pub unsafe fn rangeOfString_options( - &self, - searchString: &NSString, - mask: NSStringCompareOptions, - ) -> NSRange { - msg_send![self, rangeOfString: searchString, options: mask] - } - pub unsafe fn rangeOfString_options_range( - &self, - searchString: &NSString, - mask: NSStringCompareOptions, - rangeOfReceiverToSearch: NSRange, - ) -> NSRange { - msg_send![ - self, - rangeOfString: searchString, - options: mask, - range: rangeOfReceiverToSearch - ] - } - pub unsafe fn rangeOfString_options_range_locale( - &self, - searchString: &NSString, - mask: NSStringCompareOptions, - rangeOfReceiverToSearch: NSRange, - locale: Option<&NSLocale>, - ) -> NSRange { - msg_send![ - self, - rangeOfString: searchString, - options: mask, - range: rangeOfReceiverToSearch, - locale: locale - ] - } - pub unsafe fn rangeOfCharacterFromSet(&self, searchSet: &NSCharacterSet) -> NSRange { - msg_send![self, rangeOfCharacterFromSet: searchSet] - } - pub unsafe fn rangeOfCharacterFromSet_options( - &self, - searchSet: &NSCharacterSet, - mask: NSStringCompareOptions, - ) -> NSRange { - msg_send![self, rangeOfCharacterFromSet: searchSet, options: mask] - } - pub unsafe fn rangeOfCharacterFromSet_options_range( - &self, - searchSet: &NSCharacterSet, - mask: NSStringCompareOptions, - rangeOfReceiverToSearch: NSRange, - ) -> NSRange { - msg_send![ - self, - rangeOfCharacterFromSet: searchSet, - options: mask, - range: rangeOfReceiverToSearch - ] - } - pub unsafe fn rangeOfComposedCharacterSequenceAtIndex(&self, index: NSUInteger) -> NSRange { - msg_send![self, rangeOfComposedCharacterSequenceAtIndex: index] - } - pub unsafe fn rangeOfComposedCharacterSequencesForRange(&self, range: NSRange) -> NSRange { - msg_send![self, rangeOfComposedCharacterSequencesForRange: range] - } - pub fn stringByAppendingString(&self, aString: &NSString) -> Id { - msg_send_id![self, stringByAppendingString: aString] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } - pub unsafe fn floatValue(&self) -> c_float { - msg_send![self, floatValue] - } - pub unsafe fn intValue(&self) -> c_int { - msg_send![self, intValue] - } - pub unsafe fn integerValue(&self) -> NSInteger { - msg_send![self, integerValue] - } - pub unsafe fn longLongValue(&self) -> c_longlong { - msg_send![self, longLongValue] - } - pub unsafe fn boolValue(&self) -> bool { - msg_send![self, boolValue] - } - pub unsafe fn uppercaseString(&self) -> Id { - msg_send_id![self, uppercaseString] - } - pub unsafe fn lowercaseString(&self) -> Id { - msg_send_id![self, lowercaseString] - } - pub unsafe fn capitalizedString(&self) -> Id { - msg_send_id![self, capitalizedString] - } - pub unsafe fn localizedUppercaseString(&self) -> Id { - msg_send_id![self, localizedUppercaseString] - } - pub unsafe fn localizedLowercaseString(&self) -> Id { - msg_send_id![self, localizedLowercaseString] - } - pub unsafe fn localizedCapitalizedString(&self) -> Id { - msg_send_id![self, localizedCapitalizedString] - } - pub unsafe fn uppercaseStringWithLocale( - &self, - locale: Option<&NSLocale>, - ) -> Id { - msg_send_id![self, uppercaseStringWithLocale: locale] - } - pub unsafe fn lowercaseStringWithLocale( - &self, - locale: Option<&NSLocale>, - ) -> Id { - msg_send_id![self, lowercaseStringWithLocale: locale] - } - pub unsafe fn capitalizedStringWithLocale( - &self, - locale: Option<&NSLocale>, - ) -> Id { - msg_send_id![self, capitalizedStringWithLocale: locale] - } - pub unsafe fn getLineStart_end_contentsEnd_forRange( - &self, - startPtr: *mut NSUInteger, - lineEndPtr: *mut NSUInteger, - contentsEndPtr: *mut NSUInteger, - range: NSRange, - ) { - msg_send![ - self, - getLineStart: startPtr, - end: lineEndPtr, - contentsEnd: contentsEndPtr, - forRange: range - ] - } - pub unsafe fn lineRangeForRange(&self, range: NSRange) -> NSRange { - msg_send![self, lineRangeForRange: range] - } - pub unsafe fn getParagraphStart_end_contentsEnd_forRange( - &self, - startPtr: *mut NSUInteger, - parEndPtr: *mut NSUInteger, - contentsEndPtr: *mut NSUInteger, - range: NSRange, - ) { - msg_send![ - self, - getParagraphStart: startPtr, - end: parEndPtr, - contentsEnd: contentsEndPtr, - forRange: range - ] - } - pub unsafe fn paragraphRangeForRange(&self, range: NSRange) -> NSRange { - msg_send![self, paragraphRangeForRange: range] - } - pub unsafe fn enumerateSubstringsInRange_options_usingBlock( - &self, - range: NSRange, - opts: NSStringEnumerationOptions, - block: TodoBlock, - ) { - msg_send![ - self, - enumerateSubstringsInRange: range, - options: opts, - usingBlock: block - ] - } - pub unsafe fn enumerateLinesUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateLinesUsingBlock: block] - } - pub fn UTF8String(&self) -> *mut c_char { - msg_send![self, UTF8String] - } - pub unsafe fn fastestEncoding(&self) -> NSStringEncoding { - msg_send![self, fastestEncoding] - } - pub unsafe fn smallestEncoding(&self) -> NSStringEncoding { - msg_send![self, smallestEncoding] - } - pub unsafe fn dataUsingEncoding_allowLossyConversion( - &self, - encoding: NSStringEncoding, - lossy: bool, - ) -> Option> { - msg_send_id![ - self, - dataUsingEncoding: encoding, - allowLossyConversion: lossy - ] - } - pub unsafe fn dataUsingEncoding( - &self, - encoding: NSStringEncoding, - ) -> Option> { - msg_send_id![self, dataUsingEncoding: encoding] - } - pub unsafe fn canBeConvertedToEncoding(&self, encoding: NSStringEncoding) -> bool { - msg_send![self, canBeConvertedToEncoding: encoding] - } - pub unsafe fn cStringUsingEncoding(&self, encoding: NSStringEncoding) -> *mut c_char { - msg_send![self, cStringUsingEncoding: encoding] - } - pub unsafe fn getCString_maxLength_encoding( - &self, - buffer: NonNull, - maxBufferCount: NSUInteger, - encoding: NSStringEncoding, - ) -> bool { - msg_send![ - self, - getCString: buffer, - maxLength: maxBufferCount, - encoding: encoding - ] - } - pub unsafe fn getBytes_maxLength_usedLength_encoding_options_range_remainingRange( - &self, - buffer: *mut c_void, - maxBufferCount: NSUInteger, - usedBufferCount: *mut NSUInteger, - encoding: NSStringEncoding, - options: NSStringEncodingConversionOptions, - range: NSRange, - leftover: NSRangePointer, - ) -> bool { - msg_send![ - self, - getBytes: buffer, - maxLength: maxBufferCount, - usedLength: usedBufferCount, - encoding: encoding, - options: options, - range: range, - remainingRange: leftover - ] - } - pub unsafe fn maximumLengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger { - msg_send![self, maximumLengthOfBytesUsingEncoding: enc] - } - pub fn lengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger { - msg_send![self, lengthOfBytesUsingEncoding: enc] - } - pub unsafe fn availableStringEncodings() -> NonNull { - msg_send![Self::class(), availableStringEncodings] - } - pub unsafe fn localizedNameOfStringEncoding( - encoding: NSStringEncoding, - ) -> Id { - msg_send_id![Self::class(), localizedNameOfStringEncoding: encoding] - } - pub unsafe fn defaultCStringEncoding() -> NSStringEncoding { - msg_send![Self::class(), defaultCStringEncoding] - } - pub unsafe fn decomposedStringWithCanonicalMapping(&self) -> Id { - msg_send_id![self, decomposedStringWithCanonicalMapping] - } - pub unsafe fn precomposedStringWithCanonicalMapping(&self) -> Id { - msg_send_id![self, precomposedStringWithCanonicalMapping] - } - pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id { - msg_send_id![self, decomposedStringWithCompatibilityMapping] - } - pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id { - msg_send_id![self, precomposedStringWithCompatibilityMapping] +extern_methods!( + #[doc = "NSStringExtensionMethods"] + unsafe impl NSString { + pub unsafe fn substringFromIndex(&self, from: NSUInteger) -> Id { + msg_send_id![self, substringFromIndex: from] + } + pub unsafe fn substringToIndex(&self, to: NSUInteger) -> Id { + msg_send_id![self, substringToIndex: to] + } + pub unsafe fn substringWithRange(&self, range: NSRange) -> Id { + msg_send_id![self, substringWithRange: range] + } + pub unsafe fn getCharacters_range(&self, buffer: NonNull, range: NSRange) { + msg_send![self, getCharacters: buffer, range: range] + } + pub unsafe fn compare(&self, string: &NSString) -> NSComparisonResult { + msg_send![self, compare: string] + } + pub unsafe fn compare_options( + &self, + string: &NSString, + mask: NSStringCompareOptions, + ) -> NSComparisonResult { + msg_send![self, compare: string, options: mask] + } + pub unsafe fn compare_options_range( + &self, + string: &NSString, + mask: NSStringCompareOptions, + rangeOfReceiverToCompare: NSRange, + ) -> NSComparisonResult { + msg_send![ + self, + compare: string, + options: mask, + range: rangeOfReceiverToCompare + ] + } + pub unsafe fn compare_options_range_locale( + &self, + string: &NSString, + mask: NSStringCompareOptions, + rangeOfReceiverToCompare: NSRange, + locale: Option<&Object>, + ) -> NSComparisonResult { + msg_send![ + self, + compare: string, + options: mask, + range: rangeOfReceiverToCompare, + locale: locale + ] + } + pub unsafe fn caseInsensitiveCompare(&self, string: &NSString) -> NSComparisonResult { + msg_send![self, caseInsensitiveCompare: string] + } + pub unsafe fn localizedCompare(&self, string: &NSString) -> NSComparisonResult { + msg_send![self, localizedCompare: string] + } + pub unsafe fn localizedCaseInsensitiveCompare( + &self, + string: &NSString, + ) -> NSComparisonResult { + msg_send![self, localizedCaseInsensitiveCompare: string] + } + pub unsafe fn localizedStandardCompare(&self, string: &NSString) -> NSComparisonResult { + msg_send![self, localizedStandardCompare: string] + } + pub unsafe fn isEqualToString(&self, aString: &NSString) -> bool { + msg_send![self, isEqualToString: aString] + } + pub unsafe fn hasPrefix(&self, str: &NSString) -> bool { + msg_send![self, hasPrefix: str] + } + pub unsafe fn hasSuffix(&self, str: &NSString) -> bool { + msg_send![self, hasSuffix: str] + } + pub unsafe fn commonPrefixWithString_options( + &self, + str: &NSString, + mask: NSStringCompareOptions, + ) -> Id { + msg_send_id![self, commonPrefixWithString: str, options: mask] + } + pub unsafe fn containsString(&self, str: &NSString) -> bool { + msg_send![self, containsString: str] + } + pub unsafe fn localizedCaseInsensitiveContainsString(&self, str: &NSString) -> bool { + msg_send![self, localizedCaseInsensitiveContainsString: str] + } + pub unsafe fn localizedStandardContainsString(&self, str: &NSString) -> bool { + msg_send![self, localizedStandardContainsString: str] + } + pub unsafe fn localizedStandardRangeOfString(&self, str: &NSString) -> NSRange { + msg_send![self, localizedStandardRangeOfString: str] + } + pub unsafe fn rangeOfString(&self, searchString: &NSString) -> NSRange { + msg_send![self, rangeOfString: searchString] + } + pub unsafe fn rangeOfString_options( + &self, + searchString: &NSString, + mask: NSStringCompareOptions, + ) -> NSRange { + msg_send![self, rangeOfString: searchString, options: mask] + } + pub unsafe fn rangeOfString_options_range( + &self, + searchString: &NSString, + mask: NSStringCompareOptions, + rangeOfReceiverToSearch: NSRange, + ) -> NSRange { + msg_send![ + self, + rangeOfString: searchString, + options: mask, + range: rangeOfReceiverToSearch + ] + } + pub unsafe fn rangeOfString_options_range_locale( + &self, + searchString: &NSString, + mask: NSStringCompareOptions, + rangeOfReceiverToSearch: NSRange, + locale: Option<&NSLocale>, + ) -> NSRange { + msg_send![ + self, + rangeOfString: searchString, + options: mask, + range: rangeOfReceiverToSearch, + locale: locale + ] + } + pub unsafe fn rangeOfCharacterFromSet(&self, searchSet: &NSCharacterSet) -> NSRange { + msg_send![self, rangeOfCharacterFromSet: searchSet] + } + pub unsafe fn rangeOfCharacterFromSet_options( + &self, + searchSet: &NSCharacterSet, + mask: NSStringCompareOptions, + ) -> NSRange { + msg_send![self, rangeOfCharacterFromSet: searchSet, options: mask] + } + pub unsafe fn rangeOfCharacterFromSet_options_range( + &self, + searchSet: &NSCharacterSet, + mask: NSStringCompareOptions, + rangeOfReceiverToSearch: NSRange, + ) -> NSRange { + msg_send![ + self, + rangeOfCharacterFromSet: searchSet, + options: mask, + range: rangeOfReceiverToSearch + ] + } + pub unsafe fn rangeOfComposedCharacterSequenceAtIndex(&self, index: NSUInteger) -> NSRange { + msg_send![self, rangeOfComposedCharacterSequenceAtIndex: index] + } + pub unsafe fn rangeOfComposedCharacterSequencesForRange(&self, range: NSRange) -> NSRange { + msg_send![self, rangeOfComposedCharacterSequencesForRange: range] + } + pub fn stringByAppendingString(&self, aString: &NSString) -> Id { + msg_send_id![self, stringByAppendingString: aString] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } + pub unsafe fn floatValue(&self) -> c_float { + msg_send![self, floatValue] + } + pub unsafe fn intValue(&self) -> c_int { + msg_send![self, intValue] + } + pub unsafe fn integerValue(&self) -> NSInteger { + msg_send![self, integerValue] + } + pub unsafe fn longLongValue(&self) -> c_longlong { + msg_send![self, longLongValue] + } + pub unsafe fn boolValue(&self) -> bool { + msg_send![self, boolValue] + } + pub unsafe fn uppercaseString(&self) -> Id { + msg_send_id![self, uppercaseString] + } + pub unsafe fn lowercaseString(&self) -> Id { + msg_send_id![self, lowercaseString] + } + pub unsafe fn capitalizedString(&self) -> Id { + msg_send_id![self, capitalizedString] + } + pub unsafe fn localizedUppercaseString(&self) -> Id { + msg_send_id![self, localizedUppercaseString] + } + pub unsafe fn localizedLowercaseString(&self) -> Id { + msg_send_id![self, localizedLowercaseString] + } + pub unsafe fn localizedCapitalizedString(&self) -> Id { + msg_send_id![self, localizedCapitalizedString] + } + pub unsafe fn uppercaseStringWithLocale( + &self, + locale: Option<&NSLocale>, + ) -> Id { + msg_send_id![self, uppercaseStringWithLocale: locale] + } + pub unsafe fn lowercaseStringWithLocale( + &self, + locale: Option<&NSLocale>, + ) -> Id { + msg_send_id![self, lowercaseStringWithLocale: locale] + } + pub unsafe fn capitalizedStringWithLocale( + &self, + locale: Option<&NSLocale>, + ) -> Id { + msg_send_id![self, capitalizedStringWithLocale: locale] + } + pub unsafe fn getLineStart_end_contentsEnd_forRange( + &self, + startPtr: *mut NSUInteger, + lineEndPtr: *mut NSUInteger, + contentsEndPtr: *mut NSUInteger, + range: NSRange, + ) { + msg_send![ + self, + getLineStart: startPtr, + end: lineEndPtr, + contentsEnd: contentsEndPtr, + forRange: range + ] + } + pub unsafe fn lineRangeForRange(&self, range: NSRange) -> NSRange { + msg_send![self, lineRangeForRange: range] + } + pub unsafe fn getParagraphStart_end_contentsEnd_forRange( + &self, + startPtr: *mut NSUInteger, + parEndPtr: *mut NSUInteger, + contentsEndPtr: *mut NSUInteger, + range: NSRange, + ) { + msg_send![ + self, + getParagraphStart: startPtr, + end: parEndPtr, + contentsEnd: contentsEndPtr, + forRange: range + ] + } + pub unsafe fn paragraphRangeForRange(&self, range: NSRange) -> NSRange { + msg_send![self, paragraphRangeForRange: range] + } + pub unsafe fn enumerateSubstringsInRange_options_usingBlock( + &self, + range: NSRange, + opts: NSStringEnumerationOptions, + block: TodoBlock, + ) { + msg_send![ + self, + enumerateSubstringsInRange: range, + options: opts, + usingBlock: block + ] + } + pub unsafe fn enumerateLinesUsingBlock(&self, block: TodoBlock) { + msg_send![self, enumerateLinesUsingBlock: block] + } + pub fn UTF8String(&self) -> *mut c_char { + msg_send![self, UTF8String] + } + pub unsafe fn fastestEncoding(&self) -> NSStringEncoding { + msg_send![self, fastestEncoding] + } + pub unsafe fn smallestEncoding(&self) -> NSStringEncoding { + msg_send![self, smallestEncoding] + } + pub unsafe fn dataUsingEncoding_allowLossyConversion( + &self, + encoding: NSStringEncoding, + lossy: bool, + ) -> Option> { + msg_send_id![ + self, + dataUsingEncoding: encoding, + allowLossyConversion: lossy + ] + } + pub unsafe fn dataUsingEncoding( + &self, + encoding: NSStringEncoding, + ) -> Option> { + msg_send_id![self, dataUsingEncoding: encoding] + } + pub unsafe fn canBeConvertedToEncoding(&self, encoding: NSStringEncoding) -> bool { + msg_send![self, canBeConvertedToEncoding: encoding] + } + pub unsafe fn cStringUsingEncoding(&self, encoding: NSStringEncoding) -> *mut c_char { + msg_send![self, cStringUsingEncoding: encoding] + } + pub unsafe fn getCString_maxLength_encoding( + &self, + buffer: NonNull, + maxBufferCount: NSUInteger, + encoding: NSStringEncoding, + ) -> bool { + msg_send![ + self, + getCString: buffer, + maxLength: maxBufferCount, + encoding: encoding + ] + } + pub unsafe fn getBytes_maxLength_usedLength_encoding_options_range_remainingRange( + &self, + buffer: *mut c_void, + maxBufferCount: NSUInteger, + usedBufferCount: *mut NSUInteger, + encoding: NSStringEncoding, + options: NSStringEncodingConversionOptions, + range: NSRange, + leftover: NSRangePointer, + ) -> bool { + msg_send![ + self, + getBytes: buffer, + maxLength: maxBufferCount, + usedLength: usedBufferCount, + encoding: encoding, + options: options, + range: range, + remainingRange: leftover + ] + } + pub unsafe fn maximumLengthOfBytesUsingEncoding( + &self, + enc: NSStringEncoding, + ) -> NSUInteger { + msg_send![self, maximumLengthOfBytesUsingEncoding: enc] + } + pub fn lengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger { + msg_send![self, lengthOfBytesUsingEncoding: enc] + } + pub unsafe fn availableStringEncodings() -> NonNull { + msg_send![Self::class(), availableStringEncodings] + } + pub unsafe fn localizedNameOfStringEncoding( + encoding: NSStringEncoding, + ) -> Id { + msg_send_id![Self::class(), localizedNameOfStringEncoding: encoding] + } + pub unsafe fn defaultCStringEncoding() -> NSStringEncoding { + msg_send![Self::class(), defaultCStringEncoding] + } + pub unsafe fn decomposedStringWithCanonicalMapping(&self) -> Id { + msg_send_id![self, decomposedStringWithCanonicalMapping] + } + pub unsafe fn precomposedStringWithCanonicalMapping(&self) -> Id { + msg_send_id![self, precomposedStringWithCanonicalMapping] + } + pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id { + msg_send_id![self, decomposedStringWithCompatibilityMapping] + } + pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id { + msg_send_id![self, precomposedStringWithCompatibilityMapping] + } + pub unsafe fn componentsSeparatedByString( + &self, + separator: &NSString, + ) -> Id, Shared> { + msg_send_id![self, componentsSeparatedByString: separator] + } + pub unsafe fn componentsSeparatedByCharactersInSet( + &self, + separator: &NSCharacterSet, + ) -> Id, Shared> { + msg_send_id![self, componentsSeparatedByCharactersInSet: separator] + } + pub unsafe fn stringByTrimmingCharactersInSet( + &self, + set: &NSCharacterSet, + ) -> Id { + msg_send_id![self, stringByTrimmingCharactersInSet: set] + } + pub unsafe fn stringByPaddingToLength_withString_startingAtIndex( + &self, + newLength: NSUInteger, + padString: &NSString, + padIndex: NSUInteger, + ) -> Id { + msg_send_id![ + self, + stringByPaddingToLength: newLength, + withString: padString, + startingAtIndex: padIndex + ] + } + pub unsafe fn stringByFoldingWithOptions_locale( + &self, + options: NSStringCompareOptions, + locale: Option<&NSLocale>, + ) -> Id { + msg_send_id![self, stringByFoldingWithOptions: options, locale: locale] + } + pub unsafe fn stringByReplacingOccurrencesOfString_withString_options_range( + &self, + target: &NSString, + replacement: &NSString, + options: NSStringCompareOptions, + searchRange: NSRange, + ) -> Id { + msg_send_id![ + self, + stringByReplacingOccurrencesOfString: target, + withString: replacement, + options: options, + range: searchRange + ] + } + pub unsafe fn stringByReplacingOccurrencesOfString_withString( + &self, + target: &NSString, + replacement: &NSString, + ) -> Id { + msg_send_id![ + self, + stringByReplacingOccurrencesOfString: target, + withString: replacement + ] + } + pub unsafe fn stringByReplacingCharactersInRange_withString( + &self, + range: NSRange, + replacement: &NSString, + ) -> Id { + msg_send_id![ + self, + stringByReplacingCharactersInRange: range, + withString: replacement + ] + } + pub unsafe fn stringByApplyingTransform_reverse( + &self, + transform: &NSStringTransform, + reverse: bool, + ) -> Option> { + msg_send_id![self, stringByApplyingTransform: transform, reverse: reverse] + } + pub unsafe fn writeToURL_atomically_encoding_error( + &self, + url: &NSURL, + useAuxiliaryFile: bool, + enc: NSStringEncoding, + ) -> Result<(), Id> { + msg_send![ + self, + writeToURL: url, + atomically: useAuxiliaryFile, + encoding: enc, + error: _ + ] + } + pub unsafe fn writeToFile_atomically_encoding_error( + &self, + path: &NSString, + useAuxiliaryFile: bool, + enc: NSStringEncoding, + ) -> Result<(), Id> { + msg_send![ + self, + writeToFile: path, + atomically: useAuxiliaryFile, + encoding: enc, + error: _ + ] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn hash(&self) -> NSUInteger { + msg_send![self, hash] + } + pub unsafe fn initWithCharactersNoCopy_length_freeWhenDone( + &self, + characters: NonNull, + length: NSUInteger, + freeBuffer: bool, + ) -> Id { + msg_send_id![ + self, + initWithCharactersNoCopy: characters, + length: length, + freeWhenDone: freeBuffer + ] + } + pub unsafe fn initWithCharactersNoCopy_length_deallocator( + &self, + chars: NonNull, + len: NSUInteger, + deallocator: TodoBlock, + ) -> Id { + msg_send_id![ + self, + initWithCharactersNoCopy: chars, + length: len, + deallocator: deallocator + ] + } + pub unsafe fn initWithCharacters_length( + &self, + characters: NonNull, + length: NSUInteger, + ) -> Id { + msg_send_id![self, initWithCharacters: characters, length: length] + } + pub unsafe fn initWithUTF8String( + &self, + nullTerminatedCString: NonNull, + ) -> Option> { + msg_send_id![self, initWithUTF8String: nullTerminatedCString] + } + pub unsafe fn initWithString(&self, aString: &NSString) -> Id { + msg_send_id![self, initWithString: aString] + } + pub unsafe fn initWithFormat_arguments( + &self, + format: &NSString, + argList: va_list, + ) -> Id { + msg_send_id![self, initWithFormat: format, arguments: argList] + } + pub unsafe fn initWithFormat_locale_arguments( + &self, + format: &NSString, + locale: Option<&Object>, + argList: va_list, + ) -> Id { + msg_send_id![ + self, + initWithFormat: format, + locale: locale, + arguments: argList + ] + } + pub unsafe fn initWithData_encoding( + &self, + data: &NSData, + encoding: NSStringEncoding, + ) -> Option> { + msg_send_id![self, initWithData: data, encoding: encoding] + } + pub unsafe fn initWithBytes_length_encoding( + &self, + bytes: NonNull, + len: NSUInteger, + encoding: NSStringEncoding, + ) -> Option> { + msg_send_id![self, initWithBytes: bytes, length: len, encoding: encoding] + } + pub unsafe fn initWithBytesNoCopy_length_encoding_freeWhenDone( + &self, + bytes: NonNull, + len: NSUInteger, + encoding: NSStringEncoding, + freeBuffer: bool, + ) -> Option> { + msg_send_id![ + self, + initWithBytesNoCopy: bytes, + length: len, + encoding: encoding, + freeWhenDone: freeBuffer + ] + } + pub unsafe fn initWithBytesNoCopy_length_encoding_deallocator( + &self, + bytes: NonNull, + len: NSUInteger, + encoding: NSStringEncoding, + deallocator: TodoBlock, + ) -> Option> { + msg_send_id![ + self, + initWithBytesNoCopy: bytes, + length: len, + encoding: encoding, + deallocator: deallocator + ] + } + pub unsafe fn string() -> Id { + msg_send_id![Self::class(), string] + } + pub unsafe fn stringWithString(string: &NSString) -> Id { + msg_send_id![Self::class(), stringWithString: string] + } + pub unsafe fn stringWithCharacters_length( + characters: NonNull, + length: NSUInteger, + ) -> Id { + msg_send_id![ + Self::class(), + stringWithCharacters: characters, + length: length + ] + } + pub unsafe fn stringWithUTF8String( + nullTerminatedCString: NonNull, + ) -> Option> { + msg_send_id![Self::class(), stringWithUTF8String: nullTerminatedCString] + } + pub unsafe fn initWithCString_encoding( + &self, + nullTerminatedCString: NonNull, + encoding: NSStringEncoding, + ) -> Option> { + msg_send_id![ + self, + initWithCString: nullTerminatedCString, + encoding: encoding + ] + } + pub unsafe fn stringWithCString_encoding( + cString: NonNull, + enc: NSStringEncoding, + ) -> Option> { + msg_send_id![Self::class(), stringWithCString: cString, encoding: enc] + } + pub unsafe fn initWithContentsOfURL_encoding_error( + &self, + url: &NSURL, + enc: NSStringEncoding, + ) -> Result, Id> { + msg_send_id![self, initWithContentsOfURL: url, encoding: enc, error: _] + } + pub unsafe fn initWithContentsOfFile_encoding_error( + &self, + path: &NSString, + enc: NSStringEncoding, + ) -> Result, Id> { + msg_send_id![self, initWithContentsOfFile: path, encoding: enc, error: _] + } + pub unsafe fn stringWithContentsOfURL_encoding_error( + url: &NSURL, + enc: NSStringEncoding, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + stringWithContentsOfURL: url, + encoding: enc, + error: _ + ] + } + pub unsafe fn stringWithContentsOfFile_encoding_error( + path: &NSString, + enc: NSStringEncoding, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + stringWithContentsOfFile: path, + encoding: enc, + error: _ + ] + } + pub unsafe fn initWithContentsOfURL_usedEncoding_error( + &self, + url: &NSURL, + enc: *mut NSStringEncoding, + ) -> Result, Id> { + msg_send_id![ + self, + initWithContentsOfURL: url, + usedEncoding: enc, + error: _ + ] + } + pub unsafe fn initWithContentsOfFile_usedEncoding_error( + &self, + path: &NSString, + enc: *mut NSStringEncoding, + ) -> Result, Id> { + msg_send_id![ + self, + initWithContentsOfFile: path, + usedEncoding: enc, + error: _ + ] + } + pub unsafe fn stringWithContentsOfURL_usedEncoding_error( + url: &NSURL, + enc: *mut NSStringEncoding, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + stringWithContentsOfURL: url, + usedEncoding: enc, + error: _ + ] + } + pub unsafe fn stringWithContentsOfFile_usedEncoding_error( + path: &NSString, + enc: *mut NSStringEncoding, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + stringWithContentsOfFile: path, + usedEncoding: enc, + error: _ + ] + } } - pub unsafe fn componentsSeparatedByString( - &self, - separator: &NSString, - ) -> Id, Shared> { - msg_send_id![self, componentsSeparatedByString: separator] - } - pub unsafe fn componentsSeparatedByCharactersInSet( - &self, - separator: &NSCharacterSet, - ) -> Id, Shared> { - msg_send_id![self, componentsSeparatedByCharactersInSet: separator] - } - pub unsafe fn stringByTrimmingCharactersInSet( - &self, - set: &NSCharacterSet, - ) -> Id { - msg_send_id![self, stringByTrimmingCharactersInSet: set] - } - pub unsafe fn stringByPaddingToLength_withString_startingAtIndex( - &self, - newLength: NSUInteger, - padString: &NSString, - padIndex: NSUInteger, - ) -> Id { - msg_send_id![ - self, - stringByPaddingToLength: newLength, - withString: padString, - startingAtIndex: padIndex - ] - } - pub unsafe fn stringByFoldingWithOptions_locale( - &self, - options: NSStringCompareOptions, - locale: Option<&NSLocale>, - ) -> Id { - msg_send_id![self, stringByFoldingWithOptions: options, locale: locale] - } - pub unsafe fn stringByReplacingOccurrencesOfString_withString_options_range( - &self, - target: &NSString, - replacement: &NSString, - options: NSStringCompareOptions, - searchRange: NSRange, - ) -> Id { - msg_send_id![ - self, - stringByReplacingOccurrencesOfString: target, - withString: replacement, - options: options, - range: searchRange - ] - } - pub unsafe fn stringByReplacingOccurrencesOfString_withString( - &self, - target: &NSString, - replacement: &NSString, - ) -> Id { - msg_send_id![ - self, - stringByReplacingOccurrencesOfString: target, - withString: replacement - ] - } - pub unsafe fn stringByReplacingCharactersInRange_withString( - &self, - range: NSRange, - replacement: &NSString, - ) -> Id { - msg_send_id![ - self, - stringByReplacingCharactersInRange: range, - withString: replacement - ] - } - pub unsafe fn stringByApplyingTransform_reverse( - &self, - transform: &NSStringTransform, - reverse: bool, - ) -> Option> { - msg_send_id![self, stringByApplyingTransform: transform, reverse: reverse] - } - pub unsafe fn writeToURL_atomically_encoding_error( - &self, - url: &NSURL, - useAuxiliaryFile: bool, - enc: NSStringEncoding, - ) -> Result<(), Id> { - msg_send![ - self, - writeToURL: url, - atomically: useAuxiliaryFile, - encoding: enc, - error: _ - ] - } - pub unsafe fn writeToFile_atomically_encoding_error( - &self, - path: &NSString, - useAuxiliaryFile: bool, - enc: NSStringEncoding, - ) -> Result<(), Id> { - msg_send![ - self, - writeToFile: path, - atomically: useAuxiliaryFile, - encoding: enc, - error: _ - ] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn hash(&self) -> NSUInteger { - msg_send![self, hash] - } - pub unsafe fn initWithCharactersNoCopy_length_freeWhenDone( - &self, - characters: NonNull, - length: NSUInteger, - freeBuffer: bool, - ) -> Id { - msg_send_id![ - self, - initWithCharactersNoCopy: characters, - length: length, - freeWhenDone: freeBuffer - ] - } - pub unsafe fn initWithCharactersNoCopy_length_deallocator( - &self, - chars: NonNull, - len: NSUInteger, - deallocator: TodoBlock, - ) -> Id { - msg_send_id![ - self, - initWithCharactersNoCopy: chars, - length: len, - deallocator: deallocator - ] - } - pub unsafe fn initWithCharacters_length( - &self, - characters: NonNull, - length: NSUInteger, - ) -> Id { - msg_send_id![self, initWithCharacters: characters, length: length] - } - pub unsafe fn initWithUTF8String( - &self, - nullTerminatedCString: NonNull, - ) -> Option> { - msg_send_id![self, initWithUTF8String: nullTerminatedCString] - } - pub unsafe fn initWithString(&self, aString: &NSString) -> Id { - msg_send_id![self, initWithString: aString] - } - pub unsafe fn initWithFormat_arguments( - &self, - format: &NSString, - argList: va_list, - ) -> Id { - msg_send_id![self, initWithFormat: format, arguments: argList] - } - pub unsafe fn initWithFormat_locale_arguments( - &self, - format: &NSString, - locale: Option<&Object>, - argList: va_list, - ) -> Id { - msg_send_id![ - self, - initWithFormat: format, - locale: locale, - arguments: argList - ] - } - pub unsafe fn initWithData_encoding( - &self, - data: &NSData, - encoding: NSStringEncoding, - ) -> Option> { - msg_send_id![self, initWithData: data, encoding: encoding] - } - pub unsafe fn initWithBytes_length_encoding( - &self, - bytes: NonNull, - len: NSUInteger, - encoding: NSStringEncoding, - ) -> Option> { - msg_send_id![self, initWithBytes: bytes, length: len, encoding: encoding] - } - pub unsafe fn initWithBytesNoCopy_length_encoding_freeWhenDone( - &self, - bytes: NonNull, - len: NSUInteger, - encoding: NSStringEncoding, - freeBuffer: bool, - ) -> Option> { - msg_send_id![ - self, - initWithBytesNoCopy: bytes, - length: len, - encoding: encoding, - freeWhenDone: freeBuffer - ] - } - pub unsafe fn initWithBytesNoCopy_length_encoding_deallocator( - &self, - bytes: NonNull, - len: NSUInteger, - encoding: NSStringEncoding, - deallocator: TodoBlock, - ) -> Option> { - msg_send_id![ - self, - initWithBytesNoCopy: bytes, - length: len, - encoding: encoding, - deallocator: deallocator - ] - } - pub unsafe fn string() -> Id { - msg_send_id![Self::class(), string] - } - pub unsafe fn stringWithString(string: &NSString) -> Id { - msg_send_id![Self::class(), stringWithString: string] - } - pub unsafe fn stringWithCharacters_length( - characters: NonNull, - length: NSUInteger, - ) -> Id { - msg_send_id![ - Self::class(), - stringWithCharacters: characters, - length: length - ] - } - pub unsafe fn stringWithUTF8String( - nullTerminatedCString: NonNull, - ) -> Option> { - msg_send_id![Self::class(), stringWithUTF8String: nullTerminatedCString] - } - pub unsafe fn initWithCString_encoding( - &self, - nullTerminatedCString: NonNull, - encoding: NSStringEncoding, - ) -> Option> { - msg_send_id![ - self, - initWithCString: nullTerminatedCString, - encoding: encoding - ] - } - pub unsafe fn stringWithCString_encoding( - cString: NonNull, - enc: NSStringEncoding, - ) -> Option> { - msg_send_id![Self::class(), stringWithCString: cString, encoding: enc] - } - pub unsafe fn initWithContentsOfURL_encoding_error( - &self, - url: &NSURL, - enc: NSStringEncoding, - ) -> Result, Id> { - msg_send_id![self, initWithContentsOfURL: url, encoding: enc, error: _] - } - pub unsafe fn initWithContentsOfFile_encoding_error( - &self, - path: &NSString, - enc: NSStringEncoding, - ) -> Result, Id> { - msg_send_id![self, initWithContentsOfFile: path, encoding: enc, error: _] - } - pub unsafe fn stringWithContentsOfURL_encoding_error( - url: &NSURL, - enc: NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - stringWithContentsOfURL: url, - encoding: enc, - error: _ - ] - } - pub unsafe fn stringWithContentsOfFile_encoding_error( - path: &NSString, - enc: NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - stringWithContentsOfFile: path, - encoding: enc, - error: _ - ] - } - pub unsafe fn initWithContentsOfURL_usedEncoding_error( - &self, - url: &NSURL, - enc: *mut NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - self, - initWithContentsOfURL: url, - usedEncoding: enc, - error: _ - ] - } - pub unsafe fn initWithContentsOfFile_usedEncoding_error( - &self, - path: &NSString, - enc: *mut NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - self, - initWithContentsOfFile: path, - usedEncoding: enc, - error: _ - ] - } - pub unsafe fn stringWithContentsOfURL_usedEncoding_error( - url: &NSURL, - enc: *mut NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - stringWithContentsOfURL: url, - usedEncoding: enc, - error: _ - ] - } - pub unsafe fn stringWithContentsOfFile_usedEncoding_error( - path: &NSString, - enc: *mut NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - stringWithContentsOfFile: path, - usedEncoding: enc, - error: _ - ] - } -} +); pub type NSStringEncodingDetectionOptionsKey = NSString; -#[doc = "NSStringEncodingDetection"] -impl NSString { - pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( - data: &NSData, - opts: Option<&NSDictionary>, - string: Option<&mut Option>>, - usedLossyConversion: *mut bool, - ) -> NSStringEncoding { - msg_send![ - Self::class(), - stringEncodingForData: data, - encodingOptions: opts, - convertedString: string, - usedLossyConversion: usedLossyConversion - ] +extern_methods!( + #[doc = "NSStringEncodingDetection"] + unsafe impl NSString { + pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( + data: &NSData, + opts: Option<&NSDictionary>, + string: Option<&mut Option>>, + usedLossyConversion: *mut bool, + ) -> NSStringEncoding { + msg_send![ + Self::class(), + stringEncodingForData: data, + encodingOptions: opts, + convertedString: string, + usedLossyConversion: usedLossyConversion + ] + } } -} -#[doc = "NSItemProvider"] -impl NSString {} +); +extern_methods!( + #[doc = "NSItemProvider"] + unsafe impl NSString {} +); extern_class!( #[derive(Debug)] pub struct NSMutableString; @@ -769,157 +783,173 @@ extern_class!( type Super = NSString; } ); -impl NSMutableString { - pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, aString: &NSString) { - msg_send![self, replaceCharactersInRange: range, withString: aString] - } -} -#[doc = "NSMutableStringExtensionMethods"] -impl NSMutableString { - pub unsafe fn insertString_atIndex(&self, aString: &NSString, loc: NSUInteger) { - msg_send![self, insertString: aString, atIndex: loc] - } - pub unsafe fn deleteCharactersInRange(&self, range: NSRange) { - msg_send![self, deleteCharactersInRange: range] - } - pub unsafe fn appendString(&self, aString: &NSString) { - msg_send![self, appendString: aString] - } - pub unsafe fn setString(&self, aString: &NSString) { - msg_send![self, setString: aString] - } - pub unsafe fn replaceOccurrencesOfString_withString_options_range( - &self, - target: &NSString, - replacement: &NSString, - options: NSStringCompareOptions, - searchRange: NSRange, - ) -> NSUInteger { - msg_send![ - self, - replaceOccurrencesOfString: target, - withString: replacement, - options: options, - range: searchRange - ] - } - pub unsafe fn applyTransform_reverse_range_updatedRange( - &self, - transform: &NSStringTransform, - reverse: bool, - range: NSRange, - resultingRange: NSRangePointer, - ) -> bool { - msg_send![ - self, - applyTransform: transform, - reverse: reverse, - range: range, - updatedRange: resultingRange - ] - } - pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: capacity] - } - pub unsafe fn stringWithCapacity(capacity: NSUInteger) -> Id { - msg_send_id![Self::class(), stringWithCapacity: capacity] - } -} -#[doc = "NSExtendedStringPropertyListParsing"] -impl NSString { - pub unsafe fn propertyList(&self) -> Id { - msg_send_id![self, propertyList] - } - pub unsafe fn propertyListFromStringsFileFormat(&self) -> Option> { - msg_send_id![self, propertyListFromStringsFileFormat] - } -} -#[doc = "NSStringDeprecated"] -impl NSString { - pub unsafe fn cString(&self) -> *mut c_char { - msg_send![self, cString] - } - pub unsafe fn lossyCString(&self) -> *mut c_char { - msg_send![self, lossyCString] - } - pub unsafe fn cStringLength(&self) -> NSUInteger { - msg_send![self, cStringLength] +extern_methods!( + unsafe impl NSMutableString { + pub unsafe fn replaceCharactersInRange_withString( + &self, + range: NSRange, + aString: &NSString, + ) { + msg_send![self, replaceCharactersInRange: range, withString: aString] + } } - pub unsafe fn getCString(&self, bytes: NonNull) { - msg_send![self, getCString: bytes] - } - pub unsafe fn getCString_maxLength(&self, bytes: NonNull, maxLength: NSUInteger) { - msg_send![self, getCString: bytes, maxLength: maxLength] - } - pub unsafe fn getCString_maxLength_range_remainingRange( - &self, - bytes: NonNull, - maxLength: NSUInteger, - aRange: NSRange, - leftoverRange: NSRangePointer, - ) { - msg_send![ - self, - getCString: bytes, - maxLength: maxLength, - range: aRange, - remainingRange: leftoverRange - ] - } - pub unsafe fn writeToFile_atomically(&self, path: &NSString, useAuxiliaryFile: bool) -> bool { - msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] - } - pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { - msg_send![self, writeToURL: url, atomically: atomically] - } - pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithContentsOfFile: path] - } - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithContentsOfURL: url] - } - pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option> { - msg_send_id![Self::class(), stringWithContentsOfFile: path] - } - pub unsafe fn stringWithContentsOfURL(url: &NSURL) -> Option> { - msg_send_id![Self::class(), stringWithContentsOfURL: url] - } - pub unsafe fn initWithCStringNoCopy_length_freeWhenDone( - &self, - bytes: NonNull, - length: NSUInteger, - freeBuffer: bool, - ) -> Option> { - msg_send_id![ - self, - initWithCStringNoCopy: bytes, - length: length, - freeWhenDone: freeBuffer - ] - } - pub unsafe fn initWithCString_length( - &self, - bytes: NonNull, - length: NSUInteger, - ) -> Option> { - msg_send_id![self, initWithCString: bytes, length: length] - } - pub unsafe fn initWithCString(&self, bytes: NonNull) -> Option> { - msg_send_id![self, initWithCString: bytes] - } - pub unsafe fn stringWithCString_length( - bytes: NonNull, - length: NSUInteger, - ) -> Option> { - msg_send_id![Self::class(), stringWithCString: bytes, length: length] +); +extern_methods!( + #[doc = "NSMutableStringExtensionMethods"] + unsafe impl NSMutableString { + pub unsafe fn insertString_atIndex(&self, aString: &NSString, loc: NSUInteger) { + msg_send![self, insertString: aString, atIndex: loc] + } + pub unsafe fn deleteCharactersInRange(&self, range: NSRange) { + msg_send![self, deleteCharactersInRange: range] + } + pub unsafe fn appendString(&self, aString: &NSString) { + msg_send![self, appendString: aString] + } + pub unsafe fn setString(&self, aString: &NSString) { + msg_send![self, setString: aString] + } + pub unsafe fn replaceOccurrencesOfString_withString_options_range( + &self, + target: &NSString, + replacement: &NSString, + options: NSStringCompareOptions, + searchRange: NSRange, + ) -> NSUInteger { + msg_send![ + self, + replaceOccurrencesOfString: target, + withString: replacement, + options: options, + range: searchRange + ] + } + pub unsafe fn applyTransform_reverse_range_updatedRange( + &self, + transform: &NSStringTransform, + reverse: bool, + range: NSRange, + resultingRange: NSRangePointer, + ) -> bool { + msg_send![ + self, + applyTransform: transform, + reverse: reverse, + range: range, + updatedRange: resultingRange + ] + } + pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Id { + msg_send_id![self, initWithCapacity: capacity] + } + pub unsafe fn stringWithCapacity(capacity: NSUInteger) -> Id { + msg_send_id![Self::class(), stringWithCapacity: capacity] + } } - pub unsafe fn stringWithCString(bytes: NonNull) -> Option> { - msg_send_id![Self::class(), stringWithCString: bytes] +); +extern_methods!( + #[doc = "NSExtendedStringPropertyListParsing"] + unsafe impl NSString { + pub unsafe fn propertyList(&self) -> Id { + msg_send_id![self, propertyList] + } + pub unsafe fn propertyListFromStringsFileFormat(&self) -> Option> { + msg_send_id![self, propertyListFromStringsFileFormat] + } } - pub unsafe fn getCharacters(&self, buffer: NonNull) { - msg_send![self, getCharacters: buffer] +); +extern_methods!( + #[doc = "NSStringDeprecated"] + unsafe impl NSString { + pub unsafe fn cString(&self) -> *mut c_char { + msg_send![self, cString] + } + pub unsafe fn lossyCString(&self) -> *mut c_char { + msg_send![self, lossyCString] + } + pub unsafe fn cStringLength(&self) -> NSUInteger { + msg_send![self, cStringLength] + } + pub unsafe fn getCString(&self, bytes: NonNull) { + msg_send![self, getCString: bytes] + } + pub unsafe fn getCString_maxLength(&self, bytes: NonNull, maxLength: NSUInteger) { + msg_send![self, getCString: bytes, maxLength: maxLength] + } + pub unsafe fn getCString_maxLength_range_remainingRange( + &self, + bytes: NonNull, + maxLength: NSUInteger, + aRange: NSRange, + leftoverRange: NSRangePointer, + ) { + msg_send![ + self, + getCString: bytes, + maxLength: maxLength, + range: aRange, + remainingRange: leftoverRange + ] + } + pub unsafe fn writeToFile_atomically( + &self, + path: &NSString, + useAuxiliaryFile: bool, + ) -> bool { + msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] + } + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { + msg_send![self, writeToURL: url, atomically: atomically] + } + pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option> { + msg_send_id![self, initWithContentsOfFile: path] + } + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithContentsOfURL: url] + } + pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option> { + msg_send_id![Self::class(), stringWithContentsOfFile: path] + } + pub unsafe fn stringWithContentsOfURL(url: &NSURL) -> Option> { + msg_send_id![Self::class(), stringWithContentsOfURL: url] + } + pub unsafe fn initWithCStringNoCopy_length_freeWhenDone( + &self, + bytes: NonNull, + length: NSUInteger, + freeBuffer: bool, + ) -> Option> { + msg_send_id![ + self, + initWithCStringNoCopy: bytes, + length: length, + freeWhenDone: freeBuffer + ] + } + pub unsafe fn initWithCString_length( + &self, + bytes: NonNull, + length: NSUInteger, + ) -> Option> { + msg_send_id![self, initWithCString: bytes, length: length] + } + pub unsafe fn initWithCString(&self, bytes: NonNull) -> Option> { + msg_send_id![self, initWithCString: bytes] + } + pub unsafe fn stringWithCString_length( + bytes: NonNull, + length: NSUInteger, + ) -> Option> { + msg_send_id![Self::class(), stringWithCString: bytes, length: length] + } + pub unsafe fn stringWithCString(bytes: NonNull) -> Option> { + msg_send_id![Self::class(), stringWithCString: bytes] + } + pub unsafe fn getCharacters(&self, buffer: NonNull) { + msg_send![self, getCharacters: buffer] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSSimpleCString; @@ -927,7 +957,9 @@ extern_class!( type Super = NSString; } ); -impl NSSimpleCString {} +extern_methods!( + unsafe impl NSSimpleCString {} +); extern_class!( #[derive(Debug)] pub struct NSConstantString; @@ -935,4 +967,6 @@ extern_class!( type Super = NSSimpleCString; } ); -impl NSConstantString {} +extern_methods!( + unsafe impl NSConstantString {} +); diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index c630555be..d2c26b751 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSTask; @@ -14,137 +14,146 @@ extern_class!( type Super = NSObject; } ); -impl NSTask { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] +extern_methods!( + unsafe impl NSTask { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn executableURL(&self) -> Option> { + msg_send_id![self, executableURL] + } + pub unsafe fn setExecutableURL(&self, executableURL: Option<&NSURL>) { + msg_send![self, setExecutableURL: executableURL] + } + pub unsafe fn arguments(&self) -> Option, Shared>> { + msg_send_id![self, arguments] + } + pub unsafe fn setArguments(&self, arguments: Option<&NSArray>) { + msg_send![self, setArguments: arguments] + } + pub unsafe fn environment(&self) -> Option, Shared>> { + msg_send_id![self, environment] + } + pub unsafe fn setEnvironment( + &self, + environment: Option<&NSDictionary>, + ) { + msg_send![self, setEnvironment: environment] + } + pub unsafe fn currentDirectoryURL(&self) -> Option> { + msg_send_id![self, currentDirectoryURL] + } + pub unsafe fn setCurrentDirectoryURL(&self, currentDirectoryURL: Option<&NSURL>) { + msg_send![self, setCurrentDirectoryURL: currentDirectoryURL] + } + pub unsafe fn standardInput(&self) -> Option> { + msg_send_id![self, standardInput] + } + pub unsafe fn setStandardInput(&self, standardInput: Option<&Object>) { + msg_send![self, setStandardInput: standardInput] + } + pub unsafe fn standardOutput(&self) -> Option> { + msg_send_id![self, standardOutput] + } + pub unsafe fn setStandardOutput(&self, standardOutput: Option<&Object>) { + msg_send![self, setStandardOutput: standardOutput] + } + pub unsafe fn standardError(&self) -> Option> { + msg_send_id![self, standardError] + } + pub unsafe fn setStandardError(&self, standardError: Option<&Object>) { + msg_send![self, setStandardError: standardError] + } + pub unsafe fn launchAndReturnError(&self) -> Result<(), Id> { + msg_send![self, launchAndReturnError: _] + } + pub unsafe fn interrupt(&self) { + msg_send![self, interrupt] + } + pub unsafe fn terminate(&self) { + msg_send![self, terminate] + } + pub unsafe fn suspend(&self) -> bool { + msg_send![self, suspend] + } + pub unsafe fn resume(&self) -> bool { + msg_send![self, resume] + } + pub unsafe fn processIdentifier(&self) -> c_int { + msg_send![self, processIdentifier] + } + pub unsafe fn isRunning(&self) -> bool { + msg_send![self, isRunning] + } + pub unsafe fn terminationStatus(&self) -> c_int { + msg_send![self, terminationStatus] + } + pub unsafe fn terminationReason(&self) -> NSTaskTerminationReason { + msg_send![self, terminationReason] + } + pub unsafe fn terminationHandler(&self) -> TodoBlock { + msg_send![self, terminationHandler] + } + pub unsafe fn setTerminationHandler(&self, terminationHandler: TodoBlock) { + msg_send![self, setTerminationHandler: terminationHandler] + } + pub unsafe fn qualityOfService(&self) -> NSQualityOfService { + msg_send![self, qualityOfService] + } + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { + msg_send![self, setQualityOfService: qualityOfService] + } } - pub unsafe fn executableURL(&self) -> Option> { - msg_send_id![self, executableURL] - } - pub unsafe fn setExecutableURL(&self, executableURL: Option<&NSURL>) { - msg_send![self, setExecutableURL: executableURL] - } - pub unsafe fn arguments(&self) -> Option, Shared>> { - msg_send_id![self, arguments] - } - pub unsafe fn setArguments(&self, arguments: Option<&NSArray>) { - msg_send![self, setArguments: arguments] - } - pub unsafe fn environment(&self) -> Option, Shared>> { - msg_send_id![self, environment] - } - pub unsafe fn setEnvironment(&self, environment: Option<&NSDictionary>) { - msg_send![self, setEnvironment: environment] - } - pub unsafe fn currentDirectoryURL(&self) -> Option> { - msg_send_id![self, currentDirectoryURL] - } - pub unsafe fn setCurrentDirectoryURL(&self, currentDirectoryURL: Option<&NSURL>) { - msg_send![self, setCurrentDirectoryURL: currentDirectoryURL] - } - pub unsafe fn standardInput(&self) -> Option> { - msg_send_id![self, standardInput] - } - pub unsafe fn setStandardInput(&self, standardInput: Option<&Object>) { - msg_send![self, setStandardInput: standardInput] - } - pub unsafe fn standardOutput(&self) -> Option> { - msg_send_id![self, standardOutput] - } - pub unsafe fn setStandardOutput(&self, standardOutput: Option<&Object>) { - msg_send![self, setStandardOutput: standardOutput] - } - pub unsafe fn standardError(&self) -> Option> { - msg_send_id![self, standardError] - } - pub unsafe fn setStandardError(&self, standardError: Option<&Object>) { - msg_send![self, setStandardError: standardError] - } - pub unsafe fn launchAndReturnError(&self) -> Result<(), Id> { - msg_send![self, launchAndReturnError: _] - } - pub unsafe fn interrupt(&self) { - msg_send![self, interrupt] - } - pub unsafe fn terminate(&self) { - msg_send![self, terminate] - } - pub unsafe fn suspend(&self) -> bool { - msg_send![self, suspend] - } - pub unsafe fn resume(&self) -> bool { - msg_send![self, resume] - } - pub unsafe fn processIdentifier(&self) -> c_int { - msg_send![self, processIdentifier] - } - pub unsafe fn isRunning(&self) -> bool { - msg_send![self, isRunning] - } - pub unsafe fn terminationStatus(&self) -> c_int { - msg_send![self, terminationStatus] - } - pub unsafe fn terminationReason(&self) -> NSTaskTerminationReason { - msg_send![self, terminationReason] - } - pub unsafe fn terminationHandler(&self) -> TodoBlock { - msg_send![self, terminationHandler] - } - pub unsafe fn setTerminationHandler(&self, terminationHandler: TodoBlock) { - msg_send![self, setTerminationHandler: terminationHandler] - } - pub unsafe fn qualityOfService(&self) -> NSQualityOfService { - msg_send![self, qualityOfService] - } - pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { - msg_send![self, setQualityOfService: qualityOfService] - } -} -#[doc = "NSTaskConveniences"] -impl NSTask { - pub unsafe fn launchedTaskWithExecutableURL_arguments_error_terminationHandler( - url: &NSURL, - arguments: &NSArray, - error: *mut *mut NSError, - terminationHandler: TodoBlock, - ) -> Option> { - msg_send_id![ - Self::class(), - launchedTaskWithExecutableURL: url, - arguments: arguments, - error: error, - terminationHandler: terminationHandler - ] - } - pub unsafe fn waitUntilExit(&self) { - msg_send![self, waitUntilExit] - } -} -#[doc = "NSDeprecated"] -impl NSTask { - pub unsafe fn launchPath(&self) -> Option> { - msg_send_id![self, launchPath] - } - pub unsafe fn setLaunchPath(&self, launchPath: Option<&NSString>) { - msg_send![self, setLaunchPath: launchPath] - } - pub unsafe fn currentDirectoryPath(&self) -> Id { - msg_send_id![self, currentDirectoryPath] - } - pub unsafe fn setCurrentDirectoryPath(&self, currentDirectoryPath: &NSString) { - msg_send![self, setCurrentDirectoryPath: currentDirectoryPath] - } - pub unsafe fn launch(&self) { - msg_send![self, launch] +); +extern_methods!( + #[doc = "NSTaskConveniences"] + unsafe impl NSTask { + pub unsafe fn launchedTaskWithExecutableURL_arguments_error_terminationHandler( + url: &NSURL, + arguments: &NSArray, + error: *mut *mut NSError, + terminationHandler: TodoBlock, + ) -> Option> { + msg_send_id![ + Self::class(), + launchedTaskWithExecutableURL: url, + arguments: arguments, + error: error, + terminationHandler: terminationHandler + ] + } + pub unsafe fn waitUntilExit(&self) { + msg_send![self, waitUntilExit] + } } - pub unsafe fn launchedTaskWithLaunchPath_arguments( - path: &NSString, - arguments: &NSArray, - ) -> Id { - msg_send_id![ - Self::class(), - launchedTaskWithLaunchPath: path, - arguments: arguments - ] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSTask { + pub unsafe fn launchPath(&self) -> Option> { + msg_send_id![self, launchPath] + } + pub unsafe fn setLaunchPath(&self, launchPath: Option<&NSString>) { + msg_send![self, setLaunchPath: launchPath] + } + pub unsafe fn currentDirectoryPath(&self) -> Id { + msg_send_id![self, currentDirectoryPath] + } + pub unsafe fn setCurrentDirectoryPath(&self, currentDirectoryPath: &NSString) { + msg_send![self, setCurrentDirectoryPath: currentDirectoryPath] + } + pub unsafe fn launch(&self) { + msg_send![self, launch] + } + pub unsafe fn launchedTaskWithLaunchPath_arguments( + path: &NSString, + arguments: &NSArray, + ) -> Id { + msg_send_id![ + Self::class(), + launchedTaskWithLaunchPath: path, + arguments: arguments + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 037fd84fd..42b34293c 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -12,7 +12,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSTextCheckingTypes = u64; pub type NSTextCheckingKey = NSString; extern_class!( @@ -22,221 +22,229 @@ extern_class!( type Super = NSObject; } ); -impl NSTextCheckingResult { - pub unsafe fn resultType(&self) -> NSTextCheckingType { - msg_send![self, resultType] +extern_methods!( + unsafe impl NSTextCheckingResult { + pub unsafe fn resultType(&self) -> NSTextCheckingType { + msg_send![self, resultType] + } + pub unsafe fn range(&self) -> NSRange { + msg_send![self, range] + } } - pub unsafe fn range(&self) -> NSRange { - msg_send![self, range] - } -} -#[doc = "NSTextCheckingResultOptional"] -impl NSTextCheckingResult { - pub unsafe fn orthography(&self) -> Option> { - msg_send_id![self, orthography] - } - pub unsafe fn grammarDetails( - &self, - ) -> Option>, Shared>> { - msg_send_id![self, grammarDetails] - } - pub unsafe fn date(&self) -> Option> { - msg_send_id![self, date] - } - pub unsafe fn timeZone(&self) -> Option> { - msg_send_id![self, timeZone] - } - pub unsafe fn duration(&self) -> NSTimeInterval { - msg_send![self, duration] - } - pub unsafe fn components( - &self, - ) -> Option, Shared>> { - msg_send_id![self, components] - } - pub unsafe fn URL(&self) -> Option> { - msg_send_id![self, URL] - } - pub unsafe fn replacementString(&self) -> Option> { - msg_send_id![self, replacementString] - } - pub unsafe fn alternativeStrings(&self) -> Option, Shared>> { - msg_send_id![self, alternativeStrings] - } - pub unsafe fn regularExpression(&self) -> Option> { - msg_send_id![self, regularExpression] - } - pub unsafe fn phoneNumber(&self) -> Option> { - msg_send_id![self, phoneNumber] - } - pub unsafe fn numberOfRanges(&self) -> NSUInteger { - msg_send![self, numberOfRanges] - } - pub unsafe fn rangeAtIndex(&self, idx: NSUInteger) -> NSRange { - msg_send![self, rangeAtIndex: idx] - } - pub unsafe fn rangeWithName(&self, name: &NSString) -> NSRange { - msg_send![self, rangeWithName: name] - } - pub unsafe fn resultByAdjustingRangesWithOffset( - &self, - offset: NSInteger, - ) -> Id { - msg_send_id![self, resultByAdjustingRangesWithOffset: offset] - } - pub unsafe fn addressComponents( - &self, - ) -> Option, Shared>> { - msg_send_id![self, addressComponents] - } -} -#[doc = "NSTextCheckingResultCreation"] -impl NSTextCheckingResult { - pub unsafe fn orthographyCheckingResultWithRange_orthography( - range: NSRange, - orthography: &NSOrthography, - ) -> Id { - msg_send_id![ - Self::class(), - orthographyCheckingResultWithRange: range, - orthography: orthography - ] - } - pub unsafe fn spellCheckingResultWithRange(range: NSRange) -> Id { - msg_send_id![Self::class(), spellCheckingResultWithRange: range] - } - pub unsafe fn grammarCheckingResultWithRange_details( - range: NSRange, - details: &NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - grammarCheckingResultWithRange: range, - details: details - ] - } - pub unsafe fn dateCheckingResultWithRange_date( - range: NSRange, - date: &NSDate, - ) -> Id { - msg_send_id![ - Self::class(), - dateCheckingResultWithRange: range, - date: date - ] - } - pub unsafe fn dateCheckingResultWithRange_date_timeZone_duration( - range: NSRange, - date: &NSDate, - timeZone: &NSTimeZone, - duration: NSTimeInterval, - ) -> Id { - msg_send_id![ - Self::class(), - dateCheckingResultWithRange: range, - date: date, - timeZone: timeZone, - duration: duration - ] - } - pub unsafe fn addressCheckingResultWithRange_components( - range: NSRange, - components: &NSDictionary, - ) -> Id { - msg_send_id![ - Self::class(), - addressCheckingResultWithRange: range, - components: components - ] - } - pub unsafe fn linkCheckingResultWithRange_URL( - range: NSRange, - url: &NSURL, - ) -> Id { - msg_send_id![Self::class(), linkCheckingResultWithRange: range, URL: url] - } - pub unsafe fn quoteCheckingResultWithRange_replacementString( - range: NSRange, - replacementString: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - quoteCheckingResultWithRange: range, - replacementString: replacementString - ] - } - pub unsafe fn dashCheckingResultWithRange_replacementString( - range: NSRange, - replacementString: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - dashCheckingResultWithRange: range, - replacementString: replacementString - ] - } - pub unsafe fn replacementCheckingResultWithRange_replacementString( - range: NSRange, - replacementString: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - replacementCheckingResultWithRange: range, - replacementString: replacementString - ] - } - pub unsafe fn correctionCheckingResultWithRange_replacementString( - range: NSRange, - replacementString: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - correctionCheckingResultWithRange: range, - replacementString: replacementString - ] - } - pub unsafe fn correctionCheckingResultWithRange_replacementString_alternativeStrings( - range: NSRange, - replacementString: &NSString, - alternativeStrings: &NSArray, - ) -> Id { - msg_send_id![ - Self::class(), - correctionCheckingResultWithRange: range, - replacementString: replacementString, - alternativeStrings: alternativeStrings - ] - } - pub unsafe fn regularExpressionCheckingResultWithRanges_count_regularExpression( - ranges: NSRangePointer, - count: NSUInteger, - regularExpression: &NSRegularExpression, - ) -> Id { - msg_send_id![ - Self::class(), - regularExpressionCheckingResultWithRanges: ranges, - count: count, - regularExpression: regularExpression - ] - } - pub unsafe fn phoneNumberCheckingResultWithRange_phoneNumber( - range: NSRange, - phoneNumber: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - phoneNumberCheckingResultWithRange: range, - phoneNumber: phoneNumber - ] +); +extern_methods!( + #[doc = "NSTextCheckingResultOptional"] + unsafe impl NSTextCheckingResult { + pub unsafe fn orthography(&self) -> Option> { + msg_send_id![self, orthography] + } + pub unsafe fn grammarDetails( + &self, + ) -> Option>, Shared>> { + msg_send_id![self, grammarDetails] + } + pub unsafe fn date(&self) -> Option> { + msg_send_id![self, date] + } + pub unsafe fn timeZone(&self) -> Option> { + msg_send_id![self, timeZone] + } + pub unsafe fn duration(&self) -> NSTimeInterval { + msg_send![self, duration] + } + pub unsafe fn components( + &self, + ) -> Option, Shared>> { + msg_send_id![self, components] + } + pub unsafe fn URL(&self) -> Option> { + msg_send_id![self, URL] + } + pub unsafe fn replacementString(&self) -> Option> { + msg_send_id![self, replacementString] + } + pub unsafe fn alternativeStrings(&self) -> Option, Shared>> { + msg_send_id![self, alternativeStrings] + } + pub unsafe fn regularExpression(&self) -> Option> { + msg_send_id![self, regularExpression] + } + pub unsafe fn phoneNumber(&self) -> Option> { + msg_send_id![self, phoneNumber] + } + pub unsafe fn numberOfRanges(&self) -> NSUInteger { + msg_send![self, numberOfRanges] + } + pub unsafe fn rangeAtIndex(&self, idx: NSUInteger) -> NSRange { + msg_send![self, rangeAtIndex: idx] + } + pub unsafe fn rangeWithName(&self, name: &NSString) -> NSRange { + msg_send![self, rangeWithName: name] + } + pub unsafe fn resultByAdjustingRangesWithOffset( + &self, + offset: NSInteger, + ) -> Id { + msg_send_id![self, resultByAdjustingRangesWithOffset: offset] + } + pub unsafe fn addressComponents( + &self, + ) -> Option, Shared>> { + msg_send_id![self, addressComponents] + } } - pub unsafe fn transitInformationCheckingResultWithRange_components( - range: NSRange, - components: &NSDictionary, - ) -> Id { - msg_send_id![ - Self::class(), - transitInformationCheckingResultWithRange: range, - components: components - ] +); +extern_methods!( + #[doc = "NSTextCheckingResultCreation"] + unsafe impl NSTextCheckingResult { + pub unsafe fn orthographyCheckingResultWithRange_orthography( + range: NSRange, + orthography: &NSOrthography, + ) -> Id { + msg_send_id![ + Self::class(), + orthographyCheckingResultWithRange: range, + orthography: orthography + ] + } + pub unsafe fn spellCheckingResultWithRange( + range: NSRange, + ) -> Id { + msg_send_id![Self::class(), spellCheckingResultWithRange: range] + } + pub unsafe fn grammarCheckingResultWithRange_details( + range: NSRange, + details: &NSArray>, + ) -> Id { + msg_send_id![ + Self::class(), + grammarCheckingResultWithRange: range, + details: details + ] + } + pub unsafe fn dateCheckingResultWithRange_date( + range: NSRange, + date: &NSDate, + ) -> Id { + msg_send_id![ + Self::class(), + dateCheckingResultWithRange: range, + date: date + ] + } + pub unsafe fn dateCheckingResultWithRange_date_timeZone_duration( + range: NSRange, + date: &NSDate, + timeZone: &NSTimeZone, + duration: NSTimeInterval, + ) -> Id { + msg_send_id![ + Self::class(), + dateCheckingResultWithRange: range, + date: date, + timeZone: timeZone, + duration: duration + ] + } + pub unsafe fn addressCheckingResultWithRange_components( + range: NSRange, + components: &NSDictionary, + ) -> Id { + msg_send_id![ + Self::class(), + addressCheckingResultWithRange: range, + components: components + ] + } + pub unsafe fn linkCheckingResultWithRange_URL( + range: NSRange, + url: &NSURL, + ) -> Id { + msg_send_id![Self::class(), linkCheckingResultWithRange: range, URL: url] + } + pub unsafe fn quoteCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + quoteCheckingResultWithRange: range, + replacementString: replacementString + ] + } + pub unsafe fn dashCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + dashCheckingResultWithRange: range, + replacementString: replacementString + ] + } + pub unsafe fn replacementCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + replacementCheckingResultWithRange: range, + replacementString: replacementString + ] + } + pub unsafe fn correctionCheckingResultWithRange_replacementString( + range: NSRange, + replacementString: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + correctionCheckingResultWithRange: range, + replacementString: replacementString + ] + } + pub unsafe fn correctionCheckingResultWithRange_replacementString_alternativeStrings( + range: NSRange, + replacementString: &NSString, + alternativeStrings: &NSArray, + ) -> Id { + msg_send_id![ + Self::class(), + correctionCheckingResultWithRange: range, + replacementString: replacementString, + alternativeStrings: alternativeStrings + ] + } + pub unsafe fn regularExpressionCheckingResultWithRanges_count_regularExpression( + ranges: NSRangePointer, + count: NSUInteger, + regularExpression: &NSRegularExpression, + ) -> Id { + msg_send_id![ + Self::class(), + regularExpressionCheckingResultWithRanges: ranges, + count: count, + regularExpression: regularExpression + ] + } + pub unsafe fn phoneNumberCheckingResultWithRange_phoneNumber( + range: NSRange, + phoneNumber: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + phoneNumberCheckingResultWithRange: range, + phoneNumber: phoneNumber + ] + } + pub unsafe fn transitInformationCheckingResultWithRange_components( + range: NSRange, + components: &NSDictionary, + ) -> Id { + msg_send_id![ + Self::class(), + transitInformationCheckingResultWithRange: range, + components: components + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index f061da8b0..d35a4de12 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSThread; @@ -17,194 +17,198 @@ extern_class!( type Super = NSObject; } ); -impl NSThread { - pub unsafe fn currentThread() -> Id { - msg_send_id![Self::class(), currentThread] +extern_methods!( + unsafe impl NSThread { + pub unsafe fn currentThread() -> Id { + msg_send_id![Self::class(), currentThread] + } + pub unsafe fn detachNewThreadWithBlock(block: TodoBlock) { + msg_send![Self::class(), detachNewThreadWithBlock: block] + } + pub unsafe fn detachNewThreadSelector_toTarget_withObject( + selector: Sel, + target: &Object, + argument: Option<&Object>, + ) { + msg_send![ + Self::class(), + detachNewThreadSelector: selector, + toTarget: target, + withObject: argument + ] + } + pub unsafe fn isMultiThreaded() -> bool { + msg_send![Self::class(), isMultiThreaded] + } + pub unsafe fn threadDictionary(&self) -> Id { + msg_send_id![self, threadDictionary] + } + pub unsafe fn sleepUntilDate(date: &NSDate) { + msg_send![Self::class(), sleepUntilDate: date] + } + pub unsafe fn sleepForTimeInterval(ti: NSTimeInterval) { + msg_send![Self::class(), sleepForTimeInterval: ti] + } + pub unsafe fn exit() { + msg_send![Self::class(), exit] + } + pub unsafe fn threadPriority() -> c_double { + msg_send![Self::class(), threadPriority] + } + pub unsafe fn setThreadPriority(p: c_double) -> bool { + msg_send![Self::class(), setThreadPriority: p] + } + pub unsafe fn threadPriority(&self) -> c_double { + msg_send![self, threadPriority] + } + pub unsafe fn setThreadPriority(&self, threadPriority: c_double) { + msg_send![self, setThreadPriority: threadPriority] + } + pub unsafe fn qualityOfService(&self) -> NSQualityOfService { + msg_send![self, qualityOfService] + } + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { + msg_send![self, setQualityOfService: qualityOfService] + } + pub unsafe fn callStackReturnAddresses() -> Id, Shared> { + msg_send_id![Self::class(), callStackReturnAddresses] + } + pub unsafe fn callStackSymbols() -> Id, Shared> { + msg_send_id![Self::class(), callStackSymbols] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } + pub unsafe fn stackSize(&self) -> NSUInteger { + msg_send![self, stackSize] + } + pub unsafe fn setStackSize(&self, stackSize: NSUInteger) { + msg_send![self, setStackSize: stackSize] + } + pub unsafe fn isMainThread(&self) -> bool { + msg_send![self, isMainThread] + } + pub unsafe fn isMainThread() -> bool { + msg_send![Self::class(), isMainThread] + } + pub unsafe fn mainThread() -> Id { + msg_send_id![Self::class(), mainThread] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithTarget_selector_object( + &self, + target: &Object, + selector: Sel, + argument: Option<&Object>, + ) -> Id { + msg_send_id![ + self, + initWithTarget: target, + selector: selector, + object: argument + ] + } + pub unsafe fn initWithBlock(&self, block: TodoBlock) -> Id { + msg_send_id![self, initWithBlock: block] + } + pub unsafe fn isExecuting(&self) -> bool { + msg_send![self, isExecuting] + } + pub unsafe fn isFinished(&self) -> bool { + msg_send![self, isFinished] + } + pub unsafe fn isCancelled(&self) -> bool { + msg_send![self, isCancelled] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn start(&self) { + msg_send![self, start] + } + pub unsafe fn main(&self) { + msg_send![self, main] + } } - pub unsafe fn detachNewThreadWithBlock(block: TodoBlock) { - msg_send![Self::class(), detachNewThreadWithBlock: block] - } - pub unsafe fn detachNewThreadSelector_toTarget_withObject( - selector: Sel, - target: &Object, - argument: Option<&Object>, - ) { - msg_send![ - Self::class(), - detachNewThreadSelector: selector, - toTarget: target, - withObject: argument - ] - } - pub unsafe fn isMultiThreaded() -> bool { - msg_send![Self::class(), isMultiThreaded] - } - pub unsafe fn threadDictionary(&self) -> Id { - msg_send_id![self, threadDictionary] - } - pub unsafe fn sleepUntilDate(date: &NSDate) { - msg_send![Self::class(), sleepUntilDate: date] - } - pub unsafe fn sleepForTimeInterval(ti: NSTimeInterval) { - msg_send![Self::class(), sleepForTimeInterval: ti] - } - pub unsafe fn exit() { - msg_send![Self::class(), exit] - } - pub unsafe fn threadPriority() -> c_double { - msg_send![Self::class(), threadPriority] - } - pub unsafe fn setThreadPriority(p: c_double) -> bool { - msg_send![Self::class(), setThreadPriority: p] - } - pub unsafe fn threadPriority(&self) -> c_double { - msg_send![self, threadPriority] - } - pub unsafe fn setThreadPriority(&self, threadPriority: c_double) { - msg_send![self, setThreadPriority: threadPriority] - } - pub unsafe fn qualityOfService(&self) -> NSQualityOfService { - msg_send![self, qualityOfService] - } - pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { - msg_send![self, setQualityOfService: qualityOfService] - } - pub unsafe fn callStackReturnAddresses() -> Id, Shared> { - msg_send_id![Self::class(), callStackReturnAddresses] - } - pub unsafe fn callStackSymbols() -> Id, Shared> { - msg_send_id![Self::class(), callStackSymbols] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } - pub unsafe fn stackSize(&self) -> NSUInteger { - msg_send![self, stackSize] - } - pub unsafe fn setStackSize(&self, stackSize: NSUInteger) { - msg_send![self, setStackSize: stackSize] - } - pub unsafe fn isMainThread(&self) -> bool { - msg_send![self, isMainThread] - } - pub unsafe fn isMainThread() -> bool { - msg_send![Self::class(), isMainThread] - } - pub unsafe fn mainThread() -> Id { - msg_send_id![Self::class(), mainThread] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithTarget_selector_object( - &self, - target: &Object, - selector: Sel, - argument: Option<&Object>, - ) -> Id { - msg_send_id![ - self, - initWithTarget: target, - selector: selector, - object: argument - ] - } - pub unsafe fn initWithBlock(&self, block: TodoBlock) -> Id { - msg_send_id![self, initWithBlock: block] - } - pub unsafe fn isExecuting(&self) -> bool { - msg_send![self, isExecuting] - } - pub unsafe fn isFinished(&self) -> bool { - msg_send![self, isFinished] - } - pub unsafe fn isCancelled(&self) -> bool { - msg_send![self, isCancelled] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn start(&self) { - msg_send![self, start] - } - pub unsafe fn main(&self) { - msg_send![self, main] - } -} -#[doc = "NSThreadPerformAdditions"] -impl NSObject { - pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone_modes( - &self, - aSelector: Sel, - arg: Option<&Object>, - wait: bool, - array: Option<&NSArray>, - ) { - msg_send![ - self, - performSelectorOnMainThread: aSelector, - withObject: arg, - waitUntilDone: wait, - modes: array - ] - } - pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone( - &self, - aSelector: Sel, - arg: Option<&Object>, - wait: bool, - ) { - msg_send![ - self, - performSelectorOnMainThread: aSelector, - withObject: arg, - waitUntilDone: wait - ] - } - pub unsafe fn performSelector_onThread_withObject_waitUntilDone_modes( - &self, - aSelector: Sel, - thr: &NSThread, - arg: Option<&Object>, - wait: bool, - array: Option<&NSArray>, - ) { - msg_send![ - self, - performSelector: aSelector, - onThread: thr, - withObject: arg, - waitUntilDone: wait, - modes: array - ] - } - pub unsafe fn performSelector_onThread_withObject_waitUntilDone( - &self, - aSelector: Sel, - thr: &NSThread, - arg: Option<&Object>, - wait: bool, - ) { - msg_send![ - self, - performSelector: aSelector, - onThread: thr, - withObject: arg, - waitUntilDone: wait - ] - } - pub unsafe fn performSelectorInBackground_withObject( - &self, - aSelector: Sel, - arg: Option<&Object>, - ) { - msg_send![ - self, - performSelectorInBackground: aSelector, - withObject: arg - ] +); +extern_methods!( + #[doc = "NSThreadPerformAdditions"] + unsafe impl NSObject { + pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone_modes( + &self, + aSelector: Sel, + arg: Option<&Object>, + wait: bool, + array: Option<&NSArray>, + ) { + msg_send![ + self, + performSelectorOnMainThread: aSelector, + withObject: arg, + waitUntilDone: wait, + modes: array + ] + } + pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone( + &self, + aSelector: Sel, + arg: Option<&Object>, + wait: bool, + ) { + msg_send![ + self, + performSelectorOnMainThread: aSelector, + withObject: arg, + waitUntilDone: wait + ] + } + pub unsafe fn performSelector_onThread_withObject_waitUntilDone_modes( + &self, + aSelector: Sel, + thr: &NSThread, + arg: Option<&Object>, + wait: bool, + array: Option<&NSArray>, + ) { + msg_send![ + self, + performSelector: aSelector, + onThread: thr, + withObject: arg, + waitUntilDone: wait, + modes: array + ] + } + pub unsafe fn performSelector_onThread_withObject_waitUntilDone( + &self, + aSelector: Sel, + thr: &NSThread, + arg: Option<&Object>, + wait: bool, + ) { + msg_send![ + self, + performSelector: aSelector, + onThread: thr, + withObject: arg, + waitUntilDone: wait + ] + } + pub unsafe fn performSelectorInBackground_withObject( + &self, + aSelector: Sel, + arg: Option<&Object>, + ) { + msg_send![ + self, + performSelectorInBackground: aSelector, + withObject: arg + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index a411169f9..77c353155 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSTimeZone; @@ -18,120 +18,128 @@ extern_class!( type Super = NSObject; } ); -impl NSTimeZone { - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] +extern_methods!( + unsafe impl NSTimeZone { + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn data(&self) -> Id { + msg_send_id![self, data] + } + pub unsafe fn secondsFromGMTForDate(&self, aDate: &NSDate) -> NSInteger { + msg_send![self, secondsFromGMTForDate: aDate] + } + pub unsafe fn abbreviationForDate(&self, aDate: &NSDate) -> Option> { + msg_send_id![self, abbreviationForDate: aDate] + } + pub unsafe fn isDaylightSavingTimeForDate(&self, aDate: &NSDate) -> bool { + msg_send![self, isDaylightSavingTimeForDate: aDate] + } + pub unsafe fn daylightSavingTimeOffsetForDate(&self, aDate: &NSDate) -> NSTimeInterval { + msg_send![self, daylightSavingTimeOffsetForDate: aDate] + } + pub unsafe fn nextDaylightSavingTimeTransitionAfterDate( + &self, + aDate: &NSDate, + ) -> Option> { + msg_send_id![self, nextDaylightSavingTimeTransitionAfterDate: aDate] + } } - pub unsafe fn data(&self) -> Id { - msg_send_id![self, data] - } - pub unsafe fn secondsFromGMTForDate(&self, aDate: &NSDate) -> NSInteger { - msg_send![self, secondsFromGMTForDate: aDate] - } - pub unsafe fn abbreviationForDate(&self, aDate: &NSDate) -> Option> { - msg_send_id![self, abbreviationForDate: aDate] - } - pub unsafe fn isDaylightSavingTimeForDate(&self, aDate: &NSDate) -> bool { - msg_send![self, isDaylightSavingTimeForDate: aDate] - } - pub unsafe fn daylightSavingTimeOffsetForDate(&self, aDate: &NSDate) -> NSTimeInterval { - msg_send![self, daylightSavingTimeOffsetForDate: aDate] - } - pub unsafe fn nextDaylightSavingTimeTransitionAfterDate( - &self, - aDate: &NSDate, - ) -> Option> { - msg_send_id![self, nextDaylightSavingTimeTransitionAfterDate: aDate] - } -} -#[doc = "NSExtendedTimeZone"] -impl NSTimeZone { - pub unsafe fn systemTimeZone() -> Id { - msg_send_id![Self::class(), systemTimeZone] - } - pub unsafe fn resetSystemTimeZone() { - msg_send![Self::class(), resetSystemTimeZone] - } - pub unsafe fn defaultTimeZone() -> Id { - msg_send_id![Self::class(), defaultTimeZone] - } - pub unsafe fn setDefaultTimeZone(defaultTimeZone: &NSTimeZone) { - msg_send![Self::class(), setDefaultTimeZone: defaultTimeZone] - } - pub unsafe fn localTimeZone() -> Id { - msg_send_id![Self::class(), localTimeZone] - } - pub unsafe fn knownTimeZoneNames() -> Id, Shared> { - msg_send_id![Self::class(), knownTimeZoneNames] - } - pub unsafe fn abbreviationDictionary() -> Id, Shared> { - msg_send_id![Self::class(), abbreviationDictionary] - } - pub unsafe fn setAbbreviationDictionary( - abbreviationDictionary: &NSDictionary, - ) { - msg_send![ - Self::class(), - setAbbreviationDictionary: abbreviationDictionary - ] - } - pub unsafe fn timeZoneDataVersion() -> Id { - msg_send_id![Self::class(), timeZoneDataVersion] - } - pub unsafe fn secondsFromGMT(&self) -> NSInteger { - msg_send![self, secondsFromGMT] - } - pub unsafe fn abbreviation(&self) -> Option> { - msg_send_id![self, abbreviation] - } - pub unsafe fn isDaylightSavingTime(&self) -> bool { - msg_send![self, isDaylightSavingTime] - } - pub unsafe fn daylightSavingTimeOffset(&self) -> NSTimeInterval { - msg_send![self, daylightSavingTimeOffset] - } - pub unsafe fn nextDaylightSavingTimeTransition(&self) -> Option> { - msg_send_id![self, nextDaylightSavingTimeTransition] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool { - msg_send![self, isEqualToTimeZone: aTimeZone] - } - pub unsafe fn localizedName_locale( - &self, - style: NSTimeZoneNameStyle, - locale: Option<&NSLocale>, - ) -> Option> { - msg_send_id![self, localizedName: style, locale: locale] - } -} -#[doc = "NSTimeZoneCreation"] -impl NSTimeZone { - pub unsafe fn timeZoneWithName(tzName: &NSString) -> Option> { - msg_send_id![Self::class(), timeZoneWithName: tzName] - } - pub unsafe fn timeZoneWithName_data( - tzName: &NSString, - aData: Option<&NSData>, - ) -> Option> { - msg_send_id![Self::class(), timeZoneWithName: tzName, data: aData] - } - pub unsafe fn initWithName(&self, tzName: &NSString) -> Option> { - msg_send_id![self, initWithName: tzName] - } - pub unsafe fn initWithName_data( - &self, - tzName: &NSString, - aData: Option<&NSData>, - ) -> Option> { - msg_send_id![self, initWithName: tzName, data: aData] - } - pub unsafe fn timeZoneForSecondsFromGMT(seconds: NSInteger) -> Id { - msg_send_id![Self::class(), timeZoneForSecondsFromGMT: seconds] +); +extern_methods!( + #[doc = "NSExtendedTimeZone"] + unsafe impl NSTimeZone { + pub unsafe fn systemTimeZone() -> Id { + msg_send_id![Self::class(), systemTimeZone] + } + pub unsafe fn resetSystemTimeZone() { + msg_send![Self::class(), resetSystemTimeZone] + } + pub unsafe fn defaultTimeZone() -> Id { + msg_send_id![Self::class(), defaultTimeZone] + } + pub unsafe fn setDefaultTimeZone(defaultTimeZone: &NSTimeZone) { + msg_send![Self::class(), setDefaultTimeZone: defaultTimeZone] + } + pub unsafe fn localTimeZone() -> Id { + msg_send_id![Self::class(), localTimeZone] + } + pub unsafe fn knownTimeZoneNames() -> Id, Shared> { + msg_send_id![Self::class(), knownTimeZoneNames] + } + pub unsafe fn abbreviationDictionary() -> Id, Shared> { + msg_send_id![Self::class(), abbreviationDictionary] + } + pub unsafe fn setAbbreviationDictionary( + abbreviationDictionary: &NSDictionary, + ) { + msg_send![ + Self::class(), + setAbbreviationDictionary: abbreviationDictionary + ] + } + pub unsafe fn timeZoneDataVersion() -> Id { + msg_send_id![Self::class(), timeZoneDataVersion] + } + pub unsafe fn secondsFromGMT(&self) -> NSInteger { + msg_send![self, secondsFromGMT] + } + pub unsafe fn abbreviation(&self) -> Option> { + msg_send_id![self, abbreviation] + } + pub unsafe fn isDaylightSavingTime(&self) -> bool { + msg_send![self, isDaylightSavingTime] + } + pub unsafe fn daylightSavingTimeOffset(&self) -> NSTimeInterval { + msg_send![self, daylightSavingTimeOffset] + } + pub unsafe fn nextDaylightSavingTimeTransition(&self) -> Option> { + msg_send_id![self, nextDaylightSavingTimeTransition] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool { + msg_send![self, isEqualToTimeZone: aTimeZone] + } + pub unsafe fn localizedName_locale( + &self, + style: NSTimeZoneNameStyle, + locale: Option<&NSLocale>, + ) -> Option> { + msg_send_id![self, localizedName: style, locale: locale] + } } - pub unsafe fn timeZoneWithAbbreviation(abbreviation: &NSString) -> Option> { - msg_send_id![Self::class(), timeZoneWithAbbreviation: abbreviation] +); +extern_methods!( + #[doc = "NSTimeZoneCreation"] + unsafe impl NSTimeZone { + pub unsafe fn timeZoneWithName(tzName: &NSString) -> Option> { + msg_send_id![Self::class(), timeZoneWithName: tzName] + } + pub unsafe fn timeZoneWithName_data( + tzName: &NSString, + aData: Option<&NSData>, + ) -> Option> { + msg_send_id![Self::class(), timeZoneWithName: tzName, data: aData] + } + pub unsafe fn initWithName(&self, tzName: &NSString) -> Option> { + msg_send_id![self, initWithName: tzName] + } + pub unsafe fn initWithName_data( + &self, + tzName: &NSString, + aData: Option<&NSData>, + ) -> Option> { + msg_send_id![self, initWithName: tzName, data: aData] + } + pub unsafe fn timeZoneForSecondsFromGMT(seconds: NSInteger) -> Id { + msg_send_id![Self::class(), timeZoneForSecondsFromGMT: seconds] + } + pub unsafe fn timeZoneWithAbbreviation( + abbreviation: &NSString, + ) -> Option> { + msg_send_id![Self::class(), timeZoneWithAbbreviation: abbreviation] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 7463d956e..50409eab8 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSTimer; @@ -11,146 +11,148 @@ extern_class!( type Super = NSObject; } ); -impl NSTimer { - pub unsafe fn timerWithTimeInterval_invocation_repeats( - ti: NSTimeInterval, - invocation: &NSInvocation, - yesOrNo: bool, - ) -> Id { - msg_send_id![ - Self::class(), - timerWithTimeInterval: ti, - invocation: invocation, - repeats: yesOrNo - ] +extern_methods!( + unsafe impl NSTimer { + pub unsafe fn timerWithTimeInterval_invocation_repeats( + ti: NSTimeInterval, + invocation: &NSInvocation, + yesOrNo: bool, + ) -> Id { + msg_send_id![ + Self::class(), + timerWithTimeInterval: ti, + invocation: invocation, + repeats: yesOrNo + ] + } + pub unsafe fn scheduledTimerWithTimeInterval_invocation_repeats( + ti: NSTimeInterval, + invocation: &NSInvocation, + yesOrNo: bool, + ) -> Id { + msg_send_id![ + Self::class(), + scheduledTimerWithTimeInterval: ti, + invocation: invocation, + repeats: yesOrNo + ] + } + pub unsafe fn timerWithTimeInterval_target_selector_userInfo_repeats( + ti: NSTimeInterval, + aTarget: &Object, + aSelector: Sel, + userInfo: Option<&Object>, + yesOrNo: bool, + ) -> Id { + msg_send_id![ + Self::class(), + timerWithTimeInterval: ti, + target: aTarget, + selector: aSelector, + userInfo: userInfo, + repeats: yesOrNo + ] + } + pub unsafe fn scheduledTimerWithTimeInterval_target_selector_userInfo_repeats( + ti: NSTimeInterval, + aTarget: &Object, + aSelector: Sel, + userInfo: Option<&Object>, + yesOrNo: bool, + ) -> Id { + msg_send_id![ + Self::class(), + scheduledTimerWithTimeInterval: ti, + target: aTarget, + selector: aSelector, + userInfo: userInfo, + repeats: yesOrNo + ] + } + pub unsafe fn timerWithTimeInterval_repeats_block( + interval: NSTimeInterval, + repeats: bool, + block: TodoBlock, + ) -> Id { + msg_send_id![ + Self::class(), + timerWithTimeInterval: interval, + repeats: repeats, + block: block + ] + } + pub unsafe fn scheduledTimerWithTimeInterval_repeats_block( + interval: NSTimeInterval, + repeats: bool, + block: TodoBlock, + ) -> Id { + msg_send_id![ + Self::class(), + scheduledTimerWithTimeInterval: interval, + repeats: repeats, + block: block + ] + } + pub unsafe fn initWithFireDate_interval_repeats_block( + &self, + date: &NSDate, + interval: NSTimeInterval, + repeats: bool, + block: TodoBlock, + ) -> Id { + msg_send_id![ + self, + initWithFireDate: date, + interval: interval, + repeats: repeats, + block: block + ] + } + pub unsafe fn initWithFireDate_interval_target_selector_userInfo_repeats( + &self, + date: &NSDate, + ti: NSTimeInterval, + t: &Object, + s: Sel, + ui: Option<&Object>, + rep: bool, + ) -> Id { + msg_send_id![ + self, + initWithFireDate: date, + interval: ti, + target: t, + selector: s, + userInfo: ui, + repeats: rep + ] + } + pub unsafe fn fire(&self) { + msg_send![self, fire] + } + pub unsafe fn fireDate(&self) -> Id { + msg_send_id![self, fireDate] + } + pub unsafe fn setFireDate(&self, fireDate: &NSDate) { + msg_send![self, setFireDate: fireDate] + } + pub unsafe fn timeInterval(&self) -> NSTimeInterval { + msg_send![self, timeInterval] + } + pub unsafe fn tolerance(&self) -> NSTimeInterval { + msg_send![self, tolerance] + } + pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval) { + msg_send![self, setTolerance: tolerance] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn isValid(&self) -> bool { + msg_send![self, isValid] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } } - pub unsafe fn scheduledTimerWithTimeInterval_invocation_repeats( - ti: NSTimeInterval, - invocation: &NSInvocation, - yesOrNo: bool, - ) -> Id { - msg_send_id![ - Self::class(), - scheduledTimerWithTimeInterval: ti, - invocation: invocation, - repeats: yesOrNo - ] - } - pub unsafe fn timerWithTimeInterval_target_selector_userInfo_repeats( - ti: NSTimeInterval, - aTarget: &Object, - aSelector: Sel, - userInfo: Option<&Object>, - yesOrNo: bool, - ) -> Id { - msg_send_id![ - Self::class(), - timerWithTimeInterval: ti, - target: aTarget, - selector: aSelector, - userInfo: userInfo, - repeats: yesOrNo - ] - } - pub unsafe fn scheduledTimerWithTimeInterval_target_selector_userInfo_repeats( - ti: NSTimeInterval, - aTarget: &Object, - aSelector: Sel, - userInfo: Option<&Object>, - yesOrNo: bool, - ) -> Id { - msg_send_id![ - Self::class(), - scheduledTimerWithTimeInterval: ti, - target: aTarget, - selector: aSelector, - userInfo: userInfo, - repeats: yesOrNo - ] - } - pub unsafe fn timerWithTimeInterval_repeats_block( - interval: NSTimeInterval, - repeats: bool, - block: TodoBlock, - ) -> Id { - msg_send_id![ - Self::class(), - timerWithTimeInterval: interval, - repeats: repeats, - block: block - ] - } - pub unsafe fn scheduledTimerWithTimeInterval_repeats_block( - interval: NSTimeInterval, - repeats: bool, - block: TodoBlock, - ) -> Id { - msg_send_id![ - Self::class(), - scheduledTimerWithTimeInterval: interval, - repeats: repeats, - block: block - ] - } - pub unsafe fn initWithFireDate_interval_repeats_block( - &self, - date: &NSDate, - interval: NSTimeInterval, - repeats: bool, - block: TodoBlock, - ) -> Id { - msg_send_id![ - self, - initWithFireDate: date, - interval: interval, - repeats: repeats, - block: block - ] - } - pub unsafe fn initWithFireDate_interval_target_selector_userInfo_repeats( - &self, - date: &NSDate, - ti: NSTimeInterval, - t: &Object, - s: Sel, - ui: Option<&Object>, - rep: bool, - ) -> Id { - msg_send_id![ - self, - initWithFireDate: date, - interval: ti, - target: t, - selector: s, - userInfo: ui, - repeats: rep - ] - } - pub unsafe fn fire(&self) { - msg_send![self, fire] - } - pub unsafe fn fireDate(&self) -> Id { - msg_send_id![self, fireDate] - } - pub unsafe fn setFireDate(&self, fireDate: &NSDate) { - msg_send![self, setFireDate: fireDate] - } - pub unsafe fn timeInterval(&self) -> NSTimeInterval { - msg_send![self, timeInterval] - } - pub unsafe fn tolerance(&self) -> NSTimeInterval { - msg_send![self, tolerance] - } - pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval) { - msg_send![self, setTolerance: tolerance] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn isValid(&self) -> bool { - msg_send![self, isValid] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index b613af899..a1a6a98e1 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSURLHandle::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSURLResourceKey = NSString; pub type NSURLFileResourceType = NSString; pub type NSURLThumbnailDictionaryItem = NSString; @@ -26,404 +26,417 @@ extern_class!( type Super = NSObject; } ); -impl NSURL { - pub unsafe fn initWithScheme_host_path( - &self, - scheme: &NSString, - host: Option<&NSString>, - path: &NSString, - ) -> Option> { - msg_send_id![self, initWithScheme: scheme, host: host, path: path] +extern_methods!( + unsafe impl NSURL { + pub unsafe fn initWithScheme_host_path( + &self, + scheme: &NSString, + host: Option<&NSString>, + path: &NSString, + ) -> Option> { + msg_send_id![self, initWithScheme: scheme, host: host, path: path] + } + pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL( + &self, + path: &NSString, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + self, + initFileURLWithPath: path, + isDirectory: isDir, + relativeToURL: baseURL + ] + } + pub unsafe fn initFileURLWithPath_relativeToURL( + &self, + path: &NSString, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![self, initFileURLWithPath: path, relativeToURL: baseURL] + } + pub unsafe fn initFileURLWithPath_isDirectory( + &self, + path: &NSString, + isDir: bool, + ) -> Id { + msg_send_id![self, initFileURLWithPath: path, isDirectory: isDir] + } + pub unsafe fn initFileURLWithPath(&self, path: &NSString) -> Id { + msg_send_id![self, initFileURLWithPath: path] + } + pub unsafe fn fileURLWithPath_isDirectory_relativeToURL( + path: &NSString, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + Self::class(), + fileURLWithPath: path, + isDirectory: isDir, + relativeToURL: baseURL + ] + } + pub unsafe fn fileURLWithPath_relativeToURL( + path: &NSString, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![Self::class(), fileURLWithPath: path, relativeToURL: baseURL] + } + pub unsafe fn fileURLWithPath_isDirectory( + path: &NSString, + isDir: bool, + ) -> Id { + msg_send_id![Self::class(), fileURLWithPath: path, isDirectory: isDir] + } + pub unsafe fn fileURLWithPath(path: &NSString) -> Id { + msg_send_id![Self::class(), fileURLWithPath: path] + } + pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL( + &self, + path: NonNull, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + self, + initFileURLWithFileSystemRepresentation: path, + isDirectory: isDir, + relativeToURL: baseURL + ] + } + pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL( + path: NonNull, + isDir: bool, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + Self::class(), + fileURLWithFileSystemRepresentation: path, + isDirectory: isDir, + relativeToURL: baseURL + ] + } + pub unsafe fn initWithString(&self, URLString: &NSString) -> Option> { + msg_send_id![self, initWithString: URLString] + } + pub unsafe fn initWithString_relativeToURL( + &self, + URLString: &NSString, + baseURL: Option<&NSURL>, + ) -> Option> { + msg_send_id![self, initWithString: URLString, relativeToURL: baseURL] + } + pub unsafe fn URLWithString(URLString: &NSString) -> Option> { + msg_send_id![Self::class(), URLWithString: URLString] + } + pub unsafe fn URLWithString_relativeToURL( + URLString: &NSString, + baseURL: Option<&NSURL>, + ) -> Option> { + msg_send_id![ + Self::class(), + URLWithString: URLString, + relativeToURL: baseURL + ] + } + pub unsafe fn initWithDataRepresentation_relativeToURL( + &self, + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + self, + initWithDataRepresentation: data, + relativeToURL: baseURL + ] + } + pub unsafe fn URLWithDataRepresentation_relativeToURL( + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + Self::class(), + URLWithDataRepresentation: data, + relativeToURL: baseURL + ] + } + pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL( + &self, + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + self, + initAbsoluteURLWithDataRepresentation: data, + relativeToURL: baseURL + ] + } + pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL( + data: &NSData, + baseURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + Self::class(), + absoluteURLWithDataRepresentation: data, + relativeToURL: baseURL + ] + } + pub unsafe fn dataRepresentation(&self) -> Id { + msg_send_id![self, dataRepresentation] + } + pub unsafe fn absoluteString(&self) -> Option> { + msg_send_id![self, absoluteString] + } + pub unsafe fn relativeString(&self) -> Id { + msg_send_id![self, relativeString] + } + pub unsafe fn baseURL(&self) -> Option> { + msg_send_id![self, baseURL] + } + pub unsafe fn absoluteURL(&self) -> Option> { + msg_send_id![self, absoluteURL] + } + pub unsafe fn scheme(&self) -> Option> { + msg_send_id![self, scheme] + } + pub unsafe fn resourceSpecifier(&self) -> Option> { + msg_send_id![self, resourceSpecifier] + } + pub unsafe fn host(&self) -> Option> { + msg_send_id![self, host] + } + pub unsafe fn port(&self) -> Option> { + msg_send_id![self, port] + } + pub unsafe fn user(&self) -> Option> { + msg_send_id![self, user] + } + pub unsafe fn password(&self) -> Option> { + msg_send_id![self, password] + } + pub unsafe fn path(&self) -> Option> { + msg_send_id![self, path] + } + pub unsafe fn fragment(&self) -> Option> { + msg_send_id![self, fragment] + } + pub unsafe fn parameterString(&self) -> Option> { + msg_send_id![self, parameterString] + } + pub unsafe fn query(&self) -> Option> { + msg_send_id![self, query] + } + pub unsafe fn relativePath(&self) -> Option> { + msg_send_id![self, relativePath] + } + pub unsafe fn hasDirectoryPath(&self) -> bool { + msg_send![self, hasDirectoryPath] + } + pub unsafe fn getFileSystemRepresentation_maxLength( + &self, + buffer: NonNull, + maxBufferLength: NSUInteger, + ) -> bool { + msg_send![ + self, + getFileSystemRepresentation: buffer, + maxLength: maxBufferLength + ] + } + pub unsafe fn fileSystemRepresentation(&self) -> NonNull { + msg_send![self, fileSystemRepresentation] + } + pub unsafe fn isFileURL(&self) -> bool { + msg_send![self, isFileURL] + } + pub unsafe fn standardizedURL(&self) -> Option> { + msg_send_id![self, standardizedURL] + } + pub unsafe fn checkResourceIsReachableAndReturnError( + &self, + ) -> Result<(), Id> { + msg_send![self, checkResourceIsReachableAndReturnError: _] + } + pub unsafe fn isFileReferenceURL(&self) -> bool { + msg_send![self, isFileReferenceURL] + } + pub unsafe fn fileReferenceURL(&self) -> Option> { + msg_send_id![self, fileReferenceURL] + } + pub unsafe fn filePathURL(&self) -> Option> { + msg_send_id![self, filePathURL] + } + pub unsafe fn getResourceValue_forKey_error( + &self, + value: &mut Option>, + key: &NSURLResourceKey, + ) -> Result<(), Id> { + msg_send![self, getResourceValue: value, forKey: key, error: _] + } + pub unsafe fn resourceValuesForKeys_error( + &self, + keys: &NSArray, + ) -> Result, Shared>, Id> + { + msg_send_id![self, resourceValuesForKeys: keys, error: _] + } + pub unsafe fn setResourceValue_forKey_error( + &self, + value: Option<&Object>, + key: &NSURLResourceKey, + ) -> Result<(), Id> { + msg_send![self, setResourceValue: value, forKey: key, error: _] + } + pub unsafe fn setResourceValues_error( + &self, + keyedValues: &NSDictionary, + ) -> Result<(), Id> { + msg_send![self, setResourceValues: keyedValues, error: _] + } + pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey) { + msg_send![self, removeCachedResourceValueForKey: key] + } + pub unsafe fn removeAllCachedResourceValues(&self) { + msg_send![self, removeAllCachedResourceValues] + } + pub unsafe fn setTemporaryResourceValue_forKey( + &self, + value: Option<&Object>, + key: &NSURLResourceKey, + ) { + msg_send![self, setTemporaryResourceValue: value, forKey: key] + } + pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error( + &self, + options: NSURLBookmarkCreationOptions, + keys: Option<&NSArray>, + relativeURL: Option<&NSURL>, + ) -> Result, Id> { + msg_send_id![ + self, + bookmarkDataWithOptions: options, + includingResourceValuesForKeys: keys, + relativeToURL: relativeURL, + error: _ + ] + } + pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( + &self, + bookmarkData: &NSData, + options: NSURLBookmarkResolutionOptions, + relativeURL: Option<&NSURL>, + isStale: *mut bool, + ) -> Result, Id> { + msg_send_id![ + self, + initByResolvingBookmarkData: bookmarkData, + options: options, + relativeToURL: relativeURL, + bookmarkDataIsStale: isStale, + error: _ + ] + } + pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( + bookmarkData: &NSData, + options: NSURLBookmarkResolutionOptions, + relativeURL: Option<&NSURL>, + isStale: *mut bool, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + URLByResolvingBookmarkData: bookmarkData, + options: options, + relativeToURL: relativeURL, + bookmarkDataIsStale: isStale, + error: _ + ] + } + pub unsafe fn resourceValuesForKeys_fromBookmarkData( + keys: &NSArray, + bookmarkData: &NSData, + ) -> Option, Shared>> { + msg_send_id![ + Self::class(), + resourceValuesForKeys: keys, + fromBookmarkData: bookmarkData + ] + } + pub unsafe fn writeBookmarkData_toURL_options_error( + bookmarkData: &NSData, + bookmarkFileURL: &NSURL, + options: NSURLBookmarkFileCreationOptions, + ) -> Result<(), Id> { + msg_send![ + Self::class(), + writeBookmarkData: bookmarkData, + toURL: bookmarkFileURL, + options: options, + error: _ + ] + } + pub unsafe fn bookmarkDataWithContentsOfURL_error( + bookmarkFileURL: &NSURL, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + bookmarkDataWithContentsOfURL: bookmarkFileURL, + error: _ + ] + } + pub unsafe fn URLByResolvingAliasFileAtURL_options_error( + url: &NSURL, + options: NSURLBookmarkResolutionOptions, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + URLByResolvingAliasFileAtURL: url, + options: options, + error: _ + ] + } + pub unsafe fn startAccessingSecurityScopedResource(&self) -> bool { + msg_send![self, startAccessingSecurityScopedResource] + } + pub unsafe fn stopAccessingSecurityScopedResource(&self) { + msg_send![self, stopAccessingSecurityScopedResource] + } } - pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL( - &self, - path: &NSString, - isDir: bool, - baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - self, - initFileURLWithPath: path, - isDirectory: isDir, - relativeToURL: baseURL - ] - } - pub unsafe fn initFileURLWithPath_relativeToURL( - &self, - path: &NSString, - baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![self, initFileURLWithPath: path, relativeToURL: baseURL] - } - pub unsafe fn initFileURLWithPath_isDirectory( - &self, - path: &NSString, - isDir: bool, - ) -> Id { - msg_send_id![self, initFileURLWithPath: path, isDirectory: isDir] - } - pub unsafe fn initFileURLWithPath(&self, path: &NSString) -> Id { - msg_send_id![self, initFileURLWithPath: path] - } - pub unsafe fn fileURLWithPath_isDirectory_relativeToURL( - path: &NSString, - isDir: bool, - baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - Self::class(), - fileURLWithPath: path, - isDirectory: isDir, - relativeToURL: baseURL - ] - } - pub unsafe fn fileURLWithPath_relativeToURL( - path: &NSString, - baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![Self::class(), fileURLWithPath: path, relativeToURL: baseURL] - } - pub unsafe fn fileURLWithPath_isDirectory(path: &NSString, isDir: bool) -> Id { - msg_send_id![Self::class(), fileURLWithPath: path, isDirectory: isDir] - } - pub unsafe fn fileURLWithPath(path: &NSString) -> Id { - msg_send_id![Self::class(), fileURLWithPath: path] - } - pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL( - &self, - path: NonNull, - isDir: bool, - baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - self, - initFileURLWithFileSystemRepresentation: path, - isDirectory: isDir, - relativeToURL: baseURL - ] - } - pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL( - path: NonNull, - isDir: bool, - baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - Self::class(), - fileURLWithFileSystemRepresentation: path, - isDirectory: isDir, - relativeToURL: baseURL - ] - } - pub unsafe fn initWithString(&self, URLString: &NSString) -> Option> { - msg_send_id![self, initWithString: URLString] - } - pub unsafe fn initWithString_relativeToURL( - &self, - URLString: &NSString, - baseURL: Option<&NSURL>, - ) -> Option> { - msg_send_id![self, initWithString: URLString, relativeToURL: baseURL] - } - pub unsafe fn URLWithString(URLString: &NSString) -> Option> { - msg_send_id![Self::class(), URLWithString: URLString] - } - pub unsafe fn URLWithString_relativeToURL( - URLString: &NSString, - baseURL: Option<&NSURL>, - ) -> Option> { - msg_send_id![ - Self::class(), - URLWithString: URLString, - relativeToURL: baseURL - ] - } - pub unsafe fn initWithDataRepresentation_relativeToURL( - &self, - data: &NSData, - baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - self, - initWithDataRepresentation: data, - relativeToURL: baseURL - ] - } - pub unsafe fn URLWithDataRepresentation_relativeToURL( - data: &NSData, - baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - Self::class(), - URLWithDataRepresentation: data, - relativeToURL: baseURL - ] - } - pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL( - &self, - data: &NSData, - baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - self, - initAbsoluteURLWithDataRepresentation: data, - relativeToURL: baseURL - ] - } - pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL( - data: &NSData, - baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - Self::class(), - absoluteURLWithDataRepresentation: data, - relativeToURL: baseURL - ] - } - pub unsafe fn dataRepresentation(&self) -> Id { - msg_send_id![self, dataRepresentation] - } - pub unsafe fn absoluteString(&self) -> Option> { - msg_send_id![self, absoluteString] - } - pub unsafe fn relativeString(&self) -> Id { - msg_send_id![self, relativeString] - } - pub unsafe fn baseURL(&self) -> Option> { - msg_send_id![self, baseURL] - } - pub unsafe fn absoluteURL(&self) -> Option> { - msg_send_id![self, absoluteURL] - } - pub unsafe fn scheme(&self) -> Option> { - msg_send_id![self, scheme] - } - pub unsafe fn resourceSpecifier(&self) -> Option> { - msg_send_id![self, resourceSpecifier] - } - pub unsafe fn host(&self) -> Option> { - msg_send_id![self, host] - } - pub unsafe fn port(&self) -> Option> { - msg_send_id![self, port] - } - pub unsafe fn user(&self) -> Option> { - msg_send_id![self, user] - } - pub unsafe fn password(&self) -> Option> { - msg_send_id![self, password] - } - pub unsafe fn path(&self) -> Option> { - msg_send_id![self, path] - } - pub unsafe fn fragment(&self) -> Option> { - msg_send_id![self, fragment] - } - pub unsafe fn parameterString(&self) -> Option> { - msg_send_id![self, parameterString] - } - pub unsafe fn query(&self) -> Option> { - msg_send_id![self, query] - } - pub unsafe fn relativePath(&self) -> Option> { - msg_send_id![self, relativePath] - } - pub unsafe fn hasDirectoryPath(&self) -> bool { - msg_send![self, hasDirectoryPath] - } - pub unsafe fn getFileSystemRepresentation_maxLength( - &self, - buffer: NonNull, - maxBufferLength: NSUInteger, - ) -> bool { - msg_send![ - self, - getFileSystemRepresentation: buffer, - maxLength: maxBufferLength - ] - } - pub unsafe fn fileSystemRepresentation(&self) -> NonNull { - msg_send![self, fileSystemRepresentation] - } - pub unsafe fn isFileURL(&self) -> bool { - msg_send![self, isFileURL] - } - pub unsafe fn standardizedURL(&self) -> Option> { - msg_send_id![self, standardizedURL] - } - pub unsafe fn checkResourceIsReachableAndReturnError(&self) -> Result<(), Id> { - msg_send![self, checkResourceIsReachableAndReturnError: _] - } - pub unsafe fn isFileReferenceURL(&self) -> bool { - msg_send![self, isFileReferenceURL] - } - pub unsafe fn fileReferenceURL(&self) -> Option> { - msg_send_id![self, fileReferenceURL] - } - pub unsafe fn filePathURL(&self) -> Option> { - msg_send_id![self, filePathURL] - } - pub unsafe fn getResourceValue_forKey_error( - &self, - value: &mut Option>, - key: &NSURLResourceKey, - ) -> Result<(), Id> { - msg_send![self, getResourceValue: value, forKey: key, error: _] - } - pub unsafe fn resourceValuesForKeys_error( - &self, - keys: &NSArray, - ) -> Result, Shared>, Id> { - msg_send_id![self, resourceValuesForKeys: keys, error: _] - } - pub unsafe fn setResourceValue_forKey_error( - &self, - value: Option<&Object>, - key: &NSURLResourceKey, - ) -> Result<(), Id> { - msg_send![self, setResourceValue: value, forKey: key, error: _] - } - pub unsafe fn setResourceValues_error( - &self, - keyedValues: &NSDictionary, - ) -> Result<(), Id> { - msg_send![self, setResourceValues: keyedValues, error: _] - } - pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey) { - msg_send![self, removeCachedResourceValueForKey: key] - } - pub unsafe fn removeAllCachedResourceValues(&self) { - msg_send![self, removeAllCachedResourceValues] - } - pub unsafe fn setTemporaryResourceValue_forKey( - &self, - value: Option<&Object>, - key: &NSURLResourceKey, - ) { - msg_send![self, setTemporaryResourceValue: value, forKey: key] - } - pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error( - &self, - options: NSURLBookmarkCreationOptions, - keys: Option<&NSArray>, - relativeURL: Option<&NSURL>, - ) -> Result, Id> { - msg_send_id![ - self, - bookmarkDataWithOptions: options, - includingResourceValuesForKeys: keys, - relativeToURL: relativeURL, - error: _ - ] - } - pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( - &self, - bookmarkData: &NSData, - options: NSURLBookmarkResolutionOptions, - relativeURL: Option<&NSURL>, - isStale: *mut bool, - ) -> Result, Id> { - msg_send_id![ - self, - initByResolvingBookmarkData: bookmarkData, - options: options, - relativeToURL: relativeURL, - bookmarkDataIsStale: isStale, - error: _ - ] - } - pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( - bookmarkData: &NSData, - options: NSURLBookmarkResolutionOptions, - relativeURL: Option<&NSURL>, - isStale: *mut bool, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - URLByResolvingBookmarkData: bookmarkData, - options: options, - relativeToURL: relativeURL, - bookmarkDataIsStale: isStale, - error: _ - ] - } - pub unsafe fn resourceValuesForKeys_fromBookmarkData( - keys: &NSArray, - bookmarkData: &NSData, - ) -> Option, Shared>> { - msg_send_id![ - Self::class(), - resourceValuesForKeys: keys, - fromBookmarkData: bookmarkData - ] - } - pub unsafe fn writeBookmarkData_toURL_options_error( - bookmarkData: &NSData, - bookmarkFileURL: &NSURL, - options: NSURLBookmarkFileCreationOptions, - ) -> Result<(), Id> { - msg_send![ - Self::class(), - writeBookmarkData: bookmarkData, - toURL: bookmarkFileURL, - options: options, - error: _ - ] - } - pub unsafe fn bookmarkDataWithContentsOfURL_error( - bookmarkFileURL: &NSURL, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - bookmarkDataWithContentsOfURL: bookmarkFileURL, - error: _ - ] - } - pub unsafe fn URLByResolvingAliasFileAtURL_options_error( - url: &NSURL, - options: NSURLBookmarkResolutionOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - URLByResolvingAliasFileAtURL: url, - options: options, - error: _ - ] - } - pub unsafe fn startAccessingSecurityScopedResource(&self) -> bool { - msg_send![self, startAccessingSecurityScopedResource] - } - pub unsafe fn stopAccessingSecurityScopedResource(&self) { - msg_send![self, stopAccessingSecurityScopedResource] - } -} -#[doc = "NSPromisedItems"] -impl NSURL { - pub unsafe fn getPromisedItemResourceValue_forKey_error( - &self, - value: &mut Option>, - key: &NSURLResourceKey, - ) -> Result<(), Id> { - msg_send![ - self, - getPromisedItemResourceValue: value, - forKey: key, - error: _ - ] - } - pub unsafe fn promisedItemResourceValuesForKeys_error( - &self, - keys: &NSArray, - ) -> Result, Shared>, Id> { - msg_send_id![self, promisedItemResourceValuesForKeys: keys, error: _] - } - pub unsafe fn checkPromisedItemIsReachableAndReturnError( - &self, - ) -> Result<(), Id> { - msg_send![self, checkPromisedItemIsReachableAndReturnError: _] +); +extern_methods!( + #[doc = "NSPromisedItems"] + unsafe impl NSURL { + pub unsafe fn getPromisedItemResourceValue_forKey_error( + &self, + value: &mut Option>, + key: &NSURLResourceKey, + ) -> Result<(), Id> { + msg_send![ + self, + getPromisedItemResourceValue: value, + forKey: key, + error: _ + ] + } + pub unsafe fn promisedItemResourceValuesForKeys_error( + &self, + keys: &NSArray, + ) -> Result, Shared>, Id> + { + msg_send_id![self, promisedItemResourceValuesForKeys: keys, error: _] + } + pub unsafe fn checkPromisedItemIsReachableAndReturnError( + &self, + ) -> Result<(), Id> { + msg_send![self, checkPromisedItemIsReachableAndReturnError: _] + } } -} -#[doc = "NSItemProvider"] -impl NSURL {} +); +extern_methods!( + #[doc = "NSItemProvider"] + unsafe impl NSURL {} +); extern_class!( #[derive(Debug)] pub struct NSURLQueryItem; @@ -431,27 +444,29 @@ extern_class!( type Super = NSObject; } ); -impl NSURLQueryItem { - pub unsafe fn initWithName_value( - &self, - name: &NSString, - value: Option<&NSString>, - ) -> Id { - msg_send_id![self, initWithName: name, value: value] - } - pub unsafe fn queryItemWithName_value( - name: &NSString, - value: Option<&NSString>, - ) -> Id { - msg_send_id![Self::class(), queryItemWithName: name, value: value] +extern_methods!( + unsafe impl NSURLQueryItem { + pub unsafe fn initWithName_value( + &self, + name: &NSString, + value: Option<&NSString>, + ) -> Id { + msg_send_id![self, initWithName: name, value: value] + } + pub unsafe fn queryItemWithName_value( + name: &NSString, + value: Option<&NSString>, + ) -> Id { + msg_send_id![Self::class(), queryItemWithName: name, value: value] + } + pub unsafe fn name(&self) -> Id { + msg_send_id![self, name] + } + pub unsafe fn value(&self) -> Option> { + msg_send_id![self, value] + } } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn value(&self) -> Option> { - msg_send_id![self, value] - } -} +); extern_class!( #[derive(Debug)] pub struct NSURLComponents; @@ -459,266 +474,279 @@ extern_class!( type Super = NSObject; } ); -impl NSURLComponents { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithURL_resolvingAgainstBaseURL( - &self, - url: &NSURL, - resolve: bool, - ) -> Option> { - msg_send_id![self, initWithURL: url, resolvingAgainstBaseURL: resolve] - } - pub unsafe fn componentsWithURL_resolvingAgainstBaseURL( - url: &NSURL, - resolve: bool, - ) -> Option> { - msg_send_id![ - Self::class(), - componentsWithURL: url, - resolvingAgainstBaseURL: resolve - ] - } - pub unsafe fn initWithString(&self, URLString: &NSString) -> Option> { - msg_send_id![self, initWithString: URLString] - } - pub unsafe fn componentsWithString(URLString: &NSString) -> Option> { - msg_send_id![Self::class(), componentsWithString: URLString] - } - pub unsafe fn URL(&self) -> Option> { - msg_send_id![self, URL] - } - pub unsafe fn URLRelativeToURL(&self, baseURL: Option<&NSURL>) -> Option> { - msg_send_id![self, URLRelativeToURL: baseURL] +extern_methods!( + unsafe impl NSURLComponents { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithURL_resolvingAgainstBaseURL( + &self, + url: &NSURL, + resolve: bool, + ) -> Option> { + msg_send_id![self, initWithURL: url, resolvingAgainstBaseURL: resolve] + } + pub unsafe fn componentsWithURL_resolvingAgainstBaseURL( + url: &NSURL, + resolve: bool, + ) -> Option> { + msg_send_id![ + Self::class(), + componentsWithURL: url, + resolvingAgainstBaseURL: resolve + ] + } + pub unsafe fn initWithString(&self, URLString: &NSString) -> Option> { + msg_send_id![self, initWithString: URLString] + } + pub unsafe fn componentsWithString(URLString: &NSString) -> Option> { + msg_send_id![Self::class(), componentsWithString: URLString] + } + pub unsafe fn URL(&self) -> Option> { + msg_send_id![self, URL] + } + pub unsafe fn URLRelativeToURL( + &self, + baseURL: Option<&NSURL>, + ) -> Option> { + msg_send_id![self, URLRelativeToURL: baseURL] + } + pub unsafe fn string(&self) -> Option> { + msg_send_id![self, string] + } + pub unsafe fn scheme(&self) -> Option> { + msg_send_id![self, scheme] + } + pub unsafe fn setScheme(&self, scheme: Option<&NSString>) { + msg_send![self, setScheme: scheme] + } + pub unsafe fn user(&self) -> Option> { + msg_send_id![self, user] + } + pub unsafe fn setUser(&self, user: Option<&NSString>) { + msg_send![self, setUser: user] + } + pub unsafe fn password(&self) -> Option> { + msg_send_id![self, password] + } + pub unsafe fn setPassword(&self, password: Option<&NSString>) { + msg_send![self, setPassword: password] + } + pub unsafe fn host(&self) -> Option> { + msg_send_id![self, host] + } + pub unsafe fn setHost(&self, host: Option<&NSString>) { + msg_send![self, setHost: host] + } + pub unsafe fn port(&self) -> Option> { + msg_send_id![self, port] + } + pub unsafe fn setPort(&self, port: Option<&NSNumber>) { + msg_send![self, setPort: port] + } + pub unsafe fn path(&self) -> Option> { + msg_send_id![self, path] + } + pub unsafe fn setPath(&self, path: Option<&NSString>) { + msg_send![self, setPath: path] + } + pub unsafe fn query(&self) -> Option> { + msg_send_id![self, query] + } + pub unsafe fn setQuery(&self, query: Option<&NSString>) { + msg_send![self, setQuery: query] + } + pub unsafe fn fragment(&self) -> Option> { + msg_send_id![self, fragment] + } + pub unsafe fn setFragment(&self, fragment: Option<&NSString>) { + msg_send![self, setFragment: fragment] + } + pub unsafe fn percentEncodedUser(&self) -> Option> { + msg_send_id![self, percentEncodedUser] + } + pub unsafe fn setPercentEncodedUser(&self, percentEncodedUser: Option<&NSString>) { + msg_send![self, setPercentEncodedUser: percentEncodedUser] + } + pub unsafe fn percentEncodedPassword(&self) -> Option> { + msg_send_id![self, percentEncodedPassword] + } + pub unsafe fn setPercentEncodedPassword(&self, percentEncodedPassword: Option<&NSString>) { + msg_send![self, setPercentEncodedPassword: percentEncodedPassword] + } + pub unsafe fn percentEncodedHost(&self) -> Option> { + msg_send_id![self, percentEncodedHost] + } + pub unsafe fn setPercentEncodedHost(&self, percentEncodedHost: Option<&NSString>) { + msg_send![self, setPercentEncodedHost: percentEncodedHost] + } + pub unsafe fn percentEncodedPath(&self) -> Option> { + msg_send_id![self, percentEncodedPath] + } + pub unsafe fn setPercentEncodedPath(&self, percentEncodedPath: Option<&NSString>) { + msg_send![self, setPercentEncodedPath: percentEncodedPath] + } + pub unsafe fn percentEncodedQuery(&self) -> Option> { + msg_send_id![self, percentEncodedQuery] + } + pub unsafe fn setPercentEncodedQuery(&self, percentEncodedQuery: Option<&NSString>) { + msg_send![self, setPercentEncodedQuery: percentEncodedQuery] + } + pub unsafe fn percentEncodedFragment(&self) -> Option> { + msg_send_id![self, percentEncodedFragment] + } + pub unsafe fn setPercentEncodedFragment(&self, percentEncodedFragment: Option<&NSString>) { + msg_send![self, setPercentEncodedFragment: percentEncodedFragment] + } + pub unsafe fn rangeOfScheme(&self) -> NSRange { + msg_send![self, rangeOfScheme] + } + pub unsafe fn rangeOfUser(&self) -> NSRange { + msg_send![self, rangeOfUser] + } + pub unsafe fn rangeOfPassword(&self) -> NSRange { + msg_send![self, rangeOfPassword] + } + pub unsafe fn rangeOfHost(&self) -> NSRange { + msg_send![self, rangeOfHost] + } + pub unsafe fn rangeOfPort(&self) -> NSRange { + msg_send![self, rangeOfPort] + } + pub unsafe fn rangeOfPath(&self) -> NSRange { + msg_send![self, rangeOfPath] + } + pub unsafe fn rangeOfQuery(&self) -> NSRange { + msg_send![self, rangeOfQuery] + } + pub unsafe fn rangeOfFragment(&self) -> NSRange { + msg_send![self, rangeOfFragment] + } + pub unsafe fn queryItems(&self) -> Option, Shared>> { + msg_send_id![self, queryItems] + } + pub unsafe fn setQueryItems(&self, queryItems: Option<&NSArray>) { + msg_send![self, setQueryItems: queryItems] + } + pub unsafe fn percentEncodedQueryItems( + &self, + ) -> Option, Shared>> { + msg_send_id![self, percentEncodedQueryItems] + } + pub unsafe fn setPercentEncodedQueryItems( + &self, + percentEncodedQueryItems: Option<&NSArray>, + ) { + msg_send![self, setPercentEncodedQueryItems: percentEncodedQueryItems] + } } - pub unsafe fn string(&self) -> Option> { - msg_send_id![self, string] - } - pub unsafe fn scheme(&self) -> Option> { - msg_send_id![self, scheme] - } - pub unsafe fn setScheme(&self, scheme: Option<&NSString>) { - msg_send![self, setScheme: scheme] - } - pub unsafe fn user(&self) -> Option> { - msg_send_id![self, user] - } - pub unsafe fn setUser(&self, user: Option<&NSString>) { - msg_send![self, setUser: user] - } - pub unsafe fn password(&self) -> Option> { - msg_send_id![self, password] - } - pub unsafe fn setPassword(&self, password: Option<&NSString>) { - msg_send![self, setPassword: password] - } - pub unsafe fn host(&self) -> Option> { - msg_send_id![self, host] - } - pub unsafe fn setHost(&self, host: Option<&NSString>) { - msg_send![self, setHost: host] - } - pub unsafe fn port(&self) -> Option> { - msg_send_id![self, port] - } - pub unsafe fn setPort(&self, port: Option<&NSNumber>) { - msg_send![self, setPort: port] - } - pub unsafe fn path(&self) -> Option> { - msg_send_id![self, path] - } - pub unsafe fn setPath(&self, path: Option<&NSString>) { - msg_send![self, setPath: path] - } - pub unsafe fn query(&self) -> Option> { - msg_send_id![self, query] - } - pub unsafe fn setQuery(&self, query: Option<&NSString>) { - msg_send![self, setQuery: query] - } - pub unsafe fn fragment(&self) -> Option> { - msg_send_id![self, fragment] - } - pub unsafe fn setFragment(&self, fragment: Option<&NSString>) { - msg_send![self, setFragment: fragment] - } - pub unsafe fn percentEncodedUser(&self) -> Option> { - msg_send_id![self, percentEncodedUser] - } - pub unsafe fn setPercentEncodedUser(&self, percentEncodedUser: Option<&NSString>) { - msg_send![self, setPercentEncodedUser: percentEncodedUser] - } - pub unsafe fn percentEncodedPassword(&self) -> Option> { - msg_send_id![self, percentEncodedPassword] - } - pub unsafe fn setPercentEncodedPassword(&self, percentEncodedPassword: Option<&NSString>) { - msg_send![self, setPercentEncodedPassword: percentEncodedPassword] - } - pub unsafe fn percentEncodedHost(&self) -> Option> { - msg_send_id![self, percentEncodedHost] - } - pub unsafe fn setPercentEncodedHost(&self, percentEncodedHost: Option<&NSString>) { - msg_send![self, setPercentEncodedHost: percentEncodedHost] - } - pub unsafe fn percentEncodedPath(&self) -> Option> { - msg_send_id![self, percentEncodedPath] - } - pub unsafe fn setPercentEncodedPath(&self, percentEncodedPath: Option<&NSString>) { - msg_send![self, setPercentEncodedPath: percentEncodedPath] - } - pub unsafe fn percentEncodedQuery(&self) -> Option> { - msg_send_id![self, percentEncodedQuery] - } - pub unsafe fn setPercentEncodedQuery(&self, percentEncodedQuery: Option<&NSString>) { - msg_send![self, setPercentEncodedQuery: percentEncodedQuery] - } - pub unsafe fn percentEncodedFragment(&self) -> Option> { - msg_send_id![self, percentEncodedFragment] - } - pub unsafe fn setPercentEncodedFragment(&self, percentEncodedFragment: Option<&NSString>) { - msg_send![self, setPercentEncodedFragment: percentEncodedFragment] - } - pub unsafe fn rangeOfScheme(&self) -> NSRange { - msg_send![self, rangeOfScheme] - } - pub unsafe fn rangeOfUser(&self) -> NSRange { - msg_send![self, rangeOfUser] - } - pub unsafe fn rangeOfPassword(&self) -> NSRange { - msg_send![self, rangeOfPassword] - } - pub unsafe fn rangeOfHost(&self) -> NSRange { - msg_send![self, rangeOfHost] - } - pub unsafe fn rangeOfPort(&self) -> NSRange { - msg_send![self, rangeOfPort] - } - pub unsafe fn rangeOfPath(&self) -> NSRange { - msg_send![self, rangeOfPath] - } - pub unsafe fn rangeOfQuery(&self) -> NSRange { - msg_send![self, rangeOfQuery] - } - pub unsafe fn rangeOfFragment(&self) -> NSRange { - msg_send![self, rangeOfFragment] - } - pub unsafe fn queryItems(&self) -> Option, Shared>> { - msg_send_id![self, queryItems] - } - pub unsafe fn setQueryItems(&self, queryItems: Option<&NSArray>) { - msg_send![self, setQueryItems: queryItems] - } - pub unsafe fn percentEncodedQueryItems(&self) -> Option, Shared>> { - msg_send_id![self, percentEncodedQueryItems] - } - pub unsafe fn setPercentEncodedQueryItems( - &self, - percentEncodedQueryItems: Option<&NSArray>, - ) { - msg_send![self, setPercentEncodedQueryItems: percentEncodedQueryItems] - } -} -#[doc = "NSURLUtilities"] -impl NSCharacterSet { - pub unsafe fn URLUserAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLUserAllowedCharacterSet] - } - pub unsafe fn URLPasswordAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLPasswordAllowedCharacterSet] - } - pub unsafe fn URLHostAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLHostAllowedCharacterSet] - } - pub unsafe fn URLPathAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLPathAllowedCharacterSet] - } - pub unsafe fn URLQueryAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLQueryAllowedCharacterSet] - } - pub unsafe fn URLFragmentAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLFragmentAllowedCharacterSet] - } -} -#[doc = "NSURLUtilities"] -impl NSString { - pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters( - &self, - allowedCharacters: &NSCharacterSet, - ) -> Option> { - msg_send_id![ - self, - stringByAddingPercentEncodingWithAllowedCharacters: allowedCharacters - ] - } - pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option> { - msg_send_id![self, stringByRemovingPercentEncoding] - } - pub unsafe fn stringByAddingPercentEscapesUsingEncoding( - &self, - enc: NSStringEncoding, - ) -> Option> { - msg_send_id![self, stringByAddingPercentEscapesUsingEncoding: enc] - } - pub unsafe fn stringByReplacingPercentEscapesUsingEncoding( - &self, - enc: NSStringEncoding, - ) -> Option> { - msg_send_id![self, stringByReplacingPercentEscapesUsingEncoding: enc] - } -} -#[doc = "NSURLPathUtilities"] -impl NSURL { - pub unsafe fn fileURLWithPathComponents( - components: &NSArray, - ) -> Option> { - msg_send_id![Self::class(), fileURLWithPathComponents: components] - } - pub unsafe fn pathComponents(&self) -> Option, Shared>> { - msg_send_id![self, pathComponents] - } - pub unsafe fn lastPathComponent(&self) -> Option> { - msg_send_id![self, lastPathComponent] - } - pub unsafe fn pathExtension(&self) -> Option> { - msg_send_id![self, pathExtension] - } - pub unsafe fn URLByAppendingPathComponent( - &self, - pathComponent: &NSString, - ) -> Option> { - msg_send_id![self, URLByAppendingPathComponent: pathComponent] - } - pub unsafe fn URLByAppendingPathComponent_isDirectory( - &self, - pathComponent: &NSString, - isDirectory: bool, - ) -> Option> { - msg_send_id![ - self, - URLByAppendingPathComponent: pathComponent, - isDirectory: isDirectory - ] - } - pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option> { - msg_send_id![self, URLByDeletingLastPathComponent] - } - pub unsafe fn URLByAppendingPathExtension( - &self, - pathExtension: &NSString, - ) -> Option> { - msg_send_id![self, URLByAppendingPathExtension: pathExtension] - } - pub unsafe fn URLByDeletingPathExtension(&self) -> Option> { - msg_send_id![self, URLByDeletingPathExtension] +); +extern_methods!( + #[doc = "NSURLUtilities"] + unsafe impl NSCharacterSet { + pub unsafe fn URLUserAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLUserAllowedCharacterSet] + } + pub unsafe fn URLPasswordAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLPasswordAllowedCharacterSet] + } + pub unsafe fn URLHostAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLHostAllowedCharacterSet] + } + pub unsafe fn URLPathAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLPathAllowedCharacterSet] + } + pub unsafe fn URLQueryAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLQueryAllowedCharacterSet] + } + pub unsafe fn URLFragmentAllowedCharacterSet() -> Id { + msg_send_id![Self::class(), URLFragmentAllowedCharacterSet] + } } - pub unsafe fn URLByStandardizingPath(&self) -> Option> { - msg_send_id![self, URLByStandardizingPath] +); +extern_methods!( + #[doc = "NSURLUtilities"] + unsafe impl NSString { + pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters( + &self, + allowedCharacters: &NSCharacterSet, + ) -> Option> { + msg_send_id![ + self, + stringByAddingPercentEncodingWithAllowedCharacters: allowedCharacters + ] + } + pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option> { + msg_send_id![self, stringByRemovingPercentEncoding] + } + pub unsafe fn stringByAddingPercentEscapesUsingEncoding( + &self, + enc: NSStringEncoding, + ) -> Option> { + msg_send_id![self, stringByAddingPercentEscapesUsingEncoding: enc] + } + pub unsafe fn stringByReplacingPercentEscapesUsingEncoding( + &self, + enc: NSStringEncoding, + ) -> Option> { + msg_send_id![self, stringByReplacingPercentEscapesUsingEncoding: enc] + } } - pub unsafe fn URLByResolvingSymlinksInPath(&self) -> Option> { - msg_send_id![self, URLByResolvingSymlinksInPath] +); +extern_methods!( + #[doc = "NSURLPathUtilities"] + unsafe impl NSURL { + pub unsafe fn fileURLWithPathComponents( + components: &NSArray, + ) -> Option> { + msg_send_id![Self::class(), fileURLWithPathComponents: components] + } + pub unsafe fn pathComponents(&self) -> Option, Shared>> { + msg_send_id![self, pathComponents] + } + pub unsafe fn lastPathComponent(&self) -> Option> { + msg_send_id![self, lastPathComponent] + } + pub unsafe fn pathExtension(&self) -> Option> { + msg_send_id![self, pathExtension] + } + pub unsafe fn URLByAppendingPathComponent( + &self, + pathComponent: &NSString, + ) -> Option> { + msg_send_id![self, URLByAppendingPathComponent: pathComponent] + } + pub unsafe fn URLByAppendingPathComponent_isDirectory( + &self, + pathComponent: &NSString, + isDirectory: bool, + ) -> Option> { + msg_send_id![ + self, + URLByAppendingPathComponent: pathComponent, + isDirectory: isDirectory + ] + } + pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option> { + msg_send_id![self, URLByDeletingLastPathComponent] + } + pub unsafe fn URLByAppendingPathExtension( + &self, + pathExtension: &NSString, + ) -> Option> { + msg_send_id![self, URLByAppendingPathExtension: pathExtension] + } + pub unsafe fn URLByDeletingPathExtension(&self) -> Option> { + msg_send_id![self, URLByDeletingPathExtension] + } + pub unsafe fn URLByStandardizingPath(&self) -> Option> { + msg_send_id![self, URLByStandardizingPath] + } + pub unsafe fn URLByResolvingSymlinksInPath(&self) -> Option> { + msg_send_id![self, URLByResolvingSymlinksInPath] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSFileSecurity; @@ -726,58 +754,68 @@ extern_class!( type Super = NSObject; } ); -impl NSFileSecurity { - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSURLClient"] -impl NSObject { - pub unsafe fn URL_resourceDataDidBecomeAvailable(&self, sender: &NSURL, newBytes: &NSData) { - msg_send![self, URL: sender, resourceDataDidBecomeAvailable: newBytes] - } - pub unsafe fn URLResourceDidFinishLoading(&self, sender: &NSURL) { - msg_send![self, URLResourceDidFinishLoading: sender] +extern_methods!( + unsafe impl NSFileSecurity { + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn URLResourceDidCancelLoading(&self, sender: &NSURL) { - msg_send![self, URLResourceDidCancelLoading: sender] - } - pub unsafe fn URL_resourceDidFailLoadingWithReason(&self, sender: &NSURL, reason: &NSString) { - msg_send![self, URL: sender, resourceDidFailLoadingWithReason: reason] - } -} -#[doc = "NSURLLoading"] -impl NSURL { - pub unsafe fn resourceDataUsingCache( - &self, - shouldUseCache: bool, - ) -> Option> { - msg_send_id![self, resourceDataUsingCache: shouldUseCache] - } - pub unsafe fn loadResourceDataNotifyingClient_usingCache( - &self, - client: &Object, - shouldUseCache: bool, - ) { - msg_send![ - self, - loadResourceDataNotifyingClient: client, - usingCache: shouldUseCache - ] - } - pub unsafe fn propertyForKey(&self, propertyKey: &NSString) -> Option> { - msg_send_id![self, propertyForKey: propertyKey] - } - pub unsafe fn setResourceData(&self, data: &NSData) -> bool { - msg_send![self, setResourceData: data] - } - pub unsafe fn setProperty_forKey(&self, property: &Object, propertyKey: &NSString) -> bool { - msg_send![self, setProperty: property, forKey: propertyKey] +); +extern_methods!( + #[doc = "NSURLClient"] + unsafe impl NSObject { + pub unsafe fn URL_resourceDataDidBecomeAvailable(&self, sender: &NSURL, newBytes: &NSData) { + msg_send![self, URL: sender, resourceDataDidBecomeAvailable: newBytes] + } + pub unsafe fn URLResourceDidFinishLoading(&self, sender: &NSURL) { + msg_send![self, URLResourceDidFinishLoading: sender] + } + pub unsafe fn URLResourceDidCancelLoading(&self, sender: &NSURL) { + msg_send![self, URLResourceDidCancelLoading: sender] + } + pub unsafe fn URL_resourceDidFailLoadingWithReason( + &self, + sender: &NSURL, + reason: &NSString, + ) { + msg_send![self, URL: sender, resourceDidFailLoadingWithReason: reason] + } } - pub unsafe fn URLHandleUsingCache( - &self, - shouldUseCache: bool, - ) -> Option> { - msg_send_id![self, URLHandleUsingCache: shouldUseCache] +); +extern_methods!( + #[doc = "NSURLLoading"] + unsafe impl NSURL { + pub unsafe fn resourceDataUsingCache( + &self, + shouldUseCache: bool, + ) -> Option> { + msg_send_id![self, resourceDataUsingCache: shouldUseCache] + } + pub unsafe fn loadResourceDataNotifyingClient_usingCache( + &self, + client: &Object, + shouldUseCache: bool, + ) { + msg_send![ + self, + loadResourceDataNotifyingClient: client, + usingCache: shouldUseCache + ] + } + pub unsafe fn propertyForKey(&self, propertyKey: &NSString) -> Option> { + msg_send_id![self, propertyForKey: propertyKey] + } + pub unsafe fn setResourceData(&self, data: &NSData) -> bool { + msg_send![self, setResourceData: data] + } + pub unsafe fn setProperty_forKey(&self, property: &Object, propertyKey: &NSString) -> bool { + msg_send![self, setProperty: property, forKey: propertyKey] + } + pub unsafe fn URLHandleUsingCache( + &self, + shouldUseCache: bool, + ) -> Option> { + msg_send_id![self, URLHandleUsingCache: shouldUseCache] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index 3f0b662c2..d43c357e4 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSURLAuthenticationChallengeSender = NSObject; use super::__exported::NSURLAuthenticationChallengeInternal; extern_class!( @@ -16,53 +16,55 @@ extern_class!( type Super = NSObject; } ); -impl NSURLAuthenticationChallenge { - pub unsafe fn initWithProtectionSpace_proposedCredential_previousFailureCount_failureResponse_error_sender( - &self, - space: &NSURLProtectionSpace, - credential: Option<&NSURLCredential>, - previousFailureCount: NSInteger, - response: Option<&NSURLResponse>, - error: Option<&NSError>, - sender: &NSURLAuthenticationChallengeSender, - ) -> Id { - msg_send_id![ - self, - initWithProtectionSpace: space, - proposedCredential: credential, - previousFailureCount: previousFailureCount, - failureResponse: response, - error: error, - sender: sender - ] +extern_methods!( + unsafe impl NSURLAuthenticationChallenge { + pub unsafe fn initWithProtectionSpace_proposedCredential_previousFailureCount_failureResponse_error_sender( + &self, + space: &NSURLProtectionSpace, + credential: Option<&NSURLCredential>, + previousFailureCount: NSInteger, + response: Option<&NSURLResponse>, + error: Option<&NSError>, + sender: &NSURLAuthenticationChallengeSender, + ) -> Id { + msg_send_id![ + self, + initWithProtectionSpace: space, + proposedCredential: credential, + previousFailureCount: previousFailureCount, + failureResponse: response, + error: error, + sender: sender + ] + } + pub unsafe fn initWithAuthenticationChallenge_sender( + &self, + challenge: &NSURLAuthenticationChallenge, + sender: &NSURLAuthenticationChallengeSender, + ) -> Id { + msg_send_id![ + self, + initWithAuthenticationChallenge: challenge, + sender: sender + ] + } + pub unsafe fn protectionSpace(&self) -> Id { + msg_send_id![self, protectionSpace] + } + pub unsafe fn proposedCredential(&self) -> Option> { + msg_send_id![self, proposedCredential] + } + pub unsafe fn previousFailureCount(&self) -> NSInteger { + msg_send![self, previousFailureCount] + } + pub unsafe fn failureResponse(&self) -> Option> { + msg_send_id![self, failureResponse] + } + pub unsafe fn error(&self) -> Option> { + msg_send_id![self, error] + } + pub unsafe fn sender(&self) -> Option> { + msg_send_id![self, sender] + } } - pub unsafe fn initWithAuthenticationChallenge_sender( - &self, - challenge: &NSURLAuthenticationChallenge, - sender: &NSURLAuthenticationChallengeSender, - ) -> Id { - msg_send_id![ - self, - initWithAuthenticationChallenge: challenge, - sender: sender - ] - } - pub unsafe fn protectionSpace(&self) -> Id { - msg_send_id![self, protectionSpace] - } - pub unsafe fn proposedCredential(&self) -> Option> { - msg_send_id![self, proposedCredential] - } - pub unsafe fn previousFailureCount(&self) -> NSInteger { - msg_send![self, previousFailureCount] - } - pub unsafe fn failureResponse(&self) -> Option> { - msg_send_id![self, failureResponse] - } - pub unsafe fn error(&self) -> Option> { - msg_send_id![self, error] - } - pub unsafe fn sender(&self) -> Option> { - msg_send_id![self, sender] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 782419e15..c7941f12e 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCachedURLResponse; @@ -17,42 +17,44 @@ extern_class!( type Super = NSObject; } ); -impl NSCachedURLResponse { - pub unsafe fn initWithResponse_data( - &self, - response: &NSURLResponse, - data: &NSData, - ) -> Id { - msg_send_id![self, initWithResponse: response, data: data] +extern_methods!( + unsafe impl NSCachedURLResponse { + pub unsafe fn initWithResponse_data( + &self, + response: &NSURLResponse, + data: &NSData, + ) -> Id { + msg_send_id![self, initWithResponse: response, data: data] + } + pub unsafe fn initWithResponse_data_userInfo_storagePolicy( + &self, + response: &NSURLResponse, + data: &NSData, + userInfo: Option<&NSDictionary>, + storagePolicy: NSURLCacheStoragePolicy, + ) -> Id { + msg_send_id![ + self, + initWithResponse: response, + data: data, + userInfo: userInfo, + storagePolicy: storagePolicy + ] + } + pub unsafe fn response(&self) -> Id { + msg_send_id![self, response] + } + pub unsafe fn data(&self) -> Id { + msg_send_id![self, data] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } + pub unsafe fn storagePolicy(&self) -> NSURLCacheStoragePolicy { + msg_send![self, storagePolicy] + } } - pub unsafe fn initWithResponse_data_userInfo_storagePolicy( - &self, - response: &NSURLResponse, - data: &NSData, - userInfo: Option<&NSDictionary>, - storagePolicy: NSURLCacheStoragePolicy, - ) -> Id { - msg_send_id![ - self, - initWithResponse: response, - data: data, - userInfo: userInfo, - storagePolicy: storagePolicy - ] - } - pub unsafe fn response(&self) -> Id { - msg_send_id![self, response] - } - pub unsafe fn data(&self) -> Id { - msg_send_id![self, data] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } - pub unsafe fn storagePolicy(&self) -> NSURLCacheStoragePolicy { - msg_send![self, storagePolicy] - } -} +); use super::__exported::NSURLCacheInternal; use super::__exported::NSURLRequest; extern_class!( @@ -62,109 +64,113 @@ extern_class!( type Super = NSObject; } ); -impl NSURLCache { - pub unsafe fn sharedURLCache() -> Id { - msg_send_id![Self::class(), sharedURLCache] - } - pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache) { - msg_send![Self::class(), setSharedURLCache: sharedURLCache] - } - pub unsafe fn initWithMemoryCapacity_diskCapacity_diskPath( - &self, - memoryCapacity: NSUInteger, - diskCapacity: NSUInteger, - path: Option<&NSString>, - ) -> Id { - msg_send_id![ - self, - initWithMemoryCapacity: memoryCapacity, - diskCapacity: diskCapacity, - diskPath: path - ] - } - pub unsafe fn initWithMemoryCapacity_diskCapacity_directoryURL( - &self, - memoryCapacity: NSUInteger, - diskCapacity: NSUInteger, - directoryURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - self, - initWithMemoryCapacity: memoryCapacity, - diskCapacity: diskCapacity, - directoryURL: directoryURL - ] - } - pub unsafe fn cachedResponseForRequest( - &self, - request: &NSURLRequest, - ) -> Option> { - msg_send_id![self, cachedResponseForRequest: request] - } - pub unsafe fn storeCachedResponse_forRequest( - &self, - cachedResponse: &NSCachedURLResponse, - request: &NSURLRequest, - ) { - msg_send![ - self, - storeCachedResponse: cachedResponse, - forRequest: request - ] - } - pub unsafe fn removeCachedResponseForRequest(&self, request: &NSURLRequest) { - msg_send![self, removeCachedResponseForRequest: request] +extern_methods!( + unsafe impl NSURLCache { + pub unsafe fn sharedURLCache() -> Id { + msg_send_id![Self::class(), sharedURLCache] + } + pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache) { + msg_send![Self::class(), setSharedURLCache: sharedURLCache] + } + pub unsafe fn initWithMemoryCapacity_diskCapacity_diskPath( + &self, + memoryCapacity: NSUInteger, + diskCapacity: NSUInteger, + path: Option<&NSString>, + ) -> Id { + msg_send_id![ + self, + initWithMemoryCapacity: memoryCapacity, + diskCapacity: diskCapacity, + diskPath: path + ] + } + pub unsafe fn initWithMemoryCapacity_diskCapacity_directoryURL( + &self, + memoryCapacity: NSUInteger, + diskCapacity: NSUInteger, + directoryURL: Option<&NSURL>, + ) -> Id { + msg_send_id![ + self, + initWithMemoryCapacity: memoryCapacity, + diskCapacity: diskCapacity, + directoryURL: directoryURL + ] + } + pub unsafe fn cachedResponseForRequest( + &self, + request: &NSURLRequest, + ) -> Option> { + msg_send_id![self, cachedResponseForRequest: request] + } + pub unsafe fn storeCachedResponse_forRequest( + &self, + cachedResponse: &NSCachedURLResponse, + request: &NSURLRequest, + ) { + msg_send![ + self, + storeCachedResponse: cachedResponse, + forRequest: request + ] + } + pub unsafe fn removeCachedResponseForRequest(&self, request: &NSURLRequest) { + msg_send![self, removeCachedResponseForRequest: request] + } + pub unsafe fn removeAllCachedResponses(&self) { + msg_send![self, removeAllCachedResponses] + } + pub unsafe fn removeCachedResponsesSinceDate(&self, date: &NSDate) { + msg_send![self, removeCachedResponsesSinceDate: date] + } + pub unsafe fn memoryCapacity(&self) -> NSUInteger { + msg_send![self, memoryCapacity] + } + pub unsafe fn setMemoryCapacity(&self, memoryCapacity: NSUInteger) { + msg_send![self, setMemoryCapacity: memoryCapacity] + } + pub unsafe fn diskCapacity(&self) -> NSUInteger { + msg_send![self, diskCapacity] + } + pub unsafe fn setDiskCapacity(&self, diskCapacity: NSUInteger) { + msg_send![self, setDiskCapacity: diskCapacity] + } + pub unsafe fn currentMemoryUsage(&self) -> NSUInteger { + msg_send![self, currentMemoryUsage] + } + pub unsafe fn currentDiskUsage(&self) -> NSUInteger { + msg_send![self, currentDiskUsage] + } } - pub unsafe fn removeAllCachedResponses(&self) { - msg_send![self, removeAllCachedResponses] - } - pub unsafe fn removeCachedResponsesSinceDate(&self, date: &NSDate) { - msg_send![self, removeCachedResponsesSinceDate: date] - } - pub unsafe fn memoryCapacity(&self) -> NSUInteger { - msg_send![self, memoryCapacity] - } - pub unsafe fn setMemoryCapacity(&self, memoryCapacity: NSUInteger) { - msg_send![self, setMemoryCapacity: memoryCapacity] - } - pub unsafe fn diskCapacity(&self) -> NSUInteger { - msg_send![self, diskCapacity] - } - pub unsafe fn setDiskCapacity(&self, diskCapacity: NSUInteger) { - msg_send![self, setDiskCapacity: diskCapacity] - } - pub unsafe fn currentMemoryUsage(&self) -> NSUInteger { - msg_send![self, currentMemoryUsage] - } - pub unsafe fn currentDiskUsage(&self) -> NSUInteger { - msg_send![self, currentDiskUsage] - } -} -#[doc = "NSURLSessionTaskAdditions"] -impl NSURLCache { - pub unsafe fn storeCachedResponse_forDataTask( - &self, - cachedResponse: &NSCachedURLResponse, - dataTask: &NSURLSessionDataTask, - ) { - msg_send![ - self, - storeCachedResponse: cachedResponse, - forDataTask: dataTask - ] - } - pub unsafe fn getCachedResponseForDataTask_completionHandler( - &self, - dataTask: &NSURLSessionDataTask, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - getCachedResponseForDataTask: dataTask, - completionHandler: completionHandler - ] - } - pub unsafe fn removeCachedResponseForDataTask(&self, dataTask: &NSURLSessionDataTask) { - msg_send![self, removeCachedResponseForDataTask: dataTask] +); +extern_methods!( + #[doc = "NSURLSessionTaskAdditions"] + unsafe impl NSURLCache { + pub unsafe fn storeCachedResponse_forDataTask( + &self, + cachedResponse: &NSCachedURLResponse, + dataTask: &NSURLSessionDataTask, + ) { + msg_send![ + self, + storeCachedResponse: cachedResponse, + forDataTask: dataTask + ] + } + pub unsafe fn getCachedResponseForDataTask_completionHandler( + &self, + dataTask: &NSURLSessionDataTask, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getCachedResponseForDataTask: dataTask, + completionHandler: completionHandler + ] + } + pub unsafe fn removeCachedResponseForDataTask(&self, dataTask: &NSURLSessionDataTask) { + msg_send![self, removeCachedResponseForDataTask: dataTask] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index a54bf4e67..f792eb1e2 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -16,7 +16,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLConnection; @@ -24,91 +24,101 @@ extern_class!( type Super = NSObject; } ); -impl NSURLConnection { - pub unsafe fn initWithRequest_delegate_startImmediately( - &self, - request: &NSURLRequest, - delegate: Option<&Object>, - startImmediately: bool, - ) -> Option> { - msg_send_id![ - self, - initWithRequest: request, - delegate: delegate, - startImmediately: startImmediately - ] +extern_methods!( + unsafe impl NSURLConnection { + pub unsafe fn initWithRequest_delegate_startImmediately( + &self, + request: &NSURLRequest, + delegate: Option<&Object>, + startImmediately: bool, + ) -> Option> { + msg_send_id![ + self, + initWithRequest: request, + delegate: delegate, + startImmediately: startImmediately + ] + } + pub unsafe fn initWithRequest_delegate( + &self, + request: &NSURLRequest, + delegate: Option<&Object>, + ) -> Option> { + msg_send_id![self, initWithRequest: request, delegate: delegate] + } + pub unsafe fn connectionWithRequest_delegate( + request: &NSURLRequest, + delegate: Option<&Object>, + ) -> Option> { + msg_send_id![ + Self::class(), + connectionWithRequest: request, + delegate: delegate + ] + } + pub unsafe fn originalRequest(&self) -> Id { + msg_send_id![self, originalRequest] + } + pub unsafe fn currentRequest(&self) -> Id { + msg_send_id![self, currentRequest] + } + pub unsafe fn start(&self) { + msg_send![self, start] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { + msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn unscheduleFromRunLoop_forMode( + &self, + aRunLoop: &NSRunLoop, + mode: &NSRunLoopMode, + ) { + msg_send![self, unscheduleFromRunLoop: aRunLoop, forMode: mode] + } + pub unsafe fn setDelegateQueue(&self, queue: Option<&NSOperationQueue>) { + msg_send![self, setDelegateQueue: queue] + } + pub unsafe fn canHandleRequest(request: &NSURLRequest) -> bool { + msg_send![Self::class(), canHandleRequest: request] + } } - pub unsafe fn initWithRequest_delegate( - &self, - request: &NSURLRequest, - delegate: Option<&Object>, - ) -> Option> { - msg_send_id![self, initWithRequest: request, delegate: delegate] - } - pub unsafe fn connectionWithRequest_delegate( - request: &NSURLRequest, - delegate: Option<&Object>, - ) -> Option> { - msg_send_id![ - Self::class(), - connectionWithRequest: request, - delegate: delegate - ] - } - pub unsafe fn originalRequest(&self) -> Id { - msg_send_id![self, originalRequest] - } - pub unsafe fn currentRequest(&self) -> Id { - msg_send_id![self, currentRequest] - } - pub unsafe fn start(&self) { - msg_send![self, start] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn unscheduleFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, unscheduleFromRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn setDelegateQueue(&self, queue: Option<&NSOperationQueue>) { - msg_send![self, setDelegateQueue: queue] - } - pub unsafe fn canHandleRequest(request: &NSURLRequest) -> bool { - msg_send![Self::class(), canHandleRequest: request] - } -} +); pub type NSURLConnectionDelegate = NSObject; pub type NSURLConnectionDataDelegate = NSObject; pub type NSURLConnectionDownloadDelegate = NSObject; -#[doc = "NSURLConnectionSynchronousLoading"] -impl NSURLConnection { - pub unsafe fn sendSynchronousRequest_returningResponse_error( - request: &NSURLRequest, - response: Option<&mut Option>>, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - sendSynchronousRequest: request, - returningResponse: response, - error: _ - ] +extern_methods!( + #[doc = "NSURLConnectionSynchronousLoading"] + unsafe impl NSURLConnection { + pub unsafe fn sendSynchronousRequest_returningResponse_error( + request: &NSURLRequest, + response: Option<&mut Option>>, + ) -> Result, Id> { + msg_send_id![ + Self::class(), + sendSynchronousRequest: request, + returningResponse: response, + error: _ + ] + } } -} -#[doc = "NSURLConnectionQueuedLoading"] -impl NSURLConnection { - pub unsafe fn sendAsynchronousRequest_queue_completionHandler( - request: &NSURLRequest, - queue: &NSOperationQueue, - handler: TodoBlock, - ) { - msg_send![ - Self::class(), - sendAsynchronousRequest: request, - queue: queue, - completionHandler: handler - ] +); +extern_methods!( + #[doc = "NSURLConnectionQueuedLoading"] + unsafe impl NSURLConnection { + pub unsafe fn sendAsynchronousRequest_queue_completionHandler( + request: &NSURLRequest, + queue: &NSOperationQueue, + handler: TodoBlock, + ) { + msg_send![ + Self::class(), + sendAsynchronousRequest: request, + queue: queue, + completionHandler: handler + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index 6c71e9b56..c5a48ccae 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -6,7 +6,7 @@ use crate::Security::generated::Security::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLCredential; @@ -14,88 +14,96 @@ extern_class!( type Super = NSObject; } ); -impl NSURLCredential { - pub unsafe fn persistence(&self) -> NSURLCredentialPersistence { - msg_send![self, persistence] +extern_methods!( + unsafe impl NSURLCredential { + pub unsafe fn persistence(&self) -> NSURLCredentialPersistence { + msg_send![self, persistence] + } } -} -#[doc = "NSInternetPassword"] -impl NSURLCredential { - pub unsafe fn initWithUser_password_persistence( - &self, - user: &NSString, - password: &NSString, - persistence: NSURLCredentialPersistence, - ) -> Id { - msg_send_id![ - self, - initWithUser: user, - password: password, - persistence: persistence - ] - } - pub unsafe fn credentialWithUser_password_persistence( - user: &NSString, - password: &NSString, - persistence: NSURLCredentialPersistence, - ) -> Id { - msg_send_id![ - Self::class(), - credentialWithUser: user, - password: password, - persistence: persistence - ] - } - pub unsafe fn user(&self) -> Option> { - msg_send_id![self, user] - } - pub unsafe fn password(&self) -> Option> { - msg_send_id![self, password] - } - pub unsafe fn hasPassword(&self) -> bool { - msg_send![self, hasPassword] - } -} -#[doc = "NSClientCertificate"] -impl NSURLCredential { - pub unsafe fn initWithIdentity_certificates_persistence( - &self, - identity: SecIdentityRef, - certArray: Option<&NSArray>, - persistence: NSURLCredentialPersistence, - ) -> Id { - msg_send_id![ - self, - initWithIdentity: identity, - certificates: certArray, - persistence: persistence - ] - } - pub unsafe fn credentialWithIdentity_certificates_persistence( - identity: SecIdentityRef, - certArray: Option<&NSArray>, - persistence: NSURLCredentialPersistence, - ) -> Id { - msg_send_id![ - Self::class(), - credentialWithIdentity: identity, - certificates: certArray, - persistence: persistence - ] - } - pub unsafe fn identity(&self) -> SecIdentityRef { - msg_send![self, identity] - } - pub unsafe fn certificates(&self) -> Id { - msg_send_id![self, certificates] +); +extern_methods!( + #[doc = "NSInternetPassword"] + unsafe impl NSURLCredential { + pub unsafe fn initWithUser_password_persistence( + &self, + user: &NSString, + password: &NSString, + persistence: NSURLCredentialPersistence, + ) -> Id { + msg_send_id![ + self, + initWithUser: user, + password: password, + persistence: persistence + ] + } + pub unsafe fn credentialWithUser_password_persistence( + user: &NSString, + password: &NSString, + persistence: NSURLCredentialPersistence, + ) -> Id { + msg_send_id![ + Self::class(), + credentialWithUser: user, + password: password, + persistence: persistence + ] + } + pub unsafe fn user(&self) -> Option> { + msg_send_id![self, user] + } + pub unsafe fn password(&self) -> Option> { + msg_send_id![self, password] + } + pub unsafe fn hasPassword(&self) -> bool { + msg_send![self, hasPassword] + } } -} -#[doc = "NSServerTrust"] -impl NSURLCredential { - pub unsafe fn initWithTrust(&self, trust: SecTrustRef) -> Id { - msg_send_id![self, initWithTrust: trust] +); +extern_methods!( + #[doc = "NSClientCertificate"] + unsafe impl NSURLCredential { + pub unsafe fn initWithIdentity_certificates_persistence( + &self, + identity: SecIdentityRef, + certArray: Option<&NSArray>, + persistence: NSURLCredentialPersistence, + ) -> Id { + msg_send_id![ + self, + initWithIdentity: identity, + certificates: certArray, + persistence: persistence + ] + } + pub unsafe fn credentialWithIdentity_certificates_persistence( + identity: SecIdentityRef, + certArray: Option<&NSArray>, + persistence: NSURLCredentialPersistence, + ) -> Id { + msg_send_id![ + Self::class(), + credentialWithIdentity: identity, + certificates: certArray, + persistence: persistence + ] + } + pub unsafe fn identity(&self) -> SecIdentityRef { + msg_send![self, identity] + } + pub unsafe fn certificates(&self) -> Id { + msg_send_id![self, certificates] + } } - pub unsafe fn credentialForTrust(trust: SecTrustRef) -> Id { - msg_send_id![Self::class(), credentialForTrust: trust] +); +extern_methods!( + #[doc = "NSServerTrust"] + unsafe impl NSURLCredential { + pub unsafe fn initWithTrust(&self, trust: SecTrustRef) -> Id { + msg_send_id![self, initWithTrust: trust] + } + pub unsafe fn credentialForTrust(trust: SecTrustRef) -> Id { + msg_send_id![Self::class(), credentialForTrust: trust] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 0fdfbb30b..165f0a1b3 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSURLProtectionSpace::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLCredentialStorage; @@ -17,138 +17,142 @@ extern_class!( type Super = NSObject; } ); -impl NSURLCredentialStorage { - pub unsafe fn sharedCredentialStorage() -> Id { - msg_send_id![Self::class(), sharedCredentialStorage] +extern_methods!( + unsafe impl NSURLCredentialStorage { + pub unsafe fn sharedCredentialStorage() -> Id { + msg_send_id![Self::class(), sharedCredentialStorage] + } + pub unsafe fn credentialsForProtectionSpace( + &self, + space: &NSURLProtectionSpace, + ) -> Option, Shared>> { + msg_send_id![self, credentialsForProtectionSpace: space] + } + pub unsafe fn allCredentials( + &self, + ) -> Id>, Shared> + { + msg_send_id![self, allCredentials] + } + pub unsafe fn setCredential_forProtectionSpace( + &self, + credential: &NSURLCredential, + space: &NSURLProtectionSpace, + ) { + msg_send![self, setCredential: credential, forProtectionSpace: space] + } + pub unsafe fn removeCredential_forProtectionSpace( + &self, + credential: &NSURLCredential, + space: &NSURLProtectionSpace, + ) { + msg_send![ + self, + removeCredential: credential, + forProtectionSpace: space + ] + } + pub unsafe fn removeCredential_forProtectionSpace_options( + &self, + credential: &NSURLCredential, + space: &NSURLProtectionSpace, + options: Option<&NSDictionary>, + ) { + msg_send![ + self, + removeCredential: credential, + forProtectionSpace: space, + options: options + ] + } + pub unsafe fn defaultCredentialForProtectionSpace( + &self, + space: &NSURLProtectionSpace, + ) -> Option> { + msg_send_id![self, defaultCredentialForProtectionSpace: space] + } + pub unsafe fn setDefaultCredential_forProtectionSpace( + &self, + credential: &NSURLCredential, + space: &NSURLProtectionSpace, + ) { + msg_send![ + self, + setDefaultCredential: credential, + forProtectionSpace: space + ] + } } - pub unsafe fn credentialsForProtectionSpace( - &self, - space: &NSURLProtectionSpace, - ) -> Option, Shared>> { - msg_send_id![self, credentialsForProtectionSpace: space] - } - pub unsafe fn allCredentials( - &self, - ) -> Id>, Shared> - { - msg_send_id![self, allCredentials] - } - pub unsafe fn setCredential_forProtectionSpace( - &self, - credential: &NSURLCredential, - space: &NSURLProtectionSpace, - ) { - msg_send![self, setCredential: credential, forProtectionSpace: space] - } - pub unsafe fn removeCredential_forProtectionSpace( - &self, - credential: &NSURLCredential, - space: &NSURLProtectionSpace, - ) { - msg_send![ - self, - removeCredential: credential, - forProtectionSpace: space - ] - } - pub unsafe fn removeCredential_forProtectionSpace_options( - &self, - credential: &NSURLCredential, - space: &NSURLProtectionSpace, - options: Option<&NSDictionary>, - ) { - msg_send![ - self, - removeCredential: credential, - forProtectionSpace: space, - options: options - ] - } - pub unsafe fn defaultCredentialForProtectionSpace( - &self, - space: &NSURLProtectionSpace, - ) -> Option> { - msg_send_id![self, defaultCredentialForProtectionSpace: space] - } - pub unsafe fn setDefaultCredential_forProtectionSpace( - &self, - credential: &NSURLCredential, - space: &NSURLProtectionSpace, - ) { - msg_send![ - self, - setDefaultCredential: credential, - forProtectionSpace: space - ] - } -} -#[doc = "NSURLSessionTaskAdditions"] -impl NSURLCredentialStorage { - pub unsafe fn getCredentialsForProtectionSpace_task_completionHandler( - &self, - protectionSpace: &NSURLProtectionSpace, - task: &NSURLSessionTask, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - getCredentialsForProtectionSpace: protectionSpace, - task: task, - completionHandler: completionHandler - ] - } - pub unsafe fn setCredential_forProtectionSpace_task( - &self, - credential: &NSURLCredential, - protectionSpace: &NSURLProtectionSpace, - task: &NSURLSessionTask, - ) { - msg_send![ - self, - setCredential: credential, - forProtectionSpace: protectionSpace, - task: task - ] - } - pub unsafe fn removeCredential_forProtectionSpace_options_task( - &self, - credential: &NSURLCredential, - protectionSpace: &NSURLProtectionSpace, - options: Option<&NSDictionary>, - task: &NSURLSessionTask, - ) { - msg_send![ - self, - removeCredential: credential, - forProtectionSpace: protectionSpace, - options: options, - task: task - ] - } - pub unsafe fn getDefaultCredentialForProtectionSpace_task_completionHandler( - &self, - space: &NSURLProtectionSpace, - task: &NSURLSessionTask, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - getDefaultCredentialForProtectionSpace: space, - task: task, - completionHandler: completionHandler - ] - } - pub unsafe fn setDefaultCredential_forProtectionSpace_task( - &self, - credential: &NSURLCredential, - protectionSpace: &NSURLProtectionSpace, - task: &NSURLSessionTask, - ) { - msg_send![ - self, - setDefaultCredential: credential, - forProtectionSpace: protectionSpace, - task: task - ] +); +extern_methods!( + #[doc = "NSURLSessionTaskAdditions"] + unsafe impl NSURLCredentialStorage { + pub unsafe fn getCredentialsForProtectionSpace_task_completionHandler( + &self, + protectionSpace: &NSURLProtectionSpace, + task: &NSURLSessionTask, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getCredentialsForProtectionSpace: protectionSpace, + task: task, + completionHandler: completionHandler + ] + } + pub unsafe fn setCredential_forProtectionSpace_task( + &self, + credential: &NSURLCredential, + protectionSpace: &NSURLProtectionSpace, + task: &NSURLSessionTask, + ) { + msg_send![ + self, + setCredential: credential, + forProtectionSpace: protectionSpace, + task: task + ] + } + pub unsafe fn removeCredential_forProtectionSpace_options_task( + &self, + credential: &NSURLCredential, + protectionSpace: &NSURLProtectionSpace, + options: Option<&NSDictionary>, + task: &NSURLSessionTask, + ) { + msg_send![ + self, + removeCredential: credential, + forProtectionSpace: protectionSpace, + options: options, + task: task + ] + } + pub unsafe fn getDefaultCredentialForProtectionSpace_task_completionHandler( + &self, + space: &NSURLProtectionSpace, + task: &NSURLSessionTask, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getDefaultCredentialForProtectionSpace: space, + task: task, + completionHandler: completionHandler + ] + } + pub unsafe fn setDefaultCredential_forProtectionSpace_task( + &self, + credential: &NSURLCredential, + protectionSpace: &NSURLProtectionSpace, + task: &NSURLSessionTask, + ) { + msg_send![ + self, + setDefaultCredential: credential, + forProtectionSpace: protectionSpace, + task: task + ] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index cb69757cd..41a88a0de 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLDownload; @@ -18,50 +18,52 @@ extern_class!( type Super = NSObject; } ); -impl NSURLDownload { - pub unsafe fn canResumeDownloadDecodedWithEncodingMIMEType(MIMEType: &NSString) -> bool { - msg_send![ - Self::class(), - canResumeDownloadDecodedWithEncodingMIMEType: MIMEType - ] +extern_methods!( + unsafe impl NSURLDownload { + pub unsafe fn canResumeDownloadDecodedWithEncodingMIMEType(MIMEType: &NSString) -> bool { + msg_send![ + Self::class(), + canResumeDownloadDecodedWithEncodingMIMEType: MIMEType + ] + } + pub unsafe fn initWithRequest_delegate( + &self, + request: &NSURLRequest, + delegate: Option<&NSURLDownloadDelegate>, + ) -> Id { + msg_send_id![self, initWithRequest: request, delegate: delegate] + } + pub unsafe fn initWithResumeData_delegate_path( + &self, + resumeData: &NSData, + delegate: Option<&NSURLDownloadDelegate>, + path: &NSString, + ) -> Id { + msg_send_id![ + self, + initWithResumeData: resumeData, + delegate: delegate, + path: path + ] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn setDestination_allowOverwrite(&self, path: &NSString, allowOverwrite: bool) { + msg_send![self, setDestination: path, allowOverwrite: allowOverwrite] + } + pub unsafe fn request(&self) -> Id { + msg_send_id![self, request] + } + pub unsafe fn resumeData(&self) -> Option> { + msg_send_id![self, resumeData] + } + pub unsafe fn deletesFileUponFailure(&self) -> bool { + msg_send![self, deletesFileUponFailure] + } + pub unsafe fn setDeletesFileUponFailure(&self, deletesFileUponFailure: bool) { + msg_send![self, setDeletesFileUponFailure: deletesFileUponFailure] + } } - pub unsafe fn initWithRequest_delegate( - &self, - request: &NSURLRequest, - delegate: Option<&NSURLDownloadDelegate>, - ) -> Id { - msg_send_id![self, initWithRequest: request, delegate: delegate] - } - pub unsafe fn initWithResumeData_delegate_path( - &self, - resumeData: &NSData, - delegate: Option<&NSURLDownloadDelegate>, - path: &NSString, - ) -> Id { - msg_send_id![ - self, - initWithResumeData: resumeData, - delegate: delegate, - path: path - ] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn setDestination_allowOverwrite(&self, path: &NSString, allowOverwrite: bool) { - msg_send![self, setDestination: path, allowOverwrite: allowOverwrite] - } - pub unsafe fn request(&self) -> Id { - msg_send_id![self, request] - } - pub unsafe fn resumeData(&self) -> Option> { - msg_send_id![self, resumeData] - } - pub unsafe fn deletesFileUponFailure(&self) -> bool { - msg_send![self, deletesFileUponFailure] - } - pub unsafe fn setDeletesFileUponFailure(&self, deletesFileUponFailure: bool) { - msg_send![self, setDeletesFileUponFailure: deletesFileUponFailure] - } -} +); pub type NSURLDownloadDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index e751036f7..0b843ca3f 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -5,4 +5,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index a439091cd..fe0042a35 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSURLHandleClient = NSObject; extern_class!( #[derive(Debug)] @@ -15,91 +15,93 @@ extern_class!( type Super = NSObject; } ); -impl NSURLHandle { - pub unsafe fn registerURLHandleClass(anURLHandleSubclass: Option<&Class>) { - msg_send![Self::class(), registerURLHandleClass: anURLHandleSubclass] +extern_methods!( + unsafe impl NSURLHandle { + pub unsafe fn registerURLHandleClass(anURLHandleSubclass: Option<&Class>) { + msg_send![Self::class(), registerURLHandleClass: anURLHandleSubclass] + } + pub unsafe fn URLHandleClassForURL(anURL: Option<&NSURL>) -> Option<&Class> { + msg_send![Self::class(), URLHandleClassForURL: anURL] + } + pub unsafe fn status(&self) -> NSURLHandleStatus { + msg_send![self, status] + } + pub unsafe fn failureReason(&self) -> Option> { + msg_send_id![self, failureReason] + } + pub unsafe fn addClient(&self, client: Option<&NSURLHandleClient>) { + msg_send![self, addClient: client] + } + pub unsafe fn removeClient(&self, client: Option<&NSURLHandleClient>) { + msg_send![self, removeClient: client] + } + pub unsafe fn loadInBackground(&self) { + msg_send![self, loadInBackground] + } + pub unsafe fn cancelLoadInBackground(&self) { + msg_send![self, cancelLoadInBackground] + } + pub unsafe fn resourceData(&self) -> Option> { + msg_send_id![self, resourceData] + } + pub unsafe fn availableResourceData(&self) -> Option> { + msg_send_id![self, availableResourceData] + } + pub unsafe fn expectedResourceDataSize(&self) -> c_longlong { + msg_send![self, expectedResourceDataSize] + } + pub unsafe fn flushCachedData(&self) { + msg_send![self, flushCachedData] + } + pub unsafe fn backgroundLoadDidFailWithReason(&self, reason: Option<&NSString>) { + msg_send![self, backgroundLoadDidFailWithReason: reason] + } + pub unsafe fn didLoadBytes_loadComplete(&self, newBytes: Option<&NSData>, yorn: bool) { + msg_send![self, didLoadBytes: newBytes, loadComplete: yorn] + } + pub unsafe fn canInitWithURL(anURL: Option<&NSURL>) -> bool { + msg_send![Self::class(), canInitWithURL: anURL] + } + pub unsafe fn cachedHandleForURL(anURL: Option<&NSURL>) -> Option> { + msg_send_id![Self::class(), cachedHandleForURL: anURL] + } + pub unsafe fn initWithURL_cached( + &self, + anURL: Option<&NSURL>, + willCache: bool, + ) -> Option> { + msg_send_id![self, initWithURL: anURL, cached: willCache] + } + pub unsafe fn propertyForKey( + &self, + propertyKey: Option<&NSString>, + ) -> Option> { + msg_send_id![self, propertyForKey: propertyKey] + } + pub unsafe fn propertyForKeyIfAvailable( + &self, + propertyKey: Option<&NSString>, + ) -> Option> { + msg_send_id![self, propertyForKeyIfAvailable: propertyKey] + } + pub unsafe fn writeProperty_forKey( + &self, + propertyValue: Option<&Object>, + propertyKey: Option<&NSString>, + ) -> bool { + msg_send![self, writeProperty: propertyValue, forKey: propertyKey] + } + pub unsafe fn writeData(&self, data: Option<&NSData>) -> bool { + msg_send![self, writeData: data] + } + pub unsafe fn loadInForeground(&self) -> Option> { + msg_send_id![self, loadInForeground] + } + pub unsafe fn beginLoadInBackground(&self) { + msg_send![self, beginLoadInBackground] + } + pub unsafe fn endLoadInBackground(&self) { + msg_send![self, endLoadInBackground] + } } - pub unsafe fn URLHandleClassForURL(anURL: Option<&NSURL>) -> Option<&Class> { - msg_send![Self::class(), URLHandleClassForURL: anURL] - } - pub unsafe fn status(&self) -> NSURLHandleStatus { - msg_send![self, status] - } - pub unsafe fn failureReason(&self) -> Option> { - msg_send_id![self, failureReason] - } - pub unsafe fn addClient(&self, client: Option<&NSURLHandleClient>) { - msg_send![self, addClient: client] - } - pub unsafe fn removeClient(&self, client: Option<&NSURLHandleClient>) { - msg_send![self, removeClient: client] - } - pub unsafe fn loadInBackground(&self) { - msg_send![self, loadInBackground] - } - pub unsafe fn cancelLoadInBackground(&self) { - msg_send![self, cancelLoadInBackground] - } - pub unsafe fn resourceData(&self) -> Option> { - msg_send_id![self, resourceData] - } - pub unsafe fn availableResourceData(&self) -> Option> { - msg_send_id![self, availableResourceData] - } - pub unsafe fn expectedResourceDataSize(&self) -> c_longlong { - msg_send![self, expectedResourceDataSize] - } - pub unsafe fn flushCachedData(&self) { - msg_send![self, flushCachedData] - } - pub unsafe fn backgroundLoadDidFailWithReason(&self, reason: Option<&NSString>) { - msg_send![self, backgroundLoadDidFailWithReason: reason] - } - pub unsafe fn didLoadBytes_loadComplete(&self, newBytes: Option<&NSData>, yorn: bool) { - msg_send![self, didLoadBytes: newBytes, loadComplete: yorn] - } - pub unsafe fn canInitWithURL(anURL: Option<&NSURL>) -> bool { - msg_send![Self::class(), canInitWithURL: anURL] - } - pub unsafe fn cachedHandleForURL(anURL: Option<&NSURL>) -> Option> { - msg_send_id![Self::class(), cachedHandleForURL: anURL] - } - pub unsafe fn initWithURL_cached( - &self, - anURL: Option<&NSURL>, - willCache: bool, - ) -> Option> { - msg_send_id![self, initWithURL: anURL, cached: willCache] - } - pub unsafe fn propertyForKey( - &self, - propertyKey: Option<&NSString>, - ) -> Option> { - msg_send_id![self, propertyForKey: propertyKey] - } - pub unsafe fn propertyForKeyIfAvailable( - &self, - propertyKey: Option<&NSString>, - ) -> Option> { - msg_send_id![self, propertyForKeyIfAvailable: propertyKey] - } - pub unsafe fn writeProperty_forKey( - &self, - propertyValue: Option<&Object>, - propertyKey: Option<&NSString>, - ) -> bool { - msg_send![self, writeProperty: propertyValue, forKey: propertyKey] - } - pub unsafe fn writeData(&self, data: Option<&NSData>) -> bool { - msg_send![self, writeData: data] - } - pub unsafe fn loadInForeground(&self) -> Option> { - msg_send_id![self, loadInForeground] - } - pub unsafe fn beginLoadInBackground(&self) { - msg_send![self, beginLoadInBackground] - } - pub unsafe fn endLoadInBackground(&self) { - msg_send![self, endLoadInBackground] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 0cf7282c8..5cc5eb7d6 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -7,7 +7,7 @@ use crate::Security::generated::Security::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLProtectionSpace; @@ -15,68 +15,74 @@ extern_class!( type Super = NSObject; } ); -impl NSURLProtectionSpace { - pub unsafe fn initWithHost_port_protocol_realm_authenticationMethod( - &self, - host: &NSString, - port: NSInteger, - protocol: Option<&NSString>, - realm: Option<&NSString>, - authenticationMethod: Option<&NSString>, - ) -> Id { - msg_send_id![ - self, - initWithHost: host, - port: port, - protocol: protocol, - realm: realm, - authenticationMethod: authenticationMethod - ] +extern_methods!( + unsafe impl NSURLProtectionSpace { + pub unsafe fn initWithHost_port_protocol_realm_authenticationMethod( + &self, + host: &NSString, + port: NSInteger, + protocol: Option<&NSString>, + realm: Option<&NSString>, + authenticationMethod: Option<&NSString>, + ) -> Id { + msg_send_id![ + self, + initWithHost: host, + port: port, + protocol: protocol, + realm: realm, + authenticationMethod: authenticationMethod + ] + } + pub unsafe fn initWithProxyHost_port_type_realm_authenticationMethod( + &self, + host: &NSString, + port: NSInteger, + type_: Option<&NSString>, + realm: Option<&NSString>, + authenticationMethod: Option<&NSString>, + ) -> Id { + msg_send_id ! [self , initWithProxyHost : host , port : port , type : type_ , realm : realm , authenticationMethod : authenticationMethod] + } + pub unsafe fn realm(&self) -> Option> { + msg_send_id![self, realm] + } + pub unsafe fn receivesCredentialSecurely(&self) -> bool { + msg_send![self, receivesCredentialSecurely] + } + pub unsafe fn isProxy(&self) -> bool { + msg_send![self, isProxy] + } + pub unsafe fn host(&self) -> Id { + msg_send_id![self, host] + } + pub unsafe fn port(&self) -> NSInteger { + msg_send![self, port] + } + pub unsafe fn proxyType(&self) -> Option> { + msg_send_id![self, proxyType] + } + pub unsafe fn protocol(&self) -> Option> { + msg_send_id![self, protocol] + } + pub unsafe fn authenticationMethod(&self) -> Id { + msg_send_id![self, authenticationMethod] + } } - pub unsafe fn initWithProxyHost_port_type_realm_authenticationMethod( - &self, - host: &NSString, - port: NSInteger, - type_: Option<&NSString>, - realm: Option<&NSString>, - authenticationMethod: Option<&NSString>, - ) -> Id { - msg_send_id ! [self , initWithProxyHost : host , port : port , type : type_ , realm : realm , authenticationMethod : authenticationMethod] - } - pub unsafe fn realm(&self) -> Option> { - msg_send_id![self, realm] - } - pub unsafe fn receivesCredentialSecurely(&self) -> bool { - msg_send![self, receivesCredentialSecurely] - } - pub unsafe fn isProxy(&self) -> bool { - msg_send![self, isProxy] - } - pub unsafe fn host(&self) -> Id { - msg_send_id![self, host] - } - pub unsafe fn port(&self) -> NSInteger { - msg_send![self, port] - } - pub unsafe fn proxyType(&self) -> Option> { - msg_send_id![self, proxyType] - } - pub unsafe fn protocol(&self) -> Option> { - msg_send_id![self, protocol] - } - pub unsafe fn authenticationMethod(&self) -> Id { - msg_send_id![self, authenticationMethod] - } -} -#[doc = "NSClientCertificateSpace"] -impl NSURLProtectionSpace { - pub unsafe fn distinguishedNames(&self) -> Option, Shared>> { - msg_send_id![self, distinguishedNames] +); +extern_methods!( + #[doc = "NSClientCertificateSpace"] + unsafe impl NSURLProtectionSpace { + pub unsafe fn distinguishedNames(&self) -> Option, Shared>> { + msg_send_id![self, distinguishedNames] + } } -} -#[doc = "NSServerTrustValidationSpace"] -impl NSURLProtectionSpace { - pub unsafe fn serverTrust(&self) -> SecTrustRef { - msg_send![self, serverTrust] +); +extern_methods!( + #[doc = "NSServerTrustValidationSpace"] + unsafe impl NSURLProtectionSpace { + pub unsafe fn serverTrust(&self) -> SecTrustRef { + msg_send![self, serverTrust] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 86be87b8f..5fcb3a67f 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -12,7 +12,7 @@ use crate::Foundation::generated::NSURLCache::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSURLProtocolClient = NSObject; extern_class!( #[derive(Debug)] @@ -21,91 +21,103 @@ extern_class!( type Super = NSObject; } ); -impl NSURLProtocol { - pub unsafe fn initWithRequest_cachedResponse_client( - &self, - request: &NSURLRequest, - cachedResponse: Option<&NSCachedURLResponse>, - client: Option<&NSURLProtocolClient>, - ) -> Id { - msg_send_id![ - self, - initWithRequest: request, - cachedResponse: cachedResponse, - client: client - ] +extern_methods!( + unsafe impl NSURLProtocol { + pub unsafe fn initWithRequest_cachedResponse_client( + &self, + request: &NSURLRequest, + cachedResponse: Option<&NSCachedURLResponse>, + client: Option<&NSURLProtocolClient>, + ) -> Id { + msg_send_id![ + self, + initWithRequest: request, + cachedResponse: cachedResponse, + client: client + ] + } + pub unsafe fn client(&self) -> Option> { + msg_send_id![self, client] + } + pub unsafe fn request(&self) -> Id { + msg_send_id![self, request] + } + pub unsafe fn cachedResponse(&self) -> Option> { + msg_send_id![self, cachedResponse] + } + pub unsafe fn canInitWithRequest(request: &NSURLRequest) -> bool { + msg_send![Self::class(), canInitWithRequest: request] + } + pub unsafe fn canonicalRequestForRequest( + request: &NSURLRequest, + ) -> Id { + msg_send_id![Self::class(), canonicalRequestForRequest: request] + } + pub unsafe fn requestIsCacheEquivalent_toRequest( + a: &NSURLRequest, + b: &NSURLRequest, + ) -> bool { + msg_send![Self::class(), requestIsCacheEquivalent: a, toRequest: b] + } + pub unsafe fn startLoading(&self) { + msg_send![self, startLoading] + } + pub unsafe fn stopLoading(&self) { + msg_send![self, stopLoading] + } + pub unsafe fn propertyForKey_inRequest( + key: &NSString, + request: &NSURLRequest, + ) -> Option> { + msg_send_id![Self::class(), propertyForKey: key, inRequest: request] + } + pub unsafe fn setProperty_forKey_inRequest( + value: &Object, + key: &NSString, + request: &NSMutableURLRequest, + ) { + msg_send![ + Self::class(), + setProperty: value, + forKey: key, + inRequest: request + ] + } + pub unsafe fn removePropertyForKey_inRequest( + key: &NSString, + request: &NSMutableURLRequest, + ) { + msg_send![Self::class(), removePropertyForKey: key, inRequest: request] + } + pub unsafe fn registerClass(protocolClass: &Class) -> bool { + msg_send![Self::class(), registerClass: protocolClass] + } + pub unsafe fn unregisterClass(protocolClass: &Class) { + msg_send![Self::class(), unregisterClass: protocolClass] + } } - pub unsafe fn client(&self) -> Option> { - msg_send_id![self, client] - } - pub unsafe fn request(&self) -> Id { - msg_send_id![self, request] - } - pub unsafe fn cachedResponse(&self) -> Option> { - msg_send_id![self, cachedResponse] - } - pub unsafe fn canInitWithRequest(request: &NSURLRequest) -> bool { - msg_send![Self::class(), canInitWithRequest: request] - } - pub unsafe fn canonicalRequestForRequest(request: &NSURLRequest) -> Id { - msg_send_id![Self::class(), canonicalRequestForRequest: request] - } - pub unsafe fn requestIsCacheEquivalent_toRequest(a: &NSURLRequest, b: &NSURLRequest) -> bool { - msg_send![Self::class(), requestIsCacheEquivalent: a, toRequest: b] - } - pub unsafe fn startLoading(&self) { - msg_send![self, startLoading] - } - pub unsafe fn stopLoading(&self) { - msg_send![self, stopLoading] - } - pub unsafe fn propertyForKey_inRequest( - key: &NSString, - request: &NSURLRequest, - ) -> Option> { - msg_send_id![Self::class(), propertyForKey: key, inRequest: request] - } - pub unsafe fn setProperty_forKey_inRequest( - value: &Object, - key: &NSString, - request: &NSMutableURLRequest, - ) { - msg_send![ - Self::class(), - setProperty: value, - forKey: key, - inRequest: request - ] - } - pub unsafe fn removePropertyForKey_inRequest(key: &NSString, request: &NSMutableURLRequest) { - msg_send![Self::class(), removePropertyForKey: key, inRequest: request] - } - pub unsafe fn registerClass(protocolClass: &Class) -> bool { - msg_send![Self::class(), registerClass: protocolClass] - } - pub unsafe fn unregisterClass(protocolClass: &Class) { - msg_send![Self::class(), unregisterClass: protocolClass] - } -} -#[doc = "NSURLSessionTaskAdditions"] -impl NSURLProtocol { - pub unsafe fn canInitWithTask(task: &NSURLSessionTask) -> bool { - msg_send![Self::class(), canInitWithTask: task] - } - pub unsafe fn initWithTask_cachedResponse_client( - &self, - task: &NSURLSessionTask, - cachedResponse: Option<&NSCachedURLResponse>, - client: Option<&NSURLProtocolClient>, - ) -> Id { - msg_send_id![ - self, - initWithTask: task, - cachedResponse: cachedResponse, - client: client - ] - } - pub unsafe fn task(&self) -> Option> { - msg_send_id![self, task] +); +extern_methods!( + #[doc = "NSURLSessionTaskAdditions"] + unsafe impl NSURLProtocol { + pub unsafe fn canInitWithTask(task: &NSURLSessionTask) -> bool { + msg_send![Self::class(), canInitWithTask: task] + } + pub unsafe fn initWithTask_cachedResponse_client( + &self, + task: &NSURLSessionTask, + cachedResponse: Option<&NSCachedURLResponse>, + client: Option<&NSURLProtocolClient>, + ) -> Id { + msg_send_id![ + self, + initWithTask: task, + cachedResponse: cachedResponse, + client: client + ] + } + pub unsafe fn task(&self) -> Option> { + msg_send_id![self, task] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 4233d7720..1229f8a96 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLRequest; @@ -17,72 +17,74 @@ extern_class!( type Super = NSObject; } ); -impl NSURLRequest { - pub unsafe fn requestWithURL(URL: &NSURL) -> Id { - msg_send_id![Self::class(), requestWithURL: URL] +extern_methods!( + unsafe impl NSURLRequest { + pub unsafe fn requestWithURL(URL: &NSURL) -> Id { + msg_send_id![Self::class(), requestWithURL: URL] + } + pub unsafe fn supportsSecureCoding() -> bool { + msg_send![Self::class(), supportsSecureCoding] + } + pub unsafe fn requestWithURL_cachePolicy_timeoutInterval( + URL: &NSURL, + cachePolicy: NSURLRequestCachePolicy, + timeoutInterval: NSTimeInterval, + ) -> Id { + msg_send_id![ + Self::class(), + requestWithURL: URL, + cachePolicy: cachePolicy, + timeoutInterval: timeoutInterval + ] + } + pub unsafe fn initWithURL(&self, URL: &NSURL) -> Id { + msg_send_id![self, initWithURL: URL] + } + pub unsafe fn initWithURL_cachePolicy_timeoutInterval( + &self, + URL: &NSURL, + cachePolicy: NSURLRequestCachePolicy, + timeoutInterval: NSTimeInterval, + ) -> Id { + msg_send_id![ + self, + initWithURL: URL, + cachePolicy: cachePolicy, + timeoutInterval: timeoutInterval + ] + } + pub unsafe fn URL(&self) -> Option> { + msg_send_id![self, URL] + } + pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy { + msg_send![self, cachePolicy] + } + pub unsafe fn timeoutInterval(&self) -> NSTimeInterval { + msg_send![self, timeoutInterval] + } + pub unsafe fn mainDocumentURL(&self) -> Option> { + msg_send_id![self, mainDocumentURL] + } + pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { + msg_send![self, networkServiceType] + } + pub unsafe fn allowsCellularAccess(&self) -> bool { + msg_send![self, allowsCellularAccess] + } + pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { + msg_send![self, allowsExpensiveNetworkAccess] + } + pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { + msg_send![self, allowsConstrainedNetworkAccess] + } + pub unsafe fn assumesHTTP3Capable(&self) -> bool { + msg_send![self, assumesHTTP3Capable] + } + pub unsafe fn attribution(&self) -> NSURLRequestAttribution { + msg_send![self, attribution] + } } - pub unsafe fn supportsSecureCoding() -> bool { - msg_send![Self::class(), supportsSecureCoding] - } - pub unsafe fn requestWithURL_cachePolicy_timeoutInterval( - URL: &NSURL, - cachePolicy: NSURLRequestCachePolicy, - timeoutInterval: NSTimeInterval, - ) -> Id { - msg_send_id![ - Self::class(), - requestWithURL: URL, - cachePolicy: cachePolicy, - timeoutInterval: timeoutInterval - ] - } - pub unsafe fn initWithURL(&self, URL: &NSURL) -> Id { - msg_send_id![self, initWithURL: URL] - } - pub unsafe fn initWithURL_cachePolicy_timeoutInterval( - &self, - URL: &NSURL, - cachePolicy: NSURLRequestCachePolicy, - timeoutInterval: NSTimeInterval, - ) -> Id { - msg_send_id![ - self, - initWithURL: URL, - cachePolicy: cachePolicy, - timeoutInterval: timeoutInterval - ] - } - pub unsafe fn URL(&self) -> Option> { - msg_send_id![self, URL] - } - pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy { - msg_send![self, cachePolicy] - } - pub unsafe fn timeoutInterval(&self) -> NSTimeInterval { - msg_send![self, timeoutInterval] - } - pub unsafe fn mainDocumentURL(&self) -> Option> { - msg_send_id![self, mainDocumentURL] - } - pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { - msg_send![self, networkServiceType] - } - pub unsafe fn allowsCellularAccess(&self) -> bool { - msg_send![self, allowsCellularAccess] - } - pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { - msg_send![self, allowsExpensiveNetworkAccess] - } - pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { - msg_send![self, allowsConstrainedNetworkAccess] - } - pub unsafe fn assumesHTTP3Capable(&self) -> bool { - msg_send![self, assumesHTTP3Capable] - } - pub unsafe fn attribution(&self) -> NSURLRequestAttribution { - msg_send![self, attribution] - } -} +); extern_class!( #[derive(Debug)] pub struct NSMutableURLRequest; @@ -90,147 +92,166 @@ extern_class!( type Super = NSURLRequest; } ); -impl NSMutableURLRequest { - pub unsafe fn URL(&self) -> Option> { - msg_send_id![self, URL] - } - pub unsafe fn setURL(&self, URL: Option<&NSURL>) { - msg_send![self, setURL: URL] - } - pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy { - msg_send![self, cachePolicy] - } - pub unsafe fn setCachePolicy(&self, cachePolicy: NSURLRequestCachePolicy) { - msg_send![self, setCachePolicy: cachePolicy] - } - pub unsafe fn timeoutInterval(&self) -> NSTimeInterval { - msg_send![self, timeoutInterval] - } - pub unsafe fn setTimeoutInterval(&self, timeoutInterval: NSTimeInterval) { - msg_send![self, setTimeoutInterval: timeoutInterval] - } - pub unsafe fn mainDocumentURL(&self) -> Option> { - msg_send_id![self, mainDocumentURL] - } - pub unsafe fn setMainDocumentURL(&self, mainDocumentURL: Option<&NSURL>) { - msg_send![self, setMainDocumentURL: mainDocumentURL] - } - pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { - msg_send![self, networkServiceType] - } - pub unsafe fn setNetworkServiceType(&self, networkServiceType: NSURLRequestNetworkServiceType) { - msg_send![self, setNetworkServiceType: networkServiceType] - } - pub unsafe fn allowsCellularAccess(&self) -> bool { - msg_send![self, allowsCellularAccess] - } - pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool) { - msg_send![self, setAllowsCellularAccess: allowsCellularAccess] - } - pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { - msg_send![self, allowsExpensiveNetworkAccess] - } - pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool) { - msg_send![ - self, - setAllowsExpensiveNetworkAccess: allowsExpensiveNetworkAccess - ] +extern_methods!( + unsafe impl NSMutableURLRequest { + pub unsafe fn URL(&self) -> Option> { + msg_send_id![self, URL] + } + pub unsafe fn setURL(&self, URL: Option<&NSURL>) { + msg_send![self, setURL: URL] + } + pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy { + msg_send![self, cachePolicy] + } + pub unsafe fn setCachePolicy(&self, cachePolicy: NSURLRequestCachePolicy) { + msg_send![self, setCachePolicy: cachePolicy] + } + pub unsafe fn timeoutInterval(&self) -> NSTimeInterval { + msg_send![self, timeoutInterval] + } + pub unsafe fn setTimeoutInterval(&self, timeoutInterval: NSTimeInterval) { + msg_send![self, setTimeoutInterval: timeoutInterval] + } + pub unsafe fn mainDocumentURL(&self) -> Option> { + msg_send_id![self, mainDocumentURL] + } + pub unsafe fn setMainDocumentURL(&self, mainDocumentURL: Option<&NSURL>) { + msg_send![self, setMainDocumentURL: mainDocumentURL] + } + pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { + msg_send![self, networkServiceType] + } + pub unsafe fn setNetworkServiceType( + &self, + networkServiceType: NSURLRequestNetworkServiceType, + ) { + msg_send![self, setNetworkServiceType: networkServiceType] + } + pub unsafe fn allowsCellularAccess(&self) -> bool { + msg_send![self, allowsCellularAccess] + } + pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool) { + msg_send![self, setAllowsCellularAccess: allowsCellularAccess] + } + pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { + msg_send![self, allowsExpensiveNetworkAccess] + } + pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool) { + msg_send![ + self, + setAllowsExpensiveNetworkAccess: allowsExpensiveNetworkAccess + ] + } + pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { + msg_send![self, allowsConstrainedNetworkAccess] + } + pub unsafe fn setAllowsConstrainedNetworkAccess( + &self, + allowsConstrainedNetworkAccess: bool, + ) { + msg_send![ + self, + setAllowsConstrainedNetworkAccess: allowsConstrainedNetworkAccess + ] + } + pub unsafe fn assumesHTTP3Capable(&self) -> bool { + msg_send![self, assumesHTTP3Capable] + } + pub unsafe fn setAssumesHTTP3Capable(&self, assumesHTTP3Capable: bool) { + msg_send![self, setAssumesHTTP3Capable: assumesHTTP3Capable] + } + pub unsafe fn attribution(&self) -> NSURLRequestAttribution { + msg_send![self, attribution] + } + pub unsafe fn setAttribution(&self, attribution: NSURLRequestAttribution) { + msg_send![self, setAttribution: attribution] + } } - pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { - msg_send![self, allowsConstrainedNetworkAccess] - } - pub unsafe fn setAllowsConstrainedNetworkAccess(&self, allowsConstrainedNetworkAccess: bool) { - msg_send![ - self, - setAllowsConstrainedNetworkAccess: allowsConstrainedNetworkAccess - ] - } - pub unsafe fn assumesHTTP3Capable(&self) -> bool { - msg_send![self, assumesHTTP3Capable] - } - pub unsafe fn setAssumesHTTP3Capable(&self, assumesHTTP3Capable: bool) { - msg_send![self, setAssumesHTTP3Capable: assumesHTTP3Capable] - } - pub unsafe fn attribution(&self) -> NSURLRequestAttribution { - msg_send![self, attribution] - } - pub unsafe fn setAttribution(&self, attribution: NSURLRequestAttribution) { - msg_send![self, setAttribution: attribution] - } -} -#[doc = "NSHTTPURLRequest"] -impl NSURLRequest { - pub unsafe fn HTTPMethod(&self) -> Option> { - msg_send_id![self, HTTPMethod] - } - pub unsafe fn allHTTPHeaderFields( - &self, - ) -> Option, Shared>> { - msg_send_id![self, allHTTPHeaderFields] - } - pub unsafe fn valueForHTTPHeaderField(&self, field: &NSString) -> Option> { - msg_send_id![self, valueForHTTPHeaderField: field] - } - pub unsafe fn HTTPBody(&self) -> Option> { - msg_send_id![self, HTTPBody] - } - pub unsafe fn HTTPBodyStream(&self) -> Option> { - msg_send_id![self, HTTPBodyStream] - } - pub unsafe fn HTTPShouldHandleCookies(&self) -> bool { - msg_send![self, HTTPShouldHandleCookies] - } - pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { - msg_send![self, HTTPShouldUsePipelining] - } -} -#[doc = "NSMutableHTTPURLRequest"] -impl NSMutableURLRequest { - pub unsafe fn HTTPMethod(&self) -> Id { - msg_send_id![self, HTTPMethod] - } - pub unsafe fn setHTTPMethod(&self, HTTPMethod: &NSString) { - msg_send![self, setHTTPMethod: HTTPMethod] - } - pub unsafe fn allHTTPHeaderFields( - &self, - ) -> Option, Shared>> { - msg_send_id![self, allHTTPHeaderFields] - } - pub unsafe fn setAllHTTPHeaderFields( - &self, - allHTTPHeaderFields: Option<&NSDictionary>, - ) { - msg_send![self, setAllHTTPHeaderFields: allHTTPHeaderFields] - } - pub unsafe fn setValue_forHTTPHeaderField(&self, value: Option<&NSString>, field: &NSString) { - msg_send![self, setValue: value, forHTTPHeaderField: field] - } - pub unsafe fn addValue_forHTTPHeaderField(&self, value: &NSString, field: &NSString) { - msg_send![self, addValue: value, forHTTPHeaderField: field] - } - pub unsafe fn HTTPBody(&self) -> Option> { - msg_send_id![self, HTTPBody] - } - pub unsafe fn setHTTPBody(&self, HTTPBody: Option<&NSData>) { - msg_send![self, setHTTPBody: HTTPBody] - } - pub unsafe fn HTTPBodyStream(&self) -> Option> { - msg_send_id![self, HTTPBodyStream] - } - pub unsafe fn setHTTPBodyStream(&self, HTTPBodyStream: Option<&NSInputStream>) { - msg_send![self, setHTTPBodyStream: HTTPBodyStream] - } - pub unsafe fn HTTPShouldHandleCookies(&self) -> bool { - msg_send![self, HTTPShouldHandleCookies] - } - pub unsafe fn setHTTPShouldHandleCookies(&self, HTTPShouldHandleCookies: bool) { - msg_send![self, setHTTPShouldHandleCookies: HTTPShouldHandleCookies] - } - pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { - msg_send![self, HTTPShouldUsePipelining] +); +extern_methods!( + #[doc = "NSHTTPURLRequest"] + unsafe impl NSURLRequest { + pub unsafe fn HTTPMethod(&self) -> Option> { + msg_send_id![self, HTTPMethod] + } + pub unsafe fn allHTTPHeaderFields( + &self, + ) -> Option, Shared>> { + msg_send_id![self, allHTTPHeaderFields] + } + pub unsafe fn valueForHTTPHeaderField( + &self, + field: &NSString, + ) -> Option> { + msg_send_id![self, valueForHTTPHeaderField: field] + } + pub unsafe fn HTTPBody(&self) -> Option> { + msg_send_id![self, HTTPBody] + } + pub unsafe fn HTTPBodyStream(&self) -> Option> { + msg_send_id![self, HTTPBodyStream] + } + pub unsafe fn HTTPShouldHandleCookies(&self) -> bool { + msg_send![self, HTTPShouldHandleCookies] + } + pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { + msg_send![self, HTTPShouldUsePipelining] + } } - pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool) { - msg_send![self, setHTTPShouldUsePipelining: HTTPShouldUsePipelining] +); +extern_methods!( + #[doc = "NSMutableHTTPURLRequest"] + unsafe impl NSMutableURLRequest { + pub unsafe fn HTTPMethod(&self) -> Id { + msg_send_id![self, HTTPMethod] + } + pub unsafe fn setHTTPMethod(&self, HTTPMethod: &NSString) { + msg_send![self, setHTTPMethod: HTTPMethod] + } + pub unsafe fn allHTTPHeaderFields( + &self, + ) -> Option, Shared>> { + msg_send_id![self, allHTTPHeaderFields] + } + pub unsafe fn setAllHTTPHeaderFields( + &self, + allHTTPHeaderFields: Option<&NSDictionary>, + ) { + msg_send![self, setAllHTTPHeaderFields: allHTTPHeaderFields] + } + pub unsafe fn setValue_forHTTPHeaderField( + &self, + value: Option<&NSString>, + field: &NSString, + ) { + msg_send![self, setValue: value, forHTTPHeaderField: field] + } + pub unsafe fn addValue_forHTTPHeaderField(&self, value: &NSString, field: &NSString) { + msg_send![self, addValue: value, forHTTPHeaderField: field] + } + pub unsafe fn HTTPBody(&self) -> Option> { + msg_send_id![self, HTTPBody] + } + pub unsafe fn setHTTPBody(&self, HTTPBody: Option<&NSData>) { + msg_send![self, setHTTPBody: HTTPBody] + } + pub unsafe fn HTTPBodyStream(&self) -> Option> { + msg_send_id![self, HTTPBodyStream] + } + pub unsafe fn setHTTPBodyStream(&self, HTTPBodyStream: Option<&NSInputStream>) { + msg_send![self, setHTTPBodyStream: HTTPBodyStream] + } + pub unsafe fn HTTPShouldHandleCookies(&self) -> bool { + msg_send![self, HTTPShouldHandleCookies] + } + pub unsafe fn setHTTPShouldHandleCookies(&self, HTTPShouldHandleCookies: bool) { + msg_send![self, setHTTPShouldHandleCookies: HTTPShouldHandleCookies] + } + pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { + msg_send![self, HTTPShouldUsePipelining] + } + pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool) { + msg_send![self, setHTTPShouldUsePipelining: HTTPShouldUsePipelining] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index ace66b702..e6e2470a7 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLResponse; @@ -15,38 +15,40 @@ extern_class!( type Super = NSObject; } ); -impl NSURLResponse { - pub unsafe fn initWithURL_MIMEType_expectedContentLength_textEncodingName( - &self, - URL: &NSURL, - MIMEType: Option<&NSString>, - length: NSInteger, - name: Option<&NSString>, - ) -> Id { - msg_send_id![ - self, - initWithURL: URL, - MIMEType: MIMEType, - expectedContentLength: length, - textEncodingName: name - ] +extern_methods!( + unsafe impl NSURLResponse { + pub unsafe fn initWithURL_MIMEType_expectedContentLength_textEncodingName( + &self, + URL: &NSURL, + MIMEType: Option<&NSString>, + length: NSInteger, + name: Option<&NSString>, + ) -> Id { + msg_send_id![ + self, + initWithURL: URL, + MIMEType: MIMEType, + expectedContentLength: length, + textEncodingName: name + ] + } + pub unsafe fn URL(&self) -> Option> { + msg_send_id![self, URL] + } + pub unsafe fn MIMEType(&self) -> Option> { + msg_send_id![self, MIMEType] + } + pub unsafe fn expectedContentLength(&self) -> c_longlong { + msg_send![self, expectedContentLength] + } + pub unsafe fn textEncodingName(&self) -> Option> { + msg_send_id![self, textEncodingName] + } + pub unsafe fn suggestedFilename(&self) -> Option> { + msg_send_id![self, suggestedFilename] + } } - pub unsafe fn URL(&self) -> Option> { - msg_send_id![self, URL] - } - pub unsafe fn MIMEType(&self) -> Option> { - msg_send_id![self, MIMEType] - } - pub unsafe fn expectedContentLength(&self) -> c_longlong { - msg_send![self, expectedContentLength] - } - pub unsafe fn textEncodingName(&self) -> Option> { - msg_send_id![self, textEncodingName] - } - pub unsafe fn suggestedFilename(&self) -> Option> { - msg_send_id![self, suggestedFilename] - } -} +); use super::__exported::NSHTTPURLResponseInternal; extern_class!( #[derive(Debug)] @@ -55,32 +57,37 @@ extern_class!( type Super = NSURLResponse; } ); -impl NSHTTPURLResponse { - pub unsafe fn initWithURL_statusCode_HTTPVersion_headerFields( - &self, - url: &NSURL, - statusCode: NSInteger, - HTTPVersion: Option<&NSString>, - headerFields: Option<&NSDictionary>, - ) -> Option> { - msg_send_id![ - self, - initWithURL: url, - statusCode: statusCode, - HTTPVersion: HTTPVersion, - headerFields: headerFields - ] +extern_methods!( + unsafe impl NSHTTPURLResponse { + pub unsafe fn initWithURL_statusCode_HTTPVersion_headerFields( + &self, + url: &NSURL, + statusCode: NSInteger, + HTTPVersion: Option<&NSString>, + headerFields: Option<&NSDictionary>, + ) -> Option> { + msg_send_id![ + self, + initWithURL: url, + statusCode: statusCode, + HTTPVersion: HTTPVersion, + headerFields: headerFields + ] + } + pub unsafe fn statusCode(&self) -> NSInteger { + msg_send![self, statusCode] + } + pub unsafe fn allHeaderFields(&self) -> Id { + msg_send_id![self, allHeaderFields] + } + pub unsafe fn valueForHTTPHeaderField( + &self, + field: &NSString, + ) -> Option> { + msg_send_id![self, valueForHTTPHeaderField: field] + } + pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id { + msg_send_id![Self::class(), localizedStringForStatusCode: statusCode] + } } - pub unsafe fn statusCode(&self) -> NSInteger { - msg_send![self, statusCode] - } - pub unsafe fn allHeaderFields(&self) -> Id { - msg_send_id![self, allHeaderFields] - } - pub unsafe fn valueForHTTPHeaderField(&self, field: &NSString) -> Option> { - msg_send_id![self, valueForHTTPHeaderField: field] - } - pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id { - msg_send_id![Self::class(), localizedStringForStatusCode: statusCode] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 88171492d..51bc87802 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -26,7 +26,7 @@ use crate::Security::generated::SecureTransport::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLSession; @@ -34,227 +34,234 @@ extern_class!( type Super = NSObject; } ); -impl NSURLSession { - pub unsafe fn sharedSession() -> Id { - msg_send_id![Self::class(), sharedSession] +extern_methods!( + unsafe impl NSURLSession { + pub unsafe fn sharedSession() -> Id { + msg_send_id![Self::class(), sharedSession] + } + pub unsafe fn sessionWithConfiguration( + configuration: &NSURLSessionConfiguration, + ) -> Id { + msg_send_id![Self::class(), sessionWithConfiguration: configuration] + } + pub unsafe fn sessionWithConfiguration_delegate_delegateQueue( + configuration: &NSURLSessionConfiguration, + delegate: Option<&NSURLSessionDelegate>, + queue: Option<&NSOperationQueue>, + ) -> Id { + msg_send_id![ + Self::class(), + sessionWithConfiguration: configuration, + delegate: delegate, + delegateQueue: queue + ] + } + pub unsafe fn delegateQueue(&self) -> Id { + msg_send_id![self, delegateQueue] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn configuration(&self) -> Id { + msg_send_id![self, configuration] + } + pub unsafe fn sessionDescription(&self) -> Option> { + msg_send_id![self, sessionDescription] + } + pub unsafe fn setSessionDescription(&self, sessionDescription: Option<&NSString>) { + msg_send![self, setSessionDescription: sessionDescription] + } + pub unsafe fn finishTasksAndInvalidate(&self) { + msg_send![self, finishTasksAndInvalidate] + } + pub unsafe fn invalidateAndCancel(&self) { + msg_send![self, invalidateAndCancel] + } + pub unsafe fn resetWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![self, resetWithCompletionHandler: completionHandler] + } + pub unsafe fn flushWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![self, flushWithCompletionHandler: completionHandler] + } + pub unsafe fn getTasksWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![self, getTasksWithCompletionHandler: completionHandler] + } + pub unsafe fn getAllTasksWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![self, getAllTasksWithCompletionHandler: completionHandler] + } + pub unsafe fn dataTaskWithRequest( + &self, + request: &NSURLRequest, + ) -> Id { + msg_send_id![self, dataTaskWithRequest: request] + } + pub unsafe fn dataTaskWithURL(&self, url: &NSURL) -> Id { + msg_send_id![self, dataTaskWithURL: url] + } + pub unsafe fn uploadTaskWithRequest_fromFile( + &self, + request: &NSURLRequest, + fileURL: &NSURL, + ) -> Id { + msg_send_id![self, uploadTaskWithRequest: request, fromFile: fileURL] + } + pub unsafe fn uploadTaskWithRequest_fromData( + &self, + request: &NSURLRequest, + bodyData: &NSData, + ) -> Id { + msg_send_id![self, uploadTaskWithRequest: request, fromData: bodyData] + } + pub unsafe fn uploadTaskWithStreamedRequest( + &self, + request: &NSURLRequest, + ) -> Id { + msg_send_id![self, uploadTaskWithStreamedRequest: request] + } + pub unsafe fn downloadTaskWithRequest( + &self, + request: &NSURLRequest, + ) -> Id { + msg_send_id![self, downloadTaskWithRequest: request] + } + pub unsafe fn downloadTaskWithURL( + &self, + url: &NSURL, + ) -> Id { + msg_send_id![self, downloadTaskWithURL: url] + } + pub unsafe fn downloadTaskWithResumeData( + &self, + resumeData: &NSData, + ) -> Id { + msg_send_id![self, downloadTaskWithResumeData: resumeData] + } + pub unsafe fn streamTaskWithHostName_port( + &self, + hostname: &NSString, + port: NSInteger, + ) -> Id { + msg_send_id![self, streamTaskWithHostName: hostname, port: port] + } + pub unsafe fn streamTaskWithNetService( + &self, + service: &NSNetService, + ) -> Id { + msg_send_id![self, streamTaskWithNetService: service] + } + pub unsafe fn webSocketTaskWithURL( + &self, + url: &NSURL, + ) -> Id { + msg_send_id![self, webSocketTaskWithURL: url] + } + pub unsafe fn webSocketTaskWithURL_protocols( + &self, + url: &NSURL, + protocols: &NSArray, + ) -> Id { + msg_send_id![self, webSocketTaskWithURL: url, protocols: protocols] + } + pub unsafe fn webSocketTaskWithRequest( + &self, + request: &NSURLRequest, + ) -> Id { + msg_send_id![self, webSocketTaskWithRequest: request] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } - pub unsafe fn sessionWithConfiguration( - configuration: &NSURLSessionConfiguration, - ) -> Id { - msg_send_id![Self::class(), sessionWithConfiguration: configuration] - } - pub unsafe fn sessionWithConfiguration_delegate_delegateQueue( - configuration: &NSURLSessionConfiguration, - delegate: Option<&NSURLSessionDelegate>, - queue: Option<&NSOperationQueue>, - ) -> Id { - msg_send_id![ - Self::class(), - sessionWithConfiguration: configuration, - delegate: delegate, - delegateQueue: queue - ] - } - pub unsafe fn delegateQueue(&self) -> Id { - msg_send_id![self, delegateQueue] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn configuration(&self) -> Id { - msg_send_id![self, configuration] - } - pub unsafe fn sessionDescription(&self) -> Option> { - msg_send_id![self, sessionDescription] - } - pub unsafe fn setSessionDescription(&self, sessionDescription: Option<&NSString>) { - msg_send![self, setSessionDescription: sessionDescription] - } - pub unsafe fn finishTasksAndInvalidate(&self) { - msg_send![self, finishTasksAndInvalidate] - } - pub unsafe fn invalidateAndCancel(&self) { - msg_send![self, invalidateAndCancel] - } - pub unsafe fn resetWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![self, resetWithCompletionHandler: completionHandler] - } - pub unsafe fn flushWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![self, flushWithCompletionHandler: completionHandler] - } - pub unsafe fn getTasksWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![self, getTasksWithCompletionHandler: completionHandler] - } - pub unsafe fn getAllTasksWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![self, getAllTasksWithCompletionHandler: completionHandler] - } - pub unsafe fn dataTaskWithRequest( - &self, - request: &NSURLRequest, - ) -> Id { - msg_send_id![self, dataTaskWithRequest: request] - } - pub unsafe fn dataTaskWithURL(&self, url: &NSURL) -> Id { - msg_send_id![self, dataTaskWithURL: url] - } - pub unsafe fn uploadTaskWithRequest_fromFile( - &self, - request: &NSURLRequest, - fileURL: &NSURL, - ) -> Id { - msg_send_id![self, uploadTaskWithRequest: request, fromFile: fileURL] - } - pub unsafe fn uploadTaskWithRequest_fromData( - &self, - request: &NSURLRequest, - bodyData: &NSData, - ) -> Id { - msg_send_id![self, uploadTaskWithRequest: request, fromData: bodyData] - } - pub unsafe fn uploadTaskWithStreamedRequest( - &self, - request: &NSURLRequest, - ) -> Id { - msg_send_id![self, uploadTaskWithStreamedRequest: request] - } - pub unsafe fn downloadTaskWithRequest( - &self, - request: &NSURLRequest, - ) -> Id { - msg_send_id![self, downloadTaskWithRequest: request] - } - pub unsafe fn downloadTaskWithURL(&self, url: &NSURL) -> Id { - msg_send_id![self, downloadTaskWithURL: url] - } - pub unsafe fn downloadTaskWithResumeData( - &self, - resumeData: &NSData, - ) -> Id { - msg_send_id![self, downloadTaskWithResumeData: resumeData] - } - pub unsafe fn streamTaskWithHostName_port( - &self, - hostname: &NSString, - port: NSInteger, - ) -> Id { - msg_send_id![self, streamTaskWithHostName: hostname, port: port] - } - pub unsafe fn streamTaskWithNetService( - &self, - service: &NSNetService, - ) -> Id { - msg_send_id![self, streamTaskWithNetService: service] - } - pub unsafe fn webSocketTaskWithURL( - &self, - url: &NSURL, - ) -> Id { - msg_send_id![self, webSocketTaskWithURL: url] - } - pub unsafe fn webSocketTaskWithURL_protocols( - &self, - url: &NSURL, - protocols: &NSArray, - ) -> Id { - msg_send_id![self, webSocketTaskWithURL: url, protocols: protocols] - } - pub unsafe fn webSocketTaskWithRequest( - &self, - request: &NSURLRequest, - ) -> Id { - msg_send_id![self, webSocketTaskWithRequest: request] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } -} -#[doc = "NSURLSessionAsynchronousConvenience"] -impl NSURLSession { - pub unsafe fn dataTaskWithRequest_completionHandler( - &self, - request: &NSURLRequest, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - dataTaskWithRequest: request, - completionHandler: completionHandler - ] - } - pub unsafe fn dataTaskWithURL_completionHandler( - &self, - url: &NSURL, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - dataTaskWithURL: url, - completionHandler: completionHandler - ] - } - pub unsafe fn uploadTaskWithRequest_fromFile_completionHandler( - &self, - request: &NSURLRequest, - fileURL: &NSURL, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - uploadTaskWithRequest: request, - fromFile: fileURL, - completionHandler: completionHandler - ] - } - pub unsafe fn uploadTaskWithRequest_fromData_completionHandler( - &self, - request: &NSURLRequest, - bodyData: Option<&NSData>, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - uploadTaskWithRequest: request, - fromData: bodyData, - completionHandler: completionHandler - ] - } - pub unsafe fn downloadTaskWithRequest_completionHandler( - &self, - request: &NSURLRequest, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - downloadTaskWithRequest: request, - completionHandler: completionHandler - ] - } - pub unsafe fn downloadTaskWithURL_completionHandler( - &self, - url: &NSURL, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - downloadTaskWithURL: url, - completionHandler: completionHandler - ] - } - pub unsafe fn downloadTaskWithResumeData_completionHandler( - &self, - resumeData: &NSData, - completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - downloadTaskWithResumeData: resumeData, - completionHandler: completionHandler - ] +); +extern_methods!( + #[doc = "NSURLSessionAsynchronousConvenience"] + unsafe impl NSURLSession { + pub unsafe fn dataTaskWithRequest_completionHandler( + &self, + request: &NSURLRequest, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + dataTaskWithRequest: request, + completionHandler: completionHandler + ] + } + pub unsafe fn dataTaskWithURL_completionHandler( + &self, + url: &NSURL, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + dataTaskWithURL: url, + completionHandler: completionHandler + ] + } + pub unsafe fn uploadTaskWithRequest_fromFile_completionHandler( + &self, + request: &NSURLRequest, + fileURL: &NSURL, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + uploadTaskWithRequest: request, + fromFile: fileURL, + completionHandler: completionHandler + ] + } + pub unsafe fn uploadTaskWithRequest_fromData_completionHandler( + &self, + request: &NSURLRequest, + bodyData: Option<&NSData>, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + uploadTaskWithRequest: request, + fromData: bodyData, + completionHandler: completionHandler + ] + } + pub unsafe fn downloadTaskWithRequest_completionHandler( + &self, + request: &NSURLRequest, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + downloadTaskWithRequest: request, + completionHandler: completionHandler + ] + } + pub unsafe fn downloadTaskWithURL_completionHandler( + &self, + url: &NSURL, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + downloadTaskWithURL: url, + completionHandler: completionHandler + ] + } + pub unsafe fn downloadTaskWithResumeData_completionHandler( + &self, + resumeData: &NSData, + completionHandler: TodoBlock, + ) -> Id { + msg_send_id![ + self, + downloadTaskWithResumeData: resumeData, + completionHandler: completionHandler + ] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSURLSessionTask; @@ -262,113 +269,115 @@ extern_class!( type Super = NSObject; } ); -impl NSURLSessionTask { - pub unsafe fn taskIdentifier(&self) -> NSUInteger { - msg_send![self, taskIdentifier] - } - pub unsafe fn originalRequest(&self) -> Option> { - msg_send_id![self, originalRequest] - } - pub unsafe fn currentRequest(&self) -> Option> { - msg_send_id![self, currentRequest] - } - pub unsafe fn response(&self) -> Option> { - msg_send_id![self, response] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSURLSessionTaskDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn progress(&self) -> Id { - msg_send_id![self, progress] - } - pub unsafe fn earliestBeginDate(&self) -> Option> { - msg_send_id![self, earliestBeginDate] - } - pub unsafe fn setEarliestBeginDate(&self, earliestBeginDate: Option<&NSDate>) { - msg_send![self, setEarliestBeginDate: earliestBeginDate] - } - pub unsafe fn countOfBytesClientExpectsToSend(&self) -> int64_t { - msg_send![self, countOfBytesClientExpectsToSend] - } - pub unsafe fn setCountOfBytesClientExpectsToSend( - &self, - countOfBytesClientExpectsToSend: int64_t, - ) { - msg_send![ - self, - setCountOfBytesClientExpectsToSend: countOfBytesClientExpectsToSend - ] - } - pub unsafe fn countOfBytesClientExpectsToReceive(&self) -> int64_t { - msg_send![self, countOfBytesClientExpectsToReceive] - } - pub unsafe fn setCountOfBytesClientExpectsToReceive( - &self, - countOfBytesClientExpectsToReceive: int64_t, - ) { - msg_send![ - self, - setCountOfBytesClientExpectsToReceive: countOfBytesClientExpectsToReceive - ] - } - pub unsafe fn countOfBytesSent(&self) -> int64_t { - msg_send![self, countOfBytesSent] - } - pub unsafe fn countOfBytesReceived(&self) -> int64_t { - msg_send![self, countOfBytesReceived] - } - pub unsafe fn countOfBytesExpectedToSend(&self) -> int64_t { - msg_send![self, countOfBytesExpectedToSend] +extern_methods!( + unsafe impl NSURLSessionTask { + pub unsafe fn taskIdentifier(&self) -> NSUInteger { + msg_send![self, taskIdentifier] + } + pub unsafe fn originalRequest(&self) -> Option> { + msg_send_id![self, originalRequest] + } + pub unsafe fn currentRequest(&self) -> Option> { + msg_send_id![self, currentRequest] + } + pub unsafe fn response(&self) -> Option> { + msg_send_id![self, response] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSURLSessionTaskDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn progress(&self) -> Id { + msg_send_id![self, progress] + } + pub unsafe fn earliestBeginDate(&self) -> Option> { + msg_send_id![self, earliestBeginDate] + } + pub unsafe fn setEarliestBeginDate(&self, earliestBeginDate: Option<&NSDate>) { + msg_send![self, setEarliestBeginDate: earliestBeginDate] + } + pub unsafe fn countOfBytesClientExpectsToSend(&self) -> int64_t { + msg_send![self, countOfBytesClientExpectsToSend] + } + pub unsafe fn setCountOfBytesClientExpectsToSend( + &self, + countOfBytesClientExpectsToSend: int64_t, + ) { + msg_send![ + self, + setCountOfBytesClientExpectsToSend: countOfBytesClientExpectsToSend + ] + } + pub unsafe fn countOfBytesClientExpectsToReceive(&self) -> int64_t { + msg_send![self, countOfBytesClientExpectsToReceive] + } + pub unsafe fn setCountOfBytesClientExpectsToReceive( + &self, + countOfBytesClientExpectsToReceive: int64_t, + ) { + msg_send![ + self, + setCountOfBytesClientExpectsToReceive: countOfBytesClientExpectsToReceive + ] + } + pub unsafe fn countOfBytesSent(&self) -> int64_t { + msg_send![self, countOfBytesSent] + } + pub unsafe fn countOfBytesReceived(&self) -> int64_t { + msg_send![self, countOfBytesReceived] + } + pub unsafe fn countOfBytesExpectedToSend(&self) -> int64_t { + msg_send![self, countOfBytesExpectedToSend] + } + pub unsafe fn countOfBytesExpectedToReceive(&self) -> int64_t { + msg_send![self, countOfBytesExpectedToReceive] + } + pub unsafe fn taskDescription(&self) -> Option> { + msg_send_id![self, taskDescription] + } + pub unsafe fn setTaskDescription(&self, taskDescription: Option<&NSString>) { + msg_send![self, setTaskDescription: taskDescription] + } + pub unsafe fn cancel(&self) { + msg_send![self, cancel] + } + pub unsafe fn state(&self) -> NSURLSessionTaskState { + msg_send![self, state] + } + pub unsafe fn error(&self) -> Option> { + msg_send_id![self, error] + } + pub unsafe fn suspend(&self) { + msg_send![self, suspend] + } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } + pub unsafe fn priority(&self) -> c_float { + msg_send![self, priority] + } + pub unsafe fn setPriority(&self, priority: c_float) { + msg_send![self, setPriority: priority] + } + pub unsafe fn prefersIncrementalDelivery(&self) -> bool { + msg_send![self, prefersIncrementalDelivery] + } + pub unsafe fn setPrefersIncrementalDelivery(&self, prefersIncrementalDelivery: bool) { + msg_send![ + self, + setPrefersIncrementalDelivery: prefersIncrementalDelivery + ] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } - pub unsafe fn countOfBytesExpectedToReceive(&self) -> int64_t { - msg_send![self, countOfBytesExpectedToReceive] - } - pub unsafe fn taskDescription(&self) -> Option> { - msg_send_id![self, taskDescription] - } - pub unsafe fn setTaskDescription(&self, taskDescription: Option<&NSString>) { - msg_send![self, setTaskDescription: taskDescription] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn state(&self) -> NSURLSessionTaskState { - msg_send![self, state] - } - pub unsafe fn error(&self) -> Option> { - msg_send_id![self, error] - } - pub unsafe fn suspend(&self) { - msg_send![self, suspend] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn priority(&self) -> c_float { - msg_send![self, priority] - } - pub unsafe fn setPriority(&self, priority: c_float) { - msg_send![self, setPriority: priority] - } - pub unsafe fn prefersIncrementalDelivery(&self) -> bool { - msg_send![self, prefersIncrementalDelivery] - } - pub unsafe fn setPrefersIncrementalDelivery(&self, prefersIncrementalDelivery: bool) { - msg_send![ - self, - setPrefersIncrementalDelivery: prefersIncrementalDelivery - ] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } -} +); extern_class!( #[derive(Debug)] pub struct NSURLSessionDataTask; @@ -376,14 +385,16 @@ extern_class!( type Super = NSURLSessionTask; } ); -impl NSURLSessionDataTask { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] +extern_methods!( + unsafe impl NSURLSessionDataTask { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSURLSessionUploadTask; @@ -391,14 +402,16 @@ extern_class!( type Super = NSURLSessionDataTask; } ); -impl NSURLSessionUploadTask { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] +extern_methods!( + unsafe impl NSURLSessionUploadTask { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSURLSessionDownloadTask; @@ -406,17 +419,19 @@ extern_class!( type Super = NSURLSessionTask; } ); -impl NSURLSessionDownloadTask { - pub unsafe fn cancelByProducingResumeData(&self, completionHandler: TodoBlock) { - msg_send![self, cancelByProducingResumeData: completionHandler] +extern_methods!( + unsafe impl NSURLSessionDownloadTask { + pub unsafe fn cancelByProducingResumeData(&self, completionHandler: TodoBlock) { + msg_send![self, cancelByProducingResumeData: completionHandler] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } -} +); extern_class!( #[derive(Debug)] pub struct NSURLSessionStreamTask; @@ -424,57 +439,59 @@ extern_class!( type Super = NSURLSessionTask; } ); -impl NSURLSessionStreamTask { - pub unsafe fn readDataOfMinLength_maxLength_timeout_completionHandler( - &self, - minBytes: NSUInteger, - maxBytes: NSUInteger, - timeout: NSTimeInterval, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - readDataOfMinLength: minBytes, - maxLength: maxBytes, - timeout: timeout, - completionHandler: completionHandler - ] - } - pub unsafe fn writeData_timeout_completionHandler( - &self, - data: &NSData, - timeout: NSTimeInterval, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - writeData: data, - timeout: timeout, - completionHandler: completionHandler - ] - } - pub unsafe fn captureStreams(&self) { - msg_send![self, captureStreams] - } - pub unsafe fn closeWrite(&self) { - msg_send![self, closeWrite] +extern_methods!( + unsafe impl NSURLSessionStreamTask { + pub unsafe fn readDataOfMinLength_maxLength_timeout_completionHandler( + &self, + minBytes: NSUInteger, + maxBytes: NSUInteger, + timeout: NSTimeInterval, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + readDataOfMinLength: minBytes, + maxLength: maxBytes, + timeout: timeout, + completionHandler: completionHandler + ] + } + pub unsafe fn writeData_timeout_completionHandler( + &self, + data: &NSData, + timeout: NSTimeInterval, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + writeData: data, + timeout: timeout, + completionHandler: completionHandler + ] + } + pub unsafe fn captureStreams(&self) { + msg_send![self, captureStreams] + } + pub unsafe fn closeWrite(&self) { + msg_send![self, closeWrite] + } + pub unsafe fn closeRead(&self) { + msg_send![self, closeRead] + } + pub unsafe fn startSecureConnection(&self) { + msg_send![self, startSecureConnection] + } + pub unsafe fn stopSecureConnection(&self) { + msg_send![self, stopSecureConnection] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } - pub unsafe fn closeRead(&self) { - msg_send![self, closeRead] - } - pub unsafe fn startSecureConnection(&self) { - msg_send![self, startSecureConnection] - } - pub unsafe fn stopSecureConnection(&self) { - msg_send![self, stopSecureConnection] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } -} +); extern_class!( #[derive(Debug)] pub struct NSURLSessionWebSocketMessage; @@ -482,29 +499,31 @@ extern_class!( type Super = NSObject; } ); -impl NSURLSessionWebSocketMessage { - pub unsafe fn initWithData(&self, data: &NSData) -> Id { - msg_send_id![self, initWithData: data] - } - pub unsafe fn initWithString(&self, string: &NSString) -> Id { - msg_send_id![self, initWithString: string] +extern_methods!( + unsafe impl NSURLSessionWebSocketMessage { + pub unsafe fn initWithData(&self, data: &NSData) -> Id { + msg_send_id![self, initWithData: data] + } + pub unsafe fn initWithString(&self, string: &NSString) -> Id { + msg_send_id![self, initWithString: string] + } + pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType { + msg_send![self, type] + } + pub unsafe fn data(&self) -> Option> { + msg_send_id![self, data] + } + pub unsafe fn string(&self) -> Option> { + msg_send_id![self, string] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } - pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType { - msg_send![self, type] - } - pub unsafe fn data(&self) -> Option> { - msg_send_id![self, data] - } - pub unsafe fn string(&self) -> Option> { - msg_send_id![self, string] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } -} +); extern_class!( #[derive(Debug)] pub struct NSURLSessionWebSocketTask; @@ -512,50 +531,52 @@ extern_class!( type Super = NSURLSessionTask; } ); -impl NSURLSessionWebSocketTask { - pub unsafe fn sendMessage_completionHandler( - &self, - message: &NSURLSessionWebSocketMessage, - completionHandler: TodoBlock, - ) { - msg_send![ - self, - sendMessage: message, - completionHandler: completionHandler - ] +extern_methods!( + unsafe impl NSURLSessionWebSocketTask { + pub unsafe fn sendMessage_completionHandler( + &self, + message: &NSURLSessionWebSocketMessage, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + sendMessage: message, + completionHandler: completionHandler + ] + } + pub unsafe fn receiveMessageWithCompletionHandler(&self, completionHandler: TodoBlock) { + msg_send![self, receiveMessageWithCompletionHandler: completionHandler] + } + pub unsafe fn sendPingWithPongReceiveHandler(&self, pongReceiveHandler: TodoBlock) { + msg_send![self, sendPingWithPongReceiveHandler: pongReceiveHandler] + } + pub unsafe fn cancelWithCloseCode_reason( + &self, + closeCode: NSURLSessionWebSocketCloseCode, + reason: Option<&NSData>, + ) { + msg_send![self, cancelWithCloseCode: closeCode, reason: reason] + } + pub unsafe fn maximumMessageSize(&self) -> NSInteger { + msg_send![self, maximumMessageSize] + } + pub unsafe fn setMaximumMessageSize(&self, maximumMessageSize: NSInteger) { + msg_send![self, setMaximumMessageSize: maximumMessageSize] + } + pub unsafe fn closeCode(&self) -> NSURLSessionWebSocketCloseCode { + msg_send![self, closeCode] + } + pub unsafe fn closeReason(&self) -> Option> { + msg_send_id![self, closeReason] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } - pub unsafe fn receiveMessageWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![self, receiveMessageWithCompletionHandler: completionHandler] - } - pub unsafe fn sendPingWithPongReceiveHandler(&self, pongReceiveHandler: TodoBlock) { - msg_send![self, sendPingWithPongReceiveHandler: pongReceiveHandler] - } - pub unsafe fn cancelWithCloseCode_reason( - &self, - closeCode: NSURLSessionWebSocketCloseCode, - reason: Option<&NSData>, - ) { - msg_send![self, cancelWithCloseCode: closeCode, reason: reason] - } - pub unsafe fn maximumMessageSize(&self) -> NSInteger { - msg_send![self, maximumMessageSize] - } - pub unsafe fn setMaximumMessageSize(&self, maximumMessageSize: NSInteger) { - msg_send![self, setMaximumMessageSize: maximumMessageSize] - } - pub unsafe fn closeCode(&self) -> NSURLSessionWebSocketCloseCode { - msg_send![self, closeCode] - } - pub unsafe fn closeReason(&self) -> Option> { - msg_send_id![self, closeReason] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } -} +); extern_class!( #[derive(Debug)] pub struct NSURLSessionConfiguration; @@ -563,270 +584,295 @@ extern_class!( type Super = NSObject; } ); -impl NSURLSessionConfiguration { - pub unsafe fn defaultSessionConfiguration() -> Id { - msg_send_id![Self::class(), defaultSessionConfiguration] - } - pub unsafe fn ephemeralSessionConfiguration() -> Id { - msg_send_id![Self::class(), ephemeralSessionConfiguration] - } - pub unsafe fn backgroundSessionConfigurationWithIdentifier( - identifier: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - backgroundSessionConfigurationWithIdentifier: identifier - ] +extern_methods!( + unsafe impl NSURLSessionConfiguration { + pub unsafe fn defaultSessionConfiguration() -> Id { + msg_send_id![Self::class(), defaultSessionConfiguration] + } + pub unsafe fn ephemeralSessionConfiguration() -> Id { + msg_send_id![Self::class(), ephemeralSessionConfiguration] + } + pub unsafe fn backgroundSessionConfigurationWithIdentifier( + identifier: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + backgroundSessionConfigurationWithIdentifier: identifier + ] + } + pub unsafe fn identifier(&self) -> Option> { + msg_send_id![self, identifier] + } + pub unsafe fn requestCachePolicy(&self) -> NSURLRequestCachePolicy { + msg_send![self, requestCachePolicy] + } + pub unsafe fn setRequestCachePolicy(&self, requestCachePolicy: NSURLRequestCachePolicy) { + msg_send![self, setRequestCachePolicy: requestCachePolicy] + } + pub unsafe fn timeoutIntervalForRequest(&self) -> NSTimeInterval { + msg_send![self, timeoutIntervalForRequest] + } + pub unsafe fn setTimeoutIntervalForRequest( + &self, + timeoutIntervalForRequest: NSTimeInterval, + ) { + msg_send![ + self, + setTimeoutIntervalForRequest: timeoutIntervalForRequest + ] + } + pub unsafe fn timeoutIntervalForResource(&self) -> NSTimeInterval { + msg_send![self, timeoutIntervalForResource] + } + pub unsafe fn setTimeoutIntervalForResource( + &self, + timeoutIntervalForResource: NSTimeInterval, + ) { + msg_send![ + self, + setTimeoutIntervalForResource: timeoutIntervalForResource + ] + } + pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { + msg_send![self, networkServiceType] + } + pub unsafe fn setNetworkServiceType( + &self, + networkServiceType: NSURLRequestNetworkServiceType, + ) { + msg_send![self, setNetworkServiceType: networkServiceType] + } + pub unsafe fn allowsCellularAccess(&self) -> bool { + msg_send![self, allowsCellularAccess] + } + pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool) { + msg_send![self, setAllowsCellularAccess: allowsCellularAccess] + } + pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { + msg_send![self, allowsExpensiveNetworkAccess] + } + pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool) { + msg_send![ + self, + setAllowsExpensiveNetworkAccess: allowsExpensiveNetworkAccess + ] + } + pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { + msg_send![self, allowsConstrainedNetworkAccess] + } + pub unsafe fn setAllowsConstrainedNetworkAccess( + &self, + allowsConstrainedNetworkAccess: bool, + ) { + msg_send![ + self, + setAllowsConstrainedNetworkAccess: allowsConstrainedNetworkAccess + ] + } + pub unsafe fn waitsForConnectivity(&self) -> bool { + msg_send![self, waitsForConnectivity] + } + pub unsafe fn setWaitsForConnectivity(&self, waitsForConnectivity: bool) { + msg_send![self, setWaitsForConnectivity: waitsForConnectivity] + } + pub unsafe fn isDiscretionary(&self) -> bool { + msg_send![self, isDiscretionary] + } + pub unsafe fn setDiscretionary(&self, discretionary: bool) { + msg_send![self, setDiscretionary: discretionary] + } + pub unsafe fn sharedContainerIdentifier(&self) -> Option> { + msg_send_id![self, sharedContainerIdentifier] + } + pub unsafe fn setSharedContainerIdentifier( + &self, + sharedContainerIdentifier: Option<&NSString>, + ) { + msg_send![ + self, + setSharedContainerIdentifier: sharedContainerIdentifier + ] + } + pub unsafe fn sessionSendsLaunchEvents(&self) -> bool { + msg_send![self, sessionSendsLaunchEvents] + } + pub unsafe fn setSessionSendsLaunchEvents(&self, sessionSendsLaunchEvents: bool) { + msg_send![self, setSessionSendsLaunchEvents: sessionSendsLaunchEvents] + } + pub unsafe fn connectionProxyDictionary(&self) -> Option> { + msg_send_id![self, connectionProxyDictionary] + } + pub unsafe fn setConnectionProxyDictionary( + &self, + connectionProxyDictionary: Option<&NSDictionary>, + ) { + msg_send![ + self, + setConnectionProxyDictionary: connectionProxyDictionary + ] + } + pub unsafe fn TLSMinimumSupportedProtocol(&self) -> SSLProtocol { + msg_send![self, TLSMinimumSupportedProtocol] + } + pub unsafe fn setTLSMinimumSupportedProtocol( + &self, + TLSMinimumSupportedProtocol: SSLProtocol, + ) { + msg_send![ + self, + setTLSMinimumSupportedProtocol: TLSMinimumSupportedProtocol + ] + } + pub unsafe fn TLSMaximumSupportedProtocol(&self) -> SSLProtocol { + msg_send![self, TLSMaximumSupportedProtocol] + } + pub unsafe fn setTLSMaximumSupportedProtocol( + &self, + TLSMaximumSupportedProtocol: SSLProtocol, + ) { + msg_send![ + self, + setTLSMaximumSupportedProtocol: TLSMaximumSupportedProtocol + ] + } + pub unsafe fn TLSMinimumSupportedProtocolVersion(&self) -> tls_protocol_version_t { + msg_send![self, TLSMinimumSupportedProtocolVersion] + } + pub unsafe fn setTLSMinimumSupportedProtocolVersion( + &self, + TLSMinimumSupportedProtocolVersion: tls_protocol_version_t, + ) { + msg_send![ + self, + setTLSMinimumSupportedProtocolVersion: TLSMinimumSupportedProtocolVersion + ] + } + pub unsafe fn TLSMaximumSupportedProtocolVersion(&self) -> tls_protocol_version_t { + msg_send![self, TLSMaximumSupportedProtocolVersion] + } + pub unsafe fn setTLSMaximumSupportedProtocolVersion( + &self, + TLSMaximumSupportedProtocolVersion: tls_protocol_version_t, + ) { + msg_send![ + self, + setTLSMaximumSupportedProtocolVersion: TLSMaximumSupportedProtocolVersion + ] + } + pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { + msg_send![self, HTTPShouldUsePipelining] + } + pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool) { + msg_send![self, setHTTPShouldUsePipelining: HTTPShouldUsePipelining] + } + pub unsafe fn HTTPShouldSetCookies(&self) -> bool { + msg_send![self, HTTPShouldSetCookies] + } + pub unsafe fn setHTTPShouldSetCookies(&self, HTTPShouldSetCookies: bool) { + msg_send![self, setHTTPShouldSetCookies: HTTPShouldSetCookies] + } + pub unsafe fn HTTPCookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy { + msg_send![self, HTTPCookieAcceptPolicy] + } + pub unsafe fn setHTTPCookieAcceptPolicy( + &self, + HTTPCookieAcceptPolicy: NSHTTPCookieAcceptPolicy, + ) { + msg_send![self, setHTTPCookieAcceptPolicy: HTTPCookieAcceptPolicy] + } + pub unsafe fn HTTPAdditionalHeaders(&self) -> Option> { + msg_send_id![self, HTTPAdditionalHeaders] + } + pub unsafe fn setHTTPAdditionalHeaders( + &self, + HTTPAdditionalHeaders: Option<&NSDictionary>, + ) { + msg_send![self, setHTTPAdditionalHeaders: HTTPAdditionalHeaders] + } + pub unsafe fn HTTPMaximumConnectionsPerHost(&self) -> NSInteger { + msg_send![self, HTTPMaximumConnectionsPerHost] + } + pub unsafe fn setHTTPMaximumConnectionsPerHost( + &self, + HTTPMaximumConnectionsPerHost: NSInteger, + ) { + msg_send![ + self, + setHTTPMaximumConnectionsPerHost: HTTPMaximumConnectionsPerHost + ] + } + pub unsafe fn HTTPCookieStorage(&self) -> Option> { + msg_send_id![self, HTTPCookieStorage] + } + pub unsafe fn setHTTPCookieStorage(&self, HTTPCookieStorage: Option<&NSHTTPCookieStorage>) { + msg_send![self, setHTTPCookieStorage: HTTPCookieStorage] + } + pub unsafe fn URLCredentialStorage(&self) -> Option> { + msg_send_id![self, URLCredentialStorage] + } + pub unsafe fn setURLCredentialStorage( + &self, + URLCredentialStorage: Option<&NSURLCredentialStorage>, + ) { + msg_send![self, setURLCredentialStorage: URLCredentialStorage] + } + pub unsafe fn URLCache(&self) -> Option> { + msg_send_id![self, URLCache] + } + pub unsafe fn setURLCache(&self, URLCache: Option<&NSURLCache>) { + msg_send![self, setURLCache: URLCache] + } + pub unsafe fn shouldUseExtendedBackgroundIdleMode(&self) -> bool { + msg_send![self, shouldUseExtendedBackgroundIdleMode] + } + pub unsafe fn setShouldUseExtendedBackgroundIdleMode( + &self, + shouldUseExtendedBackgroundIdleMode: bool, + ) { + msg_send![ + self, + setShouldUseExtendedBackgroundIdleMode: shouldUseExtendedBackgroundIdleMode + ] + } + pub unsafe fn protocolClasses(&self) -> Option, Shared>> { + msg_send_id![self, protocolClasses] + } + pub unsafe fn setProtocolClasses(&self, protocolClasses: Option<&NSArray>) { + msg_send![self, setProtocolClasses: protocolClasses] + } + pub unsafe fn multipathServiceType(&self) -> NSURLSessionMultipathServiceType { + msg_send![self, multipathServiceType] + } + pub unsafe fn setMultipathServiceType( + &self, + multipathServiceType: NSURLSessionMultipathServiceType, + ) { + msg_send![self, setMultipathServiceType: multipathServiceType] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } - pub unsafe fn identifier(&self) -> Option> { - msg_send_id![self, identifier] - } - pub unsafe fn requestCachePolicy(&self) -> NSURLRequestCachePolicy { - msg_send![self, requestCachePolicy] - } - pub unsafe fn setRequestCachePolicy(&self, requestCachePolicy: NSURLRequestCachePolicy) { - msg_send![self, setRequestCachePolicy: requestCachePolicy] - } - pub unsafe fn timeoutIntervalForRequest(&self) -> NSTimeInterval { - msg_send![self, timeoutIntervalForRequest] - } - pub unsafe fn setTimeoutIntervalForRequest(&self, timeoutIntervalForRequest: NSTimeInterval) { - msg_send![ - self, - setTimeoutIntervalForRequest: timeoutIntervalForRequest - ] - } - pub unsafe fn timeoutIntervalForResource(&self) -> NSTimeInterval { - msg_send![self, timeoutIntervalForResource] - } - pub unsafe fn setTimeoutIntervalForResource(&self, timeoutIntervalForResource: NSTimeInterval) { - msg_send![ - self, - setTimeoutIntervalForResource: timeoutIntervalForResource - ] - } - pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { - msg_send![self, networkServiceType] - } - pub unsafe fn setNetworkServiceType(&self, networkServiceType: NSURLRequestNetworkServiceType) { - msg_send![self, setNetworkServiceType: networkServiceType] - } - pub unsafe fn allowsCellularAccess(&self) -> bool { - msg_send![self, allowsCellularAccess] - } - pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool) { - msg_send![self, setAllowsCellularAccess: allowsCellularAccess] - } - pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { - msg_send![self, allowsExpensiveNetworkAccess] - } - pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool) { - msg_send![ - self, - setAllowsExpensiveNetworkAccess: allowsExpensiveNetworkAccess - ] - } - pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { - msg_send![self, allowsConstrainedNetworkAccess] - } - pub unsafe fn setAllowsConstrainedNetworkAccess(&self, allowsConstrainedNetworkAccess: bool) { - msg_send![ - self, - setAllowsConstrainedNetworkAccess: allowsConstrainedNetworkAccess - ] - } - pub unsafe fn waitsForConnectivity(&self) -> bool { - msg_send![self, waitsForConnectivity] - } - pub unsafe fn setWaitsForConnectivity(&self, waitsForConnectivity: bool) { - msg_send![self, setWaitsForConnectivity: waitsForConnectivity] - } - pub unsafe fn isDiscretionary(&self) -> bool { - msg_send![self, isDiscretionary] - } - pub unsafe fn setDiscretionary(&self, discretionary: bool) { - msg_send![self, setDiscretionary: discretionary] - } - pub unsafe fn sharedContainerIdentifier(&self) -> Option> { - msg_send_id![self, sharedContainerIdentifier] - } - pub unsafe fn setSharedContainerIdentifier( - &self, - sharedContainerIdentifier: Option<&NSString>, - ) { - msg_send![ - self, - setSharedContainerIdentifier: sharedContainerIdentifier - ] - } - pub unsafe fn sessionSendsLaunchEvents(&self) -> bool { - msg_send![self, sessionSendsLaunchEvents] - } - pub unsafe fn setSessionSendsLaunchEvents(&self, sessionSendsLaunchEvents: bool) { - msg_send![self, setSessionSendsLaunchEvents: sessionSendsLaunchEvents] - } - pub unsafe fn connectionProxyDictionary(&self) -> Option> { - msg_send_id![self, connectionProxyDictionary] - } - pub unsafe fn setConnectionProxyDictionary( - &self, - connectionProxyDictionary: Option<&NSDictionary>, - ) { - msg_send![ - self, - setConnectionProxyDictionary: connectionProxyDictionary - ] - } - pub unsafe fn TLSMinimumSupportedProtocol(&self) -> SSLProtocol { - msg_send![self, TLSMinimumSupportedProtocol] - } - pub unsafe fn setTLSMinimumSupportedProtocol(&self, TLSMinimumSupportedProtocol: SSLProtocol) { - msg_send![ - self, - setTLSMinimumSupportedProtocol: TLSMinimumSupportedProtocol - ] - } - pub unsafe fn TLSMaximumSupportedProtocol(&self) -> SSLProtocol { - msg_send![self, TLSMaximumSupportedProtocol] - } - pub unsafe fn setTLSMaximumSupportedProtocol(&self, TLSMaximumSupportedProtocol: SSLProtocol) { - msg_send![ - self, - setTLSMaximumSupportedProtocol: TLSMaximumSupportedProtocol - ] - } - pub unsafe fn TLSMinimumSupportedProtocolVersion(&self) -> tls_protocol_version_t { - msg_send![self, TLSMinimumSupportedProtocolVersion] - } - pub unsafe fn setTLSMinimumSupportedProtocolVersion( - &self, - TLSMinimumSupportedProtocolVersion: tls_protocol_version_t, - ) { - msg_send![ - self, - setTLSMinimumSupportedProtocolVersion: TLSMinimumSupportedProtocolVersion - ] - } - pub unsafe fn TLSMaximumSupportedProtocolVersion(&self) -> tls_protocol_version_t { - msg_send![self, TLSMaximumSupportedProtocolVersion] - } - pub unsafe fn setTLSMaximumSupportedProtocolVersion( - &self, - TLSMaximumSupportedProtocolVersion: tls_protocol_version_t, - ) { - msg_send![ - self, - setTLSMaximumSupportedProtocolVersion: TLSMaximumSupportedProtocolVersion - ] - } - pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { - msg_send![self, HTTPShouldUsePipelining] - } - pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool) { - msg_send![self, setHTTPShouldUsePipelining: HTTPShouldUsePipelining] - } - pub unsafe fn HTTPShouldSetCookies(&self) -> bool { - msg_send![self, HTTPShouldSetCookies] - } - pub unsafe fn setHTTPShouldSetCookies(&self, HTTPShouldSetCookies: bool) { - msg_send![self, setHTTPShouldSetCookies: HTTPShouldSetCookies] - } - pub unsafe fn HTTPCookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy { - msg_send![self, HTTPCookieAcceptPolicy] - } - pub unsafe fn setHTTPCookieAcceptPolicy( - &self, - HTTPCookieAcceptPolicy: NSHTTPCookieAcceptPolicy, - ) { - msg_send![self, setHTTPCookieAcceptPolicy: HTTPCookieAcceptPolicy] - } - pub unsafe fn HTTPAdditionalHeaders(&self) -> Option> { - msg_send_id![self, HTTPAdditionalHeaders] - } - pub unsafe fn setHTTPAdditionalHeaders(&self, HTTPAdditionalHeaders: Option<&NSDictionary>) { - msg_send![self, setHTTPAdditionalHeaders: HTTPAdditionalHeaders] - } - pub unsafe fn HTTPMaximumConnectionsPerHost(&self) -> NSInteger { - msg_send![self, HTTPMaximumConnectionsPerHost] - } - pub unsafe fn setHTTPMaximumConnectionsPerHost( - &self, - HTTPMaximumConnectionsPerHost: NSInteger, - ) { - msg_send![ - self, - setHTTPMaximumConnectionsPerHost: HTTPMaximumConnectionsPerHost - ] - } - pub unsafe fn HTTPCookieStorage(&self) -> Option> { - msg_send_id![self, HTTPCookieStorage] - } - pub unsafe fn setHTTPCookieStorage(&self, HTTPCookieStorage: Option<&NSHTTPCookieStorage>) { - msg_send![self, setHTTPCookieStorage: HTTPCookieStorage] - } - pub unsafe fn URLCredentialStorage(&self) -> Option> { - msg_send_id![self, URLCredentialStorage] - } - pub unsafe fn setURLCredentialStorage( - &self, - URLCredentialStorage: Option<&NSURLCredentialStorage>, - ) { - msg_send![self, setURLCredentialStorage: URLCredentialStorage] - } - pub unsafe fn URLCache(&self) -> Option> { - msg_send_id![self, URLCache] - } - pub unsafe fn setURLCache(&self, URLCache: Option<&NSURLCache>) { - msg_send![self, setURLCache: URLCache] - } - pub unsafe fn shouldUseExtendedBackgroundIdleMode(&self) -> bool { - msg_send![self, shouldUseExtendedBackgroundIdleMode] - } - pub unsafe fn setShouldUseExtendedBackgroundIdleMode( - &self, - shouldUseExtendedBackgroundIdleMode: bool, - ) { - msg_send![ - self, - setShouldUseExtendedBackgroundIdleMode: shouldUseExtendedBackgroundIdleMode - ] - } - pub unsafe fn protocolClasses(&self) -> Option, Shared>> { - msg_send_id![self, protocolClasses] - } - pub unsafe fn setProtocolClasses(&self, protocolClasses: Option<&NSArray>) { - msg_send![self, setProtocolClasses: protocolClasses] - } - pub unsafe fn multipathServiceType(&self) -> NSURLSessionMultipathServiceType { - msg_send![self, multipathServiceType] - } - pub unsafe fn setMultipathServiceType( - &self, - multipathServiceType: NSURLSessionMultipathServiceType, - ) { - msg_send![self, setMultipathServiceType: multipathServiceType] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } -} +); pub type NSURLSessionDelegate = NSObject; pub type NSURLSessionTaskDelegate = NSObject; pub type NSURLSessionDataDelegate = NSObject; pub type NSURLSessionDownloadDelegate = NSObject; pub type NSURLSessionStreamDelegate = NSObject; pub type NSURLSessionWebSocketDelegate = NSObject; -#[doc = "NSURLSessionDeprecated"] -impl NSURLSessionConfiguration { - pub unsafe fn backgroundSessionConfiguration( - identifier: &NSString, - ) -> Id { - msg_send_id![Self::class(), backgroundSessionConfiguration: identifier] +extern_methods!( + #[doc = "NSURLSessionDeprecated"] + unsafe impl NSURLSessionConfiguration { + pub unsafe fn backgroundSessionConfiguration( + identifier: &NSString, + ) -> Id { + msg_send_id![Self::class(), backgroundSessionConfiguration: identifier] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSURLSessionTaskTransactionMetrics; @@ -834,118 +880,120 @@ extern_class!( type Super = NSObject; } ); -impl NSURLSessionTaskTransactionMetrics { - pub unsafe fn request(&self) -> Id { - msg_send_id![self, request] - } - pub unsafe fn response(&self) -> Option> { - msg_send_id![self, response] - } - pub unsafe fn fetchStartDate(&self) -> Option> { - msg_send_id![self, fetchStartDate] - } - pub unsafe fn domainLookupStartDate(&self) -> Option> { - msg_send_id![self, domainLookupStartDate] - } - pub unsafe fn domainLookupEndDate(&self) -> Option> { - msg_send_id![self, domainLookupEndDate] - } - pub unsafe fn connectStartDate(&self) -> Option> { - msg_send_id![self, connectStartDate] - } - pub unsafe fn secureConnectionStartDate(&self) -> Option> { - msg_send_id![self, secureConnectionStartDate] - } - pub unsafe fn secureConnectionEndDate(&self) -> Option> { - msg_send_id![self, secureConnectionEndDate] - } - pub unsafe fn connectEndDate(&self) -> Option> { - msg_send_id![self, connectEndDate] - } - pub unsafe fn requestStartDate(&self) -> Option> { - msg_send_id![self, requestStartDate] - } - pub unsafe fn requestEndDate(&self) -> Option> { - msg_send_id![self, requestEndDate] - } - pub unsafe fn responseStartDate(&self) -> Option> { - msg_send_id![self, responseStartDate] - } - pub unsafe fn responseEndDate(&self) -> Option> { - msg_send_id![self, responseEndDate] - } - pub unsafe fn networkProtocolName(&self) -> Option> { - msg_send_id![self, networkProtocolName] - } - pub unsafe fn isProxyConnection(&self) -> bool { - msg_send![self, isProxyConnection] - } - pub unsafe fn isReusedConnection(&self) -> bool { - msg_send![self, isReusedConnection] - } - pub unsafe fn resourceFetchType(&self) -> NSURLSessionTaskMetricsResourceFetchType { - msg_send![self, resourceFetchType] +extern_methods!( + unsafe impl NSURLSessionTaskTransactionMetrics { + pub unsafe fn request(&self) -> Id { + msg_send_id![self, request] + } + pub unsafe fn response(&self) -> Option> { + msg_send_id![self, response] + } + pub unsafe fn fetchStartDate(&self) -> Option> { + msg_send_id![self, fetchStartDate] + } + pub unsafe fn domainLookupStartDate(&self) -> Option> { + msg_send_id![self, domainLookupStartDate] + } + pub unsafe fn domainLookupEndDate(&self) -> Option> { + msg_send_id![self, domainLookupEndDate] + } + pub unsafe fn connectStartDate(&self) -> Option> { + msg_send_id![self, connectStartDate] + } + pub unsafe fn secureConnectionStartDate(&self) -> Option> { + msg_send_id![self, secureConnectionStartDate] + } + pub unsafe fn secureConnectionEndDate(&self) -> Option> { + msg_send_id![self, secureConnectionEndDate] + } + pub unsafe fn connectEndDate(&self) -> Option> { + msg_send_id![self, connectEndDate] + } + pub unsafe fn requestStartDate(&self) -> Option> { + msg_send_id![self, requestStartDate] + } + pub unsafe fn requestEndDate(&self) -> Option> { + msg_send_id![self, requestEndDate] + } + pub unsafe fn responseStartDate(&self) -> Option> { + msg_send_id![self, responseStartDate] + } + pub unsafe fn responseEndDate(&self) -> Option> { + msg_send_id![self, responseEndDate] + } + pub unsafe fn networkProtocolName(&self) -> Option> { + msg_send_id![self, networkProtocolName] + } + pub unsafe fn isProxyConnection(&self) -> bool { + msg_send![self, isProxyConnection] + } + pub unsafe fn isReusedConnection(&self) -> bool { + msg_send![self, isReusedConnection] + } + pub unsafe fn resourceFetchType(&self) -> NSURLSessionTaskMetricsResourceFetchType { + msg_send![self, resourceFetchType] + } + pub unsafe fn countOfRequestHeaderBytesSent(&self) -> int64_t { + msg_send![self, countOfRequestHeaderBytesSent] + } + pub unsafe fn countOfRequestBodyBytesSent(&self) -> int64_t { + msg_send![self, countOfRequestBodyBytesSent] + } + pub unsafe fn countOfRequestBodyBytesBeforeEncoding(&self) -> int64_t { + msg_send![self, countOfRequestBodyBytesBeforeEncoding] + } + pub unsafe fn countOfResponseHeaderBytesReceived(&self) -> int64_t { + msg_send![self, countOfResponseHeaderBytesReceived] + } + pub unsafe fn countOfResponseBodyBytesReceived(&self) -> int64_t { + msg_send![self, countOfResponseBodyBytesReceived] + } + pub unsafe fn countOfResponseBodyBytesAfterDecoding(&self) -> int64_t { + msg_send![self, countOfResponseBodyBytesAfterDecoding] + } + pub unsafe fn localAddress(&self) -> Option> { + msg_send_id![self, localAddress] + } + pub unsafe fn localPort(&self) -> Option> { + msg_send_id![self, localPort] + } + pub unsafe fn remoteAddress(&self) -> Option> { + msg_send_id![self, remoteAddress] + } + pub unsafe fn remotePort(&self) -> Option> { + msg_send_id![self, remotePort] + } + pub unsafe fn negotiatedTLSProtocolVersion(&self) -> Option> { + msg_send_id![self, negotiatedTLSProtocolVersion] + } + pub unsafe fn negotiatedTLSCipherSuite(&self) -> Option> { + msg_send_id![self, negotiatedTLSCipherSuite] + } + pub unsafe fn isCellular(&self) -> bool { + msg_send![self, isCellular] + } + pub unsafe fn isExpensive(&self) -> bool { + msg_send![self, isExpensive] + } + pub unsafe fn isConstrained(&self) -> bool { + msg_send![self, isConstrained] + } + pub unsafe fn isMultipath(&self) -> bool { + msg_send![self, isMultipath] + } + pub unsafe fn domainResolutionProtocol( + &self, + ) -> NSURLSessionTaskMetricsDomainResolutionProtocol { + msg_send![self, domainResolutionProtocol] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } - pub unsafe fn countOfRequestHeaderBytesSent(&self) -> int64_t { - msg_send![self, countOfRequestHeaderBytesSent] - } - pub unsafe fn countOfRequestBodyBytesSent(&self) -> int64_t { - msg_send![self, countOfRequestBodyBytesSent] - } - pub unsafe fn countOfRequestBodyBytesBeforeEncoding(&self) -> int64_t { - msg_send![self, countOfRequestBodyBytesBeforeEncoding] - } - pub unsafe fn countOfResponseHeaderBytesReceived(&self) -> int64_t { - msg_send![self, countOfResponseHeaderBytesReceived] - } - pub unsafe fn countOfResponseBodyBytesReceived(&self) -> int64_t { - msg_send![self, countOfResponseBodyBytesReceived] - } - pub unsafe fn countOfResponseBodyBytesAfterDecoding(&self) -> int64_t { - msg_send![self, countOfResponseBodyBytesAfterDecoding] - } - pub unsafe fn localAddress(&self) -> Option> { - msg_send_id![self, localAddress] - } - pub unsafe fn localPort(&self) -> Option> { - msg_send_id![self, localPort] - } - pub unsafe fn remoteAddress(&self) -> Option> { - msg_send_id![self, remoteAddress] - } - pub unsafe fn remotePort(&self) -> Option> { - msg_send_id![self, remotePort] - } - pub unsafe fn negotiatedTLSProtocolVersion(&self) -> Option> { - msg_send_id![self, negotiatedTLSProtocolVersion] - } - pub unsafe fn negotiatedTLSCipherSuite(&self) -> Option> { - msg_send_id![self, negotiatedTLSCipherSuite] - } - pub unsafe fn isCellular(&self) -> bool { - msg_send![self, isCellular] - } - pub unsafe fn isExpensive(&self) -> bool { - msg_send![self, isExpensive] - } - pub unsafe fn isConstrained(&self) -> bool { - msg_send![self, isConstrained] - } - pub unsafe fn isMultipath(&self) -> bool { - msg_send![self, isMultipath] - } - pub unsafe fn domainResolutionProtocol( - &self, - ) -> NSURLSessionTaskMetricsDomainResolutionProtocol { - msg_send![self, domainResolutionProtocol] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } -} +); extern_class!( #[derive(Debug)] pub struct NSURLSessionTaskMetrics; @@ -953,22 +1001,24 @@ extern_class!( type Super = NSObject; } ); -impl NSURLSessionTaskMetrics { - pub unsafe fn transactionMetrics( - &self, - ) -> Id, Shared> { - msg_send_id![self, transactionMetrics] - } - pub unsafe fn taskInterval(&self) -> Id { - msg_send_id![self, taskInterval] - } - pub unsafe fn redirectCount(&self) -> NSUInteger { - msg_send![self, redirectCount] +extern_methods!( + unsafe impl NSURLSessionTaskMetrics { + pub unsafe fn transactionMetrics( + &self, + ) -> Id, Shared> { + msg_send_id![self, transactionMetrics] + } + pub unsafe fn taskInterval(&self) -> Id { + msg_send_id![self, taskInterval] + } + pub unsafe fn redirectCount(&self) -> NSUInteger { + msg_send![self, redirectCount] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index 93ed9764c..1100ec073 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUUID; @@ -12,26 +12,28 @@ extern_class!( type Super = NSObject; } ); -impl NSUUID { - pub unsafe fn UUID() -> Id { - msg_send_id![Self::class(), UUID] +extern_methods!( + unsafe impl NSUUID { + pub unsafe fn UUID() -> Id { + msg_send_id![Self::class(), UUID] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithUUIDString(&self, string: &NSString) -> Option> { + msg_send_id![self, initWithUUIDString: string] + } + pub unsafe fn initWithUUIDBytes(&self, bytes: uuid_t) -> Id { + msg_send_id![self, initWithUUIDBytes: bytes] + } + pub unsafe fn getUUIDBytes(&self, uuid: uuid_t) { + msg_send![self, getUUIDBytes: uuid] + } + pub unsafe fn compare(&self, otherUUID: &NSUUID) -> NSComparisonResult { + msg_send![self, compare: otherUUID] + } + pub unsafe fn UUIDString(&self) -> Id { + msg_send_id![self, UUIDString] + } } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithUUIDString(&self, string: &NSString) -> Option> { - msg_send_id![self, initWithUUIDString: string] - } - pub unsafe fn initWithUUIDBytes(&self, bytes: uuid_t) -> Id { - msg_send_id![self, initWithUUIDBytes: bytes] - } - pub unsafe fn getUUIDBytes(&self, uuid: uuid_t) { - msg_send![self, getUUIDBytes: uuid] - } - pub unsafe fn compare(&self, otherUUID: &NSUUID) -> NSComparisonResult { - msg_send![self, compare: otherUUID] - } - pub unsafe fn UUIDString(&self) -> Id { - msg_send_id![self, UUIDString] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 691919b85..035e1e37e 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUbiquitousKeyValueStore; @@ -15,72 +15,76 @@ extern_class!( type Super = NSObject; } ); -impl NSUbiquitousKeyValueStore { - pub unsafe fn defaultStore() -> Id { - msg_send_id![Self::class(), defaultStore] +extern_methods!( + unsafe impl NSUbiquitousKeyValueStore { + pub unsafe fn defaultStore() -> Id { + msg_send_id![Self::class(), defaultStore] + } + pub unsafe fn objectForKey(&self, aKey: &NSString) -> Option> { + msg_send_id![self, objectForKey: aKey] + } + pub unsafe fn setObject_forKey(&self, anObject: Option<&Object>, aKey: &NSString) { + msg_send![self, setObject: anObject, forKey: aKey] + } + pub unsafe fn removeObjectForKey(&self, aKey: &NSString) { + msg_send![self, removeObjectForKey: aKey] + } + pub unsafe fn stringForKey(&self, aKey: &NSString) -> Option> { + msg_send_id![self, stringForKey: aKey] + } + pub unsafe fn arrayForKey(&self, aKey: &NSString) -> Option> { + msg_send_id![self, arrayForKey: aKey] + } + pub unsafe fn dictionaryForKey( + &self, + aKey: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, dictionaryForKey: aKey] + } + pub unsafe fn dataForKey(&self, aKey: &NSString) -> Option> { + msg_send_id![self, dataForKey: aKey] + } + pub unsafe fn longLongForKey(&self, aKey: &NSString) -> c_longlong { + msg_send![self, longLongForKey: aKey] + } + pub unsafe fn doubleForKey(&self, aKey: &NSString) -> c_double { + msg_send![self, doubleForKey: aKey] + } + pub unsafe fn boolForKey(&self, aKey: &NSString) -> bool { + msg_send![self, boolForKey: aKey] + } + pub unsafe fn setString_forKey(&self, aString: Option<&NSString>, aKey: &NSString) { + msg_send![self, setString: aString, forKey: aKey] + } + pub unsafe fn setData_forKey(&self, aData: Option<&NSData>, aKey: &NSString) { + msg_send![self, setData: aData, forKey: aKey] + } + pub unsafe fn setArray_forKey(&self, anArray: Option<&NSArray>, aKey: &NSString) { + msg_send![self, setArray: anArray, forKey: aKey] + } + pub unsafe fn setDictionary_forKey( + &self, + aDictionary: Option<&NSDictionary>, + aKey: &NSString, + ) { + msg_send![self, setDictionary: aDictionary, forKey: aKey] + } + pub unsafe fn setLongLong_forKey(&self, value: c_longlong, aKey: &NSString) { + msg_send![self, setLongLong: value, forKey: aKey] + } + pub unsafe fn setDouble_forKey(&self, value: c_double, aKey: &NSString) { + msg_send![self, setDouble: value, forKey: aKey] + } + pub unsafe fn setBool_forKey(&self, value: bool, aKey: &NSString) { + msg_send![self, setBool: value, forKey: aKey] + } + pub unsafe fn dictionaryRepresentation( + &self, + ) -> Id, Shared> { + msg_send_id![self, dictionaryRepresentation] + } + pub unsafe fn synchronize(&self) -> bool { + msg_send![self, synchronize] + } } - pub unsafe fn objectForKey(&self, aKey: &NSString) -> Option> { - msg_send_id![self, objectForKey: aKey] - } - pub unsafe fn setObject_forKey(&self, anObject: Option<&Object>, aKey: &NSString) { - msg_send![self, setObject: anObject, forKey: aKey] - } - pub unsafe fn removeObjectForKey(&self, aKey: &NSString) { - msg_send![self, removeObjectForKey: aKey] - } - pub unsafe fn stringForKey(&self, aKey: &NSString) -> Option> { - msg_send_id![self, stringForKey: aKey] - } - pub unsafe fn arrayForKey(&self, aKey: &NSString) -> Option> { - msg_send_id![self, arrayForKey: aKey] - } - pub unsafe fn dictionaryForKey( - &self, - aKey: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, dictionaryForKey: aKey] - } - pub unsafe fn dataForKey(&self, aKey: &NSString) -> Option> { - msg_send_id![self, dataForKey: aKey] - } - pub unsafe fn longLongForKey(&self, aKey: &NSString) -> c_longlong { - msg_send![self, longLongForKey: aKey] - } - pub unsafe fn doubleForKey(&self, aKey: &NSString) -> c_double { - msg_send![self, doubleForKey: aKey] - } - pub unsafe fn boolForKey(&self, aKey: &NSString) -> bool { - msg_send![self, boolForKey: aKey] - } - pub unsafe fn setString_forKey(&self, aString: Option<&NSString>, aKey: &NSString) { - msg_send![self, setString: aString, forKey: aKey] - } - pub unsafe fn setData_forKey(&self, aData: Option<&NSData>, aKey: &NSString) { - msg_send![self, setData: aData, forKey: aKey] - } - pub unsafe fn setArray_forKey(&self, anArray: Option<&NSArray>, aKey: &NSString) { - msg_send![self, setArray: anArray, forKey: aKey] - } - pub unsafe fn setDictionary_forKey( - &self, - aDictionary: Option<&NSDictionary>, - aKey: &NSString, - ) { - msg_send![self, setDictionary: aDictionary, forKey: aKey] - } - pub unsafe fn setLongLong_forKey(&self, value: c_longlong, aKey: &NSString) { - msg_send![self, setLongLong: value, forKey: aKey] - } - pub unsafe fn setDouble_forKey(&self, value: c_double, aKey: &NSString) { - msg_send![self, setDouble: value, forKey: aKey] - } - pub unsafe fn setBool_forKey(&self, value: bool, aKey: &NSString) { - msg_send![self, setBool: value, forKey: aKey] - } - pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared> { - msg_send_id![self, dictionaryRepresentation] - } - pub unsafe fn synchronize(&self) -> bool { - msg_send![self, synchronize] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index b1d33dcbf..a13a26b59 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUndoManager; @@ -14,123 +14,129 @@ extern_class!( type Super = NSObject; } ); -impl NSUndoManager { - pub unsafe fn beginUndoGrouping(&self) { - msg_send![self, beginUndoGrouping] +extern_methods!( + unsafe impl NSUndoManager { + pub unsafe fn beginUndoGrouping(&self) { + msg_send![self, beginUndoGrouping] + } + pub unsafe fn endUndoGrouping(&self) { + msg_send![self, endUndoGrouping] + } + pub unsafe fn groupingLevel(&self) -> NSInteger { + msg_send![self, groupingLevel] + } + pub unsafe fn disableUndoRegistration(&self) { + msg_send![self, disableUndoRegistration] + } + pub unsafe fn enableUndoRegistration(&self) { + msg_send![self, enableUndoRegistration] + } + pub unsafe fn isUndoRegistrationEnabled(&self) -> bool { + msg_send![self, isUndoRegistrationEnabled] + } + pub unsafe fn groupsByEvent(&self) -> bool { + msg_send![self, groupsByEvent] + } + pub unsafe fn setGroupsByEvent(&self, groupsByEvent: bool) { + msg_send![self, setGroupsByEvent: groupsByEvent] + } + pub unsafe fn levelsOfUndo(&self) -> NSUInteger { + msg_send![self, levelsOfUndo] + } + pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger) { + msg_send![self, setLevelsOfUndo: levelsOfUndo] + } + pub unsafe fn runLoopModes(&self) -> Id, Shared> { + msg_send_id![self, runLoopModes] + } + pub unsafe fn setRunLoopModes(&self, runLoopModes: &NSArray) { + msg_send![self, setRunLoopModes: runLoopModes] + } + pub unsafe fn undo(&self) { + msg_send![self, undo] + } + pub unsafe fn redo(&self) { + msg_send![self, redo] + } + pub unsafe fn undoNestedGroup(&self) { + msg_send![self, undoNestedGroup] + } + pub unsafe fn canUndo(&self) -> bool { + msg_send![self, canUndo] + } + pub unsafe fn canRedo(&self) -> bool { + msg_send![self, canRedo] + } + pub unsafe fn isUndoing(&self) -> bool { + msg_send![self, isUndoing] + } + pub unsafe fn isRedoing(&self) -> bool { + msg_send![self, isRedoing] + } + pub unsafe fn removeAllActions(&self) { + msg_send![self, removeAllActions] + } + pub unsafe fn removeAllActionsWithTarget(&self, target: &Object) { + msg_send![self, removeAllActionsWithTarget: target] + } + pub unsafe fn registerUndoWithTarget_selector_object( + &self, + target: &Object, + selector: Sel, + anObject: Option<&Object>, + ) { + msg_send![ + self, + registerUndoWithTarget: target, + selector: selector, + object: anObject + ] + } + pub unsafe fn prepareWithInvocationTarget(&self, target: &Object) -> Id { + msg_send_id![self, prepareWithInvocationTarget: target] + } + pub unsafe fn registerUndoWithTarget_handler( + &self, + target: &Object, + undoHandler: TodoBlock, + ) { + msg_send![self, registerUndoWithTarget: target, handler: undoHandler] + } + pub unsafe fn setActionIsDiscardable(&self, discardable: bool) { + msg_send![self, setActionIsDiscardable: discardable] + } + pub unsafe fn undoActionIsDiscardable(&self) -> bool { + msg_send![self, undoActionIsDiscardable] + } + pub unsafe fn redoActionIsDiscardable(&self) -> bool { + msg_send![self, redoActionIsDiscardable] + } + pub unsafe fn undoActionName(&self) -> Id { + msg_send_id![self, undoActionName] + } + pub unsafe fn redoActionName(&self) -> Id { + msg_send_id![self, redoActionName] + } + pub unsafe fn setActionName(&self, actionName: &NSString) { + msg_send![self, setActionName: actionName] + } + pub unsafe fn undoMenuItemTitle(&self) -> Id { + msg_send_id![self, undoMenuItemTitle] + } + pub unsafe fn redoMenuItemTitle(&self) -> Id { + msg_send_id![self, redoMenuItemTitle] + } + pub unsafe fn undoMenuTitleForUndoActionName( + &self, + actionName: &NSString, + ) -> Id { + msg_send_id![self, undoMenuTitleForUndoActionName: actionName] + } + pub unsafe fn redoMenuTitleForUndoActionName( + &self, + actionName: &NSString, + ) -> Id { + msg_send_id![self, redoMenuTitleForUndoActionName: actionName] + } } - pub unsafe fn endUndoGrouping(&self) { - msg_send![self, endUndoGrouping] - } - pub unsafe fn groupingLevel(&self) -> NSInteger { - msg_send![self, groupingLevel] - } - pub unsafe fn disableUndoRegistration(&self) { - msg_send![self, disableUndoRegistration] - } - pub unsafe fn enableUndoRegistration(&self) { - msg_send![self, enableUndoRegistration] - } - pub unsafe fn isUndoRegistrationEnabled(&self) -> bool { - msg_send![self, isUndoRegistrationEnabled] - } - pub unsafe fn groupsByEvent(&self) -> bool { - msg_send![self, groupsByEvent] - } - pub unsafe fn setGroupsByEvent(&self, groupsByEvent: bool) { - msg_send![self, setGroupsByEvent: groupsByEvent] - } - pub unsafe fn levelsOfUndo(&self) -> NSUInteger { - msg_send![self, levelsOfUndo] - } - pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger) { - msg_send![self, setLevelsOfUndo: levelsOfUndo] - } - pub unsafe fn runLoopModes(&self) -> Id, Shared> { - msg_send_id![self, runLoopModes] - } - pub unsafe fn setRunLoopModes(&self, runLoopModes: &NSArray) { - msg_send![self, setRunLoopModes: runLoopModes] - } - pub unsafe fn undo(&self) { - msg_send![self, undo] - } - pub unsafe fn redo(&self) { - msg_send![self, redo] - } - pub unsafe fn undoNestedGroup(&self) { - msg_send![self, undoNestedGroup] - } - pub unsafe fn canUndo(&self) -> bool { - msg_send![self, canUndo] - } - pub unsafe fn canRedo(&self) -> bool { - msg_send![self, canRedo] - } - pub unsafe fn isUndoing(&self) -> bool { - msg_send![self, isUndoing] - } - pub unsafe fn isRedoing(&self) -> bool { - msg_send![self, isRedoing] - } - pub unsafe fn removeAllActions(&self) { - msg_send![self, removeAllActions] - } - pub unsafe fn removeAllActionsWithTarget(&self, target: &Object) { - msg_send![self, removeAllActionsWithTarget: target] - } - pub unsafe fn registerUndoWithTarget_selector_object( - &self, - target: &Object, - selector: Sel, - anObject: Option<&Object>, - ) { - msg_send![ - self, - registerUndoWithTarget: target, - selector: selector, - object: anObject - ] - } - pub unsafe fn prepareWithInvocationTarget(&self, target: &Object) -> Id { - msg_send_id![self, prepareWithInvocationTarget: target] - } - pub unsafe fn registerUndoWithTarget_handler(&self, target: &Object, undoHandler: TodoBlock) { - msg_send![self, registerUndoWithTarget: target, handler: undoHandler] - } - pub unsafe fn setActionIsDiscardable(&self, discardable: bool) { - msg_send![self, setActionIsDiscardable: discardable] - } - pub unsafe fn undoActionIsDiscardable(&self) -> bool { - msg_send![self, undoActionIsDiscardable] - } - pub unsafe fn redoActionIsDiscardable(&self) -> bool { - msg_send![self, redoActionIsDiscardable] - } - pub unsafe fn undoActionName(&self) -> Id { - msg_send_id![self, undoActionName] - } - pub unsafe fn redoActionName(&self) -> Id { - msg_send_id![self, redoActionName] - } - pub unsafe fn setActionName(&self, actionName: &NSString) { - msg_send![self, setActionName: actionName] - } - pub unsafe fn undoMenuItemTitle(&self) -> Id { - msg_send_id![self, undoMenuItemTitle] - } - pub unsafe fn redoMenuItemTitle(&self) -> Id { - msg_send_id![self, redoMenuItemTitle] - } - pub unsafe fn undoMenuTitleForUndoActionName( - &self, - actionName: &NSString, - ) -> Id { - msg_send_id![self, undoMenuTitleForUndoActionName: actionName] - } - pub unsafe fn redoMenuTitleForUndoActionName( - &self, - actionName: &NSString, - ) -> Id { - msg_send_id![self, redoMenuTitleForUndoActionName: actionName] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index 0c57d40e1..c5c00d57f 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUnitConverter; @@ -10,14 +10,16 @@ extern_class!( type Super = NSObject; } ); -impl NSUnitConverter { - pub unsafe fn baseUnitValueFromValue(&self, value: c_double) -> c_double { - msg_send![self, baseUnitValueFromValue: value] +extern_methods!( + unsafe impl NSUnitConverter { + pub unsafe fn baseUnitValueFromValue(&self, value: c_double) -> c_double { + msg_send![self, baseUnitValueFromValue: value] + } + pub unsafe fn valueFromBaseUnitValue(&self, baseUnitValue: c_double) -> c_double { + msg_send![self, valueFromBaseUnitValue: baseUnitValue] + } } - pub unsafe fn valueFromBaseUnitValue(&self, baseUnitValue: c_double) -> c_double { - msg_send![self, valueFromBaseUnitValue: baseUnitValue] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitConverterLinear; @@ -25,24 +27,26 @@ extern_class!( type Super = NSUnitConverter; } ); -impl NSUnitConverterLinear { - pub unsafe fn coefficient(&self) -> c_double { - msg_send![self, coefficient] - } - pub unsafe fn constant(&self) -> c_double { - msg_send![self, constant] - } - pub unsafe fn initWithCoefficient(&self, coefficient: c_double) -> Id { - msg_send_id![self, initWithCoefficient: coefficient] +extern_methods!( + unsafe impl NSUnitConverterLinear { + pub unsafe fn coefficient(&self) -> c_double { + msg_send![self, coefficient] + } + pub unsafe fn constant(&self) -> c_double { + msg_send![self, constant] + } + pub unsafe fn initWithCoefficient(&self, coefficient: c_double) -> Id { + msg_send_id![self, initWithCoefficient: coefficient] + } + pub unsafe fn initWithCoefficient_constant( + &self, + coefficient: c_double, + constant: c_double, + ) -> Id { + msg_send_id![self, initWithCoefficient: coefficient, constant: constant] + } } - pub unsafe fn initWithCoefficient_constant( - &self, - coefficient: c_double, - constant: c_double, - ) -> Id { - msg_send_id![self, initWithCoefficient: coefficient, constant: constant] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnit; @@ -50,20 +54,22 @@ extern_class!( type Super = NSObject; } ); -impl NSUnit { - pub unsafe fn symbol(&self) -> Id { - msg_send_id![self, symbol] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] +extern_methods!( + unsafe impl NSUnit { + pub unsafe fn symbol(&self) -> Id { + msg_send_id![self, symbol] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn new() -> Id { + msg_send_id![Self::class(), new] + } + pub unsafe fn initWithSymbol(&self, symbol: &NSString) -> Id { + msg_send_id![self, initWithSymbol: symbol] + } } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } - pub unsafe fn initWithSymbol(&self, symbol: &NSString) -> Id { - msg_send_id![self, initWithSymbol: symbol] - } -} +); extern_class!( #[derive(Debug)] pub struct NSDimension; @@ -71,21 +77,23 @@ extern_class!( type Super = NSUnit; } ); -impl NSDimension { - pub unsafe fn converter(&self) -> Id { - msg_send_id![self, converter] - } - pub unsafe fn initWithSymbol_converter( - &self, - symbol: &NSString, - converter: &NSUnitConverter, - ) -> Id { - msg_send_id![self, initWithSymbol: symbol, converter: converter] +extern_methods!( + unsafe impl NSDimension { + pub unsafe fn converter(&self) -> Id { + msg_send_id![self, converter] + } + pub unsafe fn initWithSymbol_converter( + &self, + symbol: &NSString, + converter: &NSUnitConverter, + ) -> Id { + msg_send_id![self, initWithSymbol: symbol, converter: converter] + } + pub unsafe fn baseUnit() -> Id { + msg_send_id![Self::class(), baseUnit] + } } - pub unsafe fn baseUnit() -> Id { - msg_send_id![Self::class(), baseUnit] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitAcceleration; @@ -93,14 +101,16 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitAcceleration { - pub unsafe fn metersPerSecondSquared() -> Id { - msg_send_id![Self::class(), metersPerSecondSquared] - } - pub unsafe fn gravity() -> Id { - msg_send_id![Self::class(), gravity] +extern_methods!( + unsafe impl NSUnitAcceleration { + pub unsafe fn metersPerSecondSquared() -> Id { + msg_send_id![Self::class(), metersPerSecondSquared] + } + pub unsafe fn gravity() -> Id { + msg_send_id![Self::class(), gravity] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitAngle; @@ -108,26 +118,28 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitAngle { - pub unsafe fn degrees() -> Id { - msg_send_id![Self::class(), degrees] - } - pub unsafe fn arcMinutes() -> Id { - msg_send_id![Self::class(), arcMinutes] - } - pub unsafe fn arcSeconds() -> Id { - msg_send_id![Self::class(), arcSeconds] - } - pub unsafe fn radians() -> Id { - msg_send_id![Self::class(), radians] +extern_methods!( + unsafe impl NSUnitAngle { + pub unsafe fn degrees() -> Id { + msg_send_id![Self::class(), degrees] + } + pub unsafe fn arcMinutes() -> Id { + msg_send_id![Self::class(), arcMinutes] + } + pub unsafe fn arcSeconds() -> Id { + msg_send_id![Self::class(), arcSeconds] + } + pub unsafe fn radians() -> Id { + msg_send_id![Self::class(), radians] + } + pub unsafe fn gradians() -> Id { + msg_send_id![Self::class(), gradians] + } + pub unsafe fn revolutions() -> Id { + msg_send_id![Self::class(), revolutions] + } } - pub unsafe fn gradians() -> Id { - msg_send_id![Self::class(), gradians] - } - pub unsafe fn revolutions() -> Id { - msg_send_id![Self::class(), revolutions] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitArea; @@ -135,50 +147,52 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitArea { - pub unsafe fn squareMegameters() -> Id { - msg_send_id![Self::class(), squareMegameters] - } - pub unsafe fn squareKilometers() -> Id { - msg_send_id![Self::class(), squareKilometers] - } - pub unsafe fn squareMeters() -> Id { - msg_send_id![Self::class(), squareMeters] - } - pub unsafe fn squareCentimeters() -> Id { - msg_send_id![Self::class(), squareCentimeters] - } - pub unsafe fn squareMillimeters() -> Id { - msg_send_id![Self::class(), squareMillimeters] - } - pub unsafe fn squareMicrometers() -> Id { - msg_send_id![Self::class(), squareMicrometers] - } - pub unsafe fn squareNanometers() -> Id { - msg_send_id![Self::class(), squareNanometers] - } - pub unsafe fn squareInches() -> Id { - msg_send_id![Self::class(), squareInches] +extern_methods!( + unsafe impl NSUnitArea { + pub unsafe fn squareMegameters() -> Id { + msg_send_id![Self::class(), squareMegameters] + } + pub unsafe fn squareKilometers() -> Id { + msg_send_id![Self::class(), squareKilometers] + } + pub unsafe fn squareMeters() -> Id { + msg_send_id![Self::class(), squareMeters] + } + pub unsafe fn squareCentimeters() -> Id { + msg_send_id![Self::class(), squareCentimeters] + } + pub unsafe fn squareMillimeters() -> Id { + msg_send_id![Self::class(), squareMillimeters] + } + pub unsafe fn squareMicrometers() -> Id { + msg_send_id![Self::class(), squareMicrometers] + } + pub unsafe fn squareNanometers() -> Id { + msg_send_id![Self::class(), squareNanometers] + } + pub unsafe fn squareInches() -> Id { + msg_send_id![Self::class(), squareInches] + } + pub unsafe fn squareFeet() -> Id { + msg_send_id![Self::class(), squareFeet] + } + pub unsafe fn squareYards() -> Id { + msg_send_id![Self::class(), squareYards] + } + pub unsafe fn squareMiles() -> Id { + msg_send_id![Self::class(), squareMiles] + } + pub unsafe fn acres() -> Id { + msg_send_id![Self::class(), acres] + } + pub unsafe fn ares() -> Id { + msg_send_id![Self::class(), ares] + } + pub unsafe fn hectares() -> Id { + msg_send_id![Self::class(), hectares] + } } - pub unsafe fn squareFeet() -> Id { - msg_send_id![Self::class(), squareFeet] - } - pub unsafe fn squareYards() -> Id { - msg_send_id![Self::class(), squareYards] - } - pub unsafe fn squareMiles() -> Id { - msg_send_id![Self::class(), squareMiles] - } - pub unsafe fn acres() -> Id { - msg_send_id![Self::class(), acres] - } - pub unsafe fn ares() -> Id { - msg_send_id![Self::class(), ares] - } - pub unsafe fn hectares() -> Id { - msg_send_id![Self::class(), hectares] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitConcentrationMass; @@ -186,22 +200,24 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitConcentrationMass { - pub unsafe fn gramsPerLiter() -> Id { - msg_send_id![Self::class(), gramsPerLiter] +extern_methods!( + unsafe impl NSUnitConcentrationMass { + pub unsafe fn gramsPerLiter() -> Id { + msg_send_id![Self::class(), gramsPerLiter] + } + pub unsafe fn milligramsPerDeciliter() -> Id { + msg_send_id![Self::class(), milligramsPerDeciliter] + } + pub unsafe fn millimolesPerLiterWithGramsPerMole( + gramsPerMole: c_double, + ) -> Id { + msg_send_id![ + Self::class(), + millimolesPerLiterWithGramsPerMole: gramsPerMole + ] + } } - pub unsafe fn milligramsPerDeciliter() -> Id { - msg_send_id![Self::class(), milligramsPerDeciliter] - } - pub unsafe fn millimolesPerLiterWithGramsPerMole( - gramsPerMole: c_double, - ) -> Id { - msg_send_id![ - Self::class(), - millimolesPerLiterWithGramsPerMole: gramsPerMole - ] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitDispersion; @@ -209,11 +225,13 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitDispersion { - pub unsafe fn partsPerMillion() -> Id { - msg_send_id![Self::class(), partsPerMillion] +extern_methods!( + unsafe impl NSUnitDispersion { + pub unsafe fn partsPerMillion() -> Id { + msg_send_id![Self::class(), partsPerMillion] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitDuration; @@ -221,29 +239,31 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitDuration { - pub unsafe fn hours() -> Id { - msg_send_id![Self::class(), hours] - } - pub unsafe fn minutes() -> Id { - msg_send_id![Self::class(), minutes] - } - pub unsafe fn seconds() -> Id { - msg_send_id![Self::class(), seconds] - } - pub unsafe fn milliseconds() -> Id { - msg_send_id![Self::class(), milliseconds] +extern_methods!( + unsafe impl NSUnitDuration { + pub unsafe fn hours() -> Id { + msg_send_id![Self::class(), hours] + } + pub unsafe fn minutes() -> Id { + msg_send_id![Self::class(), minutes] + } + pub unsafe fn seconds() -> Id { + msg_send_id![Self::class(), seconds] + } + pub unsafe fn milliseconds() -> Id { + msg_send_id![Self::class(), milliseconds] + } + pub unsafe fn microseconds() -> Id { + msg_send_id![Self::class(), microseconds] + } + pub unsafe fn nanoseconds() -> Id { + msg_send_id![Self::class(), nanoseconds] + } + pub unsafe fn picoseconds() -> Id { + msg_send_id![Self::class(), picoseconds] + } } - pub unsafe fn microseconds() -> Id { - msg_send_id![Self::class(), microseconds] - } - pub unsafe fn nanoseconds() -> Id { - msg_send_id![Self::class(), nanoseconds] - } - pub unsafe fn picoseconds() -> Id { - msg_send_id![Self::class(), picoseconds] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitElectricCharge; @@ -251,26 +271,28 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitElectricCharge { - pub unsafe fn coulombs() -> Id { - msg_send_id![Self::class(), coulombs] - } - pub unsafe fn megaampereHours() -> Id { - msg_send_id![Self::class(), megaampereHours] - } - pub unsafe fn kiloampereHours() -> Id { - msg_send_id![Self::class(), kiloampereHours] - } - pub unsafe fn ampereHours() -> Id { - msg_send_id![Self::class(), ampereHours] +extern_methods!( + unsafe impl NSUnitElectricCharge { + pub unsafe fn coulombs() -> Id { + msg_send_id![Self::class(), coulombs] + } + pub unsafe fn megaampereHours() -> Id { + msg_send_id![Self::class(), megaampereHours] + } + pub unsafe fn kiloampereHours() -> Id { + msg_send_id![Self::class(), kiloampereHours] + } + pub unsafe fn ampereHours() -> Id { + msg_send_id![Self::class(), ampereHours] + } + pub unsafe fn milliampereHours() -> Id { + msg_send_id![Self::class(), milliampereHours] + } + pub unsafe fn microampereHours() -> Id { + msg_send_id![Self::class(), microampereHours] + } } - pub unsafe fn milliampereHours() -> Id { - msg_send_id![Self::class(), milliampereHours] - } - pub unsafe fn microampereHours() -> Id { - msg_send_id![Self::class(), microampereHours] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitElectricCurrent; @@ -278,23 +300,25 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitElectricCurrent { - pub unsafe fn megaamperes() -> Id { - msg_send_id![Self::class(), megaamperes] - } - pub unsafe fn kiloamperes() -> Id { - msg_send_id![Self::class(), kiloamperes] - } - pub unsafe fn amperes() -> Id { - msg_send_id![Self::class(), amperes] - } - pub unsafe fn milliamperes() -> Id { - msg_send_id![Self::class(), milliamperes] +extern_methods!( + unsafe impl NSUnitElectricCurrent { + pub unsafe fn megaamperes() -> Id { + msg_send_id![Self::class(), megaamperes] + } + pub unsafe fn kiloamperes() -> Id { + msg_send_id![Self::class(), kiloamperes] + } + pub unsafe fn amperes() -> Id { + msg_send_id![Self::class(), amperes] + } + pub unsafe fn milliamperes() -> Id { + msg_send_id![Self::class(), milliamperes] + } + pub unsafe fn microamperes() -> Id { + msg_send_id![Self::class(), microamperes] + } } - pub unsafe fn microamperes() -> Id { - msg_send_id![Self::class(), microamperes] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitElectricPotentialDifference; @@ -302,23 +326,25 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitElectricPotentialDifference { - pub unsafe fn megavolts() -> Id { - msg_send_id![Self::class(), megavolts] - } - pub unsafe fn kilovolts() -> Id { - msg_send_id![Self::class(), kilovolts] - } - pub unsafe fn volts() -> Id { - msg_send_id![Self::class(), volts] +extern_methods!( + unsafe impl NSUnitElectricPotentialDifference { + pub unsafe fn megavolts() -> Id { + msg_send_id![Self::class(), megavolts] + } + pub unsafe fn kilovolts() -> Id { + msg_send_id![Self::class(), kilovolts] + } + pub unsafe fn volts() -> Id { + msg_send_id![Self::class(), volts] + } + pub unsafe fn millivolts() -> Id { + msg_send_id![Self::class(), millivolts] + } + pub unsafe fn microvolts() -> Id { + msg_send_id![Self::class(), microvolts] + } } - pub unsafe fn millivolts() -> Id { - msg_send_id![Self::class(), millivolts] - } - pub unsafe fn microvolts() -> Id { - msg_send_id![Self::class(), microvolts] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitElectricResistance; @@ -326,23 +352,25 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitElectricResistance { - pub unsafe fn megaohms() -> Id { - msg_send_id![Self::class(), megaohms] +extern_methods!( + unsafe impl NSUnitElectricResistance { + pub unsafe fn megaohms() -> Id { + msg_send_id![Self::class(), megaohms] + } + pub unsafe fn kiloohms() -> Id { + msg_send_id![Self::class(), kiloohms] + } + pub unsafe fn ohms() -> Id { + msg_send_id![Self::class(), ohms] + } + pub unsafe fn milliohms() -> Id { + msg_send_id![Self::class(), milliohms] + } + pub unsafe fn microohms() -> Id { + msg_send_id![Self::class(), microohms] + } } - pub unsafe fn kiloohms() -> Id { - msg_send_id![Self::class(), kiloohms] - } - pub unsafe fn ohms() -> Id { - msg_send_id![Self::class(), ohms] - } - pub unsafe fn milliohms() -> Id { - msg_send_id![Self::class(), milliohms] - } - pub unsafe fn microohms() -> Id { - msg_send_id![Self::class(), microohms] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitEnergy; @@ -350,23 +378,25 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitEnergy { - pub unsafe fn kilojoules() -> Id { - msg_send_id![Self::class(), kilojoules] - } - pub unsafe fn joules() -> Id { - msg_send_id![Self::class(), joules] - } - pub unsafe fn kilocalories() -> Id { - msg_send_id![Self::class(), kilocalories] +extern_methods!( + unsafe impl NSUnitEnergy { + pub unsafe fn kilojoules() -> Id { + msg_send_id![Self::class(), kilojoules] + } + pub unsafe fn joules() -> Id { + msg_send_id![Self::class(), joules] + } + pub unsafe fn kilocalories() -> Id { + msg_send_id![Self::class(), kilocalories] + } + pub unsafe fn calories() -> Id { + msg_send_id![Self::class(), calories] + } + pub unsafe fn kilowattHours() -> Id { + msg_send_id![Self::class(), kilowattHours] + } } - pub unsafe fn calories() -> Id { - msg_send_id![Self::class(), calories] - } - pub unsafe fn kilowattHours() -> Id { - msg_send_id![Self::class(), kilowattHours] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitFrequency; @@ -374,35 +404,37 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitFrequency { - pub unsafe fn terahertz() -> Id { - msg_send_id![Self::class(), terahertz] - } - pub unsafe fn gigahertz() -> Id { - msg_send_id![Self::class(), gigahertz] - } - pub unsafe fn megahertz() -> Id { - msg_send_id![Self::class(), megahertz] - } - pub unsafe fn kilohertz() -> Id { - msg_send_id![Self::class(), kilohertz] - } - pub unsafe fn hertz() -> Id { - msg_send_id![Self::class(), hertz] +extern_methods!( + unsafe impl NSUnitFrequency { + pub unsafe fn terahertz() -> Id { + msg_send_id![Self::class(), terahertz] + } + pub unsafe fn gigahertz() -> Id { + msg_send_id![Self::class(), gigahertz] + } + pub unsafe fn megahertz() -> Id { + msg_send_id![Self::class(), megahertz] + } + pub unsafe fn kilohertz() -> Id { + msg_send_id![Self::class(), kilohertz] + } + pub unsafe fn hertz() -> Id { + msg_send_id![Self::class(), hertz] + } + pub unsafe fn millihertz() -> Id { + msg_send_id![Self::class(), millihertz] + } + pub unsafe fn microhertz() -> Id { + msg_send_id![Self::class(), microhertz] + } + pub unsafe fn nanohertz() -> Id { + msg_send_id![Self::class(), nanohertz] + } + pub unsafe fn framesPerSecond() -> Id { + msg_send_id![Self::class(), framesPerSecond] + } } - pub unsafe fn millihertz() -> Id { - msg_send_id![Self::class(), millihertz] - } - pub unsafe fn microhertz() -> Id { - msg_send_id![Self::class(), microhertz] - } - pub unsafe fn nanohertz() -> Id { - msg_send_id![Self::class(), nanohertz] - } - pub unsafe fn framesPerSecond() -> Id { - msg_send_id![Self::class(), framesPerSecond] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitFuelEfficiency; @@ -410,17 +442,19 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitFuelEfficiency { - pub unsafe fn litersPer100Kilometers() -> Id { - msg_send_id![Self::class(), litersPer100Kilometers] - } - pub unsafe fn milesPerImperialGallon() -> Id { - msg_send_id![Self::class(), milesPerImperialGallon] +extern_methods!( + unsafe impl NSUnitFuelEfficiency { + pub unsafe fn litersPer100Kilometers() -> Id { + msg_send_id![Self::class(), litersPer100Kilometers] + } + pub unsafe fn milesPerImperialGallon() -> Id { + msg_send_id![Self::class(), milesPerImperialGallon] + } + pub unsafe fn milesPerGallon() -> Id { + msg_send_id![Self::class(), milesPerGallon] + } } - pub unsafe fn milesPerGallon() -> Id { - msg_send_id![Self::class(), milesPerGallon] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitInformationStorage; @@ -428,113 +462,115 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitInformationStorage { - pub unsafe fn bytes() -> Id { - msg_send_id![Self::class(), bytes] - } - pub unsafe fn bits() -> Id { - msg_send_id![Self::class(), bits] - } - pub unsafe fn nibbles() -> Id { - msg_send_id![Self::class(), nibbles] - } - pub unsafe fn yottabytes() -> Id { - msg_send_id![Self::class(), yottabytes] - } - pub unsafe fn zettabytes() -> Id { - msg_send_id![Self::class(), zettabytes] - } - pub unsafe fn exabytes() -> Id { - msg_send_id![Self::class(), exabytes] - } - pub unsafe fn petabytes() -> Id { - msg_send_id![Self::class(), petabytes] - } - pub unsafe fn terabytes() -> Id { - msg_send_id![Self::class(), terabytes] - } - pub unsafe fn gigabytes() -> Id { - msg_send_id![Self::class(), gigabytes] - } - pub unsafe fn megabytes() -> Id { - msg_send_id![Self::class(), megabytes] - } - pub unsafe fn kilobytes() -> Id { - msg_send_id![Self::class(), kilobytes] - } - pub unsafe fn yottabits() -> Id { - msg_send_id![Self::class(), yottabits] - } - pub unsafe fn zettabits() -> Id { - msg_send_id![Self::class(), zettabits] - } - pub unsafe fn exabits() -> Id { - msg_send_id![Self::class(), exabits] - } - pub unsafe fn petabits() -> Id { - msg_send_id![Self::class(), petabits] - } - pub unsafe fn terabits() -> Id { - msg_send_id![Self::class(), terabits] - } - pub unsafe fn gigabits() -> Id { - msg_send_id![Self::class(), gigabits] - } - pub unsafe fn megabits() -> Id { - msg_send_id![Self::class(), megabits] - } - pub unsafe fn kilobits() -> Id { - msg_send_id![Self::class(), kilobits] - } - pub unsafe fn yobibytes() -> Id { - msg_send_id![Self::class(), yobibytes] - } - pub unsafe fn zebibytes() -> Id { - msg_send_id![Self::class(), zebibytes] - } - pub unsafe fn exbibytes() -> Id { - msg_send_id![Self::class(), exbibytes] - } - pub unsafe fn pebibytes() -> Id { - msg_send_id![Self::class(), pebibytes] - } - pub unsafe fn tebibytes() -> Id { - msg_send_id![Self::class(), tebibytes] - } - pub unsafe fn gibibytes() -> Id { - msg_send_id![Self::class(), gibibytes] - } - pub unsafe fn mebibytes() -> Id { - msg_send_id![Self::class(), mebibytes] +extern_methods!( + unsafe impl NSUnitInformationStorage { + pub unsafe fn bytes() -> Id { + msg_send_id![Self::class(), bytes] + } + pub unsafe fn bits() -> Id { + msg_send_id![Self::class(), bits] + } + pub unsafe fn nibbles() -> Id { + msg_send_id![Self::class(), nibbles] + } + pub unsafe fn yottabytes() -> Id { + msg_send_id![Self::class(), yottabytes] + } + pub unsafe fn zettabytes() -> Id { + msg_send_id![Self::class(), zettabytes] + } + pub unsafe fn exabytes() -> Id { + msg_send_id![Self::class(), exabytes] + } + pub unsafe fn petabytes() -> Id { + msg_send_id![Self::class(), petabytes] + } + pub unsafe fn terabytes() -> Id { + msg_send_id![Self::class(), terabytes] + } + pub unsafe fn gigabytes() -> Id { + msg_send_id![Self::class(), gigabytes] + } + pub unsafe fn megabytes() -> Id { + msg_send_id![Self::class(), megabytes] + } + pub unsafe fn kilobytes() -> Id { + msg_send_id![Self::class(), kilobytes] + } + pub unsafe fn yottabits() -> Id { + msg_send_id![Self::class(), yottabits] + } + pub unsafe fn zettabits() -> Id { + msg_send_id![Self::class(), zettabits] + } + pub unsafe fn exabits() -> Id { + msg_send_id![Self::class(), exabits] + } + pub unsafe fn petabits() -> Id { + msg_send_id![Self::class(), petabits] + } + pub unsafe fn terabits() -> Id { + msg_send_id![Self::class(), terabits] + } + pub unsafe fn gigabits() -> Id { + msg_send_id![Self::class(), gigabits] + } + pub unsafe fn megabits() -> Id { + msg_send_id![Self::class(), megabits] + } + pub unsafe fn kilobits() -> Id { + msg_send_id![Self::class(), kilobits] + } + pub unsafe fn yobibytes() -> Id { + msg_send_id![Self::class(), yobibytes] + } + pub unsafe fn zebibytes() -> Id { + msg_send_id![Self::class(), zebibytes] + } + pub unsafe fn exbibytes() -> Id { + msg_send_id![Self::class(), exbibytes] + } + pub unsafe fn pebibytes() -> Id { + msg_send_id![Self::class(), pebibytes] + } + pub unsafe fn tebibytes() -> Id { + msg_send_id![Self::class(), tebibytes] + } + pub unsafe fn gibibytes() -> Id { + msg_send_id![Self::class(), gibibytes] + } + pub unsafe fn mebibytes() -> Id { + msg_send_id![Self::class(), mebibytes] + } + pub unsafe fn kibibytes() -> Id { + msg_send_id![Self::class(), kibibytes] + } + pub unsafe fn yobibits() -> Id { + msg_send_id![Self::class(), yobibits] + } + pub unsafe fn zebibits() -> Id { + msg_send_id![Self::class(), zebibits] + } + pub unsafe fn exbibits() -> Id { + msg_send_id![Self::class(), exbibits] + } + pub unsafe fn pebibits() -> Id { + msg_send_id![Self::class(), pebibits] + } + pub unsafe fn tebibits() -> Id { + msg_send_id![Self::class(), tebibits] + } + pub unsafe fn gibibits() -> Id { + msg_send_id![Self::class(), gibibits] + } + pub unsafe fn mebibits() -> Id { + msg_send_id![Self::class(), mebibits] + } + pub unsafe fn kibibits() -> Id { + msg_send_id![Self::class(), kibibits] + } } - pub unsafe fn kibibytes() -> Id { - msg_send_id![Self::class(), kibibytes] - } - pub unsafe fn yobibits() -> Id { - msg_send_id![Self::class(), yobibits] - } - pub unsafe fn zebibits() -> Id { - msg_send_id![Self::class(), zebibits] - } - pub unsafe fn exbibits() -> Id { - msg_send_id![Self::class(), exbibits] - } - pub unsafe fn pebibits() -> Id { - msg_send_id![Self::class(), pebibits] - } - pub unsafe fn tebibits() -> Id { - msg_send_id![Self::class(), tebibits] - } - pub unsafe fn gibibits() -> Id { - msg_send_id![Self::class(), gibibits] - } - pub unsafe fn mebibits() -> Id { - msg_send_id![Self::class(), mebibits] - } - pub unsafe fn kibibits() -> Id { - msg_send_id![Self::class(), kibibits] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitLength; @@ -542,74 +578,76 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitLength { - pub unsafe fn megameters() -> Id { - msg_send_id![Self::class(), megameters] - } - pub unsafe fn kilometers() -> Id { - msg_send_id![Self::class(), kilometers] - } - pub unsafe fn hectometers() -> Id { - msg_send_id![Self::class(), hectometers] - } - pub unsafe fn decameters() -> Id { - msg_send_id![Self::class(), decameters] - } - pub unsafe fn meters() -> Id { - msg_send_id![Self::class(), meters] - } - pub unsafe fn decimeters() -> Id { - msg_send_id![Self::class(), decimeters] - } - pub unsafe fn centimeters() -> Id { - msg_send_id![Self::class(), centimeters] - } - pub unsafe fn millimeters() -> Id { - msg_send_id![Self::class(), millimeters] - } - pub unsafe fn micrometers() -> Id { - msg_send_id![Self::class(), micrometers] - } - pub unsafe fn nanometers() -> Id { - msg_send_id![Self::class(), nanometers] - } - pub unsafe fn picometers() -> Id { - msg_send_id![Self::class(), picometers] - } - pub unsafe fn inches() -> Id { - msg_send_id![Self::class(), inches] - } - pub unsafe fn feet() -> Id { - msg_send_id![Self::class(), feet] - } - pub unsafe fn yards() -> Id { - msg_send_id![Self::class(), yards] - } - pub unsafe fn miles() -> Id { - msg_send_id![Self::class(), miles] - } - pub unsafe fn scandinavianMiles() -> Id { - msg_send_id![Self::class(), scandinavianMiles] - } - pub unsafe fn lightyears() -> Id { - msg_send_id![Self::class(), lightyears] - } - pub unsafe fn nauticalMiles() -> Id { - msg_send_id![Self::class(), nauticalMiles] +extern_methods!( + unsafe impl NSUnitLength { + pub unsafe fn megameters() -> Id { + msg_send_id![Self::class(), megameters] + } + pub unsafe fn kilometers() -> Id { + msg_send_id![Self::class(), kilometers] + } + pub unsafe fn hectometers() -> Id { + msg_send_id![Self::class(), hectometers] + } + pub unsafe fn decameters() -> Id { + msg_send_id![Self::class(), decameters] + } + pub unsafe fn meters() -> Id { + msg_send_id![Self::class(), meters] + } + pub unsafe fn decimeters() -> Id { + msg_send_id![Self::class(), decimeters] + } + pub unsafe fn centimeters() -> Id { + msg_send_id![Self::class(), centimeters] + } + pub unsafe fn millimeters() -> Id { + msg_send_id![Self::class(), millimeters] + } + pub unsafe fn micrometers() -> Id { + msg_send_id![Self::class(), micrometers] + } + pub unsafe fn nanometers() -> Id { + msg_send_id![Self::class(), nanometers] + } + pub unsafe fn picometers() -> Id { + msg_send_id![Self::class(), picometers] + } + pub unsafe fn inches() -> Id { + msg_send_id![Self::class(), inches] + } + pub unsafe fn feet() -> Id { + msg_send_id![Self::class(), feet] + } + pub unsafe fn yards() -> Id { + msg_send_id![Self::class(), yards] + } + pub unsafe fn miles() -> Id { + msg_send_id![Self::class(), miles] + } + pub unsafe fn scandinavianMiles() -> Id { + msg_send_id![Self::class(), scandinavianMiles] + } + pub unsafe fn lightyears() -> Id { + msg_send_id![Self::class(), lightyears] + } + pub unsafe fn nauticalMiles() -> Id { + msg_send_id![Self::class(), nauticalMiles] + } + pub unsafe fn fathoms() -> Id { + msg_send_id![Self::class(), fathoms] + } + pub unsafe fn furlongs() -> Id { + msg_send_id![Self::class(), furlongs] + } + pub unsafe fn astronomicalUnits() -> Id { + msg_send_id![Self::class(), astronomicalUnits] + } + pub unsafe fn parsecs() -> Id { + msg_send_id![Self::class(), parsecs] + } } - pub unsafe fn fathoms() -> Id { - msg_send_id![Self::class(), fathoms] - } - pub unsafe fn furlongs() -> Id { - msg_send_id![Self::class(), furlongs] - } - pub unsafe fn astronomicalUnits() -> Id { - msg_send_id![Self::class(), astronomicalUnits] - } - pub unsafe fn parsecs() -> Id { - msg_send_id![Self::class(), parsecs] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitIlluminance; @@ -617,11 +655,13 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitIlluminance { - pub unsafe fn lux() -> Id { - msg_send_id![Self::class(), lux] +extern_methods!( + unsafe impl NSUnitIlluminance { + pub unsafe fn lux() -> Id { + msg_send_id![Self::class(), lux] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitMass; @@ -629,56 +669,58 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitMass { - pub unsafe fn kilograms() -> Id { - msg_send_id![Self::class(), kilograms] - } - pub unsafe fn grams() -> Id { - msg_send_id![Self::class(), grams] - } - pub unsafe fn decigrams() -> Id { - msg_send_id![Self::class(), decigrams] - } - pub unsafe fn centigrams() -> Id { - msg_send_id![Self::class(), centigrams] - } - pub unsafe fn milligrams() -> Id { - msg_send_id![Self::class(), milligrams] - } - pub unsafe fn micrograms() -> Id { - msg_send_id![Self::class(), micrograms] - } - pub unsafe fn nanograms() -> Id { - msg_send_id![Self::class(), nanograms] - } - pub unsafe fn picograms() -> Id { - msg_send_id![Self::class(), picograms] - } - pub unsafe fn ounces() -> Id { - msg_send_id![Self::class(), ounces] +extern_methods!( + unsafe impl NSUnitMass { + pub unsafe fn kilograms() -> Id { + msg_send_id![Self::class(), kilograms] + } + pub unsafe fn grams() -> Id { + msg_send_id![Self::class(), grams] + } + pub unsafe fn decigrams() -> Id { + msg_send_id![Self::class(), decigrams] + } + pub unsafe fn centigrams() -> Id { + msg_send_id![Self::class(), centigrams] + } + pub unsafe fn milligrams() -> Id { + msg_send_id![Self::class(), milligrams] + } + pub unsafe fn micrograms() -> Id { + msg_send_id![Self::class(), micrograms] + } + pub unsafe fn nanograms() -> Id { + msg_send_id![Self::class(), nanograms] + } + pub unsafe fn picograms() -> Id { + msg_send_id![Self::class(), picograms] + } + pub unsafe fn ounces() -> Id { + msg_send_id![Self::class(), ounces] + } + pub unsafe fn poundsMass() -> Id { + msg_send_id![Self::class(), poundsMass] + } + pub unsafe fn stones() -> Id { + msg_send_id![Self::class(), stones] + } + pub unsafe fn metricTons() -> Id { + msg_send_id![Self::class(), metricTons] + } + pub unsafe fn shortTons() -> Id { + msg_send_id![Self::class(), shortTons] + } + pub unsafe fn carats() -> Id { + msg_send_id![Self::class(), carats] + } + pub unsafe fn ouncesTroy() -> Id { + msg_send_id![Self::class(), ouncesTroy] + } + pub unsafe fn slugs() -> Id { + msg_send_id![Self::class(), slugs] + } } - pub unsafe fn poundsMass() -> Id { - msg_send_id![Self::class(), poundsMass] - } - pub unsafe fn stones() -> Id { - msg_send_id![Self::class(), stones] - } - pub unsafe fn metricTons() -> Id { - msg_send_id![Self::class(), metricTons] - } - pub unsafe fn shortTons() -> Id { - msg_send_id![Self::class(), shortTons] - } - pub unsafe fn carats() -> Id { - msg_send_id![Self::class(), carats] - } - pub unsafe fn ouncesTroy() -> Id { - msg_send_id![Self::class(), ouncesTroy] - } - pub unsafe fn slugs() -> Id { - msg_send_id![Self::class(), slugs] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitPower; @@ -686,41 +728,43 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitPower { - pub unsafe fn terawatts() -> Id { - msg_send_id![Self::class(), terawatts] - } - pub unsafe fn gigawatts() -> Id { - msg_send_id![Self::class(), gigawatts] - } - pub unsafe fn megawatts() -> Id { - msg_send_id![Self::class(), megawatts] - } - pub unsafe fn kilowatts() -> Id { - msg_send_id![Self::class(), kilowatts] - } - pub unsafe fn watts() -> Id { - msg_send_id![Self::class(), watts] - } - pub unsafe fn milliwatts() -> Id { - msg_send_id![Self::class(), milliwatts] +extern_methods!( + unsafe impl NSUnitPower { + pub unsafe fn terawatts() -> Id { + msg_send_id![Self::class(), terawatts] + } + pub unsafe fn gigawatts() -> Id { + msg_send_id![Self::class(), gigawatts] + } + pub unsafe fn megawatts() -> Id { + msg_send_id![Self::class(), megawatts] + } + pub unsafe fn kilowatts() -> Id { + msg_send_id![Self::class(), kilowatts] + } + pub unsafe fn watts() -> Id { + msg_send_id![Self::class(), watts] + } + pub unsafe fn milliwatts() -> Id { + msg_send_id![Self::class(), milliwatts] + } + pub unsafe fn microwatts() -> Id { + msg_send_id![Self::class(), microwatts] + } + pub unsafe fn nanowatts() -> Id { + msg_send_id![Self::class(), nanowatts] + } + pub unsafe fn picowatts() -> Id { + msg_send_id![Self::class(), picowatts] + } + pub unsafe fn femtowatts() -> Id { + msg_send_id![Self::class(), femtowatts] + } + pub unsafe fn horsepower() -> Id { + msg_send_id![Self::class(), horsepower] + } } - pub unsafe fn microwatts() -> Id { - msg_send_id![Self::class(), microwatts] - } - pub unsafe fn nanowatts() -> Id { - msg_send_id![Self::class(), nanowatts] - } - pub unsafe fn picowatts() -> Id { - msg_send_id![Self::class(), picowatts] - } - pub unsafe fn femtowatts() -> Id { - msg_send_id![Self::class(), femtowatts] - } - pub unsafe fn horsepower() -> Id { - msg_send_id![Self::class(), horsepower] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitPressure; @@ -728,38 +772,40 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitPressure { - pub unsafe fn newtonsPerMetersSquared() -> Id { - msg_send_id![Self::class(), newtonsPerMetersSquared] - } - pub unsafe fn gigapascals() -> Id { - msg_send_id![Self::class(), gigapascals] - } - pub unsafe fn megapascals() -> Id { - msg_send_id![Self::class(), megapascals] - } - pub unsafe fn kilopascals() -> Id { - msg_send_id![Self::class(), kilopascals] - } - pub unsafe fn hectopascals() -> Id { - msg_send_id![Self::class(), hectopascals] - } - pub unsafe fn inchesOfMercury() -> Id { - msg_send_id![Self::class(), inchesOfMercury] - } - pub unsafe fn bars() -> Id { - msg_send_id![Self::class(), bars] - } - pub unsafe fn millibars() -> Id { - msg_send_id![Self::class(), millibars] - } - pub unsafe fn millimetersOfMercury() -> Id { - msg_send_id![Self::class(), millimetersOfMercury] +extern_methods!( + unsafe impl NSUnitPressure { + pub unsafe fn newtonsPerMetersSquared() -> Id { + msg_send_id![Self::class(), newtonsPerMetersSquared] + } + pub unsafe fn gigapascals() -> Id { + msg_send_id![Self::class(), gigapascals] + } + pub unsafe fn megapascals() -> Id { + msg_send_id![Self::class(), megapascals] + } + pub unsafe fn kilopascals() -> Id { + msg_send_id![Self::class(), kilopascals] + } + pub unsafe fn hectopascals() -> Id { + msg_send_id![Self::class(), hectopascals] + } + pub unsafe fn inchesOfMercury() -> Id { + msg_send_id![Self::class(), inchesOfMercury] + } + pub unsafe fn bars() -> Id { + msg_send_id![Self::class(), bars] + } + pub unsafe fn millibars() -> Id { + msg_send_id![Self::class(), millibars] + } + pub unsafe fn millimetersOfMercury() -> Id { + msg_send_id![Self::class(), millimetersOfMercury] + } + pub unsafe fn poundsForcePerSquareInch() -> Id { + msg_send_id![Self::class(), poundsForcePerSquareInch] + } } - pub unsafe fn poundsForcePerSquareInch() -> Id { - msg_send_id![Self::class(), poundsForcePerSquareInch] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitSpeed; @@ -767,20 +813,22 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitSpeed { - pub unsafe fn metersPerSecond() -> Id { - msg_send_id![Self::class(), metersPerSecond] - } - pub unsafe fn kilometersPerHour() -> Id { - msg_send_id![Self::class(), kilometersPerHour] - } - pub unsafe fn milesPerHour() -> Id { - msg_send_id![Self::class(), milesPerHour] +extern_methods!( + unsafe impl NSUnitSpeed { + pub unsafe fn metersPerSecond() -> Id { + msg_send_id![Self::class(), metersPerSecond] + } + pub unsafe fn kilometersPerHour() -> Id { + msg_send_id![Self::class(), kilometersPerHour] + } + pub unsafe fn milesPerHour() -> Id { + msg_send_id![Self::class(), milesPerHour] + } + pub unsafe fn knots() -> Id { + msg_send_id![Self::class(), knots] + } } - pub unsafe fn knots() -> Id { - msg_send_id![Self::class(), knots] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitTemperature; @@ -788,17 +836,19 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitTemperature { - pub unsafe fn kelvin() -> Id { - msg_send_id![Self::class(), kelvin] - } - pub unsafe fn celsius() -> Id { - msg_send_id![Self::class(), celsius] +extern_methods!( + unsafe impl NSUnitTemperature { + pub unsafe fn kelvin() -> Id { + msg_send_id![Self::class(), kelvin] + } + pub unsafe fn celsius() -> Id { + msg_send_id![Self::class(), celsius] + } + pub unsafe fn fahrenheit() -> Id { + msg_send_id![Self::class(), fahrenheit] + } } - pub unsafe fn fahrenheit() -> Id { - msg_send_id![Self::class(), fahrenheit] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUnitVolume; @@ -806,98 +856,100 @@ extern_class!( type Super = NSDimension; } ); -impl NSUnitVolume { - pub unsafe fn megaliters() -> Id { - msg_send_id![Self::class(), megaliters] - } - pub unsafe fn kiloliters() -> Id { - msg_send_id![Self::class(), kiloliters] - } - pub unsafe fn liters() -> Id { - msg_send_id![Self::class(), liters] - } - pub unsafe fn deciliters() -> Id { - msg_send_id![Self::class(), deciliters] - } - pub unsafe fn centiliters() -> Id { - msg_send_id![Self::class(), centiliters] +extern_methods!( + unsafe impl NSUnitVolume { + pub unsafe fn megaliters() -> Id { + msg_send_id![Self::class(), megaliters] + } + pub unsafe fn kiloliters() -> Id { + msg_send_id![Self::class(), kiloliters] + } + pub unsafe fn liters() -> Id { + msg_send_id![Self::class(), liters] + } + pub unsafe fn deciliters() -> Id { + msg_send_id![Self::class(), deciliters] + } + pub unsafe fn centiliters() -> Id { + msg_send_id![Self::class(), centiliters] + } + pub unsafe fn milliliters() -> Id { + msg_send_id![Self::class(), milliliters] + } + pub unsafe fn cubicKilometers() -> Id { + msg_send_id![Self::class(), cubicKilometers] + } + pub unsafe fn cubicMeters() -> Id { + msg_send_id![Self::class(), cubicMeters] + } + pub unsafe fn cubicDecimeters() -> Id { + msg_send_id![Self::class(), cubicDecimeters] + } + pub unsafe fn cubicCentimeters() -> Id { + msg_send_id![Self::class(), cubicCentimeters] + } + pub unsafe fn cubicMillimeters() -> Id { + msg_send_id![Self::class(), cubicMillimeters] + } + pub unsafe fn cubicInches() -> Id { + msg_send_id![Self::class(), cubicInches] + } + pub unsafe fn cubicFeet() -> Id { + msg_send_id![Self::class(), cubicFeet] + } + pub unsafe fn cubicYards() -> Id { + msg_send_id![Self::class(), cubicYards] + } + pub unsafe fn cubicMiles() -> Id { + msg_send_id![Self::class(), cubicMiles] + } + pub unsafe fn acreFeet() -> Id { + msg_send_id![Self::class(), acreFeet] + } + pub unsafe fn bushels() -> Id { + msg_send_id![Self::class(), bushels] + } + pub unsafe fn teaspoons() -> Id { + msg_send_id![Self::class(), teaspoons] + } + pub unsafe fn tablespoons() -> Id { + msg_send_id![Self::class(), tablespoons] + } + pub unsafe fn fluidOunces() -> Id { + msg_send_id![Self::class(), fluidOunces] + } + pub unsafe fn cups() -> Id { + msg_send_id![Self::class(), cups] + } + pub unsafe fn pints() -> Id { + msg_send_id![Self::class(), pints] + } + pub unsafe fn quarts() -> Id { + msg_send_id![Self::class(), quarts] + } + pub unsafe fn gallons() -> Id { + msg_send_id![Self::class(), gallons] + } + pub unsafe fn imperialTeaspoons() -> Id { + msg_send_id![Self::class(), imperialTeaspoons] + } + pub unsafe fn imperialTablespoons() -> Id { + msg_send_id![Self::class(), imperialTablespoons] + } + pub unsafe fn imperialFluidOunces() -> Id { + msg_send_id![Self::class(), imperialFluidOunces] + } + pub unsafe fn imperialPints() -> Id { + msg_send_id![Self::class(), imperialPints] + } + pub unsafe fn imperialQuarts() -> Id { + msg_send_id![Self::class(), imperialQuarts] + } + pub unsafe fn imperialGallons() -> Id { + msg_send_id![Self::class(), imperialGallons] + } + pub unsafe fn metricCups() -> Id { + msg_send_id![Self::class(), metricCups] + } } - pub unsafe fn milliliters() -> Id { - msg_send_id![Self::class(), milliliters] - } - pub unsafe fn cubicKilometers() -> Id { - msg_send_id![Self::class(), cubicKilometers] - } - pub unsafe fn cubicMeters() -> Id { - msg_send_id![Self::class(), cubicMeters] - } - pub unsafe fn cubicDecimeters() -> Id { - msg_send_id![Self::class(), cubicDecimeters] - } - pub unsafe fn cubicCentimeters() -> Id { - msg_send_id![Self::class(), cubicCentimeters] - } - pub unsafe fn cubicMillimeters() -> Id { - msg_send_id![Self::class(), cubicMillimeters] - } - pub unsafe fn cubicInches() -> Id { - msg_send_id![Self::class(), cubicInches] - } - pub unsafe fn cubicFeet() -> Id { - msg_send_id![Self::class(), cubicFeet] - } - pub unsafe fn cubicYards() -> Id { - msg_send_id![Self::class(), cubicYards] - } - pub unsafe fn cubicMiles() -> Id { - msg_send_id![Self::class(), cubicMiles] - } - pub unsafe fn acreFeet() -> Id { - msg_send_id![Self::class(), acreFeet] - } - pub unsafe fn bushels() -> Id { - msg_send_id![Self::class(), bushels] - } - pub unsafe fn teaspoons() -> Id { - msg_send_id![Self::class(), teaspoons] - } - pub unsafe fn tablespoons() -> Id { - msg_send_id![Self::class(), tablespoons] - } - pub unsafe fn fluidOunces() -> Id { - msg_send_id![Self::class(), fluidOunces] - } - pub unsafe fn cups() -> Id { - msg_send_id![Self::class(), cups] - } - pub unsafe fn pints() -> Id { - msg_send_id![Self::class(), pints] - } - pub unsafe fn quarts() -> Id { - msg_send_id![Self::class(), quarts] - } - pub unsafe fn gallons() -> Id { - msg_send_id![Self::class(), gallons] - } - pub unsafe fn imperialTeaspoons() -> Id { - msg_send_id![Self::class(), imperialTeaspoons] - } - pub unsafe fn imperialTablespoons() -> Id { - msg_send_id![Self::class(), imperialTablespoons] - } - pub unsafe fn imperialFluidOunces() -> Id { - msg_send_id![Self::class(), imperialFluidOunces] - } - pub unsafe fn imperialPints() -> Id { - msg_send_id![Self::class(), imperialPints] - } - pub unsafe fn imperialQuarts() -> Id { - msg_send_id![Self::class(), imperialQuarts] - } - pub unsafe fn imperialGallons() -> Id { - msg_send_id![Self::class(), imperialGallons] - } - pub unsafe fn metricCups() -> Id { - msg_send_id![Self::class(), metricCups] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 941b647fc..6261b7268 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -12,7 +12,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSUserActivityPersistentIdentifier = NSString; extern_class!( #[derive(Debug)] @@ -21,156 +21,167 @@ extern_class!( type Super = NSObject; } ); -impl NSUserActivity { - pub unsafe fn initWithActivityType(&self, activityType: &NSString) -> Id { - msg_send_id![self, initWithActivityType: activityType] +extern_methods!( + unsafe impl NSUserActivity { + pub unsafe fn initWithActivityType(&self, activityType: &NSString) -> Id { + msg_send_id![self, initWithActivityType: activityType] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn activityType(&self) -> Id { + msg_send_id![self, activityType] + } + pub unsafe fn title(&self) -> Option> { + msg_send_id![self, title] + } + pub unsafe fn setTitle(&self, title: Option<&NSString>) { + msg_send![self, setTitle: title] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { + msg_send![self, setUserInfo: userInfo] + } + pub unsafe fn addUserInfoEntriesFromDictionary(&self, otherDictionary: &NSDictionary) { + msg_send![self, addUserInfoEntriesFromDictionary: otherDictionary] + } + pub unsafe fn requiredUserInfoKeys(&self) -> Option, Shared>> { + msg_send_id![self, requiredUserInfoKeys] + } + pub unsafe fn setRequiredUserInfoKeys( + &self, + requiredUserInfoKeys: Option<&NSSet>, + ) { + msg_send![self, setRequiredUserInfoKeys: requiredUserInfoKeys] + } + pub unsafe fn needsSave(&self) -> bool { + msg_send![self, needsSave] + } + pub unsafe fn setNeedsSave(&self, needsSave: bool) { + msg_send![self, setNeedsSave: needsSave] + } + pub unsafe fn webpageURL(&self) -> Option> { + msg_send_id![self, webpageURL] + } + pub unsafe fn setWebpageURL(&self, webpageURL: Option<&NSURL>) { + msg_send![self, setWebpageURL: webpageURL] + } + pub unsafe fn referrerURL(&self) -> Option> { + msg_send_id![self, referrerURL] + } + pub unsafe fn setReferrerURL(&self, referrerURL: Option<&NSURL>) { + msg_send![self, setReferrerURL: referrerURL] + } + pub unsafe fn expirationDate(&self) -> Option> { + msg_send_id![self, expirationDate] + } + pub unsafe fn setExpirationDate(&self, expirationDate: Option<&NSDate>) { + msg_send![self, setExpirationDate: expirationDate] + } + pub unsafe fn keywords(&self) -> Id, Shared> { + msg_send_id![self, keywords] + } + pub unsafe fn setKeywords(&self, keywords: &NSSet) { + msg_send![self, setKeywords: keywords] + } + pub unsafe fn supportsContinuationStreams(&self) -> bool { + msg_send![self, supportsContinuationStreams] + } + pub unsafe fn setSupportsContinuationStreams(&self, supportsContinuationStreams: bool) { + msg_send![ + self, + setSupportsContinuationStreams: supportsContinuationStreams + ] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSUserActivityDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn targetContentIdentifier(&self) -> Option> { + msg_send_id![self, targetContentIdentifier] + } + pub unsafe fn setTargetContentIdentifier( + &self, + targetContentIdentifier: Option<&NSString>, + ) { + msg_send![self, setTargetContentIdentifier: targetContentIdentifier] + } + pub unsafe fn becomeCurrent(&self) { + msg_send![self, becomeCurrent] + } + pub unsafe fn resignCurrent(&self) { + msg_send![self, resignCurrent] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn getContinuationStreamsWithCompletionHandler( + &self, + completionHandler: TodoBlock, + ) { + msg_send![ + self, + getContinuationStreamsWithCompletionHandler: completionHandler + ] + } + pub unsafe fn isEligibleForHandoff(&self) -> bool { + msg_send![self, isEligibleForHandoff] + } + pub unsafe fn setEligibleForHandoff(&self, eligibleForHandoff: bool) { + msg_send![self, setEligibleForHandoff: eligibleForHandoff] + } + pub unsafe fn isEligibleForSearch(&self) -> bool { + msg_send![self, isEligibleForSearch] + } + pub unsafe fn setEligibleForSearch(&self, eligibleForSearch: bool) { + msg_send![self, setEligibleForSearch: eligibleForSearch] + } + pub unsafe fn isEligibleForPublicIndexing(&self) -> bool { + msg_send![self, isEligibleForPublicIndexing] + } + pub unsafe fn setEligibleForPublicIndexing(&self, eligibleForPublicIndexing: bool) { + msg_send![ + self, + setEligibleForPublicIndexing: eligibleForPublicIndexing + ] + } + pub unsafe fn isEligibleForPrediction(&self) -> bool { + msg_send![self, isEligibleForPrediction] + } + pub unsafe fn setEligibleForPrediction(&self, eligibleForPrediction: bool) { + msg_send![self, setEligibleForPrediction: eligibleForPrediction] + } + pub unsafe fn persistentIdentifier( + &self, + ) -> Option> { + msg_send_id![self, persistentIdentifier] + } + pub unsafe fn setPersistentIdentifier( + &self, + persistentIdentifier: Option<&NSUserActivityPersistentIdentifier>, + ) { + msg_send![self, setPersistentIdentifier: persistentIdentifier] + } + pub unsafe fn deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler( + persistentIdentifiers: &NSArray, + handler: TodoBlock, + ) { + msg_send![ + Self::class(), + deleteSavedUserActivitiesWithPersistentIdentifiers: persistentIdentifiers, + completionHandler: handler + ] + } + pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: TodoBlock) { + msg_send![ + Self::class(), + deleteAllSavedUserActivitiesWithCompletionHandler: handler + ] + } } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn activityType(&self) -> Id { - msg_send_id![self, activityType] - } - pub unsafe fn title(&self) -> Option> { - msg_send_id![self, title] - } - pub unsafe fn setTitle(&self, title: Option<&NSString>) { - msg_send![self, setTitle: title] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } - pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { - msg_send![self, setUserInfo: userInfo] - } - pub unsafe fn addUserInfoEntriesFromDictionary(&self, otherDictionary: &NSDictionary) { - msg_send![self, addUserInfoEntriesFromDictionary: otherDictionary] - } - pub unsafe fn requiredUserInfoKeys(&self) -> Option, Shared>> { - msg_send_id![self, requiredUserInfoKeys] - } - pub unsafe fn setRequiredUserInfoKeys(&self, requiredUserInfoKeys: Option<&NSSet>) { - msg_send![self, setRequiredUserInfoKeys: requiredUserInfoKeys] - } - pub unsafe fn needsSave(&self) -> bool { - msg_send![self, needsSave] - } - pub unsafe fn setNeedsSave(&self, needsSave: bool) { - msg_send![self, setNeedsSave: needsSave] - } - pub unsafe fn webpageURL(&self) -> Option> { - msg_send_id![self, webpageURL] - } - pub unsafe fn setWebpageURL(&self, webpageURL: Option<&NSURL>) { - msg_send![self, setWebpageURL: webpageURL] - } - pub unsafe fn referrerURL(&self) -> Option> { - msg_send_id![self, referrerURL] - } - pub unsafe fn setReferrerURL(&self, referrerURL: Option<&NSURL>) { - msg_send![self, setReferrerURL: referrerURL] - } - pub unsafe fn expirationDate(&self) -> Option> { - msg_send_id![self, expirationDate] - } - pub unsafe fn setExpirationDate(&self, expirationDate: Option<&NSDate>) { - msg_send![self, setExpirationDate: expirationDate] - } - pub unsafe fn keywords(&self) -> Id, Shared> { - msg_send_id![self, keywords] - } - pub unsafe fn setKeywords(&self, keywords: &NSSet) { - msg_send![self, setKeywords: keywords] - } - pub unsafe fn supportsContinuationStreams(&self) -> bool { - msg_send![self, supportsContinuationStreams] - } - pub unsafe fn setSupportsContinuationStreams(&self, supportsContinuationStreams: bool) { - msg_send![ - self, - setSupportsContinuationStreams: supportsContinuationStreams - ] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSUserActivityDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn targetContentIdentifier(&self) -> Option> { - msg_send_id![self, targetContentIdentifier] - } - pub unsafe fn setTargetContentIdentifier(&self, targetContentIdentifier: Option<&NSString>) { - msg_send![self, setTargetContentIdentifier: targetContentIdentifier] - } - pub unsafe fn becomeCurrent(&self) { - msg_send![self, becomeCurrent] - } - pub unsafe fn resignCurrent(&self) { - msg_send![self, resignCurrent] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn getContinuationStreamsWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![ - self, - getContinuationStreamsWithCompletionHandler: completionHandler - ] - } - pub unsafe fn isEligibleForHandoff(&self) -> bool { - msg_send![self, isEligibleForHandoff] - } - pub unsafe fn setEligibleForHandoff(&self, eligibleForHandoff: bool) { - msg_send![self, setEligibleForHandoff: eligibleForHandoff] - } - pub unsafe fn isEligibleForSearch(&self) -> bool { - msg_send![self, isEligibleForSearch] - } - pub unsafe fn setEligibleForSearch(&self, eligibleForSearch: bool) { - msg_send![self, setEligibleForSearch: eligibleForSearch] - } - pub unsafe fn isEligibleForPublicIndexing(&self) -> bool { - msg_send![self, isEligibleForPublicIndexing] - } - pub unsafe fn setEligibleForPublicIndexing(&self, eligibleForPublicIndexing: bool) { - msg_send![ - self, - setEligibleForPublicIndexing: eligibleForPublicIndexing - ] - } - pub unsafe fn isEligibleForPrediction(&self) -> bool { - msg_send![self, isEligibleForPrediction] - } - pub unsafe fn setEligibleForPrediction(&self, eligibleForPrediction: bool) { - msg_send![self, setEligibleForPrediction: eligibleForPrediction] - } - pub unsafe fn persistentIdentifier( - &self, - ) -> Option> { - msg_send_id![self, persistentIdentifier] - } - pub unsafe fn setPersistentIdentifier( - &self, - persistentIdentifier: Option<&NSUserActivityPersistentIdentifier>, - ) { - msg_send![self, setPersistentIdentifier: persistentIdentifier] - } - pub unsafe fn deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler( - persistentIdentifiers: &NSArray, - handler: TodoBlock, - ) { - msg_send![ - Self::class(), - deleteSavedUserActivitiesWithPersistentIdentifiers: persistentIdentifiers, - completionHandler: handler - ] - } - pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: TodoBlock) { - msg_send![ - Self::class(), - deleteAllSavedUserActivitiesWithCompletionHandler: handler - ] - } -} +); pub type NSUserActivityDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index 1249337c6..edd08a5fa 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUserDefaults; @@ -17,142 +17,153 @@ extern_class!( type Super = NSObject; } ); -impl NSUserDefaults { - pub unsafe fn standardUserDefaults() -> Id { - msg_send_id![Self::class(), standardUserDefaults] +extern_methods!( + unsafe impl NSUserDefaults { + pub unsafe fn standardUserDefaults() -> Id { + msg_send_id![Self::class(), standardUserDefaults] + } + pub unsafe fn resetStandardUserDefaults() { + msg_send![Self::class(), resetStandardUserDefaults] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithSuiteName( + &self, + suitename: Option<&NSString>, + ) -> Option> { + msg_send_id![self, initWithSuiteName: suitename] + } + pub unsafe fn initWithUser(&self, username: &NSString) -> Option> { + msg_send_id![self, initWithUser: username] + } + pub unsafe fn objectForKey(&self, defaultName: &NSString) -> Option> { + msg_send_id![self, objectForKey: defaultName] + } + pub unsafe fn setObject_forKey(&self, value: Option<&Object>, defaultName: &NSString) { + msg_send![self, setObject: value, forKey: defaultName] + } + pub unsafe fn removeObjectForKey(&self, defaultName: &NSString) { + msg_send![self, removeObjectForKey: defaultName] + } + pub unsafe fn stringForKey(&self, defaultName: &NSString) -> Option> { + msg_send_id![self, stringForKey: defaultName] + } + pub unsafe fn arrayForKey(&self, defaultName: &NSString) -> Option> { + msg_send_id![self, arrayForKey: defaultName] + } + pub unsafe fn dictionaryForKey( + &self, + defaultName: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, dictionaryForKey: defaultName] + } + pub unsafe fn dataForKey(&self, defaultName: &NSString) -> Option> { + msg_send_id![self, dataForKey: defaultName] + } + pub unsafe fn stringArrayForKey( + &self, + defaultName: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, stringArrayForKey: defaultName] + } + pub unsafe fn integerForKey(&self, defaultName: &NSString) -> NSInteger { + msg_send![self, integerForKey: defaultName] + } + pub unsafe fn floatForKey(&self, defaultName: &NSString) -> c_float { + msg_send![self, floatForKey: defaultName] + } + pub unsafe fn doubleForKey(&self, defaultName: &NSString) -> c_double { + msg_send![self, doubleForKey: defaultName] + } + pub unsafe fn boolForKey(&self, defaultName: &NSString) -> bool { + msg_send![self, boolForKey: defaultName] + } + pub unsafe fn URLForKey(&self, defaultName: &NSString) -> Option> { + msg_send_id![self, URLForKey: defaultName] + } + pub unsafe fn setInteger_forKey(&self, value: NSInteger, defaultName: &NSString) { + msg_send![self, setInteger: value, forKey: defaultName] + } + pub unsafe fn setFloat_forKey(&self, value: c_float, defaultName: &NSString) { + msg_send![self, setFloat: value, forKey: defaultName] + } + pub unsafe fn setDouble_forKey(&self, value: c_double, defaultName: &NSString) { + msg_send![self, setDouble: value, forKey: defaultName] + } + pub unsafe fn setBool_forKey(&self, value: bool, defaultName: &NSString) { + msg_send![self, setBool: value, forKey: defaultName] + } + pub unsafe fn setURL_forKey(&self, url: Option<&NSURL>, defaultName: &NSString) { + msg_send![self, setURL: url, forKey: defaultName] + } + pub unsafe fn registerDefaults( + &self, + registrationDictionary: &NSDictionary, + ) { + msg_send![self, registerDefaults: registrationDictionary] + } + pub unsafe fn addSuiteNamed(&self, suiteName: &NSString) { + msg_send![self, addSuiteNamed: suiteName] + } + pub unsafe fn removeSuiteNamed(&self, suiteName: &NSString) { + msg_send![self, removeSuiteNamed: suiteName] + } + pub unsafe fn dictionaryRepresentation( + &self, + ) -> Id, Shared> { + msg_send_id![self, dictionaryRepresentation] + } + pub unsafe fn volatileDomainNames(&self) -> Id, Shared> { + msg_send_id![self, volatileDomainNames] + } + pub unsafe fn volatileDomainForName( + &self, + domainName: &NSString, + ) -> Id, Shared> { + msg_send_id![self, volatileDomainForName: domainName] + } + pub unsafe fn setVolatileDomain_forName( + &self, + domain: &NSDictionary, + domainName: &NSString, + ) { + msg_send![self, setVolatileDomain: domain, forName: domainName] + } + pub unsafe fn removeVolatileDomainForName(&self, domainName: &NSString) { + msg_send![self, removeVolatileDomainForName: domainName] + } + pub unsafe fn persistentDomainNames(&self) -> Id { + msg_send_id![self, persistentDomainNames] + } + pub unsafe fn persistentDomainForName( + &self, + domainName: &NSString, + ) -> Option, Shared>> { + msg_send_id![self, persistentDomainForName: domainName] + } + pub unsafe fn setPersistentDomain_forName( + &self, + domain: &NSDictionary, + domainName: &NSString, + ) { + msg_send![self, setPersistentDomain: domain, forName: domainName] + } + pub unsafe fn removePersistentDomainForName(&self, domainName: &NSString) { + msg_send![self, removePersistentDomainForName: domainName] + } + pub unsafe fn synchronize(&self) -> bool { + msg_send![self, synchronize] + } + pub unsafe fn objectIsForcedForKey(&self, key: &NSString) -> bool { + msg_send![self, objectIsForcedForKey: key] + } + pub unsafe fn objectIsForcedForKey_inDomain( + &self, + key: &NSString, + domain: &NSString, + ) -> bool { + msg_send![self, objectIsForcedForKey: key, inDomain: domain] + } } - pub unsafe fn resetStandardUserDefaults() { - msg_send![Self::class(), resetStandardUserDefaults] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithSuiteName( - &self, - suitename: Option<&NSString>, - ) -> Option> { - msg_send_id![self, initWithSuiteName: suitename] - } - pub unsafe fn initWithUser(&self, username: &NSString) -> Option> { - msg_send_id![self, initWithUser: username] - } - pub unsafe fn objectForKey(&self, defaultName: &NSString) -> Option> { - msg_send_id![self, objectForKey: defaultName] - } - pub unsafe fn setObject_forKey(&self, value: Option<&Object>, defaultName: &NSString) { - msg_send![self, setObject: value, forKey: defaultName] - } - pub unsafe fn removeObjectForKey(&self, defaultName: &NSString) { - msg_send![self, removeObjectForKey: defaultName] - } - pub unsafe fn stringForKey(&self, defaultName: &NSString) -> Option> { - msg_send_id![self, stringForKey: defaultName] - } - pub unsafe fn arrayForKey(&self, defaultName: &NSString) -> Option> { - msg_send_id![self, arrayForKey: defaultName] - } - pub unsafe fn dictionaryForKey( - &self, - defaultName: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, dictionaryForKey: defaultName] - } - pub unsafe fn dataForKey(&self, defaultName: &NSString) -> Option> { - msg_send_id![self, dataForKey: defaultName] - } - pub unsafe fn stringArrayForKey( - &self, - defaultName: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, stringArrayForKey: defaultName] - } - pub unsafe fn integerForKey(&self, defaultName: &NSString) -> NSInteger { - msg_send![self, integerForKey: defaultName] - } - pub unsafe fn floatForKey(&self, defaultName: &NSString) -> c_float { - msg_send![self, floatForKey: defaultName] - } - pub unsafe fn doubleForKey(&self, defaultName: &NSString) -> c_double { - msg_send![self, doubleForKey: defaultName] - } - pub unsafe fn boolForKey(&self, defaultName: &NSString) -> bool { - msg_send![self, boolForKey: defaultName] - } - pub unsafe fn URLForKey(&self, defaultName: &NSString) -> Option> { - msg_send_id![self, URLForKey: defaultName] - } - pub unsafe fn setInteger_forKey(&self, value: NSInteger, defaultName: &NSString) { - msg_send![self, setInteger: value, forKey: defaultName] - } - pub unsafe fn setFloat_forKey(&self, value: c_float, defaultName: &NSString) { - msg_send![self, setFloat: value, forKey: defaultName] - } - pub unsafe fn setDouble_forKey(&self, value: c_double, defaultName: &NSString) { - msg_send![self, setDouble: value, forKey: defaultName] - } - pub unsafe fn setBool_forKey(&self, value: bool, defaultName: &NSString) { - msg_send![self, setBool: value, forKey: defaultName] - } - pub unsafe fn setURL_forKey(&self, url: Option<&NSURL>, defaultName: &NSString) { - msg_send![self, setURL: url, forKey: defaultName] - } - pub unsafe fn registerDefaults(&self, registrationDictionary: &NSDictionary) { - msg_send![self, registerDefaults: registrationDictionary] - } - pub unsafe fn addSuiteNamed(&self, suiteName: &NSString) { - msg_send![self, addSuiteNamed: suiteName] - } - pub unsafe fn removeSuiteNamed(&self, suiteName: &NSString) { - msg_send![self, removeSuiteNamed: suiteName] - } - pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared> { - msg_send_id![self, dictionaryRepresentation] - } - pub unsafe fn volatileDomainNames(&self) -> Id, Shared> { - msg_send_id![self, volatileDomainNames] - } - pub unsafe fn volatileDomainForName( - &self, - domainName: &NSString, - ) -> Id, Shared> { - msg_send_id![self, volatileDomainForName: domainName] - } - pub unsafe fn setVolatileDomain_forName( - &self, - domain: &NSDictionary, - domainName: &NSString, - ) { - msg_send![self, setVolatileDomain: domain, forName: domainName] - } - pub unsafe fn removeVolatileDomainForName(&self, domainName: &NSString) { - msg_send![self, removeVolatileDomainForName: domainName] - } - pub unsafe fn persistentDomainNames(&self) -> Id { - msg_send_id![self, persistentDomainNames] - } - pub unsafe fn persistentDomainForName( - &self, - domainName: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, persistentDomainForName: domainName] - } - pub unsafe fn setPersistentDomain_forName( - &self, - domain: &NSDictionary, - domainName: &NSString, - ) { - msg_send![self, setPersistentDomain: domain, forName: domainName] - } - pub unsafe fn removePersistentDomainForName(&self, domainName: &NSString) { - msg_send![self, removePersistentDomainForName: domainName] - } - pub unsafe fn synchronize(&self) -> bool { - msg_send![self, synchronize] - } - pub unsafe fn objectIsForcedForKey(&self, key: &NSString) -> bool { - msg_send![self, objectIsForcedForKey: key] - } - pub unsafe fn objectIsForcedForKey_inDomain(&self, key: &NSString, domain: &NSString) -> bool { - msg_send![self, objectIsForcedForKey: key, inDomain: domain] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 50c863df6..5f729fcbb 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUserNotification; @@ -18,135 +18,137 @@ extern_class!( type Super = NSObject; } ); -impl NSUserNotification { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] +extern_methods!( + unsafe impl NSUserNotification { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn title(&self) -> Option> { + msg_send_id![self, title] + } + pub unsafe fn setTitle(&self, title: Option<&NSString>) { + msg_send![self, setTitle: title] + } + pub unsafe fn subtitle(&self) -> Option> { + msg_send_id![self, subtitle] + } + pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>) { + msg_send![self, setSubtitle: subtitle] + } + pub unsafe fn informativeText(&self) -> Option> { + msg_send_id![self, informativeText] + } + pub unsafe fn setInformativeText(&self, informativeText: Option<&NSString>) { + msg_send![self, setInformativeText: informativeText] + } + pub unsafe fn actionButtonTitle(&self) -> Id { + msg_send_id![self, actionButtonTitle] + } + pub unsafe fn setActionButtonTitle(&self, actionButtonTitle: &NSString) { + msg_send![self, setActionButtonTitle: actionButtonTitle] + } + pub unsafe fn userInfo(&self) -> Option, Shared>> { + msg_send_id![self, userInfo] + } + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { + msg_send![self, setUserInfo: userInfo] + } + pub unsafe fn deliveryDate(&self) -> Option> { + msg_send_id![self, deliveryDate] + } + pub unsafe fn setDeliveryDate(&self, deliveryDate: Option<&NSDate>) { + msg_send![self, setDeliveryDate: deliveryDate] + } + pub unsafe fn deliveryTimeZone(&self) -> Option> { + msg_send_id![self, deliveryTimeZone] + } + pub unsafe fn setDeliveryTimeZone(&self, deliveryTimeZone: Option<&NSTimeZone>) { + msg_send![self, setDeliveryTimeZone: deliveryTimeZone] + } + pub unsafe fn deliveryRepeatInterval(&self) -> Option> { + msg_send_id![self, deliveryRepeatInterval] + } + pub unsafe fn setDeliveryRepeatInterval( + &self, + deliveryRepeatInterval: Option<&NSDateComponents>, + ) { + msg_send![self, setDeliveryRepeatInterval: deliveryRepeatInterval] + } + pub unsafe fn actualDeliveryDate(&self) -> Option> { + msg_send_id![self, actualDeliveryDate] + } + pub unsafe fn isPresented(&self) -> bool { + msg_send![self, isPresented] + } + pub unsafe fn isRemote(&self) -> bool { + msg_send![self, isRemote] + } + pub unsafe fn soundName(&self) -> Option> { + msg_send_id![self, soundName] + } + pub unsafe fn setSoundName(&self, soundName: Option<&NSString>) { + msg_send![self, setSoundName: soundName] + } + pub unsafe fn hasActionButton(&self) -> bool { + msg_send![self, hasActionButton] + } + pub unsafe fn setHasActionButton(&self, hasActionButton: bool) { + msg_send![self, setHasActionButton: hasActionButton] + } + pub unsafe fn activationType(&self) -> NSUserNotificationActivationType { + msg_send![self, activationType] + } + pub unsafe fn otherButtonTitle(&self) -> Id { + msg_send_id![self, otherButtonTitle] + } + pub unsafe fn setOtherButtonTitle(&self, otherButtonTitle: &NSString) { + msg_send![self, setOtherButtonTitle: otherButtonTitle] + } + pub unsafe fn identifier(&self) -> Option> { + msg_send_id![self, identifier] + } + pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>) { + msg_send![self, setIdentifier: identifier] + } + pub unsafe fn contentImage(&self) -> Option> { + msg_send_id![self, contentImage] + } + pub unsafe fn setContentImage(&self, contentImage: Option<&NSImage>) { + msg_send![self, setContentImage: contentImage] + } + pub unsafe fn hasReplyButton(&self) -> bool { + msg_send![self, hasReplyButton] + } + pub unsafe fn setHasReplyButton(&self, hasReplyButton: bool) { + msg_send![self, setHasReplyButton: hasReplyButton] + } + pub unsafe fn responsePlaceholder(&self) -> Option> { + msg_send_id![self, responsePlaceholder] + } + pub unsafe fn setResponsePlaceholder(&self, responsePlaceholder: Option<&NSString>) { + msg_send![self, setResponsePlaceholder: responsePlaceholder] + } + pub unsafe fn response(&self) -> Option> { + msg_send_id![self, response] + } + pub unsafe fn additionalActions( + &self, + ) -> Option, Shared>> { + msg_send_id![self, additionalActions] + } + pub unsafe fn setAdditionalActions( + &self, + additionalActions: Option<&NSArray>, + ) { + msg_send![self, setAdditionalActions: additionalActions] + } + pub unsafe fn additionalActivationAction( + &self, + ) -> Option> { + msg_send_id![self, additionalActivationAction] + } } - pub unsafe fn title(&self) -> Option> { - msg_send_id![self, title] - } - pub unsafe fn setTitle(&self, title: Option<&NSString>) { - msg_send![self, setTitle: title] - } - pub unsafe fn subtitle(&self) -> Option> { - msg_send_id![self, subtitle] - } - pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>) { - msg_send![self, setSubtitle: subtitle] - } - pub unsafe fn informativeText(&self) -> Option> { - msg_send_id![self, informativeText] - } - pub unsafe fn setInformativeText(&self, informativeText: Option<&NSString>) { - msg_send![self, setInformativeText: informativeText] - } - pub unsafe fn actionButtonTitle(&self) -> Id { - msg_send_id![self, actionButtonTitle] - } - pub unsafe fn setActionButtonTitle(&self, actionButtonTitle: &NSString) { - msg_send![self, setActionButtonTitle: actionButtonTitle] - } - pub unsafe fn userInfo(&self) -> Option, Shared>> { - msg_send_id![self, userInfo] - } - pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { - msg_send![self, setUserInfo: userInfo] - } - pub unsafe fn deliveryDate(&self) -> Option> { - msg_send_id![self, deliveryDate] - } - pub unsafe fn setDeliveryDate(&self, deliveryDate: Option<&NSDate>) { - msg_send![self, setDeliveryDate: deliveryDate] - } - pub unsafe fn deliveryTimeZone(&self) -> Option> { - msg_send_id![self, deliveryTimeZone] - } - pub unsafe fn setDeliveryTimeZone(&self, deliveryTimeZone: Option<&NSTimeZone>) { - msg_send![self, setDeliveryTimeZone: deliveryTimeZone] - } - pub unsafe fn deliveryRepeatInterval(&self) -> Option> { - msg_send_id![self, deliveryRepeatInterval] - } - pub unsafe fn setDeliveryRepeatInterval( - &self, - deliveryRepeatInterval: Option<&NSDateComponents>, - ) { - msg_send![self, setDeliveryRepeatInterval: deliveryRepeatInterval] - } - pub unsafe fn actualDeliveryDate(&self) -> Option> { - msg_send_id![self, actualDeliveryDate] - } - pub unsafe fn isPresented(&self) -> bool { - msg_send![self, isPresented] - } - pub unsafe fn isRemote(&self) -> bool { - msg_send![self, isRemote] - } - pub unsafe fn soundName(&self) -> Option> { - msg_send_id![self, soundName] - } - pub unsafe fn setSoundName(&self, soundName: Option<&NSString>) { - msg_send![self, setSoundName: soundName] - } - pub unsafe fn hasActionButton(&self) -> bool { - msg_send![self, hasActionButton] - } - pub unsafe fn setHasActionButton(&self, hasActionButton: bool) { - msg_send![self, setHasActionButton: hasActionButton] - } - pub unsafe fn activationType(&self) -> NSUserNotificationActivationType { - msg_send![self, activationType] - } - pub unsafe fn otherButtonTitle(&self) -> Id { - msg_send_id![self, otherButtonTitle] - } - pub unsafe fn setOtherButtonTitle(&self, otherButtonTitle: &NSString) { - msg_send![self, setOtherButtonTitle: otherButtonTitle] - } - pub unsafe fn identifier(&self) -> Option> { - msg_send_id![self, identifier] - } - pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>) { - msg_send![self, setIdentifier: identifier] - } - pub unsafe fn contentImage(&self) -> Option> { - msg_send_id![self, contentImage] - } - pub unsafe fn setContentImage(&self, contentImage: Option<&NSImage>) { - msg_send![self, setContentImage: contentImage] - } - pub unsafe fn hasReplyButton(&self) -> bool { - msg_send![self, hasReplyButton] - } - pub unsafe fn setHasReplyButton(&self, hasReplyButton: bool) { - msg_send![self, setHasReplyButton: hasReplyButton] - } - pub unsafe fn responsePlaceholder(&self) -> Option> { - msg_send_id![self, responsePlaceholder] - } - pub unsafe fn setResponsePlaceholder(&self, responsePlaceholder: Option<&NSString>) { - msg_send![self, setResponsePlaceholder: responsePlaceholder] - } - pub unsafe fn response(&self) -> Option> { - msg_send_id![self, response] - } - pub unsafe fn additionalActions( - &self, - ) -> Option, Shared>> { - msg_send_id![self, additionalActions] - } - pub unsafe fn setAdditionalActions( - &self, - additionalActions: Option<&NSArray>, - ) { - msg_send![self, setAdditionalActions: additionalActions] - } - pub unsafe fn additionalActivationAction( - &self, - ) -> Option> { - msg_send_id![self, additionalActivationAction] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUserNotificationAction; @@ -154,24 +156,26 @@ extern_class!( type Super = NSObject; } ); -impl NSUserNotificationAction { - pub unsafe fn actionWithIdentifier_title( - identifier: Option<&NSString>, - title: Option<&NSString>, - ) -> Id { - msg_send_id![ - Self::class(), - actionWithIdentifier: identifier, - title: title - ] - } - pub unsafe fn identifier(&self) -> Option> { - msg_send_id![self, identifier] +extern_methods!( + unsafe impl NSUserNotificationAction { + pub unsafe fn actionWithIdentifier_title( + identifier: Option<&NSString>, + title: Option<&NSString>, + ) -> Id { + msg_send_id![ + Self::class(), + actionWithIdentifier: identifier, + title: title + ] + } + pub unsafe fn identifier(&self) -> Option> { + msg_send_id![self, identifier] + } + pub unsafe fn title(&self) -> Option> { + msg_send_id![self, title] + } } - pub unsafe fn title(&self) -> Option> { - msg_send_id![self, title] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUserNotificationCenter; @@ -179,42 +183,44 @@ extern_class!( type Super = NSObject; } ); -impl NSUserNotificationCenter { - pub unsafe fn defaultUserNotificationCenter() -> Id { - msg_send_id![Self::class(), defaultUserNotificationCenter] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSUserNotificationCenterDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn scheduledNotifications(&self) -> Id, Shared> { - msg_send_id![self, scheduledNotifications] - } - pub unsafe fn setScheduledNotifications( - &self, - scheduledNotifications: &NSArray, - ) { - msg_send![self, setScheduledNotifications: scheduledNotifications] - } - pub unsafe fn scheduleNotification(&self, notification: &NSUserNotification) { - msg_send![self, scheduleNotification: notification] +extern_methods!( + unsafe impl NSUserNotificationCenter { + pub unsafe fn defaultUserNotificationCenter() -> Id { + msg_send_id![Self::class(), defaultUserNotificationCenter] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSUserNotificationCenterDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn scheduledNotifications(&self) -> Id, Shared> { + msg_send_id![self, scheduledNotifications] + } + pub unsafe fn setScheduledNotifications( + &self, + scheduledNotifications: &NSArray, + ) { + msg_send![self, setScheduledNotifications: scheduledNotifications] + } + pub unsafe fn scheduleNotification(&self, notification: &NSUserNotification) { + msg_send![self, scheduleNotification: notification] + } + pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification) { + msg_send![self, removeScheduledNotification: notification] + } + pub unsafe fn deliveredNotifications(&self) -> Id, Shared> { + msg_send_id![self, deliveredNotifications] + } + pub unsafe fn deliverNotification(&self, notification: &NSUserNotification) { + msg_send![self, deliverNotification: notification] + } + pub unsafe fn removeDeliveredNotification(&self, notification: &NSUserNotification) { + msg_send![self, removeDeliveredNotification: notification] + } + pub unsafe fn removeAllDeliveredNotifications(&self) { + msg_send![self, removeAllDeliveredNotifications] + } } - pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification) { - msg_send![self, removeScheduledNotification: notification] - } - pub unsafe fn deliveredNotifications(&self) -> Id, Shared> { - msg_send_id![self, deliveredNotifications] - } - pub unsafe fn deliverNotification(&self, notification: &NSUserNotification) { - msg_send![self, deliverNotification: notification] - } - pub unsafe fn removeDeliveredNotification(&self, notification: &NSUserNotification) { - msg_send![self, removeDeliveredNotification: notification] - } - pub unsafe fn removeAllDeliveredNotifications(&self) { - msg_send![self, removeAllDeliveredNotifications] - } -} +); pub type NSUserNotificationCenterDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index 92dab5fa7..1e6d56d35 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUserScriptTask; @@ -18,20 +18,25 @@ extern_class!( type Super = NSObject; } ); -impl NSUserScriptTask { - pub unsafe fn initWithURL_error( - &self, - url: &NSURL, - ) -> Result, Id> { - msg_send_id![self, initWithURL: url, error: _] +extern_methods!( + unsafe impl NSUserScriptTask { + pub unsafe fn initWithURL_error( + &self, + url: &NSURL, + ) -> Result, Id> { + msg_send_id![self, initWithURL: url, error: _] + } + pub unsafe fn scriptURL(&self) -> Id { + msg_send_id![self, scriptURL] + } + pub unsafe fn executeWithCompletionHandler( + &self, + handler: NSUserScriptTaskCompletionHandler, + ) { + msg_send![self, executeWithCompletionHandler: handler] + } } - pub unsafe fn scriptURL(&self) -> Id { - msg_send_id![self, scriptURL] - } - pub unsafe fn executeWithCompletionHandler(&self, handler: NSUserScriptTaskCompletionHandler) { - msg_send![self, executeWithCompletionHandler: handler] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUserUnixTask; @@ -39,37 +44,39 @@ extern_class!( type Super = NSUserScriptTask; } ); -impl NSUserUnixTask { - pub unsafe fn standardInput(&self) -> Option> { - msg_send_id![self, standardInput] - } - pub unsafe fn setStandardInput(&self, standardInput: Option<&NSFileHandle>) { - msg_send![self, setStandardInput: standardInput] - } - pub unsafe fn standardOutput(&self) -> Option> { - msg_send_id![self, standardOutput] - } - pub unsafe fn setStandardOutput(&self, standardOutput: Option<&NSFileHandle>) { - msg_send![self, setStandardOutput: standardOutput] - } - pub unsafe fn standardError(&self) -> Option> { - msg_send_id![self, standardError] +extern_methods!( + unsafe impl NSUserUnixTask { + pub unsafe fn standardInput(&self) -> Option> { + msg_send_id![self, standardInput] + } + pub unsafe fn setStandardInput(&self, standardInput: Option<&NSFileHandle>) { + msg_send![self, setStandardInput: standardInput] + } + pub unsafe fn standardOutput(&self) -> Option> { + msg_send_id![self, standardOutput] + } + pub unsafe fn setStandardOutput(&self, standardOutput: Option<&NSFileHandle>) { + msg_send![self, setStandardOutput: standardOutput] + } + pub unsafe fn standardError(&self) -> Option> { + msg_send_id![self, standardError] + } + pub unsafe fn setStandardError(&self, standardError: Option<&NSFileHandle>) { + msg_send![self, setStandardError: standardError] + } + pub unsafe fn executeWithArguments_completionHandler( + &self, + arguments: Option<&NSArray>, + handler: NSUserUnixTaskCompletionHandler, + ) { + msg_send![ + self, + executeWithArguments: arguments, + completionHandler: handler + ] + } } - pub unsafe fn setStandardError(&self, standardError: Option<&NSFileHandle>) { - msg_send![self, setStandardError: standardError] - } - pub unsafe fn executeWithArguments_completionHandler( - &self, - arguments: Option<&NSArray>, - handler: NSUserUnixTaskCompletionHandler, - ) { - msg_send![ - self, - executeWithArguments: arguments, - completionHandler: handler - ] - } -} +); extern_class!( #[derive(Debug)] pub struct NSUserAppleScriptTask; @@ -77,19 +84,21 @@ extern_class!( type Super = NSUserScriptTask; } ); -impl NSUserAppleScriptTask { - pub unsafe fn executeWithAppleEvent_completionHandler( - &self, - event: Option<&NSAppleEventDescriptor>, - handler: NSUserAppleScriptTaskCompletionHandler, - ) { - msg_send![ - self, - executeWithAppleEvent: event, - completionHandler: handler - ] +extern_methods!( + unsafe impl NSUserAppleScriptTask { + pub unsafe fn executeWithAppleEvent_completionHandler( + &self, + event: Option<&NSAppleEventDescriptor>, + handler: NSUserAppleScriptTaskCompletionHandler, + ) { + msg_send![ + self, + executeWithAppleEvent: event, + completionHandler: handler + ] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSUserAutomatorTask; @@ -97,18 +106,20 @@ extern_class!( type Super = NSUserScriptTask; } ); -impl NSUserAutomatorTask { - pub unsafe fn variables(&self) -> Option, Shared>> { - msg_send_id![self, variables] +extern_methods!( + unsafe impl NSUserAutomatorTask { + pub unsafe fn variables(&self) -> Option, Shared>> { + msg_send_id![self, variables] + } + pub unsafe fn setVariables(&self, variables: Option<&NSDictionary>) { + msg_send![self, setVariables: variables] + } + pub unsafe fn executeWithInput_completionHandler( + &self, + input: Option<&NSSecureCoding>, + handler: NSUserAutomatorTaskCompletionHandler, + ) { + msg_send![self, executeWithInput: input, completionHandler: handler] + } } - pub unsafe fn setVariables(&self, variables: Option<&NSDictionary>) { - msg_send![self, setVariables: variables] - } - pub unsafe fn executeWithInput_completionHandler( - &self, - input: Option<&NSSecureCoding>, - handler: NSUserAutomatorTaskCompletionHandler, - ) { - msg_send![self, executeWithInput: input, completionHandler: handler] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index 0f470b920..6a72fd4f6 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSValue; @@ -12,57 +12,63 @@ extern_class!( type Super = NSObject; } ); -impl NSValue { - pub unsafe fn getValue_size(&self, value: NonNull, size: NSUInteger) { - msg_send![self, getValue: value, size: size] +extern_methods!( + unsafe impl NSValue { + pub unsafe fn getValue_size(&self, value: NonNull, size: NSUInteger) { + msg_send![self, getValue: value, size: size] + } + pub unsafe fn objCType(&self) -> NonNull { + msg_send![self, objCType] + } + pub unsafe fn initWithBytes_objCType( + &self, + value: NonNull, + type_: NonNull, + ) -> Id { + msg_send_id![self, initWithBytes: value, objCType: type_] + } + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } } - pub unsafe fn objCType(&self) -> NonNull { - msg_send![self, objCType] - } - pub unsafe fn initWithBytes_objCType( - &self, - value: NonNull, - type_: NonNull, - ) -> Id { - msg_send_id![self, initWithBytes: value, objCType: type_] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } -} -#[doc = "NSValueCreation"] -impl NSValue { - pub unsafe fn valueWithBytes_objCType( - value: NonNull, - type_: NonNull, - ) -> Id { - msg_send_id![Self::class(), valueWithBytes: value, objCType: type_] - } - pub unsafe fn value_withObjCType( - value: NonNull, - type_: NonNull, - ) -> Id { - msg_send_id![Self::class(), value: value, withObjCType: type_] - } -} -#[doc = "NSValueExtensionMethods"] -impl NSValue { - pub unsafe fn valueWithNonretainedObject(anObject: Option<&Object>) -> Id { - msg_send_id![Self::class(), valueWithNonretainedObject: anObject] - } - pub unsafe fn nonretainedObjectValue(&self) -> Option> { - msg_send_id![self, nonretainedObjectValue] - } - pub unsafe fn valueWithPointer(pointer: *mut c_void) -> Id { - msg_send_id![Self::class(), valueWithPointer: pointer] - } - pub unsafe fn pointerValue(&self) -> *mut c_void { - msg_send![self, pointerValue] +); +extern_methods!( + #[doc = "NSValueCreation"] + unsafe impl NSValue { + pub unsafe fn valueWithBytes_objCType( + value: NonNull, + type_: NonNull, + ) -> Id { + msg_send_id![Self::class(), valueWithBytes: value, objCType: type_] + } + pub unsafe fn value_withObjCType( + value: NonNull, + type_: NonNull, + ) -> Id { + msg_send_id![Self::class(), value: value, withObjCType: type_] + } } - pub unsafe fn isEqualToValue(&self, value: &NSValue) -> bool { - msg_send![self, isEqualToValue: value] +); +extern_methods!( + #[doc = "NSValueExtensionMethods"] + unsafe impl NSValue { + pub unsafe fn valueWithNonretainedObject(anObject: Option<&Object>) -> Id { + msg_send_id![Self::class(), valueWithNonretainedObject: anObject] + } + pub unsafe fn nonretainedObjectValue(&self) -> Option> { + msg_send_id![self, nonretainedObjectValue] + } + pub unsafe fn valueWithPointer(pointer: *mut c_void) -> Id { + msg_send_id![Self::class(), valueWithPointer: pointer] + } + pub unsafe fn pointerValue(&self) -> *mut c_void { + msg_send![self, pointerValue] + } + pub unsafe fn isEqualToValue(&self, value: &NSValue) -> bool { + msg_send![self, isEqualToValue: value] + } } -} +); extern_class!( #[derive(Debug)] pub struct NSNumber; @@ -70,164 +76,173 @@ extern_class!( type Super = NSValue; } ); -impl NSNumber { - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn initWithChar(&self, value: c_char) -> Id { - msg_send_id![self, initWithChar: value] - } - pub unsafe fn initWithUnsignedChar(&self, value: c_uchar) -> Id { - msg_send_id![self, initWithUnsignedChar: value] - } - pub unsafe fn initWithShort(&self, value: c_short) -> Id { - msg_send_id![self, initWithShort: value] - } - pub unsafe fn initWithUnsignedShort(&self, value: c_ushort) -> Id { - msg_send_id![self, initWithUnsignedShort: value] - } - pub unsafe fn initWithInt(&self, value: c_int) -> Id { - msg_send_id![self, initWithInt: value] - } - pub unsafe fn initWithUnsignedInt(&self, value: c_uint) -> Id { - msg_send_id![self, initWithUnsignedInt: value] - } - pub unsafe fn initWithLong(&self, value: c_long) -> Id { - msg_send_id![self, initWithLong: value] - } - pub unsafe fn initWithUnsignedLong(&self, value: c_ulong) -> Id { - msg_send_id![self, initWithUnsignedLong: value] - } - pub unsafe fn initWithLongLong(&self, value: c_longlong) -> Id { - msg_send_id![self, initWithLongLong: value] - } - pub unsafe fn initWithUnsignedLongLong(&self, value: c_ulonglong) -> Id { - msg_send_id![self, initWithUnsignedLongLong: value] - } - pub unsafe fn initWithFloat(&self, value: c_float) -> Id { - msg_send_id![self, initWithFloat: value] - } - pub unsafe fn initWithDouble(&self, value: c_double) -> Id { - msg_send_id![self, initWithDouble: value] - } - pub unsafe fn initWithBool(&self, value: bool) -> Id { - msg_send_id![self, initWithBool: value] - } - pub unsafe fn initWithInteger(&self, value: NSInteger) -> Id { - msg_send_id![self, initWithInteger: value] - } - pub unsafe fn initWithUnsignedInteger(&self, value: NSUInteger) -> Id { - msg_send_id![self, initWithUnsignedInteger: value] - } - pub unsafe fn charValue(&self) -> c_char { - msg_send![self, charValue] - } - pub unsafe fn unsignedCharValue(&self) -> c_uchar { - msg_send![self, unsignedCharValue] - } - pub unsafe fn shortValue(&self) -> c_short { - msg_send![self, shortValue] - } - pub unsafe fn unsignedShortValue(&self) -> c_ushort { - msg_send![self, unsignedShortValue] - } - pub unsafe fn intValue(&self) -> c_int { - msg_send![self, intValue] +extern_methods!( + unsafe impl NSNumber { + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { + msg_send_id![self, initWithCoder: coder] + } + pub unsafe fn initWithChar(&self, value: c_char) -> Id { + msg_send_id![self, initWithChar: value] + } + pub unsafe fn initWithUnsignedChar(&self, value: c_uchar) -> Id { + msg_send_id![self, initWithUnsignedChar: value] + } + pub unsafe fn initWithShort(&self, value: c_short) -> Id { + msg_send_id![self, initWithShort: value] + } + pub unsafe fn initWithUnsignedShort(&self, value: c_ushort) -> Id { + msg_send_id![self, initWithUnsignedShort: value] + } + pub unsafe fn initWithInt(&self, value: c_int) -> Id { + msg_send_id![self, initWithInt: value] + } + pub unsafe fn initWithUnsignedInt(&self, value: c_uint) -> Id { + msg_send_id![self, initWithUnsignedInt: value] + } + pub unsafe fn initWithLong(&self, value: c_long) -> Id { + msg_send_id![self, initWithLong: value] + } + pub unsafe fn initWithUnsignedLong(&self, value: c_ulong) -> Id { + msg_send_id![self, initWithUnsignedLong: value] + } + pub unsafe fn initWithLongLong(&self, value: c_longlong) -> Id { + msg_send_id![self, initWithLongLong: value] + } + pub unsafe fn initWithUnsignedLongLong(&self, value: c_ulonglong) -> Id { + msg_send_id![self, initWithUnsignedLongLong: value] + } + pub unsafe fn initWithFloat(&self, value: c_float) -> Id { + msg_send_id![self, initWithFloat: value] + } + pub unsafe fn initWithDouble(&self, value: c_double) -> Id { + msg_send_id![self, initWithDouble: value] + } + pub unsafe fn initWithBool(&self, value: bool) -> Id { + msg_send_id![self, initWithBool: value] + } + pub unsafe fn initWithInteger(&self, value: NSInteger) -> Id { + msg_send_id![self, initWithInteger: value] + } + pub unsafe fn initWithUnsignedInteger(&self, value: NSUInteger) -> Id { + msg_send_id![self, initWithUnsignedInteger: value] + } + pub unsafe fn charValue(&self) -> c_char { + msg_send![self, charValue] + } + pub unsafe fn unsignedCharValue(&self) -> c_uchar { + msg_send![self, unsignedCharValue] + } + pub unsafe fn shortValue(&self) -> c_short { + msg_send![self, shortValue] + } + pub unsafe fn unsignedShortValue(&self) -> c_ushort { + msg_send![self, unsignedShortValue] + } + pub unsafe fn intValue(&self) -> c_int { + msg_send![self, intValue] + } + pub unsafe fn unsignedIntValue(&self) -> c_uint { + msg_send![self, unsignedIntValue] + } + pub unsafe fn longValue(&self) -> c_long { + msg_send![self, longValue] + } + pub unsafe fn unsignedLongValue(&self) -> c_ulong { + msg_send![self, unsignedLongValue] + } + pub unsafe fn longLongValue(&self) -> c_longlong { + msg_send![self, longLongValue] + } + pub unsafe fn unsignedLongLongValue(&self) -> c_ulonglong { + msg_send![self, unsignedLongLongValue] + } + pub unsafe fn floatValue(&self) -> c_float { + msg_send![self, floatValue] + } + pub unsafe fn doubleValue(&self) -> c_double { + msg_send![self, doubleValue] + } + pub unsafe fn boolValue(&self) -> bool { + msg_send![self, boolValue] + } + pub unsafe fn integerValue(&self) -> NSInteger { + msg_send![self, integerValue] + } + pub unsafe fn unsignedIntegerValue(&self) -> NSUInteger { + msg_send![self, unsignedIntegerValue] + } + pub unsafe fn stringValue(&self) -> Id { + msg_send_id![self, stringValue] + } + pub unsafe fn compare(&self, otherNumber: &NSNumber) -> NSComparisonResult { + msg_send![self, compare: otherNumber] + } + pub unsafe fn isEqualToNumber(&self, number: &NSNumber) -> bool { + msg_send![self, isEqualToNumber: number] + } + pub unsafe fn descriptionWithLocale( + &self, + locale: Option<&Object>, + ) -> Id { + msg_send_id![self, descriptionWithLocale: locale] + } } - pub unsafe fn unsignedIntValue(&self) -> c_uint { - msg_send![self, unsignedIntValue] - } - pub unsafe fn longValue(&self) -> c_long { - msg_send![self, longValue] - } - pub unsafe fn unsignedLongValue(&self) -> c_ulong { - msg_send![self, unsignedLongValue] - } - pub unsafe fn longLongValue(&self) -> c_longlong { - msg_send![self, longLongValue] - } - pub unsafe fn unsignedLongLongValue(&self) -> c_ulonglong { - msg_send![self, unsignedLongLongValue] - } - pub unsafe fn floatValue(&self) -> c_float { - msg_send![self, floatValue] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } - pub unsafe fn boolValue(&self) -> bool { - msg_send![self, boolValue] - } - pub unsafe fn integerValue(&self) -> NSInteger { - msg_send![self, integerValue] - } - pub unsafe fn unsignedIntegerValue(&self) -> NSUInteger { - msg_send![self, unsignedIntegerValue] - } - pub unsafe fn stringValue(&self) -> Id { - msg_send_id![self, stringValue] - } - pub unsafe fn compare(&self, otherNumber: &NSNumber) -> NSComparisonResult { - msg_send![self, compare: otherNumber] - } - pub unsafe fn isEqualToNumber(&self, number: &NSNumber) -> bool { - msg_send![self, isEqualToNumber: number] - } - pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } -} -#[doc = "NSNumberCreation"] -impl NSNumber { - pub unsafe fn numberWithChar(value: c_char) -> Id { - msg_send_id![Self::class(), numberWithChar: value] - } - pub unsafe fn numberWithUnsignedChar(value: c_uchar) -> Id { - msg_send_id![Self::class(), numberWithUnsignedChar: value] - } - pub unsafe fn numberWithShort(value: c_short) -> Id { - msg_send_id![Self::class(), numberWithShort: value] - } - pub unsafe fn numberWithUnsignedShort(value: c_ushort) -> Id { - msg_send_id![Self::class(), numberWithUnsignedShort: value] - } - pub unsafe fn numberWithInt(value: c_int) -> Id { - msg_send_id![Self::class(), numberWithInt: value] - } - pub unsafe fn numberWithUnsignedInt(value: c_uint) -> Id { - msg_send_id![Self::class(), numberWithUnsignedInt: value] - } - pub unsafe fn numberWithLong(value: c_long) -> Id { - msg_send_id![Self::class(), numberWithLong: value] - } - pub unsafe fn numberWithUnsignedLong(value: c_ulong) -> Id { - msg_send_id![Self::class(), numberWithUnsignedLong: value] - } - pub unsafe fn numberWithLongLong(value: c_longlong) -> Id { - msg_send_id![Self::class(), numberWithLongLong: value] - } - pub unsafe fn numberWithUnsignedLongLong(value: c_ulonglong) -> Id { - msg_send_id![Self::class(), numberWithUnsignedLongLong: value] - } - pub unsafe fn numberWithFloat(value: c_float) -> Id { - msg_send_id![Self::class(), numberWithFloat: value] - } - pub unsafe fn numberWithDouble(value: c_double) -> Id { - msg_send_id![Self::class(), numberWithDouble: value] - } - pub unsafe fn numberWithBool(value: bool) -> Id { - msg_send_id![Self::class(), numberWithBool: value] - } - pub unsafe fn numberWithInteger(value: NSInteger) -> Id { - msg_send_id![Self::class(), numberWithInteger: value] - } - pub unsafe fn numberWithUnsignedInteger(value: NSUInteger) -> Id { - msg_send_id![Self::class(), numberWithUnsignedInteger: value] +); +extern_methods!( + #[doc = "NSNumberCreation"] + unsafe impl NSNumber { + pub unsafe fn numberWithChar(value: c_char) -> Id { + msg_send_id![Self::class(), numberWithChar: value] + } + pub unsafe fn numberWithUnsignedChar(value: c_uchar) -> Id { + msg_send_id![Self::class(), numberWithUnsignedChar: value] + } + pub unsafe fn numberWithShort(value: c_short) -> Id { + msg_send_id![Self::class(), numberWithShort: value] + } + pub unsafe fn numberWithUnsignedShort(value: c_ushort) -> Id { + msg_send_id![Self::class(), numberWithUnsignedShort: value] + } + pub unsafe fn numberWithInt(value: c_int) -> Id { + msg_send_id![Self::class(), numberWithInt: value] + } + pub unsafe fn numberWithUnsignedInt(value: c_uint) -> Id { + msg_send_id![Self::class(), numberWithUnsignedInt: value] + } + pub unsafe fn numberWithLong(value: c_long) -> Id { + msg_send_id![Self::class(), numberWithLong: value] + } + pub unsafe fn numberWithUnsignedLong(value: c_ulong) -> Id { + msg_send_id![Self::class(), numberWithUnsignedLong: value] + } + pub unsafe fn numberWithLongLong(value: c_longlong) -> Id { + msg_send_id![Self::class(), numberWithLongLong: value] + } + pub unsafe fn numberWithUnsignedLongLong(value: c_ulonglong) -> Id { + msg_send_id![Self::class(), numberWithUnsignedLongLong: value] + } + pub unsafe fn numberWithFloat(value: c_float) -> Id { + msg_send_id![Self::class(), numberWithFloat: value] + } + pub unsafe fn numberWithDouble(value: c_double) -> Id { + msg_send_id![Self::class(), numberWithDouble: value] + } + pub unsafe fn numberWithBool(value: bool) -> Id { + msg_send_id![Self::class(), numberWithBool: value] + } + pub unsafe fn numberWithInteger(value: NSInteger) -> Id { + msg_send_id![Self::class(), numberWithInteger: value] + } + pub unsafe fn numberWithUnsignedInteger(value: NSUInteger) -> Id { + msg_send_id![Self::class(), numberWithUnsignedInteger: value] + } } -} -#[doc = "NSDeprecated"] -impl NSValue { - pub unsafe fn getValue(&self, value: NonNull) { - msg_send![self, getValue: value] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSValue { + pub unsafe fn getValue(&self, value: NonNull) { + msg_send![self, getValue: value] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index f786e5346..15d75d40d 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSValueTransformerName = NSString; extern_class!( #[derive(Debug)] @@ -13,41 +13,46 @@ extern_class!( type Super = NSObject; } ); -impl NSValueTransformer { - pub unsafe fn setValueTransformer_forName( - transformer: Option<&NSValueTransformer>, - name: &NSValueTransformerName, - ) { - msg_send![ - Self::class(), - setValueTransformer: transformer, - forName: name - ] +extern_methods!( + unsafe impl NSValueTransformer { + pub unsafe fn setValueTransformer_forName( + transformer: Option<&NSValueTransformer>, + name: &NSValueTransformerName, + ) { + msg_send![ + Self::class(), + setValueTransformer: transformer, + forName: name + ] + } + pub unsafe fn valueTransformerForName( + name: &NSValueTransformerName, + ) -> Option> { + msg_send_id![Self::class(), valueTransformerForName: name] + } + pub unsafe fn valueTransformerNames() -> Id, Shared> { + msg_send_id![Self::class(), valueTransformerNames] + } + pub unsafe fn transformedValueClass() -> &Class { + msg_send![Self::class(), transformedValueClass] + } + pub unsafe fn allowsReverseTransformation() -> bool { + msg_send![Self::class(), allowsReverseTransformation] + } + pub unsafe fn transformedValue( + &self, + value: Option<&Object>, + ) -> Option> { + msg_send_id![self, transformedValue: value] + } + pub unsafe fn reverseTransformedValue( + &self, + value: Option<&Object>, + ) -> Option> { + msg_send_id![self, reverseTransformedValue: value] + } } - pub unsafe fn valueTransformerForName( - name: &NSValueTransformerName, - ) -> Option> { - msg_send_id![Self::class(), valueTransformerForName: name] - } - pub unsafe fn valueTransformerNames() -> Id, Shared> { - msg_send_id![Self::class(), valueTransformerNames] - } - pub unsafe fn transformedValueClass() -> &Class { - msg_send![Self::class(), transformedValueClass] - } - pub unsafe fn allowsReverseTransformation() -> bool { - msg_send![Self::class(), allowsReverseTransformation] - } - pub unsafe fn transformedValue(&self, value: Option<&Object>) -> Option> { - msg_send_id![self, transformedValue: value] - } - pub unsafe fn reverseTransformedValue( - &self, - value: Option<&Object>, - ) -> Option> { - msg_send_id![self, reverseTransformedValue: value] - } -} +); extern_class!( #[derive(Debug)] pub struct NSSecureUnarchiveFromDataTransformer; @@ -55,8 +60,10 @@ extern_class!( type Super = NSValueTransformer; } ); -impl NSSecureUnarchiveFromDataTransformer { - pub unsafe fn allowedTopLevelClasses() -> Id, Shared> { - msg_send_id![Self::class(), allowedTopLevelClasses] +extern_methods!( + unsafe impl NSSecureUnarchiveFromDataTransformer { + pub unsafe fn allowedTopLevelClasses() -> Id, Shared> { + msg_send_id![Self::class(), allowedTopLevelClasses] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index ae550bb1d..dfe7d0d23 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLDTD; @@ -14,93 +14,99 @@ extern_class!( type Super = NSXMLNode; } ); -impl NSXMLDTD { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] +extern_methods!( + unsafe impl NSXMLDTD { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithKind_options( + &self, + kind: NSXMLNodeKind, + options: NSXMLNodeOptions, + ) -> Id { + msg_send_id![self, initWithKind: kind, options: options] + } + pub unsafe fn initWithContentsOfURL_options_error( + &self, + url: &NSURL, + mask: NSXMLNodeOptions, + ) -> Result, Id> { + msg_send_id![self, initWithContentsOfURL: url, options: mask, error: _] + } + pub unsafe fn initWithData_options_error( + &self, + data: &NSData, + mask: NSXMLNodeOptions, + ) -> Result, Id> { + msg_send_id![self, initWithData: data, options: mask, error: _] + } + pub unsafe fn publicID(&self) -> Option> { + msg_send_id![self, publicID] + } + pub unsafe fn setPublicID(&self, publicID: Option<&NSString>) { + msg_send![self, setPublicID: publicID] + } + pub unsafe fn systemID(&self) -> Option> { + msg_send_id![self, systemID] + } + pub unsafe fn setSystemID(&self, systemID: Option<&NSString>) { + msg_send![self, setSystemID: systemID] + } + pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { + msg_send![self, insertChild: child, atIndex: index] + } + pub unsafe fn insertChildren_atIndex( + &self, + children: &NSArray, + index: NSUInteger, + ) { + msg_send![self, insertChildren: children, atIndex: index] + } + pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { + msg_send![self, removeChildAtIndex: index] + } + pub unsafe fn setChildren(&self, children: Option<&NSArray>) { + msg_send![self, setChildren: children] + } + pub unsafe fn addChild(&self, child: &NSXMLNode) { + msg_send![self, addChild: child] + } + pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { + msg_send![self, replaceChildAtIndex: index, withNode: node] + } + pub unsafe fn entityDeclarationForName( + &self, + name: &NSString, + ) -> Option> { + msg_send_id![self, entityDeclarationForName: name] + } + pub unsafe fn notationDeclarationForName( + &self, + name: &NSString, + ) -> Option> { + msg_send_id![self, notationDeclarationForName: name] + } + pub unsafe fn elementDeclarationForName( + &self, + name: &NSString, + ) -> Option> { + msg_send_id![self, elementDeclarationForName: name] + } + pub unsafe fn attributeDeclarationForName_elementName( + &self, + name: &NSString, + elementName: &NSString, + ) -> Option> { + msg_send_id![ + self, + attributeDeclarationForName: name, + elementName: elementName + ] + } + pub unsafe fn predefinedEntityDeclarationForName( + name: &NSString, + ) -> Option> { + msg_send_id![Self::class(), predefinedEntityDeclarationForName: name] + } } - pub unsafe fn initWithKind_options( - &self, - kind: NSXMLNodeKind, - options: NSXMLNodeOptions, - ) -> Id { - msg_send_id![self, initWithKind: kind, options: options] - } - pub unsafe fn initWithContentsOfURL_options_error( - &self, - url: &NSURL, - mask: NSXMLNodeOptions, - ) -> Result, Id> { - msg_send_id![self, initWithContentsOfURL: url, options: mask, error: _] - } - pub unsafe fn initWithData_options_error( - &self, - data: &NSData, - mask: NSXMLNodeOptions, - ) -> Result, Id> { - msg_send_id![self, initWithData: data, options: mask, error: _] - } - pub unsafe fn publicID(&self) -> Option> { - msg_send_id![self, publicID] - } - pub unsafe fn setPublicID(&self, publicID: Option<&NSString>) { - msg_send![self, setPublicID: publicID] - } - pub unsafe fn systemID(&self) -> Option> { - msg_send_id![self, systemID] - } - pub unsafe fn setSystemID(&self, systemID: Option<&NSString>) { - msg_send![self, setSystemID: systemID] - } - pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { - msg_send![self, insertChild: child, atIndex: index] - } - pub unsafe fn insertChildren_atIndex(&self, children: &NSArray, index: NSUInteger) { - msg_send![self, insertChildren: children, atIndex: index] - } - pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { - msg_send![self, removeChildAtIndex: index] - } - pub unsafe fn setChildren(&self, children: Option<&NSArray>) { - msg_send![self, setChildren: children] - } - pub unsafe fn addChild(&self, child: &NSXMLNode) { - msg_send![self, addChild: child] - } - pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { - msg_send![self, replaceChildAtIndex: index, withNode: node] - } - pub unsafe fn entityDeclarationForName( - &self, - name: &NSString, - ) -> Option> { - msg_send_id![self, entityDeclarationForName: name] - } - pub unsafe fn notationDeclarationForName( - &self, - name: &NSString, - ) -> Option> { - msg_send_id![self, notationDeclarationForName: name] - } - pub unsafe fn elementDeclarationForName( - &self, - name: &NSString, - ) -> Option> { - msg_send_id![self, elementDeclarationForName: name] - } - pub unsafe fn attributeDeclarationForName_elementName( - &self, - name: &NSString, - elementName: &NSString, - ) -> Option> { - msg_send_id![ - self, - attributeDeclarationForName: name, - elementName: elementName - ] - } - pub unsafe fn predefinedEntityDeclarationForName( - name: &NSString, - ) -> Option> { - msg_send_id![Self::class(), predefinedEntityDeclarationForName: name] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index c4c0a2887..bca0d727d 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLDTDNode; @@ -10,45 +10,47 @@ extern_class!( type Super = NSXMLNode; } ); -impl NSXMLDTDNode { - pub unsafe fn initWithXMLString(&self, string: &NSString) -> Option> { - msg_send_id![self, initWithXMLString: string] +extern_methods!( + unsafe impl NSXMLDTDNode { + pub unsafe fn initWithXMLString(&self, string: &NSString) -> Option> { + msg_send_id![self, initWithXMLString: string] + } + pub unsafe fn initWithKind_options( + &self, + kind: NSXMLNodeKind, + options: NSXMLNodeOptions, + ) -> Id { + msg_send_id![self, initWithKind: kind, options: options] + } + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn DTDKind(&self) -> NSXMLDTDNodeKind { + msg_send![self, DTDKind] + } + pub unsafe fn setDTDKind(&self, DTDKind: NSXMLDTDNodeKind) { + msg_send![self, setDTDKind: DTDKind] + } + pub unsafe fn isExternal(&self) -> bool { + msg_send![self, isExternal] + } + pub unsafe fn publicID(&self) -> Option> { + msg_send_id![self, publicID] + } + pub unsafe fn setPublicID(&self, publicID: Option<&NSString>) { + msg_send![self, setPublicID: publicID] + } + pub unsafe fn systemID(&self) -> Option> { + msg_send_id![self, systemID] + } + pub unsafe fn setSystemID(&self, systemID: Option<&NSString>) { + msg_send![self, setSystemID: systemID] + } + pub unsafe fn notationName(&self) -> Option> { + msg_send_id![self, notationName] + } + pub unsafe fn setNotationName(&self, notationName: Option<&NSString>) { + msg_send![self, setNotationName: notationName] + } } - pub unsafe fn initWithKind_options( - &self, - kind: NSXMLNodeKind, - options: NSXMLNodeOptions, - ) -> Id { - msg_send_id![self, initWithKind: kind, options: options] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn DTDKind(&self) -> NSXMLDTDNodeKind { - msg_send![self, DTDKind] - } - pub unsafe fn setDTDKind(&self, DTDKind: NSXMLDTDNodeKind) { - msg_send![self, setDTDKind: DTDKind] - } - pub unsafe fn isExternal(&self) -> bool { - msg_send![self, isExternal] - } - pub unsafe fn publicID(&self) -> Option> { - msg_send_id![self, publicID] - } - pub unsafe fn setPublicID(&self, publicID: Option<&NSString>) { - msg_send![self, setPublicID: publicID] - } - pub unsafe fn systemID(&self) -> Option> { - msg_send_id![self, systemID] - } - pub unsafe fn setSystemID(&self, systemID: Option<&NSString>) { - msg_send![self, setSystemID: systemID] - } - pub unsafe fn notationName(&self) -> Option> { - msg_send_id![self, notationName] - } - pub unsafe fn setNotationName(&self, notationName: Option<&NSString>) { - msg_send![self, setNotationName: notationName] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index 26cf5d315..6bd2b392b 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLDocument; @@ -14,140 +14,149 @@ extern_class!( type Super = NSXMLNode; } ); -impl NSXMLDocument { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] +extern_methods!( + unsafe impl NSXMLDocument { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithXMLString_options_error( + &self, + string: &NSString, + mask: NSXMLNodeOptions, + ) -> Result, Id> { + msg_send_id![self, initWithXMLString: string, options: mask, error: _] + } + pub unsafe fn initWithContentsOfURL_options_error( + &self, + url: &NSURL, + mask: NSXMLNodeOptions, + ) -> Result, Id> { + msg_send_id![self, initWithContentsOfURL: url, options: mask, error: _] + } + pub unsafe fn initWithData_options_error( + &self, + data: &NSData, + mask: NSXMLNodeOptions, + ) -> Result, Id> { + msg_send_id![self, initWithData: data, options: mask, error: _] + } + pub unsafe fn initWithRootElement( + &self, + element: Option<&NSXMLElement>, + ) -> Id { + msg_send_id![self, initWithRootElement: element] + } + pub unsafe fn replacementClassForClass(cls: &Class) -> &Class { + msg_send![Self::class(), replacementClassForClass: cls] + } + pub unsafe fn characterEncoding(&self) -> Option> { + msg_send_id![self, characterEncoding] + } + pub unsafe fn setCharacterEncoding(&self, characterEncoding: Option<&NSString>) { + msg_send![self, setCharacterEncoding: characterEncoding] + } + pub unsafe fn version(&self) -> Option> { + msg_send_id![self, version] + } + pub unsafe fn setVersion(&self, version: Option<&NSString>) { + msg_send![self, setVersion: version] + } + pub unsafe fn isStandalone(&self) -> bool { + msg_send![self, isStandalone] + } + pub unsafe fn setStandalone(&self, standalone: bool) { + msg_send![self, setStandalone: standalone] + } + pub unsafe fn documentContentKind(&self) -> NSXMLDocumentContentKind { + msg_send![self, documentContentKind] + } + pub unsafe fn setDocumentContentKind(&self, documentContentKind: NSXMLDocumentContentKind) { + msg_send![self, setDocumentContentKind: documentContentKind] + } + pub unsafe fn MIMEType(&self) -> Option> { + msg_send_id![self, MIMEType] + } + pub unsafe fn setMIMEType(&self, MIMEType: Option<&NSString>) { + msg_send![self, setMIMEType: MIMEType] + } + pub unsafe fn DTD(&self) -> Option> { + msg_send_id![self, DTD] + } + pub unsafe fn setDTD(&self, DTD: Option<&NSXMLDTD>) { + msg_send![self, setDTD: DTD] + } + pub unsafe fn setRootElement(&self, root: &NSXMLElement) { + msg_send![self, setRootElement: root] + } + pub unsafe fn rootElement(&self) -> Option> { + msg_send_id![self, rootElement] + } + pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { + msg_send![self, insertChild: child, atIndex: index] + } + pub unsafe fn insertChildren_atIndex( + &self, + children: &NSArray, + index: NSUInteger, + ) { + msg_send![self, insertChildren: children, atIndex: index] + } + pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { + msg_send![self, removeChildAtIndex: index] + } + pub unsafe fn setChildren(&self, children: Option<&NSArray>) { + msg_send![self, setChildren: children] + } + pub unsafe fn addChild(&self, child: &NSXMLNode) { + msg_send![self, addChild: child] + } + pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { + msg_send![self, replaceChildAtIndex: index, withNode: node] + } + pub unsafe fn XMLData(&self) -> Id { + msg_send_id![self, XMLData] + } + pub unsafe fn XMLDataWithOptions(&self, options: NSXMLNodeOptions) -> Id { + msg_send_id![self, XMLDataWithOptions: options] + } + pub unsafe fn objectByApplyingXSLT_arguments_error( + &self, + xslt: &NSData, + arguments: Option<&NSDictionary>, + ) -> Result, Id> { + msg_send_id![ + self, + objectByApplyingXSLT: xslt, + arguments: arguments, + error: _ + ] + } + pub unsafe fn objectByApplyingXSLTString_arguments_error( + &self, + xslt: &NSString, + arguments: Option<&NSDictionary>, + ) -> Result, Id> { + msg_send_id![ + self, + objectByApplyingXSLTString: xslt, + arguments: arguments, + error: _ + ] + } + pub unsafe fn objectByApplyingXSLTAtURL_arguments_error( + &self, + xsltURL: &NSURL, + argument: Option<&NSDictionary>, + ) -> Result, Id> { + msg_send_id![ + self, + objectByApplyingXSLTAtURL: xsltURL, + arguments: argument, + error: _ + ] + } + pub unsafe fn validateAndReturnError(&self) -> Result<(), Id> { + msg_send![self, validateAndReturnError: _] + } } - pub unsafe fn initWithXMLString_options_error( - &self, - string: &NSString, - mask: NSXMLNodeOptions, - ) -> Result, Id> { - msg_send_id![self, initWithXMLString: string, options: mask, error: _] - } - pub unsafe fn initWithContentsOfURL_options_error( - &self, - url: &NSURL, - mask: NSXMLNodeOptions, - ) -> Result, Id> { - msg_send_id![self, initWithContentsOfURL: url, options: mask, error: _] - } - pub unsafe fn initWithData_options_error( - &self, - data: &NSData, - mask: NSXMLNodeOptions, - ) -> Result, Id> { - msg_send_id![self, initWithData: data, options: mask, error: _] - } - pub unsafe fn initWithRootElement(&self, element: Option<&NSXMLElement>) -> Id { - msg_send_id![self, initWithRootElement: element] - } - pub unsafe fn replacementClassForClass(cls: &Class) -> &Class { - msg_send![Self::class(), replacementClassForClass: cls] - } - pub unsafe fn characterEncoding(&self) -> Option> { - msg_send_id![self, characterEncoding] - } - pub unsafe fn setCharacterEncoding(&self, characterEncoding: Option<&NSString>) { - msg_send![self, setCharacterEncoding: characterEncoding] - } - pub unsafe fn version(&self) -> Option> { - msg_send_id![self, version] - } - pub unsafe fn setVersion(&self, version: Option<&NSString>) { - msg_send![self, setVersion: version] - } - pub unsafe fn isStandalone(&self) -> bool { - msg_send![self, isStandalone] - } - pub unsafe fn setStandalone(&self, standalone: bool) { - msg_send![self, setStandalone: standalone] - } - pub unsafe fn documentContentKind(&self) -> NSXMLDocumentContentKind { - msg_send![self, documentContentKind] - } - pub unsafe fn setDocumentContentKind(&self, documentContentKind: NSXMLDocumentContentKind) { - msg_send![self, setDocumentContentKind: documentContentKind] - } - pub unsafe fn MIMEType(&self) -> Option> { - msg_send_id![self, MIMEType] - } - pub unsafe fn setMIMEType(&self, MIMEType: Option<&NSString>) { - msg_send![self, setMIMEType: MIMEType] - } - pub unsafe fn DTD(&self) -> Option> { - msg_send_id![self, DTD] - } - pub unsafe fn setDTD(&self, DTD: Option<&NSXMLDTD>) { - msg_send![self, setDTD: DTD] - } - pub unsafe fn setRootElement(&self, root: &NSXMLElement) { - msg_send![self, setRootElement: root] - } - pub unsafe fn rootElement(&self) -> Option> { - msg_send_id![self, rootElement] - } - pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { - msg_send![self, insertChild: child, atIndex: index] - } - pub unsafe fn insertChildren_atIndex(&self, children: &NSArray, index: NSUInteger) { - msg_send![self, insertChildren: children, atIndex: index] - } - pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { - msg_send![self, removeChildAtIndex: index] - } - pub unsafe fn setChildren(&self, children: Option<&NSArray>) { - msg_send![self, setChildren: children] - } - pub unsafe fn addChild(&self, child: &NSXMLNode) { - msg_send![self, addChild: child] - } - pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { - msg_send![self, replaceChildAtIndex: index, withNode: node] - } - pub unsafe fn XMLData(&self) -> Id { - msg_send_id![self, XMLData] - } - pub unsafe fn XMLDataWithOptions(&self, options: NSXMLNodeOptions) -> Id { - msg_send_id![self, XMLDataWithOptions: options] - } - pub unsafe fn objectByApplyingXSLT_arguments_error( - &self, - xslt: &NSData, - arguments: Option<&NSDictionary>, - ) -> Result, Id> { - msg_send_id![ - self, - objectByApplyingXSLT: xslt, - arguments: arguments, - error: _ - ] - } - pub unsafe fn objectByApplyingXSLTString_arguments_error( - &self, - xslt: &NSString, - arguments: Option<&NSDictionary>, - ) -> Result, Id> { - msg_send_id![ - self, - objectByApplyingXSLTString: xslt, - arguments: arguments, - error: _ - ] - } - pub unsafe fn objectByApplyingXSLTAtURL_arguments_error( - &self, - xsltURL: &NSURL, - argument: Option<&NSDictionary>, - ) -> Result, Id> { - msg_send_id![ - self, - objectByApplyingXSLTAtURL: xsltURL, - arguments: argument, - error: _ - ] - } - pub unsafe fn validateAndReturnError(&self) -> Result<(), Id> { - msg_send![self, validateAndReturnError: _] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index 8ddaf111e..e52ced552 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLElement; @@ -15,124 +15,135 @@ extern_class!( type Super = NSXMLNode; } ); -impl NSXMLElement { - pub unsafe fn initWithName(&self, name: &NSString) -> Id { - msg_send_id![self, initWithName: name] +extern_methods!( + unsafe impl NSXMLElement { + pub unsafe fn initWithName(&self, name: &NSString) -> Id { + msg_send_id![self, initWithName: name] + } + pub unsafe fn initWithName_URI( + &self, + name: &NSString, + URI: Option<&NSString>, + ) -> Id { + msg_send_id![self, initWithName: name, URI: URI] + } + pub unsafe fn initWithName_stringValue( + &self, + name: &NSString, + string: Option<&NSString>, + ) -> Id { + msg_send_id![self, initWithName: name, stringValue: string] + } + pub unsafe fn initWithXMLString_error( + &self, + string: &NSString, + ) -> Result, Id> { + msg_send_id![self, initWithXMLString: string, error: _] + } + pub unsafe fn initWithKind_options( + &self, + kind: NSXMLNodeKind, + options: NSXMLNodeOptions, + ) -> Id { + msg_send_id![self, initWithKind: kind, options: options] + } + pub unsafe fn elementsForName(&self, name: &NSString) -> Id, Shared> { + msg_send_id![self, elementsForName: name] + } + pub unsafe fn elementsForLocalName_URI( + &self, + localName: &NSString, + URI: Option<&NSString>, + ) -> Id, Shared> { + msg_send_id![self, elementsForLocalName: localName, URI: URI] + } + pub unsafe fn addAttribute(&self, attribute: &NSXMLNode) { + msg_send![self, addAttribute: attribute] + } + pub unsafe fn removeAttributeForName(&self, name: &NSString) { + msg_send![self, removeAttributeForName: name] + } + pub unsafe fn attributes(&self) -> Option, Shared>> { + msg_send_id![self, attributes] + } + pub unsafe fn setAttributes(&self, attributes: Option<&NSArray>) { + msg_send![self, setAttributes: attributes] + } + pub unsafe fn setAttributesWithDictionary( + &self, + attributes: &NSDictionary, + ) { + msg_send![self, setAttributesWithDictionary: attributes] + } + pub unsafe fn attributeForName(&self, name: &NSString) -> Option> { + msg_send_id![self, attributeForName: name] + } + pub unsafe fn attributeForLocalName_URI( + &self, + localName: &NSString, + URI: Option<&NSString>, + ) -> Option> { + msg_send_id![self, attributeForLocalName: localName, URI: URI] + } + pub unsafe fn addNamespace(&self, aNamespace: &NSXMLNode) { + msg_send![self, addNamespace: aNamespace] + } + pub unsafe fn removeNamespaceForPrefix(&self, name: &NSString) { + msg_send![self, removeNamespaceForPrefix: name] + } + pub unsafe fn namespaces(&self) -> Option, Shared>> { + msg_send_id![self, namespaces] + } + pub unsafe fn setNamespaces(&self, namespaces: Option<&NSArray>) { + msg_send![self, setNamespaces: namespaces] + } + pub unsafe fn namespaceForPrefix(&self, name: &NSString) -> Option> { + msg_send_id![self, namespaceForPrefix: name] + } + pub unsafe fn resolveNamespaceForName( + &self, + name: &NSString, + ) -> Option> { + msg_send_id![self, resolveNamespaceForName: name] + } + pub unsafe fn resolvePrefixForNamespaceURI( + &self, + namespaceURI: &NSString, + ) -> Option> { + msg_send_id![self, resolvePrefixForNamespaceURI: namespaceURI] + } + pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { + msg_send![self, insertChild: child, atIndex: index] + } + pub unsafe fn insertChildren_atIndex( + &self, + children: &NSArray, + index: NSUInteger, + ) { + msg_send![self, insertChildren: children, atIndex: index] + } + pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { + msg_send![self, removeChildAtIndex: index] + } + pub unsafe fn setChildren(&self, children: Option<&NSArray>) { + msg_send![self, setChildren: children] + } + pub unsafe fn addChild(&self, child: &NSXMLNode) { + msg_send![self, addChild: child] + } + pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { + msg_send![self, replaceChildAtIndex: index, withNode: node] + } + pub unsafe fn normalizeAdjacentTextNodesPreservingCDATA(&self, preserve: bool) { + msg_send![self, normalizeAdjacentTextNodesPreservingCDATA: preserve] + } } - pub unsafe fn initWithName_URI( - &self, - name: &NSString, - URI: Option<&NSString>, - ) -> Id { - msg_send_id![self, initWithName: name, URI: URI] - } - pub unsafe fn initWithName_stringValue( - &self, - name: &NSString, - string: Option<&NSString>, - ) -> Id { - msg_send_id![self, initWithName: name, stringValue: string] - } - pub unsafe fn initWithXMLString_error( - &self, - string: &NSString, - ) -> Result, Id> { - msg_send_id![self, initWithXMLString: string, error: _] - } - pub unsafe fn initWithKind_options( - &self, - kind: NSXMLNodeKind, - options: NSXMLNodeOptions, - ) -> Id { - msg_send_id![self, initWithKind: kind, options: options] - } - pub unsafe fn elementsForName(&self, name: &NSString) -> Id, Shared> { - msg_send_id![self, elementsForName: name] - } - pub unsafe fn elementsForLocalName_URI( - &self, - localName: &NSString, - URI: Option<&NSString>, - ) -> Id, Shared> { - msg_send_id![self, elementsForLocalName: localName, URI: URI] - } - pub unsafe fn addAttribute(&self, attribute: &NSXMLNode) { - msg_send![self, addAttribute: attribute] - } - pub unsafe fn removeAttributeForName(&self, name: &NSString) { - msg_send![self, removeAttributeForName: name] - } - pub unsafe fn attributes(&self) -> Option, Shared>> { - msg_send_id![self, attributes] - } - pub unsafe fn setAttributes(&self, attributes: Option<&NSArray>) { - msg_send![self, setAttributes: attributes] - } - pub unsafe fn setAttributesWithDictionary( - &self, - attributes: &NSDictionary, - ) { - msg_send![self, setAttributesWithDictionary: attributes] - } - pub unsafe fn attributeForName(&self, name: &NSString) -> Option> { - msg_send_id![self, attributeForName: name] - } - pub unsafe fn attributeForLocalName_URI( - &self, - localName: &NSString, - URI: Option<&NSString>, - ) -> Option> { - msg_send_id![self, attributeForLocalName: localName, URI: URI] - } - pub unsafe fn addNamespace(&self, aNamespace: &NSXMLNode) { - msg_send![self, addNamespace: aNamespace] - } - pub unsafe fn removeNamespaceForPrefix(&self, name: &NSString) { - msg_send![self, removeNamespaceForPrefix: name] - } - pub unsafe fn namespaces(&self) -> Option, Shared>> { - msg_send_id![self, namespaces] - } - pub unsafe fn setNamespaces(&self, namespaces: Option<&NSArray>) { - msg_send![self, setNamespaces: namespaces] - } - pub unsafe fn namespaceForPrefix(&self, name: &NSString) -> Option> { - msg_send_id![self, namespaceForPrefix: name] - } - pub unsafe fn resolveNamespaceForName(&self, name: &NSString) -> Option> { - msg_send_id![self, resolveNamespaceForName: name] - } - pub unsafe fn resolvePrefixForNamespaceURI( - &self, - namespaceURI: &NSString, - ) -> Option> { - msg_send_id![self, resolvePrefixForNamespaceURI: namespaceURI] - } - pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { - msg_send![self, insertChild: child, atIndex: index] - } - pub unsafe fn insertChildren_atIndex(&self, children: &NSArray, index: NSUInteger) { - msg_send![self, insertChildren: children, atIndex: index] - } - pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { - msg_send![self, removeChildAtIndex: index] - } - pub unsafe fn setChildren(&self, children: Option<&NSArray>) { - msg_send![self, setChildren: children] - } - pub unsafe fn addChild(&self, child: &NSXMLNode) { - msg_send![self, addChild: child] - } - pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { - msg_send![self, replaceChildAtIndex: index, withNode: node] - } - pub unsafe fn normalizeAdjacentTextNodesPreservingCDATA(&self, preserve: bool) { - msg_send![self, normalizeAdjacentTextNodesPreservingCDATA: preserve] - } -} -#[doc = "NSDeprecated"] -impl NSXMLElement { - pub unsafe fn setAttributesAsDictionary(&self, attributes: &NSDictionary) { - msg_send![self, setAttributesAsDictionary: attributes] +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSXMLElement { + pub unsafe fn setAttributesAsDictionary(&self, attributes: &NSDictionary) { + msg_send![self, setAttributesAsDictionary: attributes] + } } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 5475acc48..f093142a5 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSXMLNodeOptions::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLNode; @@ -18,222 +18,229 @@ extern_class!( type Super = NSObject; } ); -impl NSXMLNode { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] +extern_methods!( + unsafe impl NSXMLNode { + pub unsafe fn init(&self) -> Id { + msg_send_id![self, init] + } + pub unsafe fn initWithKind(&self, kind: NSXMLNodeKind) -> Id { + msg_send_id![self, initWithKind: kind] + } + pub unsafe fn initWithKind_options( + &self, + kind: NSXMLNodeKind, + options: NSXMLNodeOptions, + ) -> Id { + msg_send_id![self, initWithKind: kind, options: options] + } + pub unsafe fn document() -> Id { + msg_send_id![Self::class(), document] + } + pub unsafe fn documentWithRootElement(element: &NSXMLElement) -> Id { + msg_send_id![Self::class(), documentWithRootElement: element] + } + pub unsafe fn elementWithName(name: &NSString) -> Id { + msg_send_id![Self::class(), elementWithName: name] + } + pub unsafe fn elementWithName_URI(name: &NSString, URI: &NSString) -> Id { + msg_send_id![Self::class(), elementWithName: name, URI: URI] + } + pub unsafe fn elementWithName_stringValue( + name: &NSString, + string: &NSString, + ) -> Id { + msg_send_id![Self::class(), elementWithName: name, stringValue: string] + } + pub unsafe fn elementWithName_children_attributes( + name: &NSString, + children: Option<&NSArray>, + attributes: Option<&NSArray>, + ) -> Id { + msg_send_id![ + Self::class(), + elementWithName: name, + children: children, + attributes: attributes + ] + } + pub unsafe fn attributeWithName_stringValue( + name: &NSString, + stringValue: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + attributeWithName: name, + stringValue: stringValue + ] + } + pub unsafe fn attributeWithName_URI_stringValue( + name: &NSString, + URI: &NSString, + stringValue: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + attributeWithName: name, + URI: URI, + stringValue: stringValue + ] + } + pub unsafe fn namespaceWithName_stringValue( + name: &NSString, + stringValue: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + namespaceWithName: name, + stringValue: stringValue + ] + } + pub unsafe fn processingInstructionWithName_stringValue( + name: &NSString, + stringValue: &NSString, + ) -> Id { + msg_send_id![ + Self::class(), + processingInstructionWithName: name, + stringValue: stringValue + ] + } + pub unsafe fn commentWithStringValue(stringValue: &NSString) -> Id { + msg_send_id![Self::class(), commentWithStringValue: stringValue] + } + pub unsafe fn textWithStringValue(stringValue: &NSString) -> Id { + msg_send_id![Self::class(), textWithStringValue: stringValue] + } + pub unsafe fn DTDNodeWithXMLString(string: &NSString) -> Option> { + msg_send_id![Self::class(), DTDNodeWithXMLString: string] + } + pub unsafe fn kind(&self) -> NSXMLNodeKind { + msg_send![self, kind] + } + pub unsafe fn name(&self) -> Option> { + msg_send_id![self, name] + } + pub unsafe fn setName(&self, name: Option<&NSString>) { + msg_send![self, setName: name] + } + pub unsafe fn objectValue(&self) -> Option> { + msg_send_id![self, objectValue] + } + pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>) { + msg_send![self, setObjectValue: objectValue] + } + pub unsafe fn stringValue(&self) -> Option> { + msg_send_id![self, stringValue] + } + pub unsafe fn setStringValue(&self, stringValue: Option<&NSString>) { + msg_send![self, setStringValue: stringValue] + } + pub unsafe fn setStringValue_resolvingEntities(&self, string: &NSString, resolve: bool) { + msg_send![self, setStringValue: string, resolvingEntities: resolve] + } + pub unsafe fn index(&self) -> NSUInteger { + msg_send![self, index] + } + pub unsafe fn level(&self) -> NSUInteger { + msg_send![self, level] + } + pub unsafe fn rootDocument(&self) -> Option> { + msg_send_id![self, rootDocument] + } + pub unsafe fn parent(&self) -> Option> { + msg_send_id![self, parent] + } + pub unsafe fn childCount(&self) -> NSUInteger { + msg_send![self, childCount] + } + pub unsafe fn children(&self) -> Option, Shared>> { + msg_send_id![self, children] + } + pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option> { + msg_send_id![self, childAtIndex: index] + } + pub unsafe fn previousSibling(&self) -> Option> { + msg_send_id![self, previousSibling] + } + pub unsafe fn nextSibling(&self) -> Option> { + msg_send_id![self, nextSibling] + } + pub unsafe fn previousNode(&self) -> Option> { + msg_send_id![self, previousNode] + } + pub unsafe fn nextNode(&self) -> Option> { + msg_send_id![self, nextNode] + } + pub unsafe fn detach(&self) { + msg_send![self, detach] + } + pub unsafe fn XPath(&self) -> Option> { + msg_send_id![self, XPath] + } + pub unsafe fn localName(&self) -> Option> { + msg_send_id![self, localName] + } + pub unsafe fn prefix(&self) -> Option> { + msg_send_id![self, prefix] + } + pub unsafe fn URI(&self) -> Option> { + msg_send_id![self, URI] + } + pub unsafe fn setURI(&self, URI: Option<&NSString>) { + msg_send![self, setURI: URI] + } + pub unsafe fn localNameForName(name: &NSString) -> Id { + msg_send_id![Self::class(), localNameForName: name] + } + pub unsafe fn prefixForName(name: &NSString) -> Option> { + msg_send_id![Self::class(), prefixForName: name] + } + pub unsafe fn predefinedNamespaceForPrefix( + name: &NSString, + ) -> Option> { + msg_send_id![Self::class(), predefinedNamespaceForPrefix: name] + } + pub unsafe fn description(&self) -> Id { + msg_send_id![self, description] + } + pub unsafe fn XMLString(&self) -> Id { + msg_send_id![self, XMLString] + } + pub unsafe fn XMLStringWithOptions( + &self, + options: NSXMLNodeOptions, + ) -> Id { + msg_send_id![self, XMLStringWithOptions: options] + } + pub unsafe fn canonicalXMLStringPreservingComments( + &self, + comments: bool, + ) -> Id { + msg_send_id![self, canonicalXMLStringPreservingComments: comments] + } + pub unsafe fn nodesForXPath_error( + &self, + xpath: &NSString, + ) -> Result, Shared>, Id> { + msg_send_id![self, nodesForXPath: xpath, error: _] + } + pub unsafe fn objectsForXQuery_constants_error( + &self, + xquery: &NSString, + constants: Option<&NSDictionary>, + ) -> Result, Id> { + msg_send_id![ + self, + objectsForXQuery: xquery, + constants: constants, + error: _ + ] + } + pub unsafe fn objectsForXQuery_error( + &self, + xquery: &NSString, + ) -> Result, Id> { + msg_send_id![self, objectsForXQuery: xquery, error: _] + } } - pub unsafe fn initWithKind(&self, kind: NSXMLNodeKind) -> Id { - msg_send_id![self, initWithKind: kind] - } - pub unsafe fn initWithKind_options( - &self, - kind: NSXMLNodeKind, - options: NSXMLNodeOptions, - ) -> Id { - msg_send_id![self, initWithKind: kind, options: options] - } - pub unsafe fn document() -> Id { - msg_send_id![Self::class(), document] - } - pub unsafe fn documentWithRootElement(element: &NSXMLElement) -> Id { - msg_send_id![Self::class(), documentWithRootElement: element] - } - pub unsafe fn elementWithName(name: &NSString) -> Id { - msg_send_id![Self::class(), elementWithName: name] - } - pub unsafe fn elementWithName_URI(name: &NSString, URI: &NSString) -> Id { - msg_send_id![Self::class(), elementWithName: name, URI: URI] - } - pub unsafe fn elementWithName_stringValue( - name: &NSString, - string: &NSString, - ) -> Id { - msg_send_id![Self::class(), elementWithName: name, stringValue: string] - } - pub unsafe fn elementWithName_children_attributes( - name: &NSString, - children: Option<&NSArray>, - attributes: Option<&NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - elementWithName: name, - children: children, - attributes: attributes - ] - } - pub unsafe fn attributeWithName_stringValue( - name: &NSString, - stringValue: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - attributeWithName: name, - stringValue: stringValue - ] - } - pub unsafe fn attributeWithName_URI_stringValue( - name: &NSString, - URI: &NSString, - stringValue: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - attributeWithName: name, - URI: URI, - stringValue: stringValue - ] - } - pub unsafe fn namespaceWithName_stringValue( - name: &NSString, - stringValue: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - namespaceWithName: name, - stringValue: stringValue - ] - } - pub unsafe fn processingInstructionWithName_stringValue( - name: &NSString, - stringValue: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - processingInstructionWithName: name, - stringValue: stringValue - ] - } - pub unsafe fn commentWithStringValue(stringValue: &NSString) -> Id { - msg_send_id![Self::class(), commentWithStringValue: stringValue] - } - pub unsafe fn textWithStringValue(stringValue: &NSString) -> Id { - msg_send_id![Self::class(), textWithStringValue: stringValue] - } - pub unsafe fn DTDNodeWithXMLString(string: &NSString) -> Option> { - msg_send_id![Self::class(), DTDNodeWithXMLString: string] - } - pub unsafe fn kind(&self) -> NSXMLNodeKind { - msg_send![self, kind] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } - pub unsafe fn objectValue(&self) -> Option> { - msg_send_id![self, objectValue] - } - pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>) { - msg_send![self, setObjectValue: objectValue] - } - pub unsafe fn stringValue(&self) -> Option> { - msg_send_id![self, stringValue] - } - pub unsafe fn setStringValue(&self, stringValue: Option<&NSString>) { - msg_send![self, setStringValue: stringValue] - } - pub unsafe fn setStringValue_resolvingEntities(&self, string: &NSString, resolve: bool) { - msg_send![self, setStringValue: string, resolvingEntities: resolve] - } - pub unsafe fn index(&self) -> NSUInteger { - msg_send![self, index] - } - pub unsafe fn level(&self) -> NSUInteger { - msg_send![self, level] - } - pub unsafe fn rootDocument(&self) -> Option> { - msg_send_id![self, rootDocument] - } - pub unsafe fn parent(&self) -> Option> { - msg_send_id![self, parent] - } - pub unsafe fn childCount(&self) -> NSUInteger { - msg_send![self, childCount] - } - pub unsafe fn children(&self) -> Option, Shared>> { - msg_send_id![self, children] - } - pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option> { - msg_send_id![self, childAtIndex: index] - } - pub unsafe fn previousSibling(&self) -> Option> { - msg_send_id![self, previousSibling] - } - pub unsafe fn nextSibling(&self) -> Option> { - msg_send_id![self, nextSibling] - } - pub unsafe fn previousNode(&self) -> Option> { - msg_send_id![self, previousNode] - } - pub unsafe fn nextNode(&self) -> Option> { - msg_send_id![self, nextNode] - } - pub unsafe fn detach(&self) { - msg_send![self, detach] - } - pub unsafe fn XPath(&self) -> Option> { - msg_send_id![self, XPath] - } - pub unsafe fn localName(&self) -> Option> { - msg_send_id![self, localName] - } - pub unsafe fn prefix(&self) -> Option> { - msg_send_id![self, prefix] - } - pub unsafe fn URI(&self) -> Option> { - msg_send_id![self, URI] - } - pub unsafe fn setURI(&self, URI: Option<&NSString>) { - msg_send![self, setURI: URI] - } - pub unsafe fn localNameForName(name: &NSString) -> Id { - msg_send_id![Self::class(), localNameForName: name] - } - pub unsafe fn prefixForName(name: &NSString) -> Option> { - msg_send_id![Self::class(), prefixForName: name] - } - pub unsafe fn predefinedNamespaceForPrefix(name: &NSString) -> Option> { - msg_send_id![Self::class(), predefinedNamespaceForPrefix: name] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn XMLString(&self) -> Id { - msg_send_id![self, XMLString] - } - pub unsafe fn XMLStringWithOptions(&self, options: NSXMLNodeOptions) -> Id { - msg_send_id![self, XMLStringWithOptions: options] - } - pub unsafe fn canonicalXMLStringPreservingComments( - &self, - comments: bool, - ) -> Id { - msg_send_id![self, canonicalXMLStringPreservingComments: comments] - } - pub unsafe fn nodesForXPath_error( - &self, - xpath: &NSString, - ) -> Result, Shared>, Id> { - msg_send_id![self, nodesForXPath: xpath, error: _] - } - pub unsafe fn objectsForXQuery_constants_error( - &self, - xquery: &NSString, - constants: Option<&NSDictionary>, - ) -> Result, Id> { - msg_send_id![ - self, - objectsForXQuery: xquery, - constants: constants, - error: _ - ] - } - pub unsafe fn objectsForXQuery_error( - &self, - xquery: &NSString, - ) -> Result, Id> { - msg_send_id![self, objectsForXQuery: xquery, error: _] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs index b795ad452..97bb9cbef 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -2,4 +2,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index d4a266fd7..7c9a83651 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLParser; @@ -18,93 +18,99 @@ extern_class!( type Super = NSObject; } ); -impl NSXMLParser { - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithContentsOfURL: url] +extern_methods!( + unsafe impl NSXMLParser { + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { + msg_send_id![self, initWithContentsOfURL: url] + } + pub unsafe fn initWithData(&self, data: &NSData) -> Id { + msg_send_id![self, initWithData: data] + } + pub unsafe fn initWithStream(&self, stream: &NSInputStream) -> Id { + msg_send_id![self, initWithStream: stream] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSXMLParserDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn shouldProcessNamespaces(&self) -> bool { + msg_send![self, shouldProcessNamespaces] + } + pub unsafe fn setShouldProcessNamespaces(&self, shouldProcessNamespaces: bool) { + msg_send![self, setShouldProcessNamespaces: shouldProcessNamespaces] + } + pub unsafe fn shouldReportNamespacePrefixes(&self) -> bool { + msg_send![self, shouldReportNamespacePrefixes] + } + pub unsafe fn setShouldReportNamespacePrefixes(&self, shouldReportNamespacePrefixes: bool) { + msg_send![ + self, + setShouldReportNamespacePrefixes: shouldReportNamespacePrefixes + ] + } + pub unsafe fn externalEntityResolvingPolicy( + &self, + ) -> NSXMLParserExternalEntityResolvingPolicy { + msg_send![self, externalEntityResolvingPolicy] + } + pub unsafe fn setExternalEntityResolvingPolicy( + &self, + externalEntityResolvingPolicy: NSXMLParserExternalEntityResolvingPolicy, + ) { + msg_send![ + self, + setExternalEntityResolvingPolicy: externalEntityResolvingPolicy + ] + } + pub unsafe fn allowedExternalEntityURLs(&self) -> Option, Shared>> { + msg_send_id![self, allowedExternalEntityURLs] + } + pub unsafe fn setAllowedExternalEntityURLs( + &self, + allowedExternalEntityURLs: Option<&NSSet>, + ) { + msg_send![ + self, + setAllowedExternalEntityURLs: allowedExternalEntityURLs + ] + } + pub unsafe fn parse(&self) -> bool { + msg_send![self, parse] + } + pub unsafe fn abortParsing(&self) { + msg_send![self, abortParsing] + } + pub unsafe fn parserError(&self) -> Option> { + msg_send_id![self, parserError] + } + pub unsafe fn shouldResolveExternalEntities(&self) -> bool { + msg_send![self, shouldResolveExternalEntities] + } + pub unsafe fn setShouldResolveExternalEntities(&self, shouldResolveExternalEntities: bool) { + msg_send![ + self, + setShouldResolveExternalEntities: shouldResolveExternalEntities + ] + } } - pub unsafe fn initWithData(&self, data: &NSData) -> Id { - msg_send_id![self, initWithData: data] - } - pub unsafe fn initWithStream(&self, stream: &NSInputStream) -> Id { - msg_send_id![self, initWithStream: stream] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSXMLParserDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn shouldProcessNamespaces(&self) -> bool { - msg_send![self, shouldProcessNamespaces] - } - pub unsafe fn setShouldProcessNamespaces(&self, shouldProcessNamespaces: bool) { - msg_send![self, setShouldProcessNamespaces: shouldProcessNamespaces] - } - pub unsafe fn shouldReportNamespacePrefixes(&self) -> bool { - msg_send![self, shouldReportNamespacePrefixes] - } - pub unsafe fn setShouldReportNamespacePrefixes(&self, shouldReportNamespacePrefixes: bool) { - msg_send![ - self, - setShouldReportNamespacePrefixes: shouldReportNamespacePrefixes - ] - } - pub unsafe fn externalEntityResolvingPolicy(&self) -> NSXMLParserExternalEntityResolvingPolicy { - msg_send![self, externalEntityResolvingPolicy] - } - pub unsafe fn setExternalEntityResolvingPolicy( - &self, - externalEntityResolvingPolicy: NSXMLParserExternalEntityResolvingPolicy, - ) { - msg_send![ - self, - setExternalEntityResolvingPolicy: externalEntityResolvingPolicy - ] - } - pub unsafe fn allowedExternalEntityURLs(&self) -> Option, Shared>> { - msg_send_id![self, allowedExternalEntityURLs] - } - pub unsafe fn setAllowedExternalEntityURLs( - &self, - allowedExternalEntityURLs: Option<&NSSet>, - ) { - msg_send![ - self, - setAllowedExternalEntityURLs: allowedExternalEntityURLs - ] - } - pub unsafe fn parse(&self) -> bool { - msg_send![self, parse] - } - pub unsafe fn abortParsing(&self) { - msg_send![self, abortParsing] - } - pub unsafe fn parserError(&self) -> Option> { - msg_send_id![self, parserError] - } - pub unsafe fn shouldResolveExternalEntities(&self) -> bool { - msg_send![self, shouldResolveExternalEntities] - } - pub unsafe fn setShouldResolveExternalEntities(&self, shouldResolveExternalEntities: bool) { - msg_send![ - self, - setShouldResolveExternalEntities: shouldResolveExternalEntities - ] - } -} -#[doc = "NSXMLParserLocatorAdditions"] -impl NSXMLParser { - pub unsafe fn publicID(&self) -> Option> { - msg_send_id![self, publicID] - } - pub unsafe fn systemID(&self) -> Option> { - msg_send_id![self, systemID] - } - pub unsafe fn lineNumber(&self) -> NSInteger { - msg_send![self, lineNumber] - } - pub unsafe fn columnNumber(&self) -> NSInteger { - msg_send![self, columnNumber] +); +extern_methods!( + #[doc = "NSXMLParserLocatorAdditions"] + unsafe impl NSXMLParser { + pub unsafe fn publicID(&self) -> Option> { + msg_send_id![self, publicID] + } + pub unsafe fn systemID(&self) -> Option> { + msg_send_id![self, systemID] + } + pub unsafe fn lineNumber(&self) -> NSInteger { + msg_send![self, lineNumber] + } + pub unsafe fn columnNumber(&self) -> NSInteger { + msg_send![self, columnNumber] + } } -} +); pub type NSXMLParserDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 74c0d92dc..0a911784b 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -13,7 +13,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; pub type NSXPCProxyCreating = NSObject; extern_class!( #[derive(Debug)] @@ -22,102 +22,107 @@ extern_class!( type Super = NSObject; } ); -impl NSXPCConnection { - pub unsafe fn initWithServiceName(&self, serviceName: &NSString) -> Id { - msg_send_id![self, initWithServiceName: serviceName] +extern_methods!( + unsafe impl NSXPCConnection { + pub unsafe fn initWithServiceName(&self, serviceName: &NSString) -> Id { + msg_send_id![self, initWithServiceName: serviceName] + } + pub unsafe fn serviceName(&self) -> Option> { + msg_send_id![self, serviceName] + } + pub unsafe fn initWithMachServiceName_options( + &self, + name: &NSString, + options: NSXPCConnectionOptions, + ) -> Id { + msg_send_id![self, initWithMachServiceName: name, options: options] + } + pub unsafe fn initWithListenerEndpoint( + &self, + endpoint: &NSXPCListenerEndpoint, + ) -> Id { + msg_send_id![self, initWithListenerEndpoint: endpoint] + } + pub unsafe fn endpoint(&self) -> Id { + msg_send_id![self, endpoint] + } + pub unsafe fn exportedInterface(&self) -> Option> { + msg_send_id![self, exportedInterface] + } + pub unsafe fn setExportedInterface(&self, exportedInterface: Option<&NSXPCInterface>) { + msg_send![self, setExportedInterface: exportedInterface] + } + pub unsafe fn exportedObject(&self) -> Option> { + msg_send_id![self, exportedObject] + } + pub unsafe fn setExportedObject(&self, exportedObject: Option<&Object>) { + msg_send![self, setExportedObject: exportedObject] + } + pub unsafe fn remoteObjectInterface(&self) -> Option> { + msg_send_id![self, remoteObjectInterface] + } + pub unsafe fn setRemoteObjectInterface( + &self, + remoteObjectInterface: Option<&NSXPCInterface>, + ) { + msg_send![self, setRemoteObjectInterface: remoteObjectInterface] + } + pub unsafe fn remoteObjectProxy(&self) -> Id { + msg_send_id![self, remoteObjectProxy] + } + pub unsafe fn remoteObjectProxyWithErrorHandler( + &self, + handler: TodoBlock, + ) -> Id { + msg_send_id![self, remoteObjectProxyWithErrorHandler: handler] + } + pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( + &self, + handler: TodoBlock, + ) -> Id { + msg_send_id![self, synchronousRemoteObjectProxyWithErrorHandler: handler] + } + pub unsafe fn interruptionHandler(&self) -> TodoBlock { + msg_send![self, interruptionHandler] + } + pub unsafe fn setInterruptionHandler(&self, interruptionHandler: TodoBlock) { + msg_send![self, setInterruptionHandler: interruptionHandler] + } + pub unsafe fn invalidationHandler(&self) -> TodoBlock { + msg_send![self, invalidationHandler] + } + pub unsafe fn setInvalidationHandler(&self, invalidationHandler: TodoBlock) { + msg_send![self, setInvalidationHandler: invalidationHandler] + } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } + pub unsafe fn suspend(&self) { + msg_send![self, suspend] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } + pub unsafe fn auditSessionIdentifier(&self) -> au_asid_t { + msg_send![self, auditSessionIdentifier] + } + pub unsafe fn processIdentifier(&self) -> pid_t { + msg_send![self, processIdentifier] + } + pub unsafe fn effectiveUserIdentifier(&self) -> uid_t { + msg_send![self, effectiveUserIdentifier] + } + pub unsafe fn effectiveGroupIdentifier(&self) -> gid_t { + msg_send![self, effectiveGroupIdentifier] + } + pub unsafe fn currentConnection() -> Option> { + msg_send_id![Self::class(), currentConnection] + } + pub unsafe fn scheduleSendBarrierBlock(&self, block: TodoBlock) { + msg_send![self, scheduleSendBarrierBlock: block] + } } - pub unsafe fn serviceName(&self) -> Option> { - msg_send_id![self, serviceName] - } - pub unsafe fn initWithMachServiceName_options( - &self, - name: &NSString, - options: NSXPCConnectionOptions, - ) -> Id { - msg_send_id![self, initWithMachServiceName: name, options: options] - } - pub unsafe fn initWithListenerEndpoint( - &self, - endpoint: &NSXPCListenerEndpoint, - ) -> Id { - msg_send_id![self, initWithListenerEndpoint: endpoint] - } - pub unsafe fn endpoint(&self) -> Id { - msg_send_id![self, endpoint] - } - pub unsafe fn exportedInterface(&self) -> Option> { - msg_send_id![self, exportedInterface] - } - pub unsafe fn setExportedInterface(&self, exportedInterface: Option<&NSXPCInterface>) { - msg_send![self, setExportedInterface: exportedInterface] - } - pub unsafe fn exportedObject(&self) -> Option> { - msg_send_id![self, exportedObject] - } - pub unsafe fn setExportedObject(&self, exportedObject: Option<&Object>) { - msg_send![self, setExportedObject: exportedObject] - } - pub unsafe fn remoteObjectInterface(&self) -> Option> { - msg_send_id![self, remoteObjectInterface] - } - pub unsafe fn setRemoteObjectInterface(&self, remoteObjectInterface: Option<&NSXPCInterface>) { - msg_send![self, setRemoteObjectInterface: remoteObjectInterface] - } - pub unsafe fn remoteObjectProxy(&self) -> Id { - msg_send_id![self, remoteObjectProxy] - } - pub unsafe fn remoteObjectProxyWithErrorHandler( - &self, - handler: TodoBlock, - ) -> Id { - msg_send_id![self, remoteObjectProxyWithErrorHandler: handler] - } - pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( - &self, - handler: TodoBlock, - ) -> Id { - msg_send_id![self, synchronousRemoteObjectProxyWithErrorHandler: handler] - } - pub unsafe fn interruptionHandler(&self) -> TodoBlock { - msg_send![self, interruptionHandler] - } - pub unsafe fn setInterruptionHandler(&self, interruptionHandler: TodoBlock) { - msg_send![self, setInterruptionHandler: interruptionHandler] - } - pub unsafe fn invalidationHandler(&self) -> TodoBlock { - msg_send![self, invalidationHandler] - } - pub unsafe fn setInvalidationHandler(&self, invalidationHandler: TodoBlock) { - msg_send![self, setInvalidationHandler: invalidationHandler] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn suspend(&self) { - msg_send![self, suspend] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn auditSessionIdentifier(&self) -> au_asid_t { - msg_send![self, auditSessionIdentifier] - } - pub unsafe fn processIdentifier(&self) -> pid_t { - msg_send![self, processIdentifier] - } - pub unsafe fn effectiveUserIdentifier(&self) -> uid_t { - msg_send![self, effectiveUserIdentifier] - } - pub unsafe fn effectiveGroupIdentifier(&self) -> gid_t { - msg_send![self, effectiveGroupIdentifier] - } - pub unsafe fn currentConnection() -> Option> { - msg_send_id![Self::class(), currentConnection] - } - pub unsafe fn scheduleSendBarrierBlock(&self, block: TodoBlock) { - msg_send![self, scheduleSendBarrierBlock: block] - } -} +); extern_class!( #[derive(Debug)] pub struct NSXPCListener; @@ -125,35 +130,37 @@ extern_class!( type Super = NSObject; } ); -impl NSXPCListener { - pub unsafe fn serviceListener() -> Id { - msg_send_id![Self::class(), serviceListener] - } - pub unsafe fn anonymousListener() -> Id { - msg_send_id![Self::class(), anonymousListener] - } - pub unsafe fn initWithMachServiceName(&self, name: &NSString) -> Id { - msg_send_id![self, initWithMachServiceName: name] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSXPCListenerDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn endpoint(&self) -> Id { - msg_send_id![self, endpoint] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] +extern_methods!( + unsafe impl NSXPCListener { + pub unsafe fn serviceListener() -> Id { + msg_send_id![Self::class(), serviceListener] + } + pub unsafe fn anonymousListener() -> Id { + msg_send_id![Self::class(), anonymousListener] + } + pub unsafe fn initWithMachServiceName(&self, name: &NSString) -> Id { + msg_send_id![self, initWithMachServiceName: name] + } + pub unsafe fn delegate(&self) -> Option> { + msg_send_id![self, delegate] + } + pub unsafe fn setDelegate(&self, delegate: Option<&NSXPCListenerDelegate>) { + msg_send![self, setDelegate: delegate] + } + pub unsafe fn endpoint(&self) -> Id { + msg_send_id![self, endpoint] + } + pub unsafe fn resume(&self) { + msg_send![self, resume] + } + pub unsafe fn suspend(&self) { + msg_send![self, suspend] + } + pub unsafe fn invalidate(&self) { + msg_send![self, invalidate] + } } - pub unsafe fn suspend(&self) { - msg_send![self, suspend] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } -} +); pub type NSXPCListenerDelegate = NSObject; extern_class!( #[derive(Debug)] @@ -162,101 +169,103 @@ extern_class!( type Super = NSObject; } ); -impl NSXPCInterface { - pub unsafe fn interfaceWithProtocol(protocol: &Protocol) -> Id { - msg_send_id![Self::class(), interfaceWithProtocol: protocol] - } - pub unsafe fn protocol(&self) -> Id { - msg_send_id![self, protocol] - } - pub unsafe fn setProtocol(&self, protocol: &Protocol) { - msg_send![self, setProtocol: protocol] - } - pub unsafe fn setClasses_forSelector_argumentIndex_ofReply( - &self, - classes: &NSSet, - sel: Sel, - arg: NSUInteger, - ofReply: bool, - ) { - msg_send![ - self, - setClasses: classes, - forSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] +extern_methods!( + unsafe impl NSXPCInterface { + pub unsafe fn interfaceWithProtocol(protocol: &Protocol) -> Id { + msg_send_id![Self::class(), interfaceWithProtocol: protocol] + } + pub unsafe fn protocol(&self) -> Id { + msg_send_id![self, protocol] + } + pub unsafe fn setProtocol(&self, protocol: &Protocol) { + msg_send![self, setProtocol: protocol] + } + pub unsafe fn setClasses_forSelector_argumentIndex_ofReply( + &self, + classes: &NSSet, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) { + msg_send![ + self, + setClasses: classes, + forSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn classesForSelector_argumentIndex_ofReply( + &self, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) -> Id, Shared> { + msg_send_id![ + self, + classesForSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn setInterface_forSelector_argumentIndex_ofReply( + &self, + ifc: &NSXPCInterface, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) { + msg_send![ + self, + setInterface: ifc, + forSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn interfaceForSelector_argumentIndex_ofReply( + &self, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) -> Option> { + msg_send_id![ + self, + interfaceForSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn setXPCType_forSelector_argumentIndex_ofReply( + &self, + type_: xpc_type_t, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) { + msg_send![ + self, + setXPCType: type_, + forSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } + pub unsafe fn XPCTypeForSelector_argumentIndex_ofReply( + &self, + sel: Sel, + arg: NSUInteger, + ofReply: bool, + ) -> xpc_type_t { + msg_send![ + self, + XPCTypeForSelector: sel, + argumentIndex: arg, + ofReply: ofReply + ] + } } - pub unsafe fn classesForSelector_argumentIndex_ofReply( - &self, - sel: Sel, - arg: NSUInteger, - ofReply: bool, - ) -> Id, Shared> { - msg_send_id![ - self, - classesForSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } - pub unsafe fn setInterface_forSelector_argumentIndex_ofReply( - &self, - ifc: &NSXPCInterface, - sel: Sel, - arg: NSUInteger, - ofReply: bool, - ) { - msg_send![ - self, - setInterface: ifc, - forSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } - pub unsafe fn interfaceForSelector_argumentIndex_ofReply( - &self, - sel: Sel, - arg: NSUInteger, - ofReply: bool, - ) -> Option> { - msg_send_id![ - self, - interfaceForSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } - pub unsafe fn setXPCType_forSelector_argumentIndex_ofReply( - &self, - type_: xpc_type_t, - sel: Sel, - arg: NSUInteger, - ofReply: bool, - ) { - msg_send![ - self, - setXPCType: type_, - forSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } - pub unsafe fn XPCTypeForSelector_argumentIndex_ofReply( - &self, - sel: Sel, - arg: NSUInteger, - ofReply: bool, - ) -> xpc_type_t { - msg_send![ - self, - XPCTypeForSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } -} +); extern_class!( #[derive(Debug)] pub struct NSXPCListenerEndpoint; @@ -264,7 +273,9 @@ extern_class!( type Super = NSObject; } ); -impl NSXPCListenerEndpoint {} +extern_methods!( + unsafe impl NSXPCListenerEndpoint {} +); extern_class!( #[derive(Debug)] pub struct NSXPCCoder; @@ -272,24 +283,26 @@ extern_class!( type Super = NSCoder; } ); -impl NSXPCCoder { - pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: &xpc_object_t, key: &NSString) { - msg_send![self, encodeXPCObject: xpcObject, forKey: key] - } - pub unsafe fn decodeXPCObjectOfType_forKey( - &self, - type_: xpc_type_t, - key: &NSString, - ) -> Option> { - msg_send_id![self, decodeXPCObjectOfType: type_, forKey: key] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] +extern_methods!( + unsafe impl NSXPCCoder { + pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: &xpc_object_t, key: &NSString) { + msg_send![self, encodeXPCObject: xpcObject, forKey: key] + } + pub unsafe fn decodeXPCObjectOfType_forKey( + &self, + type_: xpc_type_t, + key: &NSString, + ) -> Option> { + msg_send_id![self, decodeXPCObjectOfType: type_, forKey: key] + } + pub unsafe fn userInfo(&self) -> Option> { + msg_send_id![self, userInfo] + } + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSObject>) { + msg_send![self, setUserInfo: userInfo] + } + pub unsafe fn connection(&self) -> Option> { + msg_send_id![self, connection] + } } - pub unsafe fn setUserInfo(&self, userInfo: Option<&NSObject>) { - msg_send![self, setUserInfo: userInfo] - } - pub unsafe fn connection(&self) -> Option> { - msg_send_id![self, connection] - } -} +); diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index aeb9dcf24..3df022269 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -4,4 +4,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; From b7179a785e1b357ce44fd580f679fc5330c408be Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 8 Oct 2022 06:15:21 +0200 Subject: [PATCH 065/131] Use extern_methods! functionality To cut down on the amount of code, which should make things easier to review and understand. This uses features which are not actually yet done, see https://github.com/madsmtm/objc2/pull/244. Not happy with the formatting either, but not sure how to fix that? --- crates/header-translator/src/lib.rs | 2 +- crates/header-translator/src/method.rs | 38 +- .../generated/Foundation/FoundationErrors.rs | 2 +- .../FoundationLegacySwiftCompatibility.rs | 2 +- .../generated/Foundation/NSAffineTransform.rs | 77 +- .../Foundation/NSAppleEventDescriptor.rs | 326 ++--- .../Foundation/NSAppleEventManager.rs | 75 +- .../src/generated/Foundation/NSAppleScript.rs | 37 +- .../src/generated/Foundation/NSArchiver.rs | 128 +- .../src/generated/Foundation/NSArray.rs | 557 +++------ .../Foundation/NSAttributedString.rs | 441 ++----- .../generated/Foundation/NSAutoreleasePool.rs | 17 +- .../NSBackgroundActivityScheduler.rs | 67 +- .../src/generated/Foundation/NSBundle.rs | 446 +++---- .../Foundation/NSByteCountFormatter.rs | 128 +- .../src/generated/Foundation/NSByteOrder.rs | 2 +- .../src/generated/Foundation/NSCache.rs | 80 +- .../src/generated/Foundation/NSCalendar.rs | 688 ++++------ .../generated/Foundation/NSCalendarDate.rs | 234 ++-- .../generated/Foundation/NSCharacterSet.rs | 262 ++-- .../Foundation/NSClassDescription.rs | 66 +- .../src/generated/Foundation/NSCoder.rs | 331 ++--- .../Foundation/NSComparisonPredicate.rs | 67 +- .../Foundation/NSCompoundPredicate.rs | 37 +- .../src/generated/Foundation/NSConnection.rs | 256 ++-- .../icrate/src/generated/Foundation/NSData.rs | 345 ++--- .../icrate/src/generated/Foundation/NSDate.rs | 149 +-- .../Foundation/NSDateComponentsFormatter.rs | 157 +-- .../generated/Foundation/NSDateFormatter.rs | 429 +++---- .../generated/Foundation/NSDateInterval.rs | 62 +- .../Foundation/NSDateIntervalFormatter.rs | 72 +- .../src/generated/Foundation/NSDecimal.rs | 2 +- .../generated/Foundation/NSDecimalNumber.rs | 250 ++-- .../src/generated/Foundation/NSDictionary.rs | 333 ++--- .../generated/Foundation/NSDistantObject.rs | 45 +- .../generated/Foundation/NSDistributedLock.rs | 37 +- .../NSDistributedNotificationCenter.rs | 95 +- .../generated/Foundation/NSEnergyFormatter.rs | 62 +- .../src/generated/Foundation/NSEnumerator.rs | 12 +- .../src/generated/Foundation/NSError.rs | 102 +- .../src/generated/Foundation/NSException.rs | 67 +- .../src/generated/Foundation/NSExpression.rs | 203 +-- .../Foundation/NSExtensionContext.rs | 26 +- .../generated/Foundation/NSExtensionItem.rs | 42 +- .../Foundation/NSExtensionRequestHandling.rs | 2 +- .../generated/Foundation/NSFileCoordinator.rs | 142 +-- .../src/generated/Foundation/NSFileHandle.rs | 242 ++-- .../src/generated/Foundation/NSFileManager.rs | 600 +++------ .../generated/Foundation/NSFilePresenter.rs | 2 +- .../src/generated/Foundation/NSFileVersion.rs | 137 +- .../src/generated/Foundation/NSFileWrapper.rs | 198 ++- .../src/generated/Foundation/NSFormatter.rs | 53 +- .../Foundation/NSGarbageCollector.rs | 52 +- .../src/generated/Foundation/NSGeometry.rs | 102 +- .../generated/Foundation/NSHFSFileTypes.rs | 2 +- .../src/generated/Foundation/NSHTTPCookie.rs | 96 +- .../Foundation/NSHTTPCookieStorage.rs | 79 +- .../src/generated/Foundation/NSHashTable.rs | 116 +- .../icrate/src/generated/Foundation/NSHost.rs | 62 +- .../Foundation/NSISO8601DateFormatter.rs | 47 +- .../src/generated/Foundation/NSIndexPath.rs | 61 +- .../src/generated/Foundation/NSIndexSet.rs | 227 ++-- .../generated/Foundation/NSInflectionRule.rs | 32 +- .../src/generated/Foundation/NSInvocation.rs | 80 +- .../generated/Foundation/NSItemProvider.rs | 150 +-- .../Foundation/NSJSONSerialization.rs | 37 +- .../generated/Foundation/NSKeyValueCoding.rs | 187 ++- .../Foundation/NSKeyValueObserving.rs | 229 +--- .../generated/Foundation/NSKeyedArchiver.rs | 358 ++---- .../generated/Foundation/NSLengthFormatter.rs | 62 +- .../Foundation/NSLinguisticTagger.rs | 220 +--- .../generated/Foundation/NSListFormatter.rs | 37 +- .../src/generated/Foundation/NSLocale.rs | 267 ++-- .../icrate/src/generated/Foundation/NSLock.rs | 122 +- .../src/generated/Foundation/NSMapTable.rs | 126 +- .../generated/Foundation/NSMassFormatter.rs | 66 +- .../src/generated/Foundation/NSMeasurement.rs | 42 +- .../Foundation/NSMeasurementFormatter.rs | 52 +- .../src/generated/Foundation/NSMetadata.rs | 241 ++-- .../Foundation/NSMetadataAttributes.rs | 2 +- .../generated/Foundation/NSMethodSignature.rs | 37 +- .../src/generated/Foundation/NSMorphology.rs | 123 +- .../src/generated/Foundation/NSNetServices.rs | 182 ++- .../generated/Foundation/NSNotification.rs | 109 +- .../Foundation/NSNotificationQueue.rs | 41 +- .../icrate/src/generated/Foundation/NSNull.rs | 7 +- .../generated/Foundation/NSNumberFormatter.rs | 725 ++++------- .../src/generated/Foundation/NSObjCRuntime.rs | 2 +- .../src/generated/Foundation/NSObject.rs | 32 +- .../generated/Foundation/NSObjectScripting.rs | 38 +- .../src/generated/Foundation/NSOperation.rs | 258 ++-- .../Foundation/NSOrderedCollectionChange.rs | 47 +- .../NSOrderedCollectionDifference.rs | 58 +- .../src/generated/Foundation/NSOrderedSet.rs | 515 +++----- .../src/generated/Foundation/NSOrthography.rs | 61 +- .../generated/Foundation/NSPathUtilities.rs | 98 +- .../Foundation/NSPersonNameComponents.rs | 72 +- .../NSPersonNameComponentsFormatter.rs | 67 +- .../generated/Foundation/NSPointerArray.rs | 92 +- .../Foundation/NSPointerFunctions.rs | 95 +- .../icrate/src/generated/Foundation/NSPort.rs | 198 +-- .../src/generated/Foundation/NSPortCoder.rs | 62 +- .../src/generated/Foundation/NSPortMessage.rs | 42 +- .../generated/Foundation/NSPortNameServer.rs | 125 +- .../src/generated/Foundation/NSPredicate.rs | 94 +- .../src/generated/Foundation/NSProcessInfo.rs | 179 +-- .../src/generated/Foundation/NSProgress.rs | 302 ++--- .../generated/Foundation/NSPropertyList.rs | 40 +- .../generated/Foundation/NSProtocolChecker.rs | 26 +- .../src/generated/Foundation/NSProxy.rs | 62 +- .../src/generated/Foundation/NSRange.rs | 12 +- .../Foundation/NSRegularExpression.rs | 145 +-- .../Foundation/NSRelativeDateTimeFormatter.rs | 76 +- .../src/generated/Foundation/NSRunLoop.rs | 147 +-- .../src/generated/Foundation/NSScanner.rs | 137 +- .../Foundation/NSScriptClassDescription.rs | 125 +- .../Foundation/NSScriptCoercionHandler.rs | 23 +- .../generated/Foundation/NSScriptCommand.rs | 138 +- .../Foundation/NSScriptCommandDescription.rs | 87 +- .../Foundation/NSScriptExecutionContext.rs | 37 +- .../Foundation/NSScriptKeyValueCoding.rs | 52 +- .../Foundation/NSScriptObjectSpecifiers.rs | 411 +++--- .../NSScriptStandardSuiteCommands.rs | 62 +- .../Foundation/NSScriptSuiteRegistry.rs | 85 +- .../Foundation/NSScriptWhoseTests.rs | 137 +- .../icrate/src/generated/Foundation/NSSet.rs | 264 ++-- .../generated/Foundation/NSSortDescriptor.rs | 121 +- .../src/generated/Foundation/NSSpellServer.rs | 27 +- .../src/generated/Foundation/NSStream.rs | 191 +-- .../src/generated/Foundation/NSString.rs | 898 +++++-------- .../icrate/src/generated/Foundation/NSTask.rs | 195 ++- .../Foundation/NSTextCheckingResult.rs | 223 +--- .../src/generated/Foundation/NSThread.rs | 225 ++-- .../src/generated/Foundation/NSTimeZone.rs | 158 +-- .../src/generated/Foundation/NSTimer.rs | 135 +- .../icrate/src/generated/Foundation/NSURL.rs | 846 +++++-------- .../NSURLAuthenticationChallenge.rs | 54 +- .../src/generated/Foundation/NSURLCache.rs | 150 +-- .../generated/Foundation/NSURLConnection.rs | 86 +- .../generated/Foundation/NSURLCredential.rs | 82 +- .../Foundation/NSURLCredentialStorage.rs | 107 +- .../src/generated/Foundation/NSURLDownload.rs | 55 +- .../src/generated/Foundation/NSURLError.rs | 2 +- .../src/generated/Foundation/NSURLHandle.rs | 122 +- .../Foundation/NSURLProtectionSpace.rs | 69 +- .../src/generated/Foundation/NSURLProtocol.rs | 105 +- .../src/generated/Foundation/NSURLRequest.rs | 298 ++--- .../src/generated/Foundation/NSURLResponse.rs | 69 +- .../src/generated/Foundation/NSURLSession.rs | 1108 ++++++----------- .../icrate/src/generated/Foundation/NSUUID.rs | 37 +- .../Foundation/NSUbiquitousKeyValueStore.rs | 105 +- .../src/generated/Foundation/NSUndoManager.rs | 177 +-- .../icrate/src/generated/Foundation/NSUnit.rs | 1090 +++++++--------- .../generated/Foundation/NSUserActivity.rs | 231 ++-- .../generated/Foundation/NSUserDefaults.rs | 195 ++- .../Foundation/NSUserNotification.rs | 271 ++-- .../generated/Foundation/NSUserScriptTask.rs | 80 +- .../src/generated/Foundation/NSValue.rs | 316 ++--- .../Foundation/NSValueTransformer.rs | 50 +- .../src/generated/Foundation/NSXMLDTD.rs | 101 +- .../src/generated/Foundation/NSXMLDTDNode.rs | 62 +- .../src/generated/Foundation/NSXMLDocument.rs | 177 +-- .../src/generated/Foundation/NSXMLElement.rs | 147 +-- .../src/generated/Foundation/NSXMLNode.rs | 284 ++--- .../generated/Foundation/NSXMLNodeOptions.rs | 2 +- .../src/generated/Foundation/NSXMLParser.rs | 124 +- .../generated/Foundation/NSXPCConnection.rs | 285 ++--- .../icrate/src/generated/Foundation/NSZone.rs | 2 +- 168 files changed, 9302 insertions(+), 16873 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 98d3d1782..bc9db61ed 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -57,7 +57,7 @@ impl RustFile { let tokens = quote! { #[allow(unused_imports)] - use objc2::{ClassType, extern_class, extern_methods, msg_send, msg_send_id}; + use objc2::{ClassType, extern_class, extern_methods}; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index d8b1078e6..b2907799d 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -332,31 +332,15 @@ impl ToTokens for Method { .map(|(param, arg_ty)| quote!(#param: #arg_ty)) .collect(); - let method_call = if self.selector.contains(':') { - let split_selector: Vec<_> = self + let selector = if self.selector.contains(':') { + let iter = self .selector .split(':') .filter(|sel| !sel.is_empty()) - .collect(); + .map(|sel| format_ident!("{}", sel)); - assert!( - arguments.len() + (is_error as usize) == split_selector.len(), - "incorrect method argument length", - ); - - let iter = arguments - .into_iter() - .map(|(param, _)| param) - .chain(is_error.then(|| format_ident!("_"))) - .zip(split_selector) - .map(|(param, sel)| { - let sel = format_ident!("{}", sel); - quote!(#sel: #param) - }); - - quote!(#(#iter),*) + quote!(#(#iter:)*) } else { - assert_eq!(arguments.len(), 0, "too many arguments"); let sel = format_ident!("{}", self.selector); quote!(#sel) }; @@ -369,24 +353,22 @@ impl ToTokens for Method { }; let macro_name = if self.result_type.is_id() { - format_ident!("msg_send_id") + format_ident!("method_id") } else { - format_ident!("msg_send") + format_ident!("method") }; let unsafe_ = if self.safe { quote!() } else { quote!(unsafe) }; let result = if self.is_class { quote! { - pub #unsafe_ fn #fn_name(#(#fn_args),*) #ret { - #macro_name![Self::class(), #method_call] - } + #[#macro_name(#selector)] + pub #unsafe_ fn #fn_name(#(#fn_args),*) #ret; } } else { quote! { - pub #unsafe_ fn #fn_name(&self #(, #fn_args)*) #ret { - #macro_name![self, #method_call] - } + #[#macro_name(#selector)] + pub #unsafe_ fn #fn_name(&self #(, #fn_args)*) #ret; } }; tokens.append_all(result); diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs index b935fd6ce..60e05e3b5 100644 --- a/crates/icrate/src/generated/Foundation/FoundationErrors.rs +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -3,4 +3,4 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs index 97bb9cbef..5362722ad 100644 --- a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs +++ b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs @@ -2,4 +2,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index 5093f720f..faee75951 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSAffineTransform; @@ -14,50 +14,35 @@ extern_class!( ); extern_methods!( unsafe impl NSAffineTransform { - pub unsafe fn transform() -> Id { - msg_send_id![Self::class(), transform] - } - pub unsafe fn initWithTransform(&self, transform: &NSAffineTransform) -> Id { - msg_send_id![self, initWithTransform: transform] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn translateXBy_yBy(&self, deltaX: CGFloat, deltaY: CGFloat) { - msg_send![self, translateXBy: deltaX, yBy: deltaY] - } - pub unsafe fn rotateByDegrees(&self, angle: CGFloat) { - msg_send![self, rotateByDegrees: angle] - } - pub unsafe fn rotateByRadians(&self, angle: CGFloat) { - msg_send![self, rotateByRadians: angle] - } - pub unsafe fn scaleBy(&self, scale: CGFloat) { - msg_send![self, scaleBy: scale] - } - pub unsafe fn scaleXBy_yBy(&self, scaleX: CGFloat, scaleY: CGFloat) { - msg_send![self, scaleXBy: scaleX, yBy: scaleY] - } - pub unsafe fn invert(&self) { - msg_send![self, invert] - } - pub unsafe fn appendTransform(&self, transform: &NSAffineTransform) { - msg_send![self, appendTransform: transform] - } - pub unsafe fn prependTransform(&self, transform: &NSAffineTransform) { - msg_send![self, prependTransform: transform] - } - pub unsafe fn transformPoint(&self, aPoint: NSPoint) -> NSPoint { - msg_send![self, transformPoint: aPoint] - } - pub unsafe fn transformSize(&self, aSize: NSSize) -> NSSize { - msg_send![self, transformSize: aSize] - } - pub unsafe fn transformStruct(&self) -> NSAffineTransformStruct { - msg_send![self, transformStruct] - } - pub unsafe fn setTransformStruct(&self, transformStruct: NSAffineTransformStruct) { - msg_send![self, setTransformStruct: transformStruct] - } + #[method_id(transform)] + pub unsafe fn transform() -> Id; + # [method_id (initWithTransform :)] + pub unsafe fn initWithTransform(&self, transform: &NSAffineTransform) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method (translateXBy : yBy :)] + pub unsafe fn translateXBy_yBy(&self, deltaX: CGFloat, deltaY: CGFloat); + # [method (rotateByDegrees :)] + pub unsafe fn rotateByDegrees(&self, angle: CGFloat); + # [method (rotateByRadians :)] + pub unsafe fn rotateByRadians(&self, angle: CGFloat); + # [method (scaleBy :)] + pub unsafe fn scaleBy(&self, scale: CGFloat); + # [method (scaleXBy : yBy :)] + pub unsafe fn scaleXBy_yBy(&self, scaleX: CGFloat, scaleY: CGFloat); + #[method(invert)] + pub unsafe fn invert(&self); + # [method (appendTransform :)] + pub unsafe fn appendTransform(&self, transform: &NSAffineTransform); + # [method (prependTransform :)] + pub unsafe fn prependTransform(&self, transform: &NSAffineTransform); + # [method (transformPoint :)] + pub unsafe fn transformPoint(&self, aPoint: NSPoint) -> NSPoint; + # [method (transformSize :)] + pub unsafe fn transformSize(&self, aSize: NSSize) -> NSSize; + #[method(transformStruct)] + pub unsafe fn transformStruct(&self) -> NSAffineTransformStruct; + # [method (setTransformStruct :)] + pub unsafe fn setTransformStruct(&self, transformStruct: NSAffineTransformStruct); } ); diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 42f560343..884a6f454 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSAppleEventDescriptor; @@ -15,134 +15,85 @@ extern_class!( ); extern_methods!( unsafe impl NSAppleEventDescriptor { - pub unsafe fn nullDescriptor() -> Id { - msg_send_id![Self::class(), nullDescriptor] - } + #[method_id(nullDescriptor)] + pub unsafe fn nullDescriptor() -> Id; + # [method_id (descriptorWithDescriptorType : bytes : length :)] pub unsafe fn descriptorWithDescriptorType_bytes_length( descriptorType: DescType, bytes: *mut c_void, byteCount: NSUInteger, - ) -> Option> { - msg_send_id![ - Self::class(), - descriptorWithDescriptorType: descriptorType, - bytes: bytes, - length: byteCount - ] - } + ) -> Option>; + # [method_id (descriptorWithDescriptorType : data :)] pub unsafe fn descriptorWithDescriptorType_data( descriptorType: DescType, data: Option<&NSData>, - ) -> Option> { - msg_send_id![ - Self::class(), - descriptorWithDescriptorType: descriptorType, - data: data - ] - } - pub unsafe fn descriptorWithBoolean( - boolean: Boolean, - ) -> Id { - msg_send_id![Self::class(), descriptorWithBoolean: boolean] - } + ) -> Option>; + # [method_id (descriptorWithBoolean :)] + pub unsafe fn descriptorWithBoolean(boolean: Boolean) + -> Id; + # [method_id (descriptorWithEnumCode :)] pub unsafe fn descriptorWithEnumCode( enumerator: OSType, - ) -> Id { - msg_send_id![Self::class(), descriptorWithEnumCode: enumerator] - } - pub unsafe fn descriptorWithInt32(signedInt: SInt32) -> Id { - msg_send_id![Self::class(), descriptorWithInt32: signedInt] - } + ) -> Id; + # [method_id (descriptorWithInt32 :)] + pub unsafe fn descriptorWithInt32(signedInt: SInt32) -> Id; + # [method_id (descriptorWithDouble :)] pub unsafe fn descriptorWithDouble( doubleValue: c_double, - ) -> Id { - msg_send_id![Self::class(), descriptorWithDouble: doubleValue] - } + ) -> Id; + # [method_id (descriptorWithTypeCode :)] pub unsafe fn descriptorWithTypeCode( typeCode: OSType, - ) -> Id { - msg_send_id![Self::class(), descriptorWithTypeCode: typeCode] - } - pub unsafe fn descriptorWithString( - string: &NSString, - ) -> Id { - msg_send_id![Self::class(), descriptorWithString: string] - } - pub unsafe fn descriptorWithDate(date: &NSDate) -> Id { - msg_send_id![Self::class(), descriptorWithDate: date] - } - pub unsafe fn descriptorWithFileURL(fileURL: &NSURL) -> Id { - msg_send_id![Self::class(), descriptorWithFileURL: fileURL] - } + ) -> Id; + # [method_id (descriptorWithString :)] + pub unsafe fn descriptorWithString(string: &NSString) + -> Id; + # [method_id (descriptorWithDate :)] + pub unsafe fn descriptorWithDate(date: &NSDate) -> Id; + # [method_id (descriptorWithFileURL :)] + pub unsafe fn descriptorWithFileURL(fileURL: &NSURL) -> Id; + # [method_id (appleEventWithEventClass : eventID : targetDescriptor : returnID : transactionID :)] pub unsafe fn appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID( eventClass: AEEventClass, eventID: AEEventID, targetDescriptor: Option<&NSAppleEventDescriptor>, returnID: AEReturnID, transactionID: AETransactionID, - ) -> Id { - msg_send_id![ - Self::class(), - appleEventWithEventClass: eventClass, - eventID: eventID, - targetDescriptor: targetDescriptor, - returnID: returnID, - transactionID: transactionID - ] - } - pub unsafe fn listDescriptor() -> Id { - msg_send_id![Self::class(), listDescriptor] - } - pub unsafe fn recordDescriptor() -> Id { - msg_send_id![Self::class(), recordDescriptor] - } - pub unsafe fn currentProcessDescriptor() -> Id { - msg_send_id![Self::class(), currentProcessDescriptor] - } + ) -> Id; + #[method_id(listDescriptor)] + pub unsafe fn listDescriptor() -> Id; + #[method_id(recordDescriptor)] + pub unsafe fn recordDescriptor() -> Id; + #[method_id(currentProcessDescriptor)] + pub unsafe fn currentProcessDescriptor() -> Id; + # [method_id (descriptorWithProcessIdentifier :)] pub unsafe fn descriptorWithProcessIdentifier( processIdentifier: pid_t, - ) -> Id { - msg_send_id![ - Self::class(), - descriptorWithProcessIdentifier: processIdentifier - ] - } + ) -> Id; + # [method_id (descriptorWithBundleIdentifier :)] pub unsafe fn descriptorWithBundleIdentifier( bundleIdentifier: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - descriptorWithBundleIdentifier: bundleIdentifier - ] - } + ) -> Id; + # [method_id (descriptorWithApplicationURL :)] pub unsafe fn descriptorWithApplicationURL( applicationURL: &NSURL, - ) -> Id { - msg_send_id![Self::class(), descriptorWithApplicationURL: applicationURL] - } - pub unsafe fn initWithAEDescNoCopy(&self, aeDesc: NonNull) -> Id { - msg_send_id![self, initWithAEDescNoCopy: aeDesc] - } + ) -> Id; + # [method_id (initWithAEDescNoCopy :)] + pub unsafe fn initWithAEDescNoCopy(&self, aeDesc: NonNull) -> Id; + # [method_id (initWithDescriptorType : bytes : length :)] pub unsafe fn initWithDescriptorType_bytes_length( &self, descriptorType: DescType, bytes: *mut c_void, byteCount: NSUInteger, - ) -> Option> { - msg_send_id![ - self, - initWithDescriptorType: descriptorType, - bytes: bytes, - length: byteCount - ] - } + ) -> Option>; + # [method_id (initWithDescriptorType : data :)] pub unsafe fn initWithDescriptorType_data( &self, descriptorType: DescType, data: Option<&NSData>, - ) -> Option> { - msg_send_id![self, initWithDescriptorType: descriptorType, data: data] - } + ) -> Option>; + # [method_id (initWithEventClass : eventID : targetDescriptor : returnID : transactionID :)] pub unsafe fn initWithEventClass_eventID_targetDescriptor_returnID_transactionID( &self, eventClass: AEEventClass, @@ -150,158 +101,107 @@ extern_methods!( targetDescriptor: Option<&NSAppleEventDescriptor>, returnID: AEReturnID, transactionID: AETransactionID, - ) -> Id { - msg_send_id![ - self, - initWithEventClass: eventClass, - eventID: eventID, - targetDescriptor: targetDescriptor, - returnID: returnID, - transactionID: transactionID - ] - } - pub unsafe fn initListDescriptor(&self) -> Id { - msg_send_id![self, initListDescriptor] - } - pub unsafe fn initRecordDescriptor(&self) -> Id { - msg_send_id![self, initRecordDescriptor] - } - pub unsafe fn aeDesc(&self) -> *mut AEDesc { - msg_send![self, aeDesc] - } - pub unsafe fn descriptorType(&self) -> DescType { - msg_send![self, descriptorType] - } - pub unsafe fn data(&self) -> Id { - msg_send_id![self, data] - } - pub unsafe fn booleanValue(&self) -> Boolean { - msg_send![self, booleanValue] - } - pub unsafe fn enumCodeValue(&self) -> OSType { - msg_send![self, enumCodeValue] - } - pub unsafe fn int32Value(&self) -> SInt32 { - msg_send![self, int32Value] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } - pub unsafe fn typeCodeValue(&self) -> OSType { - msg_send![self, typeCodeValue] - } - pub unsafe fn stringValue(&self) -> Option> { - msg_send_id![self, stringValue] - } - pub unsafe fn dateValue(&self) -> Option> { - msg_send_id![self, dateValue] - } - pub unsafe fn fileURLValue(&self) -> Option> { - msg_send_id![self, fileURLValue] - } - pub unsafe fn eventClass(&self) -> AEEventClass { - msg_send![self, eventClass] - } - pub unsafe fn eventID(&self) -> AEEventID { - msg_send![self, eventID] - } - pub unsafe fn returnID(&self) -> AEReturnID { - msg_send![self, returnID] - } - pub unsafe fn transactionID(&self) -> AETransactionID { - msg_send![self, transactionID] - } + ) -> Id; + #[method_id(initListDescriptor)] + pub unsafe fn initListDescriptor(&self) -> Id; + #[method_id(initRecordDescriptor)] + pub unsafe fn initRecordDescriptor(&self) -> Id; + #[method(aeDesc)] + pub unsafe fn aeDesc(&self) -> *mut AEDesc; + #[method(descriptorType)] + pub unsafe fn descriptorType(&self) -> DescType; + #[method_id(data)] + pub unsafe fn data(&self) -> Id; + #[method(booleanValue)] + pub unsafe fn booleanValue(&self) -> Boolean; + #[method(enumCodeValue)] + pub unsafe fn enumCodeValue(&self) -> OSType; + #[method(int32Value)] + pub unsafe fn int32Value(&self) -> SInt32; + #[method(doubleValue)] + pub unsafe fn doubleValue(&self) -> c_double; + #[method(typeCodeValue)] + pub unsafe fn typeCodeValue(&self) -> OSType; + #[method_id(stringValue)] + pub unsafe fn stringValue(&self) -> Option>; + #[method_id(dateValue)] + pub unsafe fn dateValue(&self) -> Option>; + #[method_id(fileURLValue)] + pub unsafe fn fileURLValue(&self) -> Option>; + #[method(eventClass)] + pub unsafe fn eventClass(&self) -> AEEventClass; + #[method(eventID)] + pub unsafe fn eventID(&self) -> AEEventID; + #[method(returnID)] + pub unsafe fn returnID(&self) -> AEReturnID; + #[method(transactionID)] + pub unsafe fn transactionID(&self) -> AETransactionID; + # [method (setParamDescriptor : forKeyword :)] pub unsafe fn setParamDescriptor_forKeyword( &self, descriptor: &NSAppleEventDescriptor, keyword: AEKeyword, - ) { - msg_send![self, setParamDescriptor: descriptor, forKeyword: keyword] - } + ); + # [method_id (paramDescriptorForKeyword :)] pub unsafe fn paramDescriptorForKeyword( &self, keyword: AEKeyword, - ) -> Option> { - msg_send_id![self, paramDescriptorForKeyword: keyword] - } - pub unsafe fn removeParamDescriptorWithKeyword(&self, keyword: AEKeyword) { - msg_send![self, removeParamDescriptorWithKeyword: keyword] - } + ) -> Option>; + # [method (removeParamDescriptorWithKeyword :)] + pub unsafe fn removeParamDescriptorWithKeyword(&self, keyword: AEKeyword); + # [method (setAttributeDescriptor : forKeyword :)] pub unsafe fn setAttributeDescriptor_forKeyword( &self, descriptor: &NSAppleEventDescriptor, keyword: AEKeyword, - ) { - msg_send![ - self, - setAttributeDescriptor: descriptor, - forKeyword: keyword - ] - } + ); + # [method_id (attributeDescriptorForKeyword :)] pub unsafe fn attributeDescriptorForKeyword( &self, keyword: AEKeyword, - ) -> Option> { - msg_send_id![self, attributeDescriptorForKeyword: keyword] - } + ) -> Option>; + # [method_id (sendEventWithOptions : timeout : error :)] pub unsafe fn sendEventWithOptions_timeout_error( &self, sendOptions: NSAppleEventSendOptions, timeoutInSeconds: NSTimeInterval, - ) -> Result, Id> { - msg_send_id![ - self, - sendEventWithOptions: sendOptions, - timeout: timeoutInSeconds, - error: _ - ] - } - pub unsafe fn isRecordDescriptor(&self) -> bool { - msg_send![self, isRecordDescriptor] - } - pub unsafe fn numberOfItems(&self) -> NSInteger { - msg_send![self, numberOfItems] - } + ) -> Result, Id>; + #[method(isRecordDescriptor)] + pub unsafe fn isRecordDescriptor(&self) -> bool; + #[method(numberOfItems)] + pub unsafe fn numberOfItems(&self) -> NSInteger; + # [method (insertDescriptor : atIndex :)] pub unsafe fn insertDescriptor_atIndex( &self, descriptor: &NSAppleEventDescriptor, index: NSInteger, - ) { - msg_send![self, insertDescriptor: descriptor, atIndex: index] - } + ); + # [method_id (descriptorAtIndex :)] pub unsafe fn descriptorAtIndex( &self, index: NSInteger, - ) -> Option> { - msg_send_id![self, descriptorAtIndex: index] - } - pub unsafe fn removeDescriptorAtIndex(&self, index: NSInteger) { - msg_send![self, removeDescriptorAtIndex: index] - } + ) -> Option>; + # [method (removeDescriptorAtIndex :)] + pub unsafe fn removeDescriptorAtIndex(&self, index: NSInteger); + # [method (setDescriptor : forKeyword :)] pub unsafe fn setDescriptor_forKeyword( &self, descriptor: &NSAppleEventDescriptor, keyword: AEKeyword, - ) { - msg_send![self, setDescriptor: descriptor, forKeyword: keyword] - } + ); + # [method_id (descriptorForKeyword :)] pub unsafe fn descriptorForKeyword( &self, keyword: AEKeyword, - ) -> Option> { - msg_send_id![self, descriptorForKeyword: keyword] - } - pub unsafe fn removeDescriptorWithKeyword(&self, keyword: AEKeyword) { - msg_send![self, removeDescriptorWithKeyword: keyword] - } - pub unsafe fn keywordForDescriptorAtIndex(&self, index: NSInteger) -> AEKeyword { - msg_send![self, keywordForDescriptorAtIndex: index] - } + ) -> Option>; + # [method (removeDescriptorWithKeyword :)] + pub unsafe fn removeDescriptorWithKeyword(&self, keyword: AEKeyword); + # [method (keywordForDescriptorAtIndex :)] + pub unsafe fn keywordForDescriptorAtIndex(&self, index: NSInteger) -> AEKeyword; + # [method_id (coerceToDescriptorType :)] pub unsafe fn coerceToDescriptorType( &self, descriptorType: DescType, - ) -> Option> { - msg_send_id![self, coerceToDescriptorType: descriptorType] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index 8e6f0f7c6..4659c2fa7 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSAppleEventManager; @@ -15,80 +15,51 @@ extern_class!( ); extern_methods!( unsafe impl NSAppleEventManager { - pub unsafe fn sharedAppleEventManager() -> Id { - msg_send_id![Self::class(), sharedAppleEventManager] - } + #[method_id(sharedAppleEventManager)] + pub unsafe fn sharedAppleEventManager() -> Id; + # [method (setEventHandler : andSelector : forEventClass : andEventID :)] pub unsafe fn setEventHandler_andSelector_forEventClass_andEventID( &self, handler: &Object, handleEventSelector: Sel, eventClass: AEEventClass, eventID: AEEventID, - ) { - msg_send![ - self, - setEventHandler: handler, - andSelector: handleEventSelector, - forEventClass: eventClass, - andEventID: eventID - ] - } + ); + # [method (removeEventHandlerForEventClass : andEventID :)] pub unsafe fn removeEventHandlerForEventClass_andEventID( &self, eventClass: AEEventClass, eventID: AEEventID, - ) { - msg_send![ - self, - removeEventHandlerForEventClass: eventClass, - andEventID: eventID - ] - } + ); + # [method (dispatchRawAppleEvent : withRawReply : handlerRefCon :)] pub unsafe fn dispatchRawAppleEvent_withRawReply_handlerRefCon( &self, theAppleEvent: NonNull, theReply: NonNull, handlerRefCon: SRefCon, - ) -> OSErr { - msg_send![ - self, - dispatchRawAppleEvent: theAppleEvent, - withRawReply: theReply, - handlerRefCon: handlerRefCon - ] - } - pub unsafe fn currentAppleEvent(&self) -> Option> { - msg_send_id![self, currentAppleEvent] - } - pub unsafe fn currentReplyAppleEvent(&self) -> Option> { - msg_send_id![self, currentReplyAppleEvent] - } - pub unsafe fn suspendCurrentAppleEvent(&self) -> NSAppleEventManagerSuspensionID { - msg_send![self, suspendCurrentAppleEvent] - } + ) -> OSErr; + #[method_id(currentAppleEvent)] + pub unsafe fn currentAppleEvent(&self) -> Option>; + #[method_id(currentReplyAppleEvent)] + pub unsafe fn currentReplyAppleEvent(&self) -> Option>; + #[method(suspendCurrentAppleEvent)] + pub unsafe fn suspendCurrentAppleEvent(&self) -> NSAppleEventManagerSuspensionID; + # [method_id (appleEventForSuspensionID :)] pub unsafe fn appleEventForSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, - ) -> Id { - msg_send_id![self, appleEventForSuspensionID: suspensionID] - } + ) -> Id; + # [method_id (replyAppleEventForSuspensionID :)] pub unsafe fn replyAppleEventForSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, - ) -> Id { - msg_send_id![self, replyAppleEventForSuspensionID: suspensionID] - } + ) -> Id; + # [method (setCurrentAppleEventAndReplyEventWithSuspensionID :)] pub unsafe fn setCurrentAppleEventAndReplyEventWithSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, - ) { - msg_send![ - self, - setCurrentAppleEventAndReplyEventWithSuspensionID: suspensionID - ] - } - pub unsafe fn resumeWithSuspensionID(&self, suspensionID: NSAppleEventManagerSuspensionID) { - msg_send![self, resumeWithSuspensionID: suspensionID] - } + ); + # [method (resumeWithSuspensionID :)] + pub unsafe fn resumeWithSuspensionID(&self, suspensionID: NSAppleEventManagerSuspensionID); } ); diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index a435eabd1..06d417f84 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSAppleScript; @@ -16,40 +16,33 @@ extern_class!( ); extern_methods!( unsafe impl NSAppleScript { + # [method_id (initWithContentsOfURL : error :)] pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, errorInfo: Option<&mut Option, Shared>>>, - ) -> Option> { - msg_send_id![self, initWithContentsOfURL: url, error: errorInfo] - } - pub unsafe fn initWithSource(&self, source: &NSString) -> Option> { - msg_send_id![self, initWithSource: source] - } - pub unsafe fn source(&self) -> Option> { - msg_send_id![self, source] - } - pub unsafe fn isCompiled(&self) -> bool { - msg_send![self, isCompiled] - } + ) -> Option>; + # [method_id (initWithSource :)] + pub unsafe fn initWithSource(&self, source: &NSString) -> Option>; + #[method_id(source)] + pub unsafe fn source(&self) -> Option>; + #[method(isCompiled)] + pub unsafe fn isCompiled(&self) -> bool; + # [method (compileAndReturnError :)] pub unsafe fn compileAndReturnError( &self, errorInfo: Option<&mut Option, Shared>>>, - ) -> bool { - msg_send![self, compileAndReturnError: errorInfo] - } + ) -> bool; + # [method_id (executeAndReturnError :)] pub unsafe fn executeAndReturnError( &self, errorInfo: Option<&mut Option, Shared>>>, - ) -> Id { - msg_send_id![self, executeAndReturnError: errorInfo] - } + ) -> Id; + # [method_id (executeAppleEvent : error :)] pub unsafe fn executeAppleEvent_error( &self, event: &NSAppleEventDescriptor, errorInfo: Option<&mut Option, Shared>>>, - ) -> Id { - msg_send_id![self, executeAppleEvent: event, error: errorInfo] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 55addd1f0..8c96f192b 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSException::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSArchiver; @@ -18,47 +18,34 @@ extern_class!( ); extern_methods!( unsafe impl NSArchiver { + # [method_id (initForWritingWithMutableData :)] pub unsafe fn initForWritingWithMutableData( &self, mdata: &NSMutableData, - ) -> Id { - msg_send_id![self, initForWritingWithMutableData: mdata] - } - pub unsafe fn archiverData(&self) -> Id { - msg_send_id![self, archiverData] - } - pub unsafe fn encodeRootObject(&self, rootObject: &Object) { - msg_send![self, encodeRootObject: rootObject] - } - pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>) { - msg_send![self, encodeConditionalObject: object] - } - pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id { - msg_send_id![Self::class(), archivedDataWithRootObject: rootObject] - } - pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool { - msg_send![Self::class(), archiveRootObject: rootObject, toFile: path] - } + ) -> Id; + #[method_id(archiverData)] + pub unsafe fn archiverData(&self) -> Id; + # [method (encodeRootObject :)] + pub unsafe fn encodeRootObject(&self, rootObject: &Object); + # [method (encodeConditionalObject :)] + pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>); + # [method_id (archivedDataWithRootObject :)] + pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id; + # [method (archiveRootObject : toFile :)] + pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool; + # [method (encodeClassName : intoClassName :)] pub unsafe fn encodeClassName_intoClassName( &self, trueName: &NSString, inArchiveName: &NSString, - ) { - msg_send![ - self, - encodeClassName: trueName, - intoClassName: inArchiveName - ] - } + ); + # [method_id (classNameEncodedForTrueClassName :)] pub unsafe fn classNameEncodedForTrueClassName( &self, trueName: &NSString, - ) -> Option> { - msg_send_id![self, classNameEncodedForTrueClassName: trueName] - } - pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object) { - msg_send![self, replaceObject: object, withObject: newObject] - } + ) -> Option>; + # [method (replaceObject : withObject :)] + pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object); } ); extern_class!( @@ -70,71 +57,50 @@ extern_class!( ); extern_methods!( unsafe impl NSUnarchiver { - pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Option> { - msg_send_id![self, initForReadingWithData: data] - } - pub unsafe fn setObjectZone(&self, zone: *mut NSZone) { - msg_send![self, setObjectZone: zone] - } - pub unsafe fn objectZone(&self) -> *mut NSZone { - msg_send![self, objectZone] - } - pub unsafe fn isAtEnd(&self) -> bool { - msg_send![self, isAtEnd] - } - pub unsafe fn systemVersion(&self) -> c_uint { - msg_send![self, systemVersion] - } - pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option> { - msg_send_id![Self::class(), unarchiveObjectWithData: data] - } - pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option> { - msg_send_id![Self::class(), unarchiveObjectWithFile: path] - } - pub unsafe fn decodeClassName_asClassName(inArchiveName: &NSString, trueName: &NSString) { - msg_send![ - Self::class(), - decodeClassName: inArchiveName, - asClassName: trueName - ] - } + # [method_id (initForReadingWithData :)] + pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Option>; + # [method (setObjectZone :)] + pub unsafe fn setObjectZone(&self, zone: *mut NSZone); + #[method(objectZone)] + pub unsafe fn objectZone(&self) -> *mut NSZone; + #[method(isAtEnd)] + pub unsafe fn isAtEnd(&self) -> bool; + #[method(systemVersion)] + pub unsafe fn systemVersion(&self) -> c_uint; + # [method_id (unarchiveObjectWithData :)] + pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option>; + # [method_id (unarchiveObjectWithFile :)] + pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option>; + # [method (decodeClassName : asClassName :)] + pub unsafe fn decodeClassName_asClassName(inArchiveName: &NSString, trueName: &NSString); + # [method (decodeClassName : asClassName :)] pub unsafe fn decodeClassName_asClassName( &self, inArchiveName: &NSString, trueName: &NSString, - ) { - msg_send![self, decodeClassName: inArchiveName, asClassName: trueName] - } + ); + # [method_id (classNameDecodedForArchiveClassName :)] pub unsafe fn classNameDecodedForArchiveClassName( inArchiveName: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - classNameDecodedForArchiveClassName: inArchiveName - ] - } + ) -> Id; + # [method_id (classNameDecodedForArchiveClassName :)] pub unsafe fn classNameDecodedForArchiveClassName( &self, inArchiveName: &NSString, - ) -> Id { - msg_send_id![self, classNameDecodedForArchiveClassName: inArchiveName] - } - pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object) { - msg_send![self, replaceObject: object, withObject: newObject] - } + ) -> Id; + # [method (replaceObject : withObject :)] + pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object); } ); extern_methods!( #[doc = "NSArchiverCallback"] unsafe impl NSObject { - pub unsafe fn classForArchiver(&self) -> Option<&Class> { - msg_send![self, classForArchiver] - } + #[method(classForArchiver)] + pub unsafe fn classForArchiver(&self) -> Option<&Class>; + # [method_id (replacementObjectForArchiver :)] pub unsafe fn replacementObjectForArchiver( &self, archiver: &NSArchiver, - ) -> Option> { - msg_send_id![self, replacementObjectForArchiver: archiver] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 1849d0190..7a86e6268 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSArray; @@ -20,391 +20,284 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSArray { - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id { - msg_send_id![self, objectAtIndex: index] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + # [method_id (objectAtIndex :)] + pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithObjects : count :)] pub unsafe fn initWithObjects_count( &self, objects: TodoArray, cnt: NSUInteger, - ) -> Id { - msg_send_id![self, initWithObjects: objects, count: cnt] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedArray"] unsafe impl NSArray { + # [method_id (arrayByAddingObject :)] pub unsafe fn arrayByAddingObject( &self, anObject: &ObjectType, - ) -> Id, Shared> { - msg_send_id![self, arrayByAddingObject: anObject] - } + ) -> Id, Shared>; + # [method_id (arrayByAddingObjectsFromArray :)] pub unsafe fn arrayByAddingObjectsFromArray( &self, otherArray: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, arrayByAddingObjectsFromArray: otherArray] - } - pub unsafe fn componentsJoinedByString( - &self, - separator: &NSString, - ) -> Id { - msg_send_id![self, componentsJoinedByString: separator] - } - pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool { - msg_send![self, containsObject: anObject] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionWithLocale( - &self, - locale: Option<&Object>, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } + ) -> Id, Shared>; + # [method_id (componentsJoinedByString :)] + pub unsafe fn componentsJoinedByString(&self, separator: &NSString) + -> Id; + # [method (containsObject :)] + pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool; + #[method_id(description)] + pub unsafe fn description(&self) -> Id; + # [method_id (descriptionWithLocale :)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + # [method_id (descriptionWithLocale : indent :)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, level: NSUInteger, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale, indent: level] - } + ) -> Id; + # [method_id (firstObjectCommonWithArray :)] pub unsafe fn firstObjectCommonWithArray( &self, otherArray: &NSArray, - ) -> Option> { - msg_send_id![self, firstObjectCommonWithArray: otherArray] - } - pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { - msg_send![self, getObjects: objects, range: range] - } - pub unsafe fn indexOfObject(&self, anObject: &ObjectType) -> NSUInteger { - msg_send![self, indexOfObject: anObject] - } + ) -> Option>; + # [method (getObjects : range :)] + pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange); + # [method (indexOfObject :)] + pub unsafe fn indexOfObject(&self, anObject: &ObjectType) -> NSUInteger; + # [method (indexOfObject : inRange :)] pub unsafe fn indexOfObject_inRange( &self, anObject: &ObjectType, range: NSRange, - ) -> NSUInteger { - msg_send![self, indexOfObject: anObject, inRange: range] - } - pub unsafe fn indexOfObjectIdenticalTo(&self, anObject: &ObjectType) -> NSUInteger { - msg_send![self, indexOfObjectIdenticalTo: anObject] - } + ) -> NSUInteger; + # [method (indexOfObjectIdenticalTo :)] + pub unsafe fn indexOfObjectIdenticalTo(&self, anObject: &ObjectType) -> NSUInteger; + # [method (indexOfObjectIdenticalTo : inRange :)] pub unsafe fn indexOfObjectIdenticalTo_inRange( &self, anObject: &ObjectType, range: NSRange, - ) -> NSUInteger { - msg_send![self, indexOfObjectIdenticalTo: anObject, inRange: range] - } - pub unsafe fn isEqualToArray(&self, otherArray: &NSArray) -> bool { - msg_send![self, isEqualToArray: otherArray] - } - pub unsafe fn firstObject(&self) -> Option> { - msg_send_id![self, firstObject] - } - pub unsafe fn lastObject(&self) -> Option> { - msg_send_id![self, lastObject] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, reverseObjectEnumerator] - } - pub unsafe fn sortedArrayHint(&self) -> Id { - msg_send_id![self, sortedArrayHint] - } + ) -> NSUInteger; + # [method (isEqualToArray :)] + pub unsafe fn isEqualToArray(&self, otherArray: &NSArray) -> bool; + #[method_id(firstObject)] + pub unsafe fn firstObject(&self) -> Option>; + #[method_id(lastObject)] + pub unsafe fn lastObject(&self) -> Option>; + #[method_id(objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + #[method_id(reverseObjectEnumerator)] + pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared>; + #[method_id(sortedArrayHint)] + pub unsafe fn sortedArrayHint(&self) -> Id; + # [method_id (sortedArrayUsingFunction : context :)] pub unsafe fn sortedArrayUsingFunction_context( &self, comparator: NonNull, context: *mut c_void, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingFunction: comparator, context: context] - } + ) -> Id, Shared>; + # [method_id (sortedArrayUsingFunction : context : hint :)] pub unsafe fn sortedArrayUsingFunction_context_hint( &self, comparator: NonNull, context: *mut c_void, hint: Option<&NSData>, - ) -> Id, Shared> { - msg_send_id![ - self, - sortedArrayUsingFunction: comparator, - context: context, - hint: hint - ] - } + ) -> Id, Shared>; + # [method_id (sortedArrayUsingSelector :)] pub unsafe fn sortedArrayUsingSelector( &self, comparator: Sel, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingSelector: comparator] - } - pub unsafe fn subarrayWithRange(&self, range: NSRange) -> Id, Shared> { - msg_send_id![self, subarrayWithRange: range] - } - pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id> { - msg_send![self, writeToURL: url, error: _] - } - pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { - msg_send![self, makeObjectsPerformSelector: aSelector] - } + ) -> Id, Shared>; + # [method_id (subarrayWithRange :)] + pub unsafe fn subarrayWithRange(&self, range: NSRange) -> Id, Shared>; + # [method (writeToURL : error :)] + pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id>; + # [method (makeObjectsPerformSelector :)] + pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel); + # [method (makeObjectsPerformSelector : withObject :)] pub unsafe fn makeObjectsPerformSelector_withObject( &self, aSelector: Sel, argument: Option<&Object>, - ) { - msg_send![ - self, - makeObjectsPerformSelector: aSelector, - withObject: argument - ] - } + ); + # [method_id (objectsAtIndexes :)] pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet, - ) -> Id, Shared> { - msg_send_id![self, objectsAtIndexes: indexes] - } - pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id { - msg_send_id![self, objectAtIndexedSubscript: idx] - } - pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateObjectsUsingBlock: block] - } + ) -> Id, Shared>; + # [method_id (objectAtIndexedSubscript :)] + pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; + # [method (enumerateObjectsUsingBlock :)] + pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); + # [method (enumerateObjectsWithOptions : usingBlock :)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] - } + ); + # [method (enumerateObjectsAtIndexes : options : usingBlock :)] pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( &self, s: &NSIndexSet, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateObjectsAtIndexes: s, - options: opts, - usingBlock: block - ] - } - pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger { - msg_send![self, indexOfObjectPassingTest: predicate] - } + ); + # [method (indexOfObjectPassingTest :)] + pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger; + # [method (indexOfObjectWithOptions : passingTest :)] pub unsafe fn indexOfObjectWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> NSUInteger { - msg_send![self, indexOfObjectWithOptions: opts, passingTest: predicate] - } + ) -> NSUInteger; + # [method (indexOfObjectAtIndexes : options : passingTest :)] pub unsafe fn indexOfObjectAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> NSUInteger { - msg_send![ - self, - indexOfObjectAtIndexes: s, - options: opts, - passingTest: predicate - ] - } + ) -> NSUInteger; + # [method_id (indexesOfObjectsPassingTest :)] pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: TodoBlock, - ) -> Id { - msg_send_id![self, indexesOfObjectsPassingTest: predicate] - } + ) -> Id; + # [method_id (indexesOfObjectsWithOptions : passingTest :)] pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> Id { - msg_send_id![ - self, - indexesOfObjectsWithOptions: opts, - passingTest: predicate - ] - } + ) -> Id; + # [method_id (indexesOfObjectsAtIndexes : options : passingTest :)] pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> Id { - msg_send_id![ - self, - indexesOfObjectsAtIndexes: s, - options: opts, - passingTest: predicate - ] - } + ) -> Id; + # [method_id (sortedArrayUsingComparator :)] pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingComparator: cmptr] - } + ) -> Id, Shared>; + # [method_id (sortedArrayWithOptions : usingComparator :)] pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayWithOptions: opts, usingComparator: cmptr] - } + ) -> Id, Shared>; + # [method (indexOfObject : inSortedRange : options : usingComparator :)] pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, obj: &ObjectType, r: NSRange, opts: NSBinarySearchingOptions, cmp: NSComparator, - ) -> NSUInteger { - msg_send![ - self, - indexOfObject: obj, - inSortedRange: r, - options: opts, - usingComparator: cmp - ] - } + ) -> NSUInteger; } ); extern_methods!( #[doc = "NSArrayCreation"] unsafe impl NSArray { - pub unsafe fn array() -> Id { - msg_send_id![Self::class(), array] - } - pub unsafe fn arrayWithObject(anObject: &ObjectType) -> Id { - msg_send_id![Self::class(), arrayWithObject: anObject] - } + #[method_id(array)] + pub unsafe fn array() -> Id; + # [method_id (arrayWithObject :)] + pub unsafe fn arrayWithObject(anObject: &ObjectType) -> Id; + # [method_id (arrayWithObjects : count :)] pub unsafe fn arrayWithObjects_count( objects: TodoArray, cnt: NSUInteger, - ) -> Id { - msg_send_id![Self::class(), arrayWithObjects: objects, count: cnt] - } - pub unsafe fn arrayWithArray(array: &NSArray) -> Id { - msg_send_id![Self::class(), arrayWithArray: array] - } - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { - msg_send_id![self, initWithArray: array] - } + ) -> Id; + # [method_id (arrayWithArray :)] + pub unsafe fn arrayWithArray(array: &NSArray) -> Id; + # [method_id (initWithArray :)] + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; + # [method_id (initWithArray : copyItems :)] pub unsafe fn initWithArray_copyItems( &self, array: &NSArray, flag: bool, - ) -> Id { - msg_send_id![self, initWithArray: array, copyItems: flag] - } + ) -> Id; + # [method_id (initWithContentsOfURL : error :)] pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, - ) -> Result, Shared>, Id> { - msg_send_id![self, initWithContentsOfURL: url, error: _] - } + ) -> Result, Shared>, Id>; + # [method_id (arrayWithContentsOfURL : error :)] pub unsafe fn arrayWithContentsOfURL_error( url: &NSURL, - ) -> Result, Shared>, Id> { - msg_send_id![Self::class(), arrayWithContentsOfURL: url, error: _] - } + ) -> Result, Shared>, Id>; } ); extern_methods!( #[doc = "NSArrayDiffing"] unsafe impl NSArray { + # [method_id (differenceFromArray : withOptions : usingEquivalenceTest :)] pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( &self, other: &NSArray, options: NSOrderedCollectionDifferenceCalculationOptions, block: TodoBlock, - ) -> Id, Shared> { - msg_send_id![ - self, - differenceFromArray: other, - withOptions: options, - usingEquivalenceTest: block - ] - } + ) -> Id, Shared>; + # [method_id (differenceFromArray : withOptions :)] pub unsafe fn differenceFromArray_withOptions( &self, other: &NSArray, options: NSOrderedCollectionDifferenceCalculationOptions, - ) -> Id, Shared> { - msg_send_id![self, differenceFromArray: other, withOptions: options] - } + ) -> Id, Shared>; + # [method_id (differenceFromArray :)] pub unsafe fn differenceFromArray( &self, other: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, differenceFromArray: other] - } + ) -> Id, Shared>; + # [method_id (arrayByApplyingDifference :)] pub unsafe fn arrayByApplyingDifference( &self, difference: &NSOrderedCollectionDifference, - ) -> Option, Shared>> { - msg_send_id![self, arrayByApplyingDifference: difference] - } + ) -> Option, Shared>>; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSArray { - pub unsafe fn getObjects(&self, objects: TodoArray) { - msg_send![self, getObjects: objects] - } + # [method (getObjects :)] + pub unsafe fn getObjects(&self, objects: TodoArray); + # [method_id (arrayWithContentsOfFile :)] pub unsafe fn arrayWithContentsOfFile( path: &NSString, - ) -> Option, Shared>> { - msg_send_id![Self::class(), arrayWithContentsOfFile: path] - } + ) -> Option, Shared>>; + # [method_id (arrayWithContentsOfURL :)] pub unsafe fn arrayWithContentsOfURL( url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), arrayWithContentsOfURL: url] - } + ) -> Option, Shared>>; + # [method_id (initWithContentsOfFile :)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfFile: path] - } + ) -> Option, Shared>>; + # [method_id (initWithContentsOfURL :)] pub unsafe fn initWithContentsOfURL( &self, url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfURL: url] - } + ) -> Option, Shared>>; + # [method (writeToFile : atomically :)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, - ) -> bool { - msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] - } - pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { - msg_send![self, writeToURL: url, atomically: atomically] - } + ) -> bool; + # [method (writeToURL : atomically :)] + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; } ); __inner_extern_class!( @@ -416,188 +309,140 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMutableArray { - pub unsafe fn addObject(&self, anObject: &ObjectType) { - msg_send![self, addObject: anObject] - } - pub unsafe fn insertObject_atIndex(&self, anObject: &ObjectType, index: NSUInteger) { - msg_send![self, insertObject: anObject, atIndex: index] - } - pub unsafe fn removeLastObject(&self) { - msg_send![self, removeLastObject] - } - pub unsafe fn removeObjectAtIndex(&self, index: NSUInteger) { - msg_send![self, removeObjectAtIndex: index] - } + # [method (addObject :)] + pub unsafe fn addObject(&self, anObject: &ObjectType); + # [method (insertObject : atIndex :)] + pub unsafe fn insertObject_atIndex(&self, anObject: &ObjectType, index: NSUInteger); + #[method(removeLastObject)] + pub unsafe fn removeLastObject(&self); + # [method (removeObjectAtIndex :)] + pub unsafe fn removeObjectAtIndex(&self, index: NSUInteger); + # [method (replaceObjectAtIndex : withObject :)] pub unsafe fn replaceObjectAtIndex_withObject( &self, index: NSUInteger, anObject: &ObjectType, - ) { - msg_send![self, replaceObjectAtIndex: index, withObject: anObject] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: numItems] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ); + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithCapacity :)] + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedMutableArray"] unsafe impl NSMutableArray { - pub unsafe fn addObjectsFromArray(&self, otherArray: &NSArray) { - msg_send![self, addObjectsFromArray: otherArray] - } + # [method (addObjectsFromArray :)] + pub unsafe fn addObjectsFromArray(&self, otherArray: &NSArray); + # [method (exchangeObjectAtIndex : withObjectAtIndex :)] pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( &self, idx1: NSUInteger, idx2: NSUInteger, - ) { - msg_send![self, exchangeObjectAtIndex: idx1, withObjectAtIndex: idx2] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn removeObject_inRange(&self, anObject: &ObjectType, range: NSRange) { - msg_send![self, removeObject: anObject, inRange: range] - } - pub unsafe fn removeObject(&self, anObject: &ObjectType) { - msg_send![self, removeObject: anObject] - } - pub unsafe fn removeObjectIdenticalTo_inRange( - &self, - anObject: &ObjectType, - range: NSRange, - ) { - msg_send![self, removeObjectIdenticalTo: anObject, inRange: range] - } - pub unsafe fn removeObjectIdenticalTo(&self, anObject: &ObjectType) { - msg_send![self, removeObjectIdenticalTo: anObject] - } + ); + #[method(removeAllObjects)] + pub unsafe fn removeAllObjects(&self); + # [method (removeObject : inRange :)] + pub unsafe fn removeObject_inRange(&self, anObject: &ObjectType, range: NSRange); + # [method (removeObject :)] + pub unsafe fn removeObject(&self, anObject: &ObjectType); + # [method (removeObjectIdenticalTo : inRange :)] + pub unsafe fn removeObjectIdenticalTo_inRange(&self, anObject: &ObjectType, range: NSRange); + # [method (removeObjectIdenticalTo :)] + pub unsafe fn removeObjectIdenticalTo(&self, anObject: &ObjectType); + # [method (removeObjectsFromIndices : numIndices :)] pub unsafe fn removeObjectsFromIndices_numIndices( &self, indices: NonNull, cnt: NSUInteger, - ) { - msg_send![self, removeObjectsFromIndices: indices, numIndices: cnt] - } - pub unsafe fn removeObjectsInArray(&self, otherArray: &NSArray) { - msg_send![self, removeObjectsInArray: otherArray] - } - pub unsafe fn removeObjectsInRange(&self, range: NSRange) { - msg_send![self, removeObjectsInRange: range] - } + ); + # [method (removeObjectsInArray :)] + pub unsafe fn removeObjectsInArray(&self, otherArray: &NSArray); + # [method (removeObjectsInRange :)] + pub unsafe fn removeObjectsInRange(&self, range: NSRange); + # [method (replaceObjectsInRange : withObjectsFromArray : range :)] pub unsafe fn replaceObjectsInRange_withObjectsFromArray_range( &self, range: NSRange, otherArray: &NSArray, otherRange: NSRange, - ) { - msg_send![ - self, - replaceObjectsInRange: range, - withObjectsFromArray: otherArray, - range: otherRange - ] - } + ); + # [method (replaceObjectsInRange : withObjectsFromArray :)] pub unsafe fn replaceObjectsInRange_withObjectsFromArray( &self, range: NSRange, otherArray: &NSArray, - ) { - msg_send![ - self, - replaceObjectsInRange: range, - withObjectsFromArray: otherArray - ] - } - pub unsafe fn setArray(&self, otherArray: &NSArray) { - msg_send![self, setArray: otherArray] - } + ); + # [method (setArray :)] + pub unsafe fn setArray(&self, otherArray: &NSArray); + # [method (sortUsingFunction : context :)] pub unsafe fn sortUsingFunction_context( &self, compare: NonNull, context: *mut c_void, - ) { - msg_send![self, sortUsingFunction: compare, context: context] - } - pub unsafe fn sortUsingSelector(&self, comparator: Sel) { - msg_send![self, sortUsingSelector: comparator] - } + ); + # [method (sortUsingSelector :)] + pub unsafe fn sortUsingSelector(&self, comparator: Sel); + # [method (insertObjects : atIndexes :)] pub unsafe fn insertObjects_atIndexes( &self, objects: &NSArray, indexes: &NSIndexSet, - ) { - msg_send![self, insertObjects: objects, atIndexes: indexes] - } - pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet) { - msg_send![self, removeObjectsAtIndexes: indexes] - } + ); + # [method (removeObjectsAtIndexes :)] + pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet); + # [method (replaceObjectsAtIndexes : withObjects :)] pub unsafe fn replaceObjectsAtIndexes_withObjects( &self, indexes: &NSIndexSet, objects: &NSArray, - ) { - msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] - } - pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger) { - msg_send![self, setObject: obj, atIndexedSubscript: idx] - } - pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator) { - msg_send![self, sortUsingComparator: cmptr] - } + ); + # [method (setObject : atIndexedSubscript :)] + pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger); + # [method (sortUsingComparator :)] + pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator); + # [method (sortWithOptions : usingComparator :)] pub unsafe fn sortWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, - ) { - msg_send![self, sortWithOptions: opts, usingComparator: cmptr] - } + ); } ); extern_methods!( #[doc = "NSMutableArrayCreation"] unsafe impl NSMutableArray { - pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id { - msg_send_id![Self::class(), arrayWithCapacity: numItems] - } + # [method_id (arrayWithCapacity :)] + pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id; + # [method_id (arrayWithContentsOfFile :)] pub unsafe fn arrayWithContentsOfFile( path: &NSString, - ) -> Option, Shared>> { - msg_send_id![Self::class(), arrayWithContentsOfFile: path] - } + ) -> Option, Shared>>; + # [method_id (arrayWithContentsOfURL :)] pub unsafe fn arrayWithContentsOfURL( url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), arrayWithContentsOfURL: url] - } + ) -> Option, Shared>>; + # [method_id (initWithContentsOfFile :)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfFile: path] - } + ) -> Option, Shared>>; + # [method_id (initWithContentsOfURL :)] pub unsafe fn initWithContentsOfURL( &self, url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfURL: url] - } + ) -> Option, Shared>>; } ); extern_methods!( #[doc = "NSMutableArrayDiffing"] unsafe impl NSMutableArray { + # [method (applyDifference :)] pub unsafe fn applyDifference( &self, difference: &NSOrderedCollectionDifference, - ) { - msg_send![self, applyDifference: difference] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index 09c3be12d..d56491825 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSAttributedStringKey = NSString; extern_class!( #[derive(Debug)] @@ -14,118 +14,78 @@ extern_class!( ); extern_methods!( unsafe impl NSAttributedString { - pub unsafe fn string(&self) -> Id { - msg_send_id![self, string] - } + #[method_id(string)] + pub unsafe fn string(&self) -> Id; + # [method_id (attributesAtIndex : effectiveRange :)] pub unsafe fn attributesAtIndex_effectiveRange( &self, location: NSUInteger, range: NSRangePointer, - ) -> Id, Shared> { - msg_send_id![self, attributesAtIndex: location, effectiveRange: range] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSExtendedAttributedString"] unsafe impl NSAttributedString { - pub unsafe fn length(&self) -> NSUInteger { - msg_send![self, length] - } + #[method(length)] + pub unsafe fn length(&self) -> NSUInteger; + # [method_id (attribute : atIndex : effectiveRange :)] pub unsafe fn attribute_atIndex_effectiveRange( &self, attrName: &NSAttributedStringKey, location: NSUInteger, range: NSRangePointer, - ) -> Option> { - msg_send_id![ - self, - attribute: attrName, - atIndex: location, - effectiveRange: range - ] - } + ) -> Option>; + # [method_id (attributedSubstringFromRange :)] pub unsafe fn attributedSubstringFromRange( &self, range: NSRange, - ) -> Id { - msg_send_id![self, attributedSubstringFromRange: range] - } + ) -> Id; + # [method_id (attributesAtIndex : longestEffectiveRange : inRange :)] pub unsafe fn attributesAtIndex_longestEffectiveRange_inRange( &self, location: NSUInteger, range: NSRangePointer, rangeLimit: NSRange, - ) -> Id, Shared> { - msg_send_id![ - self, - attributesAtIndex: location, - longestEffectiveRange: range, - inRange: rangeLimit - ] - } + ) -> Id, Shared>; + # [method_id (attribute : atIndex : longestEffectiveRange : inRange :)] pub unsafe fn attribute_atIndex_longestEffectiveRange_inRange( &self, attrName: &NSAttributedStringKey, location: NSUInteger, range: NSRangePointer, rangeLimit: NSRange, - ) -> Option> { - msg_send_id![ - self, - attribute: attrName, - atIndex: location, - longestEffectiveRange: range, - inRange: rangeLimit - ] - } - pub unsafe fn isEqualToAttributedString(&self, other: &NSAttributedString) -> bool { - msg_send![self, isEqualToAttributedString: other] - } - pub unsafe fn initWithString(&self, str: &NSString) -> Id { - msg_send_id![self, initWithString: str] - } + ) -> Option>; + # [method (isEqualToAttributedString :)] + pub unsafe fn isEqualToAttributedString(&self, other: &NSAttributedString) -> bool; + # [method_id (initWithString :)] + pub unsafe fn initWithString(&self, str: &NSString) -> Id; + # [method_id (initWithString : attributes :)] pub unsafe fn initWithString_attributes( &self, str: &NSString, attrs: Option<&NSDictionary>, - ) -> Id { - msg_send_id![self, initWithString: str, attributes: attrs] - } + ) -> Id; + # [method_id (initWithAttributedString :)] pub unsafe fn initWithAttributedString( &self, attrStr: &NSAttributedString, - ) -> Id { - msg_send_id![self, initWithAttributedString: attrStr] - } + ) -> Id; + # [method (enumerateAttributesInRange : options : usingBlock :)] pub unsafe fn enumerateAttributesInRange_options_usingBlock( &self, enumerationRange: NSRange, opts: NSAttributedStringEnumerationOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateAttributesInRange: enumerationRange, - options: opts, - usingBlock: block - ] - } + ); + # [method (enumerateAttribute : inRange : options : usingBlock :)] pub unsafe fn enumerateAttribute_inRange_options_usingBlock( &self, attrName: &NSAttributedStringKey, enumerationRange: NSRange, opts: NSAttributedStringEnumerationOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateAttribute: attrName, - inRange: enumerationRange, - options: opts, - usingBlock: block - ] - } + ); } ); extern_class!( @@ -137,75 +97,58 @@ extern_class!( ); extern_methods!( unsafe impl NSMutableAttributedString { - pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, str: &NSString) { - msg_send![self, replaceCharactersInRange: range, withString: str] - } + # [method (replaceCharactersInRange : withString :)] + pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, str: &NSString); + # [method (setAttributes : range :)] pub unsafe fn setAttributes_range( &self, attrs: Option<&NSDictionary>, range: NSRange, - ) { - msg_send![self, setAttributes: attrs, range: range] - } + ); } ); extern_methods!( #[doc = "NSExtendedMutableAttributedString"] unsafe impl NSMutableAttributedString { - pub unsafe fn mutableString(&self) -> Id { - msg_send_id![self, mutableString] - } + #[method_id(mutableString)] + pub unsafe fn mutableString(&self) -> Id; + # [method (addAttribute : value : range :)] pub unsafe fn addAttribute_value_range( &self, name: &NSAttributedStringKey, value: &Object, range: NSRange, - ) { - msg_send![self, addAttribute: name, value: value, range: range] - } + ); + # [method (addAttributes : range :)] pub unsafe fn addAttributes_range( &self, attrs: &NSDictionary, range: NSRange, - ) { - msg_send![self, addAttributes: attrs, range: range] - } - pub unsafe fn removeAttribute_range(&self, name: &NSAttributedStringKey, range: NSRange) { - msg_send![self, removeAttribute: name, range: range] - } + ); + # [method (removeAttribute : range :)] + pub unsafe fn removeAttribute_range(&self, name: &NSAttributedStringKey, range: NSRange); + # [method (replaceCharactersInRange : withAttributedString :)] pub unsafe fn replaceCharactersInRange_withAttributedString( &self, range: NSRange, attrString: &NSAttributedString, - ) { - msg_send![ - self, - replaceCharactersInRange: range, - withAttributedString: attrString - ] - } + ); + # [method (insertAttributedString : atIndex :)] pub unsafe fn insertAttributedString_atIndex( &self, attrString: &NSAttributedString, loc: NSUInteger, - ) { - msg_send![self, insertAttributedString: attrString, atIndex: loc] - } - pub unsafe fn appendAttributedString(&self, attrString: &NSAttributedString) { - msg_send![self, appendAttributedString: attrString] - } - pub unsafe fn deleteCharactersInRange(&self, range: NSRange) { - msg_send![self, deleteCharactersInRange: range] - } - pub unsafe fn setAttributedString(&self, attrString: &NSAttributedString) { - msg_send![self, setAttributedString: attrString] - } - pub unsafe fn beginEditing(&self) { - msg_send![self, beginEditing] - } - pub unsafe fn endEditing(&self) { - msg_send![self, endEditing] - } + ); + # [method (appendAttributedString :)] + pub unsafe fn appendAttributedString(&self, attrString: &NSAttributedString); + # [method (deleteCharactersInRange :)] + pub unsafe fn deleteCharactersInRange(&self, range: NSRange); + # [method (setAttributedString :)] + pub unsafe fn setAttributedString(&self, attrString: &NSAttributedString); + #[method(beginEditing)] + pub unsafe fn beginEditing(&self); + #[method(endEditing)] + pub unsafe fn endEditing(&self); } ); extern_class!( @@ -217,106 +160,69 @@ extern_class!( ); extern_methods!( unsafe impl NSAttributedStringMarkdownParsingOptions { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn allowsExtendedAttributes(&self) -> bool { - msg_send![self, allowsExtendedAttributes] - } - pub unsafe fn setAllowsExtendedAttributes(&self, allowsExtendedAttributes: bool) { - msg_send![self, setAllowsExtendedAttributes: allowsExtendedAttributes] - } - pub unsafe fn interpretedSyntax(&self) -> NSAttributedStringMarkdownInterpretedSyntax { - msg_send![self, interpretedSyntax] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method(allowsExtendedAttributes)] + pub unsafe fn allowsExtendedAttributes(&self) -> bool; + # [method (setAllowsExtendedAttributes :)] + pub unsafe fn setAllowsExtendedAttributes(&self, allowsExtendedAttributes: bool); + #[method(interpretedSyntax)] + pub unsafe fn interpretedSyntax(&self) -> NSAttributedStringMarkdownInterpretedSyntax; + # [method (setInterpretedSyntax :)] pub unsafe fn setInterpretedSyntax( &self, interpretedSyntax: NSAttributedStringMarkdownInterpretedSyntax, - ) { - msg_send![self, setInterpretedSyntax: interpretedSyntax] - } - pub unsafe fn failurePolicy(&self) -> NSAttributedStringMarkdownParsingFailurePolicy { - msg_send![self, failurePolicy] - } + ); + #[method(failurePolicy)] + pub unsafe fn failurePolicy(&self) -> NSAttributedStringMarkdownParsingFailurePolicy; + # [method (setFailurePolicy :)] pub unsafe fn setFailurePolicy( &self, failurePolicy: NSAttributedStringMarkdownParsingFailurePolicy, - ) { - msg_send![self, setFailurePolicy: failurePolicy] - } - pub unsafe fn languageCode(&self) -> Option> { - msg_send_id![self, languageCode] - } - pub unsafe fn setLanguageCode(&self, languageCode: Option<&NSString>) { - msg_send![self, setLanguageCode: languageCode] - } + ); + #[method_id(languageCode)] + pub unsafe fn languageCode(&self) -> Option>; + # [method (setLanguageCode :)] + pub unsafe fn setLanguageCode(&self, languageCode: Option<&NSString>); } ); extern_methods!( #[doc = "NSAttributedStringCreateFromMarkdown"] unsafe impl NSAttributedString { + # [method_id (initWithContentsOfMarkdownFileAtURL : options : baseURL : error :)] pub unsafe fn initWithContentsOfMarkdownFileAtURL_options_baseURL_error( &self, markdownFile: &NSURL, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, - ) -> Result, Id> { - msg_send_id![ - self, - initWithContentsOfMarkdownFileAtURL: markdownFile, - options: options, - baseURL: baseURL, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (initWithMarkdown : options : baseURL : error :)] pub unsafe fn initWithMarkdown_options_baseURL_error( &self, markdown: &NSData, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, - ) -> Result, Id> { - msg_send_id![ - self, - initWithMarkdown: markdown, - options: options, - baseURL: baseURL, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (initWithMarkdownString : options : baseURL : error :)] pub unsafe fn initWithMarkdownString_options_baseURL_error( &self, markdownString: &NSString, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, - ) -> Result, Id> { - msg_send_id![ - self, - initWithMarkdownString: markdownString, - options: options, - baseURL: baseURL, - error: _ - ] - } + ) -> Result, Id>; } ); extern_methods!( #[doc = "NSAttributedStringFormatting"] unsafe impl NSAttributedString { + # [method_id (initWithFormat : options : locale : arguments :)] pub unsafe fn initWithFormat_options_locale_arguments( &self, format: &NSAttributedString, options: NSAttributedStringFormattingOptions, locale: Option<&NSLocale>, arguments: va_list, - ) -> Id { - msg_send_id![ - self, - initWithFormat: format, - options: options, - locale: locale, - arguments: arguments - ] - } + ) -> Id; } ); extern_methods!( @@ -326,9 +232,8 @@ extern_methods!( extern_methods!( #[doc = "NSMorphology"] unsafe impl NSAttributedString { - pub unsafe fn attributedStringByInflectingString(&self) -> Id { - msg_send_id![self, attributedStringByInflectingString] - } + #[method_id(attributedStringByInflectingString)] + pub unsafe fn attributedStringByInflectingString(&self) -> Id; } ); extern_class!( @@ -340,181 +245,99 @@ extern_class!( ); extern_methods!( unsafe impl NSPresentationIntent { - pub unsafe fn intentKind(&self) -> NSPresentationIntentKind { - msg_send![self, intentKind] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn parentIntent(&self) -> Option> { - msg_send_id![self, parentIntent] - } + #[method(intentKind)] + pub unsafe fn intentKind(&self) -> NSPresentationIntentKind; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(parentIntent)] + pub unsafe fn parentIntent(&self) -> Option>; + # [method_id (paragraphIntentWithIdentity : nestedInsideIntent :)] pub unsafe fn paragraphIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - paragraphIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (headerIntentWithIdentity : level : nestedInsideIntent :)] pub unsafe fn headerIntentWithIdentity_level_nestedInsideIntent( identity: NSInteger, level: NSInteger, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - headerIntentWithIdentity: identity, - level: level, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (codeBlockIntentWithIdentity : languageHint : nestedInsideIntent :)] pub unsafe fn codeBlockIntentWithIdentity_languageHint_nestedInsideIntent( identity: NSInteger, languageHint: Option<&NSString>, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - codeBlockIntentWithIdentity: identity, - languageHint: languageHint, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (thematicBreakIntentWithIdentity : nestedInsideIntent :)] pub unsafe fn thematicBreakIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - thematicBreakIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (orderedListIntentWithIdentity : nestedInsideIntent :)] pub unsafe fn orderedListIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - orderedListIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (unorderedListIntentWithIdentity : nestedInsideIntent :)] pub unsafe fn unorderedListIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - unorderedListIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (listItemIntentWithIdentity : ordinal : nestedInsideIntent :)] pub unsafe fn listItemIntentWithIdentity_ordinal_nestedInsideIntent( identity: NSInteger, ordinal: NSInteger, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - listItemIntentWithIdentity: identity, - ordinal: ordinal, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (blockQuoteIntentWithIdentity : nestedInsideIntent :)] pub unsafe fn blockQuoteIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - blockQuoteIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (tableIntentWithIdentity : columnCount : alignments : nestedInsideIntent :)] pub unsafe fn tableIntentWithIdentity_columnCount_alignments_nestedInsideIntent( identity: NSInteger, columnCount: NSInteger, alignments: &NSArray, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - tableIntentWithIdentity: identity, - columnCount: columnCount, - alignments: alignments, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (tableHeaderRowIntentWithIdentity : nestedInsideIntent :)] pub unsafe fn tableHeaderRowIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - tableHeaderRowIntentWithIdentity: identity, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (tableRowIntentWithIdentity : row : nestedInsideIntent :)] pub unsafe fn tableRowIntentWithIdentity_row_nestedInsideIntent( identity: NSInteger, row: NSInteger, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - tableRowIntentWithIdentity: identity, - row: row, - nestedInsideIntent: parent - ] - } + ) -> Id; + # [method_id (tableCellIntentWithIdentity : column : nestedInsideIntent :)] pub unsafe fn tableCellIntentWithIdentity_column_nestedInsideIntent( identity: NSInteger, column: NSInteger, parent: Option<&NSPresentationIntent>, - ) -> Id { - msg_send_id![ - Self::class(), - tableCellIntentWithIdentity: identity, - column: column, - nestedInsideIntent: parent - ] - } - pub unsafe fn identity(&self) -> NSInteger { - msg_send![self, identity] - } - pub unsafe fn ordinal(&self) -> NSInteger { - msg_send![self, ordinal] - } - pub unsafe fn columnAlignments(&self) -> Option, Shared>> { - msg_send_id![self, columnAlignments] - } - pub unsafe fn columnCount(&self) -> NSInteger { - msg_send![self, columnCount] - } - pub unsafe fn headerLevel(&self) -> NSInteger { - msg_send![self, headerLevel] - } - pub unsafe fn languageHint(&self) -> Option> { - msg_send_id![self, languageHint] - } - pub unsafe fn column(&self) -> NSInteger { - msg_send![self, column] - } - pub unsafe fn row(&self) -> NSInteger { - msg_send![self, row] - } - pub unsafe fn indentationLevel(&self) -> NSInteger { - msg_send![self, indentationLevel] - } - pub unsafe fn isEquivalentToPresentationIntent( - &self, - other: &NSPresentationIntent, - ) -> bool { - msg_send![self, isEquivalentToPresentationIntent: other] - } + ) -> Id; + #[method(identity)] + pub unsafe fn identity(&self) -> NSInteger; + #[method(ordinal)] + pub unsafe fn ordinal(&self) -> NSInteger; + #[method_id(columnAlignments)] + pub unsafe fn columnAlignments(&self) -> Option, Shared>>; + #[method(columnCount)] + pub unsafe fn columnCount(&self) -> NSInteger; + #[method(headerLevel)] + pub unsafe fn headerLevel(&self) -> NSInteger; + #[method_id(languageHint)] + pub unsafe fn languageHint(&self) -> Option>; + #[method(column)] + pub unsafe fn column(&self) -> NSInteger; + #[method(row)] + pub unsafe fn row(&self) -> NSInteger; + #[method(indentationLevel)] + pub unsafe fn indentationLevel(&self) -> NSInteger; + # [method (isEquivalentToPresentationIntent :)] + pub unsafe fn isEquivalentToPresentationIntent(&self, other: &NSPresentationIntent) + -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs index b6063842e..9e4089ac9 100644 --- a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSAutoreleasePool; @@ -12,14 +12,11 @@ extern_class!( ); extern_methods!( unsafe impl NSAutoreleasePool { - pub unsafe fn addObject(anObject: &Object) { - msg_send![Self::class(), addObject: anObject] - } - pub unsafe fn addObject(&self, anObject: &Object) { - msg_send![self, addObject: anObject] - } - pub unsafe fn drain(&self) { - msg_send![self, drain] - } + # [method (addObject :)] + pub unsafe fn addObject(anObject: &Object); + # [method (addObject :)] + pub unsafe fn addObject(&self, anObject: &Object); + #[method(drain)] + pub unsafe fn drain(&self); } ); diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index f0f9fa33d..d14ca5500 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSBackgroundActivityScheduler; @@ -14,44 +14,31 @@ extern_class!( ); extern_methods!( unsafe impl NSBackgroundActivityScheduler { - pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id { - msg_send_id![self, initWithIdentifier: identifier] - } - pub unsafe fn identifier(&self) -> Id { - msg_send_id![self, identifier] - } - pub unsafe fn qualityOfService(&self) -> NSQualityOfService { - msg_send![self, qualityOfService] - } - pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { - msg_send![self, setQualityOfService: qualityOfService] - } - pub unsafe fn repeats(&self) -> bool { - msg_send![self, repeats] - } - pub unsafe fn setRepeats(&self, repeats: bool) { - msg_send![self, setRepeats: repeats] - } - pub unsafe fn interval(&self) -> NSTimeInterval { - msg_send![self, interval] - } - pub unsafe fn setInterval(&self, interval: NSTimeInterval) { - msg_send![self, setInterval: interval] - } - pub unsafe fn tolerance(&self) -> NSTimeInterval { - msg_send![self, tolerance] - } - pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval) { - msg_send![self, setTolerance: tolerance] - } - pub unsafe fn scheduleWithBlock(&self, block: TodoBlock) { - msg_send![self, scheduleWithBlock: block] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn shouldDefer(&self) -> bool { - msg_send![self, shouldDefer] - } + # [method_id (initWithIdentifier :)] + pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id; + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Id; + #[method(qualityOfService)] + pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + # [method (setQualityOfService :)] + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); + #[method(repeats)] + pub unsafe fn repeats(&self) -> bool; + # [method (setRepeats :)] + pub unsafe fn setRepeats(&self, repeats: bool); + #[method(interval)] + pub unsafe fn interval(&self) -> NSTimeInterval; + # [method (setInterval :)] + pub unsafe fn setInterval(&self, interval: NSTimeInterval); + #[method(tolerance)] + pub unsafe fn tolerance(&self) -> NSTimeInterval; + # [method (setTolerance :)] + pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval); + # [method (scheduleWithBlock :)] + pub unsafe fn scheduleWithBlock(&self, block: TodoBlock); + #[method(invalidate)] + pub unsafe fn invalidate(&self); + #[method(shouldDefer)] + pub unsafe fn shouldDefer(&self) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 47f385858..ffb54220f 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -14,7 +14,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSBundle; @@ -24,357 +24,224 @@ extern_class!( ); extern_methods!( unsafe impl NSBundle { - pub unsafe fn mainBundle() -> Id { - msg_send_id![Self::class(), mainBundle] - } - pub unsafe fn bundleWithPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), bundleWithPath: path] - } - pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithPath: path] - } - pub unsafe fn bundleWithURL(url: &NSURL) -> Option> { - msg_send_id![Self::class(), bundleWithURL: url] - } - pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithURL: url] - } - pub unsafe fn bundleForClass(aClass: &Class) -> Id { - msg_send_id![Self::class(), bundleForClass: aClass] - } - pub unsafe fn bundleWithIdentifier(identifier: &NSString) -> Option> { - msg_send_id![Self::class(), bundleWithIdentifier: identifier] - } - pub unsafe fn allBundles() -> Id, Shared> { - msg_send_id![Self::class(), allBundles] - } - pub unsafe fn allFrameworks() -> Id, Shared> { - msg_send_id![Self::class(), allFrameworks] - } - pub unsafe fn load(&self) -> bool { - msg_send![self, load] - } - pub unsafe fn isLoaded(&self) -> bool { - msg_send![self, isLoaded] - } - pub unsafe fn unload(&self) -> bool { - msg_send![self, unload] - } - pub unsafe fn preflightAndReturnError(&self) -> Result<(), Id> { - msg_send![self, preflightAndReturnError: _] - } - pub unsafe fn loadAndReturnError(&self) -> Result<(), Id> { - msg_send![self, loadAndReturnError: _] - } - pub unsafe fn bundleURL(&self) -> Id { - msg_send_id![self, bundleURL] - } - pub unsafe fn resourceURL(&self) -> Option> { - msg_send_id![self, resourceURL] - } - pub unsafe fn executableURL(&self) -> Option> { - msg_send_id![self, executableURL] - } + #[method_id(mainBundle)] + pub unsafe fn mainBundle() -> Id; + # [method_id (bundleWithPath :)] + pub unsafe fn bundleWithPath(path: &NSString) -> Option>; + # [method_id (initWithPath :)] + pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; + # [method_id (bundleWithURL :)] + pub unsafe fn bundleWithURL(url: &NSURL) -> Option>; + # [method_id (initWithURL :)] + pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; + # [method_id (bundleForClass :)] + pub unsafe fn bundleForClass(aClass: &Class) -> Id; + # [method_id (bundleWithIdentifier :)] + pub unsafe fn bundleWithIdentifier(identifier: &NSString) -> Option>; + #[method_id(allBundles)] + pub unsafe fn allBundles() -> Id, Shared>; + #[method_id(allFrameworks)] + pub unsafe fn allFrameworks() -> Id, Shared>; + #[method(load)] + pub unsafe fn load(&self) -> bool; + #[method(isLoaded)] + pub unsafe fn isLoaded(&self) -> bool; + #[method(unload)] + pub unsafe fn unload(&self) -> bool; + # [method (preflightAndReturnError :)] + pub unsafe fn preflightAndReturnError(&self) -> Result<(), Id>; + # [method (loadAndReturnError :)] + pub unsafe fn loadAndReturnError(&self) -> Result<(), Id>; + #[method_id(bundleURL)] + pub unsafe fn bundleURL(&self) -> Id; + #[method_id(resourceURL)] + pub unsafe fn resourceURL(&self) -> Option>; + #[method_id(executableURL)] + pub unsafe fn executableURL(&self) -> Option>; + # [method_id (URLForAuxiliaryExecutable :)] pub unsafe fn URLForAuxiliaryExecutable( &self, executableName: &NSString, - ) -> Option> { - msg_send_id![self, URLForAuxiliaryExecutable: executableName] - } - pub unsafe fn privateFrameworksURL(&self) -> Option> { - msg_send_id![self, privateFrameworksURL] - } - pub unsafe fn sharedFrameworksURL(&self) -> Option> { - msg_send_id![self, sharedFrameworksURL] - } - pub unsafe fn sharedSupportURL(&self) -> Option> { - msg_send_id![self, sharedSupportURL] - } - pub unsafe fn builtInPlugInsURL(&self) -> Option> { - msg_send_id![self, builtInPlugInsURL] - } - pub unsafe fn appStoreReceiptURL(&self) -> Option> { - msg_send_id![self, appStoreReceiptURL] - } - pub unsafe fn bundlePath(&self) -> Id { - msg_send_id![self, bundlePath] - } - pub unsafe fn resourcePath(&self) -> Option> { - msg_send_id![self, resourcePath] - } - pub unsafe fn executablePath(&self) -> Option> { - msg_send_id![self, executablePath] - } + ) -> Option>; + #[method_id(privateFrameworksURL)] + pub unsafe fn privateFrameworksURL(&self) -> Option>; + #[method_id(sharedFrameworksURL)] + pub unsafe fn sharedFrameworksURL(&self) -> Option>; + #[method_id(sharedSupportURL)] + pub unsafe fn sharedSupportURL(&self) -> Option>; + #[method_id(builtInPlugInsURL)] + pub unsafe fn builtInPlugInsURL(&self) -> Option>; + #[method_id(appStoreReceiptURL)] + pub unsafe fn appStoreReceiptURL(&self) -> Option>; + #[method_id(bundlePath)] + pub unsafe fn bundlePath(&self) -> Id; + #[method_id(resourcePath)] + pub unsafe fn resourcePath(&self) -> Option>; + #[method_id(executablePath)] + pub unsafe fn executablePath(&self) -> Option>; + # [method_id (pathForAuxiliaryExecutable :)] pub unsafe fn pathForAuxiliaryExecutable( &self, executableName: &NSString, - ) -> Option> { - msg_send_id![self, pathForAuxiliaryExecutable: executableName] - } - pub unsafe fn privateFrameworksPath(&self) -> Option> { - msg_send_id![self, privateFrameworksPath] - } - pub unsafe fn sharedFrameworksPath(&self) -> Option> { - msg_send_id![self, sharedFrameworksPath] - } - pub unsafe fn sharedSupportPath(&self) -> Option> { - msg_send_id![self, sharedSupportPath] - } - pub unsafe fn builtInPlugInsPath(&self) -> Option> { - msg_send_id![self, builtInPlugInsPath] - } + ) -> Option>; + #[method_id(privateFrameworksPath)] + pub unsafe fn privateFrameworksPath(&self) -> Option>; + #[method_id(sharedFrameworksPath)] + pub unsafe fn sharedFrameworksPath(&self) -> Option>; + #[method_id(sharedSupportPath)] + pub unsafe fn sharedSupportPath(&self) -> Option>; + #[method_id(builtInPlugInsPath)] + pub unsafe fn builtInPlugInsPath(&self) -> Option>; + # [method_id (URLForResource : withExtension : subdirectory : inBundleWithURL :)] pub unsafe fn URLForResource_withExtension_subdirectory_inBundleWithURL( name: Option<&NSString>, ext: Option<&NSString>, subpath: Option<&NSString>, bundleURL: &NSURL, - ) -> Option> { - msg_send_id![ - Self::class(), - URLForResource: name, - withExtension: ext, - subdirectory: subpath, - inBundleWithURL: bundleURL - ] - } + ) -> Option>; + # [method_id (URLsForResourcesWithExtension : subdirectory : inBundleWithURL :)] pub unsafe fn URLsForResourcesWithExtension_subdirectory_inBundleWithURL( ext: Option<&NSString>, subpath: Option<&NSString>, bundleURL: &NSURL, - ) -> Option, Shared>> { - msg_send_id![ - Self::class(), - URLsForResourcesWithExtension: ext, - subdirectory: subpath, - inBundleWithURL: bundleURL - ] - } + ) -> Option, Shared>>; + # [method_id (URLForResource : withExtension :)] pub unsafe fn URLForResource_withExtension( &self, name: Option<&NSString>, ext: Option<&NSString>, - ) -> Option> { - msg_send_id![self, URLForResource: name, withExtension: ext] - } + ) -> Option>; + # [method_id (URLForResource : withExtension : subdirectory :)] pub unsafe fn URLForResource_withExtension_subdirectory( &self, name: Option<&NSString>, ext: Option<&NSString>, subpath: Option<&NSString>, - ) -> Option> { - msg_send_id![ - self, - URLForResource: name, - withExtension: ext, - subdirectory: subpath - ] - } + ) -> Option>; + # [method_id (URLForResource : withExtension : subdirectory : localization :)] pub unsafe fn URLForResource_withExtension_subdirectory_localization( &self, name: Option<&NSString>, ext: Option<&NSString>, subpath: Option<&NSString>, localizationName: Option<&NSString>, - ) -> Option> { - msg_send_id![ - self, - URLForResource: name, - withExtension: ext, - subdirectory: subpath, - localization: localizationName - ] - } + ) -> Option>; + # [method_id (URLsForResourcesWithExtension : subdirectory :)] pub unsafe fn URLsForResourcesWithExtension_subdirectory( &self, ext: Option<&NSString>, subpath: Option<&NSString>, - ) -> Option, Shared>> { - msg_send_id![ - self, - URLsForResourcesWithExtension: ext, - subdirectory: subpath - ] - } + ) -> Option, Shared>>; + # [method_id (URLsForResourcesWithExtension : subdirectory : localization :)] pub unsafe fn URLsForResourcesWithExtension_subdirectory_localization( &self, ext: Option<&NSString>, subpath: Option<&NSString>, localizationName: Option<&NSString>, - ) -> Option, Shared>> { - msg_send_id![ - self, - URLsForResourcesWithExtension: ext, - subdirectory: subpath, - localization: localizationName - ] - } + ) -> Option, Shared>>; + # [method_id (pathForResource : ofType : inDirectory :)] pub unsafe fn pathForResource_ofType_inDirectory( name: Option<&NSString>, ext: Option<&NSString>, bundlePath: &NSString, - ) -> Option> { - msg_send_id![ - Self::class(), - pathForResource: name, - ofType: ext, - inDirectory: bundlePath - ] - } + ) -> Option>; + # [method_id (pathsForResourcesOfType : inDirectory :)] pub unsafe fn pathsForResourcesOfType_inDirectory( ext: Option<&NSString>, bundlePath: &NSString, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - pathsForResourcesOfType: ext, - inDirectory: bundlePath - ] - } + ) -> Id, Shared>; + # [method_id (pathForResource : ofType :)] pub unsafe fn pathForResource_ofType( &self, name: Option<&NSString>, ext: Option<&NSString>, - ) -> Option> { - msg_send_id![self, pathForResource: name, ofType: ext] - } + ) -> Option>; + # [method_id (pathForResource : ofType : inDirectory :)] pub unsafe fn pathForResource_ofType_inDirectory( &self, name: Option<&NSString>, ext: Option<&NSString>, subpath: Option<&NSString>, - ) -> Option> { - msg_send_id![ - self, - pathForResource: name, - ofType: ext, - inDirectory: subpath - ] - } + ) -> Option>; + # [method_id (pathForResource : ofType : inDirectory : forLocalization :)] pub unsafe fn pathForResource_ofType_inDirectory_forLocalization( &self, name: Option<&NSString>, ext: Option<&NSString>, subpath: Option<&NSString>, localizationName: Option<&NSString>, - ) -> Option> { - msg_send_id![ - self, - pathForResource: name, - ofType: ext, - inDirectory: subpath, - forLocalization: localizationName - ] - } + ) -> Option>; + # [method_id (pathsForResourcesOfType : inDirectory :)] pub unsafe fn pathsForResourcesOfType_inDirectory( &self, ext: Option<&NSString>, subpath: Option<&NSString>, - ) -> Id, Shared> { - msg_send_id![self, pathsForResourcesOfType: ext, inDirectory: subpath] - } + ) -> Id, Shared>; + # [method_id (pathsForResourcesOfType : inDirectory : forLocalization :)] pub unsafe fn pathsForResourcesOfType_inDirectory_forLocalization( &self, ext: Option<&NSString>, subpath: Option<&NSString>, localizationName: Option<&NSString>, - ) -> Id, Shared> { - msg_send_id![ - self, - pathsForResourcesOfType: ext, - inDirectory: subpath, - forLocalization: localizationName - ] - } + ) -> Id, Shared>; + # [method_id (localizedStringForKey : value : table :)] pub unsafe fn localizedStringForKey_value_table( &self, key: &NSString, value: Option<&NSString>, tableName: Option<&NSString>, - ) -> Id { - msg_send_id![ - self, - localizedStringForKey: key, - value: value, - table: tableName - ] - } + ) -> Id; + # [method_id (localizedAttributedStringForKey : value : table :)] pub unsafe fn localizedAttributedStringForKey_value_table( &self, key: &NSString, value: Option<&NSString>, tableName: Option<&NSString>, - ) -> Id { - msg_send_id![ - self, - localizedAttributedStringForKey: key, - value: value, - table: tableName - ] - } - pub unsafe fn bundleIdentifier(&self) -> Option> { - msg_send_id![self, bundleIdentifier] - } - pub unsafe fn infoDictionary(&self) -> Option, Shared>> { - msg_send_id![self, infoDictionary] - } + ) -> Id; + #[method_id(bundleIdentifier)] + pub unsafe fn bundleIdentifier(&self) -> Option>; + #[method_id(infoDictionary)] + pub unsafe fn infoDictionary(&self) -> Option, Shared>>; + #[method_id(localizedInfoDictionary)] pub unsafe fn localizedInfoDictionary( &self, - ) -> Option, Shared>> { - msg_send_id![self, localizedInfoDictionary] - } + ) -> Option, Shared>>; + # [method_id (objectForInfoDictionaryKey :)] pub unsafe fn objectForInfoDictionaryKey( &self, key: &NSString, - ) -> Option> { - msg_send_id![self, objectForInfoDictionaryKey: key] - } - pub unsafe fn classNamed(&self, className: &NSString) -> Option<&Class> { - msg_send![self, classNamed: className] - } - pub unsafe fn principalClass(&self) -> Option<&Class> { - msg_send![self, principalClass] - } - pub unsafe fn preferredLocalizations(&self) -> Id, Shared> { - msg_send_id![self, preferredLocalizations] - } - pub unsafe fn localizations(&self) -> Id, Shared> { - msg_send_id![self, localizations] - } - pub unsafe fn developmentLocalization(&self) -> Option> { - msg_send_id![self, developmentLocalization] - } + ) -> Option>; + # [method (classNamed :)] + pub unsafe fn classNamed(&self, className: &NSString) -> Option<&Class>; + #[method(principalClass)] + pub unsafe fn principalClass(&self) -> Option<&Class>; + #[method_id(preferredLocalizations)] + pub unsafe fn preferredLocalizations(&self) -> Id, Shared>; + #[method_id(localizations)] + pub unsafe fn localizations(&self) -> Id, Shared>; + #[method_id(developmentLocalization)] + pub unsafe fn developmentLocalization(&self) -> Option>; + # [method_id (preferredLocalizationsFromArray :)] pub unsafe fn preferredLocalizationsFromArray( localizationsArray: &NSArray, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - preferredLocalizationsFromArray: localizationsArray - ] - } + ) -> Id, Shared>; + # [method_id (preferredLocalizationsFromArray : forPreferences :)] pub unsafe fn preferredLocalizationsFromArray_forPreferences( localizationsArray: &NSArray, preferencesArray: Option<&NSArray>, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - preferredLocalizationsFromArray: localizationsArray, - forPreferences: preferencesArray - ] - } - pub unsafe fn executableArchitectures(&self) -> Option, Shared>> { - msg_send_id![self, executableArchitectures] - } + ) -> Id, Shared>; + #[method_id(executableArchitectures)] + pub unsafe fn executableArchitectures(&self) -> Option, Shared>>; } ); extern_methods!( #[doc = "NSBundleExtensionMethods"] unsafe impl NSString { + # [method_id (variantFittingPresentationWidth :)] pub unsafe fn variantFittingPresentationWidth( &self, width: NSInteger, - ) -> Id { - msg_send_id![self, variantFittingPresentationWidth: width] - } + ) -> Id; } ); extern_class!( @@ -386,69 +253,50 @@ extern_class!( ); extern_methods!( unsafe impl NSBundleResourceRequest { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithTags(&self, tags: &NSSet) -> Id { - msg_send_id![self, initWithTags: tags] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithTags :)] + pub unsafe fn initWithTags(&self, tags: &NSSet) -> Id; + # [method_id (initWithTags : bundle :)] pub unsafe fn initWithTags_bundle( &self, tags: &NSSet, bundle: &NSBundle, - ) -> Id { - msg_send_id![self, initWithTags: tags, bundle: bundle] - } - pub unsafe fn loadingPriority(&self) -> c_double { - msg_send![self, loadingPriority] - } - pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double) { - msg_send![self, setLoadingPriority: loadingPriority] - } - pub unsafe fn tags(&self) -> Id, Shared> { - msg_send_id![self, tags] - } - pub unsafe fn bundle(&self) -> Id { - msg_send_id![self, bundle] - } + ) -> Id; + #[method(loadingPriority)] + pub unsafe fn loadingPriority(&self) -> c_double; + # [method (setLoadingPriority :)] + pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double); + #[method_id(tags)] + pub unsafe fn tags(&self) -> Id, Shared>; + #[method_id(bundle)] + pub unsafe fn bundle(&self) -> Id; + # [method (beginAccessingResourcesWithCompletionHandler :)] pub unsafe fn beginAccessingResourcesWithCompletionHandler( &self, completionHandler: TodoBlock, - ) { - msg_send![ - self, - beginAccessingResourcesWithCompletionHandler: completionHandler - ] - } + ); + # [method (conditionallyBeginAccessingResourcesWithCompletionHandler :)] pub unsafe fn conditionallyBeginAccessingResourcesWithCompletionHandler( &self, completionHandler: TodoBlock, - ) { - msg_send![ - self, - conditionallyBeginAccessingResourcesWithCompletionHandler: completionHandler - ] - } - pub unsafe fn endAccessingResources(&self) { - msg_send![self, endAccessingResources] - } - pub unsafe fn progress(&self) -> Id { - msg_send_id![self, progress] - } + ); + #[method(endAccessingResources)] + pub unsafe fn endAccessingResources(&self); + #[method_id(progress)] + pub unsafe fn progress(&self) -> Id; } ); extern_methods!( #[doc = "NSBundleResourceRequestAdditions"] unsafe impl NSBundle { + # [method (setPreservationPriority : forTags :)] pub unsafe fn setPreservationPriority_forTags( &self, priority: c_double, tags: &NSSet, - ) { - msg_send![self, setPreservationPriority: priority, forTags: tags] - } - pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double { - msg_send![self, preservationPriorityForTag: tag] - } + ); + # [method (preservationPriorityForTag :)] + pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double; } ); diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 4db8aa132..4423a1ffa 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSMeasurement::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSByteCountFormatter; @@ -13,97 +13,63 @@ extern_class!( ); extern_methods!( unsafe impl NSByteCountFormatter { + # [method_id (stringFromByteCount : countStyle :)] pub unsafe fn stringFromByteCount_countStyle( byteCount: c_longlong, countStyle: NSByteCountFormatterCountStyle, - ) -> Id { - msg_send_id![ - Self::class(), - stringFromByteCount: byteCount, - countStyle: countStyle - ] - } - pub unsafe fn stringFromByteCount(&self, byteCount: c_longlong) -> Id { - msg_send_id![self, stringFromByteCount: byteCount] - } + ) -> Id; + # [method_id (stringFromByteCount :)] + pub unsafe fn stringFromByteCount(&self, byteCount: c_longlong) -> Id; + # [method_id (stringFromMeasurement : countStyle :)] pub unsafe fn stringFromMeasurement_countStyle( measurement: &NSMeasurement, countStyle: NSByteCountFormatterCountStyle, - ) -> Id { - msg_send_id![ - Self::class(), - stringFromMeasurement: measurement, - countStyle: countStyle - ] - } + ) -> Id; + # [method_id (stringFromMeasurement :)] pub unsafe fn stringFromMeasurement( &self, measurement: &NSMeasurement, - ) -> Id { - msg_send_id![self, stringFromMeasurement: measurement] - } + ) -> Id; + # [method_id (stringForObjectValue :)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] - } - pub unsafe fn allowedUnits(&self) -> NSByteCountFormatterUnits { - msg_send![self, allowedUnits] - } - pub unsafe fn setAllowedUnits(&self, allowedUnits: NSByteCountFormatterUnits) { - msg_send![self, setAllowedUnits: allowedUnits] - } - pub unsafe fn countStyle(&self) -> NSByteCountFormatterCountStyle { - msg_send![self, countStyle] - } - pub unsafe fn setCountStyle(&self, countStyle: NSByteCountFormatterCountStyle) { - msg_send![self, setCountStyle: countStyle] - } - pub unsafe fn allowsNonnumericFormatting(&self) -> bool { - msg_send![self, allowsNonnumericFormatting] - } - pub unsafe fn setAllowsNonnumericFormatting(&self, allowsNonnumericFormatting: bool) { - msg_send![ - self, - setAllowsNonnumericFormatting: allowsNonnumericFormatting - ] - } - pub unsafe fn includesUnit(&self) -> bool { - msg_send![self, includesUnit] - } - pub unsafe fn setIncludesUnit(&self, includesUnit: bool) { - msg_send![self, setIncludesUnit: includesUnit] - } - pub unsafe fn includesCount(&self) -> bool { - msg_send![self, includesCount] - } - pub unsafe fn setIncludesCount(&self, includesCount: bool) { - msg_send![self, setIncludesCount: includesCount] - } - pub unsafe fn includesActualByteCount(&self) -> bool { - msg_send![self, includesActualByteCount] - } - pub unsafe fn setIncludesActualByteCount(&self, includesActualByteCount: bool) { - msg_send![self, setIncludesActualByteCount: includesActualByteCount] - } - pub unsafe fn isAdaptive(&self) -> bool { - msg_send![self, isAdaptive] - } - pub unsafe fn setAdaptive(&self, adaptive: bool) { - msg_send![self, setAdaptive: adaptive] - } - pub unsafe fn zeroPadsFractionDigits(&self) -> bool { - msg_send![self, zeroPadsFractionDigits] - } - pub unsafe fn setZeroPadsFractionDigits(&self, zeroPadsFractionDigits: bool) { - msg_send![self, setZeroPadsFractionDigits: zeroPadsFractionDigits] - } - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] - } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } + ) -> Option>; + #[method(allowedUnits)] + pub unsafe fn allowedUnits(&self) -> NSByteCountFormatterUnits; + # [method (setAllowedUnits :)] + pub unsafe fn setAllowedUnits(&self, allowedUnits: NSByteCountFormatterUnits); + #[method(countStyle)] + pub unsafe fn countStyle(&self) -> NSByteCountFormatterCountStyle; + # [method (setCountStyle :)] + pub unsafe fn setCountStyle(&self, countStyle: NSByteCountFormatterCountStyle); + #[method(allowsNonnumericFormatting)] + pub unsafe fn allowsNonnumericFormatting(&self) -> bool; + # [method (setAllowsNonnumericFormatting :)] + pub unsafe fn setAllowsNonnumericFormatting(&self, allowsNonnumericFormatting: bool); + #[method(includesUnit)] + pub unsafe fn includesUnit(&self) -> bool; + # [method (setIncludesUnit :)] + pub unsafe fn setIncludesUnit(&self, includesUnit: bool); + #[method(includesCount)] + pub unsafe fn includesCount(&self) -> bool; + # [method (setIncludesCount :)] + pub unsafe fn setIncludesCount(&self, includesCount: bool); + #[method(includesActualByteCount)] + pub unsafe fn includesActualByteCount(&self) -> bool; + # [method (setIncludesActualByteCount :)] + pub unsafe fn setIncludesActualByteCount(&self, includesActualByteCount: bool); + #[method(isAdaptive)] + pub unsafe fn isAdaptive(&self) -> bool; + # [method (setAdaptive :)] + pub unsafe fn setAdaptive(&self, adaptive: bool); + #[method(zeroPadsFractionDigits)] + pub unsafe fn zeroPadsFractionDigits(&self) -> bool; + # [method (setZeroPadsFractionDigits :)] + pub unsafe fn setZeroPadsFractionDigits(&self, zeroPadsFractionDigits: bool); + #[method(formattingContext)] + pub unsafe fn formattingContext(&self) -> NSFormattingContext; + # [method (setFormattingContext :)] + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); } ); diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index 88346ff8e..9796b03ca 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -3,4 +3,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index c797b694c..65b648826 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSCache; @@ -13,57 +13,39 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSCache { - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: &NSString) { - msg_send![self, setName: name] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn objectForKey(&self, key: &KeyType) -> Option> { - msg_send_id![self, objectForKey: key] - } - pub unsafe fn setObject_forKey(&self, obj: &ObjectType, key: &KeyType) { - msg_send![self, setObject: obj, forKey: key] - } - pub unsafe fn setObject_forKey_cost(&self, obj: &ObjectType, key: &KeyType, g: NSUInteger) { - msg_send![self, setObject: obj, forKey: key, cost: g] - } - pub unsafe fn removeObjectForKey(&self, key: &KeyType) { - msg_send![self, removeObjectForKey: key] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn totalCostLimit(&self) -> NSUInteger { - msg_send![self, totalCostLimit] - } - pub unsafe fn setTotalCostLimit(&self, totalCostLimit: NSUInteger) { - msg_send![self, setTotalCostLimit: totalCostLimit] - } - pub unsafe fn countLimit(&self) -> NSUInteger { - msg_send![self, countLimit] - } - pub unsafe fn setCountLimit(&self, countLimit: NSUInteger) { - msg_send![self, setCountLimit: countLimit] - } - pub unsafe fn evictsObjectsWithDiscardedContent(&self) -> bool { - msg_send![self, evictsObjectsWithDiscardedContent] - } + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + # [method (setName :)] + pub unsafe fn setName(&self, name: &NSString); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>); + # [method_id (objectForKey :)] + pub unsafe fn objectForKey(&self, key: &KeyType) -> Option>; + # [method (setObject : forKey :)] + pub unsafe fn setObject_forKey(&self, obj: &ObjectType, key: &KeyType); + # [method (setObject : forKey : cost :)] + pub unsafe fn setObject_forKey_cost(&self, obj: &ObjectType, key: &KeyType, g: NSUInteger); + # [method (removeObjectForKey :)] + pub unsafe fn removeObjectForKey(&self, key: &KeyType); + #[method(removeAllObjects)] + pub unsafe fn removeAllObjects(&self); + #[method(totalCostLimit)] + pub unsafe fn totalCostLimit(&self) -> NSUInteger; + # [method (setTotalCostLimit :)] + pub unsafe fn setTotalCostLimit(&self, totalCostLimit: NSUInteger); + #[method(countLimit)] + pub unsafe fn countLimit(&self) -> NSUInteger; + # [method (setCountLimit :)] + pub unsafe fn setCountLimit(&self, countLimit: NSUInteger); + #[method(evictsObjectsWithDiscardedContent)] + pub unsafe fn evictsObjectsWithDiscardedContent(&self) -> bool; + # [method (setEvictsObjectsWithDiscardedContent :)] pub unsafe fn setEvictsObjectsWithDiscardedContent( &self, evictsObjectsWithDiscardedContent: bool, - ) { - msg_send![ - self, - setEvictsObjectsWithDiscardedContent: evictsObjectsWithDiscardedContent - ] - } + ); } ); pub type NSCacheDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index a152e2b67..df16c8e31 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSCalendarIdentifier = NSString; extern_class!( #[derive(Debug)] @@ -21,199 +21,132 @@ extern_class!( ); extern_methods!( unsafe impl NSCalendar { - pub unsafe fn currentCalendar() -> Id { - msg_send_id![Self::class(), currentCalendar] - } - pub unsafe fn autoupdatingCurrentCalendar() -> Id { - msg_send_id![Self::class(), autoupdatingCurrentCalendar] - } + #[method_id(currentCalendar)] + pub unsafe fn currentCalendar() -> Id; + #[method_id(autoupdatingCurrentCalendar)] + pub unsafe fn autoupdatingCurrentCalendar() -> Id; + # [method_id (calendarWithIdentifier :)] pub unsafe fn calendarWithIdentifier( calendarIdentifierConstant: &NSCalendarIdentifier, - ) -> Option> { - msg_send_id![ - Self::class(), - calendarWithIdentifier: calendarIdentifierConstant - ] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + ) -> Option>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithCalendarIdentifier :)] pub unsafe fn initWithCalendarIdentifier( &self, ident: &NSCalendarIdentifier, - ) -> Option> { - msg_send_id![self, initWithCalendarIdentifier: ident] - } - pub unsafe fn calendarIdentifier(&self) -> Id { - msg_send_id![self, calendarIdentifier] - } - pub unsafe fn locale(&self) -> Option> { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: &NSTimeZone) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn firstWeekday(&self) -> NSUInteger { - msg_send![self, firstWeekday] - } - pub unsafe fn setFirstWeekday(&self, firstWeekday: NSUInteger) { - msg_send![self, setFirstWeekday: firstWeekday] - } - pub unsafe fn minimumDaysInFirstWeek(&self) -> NSUInteger { - msg_send![self, minimumDaysInFirstWeek] - } - pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger) { - msg_send![self, setMinimumDaysInFirstWeek: minimumDaysInFirstWeek] - } - pub unsafe fn eraSymbols(&self) -> Id, Shared> { - msg_send_id![self, eraSymbols] - } - pub unsafe fn longEraSymbols(&self) -> Id, Shared> { - msg_send_id![self, longEraSymbols] - } - pub unsafe fn monthSymbols(&self) -> Id, Shared> { - msg_send_id![self, monthSymbols] - } - pub unsafe fn shortMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortMonthSymbols] - } - pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortMonthSymbols] - } - pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneMonthSymbols] - } - pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneMonthSymbols] - } - pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortStandaloneMonthSymbols] - } - pub unsafe fn weekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, weekdaySymbols] - } - pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, shortWeekdaySymbols] - } - pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortWeekdaySymbols] - } - pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneWeekdaySymbols] - } - pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneWeekdaySymbols] - } - pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortStandaloneWeekdaySymbols] - } - pub unsafe fn quarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, quarterSymbols] - } - pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortQuarterSymbols] - } - pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneQuarterSymbols] - } - pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneQuarterSymbols] - } - pub unsafe fn AMSymbol(&self) -> Id { - msg_send_id![self, AMSymbol] - } - pub unsafe fn PMSymbol(&self) -> Id { - msg_send_id![self, PMSymbol] - } - pub unsafe fn minimumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange { - msg_send![self, minimumRangeOfUnit: unit] - } - pub unsafe fn maximumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange { - msg_send![self, maximumRangeOfUnit: unit] - } + ) -> Option>; + #[method_id(calendarIdentifier)] + pub unsafe fn calendarIdentifier(&self) -> Id; + #[method_id(locale)] + pub unsafe fn locale(&self) -> Option>; + # [method (setLocale :)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(timeZone)] + pub unsafe fn timeZone(&self) -> Id; + # [method (setTimeZone :)] + pub unsafe fn setTimeZone(&self, timeZone: &NSTimeZone); + #[method(firstWeekday)] + pub unsafe fn firstWeekday(&self) -> NSUInteger; + # [method (setFirstWeekday :)] + pub unsafe fn setFirstWeekday(&self, firstWeekday: NSUInteger); + #[method(minimumDaysInFirstWeek)] + pub unsafe fn minimumDaysInFirstWeek(&self) -> NSUInteger; + # [method (setMinimumDaysInFirstWeek :)] + pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger); + #[method_id(eraSymbols)] + pub unsafe fn eraSymbols(&self) -> Id, Shared>; + #[method_id(longEraSymbols)] + pub unsafe fn longEraSymbols(&self) -> Id, Shared>; + #[method_id(monthSymbols)] + pub unsafe fn monthSymbols(&self) -> Id, Shared>; + #[method_id(shortMonthSymbols)] + pub unsafe fn shortMonthSymbols(&self) -> Id, Shared>; + #[method_id(veryShortMonthSymbols)] + pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared>; + #[method_id(standaloneMonthSymbols)] + pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared>; + #[method_id(shortStandaloneMonthSymbols)] + pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared>; + #[method_id(veryShortStandaloneMonthSymbols)] + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared>; + #[method_id(weekdaySymbols)] + pub unsafe fn weekdaySymbols(&self) -> Id, Shared>; + #[method_id(shortWeekdaySymbols)] + pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared>; + #[method_id(veryShortWeekdaySymbols)] + pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared>; + #[method_id(standaloneWeekdaySymbols)] + pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared>; + #[method_id(shortStandaloneWeekdaySymbols)] + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + #[method_id(veryShortStandaloneWeekdaySymbols)] + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + #[method_id(quarterSymbols)] + pub unsafe fn quarterSymbols(&self) -> Id, Shared>; + #[method_id(shortQuarterSymbols)] + pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared>; + #[method_id(standaloneQuarterSymbols)] + pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared>; + #[method_id(shortStandaloneQuarterSymbols)] + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared>; + #[method_id(AMSymbol)] + pub unsafe fn AMSymbol(&self) -> Id; + #[method_id(PMSymbol)] + pub unsafe fn PMSymbol(&self) -> Id; + # [method (minimumRangeOfUnit :)] + pub unsafe fn minimumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange; + # [method (maximumRangeOfUnit :)] + pub unsafe fn maximumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange; + # [method (rangeOfUnit : inUnit : forDate :)] pub unsafe fn rangeOfUnit_inUnit_forDate( &self, smaller: NSCalendarUnit, larger: NSCalendarUnit, date: &NSDate, - ) -> NSRange { - msg_send![self, rangeOfUnit: smaller, inUnit: larger, forDate: date] - } + ) -> NSRange; + # [method (ordinalityOfUnit : inUnit : forDate :)] pub unsafe fn ordinalityOfUnit_inUnit_forDate( &self, smaller: NSCalendarUnit, larger: NSCalendarUnit, date: &NSDate, - ) -> NSUInteger { - msg_send![ - self, - ordinalityOfUnit: smaller, - inUnit: larger, - forDate: date - ] - } + ) -> NSUInteger; + # [method (rangeOfUnit : startDate : interval : forDate :)] pub unsafe fn rangeOfUnit_startDate_interval_forDate( &self, unit: NSCalendarUnit, datep: Option<&mut Option>>, tip: *mut NSTimeInterval, date: &NSDate, - ) -> bool { - msg_send![ - self, - rangeOfUnit: unit, - startDate: datep, - interval: tip, - forDate: date - ] - } + ) -> bool; + # [method_id (dateFromComponents :)] pub unsafe fn dateFromComponents( &self, comps: &NSDateComponents, - ) -> Option> { - msg_send_id![self, dateFromComponents: comps] - } + ) -> Option>; + # [method_id (components : fromDate :)] pub unsafe fn components_fromDate( &self, unitFlags: NSCalendarUnit, date: &NSDate, - ) -> Id { - msg_send_id![self, components: unitFlags, fromDate: date] - } + ) -> Id; + # [method_id (dateByAddingComponents : toDate : options :)] pub unsafe fn dateByAddingComponents_toDate_options( &self, comps: &NSDateComponents, date: &NSDate, opts: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - dateByAddingComponents: comps, - toDate: date, - options: opts - ] - } + ) -> Option>; + # [method_id (components : fromDate : toDate : options :)] pub unsafe fn components_fromDate_toDate_options( &self, unitFlags: NSCalendarUnit, startingDate: &NSDate, resultDate: &NSDate, opts: NSCalendarOptions, - ) -> Id { - msg_send_id![ - self, - components: unitFlags, - fromDate: startingDate, - toDate: resultDate, - options: opts - ] - } + ) -> Id; + # [method (getEra : year : month : day : fromDate :)] pub unsafe fn getEra_year_month_day_fromDate( &self, eraValuePointer: *mut NSInteger, @@ -221,16 +154,8 @@ extern_methods!( monthValuePointer: *mut NSInteger, dayValuePointer: *mut NSInteger, date: &NSDate, - ) { - msg_send![ - self, - getEra: eraValuePointer, - year: yearValuePointer, - month: monthValuePointer, - day: dayValuePointer, - fromDate: date - ] - } + ); + # [method (getEra : yearForWeekOfYear : weekOfYear : weekday : fromDate :)] pub unsafe fn getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate( &self, eraValuePointer: *mut NSInteger, @@ -238,16 +163,8 @@ extern_methods!( weekValuePointer: *mut NSInteger, weekdayValuePointer: *mut NSInteger, date: &NSDate, - ) { - msg_send![ - self, - getEra: eraValuePointer, - yearForWeekOfYear: yearValuePointer, - weekOfYear: weekValuePointer, - weekday: weekdayValuePointer, - fromDate: date - ] - } + ); + # [method (getHour : minute : second : nanosecond : fromDate :)] pub unsafe fn getHour_minute_second_nanosecond_fromDate( &self, hourValuePointer: *mut NSInteger, @@ -255,19 +172,10 @@ extern_methods!( secondValuePointer: *mut NSInteger, nanosecondValuePointer: *mut NSInteger, date: &NSDate, - ) { - msg_send![ - self, - getHour: hourValuePointer, - minute: minuteValuePointer, - second: secondValuePointer, - nanosecond: nanosecondValuePointer, - fromDate: date - ] - } - pub unsafe fn component_fromDate(&self, unit: NSCalendarUnit, date: &NSDate) -> NSInteger { - msg_send![self, component: unit, fromDate: date] - } + ); + # [method (component : fromDate :)] + pub unsafe fn component_fromDate(&self, unit: NSCalendarUnit, date: &NSDate) -> NSInteger; + # [method_id (dateWithEra : year : month : day : hour : minute : second : nanosecond :)] pub unsafe fn dateWithEra_year_month_day_hour_minute_second_nanosecond( &self, eraValue: NSInteger, @@ -278,19 +186,8 @@ extern_methods!( minuteValue: NSInteger, secondValue: NSInteger, nanosecondValue: NSInteger, - ) -> Option> { - msg_send_id![ - self, - dateWithEra: eraValue, - year: yearValue, - month: monthValue, - day: dayValue, - hour: hourValue, - minute: minuteValue, - second: secondValue, - nanosecond: nanosecondValue - ] - } + ) -> Option>; + # [method_id (dateWithEra : yearForWeekOfYear : weekOfYear : weekday : hour : minute : second : nanosecond :)] pub unsafe fn dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond( &self, eraValue: NSInteger, @@ -301,171 +198,94 @@ extern_methods!( minuteValue: NSInteger, secondValue: NSInteger, nanosecondValue: NSInteger, - ) -> Option> { - msg_send_id![ - self, - dateWithEra: eraValue, - yearForWeekOfYear: yearValue, - weekOfYear: weekValue, - weekday: weekdayValue, - hour: hourValue, - minute: minuteValue, - second: secondValue, - nanosecond: nanosecondValue - ] - } - pub unsafe fn startOfDayForDate(&self, date: &NSDate) -> Id { - msg_send_id![self, startOfDayForDate: date] - } + ) -> Option>; + # [method_id (startOfDayForDate :)] + pub unsafe fn startOfDayForDate(&self, date: &NSDate) -> Id; + # [method_id (componentsInTimeZone : fromDate :)] pub unsafe fn componentsInTimeZone_fromDate( &self, timezone: &NSTimeZone, date: &NSDate, - ) -> Id { - msg_send_id![self, componentsInTimeZone: timezone, fromDate: date] - } + ) -> Id; + # [method (compareDate : toDate : toUnitGranularity :)] pub unsafe fn compareDate_toDate_toUnitGranularity( &self, date1: &NSDate, date2: &NSDate, unit: NSCalendarUnit, - ) -> NSComparisonResult { - msg_send![ - self, - compareDate: date1, - toDate: date2, - toUnitGranularity: unit - ] - } + ) -> NSComparisonResult; + # [method (isDate : equalToDate : toUnitGranularity :)] pub unsafe fn isDate_equalToDate_toUnitGranularity( &self, date1: &NSDate, date2: &NSDate, unit: NSCalendarUnit, - ) -> bool { - msg_send![ - self, - isDate: date1, - equalToDate: date2, - toUnitGranularity: unit - ] - } - pub unsafe fn isDate_inSameDayAsDate(&self, date1: &NSDate, date2: &NSDate) -> bool { - msg_send![self, isDate: date1, inSameDayAsDate: date2] - } - pub unsafe fn isDateInToday(&self, date: &NSDate) -> bool { - msg_send![self, isDateInToday: date] - } - pub unsafe fn isDateInYesterday(&self, date: &NSDate) -> bool { - msg_send![self, isDateInYesterday: date] - } - pub unsafe fn isDateInTomorrow(&self, date: &NSDate) -> bool { - msg_send![self, isDateInTomorrow: date] - } - pub unsafe fn isDateInWeekend(&self, date: &NSDate) -> bool { - msg_send![self, isDateInWeekend: date] - } + ) -> bool; + # [method (isDate : inSameDayAsDate :)] + pub unsafe fn isDate_inSameDayAsDate(&self, date1: &NSDate, date2: &NSDate) -> bool; + # [method (isDateInToday :)] + pub unsafe fn isDateInToday(&self, date: &NSDate) -> bool; + # [method (isDateInYesterday :)] + pub unsafe fn isDateInYesterday(&self, date: &NSDate) -> bool; + # [method (isDateInTomorrow :)] + pub unsafe fn isDateInTomorrow(&self, date: &NSDate) -> bool; + # [method (isDateInWeekend :)] + pub unsafe fn isDateInWeekend(&self, date: &NSDate) -> bool; + # [method (rangeOfWeekendStartDate : interval : containingDate :)] pub unsafe fn rangeOfWeekendStartDate_interval_containingDate( &self, datep: Option<&mut Option>>, tip: *mut NSTimeInterval, date: &NSDate, - ) -> bool { - msg_send![ - self, - rangeOfWeekendStartDate: datep, - interval: tip, - containingDate: date - ] - } + ) -> bool; + # [method (nextWeekendStartDate : interval : options : afterDate :)] pub unsafe fn nextWeekendStartDate_interval_options_afterDate( &self, datep: Option<&mut Option>>, tip: *mut NSTimeInterval, options: NSCalendarOptions, date: &NSDate, - ) -> bool { - msg_send![ - self, - nextWeekendStartDate: datep, - interval: tip, - options: options, - afterDate: date - ] - } + ) -> bool; + # [method_id (components : fromDateComponents : toDateComponents : options :)] pub unsafe fn components_fromDateComponents_toDateComponents_options( &self, unitFlags: NSCalendarUnit, startingDateComp: &NSDateComponents, resultDateComp: &NSDateComponents, options: NSCalendarOptions, - ) -> Id { - msg_send_id![ - self, - components: unitFlags, - fromDateComponents: startingDateComp, - toDateComponents: resultDateComp, - options: options - ] - } + ) -> Id; + # [method_id (dateByAddingUnit : value : toDate : options :)] pub unsafe fn dateByAddingUnit_value_toDate_options( &self, unit: NSCalendarUnit, value: NSInteger, date: &NSDate, options: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - dateByAddingUnit: unit, - value: value, - toDate: date, - options: options - ] - } + ) -> Option>; + # [method (enumerateDatesStartingAfterDate : matchingComponents : options : usingBlock :)] pub unsafe fn enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock( &self, start: &NSDate, comps: &NSDateComponents, opts: NSCalendarOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateDatesStartingAfterDate: start, - matchingComponents: comps, - options: opts, - usingBlock: block - ] - } + ); + # [method_id (nextDateAfterDate : matchingComponents : options :)] pub unsafe fn nextDateAfterDate_matchingComponents_options( &self, date: &NSDate, comps: &NSDateComponents, options: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - nextDateAfterDate: date, - matchingComponents: comps, - options: options - ] - } + ) -> Option>; + # [method_id (nextDateAfterDate : matchingUnit : value : options :)] pub unsafe fn nextDateAfterDate_matchingUnit_value_options( &self, date: &NSDate, unit: NSCalendarUnit, value: NSInteger, options: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - nextDateAfterDate: date, - matchingUnit: unit, - value: value, - options: options - ] - } + ) -> Option>; + # [method_id (nextDateAfterDate : matchingHour : minute : second : options :)] pub unsafe fn nextDateAfterDate_matchingHour_minute_second_options( &self, date: &NSDate, @@ -473,31 +293,16 @@ extern_methods!( minuteValue: NSInteger, secondValue: NSInteger, options: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - nextDateAfterDate: date, - matchingHour: hourValue, - minute: minuteValue, - second: secondValue, - options: options - ] - } + ) -> Option>; + # [method_id (dateBySettingUnit : value : ofDate : options :)] pub unsafe fn dateBySettingUnit_value_ofDate_options( &self, unit: NSCalendarUnit, v: NSInteger, date: &NSDate, opts: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - dateBySettingUnit: unit, - value: v, - ofDate: date, - options: opts - ] - } + ) -> Option>; + # [method_id (dateBySettingHour : minute : second : ofDate : options :)] pub unsafe fn dateBySettingHour_minute_second_ofDate_options( &self, h: NSInteger, @@ -505,23 +310,13 @@ extern_methods!( s: NSInteger, date: &NSDate, opts: NSCalendarOptions, - ) -> Option> { - msg_send_id![ - self, - dateBySettingHour: h, - minute: m, - second: s, - ofDate: date, - options: opts - ] - } + ) -> Option>; + # [method (date : matchesComponents :)] pub unsafe fn date_matchesComponents( &self, date: &NSDate, components: &NSDateComponents, - ) -> bool { - msg_send![self, date: date, matchesComponents: components] - } + ) -> bool; } ); extern_class!( @@ -533,128 +328,87 @@ extern_class!( ); extern_methods!( unsafe impl NSDateComponents { - pub unsafe fn calendar(&self) -> Option> { - msg_send_id![self, calendar] - } - pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { - msg_send![self, setCalendar: calendar] - } - pub unsafe fn timeZone(&self) -> Option> { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn era(&self) -> NSInteger { - msg_send![self, era] - } - pub unsafe fn setEra(&self, era: NSInteger) { - msg_send![self, setEra: era] - } - pub unsafe fn year(&self) -> NSInteger { - msg_send![self, year] - } - pub unsafe fn setYear(&self, year: NSInteger) { - msg_send![self, setYear: year] - } - pub unsafe fn month(&self) -> NSInteger { - msg_send![self, month] - } - pub unsafe fn setMonth(&self, month: NSInteger) { - msg_send![self, setMonth: month] - } - pub unsafe fn day(&self) -> NSInteger { - msg_send![self, day] - } - pub unsafe fn setDay(&self, day: NSInteger) { - msg_send![self, setDay: day] - } - pub unsafe fn hour(&self) -> NSInteger { - msg_send![self, hour] - } - pub unsafe fn setHour(&self, hour: NSInteger) { - msg_send![self, setHour: hour] - } - pub unsafe fn minute(&self) -> NSInteger { - msg_send![self, minute] - } - pub unsafe fn setMinute(&self, minute: NSInteger) { - msg_send![self, setMinute: minute] - } - pub unsafe fn second(&self) -> NSInteger { - msg_send![self, second] - } - pub unsafe fn setSecond(&self, second: NSInteger) { - msg_send![self, setSecond: second] - } - pub unsafe fn nanosecond(&self) -> NSInteger { - msg_send![self, nanosecond] - } - pub unsafe fn setNanosecond(&self, nanosecond: NSInteger) { - msg_send![self, setNanosecond: nanosecond] - } - pub unsafe fn weekday(&self) -> NSInteger { - msg_send![self, weekday] - } - pub unsafe fn setWeekday(&self, weekday: NSInteger) { - msg_send![self, setWeekday: weekday] - } - pub unsafe fn weekdayOrdinal(&self) -> NSInteger { - msg_send![self, weekdayOrdinal] - } - pub unsafe fn setWeekdayOrdinal(&self, weekdayOrdinal: NSInteger) { - msg_send![self, setWeekdayOrdinal: weekdayOrdinal] - } - pub unsafe fn quarter(&self) -> NSInteger { - msg_send![self, quarter] - } - pub unsafe fn setQuarter(&self, quarter: NSInteger) { - msg_send![self, setQuarter: quarter] - } - pub unsafe fn weekOfMonth(&self) -> NSInteger { - msg_send![self, weekOfMonth] - } - pub unsafe fn setWeekOfMonth(&self, weekOfMonth: NSInteger) { - msg_send![self, setWeekOfMonth: weekOfMonth] - } - pub unsafe fn weekOfYear(&self) -> NSInteger { - msg_send![self, weekOfYear] - } - pub unsafe fn setWeekOfYear(&self, weekOfYear: NSInteger) { - msg_send![self, setWeekOfYear: weekOfYear] - } - pub unsafe fn yearForWeekOfYear(&self) -> NSInteger { - msg_send![self, yearForWeekOfYear] - } - pub unsafe fn setYearForWeekOfYear(&self, yearForWeekOfYear: NSInteger) { - msg_send![self, setYearForWeekOfYear: yearForWeekOfYear] - } - pub unsafe fn isLeapMonth(&self) -> bool { - msg_send![self, isLeapMonth] - } - pub unsafe fn setLeapMonth(&self, leapMonth: bool) { - msg_send![self, setLeapMonth: leapMonth] - } - pub unsafe fn date(&self) -> Option> { - msg_send_id![self, date] - } - pub unsafe fn week(&self) -> NSInteger { - msg_send![self, week] - } - pub unsafe fn setWeek(&self, v: NSInteger) { - msg_send![self, setWeek: v] - } - pub unsafe fn setValue_forComponent(&self, value: NSInteger, unit: NSCalendarUnit) { - msg_send![self, setValue: value, forComponent: unit] - } - pub unsafe fn valueForComponent(&self, unit: NSCalendarUnit) -> NSInteger { - msg_send![self, valueForComponent: unit] - } - pub unsafe fn isValidDate(&self) -> bool { - msg_send![self, isValidDate] - } - pub unsafe fn isValidDateInCalendar(&self, calendar: &NSCalendar) -> bool { - msg_send![self, isValidDateInCalendar: calendar] - } + #[method_id(calendar)] + pub unsafe fn calendar(&self) -> Option>; + # [method (setCalendar :)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(timeZone)] + pub unsafe fn timeZone(&self) -> Option>; + # [method (setTimeZone :)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method(era)] + pub unsafe fn era(&self) -> NSInteger; + # [method (setEra :)] + pub unsafe fn setEra(&self, era: NSInteger); + #[method(year)] + pub unsafe fn year(&self) -> NSInteger; + # [method (setYear :)] + pub unsafe fn setYear(&self, year: NSInteger); + #[method(month)] + pub unsafe fn month(&self) -> NSInteger; + # [method (setMonth :)] + pub unsafe fn setMonth(&self, month: NSInteger); + #[method(day)] + pub unsafe fn day(&self) -> NSInteger; + # [method (setDay :)] + pub unsafe fn setDay(&self, day: NSInteger); + #[method(hour)] + pub unsafe fn hour(&self) -> NSInteger; + # [method (setHour :)] + pub unsafe fn setHour(&self, hour: NSInteger); + #[method(minute)] + pub unsafe fn minute(&self) -> NSInteger; + # [method (setMinute :)] + pub unsafe fn setMinute(&self, minute: NSInteger); + #[method(second)] + pub unsafe fn second(&self) -> NSInteger; + # [method (setSecond :)] + pub unsafe fn setSecond(&self, second: NSInteger); + #[method(nanosecond)] + pub unsafe fn nanosecond(&self) -> NSInteger; + # [method (setNanosecond :)] + pub unsafe fn setNanosecond(&self, nanosecond: NSInteger); + #[method(weekday)] + pub unsafe fn weekday(&self) -> NSInteger; + # [method (setWeekday :)] + pub unsafe fn setWeekday(&self, weekday: NSInteger); + #[method(weekdayOrdinal)] + pub unsafe fn weekdayOrdinal(&self) -> NSInteger; + # [method (setWeekdayOrdinal :)] + pub unsafe fn setWeekdayOrdinal(&self, weekdayOrdinal: NSInteger); + #[method(quarter)] + pub unsafe fn quarter(&self) -> NSInteger; + # [method (setQuarter :)] + pub unsafe fn setQuarter(&self, quarter: NSInteger); + #[method(weekOfMonth)] + pub unsafe fn weekOfMonth(&self) -> NSInteger; + # [method (setWeekOfMonth :)] + pub unsafe fn setWeekOfMonth(&self, weekOfMonth: NSInteger); + #[method(weekOfYear)] + pub unsafe fn weekOfYear(&self) -> NSInteger; + # [method (setWeekOfYear :)] + pub unsafe fn setWeekOfYear(&self, weekOfYear: NSInteger); + #[method(yearForWeekOfYear)] + pub unsafe fn yearForWeekOfYear(&self) -> NSInteger; + # [method (setYearForWeekOfYear :)] + pub unsafe fn setYearForWeekOfYear(&self, yearForWeekOfYear: NSInteger); + #[method(isLeapMonth)] + pub unsafe fn isLeapMonth(&self) -> bool; + # [method (setLeapMonth :)] + pub unsafe fn setLeapMonth(&self, leapMonth: bool); + #[method_id(date)] + pub unsafe fn date(&self) -> Option>; + #[method(week)] + pub unsafe fn week(&self) -> NSInteger; + # [method (setWeek :)] + pub unsafe fn setWeek(&self, v: NSInteger); + # [method (setValue : forComponent :)] + pub unsafe fn setValue_forComponent(&self, value: NSInteger, unit: NSCalendarUnit); + # [method (valueForComponent :)] + pub unsafe fn valueForComponent(&self, unit: NSCalendarUnit) -> NSInteger; + #[method(isValidDate)] + pub unsafe fn isValidDate(&self) -> bool; + # [method (isValidDateInCalendar :)] + pub unsafe fn isValidDateInCalendar(&self, calendar: &NSCalendar) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index 444b49044..b83fc902c 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSDate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCalendarDate; @@ -15,31 +15,20 @@ extern_class!( ); extern_methods!( unsafe impl NSCalendarDate { - pub unsafe fn calendarDate() -> Id { - msg_send_id![Self::class(), calendarDate] - } + #[method_id(calendarDate)] + pub unsafe fn calendarDate() -> Id; + # [method_id (dateWithString : calendarFormat : locale :)] pub unsafe fn dateWithString_calendarFormat_locale( description: &NSString, format: &NSString, locale: Option<&Object>, - ) -> Option> { - msg_send_id![ - Self::class(), - dateWithString: description, - calendarFormat: format, - locale: locale - ] - } + ) -> Option>; + # [method_id (dateWithString : calendarFormat :)] pub unsafe fn dateWithString_calendarFormat( description: &NSString, format: &NSString, - ) -> Option> { - msg_send_id![ - Self::class(), - dateWithString: description, - calendarFormat: format - ] - } + ) -> Option>; + # [method_id (dateWithYear : month : day : hour : minute : second : timeZone :)] pub unsafe fn dateWithYear_month_day_hour_minute_second_timeZone( year: NSInteger, month: NSUInteger, @@ -48,18 +37,8 @@ extern_methods!( minute: NSUInteger, second: NSUInteger, aTimeZone: Option<&NSTimeZone>, - ) -> Id { - msg_send_id![ - Self::class(), - dateWithYear: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - timeZone: aTimeZone - ] - } + ) -> Id; + # [method_id (dateByAddingYears : months : days : hours : minutes : seconds :)] pub unsafe fn dateByAddingYears_months_days_hours_minutes_seconds( &self, year: NSInteger, @@ -68,92 +47,59 @@ extern_methods!( hour: NSInteger, minute: NSInteger, second: NSInteger, - ) -> Id { - msg_send_id![ - self, - dateByAddingYears: year, - months: month, - days: day, - hours: hour, - minutes: minute, - seconds: second - ] - } - pub unsafe fn dayOfCommonEra(&self) -> NSInteger { - msg_send![self, dayOfCommonEra] - } - pub unsafe fn dayOfMonth(&self) -> NSInteger { - msg_send![self, dayOfMonth] - } - pub unsafe fn dayOfWeek(&self) -> NSInteger { - msg_send![self, dayOfWeek] - } - pub unsafe fn dayOfYear(&self) -> NSInteger { - msg_send![self, dayOfYear] - } - pub unsafe fn hourOfDay(&self) -> NSInteger { - msg_send![self, hourOfDay] - } - pub unsafe fn minuteOfHour(&self) -> NSInteger { - msg_send![self, minuteOfHour] - } - pub unsafe fn monthOfYear(&self) -> NSInteger { - msg_send![self, monthOfYear] - } - pub unsafe fn secondOfMinute(&self) -> NSInteger { - msg_send![self, secondOfMinute] - } - pub unsafe fn yearOfCommonEra(&self) -> NSInteger { - msg_send![self, yearOfCommonEra] - } - pub unsafe fn calendarFormat(&self) -> Id { - msg_send_id![self, calendarFormat] - } + ) -> Id; + #[method(dayOfCommonEra)] + pub unsafe fn dayOfCommonEra(&self) -> NSInteger; + #[method(dayOfMonth)] + pub unsafe fn dayOfMonth(&self) -> NSInteger; + #[method(dayOfWeek)] + pub unsafe fn dayOfWeek(&self) -> NSInteger; + #[method(dayOfYear)] + pub unsafe fn dayOfYear(&self) -> NSInteger; + #[method(hourOfDay)] + pub unsafe fn hourOfDay(&self) -> NSInteger; + #[method(minuteOfHour)] + pub unsafe fn minuteOfHour(&self) -> NSInteger; + #[method(monthOfYear)] + pub unsafe fn monthOfYear(&self) -> NSInteger; + #[method(secondOfMinute)] + pub unsafe fn secondOfMinute(&self) -> NSInteger; + #[method(yearOfCommonEra)] + pub unsafe fn yearOfCommonEra(&self) -> NSInteger; + #[method_id(calendarFormat)] + pub unsafe fn calendarFormat(&self) -> Id; + # [method_id (descriptionWithCalendarFormat : locale :)] pub unsafe fn descriptionWithCalendarFormat_locale( &self, format: &NSString, locale: Option<&Object>, - ) -> Id { - msg_send_id![self, descriptionWithCalendarFormat: format, locale: locale] - } + ) -> Id; + # [method_id (descriptionWithCalendarFormat :)] pub unsafe fn descriptionWithCalendarFormat( &self, format: &NSString, - ) -> Id { - msg_send_id![self, descriptionWithCalendarFormat: format] - } - pub unsafe fn descriptionWithLocale( - &self, - locale: Option<&Object>, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } + ) -> Id; + # [method_id (descriptionWithLocale :)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + #[method_id(timeZone)] + pub unsafe fn timeZone(&self) -> Id; + # [method_id (initWithString : calendarFormat : locale :)] pub unsafe fn initWithString_calendarFormat_locale( &self, description: &NSString, format: &NSString, locale: Option<&Object>, - ) -> Option> { - msg_send_id![ - self, - initWithString: description, - calendarFormat: format, - locale: locale - ] - } + ) -> Option>; + # [method_id (initWithString : calendarFormat :)] pub unsafe fn initWithString_calendarFormat( &self, description: &NSString, format: &NSString, - ) -> Option> { - msg_send_id![self, initWithString: description, calendarFormat: format] - } - pub unsafe fn initWithString(&self, description: &NSString) -> Option> { - msg_send_id![self, initWithString: description] - } + ) -> Option>; + # [method_id (initWithString :)] + pub unsafe fn initWithString(&self, description: &NSString) -> Option>; + # [method_id (initWithYear : month : day : hour : minute : second : timeZone :)] pub unsafe fn initWithYear_month_day_hour_minute_second_timeZone( &self, year: NSInteger, @@ -163,24 +109,12 @@ extern_methods!( minute: NSUInteger, second: NSUInteger, aTimeZone: Option<&NSTimeZone>, - ) -> Id { - msg_send_id![ - self, - initWithYear: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - timeZone: aTimeZone - ] - } - pub unsafe fn setCalendarFormat(&self, format: Option<&NSString>) { - msg_send![self, setCalendarFormat: format] - } - pub unsafe fn setTimeZone(&self, aTimeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: aTimeZone] - } + ) -> Id; + # [method (setCalendarFormat :)] + pub unsafe fn setCalendarFormat(&self, format: Option<&NSString>); + # [method (setTimeZone :)] + pub unsafe fn setTimeZone(&self, aTimeZone: Option<&NSTimeZone>); + # [method (years : months : days : hours : minutes : seconds : sinceDate :)] pub unsafe fn years_months_days_hours_minutes_seconds_sinceDate( &self, yp: *mut NSInteger, @@ -190,69 +124,41 @@ extern_methods!( mip: *mut NSInteger, sp: *mut NSInteger, date: &NSCalendarDate, - ) { - msg_send![ - self, - years: yp, - months: mop, - days: dp, - hours: hp, - minutes: mip, - seconds: sp, - sinceDate: date - ] - } - pub unsafe fn distantFuture() -> Id { - msg_send_id![Self::class(), distantFuture] - } - pub unsafe fn distantPast() -> Id { - msg_send_id![Self::class(), distantPast] - } + ); + #[method_id(distantFuture)] + pub unsafe fn distantFuture() -> Id; + #[method_id(distantPast)] + pub unsafe fn distantPast() -> Id; } ); extern_methods!( #[doc = "NSCalendarDateExtras"] unsafe impl NSDate { + # [method_id (dateWithNaturalLanguageString : locale :)] pub unsafe fn dateWithNaturalLanguageString_locale( string: &NSString, locale: Option<&Object>, - ) -> Option> { - msg_send_id![ - Self::class(), - dateWithNaturalLanguageString: string, - locale: locale - ] - } + ) -> Option>; + # [method_id (dateWithNaturalLanguageString :)] pub unsafe fn dateWithNaturalLanguageString( string: &NSString, - ) -> Option> { - msg_send_id![Self::class(), dateWithNaturalLanguageString: string] - } - pub unsafe fn dateWithString(aString: &NSString) -> Id { - msg_send_id![Self::class(), dateWithString: aString] - } + ) -> Option>; + # [method_id (dateWithString :)] + pub unsafe fn dateWithString(aString: &NSString) -> Id; + # [method_id (dateWithCalendarFormat : timeZone :)] pub unsafe fn dateWithCalendarFormat_timeZone( &self, format: Option<&NSString>, aTimeZone: Option<&NSTimeZone>, - ) -> Id { - msg_send_id![self, dateWithCalendarFormat: format, timeZone: aTimeZone] - } + ) -> Id; + # [method_id (descriptionWithCalendarFormat : timeZone : locale :)] pub unsafe fn descriptionWithCalendarFormat_timeZone_locale( &self, format: Option<&NSString>, aTimeZone: Option<&NSTimeZone>, locale: Option<&Object>, - ) -> Option> { - msg_send_id![ - self, - descriptionWithCalendarFormat: format, - timeZone: aTimeZone, - locale: locale - ] - } - pub unsafe fn initWithString(&self, description: &NSString) -> Option> { - msg_send_id![self, initWithString: description] - } + ) -> Option>; + # [method_id (initWithString :)] + pub unsafe fn initWithString(&self, description: &NSString) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 36e6a9c5b..7b7424e8d 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCharacterSet; @@ -16,90 +16,64 @@ extern_class!( ); extern_methods!( unsafe impl NSCharacterSet { - pub unsafe fn controlCharacterSet() -> Id { - msg_send_id![Self::class(), controlCharacterSet] - } - pub unsafe fn whitespaceCharacterSet() -> Id { - msg_send_id![Self::class(), whitespaceCharacterSet] - } - pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id { - msg_send_id![Self::class(), whitespaceAndNewlineCharacterSet] - } - pub unsafe fn decimalDigitCharacterSet() -> Id { - msg_send_id![Self::class(), decimalDigitCharacterSet] - } - pub unsafe fn letterCharacterSet() -> Id { - msg_send_id![Self::class(), letterCharacterSet] - } - pub unsafe fn lowercaseLetterCharacterSet() -> Id { - msg_send_id![Self::class(), lowercaseLetterCharacterSet] - } - pub unsafe fn uppercaseLetterCharacterSet() -> Id { - msg_send_id![Self::class(), uppercaseLetterCharacterSet] - } - pub unsafe fn nonBaseCharacterSet() -> Id { - msg_send_id![Self::class(), nonBaseCharacterSet] - } - pub unsafe fn alphanumericCharacterSet() -> Id { - msg_send_id![Self::class(), alphanumericCharacterSet] - } - pub unsafe fn decomposableCharacterSet() -> Id { - msg_send_id![Self::class(), decomposableCharacterSet] - } - pub unsafe fn illegalCharacterSet() -> Id { - msg_send_id![Self::class(), illegalCharacterSet] - } - pub unsafe fn punctuationCharacterSet() -> Id { - msg_send_id![Self::class(), punctuationCharacterSet] - } - pub unsafe fn capitalizedLetterCharacterSet() -> Id { - msg_send_id![Self::class(), capitalizedLetterCharacterSet] - } - pub unsafe fn symbolCharacterSet() -> Id { - msg_send_id![Self::class(), symbolCharacterSet] - } - pub unsafe fn newlineCharacterSet() -> Id { - msg_send_id![Self::class(), newlineCharacterSet] - } - pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id { - msg_send_id![Self::class(), characterSetWithRange: aRange] - } + #[method_id(controlCharacterSet)] + pub unsafe fn controlCharacterSet() -> Id; + #[method_id(whitespaceCharacterSet)] + pub unsafe fn whitespaceCharacterSet() -> Id; + #[method_id(whitespaceAndNewlineCharacterSet)] + pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id; + #[method_id(decimalDigitCharacterSet)] + pub unsafe fn decimalDigitCharacterSet() -> Id; + #[method_id(letterCharacterSet)] + pub unsafe fn letterCharacterSet() -> Id; + #[method_id(lowercaseLetterCharacterSet)] + pub unsafe fn lowercaseLetterCharacterSet() -> Id; + #[method_id(uppercaseLetterCharacterSet)] + pub unsafe fn uppercaseLetterCharacterSet() -> Id; + #[method_id(nonBaseCharacterSet)] + pub unsafe fn nonBaseCharacterSet() -> Id; + #[method_id(alphanumericCharacterSet)] + pub unsafe fn alphanumericCharacterSet() -> Id; + #[method_id(decomposableCharacterSet)] + pub unsafe fn decomposableCharacterSet() -> Id; + #[method_id(illegalCharacterSet)] + pub unsafe fn illegalCharacterSet() -> Id; + #[method_id(punctuationCharacterSet)] + pub unsafe fn punctuationCharacterSet() -> Id; + #[method_id(capitalizedLetterCharacterSet)] + pub unsafe fn capitalizedLetterCharacterSet() -> Id; + #[method_id(symbolCharacterSet)] + pub unsafe fn symbolCharacterSet() -> Id; + #[method_id(newlineCharacterSet)] + pub unsafe fn newlineCharacterSet() -> Id; + # [method_id (characterSetWithRange :)] + pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id; + # [method_id (characterSetWithCharactersInString :)] pub unsafe fn characterSetWithCharactersInString( aString: &NSString, - ) -> Id { - msg_send_id![Self::class(), characterSetWithCharactersInString: aString] - } + ) -> Id; + # [method_id (characterSetWithBitmapRepresentation :)] pub unsafe fn characterSetWithBitmapRepresentation( data: &NSData, - ) -> Id { - msg_send_id![Self::class(), characterSetWithBitmapRepresentation: data] - } + ) -> Id; + # [method_id (characterSetWithContentsOfFile :)] pub unsafe fn characterSetWithContentsOfFile( fName: &NSString, - ) -> Option> { - msg_send_id![Self::class(), characterSetWithContentsOfFile: fName] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool { - msg_send![self, characterIsMember: aCharacter] - } - pub unsafe fn bitmapRepresentation(&self) -> Id { - msg_send_id![self, bitmapRepresentation] - } - pub unsafe fn invertedSet(&self) -> Id { - msg_send_id![self, invertedSet] - } - pub unsafe fn longCharacterIsMember(&self, theLongChar: UTF32Char) -> bool { - msg_send![self, longCharacterIsMember: theLongChar] - } - pub unsafe fn isSupersetOfSet(&self, theOtherSet: &NSCharacterSet) -> bool { - msg_send![self, isSupersetOfSet: theOtherSet] - } - pub unsafe fn hasMemberInPlane(&self, thePlane: u8) -> bool { - msg_send![self, hasMemberInPlane: thePlane] - } + ) -> Option>; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + # [method (characterIsMember :)] + pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool; + #[method_id(bitmapRepresentation)] + pub unsafe fn bitmapRepresentation(&self) -> Id; + #[method_id(invertedSet)] + pub unsafe fn invertedSet(&self) -> Id; + # [method (longCharacterIsMember :)] + pub unsafe fn longCharacterIsMember(&self, theLongChar: UTF32Char) -> bool; + # [method (isSupersetOfSet :)] + pub unsafe fn isSupersetOfSet(&self, theOtherSet: &NSCharacterSet) -> bool; + # [method (hasMemberInPlane :)] + pub unsafe fn hasMemberInPlane(&self, thePlane: u8) -> bool; } ); extern_class!( @@ -111,89 +85,63 @@ extern_class!( ); extern_methods!( unsafe impl NSMutableCharacterSet { - pub unsafe fn addCharactersInRange(&self, aRange: NSRange) { - msg_send![self, addCharactersInRange: aRange] - } - pub unsafe fn removeCharactersInRange(&self, aRange: NSRange) { - msg_send![self, removeCharactersInRange: aRange] - } - pub unsafe fn addCharactersInString(&self, aString: &NSString) { - msg_send![self, addCharactersInString: aString] - } - pub unsafe fn removeCharactersInString(&self, aString: &NSString) { - msg_send![self, removeCharactersInString: aString] - } - pub unsafe fn formUnionWithCharacterSet(&self, otherSet: &NSCharacterSet) { - msg_send![self, formUnionWithCharacterSet: otherSet] - } - pub unsafe fn formIntersectionWithCharacterSet(&self, otherSet: &NSCharacterSet) { - msg_send![self, formIntersectionWithCharacterSet: otherSet] - } - pub unsafe fn invert(&self) { - msg_send![self, invert] - } - pub unsafe fn controlCharacterSet() -> Id { - msg_send_id![Self::class(), controlCharacterSet] - } - pub unsafe fn whitespaceCharacterSet() -> Id { - msg_send_id![Self::class(), whitespaceCharacterSet] - } - pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id { - msg_send_id![Self::class(), whitespaceAndNewlineCharacterSet] - } - pub unsafe fn decimalDigitCharacterSet() -> Id { - msg_send_id![Self::class(), decimalDigitCharacterSet] - } - pub unsafe fn letterCharacterSet() -> Id { - msg_send_id![Self::class(), letterCharacterSet] - } - pub unsafe fn lowercaseLetterCharacterSet() -> Id { - msg_send_id![Self::class(), lowercaseLetterCharacterSet] - } - pub unsafe fn uppercaseLetterCharacterSet() -> Id { - msg_send_id![Self::class(), uppercaseLetterCharacterSet] - } - pub unsafe fn nonBaseCharacterSet() -> Id { - msg_send_id![Self::class(), nonBaseCharacterSet] - } - pub unsafe fn alphanumericCharacterSet() -> Id { - msg_send_id![Self::class(), alphanumericCharacterSet] - } - pub unsafe fn decomposableCharacterSet() -> Id { - msg_send_id![Self::class(), decomposableCharacterSet] - } - pub unsafe fn illegalCharacterSet() -> Id { - msg_send_id![Self::class(), illegalCharacterSet] - } - pub unsafe fn punctuationCharacterSet() -> Id { - msg_send_id![Self::class(), punctuationCharacterSet] - } - pub unsafe fn capitalizedLetterCharacterSet() -> Id { - msg_send_id![Self::class(), capitalizedLetterCharacterSet] - } - pub unsafe fn symbolCharacterSet() -> Id { - msg_send_id![Self::class(), symbolCharacterSet] - } - pub unsafe fn newlineCharacterSet() -> Id { - msg_send_id![Self::class(), newlineCharacterSet] - } - pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id { - msg_send_id![Self::class(), characterSetWithRange: aRange] - } + # [method (addCharactersInRange :)] + pub unsafe fn addCharactersInRange(&self, aRange: NSRange); + # [method (removeCharactersInRange :)] + pub unsafe fn removeCharactersInRange(&self, aRange: NSRange); + # [method (addCharactersInString :)] + pub unsafe fn addCharactersInString(&self, aString: &NSString); + # [method (removeCharactersInString :)] + pub unsafe fn removeCharactersInString(&self, aString: &NSString); + # [method (formUnionWithCharacterSet :)] + pub unsafe fn formUnionWithCharacterSet(&self, otherSet: &NSCharacterSet); + # [method (formIntersectionWithCharacterSet :)] + pub unsafe fn formIntersectionWithCharacterSet(&self, otherSet: &NSCharacterSet); + #[method(invert)] + pub unsafe fn invert(&self); + #[method_id(controlCharacterSet)] + pub unsafe fn controlCharacterSet() -> Id; + #[method_id(whitespaceCharacterSet)] + pub unsafe fn whitespaceCharacterSet() -> Id; + #[method_id(whitespaceAndNewlineCharacterSet)] + pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id; + #[method_id(decimalDigitCharacterSet)] + pub unsafe fn decimalDigitCharacterSet() -> Id; + #[method_id(letterCharacterSet)] + pub unsafe fn letterCharacterSet() -> Id; + #[method_id(lowercaseLetterCharacterSet)] + pub unsafe fn lowercaseLetterCharacterSet() -> Id; + #[method_id(uppercaseLetterCharacterSet)] + pub unsafe fn uppercaseLetterCharacterSet() -> Id; + #[method_id(nonBaseCharacterSet)] + pub unsafe fn nonBaseCharacterSet() -> Id; + #[method_id(alphanumericCharacterSet)] + pub unsafe fn alphanumericCharacterSet() -> Id; + #[method_id(decomposableCharacterSet)] + pub unsafe fn decomposableCharacterSet() -> Id; + #[method_id(illegalCharacterSet)] + pub unsafe fn illegalCharacterSet() -> Id; + #[method_id(punctuationCharacterSet)] + pub unsafe fn punctuationCharacterSet() -> Id; + #[method_id(capitalizedLetterCharacterSet)] + pub unsafe fn capitalizedLetterCharacterSet() -> Id; + #[method_id(symbolCharacterSet)] + pub unsafe fn symbolCharacterSet() -> Id; + #[method_id(newlineCharacterSet)] + pub unsafe fn newlineCharacterSet() -> Id; + # [method_id (characterSetWithRange :)] + pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id; + # [method_id (characterSetWithCharactersInString :)] pub unsafe fn characterSetWithCharactersInString( aString: &NSString, - ) -> Id { - msg_send_id![Self::class(), characterSetWithCharactersInString: aString] - } + ) -> Id; + # [method_id (characterSetWithBitmapRepresentation :)] pub unsafe fn characterSetWithBitmapRepresentation( data: &NSData, - ) -> Id { - msg_send_id![Self::class(), characterSetWithBitmapRepresentation: data] - } + ) -> Id; + # [method_id (characterSetWithContentsOfFile :)] pub unsafe fn characterSetWithContentsOfFile( fName: &NSString, - ) -> Option> { - msg_send_id![Self::class(), characterSetWithContentsOfFile: fName] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index 1affb260e..5d4ab4024 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSClassDescription; @@ -17,61 +17,45 @@ extern_class!( ); extern_methods!( unsafe impl NSClassDescription { + # [method (registerClassDescription : forClass :)] pub unsafe fn registerClassDescription_forClass( description: &NSClassDescription, aClass: &Class, - ) { - msg_send![ - Self::class(), - registerClassDescription: description, - forClass: aClass - ] - } - pub unsafe fn invalidateClassDescriptionCache() { - msg_send![Self::class(), invalidateClassDescriptionCache] - } + ); + #[method(invalidateClassDescriptionCache)] + pub unsafe fn invalidateClassDescriptionCache(); + # [method_id (classDescriptionForClass :)] pub unsafe fn classDescriptionForClass( aClass: &Class, - ) -> Option> { - msg_send_id![Self::class(), classDescriptionForClass: aClass] - } - pub unsafe fn attributeKeys(&self) -> Id, Shared> { - msg_send_id![self, attributeKeys] - } - pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared> { - msg_send_id![self, toOneRelationshipKeys] - } - pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared> { - msg_send_id![self, toManyRelationshipKeys] - } + ) -> Option>; + #[method_id(attributeKeys)] + pub unsafe fn attributeKeys(&self) -> Id, Shared>; + #[method_id(toOneRelationshipKeys)] + pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared>; + #[method_id(toManyRelationshipKeys)] + pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared>; + # [method_id (inverseForRelationshipKey :)] pub unsafe fn inverseForRelationshipKey( &self, relationshipKey: &NSString, - ) -> Option> { - msg_send_id![self, inverseForRelationshipKey: relationshipKey] - } + ) -> Option>; } ); extern_methods!( #[doc = "NSClassDescriptionPrimitives"] unsafe impl NSObject { - pub unsafe fn classDescription(&self) -> Id { - msg_send_id![self, classDescription] - } - pub unsafe fn attributeKeys(&self) -> Id, Shared> { - msg_send_id![self, attributeKeys] - } - pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared> { - msg_send_id![self, toOneRelationshipKeys] - } - pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared> { - msg_send_id![self, toManyRelationshipKeys] - } + #[method_id(classDescription)] + pub unsafe fn classDescription(&self) -> Id; + #[method_id(attributeKeys)] + pub unsafe fn attributeKeys(&self) -> Id, Shared>; + #[method_id(toOneRelationshipKeys)] + pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared>; + #[method_id(toManyRelationshipKeys)] + pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared>; + # [method_id (inverseForRelationshipKey :)] pub unsafe fn inverseForRelationshipKey( &self, relationshipKey: &NSString, - ) -> Option> { - msg_send_id![self, inverseForRelationshipKey: relationshipKey] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 78d4f9e45..d47500b05 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCoder; @@ -15,306 +15,219 @@ extern_class!( ); extern_methods!( unsafe impl NSCoder { + # [method (encodeValueOfObjCType : at :)] pub unsafe fn encodeValueOfObjCType_at( &self, type_: NonNull, addr: NonNull, - ) { - msg_send![self, encodeValueOfObjCType: type_, at: addr] - } - pub unsafe fn encodeDataObject(&self, data: &NSData) { - msg_send![self, encodeDataObject: data] - } - pub unsafe fn decodeDataObject(&self) -> Option> { - msg_send_id![self, decodeDataObject] - } + ); + # [method (encodeDataObject :)] + pub unsafe fn encodeDataObject(&self, data: &NSData); + #[method_id(decodeDataObject)] + pub unsafe fn decodeDataObject(&self) -> Option>; + # [method (decodeValueOfObjCType : at : size :)] pub unsafe fn decodeValueOfObjCType_at_size( &self, type_: NonNull, data: NonNull, size: NSUInteger, - ) { - msg_send![self, decodeValueOfObjCType: type_, at: data, size: size] - } - pub unsafe fn versionForClassName(&self, className: &NSString) -> NSInteger { - msg_send![self, versionForClassName: className] - } + ); + # [method (versionForClassName :)] + pub unsafe fn versionForClassName(&self, className: &NSString) -> NSInteger; } ); extern_methods!( #[doc = "NSExtendedCoder"] unsafe impl NSCoder { - pub unsafe fn encodeObject(&self, object: Option<&Object>) { - msg_send![self, encodeObject: object] - } - pub unsafe fn encodeRootObject(&self, rootObject: &Object) { - msg_send![self, encodeRootObject: rootObject] - } - pub unsafe fn encodeBycopyObject(&self, anObject: Option<&Object>) { - msg_send![self, encodeBycopyObject: anObject] - } - pub unsafe fn encodeByrefObject(&self, anObject: Option<&Object>) { - msg_send![self, encodeByrefObject: anObject] - } - pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>) { - msg_send![self, encodeConditionalObject: object] - } + # [method (encodeObject :)] + pub unsafe fn encodeObject(&self, object: Option<&Object>); + # [method (encodeRootObject :)] + pub unsafe fn encodeRootObject(&self, rootObject: &Object); + # [method (encodeBycopyObject :)] + pub unsafe fn encodeBycopyObject(&self, anObject: Option<&Object>); + # [method (encodeByrefObject :)] + pub unsafe fn encodeByrefObject(&self, anObject: Option<&Object>); + # [method (encodeConditionalObject :)] + pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>); + # [method (encodeArrayOfObjCType : count : at :)] pub unsafe fn encodeArrayOfObjCType_count_at( &self, type_: NonNull, count: NSUInteger, array: NonNull, - ) { - msg_send![self, encodeArrayOfObjCType: type_, count: count, at: array] - } - pub unsafe fn encodeBytes_length(&self, byteaddr: *mut c_void, length: NSUInteger) { - msg_send![self, encodeBytes: byteaddr, length: length] - } - pub unsafe fn decodeObject(&self) -> Option> { - msg_send_id![self, decodeObject] - } + ); + # [method (encodeBytes : length :)] + pub unsafe fn encodeBytes_length(&self, byteaddr: *mut c_void, length: NSUInteger); + #[method_id(decodeObject)] + pub unsafe fn decodeObject(&self) -> Option>; + # [method_id (decodeTopLevelObjectAndReturnError :)] pub unsafe fn decodeTopLevelObjectAndReturnError( &self, - ) -> Result, Id> { - msg_send_id![self, decodeTopLevelObjectAndReturnError: _] - } + ) -> Result, Id>; + # [method (decodeArrayOfObjCType : count : at :)] pub unsafe fn decodeArrayOfObjCType_count_at( &self, itemType: NonNull, count: NSUInteger, array: NonNull, - ) { - msg_send![ - self, - decodeArrayOfObjCType: itemType, - count: count, - at: array - ] - } + ); + # [method (decodeBytesWithReturnedLength :)] pub unsafe fn decodeBytesWithReturnedLength( &self, lengthp: NonNull, - ) -> *mut c_void { - msg_send![self, decodeBytesWithReturnedLength: lengthp] - } - pub unsafe fn encodePropertyList(&self, aPropertyList: &Object) { - msg_send![self, encodePropertyList: aPropertyList] - } - pub unsafe fn decodePropertyList(&self) -> Option> { - msg_send_id![self, decodePropertyList] - } - pub unsafe fn setObjectZone(&self, zone: *mut NSZone) { - msg_send![self, setObjectZone: zone] - } - pub unsafe fn objectZone(&self) -> *mut NSZone { - msg_send![self, objectZone] - } - pub unsafe fn systemVersion(&self) -> c_uint { - msg_send![self, systemVersion] - } - pub unsafe fn allowsKeyedCoding(&self) -> bool { - msg_send![self, allowsKeyedCoding] - } - pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString) { - msg_send![self, encodeObject: object, forKey: key] - } + ) -> *mut c_void; + # [method (encodePropertyList :)] + pub unsafe fn encodePropertyList(&self, aPropertyList: &Object); + #[method_id(decodePropertyList)] + pub unsafe fn decodePropertyList(&self) -> Option>; + # [method (setObjectZone :)] + pub unsafe fn setObjectZone(&self, zone: *mut NSZone); + #[method(objectZone)] + pub unsafe fn objectZone(&self) -> *mut NSZone; + #[method(systemVersion)] + pub unsafe fn systemVersion(&self) -> c_uint; + #[method(allowsKeyedCoding)] + pub unsafe fn allowsKeyedCoding(&self) -> bool; + # [method (encodeObject : forKey :)] + pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString); + # [method (encodeConditionalObject : forKey :)] pub unsafe fn encodeConditionalObject_forKey( &self, object: Option<&Object>, key: &NSString, - ) { - msg_send![self, encodeConditionalObject: object, forKey: key] - } - pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString) { - msg_send![self, encodeBool: value, forKey: key] - } - pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString) { - msg_send![self, encodeInt: value, forKey: key] - } - pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString) { - msg_send![self, encodeInt32: value, forKey: key] - } - pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString) { - msg_send![self, encodeInt64: value, forKey: key] - } - pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString) { - msg_send![self, encodeFloat: value, forKey: key] - } - pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString) { - msg_send![self, encodeDouble: value, forKey: key] - } + ); + # [method (encodeBool : forKey :)] + pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString); + # [method (encodeInt : forKey :)] + pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString); + # [method (encodeInt32 : forKey :)] + pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString); + # [method (encodeInt64 : forKey :)] + pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString); + # [method (encodeFloat : forKey :)] + pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString); + # [method (encodeDouble : forKey :)] + pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString); + # [method (encodeBytes : length : forKey :)] pub unsafe fn encodeBytes_length_forKey( &self, bytes: *mut u8, length: NSUInteger, key: &NSString, - ) { - msg_send![self, encodeBytes: bytes, length: length, forKey: key] - } - pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool { - msg_send![self, containsValueForKey: key] - } - pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, decodeObjectForKey: key] - } + ); + # [method (containsValueForKey :)] + pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; + # [method_id (decodeObjectForKey :)] + pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option>; + # [method_id (decodeTopLevelObjectForKey : error :)] pub unsafe fn decodeTopLevelObjectForKey_error( &self, key: &NSString, - ) -> Result, Id> { - msg_send_id![self, decodeTopLevelObjectForKey: key, error: _] - } - pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool { - msg_send![self, decodeBoolForKey: key] - } - pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int { - msg_send![self, decodeIntForKey: key] - } - pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32 { - msg_send![self, decodeInt32ForKey: key] - } - pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t { - msg_send![self, decodeInt64ForKey: key] - } - pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float { - msg_send![self, decodeFloatForKey: key] - } - pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double { - msg_send![self, decodeDoubleForKey: key] - } + ) -> Result, Id>; + # [method (decodeBoolForKey :)] + pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool; + # [method (decodeIntForKey :)] + pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int; + # [method (decodeInt32ForKey :)] + pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32; + # [method (decodeInt64ForKey :)] + pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t; + # [method (decodeFloatForKey :)] + pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float; + # [method (decodeDoubleForKey :)] + pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double; + # [method (decodeBytesForKey : returnedLength :)] pub unsafe fn decodeBytesForKey_returnedLength( &self, key: &NSString, lengthp: *mut NSUInteger, - ) -> *mut u8 { - msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] - } - pub unsafe fn encodeInteger_forKey(&self, value: NSInteger, key: &NSString) { - msg_send![self, encodeInteger: value, forKey: key] - } - pub unsafe fn decodeIntegerForKey(&self, key: &NSString) -> NSInteger { - msg_send![self, decodeIntegerForKey: key] - } - pub unsafe fn requiresSecureCoding(&self) -> bool { - msg_send![self, requiresSecureCoding] - } + ) -> *mut u8; + # [method (encodeInteger : forKey :)] + pub unsafe fn encodeInteger_forKey(&self, value: NSInteger, key: &NSString); + # [method (decodeIntegerForKey :)] + pub unsafe fn decodeIntegerForKey(&self, key: &NSString) -> NSInteger; + #[method(requiresSecureCoding)] + pub unsafe fn requiresSecureCoding(&self) -> bool; + # [method_id (decodeObjectOfClass : forKey :)] pub unsafe fn decodeObjectOfClass_forKey( &self, aClass: &Class, key: &NSString, - ) -> Option> { - msg_send_id![self, decodeObjectOfClass: aClass, forKey: key] - } + ) -> Option>; + # [method_id (decodeTopLevelObjectOfClass : forKey : error :)] pub unsafe fn decodeTopLevelObjectOfClass_forKey_error( &self, aClass: &Class, key: &NSString, - ) -> Result, Id> { - msg_send_id![ - self, - decodeTopLevelObjectOfClass: aClass, - forKey: key, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (decodeArrayOfObjectsOfClass : forKey :)] pub unsafe fn decodeArrayOfObjectsOfClass_forKey( &self, cls: &Class, key: &NSString, - ) -> Option> { - msg_send_id![self, decodeArrayOfObjectsOfClass: cls, forKey: key] - } + ) -> Option>; + # [method_id (decodeDictionaryWithKeysOfClass : objectsOfClass : forKey :)] pub unsafe fn decodeDictionaryWithKeysOfClass_objectsOfClass_forKey( &self, keyCls: &Class, objectCls: &Class, key: &NSString, - ) -> Option> { - msg_send_id![ - self, - decodeDictionaryWithKeysOfClass: keyCls, - objectsOfClass: objectCls, - forKey: key - ] - } + ) -> Option>; + # [method_id (decodeObjectOfClasses : forKey :)] pub unsafe fn decodeObjectOfClasses_forKey( &self, classes: Option<&NSSet>, key: &NSString, - ) -> Option> { - msg_send_id![self, decodeObjectOfClasses: classes, forKey: key] - } + ) -> Option>; + # [method_id (decodeTopLevelObjectOfClasses : forKey : error :)] pub unsafe fn decodeTopLevelObjectOfClasses_forKey_error( &self, classes: Option<&NSSet>, key: &NSString, - ) -> Result, Id> { - msg_send_id![ - self, - decodeTopLevelObjectOfClasses: classes, - forKey: key, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (decodeArrayOfObjectsOfClasses : forKey :)] pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( &self, classes: &NSSet, key: &NSString, - ) -> Option> { - msg_send_id![self, decodeArrayOfObjectsOfClasses: classes, forKey: key] - } + ) -> Option>; + # [method_id (decodeDictionaryWithKeysOfClasses : objectsOfClasses : forKey :)] pub unsafe fn decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey( &self, keyClasses: &NSSet, objectClasses: &NSSet, key: &NSString, - ) -> Option> { - msg_send_id![ - self, - decodeDictionaryWithKeysOfClasses: keyClasses, - objectsOfClasses: objectClasses, - forKey: key - ] - } - pub unsafe fn decodePropertyListForKey( - &self, - key: &NSString, - ) -> Option> { - msg_send_id![self, decodePropertyListForKey: key] - } - pub unsafe fn allowedClasses(&self) -> Option, Shared>> { - msg_send_id![self, allowedClasses] - } - pub unsafe fn failWithError(&self, error: &NSError) { - msg_send![self, failWithError: error] - } - pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy { - msg_send![self, decodingFailurePolicy] - } - pub unsafe fn error(&self) -> Option> { - msg_send_id![self, error] - } + ) -> Option>; + # [method_id (decodePropertyListForKey :)] + pub unsafe fn decodePropertyListForKey(&self, key: &NSString) + -> Option>; + #[method_id(allowedClasses)] + pub unsafe fn allowedClasses(&self) -> Option, Shared>>; + # [method (failWithError :)] + pub unsafe fn failWithError(&self, error: &NSError); + #[method(decodingFailurePolicy)] + pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy; + #[method_id(error)] + pub unsafe fn error(&self) -> Option>; } ); extern_methods!( #[doc = "NSTypedstreamCompatibility"] unsafe impl NSCoder { - pub unsafe fn encodeNXObject(&self, object: &Object) { - msg_send![self, encodeNXObject: object] - } - pub unsafe fn decodeNXObject(&self) -> Option> { - msg_send_id![self, decodeNXObject] - } + # [method (encodeNXObject :)] + pub unsafe fn encodeNXObject(&self, object: &Object); + #[method_id(decodeNXObject)] + pub unsafe fn decodeNXObject(&self) -> Option>; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSCoder { + # [method (decodeValueOfObjCType : at :)] pub unsafe fn decodeValueOfObjCType_at( &self, type_: NonNull, data: NonNull, - ) { - msg_send![self, decodeValueOfObjCType: type_, at: data] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index 4489be1db..aba54390a 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSComparisonPredicate; @@ -14,27 +14,21 @@ extern_class!( ); extern_methods!( unsafe impl NSComparisonPredicate { + # [method_id (predicateWithLeftExpression : rightExpression : modifier : type : options :)] pub unsafe fn predicateWithLeftExpression_rightExpression_modifier_type_options( lhs: &NSExpression, rhs: &NSExpression, modifier: NSComparisonPredicateModifier, type_: NSPredicateOperatorType, options: NSComparisonPredicateOptions, - ) -> Id { - msg_send_id ! [Self :: class () , predicateWithLeftExpression : lhs , rightExpression : rhs , modifier : modifier , type : type_ , options : options] - } + ) -> Id; + # [method_id (predicateWithLeftExpression : rightExpression : customSelector :)] pub unsafe fn predicateWithLeftExpression_rightExpression_customSelector( lhs: &NSExpression, rhs: &NSExpression, selector: Sel, - ) -> Id { - msg_send_id![ - Self::class(), - predicateWithLeftExpression: lhs, - rightExpression: rhs, - customSelector: selector - ] - } + ) -> Id; + # [method_id (initWithLeftExpression : rightExpression : modifier : type : options :)] pub unsafe fn initWithLeftExpression_rightExpression_modifier_type_options( &self, lhs: &NSExpression, @@ -42,42 +36,27 @@ extern_methods!( modifier: NSComparisonPredicateModifier, type_: NSPredicateOperatorType, options: NSComparisonPredicateOptions, - ) -> Id { - msg_send_id ! [self , initWithLeftExpression : lhs , rightExpression : rhs , modifier : modifier , type : type_ , options : options] - } + ) -> Id; + # [method_id (initWithLeftExpression : rightExpression : customSelector :)] pub unsafe fn initWithLeftExpression_rightExpression_customSelector( &self, lhs: &NSExpression, rhs: &NSExpression, selector: Sel, - ) -> Id { - msg_send_id![ - self, - initWithLeftExpression: lhs, - rightExpression: rhs, - customSelector: selector - ] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn predicateOperatorType(&self) -> NSPredicateOperatorType { - msg_send![self, predicateOperatorType] - } - pub unsafe fn comparisonPredicateModifier(&self) -> NSComparisonPredicateModifier { - msg_send![self, comparisonPredicateModifier] - } - pub unsafe fn leftExpression(&self) -> Id { - msg_send_id![self, leftExpression] - } - pub unsafe fn rightExpression(&self) -> Id { - msg_send_id![self, rightExpression] - } - pub unsafe fn customSelector(&self) -> Option { - msg_send![self, customSelector] - } - pub unsafe fn options(&self) -> NSComparisonPredicateOptions { - msg_send![self, options] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(predicateOperatorType)] + pub unsafe fn predicateOperatorType(&self) -> NSPredicateOperatorType; + #[method(comparisonPredicateModifier)] + pub unsafe fn comparisonPredicateModifier(&self) -> NSComparisonPredicateModifier; + #[method_id(leftExpression)] + pub unsafe fn leftExpression(&self) -> Id; + #[method_id(rightExpression)] + pub unsafe fn rightExpression(&self) -> Id; + #[method(customSelector)] + pub unsafe fn customSelector(&self) -> Option; + #[method(options)] + pub unsafe fn options(&self) -> NSComparisonPredicateOptions; } ); diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 7e3ccfdcb..cd520d203 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCompoundPredicate; @@ -13,36 +13,29 @@ extern_class!( ); extern_methods!( unsafe impl NSCompoundPredicate { + # [method_id (initWithType : subpredicates :)] pub unsafe fn initWithType_subpredicates( &self, type_: NSCompoundPredicateType, subpredicates: &NSArray, - ) -> Id { - msg_send_id![self, initWithType: type_, subpredicates: subpredicates] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType { - msg_send![self, compoundPredicateType] - } - pub unsafe fn subpredicates(&self) -> Id { - msg_send_id![self, subpredicates] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(compoundPredicateType)] + pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType; + #[method_id(subpredicates)] + pub unsafe fn subpredicates(&self) -> Id; + # [method_id (andPredicateWithSubpredicates :)] pub unsafe fn andPredicateWithSubpredicates( subpredicates: &NSArray, - ) -> Id { - msg_send_id![Self::class(), andPredicateWithSubpredicates: subpredicates] - } + ) -> Id; + # [method_id (orPredicateWithSubpredicates :)] pub unsafe fn orPredicateWithSubpredicates( subpredicates: &NSArray, - ) -> Id { - msg_send_id![Self::class(), orPredicateWithSubpredicates: subpredicates] - } + ) -> Id; + # [method_id (notPredicateWithSubpredicate :)] pub unsafe fn notPredicateWithSubpredicate( predicate: &NSPredicate, - ) -> Id { - msg_send_id![Self::class(), notPredicateWithSubpredicate: predicate] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index c7c0cd8c9..71952eb1a 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -14,7 +14,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSConnection; @@ -24,195 +24,121 @@ extern_class!( ); extern_methods!( unsafe impl NSConnection { - pub unsafe fn statistics(&self) -> Id, Shared> { - msg_send_id![self, statistics] - } - pub unsafe fn allConnections() -> Id, Shared> { - msg_send_id![Self::class(), allConnections] - } - pub unsafe fn defaultConnection() -> Id { - msg_send_id![Self::class(), defaultConnection] - } + #[method_id(statistics)] + pub unsafe fn statistics(&self) -> Id, Shared>; + #[method_id(allConnections)] + pub unsafe fn allConnections() -> Id, Shared>; + #[method_id(defaultConnection)] + pub unsafe fn defaultConnection() -> Id; + # [method_id (connectionWithRegisteredName : host :)] pub unsafe fn connectionWithRegisteredName_host( name: &NSString, hostName: Option<&NSString>, - ) -> Option> { - msg_send_id![ - Self::class(), - connectionWithRegisteredName: name, - host: hostName - ] - } + ) -> Option>; + # [method_id (connectionWithRegisteredName : host : usingNameServer :)] pub unsafe fn connectionWithRegisteredName_host_usingNameServer( name: &NSString, hostName: Option<&NSString>, server: &NSPortNameServer, - ) -> Option> { - msg_send_id![ - Self::class(), - connectionWithRegisteredName: name, - host: hostName, - usingNameServer: server - ] - } + ) -> Option>; + # [method_id (rootProxyForConnectionWithRegisteredName : host :)] pub unsafe fn rootProxyForConnectionWithRegisteredName_host( name: &NSString, hostName: Option<&NSString>, - ) -> Option> { - msg_send_id![ - Self::class(), - rootProxyForConnectionWithRegisteredName: name, - host: hostName - ] - } + ) -> Option>; + # [method_id (rootProxyForConnectionWithRegisteredName : host : usingNameServer :)] pub unsafe fn rootProxyForConnectionWithRegisteredName_host_usingNameServer( name: &NSString, hostName: Option<&NSString>, server: &NSPortNameServer, - ) -> Option> { - msg_send_id![ - Self::class(), - rootProxyForConnectionWithRegisteredName: name, - host: hostName, - usingNameServer: server - ] - } + ) -> Option>; + # [method_id (serviceConnectionWithName : rootObject : usingNameServer :)] pub unsafe fn serviceConnectionWithName_rootObject_usingNameServer( name: &NSString, root: &Object, server: &NSPortNameServer, - ) -> Option> { - msg_send_id![ - Self::class(), - serviceConnectionWithName: name, - rootObject: root, - usingNameServer: server - ] - } + ) -> Option>; + # [method_id (serviceConnectionWithName : rootObject :)] pub unsafe fn serviceConnectionWithName_rootObject( name: &NSString, root: &Object, - ) -> Option> { - msg_send_id![ - Self::class(), - serviceConnectionWithName: name, - rootObject: root - ] - } - pub unsafe fn requestTimeout(&self) -> NSTimeInterval { - msg_send![self, requestTimeout] - } - pub unsafe fn setRequestTimeout(&self, requestTimeout: NSTimeInterval) { - msg_send![self, setRequestTimeout: requestTimeout] - } - pub unsafe fn replyTimeout(&self) -> NSTimeInterval { - msg_send![self, replyTimeout] - } - pub unsafe fn setReplyTimeout(&self, replyTimeout: NSTimeInterval) { - msg_send![self, setReplyTimeout: replyTimeout] - } - pub unsafe fn rootObject(&self) -> Option> { - msg_send_id![self, rootObject] - } - pub unsafe fn setRootObject(&self, rootObject: Option<&Object>) { - msg_send![self, setRootObject: rootObject] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSConnectionDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn independentConversationQueueing(&self) -> bool { - msg_send![self, independentConversationQueueing] - } + ) -> Option>; + #[method(requestTimeout)] + pub unsafe fn requestTimeout(&self) -> NSTimeInterval; + # [method (setRequestTimeout :)] + pub unsafe fn setRequestTimeout(&self, requestTimeout: NSTimeInterval); + #[method(replyTimeout)] + pub unsafe fn replyTimeout(&self) -> NSTimeInterval; + # [method (setReplyTimeout :)] + pub unsafe fn setReplyTimeout(&self, replyTimeout: NSTimeInterval); + #[method_id(rootObject)] + pub unsafe fn rootObject(&self) -> Option>; + # [method (setRootObject :)] + pub unsafe fn setRootObject(&self, rootObject: Option<&Object>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSConnectionDelegate>); + #[method(independentConversationQueueing)] + pub unsafe fn independentConversationQueueing(&self) -> bool; + # [method (setIndependentConversationQueueing :)] pub unsafe fn setIndependentConversationQueueing( &self, independentConversationQueueing: bool, - ) { - msg_send![ - self, - setIndependentConversationQueueing: independentConversationQueueing - ] - } - pub unsafe fn isValid(&self) -> bool { - msg_send![self, isValid] - } - pub unsafe fn rootProxy(&self) -> Id { - msg_send_id![self, rootProxy] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn addRequestMode(&self, rmode: &NSString) { - msg_send![self, addRequestMode: rmode] - } - pub unsafe fn removeRequestMode(&self, rmode: &NSString) { - msg_send![self, removeRequestMode: rmode] - } - pub unsafe fn requestModes(&self) -> Id, Shared> { - msg_send_id![self, requestModes] - } - pub unsafe fn registerName(&self, name: Option<&NSString>) -> bool { - msg_send![self, registerName: name] - } + ); + #[method(isValid)] + pub unsafe fn isValid(&self) -> bool; + #[method_id(rootProxy)] + pub unsafe fn rootProxy(&self) -> Id; + #[method(invalidate)] + pub unsafe fn invalidate(&self); + # [method (addRequestMode :)] + pub unsafe fn addRequestMode(&self, rmode: &NSString); + # [method (removeRequestMode :)] + pub unsafe fn removeRequestMode(&self, rmode: &NSString); + #[method_id(requestModes)] + pub unsafe fn requestModes(&self) -> Id, Shared>; + # [method (registerName :)] + pub unsafe fn registerName(&self, name: Option<&NSString>) -> bool; + # [method (registerName : withNameServer :)] pub unsafe fn registerName_withNameServer( &self, name: Option<&NSString>, server: &NSPortNameServer, - ) -> bool { - msg_send![self, registerName: name, withNameServer: server] - } + ) -> bool; + # [method_id (connectionWithReceivePort : sendPort :)] pub unsafe fn connectionWithReceivePort_sendPort( receivePort: Option<&NSPort>, sendPort: Option<&NSPort>, - ) -> Option> { - msg_send_id![ - Self::class(), - connectionWithReceivePort: receivePort, - sendPort: sendPort - ] - } - pub unsafe fn currentConversation() -> Option> { - msg_send_id![Self::class(), currentConversation] - } + ) -> Option>; + #[method_id(currentConversation)] + pub unsafe fn currentConversation() -> Option>; + # [method_id (initWithReceivePort : sendPort :)] pub unsafe fn initWithReceivePort_sendPort( &self, receivePort: Option<&NSPort>, sendPort: Option<&NSPort>, - ) -> Option> { - msg_send_id![self, initWithReceivePort: receivePort, sendPort: sendPort] - } - pub unsafe fn sendPort(&self) -> Id { - msg_send_id![self, sendPort] - } - pub unsafe fn receivePort(&self) -> Id { - msg_send_id![self, receivePort] - } - pub unsafe fn enableMultipleThreads(&self) { - msg_send![self, enableMultipleThreads] - } - pub unsafe fn multipleThreadsEnabled(&self) -> bool { - msg_send![self, multipleThreadsEnabled] - } - pub unsafe fn addRunLoop(&self, runloop: &NSRunLoop) { - msg_send![self, addRunLoop: runloop] - } - pub unsafe fn removeRunLoop(&self, runloop: &NSRunLoop) { - msg_send![self, removeRunLoop: runloop] - } - pub unsafe fn runInNewThread(&self) { - msg_send![self, runInNewThread] - } - pub unsafe fn remoteObjects(&self) -> Id { - msg_send_id![self, remoteObjects] - } - pub unsafe fn localObjects(&self) -> Id { - msg_send_id![self, localObjects] - } - pub unsafe fn dispatchWithComponents(&self, components: &NSArray) { - msg_send![self, dispatchWithComponents: components] - } + ) -> Option>; + #[method_id(sendPort)] + pub unsafe fn sendPort(&self) -> Id; + #[method_id(receivePort)] + pub unsafe fn receivePort(&self) -> Id; + #[method(enableMultipleThreads)] + pub unsafe fn enableMultipleThreads(&self); + #[method(multipleThreadsEnabled)] + pub unsafe fn multipleThreadsEnabled(&self) -> bool; + # [method (addRunLoop :)] + pub unsafe fn addRunLoop(&self, runloop: &NSRunLoop); + # [method (removeRunLoop :)] + pub unsafe fn removeRunLoop(&self, runloop: &NSRunLoop); + #[method(runInNewThread)] + pub unsafe fn runInNewThread(&self); + #[method_id(remoteObjects)] + pub unsafe fn remoteObjects(&self) -> Id; + #[method_id(localObjects)] + pub unsafe fn localObjects(&self) -> Id; + # [method (dispatchWithComponents :)] + pub unsafe fn dispatchWithComponents(&self, components: &NSArray); } ); pub type NSConnectionDelegate = NSObject; @@ -225,17 +151,13 @@ extern_class!( ); extern_methods!( unsafe impl NSDistantObjectRequest { - pub unsafe fn invocation(&self) -> Id { - msg_send_id![self, invocation] - } - pub unsafe fn connection(&self) -> Id { - msg_send_id![self, connection] - } - pub unsafe fn conversation(&self) -> Id { - msg_send_id![self, conversation] - } - pub unsafe fn replyWithException(&self, exception: Option<&NSException>) { - msg_send![self, replyWithException: exception] - } + #[method_id(invocation)] + pub unsafe fn invocation(&self) -> Id; + #[method_id(connection)] + pub unsafe fn connection(&self) -> Id; + #[method_id(conversation)] + pub unsafe fn conversation(&self) -> Id; + # [method (replyWithException :)] + pub unsafe fn replyWithException(&self, exception: Option<&NSException>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index e60d4ff6c..3462ad159 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSData; @@ -16,290 +16,200 @@ extern_class!( ); extern_methods!( unsafe impl NSData { - pub unsafe fn length(&self) -> NSUInteger { - msg_send![self, length] - } - pub unsafe fn bytes(&self) -> NonNull { - msg_send![self, bytes] - } + #[method(length)] + pub unsafe fn length(&self) -> NSUInteger; + #[method(bytes)] + pub unsafe fn bytes(&self) -> NonNull; } ); extern_methods!( #[doc = "NSExtendedData"] unsafe impl NSData { - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn getBytes_length(&self, buffer: NonNull, length: NSUInteger) { - msg_send![self, getBytes: buffer, length: length] - } - pub unsafe fn getBytes_range(&self, buffer: NonNull, range: NSRange) { - msg_send![self, getBytes: buffer, range: range] - } - pub unsafe fn isEqualToData(&self, other: &NSData) -> bool { - msg_send![self, isEqualToData: other] - } - pub unsafe fn subdataWithRange(&self, range: NSRange) -> Id { - msg_send_id![self, subdataWithRange: range] - } + #[method_id(description)] + pub unsafe fn description(&self) -> Id; + # [method (getBytes : length :)] + pub unsafe fn getBytes_length(&self, buffer: NonNull, length: NSUInteger); + # [method (getBytes : range :)] + pub unsafe fn getBytes_range(&self, buffer: NonNull, range: NSRange); + # [method (isEqualToData :)] + pub unsafe fn isEqualToData(&self, other: &NSData) -> bool; + # [method_id (subdataWithRange :)] + pub unsafe fn subdataWithRange(&self, range: NSRange) -> Id; + # [method (writeToFile : atomically :)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, - ) -> bool { - msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] - } - pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { - msg_send![self, writeToURL: url, atomically: atomically] - } + ) -> bool; + # [method (writeToURL : atomically :)] + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; + # [method (writeToFile : options : error :)] pub unsafe fn writeToFile_options_error( &self, path: &NSString, writeOptionsMask: NSDataWritingOptions, - ) -> Result<(), Id> { - msg_send![self, writeToFile: path, options: writeOptionsMask, error: _] - } + ) -> Result<(), Id>; + # [method (writeToURL : options : error :)] pub unsafe fn writeToURL_options_error( &self, url: &NSURL, writeOptionsMask: NSDataWritingOptions, - ) -> Result<(), Id> { - msg_send![self, writeToURL: url, options: writeOptionsMask, error: _] - } + ) -> Result<(), Id>; + # [method (rangeOfData : options : range :)] pub unsafe fn rangeOfData_options_range( &self, dataToFind: &NSData, mask: NSDataSearchOptions, searchRange: NSRange, - ) -> NSRange { - msg_send![ - self, - rangeOfData: dataToFind, - options: mask, - range: searchRange - ] - } - pub unsafe fn enumerateByteRangesUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateByteRangesUsingBlock: block] - } + ) -> NSRange; + # [method (enumerateByteRangesUsingBlock :)] + pub unsafe fn enumerateByteRangesUsingBlock(&self, block: TodoBlock); } ); extern_methods!( #[doc = "NSDataCreation"] unsafe impl NSData { - pub unsafe fn data() -> Id { - msg_send_id![Self::class(), data] - } + #[method_id(data)] + pub unsafe fn data() -> Id; + # [method_id (dataWithBytes : length :)] pub unsafe fn dataWithBytes_length( bytes: *mut c_void, length: NSUInteger, - ) -> Id { - msg_send_id![Self::class(), dataWithBytes: bytes, length: length] - } + ) -> Id; + # [method_id (dataWithBytesNoCopy : length :)] pub unsafe fn dataWithBytesNoCopy_length( bytes: NonNull, length: NSUInteger, - ) -> Id { - msg_send_id![Self::class(), dataWithBytesNoCopy: bytes, length: length] - } + ) -> Id; + # [method_id (dataWithBytesNoCopy : length : freeWhenDone :)] pub unsafe fn dataWithBytesNoCopy_length_freeWhenDone( bytes: NonNull, length: NSUInteger, b: bool, - ) -> Id { - msg_send_id![ - Self::class(), - dataWithBytesNoCopy: bytes, - length: length, - freeWhenDone: b - ] - } + ) -> Id; + # [method_id (dataWithContentsOfFile : options : error :)] pub unsafe fn dataWithContentsOfFile_options_error( path: &NSString, readOptionsMask: NSDataReadingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - dataWithContentsOfFile: path, - options: readOptionsMask, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (dataWithContentsOfURL : options : error :)] pub unsafe fn dataWithContentsOfURL_options_error( url: &NSURL, readOptionsMask: NSDataReadingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - dataWithContentsOfURL: url, - options: readOptionsMask, - error: _ - ] - } - pub unsafe fn dataWithContentsOfFile(path: &NSString) -> Option> { - msg_send_id![Self::class(), dataWithContentsOfFile: path] - } - pub unsafe fn dataWithContentsOfURL(url: &NSURL) -> Option> { - msg_send_id![Self::class(), dataWithContentsOfURL: url] - } + ) -> Result, Id>; + # [method_id (dataWithContentsOfFile :)] + pub unsafe fn dataWithContentsOfFile(path: &NSString) -> Option>; + # [method_id (dataWithContentsOfURL :)] + pub unsafe fn dataWithContentsOfURL(url: &NSURL) -> Option>; + # [method_id (initWithBytes : length :)] pub unsafe fn initWithBytes_length( &self, bytes: *mut c_void, length: NSUInteger, - ) -> Id { - msg_send_id![self, initWithBytes: bytes, length: length] - } + ) -> Id; + # [method_id (initWithBytesNoCopy : length :)] pub unsafe fn initWithBytesNoCopy_length( &self, bytes: NonNull, length: NSUInteger, - ) -> Id { - msg_send_id![self, initWithBytesNoCopy: bytes, length: length] - } + ) -> Id; + # [method_id (initWithBytesNoCopy : length : freeWhenDone :)] pub unsafe fn initWithBytesNoCopy_length_freeWhenDone( &self, bytes: NonNull, length: NSUInteger, b: bool, - ) -> Id { - msg_send_id![ - self, - initWithBytesNoCopy: bytes, - length: length, - freeWhenDone: b - ] - } + ) -> Id; + # [method_id (initWithBytesNoCopy : length : deallocator :)] pub unsafe fn initWithBytesNoCopy_length_deallocator( &self, bytes: NonNull, length: NSUInteger, deallocator: TodoBlock, - ) -> Id { - msg_send_id![ - self, - initWithBytesNoCopy: bytes, - length: length, - deallocator: deallocator - ] - } + ) -> Id; + # [method_id (initWithContentsOfFile : options : error :)] pub unsafe fn initWithContentsOfFile_options_error( &self, path: &NSString, readOptionsMask: NSDataReadingOptions, - ) -> Result, Id> { - msg_send_id![ - self, - initWithContentsOfFile: path, - options: readOptionsMask, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (initWithContentsOfURL : options : error :)] pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, readOptionsMask: NSDataReadingOptions, - ) -> Result, Id> { - msg_send_id![ - self, - initWithContentsOfURL: url, - options: readOptionsMask, - error: _ - ] - } - pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithContentsOfFile: path] - } - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithContentsOfURL: url] - } - pub unsafe fn initWithData(&self, data: &NSData) -> Id { - msg_send_id![self, initWithData: data] - } - pub unsafe fn dataWithData(data: &NSData) -> Id { - msg_send_id![Self::class(), dataWithData: data] - } + ) -> Result, Id>; + # [method_id (initWithContentsOfFile :)] + pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option>; + # [method_id (initWithContentsOfURL :)] + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + # [method_id (initWithData :)] + pub unsafe fn initWithData(&self, data: &NSData) -> Id; + # [method_id (dataWithData :)] + pub unsafe fn dataWithData(data: &NSData) -> Id; } ); extern_methods!( #[doc = "NSDataBase64Encoding"] unsafe impl NSData { + # [method_id (initWithBase64EncodedString : options :)] pub unsafe fn initWithBase64EncodedString_options( &self, base64String: &NSString, options: NSDataBase64DecodingOptions, - ) -> Option> { - msg_send_id![ - self, - initWithBase64EncodedString: base64String, - options: options - ] - } + ) -> Option>; + # [method_id (base64EncodedStringWithOptions :)] pub unsafe fn base64EncodedStringWithOptions( &self, options: NSDataBase64EncodingOptions, - ) -> Id { - msg_send_id![self, base64EncodedStringWithOptions: options] - } + ) -> Id; + # [method_id (initWithBase64EncodedData : options :)] pub unsafe fn initWithBase64EncodedData_options( &self, base64Data: &NSData, options: NSDataBase64DecodingOptions, - ) -> Option> { - msg_send_id![ - self, - initWithBase64EncodedData: base64Data, - options: options - ] - } + ) -> Option>; + # [method_id (base64EncodedDataWithOptions :)] pub unsafe fn base64EncodedDataWithOptions( &self, options: NSDataBase64EncodingOptions, - ) -> Id { - msg_send_id![self, base64EncodedDataWithOptions: options] - } + ) -> Id; } ); extern_methods!( #[doc = "NSDataCompression"] unsafe impl NSData { + # [method_id (decompressedDataUsingAlgorithm : error :)] pub unsafe fn decompressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - ) -> Result, Id> { - msg_send_id![self, decompressedDataUsingAlgorithm: algorithm, error: _] - } + ) -> Result, Id>; + # [method_id (compressedDataUsingAlgorithm : error :)] pub unsafe fn compressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - ) -> Result, Id> { - msg_send_id![self, compressedDataUsingAlgorithm: algorithm, error: _] - } + ) -> Result, Id>; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSData { - pub unsafe fn getBytes(&self, buffer: NonNull) { - msg_send![self, getBytes: buffer] - } - pub unsafe fn dataWithContentsOfMappedFile(path: &NSString) -> Option> { - msg_send_id![Self::class(), dataWithContentsOfMappedFile: path] - } + # [method (getBytes :)] + pub unsafe fn getBytes(&self, buffer: NonNull); + # [method_id (dataWithContentsOfMappedFile :)] + pub unsafe fn dataWithContentsOfMappedFile(path: &NSString) -> Option>; + # [method_id (initWithContentsOfMappedFile :)] pub unsafe fn initWithContentsOfMappedFile( &self, path: &NSString, - ) -> Option> { - msg_send_id![self, initWithContentsOfMappedFile: path] - } + ) -> Option>; + # [method_id (initWithBase64Encoding :)] pub unsafe fn initWithBase64Encoding( &self, base64String: &NSString, - ) -> Option> { - msg_send_id![self, initWithBase64Encoding: base64String] - } - pub unsafe fn base64Encoding(&self) -> Id { - msg_send_id![self, base64Encoding] - } + ) -> Option>; + #[method_id(base64Encoding)] + pub unsafe fn base64Encoding(&self) -> Id; } ); extern_class!( @@ -311,85 +221,64 @@ extern_class!( ); extern_methods!( unsafe impl NSMutableData { - pub unsafe fn mutableBytes(&self) -> NonNull { - msg_send![self, mutableBytes] - } - pub unsafe fn length(&self) -> NSUInteger { - msg_send![self, length] - } - pub unsafe fn setLength(&self, length: NSUInteger) { - msg_send![self, setLength: length] - } + #[method(mutableBytes)] + pub unsafe fn mutableBytes(&self) -> NonNull; + #[method(length)] + pub unsafe fn length(&self) -> NSUInteger; + # [method (setLength :)] + pub unsafe fn setLength(&self, length: NSUInteger); } ); extern_methods!( #[doc = "NSExtendedMutableData"] unsafe impl NSMutableData { - pub unsafe fn appendBytes_length(&self, bytes: NonNull, length: NSUInteger) { - msg_send![self, appendBytes: bytes, length: length] - } - pub unsafe fn appendData(&self, other: &NSData) { - msg_send![self, appendData: other] - } - pub unsafe fn increaseLengthBy(&self, extraLength: NSUInteger) { - msg_send![self, increaseLengthBy: extraLength] - } - pub unsafe fn replaceBytesInRange_withBytes(&self, range: NSRange, bytes: NonNull) { - msg_send![self, replaceBytesInRange: range, withBytes: bytes] - } - pub unsafe fn resetBytesInRange(&self, range: NSRange) { - msg_send![self, resetBytesInRange: range] - } - pub unsafe fn setData(&self, data: &NSData) { - msg_send![self, setData: data] - } + # [method (appendBytes : length :)] + pub unsafe fn appendBytes_length(&self, bytes: NonNull, length: NSUInteger); + # [method (appendData :)] + pub unsafe fn appendData(&self, other: &NSData); + # [method (increaseLengthBy :)] + pub unsafe fn increaseLengthBy(&self, extraLength: NSUInteger); + # [method (replaceBytesInRange : withBytes :)] + pub unsafe fn replaceBytesInRange_withBytes(&self, range: NSRange, bytes: NonNull); + # [method (resetBytesInRange :)] + pub unsafe fn resetBytesInRange(&self, range: NSRange); + # [method (setData :)] + pub unsafe fn setData(&self, data: &NSData); + # [method (replaceBytesInRange : withBytes : length :)] pub unsafe fn replaceBytesInRange_withBytes_length( &self, range: NSRange, replacementBytes: *mut c_void, replacementLength: NSUInteger, - ) { - msg_send![ - self, - replaceBytesInRange: range, - withBytes: replacementBytes, - length: replacementLength - ] - } + ); } ); extern_methods!( #[doc = "NSMutableDataCreation"] unsafe impl NSMutableData { - pub unsafe fn dataWithCapacity(aNumItems: NSUInteger) -> Option> { - msg_send_id![Self::class(), dataWithCapacity: aNumItems] - } - pub unsafe fn dataWithLength(length: NSUInteger) -> Option> { - msg_send_id![Self::class(), dataWithLength: length] - } - pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Option> { - msg_send_id![self, initWithCapacity: capacity] - } - pub unsafe fn initWithLength(&self, length: NSUInteger) -> Option> { - msg_send_id![self, initWithLength: length] - } + # [method_id (dataWithCapacity :)] + pub unsafe fn dataWithCapacity(aNumItems: NSUInteger) -> Option>; + # [method_id (dataWithLength :)] + pub unsafe fn dataWithLength(length: NSUInteger) -> Option>; + # [method_id (initWithCapacity :)] + pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Option>; + # [method_id (initWithLength :)] + pub unsafe fn initWithLength(&self, length: NSUInteger) -> Option>; } ); extern_methods!( #[doc = "NSMutableDataCompression"] unsafe impl NSMutableData { + # [method (decompressUsingAlgorithm : error :)] pub unsafe fn decompressUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - ) -> Result<(), Id> { - msg_send![self, decompressUsingAlgorithm: algorithm, error: _] - } + ) -> Result<(), Id>; + # [method (compressUsingAlgorithm : error :)] pub unsafe fn compressUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, - ) -> Result<(), Id> { - msg_send![self, compressUsingAlgorithm: algorithm, error: _] - } + ) -> Result<(), Id>; } ); extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index d6d934560..f865b8cf0 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDate; @@ -14,121 +14,86 @@ extern_class!( ); extern_methods!( unsafe impl NSDate { - pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval { - msg_send![self, timeIntervalSinceReferenceDate] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method(timeIntervalSinceReferenceDate)] + pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithTimeIntervalSinceReferenceDate :)] pub unsafe fn initWithTimeIntervalSinceReferenceDate( &self, ti: NSTimeInterval, - ) -> Id { - msg_send_id![self, initWithTimeIntervalSinceReferenceDate: ti] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedDate"] unsafe impl NSDate { - pub unsafe fn timeIntervalSinceDate(&self, anotherDate: &NSDate) -> NSTimeInterval { - msg_send![self, timeIntervalSinceDate: anotherDate] - } - pub unsafe fn timeIntervalSinceNow(&self) -> NSTimeInterval { - msg_send![self, timeIntervalSinceNow] - } - pub unsafe fn timeIntervalSince1970(&self) -> NSTimeInterval { - msg_send![self, timeIntervalSince1970] - } - pub unsafe fn addTimeInterval(&self, seconds: NSTimeInterval) -> Id { - msg_send_id![self, addTimeInterval: seconds] - } - pub unsafe fn dateByAddingTimeInterval(&self, ti: NSTimeInterval) -> Id { - msg_send_id![self, dateByAddingTimeInterval: ti] - } - pub unsafe fn earlierDate(&self, anotherDate: &NSDate) -> Id { - msg_send_id![self, earlierDate: anotherDate] - } - pub unsafe fn laterDate(&self, anotherDate: &NSDate) -> Id { - msg_send_id![self, laterDate: anotherDate] - } - pub unsafe fn compare(&self, other: &NSDate) -> NSComparisonResult { - msg_send![self, compare: other] - } - pub unsafe fn isEqualToDate(&self, otherDate: &NSDate) -> bool { - msg_send![self, isEqualToDate: otherDate] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionWithLocale( - &self, - locale: Option<&Object>, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn timeIntervalSinceReferenceDate() -> NSTimeInterval { - msg_send![Self::class(), timeIntervalSinceReferenceDate] - } + # [method (timeIntervalSinceDate :)] + pub unsafe fn timeIntervalSinceDate(&self, anotherDate: &NSDate) -> NSTimeInterval; + #[method(timeIntervalSinceNow)] + pub unsafe fn timeIntervalSinceNow(&self) -> NSTimeInterval; + #[method(timeIntervalSince1970)] + pub unsafe fn timeIntervalSince1970(&self) -> NSTimeInterval; + # [method_id (addTimeInterval :)] + pub unsafe fn addTimeInterval(&self, seconds: NSTimeInterval) -> Id; + # [method_id (dateByAddingTimeInterval :)] + pub unsafe fn dateByAddingTimeInterval(&self, ti: NSTimeInterval) -> Id; + # [method_id (earlierDate :)] + pub unsafe fn earlierDate(&self, anotherDate: &NSDate) -> Id; + # [method_id (laterDate :)] + pub unsafe fn laterDate(&self, anotherDate: &NSDate) -> Id; + # [method (compare :)] + pub unsafe fn compare(&self, other: &NSDate) -> NSComparisonResult; + # [method (isEqualToDate :)] + pub unsafe fn isEqualToDate(&self, otherDate: &NSDate) -> bool; + #[method_id(description)] + pub unsafe fn description(&self) -> Id; + # [method_id (descriptionWithLocale :)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + #[method(timeIntervalSinceReferenceDate)] + pub unsafe fn timeIntervalSinceReferenceDate() -> NSTimeInterval; } ); extern_methods!( #[doc = "NSDateCreation"] unsafe impl NSDate { - pub unsafe fn date() -> Id { - msg_send_id![Self::class(), date] - } - pub unsafe fn dateWithTimeIntervalSinceNow(secs: NSTimeInterval) -> Id { - msg_send_id![Self::class(), dateWithTimeIntervalSinceNow: secs] - } + #[method_id(date)] + pub unsafe fn date() -> Id; + # [method_id (dateWithTimeIntervalSinceNow :)] + pub unsafe fn dateWithTimeIntervalSinceNow(secs: NSTimeInterval) -> Id; + # [method_id (dateWithTimeIntervalSinceReferenceDate :)] pub unsafe fn dateWithTimeIntervalSinceReferenceDate( ti: NSTimeInterval, - ) -> Id { - msg_send_id![Self::class(), dateWithTimeIntervalSinceReferenceDate: ti] - } - pub unsafe fn dateWithTimeIntervalSince1970(secs: NSTimeInterval) -> Id { - msg_send_id![Self::class(), dateWithTimeIntervalSince1970: secs] - } + ) -> Id; + # [method_id (dateWithTimeIntervalSince1970 :)] + pub unsafe fn dateWithTimeIntervalSince1970(secs: NSTimeInterval) -> Id; + # [method_id (dateWithTimeInterval : sinceDate :)] pub unsafe fn dateWithTimeInterval_sinceDate( secsToBeAdded: NSTimeInterval, date: &NSDate, - ) -> Id { - msg_send_id![ - Self::class(), - dateWithTimeInterval: secsToBeAdded, - sinceDate: date - ] - } - pub unsafe fn distantFuture() -> Id { - msg_send_id![Self::class(), distantFuture] - } - pub unsafe fn distantPast() -> Id { - msg_send_id![Self::class(), distantPast] - } - pub unsafe fn now() -> Id { - msg_send_id![Self::class(), now] - } - pub unsafe fn initWithTimeIntervalSinceNow( - &self, - secs: NSTimeInterval, - ) -> Id { - msg_send_id![self, initWithTimeIntervalSinceNow: secs] - } + ) -> Id; + #[method_id(distantFuture)] + pub unsafe fn distantFuture() -> Id; + #[method_id(distantPast)] + pub unsafe fn distantPast() -> Id; + #[method_id(now)] + pub unsafe fn now() -> Id; + # [method_id (initWithTimeIntervalSinceNow :)] + pub unsafe fn initWithTimeIntervalSinceNow(&self, secs: NSTimeInterval) + -> Id; + # [method_id (initWithTimeIntervalSince1970 :)] pub unsafe fn initWithTimeIntervalSince1970( &self, secs: NSTimeInterval, - ) -> Id { - msg_send_id![self, initWithTimeIntervalSince1970: secs] - } + ) -> Id; + # [method_id (initWithTimeInterval : sinceDate :)] pub unsafe fn initWithTimeInterval_sinceDate( &self, secsToBeAdded: NSTimeInterval, date: &NSDate, - ) -> Id { - msg_send_id![self, initWithTimeInterval: secsToBeAdded, sinceDate: date] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index dccfb9a81..41c55d016 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSNumberFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDateComponentsFormatter; @@ -14,130 +14,87 @@ extern_class!( ); extern_methods!( unsafe impl NSDateComponentsFormatter { + # [method_id (stringForObjectValue :)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] - } + ) -> Option>; + # [method_id (stringFromDateComponents :)] pub unsafe fn stringFromDateComponents( &self, components: &NSDateComponents, - ) -> Option> { - msg_send_id![self, stringFromDateComponents: components] - } + ) -> Option>; + # [method_id (stringFromDate : toDate :)] pub unsafe fn stringFromDate_toDate( &self, startDate: &NSDate, endDate: &NSDate, - ) -> Option> { - msg_send_id![self, stringFromDate: startDate, toDate: endDate] - } + ) -> Option>; + # [method_id (stringFromTimeInterval :)] pub unsafe fn stringFromTimeInterval( &self, ti: NSTimeInterval, - ) -> Option> { - msg_send_id![self, stringFromTimeInterval: ti] - } + ) -> Option>; + # [method_id (localizedStringFromDateComponents : unitsStyle :)] pub unsafe fn localizedStringFromDateComponents_unitsStyle( components: &NSDateComponents, unitsStyle: NSDateComponentsFormatterUnitsStyle, - ) -> Option> { - msg_send_id![ - Self::class(), - localizedStringFromDateComponents: components, - unitsStyle: unitsStyle - ] - } - pub unsafe fn unitsStyle(&self) -> NSDateComponentsFormatterUnitsStyle { - msg_send![self, unitsStyle] - } - pub unsafe fn setUnitsStyle(&self, unitsStyle: NSDateComponentsFormatterUnitsStyle) { - msg_send![self, setUnitsStyle: unitsStyle] - } - pub unsafe fn allowedUnits(&self) -> NSCalendarUnit { - msg_send![self, allowedUnits] - } - pub unsafe fn setAllowedUnits(&self, allowedUnits: NSCalendarUnit) { - msg_send![self, setAllowedUnits: allowedUnits] - } + ) -> Option>; + #[method(unitsStyle)] + pub unsafe fn unitsStyle(&self) -> NSDateComponentsFormatterUnitsStyle; + # [method (setUnitsStyle :)] + pub unsafe fn setUnitsStyle(&self, unitsStyle: NSDateComponentsFormatterUnitsStyle); + #[method(allowedUnits)] + pub unsafe fn allowedUnits(&self) -> NSCalendarUnit; + # [method (setAllowedUnits :)] + pub unsafe fn setAllowedUnits(&self, allowedUnits: NSCalendarUnit); + #[method(zeroFormattingBehavior)] pub unsafe fn zeroFormattingBehavior( &self, - ) -> NSDateComponentsFormatterZeroFormattingBehavior { - msg_send![self, zeroFormattingBehavior] - } + ) -> NSDateComponentsFormatterZeroFormattingBehavior; + # [method (setZeroFormattingBehavior :)] pub unsafe fn setZeroFormattingBehavior( &self, zeroFormattingBehavior: NSDateComponentsFormatterZeroFormattingBehavior, - ) { - msg_send![self, setZeroFormattingBehavior: zeroFormattingBehavior] - } - pub unsafe fn calendar(&self) -> Option> { - msg_send_id![self, calendar] - } - pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { - msg_send![self, setCalendar: calendar] - } - pub unsafe fn referenceDate(&self) -> Option> { - msg_send_id![self, referenceDate] - } - pub unsafe fn setReferenceDate(&self, referenceDate: Option<&NSDate>) { - msg_send![self, setReferenceDate: referenceDate] - } - pub unsafe fn allowsFractionalUnits(&self) -> bool { - msg_send![self, allowsFractionalUnits] - } - pub unsafe fn setAllowsFractionalUnits(&self, allowsFractionalUnits: bool) { - msg_send![self, setAllowsFractionalUnits: allowsFractionalUnits] - } - pub unsafe fn maximumUnitCount(&self) -> NSInteger { - msg_send![self, maximumUnitCount] - } - pub unsafe fn setMaximumUnitCount(&self, maximumUnitCount: NSInteger) { - msg_send![self, setMaximumUnitCount: maximumUnitCount] - } - pub unsafe fn collapsesLargestUnit(&self) -> bool { - msg_send![self, collapsesLargestUnit] - } - pub unsafe fn setCollapsesLargestUnit(&self, collapsesLargestUnit: bool) { - msg_send![self, setCollapsesLargestUnit: collapsesLargestUnit] - } - pub unsafe fn includesApproximationPhrase(&self) -> bool { - msg_send![self, includesApproximationPhrase] - } - pub unsafe fn setIncludesApproximationPhrase(&self, includesApproximationPhrase: bool) { - msg_send![ - self, - setIncludesApproximationPhrase: includesApproximationPhrase - ] - } - pub unsafe fn includesTimeRemainingPhrase(&self) -> bool { - msg_send![self, includesTimeRemainingPhrase] - } - pub unsafe fn setIncludesTimeRemainingPhrase(&self, includesTimeRemainingPhrase: bool) { - msg_send![ - self, - setIncludesTimeRemainingPhrase: includesTimeRemainingPhrase - ] - } - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] - } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } + ); + #[method_id(calendar)] + pub unsafe fn calendar(&self) -> Option>; + # [method (setCalendar :)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(referenceDate)] + pub unsafe fn referenceDate(&self) -> Option>; + # [method (setReferenceDate :)] + pub unsafe fn setReferenceDate(&self, referenceDate: Option<&NSDate>); + #[method(allowsFractionalUnits)] + pub unsafe fn allowsFractionalUnits(&self) -> bool; + # [method (setAllowsFractionalUnits :)] + pub unsafe fn setAllowsFractionalUnits(&self, allowsFractionalUnits: bool); + #[method(maximumUnitCount)] + pub unsafe fn maximumUnitCount(&self) -> NSInteger; + # [method (setMaximumUnitCount :)] + pub unsafe fn setMaximumUnitCount(&self, maximumUnitCount: NSInteger); + #[method(collapsesLargestUnit)] + pub unsafe fn collapsesLargestUnit(&self) -> bool; + # [method (setCollapsesLargestUnit :)] + pub unsafe fn setCollapsesLargestUnit(&self, collapsesLargestUnit: bool); + #[method(includesApproximationPhrase)] + pub unsafe fn includesApproximationPhrase(&self) -> bool; + # [method (setIncludesApproximationPhrase :)] + pub unsafe fn setIncludesApproximationPhrase(&self, includesApproximationPhrase: bool); + #[method(includesTimeRemainingPhrase)] + pub unsafe fn includesTimeRemainingPhrase(&self) -> bool; + # [method (setIncludesTimeRemainingPhrase :)] + pub unsafe fn setIncludesTimeRemainingPhrase(&self, includesTimeRemainingPhrase: bool); + #[method(formattingContext)] + pub unsafe fn formattingContext(&self) -> NSFormattingContext; + # [method (setFormattingContext :)] + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); + # [method (getObjectValue : forString : errorDescription :)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, string: &NSString, error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } + ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 9c1210a3b..18001d193 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -11,7 +11,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDateFormatter; @@ -21,336 +21,221 @@ extern_class!( ); extern_methods!( unsafe impl NSDateFormatter { - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] - } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } + #[method(formattingContext)] + pub unsafe fn formattingContext(&self) -> NSFormattingContext; + # [method (setFormattingContext :)] + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); + # [method (getObjectValue : forString : range : error :)] pub unsafe fn getObjectValue_forString_range_error( &self, obj: Option<&mut Option>>, string: &NSString, rangep: *mut NSRange, - ) -> Result<(), Id> { - msg_send![ - self, - getObjectValue: obj, - forString: string, - range: rangep, - error: _ - ] - } - pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id { - msg_send_id![self, stringFromDate: date] - } - pub unsafe fn dateFromString(&self, string: &NSString) -> Option> { - msg_send_id![self, dateFromString: string] - } + ) -> Result<(), Id>; + # [method_id (stringFromDate :)] + pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; + # [method_id (dateFromString :)] + pub unsafe fn dateFromString(&self, string: &NSString) -> Option>; + # [method_id (localizedStringFromDate : dateStyle : timeStyle :)] pub unsafe fn localizedStringFromDate_dateStyle_timeStyle( date: &NSDate, dstyle: NSDateFormatterStyle, tstyle: NSDateFormatterStyle, - ) -> Id { - msg_send_id![ - Self::class(), - localizedStringFromDate: date, - dateStyle: dstyle, - timeStyle: tstyle - ] - } + ) -> Id; + # [method_id (dateFormatFromTemplate : options : locale :)] pub unsafe fn dateFormatFromTemplate_options_locale( tmplate: &NSString, opts: NSUInteger, locale: Option<&NSLocale>, - ) -> Option> { - msg_send_id![ - Self::class(), - dateFormatFromTemplate: tmplate, - options: opts, - locale: locale - ] - } - pub unsafe fn defaultFormatterBehavior() -> NSDateFormatterBehavior { - msg_send![Self::class(), defaultFormatterBehavior] - } + ) -> Option>; + #[method(defaultFormatterBehavior)] + pub unsafe fn defaultFormatterBehavior() -> NSDateFormatterBehavior; + # [method (setDefaultFormatterBehavior :)] pub unsafe fn setDefaultFormatterBehavior( defaultFormatterBehavior: NSDateFormatterBehavior, - ) { - msg_send![ - Self::class(), - setDefaultFormatterBehavior: defaultFormatterBehavior - ] - } - pub unsafe fn setLocalizedDateFormatFromTemplate(&self, dateFormatTemplate: &NSString) { - msg_send![self, setLocalizedDateFormatFromTemplate: dateFormatTemplate] - } - pub unsafe fn dateFormat(&self) -> Id { - msg_send_id![self, dateFormat] - } - pub unsafe fn setDateFormat(&self, dateFormat: Option<&NSString>) { - msg_send![self, setDateFormat: dateFormat] - } - pub unsafe fn dateStyle(&self) -> NSDateFormatterStyle { - msg_send![self, dateStyle] - } - pub unsafe fn setDateStyle(&self, dateStyle: NSDateFormatterStyle) { - msg_send![self, setDateStyle: dateStyle] - } - pub unsafe fn timeStyle(&self) -> NSDateFormatterStyle { - msg_send![self, timeStyle] - } - pub unsafe fn setTimeStyle(&self, timeStyle: NSDateFormatterStyle) { - msg_send![self, setTimeStyle: timeStyle] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn generatesCalendarDates(&self) -> bool { - msg_send![self, generatesCalendarDates] - } - pub unsafe fn setGeneratesCalendarDates(&self, generatesCalendarDates: bool) { - msg_send![self, setGeneratesCalendarDates: generatesCalendarDates] - } - pub unsafe fn formatterBehavior(&self) -> NSDateFormatterBehavior { - msg_send![self, formatterBehavior] - } - pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSDateFormatterBehavior) { - msg_send![self, setFormatterBehavior: formatterBehavior] - } - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn calendar(&self) -> Id { - msg_send_id![self, calendar] - } - pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { - msg_send![self, setCalendar: calendar] - } - pub unsafe fn isLenient(&self) -> bool { - msg_send![self, isLenient] - } - pub unsafe fn setLenient(&self, lenient: bool) { - msg_send![self, setLenient: lenient] - } - pub unsafe fn twoDigitStartDate(&self) -> Option> { - msg_send_id![self, twoDigitStartDate] - } - pub unsafe fn setTwoDigitStartDate(&self, twoDigitStartDate: Option<&NSDate>) { - msg_send![self, setTwoDigitStartDate: twoDigitStartDate] - } - pub unsafe fn defaultDate(&self) -> Option> { - msg_send_id![self, defaultDate] - } - pub unsafe fn setDefaultDate(&self, defaultDate: Option<&NSDate>) { - msg_send![self, setDefaultDate: defaultDate] - } - pub unsafe fn eraSymbols(&self) -> Id, Shared> { - msg_send_id![self, eraSymbols] - } - pub unsafe fn setEraSymbols(&self, eraSymbols: Option<&NSArray>) { - msg_send![self, setEraSymbols: eraSymbols] - } - pub unsafe fn monthSymbols(&self) -> Id, Shared> { - msg_send_id![self, monthSymbols] - } - pub unsafe fn setMonthSymbols(&self, monthSymbols: Option<&NSArray>) { - msg_send![self, setMonthSymbols: monthSymbols] - } - pub unsafe fn shortMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortMonthSymbols] - } - pub unsafe fn setShortMonthSymbols(&self, shortMonthSymbols: Option<&NSArray>) { - msg_send![self, setShortMonthSymbols: shortMonthSymbols] - } - pub unsafe fn weekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, weekdaySymbols] - } - pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: Option<&NSArray>) { - msg_send![self, setWeekdaySymbols: weekdaySymbols] - } - pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, shortWeekdaySymbols] - } + ); + # [method (setLocalizedDateFormatFromTemplate :)] + pub unsafe fn setLocalizedDateFormatFromTemplate(&self, dateFormatTemplate: &NSString); + #[method_id(dateFormat)] + pub unsafe fn dateFormat(&self) -> Id; + # [method (setDateFormat :)] + pub unsafe fn setDateFormat(&self, dateFormat: Option<&NSString>); + #[method(dateStyle)] + pub unsafe fn dateStyle(&self) -> NSDateFormatterStyle; + # [method (setDateStyle :)] + pub unsafe fn setDateStyle(&self, dateStyle: NSDateFormatterStyle); + #[method(timeStyle)] + pub unsafe fn timeStyle(&self) -> NSDateFormatterStyle; + # [method (setTimeStyle :)] + pub unsafe fn setTimeStyle(&self, timeStyle: NSDateFormatterStyle); + #[method_id(locale)] + pub unsafe fn locale(&self) -> Id; + # [method (setLocale :)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method(generatesCalendarDates)] + pub unsafe fn generatesCalendarDates(&self) -> bool; + # [method (setGeneratesCalendarDates :)] + pub unsafe fn setGeneratesCalendarDates(&self, generatesCalendarDates: bool); + #[method(formatterBehavior)] + pub unsafe fn formatterBehavior(&self) -> NSDateFormatterBehavior; + # [method (setFormatterBehavior :)] + pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSDateFormatterBehavior); + #[method_id(timeZone)] + pub unsafe fn timeZone(&self) -> Id; + # [method (setTimeZone :)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method_id(calendar)] + pub unsafe fn calendar(&self) -> Id; + # [method (setCalendar :)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method(isLenient)] + pub unsafe fn isLenient(&self) -> bool; + # [method (setLenient :)] + pub unsafe fn setLenient(&self, lenient: bool); + #[method_id(twoDigitStartDate)] + pub unsafe fn twoDigitStartDate(&self) -> Option>; + # [method (setTwoDigitStartDate :)] + pub unsafe fn setTwoDigitStartDate(&self, twoDigitStartDate: Option<&NSDate>); + #[method_id(defaultDate)] + pub unsafe fn defaultDate(&self) -> Option>; + # [method (setDefaultDate :)] + pub unsafe fn setDefaultDate(&self, defaultDate: Option<&NSDate>); + #[method_id(eraSymbols)] + pub unsafe fn eraSymbols(&self) -> Id, Shared>; + # [method (setEraSymbols :)] + pub unsafe fn setEraSymbols(&self, eraSymbols: Option<&NSArray>); + #[method_id(monthSymbols)] + pub unsafe fn monthSymbols(&self) -> Id, Shared>; + # [method (setMonthSymbols :)] + pub unsafe fn setMonthSymbols(&self, monthSymbols: Option<&NSArray>); + #[method_id(shortMonthSymbols)] + pub unsafe fn shortMonthSymbols(&self) -> Id, Shared>; + # [method (setShortMonthSymbols :)] + pub unsafe fn setShortMonthSymbols(&self, shortMonthSymbols: Option<&NSArray>); + #[method_id(weekdaySymbols)] + pub unsafe fn weekdaySymbols(&self) -> Id, Shared>; + # [method (setWeekdaySymbols :)] + pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: Option<&NSArray>); + #[method_id(shortWeekdaySymbols)] + pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared>; + # [method (setShortWeekdaySymbols :)] pub unsafe fn setShortWeekdaySymbols( &self, shortWeekdaySymbols: Option<&NSArray>, - ) { - msg_send![self, setShortWeekdaySymbols: shortWeekdaySymbols] - } - pub unsafe fn AMSymbol(&self) -> Id { - msg_send_id![self, AMSymbol] - } - pub unsafe fn setAMSymbol(&self, AMSymbol: Option<&NSString>) { - msg_send![self, setAMSymbol: AMSymbol] - } - pub unsafe fn PMSymbol(&self) -> Id { - msg_send_id![self, PMSymbol] - } - pub unsafe fn setPMSymbol(&self, PMSymbol: Option<&NSString>) { - msg_send![self, setPMSymbol: PMSymbol] - } - pub unsafe fn longEraSymbols(&self) -> Id, Shared> { - msg_send_id![self, longEraSymbols] - } - pub unsafe fn setLongEraSymbols(&self, longEraSymbols: Option<&NSArray>) { - msg_send![self, setLongEraSymbols: longEraSymbols] - } - pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortMonthSymbols] - } + ); + #[method_id(AMSymbol)] + pub unsafe fn AMSymbol(&self) -> Id; + # [method (setAMSymbol :)] + pub unsafe fn setAMSymbol(&self, AMSymbol: Option<&NSString>); + #[method_id(PMSymbol)] + pub unsafe fn PMSymbol(&self) -> Id; + # [method (setPMSymbol :)] + pub unsafe fn setPMSymbol(&self, PMSymbol: Option<&NSString>); + #[method_id(longEraSymbols)] + pub unsafe fn longEraSymbols(&self) -> Id, Shared>; + # [method (setLongEraSymbols :)] + pub unsafe fn setLongEraSymbols(&self, longEraSymbols: Option<&NSArray>); + #[method_id(veryShortMonthSymbols)] + pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared>; + # [method (setVeryShortMonthSymbols :)] pub unsafe fn setVeryShortMonthSymbols( &self, veryShortMonthSymbols: Option<&NSArray>, - ) { - msg_send![self, setVeryShortMonthSymbols: veryShortMonthSymbols] - } - pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneMonthSymbols] - } + ); + #[method_id(standaloneMonthSymbols)] + pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared>; + # [method (setStandaloneMonthSymbols :)] pub unsafe fn setStandaloneMonthSymbols( &self, standaloneMonthSymbols: Option<&NSArray>, - ) { - msg_send![self, setStandaloneMonthSymbols: standaloneMonthSymbols] - } - pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneMonthSymbols] - } + ); + #[method_id(shortStandaloneMonthSymbols)] + pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared>; + # [method (setShortStandaloneMonthSymbols :)] pub unsafe fn setShortStandaloneMonthSymbols( &self, shortStandaloneMonthSymbols: Option<&NSArray>, - ) { - msg_send![ - self, - setShortStandaloneMonthSymbols: shortStandaloneMonthSymbols - ] - } - pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortStandaloneMonthSymbols] - } + ); + #[method_id(veryShortStandaloneMonthSymbols)] + pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared>; + # [method (setVeryShortStandaloneMonthSymbols :)] pub unsafe fn setVeryShortStandaloneMonthSymbols( &self, veryShortStandaloneMonthSymbols: Option<&NSArray>, - ) { - msg_send![ - self, - setVeryShortStandaloneMonthSymbols: veryShortStandaloneMonthSymbols - ] - } - pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortWeekdaySymbols] - } + ); + #[method_id(veryShortWeekdaySymbols)] + pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared>; + # [method (setVeryShortWeekdaySymbols :)] pub unsafe fn setVeryShortWeekdaySymbols( &self, veryShortWeekdaySymbols: Option<&NSArray>, - ) { - msg_send![self, setVeryShortWeekdaySymbols: veryShortWeekdaySymbols] - } - pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneWeekdaySymbols] - } + ); + #[method_id(standaloneWeekdaySymbols)] + pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared>; + # [method (setStandaloneWeekdaySymbols :)] pub unsafe fn setStandaloneWeekdaySymbols( &self, standaloneWeekdaySymbols: Option<&NSArray>, - ) { - msg_send![self, setStandaloneWeekdaySymbols: standaloneWeekdaySymbols] - } - pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneWeekdaySymbols] - } + ); + #[method_id(shortStandaloneWeekdaySymbols)] + pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + # [method (setShortStandaloneWeekdaySymbols :)] pub unsafe fn setShortStandaloneWeekdaySymbols( &self, shortStandaloneWeekdaySymbols: Option<&NSArray>, - ) { - msg_send![ - self, - setShortStandaloneWeekdaySymbols: shortStandaloneWeekdaySymbols - ] - } - pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared> { - msg_send_id![self, veryShortStandaloneWeekdaySymbols] - } + ); + #[method_id(veryShortStandaloneWeekdaySymbols)] + pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + # [method (setVeryShortStandaloneWeekdaySymbols :)] pub unsafe fn setVeryShortStandaloneWeekdaySymbols( &self, veryShortStandaloneWeekdaySymbols: Option<&NSArray>, - ) { - msg_send![ - self, - setVeryShortStandaloneWeekdaySymbols: veryShortStandaloneWeekdaySymbols - ] - } - pub unsafe fn quarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, quarterSymbols] - } - pub unsafe fn setQuarterSymbols(&self, quarterSymbols: Option<&NSArray>) { - msg_send![self, setQuarterSymbols: quarterSymbols] - } - pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortQuarterSymbols] - } + ); + #[method_id(quarterSymbols)] + pub unsafe fn quarterSymbols(&self) -> Id, Shared>; + # [method (setQuarterSymbols :)] + pub unsafe fn setQuarterSymbols(&self, quarterSymbols: Option<&NSArray>); + #[method_id(shortQuarterSymbols)] + pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared>; + # [method (setShortQuarterSymbols :)] pub unsafe fn setShortQuarterSymbols( &self, shortQuarterSymbols: Option<&NSArray>, - ) { - msg_send![self, setShortQuarterSymbols: shortQuarterSymbols] - } - pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, standaloneQuarterSymbols] - } + ); + #[method_id(standaloneQuarterSymbols)] + pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared>; + # [method (setStandaloneQuarterSymbols :)] pub unsafe fn setStandaloneQuarterSymbols( &self, standaloneQuarterSymbols: Option<&NSArray>, - ) { - msg_send![self, setStandaloneQuarterSymbols: standaloneQuarterSymbols] - } - pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared> { - msg_send_id![self, shortStandaloneQuarterSymbols] - } + ); + #[method_id(shortStandaloneQuarterSymbols)] + pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared>; + # [method (setShortStandaloneQuarterSymbols :)] pub unsafe fn setShortStandaloneQuarterSymbols( &self, shortStandaloneQuarterSymbols: Option<&NSArray>, - ) { - msg_send![ - self, - setShortStandaloneQuarterSymbols: shortStandaloneQuarterSymbols - ] - } - pub unsafe fn gregorianStartDate(&self) -> Option> { - msg_send_id![self, gregorianStartDate] - } - pub unsafe fn setGregorianStartDate(&self, gregorianStartDate: Option<&NSDate>) { - msg_send![self, setGregorianStartDate: gregorianStartDate] - } - pub unsafe fn doesRelativeDateFormatting(&self) -> bool { - msg_send![self, doesRelativeDateFormatting] - } - pub unsafe fn setDoesRelativeDateFormatting(&self, doesRelativeDateFormatting: bool) { - msg_send![ - self, - setDoesRelativeDateFormatting: doesRelativeDateFormatting - ] - } + ); + #[method_id(gregorianStartDate)] + pub unsafe fn gregorianStartDate(&self) -> Option>; + # [method (setGregorianStartDate :)] + pub unsafe fn setGregorianStartDate(&self, gregorianStartDate: Option<&NSDate>); + #[method(doesRelativeDateFormatting)] + pub unsafe fn doesRelativeDateFormatting(&self) -> bool; + # [method (setDoesRelativeDateFormatting :)] + pub unsafe fn setDoesRelativeDateFormatting(&self, doesRelativeDateFormatting: bool); } ); extern_methods!( #[doc = "NSDateFormatterCompatibility"] unsafe impl NSDateFormatter { + # [method_id (initWithDateFormat : allowNaturalLanguage :)] pub unsafe fn initWithDateFormat_allowNaturalLanguage( &self, format: &NSString, flag: bool, - ) -> Id { - msg_send_id![self, initWithDateFormat: format, allowNaturalLanguage: flag] - } - pub unsafe fn allowsNaturalLanguage(&self) -> bool { - msg_send![self, allowsNaturalLanguage] - } + ) -> Id; + #[method(allowsNaturalLanguage)] + pub unsafe fn allowsNaturalLanguage(&self) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index 8cefe0a51..f6c814936 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDateInterval; @@ -14,52 +14,40 @@ extern_class!( ); extern_methods!( unsafe impl NSDateInterval { - pub unsafe fn startDate(&self) -> Id { - msg_send_id![self, startDate] - } - pub unsafe fn endDate(&self) -> Id { - msg_send_id![self, endDate] - } - pub unsafe fn duration(&self) -> NSTimeInterval { - msg_send![self, duration] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id { - msg_send_id![self, initWithCoder: coder] - } + #[method_id(startDate)] + pub unsafe fn startDate(&self) -> Id; + #[method_id(endDate)] + pub unsafe fn endDate(&self) -> Id; + #[method(duration)] + pub unsafe fn duration(&self) -> NSTimeInterval; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + # [method_id (initWithStartDate : duration :)] pub unsafe fn initWithStartDate_duration( &self, startDate: &NSDate, duration: NSTimeInterval, - ) -> Id { - msg_send_id![self, initWithStartDate: startDate, duration: duration] - } + ) -> Id; + # [method_id (initWithStartDate : endDate :)] pub unsafe fn initWithStartDate_endDate( &self, startDate: &NSDate, endDate: &NSDate, - ) -> Id { - msg_send_id![self, initWithStartDate: startDate, endDate: endDate] - } - pub unsafe fn compare(&self, dateInterval: &NSDateInterval) -> NSComparisonResult { - msg_send![self, compare: dateInterval] - } - pub unsafe fn isEqualToDateInterval(&self, dateInterval: &NSDateInterval) -> bool { - msg_send![self, isEqualToDateInterval: dateInterval] - } - pub unsafe fn intersectsDateInterval(&self, dateInterval: &NSDateInterval) -> bool { - msg_send![self, intersectsDateInterval: dateInterval] - } + ) -> Id; + # [method (compare :)] + pub unsafe fn compare(&self, dateInterval: &NSDateInterval) -> NSComparisonResult; + # [method (isEqualToDateInterval :)] + pub unsafe fn isEqualToDateInterval(&self, dateInterval: &NSDateInterval) -> bool; + # [method (intersectsDateInterval :)] + pub unsafe fn intersectsDateInterval(&self, dateInterval: &NSDateInterval) -> bool; + # [method_id (intersectionWithDateInterval :)] pub unsafe fn intersectionWithDateInterval( &self, dateInterval: &NSDateInterval, - ) -> Option> { - msg_send_id![self, intersectionWithDateInterval: dateInterval] - } - pub unsafe fn containsDate(&self, date: &NSDate) -> bool { - msg_send![self, containsDate: date] - } + ) -> Option>; + # [method (containsDate :)] + pub unsafe fn containsDate(&self, date: &NSDate) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index bc4bb6e15..397616959 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDateIntervalFormatter; @@ -18,54 +18,40 @@ extern_class!( ); extern_methods!( unsafe impl NSDateIntervalFormatter { - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn calendar(&self) -> Id { - msg_send_id![self, calendar] - } - pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { - msg_send![self, setCalendar: calendar] - } - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn dateTemplate(&self) -> Id { - msg_send_id![self, dateTemplate] - } - pub unsafe fn setDateTemplate(&self, dateTemplate: Option<&NSString>) { - msg_send![self, setDateTemplate: dateTemplate] - } - pub unsafe fn dateStyle(&self) -> NSDateIntervalFormatterStyle { - msg_send![self, dateStyle] - } - pub unsafe fn setDateStyle(&self, dateStyle: NSDateIntervalFormatterStyle) { - msg_send![self, setDateStyle: dateStyle] - } - pub unsafe fn timeStyle(&self) -> NSDateIntervalFormatterStyle { - msg_send![self, timeStyle] - } - pub unsafe fn setTimeStyle(&self, timeStyle: NSDateIntervalFormatterStyle) { - msg_send![self, setTimeStyle: timeStyle] - } + #[method_id(locale)] + pub unsafe fn locale(&self) -> Id; + # [method (setLocale :)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(calendar)] + pub unsafe fn calendar(&self) -> Id; + # [method (setCalendar :)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(timeZone)] + pub unsafe fn timeZone(&self) -> Id; + # [method (setTimeZone :)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method_id(dateTemplate)] + pub unsafe fn dateTemplate(&self) -> Id; + # [method (setDateTemplate :)] + pub unsafe fn setDateTemplate(&self, dateTemplate: Option<&NSString>); + #[method(dateStyle)] + pub unsafe fn dateStyle(&self) -> NSDateIntervalFormatterStyle; + # [method (setDateStyle :)] + pub unsafe fn setDateStyle(&self, dateStyle: NSDateIntervalFormatterStyle); + #[method(timeStyle)] + pub unsafe fn timeStyle(&self) -> NSDateIntervalFormatterStyle; + # [method (setTimeStyle :)] + pub unsafe fn setTimeStyle(&self, timeStyle: NSDateIntervalFormatterStyle); + # [method_id (stringFromDate : toDate :)] pub unsafe fn stringFromDate_toDate( &self, fromDate: &NSDate, toDate: &NSDate, - ) -> Id { - msg_send_id![self, stringFromDate: fromDate, toDate: toDate] - } + ) -> Id; + # [method_id (stringFromDateInterval :)] pub unsafe fn stringFromDateInterval( &self, dateInterval: &NSDateInterval, - ) -> Option> { - msg_send_id![self, stringFromDateInterval: dateInterval] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs index 51f969af1..53a1f0c4f 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimal.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -3,4 +3,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index 862a40f29..13f21237f 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSDecimalNumberBehaviors = NSObject; extern_class!( #[derive(Debug)] @@ -17,209 +17,136 @@ extern_class!( ); extern_methods!( unsafe impl NSDecimalNumber { + # [method_id (initWithMantissa : exponent : isNegative :)] pub unsafe fn initWithMantissa_exponent_isNegative( &self, mantissa: c_ulonglong, exponent: c_short, flag: bool, - ) -> Id { - msg_send_id![ - self, - initWithMantissa: mantissa, - exponent: exponent, - isNegative: flag - ] - } - pub unsafe fn initWithDecimal(&self, dcm: NSDecimal) -> Id { - msg_send_id![self, initWithDecimal: dcm] - } - pub unsafe fn initWithString(&self, numberValue: Option<&NSString>) -> Id { - msg_send_id![self, initWithString: numberValue] - } + ) -> Id; + # [method_id (initWithDecimal :)] + pub unsafe fn initWithDecimal(&self, dcm: NSDecimal) -> Id; + # [method_id (initWithString :)] + pub unsafe fn initWithString(&self, numberValue: Option<&NSString>) -> Id; + # [method_id (initWithString : locale :)] pub unsafe fn initWithString_locale( &self, numberValue: Option<&NSString>, locale: Option<&Object>, - ) -> Id { - msg_send_id![self, initWithString: numberValue, locale: locale] - } - pub unsafe fn descriptionWithLocale( - &self, - locale: Option<&Object>, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn decimalValue(&self) -> NSDecimal { - msg_send![self, decimalValue] - } + ) -> Id; + # [method_id (descriptionWithLocale :)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + #[method(decimalValue)] + pub unsafe fn decimalValue(&self) -> NSDecimal; + # [method_id (decimalNumberWithMantissa : exponent : isNegative :)] pub unsafe fn decimalNumberWithMantissa_exponent_isNegative( mantissa: c_ulonglong, exponent: c_short, flag: bool, - ) -> Id { - msg_send_id![ - Self::class(), - decimalNumberWithMantissa: mantissa, - exponent: exponent, - isNegative: flag - ] - } - pub unsafe fn decimalNumberWithDecimal(dcm: NSDecimal) -> Id { - msg_send_id![Self::class(), decimalNumberWithDecimal: dcm] - } + ) -> Id; + # [method_id (decimalNumberWithDecimal :)] + pub unsafe fn decimalNumberWithDecimal(dcm: NSDecimal) -> Id; + # [method_id (decimalNumberWithString :)] pub unsafe fn decimalNumberWithString( numberValue: Option<&NSString>, - ) -> Id { - msg_send_id![Self::class(), decimalNumberWithString: numberValue] - } + ) -> Id; + # [method_id (decimalNumberWithString : locale :)] pub unsafe fn decimalNumberWithString_locale( numberValue: Option<&NSString>, locale: Option<&Object>, - ) -> Id { - msg_send_id![ - Self::class(), - decimalNumberWithString: numberValue, - locale: locale - ] - } - pub unsafe fn zero() -> Id { - msg_send_id![Self::class(), zero] - } - pub unsafe fn one() -> Id { - msg_send_id![Self::class(), one] - } - pub unsafe fn minimumDecimalNumber() -> Id { - msg_send_id![Self::class(), minimumDecimalNumber] - } - pub unsafe fn maximumDecimalNumber() -> Id { - msg_send_id![Self::class(), maximumDecimalNumber] - } - pub unsafe fn notANumber() -> Id { - msg_send_id![Self::class(), notANumber] - } + ) -> Id; + #[method_id(zero)] + pub unsafe fn zero() -> Id; + #[method_id(one)] + pub unsafe fn one() -> Id; + #[method_id(minimumDecimalNumber)] + pub unsafe fn minimumDecimalNumber() -> Id; + #[method_id(maximumDecimalNumber)] + pub unsafe fn maximumDecimalNumber() -> Id; + #[method_id(notANumber)] + pub unsafe fn notANumber() -> Id; + # [method_id (decimalNumberByAdding :)] pub unsafe fn decimalNumberByAdding( &self, decimalNumber: &NSDecimalNumber, - ) -> Id { - msg_send_id![self, decimalNumberByAdding: decimalNumber] - } + ) -> Id; + # [method_id (decimalNumberByAdding : withBehavior :)] pub unsafe fn decimalNumberByAdding_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberByAdding: decimalNumber, - withBehavior: behavior - ] - } + ) -> Id; + # [method_id (decimalNumberBySubtracting :)] pub unsafe fn decimalNumberBySubtracting( &self, decimalNumber: &NSDecimalNumber, - ) -> Id { - msg_send_id![self, decimalNumberBySubtracting: decimalNumber] - } + ) -> Id; + # [method_id (decimalNumberBySubtracting : withBehavior :)] pub unsafe fn decimalNumberBySubtracting_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberBySubtracting: decimalNumber, - withBehavior: behavior - ] - } + ) -> Id; + # [method_id (decimalNumberByMultiplyingBy :)] pub unsafe fn decimalNumberByMultiplyingBy( &self, decimalNumber: &NSDecimalNumber, - ) -> Id { - msg_send_id![self, decimalNumberByMultiplyingBy: decimalNumber] - } + ) -> Id; + # [method_id (decimalNumberByMultiplyingBy : withBehavior :)] pub unsafe fn decimalNumberByMultiplyingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberByMultiplyingBy: decimalNumber, - withBehavior: behavior - ] - } + ) -> Id; + # [method_id (decimalNumberByDividingBy :)] pub unsafe fn decimalNumberByDividingBy( &self, decimalNumber: &NSDecimalNumber, - ) -> Id { - msg_send_id![self, decimalNumberByDividingBy: decimalNumber] - } + ) -> Id; + # [method_id (decimalNumberByDividingBy : withBehavior :)] pub unsafe fn decimalNumberByDividingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberByDividingBy: decimalNumber, - withBehavior: behavior - ] - } + ) -> Id; + # [method_id (decimalNumberByRaisingToPower :)] pub unsafe fn decimalNumberByRaisingToPower( &self, power: NSUInteger, - ) -> Id { - msg_send_id![self, decimalNumberByRaisingToPower: power] - } + ) -> Id; + # [method_id (decimalNumberByRaisingToPower : withBehavior :)] pub unsafe fn decimalNumberByRaisingToPower_withBehavior( &self, power: NSUInteger, behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberByRaisingToPower: power, - withBehavior: behavior - ] - } + ) -> Id; + # [method_id (decimalNumberByMultiplyingByPowerOf10 :)] pub unsafe fn decimalNumberByMultiplyingByPowerOf10( &self, power: c_short, - ) -> Id { - msg_send_id![self, decimalNumberByMultiplyingByPowerOf10: power] - } + ) -> Id; + # [method_id (decimalNumberByMultiplyingByPowerOf10 : withBehavior :)] pub unsafe fn decimalNumberByMultiplyingByPowerOf10_withBehavior( &self, power: c_short, behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![ - self, - decimalNumberByMultiplyingByPowerOf10: power, - withBehavior: behavior - ] - } + ) -> Id; + # [method_id (decimalNumberByRoundingAccordingToBehavior :)] pub unsafe fn decimalNumberByRoundingAccordingToBehavior( &self, behavior: Option<&NSDecimalNumberBehaviors>, - ) -> Id { - msg_send_id![self, decimalNumberByRoundingAccordingToBehavior: behavior] - } - pub unsafe fn compare(&self, decimalNumber: &NSNumber) -> NSComparisonResult { - msg_send![self, compare: decimalNumber] - } - pub unsafe fn defaultBehavior() -> Id { - msg_send_id![Self::class(), defaultBehavior] - } - pub unsafe fn setDefaultBehavior(defaultBehavior: &NSDecimalNumberBehaviors) { - msg_send![Self::class(), setDefaultBehavior: defaultBehavior] - } - pub unsafe fn objCType(&self) -> NonNull { - msg_send![self, objCType] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } + ) -> Id; + # [method (compare :)] + pub unsafe fn compare(&self, decimalNumber: &NSNumber) -> NSComparisonResult; + #[method_id(defaultBehavior)] + pub unsafe fn defaultBehavior() -> Id; + # [method (setDefaultBehavior :)] + pub unsafe fn setDefaultBehavior(defaultBehavior: &NSDecimalNumberBehaviors); + #[method(objCType)] + pub unsafe fn objCType(&self) -> NonNull; + #[method(doubleValue)] + pub unsafe fn doubleValue(&self) -> c_double; } ); extern_class!( @@ -231,9 +158,9 @@ extern_class!( ); extern_methods!( unsafe impl NSDecimalNumberHandler { - pub unsafe fn defaultDecimalNumberHandler() -> Id { - msg_send_id![Self::class(), defaultDecimalNumberHandler] - } + #[method_id(defaultDecimalNumberHandler)] + pub unsafe fn defaultDecimalNumberHandler() -> Id; + # [method_id (initWithRoundingMode : scale : raiseOnExactness : raiseOnOverflow : raiseOnUnderflow : raiseOnDivideByZero :)] pub unsafe fn initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( &self, roundingMode: NSRoundingMode, @@ -242,17 +169,8 @@ extern_methods!( overflow: bool, underflow: bool, divideByZero: bool, - ) -> Id { - msg_send_id![ - self, - initWithRoundingMode: roundingMode, - scale: scale, - raiseOnExactness: exact, - raiseOnOverflow: overflow, - raiseOnUnderflow: underflow, - raiseOnDivideByZero: divideByZero - ] - } + ) -> Id; + # [method_id (decimalNumberHandlerWithRoundingMode : scale : raiseOnExactness : raiseOnOverflow : raiseOnUnderflow : raiseOnDivideByZero :)] pub unsafe fn decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( roundingMode: NSRoundingMode, scale: c_short, @@ -260,32 +178,20 @@ extern_methods!( overflow: bool, underflow: bool, divideByZero: bool, - ) -> Id { - msg_send_id![ - Self::class(), - decimalNumberHandlerWithRoundingMode: roundingMode, - scale: scale, - raiseOnExactness: exact, - raiseOnOverflow: overflow, - raiseOnUnderflow: underflow, - raiseOnDivideByZero: divideByZero - ] - } + ) -> Id; } ); extern_methods!( #[doc = "NSDecimalNumberExtensions"] unsafe impl NSNumber { - pub unsafe fn decimalValue(&self) -> NSDecimal { - msg_send![self, decimalValue] - } + #[method(decimalValue)] + pub unsafe fn decimalValue(&self) -> NSDecimal; } ); extern_methods!( #[doc = "NSDecimalNumberScanning"] unsafe impl NSScanner { - pub unsafe fn scanDecimal(&self, dcm: *mut NSDecimal) -> bool { - msg_send![self, scanDecimal: dcm] - } + # [method (scanDecimal :)] + pub unsafe fn scanDecimal(&self, dcm: *mut NSDecimal) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index d3806e855..bfdc5c6da 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSDictionary; @@ -17,256 +17,198 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSDictionary { - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option> { - msg_send_id![self, objectForKey: aKey] - } - pub unsafe fn keyEnumerator(&self) -> Id, Shared> { - msg_send_id![self, keyEnumerator] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + # [method_id (objectForKey :)] + pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option>; + #[method_id(keyEnumerator)] + pub unsafe fn keyEnumerator(&self) -> Id, Shared>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithObjects : forKeys : count :)] pub unsafe fn initWithObjects_forKeys_count( &self, objects: TodoArray, keys: TodoArray, cnt: NSUInteger, - ) -> Id { - msg_send_id![self, initWithObjects: objects, forKeys: keys, count: cnt] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedDictionary"] unsafe impl NSDictionary { - pub unsafe fn allKeys(&self) -> Id, Shared> { - msg_send_id![self, allKeys] - } + #[method_id(allKeys)] + pub unsafe fn allKeys(&self) -> Id, Shared>; + # [method_id (allKeysForObject :)] pub unsafe fn allKeysForObject( &self, anObject: &ObjectType, - ) -> Id, Shared> { - msg_send_id![self, allKeysForObject: anObject] - } - pub unsafe fn allValues(&self) -> Id, Shared> { - msg_send_id![self, allValues] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionInStringsFileFormat(&self) -> Id { - msg_send_id![self, descriptionInStringsFileFormat] - } - pub unsafe fn descriptionWithLocale( - &self, - locale: Option<&Object>, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } + ) -> Id, Shared>; + #[method_id(allValues)] + pub unsafe fn allValues(&self) -> Id, Shared>; + #[method_id(description)] + pub unsafe fn description(&self) -> Id; + #[method_id(descriptionInStringsFileFormat)] + pub unsafe fn descriptionInStringsFileFormat(&self) -> Id; + # [method_id (descriptionWithLocale :)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + # [method_id (descriptionWithLocale : indent :)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, level: NSUInteger, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale, indent: level] - } + ) -> Id; + # [method (isEqualToDictionary :)] pub unsafe fn isEqualToDictionary( &self, otherDictionary: &NSDictionary, - ) -> bool { - msg_send![self, isEqualToDictionary: otherDictionary] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } + ) -> bool; + #[method_id(objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + # [method_id (objectsForKeys : notFoundMarker :)] pub unsafe fn objectsForKeys_notFoundMarker( &self, keys: &NSArray, marker: &ObjectType, - ) -> Id, Shared> { - msg_send_id![self, objectsForKeys: keys, notFoundMarker: marker] - } - pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id> { - msg_send![self, writeToURL: url, error: _] - } + ) -> Id, Shared>; + # [method (writeToURL : error :)] + pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id>; + # [method_id (keysSortedByValueUsingSelector :)] pub unsafe fn keysSortedByValueUsingSelector( &self, comparator: Sel, - ) -> Id, Shared> { - msg_send_id![self, keysSortedByValueUsingSelector: comparator] - } + ) -> Id, Shared>; + # [method (getObjects : andKeys : count :)] pub unsafe fn getObjects_andKeys_count( &self, objects: TodoArray, keys: TodoArray, count: NSUInteger, - ) { - msg_send![self, getObjects: objects, andKeys: keys, count: count] - } + ); + # [method_id (objectForKeyedSubscript :)] pub unsafe fn objectForKeyedSubscript( &self, key: &KeyType, - ) -> Option> { - msg_send_id![self, objectForKeyedSubscript: key] - } - pub unsafe fn enumerateKeysAndObjectsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateKeysAndObjectsUsingBlock: block] - } + ) -> Option>; + # [method (enumerateKeysAndObjectsUsingBlock :)] + pub unsafe fn enumerateKeysAndObjectsUsingBlock(&self, block: TodoBlock); + # [method (enumerateKeysAndObjectsWithOptions : usingBlock :)] pub unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateKeysAndObjectsWithOptions: opts, - usingBlock: block - ] - } + ); + # [method_id (keysSortedByValueUsingComparator :)] pub unsafe fn keysSortedByValueUsingComparator( &self, cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![self, keysSortedByValueUsingComparator: cmptr] - } + ) -> Id, Shared>; + # [method_id (keysSortedByValueWithOptions : usingComparator :)] pub unsafe fn keysSortedByValueWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![ - self, - keysSortedByValueWithOptions: opts, - usingComparator: cmptr - ] - } + ) -> Id, Shared>; + # [method_id (keysOfEntriesPassingTest :)] pub unsafe fn keysOfEntriesPassingTest( &self, predicate: TodoBlock, - ) -> Id, Shared> { - msg_send_id![self, keysOfEntriesPassingTest: predicate] - } + ) -> Id, Shared>; + # [method_id (keysOfEntriesWithOptions : passingTest :)] pub unsafe fn keysOfEntriesWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> Id, Shared> { - msg_send_id![self, keysOfEntriesWithOptions: opts, passingTest: predicate] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSDictionary { - pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray) { - msg_send![self, getObjects: objects, andKeys: keys] - } + # [method (getObjects : andKeys :)] + pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray); + # [method_id (dictionaryWithContentsOfFile :)] pub unsafe fn dictionaryWithContentsOfFile( path: &NSString, - ) -> Option, Shared>> { - msg_send_id![Self::class(), dictionaryWithContentsOfFile: path] - } + ) -> Option, Shared>>; + # [method_id (dictionaryWithContentsOfURL :)] pub unsafe fn dictionaryWithContentsOfURL( url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), dictionaryWithContentsOfURL: url] - } + ) -> Option, Shared>>; + # [method_id (initWithContentsOfFile :)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfFile: path] - } + ) -> Option, Shared>>; + # [method_id (initWithContentsOfURL :)] pub unsafe fn initWithContentsOfURL( &self, url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfURL: url] - } + ) -> Option, Shared>>; + # [method (writeToFile : atomically :)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, - ) -> bool { - msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] - } - pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { - msg_send![self, writeToURL: url, atomically: atomically] - } + ) -> bool; + # [method (writeToURL : atomically :)] + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; } ); extern_methods!( #[doc = "NSDictionaryCreation"] unsafe impl NSDictionary { - pub unsafe fn dictionary() -> Id { - msg_send_id![Self::class(), dictionary] - } + #[method_id(dictionary)] + pub unsafe fn dictionary() -> Id; + # [method_id (dictionaryWithObject : forKey :)] pub unsafe fn dictionaryWithObject_forKey( object: &ObjectType, key: &NSCopying, - ) -> Id { - msg_send_id![Self::class(), dictionaryWithObject: object, forKey: key] - } + ) -> Id; + # [method_id (dictionaryWithObjects : forKeys : count :)] pub unsafe fn dictionaryWithObjects_forKeys_count( objects: TodoArray, keys: TodoArray, cnt: NSUInteger, - ) -> Id { - msg_send_id![ - Self::class(), - dictionaryWithObjects: objects, - forKeys: keys, - count: cnt - ] - } + ) -> Id; + # [method_id (dictionaryWithDictionary :)] pub unsafe fn dictionaryWithDictionary( dict: &NSDictionary, - ) -> Id { - msg_send_id![Self::class(), dictionaryWithDictionary: dict] - } + ) -> Id; + # [method_id (dictionaryWithObjects : forKeys :)] pub unsafe fn dictionaryWithObjects_forKeys( objects: &NSArray, keys: &NSArray, - ) -> Id { - msg_send_id![Self::class(), dictionaryWithObjects: objects, forKeys: keys] - } + ) -> Id; + # [method_id (initWithDictionary :)] pub unsafe fn initWithDictionary( &self, otherDictionary: &NSDictionary, - ) -> Id { - msg_send_id![self, initWithDictionary: otherDictionary] - } + ) -> Id; + # [method_id (initWithDictionary : copyItems :)] pub unsafe fn initWithDictionary_copyItems( &self, otherDictionary: &NSDictionary, flag: bool, - ) -> Id { - msg_send_id![self, initWithDictionary: otherDictionary, copyItems: flag] - } + ) -> Id; + # [method_id (initWithObjects : forKeys :)] pub unsafe fn initWithObjects_forKeys( &self, objects: &NSArray, keys: &NSArray, - ) -> Id { - msg_send_id![self, initWithObjects: objects, forKeys: keys] - } + ) -> Id; + # [method_id (initWithContentsOfURL : error :)] pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, - ) -> Result, Shared>, Id> { - msg_send_id![self, initWithContentsOfURL: url, error: _] - } + ) -> Result, Shared>, Id>; + # [method_id (dictionaryWithContentsOfURL : error :)] pub unsafe fn dictionaryWithContentsOfURL_error( url: &NSURL, - ) -> Result, Shared>, Id> { - msg_send_id![Self::class(), dictionaryWithContentsOfURL: url, error: _] - } + ) -> Result, Shared>, Id>; } ); __inner_extern_class!( @@ -280,113 +222,86 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMutableDictionary { - pub unsafe fn removeObjectForKey(&self, aKey: &KeyType) { - msg_send![self, removeObjectForKey: aKey] - } - pub unsafe fn setObject_forKey(&self, anObject: &ObjectType, aKey: &NSCopying) { - msg_send![self, setObject: anObject, forKey: aKey] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: numItems] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + # [method (removeObjectForKey :)] + pub unsafe fn removeObjectForKey(&self, aKey: &KeyType); + # [method (setObject : forKey :)] + pub unsafe fn setObject_forKey(&self, anObject: &ObjectType, aKey: &NSCopying); + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithCapacity :)] + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedMutableDictionary"] unsafe impl NSMutableDictionary { + # [method (addEntriesFromDictionary :)] pub unsafe fn addEntriesFromDictionary( &self, otherDictionary: &NSDictionary, - ) { - msg_send![self, addEntriesFromDictionary: otherDictionary] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn removeObjectsForKeys(&self, keyArray: &NSArray) { - msg_send![self, removeObjectsForKeys: keyArray] - } - pub unsafe fn setDictionary(&self, otherDictionary: &NSDictionary) { - msg_send![self, setDictionary: otherDictionary] - } - pub unsafe fn setObject_forKeyedSubscript( - &self, - obj: Option<&ObjectType>, - key: &NSCopying, - ) { - msg_send![self, setObject: obj, forKeyedSubscript: key] - } + ); + #[method(removeAllObjects)] + pub unsafe fn removeAllObjects(&self); + # [method (removeObjectsForKeys :)] + pub unsafe fn removeObjectsForKeys(&self, keyArray: &NSArray); + # [method (setDictionary :)] + pub unsafe fn setDictionary(&self, otherDictionary: &NSDictionary); + # [method (setObject : forKeyedSubscript :)] + pub unsafe fn setObject_forKeyedSubscript(&self, obj: Option<&ObjectType>, key: &NSCopying); } ); extern_methods!( #[doc = "NSMutableDictionaryCreation"] unsafe impl NSMutableDictionary { - pub unsafe fn dictionaryWithCapacity(numItems: NSUInteger) -> Id { - msg_send_id![Self::class(), dictionaryWithCapacity: numItems] - } + # [method_id (dictionaryWithCapacity :)] + pub unsafe fn dictionaryWithCapacity(numItems: NSUInteger) -> Id; + # [method_id (dictionaryWithContentsOfFile :)] pub unsafe fn dictionaryWithContentsOfFile( path: &NSString, - ) -> Option, Shared>> { - msg_send_id![Self::class(), dictionaryWithContentsOfFile: path] - } + ) -> Option, Shared>>; + # [method_id (dictionaryWithContentsOfURL :)] pub unsafe fn dictionaryWithContentsOfURL( url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), dictionaryWithContentsOfURL: url] - } + ) -> Option, Shared>>; + # [method_id (initWithContentsOfFile :)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfFile: path] - } + ) -> Option, Shared>>; + # [method_id (initWithContentsOfURL :)] pub unsafe fn initWithContentsOfURL( &self, url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![self, initWithContentsOfURL: url] - } + ) -> Option, Shared>>; } ); extern_methods!( #[doc = "NSSharedKeySetDictionary"] unsafe impl NSDictionary { - pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id { - msg_send_id![Self::class(), sharedKeySetForKeys: keys] - } + # [method_id (sharedKeySetForKeys :)] + pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id; } ); extern_methods!( #[doc = "NSSharedKeySetDictionary"] unsafe impl NSMutableDictionary { + # [method_id (dictionaryWithSharedKeySet :)] pub unsafe fn dictionaryWithSharedKeySet( keyset: &Object, - ) -> Id, Shared> { - msg_send_id![Self::class(), dictionaryWithSharedKeySet: keyset] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSGenericFastEnumeraiton"] unsafe impl NSDictionary { + # [method (countByEnumeratingWithState : objects : count :)] pub unsafe fn countByEnumeratingWithState_objects_count( &self, state: NonNull, buffer: TodoArray, len: NSUInteger, - ) -> NSUInteger { - msg_send![ - self, - countByEnumeratingWithState: state, - objects: buffer, - count: len - ] - } + ) -> NSUInteger; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index 06d141997..7a09c83ed 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSProxy::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDistantObject; @@ -15,48 +15,33 @@ extern_class!( ); extern_methods!( unsafe impl NSDistantObject { + # [method_id (proxyWithTarget : connection :)] pub unsafe fn proxyWithTarget_connection( target: &Object, connection: &NSConnection, - ) -> Option> { - msg_send_id![ - Self::class(), - proxyWithTarget: target, - connection: connection - ] - } + ) -> Option>; + # [method_id (initWithTarget : connection :)] pub unsafe fn initWithTarget_connection( &self, target: &Object, connection: &NSConnection, - ) -> Option> { - msg_send_id![self, initWithTarget: target, connection: connection] - } + ) -> Option>; + # [method_id (proxyWithLocal : connection :)] pub unsafe fn proxyWithLocal_connection( target: &Object, connection: &NSConnection, - ) -> Id { - msg_send_id![ - Self::class(), - proxyWithLocal: target, - connection: connection - ] - } + ) -> Id; + # [method_id (initWithLocal : connection :)] pub unsafe fn initWithLocal_connection( &self, target: &Object, connection: &NSConnection, - ) -> Id { - msg_send_id![self, initWithLocal: target, connection: connection] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn setProtocolForProxy(&self, proto: Option<&Protocol>) { - msg_send![self, setProtocolForProxy: proto] - } - pub unsafe fn connectionForProxy(&self) -> Id { - msg_send_id![self, connectionForProxy] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + # [method (setProtocolForProxy :)] + pub unsafe fn setProtocolForProxy(&self, proto: Option<&Protocol>); + #[method_id(connectionForProxy)] + pub unsafe fn connectionForProxy(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index 071354ac1..113e1d9eb 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSDistributedLock; @@ -13,26 +13,19 @@ extern_class!( ); extern_methods!( unsafe impl NSDistributedLock { - pub unsafe fn lockWithPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), lockWithPath: path] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithPath: path] - } - pub unsafe fn tryLock(&self) -> bool { - msg_send![self, tryLock] - } - pub unsafe fn unlock(&self) { - msg_send![self, unlock] - } - pub unsafe fn breakLock(&self) { - msg_send![self, breakLock] - } - pub unsafe fn lockDate(&self) -> Id { - msg_send_id![self, lockDate] - } + # [method_id (lockWithPath :)] + pub unsafe fn lockWithPath(path: &NSString) -> Option>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithPath :)] + pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; + #[method(tryLock)] + pub unsafe fn tryLock(&self) -> bool; + #[method(unlock)] + pub unsafe fn unlock(&self); + #[method(breakLock)] + pub unsafe fn breakLock(&self); + #[method_id(lockDate)] + pub unsafe fn lockDate(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index e4037c029..dec5c50b4 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSNotification::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSDistributedNotificationCenterType = NSString; extern_class!( #[derive(Debug)] @@ -15,17 +15,13 @@ extern_class!( ); extern_methods!( unsafe impl NSDistributedNotificationCenter { + # [method_id (notificationCenterForType :)] pub unsafe fn notificationCenterForType( notificationCenterType: &NSDistributedNotificationCenterType, - ) -> Id { - msg_send_id![ - Self::class(), - notificationCenterForType: notificationCenterType - ] - } - pub unsafe fn defaultCenter() -> Id { - msg_send_id![Self::class(), defaultCenter] - } + ) -> Id; + #[method_id(defaultCenter)] + pub unsafe fn defaultCenter() -> Id; + # [method (addObserver : selector : name : object : suspensionBehavior :)] pub unsafe fn addObserver_selector_name_object_suspensionBehavior( &self, observer: &Object, @@ -33,99 +29,54 @@ extern_methods!( name: Option<&NSNotificationName>, object: Option<&NSString>, suspensionBehavior: NSNotificationSuspensionBehavior, - ) { - msg_send![ - self, - addObserver: observer, - selector: selector, - name: name, - object: object, - suspensionBehavior: suspensionBehavior - ] - } + ); + # [method (postNotificationName : object : userInfo : deliverImmediately :)] pub unsafe fn postNotificationName_object_userInfo_deliverImmediately( &self, name: &NSNotificationName, object: Option<&NSString>, userInfo: Option<&NSDictionary>, deliverImmediately: bool, - ) { - msg_send![ - self, - postNotificationName: name, - object: object, - userInfo: userInfo, - deliverImmediately: deliverImmediately - ] - } + ); + # [method (postNotificationName : object : userInfo : options :)] pub unsafe fn postNotificationName_object_userInfo_options( &self, name: &NSNotificationName, object: Option<&NSString>, userInfo: Option<&NSDictionary>, options: NSDistributedNotificationOptions, - ) { - msg_send![ - self, - postNotificationName: name, - object: object, - userInfo: userInfo, - options: options - ] - } - pub unsafe fn suspended(&self) -> bool { - msg_send![self, suspended] - } - pub unsafe fn setSuspended(&self, suspended: bool) { - msg_send![self, setSuspended: suspended] - } + ); + #[method(suspended)] + pub unsafe fn suspended(&self) -> bool; + # [method (setSuspended :)] + pub unsafe fn setSuspended(&self, suspended: bool); + # [method (addObserver : selector : name : object :)] pub unsafe fn addObserver_selector_name_object( &self, observer: &Object, aSelector: Sel, aName: Option<&NSNotificationName>, anObject: Option<&NSString>, - ) { - msg_send![ - self, - addObserver: observer, - selector: aSelector, - name: aName, - object: anObject - ] - } + ); + # [method (postNotificationName : object :)] pub unsafe fn postNotificationName_object( &self, aName: &NSNotificationName, anObject: Option<&NSString>, - ) { - msg_send![self, postNotificationName: aName, object: anObject] - } + ); + # [method (postNotificationName : object : userInfo :)] pub unsafe fn postNotificationName_object_userInfo( &self, aName: &NSNotificationName, anObject: Option<&NSString>, aUserInfo: Option<&NSDictionary>, - ) { - msg_send![ - self, - postNotificationName: aName, - object: anObject, - userInfo: aUserInfo - ] - } + ); + # [method (removeObserver : name : object :)] pub unsafe fn removeObserver_name_object( &self, observer: &Object, aName: Option<&NSNotificationName>, anObject: Option<&NSString>, - ) { - msg_send![ - self, - removeObserver: observer, - name: aName, - object: anObject - ] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 812933d0e..91c865e3d 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSEnergyFormatter; @@ -12,60 +12,44 @@ extern_class!( ); extern_methods!( unsafe impl NSEnergyFormatter { - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] - } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn isForFoodEnergyUse(&self) -> bool { - msg_send![self, isForFoodEnergyUse] - } - pub unsafe fn setForFoodEnergyUse(&self, forFoodEnergyUse: bool) { - msg_send![self, setForFoodEnergyUse: forFoodEnergyUse] - } + #[method_id(numberFormatter)] + pub unsafe fn numberFormatter(&self) -> Id; + # [method (setNumberFormatter :)] + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); + #[method(unitStyle)] + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; + # [method (setUnitStyle :)] + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); + #[method(isForFoodEnergyUse)] + pub unsafe fn isForFoodEnergyUse(&self) -> bool; + # [method (setForFoodEnergyUse :)] + pub unsafe fn setForFoodEnergyUse(&self, forFoodEnergyUse: bool); + # [method_id (stringFromValue : unit :)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSEnergyFormatterUnit, - ) -> Id { - msg_send_id![self, stringFromValue: value, unit: unit] - } - pub unsafe fn stringFromJoules(&self, numberInJoules: c_double) -> Id { - msg_send_id![self, stringFromJoules: numberInJoules] - } + ) -> Id; + # [method_id (stringFromJoules :)] + pub unsafe fn stringFromJoules(&self, numberInJoules: c_double) -> Id; + # [method_id (unitStringFromValue : unit :)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSEnergyFormatterUnit, - ) -> Id { - msg_send_id![self, unitStringFromValue: value, unit: unit] - } + ) -> Id; + # [method_id (unitStringFromJoules : usedUnit :)] pub unsafe fn unitStringFromJoules_usedUnit( &self, numberInJoules: c_double, unitp: *mut NSEnergyFormatterUnit, - ) -> Id { - msg_send_id![self, unitStringFromJoules: numberInJoules, usedUnit: unitp] - } + ) -> Id; + # [method (getObjectValue : forString : errorDescription :)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, string: &NSString, error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } + ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 44d9be9c8..3bfee3523 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSFastEnumeration = NSObject; __inner_extern_class!( #[derive(Debug)] @@ -14,16 +14,14 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSEnumerator { - pub unsafe fn nextObject(&self) -> Option> { - msg_send_id![self, nextObject] - } + #[method_id(nextObject)] + pub unsafe fn nextObject(&self) -> Option>; } ); extern_methods!( #[doc = "NSExtendedEnumerator"] unsafe impl NSEnumerator { - pub unsafe fn allObjects(&self) -> Id, Shared> { - msg_send_id![self, allObjects] - } + #[method_id(allObjects)] + pub unsafe fn allObjects(&self) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index d64e1b386..151e3b049 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSErrorDomain = NSString; pub type NSErrorUserInfoKey = NSString; extern_class!( @@ -17,74 +17,52 @@ extern_class!( ); extern_methods!( unsafe impl NSError { + # [method_id (initWithDomain : code : userInfo :)] pub unsafe fn initWithDomain_code_userInfo( &self, domain: &NSErrorDomain, code: NSInteger, dict: Option<&NSDictionary>, - ) -> Id { - msg_send_id![self, initWithDomain: domain, code: code, userInfo: dict] - } + ) -> Id; + # [method_id (errorWithDomain : code : userInfo :)] pub unsafe fn errorWithDomain_code_userInfo( domain: &NSErrorDomain, code: NSInteger, dict: Option<&NSDictionary>, - ) -> Id { - msg_send_id![ - Self::class(), - errorWithDomain: domain, - code: code, - userInfo: dict - ] - } - pub unsafe fn domain(&self) -> Id { - msg_send_id![self, domain] - } - pub unsafe fn code(&self) -> NSInteger { - msg_send![self, code] - } - pub unsafe fn userInfo(&self) -> Id, Shared> { - msg_send_id![self, userInfo] - } - pub unsafe fn localizedDescription(&self) -> Id { - msg_send_id![self, localizedDescription] - } - pub unsafe fn localizedFailureReason(&self) -> Option> { - msg_send_id![self, localizedFailureReason] - } - pub unsafe fn localizedRecoverySuggestion(&self) -> Option> { - msg_send_id![self, localizedRecoverySuggestion] - } - pub unsafe fn localizedRecoveryOptions(&self) -> Option, Shared>> { - msg_send_id![self, localizedRecoveryOptions] - } - pub unsafe fn recoveryAttempter(&self) -> Option> { - msg_send_id![self, recoveryAttempter] - } - pub unsafe fn helpAnchor(&self) -> Option> { - msg_send_id![self, helpAnchor] - } - pub unsafe fn underlyingErrors(&self) -> Id, Shared> { - msg_send_id![self, underlyingErrors] - } + ) -> Id; + #[method_id(domain)] + pub unsafe fn domain(&self) -> Id; + #[method(code)] + pub unsafe fn code(&self) -> NSInteger; + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Id, Shared>; + #[method_id(localizedDescription)] + pub unsafe fn localizedDescription(&self) -> Id; + #[method_id(localizedFailureReason)] + pub unsafe fn localizedFailureReason(&self) -> Option>; + #[method_id(localizedRecoverySuggestion)] + pub unsafe fn localizedRecoverySuggestion(&self) -> Option>; + #[method_id(localizedRecoveryOptions)] + pub unsafe fn localizedRecoveryOptions(&self) -> Option, Shared>>; + #[method_id(recoveryAttempter)] + pub unsafe fn recoveryAttempter(&self) -> Option>; + #[method_id(helpAnchor)] + pub unsafe fn helpAnchor(&self) -> Option>; + #[method_id(underlyingErrors)] + pub unsafe fn underlyingErrors(&self) -> Id, Shared>; + # [method (setUserInfoValueProviderForDomain : provider :)] pub unsafe fn setUserInfoValueProviderForDomain_provider( errorDomain: &NSErrorDomain, provider: TodoBlock, - ) { - msg_send![ - Self::class(), - setUserInfoValueProviderForDomain: errorDomain, - provider: provider - ] - } - pub unsafe fn userInfoValueProviderForDomain(errorDomain: &NSErrorDomain) -> TodoBlock { - msg_send![Self::class(), userInfoValueProviderForDomain: errorDomain] - } + ); + # [method (userInfoValueProviderForDomain :)] + pub unsafe fn userInfoValueProviderForDomain(errorDomain: &NSErrorDomain) -> TodoBlock; } ); extern_methods!( #[doc = "NSErrorRecoveryAttempting"] unsafe impl NSObject { + # [method (attemptRecoveryFromError : optionIndex : delegate : didRecoverSelector : contextInfo :)] pub unsafe fn attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo( &self, error: &NSError, @@ -92,26 +70,12 @@ extern_methods!( delegate: Option<&Object>, didRecoverSelector: Option, contextInfo: *mut c_void, - ) { - msg_send![ - self, - attemptRecoveryFromError: error, - optionIndex: recoveryOptionIndex, - delegate: delegate, - didRecoverSelector: didRecoverSelector, - contextInfo: contextInfo - ] - } + ); + # [method (attemptRecoveryFromError : optionIndex :)] pub unsafe fn attemptRecoveryFromError_optionIndex( &self, error: &NSError, recoveryOptionIndex: NSUInteger, - ) -> bool { - msg_send![ - self, - attemptRecoveryFromError: error, - optionIndex: recoveryOptionIndex - ] - } + ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 3d9dca65c..6deb87c7f 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSException; @@ -17,66 +17,42 @@ extern_class!( ); extern_methods!( unsafe impl NSException { + # [method_id (exceptionWithName : reason : userInfo :)] pub unsafe fn exceptionWithName_reason_userInfo( name: &NSExceptionName, reason: Option<&NSString>, userInfo: Option<&NSDictionary>, - ) -> Id { - msg_send_id![ - Self::class(), - exceptionWithName: name, - reason: reason, - userInfo: userInfo - ] - } + ) -> Id; + # [method_id (initWithName : reason : userInfo :)] pub unsafe fn initWithName_reason_userInfo( &self, aName: &NSExceptionName, aReason: Option<&NSString>, aUserInfo: Option<&NSDictionary>, - ) -> Id { - msg_send_id![ - self, - initWithName: aName, - reason: aReason, - userInfo: aUserInfo - ] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn reason(&self) -> Option> { - msg_send_id![self, reason] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } - pub unsafe fn callStackReturnAddresses(&self) -> Id, Shared> { - msg_send_id![self, callStackReturnAddresses] - } - pub unsafe fn callStackSymbols(&self) -> Id, Shared> { - msg_send_id![self, callStackSymbols] - } - pub unsafe fn raise(&self) { - msg_send![self, raise] - } + ) -> Id; + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method_id(reason)] + pub unsafe fn reason(&self) -> Option>; + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + #[method_id(callStackReturnAddresses)] + pub unsafe fn callStackReturnAddresses(&self) -> Id, Shared>; + #[method_id(callStackSymbols)] + pub unsafe fn callStackSymbols(&self) -> Id, Shared>; + #[method(raise)] + pub unsafe fn raise(&self); } ); extern_methods!( #[doc = "NSExceptionRaisingConveniences"] unsafe impl NSException { + # [method (raise : format : arguments :)] pub unsafe fn raise_format_arguments( name: &NSExceptionName, format: &NSString, argList: va_list, - ) { - msg_send![ - Self::class(), - raise: name, - format: format, - arguments: argList - ] - } + ); } ); extern_class!( @@ -88,8 +64,7 @@ extern_class!( ); extern_methods!( unsafe impl NSAssertionHandler { - pub unsafe fn currentHandler() -> Id { - msg_send_id![Self::class(), currentHandler] - } + #[method_id(currentHandler)] + pub unsafe fn currentHandler() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index 6522ab851..c69e2f257 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSExpression; @@ -16,177 +16,112 @@ extern_class!( ); extern_methods!( unsafe impl NSExpression { + # [method_id (expressionWithFormat : argumentArray :)] pub unsafe fn expressionWithFormat_argumentArray( expressionFormat: &NSString, arguments: &NSArray, - ) -> Id { - msg_send_id![ - Self::class(), - expressionWithFormat: expressionFormat, - argumentArray: arguments - ] - } + ) -> Id; + # [method_id (expressionWithFormat : arguments :)] pub unsafe fn expressionWithFormat_arguments( expressionFormat: &NSString, argList: va_list, - ) -> Id { - msg_send_id![ - Self::class(), - expressionWithFormat: expressionFormat, - arguments: argList - ] - } - pub unsafe fn expressionForConstantValue(obj: Option<&Object>) -> Id { - msg_send_id![Self::class(), expressionForConstantValue: obj] - } - pub unsafe fn expressionForEvaluatedObject() -> Id { - msg_send_id![Self::class(), expressionForEvaluatedObject] - } - pub unsafe fn expressionForVariable(string: &NSString) -> Id { - msg_send_id![Self::class(), expressionForVariable: string] - } - pub unsafe fn expressionForKeyPath(keyPath: &NSString) -> Id { - msg_send_id![Self::class(), expressionForKeyPath: keyPath] - } + ) -> Id; + # [method_id (expressionForConstantValue :)] + pub unsafe fn expressionForConstantValue(obj: Option<&Object>) -> Id; + #[method_id(expressionForEvaluatedObject)] + pub unsafe fn expressionForEvaluatedObject() -> Id; + # [method_id (expressionForVariable :)] + pub unsafe fn expressionForVariable(string: &NSString) -> Id; + # [method_id (expressionForKeyPath :)] + pub unsafe fn expressionForKeyPath(keyPath: &NSString) -> Id; + # [method_id (expressionForFunction : arguments :)] pub unsafe fn expressionForFunction_arguments( name: &NSString, parameters: &NSArray, - ) -> Id { - msg_send_id![ - Self::class(), - expressionForFunction: name, - arguments: parameters - ] - } + ) -> Id; + # [method_id (expressionForAggregate :)] pub unsafe fn expressionForAggregate( subexpressions: &NSArray, - ) -> Id { - msg_send_id![Self::class(), expressionForAggregate: subexpressions] - } + ) -> Id; + # [method_id (expressionForUnionSet : with :)] pub unsafe fn expressionForUnionSet_with( left: &NSExpression, right: &NSExpression, - ) -> Id { - msg_send_id![Self::class(), expressionForUnionSet: left, with: right] - } + ) -> Id; + # [method_id (expressionForIntersectSet : with :)] pub unsafe fn expressionForIntersectSet_with( left: &NSExpression, right: &NSExpression, - ) -> Id { - msg_send_id![Self::class(), expressionForIntersectSet: left, with: right] - } + ) -> Id; + # [method_id (expressionForMinusSet : with :)] pub unsafe fn expressionForMinusSet_with( left: &NSExpression, right: &NSExpression, - ) -> Id { - msg_send_id![Self::class(), expressionForMinusSet: left, with: right] - } + ) -> Id; + # [method_id (expressionForSubquery : usingIteratorVariable : predicate :)] pub unsafe fn expressionForSubquery_usingIteratorVariable_predicate( expression: &NSExpression, variable: &NSString, predicate: &NSPredicate, - ) -> Id { - msg_send_id![ - Self::class(), - expressionForSubquery: expression, - usingIteratorVariable: variable, - predicate: predicate - ] - } + ) -> Id; + # [method_id (expressionForFunction : selectorName : arguments :)] pub unsafe fn expressionForFunction_selectorName_arguments( target: &NSExpression, name: &NSString, parameters: Option<&NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - expressionForFunction: target, - selectorName: name, - arguments: parameters - ] - } - pub unsafe fn expressionForAnyKey() -> Id { - msg_send_id![Self::class(), expressionForAnyKey] - } + ) -> Id; + #[method_id(expressionForAnyKey)] + pub unsafe fn expressionForAnyKey() -> Id; + # [method_id (expressionForBlock : arguments :)] pub unsafe fn expressionForBlock_arguments( block: TodoBlock, arguments: Option<&NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - expressionForBlock: block, - arguments: arguments - ] - } + ) -> Id; + # [method_id (expressionForConditional : trueExpression : falseExpression :)] pub unsafe fn expressionForConditional_trueExpression_falseExpression( predicate: &NSPredicate, trueExpression: &NSExpression, falseExpression: &NSExpression, - ) -> Id { - msg_send_id![ - Self::class(), - expressionForConditional: predicate, - trueExpression: trueExpression, - falseExpression: falseExpression - ] - } - pub unsafe fn initWithExpressionType(&self, type_: NSExpressionType) -> Id { - msg_send_id![self, initWithExpressionType: type_] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn expressionType(&self) -> NSExpressionType { - msg_send![self, expressionType] - } - pub unsafe fn constantValue(&self) -> Option> { - msg_send_id![self, constantValue] - } - pub unsafe fn keyPath(&self) -> Id { - msg_send_id![self, keyPath] - } - pub unsafe fn function(&self) -> Id { - msg_send_id![self, function] - } - pub unsafe fn variable(&self) -> Id { - msg_send_id![self, variable] - } - pub unsafe fn operand(&self) -> Id { - msg_send_id![self, operand] - } - pub unsafe fn arguments(&self) -> Option, Shared>> { - msg_send_id![self, arguments] - } - pub unsafe fn collection(&self) -> Id { - msg_send_id![self, collection] - } - pub unsafe fn predicate(&self) -> Id { - msg_send_id![self, predicate] - } - pub unsafe fn leftExpression(&self) -> Id { - msg_send_id![self, leftExpression] - } - pub unsafe fn rightExpression(&self) -> Id { - msg_send_id![self, rightExpression] - } - pub unsafe fn trueExpression(&self) -> Id { - msg_send_id![self, trueExpression] - } - pub unsafe fn falseExpression(&self) -> Id { - msg_send_id![self, falseExpression] - } - pub unsafe fn expressionBlock(&self) -> TodoBlock { - msg_send![self, expressionBlock] - } + ) -> Id; + # [method_id (initWithExpressionType :)] + pub unsafe fn initWithExpressionType(&self, type_: NSExpressionType) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(expressionType)] + pub unsafe fn expressionType(&self) -> NSExpressionType; + #[method_id(constantValue)] + pub unsafe fn constantValue(&self) -> Option>; + #[method_id(keyPath)] + pub unsafe fn keyPath(&self) -> Id; + #[method_id(function)] + pub unsafe fn function(&self) -> Id; + #[method_id(variable)] + pub unsafe fn variable(&self) -> Id; + #[method_id(operand)] + pub unsafe fn operand(&self) -> Id; + #[method_id(arguments)] + pub unsafe fn arguments(&self) -> Option, Shared>>; + #[method_id(collection)] + pub unsafe fn collection(&self) -> Id; + #[method_id(predicate)] + pub unsafe fn predicate(&self) -> Id; + #[method_id(leftExpression)] + pub unsafe fn leftExpression(&self) -> Id; + #[method_id(rightExpression)] + pub unsafe fn rightExpression(&self) -> Id; + #[method_id(trueExpression)] + pub unsafe fn trueExpression(&self) -> Id; + #[method_id(falseExpression)] + pub unsafe fn falseExpression(&self) -> Id; + #[method(expressionBlock)] + pub unsafe fn expressionBlock(&self) -> TodoBlock; + # [method_id (expressionValueWithObject : context :)] pub unsafe fn expressionValueWithObject_context( &self, object: Option<&Object>, context: Option<&NSMutableDictionary>, - ) -> Option> { - msg_send_id![self, expressionValueWithObject: object, context: context] - } - pub unsafe fn allowEvaluation(&self) { - msg_send![self, allowEvaluation] - } + ) -> Option>; + #[method(allowEvaluation)] + pub unsafe fn allowEvaluation(&self); } ); diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index 8ba02b6fc..e8c017410 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSExtensionContext; @@ -12,25 +12,17 @@ extern_class!( ); extern_methods!( unsafe impl NSExtensionContext { - pub unsafe fn inputItems(&self) -> Id { - msg_send_id![self, inputItems] - } + #[method_id(inputItems)] + pub unsafe fn inputItems(&self) -> Id; + # [method (completeRequestReturningItems : completionHandler :)] pub unsafe fn completeRequestReturningItems_completionHandler( &self, items: Option<&NSArray>, completionHandler: TodoBlock, - ) { - msg_send![ - self, - completeRequestReturningItems: items, - completionHandler: completionHandler - ] - } - pub unsafe fn cancelRequestWithError(&self, error: &NSError) { - msg_send![self, cancelRequestWithError: error] - } - pub unsafe fn openURL_completionHandler(&self, URL: &NSURL, completionHandler: TodoBlock) { - msg_send![self, openURL: URL, completionHandler: completionHandler] - } + ); + # [method (cancelRequestWithError :)] + pub unsafe fn cancelRequestWithError(&self, error: &NSError); + # [method (openURL : completionHandler :)] + pub unsafe fn openURL_completionHandler(&self, URL: &NSURL, completionHandler: TodoBlock); } ); diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index 9b6e9ad21..f45fe5c9e 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSItemProvider::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSExtensionItem; @@ -13,32 +13,24 @@ extern_class!( ); extern_methods!( unsafe impl NSExtensionItem { - pub unsafe fn attributedTitle(&self) -> Option> { - msg_send_id![self, attributedTitle] - } - pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>) { - msg_send![self, setAttributedTitle: attributedTitle] - } - pub unsafe fn attributedContentText(&self) -> Option> { - msg_send_id![self, attributedContentText] - } + #[method_id(attributedTitle)] + pub unsafe fn attributedTitle(&self) -> Option>; + # [method (setAttributedTitle :)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); + #[method_id(attributedContentText)] + pub unsafe fn attributedContentText(&self) -> Option>; + # [method (setAttributedContentText :)] pub unsafe fn setAttributedContentText( &self, attributedContentText: Option<&NSAttributedString>, - ) { - msg_send![self, setAttributedContentText: attributedContentText] - } - pub unsafe fn attachments(&self) -> Option, Shared>> { - msg_send_id![self, attachments] - } - pub unsafe fn setAttachments(&self, attachments: Option<&NSArray>) { - msg_send![self, setAttachments: attachments] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } - pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { - msg_send![self, setUserInfo: userInfo] - } + ); + #[method_id(attachments)] + pub unsafe fn attachments(&self) -> Option, Shared>>; + # [method (setAttachments :)] + pub unsafe fn setAttachments(&self, attachments: Option<&NSArray>); + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + # [method (setUserInfo :)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs index 339014c66..cdad7804f 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs @@ -3,5 +3,5 @@ use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSExtensionRequestHandling = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 28d845024..f2bd1bd27 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSFileAccessIntent; @@ -19,21 +19,18 @@ extern_class!( ); extern_methods!( unsafe impl NSFileAccessIntent { + # [method_id (readingIntentWithURL : options :)] pub unsafe fn readingIntentWithURL_options( url: &NSURL, options: NSFileCoordinatorReadingOptions, - ) -> Id { - msg_send_id![Self::class(), readingIntentWithURL: url, options: options] - } + ) -> Id; + # [method_id (writingIntentWithURL : options :)] pub unsafe fn writingIntentWithURL_options( url: &NSURL, options: NSFileCoordinatorWritingOptions, - ) -> Id { - msg_send_id![Self::class(), writingIntentWithURL: url, options: options] - } - pub unsafe fn URL(&self) -> Id { - msg_send_id![self, URL] - } + ) -> Id; + #[method_id(URL)] + pub unsafe fn URL(&self) -> Id; } ); extern_class!( @@ -45,70 +42,45 @@ extern_class!( ); extern_methods!( unsafe impl NSFileCoordinator { - pub unsafe fn addFilePresenter(filePresenter: &NSFilePresenter) { - msg_send![Self::class(), addFilePresenter: filePresenter] - } - pub unsafe fn removeFilePresenter(filePresenter: &NSFilePresenter) { - msg_send![Self::class(), removeFilePresenter: filePresenter] - } - pub unsafe fn filePresenters() -> Id, Shared> { - msg_send_id![Self::class(), filePresenters] - } + # [method (addFilePresenter :)] + pub unsafe fn addFilePresenter(filePresenter: &NSFilePresenter); + # [method (removeFilePresenter :)] + pub unsafe fn removeFilePresenter(filePresenter: &NSFilePresenter); + #[method_id(filePresenters)] + pub unsafe fn filePresenters() -> Id, Shared>; + # [method_id (initWithFilePresenter :)] pub unsafe fn initWithFilePresenter( &self, filePresenterOrNil: Option<&NSFilePresenter>, - ) -> Id { - msg_send_id![self, initWithFilePresenter: filePresenterOrNil] - } - pub unsafe fn purposeIdentifier(&self) -> Id { - msg_send_id![self, purposeIdentifier] - } - pub unsafe fn setPurposeIdentifier(&self, purposeIdentifier: &NSString) { - msg_send![self, setPurposeIdentifier: purposeIdentifier] - } + ) -> Id; + #[method_id(purposeIdentifier)] + pub unsafe fn purposeIdentifier(&self) -> Id; + # [method (setPurposeIdentifier :)] + pub unsafe fn setPurposeIdentifier(&self, purposeIdentifier: &NSString); + # [method (coordinateAccessWithIntents : queue : byAccessor :)] pub unsafe fn coordinateAccessWithIntents_queue_byAccessor( &self, intents: &NSArray, queue: &NSOperationQueue, accessor: TodoBlock, - ) { - msg_send![ - self, - coordinateAccessWithIntents: intents, - queue: queue, - byAccessor: accessor - ] - } + ); + # [method (coordinateReadingItemAtURL : options : error : byAccessor :)] pub unsafe fn coordinateReadingItemAtURL_options_error_byAccessor( &self, url: &NSURL, options: NSFileCoordinatorReadingOptions, outError: *mut *mut NSError, reader: TodoBlock, - ) { - msg_send![ - self, - coordinateReadingItemAtURL: url, - options: options, - error: outError, - byAccessor: reader - ] - } + ); + # [method (coordinateWritingItemAtURL : options : error : byAccessor :)] pub unsafe fn coordinateWritingItemAtURL_options_error_byAccessor( &self, url: &NSURL, options: NSFileCoordinatorWritingOptions, outError: *mut *mut NSError, writer: TodoBlock, - ) { - msg_send![ - self, - coordinateWritingItemAtURL: url, - options: options, - error: outError, - byAccessor: writer - ] - } + ); + # [method (coordinateReadingItemAtURL : options : writingItemAtURL : options : error : byAccessor :)] pub unsafe fn coordinateReadingItemAtURL_options_writingItemAtURL_options_error_byAccessor( &self, readingURL: &NSURL, @@ -117,17 +89,8 @@ extern_methods!( writingOptions: NSFileCoordinatorWritingOptions, outError: *mut *mut NSError, readerWriter: TodoBlock, - ) { - msg_send![ - self, - coordinateReadingItemAtURL: readingURL, - options: readingOptions, - writingItemAtURL: writingURL, - options: writingOptions, - error: outError, - byAccessor: readerWriter - ] - } + ); + # [method (coordinateWritingItemAtURL : options : writingItemAtURL : options : error : byAccessor :)] pub unsafe fn coordinateWritingItemAtURL_options_writingItemAtURL_options_error_byAccessor( &self, url1: &NSURL, @@ -136,17 +99,8 @@ extern_methods!( options2: NSFileCoordinatorWritingOptions, outError: *mut *mut NSError, writer: TodoBlock, - ) { - msg_send![ - self, - coordinateWritingItemAtURL: url1, - options: options1, - writingItemAtURL: url2, - options: options2, - error: outError, - byAccessor: writer - ] - } + ); + # [method (prepareForReadingItemsAtURLs : options : writingItemsAtURLs : options : error : byAccessor :)] pub unsafe fn prepareForReadingItemsAtURLs_options_writingItemsAtURLs_options_error_byAccessor( &self, readingURLs: &NSArray, @@ -155,36 +109,18 @@ extern_methods!( writingOptions: NSFileCoordinatorWritingOptions, outError: *mut *mut NSError, batchAccessor: TodoBlock, - ) { - msg_send![ - self, - prepareForReadingItemsAtURLs: readingURLs, - options: readingOptions, - writingItemsAtURLs: writingURLs, - options: writingOptions, - error: outError, - byAccessor: batchAccessor - ] - } - pub unsafe fn itemAtURL_willMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL) { - msg_send![self, itemAtURL: oldURL, willMoveToURL: newURL] - } - pub unsafe fn itemAtURL_didMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL) { - msg_send![self, itemAtURL: oldURL, didMoveToURL: newURL] - } + ); + # [method (itemAtURL : willMoveToURL :)] + pub unsafe fn itemAtURL_willMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL); + # [method (itemAtURL : didMoveToURL :)] + pub unsafe fn itemAtURL_didMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL); + # [method (itemAtURL : didChangeUbiquityAttributes :)] pub unsafe fn itemAtURL_didChangeUbiquityAttributes( &self, url: &NSURL, attributes: &NSSet, - ) { - msg_send![ - self, - itemAtURL: url, - didChangeUbiquityAttributes: attributes - ] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } + ); + #[method(cancel)] + pub unsafe fn cancel(&self); } ); diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index df342edd6..7089140fb 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSFileHandle; @@ -20,199 +20,154 @@ extern_class!( ); extern_methods!( unsafe impl NSFileHandle { - pub unsafe fn availableData(&self) -> Id { - msg_send_id![self, availableData] - } + #[method_id(availableData)] + pub unsafe fn availableData(&self) -> Id; + # [method_id (initWithFileDescriptor : closeOnDealloc :)] pub unsafe fn initWithFileDescriptor_closeOnDealloc( &self, fd: c_int, closeopt: bool, - ) -> Id { - msg_send_id![self, initWithFileDescriptor: fd, closeOnDealloc: closeopt] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + # [method_id (readDataToEndOfFileAndReturnError :)] pub unsafe fn readDataToEndOfFileAndReturnError( &self, - ) -> Result, Id> { - msg_send_id![self, readDataToEndOfFileAndReturnError: _] - } + ) -> Result, Id>; + # [method_id (readDataUpToLength : error :)] pub unsafe fn readDataUpToLength_error( &self, length: NSUInteger, - ) -> Result, Id> { - msg_send_id![self, readDataUpToLength: length, error: _] - } - pub unsafe fn writeData_error(&self, data: &NSData) -> Result<(), Id> { - msg_send![self, writeData: data, error: _] - } + ) -> Result, Id>; + # [method (writeData : error :)] + pub unsafe fn writeData_error(&self, data: &NSData) -> Result<(), Id>; + # [method (getOffset : error :)] pub unsafe fn getOffset_error( &self, offsetInFile: NonNull, - ) -> Result<(), Id> { - msg_send![self, getOffset: offsetInFile, error: _] - } + ) -> Result<(), Id>; + # [method (seekToEndReturningOffset : error :)] pub unsafe fn seekToEndReturningOffset_error( &self, offsetInFile: *mut c_ulonglong, - ) -> Result<(), Id> { - msg_send![self, seekToEndReturningOffset: offsetInFile, error: _] - } + ) -> Result<(), Id>; + # [method (seekToOffset : error :)] pub unsafe fn seekToOffset_error( &self, offset: c_ulonglong, - ) -> Result<(), Id> { - msg_send![self, seekToOffset: offset, error: _] - } + ) -> Result<(), Id>; + # [method (truncateAtOffset : error :)] pub unsafe fn truncateAtOffset_error( &self, offset: c_ulonglong, - ) -> Result<(), Id> { - msg_send![self, truncateAtOffset: offset, error: _] - } - pub unsafe fn synchronizeAndReturnError(&self) -> Result<(), Id> { - msg_send![self, synchronizeAndReturnError: _] - } - pub unsafe fn closeAndReturnError(&self) -> Result<(), Id> { - msg_send![self, closeAndReturnError: _] - } + ) -> Result<(), Id>; + # [method (synchronizeAndReturnError :)] + pub unsafe fn synchronizeAndReturnError(&self) -> Result<(), Id>; + # [method (closeAndReturnError :)] + pub unsafe fn closeAndReturnError(&self) -> Result<(), Id>; } ); extern_methods!( #[doc = "NSFileHandleCreation"] unsafe impl NSFileHandle { - pub unsafe fn fileHandleWithStandardInput() -> Id { - msg_send_id![Self::class(), fileHandleWithStandardInput] - } - pub unsafe fn fileHandleWithStandardOutput() -> Id { - msg_send_id![Self::class(), fileHandleWithStandardOutput] - } - pub unsafe fn fileHandleWithStandardError() -> Id { - msg_send_id![Self::class(), fileHandleWithStandardError] - } - pub unsafe fn fileHandleWithNullDevice() -> Id { - msg_send_id![Self::class(), fileHandleWithNullDevice] - } - pub unsafe fn fileHandleForReadingAtPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), fileHandleForReadingAtPath: path] - } - pub unsafe fn fileHandleForWritingAtPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), fileHandleForWritingAtPath: path] - } - pub unsafe fn fileHandleForUpdatingAtPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), fileHandleForUpdatingAtPath: path] - } + #[method_id(fileHandleWithStandardInput)] + pub unsafe fn fileHandleWithStandardInput() -> Id; + #[method_id(fileHandleWithStandardOutput)] + pub unsafe fn fileHandleWithStandardOutput() -> Id; + #[method_id(fileHandleWithStandardError)] + pub unsafe fn fileHandleWithStandardError() -> Id; + #[method_id(fileHandleWithNullDevice)] + pub unsafe fn fileHandleWithNullDevice() -> Id; + # [method_id (fileHandleForReadingAtPath :)] + pub unsafe fn fileHandleForReadingAtPath(path: &NSString) -> Option>; + # [method_id (fileHandleForWritingAtPath :)] + pub unsafe fn fileHandleForWritingAtPath(path: &NSString) -> Option>; + # [method_id (fileHandleForUpdatingAtPath :)] + pub unsafe fn fileHandleForUpdatingAtPath(path: &NSString) -> Option>; + # [method_id (fileHandleForReadingFromURL : error :)] pub unsafe fn fileHandleForReadingFromURL_error( url: &NSURL, - ) -> Result, Id> { - msg_send_id![Self::class(), fileHandleForReadingFromURL: url, error: _] - } + ) -> Result, Id>; + # [method_id (fileHandleForWritingToURL : error :)] pub unsafe fn fileHandleForWritingToURL_error( url: &NSURL, - ) -> Result, Id> { - msg_send_id![Self::class(), fileHandleForWritingToURL: url, error: _] - } + ) -> Result, Id>; + # [method_id (fileHandleForUpdatingURL : error :)] pub unsafe fn fileHandleForUpdatingURL_error( url: &NSURL, - ) -> Result, Id> { - msg_send_id![Self::class(), fileHandleForUpdatingURL: url, error: _] - } + ) -> Result, Id>; } ); extern_methods!( #[doc = "NSFileHandleAsynchronousAccess"] unsafe impl NSFileHandle { + # [method (readInBackgroundAndNotifyForModes :)] pub unsafe fn readInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, - ) { - msg_send![self, readInBackgroundAndNotifyForModes: modes] - } - pub unsafe fn readInBackgroundAndNotify(&self) { - msg_send![self, readInBackgroundAndNotify] - } + ); + #[method(readInBackgroundAndNotify)] + pub unsafe fn readInBackgroundAndNotify(&self); + # [method (readToEndOfFileInBackgroundAndNotifyForModes :)] pub unsafe fn readToEndOfFileInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, - ) { - msg_send![self, readToEndOfFileInBackgroundAndNotifyForModes: modes] - } - pub unsafe fn readToEndOfFileInBackgroundAndNotify(&self) { - msg_send![self, readToEndOfFileInBackgroundAndNotify] - } + ); + #[method(readToEndOfFileInBackgroundAndNotify)] + pub unsafe fn readToEndOfFileInBackgroundAndNotify(&self); + # [method (acceptConnectionInBackgroundAndNotifyForModes :)] pub unsafe fn acceptConnectionInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, - ) { - msg_send![self, acceptConnectionInBackgroundAndNotifyForModes: modes] - } - pub unsafe fn acceptConnectionInBackgroundAndNotify(&self) { - msg_send![self, acceptConnectionInBackgroundAndNotify] - } + ); + #[method(acceptConnectionInBackgroundAndNotify)] + pub unsafe fn acceptConnectionInBackgroundAndNotify(&self); + # [method (waitForDataInBackgroundAndNotifyForModes :)] pub unsafe fn waitForDataInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, - ) { - msg_send![self, waitForDataInBackgroundAndNotifyForModes: modes] - } - pub unsafe fn waitForDataInBackgroundAndNotify(&self) { - msg_send![self, waitForDataInBackgroundAndNotify] - } - pub unsafe fn readabilityHandler(&self) -> TodoBlock { - msg_send![self, readabilityHandler] - } - pub unsafe fn setReadabilityHandler(&self, readabilityHandler: TodoBlock) { - msg_send![self, setReadabilityHandler: readabilityHandler] - } - pub unsafe fn writeabilityHandler(&self) -> TodoBlock { - msg_send![self, writeabilityHandler] - } - pub unsafe fn setWriteabilityHandler(&self, writeabilityHandler: TodoBlock) { - msg_send![self, setWriteabilityHandler: writeabilityHandler] - } + ); + #[method(waitForDataInBackgroundAndNotify)] + pub unsafe fn waitForDataInBackgroundAndNotify(&self); + #[method(readabilityHandler)] + pub unsafe fn readabilityHandler(&self) -> TodoBlock; + # [method (setReadabilityHandler :)] + pub unsafe fn setReadabilityHandler(&self, readabilityHandler: TodoBlock); + #[method(writeabilityHandler)] + pub unsafe fn writeabilityHandler(&self) -> TodoBlock; + # [method (setWriteabilityHandler :)] + pub unsafe fn setWriteabilityHandler(&self, writeabilityHandler: TodoBlock); } ); extern_methods!( #[doc = "NSFileHandlePlatformSpecific"] unsafe impl NSFileHandle { - pub unsafe fn initWithFileDescriptor(&self, fd: c_int) -> Id { - msg_send_id![self, initWithFileDescriptor: fd] - } - pub unsafe fn fileDescriptor(&self) -> c_int { - msg_send![self, fileDescriptor] - } + # [method_id (initWithFileDescriptor :)] + pub unsafe fn initWithFileDescriptor(&self, fd: c_int) -> Id; + #[method(fileDescriptor)] + pub unsafe fn fileDescriptor(&self) -> c_int; } ); extern_methods!( unsafe impl NSFileHandle { - pub unsafe fn readDataToEndOfFile(&self) -> Id { - msg_send_id![self, readDataToEndOfFile] - } - pub unsafe fn readDataOfLength(&self, length: NSUInteger) -> Id { - msg_send_id![self, readDataOfLength: length] - } - pub unsafe fn writeData(&self, data: &NSData) { - msg_send![self, writeData: data] - } - pub unsafe fn offsetInFile(&self) -> c_ulonglong { - msg_send![self, offsetInFile] - } - pub unsafe fn seekToEndOfFile(&self) -> c_ulonglong { - msg_send![self, seekToEndOfFile] - } - pub unsafe fn seekToFileOffset(&self, offset: c_ulonglong) { - msg_send![self, seekToFileOffset: offset] - } - pub unsafe fn truncateFileAtOffset(&self, offset: c_ulonglong) { - msg_send![self, truncateFileAtOffset: offset] - } - pub unsafe fn synchronizeFile(&self) { - msg_send![self, synchronizeFile] - } - pub unsafe fn closeFile(&self) { - msg_send![self, closeFile] - } + #[method_id(readDataToEndOfFile)] + pub unsafe fn readDataToEndOfFile(&self) -> Id; + # [method_id (readDataOfLength :)] + pub unsafe fn readDataOfLength(&self, length: NSUInteger) -> Id; + # [method (writeData :)] + pub unsafe fn writeData(&self, data: &NSData); + #[method(offsetInFile)] + pub unsafe fn offsetInFile(&self) -> c_ulonglong; + #[method(seekToEndOfFile)] + pub unsafe fn seekToEndOfFile(&self) -> c_ulonglong; + # [method (seekToFileOffset :)] + pub unsafe fn seekToFileOffset(&self, offset: c_ulonglong); + # [method (truncateFileAtOffset :)] + pub unsafe fn truncateFileAtOffset(&self, offset: c_ulonglong); + #[method(synchronizeFile)] + pub unsafe fn synchronizeFile(&self); + #[method(closeFile)] + pub unsafe fn closeFile(&self); } ); extern_class!( @@ -224,14 +179,11 @@ extern_class!( ); extern_methods!( unsafe impl NSPipe { - pub unsafe fn fileHandleForReading(&self) -> Id { - msg_send_id![self, fileHandleForReading] - } - pub unsafe fn fileHandleForWriting(&self) -> Id { - msg_send_id![self, fileHandleForWriting] - } - pub unsafe fn pipe() -> Id { - msg_send_id![Self::class(), pipe] - } + #[method_id(fileHandleForReading)] + pub unsafe fn fileHandleForReading(&self) -> Id; + #[method_id(fileHandleForWriting)] + pub unsafe fn fileHandleForWriting(&self) -> Id; + #[method_id(pipe)] + pub unsafe fn pipe() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 11207c9b2..116a2af4b 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -17,7 +17,7 @@ use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSFileAttributeKey = NSString; pub type NSFileAttributeType = NSString; pub type NSFileProtectionType = NSString; @@ -31,439 +31,302 @@ extern_class!( ); extern_methods!( unsafe impl NSFileManager { - pub unsafe fn defaultManager() -> Id { - msg_send_id![Self::class(), defaultManager] - } + #[method_id(defaultManager)] + pub unsafe fn defaultManager() -> Id; + # [method_id (mountedVolumeURLsIncludingResourceValuesForKeys : options :)] pub unsafe fn mountedVolumeURLsIncludingResourceValuesForKeys_options( &self, propertyKeys: Option<&NSArray>, options: NSVolumeEnumerationOptions, - ) -> Option, Shared>> { - msg_send_id![ - self, - mountedVolumeURLsIncludingResourceValuesForKeys: propertyKeys, - options: options - ] - } + ) -> Option, Shared>>; + # [method (unmountVolumeAtURL : options : completionHandler :)] pub unsafe fn unmountVolumeAtURL_options_completionHandler( &self, url: &NSURL, mask: NSFileManagerUnmountOptions, completionHandler: TodoBlock, - ) { - msg_send![ - self, - unmountVolumeAtURL: url, - options: mask, - completionHandler: completionHandler - ] - } + ); + # [method_id (contentsOfDirectoryAtURL : includingPropertiesForKeys : options : error :)] pub unsafe fn contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error( &self, url: &NSURL, keys: Option<&NSArray>, mask: NSDirectoryEnumerationOptions, - ) -> Result, Shared>, Id> { - msg_send_id![ - self, - contentsOfDirectoryAtURL: url, - includingPropertiesForKeys: keys, - options: mask, - error: _ - ] - } + ) -> Result, Shared>, Id>; + # [method_id (URLsForDirectory : inDomains :)] pub unsafe fn URLsForDirectory_inDomains( &self, directory: NSSearchPathDirectory, domainMask: NSSearchPathDomainMask, - ) -> Id, Shared> { - msg_send_id![self, URLsForDirectory: directory, inDomains: domainMask] - } + ) -> Id, Shared>; + # [method_id (URLForDirectory : inDomain : appropriateForURL : create : error :)] pub unsafe fn URLForDirectory_inDomain_appropriateForURL_create_error( &self, directory: NSSearchPathDirectory, domain: NSSearchPathDomainMask, url: Option<&NSURL>, shouldCreate: bool, - ) -> Result, Id> { - msg_send_id![ - self, - URLForDirectory: directory, - inDomain: domain, - appropriateForURL: url, - create: shouldCreate, - error: _ - ] - } + ) -> Result, Id>; + # [method (getRelationship : ofDirectoryAtURL : toItemAtURL : error :)] pub unsafe fn getRelationship_ofDirectoryAtURL_toItemAtURL_error( &self, outRelationship: NonNull, directoryURL: &NSURL, otherURL: &NSURL, - ) -> Result<(), Id> { - msg_send![ - self, - getRelationship: outRelationship, - ofDirectoryAtURL: directoryURL, - toItemAtURL: otherURL, - error: _ - ] - } + ) -> Result<(), Id>; + # [method (getRelationship : ofDirectory : inDomain : toItemAtURL : error :)] pub unsafe fn getRelationship_ofDirectory_inDomain_toItemAtURL_error( &self, outRelationship: NonNull, directory: NSSearchPathDirectory, domainMask: NSSearchPathDomainMask, url: &NSURL, - ) -> Result<(), Id> { - msg_send![ - self, - getRelationship: outRelationship, - ofDirectory: directory, - inDomain: domainMask, - toItemAtURL: url, - error: _ - ] - } + ) -> Result<(), Id>; + # [method (createDirectoryAtURL : withIntermediateDirectories : attributes : error :)] pub unsafe fn createDirectoryAtURL_withIntermediateDirectories_attributes_error( &self, url: &NSURL, createIntermediates: bool, attributes: Option<&NSDictionary>, - ) -> Result<(), Id> { - msg_send![ - self, - createDirectoryAtURL: url, - withIntermediateDirectories: createIntermediates, - attributes: attributes, - error: _ - ] - } + ) -> Result<(), Id>; + # [method (createSymbolicLinkAtURL : withDestinationURL : error :)] pub unsafe fn createSymbolicLinkAtURL_withDestinationURL_error( &self, url: &NSURL, destURL: &NSURL, - ) -> Result<(), Id> { - msg_send![ - self, - createSymbolicLinkAtURL: url, - withDestinationURL: destURL, - error: _ - ] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSFileManagerDelegate>) { - msg_send![self, setDelegate: delegate] - } + ) -> Result<(), Id>; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSFileManagerDelegate>); + # [method (setAttributes : ofItemAtPath : error :)] pub unsafe fn setAttributes_ofItemAtPath_error( &self, attributes: &NSDictionary, path: &NSString, - ) -> Result<(), Id> { - msg_send![ - self, - setAttributes: attributes, - ofItemAtPath: path, - error: _ - ] - } + ) -> Result<(), Id>; + # [method (createDirectoryAtPath : withIntermediateDirectories : attributes : error :)] pub unsafe fn createDirectoryAtPath_withIntermediateDirectories_attributes_error( &self, path: &NSString, createIntermediates: bool, attributes: Option<&NSDictionary>, - ) -> Result<(), Id> { - msg_send![ - self, - createDirectoryAtPath: path, - withIntermediateDirectories: createIntermediates, - attributes: attributes, - error: _ - ] - } + ) -> Result<(), Id>; + # [method_id (contentsOfDirectoryAtPath : error :)] pub unsafe fn contentsOfDirectoryAtPath_error( &self, path: &NSString, - ) -> Result, Shared>, Id> { - msg_send_id![self, contentsOfDirectoryAtPath: path, error: _] - } + ) -> Result, Shared>, Id>; + # [method_id (subpathsOfDirectoryAtPath : error :)] pub unsafe fn subpathsOfDirectoryAtPath_error( &self, path: &NSString, - ) -> Result, Shared>, Id> { - msg_send_id![self, subpathsOfDirectoryAtPath: path, error: _] - } + ) -> Result, Shared>, Id>; + # [method_id (attributesOfItemAtPath : error :)] pub unsafe fn attributesOfItemAtPath_error( &self, path: &NSString, - ) -> Result, Shared>, Id> - { - msg_send_id![self, attributesOfItemAtPath: path, error: _] - } + ) -> Result, Shared>, Id>; + # [method_id (attributesOfFileSystemForPath : error :)] pub unsafe fn attributesOfFileSystemForPath_error( &self, path: &NSString, - ) -> Result, Shared>, Id> - { - msg_send_id![self, attributesOfFileSystemForPath: path, error: _] - } + ) -> Result, Shared>, Id>; + # [method (createSymbolicLinkAtPath : withDestinationPath : error :)] pub unsafe fn createSymbolicLinkAtPath_withDestinationPath_error( &self, path: &NSString, destPath: &NSString, - ) -> Result<(), Id> { - msg_send![ - self, - createSymbolicLinkAtPath: path, - withDestinationPath: destPath, - error: _ - ] - } + ) -> Result<(), Id>; + # [method_id (destinationOfSymbolicLinkAtPath : error :)] pub unsafe fn destinationOfSymbolicLinkAtPath_error( &self, path: &NSString, - ) -> Result, Id> { - msg_send_id![self, destinationOfSymbolicLinkAtPath: path, error: _] - } + ) -> Result, Id>; + # [method (copyItemAtPath : toPath : error :)] pub unsafe fn copyItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, - ) -> Result<(), Id> { - msg_send![self, copyItemAtPath: srcPath, toPath: dstPath, error: _] - } + ) -> Result<(), Id>; + # [method (moveItemAtPath : toPath : error :)] pub unsafe fn moveItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, - ) -> Result<(), Id> { - msg_send![self, moveItemAtPath: srcPath, toPath: dstPath, error: _] - } + ) -> Result<(), Id>; + # [method (linkItemAtPath : toPath : error :)] pub unsafe fn linkItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, - ) -> Result<(), Id> { - msg_send![self, linkItemAtPath: srcPath, toPath: dstPath, error: _] - } + ) -> Result<(), Id>; + # [method (removeItemAtPath : error :)] pub unsafe fn removeItemAtPath_error( &self, path: &NSString, - ) -> Result<(), Id> { - msg_send![self, removeItemAtPath: path, error: _] - } + ) -> Result<(), Id>; + # [method (copyItemAtURL : toURL : error :)] pub unsafe fn copyItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, - ) -> Result<(), Id> { - msg_send![self, copyItemAtURL: srcURL, toURL: dstURL, error: _] - } + ) -> Result<(), Id>; + # [method (moveItemAtURL : toURL : error :)] pub unsafe fn moveItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, - ) -> Result<(), Id> { - msg_send![self, moveItemAtURL: srcURL, toURL: dstURL, error: _] - } + ) -> Result<(), Id>; + # [method (linkItemAtURL : toURL : error :)] pub unsafe fn linkItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, - ) -> Result<(), Id> { - msg_send![self, linkItemAtURL: srcURL, toURL: dstURL, error: _] - } - pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL) -> Result<(), Id> { - msg_send![self, removeItemAtURL: URL, error: _] - } + ) -> Result<(), Id>; + # [method (removeItemAtURL : error :)] + pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL) -> Result<(), Id>; + # [method (trashItemAtURL : resultingItemURL : error :)] pub unsafe fn trashItemAtURL_resultingItemURL_error( &self, url: &NSURL, outResultingURL: Option<&mut Option>>, - ) -> Result<(), Id> { - msg_send![ - self, - trashItemAtURL: url, - resultingItemURL: outResultingURL, - error: _ - ] - } + ) -> Result<(), Id>; + # [method_id (fileAttributesAtPath : traverseLink :)] pub unsafe fn fileAttributesAtPath_traverseLink( &self, path: &NSString, yorn: bool, - ) -> Option> { - msg_send_id![self, fileAttributesAtPath: path, traverseLink: yorn] - } + ) -> Option>; + # [method (changeFileAttributes : atPath :)] pub unsafe fn changeFileAttributes_atPath( &self, attributes: &NSDictionary, path: &NSString, - ) -> bool { - msg_send![self, changeFileAttributes: attributes, atPath: path] - } + ) -> bool; + # [method_id (directoryContentsAtPath :)] pub unsafe fn directoryContentsAtPath( &self, path: &NSString, - ) -> Option> { - msg_send_id![self, directoryContentsAtPath: path] - } + ) -> Option>; + # [method_id (fileSystemAttributesAtPath :)] pub unsafe fn fileSystemAttributesAtPath( &self, path: &NSString, - ) -> Option> { - msg_send_id![self, fileSystemAttributesAtPath: path] - } + ) -> Option>; + # [method_id (pathContentOfSymbolicLinkAtPath :)] pub unsafe fn pathContentOfSymbolicLinkAtPath( &self, path: &NSString, - ) -> Option> { - msg_send_id![self, pathContentOfSymbolicLinkAtPath: path] - } + ) -> Option>; + # [method (createSymbolicLinkAtPath : pathContent :)] pub unsafe fn createSymbolicLinkAtPath_pathContent( &self, path: &NSString, otherpath: &NSString, - ) -> bool { - msg_send![self, createSymbolicLinkAtPath: path, pathContent: otherpath] - } + ) -> bool; + # [method (createDirectoryAtPath : attributes :)] pub unsafe fn createDirectoryAtPath_attributes( &self, path: &NSString, attributes: &NSDictionary, - ) -> bool { - msg_send![self, createDirectoryAtPath: path, attributes: attributes] - } + ) -> bool; + # [method (linkPath : toPath : handler :)] pub unsafe fn linkPath_toPath_handler( &self, src: &NSString, dest: &NSString, handler: Option<&Object>, - ) -> bool { - msg_send![self, linkPath: src, toPath: dest, handler: handler] - } + ) -> bool; + # [method (copyPath : toPath : handler :)] pub unsafe fn copyPath_toPath_handler( &self, src: &NSString, dest: &NSString, handler: Option<&Object>, - ) -> bool { - msg_send![self, copyPath: src, toPath: dest, handler: handler] - } + ) -> bool; + # [method (movePath : toPath : handler :)] pub unsafe fn movePath_toPath_handler( &self, src: &NSString, dest: &NSString, handler: Option<&Object>, - ) -> bool { - msg_send![self, movePath: src, toPath: dest, handler: handler] - } + ) -> bool; + # [method (removeFileAtPath : handler :)] pub unsafe fn removeFileAtPath_handler( &self, path: &NSString, handler: Option<&Object>, - ) -> bool { - msg_send![self, removeFileAtPath: path, handler: handler] - } - pub unsafe fn currentDirectoryPath(&self) -> Id { - msg_send_id![self, currentDirectoryPath] - } - pub unsafe fn changeCurrentDirectoryPath(&self, path: &NSString) -> bool { - msg_send![self, changeCurrentDirectoryPath: path] - } - pub unsafe fn fileExistsAtPath(&self, path: &NSString) -> bool { - msg_send![self, fileExistsAtPath: path] - } + ) -> bool; + #[method_id(currentDirectoryPath)] + pub unsafe fn currentDirectoryPath(&self) -> Id; + # [method (changeCurrentDirectoryPath :)] + pub unsafe fn changeCurrentDirectoryPath(&self, path: &NSString) -> bool; + # [method (fileExistsAtPath :)] + pub unsafe fn fileExistsAtPath(&self, path: &NSString) -> bool; + # [method (fileExistsAtPath : isDirectory :)] pub unsafe fn fileExistsAtPath_isDirectory( &self, path: &NSString, isDirectory: *mut bool, - ) -> bool { - msg_send![self, fileExistsAtPath: path, isDirectory: isDirectory] - } - pub unsafe fn isReadableFileAtPath(&self, path: &NSString) -> bool { - msg_send![self, isReadableFileAtPath: path] - } - pub unsafe fn isWritableFileAtPath(&self, path: &NSString) -> bool { - msg_send![self, isWritableFileAtPath: path] - } - pub unsafe fn isExecutableFileAtPath(&self, path: &NSString) -> bool { - msg_send![self, isExecutableFileAtPath: path] - } - pub unsafe fn isDeletableFileAtPath(&self, path: &NSString) -> bool { - msg_send![self, isDeletableFileAtPath: path] - } + ) -> bool; + # [method (isReadableFileAtPath :)] + pub unsafe fn isReadableFileAtPath(&self, path: &NSString) -> bool; + # [method (isWritableFileAtPath :)] + pub unsafe fn isWritableFileAtPath(&self, path: &NSString) -> bool; + # [method (isExecutableFileAtPath :)] + pub unsafe fn isExecutableFileAtPath(&self, path: &NSString) -> bool; + # [method (isDeletableFileAtPath :)] + pub unsafe fn isDeletableFileAtPath(&self, path: &NSString) -> bool; + # [method (contentsEqualAtPath : andPath :)] pub unsafe fn contentsEqualAtPath_andPath( &self, path1: &NSString, path2: &NSString, - ) -> bool { - msg_send![self, contentsEqualAtPath: path1, andPath: path2] - } - pub unsafe fn displayNameAtPath(&self, path: &NSString) -> Id { - msg_send_id![self, displayNameAtPath: path] - } + ) -> bool; + # [method_id (displayNameAtPath :)] + pub unsafe fn displayNameAtPath(&self, path: &NSString) -> Id; + # [method_id (componentsToDisplayForPath :)] pub unsafe fn componentsToDisplayForPath( &self, path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, componentsToDisplayForPath: path] - } + ) -> Option, Shared>>; + # [method_id (enumeratorAtPath :)] pub unsafe fn enumeratorAtPath( &self, path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, enumeratorAtPath: path] - } + ) -> Option, Shared>>; + # [method_id (enumeratorAtURL : includingPropertiesForKeys : options : errorHandler :)] pub unsafe fn enumeratorAtURL_includingPropertiesForKeys_options_errorHandler( &self, url: &NSURL, keys: Option<&NSArray>, mask: NSDirectoryEnumerationOptions, handler: TodoBlock, - ) -> Option, Shared>> { - msg_send_id![ - self, - enumeratorAtURL: url, - includingPropertiesForKeys: keys, - options: mask, - errorHandler: handler - ] - } + ) -> Option, Shared>>; + # [method_id (subpathsAtPath :)] pub unsafe fn subpathsAtPath( &self, path: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, subpathsAtPath: path] - } - pub unsafe fn contentsAtPath(&self, path: &NSString) -> Option> { - msg_send_id![self, contentsAtPath: path] - } + ) -> Option, Shared>>; + # [method_id (contentsAtPath :)] + pub unsafe fn contentsAtPath(&self, path: &NSString) -> Option>; + # [method (createFileAtPath : contents : attributes :)] pub unsafe fn createFileAtPath_contents_attributes( &self, path: &NSString, data: Option<&NSData>, attr: Option<&NSDictionary>, - ) -> bool { - msg_send![ - self, - createFileAtPath: path, - contents: data, - attributes: attr - ] - } - pub unsafe fn fileSystemRepresentationWithPath(&self, path: &NSString) -> NonNull { - msg_send![self, fileSystemRepresentationWithPath: path] - } + ) -> bool; + # [method (fileSystemRepresentationWithPath :)] + pub unsafe fn fileSystemRepresentationWithPath(&self, path: &NSString) -> NonNull; + # [method_id (stringWithFileSystemRepresentation : length :)] pub unsafe fn stringWithFileSystemRepresentation_length( &self, str: NonNull, len: NSUInteger, - ) -> Id { - msg_send_id![self, stringWithFileSystemRepresentation: str, length: len] - } + ) -> Id; + # [method (replaceItemAtURL : withItemAtURL : backupItemName : options : resultingItemURL : error :)] pub unsafe fn replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error( &self, originalItemURL: &NSURL, @@ -471,119 +334,75 @@ extern_methods!( backupItemName: Option<&NSString>, options: NSFileManagerItemReplacementOptions, resultingURL: Option<&mut Option>>, - ) -> Result<(), Id> { - msg_send![ - self, - replaceItemAtURL: originalItemURL, - withItemAtURL: newItemURL, - backupItemName: backupItemName, - options: options, - resultingItemURL: resultingURL, - error: _ - ] - } + ) -> Result<(), Id>; + # [method (setUbiquitous : itemAtURL : destinationURL : error :)] pub unsafe fn setUbiquitous_itemAtURL_destinationURL_error( &self, flag: bool, url: &NSURL, destinationURL: &NSURL, - ) -> Result<(), Id> { - msg_send![ - self, - setUbiquitous: flag, - itemAtURL: url, - destinationURL: destinationURL, - error: _ - ] - } - pub unsafe fn isUbiquitousItemAtURL(&self, url: &NSURL) -> bool { - msg_send![self, isUbiquitousItemAtURL: url] - } + ) -> Result<(), Id>; + # [method (isUbiquitousItemAtURL :)] + pub unsafe fn isUbiquitousItemAtURL(&self, url: &NSURL) -> bool; + # [method (startDownloadingUbiquitousItemAtURL : error :)] pub unsafe fn startDownloadingUbiquitousItemAtURL_error( &self, url: &NSURL, - ) -> Result<(), Id> { - msg_send![self, startDownloadingUbiquitousItemAtURL: url, error: _] - } + ) -> Result<(), Id>; + # [method (evictUbiquitousItemAtURL : error :)] pub unsafe fn evictUbiquitousItemAtURL_error( &self, url: &NSURL, - ) -> Result<(), Id> { - msg_send![self, evictUbiquitousItemAtURL: url, error: _] - } + ) -> Result<(), Id>; + # [method_id (URLForUbiquityContainerIdentifier :)] pub unsafe fn URLForUbiquityContainerIdentifier( &self, containerIdentifier: Option<&NSString>, - ) -> Option> { - msg_send_id![self, URLForUbiquityContainerIdentifier: containerIdentifier] - } + ) -> Option>; + # [method_id (URLForPublishingUbiquitousItemAtURL : expirationDate : error :)] pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( &self, url: &NSURL, outDate: Option<&mut Option>>, - ) -> Result, Id> { - msg_send_id![ - self, - URLForPublishingUbiquitousItemAtURL: url, - expirationDate: outDate, - error: _ - ] - } - pub unsafe fn ubiquityIdentityToken(&self) -> Option> { - msg_send_id![self, ubiquityIdentityToken] - } + ) -> Result, Id>; + #[method_id(ubiquityIdentityToken)] + pub unsafe fn ubiquityIdentityToken(&self) -> Option>; + # [method (getFileProviderServicesForItemAtURL : completionHandler :)] pub unsafe fn getFileProviderServicesForItemAtURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, - ) { - msg_send![ - self, - getFileProviderServicesForItemAtURL: url, - completionHandler: completionHandler - ] - } + ); + # [method_id (containerURLForSecurityApplicationGroupIdentifier :)] pub unsafe fn containerURLForSecurityApplicationGroupIdentifier( &self, groupIdentifier: &NSString, - ) -> Option> { - msg_send_id![ - self, - containerURLForSecurityApplicationGroupIdentifier: groupIdentifier - ] - } + ) -> Option>; } ); extern_methods!( #[doc = "NSUserInformation"] unsafe impl NSFileManager { - pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id { - msg_send_id![self, homeDirectoryForCurrentUser] - } - pub unsafe fn temporaryDirectory(&self) -> Id { - msg_send_id![self, temporaryDirectory] - } - pub unsafe fn homeDirectoryForUser( - &self, - userName: &NSString, - ) -> Option> { - msg_send_id![self, homeDirectoryForUser: userName] - } + #[method_id(homeDirectoryForCurrentUser)] + pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id; + #[method_id(temporaryDirectory)] + pub unsafe fn temporaryDirectory(&self) -> Id; + # [method_id (homeDirectoryForUser :)] + pub unsafe fn homeDirectoryForUser(&self, userName: &NSString) + -> Option>; } ); extern_methods!( #[doc = "NSCopyLinkMoveHandler"] unsafe impl NSObject { + # [method (fileManager : shouldProceedAfterError :)] pub unsafe fn fileManager_shouldProceedAfterError( &self, fm: &NSFileManager, errorInfo: &NSDictionary, - ) -> bool { - msg_send![self, fileManager: fm, shouldProceedAfterError: errorInfo] - } - pub unsafe fn fileManager_willProcessPath(&self, fm: &NSFileManager, path: &NSString) { - msg_send![self, fileManager: fm, willProcessPath: path] - } + ) -> bool; + # [method (fileManager : willProcessPath :)] + pub unsafe fn fileManager_willProcessPath(&self, fm: &NSFileManager, path: &NSString); } ); pub type NSFileManagerDelegate = NSObject; @@ -596,28 +415,22 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSDirectoryEnumerator { + #[method_id(fileAttributes)] pub unsafe fn fileAttributes( &self, - ) -> Option, Shared>> { - msg_send_id![self, fileAttributes] - } + ) -> Option, Shared>>; + #[method_id(directoryAttributes)] pub unsafe fn directoryAttributes( &self, - ) -> Option, Shared>> { - msg_send_id![self, directoryAttributes] - } - pub unsafe fn isEnumeratingDirectoryPostOrder(&self) -> bool { - msg_send![self, isEnumeratingDirectoryPostOrder] - } - pub unsafe fn skipDescendents(&self) { - msg_send![self, skipDescendents] - } - pub unsafe fn level(&self) -> NSUInteger { - msg_send![self, level] - } - pub unsafe fn skipDescendants(&self) { - msg_send![self, skipDescendants] - } + ) -> Option, Shared>>; + #[method(isEnumeratingDirectoryPostOrder)] + pub unsafe fn isEnumeratingDirectoryPostOrder(&self) -> bool; + #[method(skipDescendents)] + pub unsafe fn skipDescendents(&self); + #[method(level)] + pub unsafe fn level(&self) -> NSUInteger; + #[method(skipDescendants)] + pub unsafe fn skipDescendants(&self); } ); extern_class!( @@ -629,70 +442,49 @@ extern_class!( ); extern_methods!( unsafe impl NSFileProviderService { + # [method (getFileProviderConnectionWithCompletionHandler :)] pub unsafe fn getFileProviderConnectionWithCompletionHandler( &self, completionHandler: TodoBlock, - ) { - msg_send![ - self, - getFileProviderConnectionWithCompletionHandler: completionHandler - ] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } + ); + #[method_id(name)] + pub unsafe fn name(&self) -> Id; } ); extern_methods!( #[doc = "NSFileAttributes"] unsafe impl NSDictionary { - pub unsafe fn fileSize(&self) -> c_ulonglong { - msg_send![self, fileSize] - } - pub unsafe fn fileModificationDate(&self) -> Option> { - msg_send_id![self, fileModificationDate] - } - pub unsafe fn fileType(&self) -> Option> { - msg_send_id![self, fileType] - } - pub unsafe fn filePosixPermissions(&self) -> NSUInteger { - msg_send![self, filePosixPermissions] - } - pub unsafe fn fileOwnerAccountName(&self) -> Option> { - msg_send_id![self, fileOwnerAccountName] - } - pub unsafe fn fileGroupOwnerAccountName(&self) -> Option> { - msg_send_id![self, fileGroupOwnerAccountName] - } - pub unsafe fn fileSystemNumber(&self) -> NSInteger { - msg_send![self, fileSystemNumber] - } - pub unsafe fn fileSystemFileNumber(&self) -> NSUInteger { - msg_send![self, fileSystemFileNumber] - } - pub unsafe fn fileExtensionHidden(&self) -> bool { - msg_send![self, fileExtensionHidden] - } - pub unsafe fn fileHFSCreatorCode(&self) -> OSType { - msg_send![self, fileHFSCreatorCode] - } - pub unsafe fn fileHFSTypeCode(&self) -> OSType { - msg_send![self, fileHFSTypeCode] - } - pub unsafe fn fileIsImmutable(&self) -> bool { - msg_send![self, fileIsImmutable] - } - pub unsafe fn fileIsAppendOnly(&self) -> bool { - msg_send![self, fileIsAppendOnly] - } - pub unsafe fn fileCreationDate(&self) -> Option> { - msg_send_id![self, fileCreationDate] - } - pub unsafe fn fileOwnerAccountID(&self) -> Option> { - msg_send_id![self, fileOwnerAccountID] - } - pub unsafe fn fileGroupOwnerAccountID(&self) -> Option> { - msg_send_id![self, fileGroupOwnerAccountID] - } + #[method(fileSize)] + pub unsafe fn fileSize(&self) -> c_ulonglong; + #[method_id(fileModificationDate)] + pub unsafe fn fileModificationDate(&self) -> Option>; + #[method_id(fileType)] + pub unsafe fn fileType(&self) -> Option>; + #[method(filePosixPermissions)] + pub unsafe fn filePosixPermissions(&self) -> NSUInteger; + #[method_id(fileOwnerAccountName)] + pub unsafe fn fileOwnerAccountName(&self) -> Option>; + #[method_id(fileGroupOwnerAccountName)] + pub unsafe fn fileGroupOwnerAccountName(&self) -> Option>; + #[method(fileSystemNumber)] + pub unsafe fn fileSystemNumber(&self) -> NSInteger; + #[method(fileSystemFileNumber)] + pub unsafe fn fileSystemFileNumber(&self) -> NSUInteger; + #[method(fileExtensionHidden)] + pub unsafe fn fileExtensionHidden(&self) -> bool; + #[method(fileHFSCreatorCode)] + pub unsafe fn fileHFSCreatorCode(&self) -> OSType; + #[method(fileHFSTypeCode)] + pub unsafe fn fileHFSTypeCode(&self) -> OSType; + #[method(fileIsImmutable)] + pub unsafe fn fileIsImmutable(&self) -> bool; + #[method(fileIsAppendOnly)] + pub unsafe fn fileIsAppendOnly(&self) -> bool; + #[method_id(fileCreationDate)] + pub unsafe fn fileCreationDate(&self) -> Option>; + #[method_id(fileOwnerAccountID)] + pub unsafe fn fileOwnerAccountID(&self) -> Option>; + #[method_id(fileGroupOwnerAccountID)] + pub unsafe fn fileGroupOwnerAccountID(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs index 84aba91c0..65db8e4fd 100644 --- a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs +++ b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs @@ -7,5 +7,5 @@ use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSFilePresenter = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index b48f7e8c8..eb183b7a0 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSFileVersion; @@ -19,115 +19,74 @@ extern_class!( ); extern_methods!( unsafe impl NSFileVersion { - pub unsafe fn currentVersionOfItemAtURL(url: &NSURL) -> Option> { - msg_send_id![Self::class(), currentVersionOfItemAtURL: url] - } + # [method_id (currentVersionOfItemAtURL :)] + pub unsafe fn currentVersionOfItemAtURL(url: &NSURL) -> Option>; + # [method_id (otherVersionsOfItemAtURL :)] pub unsafe fn otherVersionsOfItemAtURL( url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), otherVersionsOfItemAtURL: url] - } + ) -> Option, Shared>>; + # [method_id (unresolvedConflictVersionsOfItemAtURL :)] pub unsafe fn unresolvedConflictVersionsOfItemAtURL( url: &NSURL, - ) -> Option, Shared>> { - msg_send_id![Self::class(), unresolvedConflictVersionsOfItemAtURL: url] - } + ) -> Option, Shared>>; + # [method (getNonlocalVersionsOfItemAtURL : completionHandler :)] pub unsafe fn getNonlocalVersionsOfItemAtURL_completionHandler( url: &NSURL, completionHandler: TodoBlock, - ) { - msg_send![ - Self::class(), - getNonlocalVersionsOfItemAtURL: url, - completionHandler: completionHandler - ] - } + ); + # [method_id (versionOfItemAtURL : forPersistentIdentifier :)] pub unsafe fn versionOfItemAtURL_forPersistentIdentifier( url: &NSURL, persistentIdentifier: &Object, - ) -> Option> { - msg_send_id![ - Self::class(), - versionOfItemAtURL: url, - forPersistentIdentifier: persistentIdentifier - ] - } + ) -> Option>; + # [method_id (addVersionOfItemAtURL : withContentsOfURL : options : error :)] pub unsafe fn addVersionOfItemAtURL_withContentsOfURL_options_error( url: &NSURL, contentsURL: &NSURL, options: NSFileVersionAddingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - addVersionOfItemAtURL: url, - withContentsOfURL: contentsURL, - options: options, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (temporaryDirectoryURLForNewVersionOfItemAtURL :)] pub unsafe fn temporaryDirectoryURLForNewVersionOfItemAtURL( url: &NSURL, - ) -> Id { - msg_send_id![ - Self::class(), - temporaryDirectoryURLForNewVersionOfItemAtURL: url - ] - } - pub unsafe fn URL(&self) -> Id { - msg_send_id![self, URL] - } - pub unsafe fn localizedName(&self) -> Option> { - msg_send_id![self, localizedName] - } - pub unsafe fn localizedNameOfSavingComputer(&self) -> Option> { - msg_send_id![self, localizedNameOfSavingComputer] - } - pub unsafe fn originatorNameComponents( - &self, - ) -> Option> { - msg_send_id![self, originatorNameComponents] - } - pub unsafe fn modificationDate(&self) -> Option> { - msg_send_id![self, modificationDate] - } - pub unsafe fn persistentIdentifier(&self) -> Id { - msg_send_id![self, persistentIdentifier] - } - pub unsafe fn isConflict(&self) -> bool { - msg_send![self, isConflict] - } - pub unsafe fn isResolved(&self) -> bool { - msg_send![self, isResolved] - } - pub unsafe fn setResolved(&self, resolved: bool) { - msg_send![self, setResolved: resolved] - } - pub unsafe fn isDiscardable(&self) -> bool { - msg_send![self, isDiscardable] - } - pub unsafe fn setDiscardable(&self, discardable: bool) { - msg_send![self, setDiscardable: discardable] - } - pub unsafe fn hasLocalContents(&self) -> bool { - msg_send![self, hasLocalContents] - } - pub unsafe fn hasThumbnail(&self) -> bool { - msg_send![self, hasThumbnail] - } + ) -> Id; + #[method_id(URL)] + pub unsafe fn URL(&self) -> Id; + #[method_id(localizedName)] + pub unsafe fn localizedName(&self) -> Option>; + #[method_id(localizedNameOfSavingComputer)] + pub unsafe fn localizedNameOfSavingComputer(&self) -> Option>; + #[method_id(originatorNameComponents)] + pub unsafe fn originatorNameComponents(&self) + -> Option>; + #[method_id(modificationDate)] + pub unsafe fn modificationDate(&self) -> Option>; + #[method_id(persistentIdentifier)] + pub unsafe fn persistentIdentifier(&self) -> Id; + #[method(isConflict)] + pub unsafe fn isConflict(&self) -> bool; + #[method(isResolved)] + pub unsafe fn isResolved(&self) -> bool; + # [method (setResolved :)] + pub unsafe fn setResolved(&self, resolved: bool); + #[method(isDiscardable)] + pub unsafe fn isDiscardable(&self) -> bool; + # [method (setDiscardable :)] + pub unsafe fn setDiscardable(&self, discardable: bool); + #[method(hasLocalContents)] + pub unsafe fn hasLocalContents(&self) -> bool; + #[method(hasThumbnail)] + pub unsafe fn hasThumbnail(&self) -> bool; + # [method_id (replaceItemAtURL : options : error :)] pub unsafe fn replaceItemAtURL_options_error( &self, url: &NSURL, options: NSFileVersionReplacingOptions, - ) -> Result, Id> { - msg_send_id![self, replaceItemAtURL: url, options: options, error: _] - } - pub unsafe fn removeAndReturnError(&self) -> Result<(), Id> { - msg_send![self, removeAndReturnError: _] - } + ) -> Result, Id>; + # [method (removeAndReturnError :)] + pub unsafe fn removeAndReturnError(&self) -> Result<(), Id>; + # [method (removeOtherVersionsOfItemAtURL : error :)] pub unsafe fn removeOtherVersionsOfItemAtURL_error( url: &NSURL, - ) -> Result<(), Id> { - msg_send![Self::class(), removeOtherVersionsOfItemAtURL: url, error: _] - } + ) -> Result<(), Id>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index d0f2e665f..3d27c1798 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSFileWrapper; @@ -17,174 +17,116 @@ extern_class!( ); extern_methods!( unsafe impl NSFileWrapper { + # [method_id (initWithURL : options : error :)] pub unsafe fn initWithURL_options_error( &self, url: &NSURL, options: NSFileWrapperReadingOptions, - ) -> Result, Id> { - msg_send_id![self, initWithURL: url, options: options, error: _] - } + ) -> Result, Id>; + # [method_id (initDirectoryWithFileWrappers :)] pub unsafe fn initDirectoryWithFileWrappers( &self, childrenByPreferredName: &NSDictionary, - ) -> Id { - msg_send_id![self, initDirectoryWithFileWrappers: childrenByPreferredName] - } - pub unsafe fn initRegularFileWithContents(&self, contents: &NSData) -> Id { - msg_send_id![self, initRegularFileWithContents: contents] - } - pub unsafe fn initSymbolicLinkWithDestinationURL(&self, url: &NSURL) -> Id { - msg_send_id![self, initSymbolicLinkWithDestinationURL: url] - } + ) -> Id; + # [method_id (initRegularFileWithContents :)] + pub unsafe fn initRegularFileWithContents(&self, contents: &NSData) -> Id; + # [method_id (initSymbolicLinkWithDestinationURL :)] + pub unsafe fn initSymbolicLinkWithDestinationURL(&self, url: &NSURL) -> Id; + # [method_id (initWithSerializedRepresentation :)] pub unsafe fn initWithSerializedRepresentation( &self, serializeRepresentation: &NSData, - ) -> Option> { - msg_send_id![ - self, - initWithSerializedRepresentation: serializeRepresentation - ] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn isDirectory(&self) -> bool { - msg_send![self, isDirectory] - } - pub unsafe fn isRegularFile(&self) -> bool { - msg_send![self, isRegularFile] - } - pub unsafe fn isSymbolicLink(&self) -> bool { - msg_send![self, isSymbolicLink] - } - pub unsafe fn preferredFilename(&self) -> Option> { - msg_send_id![self, preferredFilename] - } - pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>) { - msg_send![self, setPreferredFilename: preferredFilename] - } - pub unsafe fn filename(&self) -> Option> { - msg_send_id![self, filename] - } - pub unsafe fn setFilename(&self, filename: Option<&NSString>) { - msg_send![self, setFilename: filename] - } - pub unsafe fn fileAttributes(&self) -> Id, Shared> { - msg_send_id![self, fileAttributes] - } - pub unsafe fn setFileAttributes(&self, fileAttributes: &NSDictionary) { - msg_send![self, setFileAttributes: fileAttributes] - } - pub unsafe fn matchesContentsOfURL(&self, url: &NSURL) -> bool { - msg_send![self, matchesContentsOfURL: url] - } + ) -> Option>; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method(isDirectory)] + pub unsafe fn isDirectory(&self) -> bool; + #[method(isRegularFile)] + pub unsafe fn isRegularFile(&self) -> bool; + #[method(isSymbolicLink)] + pub unsafe fn isSymbolicLink(&self) -> bool; + #[method_id(preferredFilename)] + pub unsafe fn preferredFilename(&self) -> Option>; + # [method (setPreferredFilename :)] + pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>); + #[method_id(filename)] + pub unsafe fn filename(&self) -> Option>; + # [method (setFilename :)] + pub unsafe fn setFilename(&self, filename: Option<&NSString>); + #[method_id(fileAttributes)] + pub unsafe fn fileAttributes(&self) -> Id, Shared>; + # [method (setFileAttributes :)] + pub unsafe fn setFileAttributes(&self, fileAttributes: &NSDictionary); + # [method (matchesContentsOfURL :)] + pub unsafe fn matchesContentsOfURL(&self, url: &NSURL) -> bool; + # [method (readFromURL : options : error :)] pub unsafe fn readFromURL_options_error( &self, url: &NSURL, options: NSFileWrapperReadingOptions, - ) -> Result<(), Id> { - msg_send![self, readFromURL: url, options: options, error: _] - } + ) -> Result<(), Id>; + # [method (writeToURL : options : originalContentsURL : error :)] pub unsafe fn writeToURL_options_originalContentsURL_error( &self, url: &NSURL, options: NSFileWrapperWritingOptions, originalContentsURL: Option<&NSURL>, - ) -> Result<(), Id> { - msg_send![ - self, - writeToURL: url, - options: options, - originalContentsURL: originalContentsURL, - error: _ - ] - } - pub unsafe fn serializedRepresentation(&self) -> Option> { - msg_send_id![self, serializedRepresentation] - } - pub unsafe fn addFileWrapper(&self, child: &NSFileWrapper) -> Id { - msg_send_id![self, addFileWrapper: child] - } + ) -> Result<(), Id>; + #[method_id(serializedRepresentation)] + pub unsafe fn serializedRepresentation(&self) -> Option>; + # [method_id (addFileWrapper :)] + pub unsafe fn addFileWrapper(&self, child: &NSFileWrapper) -> Id; + # [method_id (addRegularFileWithContents : preferredFilename :)] pub unsafe fn addRegularFileWithContents_preferredFilename( &self, data: &NSData, fileName: &NSString, - ) -> Id { - msg_send_id![ - self, - addRegularFileWithContents: data, - preferredFilename: fileName - ] - } - pub unsafe fn removeFileWrapper(&self, child: &NSFileWrapper) { - msg_send![self, removeFileWrapper: child] - } + ) -> Id; + # [method (removeFileWrapper :)] + pub unsafe fn removeFileWrapper(&self, child: &NSFileWrapper); + #[method_id(fileWrappers)] pub unsafe fn fileWrappers( &self, - ) -> Option, Shared>> { - msg_send_id![self, fileWrappers] - } + ) -> Option, Shared>>; + # [method_id (keyForFileWrapper :)] pub unsafe fn keyForFileWrapper( &self, child: &NSFileWrapper, - ) -> Option> { - msg_send_id![self, keyForFileWrapper: child] - } - pub unsafe fn regularFileContents(&self) -> Option> { - msg_send_id![self, regularFileContents] - } - pub unsafe fn symbolicLinkDestinationURL(&self) -> Option> { - msg_send_id![self, symbolicLinkDestinationURL] - } + ) -> Option>; + #[method_id(regularFileContents)] + pub unsafe fn regularFileContents(&self) -> Option>; + #[method_id(symbolicLinkDestinationURL)] + pub unsafe fn symbolicLinkDestinationURL(&self) -> Option>; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSFileWrapper { - pub unsafe fn initWithPath(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithPath: path] - } - pub unsafe fn initSymbolicLinkWithDestination( - &self, - path: &NSString, - ) -> Id { - msg_send_id![self, initSymbolicLinkWithDestination: path] - } - pub unsafe fn needsToBeUpdatedFromPath(&self, path: &NSString) -> bool { - msg_send![self, needsToBeUpdatedFromPath: path] - } - pub unsafe fn updateFromPath(&self, path: &NSString) -> bool { - msg_send![self, updateFromPath: path] - } + # [method_id (initWithPath :)] + pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; + # [method_id (initSymbolicLinkWithDestination :)] + pub unsafe fn initSymbolicLinkWithDestination(&self, path: &NSString) + -> Id; + # [method (needsToBeUpdatedFromPath :)] + pub unsafe fn needsToBeUpdatedFromPath(&self, path: &NSString) -> bool; + # [method (updateFromPath :)] + pub unsafe fn updateFromPath(&self, path: &NSString) -> bool; + # [method (writeToFile : atomically : updateFilenames :)] pub unsafe fn writeToFile_atomically_updateFilenames( &self, path: &NSString, atomicFlag: bool, updateFilenamesFlag: bool, - ) -> bool { - msg_send![ - self, - writeToFile: path, - atomically: atomicFlag, - updateFilenames: updateFilenamesFlag - ] - } - pub unsafe fn addFileWithPath(&self, path: &NSString) -> Id { - msg_send_id![self, addFileWithPath: path] - } + ) -> bool; + # [method_id (addFileWithPath :)] + pub unsafe fn addFileWithPath(&self, path: &NSString) -> Id; + # [method_id (addSymbolicLinkWithDestination : preferredFilename :)] pub unsafe fn addSymbolicLinkWithDestination_preferredFilename( &self, path: &NSString, filename: &NSString, - ) -> Id { - msg_send_id![ - self, - addSymbolicLinkWithDestination: path, - preferredFilename: filename - ] - } - pub unsafe fn symbolicLinkDestination(&self) -> Id { - msg_send_id![self, symbolicLinkDestination] - } + ) -> Id; + #[method_id(symbolicLinkDestination)] + pub unsafe fn symbolicLinkDestination(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index 44215812a..b01e49750 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSFormatter; @@ -17,55 +17,37 @@ extern_class!( ); extern_methods!( unsafe impl NSFormatter { + # [method_id (stringForObjectValue :)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] - } + ) -> Option>; + # [method_id (attributedStringForObjectValue : withDefaultAttributes :)] pub unsafe fn attributedStringForObjectValue_withDefaultAttributes( &self, obj: &Object, attrs: Option<&NSDictionary>, - ) -> Option> { - msg_send_id![ - self, - attributedStringForObjectValue: obj, - withDefaultAttributes: attrs - ] - } + ) -> Option>; + # [method_id (editingStringForObjectValue :)] pub unsafe fn editingStringForObjectValue( &self, obj: &Object, - ) -> Option> { - msg_send_id![self, editingStringForObjectValue: obj] - } + ) -> Option>; + # [method (getObjectValue : forString : errorDescription :)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, string: &NSString, error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } + ) -> bool; + # [method (isPartialStringValid : newEditingString : errorDescription :)] pub unsafe fn isPartialStringValid_newEditingString_errorDescription( &self, partialString: &NSString, newString: Option<&mut Option>>, error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - isPartialStringValid: partialString, - newEditingString: newString, - errorDescription: error - ] - } + ) -> bool; + # [method (isPartialStringValid : proposedSelectedRange : originalString : originalSelectedRange : errorDescription :)] pub unsafe fn isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription( &self, partialStringPtr: &mut Id, @@ -73,15 +55,6 @@ extern_methods!( origString: &NSString, origSelRange: NSRange, error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - isPartialStringValid: partialStringPtr, - proposedSelectedRange: proposedSelRangePtr, - originalString: origString, - originalSelectedRange: origSelRange, - errorDescription: error - ] - } + ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs index ff664530b..0c092f5b1 100644 --- a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSGarbageCollector; @@ -12,35 +12,25 @@ extern_class!( ); extern_methods!( unsafe impl NSGarbageCollector { - pub unsafe fn defaultCollector() -> Id { - msg_send_id![Self::class(), defaultCollector] - } - pub unsafe fn isCollecting(&self) -> bool { - msg_send![self, isCollecting] - } - pub unsafe fn disable(&self) { - msg_send![self, disable] - } - pub unsafe fn enable(&self) { - msg_send![self, enable] - } - pub unsafe fn isEnabled(&self) -> bool { - msg_send![self, isEnabled] - } - pub unsafe fn collectIfNeeded(&self) { - msg_send![self, collectIfNeeded] - } - pub unsafe fn collectExhaustively(&self) { - msg_send![self, collectExhaustively] - } - pub unsafe fn disableCollectorForPointer(&self, ptr: NonNull) { - msg_send![self, disableCollectorForPointer: ptr] - } - pub unsafe fn enableCollectorForPointer(&self, ptr: NonNull) { - msg_send![self, enableCollectorForPointer: ptr] - } - pub unsafe fn zone(&self) -> NonNull { - msg_send![self, zone] - } + #[method_id(defaultCollector)] + pub unsafe fn defaultCollector() -> Id; + #[method(isCollecting)] + pub unsafe fn isCollecting(&self) -> bool; + #[method(disable)] + pub unsafe fn disable(&self); + #[method(enable)] + pub unsafe fn enable(&self); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(collectIfNeeded)] + pub unsafe fn collectIfNeeded(&self); + #[method(collectExhaustively)] + pub unsafe fn collectExhaustively(&self); + # [method (disableCollectorForPointer :)] + pub unsafe fn disableCollectorForPointer(&self, ptr: NonNull); + # [method (enableCollectorForPointer :)] + pub unsafe fn enableCollectorForPointer(&self, ptr: NonNull); + #[method(zone)] + pub unsafe fn zone(&self) -> NonNull; } ); diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 2d77b74ad..7c8b1515e 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSPoint = CGPoint; pub type NSSize = CGSize; pub type NSRect = CGRect; @@ -13,75 +13,55 @@ use super::__exported::NSString; extern_methods!( #[doc = "NSValueGeometryExtensions"] unsafe impl NSValue { - pub unsafe fn valueWithPoint(point: NSPoint) -> Id { - msg_send_id![Self::class(), valueWithPoint: point] - } - pub unsafe fn valueWithSize(size: NSSize) -> Id { - msg_send_id![Self::class(), valueWithSize: size] - } - pub unsafe fn valueWithRect(rect: NSRect) -> Id { - msg_send_id![Self::class(), valueWithRect: rect] - } - pub unsafe fn valueWithEdgeInsets(insets: NSEdgeInsets) -> Id { - msg_send_id![Self::class(), valueWithEdgeInsets: insets] - } - pub unsafe fn pointValue(&self) -> NSPoint { - msg_send![self, pointValue] - } - pub unsafe fn sizeValue(&self) -> NSSize { - msg_send![self, sizeValue] - } - pub unsafe fn rectValue(&self) -> NSRect { - msg_send![self, rectValue] - } - pub unsafe fn edgeInsetsValue(&self) -> NSEdgeInsets { - msg_send![self, edgeInsetsValue] - } + # [method_id (valueWithPoint :)] + pub unsafe fn valueWithPoint(point: NSPoint) -> Id; + # [method_id (valueWithSize :)] + pub unsafe fn valueWithSize(size: NSSize) -> Id; + # [method_id (valueWithRect :)] + pub unsafe fn valueWithRect(rect: NSRect) -> Id; + # [method_id (valueWithEdgeInsets :)] + pub unsafe fn valueWithEdgeInsets(insets: NSEdgeInsets) -> Id; + #[method(pointValue)] + pub unsafe fn pointValue(&self) -> NSPoint; + #[method(sizeValue)] + pub unsafe fn sizeValue(&self) -> NSSize; + #[method(rectValue)] + pub unsafe fn rectValue(&self) -> NSRect; + #[method(edgeInsetsValue)] + pub unsafe fn edgeInsetsValue(&self) -> NSEdgeInsets; } ); extern_methods!( #[doc = "NSGeometryCoding"] unsafe impl NSCoder { - pub unsafe fn encodePoint(&self, point: NSPoint) { - msg_send![self, encodePoint: point] - } - pub unsafe fn decodePoint(&self) -> NSPoint { - msg_send![self, decodePoint] - } - pub unsafe fn encodeSize(&self, size: NSSize) { - msg_send![self, encodeSize: size] - } - pub unsafe fn decodeSize(&self) -> NSSize { - msg_send![self, decodeSize] - } - pub unsafe fn encodeRect(&self, rect: NSRect) { - msg_send![self, encodeRect: rect] - } - pub unsafe fn decodeRect(&self) -> NSRect { - msg_send![self, decodeRect] - } + # [method (encodePoint :)] + pub unsafe fn encodePoint(&self, point: NSPoint); + #[method(decodePoint)] + pub unsafe fn decodePoint(&self) -> NSPoint; + # [method (encodeSize :)] + pub unsafe fn encodeSize(&self, size: NSSize); + #[method(decodeSize)] + pub unsafe fn decodeSize(&self) -> NSSize; + # [method (encodeRect :)] + pub unsafe fn encodeRect(&self, rect: NSRect); + #[method(decodeRect)] + pub unsafe fn decodeRect(&self) -> NSRect; } ); extern_methods!( #[doc = "NSGeometryKeyedCoding"] unsafe impl NSCoder { - pub unsafe fn encodePoint_forKey(&self, point: NSPoint, key: &NSString) { - msg_send![self, encodePoint: point, forKey: key] - } - pub unsafe fn encodeSize_forKey(&self, size: NSSize, key: &NSString) { - msg_send![self, encodeSize: size, forKey: key] - } - pub unsafe fn encodeRect_forKey(&self, rect: NSRect, key: &NSString) { - msg_send![self, encodeRect: rect, forKey: key] - } - pub unsafe fn decodePointForKey(&self, key: &NSString) -> NSPoint { - msg_send![self, decodePointForKey: key] - } - pub unsafe fn decodeSizeForKey(&self, key: &NSString) -> NSSize { - msg_send![self, decodeSizeForKey: key] - } - pub unsafe fn decodeRectForKey(&self, key: &NSString) -> NSRect { - msg_send![self, decodeRectForKey: key] - } + # [method (encodePoint : forKey :)] + pub unsafe fn encodePoint_forKey(&self, point: NSPoint, key: &NSString); + # [method (encodeSize : forKey :)] + pub unsafe fn encodeSize_forKey(&self, size: NSSize, key: &NSString); + # [method (encodeRect : forKey :)] + pub unsafe fn encodeRect_forKey(&self, rect: NSRect, key: &NSString); + # [method (decodePointForKey :)] + pub unsafe fn decodePointForKey(&self, key: &NSString) -> NSPoint; + # [method (decodeSizeForKey :)] + pub unsafe fn decodeSizeForKey(&self, key: &NSString) -> NSSize; + # [method (decodeRectForKey :)] + pub unsafe fn decodeRectForKey(&self, key: &NSString) -> NSRect; } ); diff --git a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs index 3df022269..d7522e9d6 100644 --- a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs +++ b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs @@ -4,4 +4,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index 859f2fae5..b9a136118 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSHTTPCookiePropertyKey = NSString; pub type NSHTTPCookieStringPolicy = NSString; use super::__exported::NSHTTPCookieInternal; @@ -21,75 +21,53 @@ extern_class!( ); extern_methods!( unsafe impl NSHTTPCookie { + # [method_id (initWithProperties :)] pub unsafe fn initWithProperties( &self, properties: &NSDictionary, - ) -> Option> { - msg_send_id![self, initWithProperties: properties] - } + ) -> Option>; + # [method_id (cookieWithProperties :)] pub unsafe fn cookieWithProperties( properties: &NSDictionary, - ) -> Option> { - msg_send_id![Self::class(), cookieWithProperties: properties] - } + ) -> Option>; + # [method_id (requestHeaderFieldsWithCookies :)] pub unsafe fn requestHeaderFieldsWithCookies( cookies: &NSArray, - ) -> Id, Shared> { - msg_send_id![Self::class(), requestHeaderFieldsWithCookies: cookies] - } + ) -> Id, Shared>; + # [method_id (cookiesWithResponseHeaderFields : forURL :)] pub unsafe fn cookiesWithResponseHeaderFields_forURL( headerFields: &NSDictionary, URL: &NSURL, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - cookiesWithResponseHeaderFields: headerFields, - forURL: URL - ] - } + ) -> Id, Shared>; + #[method_id(properties)] pub unsafe fn properties( &self, - ) -> Option, Shared>> { - msg_send_id![self, properties] - } - pub unsafe fn version(&self) -> NSUInteger { - msg_send![self, version] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn value(&self) -> Id { - msg_send_id![self, value] - } - pub unsafe fn expiresDate(&self) -> Option> { - msg_send_id![self, expiresDate] - } - pub unsafe fn isSessionOnly(&self) -> bool { - msg_send![self, isSessionOnly] - } - pub unsafe fn domain(&self) -> Id { - msg_send_id![self, domain] - } - pub unsafe fn path(&self) -> Id { - msg_send_id![self, path] - } - pub unsafe fn isSecure(&self) -> bool { - msg_send![self, isSecure] - } - pub unsafe fn isHTTPOnly(&self) -> bool { - msg_send![self, isHTTPOnly] - } - pub unsafe fn comment(&self) -> Option> { - msg_send_id![self, comment] - } - pub unsafe fn commentURL(&self) -> Option> { - msg_send_id![self, commentURL] - } - pub unsafe fn portList(&self) -> Option, Shared>> { - msg_send_id![self, portList] - } - pub unsafe fn sameSitePolicy(&self) -> Option> { - msg_send_id![self, sameSitePolicy] - } + ) -> Option, Shared>>; + #[method(version)] + pub unsafe fn version(&self) -> NSUInteger; + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method_id(value)] + pub unsafe fn value(&self) -> Id; + #[method_id(expiresDate)] + pub unsafe fn expiresDate(&self) -> Option>; + #[method(isSessionOnly)] + pub unsafe fn isSessionOnly(&self) -> bool; + #[method_id(domain)] + pub unsafe fn domain(&self) -> Id; + #[method_id(path)] + pub unsafe fn path(&self) -> Id; + #[method(isSecure)] + pub unsafe fn isSecure(&self) -> bool; + #[method(isHTTPOnly)] + pub unsafe fn isHTTPOnly(&self) -> bool; + #[method_id(comment)] + pub unsafe fn comment(&self) -> Option>; + #[method_id(commentURL)] + pub unsafe fn commentURL(&self) -> Option>; + #[method_id(portList)] + pub unsafe fn portList(&self) -> Option, Shared>>; + #[method_id(sameSitePolicy)] + pub unsafe fn sameSitePolicy(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index 0b41795e1..aea6e31dd 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSHTTPCookieStorage; @@ -20,82 +20,57 @@ extern_class!( ); extern_methods!( unsafe impl NSHTTPCookieStorage { - pub unsafe fn sharedHTTPCookieStorage() -> Id { - msg_send_id![Self::class(), sharedHTTPCookieStorage] - } + #[method_id(sharedHTTPCookieStorage)] + pub unsafe fn sharedHTTPCookieStorage() -> Id; + # [method_id (sharedCookieStorageForGroupContainerIdentifier :)] pub unsafe fn sharedCookieStorageForGroupContainerIdentifier( identifier: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - sharedCookieStorageForGroupContainerIdentifier: identifier - ] - } - pub unsafe fn cookies(&self) -> Option, Shared>> { - msg_send_id![self, cookies] - } - pub unsafe fn setCookie(&self, cookie: &NSHTTPCookie) { - msg_send![self, setCookie: cookie] - } - pub unsafe fn deleteCookie(&self, cookie: &NSHTTPCookie) { - msg_send![self, deleteCookie: cookie] - } - pub unsafe fn removeCookiesSinceDate(&self, date: &NSDate) { - msg_send![self, removeCookiesSinceDate: date] - } + ) -> Id; + #[method_id(cookies)] + pub unsafe fn cookies(&self) -> Option, Shared>>; + # [method (setCookie :)] + pub unsafe fn setCookie(&self, cookie: &NSHTTPCookie); + # [method (deleteCookie :)] + pub unsafe fn deleteCookie(&self, cookie: &NSHTTPCookie); + # [method (removeCookiesSinceDate :)] + pub unsafe fn removeCookiesSinceDate(&self, date: &NSDate); + # [method_id (cookiesForURL :)] pub unsafe fn cookiesForURL( &self, URL: &NSURL, - ) -> Option, Shared>> { - msg_send_id![self, cookiesForURL: URL] - } + ) -> Option, Shared>>; + # [method (setCookies : forURL : mainDocumentURL :)] pub unsafe fn setCookies_forURL_mainDocumentURL( &self, cookies: &NSArray, URL: Option<&NSURL>, mainDocumentURL: Option<&NSURL>, - ) { - msg_send![ - self, - setCookies: cookies, - forURL: URL, - mainDocumentURL: mainDocumentURL - ] - } - pub unsafe fn cookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy { - msg_send![self, cookieAcceptPolicy] - } - pub unsafe fn setCookieAcceptPolicy(&self, cookieAcceptPolicy: NSHTTPCookieAcceptPolicy) { - msg_send![self, setCookieAcceptPolicy: cookieAcceptPolicy] - } + ); + #[method(cookieAcceptPolicy)] + pub unsafe fn cookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy; + # [method (setCookieAcceptPolicy :)] + pub unsafe fn setCookieAcceptPolicy(&self, cookieAcceptPolicy: NSHTTPCookieAcceptPolicy); + # [method_id (sortedCookiesUsingDescriptors :)] pub unsafe fn sortedCookiesUsingDescriptors( &self, sortOrder: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, sortedCookiesUsingDescriptors: sortOrder] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSURLSessionTaskAdditions"] unsafe impl NSHTTPCookieStorage { + # [method (storeCookies : forTask :)] pub unsafe fn storeCookies_forTask( &self, cookies: &NSArray, task: &NSURLSessionTask, - ) { - msg_send![self, storeCookies: cookies, forTask: task] - } + ); + # [method (getCookiesForTask : completionHandler :)] pub unsafe fn getCookiesForTask_completionHandler( &self, task: &NSURLSessionTask, completionHandler: TodoBlock, - ) { - msg_send![ - self, - getCookiesForTask: task, - completionHandler: completionHandler - ] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index ecbeaf0d9..9125844e0 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSHashTableOptions = NSUInteger; __inner_extern_class!( #[derive(Debug)] @@ -17,85 +17,59 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSHashTable { + # [method_id (initWithOptions : capacity :)] pub unsafe fn initWithOptions_capacity( &self, options: NSPointerFunctionsOptions, initialCapacity: NSUInteger, - ) -> Id { - msg_send_id![self, initWithOptions: options, capacity: initialCapacity] - } + ) -> Id; + # [method_id (initWithPointerFunctions : capacity :)] pub unsafe fn initWithPointerFunctions_capacity( &self, functions: &NSPointerFunctions, initialCapacity: NSUInteger, - ) -> Id { - msg_send_id![ - self, - initWithPointerFunctions: functions, - capacity: initialCapacity - ] - } + ) -> Id; + # [method_id (hashTableWithOptions :)] pub unsafe fn hashTableWithOptions( options: NSPointerFunctionsOptions, - ) -> Id, Shared> { - msg_send_id![Self::class(), hashTableWithOptions: options] - } - pub unsafe fn hashTableWithWeakObjects() -> Id { - msg_send_id![Self::class(), hashTableWithWeakObjects] - } - pub unsafe fn weakObjectsHashTable() -> Id, Shared> { - msg_send_id![Self::class(), weakObjectsHashTable] - } - pub unsafe fn pointerFunctions(&self) -> Id { - msg_send_id![self, pointerFunctions] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option> { - msg_send_id![self, member: object] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn addObject(&self, object: Option<&ObjectType>) { - msg_send![self, addObject: object] - } - pub unsafe fn removeObject(&self, object: Option<&ObjectType>) { - msg_send![self, removeObject: object] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn allObjects(&self) -> Id, Shared> { - msg_send_id![self, allObjects] - } - pub unsafe fn anyObject(&self) -> Option> { - msg_send_id![self, anyObject] - } - pub unsafe fn containsObject(&self, anObject: Option<&ObjectType>) -> bool { - msg_send![self, containsObject: anObject] - } - pub unsafe fn intersectsHashTable(&self, other: &NSHashTable) -> bool { - msg_send![self, intersectsHashTable: other] - } - pub unsafe fn isEqualToHashTable(&self, other: &NSHashTable) -> bool { - msg_send![self, isEqualToHashTable: other] - } - pub unsafe fn isSubsetOfHashTable(&self, other: &NSHashTable) -> bool { - msg_send![self, isSubsetOfHashTable: other] - } - pub unsafe fn intersectHashTable(&self, other: &NSHashTable) { - msg_send![self, intersectHashTable: other] - } - pub unsafe fn unionHashTable(&self, other: &NSHashTable) { - msg_send![self, unionHashTable: other] - } - pub unsafe fn minusHashTable(&self, other: &NSHashTable) { - msg_send![self, minusHashTable: other] - } - pub unsafe fn setRepresentation(&self) -> Id, Shared> { - msg_send_id![self, setRepresentation] - } + ) -> Id, Shared>; + #[method_id(hashTableWithWeakObjects)] + pub unsafe fn hashTableWithWeakObjects() -> Id; + #[method_id(weakObjectsHashTable)] + pub unsafe fn weakObjectsHashTable() -> Id, Shared>; + #[method_id(pointerFunctions)] + pub unsafe fn pointerFunctions(&self) -> Id; + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + # [method_id (member :)] + pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option>; + #[method_id(objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + # [method (addObject :)] + pub unsafe fn addObject(&self, object: Option<&ObjectType>); + # [method (removeObject :)] + pub unsafe fn removeObject(&self, object: Option<&ObjectType>); + #[method(removeAllObjects)] + pub unsafe fn removeAllObjects(&self); + #[method_id(allObjects)] + pub unsafe fn allObjects(&self) -> Id, Shared>; + #[method_id(anyObject)] + pub unsafe fn anyObject(&self) -> Option>; + # [method (containsObject :)] + pub unsafe fn containsObject(&self, anObject: Option<&ObjectType>) -> bool; + # [method (intersectsHashTable :)] + pub unsafe fn intersectsHashTable(&self, other: &NSHashTable) -> bool; + # [method (isEqualToHashTable :)] + pub unsafe fn isEqualToHashTable(&self, other: &NSHashTable) -> bool; + # [method (isSubsetOfHashTable :)] + pub unsafe fn isSubsetOfHashTable(&self, other: &NSHashTable) -> bool; + # [method (intersectHashTable :)] + pub unsafe fn intersectHashTable(&self, other: &NSHashTable); + # [method (unionHashTable :)] + pub unsafe fn unionHashTable(&self, other: &NSHashTable); + # [method (minusHashTable :)] + pub unsafe fn minusHashTable(&self, other: &NSHashTable); + #[method_id(setRepresentation)] + pub unsafe fn setRepresentation(&self) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index 6a6b74fe0..2403d90eb 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSHost; @@ -15,41 +15,29 @@ extern_class!( ); extern_methods!( unsafe impl NSHost { - pub unsafe fn currentHost() -> Id { - msg_send_id![Self::class(), currentHost] - } - pub unsafe fn hostWithName(name: Option<&NSString>) -> Id { - msg_send_id![Self::class(), hostWithName: name] - } - pub unsafe fn hostWithAddress(address: &NSString) -> Id { - msg_send_id![Self::class(), hostWithAddress: address] - } - pub unsafe fn isEqualToHost(&self, aHost: &NSHost) -> bool { - msg_send![self, isEqualToHost: aHost] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn names(&self) -> Id, Shared> { - msg_send_id![self, names] - } - pub unsafe fn address(&self) -> Option> { - msg_send_id![self, address] - } - pub unsafe fn addresses(&self) -> Id, Shared> { - msg_send_id![self, addresses] - } - pub unsafe fn localizedName(&self) -> Option> { - msg_send_id![self, localizedName] - } - pub unsafe fn setHostCacheEnabled(flag: bool) { - msg_send![Self::class(), setHostCacheEnabled: flag] - } - pub unsafe fn isHostCacheEnabled() -> bool { - msg_send![Self::class(), isHostCacheEnabled] - } - pub unsafe fn flushHostCache() { - msg_send![Self::class(), flushHostCache] - } + #[method_id(currentHost)] + pub unsafe fn currentHost() -> Id; + # [method_id (hostWithName :)] + pub unsafe fn hostWithName(name: Option<&NSString>) -> Id; + # [method_id (hostWithAddress :)] + pub unsafe fn hostWithAddress(address: &NSString) -> Id; + # [method (isEqualToHost :)] + pub unsafe fn isEqualToHost(&self, aHost: &NSHost) -> bool; + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + #[method_id(names)] + pub unsafe fn names(&self) -> Id, Shared>; + #[method_id(address)] + pub unsafe fn address(&self) -> Option>; + #[method_id(addresses)] + pub unsafe fn addresses(&self) -> Id, Shared>; + #[method_id(localizedName)] + pub unsafe fn localizedName(&self) -> Option>; + # [method (setHostCacheEnabled :)] + pub unsafe fn setHostCacheEnabled(flag: bool); + #[method(isHostCacheEnabled)] + pub unsafe fn isHostCacheEnabled() -> bool; + #[method(flushHostCache)] + pub unsafe fn flushHostCache(); } ); diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index cb65c83d2..d201dd830 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSISO8601DateFormatter; @@ -16,38 +16,25 @@ extern_class!( ); extern_methods!( unsafe impl NSISO8601DateFormatter { - pub unsafe fn timeZone(&self) -> Id { - msg_send_id![self, timeZone] - } - pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>) { - msg_send![self, setTimeZone: timeZone] - } - pub unsafe fn formatOptions(&self) -> NSISO8601DateFormatOptions { - msg_send![self, formatOptions] - } - pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions) { - msg_send![self, setFormatOptions: formatOptions] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id { - msg_send_id![self, stringFromDate: date] - } - pub unsafe fn dateFromString(&self, string: &NSString) -> Option> { - msg_send_id![self, dateFromString: string] - } + #[method_id(timeZone)] + pub unsafe fn timeZone(&self) -> Id; + # [method (setTimeZone :)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method(formatOptions)] + pub unsafe fn formatOptions(&self) -> NSISO8601DateFormatOptions; + # [method (setFormatOptions :)] + pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions); + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (stringFromDate :)] + pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; + # [method_id (dateFromString :)] + pub unsafe fn dateFromString(&self, string: &NSString) -> Option>; + # [method_id (stringFromDate : timeZone : formatOptions :)] pub unsafe fn stringFromDate_timeZone_formatOptions( date: &NSDate, timeZone: &NSTimeZone, formatOptions: NSISO8601DateFormatOptions, - ) -> Id { - msg_send_id![ - Self::class(), - stringFromDate: date, - timeZone: timeZone, - formatOptions: formatOptions - ] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index 6335f4478..6a7aaa05c 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSIndexPath; @@ -13,54 +13,39 @@ extern_class!( ); extern_methods!( unsafe impl NSIndexPath { - pub unsafe fn indexPathWithIndex(index: NSUInteger) -> Id { - msg_send_id![Self::class(), indexPathWithIndex: index] - } + # [method_id (indexPathWithIndex :)] + pub unsafe fn indexPathWithIndex(index: NSUInteger) -> Id; + # [method_id (indexPathWithIndexes : length :)] pub unsafe fn indexPathWithIndexes_length( indexes: TodoArray, length: NSUInteger, - ) -> Id { - msg_send_id![Self::class(), indexPathWithIndexes: indexes, length: length] - } + ) -> Id; + # [method_id (initWithIndexes : length :)] pub unsafe fn initWithIndexes_length( &self, indexes: TodoArray, length: NSUInteger, - ) -> Id { - msg_send_id![self, initWithIndexes: indexes, length: length] - } - pub unsafe fn initWithIndex(&self, index: NSUInteger) -> Id { - msg_send_id![self, initWithIndex: index] - } - pub unsafe fn indexPathByAddingIndex(&self, index: NSUInteger) -> Id { - msg_send_id![self, indexPathByAddingIndex: index] - } - pub unsafe fn indexPathByRemovingLastIndex(&self) -> Id { - msg_send_id![self, indexPathByRemovingLastIndex] - } - pub unsafe fn indexAtPosition(&self, position: NSUInteger) -> NSUInteger { - msg_send![self, indexAtPosition: position] - } - pub unsafe fn length(&self) -> NSUInteger { - msg_send![self, length] - } - pub unsafe fn getIndexes_range( - &self, - indexes: NonNull, - positionRange: NSRange, - ) { - msg_send![self, getIndexes: indexes, range: positionRange] - } - pub unsafe fn compare(&self, otherObject: &NSIndexPath) -> NSComparisonResult { - msg_send![self, compare: otherObject] - } + ) -> Id; + # [method_id (initWithIndex :)] + pub unsafe fn initWithIndex(&self, index: NSUInteger) -> Id; + # [method_id (indexPathByAddingIndex :)] + pub unsafe fn indexPathByAddingIndex(&self, index: NSUInteger) -> Id; + #[method_id(indexPathByRemovingLastIndex)] + pub unsafe fn indexPathByRemovingLastIndex(&self) -> Id; + # [method (indexAtPosition :)] + pub unsafe fn indexAtPosition(&self, position: NSUInteger) -> NSUInteger; + #[method(length)] + pub unsafe fn length(&self) -> NSUInteger; + # [method (getIndexes : range :)] + pub unsafe fn getIndexes_range(&self, indexes: NonNull, positionRange: NSRange); + # [method (compare :)] + pub unsafe fn compare(&self, otherObject: &NSIndexPath) -> NSComparisonResult; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSIndexPath { - pub unsafe fn getIndexes(&self, indexes: NonNull) { - msg_send![self, getIndexes: indexes] - } + # [method (getIndexes :)] + pub unsafe fn getIndexes(&self, indexes: NonNull); } ); diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index fd4ab5675..9188d6eb7 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSIndexSet; @@ -13,168 +13,111 @@ extern_class!( ); extern_methods!( unsafe impl NSIndexSet { - pub unsafe fn indexSet() -> Id { - msg_send_id![Self::class(), indexSet] - } - pub unsafe fn indexSetWithIndex(value: NSUInteger) -> Id { - msg_send_id![Self::class(), indexSetWithIndex: value] - } - pub unsafe fn indexSetWithIndexesInRange(range: NSRange) -> Id { - msg_send_id![Self::class(), indexSetWithIndexesInRange: range] - } - pub unsafe fn initWithIndexesInRange(&self, range: NSRange) -> Id { - msg_send_id![self, initWithIndexesInRange: range] - } - pub unsafe fn initWithIndexSet(&self, indexSet: &NSIndexSet) -> Id { - msg_send_id![self, initWithIndexSet: indexSet] - } - pub unsafe fn initWithIndex(&self, value: NSUInteger) -> Id { - msg_send_id![self, initWithIndex: value] - } - pub unsafe fn isEqualToIndexSet(&self, indexSet: &NSIndexSet) -> bool { - msg_send![self, isEqualToIndexSet: indexSet] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn firstIndex(&self) -> NSUInteger { - msg_send![self, firstIndex] - } - pub unsafe fn lastIndex(&self) -> NSUInteger { - msg_send![self, lastIndex] - } - pub unsafe fn indexGreaterThanIndex(&self, value: NSUInteger) -> NSUInteger { - msg_send![self, indexGreaterThanIndex: value] - } - pub unsafe fn indexLessThanIndex(&self, value: NSUInteger) -> NSUInteger { - msg_send![self, indexLessThanIndex: value] - } - pub unsafe fn indexGreaterThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger { - msg_send![self, indexGreaterThanOrEqualToIndex: value] - } - pub unsafe fn indexLessThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger { - msg_send![self, indexLessThanOrEqualToIndex: value] - } + #[method_id(indexSet)] + pub unsafe fn indexSet() -> Id; + # [method_id (indexSetWithIndex :)] + pub unsafe fn indexSetWithIndex(value: NSUInteger) -> Id; + # [method_id (indexSetWithIndexesInRange :)] + pub unsafe fn indexSetWithIndexesInRange(range: NSRange) -> Id; + # [method_id (initWithIndexesInRange :)] + pub unsafe fn initWithIndexesInRange(&self, range: NSRange) -> Id; + # [method_id (initWithIndexSet :)] + pub unsafe fn initWithIndexSet(&self, indexSet: &NSIndexSet) -> Id; + # [method_id (initWithIndex :)] + pub unsafe fn initWithIndex(&self, value: NSUInteger) -> Id; + # [method (isEqualToIndexSet :)] + pub unsafe fn isEqualToIndexSet(&self, indexSet: &NSIndexSet) -> bool; + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + #[method(firstIndex)] + pub unsafe fn firstIndex(&self) -> NSUInteger; + #[method(lastIndex)] + pub unsafe fn lastIndex(&self) -> NSUInteger; + # [method (indexGreaterThanIndex :)] + pub unsafe fn indexGreaterThanIndex(&self, value: NSUInteger) -> NSUInteger; + # [method (indexLessThanIndex :)] + pub unsafe fn indexLessThanIndex(&self, value: NSUInteger) -> NSUInteger; + # [method (indexGreaterThanOrEqualToIndex :)] + pub unsafe fn indexGreaterThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger; + # [method (indexLessThanOrEqualToIndex :)] + pub unsafe fn indexLessThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger; + # [method (getIndexes : maxCount : inIndexRange :)] pub unsafe fn getIndexes_maxCount_inIndexRange( &self, indexBuffer: NonNull, bufferSize: NSUInteger, range: NSRangePointer, - ) -> NSUInteger { - msg_send![ - self, - getIndexes: indexBuffer, - maxCount: bufferSize, - inIndexRange: range - ] - } - pub unsafe fn countOfIndexesInRange(&self, range: NSRange) -> NSUInteger { - msg_send![self, countOfIndexesInRange: range] - } - pub unsafe fn containsIndex(&self, value: NSUInteger) -> bool { - msg_send![self, containsIndex: value] - } - pub unsafe fn containsIndexesInRange(&self, range: NSRange) -> bool { - msg_send![self, containsIndexesInRange: range] - } - pub unsafe fn containsIndexes(&self, indexSet: &NSIndexSet) -> bool { - msg_send![self, containsIndexes: indexSet] - } - pub unsafe fn intersectsIndexesInRange(&self, range: NSRange) -> bool { - msg_send![self, intersectsIndexesInRange: range] - } - pub unsafe fn enumerateIndexesUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateIndexesUsingBlock: block] - } + ) -> NSUInteger; + # [method (countOfIndexesInRange :)] + pub unsafe fn countOfIndexesInRange(&self, range: NSRange) -> NSUInteger; + # [method (containsIndex :)] + pub unsafe fn containsIndex(&self, value: NSUInteger) -> bool; + # [method (containsIndexesInRange :)] + pub unsafe fn containsIndexesInRange(&self, range: NSRange) -> bool; + # [method (containsIndexes :)] + pub unsafe fn containsIndexes(&self, indexSet: &NSIndexSet) -> bool; + # [method (intersectsIndexesInRange :)] + pub unsafe fn intersectsIndexesInRange(&self, range: NSRange) -> bool; + # [method (enumerateIndexesUsingBlock :)] + pub unsafe fn enumerateIndexesUsingBlock(&self, block: TodoBlock); + # [method (enumerateIndexesWithOptions : usingBlock :)] pub unsafe fn enumerateIndexesWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![self, enumerateIndexesWithOptions: opts, usingBlock: block] - } + ); + # [method (enumerateIndexesInRange : options : usingBlock :)] pub unsafe fn enumerateIndexesInRange_options_usingBlock( &self, range: NSRange, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateIndexesInRange: range, - options: opts, - usingBlock: block - ] - } - pub unsafe fn indexPassingTest(&self, predicate: TodoBlock) -> NSUInteger { - msg_send![self, indexPassingTest: predicate] - } + ); + # [method (indexPassingTest :)] + pub unsafe fn indexPassingTest(&self, predicate: TodoBlock) -> NSUInteger; + # [method (indexWithOptions : passingTest :)] pub unsafe fn indexWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> NSUInteger { - msg_send![self, indexWithOptions: opts, passingTest: predicate] - } + ) -> NSUInteger; + # [method (indexInRange : options : passingTest :)] pub unsafe fn indexInRange_options_passingTest( &self, range: NSRange, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> NSUInteger { - msg_send![ - self, - indexInRange: range, - options: opts, - passingTest: predicate - ] - } - pub unsafe fn indexesPassingTest(&self, predicate: TodoBlock) -> Id { - msg_send_id![self, indexesPassingTest: predicate] - } + ) -> NSUInteger; + # [method_id (indexesPassingTest :)] + pub unsafe fn indexesPassingTest(&self, predicate: TodoBlock) -> Id; + # [method_id (indexesWithOptions : passingTest :)] pub unsafe fn indexesWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> Id { - msg_send_id![self, indexesWithOptions: opts, passingTest: predicate] - } + ) -> Id; + # [method_id (indexesInRange : options : passingTest :)] pub unsafe fn indexesInRange_options_passingTest( &self, range: NSRange, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> Id { - msg_send_id![ - self, - indexesInRange: range, - options: opts, - passingTest: predicate - ] - } - pub unsafe fn enumerateRangesUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateRangesUsingBlock: block] - } + ) -> Id; + # [method (enumerateRangesUsingBlock :)] + pub unsafe fn enumerateRangesUsingBlock(&self, block: TodoBlock); + # [method (enumerateRangesWithOptions : usingBlock :)] pub unsafe fn enumerateRangesWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![self, enumerateRangesWithOptions: opts, usingBlock: block] - } + ); + # [method (enumerateRangesInRange : options : usingBlock :)] pub unsafe fn enumerateRangesInRange_options_usingBlock( &self, range: NSRange, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateRangesInRange: range, - options: opts, - usingBlock: block - ] - } + ); } ); extern_class!( @@ -186,29 +129,21 @@ extern_class!( ); extern_methods!( unsafe impl NSMutableIndexSet { - pub unsafe fn addIndexes(&self, indexSet: &NSIndexSet) { - msg_send![self, addIndexes: indexSet] - } - pub unsafe fn removeIndexes(&self, indexSet: &NSIndexSet) { - msg_send![self, removeIndexes: indexSet] - } - pub unsafe fn removeAllIndexes(&self) { - msg_send![self, removeAllIndexes] - } - pub unsafe fn addIndex(&self, value: NSUInteger) { - msg_send![self, addIndex: value] - } - pub unsafe fn removeIndex(&self, value: NSUInteger) { - msg_send![self, removeIndex: value] - } - pub unsafe fn addIndexesInRange(&self, range: NSRange) { - msg_send![self, addIndexesInRange: range] - } - pub unsafe fn removeIndexesInRange(&self, range: NSRange) { - msg_send![self, removeIndexesInRange: range] - } - pub unsafe fn shiftIndexesStartingAtIndex_by(&self, index: NSUInteger, delta: NSInteger) { - msg_send![self, shiftIndexesStartingAtIndex: index, by: delta] - } + # [method (addIndexes :)] + pub unsafe fn addIndexes(&self, indexSet: &NSIndexSet); + # [method (removeIndexes :)] + pub unsafe fn removeIndexes(&self, indexSet: &NSIndexSet); + #[method(removeAllIndexes)] + pub unsafe fn removeAllIndexes(&self); + # [method (addIndex :)] + pub unsafe fn addIndex(&self, value: NSUInteger); + # [method (removeIndex :)] + pub unsafe fn removeIndex(&self, value: NSUInteger); + # [method (addIndexesInRange :)] + pub unsafe fn addIndexesInRange(&self, range: NSRange); + # [method (removeIndexesInRange :)] + pub unsafe fn removeIndexesInRange(&self, range: NSRange); + # [method (shiftIndexesStartingAtIndex : by :)] + pub unsafe fn shiftIndexesStartingAtIndex_by(&self, index: NSUInteger, delta: NSInteger); } ); diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index 794f16a5a..5c205de5a 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSInflectionRule; @@ -13,12 +13,10 @@ extern_class!( ); extern_methods!( unsafe impl NSInflectionRule { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn automaticRule() -> Id { - msg_send_id![Self::class(), automaticRule] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(automaticRule)] + pub unsafe fn automaticRule() -> Id; } ); extern_class!( @@ -30,22 +28,18 @@ extern_class!( ); extern_methods!( unsafe impl NSInflectionRuleExplicit { - pub unsafe fn initWithMorphology(&self, morphology: &NSMorphology) -> Id { - msg_send_id![self, initWithMorphology: morphology] - } - pub unsafe fn morphology(&self) -> Id { - msg_send_id![self, morphology] - } + # [method_id (initWithMorphology :)] + pub unsafe fn initWithMorphology(&self, morphology: &NSMorphology) -> Id; + #[method_id(morphology)] + pub unsafe fn morphology(&self) -> Id; } ); extern_methods!( #[doc = "NSInflectionAvailability"] unsafe impl NSInflectionRule { - pub unsafe fn canInflectLanguage(language: &NSString) -> bool { - msg_send![Self::class(), canInflectLanguage: language] - } - pub unsafe fn canInflectPreferredLocalization() -> bool { - msg_send![Self::class(), canInflectPreferredLocalization] - } + # [method (canInflectLanguage :)] + pub unsafe fn canInflectLanguage(language: &NSString) -> bool; + #[method(canInflectPreferredLocalization)] + pub unsafe fn canInflectPreferredLocalization() -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index 53c9c075d..60c30d123 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSInvocation; @@ -13,57 +13,35 @@ extern_class!( ); extern_methods!( unsafe impl NSInvocation { + # [method_id (invocationWithMethodSignature :)] pub unsafe fn invocationWithMethodSignature( sig: &NSMethodSignature, - ) -> Id { - msg_send_id![Self::class(), invocationWithMethodSignature: sig] - } - pub unsafe fn methodSignature(&self) -> Id { - msg_send_id![self, methodSignature] - } - pub unsafe fn retainArguments(&self) { - msg_send![self, retainArguments] - } - pub unsafe fn argumentsRetained(&self) -> bool { - msg_send![self, argumentsRetained] - } - pub unsafe fn target(&self) -> Option> { - msg_send_id![self, target] - } - pub unsafe fn setTarget(&self, target: Option<&Object>) { - msg_send![self, setTarget: target] - } - pub unsafe fn selector(&self) -> Sel { - msg_send![self, selector] - } - pub unsafe fn setSelector(&self, selector: Sel) { - msg_send![self, setSelector: selector] - } - pub unsafe fn getReturnValue(&self, retLoc: NonNull) { - msg_send![self, getReturnValue: retLoc] - } - pub unsafe fn setReturnValue(&self, retLoc: NonNull) { - msg_send![self, setReturnValue: retLoc] - } - pub unsafe fn getArgument_atIndex( - &self, - argumentLocation: NonNull, - idx: NSInteger, - ) { - msg_send![self, getArgument: argumentLocation, atIndex: idx] - } - pub unsafe fn setArgument_atIndex( - &self, - argumentLocation: NonNull, - idx: NSInteger, - ) { - msg_send![self, setArgument: argumentLocation, atIndex: idx] - } - pub unsafe fn invoke(&self) { - msg_send![self, invoke] - } - pub unsafe fn invokeWithTarget(&self, target: &Object) { - msg_send![self, invokeWithTarget: target] - } + ) -> Id; + #[method_id(methodSignature)] + pub unsafe fn methodSignature(&self) -> Id; + #[method(retainArguments)] + pub unsafe fn retainArguments(&self); + #[method(argumentsRetained)] + pub unsafe fn argumentsRetained(&self) -> bool; + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + # [method (setTarget :)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(selector)] + pub unsafe fn selector(&self) -> Sel; + # [method (setSelector :)] + pub unsafe fn setSelector(&self, selector: Sel); + # [method (getReturnValue :)] + pub unsafe fn getReturnValue(&self, retLoc: NonNull); + # [method (setReturnValue :)] + pub unsafe fn setReturnValue(&self, retLoc: NonNull); + # [method (getArgument : atIndex :)] + pub unsafe fn getArgument_atIndex(&self, argumentLocation: NonNull, idx: NSInteger); + # [method (setArgument : atIndex :)] + pub unsafe fn setArgument_atIndex(&self, argumentLocation: NonNull, idx: NSInteger); + #[method(invoke)] + pub unsafe fn invoke(&self); + # [method (invokeWithTarget :)] + pub unsafe fn invokeWithTarget(&self, target: &Object); } ); diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index b58ee214b..9e9a454b9 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSItemProviderWriting = NSObject; pub type NSItemProviderReading = NSObject; extern_class!( @@ -15,170 +15,106 @@ extern_class!( ); extern_methods!( unsafe impl NSItemProvider { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method (registerDataRepresentationForTypeIdentifier : visibility : loadHandler :)] pub unsafe fn registerDataRepresentationForTypeIdentifier_visibility_loadHandler( &self, typeIdentifier: &NSString, visibility: NSItemProviderRepresentationVisibility, loadHandler: TodoBlock, - ) { - msg_send![ - self, - registerDataRepresentationForTypeIdentifier: typeIdentifier, - visibility: visibility, - loadHandler: loadHandler - ] - } + ); + # [method (registerFileRepresentationForTypeIdentifier : fileOptions : visibility : loadHandler :)] pub unsafe fn registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler( &self, typeIdentifier: &NSString, fileOptions: NSItemProviderFileOptions, visibility: NSItemProviderRepresentationVisibility, loadHandler: TodoBlock, - ) { - msg_send![ - self, - registerFileRepresentationForTypeIdentifier: typeIdentifier, - fileOptions: fileOptions, - visibility: visibility, - loadHandler: loadHandler - ] - } - pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared> { - msg_send_id![self, registeredTypeIdentifiers] - } + ); + #[method_id(registeredTypeIdentifiers)] + pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared>; + # [method_id (registeredTypeIdentifiersWithFileOptions :)] pub unsafe fn registeredTypeIdentifiersWithFileOptions( &self, fileOptions: NSItemProviderFileOptions, - ) -> Id, Shared> { - msg_send_id![self, registeredTypeIdentifiersWithFileOptions: fileOptions] - } - pub unsafe fn hasItemConformingToTypeIdentifier(&self, typeIdentifier: &NSString) -> bool { - msg_send![self, hasItemConformingToTypeIdentifier: typeIdentifier] - } + ) -> Id, Shared>; + # [method (hasItemConformingToTypeIdentifier :)] + pub unsafe fn hasItemConformingToTypeIdentifier(&self, typeIdentifier: &NSString) -> bool; + # [method (hasRepresentationConformingToTypeIdentifier : fileOptions :)] pub unsafe fn hasRepresentationConformingToTypeIdentifier_fileOptions( &self, typeIdentifier: &NSString, fileOptions: NSItemProviderFileOptions, - ) -> bool { - msg_send![ - self, - hasRepresentationConformingToTypeIdentifier: typeIdentifier, - fileOptions: fileOptions - ] - } + ) -> bool; + # [method_id (loadDataRepresentationForTypeIdentifier : completionHandler :)] pub unsafe fn loadDataRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - loadDataRepresentationForTypeIdentifier: typeIdentifier, - completionHandler: completionHandler - ] - } + ) -> Id; + # [method_id (loadFileRepresentationForTypeIdentifier : completionHandler :)] pub unsafe fn loadFileRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - loadFileRepresentationForTypeIdentifier: typeIdentifier, - completionHandler: completionHandler - ] - } + ) -> Id; + # [method_id (loadInPlaceFileRepresentationForTypeIdentifier : completionHandler :)] pub unsafe fn loadInPlaceFileRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - loadInPlaceFileRepresentationForTypeIdentifier: typeIdentifier, - completionHandler: completionHandler - ] - } - pub unsafe fn suggestedName(&self) -> Option> { - msg_send_id![self, suggestedName] - } - pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>) { - msg_send![self, setSuggestedName: suggestedName] - } - pub unsafe fn initWithObject(&self, object: &NSItemProviderWriting) -> Id { - msg_send_id![self, initWithObject: object] - } + ) -> Id; + #[method_id(suggestedName)] + pub unsafe fn suggestedName(&self) -> Option>; + # [method (setSuggestedName :)] + pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>); + # [method_id (initWithObject :)] + pub unsafe fn initWithObject(&self, object: &NSItemProviderWriting) -> Id; + # [method (registerObject : visibility :)] pub unsafe fn registerObject_visibility( &self, object: &NSItemProviderWriting, visibility: NSItemProviderRepresentationVisibility, - ) { - msg_send![self, registerObject: object, visibility: visibility] - } + ); + # [method_id (initWithItem : typeIdentifier :)] pub unsafe fn initWithItem_typeIdentifier( &self, item: Option<&NSSecureCoding>, typeIdentifier: Option<&NSString>, - ) -> Id { - msg_send_id![self, initWithItem: item, typeIdentifier: typeIdentifier] - } + ) -> Id; + # [method_id (initWithContentsOfURL :)] pub unsafe fn initWithContentsOfURL( &self, fileURL: Option<&NSURL>, - ) -> Option> { - msg_send_id![self, initWithContentsOfURL: fileURL] - } + ) -> Option>; + # [method (registerItemForTypeIdentifier : loadHandler :)] pub unsafe fn registerItemForTypeIdentifier_loadHandler( &self, typeIdentifier: &NSString, loadHandler: NSItemProviderLoadHandler, - ) { - msg_send![ - self, - registerItemForTypeIdentifier: typeIdentifier, - loadHandler: loadHandler - ] - } + ); + # [method (loadItemForTypeIdentifier : options : completionHandler :)] pub unsafe fn loadItemForTypeIdentifier_options_completionHandler( &self, typeIdentifier: &NSString, options: Option<&NSDictionary>, completionHandler: NSItemProviderCompletionHandler, - ) { - msg_send![ - self, - loadItemForTypeIdentifier: typeIdentifier, - options: options, - completionHandler: completionHandler - ] - } + ); } ); extern_methods!( #[doc = "NSPreviewSupport"] unsafe impl NSItemProvider { - pub unsafe fn previewImageHandler(&self) -> NSItemProviderLoadHandler { - msg_send![self, previewImageHandler] - } - pub unsafe fn setPreviewImageHandler( - &self, - previewImageHandler: NSItemProviderLoadHandler, - ) { - msg_send![self, setPreviewImageHandler: previewImageHandler] - } + #[method(previewImageHandler)] + pub unsafe fn previewImageHandler(&self) -> NSItemProviderLoadHandler; + # [method (setPreviewImageHandler :)] + pub unsafe fn setPreviewImageHandler(&self, previewImageHandler: NSItemProviderLoadHandler); + # [method (loadPreviewImageWithOptions : completionHandler :)] pub unsafe fn loadPreviewImageWithOptions_completionHandler( &self, options: Option<&NSDictionary>, completionHandler: NSItemProviderCompletionHandler, - ) { - msg_send![ - self, - loadPreviewImageWithOptions: options, - completionHandler: completionHandler - ] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 4e6a06b09..17d02e710 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSJSONSerialization; @@ -16,41 +16,22 @@ extern_class!( ); extern_methods!( unsafe impl NSJSONSerialization { - pub unsafe fn isValidJSONObject(obj: &Object) -> bool { - msg_send![Self::class(), isValidJSONObject: obj] - } + # [method (isValidJSONObject :)] + pub unsafe fn isValidJSONObject(obj: &Object) -> bool; + # [method_id (dataWithJSONObject : options : error :)] pub unsafe fn dataWithJSONObject_options_error( obj: &Object, opt: NSJSONWritingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - dataWithJSONObject: obj, - options: opt, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (JSONObjectWithData : options : error :)] pub unsafe fn JSONObjectWithData_options_error( data: &NSData, opt: NSJSONReadingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - JSONObjectWithData: data, - options: opt, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (JSONObjectWithStream : options : error :)] pub unsafe fn JSONObjectWithStream_options_error( stream: &NSInputStream, opt: NSJSONReadingOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - JSONObjectWithStream: stream, - options: opt, - error: _ - ] - } + ) -> Result, Id>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index b817cad8b..c7b0cd060 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -8,182 +8,141 @@ use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSKeyValueOperator = NSString; extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSObject { - pub unsafe fn accessInstanceVariablesDirectly() -> bool { - msg_send![Self::class(), accessInstanceVariablesDirectly] - } - pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } + #[method(accessInstanceVariablesDirectly)] + pub unsafe fn accessInstanceVariablesDirectly() -> bool; + # [method_id (valueForKey :)] + pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; + # [method (setValue : forKey :)] + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); + # [method (validateValue : forKey : error :)] pub unsafe fn validateValue_forKey_error( &self, ioValue: &mut Option>, inKey: &NSString, - ) -> Result<(), Id> { - msg_send![self, validateValue: ioValue, forKey: inKey, error: _] - } - pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, mutableArrayValueForKey: key] - } + ) -> Result<(), Id>; + # [method_id (mutableArrayValueForKey :)] + pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id; + # [method_id (mutableOrderedSetValueForKey :)] pub unsafe fn mutableOrderedSetValueForKey( &self, key: &NSString, - ) -> Id { - msg_send_id![self, mutableOrderedSetValueForKey: key] - } - pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, mutableSetValueForKey: key] - } - pub unsafe fn valueForKeyPath(&self, keyPath: &NSString) -> Option> { - msg_send_id![self, valueForKeyPath: keyPath] - } - pub unsafe fn setValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { - msg_send![self, setValue: value, forKeyPath: keyPath] - } + ) -> Id; + # [method_id (mutableSetValueForKey :)] + pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id; + # [method_id (valueForKeyPath :)] + pub unsafe fn valueForKeyPath(&self, keyPath: &NSString) -> Option>; + # [method (setValue : forKeyPath :)] + pub unsafe fn setValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString); + # [method (validateValue : forKeyPath : error :)] pub unsafe fn validateValue_forKeyPath_error( &self, ioValue: &mut Option>, inKeyPath: &NSString, - ) -> Result<(), Id> { - msg_send![ - self, - validateValue: ioValue, - forKeyPath: inKeyPath, - error: _ - ] - } + ) -> Result<(), Id>; + # [method_id (mutableArrayValueForKeyPath :)] pub unsafe fn mutableArrayValueForKeyPath( &self, keyPath: &NSString, - ) -> Id { - msg_send_id![self, mutableArrayValueForKeyPath: keyPath] - } + ) -> Id; + # [method_id (mutableOrderedSetValueForKeyPath :)] pub unsafe fn mutableOrderedSetValueForKeyPath( &self, keyPath: &NSString, - ) -> Id { - msg_send_id![self, mutableOrderedSetValueForKeyPath: keyPath] - } + ) -> Id; + # [method_id (mutableSetValueForKeyPath :)] pub unsafe fn mutableSetValueForKeyPath( &self, keyPath: &NSString, - ) -> Id { - msg_send_id![self, mutableSetValueForKeyPath: keyPath] - } - pub unsafe fn valueForUndefinedKey(&self, key: &NSString) -> Option> { - msg_send_id![self, valueForUndefinedKey: key] - } - pub unsafe fn setValue_forUndefinedKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forUndefinedKey: key] - } - pub unsafe fn setNilValueForKey(&self, key: &NSString) { - msg_send![self, setNilValueForKey: key] - } + ) -> Id; + # [method_id (valueForUndefinedKey :)] + pub unsafe fn valueForUndefinedKey(&self, key: &NSString) -> Option>; + # [method (setValue : forUndefinedKey :)] + pub unsafe fn setValue_forUndefinedKey(&self, value: Option<&Object>, key: &NSString); + # [method (setNilValueForKey :)] + pub unsafe fn setNilValueForKey(&self, key: &NSString); + # [method_id (dictionaryWithValuesForKeys :)] pub unsafe fn dictionaryWithValuesForKeys( &self, keys: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, dictionaryWithValuesForKeys: keys] - } + ) -> Id, Shared>; + # [method (setValuesForKeysWithDictionary :)] pub unsafe fn setValuesForKeysWithDictionary( &self, keyedValues: &NSDictionary, - ) { - msg_send![self, setValuesForKeysWithDictionary: keyedValues] - } + ); } ); extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSArray { - pub unsafe fn valueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } + # [method_id (valueForKey :)] + pub unsafe fn valueForKey(&self, key: &NSString) -> Id; + # [method (setValue : forKey :)] + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); } ); extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSDictionary { - pub unsafe fn valueForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, valueForKey: key] - } + # [method_id (valueForKey :)] + pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; } ); extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSMutableDictionary { - pub unsafe fn setValue_forKey(&self, value: Option<&ObjectType>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } + # [method (setValue : forKey :)] + pub unsafe fn setValue_forKey(&self, value: Option<&ObjectType>, key: &NSString); } ); extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSOrderedSet { - pub unsafe fn valueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } + # [method_id (valueForKey :)] + pub unsafe fn valueForKey(&self, key: &NSString) -> Id; + # [method (setValue : forKey :)] + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); } ); extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSSet { - pub unsafe fn valueForKey(&self, key: &NSString) -> Id { - msg_send_id![self, valueForKey: key] - } - pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, setValue: value, forKey: key] - } + # [method_id (valueForKey :)] + pub unsafe fn valueForKey(&self, key: &NSString) -> Id; + # [method (setValue : forKey :)] + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); } ); extern_methods!( #[doc = "NSDeprecatedKeyValueCoding"] unsafe impl NSObject { - pub unsafe fn useStoredAccessor() -> bool { - msg_send![Self::class(), useStoredAccessor] - } - pub unsafe fn storedValueForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, storedValueForKey: key] - } - pub unsafe fn takeStoredValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, takeStoredValue: value, forKey: key] - } - pub unsafe fn takeValue_forKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, takeValue: value, forKey: key] - } - pub unsafe fn takeValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString) { - msg_send![self, takeValue: value, forKeyPath: keyPath] - } + #[method(useStoredAccessor)] + pub unsafe fn useStoredAccessor() -> bool; + # [method_id (storedValueForKey :)] + pub unsafe fn storedValueForKey(&self, key: &NSString) -> Option>; + # [method (takeStoredValue : forKey :)] + pub unsafe fn takeStoredValue_forKey(&self, value: Option<&Object>, key: &NSString); + # [method (takeValue : forKey :)] + pub unsafe fn takeValue_forKey(&self, value: Option<&Object>, key: &NSString); + # [method (takeValue : forKeyPath :)] + pub unsafe fn takeValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString); + # [method_id (handleQueryWithUnboundKey :)] pub unsafe fn handleQueryWithUnboundKey( &self, key: &NSString, - ) -> Option> { - msg_send_id![self, handleQueryWithUnboundKey: key] - } - pub unsafe fn handleTakeValue_forUnboundKey(&self, value: Option<&Object>, key: &NSString) { - msg_send![self, handleTakeValue: value, forUnboundKey: key] - } - pub unsafe fn unableToSetNilForKey(&self, key: &NSString) { - msg_send![self, unableToSetNilForKey: key] - } - pub unsafe fn valuesForKeys(&self, keys: &NSArray) -> Id { - msg_send_id![self, valuesForKeys: keys] - } - pub unsafe fn takeValuesFromDictionary(&self, properties: &NSDictionary) { - msg_send![self, takeValuesFromDictionary: properties] - } + ) -> Option>; + # [method (handleTakeValue : forUnboundKey :)] + pub unsafe fn handleTakeValue_forUnboundKey(&self, value: Option<&Object>, key: &NSString); + # [method (unableToSetNilForKey :)] + pub unsafe fn unableToSetNilForKey(&self, key: &NSString); + # [method_id (valuesForKeys :)] + pub unsafe fn valuesForKeys(&self, keys: &NSArray) -> Id; + # [method (takeValuesFromDictionary :)] + pub unsafe fn takeValuesFromDictionary(&self, properties: &NSDictionary); } ); diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index b517c16b4..8d8f7b838 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -7,67 +7,47 @@ use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSKeyValueChangeKey = NSString; extern_methods!( #[doc = "NSKeyValueObserving"] unsafe impl NSObject { + # [method (observeValueForKeyPath : ofObject : change : context :)] pub unsafe fn observeValueForKeyPath_ofObject_change_context( &self, keyPath: Option<&NSString>, object: Option<&Object>, change: Option<&NSDictionary>, context: *mut c_void, - ) { - msg_send![ - self, - observeValueForKeyPath: keyPath, - ofObject: object, - change: change, - context: context - ] - } + ); } ); extern_methods!( #[doc = "NSKeyValueObserverRegistration"] unsafe impl NSObject { + # [method (addObserver : forKeyPath : options : context :)] pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, keyPath: &NSString, options: NSKeyValueObservingOptions, context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] - } + ); + # [method (removeObserver : forKeyPath : context :)] pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, keyPath: &NSString, context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } + ); + # [method (removeObserver : forKeyPath :)] + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); extern_methods!( #[doc = "NSKeyValueObserverRegistration"] unsafe impl NSArray { + # [method (addObserver : toObjectsAtIndexes : forKeyPath : options : context :)] pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( &self, observer: &NSObject, @@ -75,243 +55,144 @@ extern_methods!( keyPath: &NSString, options: NSKeyValueObservingOptions, context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - toObjectsAtIndexes: indexes, - forKeyPath: keyPath, - options: options, - context: context - ] - } + ); + # [method (removeObserver : fromObjectsAtIndexes : forKeyPath : context :)] pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath_context( &self, observer: &NSObject, indexes: &NSIndexSet, keyPath: &NSString, context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - fromObjectsAtIndexes: indexes, - forKeyPath: keyPath, - context: context - ] - } + ); + # [method (removeObserver : fromObjectsAtIndexes : forKeyPath :)] pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( &self, observer: &NSObject, indexes: &NSIndexSet, keyPath: &NSString, - ) { - msg_send![ - self, - removeObserver: observer, - fromObjectsAtIndexes: indexes, - forKeyPath: keyPath - ] - } + ); + # [method (addObserver : forKeyPath : options : context :)] pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, keyPath: &NSString, options: NSKeyValueObservingOptions, context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] - } + ); + # [method (removeObserver : forKeyPath : context :)] pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, keyPath: &NSString, context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } + ); + # [method (removeObserver : forKeyPath :)] + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); extern_methods!( #[doc = "NSKeyValueObserverRegistration"] unsafe impl NSOrderedSet { + # [method (addObserver : forKeyPath : options : context :)] pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, keyPath: &NSString, options: NSKeyValueObservingOptions, context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] - } + ); + # [method (removeObserver : forKeyPath : context :)] pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, keyPath: &NSString, context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } + ); + # [method (removeObserver : forKeyPath :)] + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); extern_methods!( #[doc = "NSKeyValueObserverRegistration"] unsafe impl NSSet { + # [method (addObserver : forKeyPath : options : context :)] pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, keyPath: &NSString, options: NSKeyValueObservingOptions, context: *mut c_void, - ) { - msg_send![ - self, - addObserver: observer, - forKeyPath: keyPath, - options: options, - context: context - ] - } + ); + # [method (removeObserver : forKeyPath : context :)] pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, keyPath: &NSString, context: *mut c_void, - ) { - msg_send![ - self, - removeObserver: observer, - forKeyPath: keyPath, - context: context - ] - } - pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString) { - msg_send![self, removeObserver: observer, forKeyPath: keyPath] - } + ); + # [method (removeObserver : forKeyPath :)] + pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); extern_methods!( #[doc = "NSKeyValueObserverNotification"] unsafe impl NSObject { - pub unsafe fn willChangeValueForKey(&self, key: &NSString) { - msg_send![self, willChangeValueForKey: key] - } - pub unsafe fn didChangeValueForKey(&self, key: &NSString) { - msg_send![self, didChangeValueForKey: key] - } + # [method (willChangeValueForKey :)] + pub unsafe fn willChangeValueForKey(&self, key: &NSString); + # [method (didChangeValueForKey :)] + pub unsafe fn didChangeValueForKey(&self, key: &NSString); + # [method (willChange : valuesAtIndexes : forKey :)] pub unsafe fn willChange_valuesAtIndexes_forKey( &self, changeKind: NSKeyValueChange, indexes: &NSIndexSet, key: &NSString, - ) { - msg_send![ - self, - willChange: changeKind, - valuesAtIndexes: indexes, - forKey: key - ] - } + ); + # [method (didChange : valuesAtIndexes : forKey :)] pub unsafe fn didChange_valuesAtIndexes_forKey( &self, changeKind: NSKeyValueChange, indexes: &NSIndexSet, key: &NSString, - ) { - msg_send![ - self, - didChange: changeKind, - valuesAtIndexes: indexes, - forKey: key - ] - } + ); + # [method (willChangeValueForKey : withSetMutation : usingObjects :)] pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects( &self, key: &NSString, mutationKind: NSKeyValueSetMutationKind, objects: &NSSet, - ) { - msg_send![ - self, - willChangeValueForKey: key, - withSetMutation: mutationKind, - usingObjects: objects - ] - } + ); + # [method (didChangeValueForKey : withSetMutation : usingObjects :)] pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects( &self, key: &NSString, mutationKind: NSKeyValueSetMutationKind, objects: &NSSet, - ) { - msg_send![ - self, - didChangeValueForKey: key, - withSetMutation: mutationKind, - usingObjects: objects - ] - } + ); } ); extern_methods!( #[doc = "NSKeyValueObservingCustomization"] unsafe impl NSObject { + # [method_id (keyPathsForValuesAffectingValueForKey :)] pub unsafe fn keyPathsForValuesAffectingValueForKey( key: &NSString, - ) -> Id, Shared> { - msg_send_id![Self::class(), keyPathsForValuesAffectingValueForKey: key] - } - pub unsafe fn automaticallyNotifiesObserversForKey(key: &NSString) -> bool { - msg_send![Self::class(), automaticallyNotifiesObserversForKey: key] - } - pub unsafe fn observationInfo(&self) -> *mut c_void { - msg_send![self, observationInfo] - } - pub unsafe fn setObservationInfo(&self, observationInfo: *mut c_void) { - msg_send![self, setObservationInfo: observationInfo] - } + ) -> Id, Shared>; + # [method (automaticallyNotifiesObserversForKey :)] + pub unsafe fn automaticallyNotifiesObserversForKey(key: &NSString) -> bool; + #[method(observationInfo)] + pub unsafe fn observationInfo(&self) -> *mut c_void; + # [method (setObservationInfo :)] + pub unsafe fn setObservationInfo(&self, observationInfo: *mut c_void); } ); extern_methods!( #[doc = "NSDeprecatedKeyValueObservingCustomization"] unsafe impl NSObject { + # [method (setKeys : triggerChangeNotificationsForDependentKey :)] pub unsafe fn setKeys_triggerChangeNotificationsForDependentKey( keys: &NSArray, dependentKey: &NSString, - ) { - msg_send![ - Self::class(), - setKeys: keys, - triggerChangeNotificationsForDependentKey: dependentKey - ] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 35e24be58..ccb0d3ff0 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSPropertyList::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSKeyedArchiver; @@ -19,110 +19,78 @@ extern_class!( ); extern_methods!( unsafe impl NSKeyedArchiver { + # [method_id (initRequiringSecureCoding :)] pub unsafe fn initRequiringSecureCoding( &self, requiresSecureCoding: bool, - ) -> Id { - msg_send_id![self, initRequiringSecureCoding: requiresSecureCoding] - } + ) -> Id; + # [method_id (archivedDataWithRootObject : requiringSecureCoding : error :)] pub unsafe fn archivedDataWithRootObject_requiringSecureCoding_error( object: &Object, requiresSecureCoding: bool, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - archivedDataWithRootObject: object, - requiringSecureCoding: requiresSecureCoding, - error: _ - ] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + ) -> Result, Id>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initForWritingWithMutableData :)] pub unsafe fn initForWritingWithMutableData( &self, data: &NSMutableData, - ) -> Id { - msg_send_id![self, initForWritingWithMutableData: data] - } - pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id { - msg_send_id![Self::class(), archivedDataWithRootObject: rootObject] - } - pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool { - msg_send![Self::class(), archiveRootObject: rootObject, toFile: path] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedArchiverDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn outputFormat(&self) -> NSPropertyListFormat { - msg_send![self, outputFormat] - } - pub unsafe fn setOutputFormat(&self, outputFormat: NSPropertyListFormat) { - msg_send![self, setOutputFormat: outputFormat] - } - pub unsafe fn encodedData(&self) -> Id { - msg_send_id![self, encodedData] - } - pub unsafe fn finishEncoding(&self) { - msg_send![self, finishEncoding] - } - pub unsafe fn setClassName_forClass(codedName: Option<&NSString>, cls: &Class) { - msg_send![Self::class(), setClassName: codedName, forClass: cls] - } - pub unsafe fn setClassName_forClass(&self, codedName: Option<&NSString>, cls: &Class) { - msg_send![self, setClassName: codedName, forClass: cls] - } - pub unsafe fn classNameForClass(cls: &Class) -> Option> { - msg_send_id![Self::class(), classNameForClass: cls] - } - pub unsafe fn classNameForClass(&self, cls: &Class) -> Option> { - msg_send_id![self, classNameForClass: cls] - } - pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString) { - msg_send![self, encodeObject: object, forKey: key] - } + ) -> Id; + # [method_id (archivedDataWithRootObject :)] + pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id; + # [method (archiveRootObject : toFile :)] + pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedArchiverDelegate>); + #[method(outputFormat)] + pub unsafe fn outputFormat(&self) -> NSPropertyListFormat; + # [method (setOutputFormat :)] + pub unsafe fn setOutputFormat(&self, outputFormat: NSPropertyListFormat); + #[method_id(encodedData)] + pub unsafe fn encodedData(&self) -> Id; + #[method(finishEncoding)] + pub unsafe fn finishEncoding(&self); + # [method (setClassName : forClass :)] + pub unsafe fn setClassName_forClass(codedName: Option<&NSString>, cls: &Class); + # [method (setClassName : forClass :)] + pub unsafe fn setClassName_forClass(&self, codedName: Option<&NSString>, cls: &Class); + # [method_id (classNameForClass :)] + pub unsafe fn classNameForClass(cls: &Class) -> Option>; + # [method_id (classNameForClass :)] + pub unsafe fn classNameForClass(&self, cls: &Class) -> Option>; + # [method (encodeObject : forKey :)] + pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString); + # [method (encodeConditionalObject : forKey :)] pub unsafe fn encodeConditionalObject_forKey( &self, object: Option<&Object>, key: &NSString, - ) { - msg_send![self, encodeConditionalObject: object, forKey: key] - } - pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString) { - msg_send![self, encodeBool: value, forKey: key] - } - pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString) { - msg_send![self, encodeInt: value, forKey: key] - } - pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString) { - msg_send![self, encodeInt32: value, forKey: key] - } - pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString) { - msg_send![self, encodeInt64: value, forKey: key] - } - pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString) { - msg_send![self, encodeFloat: value, forKey: key] - } - pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString) { - msg_send![self, encodeDouble: value, forKey: key] - } + ); + # [method (encodeBool : forKey :)] + pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString); + # [method (encodeInt : forKey :)] + pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString); + # [method (encodeInt32 : forKey :)] + pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString); + # [method (encodeInt64 : forKey :)] + pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString); + # [method (encodeFloat : forKey :)] + pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString); + # [method (encodeDouble : forKey :)] + pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString); + # [method (encodeBytes : length : forKey :)] pub unsafe fn encodeBytes_length_forKey( &self, bytes: *mut u8, length: NSUInteger, key: &NSString, - ) { - msg_send![self, encodeBytes: bytes, length: length, forKey: key] - } - pub unsafe fn requiresSecureCoding(&self) -> bool { - msg_send![self, requiresSecureCoding] - } - pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool) { - msg_send![self, setRequiresSecureCoding: requiresSecureCoding] - } + ); + #[method(requiresSecureCoding)] + pub unsafe fn requiresSecureCoding(&self) -> bool; + # [method (setRequiresSecureCoding :)] + pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool); } ); extern_class!( @@ -134,170 +102,102 @@ extern_class!( ); extern_methods!( unsafe impl NSKeyedUnarchiver { + # [method_id (initForReadingFromData : error :)] pub unsafe fn initForReadingFromData_error( &self, data: &NSData, - ) -> Result, Id> { - msg_send_id![self, initForReadingFromData: data, error: _] - } + ) -> Result, Id>; + # [method_id (unarchivedObjectOfClass : fromData : error :)] pub unsafe fn unarchivedObjectOfClass_fromData_error( cls: &Class, data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedObjectOfClass: cls, - fromData: data, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (unarchivedArrayOfObjectsOfClass : fromData : error :)] pub unsafe fn unarchivedArrayOfObjectsOfClass_fromData_error( cls: &Class, data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedArrayOfObjectsOfClass: cls, - fromData: data, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (unarchivedDictionaryWithKeysOfClass : objectsOfClass : fromData : error :)] pub unsafe fn unarchivedDictionaryWithKeysOfClass_objectsOfClass_fromData_error( keyCls: &Class, valueCls: &Class, data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedDictionaryWithKeysOfClass: keyCls, - objectsOfClass: valueCls, - fromData: data, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (unarchivedObjectOfClasses : fromData : error :)] pub unsafe fn unarchivedObjectOfClasses_fromData_error( classes: &NSSet, data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedObjectOfClasses: classes, - fromData: data, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (unarchivedArrayOfObjectsOfClasses : fromData : error :)] pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( classes: &NSSet, data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedArrayOfObjectsOfClasses: classes, - fromData: data, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (unarchivedDictionaryWithKeysOfClasses : objectsOfClasses : fromData : error :)] pub unsafe fn unarchivedDictionaryWithKeysOfClasses_objectsOfClasses_fromData_error( keyClasses: &NSSet, valueClasses: &NSSet, data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchivedDictionaryWithKeysOfClasses: keyClasses, - objectsOfClasses: valueClasses, - fromData: data, - error: _ - ] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Id { - msg_send_id![self, initForReadingWithData: data] - } - pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option> { - msg_send_id![Self::class(), unarchiveObjectWithData: data] - } + ) -> Result, Id>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initForReadingWithData :)] + pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Id; + # [method_id (unarchiveObjectWithData :)] + pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option>; + # [method_id (unarchiveTopLevelObjectWithData : error :)] pub unsafe fn unarchiveTopLevelObjectWithData_error( data: &NSData, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - unarchiveTopLevelObjectWithData: data, - error: _ - ] - } - pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option> { - msg_send_id![Self::class(), unarchiveObjectWithFile: path] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedUnarchiverDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn finishDecoding(&self) { - msg_send![self, finishDecoding] - } - pub unsafe fn setClass_forClassName(cls: Option<&Class>, codedName: &NSString) { - msg_send![Self::class(), setClass: cls, forClassName: codedName] - } - pub unsafe fn setClass_forClassName(&self, cls: Option<&Class>, codedName: &NSString) { - msg_send![self, setClass: cls, forClassName: codedName] - } - pub unsafe fn classForClassName(codedName: &NSString) -> Option<&Class> { - msg_send![Self::class(), classForClassName: codedName] - } - pub unsafe fn classForClassName(&self, codedName: &NSString) -> Option<&Class> { - msg_send![self, classForClassName: codedName] - } - pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool { - msg_send![self, containsValueForKey: key] - } - pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, decodeObjectForKey: key] - } - pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool { - msg_send![self, decodeBoolForKey: key] - } - pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int { - msg_send![self, decodeIntForKey: key] - } - pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32 { - msg_send![self, decodeInt32ForKey: key] - } - pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t { - msg_send![self, decodeInt64ForKey: key] - } - pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float { - msg_send![self, decodeFloatForKey: key] - } - pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double { - msg_send![self, decodeDoubleForKey: key] - } + ) -> Result, Id>; + # [method_id (unarchiveObjectWithFile :)] + pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option>; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedUnarchiverDelegate>); + #[method(finishDecoding)] + pub unsafe fn finishDecoding(&self); + # [method (setClass : forClassName :)] + pub unsafe fn setClass_forClassName(cls: Option<&Class>, codedName: &NSString); + # [method (setClass : forClassName :)] + pub unsafe fn setClass_forClassName(&self, cls: Option<&Class>, codedName: &NSString); + # [method (classForClassName :)] + pub unsafe fn classForClassName(codedName: &NSString) -> Option<&Class>; + # [method (classForClassName :)] + pub unsafe fn classForClassName(&self, codedName: &NSString) -> Option<&Class>; + # [method (containsValueForKey :)] + pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; + # [method_id (decodeObjectForKey :)] + pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option>; + # [method (decodeBoolForKey :)] + pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool; + # [method (decodeIntForKey :)] + pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int; + # [method (decodeInt32ForKey :)] + pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32; + # [method (decodeInt64ForKey :)] + pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t; + # [method (decodeFloatForKey :)] + pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float; + # [method (decodeDoubleForKey :)] + pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double; + # [method (decodeBytesForKey : returnedLength :)] pub unsafe fn decodeBytesForKey_returnedLength( &self, key: &NSString, lengthp: *mut NSUInteger, - ) -> *mut u8 { - msg_send![self, decodeBytesForKey: key, returnedLength: lengthp] - } - pub unsafe fn requiresSecureCoding(&self) -> bool { - msg_send![self, requiresSecureCoding] - } - pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool) { - msg_send![self, setRequiresSecureCoding: requiresSecureCoding] - } - pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy { - msg_send![self, decodingFailurePolicy] - } + ) -> *mut u8; + #[method(requiresSecureCoding)] + pub unsafe fn requiresSecureCoding(&self) -> bool; + # [method (setRequiresSecureCoding :)] + pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool); + #[method(decodingFailurePolicy)] + pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy; + # [method (setDecodingFailurePolicy :)] pub unsafe fn setDecodingFailurePolicy( &self, decodingFailurePolicy: NSDecodingFailurePolicy, - ) { - msg_send![self, setDecodingFailurePolicy: decodingFailurePolicy] - } + ); } ); pub type NSKeyedArchiverDelegate = NSObject; @@ -305,25 +205,21 @@ pub type NSKeyedUnarchiverDelegate = NSObject; extern_methods!( #[doc = "NSKeyedArchiverObjectSubstitution"] unsafe impl NSObject { - pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class> { - msg_send![self, classForKeyedArchiver] - } + #[method(classForKeyedArchiver)] + pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class>; + # [method_id (replacementObjectForKeyedArchiver :)] pub unsafe fn replacementObjectForKeyedArchiver( &self, archiver: &NSKeyedArchiver, - ) -> Option> { - msg_send_id![self, replacementObjectForKeyedArchiver: archiver] - } - pub unsafe fn classFallbacksForKeyedArchiver() -> Id, Shared> { - msg_send_id![Self::class(), classFallbacksForKeyedArchiver] - } + ) -> Option>; + #[method_id(classFallbacksForKeyedArchiver)] + pub unsafe fn classFallbacksForKeyedArchiver() -> Id, Shared>; } ); extern_methods!( #[doc = "NSKeyedUnarchiverObjectSubstitution"] unsafe impl NSObject { - pub unsafe fn classForKeyedUnarchiver() -> &Class { - msg_send![Self::class(), classForKeyedUnarchiver] - } + #[method(classForKeyedUnarchiver)] + pub unsafe fn classForKeyedUnarchiver() -> &Class; } ); diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index aaa2f895a..3d76af7c9 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSLengthFormatter; @@ -12,60 +12,44 @@ extern_class!( ); extern_methods!( unsafe impl NSLengthFormatter { - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] - } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn isForPersonHeightUse(&self) -> bool { - msg_send![self, isForPersonHeightUse] - } - pub unsafe fn setForPersonHeightUse(&self, forPersonHeightUse: bool) { - msg_send![self, setForPersonHeightUse: forPersonHeightUse] - } + #[method_id(numberFormatter)] + pub unsafe fn numberFormatter(&self) -> Id; + # [method (setNumberFormatter :)] + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); + #[method(unitStyle)] + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; + # [method (setUnitStyle :)] + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); + #[method(isForPersonHeightUse)] + pub unsafe fn isForPersonHeightUse(&self) -> bool; + # [method (setForPersonHeightUse :)] + pub unsafe fn setForPersonHeightUse(&self, forPersonHeightUse: bool); + # [method_id (stringFromValue : unit :)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSLengthFormatterUnit, - ) -> Id { - msg_send_id![self, stringFromValue: value, unit: unit] - } - pub unsafe fn stringFromMeters(&self, numberInMeters: c_double) -> Id { - msg_send_id![self, stringFromMeters: numberInMeters] - } + ) -> Id; + # [method_id (stringFromMeters :)] + pub unsafe fn stringFromMeters(&self, numberInMeters: c_double) -> Id; + # [method_id (unitStringFromValue : unit :)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSLengthFormatterUnit, - ) -> Id { - msg_send_id![self, unitStringFromValue: value, unit: unit] - } + ) -> Id; + # [method_id (unitStringFromMeters : usedUnit :)] pub unsafe fn unitStringFromMeters_usedUnit( &self, numberInMeters: c_double, unitp: *mut NSLengthFormatterUnit, - ) -> Id { - msg_send_id![self, unitStringFromMeters: numberInMeters, usedUnit: unitp] - } + ) -> Id; + # [method (getObjectValue : forString : errorDescription :)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, string: &NSString, error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } + ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 7a18d7e87..1fe2d6856 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSLinguisticTagScheme = NSString; pub type NSLinguisticTag = NSString; extern_class!( @@ -18,72 +18,54 @@ extern_class!( ); extern_methods!( unsafe impl NSLinguisticTagger { + # [method_id (initWithTagSchemes : options :)] pub unsafe fn initWithTagSchemes_options( &self, tagSchemes: &NSArray, opts: NSUInteger, - ) -> Id { - msg_send_id![self, initWithTagSchemes: tagSchemes, options: opts] - } - pub unsafe fn tagSchemes(&self) -> Id, Shared> { - msg_send_id![self, tagSchemes] - } - pub unsafe fn string(&self) -> Option> { - msg_send_id![self, string] - } - pub unsafe fn setString(&self, string: Option<&NSString>) { - msg_send![self, setString: string] - } + ) -> Id; + #[method_id(tagSchemes)] + pub unsafe fn tagSchemes(&self) -> Id, Shared>; + #[method_id(string)] + pub unsafe fn string(&self) -> Option>; + # [method (setString :)] + pub unsafe fn setString(&self, string: Option<&NSString>); + # [method_id (availableTagSchemesForUnit : language :)] pub unsafe fn availableTagSchemesForUnit_language( unit: NSLinguisticTaggerUnit, language: &NSString, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - availableTagSchemesForUnit: unit, - language: language - ] - } + ) -> Id, Shared>; + # [method_id (availableTagSchemesForLanguage :)] pub unsafe fn availableTagSchemesForLanguage( language: &NSString, - ) -> Id, Shared> { - msg_send_id![Self::class(), availableTagSchemesForLanguage: language] - } + ) -> Id, Shared>; + # [method (setOrthography : range :)] pub unsafe fn setOrthography_range( &self, orthography: Option<&NSOrthography>, range: NSRange, - ) { - msg_send![self, setOrthography: orthography, range: range] - } + ); + # [method_id (orthographyAtIndex : effectiveRange :)] pub unsafe fn orthographyAtIndex_effectiveRange( &self, charIndex: NSUInteger, effectiveRange: NSRangePointer, - ) -> Option> { - msg_send_id![ - self, - orthographyAtIndex: charIndex, - effectiveRange: effectiveRange - ] - } + ) -> Option>; + # [method (stringEditedInRange : changeInLength :)] pub unsafe fn stringEditedInRange_changeInLength( &self, newRange: NSRange, delta: NSInteger, - ) { - msg_send![self, stringEditedInRange: newRange, changeInLength: delta] - } + ); + # [method (tokenRangeAtIndex : unit :)] pub unsafe fn tokenRangeAtIndex_unit( &self, charIndex: NSUInteger, unit: NSLinguisticTaggerUnit, - ) -> NSRange { - msg_send![self, tokenRangeAtIndex: charIndex, unit: unit] - } - pub unsafe fn sentenceRangeForRange(&self, range: NSRange) -> NSRange { - msg_send![self, sentenceRangeForRange: range] - } + ) -> NSRange; + # [method (sentenceRangeForRange :)] + pub unsafe fn sentenceRangeForRange(&self, range: NSRange) -> NSRange; + # [method (enumerateTagsInRange : unit : scheme : options : usingBlock :)] pub unsafe fn enumerateTagsInRange_unit_scheme_options_usingBlock( &self, range: NSRange, @@ -91,31 +73,16 @@ extern_methods!( scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateTagsInRange: range, - unit: unit, - scheme: scheme, - options: options, - usingBlock: block - ] - } + ); + # [method_id (tagAtIndex : unit : scheme : tokenRange :)] pub unsafe fn tagAtIndex_unit_scheme_tokenRange( &self, charIndex: NSUInteger, unit: NSLinguisticTaggerUnit, scheme: &NSLinguisticTagScheme, tokenRange: NSRangePointer, - ) -> Option> { - msg_send_id![ - self, - tagAtIndex: charIndex, - unit: unit, - scheme: scheme, - tokenRange: tokenRange - ] - } + ) -> Option>; + # [method_id (tagsInRange : unit : scheme : options : tokenRanges :)] pub unsafe fn tagsInRange_unit_scheme_options_tokenRanges( &self, range: NSRange, @@ -123,67 +90,36 @@ extern_methods!( scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, tokenRanges: Option<&mut Option, Shared>>>, - ) -> Id, Shared> { - msg_send_id![ - self, - tagsInRange: range, - unit: unit, - scheme: scheme, - options: options, - tokenRanges: tokenRanges - ] - } + ) -> Id, Shared>; + # [method (enumerateTagsInRange : scheme : options : usingBlock :)] pub unsafe fn enumerateTagsInRange_scheme_options_usingBlock( &self, range: NSRange, tagScheme: &NSLinguisticTagScheme, opts: NSLinguisticTaggerOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateTagsInRange: range, - scheme: tagScheme, - options: opts, - usingBlock: block - ] - } + ); + # [method_id (tagAtIndex : scheme : tokenRange : sentenceRange :)] pub unsafe fn tagAtIndex_scheme_tokenRange_sentenceRange( &self, charIndex: NSUInteger, scheme: &NSLinguisticTagScheme, tokenRange: NSRangePointer, sentenceRange: NSRangePointer, - ) -> Option> { - msg_send_id![ - self, - tagAtIndex: charIndex, - scheme: scheme, - tokenRange: tokenRange, - sentenceRange: sentenceRange - ] - } + ) -> Option>; + # [method_id (tagsInRange : scheme : options : tokenRanges :)] pub unsafe fn tagsInRange_scheme_options_tokenRanges( &self, range: NSRange, tagScheme: &NSString, opts: NSLinguisticTaggerOptions, tokenRanges: Option<&mut Option, Shared>>>, - ) -> Id, Shared> { - msg_send_id![ - self, - tagsInRange: range, - scheme: tagScheme, - options: opts, - tokenRanges: tokenRanges - ] - } - pub unsafe fn dominantLanguage(&self) -> Option> { - msg_send_id![self, dominantLanguage] - } - pub unsafe fn dominantLanguageForString(string: &NSString) -> Option> { - msg_send_id![Self::class(), dominantLanguageForString: string] - } + ) -> Id, Shared>; + #[method_id(dominantLanguage)] + pub unsafe fn dominantLanguage(&self) -> Option>; + # [method_id (dominantLanguageForString :)] + pub unsafe fn dominantLanguageForString(string: &NSString) -> Option>; + # [method_id (tagForString : atIndex : unit : scheme : orthography : tokenRange :)] pub unsafe fn tagForString_atIndex_unit_scheme_orthography_tokenRange( string: &NSString, charIndex: NSUInteger, @@ -191,17 +127,8 @@ extern_methods!( scheme: &NSLinguisticTagScheme, orthography: Option<&NSOrthography>, tokenRange: NSRangePointer, - ) -> Option> { - msg_send_id![ - Self::class(), - tagForString: string, - atIndex: charIndex, - unit: unit, - scheme: scheme, - orthography: orthography, - tokenRange: tokenRange - ] - } + ) -> Option>; + # [method_id (tagsForString : range : unit : scheme : options : orthography : tokenRanges :)] pub unsafe fn tagsForString_range_unit_scheme_options_orthography_tokenRanges( string: &NSString, range: NSRange, @@ -210,18 +137,8 @@ extern_methods!( options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, tokenRanges: Option<&mut Option, Shared>>>, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - tagsForString: string, - range: range, - unit: unit, - scheme: scheme, - options: options, - orthography: orthography, - tokenRanges: tokenRanges - ] - } + ) -> Id, Shared>; + # [method (enumerateTagsForString : range : unit : scheme : options : orthography : usingBlock :)] pub unsafe fn enumerateTagsForString_range_unit_scheme_options_orthography_usingBlock( string: &NSString, range: NSRange, @@ -230,18 +147,8 @@ extern_methods!( options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, block: TodoBlock, - ) { - msg_send![ - Self::class(), - enumerateTagsForString: string, - range: range, - unit: unit, - scheme: scheme, - options: options, - orthography: orthography, - usingBlock: block - ] - } + ); + # [method_id (possibleTagsAtIndex : scheme : tokenRange : sentenceRange : scores :)] pub unsafe fn possibleTagsAtIndex_scheme_tokenRange_sentenceRange_scores( &self, charIndex: NSUInteger, @@ -249,21 +156,13 @@ extern_methods!( tokenRange: NSRangePointer, sentenceRange: NSRangePointer, scores: Option<&mut Option, Shared>>>, - ) -> Option, Shared>> { - msg_send_id![ - self, - possibleTagsAtIndex: charIndex, - scheme: tagScheme, - tokenRange: tokenRange, - sentenceRange: sentenceRange, - scores: scores - ] - } + ) -> Option, Shared>>; } ); extern_methods!( #[doc = "NSLinguisticAnalysis"] unsafe impl NSString { + # [method_id (linguisticTagsInRange : scheme : options : orthography : tokenRanges :)] pub unsafe fn linguisticTagsInRange_scheme_options_orthography_tokenRanges( &self, range: NSRange, @@ -271,16 +170,8 @@ extern_methods!( options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, tokenRanges: Option<&mut Option, Shared>>>, - ) -> Id, Shared> { - msg_send_id![ - self, - linguisticTagsInRange: range, - scheme: scheme, - options: options, - orthography: orthography, - tokenRanges: tokenRanges - ] - } + ) -> Id, Shared>; + # [method (enumerateLinguisticTagsInRange : scheme : options : orthography : usingBlock :)] pub unsafe fn enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock( &self, range: NSRange, @@ -288,15 +179,6 @@ extern_methods!( options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, block: TodoBlock, - ) { - msg_send![ - self, - enumerateLinguisticTagsInRange: range, - scheme: scheme, - options: options, - orthography: orthography, - usingBlock: block - ] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index c07f79add..eccc864b4 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSListFormatter; @@ -14,31 +14,24 @@ extern_class!( ); extern_methods!( unsafe impl NSListFormatter { - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn itemFormatter(&self) -> Option> { - msg_send_id![self, itemFormatter] - } - pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>) { - msg_send![self, setItemFormatter: itemFormatter] - } + #[method_id(locale)] + pub unsafe fn locale(&self) -> Id; + # [method (setLocale :)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(itemFormatter)] + pub unsafe fn itemFormatter(&self) -> Option>; + # [method (setItemFormatter :)] + pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>); + # [method_id (localizedStringByJoiningStrings :)] pub unsafe fn localizedStringByJoiningStrings( strings: &NSArray, - ) -> Id { - msg_send_id![Self::class(), localizedStringByJoiningStrings: strings] - } - pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option> { - msg_send_id![self, stringFromItems: items] - } + ) -> Id; + # [method_id (stringFromItems :)] + pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option>; + # [method_id (stringForObjectValue :)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 98c30fd4f..7ca17c40a 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSLocaleKey = NSString; use super::__exported::NSArray; use super::__exported::NSDictionary; @@ -19,227 +19,164 @@ extern_class!( ); extern_methods!( unsafe impl NSLocale { - pub unsafe fn objectForKey(&self, key: &NSLocaleKey) -> Option> { - msg_send_id![self, objectForKey: key] - } + # [method_id (objectForKey :)] + pub unsafe fn objectForKey(&self, key: &NSLocaleKey) -> Option>; + # [method_id (displayNameForKey : value :)] pub unsafe fn displayNameForKey_value( &self, key: &NSLocaleKey, value: &Object, - ) -> Option> { - msg_send_id![self, displayNameForKey: key, value: value] - } - pub unsafe fn initWithLocaleIdentifier(&self, string: &NSString) -> Id { - msg_send_id![self, initWithLocaleIdentifier: string] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ) -> Option>; + # [method_id (initWithLocaleIdentifier :)] + pub unsafe fn initWithLocaleIdentifier(&self, string: &NSString) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedLocale"] unsafe impl NSLocale { - pub unsafe fn localeIdentifier(&self) -> Id { - msg_send_id![self, localeIdentifier] - } + #[method_id(localeIdentifier)] + pub unsafe fn localeIdentifier(&self) -> Id; + # [method_id (localizedStringForLocaleIdentifier :)] pub unsafe fn localizedStringForLocaleIdentifier( &self, localeIdentifier: &NSString, - ) -> Id { - msg_send_id![self, localizedStringForLocaleIdentifier: localeIdentifier] - } - pub unsafe fn languageCode(&self) -> Id { - msg_send_id![self, languageCode] - } + ) -> Id; + #[method_id(languageCode)] + pub unsafe fn languageCode(&self) -> Id; + # [method_id (localizedStringForLanguageCode :)] pub unsafe fn localizedStringForLanguageCode( &self, languageCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForLanguageCode: languageCode] - } - pub unsafe fn countryCode(&self) -> Option> { - msg_send_id![self, countryCode] - } + ) -> Option>; + #[method_id(countryCode)] + pub unsafe fn countryCode(&self) -> Option>; + # [method_id (localizedStringForCountryCode :)] pub unsafe fn localizedStringForCountryCode( &self, countryCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForCountryCode: countryCode] - } - pub unsafe fn scriptCode(&self) -> Option> { - msg_send_id![self, scriptCode] - } + ) -> Option>; + #[method_id(scriptCode)] + pub unsafe fn scriptCode(&self) -> Option>; + # [method_id (localizedStringForScriptCode :)] pub unsafe fn localizedStringForScriptCode( &self, scriptCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForScriptCode: scriptCode] - } - pub unsafe fn variantCode(&self) -> Option> { - msg_send_id![self, variantCode] - } + ) -> Option>; + #[method_id(variantCode)] + pub unsafe fn variantCode(&self) -> Option>; + # [method_id (localizedStringForVariantCode :)] pub unsafe fn localizedStringForVariantCode( &self, variantCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForVariantCode: variantCode] - } - pub unsafe fn exemplarCharacterSet(&self) -> Id { - msg_send_id![self, exemplarCharacterSet] - } - pub unsafe fn calendarIdentifier(&self) -> Id { - msg_send_id![self, calendarIdentifier] - } + ) -> Option>; + #[method_id(exemplarCharacterSet)] + pub unsafe fn exemplarCharacterSet(&self) -> Id; + #[method_id(calendarIdentifier)] + pub unsafe fn calendarIdentifier(&self) -> Id; + # [method_id (localizedStringForCalendarIdentifier :)] pub unsafe fn localizedStringForCalendarIdentifier( &self, calendarIdentifier: &NSString, - ) -> Option> { - msg_send_id![ - self, - localizedStringForCalendarIdentifier: calendarIdentifier - ] - } - pub unsafe fn collationIdentifier(&self) -> Option> { - msg_send_id![self, collationIdentifier] - } + ) -> Option>; + #[method_id(collationIdentifier)] + pub unsafe fn collationIdentifier(&self) -> Option>; + # [method_id (localizedStringForCollationIdentifier :)] pub unsafe fn localizedStringForCollationIdentifier( &self, collationIdentifier: &NSString, - ) -> Option> { - msg_send_id![ - self, - localizedStringForCollationIdentifier: collationIdentifier - ] - } - pub unsafe fn usesMetricSystem(&self) -> bool { - msg_send![self, usesMetricSystem] - } - pub unsafe fn decimalSeparator(&self) -> Id { - msg_send_id![self, decimalSeparator] - } - pub unsafe fn groupingSeparator(&self) -> Id { - msg_send_id![self, groupingSeparator] - } - pub unsafe fn currencySymbol(&self) -> Id { - msg_send_id![self, currencySymbol] - } - pub unsafe fn currencyCode(&self) -> Option> { - msg_send_id![self, currencyCode] - } + ) -> Option>; + #[method(usesMetricSystem)] + pub unsafe fn usesMetricSystem(&self) -> bool; + #[method_id(decimalSeparator)] + pub unsafe fn decimalSeparator(&self) -> Id; + #[method_id(groupingSeparator)] + pub unsafe fn groupingSeparator(&self) -> Id; + #[method_id(currencySymbol)] + pub unsafe fn currencySymbol(&self) -> Id; + #[method_id(currencyCode)] + pub unsafe fn currencyCode(&self) -> Option>; + # [method_id (localizedStringForCurrencyCode :)] pub unsafe fn localizedStringForCurrencyCode( &self, currencyCode: &NSString, - ) -> Option> { - msg_send_id![self, localizedStringForCurrencyCode: currencyCode] - } - pub unsafe fn collatorIdentifier(&self) -> Id { - msg_send_id![self, collatorIdentifier] - } + ) -> Option>; + #[method_id(collatorIdentifier)] + pub unsafe fn collatorIdentifier(&self) -> Id; + # [method_id (localizedStringForCollatorIdentifier :)] pub unsafe fn localizedStringForCollatorIdentifier( &self, collatorIdentifier: &NSString, - ) -> Option> { - msg_send_id![ - self, - localizedStringForCollatorIdentifier: collatorIdentifier - ] - } - pub unsafe fn quotationBeginDelimiter(&self) -> Id { - msg_send_id![self, quotationBeginDelimiter] - } - pub unsafe fn quotationEndDelimiter(&self) -> Id { - msg_send_id![self, quotationEndDelimiter] - } - pub unsafe fn alternateQuotationBeginDelimiter(&self) -> Id { - msg_send_id![self, alternateQuotationBeginDelimiter] - } - pub unsafe fn alternateQuotationEndDelimiter(&self) -> Id { - msg_send_id![self, alternateQuotationEndDelimiter] - } + ) -> Option>; + #[method_id(quotationBeginDelimiter)] + pub unsafe fn quotationBeginDelimiter(&self) -> Id; + #[method_id(quotationEndDelimiter)] + pub unsafe fn quotationEndDelimiter(&self) -> Id; + #[method_id(alternateQuotationBeginDelimiter)] + pub unsafe fn alternateQuotationBeginDelimiter(&self) -> Id; + #[method_id(alternateQuotationEndDelimiter)] + pub unsafe fn alternateQuotationEndDelimiter(&self) -> Id; } ); extern_methods!( #[doc = "NSLocaleCreation"] unsafe impl NSLocale { - pub unsafe fn autoupdatingCurrentLocale() -> Id { - msg_send_id![Self::class(), autoupdatingCurrentLocale] - } - pub unsafe fn currentLocale() -> Id { - msg_send_id![Self::class(), currentLocale] - } - pub unsafe fn systemLocale() -> Id { - msg_send_id![Self::class(), systemLocale] - } - pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id { - msg_send_id![Self::class(), localeWithLocaleIdentifier: ident] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method_id(autoupdatingCurrentLocale)] + pub unsafe fn autoupdatingCurrentLocale() -> Id; + #[method_id(currentLocale)] + pub unsafe fn currentLocale() -> Id; + #[method_id(systemLocale)] + pub unsafe fn systemLocale() -> Id; + # [method_id (localeWithLocaleIdentifier :)] + pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; } ); extern_methods!( #[doc = "NSLocaleGeneralInfo"] unsafe impl NSLocale { - pub unsafe fn availableLocaleIdentifiers() -> Id, Shared> { - msg_send_id![Self::class(), availableLocaleIdentifiers] - } - pub unsafe fn ISOLanguageCodes() -> Id, Shared> { - msg_send_id![Self::class(), ISOLanguageCodes] - } - pub unsafe fn ISOCountryCodes() -> Id, Shared> { - msg_send_id![Self::class(), ISOCountryCodes] - } - pub unsafe fn ISOCurrencyCodes() -> Id, Shared> { - msg_send_id![Self::class(), ISOCurrencyCodes] - } - pub unsafe fn commonISOCurrencyCodes() -> Id, Shared> { - msg_send_id![Self::class(), commonISOCurrencyCodes] - } - pub unsafe fn preferredLanguages() -> Id, Shared> { - msg_send_id![Self::class(), preferredLanguages] - } + #[method_id(availableLocaleIdentifiers)] + pub unsafe fn availableLocaleIdentifiers() -> Id, Shared>; + #[method_id(ISOLanguageCodes)] + pub unsafe fn ISOLanguageCodes() -> Id, Shared>; + #[method_id(ISOCountryCodes)] + pub unsafe fn ISOCountryCodes() -> Id, Shared>; + #[method_id(ISOCurrencyCodes)] + pub unsafe fn ISOCurrencyCodes() -> Id, Shared>; + #[method_id(commonISOCurrencyCodes)] + pub unsafe fn commonISOCurrencyCodes() -> Id, Shared>; + #[method_id(preferredLanguages)] + pub unsafe fn preferredLanguages() -> Id, Shared>; + # [method_id (componentsFromLocaleIdentifier :)] pub unsafe fn componentsFromLocaleIdentifier( string: &NSString, - ) -> Id, Shared> { - msg_send_id![Self::class(), componentsFromLocaleIdentifier: string] - } + ) -> Id, Shared>; + # [method_id (localeIdentifierFromComponents :)] pub unsafe fn localeIdentifierFromComponents( dict: &NSDictionary, - ) -> Id { - msg_send_id![Self::class(), localeIdentifierFromComponents: dict] - } + ) -> Id; + # [method_id (canonicalLocaleIdentifierFromString :)] pub unsafe fn canonicalLocaleIdentifierFromString( string: &NSString, - ) -> Id { - msg_send_id![Self::class(), canonicalLocaleIdentifierFromString: string] - } + ) -> Id; + # [method_id (canonicalLanguageIdentifierFromString :)] pub unsafe fn canonicalLanguageIdentifierFromString( string: &NSString, - ) -> Id { - msg_send_id![Self::class(), canonicalLanguageIdentifierFromString: string] - } + ) -> Id; + # [method_id (localeIdentifierFromWindowsLocaleCode :)] pub unsafe fn localeIdentifierFromWindowsLocaleCode( lcid: u32, - ) -> Option> { - msg_send_id![Self::class(), localeIdentifierFromWindowsLocaleCode: lcid] - } - pub unsafe fn windowsLocaleCodeFromLocaleIdentifier(localeIdentifier: &NSString) -> u32 { - msg_send![ - Self::class(), - windowsLocaleCodeFromLocaleIdentifier: localeIdentifier - ] - } + ) -> Option>; + # [method (windowsLocaleCodeFromLocaleIdentifier :)] + pub unsafe fn windowsLocaleCodeFromLocaleIdentifier(localeIdentifier: &NSString) -> u32; + # [method (characterDirectionForLanguage :)] pub unsafe fn characterDirectionForLanguage( isoLangCode: &NSString, - ) -> NSLocaleLanguageDirection { - msg_send![Self::class(), characterDirectionForLanguage: isoLangCode] - } - pub unsafe fn lineDirectionForLanguage( - isoLangCode: &NSString, - ) -> NSLocaleLanguageDirection { - msg_send![Self::class(), lineDirectionForLanguage: isoLangCode] - } + ) -> NSLocaleLanguageDirection; + # [method (lineDirectionForLanguage :)] + pub unsafe fn lineDirectionForLanguage(isoLangCode: &NSString) + -> NSLocaleLanguageDirection; } ); diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index 39d663984..d485b5109 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSLocking = NSObject; extern_class!( #[derive(Debug)] @@ -14,18 +14,14 @@ extern_class!( ); extern_methods!( unsafe impl NSLock { - pub unsafe fn tryLock(&self) -> bool { - msg_send![self, tryLock] - } - pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { - msg_send![self, lockBeforeDate: limit] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } + #[method(tryLock)] + pub unsafe fn tryLock(&self) -> bool; + # [method (lockBeforeDate :)] + pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + # [method (setName :)] + pub unsafe fn setName(&self, name: Option<&NSString>); } ); extern_class!( @@ -37,40 +33,30 @@ extern_class!( ); extern_methods!( unsafe impl NSConditionLock { - pub unsafe fn initWithCondition(&self, condition: NSInteger) -> Id { - msg_send_id![self, initWithCondition: condition] - } - pub unsafe fn condition(&self) -> NSInteger { - msg_send![self, condition] - } - pub unsafe fn lockWhenCondition(&self, condition: NSInteger) { - msg_send![self, lockWhenCondition: condition] - } - pub unsafe fn tryLock(&self) -> bool { - msg_send![self, tryLock] - } - pub unsafe fn tryLockWhenCondition(&self, condition: NSInteger) -> bool { - msg_send![self, tryLockWhenCondition: condition] - } - pub unsafe fn unlockWithCondition(&self, condition: NSInteger) { - msg_send![self, unlockWithCondition: condition] - } - pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { - msg_send![self, lockBeforeDate: limit] - } + # [method_id (initWithCondition :)] + pub unsafe fn initWithCondition(&self, condition: NSInteger) -> Id; + #[method(condition)] + pub unsafe fn condition(&self) -> NSInteger; + # [method (lockWhenCondition :)] + pub unsafe fn lockWhenCondition(&self, condition: NSInteger); + #[method(tryLock)] + pub unsafe fn tryLock(&self) -> bool; + # [method (tryLockWhenCondition :)] + pub unsafe fn tryLockWhenCondition(&self, condition: NSInteger) -> bool; + # [method (unlockWithCondition :)] + pub unsafe fn unlockWithCondition(&self, condition: NSInteger); + # [method (lockBeforeDate :)] + pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; + # [method (lockWhenCondition : beforeDate :)] pub unsafe fn lockWhenCondition_beforeDate( &self, condition: NSInteger, limit: &NSDate, - ) -> bool { - msg_send![self, lockWhenCondition: condition, beforeDate: limit] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } + ) -> bool; + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + # [method (setName :)] + pub unsafe fn setName(&self, name: Option<&NSString>); } ); extern_class!( @@ -82,18 +68,14 @@ extern_class!( ); extern_methods!( unsafe impl NSRecursiveLock { - pub unsafe fn tryLock(&self) -> bool { - msg_send![self, tryLock] - } - pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool { - msg_send![self, lockBeforeDate: limit] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } + #[method(tryLock)] + pub unsafe fn tryLock(&self) -> bool; + # [method (lockBeforeDate :)] + pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + # [method (setName :)] + pub unsafe fn setName(&self, name: Option<&NSString>); } ); extern_class!( @@ -105,23 +87,17 @@ extern_class!( ); extern_methods!( unsafe impl NSCondition { - pub unsafe fn wait(&self) { - msg_send![self, wait] - } - pub unsafe fn waitUntilDate(&self, limit: &NSDate) -> bool { - msg_send![self, waitUntilDate: limit] - } - pub unsafe fn signal(&self) { - msg_send![self, signal] - } - pub unsafe fn broadcast(&self) { - msg_send![self, broadcast] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } + #[method(wait)] + pub unsafe fn wait(&self); + # [method (waitUntilDate :)] + pub unsafe fn waitUntilDate(&self, limit: &NSDate) -> bool; + #[method(signal)] + pub unsafe fn signal(&self); + #[method(broadcast)] + pub unsafe fn broadcast(&self); + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + # [method (setName :)] + pub unsafe fn setName(&self, name: Option<&NSString>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 161985f53..d47dcbacb 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSMapTableOptions = NSUInteger; __inner_extern_class!( #[derive(Debug)] @@ -17,105 +17,67 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMapTable { + # [method_id (initWithKeyOptions : valueOptions : capacity :)] pub unsafe fn initWithKeyOptions_valueOptions_capacity( &self, keyOptions: NSPointerFunctionsOptions, valueOptions: NSPointerFunctionsOptions, initialCapacity: NSUInteger, - ) -> Id { - msg_send_id![ - self, - initWithKeyOptions: keyOptions, - valueOptions: valueOptions, - capacity: initialCapacity - ] - } + ) -> Id; + # [method_id (initWithKeyPointerFunctions : valuePointerFunctions : capacity :)] pub unsafe fn initWithKeyPointerFunctions_valuePointerFunctions_capacity( &self, keyFunctions: &NSPointerFunctions, valueFunctions: &NSPointerFunctions, initialCapacity: NSUInteger, - ) -> Id { - msg_send_id![ - self, - initWithKeyPointerFunctions: keyFunctions, - valuePointerFunctions: valueFunctions, - capacity: initialCapacity - ] - } + ) -> Id; + # [method_id (mapTableWithKeyOptions : valueOptions :)] pub unsafe fn mapTableWithKeyOptions_valueOptions( keyOptions: NSPointerFunctionsOptions, valueOptions: NSPointerFunctionsOptions, - ) -> Id, Shared> { - msg_send_id![ - Self::class(), - mapTableWithKeyOptions: keyOptions, - valueOptions: valueOptions - ] - } - pub unsafe fn mapTableWithStrongToStrongObjects() -> Id { - msg_send_id![Self::class(), mapTableWithStrongToStrongObjects] - } - pub unsafe fn mapTableWithWeakToStrongObjects() -> Id { - msg_send_id![Self::class(), mapTableWithWeakToStrongObjects] - } - pub unsafe fn mapTableWithStrongToWeakObjects() -> Id { - msg_send_id![Self::class(), mapTableWithStrongToWeakObjects] - } - pub unsafe fn mapTableWithWeakToWeakObjects() -> Id { - msg_send_id![Self::class(), mapTableWithWeakToWeakObjects] - } - pub unsafe fn strongToStrongObjectsMapTable() -> Id, Shared> - { - msg_send_id![Self::class(), strongToStrongObjectsMapTable] - } - pub unsafe fn weakToStrongObjectsMapTable() -> Id, Shared> { - msg_send_id![Self::class(), weakToStrongObjectsMapTable] - } - pub unsafe fn strongToWeakObjectsMapTable() -> Id, Shared> { - msg_send_id![Self::class(), strongToWeakObjectsMapTable] - } - pub unsafe fn weakToWeakObjectsMapTable() -> Id, Shared> { - msg_send_id![Self::class(), weakToWeakObjectsMapTable] - } - pub unsafe fn keyPointerFunctions(&self) -> Id { - msg_send_id![self, keyPointerFunctions] - } - pub unsafe fn valuePointerFunctions(&self) -> Id { - msg_send_id![self, valuePointerFunctions] - } - pub unsafe fn objectForKey( - &self, - aKey: Option<&KeyType>, - ) -> Option> { - msg_send_id![self, objectForKey: aKey] - } - pub unsafe fn removeObjectForKey(&self, aKey: Option<&KeyType>) { - msg_send![self, removeObjectForKey: aKey] - } + ) -> Id, Shared>; + #[method_id(mapTableWithStrongToStrongObjects)] + pub unsafe fn mapTableWithStrongToStrongObjects() -> Id; + #[method_id(mapTableWithWeakToStrongObjects)] + pub unsafe fn mapTableWithWeakToStrongObjects() -> Id; + #[method_id(mapTableWithStrongToWeakObjects)] + pub unsafe fn mapTableWithStrongToWeakObjects() -> Id; + #[method_id(mapTableWithWeakToWeakObjects)] + pub unsafe fn mapTableWithWeakToWeakObjects() -> Id; + #[method_id(strongToStrongObjectsMapTable)] + pub unsafe fn strongToStrongObjectsMapTable() -> Id, Shared>; + #[method_id(weakToStrongObjectsMapTable)] + pub unsafe fn weakToStrongObjectsMapTable() -> Id, Shared>; + #[method_id(strongToWeakObjectsMapTable)] + pub unsafe fn strongToWeakObjectsMapTable() -> Id, Shared>; + #[method_id(weakToWeakObjectsMapTable)] + pub unsafe fn weakToWeakObjectsMapTable() -> Id, Shared>; + #[method_id(keyPointerFunctions)] + pub unsafe fn keyPointerFunctions(&self) -> Id; + #[method_id(valuePointerFunctions)] + pub unsafe fn valuePointerFunctions(&self) -> Id; + # [method_id (objectForKey :)] + pub unsafe fn objectForKey(&self, aKey: Option<&KeyType>) + -> Option>; + # [method (removeObjectForKey :)] + pub unsafe fn removeObjectForKey(&self, aKey: Option<&KeyType>); + # [method (setObject : forKey :)] pub unsafe fn setObject_forKey( &self, anObject: Option<&ObjectType>, aKey: Option<&KeyType>, - ) { - msg_send![self, setObject: anObject, forKey: aKey] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn keyEnumerator(&self) -> Id, Shared> { - msg_send_id![self, keyEnumerator] - } - pub unsafe fn objectEnumerator(&self) -> Option, Shared>> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } + ); + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + #[method_id(keyEnumerator)] + pub unsafe fn keyEnumerator(&self) -> Id, Shared>; + #[method_id(objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Option, Shared>>; + #[method(removeAllObjects)] + pub unsafe fn removeAllObjects(&self); + #[method_id(dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation( &self, - ) -> Id, Shared> { - msg_send_id![self, dictionaryRepresentation] - } + ) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 5f1461cbb..6d4d3b0b1 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSMassFormatter; @@ -13,67 +13,47 @@ extern_class!( ); extern_methods!( unsafe impl NSMassFormatter { - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] - } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn isForPersonMassUse(&self) -> bool { - msg_send![self, isForPersonMassUse] - } - pub unsafe fn setForPersonMassUse(&self, forPersonMassUse: bool) { - msg_send![self, setForPersonMassUse: forPersonMassUse] - } + #[method_id(numberFormatter)] + pub unsafe fn numberFormatter(&self) -> Id; + # [method (setNumberFormatter :)] + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); + #[method(unitStyle)] + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; + # [method (setUnitStyle :)] + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); + #[method(isForPersonMassUse)] + pub unsafe fn isForPersonMassUse(&self) -> bool; + # [method (setForPersonMassUse :)] + pub unsafe fn setForPersonMassUse(&self, forPersonMassUse: bool); + # [method_id (stringFromValue : unit :)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSMassFormatterUnit, - ) -> Id { - msg_send_id![self, stringFromValue: value, unit: unit] - } + ) -> Id; + # [method_id (stringFromKilograms :)] pub unsafe fn stringFromKilograms( &self, numberInKilograms: c_double, - ) -> Id { - msg_send_id![self, stringFromKilograms: numberInKilograms] - } + ) -> Id; + # [method_id (unitStringFromValue : unit :)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSMassFormatterUnit, - ) -> Id { - msg_send_id![self, unitStringFromValue: value, unit: unit] - } + ) -> Id; + # [method_id (unitStringFromKilograms : usedUnit :)] pub unsafe fn unitStringFromKilograms_usedUnit( &self, numberInKilograms: c_double, unitp: *mut NSMassFormatterUnit, - ) -> Id { - msg_send_id![ - self, - unitStringFromKilograms: numberInKilograms, - usedUnit: unitp - ] - } + ) -> Id; + # [method (getObjectValue : forString : errorDescription :)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, string: &NSString, error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } + ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index 82a73cb7a..a7ddbd497 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSUnit::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSMeasurement; @@ -13,42 +13,34 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMeasurement { - pub unsafe fn unit(&self) -> Id { - msg_send_id![self, unit] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method_id(unit)] + pub unsafe fn unit(&self) -> Id; + #[method(doubleValue)] + pub unsafe fn doubleValue(&self) -> c_double; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithDoubleValue : unit :)] pub unsafe fn initWithDoubleValue_unit( &self, doubleValue: c_double, unit: &UnitType, - ) -> Id { - msg_send_id![self, initWithDoubleValue: doubleValue, unit: unit] - } - pub unsafe fn canBeConvertedToUnit(&self, unit: &NSUnit) -> bool { - msg_send![self, canBeConvertedToUnit: unit] - } + ) -> Id; + # [method (canBeConvertedToUnit :)] + pub unsafe fn canBeConvertedToUnit(&self, unit: &NSUnit) -> bool; + # [method_id (measurementByConvertingToUnit :)] pub unsafe fn measurementByConvertingToUnit( &self, unit: &NSUnit, - ) -> Id { - msg_send_id![self, measurementByConvertingToUnit: unit] - } + ) -> Id; + # [method_id (measurementByAddingMeasurement :)] pub unsafe fn measurementByAddingMeasurement( &self, measurement: &NSMeasurement, - ) -> Id, Shared> { - msg_send_id![self, measurementByAddingMeasurement: measurement] - } + ) -> Id, Shared>; + # [method_id (measurementBySubtractingMeasurement :)] pub unsafe fn measurementBySubtractingMeasurement( &self, measurement: &NSMeasurement, - ) -> Id, Shared> { - msg_send_id![self, measurementBySubtractingMeasurement: measurement] - } + ) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 8ba71bfc6..45338c682 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSMeasurementFormatter; @@ -16,38 +16,28 @@ extern_class!( ); extern_methods!( unsafe impl NSMeasurementFormatter { - pub unsafe fn unitOptions(&self) -> NSMeasurementFormatterUnitOptions { - msg_send![self, unitOptions] - } - pub unsafe fn setUnitOptions(&self, unitOptions: NSMeasurementFormatterUnitOptions) { - msg_send![self, setUnitOptions: unitOptions] - } - pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle { - msg_send![self, unitStyle] - } - pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle) { - msg_send![self, setUnitStyle: unitStyle] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn numberFormatter(&self) -> Id { - msg_send_id![self, numberFormatter] - } - pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>) { - msg_send![self, setNumberFormatter: numberFormatter] - } + #[method(unitOptions)] + pub unsafe fn unitOptions(&self) -> NSMeasurementFormatterUnitOptions; + # [method (setUnitOptions :)] + pub unsafe fn setUnitOptions(&self, unitOptions: NSMeasurementFormatterUnitOptions); + #[method(unitStyle)] + pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; + # [method (setUnitStyle :)] + pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); + #[method_id(locale)] + pub unsafe fn locale(&self) -> Id; + # [method (setLocale :)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(numberFormatter)] + pub unsafe fn numberFormatter(&self) -> Id; + # [method (setNumberFormatter :)] + pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); + # [method_id (stringFromMeasurement :)] pub unsafe fn stringFromMeasurement( &self, measurement: &NSMeasurement, - ) -> Id { - msg_send_id![self, stringFromMeasurement: measurement] - } - pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id { - msg_send_id![self, stringFromUnit: unit] - } + ) -> Id; + # [method_id (stringFromUnit :)] + pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index b02a7cc39..1b246aa7d 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -12,7 +12,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSMetadataQuery; @@ -22,125 +22,87 @@ extern_class!( ); extern_methods!( unsafe impl NSMetadataQuery { - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSMetadataQueryDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn predicate(&self) -> Option> { - msg_send_id![self, predicate] - } - pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>) { - msg_send![self, setPredicate: predicate] - } - pub unsafe fn sortDescriptors(&self) -> Id, Shared> { - msg_send_id![self, sortDescriptors] - } - pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray) { - msg_send![self, setSortDescriptors: sortDescriptors] - } - pub unsafe fn valueListAttributes(&self) -> Id, Shared> { - msg_send_id![self, valueListAttributes] - } - pub unsafe fn setValueListAttributes(&self, valueListAttributes: &NSArray) { - msg_send![self, setValueListAttributes: valueListAttributes] - } - pub unsafe fn groupingAttributes(&self) -> Option, Shared>> { - msg_send_id![self, groupingAttributes] - } - pub unsafe fn setGroupingAttributes(&self, groupingAttributes: Option<&NSArray>) { - msg_send![self, setGroupingAttributes: groupingAttributes] - } - pub unsafe fn notificationBatchingInterval(&self) -> NSTimeInterval { - msg_send![self, notificationBatchingInterval] - } + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSMetadataQueryDelegate>); + #[method_id(predicate)] + pub unsafe fn predicate(&self) -> Option>; + # [method (setPredicate :)] + pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>); + #[method_id(sortDescriptors)] + pub unsafe fn sortDescriptors(&self) -> Id, Shared>; + # [method (setSortDescriptors :)] + pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); + #[method_id(valueListAttributes)] + pub unsafe fn valueListAttributes(&self) -> Id, Shared>; + # [method (setValueListAttributes :)] + pub unsafe fn setValueListAttributes(&self, valueListAttributes: &NSArray); + #[method_id(groupingAttributes)] + pub unsafe fn groupingAttributes(&self) -> Option, Shared>>; + # [method (setGroupingAttributes :)] + pub unsafe fn setGroupingAttributes(&self, groupingAttributes: Option<&NSArray>); + #[method(notificationBatchingInterval)] + pub unsafe fn notificationBatchingInterval(&self) -> NSTimeInterval; + # [method (setNotificationBatchingInterval :)] pub unsafe fn setNotificationBatchingInterval( &self, notificationBatchingInterval: NSTimeInterval, - ) { - msg_send![ - self, - setNotificationBatchingInterval: notificationBatchingInterval - ] - } - pub unsafe fn searchScopes(&self) -> Id { - msg_send_id![self, searchScopes] - } - pub unsafe fn setSearchScopes(&self, searchScopes: &NSArray) { - msg_send![self, setSearchScopes: searchScopes] - } - pub unsafe fn searchItems(&self) -> Option> { - msg_send_id![self, searchItems] - } - pub unsafe fn setSearchItems(&self, searchItems: Option<&NSArray>) { - msg_send![self, setSearchItems: searchItems] - } - pub unsafe fn operationQueue(&self) -> Option> { - msg_send_id![self, operationQueue] - } - pub unsafe fn setOperationQueue(&self, operationQueue: Option<&NSOperationQueue>) { - msg_send![self, setOperationQueue: operationQueue] - } - pub unsafe fn startQuery(&self) -> bool { - msg_send![self, startQuery] - } - pub unsafe fn stopQuery(&self) { - msg_send![self, stopQuery] - } - pub unsafe fn isStarted(&self) -> bool { - msg_send![self, isStarted] - } - pub unsafe fn isGathering(&self) -> bool { - msg_send![self, isGathering] - } - pub unsafe fn isStopped(&self) -> bool { - msg_send![self, isStopped] - } - pub unsafe fn disableUpdates(&self) { - msg_send![self, disableUpdates] - } - pub unsafe fn enableUpdates(&self) { - msg_send![self, enableUpdates] - } - pub unsafe fn resultCount(&self) -> NSUInteger { - msg_send![self, resultCount] - } - pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { - msg_send_id![self, resultAtIndex: idx] - } - pub unsafe fn enumerateResultsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateResultsUsingBlock: block] - } + ); + #[method_id(searchScopes)] + pub unsafe fn searchScopes(&self) -> Id; + # [method (setSearchScopes :)] + pub unsafe fn setSearchScopes(&self, searchScopes: &NSArray); + #[method_id(searchItems)] + pub unsafe fn searchItems(&self) -> Option>; + # [method (setSearchItems :)] + pub unsafe fn setSearchItems(&self, searchItems: Option<&NSArray>); + #[method_id(operationQueue)] + pub unsafe fn operationQueue(&self) -> Option>; + # [method (setOperationQueue :)] + pub unsafe fn setOperationQueue(&self, operationQueue: Option<&NSOperationQueue>); + #[method(startQuery)] + pub unsafe fn startQuery(&self) -> bool; + #[method(stopQuery)] + pub unsafe fn stopQuery(&self); + #[method(isStarted)] + pub unsafe fn isStarted(&self) -> bool; + #[method(isGathering)] + pub unsafe fn isGathering(&self) -> bool; + #[method(isStopped)] + pub unsafe fn isStopped(&self) -> bool; + #[method(disableUpdates)] + pub unsafe fn disableUpdates(&self); + #[method(enableUpdates)] + pub unsafe fn enableUpdates(&self); + #[method(resultCount)] + pub unsafe fn resultCount(&self) -> NSUInteger; + # [method_id (resultAtIndex :)] + pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; + # [method (enumerateResultsUsingBlock :)] + pub unsafe fn enumerateResultsUsingBlock(&self, block: TodoBlock); + # [method (enumerateResultsWithOptions : usingBlock :)] pub unsafe fn enumerateResultsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![self, enumerateResultsWithOptions: opts, usingBlock: block] - } - pub unsafe fn results(&self) -> Id { - msg_send_id![self, results] - } - pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger { - msg_send![self, indexOfResult: result] - } + ); + #[method_id(results)] + pub unsafe fn results(&self) -> Id; + # [method (indexOfResult :)] + pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger; + #[method_id(valueLists)] pub unsafe fn valueLists( &self, - ) -> Id>, Shared> - { - msg_send_id![self, valueLists] - } - pub unsafe fn groupedResults(&self) -> Id, Shared> { - msg_send_id![self, groupedResults] - } + ) -> Id>, Shared>; + #[method_id(groupedResults)] + pub unsafe fn groupedResults(&self) -> Id, Shared>; + # [method_id (valueOfAttribute : forResultAtIndex :)] pub unsafe fn valueOfAttribute_forResultAtIndex( &self, attrName: &NSString, idx: NSUInteger, - ) -> Option> { - msg_send_id![self, valueOfAttribute: attrName, forResultAtIndex: idx] - } + ) -> Option>; } ); pub type NSMetadataQueryDelegate = NSObject; @@ -153,21 +115,17 @@ extern_class!( ); extern_methods!( unsafe impl NSMetadataItem { - pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithURL: url] - } - pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option> { - msg_send_id![self, valueForAttribute: key] - } + # [method_id (initWithURL :)] + pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; + # [method_id (valueForAttribute :)] + pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option>; + # [method_id (valuesForAttributes :)] pub unsafe fn valuesForAttributes( &self, keys: &NSArray, - ) -> Option, Shared>> { - msg_send_id![self, valuesForAttributes: keys] - } - pub unsafe fn attributes(&self) -> Id, Shared> { - msg_send_id![self, attributes] - } + ) -> Option, Shared>>; + #[method_id(attributes)] + pub unsafe fn attributes(&self) -> Id, Shared>; } ); extern_class!( @@ -179,15 +137,12 @@ extern_class!( ); extern_methods!( unsafe impl NSMetadataQueryAttributeValueTuple { - pub unsafe fn attribute(&self) -> Id { - msg_send_id![self, attribute] - } - pub unsafe fn value(&self) -> Option> { - msg_send_id![self, value] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } + #[method_id(attribute)] + pub unsafe fn attribute(&self) -> Id; + #[method_id(value)] + pub unsafe fn value(&self) -> Option>; + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; } ); extern_class!( @@ -199,23 +154,17 @@ extern_class!( ); extern_methods!( unsafe impl NSMetadataQueryResultGroup { - pub unsafe fn attribute(&self) -> Id { - msg_send_id![self, attribute] - } - pub unsafe fn value(&self) -> Id { - msg_send_id![self, value] - } - pub unsafe fn subgroups(&self) -> Option, Shared>> { - msg_send_id![self, subgroups] - } - pub unsafe fn resultCount(&self) -> NSUInteger { - msg_send![self, resultCount] - } - pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id { - msg_send_id![self, resultAtIndex: idx] - } - pub unsafe fn results(&self) -> Id { - msg_send_id![self, results] - } + #[method_id(attribute)] + pub unsafe fn attribute(&self) -> Id; + #[method_id(value)] + pub unsafe fn value(&self) -> Id; + #[method_id(subgroups)] + pub unsafe fn subgroups(&self) -> Option, Shared>>; + #[method(resultCount)] + pub unsafe fn resultCount(&self) -> NSUInteger; + # [method_id (resultAtIndex :)] + pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; + #[method_id(results)] + pub unsafe fn results(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs index 0e39aac60..249ee1e9a 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -3,4 +3,4 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index 073bb999e..f9af37f69 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSMethodSignature; @@ -12,28 +12,21 @@ extern_class!( ); extern_methods!( unsafe impl NSMethodSignature { + # [method_id (signatureWithObjCTypes :)] pub unsafe fn signatureWithObjCTypes( types: NonNull, - ) -> Option> { - msg_send_id![Self::class(), signatureWithObjCTypes: types] - } - pub unsafe fn numberOfArguments(&self) -> NSUInteger { - msg_send![self, numberOfArguments] - } - pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull { - msg_send![self, getArgumentTypeAtIndex: idx] - } - pub unsafe fn frameLength(&self) -> NSUInteger { - msg_send![self, frameLength] - } - pub unsafe fn isOneway(&self) -> bool { - msg_send![self, isOneway] - } - pub unsafe fn methodReturnType(&self) -> NonNull { - msg_send![self, methodReturnType] - } - pub unsafe fn methodReturnLength(&self) -> NSUInteger { - msg_send![self, methodReturnLength] - } + ) -> Option>; + #[method(numberOfArguments)] + pub unsafe fn numberOfArguments(&self) -> NSUInteger; + # [method (getArgumentTypeAtIndex :)] + pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull; + #[method(frameLength)] + pub unsafe fn frameLength(&self) -> NSUInteger; + #[method(isOneway)] + pub unsafe fn isOneway(&self) -> bool; + #[method(methodReturnType)] + pub unsafe fn methodReturnType(&self) -> NonNull; + #[method(methodReturnLength)] + pub unsafe fn methodReturnLength(&self) -> NSUInteger; } ); diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index d68d1f973..1ccdd7876 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSMorphology; @@ -15,47 +15,34 @@ extern_class!( ); extern_methods!( unsafe impl NSMorphology { - pub unsafe fn grammaticalGender(&self) -> NSGrammaticalGender { - msg_send![self, grammaticalGender] - } - pub unsafe fn setGrammaticalGender(&self, grammaticalGender: NSGrammaticalGender) { - msg_send![self, setGrammaticalGender: grammaticalGender] - } - pub unsafe fn partOfSpeech(&self) -> NSGrammaticalPartOfSpeech { - msg_send![self, partOfSpeech] - } - pub unsafe fn setPartOfSpeech(&self, partOfSpeech: NSGrammaticalPartOfSpeech) { - msg_send![self, setPartOfSpeech: partOfSpeech] - } - pub unsafe fn number(&self) -> NSGrammaticalNumber { - msg_send![self, number] - } - pub unsafe fn setNumber(&self, number: NSGrammaticalNumber) { - msg_send![self, setNumber: number] - } + #[method(grammaticalGender)] + pub unsafe fn grammaticalGender(&self) -> NSGrammaticalGender; + # [method (setGrammaticalGender :)] + pub unsafe fn setGrammaticalGender(&self, grammaticalGender: NSGrammaticalGender); + #[method(partOfSpeech)] + pub unsafe fn partOfSpeech(&self) -> NSGrammaticalPartOfSpeech; + # [method (setPartOfSpeech :)] + pub unsafe fn setPartOfSpeech(&self, partOfSpeech: NSGrammaticalPartOfSpeech); + #[method(number)] + pub unsafe fn number(&self) -> NSGrammaticalNumber; + # [method (setNumber :)] + pub unsafe fn setNumber(&self, number: NSGrammaticalNumber); } ); extern_methods!( #[doc = "NSCustomPronouns"] unsafe impl NSMorphology { + # [method_id (customPronounForLanguage :)] pub unsafe fn customPronounForLanguage( &self, language: &NSString, - ) -> Option> { - msg_send_id![self, customPronounForLanguage: language] - } + ) -> Option>; + # [method (setCustomPronoun : forLanguage : error :)] pub unsafe fn setCustomPronoun_forLanguage_error( &self, features: Option<&NSMorphologyCustomPronoun>, language: &NSString, - ) -> Result<(), Id> { - msg_send![ - self, - setCustomPronoun: features, - forLanguage: language, - error: _ - ] - } + ) -> Result<(), Id>; } ); extern_class!( @@ -67,57 +54,39 @@ extern_class!( ); extern_methods!( unsafe impl NSMorphologyCustomPronoun { - pub unsafe fn isSupportedForLanguage(language: &NSString) -> bool { - msg_send![Self::class(), isSupportedForLanguage: language] - } - pub unsafe fn requiredKeysForLanguage( - language: &NSString, - ) -> Id, Shared> { - msg_send_id![Self::class(), requiredKeysForLanguage: language] - } - pub unsafe fn subjectForm(&self) -> Option> { - msg_send_id![self, subjectForm] - } - pub unsafe fn setSubjectForm(&self, subjectForm: Option<&NSString>) { - msg_send![self, setSubjectForm: subjectForm] - } - pub unsafe fn objectForm(&self) -> Option> { - msg_send_id![self, objectForm] - } - pub unsafe fn setObjectForm(&self, objectForm: Option<&NSString>) { - msg_send![self, setObjectForm: objectForm] - } - pub unsafe fn possessiveForm(&self) -> Option> { - msg_send_id![self, possessiveForm] - } - pub unsafe fn setPossessiveForm(&self, possessiveForm: Option<&NSString>) { - msg_send![self, setPossessiveForm: possessiveForm] - } - pub unsafe fn possessiveAdjectiveForm(&self) -> Option> { - msg_send_id![self, possessiveAdjectiveForm] - } - pub unsafe fn setPossessiveAdjectiveForm( - &self, - possessiveAdjectiveForm: Option<&NSString>, - ) { - msg_send![self, setPossessiveAdjectiveForm: possessiveAdjectiveForm] - } - pub unsafe fn reflexiveForm(&self) -> Option> { - msg_send_id![self, reflexiveForm] - } - pub unsafe fn setReflexiveForm(&self, reflexiveForm: Option<&NSString>) { - msg_send![self, setReflexiveForm: reflexiveForm] - } + # [method (isSupportedForLanguage :)] + pub unsafe fn isSupportedForLanguage(language: &NSString) -> bool; + # [method_id (requiredKeysForLanguage :)] + pub unsafe fn requiredKeysForLanguage(language: &NSString) + -> Id, Shared>; + #[method_id(subjectForm)] + pub unsafe fn subjectForm(&self) -> Option>; + # [method (setSubjectForm :)] + pub unsafe fn setSubjectForm(&self, subjectForm: Option<&NSString>); + #[method_id(objectForm)] + pub unsafe fn objectForm(&self) -> Option>; + # [method (setObjectForm :)] + pub unsafe fn setObjectForm(&self, objectForm: Option<&NSString>); + #[method_id(possessiveForm)] + pub unsafe fn possessiveForm(&self) -> Option>; + # [method (setPossessiveForm :)] + pub unsafe fn setPossessiveForm(&self, possessiveForm: Option<&NSString>); + #[method_id(possessiveAdjectiveForm)] + pub unsafe fn possessiveAdjectiveForm(&self) -> Option>; + # [method (setPossessiveAdjectiveForm :)] + pub unsafe fn setPossessiveAdjectiveForm(&self, possessiveAdjectiveForm: Option<&NSString>); + #[method_id(reflexiveForm)] + pub unsafe fn reflexiveForm(&self) -> Option>; + # [method (setReflexiveForm :)] + pub unsafe fn setReflexiveForm(&self, reflexiveForm: Option<&NSString>); } ); extern_methods!( #[doc = "NSMorphologyUserSettings"] unsafe impl NSMorphology { - pub unsafe fn isUnspecified(&self) -> bool { - msg_send![self, isUnspecified] - } - pub unsafe fn userMorphology() -> Id { - msg_send_id![Self::class(), userMorphology] - } + #[method(isUnspecified)] + pub unsafe fn isUnspecified(&self) -> bool; + #[method_id(userMorphology)] + pub unsafe fn userMorphology() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index cc252bd03..f7d24ffae 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -13,7 +13,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSNetService; @@ -23,96 +23,71 @@ extern_class!( ); extern_methods!( unsafe impl NSNetService { + # [method_id (initWithDomain : type : name : port :)] pub unsafe fn initWithDomain_type_name_port( &self, domain: &NSString, type_: &NSString, name: &NSString, port: c_int, - ) -> Id { - msg_send_id ! [self , initWithDomain : domain , type : type_ , name : name , port : port] - } + ) -> Id; + # [method_id (initWithDomain : type : name :)] pub unsafe fn initWithDomain_type_name( &self, domain: &NSString, type_: &NSString, name: &NSString, - ) -> Id { - msg_send_id ! [self , initWithDomain : domain , type : type_ , name : name] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn includesPeerToPeer(&self) -> bool { - msg_send![self, includesPeerToPeer] - } - pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { - msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn type_(&self) -> Id { - msg_send_id![self, type] - } - pub unsafe fn domain(&self) -> Id { - msg_send_id![self, domain] - } - pub unsafe fn hostName(&self) -> Option> { - msg_send_id![self, hostName] - } - pub unsafe fn addresses(&self) -> Option, Shared>> { - msg_send_id![self, addresses] - } - pub unsafe fn port(&self) -> NSInteger { - msg_send![self, port] - } - pub unsafe fn publish(&self) { - msg_send![self, publish] - } - pub unsafe fn publishWithOptions(&self, options: NSNetServiceOptions) { - msg_send![self, publishWithOptions: options] - } - pub unsafe fn resolve(&self) { - msg_send![self, resolve] - } - pub unsafe fn stop(&self) { - msg_send![self, stop] - } + ) -> Id; + # [method (scheduleInRunLoop : forMode :)] + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + # [method (removeFromRunLoop : forMode :)] + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceDelegate>); + #[method(includesPeerToPeer)] + pub unsafe fn includesPeerToPeer(&self) -> bool; + # [method (setIncludesPeerToPeer :)] + pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool); + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method_id(type)] + pub unsafe fn type_(&self) -> Id; + #[method_id(domain)] + pub unsafe fn domain(&self) -> Id; + #[method_id(hostName)] + pub unsafe fn hostName(&self) -> Option>; + #[method_id(addresses)] + pub unsafe fn addresses(&self) -> Option, Shared>>; + #[method(port)] + pub unsafe fn port(&self) -> NSInteger; + #[method(publish)] + pub unsafe fn publish(&self); + # [method (publishWithOptions :)] + pub unsafe fn publishWithOptions(&self, options: NSNetServiceOptions); + #[method(resolve)] + pub unsafe fn resolve(&self); + #[method(stop)] + pub unsafe fn stop(&self); + # [method_id (dictionaryFromTXTRecordData :)] pub unsafe fn dictionaryFromTXTRecordData( txtData: &NSData, - ) -> Id, Shared> { - msg_send_id![Self::class(), dictionaryFromTXTRecordData: txtData] - } + ) -> Id, Shared>; + # [method_id (dataFromTXTRecordDictionary :)] pub unsafe fn dataFromTXTRecordDictionary( txtDictionary: &NSDictionary, - ) -> Id { - msg_send_id![Self::class(), dataFromTXTRecordDictionary: txtDictionary] - } - pub unsafe fn resolveWithTimeout(&self, timeout: NSTimeInterval) { - msg_send![self, resolveWithTimeout: timeout] - } - pub unsafe fn setTXTRecordData(&self, recordData: Option<&NSData>) -> bool { - msg_send![self, setTXTRecordData: recordData] - } - pub unsafe fn TXTRecordData(&self) -> Option> { - msg_send_id![self, TXTRecordData] - } - pub unsafe fn startMonitoring(&self) { - msg_send![self, startMonitoring] - } - pub unsafe fn stopMonitoring(&self) { - msg_send![self, stopMonitoring] - } + ) -> Id; + # [method (resolveWithTimeout :)] + pub unsafe fn resolveWithTimeout(&self, timeout: NSTimeInterval); + # [method (setTXTRecordData :)] + pub unsafe fn setTXTRecordData(&self, recordData: Option<&NSData>) -> bool; + #[method_id(TXTRecordData)] + pub unsafe fn TXTRecordData(&self) -> Option>; + #[method(startMonitoring)] + pub unsafe fn startMonitoring(&self); + #[method(stopMonitoring)] + pub unsafe fn stopMonitoring(&self); } ); extern_class!( @@ -124,43 +99,32 @@ extern_class!( ); extern_methods!( unsafe impl NSNetServiceBrowser { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceBrowserDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn includesPeerToPeer(&self) -> bool { - msg_send![self, includesPeerToPeer] - } - pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool) { - msg_send![self, setIncludesPeerToPeer: includesPeerToPeer] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn searchForBrowsableDomains(&self) { - msg_send![self, searchForBrowsableDomains] - } - pub unsafe fn searchForRegistrationDomains(&self) { - msg_send![self, searchForRegistrationDomains] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceBrowserDelegate>); + #[method(includesPeerToPeer)] + pub unsafe fn includesPeerToPeer(&self) -> bool; + # [method (setIncludesPeerToPeer :)] + pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool); + # [method (scheduleInRunLoop : forMode :)] + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + # [method (removeFromRunLoop : forMode :)] + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(searchForBrowsableDomains)] + pub unsafe fn searchForBrowsableDomains(&self); + #[method(searchForRegistrationDomains)] + pub unsafe fn searchForRegistrationDomains(&self); + # [method (searchForServicesOfType : inDomain :)] pub unsafe fn searchForServicesOfType_inDomain( &self, type_: &NSString, domainString: &NSString, - ) { - msg_send![self, searchForServicesOfType: type_, inDomain: domainString] - } - pub unsafe fn stop(&self) { - msg_send![self, stop] - } + ); + #[method(stop)] + pub unsafe fn stop(&self); } ); pub type NSNetServiceDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index bebf8a8dc..714a9e78e 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSNotificationName = NSString; use super::__exported::NSDictionary; use super::__exported::NSOperationQueue; @@ -16,52 +16,39 @@ extern_class!( ); extern_methods!( unsafe impl NSNotification { - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn object(&self) -> Option> { - msg_send_id![self, object] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method_id(object)] + pub unsafe fn object(&self) -> Option>; + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + # [method_id (initWithName : object : userInfo :)] pub unsafe fn initWithName_object_userInfo( &self, name: &NSNotificationName, object: Option<&Object>, userInfo: Option<&NSDictionary>, - ) -> Id { - msg_send_id![self, initWithName: name, object: object, userInfo: userInfo] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSNotificationCreation"] unsafe impl NSNotification { + # [method_id (notificationWithName : object :)] pub unsafe fn notificationWithName_object( aName: &NSNotificationName, anObject: Option<&Object>, - ) -> Id { - msg_send_id![Self::class(), notificationWithName: aName, object: anObject] - } + ) -> Id; + # [method_id (notificationWithName : object : userInfo :)] pub unsafe fn notificationWithName_object_userInfo( aName: &NSNotificationName, anObject: Option<&Object>, aUserInfo: Option<&NSDictionary>, - ) -> Id { - msg_send_id![ - Self::class(), - notificationWithName: aName, - object: anObject, - userInfo: aUserInfo - ] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; } ); extern_class!( @@ -73,77 +60,47 @@ extern_class!( ); extern_methods!( unsafe impl NSNotificationCenter { - pub unsafe fn defaultCenter() -> Id { - msg_send_id![Self::class(), defaultCenter] - } + #[method_id(defaultCenter)] + pub unsafe fn defaultCenter() -> Id; + # [method (addObserver : selector : name : object :)] pub unsafe fn addObserver_selector_name_object( &self, observer: &Object, aSelector: Sel, aName: Option<&NSNotificationName>, anObject: Option<&Object>, - ) { - msg_send![ - self, - addObserver: observer, - selector: aSelector, - name: aName, - object: anObject - ] - } - pub unsafe fn postNotification(&self, notification: &NSNotification) { - msg_send![self, postNotification: notification] - } + ); + # [method (postNotification :)] + pub unsafe fn postNotification(&self, notification: &NSNotification); + # [method (postNotificationName : object :)] pub unsafe fn postNotificationName_object( &self, aName: &NSNotificationName, anObject: Option<&Object>, - ) { - msg_send![self, postNotificationName: aName, object: anObject] - } + ); + # [method (postNotificationName : object : userInfo :)] pub unsafe fn postNotificationName_object_userInfo( &self, aName: &NSNotificationName, anObject: Option<&Object>, aUserInfo: Option<&NSDictionary>, - ) { - msg_send![ - self, - postNotificationName: aName, - object: anObject, - userInfo: aUserInfo - ] - } - pub unsafe fn removeObserver(&self, observer: &Object) { - msg_send![self, removeObserver: observer] - } + ); + # [method (removeObserver :)] + pub unsafe fn removeObserver(&self, observer: &Object); + # [method (removeObserver : name : object :)] pub unsafe fn removeObserver_name_object( &self, observer: &Object, aName: Option<&NSNotificationName>, anObject: Option<&Object>, - ) { - msg_send![ - self, - removeObserver: observer, - name: aName, - object: anObject - ] - } + ); + # [method_id (addObserverForName : object : queue : usingBlock :)] pub unsafe fn addObserverForName_object_queue_usingBlock( &self, name: Option<&NSNotificationName>, obj: Option<&Object>, queue: Option<&NSOperationQueue>, block: TodoBlock, - ) -> Id { - msg_send_id![ - self, - addObserverForName: name, - object: obj, - queue: queue, - usingBlock: block - ] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index fc26345d3..bed331d4c 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSNotificationQueue; @@ -17,51 +17,32 @@ extern_class!( ); extern_methods!( unsafe impl NSNotificationQueue { - pub unsafe fn defaultQueue() -> Id { - msg_send_id![Self::class(), defaultQueue] - } + #[method_id(defaultQueue)] + pub unsafe fn defaultQueue() -> Id; + # [method_id (initWithNotificationCenter :)] pub unsafe fn initWithNotificationCenter( &self, notificationCenter: &NSNotificationCenter, - ) -> Id { - msg_send_id![self, initWithNotificationCenter: notificationCenter] - } + ) -> Id; + # [method (enqueueNotification : postingStyle :)] pub unsafe fn enqueueNotification_postingStyle( &self, notification: &NSNotification, postingStyle: NSPostingStyle, - ) { - msg_send![ - self, - enqueueNotification: notification, - postingStyle: postingStyle - ] - } + ); + # [method (enqueueNotification : postingStyle : coalesceMask : forModes :)] pub unsafe fn enqueueNotification_postingStyle_coalesceMask_forModes( &self, notification: &NSNotification, postingStyle: NSPostingStyle, coalesceMask: NSNotificationCoalescing, modes: Option<&NSArray>, - ) { - msg_send![ - self, - enqueueNotification: notification, - postingStyle: postingStyle, - coalesceMask: coalesceMask, - forModes: modes - ] - } + ); + # [method (dequeueNotificationsMatching : coalesceMask :)] pub unsafe fn dequeueNotificationsMatching_coalesceMask( &self, notification: &NSNotification, coalesceMask: NSUInteger, - ) { - msg_send![ - self, - dequeueNotificationsMatching: notification, - coalesceMask: coalesceMask - ] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSNull.rs b/crates/icrate/src/generated/Foundation/NSNull.rs index 52c854d14..29bac3d66 100644 --- a/crates/icrate/src/generated/Foundation/NSNull.rs +++ b/crates/icrate/src/generated/Foundation/NSNull.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSNull; @@ -12,8 +12,7 @@ extern_class!( ); extern_methods!( unsafe impl NSNull { - pub unsafe fn null() -> Id { - msg_send_id![Self::class(), null] - } + #[method_id(null)] + pub unsafe fn null() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 40b8f9e81..7d934b257 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSNumberFormatter; @@ -19,523 +19,344 @@ extern_class!( ); extern_methods!( unsafe impl NSNumberFormatter { - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] - } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } + #[method(formattingContext)] + pub unsafe fn formattingContext(&self) -> NSFormattingContext; + # [method (setFormattingContext :)] + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); + # [method (getObjectValue : forString : range : error :)] pub unsafe fn getObjectValue_forString_range_error( &self, obj: Option<&mut Option>>, string: &NSString, rangep: *mut NSRange, - ) -> Result<(), Id> { - msg_send![ - self, - getObjectValue: obj, - forString: string, - range: rangep, - error: _ - ] - } - pub unsafe fn stringFromNumber(&self, number: &NSNumber) -> Option> { - msg_send_id![self, stringFromNumber: number] - } - pub unsafe fn numberFromString(&self, string: &NSString) -> Option> { - msg_send_id![self, numberFromString: string] - } + ) -> Result<(), Id>; + # [method_id (stringFromNumber :)] + pub unsafe fn stringFromNumber(&self, number: &NSNumber) -> Option>; + # [method_id (numberFromString :)] + pub unsafe fn numberFromString(&self, string: &NSString) -> Option>; + # [method_id (localizedStringFromNumber : numberStyle :)] pub unsafe fn localizedStringFromNumber_numberStyle( num: &NSNumber, nstyle: NSNumberFormatterStyle, - ) -> Id { - msg_send_id![ - Self::class(), - localizedStringFromNumber: num, - numberStyle: nstyle - ] - } - pub unsafe fn defaultFormatterBehavior() -> NSNumberFormatterBehavior { - msg_send![Self::class(), defaultFormatterBehavior] - } - pub unsafe fn setDefaultFormatterBehavior(behavior: NSNumberFormatterBehavior) { - msg_send![Self::class(), setDefaultFormatterBehavior: behavior] - } - pub unsafe fn numberStyle(&self) -> NSNumberFormatterStyle { - msg_send![self, numberStyle] - } - pub unsafe fn setNumberStyle(&self, numberStyle: NSNumberFormatterStyle) { - msg_send![self, setNumberStyle: numberStyle] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn generatesDecimalNumbers(&self) -> bool { - msg_send![self, generatesDecimalNumbers] - } - pub unsafe fn setGeneratesDecimalNumbers(&self, generatesDecimalNumbers: bool) { - msg_send![self, setGeneratesDecimalNumbers: generatesDecimalNumbers] - } - pub unsafe fn formatterBehavior(&self) -> NSNumberFormatterBehavior { - msg_send![self, formatterBehavior] - } - pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSNumberFormatterBehavior) { - msg_send![self, setFormatterBehavior: formatterBehavior] - } - pub unsafe fn negativeFormat(&self) -> Id { - msg_send_id![self, negativeFormat] - } - pub unsafe fn setNegativeFormat(&self, negativeFormat: Option<&NSString>) { - msg_send![self, setNegativeFormat: negativeFormat] - } + ) -> Id; + #[method(defaultFormatterBehavior)] + pub unsafe fn defaultFormatterBehavior() -> NSNumberFormatterBehavior; + # [method (setDefaultFormatterBehavior :)] + pub unsafe fn setDefaultFormatterBehavior(behavior: NSNumberFormatterBehavior); + #[method(numberStyle)] + pub unsafe fn numberStyle(&self) -> NSNumberFormatterStyle; + # [method (setNumberStyle :)] + pub unsafe fn setNumberStyle(&self, numberStyle: NSNumberFormatterStyle); + #[method_id(locale)] + pub unsafe fn locale(&self) -> Id; + # [method (setLocale :)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method(generatesDecimalNumbers)] + pub unsafe fn generatesDecimalNumbers(&self) -> bool; + # [method (setGeneratesDecimalNumbers :)] + pub unsafe fn setGeneratesDecimalNumbers(&self, generatesDecimalNumbers: bool); + #[method(formatterBehavior)] + pub unsafe fn formatterBehavior(&self) -> NSNumberFormatterBehavior; + # [method (setFormatterBehavior :)] + pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSNumberFormatterBehavior); + #[method_id(negativeFormat)] + pub unsafe fn negativeFormat(&self) -> Id; + # [method (setNegativeFormat :)] + pub unsafe fn setNegativeFormat(&self, negativeFormat: Option<&NSString>); + #[method_id(textAttributesForNegativeValues)] pub unsafe fn textAttributesForNegativeValues( &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForNegativeValues] - } + ) -> Option, Shared>>; + # [method (setTextAttributesForNegativeValues :)] pub unsafe fn setTextAttributesForNegativeValues( &self, textAttributesForNegativeValues: Option<&NSDictionary>, - ) { - msg_send![ - self, - setTextAttributesForNegativeValues: textAttributesForNegativeValues - ] - } - pub unsafe fn positiveFormat(&self) -> Id { - msg_send_id![self, positiveFormat] - } - pub unsafe fn setPositiveFormat(&self, positiveFormat: Option<&NSString>) { - msg_send![self, setPositiveFormat: positiveFormat] - } + ); + #[method_id(positiveFormat)] + pub unsafe fn positiveFormat(&self) -> Id; + # [method (setPositiveFormat :)] + pub unsafe fn setPositiveFormat(&self, positiveFormat: Option<&NSString>); + #[method_id(textAttributesForPositiveValues)] pub unsafe fn textAttributesForPositiveValues( &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForPositiveValues] - } + ) -> Option, Shared>>; + # [method (setTextAttributesForPositiveValues :)] pub unsafe fn setTextAttributesForPositiveValues( &self, textAttributesForPositiveValues: Option<&NSDictionary>, - ) { - msg_send![ - self, - setTextAttributesForPositiveValues: textAttributesForPositiveValues - ] - } - pub unsafe fn allowsFloats(&self) -> bool { - msg_send![self, allowsFloats] - } - pub unsafe fn setAllowsFloats(&self, allowsFloats: bool) { - msg_send![self, setAllowsFloats: allowsFloats] - } - pub unsafe fn decimalSeparator(&self) -> Id { - msg_send_id![self, decimalSeparator] - } - pub unsafe fn setDecimalSeparator(&self, decimalSeparator: Option<&NSString>) { - msg_send![self, setDecimalSeparator: decimalSeparator] - } - pub unsafe fn alwaysShowsDecimalSeparator(&self) -> bool { - msg_send![self, alwaysShowsDecimalSeparator] - } - pub unsafe fn setAlwaysShowsDecimalSeparator(&self, alwaysShowsDecimalSeparator: bool) { - msg_send![ - self, - setAlwaysShowsDecimalSeparator: alwaysShowsDecimalSeparator - ] - } - pub unsafe fn currencyDecimalSeparator(&self) -> Id { - msg_send_id![self, currencyDecimalSeparator] - } + ); + #[method(allowsFloats)] + pub unsafe fn allowsFloats(&self) -> bool; + # [method (setAllowsFloats :)] + pub unsafe fn setAllowsFloats(&self, allowsFloats: bool); + #[method_id(decimalSeparator)] + pub unsafe fn decimalSeparator(&self) -> Id; + # [method (setDecimalSeparator :)] + pub unsafe fn setDecimalSeparator(&self, decimalSeparator: Option<&NSString>); + #[method(alwaysShowsDecimalSeparator)] + pub unsafe fn alwaysShowsDecimalSeparator(&self) -> bool; + # [method (setAlwaysShowsDecimalSeparator :)] + pub unsafe fn setAlwaysShowsDecimalSeparator(&self, alwaysShowsDecimalSeparator: bool); + #[method_id(currencyDecimalSeparator)] + pub unsafe fn currencyDecimalSeparator(&self) -> Id; + # [method (setCurrencyDecimalSeparator :)] pub unsafe fn setCurrencyDecimalSeparator( &self, currencyDecimalSeparator: Option<&NSString>, - ) { - msg_send![self, setCurrencyDecimalSeparator: currencyDecimalSeparator] - } - pub unsafe fn usesGroupingSeparator(&self) -> bool { - msg_send![self, usesGroupingSeparator] - } - pub unsafe fn setUsesGroupingSeparator(&self, usesGroupingSeparator: bool) { - msg_send![self, setUsesGroupingSeparator: usesGroupingSeparator] - } - pub unsafe fn groupingSeparator(&self) -> Id { - msg_send_id![self, groupingSeparator] - } - pub unsafe fn setGroupingSeparator(&self, groupingSeparator: Option<&NSString>) { - msg_send![self, setGroupingSeparator: groupingSeparator] - } - pub unsafe fn zeroSymbol(&self) -> Option> { - msg_send_id![self, zeroSymbol] - } - pub unsafe fn setZeroSymbol(&self, zeroSymbol: Option<&NSString>) { - msg_send![self, setZeroSymbol: zeroSymbol] - } + ); + #[method(usesGroupingSeparator)] + pub unsafe fn usesGroupingSeparator(&self) -> bool; + # [method (setUsesGroupingSeparator :)] + pub unsafe fn setUsesGroupingSeparator(&self, usesGroupingSeparator: bool); + #[method_id(groupingSeparator)] + pub unsafe fn groupingSeparator(&self) -> Id; + # [method (setGroupingSeparator :)] + pub unsafe fn setGroupingSeparator(&self, groupingSeparator: Option<&NSString>); + #[method_id(zeroSymbol)] + pub unsafe fn zeroSymbol(&self) -> Option>; + # [method (setZeroSymbol :)] + pub unsafe fn setZeroSymbol(&self, zeroSymbol: Option<&NSString>); + #[method_id(textAttributesForZero)] pub unsafe fn textAttributesForZero( &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForZero] - } + ) -> Option, Shared>>; + # [method (setTextAttributesForZero :)] pub unsafe fn setTextAttributesForZero( &self, textAttributesForZero: Option<&NSDictionary>, - ) { - msg_send![self, setTextAttributesForZero: textAttributesForZero] - } - pub unsafe fn nilSymbol(&self) -> Id { - msg_send_id![self, nilSymbol] - } - pub unsafe fn setNilSymbol(&self, nilSymbol: &NSString) { - msg_send![self, setNilSymbol: nilSymbol] - } + ); + #[method_id(nilSymbol)] + pub unsafe fn nilSymbol(&self) -> Id; + # [method (setNilSymbol :)] + pub unsafe fn setNilSymbol(&self, nilSymbol: &NSString); + #[method_id(textAttributesForNil)] pub unsafe fn textAttributesForNil( &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForNil] - } + ) -> Option, Shared>>; + # [method (setTextAttributesForNil :)] pub unsafe fn setTextAttributesForNil( &self, textAttributesForNil: Option<&NSDictionary>, - ) { - msg_send![self, setTextAttributesForNil: textAttributesForNil] - } - pub unsafe fn notANumberSymbol(&self) -> Id { - msg_send_id![self, notANumberSymbol] - } - pub unsafe fn setNotANumberSymbol(&self, notANumberSymbol: Option<&NSString>) { - msg_send![self, setNotANumberSymbol: notANumberSymbol] - } + ); + #[method_id(notANumberSymbol)] + pub unsafe fn notANumberSymbol(&self) -> Id; + # [method (setNotANumberSymbol :)] + pub unsafe fn setNotANumberSymbol(&self, notANumberSymbol: Option<&NSString>); + #[method_id(textAttributesForNotANumber)] pub unsafe fn textAttributesForNotANumber( &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForNotANumber] - } + ) -> Option, Shared>>; + # [method (setTextAttributesForNotANumber :)] pub unsafe fn setTextAttributesForNotANumber( &self, textAttributesForNotANumber: Option<&NSDictionary>, - ) { - msg_send![ - self, - setTextAttributesForNotANumber: textAttributesForNotANumber - ] - } - pub unsafe fn positiveInfinitySymbol(&self) -> Id { - msg_send_id![self, positiveInfinitySymbol] - } - pub unsafe fn setPositiveInfinitySymbol(&self, positiveInfinitySymbol: &NSString) { - msg_send![self, setPositiveInfinitySymbol: positiveInfinitySymbol] - } + ); + #[method_id(positiveInfinitySymbol)] + pub unsafe fn positiveInfinitySymbol(&self) -> Id; + # [method (setPositiveInfinitySymbol :)] + pub unsafe fn setPositiveInfinitySymbol(&self, positiveInfinitySymbol: &NSString); + #[method_id(textAttributesForPositiveInfinity)] pub unsafe fn textAttributesForPositiveInfinity( &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForPositiveInfinity] - } + ) -> Option, Shared>>; + # [method (setTextAttributesForPositiveInfinity :)] pub unsafe fn setTextAttributesForPositiveInfinity( &self, textAttributesForPositiveInfinity: Option<&NSDictionary>, - ) { - msg_send![ - self, - setTextAttributesForPositiveInfinity: textAttributesForPositiveInfinity - ] - } - pub unsafe fn negativeInfinitySymbol(&self) -> Id { - msg_send_id![self, negativeInfinitySymbol] - } - pub unsafe fn setNegativeInfinitySymbol(&self, negativeInfinitySymbol: &NSString) { - msg_send![self, setNegativeInfinitySymbol: negativeInfinitySymbol] - } + ); + #[method_id(negativeInfinitySymbol)] + pub unsafe fn negativeInfinitySymbol(&self) -> Id; + # [method (setNegativeInfinitySymbol :)] + pub unsafe fn setNegativeInfinitySymbol(&self, negativeInfinitySymbol: &NSString); + #[method_id(textAttributesForNegativeInfinity)] pub unsafe fn textAttributesForNegativeInfinity( &self, - ) -> Option, Shared>> { - msg_send_id![self, textAttributesForNegativeInfinity] - } + ) -> Option, Shared>>; + # [method (setTextAttributesForNegativeInfinity :)] pub unsafe fn setTextAttributesForNegativeInfinity( &self, textAttributesForNegativeInfinity: Option<&NSDictionary>, - ) { - msg_send![ - self, - setTextAttributesForNegativeInfinity: textAttributesForNegativeInfinity - ] - } - pub unsafe fn positivePrefix(&self) -> Id { - msg_send_id![self, positivePrefix] - } - pub unsafe fn setPositivePrefix(&self, positivePrefix: Option<&NSString>) { - msg_send![self, setPositivePrefix: positivePrefix] - } - pub unsafe fn positiveSuffix(&self) -> Id { - msg_send_id![self, positiveSuffix] - } - pub unsafe fn setPositiveSuffix(&self, positiveSuffix: Option<&NSString>) { - msg_send![self, setPositiveSuffix: positiveSuffix] - } - pub unsafe fn negativePrefix(&self) -> Id { - msg_send_id![self, negativePrefix] - } - pub unsafe fn setNegativePrefix(&self, negativePrefix: Option<&NSString>) { - msg_send![self, setNegativePrefix: negativePrefix] - } - pub unsafe fn negativeSuffix(&self) -> Id { - msg_send_id![self, negativeSuffix] - } - pub unsafe fn setNegativeSuffix(&self, negativeSuffix: Option<&NSString>) { - msg_send![self, setNegativeSuffix: negativeSuffix] - } - pub unsafe fn currencyCode(&self) -> Id { - msg_send_id![self, currencyCode] - } - pub unsafe fn setCurrencyCode(&self, currencyCode: Option<&NSString>) { - msg_send![self, setCurrencyCode: currencyCode] - } - pub unsafe fn currencySymbol(&self) -> Id { - msg_send_id![self, currencySymbol] - } - pub unsafe fn setCurrencySymbol(&self, currencySymbol: Option<&NSString>) { - msg_send![self, setCurrencySymbol: currencySymbol] - } - pub unsafe fn internationalCurrencySymbol(&self) -> Id { - msg_send_id![self, internationalCurrencySymbol] - } + ); + #[method_id(positivePrefix)] + pub unsafe fn positivePrefix(&self) -> Id; + # [method (setPositivePrefix :)] + pub unsafe fn setPositivePrefix(&self, positivePrefix: Option<&NSString>); + #[method_id(positiveSuffix)] + pub unsafe fn positiveSuffix(&self) -> Id; + # [method (setPositiveSuffix :)] + pub unsafe fn setPositiveSuffix(&self, positiveSuffix: Option<&NSString>); + #[method_id(negativePrefix)] + pub unsafe fn negativePrefix(&self) -> Id; + # [method (setNegativePrefix :)] + pub unsafe fn setNegativePrefix(&self, negativePrefix: Option<&NSString>); + #[method_id(negativeSuffix)] + pub unsafe fn negativeSuffix(&self) -> Id; + # [method (setNegativeSuffix :)] + pub unsafe fn setNegativeSuffix(&self, negativeSuffix: Option<&NSString>); + #[method_id(currencyCode)] + pub unsafe fn currencyCode(&self) -> Id; + # [method (setCurrencyCode :)] + pub unsafe fn setCurrencyCode(&self, currencyCode: Option<&NSString>); + #[method_id(currencySymbol)] + pub unsafe fn currencySymbol(&self) -> Id; + # [method (setCurrencySymbol :)] + pub unsafe fn setCurrencySymbol(&self, currencySymbol: Option<&NSString>); + #[method_id(internationalCurrencySymbol)] + pub unsafe fn internationalCurrencySymbol(&self) -> Id; + # [method (setInternationalCurrencySymbol :)] pub unsafe fn setInternationalCurrencySymbol( &self, internationalCurrencySymbol: Option<&NSString>, - ) { - msg_send![ - self, - setInternationalCurrencySymbol: internationalCurrencySymbol - ] - } - pub unsafe fn percentSymbol(&self) -> Id { - msg_send_id![self, percentSymbol] - } - pub unsafe fn setPercentSymbol(&self, percentSymbol: Option<&NSString>) { - msg_send![self, setPercentSymbol: percentSymbol] - } - pub unsafe fn perMillSymbol(&self) -> Id { - msg_send_id![self, perMillSymbol] - } - pub unsafe fn setPerMillSymbol(&self, perMillSymbol: Option<&NSString>) { - msg_send![self, setPerMillSymbol: perMillSymbol] - } - pub unsafe fn minusSign(&self) -> Id { - msg_send_id![self, minusSign] - } - pub unsafe fn setMinusSign(&self, minusSign: Option<&NSString>) { - msg_send![self, setMinusSign: minusSign] - } - pub unsafe fn plusSign(&self) -> Id { - msg_send_id![self, plusSign] - } - pub unsafe fn setPlusSign(&self, plusSign: Option<&NSString>) { - msg_send![self, setPlusSign: plusSign] - } - pub unsafe fn exponentSymbol(&self) -> Id { - msg_send_id![self, exponentSymbol] - } - pub unsafe fn setExponentSymbol(&self, exponentSymbol: Option<&NSString>) { - msg_send![self, setExponentSymbol: exponentSymbol] - } - pub unsafe fn groupingSize(&self) -> NSUInteger { - msg_send![self, groupingSize] - } - pub unsafe fn setGroupingSize(&self, groupingSize: NSUInteger) { - msg_send![self, setGroupingSize: groupingSize] - } - pub unsafe fn secondaryGroupingSize(&self) -> NSUInteger { - msg_send![self, secondaryGroupingSize] - } - pub unsafe fn setSecondaryGroupingSize(&self, secondaryGroupingSize: NSUInteger) { - msg_send![self, setSecondaryGroupingSize: secondaryGroupingSize] - } - pub unsafe fn multiplier(&self) -> Option> { - msg_send_id![self, multiplier] - } - pub unsafe fn setMultiplier(&self, multiplier: Option<&NSNumber>) { - msg_send![self, setMultiplier: multiplier] - } - pub unsafe fn formatWidth(&self) -> NSUInteger { - msg_send![self, formatWidth] - } - pub unsafe fn setFormatWidth(&self, formatWidth: NSUInteger) { - msg_send![self, setFormatWidth: formatWidth] - } - pub unsafe fn paddingCharacter(&self) -> Id { - msg_send_id![self, paddingCharacter] - } - pub unsafe fn setPaddingCharacter(&self, paddingCharacter: Option<&NSString>) { - msg_send![self, setPaddingCharacter: paddingCharacter] - } - pub unsafe fn paddingPosition(&self) -> NSNumberFormatterPadPosition { - msg_send![self, paddingPosition] - } - pub unsafe fn setPaddingPosition(&self, paddingPosition: NSNumberFormatterPadPosition) { - msg_send![self, setPaddingPosition: paddingPosition] - } - pub unsafe fn roundingMode(&self) -> NSNumberFormatterRoundingMode { - msg_send![self, roundingMode] - } - pub unsafe fn setRoundingMode(&self, roundingMode: NSNumberFormatterRoundingMode) { - msg_send![self, setRoundingMode: roundingMode] - } - pub unsafe fn roundingIncrement(&self) -> Id { - msg_send_id![self, roundingIncrement] - } - pub unsafe fn setRoundingIncrement(&self, roundingIncrement: Option<&NSNumber>) { - msg_send![self, setRoundingIncrement: roundingIncrement] - } - pub unsafe fn minimumIntegerDigits(&self) -> NSUInteger { - msg_send![self, minimumIntegerDigits] - } - pub unsafe fn setMinimumIntegerDigits(&self, minimumIntegerDigits: NSUInteger) { - msg_send![self, setMinimumIntegerDigits: minimumIntegerDigits] - } - pub unsafe fn maximumIntegerDigits(&self) -> NSUInteger { - msg_send![self, maximumIntegerDigits] - } - pub unsafe fn setMaximumIntegerDigits(&self, maximumIntegerDigits: NSUInteger) { - msg_send![self, setMaximumIntegerDigits: maximumIntegerDigits] - } - pub unsafe fn minimumFractionDigits(&self) -> NSUInteger { - msg_send![self, minimumFractionDigits] - } - pub unsafe fn setMinimumFractionDigits(&self, minimumFractionDigits: NSUInteger) { - msg_send![self, setMinimumFractionDigits: minimumFractionDigits] - } - pub unsafe fn maximumFractionDigits(&self) -> NSUInteger { - msg_send![self, maximumFractionDigits] - } - pub unsafe fn setMaximumFractionDigits(&self, maximumFractionDigits: NSUInteger) { - msg_send![self, setMaximumFractionDigits: maximumFractionDigits] - } - pub unsafe fn minimum(&self) -> Option> { - msg_send_id![self, minimum] - } - pub unsafe fn setMinimum(&self, minimum: Option<&NSNumber>) { - msg_send![self, setMinimum: minimum] - } - pub unsafe fn maximum(&self) -> Option> { - msg_send_id![self, maximum] - } - pub unsafe fn setMaximum(&self, maximum: Option<&NSNumber>) { - msg_send![self, setMaximum: maximum] - } - pub unsafe fn currencyGroupingSeparator(&self) -> Id { - msg_send_id![self, currencyGroupingSeparator] - } + ); + #[method_id(percentSymbol)] + pub unsafe fn percentSymbol(&self) -> Id; + # [method (setPercentSymbol :)] + pub unsafe fn setPercentSymbol(&self, percentSymbol: Option<&NSString>); + #[method_id(perMillSymbol)] + pub unsafe fn perMillSymbol(&self) -> Id; + # [method (setPerMillSymbol :)] + pub unsafe fn setPerMillSymbol(&self, perMillSymbol: Option<&NSString>); + #[method_id(minusSign)] + pub unsafe fn minusSign(&self) -> Id; + # [method (setMinusSign :)] + pub unsafe fn setMinusSign(&self, minusSign: Option<&NSString>); + #[method_id(plusSign)] + pub unsafe fn plusSign(&self) -> Id; + # [method (setPlusSign :)] + pub unsafe fn setPlusSign(&self, plusSign: Option<&NSString>); + #[method_id(exponentSymbol)] + pub unsafe fn exponentSymbol(&self) -> Id; + # [method (setExponentSymbol :)] + pub unsafe fn setExponentSymbol(&self, exponentSymbol: Option<&NSString>); + #[method(groupingSize)] + pub unsafe fn groupingSize(&self) -> NSUInteger; + # [method (setGroupingSize :)] + pub unsafe fn setGroupingSize(&self, groupingSize: NSUInteger); + #[method(secondaryGroupingSize)] + pub unsafe fn secondaryGroupingSize(&self) -> NSUInteger; + # [method (setSecondaryGroupingSize :)] + pub unsafe fn setSecondaryGroupingSize(&self, secondaryGroupingSize: NSUInteger); + #[method_id(multiplier)] + pub unsafe fn multiplier(&self) -> Option>; + # [method (setMultiplier :)] + pub unsafe fn setMultiplier(&self, multiplier: Option<&NSNumber>); + #[method(formatWidth)] + pub unsafe fn formatWidth(&self) -> NSUInteger; + # [method (setFormatWidth :)] + pub unsafe fn setFormatWidth(&self, formatWidth: NSUInteger); + #[method_id(paddingCharacter)] + pub unsafe fn paddingCharacter(&self) -> Id; + # [method (setPaddingCharacter :)] + pub unsafe fn setPaddingCharacter(&self, paddingCharacter: Option<&NSString>); + #[method(paddingPosition)] + pub unsafe fn paddingPosition(&self) -> NSNumberFormatterPadPosition; + # [method (setPaddingPosition :)] + pub unsafe fn setPaddingPosition(&self, paddingPosition: NSNumberFormatterPadPosition); + #[method(roundingMode)] + pub unsafe fn roundingMode(&self) -> NSNumberFormatterRoundingMode; + # [method (setRoundingMode :)] + pub unsafe fn setRoundingMode(&self, roundingMode: NSNumberFormatterRoundingMode); + #[method_id(roundingIncrement)] + pub unsafe fn roundingIncrement(&self) -> Id; + # [method (setRoundingIncrement :)] + pub unsafe fn setRoundingIncrement(&self, roundingIncrement: Option<&NSNumber>); + #[method(minimumIntegerDigits)] + pub unsafe fn minimumIntegerDigits(&self) -> NSUInteger; + # [method (setMinimumIntegerDigits :)] + pub unsafe fn setMinimumIntegerDigits(&self, minimumIntegerDigits: NSUInteger); + #[method(maximumIntegerDigits)] + pub unsafe fn maximumIntegerDigits(&self) -> NSUInteger; + # [method (setMaximumIntegerDigits :)] + pub unsafe fn setMaximumIntegerDigits(&self, maximumIntegerDigits: NSUInteger); + #[method(minimumFractionDigits)] + pub unsafe fn minimumFractionDigits(&self) -> NSUInteger; + # [method (setMinimumFractionDigits :)] + pub unsafe fn setMinimumFractionDigits(&self, minimumFractionDigits: NSUInteger); + #[method(maximumFractionDigits)] + pub unsafe fn maximumFractionDigits(&self) -> NSUInteger; + # [method (setMaximumFractionDigits :)] + pub unsafe fn setMaximumFractionDigits(&self, maximumFractionDigits: NSUInteger); + #[method_id(minimum)] + pub unsafe fn minimum(&self) -> Option>; + # [method (setMinimum :)] + pub unsafe fn setMinimum(&self, minimum: Option<&NSNumber>); + #[method_id(maximum)] + pub unsafe fn maximum(&self) -> Option>; + # [method (setMaximum :)] + pub unsafe fn setMaximum(&self, maximum: Option<&NSNumber>); + #[method_id(currencyGroupingSeparator)] + pub unsafe fn currencyGroupingSeparator(&self) -> Id; + # [method (setCurrencyGroupingSeparator :)] pub unsafe fn setCurrencyGroupingSeparator( &self, currencyGroupingSeparator: Option<&NSString>, - ) { - msg_send![ - self, - setCurrencyGroupingSeparator: currencyGroupingSeparator - ] - } - pub unsafe fn isLenient(&self) -> bool { - msg_send![self, isLenient] - } - pub unsafe fn setLenient(&self, lenient: bool) { - msg_send![self, setLenient: lenient] - } - pub unsafe fn usesSignificantDigits(&self) -> bool { - msg_send![self, usesSignificantDigits] - } - pub unsafe fn setUsesSignificantDigits(&self, usesSignificantDigits: bool) { - msg_send![self, setUsesSignificantDigits: usesSignificantDigits] - } - pub unsafe fn minimumSignificantDigits(&self) -> NSUInteger { - msg_send![self, minimumSignificantDigits] - } - pub unsafe fn setMinimumSignificantDigits(&self, minimumSignificantDigits: NSUInteger) { - msg_send![self, setMinimumSignificantDigits: minimumSignificantDigits] - } - pub unsafe fn maximumSignificantDigits(&self) -> NSUInteger { - msg_send![self, maximumSignificantDigits] - } - pub unsafe fn setMaximumSignificantDigits(&self, maximumSignificantDigits: NSUInteger) { - msg_send![self, setMaximumSignificantDigits: maximumSignificantDigits] - } - pub unsafe fn isPartialStringValidationEnabled(&self) -> bool { - msg_send![self, isPartialStringValidationEnabled] - } + ); + #[method(isLenient)] + pub unsafe fn isLenient(&self) -> bool; + # [method (setLenient :)] + pub unsafe fn setLenient(&self, lenient: bool); + #[method(usesSignificantDigits)] + pub unsafe fn usesSignificantDigits(&self) -> bool; + # [method (setUsesSignificantDigits :)] + pub unsafe fn setUsesSignificantDigits(&self, usesSignificantDigits: bool); + #[method(minimumSignificantDigits)] + pub unsafe fn minimumSignificantDigits(&self) -> NSUInteger; + # [method (setMinimumSignificantDigits :)] + pub unsafe fn setMinimumSignificantDigits(&self, minimumSignificantDigits: NSUInteger); + #[method(maximumSignificantDigits)] + pub unsafe fn maximumSignificantDigits(&self) -> NSUInteger; + # [method (setMaximumSignificantDigits :)] + pub unsafe fn setMaximumSignificantDigits(&self, maximumSignificantDigits: NSUInteger); + #[method(isPartialStringValidationEnabled)] + pub unsafe fn isPartialStringValidationEnabled(&self) -> bool; + # [method (setPartialStringValidationEnabled :)] pub unsafe fn setPartialStringValidationEnabled( &self, partialStringValidationEnabled: bool, - ) { - msg_send![ - self, - setPartialStringValidationEnabled: partialStringValidationEnabled - ] - } + ); } ); use super::__exported::NSDecimalNumberHandler; extern_methods!( #[doc = "NSNumberFormatterCompatibility"] unsafe impl NSNumberFormatter { - pub unsafe fn hasThousandSeparators(&self) -> bool { - msg_send![self, hasThousandSeparators] - } - pub unsafe fn setHasThousandSeparators(&self, hasThousandSeparators: bool) { - msg_send![self, setHasThousandSeparators: hasThousandSeparators] - } - pub unsafe fn thousandSeparator(&self) -> Id { - msg_send_id![self, thousandSeparator] - } - pub unsafe fn setThousandSeparator(&self, thousandSeparator: Option<&NSString>) { - msg_send![self, setThousandSeparator: thousandSeparator] - } - pub unsafe fn localizesFormat(&self) -> bool { - msg_send![self, localizesFormat] - } - pub unsafe fn setLocalizesFormat(&self, localizesFormat: bool) { - msg_send![self, setLocalizesFormat: localizesFormat] - } - pub unsafe fn format(&self) -> Id { - msg_send_id![self, format] - } - pub unsafe fn setFormat(&self, format: &NSString) { - msg_send![self, setFormat: format] - } - pub unsafe fn attributedStringForZero(&self) -> Id { - msg_send_id![self, attributedStringForZero] - } + #[method(hasThousandSeparators)] + pub unsafe fn hasThousandSeparators(&self) -> bool; + # [method (setHasThousandSeparators :)] + pub unsafe fn setHasThousandSeparators(&self, hasThousandSeparators: bool); + #[method_id(thousandSeparator)] + pub unsafe fn thousandSeparator(&self) -> Id; + # [method (setThousandSeparator :)] + pub unsafe fn setThousandSeparator(&self, thousandSeparator: Option<&NSString>); + #[method(localizesFormat)] + pub unsafe fn localizesFormat(&self) -> bool; + # [method (setLocalizesFormat :)] + pub unsafe fn setLocalizesFormat(&self, localizesFormat: bool); + #[method_id(format)] + pub unsafe fn format(&self) -> Id; + # [method (setFormat :)] + pub unsafe fn setFormat(&self, format: &NSString); + #[method_id(attributedStringForZero)] + pub unsafe fn attributedStringForZero(&self) -> Id; + # [method (setAttributedStringForZero :)] pub unsafe fn setAttributedStringForZero( &self, attributedStringForZero: &NSAttributedString, - ) { - msg_send![self, setAttributedStringForZero: attributedStringForZero] - } - pub unsafe fn attributedStringForNil(&self) -> Id { - msg_send_id![self, attributedStringForNil] - } - pub unsafe fn setAttributedStringForNil( - &self, - attributedStringForNil: &NSAttributedString, - ) { - msg_send![self, setAttributedStringForNil: attributedStringForNil] - } - pub unsafe fn attributedStringForNotANumber(&self) -> Id { - msg_send_id![self, attributedStringForNotANumber] - } + ); + #[method_id(attributedStringForNil)] + pub unsafe fn attributedStringForNil(&self) -> Id; + # [method (setAttributedStringForNil :)] + pub unsafe fn setAttributedStringForNil(&self, attributedStringForNil: &NSAttributedString); + #[method_id(attributedStringForNotANumber)] + pub unsafe fn attributedStringForNotANumber(&self) -> Id; + # [method (setAttributedStringForNotANumber :)] pub unsafe fn setAttributedStringForNotANumber( &self, attributedStringForNotANumber: &NSAttributedString, - ) { - msg_send![ - self, - setAttributedStringForNotANumber: attributedStringForNotANumber - ] - } - pub unsafe fn roundingBehavior(&self) -> Id { - msg_send_id![self, roundingBehavior] - } - pub unsafe fn setRoundingBehavior(&self, roundingBehavior: &NSDecimalNumberHandler) { - msg_send![self, setRoundingBehavior: roundingBehavior] - } + ); + #[method_id(roundingBehavior)] + pub unsafe fn roundingBehavior(&self) -> Id; + # [method (setRoundingBehavior :)] + pub unsafe fn setRoundingBehavior(&self, roundingBehavior: &NSDecimalNumberHandler); } ); diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 68571c85a..cf5cbc6c5 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -5,6 +5,6 @@ use crate::CoreFoundation::generated::CFAvailability::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSExceptionName = NSString; pub type NSRunLoopMode = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index 35706ca04..eaa6ae1b4 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSZone::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSCopying = NSObject; pub type NSMutableCopying = NSObject; pub type NSCoding = NSObject; @@ -18,37 +18,31 @@ pub type NSSecureCoding = NSObject; extern_methods!( #[doc = "NSCoderMethods"] unsafe impl NSObject { - pub unsafe fn version() -> NSInteger { - msg_send![Self::class(), version] - } - pub unsafe fn setVersion(aVersion: NSInteger) { - msg_send![Self::class(), setVersion: aVersion] - } - pub unsafe fn classForCoder(&self) -> &Class { - msg_send![self, classForCoder] - } + #[method(version)] + pub unsafe fn version() -> NSInteger; + # [method (setVersion :)] + pub unsafe fn setVersion(aVersion: NSInteger); + #[method(classForCoder)] + pub unsafe fn classForCoder(&self) -> &Class; + # [method_id (replacementObjectForCoder :)] pub unsafe fn replacementObjectForCoder( &self, coder: &NSCoder, - ) -> Option> { - msg_send_id![self, replacementObjectForCoder: coder] - } + ) -> Option>; } ); extern_methods!( #[doc = "NSDeprecatedMethods"] unsafe impl NSObject { - pub unsafe fn poseAsClass(aClass: &Class) { - msg_send![Self::class(), poseAsClass: aClass] - } + # [method (poseAsClass :)] + pub unsafe fn poseAsClass(aClass: &Class); } ); pub type NSDiscardableContent = NSObject; extern_methods!( #[doc = "NSDiscardableContentProxy"] unsafe impl NSObject { - pub unsafe fn autoContentAccessingProxy(&self) -> Id { - msg_send_id![self, autoContentAccessingProxy] - } + #[method_id(autoContentAccessingProxy)] + pub unsafe fn autoContentAccessingProxy(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs index d9a972a5c..adfdc0769 100644 --- a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -5,54 +5,38 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_methods!( #[doc = "NSScripting"] unsafe impl NSObject { + # [method_id (scriptingValueForSpecifier :)] pub unsafe fn scriptingValueForSpecifier( &self, objectSpecifier: &NSScriptObjectSpecifier, - ) -> Option> { - msg_send_id![self, scriptingValueForSpecifier: objectSpecifier] - } + ) -> Option>; + #[method_id(scriptingProperties)] pub unsafe fn scriptingProperties( &self, - ) -> Option, Shared>> { - msg_send_id![self, scriptingProperties] - } + ) -> Option, Shared>>; + # [method (setScriptingProperties :)] pub unsafe fn setScriptingProperties( &self, scriptingProperties: Option<&NSDictionary>, - ) { - msg_send![self, setScriptingProperties: scriptingProperties] - } + ); + # [method_id (copyScriptingValue : forKey : withProperties :)] pub unsafe fn copyScriptingValue_forKey_withProperties( &self, value: &Object, key: &NSString, properties: &NSDictionary, - ) -> Option> { - msg_send_id![ - self, - copyScriptingValue: value, - forKey: key, - withProperties: properties - ] - } + ) -> Option>; + # [method_id (newScriptingObjectOfClass : forValueForKey : withContentsValue : properties :)] pub unsafe fn newScriptingObjectOfClass_forValueForKey_withContentsValue_properties( &self, objectClass: &Class, key: &NSString, contentsValue: Option<&Object>, properties: &NSDictionary, - ) -> Option> { - msg_send_id![ - self, - newScriptingObjectOfClass: objectClass, - forValueForKey: key, - withContentsValue: contentsValue, - properties: properties - ] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 03acffc42..7092c0ebb 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSProgress::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSOperation; @@ -18,75 +18,52 @@ extern_class!( ); extern_methods!( unsafe impl NSOperation { - pub unsafe fn start(&self) { - msg_send![self, start] - } - pub unsafe fn main(&self) { - msg_send![self, main] - } - pub unsafe fn isCancelled(&self) -> bool { - msg_send![self, isCancelled] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn isExecuting(&self) -> bool { - msg_send![self, isExecuting] - } - pub unsafe fn isFinished(&self) -> bool { - msg_send![self, isFinished] - } - pub unsafe fn isConcurrent(&self) -> bool { - msg_send![self, isConcurrent] - } - pub unsafe fn isAsynchronous(&self) -> bool { - msg_send![self, isAsynchronous] - } - pub unsafe fn isReady(&self) -> bool { - msg_send![self, isReady] - } - pub unsafe fn addDependency(&self, op: &NSOperation) { - msg_send![self, addDependency: op] - } - pub unsafe fn removeDependency(&self, op: &NSOperation) { - msg_send![self, removeDependency: op] - } - pub unsafe fn dependencies(&self) -> Id, Shared> { - msg_send_id![self, dependencies] - } - pub unsafe fn queuePriority(&self) -> NSOperationQueuePriority { - msg_send![self, queuePriority] - } - pub unsafe fn setQueuePriority(&self, queuePriority: NSOperationQueuePriority) { - msg_send![self, setQueuePriority: queuePriority] - } - pub unsafe fn completionBlock(&self) -> TodoBlock { - msg_send![self, completionBlock] - } - pub unsafe fn setCompletionBlock(&self, completionBlock: TodoBlock) { - msg_send![self, setCompletionBlock: completionBlock] - } - pub unsafe fn waitUntilFinished(&self) { - msg_send![self, waitUntilFinished] - } - pub unsafe fn threadPriority(&self) -> c_double { - msg_send![self, threadPriority] - } - pub unsafe fn setThreadPriority(&self, threadPriority: c_double) { - msg_send![self, setThreadPriority: threadPriority] - } - pub unsafe fn qualityOfService(&self) -> NSQualityOfService { - msg_send![self, qualityOfService] - } - pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { - msg_send![self, setQualityOfService: qualityOfService] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } + #[method(start)] + pub unsafe fn start(&self); + #[method(main)] + pub unsafe fn main(&self); + #[method(isCancelled)] + pub unsafe fn isCancelled(&self) -> bool; + #[method(cancel)] + pub unsafe fn cancel(&self); + #[method(isExecuting)] + pub unsafe fn isExecuting(&self) -> bool; + #[method(isFinished)] + pub unsafe fn isFinished(&self) -> bool; + #[method(isConcurrent)] + pub unsafe fn isConcurrent(&self) -> bool; + #[method(isAsynchronous)] + pub unsafe fn isAsynchronous(&self) -> bool; + #[method(isReady)] + pub unsafe fn isReady(&self) -> bool; + # [method (addDependency :)] + pub unsafe fn addDependency(&self, op: &NSOperation); + # [method (removeDependency :)] + pub unsafe fn removeDependency(&self, op: &NSOperation); + #[method_id(dependencies)] + pub unsafe fn dependencies(&self) -> Id, Shared>; + #[method(queuePriority)] + pub unsafe fn queuePriority(&self) -> NSOperationQueuePriority; + # [method (setQueuePriority :)] + pub unsafe fn setQueuePriority(&self, queuePriority: NSOperationQueuePriority); + #[method(completionBlock)] + pub unsafe fn completionBlock(&self) -> TodoBlock; + # [method (setCompletionBlock :)] + pub unsafe fn setCompletionBlock(&self, completionBlock: TodoBlock); + #[method(waitUntilFinished)] + pub unsafe fn waitUntilFinished(&self); + #[method(threadPriority)] + pub unsafe fn threadPriority(&self) -> c_double; + # [method (setThreadPriority :)] + pub unsafe fn setThreadPriority(&self, threadPriority: c_double); + #[method(qualityOfService)] + pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + # [method (setQualityOfService :)] + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + # [method (setName :)] + pub unsafe fn setName(&self, name: Option<&NSString>); } ); extern_class!( @@ -98,12 +75,10 @@ extern_class!( ); extern_methods!( unsafe impl NSBlockOperation { - pub unsafe fn blockOperationWithBlock(block: TodoBlock) -> Id { - msg_send_id![Self::class(), blockOperationWithBlock: block] - } - pub unsafe fn addExecutionBlock(&self, block: TodoBlock) { - msg_send![self, addExecutionBlock: block] - } + # [method_id (blockOperationWithBlock :)] + pub unsafe fn blockOperationWithBlock(block: TodoBlock) -> Id; + # [method (addExecutionBlock :)] + pub unsafe fn addExecutionBlock(&self, block: TodoBlock); } ); extern_class!( @@ -115,23 +90,19 @@ extern_class!( ); extern_methods!( unsafe impl NSInvocationOperation { + # [method_id (initWithTarget : selector : object :)] pub unsafe fn initWithTarget_selector_object( &self, target: &Object, sel: Sel, arg: Option<&Object>, - ) -> Option> { - msg_send_id![self, initWithTarget: target, selector: sel, object: arg] - } - pub unsafe fn initWithInvocation(&self, inv: &NSInvocation) -> Id { - msg_send_id![self, initWithInvocation: inv] - } - pub unsafe fn invocation(&self) -> Id { - msg_send_id![self, invocation] - } - pub unsafe fn result(&self) -> Option> { - msg_send_id![self, result] - } + ) -> Option>; + # [method_id (initWithInvocation :)] + pub unsafe fn initWithInvocation(&self, inv: &NSInvocation) -> Id; + #[method_id(invocation)] + pub unsafe fn invocation(&self) -> Id; + #[method_id(result)] + pub unsafe fn result(&self) -> Option>; } ); extern_class!( @@ -143,83 +114,56 @@ extern_class!( ); extern_methods!( unsafe impl NSOperationQueue { - pub unsafe fn progress(&self) -> Id { - msg_send_id![self, progress] - } - pub unsafe fn addOperation(&self, op: &NSOperation) { - msg_send![self, addOperation: op] - } + #[method_id(progress)] + pub unsafe fn progress(&self) -> Id; + # [method (addOperation :)] + pub unsafe fn addOperation(&self, op: &NSOperation); + # [method (addOperations : waitUntilFinished :)] pub unsafe fn addOperations_waitUntilFinished( &self, ops: &NSArray, wait: bool, - ) { - msg_send![self, addOperations: ops, waitUntilFinished: wait] - } - pub unsafe fn addOperationWithBlock(&self, block: TodoBlock) { - msg_send![self, addOperationWithBlock: block] - } - pub unsafe fn addBarrierBlock(&self, barrier: TodoBlock) { - msg_send![self, addBarrierBlock: barrier] - } - pub unsafe fn maxConcurrentOperationCount(&self) -> NSInteger { - msg_send![self, maxConcurrentOperationCount] - } - pub unsafe fn setMaxConcurrentOperationCount( - &self, - maxConcurrentOperationCount: NSInteger, - ) { - msg_send![ - self, - setMaxConcurrentOperationCount: maxConcurrentOperationCount - ] - } - pub unsafe fn isSuspended(&self) -> bool { - msg_send![self, isSuspended] - } - pub unsafe fn setSuspended(&self, suspended: bool) { - msg_send![self, setSuspended: suspended] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } - pub unsafe fn qualityOfService(&self) -> NSQualityOfService { - msg_send![self, qualityOfService] - } - pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { - msg_send![self, setQualityOfService: qualityOfService] - } - pub unsafe fn underlyingQueue(&self) -> Option> { - msg_send_id![self, underlyingQueue] - } - pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: Option<&dispatch_queue_t>) { - msg_send![self, setUnderlyingQueue: underlyingQueue] - } - pub unsafe fn cancelAllOperations(&self) { - msg_send![self, cancelAllOperations] - } - pub unsafe fn waitUntilAllOperationsAreFinished(&self) { - msg_send![self, waitUntilAllOperationsAreFinished] - } - pub unsafe fn currentQueue() -> Option> { - msg_send_id![Self::class(), currentQueue] - } - pub unsafe fn mainQueue() -> Id { - msg_send_id![Self::class(), mainQueue] - } + ); + # [method (addOperationWithBlock :)] + pub unsafe fn addOperationWithBlock(&self, block: TodoBlock); + # [method (addBarrierBlock :)] + pub unsafe fn addBarrierBlock(&self, barrier: TodoBlock); + #[method(maxConcurrentOperationCount)] + pub unsafe fn maxConcurrentOperationCount(&self) -> NSInteger; + # [method (setMaxConcurrentOperationCount :)] + pub unsafe fn setMaxConcurrentOperationCount(&self, maxConcurrentOperationCount: NSInteger); + #[method(isSuspended)] + pub unsafe fn isSuspended(&self) -> bool; + # [method (setSuspended :)] + pub unsafe fn setSuspended(&self, suspended: bool); + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + # [method (setName :)] + pub unsafe fn setName(&self, name: Option<&NSString>); + #[method(qualityOfService)] + pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + # [method (setQualityOfService :)] + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); + #[method_id(underlyingQueue)] + pub unsafe fn underlyingQueue(&self) -> Option>; + # [method (setUnderlyingQueue :)] + pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: Option<&dispatch_queue_t>); + #[method(cancelAllOperations)] + pub unsafe fn cancelAllOperations(&self); + #[method(waitUntilAllOperationsAreFinished)] + pub unsafe fn waitUntilAllOperationsAreFinished(&self); + #[method_id(currentQueue)] + pub unsafe fn currentQueue() -> Option>; + #[method_id(mainQueue)] + pub unsafe fn mainQueue() -> Id; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSOperationQueue { - pub unsafe fn operations(&self) -> Id, Shared> { - msg_send_id![self, operations] - } - pub unsafe fn operationCount(&self) -> NSUInteger { - msg_send![self, operationCount] - } + #[method_id(operations)] + pub unsafe fn operations(&self) -> Id, Shared>; + #[method(operationCount)] + pub unsafe fn operationCount(&self) -> NSUInteger; } ); diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index fb0cd6871..1441aa435 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedCollectionChange; @@ -12,52 +12,43 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSOrderedCollectionChange { + # [method_id (changeWithObject : type : index :)] pub unsafe fn changeWithObject_type_index( anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, - ) -> Id, Shared> { - msg_send_id ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index] - } + ) -> Id, Shared>; + # [method_id (changeWithObject : type : index : associatedIndex :)] pub unsafe fn changeWithObject_type_index_associatedIndex( anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, associatedIndex: NSUInteger, - ) -> Id, Shared> { - msg_send_id ! [Self :: class () , changeWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] - } - pub unsafe fn object(&self) -> Option> { - msg_send_id![self, object] - } - pub unsafe fn changeType(&self) -> NSCollectionChangeType { - msg_send![self, changeType] - } - pub unsafe fn index(&self) -> NSUInteger { - msg_send![self, index] - } - pub unsafe fn associatedIndex(&self) -> NSUInteger { - msg_send![self, associatedIndex] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + ) -> Id, Shared>; + #[method_id(object)] + pub unsafe fn object(&self) -> Option>; + #[method(changeType)] + pub unsafe fn changeType(&self) -> NSCollectionChangeType; + #[method(index)] + pub unsafe fn index(&self) -> NSUInteger; + #[method(associatedIndex)] + pub unsafe fn associatedIndex(&self) -> NSUInteger; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithObject : type : index :)] pub unsafe fn initWithObject_type_index( &self, anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, - ) -> Id { - msg_send_id ! [self , initWithObject : anObject , type : type_ , index : index] - } + ) -> Id; + # [method_id (initWithObject : type : index : associatedIndex :)] pub unsafe fn initWithObject_type_index_associatedIndex( &self, anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, associatedIndex: NSUInteger, - ) -> Id { - msg_send_id ! [self , initWithObject : anObject , type : type_ , index : index , associatedIndex : associatedIndex] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 419be43ec..c06519be2 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSOrderedCollectionChange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedCollectionDifference; @@ -15,12 +15,12 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSOrderedCollectionDifference { + # [method_id (initWithChanges :)] pub unsafe fn initWithChanges( &self, changes: &NSArray>, - ) -> Id { - msg_send_id![self, initWithChanges: changes] - } + ) -> Id; + # [method_id (initWithInsertIndexes : insertedObjects : removeIndexes : removedObjects : additionalChanges :)] pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges( &self, inserts: &NSIndexSet, @@ -28,52 +28,30 @@ extern_methods!( removes: &NSIndexSet, removedObjects: Option<&NSArray>, changes: &NSArray>, - ) -> Id { - msg_send_id![ - self, - initWithInsertIndexes: inserts, - insertedObjects: insertedObjects, - removeIndexes: removes, - removedObjects: removedObjects, - additionalChanges: changes - ] - } + ) -> Id; + # [method_id (initWithInsertIndexes : insertedObjects : removeIndexes : removedObjects :)] pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects( &self, inserts: &NSIndexSet, insertedObjects: Option<&NSArray>, removes: &NSIndexSet, removedObjects: Option<&NSArray>, - ) -> Id { - msg_send_id![ - self, - initWithInsertIndexes: inserts, - insertedObjects: insertedObjects, - removeIndexes: removes, - removedObjects: removedObjects - ] - } + ) -> Id; + #[method_id(insertions)] pub unsafe fn insertions( &self, - ) -> Id>, Shared> { - msg_send_id![self, insertions] - } - pub unsafe fn removals( - &self, - ) -> Id>, Shared> { - msg_send_id![self, removals] - } - pub unsafe fn hasChanges(&self) -> bool { - msg_send![self, hasChanges] - } + ) -> Id>, Shared>; + #[method_id(removals)] + pub unsafe fn removals(&self) + -> Id>, Shared>; + #[method(hasChanges)] + pub unsafe fn hasChanges(&self) -> bool; + # [method_id (differenceByTransformingChangesWithBlock :)] pub unsafe fn differenceByTransformingChangesWithBlock( &self, block: TodoBlock, - ) -> Id, Shared> { - msg_send_id![self, differenceByTransformingChangesWithBlock: block] - } - pub unsafe fn inverseDifference(&self) -> Id { - msg_send_id![self, inverseDifference] - } + ) -> Id, Shared>; + #[method_id(inverseDifference)] + pub unsafe fn inverseDifference(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 7b7a74b20..c395ec352 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedSet; @@ -20,349 +20,246 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSOrderedSet { - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Id { - msg_send_id![self, objectAtIndex: idx] - } - pub unsafe fn indexOfObject(&self, object: &ObjectType) -> NSUInteger { - msg_send![self, indexOfObject: object] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + # [method_id (objectAtIndex :)] + pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Id; + # [method (indexOfObject :)] + pub unsafe fn indexOfObject(&self, object: &ObjectType) -> NSUInteger; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithObjects : count :)] pub unsafe fn initWithObjects_count( &self, objects: TodoArray, cnt: NSUInteger, - ) -> Id { - msg_send_id![self, initWithObjects: objects, count: cnt] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedOrderedSet"] unsafe impl NSOrderedSet { - pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange) { - msg_send![self, getObjects: objects, range: range] - } + # [method (getObjects : range :)] + pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange); + # [method_id (objectsAtIndexes :)] pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet, - ) -> Id, Shared> { - msg_send_id![self, objectsAtIndexes: indexes] - } - pub unsafe fn firstObject(&self) -> Option> { - msg_send_id![self, firstObject] - } - pub unsafe fn lastObject(&self) -> Option> { - msg_send_id![self, lastObject] - } - pub unsafe fn isEqualToOrderedSet(&self, other: &NSOrderedSet) -> bool { - msg_send![self, isEqualToOrderedSet: other] - } - pub unsafe fn containsObject(&self, object: &ObjectType) -> bool { - msg_send![self, containsObject: object] - } - pub unsafe fn intersectsOrderedSet(&self, other: &NSOrderedSet) -> bool { - msg_send![self, intersectsOrderedSet: other] - } - pub unsafe fn intersectsSet(&self, set: &NSSet) -> bool { - msg_send![self, intersectsSet: set] - } - pub unsafe fn isSubsetOfOrderedSet(&self, other: &NSOrderedSet) -> bool { - msg_send![self, isSubsetOfOrderedSet: other] - } - pub unsafe fn isSubsetOfSet(&self, set: &NSSet) -> bool { - msg_send![self, isSubsetOfSet: set] - } - pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id { - msg_send_id![self, objectAtIndexedSubscript: idx] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, reverseObjectEnumerator] - } - pub unsafe fn reversedOrderedSet(&self) -> Id, Shared> { - msg_send_id![self, reversedOrderedSet] - } - pub unsafe fn array(&self) -> Id, Shared> { - msg_send_id![self, array] - } - pub unsafe fn set(&self) -> Id, Shared> { - msg_send_id![self, set] - } - pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateObjectsUsingBlock: block] - } + ) -> Id, Shared>; + #[method_id(firstObject)] + pub unsafe fn firstObject(&self) -> Option>; + #[method_id(lastObject)] + pub unsafe fn lastObject(&self) -> Option>; + # [method (isEqualToOrderedSet :)] + pub unsafe fn isEqualToOrderedSet(&self, other: &NSOrderedSet) -> bool; + # [method (containsObject :)] + pub unsafe fn containsObject(&self, object: &ObjectType) -> bool; + # [method (intersectsOrderedSet :)] + pub unsafe fn intersectsOrderedSet(&self, other: &NSOrderedSet) -> bool; + # [method (intersectsSet :)] + pub unsafe fn intersectsSet(&self, set: &NSSet) -> bool; + # [method (isSubsetOfOrderedSet :)] + pub unsafe fn isSubsetOfOrderedSet(&self, other: &NSOrderedSet) -> bool; + # [method (isSubsetOfSet :)] + pub unsafe fn isSubsetOfSet(&self, set: &NSSet) -> bool; + # [method_id (objectAtIndexedSubscript :)] + pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; + #[method_id(objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + #[method_id(reverseObjectEnumerator)] + pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared>; + #[method_id(reversedOrderedSet)] + pub unsafe fn reversedOrderedSet(&self) -> Id, Shared>; + #[method_id(array)] + pub unsafe fn array(&self) -> Id, Shared>; + #[method_id(set)] + pub unsafe fn set(&self) -> Id, Shared>; + # [method (enumerateObjectsUsingBlock :)] + pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); + # [method (enumerateObjectsWithOptions : usingBlock :)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] - } + ); + # [method (enumerateObjectsAtIndexes : options : usingBlock :)] pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( &self, s: &NSIndexSet, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateObjectsAtIndexes: s, - options: opts, - usingBlock: block - ] - } - pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger { - msg_send![self, indexOfObjectPassingTest: predicate] - } + ); + # [method (indexOfObjectPassingTest :)] + pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger; + # [method (indexOfObjectWithOptions : passingTest :)] pub unsafe fn indexOfObjectWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> NSUInteger { - msg_send![self, indexOfObjectWithOptions: opts, passingTest: predicate] - } + ) -> NSUInteger; + # [method (indexOfObjectAtIndexes : options : passingTest :)] pub unsafe fn indexOfObjectAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> NSUInteger { - msg_send![ - self, - indexOfObjectAtIndexes: s, - options: opts, - passingTest: predicate - ] - } + ) -> NSUInteger; + # [method_id (indexesOfObjectsPassingTest :)] pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: TodoBlock, - ) -> Id { - msg_send_id![self, indexesOfObjectsPassingTest: predicate] - } + ) -> Id; + # [method_id (indexesOfObjectsWithOptions : passingTest :)] pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> Id { - msg_send_id![ - self, - indexesOfObjectsWithOptions: opts, - passingTest: predicate - ] - } + ) -> Id; + # [method_id (indexesOfObjectsAtIndexes : options : passingTest :)] pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> Id { - msg_send_id![ - self, - indexesOfObjectsAtIndexes: s, - options: opts, - passingTest: predicate - ] - } + ) -> Id; + # [method (indexOfObject : inSortedRange : options : usingComparator :)] pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, object: &ObjectType, range: NSRange, opts: NSBinarySearchingOptions, cmp: NSComparator, - ) -> NSUInteger { - msg_send![ - self, - indexOfObject: object, - inSortedRange: range, - options: opts, - usingComparator: cmp - ] - } + ) -> NSUInteger; + # [method_id (sortedArrayUsingComparator :)] pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingComparator: cmptr] - } + ) -> Id, Shared>; + # [method_id (sortedArrayWithOptions : usingComparator :)] pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayWithOptions: opts, usingComparator: cmptr] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionWithLocale( - &self, - locale: Option<&Object>, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } + ) -> Id, Shared>; + #[method_id(description)] + pub unsafe fn description(&self) -> Id; + # [method_id (descriptionWithLocale :)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + # [method_id (descriptionWithLocale : indent :)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, level: NSUInteger, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale, indent: level] - } + ) -> Id; } ); extern_methods!( #[doc = "NSOrderedSetCreation"] unsafe impl NSOrderedSet { - pub unsafe fn orderedSet() -> Id { - msg_send_id![Self::class(), orderedSet] - } - pub unsafe fn orderedSetWithObject(object: &ObjectType) -> Id { - msg_send_id![Self::class(), orderedSetWithObject: object] - } + #[method_id(orderedSet)] + pub unsafe fn orderedSet() -> Id; + # [method_id (orderedSetWithObject :)] + pub unsafe fn orderedSetWithObject(object: &ObjectType) -> Id; + # [method_id (orderedSetWithObjects : count :)] pub unsafe fn orderedSetWithObjects_count( objects: TodoArray, cnt: NSUInteger, - ) -> Id { - msg_send_id![Self::class(), orderedSetWithObjects: objects, count: cnt] - } - pub unsafe fn orderedSetWithOrderedSet(set: &NSOrderedSet) -> Id { - msg_send_id![Self::class(), orderedSetWithOrderedSet: set] - } + ) -> Id; + # [method_id (orderedSetWithOrderedSet :)] + pub unsafe fn orderedSetWithOrderedSet(set: &NSOrderedSet) -> Id; + # [method_id (orderedSetWithOrderedSet : range : copyItems :)] pub unsafe fn orderedSetWithOrderedSet_range_copyItems( set: &NSOrderedSet, range: NSRange, flag: bool, - ) -> Id { - msg_send_id![ - Self::class(), - orderedSetWithOrderedSet: set, - range: range, - copyItems: flag - ] - } - pub unsafe fn orderedSetWithArray(array: &NSArray) -> Id { - msg_send_id![Self::class(), orderedSetWithArray: array] - } + ) -> Id; + # [method_id (orderedSetWithArray :)] + pub unsafe fn orderedSetWithArray(array: &NSArray) -> Id; + # [method_id (orderedSetWithArray : range : copyItems :)] pub unsafe fn orderedSetWithArray_range_copyItems( array: &NSArray, range: NSRange, flag: bool, - ) -> Id { - msg_send_id![ - Self::class(), - orderedSetWithArray: array, - range: range, - copyItems: flag - ] - } - pub unsafe fn orderedSetWithSet(set: &NSSet) -> Id { - msg_send_id![Self::class(), orderedSetWithSet: set] - } + ) -> Id; + # [method_id (orderedSetWithSet :)] + pub unsafe fn orderedSetWithSet(set: &NSSet) -> Id; + # [method_id (orderedSetWithSet : copyItems :)] pub unsafe fn orderedSetWithSet_copyItems( set: &NSSet, flag: bool, - ) -> Id { - msg_send_id![Self::class(), orderedSetWithSet: set, copyItems: flag] - } - pub unsafe fn initWithObject(&self, object: &ObjectType) -> Id { - msg_send_id![self, initWithObject: object] - } - pub unsafe fn initWithOrderedSet( - &self, - set: &NSOrderedSet, - ) -> Id { - msg_send_id![self, initWithOrderedSet: set] - } + ) -> Id; + # [method_id (initWithObject :)] + pub unsafe fn initWithObject(&self, object: &ObjectType) -> Id; + # [method_id (initWithOrderedSet :)] + pub unsafe fn initWithOrderedSet(&self, set: &NSOrderedSet) + -> Id; + # [method_id (initWithOrderedSet : copyItems :)] pub unsafe fn initWithOrderedSet_copyItems( &self, set: &NSOrderedSet, flag: bool, - ) -> Id { - msg_send_id![self, initWithOrderedSet: set, copyItems: flag] - } + ) -> Id; + # [method_id (initWithOrderedSet : range : copyItems :)] pub unsafe fn initWithOrderedSet_range_copyItems( &self, set: &NSOrderedSet, range: NSRange, flag: bool, - ) -> Id { - msg_send_id![self, initWithOrderedSet: set, range: range, copyItems: flag] - } - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { - msg_send_id![self, initWithArray: array] - } + ) -> Id; + # [method_id (initWithArray :)] + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; + # [method_id (initWithArray : copyItems :)] pub unsafe fn initWithArray_copyItems( &self, set: &NSArray, flag: bool, - ) -> Id { - msg_send_id![self, initWithArray: set, copyItems: flag] - } + ) -> Id; + # [method_id (initWithArray : range : copyItems :)] pub unsafe fn initWithArray_range_copyItems( &self, set: &NSArray, range: NSRange, flag: bool, - ) -> Id { - msg_send_id![self, initWithArray: set, range: range, copyItems: flag] - } - pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { - msg_send_id![self, initWithSet: set] - } + ) -> Id; + # [method_id (initWithSet :)] + pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; + # [method_id (initWithSet : copyItems :)] pub unsafe fn initWithSet_copyItems( &self, set: &NSSet, flag: bool, - ) -> Id { - msg_send_id![self, initWithSet: set, copyItems: flag] - } + ) -> Id; } ); extern_methods!( #[doc = "NSOrderedSetDiffing"] unsafe impl NSOrderedSet { + # [method_id (differenceFromOrderedSet : withOptions : usingEquivalenceTest :)] pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( &self, other: &NSOrderedSet, options: NSOrderedCollectionDifferenceCalculationOptions, block: TodoBlock, - ) -> Id, Shared> { - msg_send_id![ - self, - differenceFromOrderedSet: other, - withOptions: options, - usingEquivalenceTest: block - ] - } + ) -> Id, Shared>; + # [method_id (differenceFromOrderedSet : withOptions :)] pub unsafe fn differenceFromOrderedSet_withOptions( &self, other: &NSOrderedSet, options: NSOrderedCollectionDifferenceCalculationOptions, - ) -> Id, Shared> { - msg_send_id![self, differenceFromOrderedSet: other, withOptions: options] - } + ) -> Id, Shared>; + # [method_id (differenceFromOrderedSet :)] pub unsafe fn differenceFromOrderedSet( &self, other: &NSOrderedSet, - ) -> Id, Shared> { - msg_send_id![self, differenceFromOrderedSet: other] - } + ) -> Id, Shared>; + # [method_id (orderedSetByApplyingDifference :)] pub unsafe fn orderedSetByApplyingDifference( &self, difference: &NSOrderedCollectionDifference, - ) -> Option, Shared>> { - msg_send_id![self, orderedSetByApplyingDifference: difference] - } + ) -> Option, Shared>>; } ); __inner_extern_class!( @@ -374,155 +271,113 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMutableOrderedSet { - pub unsafe fn insertObject_atIndex(&self, object: &ObjectType, idx: NSUInteger) { - msg_send![self, insertObject: object, atIndex: idx] - } - pub unsafe fn removeObjectAtIndex(&self, idx: NSUInteger) { - msg_send![self, removeObjectAtIndex: idx] - } - pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: &ObjectType) { - msg_send![self, replaceObjectAtIndex: idx, withObject: object] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: numItems] - } + # [method (insertObject : atIndex :)] + pub unsafe fn insertObject_atIndex(&self, object: &ObjectType, idx: NSUInteger); + # [method (removeObjectAtIndex :)] + pub unsafe fn removeObjectAtIndex(&self, idx: NSUInteger); + # [method (replaceObjectAtIndex : withObject :)] + pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: &ObjectType); + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithCapacity :)] + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; } ); extern_methods!( #[doc = "NSExtendedMutableOrderedSet"] unsafe impl NSMutableOrderedSet { - pub unsafe fn addObject(&self, object: &ObjectType) { - msg_send![self, addObject: object] - } - pub unsafe fn addObjects_count(&self, objects: TodoArray, count: NSUInteger) { - msg_send![self, addObjects: objects, count: count] - } - pub unsafe fn addObjectsFromArray(&self, array: &NSArray) { - msg_send![self, addObjectsFromArray: array] - } + # [method (addObject :)] + pub unsafe fn addObject(&self, object: &ObjectType); + # [method (addObjects : count :)] + pub unsafe fn addObjects_count(&self, objects: TodoArray, count: NSUInteger); + # [method (addObjectsFromArray :)] + pub unsafe fn addObjectsFromArray(&self, array: &NSArray); + # [method (exchangeObjectAtIndex : withObjectAtIndex :)] pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( &self, idx1: NSUInteger, idx2: NSUInteger, - ) { - msg_send![self, exchangeObjectAtIndex: idx1, withObjectAtIndex: idx2] - } - pub unsafe fn moveObjectsAtIndexes_toIndex(&self, indexes: &NSIndexSet, idx: NSUInteger) { - msg_send![self, moveObjectsAtIndexes: indexes, toIndex: idx] - } + ); + # [method (moveObjectsAtIndexes : toIndex :)] + pub unsafe fn moveObjectsAtIndexes_toIndex(&self, indexes: &NSIndexSet, idx: NSUInteger); + # [method (insertObjects : atIndexes :)] pub unsafe fn insertObjects_atIndexes( &self, objects: &NSArray, indexes: &NSIndexSet, - ) { - msg_send![self, insertObjects: objects, atIndexes: indexes] - } - pub unsafe fn setObject_atIndex(&self, obj: &ObjectType, idx: NSUInteger) { - msg_send![self, setObject: obj, atIndex: idx] - } - pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger) { - msg_send![self, setObject: obj, atIndexedSubscript: idx] - } + ); + # [method (setObject : atIndex :)] + pub unsafe fn setObject_atIndex(&self, obj: &ObjectType, idx: NSUInteger); + # [method (setObject : atIndexedSubscript :)] + pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger); + # [method (replaceObjectsInRange : withObjects : count :)] pub unsafe fn replaceObjectsInRange_withObjects_count( &self, range: NSRange, objects: TodoArray, count: NSUInteger, - ) { - msg_send![ - self, - replaceObjectsInRange: range, - withObjects: objects, - count: count - ] - } + ); + # [method (replaceObjectsAtIndexes : withObjects :)] pub unsafe fn replaceObjectsAtIndexes_withObjects( &self, indexes: &NSIndexSet, objects: &NSArray, - ) { - msg_send![self, replaceObjectsAtIndexes: indexes, withObjects: objects] - } - pub unsafe fn removeObjectsInRange(&self, range: NSRange) { - msg_send![self, removeObjectsInRange: range] - } - pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet) { - msg_send![self, removeObjectsAtIndexes: indexes] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn removeObject(&self, object: &ObjectType) { - msg_send![self, removeObject: object] - } - pub unsafe fn removeObjectsInArray(&self, array: &NSArray) { - msg_send![self, removeObjectsInArray: array] - } - pub unsafe fn intersectOrderedSet(&self, other: &NSOrderedSet) { - msg_send![self, intersectOrderedSet: other] - } - pub unsafe fn minusOrderedSet(&self, other: &NSOrderedSet) { - msg_send![self, minusOrderedSet: other] - } - pub unsafe fn unionOrderedSet(&self, other: &NSOrderedSet) { - msg_send![self, unionOrderedSet: other] - } - pub unsafe fn intersectSet(&self, other: &NSSet) { - msg_send![self, intersectSet: other] - } - pub unsafe fn minusSet(&self, other: &NSSet) { - msg_send![self, minusSet: other] - } - pub unsafe fn unionSet(&self, other: &NSSet) { - msg_send![self, unionSet: other] - } - pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator) { - msg_send![self, sortUsingComparator: cmptr] - } + ); + # [method (removeObjectsInRange :)] + pub unsafe fn removeObjectsInRange(&self, range: NSRange); + # [method (removeObjectsAtIndexes :)] + pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet); + #[method(removeAllObjects)] + pub unsafe fn removeAllObjects(&self); + # [method (removeObject :)] + pub unsafe fn removeObject(&self, object: &ObjectType); + # [method (removeObjectsInArray :)] + pub unsafe fn removeObjectsInArray(&self, array: &NSArray); + # [method (intersectOrderedSet :)] + pub unsafe fn intersectOrderedSet(&self, other: &NSOrderedSet); + # [method (minusOrderedSet :)] + pub unsafe fn minusOrderedSet(&self, other: &NSOrderedSet); + # [method (unionOrderedSet :)] + pub unsafe fn unionOrderedSet(&self, other: &NSOrderedSet); + # [method (intersectSet :)] + pub unsafe fn intersectSet(&self, other: &NSSet); + # [method (minusSet :)] + pub unsafe fn minusSet(&self, other: &NSSet); + # [method (unionSet :)] + pub unsafe fn unionSet(&self, other: &NSSet); + # [method (sortUsingComparator :)] + pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator); + # [method (sortWithOptions : usingComparator :)] pub unsafe fn sortWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, - ) { - msg_send![self, sortWithOptions: opts, usingComparator: cmptr] - } + ); + # [method (sortRange : options : usingComparator :)] pub unsafe fn sortRange_options_usingComparator( &self, range: NSRange, opts: NSSortOptions, cmptr: NSComparator, - ) { - msg_send![ - self, - sortRange: range, - options: opts, - usingComparator: cmptr - ] - } + ); } ); extern_methods!( #[doc = "NSMutableOrderedSetCreation"] unsafe impl NSMutableOrderedSet { - pub unsafe fn orderedSetWithCapacity(numItems: NSUInteger) -> Id { - msg_send_id![Self::class(), orderedSetWithCapacity: numItems] - } + # [method_id (orderedSetWithCapacity :)] + pub unsafe fn orderedSetWithCapacity(numItems: NSUInteger) -> Id; } ); extern_methods!( #[doc = "NSMutableOrderedSetDiffing"] unsafe impl NSMutableOrderedSet { + # [method (applyDifference :)] pub unsafe fn applyDifference( &self, difference: &NSOrderedCollectionDifference, - ) { - msg_send![self, applyDifference: difference] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index 79c5d4e6b..b8512f03f 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSOrthography; @@ -15,65 +15,50 @@ extern_class!( ); extern_methods!( unsafe impl NSOrthography { - pub unsafe fn dominantScript(&self) -> Id { - msg_send_id![self, dominantScript] - } - pub unsafe fn languageMap(&self) -> Id>, Shared> { - msg_send_id![self, languageMap] - } + #[method_id(dominantScript)] + pub unsafe fn dominantScript(&self) -> Id; + #[method_id(languageMap)] + pub unsafe fn languageMap(&self) -> Id>, Shared>; + # [method_id (initWithDominantScript : languageMap :)] pub unsafe fn initWithDominantScript_languageMap( &self, script: &NSString, map: &NSDictionary>, - ) -> Id { - msg_send_id![self, initWithDominantScript: script, languageMap: map] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSOrthographyExtended"] unsafe impl NSOrthography { + # [method_id (languagesForScript :)] pub unsafe fn languagesForScript( &self, script: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, languagesForScript: script] - } + ) -> Option, Shared>>; + # [method_id (dominantLanguageForScript :)] pub unsafe fn dominantLanguageForScript( &self, script: &NSString, - ) -> Option> { - msg_send_id![self, dominantLanguageForScript: script] - } - pub unsafe fn dominantLanguage(&self) -> Id { - msg_send_id![self, dominantLanguage] - } - pub unsafe fn allScripts(&self) -> Id, Shared> { - msg_send_id![self, allScripts] - } - pub unsafe fn allLanguages(&self) -> Id, Shared> { - msg_send_id![self, allLanguages] - } - pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id { - msg_send_id![Self::class(), defaultOrthographyForLanguage: language] - } + ) -> Option>; + #[method_id(dominantLanguage)] + pub unsafe fn dominantLanguage(&self) -> Id; + #[method_id(allScripts)] + pub unsafe fn allScripts(&self) -> Id, Shared>; + #[method_id(allLanguages)] + pub unsafe fn allLanguages(&self) -> Id, Shared>; + # [method_id (defaultOrthographyForLanguage :)] + pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id; } ); extern_methods!( #[doc = "NSOrthographyCreation"] unsafe impl NSOrthography { + # [method_id (orthographyWithDominantScript : languageMap :)] pub unsafe fn orthographyWithDominantScript_languageMap( script: &NSString, map: &NSDictionary>, - ) -> Id { - msg_send_id![ - Self::class(), - orthographyWithDominantScript: script, - languageMap: map - ] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index 2e3bd73f6..d72387eb7 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -3,93 +3,69 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_methods!( #[doc = "NSStringPathExtensions"] unsafe impl NSString { - pub unsafe fn pathWithComponents(components: &NSArray) -> Id { - msg_send_id![Self::class(), pathWithComponents: components] - } - pub unsafe fn pathComponents(&self) -> Id, Shared> { - msg_send_id![self, pathComponents] - } - pub unsafe fn isAbsolutePath(&self) -> bool { - msg_send![self, isAbsolutePath] - } - pub unsafe fn lastPathComponent(&self) -> Id { - msg_send_id![self, lastPathComponent] - } - pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id { - msg_send_id![self, stringByDeletingLastPathComponent] - } - pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id { - msg_send_id![self, stringByAppendingPathComponent: str] - } - pub unsafe fn pathExtension(&self) -> Id { - msg_send_id![self, pathExtension] - } - pub unsafe fn stringByDeletingPathExtension(&self) -> Id { - msg_send_id![self, stringByDeletingPathExtension] - } + # [method_id (pathWithComponents :)] + pub unsafe fn pathWithComponents(components: &NSArray) -> Id; + #[method_id(pathComponents)] + pub unsafe fn pathComponents(&self) -> Id, Shared>; + #[method(isAbsolutePath)] + pub unsafe fn isAbsolutePath(&self) -> bool; + #[method_id(lastPathComponent)] + pub unsafe fn lastPathComponent(&self) -> Id; + #[method_id(stringByDeletingLastPathComponent)] + pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id; + # [method_id (stringByAppendingPathComponent :)] + pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id; + #[method_id(pathExtension)] + pub unsafe fn pathExtension(&self) -> Id; + #[method_id(stringByDeletingPathExtension)] + pub unsafe fn stringByDeletingPathExtension(&self) -> Id; + # [method_id (stringByAppendingPathExtension :)] pub unsafe fn stringByAppendingPathExtension( &self, str: &NSString, - ) -> Option> { - msg_send_id![self, stringByAppendingPathExtension: str] - } - pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id { - msg_send_id![self, stringByAbbreviatingWithTildeInPath] - } - pub unsafe fn stringByExpandingTildeInPath(&self) -> Id { - msg_send_id![self, stringByExpandingTildeInPath] - } - pub unsafe fn stringByStandardizingPath(&self) -> Id { - msg_send_id![self, stringByStandardizingPath] - } - pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id { - msg_send_id![self, stringByResolvingSymlinksInPath] - } + ) -> Option>; + #[method_id(stringByAbbreviatingWithTildeInPath)] + pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id; + #[method_id(stringByExpandingTildeInPath)] + pub unsafe fn stringByExpandingTildeInPath(&self) -> Id; + #[method_id(stringByStandardizingPath)] + pub unsafe fn stringByStandardizingPath(&self) -> Id; + #[method_id(stringByResolvingSymlinksInPath)] + pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id; + # [method_id (stringsByAppendingPaths :)] pub unsafe fn stringsByAppendingPaths( &self, paths: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, stringsByAppendingPaths: paths] - } + ) -> Id, Shared>; + # [method (completePathIntoString : caseSensitive : matchesIntoArray : filterTypes :)] pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( &self, outputName: Option<&mut Option>>, flag: bool, outputArray: Option<&mut Option, Shared>>>, filterTypes: Option<&NSArray>, - ) -> NSUInteger { - msg_send![ - self, - completePathIntoString: outputName, - caseSensitive: flag, - matchesIntoArray: outputArray, - filterTypes: filterTypes - ] - } - pub unsafe fn fileSystemRepresentation(&self) -> NonNull { - msg_send![self, fileSystemRepresentation] - } + ) -> NSUInteger; + #[method(fileSystemRepresentation)] + pub unsafe fn fileSystemRepresentation(&self) -> NonNull; + # [method (getFileSystemRepresentation : maxLength :)] pub unsafe fn getFileSystemRepresentation_maxLength( &self, cname: NonNull, max: NSUInteger, - ) -> bool { - msg_send![self, getFileSystemRepresentation: cname, maxLength: max] - } + ) -> bool; } ); extern_methods!( #[doc = "NSArrayPathExtensions"] unsafe impl NSArray { + # [method_id (pathsMatchingExtensions :)] pub unsafe fn pathsMatchingExtensions( &self, filterTypes: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, pathsMatchingExtensions: filterTypes] - } + ) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs index fa19b4320..4b48d730a 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPersonNameComponents; @@ -14,50 +14,36 @@ extern_class!( ); extern_methods!( unsafe impl NSPersonNameComponents { - pub unsafe fn namePrefix(&self) -> Option> { - msg_send_id![self, namePrefix] - } - pub unsafe fn setNamePrefix(&self, namePrefix: Option<&NSString>) { - msg_send![self, setNamePrefix: namePrefix] - } - pub unsafe fn givenName(&self) -> Option> { - msg_send_id![self, givenName] - } - pub unsafe fn setGivenName(&self, givenName: Option<&NSString>) { - msg_send![self, setGivenName: givenName] - } - pub unsafe fn middleName(&self) -> Option> { - msg_send_id![self, middleName] - } - pub unsafe fn setMiddleName(&self, middleName: Option<&NSString>) { - msg_send![self, setMiddleName: middleName] - } - pub unsafe fn familyName(&self) -> Option> { - msg_send_id![self, familyName] - } - pub unsafe fn setFamilyName(&self, familyName: Option<&NSString>) { - msg_send![self, setFamilyName: familyName] - } - pub unsafe fn nameSuffix(&self) -> Option> { - msg_send_id![self, nameSuffix] - } - pub unsafe fn setNameSuffix(&self, nameSuffix: Option<&NSString>) { - msg_send![self, setNameSuffix: nameSuffix] - } - pub unsafe fn nickname(&self) -> Option> { - msg_send_id![self, nickname] - } - pub unsafe fn setNickname(&self, nickname: Option<&NSString>) { - msg_send![self, setNickname: nickname] - } - pub unsafe fn phoneticRepresentation(&self) -> Option> { - msg_send_id![self, phoneticRepresentation] - } + #[method_id(namePrefix)] + pub unsafe fn namePrefix(&self) -> Option>; + # [method (setNamePrefix :)] + pub unsafe fn setNamePrefix(&self, namePrefix: Option<&NSString>); + #[method_id(givenName)] + pub unsafe fn givenName(&self) -> Option>; + # [method (setGivenName :)] + pub unsafe fn setGivenName(&self, givenName: Option<&NSString>); + #[method_id(middleName)] + pub unsafe fn middleName(&self) -> Option>; + # [method (setMiddleName :)] + pub unsafe fn setMiddleName(&self, middleName: Option<&NSString>); + #[method_id(familyName)] + pub unsafe fn familyName(&self) -> Option>; + # [method (setFamilyName :)] + pub unsafe fn setFamilyName(&self, familyName: Option<&NSString>); + #[method_id(nameSuffix)] + pub unsafe fn nameSuffix(&self) -> Option>; + # [method (setNameSuffix :)] + pub unsafe fn setNameSuffix(&self, nameSuffix: Option<&NSString>); + #[method_id(nickname)] + pub unsafe fn nickname(&self) -> Option>; + # [method (setNickname :)] + pub unsafe fn setNickname(&self, nickname: Option<&NSString>); + #[method_id(phoneticRepresentation)] + pub unsafe fn phoneticRepresentation(&self) -> Option>; + # [method (setPhoneticRepresentation :)] pub unsafe fn setPhoneticRepresentation( &self, phoneticRepresentation: Option<&NSPersonNameComponents>, - ) { - msg_send![self, setPhoneticRepresentation: phoneticRepresentation] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index 5b13c8e6d..8c6338048 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSPersonNameComponents::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPersonNameComponentsFormatter; @@ -13,66 +13,45 @@ extern_class!( ); extern_methods!( unsafe impl NSPersonNameComponentsFormatter { - pub unsafe fn style(&self) -> NSPersonNameComponentsFormatterStyle { - msg_send![self, style] - } - pub unsafe fn setStyle(&self, style: NSPersonNameComponentsFormatterStyle) { - msg_send![self, setStyle: style] - } - pub unsafe fn isPhonetic(&self) -> bool { - msg_send![self, isPhonetic] - } - pub unsafe fn setPhonetic(&self, phonetic: bool) { - msg_send![self, setPhonetic: phonetic] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } + #[method(style)] + pub unsafe fn style(&self) -> NSPersonNameComponentsFormatterStyle; + # [method (setStyle :)] + pub unsafe fn setStyle(&self, style: NSPersonNameComponentsFormatterStyle); + #[method(isPhonetic)] + pub unsafe fn isPhonetic(&self) -> bool; + # [method (setPhonetic :)] + pub unsafe fn setPhonetic(&self, phonetic: bool); + #[method_id(locale)] + pub unsafe fn locale(&self) -> Id; + # [method (setLocale :)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + # [method_id (localizedStringFromPersonNameComponents : style : options :)] pub unsafe fn localizedStringFromPersonNameComponents_style_options( components: &NSPersonNameComponents, nameFormatStyle: NSPersonNameComponentsFormatterStyle, nameOptions: NSPersonNameComponentsFormatterOptions, - ) -> Id { - msg_send_id![ - Self::class(), - localizedStringFromPersonNameComponents: components, - style: nameFormatStyle, - options: nameOptions - ] - } + ) -> Id; + # [method_id (stringFromPersonNameComponents :)] pub unsafe fn stringFromPersonNameComponents( &self, components: &NSPersonNameComponents, - ) -> Id { - msg_send_id![self, stringFromPersonNameComponents: components] - } + ) -> Id; + # [method_id (annotatedStringFromPersonNameComponents :)] pub unsafe fn annotatedStringFromPersonNameComponents( &self, components: &NSPersonNameComponents, - ) -> Id { - msg_send_id![self, annotatedStringFromPersonNameComponents: components] - } + ) -> Id; + # [method_id (personNameComponentsFromString :)] pub unsafe fn personNameComponentsFromString( &self, string: &NSString, - ) -> Option> { - msg_send_id![self, personNameComponentsFromString: string] - } + ) -> Option>; + # [method (getObjectValue : forString : errorDescription :)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, string: &NSString, error: Option<&mut Option>>, - ) -> bool { - msg_send![ - self, - getObjectValue: obj, - forString: string, - errorDescription: error - ] - } + ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index 97dd2344d..61a379377 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSPointerFunctions::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPointerArray; @@ -14,78 +14,60 @@ extern_class!( ); extern_methods!( unsafe impl NSPointerArray { + # [method_id (initWithOptions :)] pub unsafe fn initWithOptions( &self, options: NSPointerFunctionsOptions, - ) -> Id { - msg_send_id![self, initWithOptions: options] - } + ) -> Id; + # [method_id (initWithPointerFunctions :)] pub unsafe fn initWithPointerFunctions( &self, functions: &NSPointerFunctions, - ) -> Id { - msg_send_id![self, initWithPointerFunctions: functions] - } + ) -> Id; + # [method_id (pointerArrayWithOptions :)] pub unsafe fn pointerArrayWithOptions( options: NSPointerFunctionsOptions, - ) -> Id { - msg_send_id![Self::class(), pointerArrayWithOptions: options] - } + ) -> Id; + # [method_id (pointerArrayWithPointerFunctions :)] pub unsafe fn pointerArrayWithPointerFunctions( functions: &NSPointerFunctions, - ) -> Id { - msg_send_id![Self::class(), pointerArrayWithPointerFunctions: functions] - } - pub unsafe fn pointerFunctions(&self) -> Id { - msg_send_id![self, pointerFunctions] - } - pub unsafe fn pointerAtIndex(&self, index: NSUInteger) -> *mut c_void { - msg_send![self, pointerAtIndex: index] - } - pub unsafe fn addPointer(&self, pointer: *mut c_void) { - msg_send![self, addPointer: pointer] - } - pub unsafe fn removePointerAtIndex(&self, index: NSUInteger) { - msg_send![self, removePointerAtIndex: index] - } - pub unsafe fn insertPointer_atIndex(&self, item: *mut c_void, index: NSUInteger) { - msg_send![self, insertPointer: item, atIndex: index] - } + ) -> Id; + #[method_id(pointerFunctions)] + pub unsafe fn pointerFunctions(&self) -> Id; + # [method (pointerAtIndex :)] + pub unsafe fn pointerAtIndex(&self, index: NSUInteger) -> *mut c_void; + # [method (addPointer :)] + pub unsafe fn addPointer(&self, pointer: *mut c_void); + # [method (removePointerAtIndex :)] + pub unsafe fn removePointerAtIndex(&self, index: NSUInteger); + # [method (insertPointer : atIndex :)] + pub unsafe fn insertPointer_atIndex(&self, item: *mut c_void, index: NSUInteger); + # [method (replacePointerAtIndex : withPointer :)] pub unsafe fn replacePointerAtIndex_withPointer( &self, index: NSUInteger, item: *mut c_void, - ) { - msg_send![self, replacePointerAtIndex: index, withPointer: item] - } - pub unsafe fn compact(&self) { - msg_send![self, compact] - } - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn setCount(&self, count: NSUInteger) { - msg_send![self, setCount: count] - } + ); + #[method(compact)] + pub unsafe fn compact(&self); + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + # [method (setCount :)] + pub unsafe fn setCount(&self, count: NSUInteger); } ); extern_methods!( #[doc = "NSPointerArrayConveniences"] unsafe impl NSPointerArray { - pub unsafe fn pointerArrayWithStrongObjects() -> Id { - msg_send_id![Self::class(), pointerArrayWithStrongObjects] - } - pub unsafe fn pointerArrayWithWeakObjects() -> Id { - msg_send_id![Self::class(), pointerArrayWithWeakObjects] - } - pub unsafe fn strongObjectsPointerArray() -> Id { - msg_send_id![Self::class(), strongObjectsPointerArray] - } - pub unsafe fn weakObjectsPointerArray() -> Id { - msg_send_id![Self::class(), weakObjectsPointerArray] - } - pub unsafe fn allObjects(&self) -> Id { - msg_send_id![self, allObjects] - } + #[method_id(pointerArrayWithStrongObjects)] + pub unsafe fn pointerArrayWithStrongObjects() -> Id; + #[method_id(pointerArrayWithWeakObjects)] + pub unsafe fn pointerArrayWithWeakObjects() -> Id; + #[method_id(strongObjectsPointerArray)] + pub unsafe fn strongObjectsPointerArray() -> Id; + #[method_id(weakObjectsPointerArray)] + pub unsafe fn weakObjectsPointerArray() -> Id; + #[method_id(allObjects)] + pub unsafe fn allObjects(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 32bc45080..71343ba5d 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPointerFunctions; @@ -12,67 +12,46 @@ extern_class!( ); extern_methods!( unsafe impl NSPointerFunctions { + # [method_id (initWithOptions :)] pub unsafe fn initWithOptions( &self, options: NSPointerFunctionsOptions, - ) -> Id { - msg_send_id![self, initWithOptions: options] - } + ) -> Id; + # [method_id (pointerFunctionsWithOptions :)] pub unsafe fn pointerFunctionsWithOptions( options: NSPointerFunctionsOptions, - ) -> Id { - msg_send_id![Self::class(), pointerFunctionsWithOptions: options] - } - pub unsafe fn hashFunction(&self) -> *mut TodoFunction { - msg_send![self, hashFunction] - } - pub unsafe fn setHashFunction(&self, hashFunction: *mut TodoFunction) { - msg_send![self, setHashFunction: hashFunction] - } - pub unsafe fn isEqualFunction(&self) -> *mut TodoFunction { - msg_send![self, isEqualFunction] - } - pub unsafe fn setIsEqualFunction(&self, isEqualFunction: *mut TodoFunction) { - msg_send![self, setIsEqualFunction: isEqualFunction] - } - pub unsafe fn sizeFunction(&self) -> *mut TodoFunction { - msg_send![self, sizeFunction] - } - pub unsafe fn setSizeFunction(&self, sizeFunction: *mut TodoFunction) { - msg_send![self, setSizeFunction: sizeFunction] - } - pub unsafe fn descriptionFunction(&self) -> *mut TodoFunction { - msg_send![self, descriptionFunction] - } - pub unsafe fn setDescriptionFunction(&self, descriptionFunction: *mut TodoFunction) { - msg_send![self, setDescriptionFunction: descriptionFunction] - } - pub unsafe fn relinquishFunction(&self) -> *mut TodoFunction { - msg_send![self, relinquishFunction] - } - pub unsafe fn setRelinquishFunction(&self, relinquishFunction: *mut TodoFunction) { - msg_send![self, setRelinquishFunction: relinquishFunction] - } - pub unsafe fn acquireFunction(&self) -> *mut TodoFunction { - msg_send![self, acquireFunction] - } - pub unsafe fn setAcquireFunction(&self, acquireFunction: *mut TodoFunction) { - msg_send![self, setAcquireFunction: acquireFunction] - } - pub unsafe fn usesStrongWriteBarrier(&self) -> bool { - msg_send![self, usesStrongWriteBarrier] - } - pub unsafe fn setUsesStrongWriteBarrier(&self, usesStrongWriteBarrier: bool) { - msg_send![self, setUsesStrongWriteBarrier: usesStrongWriteBarrier] - } - pub unsafe fn usesWeakReadAndWriteBarriers(&self) -> bool { - msg_send![self, usesWeakReadAndWriteBarriers] - } - pub unsafe fn setUsesWeakReadAndWriteBarriers(&self, usesWeakReadAndWriteBarriers: bool) { - msg_send![ - self, - setUsesWeakReadAndWriteBarriers: usesWeakReadAndWriteBarriers - ] - } + ) -> Id; + #[method(hashFunction)] + pub unsafe fn hashFunction(&self) -> *mut TodoFunction; + # [method (setHashFunction :)] + pub unsafe fn setHashFunction(&self, hashFunction: *mut TodoFunction); + #[method(isEqualFunction)] + pub unsafe fn isEqualFunction(&self) -> *mut TodoFunction; + # [method (setIsEqualFunction :)] + pub unsafe fn setIsEqualFunction(&self, isEqualFunction: *mut TodoFunction); + #[method(sizeFunction)] + pub unsafe fn sizeFunction(&self) -> *mut TodoFunction; + # [method (setSizeFunction :)] + pub unsafe fn setSizeFunction(&self, sizeFunction: *mut TodoFunction); + #[method(descriptionFunction)] + pub unsafe fn descriptionFunction(&self) -> *mut TodoFunction; + # [method (setDescriptionFunction :)] + pub unsafe fn setDescriptionFunction(&self, descriptionFunction: *mut TodoFunction); + #[method(relinquishFunction)] + pub unsafe fn relinquishFunction(&self) -> *mut TodoFunction; + # [method (setRelinquishFunction :)] + pub unsafe fn setRelinquishFunction(&self, relinquishFunction: *mut TodoFunction); + #[method(acquireFunction)] + pub unsafe fn acquireFunction(&self) -> *mut TodoFunction; + # [method (setAcquireFunction :)] + pub unsafe fn setAcquireFunction(&self, acquireFunction: *mut TodoFunction); + #[method(usesStrongWriteBarrier)] + pub unsafe fn usesStrongWriteBarrier(&self) -> bool; + # [method (setUsesStrongWriteBarrier :)] + pub unsafe fn setUsesStrongWriteBarrier(&self, usesStrongWriteBarrier: bool); + #[method(usesWeakReadAndWriteBarriers)] + pub unsafe fn usesWeakReadAndWriteBarriers(&self) -> bool; + # [method (setUsesWeakReadAndWriteBarriers :)] + pub unsafe fn setUsesWeakReadAndWriteBarriers(&self, usesWeakReadAndWriteBarriers: bool); } ); diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index f1d1d5ede..80af9fc2c 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPort; @@ -20,45 +20,31 @@ extern_class!( ); extern_methods!( unsafe impl NSPort { - pub unsafe fn port() -> Id { - msg_send_id![Self::class(), port] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn isValid(&self) -> bool { - msg_send![self, isValid] - } - pub unsafe fn setDelegate(&self, anObject: Option<&NSPortDelegate>) { - msg_send![self, setDelegate: anObject] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] - } - pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, removeFromRunLoop: runLoop, forMode: mode] - } - pub unsafe fn reservedSpaceLength(&self) -> NSUInteger { - msg_send![self, reservedSpaceLength] - } + #[method_id(port)] + pub unsafe fn port() -> Id; + #[method(invalidate)] + pub unsafe fn invalidate(&self); + #[method(isValid)] + pub unsafe fn isValid(&self) -> bool; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, anObject: Option<&NSPortDelegate>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (scheduleInRunLoop : forMode :)] + pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); + # [method (removeFromRunLoop : forMode :)] + pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(reservedSpaceLength)] + pub unsafe fn reservedSpaceLength(&self) -> NSUInteger; + # [method (sendBeforeDate : components : from : reserved :)] pub unsafe fn sendBeforeDate_components_from_reserved( &self, limitDate: &NSDate, components: Option<&NSMutableArray>, receivePort: Option<&NSPort>, headerSpaceReserved: NSUInteger, - ) -> bool { - msg_send![ - self, - sendBeforeDate: limitDate, - components: components, - from: receivePort, - reserved: headerSpaceReserved - ] - } + ) -> bool; + # [method (sendBeforeDate : msgid : components : from : reserved :)] pub unsafe fn sendBeforeDate_msgid_components_from_reserved( &self, limitDate: &NSDate, @@ -66,37 +52,21 @@ extern_methods!( components: Option<&NSMutableArray>, receivePort: Option<&NSPort>, headerSpaceReserved: NSUInteger, - ) -> bool { - msg_send![ - self, - sendBeforeDate: limitDate, - msgid: msgID, - components: components, - from: receivePort, - reserved: headerSpaceReserved - ] - } + ) -> bool; + # [method (addConnection : toRunLoop : forMode :)] pub unsafe fn addConnection_toRunLoop_forMode( &self, conn: &NSConnection, runLoop: &NSRunLoop, mode: &NSRunLoopMode, - ) { - msg_send![self, addConnection: conn, toRunLoop: runLoop, forMode: mode] - } + ); + # [method (removeConnection : fromRunLoop : forMode :)] pub unsafe fn removeConnection_fromRunLoop_forMode( &self, conn: &NSConnection, runLoop: &NSRunLoop, mode: &NSRunLoopMode, - ) { - msg_send![ - self, - removeConnection: conn, - fromRunLoop: runLoop, - forMode: mode - ] - } + ); } ); pub type NSPortDelegate = NSObject; @@ -109,40 +79,31 @@ extern_class!( ); extern_methods!( unsafe impl NSMachPort { - pub unsafe fn portWithMachPort(machPort: u32) -> Id { - msg_send_id![Self::class(), portWithMachPort: machPort] - } - pub unsafe fn initWithMachPort(&self, machPort: u32) -> Id { - msg_send_id![self, initWithMachPort: machPort] - } - pub unsafe fn setDelegate(&self, anObject: Option<&NSMachPortDelegate>) { - msg_send![self, setDelegate: anObject] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } + # [method_id (portWithMachPort :)] + pub unsafe fn portWithMachPort(machPort: u32) -> Id; + # [method_id (initWithMachPort :)] + pub unsafe fn initWithMachPort(&self, machPort: u32) -> Id; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, anObject: Option<&NSMachPortDelegate>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method_id (portWithMachPort : options :)] pub unsafe fn portWithMachPort_options( machPort: u32, f: NSMachPortOptions, - ) -> Id { - msg_send_id![Self::class(), portWithMachPort: machPort, options: f] - } + ) -> Id; + # [method_id (initWithMachPort : options :)] pub unsafe fn initWithMachPort_options( &self, machPort: u32, f: NSMachPortOptions, - ) -> Id { - msg_send_id![self, initWithMachPort: machPort, options: f] - } - pub unsafe fn machPort(&self) -> u32 { - msg_send![self, machPort] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: runLoop, forMode: mode] - } - pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, removeFromRunLoop: runLoop, forMode: mode] - } + ) -> Id; + #[method(machPort)] + pub unsafe fn machPort(&self) -> u32; + # [method (scheduleInRunLoop : forMode :)] + pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); + # [method (removeFromRunLoop : forMode :)] + pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); } ); pub type NSMachPortDelegate = NSObject; @@ -165,78 +126,49 @@ extern_class!( ); extern_methods!( unsafe impl NSSocketPort { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithTCPPort(&self, port: c_ushort) -> Option> { - msg_send_id![self, initWithTCPPort: port] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithTCPPort :)] + pub unsafe fn initWithTCPPort(&self, port: c_ushort) -> Option>; + # [method_id (initWithProtocolFamily : socketType : protocol : address :)] pub unsafe fn initWithProtocolFamily_socketType_protocol_address( &self, family: c_int, type_: c_int, protocol: c_int, address: &NSData, - ) -> Option> { - msg_send_id![ - self, - initWithProtocolFamily: family, - socketType: type_, - protocol: protocol, - address: address - ] - } + ) -> Option>; + # [method_id (initWithProtocolFamily : socketType : protocol : socket :)] pub unsafe fn initWithProtocolFamily_socketType_protocol_socket( &self, family: c_int, type_: c_int, protocol: c_int, sock: NSSocketNativeHandle, - ) -> Option> { - msg_send_id![ - self, - initWithProtocolFamily: family, - socketType: type_, - protocol: protocol, - socket: sock - ] - } + ) -> Option>; + # [method_id (initRemoteWithTCPPort : host :)] pub unsafe fn initRemoteWithTCPPort_host( &self, port: c_ushort, hostName: Option<&NSString>, - ) -> Option> { - msg_send_id![self, initRemoteWithTCPPort: port, host: hostName] - } + ) -> Option>; + # [method_id (initRemoteWithProtocolFamily : socketType : protocol : address :)] pub unsafe fn initRemoteWithProtocolFamily_socketType_protocol_address( &self, family: c_int, type_: c_int, protocol: c_int, address: &NSData, - ) -> Id { - msg_send_id![ - self, - initRemoteWithProtocolFamily: family, - socketType: type_, - protocol: protocol, - address: address - ] - } - pub unsafe fn protocolFamily(&self) -> c_int { - msg_send![self, protocolFamily] - } - pub unsafe fn socketType(&self) -> c_int { - msg_send![self, socketType] - } - pub unsafe fn protocol(&self) -> c_int { - msg_send![self, protocol] - } - pub unsafe fn address(&self) -> Id { - msg_send_id![self, address] - } - pub unsafe fn socket(&self) -> NSSocketNativeHandle { - msg_send![self, socket] - } + ) -> Id; + #[method(protocolFamily)] + pub unsafe fn protocolFamily(&self) -> c_int; + #[method(socketType)] + pub unsafe fn socketType(&self) -> c_int; + #[method(protocol)] + pub unsafe fn protocol(&self) -> c_int; + #[method_id(address)] + pub unsafe fn address(&self) -> Id; + #[method(socket)] + pub unsafe fn socket(&self) -> NSSocketNativeHandle; } ); diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index cd6cbbd5d..cfc51f59e 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSCoder::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPortCoder; @@ -15,62 +15,42 @@ extern_class!( ); extern_methods!( unsafe impl NSPortCoder { - pub unsafe fn isBycopy(&self) -> bool { - msg_send![self, isBycopy] - } - pub unsafe fn isByref(&self) -> bool { - msg_send![self, isByref] - } - pub unsafe fn encodePortObject(&self, aport: &NSPort) { - msg_send![self, encodePortObject: aport] - } - pub unsafe fn decodePortObject(&self) -> Option> { - msg_send_id![self, decodePortObject] - } - pub unsafe fn connection(&self) -> Option> { - msg_send_id![self, connection] - } + #[method(isBycopy)] + pub unsafe fn isBycopy(&self) -> bool; + #[method(isByref)] + pub unsafe fn isByref(&self) -> bool; + # [method (encodePortObject :)] + pub unsafe fn encodePortObject(&self, aport: &NSPort); + #[method_id(decodePortObject)] + pub unsafe fn decodePortObject(&self) -> Option>; + #[method_id(connection)] + pub unsafe fn connection(&self) -> Option>; + # [method_id (portCoderWithReceivePort : sendPort : components :)] pub unsafe fn portCoderWithReceivePort_sendPort_components( rcvPort: Option<&NSPort>, sndPort: Option<&NSPort>, comps: Option<&NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - portCoderWithReceivePort: rcvPort, - sendPort: sndPort, - components: comps - ] - } + ) -> Id; + # [method_id (initWithReceivePort : sendPort : components :)] pub unsafe fn initWithReceivePort_sendPort_components( &self, rcvPort: Option<&NSPort>, sndPort: Option<&NSPort>, comps: Option<&NSArray>, - ) -> Id { - msg_send_id![ - self, - initWithReceivePort: rcvPort, - sendPort: sndPort, - components: comps - ] - } - pub unsafe fn dispatch(&self) { - msg_send![self, dispatch] - } + ) -> Id; + #[method(dispatch)] + pub unsafe fn dispatch(&self); } ); extern_methods!( #[doc = "NSDistributedObjects"] unsafe impl NSObject { - pub unsafe fn classForPortCoder(&self) -> &Class { - msg_send![self, classForPortCoder] - } + #[method(classForPortCoder)] + pub unsafe fn classForPortCoder(&self) -> &Class; + # [method_id (replacementObjectForPortCoder :)] pub unsafe fn replacementObjectForPortCoder( &self, coder: &NSPortCoder, - ) -> Option> { - msg_send_id![self, replacementObjectForPortCoder: coder] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index 04fb92afa..fb466dc80 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPortMessage; @@ -16,36 +16,24 @@ extern_class!( ); extern_methods!( unsafe impl NSPortMessage { + # [method_id (initWithSendPort : receivePort : components :)] pub unsafe fn initWithSendPort_receivePort_components( &self, sendPort: Option<&NSPort>, replyPort: Option<&NSPort>, components: Option<&NSArray>, - ) -> Id { - msg_send_id![ - self, - initWithSendPort: sendPort, - receivePort: replyPort, - components: components - ] - } - pub unsafe fn components(&self) -> Option> { - msg_send_id![self, components] - } - pub unsafe fn receivePort(&self) -> Option> { - msg_send_id![self, receivePort] - } - pub unsafe fn sendPort(&self) -> Option> { - msg_send_id![self, sendPort] - } - pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool { - msg_send![self, sendBeforeDate: date] - } - pub unsafe fn msgid(&self) -> u32 { - msg_send![self, msgid] - } - pub unsafe fn setMsgid(&self, msgid: u32) { - msg_send![self, setMsgid: msgid] - } + ) -> Id; + #[method_id(components)] + pub unsafe fn components(&self) -> Option>; + #[method_id(receivePort)] + pub unsafe fn receivePort(&self) -> Option>; + #[method_id(sendPort)] + pub unsafe fn sendPort(&self) -> Option>; + # [method (sendBeforeDate :)] + pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool; + #[method(msgid)] + pub unsafe fn msgid(&self) -> u32; + # [method (setMsgid :)] + pub unsafe fn setMsgid(&self, msgid: u32); } ); diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index 2d1f567cd..bfc9393c9 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPortNameServer; @@ -14,25 +14,20 @@ extern_class!( ); extern_methods!( unsafe impl NSPortNameServer { - pub unsafe fn systemDefaultPortNameServer() -> Id { - msg_send_id![Self::class(), systemDefaultPortNameServer] - } - pub unsafe fn portForName(&self, name: &NSString) -> Option> { - msg_send_id![self, portForName: name] - } + #[method_id(systemDefaultPortNameServer)] + pub unsafe fn systemDefaultPortNameServer() -> Id; + # [method_id (portForName :)] + pub unsafe fn portForName(&self, name: &NSString) -> Option>; + # [method_id (portForName : host :)] pub unsafe fn portForName_host( &self, name: &NSString, host: Option<&NSString>, - ) -> Option> { - msg_send_id![self, portForName: name, host: host] - } - pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { - msg_send![self, registerPort: port, name: name] - } - pub unsafe fn removePortForName(&self, name: &NSString) -> bool { - msg_send![self, removePortForName: name] - } + ) -> Option>; + # [method (registerPort : name :)] + pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool; + # [method (removePortForName :)] + pub unsafe fn removePortForName(&self, name: &NSString) -> bool; } ); extern_class!( @@ -44,25 +39,20 @@ extern_class!( ); extern_methods!( unsafe impl NSMachBootstrapServer { - pub unsafe fn sharedInstance() -> Id { - msg_send_id![Self::class(), sharedInstance] - } - pub unsafe fn portForName(&self, name: &NSString) -> Option> { - msg_send_id![self, portForName: name] - } + #[method_id(sharedInstance)] + pub unsafe fn sharedInstance() -> Id; + # [method_id (portForName :)] + pub unsafe fn portForName(&self, name: &NSString) -> Option>; + # [method_id (portForName : host :)] pub unsafe fn portForName_host( &self, name: &NSString, host: Option<&NSString>, - ) -> Option> { - msg_send_id![self, portForName: name, host: host] - } - pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { - msg_send![self, registerPort: port, name: name] - } - pub unsafe fn servicePortWithName(&self, name: &NSString) -> Option> { - msg_send_id![self, servicePortWithName: name] - } + ) -> Option>; + # [method (registerPort : name :)] + pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool; + # [method_id (servicePortWithName :)] + pub unsafe fn servicePortWithName(&self, name: &NSString) -> Option>; } ); extern_class!( @@ -74,19 +64,16 @@ extern_class!( ); extern_methods!( unsafe impl NSMessagePortNameServer { - pub unsafe fn sharedInstance() -> Id { - msg_send_id![Self::class(), sharedInstance] - } - pub unsafe fn portForName(&self, name: &NSString) -> Option> { - msg_send_id![self, portForName: name] - } + #[method_id(sharedInstance)] + pub unsafe fn sharedInstance() -> Id; + # [method_id (portForName :)] + pub unsafe fn portForName(&self, name: &NSString) -> Option>; + # [method_id (portForName : host :)] pub unsafe fn portForName_host( &self, name: &NSString, host: Option<&NSString>, - ) -> Option> { - msg_send_id![self, portForName: name, host: host] - } + ) -> Option>; } ); extern_class!( @@ -98,59 +85,37 @@ extern_class!( ); extern_methods!( unsafe impl NSSocketPortNameServer { - pub unsafe fn sharedInstance() -> Id { - msg_send_id![Self::class(), sharedInstance] - } - pub unsafe fn portForName(&self, name: &NSString) -> Option> { - msg_send_id![self, portForName: name] - } + #[method_id(sharedInstance)] + pub unsafe fn sharedInstance() -> Id; + # [method_id (portForName :)] + pub unsafe fn portForName(&self, name: &NSString) -> Option>; + # [method_id (portForName : host :)] pub unsafe fn portForName_host( &self, name: &NSString, host: Option<&NSString>, - ) -> Option> { - msg_send_id![self, portForName: name, host: host] - } - pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool { - msg_send![self, registerPort: port, name: name] - } - pub unsafe fn removePortForName(&self, name: &NSString) -> bool { - msg_send![self, removePortForName: name] - } + ) -> Option>; + # [method (registerPort : name :)] + pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool; + # [method (removePortForName :)] + pub unsafe fn removePortForName(&self, name: &NSString) -> bool; + # [method_id (portForName : host : nameServerPortNumber :)] pub unsafe fn portForName_host_nameServerPortNumber( &self, name: &NSString, host: Option<&NSString>, portNumber: u16, - ) -> Option> { - msg_send_id![ - self, - portForName: name, - host: host, - nameServerPortNumber: portNumber - ] - } + ) -> Option>; + # [method (registerPort : name : nameServerPortNumber :)] pub unsafe fn registerPort_name_nameServerPortNumber( &self, port: &NSPort, name: &NSString, portNumber: u16, - ) -> bool { - msg_send![ - self, - registerPort: port, - name: name, - nameServerPortNumber: portNumber - ] - } - pub unsafe fn defaultNameServerPortNumber(&self) -> u16 { - msg_send![self, defaultNameServerPortNumber] - } - pub unsafe fn setDefaultNameServerPortNumber(&self, defaultNameServerPortNumber: u16) { - msg_send![ - self, - setDefaultNameServerPortNumber: defaultNameServerPortNumber - ] - } + ) -> bool; + #[method(defaultNameServerPortNumber)] + pub unsafe fn defaultNameServerPortNumber(&self) -> u16; + # [method (setDefaultNameServerPortNumber :)] + pub unsafe fn setDefaultNameServerPortNumber(&self, defaultNameServerPortNumber: u16); } ); diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 526a60d31..06c4cc809 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSPredicate; @@ -17,119 +17,91 @@ extern_class!( ); extern_methods!( unsafe impl NSPredicate { + # [method_id (predicateWithFormat : argumentArray :)] pub unsafe fn predicateWithFormat_argumentArray( predicateFormat: &NSString, arguments: Option<&NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - predicateWithFormat: predicateFormat, - argumentArray: arguments - ] - } + ) -> Id; + # [method_id (predicateWithFormat : arguments :)] pub unsafe fn predicateWithFormat_arguments( predicateFormat: &NSString, argList: va_list, - ) -> Id { - msg_send_id![ - Self::class(), - predicateWithFormat: predicateFormat, - arguments: argList - ] - } + ) -> Id; + # [method_id (predicateFromMetadataQueryString :)] pub unsafe fn predicateFromMetadataQueryString( queryString: &NSString, - ) -> Option> { - msg_send_id![Self::class(), predicateFromMetadataQueryString: queryString] - } - pub unsafe fn predicateWithValue(value: bool) -> Id { - msg_send_id![Self::class(), predicateWithValue: value] - } - pub unsafe fn predicateWithBlock(block: TodoBlock) -> Id { - msg_send_id![Self::class(), predicateWithBlock: block] - } - pub unsafe fn predicateFormat(&self) -> Id { - msg_send_id![self, predicateFormat] - } + ) -> Option>; + # [method_id (predicateWithValue :)] + pub unsafe fn predicateWithValue(value: bool) -> Id; + # [method_id (predicateWithBlock :)] + pub unsafe fn predicateWithBlock(block: TodoBlock) -> Id; + #[method_id(predicateFormat)] + pub unsafe fn predicateFormat(&self) -> Id; + # [method_id (predicateWithSubstitutionVariables :)] pub unsafe fn predicateWithSubstitutionVariables( &self, variables: &NSDictionary, - ) -> Id { - msg_send_id![self, predicateWithSubstitutionVariables: variables] - } - pub unsafe fn evaluateWithObject(&self, object: Option<&Object>) -> bool { - msg_send![self, evaluateWithObject: object] - } + ) -> Id; + # [method (evaluateWithObject :)] + pub unsafe fn evaluateWithObject(&self, object: Option<&Object>) -> bool; + # [method (evaluateWithObject : substitutionVariables :)] pub unsafe fn evaluateWithObject_substitutionVariables( &self, object: Option<&Object>, bindings: Option<&NSDictionary>, - ) -> bool { - msg_send![ - self, - evaluateWithObject: object, - substitutionVariables: bindings - ] - } - pub unsafe fn allowEvaluation(&self) { - msg_send![self, allowEvaluation] - } + ) -> bool; + #[method(allowEvaluation)] + pub unsafe fn allowEvaluation(&self); } ); extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSArray { + # [method_id (filteredArrayUsingPredicate :)] pub unsafe fn filteredArrayUsingPredicate( &self, predicate: &NSPredicate, - ) -> Id, Shared> { - msg_send_id![self, filteredArrayUsingPredicate: predicate] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSMutableArray { - pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate) { - msg_send![self, filterUsingPredicate: predicate] - } + # [method (filterUsingPredicate :)] + pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate); } ); extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSSet { + # [method_id (filteredSetUsingPredicate :)] pub unsafe fn filteredSetUsingPredicate( &self, predicate: &NSPredicate, - ) -> Id, Shared> { - msg_send_id![self, filteredSetUsingPredicate: predicate] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSMutableSet { - pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate) { - msg_send![self, filterUsingPredicate: predicate] - } + # [method (filterUsingPredicate :)] + pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate); } ); extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSOrderedSet { + # [method_id (filteredOrderedSetUsingPredicate :)] pub unsafe fn filteredOrderedSetUsingPredicate( &self, p: &NSPredicate, - ) -> Id, Shared> { - msg_send_id![self, filteredOrderedSetUsingPredicate: p] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSMutableOrderedSet { - pub unsafe fn filterUsingPredicate(&self, p: &NSPredicate) { - msg_send![self, filterUsingPredicate: p] - } + # [method (filterUsingPredicate :)] + pub unsafe fn filterUsingPredicate(&self, p: &NSPredicate); } ); diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 662de6557..92f3be97a 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSProcessInfo; @@ -17,160 +17,115 @@ extern_class!( ); extern_methods!( unsafe impl NSProcessInfo { - pub unsafe fn processInfo() -> Id { - msg_send_id![Self::class(), processInfo] - } - pub unsafe fn environment(&self) -> Id, Shared> { - msg_send_id![self, environment] - } - pub unsafe fn arguments(&self) -> Id, Shared> { - msg_send_id![self, arguments] - } - pub unsafe fn hostName(&self) -> Id { - msg_send_id![self, hostName] - } - pub unsafe fn processName(&self) -> Id { - msg_send_id![self, processName] - } - pub unsafe fn setProcessName(&self, processName: &NSString) { - msg_send![self, setProcessName: processName] - } - pub unsafe fn processIdentifier(&self) -> c_int { - msg_send![self, processIdentifier] - } - pub unsafe fn globallyUniqueString(&self) -> Id { - msg_send_id![self, globallyUniqueString] - } - pub unsafe fn operatingSystem(&self) -> NSUInteger { - msg_send![self, operatingSystem] - } - pub unsafe fn operatingSystemName(&self) -> Id { - msg_send_id![self, operatingSystemName] - } - pub unsafe fn operatingSystemVersionString(&self) -> Id { - msg_send_id![self, operatingSystemVersionString] - } - pub unsafe fn operatingSystemVersion(&self) -> NSOperatingSystemVersion { - msg_send![self, operatingSystemVersion] - } - pub unsafe fn processorCount(&self) -> NSUInteger { - msg_send![self, processorCount] - } - pub unsafe fn activeProcessorCount(&self) -> NSUInteger { - msg_send![self, activeProcessorCount] - } - pub unsafe fn physicalMemory(&self) -> c_ulonglong { - msg_send![self, physicalMemory] - } + #[method_id(processInfo)] + pub unsafe fn processInfo() -> Id; + #[method_id(environment)] + pub unsafe fn environment(&self) -> Id, Shared>; + #[method_id(arguments)] + pub unsafe fn arguments(&self) -> Id, Shared>; + #[method_id(hostName)] + pub unsafe fn hostName(&self) -> Id; + #[method_id(processName)] + pub unsafe fn processName(&self) -> Id; + # [method (setProcessName :)] + pub unsafe fn setProcessName(&self, processName: &NSString); + #[method(processIdentifier)] + pub unsafe fn processIdentifier(&self) -> c_int; + #[method_id(globallyUniqueString)] + pub unsafe fn globallyUniqueString(&self) -> Id; + #[method(operatingSystem)] + pub unsafe fn operatingSystem(&self) -> NSUInteger; + #[method_id(operatingSystemName)] + pub unsafe fn operatingSystemName(&self) -> Id; + #[method_id(operatingSystemVersionString)] + pub unsafe fn operatingSystemVersionString(&self) -> Id; + #[method(operatingSystemVersion)] + pub unsafe fn operatingSystemVersion(&self) -> NSOperatingSystemVersion; + #[method(processorCount)] + pub unsafe fn processorCount(&self) -> NSUInteger; + #[method(activeProcessorCount)] + pub unsafe fn activeProcessorCount(&self) -> NSUInteger; + #[method(physicalMemory)] + pub unsafe fn physicalMemory(&self) -> c_ulonglong; + # [method (isOperatingSystemAtLeastVersion :)] pub unsafe fn isOperatingSystemAtLeastVersion( &self, version: NSOperatingSystemVersion, - ) -> bool { - msg_send![self, isOperatingSystemAtLeastVersion: version] - } - pub unsafe fn systemUptime(&self) -> NSTimeInterval { - msg_send![self, systemUptime] - } - pub unsafe fn disableSuddenTermination(&self) { - msg_send![self, disableSuddenTermination] - } - pub unsafe fn enableSuddenTermination(&self) { - msg_send![self, enableSuddenTermination] - } - pub unsafe fn disableAutomaticTermination(&self, reason: &NSString) { - msg_send![self, disableAutomaticTermination: reason] - } - pub unsafe fn enableAutomaticTermination(&self, reason: &NSString) { - msg_send![self, enableAutomaticTermination: reason] - } - pub unsafe fn automaticTerminationSupportEnabled(&self) -> bool { - msg_send![self, automaticTerminationSupportEnabled] - } + ) -> bool; + #[method(systemUptime)] + pub unsafe fn systemUptime(&self) -> NSTimeInterval; + #[method(disableSuddenTermination)] + pub unsafe fn disableSuddenTermination(&self); + #[method(enableSuddenTermination)] + pub unsafe fn enableSuddenTermination(&self); + # [method (disableAutomaticTermination :)] + pub unsafe fn disableAutomaticTermination(&self, reason: &NSString); + # [method (enableAutomaticTermination :)] + pub unsafe fn enableAutomaticTermination(&self, reason: &NSString); + #[method(automaticTerminationSupportEnabled)] + pub unsafe fn automaticTerminationSupportEnabled(&self) -> bool; + # [method (setAutomaticTerminationSupportEnabled :)] pub unsafe fn setAutomaticTerminationSupportEnabled( &self, automaticTerminationSupportEnabled: bool, - ) { - msg_send![ - self, - setAutomaticTerminationSupportEnabled: automaticTerminationSupportEnabled - ] - } + ); } ); extern_methods!( #[doc = "NSProcessInfoActivity"] unsafe impl NSProcessInfo { + # [method_id (beginActivityWithOptions : reason :)] pub unsafe fn beginActivityWithOptions_reason( &self, options: NSActivityOptions, reason: &NSString, - ) -> Id { - msg_send_id![self, beginActivityWithOptions: options, reason: reason] - } - pub unsafe fn endActivity(&self, activity: &NSObject) { - msg_send![self, endActivity: activity] - } + ) -> Id; + # [method (endActivity :)] + pub unsafe fn endActivity(&self, activity: &NSObject); + # [method (performActivityWithOptions : reason : usingBlock :)] pub unsafe fn performActivityWithOptions_reason_usingBlock( &self, options: NSActivityOptions, reason: &NSString, block: TodoBlock, - ) { - msg_send![ - self, - performActivityWithOptions: options, - reason: reason, - usingBlock: block - ] - } + ); + # [method (performExpiringActivityWithReason : usingBlock :)] pub unsafe fn performExpiringActivityWithReason_usingBlock( &self, reason: &NSString, block: TodoBlock, - ) { - msg_send![ - self, - performExpiringActivityWithReason: reason, - usingBlock: block - ] - } + ); } ); extern_methods!( #[doc = "NSUserInformation"] unsafe impl NSProcessInfo { - pub unsafe fn userName(&self) -> Id { - msg_send_id![self, userName] - } - pub unsafe fn fullUserName(&self) -> Id { - msg_send_id![self, fullUserName] - } + #[method_id(userName)] + pub unsafe fn userName(&self) -> Id; + #[method_id(fullUserName)] + pub unsafe fn fullUserName(&self) -> Id; } ); extern_methods!( #[doc = "NSProcessInfoThermalState"] unsafe impl NSProcessInfo { - pub unsafe fn thermalState(&self) -> NSProcessInfoThermalState { - msg_send![self, thermalState] - } + #[method(thermalState)] + pub unsafe fn thermalState(&self) -> NSProcessInfoThermalState; } ); extern_methods!( #[doc = "NSProcessInfoPowerState"] unsafe impl NSProcessInfo { - pub unsafe fn isLowPowerModeEnabled(&self) -> bool { - msg_send![self, isLowPowerModeEnabled] - } + #[method(isLowPowerModeEnabled)] + pub unsafe fn isLowPowerModeEnabled(&self) -> bool; } ); extern_methods!( #[doc = "NSProcessInfoPlatform"] unsafe impl NSProcessInfo { - pub unsafe fn isMacCatalystApp(&self) -> bool { - msg_send![self, isMacCatalystApp] - } - pub unsafe fn isiOSAppOnMac(&self) -> bool { - msg_send![self, isiOSAppOnMac] - } + #[method(isMacCatalystApp)] + pub unsafe fn isMacCatalystApp(&self) -> bool; + #[method(isiOSAppOnMac)] + pub unsafe fn isiOSAppOnMac(&self) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 8d7fc895e..63912ec75 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSProgressKind = NSString; pub type NSProgressUserInfoKey = NSString; pub type NSProgressFileOperationKind = NSString; @@ -23,225 +23,149 @@ extern_class!( ); extern_methods!( unsafe impl NSProgress { - pub unsafe fn currentProgress() -> Option> { - msg_send_id![Self::class(), currentProgress] - } - pub unsafe fn progressWithTotalUnitCount(unitCount: int64_t) -> Id { - msg_send_id![Self::class(), progressWithTotalUnitCount: unitCount] - } + #[method_id(currentProgress)] + pub unsafe fn currentProgress() -> Option>; + # [method_id (progressWithTotalUnitCount :)] + pub unsafe fn progressWithTotalUnitCount(unitCount: int64_t) -> Id; + # [method_id (discreteProgressWithTotalUnitCount :)] pub unsafe fn discreteProgressWithTotalUnitCount( unitCount: int64_t, - ) -> Id { - msg_send_id![Self::class(), discreteProgressWithTotalUnitCount: unitCount] - } + ) -> Id; + # [method_id (progressWithTotalUnitCount : parent : pendingUnitCount :)] pub unsafe fn progressWithTotalUnitCount_parent_pendingUnitCount( unitCount: int64_t, parent: &NSProgress, portionOfParentTotalUnitCount: int64_t, - ) -> Id { - msg_send_id![ - Self::class(), - progressWithTotalUnitCount: unitCount, - parent: parent, - pendingUnitCount: portionOfParentTotalUnitCount - ] - } + ) -> Id; + # [method_id (initWithParent : userInfo :)] pub unsafe fn initWithParent_userInfo( &self, parentProgressOrNil: Option<&NSProgress>, userInfoOrNil: Option<&NSDictionary>, - ) -> Id { - msg_send_id![ - self, - initWithParent: parentProgressOrNil, - userInfo: userInfoOrNil - ] - } - pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unitCount: int64_t) { - msg_send![self, becomeCurrentWithPendingUnitCount: unitCount] - } + ) -> Id; + # [method (becomeCurrentWithPendingUnitCount :)] + pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unitCount: int64_t); + # [method (performAsCurrentWithPendingUnitCount : usingBlock :)] pub unsafe fn performAsCurrentWithPendingUnitCount_usingBlock( &self, unitCount: int64_t, work: TodoBlock, - ) { - msg_send![ - self, - performAsCurrentWithPendingUnitCount: unitCount, - usingBlock: work - ] - } - pub unsafe fn resignCurrent(&self) { - msg_send![self, resignCurrent] - } + ); + #[method(resignCurrent)] + pub unsafe fn resignCurrent(&self); + # [method (addChild : withPendingUnitCount :)] pub unsafe fn addChild_withPendingUnitCount( &self, child: &NSProgress, inUnitCount: int64_t, - ) { - msg_send![self, addChild: child, withPendingUnitCount: inUnitCount] - } - pub unsafe fn totalUnitCount(&self) -> int64_t { - msg_send![self, totalUnitCount] - } - pub unsafe fn setTotalUnitCount(&self, totalUnitCount: int64_t) { - msg_send![self, setTotalUnitCount: totalUnitCount] - } - pub unsafe fn completedUnitCount(&self) -> int64_t { - msg_send![self, completedUnitCount] - } - pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: int64_t) { - msg_send![self, setCompletedUnitCount: completedUnitCount] - } - pub unsafe fn localizedDescription(&self) -> Id { - msg_send_id![self, localizedDescription] - } - pub unsafe fn setLocalizedDescription(&self, localizedDescription: Option<&NSString>) { - msg_send![self, setLocalizedDescription: localizedDescription] - } - pub unsafe fn localizedAdditionalDescription(&self) -> Id { - msg_send_id![self, localizedAdditionalDescription] - } + ); + #[method(totalUnitCount)] + pub unsafe fn totalUnitCount(&self) -> int64_t; + # [method (setTotalUnitCount :)] + pub unsafe fn setTotalUnitCount(&self, totalUnitCount: int64_t); + #[method(completedUnitCount)] + pub unsafe fn completedUnitCount(&self) -> int64_t; + # [method (setCompletedUnitCount :)] + pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: int64_t); + #[method_id(localizedDescription)] + pub unsafe fn localizedDescription(&self) -> Id; + # [method (setLocalizedDescription :)] + pub unsafe fn setLocalizedDescription(&self, localizedDescription: Option<&NSString>); + #[method_id(localizedAdditionalDescription)] + pub unsafe fn localizedAdditionalDescription(&self) -> Id; + # [method (setLocalizedAdditionalDescription :)] pub unsafe fn setLocalizedAdditionalDescription( &self, localizedAdditionalDescription: Option<&NSString>, - ) { - msg_send![ - self, - setLocalizedAdditionalDescription: localizedAdditionalDescription - ] - } - pub unsafe fn isCancellable(&self) -> bool { - msg_send![self, isCancellable] - } - pub unsafe fn setCancellable(&self, cancellable: bool) { - msg_send![self, setCancellable: cancellable] - } - pub unsafe fn isPausable(&self) -> bool { - msg_send![self, isPausable] - } - pub unsafe fn setPausable(&self, pausable: bool) { - msg_send![self, setPausable: pausable] - } - pub unsafe fn isCancelled(&self) -> bool { - msg_send![self, isCancelled] - } - pub unsafe fn isPaused(&self) -> bool { - msg_send![self, isPaused] - } - pub unsafe fn cancellationHandler(&self) -> TodoBlock { - msg_send![self, cancellationHandler] - } - pub unsafe fn setCancellationHandler(&self, cancellationHandler: TodoBlock) { - msg_send![self, setCancellationHandler: cancellationHandler] - } - pub unsafe fn pausingHandler(&self) -> TodoBlock { - msg_send![self, pausingHandler] - } - pub unsafe fn setPausingHandler(&self, pausingHandler: TodoBlock) { - msg_send![self, setPausingHandler: pausingHandler] - } - pub unsafe fn resumingHandler(&self) -> TodoBlock { - msg_send![self, resumingHandler] - } - pub unsafe fn setResumingHandler(&self, resumingHandler: TodoBlock) { - msg_send![self, setResumingHandler: resumingHandler] - } + ); + #[method(isCancellable)] + pub unsafe fn isCancellable(&self) -> bool; + # [method (setCancellable :)] + pub unsafe fn setCancellable(&self, cancellable: bool); + #[method(isPausable)] + pub unsafe fn isPausable(&self) -> bool; + # [method (setPausable :)] + pub unsafe fn setPausable(&self, pausable: bool); + #[method(isCancelled)] + pub unsafe fn isCancelled(&self) -> bool; + #[method(isPaused)] + pub unsafe fn isPaused(&self) -> bool; + #[method(cancellationHandler)] + pub unsafe fn cancellationHandler(&self) -> TodoBlock; + # [method (setCancellationHandler :)] + pub unsafe fn setCancellationHandler(&self, cancellationHandler: TodoBlock); + #[method(pausingHandler)] + pub unsafe fn pausingHandler(&self) -> TodoBlock; + # [method (setPausingHandler :)] + pub unsafe fn setPausingHandler(&self, pausingHandler: TodoBlock); + #[method(resumingHandler)] + pub unsafe fn resumingHandler(&self) -> TodoBlock; + # [method (setResumingHandler :)] + pub unsafe fn setResumingHandler(&self, resumingHandler: TodoBlock); + # [method (setUserInfoObject : forKey :)] pub unsafe fn setUserInfoObject_forKey( &self, objectOrNil: Option<&Object>, key: &NSProgressUserInfoKey, - ) { - msg_send![self, setUserInfoObject: objectOrNil, forKey: key] - } - pub unsafe fn isIndeterminate(&self) -> bool { - msg_send![self, isIndeterminate] - } - pub unsafe fn fractionCompleted(&self) -> c_double { - msg_send![self, fractionCompleted] - } - pub unsafe fn isFinished(&self) -> bool { - msg_send![self, isFinished] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn pause(&self) { - msg_send![self, pause] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn userInfo(&self) -> Id, Shared> { - msg_send_id![self, userInfo] - } - pub unsafe fn kind(&self) -> Option> { - msg_send_id![self, kind] - } - pub unsafe fn setKind(&self, kind: Option<&NSProgressKind>) { - msg_send![self, setKind: kind] - } - pub unsafe fn estimatedTimeRemaining(&self) -> Option> { - msg_send_id![self, estimatedTimeRemaining] - } - pub unsafe fn setEstimatedTimeRemaining(&self, estimatedTimeRemaining: Option<&NSNumber>) { - msg_send![self, setEstimatedTimeRemaining: estimatedTimeRemaining] - } - pub unsafe fn throughput(&self) -> Option> { - msg_send_id![self, throughput] - } - pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>) { - msg_send![self, setThroughput: throughput] - } - pub unsafe fn fileOperationKind(&self) -> Option> { - msg_send_id![self, fileOperationKind] - } + ); + #[method(isIndeterminate)] + pub unsafe fn isIndeterminate(&self) -> bool; + #[method(fractionCompleted)] + pub unsafe fn fractionCompleted(&self) -> c_double; + #[method(isFinished)] + pub unsafe fn isFinished(&self) -> bool; + #[method(cancel)] + pub unsafe fn cancel(&self); + #[method(pause)] + pub unsafe fn pause(&self); + #[method(resume)] + pub unsafe fn resume(&self); + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Id, Shared>; + #[method_id(kind)] + pub unsafe fn kind(&self) -> Option>; + # [method (setKind :)] + pub unsafe fn setKind(&self, kind: Option<&NSProgressKind>); + #[method_id(estimatedTimeRemaining)] + pub unsafe fn estimatedTimeRemaining(&self) -> Option>; + # [method (setEstimatedTimeRemaining :)] + pub unsafe fn setEstimatedTimeRemaining(&self, estimatedTimeRemaining: Option<&NSNumber>); + #[method_id(throughput)] + pub unsafe fn throughput(&self) -> Option>; + # [method (setThroughput :)] + pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>); + #[method_id(fileOperationKind)] + pub unsafe fn fileOperationKind(&self) -> Option>; + # [method (setFileOperationKind :)] pub unsafe fn setFileOperationKind( &self, fileOperationKind: Option<&NSProgressFileOperationKind>, - ) { - msg_send![self, setFileOperationKind: fileOperationKind] - } - pub unsafe fn fileURL(&self) -> Option> { - msg_send_id![self, fileURL] - } - pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>) { - msg_send![self, setFileURL: fileURL] - } - pub unsafe fn fileTotalCount(&self) -> Option> { - msg_send_id![self, fileTotalCount] - } - pub unsafe fn setFileTotalCount(&self, fileTotalCount: Option<&NSNumber>) { - msg_send![self, setFileTotalCount: fileTotalCount] - } - pub unsafe fn fileCompletedCount(&self) -> Option> { - msg_send_id![self, fileCompletedCount] - } - pub unsafe fn setFileCompletedCount(&self, fileCompletedCount: Option<&NSNumber>) { - msg_send![self, setFileCompletedCount: fileCompletedCount] - } - pub unsafe fn publish(&self) { - msg_send![self, publish] - } - pub unsafe fn unpublish(&self) { - msg_send![self, unpublish] - } + ); + #[method_id(fileURL)] + pub unsafe fn fileURL(&self) -> Option>; + # [method (setFileURL :)] + pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>); + #[method_id(fileTotalCount)] + pub unsafe fn fileTotalCount(&self) -> Option>; + # [method (setFileTotalCount :)] + pub unsafe fn setFileTotalCount(&self, fileTotalCount: Option<&NSNumber>); + #[method_id(fileCompletedCount)] + pub unsafe fn fileCompletedCount(&self) -> Option>; + # [method (setFileCompletedCount :)] + pub unsafe fn setFileCompletedCount(&self, fileCompletedCount: Option<&NSNumber>); + #[method(publish)] + pub unsafe fn publish(&self); + #[method(unpublish)] + pub unsafe fn unpublish(&self); + # [method_id (addSubscriberForFileURL : withPublishingHandler :)] pub unsafe fn addSubscriberForFileURL_withPublishingHandler( url: &NSURL, publishingHandler: NSProgressPublishingHandler, - ) -> Id { - msg_send_id![ - Self::class(), - addSubscriberForFileURL: url, - withPublishingHandler: publishingHandler - ] - } - pub unsafe fn removeSubscriber(subscriber: &Object) { - msg_send![Self::class(), removeSubscriber: subscriber] - } - pub unsafe fn isOld(&self) -> bool { - msg_send![self, isOld] - } + ) -> Id; + # [method (removeSubscriber :)] + pub unsafe fn removeSubscriber(subscriber: &Object); + #[method(isOld)] + pub unsafe fn isOld(&self) -> bool; } ); pub type NSProgressReporting = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 7061623c4..2e824dbd1 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSPropertyListReadOptions = NSPropertyListMutabilityOptions; pub type NSPropertyListWriteOptions = NSUInteger; extern_class!( @@ -20,50 +20,28 @@ extern_class!( ); extern_methods!( unsafe impl NSPropertyListSerialization { + # [method (propertyList : isValidForFormat :)] pub unsafe fn propertyList_isValidForFormat( plist: &Object, format: NSPropertyListFormat, - ) -> bool { - msg_send![Self::class(), propertyList: plist, isValidForFormat: format] - } + ) -> bool; + # [method_id (dataWithPropertyList : format : options : error :)] pub unsafe fn dataWithPropertyList_format_options_error( plist: &Object, format: NSPropertyListFormat, opt: NSPropertyListWriteOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - dataWithPropertyList: plist, - format: format, - options: opt, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (propertyListWithData : options : format : error :)] pub unsafe fn propertyListWithData_options_format_error( data: &NSData, opt: NSPropertyListReadOptions, format: *mut NSPropertyListFormat, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - propertyListWithData: data, - options: opt, - format: format, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (propertyListWithStream : options : format : error :)] pub unsafe fn propertyListWithStream_options_format_error( stream: &NSInputStream, opt: NSPropertyListReadOptions, format: *mut NSPropertyListFormat, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - propertyListWithStream: stream, - options: opt, - format: format, - error: _ - ] - } + ) -> Result, Id>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index c99ba9cd8..90baa884e 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSProxy::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSProtocolChecker; @@ -13,33 +13,25 @@ extern_class!( ); extern_methods!( unsafe impl NSProtocolChecker { - pub unsafe fn protocol(&self) -> Id { - msg_send_id![self, protocol] - } - pub unsafe fn target(&self) -> Option> { - msg_send_id![self, target] - } + #[method_id(protocol)] + pub unsafe fn protocol(&self) -> Id; + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; } ); extern_methods!( #[doc = "NSProtocolCheckerCreation"] unsafe impl NSProtocolChecker { + # [method_id (protocolCheckerWithTarget : protocol :)] pub unsafe fn protocolCheckerWithTarget_protocol( anObject: &NSObject, aProtocol: &Protocol, - ) -> Id { - msg_send_id![ - Self::class(), - protocolCheckerWithTarget: anObject, - protocol: aProtocol - ] - } + ) -> Id; + # [method_id (initWithTarget : protocol :)] pub unsafe fn initWithTarget_protocol( &self, anObject: &NSObject, aProtocol: &Protocol, - ) -> Id { - msg_send_id![self, initWithTarget: anObject, protocol: aProtocol] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 55d405dbe..87f665429 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSProxy; @@ -14,44 +14,32 @@ extern_class!( ); extern_methods!( unsafe impl NSProxy { - pub unsafe fn alloc() -> Id { - msg_send_id![Self::class(), alloc] - } - pub unsafe fn allocWithZone(zone: *mut NSZone) -> Id { - msg_send_id![Self::class(), allocWithZone: zone] - } - pub unsafe fn class() -> &Class { - msg_send![Self::class(), class] - } - pub unsafe fn forwardInvocation(&self, invocation: &NSInvocation) { - msg_send![self, forwardInvocation: invocation] - } + #[method_id(alloc)] + pub unsafe fn alloc() -> Id; + # [method_id (allocWithZone :)] + pub unsafe fn allocWithZone(zone: *mut NSZone) -> Id; + #[method(class)] + pub unsafe fn class() -> &Class; + # [method (forwardInvocation :)] + pub unsafe fn forwardInvocation(&self, invocation: &NSInvocation); + # [method_id (methodSignatureForSelector :)] pub unsafe fn methodSignatureForSelector( &self, sel: Sel, - ) -> Option> { - msg_send_id![self, methodSignatureForSelector: sel] - } - pub unsafe fn dealloc(&self) { - msg_send![self, dealloc] - } - pub unsafe fn finalize(&self) { - msg_send![self, finalize] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn debugDescription(&self) -> Id { - msg_send_id![self, debugDescription] - } - pub unsafe fn respondsToSelector(aSelector: Sel) -> bool { - msg_send![Self::class(), respondsToSelector: aSelector] - } - pub unsafe fn allowsWeakReference(&self) -> bool { - msg_send![self, allowsWeakReference] - } - pub unsafe fn retainWeakReference(&self) -> bool { - msg_send![self, retainWeakReference] - } + ) -> Option>; + #[method(dealloc)] + pub unsafe fn dealloc(&self); + #[method(finalize)] + pub unsafe fn finalize(&self); + #[method_id(description)] + pub unsafe fn description(&self) -> Id; + #[method_id(debugDescription)] + pub unsafe fn debugDescription(&self) -> Id; + # [method (respondsToSelector :)] + pub unsafe fn respondsToSelector(aSelector: Sel) -> bool; + #[method(allowsWeakReference)] + pub unsafe fn allowsWeakReference(&self) -> bool; + #[method(retainWeakReference)] + pub unsafe fn retainWeakReference(&self) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index 00bf4f774..8476d4ee6 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -4,15 +4,13 @@ use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_methods!( #[doc = "NSValueRangeExtensions"] unsafe impl NSValue { - pub unsafe fn valueWithRange(range: NSRange) -> Id { - msg_send_id![Self::class(), valueWithRange: range] - } - pub unsafe fn rangeValue(&self) -> NSRange { - msg_send![self, rangeValue] - } + # [method_id (valueWithRange :)] + pub unsafe fn valueWithRange(range: NSRange) -> Id; + #[method(rangeValue)] + pub unsafe fn rangeValue(&self) -> NSRange; } ); diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index fa8758c0e..ff8193d8a 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSTextCheckingResult::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSRegularExpression; @@ -15,161 +15,97 @@ extern_class!( ); extern_methods!( unsafe impl NSRegularExpression { + # [method_id (regularExpressionWithPattern : options : error :)] pub unsafe fn regularExpressionWithPattern_options_error( pattern: &NSString, options: NSRegularExpressionOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - regularExpressionWithPattern: pattern, - options: options, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (initWithPattern : options : error :)] pub unsafe fn initWithPattern_options_error( &self, pattern: &NSString, options: NSRegularExpressionOptions, - ) -> Result, Id> { - msg_send_id![self, initWithPattern: pattern, options: options, error: _] - } - pub unsafe fn pattern(&self) -> Id { - msg_send_id![self, pattern] - } - pub unsafe fn options(&self) -> NSRegularExpressionOptions { - msg_send![self, options] - } - pub unsafe fn numberOfCaptureGroups(&self) -> NSUInteger { - msg_send![self, numberOfCaptureGroups] - } - pub unsafe fn escapedPatternForString(string: &NSString) -> Id { - msg_send_id![Self::class(), escapedPatternForString: string] - } + ) -> Result, Id>; + #[method_id(pattern)] + pub unsafe fn pattern(&self) -> Id; + #[method(options)] + pub unsafe fn options(&self) -> NSRegularExpressionOptions; + #[method(numberOfCaptureGroups)] + pub unsafe fn numberOfCaptureGroups(&self) -> NSUInteger; + # [method_id (escapedPatternForString :)] + pub unsafe fn escapedPatternForString(string: &NSString) -> Id; } ); extern_methods!( #[doc = "NSMatching"] unsafe impl NSRegularExpression { + # [method (enumerateMatchesInString : options : range : usingBlock :)] pub unsafe fn enumerateMatchesInString_options_range_usingBlock( &self, string: &NSString, options: NSMatchingOptions, range: NSRange, block: TodoBlock, - ) { - msg_send![ - self, - enumerateMatchesInString: string, - options: options, - range: range, - usingBlock: block - ] - } + ); + # [method_id (matchesInString : options : range :)] pub unsafe fn matchesInString_options_range( &self, string: &NSString, options: NSMatchingOptions, range: NSRange, - ) -> Id, Shared> { - msg_send_id![ - self, - matchesInString: string, - options: options, - range: range - ] - } + ) -> Id, Shared>; + # [method (numberOfMatchesInString : options : range :)] pub unsafe fn numberOfMatchesInString_options_range( &self, string: &NSString, options: NSMatchingOptions, range: NSRange, - ) -> NSUInteger { - msg_send![ - self, - numberOfMatchesInString: string, - options: options, - range: range - ] - } + ) -> NSUInteger; + # [method_id (firstMatchInString : options : range :)] pub unsafe fn firstMatchInString_options_range( &self, string: &NSString, options: NSMatchingOptions, range: NSRange, - ) -> Option> { - msg_send_id![ - self, - firstMatchInString: string, - options: options, - range: range - ] - } + ) -> Option>; + # [method (rangeOfFirstMatchInString : options : range :)] pub unsafe fn rangeOfFirstMatchInString_options_range( &self, string: &NSString, options: NSMatchingOptions, range: NSRange, - ) -> NSRange { - msg_send![ - self, - rangeOfFirstMatchInString: string, - options: options, - range: range - ] - } + ) -> NSRange; } ); extern_methods!( #[doc = "NSReplacement"] unsafe impl NSRegularExpression { + # [method_id (stringByReplacingMatchesInString : options : range : withTemplate :)] pub unsafe fn stringByReplacingMatchesInString_options_range_withTemplate( &self, string: &NSString, options: NSMatchingOptions, range: NSRange, templ: &NSString, - ) -> Id { - msg_send_id![ - self, - stringByReplacingMatchesInString: string, - options: options, - range: range, - withTemplate: templ - ] - } + ) -> Id; + # [method (replaceMatchesInString : options : range : withTemplate :)] pub unsafe fn replaceMatchesInString_options_range_withTemplate( &self, string: &NSMutableString, options: NSMatchingOptions, range: NSRange, templ: &NSString, - ) -> NSUInteger { - msg_send![ - self, - replaceMatchesInString: string, - options: options, - range: range, - withTemplate: templ - ] - } + ) -> NSUInteger; + # [method_id (replacementStringForResult : inString : offset : template :)] pub unsafe fn replacementStringForResult_inString_offset_template( &self, result: &NSTextCheckingResult, string: &NSString, offset: NSInteger, templ: &NSString, - ) -> Id { - msg_send_id![ - self, - replacementStringForResult: result, - inString: string, - offset: offset, - template: templ - ] - } - pub unsafe fn escapedTemplateForString(string: &NSString) -> Id { - msg_send_id![Self::class(), escapedTemplateForString: string] - } + ) -> Id; + # [method_id (escapedTemplateForString :)] + pub unsafe fn escapedTemplateForString(string: &NSString) -> Id; } ); extern_class!( @@ -181,23 +117,16 @@ extern_class!( ); extern_methods!( unsafe impl NSDataDetector { + # [method_id (dataDetectorWithTypes : error :)] pub unsafe fn dataDetectorWithTypes_error( checkingTypes: NSTextCheckingTypes, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - dataDetectorWithTypes: checkingTypes, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (initWithTypes : error :)] pub unsafe fn initWithTypes_error( &self, checkingTypes: NSTextCheckingTypes, - ) -> Result, Id> { - msg_send_id![self, initWithTypes: checkingTypes, error: _] - } - pub unsafe fn checkingTypes(&self) -> NSTextCheckingTypes { - msg_send![self, checkingTypes] - } + ) -> Result, Id>; + #[method(checkingTypes)] + pub unsafe fn checkingTypes(&self) -> NSTextCheckingTypes; } ); diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index 568968cf9..151e08077 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSRelativeDateTimeFormatter; @@ -16,64 +16,46 @@ extern_class!( ); extern_methods!( unsafe impl NSRelativeDateTimeFormatter { - pub unsafe fn dateTimeStyle(&self) -> NSRelativeDateTimeFormatterStyle { - msg_send![self, dateTimeStyle] - } - pub unsafe fn setDateTimeStyle(&self, dateTimeStyle: NSRelativeDateTimeFormatterStyle) { - msg_send![self, setDateTimeStyle: dateTimeStyle] - } - pub unsafe fn unitsStyle(&self) -> NSRelativeDateTimeFormatterUnitsStyle { - msg_send![self, unitsStyle] - } - pub unsafe fn setUnitsStyle(&self, unitsStyle: NSRelativeDateTimeFormatterUnitsStyle) { - msg_send![self, setUnitsStyle: unitsStyle] - } - pub unsafe fn formattingContext(&self) -> NSFormattingContext { - msg_send![self, formattingContext] - } - pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext) { - msg_send![self, setFormattingContext: formattingContext] - } - pub unsafe fn calendar(&self) -> Id { - msg_send_id![self, calendar] - } - pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>) { - msg_send![self, setCalendar: calendar] - } - pub unsafe fn locale(&self) -> Id { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&NSLocale>) { - msg_send![self, setLocale: locale] - } + #[method(dateTimeStyle)] + pub unsafe fn dateTimeStyle(&self) -> NSRelativeDateTimeFormatterStyle; + # [method (setDateTimeStyle :)] + pub unsafe fn setDateTimeStyle(&self, dateTimeStyle: NSRelativeDateTimeFormatterStyle); + #[method(unitsStyle)] + pub unsafe fn unitsStyle(&self) -> NSRelativeDateTimeFormatterUnitsStyle; + # [method (setUnitsStyle :)] + pub unsafe fn setUnitsStyle(&self, unitsStyle: NSRelativeDateTimeFormatterUnitsStyle); + #[method(formattingContext)] + pub unsafe fn formattingContext(&self) -> NSFormattingContext; + # [method (setFormattingContext :)] + pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); + #[method_id(calendar)] + pub unsafe fn calendar(&self) -> Id; + # [method (setCalendar :)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(locale)] + pub unsafe fn locale(&self) -> Id; + # [method (setLocale :)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + # [method_id (localizedStringFromDateComponents :)] pub unsafe fn localizedStringFromDateComponents( &self, dateComponents: &NSDateComponents, - ) -> Id { - msg_send_id![self, localizedStringFromDateComponents: dateComponents] - } + ) -> Id; + # [method_id (localizedStringFromTimeInterval :)] pub unsafe fn localizedStringFromTimeInterval( &self, timeInterval: NSTimeInterval, - ) -> Id { - msg_send_id![self, localizedStringFromTimeInterval: timeInterval] - } + ) -> Id; + # [method_id (localizedStringForDate : relativeToDate :)] pub unsafe fn localizedStringForDate_relativeToDate( &self, date: &NSDate, referenceDate: &NSDate, - ) -> Id { - msg_send_id![ - self, - localizedStringForDate: date, - relativeToDate: referenceDate - ] - } + ) -> Id; + # [method_id (stringForObjectValue :)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, - ) -> Option> { - msg_send_id![self, stringForObjectValue: obj] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 1dffd8a1a..e0576618f 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSRunLoop; @@ -18,120 +18,79 @@ extern_class!( ); extern_methods!( unsafe impl NSRunLoop { - pub unsafe fn currentRunLoop() -> Id { - msg_send_id![Self::class(), currentRunLoop] - } - pub unsafe fn mainRunLoop() -> Id { - msg_send_id![Self::class(), mainRunLoop] - } - pub unsafe fn currentMode(&self) -> Option> { - msg_send_id![self, currentMode] - } - pub unsafe fn getCFRunLoop(&self) -> CFRunLoopRef { - msg_send![self, getCFRunLoop] - } - pub unsafe fn addTimer_forMode(&self, timer: &NSTimer, mode: &NSRunLoopMode) { - msg_send![self, addTimer: timer, forMode: mode] - } - pub unsafe fn addPort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode) { - msg_send![self, addPort: aPort, forMode: mode] - } - pub unsafe fn removePort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode) { - msg_send![self, removePort: aPort, forMode: mode] - } - pub unsafe fn limitDateForMode(&self, mode: &NSRunLoopMode) -> Option> { - msg_send_id![self, limitDateForMode: mode] - } + #[method_id(currentRunLoop)] + pub unsafe fn currentRunLoop() -> Id; + #[method_id(mainRunLoop)] + pub unsafe fn mainRunLoop() -> Id; + #[method_id(currentMode)] + pub unsafe fn currentMode(&self) -> Option>; + #[method(getCFRunLoop)] + pub unsafe fn getCFRunLoop(&self) -> CFRunLoopRef; + # [method (addTimer : forMode :)] + pub unsafe fn addTimer_forMode(&self, timer: &NSTimer, mode: &NSRunLoopMode); + # [method (addPort : forMode :)] + pub unsafe fn addPort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode); + # [method (removePort : forMode :)] + pub unsafe fn removePort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode); + # [method_id (limitDateForMode :)] + pub unsafe fn limitDateForMode(&self, mode: &NSRunLoopMode) -> Option>; + # [method (acceptInputForMode : beforeDate :)] pub unsafe fn acceptInputForMode_beforeDate( &self, mode: &NSRunLoopMode, limitDate: &NSDate, - ) { - msg_send![self, acceptInputForMode: mode, beforeDate: limitDate] - } + ); } ); extern_methods!( #[doc = "NSRunLoopConveniences"] unsafe impl NSRunLoop { - pub unsafe fn run(&self) { - msg_send![self, run] - } - pub unsafe fn runUntilDate(&self, limitDate: &NSDate) { - msg_send![self, runUntilDate: limitDate] - } - pub unsafe fn runMode_beforeDate(&self, mode: &NSRunLoopMode, limitDate: &NSDate) -> bool { - msg_send![self, runMode: mode, beforeDate: limitDate] - } - pub unsafe fn configureAsServer(&self) { - msg_send![self, configureAsServer] - } - pub unsafe fn performInModes_block( - &self, - modes: &NSArray, - block: TodoBlock, - ) { - msg_send![self, performInModes: modes, block: block] - } - pub unsafe fn performBlock(&self, block: TodoBlock) { - msg_send![self, performBlock: block] - } + #[method(run)] + pub unsafe fn run(&self); + # [method (runUntilDate :)] + pub unsafe fn runUntilDate(&self, limitDate: &NSDate); + # [method (runMode : beforeDate :)] + pub unsafe fn runMode_beforeDate(&self, mode: &NSRunLoopMode, limitDate: &NSDate) -> bool; + #[method(configureAsServer)] + pub unsafe fn configureAsServer(&self); + # [method (performInModes : block :)] + pub unsafe fn performInModes_block(&self, modes: &NSArray, block: TodoBlock); + # [method (performBlock :)] + pub unsafe fn performBlock(&self, block: TodoBlock); } ); extern_methods!( #[doc = "NSDelayedPerforming"] unsafe impl NSObject { + # [method (performSelector : withObject : afterDelay : inModes :)] pub unsafe fn performSelector_withObject_afterDelay_inModes( &self, aSelector: Sel, anArgument: Option<&Object>, delay: NSTimeInterval, modes: &NSArray, - ) { - msg_send![ - self, - performSelector: aSelector, - withObject: anArgument, - afterDelay: delay, - inModes: modes - ] - } + ); + # [method (performSelector : withObject : afterDelay :)] pub unsafe fn performSelector_withObject_afterDelay( &self, aSelector: Sel, anArgument: Option<&Object>, delay: NSTimeInterval, - ) { - msg_send![ - self, - performSelector: aSelector, - withObject: anArgument, - afterDelay: delay - ] - } + ); + # [method (cancelPreviousPerformRequestsWithTarget : selector : object :)] pub unsafe fn cancelPreviousPerformRequestsWithTarget_selector_object( aTarget: &Object, aSelector: Sel, anArgument: Option<&Object>, - ) { - msg_send![ - Self::class(), - cancelPreviousPerformRequestsWithTarget: aTarget, - selector: aSelector, - object: anArgument - ] - } - pub unsafe fn cancelPreviousPerformRequestsWithTarget(aTarget: &Object) { - msg_send![ - Self::class(), - cancelPreviousPerformRequestsWithTarget: aTarget - ] - } + ); + # [method (cancelPreviousPerformRequestsWithTarget :)] + pub unsafe fn cancelPreviousPerformRequestsWithTarget(aTarget: &Object); } ); extern_methods!( #[doc = "NSOrderedPerform"] unsafe impl NSRunLoop { + # [method (performSelector : target : argument : order : modes :)] pub unsafe fn performSelector_target_argument_order_modes( &self, aSelector: Sel, @@ -139,31 +98,15 @@ extern_methods!( arg: Option<&Object>, order: NSUInteger, modes: &NSArray, - ) { - msg_send![ - self, - performSelector: aSelector, - target: target, - argument: arg, - order: order, - modes: modes - ] - } + ); + # [method (cancelPerformSelector : target : argument :)] pub unsafe fn cancelPerformSelector_target_argument( &self, aSelector: Sel, target: &Object, arg: Option<&Object>, - ) { - msg_send![ - self, - cancelPerformSelector: aSelector, - target: target, - argument: arg - ] - } - pub unsafe fn cancelPerformSelectorsWithTarget(&self, target: &Object) { - msg_send![self, cancelPerformSelectorsWithTarget: target] - } + ); + # [method (cancelPerformSelectorsWithTarget :)] + pub unsafe fn cancelPerformSelectorsWithTarget(&self, target: &Object); } ); diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 3e1f0e1c1..366ecbd92 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScanner; @@ -15,110 +15,83 @@ extern_class!( ); extern_methods!( unsafe impl NSScanner { - pub unsafe fn string(&self) -> Id { - msg_send_id![self, string] - } - pub unsafe fn scanLocation(&self) -> NSUInteger { - msg_send![self, scanLocation] - } - pub unsafe fn setScanLocation(&self, scanLocation: NSUInteger) { - msg_send![self, setScanLocation: scanLocation] - } - pub unsafe fn charactersToBeSkipped(&self) -> Option> { - msg_send_id![self, charactersToBeSkipped] - } + #[method_id(string)] + pub unsafe fn string(&self) -> Id; + #[method(scanLocation)] + pub unsafe fn scanLocation(&self) -> NSUInteger; + # [method (setScanLocation :)] + pub unsafe fn setScanLocation(&self, scanLocation: NSUInteger); + #[method_id(charactersToBeSkipped)] + pub unsafe fn charactersToBeSkipped(&self) -> Option>; + # [method (setCharactersToBeSkipped :)] pub unsafe fn setCharactersToBeSkipped( &self, charactersToBeSkipped: Option<&NSCharacterSet>, - ) { - msg_send![self, setCharactersToBeSkipped: charactersToBeSkipped] - } - pub unsafe fn caseSensitive(&self) -> bool { - msg_send![self, caseSensitive] - } - pub unsafe fn setCaseSensitive(&self, caseSensitive: bool) { - msg_send![self, setCaseSensitive: caseSensitive] - } - pub unsafe fn locale(&self) -> Option> { - msg_send_id![self, locale] - } - pub unsafe fn setLocale(&self, locale: Option<&Object>) { - msg_send![self, setLocale: locale] - } - pub unsafe fn initWithString(&self, string: &NSString) -> Id { - msg_send_id![self, initWithString: string] - } + ); + #[method(caseSensitive)] + pub unsafe fn caseSensitive(&self) -> bool; + # [method (setCaseSensitive :)] + pub unsafe fn setCaseSensitive(&self, caseSensitive: bool); + #[method_id(locale)] + pub unsafe fn locale(&self) -> Option>; + # [method (setLocale :)] + pub unsafe fn setLocale(&self, locale: Option<&Object>); + # [method_id (initWithString :)] + pub unsafe fn initWithString(&self, string: &NSString) -> Id; } ); extern_methods!( #[doc = "NSExtendedScanner"] unsafe impl NSScanner { - pub unsafe fn scanInt(&self, result: *mut c_int) -> bool { - msg_send![self, scanInt: result] - } - pub unsafe fn scanInteger(&self, result: *mut NSInteger) -> bool { - msg_send![self, scanInteger: result] - } - pub unsafe fn scanLongLong(&self, result: *mut c_longlong) -> bool { - msg_send![self, scanLongLong: result] - } - pub unsafe fn scanUnsignedLongLong(&self, result: *mut c_ulonglong) -> bool { - msg_send![self, scanUnsignedLongLong: result] - } - pub unsafe fn scanFloat(&self, result: *mut c_float) -> bool { - msg_send![self, scanFloat: result] - } - pub unsafe fn scanDouble(&self, result: *mut c_double) -> bool { - msg_send![self, scanDouble: result] - } - pub unsafe fn scanHexInt(&self, result: *mut c_uint) -> bool { - msg_send![self, scanHexInt: result] - } - pub unsafe fn scanHexLongLong(&self, result: *mut c_ulonglong) -> bool { - msg_send![self, scanHexLongLong: result] - } - pub unsafe fn scanHexFloat(&self, result: *mut c_float) -> bool { - msg_send![self, scanHexFloat: result] - } - pub unsafe fn scanHexDouble(&self, result: *mut c_double) -> bool { - msg_send![self, scanHexDouble: result] - } + # [method (scanInt :)] + pub unsafe fn scanInt(&self, result: *mut c_int) -> bool; + # [method (scanInteger :)] + pub unsafe fn scanInteger(&self, result: *mut NSInteger) -> bool; + # [method (scanLongLong :)] + pub unsafe fn scanLongLong(&self, result: *mut c_longlong) -> bool; + # [method (scanUnsignedLongLong :)] + pub unsafe fn scanUnsignedLongLong(&self, result: *mut c_ulonglong) -> bool; + # [method (scanFloat :)] + pub unsafe fn scanFloat(&self, result: *mut c_float) -> bool; + # [method (scanDouble :)] + pub unsafe fn scanDouble(&self, result: *mut c_double) -> bool; + # [method (scanHexInt :)] + pub unsafe fn scanHexInt(&self, result: *mut c_uint) -> bool; + # [method (scanHexLongLong :)] + pub unsafe fn scanHexLongLong(&self, result: *mut c_ulonglong) -> bool; + # [method (scanHexFloat :)] + pub unsafe fn scanHexFloat(&self, result: *mut c_float) -> bool; + # [method (scanHexDouble :)] + pub unsafe fn scanHexDouble(&self, result: *mut c_double) -> bool; + # [method (scanString : intoString :)] pub unsafe fn scanString_intoString( &self, string: &NSString, result: Option<&mut Option>>, - ) -> bool { - msg_send![self, scanString: string, intoString: result] - } + ) -> bool; + # [method (scanCharactersFromSet : intoString :)] pub unsafe fn scanCharactersFromSet_intoString( &self, set: &NSCharacterSet, result: Option<&mut Option>>, - ) -> bool { - msg_send![self, scanCharactersFromSet: set, intoString: result] - } + ) -> bool; + # [method (scanUpToString : intoString :)] pub unsafe fn scanUpToString_intoString( &self, string: &NSString, result: Option<&mut Option>>, - ) -> bool { - msg_send![self, scanUpToString: string, intoString: result] - } + ) -> bool; + # [method (scanUpToCharactersFromSet : intoString :)] pub unsafe fn scanUpToCharactersFromSet_intoString( &self, set: &NSCharacterSet, result: Option<&mut Option>>, - ) -> bool { - msg_send![self, scanUpToCharactersFromSet: set, intoString: result] - } - pub unsafe fn isAtEnd(&self) -> bool { - msg_send![self, isAtEnd] - } - pub unsafe fn scannerWithString(string: &NSString) -> Id { - msg_send_id![Self::class(), scannerWithString: string] - } - pub unsafe fn localizedScannerWithString(string: &NSString) -> Id { - msg_send_id![Self::class(), localizedScannerWithString: string] - } + ) -> bool; + #[method(isAtEnd)] + pub unsafe fn isAtEnd(&self) -> bool; + # [method_id (scannerWithString :)] + pub unsafe fn scannerWithString(string: &NSString) -> Id; + # [method_id (localizedScannerWithString :)] + pub unsafe fn localizedScannerWithString(string: &NSString) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index 412568078..4b10d8a41 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSClassDescription::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptClassDescription; @@ -13,114 +13,83 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptClassDescription { + # [method_id (classDescriptionForClass :)] pub unsafe fn classDescriptionForClass( aClass: &Class, - ) -> Option> { - msg_send_id![Self::class(), classDescriptionForClass: aClass] - } + ) -> Option>; + # [method_id (initWithSuiteName : className : dictionary :)] pub unsafe fn initWithSuiteName_className_dictionary( &self, suiteName: &NSString, className: &NSString, classDeclaration: Option<&NSDictionary>, - ) -> Option> { - msg_send_id![ - self, - initWithSuiteName: suiteName, - className: className, - dictionary: classDeclaration - ] - } - pub unsafe fn suiteName(&self) -> Option> { - msg_send_id![self, suiteName] - } - pub unsafe fn className(&self) -> Option> { - msg_send_id![self, className] - } - pub unsafe fn implementationClassName(&self) -> Option> { - msg_send_id![self, implementationClassName] - } - pub unsafe fn superclassDescription(&self) -> Option> { - msg_send_id![self, superclassDescription] - } - pub unsafe fn appleEventCode(&self) -> FourCharCode { - msg_send![self, appleEventCode] - } - pub unsafe fn matchesAppleEventCode(&self, appleEventCode: FourCharCode) -> bool { - msg_send![self, matchesAppleEventCode: appleEventCode] - } + ) -> Option>; + #[method_id(suiteName)] + pub unsafe fn suiteName(&self) -> Option>; + #[method_id(className)] + pub unsafe fn className(&self) -> Option>; + #[method_id(implementationClassName)] + pub unsafe fn implementationClassName(&self) -> Option>; + #[method_id(superclassDescription)] + pub unsafe fn superclassDescription(&self) -> Option>; + #[method(appleEventCode)] + pub unsafe fn appleEventCode(&self) -> FourCharCode; + # [method (matchesAppleEventCode :)] + pub unsafe fn matchesAppleEventCode(&self, appleEventCode: FourCharCode) -> bool; + # [method (supportsCommand :)] pub unsafe fn supportsCommand( &self, commandDescription: &NSScriptCommandDescription, - ) -> bool { - msg_send![self, supportsCommand: commandDescription] - } + ) -> bool; + # [method (selectorForCommand :)] pub unsafe fn selectorForCommand( &self, commandDescription: &NSScriptCommandDescription, - ) -> Option { - msg_send![self, selectorForCommand: commandDescription] - } - pub unsafe fn typeForKey(&self, key: &NSString) -> Option> { - msg_send_id![self, typeForKey: key] - } + ) -> Option; + # [method_id (typeForKey :)] + pub unsafe fn typeForKey(&self, key: &NSString) -> Option>; + # [method_id (classDescriptionForKey :)] pub unsafe fn classDescriptionForKey( &self, key: &NSString, - ) -> Option> { - msg_send_id![self, classDescriptionForKey: key] - } - pub unsafe fn appleEventCodeForKey(&self, key: &NSString) -> FourCharCode { - msg_send![self, appleEventCodeForKey: key] - } + ) -> Option>; + # [method (appleEventCodeForKey :)] + pub unsafe fn appleEventCodeForKey(&self, key: &NSString) -> FourCharCode; + # [method_id (keyWithAppleEventCode :)] pub unsafe fn keyWithAppleEventCode( &self, appleEventCode: FourCharCode, - ) -> Option> { - msg_send_id![self, keyWithAppleEventCode: appleEventCode] - } - pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option> { - msg_send_id![self, defaultSubcontainerAttributeKey] - } + ) -> Option>; + #[method_id(defaultSubcontainerAttributeKey)] + pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option>; + # [method (isLocationRequiredToCreateForKey :)] pub unsafe fn isLocationRequiredToCreateForKey( &self, toManyRelationshipKey: &NSString, - ) -> bool { - msg_send![ - self, - isLocationRequiredToCreateForKey: toManyRelationshipKey - ] - } - pub unsafe fn hasPropertyForKey(&self, key: &NSString) -> bool { - msg_send![self, hasPropertyForKey: key] - } - pub unsafe fn hasOrderedToManyRelationshipForKey(&self, key: &NSString) -> bool { - msg_send![self, hasOrderedToManyRelationshipForKey: key] - } - pub unsafe fn hasReadablePropertyForKey(&self, key: &NSString) -> bool { - msg_send![self, hasReadablePropertyForKey: key] - } - pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool { - msg_send![self, hasWritablePropertyForKey: key] - } + ) -> bool; + # [method (hasPropertyForKey :)] + pub unsafe fn hasPropertyForKey(&self, key: &NSString) -> bool; + # [method (hasOrderedToManyRelationshipForKey :)] + pub unsafe fn hasOrderedToManyRelationshipForKey(&self, key: &NSString) -> bool; + # [method (hasReadablePropertyForKey :)] + pub unsafe fn hasReadablePropertyForKey(&self, key: &NSString) -> bool; + # [method (hasWritablePropertyForKey :)] + pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSScriptClassDescription { - pub unsafe fn isReadOnlyKey(&self, key: &NSString) -> bool { - msg_send![self, isReadOnlyKey: key] - } + # [method (isReadOnlyKey :)] + pub unsafe fn isReadOnlyKey(&self, key: &NSString) -> bool; } ); extern_methods!( #[doc = "NSScriptClassDescription"] unsafe impl NSObject { - pub unsafe fn classCode(&self) -> FourCharCode { - msg_send![self, classCode] - } - pub unsafe fn className(&self) -> Id { - msg_send_id![self, className] - } + #[method(classCode)] + pub unsafe fn classCode(&self) -> FourCharCode; + #[method_id(className)] + pub unsafe fn className(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs index 09ae0e227..f3f76a81c 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptCoercionHandler; @@ -12,30 +12,21 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptCoercionHandler { - pub unsafe fn sharedCoercionHandler() -> Id { - msg_send_id![Self::class(), sharedCoercionHandler] - } + #[method_id(sharedCoercionHandler)] + pub unsafe fn sharedCoercionHandler() -> Id; + # [method_id (coerceValue : toClass :)] pub unsafe fn coerceValue_toClass( &self, value: &Object, toClass: &Class, - ) -> Option> { - msg_send_id![self, coerceValue: value, toClass: toClass] - } + ) -> Option>; + # [method (registerCoercer : selector : toConvertFromClass : toClass :)] pub unsafe fn registerCoercer_selector_toConvertFromClass_toClass( &self, coercer: &Object, selector: Sel, fromClass: &Class, toClass: &Class, - ) { - msg_send![ - self, - registerCoercer: coercer, - selector: selector, - toConvertFromClass: fromClass, - toClass: toClass - ] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 56dc4faa9..aa7e61a64 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptCommand; @@ -18,107 +18,75 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptCommand { + # [method_id (initWithCommandDescription :)] pub unsafe fn initWithCommandDescription( &self, commandDef: &NSScriptCommandDescription, - ) -> Id { - msg_send_id![self, initWithCommandDescription: commandDef] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn commandDescription(&self) -> Id { - msg_send_id![self, commandDescription] - } - pub unsafe fn directParameter(&self) -> Option> { - msg_send_id![self, directParameter] - } - pub unsafe fn setDirectParameter(&self, directParameter: Option<&Object>) { - msg_send![self, setDirectParameter: directParameter] - } - pub unsafe fn receiversSpecifier(&self) -> Option> { - msg_send_id![self, receiversSpecifier] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(commandDescription)] + pub unsafe fn commandDescription(&self) -> Id; + #[method_id(directParameter)] + pub unsafe fn directParameter(&self) -> Option>; + # [method (setDirectParameter :)] + pub unsafe fn setDirectParameter(&self, directParameter: Option<&Object>); + #[method_id(receiversSpecifier)] + pub unsafe fn receiversSpecifier(&self) -> Option>; + # [method (setReceiversSpecifier :)] pub unsafe fn setReceiversSpecifier( &self, receiversSpecifier: Option<&NSScriptObjectSpecifier>, - ) { - msg_send![self, setReceiversSpecifier: receiversSpecifier] - } - pub unsafe fn evaluatedReceivers(&self) -> Option> { - msg_send_id![self, evaluatedReceivers] - } - pub unsafe fn arguments(&self) -> Option, Shared>> { - msg_send_id![self, arguments] - } - pub unsafe fn setArguments(&self, arguments: Option<&NSDictionary>) { - msg_send![self, setArguments: arguments] - } + ); + #[method_id(evaluatedReceivers)] + pub unsafe fn evaluatedReceivers(&self) -> Option>; + #[method_id(arguments)] + pub unsafe fn arguments(&self) -> Option, Shared>>; + # [method (setArguments :)] + pub unsafe fn setArguments(&self, arguments: Option<&NSDictionary>); + #[method_id(evaluatedArguments)] pub unsafe fn evaluatedArguments( &self, - ) -> Option, Shared>> { - msg_send_id![self, evaluatedArguments] - } - pub unsafe fn isWellFormed(&self) -> bool { - msg_send![self, isWellFormed] - } - pub unsafe fn performDefaultImplementation(&self) -> Option> { - msg_send_id![self, performDefaultImplementation] - } - pub unsafe fn executeCommand(&self) -> Option> { - msg_send_id![self, executeCommand] - } - pub unsafe fn scriptErrorNumber(&self) -> NSInteger { - msg_send![self, scriptErrorNumber] - } - pub unsafe fn setScriptErrorNumber(&self, scriptErrorNumber: NSInteger) { - msg_send![self, setScriptErrorNumber: scriptErrorNumber] - } + ) -> Option, Shared>>; + #[method(isWellFormed)] + pub unsafe fn isWellFormed(&self) -> bool; + #[method_id(performDefaultImplementation)] + pub unsafe fn performDefaultImplementation(&self) -> Option>; + #[method_id(executeCommand)] + pub unsafe fn executeCommand(&self) -> Option>; + #[method(scriptErrorNumber)] + pub unsafe fn scriptErrorNumber(&self) -> NSInteger; + # [method (setScriptErrorNumber :)] + pub unsafe fn setScriptErrorNumber(&self, scriptErrorNumber: NSInteger); + #[method_id(scriptErrorOffendingObjectDescriptor)] pub unsafe fn scriptErrorOffendingObjectDescriptor( &self, - ) -> Option> { - msg_send_id![self, scriptErrorOffendingObjectDescriptor] - } + ) -> Option>; + # [method (setScriptErrorOffendingObjectDescriptor :)] pub unsafe fn setScriptErrorOffendingObjectDescriptor( &self, scriptErrorOffendingObjectDescriptor: Option<&NSAppleEventDescriptor>, - ) { - msg_send![ - self, - setScriptErrorOffendingObjectDescriptor: scriptErrorOffendingObjectDescriptor - ] - } + ); + #[method_id(scriptErrorExpectedTypeDescriptor)] pub unsafe fn scriptErrorExpectedTypeDescriptor( &self, - ) -> Option> { - msg_send_id![self, scriptErrorExpectedTypeDescriptor] - } + ) -> Option>; + # [method (setScriptErrorExpectedTypeDescriptor :)] pub unsafe fn setScriptErrorExpectedTypeDescriptor( &self, scriptErrorExpectedTypeDescriptor: Option<&NSAppleEventDescriptor>, - ) { - msg_send![ - self, - setScriptErrorExpectedTypeDescriptor: scriptErrorExpectedTypeDescriptor - ] - } - pub unsafe fn scriptErrorString(&self) -> Option> { - msg_send_id![self, scriptErrorString] - } - pub unsafe fn setScriptErrorString(&self, scriptErrorString: Option<&NSString>) { - msg_send![self, setScriptErrorString: scriptErrorString] - } - pub unsafe fn currentCommand() -> Option> { - msg_send_id![Self::class(), currentCommand] - } - pub unsafe fn appleEvent(&self) -> Option> { - msg_send_id![self, appleEvent] - } - pub unsafe fn suspendExecution(&self) { - msg_send![self, suspendExecution] - } - pub unsafe fn resumeExecutionWithResult(&self, result: Option<&Object>) { - msg_send![self, resumeExecutionWithResult: result] - } + ); + #[method_id(scriptErrorString)] + pub unsafe fn scriptErrorString(&self) -> Option>; + # [method (setScriptErrorString :)] + pub unsafe fn setScriptErrorString(&self, scriptErrorString: Option<&NSString>); + #[method_id(currentCommand)] + pub unsafe fn currentCommand() -> Option>; + #[method_id(appleEvent)] + pub unsafe fn appleEvent(&self) -> Option>; + #[method(suspendExecution)] + pub unsafe fn suspendExecution(&self); + # [method (resumeExecutionWithResult :)] + pub unsafe fn resumeExecutionWithResult(&self, result: Option<&Object>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index 19b124953..4bbbce1f5 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptCommandDescription; @@ -16,72 +16,51 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptCommandDescription { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithSuiteName : commandName : dictionary :)] pub unsafe fn initWithSuiteName_commandName_dictionary( &self, suiteName: &NSString, commandName: &NSString, commandDeclaration: Option<&NSDictionary>, - ) -> Option> { - msg_send_id![ - self, - initWithSuiteName: suiteName, - commandName: commandName, - dictionary: commandDeclaration - ] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn suiteName(&self) -> Id { - msg_send_id![self, suiteName] - } - pub unsafe fn commandName(&self) -> Id { - msg_send_id![self, commandName] - } - pub unsafe fn appleEventClassCode(&self) -> FourCharCode { - msg_send![self, appleEventClassCode] - } - pub unsafe fn appleEventCode(&self) -> FourCharCode { - msg_send![self, appleEventCode] - } - pub unsafe fn commandClassName(&self) -> Id { - msg_send_id![self, commandClassName] - } - pub unsafe fn returnType(&self) -> Option> { - msg_send_id![self, returnType] - } - pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode { - msg_send![self, appleEventCodeForReturnType] - } - pub unsafe fn argumentNames(&self) -> Id, Shared> { - msg_send_id![self, argumentNames] - } + ) -> Option>; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(suiteName)] + pub unsafe fn suiteName(&self) -> Id; + #[method_id(commandName)] + pub unsafe fn commandName(&self) -> Id; + #[method(appleEventClassCode)] + pub unsafe fn appleEventClassCode(&self) -> FourCharCode; + #[method(appleEventCode)] + pub unsafe fn appleEventCode(&self) -> FourCharCode; + #[method_id(commandClassName)] + pub unsafe fn commandClassName(&self) -> Id; + #[method_id(returnType)] + pub unsafe fn returnType(&self) -> Option>; + #[method(appleEventCodeForReturnType)] + pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode; + #[method_id(argumentNames)] + pub unsafe fn argumentNames(&self) -> Id, Shared>; + # [method_id (typeForArgumentWithName :)] pub unsafe fn typeForArgumentWithName( &self, argumentName: &NSString, - ) -> Option> { - msg_send_id![self, typeForArgumentWithName: argumentName] - } + ) -> Option>; + # [method (appleEventCodeForArgumentWithName :)] pub unsafe fn appleEventCodeForArgumentWithName( &self, argumentName: &NSString, - ) -> FourCharCode { - msg_send![self, appleEventCodeForArgumentWithName: argumentName] - } - pub unsafe fn isOptionalArgumentWithName(&self, argumentName: &NSString) -> bool { - msg_send![self, isOptionalArgumentWithName: argumentName] - } - pub unsafe fn createCommandInstance(&self) -> Id { - msg_send_id![self, createCommandInstance] - } + ) -> FourCharCode; + # [method (isOptionalArgumentWithName :)] + pub unsafe fn isOptionalArgumentWithName(&self, argumentName: &NSString) -> bool; + #[method_id(createCommandInstance)] + pub unsafe fn createCommandInstance(&self) -> Id; + # [method_id (createCommandInstanceWithZone :)] pub unsafe fn createCommandInstanceWithZone( &self, zone: *mut NSZone, - ) -> Id { - msg_send_id![self, createCommandInstanceWithZone: zone] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index 2ecb01b1e..aea8a81a3 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptExecutionContext; @@ -13,26 +13,19 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptExecutionContext { - pub unsafe fn sharedScriptExecutionContext() -> Id { - msg_send_id![Self::class(), sharedScriptExecutionContext] - } - pub unsafe fn topLevelObject(&self) -> Option> { - msg_send_id![self, topLevelObject] - } - pub unsafe fn setTopLevelObject(&self, topLevelObject: Option<&Object>) { - msg_send![self, setTopLevelObject: topLevelObject] - } - pub unsafe fn objectBeingTested(&self) -> Option> { - msg_send_id![self, objectBeingTested] - } - pub unsafe fn setObjectBeingTested(&self, objectBeingTested: Option<&Object>) { - msg_send![self, setObjectBeingTested: objectBeingTested] - } - pub unsafe fn rangeContainerObject(&self) -> Option> { - msg_send_id![self, rangeContainerObject] - } - pub unsafe fn setRangeContainerObject(&self, rangeContainerObject: Option<&Object>) { - msg_send![self, setRangeContainerObject: rangeContainerObject] - } + #[method_id(sharedScriptExecutionContext)] + pub unsafe fn sharedScriptExecutionContext() -> Id; + #[method_id(topLevelObject)] + pub unsafe fn topLevelObject(&self) -> Option>; + # [method (setTopLevelObject :)] + pub unsafe fn setTopLevelObject(&self, topLevelObject: Option<&Object>); + #[method_id(objectBeingTested)] + pub unsafe fn objectBeingTested(&self) -> Option>; + # [method (setObjectBeingTested :)] + pub unsafe fn setObjectBeingTested(&self, objectBeingTested: Option<&Object>); + #[method_id(rangeContainerObject)] + pub unsafe fn rangeContainerObject(&self) -> Option>; + # [method (setRangeContainerObject :)] + pub unsafe fn setRangeContainerObject(&self, rangeContainerObject: Option<&Object>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index 10229bfea..85ab9427d 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -3,73 +3,55 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_methods!( #[doc = "NSScriptKeyValueCoding"] unsafe impl NSObject { + # [method_id (valueAtIndex : inPropertyWithKey :)] pub unsafe fn valueAtIndex_inPropertyWithKey( &self, index: NSUInteger, key: &NSString, - ) -> Option> { - msg_send_id![self, valueAtIndex: index, inPropertyWithKey: key] - } + ) -> Option>; + # [method_id (valueWithName : inPropertyWithKey :)] pub unsafe fn valueWithName_inPropertyWithKey( &self, name: &NSString, key: &NSString, - ) -> Option> { - msg_send_id![self, valueWithName: name, inPropertyWithKey: key] - } + ) -> Option>; + # [method_id (valueWithUniqueID : inPropertyWithKey :)] pub unsafe fn valueWithUniqueID_inPropertyWithKey( &self, uniqueID: &Object, key: &NSString, - ) -> Option> { - msg_send_id![self, valueWithUniqueID: uniqueID, inPropertyWithKey: key] - } + ) -> Option>; + # [method (insertValue : atIndex : inPropertyWithKey :)] pub unsafe fn insertValue_atIndex_inPropertyWithKey( &self, value: &Object, index: NSUInteger, key: &NSString, - ) { - msg_send![ - self, - insertValue: value, - atIndex: index, - inPropertyWithKey: key - ] - } + ); + # [method (removeValueAtIndex : fromPropertyWithKey :)] pub unsafe fn removeValueAtIndex_fromPropertyWithKey( &self, index: NSUInteger, key: &NSString, - ) { - msg_send![self, removeValueAtIndex: index, fromPropertyWithKey: key] - } + ); + # [method (replaceValueAtIndex : inPropertyWithKey : withValue :)] pub unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue( &self, index: NSUInteger, key: &NSString, value: &Object, - ) { - msg_send![ - self, - replaceValueAtIndex: index, - inPropertyWithKey: key, - withValue: value - ] - } - pub unsafe fn insertValue_inPropertyWithKey(&self, value: &Object, key: &NSString) { - msg_send![self, insertValue: value, inPropertyWithKey: key] - } + ); + # [method (insertValue : inPropertyWithKey :)] + pub unsafe fn insertValue_inPropertyWithKey(&self, value: &Object, key: &NSString); + # [method_id (coerceValue : forKey :)] pub unsafe fn coerceValue_forKey( &self, value: Option<&Object>, key: &NSString, - ) -> Option> { - msg_send_id![self, coerceValue: value, forKey: key] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index 96515f761..5429540e1 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -8,7 +8,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptObjectSpecifier; @@ -18,141 +18,97 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptObjectSpecifier { + # [method_id (objectSpecifierWithDescriptor :)] pub unsafe fn objectSpecifierWithDescriptor( descriptor: &NSAppleEventDescriptor, - ) -> Option> { - msg_send_id![Self::class(), objectSpecifierWithDescriptor: descriptor] - } + ) -> Option>; + # [method_id (initWithContainerSpecifier : key :)] pub unsafe fn initWithContainerSpecifier_key( &self, container: &NSScriptObjectSpecifier, property: &NSString, - ) -> Id { - msg_send_id![self, initWithContainerSpecifier: container, key: property] - } + ) -> Id; + # [method_id (initWithContainerClassDescription : containerSpecifier : key :)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key( &self, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property - ] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } - pub unsafe fn childSpecifier(&self) -> Option> { - msg_send_id![self, childSpecifier] - } - pub unsafe fn setChildSpecifier(&self, childSpecifier: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setChildSpecifier: childSpecifier] - } - pub unsafe fn containerSpecifier(&self) -> Option> { - msg_send_id![self, containerSpecifier] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(childSpecifier)] + pub unsafe fn childSpecifier(&self) -> Option>; + # [method (setChildSpecifier :)] + pub unsafe fn setChildSpecifier(&self, childSpecifier: Option<&NSScriptObjectSpecifier>); + #[method_id(containerSpecifier)] + pub unsafe fn containerSpecifier(&self) -> Option>; + # [method (setContainerSpecifier :)] pub unsafe fn setContainerSpecifier( &self, containerSpecifier: Option<&NSScriptObjectSpecifier>, - ) { - msg_send![self, setContainerSpecifier: containerSpecifier] - } - pub unsafe fn containerIsObjectBeingTested(&self) -> bool { - msg_send![self, containerIsObjectBeingTested] - } - pub unsafe fn setContainerIsObjectBeingTested(&self, containerIsObjectBeingTested: bool) { - msg_send![ - self, - setContainerIsObjectBeingTested: containerIsObjectBeingTested - ] - } - pub unsafe fn containerIsRangeContainerObject(&self) -> bool { - msg_send![self, containerIsRangeContainerObject] - } + ); + #[method(containerIsObjectBeingTested)] + pub unsafe fn containerIsObjectBeingTested(&self) -> bool; + # [method (setContainerIsObjectBeingTested :)] + pub unsafe fn setContainerIsObjectBeingTested(&self, containerIsObjectBeingTested: bool); + #[method(containerIsRangeContainerObject)] + pub unsafe fn containerIsRangeContainerObject(&self) -> bool; + # [method (setContainerIsRangeContainerObject :)] pub unsafe fn setContainerIsRangeContainerObject( &self, containerIsRangeContainerObject: bool, - ) { - msg_send![ - self, - setContainerIsRangeContainerObject: containerIsRangeContainerObject - ] - } - pub unsafe fn key(&self) -> Id { - msg_send_id![self, key] - } - pub unsafe fn setKey(&self, key: &NSString) { - msg_send![self, setKey: key] - } + ); + #[method_id(key)] + pub unsafe fn key(&self) -> Id; + # [method (setKey :)] + pub unsafe fn setKey(&self, key: &NSString); + #[method_id(containerClassDescription)] pub unsafe fn containerClassDescription( &self, - ) -> Option> { - msg_send_id![self, containerClassDescription] - } + ) -> Option>; + # [method (setContainerClassDescription :)] pub unsafe fn setContainerClassDescription( &self, containerClassDescription: Option<&NSScriptClassDescription>, - ) { - msg_send![ - self, - setContainerClassDescription: containerClassDescription - ] - } - pub unsafe fn keyClassDescription(&self) -> Option> { - msg_send_id![self, keyClassDescription] - } + ); + #[method_id(keyClassDescription)] + pub unsafe fn keyClassDescription(&self) -> Option>; + # [method (indicesOfObjectsByEvaluatingWithContainer : count :)] pub unsafe fn indicesOfObjectsByEvaluatingWithContainer_count( &self, container: &Object, count: NonNull, - ) -> *mut NSInteger { - msg_send![ - self, - indicesOfObjectsByEvaluatingWithContainer: container, - count: count - ] - } + ) -> *mut NSInteger; + # [method_id (objectsByEvaluatingWithContainers :)] pub unsafe fn objectsByEvaluatingWithContainers( &self, containers: &Object, - ) -> Option> { - msg_send_id![self, objectsByEvaluatingWithContainers: containers] - } - pub unsafe fn objectsByEvaluatingSpecifier(&self) -> Option> { - msg_send_id![self, objectsByEvaluatingSpecifier] - } - pub unsafe fn evaluationErrorNumber(&self) -> NSInteger { - msg_send![self, evaluationErrorNumber] - } - pub unsafe fn setEvaluationErrorNumber(&self, evaluationErrorNumber: NSInteger) { - msg_send![self, setEvaluationErrorNumber: evaluationErrorNumber] - } + ) -> Option>; + #[method_id(objectsByEvaluatingSpecifier)] + pub unsafe fn objectsByEvaluatingSpecifier(&self) -> Option>; + #[method(evaluationErrorNumber)] + pub unsafe fn evaluationErrorNumber(&self) -> NSInteger; + # [method (setEvaluationErrorNumber :)] + pub unsafe fn setEvaluationErrorNumber(&self, evaluationErrorNumber: NSInteger); + #[method_id(evaluationErrorSpecifier)] pub unsafe fn evaluationErrorSpecifier( &self, - ) -> Option> { - msg_send_id![self, evaluationErrorSpecifier] - } - pub unsafe fn descriptor(&self) -> Option> { - msg_send_id![self, descriptor] - } + ) -> Option>; + #[method_id(descriptor)] + pub unsafe fn descriptor(&self) -> Option>; } ); extern_methods!( #[doc = "NSScriptObjectSpecifiers"] unsafe impl NSObject { - pub unsafe fn objectSpecifier(&self) -> Option> { - msg_send_id![self, objectSpecifier] - } + #[method_id(objectSpecifier)] + pub unsafe fn objectSpecifier(&self) -> Option>; + # [method_id (indicesOfObjectsByEvaluatingObjectSpecifier :)] pub unsafe fn indicesOfObjectsByEvaluatingObjectSpecifier( &self, specifier: &NSScriptObjectSpecifier, - ) -> Option, Shared>> { - msg_send_id![self, indicesOfObjectsByEvaluatingObjectSpecifier: specifier] - } + ) -> Option, Shared>>; } ); extern_class!( @@ -164,27 +120,18 @@ extern_class!( ); extern_methods!( unsafe impl NSIndexSpecifier { + # [method_id (initWithContainerClassDescription : containerSpecifier : key : index :)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_index( &self, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, index: NSInteger, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - index: index - ] - } - pub unsafe fn index(&self) -> NSInteger { - msg_send![self, index] - } - pub unsafe fn setIndex(&self, index: NSInteger) { - msg_send![self, setIndex: index] - } + ) -> Id; + #[method(index)] + pub unsafe fn index(&self) -> NSInteger; + # [method (setIndex :)] + pub unsafe fn setIndex(&self, index: NSInteger); } ); extern_class!( @@ -206,30 +153,20 @@ extern_class!( ); extern_methods!( unsafe impl NSNameSpecifier { - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + # [method_id (initWithContainerClassDescription : containerSpecifier : key : name :)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_name( &self, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, name: &NSString, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - name: name - ] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: &NSString) { - msg_send![self, setName: name] - } + ) -> Id; + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + # [method (setName :)] + pub unsafe fn setName(&self, name: &NSString); } ); extern_class!( @@ -241,40 +178,31 @@ extern_class!( ); extern_methods!( unsafe impl NSPositionalSpecifier { + # [method_id (initWithPosition : objectSpecifier :)] pub unsafe fn initWithPosition_objectSpecifier( &self, position: NSInsertionPosition, specifier: &NSScriptObjectSpecifier, - ) -> Id { - msg_send_id![self, initWithPosition: position, objectSpecifier: specifier] - } - pub unsafe fn position(&self) -> NSInsertionPosition { - msg_send![self, position] - } - pub unsafe fn objectSpecifier(&self) -> Id { - msg_send_id![self, objectSpecifier] - } + ) -> Id; + #[method(position)] + pub unsafe fn position(&self) -> NSInsertionPosition; + #[method_id(objectSpecifier)] + pub unsafe fn objectSpecifier(&self) -> Id; + # [method (setInsertionClassDescription :)] pub unsafe fn setInsertionClassDescription( &self, classDescription: &NSScriptClassDescription, - ) { - msg_send![self, setInsertionClassDescription: classDescription] - } - pub unsafe fn evaluate(&self) { - msg_send![self, evaluate] - } - pub unsafe fn insertionContainer(&self) -> Option> { - msg_send_id![self, insertionContainer] - } - pub unsafe fn insertionKey(&self) -> Option> { - msg_send_id![self, insertionKey] - } - pub unsafe fn insertionIndex(&self) -> NSInteger { - msg_send![self, insertionIndex] - } - pub unsafe fn insertionReplaces(&self) -> bool { - msg_send![self, insertionReplaces] - } + ); + #[method(evaluate)] + pub unsafe fn evaluate(&self); + #[method_id(insertionContainer)] + pub unsafe fn insertionContainer(&self) -> Option>; + #[method_id(insertionKey)] + pub unsafe fn insertionKey(&self) -> Option>; + #[method(insertionIndex)] + pub unsafe fn insertionIndex(&self) -> NSInteger; + #[method(insertionReplaces)] + pub unsafe fn insertionReplaces(&self) -> bool; } ); extern_class!( @@ -306,9 +234,9 @@ extern_class!( ); extern_methods!( unsafe impl NSRangeSpecifier { - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + # [method_id (initWithContainerClassDescription : containerSpecifier : key : startSpecifier : endSpecifier :)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_startSpecifier_endSpecifier( &self, classDesc: &NSScriptClassDescription, @@ -316,28 +244,15 @@ extern_methods!( property: &NSString, startSpec: Option<&NSScriptObjectSpecifier>, endSpec: Option<&NSScriptObjectSpecifier>, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - startSpecifier: startSpec, - endSpecifier: endSpec - ] - } - pub unsafe fn startSpecifier(&self) -> Option> { - msg_send_id![self, startSpecifier] - } - pub unsafe fn setStartSpecifier(&self, startSpecifier: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setStartSpecifier: startSpecifier] - } - pub unsafe fn endSpecifier(&self) -> Option> { - msg_send_id![self, endSpecifier] - } - pub unsafe fn setEndSpecifier(&self, endSpecifier: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setEndSpecifier: endSpecifier] - } + ) -> Id; + #[method_id(startSpecifier)] + pub unsafe fn startSpecifier(&self) -> Option>; + # [method (setStartSpecifier :)] + pub unsafe fn setStartSpecifier(&self, startSpecifier: Option<&NSScriptObjectSpecifier>); + #[method_id(endSpecifier)] + pub unsafe fn endSpecifier(&self) -> Option>; + # [method (setEndSpecifier :)] + pub unsafe fn setEndSpecifier(&self, endSpecifier: Option<&NSScriptObjectSpecifier>); } ); extern_class!( @@ -349,9 +264,9 @@ extern_class!( ); extern_methods!( unsafe impl NSRelativeSpecifier { - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + # [method_id (initWithContainerClassDescription : containerSpecifier : key : relativePosition : baseSpecifier :)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_relativePosition_baseSpecifier( &self, classDesc: &NSScriptClassDescription, @@ -359,28 +274,15 @@ extern_methods!( property: &NSString, relPos: NSRelativePosition, baseSpecifier: Option<&NSScriptObjectSpecifier>, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - relativePosition: relPos, - baseSpecifier: baseSpecifier - ] - } - pub unsafe fn relativePosition(&self) -> NSRelativePosition { - msg_send![self, relativePosition] - } - pub unsafe fn setRelativePosition(&self, relativePosition: NSRelativePosition) { - msg_send![self, setRelativePosition: relativePosition] - } - pub unsafe fn baseSpecifier(&self) -> Option> { - msg_send_id![self, baseSpecifier] - } - pub unsafe fn setBaseSpecifier(&self, baseSpecifier: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setBaseSpecifier: baseSpecifier] - } + ) -> Id; + #[method(relativePosition)] + pub unsafe fn relativePosition(&self) -> NSRelativePosition; + # [method (setRelativePosition :)] + pub unsafe fn setRelativePosition(&self, relativePosition: NSRelativePosition); + #[method_id(baseSpecifier)] + pub unsafe fn baseSpecifier(&self) -> Option>; + # [method (setBaseSpecifier :)] + pub unsafe fn setBaseSpecifier(&self, baseSpecifier: Option<&NSScriptObjectSpecifier>); } ); extern_class!( @@ -392,30 +294,20 @@ extern_class!( ); extern_methods!( unsafe impl NSUniqueIDSpecifier { - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + # [method_id (initWithContainerClassDescription : containerSpecifier : key : uniqueID :)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_uniqueID( &self, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, uniqueID: &Object, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - uniqueID: uniqueID - ] - } - pub unsafe fn uniqueID(&self) -> Id { - msg_send_id![self, uniqueID] - } - pub unsafe fn setUniqueID(&self, uniqueID: &Object) { - msg_send![self, setUniqueID: uniqueID] - } + ) -> Id; + #[method_id(uniqueID)] + pub unsafe fn uniqueID(&self) -> Id; + # [method (setUniqueID :)] + pub unsafe fn setUniqueID(&self, uniqueID: &Object); } ); extern_class!( @@ -427,62 +319,41 @@ extern_class!( ); extern_methods!( unsafe impl NSWhoseSpecifier { - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + # [method_id (initWithContainerClassDescription : containerSpecifier : key : test :)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_test( &self, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, test: &NSScriptWhoseTest, - ) -> Id { - msg_send_id![ - self, - initWithContainerClassDescription: classDesc, - containerSpecifier: container, - key: property, - test: test - ] - } - pub unsafe fn test(&self) -> Id { - msg_send_id![self, test] - } - pub unsafe fn setTest(&self, test: &NSScriptWhoseTest) { - msg_send![self, setTest: test] - } - pub unsafe fn startSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier { - msg_send![self, startSubelementIdentifier] - } + ) -> Id; + #[method_id(test)] + pub unsafe fn test(&self) -> Id; + # [method (setTest :)] + pub unsafe fn setTest(&self, test: &NSScriptWhoseTest); + #[method(startSubelementIdentifier)] + pub unsafe fn startSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier; + # [method (setStartSubelementIdentifier :)] pub unsafe fn setStartSubelementIdentifier( &self, startSubelementIdentifier: NSWhoseSubelementIdentifier, - ) { - msg_send![ - self, - setStartSubelementIdentifier: startSubelementIdentifier - ] - } - pub unsafe fn startSubelementIndex(&self) -> NSInteger { - msg_send![self, startSubelementIndex] - } - pub unsafe fn setStartSubelementIndex(&self, startSubelementIndex: NSInteger) { - msg_send![self, setStartSubelementIndex: startSubelementIndex] - } - pub unsafe fn endSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier { - msg_send![self, endSubelementIdentifier] - } + ); + #[method(startSubelementIndex)] + pub unsafe fn startSubelementIndex(&self) -> NSInteger; + # [method (setStartSubelementIndex :)] + pub unsafe fn setStartSubelementIndex(&self, startSubelementIndex: NSInteger); + #[method(endSubelementIdentifier)] + pub unsafe fn endSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier; + # [method (setEndSubelementIdentifier :)] pub unsafe fn setEndSubelementIdentifier( &self, endSubelementIdentifier: NSWhoseSubelementIdentifier, - ) { - msg_send![self, setEndSubelementIdentifier: endSubelementIdentifier] - } - pub unsafe fn endSubelementIndex(&self) -> NSInteger { - msg_send![self, endSubelementIndex] - } - pub unsafe fn setEndSubelementIndex(&self, endSubelementIndex: NSInteger) { - msg_send![self, setEndSubelementIndex: endSubelementIndex] - } + ); + #[method(endSubelementIndex)] + pub unsafe fn endSubelementIndex(&self) -> NSInteger; + # [method (setEndSubelementIndex :)] + pub unsafe fn setEndSubelementIndex(&self, endSubelementIndex: NSInteger); } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index 383dd84c6..f2af3ca09 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSScriptCommand::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCloneCommand; @@ -16,12 +16,10 @@ extern_class!( ); extern_methods!( unsafe impl NSCloneCommand { - pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setReceiversSpecifier: receiversRef] - } - pub unsafe fn keySpecifier(&self) -> Id { - msg_send_id![self, keySpecifier] - } + # [method (setReceiversSpecifier :)] + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); + #[method_id(keySpecifier)] + pub unsafe fn keySpecifier(&self) -> Id; } ); extern_class!( @@ -33,9 +31,8 @@ extern_class!( ); extern_methods!( unsafe impl NSCloseCommand { - pub unsafe fn saveOptions(&self) -> NSSaveOptions { - msg_send![self, saveOptions] - } + #[method(saveOptions)] + pub unsafe fn saveOptions(&self) -> NSSaveOptions; } ); extern_class!( @@ -57,12 +54,10 @@ extern_class!( ); extern_methods!( unsafe impl NSCreateCommand { - pub unsafe fn createClassDescription(&self) -> Id { - msg_send_id![self, createClassDescription] - } - pub unsafe fn resolvedKeyDictionary(&self) -> Id, Shared> { - msg_send_id![self, resolvedKeyDictionary] - } + #[method_id(createClassDescription)] + pub unsafe fn createClassDescription(&self) -> Id; + #[method_id(resolvedKeyDictionary)] + pub unsafe fn resolvedKeyDictionary(&self) -> Id, Shared>; } ); extern_class!( @@ -74,12 +69,10 @@ extern_class!( ); extern_methods!( unsafe impl NSDeleteCommand { - pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setReceiversSpecifier: receiversRef] - } - pub unsafe fn keySpecifier(&self) -> Id { - msg_send_id![self, keySpecifier] - } + # [method (setReceiversSpecifier :)] + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); + #[method_id(keySpecifier)] + pub unsafe fn keySpecifier(&self) -> Id; } ); extern_class!( @@ -111,12 +104,10 @@ extern_class!( ); extern_methods!( unsafe impl NSMoveCommand { - pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setReceiversSpecifier: receiversRef] - } - pub unsafe fn keySpecifier(&self) -> Id { - msg_send_id![self, keySpecifier] - } + # [method (setReceiversSpecifier :)] + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); + #[method_id(keySpecifier)] + pub unsafe fn keySpecifier(&self) -> Id; } ); extern_class!( @@ -128,9 +119,8 @@ extern_class!( ); extern_methods!( unsafe impl NSQuitCommand { - pub unsafe fn saveOptions(&self) -> NSSaveOptions { - msg_send![self, saveOptions] - } + #[method(saveOptions)] + pub unsafe fn saveOptions(&self) -> NSSaveOptions; } ); extern_class!( @@ -142,11 +132,9 @@ extern_class!( ); extern_methods!( unsafe impl NSSetCommand { - pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>) { - msg_send![self, setReceiversSpecifier: receiversRef] - } - pub unsafe fn keySpecifier(&self) -> Id { - msg_send_id![self, keySpecifier] - } + # [method (setReceiversSpecifier :)] + pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); + #[method_id(keySpecifier)] + pub unsafe fn keySpecifier(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 7be399198..4185e790d 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -11,7 +11,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptSuiteRegistry; @@ -21,81 +21,58 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptSuiteRegistry { - pub unsafe fn sharedScriptSuiteRegistry() -> Id { - msg_send_id![Self::class(), sharedScriptSuiteRegistry] - } - pub unsafe fn setSharedScriptSuiteRegistry(registry: &NSScriptSuiteRegistry) { - msg_send![Self::class(), setSharedScriptSuiteRegistry: registry] - } - pub unsafe fn loadSuitesFromBundle(&self, bundle: &NSBundle) { - msg_send![self, loadSuitesFromBundle: bundle] - } + #[method_id(sharedScriptSuiteRegistry)] + pub unsafe fn sharedScriptSuiteRegistry() -> Id; + # [method (setSharedScriptSuiteRegistry :)] + pub unsafe fn setSharedScriptSuiteRegistry(registry: &NSScriptSuiteRegistry); + # [method (loadSuitesFromBundle :)] + pub unsafe fn loadSuitesFromBundle(&self, bundle: &NSBundle); + # [method (loadSuiteWithDictionary : fromBundle :)] pub unsafe fn loadSuiteWithDictionary_fromBundle( &self, suiteDeclaration: &NSDictionary, bundle: &NSBundle, - ) { - msg_send![ - self, - loadSuiteWithDictionary: suiteDeclaration, - fromBundle: bundle - ] - } - pub unsafe fn registerClassDescription(&self, classDescription: &NSScriptClassDescription) { - msg_send![self, registerClassDescription: classDescription] - } + ); + # [method (registerClassDescription :)] + pub unsafe fn registerClassDescription(&self, classDescription: &NSScriptClassDescription); + # [method (registerCommandDescription :)] pub unsafe fn registerCommandDescription( &self, commandDescription: &NSScriptCommandDescription, - ) { - msg_send![self, registerCommandDescription: commandDescription] - } - pub unsafe fn suiteNames(&self) -> Id, Shared> { - msg_send_id![self, suiteNames] - } - pub unsafe fn appleEventCodeForSuite(&self, suiteName: &NSString) -> FourCharCode { - msg_send![self, appleEventCodeForSuite: suiteName] - } - pub unsafe fn bundleForSuite(&self, suiteName: &NSString) -> Option> { - msg_send_id![self, bundleForSuite: suiteName] - } + ); + #[method_id(suiteNames)] + pub unsafe fn suiteNames(&self) -> Id, Shared>; + # [method (appleEventCodeForSuite :)] + pub unsafe fn appleEventCodeForSuite(&self, suiteName: &NSString) -> FourCharCode; + # [method_id (bundleForSuite :)] + pub unsafe fn bundleForSuite(&self, suiteName: &NSString) -> Option>; + # [method_id (classDescriptionsInSuite :)] pub unsafe fn classDescriptionsInSuite( &self, suiteName: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, classDescriptionsInSuite: suiteName] - } + ) -> Option, Shared>>; + # [method_id (commandDescriptionsInSuite :)] pub unsafe fn commandDescriptionsInSuite( &self, suiteName: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, commandDescriptionsInSuite: suiteName] - } + ) -> Option, Shared>>; + # [method_id (suiteForAppleEventCode :)] pub unsafe fn suiteForAppleEventCode( &self, appleEventCode: FourCharCode, - ) -> Option> { - msg_send_id![self, suiteForAppleEventCode: appleEventCode] - } + ) -> Option>; + # [method_id (classDescriptionWithAppleEventCode :)] pub unsafe fn classDescriptionWithAppleEventCode( &self, appleEventCode: FourCharCode, - ) -> Option> { - msg_send_id![self, classDescriptionWithAppleEventCode: appleEventCode] - } + ) -> Option>; + # [method_id (commandDescriptionWithAppleEventClass : andAppleEventCode :)] pub unsafe fn commandDescriptionWithAppleEventClass_andAppleEventCode( &self, appleEventClassCode: FourCharCode, appleEventIDCode: FourCharCode, - ) -> Option> { - msg_send_id![ - self, - commandDescriptionWithAppleEventClass: appleEventClassCode, - andAppleEventCode: appleEventIDCode - ] - } - pub unsafe fn aeteResource(&self, languageName: &NSString) -> Option> { - msg_send_id![self, aeteResource: languageName] - } + ) -> Option>; + # [method_id (aeteResource :)] + pub unsafe fn aeteResource(&self, languageName: &NSString) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index c99a907cb..fe3a58358 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -5,7 +5,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSScriptWhoseTest; @@ -15,15 +15,12 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptWhoseTest { - pub unsafe fn isTrue(&self) -> bool { - msg_send![self, isTrue] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } + #[method(isTrue)] + pub unsafe fn isTrue(&self) -> bool; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; } ); extern_class!( @@ -35,21 +32,18 @@ extern_class!( ); extern_methods!( unsafe impl NSLogicalTest { + # [method_id (initAndTestWithTests :)] pub unsafe fn initAndTestWithTests( &self, subTests: &NSArray, - ) -> Id { - msg_send_id![self, initAndTestWithTests: subTests] - } + ) -> Id; + # [method_id (initOrTestWithTests :)] pub unsafe fn initOrTestWithTests( &self, subTests: &NSArray, - ) -> Id { - msg_send_id![self, initOrTestWithTests: subTests] - } - pub unsafe fn initNotTestWithTest(&self, subTest: &NSScriptWhoseTest) -> Id { - msg_send_id![self, initNotTestWithTest: subTest] - } + ) -> Id; + # [method_id (initNotTestWithTest :)] + pub unsafe fn initNotTestWithTest(&self, subTest: &NSScriptWhoseTest) -> Id; } ); extern_class!( @@ -61,85 +55,60 @@ extern_class!( ); extern_methods!( unsafe impl NSSpecifierTest { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: inCoder] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + # [method_id (initWithObjectSpecifier : comparisonOperator : testObject :)] pub unsafe fn initWithObjectSpecifier_comparisonOperator_testObject( &self, obj1: Option<&NSScriptObjectSpecifier>, compOp: NSTestComparisonOperation, obj2: Option<&Object>, - ) -> Id { - msg_send_id![ - self, - initWithObjectSpecifier: obj1, - comparisonOperator: compOp, - testObject: obj2 - ] - } + ) -> Id; } ); extern_methods!( #[doc = "NSComparisonMethods"] unsafe impl NSObject { - pub unsafe fn isEqualTo(&self, object: Option<&Object>) -> bool { - msg_send![self, isEqualTo: object] - } - pub unsafe fn isLessThanOrEqualTo(&self, object: Option<&Object>) -> bool { - msg_send![self, isLessThanOrEqualTo: object] - } - pub unsafe fn isLessThan(&self, object: Option<&Object>) -> bool { - msg_send![self, isLessThan: object] - } - pub unsafe fn isGreaterThanOrEqualTo(&self, object: Option<&Object>) -> bool { - msg_send![self, isGreaterThanOrEqualTo: object] - } - pub unsafe fn isGreaterThan(&self, object: Option<&Object>) -> bool { - msg_send![self, isGreaterThan: object] - } - pub unsafe fn isNotEqualTo(&self, object: Option<&Object>) -> bool { - msg_send![self, isNotEqualTo: object] - } - pub unsafe fn doesContain(&self, object: &Object) -> bool { - msg_send![self, doesContain: object] - } - pub unsafe fn isLike(&self, object: &NSString) -> bool { - msg_send![self, isLike: object] - } - pub unsafe fn isCaseInsensitiveLike(&self, object: &NSString) -> bool { - msg_send![self, isCaseInsensitiveLike: object] - } + # [method (isEqualTo :)] + pub unsafe fn isEqualTo(&self, object: Option<&Object>) -> bool; + # [method (isLessThanOrEqualTo :)] + pub unsafe fn isLessThanOrEqualTo(&self, object: Option<&Object>) -> bool; + # [method (isLessThan :)] + pub unsafe fn isLessThan(&self, object: Option<&Object>) -> bool; + # [method (isGreaterThanOrEqualTo :)] + pub unsafe fn isGreaterThanOrEqualTo(&self, object: Option<&Object>) -> bool; + # [method (isGreaterThan :)] + pub unsafe fn isGreaterThan(&self, object: Option<&Object>) -> bool; + # [method (isNotEqualTo :)] + pub unsafe fn isNotEqualTo(&self, object: Option<&Object>) -> bool; + # [method (doesContain :)] + pub unsafe fn doesContain(&self, object: &Object) -> bool; + # [method (isLike :)] + pub unsafe fn isLike(&self, object: &NSString) -> bool; + # [method (isCaseInsensitiveLike :)] + pub unsafe fn isCaseInsensitiveLike(&self, object: &NSString) -> bool; } ); extern_methods!( #[doc = "NSScriptingComparisonMethods"] unsafe impl NSObject { - pub unsafe fn scriptingIsEqualTo(&self, object: &Object) -> bool { - msg_send![self, scriptingIsEqualTo: object] - } - pub unsafe fn scriptingIsLessThanOrEqualTo(&self, object: &Object) -> bool { - msg_send![self, scriptingIsLessThanOrEqualTo: object] - } - pub unsafe fn scriptingIsLessThan(&self, object: &Object) -> bool { - msg_send![self, scriptingIsLessThan: object] - } - pub unsafe fn scriptingIsGreaterThanOrEqualTo(&self, object: &Object) -> bool { - msg_send![self, scriptingIsGreaterThanOrEqualTo: object] - } - pub unsafe fn scriptingIsGreaterThan(&self, object: &Object) -> bool { - msg_send![self, scriptingIsGreaterThan: object] - } - pub unsafe fn scriptingBeginsWith(&self, object: &Object) -> bool { - msg_send![self, scriptingBeginsWith: object] - } - pub unsafe fn scriptingEndsWith(&self, object: &Object) -> bool { - msg_send![self, scriptingEndsWith: object] - } - pub unsafe fn scriptingContains(&self, object: &Object) -> bool { - msg_send![self, scriptingContains: object] - } + # [method (scriptingIsEqualTo :)] + pub unsafe fn scriptingIsEqualTo(&self, object: &Object) -> bool; + # [method (scriptingIsLessThanOrEqualTo :)] + pub unsafe fn scriptingIsLessThanOrEqualTo(&self, object: &Object) -> bool; + # [method (scriptingIsLessThan :)] + pub unsafe fn scriptingIsLessThan(&self, object: &Object) -> bool; + # [method (scriptingIsGreaterThanOrEqualTo :)] + pub unsafe fn scriptingIsGreaterThanOrEqualTo(&self, object: &Object) -> bool; + # [method (scriptingIsGreaterThan :)] + pub unsafe fn scriptingIsGreaterThan(&self, object: &Object) -> bool; + # [method (scriptingBeginsWith :)] + pub unsafe fn scriptingBeginsWith(&self, object: &Object) -> bool; + # [method (scriptingEndsWith :)] + pub unsafe fn scriptingEndsWith(&self, object: &Object) -> bool; + # [method (scriptingContains :)] + pub unsafe fn scriptingContains(&self, object: &Object) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index cd9b80645..2f56d9a68 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSSet; @@ -16,151 +16,112 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSSet { - pub unsafe fn count(&self) -> NSUInteger { - msg_send![self, count] - } - pub unsafe fn member(&self, object: &ObjectType) -> Option> { - msg_send_id![self, member: object] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method(count)] + pub unsafe fn count(&self) -> NSUInteger; + # [method_id (member :)] + pub unsafe fn member(&self, object: &ObjectType) -> Option>; + #[method_id(objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithObjects : count :)] pub unsafe fn initWithObjects_count( &self, objects: TodoArray, cnt: NSUInteger, - ) -> Id { - msg_send_id![self, initWithObjects: objects, count: cnt] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedSet"] unsafe impl NSSet { - pub unsafe fn allObjects(&self) -> Id, Shared> { - msg_send_id![self, allObjects] - } - pub unsafe fn anyObject(&self) -> Option> { - msg_send_id![self, anyObject] - } - pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool { - msg_send![self, containsObject: anObject] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn descriptionWithLocale( - &self, - locale: Option<&Object>, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } - pub unsafe fn intersectsSet(&self, otherSet: &NSSet) -> bool { - msg_send![self, intersectsSet: otherSet] - } - pub unsafe fn isEqualToSet(&self, otherSet: &NSSet) -> bool { - msg_send![self, isEqualToSet: otherSet] - } - pub unsafe fn isSubsetOfSet(&self, otherSet: &NSSet) -> bool { - msg_send![self, isSubsetOfSet: otherSet] - } - pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel) { - msg_send![self, makeObjectsPerformSelector: aSelector] - } + #[method_id(allObjects)] + pub unsafe fn allObjects(&self) -> Id, Shared>; + #[method_id(anyObject)] + pub unsafe fn anyObject(&self) -> Option>; + # [method (containsObject :)] + pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool; + #[method_id(description)] + pub unsafe fn description(&self) -> Id; + # [method_id (descriptionWithLocale :)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; + # [method (intersectsSet :)] + pub unsafe fn intersectsSet(&self, otherSet: &NSSet) -> bool; + # [method (isEqualToSet :)] + pub unsafe fn isEqualToSet(&self, otherSet: &NSSet) -> bool; + # [method (isSubsetOfSet :)] + pub unsafe fn isSubsetOfSet(&self, otherSet: &NSSet) -> bool; + # [method (makeObjectsPerformSelector :)] + pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel); + # [method (makeObjectsPerformSelector : withObject :)] pub unsafe fn makeObjectsPerformSelector_withObject( &self, aSelector: Sel, argument: Option<&Object>, - ) { - msg_send![ - self, - makeObjectsPerformSelector: aSelector, - withObject: argument - ] - } + ); + # [method_id (setByAddingObject :)] pub unsafe fn setByAddingObject( &self, anObject: &ObjectType, - ) -> Id, Shared> { - msg_send_id![self, setByAddingObject: anObject] - } + ) -> Id, Shared>; + # [method_id (setByAddingObjectsFromSet :)] pub unsafe fn setByAddingObjectsFromSet( &self, other: &NSSet, - ) -> Id, Shared> { - msg_send_id![self, setByAddingObjectsFromSet: other] - } + ) -> Id, Shared>; + # [method_id (setByAddingObjectsFromArray :)] pub unsafe fn setByAddingObjectsFromArray( &self, other: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, setByAddingObjectsFromArray: other] - } - pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateObjectsUsingBlock: block] - } + ) -> Id, Shared>; + # [method (enumerateObjectsUsingBlock :)] + pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); + # [method (enumerateObjectsWithOptions : usingBlock :)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, - ) { - msg_send![self, enumerateObjectsWithOptions: opts, usingBlock: block] - } + ); + # [method_id (objectsPassingTest :)] pub unsafe fn objectsPassingTest( &self, predicate: TodoBlock, - ) -> Id, Shared> { - msg_send_id![self, objectsPassingTest: predicate] - } + ) -> Id, Shared>; + # [method_id (objectsWithOptions : passingTest :)] pub unsafe fn objectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, - ) -> Id, Shared> { - msg_send_id![self, objectsWithOptions: opts, passingTest: predicate] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSSetCreation"] unsafe impl NSSet { - pub unsafe fn set() -> Id { - msg_send_id![Self::class(), set] - } - pub unsafe fn setWithObject(object: &ObjectType) -> Id { - msg_send_id![Self::class(), setWithObject: object] - } - pub unsafe fn setWithObjects_count( - objects: TodoArray, - cnt: NSUInteger, - ) -> Id { - msg_send_id![Self::class(), setWithObjects: objects, count: cnt] - } - pub unsafe fn setWithSet(set: &NSSet) -> Id { - msg_send_id![Self::class(), setWithSet: set] - } - pub unsafe fn setWithArray(array: &NSArray) -> Id { - msg_send_id![Self::class(), setWithArray: array] - } - pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { - msg_send_id![self, initWithSet: set] - } + #[method_id(set)] + pub unsafe fn set() -> Id; + # [method_id (setWithObject :)] + pub unsafe fn setWithObject(object: &ObjectType) -> Id; + # [method_id (setWithObjects : count :)] + pub unsafe fn setWithObjects_count(objects: TodoArray, cnt: NSUInteger) + -> Id; + # [method_id (setWithSet :)] + pub unsafe fn setWithSet(set: &NSSet) -> Id; + # [method_id (setWithArray :)] + pub unsafe fn setWithArray(array: &NSArray) -> Id; + # [method_id (initWithSet :)] + pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; + # [method_id (initWithSet : copyItems :)] pub unsafe fn initWithSet_copyItems( &self, set: &NSSet, flag: bool, - ) -> Id { - msg_send_id![self, initWithSet: set, copyItems: flag] - } - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { - msg_send_id![self, initWithArray: array] - } + ) -> Id; + # [method_id (initWithArray :)] + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; } ); __inner_extern_class!( @@ -172,52 +133,40 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMutableSet { - pub unsafe fn addObject(&self, object: &ObjectType) { - msg_send![self, addObject: object] - } - pub unsafe fn removeObject(&self, object: &ObjectType) { - msg_send![self, removeObject: object] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: numItems] - } + # [method (addObject :)] + pub unsafe fn addObject(&self, object: &ObjectType); + # [method (removeObject :)] + pub unsafe fn removeObject(&self, object: &ObjectType); + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithCapacity :)] + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; } ); extern_methods!( #[doc = "NSExtendedMutableSet"] unsafe impl NSMutableSet { - pub unsafe fn addObjectsFromArray(&self, array: &NSArray) { - msg_send![self, addObjectsFromArray: array] - } - pub unsafe fn intersectSet(&self, otherSet: &NSSet) { - msg_send![self, intersectSet: otherSet] - } - pub unsafe fn minusSet(&self, otherSet: &NSSet) { - msg_send![self, minusSet: otherSet] - } - pub unsafe fn removeAllObjects(&self) { - msg_send![self, removeAllObjects] - } - pub unsafe fn unionSet(&self, otherSet: &NSSet) { - msg_send![self, unionSet: otherSet] - } - pub unsafe fn setSet(&self, otherSet: &NSSet) { - msg_send![self, setSet: otherSet] - } + # [method (addObjectsFromArray :)] + pub unsafe fn addObjectsFromArray(&self, array: &NSArray); + # [method (intersectSet :)] + pub unsafe fn intersectSet(&self, otherSet: &NSSet); + # [method (minusSet :)] + pub unsafe fn minusSet(&self, otherSet: &NSSet); + #[method(removeAllObjects)] + pub unsafe fn removeAllObjects(&self); + # [method (unionSet :)] + pub unsafe fn unionSet(&self, otherSet: &NSSet); + # [method (setSet :)] + pub unsafe fn setSet(&self, otherSet: &NSSet); } ); extern_methods!( #[doc = "NSMutableSetCreation"] unsafe impl NSMutableSet { - pub unsafe fn setWithCapacity(numItems: NSUInteger) -> Id { - msg_send_id![Self::class(), setWithCapacity: numItems] - } + # [method_id (setWithCapacity :)] + pub unsafe fn setWithCapacity(numItems: NSUInteger) -> Id; } ); __inner_extern_class!( @@ -229,26 +178,19 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSCountedSet { - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: numItems] - } - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id { - msg_send_id![self, initWithArray: array] - } - pub unsafe fn initWithSet(&self, set: &NSSet) -> Id { - msg_send_id![self, initWithSet: set] - } - pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger { - msg_send![self, countForObject: object] - } - pub unsafe fn objectEnumerator(&self) -> Id, Shared> { - msg_send_id![self, objectEnumerator] - } - pub unsafe fn addObject(&self, object: &ObjectType) { - msg_send![self, addObject: object] - } - pub unsafe fn removeObject(&self, object: &ObjectType) { - msg_send![self, removeObject: object] - } + # [method_id (initWithCapacity :)] + pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + # [method_id (initWithArray :)] + pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; + # [method_id (initWithSet :)] + pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; + # [method (countForObject :)] + pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger; + #[method_id(objectEnumerator)] + pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + # [method (addObject :)] + pub unsafe fn addObject(&self, object: &ObjectType); + # [method (removeObject :)] + pub unsafe fn removeObject(&self, object: &ObjectType); } ); diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index 8b4e5b2c5..8b6bdc95c 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSSortDescriptor; @@ -14,149 +14,106 @@ extern_class!( ); extern_methods!( unsafe impl NSSortDescriptor { + # [method_id (sortDescriptorWithKey : ascending :)] pub unsafe fn sortDescriptorWithKey_ascending( key: Option<&NSString>, ascending: bool, - ) -> Id { - msg_send_id![ - Self::class(), - sortDescriptorWithKey: key, - ascending: ascending - ] - } + ) -> Id; + # [method_id (sortDescriptorWithKey : ascending : selector :)] pub unsafe fn sortDescriptorWithKey_ascending_selector( key: Option<&NSString>, ascending: bool, selector: Option, - ) -> Id { - msg_send_id![ - Self::class(), - sortDescriptorWithKey: key, - ascending: ascending, - selector: selector - ] - } + ) -> Id; + # [method_id (initWithKey : ascending :)] pub unsafe fn initWithKey_ascending( &self, key: Option<&NSString>, ascending: bool, - ) -> Id { - msg_send_id![self, initWithKey: key, ascending: ascending] - } + ) -> Id; + # [method_id (initWithKey : ascending : selector :)] pub unsafe fn initWithKey_ascending_selector( &self, key: Option<&NSString>, ascending: bool, selector: Option, - ) -> Id { - msg_send_id![ - self, - initWithKey: key, - ascending: ascending, - selector: selector - ] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn key(&self) -> Option> { - msg_send_id![self, key] - } - pub unsafe fn ascending(&self) -> bool { - msg_send![self, ascending] - } - pub unsafe fn selector(&self) -> Option { - msg_send![self, selector] - } - pub unsafe fn allowEvaluation(&self) { - msg_send![self, allowEvaluation] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(key)] + pub unsafe fn key(&self) -> Option>; + #[method(ascending)] + pub unsafe fn ascending(&self) -> bool; + #[method(selector)] + pub unsafe fn selector(&self) -> Option; + #[method(allowEvaluation)] + pub unsafe fn allowEvaluation(&self); + # [method_id (sortDescriptorWithKey : ascending : comparator :)] pub unsafe fn sortDescriptorWithKey_ascending_comparator( key: Option<&NSString>, ascending: bool, cmptr: NSComparator, - ) -> Id { - msg_send_id![ - Self::class(), - sortDescriptorWithKey: key, - ascending: ascending, - comparator: cmptr - ] - } + ) -> Id; + # [method_id (initWithKey : ascending : comparator :)] pub unsafe fn initWithKey_ascending_comparator( &self, key: Option<&NSString>, ascending: bool, cmptr: NSComparator, - ) -> Id { - msg_send_id![ - self, - initWithKey: key, - ascending: ascending, - comparator: cmptr - ] - } - pub unsafe fn comparator(&self) -> NSComparator { - msg_send![self, comparator] - } + ) -> Id; + #[method(comparator)] + pub unsafe fn comparator(&self) -> NSComparator; + # [method (compareObject : toObject :)] pub unsafe fn compareObject_toObject( &self, object1: &Object, object2: &Object, - ) -> NSComparisonResult { - msg_send![self, compareObject: object1, toObject: object2] - } - pub unsafe fn reversedSortDescriptor(&self) -> Id { - msg_send_id![self, reversedSortDescriptor] - } + ) -> NSComparisonResult; + #[method_id(reversedSortDescriptor)] + pub unsafe fn reversedSortDescriptor(&self) -> Id; } ); extern_methods!( #[doc = "NSSortDescriptorSorting"] unsafe impl NSSet { + # [method_id (sortedArrayUsingDescriptors :)] pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSSortDescriptorSorting"] unsafe impl NSArray { + # [method_id (sortedArrayUsingDescriptors :)] pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSSortDescriptorSorting"] unsafe impl NSMutableArray { - pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray) { - msg_send![self, sortUsingDescriptors: sortDescriptors] - } + # [method (sortUsingDescriptors :)] + pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray); } ); extern_methods!( #[doc = "NSKeyValueSorting"] unsafe impl NSOrderedSet { + # [method_id (sortedArrayUsingDescriptors :)] pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: &NSArray, - ) -> Id, Shared> { - msg_send_id![self, sortedArrayUsingDescriptors: sortDescriptors] - } + ) -> Id, Shared>; } ); extern_methods!( #[doc = "NSKeyValueSorting"] unsafe impl NSMutableOrderedSet { - pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray) { - msg_send![self, sortUsingDescriptors: sortDescriptors] - } + # [method (sortUsingDescriptors :)] + pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray); } ); diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index a0b879c8c..d168fa3a6 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSTextCheckingResult::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSSpellServer; @@ -17,29 +17,24 @@ extern_class!( ); extern_methods!( unsafe impl NSSpellServer { - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSSpellServerDelegate>) { - msg_send![self, setDelegate: delegate] - } + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSSpellServerDelegate>); + # [method (registerLanguage : byVendor :)] pub unsafe fn registerLanguage_byVendor( &self, language: Option<&NSString>, vendor: Option<&NSString>, - ) -> bool { - msg_send![self, registerLanguage: language, byVendor: vendor] - } + ) -> bool; + # [method (isWordInUserDictionaries : caseSensitive :)] pub unsafe fn isWordInUserDictionaries_caseSensitive( &self, word: &NSString, flag: bool, - ) -> bool { - msg_send![self, isWordInUserDictionaries: word, caseSensitive: flag] - } - pub unsafe fn run(&self) { - msg_send![self, run] - } + ) -> bool; + #[method(run)] + pub unsafe fn run(&self); } ); pub type NSSpellServerDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index d0e53a4c2..07f9dbb92 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSStreamPropertyKey = NSString; extern_class!( #[derive(Debug)] @@ -21,43 +21,33 @@ extern_class!( ); extern_methods!( unsafe impl NSStream { - pub unsafe fn open(&self) { - msg_send![self, open] - } - pub unsafe fn close(&self) { - msg_send![self, close] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>) { - msg_send![self, setDelegate: delegate] - } + #[method(open)] + pub unsafe fn open(&self); + #[method(close)] + pub unsafe fn close(&self); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>); + # [method_id (propertyForKey :)] pub unsafe fn propertyForKey( &self, key: &NSStreamPropertyKey, - ) -> Option> { - msg_send_id![self, propertyForKey: key] - } + ) -> Option>; + # [method (setProperty : forKey :)] pub unsafe fn setProperty_forKey( &self, property: Option<&Object>, key: &NSStreamPropertyKey, - ) -> bool { - msg_send![self, setProperty: property, forKey: key] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, removeFromRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn streamStatus(&self) -> NSStreamStatus { - msg_send![self, streamStatus] - } - pub unsafe fn streamError(&self) -> Option> { - msg_send_id![self, streamError] - } + ) -> bool; + # [method (scheduleInRunLoop : forMode :)] + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + # [method (removeFromRunLoop : forMode :)] + pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(streamStatus)] + pub unsafe fn streamStatus(&self) -> NSStreamStatus; + #[method_id(streamError)] + pub unsafe fn streamError(&self) -> Option>; } ); extern_class!( @@ -69,25 +59,20 @@ extern_class!( ); extern_methods!( unsafe impl NSInputStream { - pub unsafe fn read_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { - msg_send![self, read: buffer, maxLength: len] - } + # [method (read : maxLength :)] + pub unsafe fn read_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger; + # [method (getBuffer : length :)] pub unsafe fn getBuffer_length( &self, buffer: NonNull<*mut u8>, len: NonNull, - ) -> bool { - msg_send![self, getBuffer: buffer, length: len] - } - pub unsafe fn hasBytesAvailable(&self) -> bool { - msg_send![self, hasBytesAvailable] - } - pub unsafe fn initWithData(&self, data: &NSData) -> Id { - msg_send_id![self, initWithData: data] - } - pub unsafe fn initWithURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithURL: url] - } + ) -> bool; + #[method(hasBytesAvailable)] + pub unsafe fn hasBytesAvailable(&self) -> bool; + # [method_id (initWithData :)] + pub unsafe fn initWithData(&self, data: &NSData) -> Id; + # [method_id (initWithURL :)] + pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; } ); extern_class!( @@ -99,141 +84,95 @@ extern_class!( ); extern_methods!( unsafe impl NSOutputStream { - pub unsafe fn write_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger { - msg_send![self, write: buffer, maxLength: len] - } - pub unsafe fn hasSpaceAvailable(&self) -> bool { - msg_send![self, hasSpaceAvailable] - } - pub unsafe fn initToMemory(&self) -> Id { - msg_send_id![self, initToMemory] - } + # [method (write : maxLength :)] + pub unsafe fn write_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger; + #[method(hasSpaceAvailable)] + pub unsafe fn hasSpaceAvailable(&self) -> bool; + #[method_id(initToMemory)] + pub unsafe fn initToMemory(&self) -> Id; + # [method_id (initToBuffer : capacity :)] pub unsafe fn initToBuffer_capacity( &self, buffer: NonNull, capacity: NSUInteger, - ) -> Id { - msg_send_id![self, initToBuffer: buffer, capacity: capacity] - } + ) -> Id; + # [method_id (initWithURL : append :)] pub unsafe fn initWithURL_append( &self, url: &NSURL, shouldAppend: bool, - ) -> Option> { - msg_send_id![self, initWithURL: url, append: shouldAppend] - } + ) -> Option>; } ); extern_methods!( #[doc = "NSSocketStreamCreationExtensions"] unsafe impl NSStream { + # [method (getStreamsToHostWithName : port : inputStream : outputStream :)] pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( hostname: &NSString, port: NSInteger, inputStream: Option<&mut Option>>, outputStream: Option<&mut Option>>, - ) { - msg_send![ - Self::class(), - getStreamsToHostWithName: hostname, - port: port, - inputStream: inputStream, - outputStream: outputStream - ] - } + ); + # [method (getStreamsToHost : port : inputStream : outputStream :)] pub unsafe fn getStreamsToHost_port_inputStream_outputStream( host: &NSHost, port: NSInteger, inputStream: Option<&mut Option>>, outputStream: Option<&mut Option>>, - ) { - msg_send![ - Self::class(), - getStreamsToHost: host, - port: port, - inputStream: inputStream, - outputStream: outputStream - ] - } + ); } ); extern_methods!( #[doc = "NSStreamBoundPairCreationExtensions"] unsafe impl NSStream { + # [method (getBoundStreamsWithBufferSize : inputStream : outputStream :)] pub unsafe fn getBoundStreamsWithBufferSize_inputStream_outputStream( bufferSize: NSUInteger, inputStream: Option<&mut Option>>, outputStream: Option<&mut Option>>, - ) { - msg_send![ - Self::class(), - getBoundStreamsWithBufferSize: bufferSize, - inputStream: inputStream, - outputStream: outputStream - ] - } + ); } ); extern_methods!( #[doc = "NSInputStreamExtensions"] unsafe impl NSInputStream { - pub unsafe fn initWithFileAtPath(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithFileAtPath: path] - } - pub unsafe fn inputStreamWithData(data: &NSData) -> Option> { - msg_send_id![Self::class(), inputStreamWithData: data] - } - pub unsafe fn inputStreamWithFileAtPath(path: &NSString) -> Option> { - msg_send_id![Self::class(), inputStreamWithFileAtPath: path] - } - pub unsafe fn inputStreamWithURL(url: &NSURL) -> Option> { - msg_send_id![Self::class(), inputStreamWithURL: url] - } + # [method_id (initWithFileAtPath :)] + pub unsafe fn initWithFileAtPath(&self, path: &NSString) -> Option>; + # [method_id (inputStreamWithData :)] + pub unsafe fn inputStreamWithData(data: &NSData) -> Option>; + # [method_id (inputStreamWithFileAtPath :)] + pub unsafe fn inputStreamWithFileAtPath(path: &NSString) -> Option>; + # [method_id (inputStreamWithURL :)] + pub unsafe fn inputStreamWithURL(url: &NSURL) -> Option>; } ); extern_methods!( #[doc = "NSOutputStreamExtensions"] unsafe impl NSOutputStream { + # [method_id (initToFileAtPath : append :)] pub unsafe fn initToFileAtPath_append( &self, path: &NSString, shouldAppend: bool, - ) -> Option> { - msg_send_id![self, initToFileAtPath: path, append: shouldAppend] - } - pub unsafe fn outputStreamToMemory() -> Id { - msg_send_id![Self::class(), outputStreamToMemory] - } + ) -> Option>; + #[method_id(outputStreamToMemory)] + pub unsafe fn outputStreamToMemory() -> Id; + # [method_id (outputStreamToBuffer : capacity :)] pub unsafe fn outputStreamToBuffer_capacity( buffer: NonNull, capacity: NSUInteger, - ) -> Id { - msg_send_id![ - Self::class(), - outputStreamToBuffer: buffer, - capacity: capacity - ] - } + ) -> Id; + # [method_id (outputStreamToFileAtPath : append :)] pub unsafe fn outputStreamToFileAtPath_append( path: &NSString, shouldAppend: bool, - ) -> Id { - msg_send_id![ - Self::class(), - outputStreamToFileAtPath: path, - append: shouldAppend - ] - } + ) -> Id; + # [method_id (outputStreamWithURL : append :)] pub unsafe fn outputStreamWithURL_append( url: &NSURL, shouldAppend: bool, - ) -> Option> { - msg_send_id![ - Self::class(), - outputStreamWithURL: url, - append: shouldAppend - ] - } + ) -> Option>; } ); pub type NSStreamDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index c5ff11b2b..0e513d45e 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -11,7 +11,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSStringEncoding = NSUInteger; extern_class!( #[derive(Debug)] @@ -22,338 +22,223 @@ extern_class!( ); extern_methods!( unsafe impl NSString { - pub fn length(&self) -> NSUInteger { - msg_send![self, length] - } - pub unsafe fn characterAtIndex(&self, index: NSUInteger) -> unichar { - msg_send![self, characterAtIndex: index] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + #[method(length)] + pub fn length(&self) -> NSUInteger; + # [method (characterAtIndex :)] + pub unsafe fn characterAtIndex(&self, index: NSUInteger) -> unichar; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); pub type NSStringTransform = NSString; extern_methods!( #[doc = "NSStringExtensionMethods"] unsafe impl NSString { - pub unsafe fn substringFromIndex(&self, from: NSUInteger) -> Id { - msg_send_id![self, substringFromIndex: from] - } - pub unsafe fn substringToIndex(&self, to: NSUInteger) -> Id { - msg_send_id![self, substringToIndex: to] - } - pub unsafe fn substringWithRange(&self, range: NSRange) -> Id { - msg_send_id![self, substringWithRange: range] - } - pub unsafe fn getCharacters_range(&self, buffer: NonNull, range: NSRange) { - msg_send![self, getCharacters: buffer, range: range] - } - pub unsafe fn compare(&self, string: &NSString) -> NSComparisonResult { - msg_send![self, compare: string] - } + # [method_id (substringFromIndex :)] + pub unsafe fn substringFromIndex(&self, from: NSUInteger) -> Id; + # [method_id (substringToIndex :)] + pub unsafe fn substringToIndex(&self, to: NSUInteger) -> Id; + # [method_id (substringWithRange :)] + pub unsafe fn substringWithRange(&self, range: NSRange) -> Id; + # [method (getCharacters : range :)] + pub unsafe fn getCharacters_range(&self, buffer: NonNull, range: NSRange); + # [method (compare :)] + pub unsafe fn compare(&self, string: &NSString) -> NSComparisonResult; + # [method (compare : options :)] pub unsafe fn compare_options( &self, string: &NSString, mask: NSStringCompareOptions, - ) -> NSComparisonResult { - msg_send![self, compare: string, options: mask] - } + ) -> NSComparisonResult; + # [method (compare : options : range :)] pub unsafe fn compare_options_range( &self, string: &NSString, mask: NSStringCompareOptions, rangeOfReceiverToCompare: NSRange, - ) -> NSComparisonResult { - msg_send![ - self, - compare: string, - options: mask, - range: rangeOfReceiverToCompare - ] - } + ) -> NSComparisonResult; + # [method (compare : options : range : locale :)] pub unsafe fn compare_options_range_locale( &self, string: &NSString, mask: NSStringCompareOptions, rangeOfReceiverToCompare: NSRange, locale: Option<&Object>, - ) -> NSComparisonResult { - msg_send![ - self, - compare: string, - options: mask, - range: rangeOfReceiverToCompare, - locale: locale - ] - } - pub unsafe fn caseInsensitiveCompare(&self, string: &NSString) -> NSComparisonResult { - msg_send![self, caseInsensitiveCompare: string] - } - pub unsafe fn localizedCompare(&self, string: &NSString) -> NSComparisonResult { - msg_send![self, localizedCompare: string] - } + ) -> NSComparisonResult; + # [method (caseInsensitiveCompare :)] + pub unsafe fn caseInsensitiveCompare(&self, string: &NSString) -> NSComparisonResult; + # [method (localizedCompare :)] + pub unsafe fn localizedCompare(&self, string: &NSString) -> NSComparisonResult; + # [method (localizedCaseInsensitiveCompare :)] pub unsafe fn localizedCaseInsensitiveCompare( &self, string: &NSString, - ) -> NSComparisonResult { - msg_send![self, localizedCaseInsensitiveCompare: string] - } - pub unsafe fn localizedStandardCompare(&self, string: &NSString) -> NSComparisonResult { - msg_send![self, localizedStandardCompare: string] - } - pub unsafe fn isEqualToString(&self, aString: &NSString) -> bool { - msg_send![self, isEqualToString: aString] - } - pub unsafe fn hasPrefix(&self, str: &NSString) -> bool { - msg_send![self, hasPrefix: str] - } - pub unsafe fn hasSuffix(&self, str: &NSString) -> bool { - msg_send![self, hasSuffix: str] - } + ) -> NSComparisonResult; + # [method (localizedStandardCompare :)] + pub unsafe fn localizedStandardCompare(&self, string: &NSString) -> NSComparisonResult; + # [method (isEqualToString :)] + pub unsafe fn isEqualToString(&self, aString: &NSString) -> bool; + # [method (hasPrefix :)] + pub unsafe fn hasPrefix(&self, str: &NSString) -> bool; + # [method (hasSuffix :)] + pub unsafe fn hasSuffix(&self, str: &NSString) -> bool; + # [method_id (commonPrefixWithString : options :)] pub unsafe fn commonPrefixWithString_options( &self, str: &NSString, mask: NSStringCompareOptions, - ) -> Id { - msg_send_id![self, commonPrefixWithString: str, options: mask] - } - pub unsafe fn containsString(&self, str: &NSString) -> bool { - msg_send![self, containsString: str] - } - pub unsafe fn localizedCaseInsensitiveContainsString(&self, str: &NSString) -> bool { - msg_send![self, localizedCaseInsensitiveContainsString: str] - } - pub unsafe fn localizedStandardContainsString(&self, str: &NSString) -> bool { - msg_send![self, localizedStandardContainsString: str] - } - pub unsafe fn localizedStandardRangeOfString(&self, str: &NSString) -> NSRange { - msg_send![self, localizedStandardRangeOfString: str] - } - pub unsafe fn rangeOfString(&self, searchString: &NSString) -> NSRange { - msg_send![self, rangeOfString: searchString] - } + ) -> Id; + # [method (containsString :)] + pub unsafe fn containsString(&self, str: &NSString) -> bool; + # [method (localizedCaseInsensitiveContainsString :)] + pub unsafe fn localizedCaseInsensitiveContainsString(&self, str: &NSString) -> bool; + # [method (localizedStandardContainsString :)] + pub unsafe fn localizedStandardContainsString(&self, str: &NSString) -> bool; + # [method (localizedStandardRangeOfString :)] + pub unsafe fn localizedStandardRangeOfString(&self, str: &NSString) -> NSRange; + # [method (rangeOfString :)] + pub unsafe fn rangeOfString(&self, searchString: &NSString) -> NSRange; + # [method (rangeOfString : options :)] pub unsafe fn rangeOfString_options( &self, searchString: &NSString, mask: NSStringCompareOptions, - ) -> NSRange { - msg_send![self, rangeOfString: searchString, options: mask] - } + ) -> NSRange; + # [method (rangeOfString : options : range :)] pub unsafe fn rangeOfString_options_range( &self, searchString: &NSString, mask: NSStringCompareOptions, rangeOfReceiverToSearch: NSRange, - ) -> NSRange { - msg_send![ - self, - rangeOfString: searchString, - options: mask, - range: rangeOfReceiverToSearch - ] - } + ) -> NSRange; + # [method (rangeOfString : options : range : locale :)] pub unsafe fn rangeOfString_options_range_locale( &self, searchString: &NSString, mask: NSStringCompareOptions, rangeOfReceiverToSearch: NSRange, locale: Option<&NSLocale>, - ) -> NSRange { - msg_send![ - self, - rangeOfString: searchString, - options: mask, - range: rangeOfReceiverToSearch, - locale: locale - ] - } - pub unsafe fn rangeOfCharacterFromSet(&self, searchSet: &NSCharacterSet) -> NSRange { - msg_send![self, rangeOfCharacterFromSet: searchSet] - } + ) -> NSRange; + # [method (rangeOfCharacterFromSet :)] + pub unsafe fn rangeOfCharacterFromSet(&self, searchSet: &NSCharacterSet) -> NSRange; + # [method (rangeOfCharacterFromSet : options :)] pub unsafe fn rangeOfCharacterFromSet_options( &self, searchSet: &NSCharacterSet, mask: NSStringCompareOptions, - ) -> NSRange { - msg_send![self, rangeOfCharacterFromSet: searchSet, options: mask] - } + ) -> NSRange; + # [method (rangeOfCharacterFromSet : options : range :)] pub unsafe fn rangeOfCharacterFromSet_options_range( &self, searchSet: &NSCharacterSet, mask: NSStringCompareOptions, rangeOfReceiverToSearch: NSRange, - ) -> NSRange { - msg_send![ - self, - rangeOfCharacterFromSet: searchSet, - options: mask, - range: rangeOfReceiverToSearch - ] - } - pub unsafe fn rangeOfComposedCharacterSequenceAtIndex(&self, index: NSUInteger) -> NSRange { - msg_send![self, rangeOfComposedCharacterSequenceAtIndex: index] - } - pub unsafe fn rangeOfComposedCharacterSequencesForRange(&self, range: NSRange) -> NSRange { - msg_send![self, rangeOfComposedCharacterSequencesForRange: range] - } - pub fn stringByAppendingString(&self, aString: &NSString) -> Id { - msg_send_id![self, stringByAppendingString: aString] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } - pub unsafe fn floatValue(&self) -> c_float { - msg_send![self, floatValue] - } - pub unsafe fn intValue(&self) -> c_int { - msg_send![self, intValue] - } - pub unsafe fn integerValue(&self) -> NSInteger { - msg_send![self, integerValue] - } - pub unsafe fn longLongValue(&self) -> c_longlong { - msg_send![self, longLongValue] - } - pub unsafe fn boolValue(&self) -> bool { - msg_send![self, boolValue] - } - pub unsafe fn uppercaseString(&self) -> Id { - msg_send_id![self, uppercaseString] - } - pub unsafe fn lowercaseString(&self) -> Id { - msg_send_id![self, lowercaseString] - } - pub unsafe fn capitalizedString(&self) -> Id { - msg_send_id![self, capitalizedString] - } - pub unsafe fn localizedUppercaseString(&self) -> Id { - msg_send_id![self, localizedUppercaseString] - } - pub unsafe fn localizedLowercaseString(&self) -> Id { - msg_send_id![self, localizedLowercaseString] - } - pub unsafe fn localizedCapitalizedString(&self) -> Id { - msg_send_id![self, localizedCapitalizedString] - } + ) -> NSRange; + # [method (rangeOfComposedCharacterSequenceAtIndex :)] + pub unsafe fn rangeOfComposedCharacterSequenceAtIndex(&self, index: NSUInteger) -> NSRange; + # [method (rangeOfComposedCharacterSequencesForRange :)] + pub unsafe fn rangeOfComposedCharacterSequencesForRange(&self, range: NSRange) -> NSRange; + # [method_id (stringByAppendingString :)] + pub fn stringByAppendingString(&self, aString: &NSString) -> Id; + #[method(doubleValue)] + pub unsafe fn doubleValue(&self) -> c_double; + #[method(floatValue)] + pub unsafe fn floatValue(&self) -> c_float; + #[method(intValue)] + pub unsafe fn intValue(&self) -> c_int; + #[method(integerValue)] + pub unsafe fn integerValue(&self) -> NSInteger; + #[method(longLongValue)] + pub unsafe fn longLongValue(&self) -> c_longlong; + #[method(boolValue)] + pub unsafe fn boolValue(&self) -> bool; + #[method_id(uppercaseString)] + pub unsafe fn uppercaseString(&self) -> Id; + #[method_id(lowercaseString)] + pub unsafe fn lowercaseString(&self) -> Id; + #[method_id(capitalizedString)] + pub unsafe fn capitalizedString(&self) -> Id; + #[method_id(localizedUppercaseString)] + pub unsafe fn localizedUppercaseString(&self) -> Id; + #[method_id(localizedLowercaseString)] + pub unsafe fn localizedLowercaseString(&self) -> Id; + #[method_id(localizedCapitalizedString)] + pub unsafe fn localizedCapitalizedString(&self) -> Id; + # [method_id (uppercaseStringWithLocale :)] pub unsafe fn uppercaseStringWithLocale( &self, locale: Option<&NSLocale>, - ) -> Id { - msg_send_id![self, uppercaseStringWithLocale: locale] - } + ) -> Id; + # [method_id (lowercaseStringWithLocale :)] pub unsafe fn lowercaseStringWithLocale( &self, locale: Option<&NSLocale>, - ) -> Id { - msg_send_id![self, lowercaseStringWithLocale: locale] - } + ) -> Id; + # [method_id (capitalizedStringWithLocale :)] pub unsafe fn capitalizedStringWithLocale( &self, locale: Option<&NSLocale>, - ) -> Id { - msg_send_id![self, capitalizedStringWithLocale: locale] - } + ) -> Id; + # [method (getLineStart : end : contentsEnd : forRange :)] pub unsafe fn getLineStart_end_contentsEnd_forRange( &self, startPtr: *mut NSUInteger, lineEndPtr: *mut NSUInteger, contentsEndPtr: *mut NSUInteger, range: NSRange, - ) { - msg_send![ - self, - getLineStart: startPtr, - end: lineEndPtr, - contentsEnd: contentsEndPtr, - forRange: range - ] - } - pub unsafe fn lineRangeForRange(&self, range: NSRange) -> NSRange { - msg_send![self, lineRangeForRange: range] - } + ); + # [method (lineRangeForRange :)] + pub unsafe fn lineRangeForRange(&self, range: NSRange) -> NSRange; + # [method (getParagraphStart : end : contentsEnd : forRange :)] pub unsafe fn getParagraphStart_end_contentsEnd_forRange( &self, startPtr: *mut NSUInteger, parEndPtr: *mut NSUInteger, contentsEndPtr: *mut NSUInteger, range: NSRange, - ) { - msg_send![ - self, - getParagraphStart: startPtr, - end: parEndPtr, - contentsEnd: contentsEndPtr, - forRange: range - ] - } - pub unsafe fn paragraphRangeForRange(&self, range: NSRange) -> NSRange { - msg_send![self, paragraphRangeForRange: range] - } + ); + # [method (paragraphRangeForRange :)] + pub unsafe fn paragraphRangeForRange(&self, range: NSRange) -> NSRange; + # [method (enumerateSubstringsInRange : options : usingBlock :)] pub unsafe fn enumerateSubstringsInRange_options_usingBlock( &self, range: NSRange, opts: NSStringEnumerationOptions, block: TodoBlock, - ) { - msg_send![ - self, - enumerateSubstringsInRange: range, - options: opts, - usingBlock: block - ] - } - pub unsafe fn enumerateLinesUsingBlock(&self, block: TodoBlock) { - msg_send![self, enumerateLinesUsingBlock: block] - } - pub fn UTF8String(&self) -> *mut c_char { - msg_send![self, UTF8String] - } - pub unsafe fn fastestEncoding(&self) -> NSStringEncoding { - msg_send![self, fastestEncoding] - } - pub unsafe fn smallestEncoding(&self) -> NSStringEncoding { - msg_send![self, smallestEncoding] - } + ); + # [method (enumerateLinesUsingBlock :)] + pub unsafe fn enumerateLinesUsingBlock(&self, block: TodoBlock); + #[method(UTF8String)] + pub fn UTF8String(&self) -> *mut c_char; + #[method(fastestEncoding)] + pub unsafe fn fastestEncoding(&self) -> NSStringEncoding; + #[method(smallestEncoding)] + pub unsafe fn smallestEncoding(&self) -> NSStringEncoding; + # [method_id (dataUsingEncoding : allowLossyConversion :)] pub unsafe fn dataUsingEncoding_allowLossyConversion( &self, encoding: NSStringEncoding, lossy: bool, - ) -> Option> { - msg_send_id![ - self, - dataUsingEncoding: encoding, - allowLossyConversion: lossy - ] - } + ) -> Option>; + # [method_id (dataUsingEncoding :)] pub unsafe fn dataUsingEncoding( &self, encoding: NSStringEncoding, - ) -> Option> { - msg_send_id![self, dataUsingEncoding: encoding] - } - pub unsafe fn canBeConvertedToEncoding(&self, encoding: NSStringEncoding) -> bool { - msg_send![self, canBeConvertedToEncoding: encoding] - } - pub unsafe fn cStringUsingEncoding(&self, encoding: NSStringEncoding) -> *mut c_char { - msg_send![self, cStringUsingEncoding: encoding] - } + ) -> Option>; + # [method (canBeConvertedToEncoding :)] + pub unsafe fn canBeConvertedToEncoding(&self, encoding: NSStringEncoding) -> bool; + # [method (cStringUsingEncoding :)] + pub unsafe fn cStringUsingEncoding(&self, encoding: NSStringEncoding) -> *mut c_char; + # [method (getCString : maxLength : encoding :)] pub unsafe fn getCString_maxLength_encoding( &self, buffer: NonNull, maxBufferCount: NSUInteger, encoding: NSStringEncoding, - ) -> bool { - msg_send![ - self, - getCString: buffer, - maxLength: maxBufferCount, - encoding: encoding - ] - } + ) -> bool; + # [method (getBytes : maxLength : usedLength : encoding : options : range : remainingRange :)] pub unsafe fn getBytes_maxLength_usedLength_encoding_options_range_remainingRange( &self, buffer: *mut c_void, @@ -363,413 +248,250 @@ extern_methods!( options: NSStringEncodingConversionOptions, range: NSRange, leftover: NSRangePointer, - ) -> bool { - msg_send![ - self, - getBytes: buffer, - maxLength: maxBufferCount, - usedLength: usedBufferCount, - encoding: encoding, - options: options, - range: range, - remainingRange: leftover - ] - } - pub unsafe fn maximumLengthOfBytesUsingEncoding( - &self, - enc: NSStringEncoding, - ) -> NSUInteger { - msg_send![self, maximumLengthOfBytesUsingEncoding: enc] - } - pub fn lengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger { - msg_send![self, lengthOfBytesUsingEncoding: enc] - } - pub unsafe fn availableStringEncodings() -> NonNull { - msg_send![Self::class(), availableStringEncodings] - } + ) -> bool; + # [method (maximumLengthOfBytesUsingEncoding :)] + pub unsafe fn maximumLengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) + -> NSUInteger; + # [method (lengthOfBytesUsingEncoding :)] + pub fn lengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger; + #[method(availableStringEncodings)] + pub unsafe fn availableStringEncodings() -> NonNull; + # [method_id (localizedNameOfStringEncoding :)] pub unsafe fn localizedNameOfStringEncoding( encoding: NSStringEncoding, - ) -> Id { - msg_send_id![Self::class(), localizedNameOfStringEncoding: encoding] - } - pub unsafe fn defaultCStringEncoding() -> NSStringEncoding { - msg_send![Self::class(), defaultCStringEncoding] - } - pub unsafe fn decomposedStringWithCanonicalMapping(&self) -> Id { - msg_send_id![self, decomposedStringWithCanonicalMapping] - } - pub unsafe fn precomposedStringWithCanonicalMapping(&self) -> Id { - msg_send_id![self, precomposedStringWithCanonicalMapping] - } - pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id { - msg_send_id![self, decomposedStringWithCompatibilityMapping] - } - pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id { - msg_send_id![self, precomposedStringWithCompatibilityMapping] - } + ) -> Id; + #[method(defaultCStringEncoding)] + pub unsafe fn defaultCStringEncoding() -> NSStringEncoding; + #[method_id(decomposedStringWithCanonicalMapping)] + pub unsafe fn decomposedStringWithCanonicalMapping(&self) -> Id; + #[method_id(precomposedStringWithCanonicalMapping)] + pub unsafe fn precomposedStringWithCanonicalMapping(&self) -> Id; + #[method_id(decomposedStringWithCompatibilityMapping)] + pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id; + #[method_id(precomposedStringWithCompatibilityMapping)] + pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id; + # [method_id (componentsSeparatedByString :)] pub unsafe fn componentsSeparatedByString( &self, separator: &NSString, - ) -> Id, Shared> { - msg_send_id![self, componentsSeparatedByString: separator] - } + ) -> Id, Shared>; + # [method_id (componentsSeparatedByCharactersInSet :)] pub unsafe fn componentsSeparatedByCharactersInSet( &self, separator: &NSCharacterSet, - ) -> Id, Shared> { - msg_send_id![self, componentsSeparatedByCharactersInSet: separator] - } + ) -> Id, Shared>; + # [method_id (stringByTrimmingCharactersInSet :)] pub unsafe fn stringByTrimmingCharactersInSet( &self, set: &NSCharacterSet, - ) -> Id { - msg_send_id![self, stringByTrimmingCharactersInSet: set] - } + ) -> Id; + # [method_id (stringByPaddingToLength : withString : startingAtIndex :)] pub unsafe fn stringByPaddingToLength_withString_startingAtIndex( &self, newLength: NSUInteger, padString: &NSString, padIndex: NSUInteger, - ) -> Id { - msg_send_id![ - self, - stringByPaddingToLength: newLength, - withString: padString, - startingAtIndex: padIndex - ] - } + ) -> Id; + # [method_id (stringByFoldingWithOptions : locale :)] pub unsafe fn stringByFoldingWithOptions_locale( &self, options: NSStringCompareOptions, locale: Option<&NSLocale>, - ) -> Id { - msg_send_id![self, stringByFoldingWithOptions: options, locale: locale] - } + ) -> Id; + # [method_id (stringByReplacingOccurrencesOfString : withString : options : range :)] pub unsafe fn stringByReplacingOccurrencesOfString_withString_options_range( &self, target: &NSString, replacement: &NSString, options: NSStringCompareOptions, searchRange: NSRange, - ) -> Id { - msg_send_id![ - self, - stringByReplacingOccurrencesOfString: target, - withString: replacement, - options: options, - range: searchRange - ] - } + ) -> Id; + # [method_id (stringByReplacingOccurrencesOfString : withString :)] pub unsafe fn stringByReplacingOccurrencesOfString_withString( &self, target: &NSString, replacement: &NSString, - ) -> Id { - msg_send_id![ - self, - stringByReplacingOccurrencesOfString: target, - withString: replacement - ] - } + ) -> Id; + # [method_id (stringByReplacingCharactersInRange : withString :)] pub unsafe fn stringByReplacingCharactersInRange_withString( &self, range: NSRange, replacement: &NSString, - ) -> Id { - msg_send_id![ - self, - stringByReplacingCharactersInRange: range, - withString: replacement - ] - } + ) -> Id; + # [method_id (stringByApplyingTransform : reverse :)] pub unsafe fn stringByApplyingTransform_reverse( &self, transform: &NSStringTransform, reverse: bool, - ) -> Option> { - msg_send_id![self, stringByApplyingTransform: transform, reverse: reverse] - } + ) -> Option>; + # [method (writeToURL : atomically : encoding : error :)] pub unsafe fn writeToURL_atomically_encoding_error( &self, url: &NSURL, useAuxiliaryFile: bool, enc: NSStringEncoding, - ) -> Result<(), Id> { - msg_send![ - self, - writeToURL: url, - atomically: useAuxiliaryFile, - encoding: enc, - error: _ - ] - } + ) -> Result<(), Id>; + # [method (writeToFile : atomically : encoding : error :)] pub unsafe fn writeToFile_atomically_encoding_error( &self, path: &NSString, useAuxiliaryFile: bool, enc: NSStringEncoding, - ) -> Result<(), Id> { - msg_send![ - self, - writeToFile: path, - atomically: useAuxiliaryFile, - encoding: enc, - error: _ - ] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn hash(&self) -> NSUInteger { - msg_send![self, hash] - } + ) -> Result<(), Id>; + #[method_id(description)] + pub unsafe fn description(&self) -> Id; + #[method(hash)] + pub unsafe fn hash(&self) -> NSUInteger; + # [method_id (initWithCharactersNoCopy : length : freeWhenDone :)] pub unsafe fn initWithCharactersNoCopy_length_freeWhenDone( &self, characters: NonNull, length: NSUInteger, freeBuffer: bool, - ) -> Id { - msg_send_id![ - self, - initWithCharactersNoCopy: characters, - length: length, - freeWhenDone: freeBuffer - ] - } + ) -> Id; + # [method_id (initWithCharactersNoCopy : length : deallocator :)] pub unsafe fn initWithCharactersNoCopy_length_deallocator( &self, chars: NonNull, len: NSUInteger, deallocator: TodoBlock, - ) -> Id { - msg_send_id![ - self, - initWithCharactersNoCopy: chars, - length: len, - deallocator: deallocator - ] - } + ) -> Id; + # [method_id (initWithCharacters : length :)] pub unsafe fn initWithCharacters_length( &self, characters: NonNull, length: NSUInteger, - ) -> Id { - msg_send_id![self, initWithCharacters: characters, length: length] - } + ) -> Id; + # [method_id (initWithUTF8String :)] pub unsafe fn initWithUTF8String( &self, nullTerminatedCString: NonNull, - ) -> Option> { - msg_send_id![self, initWithUTF8String: nullTerminatedCString] - } - pub unsafe fn initWithString(&self, aString: &NSString) -> Id { - msg_send_id![self, initWithString: aString] - } + ) -> Option>; + # [method_id (initWithString :)] + pub unsafe fn initWithString(&self, aString: &NSString) -> Id; + # [method_id (initWithFormat : arguments :)] pub unsafe fn initWithFormat_arguments( &self, format: &NSString, argList: va_list, - ) -> Id { - msg_send_id![self, initWithFormat: format, arguments: argList] - } + ) -> Id; + # [method_id (initWithFormat : locale : arguments :)] pub unsafe fn initWithFormat_locale_arguments( &self, format: &NSString, locale: Option<&Object>, argList: va_list, - ) -> Id { - msg_send_id![ - self, - initWithFormat: format, - locale: locale, - arguments: argList - ] - } + ) -> Id; + # [method_id (initWithData : encoding :)] pub unsafe fn initWithData_encoding( &self, data: &NSData, encoding: NSStringEncoding, - ) -> Option> { - msg_send_id![self, initWithData: data, encoding: encoding] - } + ) -> Option>; + # [method_id (initWithBytes : length : encoding :)] pub unsafe fn initWithBytes_length_encoding( &self, bytes: NonNull, len: NSUInteger, encoding: NSStringEncoding, - ) -> Option> { - msg_send_id![self, initWithBytes: bytes, length: len, encoding: encoding] - } + ) -> Option>; + # [method_id (initWithBytesNoCopy : length : encoding : freeWhenDone :)] pub unsafe fn initWithBytesNoCopy_length_encoding_freeWhenDone( &self, bytes: NonNull, len: NSUInteger, encoding: NSStringEncoding, freeBuffer: bool, - ) -> Option> { - msg_send_id![ - self, - initWithBytesNoCopy: bytes, - length: len, - encoding: encoding, - freeWhenDone: freeBuffer - ] - } + ) -> Option>; + # [method_id (initWithBytesNoCopy : length : encoding : deallocator :)] pub unsafe fn initWithBytesNoCopy_length_encoding_deallocator( &self, bytes: NonNull, len: NSUInteger, encoding: NSStringEncoding, deallocator: TodoBlock, - ) -> Option> { - msg_send_id![ - self, - initWithBytesNoCopy: bytes, - length: len, - encoding: encoding, - deallocator: deallocator - ] - } - pub unsafe fn string() -> Id { - msg_send_id![Self::class(), string] - } - pub unsafe fn stringWithString(string: &NSString) -> Id { - msg_send_id![Self::class(), stringWithString: string] - } + ) -> Option>; + #[method_id(string)] + pub unsafe fn string() -> Id; + # [method_id (stringWithString :)] + pub unsafe fn stringWithString(string: &NSString) -> Id; + # [method_id (stringWithCharacters : length :)] pub unsafe fn stringWithCharacters_length( characters: NonNull, length: NSUInteger, - ) -> Id { - msg_send_id![ - Self::class(), - stringWithCharacters: characters, - length: length - ] - } + ) -> Id; + # [method_id (stringWithUTF8String :)] pub unsafe fn stringWithUTF8String( nullTerminatedCString: NonNull, - ) -> Option> { - msg_send_id![Self::class(), stringWithUTF8String: nullTerminatedCString] - } + ) -> Option>; + # [method_id (initWithCString : encoding :)] pub unsafe fn initWithCString_encoding( &self, nullTerminatedCString: NonNull, encoding: NSStringEncoding, - ) -> Option> { - msg_send_id![ - self, - initWithCString: nullTerminatedCString, - encoding: encoding - ] - } + ) -> Option>; + # [method_id (stringWithCString : encoding :)] pub unsafe fn stringWithCString_encoding( cString: NonNull, enc: NSStringEncoding, - ) -> Option> { - msg_send_id![Self::class(), stringWithCString: cString, encoding: enc] - } + ) -> Option>; + # [method_id (initWithContentsOfURL : encoding : error :)] pub unsafe fn initWithContentsOfURL_encoding_error( &self, url: &NSURL, enc: NSStringEncoding, - ) -> Result, Id> { - msg_send_id![self, initWithContentsOfURL: url, encoding: enc, error: _] - } + ) -> Result, Id>; + # [method_id (initWithContentsOfFile : encoding : error :)] pub unsafe fn initWithContentsOfFile_encoding_error( &self, path: &NSString, enc: NSStringEncoding, - ) -> Result, Id> { - msg_send_id![self, initWithContentsOfFile: path, encoding: enc, error: _] - } + ) -> Result, Id>; + # [method_id (stringWithContentsOfURL : encoding : error :)] pub unsafe fn stringWithContentsOfURL_encoding_error( url: &NSURL, enc: NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - stringWithContentsOfURL: url, - encoding: enc, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (stringWithContentsOfFile : encoding : error :)] pub unsafe fn stringWithContentsOfFile_encoding_error( path: &NSString, enc: NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - stringWithContentsOfFile: path, - encoding: enc, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (initWithContentsOfURL : usedEncoding : error :)] pub unsafe fn initWithContentsOfURL_usedEncoding_error( &self, url: &NSURL, enc: *mut NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - self, - initWithContentsOfURL: url, - usedEncoding: enc, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (initWithContentsOfFile : usedEncoding : error :)] pub unsafe fn initWithContentsOfFile_usedEncoding_error( &self, path: &NSString, enc: *mut NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - self, - initWithContentsOfFile: path, - usedEncoding: enc, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (stringWithContentsOfURL : usedEncoding : error :)] pub unsafe fn stringWithContentsOfURL_usedEncoding_error( url: &NSURL, enc: *mut NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - stringWithContentsOfURL: url, - usedEncoding: enc, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (stringWithContentsOfFile : usedEncoding : error :)] pub unsafe fn stringWithContentsOfFile_usedEncoding_error( path: &NSString, enc: *mut NSStringEncoding, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - stringWithContentsOfFile: path, - usedEncoding: enc, - error: _ - ] - } + ) -> Result, Id>; } ); pub type NSStringEncodingDetectionOptionsKey = NSString; extern_methods!( #[doc = "NSStringEncodingDetection"] unsafe impl NSString { + # [method (stringEncodingForData : encodingOptions : convertedString : usedLossyConversion :)] pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( data: &NSData, opts: Option<&NSDictionary>, string: Option<&mut Option>>, usedLossyConversion: *mut bool, - ) -> NSStringEncoding { - msg_send![ - Self::class(), - stringEncodingForData: data, - encodingOptions: opts, - convertedString: string, - usedLossyConversion: usedLossyConversion - ] - } + ) -> NSStringEncoding; } ); extern_methods!( @@ -785,169 +507,117 @@ extern_class!( ); extern_methods!( unsafe impl NSMutableString { + # [method (replaceCharactersInRange : withString :)] pub unsafe fn replaceCharactersInRange_withString( &self, range: NSRange, aString: &NSString, - ) { - msg_send![self, replaceCharactersInRange: range, withString: aString] - } + ); } ); extern_methods!( #[doc = "NSMutableStringExtensionMethods"] unsafe impl NSMutableString { - pub unsafe fn insertString_atIndex(&self, aString: &NSString, loc: NSUInteger) { - msg_send![self, insertString: aString, atIndex: loc] - } - pub unsafe fn deleteCharactersInRange(&self, range: NSRange) { - msg_send![self, deleteCharactersInRange: range] - } - pub unsafe fn appendString(&self, aString: &NSString) { - msg_send![self, appendString: aString] - } - pub unsafe fn setString(&self, aString: &NSString) { - msg_send![self, setString: aString] - } + # [method (insertString : atIndex :)] + pub unsafe fn insertString_atIndex(&self, aString: &NSString, loc: NSUInteger); + # [method (deleteCharactersInRange :)] + pub unsafe fn deleteCharactersInRange(&self, range: NSRange); + # [method (appendString :)] + pub unsafe fn appendString(&self, aString: &NSString); + # [method (setString :)] + pub unsafe fn setString(&self, aString: &NSString); + # [method (replaceOccurrencesOfString : withString : options : range :)] pub unsafe fn replaceOccurrencesOfString_withString_options_range( &self, target: &NSString, replacement: &NSString, options: NSStringCompareOptions, searchRange: NSRange, - ) -> NSUInteger { - msg_send![ - self, - replaceOccurrencesOfString: target, - withString: replacement, - options: options, - range: searchRange - ] - } + ) -> NSUInteger; + # [method (applyTransform : reverse : range : updatedRange :)] pub unsafe fn applyTransform_reverse_range_updatedRange( &self, transform: &NSStringTransform, reverse: bool, range: NSRange, resultingRange: NSRangePointer, - ) -> bool { - msg_send![ - self, - applyTransform: transform, - reverse: reverse, - range: range, - updatedRange: resultingRange - ] - } - pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Id { - msg_send_id![self, initWithCapacity: capacity] - } - pub unsafe fn stringWithCapacity(capacity: NSUInteger) -> Id { - msg_send_id![Self::class(), stringWithCapacity: capacity] - } + ) -> bool; + # [method_id (initWithCapacity :)] + pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Id; + # [method_id (stringWithCapacity :)] + pub unsafe fn stringWithCapacity(capacity: NSUInteger) -> Id; } ); extern_methods!( #[doc = "NSExtendedStringPropertyListParsing"] unsafe impl NSString { - pub unsafe fn propertyList(&self) -> Id { - msg_send_id![self, propertyList] - } - pub unsafe fn propertyListFromStringsFileFormat(&self) -> Option> { - msg_send_id![self, propertyListFromStringsFileFormat] - } + #[method_id(propertyList)] + pub unsafe fn propertyList(&self) -> Id; + #[method_id(propertyListFromStringsFileFormat)] + pub unsafe fn propertyListFromStringsFileFormat(&self) -> Option>; } ); extern_methods!( #[doc = "NSStringDeprecated"] unsafe impl NSString { - pub unsafe fn cString(&self) -> *mut c_char { - msg_send![self, cString] - } - pub unsafe fn lossyCString(&self) -> *mut c_char { - msg_send![self, lossyCString] - } - pub unsafe fn cStringLength(&self) -> NSUInteger { - msg_send![self, cStringLength] - } - pub unsafe fn getCString(&self, bytes: NonNull) { - msg_send![self, getCString: bytes] - } - pub unsafe fn getCString_maxLength(&self, bytes: NonNull, maxLength: NSUInteger) { - msg_send![self, getCString: bytes, maxLength: maxLength] - } + #[method(cString)] + pub unsafe fn cString(&self) -> *mut c_char; + #[method(lossyCString)] + pub unsafe fn lossyCString(&self) -> *mut c_char; + #[method(cStringLength)] + pub unsafe fn cStringLength(&self) -> NSUInteger; + # [method (getCString :)] + pub unsafe fn getCString(&self, bytes: NonNull); + # [method (getCString : maxLength :)] + pub unsafe fn getCString_maxLength(&self, bytes: NonNull, maxLength: NSUInteger); + # [method (getCString : maxLength : range : remainingRange :)] pub unsafe fn getCString_maxLength_range_remainingRange( &self, bytes: NonNull, maxLength: NSUInteger, aRange: NSRange, leftoverRange: NSRangePointer, - ) { - msg_send![ - self, - getCString: bytes, - maxLength: maxLength, - range: aRange, - remainingRange: leftoverRange - ] - } + ); + # [method (writeToFile : atomically :)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, - ) -> bool { - msg_send![self, writeToFile: path, atomically: useAuxiliaryFile] - } - pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool { - msg_send![self, writeToURL: url, atomically: atomically] - } - pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option> { - msg_send_id![self, initWithContentsOfFile: path] - } - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithContentsOfURL: url] - } - pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option> { - msg_send_id![Self::class(), stringWithContentsOfFile: path] - } - pub unsafe fn stringWithContentsOfURL(url: &NSURL) -> Option> { - msg_send_id![Self::class(), stringWithContentsOfURL: url] - } + ) -> bool; + # [method (writeToURL : atomically :)] + pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; + # [method_id (initWithContentsOfFile :)] + pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option>; + # [method_id (initWithContentsOfURL :)] + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + # [method_id (stringWithContentsOfFile :)] + pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option>; + # [method_id (stringWithContentsOfURL :)] + pub unsafe fn stringWithContentsOfURL(url: &NSURL) -> Option>; + # [method_id (initWithCStringNoCopy : length : freeWhenDone :)] pub unsafe fn initWithCStringNoCopy_length_freeWhenDone( &self, bytes: NonNull, length: NSUInteger, freeBuffer: bool, - ) -> Option> { - msg_send_id![ - self, - initWithCStringNoCopy: bytes, - length: length, - freeWhenDone: freeBuffer - ] - } + ) -> Option>; + # [method_id (initWithCString : length :)] pub unsafe fn initWithCString_length( &self, bytes: NonNull, length: NSUInteger, - ) -> Option> { - msg_send_id![self, initWithCString: bytes, length: length] - } - pub unsafe fn initWithCString(&self, bytes: NonNull) -> Option> { - msg_send_id![self, initWithCString: bytes] - } + ) -> Option>; + # [method_id (initWithCString :)] + pub unsafe fn initWithCString(&self, bytes: NonNull) -> Option>; + # [method_id (stringWithCString : length :)] pub unsafe fn stringWithCString_length( bytes: NonNull, length: NSUInteger, - ) -> Option> { - msg_send_id![Self::class(), stringWithCString: bytes, length: length] - } - pub unsafe fn stringWithCString(bytes: NonNull) -> Option> { - msg_send_id![Self::class(), stringWithCString: bytes] - } - pub unsafe fn getCharacters(&self, buffer: NonNull) { - msg_send![self, getCharacters: buffer] - } + ) -> Option>; + # [method_id (stringWithCString :)] + pub unsafe fn stringWithCString(bytes: NonNull) -> Option>; + # [method (getCharacters :)] + pub unsafe fn getCharacters(&self, buffer: NonNull); } ); extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index d2c26b751..78716e939 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSTask; @@ -16,144 +16,95 @@ extern_class!( ); extern_methods!( unsafe impl NSTask { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn executableURL(&self) -> Option> { - msg_send_id![self, executableURL] - } - pub unsafe fn setExecutableURL(&self, executableURL: Option<&NSURL>) { - msg_send![self, setExecutableURL: executableURL] - } - pub unsafe fn arguments(&self) -> Option, Shared>> { - msg_send_id![self, arguments] - } - pub unsafe fn setArguments(&self, arguments: Option<&NSArray>) { - msg_send![self, setArguments: arguments] - } - pub unsafe fn environment(&self) -> Option, Shared>> { - msg_send_id![self, environment] - } - pub unsafe fn setEnvironment( - &self, - environment: Option<&NSDictionary>, - ) { - msg_send![self, setEnvironment: environment] - } - pub unsafe fn currentDirectoryURL(&self) -> Option> { - msg_send_id![self, currentDirectoryURL] - } - pub unsafe fn setCurrentDirectoryURL(&self, currentDirectoryURL: Option<&NSURL>) { - msg_send![self, setCurrentDirectoryURL: currentDirectoryURL] - } - pub unsafe fn standardInput(&self) -> Option> { - msg_send_id![self, standardInput] - } - pub unsafe fn setStandardInput(&self, standardInput: Option<&Object>) { - msg_send![self, setStandardInput: standardInput] - } - pub unsafe fn standardOutput(&self) -> Option> { - msg_send_id![self, standardOutput] - } - pub unsafe fn setStandardOutput(&self, standardOutput: Option<&Object>) { - msg_send![self, setStandardOutput: standardOutput] - } - pub unsafe fn standardError(&self) -> Option> { - msg_send_id![self, standardError] - } - pub unsafe fn setStandardError(&self, standardError: Option<&Object>) { - msg_send![self, setStandardError: standardError] - } - pub unsafe fn launchAndReturnError(&self) -> Result<(), Id> { - msg_send![self, launchAndReturnError: _] - } - pub unsafe fn interrupt(&self) { - msg_send![self, interrupt] - } - pub unsafe fn terminate(&self) { - msg_send![self, terminate] - } - pub unsafe fn suspend(&self) -> bool { - msg_send![self, suspend] - } - pub unsafe fn resume(&self) -> bool { - msg_send![self, resume] - } - pub unsafe fn processIdentifier(&self) -> c_int { - msg_send![self, processIdentifier] - } - pub unsafe fn isRunning(&self) -> bool { - msg_send![self, isRunning] - } - pub unsafe fn terminationStatus(&self) -> c_int { - msg_send![self, terminationStatus] - } - pub unsafe fn terminationReason(&self) -> NSTaskTerminationReason { - msg_send![self, terminationReason] - } - pub unsafe fn terminationHandler(&self) -> TodoBlock { - msg_send![self, terminationHandler] - } - pub unsafe fn setTerminationHandler(&self, terminationHandler: TodoBlock) { - msg_send![self, setTerminationHandler: terminationHandler] - } - pub unsafe fn qualityOfService(&self) -> NSQualityOfService { - msg_send![self, qualityOfService] - } - pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { - msg_send![self, setQualityOfService: qualityOfService] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(executableURL)] + pub unsafe fn executableURL(&self) -> Option>; + # [method (setExecutableURL :)] + pub unsafe fn setExecutableURL(&self, executableURL: Option<&NSURL>); + #[method_id(arguments)] + pub unsafe fn arguments(&self) -> Option, Shared>>; + # [method (setArguments :)] + pub unsafe fn setArguments(&self, arguments: Option<&NSArray>); + #[method_id(environment)] + pub unsafe fn environment(&self) -> Option, Shared>>; + # [method (setEnvironment :)] + pub unsafe fn setEnvironment(&self, environment: Option<&NSDictionary>); + #[method_id(currentDirectoryURL)] + pub unsafe fn currentDirectoryURL(&self) -> Option>; + # [method (setCurrentDirectoryURL :)] + pub unsafe fn setCurrentDirectoryURL(&self, currentDirectoryURL: Option<&NSURL>); + #[method_id(standardInput)] + pub unsafe fn standardInput(&self) -> Option>; + # [method (setStandardInput :)] + pub unsafe fn setStandardInput(&self, standardInput: Option<&Object>); + #[method_id(standardOutput)] + pub unsafe fn standardOutput(&self) -> Option>; + # [method (setStandardOutput :)] + pub unsafe fn setStandardOutput(&self, standardOutput: Option<&Object>); + #[method_id(standardError)] + pub unsafe fn standardError(&self) -> Option>; + # [method (setStandardError :)] + pub unsafe fn setStandardError(&self, standardError: Option<&Object>); + # [method (launchAndReturnError :)] + pub unsafe fn launchAndReturnError(&self) -> Result<(), Id>; + #[method(interrupt)] + pub unsafe fn interrupt(&self); + #[method(terminate)] + pub unsafe fn terminate(&self); + #[method(suspend)] + pub unsafe fn suspend(&self) -> bool; + #[method(resume)] + pub unsafe fn resume(&self) -> bool; + #[method(processIdentifier)] + pub unsafe fn processIdentifier(&self) -> c_int; + #[method(isRunning)] + pub unsafe fn isRunning(&self) -> bool; + #[method(terminationStatus)] + pub unsafe fn terminationStatus(&self) -> c_int; + #[method(terminationReason)] + pub unsafe fn terminationReason(&self) -> NSTaskTerminationReason; + #[method(terminationHandler)] + pub unsafe fn terminationHandler(&self) -> TodoBlock; + # [method (setTerminationHandler :)] + pub unsafe fn setTerminationHandler(&self, terminationHandler: TodoBlock); + #[method(qualityOfService)] + pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + # [method (setQualityOfService :)] + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); } ); extern_methods!( #[doc = "NSTaskConveniences"] unsafe impl NSTask { + # [method_id (launchedTaskWithExecutableURL : arguments : error : terminationHandler :)] pub unsafe fn launchedTaskWithExecutableURL_arguments_error_terminationHandler( url: &NSURL, arguments: &NSArray, error: *mut *mut NSError, terminationHandler: TodoBlock, - ) -> Option> { - msg_send_id![ - Self::class(), - launchedTaskWithExecutableURL: url, - arguments: arguments, - error: error, - terminationHandler: terminationHandler - ] - } - pub unsafe fn waitUntilExit(&self) { - msg_send![self, waitUntilExit] - } + ) -> Option>; + #[method(waitUntilExit)] + pub unsafe fn waitUntilExit(&self); } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSTask { - pub unsafe fn launchPath(&self) -> Option> { - msg_send_id![self, launchPath] - } - pub unsafe fn setLaunchPath(&self, launchPath: Option<&NSString>) { - msg_send![self, setLaunchPath: launchPath] - } - pub unsafe fn currentDirectoryPath(&self) -> Id { - msg_send_id![self, currentDirectoryPath] - } - pub unsafe fn setCurrentDirectoryPath(&self, currentDirectoryPath: &NSString) { - msg_send![self, setCurrentDirectoryPath: currentDirectoryPath] - } - pub unsafe fn launch(&self) { - msg_send![self, launch] - } + #[method_id(launchPath)] + pub unsafe fn launchPath(&self) -> Option>; + # [method (setLaunchPath :)] + pub unsafe fn setLaunchPath(&self, launchPath: Option<&NSString>); + #[method_id(currentDirectoryPath)] + pub unsafe fn currentDirectoryPath(&self) -> Id; + # [method (setCurrentDirectoryPath :)] + pub unsafe fn setCurrentDirectoryPath(&self, currentDirectoryPath: &NSString); + #[method(launch)] + pub unsafe fn launch(&self); + # [method_id (launchedTaskWithLaunchPath : arguments :)] pub unsafe fn launchedTaskWithLaunchPath_arguments( path: &NSString, arguments: &NSArray, - ) -> Id { - msg_send_id![ - Self::class(), - launchedTaskWithLaunchPath: path, - arguments: arguments - ] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 42b34293c..707fc814e 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -12,7 +12,7 @@ use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextCheckingTypes = u64; pub type NSTextCheckingKey = NSString; extern_class!( @@ -24,227 +24,138 @@ extern_class!( ); extern_methods!( unsafe impl NSTextCheckingResult { - pub unsafe fn resultType(&self) -> NSTextCheckingType { - msg_send![self, resultType] - } - pub unsafe fn range(&self) -> NSRange { - msg_send![self, range] - } + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSTextCheckingType; + #[method(range)] + pub unsafe fn range(&self) -> NSRange; } ); extern_methods!( #[doc = "NSTextCheckingResultOptional"] unsafe impl NSTextCheckingResult { - pub unsafe fn orthography(&self) -> Option> { - msg_send_id![self, orthography] - } + #[method_id(orthography)] + pub unsafe fn orthography(&self) -> Option>; + #[method_id(grammarDetails)] pub unsafe fn grammarDetails( &self, - ) -> Option>, Shared>> { - msg_send_id![self, grammarDetails] - } - pub unsafe fn date(&self) -> Option> { - msg_send_id![self, date] - } - pub unsafe fn timeZone(&self) -> Option> { - msg_send_id![self, timeZone] - } - pub unsafe fn duration(&self) -> NSTimeInterval { - msg_send![self, duration] - } + ) -> Option>, Shared>>; + #[method_id(date)] + pub unsafe fn date(&self) -> Option>; + #[method_id(timeZone)] + pub unsafe fn timeZone(&self) -> Option>; + #[method(duration)] + pub unsafe fn duration(&self) -> NSTimeInterval; + #[method_id(components)] pub unsafe fn components( &self, - ) -> Option, Shared>> { - msg_send_id![self, components] - } - pub unsafe fn URL(&self) -> Option> { - msg_send_id![self, URL] - } - pub unsafe fn replacementString(&self) -> Option> { - msg_send_id![self, replacementString] - } - pub unsafe fn alternativeStrings(&self) -> Option, Shared>> { - msg_send_id![self, alternativeStrings] - } - pub unsafe fn regularExpression(&self) -> Option> { - msg_send_id![self, regularExpression] - } - pub unsafe fn phoneNumber(&self) -> Option> { - msg_send_id![self, phoneNumber] - } - pub unsafe fn numberOfRanges(&self) -> NSUInteger { - msg_send![self, numberOfRanges] - } - pub unsafe fn rangeAtIndex(&self, idx: NSUInteger) -> NSRange { - msg_send![self, rangeAtIndex: idx] - } - pub unsafe fn rangeWithName(&self, name: &NSString) -> NSRange { - msg_send![self, rangeWithName: name] - } + ) -> Option, Shared>>; + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + #[method_id(replacementString)] + pub unsafe fn replacementString(&self) -> Option>; + #[method_id(alternativeStrings)] + pub unsafe fn alternativeStrings(&self) -> Option, Shared>>; + #[method_id(regularExpression)] + pub unsafe fn regularExpression(&self) -> Option>; + #[method_id(phoneNumber)] + pub unsafe fn phoneNumber(&self) -> Option>; + #[method(numberOfRanges)] + pub unsafe fn numberOfRanges(&self) -> NSUInteger; + # [method (rangeAtIndex :)] + pub unsafe fn rangeAtIndex(&self, idx: NSUInteger) -> NSRange; + # [method (rangeWithName :)] + pub unsafe fn rangeWithName(&self, name: &NSString) -> NSRange; + # [method_id (resultByAdjustingRangesWithOffset :)] pub unsafe fn resultByAdjustingRangesWithOffset( &self, offset: NSInteger, - ) -> Id { - msg_send_id![self, resultByAdjustingRangesWithOffset: offset] - } + ) -> Id; + #[method_id(addressComponents)] pub unsafe fn addressComponents( &self, - ) -> Option, Shared>> { - msg_send_id![self, addressComponents] - } + ) -> Option, Shared>>; } ); extern_methods!( #[doc = "NSTextCheckingResultCreation"] unsafe impl NSTextCheckingResult { + # [method_id (orthographyCheckingResultWithRange : orthography :)] pub unsafe fn orthographyCheckingResultWithRange_orthography( range: NSRange, orthography: &NSOrthography, - ) -> Id { - msg_send_id![ - Self::class(), - orthographyCheckingResultWithRange: range, - orthography: orthography - ] - } + ) -> Id; + # [method_id (spellCheckingResultWithRange :)] pub unsafe fn spellCheckingResultWithRange( range: NSRange, - ) -> Id { - msg_send_id![Self::class(), spellCheckingResultWithRange: range] - } + ) -> Id; + # [method_id (grammarCheckingResultWithRange : details :)] pub unsafe fn grammarCheckingResultWithRange_details( range: NSRange, details: &NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - grammarCheckingResultWithRange: range, - details: details - ] - } + ) -> Id; + # [method_id (dateCheckingResultWithRange : date :)] pub unsafe fn dateCheckingResultWithRange_date( range: NSRange, date: &NSDate, - ) -> Id { - msg_send_id![ - Self::class(), - dateCheckingResultWithRange: range, - date: date - ] - } + ) -> Id; + # [method_id (dateCheckingResultWithRange : date : timeZone : duration :)] pub unsafe fn dateCheckingResultWithRange_date_timeZone_duration( range: NSRange, date: &NSDate, timeZone: &NSTimeZone, duration: NSTimeInterval, - ) -> Id { - msg_send_id![ - Self::class(), - dateCheckingResultWithRange: range, - date: date, - timeZone: timeZone, - duration: duration - ] - } + ) -> Id; + # [method_id (addressCheckingResultWithRange : components :)] pub unsafe fn addressCheckingResultWithRange_components( range: NSRange, components: &NSDictionary, - ) -> Id { - msg_send_id![ - Self::class(), - addressCheckingResultWithRange: range, - components: components - ] - } + ) -> Id; + # [method_id (linkCheckingResultWithRange : URL :)] pub unsafe fn linkCheckingResultWithRange_URL( range: NSRange, url: &NSURL, - ) -> Id { - msg_send_id![Self::class(), linkCheckingResultWithRange: range, URL: url] - } + ) -> Id; + # [method_id (quoteCheckingResultWithRange : replacementString :)] pub unsafe fn quoteCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - quoteCheckingResultWithRange: range, - replacementString: replacementString - ] - } + ) -> Id; + # [method_id (dashCheckingResultWithRange : replacementString :)] pub unsafe fn dashCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - dashCheckingResultWithRange: range, - replacementString: replacementString - ] - } + ) -> Id; + # [method_id (replacementCheckingResultWithRange : replacementString :)] pub unsafe fn replacementCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - replacementCheckingResultWithRange: range, - replacementString: replacementString - ] - } + ) -> Id; + # [method_id (correctionCheckingResultWithRange : replacementString :)] pub unsafe fn correctionCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - correctionCheckingResultWithRange: range, - replacementString: replacementString - ] - } + ) -> Id; + # [method_id (correctionCheckingResultWithRange : replacementString : alternativeStrings :)] pub unsafe fn correctionCheckingResultWithRange_replacementString_alternativeStrings( range: NSRange, replacementString: &NSString, alternativeStrings: &NSArray, - ) -> Id { - msg_send_id![ - Self::class(), - correctionCheckingResultWithRange: range, - replacementString: replacementString, - alternativeStrings: alternativeStrings - ] - } + ) -> Id; + # [method_id (regularExpressionCheckingResultWithRanges : count : regularExpression :)] pub unsafe fn regularExpressionCheckingResultWithRanges_count_regularExpression( ranges: NSRangePointer, count: NSUInteger, regularExpression: &NSRegularExpression, - ) -> Id { - msg_send_id![ - Self::class(), - regularExpressionCheckingResultWithRanges: ranges, - count: count, - regularExpression: regularExpression - ] - } + ) -> Id; + # [method_id (phoneNumberCheckingResultWithRange : phoneNumber :)] pub unsafe fn phoneNumberCheckingResultWithRange_phoneNumber( range: NSRange, phoneNumber: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - phoneNumberCheckingResultWithRange: range, - phoneNumber: phoneNumber - ] - } + ) -> Id; + # [method_id (transitInformationCheckingResultWithRange : components :)] pub unsafe fn transitInformationCheckingResultWithRange_components( range: NSRange, components: &NSDictionary, - ) -> Id { - msg_send_id![ - Self::class(), - transitInformationCheckingResultWithRange: range, - components: components - ] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index d35a4de12..60d3b9e62 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSThread; @@ -19,154 +19,100 @@ extern_class!( ); extern_methods!( unsafe impl NSThread { - pub unsafe fn currentThread() -> Id { - msg_send_id![Self::class(), currentThread] - } - pub unsafe fn detachNewThreadWithBlock(block: TodoBlock) { - msg_send![Self::class(), detachNewThreadWithBlock: block] - } + #[method_id(currentThread)] + pub unsafe fn currentThread() -> Id; + # [method (detachNewThreadWithBlock :)] + pub unsafe fn detachNewThreadWithBlock(block: TodoBlock); + # [method (detachNewThreadSelector : toTarget : withObject :)] pub unsafe fn detachNewThreadSelector_toTarget_withObject( selector: Sel, target: &Object, argument: Option<&Object>, - ) { - msg_send![ - Self::class(), - detachNewThreadSelector: selector, - toTarget: target, - withObject: argument - ] - } - pub unsafe fn isMultiThreaded() -> bool { - msg_send![Self::class(), isMultiThreaded] - } - pub unsafe fn threadDictionary(&self) -> Id { - msg_send_id![self, threadDictionary] - } - pub unsafe fn sleepUntilDate(date: &NSDate) { - msg_send![Self::class(), sleepUntilDate: date] - } - pub unsafe fn sleepForTimeInterval(ti: NSTimeInterval) { - msg_send![Self::class(), sleepForTimeInterval: ti] - } - pub unsafe fn exit() { - msg_send![Self::class(), exit] - } - pub unsafe fn threadPriority() -> c_double { - msg_send![Self::class(), threadPriority] - } - pub unsafe fn setThreadPriority(p: c_double) -> bool { - msg_send![Self::class(), setThreadPriority: p] - } - pub unsafe fn threadPriority(&self) -> c_double { - msg_send![self, threadPriority] - } - pub unsafe fn setThreadPriority(&self, threadPriority: c_double) { - msg_send![self, setThreadPriority: threadPriority] - } - pub unsafe fn qualityOfService(&self) -> NSQualityOfService { - msg_send![self, qualityOfService] - } - pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService) { - msg_send![self, setQualityOfService: qualityOfService] - } - pub unsafe fn callStackReturnAddresses() -> Id, Shared> { - msg_send_id![Self::class(), callStackReturnAddresses] - } - pub unsafe fn callStackSymbols() -> Id, Shared> { - msg_send_id![Self::class(), callStackSymbols] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } - pub unsafe fn stackSize(&self) -> NSUInteger { - msg_send![self, stackSize] - } - pub unsafe fn setStackSize(&self, stackSize: NSUInteger) { - msg_send![self, setStackSize: stackSize] - } - pub unsafe fn isMainThread(&self) -> bool { - msg_send![self, isMainThread] - } - pub unsafe fn isMainThread() -> bool { - msg_send![Self::class(), isMainThread] - } - pub unsafe fn mainThread() -> Id { - msg_send_id![Self::class(), mainThread] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + ); + #[method(isMultiThreaded)] + pub unsafe fn isMultiThreaded() -> bool; + #[method_id(threadDictionary)] + pub unsafe fn threadDictionary(&self) -> Id; + # [method (sleepUntilDate :)] + pub unsafe fn sleepUntilDate(date: &NSDate); + # [method (sleepForTimeInterval :)] + pub unsafe fn sleepForTimeInterval(ti: NSTimeInterval); + #[method(exit)] + pub unsafe fn exit(); + #[method(threadPriority)] + pub unsafe fn threadPriority() -> c_double; + # [method (setThreadPriority :)] + pub unsafe fn setThreadPriority(p: c_double) -> bool; + #[method(threadPriority)] + pub unsafe fn threadPriority(&self) -> c_double; + # [method (setThreadPriority :)] + pub unsafe fn setThreadPriority(&self, threadPriority: c_double); + #[method(qualityOfService)] + pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + # [method (setQualityOfService :)] + pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); + #[method_id(callStackReturnAddresses)] + pub unsafe fn callStackReturnAddresses() -> Id, Shared>; + #[method_id(callStackSymbols)] + pub unsafe fn callStackSymbols() -> Id, Shared>; + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + # [method (setName :)] + pub unsafe fn setName(&self, name: Option<&NSString>); + #[method(stackSize)] + pub unsafe fn stackSize(&self) -> NSUInteger; + # [method (setStackSize :)] + pub unsafe fn setStackSize(&self, stackSize: NSUInteger); + #[method(isMainThread)] + pub unsafe fn isMainThread(&self) -> bool; + #[method(isMainThread)] + pub unsafe fn isMainThread() -> bool; + #[method_id(mainThread)] + pub unsafe fn mainThread() -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithTarget : selector : object :)] pub unsafe fn initWithTarget_selector_object( &self, target: &Object, selector: Sel, argument: Option<&Object>, - ) -> Id { - msg_send_id![ - self, - initWithTarget: target, - selector: selector, - object: argument - ] - } - pub unsafe fn initWithBlock(&self, block: TodoBlock) -> Id { - msg_send_id![self, initWithBlock: block] - } - pub unsafe fn isExecuting(&self) -> bool { - msg_send![self, isExecuting] - } - pub unsafe fn isFinished(&self) -> bool { - msg_send![self, isFinished] - } - pub unsafe fn isCancelled(&self) -> bool { - msg_send![self, isCancelled] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn start(&self) { - msg_send![self, start] - } - pub unsafe fn main(&self) { - msg_send![self, main] - } + ) -> Id; + # [method_id (initWithBlock :)] + pub unsafe fn initWithBlock(&self, block: TodoBlock) -> Id; + #[method(isExecuting)] + pub unsafe fn isExecuting(&self) -> bool; + #[method(isFinished)] + pub unsafe fn isFinished(&self) -> bool; + #[method(isCancelled)] + pub unsafe fn isCancelled(&self) -> bool; + #[method(cancel)] + pub unsafe fn cancel(&self); + #[method(start)] + pub unsafe fn start(&self); + #[method(main)] + pub unsafe fn main(&self); } ); extern_methods!( #[doc = "NSThreadPerformAdditions"] unsafe impl NSObject { + # [method (performSelectorOnMainThread : withObject : waitUntilDone : modes :)] pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone_modes( &self, aSelector: Sel, arg: Option<&Object>, wait: bool, array: Option<&NSArray>, - ) { - msg_send![ - self, - performSelectorOnMainThread: aSelector, - withObject: arg, - waitUntilDone: wait, - modes: array - ] - } + ); + # [method (performSelectorOnMainThread : withObject : waitUntilDone :)] pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone( &self, aSelector: Sel, arg: Option<&Object>, wait: bool, - ) { - msg_send![ - self, - performSelectorOnMainThread: aSelector, - withObject: arg, - waitUntilDone: wait - ] - } + ); + # [method (performSelector : onThread : withObject : waitUntilDone : modes :)] pub unsafe fn performSelector_onThread_withObject_waitUntilDone_modes( &self, aSelector: Sel, @@ -174,41 +120,20 @@ extern_methods!( arg: Option<&Object>, wait: bool, array: Option<&NSArray>, - ) { - msg_send![ - self, - performSelector: aSelector, - onThread: thr, - withObject: arg, - waitUntilDone: wait, - modes: array - ] - } + ); + # [method (performSelector : onThread : withObject : waitUntilDone :)] pub unsafe fn performSelector_onThread_withObject_waitUntilDone( &self, aSelector: Sel, thr: &NSThread, arg: Option<&Object>, wait: bool, - ) { - msg_send![ - self, - performSelector: aSelector, - onThread: thr, - withObject: arg, - waitUntilDone: wait - ] - } + ); + # [method (performSelectorInBackground : withObject :)] pub unsafe fn performSelectorInBackground_withObject( &self, aSelector: Sel, arg: Option<&Object>, - ) { - msg_send![ - self, - performSelectorInBackground: aSelector, - withObject: arg - ] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 77c353155..5dfef59f4 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSTimeZone; @@ -20,126 +20,92 @@ extern_class!( ); extern_methods!( unsafe impl NSTimeZone { - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn data(&self) -> Id { - msg_send_id![self, data] - } - pub unsafe fn secondsFromGMTForDate(&self, aDate: &NSDate) -> NSInteger { - msg_send![self, secondsFromGMTForDate: aDate] - } - pub unsafe fn abbreviationForDate(&self, aDate: &NSDate) -> Option> { - msg_send_id![self, abbreviationForDate: aDate] - } - pub unsafe fn isDaylightSavingTimeForDate(&self, aDate: &NSDate) -> bool { - msg_send![self, isDaylightSavingTimeForDate: aDate] - } - pub unsafe fn daylightSavingTimeOffsetForDate(&self, aDate: &NSDate) -> NSTimeInterval { - msg_send![self, daylightSavingTimeOffsetForDate: aDate] - } + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method_id(data)] + pub unsafe fn data(&self) -> Id; + # [method (secondsFromGMTForDate :)] + pub unsafe fn secondsFromGMTForDate(&self, aDate: &NSDate) -> NSInteger; + # [method_id (abbreviationForDate :)] + pub unsafe fn abbreviationForDate(&self, aDate: &NSDate) -> Option>; + # [method (isDaylightSavingTimeForDate :)] + pub unsafe fn isDaylightSavingTimeForDate(&self, aDate: &NSDate) -> bool; + # [method (daylightSavingTimeOffsetForDate :)] + pub unsafe fn daylightSavingTimeOffsetForDate(&self, aDate: &NSDate) -> NSTimeInterval; + # [method_id (nextDaylightSavingTimeTransitionAfterDate :)] pub unsafe fn nextDaylightSavingTimeTransitionAfterDate( &self, aDate: &NSDate, - ) -> Option> { - msg_send_id![self, nextDaylightSavingTimeTransitionAfterDate: aDate] - } + ) -> Option>; } ); extern_methods!( #[doc = "NSExtendedTimeZone"] unsafe impl NSTimeZone { - pub unsafe fn systemTimeZone() -> Id { - msg_send_id![Self::class(), systemTimeZone] - } - pub unsafe fn resetSystemTimeZone() { - msg_send![Self::class(), resetSystemTimeZone] - } - pub unsafe fn defaultTimeZone() -> Id { - msg_send_id![Self::class(), defaultTimeZone] - } - pub unsafe fn setDefaultTimeZone(defaultTimeZone: &NSTimeZone) { - msg_send![Self::class(), setDefaultTimeZone: defaultTimeZone] - } - pub unsafe fn localTimeZone() -> Id { - msg_send_id![Self::class(), localTimeZone] - } - pub unsafe fn knownTimeZoneNames() -> Id, Shared> { - msg_send_id![Self::class(), knownTimeZoneNames] - } - pub unsafe fn abbreviationDictionary() -> Id, Shared> { - msg_send_id![Self::class(), abbreviationDictionary] - } + #[method_id(systemTimeZone)] + pub unsafe fn systemTimeZone() -> Id; + #[method(resetSystemTimeZone)] + pub unsafe fn resetSystemTimeZone(); + #[method_id(defaultTimeZone)] + pub unsafe fn defaultTimeZone() -> Id; + # [method (setDefaultTimeZone :)] + pub unsafe fn setDefaultTimeZone(defaultTimeZone: &NSTimeZone); + #[method_id(localTimeZone)] + pub unsafe fn localTimeZone() -> Id; + #[method_id(knownTimeZoneNames)] + pub unsafe fn knownTimeZoneNames() -> Id, Shared>; + #[method_id(abbreviationDictionary)] + pub unsafe fn abbreviationDictionary() -> Id, Shared>; + # [method (setAbbreviationDictionary :)] pub unsafe fn setAbbreviationDictionary( abbreviationDictionary: &NSDictionary, - ) { - msg_send![ - Self::class(), - setAbbreviationDictionary: abbreviationDictionary - ] - } - pub unsafe fn timeZoneDataVersion() -> Id { - msg_send_id![Self::class(), timeZoneDataVersion] - } - pub unsafe fn secondsFromGMT(&self) -> NSInteger { - msg_send![self, secondsFromGMT] - } - pub unsafe fn abbreviation(&self) -> Option> { - msg_send_id![self, abbreviation] - } - pub unsafe fn isDaylightSavingTime(&self) -> bool { - msg_send![self, isDaylightSavingTime] - } - pub unsafe fn daylightSavingTimeOffset(&self) -> NSTimeInterval { - msg_send![self, daylightSavingTimeOffset] - } - pub unsafe fn nextDaylightSavingTimeTransition(&self) -> Option> { - msg_send_id![self, nextDaylightSavingTimeTransition] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool { - msg_send![self, isEqualToTimeZone: aTimeZone] - } + ); + #[method_id(timeZoneDataVersion)] + pub unsafe fn timeZoneDataVersion() -> Id; + #[method(secondsFromGMT)] + pub unsafe fn secondsFromGMT(&self) -> NSInteger; + #[method_id(abbreviation)] + pub unsafe fn abbreviation(&self) -> Option>; + #[method(isDaylightSavingTime)] + pub unsafe fn isDaylightSavingTime(&self) -> bool; + #[method(daylightSavingTimeOffset)] + pub unsafe fn daylightSavingTimeOffset(&self) -> NSTimeInterval; + #[method_id(nextDaylightSavingTimeTransition)] + pub unsafe fn nextDaylightSavingTimeTransition(&self) -> Option>; + #[method_id(description)] + pub unsafe fn description(&self) -> Id; + # [method (isEqualToTimeZone :)] + pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool; + # [method_id (localizedName : locale :)] pub unsafe fn localizedName_locale( &self, style: NSTimeZoneNameStyle, locale: Option<&NSLocale>, - ) -> Option> { - msg_send_id![self, localizedName: style, locale: locale] - } + ) -> Option>; } ); extern_methods!( #[doc = "NSTimeZoneCreation"] unsafe impl NSTimeZone { - pub unsafe fn timeZoneWithName(tzName: &NSString) -> Option> { - msg_send_id![Self::class(), timeZoneWithName: tzName] - } + # [method_id (timeZoneWithName :)] + pub unsafe fn timeZoneWithName(tzName: &NSString) -> Option>; + # [method_id (timeZoneWithName : data :)] pub unsafe fn timeZoneWithName_data( tzName: &NSString, aData: Option<&NSData>, - ) -> Option> { - msg_send_id![Self::class(), timeZoneWithName: tzName, data: aData] - } - pub unsafe fn initWithName(&self, tzName: &NSString) -> Option> { - msg_send_id![self, initWithName: tzName] - } + ) -> Option>; + # [method_id (initWithName :)] + pub unsafe fn initWithName(&self, tzName: &NSString) -> Option>; + # [method_id (initWithName : data :)] pub unsafe fn initWithName_data( &self, tzName: &NSString, aData: Option<&NSData>, - ) -> Option> { - msg_send_id![self, initWithName: tzName, data: aData] - } - pub unsafe fn timeZoneForSecondsFromGMT(seconds: NSInteger) -> Id { - msg_send_id![Self::class(), timeZoneForSecondsFromGMT: seconds] - } - pub unsafe fn timeZoneWithAbbreviation( - abbreviation: &NSString, - ) -> Option> { - msg_send_id![Self::class(), timeZoneWithAbbreviation: abbreviation] - } + ) -> Option>; + # [method_id (timeZoneForSecondsFromGMT :)] + pub unsafe fn timeZoneForSecondsFromGMT(seconds: NSInteger) -> Id; + # [method_id (timeZoneWithAbbreviation :)] + pub unsafe fn timeZoneWithAbbreviation(abbreviation: &NSString) + -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 50409eab8..9bb7632a0 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -3,7 +3,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSTimer; @@ -13,101 +13,55 @@ extern_class!( ); extern_methods!( unsafe impl NSTimer { + # [method_id (timerWithTimeInterval : invocation : repeats :)] pub unsafe fn timerWithTimeInterval_invocation_repeats( ti: NSTimeInterval, invocation: &NSInvocation, yesOrNo: bool, - ) -> Id { - msg_send_id![ - Self::class(), - timerWithTimeInterval: ti, - invocation: invocation, - repeats: yesOrNo - ] - } + ) -> Id; + # [method_id (scheduledTimerWithTimeInterval : invocation : repeats :)] pub unsafe fn scheduledTimerWithTimeInterval_invocation_repeats( ti: NSTimeInterval, invocation: &NSInvocation, yesOrNo: bool, - ) -> Id { - msg_send_id![ - Self::class(), - scheduledTimerWithTimeInterval: ti, - invocation: invocation, - repeats: yesOrNo - ] - } + ) -> Id; + # [method_id (timerWithTimeInterval : target : selector : userInfo : repeats :)] pub unsafe fn timerWithTimeInterval_target_selector_userInfo_repeats( ti: NSTimeInterval, aTarget: &Object, aSelector: Sel, userInfo: Option<&Object>, yesOrNo: bool, - ) -> Id { - msg_send_id![ - Self::class(), - timerWithTimeInterval: ti, - target: aTarget, - selector: aSelector, - userInfo: userInfo, - repeats: yesOrNo - ] - } + ) -> Id; + # [method_id (scheduledTimerWithTimeInterval : target : selector : userInfo : repeats :)] pub unsafe fn scheduledTimerWithTimeInterval_target_selector_userInfo_repeats( ti: NSTimeInterval, aTarget: &Object, aSelector: Sel, userInfo: Option<&Object>, yesOrNo: bool, - ) -> Id { - msg_send_id![ - Self::class(), - scheduledTimerWithTimeInterval: ti, - target: aTarget, - selector: aSelector, - userInfo: userInfo, - repeats: yesOrNo - ] - } + ) -> Id; + # [method_id (timerWithTimeInterval : repeats : block :)] pub unsafe fn timerWithTimeInterval_repeats_block( interval: NSTimeInterval, repeats: bool, block: TodoBlock, - ) -> Id { - msg_send_id![ - Self::class(), - timerWithTimeInterval: interval, - repeats: repeats, - block: block - ] - } + ) -> Id; + # [method_id (scheduledTimerWithTimeInterval : repeats : block :)] pub unsafe fn scheduledTimerWithTimeInterval_repeats_block( interval: NSTimeInterval, repeats: bool, block: TodoBlock, - ) -> Id { - msg_send_id![ - Self::class(), - scheduledTimerWithTimeInterval: interval, - repeats: repeats, - block: block - ] - } + ) -> Id; + # [method_id (initWithFireDate : interval : repeats : block :)] pub unsafe fn initWithFireDate_interval_repeats_block( &self, date: &NSDate, interval: NSTimeInterval, repeats: bool, block: TodoBlock, - ) -> Id { - msg_send_id![ - self, - initWithFireDate: date, - interval: interval, - repeats: repeats, - block: block - ] - } + ) -> Id; + # [method_id (initWithFireDate : interval : target : selector : userInfo : repeats :)] pub unsafe fn initWithFireDate_interval_target_selector_userInfo_repeats( &self, date: &NSDate, @@ -116,43 +70,24 @@ extern_methods!( s: Sel, ui: Option<&Object>, rep: bool, - ) -> Id { - msg_send_id![ - self, - initWithFireDate: date, - interval: ti, - target: t, - selector: s, - userInfo: ui, - repeats: rep - ] - } - pub unsafe fn fire(&self) { - msg_send![self, fire] - } - pub unsafe fn fireDate(&self) -> Id { - msg_send_id![self, fireDate] - } - pub unsafe fn setFireDate(&self, fireDate: &NSDate) { - msg_send![self, setFireDate: fireDate] - } - pub unsafe fn timeInterval(&self) -> NSTimeInterval { - msg_send![self, timeInterval] - } - pub unsafe fn tolerance(&self) -> NSTimeInterval { - msg_send![self, tolerance] - } - pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval) { - msg_send![self, setTolerance: tolerance] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn isValid(&self) -> bool { - msg_send![self, isValid] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } + ) -> Id; + #[method(fire)] + pub unsafe fn fire(&self); + #[method_id(fireDate)] + pub unsafe fn fireDate(&self) -> Id; + # [method (setFireDate :)] + pub unsafe fn setFireDate(&self, fireDate: &NSDate); + #[method(timeInterval)] + pub unsafe fn timeInterval(&self) -> NSTimeInterval; + #[method(tolerance)] + pub unsafe fn tolerance(&self) -> NSTimeInterval; + # [method (setTolerance :)] + pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval); + #[method(invalidate)] + pub unsafe fn invalidate(&self); + #[method(isValid)] + pub unsafe fn isValid(&self) -> bool; + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index a1a6a98e1..fa00b09ca 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSURLHandle::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSURLResourceKey = NSString; pub type NSURLFileResourceType = NSString; pub type NSURLThumbnailDictionaryItem = NSString; @@ -28,409 +28,256 @@ extern_class!( ); extern_methods!( unsafe impl NSURL { + # [method_id (initWithScheme : host : path :)] pub unsafe fn initWithScheme_host_path( &self, scheme: &NSString, host: Option<&NSString>, path: &NSString, - ) -> Option> { - msg_send_id![self, initWithScheme: scheme, host: host, path: path] - } + ) -> Option>; + # [method_id (initFileURLWithPath : isDirectory : relativeToURL :)] pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL( &self, path: &NSString, isDir: bool, baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - self, - initFileURLWithPath: path, - isDirectory: isDir, - relativeToURL: baseURL - ] - } + ) -> Id; + # [method_id (initFileURLWithPath : relativeToURL :)] pub unsafe fn initFileURLWithPath_relativeToURL( &self, path: &NSString, baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![self, initFileURLWithPath: path, relativeToURL: baseURL] - } + ) -> Id; + # [method_id (initFileURLWithPath : isDirectory :)] pub unsafe fn initFileURLWithPath_isDirectory( &self, path: &NSString, isDir: bool, - ) -> Id { - msg_send_id![self, initFileURLWithPath: path, isDirectory: isDir] - } - pub unsafe fn initFileURLWithPath(&self, path: &NSString) -> Id { - msg_send_id![self, initFileURLWithPath: path] - } + ) -> Id; + # [method_id (initFileURLWithPath :)] + pub unsafe fn initFileURLWithPath(&self, path: &NSString) -> Id; + # [method_id (fileURLWithPath : isDirectory : relativeToURL :)] pub unsafe fn fileURLWithPath_isDirectory_relativeToURL( path: &NSString, isDir: bool, baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - Self::class(), - fileURLWithPath: path, - isDirectory: isDir, - relativeToURL: baseURL - ] - } + ) -> Id; + # [method_id (fileURLWithPath : relativeToURL :)] pub unsafe fn fileURLWithPath_relativeToURL( path: &NSString, baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![Self::class(), fileURLWithPath: path, relativeToURL: baseURL] - } + ) -> Id; + # [method_id (fileURLWithPath : isDirectory :)] pub unsafe fn fileURLWithPath_isDirectory( path: &NSString, isDir: bool, - ) -> Id { - msg_send_id![Self::class(), fileURLWithPath: path, isDirectory: isDir] - } - pub unsafe fn fileURLWithPath(path: &NSString) -> Id { - msg_send_id![Self::class(), fileURLWithPath: path] - } + ) -> Id; + # [method_id (fileURLWithPath :)] + pub unsafe fn fileURLWithPath(path: &NSString) -> Id; + # [method_id (initFileURLWithFileSystemRepresentation : isDirectory : relativeToURL :)] pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL( &self, path: NonNull, isDir: bool, baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - self, - initFileURLWithFileSystemRepresentation: path, - isDirectory: isDir, - relativeToURL: baseURL - ] - } + ) -> Id; + # [method_id (fileURLWithFileSystemRepresentation : isDirectory : relativeToURL :)] pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL( path: NonNull, isDir: bool, baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - Self::class(), - fileURLWithFileSystemRepresentation: path, - isDirectory: isDir, - relativeToURL: baseURL - ] - } - pub unsafe fn initWithString(&self, URLString: &NSString) -> Option> { - msg_send_id![self, initWithString: URLString] - } + ) -> Id; + # [method_id (initWithString :)] + pub unsafe fn initWithString(&self, URLString: &NSString) -> Option>; + # [method_id (initWithString : relativeToURL :)] pub unsafe fn initWithString_relativeToURL( &self, URLString: &NSString, baseURL: Option<&NSURL>, - ) -> Option> { - msg_send_id![self, initWithString: URLString, relativeToURL: baseURL] - } - pub unsafe fn URLWithString(URLString: &NSString) -> Option> { - msg_send_id![Self::class(), URLWithString: URLString] - } + ) -> Option>; + # [method_id (URLWithString :)] + pub unsafe fn URLWithString(URLString: &NSString) -> Option>; + # [method_id (URLWithString : relativeToURL :)] pub unsafe fn URLWithString_relativeToURL( URLString: &NSString, baseURL: Option<&NSURL>, - ) -> Option> { - msg_send_id![ - Self::class(), - URLWithString: URLString, - relativeToURL: baseURL - ] - } + ) -> Option>; + # [method_id (initWithDataRepresentation : relativeToURL :)] pub unsafe fn initWithDataRepresentation_relativeToURL( &self, data: &NSData, baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - self, - initWithDataRepresentation: data, - relativeToURL: baseURL - ] - } + ) -> Id; + # [method_id (URLWithDataRepresentation : relativeToURL :)] pub unsafe fn URLWithDataRepresentation_relativeToURL( data: &NSData, baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - Self::class(), - URLWithDataRepresentation: data, - relativeToURL: baseURL - ] - } + ) -> Id; + # [method_id (initAbsoluteURLWithDataRepresentation : relativeToURL :)] pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL( &self, data: &NSData, baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - self, - initAbsoluteURLWithDataRepresentation: data, - relativeToURL: baseURL - ] - } + ) -> Id; + # [method_id (absoluteURLWithDataRepresentation : relativeToURL :)] pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL( data: &NSData, baseURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - Self::class(), - absoluteURLWithDataRepresentation: data, - relativeToURL: baseURL - ] - } - pub unsafe fn dataRepresentation(&self) -> Id { - msg_send_id![self, dataRepresentation] - } - pub unsafe fn absoluteString(&self) -> Option> { - msg_send_id![self, absoluteString] - } - pub unsafe fn relativeString(&self) -> Id { - msg_send_id![self, relativeString] - } - pub unsafe fn baseURL(&self) -> Option> { - msg_send_id![self, baseURL] - } - pub unsafe fn absoluteURL(&self) -> Option> { - msg_send_id![self, absoluteURL] - } - pub unsafe fn scheme(&self) -> Option> { - msg_send_id![self, scheme] - } - pub unsafe fn resourceSpecifier(&self) -> Option> { - msg_send_id![self, resourceSpecifier] - } - pub unsafe fn host(&self) -> Option> { - msg_send_id![self, host] - } - pub unsafe fn port(&self) -> Option> { - msg_send_id![self, port] - } - pub unsafe fn user(&self) -> Option> { - msg_send_id![self, user] - } - pub unsafe fn password(&self) -> Option> { - msg_send_id![self, password] - } - pub unsafe fn path(&self) -> Option> { - msg_send_id![self, path] - } - pub unsafe fn fragment(&self) -> Option> { - msg_send_id![self, fragment] - } - pub unsafe fn parameterString(&self) -> Option> { - msg_send_id![self, parameterString] - } - pub unsafe fn query(&self) -> Option> { - msg_send_id![self, query] - } - pub unsafe fn relativePath(&self) -> Option> { - msg_send_id![self, relativePath] - } - pub unsafe fn hasDirectoryPath(&self) -> bool { - msg_send![self, hasDirectoryPath] - } + ) -> Id; + #[method_id(dataRepresentation)] + pub unsafe fn dataRepresentation(&self) -> Id; + #[method_id(absoluteString)] + pub unsafe fn absoluteString(&self) -> Option>; + #[method_id(relativeString)] + pub unsafe fn relativeString(&self) -> Id; + #[method_id(baseURL)] + pub unsafe fn baseURL(&self) -> Option>; + #[method_id(absoluteURL)] + pub unsafe fn absoluteURL(&self) -> Option>; + #[method_id(scheme)] + pub unsafe fn scheme(&self) -> Option>; + #[method_id(resourceSpecifier)] + pub unsafe fn resourceSpecifier(&self) -> Option>; + #[method_id(host)] + pub unsafe fn host(&self) -> Option>; + #[method_id(port)] + pub unsafe fn port(&self) -> Option>; + #[method_id(user)] + pub unsafe fn user(&self) -> Option>; + #[method_id(password)] + pub unsafe fn password(&self) -> Option>; + #[method_id(path)] + pub unsafe fn path(&self) -> Option>; + #[method_id(fragment)] + pub unsafe fn fragment(&self) -> Option>; + #[method_id(parameterString)] + pub unsafe fn parameterString(&self) -> Option>; + #[method_id(query)] + pub unsafe fn query(&self) -> Option>; + #[method_id(relativePath)] + pub unsafe fn relativePath(&self) -> Option>; + #[method(hasDirectoryPath)] + pub unsafe fn hasDirectoryPath(&self) -> bool; + # [method (getFileSystemRepresentation : maxLength :)] pub unsafe fn getFileSystemRepresentation_maxLength( &self, buffer: NonNull, maxBufferLength: NSUInteger, - ) -> bool { - msg_send![ - self, - getFileSystemRepresentation: buffer, - maxLength: maxBufferLength - ] - } - pub unsafe fn fileSystemRepresentation(&self) -> NonNull { - msg_send![self, fileSystemRepresentation] - } - pub unsafe fn isFileURL(&self) -> bool { - msg_send![self, isFileURL] - } - pub unsafe fn standardizedURL(&self) -> Option> { - msg_send_id![self, standardizedURL] - } + ) -> bool; + #[method(fileSystemRepresentation)] + pub unsafe fn fileSystemRepresentation(&self) -> NonNull; + #[method(isFileURL)] + pub unsafe fn isFileURL(&self) -> bool; + #[method_id(standardizedURL)] + pub unsafe fn standardizedURL(&self) -> Option>; + # [method (checkResourceIsReachableAndReturnError :)] pub unsafe fn checkResourceIsReachableAndReturnError( &self, - ) -> Result<(), Id> { - msg_send![self, checkResourceIsReachableAndReturnError: _] - } - pub unsafe fn isFileReferenceURL(&self) -> bool { - msg_send![self, isFileReferenceURL] - } - pub unsafe fn fileReferenceURL(&self) -> Option> { - msg_send_id![self, fileReferenceURL] - } - pub unsafe fn filePathURL(&self) -> Option> { - msg_send_id![self, filePathURL] - } + ) -> Result<(), Id>; + #[method(isFileReferenceURL)] + pub unsafe fn isFileReferenceURL(&self) -> bool; + #[method_id(fileReferenceURL)] + pub unsafe fn fileReferenceURL(&self) -> Option>; + #[method_id(filePathURL)] + pub unsafe fn filePathURL(&self) -> Option>; + # [method (getResourceValue : forKey : error :)] pub unsafe fn getResourceValue_forKey_error( &self, value: &mut Option>, key: &NSURLResourceKey, - ) -> Result<(), Id> { - msg_send![self, getResourceValue: value, forKey: key, error: _] - } + ) -> Result<(), Id>; + # [method_id (resourceValuesForKeys : error :)] pub unsafe fn resourceValuesForKeys_error( &self, keys: &NSArray, - ) -> Result, Shared>, Id> - { - msg_send_id![self, resourceValuesForKeys: keys, error: _] - } + ) -> Result, Shared>, Id>; + # [method (setResourceValue : forKey : error :)] pub unsafe fn setResourceValue_forKey_error( &self, value: Option<&Object>, key: &NSURLResourceKey, - ) -> Result<(), Id> { - msg_send![self, setResourceValue: value, forKey: key, error: _] - } + ) -> Result<(), Id>; + # [method (setResourceValues : error :)] pub unsafe fn setResourceValues_error( &self, keyedValues: &NSDictionary, - ) -> Result<(), Id> { - msg_send![self, setResourceValues: keyedValues, error: _] - } - pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey) { - msg_send![self, removeCachedResourceValueForKey: key] - } - pub unsafe fn removeAllCachedResourceValues(&self) { - msg_send![self, removeAllCachedResourceValues] - } + ) -> Result<(), Id>; + # [method (removeCachedResourceValueForKey :)] + pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey); + #[method(removeAllCachedResourceValues)] + pub unsafe fn removeAllCachedResourceValues(&self); + # [method (setTemporaryResourceValue : forKey :)] pub unsafe fn setTemporaryResourceValue_forKey( &self, value: Option<&Object>, key: &NSURLResourceKey, - ) { - msg_send![self, setTemporaryResourceValue: value, forKey: key] - } + ); + # [method_id (bookmarkDataWithOptions : includingResourceValuesForKeys : relativeToURL : error :)] pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error( &self, options: NSURLBookmarkCreationOptions, keys: Option<&NSArray>, relativeURL: Option<&NSURL>, - ) -> Result, Id> { - msg_send_id![ - self, - bookmarkDataWithOptions: options, - includingResourceValuesForKeys: keys, - relativeToURL: relativeURL, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (initByResolvingBookmarkData : options : relativeToURL : bookmarkDataIsStale : error :)] pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( &self, bookmarkData: &NSData, options: NSURLBookmarkResolutionOptions, relativeURL: Option<&NSURL>, isStale: *mut bool, - ) -> Result, Id> { - msg_send_id![ - self, - initByResolvingBookmarkData: bookmarkData, - options: options, - relativeToURL: relativeURL, - bookmarkDataIsStale: isStale, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (URLByResolvingBookmarkData : options : relativeToURL : bookmarkDataIsStale : error :)] pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( bookmarkData: &NSData, options: NSURLBookmarkResolutionOptions, relativeURL: Option<&NSURL>, isStale: *mut bool, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - URLByResolvingBookmarkData: bookmarkData, - options: options, - relativeToURL: relativeURL, - bookmarkDataIsStale: isStale, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (resourceValuesForKeys : fromBookmarkData :)] pub unsafe fn resourceValuesForKeys_fromBookmarkData( keys: &NSArray, bookmarkData: &NSData, - ) -> Option, Shared>> { - msg_send_id![ - Self::class(), - resourceValuesForKeys: keys, - fromBookmarkData: bookmarkData - ] - } + ) -> Option, Shared>>; + # [method (writeBookmarkData : toURL : options : error :)] pub unsafe fn writeBookmarkData_toURL_options_error( bookmarkData: &NSData, bookmarkFileURL: &NSURL, options: NSURLBookmarkFileCreationOptions, - ) -> Result<(), Id> { - msg_send![ - Self::class(), - writeBookmarkData: bookmarkData, - toURL: bookmarkFileURL, - options: options, - error: _ - ] - } + ) -> Result<(), Id>; + # [method_id (bookmarkDataWithContentsOfURL : error :)] pub unsafe fn bookmarkDataWithContentsOfURL_error( bookmarkFileURL: &NSURL, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - bookmarkDataWithContentsOfURL: bookmarkFileURL, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (URLByResolvingAliasFileAtURL : options : error :)] pub unsafe fn URLByResolvingAliasFileAtURL_options_error( url: &NSURL, options: NSURLBookmarkResolutionOptions, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - URLByResolvingAliasFileAtURL: url, - options: options, - error: _ - ] - } - pub unsafe fn startAccessingSecurityScopedResource(&self) -> bool { - msg_send![self, startAccessingSecurityScopedResource] - } - pub unsafe fn stopAccessingSecurityScopedResource(&self) { - msg_send![self, stopAccessingSecurityScopedResource] - } + ) -> Result, Id>; + #[method(startAccessingSecurityScopedResource)] + pub unsafe fn startAccessingSecurityScopedResource(&self) -> bool; + #[method(stopAccessingSecurityScopedResource)] + pub unsafe fn stopAccessingSecurityScopedResource(&self); } ); extern_methods!( #[doc = "NSPromisedItems"] unsafe impl NSURL { + # [method (getPromisedItemResourceValue : forKey : error :)] pub unsafe fn getPromisedItemResourceValue_forKey_error( &self, value: &mut Option>, key: &NSURLResourceKey, - ) -> Result<(), Id> { - msg_send![ - self, - getPromisedItemResourceValue: value, - forKey: key, - error: _ - ] - } + ) -> Result<(), Id>; + # [method_id (promisedItemResourceValuesForKeys : error :)] pub unsafe fn promisedItemResourceValuesForKeys_error( &self, keys: &NSArray, - ) -> Result, Shared>, Id> - { - msg_send_id![self, promisedItemResourceValuesForKeys: keys, error: _] - } + ) -> Result, Shared>, Id>; + # [method (checkPromisedItemIsReachableAndReturnError :)] pub unsafe fn checkPromisedItemIsReachableAndReturnError( &self, - ) -> Result<(), Id> { - msg_send![self, checkPromisedItemIsReachableAndReturnError: _] - } + ) -> Result<(), Id>; } ); extern_methods!( @@ -446,25 +293,21 @@ extern_class!( ); extern_methods!( unsafe impl NSURLQueryItem { + # [method_id (initWithName : value :)] pub unsafe fn initWithName_value( &self, name: &NSString, value: Option<&NSString>, - ) -> Id { - msg_send_id![self, initWithName: name, value: value] - } + ) -> Id; + # [method_id (queryItemWithName : value :)] pub unsafe fn queryItemWithName_value( name: &NSString, value: Option<&NSString>, - ) -> Id { - msg_send_id![Self::class(), queryItemWithName: name, value: value] - } - pub unsafe fn name(&self) -> Id { - msg_send_id![self, name] - } - pub unsafe fn value(&self) -> Option> { - msg_send_id![self, value] - } + ) -> Id; + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method_id(value)] + pub unsafe fn value(&self) -> Option>; } ); extern_class!( @@ -476,275 +319,193 @@ extern_class!( ); extern_methods!( unsafe impl NSURLComponents { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithURL : resolvingAgainstBaseURL :)] pub unsafe fn initWithURL_resolvingAgainstBaseURL( &self, url: &NSURL, resolve: bool, - ) -> Option> { - msg_send_id![self, initWithURL: url, resolvingAgainstBaseURL: resolve] - } + ) -> Option>; + # [method_id (componentsWithURL : resolvingAgainstBaseURL :)] pub unsafe fn componentsWithURL_resolvingAgainstBaseURL( url: &NSURL, resolve: bool, - ) -> Option> { - msg_send_id![ - Self::class(), - componentsWithURL: url, - resolvingAgainstBaseURL: resolve - ] - } - pub unsafe fn initWithString(&self, URLString: &NSString) -> Option> { - msg_send_id![self, initWithString: URLString] - } - pub unsafe fn componentsWithString(URLString: &NSString) -> Option> { - msg_send_id![Self::class(), componentsWithString: URLString] - } - pub unsafe fn URL(&self) -> Option> { - msg_send_id![self, URL] - } - pub unsafe fn URLRelativeToURL( - &self, - baseURL: Option<&NSURL>, - ) -> Option> { - msg_send_id![self, URLRelativeToURL: baseURL] - } - pub unsafe fn string(&self) -> Option> { - msg_send_id![self, string] - } - pub unsafe fn scheme(&self) -> Option> { - msg_send_id![self, scheme] - } - pub unsafe fn setScheme(&self, scheme: Option<&NSString>) { - msg_send![self, setScheme: scheme] - } - pub unsafe fn user(&self) -> Option> { - msg_send_id![self, user] - } - pub unsafe fn setUser(&self, user: Option<&NSString>) { - msg_send![self, setUser: user] - } - pub unsafe fn password(&self) -> Option> { - msg_send_id![self, password] - } - pub unsafe fn setPassword(&self, password: Option<&NSString>) { - msg_send![self, setPassword: password] - } - pub unsafe fn host(&self) -> Option> { - msg_send_id![self, host] - } - pub unsafe fn setHost(&self, host: Option<&NSString>) { - msg_send![self, setHost: host] - } - pub unsafe fn port(&self) -> Option> { - msg_send_id![self, port] - } - pub unsafe fn setPort(&self, port: Option<&NSNumber>) { - msg_send![self, setPort: port] - } - pub unsafe fn path(&self) -> Option> { - msg_send_id![self, path] - } - pub unsafe fn setPath(&self, path: Option<&NSString>) { - msg_send![self, setPath: path] - } - pub unsafe fn query(&self) -> Option> { - msg_send_id![self, query] - } - pub unsafe fn setQuery(&self, query: Option<&NSString>) { - msg_send![self, setQuery: query] - } - pub unsafe fn fragment(&self) -> Option> { - msg_send_id![self, fragment] - } - pub unsafe fn setFragment(&self, fragment: Option<&NSString>) { - msg_send![self, setFragment: fragment] - } - pub unsafe fn percentEncodedUser(&self) -> Option> { - msg_send_id![self, percentEncodedUser] - } - pub unsafe fn setPercentEncodedUser(&self, percentEncodedUser: Option<&NSString>) { - msg_send![self, setPercentEncodedUser: percentEncodedUser] - } - pub unsafe fn percentEncodedPassword(&self) -> Option> { - msg_send_id![self, percentEncodedPassword] - } - pub unsafe fn setPercentEncodedPassword(&self, percentEncodedPassword: Option<&NSString>) { - msg_send![self, setPercentEncodedPassword: percentEncodedPassword] - } - pub unsafe fn percentEncodedHost(&self) -> Option> { - msg_send_id![self, percentEncodedHost] - } - pub unsafe fn setPercentEncodedHost(&self, percentEncodedHost: Option<&NSString>) { - msg_send![self, setPercentEncodedHost: percentEncodedHost] - } - pub unsafe fn percentEncodedPath(&self) -> Option> { - msg_send_id![self, percentEncodedPath] - } - pub unsafe fn setPercentEncodedPath(&self, percentEncodedPath: Option<&NSString>) { - msg_send![self, setPercentEncodedPath: percentEncodedPath] - } - pub unsafe fn percentEncodedQuery(&self) -> Option> { - msg_send_id![self, percentEncodedQuery] - } - pub unsafe fn setPercentEncodedQuery(&self, percentEncodedQuery: Option<&NSString>) { - msg_send![self, setPercentEncodedQuery: percentEncodedQuery] - } - pub unsafe fn percentEncodedFragment(&self) -> Option> { - msg_send_id![self, percentEncodedFragment] - } - pub unsafe fn setPercentEncodedFragment(&self, percentEncodedFragment: Option<&NSString>) { - msg_send![self, setPercentEncodedFragment: percentEncodedFragment] - } - pub unsafe fn rangeOfScheme(&self) -> NSRange { - msg_send![self, rangeOfScheme] - } - pub unsafe fn rangeOfUser(&self) -> NSRange { - msg_send![self, rangeOfUser] - } - pub unsafe fn rangeOfPassword(&self) -> NSRange { - msg_send![self, rangeOfPassword] - } - pub unsafe fn rangeOfHost(&self) -> NSRange { - msg_send![self, rangeOfHost] - } - pub unsafe fn rangeOfPort(&self) -> NSRange { - msg_send![self, rangeOfPort] - } - pub unsafe fn rangeOfPath(&self) -> NSRange { - msg_send![self, rangeOfPath] - } - pub unsafe fn rangeOfQuery(&self) -> NSRange { - msg_send![self, rangeOfQuery] - } - pub unsafe fn rangeOfFragment(&self) -> NSRange { - msg_send![self, rangeOfFragment] - } - pub unsafe fn queryItems(&self) -> Option, Shared>> { - msg_send_id![self, queryItems] - } - pub unsafe fn setQueryItems(&self, queryItems: Option<&NSArray>) { - msg_send![self, setQueryItems: queryItems] - } + ) -> Option>; + # [method_id (initWithString :)] + pub unsafe fn initWithString(&self, URLString: &NSString) -> Option>; + # [method_id (componentsWithString :)] + pub unsafe fn componentsWithString(URLString: &NSString) -> Option>; + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + # [method_id (URLRelativeToURL :)] + pub unsafe fn URLRelativeToURL(&self, baseURL: Option<&NSURL>) + -> Option>; + #[method_id(string)] + pub unsafe fn string(&self) -> Option>; + #[method_id(scheme)] + pub unsafe fn scheme(&self) -> Option>; + # [method (setScheme :)] + pub unsafe fn setScheme(&self, scheme: Option<&NSString>); + #[method_id(user)] + pub unsafe fn user(&self) -> Option>; + # [method (setUser :)] + pub unsafe fn setUser(&self, user: Option<&NSString>); + #[method_id(password)] + pub unsafe fn password(&self) -> Option>; + # [method (setPassword :)] + pub unsafe fn setPassword(&self, password: Option<&NSString>); + #[method_id(host)] + pub unsafe fn host(&self) -> Option>; + # [method (setHost :)] + pub unsafe fn setHost(&self, host: Option<&NSString>); + #[method_id(port)] + pub unsafe fn port(&self) -> Option>; + # [method (setPort :)] + pub unsafe fn setPort(&self, port: Option<&NSNumber>); + #[method_id(path)] + pub unsafe fn path(&self) -> Option>; + # [method (setPath :)] + pub unsafe fn setPath(&self, path: Option<&NSString>); + #[method_id(query)] + pub unsafe fn query(&self) -> Option>; + # [method (setQuery :)] + pub unsafe fn setQuery(&self, query: Option<&NSString>); + #[method_id(fragment)] + pub unsafe fn fragment(&self) -> Option>; + # [method (setFragment :)] + pub unsafe fn setFragment(&self, fragment: Option<&NSString>); + #[method_id(percentEncodedUser)] + pub unsafe fn percentEncodedUser(&self) -> Option>; + # [method (setPercentEncodedUser :)] + pub unsafe fn setPercentEncodedUser(&self, percentEncodedUser: Option<&NSString>); + #[method_id(percentEncodedPassword)] + pub unsafe fn percentEncodedPassword(&self) -> Option>; + # [method (setPercentEncodedPassword :)] + pub unsafe fn setPercentEncodedPassword(&self, percentEncodedPassword: Option<&NSString>); + #[method_id(percentEncodedHost)] + pub unsafe fn percentEncodedHost(&self) -> Option>; + # [method (setPercentEncodedHost :)] + pub unsafe fn setPercentEncodedHost(&self, percentEncodedHost: Option<&NSString>); + #[method_id(percentEncodedPath)] + pub unsafe fn percentEncodedPath(&self) -> Option>; + # [method (setPercentEncodedPath :)] + pub unsafe fn setPercentEncodedPath(&self, percentEncodedPath: Option<&NSString>); + #[method_id(percentEncodedQuery)] + pub unsafe fn percentEncodedQuery(&self) -> Option>; + # [method (setPercentEncodedQuery :)] + pub unsafe fn setPercentEncodedQuery(&self, percentEncodedQuery: Option<&NSString>); + #[method_id(percentEncodedFragment)] + pub unsafe fn percentEncodedFragment(&self) -> Option>; + # [method (setPercentEncodedFragment :)] + pub unsafe fn setPercentEncodedFragment(&self, percentEncodedFragment: Option<&NSString>); + #[method(rangeOfScheme)] + pub unsafe fn rangeOfScheme(&self) -> NSRange; + #[method(rangeOfUser)] + pub unsafe fn rangeOfUser(&self) -> NSRange; + #[method(rangeOfPassword)] + pub unsafe fn rangeOfPassword(&self) -> NSRange; + #[method(rangeOfHost)] + pub unsafe fn rangeOfHost(&self) -> NSRange; + #[method(rangeOfPort)] + pub unsafe fn rangeOfPort(&self) -> NSRange; + #[method(rangeOfPath)] + pub unsafe fn rangeOfPath(&self) -> NSRange; + #[method(rangeOfQuery)] + pub unsafe fn rangeOfQuery(&self) -> NSRange; + #[method(rangeOfFragment)] + pub unsafe fn rangeOfFragment(&self) -> NSRange; + #[method_id(queryItems)] + pub unsafe fn queryItems(&self) -> Option, Shared>>; + # [method (setQueryItems :)] + pub unsafe fn setQueryItems(&self, queryItems: Option<&NSArray>); + #[method_id(percentEncodedQueryItems)] pub unsafe fn percentEncodedQueryItems( &self, - ) -> Option, Shared>> { - msg_send_id![self, percentEncodedQueryItems] - } + ) -> Option, Shared>>; + # [method (setPercentEncodedQueryItems :)] pub unsafe fn setPercentEncodedQueryItems( &self, percentEncodedQueryItems: Option<&NSArray>, - ) { - msg_send![self, setPercentEncodedQueryItems: percentEncodedQueryItems] - } + ); } ); extern_methods!( #[doc = "NSURLUtilities"] unsafe impl NSCharacterSet { - pub unsafe fn URLUserAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLUserAllowedCharacterSet] - } - pub unsafe fn URLPasswordAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLPasswordAllowedCharacterSet] - } - pub unsafe fn URLHostAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLHostAllowedCharacterSet] - } - pub unsafe fn URLPathAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLPathAllowedCharacterSet] - } - pub unsafe fn URLQueryAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLQueryAllowedCharacterSet] - } - pub unsafe fn URLFragmentAllowedCharacterSet() -> Id { - msg_send_id![Self::class(), URLFragmentAllowedCharacterSet] - } + #[method_id(URLUserAllowedCharacterSet)] + pub unsafe fn URLUserAllowedCharacterSet() -> Id; + #[method_id(URLPasswordAllowedCharacterSet)] + pub unsafe fn URLPasswordAllowedCharacterSet() -> Id; + #[method_id(URLHostAllowedCharacterSet)] + pub unsafe fn URLHostAllowedCharacterSet() -> Id; + #[method_id(URLPathAllowedCharacterSet)] + pub unsafe fn URLPathAllowedCharacterSet() -> Id; + #[method_id(URLQueryAllowedCharacterSet)] + pub unsafe fn URLQueryAllowedCharacterSet() -> Id; + #[method_id(URLFragmentAllowedCharacterSet)] + pub unsafe fn URLFragmentAllowedCharacterSet() -> Id; } ); extern_methods!( #[doc = "NSURLUtilities"] unsafe impl NSString { + # [method_id (stringByAddingPercentEncodingWithAllowedCharacters :)] pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters( &self, allowedCharacters: &NSCharacterSet, - ) -> Option> { - msg_send_id![ - self, - stringByAddingPercentEncodingWithAllowedCharacters: allowedCharacters - ] - } - pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option> { - msg_send_id![self, stringByRemovingPercentEncoding] - } + ) -> Option>; + #[method_id(stringByRemovingPercentEncoding)] + pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option>; + # [method_id (stringByAddingPercentEscapesUsingEncoding :)] pub unsafe fn stringByAddingPercentEscapesUsingEncoding( &self, enc: NSStringEncoding, - ) -> Option> { - msg_send_id![self, stringByAddingPercentEscapesUsingEncoding: enc] - } + ) -> Option>; + # [method_id (stringByReplacingPercentEscapesUsingEncoding :)] pub unsafe fn stringByReplacingPercentEscapesUsingEncoding( &self, enc: NSStringEncoding, - ) -> Option> { - msg_send_id![self, stringByReplacingPercentEscapesUsingEncoding: enc] - } + ) -> Option>; } ); extern_methods!( #[doc = "NSURLPathUtilities"] unsafe impl NSURL { + # [method_id (fileURLWithPathComponents :)] pub unsafe fn fileURLWithPathComponents( components: &NSArray, - ) -> Option> { - msg_send_id![Self::class(), fileURLWithPathComponents: components] - } - pub unsafe fn pathComponents(&self) -> Option, Shared>> { - msg_send_id![self, pathComponents] - } - pub unsafe fn lastPathComponent(&self) -> Option> { - msg_send_id![self, lastPathComponent] - } - pub unsafe fn pathExtension(&self) -> Option> { - msg_send_id![self, pathExtension] - } + ) -> Option>; + #[method_id(pathComponents)] + pub unsafe fn pathComponents(&self) -> Option, Shared>>; + #[method_id(lastPathComponent)] + pub unsafe fn lastPathComponent(&self) -> Option>; + #[method_id(pathExtension)] + pub unsafe fn pathExtension(&self) -> Option>; + # [method_id (URLByAppendingPathComponent :)] pub unsafe fn URLByAppendingPathComponent( &self, pathComponent: &NSString, - ) -> Option> { - msg_send_id![self, URLByAppendingPathComponent: pathComponent] - } + ) -> Option>; + # [method_id (URLByAppendingPathComponent : isDirectory :)] pub unsafe fn URLByAppendingPathComponent_isDirectory( &self, pathComponent: &NSString, isDirectory: bool, - ) -> Option> { - msg_send_id![ - self, - URLByAppendingPathComponent: pathComponent, - isDirectory: isDirectory - ] - } - pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option> { - msg_send_id![self, URLByDeletingLastPathComponent] - } + ) -> Option>; + #[method_id(URLByDeletingLastPathComponent)] + pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option>; + # [method_id (URLByAppendingPathExtension :)] pub unsafe fn URLByAppendingPathExtension( &self, pathExtension: &NSString, - ) -> Option> { - msg_send_id![self, URLByAppendingPathExtension: pathExtension] - } - pub unsafe fn URLByDeletingPathExtension(&self) -> Option> { - msg_send_id![self, URLByDeletingPathExtension] - } - pub unsafe fn URLByStandardizingPath(&self) -> Option> { - msg_send_id![self, URLByStandardizingPath] - } - pub unsafe fn URLByResolvingSymlinksInPath(&self) -> Option> { - msg_send_id![self, URLByResolvingSymlinksInPath] - } + ) -> Option>; + #[method_id(URLByDeletingPathExtension)] + pub unsafe fn URLByDeletingPathExtension(&self) -> Option>; + #[method_id(URLByStandardizingPath)] + pub unsafe fn URLByStandardizingPath(&self) -> Option>; + #[method_id(URLByResolvingSymlinksInPath)] + pub unsafe fn URLByResolvingSymlinksInPath(&self) -> Option>; } ); extern_class!( @@ -756,66 +517,51 @@ extern_class!( ); extern_methods!( unsafe impl NSFileSecurity { - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSURLClient"] unsafe impl NSObject { - pub unsafe fn URL_resourceDataDidBecomeAvailable(&self, sender: &NSURL, newBytes: &NSData) { - msg_send![self, URL: sender, resourceDataDidBecomeAvailable: newBytes] - } - pub unsafe fn URLResourceDidFinishLoading(&self, sender: &NSURL) { - msg_send![self, URLResourceDidFinishLoading: sender] - } - pub unsafe fn URLResourceDidCancelLoading(&self, sender: &NSURL) { - msg_send![self, URLResourceDidCancelLoading: sender] - } + # [method (URL : resourceDataDidBecomeAvailable :)] + pub unsafe fn URL_resourceDataDidBecomeAvailable(&self, sender: &NSURL, newBytes: &NSData); + # [method (URLResourceDidFinishLoading :)] + pub unsafe fn URLResourceDidFinishLoading(&self, sender: &NSURL); + # [method (URLResourceDidCancelLoading :)] + pub unsafe fn URLResourceDidCancelLoading(&self, sender: &NSURL); + # [method (URL : resourceDidFailLoadingWithReason :)] pub unsafe fn URL_resourceDidFailLoadingWithReason( &self, sender: &NSURL, reason: &NSString, - ) { - msg_send![self, URL: sender, resourceDidFailLoadingWithReason: reason] - } + ); } ); extern_methods!( #[doc = "NSURLLoading"] unsafe impl NSURL { + # [method_id (resourceDataUsingCache :)] pub unsafe fn resourceDataUsingCache( &self, shouldUseCache: bool, - ) -> Option> { - msg_send_id![self, resourceDataUsingCache: shouldUseCache] - } + ) -> Option>; + # [method (loadResourceDataNotifyingClient : usingCache :)] pub unsafe fn loadResourceDataNotifyingClient_usingCache( &self, client: &Object, shouldUseCache: bool, - ) { - msg_send![ - self, - loadResourceDataNotifyingClient: client, - usingCache: shouldUseCache - ] - } - pub unsafe fn propertyForKey(&self, propertyKey: &NSString) -> Option> { - msg_send_id![self, propertyForKey: propertyKey] - } - pub unsafe fn setResourceData(&self, data: &NSData) -> bool { - msg_send![self, setResourceData: data] - } - pub unsafe fn setProperty_forKey(&self, property: &Object, propertyKey: &NSString) -> bool { - msg_send![self, setProperty: property, forKey: propertyKey] - } + ); + # [method_id (propertyForKey :)] + pub unsafe fn propertyForKey(&self, propertyKey: &NSString) -> Option>; + # [method (setResourceData :)] + pub unsafe fn setResourceData(&self, data: &NSData) -> bool; + # [method (setProperty : forKey :)] + pub unsafe fn setProperty_forKey(&self, property: &Object, propertyKey: &NSString) -> bool; + # [method_id (URLHandleUsingCache :)] pub unsafe fn URLHandleUsingCache( &self, shouldUseCache: bool, - ) -> Option> { - msg_send_id![self, URLHandleUsingCache: shouldUseCache] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index d43c357e4..7ae011b46 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSURLAuthenticationChallengeSender = NSObject; use super::__exported::NSURLAuthenticationChallengeInternal; extern_class!( @@ -18,6 +18,7 @@ extern_class!( ); extern_methods!( unsafe impl NSURLAuthenticationChallenge { + # [method_id (initWithProtectionSpace : proposedCredential : previousFailureCount : failureResponse : error : sender :)] pub unsafe fn initWithProtectionSpace_proposedCredential_previousFailureCount_failureResponse_error_sender( &self, space: &NSURLProtectionSpace, @@ -26,45 +27,24 @@ extern_methods!( response: Option<&NSURLResponse>, error: Option<&NSError>, sender: &NSURLAuthenticationChallengeSender, - ) -> Id { - msg_send_id![ - self, - initWithProtectionSpace: space, - proposedCredential: credential, - previousFailureCount: previousFailureCount, - failureResponse: response, - error: error, - sender: sender - ] - } + ) -> Id; + # [method_id (initWithAuthenticationChallenge : sender :)] pub unsafe fn initWithAuthenticationChallenge_sender( &self, challenge: &NSURLAuthenticationChallenge, sender: &NSURLAuthenticationChallengeSender, - ) -> Id { - msg_send_id![ - self, - initWithAuthenticationChallenge: challenge, - sender: sender - ] - } - pub unsafe fn protectionSpace(&self) -> Id { - msg_send_id![self, protectionSpace] - } - pub unsafe fn proposedCredential(&self) -> Option> { - msg_send_id![self, proposedCredential] - } - pub unsafe fn previousFailureCount(&self) -> NSInteger { - msg_send![self, previousFailureCount] - } - pub unsafe fn failureResponse(&self) -> Option> { - msg_send_id![self, failureResponse] - } - pub unsafe fn error(&self) -> Option> { - msg_send_id![self, error] - } - pub unsafe fn sender(&self) -> Option> { - msg_send_id![self, sender] - } + ) -> Id; + #[method_id(protectionSpace)] + pub unsafe fn protectionSpace(&self) -> Id; + #[method_id(proposedCredential)] + pub unsafe fn proposedCredential(&self) -> Option>; + #[method(previousFailureCount)] + pub unsafe fn previousFailureCount(&self) -> NSInteger; + #[method_id(failureResponse)] + pub unsafe fn failureResponse(&self) -> Option>; + #[method_id(error)] + pub unsafe fn error(&self) -> Option>; + #[method_id(sender)] + pub unsafe fn sender(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index c7941f12e..f153d432c 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSCachedURLResponse; @@ -19,40 +19,28 @@ extern_class!( ); extern_methods!( unsafe impl NSCachedURLResponse { + # [method_id (initWithResponse : data :)] pub unsafe fn initWithResponse_data( &self, response: &NSURLResponse, data: &NSData, - ) -> Id { - msg_send_id![self, initWithResponse: response, data: data] - } + ) -> Id; + # [method_id (initWithResponse : data : userInfo : storagePolicy :)] pub unsafe fn initWithResponse_data_userInfo_storagePolicy( &self, response: &NSURLResponse, data: &NSData, userInfo: Option<&NSDictionary>, storagePolicy: NSURLCacheStoragePolicy, - ) -> Id { - msg_send_id![ - self, - initWithResponse: response, - data: data, - userInfo: userInfo, - storagePolicy: storagePolicy - ] - } - pub unsafe fn response(&self) -> Id { - msg_send_id![self, response] - } - pub unsafe fn data(&self) -> Id { - msg_send_id![self, data] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } - pub unsafe fn storagePolicy(&self) -> NSURLCacheStoragePolicy { - msg_send![self, storagePolicy] - } + ) -> Id; + #[method_id(response)] + pub unsafe fn response(&self) -> Id; + #[method_id(data)] + pub unsafe fn data(&self) -> Id; + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + #[method(storagePolicy)] + pub unsafe fn storagePolicy(&self) -> NSURLCacheStoragePolicy; } ); use super::__exported::NSURLCacheInternal; @@ -66,111 +54,71 @@ extern_class!( ); extern_methods!( unsafe impl NSURLCache { - pub unsafe fn sharedURLCache() -> Id { - msg_send_id![Self::class(), sharedURLCache] - } - pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache) { - msg_send![Self::class(), setSharedURLCache: sharedURLCache] - } + #[method_id(sharedURLCache)] + pub unsafe fn sharedURLCache() -> Id; + # [method (setSharedURLCache :)] + pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache); + # [method_id (initWithMemoryCapacity : diskCapacity : diskPath :)] pub unsafe fn initWithMemoryCapacity_diskCapacity_diskPath( &self, memoryCapacity: NSUInteger, diskCapacity: NSUInteger, path: Option<&NSString>, - ) -> Id { - msg_send_id![ - self, - initWithMemoryCapacity: memoryCapacity, - diskCapacity: diskCapacity, - diskPath: path - ] - } + ) -> Id; + # [method_id (initWithMemoryCapacity : diskCapacity : directoryURL :)] pub unsafe fn initWithMemoryCapacity_diskCapacity_directoryURL( &self, memoryCapacity: NSUInteger, diskCapacity: NSUInteger, directoryURL: Option<&NSURL>, - ) -> Id { - msg_send_id![ - self, - initWithMemoryCapacity: memoryCapacity, - diskCapacity: diskCapacity, - directoryURL: directoryURL - ] - } + ) -> Id; + # [method_id (cachedResponseForRequest :)] pub unsafe fn cachedResponseForRequest( &self, request: &NSURLRequest, - ) -> Option> { - msg_send_id![self, cachedResponseForRequest: request] - } + ) -> Option>; + # [method (storeCachedResponse : forRequest :)] pub unsafe fn storeCachedResponse_forRequest( &self, cachedResponse: &NSCachedURLResponse, request: &NSURLRequest, - ) { - msg_send![ - self, - storeCachedResponse: cachedResponse, - forRequest: request - ] - } - pub unsafe fn removeCachedResponseForRequest(&self, request: &NSURLRequest) { - msg_send![self, removeCachedResponseForRequest: request] - } - pub unsafe fn removeAllCachedResponses(&self) { - msg_send![self, removeAllCachedResponses] - } - pub unsafe fn removeCachedResponsesSinceDate(&self, date: &NSDate) { - msg_send![self, removeCachedResponsesSinceDate: date] - } - pub unsafe fn memoryCapacity(&self) -> NSUInteger { - msg_send![self, memoryCapacity] - } - pub unsafe fn setMemoryCapacity(&self, memoryCapacity: NSUInteger) { - msg_send![self, setMemoryCapacity: memoryCapacity] - } - pub unsafe fn diskCapacity(&self) -> NSUInteger { - msg_send![self, diskCapacity] - } - pub unsafe fn setDiskCapacity(&self, diskCapacity: NSUInteger) { - msg_send![self, setDiskCapacity: diskCapacity] - } - pub unsafe fn currentMemoryUsage(&self) -> NSUInteger { - msg_send![self, currentMemoryUsage] - } - pub unsafe fn currentDiskUsage(&self) -> NSUInteger { - msg_send![self, currentDiskUsage] - } + ); + # [method (removeCachedResponseForRequest :)] + pub unsafe fn removeCachedResponseForRequest(&self, request: &NSURLRequest); + #[method(removeAllCachedResponses)] + pub unsafe fn removeAllCachedResponses(&self); + # [method (removeCachedResponsesSinceDate :)] + pub unsafe fn removeCachedResponsesSinceDate(&self, date: &NSDate); + #[method(memoryCapacity)] + pub unsafe fn memoryCapacity(&self) -> NSUInteger; + # [method (setMemoryCapacity :)] + pub unsafe fn setMemoryCapacity(&self, memoryCapacity: NSUInteger); + #[method(diskCapacity)] + pub unsafe fn diskCapacity(&self) -> NSUInteger; + # [method (setDiskCapacity :)] + pub unsafe fn setDiskCapacity(&self, diskCapacity: NSUInteger); + #[method(currentMemoryUsage)] + pub unsafe fn currentMemoryUsage(&self) -> NSUInteger; + #[method(currentDiskUsage)] + pub unsafe fn currentDiskUsage(&self) -> NSUInteger; } ); extern_methods!( #[doc = "NSURLSessionTaskAdditions"] unsafe impl NSURLCache { + # [method (storeCachedResponse : forDataTask :)] pub unsafe fn storeCachedResponse_forDataTask( &self, cachedResponse: &NSCachedURLResponse, dataTask: &NSURLSessionDataTask, - ) { - msg_send![ - self, - storeCachedResponse: cachedResponse, - forDataTask: dataTask - ] - } + ); + # [method (getCachedResponseForDataTask : completionHandler :)] pub unsafe fn getCachedResponseForDataTask_completionHandler( &self, dataTask: &NSURLSessionDataTask, completionHandler: TodoBlock, - ) { - msg_send![ - self, - getCachedResponseForDataTask: dataTask, - completionHandler: completionHandler - ] - } - pub unsafe fn removeCachedResponseForDataTask(&self, dataTask: &NSURLSessionDataTask) { - msg_send![self, removeCachedResponseForDataTask: dataTask] - } + ); + # [method (removeCachedResponseForDataTask :)] + pub unsafe fn removeCachedResponseForDataTask(&self, dataTask: &NSURLSessionDataTask); } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index f792eb1e2..c3ca51cbc 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -16,7 +16,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLConnection; @@ -26,64 +26,44 @@ extern_class!( ); extern_methods!( unsafe impl NSURLConnection { + # [method_id (initWithRequest : delegate : startImmediately :)] pub unsafe fn initWithRequest_delegate_startImmediately( &self, request: &NSURLRequest, delegate: Option<&Object>, startImmediately: bool, - ) -> Option> { - msg_send_id![ - self, - initWithRequest: request, - delegate: delegate, - startImmediately: startImmediately - ] - } + ) -> Option>; + # [method_id (initWithRequest : delegate :)] pub unsafe fn initWithRequest_delegate( &self, request: &NSURLRequest, delegate: Option<&Object>, - ) -> Option> { - msg_send_id![self, initWithRequest: request, delegate: delegate] - } + ) -> Option>; + # [method_id (connectionWithRequest : delegate :)] pub unsafe fn connectionWithRequest_delegate( request: &NSURLRequest, delegate: Option<&Object>, - ) -> Option> { - msg_send_id![ - Self::class(), - connectionWithRequest: request, - delegate: delegate - ] - } - pub unsafe fn originalRequest(&self) -> Id { - msg_send_id![self, originalRequest] - } - pub unsafe fn currentRequest(&self) -> Id { - msg_send_id![self, currentRequest] - } - pub unsafe fn start(&self) { - msg_send![self, start] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode) { - msg_send![self, scheduleInRunLoop: aRunLoop, forMode: mode] - } + ) -> Option>; + #[method_id(originalRequest)] + pub unsafe fn originalRequest(&self) -> Id; + #[method_id(currentRequest)] + pub unsafe fn currentRequest(&self) -> Id; + #[method(start)] + pub unsafe fn start(&self); + #[method(cancel)] + pub unsafe fn cancel(&self); + # [method (scheduleInRunLoop : forMode :)] + pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + # [method (unscheduleFromRunLoop : forMode :)] pub unsafe fn unscheduleFromRunLoop_forMode( &self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode, - ) { - msg_send![self, unscheduleFromRunLoop: aRunLoop, forMode: mode] - } - pub unsafe fn setDelegateQueue(&self, queue: Option<&NSOperationQueue>) { - msg_send![self, setDelegateQueue: queue] - } - pub unsafe fn canHandleRequest(request: &NSURLRequest) -> bool { - msg_send![Self::class(), canHandleRequest: request] - } + ); + # [method (setDelegateQueue :)] + pub unsafe fn setDelegateQueue(&self, queue: Option<&NSOperationQueue>); + # [method (canHandleRequest :)] + pub unsafe fn canHandleRequest(request: &NSURLRequest) -> bool; } ); pub type NSURLConnectionDelegate = NSObject; @@ -92,33 +72,21 @@ pub type NSURLConnectionDownloadDelegate = NSObject; extern_methods!( #[doc = "NSURLConnectionSynchronousLoading"] unsafe impl NSURLConnection { + # [method_id (sendSynchronousRequest : returningResponse : error :)] pub unsafe fn sendSynchronousRequest_returningResponse_error( request: &NSURLRequest, response: Option<&mut Option>>, - ) -> Result, Id> { - msg_send_id![ - Self::class(), - sendSynchronousRequest: request, - returningResponse: response, - error: _ - ] - } + ) -> Result, Id>; } ); extern_methods!( #[doc = "NSURLConnectionQueuedLoading"] unsafe impl NSURLConnection { + # [method (sendAsynchronousRequest : queue : completionHandler :)] pub unsafe fn sendAsynchronousRequest_queue_completionHandler( request: &NSURLRequest, queue: &NSOperationQueue, handler: TodoBlock, - ) { - msg_send![ - Self::class(), - sendAsynchronousRequest: request, - queue: queue, - completionHandler: handler - ] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index c5a48ccae..5b0e47810 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -6,7 +6,7 @@ use crate::Security::generated::Security::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLCredential; @@ -16,94 +16,62 @@ extern_class!( ); extern_methods!( unsafe impl NSURLCredential { - pub unsafe fn persistence(&self) -> NSURLCredentialPersistence { - msg_send![self, persistence] - } + #[method(persistence)] + pub unsafe fn persistence(&self) -> NSURLCredentialPersistence; } ); extern_methods!( #[doc = "NSInternetPassword"] unsafe impl NSURLCredential { + # [method_id (initWithUser : password : persistence :)] pub unsafe fn initWithUser_password_persistence( &self, user: &NSString, password: &NSString, persistence: NSURLCredentialPersistence, - ) -> Id { - msg_send_id![ - self, - initWithUser: user, - password: password, - persistence: persistence - ] - } + ) -> Id; + # [method_id (credentialWithUser : password : persistence :)] pub unsafe fn credentialWithUser_password_persistence( user: &NSString, password: &NSString, persistence: NSURLCredentialPersistence, - ) -> Id { - msg_send_id![ - Self::class(), - credentialWithUser: user, - password: password, - persistence: persistence - ] - } - pub unsafe fn user(&self) -> Option> { - msg_send_id![self, user] - } - pub unsafe fn password(&self) -> Option> { - msg_send_id![self, password] - } - pub unsafe fn hasPassword(&self) -> bool { - msg_send![self, hasPassword] - } + ) -> Id; + #[method_id(user)] + pub unsafe fn user(&self) -> Option>; + #[method_id(password)] + pub unsafe fn password(&self) -> Option>; + #[method(hasPassword)] + pub unsafe fn hasPassword(&self) -> bool; } ); extern_methods!( #[doc = "NSClientCertificate"] unsafe impl NSURLCredential { + # [method_id (initWithIdentity : certificates : persistence :)] pub unsafe fn initWithIdentity_certificates_persistence( &self, identity: SecIdentityRef, certArray: Option<&NSArray>, persistence: NSURLCredentialPersistence, - ) -> Id { - msg_send_id![ - self, - initWithIdentity: identity, - certificates: certArray, - persistence: persistence - ] - } + ) -> Id; + # [method_id (credentialWithIdentity : certificates : persistence :)] pub unsafe fn credentialWithIdentity_certificates_persistence( identity: SecIdentityRef, certArray: Option<&NSArray>, persistence: NSURLCredentialPersistence, - ) -> Id { - msg_send_id![ - Self::class(), - credentialWithIdentity: identity, - certificates: certArray, - persistence: persistence - ] - } - pub unsafe fn identity(&self) -> SecIdentityRef { - msg_send![self, identity] - } - pub unsafe fn certificates(&self) -> Id { - msg_send_id![self, certificates] - } + ) -> Id; + #[method(identity)] + pub unsafe fn identity(&self) -> SecIdentityRef; + #[method_id(certificates)] + pub unsafe fn certificates(&self) -> Id; } ); extern_methods!( #[doc = "NSServerTrust"] unsafe impl NSURLCredential { - pub unsafe fn initWithTrust(&self, trust: SecTrustRef) -> Id { - msg_send_id![self, initWithTrust: trust] - } - pub unsafe fn credentialForTrust(trust: SecTrustRef) -> Id { - msg_send_id![Self::class(), credentialForTrust: trust] - } + # [method_id (initWithTrust :)] + pub unsafe fn initWithTrust(&self, trust: SecTrustRef) -> Id; + # [method_id (credentialForTrust :)] + pub unsafe fn credentialForTrust(trust: SecTrustRef) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 165f0a1b3..936fa5242 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSURLProtectionSpace::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLCredentialStorage; @@ -19,140 +19,87 @@ extern_class!( ); extern_methods!( unsafe impl NSURLCredentialStorage { - pub unsafe fn sharedCredentialStorage() -> Id { - msg_send_id![Self::class(), sharedCredentialStorage] - } + #[method_id(sharedCredentialStorage)] + pub unsafe fn sharedCredentialStorage() -> Id; + # [method_id (credentialsForProtectionSpace :)] pub unsafe fn credentialsForProtectionSpace( &self, space: &NSURLProtectionSpace, - ) -> Option, Shared>> { - msg_send_id![self, credentialsForProtectionSpace: space] - } + ) -> Option, Shared>>; + #[method_id(allCredentials)] pub unsafe fn allCredentials( &self, - ) -> Id>, Shared> - { - msg_send_id![self, allCredentials] - } + ) -> Id>, Shared>; + # [method (setCredential : forProtectionSpace :)] pub unsafe fn setCredential_forProtectionSpace( &self, credential: &NSURLCredential, space: &NSURLProtectionSpace, - ) { - msg_send![self, setCredential: credential, forProtectionSpace: space] - } + ); + # [method (removeCredential : forProtectionSpace :)] pub unsafe fn removeCredential_forProtectionSpace( &self, credential: &NSURLCredential, space: &NSURLProtectionSpace, - ) { - msg_send![ - self, - removeCredential: credential, - forProtectionSpace: space - ] - } + ); + # [method (removeCredential : forProtectionSpace : options :)] pub unsafe fn removeCredential_forProtectionSpace_options( &self, credential: &NSURLCredential, space: &NSURLProtectionSpace, options: Option<&NSDictionary>, - ) { - msg_send![ - self, - removeCredential: credential, - forProtectionSpace: space, - options: options - ] - } + ); + # [method_id (defaultCredentialForProtectionSpace :)] pub unsafe fn defaultCredentialForProtectionSpace( &self, space: &NSURLProtectionSpace, - ) -> Option> { - msg_send_id![self, defaultCredentialForProtectionSpace: space] - } + ) -> Option>; + # [method (setDefaultCredential : forProtectionSpace :)] pub unsafe fn setDefaultCredential_forProtectionSpace( &self, credential: &NSURLCredential, space: &NSURLProtectionSpace, - ) { - msg_send![ - self, - setDefaultCredential: credential, - forProtectionSpace: space - ] - } + ); } ); extern_methods!( #[doc = "NSURLSessionTaskAdditions"] unsafe impl NSURLCredentialStorage { + # [method (getCredentialsForProtectionSpace : task : completionHandler :)] pub unsafe fn getCredentialsForProtectionSpace_task_completionHandler( &self, protectionSpace: &NSURLProtectionSpace, task: &NSURLSessionTask, completionHandler: TodoBlock, - ) { - msg_send![ - self, - getCredentialsForProtectionSpace: protectionSpace, - task: task, - completionHandler: completionHandler - ] - } + ); + # [method (setCredential : forProtectionSpace : task :)] pub unsafe fn setCredential_forProtectionSpace_task( &self, credential: &NSURLCredential, protectionSpace: &NSURLProtectionSpace, task: &NSURLSessionTask, - ) { - msg_send![ - self, - setCredential: credential, - forProtectionSpace: protectionSpace, - task: task - ] - } + ); + # [method (removeCredential : forProtectionSpace : options : task :)] pub unsafe fn removeCredential_forProtectionSpace_options_task( &self, credential: &NSURLCredential, protectionSpace: &NSURLProtectionSpace, options: Option<&NSDictionary>, task: &NSURLSessionTask, - ) { - msg_send![ - self, - removeCredential: credential, - forProtectionSpace: protectionSpace, - options: options, - task: task - ] - } + ); + # [method (getDefaultCredentialForProtectionSpace : task : completionHandler :)] pub unsafe fn getDefaultCredentialForProtectionSpace_task_completionHandler( &self, space: &NSURLProtectionSpace, task: &NSURLSessionTask, completionHandler: TodoBlock, - ) { - msg_send![ - self, - getDefaultCredentialForProtectionSpace: space, - task: task, - completionHandler: completionHandler - ] - } + ); + # [method (setDefaultCredential : forProtectionSpace : task :)] pub unsafe fn setDefaultCredential_forProtectionSpace_task( &self, credential: &NSURLCredential, protectionSpace: &NSURLProtectionSpace, task: &NSURLSessionTask, - ) { - msg_send![ - self, - setDefaultCredential: credential, - forProtectionSpace: protectionSpace, - task: task - ] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index 41a88a0de..7a90682d5 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLDownload; @@ -20,50 +20,33 @@ extern_class!( ); extern_methods!( unsafe impl NSURLDownload { - pub unsafe fn canResumeDownloadDecodedWithEncodingMIMEType(MIMEType: &NSString) -> bool { - msg_send![ - Self::class(), - canResumeDownloadDecodedWithEncodingMIMEType: MIMEType - ] - } + # [method (canResumeDownloadDecodedWithEncodingMIMEType :)] + pub unsafe fn canResumeDownloadDecodedWithEncodingMIMEType(MIMEType: &NSString) -> bool; + # [method_id (initWithRequest : delegate :)] pub unsafe fn initWithRequest_delegate( &self, request: &NSURLRequest, delegate: Option<&NSURLDownloadDelegate>, - ) -> Id { - msg_send_id![self, initWithRequest: request, delegate: delegate] - } + ) -> Id; + # [method_id (initWithResumeData : delegate : path :)] pub unsafe fn initWithResumeData_delegate_path( &self, resumeData: &NSData, delegate: Option<&NSURLDownloadDelegate>, path: &NSString, - ) -> Id { - msg_send_id![ - self, - initWithResumeData: resumeData, - delegate: delegate, - path: path - ] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn setDestination_allowOverwrite(&self, path: &NSString, allowOverwrite: bool) { - msg_send![self, setDestination: path, allowOverwrite: allowOverwrite] - } - pub unsafe fn request(&self) -> Id { - msg_send_id![self, request] - } - pub unsafe fn resumeData(&self) -> Option> { - msg_send_id![self, resumeData] - } - pub unsafe fn deletesFileUponFailure(&self) -> bool { - msg_send![self, deletesFileUponFailure] - } - pub unsafe fn setDeletesFileUponFailure(&self, deletesFileUponFailure: bool) { - msg_send![self, setDeletesFileUponFailure: deletesFileUponFailure] - } + ) -> Id; + #[method(cancel)] + pub unsafe fn cancel(&self); + # [method (setDestination : allowOverwrite :)] + pub unsafe fn setDestination_allowOverwrite(&self, path: &NSString, allowOverwrite: bool); + #[method_id(request)] + pub unsafe fn request(&self) -> Id; + #[method_id(resumeData)] + pub unsafe fn resumeData(&self) -> Option>; + #[method(deletesFileUponFailure)] + pub unsafe fn deletesFileUponFailure(&self) -> bool; + # [method (setDeletesFileUponFailure :)] + pub unsafe fn setDeletesFileUponFailure(&self, deletesFileUponFailure: bool); } ); pub type NSURLDownloadDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index 0b843ca3f..31d6018ed 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -5,4 +5,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index fe0042a35..2dfd59950 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSURLHandleClient = NSObject; extern_class!( #[derive(Debug)] @@ -17,91 +17,67 @@ extern_class!( ); extern_methods!( unsafe impl NSURLHandle { - pub unsafe fn registerURLHandleClass(anURLHandleSubclass: Option<&Class>) { - msg_send![Self::class(), registerURLHandleClass: anURLHandleSubclass] - } - pub unsafe fn URLHandleClassForURL(anURL: Option<&NSURL>) -> Option<&Class> { - msg_send![Self::class(), URLHandleClassForURL: anURL] - } - pub unsafe fn status(&self) -> NSURLHandleStatus { - msg_send![self, status] - } - pub unsafe fn failureReason(&self) -> Option> { - msg_send_id![self, failureReason] - } - pub unsafe fn addClient(&self, client: Option<&NSURLHandleClient>) { - msg_send![self, addClient: client] - } - pub unsafe fn removeClient(&self, client: Option<&NSURLHandleClient>) { - msg_send![self, removeClient: client] - } - pub unsafe fn loadInBackground(&self) { - msg_send![self, loadInBackground] - } - pub unsafe fn cancelLoadInBackground(&self) { - msg_send![self, cancelLoadInBackground] - } - pub unsafe fn resourceData(&self) -> Option> { - msg_send_id![self, resourceData] - } - pub unsafe fn availableResourceData(&self) -> Option> { - msg_send_id![self, availableResourceData] - } - pub unsafe fn expectedResourceDataSize(&self) -> c_longlong { - msg_send![self, expectedResourceDataSize] - } - pub unsafe fn flushCachedData(&self) { - msg_send![self, flushCachedData] - } - pub unsafe fn backgroundLoadDidFailWithReason(&self, reason: Option<&NSString>) { - msg_send![self, backgroundLoadDidFailWithReason: reason] - } - pub unsafe fn didLoadBytes_loadComplete(&self, newBytes: Option<&NSData>, yorn: bool) { - msg_send![self, didLoadBytes: newBytes, loadComplete: yorn] - } - pub unsafe fn canInitWithURL(anURL: Option<&NSURL>) -> bool { - msg_send![Self::class(), canInitWithURL: anURL] - } - pub unsafe fn cachedHandleForURL(anURL: Option<&NSURL>) -> Option> { - msg_send_id![Self::class(), cachedHandleForURL: anURL] - } + # [method (registerURLHandleClass :)] + pub unsafe fn registerURLHandleClass(anURLHandleSubclass: Option<&Class>); + # [method (URLHandleClassForURL :)] + pub unsafe fn URLHandleClassForURL(anURL: Option<&NSURL>) -> Option<&Class>; + #[method(status)] + pub unsafe fn status(&self) -> NSURLHandleStatus; + #[method_id(failureReason)] + pub unsafe fn failureReason(&self) -> Option>; + # [method (addClient :)] + pub unsafe fn addClient(&self, client: Option<&NSURLHandleClient>); + # [method (removeClient :)] + pub unsafe fn removeClient(&self, client: Option<&NSURLHandleClient>); + #[method(loadInBackground)] + pub unsafe fn loadInBackground(&self); + #[method(cancelLoadInBackground)] + pub unsafe fn cancelLoadInBackground(&self); + #[method_id(resourceData)] + pub unsafe fn resourceData(&self) -> Option>; + #[method_id(availableResourceData)] + pub unsafe fn availableResourceData(&self) -> Option>; + #[method(expectedResourceDataSize)] + pub unsafe fn expectedResourceDataSize(&self) -> c_longlong; + #[method(flushCachedData)] + pub unsafe fn flushCachedData(&self); + # [method (backgroundLoadDidFailWithReason :)] + pub unsafe fn backgroundLoadDidFailWithReason(&self, reason: Option<&NSString>); + # [method (didLoadBytes : loadComplete :)] + pub unsafe fn didLoadBytes_loadComplete(&self, newBytes: Option<&NSData>, yorn: bool); + # [method (canInitWithURL :)] + pub unsafe fn canInitWithURL(anURL: Option<&NSURL>) -> bool; + # [method_id (cachedHandleForURL :)] + pub unsafe fn cachedHandleForURL(anURL: Option<&NSURL>) -> Option>; + # [method_id (initWithURL : cached :)] pub unsafe fn initWithURL_cached( &self, anURL: Option<&NSURL>, willCache: bool, - ) -> Option> { - msg_send_id![self, initWithURL: anURL, cached: willCache] - } + ) -> Option>; + # [method_id (propertyForKey :)] pub unsafe fn propertyForKey( &self, propertyKey: Option<&NSString>, - ) -> Option> { - msg_send_id![self, propertyForKey: propertyKey] - } + ) -> Option>; + # [method_id (propertyForKeyIfAvailable :)] pub unsafe fn propertyForKeyIfAvailable( &self, propertyKey: Option<&NSString>, - ) -> Option> { - msg_send_id![self, propertyForKeyIfAvailable: propertyKey] - } + ) -> Option>; + # [method (writeProperty : forKey :)] pub unsafe fn writeProperty_forKey( &self, propertyValue: Option<&Object>, propertyKey: Option<&NSString>, - ) -> bool { - msg_send![self, writeProperty: propertyValue, forKey: propertyKey] - } - pub unsafe fn writeData(&self, data: Option<&NSData>) -> bool { - msg_send![self, writeData: data] - } - pub unsafe fn loadInForeground(&self) -> Option> { - msg_send_id![self, loadInForeground] - } - pub unsafe fn beginLoadInBackground(&self) { - msg_send![self, beginLoadInBackground] - } - pub unsafe fn endLoadInBackground(&self) { - msg_send![self, endLoadInBackground] - } + ) -> bool; + # [method (writeData :)] + pub unsafe fn writeData(&self, data: Option<&NSData>) -> bool; + #[method_id(loadInForeground)] + pub unsafe fn loadInForeground(&self) -> Option>; + #[method(beginLoadInBackground)] + pub unsafe fn beginLoadInBackground(&self); + #[method(endLoadInBackground)] + pub unsafe fn endLoadInBackground(&self); } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 5cc5eb7d6..343c2952a 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -7,7 +7,7 @@ use crate::Security::generated::Security::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLProtectionSpace; @@ -17,6 +17,7 @@ extern_class!( ); extern_methods!( unsafe impl NSURLProtectionSpace { + # [method_id (initWithHost : port : protocol : realm : authenticationMethod :)] pub unsafe fn initWithHost_port_protocol_realm_authenticationMethod( &self, host: &NSString, @@ -24,16 +25,8 @@ extern_methods!( protocol: Option<&NSString>, realm: Option<&NSString>, authenticationMethod: Option<&NSString>, - ) -> Id { - msg_send_id![ - self, - initWithHost: host, - port: port, - protocol: protocol, - realm: realm, - authenticationMethod: authenticationMethod - ] - } + ) -> Id; + # [method_id (initWithProxyHost : port : type : realm : authenticationMethod :)] pub unsafe fn initWithProxyHost_port_type_realm_authenticationMethod( &self, host: &NSString, @@ -41,48 +34,36 @@ extern_methods!( type_: Option<&NSString>, realm: Option<&NSString>, authenticationMethod: Option<&NSString>, - ) -> Id { - msg_send_id ! [self , initWithProxyHost : host , port : port , type : type_ , realm : realm , authenticationMethod : authenticationMethod] - } - pub unsafe fn realm(&self) -> Option> { - msg_send_id![self, realm] - } - pub unsafe fn receivesCredentialSecurely(&self) -> bool { - msg_send![self, receivesCredentialSecurely] - } - pub unsafe fn isProxy(&self) -> bool { - msg_send![self, isProxy] - } - pub unsafe fn host(&self) -> Id { - msg_send_id![self, host] - } - pub unsafe fn port(&self) -> NSInteger { - msg_send![self, port] - } - pub unsafe fn proxyType(&self) -> Option> { - msg_send_id![self, proxyType] - } - pub unsafe fn protocol(&self) -> Option> { - msg_send_id![self, protocol] - } - pub unsafe fn authenticationMethod(&self) -> Id { - msg_send_id![self, authenticationMethod] - } + ) -> Id; + #[method_id(realm)] + pub unsafe fn realm(&self) -> Option>; + #[method(receivesCredentialSecurely)] + pub unsafe fn receivesCredentialSecurely(&self) -> bool; + #[method(isProxy)] + pub unsafe fn isProxy(&self) -> bool; + #[method_id(host)] + pub unsafe fn host(&self) -> Id; + #[method(port)] + pub unsafe fn port(&self) -> NSInteger; + #[method_id(proxyType)] + pub unsafe fn proxyType(&self) -> Option>; + #[method_id(protocol)] + pub unsafe fn protocol(&self) -> Option>; + #[method_id(authenticationMethod)] + pub unsafe fn authenticationMethod(&self) -> Id; } ); extern_methods!( #[doc = "NSClientCertificateSpace"] unsafe impl NSURLProtectionSpace { - pub unsafe fn distinguishedNames(&self) -> Option, Shared>> { - msg_send_id![self, distinguishedNames] - } + #[method_id(distinguishedNames)] + pub unsafe fn distinguishedNames(&self) -> Option, Shared>>; } ); extern_methods!( #[doc = "NSServerTrustValidationSpace"] unsafe impl NSURLProtectionSpace { - pub unsafe fn serverTrust(&self) -> SecTrustRef { - msg_send![self, serverTrust] - } + #[method(serverTrust)] + pub unsafe fn serverTrust(&self) -> SecTrustRef; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 5fcb3a67f..3d44077b4 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -12,7 +12,7 @@ use crate::Foundation::generated::NSURLCache::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSURLProtocolClient = NSObject; extern_class!( #[derive(Debug)] @@ -23,101 +23,66 @@ extern_class!( ); extern_methods!( unsafe impl NSURLProtocol { + # [method_id (initWithRequest : cachedResponse : client :)] pub unsafe fn initWithRequest_cachedResponse_client( &self, request: &NSURLRequest, cachedResponse: Option<&NSCachedURLResponse>, client: Option<&NSURLProtocolClient>, - ) -> Id { - msg_send_id![ - self, - initWithRequest: request, - cachedResponse: cachedResponse, - client: client - ] - } - pub unsafe fn client(&self) -> Option> { - msg_send_id![self, client] - } - pub unsafe fn request(&self) -> Id { - msg_send_id![self, request] - } - pub unsafe fn cachedResponse(&self) -> Option> { - msg_send_id![self, cachedResponse] - } - pub unsafe fn canInitWithRequest(request: &NSURLRequest) -> bool { - msg_send![Self::class(), canInitWithRequest: request] - } + ) -> Id; + #[method_id(client)] + pub unsafe fn client(&self) -> Option>; + #[method_id(request)] + pub unsafe fn request(&self) -> Id; + #[method_id(cachedResponse)] + pub unsafe fn cachedResponse(&self) -> Option>; + # [method (canInitWithRequest :)] + pub unsafe fn canInitWithRequest(request: &NSURLRequest) -> bool; + # [method_id (canonicalRequestForRequest :)] pub unsafe fn canonicalRequestForRequest( request: &NSURLRequest, - ) -> Id { - msg_send_id![Self::class(), canonicalRequestForRequest: request] - } + ) -> Id; + # [method (requestIsCacheEquivalent : toRequest :)] pub unsafe fn requestIsCacheEquivalent_toRequest( a: &NSURLRequest, b: &NSURLRequest, - ) -> bool { - msg_send![Self::class(), requestIsCacheEquivalent: a, toRequest: b] - } - pub unsafe fn startLoading(&self) { - msg_send![self, startLoading] - } - pub unsafe fn stopLoading(&self) { - msg_send![self, stopLoading] - } + ) -> bool; + #[method(startLoading)] + pub unsafe fn startLoading(&self); + #[method(stopLoading)] + pub unsafe fn stopLoading(&self); + # [method_id (propertyForKey : inRequest :)] pub unsafe fn propertyForKey_inRequest( key: &NSString, request: &NSURLRequest, - ) -> Option> { - msg_send_id![Self::class(), propertyForKey: key, inRequest: request] - } + ) -> Option>; + # [method (setProperty : forKey : inRequest :)] pub unsafe fn setProperty_forKey_inRequest( value: &Object, key: &NSString, request: &NSMutableURLRequest, - ) { - msg_send![ - Self::class(), - setProperty: value, - forKey: key, - inRequest: request - ] - } - pub unsafe fn removePropertyForKey_inRequest( - key: &NSString, - request: &NSMutableURLRequest, - ) { - msg_send![Self::class(), removePropertyForKey: key, inRequest: request] - } - pub unsafe fn registerClass(protocolClass: &Class) -> bool { - msg_send![Self::class(), registerClass: protocolClass] - } - pub unsafe fn unregisterClass(protocolClass: &Class) { - msg_send![Self::class(), unregisterClass: protocolClass] - } + ); + # [method (removePropertyForKey : inRequest :)] + pub unsafe fn removePropertyForKey_inRequest(key: &NSString, request: &NSMutableURLRequest); + # [method (registerClass :)] + pub unsafe fn registerClass(protocolClass: &Class) -> bool; + # [method (unregisterClass :)] + pub unsafe fn unregisterClass(protocolClass: &Class); } ); extern_methods!( #[doc = "NSURLSessionTaskAdditions"] unsafe impl NSURLProtocol { - pub unsafe fn canInitWithTask(task: &NSURLSessionTask) -> bool { - msg_send![Self::class(), canInitWithTask: task] - } + # [method (canInitWithTask :)] + pub unsafe fn canInitWithTask(task: &NSURLSessionTask) -> bool; + # [method_id (initWithTask : cachedResponse : client :)] pub unsafe fn initWithTask_cachedResponse_client( &self, task: &NSURLSessionTask, cachedResponse: Option<&NSCachedURLResponse>, client: Option<&NSURLProtocolClient>, - ) -> Id { - msg_send_id![ - self, - initWithTask: task, - cachedResponse: cachedResponse, - client: client - ] - } - pub unsafe fn task(&self) -> Option> { - msg_send_id![self, task] - } + ) -> Id; + #[method_id(task)] + pub unsafe fn task(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 1229f8a96..903262de0 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLRequest; @@ -19,70 +19,45 @@ extern_class!( ); extern_methods!( unsafe impl NSURLRequest { - pub unsafe fn requestWithURL(URL: &NSURL) -> Id { - msg_send_id![Self::class(), requestWithURL: URL] - } - pub unsafe fn supportsSecureCoding() -> bool { - msg_send![Self::class(), supportsSecureCoding] - } + # [method_id (requestWithURL :)] + pub unsafe fn requestWithURL(URL: &NSURL) -> Id; + #[method(supportsSecureCoding)] + pub unsafe fn supportsSecureCoding() -> bool; + # [method_id (requestWithURL : cachePolicy : timeoutInterval :)] pub unsafe fn requestWithURL_cachePolicy_timeoutInterval( URL: &NSURL, cachePolicy: NSURLRequestCachePolicy, timeoutInterval: NSTimeInterval, - ) -> Id { - msg_send_id![ - Self::class(), - requestWithURL: URL, - cachePolicy: cachePolicy, - timeoutInterval: timeoutInterval - ] - } - pub unsafe fn initWithURL(&self, URL: &NSURL) -> Id { - msg_send_id![self, initWithURL: URL] - } + ) -> Id; + # [method_id (initWithURL :)] + pub unsafe fn initWithURL(&self, URL: &NSURL) -> Id; + # [method_id (initWithURL : cachePolicy : timeoutInterval :)] pub unsafe fn initWithURL_cachePolicy_timeoutInterval( &self, URL: &NSURL, cachePolicy: NSURLRequestCachePolicy, timeoutInterval: NSTimeInterval, - ) -> Id { - msg_send_id![ - self, - initWithURL: URL, - cachePolicy: cachePolicy, - timeoutInterval: timeoutInterval - ] - } - pub unsafe fn URL(&self) -> Option> { - msg_send_id![self, URL] - } - pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy { - msg_send![self, cachePolicy] - } - pub unsafe fn timeoutInterval(&self) -> NSTimeInterval { - msg_send![self, timeoutInterval] - } - pub unsafe fn mainDocumentURL(&self) -> Option> { - msg_send_id![self, mainDocumentURL] - } - pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { - msg_send![self, networkServiceType] - } - pub unsafe fn allowsCellularAccess(&self) -> bool { - msg_send![self, allowsCellularAccess] - } - pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { - msg_send![self, allowsExpensiveNetworkAccess] - } - pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { - msg_send![self, allowsConstrainedNetworkAccess] - } - pub unsafe fn assumesHTTP3Capable(&self) -> bool { - msg_send![self, assumesHTTP3Capable] - } - pub unsafe fn attribution(&self) -> NSURLRequestAttribution { - msg_send![self, attribution] - } + ) -> Id; + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + #[method(cachePolicy)] + pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy; + #[method(timeoutInterval)] + pub unsafe fn timeoutInterval(&self) -> NSTimeInterval; + #[method_id(mainDocumentURL)] + pub unsafe fn mainDocumentURL(&self) -> Option>; + #[method(networkServiceType)] + pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType; + #[method(allowsCellularAccess)] + pub unsafe fn allowsCellularAccess(&self) -> bool; + #[method(allowsExpensiveNetworkAccess)] + pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool; + #[method(allowsConstrainedNetworkAccess)] + pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool; + #[method(assumesHTTP3Capable)] + pub unsafe fn assumesHTTP3Capable(&self) -> bool; + #[method(attribution)] + pub unsafe fn attribution(&self) -> NSURLRequestAttribution; } ); extern_class!( @@ -94,164 +69,117 @@ extern_class!( ); extern_methods!( unsafe impl NSMutableURLRequest { - pub unsafe fn URL(&self) -> Option> { - msg_send_id![self, URL] - } - pub unsafe fn setURL(&self, URL: Option<&NSURL>) { - msg_send![self, setURL: URL] - } - pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy { - msg_send![self, cachePolicy] - } - pub unsafe fn setCachePolicy(&self, cachePolicy: NSURLRequestCachePolicy) { - msg_send![self, setCachePolicy: cachePolicy] - } - pub unsafe fn timeoutInterval(&self) -> NSTimeInterval { - msg_send![self, timeoutInterval] - } - pub unsafe fn setTimeoutInterval(&self, timeoutInterval: NSTimeInterval) { - msg_send![self, setTimeoutInterval: timeoutInterval] - } - pub unsafe fn mainDocumentURL(&self) -> Option> { - msg_send_id![self, mainDocumentURL] - } - pub unsafe fn setMainDocumentURL(&self, mainDocumentURL: Option<&NSURL>) { - msg_send![self, setMainDocumentURL: mainDocumentURL] - } - pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { - msg_send![self, networkServiceType] - } + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + # [method (setURL :)] + pub unsafe fn setURL(&self, URL: Option<&NSURL>); + #[method(cachePolicy)] + pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy; + # [method (setCachePolicy :)] + pub unsafe fn setCachePolicy(&self, cachePolicy: NSURLRequestCachePolicy); + #[method(timeoutInterval)] + pub unsafe fn timeoutInterval(&self) -> NSTimeInterval; + # [method (setTimeoutInterval :)] + pub unsafe fn setTimeoutInterval(&self, timeoutInterval: NSTimeInterval); + #[method_id(mainDocumentURL)] + pub unsafe fn mainDocumentURL(&self) -> Option>; + # [method (setMainDocumentURL :)] + pub unsafe fn setMainDocumentURL(&self, mainDocumentURL: Option<&NSURL>); + #[method(networkServiceType)] + pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType; + # [method (setNetworkServiceType :)] pub unsafe fn setNetworkServiceType( &self, networkServiceType: NSURLRequestNetworkServiceType, - ) { - msg_send![self, setNetworkServiceType: networkServiceType] - } - pub unsafe fn allowsCellularAccess(&self) -> bool { - msg_send![self, allowsCellularAccess] - } - pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool) { - msg_send![self, setAllowsCellularAccess: allowsCellularAccess] - } - pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { - msg_send![self, allowsExpensiveNetworkAccess] - } - pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool) { - msg_send![ - self, - setAllowsExpensiveNetworkAccess: allowsExpensiveNetworkAccess - ] - } - pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { - msg_send![self, allowsConstrainedNetworkAccess] - } + ); + #[method(allowsCellularAccess)] + pub unsafe fn allowsCellularAccess(&self) -> bool; + # [method (setAllowsCellularAccess :)] + pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool); + #[method(allowsExpensiveNetworkAccess)] + pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool; + # [method (setAllowsExpensiveNetworkAccess :)] + pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool); + #[method(allowsConstrainedNetworkAccess)] + pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool; + # [method (setAllowsConstrainedNetworkAccess :)] pub unsafe fn setAllowsConstrainedNetworkAccess( &self, allowsConstrainedNetworkAccess: bool, - ) { - msg_send![ - self, - setAllowsConstrainedNetworkAccess: allowsConstrainedNetworkAccess - ] - } - pub unsafe fn assumesHTTP3Capable(&self) -> bool { - msg_send![self, assumesHTTP3Capable] - } - pub unsafe fn setAssumesHTTP3Capable(&self, assumesHTTP3Capable: bool) { - msg_send![self, setAssumesHTTP3Capable: assumesHTTP3Capable] - } - pub unsafe fn attribution(&self) -> NSURLRequestAttribution { - msg_send![self, attribution] - } - pub unsafe fn setAttribution(&self, attribution: NSURLRequestAttribution) { - msg_send![self, setAttribution: attribution] - } + ); + #[method(assumesHTTP3Capable)] + pub unsafe fn assumesHTTP3Capable(&self) -> bool; + # [method (setAssumesHTTP3Capable :)] + pub unsafe fn setAssumesHTTP3Capable(&self, assumesHTTP3Capable: bool); + #[method(attribution)] + pub unsafe fn attribution(&self) -> NSURLRequestAttribution; + # [method (setAttribution :)] + pub unsafe fn setAttribution(&self, attribution: NSURLRequestAttribution); } ); extern_methods!( #[doc = "NSHTTPURLRequest"] unsafe impl NSURLRequest { - pub unsafe fn HTTPMethod(&self) -> Option> { - msg_send_id![self, HTTPMethod] - } + #[method_id(HTTPMethod)] + pub unsafe fn HTTPMethod(&self) -> Option>; + #[method_id(allHTTPHeaderFields)] pub unsafe fn allHTTPHeaderFields( &self, - ) -> Option, Shared>> { - msg_send_id![self, allHTTPHeaderFields] - } + ) -> Option, Shared>>; + # [method_id (valueForHTTPHeaderField :)] pub unsafe fn valueForHTTPHeaderField( &self, field: &NSString, - ) -> Option> { - msg_send_id![self, valueForHTTPHeaderField: field] - } - pub unsafe fn HTTPBody(&self) -> Option> { - msg_send_id![self, HTTPBody] - } - pub unsafe fn HTTPBodyStream(&self) -> Option> { - msg_send_id![self, HTTPBodyStream] - } - pub unsafe fn HTTPShouldHandleCookies(&self) -> bool { - msg_send![self, HTTPShouldHandleCookies] - } - pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { - msg_send![self, HTTPShouldUsePipelining] - } + ) -> Option>; + #[method_id(HTTPBody)] + pub unsafe fn HTTPBody(&self) -> Option>; + #[method_id(HTTPBodyStream)] + pub unsafe fn HTTPBodyStream(&self) -> Option>; + #[method(HTTPShouldHandleCookies)] + pub unsafe fn HTTPShouldHandleCookies(&self) -> bool; + #[method(HTTPShouldUsePipelining)] + pub unsafe fn HTTPShouldUsePipelining(&self) -> bool; } ); extern_methods!( #[doc = "NSMutableHTTPURLRequest"] unsafe impl NSMutableURLRequest { - pub unsafe fn HTTPMethod(&self) -> Id { - msg_send_id![self, HTTPMethod] - } - pub unsafe fn setHTTPMethod(&self, HTTPMethod: &NSString) { - msg_send![self, setHTTPMethod: HTTPMethod] - } + #[method_id(HTTPMethod)] + pub unsafe fn HTTPMethod(&self) -> Id; + # [method (setHTTPMethod :)] + pub unsafe fn setHTTPMethod(&self, HTTPMethod: &NSString); + #[method_id(allHTTPHeaderFields)] pub unsafe fn allHTTPHeaderFields( &self, - ) -> Option, Shared>> { - msg_send_id![self, allHTTPHeaderFields] - } + ) -> Option, Shared>>; + # [method (setAllHTTPHeaderFields :)] pub unsafe fn setAllHTTPHeaderFields( &self, allHTTPHeaderFields: Option<&NSDictionary>, - ) { - msg_send![self, setAllHTTPHeaderFields: allHTTPHeaderFields] - } + ); + # [method (setValue : forHTTPHeaderField :)] pub unsafe fn setValue_forHTTPHeaderField( &self, value: Option<&NSString>, field: &NSString, - ) { - msg_send![self, setValue: value, forHTTPHeaderField: field] - } - pub unsafe fn addValue_forHTTPHeaderField(&self, value: &NSString, field: &NSString) { - msg_send![self, addValue: value, forHTTPHeaderField: field] - } - pub unsafe fn HTTPBody(&self) -> Option> { - msg_send_id![self, HTTPBody] - } - pub unsafe fn setHTTPBody(&self, HTTPBody: Option<&NSData>) { - msg_send![self, setHTTPBody: HTTPBody] - } - pub unsafe fn HTTPBodyStream(&self) -> Option> { - msg_send_id![self, HTTPBodyStream] - } - pub unsafe fn setHTTPBodyStream(&self, HTTPBodyStream: Option<&NSInputStream>) { - msg_send![self, setHTTPBodyStream: HTTPBodyStream] - } - pub unsafe fn HTTPShouldHandleCookies(&self) -> bool { - msg_send![self, HTTPShouldHandleCookies] - } - pub unsafe fn setHTTPShouldHandleCookies(&self, HTTPShouldHandleCookies: bool) { - msg_send![self, setHTTPShouldHandleCookies: HTTPShouldHandleCookies] - } - pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { - msg_send![self, HTTPShouldUsePipelining] - } - pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool) { - msg_send![self, setHTTPShouldUsePipelining: HTTPShouldUsePipelining] - } + ); + # [method (addValue : forHTTPHeaderField :)] + pub unsafe fn addValue_forHTTPHeaderField(&self, value: &NSString, field: &NSString); + #[method_id(HTTPBody)] + pub unsafe fn HTTPBody(&self) -> Option>; + # [method (setHTTPBody :)] + pub unsafe fn setHTTPBody(&self, HTTPBody: Option<&NSData>); + #[method_id(HTTPBodyStream)] + pub unsafe fn HTTPBodyStream(&self) -> Option>; + # [method (setHTTPBodyStream :)] + pub unsafe fn setHTTPBodyStream(&self, HTTPBodyStream: Option<&NSInputStream>); + #[method(HTTPShouldHandleCookies)] + pub unsafe fn HTTPShouldHandleCookies(&self) -> bool; + # [method (setHTTPShouldHandleCookies :)] + pub unsafe fn setHTTPShouldHandleCookies(&self, HTTPShouldHandleCookies: bool); + #[method(HTTPShouldUsePipelining)] + pub unsafe fn HTTPShouldUsePipelining(&self) -> bool; + # [method (setHTTPShouldUsePipelining :)] + pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool); } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index e6e2470a7..e4818a12a 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLResponse; @@ -17,36 +17,24 @@ extern_class!( ); extern_methods!( unsafe impl NSURLResponse { + # [method_id (initWithURL : MIMEType : expectedContentLength : textEncodingName :)] pub unsafe fn initWithURL_MIMEType_expectedContentLength_textEncodingName( &self, URL: &NSURL, MIMEType: Option<&NSString>, length: NSInteger, name: Option<&NSString>, - ) -> Id { - msg_send_id![ - self, - initWithURL: URL, - MIMEType: MIMEType, - expectedContentLength: length, - textEncodingName: name - ] - } - pub unsafe fn URL(&self) -> Option> { - msg_send_id![self, URL] - } - pub unsafe fn MIMEType(&self) -> Option> { - msg_send_id![self, MIMEType] - } - pub unsafe fn expectedContentLength(&self) -> c_longlong { - msg_send![self, expectedContentLength] - } - pub unsafe fn textEncodingName(&self) -> Option> { - msg_send_id![self, textEncodingName] - } - pub unsafe fn suggestedFilename(&self) -> Option> { - msg_send_id![self, suggestedFilename] - } + ) -> Id; + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + #[method_id(MIMEType)] + pub unsafe fn MIMEType(&self) -> Option>; + #[method(expectedContentLength)] + pub unsafe fn expectedContentLength(&self) -> c_longlong; + #[method_id(textEncodingName)] + pub unsafe fn textEncodingName(&self) -> Option>; + #[method_id(suggestedFilename)] + pub unsafe fn suggestedFilename(&self) -> Option>; } ); use super::__exported::NSHTTPURLResponseInternal; @@ -59,35 +47,24 @@ extern_class!( ); extern_methods!( unsafe impl NSHTTPURLResponse { + # [method_id (initWithURL : statusCode : HTTPVersion : headerFields :)] pub unsafe fn initWithURL_statusCode_HTTPVersion_headerFields( &self, url: &NSURL, statusCode: NSInteger, HTTPVersion: Option<&NSString>, headerFields: Option<&NSDictionary>, - ) -> Option> { - msg_send_id![ - self, - initWithURL: url, - statusCode: statusCode, - HTTPVersion: HTTPVersion, - headerFields: headerFields - ] - } - pub unsafe fn statusCode(&self) -> NSInteger { - msg_send![self, statusCode] - } - pub unsafe fn allHeaderFields(&self) -> Id { - msg_send_id![self, allHeaderFields] - } + ) -> Option>; + #[method(statusCode)] + pub unsafe fn statusCode(&self) -> NSInteger; + #[method_id(allHeaderFields)] + pub unsafe fn allHeaderFields(&self) -> Id; + # [method_id (valueForHTTPHeaderField :)] pub unsafe fn valueForHTTPHeaderField( &self, field: &NSString, - ) -> Option> { - msg_send_id![self, valueForHTTPHeaderField: field] - } - pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id { - msg_send_id![Self::class(), localizedStringForStatusCode: statusCode] - } + ) -> Option>; + # [method_id (localizedStringForStatusCode :)] + pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 51bc87802..62fbb8ee0 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -26,7 +26,7 @@ use crate::Security::generated::SecureTransport::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSURLSession; @@ -36,230 +36,159 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSession { - pub unsafe fn sharedSession() -> Id { - msg_send_id![Self::class(), sharedSession] - } + #[method_id(sharedSession)] + pub unsafe fn sharedSession() -> Id; + # [method_id (sessionWithConfiguration :)] pub unsafe fn sessionWithConfiguration( configuration: &NSURLSessionConfiguration, - ) -> Id { - msg_send_id![Self::class(), sessionWithConfiguration: configuration] - } + ) -> Id; + # [method_id (sessionWithConfiguration : delegate : delegateQueue :)] pub unsafe fn sessionWithConfiguration_delegate_delegateQueue( configuration: &NSURLSessionConfiguration, delegate: Option<&NSURLSessionDelegate>, queue: Option<&NSOperationQueue>, - ) -> Id { - msg_send_id![ - Self::class(), - sessionWithConfiguration: configuration, - delegate: delegate, - delegateQueue: queue - ] - } - pub unsafe fn delegateQueue(&self) -> Id { - msg_send_id![self, delegateQueue] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn configuration(&self) -> Id { - msg_send_id![self, configuration] - } - pub unsafe fn sessionDescription(&self) -> Option> { - msg_send_id![self, sessionDescription] - } - pub unsafe fn setSessionDescription(&self, sessionDescription: Option<&NSString>) { - msg_send![self, setSessionDescription: sessionDescription] - } - pub unsafe fn finishTasksAndInvalidate(&self) { - msg_send![self, finishTasksAndInvalidate] - } - pub unsafe fn invalidateAndCancel(&self) { - msg_send![self, invalidateAndCancel] - } - pub unsafe fn resetWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![self, resetWithCompletionHandler: completionHandler] - } - pub unsafe fn flushWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![self, flushWithCompletionHandler: completionHandler] - } - pub unsafe fn getTasksWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![self, getTasksWithCompletionHandler: completionHandler] - } - pub unsafe fn getAllTasksWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![self, getAllTasksWithCompletionHandler: completionHandler] - } + ) -> Id; + #[method_id(delegateQueue)] + pub unsafe fn delegateQueue(&self) -> Id; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method_id(configuration)] + pub unsafe fn configuration(&self) -> Id; + #[method_id(sessionDescription)] + pub unsafe fn sessionDescription(&self) -> Option>; + # [method (setSessionDescription :)] + pub unsafe fn setSessionDescription(&self, sessionDescription: Option<&NSString>); + #[method(finishTasksAndInvalidate)] + pub unsafe fn finishTasksAndInvalidate(&self); + #[method(invalidateAndCancel)] + pub unsafe fn invalidateAndCancel(&self); + # [method (resetWithCompletionHandler :)] + pub unsafe fn resetWithCompletionHandler(&self, completionHandler: TodoBlock); + # [method (flushWithCompletionHandler :)] + pub unsafe fn flushWithCompletionHandler(&self, completionHandler: TodoBlock); + # [method (getTasksWithCompletionHandler :)] + pub unsafe fn getTasksWithCompletionHandler(&self, completionHandler: TodoBlock); + # [method (getAllTasksWithCompletionHandler :)] + pub unsafe fn getAllTasksWithCompletionHandler(&self, completionHandler: TodoBlock); + # [method_id (dataTaskWithRequest :)] pub unsafe fn dataTaskWithRequest( &self, request: &NSURLRequest, - ) -> Id { - msg_send_id![self, dataTaskWithRequest: request] - } - pub unsafe fn dataTaskWithURL(&self, url: &NSURL) -> Id { - msg_send_id![self, dataTaskWithURL: url] - } + ) -> Id; + # [method_id (dataTaskWithURL :)] + pub unsafe fn dataTaskWithURL(&self, url: &NSURL) -> Id; + # [method_id (uploadTaskWithRequest : fromFile :)] pub unsafe fn uploadTaskWithRequest_fromFile( &self, request: &NSURLRequest, fileURL: &NSURL, - ) -> Id { - msg_send_id![self, uploadTaskWithRequest: request, fromFile: fileURL] - } + ) -> Id; + # [method_id (uploadTaskWithRequest : fromData :)] pub unsafe fn uploadTaskWithRequest_fromData( &self, request: &NSURLRequest, bodyData: &NSData, - ) -> Id { - msg_send_id![self, uploadTaskWithRequest: request, fromData: bodyData] - } + ) -> Id; + # [method_id (uploadTaskWithStreamedRequest :)] pub unsafe fn uploadTaskWithStreamedRequest( &self, request: &NSURLRequest, - ) -> Id { - msg_send_id![self, uploadTaskWithStreamedRequest: request] - } + ) -> Id; + # [method_id (downloadTaskWithRequest :)] pub unsafe fn downloadTaskWithRequest( &self, request: &NSURLRequest, - ) -> Id { - msg_send_id![self, downloadTaskWithRequest: request] - } + ) -> Id; + # [method_id (downloadTaskWithURL :)] pub unsafe fn downloadTaskWithURL( &self, url: &NSURL, - ) -> Id { - msg_send_id![self, downloadTaskWithURL: url] - } + ) -> Id; + # [method_id (downloadTaskWithResumeData :)] pub unsafe fn downloadTaskWithResumeData( &self, resumeData: &NSData, - ) -> Id { - msg_send_id![self, downloadTaskWithResumeData: resumeData] - } + ) -> Id; + # [method_id (streamTaskWithHostName : port :)] pub unsafe fn streamTaskWithHostName_port( &self, hostname: &NSString, port: NSInteger, - ) -> Id { - msg_send_id![self, streamTaskWithHostName: hostname, port: port] - } + ) -> Id; + # [method_id (streamTaskWithNetService :)] pub unsafe fn streamTaskWithNetService( &self, service: &NSNetService, - ) -> Id { - msg_send_id![self, streamTaskWithNetService: service] - } + ) -> Id; + # [method_id (webSocketTaskWithURL :)] pub unsafe fn webSocketTaskWithURL( &self, url: &NSURL, - ) -> Id { - msg_send_id![self, webSocketTaskWithURL: url] - } + ) -> Id; + # [method_id (webSocketTaskWithURL : protocols :)] pub unsafe fn webSocketTaskWithURL_protocols( &self, url: &NSURL, protocols: &NSArray, - ) -> Id { - msg_send_id![self, webSocketTaskWithURL: url, protocols: protocols] - } + ) -> Id; + # [method_id (webSocketTaskWithRequest :)] pub unsafe fn webSocketTaskWithRequest( &self, request: &NSURLRequest, - ) -> Id { - msg_send_id![self, webSocketTaskWithRequest: request] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); extern_methods!( #[doc = "NSURLSessionAsynchronousConvenience"] unsafe impl NSURLSession { + # [method_id (dataTaskWithRequest : completionHandler :)] pub unsafe fn dataTaskWithRequest_completionHandler( &self, request: &NSURLRequest, completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - dataTaskWithRequest: request, - completionHandler: completionHandler - ] - } + ) -> Id; + # [method_id (dataTaskWithURL : completionHandler :)] pub unsafe fn dataTaskWithURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - dataTaskWithURL: url, - completionHandler: completionHandler - ] - } + ) -> Id; + # [method_id (uploadTaskWithRequest : fromFile : completionHandler :)] pub unsafe fn uploadTaskWithRequest_fromFile_completionHandler( &self, request: &NSURLRequest, fileURL: &NSURL, completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - uploadTaskWithRequest: request, - fromFile: fileURL, - completionHandler: completionHandler - ] - } + ) -> Id; + # [method_id (uploadTaskWithRequest : fromData : completionHandler :)] pub unsafe fn uploadTaskWithRequest_fromData_completionHandler( &self, request: &NSURLRequest, bodyData: Option<&NSData>, completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - uploadTaskWithRequest: request, - fromData: bodyData, - completionHandler: completionHandler - ] - } + ) -> Id; + # [method_id (downloadTaskWithRequest : completionHandler :)] pub unsafe fn downloadTaskWithRequest_completionHandler( &self, request: &NSURLRequest, completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - downloadTaskWithRequest: request, - completionHandler: completionHandler - ] - } + ) -> Id; + # [method_id (downloadTaskWithURL : completionHandler :)] pub unsafe fn downloadTaskWithURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - downloadTaskWithURL: url, - completionHandler: completionHandler - ] - } + ) -> Id; + # [method_id (downloadTaskWithResumeData : completionHandler :)] pub unsafe fn downloadTaskWithResumeData_completionHandler( &self, resumeData: &NSData, completionHandler: TodoBlock, - ) -> Id { - msg_send_id![ - self, - downloadTaskWithResumeData: resumeData, - completionHandler: completionHandler - ] - } + ) -> Id; } ); extern_class!( @@ -271,111 +200,72 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionTask { - pub unsafe fn taskIdentifier(&self) -> NSUInteger { - msg_send![self, taskIdentifier] - } - pub unsafe fn originalRequest(&self) -> Option> { - msg_send_id![self, originalRequest] - } - pub unsafe fn currentRequest(&self) -> Option> { - msg_send_id![self, currentRequest] - } - pub unsafe fn response(&self) -> Option> { - msg_send_id![self, response] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSURLSessionTaskDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn progress(&self) -> Id { - msg_send_id![self, progress] - } - pub unsafe fn earliestBeginDate(&self) -> Option> { - msg_send_id![self, earliestBeginDate] - } - pub unsafe fn setEarliestBeginDate(&self, earliestBeginDate: Option<&NSDate>) { - msg_send![self, setEarliestBeginDate: earliestBeginDate] - } - pub unsafe fn countOfBytesClientExpectsToSend(&self) -> int64_t { - msg_send![self, countOfBytesClientExpectsToSend] - } + #[method(taskIdentifier)] + pub unsafe fn taskIdentifier(&self) -> NSUInteger; + #[method_id(originalRequest)] + pub unsafe fn originalRequest(&self) -> Option>; + #[method_id(currentRequest)] + pub unsafe fn currentRequest(&self) -> Option>; + #[method_id(response)] + pub unsafe fn response(&self) -> Option>; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSURLSessionTaskDelegate>); + #[method_id(progress)] + pub unsafe fn progress(&self) -> Id; + #[method_id(earliestBeginDate)] + pub unsafe fn earliestBeginDate(&self) -> Option>; + # [method (setEarliestBeginDate :)] + pub unsafe fn setEarliestBeginDate(&self, earliestBeginDate: Option<&NSDate>); + #[method(countOfBytesClientExpectsToSend)] + pub unsafe fn countOfBytesClientExpectsToSend(&self) -> int64_t; + # [method (setCountOfBytesClientExpectsToSend :)] pub unsafe fn setCountOfBytesClientExpectsToSend( &self, countOfBytesClientExpectsToSend: int64_t, - ) { - msg_send![ - self, - setCountOfBytesClientExpectsToSend: countOfBytesClientExpectsToSend - ] - } - pub unsafe fn countOfBytesClientExpectsToReceive(&self) -> int64_t { - msg_send![self, countOfBytesClientExpectsToReceive] - } + ); + #[method(countOfBytesClientExpectsToReceive)] + pub unsafe fn countOfBytesClientExpectsToReceive(&self) -> int64_t; + # [method (setCountOfBytesClientExpectsToReceive :)] pub unsafe fn setCountOfBytesClientExpectsToReceive( &self, countOfBytesClientExpectsToReceive: int64_t, - ) { - msg_send![ - self, - setCountOfBytesClientExpectsToReceive: countOfBytesClientExpectsToReceive - ] - } - pub unsafe fn countOfBytesSent(&self) -> int64_t { - msg_send![self, countOfBytesSent] - } - pub unsafe fn countOfBytesReceived(&self) -> int64_t { - msg_send![self, countOfBytesReceived] - } - pub unsafe fn countOfBytesExpectedToSend(&self) -> int64_t { - msg_send![self, countOfBytesExpectedToSend] - } - pub unsafe fn countOfBytesExpectedToReceive(&self) -> int64_t { - msg_send![self, countOfBytesExpectedToReceive] - } - pub unsafe fn taskDescription(&self) -> Option> { - msg_send_id![self, taskDescription] - } - pub unsafe fn setTaskDescription(&self, taskDescription: Option<&NSString>) { - msg_send![self, setTaskDescription: taskDescription] - } - pub unsafe fn cancel(&self) { - msg_send![self, cancel] - } - pub unsafe fn state(&self) -> NSURLSessionTaskState { - msg_send![self, state] - } - pub unsafe fn error(&self) -> Option> { - msg_send_id![self, error] - } - pub unsafe fn suspend(&self) { - msg_send![self, suspend] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn priority(&self) -> c_float { - msg_send![self, priority] - } - pub unsafe fn setPriority(&self, priority: c_float) { - msg_send![self, setPriority: priority] - } - pub unsafe fn prefersIncrementalDelivery(&self) -> bool { - msg_send![self, prefersIncrementalDelivery] - } - pub unsafe fn setPrefersIncrementalDelivery(&self, prefersIncrementalDelivery: bool) { - msg_send![ - self, - setPrefersIncrementalDelivery: prefersIncrementalDelivery - ] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + ); + #[method(countOfBytesSent)] + pub unsafe fn countOfBytesSent(&self) -> int64_t; + #[method(countOfBytesReceived)] + pub unsafe fn countOfBytesReceived(&self) -> int64_t; + #[method(countOfBytesExpectedToSend)] + pub unsafe fn countOfBytesExpectedToSend(&self) -> int64_t; + #[method(countOfBytesExpectedToReceive)] + pub unsafe fn countOfBytesExpectedToReceive(&self) -> int64_t; + #[method_id(taskDescription)] + pub unsafe fn taskDescription(&self) -> Option>; + # [method (setTaskDescription :)] + pub unsafe fn setTaskDescription(&self, taskDescription: Option<&NSString>); + #[method(cancel)] + pub unsafe fn cancel(&self); + #[method(state)] + pub unsafe fn state(&self) -> NSURLSessionTaskState; + #[method_id(error)] + pub unsafe fn error(&self) -> Option>; + #[method(suspend)] + pub unsafe fn suspend(&self); + #[method(resume)] + pub unsafe fn resume(&self); + #[method(priority)] + pub unsafe fn priority(&self) -> c_float; + # [method (setPriority :)] + pub unsafe fn setPriority(&self, priority: c_float); + #[method(prefersIncrementalDelivery)] + pub unsafe fn prefersIncrementalDelivery(&self) -> bool; + # [method (setPrefersIncrementalDelivery :)] + pub unsafe fn setPrefersIncrementalDelivery(&self, prefersIncrementalDelivery: bool); + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); extern_class!( @@ -387,12 +277,10 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionDataTask { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); extern_class!( @@ -404,12 +292,10 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionUploadTask { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); extern_class!( @@ -421,15 +307,12 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionDownloadTask { - pub unsafe fn cancelByProducingResumeData(&self, completionHandler: TodoBlock) { - msg_send![self, cancelByProducingResumeData: completionHandler] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + # [method (cancelByProducingResumeData :)] + pub unsafe fn cancelByProducingResumeData(&self, completionHandler: TodoBlock); + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); extern_class!( @@ -441,55 +324,35 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionStreamTask { + # [method (readDataOfMinLength : maxLength : timeout : completionHandler :)] pub unsafe fn readDataOfMinLength_maxLength_timeout_completionHandler( &self, minBytes: NSUInteger, maxBytes: NSUInteger, timeout: NSTimeInterval, completionHandler: TodoBlock, - ) { - msg_send![ - self, - readDataOfMinLength: minBytes, - maxLength: maxBytes, - timeout: timeout, - completionHandler: completionHandler - ] - } + ); + # [method (writeData : timeout : completionHandler :)] pub unsafe fn writeData_timeout_completionHandler( &self, data: &NSData, timeout: NSTimeInterval, completionHandler: TodoBlock, - ) { - msg_send![ - self, - writeData: data, - timeout: timeout, - completionHandler: completionHandler - ] - } - pub unsafe fn captureStreams(&self) { - msg_send![self, captureStreams] - } - pub unsafe fn closeWrite(&self) { - msg_send![self, closeWrite] - } - pub unsafe fn closeRead(&self) { - msg_send![self, closeRead] - } - pub unsafe fn startSecureConnection(&self) { - msg_send![self, startSecureConnection] - } - pub unsafe fn stopSecureConnection(&self) { - msg_send![self, stopSecureConnection] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + ); + #[method(captureStreams)] + pub unsafe fn captureStreams(&self); + #[method(closeWrite)] + pub unsafe fn closeWrite(&self); + #[method(closeRead)] + pub unsafe fn closeRead(&self); + #[method(startSecureConnection)] + pub unsafe fn startSecureConnection(&self); + #[method(stopSecureConnection)] + pub unsafe fn stopSecureConnection(&self); + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); extern_class!( @@ -501,27 +364,20 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionWebSocketMessage { - pub unsafe fn initWithData(&self, data: &NSData) -> Id { - msg_send_id![self, initWithData: data] - } - pub unsafe fn initWithString(&self, string: &NSString) -> Id { - msg_send_id![self, initWithString: string] - } - pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType { - msg_send![self, type] - } - pub unsafe fn data(&self) -> Option> { - msg_send_id![self, data] - } - pub unsafe fn string(&self) -> Option> { - msg_send_id![self, string] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + # [method_id (initWithData :)] + pub unsafe fn initWithData(&self, data: &NSData) -> Id; + # [method_id (initWithString :)] + pub unsafe fn initWithString(&self, string: &NSString) -> Id; + #[method(type)] + pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType; + #[method_id(data)] + pub unsafe fn data(&self) -> Option>; + #[method_id(string)] + pub unsafe fn string(&self) -> Option>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); extern_class!( @@ -533,48 +389,34 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionWebSocketTask { + # [method (sendMessage : completionHandler :)] pub unsafe fn sendMessage_completionHandler( &self, message: &NSURLSessionWebSocketMessage, completionHandler: TodoBlock, - ) { - msg_send![ - self, - sendMessage: message, - completionHandler: completionHandler - ] - } - pub unsafe fn receiveMessageWithCompletionHandler(&self, completionHandler: TodoBlock) { - msg_send![self, receiveMessageWithCompletionHandler: completionHandler] - } - pub unsafe fn sendPingWithPongReceiveHandler(&self, pongReceiveHandler: TodoBlock) { - msg_send![self, sendPingWithPongReceiveHandler: pongReceiveHandler] - } + ); + # [method (receiveMessageWithCompletionHandler :)] + pub unsafe fn receiveMessageWithCompletionHandler(&self, completionHandler: TodoBlock); + # [method (sendPingWithPongReceiveHandler :)] + pub unsafe fn sendPingWithPongReceiveHandler(&self, pongReceiveHandler: TodoBlock); + # [method (cancelWithCloseCode : reason :)] pub unsafe fn cancelWithCloseCode_reason( &self, closeCode: NSURLSessionWebSocketCloseCode, reason: Option<&NSData>, - ) { - msg_send![self, cancelWithCloseCode: closeCode, reason: reason] - } - pub unsafe fn maximumMessageSize(&self) -> NSInteger { - msg_send![self, maximumMessageSize] - } - pub unsafe fn setMaximumMessageSize(&self, maximumMessageSize: NSInteger) { - msg_send![self, setMaximumMessageSize: maximumMessageSize] - } - pub unsafe fn closeCode(&self) -> NSURLSessionWebSocketCloseCode { - msg_send![self, closeCode] - } - pub unsafe fn closeReason(&self) -> Option> { - msg_send_id![self, closeReason] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + ); + #[method(maximumMessageSize)] + pub unsafe fn maximumMessageSize(&self) -> NSInteger; + # [method (setMaximumMessageSize :)] + pub unsafe fn setMaximumMessageSize(&self, maximumMessageSize: NSInteger); + #[method(closeCode)] + pub unsafe fn closeCode(&self) -> NSURLSessionWebSocketCloseCode; + #[method_id(closeReason)] + pub unsafe fn closeReason(&self) -> Option>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); extern_class!( @@ -586,275 +428,173 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionConfiguration { - pub unsafe fn defaultSessionConfiguration() -> Id { - msg_send_id![Self::class(), defaultSessionConfiguration] - } - pub unsafe fn ephemeralSessionConfiguration() -> Id { - msg_send_id![Self::class(), ephemeralSessionConfiguration] - } + #[method_id(defaultSessionConfiguration)] + pub unsafe fn defaultSessionConfiguration() -> Id; + #[method_id(ephemeralSessionConfiguration)] + pub unsafe fn ephemeralSessionConfiguration() -> Id; + # [method_id (backgroundSessionConfigurationWithIdentifier :)] pub unsafe fn backgroundSessionConfigurationWithIdentifier( identifier: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - backgroundSessionConfigurationWithIdentifier: identifier - ] - } - pub unsafe fn identifier(&self) -> Option> { - msg_send_id![self, identifier] - } - pub unsafe fn requestCachePolicy(&self) -> NSURLRequestCachePolicy { - msg_send![self, requestCachePolicy] - } - pub unsafe fn setRequestCachePolicy(&self, requestCachePolicy: NSURLRequestCachePolicy) { - msg_send![self, setRequestCachePolicy: requestCachePolicy] - } - pub unsafe fn timeoutIntervalForRequest(&self) -> NSTimeInterval { - msg_send![self, timeoutIntervalForRequest] - } + ) -> Id; + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Option>; + #[method(requestCachePolicy)] + pub unsafe fn requestCachePolicy(&self) -> NSURLRequestCachePolicy; + # [method (setRequestCachePolicy :)] + pub unsafe fn setRequestCachePolicy(&self, requestCachePolicy: NSURLRequestCachePolicy); + #[method(timeoutIntervalForRequest)] + pub unsafe fn timeoutIntervalForRequest(&self) -> NSTimeInterval; + # [method (setTimeoutIntervalForRequest :)] pub unsafe fn setTimeoutIntervalForRequest( &self, timeoutIntervalForRequest: NSTimeInterval, - ) { - msg_send![ - self, - setTimeoutIntervalForRequest: timeoutIntervalForRequest - ] - } - pub unsafe fn timeoutIntervalForResource(&self) -> NSTimeInterval { - msg_send![self, timeoutIntervalForResource] - } + ); + #[method(timeoutIntervalForResource)] + pub unsafe fn timeoutIntervalForResource(&self) -> NSTimeInterval; + # [method (setTimeoutIntervalForResource :)] pub unsafe fn setTimeoutIntervalForResource( &self, timeoutIntervalForResource: NSTimeInterval, - ) { - msg_send![ - self, - setTimeoutIntervalForResource: timeoutIntervalForResource - ] - } - pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType { - msg_send![self, networkServiceType] - } + ); + #[method(networkServiceType)] + pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType; + # [method (setNetworkServiceType :)] pub unsafe fn setNetworkServiceType( &self, networkServiceType: NSURLRequestNetworkServiceType, - ) { - msg_send![self, setNetworkServiceType: networkServiceType] - } - pub unsafe fn allowsCellularAccess(&self) -> bool { - msg_send![self, allowsCellularAccess] - } - pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool) { - msg_send![self, setAllowsCellularAccess: allowsCellularAccess] - } - pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool { - msg_send![self, allowsExpensiveNetworkAccess] - } - pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool) { - msg_send![ - self, - setAllowsExpensiveNetworkAccess: allowsExpensiveNetworkAccess - ] - } - pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool { - msg_send![self, allowsConstrainedNetworkAccess] - } + ); + #[method(allowsCellularAccess)] + pub unsafe fn allowsCellularAccess(&self) -> bool; + # [method (setAllowsCellularAccess :)] + pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool); + #[method(allowsExpensiveNetworkAccess)] + pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool; + # [method (setAllowsExpensiveNetworkAccess :)] + pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool); + #[method(allowsConstrainedNetworkAccess)] + pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool; + # [method (setAllowsConstrainedNetworkAccess :)] pub unsafe fn setAllowsConstrainedNetworkAccess( &self, allowsConstrainedNetworkAccess: bool, - ) { - msg_send![ - self, - setAllowsConstrainedNetworkAccess: allowsConstrainedNetworkAccess - ] - } - pub unsafe fn waitsForConnectivity(&self) -> bool { - msg_send![self, waitsForConnectivity] - } - pub unsafe fn setWaitsForConnectivity(&self, waitsForConnectivity: bool) { - msg_send![self, setWaitsForConnectivity: waitsForConnectivity] - } - pub unsafe fn isDiscretionary(&self) -> bool { - msg_send![self, isDiscretionary] - } - pub unsafe fn setDiscretionary(&self, discretionary: bool) { - msg_send![self, setDiscretionary: discretionary] - } - pub unsafe fn sharedContainerIdentifier(&self) -> Option> { - msg_send_id![self, sharedContainerIdentifier] - } + ); + #[method(waitsForConnectivity)] + pub unsafe fn waitsForConnectivity(&self) -> bool; + # [method (setWaitsForConnectivity :)] + pub unsafe fn setWaitsForConnectivity(&self, waitsForConnectivity: bool); + #[method(isDiscretionary)] + pub unsafe fn isDiscretionary(&self) -> bool; + # [method (setDiscretionary :)] + pub unsafe fn setDiscretionary(&self, discretionary: bool); + #[method_id(sharedContainerIdentifier)] + pub unsafe fn sharedContainerIdentifier(&self) -> Option>; + # [method (setSharedContainerIdentifier :)] pub unsafe fn setSharedContainerIdentifier( &self, sharedContainerIdentifier: Option<&NSString>, - ) { - msg_send![ - self, - setSharedContainerIdentifier: sharedContainerIdentifier - ] - } - pub unsafe fn sessionSendsLaunchEvents(&self) -> bool { - msg_send![self, sessionSendsLaunchEvents] - } - pub unsafe fn setSessionSendsLaunchEvents(&self, sessionSendsLaunchEvents: bool) { - msg_send![self, setSessionSendsLaunchEvents: sessionSendsLaunchEvents] - } - pub unsafe fn connectionProxyDictionary(&self) -> Option> { - msg_send_id![self, connectionProxyDictionary] - } + ); + #[method(sessionSendsLaunchEvents)] + pub unsafe fn sessionSendsLaunchEvents(&self) -> bool; + # [method (setSessionSendsLaunchEvents :)] + pub unsafe fn setSessionSendsLaunchEvents(&self, sessionSendsLaunchEvents: bool); + #[method_id(connectionProxyDictionary)] + pub unsafe fn connectionProxyDictionary(&self) -> Option>; + # [method (setConnectionProxyDictionary :)] pub unsafe fn setConnectionProxyDictionary( &self, connectionProxyDictionary: Option<&NSDictionary>, - ) { - msg_send![ - self, - setConnectionProxyDictionary: connectionProxyDictionary - ] - } - pub unsafe fn TLSMinimumSupportedProtocol(&self) -> SSLProtocol { - msg_send![self, TLSMinimumSupportedProtocol] - } + ); + #[method(TLSMinimumSupportedProtocol)] + pub unsafe fn TLSMinimumSupportedProtocol(&self) -> SSLProtocol; + # [method (setTLSMinimumSupportedProtocol :)] pub unsafe fn setTLSMinimumSupportedProtocol( &self, TLSMinimumSupportedProtocol: SSLProtocol, - ) { - msg_send![ - self, - setTLSMinimumSupportedProtocol: TLSMinimumSupportedProtocol - ] - } - pub unsafe fn TLSMaximumSupportedProtocol(&self) -> SSLProtocol { - msg_send![self, TLSMaximumSupportedProtocol] - } + ); + #[method(TLSMaximumSupportedProtocol)] + pub unsafe fn TLSMaximumSupportedProtocol(&self) -> SSLProtocol; + # [method (setTLSMaximumSupportedProtocol :)] pub unsafe fn setTLSMaximumSupportedProtocol( &self, TLSMaximumSupportedProtocol: SSLProtocol, - ) { - msg_send![ - self, - setTLSMaximumSupportedProtocol: TLSMaximumSupportedProtocol - ] - } - pub unsafe fn TLSMinimumSupportedProtocolVersion(&self) -> tls_protocol_version_t { - msg_send![self, TLSMinimumSupportedProtocolVersion] - } + ); + #[method(TLSMinimumSupportedProtocolVersion)] + pub unsafe fn TLSMinimumSupportedProtocolVersion(&self) -> tls_protocol_version_t; + # [method (setTLSMinimumSupportedProtocolVersion :)] pub unsafe fn setTLSMinimumSupportedProtocolVersion( &self, TLSMinimumSupportedProtocolVersion: tls_protocol_version_t, - ) { - msg_send![ - self, - setTLSMinimumSupportedProtocolVersion: TLSMinimumSupportedProtocolVersion - ] - } - pub unsafe fn TLSMaximumSupportedProtocolVersion(&self) -> tls_protocol_version_t { - msg_send![self, TLSMaximumSupportedProtocolVersion] - } + ); + #[method(TLSMaximumSupportedProtocolVersion)] + pub unsafe fn TLSMaximumSupportedProtocolVersion(&self) -> tls_protocol_version_t; + # [method (setTLSMaximumSupportedProtocolVersion :)] pub unsafe fn setTLSMaximumSupportedProtocolVersion( &self, TLSMaximumSupportedProtocolVersion: tls_protocol_version_t, - ) { - msg_send![ - self, - setTLSMaximumSupportedProtocolVersion: TLSMaximumSupportedProtocolVersion - ] - } - pub unsafe fn HTTPShouldUsePipelining(&self) -> bool { - msg_send![self, HTTPShouldUsePipelining] - } - pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool) { - msg_send![self, setHTTPShouldUsePipelining: HTTPShouldUsePipelining] - } - pub unsafe fn HTTPShouldSetCookies(&self) -> bool { - msg_send![self, HTTPShouldSetCookies] - } - pub unsafe fn setHTTPShouldSetCookies(&self, HTTPShouldSetCookies: bool) { - msg_send![self, setHTTPShouldSetCookies: HTTPShouldSetCookies] - } - pub unsafe fn HTTPCookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy { - msg_send![self, HTTPCookieAcceptPolicy] - } + ); + #[method(HTTPShouldUsePipelining)] + pub unsafe fn HTTPShouldUsePipelining(&self) -> bool; + # [method (setHTTPShouldUsePipelining :)] + pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool); + #[method(HTTPShouldSetCookies)] + pub unsafe fn HTTPShouldSetCookies(&self) -> bool; + # [method (setHTTPShouldSetCookies :)] + pub unsafe fn setHTTPShouldSetCookies(&self, HTTPShouldSetCookies: bool); + #[method(HTTPCookieAcceptPolicy)] + pub unsafe fn HTTPCookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy; + # [method (setHTTPCookieAcceptPolicy :)] pub unsafe fn setHTTPCookieAcceptPolicy( &self, HTTPCookieAcceptPolicy: NSHTTPCookieAcceptPolicy, - ) { - msg_send![self, setHTTPCookieAcceptPolicy: HTTPCookieAcceptPolicy] - } - pub unsafe fn HTTPAdditionalHeaders(&self) -> Option> { - msg_send_id![self, HTTPAdditionalHeaders] - } - pub unsafe fn setHTTPAdditionalHeaders( - &self, - HTTPAdditionalHeaders: Option<&NSDictionary>, - ) { - msg_send![self, setHTTPAdditionalHeaders: HTTPAdditionalHeaders] - } - pub unsafe fn HTTPMaximumConnectionsPerHost(&self) -> NSInteger { - msg_send![self, HTTPMaximumConnectionsPerHost] - } + ); + #[method_id(HTTPAdditionalHeaders)] + pub unsafe fn HTTPAdditionalHeaders(&self) -> Option>; + # [method (setHTTPAdditionalHeaders :)] + pub unsafe fn setHTTPAdditionalHeaders(&self, HTTPAdditionalHeaders: Option<&NSDictionary>); + #[method(HTTPMaximumConnectionsPerHost)] + pub unsafe fn HTTPMaximumConnectionsPerHost(&self) -> NSInteger; + # [method (setHTTPMaximumConnectionsPerHost :)] pub unsafe fn setHTTPMaximumConnectionsPerHost( &self, HTTPMaximumConnectionsPerHost: NSInteger, - ) { - msg_send![ - self, - setHTTPMaximumConnectionsPerHost: HTTPMaximumConnectionsPerHost - ] - } - pub unsafe fn HTTPCookieStorage(&self) -> Option> { - msg_send_id![self, HTTPCookieStorage] - } - pub unsafe fn setHTTPCookieStorage(&self, HTTPCookieStorage: Option<&NSHTTPCookieStorage>) { - msg_send![self, setHTTPCookieStorage: HTTPCookieStorage] - } - pub unsafe fn URLCredentialStorage(&self) -> Option> { - msg_send_id![self, URLCredentialStorage] - } + ); + #[method_id(HTTPCookieStorage)] + pub unsafe fn HTTPCookieStorage(&self) -> Option>; + # [method (setHTTPCookieStorage :)] + pub unsafe fn setHTTPCookieStorage(&self, HTTPCookieStorage: Option<&NSHTTPCookieStorage>); + #[method_id(URLCredentialStorage)] + pub unsafe fn URLCredentialStorage(&self) -> Option>; + # [method (setURLCredentialStorage :)] pub unsafe fn setURLCredentialStorage( &self, URLCredentialStorage: Option<&NSURLCredentialStorage>, - ) { - msg_send![self, setURLCredentialStorage: URLCredentialStorage] - } - pub unsafe fn URLCache(&self) -> Option> { - msg_send_id![self, URLCache] - } - pub unsafe fn setURLCache(&self, URLCache: Option<&NSURLCache>) { - msg_send![self, setURLCache: URLCache] - } - pub unsafe fn shouldUseExtendedBackgroundIdleMode(&self) -> bool { - msg_send![self, shouldUseExtendedBackgroundIdleMode] - } + ); + #[method_id(URLCache)] + pub unsafe fn URLCache(&self) -> Option>; + # [method (setURLCache :)] + pub unsafe fn setURLCache(&self, URLCache: Option<&NSURLCache>); + #[method(shouldUseExtendedBackgroundIdleMode)] + pub unsafe fn shouldUseExtendedBackgroundIdleMode(&self) -> bool; + # [method (setShouldUseExtendedBackgroundIdleMode :)] pub unsafe fn setShouldUseExtendedBackgroundIdleMode( &self, shouldUseExtendedBackgroundIdleMode: bool, - ) { - msg_send![ - self, - setShouldUseExtendedBackgroundIdleMode: shouldUseExtendedBackgroundIdleMode - ] - } - pub unsafe fn protocolClasses(&self) -> Option, Shared>> { - msg_send_id![self, protocolClasses] - } - pub unsafe fn setProtocolClasses(&self, protocolClasses: Option<&NSArray>) { - msg_send![self, setProtocolClasses: protocolClasses] - } - pub unsafe fn multipathServiceType(&self) -> NSURLSessionMultipathServiceType { - msg_send![self, multipathServiceType] - } + ); + #[method_id(protocolClasses)] + pub unsafe fn protocolClasses(&self) -> Option, Shared>>; + # [method (setProtocolClasses :)] + pub unsafe fn setProtocolClasses(&self, protocolClasses: Option<&NSArray>); + #[method(multipathServiceType)] + pub unsafe fn multipathServiceType(&self) -> NSURLSessionMultipathServiceType; + # [method (setMultipathServiceType :)] pub unsafe fn setMultipathServiceType( &self, multipathServiceType: NSURLSessionMultipathServiceType, - ) { - msg_send![self, setMultipathServiceType: multipathServiceType] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + ); + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); pub type NSURLSessionDelegate = NSObject; @@ -866,11 +606,10 @@ pub type NSURLSessionWebSocketDelegate = NSObject; extern_methods!( #[doc = "NSURLSessionDeprecated"] unsafe impl NSURLSessionConfiguration { + # [method_id (backgroundSessionConfiguration :)] pub unsafe fn backgroundSessionConfiguration( identifier: &NSString, - ) -> Id { - msg_send_id![Self::class(), backgroundSessionConfiguration: identifier] - } + ) -> Id; } ); extern_class!( @@ -882,116 +621,80 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionTaskTransactionMetrics { - pub unsafe fn request(&self) -> Id { - msg_send_id![self, request] - } - pub unsafe fn response(&self) -> Option> { - msg_send_id![self, response] - } - pub unsafe fn fetchStartDate(&self) -> Option> { - msg_send_id![self, fetchStartDate] - } - pub unsafe fn domainLookupStartDate(&self) -> Option> { - msg_send_id![self, domainLookupStartDate] - } - pub unsafe fn domainLookupEndDate(&self) -> Option> { - msg_send_id![self, domainLookupEndDate] - } - pub unsafe fn connectStartDate(&self) -> Option> { - msg_send_id![self, connectStartDate] - } - pub unsafe fn secureConnectionStartDate(&self) -> Option> { - msg_send_id![self, secureConnectionStartDate] - } - pub unsafe fn secureConnectionEndDate(&self) -> Option> { - msg_send_id![self, secureConnectionEndDate] - } - pub unsafe fn connectEndDate(&self) -> Option> { - msg_send_id![self, connectEndDate] - } - pub unsafe fn requestStartDate(&self) -> Option> { - msg_send_id![self, requestStartDate] - } - pub unsafe fn requestEndDate(&self) -> Option> { - msg_send_id![self, requestEndDate] - } - pub unsafe fn responseStartDate(&self) -> Option> { - msg_send_id![self, responseStartDate] - } - pub unsafe fn responseEndDate(&self) -> Option> { - msg_send_id![self, responseEndDate] - } - pub unsafe fn networkProtocolName(&self) -> Option> { - msg_send_id![self, networkProtocolName] - } - pub unsafe fn isProxyConnection(&self) -> bool { - msg_send![self, isProxyConnection] - } - pub unsafe fn isReusedConnection(&self) -> bool { - msg_send![self, isReusedConnection] - } - pub unsafe fn resourceFetchType(&self) -> NSURLSessionTaskMetricsResourceFetchType { - msg_send![self, resourceFetchType] - } - pub unsafe fn countOfRequestHeaderBytesSent(&self) -> int64_t { - msg_send![self, countOfRequestHeaderBytesSent] - } - pub unsafe fn countOfRequestBodyBytesSent(&self) -> int64_t { - msg_send![self, countOfRequestBodyBytesSent] - } - pub unsafe fn countOfRequestBodyBytesBeforeEncoding(&self) -> int64_t { - msg_send![self, countOfRequestBodyBytesBeforeEncoding] - } - pub unsafe fn countOfResponseHeaderBytesReceived(&self) -> int64_t { - msg_send![self, countOfResponseHeaderBytesReceived] - } - pub unsafe fn countOfResponseBodyBytesReceived(&self) -> int64_t { - msg_send![self, countOfResponseBodyBytesReceived] - } - pub unsafe fn countOfResponseBodyBytesAfterDecoding(&self) -> int64_t { - msg_send![self, countOfResponseBodyBytesAfterDecoding] - } - pub unsafe fn localAddress(&self) -> Option> { - msg_send_id![self, localAddress] - } - pub unsafe fn localPort(&self) -> Option> { - msg_send_id![self, localPort] - } - pub unsafe fn remoteAddress(&self) -> Option> { - msg_send_id![self, remoteAddress] - } - pub unsafe fn remotePort(&self) -> Option> { - msg_send_id![self, remotePort] - } - pub unsafe fn negotiatedTLSProtocolVersion(&self) -> Option> { - msg_send_id![self, negotiatedTLSProtocolVersion] - } - pub unsafe fn negotiatedTLSCipherSuite(&self) -> Option> { - msg_send_id![self, negotiatedTLSCipherSuite] - } - pub unsafe fn isCellular(&self) -> bool { - msg_send![self, isCellular] - } - pub unsafe fn isExpensive(&self) -> bool { - msg_send![self, isExpensive] - } - pub unsafe fn isConstrained(&self) -> bool { - msg_send![self, isConstrained] - } - pub unsafe fn isMultipath(&self) -> bool { - msg_send![self, isMultipath] - } + #[method_id(request)] + pub unsafe fn request(&self) -> Id; + #[method_id(response)] + pub unsafe fn response(&self) -> Option>; + #[method_id(fetchStartDate)] + pub unsafe fn fetchStartDate(&self) -> Option>; + #[method_id(domainLookupStartDate)] + pub unsafe fn domainLookupStartDate(&self) -> Option>; + #[method_id(domainLookupEndDate)] + pub unsafe fn domainLookupEndDate(&self) -> Option>; + #[method_id(connectStartDate)] + pub unsafe fn connectStartDate(&self) -> Option>; + #[method_id(secureConnectionStartDate)] + pub unsafe fn secureConnectionStartDate(&self) -> Option>; + #[method_id(secureConnectionEndDate)] + pub unsafe fn secureConnectionEndDate(&self) -> Option>; + #[method_id(connectEndDate)] + pub unsafe fn connectEndDate(&self) -> Option>; + #[method_id(requestStartDate)] + pub unsafe fn requestStartDate(&self) -> Option>; + #[method_id(requestEndDate)] + pub unsafe fn requestEndDate(&self) -> Option>; + #[method_id(responseStartDate)] + pub unsafe fn responseStartDate(&self) -> Option>; + #[method_id(responseEndDate)] + pub unsafe fn responseEndDate(&self) -> Option>; + #[method_id(networkProtocolName)] + pub unsafe fn networkProtocolName(&self) -> Option>; + #[method(isProxyConnection)] + pub unsafe fn isProxyConnection(&self) -> bool; + #[method(isReusedConnection)] + pub unsafe fn isReusedConnection(&self) -> bool; + #[method(resourceFetchType)] + pub unsafe fn resourceFetchType(&self) -> NSURLSessionTaskMetricsResourceFetchType; + #[method(countOfRequestHeaderBytesSent)] + pub unsafe fn countOfRequestHeaderBytesSent(&self) -> int64_t; + #[method(countOfRequestBodyBytesSent)] + pub unsafe fn countOfRequestBodyBytesSent(&self) -> int64_t; + #[method(countOfRequestBodyBytesBeforeEncoding)] + pub unsafe fn countOfRequestBodyBytesBeforeEncoding(&self) -> int64_t; + #[method(countOfResponseHeaderBytesReceived)] + pub unsafe fn countOfResponseHeaderBytesReceived(&self) -> int64_t; + #[method(countOfResponseBodyBytesReceived)] + pub unsafe fn countOfResponseBodyBytesReceived(&self) -> int64_t; + #[method(countOfResponseBodyBytesAfterDecoding)] + pub unsafe fn countOfResponseBodyBytesAfterDecoding(&self) -> int64_t; + #[method_id(localAddress)] + pub unsafe fn localAddress(&self) -> Option>; + #[method_id(localPort)] + pub unsafe fn localPort(&self) -> Option>; + #[method_id(remoteAddress)] + pub unsafe fn remoteAddress(&self) -> Option>; + #[method_id(remotePort)] + pub unsafe fn remotePort(&self) -> Option>; + #[method_id(negotiatedTLSProtocolVersion)] + pub unsafe fn negotiatedTLSProtocolVersion(&self) -> Option>; + #[method_id(negotiatedTLSCipherSuite)] + pub unsafe fn negotiatedTLSCipherSuite(&self) -> Option>; + #[method(isCellular)] + pub unsafe fn isCellular(&self) -> bool; + #[method(isExpensive)] + pub unsafe fn isExpensive(&self) -> bool; + #[method(isConstrained)] + pub unsafe fn isConstrained(&self) -> bool; + #[method(isMultipath)] + pub unsafe fn isMultipath(&self) -> bool; + #[method(domainResolutionProtocol)] pub unsafe fn domainResolutionProtocol( &self, - ) -> NSURLSessionTaskMetricsDomainResolutionProtocol { - msg_send![self, domainResolutionProtocol] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + ) -> NSURLSessionTaskMetricsDomainResolutionProtocol; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); extern_class!( @@ -1003,22 +706,17 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionTaskMetrics { + #[method_id(transactionMetrics)] pub unsafe fn transactionMetrics( &self, - ) -> Id, Shared> { - msg_send_id![self, transactionMetrics] - } - pub unsafe fn taskInterval(&self) -> Id { - msg_send_id![self, taskInterval] - } - pub unsafe fn redirectCount(&self) -> NSUInteger { - msg_send![self, redirectCount] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } + ) -> Id, Shared>; + #[method_id(taskInterval)] + pub unsafe fn taskInterval(&self) -> Id; + #[method(redirectCount)] + pub unsafe fn redirectCount(&self) -> NSUInteger; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index 1100ec073..ca0d348fe 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUUID; @@ -14,26 +14,19 @@ extern_class!( ); extern_methods!( unsafe impl NSUUID { - pub unsafe fn UUID() -> Id { - msg_send_id![Self::class(), UUID] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithUUIDString(&self, string: &NSString) -> Option> { - msg_send_id![self, initWithUUIDString: string] - } - pub unsafe fn initWithUUIDBytes(&self, bytes: uuid_t) -> Id { - msg_send_id![self, initWithUUIDBytes: bytes] - } - pub unsafe fn getUUIDBytes(&self, uuid: uuid_t) { - msg_send![self, getUUIDBytes: uuid] - } - pub unsafe fn compare(&self, otherUUID: &NSUUID) -> NSComparisonResult { - msg_send![self, compare: otherUUID] - } - pub unsafe fn UUIDString(&self) -> Id { - msg_send_id![self, UUIDString] - } + #[method_id(UUID)] + pub unsafe fn UUID() -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithUUIDString :)] + pub unsafe fn initWithUUIDString(&self, string: &NSString) -> Option>; + # [method_id (initWithUUIDBytes :)] + pub unsafe fn initWithUUIDBytes(&self, bytes: uuid_t) -> Id; + # [method (getUUIDBytes :)] + pub unsafe fn getUUIDBytes(&self, uuid: uuid_t); + # [method (compare :)] + pub unsafe fn compare(&self, otherUUID: &NSUUID) -> NSComparisonResult; + #[method_id(UUIDString)] + pub unsafe fn UUIDString(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 035e1e37e..f778fa477 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUbiquitousKeyValueStore; @@ -17,74 +17,53 @@ extern_class!( ); extern_methods!( unsafe impl NSUbiquitousKeyValueStore { - pub unsafe fn defaultStore() -> Id { - msg_send_id![Self::class(), defaultStore] - } - pub unsafe fn objectForKey(&self, aKey: &NSString) -> Option> { - msg_send_id![self, objectForKey: aKey] - } - pub unsafe fn setObject_forKey(&self, anObject: Option<&Object>, aKey: &NSString) { - msg_send![self, setObject: anObject, forKey: aKey] - } - pub unsafe fn removeObjectForKey(&self, aKey: &NSString) { - msg_send![self, removeObjectForKey: aKey] - } - pub unsafe fn stringForKey(&self, aKey: &NSString) -> Option> { - msg_send_id![self, stringForKey: aKey] - } - pub unsafe fn arrayForKey(&self, aKey: &NSString) -> Option> { - msg_send_id![self, arrayForKey: aKey] - } + #[method_id(defaultStore)] + pub unsafe fn defaultStore() -> Id; + # [method_id (objectForKey :)] + pub unsafe fn objectForKey(&self, aKey: &NSString) -> Option>; + # [method (setObject : forKey :)] + pub unsafe fn setObject_forKey(&self, anObject: Option<&Object>, aKey: &NSString); + # [method (removeObjectForKey :)] + pub unsafe fn removeObjectForKey(&self, aKey: &NSString); + # [method_id (stringForKey :)] + pub unsafe fn stringForKey(&self, aKey: &NSString) -> Option>; + # [method_id (arrayForKey :)] + pub unsafe fn arrayForKey(&self, aKey: &NSString) -> Option>; + # [method_id (dictionaryForKey :)] pub unsafe fn dictionaryForKey( &self, aKey: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, dictionaryForKey: aKey] - } - pub unsafe fn dataForKey(&self, aKey: &NSString) -> Option> { - msg_send_id![self, dataForKey: aKey] - } - pub unsafe fn longLongForKey(&self, aKey: &NSString) -> c_longlong { - msg_send![self, longLongForKey: aKey] - } - pub unsafe fn doubleForKey(&self, aKey: &NSString) -> c_double { - msg_send![self, doubleForKey: aKey] - } - pub unsafe fn boolForKey(&self, aKey: &NSString) -> bool { - msg_send![self, boolForKey: aKey] - } - pub unsafe fn setString_forKey(&self, aString: Option<&NSString>, aKey: &NSString) { - msg_send![self, setString: aString, forKey: aKey] - } - pub unsafe fn setData_forKey(&self, aData: Option<&NSData>, aKey: &NSString) { - msg_send![self, setData: aData, forKey: aKey] - } - pub unsafe fn setArray_forKey(&self, anArray: Option<&NSArray>, aKey: &NSString) { - msg_send![self, setArray: anArray, forKey: aKey] - } + ) -> Option, Shared>>; + # [method_id (dataForKey :)] + pub unsafe fn dataForKey(&self, aKey: &NSString) -> Option>; + # [method (longLongForKey :)] + pub unsafe fn longLongForKey(&self, aKey: &NSString) -> c_longlong; + # [method (doubleForKey :)] + pub unsafe fn doubleForKey(&self, aKey: &NSString) -> c_double; + # [method (boolForKey :)] + pub unsafe fn boolForKey(&self, aKey: &NSString) -> bool; + # [method (setString : forKey :)] + pub unsafe fn setString_forKey(&self, aString: Option<&NSString>, aKey: &NSString); + # [method (setData : forKey :)] + pub unsafe fn setData_forKey(&self, aData: Option<&NSData>, aKey: &NSString); + # [method (setArray : forKey :)] + pub unsafe fn setArray_forKey(&self, anArray: Option<&NSArray>, aKey: &NSString); + # [method (setDictionary : forKey :)] pub unsafe fn setDictionary_forKey( &self, aDictionary: Option<&NSDictionary>, aKey: &NSString, - ) { - msg_send![self, setDictionary: aDictionary, forKey: aKey] - } - pub unsafe fn setLongLong_forKey(&self, value: c_longlong, aKey: &NSString) { - msg_send![self, setLongLong: value, forKey: aKey] - } - pub unsafe fn setDouble_forKey(&self, value: c_double, aKey: &NSString) { - msg_send![self, setDouble: value, forKey: aKey] - } - pub unsafe fn setBool_forKey(&self, value: bool, aKey: &NSString) { - msg_send![self, setBool: value, forKey: aKey] - } - pub unsafe fn dictionaryRepresentation( - &self, - ) -> Id, Shared> { - msg_send_id![self, dictionaryRepresentation] - } - pub unsafe fn synchronize(&self) -> bool { - msg_send![self, synchronize] - } + ); + # [method (setLongLong : forKey :)] + pub unsafe fn setLongLong_forKey(&self, value: c_longlong, aKey: &NSString); + # [method (setDouble : forKey :)] + pub unsafe fn setDouble_forKey(&self, value: c_double, aKey: &NSString); + # [method (setBool : forKey :)] + pub unsafe fn setBool_forKey(&self, value: bool, aKey: &NSString); + #[method_id(dictionaryRepresentation)] + pub unsafe fn dictionaryRepresentation(&self) + -> Id, Shared>; + #[method(synchronize)] + pub unsafe fn synchronize(&self) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index a13a26b59..a7cca9eaf 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUndoManager; @@ -16,127 +16,88 @@ extern_class!( ); extern_methods!( unsafe impl NSUndoManager { - pub unsafe fn beginUndoGrouping(&self) { - msg_send![self, beginUndoGrouping] - } - pub unsafe fn endUndoGrouping(&self) { - msg_send![self, endUndoGrouping] - } - pub unsafe fn groupingLevel(&self) -> NSInteger { - msg_send![self, groupingLevel] - } - pub unsafe fn disableUndoRegistration(&self) { - msg_send![self, disableUndoRegistration] - } - pub unsafe fn enableUndoRegistration(&self) { - msg_send![self, enableUndoRegistration] - } - pub unsafe fn isUndoRegistrationEnabled(&self) -> bool { - msg_send![self, isUndoRegistrationEnabled] - } - pub unsafe fn groupsByEvent(&self) -> bool { - msg_send![self, groupsByEvent] - } - pub unsafe fn setGroupsByEvent(&self, groupsByEvent: bool) { - msg_send![self, setGroupsByEvent: groupsByEvent] - } - pub unsafe fn levelsOfUndo(&self) -> NSUInteger { - msg_send![self, levelsOfUndo] - } - pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger) { - msg_send![self, setLevelsOfUndo: levelsOfUndo] - } - pub unsafe fn runLoopModes(&self) -> Id, Shared> { - msg_send_id![self, runLoopModes] - } - pub unsafe fn setRunLoopModes(&self, runLoopModes: &NSArray) { - msg_send![self, setRunLoopModes: runLoopModes] - } - pub unsafe fn undo(&self) { - msg_send![self, undo] - } - pub unsafe fn redo(&self) { - msg_send![self, redo] - } - pub unsafe fn undoNestedGroup(&self) { - msg_send![self, undoNestedGroup] - } - pub unsafe fn canUndo(&self) -> bool { - msg_send![self, canUndo] - } - pub unsafe fn canRedo(&self) -> bool { - msg_send![self, canRedo] - } - pub unsafe fn isUndoing(&self) -> bool { - msg_send![self, isUndoing] - } - pub unsafe fn isRedoing(&self) -> bool { - msg_send![self, isRedoing] - } - pub unsafe fn removeAllActions(&self) { - msg_send![self, removeAllActions] - } - pub unsafe fn removeAllActionsWithTarget(&self, target: &Object) { - msg_send![self, removeAllActionsWithTarget: target] - } + #[method(beginUndoGrouping)] + pub unsafe fn beginUndoGrouping(&self); + #[method(endUndoGrouping)] + pub unsafe fn endUndoGrouping(&self); + #[method(groupingLevel)] + pub unsafe fn groupingLevel(&self) -> NSInteger; + #[method(disableUndoRegistration)] + pub unsafe fn disableUndoRegistration(&self); + #[method(enableUndoRegistration)] + pub unsafe fn enableUndoRegistration(&self); + #[method(isUndoRegistrationEnabled)] + pub unsafe fn isUndoRegistrationEnabled(&self) -> bool; + #[method(groupsByEvent)] + pub unsafe fn groupsByEvent(&self) -> bool; + # [method (setGroupsByEvent :)] + pub unsafe fn setGroupsByEvent(&self, groupsByEvent: bool); + #[method(levelsOfUndo)] + pub unsafe fn levelsOfUndo(&self) -> NSUInteger; + # [method (setLevelsOfUndo :)] + pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger); + #[method_id(runLoopModes)] + pub unsafe fn runLoopModes(&self) -> Id, Shared>; + # [method (setRunLoopModes :)] + pub unsafe fn setRunLoopModes(&self, runLoopModes: &NSArray); + #[method(undo)] + pub unsafe fn undo(&self); + #[method(redo)] + pub unsafe fn redo(&self); + #[method(undoNestedGroup)] + pub unsafe fn undoNestedGroup(&self); + #[method(canUndo)] + pub unsafe fn canUndo(&self) -> bool; + #[method(canRedo)] + pub unsafe fn canRedo(&self) -> bool; + #[method(isUndoing)] + pub unsafe fn isUndoing(&self) -> bool; + #[method(isRedoing)] + pub unsafe fn isRedoing(&self) -> bool; + #[method(removeAllActions)] + pub unsafe fn removeAllActions(&self); + # [method (removeAllActionsWithTarget :)] + pub unsafe fn removeAllActionsWithTarget(&self, target: &Object); + # [method (registerUndoWithTarget : selector : object :)] pub unsafe fn registerUndoWithTarget_selector_object( &self, target: &Object, selector: Sel, anObject: Option<&Object>, - ) { - msg_send![ - self, - registerUndoWithTarget: target, - selector: selector, - object: anObject - ] - } - pub unsafe fn prepareWithInvocationTarget(&self, target: &Object) -> Id { - msg_send_id![self, prepareWithInvocationTarget: target] - } + ); + # [method_id (prepareWithInvocationTarget :)] + pub unsafe fn prepareWithInvocationTarget(&self, target: &Object) -> Id; + # [method (registerUndoWithTarget : handler :)] pub unsafe fn registerUndoWithTarget_handler( &self, target: &Object, undoHandler: TodoBlock, - ) { - msg_send![self, registerUndoWithTarget: target, handler: undoHandler] - } - pub unsafe fn setActionIsDiscardable(&self, discardable: bool) { - msg_send![self, setActionIsDiscardable: discardable] - } - pub unsafe fn undoActionIsDiscardable(&self) -> bool { - msg_send![self, undoActionIsDiscardable] - } - pub unsafe fn redoActionIsDiscardable(&self) -> bool { - msg_send![self, redoActionIsDiscardable] - } - pub unsafe fn undoActionName(&self) -> Id { - msg_send_id![self, undoActionName] - } - pub unsafe fn redoActionName(&self) -> Id { - msg_send_id![self, redoActionName] - } - pub unsafe fn setActionName(&self, actionName: &NSString) { - msg_send![self, setActionName: actionName] - } - pub unsafe fn undoMenuItemTitle(&self) -> Id { - msg_send_id![self, undoMenuItemTitle] - } - pub unsafe fn redoMenuItemTitle(&self) -> Id { - msg_send_id![self, redoMenuItemTitle] - } + ); + # [method (setActionIsDiscardable :)] + pub unsafe fn setActionIsDiscardable(&self, discardable: bool); + #[method(undoActionIsDiscardable)] + pub unsafe fn undoActionIsDiscardable(&self) -> bool; + #[method(redoActionIsDiscardable)] + pub unsafe fn redoActionIsDiscardable(&self) -> bool; + #[method_id(undoActionName)] + pub unsafe fn undoActionName(&self) -> Id; + #[method_id(redoActionName)] + pub unsafe fn redoActionName(&self) -> Id; + # [method (setActionName :)] + pub unsafe fn setActionName(&self, actionName: &NSString); + #[method_id(undoMenuItemTitle)] + pub unsafe fn undoMenuItemTitle(&self) -> Id; + #[method_id(redoMenuItemTitle)] + pub unsafe fn redoMenuItemTitle(&self) -> Id; + # [method_id (undoMenuTitleForUndoActionName :)] pub unsafe fn undoMenuTitleForUndoActionName( &self, actionName: &NSString, - ) -> Id { - msg_send_id![self, undoMenuTitleForUndoActionName: actionName] - } + ) -> Id; + # [method_id (redoMenuTitleForUndoActionName :)] pub unsafe fn redoMenuTitleForUndoActionName( &self, actionName: &NSString, - ) -> Id { - msg_send_id![self, redoMenuTitleForUndoActionName: actionName] - } + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index c5c00d57f..9309dccff 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUnitConverter; @@ -12,12 +12,10 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitConverter { - pub unsafe fn baseUnitValueFromValue(&self, value: c_double) -> c_double { - msg_send![self, baseUnitValueFromValue: value] - } - pub unsafe fn valueFromBaseUnitValue(&self, baseUnitValue: c_double) -> c_double { - msg_send![self, valueFromBaseUnitValue: baseUnitValue] - } + # [method (baseUnitValueFromValue :)] + pub unsafe fn baseUnitValueFromValue(&self, value: c_double) -> c_double; + # [method (valueFromBaseUnitValue :)] + pub unsafe fn valueFromBaseUnitValue(&self, baseUnitValue: c_double) -> c_double; } ); extern_class!( @@ -29,22 +27,18 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitConverterLinear { - pub unsafe fn coefficient(&self) -> c_double { - msg_send![self, coefficient] - } - pub unsafe fn constant(&self) -> c_double { - msg_send![self, constant] - } - pub unsafe fn initWithCoefficient(&self, coefficient: c_double) -> Id { - msg_send_id![self, initWithCoefficient: coefficient] - } + #[method(coefficient)] + pub unsafe fn coefficient(&self) -> c_double; + #[method(constant)] + pub unsafe fn constant(&self) -> c_double; + # [method_id (initWithCoefficient :)] + pub unsafe fn initWithCoefficient(&self, coefficient: c_double) -> Id; + # [method_id (initWithCoefficient : constant :)] pub unsafe fn initWithCoefficient_constant( &self, coefficient: c_double, constant: c_double, - ) -> Id { - msg_send_id![self, initWithCoefficient: coefficient, constant: constant] - } + ) -> Id; } ); extern_class!( @@ -56,18 +50,14 @@ extern_class!( ); extern_methods!( unsafe impl NSUnit { - pub unsafe fn symbol(&self) -> Id { - msg_send_id![self, symbol] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn new() -> Id { - msg_send_id![Self::class(), new] - } - pub unsafe fn initWithSymbol(&self, symbol: &NSString) -> Id { - msg_send_id![self, initWithSymbol: symbol] - } + #[method_id(symbol)] + pub unsafe fn symbol(&self) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + # [method_id (initWithSymbol :)] + pub unsafe fn initWithSymbol(&self, symbol: &NSString) -> Id; } ); extern_class!( @@ -79,19 +69,16 @@ extern_class!( ); extern_methods!( unsafe impl NSDimension { - pub unsafe fn converter(&self) -> Id { - msg_send_id![self, converter] - } + #[method_id(converter)] + pub unsafe fn converter(&self) -> Id; + # [method_id (initWithSymbol : converter :)] pub unsafe fn initWithSymbol_converter( &self, symbol: &NSString, converter: &NSUnitConverter, - ) -> Id { - msg_send_id![self, initWithSymbol: symbol, converter: converter] - } - pub unsafe fn baseUnit() -> Id { - msg_send_id![Self::class(), baseUnit] - } + ) -> Id; + #[method_id(baseUnit)] + pub unsafe fn baseUnit() -> Id; } ); extern_class!( @@ -103,12 +90,10 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitAcceleration { - pub unsafe fn metersPerSecondSquared() -> Id { - msg_send_id![Self::class(), metersPerSecondSquared] - } - pub unsafe fn gravity() -> Id { - msg_send_id![Self::class(), gravity] - } + #[method_id(metersPerSecondSquared)] + pub unsafe fn metersPerSecondSquared() -> Id; + #[method_id(gravity)] + pub unsafe fn gravity() -> Id; } ); extern_class!( @@ -120,24 +105,18 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitAngle { - pub unsafe fn degrees() -> Id { - msg_send_id![Self::class(), degrees] - } - pub unsafe fn arcMinutes() -> Id { - msg_send_id![Self::class(), arcMinutes] - } - pub unsafe fn arcSeconds() -> Id { - msg_send_id![Self::class(), arcSeconds] - } - pub unsafe fn radians() -> Id { - msg_send_id![Self::class(), radians] - } - pub unsafe fn gradians() -> Id { - msg_send_id![Self::class(), gradians] - } - pub unsafe fn revolutions() -> Id { - msg_send_id![Self::class(), revolutions] - } + #[method_id(degrees)] + pub unsafe fn degrees() -> Id; + #[method_id(arcMinutes)] + pub unsafe fn arcMinutes() -> Id; + #[method_id(arcSeconds)] + pub unsafe fn arcSeconds() -> Id; + #[method_id(radians)] + pub unsafe fn radians() -> Id; + #[method_id(gradians)] + pub unsafe fn gradians() -> Id; + #[method_id(revolutions)] + pub unsafe fn revolutions() -> Id; } ); extern_class!( @@ -149,48 +128,34 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitArea { - pub unsafe fn squareMegameters() -> Id { - msg_send_id![Self::class(), squareMegameters] - } - pub unsafe fn squareKilometers() -> Id { - msg_send_id![Self::class(), squareKilometers] - } - pub unsafe fn squareMeters() -> Id { - msg_send_id![Self::class(), squareMeters] - } - pub unsafe fn squareCentimeters() -> Id { - msg_send_id![Self::class(), squareCentimeters] - } - pub unsafe fn squareMillimeters() -> Id { - msg_send_id![Self::class(), squareMillimeters] - } - pub unsafe fn squareMicrometers() -> Id { - msg_send_id![Self::class(), squareMicrometers] - } - pub unsafe fn squareNanometers() -> Id { - msg_send_id![Self::class(), squareNanometers] - } - pub unsafe fn squareInches() -> Id { - msg_send_id![Self::class(), squareInches] - } - pub unsafe fn squareFeet() -> Id { - msg_send_id![Self::class(), squareFeet] - } - pub unsafe fn squareYards() -> Id { - msg_send_id![Self::class(), squareYards] - } - pub unsafe fn squareMiles() -> Id { - msg_send_id![Self::class(), squareMiles] - } - pub unsafe fn acres() -> Id { - msg_send_id![Self::class(), acres] - } - pub unsafe fn ares() -> Id { - msg_send_id![Self::class(), ares] - } - pub unsafe fn hectares() -> Id { - msg_send_id![Self::class(), hectares] - } + #[method_id(squareMegameters)] + pub unsafe fn squareMegameters() -> Id; + #[method_id(squareKilometers)] + pub unsafe fn squareKilometers() -> Id; + #[method_id(squareMeters)] + pub unsafe fn squareMeters() -> Id; + #[method_id(squareCentimeters)] + pub unsafe fn squareCentimeters() -> Id; + #[method_id(squareMillimeters)] + pub unsafe fn squareMillimeters() -> Id; + #[method_id(squareMicrometers)] + pub unsafe fn squareMicrometers() -> Id; + #[method_id(squareNanometers)] + pub unsafe fn squareNanometers() -> Id; + #[method_id(squareInches)] + pub unsafe fn squareInches() -> Id; + #[method_id(squareFeet)] + pub unsafe fn squareFeet() -> Id; + #[method_id(squareYards)] + pub unsafe fn squareYards() -> Id; + #[method_id(squareMiles)] + pub unsafe fn squareMiles() -> Id; + #[method_id(acres)] + pub unsafe fn acres() -> Id; + #[method_id(ares)] + pub unsafe fn ares() -> Id; + #[method_id(hectares)] + pub unsafe fn hectares() -> Id; } ); extern_class!( @@ -202,20 +167,14 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitConcentrationMass { - pub unsafe fn gramsPerLiter() -> Id { - msg_send_id![Self::class(), gramsPerLiter] - } - pub unsafe fn milligramsPerDeciliter() -> Id { - msg_send_id![Self::class(), milligramsPerDeciliter] - } + #[method_id(gramsPerLiter)] + pub unsafe fn gramsPerLiter() -> Id; + #[method_id(milligramsPerDeciliter)] + pub unsafe fn milligramsPerDeciliter() -> Id; + # [method_id (millimolesPerLiterWithGramsPerMole :)] pub unsafe fn millimolesPerLiterWithGramsPerMole( gramsPerMole: c_double, - ) -> Id { - msg_send_id![ - Self::class(), - millimolesPerLiterWithGramsPerMole: gramsPerMole - ] - } + ) -> Id; } ); extern_class!( @@ -227,9 +186,8 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitDispersion { - pub unsafe fn partsPerMillion() -> Id { - msg_send_id![Self::class(), partsPerMillion] - } + #[method_id(partsPerMillion)] + pub unsafe fn partsPerMillion() -> Id; } ); extern_class!( @@ -241,27 +199,20 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitDuration { - pub unsafe fn hours() -> Id { - msg_send_id![Self::class(), hours] - } - pub unsafe fn minutes() -> Id { - msg_send_id![Self::class(), minutes] - } - pub unsafe fn seconds() -> Id { - msg_send_id![Self::class(), seconds] - } - pub unsafe fn milliseconds() -> Id { - msg_send_id![Self::class(), milliseconds] - } - pub unsafe fn microseconds() -> Id { - msg_send_id![Self::class(), microseconds] - } - pub unsafe fn nanoseconds() -> Id { - msg_send_id![Self::class(), nanoseconds] - } - pub unsafe fn picoseconds() -> Id { - msg_send_id![Self::class(), picoseconds] - } + #[method_id(hours)] + pub unsafe fn hours() -> Id; + #[method_id(minutes)] + pub unsafe fn minutes() -> Id; + #[method_id(seconds)] + pub unsafe fn seconds() -> Id; + #[method_id(milliseconds)] + pub unsafe fn milliseconds() -> Id; + #[method_id(microseconds)] + pub unsafe fn microseconds() -> Id; + #[method_id(nanoseconds)] + pub unsafe fn nanoseconds() -> Id; + #[method_id(picoseconds)] + pub unsafe fn picoseconds() -> Id; } ); extern_class!( @@ -273,24 +224,18 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitElectricCharge { - pub unsafe fn coulombs() -> Id { - msg_send_id![Self::class(), coulombs] - } - pub unsafe fn megaampereHours() -> Id { - msg_send_id![Self::class(), megaampereHours] - } - pub unsafe fn kiloampereHours() -> Id { - msg_send_id![Self::class(), kiloampereHours] - } - pub unsafe fn ampereHours() -> Id { - msg_send_id![Self::class(), ampereHours] - } - pub unsafe fn milliampereHours() -> Id { - msg_send_id![Self::class(), milliampereHours] - } - pub unsafe fn microampereHours() -> Id { - msg_send_id![Self::class(), microampereHours] - } + #[method_id(coulombs)] + pub unsafe fn coulombs() -> Id; + #[method_id(megaampereHours)] + pub unsafe fn megaampereHours() -> Id; + #[method_id(kiloampereHours)] + pub unsafe fn kiloampereHours() -> Id; + #[method_id(ampereHours)] + pub unsafe fn ampereHours() -> Id; + #[method_id(milliampereHours)] + pub unsafe fn milliampereHours() -> Id; + #[method_id(microampereHours)] + pub unsafe fn microampereHours() -> Id; } ); extern_class!( @@ -302,21 +247,16 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitElectricCurrent { - pub unsafe fn megaamperes() -> Id { - msg_send_id![Self::class(), megaamperes] - } - pub unsafe fn kiloamperes() -> Id { - msg_send_id![Self::class(), kiloamperes] - } - pub unsafe fn amperes() -> Id { - msg_send_id![Self::class(), amperes] - } - pub unsafe fn milliamperes() -> Id { - msg_send_id![Self::class(), milliamperes] - } - pub unsafe fn microamperes() -> Id { - msg_send_id![Self::class(), microamperes] - } + #[method_id(megaamperes)] + pub unsafe fn megaamperes() -> Id; + #[method_id(kiloamperes)] + pub unsafe fn kiloamperes() -> Id; + #[method_id(amperes)] + pub unsafe fn amperes() -> Id; + #[method_id(milliamperes)] + pub unsafe fn milliamperes() -> Id; + #[method_id(microamperes)] + pub unsafe fn microamperes() -> Id; } ); extern_class!( @@ -328,21 +268,16 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitElectricPotentialDifference { - pub unsafe fn megavolts() -> Id { - msg_send_id![Self::class(), megavolts] - } - pub unsafe fn kilovolts() -> Id { - msg_send_id![Self::class(), kilovolts] - } - pub unsafe fn volts() -> Id { - msg_send_id![Self::class(), volts] - } - pub unsafe fn millivolts() -> Id { - msg_send_id![Self::class(), millivolts] - } - pub unsafe fn microvolts() -> Id { - msg_send_id![Self::class(), microvolts] - } + #[method_id(megavolts)] + pub unsafe fn megavolts() -> Id; + #[method_id(kilovolts)] + pub unsafe fn kilovolts() -> Id; + #[method_id(volts)] + pub unsafe fn volts() -> Id; + #[method_id(millivolts)] + pub unsafe fn millivolts() -> Id; + #[method_id(microvolts)] + pub unsafe fn microvolts() -> Id; } ); extern_class!( @@ -354,21 +289,16 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitElectricResistance { - pub unsafe fn megaohms() -> Id { - msg_send_id![Self::class(), megaohms] - } - pub unsafe fn kiloohms() -> Id { - msg_send_id![Self::class(), kiloohms] - } - pub unsafe fn ohms() -> Id { - msg_send_id![Self::class(), ohms] - } - pub unsafe fn milliohms() -> Id { - msg_send_id![Self::class(), milliohms] - } - pub unsafe fn microohms() -> Id { - msg_send_id![Self::class(), microohms] - } + #[method_id(megaohms)] + pub unsafe fn megaohms() -> Id; + #[method_id(kiloohms)] + pub unsafe fn kiloohms() -> Id; + #[method_id(ohms)] + pub unsafe fn ohms() -> Id; + #[method_id(milliohms)] + pub unsafe fn milliohms() -> Id; + #[method_id(microohms)] + pub unsafe fn microohms() -> Id; } ); extern_class!( @@ -380,21 +310,16 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitEnergy { - pub unsafe fn kilojoules() -> Id { - msg_send_id![Self::class(), kilojoules] - } - pub unsafe fn joules() -> Id { - msg_send_id![Self::class(), joules] - } - pub unsafe fn kilocalories() -> Id { - msg_send_id![Self::class(), kilocalories] - } - pub unsafe fn calories() -> Id { - msg_send_id![Self::class(), calories] - } - pub unsafe fn kilowattHours() -> Id { - msg_send_id![Self::class(), kilowattHours] - } + #[method_id(kilojoules)] + pub unsafe fn kilojoules() -> Id; + #[method_id(joules)] + pub unsafe fn joules() -> Id; + #[method_id(kilocalories)] + pub unsafe fn kilocalories() -> Id; + #[method_id(calories)] + pub unsafe fn calories() -> Id; + #[method_id(kilowattHours)] + pub unsafe fn kilowattHours() -> Id; } ); extern_class!( @@ -406,33 +331,24 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitFrequency { - pub unsafe fn terahertz() -> Id { - msg_send_id![Self::class(), terahertz] - } - pub unsafe fn gigahertz() -> Id { - msg_send_id![Self::class(), gigahertz] - } - pub unsafe fn megahertz() -> Id { - msg_send_id![Self::class(), megahertz] - } - pub unsafe fn kilohertz() -> Id { - msg_send_id![Self::class(), kilohertz] - } - pub unsafe fn hertz() -> Id { - msg_send_id![Self::class(), hertz] - } - pub unsafe fn millihertz() -> Id { - msg_send_id![Self::class(), millihertz] - } - pub unsafe fn microhertz() -> Id { - msg_send_id![Self::class(), microhertz] - } - pub unsafe fn nanohertz() -> Id { - msg_send_id![Self::class(), nanohertz] - } - pub unsafe fn framesPerSecond() -> Id { - msg_send_id![Self::class(), framesPerSecond] - } + #[method_id(terahertz)] + pub unsafe fn terahertz() -> Id; + #[method_id(gigahertz)] + pub unsafe fn gigahertz() -> Id; + #[method_id(megahertz)] + pub unsafe fn megahertz() -> Id; + #[method_id(kilohertz)] + pub unsafe fn kilohertz() -> Id; + #[method_id(hertz)] + pub unsafe fn hertz() -> Id; + #[method_id(millihertz)] + pub unsafe fn millihertz() -> Id; + #[method_id(microhertz)] + pub unsafe fn microhertz() -> Id; + #[method_id(nanohertz)] + pub unsafe fn nanohertz() -> Id; + #[method_id(framesPerSecond)] + pub unsafe fn framesPerSecond() -> Id; } ); extern_class!( @@ -444,15 +360,12 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitFuelEfficiency { - pub unsafe fn litersPer100Kilometers() -> Id { - msg_send_id![Self::class(), litersPer100Kilometers] - } - pub unsafe fn milesPerImperialGallon() -> Id { - msg_send_id![Self::class(), milesPerImperialGallon] - } - pub unsafe fn milesPerGallon() -> Id { - msg_send_id![Self::class(), milesPerGallon] - } + #[method_id(litersPer100Kilometers)] + pub unsafe fn litersPer100Kilometers() -> Id; + #[method_id(milesPerImperialGallon)] + pub unsafe fn milesPerImperialGallon() -> Id; + #[method_id(milesPerGallon)] + pub unsafe fn milesPerGallon() -> Id; } ); extern_class!( @@ -464,111 +377,76 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitInformationStorage { - pub unsafe fn bytes() -> Id { - msg_send_id![Self::class(), bytes] - } - pub unsafe fn bits() -> Id { - msg_send_id![Self::class(), bits] - } - pub unsafe fn nibbles() -> Id { - msg_send_id![Self::class(), nibbles] - } - pub unsafe fn yottabytes() -> Id { - msg_send_id![Self::class(), yottabytes] - } - pub unsafe fn zettabytes() -> Id { - msg_send_id![Self::class(), zettabytes] - } - pub unsafe fn exabytes() -> Id { - msg_send_id![Self::class(), exabytes] - } - pub unsafe fn petabytes() -> Id { - msg_send_id![Self::class(), petabytes] - } - pub unsafe fn terabytes() -> Id { - msg_send_id![Self::class(), terabytes] - } - pub unsafe fn gigabytes() -> Id { - msg_send_id![Self::class(), gigabytes] - } - pub unsafe fn megabytes() -> Id { - msg_send_id![Self::class(), megabytes] - } - pub unsafe fn kilobytes() -> Id { - msg_send_id![Self::class(), kilobytes] - } - pub unsafe fn yottabits() -> Id { - msg_send_id![Self::class(), yottabits] - } - pub unsafe fn zettabits() -> Id { - msg_send_id![Self::class(), zettabits] - } - pub unsafe fn exabits() -> Id { - msg_send_id![Self::class(), exabits] - } - pub unsafe fn petabits() -> Id { - msg_send_id![Self::class(), petabits] - } - pub unsafe fn terabits() -> Id { - msg_send_id![Self::class(), terabits] - } - pub unsafe fn gigabits() -> Id { - msg_send_id![Self::class(), gigabits] - } - pub unsafe fn megabits() -> Id { - msg_send_id![Self::class(), megabits] - } - pub unsafe fn kilobits() -> Id { - msg_send_id![Self::class(), kilobits] - } - pub unsafe fn yobibytes() -> Id { - msg_send_id![Self::class(), yobibytes] - } - pub unsafe fn zebibytes() -> Id { - msg_send_id![Self::class(), zebibytes] - } - pub unsafe fn exbibytes() -> Id { - msg_send_id![Self::class(), exbibytes] - } - pub unsafe fn pebibytes() -> Id { - msg_send_id![Self::class(), pebibytes] - } - pub unsafe fn tebibytes() -> Id { - msg_send_id![Self::class(), tebibytes] - } - pub unsafe fn gibibytes() -> Id { - msg_send_id![Self::class(), gibibytes] - } - pub unsafe fn mebibytes() -> Id { - msg_send_id![Self::class(), mebibytes] - } - pub unsafe fn kibibytes() -> Id { - msg_send_id![Self::class(), kibibytes] - } - pub unsafe fn yobibits() -> Id { - msg_send_id![Self::class(), yobibits] - } - pub unsafe fn zebibits() -> Id { - msg_send_id![Self::class(), zebibits] - } - pub unsafe fn exbibits() -> Id { - msg_send_id![Self::class(), exbibits] - } - pub unsafe fn pebibits() -> Id { - msg_send_id![Self::class(), pebibits] - } - pub unsafe fn tebibits() -> Id { - msg_send_id![Self::class(), tebibits] - } - pub unsafe fn gibibits() -> Id { - msg_send_id![Self::class(), gibibits] - } - pub unsafe fn mebibits() -> Id { - msg_send_id![Self::class(), mebibits] - } - pub unsafe fn kibibits() -> Id { - msg_send_id![Self::class(), kibibits] - } + #[method_id(bytes)] + pub unsafe fn bytes() -> Id; + #[method_id(bits)] + pub unsafe fn bits() -> Id; + #[method_id(nibbles)] + pub unsafe fn nibbles() -> Id; + #[method_id(yottabytes)] + pub unsafe fn yottabytes() -> Id; + #[method_id(zettabytes)] + pub unsafe fn zettabytes() -> Id; + #[method_id(exabytes)] + pub unsafe fn exabytes() -> Id; + #[method_id(petabytes)] + pub unsafe fn petabytes() -> Id; + #[method_id(terabytes)] + pub unsafe fn terabytes() -> Id; + #[method_id(gigabytes)] + pub unsafe fn gigabytes() -> Id; + #[method_id(megabytes)] + pub unsafe fn megabytes() -> Id; + #[method_id(kilobytes)] + pub unsafe fn kilobytes() -> Id; + #[method_id(yottabits)] + pub unsafe fn yottabits() -> Id; + #[method_id(zettabits)] + pub unsafe fn zettabits() -> Id; + #[method_id(exabits)] + pub unsafe fn exabits() -> Id; + #[method_id(petabits)] + pub unsafe fn petabits() -> Id; + #[method_id(terabits)] + pub unsafe fn terabits() -> Id; + #[method_id(gigabits)] + pub unsafe fn gigabits() -> Id; + #[method_id(megabits)] + pub unsafe fn megabits() -> Id; + #[method_id(kilobits)] + pub unsafe fn kilobits() -> Id; + #[method_id(yobibytes)] + pub unsafe fn yobibytes() -> Id; + #[method_id(zebibytes)] + pub unsafe fn zebibytes() -> Id; + #[method_id(exbibytes)] + pub unsafe fn exbibytes() -> Id; + #[method_id(pebibytes)] + pub unsafe fn pebibytes() -> Id; + #[method_id(tebibytes)] + pub unsafe fn tebibytes() -> Id; + #[method_id(gibibytes)] + pub unsafe fn gibibytes() -> Id; + #[method_id(mebibytes)] + pub unsafe fn mebibytes() -> Id; + #[method_id(kibibytes)] + pub unsafe fn kibibytes() -> Id; + #[method_id(yobibits)] + pub unsafe fn yobibits() -> Id; + #[method_id(zebibits)] + pub unsafe fn zebibits() -> Id; + #[method_id(exbibits)] + pub unsafe fn exbibits() -> Id; + #[method_id(pebibits)] + pub unsafe fn pebibits() -> Id; + #[method_id(tebibits)] + pub unsafe fn tebibits() -> Id; + #[method_id(gibibits)] + pub unsafe fn gibibits() -> Id; + #[method_id(mebibits)] + pub unsafe fn mebibits() -> Id; + #[method_id(kibibits)] + pub unsafe fn kibibits() -> Id; } ); extern_class!( @@ -580,72 +458,50 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitLength { - pub unsafe fn megameters() -> Id { - msg_send_id![Self::class(), megameters] - } - pub unsafe fn kilometers() -> Id { - msg_send_id![Self::class(), kilometers] - } - pub unsafe fn hectometers() -> Id { - msg_send_id![Self::class(), hectometers] - } - pub unsafe fn decameters() -> Id { - msg_send_id![Self::class(), decameters] - } - pub unsafe fn meters() -> Id { - msg_send_id![Self::class(), meters] - } - pub unsafe fn decimeters() -> Id { - msg_send_id![Self::class(), decimeters] - } - pub unsafe fn centimeters() -> Id { - msg_send_id![Self::class(), centimeters] - } - pub unsafe fn millimeters() -> Id { - msg_send_id![Self::class(), millimeters] - } - pub unsafe fn micrometers() -> Id { - msg_send_id![Self::class(), micrometers] - } - pub unsafe fn nanometers() -> Id { - msg_send_id![Self::class(), nanometers] - } - pub unsafe fn picometers() -> Id { - msg_send_id![Self::class(), picometers] - } - pub unsafe fn inches() -> Id { - msg_send_id![Self::class(), inches] - } - pub unsafe fn feet() -> Id { - msg_send_id![Self::class(), feet] - } - pub unsafe fn yards() -> Id { - msg_send_id![Self::class(), yards] - } - pub unsafe fn miles() -> Id { - msg_send_id![Self::class(), miles] - } - pub unsafe fn scandinavianMiles() -> Id { - msg_send_id![Self::class(), scandinavianMiles] - } - pub unsafe fn lightyears() -> Id { - msg_send_id![Self::class(), lightyears] - } - pub unsafe fn nauticalMiles() -> Id { - msg_send_id![Self::class(), nauticalMiles] - } - pub unsafe fn fathoms() -> Id { - msg_send_id![Self::class(), fathoms] - } - pub unsafe fn furlongs() -> Id { - msg_send_id![Self::class(), furlongs] - } - pub unsafe fn astronomicalUnits() -> Id { - msg_send_id![Self::class(), astronomicalUnits] - } - pub unsafe fn parsecs() -> Id { - msg_send_id![Self::class(), parsecs] - } + #[method_id(megameters)] + pub unsafe fn megameters() -> Id; + #[method_id(kilometers)] + pub unsafe fn kilometers() -> Id; + #[method_id(hectometers)] + pub unsafe fn hectometers() -> Id; + #[method_id(decameters)] + pub unsafe fn decameters() -> Id; + #[method_id(meters)] + pub unsafe fn meters() -> Id; + #[method_id(decimeters)] + pub unsafe fn decimeters() -> Id; + #[method_id(centimeters)] + pub unsafe fn centimeters() -> Id; + #[method_id(millimeters)] + pub unsafe fn millimeters() -> Id; + #[method_id(micrometers)] + pub unsafe fn micrometers() -> Id; + #[method_id(nanometers)] + pub unsafe fn nanometers() -> Id; + #[method_id(picometers)] + pub unsafe fn picometers() -> Id; + #[method_id(inches)] + pub unsafe fn inches() -> Id; + #[method_id(feet)] + pub unsafe fn feet() -> Id; + #[method_id(yards)] + pub unsafe fn yards() -> Id; + #[method_id(miles)] + pub unsafe fn miles() -> Id; + #[method_id(scandinavianMiles)] + pub unsafe fn scandinavianMiles() -> Id; + #[method_id(lightyears)] + pub unsafe fn lightyears() -> Id; + #[method_id(nauticalMiles)] + pub unsafe fn nauticalMiles() -> Id; + #[method_id(fathoms)] + pub unsafe fn fathoms() -> Id; + #[method_id(furlongs)] + pub unsafe fn furlongs() -> Id; + #[method_id(astronomicalUnits)] + pub unsafe fn astronomicalUnits() -> Id; + #[method_id(parsecs)] + pub unsafe fn parsecs() -> Id; } ); extern_class!( @@ -657,9 +513,8 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitIlluminance { - pub unsafe fn lux() -> Id { - msg_send_id![Self::class(), lux] - } + #[method_id(lux)] + pub unsafe fn lux() -> Id; } ); extern_class!( @@ -671,54 +526,38 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitMass { - pub unsafe fn kilograms() -> Id { - msg_send_id![Self::class(), kilograms] - } - pub unsafe fn grams() -> Id { - msg_send_id![Self::class(), grams] - } - pub unsafe fn decigrams() -> Id { - msg_send_id![Self::class(), decigrams] - } - pub unsafe fn centigrams() -> Id { - msg_send_id![Self::class(), centigrams] - } - pub unsafe fn milligrams() -> Id { - msg_send_id![Self::class(), milligrams] - } - pub unsafe fn micrograms() -> Id { - msg_send_id![Self::class(), micrograms] - } - pub unsafe fn nanograms() -> Id { - msg_send_id![Self::class(), nanograms] - } - pub unsafe fn picograms() -> Id { - msg_send_id![Self::class(), picograms] - } - pub unsafe fn ounces() -> Id { - msg_send_id![Self::class(), ounces] - } - pub unsafe fn poundsMass() -> Id { - msg_send_id![Self::class(), poundsMass] - } - pub unsafe fn stones() -> Id { - msg_send_id![Self::class(), stones] - } - pub unsafe fn metricTons() -> Id { - msg_send_id![Self::class(), metricTons] - } - pub unsafe fn shortTons() -> Id { - msg_send_id![Self::class(), shortTons] - } - pub unsafe fn carats() -> Id { - msg_send_id![Self::class(), carats] - } - pub unsafe fn ouncesTroy() -> Id { - msg_send_id![Self::class(), ouncesTroy] - } - pub unsafe fn slugs() -> Id { - msg_send_id![Self::class(), slugs] - } + #[method_id(kilograms)] + pub unsafe fn kilograms() -> Id; + #[method_id(grams)] + pub unsafe fn grams() -> Id; + #[method_id(decigrams)] + pub unsafe fn decigrams() -> Id; + #[method_id(centigrams)] + pub unsafe fn centigrams() -> Id; + #[method_id(milligrams)] + pub unsafe fn milligrams() -> Id; + #[method_id(micrograms)] + pub unsafe fn micrograms() -> Id; + #[method_id(nanograms)] + pub unsafe fn nanograms() -> Id; + #[method_id(picograms)] + pub unsafe fn picograms() -> Id; + #[method_id(ounces)] + pub unsafe fn ounces() -> Id; + #[method_id(poundsMass)] + pub unsafe fn poundsMass() -> Id; + #[method_id(stones)] + pub unsafe fn stones() -> Id; + #[method_id(metricTons)] + pub unsafe fn metricTons() -> Id; + #[method_id(shortTons)] + pub unsafe fn shortTons() -> Id; + #[method_id(carats)] + pub unsafe fn carats() -> Id; + #[method_id(ouncesTroy)] + pub unsafe fn ouncesTroy() -> Id; + #[method_id(slugs)] + pub unsafe fn slugs() -> Id; } ); extern_class!( @@ -730,39 +569,28 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitPower { - pub unsafe fn terawatts() -> Id { - msg_send_id![Self::class(), terawatts] - } - pub unsafe fn gigawatts() -> Id { - msg_send_id![Self::class(), gigawatts] - } - pub unsafe fn megawatts() -> Id { - msg_send_id![Self::class(), megawatts] - } - pub unsafe fn kilowatts() -> Id { - msg_send_id![Self::class(), kilowatts] - } - pub unsafe fn watts() -> Id { - msg_send_id![Self::class(), watts] - } - pub unsafe fn milliwatts() -> Id { - msg_send_id![Self::class(), milliwatts] - } - pub unsafe fn microwatts() -> Id { - msg_send_id![Self::class(), microwatts] - } - pub unsafe fn nanowatts() -> Id { - msg_send_id![Self::class(), nanowatts] - } - pub unsafe fn picowatts() -> Id { - msg_send_id![Self::class(), picowatts] - } - pub unsafe fn femtowatts() -> Id { - msg_send_id![Self::class(), femtowatts] - } - pub unsafe fn horsepower() -> Id { - msg_send_id![Self::class(), horsepower] - } + #[method_id(terawatts)] + pub unsafe fn terawatts() -> Id; + #[method_id(gigawatts)] + pub unsafe fn gigawatts() -> Id; + #[method_id(megawatts)] + pub unsafe fn megawatts() -> Id; + #[method_id(kilowatts)] + pub unsafe fn kilowatts() -> Id; + #[method_id(watts)] + pub unsafe fn watts() -> Id; + #[method_id(milliwatts)] + pub unsafe fn milliwatts() -> Id; + #[method_id(microwatts)] + pub unsafe fn microwatts() -> Id; + #[method_id(nanowatts)] + pub unsafe fn nanowatts() -> Id; + #[method_id(picowatts)] + pub unsafe fn picowatts() -> Id; + #[method_id(femtowatts)] + pub unsafe fn femtowatts() -> Id; + #[method_id(horsepower)] + pub unsafe fn horsepower() -> Id; } ); extern_class!( @@ -774,36 +602,26 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitPressure { - pub unsafe fn newtonsPerMetersSquared() -> Id { - msg_send_id![Self::class(), newtonsPerMetersSquared] - } - pub unsafe fn gigapascals() -> Id { - msg_send_id![Self::class(), gigapascals] - } - pub unsafe fn megapascals() -> Id { - msg_send_id![Self::class(), megapascals] - } - pub unsafe fn kilopascals() -> Id { - msg_send_id![Self::class(), kilopascals] - } - pub unsafe fn hectopascals() -> Id { - msg_send_id![Self::class(), hectopascals] - } - pub unsafe fn inchesOfMercury() -> Id { - msg_send_id![Self::class(), inchesOfMercury] - } - pub unsafe fn bars() -> Id { - msg_send_id![Self::class(), bars] - } - pub unsafe fn millibars() -> Id { - msg_send_id![Self::class(), millibars] - } - pub unsafe fn millimetersOfMercury() -> Id { - msg_send_id![Self::class(), millimetersOfMercury] - } - pub unsafe fn poundsForcePerSquareInch() -> Id { - msg_send_id![Self::class(), poundsForcePerSquareInch] - } + #[method_id(newtonsPerMetersSquared)] + pub unsafe fn newtonsPerMetersSquared() -> Id; + #[method_id(gigapascals)] + pub unsafe fn gigapascals() -> Id; + #[method_id(megapascals)] + pub unsafe fn megapascals() -> Id; + #[method_id(kilopascals)] + pub unsafe fn kilopascals() -> Id; + #[method_id(hectopascals)] + pub unsafe fn hectopascals() -> Id; + #[method_id(inchesOfMercury)] + pub unsafe fn inchesOfMercury() -> Id; + #[method_id(bars)] + pub unsafe fn bars() -> Id; + #[method_id(millibars)] + pub unsafe fn millibars() -> Id; + #[method_id(millimetersOfMercury)] + pub unsafe fn millimetersOfMercury() -> Id; + #[method_id(poundsForcePerSquareInch)] + pub unsafe fn poundsForcePerSquareInch() -> Id; } ); extern_class!( @@ -815,18 +633,14 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitSpeed { - pub unsafe fn metersPerSecond() -> Id { - msg_send_id![Self::class(), metersPerSecond] - } - pub unsafe fn kilometersPerHour() -> Id { - msg_send_id![Self::class(), kilometersPerHour] - } - pub unsafe fn milesPerHour() -> Id { - msg_send_id![Self::class(), milesPerHour] - } - pub unsafe fn knots() -> Id { - msg_send_id![Self::class(), knots] - } + #[method_id(metersPerSecond)] + pub unsafe fn metersPerSecond() -> Id; + #[method_id(kilometersPerHour)] + pub unsafe fn kilometersPerHour() -> Id; + #[method_id(milesPerHour)] + pub unsafe fn milesPerHour() -> Id; + #[method_id(knots)] + pub unsafe fn knots() -> Id; } ); extern_class!( @@ -838,15 +652,12 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitTemperature { - pub unsafe fn kelvin() -> Id { - msg_send_id![Self::class(), kelvin] - } - pub unsafe fn celsius() -> Id { - msg_send_id![Self::class(), celsius] - } - pub unsafe fn fahrenheit() -> Id { - msg_send_id![Self::class(), fahrenheit] - } + #[method_id(kelvin)] + pub unsafe fn kelvin() -> Id; + #[method_id(celsius)] + pub unsafe fn celsius() -> Id; + #[method_id(fahrenheit)] + pub unsafe fn fahrenheit() -> Id; } ); extern_class!( @@ -858,98 +669,67 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitVolume { - pub unsafe fn megaliters() -> Id { - msg_send_id![Self::class(), megaliters] - } - pub unsafe fn kiloliters() -> Id { - msg_send_id![Self::class(), kiloliters] - } - pub unsafe fn liters() -> Id { - msg_send_id![Self::class(), liters] - } - pub unsafe fn deciliters() -> Id { - msg_send_id![Self::class(), deciliters] - } - pub unsafe fn centiliters() -> Id { - msg_send_id![Self::class(), centiliters] - } - pub unsafe fn milliliters() -> Id { - msg_send_id![Self::class(), milliliters] - } - pub unsafe fn cubicKilometers() -> Id { - msg_send_id![Self::class(), cubicKilometers] - } - pub unsafe fn cubicMeters() -> Id { - msg_send_id![Self::class(), cubicMeters] - } - pub unsafe fn cubicDecimeters() -> Id { - msg_send_id![Self::class(), cubicDecimeters] - } - pub unsafe fn cubicCentimeters() -> Id { - msg_send_id![Self::class(), cubicCentimeters] - } - pub unsafe fn cubicMillimeters() -> Id { - msg_send_id![Self::class(), cubicMillimeters] - } - pub unsafe fn cubicInches() -> Id { - msg_send_id![Self::class(), cubicInches] - } - pub unsafe fn cubicFeet() -> Id { - msg_send_id![Self::class(), cubicFeet] - } - pub unsafe fn cubicYards() -> Id { - msg_send_id![Self::class(), cubicYards] - } - pub unsafe fn cubicMiles() -> Id { - msg_send_id![Self::class(), cubicMiles] - } - pub unsafe fn acreFeet() -> Id { - msg_send_id![Self::class(), acreFeet] - } - pub unsafe fn bushels() -> Id { - msg_send_id![Self::class(), bushels] - } - pub unsafe fn teaspoons() -> Id { - msg_send_id![Self::class(), teaspoons] - } - pub unsafe fn tablespoons() -> Id { - msg_send_id![Self::class(), tablespoons] - } - pub unsafe fn fluidOunces() -> Id { - msg_send_id![Self::class(), fluidOunces] - } - pub unsafe fn cups() -> Id { - msg_send_id![Self::class(), cups] - } - pub unsafe fn pints() -> Id { - msg_send_id![Self::class(), pints] - } - pub unsafe fn quarts() -> Id { - msg_send_id![Self::class(), quarts] - } - pub unsafe fn gallons() -> Id { - msg_send_id![Self::class(), gallons] - } - pub unsafe fn imperialTeaspoons() -> Id { - msg_send_id![Self::class(), imperialTeaspoons] - } - pub unsafe fn imperialTablespoons() -> Id { - msg_send_id![Self::class(), imperialTablespoons] - } - pub unsafe fn imperialFluidOunces() -> Id { - msg_send_id![Self::class(), imperialFluidOunces] - } - pub unsafe fn imperialPints() -> Id { - msg_send_id![Self::class(), imperialPints] - } - pub unsafe fn imperialQuarts() -> Id { - msg_send_id![Self::class(), imperialQuarts] - } - pub unsafe fn imperialGallons() -> Id { - msg_send_id![Self::class(), imperialGallons] - } - pub unsafe fn metricCups() -> Id { - msg_send_id![Self::class(), metricCups] - } + #[method_id(megaliters)] + pub unsafe fn megaliters() -> Id; + #[method_id(kiloliters)] + pub unsafe fn kiloliters() -> Id; + #[method_id(liters)] + pub unsafe fn liters() -> Id; + #[method_id(deciliters)] + pub unsafe fn deciliters() -> Id; + #[method_id(centiliters)] + pub unsafe fn centiliters() -> Id; + #[method_id(milliliters)] + pub unsafe fn milliliters() -> Id; + #[method_id(cubicKilometers)] + pub unsafe fn cubicKilometers() -> Id; + #[method_id(cubicMeters)] + pub unsafe fn cubicMeters() -> Id; + #[method_id(cubicDecimeters)] + pub unsafe fn cubicDecimeters() -> Id; + #[method_id(cubicCentimeters)] + pub unsafe fn cubicCentimeters() -> Id; + #[method_id(cubicMillimeters)] + pub unsafe fn cubicMillimeters() -> Id; + #[method_id(cubicInches)] + pub unsafe fn cubicInches() -> Id; + #[method_id(cubicFeet)] + pub unsafe fn cubicFeet() -> Id; + #[method_id(cubicYards)] + pub unsafe fn cubicYards() -> Id; + #[method_id(cubicMiles)] + pub unsafe fn cubicMiles() -> Id; + #[method_id(acreFeet)] + pub unsafe fn acreFeet() -> Id; + #[method_id(bushels)] + pub unsafe fn bushels() -> Id; + #[method_id(teaspoons)] + pub unsafe fn teaspoons() -> Id; + #[method_id(tablespoons)] + pub unsafe fn tablespoons() -> Id; + #[method_id(fluidOunces)] + pub unsafe fn fluidOunces() -> Id; + #[method_id(cups)] + pub unsafe fn cups() -> Id; + #[method_id(pints)] + pub unsafe fn pints() -> Id; + #[method_id(quarts)] + pub unsafe fn quarts() -> Id; + #[method_id(gallons)] + pub unsafe fn gallons() -> Id; + #[method_id(imperialTeaspoons)] + pub unsafe fn imperialTeaspoons() -> Id; + #[method_id(imperialTablespoons)] + pub unsafe fn imperialTablespoons() -> Id; + #[method_id(imperialFluidOunces)] + pub unsafe fn imperialFluidOunces() -> Id; + #[method_id(imperialPints)] + pub unsafe fn imperialPints() -> Id; + #[method_id(imperialQuarts)] + pub unsafe fn imperialQuarts() -> Id; + #[method_id(imperialGallons)] + pub unsafe fn imperialGallons() -> Id; + #[method_id(metricCups)] + pub unsafe fn metricCups() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 6261b7268..1f37eb8c2 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -12,7 +12,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSUserActivityPersistentIdentifier = NSString; extern_class!( #[derive(Debug)] @@ -23,165 +23,104 @@ extern_class!( ); extern_methods!( unsafe impl NSUserActivity { - pub unsafe fn initWithActivityType(&self, activityType: &NSString) -> Id { - msg_send_id![self, initWithActivityType: activityType] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn activityType(&self) -> Id { - msg_send_id![self, activityType] - } - pub unsafe fn title(&self) -> Option> { - msg_send_id![self, title] - } - pub unsafe fn setTitle(&self, title: Option<&NSString>) { - msg_send![self, setTitle: title] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } - pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { - msg_send![self, setUserInfo: userInfo] - } - pub unsafe fn addUserInfoEntriesFromDictionary(&self, otherDictionary: &NSDictionary) { - msg_send![self, addUserInfoEntriesFromDictionary: otherDictionary] - } - pub unsafe fn requiredUserInfoKeys(&self) -> Option, Shared>> { - msg_send_id![self, requiredUserInfoKeys] - } + # [method_id (initWithActivityType :)] + pub unsafe fn initWithActivityType(&self, activityType: &NSString) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(activityType)] + pub unsafe fn activityType(&self) -> Id; + #[method_id(title)] + pub unsafe fn title(&self) -> Option>; + # [method (setTitle :)] + pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + # [method (setUserInfo :)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); + # [method (addUserInfoEntriesFromDictionary :)] + pub unsafe fn addUserInfoEntriesFromDictionary(&self, otherDictionary: &NSDictionary); + #[method_id(requiredUserInfoKeys)] + pub unsafe fn requiredUserInfoKeys(&self) -> Option, Shared>>; + # [method (setRequiredUserInfoKeys :)] pub unsafe fn setRequiredUserInfoKeys( &self, requiredUserInfoKeys: Option<&NSSet>, - ) { - msg_send![self, setRequiredUserInfoKeys: requiredUserInfoKeys] - } - pub unsafe fn needsSave(&self) -> bool { - msg_send![self, needsSave] - } - pub unsafe fn setNeedsSave(&self, needsSave: bool) { - msg_send![self, setNeedsSave: needsSave] - } - pub unsafe fn webpageURL(&self) -> Option> { - msg_send_id![self, webpageURL] - } - pub unsafe fn setWebpageURL(&self, webpageURL: Option<&NSURL>) { - msg_send![self, setWebpageURL: webpageURL] - } - pub unsafe fn referrerURL(&self) -> Option> { - msg_send_id![self, referrerURL] - } - pub unsafe fn setReferrerURL(&self, referrerURL: Option<&NSURL>) { - msg_send![self, setReferrerURL: referrerURL] - } - pub unsafe fn expirationDate(&self) -> Option> { - msg_send_id![self, expirationDate] - } - pub unsafe fn setExpirationDate(&self, expirationDate: Option<&NSDate>) { - msg_send![self, setExpirationDate: expirationDate] - } - pub unsafe fn keywords(&self) -> Id, Shared> { - msg_send_id![self, keywords] - } - pub unsafe fn setKeywords(&self, keywords: &NSSet) { - msg_send![self, setKeywords: keywords] - } - pub unsafe fn supportsContinuationStreams(&self) -> bool { - msg_send![self, supportsContinuationStreams] - } - pub unsafe fn setSupportsContinuationStreams(&self, supportsContinuationStreams: bool) { - msg_send![ - self, - setSupportsContinuationStreams: supportsContinuationStreams - ] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSUserActivityDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn targetContentIdentifier(&self) -> Option> { - msg_send_id![self, targetContentIdentifier] - } - pub unsafe fn setTargetContentIdentifier( - &self, - targetContentIdentifier: Option<&NSString>, - ) { - msg_send![self, setTargetContentIdentifier: targetContentIdentifier] - } - pub unsafe fn becomeCurrent(&self) { - msg_send![self, becomeCurrent] - } - pub unsafe fn resignCurrent(&self) { - msg_send![self, resignCurrent] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } + ); + #[method(needsSave)] + pub unsafe fn needsSave(&self) -> bool; + # [method (setNeedsSave :)] + pub unsafe fn setNeedsSave(&self, needsSave: bool); + #[method_id(webpageURL)] + pub unsafe fn webpageURL(&self) -> Option>; + # [method (setWebpageURL :)] + pub unsafe fn setWebpageURL(&self, webpageURL: Option<&NSURL>); + #[method_id(referrerURL)] + pub unsafe fn referrerURL(&self) -> Option>; + # [method (setReferrerURL :)] + pub unsafe fn setReferrerURL(&self, referrerURL: Option<&NSURL>); + #[method_id(expirationDate)] + pub unsafe fn expirationDate(&self) -> Option>; + # [method (setExpirationDate :)] + pub unsafe fn setExpirationDate(&self, expirationDate: Option<&NSDate>); + #[method_id(keywords)] + pub unsafe fn keywords(&self) -> Id, Shared>; + # [method (setKeywords :)] + pub unsafe fn setKeywords(&self, keywords: &NSSet); + #[method(supportsContinuationStreams)] + pub unsafe fn supportsContinuationStreams(&self) -> bool; + # [method (setSupportsContinuationStreams :)] + pub unsafe fn setSupportsContinuationStreams(&self, supportsContinuationStreams: bool); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSUserActivityDelegate>); + #[method_id(targetContentIdentifier)] + pub unsafe fn targetContentIdentifier(&self) -> Option>; + # [method (setTargetContentIdentifier :)] + pub unsafe fn setTargetContentIdentifier(&self, targetContentIdentifier: Option<&NSString>); + #[method(becomeCurrent)] + pub unsafe fn becomeCurrent(&self); + #[method(resignCurrent)] + pub unsafe fn resignCurrent(&self); + #[method(invalidate)] + pub unsafe fn invalidate(&self); + # [method (getContinuationStreamsWithCompletionHandler :)] pub unsafe fn getContinuationStreamsWithCompletionHandler( &self, completionHandler: TodoBlock, - ) { - msg_send![ - self, - getContinuationStreamsWithCompletionHandler: completionHandler - ] - } - pub unsafe fn isEligibleForHandoff(&self) -> bool { - msg_send![self, isEligibleForHandoff] - } - pub unsafe fn setEligibleForHandoff(&self, eligibleForHandoff: bool) { - msg_send![self, setEligibleForHandoff: eligibleForHandoff] - } - pub unsafe fn isEligibleForSearch(&self) -> bool { - msg_send![self, isEligibleForSearch] - } - pub unsafe fn setEligibleForSearch(&self, eligibleForSearch: bool) { - msg_send![self, setEligibleForSearch: eligibleForSearch] - } - pub unsafe fn isEligibleForPublicIndexing(&self) -> bool { - msg_send![self, isEligibleForPublicIndexing] - } - pub unsafe fn setEligibleForPublicIndexing(&self, eligibleForPublicIndexing: bool) { - msg_send![ - self, - setEligibleForPublicIndexing: eligibleForPublicIndexing - ] - } - pub unsafe fn isEligibleForPrediction(&self) -> bool { - msg_send![self, isEligibleForPrediction] - } - pub unsafe fn setEligibleForPrediction(&self, eligibleForPrediction: bool) { - msg_send![self, setEligibleForPrediction: eligibleForPrediction] - } + ); + #[method(isEligibleForHandoff)] + pub unsafe fn isEligibleForHandoff(&self) -> bool; + # [method (setEligibleForHandoff :)] + pub unsafe fn setEligibleForHandoff(&self, eligibleForHandoff: bool); + #[method(isEligibleForSearch)] + pub unsafe fn isEligibleForSearch(&self) -> bool; + # [method (setEligibleForSearch :)] + pub unsafe fn setEligibleForSearch(&self, eligibleForSearch: bool); + #[method(isEligibleForPublicIndexing)] + pub unsafe fn isEligibleForPublicIndexing(&self) -> bool; + # [method (setEligibleForPublicIndexing :)] + pub unsafe fn setEligibleForPublicIndexing(&self, eligibleForPublicIndexing: bool); + #[method(isEligibleForPrediction)] + pub unsafe fn isEligibleForPrediction(&self) -> bool; + # [method (setEligibleForPrediction :)] + pub unsafe fn setEligibleForPrediction(&self, eligibleForPrediction: bool); + #[method_id(persistentIdentifier)] pub unsafe fn persistentIdentifier( &self, - ) -> Option> { - msg_send_id![self, persistentIdentifier] - } + ) -> Option>; + # [method (setPersistentIdentifier :)] pub unsafe fn setPersistentIdentifier( &self, persistentIdentifier: Option<&NSUserActivityPersistentIdentifier>, - ) { - msg_send![self, setPersistentIdentifier: persistentIdentifier] - } + ); + # [method (deleteSavedUserActivitiesWithPersistentIdentifiers : completionHandler :)] pub unsafe fn deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler( persistentIdentifiers: &NSArray, handler: TodoBlock, - ) { - msg_send![ - Self::class(), - deleteSavedUserActivitiesWithPersistentIdentifiers: persistentIdentifiers, - completionHandler: handler - ] - } - pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: TodoBlock) { - msg_send![ - Self::class(), - deleteAllSavedUserActivitiesWithCompletionHandler: handler - ] - } + ); + # [method (deleteAllSavedUserActivitiesWithCompletionHandler :)] + pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: TodoBlock); } ); pub type NSUserActivityDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index edd08a5fa..c9617ed89 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -9,7 +9,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUserDefaults; @@ -19,151 +19,112 @@ extern_class!( ); extern_methods!( unsafe impl NSUserDefaults { - pub unsafe fn standardUserDefaults() -> Id { - msg_send_id![Self::class(), standardUserDefaults] - } - pub unsafe fn resetStandardUserDefaults() { - msg_send![Self::class(), resetStandardUserDefaults] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method_id(standardUserDefaults)] + pub unsafe fn standardUserDefaults() -> Id; + #[method(resetStandardUserDefaults)] + pub unsafe fn resetStandardUserDefaults(); + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithSuiteName :)] pub unsafe fn initWithSuiteName( &self, suitename: Option<&NSString>, - ) -> Option> { - msg_send_id![self, initWithSuiteName: suitename] - } - pub unsafe fn initWithUser(&self, username: &NSString) -> Option> { - msg_send_id![self, initWithUser: username] - } - pub unsafe fn objectForKey(&self, defaultName: &NSString) -> Option> { - msg_send_id![self, objectForKey: defaultName] - } - pub unsafe fn setObject_forKey(&self, value: Option<&Object>, defaultName: &NSString) { - msg_send![self, setObject: value, forKey: defaultName] - } - pub unsafe fn removeObjectForKey(&self, defaultName: &NSString) { - msg_send![self, removeObjectForKey: defaultName] - } - pub unsafe fn stringForKey(&self, defaultName: &NSString) -> Option> { - msg_send_id![self, stringForKey: defaultName] - } - pub unsafe fn arrayForKey(&self, defaultName: &NSString) -> Option> { - msg_send_id![self, arrayForKey: defaultName] - } + ) -> Option>; + # [method_id (initWithUser :)] + pub unsafe fn initWithUser(&self, username: &NSString) -> Option>; + # [method_id (objectForKey :)] + pub unsafe fn objectForKey(&self, defaultName: &NSString) -> Option>; + # [method (setObject : forKey :)] + pub unsafe fn setObject_forKey(&self, value: Option<&Object>, defaultName: &NSString); + # [method (removeObjectForKey :)] + pub unsafe fn removeObjectForKey(&self, defaultName: &NSString); + # [method_id (stringForKey :)] + pub unsafe fn stringForKey(&self, defaultName: &NSString) -> Option>; + # [method_id (arrayForKey :)] + pub unsafe fn arrayForKey(&self, defaultName: &NSString) -> Option>; + # [method_id (dictionaryForKey :)] pub unsafe fn dictionaryForKey( &self, defaultName: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, dictionaryForKey: defaultName] - } - pub unsafe fn dataForKey(&self, defaultName: &NSString) -> Option> { - msg_send_id![self, dataForKey: defaultName] - } + ) -> Option, Shared>>; + # [method_id (dataForKey :)] + pub unsafe fn dataForKey(&self, defaultName: &NSString) -> Option>; + # [method_id (stringArrayForKey :)] pub unsafe fn stringArrayForKey( &self, defaultName: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, stringArrayForKey: defaultName] - } - pub unsafe fn integerForKey(&self, defaultName: &NSString) -> NSInteger { - msg_send![self, integerForKey: defaultName] - } - pub unsafe fn floatForKey(&self, defaultName: &NSString) -> c_float { - msg_send![self, floatForKey: defaultName] - } - pub unsafe fn doubleForKey(&self, defaultName: &NSString) -> c_double { - msg_send![self, doubleForKey: defaultName] - } - pub unsafe fn boolForKey(&self, defaultName: &NSString) -> bool { - msg_send![self, boolForKey: defaultName] - } - pub unsafe fn URLForKey(&self, defaultName: &NSString) -> Option> { - msg_send_id![self, URLForKey: defaultName] - } - pub unsafe fn setInteger_forKey(&self, value: NSInteger, defaultName: &NSString) { - msg_send![self, setInteger: value, forKey: defaultName] - } - pub unsafe fn setFloat_forKey(&self, value: c_float, defaultName: &NSString) { - msg_send![self, setFloat: value, forKey: defaultName] - } - pub unsafe fn setDouble_forKey(&self, value: c_double, defaultName: &NSString) { - msg_send![self, setDouble: value, forKey: defaultName] - } - pub unsafe fn setBool_forKey(&self, value: bool, defaultName: &NSString) { - msg_send![self, setBool: value, forKey: defaultName] - } - pub unsafe fn setURL_forKey(&self, url: Option<&NSURL>, defaultName: &NSString) { - msg_send![self, setURL: url, forKey: defaultName] - } + ) -> Option, Shared>>; + # [method (integerForKey :)] + pub unsafe fn integerForKey(&self, defaultName: &NSString) -> NSInteger; + # [method (floatForKey :)] + pub unsafe fn floatForKey(&self, defaultName: &NSString) -> c_float; + # [method (doubleForKey :)] + pub unsafe fn doubleForKey(&self, defaultName: &NSString) -> c_double; + # [method (boolForKey :)] + pub unsafe fn boolForKey(&self, defaultName: &NSString) -> bool; + # [method_id (URLForKey :)] + pub unsafe fn URLForKey(&self, defaultName: &NSString) -> Option>; + # [method (setInteger : forKey :)] + pub unsafe fn setInteger_forKey(&self, value: NSInteger, defaultName: &NSString); + # [method (setFloat : forKey :)] + pub unsafe fn setFloat_forKey(&self, value: c_float, defaultName: &NSString); + # [method (setDouble : forKey :)] + pub unsafe fn setDouble_forKey(&self, value: c_double, defaultName: &NSString); + # [method (setBool : forKey :)] + pub unsafe fn setBool_forKey(&self, value: bool, defaultName: &NSString); + # [method (setURL : forKey :)] + pub unsafe fn setURL_forKey(&self, url: Option<&NSURL>, defaultName: &NSString); + # [method (registerDefaults :)] pub unsafe fn registerDefaults( &self, registrationDictionary: &NSDictionary, - ) { - msg_send![self, registerDefaults: registrationDictionary] - } - pub unsafe fn addSuiteNamed(&self, suiteName: &NSString) { - msg_send![self, addSuiteNamed: suiteName] - } - pub unsafe fn removeSuiteNamed(&self, suiteName: &NSString) { - msg_send![self, removeSuiteNamed: suiteName] - } - pub unsafe fn dictionaryRepresentation( - &self, - ) -> Id, Shared> { - msg_send_id![self, dictionaryRepresentation] - } - pub unsafe fn volatileDomainNames(&self) -> Id, Shared> { - msg_send_id![self, volatileDomainNames] - } + ); + # [method (addSuiteNamed :)] + pub unsafe fn addSuiteNamed(&self, suiteName: &NSString); + # [method (removeSuiteNamed :)] + pub unsafe fn removeSuiteNamed(&self, suiteName: &NSString); + #[method_id(dictionaryRepresentation)] + pub unsafe fn dictionaryRepresentation(&self) + -> Id, Shared>; + #[method_id(volatileDomainNames)] + pub unsafe fn volatileDomainNames(&self) -> Id, Shared>; + # [method_id (volatileDomainForName :)] pub unsafe fn volatileDomainForName( &self, domainName: &NSString, - ) -> Id, Shared> { - msg_send_id![self, volatileDomainForName: domainName] - } + ) -> Id, Shared>; + # [method (setVolatileDomain : forName :)] pub unsafe fn setVolatileDomain_forName( &self, domain: &NSDictionary, domainName: &NSString, - ) { - msg_send![self, setVolatileDomain: domain, forName: domainName] - } - pub unsafe fn removeVolatileDomainForName(&self, domainName: &NSString) { - msg_send![self, removeVolatileDomainForName: domainName] - } - pub unsafe fn persistentDomainNames(&self) -> Id { - msg_send_id![self, persistentDomainNames] - } + ); + # [method (removeVolatileDomainForName :)] + pub unsafe fn removeVolatileDomainForName(&self, domainName: &NSString); + #[method_id(persistentDomainNames)] + pub unsafe fn persistentDomainNames(&self) -> Id; + # [method_id (persistentDomainForName :)] pub unsafe fn persistentDomainForName( &self, domainName: &NSString, - ) -> Option, Shared>> { - msg_send_id![self, persistentDomainForName: domainName] - } + ) -> Option, Shared>>; + # [method (setPersistentDomain : forName :)] pub unsafe fn setPersistentDomain_forName( &self, domain: &NSDictionary, domainName: &NSString, - ) { - msg_send![self, setPersistentDomain: domain, forName: domainName] - } - pub unsafe fn removePersistentDomainForName(&self, domainName: &NSString) { - msg_send![self, removePersistentDomainForName: domainName] - } - pub unsafe fn synchronize(&self) -> bool { - msg_send![self, synchronize] - } - pub unsafe fn objectIsForcedForKey(&self, key: &NSString) -> bool { - msg_send![self, objectIsForcedForKey: key] - } + ); + # [method (removePersistentDomainForName :)] + pub unsafe fn removePersistentDomainForName(&self, domainName: &NSString); + #[method(synchronize)] + pub unsafe fn synchronize(&self) -> bool; + # [method (objectIsForcedForKey :)] + pub unsafe fn objectIsForcedForKey(&self, key: &NSString) -> bool; + # [method (objectIsForcedForKey : inDomain :)] pub unsafe fn objectIsForcedForKey_inDomain( &self, key: &NSString, domain: &NSString, - ) -> bool { - msg_send![self, objectIsForcedForKey: key, inDomain: domain] - } + ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 5f729fcbb..d7df4d337 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUserNotification; @@ -20,133 +20,94 @@ extern_class!( ); extern_methods!( unsafe impl NSUserNotification { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn title(&self) -> Option> { - msg_send_id![self, title] - } - pub unsafe fn setTitle(&self, title: Option<&NSString>) { - msg_send![self, setTitle: title] - } - pub unsafe fn subtitle(&self) -> Option> { - msg_send_id![self, subtitle] - } - pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>) { - msg_send![self, setSubtitle: subtitle] - } - pub unsafe fn informativeText(&self) -> Option> { - msg_send_id![self, informativeText] - } - pub unsafe fn setInformativeText(&self, informativeText: Option<&NSString>) { - msg_send![self, setInformativeText: informativeText] - } - pub unsafe fn actionButtonTitle(&self) -> Id { - msg_send_id![self, actionButtonTitle] - } - pub unsafe fn setActionButtonTitle(&self, actionButtonTitle: &NSString) { - msg_send![self, setActionButtonTitle: actionButtonTitle] - } - pub unsafe fn userInfo(&self) -> Option, Shared>> { - msg_send_id![self, userInfo] - } - pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>) { - msg_send![self, setUserInfo: userInfo] - } - pub unsafe fn deliveryDate(&self) -> Option> { - msg_send_id![self, deliveryDate] - } - pub unsafe fn setDeliveryDate(&self, deliveryDate: Option<&NSDate>) { - msg_send![self, setDeliveryDate: deliveryDate] - } - pub unsafe fn deliveryTimeZone(&self) -> Option> { - msg_send_id![self, deliveryTimeZone] - } - pub unsafe fn setDeliveryTimeZone(&self, deliveryTimeZone: Option<&NSTimeZone>) { - msg_send![self, setDeliveryTimeZone: deliveryTimeZone] - } - pub unsafe fn deliveryRepeatInterval(&self) -> Option> { - msg_send_id![self, deliveryRepeatInterval] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(title)] + pub unsafe fn title(&self) -> Option>; + # [method (setTitle :)] + pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(subtitle)] + pub unsafe fn subtitle(&self) -> Option>; + # [method (setSubtitle :)] + pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>); + #[method_id(informativeText)] + pub unsafe fn informativeText(&self) -> Option>; + # [method (setInformativeText :)] + pub unsafe fn setInformativeText(&self, informativeText: Option<&NSString>); + #[method_id(actionButtonTitle)] + pub unsafe fn actionButtonTitle(&self) -> Id; + # [method (setActionButtonTitle :)] + pub unsafe fn setActionButtonTitle(&self, actionButtonTitle: &NSString); + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Option, Shared>>; + # [method (setUserInfo :)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); + #[method_id(deliveryDate)] + pub unsafe fn deliveryDate(&self) -> Option>; + # [method (setDeliveryDate :)] + pub unsafe fn setDeliveryDate(&self, deliveryDate: Option<&NSDate>); + #[method_id(deliveryTimeZone)] + pub unsafe fn deliveryTimeZone(&self) -> Option>; + # [method (setDeliveryTimeZone :)] + pub unsafe fn setDeliveryTimeZone(&self, deliveryTimeZone: Option<&NSTimeZone>); + #[method_id(deliveryRepeatInterval)] + pub unsafe fn deliveryRepeatInterval(&self) -> Option>; + # [method (setDeliveryRepeatInterval :)] pub unsafe fn setDeliveryRepeatInterval( &self, deliveryRepeatInterval: Option<&NSDateComponents>, - ) { - msg_send![self, setDeliveryRepeatInterval: deliveryRepeatInterval] - } - pub unsafe fn actualDeliveryDate(&self) -> Option> { - msg_send_id![self, actualDeliveryDate] - } - pub unsafe fn isPresented(&self) -> bool { - msg_send![self, isPresented] - } - pub unsafe fn isRemote(&self) -> bool { - msg_send![self, isRemote] - } - pub unsafe fn soundName(&self) -> Option> { - msg_send_id![self, soundName] - } - pub unsafe fn setSoundName(&self, soundName: Option<&NSString>) { - msg_send![self, setSoundName: soundName] - } - pub unsafe fn hasActionButton(&self) -> bool { - msg_send![self, hasActionButton] - } - pub unsafe fn setHasActionButton(&self, hasActionButton: bool) { - msg_send![self, setHasActionButton: hasActionButton] - } - pub unsafe fn activationType(&self) -> NSUserNotificationActivationType { - msg_send![self, activationType] - } - pub unsafe fn otherButtonTitle(&self) -> Id { - msg_send_id![self, otherButtonTitle] - } - pub unsafe fn setOtherButtonTitle(&self, otherButtonTitle: &NSString) { - msg_send![self, setOtherButtonTitle: otherButtonTitle] - } - pub unsafe fn identifier(&self) -> Option> { - msg_send_id![self, identifier] - } - pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>) { - msg_send![self, setIdentifier: identifier] - } - pub unsafe fn contentImage(&self) -> Option> { - msg_send_id![self, contentImage] - } - pub unsafe fn setContentImage(&self, contentImage: Option<&NSImage>) { - msg_send![self, setContentImage: contentImage] - } - pub unsafe fn hasReplyButton(&self) -> bool { - msg_send![self, hasReplyButton] - } - pub unsafe fn setHasReplyButton(&self, hasReplyButton: bool) { - msg_send![self, setHasReplyButton: hasReplyButton] - } - pub unsafe fn responsePlaceholder(&self) -> Option> { - msg_send_id![self, responsePlaceholder] - } - pub unsafe fn setResponsePlaceholder(&self, responsePlaceholder: Option<&NSString>) { - msg_send![self, setResponsePlaceholder: responsePlaceholder] - } - pub unsafe fn response(&self) -> Option> { - msg_send_id![self, response] - } + ); + #[method_id(actualDeliveryDate)] + pub unsafe fn actualDeliveryDate(&self) -> Option>; + #[method(isPresented)] + pub unsafe fn isPresented(&self) -> bool; + #[method(isRemote)] + pub unsafe fn isRemote(&self) -> bool; + #[method_id(soundName)] + pub unsafe fn soundName(&self) -> Option>; + # [method (setSoundName :)] + pub unsafe fn setSoundName(&self, soundName: Option<&NSString>); + #[method(hasActionButton)] + pub unsafe fn hasActionButton(&self) -> bool; + # [method (setHasActionButton :)] + pub unsafe fn setHasActionButton(&self, hasActionButton: bool); + #[method(activationType)] + pub unsafe fn activationType(&self) -> NSUserNotificationActivationType; + #[method_id(otherButtonTitle)] + pub unsafe fn otherButtonTitle(&self) -> Id; + # [method (setOtherButtonTitle :)] + pub unsafe fn setOtherButtonTitle(&self, otherButtonTitle: &NSString); + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Option>; + # [method (setIdentifier :)] + pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>); + #[method_id(contentImage)] + pub unsafe fn contentImage(&self) -> Option>; + # [method (setContentImage :)] + pub unsafe fn setContentImage(&self, contentImage: Option<&NSImage>); + #[method(hasReplyButton)] + pub unsafe fn hasReplyButton(&self) -> bool; + # [method (setHasReplyButton :)] + pub unsafe fn setHasReplyButton(&self, hasReplyButton: bool); + #[method_id(responsePlaceholder)] + pub unsafe fn responsePlaceholder(&self) -> Option>; + # [method (setResponsePlaceholder :)] + pub unsafe fn setResponsePlaceholder(&self, responsePlaceholder: Option<&NSString>); + #[method_id(response)] + pub unsafe fn response(&self) -> Option>; + #[method_id(additionalActions)] pub unsafe fn additionalActions( &self, - ) -> Option, Shared>> { - msg_send_id![self, additionalActions] - } + ) -> Option, Shared>>; + # [method (setAdditionalActions :)] pub unsafe fn setAdditionalActions( &self, additionalActions: Option<&NSArray>, - ) { - msg_send![self, setAdditionalActions: additionalActions] - } + ); + #[method_id(additionalActivationAction)] pub unsafe fn additionalActivationAction( &self, - ) -> Option> { - msg_send_id![self, additionalActivationAction] - } + ) -> Option>; } ); extern_class!( @@ -158,22 +119,15 @@ extern_class!( ); extern_methods!( unsafe impl NSUserNotificationAction { + # [method_id (actionWithIdentifier : title :)] pub unsafe fn actionWithIdentifier_title( identifier: Option<&NSString>, title: Option<&NSString>, - ) -> Id { - msg_send_id![ - Self::class(), - actionWithIdentifier: identifier, - title: title - ] - } - pub unsafe fn identifier(&self) -> Option> { - msg_send_id![self, identifier] - } - pub unsafe fn title(&self) -> Option> { - msg_send_id![self, title] - } + ) -> Id; + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Option>; + #[method_id(title)] + pub unsafe fn title(&self) -> Option>; } ); extern_class!( @@ -185,42 +139,31 @@ extern_class!( ); extern_methods!( unsafe impl NSUserNotificationCenter { - pub unsafe fn defaultUserNotificationCenter() -> Id { - msg_send_id![Self::class(), defaultUserNotificationCenter] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSUserNotificationCenterDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn scheduledNotifications(&self) -> Id, Shared> { - msg_send_id![self, scheduledNotifications] - } + #[method_id(defaultUserNotificationCenter)] + pub unsafe fn defaultUserNotificationCenter() -> Id; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSUserNotificationCenterDelegate>); + #[method_id(scheduledNotifications)] + pub unsafe fn scheduledNotifications(&self) -> Id, Shared>; + # [method (setScheduledNotifications :)] pub unsafe fn setScheduledNotifications( &self, scheduledNotifications: &NSArray, - ) { - msg_send![self, setScheduledNotifications: scheduledNotifications] - } - pub unsafe fn scheduleNotification(&self, notification: &NSUserNotification) { - msg_send![self, scheduleNotification: notification] - } - pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification) { - msg_send![self, removeScheduledNotification: notification] - } - pub unsafe fn deliveredNotifications(&self) -> Id, Shared> { - msg_send_id![self, deliveredNotifications] - } - pub unsafe fn deliverNotification(&self, notification: &NSUserNotification) { - msg_send![self, deliverNotification: notification] - } - pub unsafe fn removeDeliveredNotification(&self, notification: &NSUserNotification) { - msg_send![self, removeDeliveredNotification: notification] - } - pub unsafe fn removeAllDeliveredNotifications(&self) { - msg_send![self, removeAllDeliveredNotifications] - } + ); + # [method (scheduleNotification :)] + pub unsafe fn scheduleNotification(&self, notification: &NSUserNotification); + # [method (removeScheduledNotification :)] + pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification); + #[method_id(deliveredNotifications)] + pub unsafe fn deliveredNotifications(&self) -> Id, Shared>; + # [method (deliverNotification :)] + pub unsafe fn deliverNotification(&self, notification: &NSUserNotification); + # [method (removeDeliveredNotification :)] + pub unsafe fn removeDeliveredNotification(&self, notification: &NSUserNotification); + #[method(removeAllDeliveredNotifications)] + pub unsafe fn removeAllDeliveredNotifications(&self); } ); pub type NSUserNotificationCenterDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index 1e6d56d35..ff249e46b 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSUserScriptTask; @@ -20,21 +20,18 @@ extern_class!( ); extern_methods!( unsafe impl NSUserScriptTask { + # [method_id (initWithURL : error :)] pub unsafe fn initWithURL_error( &self, url: &NSURL, - ) -> Result, Id> { - msg_send_id![self, initWithURL: url, error: _] - } - pub unsafe fn scriptURL(&self) -> Id { - msg_send_id![self, scriptURL] - } + ) -> Result, Id>; + #[method_id(scriptURL)] + pub unsafe fn scriptURL(&self) -> Id; + # [method (executeWithCompletionHandler :)] pub unsafe fn executeWithCompletionHandler( &self, handler: NSUserScriptTaskCompletionHandler, - ) { - msg_send![self, executeWithCompletionHandler: handler] - } + ); } ); extern_class!( @@ -46,35 +43,24 @@ extern_class!( ); extern_methods!( unsafe impl NSUserUnixTask { - pub unsafe fn standardInput(&self) -> Option> { - msg_send_id![self, standardInput] - } - pub unsafe fn setStandardInput(&self, standardInput: Option<&NSFileHandle>) { - msg_send![self, setStandardInput: standardInput] - } - pub unsafe fn standardOutput(&self) -> Option> { - msg_send_id![self, standardOutput] - } - pub unsafe fn setStandardOutput(&self, standardOutput: Option<&NSFileHandle>) { - msg_send![self, setStandardOutput: standardOutput] - } - pub unsafe fn standardError(&self) -> Option> { - msg_send_id![self, standardError] - } - pub unsafe fn setStandardError(&self, standardError: Option<&NSFileHandle>) { - msg_send![self, setStandardError: standardError] - } + #[method_id(standardInput)] + pub unsafe fn standardInput(&self) -> Option>; + # [method (setStandardInput :)] + pub unsafe fn setStandardInput(&self, standardInput: Option<&NSFileHandle>); + #[method_id(standardOutput)] + pub unsafe fn standardOutput(&self) -> Option>; + # [method (setStandardOutput :)] + pub unsafe fn setStandardOutput(&self, standardOutput: Option<&NSFileHandle>); + #[method_id(standardError)] + pub unsafe fn standardError(&self) -> Option>; + # [method (setStandardError :)] + pub unsafe fn setStandardError(&self, standardError: Option<&NSFileHandle>); + # [method (executeWithArguments : completionHandler :)] pub unsafe fn executeWithArguments_completionHandler( &self, arguments: Option<&NSArray>, handler: NSUserUnixTaskCompletionHandler, - ) { - msg_send![ - self, - executeWithArguments: arguments, - completionHandler: handler - ] - } + ); } ); extern_class!( @@ -86,17 +72,12 @@ extern_class!( ); extern_methods!( unsafe impl NSUserAppleScriptTask { + # [method (executeWithAppleEvent : completionHandler :)] pub unsafe fn executeWithAppleEvent_completionHandler( &self, event: Option<&NSAppleEventDescriptor>, handler: NSUserAppleScriptTaskCompletionHandler, - ) { - msg_send![ - self, - executeWithAppleEvent: event, - completionHandler: handler - ] - } + ); } ); extern_class!( @@ -108,18 +89,15 @@ extern_class!( ); extern_methods!( unsafe impl NSUserAutomatorTask { - pub unsafe fn variables(&self) -> Option, Shared>> { - msg_send_id![self, variables] - } - pub unsafe fn setVariables(&self, variables: Option<&NSDictionary>) { - msg_send![self, setVariables: variables] - } + #[method_id(variables)] + pub unsafe fn variables(&self) -> Option, Shared>>; + # [method (setVariables :)] + pub unsafe fn setVariables(&self, variables: Option<&NSDictionary>); + # [method (executeWithInput : completionHandler :)] pub unsafe fn executeWithInput_completionHandler( &self, input: Option<&NSSecureCoding>, handler: NSUserAutomatorTaskCompletionHandler, - ) { - msg_send![self, executeWithInput: input, completionHandler: handler] - } + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index 6a72fd4f6..fa26790d9 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSValue; @@ -14,59 +14,48 @@ extern_class!( ); extern_methods!( unsafe impl NSValue { - pub unsafe fn getValue_size(&self, value: NonNull, size: NSUInteger) { - msg_send![self, getValue: value, size: size] - } - pub unsafe fn objCType(&self) -> NonNull { - msg_send![self, objCType] - } + # [method (getValue : size :)] + pub unsafe fn getValue_size(&self, value: NonNull, size: NSUInteger); + #[method(objCType)] + pub unsafe fn objCType(&self) -> NonNull; + # [method_id (initWithBytes : objCType :)] pub unsafe fn initWithBytes_objCType( &self, value: NonNull, type_: NonNull, - ) -> Id { - msg_send_id![self, initWithBytes: value, objCType: type_] - } - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } + ) -> Id; + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSValueCreation"] unsafe impl NSValue { + # [method_id (valueWithBytes : objCType :)] pub unsafe fn valueWithBytes_objCType( value: NonNull, type_: NonNull, - ) -> Id { - msg_send_id![Self::class(), valueWithBytes: value, objCType: type_] - } + ) -> Id; + # [method_id (value : withObjCType :)] pub unsafe fn value_withObjCType( value: NonNull, type_: NonNull, - ) -> Id { - msg_send_id![Self::class(), value: value, withObjCType: type_] - } + ) -> Id; } ); extern_methods!( #[doc = "NSValueExtensionMethods"] unsafe impl NSValue { - pub unsafe fn valueWithNonretainedObject(anObject: Option<&Object>) -> Id { - msg_send_id![Self::class(), valueWithNonretainedObject: anObject] - } - pub unsafe fn nonretainedObjectValue(&self) -> Option> { - msg_send_id![self, nonretainedObjectValue] - } - pub unsafe fn valueWithPointer(pointer: *mut c_void) -> Id { - msg_send_id![Self::class(), valueWithPointer: pointer] - } - pub unsafe fn pointerValue(&self) -> *mut c_void { - msg_send![self, pointerValue] - } - pub unsafe fn isEqualToValue(&self, value: &NSValue) -> bool { - msg_send![self, isEqualToValue: value] - } + # [method_id (valueWithNonretainedObject :)] + pub unsafe fn valueWithNonretainedObject(anObject: Option<&Object>) -> Id; + #[method_id(nonretainedObjectValue)] + pub unsafe fn nonretainedObjectValue(&self) -> Option>; + # [method_id (valueWithPointer :)] + pub unsafe fn valueWithPointer(pointer: *mut c_void) -> Id; + #[method(pointerValue)] + pub unsafe fn pointerValue(&self) -> *mut c_void; + # [method (isEqualToValue :)] + pub unsafe fn isEqualToValue(&self, value: &NSValue) -> bool; } ); extern_class!( @@ -78,171 +67,118 @@ extern_class!( ); extern_methods!( unsafe impl NSNumber { - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option> { - msg_send_id![self, initWithCoder: coder] - } - pub unsafe fn initWithChar(&self, value: c_char) -> Id { - msg_send_id![self, initWithChar: value] - } - pub unsafe fn initWithUnsignedChar(&self, value: c_uchar) -> Id { - msg_send_id![self, initWithUnsignedChar: value] - } - pub unsafe fn initWithShort(&self, value: c_short) -> Id { - msg_send_id![self, initWithShort: value] - } - pub unsafe fn initWithUnsignedShort(&self, value: c_ushort) -> Id { - msg_send_id![self, initWithUnsignedShort: value] - } - pub unsafe fn initWithInt(&self, value: c_int) -> Id { - msg_send_id![self, initWithInt: value] - } - pub unsafe fn initWithUnsignedInt(&self, value: c_uint) -> Id { - msg_send_id![self, initWithUnsignedInt: value] - } - pub unsafe fn initWithLong(&self, value: c_long) -> Id { - msg_send_id![self, initWithLong: value] - } - pub unsafe fn initWithUnsignedLong(&self, value: c_ulong) -> Id { - msg_send_id![self, initWithUnsignedLong: value] - } - pub unsafe fn initWithLongLong(&self, value: c_longlong) -> Id { - msg_send_id![self, initWithLongLong: value] - } - pub unsafe fn initWithUnsignedLongLong(&self, value: c_ulonglong) -> Id { - msg_send_id![self, initWithUnsignedLongLong: value] - } - pub unsafe fn initWithFloat(&self, value: c_float) -> Id { - msg_send_id![self, initWithFloat: value] - } - pub unsafe fn initWithDouble(&self, value: c_double) -> Id { - msg_send_id![self, initWithDouble: value] - } - pub unsafe fn initWithBool(&self, value: bool) -> Id { - msg_send_id![self, initWithBool: value] - } - pub unsafe fn initWithInteger(&self, value: NSInteger) -> Id { - msg_send_id![self, initWithInteger: value] - } - pub unsafe fn initWithUnsignedInteger(&self, value: NSUInteger) -> Id { - msg_send_id![self, initWithUnsignedInteger: value] - } - pub unsafe fn charValue(&self) -> c_char { - msg_send![self, charValue] - } - pub unsafe fn unsignedCharValue(&self) -> c_uchar { - msg_send![self, unsignedCharValue] - } - pub unsafe fn shortValue(&self) -> c_short { - msg_send![self, shortValue] - } - pub unsafe fn unsignedShortValue(&self) -> c_ushort { - msg_send![self, unsignedShortValue] - } - pub unsafe fn intValue(&self) -> c_int { - msg_send![self, intValue] - } - pub unsafe fn unsignedIntValue(&self) -> c_uint { - msg_send![self, unsignedIntValue] - } - pub unsafe fn longValue(&self) -> c_long { - msg_send![self, longValue] - } - pub unsafe fn unsignedLongValue(&self) -> c_ulong { - msg_send![self, unsignedLongValue] - } - pub unsafe fn longLongValue(&self) -> c_longlong { - msg_send![self, longLongValue] - } - pub unsafe fn unsignedLongLongValue(&self) -> c_ulonglong { - msg_send![self, unsignedLongLongValue] - } - pub unsafe fn floatValue(&self) -> c_float { - msg_send![self, floatValue] - } - pub unsafe fn doubleValue(&self) -> c_double { - msg_send![self, doubleValue] - } - pub unsafe fn boolValue(&self) -> bool { - msg_send![self, boolValue] - } - pub unsafe fn integerValue(&self) -> NSInteger { - msg_send![self, integerValue] - } - pub unsafe fn unsignedIntegerValue(&self) -> NSUInteger { - msg_send![self, unsignedIntegerValue] - } - pub unsafe fn stringValue(&self) -> Id { - msg_send_id![self, stringValue] - } - pub unsafe fn compare(&self, otherNumber: &NSNumber) -> NSComparisonResult { - msg_send![self, compare: otherNumber] - } - pub unsafe fn isEqualToNumber(&self, number: &NSNumber) -> bool { - msg_send![self, isEqualToNumber: number] - } - pub unsafe fn descriptionWithLocale( - &self, - locale: Option<&Object>, - ) -> Id { - msg_send_id![self, descriptionWithLocale: locale] - } + # [method_id (initWithCoder :)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + # [method_id (initWithChar :)] + pub unsafe fn initWithChar(&self, value: c_char) -> Id; + # [method_id (initWithUnsignedChar :)] + pub unsafe fn initWithUnsignedChar(&self, value: c_uchar) -> Id; + # [method_id (initWithShort :)] + pub unsafe fn initWithShort(&self, value: c_short) -> Id; + # [method_id (initWithUnsignedShort :)] + pub unsafe fn initWithUnsignedShort(&self, value: c_ushort) -> Id; + # [method_id (initWithInt :)] + pub unsafe fn initWithInt(&self, value: c_int) -> Id; + # [method_id (initWithUnsignedInt :)] + pub unsafe fn initWithUnsignedInt(&self, value: c_uint) -> Id; + # [method_id (initWithLong :)] + pub unsafe fn initWithLong(&self, value: c_long) -> Id; + # [method_id (initWithUnsignedLong :)] + pub unsafe fn initWithUnsignedLong(&self, value: c_ulong) -> Id; + # [method_id (initWithLongLong :)] + pub unsafe fn initWithLongLong(&self, value: c_longlong) -> Id; + # [method_id (initWithUnsignedLongLong :)] + pub unsafe fn initWithUnsignedLongLong(&self, value: c_ulonglong) -> Id; + # [method_id (initWithFloat :)] + pub unsafe fn initWithFloat(&self, value: c_float) -> Id; + # [method_id (initWithDouble :)] + pub unsafe fn initWithDouble(&self, value: c_double) -> Id; + # [method_id (initWithBool :)] + pub unsafe fn initWithBool(&self, value: bool) -> Id; + # [method_id (initWithInteger :)] + pub unsafe fn initWithInteger(&self, value: NSInteger) -> Id; + # [method_id (initWithUnsignedInteger :)] + pub unsafe fn initWithUnsignedInteger(&self, value: NSUInteger) -> Id; + #[method(charValue)] + pub unsafe fn charValue(&self) -> c_char; + #[method(unsignedCharValue)] + pub unsafe fn unsignedCharValue(&self) -> c_uchar; + #[method(shortValue)] + pub unsafe fn shortValue(&self) -> c_short; + #[method(unsignedShortValue)] + pub unsafe fn unsignedShortValue(&self) -> c_ushort; + #[method(intValue)] + pub unsafe fn intValue(&self) -> c_int; + #[method(unsignedIntValue)] + pub unsafe fn unsignedIntValue(&self) -> c_uint; + #[method(longValue)] + pub unsafe fn longValue(&self) -> c_long; + #[method(unsignedLongValue)] + pub unsafe fn unsignedLongValue(&self) -> c_ulong; + #[method(longLongValue)] + pub unsafe fn longLongValue(&self) -> c_longlong; + #[method(unsignedLongLongValue)] + pub unsafe fn unsignedLongLongValue(&self) -> c_ulonglong; + #[method(floatValue)] + pub unsafe fn floatValue(&self) -> c_float; + #[method(doubleValue)] + pub unsafe fn doubleValue(&self) -> c_double; + #[method(boolValue)] + pub unsafe fn boolValue(&self) -> bool; + #[method(integerValue)] + pub unsafe fn integerValue(&self) -> NSInteger; + #[method(unsignedIntegerValue)] + pub unsafe fn unsignedIntegerValue(&self) -> NSUInteger; + #[method_id(stringValue)] + pub unsafe fn stringValue(&self) -> Id; + # [method (compare :)] + pub unsafe fn compare(&self, otherNumber: &NSNumber) -> NSComparisonResult; + # [method (isEqualToNumber :)] + pub unsafe fn isEqualToNumber(&self, number: &NSNumber) -> bool; + # [method_id (descriptionWithLocale :)] + pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) + -> Id; } ); extern_methods!( #[doc = "NSNumberCreation"] unsafe impl NSNumber { - pub unsafe fn numberWithChar(value: c_char) -> Id { - msg_send_id![Self::class(), numberWithChar: value] - } - pub unsafe fn numberWithUnsignedChar(value: c_uchar) -> Id { - msg_send_id![Self::class(), numberWithUnsignedChar: value] - } - pub unsafe fn numberWithShort(value: c_short) -> Id { - msg_send_id![Self::class(), numberWithShort: value] - } - pub unsafe fn numberWithUnsignedShort(value: c_ushort) -> Id { - msg_send_id![Self::class(), numberWithUnsignedShort: value] - } - pub unsafe fn numberWithInt(value: c_int) -> Id { - msg_send_id![Self::class(), numberWithInt: value] - } - pub unsafe fn numberWithUnsignedInt(value: c_uint) -> Id { - msg_send_id![Self::class(), numberWithUnsignedInt: value] - } - pub unsafe fn numberWithLong(value: c_long) -> Id { - msg_send_id![Self::class(), numberWithLong: value] - } - pub unsafe fn numberWithUnsignedLong(value: c_ulong) -> Id { - msg_send_id![Self::class(), numberWithUnsignedLong: value] - } - pub unsafe fn numberWithLongLong(value: c_longlong) -> Id { - msg_send_id![Self::class(), numberWithLongLong: value] - } - pub unsafe fn numberWithUnsignedLongLong(value: c_ulonglong) -> Id { - msg_send_id![Self::class(), numberWithUnsignedLongLong: value] - } - pub unsafe fn numberWithFloat(value: c_float) -> Id { - msg_send_id![Self::class(), numberWithFloat: value] - } - pub unsafe fn numberWithDouble(value: c_double) -> Id { - msg_send_id![Self::class(), numberWithDouble: value] - } - pub unsafe fn numberWithBool(value: bool) -> Id { - msg_send_id![Self::class(), numberWithBool: value] - } - pub unsafe fn numberWithInteger(value: NSInteger) -> Id { - msg_send_id![Self::class(), numberWithInteger: value] - } - pub unsafe fn numberWithUnsignedInteger(value: NSUInteger) -> Id { - msg_send_id![Self::class(), numberWithUnsignedInteger: value] - } + # [method_id (numberWithChar :)] + pub unsafe fn numberWithChar(value: c_char) -> Id; + # [method_id (numberWithUnsignedChar :)] + pub unsafe fn numberWithUnsignedChar(value: c_uchar) -> Id; + # [method_id (numberWithShort :)] + pub unsafe fn numberWithShort(value: c_short) -> Id; + # [method_id (numberWithUnsignedShort :)] + pub unsafe fn numberWithUnsignedShort(value: c_ushort) -> Id; + # [method_id (numberWithInt :)] + pub unsafe fn numberWithInt(value: c_int) -> Id; + # [method_id (numberWithUnsignedInt :)] + pub unsafe fn numberWithUnsignedInt(value: c_uint) -> Id; + # [method_id (numberWithLong :)] + pub unsafe fn numberWithLong(value: c_long) -> Id; + # [method_id (numberWithUnsignedLong :)] + pub unsafe fn numberWithUnsignedLong(value: c_ulong) -> Id; + # [method_id (numberWithLongLong :)] + pub unsafe fn numberWithLongLong(value: c_longlong) -> Id; + # [method_id (numberWithUnsignedLongLong :)] + pub unsafe fn numberWithUnsignedLongLong(value: c_ulonglong) -> Id; + # [method_id (numberWithFloat :)] + pub unsafe fn numberWithFloat(value: c_float) -> Id; + # [method_id (numberWithDouble :)] + pub unsafe fn numberWithDouble(value: c_double) -> Id; + # [method_id (numberWithBool :)] + pub unsafe fn numberWithBool(value: bool) -> Id; + # [method_id (numberWithInteger :)] + pub unsafe fn numberWithInteger(value: NSInteger) -> Id; + # [method_id (numberWithUnsignedInteger :)] + pub unsafe fn numberWithUnsignedInteger(value: NSUInteger) -> Id; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSValue { - pub unsafe fn getValue(&self, value: NonNull) { - msg_send![self, getValue: value] - } + # [method (getValue :)] + pub unsafe fn getValue(&self, value: NonNull); } ); diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index 15d75d40d..55265ebbe 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -4,7 +4,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSValueTransformerName = NSString; extern_class!( #[derive(Debug)] @@ -15,42 +15,29 @@ extern_class!( ); extern_methods!( unsafe impl NSValueTransformer { + # [method (setValueTransformer : forName :)] pub unsafe fn setValueTransformer_forName( transformer: Option<&NSValueTransformer>, name: &NSValueTransformerName, - ) { - msg_send![ - Self::class(), - setValueTransformer: transformer, - forName: name - ] - } + ); + # [method_id (valueTransformerForName :)] pub unsafe fn valueTransformerForName( name: &NSValueTransformerName, - ) -> Option> { - msg_send_id![Self::class(), valueTransformerForName: name] - } - pub unsafe fn valueTransformerNames() -> Id, Shared> { - msg_send_id![Self::class(), valueTransformerNames] - } - pub unsafe fn transformedValueClass() -> &Class { - msg_send![Self::class(), transformedValueClass] - } - pub unsafe fn allowsReverseTransformation() -> bool { - msg_send![Self::class(), allowsReverseTransformation] - } - pub unsafe fn transformedValue( - &self, - value: Option<&Object>, - ) -> Option> { - msg_send_id![self, transformedValue: value] - } + ) -> Option>; + #[method_id(valueTransformerNames)] + pub unsafe fn valueTransformerNames() -> Id, Shared>; + #[method(transformedValueClass)] + pub unsafe fn transformedValueClass() -> &Class; + #[method(allowsReverseTransformation)] + pub unsafe fn allowsReverseTransformation() -> bool; + # [method_id (transformedValue :)] + pub unsafe fn transformedValue(&self, value: Option<&Object>) + -> Option>; + # [method_id (reverseTransformedValue :)] pub unsafe fn reverseTransformedValue( &self, value: Option<&Object>, - ) -> Option> { - msg_send_id![self, reverseTransformedValue: value] - } + ) -> Option>; } ); extern_class!( @@ -62,8 +49,7 @@ extern_class!( ); extern_methods!( unsafe impl NSSecureUnarchiveFromDataTransformer { - pub unsafe fn allowedTopLevelClasses() -> Id, Shared> { - msg_send_id![Self::class(), allowedTopLevelClasses] - } + #[method_id(allowedTopLevelClasses)] + pub unsafe fn allowedTopLevelClasses() -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index dfe7d0d23..d7ece7f0d 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLDTD; @@ -16,97 +16,74 @@ extern_class!( ); extern_methods!( unsafe impl NSXMLDTD { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithKind : options :)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, options: NSXMLNodeOptions, - ) -> Id { - msg_send_id![self, initWithKind: kind, options: options] - } + ) -> Id; + # [method_id (initWithContentsOfURL : options : error :)] pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, mask: NSXMLNodeOptions, - ) -> Result, Id> { - msg_send_id![self, initWithContentsOfURL: url, options: mask, error: _] - } + ) -> Result, Id>; + # [method_id (initWithData : options : error :)] pub unsafe fn initWithData_options_error( &self, data: &NSData, mask: NSXMLNodeOptions, - ) -> Result, Id> { - msg_send_id![self, initWithData: data, options: mask, error: _] - } - pub unsafe fn publicID(&self) -> Option> { - msg_send_id![self, publicID] - } - pub unsafe fn setPublicID(&self, publicID: Option<&NSString>) { - msg_send![self, setPublicID: publicID] - } - pub unsafe fn systemID(&self) -> Option> { - msg_send_id![self, systemID] - } - pub unsafe fn setSystemID(&self, systemID: Option<&NSString>) { - msg_send![self, setSystemID: systemID] - } - pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { - msg_send![self, insertChild: child, atIndex: index] - } + ) -> Result, Id>; + #[method_id(publicID)] + pub unsafe fn publicID(&self) -> Option>; + # [method (setPublicID :)] + pub unsafe fn setPublicID(&self, publicID: Option<&NSString>); + #[method_id(systemID)] + pub unsafe fn systemID(&self) -> Option>; + # [method (setSystemID :)] + pub unsafe fn setSystemID(&self, systemID: Option<&NSString>); + # [method (insertChild : atIndex :)] + pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger); + # [method (insertChildren : atIndex :)] pub unsafe fn insertChildren_atIndex( &self, children: &NSArray, index: NSUInteger, - ) { - msg_send![self, insertChildren: children, atIndex: index] - } - pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { - msg_send![self, removeChildAtIndex: index] - } - pub unsafe fn setChildren(&self, children: Option<&NSArray>) { - msg_send![self, setChildren: children] - } - pub unsafe fn addChild(&self, child: &NSXMLNode) { - msg_send![self, addChild: child] - } - pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { - msg_send![self, replaceChildAtIndex: index, withNode: node] - } + ); + # [method (removeChildAtIndex :)] + pub unsafe fn removeChildAtIndex(&self, index: NSUInteger); + # [method (setChildren :)] + pub unsafe fn setChildren(&self, children: Option<&NSArray>); + # [method (addChild :)] + pub unsafe fn addChild(&self, child: &NSXMLNode); + # [method (replaceChildAtIndex : withNode :)] + pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); + # [method_id (entityDeclarationForName :)] pub unsafe fn entityDeclarationForName( &self, name: &NSString, - ) -> Option> { - msg_send_id![self, entityDeclarationForName: name] - } + ) -> Option>; + # [method_id (notationDeclarationForName :)] pub unsafe fn notationDeclarationForName( &self, name: &NSString, - ) -> Option> { - msg_send_id![self, notationDeclarationForName: name] - } + ) -> Option>; + # [method_id (elementDeclarationForName :)] pub unsafe fn elementDeclarationForName( &self, name: &NSString, - ) -> Option> { - msg_send_id![self, elementDeclarationForName: name] - } + ) -> Option>; + # [method_id (attributeDeclarationForName : elementName :)] pub unsafe fn attributeDeclarationForName_elementName( &self, name: &NSString, elementName: &NSString, - ) -> Option> { - msg_send_id![ - self, - attributeDeclarationForName: name, - elementName: elementName - ] - } + ) -> Option>; + # [method_id (predefinedEntityDeclarationForName :)] pub unsafe fn predefinedEntityDeclarationForName( name: &NSString, - ) -> Option> { - msg_send_id![Self::class(), predefinedEntityDeclarationForName: name] - } + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index bca0d727d..bded139ac 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -2,7 +2,7 @@ use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLDTDNode; @@ -12,45 +12,33 @@ extern_class!( ); extern_methods!( unsafe impl NSXMLDTDNode { - pub unsafe fn initWithXMLString(&self, string: &NSString) -> Option> { - msg_send_id![self, initWithXMLString: string] - } + # [method_id (initWithXMLString :)] + pub unsafe fn initWithXMLString(&self, string: &NSString) -> Option>; + # [method_id (initWithKind : options :)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, options: NSXMLNodeOptions, - ) -> Id { - msg_send_id![self, initWithKind: kind, options: options] - } - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn DTDKind(&self) -> NSXMLDTDNodeKind { - msg_send![self, DTDKind] - } - pub unsafe fn setDTDKind(&self, DTDKind: NSXMLDTDNodeKind) { - msg_send![self, setDTDKind: DTDKind] - } - pub unsafe fn isExternal(&self) -> bool { - msg_send![self, isExternal] - } - pub unsafe fn publicID(&self) -> Option> { - msg_send_id![self, publicID] - } - pub unsafe fn setPublicID(&self, publicID: Option<&NSString>) { - msg_send![self, setPublicID: publicID] - } - pub unsafe fn systemID(&self) -> Option> { - msg_send_id![self, systemID] - } - pub unsafe fn setSystemID(&self, systemID: Option<&NSString>) { - msg_send![self, setSystemID: systemID] - } - pub unsafe fn notationName(&self) -> Option> { - msg_send_id![self, notationName] - } - pub unsafe fn setNotationName(&self, notationName: Option<&NSString>) { - msg_send![self, setNotationName: notationName] - } + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method(DTDKind)] + pub unsafe fn DTDKind(&self) -> NSXMLDTDNodeKind; + # [method (setDTDKind :)] + pub unsafe fn setDTDKind(&self, DTDKind: NSXMLDTDNodeKind); + #[method(isExternal)] + pub unsafe fn isExternal(&self) -> bool; + #[method_id(publicID)] + pub unsafe fn publicID(&self) -> Option>; + # [method (setPublicID :)] + pub unsafe fn setPublicID(&self, publicID: Option<&NSString>); + #[method_id(systemID)] + pub unsafe fn systemID(&self) -> Option>; + # [method (setSystemID :)] + pub unsafe fn setSystemID(&self, systemID: Option<&NSString>); + #[method_id(notationName)] + pub unsafe fn notationName(&self) -> Option>; + # [method (setNotationName :)] + pub unsafe fn setNotationName(&self, notationName: Option<&NSString>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index 6bd2b392b..2f3a215a7 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -6,7 +6,7 @@ use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLDocument; @@ -16,147 +16,100 @@ extern_class!( ); extern_methods!( unsafe impl NSXMLDocument { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithXMLString : options : error :)] pub unsafe fn initWithXMLString_options_error( &self, string: &NSString, mask: NSXMLNodeOptions, - ) -> Result, Id> { - msg_send_id![self, initWithXMLString: string, options: mask, error: _] - } + ) -> Result, Id>; + # [method_id (initWithContentsOfURL : options : error :)] pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, mask: NSXMLNodeOptions, - ) -> Result, Id> { - msg_send_id![self, initWithContentsOfURL: url, options: mask, error: _] - } + ) -> Result, Id>; + # [method_id (initWithData : options : error :)] pub unsafe fn initWithData_options_error( &self, data: &NSData, mask: NSXMLNodeOptions, - ) -> Result, Id> { - msg_send_id![self, initWithData: data, options: mask, error: _] - } + ) -> Result, Id>; + # [method_id (initWithRootElement :)] pub unsafe fn initWithRootElement( &self, element: Option<&NSXMLElement>, - ) -> Id { - msg_send_id![self, initWithRootElement: element] - } - pub unsafe fn replacementClassForClass(cls: &Class) -> &Class { - msg_send![Self::class(), replacementClassForClass: cls] - } - pub unsafe fn characterEncoding(&self) -> Option> { - msg_send_id![self, characterEncoding] - } - pub unsafe fn setCharacterEncoding(&self, characterEncoding: Option<&NSString>) { - msg_send![self, setCharacterEncoding: characterEncoding] - } - pub unsafe fn version(&self) -> Option> { - msg_send_id![self, version] - } - pub unsafe fn setVersion(&self, version: Option<&NSString>) { - msg_send![self, setVersion: version] - } - pub unsafe fn isStandalone(&self) -> bool { - msg_send![self, isStandalone] - } - pub unsafe fn setStandalone(&self, standalone: bool) { - msg_send![self, setStandalone: standalone] - } - pub unsafe fn documentContentKind(&self) -> NSXMLDocumentContentKind { - msg_send![self, documentContentKind] - } - pub unsafe fn setDocumentContentKind(&self, documentContentKind: NSXMLDocumentContentKind) { - msg_send![self, setDocumentContentKind: documentContentKind] - } - pub unsafe fn MIMEType(&self) -> Option> { - msg_send_id![self, MIMEType] - } - pub unsafe fn setMIMEType(&self, MIMEType: Option<&NSString>) { - msg_send![self, setMIMEType: MIMEType] - } - pub unsafe fn DTD(&self) -> Option> { - msg_send_id![self, DTD] - } - pub unsafe fn setDTD(&self, DTD: Option<&NSXMLDTD>) { - msg_send![self, setDTD: DTD] - } - pub unsafe fn setRootElement(&self, root: &NSXMLElement) { - msg_send![self, setRootElement: root] - } - pub unsafe fn rootElement(&self) -> Option> { - msg_send_id![self, rootElement] - } - pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { - msg_send![self, insertChild: child, atIndex: index] - } + ) -> Id; + # [method (replacementClassForClass :)] + pub unsafe fn replacementClassForClass(cls: &Class) -> &Class; + #[method_id(characterEncoding)] + pub unsafe fn characterEncoding(&self) -> Option>; + # [method (setCharacterEncoding :)] + pub unsafe fn setCharacterEncoding(&self, characterEncoding: Option<&NSString>); + #[method_id(version)] + pub unsafe fn version(&self) -> Option>; + # [method (setVersion :)] + pub unsafe fn setVersion(&self, version: Option<&NSString>); + #[method(isStandalone)] + pub unsafe fn isStandalone(&self) -> bool; + # [method (setStandalone :)] + pub unsafe fn setStandalone(&self, standalone: bool); + #[method(documentContentKind)] + pub unsafe fn documentContentKind(&self) -> NSXMLDocumentContentKind; + # [method (setDocumentContentKind :)] + pub unsafe fn setDocumentContentKind(&self, documentContentKind: NSXMLDocumentContentKind); + #[method_id(MIMEType)] + pub unsafe fn MIMEType(&self) -> Option>; + # [method (setMIMEType :)] + pub unsafe fn setMIMEType(&self, MIMEType: Option<&NSString>); + #[method_id(DTD)] + pub unsafe fn DTD(&self) -> Option>; + # [method (setDTD :)] + pub unsafe fn setDTD(&self, DTD: Option<&NSXMLDTD>); + # [method (setRootElement :)] + pub unsafe fn setRootElement(&self, root: &NSXMLElement); + #[method_id(rootElement)] + pub unsafe fn rootElement(&self) -> Option>; + # [method (insertChild : atIndex :)] + pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger); + # [method (insertChildren : atIndex :)] pub unsafe fn insertChildren_atIndex( &self, children: &NSArray, index: NSUInteger, - ) { - msg_send![self, insertChildren: children, atIndex: index] - } - pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { - msg_send![self, removeChildAtIndex: index] - } - pub unsafe fn setChildren(&self, children: Option<&NSArray>) { - msg_send![self, setChildren: children] - } - pub unsafe fn addChild(&self, child: &NSXMLNode) { - msg_send![self, addChild: child] - } - pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { - msg_send![self, replaceChildAtIndex: index, withNode: node] - } - pub unsafe fn XMLData(&self) -> Id { - msg_send_id![self, XMLData] - } - pub unsafe fn XMLDataWithOptions(&self, options: NSXMLNodeOptions) -> Id { - msg_send_id![self, XMLDataWithOptions: options] - } + ); + # [method (removeChildAtIndex :)] + pub unsafe fn removeChildAtIndex(&self, index: NSUInteger); + # [method (setChildren :)] + pub unsafe fn setChildren(&self, children: Option<&NSArray>); + # [method (addChild :)] + pub unsafe fn addChild(&self, child: &NSXMLNode); + # [method (replaceChildAtIndex : withNode :)] + pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); + #[method_id(XMLData)] + pub unsafe fn XMLData(&self) -> Id; + # [method_id (XMLDataWithOptions :)] + pub unsafe fn XMLDataWithOptions(&self, options: NSXMLNodeOptions) -> Id; + # [method_id (objectByApplyingXSLT : arguments : error :)] pub unsafe fn objectByApplyingXSLT_arguments_error( &self, xslt: &NSData, arguments: Option<&NSDictionary>, - ) -> Result, Id> { - msg_send_id![ - self, - objectByApplyingXSLT: xslt, - arguments: arguments, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (objectByApplyingXSLTString : arguments : error :)] pub unsafe fn objectByApplyingXSLTString_arguments_error( &self, xslt: &NSString, arguments: Option<&NSDictionary>, - ) -> Result, Id> { - msg_send_id![ - self, - objectByApplyingXSLTString: xslt, - arguments: arguments, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (objectByApplyingXSLTAtURL : arguments : error :)] pub unsafe fn objectByApplyingXSLTAtURL_arguments_error( &self, xsltURL: &NSURL, argument: Option<&NSDictionary>, - ) -> Result, Id> { - msg_send_id![ - self, - objectByApplyingXSLTAtURL: xsltURL, - arguments: argument, - error: _ - ] - } - pub unsafe fn validateAndReturnError(&self) -> Result<(), Id> { - msg_send![self, validateAndReturnError: _] - } + ) -> Result, Id>; + # [method (validateAndReturnError :)] + pub unsafe fn validateAndReturnError(&self) -> Result<(), Id>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index e52ced552..7b0c09e14 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -7,7 +7,7 @@ use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLElement; @@ -17,133 +17,104 @@ extern_class!( ); extern_methods!( unsafe impl NSXMLElement { - pub unsafe fn initWithName(&self, name: &NSString) -> Id { - msg_send_id![self, initWithName: name] - } + # [method_id (initWithName :)] + pub unsafe fn initWithName(&self, name: &NSString) -> Id; + # [method_id (initWithName : URI :)] pub unsafe fn initWithName_URI( &self, name: &NSString, URI: Option<&NSString>, - ) -> Id { - msg_send_id![self, initWithName: name, URI: URI] - } + ) -> Id; + # [method_id (initWithName : stringValue :)] pub unsafe fn initWithName_stringValue( &self, name: &NSString, string: Option<&NSString>, - ) -> Id { - msg_send_id![self, initWithName: name, stringValue: string] - } + ) -> Id; + # [method_id (initWithXMLString : error :)] pub unsafe fn initWithXMLString_error( &self, string: &NSString, - ) -> Result, Id> { - msg_send_id![self, initWithXMLString: string, error: _] - } + ) -> Result, Id>; + # [method_id (initWithKind : options :)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, options: NSXMLNodeOptions, - ) -> Id { - msg_send_id![self, initWithKind: kind, options: options] - } - pub unsafe fn elementsForName(&self, name: &NSString) -> Id, Shared> { - msg_send_id![self, elementsForName: name] - } + ) -> Id; + # [method_id (elementsForName :)] + pub unsafe fn elementsForName(&self, name: &NSString) -> Id, Shared>; + # [method_id (elementsForLocalName : URI :)] pub unsafe fn elementsForLocalName_URI( &self, localName: &NSString, URI: Option<&NSString>, - ) -> Id, Shared> { - msg_send_id![self, elementsForLocalName: localName, URI: URI] - } - pub unsafe fn addAttribute(&self, attribute: &NSXMLNode) { - msg_send![self, addAttribute: attribute] - } - pub unsafe fn removeAttributeForName(&self, name: &NSString) { - msg_send![self, removeAttributeForName: name] - } - pub unsafe fn attributes(&self) -> Option, Shared>> { - msg_send_id![self, attributes] - } - pub unsafe fn setAttributes(&self, attributes: Option<&NSArray>) { - msg_send![self, setAttributes: attributes] - } + ) -> Id, Shared>; + # [method (addAttribute :)] + pub unsafe fn addAttribute(&self, attribute: &NSXMLNode); + # [method (removeAttributeForName :)] + pub unsafe fn removeAttributeForName(&self, name: &NSString); + #[method_id(attributes)] + pub unsafe fn attributes(&self) -> Option, Shared>>; + # [method (setAttributes :)] + pub unsafe fn setAttributes(&self, attributes: Option<&NSArray>); + # [method (setAttributesWithDictionary :)] pub unsafe fn setAttributesWithDictionary( &self, attributes: &NSDictionary, - ) { - msg_send![self, setAttributesWithDictionary: attributes] - } - pub unsafe fn attributeForName(&self, name: &NSString) -> Option> { - msg_send_id![self, attributeForName: name] - } + ); + # [method_id (attributeForName :)] + pub unsafe fn attributeForName(&self, name: &NSString) -> Option>; + # [method_id (attributeForLocalName : URI :)] pub unsafe fn attributeForLocalName_URI( &self, localName: &NSString, URI: Option<&NSString>, - ) -> Option> { - msg_send_id![self, attributeForLocalName: localName, URI: URI] - } - pub unsafe fn addNamespace(&self, aNamespace: &NSXMLNode) { - msg_send![self, addNamespace: aNamespace] - } - pub unsafe fn removeNamespaceForPrefix(&self, name: &NSString) { - msg_send![self, removeNamespaceForPrefix: name] - } - pub unsafe fn namespaces(&self) -> Option, Shared>> { - msg_send_id![self, namespaces] - } - pub unsafe fn setNamespaces(&self, namespaces: Option<&NSArray>) { - msg_send![self, setNamespaces: namespaces] - } - pub unsafe fn namespaceForPrefix(&self, name: &NSString) -> Option> { - msg_send_id![self, namespaceForPrefix: name] - } + ) -> Option>; + # [method (addNamespace :)] + pub unsafe fn addNamespace(&self, aNamespace: &NSXMLNode); + # [method (removeNamespaceForPrefix :)] + pub unsafe fn removeNamespaceForPrefix(&self, name: &NSString); + #[method_id(namespaces)] + pub unsafe fn namespaces(&self) -> Option, Shared>>; + # [method (setNamespaces :)] + pub unsafe fn setNamespaces(&self, namespaces: Option<&NSArray>); + # [method_id (namespaceForPrefix :)] + pub unsafe fn namespaceForPrefix(&self, name: &NSString) -> Option>; + # [method_id (resolveNamespaceForName :)] pub unsafe fn resolveNamespaceForName( &self, name: &NSString, - ) -> Option> { - msg_send_id![self, resolveNamespaceForName: name] - } + ) -> Option>; + # [method_id (resolvePrefixForNamespaceURI :)] pub unsafe fn resolvePrefixForNamespaceURI( &self, namespaceURI: &NSString, - ) -> Option> { - msg_send_id![self, resolvePrefixForNamespaceURI: namespaceURI] - } - pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger) { - msg_send![self, insertChild: child, atIndex: index] - } + ) -> Option>; + # [method (insertChild : atIndex :)] + pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger); + # [method (insertChildren : atIndex :)] pub unsafe fn insertChildren_atIndex( &self, children: &NSArray, index: NSUInteger, - ) { - msg_send![self, insertChildren: children, atIndex: index] - } - pub unsafe fn removeChildAtIndex(&self, index: NSUInteger) { - msg_send![self, removeChildAtIndex: index] - } - pub unsafe fn setChildren(&self, children: Option<&NSArray>) { - msg_send![self, setChildren: children] - } - pub unsafe fn addChild(&self, child: &NSXMLNode) { - msg_send![self, addChild: child] - } - pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode) { - msg_send![self, replaceChildAtIndex: index, withNode: node] - } - pub unsafe fn normalizeAdjacentTextNodesPreservingCDATA(&self, preserve: bool) { - msg_send![self, normalizeAdjacentTextNodesPreservingCDATA: preserve] - } + ); + # [method (removeChildAtIndex :)] + pub unsafe fn removeChildAtIndex(&self, index: NSUInteger); + # [method (setChildren :)] + pub unsafe fn setChildren(&self, children: Option<&NSArray>); + # [method (addChild :)] + pub unsafe fn addChild(&self, child: &NSXMLNode); + # [method (replaceChildAtIndex : withNode :)] + pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); + # [method (normalizeAdjacentTextNodesPreservingCDATA :)] + pub unsafe fn normalizeAdjacentTextNodesPreservingCDATA(&self, preserve: bool); } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSXMLElement { - pub unsafe fn setAttributesAsDictionary(&self, attributes: &NSDictionary) { - msg_send![self, setAttributesAsDictionary: attributes] - } + # [method (setAttributesAsDictionary :)] + pub unsafe fn setAttributesAsDictionary(&self, attributes: &NSDictionary); } ); diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index f093142a5..9de6243d7 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSXMLNodeOptions::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLNode; @@ -20,227 +20,149 @@ extern_class!( ); extern_methods!( unsafe impl NSXMLNode { - pub unsafe fn init(&self) -> Id { - msg_send_id![self, init] - } - pub unsafe fn initWithKind(&self, kind: NSXMLNodeKind) -> Id { - msg_send_id![self, initWithKind: kind] - } + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + # [method_id (initWithKind :)] + pub unsafe fn initWithKind(&self, kind: NSXMLNodeKind) -> Id; + # [method_id (initWithKind : options :)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, options: NSXMLNodeOptions, - ) -> Id { - msg_send_id![self, initWithKind: kind, options: options] - } - pub unsafe fn document() -> Id { - msg_send_id![Self::class(), document] - } - pub unsafe fn documentWithRootElement(element: &NSXMLElement) -> Id { - msg_send_id![Self::class(), documentWithRootElement: element] - } - pub unsafe fn elementWithName(name: &NSString) -> Id { - msg_send_id![Self::class(), elementWithName: name] - } - pub unsafe fn elementWithName_URI(name: &NSString, URI: &NSString) -> Id { - msg_send_id![Self::class(), elementWithName: name, URI: URI] - } + ) -> Id; + #[method_id(document)] + pub unsafe fn document() -> Id; + # [method_id (documentWithRootElement :)] + pub unsafe fn documentWithRootElement(element: &NSXMLElement) -> Id; + # [method_id (elementWithName :)] + pub unsafe fn elementWithName(name: &NSString) -> Id; + # [method_id (elementWithName : URI :)] + pub unsafe fn elementWithName_URI(name: &NSString, URI: &NSString) -> Id; + # [method_id (elementWithName : stringValue :)] pub unsafe fn elementWithName_stringValue( name: &NSString, string: &NSString, - ) -> Id { - msg_send_id![Self::class(), elementWithName: name, stringValue: string] - } + ) -> Id; + # [method_id (elementWithName : children : attributes :)] pub unsafe fn elementWithName_children_attributes( name: &NSString, children: Option<&NSArray>, attributes: Option<&NSArray>, - ) -> Id { - msg_send_id![ - Self::class(), - elementWithName: name, - children: children, - attributes: attributes - ] - } + ) -> Id; + # [method_id (attributeWithName : stringValue :)] pub unsafe fn attributeWithName_stringValue( name: &NSString, stringValue: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - attributeWithName: name, - stringValue: stringValue - ] - } + ) -> Id; + # [method_id (attributeWithName : URI : stringValue :)] pub unsafe fn attributeWithName_URI_stringValue( name: &NSString, URI: &NSString, stringValue: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - attributeWithName: name, - URI: URI, - stringValue: stringValue - ] - } + ) -> Id; + # [method_id (namespaceWithName : stringValue :)] pub unsafe fn namespaceWithName_stringValue( name: &NSString, stringValue: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - namespaceWithName: name, - stringValue: stringValue - ] - } + ) -> Id; + # [method_id (processingInstructionWithName : stringValue :)] pub unsafe fn processingInstructionWithName_stringValue( name: &NSString, stringValue: &NSString, - ) -> Id { - msg_send_id![ - Self::class(), - processingInstructionWithName: name, - stringValue: stringValue - ] - } - pub unsafe fn commentWithStringValue(stringValue: &NSString) -> Id { - msg_send_id![Self::class(), commentWithStringValue: stringValue] - } - pub unsafe fn textWithStringValue(stringValue: &NSString) -> Id { - msg_send_id![Self::class(), textWithStringValue: stringValue] - } - pub unsafe fn DTDNodeWithXMLString(string: &NSString) -> Option> { - msg_send_id![Self::class(), DTDNodeWithXMLString: string] - } - pub unsafe fn kind(&self) -> NSXMLNodeKind { - msg_send![self, kind] - } - pub unsafe fn name(&self) -> Option> { - msg_send_id![self, name] - } - pub unsafe fn setName(&self, name: Option<&NSString>) { - msg_send![self, setName: name] - } - pub unsafe fn objectValue(&self) -> Option> { - msg_send_id![self, objectValue] - } - pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>) { - msg_send![self, setObjectValue: objectValue] - } - pub unsafe fn stringValue(&self) -> Option> { - msg_send_id![self, stringValue] - } - pub unsafe fn setStringValue(&self, stringValue: Option<&NSString>) { - msg_send![self, setStringValue: stringValue] - } - pub unsafe fn setStringValue_resolvingEntities(&self, string: &NSString, resolve: bool) { - msg_send![self, setStringValue: string, resolvingEntities: resolve] - } - pub unsafe fn index(&self) -> NSUInteger { - msg_send![self, index] - } - pub unsafe fn level(&self) -> NSUInteger { - msg_send![self, level] - } - pub unsafe fn rootDocument(&self) -> Option> { - msg_send_id![self, rootDocument] - } - pub unsafe fn parent(&self) -> Option> { - msg_send_id![self, parent] - } - pub unsafe fn childCount(&self) -> NSUInteger { - msg_send![self, childCount] - } - pub unsafe fn children(&self) -> Option, Shared>> { - msg_send_id![self, children] - } - pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option> { - msg_send_id![self, childAtIndex: index] - } - pub unsafe fn previousSibling(&self) -> Option> { - msg_send_id![self, previousSibling] - } - pub unsafe fn nextSibling(&self) -> Option> { - msg_send_id![self, nextSibling] - } - pub unsafe fn previousNode(&self) -> Option> { - msg_send_id![self, previousNode] - } - pub unsafe fn nextNode(&self) -> Option> { - msg_send_id![self, nextNode] - } - pub unsafe fn detach(&self) { - msg_send![self, detach] - } - pub unsafe fn XPath(&self) -> Option> { - msg_send_id![self, XPath] - } - pub unsafe fn localName(&self) -> Option> { - msg_send_id![self, localName] - } - pub unsafe fn prefix(&self) -> Option> { - msg_send_id![self, prefix] - } - pub unsafe fn URI(&self) -> Option> { - msg_send_id![self, URI] - } - pub unsafe fn setURI(&self, URI: Option<&NSString>) { - msg_send![self, setURI: URI] - } - pub unsafe fn localNameForName(name: &NSString) -> Id { - msg_send_id![Self::class(), localNameForName: name] - } - pub unsafe fn prefixForName(name: &NSString) -> Option> { - msg_send_id![Self::class(), prefixForName: name] - } + ) -> Id; + # [method_id (commentWithStringValue :)] + pub unsafe fn commentWithStringValue(stringValue: &NSString) -> Id; + # [method_id (textWithStringValue :)] + pub unsafe fn textWithStringValue(stringValue: &NSString) -> Id; + # [method_id (DTDNodeWithXMLString :)] + pub unsafe fn DTDNodeWithXMLString(string: &NSString) -> Option>; + #[method(kind)] + pub unsafe fn kind(&self) -> NSXMLNodeKind; + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + # [method (setName :)] + pub unsafe fn setName(&self, name: Option<&NSString>); + #[method_id(objectValue)] + pub unsafe fn objectValue(&self) -> Option>; + # [method (setObjectValue :)] + pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); + #[method_id(stringValue)] + pub unsafe fn stringValue(&self) -> Option>; + # [method (setStringValue :)] + pub unsafe fn setStringValue(&self, stringValue: Option<&NSString>); + # [method (setStringValue : resolvingEntities :)] + pub unsafe fn setStringValue_resolvingEntities(&self, string: &NSString, resolve: bool); + #[method(index)] + pub unsafe fn index(&self) -> NSUInteger; + #[method(level)] + pub unsafe fn level(&self) -> NSUInteger; + #[method_id(rootDocument)] + pub unsafe fn rootDocument(&self) -> Option>; + #[method_id(parent)] + pub unsafe fn parent(&self) -> Option>; + #[method(childCount)] + pub unsafe fn childCount(&self) -> NSUInteger; + #[method_id(children)] + pub unsafe fn children(&self) -> Option, Shared>>; + # [method_id (childAtIndex :)] + pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option>; + #[method_id(previousSibling)] + pub unsafe fn previousSibling(&self) -> Option>; + #[method_id(nextSibling)] + pub unsafe fn nextSibling(&self) -> Option>; + #[method_id(previousNode)] + pub unsafe fn previousNode(&self) -> Option>; + #[method_id(nextNode)] + pub unsafe fn nextNode(&self) -> Option>; + #[method(detach)] + pub unsafe fn detach(&self); + #[method_id(XPath)] + pub unsafe fn XPath(&self) -> Option>; + #[method_id(localName)] + pub unsafe fn localName(&self) -> Option>; + #[method_id(prefix)] + pub unsafe fn prefix(&self) -> Option>; + #[method_id(URI)] + pub unsafe fn URI(&self) -> Option>; + # [method (setURI :)] + pub unsafe fn setURI(&self, URI: Option<&NSString>); + # [method_id (localNameForName :)] + pub unsafe fn localNameForName(name: &NSString) -> Id; + # [method_id (prefixForName :)] + pub unsafe fn prefixForName(name: &NSString) -> Option>; + # [method_id (predefinedNamespaceForPrefix :)] pub unsafe fn predefinedNamespaceForPrefix( name: &NSString, - ) -> Option> { - msg_send_id![Self::class(), predefinedNamespaceForPrefix: name] - } - pub unsafe fn description(&self) -> Id { - msg_send_id![self, description] - } - pub unsafe fn XMLString(&self) -> Id { - msg_send_id![self, XMLString] - } + ) -> Option>; + #[method_id(description)] + pub unsafe fn description(&self) -> Id; + #[method_id(XMLString)] + pub unsafe fn XMLString(&self) -> Id; + # [method_id (XMLStringWithOptions :)] pub unsafe fn XMLStringWithOptions( &self, options: NSXMLNodeOptions, - ) -> Id { - msg_send_id![self, XMLStringWithOptions: options] - } + ) -> Id; + # [method_id (canonicalXMLStringPreservingComments :)] pub unsafe fn canonicalXMLStringPreservingComments( &self, comments: bool, - ) -> Id { - msg_send_id![self, canonicalXMLStringPreservingComments: comments] - } + ) -> Id; + # [method_id (nodesForXPath : error :)] pub unsafe fn nodesForXPath_error( &self, xpath: &NSString, - ) -> Result, Shared>, Id> { - msg_send_id![self, nodesForXPath: xpath, error: _] - } + ) -> Result, Shared>, Id>; + # [method_id (objectsForXQuery : constants : error :)] pub unsafe fn objectsForXQuery_constants_error( &self, xquery: &NSString, constants: Option<&NSDictionary>, - ) -> Result, Id> { - msg_send_id![ - self, - objectsForXQuery: xquery, - constants: constants, - error: _ - ] - } + ) -> Result, Id>; + # [method_id (objectsForXQuery : error :)] pub unsafe fn objectsForXQuery_error( &self, xquery: &NSString, - ) -> Result, Id> { - msg_send_id![self, objectsForXQuery: xquery, error: _] - } + ) -> Result, Id>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs index 97bb9cbef..5362722ad 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -2,4 +2,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 7c9a83651..313413b66 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -10,7 +10,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; extern_class!( #[derive(Debug)] pub struct NSXMLParser; @@ -20,97 +20,63 @@ extern_class!( ); extern_methods!( unsafe impl NSXMLParser { - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option> { - msg_send_id![self, initWithContentsOfURL: url] - } - pub unsafe fn initWithData(&self, data: &NSData) -> Id { - msg_send_id![self, initWithData: data] - } - pub unsafe fn initWithStream(&self, stream: &NSInputStream) -> Id { - msg_send_id![self, initWithStream: stream] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSXMLParserDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn shouldProcessNamespaces(&self) -> bool { - msg_send![self, shouldProcessNamespaces] - } - pub unsafe fn setShouldProcessNamespaces(&self, shouldProcessNamespaces: bool) { - msg_send![self, setShouldProcessNamespaces: shouldProcessNamespaces] - } - pub unsafe fn shouldReportNamespacePrefixes(&self) -> bool { - msg_send![self, shouldReportNamespacePrefixes] - } - pub unsafe fn setShouldReportNamespacePrefixes(&self, shouldReportNamespacePrefixes: bool) { - msg_send![ - self, - setShouldReportNamespacePrefixes: shouldReportNamespacePrefixes - ] - } + # [method_id (initWithContentsOfURL :)] + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + # [method_id (initWithData :)] + pub unsafe fn initWithData(&self, data: &NSData) -> Id; + # [method_id (initWithStream :)] + pub unsafe fn initWithStream(&self, stream: &NSInputStream) -> Id; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSXMLParserDelegate>); + #[method(shouldProcessNamespaces)] + pub unsafe fn shouldProcessNamespaces(&self) -> bool; + # [method (setShouldProcessNamespaces :)] + pub unsafe fn setShouldProcessNamespaces(&self, shouldProcessNamespaces: bool); + #[method(shouldReportNamespacePrefixes)] + pub unsafe fn shouldReportNamespacePrefixes(&self) -> bool; + # [method (setShouldReportNamespacePrefixes :)] + pub unsafe fn setShouldReportNamespacePrefixes(&self, shouldReportNamespacePrefixes: bool); + #[method(externalEntityResolvingPolicy)] pub unsafe fn externalEntityResolvingPolicy( &self, - ) -> NSXMLParserExternalEntityResolvingPolicy { - msg_send![self, externalEntityResolvingPolicy] - } + ) -> NSXMLParserExternalEntityResolvingPolicy; + # [method (setExternalEntityResolvingPolicy :)] pub unsafe fn setExternalEntityResolvingPolicy( &self, externalEntityResolvingPolicy: NSXMLParserExternalEntityResolvingPolicy, - ) { - msg_send![ - self, - setExternalEntityResolvingPolicy: externalEntityResolvingPolicy - ] - } - pub unsafe fn allowedExternalEntityURLs(&self) -> Option, Shared>> { - msg_send_id![self, allowedExternalEntityURLs] - } + ); + #[method_id(allowedExternalEntityURLs)] + pub unsafe fn allowedExternalEntityURLs(&self) -> Option, Shared>>; + # [method (setAllowedExternalEntityURLs :)] pub unsafe fn setAllowedExternalEntityURLs( &self, allowedExternalEntityURLs: Option<&NSSet>, - ) { - msg_send![ - self, - setAllowedExternalEntityURLs: allowedExternalEntityURLs - ] - } - pub unsafe fn parse(&self) -> bool { - msg_send![self, parse] - } - pub unsafe fn abortParsing(&self) { - msg_send![self, abortParsing] - } - pub unsafe fn parserError(&self) -> Option> { - msg_send_id![self, parserError] - } - pub unsafe fn shouldResolveExternalEntities(&self) -> bool { - msg_send![self, shouldResolveExternalEntities] - } - pub unsafe fn setShouldResolveExternalEntities(&self, shouldResolveExternalEntities: bool) { - msg_send![ - self, - setShouldResolveExternalEntities: shouldResolveExternalEntities - ] - } + ); + #[method(parse)] + pub unsafe fn parse(&self) -> bool; + #[method(abortParsing)] + pub unsafe fn abortParsing(&self); + #[method_id(parserError)] + pub unsafe fn parserError(&self) -> Option>; + #[method(shouldResolveExternalEntities)] + pub unsafe fn shouldResolveExternalEntities(&self) -> bool; + # [method (setShouldResolveExternalEntities :)] + pub unsafe fn setShouldResolveExternalEntities(&self, shouldResolveExternalEntities: bool); } ); extern_methods!( #[doc = "NSXMLParserLocatorAdditions"] unsafe impl NSXMLParser { - pub unsafe fn publicID(&self) -> Option> { - msg_send_id![self, publicID] - } - pub unsafe fn systemID(&self) -> Option> { - msg_send_id![self, systemID] - } - pub unsafe fn lineNumber(&self) -> NSInteger { - msg_send![self, lineNumber] - } - pub unsafe fn columnNumber(&self) -> NSInteger { - msg_send![self, columnNumber] - } + #[method_id(publicID)] + pub unsafe fn publicID(&self) -> Option>; + #[method_id(systemID)] + pub unsafe fn systemID(&self) -> Option>; + #[method(lineNumber)] + pub unsafe fn lineNumber(&self) -> NSInteger; + #[method(columnNumber)] + pub unsafe fn columnNumber(&self) -> NSInteger; } ); pub type NSXMLParserDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 0a911784b..6b37b59bf 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -13,7 +13,7 @@ use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; pub type NSXPCProxyCreating = NSObject; extern_class!( #[derive(Debug)] @@ -24,103 +24,76 @@ extern_class!( ); extern_methods!( unsafe impl NSXPCConnection { - pub unsafe fn initWithServiceName(&self, serviceName: &NSString) -> Id { - msg_send_id![self, initWithServiceName: serviceName] - } - pub unsafe fn serviceName(&self) -> Option> { - msg_send_id![self, serviceName] - } + # [method_id (initWithServiceName :)] + pub unsafe fn initWithServiceName(&self, serviceName: &NSString) -> Id; + #[method_id(serviceName)] + pub unsafe fn serviceName(&self) -> Option>; + # [method_id (initWithMachServiceName : options :)] pub unsafe fn initWithMachServiceName_options( &self, name: &NSString, options: NSXPCConnectionOptions, - ) -> Id { - msg_send_id![self, initWithMachServiceName: name, options: options] - } + ) -> Id; + # [method_id (initWithListenerEndpoint :)] pub unsafe fn initWithListenerEndpoint( &self, endpoint: &NSXPCListenerEndpoint, - ) -> Id { - msg_send_id![self, initWithListenerEndpoint: endpoint] - } - pub unsafe fn endpoint(&self) -> Id { - msg_send_id![self, endpoint] - } - pub unsafe fn exportedInterface(&self) -> Option> { - msg_send_id![self, exportedInterface] - } - pub unsafe fn setExportedInterface(&self, exportedInterface: Option<&NSXPCInterface>) { - msg_send![self, setExportedInterface: exportedInterface] - } - pub unsafe fn exportedObject(&self) -> Option> { - msg_send_id![self, exportedObject] - } - pub unsafe fn setExportedObject(&self, exportedObject: Option<&Object>) { - msg_send![self, setExportedObject: exportedObject] - } - pub unsafe fn remoteObjectInterface(&self) -> Option> { - msg_send_id![self, remoteObjectInterface] - } + ) -> Id; + #[method_id(endpoint)] + pub unsafe fn endpoint(&self) -> Id; + #[method_id(exportedInterface)] + pub unsafe fn exportedInterface(&self) -> Option>; + # [method (setExportedInterface :)] + pub unsafe fn setExportedInterface(&self, exportedInterface: Option<&NSXPCInterface>); + #[method_id(exportedObject)] + pub unsafe fn exportedObject(&self) -> Option>; + # [method (setExportedObject :)] + pub unsafe fn setExportedObject(&self, exportedObject: Option<&Object>); + #[method_id(remoteObjectInterface)] + pub unsafe fn remoteObjectInterface(&self) -> Option>; + # [method (setRemoteObjectInterface :)] pub unsafe fn setRemoteObjectInterface( &self, remoteObjectInterface: Option<&NSXPCInterface>, - ) { - msg_send![self, setRemoteObjectInterface: remoteObjectInterface] - } - pub unsafe fn remoteObjectProxy(&self) -> Id { - msg_send_id![self, remoteObjectProxy] - } + ); + #[method_id(remoteObjectProxy)] + pub unsafe fn remoteObjectProxy(&self) -> Id; + # [method_id (remoteObjectProxyWithErrorHandler :)] pub unsafe fn remoteObjectProxyWithErrorHandler( &self, handler: TodoBlock, - ) -> Id { - msg_send_id![self, remoteObjectProxyWithErrorHandler: handler] - } + ) -> Id; + # [method_id (synchronousRemoteObjectProxyWithErrorHandler :)] pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( &self, handler: TodoBlock, - ) -> Id { - msg_send_id![self, synchronousRemoteObjectProxyWithErrorHandler: handler] - } - pub unsafe fn interruptionHandler(&self) -> TodoBlock { - msg_send![self, interruptionHandler] - } - pub unsafe fn setInterruptionHandler(&self, interruptionHandler: TodoBlock) { - msg_send![self, setInterruptionHandler: interruptionHandler] - } - pub unsafe fn invalidationHandler(&self) -> TodoBlock { - msg_send![self, invalidationHandler] - } - pub unsafe fn setInvalidationHandler(&self, invalidationHandler: TodoBlock) { - msg_send![self, setInvalidationHandler: invalidationHandler] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn suspend(&self) { - msg_send![self, suspend] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } - pub unsafe fn auditSessionIdentifier(&self) -> au_asid_t { - msg_send![self, auditSessionIdentifier] - } - pub unsafe fn processIdentifier(&self) -> pid_t { - msg_send![self, processIdentifier] - } - pub unsafe fn effectiveUserIdentifier(&self) -> uid_t { - msg_send![self, effectiveUserIdentifier] - } - pub unsafe fn effectiveGroupIdentifier(&self) -> gid_t { - msg_send![self, effectiveGroupIdentifier] - } - pub unsafe fn currentConnection() -> Option> { - msg_send_id![Self::class(), currentConnection] - } - pub unsafe fn scheduleSendBarrierBlock(&self, block: TodoBlock) { - msg_send![self, scheduleSendBarrierBlock: block] - } + ) -> Id; + #[method(interruptionHandler)] + pub unsafe fn interruptionHandler(&self) -> TodoBlock; + # [method (setInterruptionHandler :)] + pub unsafe fn setInterruptionHandler(&self, interruptionHandler: TodoBlock); + #[method(invalidationHandler)] + pub unsafe fn invalidationHandler(&self) -> TodoBlock; + # [method (setInvalidationHandler :)] + pub unsafe fn setInvalidationHandler(&self, invalidationHandler: TodoBlock); + #[method(resume)] + pub unsafe fn resume(&self); + #[method(suspend)] + pub unsafe fn suspend(&self); + #[method(invalidate)] + pub unsafe fn invalidate(&self); + #[method(auditSessionIdentifier)] + pub unsafe fn auditSessionIdentifier(&self) -> au_asid_t; + #[method(processIdentifier)] + pub unsafe fn processIdentifier(&self) -> pid_t; + #[method(effectiveUserIdentifier)] + pub unsafe fn effectiveUserIdentifier(&self) -> uid_t; + #[method(effectiveGroupIdentifier)] + pub unsafe fn effectiveGroupIdentifier(&self) -> gid_t; + #[method_id(currentConnection)] + pub unsafe fn currentConnection() -> Option>; + # [method (scheduleSendBarrierBlock :)] + pub unsafe fn scheduleSendBarrierBlock(&self, block: TodoBlock); } ); extern_class!( @@ -132,33 +105,24 @@ extern_class!( ); extern_methods!( unsafe impl NSXPCListener { - pub unsafe fn serviceListener() -> Id { - msg_send_id![Self::class(), serviceListener] - } - pub unsafe fn anonymousListener() -> Id { - msg_send_id![Self::class(), anonymousListener] - } - pub unsafe fn initWithMachServiceName(&self, name: &NSString) -> Id { - msg_send_id![self, initWithMachServiceName: name] - } - pub unsafe fn delegate(&self) -> Option> { - msg_send_id![self, delegate] - } - pub unsafe fn setDelegate(&self, delegate: Option<&NSXPCListenerDelegate>) { - msg_send![self, setDelegate: delegate] - } - pub unsafe fn endpoint(&self) -> Id { - msg_send_id![self, endpoint] - } - pub unsafe fn resume(&self) { - msg_send![self, resume] - } - pub unsafe fn suspend(&self) { - msg_send![self, suspend] - } - pub unsafe fn invalidate(&self) { - msg_send![self, invalidate] - } + #[method_id(serviceListener)] + pub unsafe fn serviceListener() -> Id; + #[method_id(anonymousListener)] + pub unsafe fn anonymousListener() -> Id; + # [method_id (initWithMachServiceName :)] + pub unsafe fn initWithMachServiceName(&self, name: &NSString) -> Id; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + # [method (setDelegate :)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSXPCListenerDelegate>); + #[method_id(endpoint)] + pub unsafe fn endpoint(&self) -> Id; + #[method(resume)] + pub unsafe fn resume(&self); + #[method(suspend)] + pub unsafe fn suspend(&self); + #[method(invalidate)] + pub unsafe fn invalidate(&self); } ); pub type NSXPCListenerDelegate = NSObject; @@ -171,99 +135,57 @@ extern_class!( ); extern_methods!( unsafe impl NSXPCInterface { - pub unsafe fn interfaceWithProtocol(protocol: &Protocol) -> Id { - msg_send_id![Self::class(), interfaceWithProtocol: protocol] - } - pub unsafe fn protocol(&self) -> Id { - msg_send_id![self, protocol] - } - pub unsafe fn setProtocol(&self, protocol: &Protocol) { - msg_send![self, setProtocol: protocol] - } + # [method_id (interfaceWithProtocol :)] + pub unsafe fn interfaceWithProtocol(protocol: &Protocol) -> Id; + #[method_id(protocol)] + pub unsafe fn protocol(&self) -> Id; + # [method (setProtocol :)] + pub unsafe fn setProtocol(&self, protocol: &Protocol); + # [method (setClasses : forSelector : argumentIndex : ofReply :)] pub unsafe fn setClasses_forSelector_argumentIndex_ofReply( &self, classes: &NSSet, sel: Sel, arg: NSUInteger, ofReply: bool, - ) { - msg_send![ - self, - setClasses: classes, - forSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } + ); + # [method_id (classesForSelector : argumentIndex : ofReply :)] pub unsafe fn classesForSelector_argumentIndex_ofReply( &self, sel: Sel, arg: NSUInteger, ofReply: bool, - ) -> Id, Shared> { - msg_send_id![ - self, - classesForSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } + ) -> Id, Shared>; + # [method (setInterface : forSelector : argumentIndex : ofReply :)] pub unsafe fn setInterface_forSelector_argumentIndex_ofReply( &self, ifc: &NSXPCInterface, sel: Sel, arg: NSUInteger, ofReply: bool, - ) { - msg_send![ - self, - setInterface: ifc, - forSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } + ); + # [method_id (interfaceForSelector : argumentIndex : ofReply :)] pub unsafe fn interfaceForSelector_argumentIndex_ofReply( &self, sel: Sel, arg: NSUInteger, ofReply: bool, - ) -> Option> { - msg_send_id![ - self, - interfaceForSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } + ) -> Option>; + # [method (setXPCType : forSelector : argumentIndex : ofReply :)] pub unsafe fn setXPCType_forSelector_argumentIndex_ofReply( &self, type_: xpc_type_t, sel: Sel, arg: NSUInteger, ofReply: bool, - ) { - msg_send![ - self, - setXPCType: type_, - forSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } + ); + # [method (XPCTypeForSelector : argumentIndex : ofReply :)] pub unsafe fn XPCTypeForSelector_argumentIndex_ofReply( &self, sel: Sel, arg: NSUInteger, ofReply: bool, - ) -> xpc_type_t { - msg_send![ - self, - XPCTypeForSelector: sel, - argumentIndex: arg, - ofReply: ofReply - ] - } + ) -> xpc_type_t; } ); extern_class!( @@ -285,24 +207,19 @@ extern_class!( ); extern_methods!( unsafe impl NSXPCCoder { - pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: &xpc_object_t, key: &NSString) { - msg_send![self, encodeXPCObject: xpcObject, forKey: key] - } + # [method (encodeXPCObject : forKey :)] + pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: &xpc_object_t, key: &NSString); + # [method_id (decodeXPCObjectOfType : forKey :)] pub unsafe fn decodeXPCObjectOfType_forKey( &self, type_: xpc_type_t, key: &NSString, - ) -> Option> { - msg_send_id![self, decodeXPCObjectOfType: type_, forKey: key] - } - pub unsafe fn userInfo(&self) -> Option> { - msg_send_id![self, userInfo] - } - pub unsafe fn setUserInfo(&self, userInfo: Option<&NSObject>) { - msg_send![self, setUserInfo: userInfo] - } - pub unsafe fn connection(&self) -> Option> { - msg_send_id![self, connection] - } + ) -> Option>; + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + # [method (setUserInfo :)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSObject>); + #[method_id(connection)] + pub unsafe fn connection(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index 3df022269..d7522e9d6 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -4,4 +4,4 @@ use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, msg_send, msg_send_id, ClassType}; +use objc2::{extern_class, extern_methods, ClassType}; From d197f00aed86d8a298879442a55e9baeb484f1cf Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 9 Oct 2022 03:17:51 +0200 Subject: [PATCH 066/131] Manually fix the formatting of attribute macros in extern_methods! --- crates/header-translator/Cargo.toml | 2 + crates/header-translator/src/lib.rs | 52 ++++- .../generated/Foundation/NSAffineTransform.rs | 22 +- .../Foundation/NSAppleEventDescriptor.rs | 62 ++--- .../Foundation/NSAppleEventManager.rs | 14 +- .../src/generated/Foundation/NSAppleScript.rs | 10 +- .../src/generated/Foundation/NSArchiver.rs | 36 +-- .../src/generated/Foundation/NSArray.rs | 174 +++++++------- .../Foundation/NSAttributedString.rs | 84 +++---- .../generated/Foundation/NSAutoreleasePool.rs | 4 +- .../NSBackgroundActivityScheduler.rs | 12 +- .../src/generated/Foundation/NSBundle.rs | 76 +++--- .../Foundation/NSByteCountFormatter.rs | 28 +-- .../src/generated/Foundation/NSCache.rs | 18 +- .../src/generated/Foundation/NSCalendar.rs | 124 +++++----- .../generated/Foundation/NSCalendarDate.rs | 40 ++-- .../generated/Foundation/NSCharacterSet.rs | 38 +-- .../Foundation/NSClassDescription.rs | 8 +- .../src/generated/Foundation/NSCoder.rs | 90 ++++---- .../Foundation/NSComparisonPredicate.rs | 10 +- .../Foundation/NSCompoundPredicate.rs | 10 +- .../src/generated/Foundation/NSConnection.rs | 42 ++-- .../icrate/src/generated/Foundation/NSData.rs | 92 ++++---- .../icrate/src/generated/Foundation/NSDate.rs | 30 +-- .../Foundation/NSDateComponentsFormatter.rs | 34 +-- .../generated/Foundation/NSDateFormatter.rs | 84 +++---- .../generated/Foundation/NSDateInterval.rs | 16 +- .../Foundation/NSDateIntervalFormatter.rs | 16 +- .../generated/Foundation/NSDecimalNumber.rs | 50 ++-- .../src/generated/Foundation/NSDictionary.rs | 100 ++++---- .../generated/Foundation/NSDistantObject.rs | 12 +- .../generated/Foundation/NSDistributedLock.rs | 4 +- .../NSDistributedNotificationCenter.rs | 18 +- .../generated/Foundation/NSEnergyFormatter.rs | 16 +- .../src/generated/Foundation/NSError.rs | 12 +- .../src/generated/Foundation/NSException.rs | 6 +- .../src/generated/Foundation/NSExpression.rs | 34 +-- .../Foundation/NSExtensionContext.rs | 6 +- .../generated/Foundation/NSExtensionItem.rs | 8 +- .../generated/Foundation/NSFileCoordinator.rs | 30 +-- .../src/generated/Foundation/NSFileHandle.rs | 56 ++--- .../src/generated/Foundation/NSFileManager.rs | 136 +++++------ .../src/generated/Foundation/NSFileVersion.rs | 24 +- .../src/generated/Foundation/NSFileWrapper.rs | 46 ++-- .../src/generated/Foundation/NSFormatter.rs | 12 +- .../Foundation/NSGarbageCollector.rs | 4 +- .../src/generated/Foundation/NSGeometry.rs | 26 +-- .../src/generated/Foundation/NSHTTPCookie.rs | 8 +- .../Foundation/NSHTTPCookieStorage.rs | 20 +- .../src/generated/Foundation/NSHashTable.rs | 26 +-- .../icrate/src/generated/Foundation/NSHost.rs | 8 +- .../Foundation/NSISO8601DateFormatter.rs | 10 +- .../src/generated/Foundation/NSIndexPath.rs | 18 +- .../src/generated/Foundation/NSIndexSet.rs | 70 +++--- .../generated/Foundation/NSInflectionRule.rs | 4 +- .../src/generated/Foundation/NSInvocation.rs | 16 +- .../generated/Foundation/NSItemProvider.rs | 34 +-- .../Foundation/NSJSONSerialization.rs | 8 +- .../generated/Foundation/NSKeyValueCoding.rs | 68 +++--- .../Foundation/NSKeyValueObserving.rs | 52 ++--- .../generated/Foundation/NSKeyedArchiver.rs | 90 ++++---- .../generated/Foundation/NSLengthFormatter.rs | 16 +- .../Foundation/NSLinguisticTagger.rs | 44 ++-- .../generated/Foundation/NSListFormatter.rs | 10 +- .../src/generated/Foundation/NSLocale.rs | 44 ++-- .../icrate/src/generated/Foundation/NSLock.rs | 26 +-- .../src/generated/Foundation/NSMapTable.rs | 12 +- .../generated/Foundation/NSMassFormatter.rs | 16 +- .../src/generated/Foundation/NSMeasurement.rs | 10 +- .../Foundation/NSMeasurementFormatter.rs | 12 +- .../src/generated/Foundation/NSMetadata.rs | 36 +-- .../generated/Foundation/NSMethodSignature.rs | 4 +- .../src/generated/Foundation/NSMorphology.rs | 24 +- .../src/generated/Foundation/NSNetServices.rs | 32 +-- .../generated/Foundation/NSNotification.rs | 22 +- .../Foundation/NSNotificationQueue.rs | 8 +- .../generated/Foundation/NSNumberFormatter.rs | 140 ++++++------ .../src/generated/Foundation/NSObject.rs | 6 +- .../generated/Foundation/NSObjectScripting.rs | 8 +- .../src/generated/Foundation/NSOperation.rs | 40 ++-- .../Foundation/NSOrderedCollectionChange.rs | 8 +- .../NSOrderedCollectionDifference.rs | 8 +- .../src/generated/Foundation/NSOrderedSet.rs | 156 ++++++------- .../src/generated/Foundation/NSOrthography.rs | 12 +- .../generated/Foundation/NSPathUtilities.rs | 14 +- .../Foundation/NSPersonNameComponents.rs | 14 +- .../NSPersonNameComponentsFormatter.rs | 16 +- .../generated/Foundation/NSPointerArray.rs | 20 +- .../Foundation/NSPointerFunctions.rs | 20 +- .../icrate/src/generated/Foundation/NSPort.rs | 38 +-- .../src/generated/Foundation/NSPortCoder.rs | 8 +- .../src/generated/Foundation/NSPortMessage.rs | 6 +- .../generated/Foundation/NSPortNameServer.rs | 34 +-- .../src/generated/Foundation/NSPredicate.rs | 28 +-- .../src/generated/Foundation/NSProcessInfo.rs | 18 +- .../src/generated/Foundation/NSProgress.rs | 52 ++--- .../generated/Foundation/NSPropertyList.rs | 8 +- .../generated/Foundation/NSProtocolChecker.rs | 4 +- .../src/generated/Foundation/NSProxy.rs | 8 +- .../src/generated/Foundation/NSRange.rs | 2 +- .../Foundation/NSRegularExpression.rs | 28 +-- .../Foundation/NSRelativeDateTimeFormatter.rs | 18 +- .../src/generated/Foundation/NSRunLoop.rs | 32 +-- .../src/generated/Foundation/NSScanner.rs | 42 ++-- .../Foundation/NSScriptClassDescription.rs | 30 +-- .../Foundation/NSScriptCoercionHandler.rs | 4 +- .../generated/Foundation/NSScriptCommand.rs | 20 +- .../Foundation/NSScriptCommandDescription.rs | 12 +- .../Foundation/NSScriptExecutionContext.rs | 6 +- .../Foundation/NSScriptKeyValueCoding.rs | 16 +- .../Foundation/NSScriptObjectSpecifiers.rs | 78 +++---- .../NSScriptStandardSuiteCommands.rs | 8 +- .../Foundation/NSScriptSuiteRegistry.rs | 26 +-- .../Foundation/NSScriptWhoseTests.rs | 46 ++-- .../icrate/src/generated/Foundation/NSSet.rs | 80 +++---- .../generated/Foundation/NSSortDescriptor.rs | 26 +-- .../src/generated/Foundation/NSSpellServer.rs | 6 +- .../src/generated/Foundation/NSStream.rs | 46 ++-- .../src/generated/Foundation/NSString.rs | 216 +++++++++--------- .../icrate/src/generated/Foundation/NSTask.rs | 28 +-- .../Foundation/NSTextCheckingResult.rs | 36 +-- .../src/generated/Foundation/NSThread.rs | 32 +-- .../src/generated/Foundation/NSTimeZone.rs | 30 +-- .../src/generated/Foundation/NSTimer.rs | 20 +- .../icrate/src/generated/Foundation/NSURL.rs | 156 ++++++------- .../NSURLAuthenticationChallenge.rs | 4 +- .../src/generated/Foundation/NSURLCache.rs | 28 +-- .../generated/Foundation/NSURLConnection.rs | 18 +- .../generated/Foundation/NSURLCredential.rs | 12 +- .../Foundation/NSURLCredentialStorage.rs | 22 +- .../src/generated/Foundation/NSURLDownload.rs | 10 +- .../src/generated/Foundation/NSURLHandle.rs | 26 +-- .../Foundation/NSURLProtectionSpace.rs | 4 +- .../src/generated/Foundation/NSURLProtocol.rs | 22 +- .../src/generated/Foundation/NSURLRequest.rs | 44 ++-- .../src/generated/Foundation/NSURLResponse.rs | 8 +- .../src/generated/Foundation/NSURLSession.rs | 146 ++++++------ .../icrate/src/generated/Foundation/NSUUID.rs | 8 +- .../Foundation/NSUbiquitousKeyValueStore.rs | 34 +-- .../src/generated/Foundation/NSUndoManager.rs | 22 +- .../icrate/src/generated/Foundation/NSUnit.rs | 14 +- .../generated/Foundation/NSUserActivity.rs | 42 ++-- .../generated/Foundation/NSUserDefaults.rs | 62 ++--- .../Foundation/NSUserNotification.rs | 46 ++-- .../generated/Foundation/NSUserScriptTask.rs | 18 +- .../src/generated/Foundation/NSValue.rs | 86 +++---- .../Foundation/NSValueTransformer.rs | 8 +- .../src/generated/Foundation/NSXMLDTD.rs | 32 +-- .../src/generated/Foundation/NSXMLDTDNode.rs | 12 +- .../src/generated/Foundation/NSXMLDocument.rs | 46 ++-- .../src/generated/Foundation/NSXMLElement.rs | 54 ++--- .../src/generated/Foundation/NSXMLNode.rs | 56 ++--- .../src/generated/Foundation/NSXMLParser.rs | 18 +- .../generated/Foundation/NSXPCConnection.rs | 48 ++-- 154 files changed, 2644 insertions(+), 2592 deletions(-) diff --git a/crates/header-translator/Cargo.toml b/crates/header-translator/Cargo.toml index 8ce4386d5..743379fa1 100644 --- a/crates/header-translator/Cargo.toml +++ b/crates/header-translator/Cargo.toml @@ -14,3 +14,5 @@ quote = "1.0" proc-macro2 = "1.0" toml = "0.5.9" serde = { version = "1.0.144", features = ["derive"] } +regex = { version = "1.6" } +lazy_static = { version = "1.4.0" } diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index bc9db61ed..f1e04dc84 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -68,6 +68,26 @@ impl RustFile { } } +pub fn format_method_macro(code: &[u8]) -> Vec { + use regex::bytes::{Captures, Regex}; + use std::str; + + lazy_static::lazy_static! { + static ref RE: Regex = Regex::new(r"# ?\[ ?(method_id|method) ?\((([a-zA-Z_]+ ?: ?)+)\) ?\]").unwrap(); + } + + RE.replace_all(code, |caps: &Captures| { + let method = str::from_utf8(caps.get(1).unwrap().as_bytes()) + .unwrap() + .replace(" ", ""); + let selector = str::from_utf8(caps.get(2).unwrap().as_bytes()) + .unwrap() + .replace(" ", ""); + format!("#[{method}({selector})]") + }) + .to_vec() +} + pub fn run_cargo_fmt() { let status = Command::new("cargo") .args(["fmt", "--package=icrate"]) @@ -98,5 +118,35 @@ pub fn run_rustfmt(tokens: TokenStream) -> Vec { panic!("failed running rustfmt with exit code {}", output.status) } - output.stdout + format_method_macro(&output.stdout) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_format_method_macro() { + fn assert_returns(input: &str, expected_output: &str) { + let output = format_method_macro(input.as_bytes()); + assert_eq!(output, expected_output.as_bytes()); + + // Check that running it through twice doesn't change the output + let output = format_method_macro(&output); + assert_eq!(output, expected_output.as_bytes()); + } + + assert_returns( + "# [method_id (descriptorWithDescriptorType : bytes : length :)]", + "#[method_id(descriptorWithDescriptorType:bytes:length:)]", + ); + assert_returns( + "# [method (insertDescriptor : atIndex :)]", + "#[method(insertDescriptor:atIndex:)]", + ); + assert_returns( + "# [method_id (descriptorAtIndex :)]", + "#[method_id(descriptorAtIndex:)]", + ); + } } diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index faee75951..49756ec68 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -16,33 +16,33 @@ extern_methods!( unsafe impl NSAffineTransform { #[method_id(transform)] pub unsafe fn transform() -> Id; - # [method_id (initWithTransform :)] + #[method_id(initWithTransform:)] pub unsafe fn initWithTransform(&self, transform: &NSAffineTransform) -> Id; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method (translateXBy : yBy :)] + #[method(translateXBy:yBy:)] pub unsafe fn translateXBy_yBy(&self, deltaX: CGFloat, deltaY: CGFloat); - # [method (rotateByDegrees :)] + #[method(rotateByDegrees:)] pub unsafe fn rotateByDegrees(&self, angle: CGFloat); - # [method (rotateByRadians :)] + #[method(rotateByRadians:)] pub unsafe fn rotateByRadians(&self, angle: CGFloat); - # [method (scaleBy :)] + #[method(scaleBy:)] pub unsafe fn scaleBy(&self, scale: CGFloat); - # [method (scaleXBy : yBy :)] + #[method(scaleXBy:yBy:)] pub unsafe fn scaleXBy_yBy(&self, scaleX: CGFloat, scaleY: CGFloat); #[method(invert)] pub unsafe fn invert(&self); - # [method (appendTransform :)] + #[method(appendTransform:)] pub unsafe fn appendTransform(&self, transform: &NSAffineTransform); - # [method (prependTransform :)] + #[method(prependTransform:)] pub unsafe fn prependTransform(&self, transform: &NSAffineTransform); - # [method (transformPoint :)] + #[method(transformPoint:)] pub unsafe fn transformPoint(&self, aPoint: NSPoint) -> NSPoint; - # [method (transformSize :)] + #[method(transformSize:)] pub unsafe fn transformSize(&self, aSize: NSSize) -> NSSize; #[method(transformStruct)] pub unsafe fn transformStruct(&self) -> NSAffineTransformStruct; - # [method (setTransformStruct :)] + #[method(setTransformStruct:)] pub unsafe fn setTransformStruct(&self, transformStruct: NSAffineTransformStruct); } ); diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 884a6f454..3060e0fb0 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -17,42 +17,42 @@ extern_methods!( unsafe impl NSAppleEventDescriptor { #[method_id(nullDescriptor)] pub unsafe fn nullDescriptor() -> Id; - # [method_id (descriptorWithDescriptorType : bytes : length :)] + #[method_id(descriptorWithDescriptorType:bytes:length:)] pub unsafe fn descriptorWithDescriptorType_bytes_length( descriptorType: DescType, bytes: *mut c_void, byteCount: NSUInteger, ) -> Option>; - # [method_id (descriptorWithDescriptorType : data :)] + #[method_id(descriptorWithDescriptorType:data:)] pub unsafe fn descriptorWithDescriptorType_data( descriptorType: DescType, data: Option<&NSData>, ) -> Option>; - # [method_id (descriptorWithBoolean :)] + #[method_id(descriptorWithBoolean:)] pub unsafe fn descriptorWithBoolean(boolean: Boolean) -> Id; - # [method_id (descriptorWithEnumCode :)] + #[method_id(descriptorWithEnumCode:)] pub unsafe fn descriptorWithEnumCode( enumerator: OSType, ) -> Id; # [method_id (descriptorWithInt32 :)] pub unsafe fn descriptorWithInt32(signedInt: SInt32) -> Id; - # [method_id (descriptorWithDouble :)] + #[method_id(descriptorWithDouble:)] pub unsafe fn descriptorWithDouble( doubleValue: c_double, ) -> Id; - # [method_id (descriptorWithTypeCode :)] + #[method_id(descriptorWithTypeCode:)] pub unsafe fn descriptorWithTypeCode( typeCode: OSType, ) -> Id; - # [method_id (descriptorWithString :)] + #[method_id(descriptorWithString:)] pub unsafe fn descriptorWithString(string: &NSString) -> Id; - # [method_id (descriptorWithDate :)] + #[method_id(descriptorWithDate:)] pub unsafe fn descriptorWithDate(date: &NSDate) -> Id; - # [method_id (descriptorWithFileURL :)] + #[method_id(descriptorWithFileURL:)] pub unsafe fn descriptorWithFileURL(fileURL: &NSURL) -> Id; - # [method_id (appleEventWithEventClass : eventID : targetDescriptor : returnID : transactionID :)] + #[method_id(appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] pub unsafe fn appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID( eventClass: AEEventClass, eventID: AEEventID, @@ -66,34 +66,34 @@ extern_methods!( pub unsafe fn recordDescriptor() -> Id; #[method_id(currentProcessDescriptor)] pub unsafe fn currentProcessDescriptor() -> Id; - # [method_id (descriptorWithProcessIdentifier :)] + #[method_id(descriptorWithProcessIdentifier:)] pub unsafe fn descriptorWithProcessIdentifier( processIdentifier: pid_t, ) -> Id; - # [method_id (descriptorWithBundleIdentifier :)] + #[method_id(descriptorWithBundleIdentifier:)] pub unsafe fn descriptorWithBundleIdentifier( bundleIdentifier: &NSString, ) -> Id; - # [method_id (descriptorWithApplicationURL :)] + #[method_id(descriptorWithApplicationURL:)] pub unsafe fn descriptorWithApplicationURL( applicationURL: &NSURL, ) -> Id; - # [method_id (initWithAEDescNoCopy :)] + #[method_id(initWithAEDescNoCopy:)] pub unsafe fn initWithAEDescNoCopy(&self, aeDesc: NonNull) -> Id; - # [method_id (initWithDescriptorType : bytes : length :)] + #[method_id(initWithDescriptorType:bytes:length:)] pub unsafe fn initWithDescriptorType_bytes_length( &self, descriptorType: DescType, bytes: *mut c_void, byteCount: NSUInteger, ) -> Option>; - # [method_id (initWithDescriptorType : data :)] + #[method_id(initWithDescriptorType:data:)] pub unsafe fn initWithDescriptorType_data( &self, descriptorType: DescType, data: Option<&NSData>, ) -> Option>; - # [method_id (initWithEventClass : eventID : targetDescriptor : returnID : transactionID :)] + #[method_id(initWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] pub unsafe fn initWithEventClass_eventID_targetDescriptor_returnID_transactionID( &self, eventClass: AEEventClass, @@ -136,31 +136,31 @@ extern_methods!( pub unsafe fn returnID(&self) -> AEReturnID; #[method(transactionID)] pub unsafe fn transactionID(&self) -> AETransactionID; - # [method (setParamDescriptor : forKeyword :)] + #[method(setParamDescriptor:forKeyword:)] pub unsafe fn setParamDescriptor_forKeyword( &self, descriptor: &NSAppleEventDescriptor, keyword: AEKeyword, ); - # [method_id (paramDescriptorForKeyword :)] + #[method_id(paramDescriptorForKeyword:)] pub unsafe fn paramDescriptorForKeyword( &self, keyword: AEKeyword, ) -> Option>; - # [method (removeParamDescriptorWithKeyword :)] + #[method(removeParamDescriptorWithKeyword:)] pub unsafe fn removeParamDescriptorWithKeyword(&self, keyword: AEKeyword); - # [method (setAttributeDescriptor : forKeyword :)] + #[method(setAttributeDescriptor:forKeyword:)] pub unsafe fn setAttributeDescriptor_forKeyword( &self, descriptor: &NSAppleEventDescriptor, keyword: AEKeyword, ); - # [method_id (attributeDescriptorForKeyword :)] + #[method_id(attributeDescriptorForKeyword:)] pub unsafe fn attributeDescriptorForKeyword( &self, keyword: AEKeyword, ) -> Option>; - # [method_id (sendEventWithOptions : timeout : error :)] + #[method_id(sendEventWithOptions:timeout:error:)] pub unsafe fn sendEventWithOptions_timeout_error( &self, sendOptions: NSAppleEventSendOptions, @@ -170,35 +170,35 @@ extern_methods!( pub unsafe fn isRecordDescriptor(&self) -> bool; #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; - # [method (insertDescriptor : atIndex :)] + #[method(insertDescriptor:atIndex:)] pub unsafe fn insertDescriptor_atIndex( &self, descriptor: &NSAppleEventDescriptor, index: NSInteger, ); - # [method_id (descriptorAtIndex :)] + #[method_id(descriptorAtIndex:)] pub unsafe fn descriptorAtIndex( &self, index: NSInteger, ) -> Option>; - # [method (removeDescriptorAtIndex :)] + #[method(removeDescriptorAtIndex:)] pub unsafe fn removeDescriptorAtIndex(&self, index: NSInteger); - # [method (setDescriptor : forKeyword :)] + #[method(setDescriptor:forKeyword:)] pub unsafe fn setDescriptor_forKeyword( &self, descriptor: &NSAppleEventDescriptor, keyword: AEKeyword, ); - # [method_id (descriptorForKeyword :)] + #[method_id(descriptorForKeyword:)] pub unsafe fn descriptorForKeyword( &self, keyword: AEKeyword, ) -> Option>; - # [method (removeDescriptorWithKeyword :)] + #[method(removeDescriptorWithKeyword:)] pub unsafe fn removeDescriptorWithKeyword(&self, keyword: AEKeyword); - # [method (keywordForDescriptorAtIndex :)] + #[method(keywordForDescriptorAtIndex:)] pub unsafe fn keywordForDescriptorAtIndex(&self, index: NSInteger) -> AEKeyword; - # [method_id (coerceToDescriptorType :)] + #[method_id(coerceToDescriptorType:)] pub unsafe fn coerceToDescriptorType( &self, descriptorType: DescType, diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index 4659c2fa7..776b79ac2 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -17,7 +17,7 @@ extern_methods!( unsafe impl NSAppleEventManager { #[method_id(sharedAppleEventManager)] pub unsafe fn sharedAppleEventManager() -> Id; - # [method (setEventHandler : andSelector : forEventClass : andEventID :)] + #[method(setEventHandler:andSelector:forEventClass:andEventID:)] pub unsafe fn setEventHandler_andSelector_forEventClass_andEventID( &self, handler: &Object, @@ -25,13 +25,13 @@ extern_methods!( eventClass: AEEventClass, eventID: AEEventID, ); - # [method (removeEventHandlerForEventClass : andEventID :)] + #[method(removeEventHandlerForEventClass:andEventID:)] pub unsafe fn removeEventHandlerForEventClass_andEventID( &self, eventClass: AEEventClass, eventID: AEEventID, ); - # [method (dispatchRawAppleEvent : withRawReply : handlerRefCon :)] + #[method(dispatchRawAppleEvent:withRawReply:handlerRefCon:)] pub unsafe fn dispatchRawAppleEvent_withRawReply_handlerRefCon( &self, theAppleEvent: NonNull, @@ -44,22 +44,22 @@ extern_methods!( pub unsafe fn currentReplyAppleEvent(&self) -> Option>; #[method(suspendCurrentAppleEvent)] pub unsafe fn suspendCurrentAppleEvent(&self) -> NSAppleEventManagerSuspensionID; - # [method_id (appleEventForSuspensionID :)] + #[method_id(appleEventForSuspensionID:)] pub unsafe fn appleEventForSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, ) -> Id; - # [method_id (replyAppleEventForSuspensionID :)] + #[method_id(replyAppleEventForSuspensionID:)] pub unsafe fn replyAppleEventForSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, ) -> Id; - # [method (setCurrentAppleEventAndReplyEventWithSuspensionID :)] + #[method(setCurrentAppleEventAndReplyEventWithSuspensionID:)] pub unsafe fn setCurrentAppleEventAndReplyEventWithSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, ); - # [method (resumeWithSuspensionID :)] + #[method(resumeWithSuspensionID:)] pub unsafe fn resumeWithSuspensionID(&self, suspensionID: NSAppleEventManagerSuspensionID); } ); diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index 06d417f84..c295fb632 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -16,29 +16,29 @@ extern_class!( ); extern_methods!( unsafe impl NSAppleScript { - # [method_id (initWithContentsOfURL : error :)] + #[method_id(initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, errorInfo: Option<&mut Option, Shared>>>, ) -> Option>; - # [method_id (initWithSource :)] + #[method_id(initWithSource:)] pub unsafe fn initWithSource(&self, source: &NSString) -> Option>; #[method_id(source)] pub unsafe fn source(&self) -> Option>; #[method(isCompiled)] pub unsafe fn isCompiled(&self) -> bool; - # [method (compileAndReturnError :)] + #[method(compileAndReturnError:)] pub unsafe fn compileAndReturnError( &self, errorInfo: Option<&mut Option, Shared>>>, ) -> bool; - # [method_id (executeAndReturnError :)] + #[method_id(executeAndReturnError:)] pub unsafe fn executeAndReturnError( &self, errorInfo: Option<&mut Option, Shared>>>, ) -> Id; - # [method_id (executeAppleEvent : error :)] + #[method_id(executeAppleEvent:error:)] pub unsafe fn executeAppleEvent_error( &self, event: &NSAppleEventDescriptor, diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 8c96f192b..0e89d2e58 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -18,33 +18,33 @@ extern_class!( ); extern_methods!( unsafe impl NSArchiver { - # [method_id (initForWritingWithMutableData :)] + #[method_id(initForWritingWithMutableData:)] pub unsafe fn initForWritingWithMutableData( &self, mdata: &NSMutableData, ) -> Id; #[method_id(archiverData)] pub unsafe fn archiverData(&self) -> Id; - # [method (encodeRootObject :)] + #[method(encodeRootObject:)] pub unsafe fn encodeRootObject(&self, rootObject: &Object); - # [method (encodeConditionalObject :)] + #[method(encodeConditionalObject:)] pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>); - # [method_id (archivedDataWithRootObject :)] + #[method_id(archivedDataWithRootObject:)] pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id; - # [method (archiveRootObject : toFile :)] + #[method(archiveRootObject:toFile:)] pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool; - # [method (encodeClassName : intoClassName :)] + #[method(encodeClassName:intoClassName:)] pub unsafe fn encodeClassName_intoClassName( &self, trueName: &NSString, inArchiveName: &NSString, ); - # [method_id (classNameEncodedForTrueClassName :)] + #[method_id(classNameEncodedForTrueClassName:)] pub unsafe fn classNameEncodedForTrueClassName( &self, trueName: &NSString, ) -> Option>; - # [method (replaceObject : withObject :)] + #[method(replaceObject:withObject:)] pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object); } ); @@ -57,9 +57,9 @@ extern_class!( ); extern_methods!( unsafe impl NSUnarchiver { - # [method_id (initForReadingWithData :)] + #[method_id(initForReadingWithData:)] pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Option>; - # [method (setObjectZone :)] + #[method(setObjectZone:)] pub unsafe fn setObjectZone(&self, zone: *mut NSZone); #[method(objectZone)] pub unsafe fn objectZone(&self) -> *mut NSZone; @@ -67,28 +67,28 @@ extern_methods!( pub unsafe fn isAtEnd(&self) -> bool; #[method(systemVersion)] pub unsafe fn systemVersion(&self) -> c_uint; - # [method_id (unarchiveObjectWithData :)] + #[method_id(unarchiveObjectWithData:)] pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option>; - # [method_id (unarchiveObjectWithFile :)] + #[method_id(unarchiveObjectWithFile:)] pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option>; - # [method (decodeClassName : asClassName :)] + #[method(decodeClassName:asClassName:)] pub unsafe fn decodeClassName_asClassName(inArchiveName: &NSString, trueName: &NSString); - # [method (decodeClassName : asClassName :)] + #[method(decodeClassName:asClassName:)] pub unsafe fn decodeClassName_asClassName( &self, inArchiveName: &NSString, trueName: &NSString, ); - # [method_id (classNameDecodedForArchiveClassName :)] + #[method_id(classNameDecodedForArchiveClassName:)] pub unsafe fn classNameDecodedForArchiveClassName( inArchiveName: &NSString, ) -> Id; - # [method_id (classNameDecodedForArchiveClassName :)] + #[method_id(classNameDecodedForArchiveClassName:)] pub unsafe fn classNameDecodedForArchiveClassName( &self, inArchiveName: &NSString, ) -> Id; - # [method (replaceObject : withObject :)] + #[method(replaceObject:withObject:)] pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object); } ); @@ -97,7 +97,7 @@ extern_methods!( unsafe impl NSObject { #[method(classForArchiver)] pub unsafe fn classForArchiver(&self) -> Option<&Class>; - # [method_id (replacementObjectForArchiver :)] + #[method_id(replacementObjectForArchiver:)] pub unsafe fn replacementObjectForArchiver( &self, archiver: &NSArchiver, diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 7a86e6268..ad69800c1 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -22,73 +22,73 @@ extern_methods!( unsafe impl NSArray { #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - # [method_id (objectAtIndex :)] + #[method_id(objectAtIndex:)] pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithObjects : count :)] + #[method_id(initWithObjects:count:)] pub unsafe fn initWithObjects_count( &self, objects: TodoArray, cnt: NSUInteger, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedArray"] unsafe impl NSArray { - # [method_id (arrayByAddingObject :)] + #[method_id(arrayByAddingObject:)] pub unsafe fn arrayByAddingObject( &self, anObject: &ObjectType, ) -> Id, Shared>; - # [method_id (arrayByAddingObjectsFromArray :)] + #[method_id(arrayByAddingObjectsFromArray:)] pub unsafe fn arrayByAddingObjectsFromArray( &self, otherArray: &NSArray, ) -> Id, Shared>; - # [method_id (componentsJoinedByString :)] + #[method_id(componentsJoinedByString:)] pub unsafe fn componentsJoinedByString(&self, separator: &NSString) -> Id; - # [method (containsObject :)] + #[method(containsObject:)] pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool; #[method_id(description)] pub unsafe fn description(&self) -> Id; - # [method_id (descriptionWithLocale :)] + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; - # [method_id (descriptionWithLocale : indent :)] + #[method_id(descriptionWithLocale:indent:)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, level: NSUInteger, ) -> Id; - # [method_id (firstObjectCommonWithArray :)] + #[method_id(firstObjectCommonWithArray:)] pub unsafe fn firstObjectCommonWithArray( &self, otherArray: &NSArray, ) -> Option>; - # [method (getObjects : range :)] + #[method(getObjects:range:)] pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange); - # [method (indexOfObject :)] + #[method(indexOfObject:)] pub unsafe fn indexOfObject(&self, anObject: &ObjectType) -> NSUInteger; - # [method (indexOfObject : inRange :)] + #[method(indexOfObject:inRange:)] pub unsafe fn indexOfObject_inRange( &self, anObject: &ObjectType, range: NSRange, ) -> NSUInteger; - # [method (indexOfObjectIdenticalTo :)] + #[method(indexOfObjectIdenticalTo:)] pub unsafe fn indexOfObjectIdenticalTo(&self, anObject: &ObjectType) -> NSUInteger; - # [method (indexOfObjectIdenticalTo : inRange :)] + #[method(indexOfObjectIdenticalTo:inRange:)] pub unsafe fn indexOfObjectIdenticalTo_inRange( &self, anObject: &ObjectType, range: NSRange, ) -> NSUInteger; - # [method (isEqualToArray :)] + #[method(isEqualToArray:)] pub unsafe fn isEqualToArray(&self, otherArray: &NSArray) -> bool; #[method_id(firstObject)] pub unsafe fn firstObject(&self) -> Option>; @@ -100,103 +100,103 @@ extern_methods!( pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared>; #[method_id(sortedArrayHint)] pub unsafe fn sortedArrayHint(&self) -> Id; - # [method_id (sortedArrayUsingFunction : context :)] + #[method_id(sortedArrayUsingFunction:context:)] pub unsafe fn sortedArrayUsingFunction_context( &self, comparator: NonNull, context: *mut c_void, ) -> Id, Shared>; - # [method_id (sortedArrayUsingFunction : context : hint :)] + #[method_id(sortedArrayUsingFunction:context:hint:)] pub unsafe fn sortedArrayUsingFunction_context_hint( &self, comparator: NonNull, context: *mut c_void, hint: Option<&NSData>, ) -> Id, Shared>; - # [method_id (sortedArrayUsingSelector :)] + #[method_id(sortedArrayUsingSelector:)] pub unsafe fn sortedArrayUsingSelector( &self, comparator: Sel, ) -> Id, Shared>; - # [method_id (subarrayWithRange :)] + #[method_id(subarrayWithRange:)] pub unsafe fn subarrayWithRange(&self, range: NSRange) -> Id, Shared>; - # [method (writeToURL : error :)] + #[method(writeToURL:error:)] pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id>; - # [method (makeObjectsPerformSelector :)] + #[method(makeObjectsPerformSelector:)] pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel); - # [method (makeObjectsPerformSelector : withObject :)] + #[method(makeObjectsPerformSelector:withObject:)] pub unsafe fn makeObjectsPerformSelector_withObject( &self, aSelector: Sel, argument: Option<&Object>, ); - # [method_id (objectsAtIndexes :)] + #[method_id(objectsAtIndexes:)] pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet, ) -> Id, Shared>; - # [method_id (objectAtIndexedSubscript :)] + #[method_id(objectAtIndexedSubscript:)] pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; - # [method (enumerateObjectsUsingBlock :)] + #[method(enumerateObjectsUsingBlock:)] pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); - # [method (enumerateObjectsWithOptions : usingBlock :)] + #[method(enumerateObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); - # [method (enumerateObjectsAtIndexes : options : usingBlock :)] + #[method(enumerateObjectsAtIndexes:options:usingBlock:)] pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( &self, s: &NSIndexSet, opts: NSEnumerationOptions, block: TodoBlock, ); - # [method (indexOfObjectPassingTest :)] + #[method(indexOfObjectPassingTest:)] pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger; - # [method (indexOfObjectWithOptions : passingTest :)] + #[method(indexOfObjectWithOptions:passingTest:)] pub unsafe fn indexOfObjectWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; - # [method (indexOfObjectAtIndexes : options : passingTest :)] + #[method(indexOfObjectAtIndexes:options:passingTest:)] pub unsafe fn indexOfObjectAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; - # [method_id (indexesOfObjectsPassingTest :)] + #[method_id(indexesOfObjectsPassingTest:)] pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: TodoBlock, ) -> Id; - # [method_id (indexesOfObjectsWithOptions : passingTest :)] + #[method_id(indexesOfObjectsWithOptions:passingTest:)] pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; - # [method_id (indexesOfObjectsAtIndexes : options : passingTest :)] + #[method_id(indexesOfObjectsAtIndexes:options:passingTest:)] pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; - # [method_id (sortedArrayUsingComparator :)] + #[method_id(sortedArrayUsingComparator:)] pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator, ) -> Id, Shared>; - # [method_id (sortedArrayWithOptions : usingComparator :)] + #[method_id(sortedArrayWithOptions:usingComparator:)] pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, ) -> Id, Shared>; - # [method (indexOfObject : inSortedRange : options : usingComparator :)] + #[method(indexOfObject:inSortedRange:options:usingComparator:)] pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, obj: &ObjectType, @@ -211,29 +211,29 @@ extern_methods!( unsafe impl NSArray { #[method_id(array)] pub unsafe fn array() -> Id; - # [method_id (arrayWithObject :)] + #[method_id(arrayWithObject:)] pub unsafe fn arrayWithObject(anObject: &ObjectType) -> Id; - # [method_id (arrayWithObjects : count :)] + #[method_id(arrayWithObjects:count:)] pub unsafe fn arrayWithObjects_count( objects: TodoArray, cnt: NSUInteger, ) -> Id; - # [method_id (arrayWithArray :)] + #[method_id(arrayWithArray:)] pub unsafe fn arrayWithArray(array: &NSArray) -> Id; - # [method_id (initWithArray :)] + #[method_id(initWithArray:)] pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; - # [method_id (initWithArray : copyItems :)] + #[method_id(initWithArray:copyItems:)] pub unsafe fn initWithArray_copyItems( &self, array: &NSArray, flag: bool, ) -> Id; - # [method_id (initWithContentsOfURL : error :)] + #[method_id(initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, ) -> Result, Shared>, Id>; - # [method_id (arrayWithContentsOfURL : error :)] + #[method_id(arrayWithContentsOfURL:error:)] pub unsafe fn arrayWithContentsOfURL_error( url: &NSURL, ) -> Result, Shared>, Id>; @@ -242,25 +242,25 @@ extern_methods!( extern_methods!( #[doc = "NSArrayDiffing"] unsafe impl NSArray { - # [method_id (differenceFromArray : withOptions : usingEquivalenceTest :)] + #[method_id(differenceFromArray:withOptions:usingEquivalenceTest:)] pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( &self, other: &NSArray, options: NSOrderedCollectionDifferenceCalculationOptions, block: TodoBlock, ) -> Id, Shared>; - # [method_id (differenceFromArray : withOptions :)] + #[method_id(differenceFromArray:withOptions:)] pub unsafe fn differenceFromArray_withOptions( &self, other: &NSArray, options: NSOrderedCollectionDifferenceCalculationOptions, ) -> Id, Shared>; - # [method_id (differenceFromArray :)] + #[method_id(differenceFromArray:)] pub unsafe fn differenceFromArray( &self, other: &NSArray, ) -> Id, Shared>; - # [method_id (arrayByApplyingDifference :)] + #[method_id(arrayByApplyingDifference:)] pub unsafe fn arrayByApplyingDifference( &self, difference: &NSOrderedCollectionDifference, @@ -270,33 +270,33 @@ extern_methods!( extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSArray { - # [method (getObjects :)] + #[method(getObjects:)] pub unsafe fn getObjects(&self, objects: TodoArray); - # [method_id (arrayWithContentsOfFile :)] + #[method_id(arrayWithContentsOfFile:)] pub unsafe fn arrayWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; - # [method_id (arrayWithContentsOfURL :)] + #[method_id(arrayWithContentsOfURL:)] pub unsafe fn arrayWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; - # [method_id (initWithContentsOfFile :)] + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, ) -> Option, Shared>>; - # [method_id (initWithContentsOfURL :)] + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, url: &NSURL, ) -> Option, Shared>>; - # [method (writeToFile : atomically :)] + #[method(writeToFile:atomically:)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, ) -> bool; - # [method (writeToURL : atomically :)] + #[method(writeToURL:atomically:)] pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; } ); @@ -309,15 +309,15 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMutableArray { - # [method (addObject :)] + #[method(addObject:)] pub unsafe fn addObject(&self, anObject: &ObjectType); - # [method (insertObject : atIndex :)] + #[method(insertObject:atIndex:)] pub unsafe fn insertObject_atIndex(&self, anObject: &ObjectType, index: NSUInteger); #[method(removeLastObject)] pub unsafe fn removeLastObject(&self); - # [method (removeObjectAtIndex :)] + #[method(removeObjectAtIndex:)] pub unsafe fn removeObjectAtIndex(&self, index: NSUInteger); - # [method (replaceObjectAtIndex : withObject :)] + #[method(replaceObjectAtIndex:withObject:)] pub unsafe fn replaceObjectAtIndex_withObject( &self, index: NSUInteger, @@ -325,18 +325,18 @@ extern_methods!( ); #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithCapacity :)] + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedMutableArray"] unsafe impl NSMutableArray { - # [method (addObjectsFromArray :)] + #[method(addObjectsFromArray:)] pub unsafe fn addObjectsFromArray(&self, otherArray: &NSArray); - # [method (exchangeObjectAtIndex : withObjectAtIndex :)] + #[method(exchangeObjectAtIndex:withObjectAtIndex:)] pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( &self, idx1: NSUInteger, @@ -344,66 +344,66 @@ extern_methods!( ); #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); - # [method (removeObject : inRange :)] + #[method(removeObject:inRange:)] pub unsafe fn removeObject_inRange(&self, anObject: &ObjectType, range: NSRange); - # [method (removeObject :)] + #[method(removeObject:)] pub unsafe fn removeObject(&self, anObject: &ObjectType); - # [method (removeObjectIdenticalTo : inRange :)] + #[method(removeObjectIdenticalTo:inRange:)] pub unsafe fn removeObjectIdenticalTo_inRange(&self, anObject: &ObjectType, range: NSRange); - # [method (removeObjectIdenticalTo :)] + #[method(removeObjectIdenticalTo:)] pub unsafe fn removeObjectIdenticalTo(&self, anObject: &ObjectType); - # [method (removeObjectsFromIndices : numIndices :)] + #[method(removeObjectsFromIndices:numIndices:)] pub unsafe fn removeObjectsFromIndices_numIndices( &self, indices: NonNull, cnt: NSUInteger, ); - # [method (removeObjectsInArray :)] + #[method(removeObjectsInArray:)] pub unsafe fn removeObjectsInArray(&self, otherArray: &NSArray); - # [method (removeObjectsInRange :)] + #[method(removeObjectsInRange:)] pub unsafe fn removeObjectsInRange(&self, range: NSRange); - # [method (replaceObjectsInRange : withObjectsFromArray : range :)] + #[method(replaceObjectsInRange:withObjectsFromArray:range:)] pub unsafe fn replaceObjectsInRange_withObjectsFromArray_range( &self, range: NSRange, otherArray: &NSArray, otherRange: NSRange, ); - # [method (replaceObjectsInRange : withObjectsFromArray :)] + #[method(replaceObjectsInRange:withObjectsFromArray:)] pub unsafe fn replaceObjectsInRange_withObjectsFromArray( &self, range: NSRange, otherArray: &NSArray, ); - # [method (setArray :)] + #[method(setArray:)] pub unsafe fn setArray(&self, otherArray: &NSArray); - # [method (sortUsingFunction : context :)] + #[method(sortUsingFunction:context:)] pub unsafe fn sortUsingFunction_context( &self, compare: NonNull, context: *mut c_void, ); - # [method (sortUsingSelector :)] + #[method(sortUsingSelector:)] pub unsafe fn sortUsingSelector(&self, comparator: Sel); - # [method (insertObjects : atIndexes :)] + #[method(insertObjects:atIndexes:)] pub unsafe fn insertObjects_atIndexes( &self, objects: &NSArray, indexes: &NSIndexSet, ); - # [method (removeObjectsAtIndexes :)] + #[method(removeObjectsAtIndexes:)] pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet); - # [method (replaceObjectsAtIndexes : withObjects :)] + #[method(replaceObjectsAtIndexes:withObjects:)] pub unsafe fn replaceObjectsAtIndexes_withObjects( &self, indexes: &NSIndexSet, objects: &NSArray, ); - # [method (setObject : atIndexedSubscript :)] + #[method(setObject:atIndexedSubscript:)] pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger); - # [method (sortUsingComparator :)] + #[method(sortUsingComparator:)] pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator); - # [method (sortWithOptions : usingComparator :)] + #[method(sortWithOptions:usingComparator:)] pub unsafe fn sortWithOptions_usingComparator( &self, opts: NSSortOptions, @@ -414,22 +414,22 @@ extern_methods!( extern_methods!( #[doc = "NSMutableArrayCreation"] unsafe impl NSMutableArray { - # [method_id (arrayWithCapacity :)] + #[method_id(arrayWithCapacity:)] pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id; - # [method_id (arrayWithContentsOfFile :)] + #[method_id(arrayWithContentsOfFile:)] pub unsafe fn arrayWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; - # [method_id (arrayWithContentsOfURL :)] + #[method_id(arrayWithContentsOfURL:)] pub unsafe fn arrayWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; - # [method_id (initWithContentsOfFile :)] + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, ) -> Option, Shared>>; - # [method_id (initWithContentsOfURL :)] + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, url: &NSURL, @@ -439,7 +439,7 @@ extern_methods!( extern_methods!( #[doc = "NSMutableArrayDiffing"] unsafe impl NSMutableArray { - # [method (applyDifference :)] + #[method(applyDifference:)] pub unsafe fn applyDifference( &self, difference: &NSOrderedCollectionDifference, diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index d56491825..93129acaa 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -16,7 +16,7 @@ extern_methods!( unsafe impl NSAttributedString { #[method_id(string)] pub unsafe fn string(&self) -> Id; - # [method_id (attributesAtIndex : effectiveRange :)] + #[method_id(attributesAtIndex:effectiveRange:)] pub unsafe fn attributesAtIndex_effectiveRange( &self, location: NSUInteger, @@ -29,26 +29,26 @@ extern_methods!( unsafe impl NSAttributedString { #[method(length)] pub unsafe fn length(&self) -> NSUInteger; - # [method_id (attribute : atIndex : effectiveRange :)] + #[method_id(attribute:atIndex:effectiveRange:)] pub unsafe fn attribute_atIndex_effectiveRange( &self, attrName: &NSAttributedStringKey, location: NSUInteger, range: NSRangePointer, ) -> Option>; - # [method_id (attributedSubstringFromRange :)] + #[method_id(attributedSubstringFromRange:)] pub unsafe fn attributedSubstringFromRange( &self, range: NSRange, ) -> Id; - # [method_id (attributesAtIndex : longestEffectiveRange : inRange :)] + #[method_id(attributesAtIndex:longestEffectiveRange:inRange:)] pub unsafe fn attributesAtIndex_longestEffectiveRange_inRange( &self, location: NSUInteger, range: NSRangePointer, rangeLimit: NSRange, ) -> Id, Shared>; - # [method_id (attribute : atIndex : longestEffectiveRange : inRange :)] + #[method_id(attribute:atIndex:longestEffectiveRange:inRange:)] pub unsafe fn attribute_atIndex_longestEffectiveRange_inRange( &self, attrName: &NSAttributedStringKey, @@ -56,29 +56,29 @@ extern_methods!( range: NSRangePointer, rangeLimit: NSRange, ) -> Option>; - # [method (isEqualToAttributedString :)] + #[method(isEqualToAttributedString:)] pub unsafe fn isEqualToAttributedString(&self, other: &NSAttributedString) -> bool; - # [method_id (initWithString :)] + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, str: &NSString) -> Id; - # [method_id (initWithString : attributes :)] + #[method_id(initWithString:attributes:)] pub unsafe fn initWithString_attributes( &self, str: &NSString, attrs: Option<&NSDictionary>, ) -> Id; - # [method_id (initWithAttributedString :)] + #[method_id(initWithAttributedString:)] pub unsafe fn initWithAttributedString( &self, attrStr: &NSAttributedString, ) -> Id; - # [method (enumerateAttributesInRange : options : usingBlock :)] + #[method(enumerateAttributesInRange:options:usingBlock:)] pub unsafe fn enumerateAttributesInRange_options_usingBlock( &self, enumerationRange: NSRange, opts: NSAttributedStringEnumerationOptions, block: TodoBlock, ); - # [method (enumerateAttribute : inRange : options : usingBlock :)] + #[method(enumerateAttribute:inRange:options:usingBlock:)] pub unsafe fn enumerateAttribute_inRange_options_usingBlock( &self, attrName: &NSAttributedStringKey, @@ -97,9 +97,9 @@ extern_class!( ); extern_methods!( unsafe impl NSMutableAttributedString { - # [method (replaceCharactersInRange : withString :)] + #[method(replaceCharactersInRange:withString:)] pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, str: &NSString); - # [method (setAttributes : range :)] + #[method(setAttributes:range:)] pub unsafe fn setAttributes_range( &self, attrs: Option<&NSDictionary>, @@ -112,38 +112,38 @@ extern_methods!( unsafe impl NSMutableAttributedString { #[method_id(mutableString)] pub unsafe fn mutableString(&self) -> Id; - # [method (addAttribute : value : range :)] + #[method(addAttribute:value:range:)] pub unsafe fn addAttribute_value_range( &self, name: &NSAttributedStringKey, value: &Object, range: NSRange, ); - # [method (addAttributes : range :)] + #[method(addAttributes:range:)] pub unsafe fn addAttributes_range( &self, attrs: &NSDictionary, range: NSRange, ); - # [method (removeAttribute : range :)] + #[method(removeAttribute:range:)] pub unsafe fn removeAttribute_range(&self, name: &NSAttributedStringKey, range: NSRange); - # [method (replaceCharactersInRange : withAttributedString :)] + #[method(replaceCharactersInRange:withAttributedString:)] pub unsafe fn replaceCharactersInRange_withAttributedString( &self, range: NSRange, attrString: &NSAttributedString, ); - # [method (insertAttributedString : atIndex :)] + #[method(insertAttributedString:atIndex:)] pub unsafe fn insertAttributedString_atIndex( &self, attrString: &NSAttributedString, loc: NSUInteger, ); - # [method (appendAttributedString :)] + #[method(appendAttributedString:)] pub unsafe fn appendAttributedString(&self, attrString: &NSAttributedString); - # [method (deleteCharactersInRange :)] + #[method(deleteCharactersInRange:)] pub unsafe fn deleteCharactersInRange(&self, range: NSRange); - # [method (setAttributedString :)] + #[method(setAttributedString:)] pub unsafe fn setAttributedString(&self, attrString: &NSAttributedString); #[method(beginEditing)] pub unsafe fn beginEditing(&self); @@ -164,46 +164,46 @@ extern_methods!( pub unsafe fn init(&self) -> Id; #[method(allowsExtendedAttributes)] pub unsafe fn allowsExtendedAttributes(&self) -> bool; - # [method (setAllowsExtendedAttributes :)] + #[method(setAllowsExtendedAttributes:)] pub unsafe fn setAllowsExtendedAttributes(&self, allowsExtendedAttributes: bool); #[method(interpretedSyntax)] pub unsafe fn interpretedSyntax(&self) -> NSAttributedStringMarkdownInterpretedSyntax; - # [method (setInterpretedSyntax :)] + #[method(setInterpretedSyntax:)] pub unsafe fn setInterpretedSyntax( &self, interpretedSyntax: NSAttributedStringMarkdownInterpretedSyntax, ); #[method(failurePolicy)] pub unsafe fn failurePolicy(&self) -> NSAttributedStringMarkdownParsingFailurePolicy; - # [method (setFailurePolicy :)] + #[method(setFailurePolicy:)] pub unsafe fn setFailurePolicy( &self, failurePolicy: NSAttributedStringMarkdownParsingFailurePolicy, ); #[method_id(languageCode)] pub unsafe fn languageCode(&self) -> Option>; - # [method (setLanguageCode :)] + #[method(setLanguageCode:)] pub unsafe fn setLanguageCode(&self, languageCode: Option<&NSString>); } ); extern_methods!( #[doc = "NSAttributedStringCreateFromMarkdown"] unsafe impl NSAttributedString { - # [method_id (initWithContentsOfMarkdownFileAtURL : options : baseURL : error :)] + #[method_id(initWithContentsOfMarkdownFileAtURL:options:baseURL:error:)] pub unsafe fn initWithContentsOfMarkdownFileAtURL_options_baseURL_error( &self, markdownFile: &NSURL, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, ) -> Result, Id>; - # [method_id (initWithMarkdown : options : baseURL : error :)] + #[method_id(initWithMarkdown:options:baseURL:error:)] pub unsafe fn initWithMarkdown_options_baseURL_error( &self, markdown: &NSData, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, ) -> Result, Id>; - # [method_id (initWithMarkdownString : options : baseURL : error :)] + #[method_id(initWithMarkdownString:options:baseURL:error:)] pub unsafe fn initWithMarkdownString_options_baseURL_error( &self, markdownString: &NSString, @@ -215,7 +215,7 @@ extern_methods!( extern_methods!( #[doc = "NSAttributedStringFormatting"] unsafe impl NSAttributedString { - # [method_id (initWithFormat : options : locale : arguments :)] + #[method_id(initWithFormat:options:locale:arguments:)] pub unsafe fn initWithFormat_options_locale_arguments( &self, format: &NSAttributedString, @@ -251,68 +251,68 @@ extern_methods!( pub unsafe fn init(&self) -> Id; #[method_id(parentIntent)] pub unsafe fn parentIntent(&self) -> Option>; - # [method_id (paragraphIntentWithIdentity : nestedInsideIntent :)] + #[method_id(paragraphIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn paragraphIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (headerIntentWithIdentity : level : nestedInsideIntent :)] + #[method_id(headerIntentWithIdentity:level:nestedInsideIntent:)] pub unsafe fn headerIntentWithIdentity_level_nestedInsideIntent( identity: NSInteger, level: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (codeBlockIntentWithIdentity : languageHint : nestedInsideIntent :)] + #[method_id(codeBlockIntentWithIdentity:languageHint:nestedInsideIntent:)] pub unsafe fn codeBlockIntentWithIdentity_languageHint_nestedInsideIntent( identity: NSInteger, languageHint: Option<&NSString>, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (thematicBreakIntentWithIdentity : nestedInsideIntent :)] + #[method_id(thematicBreakIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn thematicBreakIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (orderedListIntentWithIdentity : nestedInsideIntent :)] + #[method_id(orderedListIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn orderedListIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (unorderedListIntentWithIdentity : nestedInsideIntent :)] + #[method_id(unorderedListIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn unorderedListIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (listItemIntentWithIdentity : ordinal : nestedInsideIntent :)] + #[method_id(listItemIntentWithIdentity:ordinal:nestedInsideIntent:)] pub unsafe fn listItemIntentWithIdentity_ordinal_nestedInsideIntent( identity: NSInteger, ordinal: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (blockQuoteIntentWithIdentity : nestedInsideIntent :)] + #[method_id(blockQuoteIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn blockQuoteIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (tableIntentWithIdentity : columnCount : alignments : nestedInsideIntent :)] + #[method_id(tableIntentWithIdentity:columnCount:alignments:nestedInsideIntent:)] pub unsafe fn tableIntentWithIdentity_columnCount_alignments_nestedInsideIntent( identity: NSInteger, columnCount: NSInteger, alignments: &NSArray, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (tableHeaderRowIntentWithIdentity : nestedInsideIntent :)] + #[method_id(tableHeaderRowIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn tableHeaderRowIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (tableRowIntentWithIdentity : row : nestedInsideIntent :)] + #[method_id(tableRowIntentWithIdentity:row:nestedInsideIntent:)] pub unsafe fn tableRowIntentWithIdentity_row_nestedInsideIntent( identity: NSInteger, row: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - # [method_id (tableCellIntentWithIdentity : column : nestedInsideIntent :)] + #[method_id(tableCellIntentWithIdentity:column:nestedInsideIntent:)] pub unsafe fn tableCellIntentWithIdentity_column_nestedInsideIntent( identity: NSInteger, column: NSInteger, @@ -336,7 +336,7 @@ extern_methods!( pub unsafe fn row(&self) -> NSInteger; #[method(indentationLevel)] pub unsafe fn indentationLevel(&self) -> NSInteger; - # [method (isEquivalentToPresentationIntent :)] + #[method(isEquivalentToPresentationIntent:)] pub unsafe fn isEquivalentToPresentationIntent(&self, other: &NSPresentationIntent) -> bool; } diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs index 9e4089ac9..3816bd4ed 100644 --- a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -12,9 +12,9 @@ extern_class!( ); extern_methods!( unsafe impl NSAutoreleasePool { - # [method (addObject :)] + #[method(addObject:)] pub unsafe fn addObject(anObject: &Object); - # [method (addObject :)] + #[method(addObject:)] pub unsafe fn addObject(&self, anObject: &Object); #[method(drain)] pub unsafe fn drain(&self); diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index d14ca5500..24bcaf28b 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -14,27 +14,27 @@ extern_class!( ); extern_methods!( unsafe impl NSBackgroundActivityScheduler { - # [method_id (initWithIdentifier :)] + #[method_id(initWithIdentifier:)] pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id; #[method_id(identifier)] pub unsafe fn identifier(&self) -> Id; #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; - # [method (setQualityOfService :)] + #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); #[method(repeats)] pub unsafe fn repeats(&self) -> bool; - # [method (setRepeats :)] + #[method(setRepeats:)] pub unsafe fn setRepeats(&self, repeats: bool); #[method(interval)] pub unsafe fn interval(&self) -> NSTimeInterval; - # [method (setInterval :)] + #[method(setInterval:)] pub unsafe fn setInterval(&self, interval: NSTimeInterval); #[method(tolerance)] pub unsafe fn tolerance(&self) -> NSTimeInterval; - # [method (setTolerance :)] + #[method(setTolerance:)] pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval); - # [method (scheduleWithBlock :)] + #[method(scheduleWithBlock:)] pub unsafe fn scheduleWithBlock(&self, block: TodoBlock); #[method(invalidate)] pub unsafe fn invalidate(&self); diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index ffb54220f..b878680a5 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -26,17 +26,17 @@ extern_methods!( unsafe impl NSBundle { #[method_id(mainBundle)] pub unsafe fn mainBundle() -> Id; - # [method_id (bundleWithPath :)] + #[method_id(bundleWithPath:)] pub unsafe fn bundleWithPath(path: &NSString) -> Option>; - # [method_id (initWithPath :)] + #[method_id(initWithPath:)] pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; - # [method_id (bundleWithURL :)] + #[method_id(bundleWithURL:)] pub unsafe fn bundleWithURL(url: &NSURL) -> Option>; - # [method_id (initWithURL :)] + #[method_id(initWithURL:)] pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; - # [method_id (bundleForClass :)] + #[method_id(bundleForClass:)] pub unsafe fn bundleForClass(aClass: &Class) -> Id; - # [method_id (bundleWithIdentifier :)] + #[method_id(bundleWithIdentifier:)] pub unsafe fn bundleWithIdentifier(identifier: &NSString) -> Option>; #[method_id(allBundles)] pub unsafe fn allBundles() -> Id, Shared>; @@ -48,9 +48,9 @@ extern_methods!( pub unsafe fn isLoaded(&self) -> bool; #[method(unload)] pub unsafe fn unload(&self) -> bool; - # [method (preflightAndReturnError :)] + #[method(preflightAndReturnError:)] pub unsafe fn preflightAndReturnError(&self) -> Result<(), Id>; - # [method (loadAndReturnError :)] + #[method(loadAndReturnError:)] pub unsafe fn loadAndReturnError(&self) -> Result<(), Id>; #[method_id(bundleURL)] pub unsafe fn bundleURL(&self) -> Id; @@ -58,7 +58,7 @@ extern_methods!( pub unsafe fn resourceURL(&self) -> Option>; #[method_id(executableURL)] pub unsafe fn executableURL(&self) -> Option>; - # [method_id (URLForAuxiliaryExecutable :)] + #[method_id(URLForAuxiliaryExecutable:)] pub unsafe fn URLForAuxiliaryExecutable( &self, executableName: &NSString, @@ -79,7 +79,7 @@ extern_methods!( pub unsafe fn resourcePath(&self) -> Option>; #[method_id(executablePath)] pub unsafe fn executablePath(&self) -> Option>; - # [method_id (pathForAuxiliaryExecutable :)] + #[method_id(pathForAuxiliaryExecutable:)] pub unsafe fn pathForAuxiliaryExecutable( &self, executableName: &NSString, @@ -92,33 +92,33 @@ extern_methods!( pub unsafe fn sharedSupportPath(&self) -> Option>; #[method_id(builtInPlugInsPath)] pub unsafe fn builtInPlugInsPath(&self) -> Option>; - # [method_id (URLForResource : withExtension : subdirectory : inBundleWithURL :)] + #[method_id(URLForResource:withExtension:subdirectory:inBundleWithURL:)] pub unsafe fn URLForResource_withExtension_subdirectory_inBundleWithURL( name: Option<&NSString>, ext: Option<&NSString>, subpath: Option<&NSString>, bundleURL: &NSURL, ) -> Option>; - # [method_id (URLsForResourcesWithExtension : subdirectory : inBundleWithURL :)] + #[method_id(URLsForResourcesWithExtension:subdirectory:inBundleWithURL:)] pub unsafe fn URLsForResourcesWithExtension_subdirectory_inBundleWithURL( ext: Option<&NSString>, subpath: Option<&NSString>, bundleURL: &NSURL, ) -> Option, Shared>>; - # [method_id (URLForResource : withExtension :)] + #[method_id(URLForResource:withExtension:)] pub unsafe fn URLForResource_withExtension( &self, name: Option<&NSString>, ext: Option<&NSString>, ) -> Option>; - # [method_id (URLForResource : withExtension : subdirectory :)] + #[method_id(URLForResource:withExtension:subdirectory:)] pub unsafe fn URLForResource_withExtension_subdirectory( &self, name: Option<&NSString>, ext: Option<&NSString>, subpath: Option<&NSString>, ) -> Option>; - # [method_id (URLForResource : withExtension : subdirectory : localization :)] + #[method_id(URLForResource:withExtension:subdirectory:localization:)] pub unsafe fn URLForResource_withExtension_subdirectory_localization( &self, name: Option<&NSString>, @@ -126,44 +126,44 @@ extern_methods!( subpath: Option<&NSString>, localizationName: Option<&NSString>, ) -> Option>; - # [method_id (URLsForResourcesWithExtension : subdirectory :)] + #[method_id(URLsForResourcesWithExtension:subdirectory:)] pub unsafe fn URLsForResourcesWithExtension_subdirectory( &self, ext: Option<&NSString>, subpath: Option<&NSString>, ) -> Option, Shared>>; - # [method_id (URLsForResourcesWithExtension : subdirectory : localization :)] + #[method_id(URLsForResourcesWithExtension:subdirectory:localization:)] pub unsafe fn URLsForResourcesWithExtension_subdirectory_localization( &self, ext: Option<&NSString>, subpath: Option<&NSString>, localizationName: Option<&NSString>, ) -> Option, Shared>>; - # [method_id (pathForResource : ofType : inDirectory :)] + #[method_id(pathForResource:ofType:inDirectory:)] pub unsafe fn pathForResource_ofType_inDirectory( name: Option<&NSString>, ext: Option<&NSString>, bundlePath: &NSString, ) -> Option>; - # [method_id (pathsForResourcesOfType : inDirectory :)] + #[method_id(pathsForResourcesOfType:inDirectory:)] pub unsafe fn pathsForResourcesOfType_inDirectory( ext: Option<&NSString>, bundlePath: &NSString, ) -> Id, Shared>; - # [method_id (pathForResource : ofType :)] + #[method_id(pathForResource:ofType:)] pub unsafe fn pathForResource_ofType( &self, name: Option<&NSString>, ext: Option<&NSString>, ) -> Option>; - # [method_id (pathForResource : ofType : inDirectory :)] + #[method_id(pathForResource:ofType:inDirectory:)] pub unsafe fn pathForResource_ofType_inDirectory( &self, name: Option<&NSString>, ext: Option<&NSString>, subpath: Option<&NSString>, ) -> Option>; - # [method_id (pathForResource : ofType : inDirectory : forLocalization :)] + #[method_id(pathForResource:ofType:inDirectory:forLocalization:)] pub unsafe fn pathForResource_ofType_inDirectory_forLocalization( &self, name: Option<&NSString>, @@ -171,27 +171,27 @@ extern_methods!( subpath: Option<&NSString>, localizationName: Option<&NSString>, ) -> Option>; - # [method_id (pathsForResourcesOfType : inDirectory :)] + #[method_id(pathsForResourcesOfType:inDirectory:)] pub unsafe fn pathsForResourcesOfType_inDirectory( &self, ext: Option<&NSString>, subpath: Option<&NSString>, ) -> Id, Shared>; - # [method_id (pathsForResourcesOfType : inDirectory : forLocalization :)] + #[method_id(pathsForResourcesOfType:inDirectory:forLocalization:)] pub unsafe fn pathsForResourcesOfType_inDirectory_forLocalization( &self, ext: Option<&NSString>, subpath: Option<&NSString>, localizationName: Option<&NSString>, ) -> Id, Shared>; - # [method_id (localizedStringForKey : value : table :)] + #[method_id(localizedStringForKey:value:table:)] pub unsafe fn localizedStringForKey_value_table( &self, key: &NSString, value: Option<&NSString>, tableName: Option<&NSString>, ) -> Id; - # [method_id (localizedAttributedStringForKey : value : table :)] + #[method_id(localizedAttributedStringForKey:value:table:)] pub unsafe fn localizedAttributedStringForKey_value_table( &self, key: &NSString, @@ -206,12 +206,12 @@ extern_methods!( pub unsafe fn localizedInfoDictionary( &self, ) -> Option, Shared>>; - # [method_id (objectForInfoDictionaryKey :)] + #[method_id(objectForInfoDictionaryKey:)] pub unsafe fn objectForInfoDictionaryKey( &self, key: &NSString, ) -> Option>; - # [method (classNamed :)] + #[method(classNamed:)] pub unsafe fn classNamed(&self, className: &NSString) -> Option<&Class>; #[method(principalClass)] pub unsafe fn principalClass(&self) -> Option<&Class>; @@ -221,11 +221,11 @@ extern_methods!( pub unsafe fn localizations(&self) -> Id, Shared>; #[method_id(developmentLocalization)] pub unsafe fn developmentLocalization(&self) -> Option>; - # [method_id (preferredLocalizationsFromArray :)] + #[method_id(preferredLocalizationsFromArray:)] pub unsafe fn preferredLocalizationsFromArray( localizationsArray: &NSArray, ) -> Id, Shared>; - # [method_id (preferredLocalizationsFromArray : forPreferences :)] + #[method_id(preferredLocalizationsFromArray:forPreferences:)] pub unsafe fn preferredLocalizationsFromArray_forPreferences( localizationsArray: &NSArray, preferencesArray: Option<&NSArray>, @@ -237,7 +237,7 @@ extern_methods!( extern_methods!( #[doc = "NSBundleExtensionMethods"] unsafe impl NSString { - # [method_id (variantFittingPresentationWidth :)] + #[method_id(variantFittingPresentationWidth:)] pub unsafe fn variantFittingPresentationWidth( &self, width: NSInteger, @@ -255,9 +255,9 @@ extern_methods!( unsafe impl NSBundleResourceRequest { #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithTags :)] + #[method_id(initWithTags:)] pub unsafe fn initWithTags(&self, tags: &NSSet) -> Id; - # [method_id (initWithTags : bundle :)] + #[method_id(initWithTags:bundle:)] pub unsafe fn initWithTags_bundle( &self, tags: &NSSet, @@ -265,18 +265,18 @@ extern_methods!( ) -> Id; #[method(loadingPriority)] pub unsafe fn loadingPriority(&self) -> c_double; - # [method (setLoadingPriority :)] + #[method(setLoadingPriority:)] pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double); #[method_id(tags)] pub unsafe fn tags(&self) -> Id, Shared>; #[method_id(bundle)] pub unsafe fn bundle(&self) -> Id; - # [method (beginAccessingResourcesWithCompletionHandler :)] + #[method(beginAccessingResourcesWithCompletionHandler:)] pub unsafe fn beginAccessingResourcesWithCompletionHandler( &self, completionHandler: TodoBlock, ); - # [method (conditionallyBeginAccessingResourcesWithCompletionHandler :)] + #[method(conditionallyBeginAccessingResourcesWithCompletionHandler:)] pub unsafe fn conditionallyBeginAccessingResourcesWithCompletionHandler( &self, completionHandler: TodoBlock, @@ -290,13 +290,13 @@ extern_methods!( extern_methods!( #[doc = "NSBundleResourceRequestAdditions"] unsafe impl NSBundle { - # [method (setPreservationPriority : forTags :)] + #[method(setPreservationPriority:forTags:)] pub unsafe fn setPreservationPriority_forTags( &self, priority: c_double, tags: &NSSet, ); - # [method (preservationPriorityForTag :)] + #[method(preservationPriorityForTag:)] pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double; } ); diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 4423a1ffa..8065fbed8 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -13,63 +13,63 @@ extern_class!( ); extern_methods!( unsafe impl NSByteCountFormatter { - # [method_id (stringFromByteCount : countStyle :)] + #[method_id(stringFromByteCount:countStyle:)] pub unsafe fn stringFromByteCount_countStyle( byteCount: c_longlong, countStyle: NSByteCountFormatterCountStyle, ) -> Id; - # [method_id (stringFromByteCount :)] + #[method_id(stringFromByteCount:)] pub unsafe fn stringFromByteCount(&self, byteCount: c_longlong) -> Id; - # [method_id (stringFromMeasurement : countStyle :)] + #[method_id(stringFromMeasurement:countStyle:)] pub unsafe fn stringFromMeasurement_countStyle( measurement: &NSMeasurement, countStyle: NSByteCountFormatterCountStyle, ) -> Id; - # [method_id (stringFromMeasurement :)] + #[method_id(stringFromMeasurement:)] pub unsafe fn stringFromMeasurement( &self, measurement: &NSMeasurement, ) -> Id; - # [method_id (stringForObjectValue :)] + #[method_id(stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, ) -> Option>; #[method(allowedUnits)] pub unsafe fn allowedUnits(&self) -> NSByteCountFormatterUnits; - # [method (setAllowedUnits :)] + #[method(setAllowedUnits:)] pub unsafe fn setAllowedUnits(&self, allowedUnits: NSByteCountFormatterUnits); #[method(countStyle)] pub unsafe fn countStyle(&self) -> NSByteCountFormatterCountStyle; - # [method (setCountStyle :)] + #[method(setCountStyle:)] pub unsafe fn setCountStyle(&self, countStyle: NSByteCountFormatterCountStyle); #[method(allowsNonnumericFormatting)] pub unsafe fn allowsNonnumericFormatting(&self) -> bool; - # [method (setAllowsNonnumericFormatting :)] + #[method(setAllowsNonnumericFormatting:)] pub unsafe fn setAllowsNonnumericFormatting(&self, allowsNonnumericFormatting: bool); #[method(includesUnit)] pub unsafe fn includesUnit(&self) -> bool; - # [method (setIncludesUnit :)] + #[method(setIncludesUnit:)] pub unsafe fn setIncludesUnit(&self, includesUnit: bool); #[method(includesCount)] pub unsafe fn includesCount(&self) -> bool; - # [method (setIncludesCount :)] + #[method(setIncludesCount:)] pub unsafe fn setIncludesCount(&self, includesCount: bool); #[method(includesActualByteCount)] pub unsafe fn includesActualByteCount(&self) -> bool; - # [method (setIncludesActualByteCount :)] + #[method(setIncludesActualByteCount:)] pub unsafe fn setIncludesActualByteCount(&self, includesActualByteCount: bool); #[method(isAdaptive)] pub unsafe fn isAdaptive(&self) -> bool; - # [method (setAdaptive :)] + #[method(setAdaptive:)] pub unsafe fn setAdaptive(&self, adaptive: bool); #[method(zeroPadsFractionDigits)] pub unsafe fn zeroPadsFractionDigits(&self) -> bool; - # [method (setZeroPadsFractionDigits :)] + #[method(setZeroPadsFractionDigits:)] pub unsafe fn setZeroPadsFractionDigits(&self, zeroPadsFractionDigits: bool); #[method(formattingContext)] pub unsafe fn formattingContext(&self) -> NSFormattingContext; - # [method (setFormattingContext :)] + #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); } ); diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 65b648826..718552de5 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -15,33 +15,33 @@ extern_methods!( unsafe impl NSCache { #[method_id(name)] pub unsafe fn name(&self) -> Id; - # [method (setName :)] + #[method(setName:)] pub unsafe fn setName(&self, name: &NSString); #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>); - # [method_id (objectForKey :)] + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, key: &KeyType) -> Option>; - # [method (setObject : forKey :)] + #[method(setObject:forKey:)] pub unsafe fn setObject_forKey(&self, obj: &ObjectType, key: &KeyType); - # [method (setObject : forKey : cost :)] + #[method(setObject:forKey:cost:)] pub unsafe fn setObject_forKey_cost(&self, obj: &ObjectType, key: &KeyType, g: NSUInteger); - # [method (removeObjectForKey :)] + #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, key: &KeyType); #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); #[method(totalCostLimit)] pub unsafe fn totalCostLimit(&self) -> NSUInteger; - # [method (setTotalCostLimit :)] + #[method(setTotalCostLimit:)] pub unsafe fn setTotalCostLimit(&self, totalCostLimit: NSUInteger); #[method(countLimit)] pub unsafe fn countLimit(&self) -> NSUInteger; - # [method (setCountLimit :)] + #[method(setCountLimit:)] pub unsafe fn setCountLimit(&self, countLimit: NSUInteger); #[method(evictsObjectsWithDiscardedContent)] pub unsafe fn evictsObjectsWithDiscardedContent(&self) -> bool; - # [method (setEvictsObjectsWithDiscardedContent :)] + #[method(setEvictsObjectsWithDiscardedContent:)] pub unsafe fn setEvictsObjectsWithDiscardedContent( &self, evictsObjectsWithDiscardedContent: bool, diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index df16c8e31..a5a96b1df 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -25,13 +25,13 @@ extern_methods!( pub unsafe fn currentCalendar() -> Id; #[method_id(autoupdatingCurrentCalendar)] pub unsafe fn autoupdatingCurrentCalendar() -> Id; - # [method_id (calendarWithIdentifier :)] + #[method_id(calendarWithIdentifier:)] pub unsafe fn calendarWithIdentifier( calendarIdentifierConstant: &NSCalendarIdentifier, ) -> Option>; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithCalendarIdentifier :)] + #[method_id(initWithCalendarIdentifier:)] pub unsafe fn initWithCalendarIdentifier( &self, ident: &NSCalendarIdentifier, @@ -40,19 +40,19 @@ extern_methods!( pub unsafe fn calendarIdentifier(&self) -> Id; #[method_id(locale)] pub unsafe fn locale(&self) -> Option>; - # [method (setLocale :)] + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Id; - # [method (setTimeZone :)] + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: &NSTimeZone); #[method(firstWeekday)] pub unsafe fn firstWeekday(&self) -> NSUInteger; - # [method (setFirstWeekday :)] + #[method(setFirstWeekday:)] pub unsafe fn setFirstWeekday(&self, firstWeekday: NSUInteger); #[method(minimumDaysInFirstWeek)] pub unsafe fn minimumDaysInFirstWeek(&self) -> NSUInteger; - # [method (setMinimumDaysInFirstWeek :)] + #[method(setMinimumDaysInFirstWeek:)] pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger); #[method_id(eraSymbols)] pub unsafe fn eraSymbols(&self) -> Id, Shared>; @@ -94,25 +94,25 @@ extern_methods!( pub unsafe fn AMSymbol(&self) -> Id; #[method_id(PMSymbol)] pub unsafe fn PMSymbol(&self) -> Id; - # [method (minimumRangeOfUnit :)] + #[method(minimumRangeOfUnit:)] pub unsafe fn minimumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange; - # [method (maximumRangeOfUnit :)] + #[method(maximumRangeOfUnit:)] pub unsafe fn maximumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange; - # [method (rangeOfUnit : inUnit : forDate :)] + #[method(rangeOfUnit:inUnit:forDate:)] pub unsafe fn rangeOfUnit_inUnit_forDate( &self, smaller: NSCalendarUnit, larger: NSCalendarUnit, date: &NSDate, ) -> NSRange; - # [method (ordinalityOfUnit : inUnit : forDate :)] + #[method(ordinalityOfUnit:inUnit:forDate:)] pub unsafe fn ordinalityOfUnit_inUnit_forDate( &self, smaller: NSCalendarUnit, larger: NSCalendarUnit, date: &NSDate, ) -> NSUInteger; - # [method (rangeOfUnit : startDate : interval : forDate :)] + #[method(rangeOfUnit:startDate:interval:forDate:)] pub unsafe fn rangeOfUnit_startDate_interval_forDate( &self, unit: NSCalendarUnit, @@ -120,25 +120,25 @@ extern_methods!( tip: *mut NSTimeInterval, date: &NSDate, ) -> bool; - # [method_id (dateFromComponents :)] + #[method_id(dateFromComponents:)] pub unsafe fn dateFromComponents( &self, comps: &NSDateComponents, ) -> Option>; - # [method_id (components : fromDate :)] + #[method_id(components:fromDate:)] pub unsafe fn components_fromDate( &self, unitFlags: NSCalendarUnit, date: &NSDate, ) -> Id; - # [method_id (dateByAddingComponents : toDate : options :)] + #[method_id(dateByAddingComponents:toDate:options:)] pub unsafe fn dateByAddingComponents_toDate_options( &self, comps: &NSDateComponents, date: &NSDate, opts: NSCalendarOptions, ) -> Option>; - # [method_id (components : fromDate : toDate : options :)] + #[method_id(components:fromDate:toDate:options:)] pub unsafe fn components_fromDate_toDate_options( &self, unitFlags: NSCalendarUnit, @@ -146,7 +146,7 @@ extern_methods!( resultDate: &NSDate, opts: NSCalendarOptions, ) -> Id; - # [method (getEra : year : month : day : fromDate :)] + #[method(getEra:year:month:day:fromDate:)] pub unsafe fn getEra_year_month_day_fromDate( &self, eraValuePointer: *mut NSInteger, @@ -155,7 +155,7 @@ extern_methods!( dayValuePointer: *mut NSInteger, date: &NSDate, ); - # [method (getEra : yearForWeekOfYear : weekOfYear : weekday : fromDate :)] + #[method(getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:)] pub unsafe fn getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate( &self, eraValuePointer: *mut NSInteger, @@ -164,7 +164,7 @@ extern_methods!( weekdayValuePointer: *mut NSInteger, date: &NSDate, ); - # [method (getHour : minute : second : nanosecond : fromDate :)] + #[method(getHour:minute:second:nanosecond:fromDate:)] pub unsafe fn getHour_minute_second_nanosecond_fromDate( &self, hourValuePointer: *mut NSInteger, @@ -173,9 +173,9 @@ extern_methods!( nanosecondValuePointer: *mut NSInteger, date: &NSDate, ); - # [method (component : fromDate :)] + #[method(component:fromDate:)] pub unsafe fn component_fromDate(&self, unit: NSCalendarUnit, date: &NSDate) -> NSInteger; - # [method_id (dateWithEra : year : month : day : hour : minute : second : nanosecond :)] + #[method_id(dateWithEra:year:month:day:hour:minute:second:nanosecond:)] pub unsafe fn dateWithEra_year_month_day_hour_minute_second_nanosecond( &self, eraValue: NSInteger, @@ -187,7 +187,7 @@ extern_methods!( secondValue: NSInteger, nanosecondValue: NSInteger, ) -> Option>; - # [method_id (dateWithEra : yearForWeekOfYear : weekOfYear : weekday : hour : minute : second : nanosecond :)] + #[method_id(dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:)] pub unsafe fn dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond( &self, eraValue: NSInteger, @@ -199,46 +199,46 @@ extern_methods!( secondValue: NSInteger, nanosecondValue: NSInteger, ) -> Option>; - # [method_id (startOfDayForDate :)] + #[method_id(startOfDayForDate:)] pub unsafe fn startOfDayForDate(&self, date: &NSDate) -> Id; - # [method_id (componentsInTimeZone : fromDate :)] + #[method_id(componentsInTimeZone:fromDate:)] pub unsafe fn componentsInTimeZone_fromDate( &self, timezone: &NSTimeZone, date: &NSDate, ) -> Id; - # [method (compareDate : toDate : toUnitGranularity :)] + #[method(compareDate:toDate:toUnitGranularity:)] pub unsafe fn compareDate_toDate_toUnitGranularity( &self, date1: &NSDate, date2: &NSDate, unit: NSCalendarUnit, ) -> NSComparisonResult; - # [method (isDate : equalToDate : toUnitGranularity :)] + #[method(isDate:equalToDate:toUnitGranularity:)] pub unsafe fn isDate_equalToDate_toUnitGranularity( &self, date1: &NSDate, date2: &NSDate, unit: NSCalendarUnit, ) -> bool; - # [method (isDate : inSameDayAsDate :)] + #[method(isDate:inSameDayAsDate:)] pub unsafe fn isDate_inSameDayAsDate(&self, date1: &NSDate, date2: &NSDate) -> bool; - # [method (isDateInToday :)] + #[method(isDateInToday:)] pub unsafe fn isDateInToday(&self, date: &NSDate) -> bool; - # [method (isDateInYesterday :)] + #[method(isDateInYesterday:)] pub unsafe fn isDateInYesterday(&self, date: &NSDate) -> bool; - # [method (isDateInTomorrow :)] + #[method(isDateInTomorrow:)] pub unsafe fn isDateInTomorrow(&self, date: &NSDate) -> bool; - # [method (isDateInWeekend :)] + #[method(isDateInWeekend:)] pub unsafe fn isDateInWeekend(&self, date: &NSDate) -> bool; - # [method (rangeOfWeekendStartDate : interval : containingDate :)] + #[method(rangeOfWeekendStartDate:interval:containingDate:)] pub unsafe fn rangeOfWeekendStartDate_interval_containingDate( &self, datep: Option<&mut Option>>, tip: *mut NSTimeInterval, date: &NSDate, ) -> bool; - # [method (nextWeekendStartDate : interval : options : afterDate :)] + #[method(nextWeekendStartDate:interval:options:afterDate:)] pub unsafe fn nextWeekendStartDate_interval_options_afterDate( &self, datep: Option<&mut Option>>, @@ -246,7 +246,7 @@ extern_methods!( options: NSCalendarOptions, date: &NSDate, ) -> bool; - # [method_id (components : fromDateComponents : toDateComponents : options :)] + #[method_id(components:fromDateComponents:toDateComponents:options:)] pub unsafe fn components_fromDateComponents_toDateComponents_options( &self, unitFlags: NSCalendarUnit, @@ -254,7 +254,7 @@ extern_methods!( resultDateComp: &NSDateComponents, options: NSCalendarOptions, ) -> Id; - # [method_id (dateByAddingUnit : value : toDate : options :)] + #[method_id(dateByAddingUnit:value:toDate:options:)] pub unsafe fn dateByAddingUnit_value_toDate_options( &self, unit: NSCalendarUnit, @@ -262,7 +262,7 @@ extern_methods!( date: &NSDate, options: NSCalendarOptions, ) -> Option>; - # [method (enumerateDatesStartingAfterDate : matchingComponents : options : usingBlock :)] + #[method(enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:)] pub unsafe fn enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock( &self, start: &NSDate, @@ -270,14 +270,14 @@ extern_methods!( opts: NSCalendarOptions, block: TodoBlock, ); - # [method_id (nextDateAfterDate : matchingComponents : options :)] + #[method_id(nextDateAfterDate:matchingComponents:options:)] pub unsafe fn nextDateAfterDate_matchingComponents_options( &self, date: &NSDate, comps: &NSDateComponents, options: NSCalendarOptions, ) -> Option>; - # [method_id (nextDateAfterDate : matchingUnit : value : options :)] + #[method_id(nextDateAfterDate:matchingUnit:value:options:)] pub unsafe fn nextDateAfterDate_matchingUnit_value_options( &self, date: &NSDate, @@ -285,7 +285,7 @@ extern_methods!( value: NSInteger, options: NSCalendarOptions, ) -> Option>; - # [method_id (nextDateAfterDate : matchingHour : minute : second : options :)] + #[method_id(nextDateAfterDate:matchingHour:minute:second:options:)] pub unsafe fn nextDateAfterDate_matchingHour_minute_second_options( &self, date: &NSDate, @@ -294,7 +294,7 @@ extern_methods!( secondValue: NSInteger, options: NSCalendarOptions, ) -> Option>; - # [method_id (dateBySettingUnit : value : ofDate : options :)] + #[method_id(dateBySettingUnit:value:ofDate:options:)] pub unsafe fn dateBySettingUnit_value_ofDate_options( &self, unit: NSCalendarUnit, @@ -302,7 +302,7 @@ extern_methods!( date: &NSDate, opts: NSCalendarOptions, ) -> Option>; - # [method_id (dateBySettingHour : minute : second : ofDate : options :)] + #[method_id(dateBySettingHour:minute:second:ofDate:options:)] pub unsafe fn dateBySettingHour_minute_second_ofDate_options( &self, h: NSInteger, @@ -311,7 +311,7 @@ extern_methods!( date: &NSDate, opts: NSCalendarOptions, ) -> Option>; - # [method (date : matchesComponents :)] + #[method(date:matchesComponents:)] pub unsafe fn date_matchesComponents( &self, date: &NSDate, @@ -330,85 +330,85 @@ extern_methods!( unsafe impl NSDateComponents { #[method_id(calendar)] pub unsafe fn calendar(&self) -> Option>; - # [method (setCalendar :)] + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Option>; - # [method (setTimeZone :)] + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); #[method(era)] pub unsafe fn era(&self) -> NSInteger; - # [method (setEra :)] + #[method(setEra:)] pub unsafe fn setEra(&self, era: NSInteger); #[method(year)] pub unsafe fn year(&self) -> NSInteger; - # [method (setYear :)] + #[method(setYear:)] pub unsafe fn setYear(&self, year: NSInteger); #[method(month)] pub unsafe fn month(&self) -> NSInteger; - # [method (setMonth :)] + #[method(setMonth:)] pub unsafe fn setMonth(&self, month: NSInteger); #[method(day)] pub unsafe fn day(&self) -> NSInteger; - # [method (setDay :)] + #[method(setDay:)] pub unsafe fn setDay(&self, day: NSInteger); #[method(hour)] pub unsafe fn hour(&self) -> NSInteger; - # [method (setHour :)] + #[method(setHour:)] pub unsafe fn setHour(&self, hour: NSInteger); #[method(minute)] pub unsafe fn minute(&self) -> NSInteger; - # [method (setMinute :)] + #[method(setMinute:)] pub unsafe fn setMinute(&self, minute: NSInteger); #[method(second)] pub unsafe fn second(&self) -> NSInteger; - # [method (setSecond :)] + #[method(setSecond:)] pub unsafe fn setSecond(&self, second: NSInteger); #[method(nanosecond)] pub unsafe fn nanosecond(&self) -> NSInteger; - # [method (setNanosecond :)] + #[method(setNanosecond:)] pub unsafe fn setNanosecond(&self, nanosecond: NSInteger); #[method(weekday)] pub unsafe fn weekday(&self) -> NSInteger; - # [method (setWeekday :)] + #[method(setWeekday:)] pub unsafe fn setWeekday(&self, weekday: NSInteger); #[method(weekdayOrdinal)] pub unsafe fn weekdayOrdinal(&self) -> NSInteger; - # [method (setWeekdayOrdinal :)] + #[method(setWeekdayOrdinal:)] pub unsafe fn setWeekdayOrdinal(&self, weekdayOrdinal: NSInteger); #[method(quarter)] pub unsafe fn quarter(&self) -> NSInteger; - # [method (setQuarter :)] + #[method(setQuarter:)] pub unsafe fn setQuarter(&self, quarter: NSInteger); #[method(weekOfMonth)] pub unsafe fn weekOfMonth(&self) -> NSInteger; - # [method (setWeekOfMonth :)] + #[method(setWeekOfMonth:)] pub unsafe fn setWeekOfMonth(&self, weekOfMonth: NSInteger); #[method(weekOfYear)] pub unsafe fn weekOfYear(&self) -> NSInteger; - # [method (setWeekOfYear :)] + #[method(setWeekOfYear:)] pub unsafe fn setWeekOfYear(&self, weekOfYear: NSInteger); #[method(yearForWeekOfYear)] pub unsafe fn yearForWeekOfYear(&self) -> NSInteger; - # [method (setYearForWeekOfYear :)] + #[method(setYearForWeekOfYear:)] pub unsafe fn setYearForWeekOfYear(&self, yearForWeekOfYear: NSInteger); #[method(isLeapMonth)] pub unsafe fn isLeapMonth(&self) -> bool; - # [method (setLeapMonth :)] + #[method(setLeapMonth:)] pub unsafe fn setLeapMonth(&self, leapMonth: bool); #[method_id(date)] pub unsafe fn date(&self) -> Option>; #[method(week)] pub unsafe fn week(&self) -> NSInteger; - # [method (setWeek :)] + #[method(setWeek:)] pub unsafe fn setWeek(&self, v: NSInteger); - # [method (setValue : forComponent :)] + #[method(setValue:forComponent:)] pub unsafe fn setValue_forComponent(&self, value: NSInteger, unit: NSCalendarUnit); - # [method (valueForComponent :)] + #[method(valueForComponent:)] pub unsafe fn valueForComponent(&self, unit: NSCalendarUnit) -> NSInteger; #[method(isValidDate)] pub unsafe fn isValidDate(&self) -> bool; - # [method (isValidDateInCalendar :)] + #[method(isValidDateInCalendar:)] pub unsafe fn isValidDateInCalendar(&self, calendar: &NSCalendar) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index b83fc902c..2a648105c 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -17,18 +17,18 @@ extern_methods!( unsafe impl NSCalendarDate { #[method_id(calendarDate)] pub unsafe fn calendarDate() -> Id; - # [method_id (dateWithString : calendarFormat : locale :)] + #[method_id(dateWithString:calendarFormat:locale:)] pub unsafe fn dateWithString_calendarFormat_locale( description: &NSString, format: &NSString, locale: Option<&Object>, ) -> Option>; - # [method_id (dateWithString : calendarFormat :)] + #[method_id(dateWithString:calendarFormat:)] pub unsafe fn dateWithString_calendarFormat( description: &NSString, format: &NSString, ) -> Option>; - # [method_id (dateWithYear : month : day : hour : minute : second : timeZone :)] + #[method_id(dateWithYear:month:day:hour:minute:second:timeZone:)] pub unsafe fn dateWithYear_month_day_hour_minute_second_timeZone( year: NSInteger, month: NSUInteger, @@ -38,7 +38,7 @@ extern_methods!( second: NSUInteger, aTimeZone: Option<&NSTimeZone>, ) -> Id; - # [method_id (dateByAddingYears : months : days : hours : minutes : seconds :)] + #[method_id(dateByAddingYears:months:days:hours:minutes:seconds:)] pub unsafe fn dateByAddingYears_months_days_hours_minutes_seconds( &self, year: NSInteger, @@ -68,38 +68,38 @@ extern_methods!( pub unsafe fn yearOfCommonEra(&self) -> NSInteger; #[method_id(calendarFormat)] pub unsafe fn calendarFormat(&self) -> Id; - # [method_id (descriptionWithCalendarFormat : locale :)] + #[method_id(descriptionWithCalendarFormat:locale:)] pub unsafe fn descriptionWithCalendarFormat_locale( &self, format: &NSString, locale: Option<&Object>, ) -> Id; - # [method_id (descriptionWithCalendarFormat :)] + #[method_id(descriptionWithCalendarFormat:)] pub unsafe fn descriptionWithCalendarFormat( &self, format: &NSString, ) -> Id; - # [method_id (descriptionWithLocale :)] + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Id; - # [method_id (initWithString : calendarFormat : locale :)] + #[method_id(initWithString:calendarFormat:locale:)] pub unsafe fn initWithString_calendarFormat_locale( &self, description: &NSString, format: &NSString, locale: Option<&Object>, ) -> Option>; - # [method_id (initWithString : calendarFormat :)] + #[method_id(initWithString:calendarFormat:)] pub unsafe fn initWithString_calendarFormat( &self, description: &NSString, format: &NSString, ) -> Option>; - # [method_id (initWithString :)] + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, description: &NSString) -> Option>; - # [method_id (initWithYear : month : day : hour : minute : second : timeZone :)] + #[method_id(initWithYear:month:day:hour:minute:second:timeZone:)] pub unsafe fn initWithYear_month_day_hour_minute_second_timeZone( &self, year: NSInteger, @@ -110,11 +110,11 @@ extern_methods!( second: NSUInteger, aTimeZone: Option<&NSTimeZone>, ) -> Id; - # [method (setCalendarFormat :)] + #[method(setCalendarFormat:)] pub unsafe fn setCalendarFormat(&self, format: Option<&NSString>); - # [method (setTimeZone :)] + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, aTimeZone: Option<&NSTimeZone>); - # [method (years : months : days : hours : minutes : seconds : sinceDate :)] + #[method(years:months:days:hours:minutes:seconds:sinceDate:)] pub unsafe fn years_months_days_hours_minutes_seconds_sinceDate( &self, yp: *mut NSInteger, @@ -134,31 +134,31 @@ extern_methods!( extern_methods!( #[doc = "NSCalendarDateExtras"] unsafe impl NSDate { - # [method_id (dateWithNaturalLanguageString : locale :)] + #[method_id(dateWithNaturalLanguageString:locale:)] pub unsafe fn dateWithNaturalLanguageString_locale( string: &NSString, locale: Option<&Object>, ) -> Option>; - # [method_id (dateWithNaturalLanguageString :)] + #[method_id(dateWithNaturalLanguageString:)] pub unsafe fn dateWithNaturalLanguageString( string: &NSString, ) -> Option>; - # [method_id (dateWithString :)] + #[method_id(dateWithString:)] pub unsafe fn dateWithString(aString: &NSString) -> Id; - # [method_id (dateWithCalendarFormat : timeZone :)] + #[method_id(dateWithCalendarFormat:timeZone:)] pub unsafe fn dateWithCalendarFormat_timeZone( &self, format: Option<&NSString>, aTimeZone: Option<&NSTimeZone>, ) -> Id; - # [method_id (descriptionWithCalendarFormat : timeZone : locale :)] + #[method_id(descriptionWithCalendarFormat:timeZone:locale:)] pub unsafe fn descriptionWithCalendarFormat_timeZone_locale( &self, format: Option<&NSString>, aTimeZone: Option<&NSTimeZone>, locale: Option<&Object>, ) -> Option>; - # [method_id (initWithString :)] + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, description: &NSString) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 7b7424e8d..0c7461460 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -46,33 +46,33 @@ extern_methods!( pub unsafe fn symbolCharacterSet() -> Id; #[method_id(newlineCharacterSet)] pub unsafe fn newlineCharacterSet() -> Id; - # [method_id (characterSetWithRange :)] + #[method_id(characterSetWithRange:)] pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id; - # [method_id (characterSetWithCharactersInString :)] + #[method_id(characterSetWithCharactersInString:)] pub unsafe fn characterSetWithCharactersInString( aString: &NSString, ) -> Id; - # [method_id (characterSetWithBitmapRepresentation :)] + #[method_id(characterSetWithBitmapRepresentation:)] pub unsafe fn characterSetWithBitmapRepresentation( data: &NSData, ) -> Id; - # [method_id (characterSetWithContentsOfFile :)] + #[method_id(characterSetWithContentsOfFile:)] pub unsafe fn characterSetWithContentsOfFile( fName: &NSString, ) -> Option>; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; - # [method (characterIsMember :)] + #[method(characterIsMember:)] pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool; #[method_id(bitmapRepresentation)] pub unsafe fn bitmapRepresentation(&self) -> Id; #[method_id(invertedSet)] pub unsafe fn invertedSet(&self) -> Id; - # [method (longCharacterIsMember :)] + #[method(longCharacterIsMember:)] pub unsafe fn longCharacterIsMember(&self, theLongChar: UTF32Char) -> bool; - # [method (isSupersetOfSet :)] + #[method(isSupersetOfSet:)] pub unsafe fn isSupersetOfSet(&self, theOtherSet: &NSCharacterSet) -> bool; - # [method (hasMemberInPlane :)] + #[method(hasMemberInPlane:)] pub unsafe fn hasMemberInPlane(&self, thePlane: u8) -> bool; } ); @@ -85,17 +85,17 @@ extern_class!( ); extern_methods!( unsafe impl NSMutableCharacterSet { - # [method (addCharactersInRange :)] + #[method(addCharactersInRange:)] pub unsafe fn addCharactersInRange(&self, aRange: NSRange); - # [method (removeCharactersInRange :)] + #[method(removeCharactersInRange:)] pub unsafe fn removeCharactersInRange(&self, aRange: NSRange); - # [method (addCharactersInString :)] + #[method(addCharactersInString:)] pub unsafe fn addCharactersInString(&self, aString: &NSString); - # [method (removeCharactersInString :)] + #[method(removeCharactersInString:)] pub unsafe fn removeCharactersInString(&self, aString: &NSString); - # [method (formUnionWithCharacterSet :)] + #[method(formUnionWithCharacterSet:)] pub unsafe fn formUnionWithCharacterSet(&self, otherSet: &NSCharacterSet); - # [method (formIntersectionWithCharacterSet :)] + #[method(formIntersectionWithCharacterSet:)] pub unsafe fn formIntersectionWithCharacterSet(&self, otherSet: &NSCharacterSet); #[method(invert)] pub unsafe fn invert(&self); @@ -129,17 +129,17 @@ extern_methods!( pub unsafe fn symbolCharacterSet() -> Id; #[method_id(newlineCharacterSet)] pub unsafe fn newlineCharacterSet() -> Id; - # [method_id (characterSetWithRange :)] + #[method_id(characterSetWithRange:)] pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id; - # [method_id (characterSetWithCharactersInString :)] + #[method_id(characterSetWithCharactersInString:)] pub unsafe fn characterSetWithCharactersInString( aString: &NSString, ) -> Id; - # [method_id (characterSetWithBitmapRepresentation :)] + #[method_id(characterSetWithBitmapRepresentation:)] pub unsafe fn characterSetWithBitmapRepresentation( data: &NSData, ) -> Id; - # [method_id (characterSetWithContentsOfFile :)] + #[method_id(characterSetWithContentsOfFile:)] pub unsafe fn characterSetWithContentsOfFile( fName: &NSString, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index 5d4ab4024..a5b635bfc 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -17,14 +17,14 @@ extern_class!( ); extern_methods!( unsafe impl NSClassDescription { - # [method (registerClassDescription : forClass :)] + #[method(registerClassDescription:forClass:)] pub unsafe fn registerClassDescription_forClass( description: &NSClassDescription, aClass: &Class, ); #[method(invalidateClassDescriptionCache)] pub unsafe fn invalidateClassDescriptionCache(); - # [method_id (classDescriptionForClass :)] + #[method_id(classDescriptionForClass:)] pub unsafe fn classDescriptionForClass( aClass: &Class, ) -> Option>; @@ -34,7 +34,7 @@ extern_methods!( pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared>; #[method_id(toManyRelationshipKeys)] pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared>; - # [method_id (inverseForRelationshipKey :)] + #[method_id(inverseForRelationshipKey:)] pub unsafe fn inverseForRelationshipKey( &self, relationshipKey: &NSString, @@ -52,7 +52,7 @@ extern_methods!( pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared>; #[method_id(toManyRelationshipKeys)] pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared>; - # [method_id (inverseForRelationshipKey :)] + #[method_id(inverseForRelationshipKey:)] pub unsafe fn inverseForRelationshipKey( &self, relationshipKey: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index d47500b05..e5556b289 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -15,72 +15,72 @@ extern_class!( ); extern_methods!( unsafe impl NSCoder { - # [method (encodeValueOfObjCType : at :)] + #[method(encodeValueOfObjCType:at:)] pub unsafe fn encodeValueOfObjCType_at( &self, type_: NonNull, addr: NonNull, ); - # [method (encodeDataObject :)] + #[method(encodeDataObject:)] pub unsafe fn encodeDataObject(&self, data: &NSData); #[method_id(decodeDataObject)] pub unsafe fn decodeDataObject(&self) -> Option>; - # [method (decodeValueOfObjCType : at : size :)] + #[method(decodeValueOfObjCType:at:size:)] pub unsafe fn decodeValueOfObjCType_at_size( &self, type_: NonNull, data: NonNull, size: NSUInteger, ); - # [method (versionForClassName :)] + #[method(versionForClassName:)] pub unsafe fn versionForClassName(&self, className: &NSString) -> NSInteger; } ); extern_methods!( #[doc = "NSExtendedCoder"] unsafe impl NSCoder { - # [method (encodeObject :)] + #[method(encodeObject:)] pub unsafe fn encodeObject(&self, object: Option<&Object>); - # [method (encodeRootObject :)] + #[method(encodeRootObject:)] pub unsafe fn encodeRootObject(&self, rootObject: &Object); - # [method (encodeBycopyObject :)] + #[method(encodeBycopyObject:)] pub unsafe fn encodeBycopyObject(&self, anObject: Option<&Object>); - # [method (encodeByrefObject :)] + #[method(encodeByrefObject:)] pub unsafe fn encodeByrefObject(&self, anObject: Option<&Object>); - # [method (encodeConditionalObject :)] + #[method(encodeConditionalObject:)] pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>); - # [method (encodeArrayOfObjCType : count : at :)] + #[method(encodeArrayOfObjCType:count:at:)] pub unsafe fn encodeArrayOfObjCType_count_at( &self, type_: NonNull, count: NSUInteger, array: NonNull, ); - # [method (encodeBytes : length :)] + #[method(encodeBytes:length:)] pub unsafe fn encodeBytes_length(&self, byteaddr: *mut c_void, length: NSUInteger); #[method_id(decodeObject)] pub unsafe fn decodeObject(&self) -> Option>; - # [method_id (decodeTopLevelObjectAndReturnError :)] + #[method_id(decodeTopLevelObjectAndReturnError:)] pub unsafe fn decodeTopLevelObjectAndReturnError( &self, ) -> Result, Id>; - # [method (decodeArrayOfObjCType : count : at :)] + #[method(decodeArrayOfObjCType:count:at:)] pub unsafe fn decodeArrayOfObjCType_count_at( &self, itemType: NonNull, count: NSUInteger, array: NonNull, ); - # [method (decodeBytesWithReturnedLength :)] + #[method(decodeBytesWithReturnedLength:)] pub unsafe fn decodeBytesWithReturnedLength( &self, lengthp: NonNull, ) -> *mut c_void; - # [method (encodePropertyList :)] + #[method(encodePropertyList:)] pub unsafe fn encodePropertyList(&self, aPropertyList: &Object); #[method_id(decodePropertyList)] pub unsafe fn decodePropertyList(&self) -> Option>; - # [method (setObjectZone :)] + #[method(setObjectZone:)] pub unsafe fn setObjectZone(&self, zone: *mut NSZone); #[method(objectZone)] pub unsafe fn objectZone(&self) -> *mut NSZone; @@ -88,122 +88,122 @@ extern_methods!( pub unsafe fn systemVersion(&self) -> c_uint; #[method(allowsKeyedCoding)] pub unsafe fn allowsKeyedCoding(&self) -> bool; - # [method (encodeObject : forKey :)] + #[method(encodeObject:forKey:)] pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString); - # [method (encodeConditionalObject : forKey :)] + #[method(encodeConditionalObject:forKey:)] pub unsafe fn encodeConditionalObject_forKey( &self, object: Option<&Object>, key: &NSString, ); - # [method (encodeBool : forKey :)] + #[method(encodeBool:forKey:)] pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString); - # [method (encodeInt : forKey :)] + #[method(encodeInt:forKey:)] pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString); # [method (encodeInt32 : forKey :)] pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString); # [method (encodeInt64 : forKey :)] pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString); - # [method (encodeFloat : forKey :)] + #[method(encodeFloat:forKey:)] pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString); - # [method (encodeDouble : forKey :)] + #[method(encodeDouble:forKey:)] pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString); - # [method (encodeBytes : length : forKey :)] + #[method(encodeBytes:length:forKey:)] pub unsafe fn encodeBytes_length_forKey( &self, bytes: *mut u8, length: NSUInteger, key: &NSString, ); - # [method (containsValueForKey :)] + #[method(containsValueForKey:)] pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; - # [method_id (decodeObjectForKey :)] + #[method_id(decodeObjectForKey:)] pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option>; - # [method_id (decodeTopLevelObjectForKey : error :)] + #[method_id(decodeTopLevelObjectForKey:error:)] pub unsafe fn decodeTopLevelObjectForKey_error( &self, key: &NSString, ) -> Result, Id>; - # [method (decodeBoolForKey :)] + #[method(decodeBoolForKey:)] pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool; - # [method (decodeIntForKey :)] + #[method(decodeIntForKey:)] pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int; # [method (decodeInt32ForKey :)] pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32; # [method (decodeInt64ForKey :)] pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t; - # [method (decodeFloatForKey :)] + #[method(decodeFloatForKey:)] pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float; - # [method (decodeDoubleForKey :)] + #[method(decodeDoubleForKey:)] pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double; - # [method (decodeBytesForKey : returnedLength :)] + #[method(decodeBytesForKey:returnedLength:)] pub unsafe fn decodeBytesForKey_returnedLength( &self, key: &NSString, lengthp: *mut NSUInteger, ) -> *mut u8; - # [method (encodeInteger : forKey :)] + #[method(encodeInteger:forKey:)] pub unsafe fn encodeInteger_forKey(&self, value: NSInteger, key: &NSString); - # [method (decodeIntegerForKey :)] + #[method(decodeIntegerForKey:)] pub unsafe fn decodeIntegerForKey(&self, key: &NSString) -> NSInteger; #[method(requiresSecureCoding)] pub unsafe fn requiresSecureCoding(&self) -> bool; - # [method_id (decodeObjectOfClass : forKey :)] + #[method_id(decodeObjectOfClass:forKey:)] pub unsafe fn decodeObjectOfClass_forKey( &self, aClass: &Class, key: &NSString, ) -> Option>; - # [method_id (decodeTopLevelObjectOfClass : forKey : error :)] + #[method_id(decodeTopLevelObjectOfClass:forKey:error:)] pub unsafe fn decodeTopLevelObjectOfClass_forKey_error( &self, aClass: &Class, key: &NSString, ) -> Result, Id>; - # [method_id (decodeArrayOfObjectsOfClass : forKey :)] + #[method_id(decodeArrayOfObjectsOfClass:forKey:)] pub unsafe fn decodeArrayOfObjectsOfClass_forKey( &self, cls: &Class, key: &NSString, ) -> Option>; - # [method_id (decodeDictionaryWithKeysOfClass : objectsOfClass : forKey :)] + #[method_id(decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:)] pub unsafe fn decodeDictionaryWithKeysOfClass_objectsOfClass_forKey( &self, keyCls: &Class, objectCls: &Class, key: &NSString, ) -> Option>; - # [method_id (decodeObjectOfClasses : forKey :)] + #[method_id(decodeObjectOfClasses:forKey:)] pub unsafe fn decodeObjectOfClasses_forKey( &self, classes: Option<&NSSet>, key: &NSString, ) -> Option>; - # [method_id (decodeTopLevelObjectOfClasses : forKey : error :)] + #[method_id(decodeTopLevelObjectOfClasses:forKey:error:)] pub unsafe fn decodeTopLevelObjectOfClasses_forKey_error( &self, classes: Option<&NSSet>, key: &NSString, ) -> Result, Id>; - # [method_id (decodeArrayOfObjectsOfClasses : forKey :)] + #[method_id(decodeArrayOfObjectsOfClasses:forKey:)] pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( &self, classes: &NSSet, key: &NSString, ) -> Option>; - # [method_id (decodeDictionaryWithKeysOfClasses : objectsOfClasses : forKey :)] + #[method_id(decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:)] pub unsafe fn decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey( &self, keyClasses: &NSSet, objectClasses: &NSSet, key: &NSString, ) -> Option>; - # [method_id (decodePropertyListForKey :)] + #[method_id(decodePropertyListForKey:)] pub unsafe fn decodePropertyListForKey(&self, key: &NSString) -> Option>; #[method_id(allowedClasses)] pub unsafe fn allowedClasses(&self) -> Option, Shared>>; - # [method (failWithError :)] + #[method(failWithError:)] pub unsafe fn failWithError(&self, error: &NSError); #[method(decodingFailurePolicy)] pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy; @@ -214,7 +214,7 @@ extern_methods!( extern_methods!( #[doc = "NSTypedstreamCompatibility"] unsafe impl NSCoder { - # [method (encodeNXObject :)] + #[method(encodeNXObject:)] pub unsafe fn encodeNXObject(&self, object: &Object); #[method_id(decodeNXObject)] pub unsafe fn decodeNXObject(&self) -> Option>; @@ -223,7 +223,7 @@ extern_methods!( extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSCoder { - # [method (decodeValueOfObjCType : at :)] + #[method(decodeValueOfObjCType:at:)] pub unsafe fn decodeValueOfObjCType_at( &self, type_: NonNull, diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index aba54390a..6afdc176f 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -14,7 +14,7 @@ extern_class!( ); extern_methods!( unsafe impl NSComparisonPredicate { - # [method_id (predicateWithLeftExpression : rightExpression : modifier : type : options :)] + #[method_id(predicateWithLeftExpression:rightExpression:modifier:type:options:)] pub unsafe fn predicateWithLeftExpression_rightExpression_modifier_type_options( lhs: &NSExpression, rhs: &NSExpression, @@ -22,13 +22,13 @@ extern_methods!( type_: NSPredicateOperatorType, options: NSComparisonPredicateOptions, ) -> Id; - # [method_id (predicateWithLeftExpression : rightExpression : customSelector :)] + #[method_id(predicateWithLeftExpression:rightExpression:customSelector:)] pub unsafe fn predicateWithLeftExpression_rightExpression_customSelector( lhs: &NSExpression, rhs: &NSExpression, selector: Sel, ) -> Id; - # [method_id (initWithLeftExpression : rightExpression : modifier : type : options :)] + #[method_id(initWithLeftExpression:rightExpression:modifier:type:options:)] pub unsafe fn initWithLeftExpression_rightExpression_modifier_type_options( &self, lhs: &NSExpression, @@ -37,14 +37,14 @@ extern_methods!( type_: NSPredicateOperatorType, options: NSComparisonPredicateOptions, ) -> Id; - # [method_id (initWithLeftExpression : rightExpression : customSelector :)] + #[method_id(initWithLeftExpression:rightExpression:customSelector:)] pub unsafe fn initWithLeftExpression_rightExpression_customSelector( &self, lhs: &NSExpression, rhs: &NSExpression, selector: Sel, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; #[method(predicateOperatorType)] pub unsafe fn predicateOperatorType(&self) -> NSPredicateOperatorType; diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index cd520d203..7477f92e0 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -13,27 +13,27 @@ extern_class!( ); extern_methods!( unsafe impl NSCompoundPredicate { - # [method_id (initWithType : subpredicates :)] + #[method_id(initWithType:subpredicates:)] pub unsafe fn initWithType_subpredicates( &self, type_: NSCompoundPredicateType, subpredicates: &NSArray, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; #[method(compoundPredicateType)] pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType; #[method_id(subpredicates)] pub unsafe fn subpredicates(&self) -> Id; - # [method_id (andPredicateWithSubpredicates :)] + #[method_id(andPredicateWithSubpredicates:)] pub unsafe fn andPredicateWithSubpredicates( subpredicates: &NSArray, ) -> Id; - # [method_id (orPredicateWithSubpredicates :)] + #[method_id(orPredicateWithSubpredicates:)] pub unsafe fn orPredicateWithSubpredicates( subpredicates: &NSArray, ) -> Id; - # [method_id (notPredicateWithSubpredicate :)] + #[method_id(notPredicateWithSubpredicate:)] pub unsafe fn notPredicateWithSubpredicate( predicate: &NSPredicate, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 71952eb1a..bcea2f3d4 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -30,58 +30,58 @@ extern_methods!( pub unsafe fn allConnections() -> Id, Shared>; #[method_id(defaultConnection)] pub unsafe fn defaultConnection() -> Id; - # [method_id (connectionWithRegisteredName : host :)] + #[method_id(connectionWithRegisteredName:host:)] pub unsafe fn connectionWithRegisteredName_host( name: &NSString, hostName: Option<&NSString>, ) -> Option>; - # [method_id (connectionWithRegisteredName : host : usingNameServer :)] + #[method_id(connectionWithRegisteredName:host:usingNameServer:)] pub unsafe fn connectionWithRegisteredName_host_usingNameServer( name: &NSString, hostName: Option<&NSString>, server: &NSPortNameServer, ) -> Option>; - # [method_id (rootProxyForConnectionWithRegisteredName : host :)] + #[method_id(rootProxyForConnectionWithRegisteredName:host:)] pub unsafe fn rootProxyForConnectionWithRegisteredName_host( name: &NSString, hostName: Option<&NSString>, ) -> Option>; - # [method_id (rootProxyForConnectionWithRegisteredName : host : usingNameServer :)] + #[method_id(rootProxyForConnectionWithRegisteredName:host:usingNameServer:)] pub unsafe fn rootProxyForConnectionWithRegisteredName_host_usingNameServer( name: &NSString, hostName: Option<&NSString>, server: &NSPortNameServer, ) -> Option>; - # [method_id (serviceConnectionWithName : rootObject : usingNameServer :)] + #[method_id(serviceConnectionWithName:rootObject:usingNameServer:)] pub unsafe fn serviceConnectionWithName_rootObject_usingNameServer( name: &NSString, root: &Object, server: &NSPortNameServer, ) -> Option>; - # [method_id (serviceConnectionWithName : rootObject :)] + #[method_id(serviceConnectionWithName:rootObject:)] pub unsafe fn serviceConnectionWithName_rootObject( name: &NSString, root: &Object, ) -> Option>; #[method(requestTimeout)] pub unsafe fn requestTimeout(&self) -> NSTimeInterval; - # [method (setRequestTimeout :)] + #[method(setRequestTimeout:)] pub unsafe fn setRequestTimeout(&self, requestTimeout: NSTimeInterval); #[method(replyTimeout)] pub unsafe fn replyTimeout(&self) -> NSTimeInterval; - # [method (setReplyTimeout :)] + #[method(setReplyTimeout:)] pub unsafe fn setReplyTimeout(&self, replyTimeout: NSTimeInterval); #[method_id(rootObject)] pub unsafe fn rootObject(&self) -> Option>; - # [method (setRootObject :)] + #[method(setRootObject:)] pub unsafe fn setRootObject(&self, rootObject: Option<&Object>); #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSConnectionDelegate>); #[method(independentConversationQueueing)] pub unsafe fn independentConversationQueueing(&self) -> bool; - # [method (setIndependentConversationQueueing :)] + #[method(setIndependentConversationQueueing:)] pub unsafe fn setIndependentConversationQueueing( &self, independentConversationQueueing: bool, @@ -92,28 +92,28 @@ extern_methods!( pub unsafe fn rootProxy(&self) -> Id; #[method(invalidate)] pub unsafe fn invalidate(&self); - # [method (addRequestMode :)] + #[method(addRequestMode:)] pub unsafe fn addRequestMode(&self, rmode: &NSString); - # [method (removeRequestMode :)] + #[method(removeRequestMode:)] pub unsafe fn removeRequestMode(&self, rmode: &NSString); #[method_id(requestModes)] pub unsafe fn requestModes(&self) -> Id, Shared>; - # [method (registerName :)] + #[method(registerName:)] pub unsafe fn registerName(&self, name: Option<&NSString>) -> bool; - # [method (registerName : withNameServer :)] + #[method(registerName:withNameServer:)] pub unsafe fn registerName_withNameServer( &self, name: Option<&NSString>, server: &NSPortNameServer, ) -> bool; - # [method_id (connectionWithReceivePort : sendPort :)] + #[method_id(connectionWithReceivePort:sendPort:)] pub unsafe fn connectionWithReceivePort_sendPort( receivePort: Option<&NSPort>, sendPort: Option<&NSPort>, ) -> Option>; #[method_id(currentConversation)] pub unsafe fn currentConversation() -> Option>; - # [method_id (initWithReceivePort : sendPort :)] + #[method_id(initWithReceivePort:sendPort:)] pub unsafe fn initWithReceivePort_sendPort( &self, receivePort: Option<&NSPort>, @@ -127,9 +127,9 @@ extern_methods!( pub unsafe fn enableMultipleThreads(&self); #[method(multipleThreadsEnabled)] pub unsafe fn multipleThreadsEnabled(&self) -> bool; - # [method (addRunLoop :)] + #[method(addRunLoop:)] pub unsafe fn addRunLoop(&self, runloop: &NSRunLoop); - # [method (removeRunLoop :)] + #[method(removeRunLoop:)] pub unsafe fn removeRunLoop(&self, runloop: &NSRunLoop); #[method(runInNewThread)] pub unsafe fn runInNewThread(&self); @@ -137,7 +137,7 @@ extern_methods!( pub unsafe fn remoteObjects(&self) -> Id; #[method_id(localObjects)] pub unsafe fn localObjects(&self) -> Id; - # [method (dispatchWithComponents :)] + #[method(dispatchWithComponents:)] pub unsafe fn dispatchWithComponents(&self, components: &NSArray); } ); @@ -157,7 +157,7 @@ extern_methods!( pub unsafe fn connection(&self) -> Id; #[method_id(conversation)] pub unsafe fn conversation(&self) -> Id; - # [method (replyWithException :)] + #[method(replyWithException:)] pub unsafe fn replyWithException(&self, exception: Option<&NSException>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 3462ad159..5fc225173 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -27,42 +27,42 @@ extern_methods!( unsafe impl NSData { #[method_id(description)] pub unsafe fn description(&self) -> Id; - # [method (getBytes : length :)] + #[method(getBytes:length:)] pub unsafe fn getBytes_length(&self, buffer: NonNull, length: NSUInteger); - # [method (getBytes : range :)] + #[method(getBytes:range:)] pub unsafe fn getBytes_range(&self, buffer: NonNull, range: NSRange); - # [method (isEqualToData :)] + #[method(isEqualToData:)] pub unsafe fn isEqualToData(&self, other: &NSData) -> bool; - # [method_id (subdataWithRange :)] + #[method_id(subdataWithRange:)] pub unsafe fn subdataWithRange(&self, range: NSRange) -> Id; - # [method (writeToFile : atomically :)] + #[method(writeToFile:atomically:)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, ) -> bool; - # [method (writeToURL : atomically :)] + #[method(writeToURL:atomically:)] pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; - # [method (writeToFile : options : error :)] + #[method(writeToFile:options:error:)] pub unsafe fn writeToFile_options_error( &self, path: &NSString, writeOptionsMask: NSDataWritingOptions, ) -> Result<(), Id>; - # [method (writeToURL : options : error :)] + #[method(writeToURL:options:error:)] pub unsafe fn writeToURL_options_error( &self, url: &NSURL, writeOptionsMask: NSDataWritingOptions, ) -> Result<(), Id>; - # [method (rangeOfData : options : range :)] + #[method(rangeOfData:options:range:)] pub unsafe fn rangeOfData_options_range( &self, dataToFind: &NSData, mask: NSDataSearchOptions, searchRange: NSRange, ) -> NSRange; - # [method (enumerateByteRangesUsingBlock :)] + #[method(enumerateByteRangesUsingBlock:)] pub unsafe fn enumerateByteRangesUsingBlock(&self, block: TodoBlock); } ); @@ -71,81 +71,81 @@ extern_methods!( unsafe impl NSData { #[method_id(data)] pub unsafe fn data() -> Id; - # [method_id (dataWithBytes : length :)] + #[method_id(dataWithBytes:length:)] pub unsafe fn dataWithBytes_length( bytes: *mut c_void, length: NSUInteger, ) -> Id; - # [method_id (dataWithBytesNoCopy : length :)] + #[method_id(dataWithBytesNoCopy:length:)] pub unsafe fn dataWithBytesNoCopy_length( bytes: NonNull, length: NSUInteger, ) -> Id; - # [method_id (dataWithBytesNoCopy : length : freeWhenDone :)] + #[method_id(dataWithBytesNoCopy:length:freeWhenDone:)] pub unsafe fn dataWithBytesNoCopy_length_freeWhenDone( bytes: NonNull, length: NSUInteger, b: bool, ) -> Id; - # [method_id (dataWithContentsOfFile : options : error :)] + #[method_id(dataWithContentsOfFile:options:error:)] pub unsafe fn dataWithContentsOfFile_options_error( path: &NSString, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; - # [method_id (dataWithContentsOfURL : options : error :)] + #[method_id(dataWithContentsOfURL:options:error:)] pub unsafe fn dataWithContentsOfURL_options_error( url: &NSURL, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; - # [method_id (dataWithContentsOfFile :)] + #[method_id(dataWithContentsOfFile:)] pub unsafe fn dataWithContentsOfFile(path: &NSString) -> Option>; - # [method_id (dataWithContentsOfURL :)] + #[method_id(dataWithContentsOfURL:)] pub unsafe fn dataWithContentsOfURL(url: &NSURL) -> Option>; - # [method_id (initWithBytes : length :)] + #[method_id(initWithBytes:length:)] pub unsafe fn initWithBytes_length( &self, bytes: *mut c_void, length: NSUInteger, ) -> Id; - # [method_id (initWithBytesNoCopy : length :)] + #[method_id(initWithBytesNoCopy:length:)] pub unsafe fn initWithBytesNoCopy_length( &self, bytes: NonNull, length: NSUInteger, ) -> Id; - # [method_id (initWithBytesNoCopy : length : freeWhenDone :)] + #[method_id(initWithBytesNoCopy:length:freeWhenDone:)] pub unsafe fn initWithBytesNoCopy_length_freeWhenDone( &self, bytes: NonNull, length: NSUInteger, b: bool, ) -> Id; - # [method_id (initWithBytesNoCopy : length : deallocator :)] + #[method_id(initWithBytesNoCopy:length:deallocator:)] pub unsafe fn initWithBytesNoCopy_length_deallocator( &self, bytes: NonNull, length: NSUInteger, deallocator: TodoBlock, ) -> Id; - # [method_id (initWithContentsOfFile : options : error :)] + #[method_id(initWithContentsOfFile:options:error:)] pub unsafe fn initWithContentsOfFile_options_error( &self, path: &NSString, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; - # [method_id (initWithContentsOfURL : options : error :)] + #[method_id(initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; - # [method_id (initWithContentsOfFile :)] + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option>; - # [method_id (initWithContentsOfURL :)] + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; - # [method_id (initWithData :)] + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Id; - # [method_id (dataWithData :)] + #[method_id(dataWithData:)] pub unsafe fn dataWithData(data: &NSData) -> Id; } ); @@ -179,12 +179,12 @@ extern_methods!( extern_methods!( #[doc = "NSDataCompression"] unsafe impl NSData { - # [method_id (decompressedDataUsingAlgorithm : error :)] + #[method_id(decompressedDataUsingAlgorithm:error:)] pub unsafe fn decompressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, ) -> Result, Id>; - # [method_id (compressedDataUsingAlgorithm : error :)] + #[method_id(compressedDataUsingAlgorithm:error:)] pub unsafe fn compressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, @@ -194,11 +194,11 @@ extern_methods!( extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSData { - # [method (getBytes :)] + #[method(getBytes:)] pub unsafe fn getBytes(&self, buffer: NonNull); - # [method_id (dataWithContentsOfMappedFile :)] + #[method_id(dataWithContentsOfMappedFile:)] pub unsafe fn dataWithContentsOfMappedFile(path: &NSString) -> Option>; - # [method_id (initWithContentsOfMappedFile :)] + #[method_id(initWithContentsOfMappedFile:)] pub unsafe fn initWithContentsOfMappedFile( &self, path: &NSString, @@ -225,26 +225,26 @@ extern_methods!( pub unsafe fn mutableBytes(&self) -> NonNull; #[method(length)] pub unsafe fn length(&self) -> NSUInteger; - # [method (setLength :)] + #[method(setLength:)] pub unsafe fn setLength(&self, length: NSUInteger); } ); extern_methods!( #[doc = "NSExtendedMutableData"] unsafe impl NSMutableData { - # [method (appendBytes : length :)] + #[method(appendBytes:length:)] pub unsafe fn appendBytes_length(&self, bytes: NonNull, length: NSUInteger); - # [method (appendData :)] + #[method(appendData:)] pub unsafe fn appendData(&self, other: &NSData); - # [method (increaseLengthBy :)] + #[method(increaseLengthBy:)] pub unsafe fn increaseLengthBy(&self, extraLength: NSUInteger); - # [method (replaceBytesInRange : withBytes :)] + #[method(replaceBytesInRange:withBytes:)] pub unsafe fn replaceBytesInRange_withBytes(&self, range: NSRange, bytes: NonNull); - # [method (resetBytesInRange :)] + #[method(resetBytesInRange:)] pub unsafe fn resetBytesInRange(&self, range: NSRange); - # [method (setData :)] + #[method(setData:)] pub unsafe fn setData(&self, data: &NSData); - # [method (replaceBytesInRange : withBytes : length :)] + #[method(replaceBytesInRange:withBytes:length:)] pub unsafe fn replaceBytesInRange_withBytes_length( &self, range: NSRange, @@ -256,25 +256,25 @@ extern_methods!( extern_methods!( #[doc = "NSMutableDataCreation"] unsafe impl NSMutableData { - # [method_id (dataWithCapacity :)] + #[method_id(dataWithCapacity:)] pub unsafe fn dataWithCapacity(aNumItems: NSUInteger) -> Option>; - # [method_id (dataWithLength :)] + #[method_id(dataWithLength:)] pub unsafe fn dataWithLength(length: NSUInteger) -> Option>; - # [method_id (initWithCapacity :)] + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Option>; - # [method_id (initWithLength :)] + #[method_id(initWithLength:)] pub unsafe fn initWithLength(&self, length: NSUInteger) -> Option>; } ); extern_methods!( #[doc = "NSMutableDataCompression"] unsafe impl NSMutableData { - # [method (decompressUsingAlgorithm : error :)] + #[method(decompressUsingAlgorithm:error:)] pub unsafe fn decompressUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, ) -> Result<(), Id>; - # [method (compressUsingAlgorithm : error :)] + #[method(compressUsingAlgorithm:error:)] pub unsafe fn compressUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index f865b8cf0..67da3451a 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -18,39 +18,39 @@ extern_methods!( pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithTimeIntervalSinceReferenceDate :)] + #[method_id(initWithTimeIntervalSinceReferenceDate:)] pub unsafe fn initWithTimeIntervalSinceReferenceDate( &self, ti: NSTimeInterval, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedDate"] unsafe impl NSDate { - # [method (timeIntervalSinceDate :)] + #[method(timeIntervalSinceDate:)] pub unsafe fn timeIntervalSinceDate(&self, anotherDate: &NSDate) -> NSTimeInterval; #[method(timeIntervalSinceNow)] pub unsafe fn timeIntervalSinceNow(&self) -> NSTimeInterval; #[method(timeIntervalSince1970)] pub unsafe fn timeIntervalSince1970(&self) -> NSTimeInterval; - # [method_id (addTimeInterval :)] + #[method_id(addTimeInterval:)] pub unsafe fn addTimeInterval(&self, seconds: NSTimeInterval) -> Id; - # [method_id (dateByAddingTimeInterval :)] + #[method_id(dateByAddingTimeInterval:)] pub unsafe fn dateByAddingTimeInterval(&self, ti: NSTimeInterval) -> Id; - # [method_id (earlierDate :)] + #[method_id(earlierDate:)] pub unsafe fn earlierDate(&self, anotherDate: &NSDate) -> Id; - # [method_id (laterDate :)] + #[method_id(laterDate:)] pub unsafe fn laterDate(&self, anotherDate: &NSDate) -> Id; - # [method (compare :)] + #[method(compare:)] pub unsafe fn compare(&self, other: &NSDate) -> NSComparisonResult; - # [method (isEqualToDate :)] + #[method(isEqualToDate:)] pub unsafe fn isEqualToDate(&self, otherDate: &NSDate) -> bool; #[method_id(description)] pub unsafe fn description(&self) -> Id; - # [method_id (descriptionWithLocale :)] + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; #[method(timeIntervalSinceReferenceDate)] @@ -62,15 +62,15 @@ extern_methods!( unsafe impl NSDate { #[method_id(date)] pub unsafe fn date() -> Id; - # [method_id (dateWithTimeIntervalSinceNow :)] + #[method_id(dateWithTimeIntervalSinceNow:)] pub unsafe fn dateWithTimeIntervalSinceNow(secs: NSTimeInterval) -> Id; - # [method_id (dateWithTimeIntervalSinceReferenceDate :)] + #[method_id(dateWithTimeIntervalSinceReferenceDate:)] pub unsafe fn dateWithTimeIntervalSinceReferenceDate( ti: NSTimeInterval, ) -> Id; # [method_id (dateWithTimeIntervalSince1970 :)] pub unsafe fn dateWithTimeIntervalSince1970(secs: NSTimeInterval) -> Id; - # [method_id (dateWithTimeInterval : sinceDate :)] + #[method_id(dateWithTimeInterval:sinceDate:)] pub unsafe fn dateWithTimeInterval_sinceDate( secsToBeAdded: NSTimeInterval, date: &NSDate, @@ -81,7 +81,7 @@ extern_methods!( pub unsafe fn distantPast() -> Id; #[method_id(now)] pub unsafe fn now() -> Id; - # [method_id (initWithTimeIntervalSinceNow :)] + #[method_id(initWithTimeIntervalSinceNow:)] pub unsafe fn initWithTimeIntervalSinceNow(&self, secs: NSTimeInterval) -> Id; # [method_id (initWithTimeIntervalSince1970 :)] @@ -89,7 +89,7 @@ extern_methods!( &self, secs: NSTimeInterval, ) -> Id; - # [method_id (initWithTimeInterval : sinceDate :)] + #[method_id(initWithTimeInterval:sinceDate:)] pub unsafe fn initWithTimeInterval_sinceDate( &self, secsToBeAdded: NSTimeInterval, diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 41c55d016..f2048c4aa 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -14,82 +14,82 @@ extern_class!( ); extern_methods!( unsafe impl NSDateComponentsFormatter { - # [method_id (stringForObjectValue :)] + #[method_id(stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, ) -> Option>; - # [method_id (stringFromDateComponents :)] + #[method_id(stringFromDateComponents:)] pub unsafe fn stringFromDateComponents( &self, components: &NSDateComponents, ) -> Option>; - # [method_id (stringFromDate : toDate :)] + #[method_id(stringFromDate:toDate:)] pub unsafe fn stringFromDate_toDate( &self, startDate: &NSDate, endDate: &NSDate, ) -> Option>; - # [method_id (stringFromTimeInterval :)] + #[method_id(stringFromTimeInterval:)] pub unsafe fn stringFromTimeInterval( &self, ti: NSTimeInterval, ) -> Option>; - # [method_id (localizedStringFromDateComponents : unitsStyle :)] + #[method_id(localizedStringFromDateComponents:unitsStyle:)] pub unsafe fn localizedStringFromDateComponents_unitsStyle( components: &NSDateComponents, unitsStyle: NSDateComponentsFormatterUnitsStyle, ) -> Option>; #[method(unitsStyle)] pub unsafe fn unitsStyle(&self) -> NSDateComponentsFormatterUnitsStyle; - # [method (setUnitsStyle :)] + #[method(setUnitsStyle:)] pub unsafe fn setUnitsStyle(&self, unitsStyle: NSDateComponentsFormatterUnitsStyle); #[method(allowedUnits)] pub unsafe fn allowedUnits(&self) -> NSCalendarUnit; - # [method (setAllowedUnits :)] + #[method(setAllowedUnits:)] pub unsafe fn setAllowedUnits(&self, allowedUnits: NSCalendarUnit); #[method(zeroFormattingBehavior)] pub unsafe fn zeroFormattingBehavior( &self, ) -> NSDateComponentsFormatterZeroFormattingBehavior; - # [method (setZeroFormattingBehavior :)] + #[method(setZeroFormattingBehavior:)] pub unsafe fn setZeroFormattingBehavior( &self, zeroFormattingBehavior: NSDateComponentsFormatterZeroFormattingBehavior, ); #[method_id(calendar)] pub unsafe fn calendar(&self) -> Option>; - # [method (setCalendar :)] + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); #[method_id(referenceDate)] pub unsafe fn referenceDate(&self) -> Option>; - # [method (setReferenceDate :)] + #[method(setReferenceDate:)] pub unsafe fn setReferenceDate(&self, referenceDate: Option<&NSDate>); #[method(allowsFractionalUnits)] pub unsafe fn allowsFractionalUnits(&self) -> bool; - # [method (setAllowsFractionalUnits :)] + #[method(setAllowsFractionalUnits:)] pub unsafe fn setAllowsFractionalUnits(&self, allowsFractionalUnits: bool); #[method(maximumUnitCount)] pub unsafe fn maximumUnitCount(&self) -> NSInteger; - # [method (setMaximumUnitCount :)] + #[method(setMaximumUnitCount:)] pub unsafe fn setMaximumUnitCount(&self, maximumUnitCount: NSInteger); #[method(collapsesLargestUnit)] pub unsafe fn collapsesLargestUnit(&self) -> bool; - # [method (setCollapsesLargestUnit :)] + #[method(setCollapsesLargestUnit:)] pub unsafe fn setCollapsesLargestUnit(&self, collapsesLargestUnit: bool); #[method(includesApproximationPhrase)] pub unsafe fn includesApproximationPhrase(&self) -> bool; - # [method (setIncludesApproximationPhrase :)] + #[method(setIncludesApproximationPhrase:)] pub unsafe fn setIncludesApproximationPhrase(&self, includesApproximationPhrase: bool); #[method(includesTimeRemainingPhrase)] pub unsafe fn includesTimeRemainingPhrase(&self) -> bool; - # [method (setIncludesTimeRemainingPhrase :)] + #[method(setIncludesTimeRemainingPhrase:)] pub unsafe fn setIncludesTimeRemainingPhrase(&self, includesTimeRemainingPhrase: bool); #[method(formattingContext)] pub unsafe fn formattingContext(&self) -> NSFormattingContext; - # [method (setFormattingContext :)] + #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); - # [method (getObjectValue : forString : errorDescription :)] + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 18001d193..a1b8ecdec 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -23,26 +23,26 @@ extern_methods!( unsafe impl NSDateFormatter { #[method(formattingContext)] pub unsafe fn formattingContext(&self) -> NSFormattingContext; - # [method (setFormattingContext :)] + #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); - # [method (getObjectValue : forString : range : error :)] + #[method(getObjectValue:forString:range:error:)] pub unsafe fn getObjectValue_forString_range_error( &self, obj: Option<&mut Option>>, string: &NSString, rangep: *mut NSRange, ) -> Result<(), Id>; - # [method_id (stringFromDate :)] + #[method_id(stringFromDate:)] pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; - # [method_id (dateFromString :)] + #[method_id(dateFromString:)] pub unsafe fn dateFromString(&self, string: &NSString) -> Option>; - # [method_id (localizedStringFromDate : dateStyle : timeStyle :)] + #[method_id(localizedStringFromDate:dateStyle:timeStyle:)] pub unsafe fn localizedStringFromDate_dateStyle_timeStyle( date: &NSDate, dstyle: NSDateFormatterStyle, tstyle: NSDateFormatterStyle, ) -> Id; - # [method_id (dateFormatFromTemplate : options : locale :)] + #[method_id(dateFormatFromTemplate:options:locale:)] pub unsafe fn dateFormatFromTemplate_options_locale( tmplate: &NSString, opts: NSUInteger, @@ -50,186 +50,186 @@ extern_methods!( ) -> Option>; #[method(defaultFormatterBehavior)] pub unsafe fn defaultFormatterBehavior() -> NSDateFormatterBehavior; - # [method (setDefaultFormatterBehavior :)] + #[method(setDefaultFormatterBehavior:)] pub unsafe fn setDefaultFormatterBehavior( defaultFormatterBehavior: NSDateFormatterBehavior, ); - # [method (setLocalizedDateFormatFromTemplate :)] + #[method(setLocalizedDateFormatFromTemplate:)] pub unsafe fn setLocalizedDateFormatFromTemplate(&self, dateFormatTemplate: &NSString); #[method_id(dateFormat)] pub unsafe fn dateFormat(&self) -> Id; - # [method (setDateFormat :)] + #[method(setDateFormat:)] pub unsafe fn setDateFormat(&self, dateFormat: Option<&NSString>); #[method(dateStyle)] pub unsafe fn dateStyle(&self) -> NSDateFormatterStyle; - # [method (setDateStyle :)] + #[method(setDateStyle:)] pub unsafe fn setDateStyle(&self, dateStyle: NSDateFormatterStyle); #[method(timeStyle)] pub unsafe fn timeStyle(&self) -> NSDateFormatterStyle; - # [method (setTimeStyle :)] + #[method(setTimeStyle:)] pub unsafe fn setTimeStyle(&self, timeStyle: NSDateFormatterStyle); #[method_id(locale)] pub unsafe fn locale(&self) -> Id; - # [method (setLocale :)] + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); #[method(generatesCalendarDates)] pub unsafe fn generatesCalendarDates(&self) -> bool; - # [method (setGeneratesCalendarDates :)] + #[method(setGeneratesCalendarDates:)] pub unsafe fn setGeneratesCalendarDates(&self, generatesCalendarDates: bool); #[method(formatterBehavior)] pub unsafe fn formatterBehavior(&self) -> NSDateFormatterBehavior; - # [method (setFormatterBehavior :)] + #[method(setFormatterBehavior:)] pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSDateFormatterBehavior); #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Id; - # [method (setTimeZone :)] + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); #[method_id(calendar)] pub unsafe fn calendar(&self) -> Id; - # [method (setCalendar :)] + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); #[method(isLenient)] pub unsafe fn isLenient(&self) -> bool; - # [method (setLenient :)] + #[method(setLenient:)] pub unsafe fn setLenient(&self, lenient: bool); #[method_id(twoDigitStartDate)] pub unsafe fn twoDigitStartDate(&self) -> Option>; - # [method (setTwoDigitStartDate :)] + #[method(setTwoDigitStartDate:)] pub unsafe fn setTwoDigitStartDate(&self, twoDigitStartDate: Option<&NSDate>); #[method_id(defaultDate)] pub unsafe fn defaultDate(&self) -> Option>; - # [method (setDefaultDate :)] + #[method(setDefaultDate:)] pub unsafe fn setDefaultDate(&self, defaultDate: Option<&NSDate>); #[method_id(eraSymbols)] pub unsafe fn eraSymbols(&self) -> Id, Shared>; - # [method (setEraSymbols :)] + #[method(setEraSymbols:)] pub unsafe fn setEraSymbols(&self, eraSymbols: Option<&NSArray>); #[method_id(monthSymbols)] pub unsafe fn monthSymbols(&self) -> Id, Shared>; - # [method (setMonthSymbols :)] + #[method(setMonthSymbols:)] pub unsafe fn setMonthSymbols(&self, monthSymbols: Option<&NSArray>); #[method_id(shortMonthSymbols)] pub unsafe fn shortMonthSymbols(&self) -> Id, Shared>; - # [method (setShortMonthSymbols :)] + #[method(setShortMonthSymbols:)] pub unsafe fn setShortMonthSymbols(&self, shortMonthSymbols: Option<&NSArray>); #[method_id(weekdaySymbols)] pub unsafe fn weekdaySymbols(&self) -> Id, Shared>; - # [method (setWeekdaySymbols :)] + #[method(setWeekdaySymbols:)] pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: Option<&NSArray>); #[method_id(shortWeekdaySymbols)] pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared>; - # [method (setShortWeekdaySymbols :)] + #[method(setShortWeekdaySymbols:)] pub unsafe fn setShortWeekdaySymbols( &self, shortWeekdaySymbols: Option<&NSArray>, ); #[method_id(AMSymbol)] pub unsafe fn AMSymbol(&self) -> Id; - # [method (setAMSymbol :)] + #[method(setAMSymbol:)] pub unsafe fn setAMSymbol(&self, AMSymbol: Option<&NSString>); #[method_id(PMSymbol)] pub unsafe fn PMSymbol(&self) -> Id; - # [method (setPMSymbol :)] + #[method(setPMSymbol:)] pub unsafe fn setPMSymbol(&self, PMSymbol: Option<&NSString>); #[method_id(longEraSymbols)] pub unsafe fn longEraSymbols(&self) -> Id, Shared>; - # [method (setLongEraSymbols :)] + #[method(setLongEraSymbols:)] pub unsafe fn setLongEraSymbols(&self, longEraSymbols: Option<&NSArray>); #[method_id(veryShortMonthSymbols)] pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared>; - # [method (setVeryShortMonthSymbols :)] + #[method(setVeryShortMonthSymbols:)] pub unsafe fn setVeryShortMonthSymbols( &self, veryShortMonthSymbols: Option<&NSArray>, ); #[method_id(standaloneMonthSymbols)] pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared>; - # [method (setStandaloneMonthSymbols :)] + #[method(setStandaloneMonthSymbols:)] pub unsafe fn setStandaloneMonthSymbols( &self, standaloneMonthSymbols: Option<&NSArray>, ); #[method_id(shortStandaloneMonthSymbols)] pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared>; - # [method (setShortStandaloneMonthSymbols :)] + #[method(setShortStandaloneMonthSymbols:)] pub unsafe fn setShortStandaloneMonthSymbols( &self, shortStandaloneMonthSymbols: Option<&NSArray>, ); #[method_id(veryShortStandaloneMonthSymbols)] pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared>; - # [method (setVeryShortStandaloneMonthSymbols :)] + #[method(setVeryShortStandaloneMonthSymbols:)] pub unsafe fn setVeryShortStandaloneMonthSymbols( &self, veryShortStandaloneMonthSymbols: Option<&NSArray>, ); #[method_id(veryShortWeekdaySymbols)] pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared>; - # [method (setVeryShortWeekdaySymbols :)] + #[method(setVeryShortWeekdaySymbols:)] pub unsafe fn setVeryShortWeekdaySymbols( &self, veryShortWeekdaySymbols: Option<&NSArray>, ); #[method_id(standaloneWeekdaySymbols)] pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared>; - # [method (setStandaloneWeekdaySymbols :)] + #[method(setStandaloneWeekdaySymbols:)] pub unsafe fn setStandaloneWeekdaySymbols( &self, standaloneWeekdaySymbols: Option<&NSArray>, ); #[method_id(shortStandaloneWeekdaySymbols)] pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared>; - # [method (setShortStandaloneWeekdaySymbols :)] + #[method(setShortStandaloneWeekdaySymbols:)] pub unsafe fn setShortStandaloneWeekdaySymbols( &self, shortStandaloneWeekdaySymbols: Option<&NSArray>, ); #[method_id(veryShortStandaloneWeekdaySymbols)] pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared>; - # [method (setVeryShortStandaloneWeekdaySymbols :)] + #[method(setVeryShortStandaloneWeekdaySymbols:)] pub unsafe fn setVeryShortStandaloneWeekdaySymbols( &self, veryShortStandaloneWeekdaySymbols: Option<&NSArray>, ); #[method_id(quarterSymbols)] pub unsafe fn quarterSymbols(&self) -> Id, Shared>; - # [method (setQuarterSymbols :)] + #[method(setQuarterSymbols:)] pub unsafe fn setQuarterSymbols(&self, quarterSymbols: Option<&NSArray>); #[method_id(shortQuarterSymbols)] pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared>; - # [method (setShortQuarterSymbols :)] + #[method(setShortQuarterSymbols:)] pub unsafe fn setShortQuarterSymbols( &self, shortQuarterSymbols: Option<&NSArray>, ); #[method_id(standaloneQuarterSymbols)] pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared>; - # [method (setStandaloneQuarterSymbols :)] + #[method(setStandaloneQuarterSymbols:)] pub unsafe fn setStandaloneQuarterSymbols( &self, standaloneQuarterSymbols: Option<&NSArray>, ); #[method_id(shortStandaloneQuarterSymbols)] pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared>; - # [method (setShortStandaloneQuarterSymbols :)] + #[method(setShortStandaloneQuarterSymbols:)] pub unsafe fn setShortStandaloneQuarterSymbols( &self, shortStandaloneQuarterSymbols: Option<&NSArray>, ); #[method_id(gregorianStartDate)] pub unsafe fn gregorianStartDate(&self) -> Option>; - # [method (setGregorianStartDate :)] + #[method(setGregorianStartDate:)] pub unsafe fn setGregorianStartDate(&self, gregorianStartDate: Option<&NSDate>); #[method(doesRelativeDateFormatting)] pub unsafe fn doesRelativeDateFormatting(&self) -> bool; - # [method (setDoesRelativeDateFormatting :)] + #[method(setDoesRelativeDateFormatting:)] pub unsafe fn setDoesRelativeDateFormatting(&self, doesRelativeDateFormatting: bool); } ); extern_methods!( #[doc = "NSDateFormatterCompatibility"] unsafe impl NSDateFormatter { - # [method_id (initWithDateFormat : allowNaturalLanguage :)] + #[method_id(initWithDateFormat:allowNaturalLanguage:)] pub unsafe fn initWithDateFormat_allowNaturalLanguage( &self, format: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index f6c814936..3d9d7b84b 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -22,32 +22,32 @@ extern_methods!( pub unsafe fn duration(&self) -> NSTimeInterval; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; - # [method_id (initWithStartDate : duration :)] + #[method_id(initWithStartDate:duration:)] pub unsafe fn initWithStartDate_duration( &self, startDate: &NSDate, duration: NSTimeInterval, ) -> Id; - # [method_id (initWithStartDate : endDate :)] + #[method_id(initWithStartDate:endDate:)] pub unsafe fn initWithStartDate_endDate( &self, startDate: &NSDate, endDate: &NSDate, ) -> Id; - # [method (compare :)] + #[method(compare:)] pub unsafe fn compare(&self, dateInterval: &NSDateInterval) -> NSComparisonResult; - # [method (isEqualToDateInterval :)] + #[method(isEqualToDateInterval:)] pub unsafe fn isEqualToDateInterval(&self, dateInterval: &NSDateInterval) -> bool; - # [method (intersectsDateInterval :)] + #[method(intersectsDateInterval:)] pub unsafe fn intersectsDateInterval(&self, dateInterval: &NSDateInterval) -> bool; - # [method_id (intersectionWithDateInterval :)] + #[method_id(intersectionWithDateInterval:)] pub unsafe fn intersectionWithDateInterval( &self, dateInterval: &NSDateInterval, ) -> Option>; - # [method (containsDate :)] + #[method(containsDate:)] pub unsafe fn containsDate(&self, date: &NSDate) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index 397616959..1e76ff7f0 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -20,35 +20,35 @@ extern_methods!( unsafe impl NSDateIntervalFormatter { #[method_id(locale)] pub unsafe fn locale(&self) -> Id; - # [method (setLocale :)] + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); #[method_id(calendar)] pub unsafe fn calendar(&self) -> Id; - # [method (setCalendar :)] + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Id; - # [method (setTimeZone :)] + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); #[method_id(dateTemplate)] pub unsafe fn dateTemplate(&self) -> Id; - # [method (setDateTemplate :)] + #[method(setDateTemplate:)] pub unsafe fn setDateTemplate(&self, dateTemplate: Option<&NSString>); #[method(dateStyle)] pub unsafe fn dateStyle(&self) -> NSDateIntervalFormatterStyle; - # [method (setDateStyle :)] + #[method(setDateStyle:)] pub unsafe fn setDateStyle(&self, dateStyle: NSDateIntervalFormatterStyle); #[method(timeStyle)] pub unsafe fn timeStyle(&self) -> NSDateIntervalFormatterStyle; - # [method (setTimeStyle :)] + #[method(setTimeStyle:)] pub unsafe fn setTimeStyle(&self, timeStyle: NSDateIntervalFormatterStyle); - # [method_id (stringFromDate : toDate :)] + #[method_id(stringFromDate:toDate:)] pub unsafe fn stringFromDate_toDate( &self, fromDate: &NSDate, toDate: &NSDate, ) -> Id; - # [method_id (stringFromDateInterval :)] + #[method_id(stringFromDateInterval:)] pub unsafe fn stringFromDateInterval( &self, dateInterval: &NSDateInterval, diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index 13f21237f..f65bc7e2c 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -17,41 +17,41 @@ extern_class!( ); extern_methods!( unsafe impl NSDecimalNumber { - # [method_id (initWithMantissa : exponent : isNegative :)] + #[method_id(initWithMantissa:exponent:isNegative:)] pub unsafe fn initWithMantissa_exponent_isNegative( &self, mantissa: c_ulonglong, exponent: c_short, flag: bool, ) -> Id; - # [method_id (initWithDecimal :)] + #[method_id(initWithDecimal:)] pub unsafe fn initWithDecimal(&self, dcm: NSDecimal) -> Id; - # [method_id (initWithString :)] + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, numberValue: Option<&NSString>) -> Id; - # [method_id (initWithString : locale :)] + #[method_id(initWithString:locale:)] pub unsafe fn initWithString_locale( &self, numberValue: Option<&NSString>, locale: Option<&Object>, ) -> Id; - # [method_id (descriptionWithLocale :)] + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; #[method(decimalValue)] pub unsafe fn decimalValue(&self) -> NSDecimal; - # [method_id (decimalNumberWithMantissa : exponent : isNegative :)] + #[method_id(decimalNumberWithMantissa:exponent:isNegative:)] pub unsafe fn decimalNumberWithMantissa_exponent_isNegative( mantissa: c_ulonglong, exponent: c_short, flag: bool, ) -> Id; - # [method_id (decimalNumberWithDecimal :)] + #[method_id(decimalNumberWithDecimal:)] pub unsafe fn decimalNumberWithDecimal(dcm: NSDecimal) -> Id; - # [method_id (decimalNumberWithString :)] + #[method_id(decimalNumberWithString:)] pub unsafe fn decimalNumberWithString( numberValue: Option<&NSString>, ) -> Id; - # [method_id (decimalNumberWithString : locale :)] + #[method_id(decimalNumberWithString:locale:)] pub unsafe fn decimalNumberWithString_locale( numberValue: Option<&NSString>, locale: Option<&Object>, @@ -66,56 +66,56 @@ extern_methods!( pub unsafe fn maximumDecimalNumber() -> Id; #[method_id(notANumber)] pub unsafe fn notANumber() -> Id; - # [method_id (decimalNumberByAdding :)] + #[method_id(decimalNumberByAdding:)] pub unsafe fn decimalNumberByAdding( &self, decimalNumber: &NSDecimalNumber, ) -> Id; - # [method_id (decimalNumberByAdding : withBehavior :)] + #[method_id(decimalNumberByAdding:withBehavior:)] pub unsafe fn decimalNumberByAdding_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - # [method_id (decimalNumberBySubtracting :)] + #[method_id(decimalNumberBySubtracting:)] pub unsafe fn decimalNumberBySubtracting( &self, decimalNumber: &NSDecimalNumber, ) -> Id; - # [method_id (decimalNumberBySubtracting : withBehavior :)] + #[method_id(decimalNumberBySubtracting:withBehavior:)] pub unsafe fn decimalNumberBySubtracting_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - # [method_id (decimalNumberByMultiplyingBy :)] + #[method_id(decimalNumberByMultiplyingBy:)] pub unsafe fn decimalNumberByMultiplyingBy( &self, decimalNumber: &NSDecimalNumber, ) -> Id; - # [method_id (decimalNumberByMultiplyingBy : withBehavior :)] + #[method_id(decimalNumberByMultiplyingBy:withBehavior:)] pub unsafe fn decimalNumberByMultiplyingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - # [method_id (decimalNumberByDividingBy :)] + #[method_id(decimalNumberByDividingBy:)] pub unsafe fn decimalNumberByDividingBy( &self, decimalNumber: &NSDecimalNumber, ) -> Id; - # [method_id (decimalNumberByDividingBy : withBehavior :)] + #[method_id(decimalNumberByDividingBy:withBehavior:)] pub unsafe fn decimalNumberByDividingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - # [method_id (decimalNumberByRaisingToPower :)] + #[method_id(decimalNumberByRaisingToPower:)] pub unsafe fn decimalNumberByRaisingToPower( &self, power: NSUInteger, ) -> Id; - # [method_id (decimalNumberByRaisingToPower : withBehavior :)] + #[method_id(decimalNumberByRaisingToPower:withBehavior:)] pub unsafe fn decimalNumberByRaisingToPower_withBehavior( &self, power: NSUInteger, @@ -132,16 +132,16 @@ extern_methods!( power: c_short, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - # [method_id (decimalNumberByRoundingAccordingToBehavior :)] + #[method_id(decimalNumberByRoundingAccordingToBehavior:)] pub unsafe fn decimalNumberByRoundingAccordingToBehavior( &self, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - # [method (compare :)] + #[method(compare:)] pub unsafe fn compare(&self, decimalNumber: &NSNumber) -> NSComparisonResult; #[method_id(defaultBehavior)] pub unsafe fn defaultBehavior() -> Id; - # [method (setDefaultBehavior :)] + #[method(setDefaultBehavior:)] pub unsafe fn setDefaultBehavior(defaultBehavior: &NSDecimalNumberBehaviors); #[method(objCType)] pub unsafe fn objCType(&self) -> NonNull; @@ -160,7 +160,7 @@ extern_methods!( unsafe impl NSDecimalNumberHandler { #[method_id(defaultDecimalNumberHandler)] pub unsafe fn defaultDecimalNumberHandler() -> Id; - # [method_id (initWithRoundingMode : scale : raiseOnExactness : raiseOnOverflow : raiseOnUnderflow : raiseOnDivideByZero :)] + #[method_id(initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:)] pub unsafe fn initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( &self, roundingMode: NSRoundingMode, @@ -170,7 +170,7 @@ extern_methods!( underflow: bool, divideByZero: bool, ) -> Id; - # [method_id (decimalNumberHandlerWithRoundingMode : scale : raiseOnExactness : raiseOnOverflow : raiseOnUnderflow : raiseOnDivideByZero :)] + #[method_id(decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:)] pub unsafe fn decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( roundingMode: NSRoundingMode, scale: c_short, @@ -191,7 +191,7 @@ extern_methods!( extern_methods!( #[doc = "NSDecimalNumberScanning"] unsafe impl NSScanner { - # [method (scanDecimal :)] + #[method(scanDecimal:)] pub unsafe fn scanDecimal(&self, dcm: *mut NSDecimal) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index bfdc5c6da..1f151b1fb 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -19,20 +19,20 @@ extern_methods!( unsafe impl NSDictionary { #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - # [method_id (objectForKey :)] + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option>; #[method_id(keyEnumerator)] pub unsafe fn keyEnumerator(&self) -> Id, Shared>; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithObjects : forKeys : count :)] + #[method_id(initWithObjects:forKeys:count:)] pub unsafe fn initWithObjects_forKeys_count( &self, objects: TodoArray, keys: TodoArray, cnt: NSUInteger, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); @@ -41,7 +41,7 @@ extern_methods!( unsafe impl NSDictionary { #[method_id(allKeys)] pub unsafe fn allKeys(&self) -> Id, Shared>; - # [method_id (allKeysForObject :)] + #[method_id(allKeysForObject:)] pub unsafe fn allKeysForObject( &self, anObject: &ObjectType, @@ -52,72 +52,72 @@ extern_methods!( pub unsafe fn description(&self) -> Id; #[method_id(descriptionInStringsFileFormat)] pub unsafe fn descriptionInStringsFileFormat(&self) -> Id; - # [method_id (descriptionWithLocale :)] + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; - # [method_id (descriptionWithLocale : indent :)] + #[method_id(descriptionWithLocale:indent:)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, level: NSUInteger, ) -> Id; - # [method (isEqualToDictionary :)] + #[method(isEqualToDictionary:)] pub unsafe fn isEqualToDictionary( &self, otherDictionary: &NSDictionary, ) -> bool; #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; - # [method_id (objectsForKeys : notFoundMarker :)] + #[method_id(objectsForKeys:notFoundMarker:)] pub unsafe fn objectsForKeys_notFoundMarker( &self, keys: &NSArray, marker: &ObjectType, ) -> Id, Shared>; - # [method (writeToURL : error :)] + #[method(writeToURL:error:)] pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id>; - # [method_id (keysSortedByValueUsingSelector :)] + #[method_id(keysSortedByValueUsingSelector:)] pub unsafe fn keysSortedByValueUsingSelector( &self, comparator: Sel, ) -> Id, Shared>; - # [method (getObjects : andKeys : count :)] + #[method(getObjects:andKeys:count:)] pub unsafe fn getObjects_andKeys_count( &self, objects: TodoArray, keys: TodoArray, count: NSUInteger, ); - # [method_id (objectForKeyedSubscript :)] + #[method_id(objectForKeyedSubscript:)] pub unsafe fn objectForKeyedSubscript( &self, key: &KeyType, ) -> Option>; - # [method (enumerateKeysAndObjectsUsingBlock :)] + #[method(enumerateKeysAndObjectsUsingBlock:)] pub unsafe fn enumerateKeysAndObjectsUsingBlock(&self, block: TodoBlock); - # [method (enumerateKeysAndObjectsWithOptions : usingBlock :)] + #[method(enumerateKeysAndObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); - # [method_id (keysSortedByValueUsingComparator :)] + #[method_id(keysSortedByValueUsingComparator:)] pub unsafe fn keysSortedByValueUsingComparator( &self, cmptr: NSComparator, ) -> Id, Shared>; - # [method_id (keysSortedByValueWithOptions : usingComparator :)] + #[method_id(keysSortedByValueWithOptions:usingComparator:)] pub unsafe fn keysSortedByValueWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, ) -> Id, Shared>; - # [method_id (keysOfEntriesPassingTest :)] + #[method_id(keysOfEntriesPassingTest:)] pub unsafe fn keysOfEntriesPassingTest( &self, predicate: TodoBlock, ) -> Id, Shared>; - # [method_id (keysOfEntriesWithOptions : passingTest :)] + #[method_id(keysOfEntriesWithOptions:passingTest:)] pub unsafe fn keysOfEntriesWithOptions_passingTest( &self, opts: NSEnumerationOptions, @@ -128,33 +128,33 @@ extern_methods!( extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSDictionary { - # [method (getObjects : andKeys :)] + #[method(getObjects:andKeys:)] pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray); - # [method_id (dictionaryWithContentsOfFile :)] + #[method_id(dictionaryWithContentsOfFile:)] pub unsafe fn dictionaryWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; - # [method_id (dictionaryWithContentsOfURL :)] + #[method_id(dictionaryWithContentsOfURL:)] pub unsafe fn dictionaryWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; - # [method_id (initWithContentsOfFile :)] + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, ) -> Option, Shared>>; - # [method_id (initWithContentsOfURL :)] + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, url: &NSURL, ) -> Option, Shared>>; - # [method (writeToFile : atomically :)] + #[method(writeToFile:atomically:)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, ) -> bool; - # [method (writeToURL : atomically :)] + #[method(writeToURL:atomically:)] pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; } ); @@ -163,49 +163,49 @@ extern_methods!( unsafe impl NSDictionary { #[method_id(dictionary)] pub unsafe fn dictionary() -> Id; - # [method_id (dictionaryWithObject : forKey :)] + #[method_id(dictionaryWithObject:forKey:)] pub unsafe fn dictionaryWithObject_forKey( object: &ObjectType, key: &NSCopying, ) -> Id; - # [method_id (dictionaryWithObjects : forKeys : count :)] + #[method_id(dictionaryWithObjects:forKeys:count:)] pub unsafe fn dictionaryWithObjects_forKeys_count( objects: TodoArray, keys: TodoArray, cnt: NSUInteger, ) -> Id; - # [method_id (dictionaryWithDictionary :)] + #[method_id(dictionaryWithDictionary:)] pub unsafe fn dictionaryWithDictionary( dict: &NSDictionary, ) -> Id; - # [method_id (dictionaryWithObjects : forKeys :)] + #[method_id(dictionaryWithObjects:forKeys:)] pub unsafe fn dictionaryWithObjects_forKeys( objects: &NSArray, keys: &NSArray, ) -> Id; - # [method_id (initWithDictionary :)] + #[method_id(initWithDictionary:)] pub unsafe fn initWithDictionary( &self, otherDictionary: &NSDictionary, ) -> Id; - # [method_id (initWithDictionary : copyItems :)] + #[method_id(initWithDictionary:copyItems:)] pub unsafe fn initWithDictionary_copyItems( &self, otherDictionary: &NSDictionary, flag: bool, ) -> Id; - # [method_id (initWithObjects : forKeys :)] + #[method_id(initWithObjects:forKeys:)] pub unsafe fn initWithObjects_forKeys( &self, objects: &NSArray, keys: &NSArray, ) -> Id; - # [method_id (initWithContentsOfURL : error :)] + #[method_id(initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, ) -> Result, Shared>, Id>; - # [method_id (dictionaryWithContentsOfURL : error :)] + #[method_id(dictionaryWithContentsOfURL:error:)] pub unsafe fn dictionaryWithContentsOfURL_error( url: &NSURL, ) -> Result, Shared>, Id>; @@ -222,55 +222,55 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMutableDictionary { - # [method (removeObjectForKey :)] + #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, aKey: &KeyType); - # [method (setObject : forKey :)] + #[method(setObject:forKey:)] pub unsafe fn setObject_forKey(&self, anObject: &ObjectType, aKey: &NSCopying); #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithCapacity :)] + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedMutableDictionary"] unsafe impl NSMutableDictionary { - # [method (addEntriesFromDictionary :)] + #[method(addEntriesFromDictionary:)] pub unsafe fn addEntriesFromDictionary( &self, otherDictionary: &NSDictionary, ); #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); - # [method (removeObjectsForKeys :)] + #[method(removeObjectsForKeys:)] pub unsafe fn removeObjectsForKeys(&self, keyArray: &NSArray); - # [method (setDictionary :)] + #[method(setDictionary:)] pub unsafe fn setDictionary(&self, otherDictionary: &NSDictionary); - # [method (setObject : forKeyedSubscript :)] + #[method(setObject:forKeyedSubscript:)] pub unsafe fn setObject_forKeyedSubscript(&self, obj: Option<&ObjectType>, key: &NSCopying); } ); extern_methods!( #[doc = "NSMutableDictionaryCreation"] unsafe impl NSMutableDictionary { - # [method_id (dictionaryWithCapacity :)] + #[method_id(dictionaryWithCapacity:)] pub unsafe fn dictionaryWithCapacity(numItems: NSUInteger) -> Id; - # [method_id (dictionaryWithContentsOfFile :)] + #[method_id(dictionaryWithContentsOfFile:)] pub unsafe fn dictionaryWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; - # [method_id (dictionaryWithContentsOfURL :)] + #[method_id(dictionaryWithContentsOfURL:)] pub unsafe fn dictionaryWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; - # [method_id (initWithContentsOfFile :)] + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, ) -> Option, Shared>>; - # [method_id (initWithContentsOfURL :)] + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, url: &NSURL, @@ -280,14 +280,14 @@ extern_methods!( extern_methods!( #[doc = "NSSharedKeySetDictionary"] unsafe impl NSDictionary { - # [method_id (sharedKeySetForKeys :)] + #[method_id(sharedKeySetForKeys:)] pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id; } ); extern_methods!( #[doc = "NSSharedKeySetDictionary"] unsafe impl NSMutableDictionary { - # [method_id (dictionaryWithSharedKeySet :)] + #[method_id(dictionaryWithSharedKeySet:)] pub unsafe fn dictionaryWithSharedKeySet( keyset: &Object, ) -> Id, Shared>; @@ -296,7 +296,7 @@ extern_methods!( extern_methods!( #[doc = "NSGenericFastEnumeraiton"] unsafe impl NSDictionary { - # [method (countByEnumeratingWithState : objects : count :)] + #[method(countByEnumeratingWithState:objects:count:)] pub unsafe fn countByEnumeratingWithState_objects_count( &self, state: NonNull, diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index 7a09c83ed..f2ef062c5 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -15,31 +15,31 @@ extern_class!( ); extern_methods!( unsafe impl NSDistantObject { - # [method_id (proxyWithTarget : connection :)] + #[method_id(proxyWithTarget:connection:)] pub unsafe fn proxyWithTarget_connection( target: &Object, connection: &NSConnection, ) -> Option>; - # [method_id (initWithTarget : connection :)] + #[method_id(initWithTarget:connection:)] pub unsafe fn initWithTarget_connection( &self, target: &Object, connection: &NSConnection, ) -> Option>; - # [method_id (proxyWithLocal : connection :)] + #[method_id(proxyWithLocal:connection:)] pub unsafe fn proxyWithLocal_connection( target: &Object, connection: &NSConnection, ) -> Id; - # [method_id (initWithLocal : connection :)] + #[method_id(initWithLocal:connection:)] pub unsafe fn initWithLocal_connection( &self, target: &Object, connection: &NSConnection, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; - # [method (setProtocolForProxy :)] + #[method(setProtocolForProxy:)] pub unsafe fn setProtocolForProxy(&self, proto: Option<&Protocol>); #[method_id(connectionForProxy)] pub unsafe fn connectionForProxy(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index 113e1d9eb..84882edd2 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -13,11 +13,11 @@ extern_class!( ); extern_methods!( unsafe impl NSDistributedLock { - # [method_id (lockWithPath :)] + #[method_id(lockWithPath:)] pub unsafe fn lockWithPath(path: &NSString) -> Option>; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithPath :)] + #[method_id(initWithPath:)] pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; #[method(tryLock)] pub unsafe fn tryLock(&self) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index dec5c50b4..cfa263e94 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -15,13 +15,13 @@ extern_class!( ); extern_methods!( unsafe impl NSDistributedNotificationCenter { - # [method_id (notificationCenterForType :)] + #[method_id(notificationCenterForType:)] pub unsafe fn notificationCenterForType( notificationCenterType: &NSDistributedNotificationCenterType, ) -> Id; #[method_id(defaultCenter)] pub unsafe fn defaultCenter() -> Id; - # [method (addObserver : selector : name : object : suspensionBehavior :)] + #[method(addObserver:selector:name:object:suspensionBehavior:)] pub unsafe fn addObserver_selector_name_object_suspensionBehavior( &self, observer: &Object, @@ -30,7 +30,7 @@ extern_methods!( object: Option<&NSString>, suspensionBehavior: NSNotificationSuspensionBehavior, ); - # [method (postNotificationName : object : userInfo : deliverImmediately :)] + #[method(postNotificationName:object:userInfo:deliverImmediately:)] pub unsafe fn postNotificationName_object_userInfo_deliverImmediately( &self, name: &NSNotificationName, @@ -38,7 +38,7 @@ extern_methods!( userInfo: Option<&NSDictionary>, deliverImmediately: bool, ); - # [method (postNotificationName : object : userInfo : options :)] + #[method(postNotificationName:object:userInfo:options:)] pub unsafe fn postNotificationName_object_userInfo_options( &self, name: &NSNotificationName, @@ -48,9 +48,9 @@ extern_methods!( ); #[method(suspended)] pub unsafe fn suspended(&self) -> bool; - # [method (setSuspended :)] + #[method(setSuspended:)] pub unsafe fn setSuspended(&self, suspended: bool); - # [method (addObserver : selector : name : object :)] + #[method(addObserver:selector:name:object:)] pub unsafe fn addObserver_selector_name_object( &self, observer: &Object, @@ -58,20 +58,20 @@ extern_methods!( aName: Option<&NSNotificationName>, anObject: Option<&NSString>, ); - # [method (postNotificationName : object :)] + #[method(postNotificationName:object:)] pub unsafe fn postNotificationName_object( &self, aName: &NSNotificationName, anObject: Option<&NSString>, ); - # [method (postNotificationName : object : userInfo :)] + #[method(postNotificationName:object:userInfo:)] pub unsafe fn postNotificationName_object_userInfo( &self, aName: &NSNotificationName, anObject: Option<&NSString>, aUserInfo: Option<&NSDictionary>, ); - # [method (removeObserver : name : object :)] + #[method(removeObserver:name:object:)] pub unsafe fn removeObserver_name_object( &self, observer: &Object, diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 91c865e3d..d6222b477 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -14,37 +14,37 @@ extern_methods!( unsafe impl NSEnergyFormatter { #[method_id(numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; - # [method (setNumberFormatter :)] + #[method(setNumberFormatter:)] pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); #[method(unitStyle)] pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; - # [method (setUnitStyle :)] + #[method(setUnitStyle:)] pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); #[method(isForFoodEnergyUse)] pub unsafe fn isForFoodEnergyUse(&self) -> bool; - # [method (setForFoodEnergyUse :)] + #[method(setForFoodEnergyUse:)] pub unsafe fn setForFoodEnergyUse(&self, forFoodEnergyUse: bool); - # [method_id (stringFromValue : unit :)] + #[method_id(stringFromValue:unit:)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSEnergyFormatterUnit, ) -> Id; - # [method_id (stringFromJoules :)] + #[method_id(stringFromJoules:)] pub unsafe fn stringFromJoules(&self, numberInJoules: c_double) -> Id; - # [method_id (unitStringFromValue : unit :)] + #[method_id(unitStringFromValue:unit:)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSEnergyFormatterUnit, ) -> Id; - # [method_id (unitStringFromJoules : usedUnit :)] + #[method_id(unitStringFromJoules:usedUnit:)] pub unsafe fn unitStringFromJoules_usedUnit( &self, numberInJoules: c_double, unitp: *mut NSEnergyFormatterUnit, ) -> Id; - # [method (getObjectValue : forString : errorDescription :)] + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 151e3b049..54f28a6f3 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -17,14 +17,14 @@ extern_class!( ); extern_methods!( unsafe impl NSError { - # [method_id (initWithDomain : code : userInfo :)] + #[method_id(initWithDomain:code:userInfo:)] pub unsafe fn initWithDomain_code_userInfo( &self, domain: &NSErrorDomain, code: NSInteger, dict: Option<&NSDictionary>, ) -> Id; - # [method_id (errorWithDomain : code : userInfo :)] + #[method_id(errorWithDomain:code:userInfo:)] pub unsafe fn errorWithDomain_code_userInfo( domain: &NSErrorDomain, code: NSInteger, @@ -50,19 +50,19 @@ extern_methods!( pub unsafe fn helpAnchor(&self) -> Option>; #[method_id(underlyingErrors)] pub unsafe fn underlyingErrors(&self) -> Id, Shared>; - # [method (setUserInfoValueProviderForDomain : provider :)] + #[method(setUserInfoValueProviderForDomain:provider:)] pub unsafe fn setUserInfoValueProviderForDomain_provider( errorDomain: &NSErrorDomain, provider: TodoBlock, ); - # [method (userInfoValueProviderForDomain :)] + #[method(userInfoValueProviderForDomain:)] pub unsafe fn userInfoValueProviderForDomain(errorDomain: &NSErrorDomain) -> TodoBlock; } ); extern_methods!( #[doc = "NSErrorRecoveryAttempting"] unsafe impl NSObject { - # [method (attemptRecoveryFromError : optionIndex : delegate : didRecoverSelector : contextInfo :)] + #[method(attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:)] pub unsafe fn attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo( &self, error: &NSError, @@ -71,7 +71,7 @@ extern_methods!( didRecoverSelector: Option, contextInfo: *mut c_void, ); - # [method (attemptRecoveryFromError : optionIndex :)] + #[method(attemptRecoveryFromError:optionIndex:)] pub unsafe fn attemptRecoveryFromError_optionIndex( &self, error: &NSError, diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 6deb87c7f..739762f73 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -17,13 +17,13 @@ extern_class!( ); extern_methods!( unsafe impl NSException { - # [method_id (exceptionWithName : reason : userInfo :)] + #[method_id(exceptionWithName:reason:userInfo:)] pub unsafe fn exceptionWithName_reason_userInfo( name: &NSExceptionName, reason: Option<&NSString>, userInfo: Option<&NSDictionary>, ) -> Id; - # [method_id (initWithName : reason : userInfo :)] + #[method_id(initWithName:reason:userInfo:)] pub unsafe fn initWithName_reason_userInfo( &self, aName: &NSExceptionName, @@ -47,7 +47,7 @@ extern_methods!( extern_methods!( #[doc = "NSExceptionRaisingConveniences"] unsafe impl NSException { - # [method (raise : format : arguments :)] + #[method(raise:format:arguments:)] pub unsafe fn raise_format_arguments( name: &NSExceptionName, format: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index c69e2f257..ebeecc59a 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -16,55 +16,55 @@ extern_class!( ); extern_methods!( unsafe impl NSExpression { - # [method_id (expressionWithFormat : argumentArray :)] + #[method_id(expressionWithFormat:argumentArray:)] pub unsafe fn expressionWithFormat_argumentArray( expressionFormat: &NSString, arguments: &NSArray, ) -> Id; - # [method_id (expressionWithFormat : arguments :)] + #[method_id(expressionWithFormat:arguments:)] pub unsafe fn expressionWithFormat_arguments( expressionFormat: &NSString, argList: va_list, ) -> Id; - # [method_id (expressionForConstantValue :)] + #[method_id(expressionForConstantValue:)] pub unsafe fn expressionForConstantValue(obj: Option<&Object>) -> Id; #[method_id(expressionForEvaluatedObject)] pub unsafe fn expressionForEvaluatedObject() -> Id; - # [method_id (expressionForVariable :)] + #[method_id(expressionForVariable:)] pub unsafe fn expressionForVariable(string: &NSString) -> Id; - # [method_id (expressionForKeyPath :)] + #[method_id(expressionForKeyPath:)] pub unsafe fn expressionForKeyPath(keyPath: &NSString) -> Id; - # [method_id (expressionForFunction : arguments :)] + #[method_id(expressionForFunction:arguments:)] pub unsafe fn expressionForFunction_arguments( name: &NSString, parameters: &NSArray, ) -> Id; - # [method_id (expressionForAggregate :)] + #[method_id(expressionForAggregate:)] pub unsafe fn expressionForAggregate( subexpressions: &NSArray, ) -> Id; - # [method_id (expressionForUnionSet : with :)] + #[method_id(expressionForUnionSet:with:)] pub unsafe fn expressionForUnionSet_with( left: &NSExpression, right: &NSExpression, ) -> Id; - # [method_id (expressionForIntersectSet : with :)] + #[method_id(expressionForIntersectSet:with:)] pub unsafe fn expressionForIntersectSet_with( left: &NSExpression, right: &NSExpression, ) -> Id; - # [method_id (expressionForMinusSet : with :)] + #[method_id(expressionForMinusSet:with:)] pub unsafe fn expressionForMinusSet_with( left: &NSExpression, right: &NSExpression, ) -> Id; - # [method_id (expressionForSubquery : usingIteratorVariable : predicate :)] + #[method_id(expressionForSubquery:usingIteratorVariable:predicate:)] pub unsafe fn expressionForSubquery_usingIteratorVariable_predicate( expression: &NSExpression, variable: &NSString, predicate: &NSPredicate, ) -> Id; - # [method_id (expressionForFunction : selectorName : arguments :)] + #[method_id(expressionForFunction:selectorName:arguments:)] pub unsafe fn expressionForFunction_selectorName_arguments( target: &NSExpression, name: &NSString, @@ -72,20 +72,20 @@ extern_methods!( ) -> Id; #[method_id(expressionForAnyKey)] pub unsafe fn expressionForAnyKey() -> Id; - # [method_id (expressionForBlock : arguments :)] + #[method_id(expressionForBlock:arguments:)] pub unsafe fn expressionForBlock_arguments( block: TodoBlock, arguments: Option<&NSArray>, ) -> Id; - # [method_id (expressionForConditional : trueExpression : falseExpression :)] + #[method_id(expressionForConditional:trueExpression:falseExpression:)] pub unsafe fn expressionForConditional_trueExpression_falseExpression( predicate: &NSPredicate, trueExpression: &NSExpression, falseExpression: &NSExpression, ) -> Id; - # [method_id (initWithExpressionType :)] + #[method_id(initWithExpressionType:)] pub unsafe fn initWithExpressionType(&self, type_: NSExpressionType) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; #[method(expressionType)] pub unsafe fn expressionType(&self) -> NSExpressionType; @@ -115,7 +115,7 @@ extern_methods!( pub unsafe fn falseExpression(&self) -> Id; #[method(expressionBlock)] pub unsafe fn expressionBlock(&self) -> TodoBlock; - # [method_id (expressionValueWithObject : context :)] + #[method_id(expressionValueWithObject:context:)] pub unsafe fn expressionValueWithObject_context( &self, object: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index e8c017410..4f676dd93 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -14,15 +14,15 @@ extern_methods!( unsafe impl NSExtensionContext { #[method_id(inputItems)] pub unsafe fn inputItems(&self) -> Id; - # [method (completeRequestReturningItems : completionHandler :)] + #[method(completeRequestReturningItems:completionHandler:)] pub unsafe fn completeRequestReturningItems_completionHandler( &self, items: Option<&NSArray>, completionHandler: TodoBlock, ); - # [method (cancelRequestWithError :)] + #[method(cancelRequestWithError:)] pub unsafe fn cancelRequestWithError(&self, error: &NSError); - # [method (openURL : completionHandler :)] + #[method(openURL:completionHandler:)] pub unsafe fn openURL_completionHandler(&self, URL: &NSURL, completionHandler: TodoBlock); } ); diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index f45fe5c9e..85946a9a9 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -15,22 +15,22 @@ extern_methods!( unsafe impl NSExtensionItem { #[method_id(attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; - # [method (setAttributedTitle :)] + #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); #[method_id(attributedContentText)] pub unsafe fn attributedContentText(&self) -> Option>; - # [method (setAttributedContentText :)] + #[method(setAttributedContentText:)] pub unsafe fn setAttributedContentText( &self, attributedContentText: Option<&NSAttributedString>, ); #[method_id(attachments)] pub unsafe fn attachments(&self) -> Option, Shared>>; - # [method (setAttachments :)] + #[method(setAttachments:)] pub unsafe fn setAttachments(&self, attachments: Option<&NSArray>); #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; - # [method (setUserInfo :)] + #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index f2bd1bd27..91ba5b873 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -19,12 +19,12 @@ extern_class!( ); extern_methods!( unsafe impl NSFileAccessIntent { - # [method_id (readingIntentWithURL : options :)] + #[method_id(readingIntentWithURL:options:)] pub unsafe fn readingIntentWithURL_options( url: &NSURL, options: NSFileCoordinatorReadingOptions, ) -> Id; - # [method_id (writingIntentWithURL : options :)] + #[method_id(writingIntentWithURL:options:)] pub unsafe fn writingIntentWithURL_options( url: &NSURL, options: NSFileCoordinatorWritingOptions, @@ -42,29 +42,29 @@ extern_class!( ); extern_methods!( unsafe impl NSFileCoordinator { - # [method (addFilePresenter :)] + #[method(addFilePresenter:)] pub unsafe fn addFilePresenter(filePresenter: &NSFilePresenter); - # [method (removeFilePresenter :)] + #[method(removeFilePresenter:)] pub unsafe fn removeFilePresenter(filePresenter: &NSFilePresenter); #[method_id(filePresenters)] pub unsafe fn filePresenters() -> Id, Shared>; - # [method_id (initWithFilePresenter :)] + #[method_id(initWithFilePresenter:)] pub unsafe fn initWithFilePresenter( &self, filePresenterOrNil: Option<&NSFilePresenter>, ) -> Id; #[method_id(purposeIdentifier)] pub unsafe fn purposeIdentifier(&self) -> Id; - # [method (setPurposeIdentifier :)] + #[method(setPurposeIdentifier:)] pub unsafe fn setPurposeIdentifier(&self, purposeIdentifier: &NSString); - # [method (coordinateAccessWithIntents : queue : byAccessor :)] + #[method(coordinateAccessWithIntents:queue:byAccessor:)] pub unsafe fn coordinateAccessWithIntents_queue_byAccessor( &self, intents: &NSArray, queue: &NSOperationQueue, accessor: TodoBlock, ); - # [method (coordinateReadingItemAtURL : options : error : byAccessor :)] + #[method(coordinateReadingItemAtURL:options:error:byAccessor:)] pub unsafe fn coordinateReadingItemAtURL_options_error_byAccessor( &self, url: &NSURL, @@ -72,7 +72,7 @@ extern_methods!( outError: *mut *mut NSError, reader: TodoBlock, ); - # [method (coordinateWritingItemAtURL : options : error : byAccessor :)] + #[method(coordinateWritingItemAtURL:options:error:byAccessor:)] pub unsafe fn coordinateWritingItemAtURL_options_error_byAccessor( &self, url: &NSURL, @@ -80,7 +80,7 @@ extern_methods!( outError: *mut *mut NSError, writer: TodoBlock, ); - # [method (coordinateReadingItemAtURL : options : writingItemAtURL : options : error : byAccessor :)] + #[method(coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:)] pub unsafe fn coordinateReadingItemAtURL_options_writingItemAtURL_options_error_byAccessor( &self, readingURL: &NSURL, @@ -90,7 +90,7 @@ extern_methods!( outError: *mut *mut NSError, readerWriter: TodoBlock, ); - # [method (coordinateWritingItemAtURL : options : writingItemAtURL : options : error : byAccessor :)] + #[method(coordinateWritingItemAtURL:options:writingItemAtURL:options:error:byAccessor:)] pub unsafe fn coordinateWritingItemAtURL_options_writingItemAtURL_options_error_byAccessor( &self, url1: &NSURL, @@ -100,7 +100,7 @@ extern_methods!( outError: *mut *mut NSError, writer: TodoBlock, ); - # [method (prepareForReadingItemsAtURLs : options : writingItemsAtURLs : options : error : byAccessor :)] + #[method(prepareForReadingItemsAtURLs:options:writingItemsAtURLs:options:error:byAccessor:)] pub unsafe fn prepareForReadingItemsAtURLs_options_writingItemsAtURLs_options_error_byAccessor( &self, readingURLs: &NSArray, @@ -110,11 +110,11 @@ extern_methods!( outError: *mut *mut NSError, batchAccessor: TodoBlock, ); - # [method (itemAtURL : willMoveToURL :)] + #[method(itemAtURL:willMoveToURL:)] pub unsafe fn itemAtURL_willMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL); - # [method (itemAtURL : didMoveToURL :)] + #[method(itemAtURL:didMoveToURL:)] pub unsafe fn itemAtURL_didMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL); - # [method (itemAtURL : didChangeUbiquityAttributes :)] + #[method(itemAtURL:didChangeUbiquityAttributes:)] pub unsafe fn itemAtURL_didChangeUbiquityAttributes( &self, url: &NSURL, diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 7089140fb..649a7e1cc 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -22,48 +22,48 @@ extern_methods!( unsafe impl NSFileHandle { #[method_id(availableData)] pub unsafe fn availableData(&self) -> Id; - # [method_id (initWithFileDescriptor : closeOnDealloc :)] + #[method_id(initWithFileDescriptor:closeOnDealloc:)] pub unsafe fn initWithFileDescriptor_closeOnDealloc( &self, fd: c_int, closeopt: bool, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; - # [method_id (readDataToEndOfFileAndReturnError :)] + #[method_id(readDataToEndOfFileAndReturnError:)] pub unsafe fn readDataToEndOfFileAndReturnError( &self, ) -> Result, Id>; - # [method_id (readDataUpToLength : error :)] + #[method_id(readDataUpToLength:error:)] pub unsafe fn readDataUpToLength_error( &self, length: NSUInteger, ) -> Result, Id>; - # [method (writeData : error :)] + #[method(writeData:error:)] pub unsafe fn writeData_error(&self, data: &NSData) -> Result<(), Id>; - # [method (getOffset : error :)] + #[method(getOffset:error:)] pub unsafe fn getOffset_error( &self, offsetInFile: NonNull, ) -> Result<(), Id>; - # [method (seekToEndReturningOffset : error :)] + #[method(seekToEndReturningOffset:error:)] pub unsafe fn seekToEndReturningOffset_error( &self, offsetInFile: *mut c_ulonglong, ) -> Result<(), Id>; - # [method (seekToOffset : error :)] + #[method(seekToOffset:error:)] pub unsafe fn seekToOffset_error( &self, offset: c_ulonglong, ) -> Result<(), Id>; - # [method (truncateAtOffset : error :)] + #[method(truncateAtOffset:error:)] pub unsafe fn truncateAtOffset_error( &self, offset: c_ulonglong, ) -> Result<(), Id>; - # [method (synchronizeAndReturnError :)] + #[method(synchronizeAndReturnError:)] pub unsafe fn synchronizeAndReturnError(&self) -> Result<(), Id>; - # [method (closeAndReturnError :)] + #[method(closeAndReturnError:)] pub unsafe fn closeAndReturnError(&self) -> Result<(), Id>; } ); @@ -78,21 +78,21 @@ extern_methods!( pub unsafe fn fileHandleWithStandardError() -> Id; #[method_id(fileHandleWithNullDevice)] pub unsafe fn fileHandleWithNullDevice() -> Id; - # [method_id (fileHandleForReadingAtPath :)] + #[method_id(fileHandleForReadingAtPath:)] pub unsafe fn fileHandleForReadingAtPath(path: &NSString) -> Option>; - # [method_id (fileHandleForWritingAtPath :)] + #[method_id(fileHandleForWritingAtPath:)] pub unsafe fn fileHandleForWritingAtPath(path: &NSString) -> Option>; - # [method_id (fileHandleForUpdatingAtPath :)] + #[method_id(fileHandleForUpdatingAtPath:)] pub unsafe fn fileHandleForUpdatingAtPath(path: &NSString) -> Option>; - # [method_id (fileHandleForReadingFromURL : error :)] + #[method_id(fileHandleForReadingFromURL:error:)] pub unsafe fn fileHandleForReadingFromURL_error( url: &NSURL, ) -> Result, Id>; - # [method_id (fileHandleForWritingToURL : error :)] + #[method_id(fileHandleForWritingToURL:error:)] pub unsafe fn fileHandleForWritingToURL_error( url: &NSURL, ) -> Result, Id>; - # [method_id (fileHandleForUpdatingURL : error :)] + #[method_id(fileHandleForUpdatingURL:error:)] pub unsafe fn fileHandleForUpdatingURL_error( url: &NSURL, ) -> Result, Id>; @@ -101,28 +101,28 @@ extern_methods!( extern_methods!( #[doc = "NSFileHandleAsynchronousAccess"] unsafe impl NSFileHandle { - # [method (readInBackgroundAndNotifyForModes :)] + #[method(readInBackgroundAndNotifyForModes:)] pub unsafe fn readInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, ); #[method(readInBackgroundAndNotify)] pub unsafe fn readInBackgroundAndNotify(&self); - # [method (readToEndOfFileInBackgroundAndNotifyForModes :)] + #[method(readToEndOfFileInBackgroundAndNotifyForModes:)] pub unsafe fn readToEndOfFileInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, ); #[method(readToEndOfFileInBackgroundAndNotify)] pub unsafe fn readToEndOfFileInBackgroundAndNotify(&self); - # [method (acceptConnectionInBackgroundAndNotifyForModes :)] + #[method(acceptConnectionInBackgroundAndNotifyForModes:)] pub unsafe fn acceptConnectionInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, ); #[method(acceptConnectionInBackgroundAndNotify)] pub unsafe fn acceptConnectionInBackgroundAndNotify(&self); - # [method (waitForDataInBackgroundAndNotifyForModes :)] + #[method(waitForDataInBackgroundAndNotifyForModes:)] pub unsafe fn waitForDataInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, @@ -131,18 +131,18 @@ extern_methods!( pub unsafe fn waitForDataInBackgroundAndNotify(&self); #[method(readabilityHandler)] pub unsafe fn readabilityHandler(&self) -> TodoBlock; - # [method (setReadabilityHandler :)] + #[method(setReadabilityHandler:)] pub unsafe fn setReadabilityHandler(&self, readabilityHandler: TodoBlock); #[method(writeabilityHandler)] pub unsafe fn writeabilityHandler(&self) -> TodoBlock; - # [method (setWriteabilityHandler :)] + #[method(setWriteabilityHandler:)] pub unsafe fn setWriteabilityHandler(&self, writeabilityHandler: TodoBlock); } ); extern_methods!( #[doc = "NSFileHandlePlatformSpecific"] unsafe impl NSFileHandle { - # [method_id (initWithFileDescriptor :)] + #[method_id(initWithFileDescriptor:)] pub unsafe fn initWithFileDescriptor(&self, fd: c_int) -> Id; #[method(fileDescriptor)] pub unsafe fn fileDescriptor(&self) -> c_int; @@ -152,17 +152,17 @@ extern_methods!( unsafe impl NSFileHandle { #[method_id(readDataToEndOfFile)] pub unsafe fn readDataToEndOfFile(&self) -> Id; - # [method_id (readDataOfLength :)] + #[method_id(readDataOfLength:)] pub unsafe fn readDataOfLength(&self, length: NSUInteger) -> Id; - # [method (writeData :)] + #[method(writeData:)] pub unsafe fn writeData(&self, data: &NSData); #[method(offsetInFile)] pub unsafe fn offsetInFile(&self) -> c_ulonglong; #[method(seekToEndOfFile)] pub unsafe fn seekToEndOfFile(&self) -> c_ulonglong; - # [method (seekToFileOffset :)] + #[method(seekToFileOffset:)] pub unsafe fn seekToFileOffset(&self, offset: c_ulonglong); - # [method (truncateFileAtOffset :)] + #[method(truncateFileAtOffset:)] pub unsafe fn truncateFileAtOffset(&self, offset: c_ulonglong); #[method(synchronizeFile)] pub unsafe fn synchronizeFile(&self); diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 116a2af4b..deceb7db9 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -33,33 +33,33 @@ extern_methods!( unsafe impl NSFileManager { #[method_id(defaultManager)] pub unsafe fn defaultManager() -> Id; - # [method_id (mountedVolumeURLsIncludingResourceValuesForKeys : options :)] + #[method_id(mountedVolumeURLsIncludingResourceValuesForKeys:options:)] pub unsafe fn mountedVolumeURLsIncludingResourceValuesForKeys_options( &self, propertyKeys: Option<&NSArray>, options: NSVolumeEnumerationOptions, ) -> Option, Shared>>; - # [method (unmountVolumeAtURL : options : completionHandler :)] + #[method(unmountVolumeAtURL:options:completionHandler:)] pub unsafe fn unmountVolumeAtURL_options_completionHandler( &self, url: &NSURL, mask: NSFileManagerUnmountOptions, completionHandler: TodoBlock, ); - # [method_id (contentsOfDirectoryAtURL : includingPropertiesForKeys : options : error :)] + #[method_id(contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:)] pub unsafe fn contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error( &self, url: &NSURL, keys: Option<&NSArray>, mask: NSDirectoryEnumerationOptions, ) -> Result, Shared>, Id>; - # [method_id (URLsForDirectory : inDomains :)] + #[method_id(URLsForDirectory:inDomains:)] pub unsafe fn URLsForDirectory_inDomains( &self, directory: NSSearchPathDirectory, domainMask: NSSearchPathDomainMask, ) -> Id, Shared>; - # [method_id (URLForDirectory : inDomain : appropriateForURL : create : error :)] + #[method_id(URLForDirectory:inDomain:appropriateForURL:create:error:)] pub unsafe fn URLForDirectory_inDomain_appropriateForURL_create_error( &self, directory: NSSearchPathDirectory, @@ -67,14 +67,14 @@ extern_methods!( url: Option<&NSURL>, shouldCreate: bool, ) -> Result, Id>; - # [method (getRelationship : ofDirectoryAtURL : toItemAtURL : error :)] + #[method(getRelationship:ofDirectoryAtURL:toItemAtURL:error:)] pub unsafe fn getRelationship_ofDirectoryAtURL_toItemAtURL_error( &self, outRelationship: NonNull, directoryURL: &NSURL, otherURL: &NSURL, ) -> Result<(), Id>; - # [method (getRelationship : ofDirectory : inDomain : toItemAtURL : error :)] + #[method(getRelationship:ofDirectory:inDomain:toItemAtURL:error:)] pub unsafe fn getRelationship_ofDirectory_inDomain_toItemAtURL_error( &self, outRelationship: NonNull, @@ -82,14 +82,14 @@ extern_methods!( domainMask: NSSearchPathDomainMask, url: &NSURL, ) -> Result<(), Id>; - # [method (createDirectoryAtURL : withIntermediateDirectories : attributes : error :)] + #[method(createDirectoryAtURL:withIntermediateDirectories:attributes:error:)] pub unsafe fn createDirectoryAtURL_withIntermediateDirectories_attributes_error( &self, url: &NSURL, createIntermediates: bool, attributes: Option<&NSDictionary>, ) -> Result<(), Id>; - # [method (createSymbolicLinkAtURL : withDestinationURL : error :)] + #[method(createSymbolicLinkAtURL:withDestinationURL:error:)] pub unsafe fn createSymbolicLinkAtURL_withDestinationURL_error( &self, url: &NSURL, @@ -97,162 +97,162 @@ extern_methods!( ) -> Result<(), Id>; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSFileManagerDelegate>); - # [method (setAttributes : ofItemAtPath : error :)] + #[method(setAttributes:ofItemAtPath:error:)] pub unsafe fn setAttributes_ofItemAtPath_error( &self, attributes: &NSDictionary, path: &NSString, ) -> Result<(), Id>; - # [method (createDirectoryAtPath : withIntermediateDirectories : attributes : error :)] + #[method(createDirectoryAtPath:withIntermediateDirectories:attributes:error:)] pub unsafe fn createDirectoryAtPath_withIntermediateDirectories_attributes_error( &self, path: &NSString, createIntermediates: bool, attributes: Option<&NSDictionary>, ) -> Result<(), Id>; - # [method_id (contentsOfDirectoryAtPath : error :)] + #[method_id(contentsOfDirectoryAtPath:error:)] pub unsafe fn contentsOfDirectoryAtPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; - # [method_id (subpathsOfDirectoryAtPath : error :)] + #[method_id(subpathsOfDirectoryAtPath:error:)] pub unsafe fn subpathsOfDirectoryAtPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; - # [method_id (attributesOfItemAtPath : error :)] + #[method_id(attributesOfItemAtPath:error:)] pub unsafe fn attributesOfItemAtPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; - # [method_id (attributesOfFileSystemForPath : error :)] + #[method_id(attributesOfFileSystemForPath:error:)] pub unsafe fn attributesOfFileSystemForPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; - # [method (createSymbolicLinkAtPath : withDestinationPath : error :)] + #[method(createSymbolicLinkAtPath:withDestinationPath:error:)] pub unsafe fn createSymbolicLinkAtPath_withDestinationPath_error( &self, path: &NSString, destPath: &NSString, ) -> Result<(), Id>; - # [method_id (destinationOfSymbolicLinkAtPath : error :)] + #[method_id(destinationOfSymbolicLinkAtPath:error:)] pub unsafe fn destinationOfSymbolicLinkAtPath_error( &self, path: &NSString, ) -> Result, Id>; - # [method (copyItemAtPath : toPath : error :)] + #[method(copyItemAtPath:toPath:error:)] pub unsafe fn copyItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, ) -> Result<(), Id>; - # [method (moveItemAtPath : toPath : error :)] + #[method(moveItemAtPath:toPath:error:)] pub unsafe fn moveItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, ) -> Result<(), Id>; - # [method (linkItemAtPath : toPath : error :)] + #[method(linkItemAtPath:toPath:error:)] pub unsafe fn linkItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, ) -> Result<(), Id>; - # [method (removeItemAtPath : error :)] + #[method(removeItemAtPath:error:)] pub unsafe fn removeItemAtPath_error( &self, path: &NSString, ) -> Result<(), Id>; - # [method (copyItemAtURL : toURL : error :)] + #[method(copyItemAtURL:toURL:error:)] pub unsafe fn copyItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, ) -> Result<(), Id>; - # [method (moveItemAtURL : toURL : error :)] + #[method(moveItemAtURL:toURL:error:)] pub unsafe fn moveItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, ) -> Result<(), Id>; - # [method (linkItemAtURL : toURL : error :)] + #[method(linkItemAtURL:toURL:error:)] pub unsafe fn linkItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, ) -> Result<(), Id>; - # [method (removeItemAtURL : error :)] + #[method(removeItemAtURL:error:)] pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL) -> Result<(), Id>; - # [method (trashItemAtURL : resultingItemURL : error :)] + #[method(trashItemAtURL:resultingItemURL:error:)] pub unsafe fn trashItemAtURL_resultingItemURL_error( &self, url: &NSURL, outResultingURL: Option<&mut Option>>, ) -> Result<(), Id>; - # [method_id (fileAttributesAtPath : traverseLink :)] + #[method_id(fileAttributesAtPath:traverseLink:)] pub unsafe fn fileAttributesAtPath_traverseLink( &self, path: &NSString, yorn: bool, ) -> Option>; - # [method (changeFileAttributes : atPath :)] + #[method(changeFileAttributes:atPath:)] pub unsafe fn changeFileAttributes_atPath( &self, attributes: &NSDictionary, path: &NSString, ) -> bool; - # [method_id (directoryContentsAtPath :)] + #[method_id(directoryContentsAtPath:)] pub unsafe fn directoryContentsAtPath( &self, path: &NSString, ) -> Option>; - # [method_id (fileSystemAttributesAtPath :)] + #[method_id(fileSystemAttributesAtPath:)] pub unsafe fn fileSystemAttributesAtPath( &self, path: &NSString, ) -> Option>; - # [method_id (pathContentOfSymbolicLinkAtPath :)] + #[method_id(pathContentOfSymbolicLinkAtPath:)] pub unsafe fn pathContentOfSymbolicLinkAtPath( &self, path: &NSString, ) -> Option>; - # [method (createSymbolicLinkAtPath : pathContent :)] + #[method(createSymbolicLinkAtPath:pathContent:)] pub unsafe fn createSymbolicLinkAtPath_pathContent( &self, path: &NSString, otherpath: &NSString, ) -> bool; - # [method (createDirectoryAtPath : attributes :)] + #[method(createDirectoryAtPath:attributes:)] pub unsafe fn createDirectoryAtPath_attributes( &self, path: &NSString, attributes: &NSDictionary, ) -> bool; - # [method (linkPath : toPath : handler :)] + #[method(linkPath:toPath:handler:)] pub unsafe fn linkPath_toPath_handler( &self, src: &NSString, dest: &NSString, handler: Option<&Object>, ) -> bool; - # [method (copyPath : toPath : handler :)] + #[method(copyPath:toPath:handler:)] pub unsafe fn copyPath_toPath_handler( &self, src: &NSString, dest: &NSString, handler: Option<&Object>, ) -> bool; - # [method (movePath : toPath : handler :)] + #[method(movePath:toPath:handler:)] pub unsafe fn movePath_toPath_handler( &self, src: &NSString, dest: &NSString, handler: Option<&Object>, ) -> bool; - # [method (removeFileAtPath : handler :)] + #[method(removeFileAtPath:handler:)] pub unsafe fn removeFileAtPath_handler( &self, path: &NSString, @@ -260,43 +260,43 @@ extern_methods!( ) -> bool; #[method_id(currentDirectoryPath)] pub unsafe fn currentDirectoryPath(&self) -> Id; - # [method (changeCurrentDirectoryPath :)] + #[method(changeCurrentDirectoryPath:)] pub unsafe fn changeCurrentDirectoryPath(&self, path: &NSString) -> bool; - # [method (fileExistsAtPath :)] + #[method(fileExistsAtPath:)] pub unsafe fn fileExistsAtPath(&self, path: &NSString) -> bool; - # [method (fileExistsAtPath : isDirectory :)] + #[method(fileExistsAtPath:isDirectory:)] pub unsafe fn fileExistsAtPath_isDirectory( &self, path: &NSString, isDirectory: *mut bool, ) -> bool; - # [method (isReadableFileAtPath :)] + #[method(isReadableFileAtPath:)] pub unsafe fn isReadableFileAtPath(&self, path: &NSString) -> bool; - # [method (isWritableFileAtPath :)] + #[method(isWritableFileAtPath:)] pub unsafe fn isWritableFileAtPath(&self, path: &NSString) -> bool; - # [method (isExecutableFileAtPath :)] + #[method(isExecutableFileAtPath:)] pub unsafe fn isExecutableFileAtPath(&self, path: &NSString) -> bool; - # [method (isDeletableFileAtPath :)] + #[method(isDeletableFileAtPath:)] pub unsafe fn isDeletableFileAtPath(&self, path: &NSString) -> bool; - # [method (contentsEqualAtPath : andPath :)] + #[method(contentsEqualAtPath:andPath:)] pub unsafe fn contentsEqualAtPath_andPath( &self, path1: &NSString, path2: &NSString, ) -> bool; - # [method_id (displayNameAtPath :)] + #[method_id(displayNameAtPath:)] pub unsafe fn displayNameAtPath(&self, path: &NSString) -> Id; - # [method_id (componentsToDisplayForPath :)] + #[method_id(componentsToDisplayForPath:)] pub unsafe fn componentsToDisplayForPath( &self, path: &NSString, ) -> Option, Shared>>; - # [method_id (enumeratorAtPath :)] + #[method_id(enumeratorAtPath:)] pub unsafe fn enumeratorAtPath( &self, path: &NSString, ) -> Option, Shared>>; - # [method_id (enumeratorAtURL : includingPropertiesForKeys : options : errorHandler :)] + #[method_id(enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:)] pub unsafe fn enumeratorAtURL_includingPropertiesForKeys_options_errorHandler( &self, url: &NSURL, @@ -304,29 +304,29 @@ extern_methods!( mask: NSDirectoryEnumerationOptions, handler: TodoBlock, ) -> Option, Shared>>; - # [method_id (subpathsAtPath :)] + #[method_id(subpathsAtPath:)] pub unsafe fn subpathsAtPath( &self, path: &NSString, ) -> Option, Shared>>; - # [method_id (contentsAtPath :)] + #[method_id(contentsAtPath:)] pub unsafe fn contentsAtPath(&self, path: &NSString) -> Option>; - # [method (createFileAtPath : contents : attributes :)] + #[method(createFileAtPath:contents:attributes:)] pub unsafe fn createFileAtPath_contents_attributes( &self, path: &NSString, data: Option<&NSData>, attr: Option<&NSDictionary>, ) -> bool; - # [method (fileSystemRepresentationWithPath :)] + #[method(fileSystemRepresentationWithPath:)] pub unsafe fn fileSystemRepresentationWithPath(&self, path: &NSString) -> NonNull; - # [method_id (stringWithFileSystemRepresentation : length :)] + #[method_id(stringWithFileSystemRepresentation:length:)] pub unsafe fn stringWithFileSystemRepresentation_length( &self, str: NonNull, len: NSUInteger, ) -> Id; - # [method (replaceItemAtURL : withItemAtURL : backupItemName : options : resultingItemURL : error :)] + #[method(replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:)] pub unsafe fn replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error( &self, originalItemURL: &NSURL, @@ -335,31 +335,31 @@ extern_methods!( options: NSFileManagerItemReplacementOptions, resultingURL: Option<&mut Option>>, ) -> Result<(), Id>; - # [method (setUbiquitous : itemAtURL : destinationURL : error :)] + #[method(setUbiquitous:itemAtURL:destinationURL:error:)] pub unsafe fn setUbiquitous_itemAtURL_destinationURL_error( &self, flag: bool, url: &NSURL, destinationURL: &NSURL, ) -> Result<(), Id>; - # [method (isUbiquitousItemAtURL :)] + #[method(isUbiquitousItemAtURL:)] pub unsafe fn isUbiquitousItemAtURL(&self, url: &NSURL) -> bool; - # [method (startDownloadingUbiquitousItemAtURL : error :)] + #[method(startDownloadingUbiquitousItemAtURL:error:)] pub unsafe fn startDownloadingUbiquitousItemAtURL_error( &self, url: &NSURL, ) -> Result<(), Id>; - # [method (evictUbiquitousItemAtURL : error :)] + #[method(evictUbiquitousItemAtURL:error:)] pub unsafe fn evictUbiquitousItemAtURL_error( &self, url: &NSURL, ) -> Result<(), Id>; - # [method_id (URLForUbiquityContainerIdentifier :)] + #[method_id(URLForUbiquityContainerIdentifier:)] pub unsafe fn URLForUbiquityContainerIdentifier( &self, containerIdentifier: Option<&NSString>, ) -> Option>; - # [method_id (URLForPublishingUbiquitousItemAtURL : expirationDate : error :)] + #[method_id(URLForPublishingUbiquitousItemAtURL:expirationDate:error:)] pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( &self, url: &NSURL, @@ -367,13 +367,13 @@ extern_methods!( ) -> Result, Id>; #[method_id(ubiquityIdentityToken)] pub unsafe fn ubiquityIdentityToken(&self) -> Option>; - # [method (getFileProviderServicesForItemAtURL : completionHandler :)] + #[method(getFileProviderServicesForItemAtURL:completionHandler:)] pub unsafe fn getFileProviderServicesForItemAtURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, ); - # [method_id (containerURLForSecurityApplicationGroupIdentifier :)] + #[method_id(containerURLForSecurityApplicationGroupIdentifier:)] pub unsafe fn containerURLForSecurityApplicationGroupIdentifier( &self, groupIdentifier: &NSString, @@ -387,7 +387,7 @@ extern_methods!( pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id; #[method_id(temporaryDirectory)] pub unsafe fn temporaryDirectory(&self) -> Id; - # [method_id (homeDirectoryForUser :)] + #[method_id(homeDirectoryForUser:)] pub unsafe fn homeDirectoryForUser(&self, userName: &NSString) -> Option>; } @@ -395,13 +395,13 @@ extern_methods!( extern_methods!( #[doc = "NSCopyLinkMoveHandler"] unsafe impl NSObject { - # [method (fileManager : shouldProceedAfterError :)] + #[method(fileManager:shouldProceedAfterError:)] pub unsafe fn fileManager_shouldProceedAfterError( &self, fm: &NSFileManager, errorInfo: &NSDictionary, ) -> bool; - # [method (fileManager : willProcessPath :)] + #[method(fileManager:willProcessPath:)] pub unsafe fn fileManager_willProcessPath(&self, fm: &NSFileManager, path: &NSString); } ); @@ -442,7 +442,7 @@ extern_class!( ); extern_methods!( unsafe impl NSFileProviderService { - # [method (getFileProviderConnectionWithCompletionHandler :)] + #[method(getFileProviderConnectionWithCompletionHandler:)] pub unsafe fn getFileProviderConnectionWithCompletionHandler( &self, completionHandler: TodoBlock, diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index eb183b7a0..aa9b19247 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -19,33 +19,33 @@ extern_class!( ); extern_methods!( unsafe impl NSFileVersion { - # [method_id (currentVersionOfItemAtURL :)] + #[method_id(currentVersionOfItemAtURL:)] pub unsafe fn currentVersionOfItemAtURL(url: &NSURL) -> Option>; - # [method_id (otherVersionsOfItemAtURL :)] + #[method_id(otherVersionsOfItemAtURL:)] pub unsafe fn otherVersionsOfItemAtURL( url: &NSURL, ) -> Option, Shared>>; - # [method_id (unresolvedConflictVersionsOfItemAtURL :)] + #[method_id(unresolvedConflictVersionsOfItemAtURL:)] pub unsafe fn unresolvedConflictVersionsOfItemAtURL( url: &NSURL, ) -> Option, Shared>>; - # [method (getNonlocalVersionsOfItemAtURL : completionHandler :)] + #[method(getNonlocalVersionsOfItemAtURL:completionHandler:)] pub unsafe fn getNonlocalVersionsOfItemAtURL_completionHandler( url: &NSURL, completionHandler: TodoBlock, ); - # [method_id (versionOfItemAtURL : forPersistentIdentifier :)] + #[method_id(versionOfItemAtURL:forPersistentIdentifier:)] pub unsafe fn versionOfItemAtURL_forPersistentIdentifier( url: &NSURL, persistentIdentifier: &Object, ) -> Option>; - # [method_id (addVersionOfItemAtURL : withContentsOfURL : options : error :)] + #[method_id(addVersionOfItemAtURL:withContentsOfURL:options:error:)] pub unsafe fn addVersionOfItemAtURL_withContentsOfURL_options_error( url: &NSURL, contentsURL: &NSURL, options: NSFileVersionAddingOptions, ) -> Result, Id>; - # [method_id (temporaryDirectoryURLForNewVersionOfItemAtURL :)] + #[method_id(temporaryDirectoryURLForNewVersionOfItemAtURL:)] pub unsafe fn temporaryDirectoryURLForNewVersionOfItemAtURL( url: &NSURL, ) -> Id; @@ -66,25 +66,25 @@ extern_methods!( pub unsafe fn isConflict(&self) -> bool; #[method(isResolved)] pub unsafe fn isResolved(&self) -> bool; - # [method (setResolved :)] + #[method(setResolved:)] pub unsafe fn setResolved(&self, resolved: bool); #[method(isDiscardable)] pub unsafe fn isDiscardable(&self) -> bool; - # [method (setDiscardable :)] + #[method(setDiscardable:)] pub unsafe fn setDiscardable(&self, discardable: bool); #[method(hasLocalContents)] pub unsafe fn hasLocalContents(&self) -> bool; #[method(hasThumbnail)] pub unsafe fn hasThumbnail(&self) -> bool; - # [method_id (replaceItemAtURL : options : error :)] + #[method_id(replaceItemAtURL:options:error:)] pub unsafe fn replaceItemAtURL_options_error( &self, url: &NSURL, options: NSFileVersionReplacingOptions, ) -> Result, Id>; - # [method (removeAndReturnError :)] + #[method(removeAndReturnError:)] pub unsafe fn removeAndReturnError(&self) -> Result<(), Id>; - # [method (removeOtherVersionsOfItemAtURL : error :)] + #[method(removeOtherVersionsOfItemAtURL:error:)] pub unsafe fn removeOtherVersionsOfItemAtURL_error( url: &NSURL, ) -> Result<(), Id>; diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 3d27c1798..d481a6c0b 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -17,27 +17,27 @@ extern_class!( ); extern_methods!( unsafe impl NSFileWrapper { - # [method_id (initWithURL : options : error :)] + #[method_id(initWithURL:options:error:)] pub unsafe fn initWithURL_options_error( &self, url: &NSURL, options: NSFileWrapperReadingOptions, ) -> Result, Id>; - # [method_id (initDirectoryWithFileWrappers :)] + #[method_id(initDirectoryWithFileWrappers:)] pub unsafe fn initDirectoryWithFileWrappers( &self, childrenByPreferredName: &NSDictionary, ) -> Id; - # [method_id (initRegularFileWithContents :)] + #[method_id(initRegularFileWithContents:)] pub unsafe fn initRegularFileWithContents(&self, contents: &NSData) -> Id; - # [method_id (initSymbolicLinkWithDestinationURL :)] + #[method_id(initSymbolicLinkWithDestinationURL:)] pub unsafe fn initSymbolicLinkWithDestinationURL(&self, url: &NSURL) -> Id; - # [method_id (initWithSerializedRepresentation :)] + #[method_id(initWithSerializedRepresentation:)] pub unsafe fn initWithSerializedRepresentation( &self, serializeRepresentation: &NSData, ) -> Option>; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; #[method(isDirectory)] pub unsafe fn isDirectory(&self) -> bool; @@ -47,25 +47,25 @@ extern_methods!( pub unsafe fn isSymbolicLink(&self) -> bool; #[method_id(preferredFilename)] pub unsafe fn preferredFilename(&self) -> Option>; - # [method (setPreferredFilename :)] + #[method(setPreferredFilename:)] pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>); #[method_id(filename)] pub unsafe fn filename(&self) -> Option>; - # [method (setFilename :)] + #[method(setFilename:)] pub unsafe fn setFilename(&self, filename: Option<&NSString>); #[method_id(fileAttributes)] pub unsafe fn fileAttributes(&self) -> Id, Shared>; - # [method (setFileAttributes :)] + #[method(setFileAttributes:)] pub unsafe fn setFileAttributes(&self, fileAttributes: &NSDictionary); - # [method (matchesContentsOfURL :)] + #[method(matchesContentsOfURL:)] pub unsafe fn matchesContentsOfURL(&self, url: &NSURL) -> bool; - # [method (readFromURL : options : error :)] + #[method(readFromURL:options:error:)] pub unsafe fn readFromURL_options_error( &self, url: &NSURL, options: NSFileWrapperReadingOptions, ) -> Result<(), Id>; - # [method (writeToURL : options : originalContentsURL : error :)] + #[method(writeToURL:options:originalContentsURL:error:)] pub unsafe fn writeToURL_options_originalContentsURL_error( &self, url: &NSURL, @@ -74,21 +74,21 @@ extern_methods!( ) -> Result<(), Id>; #[method_id(serializedRepresentation)] pub unsafe fn serializedRepresentation(&self) -> Option>; - # [method_id (addFileWrapper :)] + #[method_id(addFileWrapper:)] pub unsafe fn addFileWrapper(&self, child: &NSFileWrapper) -> Id; - # [method_id (addRegularFileWithContents : preferredFilename :)] + #[method_id(addRegularFileWithContents:preferredFilename:)] pub unsafe fn addRegularFileWithContents_preferredFilename( &self, data: &NSData, fileName: &NSString, ) -> Id; - # [method (removeFileWrapper :)] + #[method(removeFileWrapper:)] pub unsafe fn removeFileWrapper(&self, child: &NSFileWrapper); #[method_id(fileWrappers)] pub unsafe fn fileWrappers( &self, ) -> Option, Shared>>; - # [method_id (keyForFileWrapper :)] + #[method_id(keyForFileWrapper:)] pub unsafe fn keyForFileWrapper( &self, child: &NSFileWrapper, @@ -102,25 +102,25 @@ extern_methods!( extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSFileWrapper { - # [method_id (initWithPath :)] + #[method_id(initWithPath:)] pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; - # [method_id (initSymbolicLinkWithDestination :)] + #[method_id(initSymbolicLinkWithDestination:)] pub unsafe fn initSymbolicLinkWithDestination(&self, path: &NSString) -> Id; - # [method (needsToBeUpdatedFromPath :)] + #[method(needsToBeUpdatedFromPath:)] pub unsafe fn needsToBeUpdatedFromPath(&self, path: &NSString) -> bool; - # [method (updateFromPath :)] + #[method(updateFromPath:)] pub unsafe fn updateFromPath(&self, path: &NSString) -> bool; - # [method (writeToFile : atomically : updateFilenames :)] + #[method(writeToFile:atomically:updateFilenames:)] pub unsafe fn writeToFile_atomically_updateFilenames( &self, path: &NSString, atomicFlag: bool, updateFilenamesFlag: bool, ) -> bool; - # [method_id (addFileWithPath :)] + #[method_id(addFileWithPath:)] pub unsafe fn addFileWithPath(&self, path: &NSString) -> Id; - # [method_id (addSymbolicLinkWithDestination : preferredFilename :)] + #[method_id(addSymbolicLinkWithDestination:preferredFilename:)] pub unsafe fn addSymbolicLinkWithDestination_preferredFilename( &self, path: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index b01e49750..b4127f99d 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -17,37 +17,37 @@ extern_class!( ); extern_methods!( unsafe impl NSFormatter { - # [method_id (stringForObjectValue :)] + #[method_id(stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, ) -> Option>; - # [method_id (attributedStringForObjectValue : withDefaultAttributes :)] + #[method_id(attributedStringForObjectValue:withDefaultAttributes:)] pub unsafe fn attributedStringForObjectValue_withDefaultAttributes( &self, obj: &Object, attrs: Option<&NSDictionary>, ) -> Option>; - # [method_id (editingStringForObjectValue :)] + #[method_id(editingStringForObjectValue:)] pub unsafe fn editingStringForObjectValue( &self, obj: &Object, ) -> Option>; - # [method (getObjectValue : forString : errorDescription :)] + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, string: &NSString, error: Option<&mut Option>>, ) -> bool; - # [method (isPartialStringValid : newEditingString : errorDescription :)] + #[method(isPartialStringValid:newEditingString:errorDescription:)] pub unsafe fn isPartialStringValid_newEditingString_errorDescription( &self, partialString: &NSString, newString: Option<&mut Option>>, error: Option<&mut Option>>, ) -> bool; - # [method (isPartialStringValid : proposedSelectedRange : originalString : originalSelectedRange : errorDescription :)] + #[method(isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:)] pub unsafe fn isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription( &self, partialStringPtr: &mut Id, diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs index 0c092f5b1..d0ca5cf2e 100644 --- a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -26,9 +26,9 @@ extern_methods!( pub unsafe fn collectIfNeeded(&self); #[method(collectExhaustively)] pub unsafe fn collectExhaustively(&self); - # [method (disableCollectorForPointer :)] + #[method(disableCollectorForPointer:)] pub unsafe fn disableCollectorForPointer(&self, ptr: NonNull); - # [method (enableCollectorForPointer :)] + #[method(enableCollectorForPointer:)] pub unsafe fn enableCollectorForPointer(&self, ptr: NonNull); #[method(zone)] pub unsafe fn zone(&self) -> NonNull; diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 7c8b1515e..ab468ff14 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -13,13 +13,13 @@ use super::__exported::NSString; extern_methods!( #[doc = "NSValueGeometryExtensions"] unsafe impl NSValue { - # [method_id (valueWithPoint :)] + #[method_id(valueWithPoint:)] pub unsafe fn valueWithPoint(point: NSPoint) -> Id; - # [method_id (valueWithSize :)] + #[method_id(valueWithSize:)] pub unsafe fn valueWithSize(size: NSSize) -> Id; - # [method_id (valueWithRect :)] + #[method_id(valueWithRect:)] pub unsafe fn valueWithRect(rect: NSRect) -> Id; - # [method_id (valueWithEdgeInsets :)] + #[method_id(valueWithEdgeInsets:)] pub unsafe fn valueWithEdgeInsets(insets: NSEdgeInsets) -> Id; #[method(pointValue)] pub unsafe fn pointValue(&self) -> NSPoint; @@ -34,15 +34,15 @@ extern_methods!( extern_methods!( #[doc = "NSGeometryCoding"] unsafe impl NSCoder { - # [method (encodePoint :)] + #[method(encodePoint:)] pub unsafe fn encodePoint(&self, point: NSPoint); #[method(decodePoint)] pub unsafe fn decodePoint(&self) -> NSPoint; - # [method (encodeSize :)] + #[method(encodeSize:)] pub unsafe fn encodeSize(&self, size: NSSize); #[method(decodeSize)] pub unsafe fn decodeSize(&self) -> NSSize; - # [method (encodeRect :)] + #[method(encodeRect:)] pub unsafe fn encodeRect(&self, rect: NSRect); #[method(decodeRect)] pub unsafe fn decodeRect(&self) -> NSRect; @@ -51,17 +51,17 @@ extern_methods!( extern_methods!( #[doc = "NSGeometryKeyedCoding"] unsafe impl NSCoder { - # [method (encodePoint : forKey :)] + #[method(encodePoint:forKey:)] pub unsafe fn encodePoint_forKey(&self, point: NSPoint, key: &NSString); - # [method (encodeSize : forKey :)] + #[method(encodeSize:forKey:)] pub unsafe fn encodeSize_forKey(&self, size: NSSize, key: &NSString); - # [method (encodeRect : forKey :)] + #[method(encodeRect:forKey:)] pub unsafe fn encodeRect_forKey(&self, rect: NSRect, key: &NSString); - # [method (decodePointForKey :)] + #[method(decodePointForKey:)] pub unsafe fn decodePointForKey(&self, key: &NSString) -> NSPoint; - # [method (decodeSizeForKey :)] + #[method(decodeSizeForKey:)] pub unsafe fn decodeSizeForKey(&self, key: &NSString) -> NSSize; - # [method (decodeRectForKey :)] + #[method(decodeRectForKey:)] pub unsafe fn decodeRectForKey(&self, key: &NSString) -> NSRect; } ); diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index b9a136118..673984a4b 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -21,20 +21,20 @@ extern_class!( ); extern_methods!( unsafe impl NSHTTPCookie { - # [method_id (initWithProperties :)] + #[method_id(initWithProperties:)] pub unsafe fn initWithProperties( &self, properties: &NSDictionary, ) -> Option>; - # [method_id (cookieWithProperties :)] + #[method_id(cookieWithProperties:)] pub unsafe fn cookieWithProperties( properties: &NSDictionary, ) -> Option>; - # [method_id (requestHeaderFieldsWithCookies :)] + #[method_id(requestHeaderFieldsWithCookies:)] pub unsafe fn requestHeaderFieldsWithCookies( cookies: &NSArray, ) -> Id, Shared>; - # [method_id (cookiesWithResponseHeaderFields : forURL :)] + #[method_id(cookiesWithResponseHeaderFields:forURL:)] pub unsafe fn cookiesWithResponseHeaderFields_forURL( headerFields: &NSDictionary, URL: &NSURL, diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index aea6e31dd..7f448fc5b 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -22,24 +22,24 @@ extern_methods!( unsafe impl NSHTTPCookieStorage { #[method_id(sharedHTTPCookieStorage)] pub unsafe fn sharedHTTPCookieStorage() -> Id; - # [method_id (sharedCookieStorageForGroupContainerIdentifier :)] + #[method_id(sharedCookieStorageForGroupContainerIdentifier:)] pub unsafe fn sharedCookieStorageForGroupContainerIdentifier( identifier: &NSString, ) -> Id; #[method_id(cookies)] pub unsafe fn cookies(&self) -> Option, Shared>>; - # [method (setCookie :)] + #[method(setCookie:)] pub unsafe fn setCookie(&self, cookie: &NSHTTPCookie); - # [method (deleteCookie :)] + #[method(deleteCookie:)] pub unsafe fn deleteCookie(&self, cookie: &NSHTTPCookie); - # [method (removeCookiesSinceDate :)] + #[method(removeCookiesSinceDate:)] pub unsafe fn removeCookiesSinceDate(&self, date: &NSDate); - # [method_id (cookiesForURL :)] + #[method_id(cookiesForURL:)] pub unsafe fn cookiesForURL( &self, URL: &NSURL, ) -> Option, Shared>>; - # [method (setCookies : forURL : mainDocumentURL :)] + #[method(setCookies:forURL:mainDocumentURL:)] pub unsafe fn setCookies_forURL_mainDocumentURL( &self, cookies: &NSArray, @@ -48,9 +48,9 @@ extern_methods!( ); #[method(cookieAcceptPolicy)] pub unsafe fn cookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy; - # [method (setCookieAcceptPolicy :)] + #[method(setCookieAcceptPolicy:)] pub unsafe fn setCookieAcceptPolicy(&self, cookieAcceptPolicy: NSHTTPCookieAcceptPolicy); - # [method_id (sortedCookiesUsingDescriptors :)] + #[method_id(sortedCookiesUsingDescriptors:)] pub unsafe fn sortedCookiesUsingDescriptors( &self, sortOrder: &NSArray, @@ -60,13 +60,13 @@ extern_methods!( extern_methods!( #[doc = "NSURLSessionTaskAdditions"] unsafe impl NSHTTPCookieStorage { - # [method (storeCookies : forTask :)] + #[method(storeCookies:forTask:)] pub unsafe fn storeCookies_forTask( &self, cookies: &NSArray, task: &NSURLSessionTask, ); - # [method (getCookiesForTask : completionHandler :)] + #[method(getCookiesForTask:completionHandler:)] pub unsafe fn getCookiesForTask_completionHandler( &self, task: &NSURLSessionTask, diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 9125844e0..2e3e42aa9 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -17,19 +17,19 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSHashTable { - # [method_id (initWithOptions : capacity :)] + #[method_id(initWithOptions:capacity:)] pub unsafe fn initWithOptions_capacity( &self, options: NSPointerFunctionsOptions, initialCapacity: NSUInteger, ) -> Id; - # [method_id (initWithPointerFunctions : capacity :)] + #[method_id(initWithPointerFunctions:capacity:)] pub unsafe fn initWithPointerFunctions_capacity( &self, functions: &NSPointerFunctions, initialCapacity: NSUInteger, ) -> Id; - # [method_id (hashTableWithOptions :)] + #[method_id(hashTableWithOptions:)] pub unsafe fn hashTableWithOptions( options: NSPointerFunctionsOptions, ) -> Id, Shared>; @@ -41,13 +41,13 @@ extern_methods!( pub unsafe fn pointerFunctions(&self) -> Id; #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - # [method_id (member :)] + #[method_id(member:)] pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option>; #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; - # [method (addObject :)] + #[method(addObject:)] pub unsafe fn addObject(&self, object: Option<&ObjectType>); - # [method (removeObject :)] + #[method(removeObject:)] pub unsafe fn removeObject(&self, object: Option<&ObjectType>); #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); @@ -55,19 +55,19 @@ extern_methods!( pub unsafe fn allObjects(&self) -> Id, Shared>; #[method_id(anyObject)] pub unsafe fn anyObject(&self) -> Option>; - # [method (containsObject :)] + #[method(containsObject:)] pub unsafe fn containsObject(&self, anObject: Option<&ObjectType>) -> bool; - # [method (intersectsHashTable :)] + #[method(intersectsHashTable:)] pub unsafe fn intersectsHashTable(&self, other: &NSHashTable) -> bool; - # [method (isEqualToHashTable :)] + #[method(isEqualToHashTable:)] pub unsafe fn isEqualToHashTable(&self, other: &NSHashTable) -> bool; - # [method (isSubsetOfHashTable :)] + #[method(isSubsetOfHashTable:)] pub unsafe fn isSubsetOfHashTable(&self, other: &NSHashTable) -> bool; - # [method (intersectHashTable :)] + #[method(intersectHashTable:)] pub unsafe fn intersectHashTable(&self, other: &NSHashTable); - # [method (unionHashTable :)] + #[method(unionHashTable:)] pub unsafe fn unionHashTable(&self, other: &NSHashTable); - # [method (minusHashTable :)] + #[method(minusHashTable:)] pub unsafe fn minusHashTable(&self, other: &NSHashTable); #[method_id(setRepresentation)] pub unsafe fn setRepresentation(&self) -> Id, Shared>; diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index 2403d90eb..2e4d47c39 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -17,11 +17,11 @@ extern_methods!( unsafe impl NSHost { #[method_id(currentHost)] pub unsafe fn currentHost() -> Id; - # [method_id (hostWithName :)] + #[method_id(hostWithName:)] pub unsafe fn hostWithName(name: Option<&NSString>) -> Id; - # [method_id (hostWithAddress :)] + #[method_id(hostWithAddress:)] pub unsafe fn hostWithAddress(address: &NSString) -> Id; - # [method (isEqualToHost :)] + #[method(isEqualToHost:)] pub unsafe fn isEqualToHost(&self, aHost: &NSHost) -> bool; #[method_id(name)] pub unsafe fn name(&self) -> Option>; @@ -33,7 +33,7 @@ extern_methods!( pub unsafe fn addresses(&self) -> Id, Shared>; #[method_id(localizedName)] pub unsafe fn localizedName(&self) -> Option>; - # [method (setHostCacheEnabled :)] + #[method(setHostCacheEnabled:)] pub unsafe fn setHostCacheEnabled(flag: bool); #[method(isHostCacheEnabled)] pub unsafe fn isHostCacheEnabled() -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index d201dd830..384c52968 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -18,19 +18,19 @@ extern_methods!( unsafe impl NSISO8601DateFormatter { #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Id; - # [method (setTimeZone :)] + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); #[method(formatOptions)] pub unsafe fn formatOptions(&self) -> NSISO8601DateFormatOptions; - # [method (setFormatOptions :)] + #[method(setFormatOptions:)] pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions); #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (stringFromDate :)] + #[method_id(stringFromDate:)] pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; - # [method_id (dateFromString :)] + #[method_id(dateFromString:)] pub unsafe fn dateFromString(&self, string: &NSString) -> Option>; - # [method_id (stringFromDate : timeZone : formatOptions :)] + #[method_id(stringFromDate:timeZone:formatOptions:)] pub unsafe fn stringFromDate_timeZone_formatOptions( date: &NSDate, timeZone: &NSTimeZone, diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index 6a7aaa05c..026ab973b 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -13,39 +13,39 @@ extern_class!( ); extern_methods!( unsafe impl NSIndexPath { - # [method_id (indexPathWithIndex :)] + #[method_id(indexPathWithIndex:)] pub unsafe fn indexPathWithIndex(index: NSUInteger) -> Id; - # [method_id (indexPathWithIndexes : length :)] + #[method_id(indexPathWithIndexes:length:)] pub unsafe fn indexPathWithIndexes_length( indexes: TodoArray, length: NSUInteger, ) -> Id; - # [method_id (initWithIndexes : length :)] + #[method_id(initWithIndexes:length:)] pub unsafe fn initWithIndexes_length( &self, indexes: TodoArray, length: NSUInteger, ) -> Id; - # [method_id (initWithIndex :)] + #[method_id(initWithIndex:)] pub unsafe fn initWithIndex(&self, index: NSUInteger) -> Id; - # [method_id (indexPathByAddingIndex :)] + #[method_id(indexPathByAddingIndex:)] pub unsafe fn indexPathByAddingIndex(&self, index: NSUInteger) -> Id; #[method_id(indexPathByRemovingLastIndex)] pub unsafe fn indexPathByRemovingLastIndex(&self) -> Id; - # [method (indexAtPosition :)] + #[method(indexAtPosition:)] pub unsafe fn indexAtPosition(&self, position: NSUInteger) -> NSUInteger; #[method(length)] pub unsafe fn length(&self) -> NSUInteger; - # [method (getIndexes : range :)] + #[method(getIndexes:range:)] pub unsafe fn getIndexes_range(&self, indexes: NonNull, positionRange: NSRange); - # [method (compare :)] + #[method(compare:)] pub unsafe fn compare(&self, otherObject: &NSIndexPath) -> NSComparisonResult; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSIndexPath { - # [method (getIndexes :)] + #[method(getIndexes:)] pub unsafe fn getIndexes(&self, indexes: NonNull); } ); diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index 9188d6eb7..06420f0fb 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -15,17 +15,17 @@ extern_methods!( unsafe impl NSIndexSet { #[method_id(indexSet)] pub unsafe fn indexSet() -> Id; - # [method_id (indexSetWithIndex :)] + #[method_id(indexSetWithIndex:)] pub unsafe fn indexSetWithIndex(value: NSUInteger) -> Id; - # [method_id (indexSetWithIndexesInRange :)] + #[method_id(indexSetWithIndexesInRange:)] pub unsafe fn indexSetWithIndexesInRange(range: NSRange) -> Id; - # [method_id (initWithIndexesInRange :)] + #[method_id(initWithIndexesInRange:)] pub unsafe fn initWithIndexesInRange(&self, range: NSRange) -> Id; - # [method_id (initWithIndexSet :)] + #[method_id(initWithIndexSet:)] pub unsafe fn initWithIndexSet(&self, indexSet: &NSIndexSet) -> Id; - # [method_id (initWithIndex :)] + #[method_id(initWithIndex:)] pub unsafe fn initWithIndex(&self, value: NSUInteger) -> Id; - # [method (isEqualToIndexSet :)] + #[method(isEqualToIndexSet:)] pub unsafe fn isEqualToIndexSet(&self, indexSet: &NSIndexSet) -> bool; #[method(count)] pub unsafe fn count(&self) -> NSUInteger; @@ -33,85 +33,85 @@ extern_methods!( pub unsafe fn firstIndex(&self) -> NSUInteger; #[method(lastIndex)] pub unsafe fn lastIndex(&self) -> NSUInteger; - # [method (indexGreaterThanIndex :)] + #[method(indexGreaterThanIndex:)] pub unsafe fn indexGreaterThanIndex(&self, value: NSUInteger) -> NSUInteger; - # [method (indexLessThanIndex :)] + #[method(indexLessThanIndex:)] pub unsafe fn indexLessThanIndex(&self, value: NSUInteger) -> NSUInteger; - # [method (indexGreaterThanOrEqualToIndex :)] + #[method(indexGreaterThanOrEqualToIndex:)] pub unsafe fn indexGreaterThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger; - # [method (indexLessThanOrEqualToIndex :)] + #[method(indexLessThanOrEqualToIndex:)] pub unsafe fn indexLessThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger; - # [method (getIndexes : maxCount : inIndexRange :)] + #[method(getIndexes:maxCount:inIndexRange:)] pub unsafe fn getIndexes_maxCount_inIndexRange( &self, indexBuffer: NonNull, bufferSize: NSUInteger, range: NSRangePointer, ) -> NSUInteger; - # [method (countOfIndexesInRange :)] + #[method(countOfIndexesInRange:)] pub unsafe fn countOfIndexesInRange(&self, range: NSRange) -> NSUInteger; - # [method (containsIndex :)] + #[method(containsIndex:)] pub unsafe fn containsIndex(&self, value: NSUInteger) -> bool; - # [method (containsIndexesInRange :)] + #[method(containsIndexesInRange:)] pub unsafe fn containsIndexesInRange(&self, range: NSRange) -> bool; - # [method (containsIndexes :)] + #[method(containsIndexes:)] pub unsafe fn containsIndexes(&self, indexSet: &NSIndexSet) -> bool; - # [method (intersectsIndexesInRange :)] + #[method(intersectsIndexesInRange:)] pub unsafe fn intersectsIndexesInRange(&self, range: NSRange) -> bool; - # [method (enumerateIndexesUsingBlock :)] + #[method(enumerateIndexesUsingBlock:)] pub unsafe fn enumerateIndexesUsingBlock(&self, block: TodoBlock); - # [method (enumerateIndexesWithOptions : usingBlock :)] + #[method(enumerateIndexesWithOptions:usingBlock:)] pub unsafe fn enumerateIndexesWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); - # [method (enumerateIndexesInRange : options : usingBlock :)] + #[method(enumerateIndexesInRange:options:usingBlock:)] pub unsafe fn enumerateIndexesInRange_options_usingBlock( &self, range: NSRange, opts: NSEnumerationOptions, block: TodoBlock, ); - # [method (indexPassingTest :)] + #[method(indexPassingTest:)] pub unsafe fn indexPassingTest(&self, predicate: TodoBlock) -> NSUInteger; - # [method (indexWithOptions : passingTest :)] + #[method(indexWithOptions:passingTest:)] pub unsafe fn indexWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; - # [method (indexInRange : options : passingTest :)] + #[method(indexInRange:options:passingTest:)] pub unsafe fn indexInRange_options_passingTest( &self, range: NSRange, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; - # [method_id (indexesPassingTest :)] + #[method_id(indexesPassingTest:)] pub unsafe fn indexesPassingTest(&self, predicate: TodoBlock) -> Id; - # [method_id (indexesWithOptions : passingTest :)] + #[method_id(indexesWithOptions:passingTest:)] pub unsafe fn indexesWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; - # [method_id (indexesInRange : options : passingTest :)] + #[method_id(indexesInRange:options:passingTest:)] pub unsafe fn indexesInRange_options_passingTest( &self, range: NSRange, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; - # [method (enumerateRangesUsingBlock :)] + #[method(enumerateRangesUsingBlock:)] pub unsafe fn enumerateRangesUsingBlock(&self, block: TodoBlock); - # [method (enumerateRangesWithOptions : usingBlock :)] + #[method(enumerateRangesWithOptions:usingBlock:)] pub unsafe fn enumerateRangesWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); - # [method (enumerateRangesInRange : options : usingBlock :)] + #[method(enumerateRangesInRange:options:usingBlock:)] pub unsafe fn enumerateRangesInRange_options_usingBlock( &self, range: NSRange, @@ -129,21 +129,21 @@ extern_class!( ); extern_methods!( unsafe impl NSMutableIndexSet { - # [method (addIndexes :)] + #[method(addIndexes:)] pub unsafe fn addIndexes(&self, indexSet: &NSIndexSet); - # [method (removeIndexes :)] + #[method(removeIndexes:)] pub unsafe fn removeIndexes(&self, indexSet: &NSIndexSet); #[method(removeAllIndexes)] pub unsafe fn removeAllIndexes(&self); - # [method (addIndex :)] + #[method(addIndex:)] pub unsafe fn addIndex(&self, value: NSUInteger); - # [method (removeIndex :)] + #[method(removeIndex:)] pub unsafe fn removeIndex(&self, value: NSUInteger); - # [method (addIndexesInRange :)] + #[method(addIndexesInRange:)] pub unsafe fn addIndexesInRange(&self, range: NSRange); - # [method (removeIndexesInRange :)] + #[method(removeIndexesInRange:)] pub unsafe fn removeIndexesInRange(&self, range: NSRange); - # [method (shiftIndexesStartingAtIndex : by :)] + #[method(shiftIndexesStartingAtIndex:by:)] pub unsafe fn shiftIndexesStartingAtIndex_by(&self, index: NSUInteger, delta: NSInteger); } ); diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index 5c205de5a..9a3673573 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -28,7 +28,7 @@ extern_class!( ); extern_methods!( unsafe impl NSInflectionRuleExplicit { - # [method_id (initWithMorphology :)] + #[method_id(initWithMorphology:)] pub unsafe fn initWithMorphology(&self, morphology: &NSMorphology) -> Id; #[method_id(morphology)] pub unsafe fn morphology(&self) -> Id; @@ -37,7 +37,7 @@ extern_methods!( extern_methods!( #[doc = "NSInflectionAvailability"] unsafe impl NSInflectionRule { - # [method (canInflectLanguage :)] + #[method(canInflectLanguage:)] pub unsafe fn canInflectLanguage(language: &NSString) -> bool; #[method(canInflectPreferredLocalization)] pub unsafe fn canInflectPreferredLocalization() -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index 60c30d123..d4fc8def2 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -13,7 +13,7 @@ extern_class!( ); extern_methods!( unsafe impl NSInvocation { - # [method_id (invocationWithMethodSignature :)] + #[method_id(invocationWithMethodSignature:)] pub unsafe fn invocationWithMethodSignature( sig: &NSMethodSignature, ) -> Id; @@ -25,23 +25,23 @@ extern_methods!( pub unsafe fn argumentsRetained(&self) -> bool; #[method_id(target)] pub unsafe fn target(&self) -> Option>; - # [method (setTarget :)] + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(selector)] pub unsafe fn selector(&self) -> Sel; - # [method (setSelector :)] + #[method(setSelector:)] pub unsafe fn setSelector(&self, selector: Sel); - # [method (getReturnValue :)] + #[method(getReturnValue:)] pub unsafe fn getReturnValue(&self, retLoc: NonNull); - # [method (setReturnValue :)] + #[method(setReturnValue:)] pub unsafe fn setReturnValue(&self, retLoc: NonNull); - # [method (getArgument : atIndex :)] + #[method(getArgument:atIndex:)] pub unsafe fn getArgument_atIndex(&self, argumentLocation: NonNull, idx: NSInteger); - # [method (setArgument : atIndex :)] + #[method(setArgument:atIndex:)] pub unsafe fn setArgument_atIndex(&self, argumentLocation: NonNull, idx: NSInteger); #[method(invoke)] pub unsafe fn invoke(&self); - # [method (invokeWithTarget :)] + #[method(invokeWithTarget:)] pub unsafe fn invokeWithTarget(&self, target: &Object); } ); diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 9e9a454b9..2418ab7c9 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -17,14 +17,14 @@ extern_methods!( unsafe impl NSItemProvider { #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method (registerDataRepresentationForTypeIdentifier : visibility : loadHandler :)] + #[method(registerDataRepresentationForTypeIdentifier:visibility:loadHandler:)] pub unsafe fn registerDataRepresentationForTypeIdentifier_visibility_loadHandler( &self, typeIdentifier: &NSString, visibility: NSItemProviderRepresentationVisibility, loadHandler: TodoBlock, ); - # [method (registerFileRepresentationForTypeIdentifier : fileOptions : visibility : loadHandler :)] + #[method(registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:)] pub unsafe fn registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler( &self, typeIdentifier: &NSString, @@ -34,32 +34,32 @@ extern_methods!( ); #[method_id(registeredTypeIdentifiers)] pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared>; - # [method_id (registeredTypeIdentifiersWithFileOptions :)] + #[method_id(registeredTypeIdentifiersWithFileOptions:)] pub unsafe fn registeredTypeIdentifiersWithFileOptions( &self, fileOptions: NSItemProviderFileOptions, ) -> Id, Shared>; - # [method (hasItemConformingToTypeIdentifier :)] + #[method(hasItemConformingToTypeIdentifier:)] pub unsafe fn hasItemConformingToTypeIdentifier(&self, typeIdentifier: &NSString) -> bool; - # [method (hasRepresentationConformingToTypeIdentifier : fileOptions :)] + #[method(hasRepresentationConformingToTypeIdentifier:fileOptions:)] pub unsafe fn hasRepresentationConformingToTypeIdentifier_fileOptions( &self, typeIdentifier: &NSString, fileOptions: NSItemProviderFileOptions, ) -> bool; - # [method_id (loadDataRepresentationForTypeIdentifier : completionHandler :)] + #[method_id(loadDataRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadDataRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, ) -> Id; - # [method_id (loadFileRepresentationForTypeIdentifier : completionHandler :)] + #[method_id(loadFileRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadFileRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, ) -> Id; - # [method_id (loadInPlaceFileRepresentationForTypeIdentifier : completionHandler :)] + #[method_id(loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadInPlaceFileRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, @@ -67,34 +67,34 @@ extern_methods!( ) -> Id; #[method_id(suggestedName)] pub unsafe fn suggestedName(&self) -> Option>; - # [method (setSuggestedName :)] + #[method(setSuggestedName:)] pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>); - # [method_id (initWithObject :)] + #[method_id(initWithObject:)] pub unsafe fn initWithObject(&self, object: &NSItemProviderWriting) -> Id; - # [method (registerObject : visibility :)] + #[method(registerObject:visibility:)] pub unsafe fn registerObject_visibility( &self, object: &NSItemProviderWriting, visibility: NSItemProviderRepresentationVisibility, ); - # [method_id (initWithItem : typeIdentifier :)] + #[method_id(initWithItem:typeIdentifier:)] pub unsafe fn initWithItem_typeIdentifier( &self, item: Option<&NSSecureCoding>, typeIdentifier: Option<&NSString>, ) -> Id; - # [method_id (initWithContentsOfURL :)] + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, fileURL: Option<&NSURL>, ) -> Option>; - # [method (registerItemForTypeIdentifier : loadHandler :)] + #[method(registerItemForTypeIdentifier:loadHandler:)] pub unsafe fn registerItemForTypeIdentifier_loadHandler( &self, typeIdentifier: &NSString, loadHandler: NSItemProviderLoadHandler, ); - # [method (loadItemForTypeIdentifier : options : completionHandler :)] + #[method(loadItemForTypeIdentifier:options:completionHandler:)] pub unsafe fn loadItemForTypeIdentifier_options_completionHandler( &self, typeIdentifier: &NSString, @@ -108,9 +108,9 @@ extern_methods!( unsafe impl NSItemProvider { #[method(previewImageHandler)] pub unsafe fn previewImageHandler(&self) -> NSItemProviderLoadHandler; - # [method (setPreviewImageHandler :)] + #[method(setPreviewImageHandler:)] pub unsafe fn setPreviewImageHandler(&self, previewImageHandler: NSItemProviderLoadHandler); - # [method (loadPreviewImageWithOptions : completionHandler :)] + #[method(loadPreviewImageWithOptions:completionHandler:)] pub unsafe fn loadPreviewImageWithOptions_completionHandler( &self, options: Option<&NSDictionary>, diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 17d02e710..c93b2e310 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -16,19 +16,19 @@ extern_class!( ); extern_methods!( unsafe impl NSJSONSerialization { - # [method (isValidJSONObject :)] + #[method(isValidJSONObject:)] pub unsafe fn isValidJSONObject(obj: &Object) -> bool; - # [method_id (dataWithJSONObject : options : error :)] + #[method_id(dataWithJSONObject:options:error:)] pub unsafe fn dataWithJSONObject_options_error( obj: &Object, opt: NSJSONWritingOptions, ) -> Result, Id>; - # [method_id (JSONObjectWithData : options : error :)] + #[method_id(JSONObjectWithData:options:error:)] pub unsafe fn JSONObjectWithData_options_error( data: &NSData, opt: NSJSONReadingOptions, ) -> Result, Id>; - # [method_id (JSONObjectWithStream : options : error :)] + #[method_id(JSONObjectWithStream:options:error:)] pub unsafe fn JSONObjectWithStream_options_error( stream: &NSInputStream, opt: NSJSONReadingOptions, diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index c7b0cd060..170b81c95 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -15,62 +15,62 @@ extern_methods!( unsafe impl NSObject { #[method(accessInstanceVariablesDirectly)] pub unsafe fn accessInstanceVariablesDirectly() -> bool; - # [method_id (valueForKey :)] + #[method_id(valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; - # [method (setValue : forKey :)] + #[method(setValue:forKey:)] pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); - # [method (validateValue : forKey : error :)] + #[method(validateValue:forKey:error:)] pub unsafe fn validateValue_forKey_error( &self, ioValue: &mut Option>, inKey: &NSString, ) -> Result<(), Id>; - # [method_id (mutableArrayValueForKey :)] + #[method_id(mutableArrayValueForKey:)] pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id; - # [method_id (mutableOrderedSetValueForKey :)] + #[method_id(mutableOrderedSetValueForKey:)] pub unsafe fn mutableOrderedSetValueForKey( &self, key: &NSString, ) -> Id; - # [method_id (mutableSetValueForKey :)] + #[method_id(mutableSetValueForKey:)] pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id; - # [method_id (valueForKeyPath :)] + #[method_id(valueForKeyPath:)] pub unsafe fn valueForKeyPath(&self, keyPath: &NSString) -> Option>; - # [method (setValue : forKeyPath :)] + #[method(setValue:forKeyPath:)] pub unsafe fn setValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString); - # [method (validateValue : forKeyPath : error :)] + #[method(validateValue:forKeyPath:error:)] pub unsafe fn validateValue_forKeyPath_error( &self, ioValue: &mut Option>, inKeyPath: &NSString, ) -> Result<(), Id>; - # [method_id (mutableArrayValueForKeyPath :)] + #[method_id(mutableArrayValueForKeyPath:)] pub unsafe fn mutableArrayValueForKeyPath( &self, keyPath: &NSString, ) -> Id; - # [method_id (mutableOrderedSetValueForKeyPath :)] + #[method_id(mutableOrderedSetValueForKeyPath:)] pub unsafe fn mutableOrderedSetValueForKeyPath( &self, keyPath: &NSString, ) -> Id; - # [method_id (mutableSetValueForKeyPath :)] + #[method_id(mutableSetValueForKeyPath:)] pub unsafe fn mutableSetValueForKeyPath( &self, keyPath: &NSString, ) -> Id; - # [method_id (valueForUndefinedKey :)] + #[method_id(valueForUndefinedKey:)] pub unsafe fn valueForUndefinedKey(&self, key: &NSString) -> Option>; - # [method (setValue : forUndefinedKey :)] + #[method(setValue:forUndefinedKey:)] pub unsafe fn setValue_forUndefinedKey(&self, value: Option<&Object>, key: &NSString); - # [method (setNilValueForKey :)] + #[method(setNilValueForKey:)] pub unsafe fn setNilValueForKey(&self, key: &NSString); - # [method_id (dictionaryWithValuesForKeys :)] + #[method_id(dictionaryWithValuesForKeys:)] pub unsafe fn dictionaryWithValuesForKeys( &self, keys: &NSArray, ) -> Id, Shared>; - # [method (setValuesForKeysWithDictionary :)] + #[method(setValuesForKeysWithDictionary:)] pub unsafe fn setValuesForKeysWithDictionary( &self, keyedValues: &NSDictionary, @@ -80,41 +80,41 @@ extern_methods!( extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSArray { - # [method_id (valueForKey :)] + #[method_id(valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Id; - # [method (setValue : forKey :)] + #[method(setValue:forKey:)] pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); } ); extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSDictionary { - # [method_id (valueForKey :)] + #[method_id(valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; } ); extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSMutableDictionary { - # [method (setValue : forKey :)] + #[method(setValue:forKey:)] pub unsafe fn setValue_forKey(&self, value: Option<&ObjectType>, key: &NSString); } ); extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSOrderedSet { - # [method_id (valueForKey :)] + #[method_id(valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Id; - # [method (setValue : forKey :)] + #[method(setValue:forKey:)] pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); } ); extern_methods!( #[doc = "NSKeyValueCoding"] unsafe impl NSSet { - # [method_id (valueForKey :)] + #[method_id(valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Id; - # [method (setValue : forKey :)] + #[method(setValue:forKey:)] pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); } ); @@ -123,26 +123,26 @@ extern_methods!( unsafe impl NSObject { #[method(useStoredAccessor)] pub unsafe fn useStoredAccessor() -> bool; - # [method_id (storedValueForKey :)] + #[method_id(storedValueForKey:)] pub unsafe fn storedValueForKey(&self, key: &NSString) -> Option>; - # [method (takeStoredValue : forKey :)] + #[method(takeStoredValue:forKey:)] pub unsafe fn takeStoredValue_forKey(&self, value: Option<&Object>, key: &NSString); - # [method (takeValue : forKey :)] + #[method(takeValue:forKey:)] pub unsafe fn takeValue_forKey(&self, value: Option<&Object>, key: &NSString); - # [method (takeValue : forKeyPath :)] + #[method(takeValue:forKeyPath:)] pub unsafe fn takeValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString); - # [method_id (handleQueryWithUnboundKey :)] + #[method_id(handleQueryWithUnboundKey:)] pub unsafe fn handleQueryWithUnboundKey( &self, key: &NSString, ) -> Option>; - # [method (handleTakeValue : forUnboundKey :)] + #[method(handleTakeValue:forUnboundKey:)] pub unsafe fn handleTakeValue_forUnboundKey(&self, value: Option<&Object>, key: &NSString); - # [method (unableToSetNilForKey :)] + #[method(unableToSetNilForKey:)] pub unsafe fn unableToSetNilForKey(&self, key: &NSString); - # [method_id (valuesForKeys :)] + #[method_id(valuesForKeys:)] pub unsafe fn valuesForKeys(&self, keys: &NSArray) -> Id; - # [method (takeValuesFromDictionary :)] + #[method(takeValuesFromDictionary:)] pub unsafe fn takeValuesFromDictionary(&self, properties: &NSDictionary); } ); diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 8d8f7b838..45f1e19d7 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -12,7 +12,7 @@ pub type NSKeyValueChangeKey = NSString; extern_methods!( #[doc = "NSKeyValueObserving"] unsafe impl NSObject { - # [method (observeValueForKeyPath : ofObject : change : context :)] + #[method(observeValueForKeyPath:ofObject:change:context:)] pub unsafe fn observeValueForKeyPath_ofObject_change_context( &self, keyPath: Option<&NSString>, @@ -25,7 +25,7 @@ extern_methods!( extern_methods!( #[doc = "NSKeyValueObserverRegistration"] unsafe impl NSObject { - # [method (addObserver : forKeyPath : options : context :)] + #[method(addObserver:forKeyPath:options:context:)] pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, @@ -33,21 +33,21 @@ extern_methods!( options: NSKeyValueObservingOptions, context: *mut c_void, ); - # [method (removeObserver : forKeyPath : context :)] + #[method(removeObserver:forKeyPath:context:)] pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, keyPath: &NSString, context: *mut c_void, ); - # [method (removeObserver : forKeyPath :)] + #[method(removeObserver:forKeyPath:)] pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); extern_methods!( #[doc = "NSKeyValueObserverRegistration"] unsafe impl NSArray { - # [method (addObserver : toObjectsAtIndexes : forKeyPath : options : context :)] + #[method(addObserver:toObjectsAtIndexes:forKeyPath:options:context:)] pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( &self, observer: &NSObject, @@ -56,7 +56,7 @@ extern_methods!( options: NSKeyValueObservingOptions, context: *mut c_void, ); - # [method (removeObserver : fromObjectsAtIndexes : forKeyPath : context :)] + #[method(removeObserver:fromObjectsAtIndexes:forKeyPath:context:)] pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath_context( &self, observer: &NSObject, @@ -64,14 +64,14 @@ extern_methods!( keyPath: &NSString, context: *mut c_void, ); - # [method (removeObserver : fromObjectsAtIndexes : forKeyPath :)] + #[method(removeObserver:fromObjectsAtIndexes:forKeyPath:)] pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( &self, observer: &NSObject, indexes: &NSIndexSet, keyPath: &NSString, ); - # [method (addObserver : forKeyPath : options : context :)] + #[method(addObserver:forKeyPath:options:context:)] pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, @@ -79,21 +79,21 @@ extern_methods!( options: NSKeyValueObservingOptions, context: *mut c_void, ); - # [method (removeObserver : forKeyPath : context :)] + #[method(removeObserver:forKeyPath:context:)] pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, keyPath: &NSString, context: *mut c_void, ); - # [method (removeObserver : forKeyPath :)] + #[method(removeObserver:forKeyPath:)] pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); extern_methods!( #[doc = "NSKeyValueObserverRegistration"] unsafe impl NSOrderedSet { - # [method (addObserver : forKeyPath : options : context :)] + #[method(addObserver:forKeyPath:options:context:)] pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, @@ -101,21 +101,21 @@ extern_methods!( options: NSKeyValueObservingOptions, context: *mut c_void, ); - # [method (removeObserver : forKeyPath : context :)] + #[method(removeObserver:forKeyPath:context:)] pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, keyPath: &NSString, context: *mut c_void, ); - # [method (removeObserver : forKeyPath :)] + #[method(removeObserver:forKeyPath:)] pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); extern_methods!( #[doc = "NSKeyValueObserverRegistration"] unsafe impl NSSet { - # [method (addObserver : forKeyPath : options : context :)] + #[method(addObserver:forKeyPath:options:context:)] pub unsafe fn addObserver_forKeyPath_options_context( &self, observer: &NSObject, @@ -123,46 +123,46 @@ extern_methods!( options: NSKeyValueObservingOptions, context: *mut c_void, ); - # [method (removeObserver : forKeyPath : context :)] + #[method(removeObserver:forKeyPath:context:)] pub unsafe fn removeObserver_forKeyPath_context( &self, observer: &NSObject, keyPath: &NSString, context: *mut c_void, ); - # [method (removeObserver : forKeyPath :)] + #[method(removeObserver:forKeyPath:)] pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); extern_methods!( #[doc = "NSKeyValueObserverNotification"] unsafe impl NSObject { - # [method (willChangeValueForKey :)] + #[method(willChangeValueForKey:)] pub unsafe fn willChangeValueForKey(&self, key: &NSString); - # [method (didChangeValueForKey :)] + #[method(didChangeValueForKey:)] pub unsafe fn didChangeValueForKey(&self, key: &NSString); - # [method (willChange : valuesAtIndexes : forKey :)] + #[method(willChange:valuesAtIndexes:forKey:)] pub unsafe fn willChange_valuesAtIndexes_forKey( &self, changeKind: NSKeyValueChange, indexes: &NSIndexSet, key: &NSString, ); - # [method (didChange : valuesAtIndexes : forKey :)] + #[method(didChange:valuesAtIndexes:forKey:)] pub unsafe fn didChange_valuesAtIndexes_forKey( &self, changeKind: NSKeyValueChange, indexes: &NSIndexSet, key: &NSString, ); - # [method (willChangeValueForKey : withSetMutation : usingObjects :)] + #[method(willChangeValueForKey:withSetMutation:usingObjects:)] pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects( &self, key: &NSString, mutationKind: NSKeyValueSetMutationKind, objects: &NSSet, ); - # [method (didChangeValueForKey : withSetMutation : usingObjects :)] + #[method(didChangeValueForKey:withSetMutation:usingObjects:)] pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects( &self, key: &NSString, @@ -174,22 +174,22 @@ extern_methods!( extern_methods!( #[doc = "NSKeyValueObservingCustomization"] unsafe impl NSObject { - # [method_id (keyPathsForValuesAffectingValueForKey :)] + #[method_id(keyPathsForValuesAffectingValueForKey:)] pub unsafe fn keyPathsForValuesAffectingValueForKey( key: &NSString, ) -> Id, Shared>; - # [method (automaticallyNotifiesObserversForKey :)] + #[method(automaticallyNotifiesObserversForKey:)] pub unsafe fn automaticallyNotifiesObserversForKey(key: &NSString) -> bool; #[method(observationInfo)] pub unsafe fn observationInfo(&self) -> *mut c_void; - # [method (setObservationInfo :)] + #[method(setObservationInfo:)] pub unsafe fn setObservationInfo(&self, observationInfo: *mut c_void); } ); extern_methods!( #[doc = "NSDeprecatedKeyValueObservingCustomization"] unsafe impl NSObject { - # [method (setKeys : triggerChangeNotificationsForDependentKey :)] + #[method(setKeys:triggerChangeNotificationsForDependentKey:)] pub unsafe fn setKeys_triggerChangeNotificationsForDependentKey( keys: &NSArray, dependentKey: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index ccb0d3ff0..4b560dc14 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -19,68 +19,68 @@ extern_class!( ); extern_methods!( unsafe impl NSKeyedArchiver { - # [method_id (initRequiringSecureCoding :)] + #[method_id(initRequiringSecureCoding:)] pub unsafe fn initRequiringSecureCoding( &self, requiresSecureCoding: bool, ) -> Id; - # [method_id (archivedDataWithRootObject : requiringSecureCoding : error :)] + #[method_id(archivedDataWithRootObject:requiringSecureCoding:error:)] pub unsafe fn archivedDataWithRootObject_requiringSecureCoding_error( object: &Object, requiresSecureCoding: bool, ) -> Result, Id>; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initForWritingWithMutableData :)] + #[method_id(initForWritingWithMutableData:)] pub unsafe fn initForWritingWithMutableData( &self, data: &NSMutableData, ) -> Id; - # [method_id (archivedDataWithRootObject :)] + #[method_id(archivedDataWithRootObject:)] pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id; - # [method (archiveRootObject : toFile :)] + #[method(archiveRootObject:toFile:)] pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedArchiverDelegate>); #[method(outputFormat)] pub unsafe fn outputFormat(&self) -> NSPropertyListFormat; - # [method (setOutputFormat :)] + #[method(setOutputFormat:)] pub unsafe fn setOutputFormat(&self, outputFormat: NSPropertyListFormat); #[method_id(encodedData)] pub unsafe fn encodedData(&self) -> Id; #[method(finishEncoding)] pub unsafe fn finishEncoding(&self); - # [method (setClassName : forClass :)] + #[method(setClassName:forClass:)] pub unsafe fn setClassName_forClass(codedName: Option<&NSString>, cls: &Class); - # [method (setClassName : forClass :)] + #[method(setClassName:forClass:)] pub unsafe fn setClassName_forClass(&self, codedName: Option<&NSString>, cls: &Class); - # [method_id (classNameForClass :)] + #[method_id(classNameForClass:)] pub unsafe fn classNameForClass(cls: &Class) -> Option>; - # [method_id (classNameForClass :)] + #[method_id(classNameForClass:)] pub unsafe fn classNameForClass(&self, cls: &Class) -> Option>; - # [method (encodeObject : forKey :)] + #[method(encodeObject:forKey:)] pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString); - # [method (encodeConditionalObject : forKey :)] + #[method(encodeConditionalObject:forKey:)] pub unsafe fn encodeConditionalObject_forKey( &self, object: Option<&Object>, key: &NSString, ); - # [method (encodeBool : forKey :)] + #[method(encodeBool:forKey:)] pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString); - # [method (encodeInt : forKey :)] + #[method(encodeInt:forKey:)] pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString); # [method (encodeInt32 : forKey :)] pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString); # [method (encodeInt64 : forKey :)] pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString); - # [method (encodeFloat : forKey :)] + #[method(encodeFloat:forKey:)] pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString); - # [method (encodeDouble : forKey :)] + #[method(encodeDouble:forKey:)] pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString); - # [method (encodeBytes : length : forKey :)] + #[method(encodeBytes:length:forKey:)] pub unsafe fn encodeBytes_length_forKey( &self, bytes: *mut u8, @@ -89,7 +89,7 @@ extern_methods!( ); #[method(requiresSecureCoding)] pub unsafe fn requiresSecureCoding(&self) -> bool; - # [method (setRequiresSecureCoding :)] + #[method(setRequiresSecureCoding:)] pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool); } ); @@ -102,38 +102,38 @@ extern_class!( ); extern_methods!( unsafe impl NSKeyedUnarchiver { - # [method_id (initForReadingFromData : error :)] + #[method_id(initForReadingFromData:error:)] pub unsafe fn initForReadingFromData_error( &self, data: &NSData, ) -> Result, Id>; - # [method_id (unarchivedObjectOfClass : fromData : error :)] + #[method_id(unarchivedObjectOfClass:fromData:error:)] pub unsafe fn unarchivedObjectOfClass_fromData_error( cls: &Class, data: &NSData, ) -> Result, Id>; - # [method_id (unarchivedArrayOfObjectsOfClass : fromData : error :)] + #[method_id(unarchivedArrayOfObjectsOfClass:fromData:error:)] pub unsafe fn unarchivedArrayOfObjectsOfClass_fromData_error( cls: &Class, data: &NSData, ) -> Result, Id>; - # [method_id (unarchivedDictionaryWithKeysOfClass : objectsOfClass : fromData : error :)] + #[method_id(unarchivedDictionaryWithKeysOfClass:objectsOfClass:fromData:error:)] pub unsafe fn unarchivedDictionaryWithKeysOfClass_objectsOfClass_fromData_error( keyCls: &Class, valueCls: &Class, data: &NSData, ) -> Result, Id>; - # [method_id (unarchivedObjectOfClasses : fromData : error :)] + #[method_id(unarchivedObjectOfClasses:fromData:error:)] pub unsafe fn unarchivedObjectOfClasses_fromData_error( classes: &NSSet, data: &NSData, ) -> Result, Id>; - # [method_id (unarchivedArrayOfObjectsOfClasses : fromData : error :)] + #[method_id(unarchivedArrayOfObjectsOfClasses:fromData:error:)] pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( classes: &NSSet, data: &NSData, ) -> Result, Id>; - # [method_id (unarchivedDictionaryWithKeysOfClasses : objectsOfClasses : fromData : error :)] + #[method_id(unarchivedDictionaryWithKeysOfClasses:objectsOfClasses:fromData:error:)] pub unsafe fn unarchivedDictionaryWithKeysOfClasses_objectsOfClasses_fromData_error( keyClasses: &NSSet, valueClasses: &NSSet, @@ -141,47 +141,47 @@ extern_methods!( ) -> Result, Id>; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initForReadingWithData :)] + #[method_id(initForReadingWithData:)] pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Id; - # [method_id (unarchiveObjectWithData :)] + #[method_id(unarchiveObjectWithData:)] pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option>; - # [method_id (unarchiveTopLevelObjectWithData : error :)] + #[method_id(unarchiveTopLevelObjectWithData:error:)] pub unsafe fn unarchiveTopLevelObjectWithData_error( data: &NSData, ) -> Result, Id>; - # [method_id (unarchiveObjectWithFile :)] + #[method_id(unarchiveObjectWithFile:)] pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option>; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedUnarchiverDelegate>); #[method(finishDecoding)] pub unsafe fn finishDecoding(&self); - # [method (setClass : forClassName :)] + #[method(setClass:forClassName:)] pub unsafe fn setClass_forClassName(cls: Option<&Class>, codedName: &NSString); - # [method (setClass : forClassName :)] + #[method(setClass:forClassName:)] pub unsafe fn setClass_forClassName(&self, cls: Option<&Class>, codedName: &NSString); - # [method (classForClassName :)] + #[method(classForClassName:)] pub unsafe fn classForClassName(codedName: &NSString) -> Option<&Class>; - # [method (classForClassName :)] + #[method(classForClassName:)] pub unsafe fn classForClassName(&self, codedName: &NSString) -> Option<&Class>; - # [method (containsValueForKey :)] + #[method(containsValueForKey:)] pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; - # [method_id (decodeObjectForKey :)] + #[method_id(decodeObjectForKey:)] pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option>; - # [method (decodeBoolForKey :)] + #[method(decodeBoolForKey:)] pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool; - # [method (decodeIntForKey :)] + #[method(decodeIntForKey:)] pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int; # [method (decodeInt32ForKey :)] pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32; # [method (decodeInt64ForKey :)] pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t; - # [method (decodeFloatForKey :)] + #[method(decodeFloatForKey:)] pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float; - # [method (decodeDoubleForKey :)] + #[method(decodeDoubleForKey:)] pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double; - # [method (decodeBytesForKey : returnedLength :)] + #[method(decodeBytesForKey:returnedLength:)] pub unsafe fn decodeBytesForKey_returnedLength( &self, key: &NSString, @@ -189,11 +189,11 @@ extern_methods!( ) -> *mut u8; #[method(requiresSecureCoding)] pub unsafe fn requiresSecureCoding(&self) -> bool; - # [method (setRequiresSecureCoding :)] + #[method(setRequiresSecureCoding:)] pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool); #[method(decodingFailurePolicy)] pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy; - # [method (setDecodingFailurePolicy :)] + #[method(setDecodingFailurePolicy:)] pub unsafe fn setDecodingFailurePolicy( &self, decodingFailurePolicy: NSDecodingFailurePolicy, @@ -207,7 +207,7 @@ extern_methods!( unsafe impl NSObject { #[method(classForKeyedArchiver)] pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class>; - # [method_id (replacementObjectForKeyedArchiver :)] + #[method_id(replacementObjectForKeyedArchiver:)] pub unsafe fn replacementObjectForKeyedArchiver( &self, archiver: &NSKeyedArchiver, diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index 3d76af7c9..f7ec0dd6e 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -14,37 +14,37 @@ extern_methods!( unsafe impl NSLengthFormatter { #[method_id(numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; - # [method (setNumberFormatter :)] + #[method(setNumberFormatter:)] pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); #[method(unitStyle)] pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; - # [method (setUnitStyle :)] + #[method(setUnitStyle:)] pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); #[method(isForPersonHeightUse)] pub unsafe fn isForPersonHeightUse(&self) -> bool; - # [method (setForPersonHeightUse :)] + #[method(setForPersonHeightUse:)] pub unsafe fn setForPersonHeightUse(&self, forPersonHeightUse: bool); - # [method_id (stringFromValue : unit :)] + #[method_id(stringFromValue:unit:)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSLengthFormatterUnit, ) -> Id; - # [method_id (stringFromMeters :)] + #[method_id(stringFromMeters:)] pub unsafe fn stringFromMeters(&self, numberInMeters: c_double) -> Id; - # [method_id (unitStringFromValue : unit :)] + #[method_id(unitStringFromValue:unit:)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSLengthFormatterUnit, ) -> Id; - # [method_id (unitStringFromMeters : usedUnit :)] + #[method_id(unitStringFromMeters:usedUnit:)] pub unsafe fn unitStringFromMeters_usedUnit( &self, numberInMeters: c_double, unitp: *mut NSLengthFormatterUnit, ) -> Id; - # [method (getObjectValue : forString : errorDescription :)] + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 1fe2d6856..6bf08752e 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -18,7 +18,7 @@ extern_class!( ); extern_methods!( unsafe impl NSLinguisticTagger { - # [method_id (initWithTagSchemes : options :)] + #[method_id(initWithTagSchemes:options:)] pub unsafe fn initWithTagSchemes_options( &self, tagSchemes: &NSArray, @@ -28,44 +28,44 @@ extern_methods!( pub unsafe fn tagSchemes(&self) -> Id, Shared>; #[method_id(string)] pub unsafe fn string(&self) -> Option>; - # [method (setString :)] + #[method(setString:)] pub unsafe fn setString(&self, string: Option<&NSString>); - # [method_id (availableTagSchemesForUnit : language :)] + #[method_id(availableTagSchemesForUnit:language:)] pub unsafe fn availableTagSchemesForUnit_language( unit: NSLinguisticTaggerUnit, language: &NSString, ) -> Id, Shared>; - # [method_id (availableTagSchemesForLanguage :)] + #[method_id(availableTagSchemesForLanguage:)] pub unsafe fn availableTagSchemesForLanguage( language: &NSString, ) -> Id, Shared>; - # [method (setOrthography : range :)] + #[method(setOrthography:range:)] pub unsafe fn setOrthography_range( &self, orthography: Option<&NSOrthography>, range: NSRange, ); - # [method_id (orthographyAtIndex : effectiveRange :)] + #[method_id(orthographyAtIndex:effectiveRange:)] pub unsafe fn orthographyAtIndex_effectiveRange( &self, charIndex: NSUInteger, effectiveRange: NSRangePointer, ) -> Option>; - # [method (stringEditedInRange : changeInLength :)] + #[method(stringEditedInRange:changeInLength:)] pub unsafe fn stringEditedInRange_changeInLength( &self, newRange: NSRange, delta: NSInteger, ); - # [method (tokenRangeAtIndex : unit :)] + #[method(tokenRangeAtIndex:unit:)] pub unsafe fn tokenRangeAtIndex_unit( &self, charIndex: NSUInteger, unit: NSLinguisticTaggerUnit, ) -> NSRange; - # [method (sentenceRangeForRange :)] + #[method(sentenceRangeForRange:)] pub unsafe fn sentenceRangeForRange(&self, range: NSRange) -> NSRange; - # [method (enumerateTagsInRange : unit : scheme : options : usingBlock :)] + #[method(enumerateTagsInRange:unit:scheme:options:usingBlock:)] pub unsafe fn enumerateTagsInRange_unit_scheme_options_usingBlock( &self, range: NSRange, @@ -74,7 +74,7 @@ extern_methods!( options: NSLinguisticTaggerOptions, block: TodoBlock, ); - # [method_id (tagAtIndex : unit : scheme : tokenRange :)] + #[method_id(tagAtIndex:unit:scheme:tokenRange:)] pub unsafe fn tagAtIndex_unit_scheme_tokenRange( &self, charIndex: NSUInteger, @@ -82,7 +82,7 @@ extern_methods!( scheme: &NSLinguisticTagScheme, tokenRange: NSRangePointer, ) -> Option>; - # [method_id (tagsInRange : unit : scheme : options : tokenRanges :)] + #[method_id(tagsInRange:unit:scheme:options:tokenRanges:)] pub unsafe fn tagsInRange_unit_scheme_options_tokenRanges( &self, range: NSRange, @@ -91,7 +91,7 @@ extern_methods!( options: NSLinguisticTaggerOptions, tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared>; - # [method (enumerateTagsInRange : scheme : options : usingBlock :)] + #[method(enumerateTagsInRange:scheme:options:usingBlock:)] pub unsafe fn enumerateTagsInRange_scheme_options_usingBlock( &self, range: NSRange, @@ -99,7 +99,7 @@ extern_methods!( opts: NSLinguisticTaggerOptions, block: TodoBlock, ); - # [method_id (tagAtIndex : scheme : tokenRange : sentenceRange :)] + #[method_id(tagAtIndex:scheme:tokenRange:sentenceRange:)] pub unsafe fn tagAtIndex_scheme_tokenRange_sentenceRange( &self, charIndex: NSUInteger, @@ -107,7 +107,7 @@ extern_methods!( tokenRange: NSRangePointer, sentenceRange: NSRangePointer, ) -> Option>; - # [method_id (tagsInRange : scheme : options : tokenRanges :)] + #[method_id(tagsInRange:scheme:options:tokenRanges:)] pub unsafe fn tagsInRange_scheme_options_tokenRanges( &self, range: NSRange, @@ -117,9 +117,9 @@ extern_methods!( ) -> Id, Shared>; #[method_id(dominantLanguage)] pub unsafe fn dominantLanguage(&self) -> Option>; - # [method_id (dominantLanguageForString :)] + #[method_id(dominantLanguageForString:)] pub unsafe fn dominantLanguageForString(string: &NSString) -> Option>; - # [method_id (tagForString : atIndex : unit : scheme : orthography : tokenRange :)] + #[method_id(tagForString:atIndex:unit:scheme:orthography:tokenRange:)] pub unsafe fn tagForString_atIndex_unit_scheme_orthography_tokenRange( string: &NSString, charIndex: NSUInteger, @@ -128,7 +128,7 @@ extern_methods!( orthography: Option<&NSOrthography>, tokenRange: NSRangePointer, ) -> Option>; - # [method_id (tagsForString : range : unit : scheme : options : orthography : tokenRanges :)] + #[method_id(tagsForString:range:unit:scheme:options:orthography:tokenRanges:)] pub unsafe fn tagsForString_range_unit_scheme_options_orthography_tokenRanges( string: &NSString, range: NSRange, @@ -138,7 +138,7 @@ extern_methods!( orthography: Option<&NSOrthography>, tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared>; - # [method (enumerateTagsForString : range : unit : scheme : options : orthography : usingBlock :)] + #[method(enumerateTagsForString:range:unit:scheme:options:orthography:usingBlock:)] pub unsafe fn enumerateTagsForString_range_unit_scheme_options_orthography_usingBlock( string: &NSString, range: NSRange, @@ -148,7 +148,7 @@ extern_methods!( orthography: Option<&NSOrthography>, block: TodoBlock, ); - # [method_id (possibleTagsAtIndex : scheme : tokenRange : sentenceRange : scores :)] + #[method_id(possibleTagsAtIndex:scheme:tokenRange:sentenceRange:scores:)] pub unsafe fn possibleTagsAtIndex_scheme_tokenRange_sentenceRange_scores( &self, charIndex: NSUInteger, @@ -162,7 +162,7 @@ extern_methods!( extern_methods!( #[doc = "NSLinguisticAnalysis"] unsafe impl NSString { - # [method_id (linguisticTagsInRange : scheme : options : orthography : tokenRanges :)] + #[method_id(linguisticTagsInRange:scheme:options:orthography:tokenRanges:)] pub unsafe fn linguisticTagsInRange_scheme_options_orthography_tokenRanges( &self, range: NSRange, @@ -171,7 +171,7 @@ extern_methods!( orthography: Option<&NSOrthography>, tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared>; - # [method (enumerateLinguisticTagsInRange : scheme : options : orthography : usingBlock :)] + #[method(enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:)] pub unsafe fn enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock( &self, range: NSRange, diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index eccc864b4..85f15ace8 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -16,19 +16,19 @@ extern_methods!( unsafe impl NSListFormatter { #[method_id(locale)] pub unsafe fn locale(&self) -> Id; - # [method (setLocale :)] + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); #[method_id(itemFormatter)] pub unsafe fn itemFormatter(&self) -> Option>; - # [method (setItemFormatter :)] + #[method(setItemFormatter:)] pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>); - # [method_id (localizedStringByJoiningStrings :)] + #[method_id(localizedStringByJoiningStrings:)] pub unsafe fn localizedStringByJoiningStrings( strings: &NSArray, ) -> Id; - # [method_id (stringFromItems :)] + #[method_id(stringFromItems:)] pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option>; - # [method_id (stringForObjectValue :)] + #[method_id(stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 7ca17c40a..7853067b9 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -19,17 +19,17 @@ extern_class!( ); extern_methods!( unsafe impl NSLocale { - # [method_id (objectForKey :)] + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, key: &NSLocaleKey) -> Option>; - # [method_id (displayNameForKey : value :)] + #[method_id(displayNameForKey:value:)] pub unsafe fn displayNameForKey_value( &self, key: &NSLocaleKey, value: &Object, ) -> Option>; - # [method_id (initWithLocaleIdentifier :)] + #[method_id(initWithLocaleIdentifier:)] pub unsafe fn initWithLocaleIdentifier(&self, string: &NSString) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); @@ -38,35 +38,35 @@ extern_methods!( unsafe impl NSLocale { #[method_id(localeIdentifier)] pub unsafe fn localeIdentifier(&self) -> Id; - # [method_id (localizedStringForLocaleIdentifier :)] + #[method_id(localizedStringForLocaleIdentifier:)] pub unsafe fn localizedStringForLocaleIdentifier( &self, localeIdentifier: &NSString, ) -> Id; #[method_id(languageCode)] pub unsafe fn languageCode(&self) -> Id; - # [method_id (localizedStringForLanguageCode :)] + #[method_id(localizedStringForLanguageCode:)] pub unsafe fn localizedStringForLanguageCode( &self, languageCode: &NSString, ) -> Option>; #[method_id(countryCode)] pub unsafe fn countryCode(&self) -> Option>; - # [method_id (localizedStringForCountryCode :)] + #[method_id(localizedStringForCountryCode:)] pub unsafe fn localizedStringForCountryCode( &self, countryCode: &NSString, ) -> Option>; #[method_id(scriptCode)] pub unsafe fn scriptCode(&self) -> Option>; - # [method_id (localizedStringForScriptCode :)] + #[method_id(localizedStringForScriptCode:)] pub unsafe fn localizedStringForScriptCode( &self, scriptCode: &NSString, ) -> Option>; #[method_id(variantCode)] pub unsafe fn variantCode(&self) -> Option>; - # [method_id (localizedStringForVariantCode :)] + #[method_id(localizedStringForVariantCode:)] pub unsafe fn localizedStringForVariantCode( &self, variantCode: &NSString, @@ -75,14 +75,14 @@ extern_methods!( pub unsafe fn exemplarCharacterSet(&self) -> Id; #[method_id(calendarIdentifier)] pub unsafe fn calendarIdentifier(&self) -> Id; - # [method_id (localizedStringForCalendarIdentifier :)] + #[method_id(localizedStringForCalendarIdentifier:)] pub unsafe fn localizedStringForCalendarIdentifier( &self, calendarIdentifier: &NSString, ) -> Option>; #[method_id(collationIdentifier)] pub unsafe fn collationIdentifier(&self) -> Option>; - # [method_id (localizedStringForCollationIdentifier :)] + #[method_id(localizedStringForCollationIdentifier:)] pub unsafe fn localizedStringForCollationIdentifier( &self, collationIdentifier: &NSString, @@ -97,14 +97,14 @@ extern_methods!( pub unsafe fn currencySymbol(&self) -> Id; #[method_id(currencyCode)] pub unsafe fn currencyCode(&self) -> Option>; - # [method_id (localizedStringForCurrencyCode :)] + #[method_id(localizedStringForCurrencyCode:)] pub unsafe fn localizedStringForCurrencyCode( &self, currencyCode: &NSString, ) -> Option>; #[method_id(collatorIdentifier)] pub unsafe fn collatorIdentifier(&self) -> Id; - # [method_id (localizedStringForCollatorIdentifier :)] + #[method_id(localizedStringForCollatorIdentifier:)] pub unsafe fn localizedStringForCollatorIdentifier( &self, collatorIdentifier: &NSString, @@ -128,7 +128,7 @@ extern_methods!( pub unsafe fn currentLocale() -> Id; #[method_id(systemLocale)] pub unsafe fn systemLocale() -> Id; - # [method_id (localeWithLocaleIdentifier :)] + #[method_id(localeWithLocaleIdentifier:)] pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id; #[method_id(init)] pub unsafe fn init(&self) -> Id; @@ -149,33 +149,33 @@ extern_methods!( pub unsafe fn commonISOCurrencyCodes() -> Id, Shared>; #[method_id(preferredLanguages)] pub unsafe fn preferredLanguages() -> Id, Shared>; - # [method_id (componentsFromLocaleIdentifier :)] + #[method_id(componentsFromLocaleIdentifier:)] pub unsafe fn componentsFromLocaleIdentifier( string: &NSString, ) -> Id, Shared>; - # [method_id (localeIdentifierFromComponents :)] + #[method_id(localeIdentifierFromComponents:)] pub unsafe fn localeIdentifierFromComponents( dict: &NSDictionary, ) -> Id; - # [method_id (canonicalLocaleIdentifierFromString :)] + #[method_id(canonicalLocaleIdentifierFromString:)] pub unsafe fn canonicalLocaleIdentifierFromString( string: &NSString, ) -> Id; - # [method_id (canonicalLanguageIdentifierFromString :)] + #[method_id(canonicalLanguageIdentifierFromString:)] pub unsafe fn canonicalLanguageIdentifierFromString( string: &NSString, ) -> Id; - # [method_id (localeIdentifierFromWindowsLocaleCode :)] + #[method_id(localeIdentifierFromWindowsLocaleCode:)] pub unsafe fn localeIdentifierFromWindowsLocaleCode( lcid: u32, ) -> Option>; - # [method (windowsLocaleCodeFromLocaleIdentifier :)] + #[method(windowsLocaleCodeFromLocaleIdentifier:)] pub unsafe fn windowsLocaleCodeFromLocaleIdentifier(localeIdentifier: &NSString) -> u32; - # [method (characterDirectionForLanguage :)] + #[method(characterDirectionForLanguage:)] pub unsafe fn characterDirectionForLanguage( isoLangCode: &NSString, ) -> NSLocaleLanguageDirection; - # [method (lineDirectionForLanguage :)] + #[method(lineDirectionForLanguage:)] pub unsafe fn lineDirectionForLanguage(isoLangCode: &NSString) -> NSLocaleLanguageDirection; } diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index d485b5109..6bb800922 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -16,11 +16,11 @@ extern_methods!( unsafe impl NSLock { #[method(tryLock)] pub unsafe fn tryLock(&self) -> bool; - # [method (lockBeforeDate :)] + #[method(lockBeforeDate:)] pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; #[method_id(name)] pub unsafe fn name(&self) -> Option>; - # [method (setName :)] + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); } ); @@ -33,21 +33,21 @@ extern_class!( ); extern_methods!( unsafe impl NSConditionLock { - # [method_id (initWithCondition :)] + #[method_id(initWithCondition:)] pub unsafe fn initWithCondition(&self, condition: NSInteger) -> Id; #[method(condition)] pub unsafe fn condition(&self) -> NSInteger; - # [method (lockWhenCondition :)] + #[method(lockWhenCondition:)] pub unsafe fn lockWhenCondition(&self, condition: NSInteger); #[method(tryLock)] pub unsafe fn tryLock(&self) -> bool; - # [method (tryLockWhenCondition :)] + #[method(tryLockWhenCondition:)] pub unsafe fn tryLockWhenCondition(&self, condition: NSInteger) -> bool; - # [method (unlockWithCondition :)] + #[method(unlockWithCondition:)] pub unsafe fn unlockWithCondition(&self, condition: NSInteger); - # [method (lockBeforeDate :)] + #[method(lockBeforeDate:)] pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; - # [method (lockWhenCondition : beforeDate :)] + #[method(lockWhenCondition:beforeDate:)] pub unsafe fn lockWhenCondition_beforeDate( &self, condition: NSInteger, @@ -55,7 +55,7 @@ extern_methods!( ) -> bool; #[method_id(name)] pub unsafe fn name(&self) -> Option>; - # [method (setName :)] + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); } ); @@ -70,11 +70,11 @@ extern_methods!( unsafe impl NSRecursiveLock { #[method(tryLock)] pub unsafe fn tryLock(&self) -> bool; - # [method (lockBeforeDate :)] + #[method(lockBeforeDate:)] pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; #[method_id(name)] pub unsafe fn name(&self) -> Option>; - # [method (setName :)] + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); } ); @@ -89,7 +89,7 @@ extern_methods!( unsafe impl NSCondition { #[method(wait)] pub unsafe fn wait(&self); - # [method (waitUntilDate :)] + #[method(waitUntilDate:)] pub unsafe fn waitUntilDate(&self, limit: &NSDate) -> bool; #[method(signal)] pub unsafe fn signal(&self); @@ -97,7 +97,7 @@ extern_methods!( pub unsafe fn broadcast(&self); #[method_id(name)] pub unsafe fn name(&self) -> Option>; - # [method (setName :)] + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index d47dcbacb..0200c9666 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -17,21 +17,21 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMapTable { - # [method_id (initWithKeyOptions : valueOptions : capacity :)] + #[method_id(initWithKeyOptions:valueOptions:capacity:)] pub unsafe fn initWithKeyOptions_valueOptions_capacity( &self, keyOptions: NSPointerFunctionsOptions, valueOptions: NSPointerFunctionsOptions, initialCapacity: NSUInteger, ) -> Id; - # [method_id (initWithKeyPointerFunctions : valuePointerFunctions : capacity :)] + #[method_id(initWithKeyPointerFunctions:valuePointerFunctions:capacity:)] pub unsafe fn initWithKeyPointerFunctions_valuePointerFunctions_capacity( &self, keyFunctions: &NSPointerFunctions, valueFunctions: &NSPointerFunctions, initialCapacity: NSUInteger, ) -> Id; - # [method_id (mapTableWithKeyOptions : valueOptions :)] + #[method_id(mapTableWithKeyOptions:valueOptions:)] pub unsafe fn mapTableWithKeyOptions_valueOptions( keyOptions: NSPointerFunctionsOptions, valueOptions: NSPointerFunctionsOptions, @@ -56,12 +56,12 @@ extern_methods!( pub unsafe fn keyPointerFunctions(&self) -> Id; #[method_id(valuePointerFunctions)] pub unsafe fn valuePointerFunctions(&self) -> Id; - # [method_id (objectForKey :)] + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, aKey: Option<&KeyType>) -> Option>; - # [method (removeObjectForKey :)] + #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, aKey: Option<&KeyType>); - # [method (setObject : forKey :)] + #[method(setObject:forKey:)] pub unsafe fn setObject_forKey( &self, anObject: Option<&ObjectType>, diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 6d4d3b0b1..65ba9d7ab 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -15,40 +15,40 @@ extern_methods!( unsafe impl NSMassFormatter { #[method_id(numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; - # [method (setNumberFormatter :)] + #[method(setNumberFormatter:)] pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); #[method(unitStyle)] pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; - # [method (setUnitStyle :)] + #[method(setUnitStyle:)] pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); #[method(isForPersonMassUse)] pub unsafe fn isForPersonMassUse(&self) -> bool; - # [method (setForPersonMassUse :)] + #[method(setForPersonMassUse:)] pub unsafe fn setForPersonMassUse(&self, forPersonMassUse: bool); - # [method_id (stringFromValue : unit :)] + #[method_id(stringFromValue:unit:)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSMassFormatterUnit, ) -> Id; - # [method_id (stringFromKilograms :)] + #[method_id(stringFromKilograms:)] pub unsafe fn stringFromKilograms( &self, numberInKilograms: c_double, ) -> Id; - # [method_id (unitStringFromValue : unit :)] + #[method_id(unitStringFromValue:unit:)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSMassFormatterUnit, ) -> Id; - # [method_id (unitStringFromKilograms : usedUnit :)] + #[method_id(unitStringFromKilograms:usedUnit:)] pub unsafe fn unitStringFromKilograms_usedUnit( &self, numberInKilograms: c_double, unitp: *mut NSMassFormatterUnit, ) -> Id; - # [method (getObjectValue : forString : errorDescription :)] + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index a7ddbd497..926cbbea7 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -19,25 +19,25 @@ extern_methods!( pub unsafe fn doubleValue(&self) -> c_double; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithDoubleValue : unit :)] + #[method_id(initWithDoubleValue:unit:)] pub unsafe fn initWithDoubleValue_unit( &self, doubleValue: c_double, unit: &UnitType, ) -> Id; - # [method (canBeConvertedToUnit :)] + #[method(canBeConvertedToUnit:)] pub unsafe fn canBeConvertedToUnit(&self, unit: &NSUnit) -> bool; - # [method_id (measurementByConvertingToUnit :)] + #[method_id(measurementByConvertingToUnit:)] pub unsafe fn measurementByConvertingToUnit( &self, unit: &NSUnit, ) -> Id; - # [method_id (measurementByAddingMeasurement :)] + #[method_id(measurementByAddingMeasurement:)] pub unsafe fn measurementByAddingMeasurement( &self, measurement: &NSMeasurement, ) -> Id, Shared>; - # [method_id (measurementBySubtractingMeasurement :)] + #[method_id(measurementBySubtractingMeasurement:)] pub unsafe fn measurementBySubtractingMeasurement( &self, measurement: &NSMeasurement, diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 45338c682..b1db2e835 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -18,26 +18,26 @@ extern_methods!( unsafe impl NSMeasurementFormatter { #[method(unitOptions)] pub unsafe fn unitOptions(&self) -> NSMeasurementFormatterUnitOptions; - # [method (setUnitOptions :)] + #[method(setUnitOptions:)] pub unsafe fn setUnitOptions(&self, unitOptions: NSMeasurementFormatterUnitOptions); #[method(unitStyle)] pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; - # [method (setUnitStyle :)] + #[method(setUnitStyle:)] pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); #[method_id(locale)] pub unsafe fn locale(&self) -> Id; - # [method (setLocale :)] + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); #[method_id(numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; - # [method (setNumberFormatter :)] + #[method(setNumberFormatter:)] pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); - # [method_id (stringFromMeasurement :)] + #[method_id(stringFromMeasurement:)] pub unsafe fn stringFromMeasurement( &self, measurement: &NSMeasurement, ) -> Id; - # [method_id (stringFromUnit :)] + #[method_id(stringFromUnit:)] pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 1b246aa7d..587ca9149 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -24,42 +24,42 @@ extern_methods!( unsafe impl NSMetadataQuery { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSMetadataQueryDelegate>); #[method_id(predicate)] pub unsafe fn predicate(&self) -> Option>; - # [method (setPredicate :)] + #[method(setPredicate:)] pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>); #[method_id(sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id, Shared>; - # [method (setSortDescriptors :)] + #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); #[method_id(valueListAttributes)] pub unsafe fn valueListAttributes(&self) -> Id, Shared>; - # [method (setValueListAttributes :)] + #[method(setValueListAttributes:)] pub unsafe fn setValueListAttributes(&self, valueListAttributes: &NSArray); #[method_id(groupingAttributes)] pub unsafe fn groupingAttributes(&self) -> Option, Shared>>; - # [method (setGroupingAttributes :)] + #[method(setGroupingAttributes:)] pub unsafe fn setGroupingAttributes(&self, groupingAttributes: Option<&NSArray>); #[method(notificationBatchingInterval)] pub unsafe fn notificationBatchingInterval(&self) -> NSTimeInterval; - # [method (setNotificationBatchingInterval :)] + #[method(setNotificationBatchingInterval:)] pub unsafe fn setNotificationBatchingInterval( &self, notificationBatchingInterval: NSTimeInterval, ); #[method_id(searchScopes)] pub unsafe fn searchScopes(&self) -> Id; - # [method (setSearchScopes :)] + #[method(setSearchScopes:)] pub unsafe fn setSearchScopes(&self, searchScopes: &NSArray); #[method_id(searchItems)] pub unsafe fn searchItems(&self) -> Option>; - # [method (setSearchItems :)] + #[method(setSearchItems:)] pub unsafe fn setSearchItems(&self, searchItems: Option<&NSArray>); #[method_id(operationQueue)] pub unsafe fn operationQueue(&self) -> Option>; - # [method (setOperationQueue :)] + #[method(setOperationQueue:)] pub unsafe fn setOperationQueue(&self, operationQueue: Option<&NSOperationQueue>); #[method(startQuery)] pub unsafe fn startQuery(&self) -> bool; @@ -77,11 +77,11 @@ extern_methods!( pub unsafe fn enableUpdates(&self); #[method(resultCount)] pub unsafe fn resultCount(&self) -> NSUInteger; - # [method_id (resultAtIndex :)] + #[method_id(resultAtIndex:)] pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; - # [method (enumerateResultsUsingBlock :)] + #[method(enumerateResultsUsingBlock:)] pub unsafe fn enumerateResultsUsingBlock(&self, block: TodoBlock); - # [method (enumerateResultsWithOptions : usingBlock :)] + #[method(enumerateResultsWithOptions:usingBlock:)] pub unsafe fn enumerateResultsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, @@ -89,7 +89,7 @@ extern_methods!( ); #[method_id(results)] pub unsafe fn results(&self) -> Id; - # [method (indexOfResult :)] + #[method(indexOfResult:)] pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger; #[method_id(valueLists)] pub unsafe fn valueLists( @@ -97,7 +97,7 @@ extern_methods!( ) -> Id>, Shared>; #[method_id(groupedResults)] pub unsafe fn groupedResults(&self) -> Id, Shared>; - # [method_id (valueOfAttribute : forResultAtIndex :)] + #[method_id(valueOfAttribute:forResultAtIndex:)] pub unsafe fn valueOfAttribute_forResultAtIndex( &self, attrName: &NSString, @@ -115,11 +115,11 @@ extern_class!( ); extern_methods!( unsafe impl NSMetadataItem { - # [method_id (initWithURL :)] + #[method_id(initWithURL:)] pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; - # [method_id (valueForAttribute :)] + #[method_id(valueForAttribute:)] pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option>; - # [method_id (valuesForAttributes :)] + #[method_id(valuesForAttributes:)] pub unsafe fn valuesForAttributes( &self, keys: &NSArray, @@ -162,7 +162,7 @@ extern_methods!( pub unsafe fn subgroups(&self) -> Option, Shared>>; #[method(resultCount)] pub unsafe fn resultCount(&self) -> NSUInteger; - # [method_id (resultAtIndex :)] + #[method_id(resultAtIndex:)] pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; #[method_id(results)] pub unsafe fn results(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index f9af37f69..093ed028c 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -12,13 +12,13 @@ extern_class!( ); extern_methods!( unsafe impl NSMethodSignature { - # [method_id (signatureWithObjCTypes :)] + #[method_id(signatureWithObjCTypes:)] pub unsafe fn signatureWithObjCTypes( types: NonNull, ) -> Option>; #[method(numberOfArguments)] pub unsafe fn numberOfArguments(&self) -> NSUInteger; - # [method (getArgumentTypeAtIndex :)] + #[method(getArgumentTypeAtIndex:)] pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull; #[method(frameLength)] pub unsafe fn frameLength(&self) -> NSUInteger; diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index 1ccdd7876..3645cea44 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -17,27 +17,27 @@ extern_methods!( unsafe impl NSMorphology { #[method(grammaticalGender)] pub unsafe fn grammaticalGender(&self) -> NSGrammaticalGender; - # [method (setGrammaticalGender :)] + #[method(setGrammaticalGender:)] pub unsafe fn setGrammaticalGender(&self, grammaticalGender: NSGrammaticalGender); #[method(partOfSpeech)] pub unsafe fn partOfSpeech(&self) -> NSGrammaticalPartOfSpeech; - # [method (setPartOfSpeech :)] + #[method(setPartOfSpeech:)] pub unsafe fn setPartOfSpeech(&self, partOfSpeech: NSGrammaticalPartOfSpeech); #[method(number)] pub unsafe fn number(&self) -> NSGrammaticalNumber; - # [method (setNumber :)] + #[method(setNumber:)] pub unsafe fn setNumber(&self, number: NSGrammaticalNumber); } ); extern_methods!( #[doc = "NSCustomPronouns"] unsafe impl NSMorphology { - # [method_id (customPronounForLanguage :)] + #[method_id(customPronounForLanguage:)] pub unsafe fn customPronounForLanguage( &self, language: &NSString, ) -> Option>; - # [method (setCustomPronoun : forLanguage : error :)] + #[method(setCustomPronoun:forLanguage:error:)] pub unsafe fn setCustomPronoun_forLanguage_error( &self, features: Option<&NSMorphologyCustomPronoun>, @@ -54,30 +54,30 @@ extern_class!( ); extern_methods!( unsafe impl NSMorphologyCustomPronoun { - # [method (isSupportedForLanguage :)] + #[method(isSupportedForLanguage:)] pub unsafe fn isSupportedForLanguage(language: &NSString) -> bool; - # [method_id (requiredKeysForLanguage :)] + #[method_id(requiredKeysForLanguage:)] pub unsafe fn requiredKeysForLanguage(language: &NSString) -> Id, Shared>; #[method_id(subjectForm)] pub unsafe fn subjectForm(&self) -> Option>; - # [method (setSubjectForm :)] + #[method(setSubjectForm:)] pub unsafe fn setSubjectForm(&self, subjectForm: Option<&NSString>); #[method_id(objectForm)] pub unsafe fn objectForm(&self) -> Option>; - # [method (setObjectForm :)] + #[method(setObjectForm:)] pub unsafe fn setObjectForm(&self, objectForm: Option<&NSString>); #[method_id(possessiveForm)] pub unsafe fn possessiveForm(&self) -> Option>; - # [method (setPossessiveForm :)] + #[method(setPossessiveForm:)] pub unsafe fn setPossessiveForm(&self, possessiveForm: Option<&NSString>); #[method_id(possessiveAdjectiveForm)] pub unsafe fn possessiveAdjectiveForm(&self) -> Option>; - # [method (setPossessiveAdjectiveForm :)] + #[method(setPossessiveAdjectiveForm:)] pub unsafe fn setPossessiveAdjectiveForm(&self, possessiveAdjectiveForm: Option<&NSString>); #[method_id(reflexiveForm)] pub unsafe fn reflexiveForm(&self) -> Option>; - # [method (setReflexiveForm :)] + #[method(setReflexiveForm:)] pub unsafe fn setReflexiveForm(&self, reflexiveForm: Option<&NSString>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index f7d24ffae..5ec0f9c85 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -23,7 +23,7 @@ extern_class!( ); extern_methods!( unsafe impl NSNetService { - # [method_id (initWithDomain : type : name : port :)] + #[method_id(initWithDomain:type:name:port:)] pub unsafe fn initWithDomain_type_name_port( &self, domain: &NSString, @@ -31,24 +31,24 @@ extern_methods!( name: &NSString, port: c_int, ) -> Id; - # [method_id (initWithDomain : type : name :)] + #[method_id(initWithDomain:type:name:)] pub unsafe fn initWithDomain_type_name( &self, domain: &NSString, type_: &NSString, name: &NSString, ) -> Id; - # [method (scheduleInRunLoop : forMode :)] + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); - # [method (removeFromRunLoop : forMode :)] + #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceDelegate>); #[method(includesPeerToPeer)] pub unsafe fn includesPeerToPeer(&self) -> bool; - # [method (setIncludesPeerToPeer :)] + #[method(setIncludesPeerToPeer:)] pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool); #[method_id(name)] pub unsafe fn name(&self) -> Id; @@ -64,23 +64,23 @@ extern_methods!( pub unsafe fn port(&self) -> NSInteger; #[method(publish)] pub unsafe fn publish(&self); - # [method (publishWithOptions :)] + #[method(publishWithOptions:)] pub unsafe fn publishWithOptions(&self, options: NSNetServiceOptions); #[method(resolve)] pub unsafe fn resolve(&self); #[method(stop)] pub unsafe fn stop(&self); - # [method_id (dictionaryFromTXTRecordData :)] + #[method_id(dictionaryFromTXTRecordData:)] pub unsafe fn dictionaryFromTXTRecordData( txtData: &NSData, ) -> Id, Shared>; - # [method_id (dataFromTXTRecordDictionary :)] + #[method_id(dataFromTXTRecordDictionary:)] pub unsafe fn dataFromTXTRecordDictionary( txtDictionary: &NSDictionary, ) -> Id; - # [method (resolveWithTimeout :)] + #[method(resolveWithTimeout:)] pub unsafe fn resolveWithTimeout(&self, timeout: NSTimeInterval); - # [method (setTXTRecordData :)] + #[method(setTXTRecordData:)] pub unsafe fn setTXTRecordData(&self, recordData: Option<&NSData>) -> bool; #[method_id(TXTRecordData)] pub unsafe fn TXTRecordData(&self) -> Option>; @@ -103,21 +103,21 @@ extern_methods!( pub unsafe fn init(&self) -> Id; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceBrowserDelegate>); #[method(includesPeerToPeer)] pub unsafe fn includesPeerToPeer(&self) -> bool; - # [method (setIncludesPeerToPeer :)] + #[method(setIncludesPeerToPeer:)] pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool); - # [method (scheduleInRunLoop : forMode :)] + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); - # [method (removeFromRunLoop : forMode :)] + #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); #[method(searchForBrowsableDomains)] pub unsafe fn searchForBrowsableDomains(&self); #[method(searchForRegistrationDomains)] pub unsafe fn searchForRegistrationDomains(&self); - # [method (searchForServicesOfType : inDomain :)] + #[method(searchForServicesOfType:inDomain:)] pub unsafe fn searchForServicesOfType_inDomain( &self, type_: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 714a9e78e..12088ba21 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -22,26 +22,26 @@ extern_methods!( pub unsafe fn object(&self) -> Option>; #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; - # [method_id (initWithName : object : userInfo :)] + #[method_id(initWithName:object:userInfo:)] pub unsafe fn initWithName_object_userInfo( &self, name: &NSNotificationName, object: Option<&Object>, userInfo: Option<&NSDictionary>, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSNotificationCreation"] unsafe impl NSNotification { - # [method_id (notificationWithName : object :)] + #[method_id(notificationWithName:object:)] pub unsafe fn notificationWithName_object( aName: &NSNotificationName, anObject: Option<&Object>, ) -> Id; - # [method_id (notificationWithName : object : userInfo :)] + #[method_id(notificationWithName:object:userInfo:)] pub unsafe fn notificationWithName_object_userInfo( aName: &NSNotificationName, anObject: Option<&Object>, @@ -62,7 +62,7 @@ extern_methods!( unsafe impl NSNotificationCenter { #[method_id(defaultCenter)] pub unsafe fn defaultCenter() -> Id; - # [method (addObserver : selector : name : object :)] + #[method(addObserver:selector:name:object:)] pub unsafe fn addObserver_selector_name_object( &self, observer: &Object, @@ -70,31 +70,31 @@ extern_methods!( aName: Option<&NSNotificationName>, anObject: Option<&Object>, ); - # [method (postNotification :)] + #[method(postNotification:)] pub unsafe fn postNotification(&self, notification: &NSNotification); - # [method (postNotificationName : object :)] + #[method(postNotificationName:object:)] pub unsafe fn postNotificationName_object( &self, aName: &NSNotificationName, anObject: Option<&Object>, ); - # [method (postNotificationName : object : userInfo :)] + #[method(postNotificationName:object:userInfo:)] pub unsafe fn postNotificationName_object_userInfo( &self, aName: &NSNotificationName, anObject: Option<&Object>, aUserInfo: Option<&NSDictionary>, ); - # [method (removeObserver :)] + #[method(removeObserver:)] pub unsafe fn removeObserver(&self, observer: &Object); - # [method (removeObserver : name : object :)] + #[method(removeObserver:name:object:)] pub unsafe fn removeObserver_name_object( &self, observer: &Object, aName: Option<&NSNotificationName>, anObject: Option<&Object>, ); - # [method_id (addObserverForName : object : queue : usingBlock :)] + #[method_id(addObserverForName:object:queue:usingBlock:)] pub unsafe fn addObserverForName_object_queue_usingBlock( &self, name: Option<&NSNotificationName>, diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index bed331d4c..731194cf2 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -19,18 +19,18 @@ extern_methods!( unsafe impl NSNotificationQueue { #[method_id(defaultQueue)] pub unsafe fn defaultQueue() -> Id; - # [method_id (initWithNotificationCenter :)] + #[method_id(initWithNotificationCenter:)] pub unsafe fn initWithNotificationCenter( &self, notificationCenter: &NSNotificationCenter, ) -> Id; - # [method (enqueueNotification : postingStyle :)] + #[method(enqueueNotification:postingStyle:)] pub unsafe fn enqueueNotification_postingStyle( &self, notification: &NSNotification, postingStyle: NSPostingStyle, ); - # [method (enqueueNotification : postingStyle : coalesceMask : forModes :)] + #[method(enqueueNotification:postingStyle:coalesceMask:forModes:)] pub unsafe fn enqueueNotification_postingStyle_coalesceMask_forModes( &self, notification: &NSNotification, @@ -38,7 +38,7 @@ extern_methods!( coalesceMask: NSNotificationCoalescing, modes: Option<&NSArray>, ); - # [method (dequeueNotificationsMatching : coalesceMask :)] + #[method(dequeueNotificationsMatching:coalesceMask:)] pub unsafe fn dequeueNotificationsMatching_coalesceMask( &self, notification: &NSNotification, diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 7d934b257..7cf6d29e0 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -21,295 +21,295 @@ extern_methods!( unsafe impl NSNumberFormatter { #[method(formattingContext)] pub unsafe fn formattingContext(&self) -> NSFormattingContext; - # [method (setFormattingContext :)] + #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); - # [method (getObjectValue : forString : range : error :)] + #[method(getObjectValue:forString:range:error:)] pub unsafe fn getObjectValue_forString_range_error( &self, obj: Option<&mut Option>>, string: &NSString, rangep: *mut NSRange, ) -> Result<(), Id>; - # [method_id (stringFromNumber :)] + #[method_id(stringFromNumber:)] pub unsafe fn stringFromNumber(&self, number: &NSNumber) -> Option>; - # [method_id (numberFromString :)] + #[method_id(numberFromString:)] pub unsafe fn numberFromString(&self, string: &NSString) -> Option>; - # [method_id (localizedStringFromNumber : numberStyle :)] + #[method_id(localizedStringFromNumber:numberStyle:)] pub unsafe fn localizedStringFromNumber_numberStyle( num: &NSNumber, nstyle: NSNumberFormatterStyle, ) -> Id; #[method(defaultFormatterBehavior)] pub unsafe fn defaultFormatterBehavior() -> NSNumberFormatterBehavior; - # [method (setDefaultFormatterBehavior :)] + #[method(setDefaultFormatterBehavior:)] pub unsafe fn setDefaultFormatterBehavior(behavior: NSNumberFormatterBehavior); #[method(numberStyle)] pub unsafe fn numberStyle(&self) -> NSNumberFormatterStyle; - # [method (setNumberStyle :)] + #[method(setNumberStyle:)] pub unsafe fn setNumberStyle(&self, numberStyle: NSNumberFormatterStyle); #[method_id(locale)] pub unsafe fn locale(&self) -> Id; - # [method (setLocale :)] + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); #[method(generatesDecimalNumbers)] pub unsafe fn generatesDecimalNumbers(&self) -> bool; - # [method (setGeneratesDecimalNumbers :)] + #[method(setGeneratesDecimalNumbers:)] pub unsafe fn setGeneratesDecimalNumbers(&self, generatesDecimalNumbers: bool); #[method(formatterBehavior)] pub unsafe fn formatterBehavior(&self) -> NSNumberFormatterBehavior; - # [method (setFormatterBehavior :)] + #[method(setFormatterBehavior:)] pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSNumberFormatterBehavior); #[method_id(negativeFormat)] pub unsafe fn negativeFormat(&self) -> Id; - # [method (setNegativeFormat :)] + #[method(setNegativeFormat:)] pub unsafe fn setNegativeFormat(&self, negativeFormat: Option<&NSString>); #[method_id(textAttributesForNegativeValues)] pub unsafe fn textAttributesForNegativeValues( &self, ) -> Option, Shared>>; - # [method (setTextAttributesForNegativeValues :)] + #[method(setTextAttributesForNegativeValues:)] pub unsafe fn setTextAttributesForNegativeValues( &self, textAttributesForNegativeValues: Option<&NSDictionary>, ); #[method_id(positiveFormat)] pub unsafe fn positiveFormat(&self) -> Id; - # [method (setPositiveFormat :)] + #[method(setPositiveFormat:)] pub unsafe fn setPositiveFormat(&self, positiveFormat: Option<&NSString>); #[method_id(textAttributesForPositiveValues)] pub unsafe fn textAttributesForPositiveValues( &self, ) -> Option, Shared>>; - # [method (setTextAttributesForPositiveValues :)] + #[method(setTextAttributesForPositiveValues:)] pub unsafe fn setTextAttributesForPositiveValues( &self, textAttributesForPositiveValues: Option<&NSDictionary>, ); #[method(allowsFloats)] pub unsafe fn allowsFloats(&self) -> bool; - # [method (setAllowsFloats :)] + #[method(setAllowsFloats:)] pub unsafe fn setAllowsFloats(&self, allowsFloats: bool); #[method_id(decimalSeparator)] pub unsafe fn decimalSeparator(&self) -> Id; - # [method (setDecimalSeparator :)] + #[method(setDecimalSeparator:)] pub unsafe fn setDecimalSeparator(&self, decimalSeparator: Option<&NSString>); #[method(alwaysShowsDecimalSeparator)] pub unsafe fn alwaysShowsDecimalSeparator(&self) -> bool; - # [method (setAlwaysShowsDecimalSeparator :)] + #[method(setAlwaysShowsDecimalSeparator:)] pub unsafe fn setAlwaysShowsDecimalSeparator(&self, alwaysShowsDecimalSeparator: bool); #[method_id(currencyDecimalSeparator)] pub unsafe fn currencyDecimalSeparator(&self) -> Id; - # [method (setCurrencyDecimalSeparator :)] + #[method(setCurrencyDecimalSeparator:)] pub unsafe fn setCurrencyDecimalSeparator( &self, currencyDecimalSeparator: Option<&NSString>, ); #[method(usesGroupingSeparator)] pub unsafe fn usesGroupingSeparator(&self) -> bool; - # [method (setUsesGroupingSeparator :)] + #[method(setUsesGroupingSeparator:)] pub unsafe fn setUsesGroupingSeparator(&self, usesGroupingSeparator: bool); #[method_id(groupingSeparator)] pub unsafe fn groupingSeparator(&self) -> Id; - # [method (setGroupingSeparator :)] + #[method(setGroupingSeparator:)] pub unsafe fn setGroupingSeparator(&self, groupingSeparator: Option<&NSString>); #[method_id(zeroSymbol)] pub unsafe fn zeroSymbol(&self) -> Option>; - # [method (setZeroSymbol :)] + #[method(setZeroSymbol:)] pub unsafe fn setZeroSymbol(&self, zeroSymbol: Option<&NSString>); #[method_id(textAttributesForZero)] pub unsafe fn textAttributesForZero( &self, ) -> Option, Shared>>; - # [method (setTextAttributesForZero :)] + #[method(setTextAttributesForZero:)] pub unsafe fn setTextAttributesForZero( &self, textAttributesForZero: Option<&NSDictionary>, ); #[method_id(nilSymbol)] pub unsafe fn nilSymbol(&self) -> Id; - # [method (setNilSymbol :)] + #[method(setNilSymbol:)] pub unsafe fn setNilSymbol(&self, nilSymbol: &NSString); #[method_id(textAttributesForNil)] pub unsafe fn textAttributesForNil( &self, ) -> Option, Shared>>; - # [method (setTextAttributesForNil :)] + #[method(setTextAttributesForNil:)] pub unsafe fn setTextAttributesForNil( &self, textAttributesForNil: Option<&NSDictionary>, ); #[method_id(notANumberSymbol)] pub unsafe fn notANumberSymbol(&self) -> Id; - # [method (setNotANumberSymbol :)] + #[method(setNotANumberSymbol:)] pub unsafe fn setNotANumberSymbol(&self, notANumberSymbol: Option<&NSString>); #[method_id(textAttributesForNotANumber)] pub unsafe fn textAttributesForNotANumber( &self, ) -> Option, Shared>>; - # [method (setTextAttributesForNotANumber :)] + #[method(setTextAttributesForNotANumber:)] pub unsafe fn setTextAttributesForNotANumber( &self, textAttributesForNotANumber: Option<&NSDictionary>, ); #[method_id(positiveInfinitySymbol)] pub unsafe fn positiveInfinitySymbol(&self) -> Id; - # [method (setPositiveInfinitySymbol :)] + #[method(setPositiveInfinitySymbol:)] pub unsafe fn setPositiveInfinitySymbol(&self, positiveInfinitySymbol: &NSString); #[method_id(textAttributesForPositiveInfinity)] pub unsafe fn textAttributesForPositiveInfinity( &self, ) -> Option, Shared>>; - # [method (setTextAttributesForPositiveInfinity :)] + #[method(setTextAttributesForPositiveInfinity:)] pub unsafe fn setTextAttributesForPositiveInfinity( &self, textAttributesForPositiveInfinity: Option<&NSDictionary>, ); #[method_id(negativeInfinitySymbol)] pub unsafe fn negativeInfinitySymbol(&self) -> Id; - # [method (setNegativeInfinitySymbol :)] + #[method(setNegativeInfinitySymbol:)] pub unsafe fn setNegativeInfinitySymbol(&self, negativeInfinitySymbol: &NSString); #[method_id(textAttributesForNegativeInfinity)] pub unsafe fn textAttributesForNegativeInfinity( &self, ) -> Option, Shared>>; - # [method (setTextAttributesForNegativeInfinity :)] + #[method(setTextAttributesForNegativeInfinity:)] pub unsafe fn setTextAttributesForNegativeInfinity( &self, textAttributesForNegativeInfinity: Option<&NSDictionary>, ); #[method_id(positivePrefix)] pub unsafe fn positivePrefix(&self) -> Id; - # [method (setPositivePrefix :)] + #[method(setPositivePrefix:)] pub unsafe fn setPositivePrefix(&self, positivePrefix: Option<&NSString>); #[method_id(positiveSuffix)] pub unsafe fn positiveSuffix(&self) -> Id; - # [method (setPositiveSuffix :)] + #[method(setPositiveSuffix:)] pub unsafe fn setPositiveSuffix(&self, positiveSuffix: Option<&NSString>); #[method_id(negativePrefix)] pub unsafe fn negativePrefix(&self) -> Id; - # [method (setNegativePrefix :)] + #[method(setNegativePrefix:)] pub unsafe fn setNegativePrefix(&self, negativePrefix: Option<&NSString>); #[method_id(negativeSuffix)] pub unsafe fn negativeSuffix(&self) -> Id; - # [method (setNegativeSuffix :)] + #[method(setNegativeSuffix:)] pub unsafe fn setNegativeSuffix(&self, negativeSuffix: Option<&NSString>); #[method_id(currencyCode)] pub unsafe fn currencyCode(&self) -> Id; - # [method (setCurrencyCode :)] + #[method(setCurrencyCode:)] pub unsafe fn setCurrencyCode(&self, currencyCode: Option<&NSString>); #[method_id(currencySymbol)] pub unsafe fn currencySymbol(&self) -> Id; - # [method (setCurrencySymbol :)] + #[method(setCurrencySymbol:)] pub unsafe fn setCurrencySymbol(&self, currencySymbol: Option<&NSString>); #[method_id(internationalCurrencySymbol)] pub unsafe fn internationalCurrencySymbol(&self) -> Id; - # [method (setInternationalCurrencySymbol :)] + #[method(setInternationalCurrencySymbol:)] pub unsafe fn setInternationalCurrencySymbol( &self, internationalCurrencySymbol: Option<&NSString>, ); #[method_id(percentSymbol)] pub unsafe fn percentSymbol(&self) -> Id; - # [method (setPercentSymbol :)] + #[method(setPercentSymbol:)] pub unsafe fn setPercentSymbol(&self, percentSymbol: Option<&NSString>); #[method_id(perMillSymbol)] pub unsafe fn perMillSymbol(&self) -> Id; - # [method (setPerMillSymbol :)] + #[method(setPerMillSymbol:)] pub unsafe fn setPerMillSymbol(&self, perMillSymbol: Option<&NSString>); #[method_id(minusSign)] pub unsafe fn minusSign(&self) -> Id; - # [method (setMinusSign :)] + #[method(setMinusSign:)] pub unsafe fn setMinusSign(&self, minusSign: Option<&NSString>); #[method_id(plusSign)] pub unsafe fn plusSign(&self) -> Id; - # [method (setPlusSign :)] + #[method(setPlusSign:)] pub unsafe fn setPlusSign(&self, plusSign: Option<&NSString>); #[method_id(exponentSymbol)] pub unsafe fn exponentSymbol(&self) -> Id; - # [method (setExponentSymbol :)] + #[method(setExponentSymbol:)] pub unsafe fn setExponentSymbol(&self, exponentSymbol: Option<&NSString>); #[method(groupingSize)] pub unsafe fn groupingSize(&self) -> NSUInteger; - # [method (setGroupingSize :)] + #[method(setGroupingSize:)] pub unsafe fn setGroupingSize(&self, groupingSize: NSUInteger); #[method(secondaryGroupingSize)] pub unsafe fn secondaryGroupingSize(&self) -> NSUInteger; - # [method (setSecondaryGroupingSize :)] + #[method(setSecondaryGroupingSize:)] pub unsafe fn setSecondaryGroupingSize(&self, secondaryGroupingSize: NSUInteger); #[method_id(multiplier)] pub unsafe fn multiplier(&self) -> Option>; - # [method (setMultiplier :)] + #[method(setMultiplier:)] pub unsafe fn setMultiplier(&self, multiplier: Option<&NSNumber>); #[method(formatWidth)] pub unsafe fn formatWidth(&self) -> NSUInteger; - # [method (setFormatWidth :)] + #[method(setFormatWidth:)] pub unsafe fn setFormatWidth(&self, formatWidth: NSUInteger); #[method_id(paddingCharacter)] pub unsafe fn paddingCharacter(&self) -> Id; - # [method (setPaddingCharacter :)] + #[method(setPaddingCharacter:)] pub unsafe fn setPaddingCharacter(&self, paddingCharacter: Option<&NSString>); #[method(paddingPosition)] pub unsafe fn paddingPosition(&self) -> NSNumberFormatterPadPosition; - # [method (setPaddingPosition :)] + #[method(setPaddingPosition:)] pub unsafe fn setPaddingPosition(&self, paddingPosition: NSNumberFormatterPadPosition); #[method(roundingMode)] pub unsafe fn roundingMode(&self) -> NSNumberFormatterRoundingMode; - # [method (setRoundingMode :)] + #[method(setRoundingMode:)] pub unsafe fn setRoundingMode(&self, roundingMode: NSNumberFormatterRoundingMode); #[method_id(roundingIncrement)] pub unsafe fn roundingIncrement(&self) -> Id; - # [method (setRoundingIncrement :)] + #[method(setRoundingIncrement:)] pub unsafe fn setRoundingIncrement(&self, roundingIncrement: Option<&NSNumber>); #[method(minimumIntegerDigits)] pub unsafe fn minimumIntegerDigits(&self) -> NSUInteger; - # [method (setMinimumIntegerDigits :)] + #[method(setMinimumIntegerDigits:)] pub unsafe fn setMinimumIntegerDigits(&self, minimumIntegerDigits: NSUInteger); #[method(maximumIntegerDigits)] pub unsafe fn maximumIntegerDigits(&self) -> NSUInteger; - # [method (setMaximumIntegerDigits :)] + #[method(setMaximumIntegerDigits:)] pub unsafe fn setMaximumIntegerDigits(&self, maximumIntegerDigits: NSUInteger); #[method(minimumFractionDigits)] pub unsafe fn minimumFractionDigits(&self) -> NSUInteger; - # [method (setMinimumFractionDigits :)] + #[method(setMinimumFractionDigits:)] pub unsafe fn setMinimumFractionDigits(&self, minimumFractionDigits: NSUInteger); #[method(maximumFractionDigits)] pub unsafe fn maximumFractionDigits(&self) -> NSUInteger; - # [method (setMaximumFractionDigits :)] + #[method(setMaximumFractionDigits:)] pub unsafe fn setMaximumFractionDigits(&self, maximumFractionDigits: NSUInteger); #[method_id(minimum)] pub unsafe fn minimum(&self) -> Option>; - # [method (setMinimum :)] + #[method(setMinimum:)] pub unsafe fn setMinimum(&self, minimum: Option<&NSNumber>); #[method_id(maximum)] pub unsafe fn maximum(&self) -> Option>; - # [method (setMaximum :)] + #[method(setMaximum:)] pub unsafe fn setMaximum(&self, maximum: Option<&NSNumber>); #[method_id(currencyGroupingSeparator)] pub unsafe fn currencyGroupingSeparator(&self) -> Id; - # [method (setCurrencyGroupingSeparator :)] + #[method(setCurrencyGroupingSeparator:)] pub unsafe fn setCurrencyGroupingSeparator( &self, currencyGroupingSeparator: Option<&NSString>, ); #[method(isLenient)] pub unsafe fn isLenient(&self) -> bool; - # [method (setLenient :)] + #[method(setLenient:)] pub unsafe fn setLenient(&self, lenient: bool); #[method(usesSignificantDigits)] pub unsafe fn usesSignificantDigits(&self) -> bool; - # [method (setUsesSignificantDigits :)] + #[method(setUsesSignificantDigits:)] pub unsafe fn setUsesSignificantDigits(&self, usesSignificantDigits: bool); #[method(minimumSignificantDigits)] pub unsafe fn minimumSignificantDigits(&self) -> NSUInteger; - # [method (setMinimumSignificantDigits :)] + #[method(setMinimumSignificantDigits:)] pub unsafe fn setMinimumSignificantDigits(&self, minimumSignificantDigits: NSUInteger); #[method(maximumSignificantDigits)] pub unsafe fn maximumSignificantDigits(&self) -> NSUInteger; - # [method (setMaximumSignificantDigits :)] + #[method(setMaximumSignificantDigits:)] pub unsafe fn setMaximumSignificantDigits(&self, maximumSignificantDigits: NSUInteger); #[method(isPartialStringValidationEnabled)] pub unsafe fn isPartialStringValidationEnabled(&self) -> bool; - # [method (setPartialStringValidationEnabled :)] + #[method(setPartialStringValidationEnabled:)] pub unsafe fn setPartialStringValidationEnabled( &self, partialStringValidationEnabled: bool, @@ -322,41 +322,41 @@ extern_methods!( unsafe impl NSNumberFormatter { #[method(hasThousandSeparators)] pub unsafe fn hasThousandSeparators(&self) -> bool; - # [method (setHasThousandSeparators :)] + #[method(setHasThousandSeparators:)] pub unsafe fn setHasThousandSeparators(&self, hasThousandSeparators: bool); #[method_id(thousandSeparator)] pub unsafe fn thousandSeparator(&self) -> Id; - # [method (setThousandSeparator :)] + #[method(setThousandSeparator:)] pub unsafe fn setThousandSeparator(&self, thousandSeparator: Option<&NSString>); #[method(localizesFormat)] pub unsafe fn localizesFormat(&self) -> bool; - # [method (setLocalizesFormat :)] + #[method(setLocalizesFormat:)] pub unsafe fn setLocalizesFormat(&self, localizesFormat: bool); #[method_id(format)] pub unsafe fn format(&self) -> Id; - # [method (setFormat :)] + #[method(setFormat:)] pub unsafe fn setFormat(&self, format: &NSString); #[method_id(attributedStringForZero)] pub unsafe fn attributedStringForZero(&self) -> Id; - # [method (setAttributedStringForZero :)] + #[method(setAttributedStringForZero:)] pub unsafe fn setAttributedStringForZero( &self, attributedStringForZero: &NSAttributedString, ); #[method_id(attributedStringForNil)] pub unsafe fn attributedStringForNil(&self) -> Id; - # [method (setAttributedStringForNil :)] + #[method(setAttributedStringForNil:)] pub unsafe fn setAttributedStringForNil(&self, attributedStringForNil: &NSAttributedString); #[method_id(attributedStringForNotANumber)] pub unsafe fn attributedStringForNotANumber(&self) -> Id; - # [method (setAttributedStringForNotANumber :)] + #[method(setAttributedStringForNotANumber:)] pub unsafe fn setAttributedStringForNotANumber( &self, attributedStringForNotANumber: &NSAttributedString, ); #[method_id(roundingBehavior)] pub unsafe fn roundingBehavior(&self) -> Id; - # [method (setRoundingBehavior :)] + #[method(setRoundingBehavior:)] pub unsafe fn setRoundingBehavior(&self, roundingBehavior: &NSDecimalNumberHandler); } ); diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index eaa6ae1b4..e99118a30 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -20,11 +20,11 @@ extern_methods!( unsafe impl NSObject { #[method(version)] pub unsafe fn version() -> NSInteger; - # [method (setVersion :)] + #[method(setVersion:)] pub unsafe fn setVersion(aVersion: NSInteger); #[method(classForCoder)] pub unsafe fn classForCoder(&self) -> &Class; - # [method_id (replacementObjectForCoder :)] + #[method_id(replacementObjectForCoder:)] pub unsafe fn replacementObjectForCoder( &self, coder: &NSCoder, @@ -34,7 +34,7 @@ extern_methods!( extern_methods!( #[doc = "NSDeprecatedMethods"] unsafe impl NSObject { - # [method (poseAsClass :)] + #[method(poseAsClass:)] pub unsafe fn poseAsClass(aClass: &Class); } ); diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs index adfdc0769..e1cc946de 100644 --- a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -9,7 +9,7 @@ use objc2::{extern_class, extern_methods, ClassType}; extern_methods!( #[doc = "NSScripting"] unsafe impl NSObject { - # [method_id (scriptingValueForSpecifier :)] + #[method_id(scriptingValueForSpecifier:)] pub unsafe fn scriptingValueForSpecifier( &self, objectSpecifier: &NSScriptObjectSpecifier, @@ -18,19 +18,19 @@ extern_methods!( pub unsafe fn scriptingProperties( &self, ) -> Option, Shared>>; - # [method (setScriptingProperties :)] + #[method(setScriptingProperties:)] pub unsafe fn setScriptingProperties( &self, scriptingProperties: Option<&NSDictionary>, ); - # [method_id (copyScriptingValue : forKey : withProperties :)] + #[method_id(copyScriptingValue:forKey:withProperties:)] pub unsafe fn copyScriptingValue_forKey_withProperties( &self, value: &Object, key: &NSString, properties: &NSDictionary, ) -> Option>; - # [method_id (newScriptingObjectOfClass : forValueForKey : withContentsValue : properties :)] + #[method_id(newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:)] pub unsafe fn newScriptingObjectOfClass_forValueForKey_withContentsValue_properties( &self, objectClass: &Class, diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 7092c0ebb..da4bf4320 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -36,33 +36,33 @@ extern_methods!( pub unsafe fn isAsynchronous(&self) -> bool; #[method(isReady)] pub unsafe fn isReady(&self) -> bool; - # [method (addDependency :)] + #[method(addDependency:)] pub unsafe fn addDependency(&self, op: &NSOperation); - # [method (removeDependency :)] + #[method(removeDependency:)] pub unsafe fn removeDependency(&self, op: &NSOperation); #[method_id(dependencies)] pub unsafe fn dependencies(&self) -> Id, Shared>; #[method(queuePriority)] pub unsafe fn queuePriority(&self) -> NSOperationQueuePriority; - # [method (setQueuePriority :)] + #[method(setQueuePriority:)] pub unsafe fn setQueuePriority(&self, queuePriority: NSOperationQueuePriority); #[method(completionBlock)] pub unsafe fn completionBlock(&self) -> TodoBlock; - # [method (setCompletionBlock :)] + #[method(setCompletionBlock:)] pub unsafe fn setCompletionBlock(&self, completionBlock: TodoBlock); #[method(waitUntilFinished)] pub unsafe fn waitUntilFinished(&self); #[method(threadPriority)] pub unsafe fn threadPriority(&self) -> c_double; - # [method (setThreadPriority :)] + #[method(setThreadPriority:)] pub unsafe fn setThreadPriority(&self, threadPriority: c_double); #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; - # [method (setQualityOfService :)] + #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); #[method_id(name)] pub unsafe fn name(&self) -> Option>; - # [method (setName :)] + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); } ); @@ -75,9 +75,9 @@ extern_class!( ); extern_methods!( unsafe impl NSBlockOperation { - # [method_id (blockOperationWithBlock :)] + #[method_id(blockOperationWithBlock:)] pub unsafe fn blockOperationWithBlock(block: TodoBlock) -> Id; - # [method (addExecutionBlock :)] + #[method(addExecutionBlock:)] pub unsafe fn addExecutionBlock(&self, block: TodoBlock); } ); @@ -90,14 +90,14 @@ extern_class!( ); extern_methods!( unsafe impl NSInvocationOperation { - # [method_id (initWithTarget : selector : object :)] + #[method_id(initWithTarget:selector:object:)] pub unsafe fn initWithTarget_selector_object( &self, target: &Object, sel: Sel, arg: Option<&Object>, ) -> Option>; - # [method_id (initWithInvocation :)] + #[method_id(initWithInvocation:)] pub unsafe fn initWithInvocation(&self, inv: &NSInvocation) -> Id; #[method_id(invocation)] pub unsafe fn invocation(&self) -> Id; @@ -116,37 +116,37 @@ extern_methods!( unsafe impl NSOperationQueue { #[method_id(progress)] pub unsafe fn progress(&self) -> Id; - # [method (addOperation :)] + #[method(addOperation:)] pub unsafe fn addOperation(&self, op: &NSOperation); - # [method (addOperations : waitUntilFinished :)] + #[method(addOperations:waitUntilFinished:)] pub unsafe fn addOperations_waitUntilFinished( &self, ops: &NSArray, wait: bool, ); - # [method (addOperationWithBlock :)] + #[method(addOperationWithBlock:)] pub unsafe fn addOperationWithBlock(&self, block: TodoBlock); - # [method (addBarrierBlock :)] + #[method(addBarrierBlock:)] pub unsafe fn addBarrierBlock(&self, barrier: TodoBlock); #[method(maxConcurrentOperationCount)] pub unsafe fn maxConcurrentOperationCount(&self) -> NSInteger; - # [method (setMaxConcurrentOperationCount :)] + #[method(setMaxConcurrentOperationCount:)] pub unsafe fn setMaxConcurrentOperationCount(&self, maxConcurrentOperationCount: NSInteger); #[method(isSuspended)] pub unsafe fn isSuspended(&self) -> bool; - # [method (setSuspended :)] + #[method(setSuspended:)] pub unsafe fn setSuspended(&self, suspended: bool); #[method_id(name)] pub unsafe fn name(&self) -> Option>; - # [method (setName :)] + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; - # [method (setQualityOfService :)] + #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); #[method_id(underlyingQueue)] pub unsafe fn underlyingQueue(&self) -> Option>; - # [method (setUnderlyingQueue :)] + #[method(setUnderlyingQueue:)] pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: Option<&dispatch_queue_t>); #[method(cancelAllOperations)] pub unsafe fn cancelAllOperations(&self); diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 1441aa435..94fe1430c 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -12,13 +12,13 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSOrderedCollectionChange { - # [method_id (changeWithObject : type : index :)] + #[method_id(changeWithObject:type:index:)] pub unsafe fn changeWithObject_type_index( anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, ) -> Id, Shared>; - # [method_id (changeWithObject : type : index : associatedIndex :)] + #[method_id(changeWithObject:type:index:associatedIndex:)] pub unsafe fn changeWithObject_type_index_associatedIndex( anObject: Option<&ObjectType>, type_: NSCollectionChangeType, @@ -35,14 +35,14 @@ extern_methods!( pub unsafe fn associatedIndex(&self) -> NSUInteger; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithObject : type : index :)] + #[method_id(initWithObject:type:index:)] pub unsafe fn initWithObject_type_index( &self, anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, ) -> Id; - # [method_id (initWithObject : type : index : associatedIndex :)] + #[method_id(initWithObject:type:index:associatedIndex:)] pub unsafe fn initWithObject_type_index_associatedIndex( &self, anObject: Option<&ObjectType>, diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index c06519be2..9123c11c1 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -15,12 +15,12 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSOrderedCollectionDifference { - # [method_id (initWithChanges :)] + #[method_id(initWithChanges:)] pub unsafe fn initWithChanges( &self, changes: &NSArray>, ) -> Id; - # [method_id (initWithInsertIndexes : insertedObjects : removeIndexes : removedObjects : additionalChanges :)] + #[method_id(initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:)] pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges( &self, inserts: &NSIndexSet, @@ -29,7 +29,7 @@ extern_methods!( removedObjects: Option<&NSArray>, changes: &NSArray>, ) -> Id; - # [method_id (initWithInsertIndexes : insertedObjects : removeIndexes : removedObjects :)] + #[method_id(initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:)] pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects( &self, inserts: &NSIndexSet, @@ -46,7 +46,7 @@ extern_methods!( -> Id>, Shared>; #[method(hasChanges)] pub unsafe fn hasChanges(&self) -> bool; - # [method_id (differenceByTransformingChangesWithBlock :)] + #[method_id(differenceByTransformingChangesWithBlock:)] pub unsafe fn differenceByTransformingChangesWithBlock( &self, block: TodoBlock, diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index c395ec352..06ea98190 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -22,28 +22,28 @@ extern_methods!( unsafe impl NSOrderedSet { #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - # [method_id (objectAtIndex :)] + #[method_id(objectAtIndex:)] pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Id; - # [method (indexOfObject :)] + #[method(indexOfObject:)] pub unsafe fn indexOfObject(&self, object: &ObjectType) -> NSUInteger; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithObjects : count :)] + #[method_id(initWithObjects:count:)] pub unsafe fn initWithObjects_count( &self, objects: TodoArray, cnt: NSUInteger, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSExtendedOrderedSet"] unsafe impl NSOrderedSet { - # [method (getObjects : range :)] + #[method(getObjects:range:)] pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange); - # [method_id (objectsAtIndexes :)] + #[method_id(objectsAtIndexes:)] pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet, @@ -52,19 +52,19 @@ extern_methods!( pub unsafe fn firstObject(&self) -> Option>; #[method_id(lastObject)] pub unsafe fn lastObject(&self) -> Option>; - # [method (isEqualToOrderedSet :)] + #[method(isEqualToOrderedSet:)] pub unsafe fn isEqualToOrderedSet(&self, other: &NSOrderedSet) -> bool; - # [method (containsObject :)] + #[method(containsObject:)] pub unsafe fn containsObject(&self, object: &ObjectType) -> bool; - # [method (intersectsOrderedSet :)] + #[method(intersectsOrderedSet:)] pub unsafe fn intersectsOrderedSet(&self, other: &NSOrderedSet) -> bool; - # [method (intersectsSet :)] + #[method(intersectsSet:)] pub unsafe fn intersectsSet(&self, set: &NSSet) -> bool; - # [method (isSubsetOfOrderedSet :)] + #[method(isSubsetOfOrderedSet:)] pub unsafe fn isSubsetOfOrderedSet(&self, other: &NSOrderedSet) -> bool; - # [method (isSubsetOfSet :)] + #[method(isSubsetOfSet:)] pub unsafe fn isSubsetOfSet(&self, set: &NSSet) -> bool; - # [method_id (objectAtIndexedSubscript :)] + #[method_id(objectAtIndexedSubscript:)] pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; @@ -76,55 +76,55 @@ extern_methods!( pub unsafe fn array(&self) -> Id, Shared>; #[method_id(set)] pub unsafe fn set(&self) -> Id, Shared>; - # [method (enumerateObjectsUsingBlock :)] + #[method(enumerateObjectsUsingBlock:)] pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); - # [method (enumerateObjectsWithOptions : usingBlock :)] + #[method(enumerateObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); - # [method (enumerateObjectsAtIndexes : options : usingBlock :)] + #[method(enumerateObjectsAtIndexes:options:usingBlock:)] pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( &self, s: &NSIndexSet, opts: NSEnumerationOptions, block: TodoBlock, ); - # [method (indexOfObjectPassingTest :)] + #[method(indexOfObjectPassingTest:)] pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger; - # [method (indexOfObjectWithOptions : passingTest :)] + #[method(indexOfObjectWithOptions:passingTest:)] pub unsafe fn indexOfObjectWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; - # [method (indexOfObjectAtIndexes : options : passingTest :)] + #[method(indexOfObjectAtIndexes:options:passingTest:)] pub unsafe fn indexOfObjectAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; - # [method_id (indexesOfObjectsPassingTest :)] + #[method_id(indexesOfObjectsPassingTest:)] pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: TodoBlock, ) -> Id; - # [method_id (indexesOfObjectsWithOptions : passingTest :)] + #[method_id(indexesOfObjectsWithOptions:passingTest:)] pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; - # [method_id (indexesOfObjectsAtIndexes : options : passingTest :)] + #[method_id(indexesOfObjectsAtIndexes:options:passingTest:)] pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, s: &NSIndexSet, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; - # [method (indexOfObject : inSortedRange : options : usingComparator :)] + #[method(indexOfObject:inSortedRange:options:usingComparator:)] pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, object: &ObjectType, @@ -132,12 +132,12 @@ extern_methods!( opts: NSBinarySearchingOptions, cmp: NSComparator, ) -> NSUInteger; - # [method_id (sortedArrayUsingComparator :)] + #[method_id(sortedArrayUsingComparator:)] pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator, ) -> Id, Shared>; - # [method_id (sortedArrayWithOptions : usingComparator :)] + #[method_id(sortedArrayWithOptions:usingComparator:)] pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, @@ -145,10 +145,10 @@ extern_methods!( ) -> Id, Shared>; #[method_id(description)] pub unsafe fn description(&self) -> Id; - # [method_id (descriptionWithLocale :)] + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; - # [method_id (descriptionWithLocale : indent :)] + #[method_id(descriptionWithLocale:indent:)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, @@ -161,72 +161,72 @@ extern_methods!( unsafe impl NSOrderedSet { #[method_id(orderedSet)] pub unsafe fn orderedSet() -> Id; - # [method_id (orderedSetWithObject :)] + #[method_id(orderedSetWithObject:)] pub unsafe fn orderedSetWithObject(object: &ObjectType) -> Id; - # [method_id (orderedSetWithObjects : count :)] + #[method_id(orderedSetWithObjects:count:)] pub unsafe fn orderedSetWithObjects_count( objects: TodoArray, cnt: NSUInteger, ) -> Id; - # [method_id (orderedSetWithOrderedSet :)] + #[method_id(orderedSetWithOrderedSet:)] pub unsafe fn orderedSetWithOrderedSet(set: &NSOrderedSet) -> Id; - # [method_id (orderedSetWithOrderedSet : range : copyItems :)] + #[method_id(orderedSetWithOrderedSet:range:copyItems:)] pub unsafe fn orderedSetWithOrderedSet_range_copyItems( set: &NSOrderedSet, range: NSRange, flag: bool, ) -> Id; - # [method_id (orderedSetWithArray :)] + #[method_id(orderedSetWithArray:)] pub unsafe fn orderedSetWithArray(array: &NSArray) -> Id; - # [method_id (orderedSetWithArray : range : copyItems :)] + #[method_id(orderedSetWithArray:range:copyItems:)] pub unsafe fn orderedSetWithArray_range_copyItems( array: &NSArray, range: NSRange, flag: bool, ) -> Id; - # [method_id (orderedSetWithSet :)] + #[method_id(orderedSetWithSet:)] pub unsafe fn orderedSetWithSet(set: &NSSet) -> Id; - # [method_id (orderedSetWithSet : copyItems :)] + #[method_id(orderedSetWithSet:copyItems:)] pub unsafe fn orderedSetWithSet_copyItems( set: &NSSet, flag: bool, ) -> Id; - # [method_id (initWithObject :)] + #[method_id(initWithObject:)] pub unsafe fn initWithObject(&self, object: &ObjectType) -> Id; - # [method_id (initWithOrderedSet :)] + #[method_id(initWithOrderedSet:)] pub unsafe fn initWithOrderedSet(&self, set: &NSOrderedSet) -> Id; - # [method_id (initWithOrderedSet : copyItems :)] + #[method_id(initWithOrderedSet:copyItems:)] pub unsafe fn initWithOrderedSet_copyItems( &self, set: &NSOrderedSet, flag: bool, ) -> Id; - # [method_id (initWithOrderedSet : range : copyItems :)] + #[method_id(initWithOrderedSet:range:copyItems:)] pub unsafe fn initWithOrderedSet_range_copyItems( &self, set: &NSOrderedSet, range: NSRange, flag: bool, ) -> Id; - # [method_id (initWithArray :)] + #[method_id(initWithArray:)] pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; - # [method_id (initWithArray : copyItems :)] + #[method_id(initWithArray:copyItems:)] pub unsafe fn initWithArray_copyItems( &self, set: &NSArray, flag: bool, ) -> Id; - # [method_id (initWithArray : range : copyItems :)] + #[method_id(initWithArray:range:copyItems:)] pub unsafe fn initWithArray_range_copyItems( &self, set: &NSArray, range: NSRange, flag: bool, ) -> Id; - # [method_id (initWithSet :)] + #[method_id(initWithSet:)] pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; - # [method_id (initWithSet : copyItems :)] + #[method_id(initWithSet:copyItems:)] pub unsafe fn initWithSet_copyItems( &self, set: &NSSet, @@ -237,25 +237,25 @@ extern_methods!( extern_methods!( #[doc = "NSOrderedSetDiffing"] unsafe impl NSOrderedSet { - # [method_id (differenceFromOrderedSet : withOptions : usingEquivalenceTest :)] + #[method_id(differenceFromOrderedSet:withOptions:usingEquivalenceTest:)] pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( &self, other: &NSOrderedSet, options: NSOrderedCollectionDifferenceCalculationOptions, block: TodoBlock, ) -> Id, Shared>; - # [method_id (differenceFromOrderedSet : withOptions :)] + #[method_id(differenceFromOrderedSet:withOptions:)] pub unsafe fn differenceFromOrderedSet_withOptions( &self, other: &NSOrderedSet, options: NSOrderedCollectionDifferenceCalculationOptions, ) -> Id, Shared>; - # [method_id (differenceFromOrderedSet :)] + #[method_id(differenceFromOrderedSet:)] pub unsafe fn differenceFromOrderedSet( &self, other: &NSOrderedSet, ) -> Id, Shared>; - # [method_id (orderedSetByApplyingDifference :)] + #[method_id(orderedSetByApplyingDifference:)] pub unsafe fn orderedSetByApplyingDifference( &self, difference: &NSOrderedCollectionDifference, @@ -271,91 +271,91 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMutableOrderedSet { - # [method (insertObject : atIndex :)] + #[method(insertObject:atIndex:)] pub unsafe fn insertObject_atIndex(&self, object: &ObjectType, idx: NSUInteger); - # [method (removeObjectAtIndex :)] + #[method(removeObjectAtIndex:)] pub unsafe fn removeObjectAtIndex(&self, idx: NSUInteger); - # [method (replaceObjectAtIndex : withObject :)] + #[method(replaceObjectAtIndex:withObject:)] pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: &ObjectType); - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithCapacity :)] + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; } ); extern_methods!( #[doc = "NSExtendedMutableOrderedSet"] unsafe impl NSMutableOrderedSet { - # [method (addObject :)] + #[method(addObject:)] pub unsafe fn addObject(&self, object: &ObjectType); - # [method (addObjects : count :)] + #[method(addObjects:count:)] pub unsafe fn addObjects_count(&self, objects: TodoArray, count: NSUInteger); - # [method (addObjectsFromArray :)] + #[method(addObjectsFromArray:)] pub unsafe fn addObjectsFromArray(&self, array: &NSArray); - # [method (exchangeObjectAtIndex : withObjectAtIndex :)] + #[method(exchangeObjectAtIndex:withObjectAtIndex:)] pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( &self, idx1: NSUInteger, idx2: NSUInteger, ); - # [method (moveObjectsAtIndexes : toIndex :)] + #[method(moveObjectsAtIndexes:toIndex:)] pub unsafe fn moveObjectsAtIndexes_toIndex(&self, indexes: &NSIndexSet, idx: NSUInteger); - # [method (insertObjects : atIndexes :)] + #[method(insertObjects:atIndexes:)] pub unsafe fn insertObjects_atIndexes( &self, objects: &NSArray, indexes: &NSIndexSet, ); - # [method (setObject : atIndex :)] + #[method(setObject:atIndex:)] pub unsafe fn setObject_atIndex(&self, obj: &ObjectType, idx: NSUInteger); - # [method (setObject : atIndexedSubscript :)] + #[method(setObject:atIndexedSubscript:)] pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger); - # [method (replaceObjectsInRange : withObjects : count :)] + #[method(replaceObjectsInRange:withObjects:count:)] pub unsafe fn replaceObjectsInRange_withObjects_count( &self, range: NSRange, objects: TodoArray, count: NSUInteger, ); - # [method (replaceObjectsAtIndexes : withObjects :)] + #[method(replaceObjectsAtIndexes:withObjects:)] pub unsafe fn replaceObjectsAtIndexes_withObjects( &self, indexes: &NSIndexSet, objects: &NSArray, ); - # [method (removeObjectsInRange :)] + #[method(removeObjectsInRange:)] pub unsafe fn removeObjectsInRange(&self, range: NSRange); - # [method (removeObjectsAtIndexes :)] + #[method(removeObjectsAtIndexes:)] pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet); #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); - # [method (removeObject :)] + #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &ObjectType); - # [method (removeObjectsInArray :)] + #[method(removeObjectsInArray:)] pub unsafe fn removeObjectsInArray(&self, array: &NSArray); - # [method (intersectOrderedSet :)] + #[method(intersectOrderedSet:)] pub unsafe fn intersectOrderedSet(&self, other: &NSOrderedSet); - # [method (minusOrderedSet :)] + #[method(minusOrderedSet:)] pub unsafe fn minusOrderedSet(&self, other: &NSOrderedSet); - # [method (unionOrderedSet :)] + #[method(unionOrderedSet:)] pub unsafe fn unionOrderedSet(&self, other: &NSOrderedSet); - # [method (intersectSet :)] + #[method(intersectSet:)] pub unsafe fn intersectSet(&self, other: &NSSet); - # [method (minusSet :)] + #[method(minusSet:)] pub unsafe fn minusSet(&self, other: &NSSet); - # [method (unionSet :)] + #[method(unionSet:)] pub unsafe fn unionSet(&self, other: &NSSet); - # [method (sortUsingComparator :)] + #[method(sortUsingComparator:)] pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator); - # [method (sortWithOptions : usingComparator :)] + #[method(sortWithOptions:usingComparator:)] pub unsafe fn sortWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, ); - # [method (sortRange : options : usingComparator :)] + #[method(sortRange:options:usingComparator:)] pub unsafe fn sortRange_options_usingComparator( &self, range: NSRange, @@ -367,14 +367,14 @@ extern_methods!( extern_methods!( #[doc = "NSMutableOrderedSetCreation"] unsafe impl NSMutableOrderedSet { - # [method_id (orderedSetWithCapacity :)] + #[method_id(orderedSetWithCapacity:)] pub unsafe fn orderedSetWithCapacity(numItems: NSUInteger) -> Id; } ); extern_methods!( #[doc = "NSMutableOrderedSetDiffing"] unsafe impl NSMutableOrderedSet { - # [method (applyDifference :)] + #[method(applyDifference:)] pub unsafe fn applyDifference( &self, difference: &NSOrderedCollectionDifference, diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index b8512f03f..7314f4b64 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -19,25 +19,25 @@ extern_methods!( pub unsafe fn dominantScript(&self) -> Id; #[method_id(languageMap)] pub unsafe fn languageMap(&self) -> Id>, Shared>; - # [method_id (initWithDominantScript : languageMap :)] + #[method_id(initWithDominantScript:languageMap:)] pub unsafe fn initWithDominantScript_languageMap( &self, script: &NSString, map: &NSDictionary>, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSOrthographyExtended"] unsafe impl NSOrthography { - # [method_id (languagesForScript :)] + #[method_id(languagesForScript:)] pub unsafe fn languagesForScript( &self, script: &NSString, ) -> Option, Shared>>; - # [method_id (dominantLanguageForScript :)] + #[method_id(dominantLanguageForScript:)] pub unsafe fn dominantLanguageForScript( &self, script: &NSString, @@ -48,14 +48,14 @@ extern_methods!( pub unsafe fn allScripts(&self) -> Id, Shared>; #[method_id(allLanguages)] pub unsafe fn allLanguages(&self) -> Id, Shared>; - # [method_id (defaultOrthographyForLanguage :)] + #[method_id(defaultOrthographyForLanguage:)] pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id; } ); extern_methods!( #[doc = "NSOrthographyCreation"] unsafe impl NSOrthography { - # [method_id (orthographyWithDominantScript : languageMap :)] + #[method_id(orthographyWithDominantScript:languageMap:)] pub unsafe fn orthographyWithDominantScript_languageMap( script: &NSString, map: &NSDictionary>, diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index d72387eb7..4e51fbd49 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -7,7 +7,7 @@ use objc2::{extern_class, extern_methods, ClassType}; extern_methods!( #[doc = "NSStringPathExtensions"] unsafe impl NSString { - # [method_id (pathWithComponents :)] + #[method_id(pathWithComponents:)] pub unsafe fn pathWithComponents(components: &NSArray) -> Id; #[method_id(pathComponents)] pub unsafe fn pathComponents(&self) -> Id, Shared>; @@ -17,13 +17,13 @@ extern_methods!( pub unsafe fn lastPathComponent(&self) -> Id; #[method_id(stringByDeletingLastPathComponent)] pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id; - # [method_id (stringByAppendingPathComponent :)] + #[method_id(stringByAppendingPathComponent:)] pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id; #[method_id(pathExtension)] pub unsafe fn pathExtension(&self) -> Id; #[method_id(stringByDeletingPathExtension)] pub unsafe fn stringByDeletingPathExtension(&self) -> Id; - # [method_id (stringByAppendingPathExtension :)] + #[method_id(stringByAppendingPathExtension:)] pub unsafe fn stringByAppendingPathExtension( &self, str: &NSString, @@ -36,12 +36,12 @@ extern_methods!( pub unsafe fn stringByStandardizingPath(&self) -> Id; #[method_id(stringByResolvingSymlinksInPath)] pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id; - # [method_id (stringsByAppendingPaths :)] + #[method_id(stringsByAppendingPaths:)] pub unsafe fn stringsByAppendingPaths( &self, paths: &NSArray, ) -> Id, Shared>; - # [method (completePathIntoString : caseSensitive : matchesIntoArray : filterTypes :)] + #[method(completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:)] pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( &self, outputName: Option<&mut Option>>, @@ -51,7 +51,7 @@ extern_methods!( ) -> NSUInteger; #[method(fileSystemRepresentation)] pub unsafe fn fileSystemRepresentation(&self) -> NonNull; - # [method (getFileSystemRepresentation : maxLength :)] + #[method(getFileSystemRepresentation:maxLength:)] pub unsafe fn getFileSystemRepresentation_maxLength( &self, cname: NonNull, @@ -62,7 +62,7 @@ extern_methods!( extern_methods!( #[doc = "NSArrayPathExtensions"] unsafe impl NSArray { - # [method_id (pathsMatchingExtensions :)] + #[method_id(pathsMatchingExtensions:)] pub unsafe fn pathsMatchingExtensions( &self, filterTypes: &NSArray, diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs index 4b48d730a..b72409c19 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -16,31 +16,31 @@ extern_methods!( unsafe impl NSPersonNameComponents { #[method_id(namePrefix)] pub unsafe fn namePrefix(&self) -> Option>; - # [method (setNamePrefix :)] + #[method(setNamePrefix:)] pub unsafe fn setNamePrefix(&self, namePrefix: Option<&NSString>); #[method_id(givenName)] pub unsafe fn givenName(&self) -> Option>; - # [method (setGivenName :)] + #[method(setGivenName:)] pub unsafe fn setGivenName(&self, givenName: Option<&NSString>); #[method_id(middleName)] pub unsafe fn middleName(&self) -> Option>; - # [method (setMiddleName :)] + #[method(setMiddleName:)] pub unsafe fn setMiddleName(&self, middleName: Option<&NSString>); #[method_id(familyName)] pub unsafe fn familyName(&self) -> Option>; - # [method (setFamilyName :)] + #[method(setFamilyName:)] pub unsafe fn setFamilyName(&self, familyName: Option<&NSString>); #[method_id(nameSuffix)] pub unsafe fn nameSuffix(&self) -> Option>; - # [method (setNameSuffix :)] + #[method(setNameSuffix:)] pub unsafe fn setNameSuffix(&self, nameSuffix: Option<&NSString>); #[method_id(nickname)] pub unsafe fn nickname(&self) -> Option>; - # [method (setNickname :)] + #[method(setNickname:)] pub unsafe fn setNickname(&self, nickname: Option<&NSString>); #[method_id(phoneticRepresentation)] pub unsafe fn phoneticRepresentation(&self) -> Option>; - # [method (setPhoneticRepresentation :)] + #[method(setPhoneticRepresentation:)] pub unsafe fn setPhoneticRepresentation( &self, phoneticRepresentation: Option<&NSPersonNameComponents>, diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index 8c6338048..d150b3c81 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -15,38 +15,38 @@ extern_methods!( unsafe impl NSPersonNameComponentsFormatter { #[method(style)] pub unsafe fn style(&self) -> NSPersonNameComponentsFormatterStyle; - # [method (setStyle :)] + #[method(setStyle:)] pub unsafe fn setStyle(&self, style: NSPersonNameComponentsFormatterStyle); #[method(isPhonetic)] pub unsafe fn isPhonetic(&self) -> bool; - # [method (setPhonetic :)] + #[method(setPhonetic:)] pub unsafe fn setPhonetic(&self, phonetic: bool); #[method_id(locale)] pub unsafe fn locale(&self) -> Id; - # [method (setLocale :)] + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); - # [method_id (localizedStringFromPersonNameComponents : style : options :)] + #[method_id(localizedStringFromPersonNameComponents:style:options:)] pub unsafe fn localizedStringFromPersonNameComponents_style_options( components: &NSPersonNameComponents, nameFormatStyle: NSPersonNameComponentsFormatterStyle, nameOptions: NSPersonNameComponentsFormatterOptions, ) -> Id; - # [method_id (stringFromPersonNameComponents :)] + #[method_id(stringFromPersonNameComponents:)] pub unsafe fn stringFromPersonNameComponents( &self, components: &NSPersonNameComponents, ) -> Id; - # [method_id (annotatedStringFromPersonNameComponents :)] + #[method_id(annotatedStringFromPersonNameComponents:)] pub unsafe fn annotatedStringFromPersonNameComponents( &self, components: &NSPersonNameComponents, ) -> Id; - # [method_id (personNameComponentsFromString :)] + #[method_id(personNameComponentsFromString:)] pub unsafe fn personNameComponentsFromString( &self, string: &NSString, ) -> Option>; - # [method (getObjectValue : forString : errorDescription :)] + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, obj: Option<&mut Option>>, diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index 61a379377..87643f9cc 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -14,35 +14,35 @@ extern_class!( ); extern_methods!( unsafe impl NSPointerArray { - # [method_id (initWithOptions :)] + #[method_id(initWithOptions:)] pub unsafe fn initWithOptions( &self, options: NSPointerFunctionsOptions, ) -> Id; - # [method_id (initWithPointerFunctions :)] + #[method_id(initWithPointerFunctions:)] pub unsafe fn initWithPointerFunctions( &self, functions: &NSPointerFunctions, ) -> Id; - # [method_id (pointerArrayWithOptions :)] + #[method_id(pointerArrayWithOptions:)] pub unsafe fn pointerArrayWithOptions( options: NSPointerFunctionsOptions, ) -> Id; - # [method_id (pointerArrayWithPointerFunctions :)] + #[method_id(pointerArrayWithPointerFunctions:)] pub unsafe fn pointerArrayWithPointerFunctions( functions: &NSPointerFunctions, ) -> Id; #[method_id(pointerFunctions)] pub unsafe fn pointerFunctions(&self) -> Id; - # [method (pointerAtIndex :)] + #[method(pointerAtIndex:)] pub unsafe fn pointerAtIndex(&self, index: NSUInteger) -> *mut c_void; - # [method (addPointer :)] + #[method(addPointer:)] pub unsafe fn addPointer(&self, pointer: *mut c_void); - # [method (removePointerAtIndex :)] + #[method(removePointerAtIndex:)] pub unsafe fn removePointerAtIndex(&self, index: NSUInteger); - # [method (insertPointer : atIndex :)] + #[method(insertPointer:atIndex:)] pub unsafe fn insertPointer_atIndex(&self, item: *mut c_void, index: NSUInteger); - # [method (replacePointerAtIndex : withPointer :)] + #[method(replacePointerAtIndex:withPointer:)] pub unsafe fn replacePointerAtIndex_withPointer( &self, index: NSUInteger, @@ -52,7 +52,7 @@ extern_methods!( pub unsafe fn compact(&self); #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - # [method (setCount :)] + #[method(setCount:)] pub unsafe fn setCount(&self, count: NSUInteger); } ); diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 71343ba5d..6092e1645 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -12,46 +12,46 @@ extern_class!( ); extern_methods!( unsafe impl NSPointerFunctions { - # [method_id (initWithOptions :)] + #[method_id(initWithOptions:)] pub unsafe fn initWithOptions( &self, options: NSPointerFunctionsOptions, ) -> Id; - # [method_id (pointerFunctionsWithOptions :)] + #[method_id(pointerFunctionsWithOptions:)] pub unsafe fn pointerFunctionsWithOptions( options: NSPointerFunctionsOptions, ) -> Id; #[method(hashFunction)] pub unsafe fn hashFunction(&self) -> *mut TodoFunction; - # [method (setHashFunction :)] + #[method(setHashFunction:)] pub unsafe fn setHashFunction(&self, hashFunction: *mut TodoFunction); #[method(isEqualFunction)] pub unsafe fn isEqualFunction(&self) -> *mut TodoFunction; - # [method (setIsEqualFunction :)] + #[method(setIsEqualFunction:)] pub unsafe fn setIsEqualFunction(&self, isEqualFunction: *mut TodoFunction); #[method(sizeFunction)] pub unsafe fn sizeFunction(&self) -> *mut TodoFunction; - # [method (setSizeFunction :)] + #[method(setSizeFunction:)] pub unsafe fn setSizeFunction(&self, sizeFunction: *mut TodoFunction); #[method(descriptionFunction)] pub unsafe fn descriptionFunction(&self) -> *mut TodoFunction; - # [method (setDescriptionFunction :)] + #[method(setDescriptionFunction:)] pub unsafe fn setDescriptionFunction(&self, descriptionFunction: *mut TodoFunction); #[method(relinquishFunction)] pub unsafe fn relinquishFunction(&self) -> *mut TodoFunction; - # [method (setRelinquishFunction :)] + #[method(setRelinquishFunction:)] pub unsafe fn setRelinquishFunction(&self, relinquishFunction: *mut TodoFunction); #[method(acquireFunction)] pub unsafe fn acquireFunction(&self) -> *mut TodoFunction; - # [method (setAcquireFunction :)] + #[method(setAcquireFunction:)] pub unsafe fn setAcquireFunction(&self, acquireFunction: *mut TodoFunction); #[method(usesStrongWriteBarrier)] pub unsafe fn usesStrongWriteBarrier(&self) -> bool; - # [method (setUsesStrongWriteBarrier :)] + #[method(setUsesStrongWriteBarrier:)] pub unsafe fn setUsesStrongWriteBarrier(&self, usesStrongWriteBarrier: bool); #[method(usesWeakReadAndWriteBarriers)] pub unsafe fn usesWeakReadAndWriteBarriers(&self) -> bool; - # [method (setUsesWeakReadAndWriteBarriers :)] + #[method(setUsesWeakReadAndWriteBarriers:)] pub unsafe fn setUsesWeakReadAndWriteBarriers(&self, usesWeakReadAndWriteBarriers: bool); } ); diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 80af9fc2c..fff77fdcd 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -26,17 +26,17 @@ extern_methods!( pub unsafe fn invalidate(&self); #[method(isValid)] pub unsafe fn isValid(&self) -> bool; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, anObject: Option<&NSPortDelegate>); #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (scheduleInRunLoop : forMode :)] + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); - # [method (removeFromRunLoop : forMode :)] + #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); #[method(reservedSpaceLength)] pub unsafe fn reservedSpaceLength(&self) -> NSUInteger; - # [method (sendBeforeDate : components : from : reserved :)] + #[method(sendBeforeDate:components:from:reserved:)] pub unsafe fn sendBeforeDate_components_from_reserved( &self, limitDate: &NSDate, @@ -44,7 +44,7 @@ extern_methods!( receivePort: Option<&NSPort>, headerSpaceReserved: NSUInteger, ) -> bool; - # [method (sendBeforeDate : msgid : components : from : reserved :)] + #[method(sendBeforeDate:msgid:components:from:reserved:)] pub unsafe fn sendBeforeDate_msgid_components_from_reserved( &self, limitDate: &NSDate, @@ -53,14 +53,14 @@ extern_methods!( receivePort: Option<&NSPort>, headerSpaceReserved: NSUInteger, ) -> bool; - # [method (addConnection : toRunLoop : forMode :)] + #[method(addConnection:toRunLoop:forMode:)] pub unsafe fn addConnection_toRunLoop_forMode( &self, conn: &NSConnection, runLoop: &NSRunLoop, mode: &NSRunLoopMode, ); - # [method (removeConnection : fromRunLoop : forMode :)] + #[method(removeConnection:fromRunLoop:forMode:)] pub unsafe fn removeConnection_fromRunLoop_forMode( &self, conn: &NSConnection, @@ -79,20 +79,20 @@ extern_class!( ); extern_methods!( unsafe impl NSMachPort { - # [method_id (portWithMachPort :)] + #[method_id(portWithMachPort:)] pub unsafe fn portWithMachPort(machPort: u32) -> Id; - # [method_id (initWithMachPort :)] + #[method_id(initWithMachPort:)] pub unsafe fn initWithMachPort(&self, machPort: u32) -> Id; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, anObject: Option<&NSMachPortDelegate>); #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method_id (portWithMachPort : options :)] + #[method_id(portWithMachPort:options:)] pub unsafe fn portWithMachPort_options( machPort: u32, f: NSMachPortOptions, ) -> Id; - # [method_id (initWithMachPort : options :)] + #[method_id(initWithMachPort:options:)] pub unsafe fn initWithMachPort_options( &self, machPort: u32, @@ -100,9 +100,9 @@ extern_methods!( ) -> Id; #[method(machPort)] pub unsafe fn machPort(&self) -> u32; - # [method (scheduleInRunLoop : forMode :)] + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); - # [method (removeFromRunLoop : forMode :)] + #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); } ); @@ -128,9 +128,9 @@ extern_methods!( unsafe impl NSSocketPort { #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithTCPPort :)] + #[method_id(initWithTCPPort:)] pub unsafe fn initWithTCPPort(&self, port: c_ushort) -> Option>; - # [method_id (initWithProtocolFamily : socketType : protocol : address :)] + #[method_id(initWithProtocolFamily:socketType:protocol:address:)] pub unsafe fn initWithProtocolFamily_socketType_protocol_address( &self, family: c_int, @@ -138,7 +138,7 @@ extern_methods!( protocol: c_int, address: &NSData, ) -> Option>; - # [method_id (initWithProtocolFamily : socketType : protocol : socket :)] + #[method_id(initWithProtocolFamily:socketType:protocol:socket:)] pub unsafe fn initWithProtocolFamily_socketType_protocol_socket( &self, family: c_int, @@ -146,13 +146,13 @@ extern_methods!( protocol: c_int, sock: NSSocketNativeHandle, ) -> Option>; - # [method_id (initRemoteWithTCPPort : host :)] + #[method_id(initRemoteWithTCPPort:host:)] pub unsafe fn initRemoteWithTCPPort_host( &self, port: c_ushort, hostName: Option<&NSString>, ) -> Option>; - # [method_id (initRemoteWithProtocolFamily : socketType : protocol : address :)] + #[method_id(initRemoteWithProtocolFamily:socketType:protocol:address:)] pub unsafe fn initRemoteWithProtocolFamily_socketType_protocol_address( &self, family: c_int, diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index cfc51f59e..a6d3f4b5b 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -19,19 +19,19 @@ extern_methods!( pub unsafe fn isBycopy(&self) -> bool; #[method(isByref)] pub unsafe fn isByref(&self) -> bool; - # [method (encodePortObject :)] + #[method(encodePortObject:)] pub unsafe fn encodePortObject(&self, aport: &NSPort); #[method_id(decodePortObject)] pub unsafe fn decodePortObject(&self) -> Option>; #[method_id(connection)] pub unsafe fn connection(&self) -> Option>; - # [method_id (portCoderWithReceivePort : sendPort : components :)] + #[method_id(portCoderWithReceivePort:sendPort:components:)] pub unsafe fn portCoderWithReceivePort_sendPort_components( rcvPort: Option<&NSPort>, sndPort: Option<&NSPort>, comps: Option<&NSArray>, ) -> Id; - # [method_id (initWithReceivePort : sendPort : components :)] + #[method_id(initWithReceivePort:sendPort:components:)] pub unsafe fn initWithReceivePort_sendPort_components( &self, rcvPort: Option<&NSPort>, @@ -47,7 +47,7 @@ extern_methods!( unsafe impl NSObject { #[method(classForPortCoder)] pub unsafe fn classForPortCoder(&self) -> &Class; - # [method_id (replacementObjectForPortCoder :)] + #[method_id(replacementObjectForPortCoder:)] pub unsafe fn replacementObjectForPortCoder( &self, coder: &NSPortCoder, diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index fb466dc80..0c81ab68d 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -16,7 +16,7 @@ extern_class!( ); extern_methods!( unsafe impl NSPortMessage { - # [method_id (initWithSendPort : receivePort : components :)] + #[method_id(initWithSendPort:receivePort:components:)] pub unsafe fn initWithSendPort_receivePort_components( &self, sendPort: Option<&NSPort>, @@ -29,11 +29,11 @@ extern_methods!( pub unsafe fn receivePort(&self) -> Option>; #[method_id(sendPort)] pub unsafe fn sendPort(&self) -> Option>; - # [method (sendBeforeDate :)] + #[method(sendBeforeDate:)] pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool; #[method(msgid)] pub unsafe fn msgid(&self) -> u32; - # [method (setMsgid :)] + #[method(setMsgid:)] pub unsafe fn setMsgid(&self, msgid: u32); } ); diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index bfc9393c9..ea18722d2 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -16,17 +16,17 @@ extern_methods!( unsafe impl NSPortNameServer { #[method_id(systemDefaultPortNameServer)] pub unsafe fn systemDefaultPortNameServer() -> Id; - # [method_id (portForName :)] + #[method_id(portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; - # [method_id (portForName : host :)] + #[method_id(portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, host: Option<&NSString>, ) -> Option>; - # [method (registerPort : name :)] + #[method(registerPort:name:)] pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool; - # [method (removePortForName :)] + #[method(removePortForName:)] pub unsafe fn removePortForName(&self, name: &NSString) -> bool; } ); @@ -41,17 +41,17 @@ extern_methods!( unsafe impl NSMachBootstrapServer { #[method_id(sharedInstance)] pub unsafe fn sharedInstance() -> Id; - # [method_id (portForName :)] + #[method_id(portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; - # [method_id (portForName : host :)] + #[method_id(portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, host: Option<&NSString>, ) -> Option>; - # [method (registerPort : name :)] + #[method(registerPort:name:)] pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool; - # [method_id (servicePortWithName :)] + #[method_id(servicePortWithName:)] pub unsafe fn servicePortWithName(&self, name: &NSString) -> Option>; } ); @@ -66,9 +66,9 @@ extern_methods!( unsafe impl NSMessagePortNameServer { #[method_id(sharedInstance)] pub unsafe fn sharedInstance() -> Id; - # [method_id (portForName :)] + #[method_id(portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; - # [method_id (portForName : host :)] + #[method_id(portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, @@ -87,26 +87,26 @@ extern_methods!( unsafe impl NSSocketPortNameServer { #[method_id(sharedInstance)] pub unsafe fn sharedInstance() -> Id; - # [method_id (portForName :)] + #[method_id(portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; - # [method_id (portForName : host :)] + #[method_id(portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, host: Option<&NSString>, ) -> Option>; - # [method (registerPort : name :)] + #[method(registerPort:name:)] pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool; - # [method (removePortForName :)] + #[method(removePortForName:)] pub unsafe fn removePortForName(&self, name: &NSString) -> bool; - # [method_id (portForName : host : nameServerPortNumber :)] + #[method_id(portForName:host:nameServerPortNumber:)] pub unsafe fn portForName_host_nameServerPortNumber( &self, name: &NSString, host: Option<&NSString>, portNumber: u16, ) -> Option>; - # [method (registerPort : name : nameServerPortNumber :)] + #[method(registerPort:name:nameServerPortNumber:)] pub unsafe fn registerPort_name_nameServerPortNumber( &self, port: &NSPort, @@ -115,7 +115,7 @@ extern_methods!( ) -> bool; #[method(defaultNameServerPortNumber)] pub unsafe fn defaultNameServerPortNumber(&self) -> u16; - # [method (setDefaultNameServerPortNumber :)] + #[method(setDefaultNameServerPortNumber:)] pub unsafe fn setDefaultNameServerPortNumber(&self, defaultNameServerPortNumber: u16); } ); diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 06c4cc809..95f455c41 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -17,34 +17,34 @@ extern_class!( ); extern_methods!( unsafe impl NSPredicate { - # [method_id (predicateWithFormat : argumentArray :)] + #[method_id(predicateWithFormat:argumentArray:)] pub unsafe fn predicateWithFormat_argumentArray( predicateFormat: &NSString, arguments: Option<&NSArray>, ) -> Id; - # [method_id (predicateWithFormat : arguments :)] + #[method_id(predicateWithFormat:arguments:)] pub unsafe fn predicateWithFormat_arguments( predicateFormat: &NSString, argList: va_list, ) -> Id; - # [method_id (predicateFromMetadataQueryString :)] + #[method_id(predicateFromMetadataQueryString:)] pub unsafe fn predicateFromMetadataQueryString( queryString: &NSString, ) -> Option>; - # [method_id (predicateWithValue :)] + #[method_id(predicateWithValue:)] pub unsafe fn predicateWithValue(value: bool) -> Id; - # [method_id (predicateWithBlock :)] + #[method_id(predicateWithBlock:)] pub unsafe fn predicateWithBlock(block: TodoBlock) -> Id; #[method_id(predicateFormat)] pub unsafe fn predicateFormat(&self) -> Id; - # [method_id (predicateWithSubstitutionVariables :)] + #[method_id(predicateWithSubstitutionVariables:)] pub unsafe fn predicateWithSubstitutionVariables( &self, variables: &NSDictionary, ) -> Id; - # [method (evaluateWithObject :)] + #[method(evaluateWithObject:)] pub unsafe fn evaluateWithObject(&self, object: Option<&Object>) -> bool; - # [method (evaluateWithObject : substitutionVariables :)] + #[method(evaluateWithObject:substitutionVariables:)] pub unsafe fn evaluateWithObject_substitutionVariables( &self, object: Option<&Object>, @@ -57,7 +57,7 @@ extern_methods!( extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSArray { - # [method_id (filteredArrayUsingPredicate :)] + #[method_id(filteredArrayUsingPredicate:)] pub unsafe fn filteredArrayUsingPredicate( &self, predicate: &NSPredicate, @@ -67,14 +67,14 @@ extern_methods!( extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSMutableArray { - # [method (filterUsingPredicate :)] + #[method(filterUsingPredicate:)] pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate); } ); extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSSet { - # [method_id (filteredSetUsingPredicate :)] + #[method_id(filteredSetUsingPredicate:)] pub unsafe fn filteredSetUsingPredicate( &self, predicate: &NSPredicate, @@ -84,14 +84,14 @@ extern_methods!( extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSMutableSet { - # [method (filterUsingPredicate :)] + #[method(filterUsingPredicate:)] pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate); } ); extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSOrderedSet { - # [method_id (filteredOrderedSetUsingPredicate :)] + #[method_id(filteredOrderedSetUsingPredicate:)] pub unsafe fn filteredOrderedSetUsingPredicate( &self, p: &NSPredicate, @@ -101,7 +101,7 @@ extern_methods!( extern_methods!( #[doc = "NSPredicateSupport"] unsafe impl NSMutableOrderedSet { - # [method (filterUsingPredicate :)] + #[method(filterUsingPredicate:)] pub unsafe fn filterUsingPredicate(&self, p: &NSPredicate); } ); diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 92f3be97a..9720175a7 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -27,7 +27,7 @@ extern_methods!( pub unsafe fn hostName(&self) -> Id; #[method_id(processName)] pub unsafe fn processName(&self) -> Id; - # [method (setProcessName :)] + #[method(setProcessName:)] pub unsafe fn setProcessName(&self, processName: &NSString); #[method(processIdentifier)] pub unsafe fn processIdentifier(&self) -> c_int; @@ -47,7 +47,7 @@ extern_methods!( pub unsafe fn activeProcessorCount(&self) -> NSUInteger; #[method(physicalMemory)] pub unsafe fn physicalMemory(&self) -> c_ulonglong; - # [method (isOperatingSystemAtLeastVersion :)] + #[method(isOperatingSystemAtLeastVersion:)] pub unsafe fn isOperatingSystemAtLeastVersion( &self, version: NSOperatingSystemVersion, @@ -58,13 +58,13 @@ extern_methods!( pub unsafe fn disableSuddenTermination(&self); #[method(enableSuddenTermination)] pub unsafe fn enableSuddenTermination(&self); - # [method (disableAutomaticTermination :)] + #[method(disableAutomaticTermination:)] pub unsafe fn disableAutomaticTermination(&self, reason: &NSString); - # [method (enableAutomaticTermination :)] + #[method(enableAutomaticTermination:)] pub unsafe fn enableAutomaticTermination(&self, reason: &NSString); #[method(automaticTerminationSupportEnabled)] pub unsafe fn automaticTerminationSupportEnabled(&self) -> bool; - # [method (setAutomaticTerminationSupportEnabled :)] + #[method(setAutomaticTerminationSupportEnabled:)] pub unsafe fn setAutomaticTerminationSupportEnabled( &self, automaticTerminationSupportEnabled: bool, @@ -74,22 +74,22 @@ extern_methods!( extern_methods!( #[doc = "NSProcessInfoActivity"] unsafe impl NSProcessInfo { - # [method_id (beginActivityWithOptions : reason :)] + #[method_id(beginActivityWithOptions:reason:)] pub unsafe fn beginActivityWithOptions_reason( &self, options: NSActivityOptions, reason: &NSString, ) -> Id; - # [method (endActivity :)] + #[method(endActivity:)] pub unsafe fn endActivity(&self, activity: &NSObject); - # [method (performActivityWithOptions : reason : usingBlock :)] + #[method(performActivityWithOptions:reason:usingBlock:)] pub unsafe fn performActivityWithOptions_reason_usingBlock( &self, options: NSActivityOptions, reason: &NSString, block: TodoBlock, ); - # [method (performExpiringActivityWithReason : usingBlock :)] + #[method(performExpiringActivityWithReason:usingBlock:)] pub unsafe fn performExpiringActivityWithReason_usingBlock( &self, reason: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 63912ec75..4e1b5a6f3 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -25,27 +25,27 @@ extern_methods!( unsafe impl NSProgress { #[method_id(currentProgress)] pub unsafe fn currentProgress() -> Option>; - # [method_id (progressWithTotalUnitCount :)] + #[method_id(progressWithTotalUnitCount:)] pub unsafe fn progressWithTotalUnitCount(unitCount: int64_t) -> Id; - # [method_id (discreteProgressWithTotalUnitCount :)] + #[method_id(discreteProgressWithTotalUnitCount:)] pub unsafe fn discreteProgressWithTotalUnitCount( unitCount: int64_t, ) -> Id; - # [method_id (progressWithTotalUnitCount : parent : pendingUnitCount :)] + #[method_id(progressWithTotalUnitCount:parent:pendingUnitCount:)] pub unsafe fn progressWithTotalUnitCount_parent_pendingUnitCount( unitCount: int64_t, parent: &NSProgress, portionOfParentTotalUnitCount: int64_t, ) -> Id; - # [method_id (initWithParent : userInfo :)] + #[method_id(initWithParent:userInfo:)] pub unsafe fn initWithParent_userInfo( &self, parentProgressOrNil: Option<&NSProgress>, userInfoOrNil: Option<&NSDictionary>, ) -> Id; - # [method (becomeCurrentWithPendingUnitCount :)] + #[method(becomeCurrentWithPendingUnitCount:)] pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unitCount: int64_t); - # [method (performAsCurrentWithPendingUnitCount : usingBlock :)] + #[method(performAsCurrentWithPendingUnitCount:usingBlock:)] pub unsafe fn performAsCurrentWithPendingUnitCount_usingBlock( &self, unitCount: int64_t, @@ -53,7 +53,7 @@ extern_methods!( ); #[method(resignCurrent)] pub unsafe fn resignCurrent(&self); - # [method (addChild : withPendingUnitCount :)] + #[method(addChild:withPendingUnitCount:)] pub unsafe fn addChild_withPendingUnitCount( &self, child: &NSProgress, @@ -61,30 +61,30 @@ extern_methods!( ); #[method(totalUnitCount)] pub unsafe fn totalUnitCount(&self) -> int64_t; - # [method (setTotalUnitCount :)] + #[method(setTotalUnitCount:)] pub unsafe fn setTotalUnitCount(&self, totalUnitCount: int64_t); #[method(completedUnitCount)] pub unsafe fn completedUnitCount(&self) -> int64_t; - # [method (setCompletedUnitCount :)] + #[method(setCompletedUnitCount:)] pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: int64_t); #[method_id(localizedDescription)] pub unsafe fn localizedDescription(&self) -> Id; - # [method (setLocalizedDescription :)] + #[method(setLocalizedDescription:)] pub unsafe fn setLocalizedDescription(&self, localizedDescription: Option<&NSString>); #[method_id(localizedAdditionalDescription)] pub unsafe fn localizedAdditionalDescription(&self) -> Id; - # [method (setLocalizedAdditionalDescription :)] + #[method(setLocalizedAdditionalDescription:)] pub unsafe fn setLocalizedAdditionalDescription( &self, localizedAdditionalDescription: Option<&NSString>, ); #[method(isCancellable)] pub unsafe fn isCancellable(&self) -> bool; - # [method (setCancellable :)] + #[method(setCancellable:)] pub unsafe fn setCancellable(&self, cancellable: bool); #[method(isPausable)] pub unsafe fn isPausable(&self) -> bool; - # [method (setPausable :)] + #[method(setPausable:)] pub unsafe fn setPausable(&self, pausable: bool); #[method(isCancelled)] pub unsafe fn isCancelled(&self) -> bool; @@ -92,17 +92,17 @@ extern_methods!( pub unsafe fn isPaused(&self) -> bool; #[method(cancellationHandler)] pub unsafe fn cancellationHandler(&self) -> TodoBlock; - # [method (setCancellationHandler :)] + #[method(setCancellationHandler:)] pub unsafe fn setCancellationHandler(&self, cancellationHandler: TodoBlock); #[method(pausingHandler)] pub unsafe fn pausingHandler(&self) -> TodoBlock; - # [method (setPausingHandler :)] + #[method(setPausingHandler:)] pub unsafe fn setPausingHandler(&self, pausingHandler: TodoBlock); #[method(resumingHandler)] pub unsafe fn resumingHandler(&self) -> TodoBlock; - # [method (setResumingHandler :)] + #[method(setResumingHandler:)] pub unsafe fn setResumingHandler(&self, resumingHandler: TodoBlock); - # [method (setUserInfoObject : forKey :)] + #[method(setUserInfoObject:forKey:)] pub unsafe fn setUserInfoObject_forKey( &self, objectOrNil: Option<&Object>, @@ -124,45 +124,45 @@ extern_methods!( pub unsafe fn userInfo(&self) -> Id, Shared>; #[method_id(kind)] pub unsafe fn kind(&self) -> Option>; - # [method (setKind :)] + #[method(setKind:)] pub unsafe fn setKind(&self, kind: Option<&NSProgressKind>); #[method_id(estimatedTimeRemaining)] pub unsafe fn estimatedTimeRemaining(&self) -> Option>; - # [method (setEstimatedTimeRemaining :)] + #[method(setEstimatedTimeRemaining:)] pub unsafe fn setEstimatedTimeRemaining(&self, estimatedTimeRemaining: Option<&NSNumber>); #[method_id(throughput)] pub unsafe fn throughput(&self) -> Option>; - # [method (setThroughput :)] + #[method(setThroughput:)] pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>); #[method_id(fileOperationKind)] pub unsafe fn fileOperationKind(&self) -> Option>; - # [method (setFileOperationKind :)] + #[method(setFileOperationKind:)] pub unsafe fn setFileOperationKind( &self, fileOperationKind: Option<&NSProgressFileOperationKind>, ); #[method_id(fileURL)] pub unsafe fn fileURL(&self) -> Option>; - # [method (setFileURL :)] + #[method(setFileURL:)] pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>); #[method_id(fileTotalCount)] pub unsafe fn fileTotalCount(&self) -> Option>; - # [method (setFileTotalCount :)] + #[method(setFileTotalCount:)] pub unsafe fn setFileTotalCount(&self, fileTotalCount: Option<&NSNumber>); #[method_id(fileCompletedCount)] pub unsafe fn fileCompletedCount(&self) -> Option>; - # [method (setFileCompletedCount :)] + #[method(setFileCompletedCount:)] pub unsafe fn setFileCompletedCount(&self, fileCompletedCount: Option<&NSNumber>); #[method(publish)] pub unsafe fn publish(&self); #[method(unpublish)] pub unsafe fn unpublish(&self); - # [method_id (addSubscriberForFileURL : withPublishingHandler :)] + #[method_id(addSubscriberForFileURL:withPublishingHandler:)] pub unsafe fn addSubscriberForFileURL_withPublishingHandler( url: &NSURL, publishingHandler: NSProgressPublishingHandler, ) -> Id; - # [method (removeSubscriber :)] + #[method(removeSubscriber:)] pub unsafe fn removeSubscriber(subscriber: &Object); #[method(isOld)] pub unsafe fn isOld(&self) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 2e824dbd1..4cd221d0d 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -20,24 +20,24 @@ extern_class!( ); extern_methods!( unsafe impl NSPropertyListSerialization { - # [method (propertyList : isValidForFormat :)] + #[method(propertyList:isValidForFormat:)] pub unsafe fn propertyList_isValidForFormat( plist: &Object, format: NSPropertyListFormat, ) -> bool; - # [method_id (dataWithPropertyList : format : options : error :)] + #[method_id(dataWithPropertyList:format:options:error:)] pub unsafe fn dataWithPropertyList_format_options_error( plist: &Object, format: NSPropertyListFormat, opt: NSPropertyListWriteOptions, ) -> Result, Id>; - # [method_id (propertyListWithData : options : format : error :)] + #[method_id(propertyListWithData:options:format:error:)] pub unsafe fn propertyListWithData_options_format_error( data: &NSData, opt: NSPropertyListReadOptions, format: *mut NSPropertyListFormat, ) -> Result, Id>; - # [method_id (propertyListWithStream : options : format : error :)] + #[method_id(propertyListWithStream:options:format:error:)] pub unsafe fn propertyListWithStream_options_format_error( stream: &NSInputStream, opt: NSPropertyListReadOptions, diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index 90baa884e..06f91555e 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -22,12 +22,12 @@ extern_methods!( extern_methods!( #[doc = "NSProtocolCheckerCreation"] unsafe impl NSProtocolChecker { - # [method_id (protocolCheckerWithTarget : protocol :)] + #[method_id(protocolCheckerWithTarget:protocol:)] pub unsafe fn protocolCheckerWithTarget_protocol( anObject: &NSObject, aProtocol: &Protocol, ) -> Id; - # [method_id (initWithTarget : protocol :)] + #[method_id(initWithTarget:protocol:)] pub unsafe fn initWithTarget_protocol( &self, anObject: &NSObject, diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 87f665429..07cb9813d 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -16,13 +16,13 @@ extern_methods!( unsafe impl NSProxy { #[method_id(alloc)] pub unsafe fn alloc() -> Id; - # [method_id (allocWithZone :)] + #[method_id(allocWithZone:)] pub unsafe fn allocWithZone(zone: *mut NSZone) -> Id; #[method(class)] pub unsafe fn class() -> &Class; - # [method (forwardInvocation :)] + #[method(forwardInvocation:)] pub unsafe fn forwardInvocation(&self, invocation: &NSInvocation); - # [method_id (methodSignatureForSelector :)] + #[method_id(methodSignatureForSelector:)] pub unsafe fn methodSignatureForSelector( &self, sel: Sel, @@ -35,7 +35,7 @@ extern_methods!( pub unsafe fn description(&self) -> Id; #[method_id(debugDescription)] pub unsafe fn debugDescription(&self) -> Id; - # [method (respondsToSelector :)] + #[method(respondsToSelector:)] pub unsafe fn respondsToSelector(aSelector: Sel) -> bool; #[method(allowsWeakReference)] pub unsafe fn allowsWeakReference(&self) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index 8476d4ee6..4e41fc131 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -8,7 +8,7 @@ use objc2::{extern_class, extern_methods, ClassType}; extern_methods!( #[doc = "NSValueRangeExtensions"] unsafe impl NSValue { - # [method_id (valueWithRange :)] + #[method_id(valueWithRange:)] pub unsafe fn valueWithRange(range: NSRange) -> Id; #[method(rangeValue)] pub unsafe fn rangeValue(&self) -> NSRange; diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index ff8193d8a..dcdb93d65 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -15,12 +15,12 @@ extern_class!( ); extern_methods!( unsafe impl NSRegularExpression { - # [method_id (regularExpressionWithPattern : options : error :)] + #[method_id(regularExpressionWithPattern:options:error:)] pub unsafe fn regularExpressionWithPattern_options_error( pattern: &NSString, options: NSRegularExpressionOptions, ) -> Result, Id>; - # [method_id (initWithPattern : options : error :)] + #[method_id(initWithPattern:options:error:)] pub unsafe fn initWithPattern_options_error( &self, pattern: &NSString, @@ -32,14 +32,14 @@ extern_methods!( pub unsafe fn options(&self) -> NSRegularExpressionOptions; #[method(numberOfCaptureGroups)] pub unsafe fn numberOfCaptureGroups(&self) -> NSUInteger; - # [method_id (escapedPatternForString :)] + #[method_id(escapedPatternForString:)] pub unsafe fn escapedPatternForString(string: &NSString) -> Id; } ); extern_methods!( #[doc = "NSMatching"] unsafe impl NSRegularExpression { - # [method (enumerateMatchesInString : options : range : usingBlock :)] + #[method(enumerateMatchesInString:options:range:usingBlock:)] pub unsafe fn enumerateMatchesInString_options_range_usingBlock( &self, string: &NSString, @@ -47,28 +47,28 @@ extern_methods!( range: NSRange, block: TodoBlock, ); - # [method_id (matchesInString : options : range :)] + #[method_id(matchesInString:options:range:)] pub unsafe fn matchesInString_options_range( &self, string: &NSString, options: NSMatchingOptions, range: NSRange, ) -> Id, Shared>; - # [method (numberOfMatchesInString : options : range :)] + #[method(numberOfMatchesInString:options:range:)] pub unsafe fn numberOfMatchesInString_options_range( &self, string: &NSString, options: NSMatchingOptions, range: NSRange, ) -> NSUInteger; - # [method_id (firstMatchInString : options : range :)] + #[method_id(firstMatchInString:options:range:)] pub unsafe fn firstMatchInString_options_range( &self, string: &NSString, options: NSMatchingOptions, range: NSRange, ) -> Option>; - # [method (rangeOfFirstMatchInString : options : range :)] + #[method(rangeOfFirstMatchInString:options:range:)] pub unsafe fn rangeOfFirstMatchInString_options_range( &self, string: &NSString, @@ -80,7 +80,7 @@ extern_methods!( extern_methods!( #[doc = "NSReplacement"] unsafe impl NSRegularExpression { - # [method_id (stringByReplacingMatchesInString : options : range : withTemplate :)] + #[method_id(stringByReplacingMatchesInString:options:range:withTemplate:)] pub unsafe fn stringByReplacingMatchesInString_options_range_withTemplate( &self, string: &NSString, @@ -88,7 +88,7 @@ extern_methods!( range: NSRange, templ: &NSString, ) -> Id; - # [method (replaceMatchesInString : options : range : withTemplate :)] + #[method(replaceMatchesInString:options:range:withTemplate:)] pub unsafe fn replaceMatchesInString_options_range_withTemplate( &self, string: &NSMutableString, @@ -96,7 +96,7 @@ extern_methods!( range: NSRange, templ: &NSString, ) -> NSUInteger; - # [method_id (replacementStringForResult : inString : offset : template :)] + #[method_id(replacementStringForResult:inString:offset:template:)] pub unsafe fn replacementStringForResult_inString_offset_template( &self, result: &NSTextCheckingResult, @@ -104,7 +104,7 @@ extern_methods!( offset: NSInteger, templ: &NSString, ) -> Id; - # [method_id (escapedTemplateForString :)] + #[method_id(escapedTemplateForString:)] pub unsafe fn escapedTemplateForString(string: &NSString) -> Id; } ); @@ -117,11 +117,11 @@ extern_class!( ); extern_methods!( unsafe impl NSDataDetector { - # [method_id (dataDetectorWithTypes : error :)] + #[method_id(dataDetectorWithTypes:error:)] pub unsafe fn dataDetectorWithTypes_error( checkingTypes: NSTextCheckingTypes, ) -> Result, Id>; - # [method_id (initWithTypes : error :)] + #[method_id(initWithTypes:error:)] pub unsafe fn initWithTypes_error( &self, checkingTypes: NSTextCheckingTypes, diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index 151e08077..d93df7101 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -18,41 +18,41 @@ extern_methods!( unsafe impl NSRelativeDateTimeFormatter { #[method(dateTimeStyle)] pub unsafe fn dateTimeStyle(&self) -> NSRelativeDateTimeFormatterStyle; - # [method (setDateTimeStyle :)] + #[method(setDateTimeStyle:)] pub unsafe fn setDateTimeStyle(&self, dateTimeStyle: NSRelativeDateTimeFormatterStyle); #[method(unitsStyle)] pub unsafe fn unitsStyle(&self) -> NSRelativeDateTimeFormatterUnitsStyle; - # [method (setUnitsStyle :)] + #[method(setUnitsStyle:)] pub unsafe fn setUnitsStyle(&self, unitsStyle: NSRelativeDateTimeFormatterUnitsStyle); #[method(formattingContext)] pub unsafe fn formattingContext(&self) -> NSFormattingContext; - # [method (setFormattingContext :)] + #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); #[method_id(calendar)] pub unsafe fn calendar(&self) -> Id; - # [method (setCalendar :)] + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); #[method_id(locale)] pub unsafe fn locale(&self) -> Id; - # [method (setLocale :)] + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); - # [method_id (localizedStringFromDateComponents :)] + #[method_id(localizedStringFromDateComponents:)] pub unsafe fn localizedStringFromDateComponents( &self, dateComponents: &NSDateComponents, ) -> Id; - # [method_id (localizedStringFromTimeInterval :)] + #[method_id(localizedStringFromTimeInterval:)] pub unsafe fn localizedStringFromTimeInterval( &self, timeInterval: NSTimeInterval, ) -> Id; - # [method_id (localizedStringForDate : relativeToDate :)] + #[method_id(localizedStringForDate:relativeToDate:)] pub unsafe fn localizedStringForDate_relativeToDate( &self, date: &NSDate, referenceDate: &NSDate, ) -> Id; - # [method_id (stringForObjectValue :)] + #[method_id(stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index e0576618f..962ddbc3b 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -26,15 +26,15 @@ extern_methods!( pub unsafe fn currentMode(&self) -> Option>; #[method(getCFRunLoop)] pub unsafe fn getCFRunLoop(&self) -> CFRunLoopRef; - # [method (addTimer : forMode :)] + #[method(addTimer:forMode:)] pub unsafe fn addTimer_forMode(&self, timer: &NSTimer, mode: &NSRunLoopMode); - # [method (addPort : forMode :)] + #[method(addPort:forMode:)] pub unsafe fn addPort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode); - # [method (removePort : forMode :)] + #[method(removePort:forMode:)] pub unsafe fn removePort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode); - # [method_id (limitDateForMode :)] + #[method_id(limitDateForMode:)] pub unsafe fn limitDateForMode(&self, mode: &NSRunLoopMode) -> Option>; - # [method (acceptInputForMode : beforeDate :)] + #[method(acceptInputForMode:beforeDate:)] pub unsafe fn acceptInputForMode_beforeDate( &self, mode: &NSRunLoopMode, @@ -47,22 +47,22 @@ extern_methods!( unsafe impl NSRunLoop { #[method(run)] pub unsafe fn run(&self); - # [method (runUntilDate :)] + #[method(runUntilDate:)] pub unsafe fn runUntilDate(&self, limitDate: &NSDate); - # [method (runMode : beforeDate :)] + #[method(runMode:beforeDate:)] pub unsafe fn runMode_beforeDate(&self, mode: &NSRunLoopMode, limitDate: &NSDate) -> bool; #[method(configureAsServer)] pub unsafe fn configureAsServer(&self); - # [method (performInModes : block :)] + #[method(performInModes:block:)] pub unsafe fn performInModes_block(&self, modes: &NSArray, block: TodoBlock); - # [method (performBlock :)] + #[method(performBlock:)] pub unsafe fn performBlock(&self, block: TodoBlock); } ); extern_methods!( #[doc = "NSDelayedPerforming"] unsafe impl NSObject { - # [method (performSelector : withObject : afterDelay : inModes :)] + #[method(performSelector:withObject:afterDelay:inModes:)] pub unsafe fn performSelector_withObject_afterDelay_inModes( &self, aSelector: Sel, @@ -70,27 +70,27 @@ extern_methods!( delay: NSTimeInterval, modes: &NSArray, ); - # [method (performSelector : withObject : afterDelay :)] + #[method(performSelector:withObject:afterDelay:)] pub unsafe fn performSelector_withObject_afterDelay( &self, aSelector: Sel, anArgument: Option<&Object>, delay: NSTimeInterval, ); - # [method (cancelPreviousPerformRequestsWithTarget : selector : object :)] + #[method(cancelPreviousPerformRequestsWithTarget:selector:object:)] pub unsafe fn cancelPreviousPerformRequestsWithTarget_selector_object( aTarget: &Object, aSelector: Sel, anArgument: Option<&Object>, ); - # [method (cancelPreviousPerformRequestsWithTarget :)] + #[method(cancelPreviousPerformRequestsWithTarget:)] pub unsafe fn cancelPreviousPerformRequestsWithTarget(aTarget: &Object); } ); extern_methods!( #[doc = "NSOrderedPerform"] unsafe impl NSRunLoop { - # [method (performSelector : target : argument : order : modes :)] + #[method(performSelector:target:argument:order:modes:)] pub unsafe fn performSelector_target_argument_order_modes( &self, aSelector: Sel, @@ -99,14 +99,14 @@ extern_methods!( order: NSUInteger, modes: &NSArray, ); - # [method (cancelPerformSelector : target : argument :)] + #[method(cancelPerformSelector:target:argument:)] pub unsafe fn cancelPerformSelector_target_argument( &self, aSelector: Sel, target: &Object, arg: Option<&Object>, ); - # [method (cancelPerformSelectorsWithTarget :)] + #[method(cancelPerformSelectorsWithTarget:)] pub unsafe fn cancelPerformSelectorsWithTarget(&self, target: &Object); } ); diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 366ecbd92..e11304c11 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -19,69 +19,69 @@ extern_methods!( pub unsafe fn string(&self) -> Id; #[method(scanLocation)] pub unsafe fn scanLocation(&self) -> NSUInteger; - # [method (setScanLocation :)] + #[method(setScanLocation:)] pub unsafe fn setScanLocation(&self, scanLocation: NSUInteger); #[method_id(charactersToBeSkipped)] pub unsafe fn charactersToBeSkipped(&self) -> Option>; - # [method (setCharactersToBeSkipped :)] + #[method(setCharactersToBeSkipped:)] pub unsafe fn setCharactersToBeSkipped( &self, charactersToBeSkipped: Option<&NSCharacterSet>, ); #[method(caseSensitive)] pub unsafe fn caseSensitive(&self) -> bool; - # [method (setCaseSensitive :)] + #[method(setCaseSensitive:)] pub unsafe fn setCaseSensitive(&self, caseSensitive: bool); #[method_id(locale)] pub unsafe fn locale(&self) -> Option>; - # [method (setLocale :)] + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&Object>); - # [method_id (initWithString :)] + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, string: &NSString) -> Id; } ); extern_methods!( #[doc = "NSExtendedScanner"] unsafe impl NSScanner { - # [method (scanInt :)] + #[method(scanInt:)] pub unsafe fn scanInt(&self, result: *mut c_int) -> bool; - # [method (scanInteger :)] + #[method(scanInteger:)] pub unsafe fn scanInteger(&self, result: *mut NSInteger) -> bool; - # [method (scanLongLong :)] + #[method(scanLongLong:)] pub unsafe fn scanLongLong(&self, result: *mut c_longlong) -> bool; - # [method (scanUnsignedLongLong :)] + #[method(scanUnsignedLongLong:)] pub unsafe fn scanUnsignedLongLong(&self, result: *mut c_ulonglong) -> bool; - # [method (scanFloat :)] + #[method(scanFloat:)] pub unsafe fn scanFloat(&self, result: *mut c_float) -> bool; - # [method (scanDouble :)] + #[method(scanDouble:)] pub unsafe fn scanDouble(&self, result: *mut c_double) -> bool; - # [method (scanHexInt :)] + #[method(scanHexInt:)] pub unsafe fn scanHexInt(&self, result: *mut c_uint) -> bool; - # [method (scanHexLongLong :)] + #[method(scanHexLongLong:)] pub unsafe fn scanHexLongLong(&self, result: *mut c_ulonglong) -> bool; - # [method (scanHexFloat :)] + #[method(scanHexFloat:)] pub unsafe fn scanHexFloat(&self, result: *mut c_float) -> bool; - # [method (scanHexDouble :)] + #[method(scanHexDouble:)] pub unsafe fn scanHexDouble(&self, result: *mut c_double) -> bool; - # [method (scanString : intoString :)] + #[method(scanString:intoString:)] pub unsafe fn scanString_intoString( &self, string: &NSString, result: Option<&mut Option>>, ) -> bool; - # [method (scanCharactersFromSet : intoString :)] + #[method(scanCharactersFromSet:intoString:)] pub unsafe fn scanCharactersFromSet_intoString( &self, set: &NSCharacterSet, result: Option<&mut Option>>, ) -> bool; - # [method (scanUpToString : intoString :)] + #[method(scanUpToString:intoString:)] pub unsafe fn scanUpToString_intoString( &self, string: &NSString, result: Option<&mut Option>>, ) -> bool; - # [method (scanUpToCharactersFromSet : intoString :)] + #[method(scanUpToCharactersFromSet:intoString:)] pub unsafe fn scanUpToCharactersFromSet_intoString( &self, set: &NSCharacterSet, @@ -89,9 +89,9 @@ extern_methods!( ) -> bool; #[method(isAtEnd)] pub unsafe fn isAtEnd(&self) -> bool; - # [method_id (scannerWithString :)] + #[method_id(scannerWithString:)] pub unsafe fn scannerWithString(string: &NSString) -> Id; - # [method_id (localizedScannerWithString :)] + #[method_id(localizedScannerWithString:)] pub unsafe fn localizedScannerWithString(string: &NSString) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index 4b10d8a41..5899ae713 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -13,11 +13,11 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptClassDescription { - # [method_id (classDescriptionForClass :)] + #[method_id(classDescriptionForClass:)] pub unsafe fn classDescriptionForClass( aClass: &Class, ) -> Option>; - # [method_id (initWithSuiteName : className : dictionary :)] + #[method_id(initWithSuiteName:className:dictionary:)] pub unsafe fn initWithSuiteName_className_dictionary( &self, suiteName: &NSString, @@ -34,53 +34,53 @@ extern_methods!( pub unsafe fn superclassDescription(&self) -> Option>; #[method(appleEventCode)] pub unsafe fn appleEventCode(&self) -> FourCharCode; - # [method (matchesAppleEventCode :)] + #[method(matchesAppleEventCode:)] pub unsafe fn matchesAppleEventCode(&self, appleEventCode: FourCharCode) -> bool; - # [method (supportsCommand :)] + #[method(supportsCommand:)] pub unsafe fn supportsCommand( &self, commandDescription: &NSScriptCommandDescription, ) -> bool; - # [method (selectorForCommand :)] + #[method(selectorForCommand:)] pub unsafe fn selectorForCommand( &self, commandDescription: &NSScriptCommandDescription, ) -> Option; - # [method_id (typeForKey :)] + #[method_id(typeForKey:)] pub unsafe fn typeForKey(&self, key: &NSString) -> Option>; - # [method_id (classDescriptionForKey :)] + #[method_id(classDescriptionForKey:)] pub unsafe fn classDescriptionForKey( &self, key: &NSString, ) -> Option>; - # [method (appleEventCodeForKey :)] + #[method(appleEventCodeForKey:)] pub unsafe fn appleEventCodeForKey(&self, key: &NSString) -> FourCharCode; - # [method_id (keyWithAppleEventCode :)] + #[method_id(keyWithAppleEventCode:)] pub unsafe fn keyWithAppleEventCode( &self, appleEventCode: FourCharCode, ) -> Option>; #[method_id(defaultSubcontainerAttributeKey)] pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option>; - # [method (isLocationRequiredToCreateForKey :)] + #[method(isLocationRequiredToCreateForKey:)] pub unsafe fn isLocationRequiredToCreateForKey( &self, toManyRelationshipKey: &NSString, ) -> bool; - # [method (hasPropertyForKey :)] + #[method(hasPropertyForKey:)] pub unsafe fn hasPropertyForKey(&self, key: &NSString) -> bool; - # [method (hasOrderedToManyRelationshipForKey :)] + #[method(hasOrderedToManyRelationshipForKey:)] pub unsafe fn hasOrderedToManyRelationshipForKey(&self, key: &NSString) -> bool; - # [method (hasReadablePropertyForKey :)] + #[method(hasReadablePropertyForKey:)] pub unsafe fn hasReadablePropertyForKey(&self, key: &NSString) -> bool; - # [method (hasWritablePropertyForKey :)] + #[method(hasWritablePropertyForKey:)] pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSScriptClassDescription { - # [method (isReadOnlyKey :)] + #[method(isReadOnlyKey:)] pub unsafe fn isReadOnlyKey(&self, key: &NSString) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs index f3f76a81c..f0c7734c4 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -14,13 +14,13 @@ extern_methods!( unsafe impl NSScriptCoercionHandler { #[method_id(sharedCoercionHandler)] pub unsafe fn sharedCoercionHandler() -> Id; - # [method_id (coerceValue : toClass :)] + #[method_id(coerceValue:toClass:)] pub unsafe fn coerceValue_toClass( &self, value: &Object, toClass: &Class, ) -> Option>; - # [method (registerCoercer : selector : toConvertFromClass : toClass :)] + #[method(registerCoercer:selector:toConvertFromClass:toClass:)] pub unsafe fn registerCoercer_selector_toConvertFromClass_toClass( &self, coercer: &Object, diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index aa7e61a64..b7b69e48f 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -18,22 +18,22 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptCommand { - # [method_id (initWithCommandDescription :)] + #[method_id(initWithCommandDescription:)] pub unsafe fn initWithCommandDescription( &self, commandDef: &NSScriptCommandDescription, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; #[method_id(commandDescription)] pub unsafe fn commandDescription(&self) -> Id; #[method_id(directParameter)] pub unsafe fn directParameter(&self) -> Option>; - # [method (setDirectParameter :)] + #[method(setDirectParameter:)] pub unsafe fn setDirectParameter(&self, directParameter: Option<&Object>); #[method_id(receiversSpecifier)] pub unsafe fn receiversSpecifier(&self) -> Option>; - # [method (setReceiversSpecifier :)] + #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier( &self, receiversSpecifier: Option<&NSScriptObjectSpecifier>, @@ -42,7 +42,7 @@ extern_methods!( pub unsafe fn evaluatedReceivers(&self) -> Option>; #[method_id(arguments)] pub unsafe fn arguments(&self) -> Option, Shared>>; - # [method (setArguments :)] + #[method(setArguments:)] pub unsafe fn setArguments(&self, arguments: Option<&NSDictionary>); #[method_id(evaluatedArguments)] pub unsafe fn evaluatedArguments( @@ -56,13 +56,13 @@ extern_methods!( pub unsafe fn executeCommand(&self) -> Option>; #[method(scriptErrorNumber)] pub unsafe fn scriptErrorNumber(&self) -> NSInteger; - # [method (setScriptErrorNumber :)] + #[method(setScriptErrorNumber:)] pub unsafe fn setScriptErrorNumber(&self, scriptErrorNumber: NSInteger); #[method_id(scriptErrorOffendingObjectDescriptor)] pub unsafe fn scriptErrorOffendingObjectDescriptor( &self, ) -> Option>; - # [method (setScriptErrorOffendingObjectDescriptor :)] + #[method(setScriptErrorOffendingObjectDescriptor:)] pub unsafe fn setScriptErrorOffendingObjectDescriptor( &self, scriptErrorOffendingObjectDescriptor: Option<&NSAppleEventDescriptor>, @@ -71,14 +71,14 @@ extern_methods!( pub unsafe fn scriptErrorExpectedTypeDescriptor( &self, ) -> Option>; - # [method (setScriptErrorExpectedTypeDescriptor :)] + #[method(setScriptErrorExpectedTypeDescriptor:)] pub unsafe fn setScriptErrorExpectedTypeDescriptor( &self, scriptErrorExpectedTypeDescriptor: Option<&NSAppleEventDescriptor>, ); #[method_id(scriptErrorString)] pub unsafe fn scriptErrorString(&self) -> Option>; - # [method (setScriptErrorString :)] + #[method(setScriptErrorString:)] pub unsafe fn setScriptErrorString(&self, scriptErrorString: Option<&NSString>); #[method_id(currentCommand)] pub unsafe fn currentCommand() -> Option>; @@ -86,7 +86,7 @@ extern_methods!( pub unsafe fn appleEvent(&self) -> Option>; #[method(suspendExecution)] pub unsafe fn suspendExecution(&self); - # [method (resumeExecutionWithResult :)] + #[method(resumeExecutionWithResult:)] pub unsafe fn resumeExecutionWithResult(&self, result: Option<&Object>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index 4bbbce1f5..5eedac73a 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -18,14 +18,14 @@ extern_methods!( unsafe impl NSScriptCommandDescription { #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithSuiteName : commandName : dictionary :)] + #[method_id(initWithSuiteName:commandName:dictionary:)] pub unsafe fn initWithSuiteName_commandName_dictionary( &self, suiteName: &NSString, commandName: &NSString, commandDeclaration: Option<&NSDictionary>, ) -> Option>; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; #[method_id(suiteName)] pub unsafe fn suiteName(&self) -> Id; @@ -43,21 +43,21 @@ extern_methods!( pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode; #[method_id(argumentNames)] pub unsafe fn argumentNames(&self) -> Id, Shared>; - # [method_id (typeForArgumentWithName :)] + #[method_id(typeForArgumentWithName:)] pub unsafe fn typeForArgumentWithName( &self, argumentName: &NSString, ) -> Option>; - # [method (appleEventCodeForArgumentWithName :)] + #[method(appleEventCodeForArgumentWithName:)] pub unsafe fn appleEventCodeForArgumentWithName( &self, argumentName: &NSString, ) -> FourCharCode; - # [method (isOptionalArgumentWithName :)] + #[method(isOptionalArgumentWithName:)] pub unsafe fn isOptionalArgumentWithName(&self, argumentName: &NSString) -> bool; #[method_id(createCommandInstance)] pub unsafe fn createCommandInstance(&self) -> Id; - # [method_id (createCommandInstanceWithZone :)] + #[method_id(createCommandInstanceWithZone:)] pub unsafe fn createCommandInstanceWithZone( &self, zone: *mut NSZone, diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index aea8a81a3..951d89e27 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -17,15 +17,15 @@ extern_methods!( pub unsafe fn sharedScriptExecutionContext() -> Id; #[method_id(topLevelObject)] pub unsafe fn topLevelObject(&self) -> Option>; - # [method (setTopLevelObject :)] + #[method(setTopLevelObject:)] pub unsafe fn setTopLevelObject(&self, topLevelObject: Option<&Object>); #[method_id(objectBeingTested)] pub unsafe fn objectBeingTested(&self) -> Option>; - # [method (setObjectBeingTested :)] + #[method(setObjectBeingTested:)] pub unsafe fn setObjectBeingTested(&self, objectBeingTested: Option<&Object>); #[method_id(rangeContainerObject)] pub unsafe fn rangeContainerObject(&self) -> Option>; - # [method (setRangeContainerObject :)] + #[method(setRangeContainerObject:)] pub unsafe fn setRangeContainerObject(&self, rangeContainerObject: Option<&Object>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index 85ab9427d..204ec4857 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -7,47 +7,47 @@ use objc2::{extern_class, extern_methods, ClassType}; extern_methods!( #[doc = "NSScriptKeyValueCoding"] unsafe impl NSObject { - # [method_id (valueAtIndex : inPropertyWithKey :)] + #[method_id(valueAtIndex:inPropertyWithKey:)] pub unsafe fn valueAtIndex_inPropertyWithKey( &self, index: NSUInteger, key: &NSString, ) -> Option>; - # [method_id (valueWithName : inPropertyWithKey :)] + #[method_id(valueWithName:inPropertyWithKey:)] pub unsafe fn valueWithName_inPropertyWithKey( &self, name: &NSString, key: &NSString, ) -> Option>; - # [method_id (valueWithUniqueID : inPropertyWithKey :)] + #[method_id(valueWithUniqueID:inPropertyWithKey:)] pub unsafe fn valueWithUniqueID_inPropertyWithKey( &self, uniqueID: &Object, key: &NSString, ) -> Option>; - # [method (insertValue : atIndex : inPropertyWithKey :)] + #[method(insertValue:atIndex:inPropertyWithKey:)] pub unsafe fn insertValue_atIndex_inPropertyWithKey( &self, value: &Object, index: NSUInteger, key: &NSString, ); - # [method (removeValueAtIndex : fromPropertyWithKey :)] + #[method(removeValueAtIndex:fromPropertyWithKey:)] pub unsafe fn removeValueAtIndex_fromPropertyWithKey( &self, index: NSUInteger, key: &NSString, ); - # [method (replaceValueAtIndex : inPropertyWithKey : withValue :)] + #[method(replaceValueAtIndex:inPropertyWithKey:withValue:)] pub unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue( &self, index: NSUInteger, key: &NSString, value: &Object, ); - # [method (insertValue : inPropertyWithKey :)] + #[method(insertValue:inPropertyWithKey:)] pub unsafe fn insertValue_inPropertyWithKey(&self, value: &Object, key: &NSString); - # [method_id (coerceValue : forKey :)] + #[method_id(coerceValue:forKey:)] pub unsafe fn coerceValue_forKey( &self, value: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index 5429540e1..265b756a2 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -18,69 +18,69 @@ extern_class!( ); extern_methods!( unsafe impl NSScriptObjectSpecifier { - # [method_id (objectSpecifierWithDescriptor :)] + #[method_id(objectSpecifierWithDescriptor:)] pub unsafe fn objectSpecifierWithDescriptor( descriptor: &NSAppleEventDescriptor, ) -> Option>; - # [method_id (initWithContainerSpecifier : key :)] + #[method_id(initWithContainerSpecifier:key:)] pub unsafe fn initWithContainerSpecifier_key( &self, container: &NSScriptObjectSpecifier, property: &NSString, ) -> Id; - # [method_id (initWithContainerClassDescription : containerSpecifier : key :)] + #[method_id(initWithContainerClassDescription:containerSpecifier:key:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key( &self, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; #[method_id(childSpecifier)] pub unsafe fn childSpecifier(&self) -> Option>; - # [method (setChildSpecifier :)] + #[method(setChildSpecifier:)] pub unsafe fn setChildSpecifier(&self, childSpecifier: Option<&NSScriptObjectSpecifier>); #[method_id(containerSpecifier)] pub unsafe fn containerSpecifier(&self) -> Option>; - # [method (setContainerSpecifier :)] + #[method(setContainerSpecifier:)] pub unsafe fn setContainerSpecifier( &self, containerSpecifier: Option<&NSScriptObjectSpecifier>, ); #[method(containerIsObjectBeingTested)] pub unsafe fn containerIsObjectBeingTested(&self) -> bool; - # [method (setContainerIsObjectBeingTested :)] + #[method(setContainerIsObjectBeingTested:)] pub unsafe fn setContainerIsObjectBeingTested(&self, containerIsObjectBeingTested: bool); #[method(containerIsRangeContainerObject)] pub unsafe fn containerIsRangeContainerObject(&self) -> bool; - # [method (setContainerIsRangeContainerObject :)] + #[method(setContainerIsRangeContainerObject:)] pub unsafe fn setContainerIsRangeContainerObject( &self, containerIsRangeContainerObject: bool, ); #[method_id(key)] pub unsafe fn key(&self) -> Id; - # [method (setKey :)] + #[method(setKey:)] pub unsafe fn setKey(&self, key: &NSString); #[method_id(containerClassDescription)] pub unsafe fn containerClassDescription( &self, ) -> Option>; - # [method (setContainerClassDescription :)] + #[method(setContainerClassDescription:)] pub unsafe fn setContainerClassDescription( &self, containerClassDescription: Option<&NSScriptClassDescription>, ); #[method_id(keyClassDescription)] pub unsafe fn keyClassDescription(&self) -> Option>; - # [method (indicesOfObjectsByEvaluatingWithContainer : count :)] + #[method(indicesOfObjectsByEvaluatingWithContainer:count:)] pub unsafe fn indicesOfObjectsByEvaluatingWithContainer_count( &self, container: &Object, count: NonNull, ) -> *mut NSInteger; - # [method_id (objectsByEvaluatingWithContainers :)] + #[method_id(objectsByEvaluatingWithContainers:)] pub unsafe fn objectsByEvaluatingWithContainers( &self, containers: &Object, @@ -89,7 +89,7 @@ extern_methods!( pub unsafe fn objectsByEvaluatingSpecifier(&self) -> Option>; #[method(evaluationErrorNumber)] pub unsafe fn evaluationErrorNumber(&self) -> NSInteger; - # [method (setEvaluationErrorNumber :)] + #[method(setEvaluationErrorNumber:)] pub unsafe fn setEvaluationErrorNumber(&self, evaluationErrorNumber: NSInteger); #[method_id(evaluationErrorSpecifier)] pub unsafe fn evaluationErrorSpecifier( @@ -104,7 +104,7 @@ extern_methods!( unsafe impl NSObject { #[method_id(objectSpecifier)] pub unsafe fn objectSpecifier(&self) -> Option>; - # [method_id (indicesOfObjectsByEvaluatingObjectSpecifier :)] + #[method_id(indicesOfObjectsByEvaluatingObjectSpecifier:)] pub unsafe fn indicesOfObjectsByEvaluatingObjectSpecifier( &self, specifier: &NSScriptObjectSpecifier, @@ -120,7 +120,7 @@ extern_class!( ); extern_methods!( unsafe impl NSIndexSpecifier { - # [method_id (initWithContainerClassDescription : containerSpecifier : key : index :)] + #[method_id(initWithContainerClassDescription:containerSpecifier:key:index:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_index( &self, classDesc: &NSScriptClassDescription, @@ -130,7 +130,7 @@ extern_methods!( ) -> Id; #[method(index)] pub unsafe fn index(&self) -> NSInteger; - # [method (setIndex :)] + #[method(setIndex:)] pub unsafe fn setIndex(&self, index: NSInteger); } ); @@ -153,9 +153,9 @@ extern_class!( ); extern_methods!( unsafe impl NSNameSpecifier { - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; - # [method_id (initWithContainerClassDescription : containerSpecifier : key : name :)] + #[method_id(initWithContainerClassDescription:containerSpecifier:key:name:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_name( &self, classDesc: &NSScriptClassDescription, @@ -165,7 +165,7 @@ extern_methods!( ) -> Id; #[method_id(name)] pub unsafe fn name(&self) -> Id; - # [method (setName :)] + #[method(setName:)] pub unsafe fn setName(&self, name: &NSString); } ); @@ -178,7 +178,7 @@ extern_class!( ); extern_methods!( unsafe impl NSPositionalSpecifier { - # [method_id (initWithPosition : objectSpecifier :)] + #[method_id(initWithPosition:objectSpecifier:)] pub unsafe fn initWithPosition_objectSpecifier( &self, position: NSInsertionPosition, @@ -188,7 +188,7 @@ extern_methods!( pub unsafe fn position(&self) -> NSInsertionPosition; #[method_id(objectSpecifier)] pub unsafe fn objectSpecifier(&self) -> Id; - # [method (setInsertionClassDescription :)] + #[method(setInsertionClassDescription:)] pub unsafe fn setInsertionClassDescription( &self, classDescription: &NSScriptClassDescription, @@ -234,9 +234,9 @@ extern_class!( ); extern_methods!( unsafe impl NSRangeSpecifier { - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; - # [method_id (initWithContainerClassDescription : containerSpecifier : key : startSpecifier : endSpecifier :)] + #[method_id(initWithContainerClassDescription:containerSpecifier:key:startSpecifier:endSpecifier:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_startSpecifier_endSpecifier( &self, classDesc: &NSScriptClassDescription, @@ -247,11 +247,11 @@ extern_methods!( ) -> Id; #[method_id(startSpecifier)] pub unsafe fn startSpecifier(&self) -> Option>; - # [method (setStartSpecifier :)] + #[method(setStartSpecifier:)] pub unsafe fn setStartSpecifier(&self, startSpecifier: Option<&NSScriptObjectSpecifier>); #[method_id(endSpecifier)] pub unsafe fn endSpecifier(&self) -> Option>; - # [method (setEndSpecifier :)] + #[method(setEndSpecifier:)] pub unsafe fn setEndSpecifier(&self, endSpecifier: Option<&NSScriptObjectSpecifier>); } ); @@ -264,9 +264,9 @@ extern_class!( ); extern_methods!( unsafe impl NSRelativeSpecifier { - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; - # [method_id (initWithContainerClassDescription : containerSpecifier : key : relativePosition : baseSpecifier :)] + #[method_id(initWithContainerClassDescription:containerSpecifier:key:relativePosition:baseSpecifier:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_relativePosition_baseSpecifier( &self, classDesc: &NSScriptClassDescription, @@ -277,11 +277,11 @@ extern_methods!( ) -> Id; #[method(relativePosition)] pub unsafe fn relativePosition(&self) -> NSRelativePosition; - # [method (setRelativePosition :)] + #[method(setRelativePosition:)] pub unsafe fn setRelativePosition(&self, relativePosition: NSRelativePosition); #[method_id(baseSpecifier)] pub unsafe fn baseSpecifier(&self) -> Option>; - # [method (setBaseSpecifier :)] + #[method(setBaseSpecifier:)] pub unsafe fn setBaseSpecifier(&self, baseSpecifier: Option<&NSScriptObjectSpecifier>); } ); @@ -294,9 +294,9 @@ extern_class!( ); extern_methods!( unsafe impl NSUniqueIDSpecifier { - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; - # [method_id (initWithContainerClassDescription : containerSpecifier : key : uniqueID :)] + #[method_id(initWithContainerClassDescription:containerSpecifier:key:uniqueID:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_uniqueID( &self, classDesc: &NSScriptClassDescription, @@ -306,7 +306,7 @@ extern_methods!( ) -> Id; #[method_id(uniqueID)] pub unsafe fn uniqueID(&self) -> Id; - # [method (setUniqueID :)] + #[method(setUniqueID:)] pub unsafe fn setUniqueID(&self, uniqueID: &Object); } ); @@ -319,9 +319,9 @@ extern_class!( ); extern_methods!( unsafe impl NSWhoseSpecifier { - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; - # [method_id (initWithContainerClassDescription : containerSpecifier : key : test :)] + #[method_id(initWithContainerClassDescription:containerSpecifier:key:test:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_test( &self, classDesc: &NSScriptClassDescription, @@ -331,29 +331,29 @@ extern_methods!( ) -> Id; #[method_id(test)] pub unsafe fn test(&self) -> Id; - # [method (setTest :)] + #[method(setTest:)] pub unsafe fn setTest(&self, test: &NSScriptWhoseTest); #[method(startSubelementIdentifier)] pub unsafe fn startSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier; - # [method (setStartSubelementIdentifier :)] + #[method(setStartSubelementIdentifier:)] pub unsafe fn setStartSubelementIdentifier( &self, startSubelementIdentifier: NSWhoseSubelementIdentifier, ); #[method(startSubelementIndex)] pub unsafe fn startSubelementIndex(&self) -> NSInteger; - # [method (setStartSubelementIndex :)] + #[method(setStartSubelementIndex:)] pub unsafe fn setStartSubelementIndex(&self, startSubelementIndex: NSInteger); #[method(endSubelementIdentifier)] pub unsafe fn endSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier; - # [method (setEndSubelementIdentifier :)] + #[method(setEndSubelementIdentifier:)] pub unsafe fn setEndSubelementIdentifier( &self, endSubelementIdentifier: NSWhoseSubelementIdentifier, ); #[method(endSubelementIndex)] pub unsafe fn endSubelementIndex(&self) -> NSInteger; - # [method (setEndSubelementIndex :)] + #[method(setEndSubelementIndex:)] pub unsafe fn setEndSubelementIndex(&self, endSubelementIndex: NSInteger); } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index f2af3ca09..4e6951aa9 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -16,7 +16,7 @@ extern_class!( ); extern_methods!( unsafe impl NSCloneCommand { - # [method (setReceiversSpecifier :)] + #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); #[method_id(keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; @@ -69,7 +69,7 @@ extern_class!( ); extern_methods!( unsafe impl NSDeleteCommand { - # [method (setReceiversSpecifier :)] + #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); #[method_id(keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; @@ -104,7 +104,7 @@ extern_class!( ); extern_methods!( unsafe impl NSMoveCommand { - # [method (setReceiversSpecifier :)] + #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); #[method_id(keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; @@ -132,7 +132,7 @@ extern_class!( ); extern_methods!( unsafe impl NSSetCommand { - # [method (setReceiversSpecifier :)] + #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); #[method_id(keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 4185e790d..3a2bcbc61 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -23,56 +23,56 @@ extern_methods!( unsafe impl NSScriptSuiteRegistry { #[method_id(sharedScriptSuiteRegistry)] pub unsafe fn sharedScriptSuiteRegistry() -> Id; - # [method (setSharedScriptSuiteRegistry :)] + #[method(setSharedScriptSuiteRegistry:)] pub unsafe fn setSharedScriptSuiteRegistry(registry: &NSScriptSuiteRegistry); - # [method (loadSuitesFromBundle :)] + #[method(loadSuitesFromBundle:)] pub unsafe fn loadSuitesFromBundle(&self, bundle: &NSBundle); - # [method (loadSuiteWithDictionary : fromBundle :)] + #[method(loadSuiteWithDictionary:fromBundle:)] pub unsafe fn loadSuiteWithDictionary_fromBundle( &self, suiteDeclaration: &NSDictionary, bundle: &NSBundle, ); - # [method (registerClassDescription :)] + #[method(registerClassDescription:)] pub unsafe fn registerClassDescription(&self, classDescription: &NSScriptClassDescription); - # [method (registerCommandDescription :)] + #[method(registerCommandDescription:)] pub unsafe fn registerCommandDescription( &self, commandDescription: &NSScriptCommandDescription, ); #[method_id(suiteNames)] pub unsafe fn suiteNames(&self) -> Id, Shared>; - # [method (appleEventCodeForSuite :)] + #[method(appleEventCodeForSuite:)] pub unsafe fn appleEventCodeForSuite(&self, suiteName: &NSString) -> FourCharCode; - # [method_id (bundleForSuite :)] + #[method_id(bundleForSuite:)] pub unsafe fn bundleForSuite(&self, suiteName: &NSString) -> Option>; - # [method_id (classDescriptionsInSuite :)] + #[method_id(classDescriptionsInSuite:)] pub unsafe fn classDescriptionsInSuite( &self, suiteName: &NSString, ) -> Option, Shared>>; - # [method_id (commandDescriptionsInSuite :)] + #[method_id(commandDescriptionsInSuite:)] pub unsafe fn commandDescriptionsInSuite( &self, suiteName: &NSString, ) -> Option, Shared>>; - # [method_id (suiteForAppleEventCode :)] + #[method_id(suiteForAppleEventCode:)] pub unsafe fn suiteForAppleEventCode( &self, appleEventCode: FourCharCode, ) -> Option>; - # [method_id (classDescriptionWithAppleEventCode :)] + #[method_id(classDescriptionWithAppleEventCode:)] pub unsafe fn classDescriptionWithAppleEventCode( &self, appleEventCode: FourCharCode, ) -> Option>; - # [method_id (commandDescriptionWithAppleEventClass : andAppleEventCode :)] + #[method_id(commandDescriptionWithAppleEventClass:andAppleEventCode:)] pub unsafe fn commandDescriptionWithAppleEventClass_andAppleEventCode( &self, appleEventClassCode: FourCharCode, appleEventIDCode: FourCharCode, ) -> Option>; - # [method_id (aeteResource :)] + #[method_id(aeteResource:)] pub unsafe fn aeteResource(&self, languageName: &NSString) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index fe3a58358..6e44fba35 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -19,7 +19,7 @@ extern_methods!( pub unsafe fn isTrue(&self) -> bool; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; } ); @@ -32,17 +32,17 @@ extern_class!( ); extern_methods!( unsafe impl NSLogicalTest { - # [method_id (initAndTestWithTests :)] + #[method_id(initAndTestWithTests:)] pub unsafe fn initAndTestWithTests( &self, subTests: &NSArray, ) -> Id; - # [method_id (initOrTestWithTests :)] + #[method_id(initOrTestWithTests:)] pub unsafe fn initOrTestWithTests( &self, subTests: &NSArray, ) -> Id; - # [method_id (initNotTestWithTest :)] + #[method_id(initNotTestWithTest:)] pub unsafe fn initNotTestWithTest(&self, subTest: &NSScriptWhoseTest) -> Id; } ); @@ -57,9 +57,9 @@ extern_methods!( unsafe impl NSSpecifierTest { #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; - # [method_id (initWithObjectSpecifier : comparisonOperator : testObject :)] + #[method_id(initWithObjectSpecifier:comparisonOperator:testObject:)] pub unsafe fn initWithObjectSpecifier_comparisonOperator_testObject( &self, obj1: Option<&NSScriptObjectSpecifier>, @@ -71,44 +71,44 @@ extern_methods!( extern_methods!( #[doc = "NSComparisonMethods"] unsafe impl NSObject { - # [method (isEqualTo :)] + #[method(isEqualTo:)] pub unsafe fn isEqualTo(&self, object: Option<&Object>) -> bool; - # [method (isLessThanOrEqualTo :)] + #[method(isLessThanOrEqualTo:)] pub unsafe fn isLessThanOrEqualTo(&self, object: Option<&Object>) -> bool; - # [method (isLessThan :)] + #[method(isLessThan:)] pub unsafe fn isLessThan(&self, object: Option<&Object>) -> bool; - # [method (isGreaterThanOrEqualTo :)] + #[method(isGreaterThanOrEqualTo:)] pub unsafe fn isGreaterThanOrEqualTo(&self, object: Option<&Object>) -> bool; - # [method (isGreaterThan :)] + #[method(isGreaterThan:)] pub unsafe fn isGreaterThan(&self, object: Option<&Object>) -> bool; - # [method (isNotEqualTo :)] + #[method(isNotEqualTo:)] pub unsafe fn isNotEqualTo(&self, object: Option<&Object>) -> bool; - # [method (doesContain :)] + #[method(doesContain:)] pub unsafe fn doesContain(&self, object: &Object) -> bool; - # [method (isLike :)] + #[method(isLike:)] pub unsafe fn isLike(&self, object: &NSString) -> bool; - # [method (isCaseInsensitiveLike :)] + #[method(isCaseInsensitiveLike:)] pub unsafe fn isCaseInsensitiveLike(&self, object: &NSString) -> bool; } ); extern_methods!( #[doc = "NSScriptingComparisonMethods"] unsafe impl NSObject { - # [method (scriptingIsEqualTo :)] + #[method(scriptingIsEqualTo:)] pub unsafe fn scriptingIsEqualTo(&self, object: &Object) -> bool; - # [method (scriptingIsLessThanOrEqualTo :)] + #[method(scriptingIsLessThanOrEqualTo:)] pub unsafe fn scriptingIsLessThanOrEqualTo(&self, object: &Object) -> bool; - # [method (scriptingIsLessThan :)] + #[method(scriptingIsLessThan:)] pub unsafe fn scriptingIsLessThan(&self, object: &Object) -> bool; - # [method (scriptingIsGreaterThanOrEqualTo :)] + #[method(scriptingIsGreaterThanOrEqualTo:)] pub unsafe fn scriptingIsGreaterThanOrEqualTo(&self, object: &Object) -> bool; - # [method (scriptingIsGreaterThan :)] + #[method(scriptingIsGreaterThan:)] pub unsafe fn scriptingIsGreaterThan(&self, object: &Object) -> bool; - # [method (scriptingBeginsWith :)] + #[method(scriptingBeginsWith:)] pub unsafe fn scriptingBeginsWith(&self, object: &Object) -> bool; - # [method (scriptingEndsWith :)] + #[method(scriptingEndsWith:)] pub unsafe fn scriptingEndsWith(&self, object: &Object) -> bool; - # [method (scriptingContains :)] + #[method(scriptingContains:)] pub unsafe fn scriptingContains(&self, object: &Object) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index 2f56d9a68..a26f70d33 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -18,19 +18,19 @@ extern_methods!( unsafe impl NSSet { #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - # [method_id (member :)] + #[method_id(member:)] pub unsafe fn member(&self, object: &ObjectType) -> Option>; #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithObjects : count :)] + #[method_id(initWithObjects:count:)] pub unsafe fn initWithObjects_count( &self, objects: TodoArray, cnt: NSUInteger, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); @@ -41,56 +41,56 @@ extern_methods!( pub unsafe fn allObjects(&self) -> Id, Shared>; #[method_id(anyObject)] pub unsafe fn anyObject(&self) -> Option>; - # [method (containsObject :)] + #[method(containsObject:)] pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool; #[method_id(description)] pub unsafe fn description(&self) -> Id; - # [method_id (descriptionWithLocale :)] + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; - # [method (intersectsSet :)] + #[method(intersectsSet:)] pub unsafe fn intersectsSet(&self, otherSet: &NSSet) -> bool; - # [method (isEqualToSet :)] + #[method(isEqualToSet:)] pub unsafe fn isEqualToSet(&self, otherSet: &NSSet) -> bool; - # [method (isSubsetOfSet :)] + #[method(isSubsetOfSet:)] pub unsafe fn isSubsetOfSet(&self, otherSet: &NSSet) -> bool; - # [method (makeObjectsPerformSelector :)] + #[method(makeObjectsPerformSelector:)] pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel); - # [method (makeObjectsPerformSelector : withObject :)] + #[method(makeObjectsPerformSelector:withObject:)] pub unsafe fn makeObjectsPerformSelector_withObject( &self, aSelector: Sel, argument: Option<&Object>, ); - # [method_id (setByAddingObject :)] + #[method_id(setByAddingObject:)] pub unsafe fn setByAddingObject( &self, anObject: &ObjectType, ) -> Id, Shared>; - # [method_id (setByAddingObjectsFromSet :)] + #[method_id(setByAddingObjectsFromSet:)] pub unsafe fn setByAddingObjectsFromSet( &self, other: &NSSet, ) -> Id, Shared>; - # [method_id (setByAddingObjectsFromArray :)] + #[method_id(setByAddingObjectsFromArray:)] pub unsafe fn setByAddingObjectsFromArray( &self, other: &NSArray, ) -> Id, Shared>; - # [method (enumerateObjectsUsingBlock :)] + #[method(enumerateObjectsUsingBlock:)] pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); - # [method (enumerateObjectsWithOptions : usingBlock :)] + #[method(enumerateObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); - # [method_id (objectsPassingTest :)] + #[method_id(objectsPassingTest:)] pub unsafe fn objectsPassingTest( &self, predicate: TodoBlock, ) -> Id, Shared>; - # [method_id (objectsWithOptions : passingTest :)] + #[method_id(objectsWithOptions:passingTest:)] pub unsafe fn objectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, @@ -103,24 +103,24 @@ extern_methods!( unsafe impl NSSet { #[method_id(set)] pub unsafe fn set() -> Id; - # [method_id (setWithObject :)] + #[method_id(setWithObject:)] pub unsafe fn setWithObject(object: &ObjectType) -> Id; - # [method_id (setWithObjects : count :)] + #[method_id(setWithObjects:count:)] pub unsafe fn setWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id; - # [method_id (setWithSet :)] + #[method_id(setWithSet:)] pub unsafe fn setWithSet(set: &NSSet) -> Id; - # [method_id (setWithArray :)] + #[method_id(setWithArray:)] pub unsafe fn setWithArray(array: &NSArray) -> Id; - # [method_id (initWithSet :)] + #[method_id(initWithSet:)] pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; - # [method_id (initWithSet : copyItems :)] + #[method_id(initWithSet:copyItems:)] pub unsafe fn initWithSet_copyItems( &self, set: &NSSet, flag: bool, ) -> Id; - # [method_id (initWithArray :)] + #[method_id(initWithArray:)] pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; } ); @@ -133,39 +133,39 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSMutableSet { - # [method (addObject :)] + #[method(addObject:)] pub unsafe fn addObject(&self, object: &ObjectType); - # [method (removeObject :)] + #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &ObjectType); - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithCapacity :)] + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; } ); extern_methods!( #[doc = "NSExtendedMutableSet"] unsafe impl NSMutableSet { - # [method (addObjectsFromArray :)] + #[method(addObjectsFromArray:)] pub unsafe fn addObjectsFromArray(&self, array: &NSArray); - # [method (intersectSet :)] + #[method(intersectSet:)] pub unsafe fn intersectSet(&self, otherSet: &NSSet); - # [method (minusSet :)] + #[method(minusSet:)] pub unsafe fn minusSet(&self, otherSet: &NSSet); #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); - # [method (unionSet :)] + #[method(unionSet:)] pub unsafe fn unionSet(&self, otherSet: &NSSet); - # [method (setSet :)] + #[method(setSet:)] pub unsafe fn setSet(&self, otherSet: &NSSet); } ); extern_methods!( #[doc = "NSMutableSetCreation"] unsafe impl NSMutableSet { - # [method_id (setWithCapacity :)] + #[method_id(setWithCapacity:)] pub unsafe fn setWithCapacity(numItems: NSUInteger) -> Id; } ); @@ -178,19 +178,19 @@ __inner_extern_class!( ); extern_methods!( unsafe impl NSCountedSet { - # [method_id (initWithCapacity :)] + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; - # [method_id (initWithArray :)] + #[method_id(initWithArray:)] pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; - # [method_id (initWithSet :)] + #[method_id(initWithSet:)] pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; - # [method (countForObject :)] + #[method(countForObject:)] pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger; #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; - # [method (addObject :)] + #[method(addObject:)] pub unsafe fn addObject(&self, object: &ObjectType); - # [method (removeObject :)] + #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &ObjectType); } ); diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index 8b6bdc95c..57c73553d 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -14,31 +14,31 @@ extern_class!( ); extern_methods!( unsafe impl NSSortDescriptor { - # [method_id (sortDescriptorWithKey : ascending :)] + #[method_id(sortDescriptorWithKey:ascending:)] pub unsafe fn sortDescriptorWithKey_ascending( key: Option<&NSString>, ascending: bool, ) -> Id; - # [method_id (sortDescriptorWithKey : ascending : selector :)] + #[method_id(sortDescriptorWithKey:ascending:selector:)] pub unsafe fn sortDescriptorWithKey_ascending_selector( key: Option<&NSString>, ascending: bool, selector: Option, ) -> Id; - # [method_id (initWithKey : ascending :)] + #[method_id(initWithKey:ascending:)] pub unsafe fn initWithKey_ascending( &self, key: Option<&NSString>, ascending: bool, ) -> Id; - # [method_id (initWithKey : ascending : selector :)] + #[method_id(initWithKey:ascending:selector:)] pub unsafe fn initWithKey_ascending_selector( &self, key: Option<&NSString>, ascending: bool, selector: Option, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; #[method_id(key)] pub unsafe fn key(&self) -> Option>; @@ -48,13 +48,13 @@ extern_methods!( pub unsafe fn selector(&self) -> Option; #[method(allowEvaluation)] pub unsafe fn allowEvaluation(&self); - # [method_id (sortDescriptorWithKey : ascending : comparator :)] + #[method_id(sortDescriptorWithKey:ascending:comparator:)] pub unsafe fn sortDescriptorWithKey_ascending_comparator( key: Option<&NSString>, ascending: bool, cmptr: NSComparator, ) -> Id; - # [method_id (initWithKey : ascending : comparator :)] + #[method_id(initWithKey:ascending:comparator:)] pub unsafe fn initWithKey_ascending_comparator( &self, key: Option<&NSString>, @@ -63,7 +63,7 @@ extern_methods!( ) -> Id; #[method(comparator)] pub unsafe fn comparator(&self) -> NSComparator; - # [method (compareObject : toObject :)] + #[method(compareObject:toObject:)] pub unsafe fn compareObject_toObject( &self, object1: &Object, @@ -76,7 +76,7 @@ extern_methods!( extern_methods!( #[doc = "NSSortDescriptorSorting"] unsafe impl NSSet { - # [method_id (sortedArrayUsingDescriptors :)] + #[method_id(sortedArrayUsingDescriptors:)] pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: &NSArray, @@ -86,7 +86,7 @@ extern_methods!( extern_methods!( #[doc = "NSSortDescriptorSorting"] unsafe impl NSArray { - # [method_id (sortedArrayUsingDescriptors :)] + #[method_id(sortedArrayUsingDescriptors:)] pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: &NSArray, @@ -96,14 +96,14 @@ extern_methods!( extern_methods!( #[doc = "NSSortDescriptorSorting"] unsafe impl NSMutableArray { - # [method (sortUsingDescriptors :)] + #[method(sortUsingDescriptors:)] pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray); } ); extern_methods!( #[doc = "NSKeyValueSorting"] unsafe impl NSOrderedSet { - # [method_id (sortedArrayUsingDescriptors :)] + #[method_id(sortedArrayUsingDescriptors:)] pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: &NSArray, @@ -113,7 +113,7 @@ extern_methods!( extern_methods!( #[doc = "NSKeyValueSorting"] unsafe impl NSMutableOrderedSet { - # [method (sortUsingDescriptors :)] + #[method(sortUsingDescriptors:)] pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray); } ); diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index d168fa3a6..52818bb38 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -19,15 +19,15 @@ extern_methods!( unsafe impl NSSpellServer { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSpellServerDelegate>); - # [method (registerLanguage : byVendor :)] + #[method(registerLanguage:byVendor:)] pub unsafe fn registerLanguage_byVendor( &self, language: Option<&NSString>, vendor: Option<&NSString>, ) -> bool; - # [method (isWordInUserDictionaries : caseSensitive :)] + #[method(isWordInUserDictionaries:caseSensitive:)] pub unsafe fn isWordInUserDictionaries_caseSensitive( &self, word: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 07f9dbb92..7c61eb51f 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -27,22 +27,22 @@ extern_methods!( pub unsafe fn close(&self); #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>); - # [method_id (propertyForKey :)] + #[method_id(propertyForKey:)] pub unsafe fn propertyForKey( &self, key: &NSStreamPropertyKey, ) -> Option>; - # [method (setProperty : forKey :)] + #[method(setProperty:forKey:)] pub unsafe fn setProperty_forKey( &self, property: Option<&Object>, key: &NSStreamPropertyKey, ) -> bool; - # [method (scheduleInRunLoop : forMode :)] + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); - # [method (removeFromRunLoop : forMode :)] + #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); #[method(streamStatus)] pub unsafe fn streamStatus(&self) -> NSStreamStatus; @@ -59,9 +59,9 @@ extern_class!( ); extern_methods!( unsafe impl NSInputStream { - # [method (read : maxLength :)] + #[method(read:maxLength:)] pub unsafe fn read_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger; - # [method (getBuffer : length :)] + #[method(getBuffer:length:)] pub unsafe fn getBuffer_length( &self, buffer: NonNull<*mut u8>, @@ -69,9 +69,9 @@ extern_methods!( ) -> bool; #[method(hasBytesAvailable)] pub unsafe fn hasBytesAvailable(&self) -> bool; - # [method_id (initWithData :)] + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Id; - # [method_id (initWithURL :)] + #[method_id(initWithURL:)] pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; } ); @@ -84,19 +84,19 @@ extern_class!( ); extern_methods!( unsafe impl NSOutputStream { - # [method (write : maxLength :)] + #[method(write:maxLength:)] pub unsafe fn write_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger; #[method(hasSpaceAvailable)] pub unsafe fn hasSpaceAvailable(&self) -> bool; #[method_id(initToMemory)] pub unsafe fn initToMemory(&self) -> Id; - # [method_id (initToBuffer : capacity :)] + #[method_id(initToBuffer:capacity:)] pub unsafe fn initToBuffer_capacity( &self, buffer: NonNull, capacity: NSUInteger, ) -> Id; - # [method_id (initWithURL : append :)] + #[method_id(initWithURL:append:)] pub unsafe fn initWithURL_append( &self, url: &NSURL, @@ -107,14 +107,14 @@ extern_methods!( extern_methods!( #[doc = "NSSocketStreamCreationExtensions"] unsafe impl NSStream { - # [method (getStreamsToHostWithName : port : inputStream : outputStream :)] + #[method(getStreamsToHostWithName:port:inputStream:outputStream:)] pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( hostname: &NSString, port: NSInteger, inputStream: Option<&mut Option>>, outputStream: Option<&mut Option>>, ); - # [method (getStreamsToHost : port : inputStream : outputStream :)] + #[method(getStreamsToHost:port:inputStream:outputStream:)] pub unsafe fn getStreamsToHost_port_inputStream_outputStream( host: &NSHost, port: NSInteger, @@ -126,7 +126,7 @@ extern_methods!( extern_methods!( #[doc = "NSStreamBoundPairCreationExtensions"] unsafe impl NSStream { - # [method (getBoundStreamsWithBufferSize : inputStream : outputStream :)] + #[method(getBoundStreamsWithBufferSize:inputStream:outputStream:)] pub unsafe fn getBoundStreamsWithBufferSize_inputStream_outputStream( bufferSize: NSUInteger, inputStream: Option<&mut Option>>, @@ -137,20 +137,20 @@ extern_methods!( extern_methods!( #[doc = "NSInputStreamExtensions"] unsafe impl NSInputStream { - # [method_id (initWithFileAtPath :)] + #[method_id(initWithFileAtPath:)] pub unsafe fn initWithFileAtPath(&self, path: &NSString) -> Option>; - # [method_id (inputStreamWithData :)] + #[method_id(inputStreamWithData:)] pub unsafe fn inputStreamWithData(data: &NSData) -> Option>; - # [method_id (inputStreamWithFileAtPath :)] + #[method_id(inputStreamWithFileAtPath:)] pub unsafe fn inputStreamWithFileAtPath(path: &NSString) -> Option>; - # [method_id (inputStreamWithURL :)] + #[method_id(inputStreamWithURL:)] pub unsafe fn inputStreamWithURL(url: &NSURL) -> Option>; } ); extern_methods!( #[doc = "NSOutputStreamExtensions"] unsafe impl NSOutputStream { - # [method_id (initToFileAtPath : append :)] + #[method_id(initToFileAtPath:append:)] pub unsafe fn initToFileAtPath_append( &self, path: &NSString, @@ -158,17 +158,17 @@ extern_methods!( ) -> Option>; #[method_id(outputStreamToMemory)] pub unsafe fn outputStreamToMemory() -> Id; - # [method_id (outputStreamToBuffer : capacity :)] + #[method_id(outputStreamToBuffer:capacity:)] pub unsafe fn outputStreamToBuffer_capacity( buffer: NonNull, capacity: NSUInteger, ) -> Id; - # [method_id (outputStreamToFileAtPath : append :)] + #[method_id(outputStreamToFileAtPath:append:)] pub unsafe fn outputStreamToFileAtPath_append( path: &NSString, shouldAppend: bool, ) -> Id; - # [method_id (outputStreamWithURL : append :)] + #[method_id(outputStreamWithURL:append:)] pub unsafe fn outputStreamWithURL_append( url: &NSURL, shouldAppend: bool, diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 0e513d45e..6e05dc53e 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -24,11 +24,11 @@ extern_methods!( unsafe impl NSString { #[method(length)] pub fn length(&self) -> NSUInteger; - # [method (characterAtIndex :)] + #[method(characterAtIndex:)] pub unsafe fn characterAtIndex(&self, index: NSUInteger) -> unichar; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); @@ -36,30 +36,30 @@ pub type NSStringTransform = NSString; extern_methods!( #[doc = "NSStringExtensionMethods"] unsafe impl NSString { - # [method_id (substringFromIndex :)] + #[method_id(substringFromIndex:)] pub unsafe fn substringFromIndex(&self, from: NSUInteger) -> Id; - # [method_id (substringToIndex :)] + #[method_id(substringToIndex:)] pub unsafe fn substringToIndex(&self, to: NSUInteger) -> Id; - # [method_id (substringWithRange :)] + #[method_id(substringWithRange:)] pub unsafe fn substringWithRange(&self, range: NSRange) -> Id; - # [method (getCharacters : range :)] + #[method(getCharacters:range:)] pub unsafe fn getCharacters_range(&self, buffer: NonNull, range: NSRange); - # [method (compare :)] + #[method(compare:)] pub unsafe fn compare(&self, string: &NSString) -> NSComparisonResult; - # [method (compare : options :)] + #[method(compare:options:)] pub unsafe fn compare_options( &self, string: &NSString, mask: NSStringCompareOptions, ) -> NSComparisonResult; - # [method (compare : options : range :)] + #[method(compare:options:range:)] pub unsafe fn compare_options_range( &self, string: &NSString, mask: NSStringCompareOptions, rangeOfReceiverToCompare: NSRange, ) -> NSComparisonResult; - # [method (compare : options : range : locale :)] + #[method(compare:options:range:locale:)] pub unsafe fn compare_options_range_locale( &self, string: &NSString, @@ -67,53 +67,53 @@ extern_methods!( rangeOfReceiverToCompare: NSRange, locale: Option<&Object>, ) -> NSComparisonResult; - # [method (caseInsensitiveCompare :)] + #[method(caseInsensitiveCompare:)] pub unsafe fn caseInsensitiveCompare(&self, string: &NSString) -> NSComparisonResult; - # [method (localizedCompare :)] + #[method(localizedCompare:)] pub unsafe fn localizedCompare(&self, string: &NSString) -> NSComparisonResult; - # [method (localizedCaseInsensitiveCompare :)] + #[method(localizedCaseInsensitiveCompare:)] pub unsafe fn localizedCaseInsensitiveCompare( &self, string: &NSString, ) -> NSComparisonResult; - # [method (localizedStandardCompare :)] + #[method(localizedStandardCompare:)] pub unsafe fn localizedStandardCompare(&self, string: &NSString) -> NSComparisonResult; - # [method (isEqualToString :)] + #[method(isEqualToString:)] pub unsafe fn isEqualToString(&self, aString: &NSString) -> bool; - # [method (hasPrefix :)] + #[method(hasPrefix:)] pub unsafe fn hasPrefix(&self, str: &NSString) -> bool; - # [method (hasSuffix :)] + #[method(hasSuffix:)] pub unsafe fn hasSuffix(&self, str: &NSString) -> bool; - # [method_id (commonPrefixWithString : options :)] + #[method_id(commonPrefixWithString:options:)] pub unsafe fn commonPrefixWithString_options( &self, str: &NSString, mask: NSStringCompareOptions, ) -> Id; - # [method (containsString :)] + #[method(containsString:)] pub unsafe fn containsString(&self, str: &NSString) -> bool; - # [method (localizedCaseInsensitiveContainsString :)] + #[method(localizedCaseInsensitiveContainsString:)] pub unsafe fn localizedCaseInsensitiveContainsString(&self, str: &NSString) -> bool; - # [method (localizedStandardContainsString :)] + #[method(localizedStandardContainsString:)] pub unsafe fn localizedStandardContainsString(&self, str: &NSString) -> bool; - # [method (localizedStandardRangeOfString :)] + #[method(localizedStandardRangeOfString:)] pub unsafe fn localizedStandardRangeOfString(&self, str: &NSString) -> NSRange; - # [method (rangeOfString :)] + #[method(rangeOfString:)] pub unsafe fn rangeOfString(&self, searchString: &NSString) -> NSRange; - # [method (rangeOfString : options :)] + #[method(rangeOfString:options:)] pub unsafe fn rangeOfString_options( &self, searchString: &NSString, mask: NSStringCompareOptions, ) -> NSRange; - # [method (rangeOfString : options : range :)] + #[method(rangeOfString:options:range:)] pub unsafe fn rangeOfString_options_range( &self, searchString: &NSString, mask: NSStringCompareOptions, rangeOfReceiverToSearch: NSRange, ) -> NSRange; - # [method (rangeOfString : options : range : locale :)] + #[method(rangeOfString:options:range:locale:)] pub unsafe fn rangeOfString_options_range_locale( &self, searchString: &NSString, @@ -121,26 +121,26 @@ extern_methods!( rangeOfReceiverToSearch: NSRange, locale: Option<&NSLocale>, ) -> NSRange; - # [method (rangeOfCharacterFromSet :)] + #[method(rangeOfCharacterFromSet:)] pub unsafe fn rangeOfCharacterFromSet(&self, searchSet: &NSCharacterSet) -> NSRange; - # [method (rangeOfCharacterFromSet : options :)] + #[method(rangeOfCharacterFromSet:options:)] pub unsafe fn rangeOfCharacterFromSet_options( &self, searchSet: &NSCharacterSet, mask: NSStringCompareOptions, ) -> NSRange; - # [method (rangeOfCharacterFromSet : options : range :)] + #[method(rangeOfCharacterFromSet:options:range:)] pub unsafe fn rangeOfCharacterFromSet_options_range( &self, searchSet: &NSCharacterSet, mask: NSStringCompareOptions, rangeOfReceiverToSearch: NSRange, ) -> NSRange; - # [method (rangeOfComposedCharacterSequenceAtIndex :)] + #[method(rangeOfComposedCharacterSequenceAtIndex:)] pub unsafe fn rangeOfComposedCharacterSequenceAtIndex(&self, index: NSUInteger) -> NSRange; - # [method (rangeOfComposedCharacterSequencesForRange :)] + #[method(rangeOfComposedCharacterSequencesForRange:)] pub unsafe fn rangeOfComposedCharacterSequencesForRange(&self, range: NSRange) -> NSRange; - # [method_id (stringByAppendingString :)] + #[method_id(stringByAppendingString:)] pub fn stringByAppendingString(&self, aString: &NSString) -> Id; #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; @@ -166,22 +166,22 @@ extern_methods!( pub unsafe fn localizedLowercaseString(&self) -> Id; #[method_id(localizedCapitalizedString)] pub unsafe fn localizedCapitalizedString(&self) -> Id; - # [method_id (uppercaseStringWithLocale :)] + #[method_id(uppercaseStringWithLocale:)] pub unsafe fn uppercaseStringWithLocale( &self, locale: Option<&NSLocale>, ) -> Id; - # [method_id (lowercaseStringWithLocale :)] + #[method_id(lowercaseStringWithLocale:)] pub unsafe fn lowercaseStringWithLocale( &self, locale: Option<&NSLocale>, ) -> Id; - # [method_id (capitalizedStringWithLocale :)] + #[method_id(capitalizedStringWithLocale:)] pub unsafe fn capitalizedStringWithLocale( &self, locale: Option<&NSLocale>, ) -> Id; - # [method (getLineStart : end : contentsEnd : forRange :)] + #[method(getLineStart:end:contentsEnd:forRange:)] pub unsafe fn getLineStart_end_contentsEnd_forRange( &self, startPtr: *mut NSUInteger, @@ -189,9 +189,9 @@ extern_methods!( contentsEndPtr: *mut NSUInteger, range: NSRange, ); - # [method (lineRangeForRange :)] + #[method(lineRangeForRange:)] pub unsafe fn lineRangeForRange(&self, range: NSRange) -> NSRange; - # [method (getParagraphStart : end : contentsEnd : forRange :)] + #[method(getParagraphStart:end:contentsEnd:forRange:)] pub unsafe fn getParagraphStart_end_contentsEnd_forRange( &self, startPtr: *mut NSUInteger, @@ -199,16 +199,16 @@ extern_methods!( contentsEndPtr: *mut NSUInteger, range: NSRange, ); - # [method (paragraphRangeForRange :)] + #[method(paragraphRangeForRange:)] pub unsafe fn paragraphRangeForRange(&self, range: NSRange) -> NSRange; - # [method (enumerateSubstringsInRange : options : usingBlock :)] + #[method(enumerateSubstringsInRange:options:usingBlock:)] pub unsafe fn enumerateSubstringsInRange_options_usingBlock( &self, range: NSRange, opts: NSStringEnumerationOptions, block: TodoBlock, ); - # [method (enumerateLinesUsingBlock :)] + #[method(enumerateLinesUsingBlock:)] pub unsafe fn enumerateLinesUsingBlock(&self, block: TodoBlock); #[method(UTF8String)] pub fn UTF8String(&self) -> *mut c_char; @@ -216,29 +216,29 @@ extern_methods!( pub unsafe fn fastestEncoding(&self) -> NSStringEncoding; #[method(smallestEncoding)] pub unsafe fn smallestEncoding(&self) -> NSStringEncoding; - # [method_id (dataUsingEncoding : allowLossyConversion :)] + #[method_id(dataUsingEncoding:allowLossyConversion:)] pub unsafe fn dataUsingEncoding_allowLossyConversion( &self, encoding: NSStringEncoding, lossy: bool, ) -> Option>; - # [method_id (dataUsingEncoding :)] + #[method_id(dataUsingEncoding:)] pub unsafe fn dataUsingEncoding( &self, encoding: NSStringEncoding, ) -> Option>; - # [method (canBeConvertedToEncoding :)] + #[method(canBeConvertedToEncoding:)] pub unsafe fn canBeConvertedToEncoding(&self, encoding: NSStringEncoding) -> bool; - # [method (cStringUsingEncoding :)] + #[method(cStringUsingEncoding:)] pub unsafe fn cStringUsingEncoding(&self, encoding: NSStringEncoding) -> *mut c_char; - # [method (getCString : maxLength : encoding :)] + #[method(getCString:maxLength:encoding:)] pub unsafe fn getCString_maxLength_encoding( &self, buffer: NonNull, maxBufferCount: NSUInteger, encoding: NSStringEncoding, ) -> bool; - # [method (getBytes : maxLength : usedLength : encoding : options : range : remainingRange :)] + #[method(getBytes:maxLength:usedLength:encoding:options:range:remainingRange:)] pub unsafe fn getBytes_maxLength_usedLength_encoding_options_range_remainingRange( &self, buffer: *mut c_void, @@ -249,14 +249,14 @@ extern_methods!( range: NSRange, leftover: NSRangePointer, ) -> bool; - # [method (maximumLengthOfBytesUsingEncoding :)] + #[method(maximumLengthOfBytesUsingEncoding:)] pub unsafe fn maximumLengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger; - # [method (lengthOfBytesUsingEncoding :)] + #[method(lengthOfBytesUsingEncoding:)] pub fn lengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger; #[method(availableStringEncodings)] pub unsafe fn availableStringEncodings() -> NonNull; - # [method_id (localizedNameOfStringEncoding :)] + #[method_id(localizedNameOfStringEncoding:)] pub unsafe fn localizedNameOfStringEncoding( encoding: NSStringEncoding, ) -> Id; @@ -270,35 +270,35 @@ extern_methods!( pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id; #[method_id(precomposedStringWithCompatibilityMapping)] pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id; - # [method_id (componentsSeparatedByString :)] + #[method_id(componentsSeparatedByString:)] pub unsafe fn componentsSeparatedByString( &self, separator: &NSString, ) -> Id, Shared>; - # [method_id (componentsSeparatedByCharactersInSet :)] + #[method_id(componentsSeparatedByCharactersInSet:)] pub unsafe fn componentsSeparatedByCharactersInSet( &self, separator: &NSCharacterSet, ) -> Id, Shared>; - # [method_id (stringByTrimmingCharactersInSet :)] + #[method_id(stringByTrimmingCharactersInSet:)] pub unsafe fn stringByTrimmingCharactersInSet( &self, set: &NSCharacterSet, ) -> Id; - # [method_id (stringByPaddingToLength : withString : startingAtIndex :)] + #[method_id(stringByPaddingToLength:withString:startingAtIndex:)] pub unsafe fn stringByPaddingToLength_withString_startingAtIndex( &self, newLength: NSUInteger, padString: &NSString, padIndex: NSUInteger, ) -> Id; - # [method_id (stringByFoldingWithOptions : locale :)] + #[method_id(stringByFoldingWithOptions:locale:)] pub unsafe fn stringByFoldingWithOptions_locale( &self, options: NSStringCompareOptions, locale: Option<&NSLocale>, ) -> Id; - # [method_id (stringByReplacingOccurrencesOfString : withString : options : range :)] + #[method_id(stringByReplacingOccurrencesOfString:withString:options:range:)] pub unsafe fn stringByReplacingOccurrencesOfString_withString_options_range( &self, target: &NSString, @@ -306,32 +306,32 @@ extern_methods!( options: NSStringCompareOptions, searchRange: NSRange, ) -> Id; - # [method_id (stringByReplacingOccurrencesOfString : withString :)] + #[method_id(stringByReplacingOccurrencesOfString:withString:)] pub unsafe fn stringByReplacingOccurrencesOfString_withString( &self, target: &NSString, replacement: &NSString, ) -> Id; - # [method_id (stringByReplacingCharactersInRange : withString :)] + #[method_id(stringByReplacingCharactersInRange:withString:)] pub unsafe fn stringByReplacingCharactersInRange_withString( &self, range: NSRange, replacement: &NSString, ) -> Id; - # [method_id (stringByApplyingTransform : reverse :)] + #[method_id(stringByApplyingTransform:reverse:)] pub unsafe fn stringByApplyingTransform_reverse( &self, transform: &NSStringTransform, reverse: bool, ) -> Option>; - # [method (writeToURL : atomically : encoding : error :)] + #[method(writeToURL:atomically:encoding:error:)] pub unsafe fn writeToURL_atomically_encoding_error( &self, url: &NSURL, useAuxiliaryFile: bool, enc: NSStringEncoding, ) -> Result<(), Id>; - # [method (writeToFile : atomically : encoding : error :)] + #[method(writeToFile:atomically:encoding:error:)] pub unsafe fn writeToFile_atomically_encoding_error( &self, path: &NSString, @@ -342,21 +342,21 @@ extern_methods!( pub unsafe fn description(&self) -> Id; #[method(hash)] pub unsafe fn hash(&self) -> NSUInteger; - # [method_id (initWithCharactersNoCopy : length : freeWhenDone :)] + #[method_id(initWithCharactersNoCopy:length:freeWhenDone:)] pub unsafe fn initWithCharactersNoCopy_length_freeWhenDone( &self, characters: NonNull, length: NSUInteger, freeBuffer: bool, ) -> Id; - # [method_id (initWithCharactersNoCopy : length : deallocator :)] + #[method_id(initWithCharactersNoCopy:length:deallocator:)] pub unsafe fn initWithCharactersNoCopy_length_deallocator( &self, chars: NonNull, len: NSUInteger, deallocator: TodoBlock, ) -> Id; - # [method_id (initWithCharacters : length :)] + #[method_id(initWithCharacters:length:)] pub unsafe fn initWithCharacters_length( &self, characters: NonNull, @@ -367,35 +367,35 @@ extern_methods!( &self, nullTerminatedCString: NonNull, ) -> Option>; - # [method_id (initWithString :)] + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, aString: &NSString) -> Id; - # [method_id (initWithFormat : arguments :)] + #[method_id(initWithFormat:arguments:)] pub unsafe fn initWithFormat_arguments( &self, format: &NSString, argList: va_list, ) -> Id; - # [method_id (initWithFormat : locale : arguments :)] + #[method_id(initWithFormat:locale:arguments:)] pub unsafe fn initWithFormat_locale_arguments( &self, format: &NSString, locale: Option<&Object>, argList: va_list, ) -> Id; - # [method_id (initWithData : encoding :)] + #[method_id(initWithData:encoding:)] pub unsafe fn initWithData_encoding( &self, data: &NSData, encoding: NSStringEncoding, ) -> Option>; - # [method_id (initWithBytes : length : encoding :)] + #[method_id(initWithBytes:length:encoding:)] pub unsafe fn initWithBytes_length_encoding( &self, bytes: NonNull, len: NSUInteger, encoding: NSStringEncoding, ) -> Option>; - # [method_id (initWithBytesNoCopy : length : encoding : freeWhenDone :)] + #[method_id(initWithBytesNoCopy:length:encoding:freeWhenDone:)] pub unsafe fn initWithBytesNoCopy_length_encoding_freeWhenDone( &self, bytes: NonNull, @@ -403,7 +403,7 @@ extern_methods!( encoding: NSStringEncoding, freeBuffer: bool, ) -> Option>; - # [method_id (initWithBytesNoCopy : length : encoding : deallocator :)] + #[method_id(initWithBytesNoCopy:length:encoding:deallocator:)] pub unsafe fn initWithBytesNoCopy_length_encoding_deallocator( &self, bytes: NonNull, @@ -413,9 +413,9 @@ extern_methods!( ) -> Option>; #[method_id(string)] pub unsafe fn string() -> Id; - # [method_id (stringWithString :)] + #[method_id(stringWithString:)] pub unsafe fn stringWithString(string: &NSString) -> Id; - # [method_id (stringWithCharacters : length :)] + #[method_id(stringWithCharacters:length:)] pub unsafe fn stringWithCharacters_length( characters: NonNull, length: NSUInteger, @@ -424,57 +424,57 @@ extern_methods!( pub unsafe fn stringWithUTF8String( nullTerminatedCString: NonNull, ) -> Option>; - # [method_id (initWithCString : encoding :)] + #[method_id(initWithCString:encoding:)] pub unsafe fn initWithCString_encoding( &self, nullTerminatedCString: NonNull, encoding: NSStringEncoding, ) -> Option>; - # [method_id (stringWithCString : encoding :)] + #[method_id(stringWithCString:encoding:)] pub unsafe fn stringWithCString_encoding( cString: NonNull, enc: NSStringEncoding, ) -> Option>; - # [method_id (initWithContentsOfURL : encoding : error :)] + #[method_id(initWithContentsOfURL:encoding:error:)] pub unsafe fn initWithContentsOfURL_encoding_error( &self, url: &NSURL, enc: NSStringEncoding, ) -> Result, Id>; - # [method_id (initWithContentsOfFile : encoding : error :)] + #[method_id(initWithContentsOfFile:encoding:error:)] pub unsafe fn initWithContentsOfFile_encoding_error( &self, path: &NSString, enc: NSStringEncoding, ) -> Result, Id>; - # [method_id (stringWithContentsOfURL : encoding : error :)] + #[method_id(stringWithContentsOfURL:encoding:error:)] pub unsafe fn stringWithContentsOfURL_encoding_error( url: &NSURL, enc: NSStringEncoding, ) -> Result, Id>; - # [method_id (stringWithContentsOfFile : encoding : error :)] + #[method_id(stringWithContentsOfFile:encoding:error:)] pub unsafe fn stringWithContentsOfFile_encoding_error( path: &NSString, enc: NSStringEncoding, ) -> Result, Id>; - # [method_id (initWithContentsOfURL : usedEncoding : error :)] + #[method_id(initWithContentsOfURL:usedEncoding:error:)] pub unsafe fn initWithContentsOfURL_usedEncoding_error( &self, url: &NSURL, enc: *mut NSStringEncoding, ) -> Result, Id>; - # [method_id (initWithContentsOfFile : usedEncoding : error :)] + #[method_id(initWithContentsOfFile:usedEncoding:error:)] pub unsafe fn initWithContentsOfFile_usedEncoding_error( &self, path: &NSString, enc: *mut NSStringEncoding, ) -> Result, Id>; - # [method_id (stringWithContentsOfURL : usedEncoding : error :)] + #[method_id(stringWithContentsOfURL:usedEncoding:error:)] pub unsafe fn stringWithContentsOfURL_usedEncoding_error( url: &NSURL, enc: *mut NSStringEncoding, ) -> Result, Id>; - # [method_id (stringWithContentsOfFile : usedEncoding : error :)] + #[method_id(stringWithContentsOfFile:usedEncoding:error:)] pub unsafe fn stringWithContentsOfFile_usedEncoding_error( path: &NSString, enc: *mut NSStringEncoding, @@ -485,7 +485,7 @@ pub type NSStringEncodingDetectionOptionsKey = NSString; extern_methods!( #[doc = "NSStringEncodingDetection"] unsafe impl NSString { - # [method (stringEncodingForData : encodingOptions : convertedString : usedLossyConversion :)] + #[method(stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:)] pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( data: &NSData, opts: Option<&NSDictionary>, @@ -507,7 +507,7 @@ extern_class!( ); extern_methods!( unsafe impl NSMutableString { - # [method (replaceCharactersInRange : withString :)] + #[method(replaceCharactersInRange:withString:)] pub unsafe fn replaceCharactersInRange_withString( &self, range: NSRange, @@ -518,15 +518,15 @@ extern_methods!( extern_methods!( #[doc = "NSMutableStringExtensionMethods"] unsafe impl NSMutableString { - # [method (insertString : atIndex :)] + #[method(insertString:atIndex:)] pub unsafe fn insertString_atIndex(&self, aString: &NSString, loc: NSUInteger); - # [method (deleteCharactersInRange :)] + #[method(deleteCharactersInRange:)] pub unsafe fn deleteCharactersInRange(&self, range: NSRange); - # [method (appendString :)] + #[method(appendString:)] pub unsafe fn appendString(&self, aString: &NSString); - # [method (setString :)] + #[method(setString:)] pub unsafe fn setString(&self, aString: &NSString); - # [method (replaceOccurrencesOfString : withString : options : range :)] + #[method(replaceOccurrencesOfString:withString:options:range:)] pub unsafe fn replaceOccurrencesOfString_withString_options_range( &self, target: &NSString, @@ -534,7 +534,7 @@ extern_methods!( options: NSStringCompareOptions, searchRange: NSRange, ) -> NSUInteger; - # [method (applyTransform : reverse : range : updatedRange :)] + #[method(applyTransform:reverse:range:updatedRange:)] pub unsafe fn applyTransform_reverse_range_updatedRange( &self, transform: &NSStringTransform, @@ -542,9 +542,9 @@ extern_methods!( range: NSRange, resultingRange: NSRangePointer, ) -> bool; - # [method_id (initWithCapacity :)] + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Id; - # [method_id (stringWithCapacity :)] + #[method_id(stringWithCapacity:)] pub unsafe fn stringWithCapacity(capacity: NSUInteger) -> Id; } ); @@ -566,11 +566,11 @@ extern_methods!( pub unsafe fn lossyCString(&self) -> *mut c_char; #[method(cStringLength)] pub unsafe fn cStringLength(&self) -> NSUInteger; - # [method (getCString :)] + #[method(getCString:)] pub unsafe fn getCString(&self, bytes: NonNull); - # [method (getCString : maxLength :)] + #[method(getCString:maxLength:)] pub unsafe fn getCString_maxLength(&self, bytes: NonNull, maxLength: NSUInteger); - # [method (getCString : maxLength : range : remainingRange :)] + #[method(getCString:maxLength:range:remainingRange:)] pub unsafe fn getCString_maxLength_range_remainingRange( &self, bytes: NonNull, @@ -578,45 +578,45 @@ extern_methods!( aRange: NSRange, leftoverRange: NSRangePointer, ); - # [method (writeToFile : atomically :)] + #[method(writeToFile:atomically:)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, ) -> bool; - # [method (writeToURL : atomically :)] + #[method(writeToURL:atomically:)] pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; - # [method_id (initWithContentsOfFile :)] + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option>; - # [method_id (initWithContentsOfURL :)] + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; - # [method_id (stringWithContentsOfFile :)] + #[method_id(stringWithContentsOfFile:)] pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option>; - # [method_id (stringWithContentsOfURL :)] + #[method_id(stringWithContentsOfURL:)] pub unsafe fn stringWithContentsOfURL(url: &NSURL) -> Option>; - # [method_id (initWithCStringNoCopy : length : freeWhenDone :)] + #[method_id(initWithCStringNoCopy:length:freeWhenDone:)] pub unsafe fn initWithCStringNoCopy_length_freeWhenDone( &self, bytes: NonNull, length: NSUInteger, freeBuffer: bool, ) -> Option>; - # [method_id (initWithCString : length :)] + #[method_id(initWithCString:length:)] pub unsafe fn initWithCString_length( &self, bytes: NonNull, length: NSUInteger, ) -> Option>; - # [method_id (initWithCString :)] + #[method_id(initWithCString:)] pub unsafe fn initWithCString(&self, bytes: NonNull) -> Option>; - # [method_id (stringWithCString : length :)] + #[method_id(stringWithCString:length:)] pub unsafe fn stringWithCString_length( bytes: NonNull, length: NSUInteger, ) -> Option>; - # [method_id (stringWithCString :)] + #[method_id(stringWithCString:)] pub unsafe fn stringWithCString(bytes: NonNull) -> Option>; - # [method (getCharacters :)] + #[method(getCharacters:)] pub unsafe fn getCharacters(&self, buffer: NonNull); } ); diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 78716e939..2181e36fe 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -20,33 +20,33 @@ extern_methods!( pub unsafe fn init(&self) -> Id; #[method_id(executableURL)] pub unsafe fn executableURL(&self) -> Option>; - # [method (setExecutableURL :)] + #[method(setExecutableURL:)] pub unsafe fn setExecutableURL(&self, executableURL: Option<&NSURL>); #[method_id(arguments)] pub unsafe fn arguments(&self) -> Option, Shared>>; - # [method (setArguments :)] + #[method(setArguments:)] pub unsafe fn setArguments(&self, arguments: Option<&NSArray>); #[method_id(environment)] pub unsafe fn environment(&self) -> Option, Shared>>; - # [method (setEnvironment :)] + #[method(setEnvironment:)] pub unsafe fn setEnvironment(&self, environment: Option<&NSDictionary>); #[method_id(currentDirectoryURL)] pub unsafe fn currentDirectoryURL(&self) -> Option>; - # [method (setCurrentDirectoryURL :)] + #[method(setCurrentDirectoryURL:)] pub unsafe fn setCurrentDirectoryURL(&self, currentDirectoryURL: Option<&NSURL>); #[method_id(standardInput)] pub unsafe fn standardInput(&self) -> Option>; - # [method (setStandardInput :)] + #[method(setStandardInput:)] pub unsafe fn setStandardInput(&self, standardInput: Option<&Object>); #[method_id(standardOutput)] pub unsafe fn standardOutput(&self) -> Option>; - # [method (setStandardOutput :)] + #[method(setStandardOutput:)] pub unsafe fn setStandardOutput(&self, standardOutput: Option<&Object>); #[method_id(standardError)] pub unsafe fn standardError(&self) -> Option>; - # [method (setStandardError :)] + #[method(setStandardError:)] pub unsafe fn setStandardError(&self, standardError: Option<&Object>); - # [method (launchAndReturnError :)] + #[method(launchAndReturnError:)] pub unsafe fn launchAndReturnError(&self) -> Result<(), Id>; #[method(interrupt)] pub unsafe fn interrupt(&self); @@ -66,18 +66,18 @@ extern_methods!( pub unsafe fn terminationReason(&self) -> NSTaskTerminationReason; #[method(terminationHandler)] pub unsafe fn terminationHandler(&self) -> TodoBlock; - # [method (setTerminationHandler :)] + #[method(setTerminationHandler:)] pub unsafe fn setTerminationHandler(&self, terminationHandler: TodoBlock); #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; - # [method (setQualityOfService :)] + #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); } ); extern_methods!( #[doc = "NSTaskConveniences"] unsafe impl NSTask { - # [method_id (launchedTaskWithExecutableURL : arguments : error : terminationHandler :)] + #[method_id(launchedTaskWithExecutableURL:arguments:error:terminationHandler:)] pub unsafe fn launchedTaskWithExecutableURL_arguments_error_terminationHandler( url: &NSURL, arguments: &NSArray, @@ -93,15 +93,15 @@ extern_methods!( unsafe impl NSTask { #[method_id(launchPath)] pub unsafe fn launchPath(&self) -> Option>; - # [method (setLaunchPath :)] + #[method(setLaunchPath:)] pub unsafe fn setLaunchPath(&self, launchPath: Option<&NSString>); #[method_id(currentDirectoryPath)] pub unsafe fn currentDirectoryPath(&self) -> Id; - # [method (setCurrentDirectoryPath :)] + #[method(setCurrentDirectoryPath:)] pub unsafe fn setCurrentDirectoryPath(&self, currentDirectoryPath: &NSString); #[method(launch)] pub unsafe fn launch(&self); - # [method_id (launchedTaskWithLaunchPath : arguments :)] + #[method_id(launchedTaskWithLaunchPath:arguments:)] pub unsafe fn launchedTaskWithLaunchPath_arguments( path: &NSString, arguments: &NSArray, diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 707fc814e..0019bc3bc 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -61,11 +61,11 @@ extern_methods!( pub unsafe fn phoneNumber(&self) -> Option>; #[method(numberOfRanges)] pub unsafe fn numberOfRanges(&self) -> NSUInteger; - # [method (rangeAtIndex :)] + #[method(rangeAtIndex:)] pub unsafe fn rangeAtIndex(&self, idx: NSUInteger) -> NSRange; - # [method (rangeWithName :)] + #[method(rangeWithName:)] pub unsafe fn rangeWithName(&self, name: &NSString) -> NSRange; - # [method_id (resultByAdjustingRangesWithOffset :)] + #[method_id(resultByAdjustingRangesWithOffset:)] pub unsafe fn resultByAdjustingRangesWithOffset( &self, offset: NSInteger, @@ -79,80 +79,80 @@ extern_methods!( extern_methods!( #[doc = "NSTextCheckingResultCreation"] unsafe impl NSTextCheckingResult { - # [method_id (orthographyCheckingResultWithRange : orthography :)] + #[method_id(orthographyCheckingResultWithRange:orthography:)] pub unsafe fn orthographyCheckingResultWithRange_orthography( range: NSRange, orthography: &NSOrthography, ) -> Id; - # [method_id (spellCheckingResultWithRange :)] + #[method_id(spellCheckingResultWithRange:)] pub unsafe fn spellCheckingResultWithRange( range: NSRange, ) -> Id; - # [method_id (grammarCheckingResultWithRange : details :)] + #[method_id(grammarCheckingResultWithRange:details:)] pub unsafe fn grammarCheckingResultWithRange_details( range: NSRange, details: &NSArray>, ) -> Id; - # [method_id (dateCheckingResultWithRange : date :)] + #[method_id(dateCheckingResultWithRange:date:)] pub unsafe fn dateCheckingResultWithRange_date( range: NSRange, date: &NSDate, ) -> Id; - # [method_id (dateCheckingResultWithRange : date : timeZone : duration :)] + #[method_id(dateCheckingResultWithRange:date:timeZone:duration:)] pub unsafe fn dateCheckingResultWithRange_date_timeZone_duration( range: NSRange, date: &NSDate, timeZone: &NSTimeZone, duration: NSTimeInterval, ) -> Id; - # [method_id (addressCheckingResultWithRange : components :)] + #[method_id(addressCheckingResultWithRange:components:)] pub unsafe fn addressCheckingResultWithRange_components( range: NSRange, components: &NSDictionary, ) -> Id; - # [method_id (linkCheckingResultWithRange : URL :)] + #[method_id(linkCheckingResultWithRange:URL:)] pub unsafe fn linkCheckingResultWithRange_URL( range: NSRange, url: &NSURL, ) -> Id; - # [method_id (quoteCheckingResultWithRange : replacementString :)] + #[method_id(quoteCheckingResultWithRange:replacementString:)] pub unsafe fn quoteCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; - # [method_id (dashCheckingResultWithRange : replacementString :)] + #[method_id(dashCheckingResultWithRange:replacementString:)] pub unsafe fn dashCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; - # [method_id (replacementCheckingResultWithRange : replacementString :)] + #[method_id(replacementCheckingResultWithRange:replacementString:)] pub unsafe fn replacementCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; - # [method_id (correctionCheckingResultWithRange : replacementString :)] + #[method_id(correctionCheckingResultWithRange:replacementString:)] pub unsafe fn correctionCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; - # [method_id (correctionCheckingResultWithRange : replacementString : alternativeStrings :)] + #[method_id(correctionCheckingResultWithRange:replacementString:alternativeStrings:)] pub unsafe fn correctionCheckingResultWithRange_replacementString_alternativeStrings( range: NSRange, replacementString: &NSString, alternativeStrings: &NSArray, ) -> Id; - # [method_id (regularExpressionCheckingResultWithRanges : count : regularExpression :)] + #[method_id(regularExpressionCheckingResultWithRanges:count:regularExpression:)] pub unsafe fn regularExpressionCheckingResultWithRanges_count_regularExpression( ranges: NSRangePointer, count: NSUInteger, regularExpression: &NSRegularExpression, ) -> Id; - # [method_id (phoneNumberCheckingResultWithRange : phoneNumber :)] + #[method_id(phoneNumberCheckingResultWithRange:phoneNumber:)] pub unsafe fn phoneNumberCheckingResultWithRange_phoneNumber( range: NSRange, phoneNumber: &NSString, ) -> Id; - # [method_id (transitInformationCheckingResultWithRange : components :)] + #[method_id(transitInformationCheckingResultWithRange:components:)] pub unsafe fn transitInformationCheckingResultWithRange_components( range: NSRange, components: &NSDictionary, diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 60d3b9e62..274ea6428 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -21,9 +21,9 @@ extern_methods!( unsafe impl NSThread { #[method_id(currentThread)] pub unsafe fn currentThread() -> Id; - # [method (detachNewThreadWithBlock :)] + #[method(detachNewThreadWithBlock:)] pub unsafe fn detachNewThreadWithBlock(block: TodoBlock); - # [method (detachNewThreadSelector : toTarget : withObject :)] + #[method(detachNewThreadSelector:toTarget:withObject:)] pub unsafe fn detachNewThreadSelector_toTarget_withObject( selector: Sel, target: &Object, @@ -33,23 +33,23 @@ extern_methods!( pub unsafe fn isMultiThreaded() -> bool; #[method_id(threadDictionary)] pub unsafe fn threadDictionary(&self) -> Id; - # [method (sleepUntilDate :)] + #[method(sleepUntilDate:)] pub unsafe fn sleepUntilDate(date: &NSDate); - # [method (sleepForTimeInterval :)] + #[method(sleepForTimeInterval:)] pub unsafe fn sleepForTimeInterval(ti: NSTimeInterval); #[method(exit)] pub unsafe fn exit(); #[method(threadPriority)] pub unsafe fn threadPriority() -> c_double; - # [method (setThreadPriority :)] + #[method(setThreadPriority:)] pub unsafe fn setThreadPriority(p: c_double) -> bool; #[method(threadPriority)] pub unsafe fn threadPriority(&self) -> c_double; - # [method (setThreadPriority :)] + #[method(setThreadPriority:)] pub unsafe fn setThreadPriority(&self, threadPriority: c_double); #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; - # [method (setQualityOfService :)] + #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); #[method_id(callStackReturnAddresses)] pub unsafe fn callStackReturnAddresses() -> Id, Shared>; @@ -57,11 +57,11 @@ extern_methods!( pub unsafe fn callStackSymbols() -> Id, Shared>; #[method_id(name)] pub unsafe fn name(&self) -> Option>; - # [method (setName :)] + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); #[method(stackSize)] pub unsafe fn stackSize(&self) -> NSUInteger; - # [method (setStackSize :)] + #[method(setStackSize:)] pub unsafe fn setStackSize(&self, stackSize: NSUInteger); #[method(isMainThread)] pub unsafe fn isMainThread(&self) -> bool; @@ -71,14 +71,14 @@ extern_methods!( pub unsafe fn mainThread() -> Id; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithTarget : selector : object :)] + #[method_id(initWithTarget:selector:object:)] pub unsafe fn initWithTarget_selector_object( &self, target: &Object, selector: Sel, argument: Option<&Object>, ) -> Id; - # [method_id (initWithBlock :)] + #[method_id(initWithBlock:)] pub unsafe fn initWithBlock(&self, block: TodoBlock) -> Id; #[method(isExecuting)] pub unsafe fn isExecuting(&self) -> bool; @@ -97,7 +97,7 @@ extern_methods!( extern_methods!( #[doc = "NSThreadPerformAdditions"] unsafe impl NSObject { - # [method (performSelectorOnMainThread : withObject : waitUntilDone : modes :)] + #[method(performSelectorOnMainThread:withObject:waitUntilDone:modes:)] pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone_modes( &self, aSelector: Sel, @@ -105,14 +105,14 @@ extern_methods!( wait: bool, array: Option<&NSArray>, ); - # [method (performSelectorOnMainThread : withObject : waitUntilDone :)] + #[method(performSelectorOnMainThread:withObject:waitUntilDone:)] pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone( &self, aSelector: Sel, arg: Option<&Object>, wait: bool, ); - # [method (performSelector : onThread : withObject : waitUntilDone : modes :)] + #[method(performSelector:onThread:withObject:waitUntilDone:modes:)] pub unsafe fn performSelector_onThread_withObject_waitUntilDone_modes( &self, aSelector: Sel, @@ -121,7 +121,7 @@ extern_methods!( wait: bool, array: Option<&NSArray>, ); - # [method (performSelector : onThread : withObject : waitUntilDone :)] + #[method(performSelector:onThread:withObject:waitUntilDone:)] pub unsafe fn performSelector_onThread_withObject_waitUntilDone( &self, aSelector: Sel, @@ -129,7 +129,7 @@ extern_methods!( arg: Option<&Object>, wait: bool, ); - # [method (performSelectorInBackground : withObject :)] + #[method(performSelectorInBackground:withObject:)] pub unsafe fn performSelectorInBackground_withObject( &self, aSelector: Sel, diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 5dfef59f4..70b5d97f0 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -24,15 +24,15 @@ extern_methods!( pub unsafe fn name(&self) -> Id; #[method_id(data)] pub unsafe fn data(&self) -> Id; - # [method (secondsFromGMTForDate :)] + #[method(secondsFromGMTForDate:)] pub unsafe fn secondsFromGMTForDate(&self, aDate: &NSDate) -> NSInteger; - # [method_id (abbreviationForDate :)] + #[method_id(abbreviationForDate:)] pub unsafe fn abbreviationForDate(&self, aDate: &NSDate) -> Option>; - # [method (isDaylightSavingTimeForDate :)] + #[method(isDaylightSavingTimeForDate:)] pub unsafe fn isDaylightSavingTimeForDate(&self, aDate: &NSDate) -> bool; - # [method (daylightSavingTimeOffsetForDate :)] + #[method(daylightSavingTimeOffsetForDate:)] pub unsafe fn daylightSavingTimeOffsetForDate(&self, aDate: &NSDate) -> NSTimeInterval; - # [method_id (nextDaylightSavingTimeTransitionAfterDate :)] + #[method_id(nextDaylightSavingTimeTransitionAfterDate:)] pub unsafe fn nextDaylightSavingTimeTransitionAfterDate( &self, aDate: &NSDate, @@ -48,7 +48,7 @@ extern_methods!( pub unsafe fn resetSystemTimeZone(); #[method_id(defaultTimeZone)] pub unsafe fn defaultTimeZone() -> Id; - # [method (setDefaultTimeZone :)] + #[method(setDefaultTimeZone:)] pub unsafe fn setDefaultTimeZone(defaultTimeZone: &NSTimeZone); #[method_id(localTimeZone)] pub unsafe fn localTimeZone() -> Id; @@ -56,7 +56,7 @@ extern_methods!( pub unsafe fn knownTimeZoneNames() -> Id, Shared>; #[method_id(abbreviationDictionary)] pub unsafe fn abbreviationDictionary() -> Id, Shared>; - # [method (setAbbreviationDictionary :)] + #[method(setAbbreviationDictionary:)] pub unsafe fn setAbbreviationDictionary( abbreviationDictionary: &NSDictionary, ); @@ -74,9 +74,9 @@ extern_methods!( pub unsafe fn nextDaylightSavingTimeTransition(&self) -> Option>; #[method_id(description)] pub unsafe fn description(&self) -> Id; - # [method (isEqualToTimeZone :)] + #[method(isEqualToTimeZone:)] pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool; - # [method_id (localizedName : locale :)] + #[method_id(localizedName:locale:)] pub unsafe fn localizedName_locale( &self, style: NSTimeZoneNameStyle, @@ -87,24 +87,24 @@ extern_methods!( extern_methods!( #[doc = "NSTimeZoneCreation"] unsafe impl NSTimeZone { - # [method_id (timeZoneWithName :)] + #[method_id(timeZoneWithName:)] pub unsafe fn timeZoneWithName(tzName: &NSString) -> Option>; - # [method_id (timeZoneWithName : data :)] + #[method_id(timeZoneWithName:data:)] pub unsafe fn timeZoneWithName_data( tzName: &NSString, aData: Option<&NSData>, ) -> Option>; - # [method_id (initWithName :)] + #[method_id(initWithName:)] pub unsafe fn initWithName(&self, tzName: &NSString) -> Option>; - # [method_id (initWithName : data :)] + #[method_id(initWithName:data:)] pub unsafe fn initWithName_data( &self, tzName: &NSString, aData: Option<&NSData>, ) -> Option>; - # [method_id (timeZoneForSecondsFromGMT :)] + #[method_id(timeZoneForSecondsFromGMT:)] pub unsafe fn timeZoneForSecondsFromGMT(seconds: NSInteger) -> Id; - # [method_id (timeZoneWithAbbreviation :)] + #[method_id(timeZoneWithAbbreviation:)] pub unsafe fn timeZoneWithAbbreviation(abbreviation: &NSString) -> Option>; } diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 9bb7632a0..631823d55 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -13,19 +13,19 @@ extern_class!( ); extern_methods!( unsafe impl NSTimer { - # [method_id (timerWithTimeInterval : invocation : repeats :)] + #[method_id(timerWithTimeInterval:invocation:repeats:)] pub unsafe fn timerWithTimeInterval_invocation_repeats( ti: NSTimeInterval, invocation: &NSInvocation, yesOrNo: bool, ) -> Id; - # [method_id (scheduledTimerWithTimeInterval : invocation : repeats :)] + #[method_id(scheduledTimerWithTimeInterval:invocation:repeats:)] pub unsafe fn scheduledTimerWithTimeInterval_invocation_repeats( ti: NSTimeInterval, invocation: &NSInvocation, yesOrNo: bool, ) -> Id; - # [method_id (timerWithTimeInterval : target : selector : userInfo : repeats :)] + #[method_id(timerWithTimeInterval:target:selector:userInfo:repeats:)] pub unsafe fn timerWithTimeInterval_target_selector_userInfo_repeats( ti: NSTimeInterval, aTarget: &Object, @@ -33,7 +33,7 @@ extern_methods!( userInfo: Option<&Object>, yesOrNo: bool, ) -> Id; - # [method_id (scheduledTimerWithTimeInterval : target : selector : userInfo : repeats :)] + #[method_id(scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:)] pub unsafe fn scheduledTimerWithTimeInterval_target_selector_userInfo_repeats( ti: NSTimeInterval, aTarget: &Object, @@ -41,19 +41,19 @@ extern_methods!( userInfo: Option<&Object>, yesOrNo: bool, ) -> Id; - # [method_id (timerWithTimeInterval : repeats : block :)] + #[method_id(timerWithTimeInterval:repeats:block:)] pub unsafe fn timerWithTimeInterval_repeats_block( interval: NSTimeInterval, repeats: bool, block: TodoBlock, ) -> Id; - # [method_id (scheduledTimerWithTimeInterval : repeats : block :)] + #[method_id(scheduledTimerWithTimeInterval:repeats:block:)] pub unsafe fn scheduledTimerWithTimeInterval_repeats_block( interval: NSTimeInterval, repeats: bool, block: TodoBlock, ) -> Id; - # [method_id (initWithFireDate : interval : repeats : block :)] + #[method_id(initWithFireDate:interval:repeats:block:)] pub unsafe fn initWithFireDate_interval_repeats_block( &self, date: &NSDate, @@ -61,7 +61,7 @@ extern_methods!( repeats: bool, block: TodoBlock, ) -> Id; - # [method_id (initWithFireDate : interval : target : selector : userInfo : repeats :)] + #[method_id(initWithFireDate:interval:target:selector:userInfo:repeats:)] pub unsafe fn initWithFireDate_interval_target_selector_userInfo_repeats( &self, date: &NSDate, @@ -75,13 +75,13 @@ extern_methods!( pub unsafe fn fire(&self); #[method_id(fireDate)] pub unsafe fn fireDate(&self) -> Id; - # [method (setFireDate :)] + #[method(setFireDate:)] pub unsafe fn setFireDate(&self, fireDate: &NSDate); #[method(timeInterval)] pub unsafe fn timeInterval(&self) -> NSTimeInterval; #[method(tolerance)] pub unsafe fn tolerance(&self) -> NSTimeInterval; - # [method (setTolerance :)] + #[method(setTolerance:)] pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval); #[method(invalidate)] pub unsafe fn invalidate(&self); diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index fa00b09ca..2d5901857 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -28,98 +28,98 @@ extern_class!( ); extern_methods!( unsafe impl NSURL { - # [method_id (initWithScheme : host : path :)] + #[method_id(initWithScheme:host:path:)] pub unsafe fn initWithScheme_host_path( &self, scheme: &NSString, host: Option<&NSString>, path: &NSString, ) -> Option>; - # [method_id (initFileURLWithPath : isDirectory : relativeToURL :)] + #[method_id(initFileURLWithPath:isDirectory:relativeToURL:)] pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL( &self, path: &NSString, isDir: bool, baseURL: Option<&NSURL>, ) -> Id; - # [method_id (initFileURLWithPath : relativeToURL :)] + #[method_id(initFileURLWithPath:relativeToURL:)] pub unsafe fn initFileURLWithPath_relativeToURL( &self, path: &NSString, baseURL: Option<&NSURL>, ) -> Id; - # [method_id (initFileURLWithPath : isDirectory :)] + #[method_id(initFileURLWithPath:isDirectory:)] pub unsafe fn initFileURLWithPath_isDirectory( &self, path: &NSString, isDir: bool, ) -> Id; - # [method_id (initFileURLWithPath :)] + #[method_id(initFileURLWithPath:)] pub unsafe fn initFileURLWithPath(&self, path: &NSString) -> Id; - # [method_id (fileURLWithPath : isDirectory : relativeToURL :)] + #[method_id(fileURLWithPath:isDirectory:relativeToURL:)] pub unsafe fn fileURLWithPath_isDirectory_relativeToURL( path: &NSString, isDir: bool, baseURL: Option<&NSURL>, ) -> Id; - # [method_id (fileURLWithPath : relativeToURL :)] + #[method_id(fileURLWithPath:relativeToURL:)] pub unsafe fn fileURLWithPath_relativeToURL( path: &NSString, baseURL: Option<&NSURL>, ) -> Id; - # [method_id (fileURLWithPath : isDirectory :)] + #[method_id(fileURLWithPath:isDirectory:)] pub unsafe fn fileURLWithPath_isDirectory( path: &NSString, isDir: bool, ) -> Id; - # [method_id (fileURLWithPath :)] + #[method_id(fileURLWithPath:)] pub unsafe fn fileURLWithPath(path: &NSString) -> Id; - # [method_id (initFileURLWithFileSystemRepresentation : isDirectory : relativeToURL :)] + #[method_id(initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL( &self, path: NonNull, isDir: bool, baseURL: Option<&NSURL>, ) -> Id; - # [method_id (fileURLWithFileSystemRepresentation : isDirectory : relativeToURL :)] + #[method_id(fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL( path: NonNull, isDir: bool, baseURL: Option<&NSURL>, ) -> Id; - # [method_id (initWithString :)] + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, URLString: &NSString) -> Option>; - # [method_id (initWithString : relativeToURL :)] + #[method_id(initWithString:relativeToURL:)] pub unsafe fn initWithString_relativeToURL( &self, URLString: &NSString, baseURL: Option<&NSURL>, ) -> Option>; - # [method_id (URLWithString :)] + #[method_id(URLWithString:)] pub unsafe fn URLWithString(URLString: &NSString) -> Option>; - # [method_id (URLWithString : relativeToURL :)] + #[method_id(URLWithString:relativeToURL:)] pub unsafe fn URLWithString_relativeToURL( URLString: &NSString, baseURL: Option<&NSURL>, ) -> Option>; - # [method_id (initWithDataRepresentation : relativeToURL :)] + #[method_id(initWithDataRepresentation:relativeToURL:)] pub unsafe fn initWithDataRepresentation_relativeToURL( &self, data: &NSData, baseURL: Option<&NSURL>, ) -> Id; - # [method_id (URLWithDataRepresentation : relativeToURL :)] + #[method_id(URLWithDataRepresentation:relativeToURL:)] pub unsafe fn URLWithDataRepresentation_relativeToURL( data: &NSData, baseURL: Option<&NSURL>, ) -> Id; - # [method_id (initAbsoluteURLWithDataRepresentation : relativeToURL :)] + #[method_id(initAbsoluteURLWithDataRepresentation:relativeToURL:)] pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL( &self, data: &NSData, baseURL: Option<&NSURL>, ) -> Id; - # [method_id (absoluteURLWithDataRepresentation : relativeToURL :)] + #[method_id(absoluteURLWithDataRepresentation:relativeToURL:)] pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL( data: &NSData, baseURL: Option<&NSURL>, @@ -158,7 +158,7 @@ extern_methods!( pub unsafe fn relativePath(&self) -> Option>; #[method(hasDirectoryPath)] pub unsafe fn hasDirectoryPath(&self) -> bool; - # [method (getFileSystemRepresentation : maxLength :)] + #[method(getFileSystemRepresentation:maxLength:)] pub unsafe fn getFileSystemRepresentation_maxLength( &self, buffer: NonNull, @@ -170,7 +170,7 @@ extern_methods!( pub unsafe fn isFileURL(&self) -> bool; #[method_id(standardizedURL)] pub unsafe fn standardizedURL(&self) -> Option>; - # [method (checkResourceIsReachableAndReturnError :)] + #[method(checkResourceIsReachableAndReturnError:)] pub unsafe fn checkResourceIsReachableAndReturnError( &self, ) -> Result<(), Id>; @@ -180,46 +180,46 @@ extern_methods!( pub unsafe fn fileReferenceURL(&self) -> Option>; #[method_id(filePathURL)] pub unsafe fn filePathURL(&self) -> Option>; - # [method (getResourceValue : forKey : error :)] + #[method(getResourceValue:forKey:error:)] pub unsafe fn getResourceValue_forKey_error( &self, value: &mut Option>, key: &NSURLResourceKey, ) -> Result<(), Id>; - # [method_id (resourceValuesForKeys : error :)] + #[method_id(resourceValuesForKeys:error:)] pub unsafe fn resourceValuesForKeys_error( &self, keys: &NSArray, ) -> Result, Shared>, Id>; - # [method (setResourceValue : forKey : error :)] + #[method(setResourceValue:forKey:error:)] pub unsafe fn setResourceValue_forKey_error( &self, value: Option<&Object>, key: &NSURLResourceKey, ) -> Result<(), Id>; - # [method (setResourceValues : error :)] + #[method(setResourceValues:error:)] pub unsafe fn setResourceValues_error( &self, keyedValues: &NSDictionary, ) -> Result<(), Id>; - # [method (removeCachedResourceValueForKey :)] + #[method(removeCachedResourceValueForKey:)] pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey); #[method(removeAllCachedResourceValues)] pub unsafe fn removeAllCachedResourceValues(&self); - # [method (setTemporaryResourceValue : forKey :)] + #[method(setTemporaryResourceValue:forKey:)] pub unsafe fn setTemporaryResourceValue_forKey( &self, value: Option<&Object>, key: &NSURLResourceKey, ); - # [method_id (bookmarkDataWithOptions : includingResourceValuesForKeys : relativeToURL : error :)] + #[method_id(bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:)] pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error( &self, options: NSURLBookmarkCreationOptions, keys: Option<&NSArray>, relativeURL: Option<&NSURL>, ) -> Result, Id>; - # [method_id (initByResolvingBookmarkData : options : relativeToURL : bookmarkDataIsStale : error :)] + #[method_id(initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( &self, bookmarkData: &NSData, @@ -227,29 +227,29 @@ extern_methods!( relativeURL: Option<&NSURL>, isStale: *mut bool, ) -> Result, Id>; - # [method_id (URLByResolvingBookmarkData : options : relativeToURL : bookmarkDataIsStale : error :)] + #[method_id(URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( bookmarkData: &NSData, options: NSURLBookmarkResolutionOptions, relativeURL: Option<&NSURL>, isStale: *mut bool, ) -> Result, Id>; - # [method_id (resourceValuesForKeys : fromBookmarkData :)] + #[method_id(resourceValuesForKeys:fromBookmarkData:)] pub unsafe fn resourceValuesForKeys_fromBookmarkData( keys: &NSArray, bookmarkData: &NSData, ) -> Option, Shared>>; - # [method (writeBookmarkData : toURL : options : error :)] + #[method(writeBookmarkData:toURL:options:error:)] pub unsafe fn writeBookmarkData_toURL_options_error( bookmarkData: &NSData, bookmarkFileURL: &NSURL, options: NSURLBookmarkFileCreationOptions, ) -> Result<(), Id>; - # [method_id (bookmarkDataWithContentsOfURL : error :)] + #[method_id(bookmarkDataWithContentsOfURL:error:)] pub unsafe fn bookmarkDataWithContentsOfURL_error( bookmarkFileURL: &NSURL, ) -> Result, Id>; - # [method_id (URLByResolvingAliasFileAtURL : options : error :)] + #[method_id(URLByResolvingAliasFileAtURL:options:error:)] pub unsafe fn URLByResolvingAliasFileAtURL_options_error( url: &NSURL, options: NSURLBookmarkResolutionOptions, @@ -263,18 +263,18 @@ extern_methods!( extern_methods!( #[doc = "NSPromisedItems"] unsafe impl NSURL { - # [method (getPromisedItemResourceValue : forKey : error :)] + #[method(getPromisedItemResourceValue:forKey:error:)] pub unsafe fn getPromisedItemResourceValue_forKey_error( &self, value: &mut Option>, key: &NSURLResourceKey, ) -> Result<(), Id>; - # [method_id (promisedItemResourceValuesForKeys : error :)] + #[method_id(promisedItemResourceValuesForKeys:error:)] pub unsafe fn promisedItemResourceValuesForKeys_error( &self, keys: &NSArray, ) -> Result, Shared>, Id>; - # [method (checkPromisedItemIsReachableAndReturnError :)] + #[method(checkPromisedItemIsReachableAndReturnError:)] pub unsafe fn checkPromisedItemIsReachableAndReturnError( &self, ) -> Result<(), Id>; @@ -293,13 +293,13 @@ extern_class!( ); extern_methods!( unsafe impl NSURLQueryItem { - # [method_id (initWithName : value :)] + #[method_id(initWithName:value:)] pub unsafe fn initWithName_value( &self, name: &NSString, value: Option<&NSString>, ) -> Id; - # [method_id (queryItemWithName : value :)] + #[method_id(queryItemWithName:value:)] pub unsafe fn queryItemWithName_value( name: &NSString, value: Option<&NSString>, @@ -321,83 +321,83 @@ extern_methods!( unsafe impl NSURLComponents { #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithURL : resolvingAgainstBaseURL :)] + #[method_id(initWithURL:resolvingAgainstBaseURL:)] pub unsafe fn initWithURL_resolvingAgainstBaseURL( &self, url: &NSURL, resolve: bool, ) -> Option>; - # [method_id (componentsWithURL : resolvingAgainstBaseURL :)] + #[method_id(componentsWithURL:resolvingAgainstBaseURL:)] pub unsafe fn componentsWithURL_resolvingAgainstBaseURL( url: &NSURL, resolve: bool, ) -> Option>; - # [method_id (initWithString :)] + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, URLString: &NSString) -> Option>; - # [method_id (componentsWithString :)] + #[method_id(componentsWithString:)] pub unsafe fn componentsWithString(URLString: &NSString) -> Option>; #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; - # [method_id (URLRelativeToURL :)] + #[method_id(URLRelativeToURL:)] pub unsafe fn URLRelativeToURL(&self, baseURL: Option<&NSURL>) -> Option>; #[method_id(string)] pub unsafe fn string(&self) -> Option>; #[method_id(scheme)] pub unsafe fn scheme(&self) -> Option>; - # [method (setScheme :)] + #[method(setScheme:)] pub unsafe fn setScheme(&self, scheme: Option<&NSString>); #[method_id(user)] pub unsafe fn user(&self) -> Option>; - # [method (setUser :)] + #[method(setUser:)] pub unsafe fn setUser(&self, user: Option<&NSString>); #[method_id(password)] pub unsafe fn password(&self) -> Option>; - # [method (setPassword :)] + #[method(setPassword:)] pub unsafe fn setPassword(&self, password: Option<&NSString>); #[method_id(host)] pub unsafe fn host(&self) -> Option>; - # [method (setHost :)] + #[method(setHost:)] pub unsafe fn setHost(&self, host: Option<&NSString>); #[method_id(port)] pub unsafe fn port(&self) -> Option>; - # [method (setPort :)] + #[method(setPort:)] pub unsafe fn setPort(&self, port: Option<&NSNumber>); #[method_id(path)] pub unsafe fn path(&self) -> Option>; - # [method (setPath :)] + #[method(setPath:)] pub unsafe fn setPath(&self, path: Option<&NSString>); #[method_id(query)] pub unsafe fn query(&self) -> Option>; - # [method (setQuery :)] + #[method(setQuery:)] pub unsafe fn setQuery(&self, query: Option<&NSString>); #[method_id(fragment)] pub unsafe fn fragment(&self) -> Option>; - # [method (setFragment :)] + #[method(setFragment:)] pub unsafe fn setFragment(&self, fragment: Option<&NSString>); #[method_id(percentEncodedUser)] pub unsafe fn percentEncodedUser(&self) -> Option>; - # [method (setPercentEncodedUser :)] + #[method(setPercentEncodedUser:)] pub unsafe fn setPercentEncodedUser(&self, percentEncodedUser: Option<&NSString>); #[method_id(percentEncodedPassword)] pub unsafe fn percentEncodedPassword(&self) -> Option>; - # [method (setPercentEncodedPassword :)] + #[method(setPercentEncodedPassword:)] pub unsafe fn setPercentEncodedPassword(&self, percentEncodedPassword: Option<&NSString>); #[method_id(percentEncodedHost)] pub unsafe fn percentEncodedHost(&self) -> Option>; - # [method (setPercentEncodedHost :)] + #[method(setPercentEncodedHost:)] pub unsafe fn setPercentEncodedHost(&self, percentEncodedHost: Option<&NSString>); #[method_id(percentEncodedPath)] pub unsafe fn percentEncodedPath(&self) -> Option>; - # [method (setPercentEncodedPath :)] + #[method(setPercentEncodedPath:)] pub unsafe fn setPercentEncodedPath(&self, percentEncodedPath: Option<&NSString>); #[method_id(percentEncodedQuery)] pub unsafe fn percentEncodedQuery(&self) -> Option>; - # [method (setPercentEncodedQuery :)] + #[method(setPercentEncodedQuery:)] pub unsafe fn setPercentEncodedQuery(&self, percentEncodedQuery: Option<&NSString>); #[method_id(percentEncodedFragment)] pub unsafe fn percentEncodedFragment(&self) -> Option>; - # [method (setPercentEncodedFragment :)] + #[method(setPercentEncodedFragment:)] pub unsafe fn setPercentEncodedFragment(&self, percentEncodedFragment: Option<&NSString>); #[method(rangeOfScheme)] pub unsafe fn rangeOfScheme(&self) -> NSRange; @@ -417,13 +417,13 @@ extern_methods!( pub unsafe fn rangeOfFragment(&self) -> NSRange; #[method_id(queryItems)] pub unsafe fn queryItems(&self) -> Option, Shared>>; - # [method (setQueryItems :)] + #[method(setQueryItems:)] pub unsafe fn setQueryItems(&self, queryItems: Option<&NSArray>); #[method_id(percentEncodedQueryItems)] pub unsafe fn percentEncodedQueryItems( &self, ) -> Option, Shared>>; - # [method (setPercentEncodedQueryItems :)] + #[method(setPercentEncodedQueryItems:)] pub unsafe fn setPercentEncodedQueryItems( &self, percentEncodedQueryItems: Option<&NSArray>, @@ -450,19 +450,19 @@ extern_methods!( extern_methods!( #[doc = "NSURLUtilities"] unsafe impl NSString { - # [method_id (stringByAddingPercentEncodingWithAllowedCharacters :)] + #[method_id(stringByAddingPercentEncodingWithAllowedCharacters:)] pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters( &self, allowedCharacters: &NSCharacterSet, ) -> Option>; #[method_id(stringByRemovingPercentEncoding)] pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option>; - # [method_id (stringByAddingPercentEscapesUsingEncoding :)] + #[method_id(stringByAddingPercentEscapesUsingEncoding:)] pub unsafe fn stringByAddingPercentEscapesUsingEncoding( &self, enc: NSStringEncoding, ) -> Option>; - # [method_id (stringByReplacingPercentEscapesUsingEncoding :)] + #[method_id(stringByReplacingPercentEscapesUsingEncoding:)] pub unsafe fn stringByReplacingPercentEscapesUsingEncoding( &self, enc: NSStringEncoding, @@ -472,7 +472,7 @@ extern_methods!( extern_methods!( #[doc = "NSURLPathUtilities"] unsafe impl NSURL { - # [method_id (fileURLWithPathComponents :)] + #[method_id(fileURLWithPathComponents:)] pub unsafe fn fileURLWithPathComponents( components: &NSArray, ) -> Option>; @@ -482,12 +482,12 @@ extern_methods!( pub unsafe fn lastPathComponent(&self) -> Option>; #[method_id(pathExtension)] pub unsafe fn pathExtension(&self) -> Option>; - # [method_id (URLByAppendingPathComponent :)] + #[method_id(URLByAppendingPathComponent:)] pub unsafe fn URLByAppendingPathComponent( &self, pathComponent: &NSString, ) -> Option>; - # [method_id (URLByAppendingPathComponent : isDirectory :)] + #[method_id(URLByAppendingPathComponent:isDirectory:)] pub unsafe fn URLByAppendingPathComponent_isDirectory( &self, pathComponent: &NSString, @@ -495,7 +495,7 @@ extern_methods!( ) -> Option>; #[method_id(URLByDeletingLastPathComponent)] pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option>; - # [method_id (URLByAppendingPathExtension :)] + #[method_id(URLByAppendingPathExtension:)] pub unsafe fn URLByAppendingPathExtension( &self, pathExtension: &NSString, @@ -517,20 +517,20 @@ extern_class!( ); extern_methods!( unsafe impl NSFileSecurity { - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSURLClient"] unsafe impl NSObject { - # [method (URL : resourceDataDidBecomeAvailable :)] + #[method(URL:resourceDataDidBecomeAvailable:)] pub unsafe fn URL_resourceDataDidBecomeAvailable(&self, sender: &NSURL, newBytes: &NSData); - # [method (URLResourceDidFinishLoading :)] + #[method(URLResourceDidFinishLoading:)] pub unsafe fn URLResourceDidFinishLoading(&self, sender: &NSURL); - # [method (URLResourceDidCancelLoading :)] + #[method(URLResourceDidCancelLoading:)] pub unsafe fn URLResourceDidCancelLoading(&self, sender: &NSURL); - # [method (URL : resourceDidFailLoadingWithReason :)] + #[method(URL:resourceDidFailLoadingWithReason:)] pub unsafe fn URL_resourceDidFailLoadingWithReason( &self, sender: &NSURL, @@ -541,24 +541,24 @@ extern_methods!( extern_methods!( #[doc = "NSURLLoading"] unsafe impl NSURL { - # [method_id (resourceDataUsingCache :)] + #[method_id(resourceDataUsingCache:)] pub unsafe fn resourceDataUsingCache( &self, shouldUseCache: bool, ) -> Option>; - # [method (loadResourceDataNotifyingClient : usingCache :)] + #[method(loadResourceDataNotifyingClient:usingCache:)] pub unsafe fn loadResourceDataNotifyingClient_usingCache( &self, client: &Object, shouldUseCache: bool, ); - # [method_id (propertyForKey :)] + #[method_id(propertyForKey:)] pub unsafe fn propertyForKey(&self, propertyKey: &NSString) -> Option>; - # [method (setResourceData :)] + #[method(setResourceData:)] pub unsafe fn setResourceData(&self, data: &NSData) -> bool; - # [method (setProperty : forKey :)] + #[method(setProperty:forKey:)] pub unsafe fn setProperty_forKey(&self, property: &Object, propertyKey: &NSString) -> bool; - # [method_id (URLHandleUsingCache :)] + #[method_id(URLHandleUsingCache:)] pub unsafe fn URLHandleUsingCache( &self, shouldUseCache: bool, diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index 7ae011b46..fb4273222 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -18,7 +18,7 @@ extern_class!( ); extern_methods!( unsafe impl NSURLAuthenticationChallenge { - # [method_id (initWithProtectionSpace : proposedCredential : previousFailureCount : failureResponse : error : sender :)] + #[method_id(initWithProtectionSpace:proposedCredential:previousFailureCount:failureResponse:error:sender:)] pub unsafe fn initWithProtectionSpace_proposedCredential_previousFailureCount_failureResponse_error_sender( &self, space: &NSURLProtectionSpace, @@ -28,7 +28,7 @@ extern_methods!( error: Option<&NSError>, sender: &NSURLAuthenticationChallengeSender, ) -> Id; - # [method_id (initWithAuthenticationChallenge : sender :)] + #[method_id(initWithAuthenticationChallenge:sender:)] pub unsafe fn initWithAuthenticationChallenge_sender( &self, challenge: &NSURLAuthenticationChallenge, diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index f153d432c..92609b12d 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -19,13 +19,13 @@ extern_class!( ); extern_methods!( unsafe impl NSCachedURLResponse { - # [method_id (initWithResponse : data :)] + #[method_id(initWithResponse:data:)] pub unsafe fn initWithResponse_data( &self, response: &NSURLResponse, data: &NSData, ) -> Id; - # [method_id (initWithResponse : data : userInfo : storagePolicy :)] + #[method_id(initWithResponse:data:userInfo:storagePolicy:)] pub unsafe fn initWithResponse_data_userInfo_storagePolicy( &self, response: &NSURLResponse, @@ -56,46 +56,46 @@ extern_methods!( unsafe impl NSURLCache { #[method_id(sharedURLCache)] pub unsafe fn sharedURLCache() -> Id; - # [method (setSharedURLCache :)] + #[method(setSharedURLCache:)] pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache); - # [method_id (initWithMemoryCapacity : diskCapacity : diskPath :)] + #[method_id(initWithMemoryCapacity:diskCapacity:diskPath:)] pub unsafe fn initWithMemoryCapacity_diskCapacity_diskPath( &self, memoryCapacity: NSUInteger, diskCapacity: NSUInteger, path: Option<&NSString>, ) -> Id; - # [method_id (initWithMemoryCapacity : diskCapacity : directoryURL :)] + #[method_id(initWithMemoryCapacity:diskCapacity:directoryURL:)] pub unsafe fn initWithMemoryCapacity_diskCapacity_directoryURL( &self, memoryCapacity: NSUInteger, diskCapacity: NSUInteger, directoryURL: Option<&NSURL>, ) -> Id; - # [method_id (cachedResponseForRequest :)] + #[method_id(cachedResponseForRequest:)] pub unsafe fn cachedResponseForRequest( &self, request: &NSURLRequest, ) -> Option>; - # [method (storeCachedResponse : forRequest :)] + #[method(storeCachedResponse:forRequest:)] pub unsafe fn storeCachedResponse_forRequest( &self, cachedResponse: &NSCachedURLResponse, request: &NSURLRequest, ); - # [method (removeCachedResponseForRequest :)] + #[method(removeCachedResponseForRequest:)] pub unsafe fn removeCachedResponseForRequest(&self, request: &NSURLRequest); #[method(removeAllCachedResponses)] pub unsafe fn removeAllCachedResponses(&self); - # [method (removeCachedResponsesSinceDate :)] + #[method(removeCachedResponsesSinceDate:)] pub unsafe fn removeCachedResponsesSinceDate(&self, date: &NSDate); #[method(memoryCapacity)] pub unsafe fn memoryCapacity(&self) -> NSUInteger; - # [method (setMemoryCapacity :)] + #[method(setMemoryCapacity:)] pub unsafe fn setMemoryCapacity(&self, memoryCapacity: NSUInteger); #[method(diskCapacity)] pub unsafe fn diskCapacity(&self) -> NSUInteger; - # [method (setDiskCapacity :)] + #[method(setDiskCapacity:)] pub unsafe fn setDiskCapacity(&self, diskCapacity: NSUInteger); #[method(currentMemoryUsage)] pub unsafe fn currentMemoryUsage(&self) -> NSUInteger; @@ -106,19 +106,19 @@ extern_methods!( extern_methods!( #[doc = "NSURLSessionTaskAdditions"] unsafe impl NSURLCache { - # [method (storeCachedResponse : forDataTask :)] + #[method(storeCachedResponse:forDataTask:)] pub unsafe fn storeCachedResponse_forDataTask( &self, cachedResponse: &NSCachedURLResponse, dataTask: &NSURLSessionDataTask, ); - # [method (getCachedResponseForDataTask : completionHandler :)] + #[method(getCachedResponseForDataTask:completionHandler:)] pub unsafe fn getCachedResponseForDataTask_completionHandler( &self, dataTask: &NSURLSessionDataTask, completionHandler: TodoBlock, ); - # [method (removeCachedResponseForDataTask :)] + #[method(removeCachedResponseForDataTask:)] pub unsafe fn removeCachedResponseForDataTask(&self, dataTask: &NSURLSessionDataTask); } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index c3ca51cbc..d103853ee 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -26,20 +26,20 @@ extern_class!( ); extern_methods!( unsafe impl NSURLConnection { - # [method_id (initWithRequest : delegate : startImmediately :)] + #[method_id(initWithRequest:delegate:startImmediately:)] pub unsafe fn initWithRequest_delegate_startImmediately( &self, request: &NSURLRequest, delegate: Option<&Object>, startImmediately: bool, ) -> Option>; - # [method_id (initWithRequest : delegate :)] + #[method_id(initWithRequest:delegate:)] pub unsafe fn initWithRequest_delegate( &self, request: &NSURLRequest, delegate: Option<&Object>, ) -> Option>; - # [method_id (connectionWithRequest : delegate :)] + #[method_id(connectionWithRequest:delegate:)] pub unsafe fn connectionWithRequest_delegate( request: &NSURLRequest, delegate: Option<&Object>, @@ -52,17 +52,17 @@ extern_methods!( pub unsafe fn start(&self); #[method(cancel)] pub unsafe fn cancel(&self); - # [method (scheduleInRunLoop : forMode :)] + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); - # [method (unscheduleFromRunLoop : forMode :)] + #[method(unscheduleFromRunLoop:forMode:)] pub unsafe fn unscheduleFromRunLoop_forMode( &self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode, ); - # [method (setDelegateQueue :)] + #[method(setDelegateQueue:)] pub unsafe fn setDelegateQueue(&self, queue: Option<&NSOperationQueue>); - # [method (canHandleRequest :)] + #[method(canHandleRequest:)] pub unsafe fn canHandleRequest(request: &NSURLRequest) -> bool; } ); @@ -72,7 +72,7 @@ pub type NSURLConnectionDownloadDelegate = NSObject; extern_methods!( #[doc = "NSURLConnectionSynchronousLoading"] unsafe impl NSURLConnection { - # [method_id (sendSynchronousRequest : returningResponse : error :)] + #[method_id(sendSynchronousRequest:returningResponse:error:)] pub unsafe fn sendSynchronousRequest_returningResponse_error( request: &NSURLRequest, response: Option<&mut Option>>, @@ -82,7 +82,7 @@ extern_methods!( extern_methods!( #[doc = "NSURLConnectionQueuedLoading"] unsafe impl NSURLConnection { - # [method (sendAsynchronousRequest : queue : completionHandler :)] + #[method(sendAsynchronousRequest:queue:completionHandler:)] pub unsafe fn sendAsynchronousRequest_queue_completionHandler( request: &NSURLRequest, queue: &NSOperationQueue, diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index 5b0e47810..95f411a1d 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -23,14 +23,14 @@ extern_methods!( extern_methods!( #[doc = "NSInternetPassword"] unsafe impl NSURLCredential { - # [method_id (initWithUser : password : persistence :)] + #[method_id(initWithUser:password:persistence:)] pub unsafe fn initWithUser_password_persistence( &self, user: &NSString, password: &NSString, persistence: NSURLCredentialPersistence, ) -> Id; - # [method_id (credentialWithUser : password : persistence :)] + #[method_id(credentialWithUser:password:persistence:)] pub unsafe fn credentialWithUser_password_persistence( user: &NSString, password: &NSString, @@ -47,14 +47,14 @@ extern_methods!( extern_methods!( #[doc = "NSClientCertificate"] unsafe impl NSURLCredential { - # [method_id (initWithIdentity : certificates : persistence :)] + #[method_id(initWithIdentity:certificates:persistence:)] pub unsafe fn initWithIdentity_certificates_persistence( &self, identity: SecIdentityRef, certArray: Option<&NSArray>, persistence: NSURLCredentialPersistence, ) -> Id; - # [method_id (credentialWithIdentity : certificates : persistence :)] + #[method_id(credentialWithIdentity:certificates:persistence:)] pub unsafe fn credentialWithIdentity_certificates_persistence( identity: SecIdentityRef, certArray: Option<&NSArray>, @@ -69,9 +69,9 @@ extern_methods!( extern_methods!( #[doc = "NSServerTrust"] unsafe impl NSURLCredential { - # [method_id (initWithTrust :)] + #[method_id(initWithTrust:)] pub unsafe fn initWithTrust(&self, trust: SecTrustRef) -> Id; - # [method_id (credentialForTrust :)] + #[method_id(credentialForTrust:)] pub unsafe fn credentialForTrust(trust: SecTrustRef) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 936fa5242..3c6d490d0 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -21,7 +21,7 @@ extern_methods!( unsafe impl NSURLCredentialStorage { #[method_id(sharedCredentialStorage)] pub unsafe fn sharedCredentialStorage() -> Id; - # [method_id (credentialsForProtectionSpace :)] + #[method_id(credentialsForProtectionSpace:)] pub unsafe fn credentialsForProtectionSpace( &self, space: &NSURLProtectionSpace, @@ -30,31 +30,31 @@ extern_methods!( pub unsafe fn allCredentials( &self, ) -> Id>, Shared>; - # [method (setCredential : forProtectionSpace :)] + #[method(setCredential:forProtectionSpace:)] pub unsafe fn setCredential_forProtectionSpace( &self, credential: &NSURLCredential, space: &NSURLProtectionSpace, ); - # [method (removeCredential : forProtectionSpace :)] + #[method(removeCredential:forProtectionSpace:)] pub unsafe fn removeCredential_forProtectionSpace( &self, credential: &NSURLCredential, space: &NSURLProtectionSpace, ); - # [method (removeCredential : forProtectionSpace : options :)] + #[method(removeCredential:forProtectionSpace:options:)] pub unsafe fn removeCredential_forProtectionSpace_options( &self, credential: &NSURLCredential, space: &NSURLProtectionSpace, options: Option<&NSDictionary>, ); - # [method_id (defaultCredentialForProtectionSpace :)] + #[method_id(defaultCredentialForProtectionSpace:)] pub unsafe fn defaultCredentialForProtectionSpace( &self, space: &NSURLProtectionSpace, ) -> Option>; - # [method (setDefaultCredential : forProtectionSpace :)] + #[method(setDefaultCredential:forProtectionSpace:)] pub unsafe fn setDefaultCredential_forProtectionSpace( &self, credential: &NSURLCredential, @@ -65,21 +65,21 @@ extern_methods!( extern_methods!( #[doc = "NSURLSessionTaskAdditions"] unsafe impl NSURLCredentialStorage { - # [method (getCredentialsForProtectionSpace : task : completionHandler :)] + #[method(getCredentialsForProtectionSpace:task:completionHandler:)] pub unsafe fn getCredentialsForProtectionSpace_task_completionHandler( &self, protectionSpace: &NSURLProtectionSpace, task: &NSURLSessionTask, completionHandler: TodoBlock, ); - # [method (setCredential : forProtectionSpace : task :)] + #[method(setCredential:forProtectionSpace:task:)] pub unsafe fn setCredential_forProtectionSpace_task( &self, credential: &NSURLCredential, protectionSpace: &NSURLProtectionSpace, task: &NSURLSessionTask, ); - # [method (removeCredential : forProtectionSpace : options : task :)] + #[method(removeCredential:forProtectionSpace:options:task:)] pub unsafe fn removeCredential_forProtectionSpace_options_task( &self, credential: &NSURLCredential, @@ -87,14 +87,14 @@ extern_methods!( options: Option<&NSDictionary>, task: &NSURLSessionTask, ); - # [method (getDefaultCredentialForProtectionSpace : task : completionHandler :)] + #[method(getDefaultCredentialForProtectionSpace:task:completionHandler:)] pub unsafe fn getDefaultCredentialForProtectionSpace_task_completionHandler( &self, space: &NSURLProtectionSpace, task: &NSURLSessionTask, completionHandler: TodoBlock, ); - # [method (setDefaultCredential : forProtectionSpace : task :)] + #[method(setDefaultCredential:forProtectionSpace:task:)] pub unsafe fn setDefaultCredential_forProtectionSpace_task( &self, credential: &NSURLCredential, diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index 7a90682d5..8355717c2 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -20,15 +20,15 @@ extern_class!( ); extern_methods!( unsafe impl NSURLDownload { - # [method (canResumeDownloadDecodedWithEncodingMIMEType :)] + #[method(canResumeDownloadDecodedWithEncodingMIMEType:)] pub unsafe fn canResumeDownloadDecodedWithEncodingMIMEType(MIMEType: &NSString) -> bool; - # [method_id (initWithRequest : delegate :)] + #[method_id(initWithRequest:delegate:)] pub unsafe fn initWithRequest_delegate( &self, request: &NSURLRequest, delegate: Option<&NSURLDownloadDelegate>, ) -> Id; - # [method_id (initWithResumeData : delegate : path :)] + #[method_id(initWithResumeData:delegate:path:)] pub unsafe fn initWithResumeData_delegate_path( &self, resumeData: &NSData, @@ -37,7 +37,7 @@ extern_methods!( ) -> Id; #[method(cancel)] pub unsafe fn cancel(&self); - # [method (setDestination : allowOverwrite :)] + #[method(setDestination:allowOverwrite:)] pub unsafe fn setDestination_allowOverwrite(&self, path: &NSString, allowOverwrite: bool); #[method_id(request)] pub unsafe fn request(&self) -> Id; @@ -45,7 +45,7 @@ extern_methods!( pub unsafe fn resumeData(&self) -> Option>; #[method(deletesFileUponFailure)] pub unsafe fn deletesFileUponFailure(&self) -> bool; - # [method (setDeletesFileUponFailure :)] + #[method(setDeletesFileUponFailure:)] pub unsafe fn setDeletesFileUponFailure(&self, deletesFileUponFailure: bool); } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 2dfd59950..e118d742e 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -17,17 +17,17 @@ extern_class!( ); extern_methods!( unsafe impl NSURLHandle { - # [method (registerURLHandleClass :)] + #[method(registerURLHandleClass:)] pub unsafe fn registerURLHandleClass(anURLHandleSubclass: Option<&Class>); - # [method (URLHandleClassForURL :)] + #[method(URLHandleClassForURL:)] pub unsafe fn URLHandleClassForURL(anURL: Option<&NSURL>) -> Option<&Class>; #[method(status)] pub unsafe fn status(&self) -> NSURLHandleStatus; #[method_id(failureReason)] pub unsafe fn failureReason(&self) -> Option>; - # [method (addClient :)] + #[method(addClient:)] pub unsafe fn addClient(&self, client: Option<&NSURLHandleClient>); - # [method (removeClient :)] + #[method(removeClient:)] pub unsafe fn removeClient(&self, client: Option<&NSURLHandleClient>); #[method(loadInBackground)] pub unsafe fn loadInBackground(&self); @@ -41,37 +41,37 @@ extern_methods!( pub unsafe fn expectedResourceDataSize(&self) -> c_longlong; #[method(flushCachedData)] pub unsafe fn flushCachedData(&self); - # [method (backgroundLoadDidFailWithReason :)] + #[method(backgroundLoadDidFailWithReason:)] pub unsafe fn backgroundLoadDidFailWithReason(&self, reason: Option<&NSString>); - # [method (didLoadBytes : loadComplete :)] + #[method(didLoadBytes:loadComplete:)] pub unsafe fn didLoadBytes_loadComplete(&self, newBytes: Option<&NSData>, yorn: bool); - # [method (canInitWithURL :)] + #[method(canInitWithURL:)] pub unsafe fn canInitWithURL(anURL: Option<&NSURL>) -> bool; - # [method_id (cachedHandleForURL :)] + #[method_id(cachedHandleForURL:)] pub unsafe fn cachedHandleForURL(anURL: Option<&NSURL>) -> Option>; - # [method_id (initWithURL : cached :)] + #[method_id(initWithURL:cached:)] pub unsafe fn initWithURL_cached( &self, anURL: Option<&NSURL>, willCache: bool, ) -> Option>; - # [method_id (propertyForKey :)] + #[method_id(propertyForKey:)] pub unsafe fn propertyForKey( &self, propertyKey: Option<&NSString>, ) -> Option>; - # [method_id (propertyForKeyIfAvailable :)] + #[method_id(propertyForKeyIfAvailable:)] pub unsafe fn propertyForKeyIfAvailable( &self, propertyKey: Option<&NSString>, ) -> Option>; - # [method (writeProperty : forKey :)] + #[method(writeProperty:forKey:)] pub unsafe fn writeProperty_forKey( &self, propertyValue: Option<&Object>, propertyKey: Option<&NSString>, ) -> bool; - # [method (writeData :)] + #[method(writeData:)] pub unsafe fn writeData(&self, data: Option<&NSData>) -> bool; #[method_id(loadInForeground)] pub unsafe fn loadInForeground(&self) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 343c2952a..47de5359a 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -17,7 +17,7 @@ extern_class!( ); extern_methods!( unsafe impl NSURLProtectionSpace { - # [method_id (initWithHost : port : protocol : realm : authenticationMethod :)] + #[method_id(initWithHost:port:protocol:realm:authenticationMethod:)] pub unsafe fn initWithHost_port_protocol_realm_authenticationMethod( &self, host: &NSString, @@ -26,7 +26,7 @@ extern_methods!( realm: Option<&NSString>, authenticationMethod: Option<&NSString>, ) -> Id; - # [method_id (initWithProxyHost : port : type : realm : authenticationMethod :)] + #[method_id(initWithProxyHost:port:type:realm:authenticationMethod:)] pub unsafe fn initWithProxyHost_port_type_realm_authenticationMethod( &self, host: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 3d44077b4..e914cd722 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -23,7 +23,7 @@ extern_class!( ); extern_methods!( unsafe impl NSURLProtocol { - # [method_id (initWithRequest : cachedResponse : client :)] + #[method_id(initWithRequest:cachedResponse:client:)] pub unsafe fn initWithRequest_cachedResponse_client( &self, request: &NSURLRequest, @@ -36,13 +36,13 @@ extern_methods!( pub unsafe fn request(&self) -> Id; #[method_id(cachedResponse)] pub unsafe fn cachedResponse(&self) -> Option>; - # [method (canInitWithRequest :)] + #[method(canInitWithRequest:)] pub unsafe fn canInitWithRequest(request: &NSURLRequest) -> bool; - # [method_id (canonicalRequestForRequest :)] + #[method_id(canonicalRequestForRequest:)] pub unsafe fn canonicalRequestForRequest( request: &NSURLRequest, ) -> Id; - # [method (requestIsCacheEquivalent : toRequest :)] + #[method(requestIsCacheEquivalent:toRequest:)] pub unsafe fn requestIsCacheEquivalent_toRequest( a: &NSURLRequest, b: &NSURLRequest, @@ -51,31 +51,31 @@ extern_methods!( pub unsafe fn startLoading(&self); #[method(stopLoading)] pub unsafe fn stopLoading(&self); - # [method_id (propertyForKey : inRequest :)] + #[method_id(propertyForKey:inRequest:)] pub unsafe fn propertyForKey_inRequest( key: &NSString, request: &NSURLRequest, ) -> Option>; - # [method (setProperty : forKey : inRequest :)] + #[method(setProperty:forKey:inRequest:)] pub unsafe fn setProperty_forKey_inRequest( value: &Object, key: &NSString, request: &NSMutableURLRequest, ); - # [method (removePropertyForKey : inRequest :)] + #[method(removePropertyForKey:inRequest:)] pub unsafe fn removePropertyForKey_inRequest(key: &NSString, request: &NSMutableURLRequest); - # [method (registerClass :)] + #[method(registerClass:)] pub unsafe fn registerClass(protocolClass: &Class) -> bool; - # [method (unregisterClass :)] + #[method(unregisterClass:)] pub unsafe fn unregisterClass(protocolClass: &Class); } ); extern_methods!( #[doc = "NSURLSessionTaskAdditions"] unsafe impl NSURLProtocol { - # [method (canInitWithTask :)] + #[method(canInitWithTask:)] pub unsafe fn canInitWithTask(task: &NSURLSessionTask) -> bool; - # [method_id (initWithTask : cachedResponse : client :)] + #[method_id(initWithTask:cachedResponse:client:)] pub unsafe fn initWithTask_cachedResponse_client( &self, task: &NSURLSessionTask, diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 903262de0..960dcf662 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -19,19 +19,19 @@ extern_class!( ); extern_methods!( unsafe impl NSURLRequest { - # [method_id (requestWithURL :)] + #[method_id(requestWithURL:)] pub unsafe fn requestWithURL(URL: &NSURL) -> Id; #[method(supportsSecureCoding)] pub unsafe fn supportsSecureCoding() -> bool; - # [method_id (requestWithURL : cachePolicy : timeoutInterval :)] + #[method_id(requestWithURL:cachePolicy:timeoutInterval:)] pub unsafe fn requestWithURL_cachePolicy_timeoutInterval( URL: &NSURL, cachePolicy: NSURLRequestCachePolicy, timeoutInterval: NSTimeInterval, ) -> Id; - # [method_id (initWithURL :)] + #[method_id(initWithURL:)] pub unsafe fn initWithURL(&self, URL: &NSURL) -> Id; - # [method_id (initWithURL : cachePolicy : timeoutInterval :)] + #[method_id(initWithURL:cachePolicy:timeoutInterval:)] pub unsafe fn initWithURL_cachePolicy_timeoutInterval( &self, URL: &NSURL, @@ -71,38 +71,38 @@ extern_methods!( unsafe impl NSMutableURLRequest { #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; - # [method (setURL :)] + #[method(setURL:)] pub unsafe fn setURL(&self, URL: Option<&NSURL>); #[method(cachePolicy)] pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy; - # [method (setCachePolicy :)] + #[method(setCachePolicy:)] pub unsafe fn setCachePolicy(&self, cachePolicy: NSURLRequestCachePolicy); #[method(timeoutInterval)] pub unsafe fn timeoutInterval(&self) -> NSTimeInterval; - # [method (setTimeoutInterval :)] + #[method(setTimeoutInterval:)] pub unsafe fn setTimeoutInterval(&self, timeoutInterval: NSTimeInterval); #[method_id(mainDocumentURL)] pub unsafe fn mainDocumentURL(&self) -> Option>; - # [method (setMainDocumentURL :)] + #[method(setMainDocumentURL:)] pub unsafe fn setMainDocumentURL(&self, mainDocumentURL: Option<&NSURL>); #[method(networkServiceType)] pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType; - # [method (setNetworkServiceType :)] + #[method(setNetworkServiceType:)] pub unsafe fn setNetworkServiceType( &self, networkServiceType: NSURLRequestNetworkServiceType, ); #[method(allowsCellularAccess)] pub unsafe fn allowsCellularAccess(&self) -> bool; - # [method (setAllowsCellularAccess :)] + #[method(setAllowsCellularAccess:)] pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool); #[method(allowsExpensiveNetworkAccess)] pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool; - # [method (setAllowsExpensiveNetworkAccess :)] + #[method(setAllowsExpensiveNetworkAccess:)] pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool); #[method(allowsConstrainedNetworkAccess)] pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool; - # [method (setAllowsConstrainedNetworkAccess :)] + #[method(setAllowsConstrainedNetworkAccess:)] pub unsafe fn setAllowsConstrainedNetworkAccess( &self, allowsConstrainedNetworkAccess: bool, @@ -113,7 +113,7 @@ extern_methods!( pub unsafe fn setAssumesHTTP3Capable(&self, assumesHTTP3Capable: bool); #[method(attribution)] pub unsafe fn attribution(&self) -> NSURLRequestAttribution; - # [method (setAttribution :)] + #[method(setAttribution:)] pub unsafe fn setAttribution(&self, attribution: NSURLRequestAttribution); } ); @@ -126,7 +126,7 @@ extern_methods!( pub unsafe fn allHTTPHeaderFields( &self, ) -> Option, Shared>>; - # [method_id (valueForHTTPHeaderField :)] + #[method_id(valueForHTTPHeaderField:)] pub unsafe fn valueForHTTPHeaderField( &self, field: &NSString, @@ -146,40 +146,40 @@ extern_methods!( unsafe impl NSMutableURLRequest { #[method_id(HTTPMethod)] pub unsafe fn HTTPMethod(&self) -> Id; - # [method (setHTTPMethod :)] + #[method(setHTTPMethod:)] pub unsafe fn setHTTPMethod(&self, HTTPMethod: &NSString); #[method_id(allHTTPHeaderFields)] pub unsafe fn allHTTPHeaderFields( &self, ) -> Option, Shared>>; - # [method (setAllHTTPHeaderFields :)] + #[method(setAllHTTPHeaderFields:)] pub unsafe fn setAllHTTPHeaderFields( &self, allHTTPHeaderFields: Option<&NSDictionary>, ); - # [method (setValue : forHTTPHeaderField :)] + #[method(setValue:forHTTPHeaderField:)] pub unsafe fn setValue_forHTTPHeaderField( &self, value: Option<&NSString>, field: &NSString, ); - # [method (addValue : forHTTPHeaderField :)] + #[method(addValue:forHTTPHeaderField:)] pub unsafe fn addValue_forHTTPHeaderField(&self, value: &NSString, field: &NSString); #[method_id(HTTPBody)] pub unsafe fn HTTPBody(&self) -> Option>; - # [method (setHTTPBody :)] + #[method(setHTTPBody:)] pub unsafe fn setHTTPBody(&self, HTTPBody: Option<&NSData>); #[method_id(HTTPBodyStream)] pub unsafe fn HTTPBodyStream(&self) -> Option>; - # [method (setHTTPBodyStream :)] + #[method(setHTTPBodyStream:)] pub unsafe fn setHTTPBodyStream(&self, HTTPBodyStream: Option<&NSInputStream>); #[method(HTTPShouldHandleCookies)] pub unsafe fn HTTPShouldHandleCookies(&self) -> bool; - # [method (setHTTPShouldHandleCookies :)] + #[method(setHTTPShouldHandleCookies:)] pub unsafe fn setHTTPShouldHandleCookies(&self, HTTPShouldHandleCookies: bool); #[method(HTTPShouldUsePipelining)] pub unsafe fn HTTPShouldUsePipelining(&self) -> bool; - # [method (setHTTPShouldUsePipelining :)] + #[method(setHTTPShouldUsePipelining:)] pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool); } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index e4818a12a..244b41fe5 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -17,7 +17,7 @@ extern_class!( ); extern_methods!( unsafe impl NSURLResponse { - # [method_id (initWithURL : MIMEType : expectedContentLength : textEncodingName :)] + #[method_id(initWithURL:MIMEType:expectedContentLength:textEncodingName:)] pub unsafe fn initWithURL_MIMEType_expectedContentLength_textEncodingName( &self, URL: &NSURL, @@ -47,7 +47,7 @@ extern_class!( ); extern_methods!( unsafe impl NSHTTPURLResponse { - # [method_id (initWithURL : statusCode : HTTPVersion : headerFields :)] + #[method_id(initWithURL:statusCode:HTTPVersion:headerFields:)] pub unsafe fn initWithURL_statusCode_HTTPVersion_headerFields( &self, url: &NSURL, @@ -59,12 +59,12 @@ extern_methods!( pub unsafe fn statusCode(&self) -> NSInteger; #[method_id(allHeaderFields)] pub unsafe fn allHeaderFields(&self) -> Id; - # [method_id (valueForHTTPHeaderField :)] + #[method_id(valueForHTTPHeaderField:)] pub unsafe fn valueForHTTPHeaderField( &self, field: &NSString, ) -> Option>; - # [method_id (localizedStringForStatusCode :)] + #[method_id(localizedStringForStatusCode:)] pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 62fbb8ee0..2f4f78d23 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -38,11 +38,11 @@ extern_methods!( unsafe impl NSURLSession { #[method_id(sharedSession)] pub unsafe fn sharedSession() -> Id; - # [method_id (sessionWithConfiguration :)] + #[method_id(sessionWithConfiguration:)] pub unsafe fn sessionWithConfiguration( configuration: &NSURLSessionConfiguration, ) -> Id; - # [method_id (sessionWithConfiguration : delegate : delegateQueue :)] + #[method_id(sessionWithConfiguration:delegate:delegateQueue:)] pub unsafe fn sessionWithConfiguration_delegate_delegateQueue( configuration: &NSURLSessionConfiguration, delegate: Option<&NSURLSessionDelegate>, @@ -56,82 +56,82 @@ extern_methods!( pub unsafe fn configuration(&self) -> Id; #[method_id(sessionDescription)] pub unsafe fn sessionDescription(&self) -> Option>; - # [method (setSessionDescription :)] + #[method(setSessionDescription:)] pub unsafe fn setSessionDescription(&self, sessionDescription: Option<&NSString>); #[method(finishTasksAndInvalidate)] pub unsafe fn finishTasksAndInvalidate(&self); #[method(invalidateAndCancel)] pub unsafe fn invalidateAndCancel(&self); - # [method (resetWithCompletionHandler :)] + #[method(resetWithCompletionHandler:)] pub unsafe fn resetWithCompletionHandler(&self, completionHandler: TodoBlock); - # [method (flushWithCompletionHandler :)] + #[method(flushWithCompletionHandler:)] pub unsafe fn flushWithCompletionHandler(&self, completionHandler: TodoBlock); - # [method (getTasksWithCompletionHandler :)] + #[method(getTasksWithCompletionHandler:)] pub unsafe fn getTasksWithCompletionHandler(&self, completionHandler: TodoBlock); - # [method (getAllTasksWithCompletionHandler :)] + #[method(getAllTasksWithCompletionHandler:)] pub unsafe fn getAllTasksWithCompletionHandler(&self, completionHandler: TodoBlock); - # [method_id (dataTaskWithRequest :)] + #[method_id(dataTaskWithRequest:)] pub unsafe fn dataTaskWithRequest( &self, request: &NSURLRequest, ) -> Id; - # [method_id (dataTaskWithURL :)] + #[method_id(dataTaskWithURL:)] pub unsafe fn dataTaskWithURL(&self, url: &NSURL) -> Id; - # [method_id (uploadTaskWithRequest : fromFile :)] + #[method_id(uploadTaskWithRequest:fromFile:)] pub unsafe fn uploadTaskWithRequest_fromFile( &self, request: &NSURLRequest, fileURL: &NSURL, ) -> Id; - # [method_id (uploadTaskWithRequest : fromData :)] + #[method_id(uploadTaskWithRequest:fromData:)] pub unsafe fn uploadTaskWithRequest_fromData( &self, request: &NSURLRequest, bodyData: &NSData, ) -> Id; - # [method_id (uploadTaskWithStreamedRequest :)] + #[method_id(uploadTaskWithStreamedRequest:)] pub unsafe fn uploadTaskWithStreamedRequest( &self, request: &NSURLRequest, ) -> Id; - # [method_id (downloadTaskWithRequest :)] + #[method_id(downloadTaskWithRequest:)] pub unsafe fn downloadTaskWithRequest( &self, request: &NSURLRequest, ) -> Id; - # [method_id (downloadTaskWithURL :)] + #[method_id(downloadTaskWithURL:)] pub unsafe fn downloadTaskWithURL( &self, url: &NSURL, ) -> Id; - # [method_id (downloadTaskWithResumeData :)] + #[method_id(downloadTaskWithResumeData:)] pub unsafe fn downloadTaskWithResumeData( &self, resumeData: &NSData, ) -> Id; - # [method_id (streamTaskWithHostName : port :)] + #[method_id(streamTaskWithHostName:port:)] pub unsafe fn streamTaskWithHostName_port( &self, hostname: &NSString, port: NSInteger, ) -> Id; - # [method_id (streamTaskWithNetService :)] + #[method_id(streamTaskWithNetService:)] pub unsafe fn streamTaskWithNetService( &self, service: &NSNetService, ) -> Id; - # [method_id (webSocketTaskWithURL :)] + #[method_id(webSocketTaskWithURL:)] pub unsafe fn webSocketTaskWithURL( &self, url: &NSURL, ) -> Id; - # [method_id (webSocketTaskWithURL : protocols :)] + #[method_id(webSocketTaskWithURL:protocols:)] pub unsafe fn webSocketTaskWithURL_protocols( &self, url: &NSURL, protocols: &NSArray, ) -> Id; - # [method_id (webSocketTaskWithRequest :)] + #[method_id(webSocketTaskWithRequest:)] pub unsafe fn webSocketTaskWithRequest( &self, request: &NSURLRequest, @@ -145,45 +145,45 @@ extern_methods!( extern_methods!( #[doc = "NSURLSessionAsynchronousConvenience"] unsafe impl NSURLSession { - # [method_id (dataTaskWithRequest : completionHandler :)] + #[method_id(dataTaskWithRequest:completionHandler:)] pub unsafe fn dataTaskWithRequest_completionHandler( &self, request: &NSURLRequest, completionHandler: TodoBlock, ) -> Id; - # [method_id (dataTaskWithURL : completionHandler :)] + #[method_id(dataTaskWithURL:completionHandler:)] pub unsafe fn dataTaskWithURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, ) -> Id; - # [method_id (uploadTaskWithRequest : fromFile : completionHandler :)] + #[method_id(uploadTaskWithRequest:fromFile:completionHandler:)] pub unsafe fn uploadTaskWithRequest_fromFile_completionHandler( &self, request: &NSURLRequest, fileURL: &NSURL, completionHandler: TodoBlock, ) -> Id; - # [method_id (uploadTaskWithRequest : fromData : completionHandler :)] + #[method_id(uploadTaskWithRequest:fromData:completionHandler:)] pub unsafe fn uploadTaskWithRequest_fromData_completionHandler( &self, request: &NSURLRequest, bodyData: Option<&NSData>, completionHandler: TodoBlock, ) -> Id; - # [method_id (downloadTaskWithRequest : completionHandler :)] + #[method_id(downloadTaskWithRequest:completionHandler:)] pub unsafe fn downloadTaskWithRequest_completionHandler( &self, request: &NSURLRequest, completionHandler: TodoBlock, ) -> Id; - # [method_id (downloadTaskWithURL : completionHandler :)] + #[method_id(downloadTaskWithURL:completionHandler:)] pub unsafe fn downloadTaskWithURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, ) -> Id; - # [method_id (downloadTaskWithResumeData : completionHandler :)] + #[method_id(downloadTaskWithResumeData:completionHandler:)] pub unsafe fn downloadTaskWithResumeData_completionHandler( &self, resumeData: &NSData, @@ -210,24 +210,24 @@ extern_methods!( pub unsafe fn response(&self) -> Option>; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSURLSessionTaskDelegate>); #[method_id(progress)] pub unsafe fn progress(&self) -> Id; #[method_id(earliestBeginDate)] pub unsafe fn earliestBeginDate(&self) -> Option>; - # [method (setEarliestBeginDate :)] + #[method(setEarliestBeginDate:)] pub unsafe fn setEarliestBeginDate(&self, earliestBeginDate: Option<&NSDate>); #[method(countOfBytesClientExpectsToSend)] pub unsafe fn countOfBytesClientExpectsToSend(&self) -> int64_t; - # [method (setCountOfBytesClientExpectsToSend :)] + #[method(setCountOfBytesClientExpectsToSend:)] pub unsafe fn setCountOfBytesClientExpectsToSend( &self, countOfBytesClientExpectsToSend: int64_t, ); #[method(countOfBytesClientExpectsToReceive)] pub unsafe fn countOfBytesClientExpectsToReceive(&self) -> int64_t; - # [method (setCountOfBytesClientExpectsToReceive :)] + #[method(setCountOfBytesClientExpectsToReceive:)] pub unsafe fn setCountOfBytesClientExpectsToReceive( &self, countOfBytesClientExpectsToReceive: int64_t, @@ -242,7 +242,7 @@ extern_methods!( pub unsafe fn countOfBytesExpectedToReceive(&self) -> int64_t; #[method_id(taskDescription)] pub unsafe fn taskDescription(&self) -> Option>; - # [method (setTaskDescription :)] + #[method(setTaskDescription:)] pub unsafe fn setTaskDescription(&self, taskDescription: Option<&NSString>); #[method(cancel)] pub unsafe fn cancel(&self); @@ -256,11 +256,11 @@ extern_methods!( pub unsafe fn resume(&self); #[method(priority)] pub unsafe fn priority(&self) -> c_float; - # [method (setPriority :)] + #[method(setPriority:)] pub unsafe fn setPriority(&self, priority: c_float); #[method(prefersIncrementalDelivery)] pub unsafe fn prefersIncrementalDelivery(&self) -> bool; - # [method (setPrefersIncrementalDelivery :)] + #[method(setPrefersIncrementalDelivery:)] pub unsafe fn setPrefersIncrementalDelivery(&self, prefersIncrementalDelivery: bool); #[method_id(init)] pub unsafe fn init(&self) -> Id; @@ -307,7 +307,7 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionDownloadTask { - # [method (cancelByProducingResumeData :)] + #[method(cancelByProducingResumeData:)] pub unsafe fn cancelByProducingResumeData(&self, completionHandler: TodoBlock); #[method_id(init)] pub unsafe fn init(&self) -> Id; @@ -324,7 +324,7 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionStreamTask { - # [method (readDataOfMinLength : maxLength : timeout : completionHandler :)] + #[method(readDataOfMinLength:maxLength:timeout:completionHandler:)] pub unsafe fn readDataOfMinLength_maxLength_timeout_completionHandler( &self, minBytes: NSUInteger, @@ -332,7 +332,7 @@ extern_methods!( timeout: NSTimeInterval, completionHandler: TodoBlock, ); - # [method (writeData : timeout : completionHandler :)] + #[method(writeData:timeout:completionHandler:)] pub unsafe fn writeData_timeout_completionHandler( &self, data: &NSData, @@ -364,9 +364,9 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionWebSocketMessage { - # [method_id (initWithData :)] + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Id; - # [method_id (initWithString :)] + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, string: &NSString) -> Id; #[method(type)] pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType; @@ -389,17 +389,17 @@ extern_class!( ); extern_methods!( unsafe impl NSURLSessionWebSocketTask { - # [method (sendMessage : completionHandler :)] + #[method(sendMessage:completionHandler:)] pub unsafe fn sendMessage_completionHandler( &self, message: &NSURLSessionWebSocketMessage, completionHandler: TodoBlock, ); - # [method (receiveMessageWithCompletionHandler :)] + #[method(receiveMessageWithCompletionHandler:)] pub unsafe fn receiveMessageWithCompletionHandler(&self, completionHandler: TodoBlock); - # [method (sendPingWithPongReceiveHandler :)] + #[method(sendPingWithPongReceiveHandler:)] pub unsafe fn sendPingWithPongReceiveHandler(&self, pongReceiveHandler: TodoBlock); - # [method (cancelWithCloseCode : reason :)] + #[method(cancelWithCloseCode:reason:)] pub unsafe fn cancelWithCloseCode_reason( &self, closeCode: NSURLSessionWebSocketCloseCode, @@ -407,7 +407,7 @@ extern_methods!( ); #[method(maximumMessageSize)] pub unsafe fn maximumMessageSize(&self) -> NSInteger; - # [method (setMaximumMessageSize :)] + #[method(setMaximumMessageSize:)] pub unsafe fn setMaximumMessageSize(&self, maximumMessageSize: NSInteger); #[method(closeCode)] pub unsafe fn closeCode(&self) -> NSURLSessionWebSocketCloseCode; @@ -432,7 +432,7 @@ extern_methods!( pub unsafe fn defaultSessionConfiguration() -> Id; #[method_id(ephemeralSessionConfiguration)] pub unsafe fn ephemeralSessionConfiguration() -> Id; - # [method_id (backgroundSessionConfigurationWithIdentifier :)] + #[method_id(backgroundSessionConfigurationWithIdentifier:)] pub unsafe fn backgroundSessionConfigurationWithIdentifier( identifier: &NSString, ) -> Id; @@ -440,153 +440,153 @@ extern_methods!( pub unsafe fn identifier(&self) -> Option>; #[method(requestCachePolicy)] pub unsafe fn requestCachePolicy(&self) -> NSURLRequestCachePolicy; - # [method (setRequestCachePolicy :)] + #[method(setRequestCachePolicy:)] pub unsafe fn setRequestCachePolicy(&self, requestCachePolicy: NSURLRequestCachePolicy); #[method(timeoutIntervalForRequest)] pub unsafe fn timeoutIntervalForRequest(&self) -> NSTimeInterval; - # [method (setTimeoutIntervalForRequest :)] + #[method(setTimeoutIntervalForRequest:)] pub unsafe fn setTimeoutIntervalForRequest( &self, timeoutIntervalForRequest: NSTimeInterval, ); #[method(timeoutIntervalForResource)] pub unsafe fn timeoutIntervalForResource(&self) -> NSTimeInterval; - # [method (setTimeoutIntervalForResource :)] + #[method(setTimeoutIntervalForResource:)] pub unsafe fn setTimeoutIntervalForResource( &self, timeoutIntervalForResource: NSTimeInterval, ); #[method(networkServiceType)] pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType; - # [method (setNetworkServiceType :)] + #[method(setNetworkServiceType:)] pub unsafe fn setNetworkServiceType( &self, networkServiceType: NSURLRequestNetworkServiceType, ); #[method(allowsCellularAccess)] pub unsafe fn allowsCellularAccess(&self) -> bool; - # [method (setAllowsCellularAccess :)] + #[method(setAllowsCellularAccess:)] pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool); #[method(allowsExpensiveNetworkAccess)] pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool; - # [method (setAllowsExpensiveNetworkAccess :)] + #[method(setAllowsExpensiveNetworkAccess:)] pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool); #[method(allowsConstrainedNetworkAccess)] pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool; - # [method (setAllowsConstrainedNetworkAccess :)] + #[method(setAllowsConstrainedNetworkAccess:)] pub unsafe fn setAllowsConstrainedNetworkAccess( &self, allowsConstrainedNetworkAccess: bool, ); #[method(waitsForConnectivity)] pub unsafe fn waitsForConnectivity(&self) -> bool; - # [method (setWaitsForConnectivity :)] + #[method(setWaitsForConnectivity:)] pub unsafe fn setWaitsForConnectivity(&self, waitsForConnectivity: bool); #[method(isDiscretionary)] pub unsafe fn isDiscretionary(&self) -> bool; - # [method (setDiscretionary :)] + #[method(setDiscretionary:)] pub unsafe fn setDiscretionary(&self, discretionary: bool); #[method_id(sharedContainerIdentifier)] pub unsafe fn sharedContainerIdentifier(&self) -> Option>; - # [method (setSharedContainerIdentifier :)] + #[method(setSharedContainerIdentifier:)] pub unsafe fn setSharedContainerIdentifier( &self, sharedContainerIdentifier: Option<&NSString>, ); #[method(sessionSendsLaunchEvents)] pub unsafe fn sessionSendsLaunchEvents(&self) -> bool; - # [method (setSessionSendsLaunchEvents :)] + #[method(setSessionSendsLaunchEvents:)] pub unsafe fn setSessionSendsLaunchEvents(&self, sessionSendsLaunchEvents: bool); #[method_id(connectionProxyDictionary)] pub unsafe fn connectionProxyDictionary(&self) -> Option>; - # [method (setConnectionProxyDictionary :)] + #[method(setConnectionProxyDictionary:)] pub unsafe fn setConnectionProxyDictionary( &self, connectionProxyDictionary: Option<&NSDictionary>, ); #[method(TLSMinimumSupportedProtocol)] pub unsafe fn TLSMinimumSupportedProtocol(&self) -> SSLProtocol; - # [method (setTLSMinimumSupportedProtocol :)] + #[method(setTLSMinimumSupportedProtocol:)] pub unsafe fn setTLSMinimumSupportedProtocol( &self, TLSMinimumSupportedProtocol: SSLProtocol, ); #[method(TLSMaximumSupportedProtocol)] pub unsafe fn TLSMaximumSupportedProtocol(&self) -> SSLProtocol; - # [method (setTLSMaximumSupportedProtocol :)] + #[method(setTLSMaximumSupportedProtocol:)] pub unsafe fn setTLSMaximumSupportedProtocol( &self, TLSMaximumSupportedProtocol: SSLProtocol, ); #[method(TLSMinimumSupportedProtocolVersion)] pub unsafe fn TLSMinimumSupportedProtocolVersion(&self) -> tls_protocol_version_t; - # [method (setTLSMinimumSupportedProtocolVersion :)] + #[method(setTLSMinimumSupportedProtocolVersion:)] pub unsafe fn setTLSMinimumSupportedProtocolVersion( &self, TLSMinimumSupportedProtocolVersion: tls_protocol_version_t, ); #[method(TLSMaximumSupportedProtocolVersion)] pub unsafe fn TLSMaximumSupportedProtocolVersion(&self) -> tls_protocol_version_t; - # [method (setTLSMaximumSupportedProtocolVersion :)] + #[method(setTLSMaximumSupportedProtocolVersion:)] pub unsafe fn setTLSMaximumSupportedProtocolVersion( &self, TLSMaximumSupportedProtocolVersion: tls_protocol_version_t, ); #[method(HTTPShouldUsePipelining)] pub unsafe fn HTTPShouldUsePipelining(&self) -> bool; - # [method (setHTTPShouldUsePipelining :)] + #[method(setHTTPShouldUsePipelining:)] pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool); #[method(HTTPShouldSetCookies)] pub unsafe fn HTTPShouldSetCookies(&self) -> bool; - # [method (setHTTPShouldSetCookies :)] + #[method(setHTTPShouldSetCookies:)] pub unsafe fn setHTTPShouldSetCookies(&self, HTTPShouldSetCookies: bool); #[method(HTTPCookieAcceptPolicy)] pub unsafe fn HTTPCookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy; - # [method (setHTTPCookieAcceptPolicy :)] + #[method(setHTTPCookieAcceptPolicy:)] pub unsafe fn setHTTPCookieAcceptPolicy( &self, HTTPCookieAcceptPolicy: NSHTTPCookieAcceptPolicy, ); #[method_id(HTTPAdditionalHeaders)] pub unsafe fn HTTPAdditionalHeaders(&self) -> Option>; - # [method (setHTTPAdditionalHeaders :)] + #[method(setHTTPAdditionalHeaders:)] pub unsafe fn setHTTPAdditionalHeaders(&self, HTTPAdditionalHeaders: Option<&NSDictionary>); #[method(HTTPMaximumConnectionsPerHost)] pub unsafe fn HTTPMaximumConnectionsPerHost(&self) -> NSInteger; - # [method (setHTTPMaximumConnectionsPerHost :)] + #[method(setHTTPMaximumConnectionsPerHost:)] pub unsafe fn setHTTPMaximumConnectionsPerHost( &self, HTTPMaximumConnectionsPerHost: NSInteger, ); #[method_id(HTTPCookieStorage)] pub unsafe fn HTTPCookieStorage(&self) -> Option>; - # [method (setHTTPCookieStorage :)] + #[method(setHTTPCookieStorage:)] pub unsafe fn setHTTPCookieStorage(&self, HTTPCookieStorage: Option<&NSHTTPCookieStorage>); #[method_id(URLCredentialStorage)] pub unsafe fn URLCredentialStorage(&self) -> Option>; - # [method (setURLCredentialStorage :)] + #[method(setURLCredentialStorage:)] pub unsafe fn setURLCredentialStorage( &self, URLCredentialStorage: Option<&NSURLCredentialStorage>, ); #[method_id(URLCache)] pub unsafe fn URLCache(&self) -> Option>; - # [method (setURLCache :)] + #[method(setURLCache:)] pub unsafe fn setURLCache(&self, URLCache: Option<&NSURLCache>); #[method(shouldUseExtendedBackgroundIdleMode)] pub unsafe fn shouldUseExtendedBackgroundIdleMode(&self) -> bool; - # [method (setShouldUseExtendedBackgroundIdleMode :)] + #[method(setShouldUseExtendedBackgroundIdleMode:)] pub unsafe fn setShouldUseExtendedBackgroundIdleMode( &self, shouldUseExtendedBackgroundIdleMode: bool, ); #[method_id(protocolClasses)] pub unsafe fn protocolClasses(&self) -> Option, Shared>>; - # [method (setProtocolClasses :)] + #[method(setProtocolClasses:)] pub unsafe fn setProtocolClasses(&self, protocolClasses: Option<&NSArray>); #[method(multipathServiceType)] pub unsafe fn multipathServiceType(&self) -> NSURLSessionMultipathServiceType; - # [method (setMultipathServiceType :)] + #[method(setMultipathServiceType:)] pub unsafe fn setMultipathServiceType( &self, multipathServiceType: NSURLSessionMultipathServiceType, @@ -606,7 +606,7 @@ pub type NSURLSessionWebSocketDelegate = NSObject; extern_methods!( #[doc = "NSURLSessionDeprecated"] unsafe impl NSURLSessionConfiguration { - # [method_id (backgroundSessionConfiguration :)] + #[method_id(backgroundSessionConfiguration:)] pub unsafe fn backgroundSessionConfiguration( identifier: &NSString, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index ca0d348fe..7529c3dc1 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -18,13 +18,13 @@ extern_methods!( pub unsafe fn UUID() -> Id; #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithUUIDString :)] + #[method_id(initWithUUIDString:)] pub unsafe fn initWithUUIDString(&self, string: &NSString) -> Option>; - # [method_id (initWithUUIDBytes :)] + #[method_id(initWithUUIDBytes:)] pub unsafe fn initWithUUIDBytes(&self, bytes: uuid_t) -> Id; - # [method (getUUIDBytes :)] + #[method(getUUIDBytes:)] pub unsafe fn getUUIDBytes(&self, uuid: uuid_t); - # [method (compare :)] + #[method(compare:)] pub unsafe fn compare(&self, otherUUID: &NSUUID) -> NSComparisonResult; #[method_id(UUIDString)] pub unsafe fn UUIDString(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index f778fa477..30a34fc49 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -19,46 +19,46 @@ extern_methods!( unsafe impl NSUbiquitousKeyValueStore { #[method_id(defaultStore)] pub unsafe fn defaultStore() -> Id; - # [method_id (objectForKey :)] + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, aKey: &NSString) -> Option>; - # [method (setObject : forKey :)] + #[method(setObject:forKey:)] pub unsafe fn setObject_forKey(&self, anObject: Option<&Object>, aKey: &NSString); - # [method (removeObjectForKey :)] + #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, aKey: &NSString); - # [method_id (stringForKey :)] + #[method_id(stringForKey:)] pub unsafe fn stringForKey(&self, aKey: &NSString) -> Option>; - # [method_id (arrayForKey :)] + #[method_id(arrayForKey:)] pub unsafe fn arrayForKey(&self, aKey: &NSString) -> Option>; - # [method_id (dictionaryForKey :)] + #[method_id(dictionaryForKey:)] pub unsafe fn dictionaryForKey( &self, aKey: &NSString, ) -> Option, Shared>>; - # [method_id (dataForKey :)] + #[method_id(dataForKey:)] pub unsafe fn dataForKey(&self, aKey: &NSString) -> Option>; - # [method (longLongForKey :)] + #[method(longLongForKey:)] pub unsafe fn longLongForKey(&self, aKey: &NSString) -> c_longlong; - # [method (doubleForKey :)] + #[method(doubleForKey:)] pub unsafe fn doubleForKey(&self, aKey: &NSString) -> c_double; - # [method (boolForKey :)] + #[method(boolForKey:)] pub unsafe fn boolForKey(&self, aKey: &NSString) -> bool; - # [method (setString : forKey :)] + #[method(setString:forKey:)] pub unsafe fn setString_forKey(&self, aString: Option<&NSString>, aKey: &NSString); - # [method (setData : forKey :)] + #[method(setData:forKey:)] pub unsafe fn setData_forKey(&self, aData: Option<&NSData>, aKey: &NSString); - # [method (setArray : forKey :)] + #[method(setArray:forKey:)] pub unsafe fn setArray_forKey(&self, anArray: Option<&NSArray>, aKey: &NSString); - # [method (setDictionary : forKey :)] + #[method(setDictionary:forKey:)] pub unsafe fn setDictionary_forKey( &self, aDictionary: Option<&NSDictionary>, aKey: &NSString, ); - # [method (setLongLong : forKey :)] + #[method(setLongLong:forKey:)] pub unsafe fn setLongLong_forKey(&self, value: c_longlong, aKey: &NSString); - # [method (setDouble : forKey :)] + #[method(setDouble:forKey:)] pub unsafe fn setDouble_forKey(&self, value: c_double, aKey: &NSString); - # [method (setBool : forKey :)] + #[method(setBool:forKey:)] pub unsafe fn setBool_forKey(&self, value: bool, aKey: &NSString); #[method_id(dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation(&self) diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index a7cca9eaf..b78b57db2 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -30,15 +30,15 @@ extern_methods!( pub unsafe fn isUndoRegistrationEnabled(&self) -> bool; #[method(groupsByEvent)] pub unsafe fn groupsByEvent(&self) -> bool; - # [method (setGroupsByEvent :)] + #[method(setGroupsByEvent:)] pub unsafe fn setGroupsByEvent(&self, groupsByEvent: bool); #[method(levelsOfUndo)] pub unsafe fn levelsOfUndo(&self) -> NSUInteger; - # [method (setLevelsOfUndo :)] + #[method(setLevelsOfUndo:)] pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger); #[method_id(runLoopModes)] pub unsafe fn runLoopModes(&self) -> Id, Shared>; - # [method (setRunLoopModes :)] + #[method(setRunLoopModes:)] pub unsafe fn setRunLoopModes(&self, runLoopModes: &NSArray); #[method(undo)] pub unsafe fn undo(&self); @@ -56,24 +56,24 @@ extern_methods!( pub unsafe fn isRedoing(&self) -> bool; #[method(removeAllActions)] pub unsafe fn removeAllActions(&self); - # [method (removeAllActionsWithTarget :)] + #[method(removeAllActionsWithTarget:)] pub unsafe fn removeAllActionsWithTarget(&self, target: &Object); - # [method (registerUndoWithTarget : selector : object :)] + #[method(registerUndoWithTarget:selector:object:)] pub unsafe fn registerUndoWithTarget_selector_object( &self, target: &Object, selector: Sel, anObject: Option<&Object>, ); - # [method_id (prepareWithInvocationTarget :)] + #[method_id(prepareWithInvocationTarget:)] pub unsafe fn prepareWithInvocationTarget(&self, target: &Object) -> Id; - # [method (registerUndoWithTarget : handler :)] + #[method(registerUndoWithTarget:handler:)] pub unsafe fn registerUndoWithTarget_handler( &self, target: &Object, undoHandler: TodoBlock, ); - # [method (setActionIsDiscardable :)] + #[method(setActionIsDiscardable:)] pub unsafe fn setActionIsDiscardable(&self, discardable: bool); #[method(undoActionIsDiscardable)] pub unsafe fn undoActionIsDiscardable(&self) -> bool; @@ -83,18 +83,18 @@ extern_methods!( pub unsafe fn undoActionName(&self) -> Id; #[method_id(redoActionName)] pub unsafe fn redoActionName(&self) -> Id; - # [method (setActionName :)] + #[method(setActionName:)] pub unsafe fn setActionName(&self, actionName: &NSString); #[method_id(undoMenuItemTitle)] pub unsafe fn undoMenuItemTitle(&self) -> Id; #[method_id(redoMenuItemTitle)] pub unsafe fn redoMenuItemTitle(&self) -> Id; - # [method_id (undoMenuTitleForUndoActionName :)] + #[method_id(undoMenuTitleForUndoActionName:)] pub unsafe fn undoMenuTitleForUndoActionName( &self, actionName: &NSString, ) -> Id; - # [method_id (redoMenuTitleForUndoActionName :)] + #[method_id(redoMenuTitleForUndoActionName:)] pub unsafe fn redoMenuTitleForUndoActionName( &self, actionName: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index 9309dccff..d06a97900 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -12,9 +12,9 @@ extern_class!( ); extern_methods!( unsafe impl NSUnitConverter { - # [method (baseUnitValueFromValue :)] + #[method(baseUnitValueFromValue:)] pub unsafe fn baseUnitValueFromValue(&self, value: c_double) -> c_double; - # [method (valueFromBaseUnitValue :)] + #[method(valueFromBaseUnitValue:)] pub unsafe fn valueFromBaseUnitValue(&self, baseUnitValue: c_double) -> c_double; } ); @@ -31,9 +31,9 @@ extern_methods!( pub unsafe fn coefficient(&self) -> c_double; #[method(constant)] pub unsafe fn constant(&self) -> c_double; - # [method_id (initWithCoefficient :)] + #[method_id(initWithCoefficient:)] pub unsafe fn initWithCoefficient(&self, coefficient: c_double) -> Id; - # [method_id (initWithCoefficient : constant :)] + #[method_id(initWithCoefficient:constant:)] pub unsafe fn initWithCoefficient_constant( &self, coefficient: c_double, @@ -56,7 +56,7 @@ extern_methods!( pub unsafe fn init(&self) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; - # [method_id (initWithSymbol :)] + #[method_id(initWithSymbol:)] pub unsafe fn initWithSymbol(&self, symbol: &NSString) -> Id; } ); @@ -71,7 +71,7 @@ extern_methods!( unsafe impl NSDimension { #[method_id(converter)] pub unsafe fn converter(&self) -> Id; - # [method_id (initWithSymbol : converter :)] + #[method_id(initWithSymbol:converter:)] pub unsafe fn initWithSymbol_converter( &self, symbol: &NSString, @@ -171,7 +171,7 @@ extern_methods!( pub unsafe fn gramsPerLiter() -> Id; #[method_id(milligramsPerDeciliter)] pub unsafe fn milligramsPerDeciliter() -> Id; - # [method_id (millimolesPerLiterWithGramsPerMole :)] + #[method_id(millimolesPerLiterWithGramsPerMole:)] pub unsafe fn millimolesPerLiterWithGramsPerMole( gramsPerMole: c_double, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 1f37eb8c2..627d7dd36 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -23,7 +23,7 @@ extern_class!( ); extern_methods!( unsafe impl NSUserActivity { - # [method_id (initWithActivityType :)] + #[method_id(initWithActivityType:)] pub unsafe fn initWithActivityType(&self, activityType: &NSString) -> Id; #[method_id(init)] pub unsafe fn init(&self) -> Id; @@ -31,52 +31,52 @@ extern_methods!( pub unsafe fn activityType(&self) -> Id; #[method_id(title)] pub unsafe fn title(&self) -> Option>; - # [method (setTitle :)] + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; - # [method (setUserInfo :)] + #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); - # [method (addUserInfoEntriesFromDictionary :)] + #[method(addUserInfoEntriesFromDictionary:)] pub unsafe fn addUserInfoEntriesFromDictionary(&self, otherDictionary: &NSDictionary); #[method_id(requiredUserInfoKeys)] pub unsafe fn requiredUserInfoKeys(&self) -> Option, Shared>>; - # [method (setRequiredUserInfoKeys :)] + #[method(setRequiredUserInfoKeys:)] pub unsafe fn setRequiredUserInfoKeys( &self, requiredUserInfoKeys: Option<&NSSet>, ); #[method(needsSave)] pub unsafe fn needsSave(&self) -> bool; - # [method (setNeedsSave :)] + #[method(setNeedsSave:)] pub unsafe fn setNeedsSave(&self, needsSave: bool); #[method_id(webpageURL)] pub unsafe fn webpageURL(&self) -> Option>; - # [method (setWebpageURL :)] + #[method(setWebpageURL:)] pub unsafe fn setWebpageURL(&self, webpageURL: Option<&NSURL>); #[method_id(referrerURL)] pub unsafe fn referrerURL(&self) -> Option>; - # [method (setReferrerURL :)] + #[method(setReferrerURL:)] pub unsafe fn setReferrerURL(&self, referrerURL: Option<&NSURL>); #[method_id(expirationDate)] pub unsafe fn expirationDate(&self) -> Option>; - # [method (setExpirationDate :)] + #[method(setExpirationDate:)] pub unsafe fn setExpirationDate(&self, expirationDate: Option<&NSDate>); #[method_id(keywords)] pub unsafe fn keywords(&self) -> Id, Shared>; - # [method (setKeywords :)] + #[method(setKeywords:)] pub unsafe fn setKeywords(&self, keywords: &NSSet); #[method(supportsContinuationStreams)] pub unsafe fn supportsContinuationStreams(&self) -> bool; - # [method (setSupportsContinuationStreams :)] + #[method(setSupportsContinuationStreams:)] pub unsafe fn setSupportsContinuationStreams(&self, supportsContinuationStreams: bool); #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSUserActivityDelegate>); #[method_id(targetContentIdentifier)] pub unsafe fn targetContentIdentifier(&self) -> Option>; - # [method (setTargetContentIdentifier :)] + #[method(setTargetContentIdentifier:)] pub unsafe fn setTargetContentIdentifier(&self, targetContentIdentifier: Option<&NSString>); #[method(becomeCurrent)] pub unsafe fn becomeCurrent(&self); @@ -84,42 +84,42 @@ extern_methods!( pub unsafe fn resignCurrent(&self); #[method(invalidate)] pub unsafe fn invalidate(&self); - # [method (getContinuationStreamsWithCompletionHandler :)] + #[method(getContinuationStreamsWithCompletionHandler:)] pub unsafe fn getContinuationStreamsWithCompletionHandler( &self, completionHandler: TodoBlock, ); #[method(isEligibleForHandoff)] pub unsafe fn isEligibleForHandoff(&self) -> bool; - # [method (setEligibleForHandoff :)] + #[method(setEligibleForHandoff:)] pub unsafe fn setEligibleForHandoff(&self, eligibleForHandoff: bool); #[method(isEligibleForSearch)] pub unsafe fn isEligibleForSearch(&self) -> bool; - # [method (setEligibleForSearch :)] + #[method(setEligibleForSearch:)] pub unsafe fn setEligibleForSearch(&self, eligibleForSearch: bool); #[method(isEligibleForPublicIndexing)] pub unsafe fn isEligibleForPublicIndexing(&self) -> bool; - # [method (setEligibleForPublicIndexing :)] + #[method(setEligibleForPublicIndexing:)] pub unsafe fn setEligibleForPublicIndexing(&self, eligibleForPublicIndexing: bool); #[method(isEligibleForPrediction)] pub unsafe fn isEligibleForPrediction(&self) -> bool; - # [method (setEligibleForPrediction :)] + #[method(setEligibleForPrediction:)] pub unsafe fn setEligibleForPrediction(&self, eligibleForPrediction: bool); #[method_id(persistentIdentifier)] pub unsafe fn persistentIdentifier( &self, ) -> Option>; - # [method (setPersistentIdentifier :)] + #[method(setPersistentIdentifier:)] pub unsafe fn setPersistentIdentifier( &self, persistentIdentifier: Option<&NSUserActivityPersistentIdentifier>, ); - # [method (deleteSavedUserActivitiesWithPersistentIdentifiers : completionHandler :)] + #[method(deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:)] pub unsafe fn deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler( persistentIdentifiers: &NSArray, handler: TodoBlock, ); - # [method (deleteAllSavedUserActivitiesWithCompletionHandler :)] + #[method(deleteAllSavedUserActivitiesWithCompletionHandler:)] pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: TodoBlock); } ); diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index c9617ed89..f187fdb64 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -25,102 +25,102 @@ extern_methods!( pub unsafe fn resetStandardUserDefaults(); #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithSuiteName :)] + #[method_id(initWithSuiteName:)] pub unsafe fn initWithSuiteName( &self, suitename: Option<&NSString>, ) -> Option>; - # [method_id (initWithUser :)] + #[method_id(initWithUser:)] pub unsafe fn initWithUser(&self, username: &NSString) -> Option>; - # [method_id (objectForKey :)] + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, defaultName: &NSString) -> Option>; - # [method (setObject : forKey :)] + #[method(setObject:forKey:)] pub unsafe fn setObject_forKey(&self, value: Option<&Object>, defaultName: &NSString); - # [method (removeObjectForKey :)] + #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, defaultName: &NSString); - # [method_id (stringForKey :)] + #[method_id(stringForKey:)] pub unsafe fn stringForKey(&self, defaultName: &NSString) -> Option>; - # [method_id (arrayForKey :)] + #[method_id(arrayForKey:)] pub unsafe fn arrayForKey(&self, defaultName: &NSString) -> Option>; - # [method_id (dictionaryForKey :)] + #[method_id(dictionaryForKey:)] pub unsafe fn dictionaryForKey( &self, defaultName: &NSString, ) -> Option, Shared>>; - # [method_id (dataForKey :)] + #[method_id(dataForKey:)] pub unsafe fn dataForKey(&self, defaultName: &NSString) -> Option>; - # [method_id (stringArrayForKey :)] + #[method_id(stringArrayForKey:)] pub unsafe fn stringArrayForKey( &self, defaultName: &NSString, ) -> Option, Shared>>; - # [method (integerForKey :)] + #[method(integerForKey:)] pub unsafe fn integerForKey(&self, defaultName: &NSString) -> NSInteger; - # [method (floatForKey :)] + #[method(floatForKey:)] pub unsafe fn floatForKey(&self, defaultName: &NSString) -> c_float; - # [method (doubleForKey :)] + #[method(doubleForKey:)] pub unsafe fn doubleForKey(&self, defaultName: &NSString) -> c_double; - # [method (boolForKey :)] + #[method(boolForKey:)] pub unsafe fn boolForKey(&self, defaultName: &NSString) -> bool; - # [method_id (URLForKey :)] + #[method_id(URLForKey:)] pub unsafe fn URLForKey(&self, defaultName: &NSString) -> Option>; - # [method (setInteger : forKey :)] + #[method(setInteger:forKey:)] pub unsafe fn setInteger_forKey(&self, value: NSInteger, defaultName: &NSString); - # [method (setFloat : forKey :)] + #[method(setFloat:forKey:)] pub unsafe fn setFloat_forKey(&self, value: c_float, defaultName: &NSString); - # [method (setDouble : forKey :)] + #[method(setDouble:forKey:)] pub unsafe fn setDouble_forKey(&self, value: c_double, defaultName: &NSString); - # [method (setBool : forKey :)] + #[method(setBool:forKey:)] pub unsafe fn setBool_forKey(&self, value: bool, defaultName: &NSString); - # [method (setURL : forKey :)] + #[method(setURL:forKey:)] pub unsafe fn setURL_forKey(&self, url: Option<&NSURL>, defaultName: &NSString); - # [method (registerDefaults :)] + #[method(registerDefaults:)] pub unsafe fn registerDefaults( &self, registrationDictionary: &NSDictionary, ); - # [method (addSuiteNamed :)] + #[method(addSuiteNamed:)] pub unsafe fn addSuiteNamed(&self, suiteName: &NSString); - # [method (removeSuiteNamed :)] + #[method(removeSuiteNamed:)] pub unsafe fn removeSuiteNamed(&self, suiteName: &NSString); #[method_id(dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared>; #[method_id(volatileDomainNames)] pub unsafe fn volatileDomainNames(&self) -> Id, Shared>; - # [method_id (volatileDomainForName :)] + #[method_id(volatileDomainForName:)] pub unsafe fn volatileDomainForName( &self, domainName: &NSString, ) -> Id, Shared>; - # [method (setVolatileDomain : forName :)] + #[method(setVolatileDomain:forName:)] pub unsafe fn setVolatileDomain_forName( &self, domain: &NSDictionary, domainName: &NSString, ); - # [method (removeVolatileDomainForName :)] + #[method(removeVolatileDomainForName:)] pub unsafe fn removeVolatileDomainForName(&self, domainName: &NSString); #[method_id(persistentDomainNames)] pub unsafe fn persistentDomainNames(&self) -> Id; - # [method_id (persistentDomainForName :)] + #[method_id(persistentDomainForName:)] pub unsafe fn persistentDomainForName( &self, domainName: &NSString, ) -> Option, Shared>>; - # [method (setPersistentDomain : forName :)] + #[method(setPersistentDomain:forName:)] pub unsafe fn setPersistentDomain_forName( &self, domain: &NSDictionary, domainName: &NSString, ); - # [method (removePersistentDomainForName :)] + #[method(removePersistentDomainForName:)] pub unsafe fn removePersistentDomainForName(&self, domainName: &NSString); #[method(synchronize)] pub unsafe fn synchronize(&self) -> bool; - # [method (objectIsForcedForKey :)] + #[method(objectIsForcedForKey:)] pub unsafe fn objectIsForcedForKey(&self, key: &NSString) -> bool; - # [method (objectIsForcedForKey : inDomain :)] + #[method(objectIsForcedForKey:inDomain:)] pub unsafe fn objectIsForcedForKey_inDomain( &self, key: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index d7df4d337..2dc6863de 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -24,35 +24,35 @@ extern_methods!( pub unsafe fn init(&self) -> Id; #[method_id(title)] pub unsafe fn title(&self) -> Option>; - # [method (setTitle :)] + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); #[method_id(subtitle)] pub unsafe fn subtitle(&self) -> Option>; - # [method (setSubtitle :)] + #[method(setSubtitle:)] pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>); #[method_id(informativeText)] pub unsafe fn informativeText(&self) -> Option>; - # [method (setInformativeText :)] + #[method(setInformativeText:)] pub unsafe fn setInformativeText(&self, informativeText: Option<&NSString>); #[method_id(actionButtonTitle)] pub unsafe fn actionButtonTitle(&self) -> Id; - # [method (setActionButtonTitle :)] + #[method(setActionButtonTitle:)] pub unsafe fn setActionButtonTitle(&self, actionButtonTitle: &NSString); #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option, Shared>>; - # [method (setUserInfo :)] + #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); #[method_id(deliveryDate)] pub unsafe fn deliveryDate(&self) -> Option>; - # [method (setDeliveryDate :)] + #[method(setDeliveryDate:)] pub unsafe fn setDeliveryDate(&self, deliveryDate: Option<&NSDate>); #[method_id(deliveryTimeZone)] pub unsafe fn deliveryTimeZone(&self) -> Option>; - # [method (setDeliveryTimeZone :)] + #[method(setDeliveryTimeZone:)] pub unsafe fn setDeliveryTimeZone(&self, deliveryTimeZone: Option<&NSTimeZone>); #[method_id(deliveryRepeatInterval)] pub unsafe fn deliveryRepeatInterval(&self) -> Option>; - # [method (setDeliveryRepeatInterval :)] + #[method(setDeliveryRepeatInterval:)] pub unsafe fn setDeliveryRepeatInterval( &self, deliveryRepeatInterval: Option<&NSDateComponents>, @@ -65,33 +65,33 @@ extern_methods!( pub unsafe fn isRemote(&self) -> bool; #[method_id(soundName)] pub unsafe fn soundName(&self) -> Option>; - # [method (setSoundName :)] + #[method(setSoundName:)] pub unsafe fn setSoundName(&self, soundName: Option<&NSString>); #[method(hasActionButton)] pub unsafe fn hasActionButton(&self) -> bool; - # [method (setHasActionButton :)] + #[method(setHasActionButton:)] pub unsafe fn setHasActionButton(&self, hasActionButton: bool); #[method(activationType)] pub unsafe fn activationType(&self) -> NSUserNotificationActivationType; #[method_id(otherButtonTitle)] pub unsafe fn otherButtonTitle(&self) -> Id; - # [method (setOtherButtonTitle :)] + #[method(setOtherButtonTitle:)] pub unsafe fn setOtherButtonTitle(&self, otherButtonTitle: &NSString); #[method_id(identifier)] pub unsafe fn identifier(&self) -> Option>; - # [method (setIdentifier :)] + #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>); #[method_id(contentImage)] pub unsafe fn contentImage(&self) -> Option>; - # [method (setContentImage :)] + #[method(setContentImage:)] pub unsafe fn setContentImage(&self, contentImage: Option<&NSImage>); #[method(hasReplyButton)] pub unsafe fn hasReplyButton(&self) -> bool; - # [method (setHasReplyButton :)] + #[method(setHasReplyButton:)] pub unsafe fn setHasReplyButton(&self, hasReplyButton: bool); #[method_id(responsePlaceholder)] pub unsafe fn responsePlaceholder(&self) -> Option>; - # [method (setResponsePlaceholder :)] + #[method(setResponsePlaceholder:)] pub unsafe fn setResponsePlaceholder(&self, responsePlaceholder: Option<&NSString>); #[method_id(response)] pub unsafe fn response(&self) -> Option>; @@ -99,7 +99,7 @@ extern_methods!( pub unsafe fn additionalActions( &self, ) -> Option, Shared>>; - # [method (setAdditionalActions :)] + #[method(setAdditionalActions:)] pub unsafe fn setAdditionalActions( &self, additionalActions: Option<&NSArray>, @@ -119,7 +119,7 @@ extern_class!( ); extern_methods!( unsafe impl NSUserNotificationAction { - # [method_id (actionWithIdentifier : title :)] + #[method_id(actionWithIdentifier:title:)] pub unsafe fn actionWithIdentifier_title( identifier: Option<&NSString>, title: Option<&NSString>, @@ -143,24 +143,24 @@ extern_methods!( pub unsafe fn defaultUserNotificationCenter() -> Id; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSUserNotificationCenterDelegate>); #[method_id(scheduledNotifications)] pub unsafe fn scheduledNotifications(&self) -> Id, Shared>; - # [method (setScheduledNotifications :)] + #[method(setScheduledNotifications:)] pub unsafe fn setScheduledNotifications( &self, scheduledNotifications: &NSArray, ); - # [method (scheduleNotification :)] + #[method(scheduleNotification:)] pub unsafe fn scheduleNotification(&self, notification: &NSUserNotification); - # [method (removeScheduledNotification :)] + #[method(removeScheduledNotification:)] pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification); #[method_id(deliveredNotifications)] pub unsafe fn deliveredNotifications(&self) -> Id, Shared>; - # [method (deliverNotification :)] + #[method(deliverNotification:)] pub unsafe fn deliverNotification(&self, notification: &NSUserNotification); - # [method (removeDeliveredNotification :)] + #[method(removeDeliveredNotification:)] pub unsafe fn removeDeliveredNotification(&self, notification: &NSUserNotification); #[method(removeAllDeliveredNotifications)] pub unsafe fn removeAllDeliveredNotifications(&self); diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index ff249e46b..a84937c4b 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -20,14 +20,14 @@ extern_class!( ); extern_methods!( unsafe impl NSUserScriptTask { - # [method_id (initWithURL : error :)] + #[method_id(initWithURL:error:)] pub unsafe fn initWithURL_error( &self, url: &NSURL, ) -> Result, Id>; #[method_id(scriptURL)] pub unsafe fn scriptURL(&self) -> Id; - # [method (executeWithCompletionHandler :)] + #[method(executeWithCompletionHandler:)] pub unsafe fn executeWithCompletionHandler( &self, handler: NSUserScriptTaskCompletionHandler, @@ -45,17 +45,17 @@ extern_methods!( unsafe impl NSUserUnixTask { #[method_id(standardInput)] pub unsafe fn standardInput(&self) -> Option>; - # [method (setStandardInput :)] + #[method(setStandardInput:)] pub unsafe fn setStandardInput(&self, standardInput: Option<&NSFileHandle>); #[method_id(standardOutput)] pub unsafe fn standardOutput(&self) -> Option>; - # [method (setStandardOutput :)] + #[method(setStandardOutput:)] pub unsafe fn setStandardOutput(&self, standardOutput: Option<&NSFileHandle>); #[method_id(standardError)] pub unsafe fn standardError(&self) -> Option>; - # [method (setStandardError :)] + #[method(setStandardError:)] pub unsafe fn setStandardError(&self, standardError: Option<&NSFileHandle>); - # [method (executeWithArguments : completionHandler :)] + #[method(executeWithArguments:completionHandler:)] pub unsafe fn executeWithArguments_completionHandler( &self, arguments: Option<&NSArray>, @@ -72,7 +72,7 @@ extern_class!( ); extern_methods!( unsafe impl NSUserAppleScriptTask { - # [method (executeWithAppleEvent : completionHandler :)] + #[method(executeWithAppleEvent:completionHandler:)] pub unsafe fn executeWithAppleEvent_completionHandler( &self, event: Option<&NSAppleEventDescriptor>, @@ -91,9 +91,9 @@ extern_methods!( unsafe impl NSUserAutomatorTask { #[method_id(variables)] pub unsafe fn variables(&self) -> Option, Shared>>; - # [method (setVariables :)] + #[method(setVariables:)] pub unsafe fn setVariables(&self, variables: Option<&NSDictionary>); - # [method (executeWithInput : completionHandler :)] + #[method(executeWithInput:completionHandler:)] pub unsafe fn executeWithInput_completionHandler( &self, input: Option<&NSSecureCoding>, diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index fa26790d9..b2fe9377f 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -14,29 +14,29 @@ extern_class!( ); extern_methods!( unsafe impl NSValue { - # [method (getValue : size :)] + #[method(getValue:size:)] pub unsafe fn getValue_size(&self, value: NonNull, size: NSUInteger); #[method(objCType)] pub unsafe fn objCType(&self) -> NonNull; - # [method_id (initWithBytes : objCType :)] + #[method_id(initWithBytes:objCType:)] pub unsafe fn initWithBytes_objCType( &self, value: NonNull, type_: NonNull, ) -> Id; - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); extern_methods!( #[doc = "NSValueCreation"] unsafe impl NSValue { - # [method_id (valueWithBytes : objCType :)] + #[method_id(valueWithBytes:objCType:)] pub unsafe fn valueWithBytes_objCType( value: NonNull, type_: NonNull, ) -> Id; - # [method_id (value : withObjCType :)] + #[method_id(value:withObjCType:)] pub unsafe fn value_withObjCType( value: NonNull, type_: NonNull, @@ -46,15 +46,15 @@ extern_methods!( extern_methods!( #[doc = "NSValueExtensionMethods"] unsafe impl NSValue { - # [method_id (valueWithNonretainedObject :)] + #[method_id(valueWithNonretainedObject:)] pub unsafe fn valueWithNonretainedObject(anObject: Option<&Object>) -> Id; #[method_id(nonretainedObjectValue)] pub unsafe fn nonretainedObjectValue(&self) -> Option>; - # [method_id (valueWithPointer :)] + #[method_id(valueWithPointer:)] pub unsafe fn valueWithPointer(pointer: *mut c_void) -> Id; #[method(pointerValue)] pub unsafe fn pointerValue(&self) -> *mut c_void; - # [method (isEqualToValue :)] + #[method(isEqualToValue:)] pub unsafe fn isEqualToValue(&self, value: &NSValue) -> bool; } ); @@ -67,37 +67,37 @@ extern_class!( ); extern_methods!( unsafe impl NSNumber { - # [method_id (initWithCoder :)] + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; - # [method_id (initWithChar :)] + #[method_id(initWithChar:)] pub unsafe fn initWithChar(&self, value: c_char) -> Id; - # [method_id (initWithUnsignedChar :)] + #[method_id(initWithUnsignedChar:)] pub unsafe fn initWithUnsignedChar(&self, value: c_uchar) -> Id; - # [method_id (initWithShort :)] + #[method_id(initWithShort:)] pub unsafe fn initWithShort(&self, value: c_short) -> Id; - # [method_id (initWithUnsignedShort :)] + #[method_id(initWithUnsignedShort:)] pub unsafe fn initWithUnsignedShort(&self, value: c_ushort) -> Id; - # [method_id (initWithInt :)] + #[method_id(initWithInt:)] pub unsafe fn initWithInt(&self, value: c_int) -> Id; - # [method_id (initWithUnsignedInt :)] + #[method_id(initWithUnsignedInt:)] pub unsafe fn initWithUnsignedInt(&self, value: c_uint) -> Id; - # [method_id (initWithLong :)] + #[method_id(initWithLong:)] pub unsafe fn initWithLong(&self, value: c_long) -> Id; - # [method_id (initWithUnsignedLong :)] + #[method_id(initWithUnsignedLong:)] pub unsafe fn initWithUnsignedLong(&self, value: c_ulong) -> Id; - # [method_id (initWithLongLong :)] + #[method_id(initWithLongLong:)] pub unsafe fn initWithLongLong(&self, value: c_longlong) -> Id; - # [method_id (initWithUnsignedLongLong :)] + #[method_id(initWithUnsignedLongLong:)] pub unsafe fn initWithUnsignedLongLong(&self, value: c_ulonglong) -> Id; - # [method_id (initWithFloat :)] + #[method_id(initWithFloat:)] pub unsafe fn initWithFloat(&self, value: c_float) -> Id; - # [method_id (initWithDouble :)] + #[method_id(initWithDouble:)] pub unsafe fn initWithDouble(&self, value: c_double) -> Id; - # [method_id (initWithBool :)] + #[method_id(initWithBool:)] pub unsafe fn initWithBool(&self, value: bool) -> Id; - # [method_id (initWithInteger :)] + #[method_id(initWithInteger:)] pub unsafe fn initWithInteger(&self, value: NSInteger) -> Id; - # [method_id (initWithUnsignedInteger :)] + #[method_id(initWithUnsignedInteger:)] pub unsafe fn initWithUnsignedInteger(&self, value: NSUInteger) -> Id; #[method(charValue)] pub unsafe fn charValue(&self) -> c_char; @@ -131,11 +131,11 @@ extern_methods!( pub unsafe fn unsignedIntegerValue(&self) -> NSUInteger; #[method_id(stringValue)] pub unsafe fn stringValue(&self) -> Id; - # [method (compare :)] + #[method(compare:)] pub unsafe fn compare(&self, otherNumber: &NSNumber) -> NSComparisonResult; - # [method (isEqualToNumber :)] + #[method(isEqualToNumber:)] pub unsafe fn isEqualToNumber(&self, number: &NSNumber) -> bool; - # [method_id (descriptionWithLocale :)] + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; } @@ -143,42 +143,42 @@ extern_methods!( extern_methods!( #[doc = "NSNumberCreation"] unsafe impl NSNumber { - # [method_id (numberWithChar :)] + #[method_id(numberWithChar:)] pub unsafe fn numberWithChar(value: c_char) -> Id; - # [method_id (numberWithUnsignedChar :)] + #[method_id(numberWithUnsignedChar:)] pub unsafe fn numberWithUnsignedChar(value: c_uchar) -> Id; - # [method_id (numberWithShort :)] + #[method_id(numberWithShort:)] pub unsafe fn numberWithShort(value: c_short) -> Id; - # [method_id (numberWithUnsignedShort :)] + #[method_id(numberWithUnsignedShort:)] pub unsafe fn numberWithUnsignedShort(value: c_ushort) -> Id; - # [method_id (numberWithInt :)] + #[method_id(numberWithInt:)] pub unsafe fn numberWithInt(value: c_int) -> Id; - # [method_id (numberWithUnsignedInt :)] + #[method_id(numberWithUnsignedInt:)] pub unsafe fn numberWithUnsignedInt(value: c_uint) -> Id; - # [method_id (numberWithLong :)] + #[method_id(numberWithLong:)] pub unsafe fn numberWithLong(value: c_long) -> Id; - # [method_id (numberWithUnsignedLong :)] + #[method_id(numberWithUnsignedLong:)] pub unsafe fn numberWithUnsignedLong(value: c_ulong) -> Id; - # [method_id (numberWithLongLong :)] + #[method_id(numberWithLongLong:)] pub unsafe fn numberWithLongLong(value: c_longlong) -> Id; - # [method_id (numberWithUnsignedLongLong :)] + #[method_id(numberWithUnsignedLongLong:)] pub unsafe fn numberWithUnsignedLongLong(value: c_ulonglong) -> Id; - # [method_id (numberWithFloat :)] + #[method_id(numberWithFloat:)] pub unsafe fn numberWithFloat(value: c_float) -> Id; - # [method_id (numberWithDouble :)] + #[method_id(numberWithDouble:)] pub unsafe fn numberWithDouble(value: c_double) -> Id; - # [method_id (numberWithBool :)] + #[method_id(numberWithBool:)] pub unsafe fn numberWithBool(value: bool) -> Id; - # [method_id (numberWithInteger :)] + #[method_id(numberWithInteger:)] pub unsafe fn numberWithInteger(value: NSInteger) -> Id; - # [method_id (numberWithUnsignedInteger :)] + #[method_id(numberWithUnsignedInteger:)] pub unsafe fn numberWithUnsignedInteger(value: NSUInteger) -> Id; } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSValue { - # [method (getValue :)] + #[method(getValue:)] pub unsafe fn getValue(&self, value: NonNull); } ); diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index 55265ebbe..e54b834bd 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -15,12 +15,12 @@ extern_class!( ); extern_methods!( unsafe impl NSValueTransformer { - # [method (setValueTransformer : forName :)] + #[method(setValueTransformer:forName:)] pub unsafe fn setValueTransformer_forName( transformer: Option<&NSValueTransformer>, name: &NSValueTransformerName, ); - # [method_id (valueTransformerForName :)] + #[method_id(valueTransformerForName:)] pub unsafe fn valueTransformerForName( name: &NSValueTransformerName, ) -> Option>; @@ -30,10 +30,10 @@ extern_methods!( pub unsafe fn transformedValueClass() -> &Class; #[method(allowsReverseTransformation)] pub unsafe fn allowsReverseTransformation() -> bool; - # [method_id (transformedValue :)] + #[method_id(transformedValue:)] pub unsafe fn transformedValue(&self, value: Option<&Object>) -> Option>; - # [method_id (reverseTransformedValue :)] + #[method_id(reverseTransformedValue:)] pub unsafe fn reverseTransformedValue( &self, value: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index d7ece7f0d..f51ae2d06 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -18,19 +18,19 @@ extern_methods!( unsafe impl NSXMLDTD { #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithKind : options :)] + #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; - # [method_id (initWithContentsOfURL : options : error :)] + #[method_id(initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, mask: NSXMLNodeOptions, ) -> Result, Id>; - # [method_id (initWithData : options : error :)] + #[method_id(initWithData:options:error:)] pub unsafe fn initWithData_options_error( &self, data: &NSData, @@ -38,50 +38,50 @@ extern_methods!( ) -> Result, Id>; #[method_id(publicID)] pub unsafe fn publicID(&self) -> Option>; - # [method (setPublicID :)] + #[method(setPublicID:)] pub unsafe fn setPublicID(&self, publicID: Option<&NSString>); #[method_id(systemID)] pub unsafe fn systemID(&self) -> Option>; - # [method (setSystemID :)] + #[method(setSystemID:)] pub unsafe fn setSystemID(&self, systemID: Option<&NSString>); - # [method (insertChild : atIndex :)] + #[method(insertChild:atIndex:)] pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger); - # [method (insertChildren : atIndex :)] + #[method(insertChildren:atIndex:)] pub unsafe fn insertChildren_atIndex( &self, children: &NSArray, index: NSUInteger, ); - # [method (removeChildAtIndex :)] + #[method(removeChildAtIndex:)] pub unsafe fn removeChildAtIndex(&self, index: NSUInteger); - # [method (setChildren :)] + #[method(setChildren:)] pub unsafe fn setChildren(&self, children: Option<&NSArray>); - # [method (addChild :)] + #[method(addChild:)] pub unsafe fn addChild(&self, child: &NSXMLNode); - # [method (replaceChildAtIndex : withNode :)] + #[method(replaceChildAtIndex:withNode:)] pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); - # [method_id (entityDeclarationForName :)] + #[method_id(entityDeclarationForName:)] pub unsafe fn entityDeclarationForName( &self, name: &NSString, ) -> Option>; - # [method_id (notationDeclarationForName :)] + #[method_id(notationDeclarationForName:)] pub unsafe fn notationDeclarationForName( &self, name: &NSString, ) -> Option>; - # [method_id (elementDeclarationForName :)] + #[method_id(elementDeclarationForName:)] pub unsafe fn elementDeclarationForName( &self, name: &NSString, ) -> Option>; - # [method_id (attributeDeclarationForName : elementName :)] + #[method_id(attributeDeclarationForName:elementName:)] pub unsafe fn attributeDeclarationForName_elementName( &self, name: &NSString, elementName: &NSString, ) -> Option>; - # [method_id (predefinedEntityDeclarationForName :)] + #[method_id(predefinedEntityDeclarationForName:)] pub unsafe fn predefinedEntityDeclarationForName( name: &NSString, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index bded139ac..1dbf96672 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -12,9 +12,9 @@ extern_class!( ); extern_methods!( unsafe impl NSXMLDTDNode { - # [method_id (initWithXMLString :)] + #[method_id(initWithXMLString:)] pub unsafe fn initWithXMLString(&self, string: &NSString) -> Option>; - # [method_id (initWithKind : options :)] + #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, @@ -24,21 +24,21 @@ extern_methods!( pub unsafe fn init(&self) -> Id; #[method(DTDKind)] pub unsafe fn DTDKind(&self) -> NSXMLDTDNodeKind; - # [method (setDTDKind :)] + #[method(setDTDKind:)] pub unsafe fn setDTDKind(&self, DTDKind: NSXMLDTDNodeKind); #[method(isExternal)] pub unsafe fn isExternal(&self) -> bool; #[method_id(publicID)] pub unsafe fn publicID(&self) -> Option>; - # [method (setPublicID :)] + #[method(setPublicID:)] pub unsafe fn setPublicID(&self, publicID: Option<&NSString>); #[method_id(systemID)] pub unsafe fn systemID(&self) -> Option>; - # [method (setSystemID :)] + #[method(setSystemID:)] pub unsafe fn setSystemID(&self, systemID: Option<&NSString>); #[method_id(notationName)] pub unsafe fn notationName(&self) -> Option>; - # [method (setNotationName :)] + #[method(setNotationName:)] pub unsafe fn setNotationName(&self, notationName: Option<&NSString>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index 2f3a215a7..cce445b4c 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -18,98 +18,98 @@ extern_methods!( unsafe impl NSXMLDocument { #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithXMLString : options : error :)] + #[method_id(initWithXMLString:options:error:)] pub unsafe fn initWithXMLString_options_error( &self, string: &NSString, mask: NSXMLNodeOptions, ) -> Result, Id>; - # [method_id (initWithContentsOfURL : options : error :)] + #[method_id(initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, mask: NSXMLNodeOptions, ) -> Result, Id>; - # [method_id (initWithData : options : error :)] + #[method_id(initWithData:options:error:)] pub unsafe fn initWithData_options_error( &self, data: &NSData, mask: NSXMLNodeOptions, ) -> Result, Id>; - # [method_id (initWithRootElement :)] + #[method_id(initWithRootElement:)] pub unsafe fn initWithRootElement( &self, element: Option<&NSXMLElement>, ) -> Id; - # [method (replacementClassForClass :)] + #[method(replacementClassForClass:)] pub unsafe fn replacementClassForClass(cls: &Class) -> &Class; #[method_id(characterEncoding)] pub unsafe fn characterEncoding(&self) -> Option>; - # [method (setCharacterEncoding :)] + #[method(setCharacterEncoding:)] pub unsafe fn setCharacterEncoding(&self, characterEncoding: Option<&NSString>); #[method_id(version)] pub unsafe fn version(&self) -> Option>; - # [method (setVersion :)] + #[method(setVersion:)] pub unsafe fn setVersion(&self, version: Option<&NSString>); #[method(isStandalone)] pub unsafe fn isStandalone(&self) -> bool; - # [method (setStandalone :)] + #[method(setStandalone:)] pub unsafe fn setStandalone(&self, standalone: bool); #[method(documentContentKind)] pub unsafe fn documentContentKind(&self) -> NSXMLDocumentContentKind; - # [method (setDocumentContentKind :)] + #[method(setDocumentContentKind:)] pub unsafe fn setDocumentContentKind(&self, documentContentKind: NSXMLDocumentContentKind); #[method_id(MIMEType)] pub unsafe fn MIMEType(&self) -> Option>; - # [method (setMIMEType :)] + #[method(setMIMEType:)] pub unsafe fn setMIMEType(&self, MIMEType: Option<&NSString>); #[method_id(DTD)] pub unsafe fn DTD(&self) -> Option>; - # [method (setDTD :)] + #[method(setDTD:)] pub unsafe fn setDTD(&self, DTD: Option<&NSXMLDTD>); - # [method (setRootElement :)] + #[method(setRootElement:)] pub unsafe fn setRootElement(&self, root: &NSXMLElement); #[method_id(rootElement)] pub unsafe fn rootElement(&self) -> Option>; - # [method (insertChild : atIndex :)] + #[method(insertChild:atIndex:)] pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger); - # [method (insertChildren : atIndex :)] + #[method(insertChildren:atIndex:)] pub unsafe fn insertChildren_atIndex( &self, children: &NSArray, index: NSUInteger, ); - # [method (removeChildAtIndex :)] + #[method(removeChildAtIndex:)] pub unsafe fn removeChildAtIndex(&self, index: NSUInteger); - # [method (setChildren :)] + #[method(setChildren:)] pub unsafe fn setChildren(&self, children: Option<&NSArray>); - # [method (addChild :)] + #[method(addChild:)] pub unsafe fn addChild(&self, child: &NSXMLNode); - # [method (replaceChildAtIndex : withNode :)] + #[method(replaceChildAtIndex:withNode:)] pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); #[method_id(XMLData)] pub unsafe fn XMLData(&self) -> Id; - # [method_id (XMLDataWithOptions :)] + #[method_id(XMLDataWithOptions:)] pub unsafe fn XMLDataWithOptions(&self, options: NSXMLNodeOptions) -> Id; - # [method_id (objectByApplyingXSLT : arguments : error :)] + #[method_id(objectByApplyingXSLT:arguments:error:)] pub unsafe fn objectByApplyingXSLT_arguments_error( &self, xslt: &NSData, arguments: Option<&NSDictionary>, ) -> Result, Id>; - # [method_id (objectByApplyingXSLTString : arguments : error :)] + #[method_id(objectByApplyingXSLTString:arguments:error:)] pub unsafe fn objectByApplyingXSLTString_arguments_error( &self, xslt: &NSString, arguments: Option<&NSDictionary>, ) -> Result, Id>; - # [method_id (objectByApplyingXSLTAtURL : arguments : error :)] + #[method_id(objectByApplyingXSLTAtURL:arguments:error:)] pub unsafe fn objectByApplyingXSLTAtURL_arguments_error( &self, xsltURL: &NSURL, argument: Option<&NSDictionary>, ) -> Result, Id>; - # [method (validateAndReturnError :)] + #[method(validateAndReturnError:)] pub unsafe fn validateAndReturnError(&self) -> Result<(), Id>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index 7b0c09e14..9cbba066d 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -17,104 +17,104 @@ extern_class!( ); extern_methods!( unsafe impl NSXMLElement { - # [method_id (initWithName :)] + #[method_id(initWithName:)] pub unsafe fn initWithName(&self, name: &NSString) -> Id; - # [method_id (initWithName : URI :)] + #[method_id(initWithName:URI:)] pub unsafe fn initWithName_URI( &self, name: &NSString, URI: Option<&NSString>, ) -> Id; - # [method_id (initWithName : stringValue :)] + #[method_id(initWithName:stringValue:)] pub unsafe fn initWithName_stringValue( &self, name: &NSString, string: Option<&NSString>, ) -> Id; - # [method_id (initWithXMLString : error :)] + #[method_id(initWithXMLString:error:)] pub unsafe fn initWithXMLString_error( &self, string: &NSString, ) -> Result, Id>; - # [method_id (initWithKind : options :)] + #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; - # [method_id (elementsForName :)] + #[method_id(elementsForName:)] pub unsafe fn elementsForName(&self, name: &NSString) -> Id, Shared>; - # [method_id (elementsForLocalName : URI :)] + #[method_id(elementsForLocalName:URI:)] pub unsafe fn elementsForLocalName_URI( &self, localName: &NSString, URI: Option<&NSString>, ) -> Id, Shared>; - # [method (addAttribute :)] + #[method(addAttribute:)] pub unsafe fn addAttribute(&self, attribute: &NSXMLNode); - # [method (removeAttributeForName :)] + #[method(removeAttributeForName:)] pub unsafe fn removeAttributeForName(&self, name: &NSString); #[method_id(attributes)] pub unsafe fn attributes(&self) -> Option, Shared>>; - # [method (setAttributes :)] + #[method(setAttributes:)] pub unsafe fn setAttributes(&self, attributes: Option<&NSArray>); - # [method (setAttributesWithDictionary :)] + #[method(setAttributesWithDictionary:)] pub unsafe fn setAttributesWithDictionary( &self, attributes: &NSDictionary, ); - # [method_id (attributeForName :)] + #[method_id(attributeForName:)] pub unsafe fn attributeForName(&self, name: &NSString) -> Option>; - # [method_id (attributeForLocalName : URI :)] + #[method_id(attributeForLocalName:URI:)] pub unsafe fn attributeForLocalName_URI( &self, localName: &NSString, URI: Option<&NSString>, ) -> Option>; - # [method (addNamespace :)] + #[method(addNamespace:)] pub unsafe fn addNamespace(&self, aNamespace: &NSXMLNode); - # [method (removeNamespaceForPrefix :)] + #[method(removeNamespaceForPrefix:)] pub unsafe fn removeNamespaceForPrefix(&self, name: &NSString); #[method_id(namespaces)] pub unsafe fn namespaces(&self) -> Option, Shared>>; - # [method (setNamespaces :)] + #[method(setNamespaces:)] pub unsafe fn setNamespaces(&self, namespaces: Option<&NSArray>); - # [method_id (namespaceForPrefix :)] + #[method_id(namespaceForPrefix:)] pub unsafe fn namespaceForPrefix(&self, name: &NSString) -> Option>; - # [method_id (resolveNamespaceForName :)] + #[method_id(resolveNamespaceForName:)] pub unsafe fn resolveNamespaceForName( &self, name: &NSString, ) -> Option>; - # [method_id (resolvePrefixForNamespaceURI :)] + #[method_id(resolvePrefixForNamespaceURI:)] pub unsafe fn resolvePrefixForNamespaceURI( &self, namespaceURI: &NSString, ) -> Option>; - # [method (insertChild : atIndex :)] + #[method(insertChild:atIndex:)] pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger); - # [method (insertChildren : atIndex :)] + #[method(insertChildren:atIndex:)] pub unsafe fn insertChildren_atIndex( &self, children: &NSArray, index: NSUInteger, ); - # [method (removeChildAtIndex :)] + #[method(removeChildAtIndex:)] pub unsafe fn removeChildAtIndex(&self, index: NSUInteger); - # [method (setChildren :)] + #[method(setChildren:)] pub unsafe fn setChildren(&self, children: Option<&NSArray>); - # [method (addChild :)] + #[method(addChild:)] pub unsafe fn addChild(&self, child: &NSXMLNode); - # [method (replaceChildAtIndex : withNode :)] + #[method(replaceChildAtIndex:withNode:)] pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); - # [method (normalizeAdjacentTextNodesPreservingCDATA :)] + #[method(normalizeAdjacentTextNodesPreservingCDATA:)] pub unsafe fn normalizeAdjacentTextNodesPreservingCDATA(&self, preserve: bool); } ); extern_methods!( #[doc = "NSDeprecated"] unsafe impl NSXMLElement { - # [method (setAttributesAsDictionary :)] + #[method(setAttributesAsDictionary:)] pub unsafe fn setAttributesAsDictionary(&self, attributes: &NSDictionary); } ); diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 9de6243d7..84a77b084 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -22,9 +22,9 @@ extern_methods!( unsafe impl NSXMLNode { #[method_id(init)] pub unsafe fn init(&self) -> Id; - # [method_id (initWithKind :)] + #[method_id(initWithKind:)] pub unsafe fn initWithKind(&self, kind: NSXMLNodeKind) -> Id; - # [method_id (initWithKind : options :)] + #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, @@ -32,65 +32,65 @@ extern_methods!( ) -> Id; #[method_id(document)] pub unsafe fn document() -> Id; - # [method_id (documentWithRootElement :)] + #[method_id(documentWithRootElement:)] pub unsafe fn documentWithRootElement(element: &NSXMLElement) -> Id; - # [method_id (elementWithName :)] + #[method_id(elementWithName:)] pub unsafe fn elementWithName(name: &NSString) -> Id; - # [method_id (elementWithName : URI :)] + #[method_id(elementWithName:URI:)] pub unsafe fn elementWithName_URI(name: &NSString, URI: &NSString) -> Id; - # [method_id (elementWithName : stringValue :)] + #[method_id(elementWithName:stringValue:)] pub unsafe fn elementWithName_stringValue( name: &NSString, string: &NSString, ) -> Id; - # [method_id (elementWithName : children : attributes :)] + #[method_id(elementWithName:children:attributes:)] pub unsafe fn elementWithName_children_attributes( name: &NSString, children: Option<&NSArray>, attributes: Option<&NSArray>, ) -> Id; - # [method_id (attributeWithName : stringValue :)] + #[method_id(attributeWithName:stringValue:)] pub unsafe fn attributeWithName_stringValue( name: &NSString, stringValue: &NSString, ) -> Id; - # [method_id (attributeWithName : URI : stringValue :)] + #[method_id(attributeWithName:URI:stringValue:)] pub unsafe fn attributeWithName_URI_stringValue( name: &NSString, URI: &NSString, stringValue: &NSString, ) -> Id; - # [method_id (namespaceWithName : stringValue :)] + #[method_id(namespaceWithName:stringValue:)] pub unsafe fn namespaceWithName_stringValue( name: &NSString, stringValue: &NSString, ) -> Id; - # [method_id (processingInstructionWithName : stringValue :)] + #[method_id(processingInstructionWithName:stringValue:)] pub unsafe fn processingInstructionWithName_stringValue( name: &NSString, stringValue: &NSString, ) -> Id; - # [method_id (commentWithStringValue :)] + #[method_id(commentWithStringValue:)] pub unsafe fn commentWithStringValue(stringValue: &NSString) -> Id; - # [method_id (textWithStringValue :)] + #[method_id(textWithStringValue:)] pub unsafe fn textWithStringValue(stringValue: &NSString) -> Id; - # [method_id (DTDNodeWithXMLString :)] + #[method_id(DTDNodeWithXMLString:)] pub unsafe fn DTDNodeWithXMLString(string: &NSString) -> Option>; #[method(kind)] pub unsafe fn kind(&self) -> NSXMLNodeKind; #[method_id(name)] pub unsafe fn name(&self) -> Option>; - # [method (setName :)] + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); #[method_id(objectValue)] pub unsafe fn objectValue(&self) -> Option>; - # [method (setObjectValue :)] + #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); #[method_id(stringValue)] pub unsafe fn stringValue(&self) -> Option>; - # [method (setStringValue :)] + #[method(setStringValue:)] pub unsafe fn setStringValue(&self, stringValue: Option<&NSString>); - # [method (setStringValue : resolvingEntities :)] + #[method(setStringValue:resolvingEntities:)] pub unsafe fn setStringValue_resolvingEntities(&self, string: &NSString, resolve: bool); #[method(index)] pub unsafe fn index(&self) -> NSUInteger; @@ -104,7 +104,7 @@ extern_methods!( pub unsafe fn childCount(&self) -> NSUInteger; #[method_id(children)] pub unsafe fn children(&self) -> Option, Shared>>; - # [method_id (childAtIndex :)] + #[method_id(childAtIndex:)] pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option>; #[method_id(previousSibling)] pub unsafe fn previousSibling(&self) -> Option>; @@ -124,13 +124,13 @@ extern_methods!( pub unsafe fn prefix(&self) -> Option>; #[method_id(URI)] pub unsafe fn URI(&self) -> Option>; - # [method (setURI :)] + #[method(setURI:)] pub unsafe fn setURI(&self, URI: Option<&NSString>); - # [method_id (localNameForName :)] + #[method_id(localNameForName:)] pub unsafe fn localNameForName(name: &NSString) -> Id; - # [method_id (prefixForName :)] + #[method_id(prefixForName:)] pub unsafe fn prefixForName(name: &NSString) -> Option>; - # [method_id (predefinedNamespaceForPrefix :)] + #[method_id(predefinedNamespaceForPrefix:)] pub unsafe fn predefinedNamespaceForPrefix( name: &NSString, ) -> Option>; @@ -138,28 +138,28 @@ extern_methods!( pub unsafe fn description(&self) -> Id; #[method_id(XMLString)] pub unsafe fn XMLString(&self) -> Id; - # [method_id (XMLStringWithOptions :)] + #[method_id(XMLStringWithOptions:)] pub unsafe fn XMLStringWithOptions( &self, options: NSXMLNodeOptions, ) -> Id; - # [method_id (canonicalXMLStringPreservingComments :)] + #[method_id(canonicalXMLStringPreservingComments:)] pub unsafe fn canonicalXMLStringPreservingComments( &self, comments: bool, ) -> Id; - # [method_id (nodesForXPath : error :)] + #[method_id(nodesForXPath:error:)] pub unsafe fn nodesForXPath_error( &self, xpath: &NSString, ) -> Result, Shared>, Id>; - # [method_id (objectsForXQuery : constants : error :)] + #[method_id(objectsForXQuery:constants:error:)] pub unsafe fn objectsForXQuery_constants_error( &self, xquery: &NSString, constants: Option<&NSDictionary>, ) -> Result, Id>; - # [method_id (objectsForXQuery : error :)] + #[method_id(objectsForXQuery:error:)] pub unsafe fn objectsForXQuery_error( &self, xquery: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 313413b66..c961fac2e 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -20,36 +20,36 @@ extern_class!( ); extern_methods!( unsafe impl NSXMLParser { - # [method_id (initWithContentsOfURL :)] + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; - # [method_id (initWithData :)] + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Id; - # [method_id (initWithStream :)] + #[method_id(initWithStream:)] pub unsafe fn initWithStream(&self, stream: &NSInputStream) -> Id; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSXMLParserDelegate>); #[method(shouldProcessNamespaces)] pub unsafe fn shouldProcessNamespaces(&self) -> bool; - # [method (setShouldProcessNamespaces :)] + #[method(setShouldProcessNamespaces:)] pub unsafe fn setShouldProcessNamespaces(&self, shouldProcessNamespaces: bool); #[method(shouldReportNamespacePrefixes)] pub unsafe fn shouldReportNamespacePrefixes(&self) -> bool; - # [method (setShouldReportNamespacePrefixes :)] + #[method(setShouldReportNamespacePrefixes:)] pub unsafe fn setShouldReportNamespacePrefixes(&self, shouldReportNamespacePrefixes: bool); #[method(externalEntityResolvingPolicy)] pub unsafe fn externalEntityResolvingPolicy( &self, ) -> NSXMLParserExternalEntityResolvingPolicy; - # [method (setExternalEntityResolvingPolicy :)] + #[method(setExternalEntityResolvingPolicy:)] pub unsafe fn setExternalEntityResolvingPolicy( &self, externalEntityResolvingPolicy: NSXMLParserExternalEntityResolvingPolicy, ); #[method_id(allowedExternalEntityURLs)] pub unsafe fn allowedExternalEntityURLs(&self) -> Option, Shared>>; - # [method (setAllowedExternalEntityURLs :)] + #[method(setAllowedExternalEntityURLs:)] pub unsafe fn setAllowedExternalEntityURLs( &self, allowedExternalEntityURLs: Option<&NSSet>, @@ -62,7 +62,7 @@ extern_methods!( pub unsafe fn parserError(&self) -> Option>; #[method(shouldResolveExternalEntities)] pub unsafe fn shouldResolveExternalEntities(&self) -> bool; - # [method (setShouldResolveExternalEntities :)] + #[method(setShouldResolveExternalEntities:)] pub unsafe fn setShouldResolveExternalEntities(&self, shouldResolveExternalEntities: bool); } ); diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 6b37b59bf..b22613ea9 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -24,17 +24,17 @@ extern_class!( ); extern_methods!( unsafe impl NSXPCConnection { - # [method_id (initWithServiceName :)] + #[method_id(initWithServiceName:)] pub unsafe fn initWithServiceName(&self, serviceName: &NSString) -> Id; #[method_id(serviceName)] pub unsafe fn serviceName(&self) -> Option>; - # [method_id (initWithMachServiceName : options :)] + #[method_id(initWithMachServiceName:options:)] pub unsafe fn initWithMachServiceName_options( &self, name: &NSString, options: NSXPCConnectionOptions, ) -> Id; - # [method_id (initWithListenerEndpoint :)] + #[method_id(initWithListenerEndpoint:)] pub unsafe fn initWithListenerEndpoint( &self, endpoint: &NSXPCListenerEndpoint, @@ -43,38 +43,38 @@ extern_methods!( pub unsafe fn endpoint(&self) -> Id; #[method_id(exportedInterface)] pub unsafe fn exportedInterface(&self) -> Option>; - # [method (setExportedInterface :)] + #[method(setExportedInterface:)] pub unsafe fn setExportedInterface(&self, exportedInterface: Option<&NSXPCInterface>); #[method_id(exportedObject)] pub unsafe fn exportedObject(&self) -> Option>; - # [method (setExportedObject :)] + #[method(setExportedObject:)] pub unsafe fn setExportedObject(&self, exportedObject: Option<&Object>); #[method_id(remoteObjectInterface)] pub unsafe fn remoteObjectInterface(&self) -> Option>; - # [method (setRemoteObjectInterface :)] + #[method(setRemoteObjectInterface:)] pub unsafe fn setRemoteObjectInterface( &self, remoteObjectInterface: Option<&NSXPCInterface>, ); #[method_id(remoteObjectProxy)] pub unsafe fn remoteObjectProxy(&self) -> Id; - # [method_id (remoteObjectProxyWithErrorHandler :)] + #[method_id(remoteObjectProxyWithErrorHandler:)] pub unsafe fn remoteObjectProxyWithErrorHandler( &self, handler: TodoBlock, ) -> Id; - # [method_id (synchronousRemoteObjectProxyWithErrorHandler :)] + #[method_id(synchronousRemoteObjectProxyWithErrorHandler:)] pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( &self, handler: TodoBlock, ) -> Id; #[method(interruptionHandler)] pub unsafe fn interruptionHandler(&self) -> TodoBlock; - # [method (setInterruptionHandler :)] + #[method(setInterruptionHandler:)] pub unsafe fn setInterruptionHandler(&self, interruptionHandler: TodoBlock); #[method(invalidationHandler)] pub unsafe fn invalidationHandler(&self) -> TodoBlock; - # [method (setInvalidationHandler :)] + #[method(setInvalidationHandler:)] pub unsafe fn setInvalidationHandler(&self, invalidationHandler: TodoBlock); #[method(resume)] pub unsafe fn resume(&self); @@ -92,7 +92,7 @@ extern_methods!( pub unsafe fn effectiveGroupIdentifier(&self) -> gid_t; #[method_id(currentConnection)] pub unsafe fn currentConnection() -> Option>; - # [method (scheduleSendBarrierBlock :)] + #[method(scheduleSendBarrierBlock:)] pub unsafe fn scheduleSendBarrierBlock(&self, block: TodoBlock); } ); @@ -109,11 +109,11 @@ extern_methods!( pub unsafe fn serviceListener() -> Id; #[method_id(anonymousListener)] pub unsafe fn anonymousListener() -> Id; - # [method_id (initWithMachServiceName :)] + #[method_id(initWithMachServiceName:)] pub unsafe fn initWithMachServiceName(&self, name: &NSString) -> Id; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; - # [method (setDelegate :)] + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSXPCListenerDelegate>); #[method_id(endpoint)] pub unsafe fn endpoint(&self) -> Id; @@ -135,13 +135,13 @@ extern_class!( ); extern_methods!( unsafe impl NSXPCInterface { - # [method_id (interfaceWithProtocol :)] + #[method_id(interfaceWithProtocol:)] pub unsafe fn interfaceWithProtocol(protocol: &Protocol) -> Id; #[method_id(protocol)] pub unsafe fn protocol(&self) -> Id; - # [method (setProtocol :)] + #[method(setProtocol:)] pub unsafe fn setProtocol(&self, protocol: &Protocol); - # [method (setClasses : forSelector : argumentIndex : ofReply :)] + #[method(setClasses:forSelector:argumentIndex:ofReply:)] pub unsafe fn setClasses_forSelector_argumentIndex_ofReply( &self, classes: &NSSet, @@ -149,14 +149,14 @@ extern_methods!( arg: NSUInteger, ofReply: bool, ); - # [method_id (classesForSelector : argumentIndex : ofReply :)] + #[method_id(classesForSelector:argumentIndex:ofReply:)] pub unsafe fn classesForSelector_argumentIndex_ofReply( &self, sel: Sel, arg: NSUInteger, ofReply: bool, ) -> Id, Shared>; - # [method (setInterface : forSelector : argumentIndex : ofReply :)] + #[method(setInterface:forSelector:argumentIndex:ofReply:)] pub unsafe fn setInterface_forSelector_argumentIndex_ofReply( &self, ifc: &NSXPCInterface, @@ -164,14 +164,14 @@ extern_methods!( arg: NSUInteger, ofReply: bool, ); - # [method_id (interfaceForSelector : argumentIndex : ofReply :)] + #[method_id(interfaceForSelector:argumentIndex:ofReply:)] pub unsafe fn interfaceForSelector_argumentIndex_ofReply( &self, sel: Sel, arg: NSUInteger, ofReply: bool, ) -> Option>; - # [method (setXPCType : forSelector : argumentIndex : ofReply :)] + #[method(setXPCType:forSelector:argumentIndex:ofReply:)] pub unsafe fn setXPCType_forSelector_argumentIndex_ofReply( &self, type_: xpc_type_t, @@ -179,7 +179,7 @@ extern_methods!( arg: NSUInteger, ofReply: bool, ); - # [method (XPCTypeForSelector : argumentIndex : ofReply :)] + #[method(XPCTypeForSelector:argumentIndex:ofReply:)] pub unsafe fn XPCTypeForSelector_argumentIndex_ofReply( &self, sel: Sel, @@ -207,9 +207,9 @@ extern_class!( ); extern_methods!( unsafe impl NSXPCCoder { - # [method (encodeXPCObject : forKey :)] + #[method(encodeXPCObject:forKey:)] pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: &xpc_object_t, key: &NSString); - # [method_id (decodeXPCObjectOfType : forKey :)] + #[method_id(decodeXPCObjectOfType:forKey:)] pub unsafe fn decodeXPCObjectOfType_forKey( &self, type_: xpc_type_t, @@ -217,7 +217,7 @@ extern_methods!( ) -> Option>; #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; - # [method (setUserInfo :)] + #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&NSObject>); #[method_id(connection)] pub unsafe fn connection(&self) -> Option>; From e6163d033702dcbeaf49e9389da3ea8a5e290957 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 9 Oct 2022 03:20:01 +0200 Subject: [PATCH 067/131] Add AppKit bindings --- crates/header-translator/framework-includes.h | 1 + .../src/generated/AppKit/AppKitDefines.rs | 5 + .../src/generated/AppKit/AppKitErrors.rs | 6 + .../src/generated/AppKit/NSATSTypesetter.rs | 165 ++++ .../src/generated/AppKit/NSAccessibility.rs | 120 +++ .../AppKit/NSAccessibilityConstants.rs | 20 + .../AppKit/NSAccessibilityCustomAction.rs | 46 + .../AppKit/NSAccessibilityCustomRotor.rs | 127 +++ .../AppKit/NSAccessibilityElement.rs | 35 + .../AppKit/NSAccessibilityProtocols.rs | 30 + .../src/generated/AppKit/NSActionCell.rs | 29 + .../src/generated/AppKit/NSAffineTransform.rs | 18 + crates/icrate/src/generated/AppKit/NSAlert.rs | 97 ++ .../AppKit/NSAlignmentFeedbackFilter.rs | 58 ++ .../src/generated/AppKit/NSAnimation.rs | 120 +++ .../generated/AppKit/NSAnimationContext.rs | 49 + .../src/generated/AppKit/NSAppearance.rs | 49 + .../AppKit/NSAppleScriptExtensions.rs | 14 + .../src/generated/AppKit/NSApplication.rs | 388 ++++++++ .../AppKit/NSApplicationScripting.rs | 29 + .../src/generated/AppKit/NSArrayController.rs | 131 +++ .../generated/AppKit/NSAttributedString.rs | 338 +++++++ .../src/generated/AppKit/NSBezierPath.rs | 238 +++++ .../src/generated/AppKit/NSBitmapImageRep.rs | 187 ++++ crates/icrate/src/generated/AppKit/NSBox.rs | 83 ++ .../icrate/src/generated/AppKit/NSBrowser.rs | 325 +++++++ .../src/generated/AppKit/NSBrowserCell.rs | 53 ++ .../icrate/src/generated/AppKit/NSButton.rs | 198 ++++ .../src/generated/AppKit/NSButtonCell.rs | 163 ++++ .../generated/AppKit/NSButtonTouchBarItem.rs | 68 ++ .../src/generated/AppKit/NSCIImageRep.rs | 52 ++ .../src/generated/AppKit/NSCachedImageRep.rs | 37 + .../AppKit/NSCandidateListTouchBarItem.rs | 77 ++ crates/icrate/src/generated/AppKit/NSCell.rs | 462 ++++++++++ .../AppKit/NSClickGestureRecognizer.rs | 30 + .../icrate/src/generated/AppKit/NSClipView.rs | 79 ++ .../src/generated/AppKit/NSCollectionView.rs | 363 ++++++++ .../NSCollectionViewCompositionalLayout.rs | 526 +++++++++++ .../AppKit/NSCollectionViewFlowLayout.rs | 96 ++ .../AppKit/NSCollectionViewGridLayout.rs | 50 + .../AppKit/NSCollectionViewLayout.rs | 321 +++++++ .../NSCollectionViewTransitionLayout.rs | 43 + crates/icrate/src/generated/AppKit/NSColor.rs | 456 +++++++++ .../src/generated/AppKit/NSColorList.rs | 64 ++ .../src/generated/AppKit/NSColorPanel.rs | 79 ++ .../src/generated/AppKit/NSColorPicker.rs | 45 + .../AppKit/NSColorPickerTouchBarItem.rs | 74 ++ .../src/generated/AppKit/NSColorPicking.rs | 15 + .../src/generated/AppKit/NSColorSampler.rs | 20 + .../src/generated/AppKit/NSColorSpace.rs | 72 ++ .../src/generated/AppKit/NSColorWell.rs | 35 + .../icrate/src/generated/AppKit/NSComboBox.rs | 94 ++ .../src/generated/AppKit/NSComboBoxCell.rs | 93 ++ .../icrate/src/generated/AppKit/NSControl.rs | 230 +++++ .../src/generated/AppKit/NSController.rs | 42 + .../icrate/src/generated/AppKit/NSCursor.rs | 113 +++ .../src/generated/AppKit/NSCustomImageRep.rs | 36 + .../generated/AppKit/NSCustomTouchBarItem.rs | 29 + .../src/generated/AppKit/NSDataAsset.rs | 34 + .../src/generated/AppKit/NSDatePicker.rs | 89 ++ .../src/generated/AppKit/NSDatePickerCell.rs | 84 ++ .../AppKit/NSDictionaryController.rs | 76 ++ .../generated/AppKit/NSDiffableDataSource.rs | 187 ++++ .../icrate/src/generated/AppKit/NSDockTile.rs | 41 + .../icrate/src/generated/AppKit/NSDocument.rs | 562 ++++++++++++ .../generated/AppKit/NSDocumentController.rs | 256 ++++++ .../generated/AppKit/NSDocumentScripting.rs | 36 + .../icrate/src/generated/AppKit/NSDragging.rs | 55 ++ .../src/generated/AppKit/NSDraggingItem.rs | 76 ++ .../src/generated/AppKit/NSDraggingSession.rs | 56 ++ .../icrate/src/generated/AppKit/NSDrawer.rs | 93 ++ .../src/generated/AppKit/NSEPSImageRep.rs | 28 + .../icrate/src/generated/AppKit/NSErrors.rs | 6 + crates/icrate/src/generated/AppKit/NSEvent.rs | 256 ++++++ .../generated/AppKit/NSFilePromiseProvider.rs | 42 + .../generated/AppKit/NSFilePromiseReceiver.rs | 35 + .../AppKit/NSFileWrapperExtensions.rs | 16 + crates/icrate/src/generated/AppKit/NSFont.rs | 217 +++++ .../generated/AppKit/NSFontAssetRequest.rs | 34 + .../src/generated/AppKit/NSFontCollection.rs | 135 +++ .../src/generated/AppKit/NSFontDescriptor.rs | 125 +++ .../src/generated/AppKit/NSFontManager.rs | 219 +++++ .../src/generated/AppKit/NSFontPanel.rs | 54 ++ crates/icrate/src/generated/AppKit/NSForm.rs | 64 ++ .../icrate/src/generated/AppKit/NSFormCell.rs | 81 ++ .../generated/AppKit/NSGestureRecognizer.rs | 171 ++++ .../src/generated/AppKit/NSGlyphGenerator.rs | 28 + .../src/generated/AppKit/NSGlyphInfo.rs | 56 ++ .../icrate/src/generated/AppKit/NSGradient.rs | 87 ++ .../icrate/src/generated/AppKit/NSGraphics.rs | 10 + .../src/generated/AppKit/NSGraphicsContext.rs | 119 +++ .../icrate/src/generated/AppKit/NSGridView.rs | 225 +++++ .../generated/AppKit/NSGroupTouchBarItem.rs | 69 ++ .../src/generated/AppKit/NSHapticFeedback.rs | 21 + .../src/generated/AppKit/NSHelpManager.rs | 81 ++ crates/icrate/src/generated/AppKit/NSImage.rs | 381 ++++++++ .../src/generated/AppKit/NSImageCell.rs | 30 + .../icrate/src/generated/AppKit/NSImageRep.rs | 141 +++ .../src/generated/AppKit/NSImageView.rs | 61 ++ .../src/generated/AppKit/NSInputManager.rs | 61 ++ .../src/generated/AppKit/NSInputServer.rs | 27 + .../src/generated/AppKit/NSInterfaceStyle.rs | 16 + .../src/generated/AppKit/NSItemProvider.rs | 18 + .../src/generated/AppKit/NSKeyValueBinding.rs | 127 +++ .../src/generated/AppKit/NSLayoutAnchor.rs | 193 ++++ .../generated/AppKit/NSLayoutConstraint.rs | 276 ++++++ .../src/generated/AppKit/NSLayoutGuide.rs | 72 ++ .../src/generated/AppKit/NSLayoutManager.rs | 748 +++++++++++++++ .../src/generated/AppKit/NSLevelIndicator.rs | 89 ++ .../generated/AppKit/NSLevelIndicatorCell.rs | 59 ++ .../NSMagnificationGestureRecognizer.rs | 22 + .../icrate/src/generated/AppKit/NSMatrix.rs | 283 ++++++ .../AppKit/NSMediaLibraryBrowserController.rs | 35 + crates/icrate/src/generated/AppKit/NSMenu.rs | 224 +++++ .../icrate/src/generated/AppKit/NSMenuItem.rs | 178 ++++ .../src/generated/AppKit/NSMenuItemCell.rs | 83 ++ .../src/generated/AppKit/NSMenuToolbarItem.rs | 25 + crates/icrate/src/generated/AppKit/NSMovie.rs | 26 + crates/icrate/src/generated/AppKit/NSNib.rs | 57 ++ .../src/generated/AppKit/NSNibDeclarations.rs | 4 + .../src/generated/AppKit/NSNibLoading.rs | 54 ++ .../generated/AppKit/NSObjectController.rs | 100 ++ .../icrate/src/generated/AppKit/NSOpenGL.rs | 193 ++++ .../src/generated/AppKit/NSOpenGLLayer.rs | 57 ++ .../src/generated/AppKit/NSOpenGLView.rs | 82 ++ .../src/generated/AppKit/NSOpenPanel.rs | 89 ++ .../src/generated/AppKit/NSOutlineView.rs | 149 +++ .../src/generated/AppKit/NSPDFImageRep.rs | 31 + .../icrate/src/generated/AppKit/NSPDFInfo.rs | 46 + .../icrate/src/generated/AppKit/NSPDFPanel.rs | 43 + .../src/generated/AppKit/NSPICTImageRep.rs | 25 + .../src/generated/AppKit/NSPageController.rs | 52 ++ .../src/generated/AppKit/NSPageLayout.rs | 66 ++ .../AppKit/NSPanGestureRecognizer.rs | 32 + crates/icrate/src/generated/AppKit/NSPanel.rs | 29 + .../src/generated/AppKit/NSParagraphStyle.rs | 222 +++++ .../src/generated/AppKit/NSPasteboard.rs | 186 ++++ .../src/generated/AppKit/NSPasteboardItem.rs | 57 ++ .../icrate/src/generated/AppKit/NSPathCell.rs | 106 +++ .../generated/AppKit/NSPathComponentCell.rs | 29 + .../src/generated/AppKit/NSPathControl.rs | 91 ++ .../src/generated/AppKit/NSPathControlItem.rs | 33 + .../generated/AppKit/NSPersistentDocument.rs | 73 ++ .../generated/AppKit/NSPickerTouchBarItem.rs | 99 ++ .../src/generated/AppKit/NSPopUpButton.rs | 103 +++ .../src/generated/AppKit/NSPopUpButtonCell.rs | 121 +++ .../icrate/src/generated/AppKit/NSPopover.rs | 80 ++ .../generated/AppKit/NSPopoverTouchBarItem.rs | 58 ++ .../src/generated/AppKit/NSPredicateEditor.rs | 24 + .../AppKit/NSPredicateEditorRowTemplate.rs | 81 ++ .../AppKit/NSPressGestureRecognizer.rs | 34 + .../AppKit/NSPressureConfiguration.rs | 41 + .../src/generated/AppKit/NSPrintInfo.rs | 138 +++ .../src/generated/AppKit/NSPrintOperation.rs | 155 ++++ .../src/generated/AppKit/NSPrintPanel.rs | 82 ++ .../icrate/src/generated/AppKit/NSPrinter.rs | 106 +++ .../generated/AppKit/NSProgressIndicator.rs | 78 ++ .../src/generated/AppKit/NSResponder.rs | 205 +++++ .../AppKit/NSRotationGestureRecognizer.rs | 26 + .../src/generated/AppKit/NSRuleEditor.rs | 137 +++ .../src/generated/AppKit/NSRulerMarker.rs | 69 ++ .../src/generated/AppKit/NSRulerView.rs | 167 ++++ .../generated/AppKit/NSRunningApplication.rs | 80 ++ .../src/generated/AppKit/NSSavePanel.rs | 178 ++++ .../icrate/src/generated/AppKit/NSScreen.rs | 99 ++ .../src/generated/AppKit/NSScrollView.rs | 249 +++++ .../icrate/src/generated/AppKit/NSScroller.rs | 86 ++ .../icrate/src/generated/AppKit/NSScrubber.rs | 163 ++++ .../generated/AppKit/NSScrubberItemView.rs | 90 ++ .../src/generated/AppKit/NSScrubberLayout.rs | 127 +++ .../src/generated/AppKit/NSSearchField.rs | 74 ++ .../src/generated/AppKit/NSSearchFieldCell.rs | 77 ++ .../generated/AppKit/NSSearchToolbarItem.rs | 42 + .../src/generated/AppKit/NSSecureTextField.rs | 32 + .../src/generated/AppKit/NSSegmentedCell.rs | 99 ++ .../generated/AppKit/NSSegmentedControl.rs | 146 +++ .../icrate/src/generated/AppKit/NSShadow.rs | 35 + .../src/generated/AppKit/NSSharingService.rs | 126 +++ .../NSSharingServicePickerToolbarItem.rs | 27 + .../NSSharingServicePickerTouchBarItem.rs | 41 + .../icrate/src/generated/AppKit/NSSlider.rs | 123 +++ .../src/generated/AppKit/NSSliderAccessory.rs | 60 ++ .../src/generated/AppKit/NSSliderCell.rs | 114 +++ .../generated/AppKit/NSSliderTouchBarItem.rs | 72 ++ crates/icrate/src/generated/AppKit/NSSound.rs | 116 +++ .../generated/AppKit/NSSpeechRecognizer.rs | 46 + .../generated/AppKit/NSSpeechSynthesizer.rs | 102 +++ .../src/generated/AppKit/NSSpellChecker.rs | 274 ++++++ .../src/generated/AppKit/NSSpellProtocol.rs | 8 + .../src/generated/AppKit/NSSplitView.rs | 100 ++ .../generated/AppKit/NSSplitViewController.rs | 96 ++ .../src/generated/AppKit/NSSplitViewItem.rs | 85 ++ .../src/generated/AppKit/NSStackView.rs | 137 +++ .../src/generated/AppKit/NSStatusBar.rs | 32 + .../src/generated/AppKit/NSStatusBarButton.rs | 21 + .../src/generated/AppKit/NSStatusItem.rs | 109 +++ .../icrate/src/generated/AppKit/NSStepper.rs | 37 + .../src/generated/AppKit/NSStepperCell.rs | 37 + .../generated/AppKit/NSStepperTouchBarItem.rs | 54 ++ .../src/generated/AppKit/NSStoryboard.rs | 44 + .../src/generated/AppKit/NSStoryboardSegue.rs | 41 + .../src/generated/AppKit/NSStringDrawing.rs | 130 +++ .../icrate/src/generated/AppKit/NSSwitch.rs | 21 + .../icrate/src/generated/AppKit/NSTabView.rs | 109 +++ .../generated/AppKit/NSTabViewController.rs | 107 +++ .../src/generated/AppKit/NSTabViewItem.rs | 70 ++ .../src/generated/AppKit/NSTableCellView.rs | 49 + .../src/generated/AppKit/NSTableColumn.rs | 99 ++ .../src/generated/AppKit/NSTableHeaderCell.rs | 27 + .../src/generated/AppKit/NSTableHeaderView.rs | 35 + .../src/generated/AppKit/NSTableRowView.rs | 87 ++ .../src/generated/AppKit/NSTableView.rs | 486 ++++++++++ .../AppKit/NSTableViewDiffableDataSource.rs | 94 ++ .../generated/AppKit/NSTableViewRowAction.rs | 40 + crates/icrate/src/generated/AppKit/NSText.rs | 166 ++++ .../generated/AppKit/NSTextAlternatives.rs | 32 + .../src/generated/AppKit/NSTextAttachment.rs | 151 +++ .../generated/AppKit/NSTextAttachmentCell.rs | 19 + .../generated/AppKit/NSTextCheckingClient.rs | 17 + .../AppKit/NSTextCheckingController.rs | 79 ++ .../src/generated/AppKit/NSTextContainer.rs | 95 ++ .../src/generated/AppKit/NSTextContent.rs | 8 + .../generated/AppKit/NSTextContentManager.rs | 127 +++ .../src/generated/AppKit/NSTextElement.rs | 56 ++ .../src/generated/AppKit/NSTextField.rs | 156 ++++ .../src/generated/AppKit/NSTextFieldCell.rs | 63 ++ .../src/generated/AppKit/NSTextFinder.rs | 68 ++ .../src/generated/AppKit/NSTextInputClient.rs | 12 + .../generated/AppKit/NSTextInputContext.rs | 67 ++ .../generated/AppKit/NSTextLayoutFragment.rs | 71 ++ .../generated/AppKit/NSTextLayoutManager.rs | 167 ++++ .../generated/AppKit/NSTextLineFragment.rs | 51 ++ .../icrate/src/generated/AppKit/NSTextList.rs | 34 + .../src/generated/AppKit/NSTextRange.rs | 53 ++ .../src/generated/AppKit/NSTextSelection.rs | 80 ++ .../AppKit/NSTextSelectionNavigation.rs | 95 ++ .../src/generated/AppKit/NSTextStorage.rs | 71 ++ .../AppKit/NSTextStorageScripting.rs | 35 + .../src/generated/AppKit/NSTextTable.rs | 189 ++++ .../icrate/src/generated/AppKit/NSTextView.rs | 745 +++++++++++++++ .../AppKit/NSTextViewportLayoutController.rs | 51 ++ .../generated/AppKit/NSTintConfiguration.rs | 30 + .../NSTitlebarAccessoryViewController.rs | 41 + .../src/generated/AppKit/NSTokenField.rs | 44 + .../src/generated/AppKit/NSTokenFieldCell.rs | 43 + .../icrate/src/generated/AppKit/NSToolbar.rs | 126 +++ .../src/generated/AppKit/NSToolbarItem.rs | 122 +++ .../generated/AppKit/NSToolbarItemGroup.rs | 58 ++ crates/icrate/src/generated/AppKit/NSTouch.rs | 44 + .../icrate/src/generated/AppKit/NSTouchBar.rs | 127 +++ .../src/generated/AppKit/NSTouchBarItem.rs | 47 + .../src/generated/AppKit/NSTrackingArea.rs | 36 + .../AppKit/NSTrackingSeparatorToolbarItem.rs | 31 + .../src/generated/AppKit/NSTreeController.rs | 133 +++ .../icrate/src/generated/AppKit/NSTreeNode.rs | 53 ++ .../src/generated/AppKit/NSTypesetter.rs | 288 ++++++ .../src/generated/AppKit/NSUserActivity.rs | 31 + .../AppKit/NSUserDefaultsController.rs | 52 ++ .../AppKit/NSUserInterfaceCompression.rs | 58 ++ .../NSUserInterfaceItemIdentification.rs | 8 + .../AppKit/NSUserInterfaceItemSearching.rs | 32 + .../generated/AppKit/NSUserInterfaceLayout.rs | 5 + .../AppKit/NSUserInterfaceValidation.rs | 8 + crates/icrate/src/generated/AppKit/NSView.rs | 783 ++++++++++++++++ .../src/generated/AppKit/NSViewController.rs | 195 ++++ .../generated/AppKit/NSVisualEffectView.rs | 47 + .../icrate/src/generated/AppKit/NSWindow.rs | 864 ++++++++++++++++++ .../generated/AppKit/NSWindowController.rs | 115 +++ .../generated/AppKit/NSWindowRestoration.rs | 106 +++ .../src/generated/AppKit/NSWindowScripting.rs | 52 ++ .../src/generated/AppKit/NSWindowTab.rs | 36 + .../src/generated/AppKit/NSWindowTabGroup.rs | 38 + .../src/generated/AppKit/NSWorkspace.rs | 471 ++++++++++ crates/icrate/src/generated/AppKit/mod.rs | 697 +++++++++++++- 274 files changed, 29943 insertions(+), 1 deletion(-) create mode 100644 crates/icrate/src/generated/AppKit/AppKitDefines.rs create mode 100644 crates/icrate/src/generated/AppKit/AppKitErrors.rs create mode 100644 crates/icrate/src/generated/AppKit/NSATSTypesetter.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAccessibility.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs create mode 100644 crates/icrate/src/generated/AppKit/NSActionCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAffineTransform.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAlert.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAnimation.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAnimationContext.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAppearance.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs create mode 100644 crates/icrate/src/generated/AppKit/NSApplication.rs create mode 100644 crates/icrate/src/generated/AppKit/NSApplicationScripting.rs create mode 100644 crates/icrate/src/generated/AppKit/NSArrayController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSAttributedString.rs create mode 100644 crates/icrate/src/generated/AppKit/NSBezierPath.rs create mode 100644 crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs create mode 100644 crates/icrate/src/generated/AppKit/NSBox.rs create mode 100644 crates/icrate/src/generated/AppKit/NSBrowser.rs create mode 100644 crates/icrate/src/generated/AppKit/NSBrowserCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSButton.rs create mode 100644 crates/icrate/src/generated/AppKit/NSButtonCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCIImageRep.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCachedImageRep.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSClipView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCollectionView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs create mode 100644 crates/icrate/src/generated/AppKit/NSColor.rs create mode 100644 crates/icrate/src/generated/AppKit/NSColorList.rs create mode 100644 crates/icrate/src/generated/AppKit/NSColorPanel.rs create mode 100644 crates/icrate/src/generated/AppKit/NSColorPicker.rs create mode 100644 crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSColorPicking.rs create mode 100644 crates/icrate/src/generated/AppKit/NSColorSampler.rs create mode 100644 crates/icrate/src/generated/AppKit/NSColorSpace.rs create mode 100644 crates/icrate/src/generated/AppKit/NSColorWell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSComboBox.rs create mode 100644 crates/icrate/src/generated/AppKit/NSComboBoxCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSControl.rs create mode 100644 crates/icrate/src/generated/AppKit/NSController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCursor.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCustomImageRep.rs create mode 100644 crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDataAsset.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDatePicker.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDatePickerCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDictionaryController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDockTile.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDocument.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDocumentController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDocumentScripting.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDragging.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDraggingItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDraggingSession.rs create mode 100644 crates/icrate/src/generated/AppKit/NSDrawer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSEPSImageRep.rs create mode 100644 crates/icrate/src/generated/AppKit/NSErrors.rs create mode 100644 crates/icrate/src/generated/AppKit/NSEvent.rs create mode 100644 crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs create mode 100644 crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs create mode 100644 crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs create mode 100644 crates/icrate/src/generated/AppKit/NSFont.rs create mode 100644 crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs create mode 100644 crates/icrate/src/generated/AppKit/NSFontCollection.rs create mode 100644 crates/icrate/src/generated/AppKit/NSFontDescriptor.rs create mode 100644 crates/icrate/src/generated/AppKit/NSFontManager.rs create mode 100644 crates/icrate/src/generated/AppKit/NSFontPanel.rs create mode 100644 crates/icrate/src/generated/AppKit/NSForm.rs create mode 100644 crates/icrate/src/generated/AppKit/NSFormCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs create mode 100644 crates/icrate/src/generated/AppKit/NSGlyphInfo.rs create mode 100644 crates/icrate/src/generated/AppKit/NSGradient.rs create mode 100644 crates/icrate/src/generated/AppKit/NSGraphics.rs create mode 100644 crates/icrate/src/generated/AppKit/NSGraphicsContext.rs create mode 100644 crates/icrate/src/generated/AppKit/NSGridView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSHapticFeedback.rs create mode 100644 crates/icrate/src/generated/AppKit/NSHelpManager.rs create mode 100644 crates/icrate/src/generated/AppKit/NSImage.rs create mode 100644 crates/icrate/src/generated/AppKit/NSImageCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSImageRep.rs create mode 100644 crates/icrate/src/generated/AppKit/NSImageView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSInputManager.rs create mode 100644 crates/icrate/src/generated/AppKit/NSInputServer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs create mode 100644 crates/icrate/src/generated/AppKit/NSItemProvider.rs create mode 100644 crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs create mode 100644 crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs create mode 100644 crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs create mode 100644 crates/icrate/src/generated/AppKit/NSLayoutGuide.rs create mode 100644 crates/icrate/src/generated/AppKit/NSLayoutManager.rs create mode 100644 crates/icrate/src/generated/AppKit/NSLevelIndicator.rs create mode 100644 crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSMatrix.rs create mode 100644 crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSMenu.rs create mode 100644 crates/icrate/src/generated/AppKit/NSMenuItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSMenuItemCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSMovie.rs create mode 100644 crates/icrate/src/generated/AppKit/NSNib.rs create mode 100644 crates/icrate/src/generated/AppKit/NSNibDeclarations.rs create mode 100644 crates/icrate/src/generated/AppKit/NSNibLoading.rs create mode 100644 crates/icrate/src/generated/AppKit/NSObjectController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSOpenGL.rs create mode 100644 crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSOpenGLView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSOpenPanel.rs create mode 100644 crates/icrate/src/generated/AppKit/NSOutlineView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPDFImageRep.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPDFInfo.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPDFPanel.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPICTImageRep.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPageController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPageLayout.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPanel.rs create mode 100644 crates/icrate/src/generated/AppKit/NSParagraphStyle.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPasteboard.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPasteboardItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPathCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPathComponentCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPathControl.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPathControlItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPersistentDocument.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPopUpButton.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPopover.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPredicateEditor.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPrintInfo.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPrintOperation.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPrintPanel.rs create mode 100644 crates/icrate/src/generated/AppKit/NSPrinter.rs create mode 100644 crates/icrate/src/generated/AppKit/NSProgressIndicator.rs create mode 100644 crates/icrate/src/generated/AppKit/NSResponder.rs create mode 100644 crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSRuleEditor.rs create mode 100644 crates/icrate/src/generated/AppKit/NSRulerMarker.rs create mode 100644 crates/icrate/src/generated/AppKit/NSRulerView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSRunningApplication.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSavePanel.rs create mode 100644 crates/icrate/src/generated/AppKit/NSScreen.rs create mode 100644 crates/icrate/src/generated/AppKit/NSScrollView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSScroller.rs create mode 100644 crates/icrate/src/generated/AppKit/NSScrubber.rs create mode 100644 crates/icrate/src/generated/AppKit/NSScrubberItemView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSScrubberLayout.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSearchField.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSecureTextField.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSegmentedCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSegmentedControl.rs create mode 100644 crates/icrate/src/generated/AppKit/NSShadow.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSharingService.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSlider.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSliderAccessory.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSliderCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSound.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSpellChecker.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSpellProtocol.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSplitView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSplitViewController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSplitViewItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSStackView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSStatusBar.rs create mode 100644 crates/icrate/src/generated/AppKit/NSStatusBarButton.rs create mode 100644 crates/icrate/src/generated/AppKit/NSStatusItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSStepper.rs create mode 100644 crates/icrate/src/generated/AppKit/NSStepperCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSStoryboard.rs create mode 100644 crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs create mode 100644 crates/icrate/src/generated/AppKit/NSStringDrawing.rs create mode 100644 crates/icrate/src/generated/AppKit/NSSwitch.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTabView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTabViewController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTabViewItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTableCellView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTableColumn.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTableHeaderView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTableRowView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTableView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs create mode 100644 crates/icrate/src/generated/AppKit/NSText.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextAlternatives.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextAttachment.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextCheckingController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextContainer.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextContent.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextContentManager.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextElement.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextField.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextFieldCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextFinder.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextInputClient.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextInputContext.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextLineFragment.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextList.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextRange.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextSelection.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextStorage.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextTable.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTintConfiguration.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTokenField.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs create mode 100644 crates/icrate/src/generated/AppKit/NSToolbar.rs create mode 100644 crates/icrate/src/generated/AppKit/NSToolbarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTouch.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTouchBar.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTouchBarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTrackingArea.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTreeController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTreeNode.rs create mode 100644 crates/icrate/src/generated/AppKit/NSTypesetter.rs create mode 100644 crates/icrate/src/generated/AppKit/NSUserActivity.rs create mode 100644 crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs create mode 100644 crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs create mode 100644 crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs create mode 100644 crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs create mode 100644 crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs create mode 100644 crates/icrate/src/generated/AppKit/NSView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSViewController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSVisualEffectView.rs create mode 100644 crates/icrate/src/generated/AppKit/NSWindow.rs create mode 100644 crates/icrate/src/generated/AppKit/NSWindowController.rs create mode 100644 crates/icrate/src/generated/AppKit/NSWindowRestoration.rs create mode 100644 crates/icrate/src/generated/AppKit/NSWindowScripting.rs create mode 100644 crates/icrate/src/generated/AppKit/NSWindowTab.rs create mode 100644 crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs create mode 100644 crates/icrate/src/generated/AppKit/NSWorkspace.rs diff --git a/crates/header-translator/framework-includes.h b/crates/header-translator/framework-includes.h index 0b8c4b8fb..3ea8199fb 100644 --- a/crates/header-translator/framework-includes.h +++ b/crates/header-translator/framework-includes.h @@ -1 +1,2 @@ #import +#import diff --git a/crates/icrate/src/generated/AppKit/AppKitDefines.rs b/crates/icrate/src/generated/AppKit/AppKitDefines.rs new file mode 100644 index 000000000..5362722ad --- /dev/null +++ b/crates/icrate/src/generated/AppKit/AppKitDefines.rs @@ -0,0 +1,5 @@ +use crate::Foundation::generated::NSObjCRuntime::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/AppKit/AppKitErrors.rs b/crates/icrate/src/generated/AppKit/AppKitErrors.rs new file mode 100644 index 000000000..fea2787aa --- /dev/null +++ b/crates/icrate/src/generated/AppKit/AppKitErrors.rs @@ -0,0 +1,6 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs new file mode 100644 index 000000000..b87ffaa13 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs @@ -0,0 +1,165 @@ +use crate::AppKit::generated::NSParagraphStyle::*; +use crate::AppKit::generated::NSTypesetter::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSATSTypesetter; + unsafe impl ClassType for NSATSTypesetter { + type Super = NSTypesetter; + } +); +extern_methods!( + unsafe impl NSATSTypesetter { + #[method_id(sharedTypesetter)] + pub unsafe fn sharedTypesetter() -> Id; + } +); +extern_methods!( + #[doc = "NSPantherCompatibility"] + unsafe impl NSATSTypesetter { + #[method(lineFragmentRectForProposedRect:remainingRect:)] + pub unsafe fn lineFragmentRectForProposedRect_remainingRect( + &self, + proposedRect: NSRect, + remainingRect: NSRectPointer, + ) -> NSRect; + } +); +extern_methods!( + #[doc = "NSPrimitiveInterface"] + unsafe impl NSATSTypesetter { + #[method(usesFontLeading)] + pub unsafe fn usesFontLeading(&self) -> bool; + #[method(setUsesFontLeading:)] + pub unsafe fn setUsesFontLeading(&self, usesFontLeading: bool); + #[method(typesetterBehavior)] + pub unsafe fn typesetterBehavior(&self) -> NSTypesetterBehavior; + #[method(setTypesetterBehavior:)] + pub unsafe fn setTypesetterBehavior(&self, typesetterBehavior: NSTypesetterBehavior); + #[method(hyphenationFactor)] + pub unsafe fn hyphenationFactor(&self) -> c_float; + #[method(setHyphenationFactor:)] + pub unsafe fn setHyphenationFactor(&self, hyphenationFactor: c_float); + #[method(lineFragmentPadding)] + pub unsafe fn lineFragmentPadding(&self) -> CGFloat; + #[method(setLineFragmentPadding:)] + pub unsafe fn setLineFragmentPadding(&self, lineFragmentPadding: CGFloat); + #[method_id(substituteFontForFont:)] + pub unsafe fn substituteFontForFont(&self, originalFont: &NSFont) -> Id; + #[method_id(textTabForGlyphLocation:writingDirection:maxLocation:)] + pub unsafe fn textTabForGlyphLocation_writingDirection_maxLocation( + &self, + glyphLocation: CGFloat, + direction: NSWritingDirection, + maxLocation: CGFloat, + ) -> Option>; + #[method(bidiProcessingEnabled)] + pub unsafe fn bidiProcessingEnabled(&self) -> bool; + #[method(setBidiProcessingEnabled:)] + pub unsafe fn setBidiProcessingEnabled(&self, bidiProcessingEnabled: bool); + #[method_id(attributedString)] + pub unsafe fn attributedString(&self) -> Option>; + #[method(setAttributedString:)] + pub unsafe fn setAttributedString(&self, attributedString: Option<&NSAttributedString>); + #[method(setParagraphGlyphRange:separatorGlyphRange:)] + pub unsafe fn setParagraphGlyphRange_separatorGlyphRange( + &self, + paragraphRange: NSRange, + paragraphSeparatorRange: NSRange, + ); + #[method(paragraphGlyphRange)] + pub unsafe fn paragraphGlyphRange(&self) -> NSRange; + #[method(paragraphSeparatorGlyphRange)] + pub unsafe fn paragraphSeparatorGlyphRange(&self) -> NSRange; + #[method(layoutParagraphAtPoint:)] + pub unsafe fn layoutParagraphAtPoint( + &self, + lineFragmentOrigin: NonNull, + ) -> NSUInteger; + #[method(lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( + &self, + glyphIndex: NSUInteger, + rect: NSRect, + ) -> CGFloat; + #[method(paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect( + &self, + glyphIndex: NSUInteger, + rect: NSRect, + ) -> CGFloat; + #[method(paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( + &self, + glyphIndex: NSUInteger, + rect: NSRect, + ) -> CGFloat; + #[method_id(layoutManager)] + pub unsafe fn layoutManager(&self) -> Option>; + #[method_id(currentTextContainer)] + pub unsafe fn currentTextContainer(&self) -> Option>; + #[method(setHardInvalidation:forGlyphRange:)] + pub unsafe fn setHardInvalidation_forGlyphRange(&self, flag: bool, glyphRange: NSRange); + #[method(getLineFragmentRect:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:)] + pub unsafe fn getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin( + &self, + lineFragmentRect: NonNull, + lineFragmentUsedRect: NonNull, + paragraphSeparatorGlyphRange: NSRange, + lineOrigin: NSPoint, + ); + } +); +extern_methods!( + #[doc = "NSLayoutPhaseInterface"] + unsafe impl NSATSTypesetter { + #[method(willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:)] + pub unsafe fn willSetLineFragmentRect_forGlyphRange_usedRect_baselineOffset( + &self, + lineRect: NonNull, + glyphRange: NSRange, + usedRect: NonNull, + baselineOffset: NonNull, + ); + #[method(shouldBreakLineByWordBeforeCharacterAtIndex:)] + pub unsafe fn shouldBreakLineByWordBeforeCharacterAtIndex( + &self, + charIndex: NSUInteger, + ) -> bool; + #[method(shouldBreakLineByHyphenatingBeforeCharacterAtIndex:)] + pub unsafe fn shouldBreakLineByHyphenatingBeforeCharacterAtIndex( + &self, + charIndex: NSUInteger, + ) -> bool; + #[method(hyphenationFactorForGlyphAtIndex:)] + pub unsafe fn hyphenationFactorForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> c_float; + #[method(hyphenCharacterForGlyphAtIndex:)] + pub unsafe fn hyphenCharacterForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> UTF32Char; + #[method(boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:)] + pub unsafe fn boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex( + &self, + glyphIndex: NSUInteger, + textContainer: &NSTextContainer, + proposedRect: NSRect, + glyphPosition: NSPoint, + charIndex: NSUInteger, + ) -> NSRect; + } +); +extern_methods!( + #[doc = "NSGlyphStorageInterface"] + unsafe impl NSATSTypesetter { + #[method(getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:)] + pub unsafe fn getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits( + &self, + glyphsRange: NSRange, + glyphBuffer: *mut NSGlyph, + charIndexBuffer: *mut NSUInteger, + inscribeBuffer: *mut NSGlyphInscription, + elasticBuffer: *mut bool, + ) -> NSUInteger; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAccessibility.rs b/crates/icrate/src/generated/AppKit/NSAccessibility.rs new file mode 100644 index 000000000..a5a213d25 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAccessibility.rs @@ -0,0 +1,120 @@ +use super::__exported::NSArray; +use super::__exported::NSString; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAccessibilityConstants::*; +use crate::AppKit::generated::NSAccessibilityCustomRotor::*; +use crate::AppKit::generated::NSAccessibilityElement::*; +use crate::AppKit::generated::NSAccessibilityProtocols::*; +use crate::AppKit::generated::NSErrors::*; +use crate::AppKit::generated::NSWorkspace::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_methods!( + #[doc = "NSAccessibility"] + unsafe impl NSObject { + #[method_id(accessibilityAttributeNames)] + pub unsafe fn accessibilityAttributeNames( + &self, + ) -> Id, Shared>; + #[method_id(accessibilityAttributeValue:)] + pub unsafe fn accessibilityAttributeValue( + &self, + attribute: &NSAccessibilityAttributeName, + ) -> Option>; + #[method(accessibilityIsAttributeSettable:)] + pub unsafe fn accessibilityIsAttributeSettable( + &self, + attribute: &NSAccessibilityAttributeName, + ) -> bool; + #[method(accessibilitySetValue:forAttribute:)] + pub unsafe fn accessibilitySetValue_forAttribute( + &self, + value: Option<&Object>, + attribute: &NSAccessibilityAttributeName, + ); + #[method_id(accessibilityParameterizedAttributeNames)] + pub unsafe fn accessibilityParameterizedAttributeNames( + &self, + ) -> Id, Shared>; + #[method_id(accessibilityAttributeValue:forParameter:)] + pub unsafe fn accessibilityAttributeValue_forParameter( + &self, + attribute: &NSAccessibilityParameterizedAttributeName, + parameter: Option<&Object>, + ) -> Option>; + #[method_id(accessibilityActionNames)] + pub unsafe fn accessibilityActionNames( + &self, + ) -> Id, Shared>; + #[method_id(accessibilityActionDescription:)] + pub unsafe fn accessibilityActionDescription( + &self, + action: &NSAccessibilityActionName, + ) -> Option>; + #[method(accessibilityPerformAction:)] + pub unsafe fn accessibilityPerformAction(&self, action: &NSAccessibilityActionName); + #[method(accessibilityIsIgnored)] + pub unsafe fn accessibilityIsIgnored(&self) -> bool; + #[method_id(accessibilityHitTest:)] + pub unsafe fn accessibilityHitTest(&self, point: NSPoint) -> Option>; + #[method_id(accessibilityFocusedUIElement)] + pub unsafe fn accessibilityFocusedUIElement(&self) -> Option>; + #[method(accessibilityIndexOfChild:)] + pub unsafe fn accessibilityIndexOfChild(&self, child: &Object) -> NSUInteger; + #[method(accessibilityArrayAttributeCount:)] + pub unsafe fn accessibilityArrayAttributeCount( + &self, + attribute: &NSAccessibilityAttributeName, + ) -> NSUInteger; + #[method_id(accessibilityArrayAttributeValues:index:maxCount:)] + pub unsafe fn accessibilityArrayAttributeValues_index_maxCount( + &self, + attribute: &NSAccessibilityAttributeName, + index: NSUInteger, + maxCount: NSUInteger, + ) -> Id; + #[method(accessibilityNotifiesWhenDestroyed)] + pub unsafe fn accessibilityNotifiesWhenDestroyed(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSWorkspaceAccessibilityDisplay"] + unsafe impl NSWorkspace { + #[method(accessibilityDisplayShouldIncreaseContrast)] + pub unsafe fn accessibilityDisplayShouldIncreaseContrast(&self) -> bool; + #[method(accessibilityDisplayShouldDifferentiateWithoutColor)] + pub unsafe fn accessibilityDisplayShouldDifferentiateWithoutColor(&self) -> bool; + #[method(accessibilityDisplayShouldReduceTransparency)] + pub unsafe fn accessibilityDisplayShouldReduceTransparency(&self) -> bool; + #[method(accessibilityDisplayShouldReduceMotion)] + pub unsafe fn accessibilityDisplayShouldReduceMotion(&self) -> bool; + #[method(accessibilityDisplayShouldInvertColors)] + pub unsafe fn accessibilityDisplayShouldInvertColors(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSWorkspaceAccessibility"] + unsafe impl NSWorkspace { + #[method(isVoiceOverEnabled)] + pub unsafe fn isVoiceOverEnabled(&self) -> bool; + #[method(isSwitchControlEnabled)] + pub unsafe fn isSwitchControlEnabled(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSAccessibilityAdditions"] + unsafe impl NSObject { + #[method(accessibilitySetOverrideValue:forAttribute:)] + pub unsafe fn accessibilitySetOverrideValue_forAttribute( + &self, + value: Option<&Object>, + attribute: &NSAccessibilityAttributeName, + ) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs new file mode 100644 index 000000000..d5886c93a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs @@ -0,0 +1,20 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSAccessibilityAttributeName = NSString; +pub type NSAccessibilityParameterizedAttributeName = NSString; +pub type NSAccessibilityAnnotationAttributeKey = NSString; +pub type NSAccessibilityFontAttributeKey = NSString; +pub type NSAccessibilityOrientationValue = NSString; +pub type NSAccessibilitySortDirectionValue = NSString; +pub type NSAccessibilityRulerMarkerTypeValue = NSString; +pub type NSAccessibilityRulerUnitValue = NSString; +pub type NSAccessibilityActionName = NSString; +pub type NSAccessibilityNotificationName = NSString; +pub type NSAccessibilityRole = NSString; +pub type NSAccessibilitySubrole = NSString; +pub type NSAccessibilityNotificationUserInfoKey = NSString; +pub type NSAccessibilityLoadingToken = TodoProtocols; diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs new file mode 100644 index 000000000..c8336301f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs @@ -0,0 +1,46 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSAccessibilityCustomAction; + unsafe impl ClassType for NSAccessibilityCustomAction { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSAccessibilityCustomAction { + #[method_id(initWithName:handler:)] + pub unsafe fn initWithName_handler( + &self, + name: &NSString, + handler: TodoBlock, + ) -> Id; + #[method_id(initWithName:target:selector:)] + pub unsafe fn initWithName_target_selector( + &self, + name: &NSString, + target: &NSObject, + selector: Sel, + ) -> Id; + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method(setName:)] + pub unsafe fn setName(&self, name: &NSString); + #[method(handler)] + pub unsafe fn handler(&self) -> TodoBlock; + #[method(setHandler:)] + pub unsafe fn setHandler(&self, handler: TodoBlock); + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&NSObject>); + #[method(selector)] + pub unsafe fn selector(&self) -> Option; + #[method(setSelector:)] + pub unsafe fn setSelector(&self, selector: Option); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs new file mode 100644 index 000000000..9e214cc4a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs @@ -0,0 +1,127 @@ +use super::__exported::NSAccessibilityCustomRotorItemLoadDelegate; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAccessibilityProtocols::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSAccessibilityCustomRotor; + unsafe impl ClassType for NSAccessibilityCustomRotor { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSAccessibilityCustomRotor { + #[method_id(initWithLabel:itemSearchDelegate:)] + pub unsafe fn initWithLabel_itemSearchDelegate( + &self, + label: &NSString, + itemSearchDelegate: &NSAccessibilityCustomRotorItemSearchDelegate, + ) -> Id; + #[method_id(initWithRotorType:itemSearchDelegate:)] + pub unsafe fn initWithRotorType_itemSearchDelegate( + &self, + rotorType: NSAccessibilityCustomRotorType, + itemSearchDelegate: &NSAccessibilityCustomRotorItemSearchDelegate, + ) -> Id; + #[method(type)] + pub unsafe fn type_(&self) -> NSAccessibilityCustomRotorType; + #[method(setType:)] + pub unsafe fn setType(&self, type_: NSAccessibilityCustomRotorType); + #[method_id(label)] + pub unsafe fn label(&self) -> Id; + #[method(setLabel:)] + pub unsafe fn setLabel(&self, label: &NSString); + #[method_id(itemSearchDelegate)] + pub unsafe fn itemSearchDelegate( + &self, + ) -> Option>; + #[method(setItemSearchDelegate:)] + pub unsafe fn setItemSearchDelegate( + &self, + itemSearchDelegate: Option<&NSAccessibilityCustomRotorItemSearchDelegate>, + ); + #[method_id(itemLoadingDelegate)] + pub unsafe fn itemLoadingDelegate( + &self, + ) -> Option>; + #[method(setItemLoadingDelegate:)] + pub unsafe fn setItemLoadingDelegate( + &self, + itemLoadingDelegate: Option<&NSAccessibilityElementLoading>, + ); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSAccessibilityCustomRotorSearchParameters; + unsafe impl ClassType for NSAccessibilityCustomRotorSearchParameters { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSAccessibilityCustomRotorSearchParameters { + #[method_id(currentItem)] + pub unsafe fn currentItem( + &self, + ) -> Option>; + #[method(setCurrentItem:)] + pub unsafe fn setCurrentItem( + &self, + currentItem: Option<&NSAccessibilityCustomRotorItemResult>, + ); + #[method(searchDirection)] + pub unsafe fn searchDirection(&self) -> NSAccessibilityCustomRotorSearchDirection; + #[method(setSearchDirection:)] + pub unsafe fn setSearchDirection( + &self, + searchDirection: NSAccessibilityCustomRotorSearchDirection, + ); + #[method_id(filterString)] + pub unsafe fn filterString(&self) -> Id; + #[method(setFilterString:)] + pub unsafe fn setFilterString(&self, filterString: &NSString); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSAccessibilityCustomRotorItemResult; + unsafe impl ClassType for NSAccessibilityCustomRotorItemResult { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSAccessibilityCustomRotorItemResult { + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithTargetElement:)] + pub unsafe fn initWithTargetElement( + &self, + targetElement: &NSAccessibilityElement, + ) -> Id; + #[method_id(initWithItemLoadingToken:customLabel:)] + pub unsafe fn initWithItemLoadingToken_customLabel( + &self, + itemLoadingToken: &NSAccessibilityLoadingToken, + customLabel: &NSString, + ) -> Id; + #[method_id(targetElement)] + pub unsafe fn targetElement(&self) -> Option>; + #[method_id(itemLoadingToken)] + pub unsafe fn itemLoadingToken(&self) -> Option>; + #[method(targetRange)] + pub unsafe fn targetRange(&self) -> NSRange; + #[method(setTargetRange:)] + pub unsafe fn setTargetRange(&self, targetRange: NSRange); + #[method_id(customLabel)] + pub unsafe fn customLabel(&self) -> Option>; + #[method(setCustomLabel:)] + pub unsafe fn setCustomLabel(&self, customLabel: Option<&NSString>); + } +); +pub type NSAccessibilityCustomRotorItemSearchDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs new file mode 100644 index 000000000..89637b9da --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs @@ -0,0 +1,35 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAccessibilityConstants::*; +use crate::AppKit::generated::NSAccessibilityProtocols::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSAccessibilityElement; + unsafe impl ClassType for NSAccessibilityElement { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSAccessibilityElement { + #[method_id(accessibilityElementWithRole:frame:label:parent:)] + pub unsafe fn accessibilityElementWithRole_frame_label_parent( + role: &NSAccessibilityRole, + frame: NSRect, + label: Option<&NSString>, + parent: Option<&Object>, + ) -> Id; + #[method(accessibilityAddChildElement:)] + pub unsafe fn accessibilityAddChildElement(&self, childElement: &NSAccessibilityElement); + #[method(accessibilityFrameInParentSpace)] + pub unsafe fn accessibilityFrameInParentSpace(&self) -> NSRect; + #[method(setAccessibilityFrameInParentSpace:)] + pub unsafe fn setAccessibilityFrameInParentSpace( + &self, + accessibilityFrameInParentSpace: NSRect, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs new file mode 100644 index 000000000..d9582c27c --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs @@ -0,0 +1,30 @@ +use super::__exported::NSAccessibilityCustomRotor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAccessibilityConstants::*; +use crate::AppKit::generated::NSAccessibilityCustomAction::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSAccessibilityElement = NSObject; +pub type NSAccessibilityGroup = NSObject; +pub type NSAccessibilityButton = NSObject; +pub type NSAccessibilitySwitch = NSObject; +pub type NSAccessibilityRadioButton = NSObject; +pub type NSAccessibilityCheckBox = NSObject; +pub type NSAccessibilityStaticText = NSObject; +pub type NSAccessibilityNavigableStaticText = NSObject; +pub type NSAccessibilityProgressIndicator = NSObject; +pub type NSAccessibilityStepper = NSObject; +pub type NSAccessibilitySlider = NSObject; +pub type NSAccessibilityImage = NSObject; +pub type NSAccessibilityContainsTransientUI = NSObject; +pub type NSAccessibilityTable = NSObject; +pub type NSAccessibilityOutline = NSObject; +pub type NSAccessibilityList = NSObject; +pub type NSAccessibilityRow = NSObject; +pub type NSAccessibilityLayoutArea = NSObject; +pub type NSAccessibilityLayoutItem = NSObject; +pub type NSAccessibilityElementLoading = NSObject; +pub type NSAccessibility = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSActionCell.rs b/crates/icrate/src/generated/AppKit/NSActionCell.rs new file mode 100644 index 000000000..6c502c73a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSActionCell.rs @@ -0,0 +1,29 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSActionCell; + unsafe impl ClassType for NSActionCell { + type Super = NSCell; + } +); +extern_methods!( + unsafe impl NSActionCell { + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method(tag)] + pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] + pub unsafe fn setTag(&self, tag: NSInteger); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs new file mode 100644 index 000000000..da8544cb7 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs @@ -0,0 +1,18 @@ +use super::__exported::NSBezierPath; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSAffineTransform::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_methods!( + #[doc = "NSAppKitAdditions"] + unsafe impl NSAffineTransform { + #[method_id(transformBezierPath:)] + pub unsafe fn transformBezierPath(&self, path: &NSBezierPath) -> Id; + #[method(set)] + pub unsafe fn set(&self); + #[method(concat)] + pub unsafe fn concat(&self); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs new file mode 100644 index 000000000..5ee70ebf4 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -0,0 +1,97 @@ +use super::__exported::NSButton; +use super::__exported::NSError; +use super::__exported::NSImage; +use super::__exported::NSPanel; +use super::__exported::NSTextField; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::AppKit::generated::NSGraphics::*; +use crate::AppKit::generated::NSHelpManager::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSAlert; + unsafe impl ClassType for NSAlert { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSAlert { + #[method_id(alertWithError:)] + pub unsafe fn alertWithError(error: &NSError) -> Id; + #[method_id(messageText)] + pub unsafe fn messageText(&self) -> Id; + #[method(setMessageText:)] + pub unsafe fn setMessageText(&self, messageText: &NSString); + #[method_id(informativeText)] + pub unsafe fn informativeText(&self) -> Id; + #[method(setInformativeText:)] + pub unsafe fn setInformativeText(&self, informativeText: &NSString); + #[method_id(icon)] + pub unsafe fn icon(&self) -> Option>; + #[method(setIcon:)] + pub unsafe fn setIcon(&self, icon: Option<&NSImage>); + #[method_id(addButtonWithTitle:)] + pub unsafe fn addButtonWithTitle(&self, title: &NSString) -> Id; + #[method_id(buttons)] + pub unsafe fn buttons(&self) -> Id, Shared>; + #[method(showsHelp)] + pub unsafe fn showsHelp(&self) -> bool; + #[method(setShowsHelp:)] + pub unsafe fn setShowsHelp(&self, showsHelp: bool); + #[method_id(helpAnchor)] + pub unsafe fn helpAnchor(&self) -> Option>; + #[method(setHelpAnchor:)] + pub unsafe fn setHelpAnchor(&self, helpAnchor: Option<&NSHelpAnchorName>); + #[method(alertStyle)] + pub unsafe fn alertStyle(&self) -> NSAlertStyle; + #[method(setAlertStyle:)] + pub unsafe fn setAlertStyle(&self, alertStyle: NSAlertStyle); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSAlertDelegate>); + #[method(showsSuppressionButton)] + pub unsafe fn showsSuppressionButton(&self) -> bool; + #[method(setShowsSuppressionButton:)] + pub unsafe fn setShowsSuppressionButton(&self, showsSuppressionButton: bool); + #[method_id(suppressionButton)] + pub unsafe fn suppressionButton(&self) -> Option>; + #[method_id(accessoryView)] + pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method(layout)] + pub unsafe fn layout(&self); + #[method(runModal)] + pub unsafe fn runModal(&self) -> NSModalResponse; + #[method(beginSheetModalForWindow:completionHandler:)] + pub unsafe fn beginSheetModalForWindow_completionHandler( + &self, + sheetWindow: &NSWindow, + handler: TodoBlock, + ); + #[method_id(window)] + pub unsafe fn window(&self) -> Id; + } +); +pub type NSAlertDelegate = NSObject; +extern_methods!( + #[doc = "NSAlertDeprecated"] + unsafe impl NSAlert { + #[method(beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:)] + pub unsafe fn beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo( + &self, + window: &NSWindow, + delegate: Option<&Object>, + didEndSelector: Option, + contextInfo: *mut c_void, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs new file mode 100644 index 000000000..c7fee0d93 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs @@ -0,0 +1,58 @@ +use super::__exported::NSPanGestureRecognizer; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSEvent::*; +use crate::AppKit::generated::NSHapticFeedback::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSAlignmentFeedbackToken = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSAlignmentFeedbackFilter; + unsafe impl ClassType for NSAlignmentFeedbackFilter { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSAlignmentFeedbackFilter { + #[method(inputEventMask)] + pub unsafe fn inputEventMask() -> NSEventMask; + #[method(updateWithEvent:)] + pub unsafe fn updateWithEvent(&self, event: &NSEvent); + #[method(updateWithPanRecognizer:)] + pub unsafe fn updateWithPanRecognizer(&self, panRecognizer: &NSPanGestureRecognizer); + #[method_id(alignmentFeedbackTokenForMovementInView:previousPoint:alignedPoint:defaultPoint:)] + pub unsafe fn alignmentFeedbackTokenForMovementInView_previousPoint_alignedPoint_defaultPoint( + &self, + view: Option<&NSView>, + previousPoint: NSPoint, + alignedPoint: NSPoint, + defaultPoint: NSPoint, + ) -> Option>; + #[method_id(alignmentFeedbackTokenForHorizontalMovementInView:previousX:alignedX:defaultX:)] + pub unsafe fn alignmentFeedbackTokenForHorizontalMovementInView_previousX_alignedX_defaultX( + &self, + view: Option<&NSView>, + previousX: CGFloat, + alignedX: CGFloat, + defaultX: CGFloat, + ) -> Option>; + #[method_id(alignmentFeedbackTokenForVerticalMovementInView:previousY:alignedY:defaultY:)] + pub unsafe fn alignmentFeedbackTokenForVerticalMovementInView_previousY_alignedY_defaultY( + &self, + view: Option<&NSView>, + previousY: CGFloat, + alignedY: CGFloat, + defaultY: CGFloat, + ) -> Option>; + #[method(performFeedback:performanceTime:)] + pub unsafe fn performFeedback_performanceTime( + &self, + alignmentFeedbackTokens: &NSArray, + performanceTime: NSHapticFeedbackPerformanceTime, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs new file mode 100644 index 000000000..c2627de5e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -0,0 +1,120 @@ +use super::__exported::NSGraphicsContext; +use super::__exported::NSString; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSAnimation; + unsafe impl ClassType for NSAnimation { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSAnimation { + #[method_id(initWithDuration:animationCurve:)] + pub unsafe fn initWithDuration_animationCurve( + &self, + duration: NSTimeInterval, + animationCurve: NSAnimationCurve, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(startAnimation)] + pub unsafe fn startAnimation(&self); + #[method(stopAnimation)] + pub unsafe fn stopAnimation(&self); + #[method(isAnimating)] + pub unsafe fn isAnimating(&self) -> bool; + #[method(currentProgress)] + pub unsafe fn currentProgress(&self) -> NSAnimationProgress; + #[method(setCurrentProgress:)] + pub unsafe fn setCurrentProgress(&self, currentProgress: NSAnimationProgress); + #[method(duration)] + pub unsafe fn duration(&self) -> NSTimeInterval; + #[method(setDuration:)] + pub unsafe fn setDuration(&self, duration: NSTimeInterval); + #[method(animationBlockingMode)] + pub unsafe fn animationBlockingMode(&self) -> NSAnimationBlockingMode; + #[method(setAnimationBlockingMode:)] + pub unsafe fn setAnimationBlockingMode( + &self, + animationBlockingMode: NSAnimationBlockingMode, + ); + #[method(frameRate)] + pub unsafe fn frameRate(&self) -> c_float; + #[method(setFrameRate:)] + pub unsafe fn setFrameRate(&self, frameRate: c_float); + #[method(animationCurve)] + pub unsafe fn animationCurve(&self) -> NSAnimationCurve; + #[method(setAnimationCurve:)] + pub unsafe fn setAnimationCurve(&self, animationCurve: NSAnimationCurve); + #[method(currentValue)] + pub unsafe fn currentValue(&self) -> c_float; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSAnimationDelegate>); + #[method_id(progressMarks)] + pub unsafe fn progressMarks(&self) -> Id, Shared>; + #[method(setProgressMarks:)] + pub unsafe fn setProgressMarks(&self, progressMarks: &NSArray); + #[method(addProgressMark:)] + pub unsafe fn addProgressMark(&self, progressMark: NSAnimationProgress); + #[method(removeProgressMark:)] + pub unsafe fn removeProgressMark(&self, progressMark: NSAnimationProgress); + #[method(startWhenAnimation:reachesProgress:)] + pub unsafe fn startWhenAnimation_reachesProgress( + &self, + animation: &NSAnimation, + startProgress: NSAnimationProgress, + ); + #[method(stopWhenAnimation:reachesProgress:)] + pub unsafe fn stopWhenAnimation_reachesProgress( + &self, + animation: &NSAnimation, + stopProgress: NSAnimationProgress, + ); + #[method(clearStartAnimation)] + pub unsafe fn clearStartAnimation(&self); + #[method(clearStopAnimation)] + pub unsafe fn clearStopAnimation(&self); + #[method_id(runLoopModesForAnimating)] + pub unsafe fn runLoopModesForAnimating(&self) + -> Option, Shared>>; + } +); +pub type NSAnimationDelegate = NSObject; +pub type NSViewAnimationKey = NSString; +pub type NSViewAnimationEffectName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSViewAnimation; + unsafe impl ClassType for NSViewAnimation { + type Super = NSAnimation; + } +); +extern_methods!( + unsafe impl NSViewAnimation { + #[method_id(initWithViewAnimations:)] + pub unsafe fn initWithViewAnimations( + &self, + viewAnimations: &NSArray>, + ) -> Id; + #[method_id(viewAnimations)] + pub unsafe fn viewAnimations( + &self, + ) -> Id>, Shared>; + #[method(setViewAnimations:)] + pub unsafe fn setViewAnimations( + &self, + viewAnimations: &NSArray>, + ); + } +); +pub type NSAnimatablePropertyKey = NSString; +pub type NSAnimatablePropertyContainer = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs new file mode 100644 index 000000000..819974f30 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs @@ -0,0 +1,49 @@ +use super::__exported::CAMediaTimingFunction; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSAnimationContext; + unsafe impl ClassType for NSAnimationContext { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSAnimationContext { + #[method(runAnimationGroup:completionHandler:)] + pub unsafe fn runAnimationGroup_completionHandler( + changes: TodoBlock, + completionHandler: TodoBlock, + ); + #[method(runAnimationGroup:)] + pub unsafe fn runAnimationGroup(changes: TodoBlock); + #[method(beginGrouping)] + pub unsafe fn beginGrouping(); + #[method(endGrouping)] + pub unsafe fn endGrouping(); + #[method_id(currentContext)] + pub unsafe fn currentContext() -> Id; + #[method(duration)] + pub unsafe fn duration(&self) -> NSTimeInterval; + #[method(setDuration:)] + pub unsafe fn setDuration(&self, duration: NSTimeInterval); + #[method_id(timingFunction)] + pub unsafe fn timingFunction(&self) -> Option>; + #[method(setTimingFunction:)] + pub unsafe fn setTimingFunction(&self, timingFunction: Option<&CAMediaTimingFunction>); + #[method(completionHandler)] + pub unsafe fn completionHandler(&self) -> TodoBlock; + #[method(setCompletionHandler:)] + pub unsafe fn setCompletionHandler(&self, completionHandler: TodoBlock); + #[method(allowsImplicitAnimation)] + pub unsafe fn allowsImplicitAnimation(&self) -> bool; + #[method(setAllowsImplicitAnimation:)] + pub unsafe fn setAllowsImplicitAnimation(&self, allowsImplicitAnimation: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs new file mode 100644 index 000000000..e163edfdc --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -0,0 +1,49 @@ +use super::__exported::NSBundle; +use super::__exported::NSString; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSAppearanceName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSAppearance; + unsafe impl ClassType for NSAppearance { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSAppearance { + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method_id(currentAppearance)] + pub unsafe fn currentAppearance() -> Option>; + #[method(setCurrentAppearance:)] + pub unsafe fn setCurrentAppearance(currentAppearance: Option<&NSAppearance>); + #[method_id(currentDrawingAppearance)] + pub unsafe fn currentDrawingAppearance() -> Id; + #[method(performAsCurrentDrawingAppearance:)] + pub unsafe fn performAsCurrentDrawingAppearance(&self, block: TodoBlock); + #[method_id(appearanceNamed:)] + pub unsafe fn appearanceNamed(name: &NSAppearanceName) -> Option>; + #[method_id(initWithAppearanceNamed:bundle:)] + pub unsafe fn initWithAppearanceNamed_bundle( + &self, + name: &NSAppearanceName, + bundle: Option<&NSBundle>, + ) -> Option>; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(allowsVibrancy)] + pub unsafe fn allowsVibrancy(&self) -> bool; + #[method_id(bestMatchFromAppearancesWithNames:)] + pub unsafe fn bestMatchFromAppearancesWithNames( + &self, + appearances: &NSArray, + ) -> Option>; + } +); +pub type NSAppearanceCustomization = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs new file mode 100644 index 000000000..0389847a0 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs @@ -0,0 +1,14 @@ +use super::__exported::NSAttributedString; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSAppleScript::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_methods!( + #[doc = "NSExtensions"] + unsafe impl NSAppleScript { + #[method_id(richTextSource)] + pub unsafe fn richTextSource(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs new file mode 100644 index 000000000..9ce6444ef --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -0,0 +1,388 @@ +use super::__exported::CKShareMetadata; +use super::__exported::INIntent; +use super::__exported::NSDate; +use super::__exported::NSDictionary; +use super::__exported::NSDockTile; +use super::__exported::NSError; +use super::__exported::NSException; +use super::__exported::NSGraphicsContext; +use super::__exported::NSImage; +use super::__exported::NSNotification; +use super::__exported::NSPasteboard; +use super::__exported::NSUserActivity; +use super::__exported::NSUserActivityRestoring; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAppearance::*; +use crate::AppKit::generated::NSMenu::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::AppKit::generated::NSPrintInfo::*; +use crate::AppKit::generated::NSResponder::*; +use crate::AppKit::generated::NSRunningApplication::*; +use crate::AppKit::generated::NSUserActivity::*; +use crate::AppKit::generated::NSUserInterfaceLayout::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSModalResponse = NSInteger; +extern_class!( + #[derive(Debug)] + pub struct NSApplication; + unsafe impl ClassType for NSApplication { + type Super = NSResponder; + } +); +extern_methods!( + unsafe impl NSApplication { + #[method_id(sharedApplication)] + pub unsafe fn sharedApplication() -> Id; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSApplicationDelegate>); + #[method(hide:)] + pub unsafe fn hide(&self, sender: Option<&Object>); + #[method(unhide:)] + pub unsafe fn unhide(&self, sender: Option<&Object>); + #[method(unhideWithoutActivation)] + pub unsafe fn unhideWithoutActivation(&self); + #[method_id(windowWithWindowNumber:)] + pub unsafe fn windowWithWindowNumber( + &self, + windowNum: NSInteger, + ) -> Option>; + #[method_id(mainWindow)] + pub unsafe fn mainWindow(&self) -> Option>; + #[method_id(keyWindow)] + pub unsafe fn keyWindow(&self) -> Option>; + #[method(isActive)] + pub unsafe fn isActive(&self) -> bool; + #[method(isHidden)] + pub unsafe fn isHidden(&self) -> bool; + #[method(isRunning)] + pub unsafe fn isRunning(&self) -> bool; + #[method(deactivate)] + pub unsafe fn deactivate(&self); + #[method(activateIgnoringOtherApps:)] + pub unsafe fn activateIgnoringOtherApps(&self, flag: bool); + #[method(hideOtherApplications:)] + pub unsafe fn hideOtherApplications(&self, sender: Option<&Object>); + #[method(unhideAllApplications:)] + pub unsafe fn unhideAllApplications(&self, sender: Option<&Object>); + #[method(finishLaunching)] + pub unsafe fn finishLaunching(&self); + #[method(run)] + pub unsafe fn run(&self); + #[method(runModalForWindow:)] + pub unsafe fn runModalForWindow(&self, window: &NSWindow) -> NSModalResponse; + #[method(stop:)] + pub unsafe fn stop(&self, sender: Option<&Object>); + #[method(stopModal)] + pub unsafe fn stopModal(&self); + #[method(stopModalWithCode:)] + pub unsafe fn stopModalWithCode(&self, returnCode: NSModalResponse); + #[method(abortModal)] + pub unsafe fn abortModal(&self); + #[method_id(modalWindow)] + pub unsafe fn modalWindow(&self) -> Option>; + #[method(beginModalSessionForWindow:)] + pub unsafe fn beginModalSessionForWindow(&self, window: &NSWindow) -> NSModalSession; + #[method(runModalSession:)] + pub unsafe fn runModalSession(&self, session: NSModalSession) -> NSModalResponse; + #[method(endModalSession:)] + pub unsafe fn endModalSession(&self, session: NSModalSession); + #[method(terminate:)] + pub unsafe fn terminate(&self, sender: Option<&Object>); + #[method(requestUserAttention:)] + pub unsafe fn requestUserAttention( + &self, + requestType: NSRequestUserAttentionType, + ) -> NSInteger; + #[method(cancelUserAttentionRequest:)] + pub unsafe fn cancelUserAttentionRequest(&self, request: NSInteger); + #[method(enumerateWindowsWithOptions:usingBlock:)] + pub unsafe fn enumerateWindowsWithOptions_usingBlock( + &self, + options: NSWindowListOptions, + block: TodoBlock, + ); + #[method(preventWindowOrdering)] + pub unsafe fn preventWindowOrdering(&self); + #[method_id(windows)] + pub unsafe fn windows(&self) -> Id, Shared>; + #[method(setWindowsNeedUpdate:)] + pub unsafe fn setWindowsNeedUpdate(&self, needUpdate: bool); + #[method(updateWindows)] + pub unsafe fn updateWindows(&self); + #[method_id(mainMenu)] + pub unsafe fn mainMenu(&self) -> Option>; + #[method(setMainMenu:)] + pub unsafe fn setMainMenu(&self, mainMenu: Option<&NSMenu>); + #[method_id(helpMenu)] + pub unsafe fn helpMenu(&self) -> Option>; + #[method(setHelpMenu:)] + pub unsafe fn setHelpMenu(&self, helpMenu: Option<&NSMenu>); + #[method_id(applicationIconImage)] + pub unsafe fn applicationIconImage(&self) -> Option>; + #[method(setApplicationIconImage:)] + pub unsafe fn setApplicationIconImage(&self, applicationIconImage: Option<&NSImage>); + #[method(activationPolicy)] + pub unsafe fn activationPolicy(&self) -> NSApplicationActivationPolicy; + #[method(setActivationPolicy:)] + pub unsafe fn setActivationPolicy( + &self, + activationPolicy: NSApplicationActivationPolicy, + ) -> bool; + #[method_id(dockTile)] + pub unsafe fn dockTile(&self) -> Id; + #[method(reportException:)] + pub unsafe fn reportException(&self, exception: &NSException); + #[method(detachDrawingThread:toTarget:withObject:)] + pub unsafe fn detachDrawingThread_toTarget_withObject( + selector: Sel, + target: &Object, + argument: Option<&Object>, + ); + #[method(replyToApplicationShouldTerminate:)] + pub unsafe fn replyToApplicationShouldTerminate(&self, shouldTerminate: bool); + #[method(replyToOpenOrPrint:)] + pub unsafe fn replyToOpenOrPrint(&self, reply: NSApplicationDelegateReply); + #[method(orderFrontCharacterPalette:)] + pub unsafe fn orderFrontCharacterPalette(&self, sender: Option<&Object>); + #[method(presentationOptions)] + pub unsafe fn presentationOptions(&self) -> NSApplicationPresentationOptions; + #[method(setPresentationOptions:)] + pub unsafe fn setPresentationOptions( + &self, + presentationOptions: NSApplicationPresentationOptions, + ); + #[method(currentSystemPresentationOptions)] + pub unsafe fn currentSystemPresentationOptions(&self) -> NSApplicationPresentationOptions; + #[method(occlusionState)] + pub unsafe fn occlusionState(&self) -> NSApplicationOcclusionState; + #[method(isProtectedDataAvailable)] + pub unsafe fn isProtectedDataAvailable(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSAppearanceCustomization"] + unsafe impl NSApplication { + #[method_id(appearance)] + pub unsafe fn appearance(&self) -> Option>; + #[method(setAppearance:)] + pub unsafe fn setAppearance(&self, appearance: Option<&NSAppearance>); + #[method_id(effectiveAppearance)] + pub unsafe fn effectiveAppearance(&self) -> Id; + } +); +extern_methods!( + #[doc = "NSEvent"] + unsafe impl NSApplication { + #[method(sendEvent:)] + pub unsafe fn sendEvent(&self, event: &NSEvent); + #[method(postEvent:atStart:)] + pub unsafe fn postEvent_atStart(&self, event: &NSEvent, flag: bool); + #[method_id(currentEvent)] + pub unsafe fn currentEvent(&self) -> Option>; + #[method_id(nextEventMatchingMask:untilDate:inMode:dequeue:)] + pub unsafe fn nextEventMatchingMask_untilDate_inMode_dequeue( + &self, + mask: NSEventMask, + expiration: Option<&NSDate>, + mode: &NSRunLoopMode, + deqFlag: bool, + ) -> Option>; + #[method(discardEventsMatchingMask:beforeEvent:)] + pub unsafe fn discardEventsMatchingMask_beforeEvent( + &self, + mask: NSEventMask, + lastEvent: Option<&NSEvent>, + ); + } +); +extern_methods!( + #[doc = "NSResponder"] + unsafe impl NSApplication { + #[method(sendAction:to:from:)] + pub unsafe fn sendAction_to_from( + &self, + action: Sel, + target: Option<&Object>, + sender: Option<&Object>, + ) -> bool; + #[method_id(targetForAction:)] + pub unsafe fn targetForAction(&self, action: Sel) -> Option>; + #[method_id(targetForAction:to:from:)] + pub unsafe fn targetForAction_to_from( + &self, + action: Sel, + target: Option<&Object>, + sender: Option<&Object>, + ) -> Option>; + #[method(tryToPerform:with:)] + pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; + #[method_id(validRequestorForSendType:returnType:)] + pub unsafe fn validRequestorForSendType_returnType( + &self, + sendType: Option<&NSPasteboardType>, + returnType: Option<&NSPasteboardType>, + ) -> Option>; + } +); +extern_methods!( + #[doc = "NSWindowsMenu"] + unsafe impl NSApplication { + #[method_id(windowsMenu)] + pub unsafe fn windowsMenu(&self) -> Option>; + #[method(setWindowsMenu:)] + pub unsafe fn setWindowsMenu(&self, windowsMenu: Option<&NSMenu>); + #[method(arrangeInFront:)] + pub unsafe fn arrangeInFront(&self, sender: Option<&Object>); + #[method(removeWindowsItem:)] + pub unsafe fn removeWindowsItem(&self, win: &NSWindow); + #[method(addWindowsItem:title:filename:)] + pub unsafe fn addWindowsItem_title_filename( + &self, + win: &NSWindow, + string: &NSString, + isFilename: bool, + ); + #[method(changeWindowsItem:title:filename:)] + pub unsafe fn changeWindowsItem_title_filename( + &self, + win: &NSWindow, + string: &NSString, + isFilename: bool, + ); + #[method(updateWindowsItem:)] + pub unsafe fn updateWindowsItem(&self, win: &NSWindow); + #[method(miniaturizeAll:)] + pub unsafe fn miniaturizeAll(&self, sender: Option<&Object>); + } +); +extern_methods!( + #[doc = "NSFullKeyboardAccess"] + unsafe impl NSApplication { + #[method(isFullKeyboardAccessEnabled)] + pub unsafe fn isFullKeyboardAccessEnabled(&self) -> bool; + } +); +pub type NSApplicationDelegate = NSObject; +extern_methods!( + #[doc = "NSServicesMenu"] + unsafe impl NSApplication { + #[method_id(servicesMenu)] + pub unsafe fn servicesMenu(&self) -> Option>; + #[method(setServicesMenu:)] + pub unsafe fn setServicesMenu(&self, servicesMenu: Option<&NSMenu>); + #[method(registerServicesMenuSendTypes:returnTypes:)] + pub unsafe fn registerServicesMenuSendTypes_returnTypes( + &self, + sendTypes: &NSArray, + returnTypes: &NSArray, + ); + } +); +pub type NSServicesMenuRequestor = NSObject; +extern_methods!( + #[doc = "NSServicesHandling"] + unsafe impl NSApplication { + #[method_id(servicesProvider)] + pub unsafe fn servicesProvider(&self) -> Option>; + #[method(setServicesProvider:)] + pub unsafe fn setServicesProvider(&self, servicesProvider: Option<&Object>); + } +); +pub type NSAboutPanelOptionKey = NSString; +extern_methods!( + #[doc = "NSStandardAboutPanel"] + unsafe impl NSApplication { + #[method(orderFrontStandardAboutPanel:)] + pub unsafe fn orderFrontStandardAboutPanel(&self, sender: Option<&Object>); + #[method(orderFrontStandardAboutPanelWithOptions:)] + pub unsafe fn orderFrontStandardAboutPanelWithOptions( + &self, + optionsDictionary: &NSDictionary, + ); + } +); +extern_methods!( + #[doc = "NSApplicationLayoutDirection"] + unsafe impl NSApplication { + #[method(userInterfaceLayoutDirection)] + pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + } +); +extern_methods!( + #[doc = "NSRestorableUserInterface"] + unsafe impl NSApplication { + #[method(disableRelaunchOnLogin)] + pub unsafe fn disableRelaunchOnLogin(&self); + #[method(enableRelaunchOnLogin)] + pub unsafe fn enableRelaunchOnLogin(&self); + } +); +extern_methods!( + #[doc = "NSRemoteNotifications"] + unsafe impl NSApplication { + #[method(registerForRemoteNotifications)] + pub unsafe fn registerForRemoteNotifications(&self); + #[method(unregisterForRemoteNotifications)] + pub unsafe fn unregisterForRemoteNotifications(&self); + #[method(isRegisteredForRemoteNotifications)] + pub unsafe fn isRegisteredForRemoteNotifications(&self) -> bool; + #[method(registerForRemoteNotificationTypes:)] + pub unsafe fn registerForRemoteNotificationTypes(&self, types: NSRemoteNotificationType); + #[method(enabledRemoteNotificationTypes)] + pub unsafe fn enabledRemoteNotificationTypes(&self) -> NSRemoteNotificationType; + } +); +pub type NSServiceProviderName = NSString; +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSApplication { + #[method(runModalForWindow:relativeToWindow:)] + pub unsafe fn runModalForWindow_relativeToWindow( + &self, + window: Option<&NSWindow>, + docWindow: Option<&NSWindow>, + ) -> NSInteger; + #[method(beginModalSessionForWindow:relativeToWindow:)] + pub unsafe fn beginModalSessionForWindow_relativeToWindow( + &self, + window: Option<&NSWindow>, + docWindow: Option<&NSWindow>, + ) -> NSModalSession; + #[method(application:printFiles:)] + pub unsafe fn application_printFiles( + &self, + sender: Option<&NSApplication>, + filenames: Option<&NSArray>, + ); + #[method(beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:)] + pub unsafe fn beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo( + &self, + sheet: &NSWindow, + docWindow: &NSWindow, + modalDelegate: Option<&Object>, + didEndSelector: Option, + contextInfo: *mut c_void, + ); + #[method(endSheet:)] + pub unsafe fn endSheet(&self, sheet: &NSWindow); + #[method(endSheet:returnCode:)] + pub unsafe fn endSheet_returnCode(&self, sheet: &NSWindow, returnCode: NSInteger); + #[method_id(makeWindowsPerform:inOrder:)] + pub unsafe fn makeWindowsPerform_inOrder( + &self, + selector: Sel, + flag: bool, + ) -> Option>; + #[method_id(context)] + pub unsafe fn context(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs new file mode 100644 index 000000000..1fc307e45 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs @@ -0,0 +1,29 @@ +use super::__exported::NSDocument; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_methods!( + #[doc = "NSScripting"] + unsafe impl NSApplication { + #[method_id(orderedDocuments)] + pub unsafe fn orderedDocuments(&self) -> Id, Shared>; + #[method_id(orderedWindows)] + pub unsafe fn orderedWindows(&self) -> Id, Shared>; + } +); +extern_methods!( + #[doc = "NSApplicationScriptingDelegation"] + unsafe impl NSObject { + #[method(application:delegateHandlesKey:)] + pub unsafe fn application_delegateHandlesKey( + &self, + sender: &NSApplication, + key: &NSString, + ) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSArrayController.rs b/crates/icrate/src/generated/AppKit/NSArrayController.rs new file mode 100644 index 000000000..da75c6278 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSArrayController.rs @@ -0,0 +1,131 @@ +use super::__exported::NSIndexSet; +use super::__exported::NSMutableIndexSet; +use super::__exported::NSSortDescriptor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSObjectController::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSPredicate::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSArrayController; + unsafe impl ClassType for NSArrayController { + type Super = NSObjectController; + } +); +extern_methods!( + unsafe impl NSArrayController { + #[method(rearrangeObjects)] + pub unsafe fn rearrangeObjects(&self); + #[method(automaticallyRearrangesObjects)] + pub unsafe fn automaticallyRearrangesObjects(&self) -> bool; + #[method(setAutomaticallyRearrangesObjects:)] + pub unsafe fn setAutomaticallyRearrangesObjects( + &self, + automaticallyRearrangesObjects: bool, + ); + #[method_id(automaticRearrangementKeyPaths)] + pub unsafe fn automaticRearrangementKeyPaths( + &self, + ) -> Option, Shared>>; + #[method(didChangeArrangementCriteria)] + pub unsafe fn didChangeArrangementCriteria(&self); + #[method_id(sortDescriptors)] + pub unsafe fn sortDescriptors(&self) -> Id, Shared>; + #[method(setSortDescriptors:)] + pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); + #[method_id(filterPredicate)] + pub unsafe fn filterPredicate(&self) -> Option>; + #[method(setFilterPredicate:)] + pub unsafe fn setFilterPredicate(&self, filterPredicate: Option<&NSPredicate>); + #[method(clearsFilterPredicateOnInsertion)] + pub unsafe fn clearsFilterPredicateOnInsertion(&self) -> bool; + #[method(setClearsFilterPredicateOnInsertion:)] + pub unsafe fn setClearsFilterPredicateOnInsertion( + &self, + clearsFilterPredicateOnInsertion: bool, + ); + #[method_id(arrangeObjects:)] + pub unsafe fn arrangeObjects(&self, objects: &NSArray) -> Id; + #[method_id(arrangedObjects)] + pub unsafe fn arrangedObjects(&self) -> Id; + #[method(avoidsEmptySelection)] + pub unsafe fn avoidsEmptySelection(&self) -> bool; + #[method(setAvoidsEmptySelection:)] + pub unsafe fn setAvoidsEmptySelection(&self, avoidsEmptySelection: bool); + #[method(preservesSelection)] + pub unsafe fn preservesSelection(&self) -> bool; + #[method(setPreservesSelection:)] + pub unsafe fn setPreservesSelection(&self, preservesSelection: bool); + #[method(selectsInsertedObjects)] + pub unsafe fn selectsInsertedObjects(&self) -> bool; + #[method(setSelectsInsertedObjects:)] + pub unsafe fn setSelectsInsertedObjects(&self, selectsInsertedObjects: bool); + #[method(alwaysUsesMultipleValuesMarker)] + pub unsafe fn alwaysUsesMultipleValuesMarker(&self) -> bool; + #[method(setAlwaysUsesMultipleValuesMarker:)] + pub unsafe fn setAlwaysUsesMultipleValuesMarker( + &self, + alwaysUsesMultipleValuesMarker: bool, + ); + #[method(setSelectionIndexes:)] + pub unsafe fn setSelectionIndexes(&self, indexes: &NSIndexSet) -> bool; + #[method_id(selectionIndexes)] + pub unsafe fn selectionIndexes(&self) -> Id; + #[method(setSelectionIndex:)] + pub unsafe fn setSelectionIndex(&self, index: NSUInteger) -> bool; + #[method(selectionIndex)] + pub unsafe fn selectionIndex(&self) -> NSUInteger; + #[method(addSelectionIndexes:)] + pub unsafe fn addSelectionIndexes(&self, indexes: &NSIndexSet) -> bool; + #[method(removeSelectionIndexes:)] + pub unsafe fn removeSelectionIndexes(&self, indexes: &NSIndexSet) -> bool; + #[method(setSelectedObjects:)] + pub unsafe fn setSelectedObjects(&self, objects: &NSArray) -> bool; + #[method_id(selectedObjects)] + pub unsafe fn selectedObjects(&self) -> Id; + #[method(addSelectedObjects:)] + pub unsafe fn addSelectedObjects(&self, objects: &NSArray) -> bool; + #[method(removeSelectedObjects:)] + pub unsafe fn removeSelectedObjects(&self, objects: &NSArray) -> bool; + #[method(add:)] + pub unsafe fn add(&self, sender: Option<&Object>); + #[method(remove:)] + pub unsafe fn remove(&self, sender: Option<&Object>); + #[method(insert:)] + pub unsafe fn insert(&self, sender: Option<&Object>); + #[method(canInsert)] + pub unsafe fn canInsert(&self) -> bool; + #[method(selectNext:)] + pub unsafe fn selectNext(&self, sender: Option<&Object>); + #[method(selectPrevious:)] + pub unsafe fn selectPrevious(&self, sender: Option<&Object>); + #[method(canSelectNext)] + pub unsafe fn canSelectNext(&self) -> bool; + #[method(canSelectPrevious)] + pub unsafe fn canSelectPrevious(&self) -> bool; + #[method(addObject:)] + pub unsafe fn addObject(&self, object: &Object); + #[method(addObjects:)] + pub unsafe fn addObjects(&self, objects: &NSArray); + #[method(insertObject:atArrangedObjectIndex:)] + pub unsafe fn insertObject_atArrangedObjectIndex(&self, object: &Object, index: NSUInteger); + #[method(insertObjects:atArrangedObjectIndexes:)] + pub unsafe fn insertObjects_atArrangedObjectIndexes( + &self, + objects: &NSArray, + indexes: &NSIndexSet, + ); + #[method(removeObjectAtArrangedObjectIndex:)] + pub unsafe fn removeObjectAtArrangedObjectIndex(&self, index: NSUInteger); + #[method(removeObjectsAtArrangedObjectIndexes:)] + pub unsafe fn removeObjectsAtArrangedObjectIndexes(&self, indexes: &NSIndexSet); + #[method(removeObject:)] + pub unsafe fn removeObject(&self, object: &Object); + #[method(removeObjects:)] + pub unsafe fn removeObjects(&self, objects: &NSArray); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs new file mode 100644 index 000000000..21779e4e0 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -0,0 +1,338 @@ +use super::__exported::NSFileWrapper; +use super::__exported::NSTextBlock; +use super::__exported::NSTextList; +use super::__exported::NSTextTable; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSFontManager::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::AppKit::generated::NSText::*; +use crate::Foundation::generated::NSAttributedString::*; +use crate::Foundation::generated::NSItemProvider::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextEffectStyle = NSString; +extern_methods!( + #[doc = "NSAttributedStringAttributeFixing"] + unsafe impl NSMutableAttributedString { + #[method(fixAttributesInRange:)] + pub unsafe fn fixAttributesInRange(&self, range: NSRange); + #[method(fixFontAttributeInRange:)] + pub unsafe fn fixFontAttributeInRange(&self, range: NSRange); + #[method(fixParagraphStyleAttributeInRange:)] + pub unsafe fn fixParagraphStyleAttributeInRange(&self, range: NSRange); + #[method(fixAttachmentAttributeInRange:)] + pub unsafe fn fixAttachmentAttributeInRange(&self, range: NSRange); + } +); +pub type NSAttributedStringDocumentType = NSString; +pub type NSTextLayoutSectionKey = NSString; +pub type NSAttributedStringDocumentAttributeKey = NSString; +pub type NSAttributedStringDocumentReadingOptionKey = NSString; +extern_methods!( + #[doc = "NSAttributedStringDocumentFormats"] + unsafe impl NSAttributedString { + #[method_id(initWithURL:options:documentAttributes:error:)] + pub unsafe fn initWithURL_options_documentAttributes_error( + &self, + url: &NSURL, + options: &NSDictionary, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Result, Id>; + #[method_id(initWithData:options:documentAttributes:error:)] + pub unsafe fn initWithData_options_documentAttributes_error( + &self, + data: &NSData, + options: &NSDictionary, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Result, Id>; + #[method_id(dataFromRange:documentAttributes:error:)] + pub unsafe fn dataFromRange_documentAttributes_error( + &self, + range: NSRange, + dict: &NSDictionary, + ) -> Result, Id>; + #[method_id(fileWrapperFromRange:documentAttributes:error:)] + pub unsafe fn fileWrapperFromRange_documentAttributes_error( + &self, + range: NSRange, + dict: &NSDictionary, + ) -> Result, Id>; + #[method_id(initWithRTF:documentAttributes:)] + pub unsafe fn initWithRTF_documentAttributes( + &self, + data: &NSData, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Option>; + #[method_id(initWithRTFD:documentAttributes:)] + pub unsafe fn initWithRTFD_documentAttributes( + &self, + data: &NSData, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Option>; + #[method_id(initWithHTML:documentAttributes:)] + pub unsafe fn initWithHTML_documentAttributes( + &self, + data: &NSData, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Option>; + #[method_id(initWithHTML:baseURL:documentAttributes:)] + pub unsafe fn initWithHTML_baseURL_documentAttributes( + &self, + data: &NSData, + base: &NSURL, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Option>; + #[method_id(initWithDocFormat:documentAttributes:)] + pub unsafe fn initWithDocFormat_documentAttributes( + &self, + data: &NSData, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Option>; + #[method_id(initWithHTML:options:documentAttributes:)] + pub unsafe fn initWithHTML_options_documentAttributes( + &self, + data: &NSData, + options: &NSDictionary, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Option>; + #[method_id(initWithRTFDFileWrapper:documentAttributes:)] + pub unsafe fn initWithRTFDFileWrapper_documentAttributes( + &self, + wrapper: &NSFileWrapper, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Option>; + #[method_id(RTFFromRange:documentAttributes:)] + pub unsafe fn RTFFromRange_documentAttributes( + &self, + range: NSRange, + dict: &NSDictionary, + ) -> Option>; + #[method_id(RTFDFromRange:documentAttributes:)] + pub unsafe fn RTFDFromRange_documentAttributes( + &self, + range: NSRange, + dict: &NSDictionary, + ) -> Option>; + #[method_id(RTFDFileWrapperFromRange:documentAttributes:)] + pub unsafe fn RTFDFileWrapperFromRange_documentAttributes( + &self, + range: NSRange, + dict: &NSDictionary, + ) -> Option>; + #[method_id(docFormatFromRange:documentAttributes:)] + pub unsafe fn docFormatFromRange_documentAttributes( + &self, + range: NSRange, + dict: &NSDictionary, + ) -> Option>; + } +); +extern_methods!( + #[doc = "NSMutableAttributedStringDocumentFormats"] + unsafe impl NSMutableAttributedString { + #[method(readFromURL:options:documentAttributes:error:)] + pub unsafe fn readFromURL_options_documentAttributes_error( + &self, + url: &NSURL, + opts: &NSDictionary, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Result<(), Id>; + #[method(readFromData:options:documentAttributes:error:)] + pub unsafe fn readFromData_options_documentAttributes_error( + &self, + data: &NSData, + opts: &NSDictionary, + dict: Option< + &mut Option< + Id, Shared>, + >, + >, + ) -> Result<(), Id>; + } +); +extern_methods!( + #[doc = "NSAttributedStringKitAdditions"] + unsafe impl NSAttributedString { + #[method_id(fontAttributesInRange:)] + pub unsafe fn fontAttributesInRange( + &self, + range: NSRange, + ) -> Id, Shared>; + #[method_id(rulerAttributesInRange:)] + pub unsafe fn rulerAttributesInRange( + &self, + range: NSRange, + ) -> Id, Shared>; + #[method(containsAttachmentsInRange:)] + pub unsafe fn containsAttachmentsInRange(&self, range: NSRange) -> bool; + #[method(lineBreakBeforeIndex:withinRange:)] + pub unsafe fn lineBreakBeforeIndex_withinRange( + &self, + location: NSUInteger, + aRange: NSRange, + ) -> NSUInteger; + #[method(lineBreakByHyphenatingBeforeIndex:withinRange:)] + pub unsafe fn lineBreakByHyphenatingBeforeIndex_withinRange( + &self, + location: NSUInteger, + aRange: NSRange, + ) -> NSUInteger; + #[method(doubleClickAtIndex:)] + pub unsafe fn doubleClickAtIndex(&self, location: NSUInteger) -> NSRange; + #[method(nextWordFromIndex:forward:)] + pub unsafe fn nextWordFromIndex_forward( + &self, + location: NSUInteger, + isForward: bool, + ) -> NSUInteger; + #[method(rangeOfTextBlock:atIndex:)] + pub unsafe fn rangeOfTextBlock_atIndex( + &self, + block: &NSTextBlock, + location: NSUInteger, + ) -> NSRange; + #[method(rangeOfTextTable:atIndex:)] + pub unsafe fn rangeOfTextTable_atIndex( + &self, + table: &NSTextTable, + location: NSUInteger, + ) -> NSRange; + #[method(rangeOfTextList:atIndex:)] + pub unsafe fn rangeOfTextList_atIndex( + &self, + list: &NSTextList, + location: NSUInteger, + ) -> NSRange; + #[method(itemNumberInTextList:atIndex:)] + pub unsafe fn itemNumberInTextList_atIndex( + &self, + list: &NSTextList, + location: NSUInteger, + ) -> NSInteger; + } +); +extern_methods!( + #[doc = "NSAttributedStringPasteboardAdditions"] + unsafe impl NSAttributedString { + #[method_id(textTypes)] + pub unsafe fn textTypes() -> Id, Shared>; + #[method_id(textUnfilteredTypes)] + pub unsafe fn textUnfilteredTypes() -> Id, Shared>; + } +); +extern_methods!( + #[doc = "NSMutableAttributedStringKitAdditions"] + unsafe impl NSMutableAttributedString { + #[method(superscriptRange:)] + pub unsafe fn superscriptRange(&self, range: NSRange); + #[method(subscriptRange:)] + pub unsafe fn subscriptRange(&self, range: NSRange); + #[method(unscriptRange:)] + pub unsafe fn unscriptRange(&self, range: NSRange); + #[method(applyFontTraits:range:)] + pub unsafe fn applyFontTraits_range(&self, traitMask: NSFontTraitMask, range: NSRange); + #[method(setAlignment:range:)] + pub unsafe fn setAlignment_range(&self, alignment: NSTextAlignment, range: NSRange); + #[method(setBaseWritingDirection:range:)] + pub unsafe fn setBaseWritingDirection_range( + &self, + writingDirection: NSWritingDirection, + range: NSRange, + ); + } +); +extern_methods!( + #[doc = "NSDeprecatedKitAdditions"] + unsafe impl NSAttributedString { + #[method(containsAttachments)] + pub unsafe fn containsAttachments(&self) -> bool; + #[method_id(textFileTypes)] + pub unsafe fn textFileTypes() -> Id; + #[method_id(textPasteboardTypes)] + pub unsafe fn textPasteboardTypes() -> Id; + #[method_id(textUnfilteredFileTypes)] + pub unsafe fn textUnfilteredFileTypes() -> Id; + #[method_id(textUnfilteredPasteboardTypes)] + pub unsafe fn textUnfilteredPasteboardTypes() -> Id; + #[method_id(initWithURL:documentAttributes:)] + pub unsafe fn initWithURL_documentAttributes( + &self, + url: &NSURL, + dict: Option<&mut Option>>, + ) -> Option>; + #[method_id(initWithPath:documentAttributes:)] + pub unsafe fn initWithPath_documentAttributes( + &self, + path: &NSString, + dict: Option<&mut Option>>, + ) -> Option>; + #[method_id(URLAtIndex:effectiveRange:)] + pub unsafe fn URLAtIndex_effectiveRange( + &self, + location: NSUInteger, + effectiveRange: NSRangePointer, + ) -> Option>; + } +); +extern_methods!( + #[doc = "NSDeprecatedKitAdditions"] + unsafe impl NSMutableAttributedString { + #[method(readFromURL:options:documentAttributes:)] + pub unsafe fn readFromURL_options_documentAttributes( + &self, + url: &NSURL, + options: &NSDictionary, + dict: Option<&mut Option>>, + ) -> bool; + #[method(readFromData:options:documentAttributes:)] + pub unsafe fn readFromData_options_documentAttributes( + &self, + data: &NSData, + options: &NSDictionary, + dict: Option<&mut Option>>, + ) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs new file mode 100644 index 000000000..5ff0d908a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -0,0 +1,238 @@ +use super::__exported::NSAffineTransform; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSFont::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSBezierPath; + unsafe impl ClassType for NSBezierPath { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSBezierPath { + #[method_id(bezierPath)] + pub unsafe fn bezierPath() -> Id; + #[method_id(bezierPathWithRect:)] + pub unsafe fn bezierPathWithRect(rect: NSRect) -> Id; + #[method_id(bezierPathWithOvalInRect:)] + pub unsafe fn bezierPathWithOvalInRect(rect: NSRect) -> Id; + #[method_id(bezierPathWithRoundedRect:xRadius:yRadius:)] + pub unsafe fn bezierPathWithRoundedRect_xRadius_yRadius( + rect: NSRect, + xRadius: CGFloat, + yRadius: CGFloat, + ) -> Id; + #[method(fillRect:)] + pub unsafe fn fillRect(rect: NSRect); + #[method(strokeRect:)] + pub unsafe fn strokeRect(rect: NSRect); + #[method(clipRect:)] + pub unsafe fn clipRect(rect: NSRect); + #[method(strokeLineFromPoint:toPoint:)] + pub unsafe fn strokeLineFromPoint_toPoint(point1: NSPoint, point2: NSPoint); + #[method(drawPackedGlyphs:atPoint:)] + pub unsafe fn drawPackedGlyphs_atPoint(packedGlyphs: NonNull, point: NSPoint); + #[method(defaultMiterLimit)] + pub unsafe fn defaultMiterLimit() -> CGFloat; + #[method(setDefaultMiterLimit:)] + pub unsafe fn setDefaultMiterLimit(defaultMiterLimit: CGFloat); + #[method(defaultFlatness)] + pub unsafe fn defaultFlatness() -> CGFloat; + #[method(setDefaultFlatness:)] + pub unsafe fn setDefaultFlatness(defaultFlatness: CGFloat); + #[method(defaultWindingRule)] + pub unsafe fn defaultWindingRule() -> NSWindingRule; + #[method(setDefaultWindingRule:)] + pub unsafe fn setDefaultWindingRule(defaultWindingRule: NSWindingRule); + #[method(defaultLineCapStyle)] + pub unsafe fn defaultLineCapStyle() -> NSLineCapStyle; + #[method(setDefaultLineCapStyle:)] + pub unsafe fn setDefaultLineCapStyle(defaultLineCapStyle: NSLineCapStyle); + #[method(defaultLineJoinStyle)] + pub unsafe fn defaultLineJoinStyle() -> NSLineJoinStyle; + #[method(setDefaultLineJoinStyle:)] + pub unsafe fn setDefaultLineJoinStyle(defaultLineJoinStyle: NSLineJoinStyle); + #[method(defaultLineWidth)] + pub unsafe fn defaultLineWidth() -> CGFloat; + #[method(setDefaultLineWidth:)] + pub unsafe fn setDefaultLineWidth(defaultLineWidth: CGFloat); + #[method(moveToPoint:)] + pub unsafe fn moveToPoint(&self, point: NSPoint); + #[method(lineToPoint:)] + pub unsafe fn lineToPoint(&self, point: NSPoint); + # [method (curveToPoint : controlPoint1 : controlPoint2 :)] + pub unsafe fn curveToPoint_controlPoint1_controlPoint2( + &self, + endPoint: NSPoint, + controlPoint1: NSPoint, + controlPoint2: NSPoint, + ); + #[method(closePath)] + pub unsafe fn closePath(&self); + #[method(removeAllPoints)] + pub unsafe fn removeAllPoints(&self); + #[method(relativeMoveToPoint:)] + pub unsafe fn relativeMoveToPoint(&self, point: NSPoint); + #[method(relativeLineToPoint:)] + pub unsafe fn relativeLineToPoint(&self, point: NSPoint); + # [method (relativeCurveToPoint : controlPoint1 : controlPoint2 :)] + pub unsafe fn relativeCurveToPoint_controlPoint1_controlPoint2( + &self, + endPoint: NSPoint, + controlPoint1: NSPoint, + controlPoint2: NSPoint, + ); + #[method(lineWidth)] + pub unsafe fn lineWidth(&self) -> CGFloat; + #[method(setLineWidth:)] + pub unsafe fn setLineWidth(&self, lineWidth: CGFloat); + #[method(lineCapStyle)] + pub unsafe fn lineCapStyle(&self) -> NSLineCapStyle; + #[method(setLineCapStyle:)] + pub unsafe fn setLineCapStyle(&self, lineCapStyle: NSLineCapStyle); + #[method(lineJoinStyle)] + pub unsafe fn lineJoinStyle(&self) -> NSLineJoinStyle; + #[method(setLineJoinStyle:)] + pub unsafe fn setLineJoinStyle(&self, lineJoinStyle: NSLineJoinStyle); + #[method(windingRule)] + pub unsafe fn windingRule(&self) -> NSWindingRule; + #[method(setWindingRule:)] + pub unsafe fn setWindingRule(&self, windingRule: NSWindingRule); + #[method(miterLimit)] + pub unsafe fn miterLimit(&self) -> CGFloat; + #[method(setMiterLimit:)] + pub unsafe fn setMiterLimit(&self, miterLimit: CGFloat); + #[method(flatness)] + pub unsafe fn flatness(&self) -> CGFloat; + #[method(setFlatness:)] + pub unsafe fn setFlatness(&self, flatness: CGFloat); + #[method(getLineDash:count:phase:)] + pub unsafe fn getLineDash_count_phase( + &self, + pattern: *mut CGFloat, + count: *mut NSInteger, + phase: *mut CGFloat, + ); + #[method(setLineDash:count:phase:)] + pub unsafe fn setLineDash_count_phase( + &self, + pattern: *mut CGFloat, + count: NSInteger, + phase: CGFloat, + ); + #[method(stroke)] + pub unsafe fn stroke(&self); + #[method(fill)] + pub unsafe fn fill(&self); + #[method(addClip)] + pub unsafe fn addClip(&self); + #[method(setClip)] + pub unsafe fn setClip(&self); + #[method_id(bezierPathByFlatteningPath)] + pub unsafe fn bezierPathByFlatteningPath(&self) -> Id; + #[method_id(bezierPathByReversingPath)] + pub unsafe fn bezierPathByReversingPath(&self) -> Id; + #[method(transformUsingAffineTransform:)] + pub unsafe fn transformUsingAffineTransform(&self, transform: &NSAffineTransform); + #[method(isEmpty)] + pub unsafe fn isEmpty(&self) -> bool; + #[method(currentPoint)] + pub unsafe fn currentPoint(&self) -> NSPoint; + #[method(controlPointBounds)] + pub unsafe fn controlPointBounds(&self) -> NSRect; + #[method(bounds)] + pub unsafe fn bounds(&self) -> NSRect; + #[method(elementCount)] + pub unsafe fn elementCount(&self) -> NSInteger; + #[method(elementAtIndex:associatedPoints:)] + pub unsafe fn elementAtIndex_associatedPoints( + &self, + index: NSInteger, + points: NSPointArray, + ) -> NSBezierPathElement; + #[method(elementAtIndex:)] + pub unsafe fn elementAtIndex(&self, index: NSInteger) -> NSBezierPathElement; + #[method(setAssociatedPoints:atIndex:)] + pub unsafe fn setAssociatedPoints_atIndex(&self, points: NSPointArray, index: NSInteger); + #[method(appendBezierPath:)] + pub unsafe fn appendBezierPath(&self, path: &NSBezierPath); + #[method(appendBezierPathWithRect:)] + pub unsafe fn appendBezierPathWithRect(&self, rect: NSRect); + #[method(appendBezierPathWithPoints:count:)] + pub unsafe fn appendBezierPathWithPoints_count( + &self, + points: NSPointArray, + count: NSInteger, + ); + #[method(appendBezierPathWithOvalInRect:)] + pub unsafe fn appendBezierPathWithOvalInRect(&self, rect: NSRect); + #[method(appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:)] + pub unsafe fn appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise( + &self, + center: NSPoint, + radius: CGFloat, + startAngle: CGFloat, + endAngle: CGFloat, + clockwise: bool, + ); + #[method(appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:)] + pub unsafe fn appendBezierPathWithArcWithCenter_radius_startAngle_endAngle( + &self, + center: NSPoint, + radius: CGFloat, + startAngle: CGFloat, + endAngle: CGFloat, + ); + #[method(appendBezierPathWithArcFromPoint:toPoint:radius:)] + pub unsafe fn appendBezierPathWithArcFromPoint_toPoint_radius( + &self, + point1: NSPoint, + point2: NSPoint, + radius: CGFloat, + ); + #[method(appendBezierPathWithCGGlyph:inFont:)] + pub unsafe fn appendBezierPathWithCGGlyph_inFont(&self, glyph: CGGlyph, font: &NSFont); + #[method(appendBezierPathWithCGGlyphs:count:inFont:)] + pub unsafe fn appendBezierPathWithCGGlyphs_count_inFont( + &self, + glyphs: NonNull, + count: NSInteger, + font: &NSFont, + ); + #[method(appendBezierPathWithRoundedRect:xRadius:yRadius:)] + pub unsafe fn appendBezierPathWithRoundedRect_xRadius_yRadius( + &self, + rect: NSRect, + xRadius: CGFloat, + yRadius: CGFloat, + ); + #[method(containsPoint:)] + pub unsafe fn containsPoint(&self, point: NSPoint) -> bool; + } +); +extern_methods!( + #[doc = "NSBezierPathDeprecated"] + unsafe impl NSBezierPath { + #[method(cachesBezierPath)] + pub unsafe fn cachesBezierPath(&self) -> bool; + #[method(setCachesBezierPath:)] + pub unsafe fn setCachesBezierPath(&self, flag: bool); + #[method(appendBezierPathWithGlyph:inFont:)] + pub unsafe fn appendBezierPathWithGlyph_inFont(&self, glyph: NSGlyph, font: &NSFont); + #[method(appendBezierPathWithGlyphs:count:inFont:)] + pub unsafe fn appendBezierPathWithGlyphs_count_inFont( + &self, + glyphs: NonNull, + count: NSInteger, + font: &NSFont, + ); + #[method(appendBezierPathWithPackedGlyphs:)] + pub unsafe fn appendBezierPathWithPackedGlyphs(&self, packedGlyphs: NonNull); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs new file mode 100644 index 000000000..cfd5215ce --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -0,0 +1,187 @@ +use super::__exported::CIImage; +use super::__exported::NSColor; +use super::__exported::NSColorSpace; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSImageRep::*; +use crate::ApplicationServices::generated::ApplicationServices::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSBitmapImageRepPropertyKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSBitmapImageRep; + unsafe impl ClassType for NSBitmapImageRep { + type Super = NSImageRep; + } +); +extern_methods!( + unsafe impl NSBitmapImageRep { + #[method_id(initWithFocusedViewRect:)] + pub unsafe fn initWithFocusedViewRect(&self, rect: NSRect) -> Option>; + #[method_id(initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:)] + pub unsafe fn initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel( + &self, + planes: *mut *mut c_uchar, + width: NSInteger, + height: NSInteger, + bps: NSInteger, + spp: NSInteger, + alpha: bool, + isPlanar: bool, + colorSpaceName: &NSColorSpaceName, + rBytes: NSInteger, + pBits: NSInteger, + ) -> Option>; + #[method_id(initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:)] + pub unsafe fn initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel( + &self, + planes: *mut *mut c_uchar, + width: NSInteger, + height: NSInteger, + bps: NSInteger, + spp: NSInteger, + alpha: bool, + isPlanar: bool, + colorSpaceName: &NSColorSpaceName, + bitmapFormat: NSBitmapFormat, + rBytes: NSInteger, + pBits: NSInteger, + ) -> Option>; + #[method_id(initWithCGImage:)] + pub unsafe fn initWithCGImage(&self, cgImage: CGImageRef) -> Id; + #[method_id(initWithCIImage:)] + pub unsafe fn initWithCIImage(&self, ciImage: &CIImage) -> Id; + #[method_id(imageRepsWithData:)] + pub unsafe fn imageRepsWithData(data: &NSData) -> Id, Shared>; + #[method_id(imageRepWithData:)] + pub unsafe fn imageRepWithData(data: &NSData) -> Option>; + #[method_id(initWithData:)] + pub unsafe fn initWithData(&self, data: &NSData) -> Option>; + #[method(bitmapData)] + pub unsafe fn bitmapData(&self) -> *mut c_uchar; + #[method(getBitmapDataPlanes:)] + pub unsafe fn getBitmapDataPlanes(&self, data: NonNull<*mut c_uchar>); + #[method(isPlanar)] + pub unsafe fn isPlanar(&self) -> bool; + #[method(samplesPerPixel)] + pub unsafe fn samplesPerPixel(&self) -> NSInteger; + #[method(bitsPerPixel)] + pub unsafe fn bitsPerPixel(&self) -> NSInteger; + #[method(bytesPerRow)] + pub unsafe fn bytesPerRow(&self) -> NSInteger; + #[method(bytesPerPlane)] + pub unsafe fn bytesPerPlane(&self) -> NSInteger; + #[method(numberOfPlanes)] + pub unsafe fn numberOfPlanes(&self) -> NSInteger; + #[method(bitmapFormat)] + pub unsafe fn bitmapFormat(&self) -> NSBitmapFormat; + #[method(getCompression:factor:)] + pub unsafe fn getCompression_factor( + &self, + compression: *mut NSTIFFCompression, + factor: *mut c_float, + ); + #[method(setCompression:factor:)] + pub unsafe fn setCompression_factor(&self, compression: NSTIFFCompression, factor: c_float); + #[method_id(TIFFRepresentation)] + pub unsafe fn TIFFRepresentation(&self) -> Option>; + #[method_id(TIFFRepresentationUsingCompression:factor:)] + pub unsafe fn TIFFRepresentationUsingCompression_factor( + &self, + comp: NSTIFFCompression, + factor: c_float, + ) -> Option>; + #[method_id(TIFFRepresentationOfImageRepsInArray:)] + pub unsafe fn TIFFRepresentationOfImageRepsInArray( + array: &NSArray, + ) -> Option>; + #[method_id(TIFFRepresentationOfImageRepsInArray:usingCompression:factor:)] + pub unsafe fn TIFFRepresentationOfImageRepsInArray_usingCompression_factor( + array: &NSArray, + comp: NSTIFFCompression, + factor: c_float, + ) -> Option>; + #[method(getTIFFCompressionTypes:count:)] + pub unsafe fn getTIFFCompressionTypes_count( + list: NonNull<*mut NSTIFFCompression>, + numTypes: NonNull, + ); + #[method_id(localizedNameForTIFFCompressionType:)] + pub unsafe fn localizedNameForTIFFCompressionType( + compression: NSTIFFCompression, + ) -> Option>; + #[method(canBeCompressedUsing:)] + pub unsafe fn canBeCompressedUsing(&self, compression: NSTIFFCompression) -> bool; + #[method(colorizeByMappingGray:toColor:blackMapping:whiteMapping:)] + pub unsafe fn colorizeByMappingGray_toColor_blackMapping_whiteMapping( + &self, + midPoint: CGFloat, + midPointColor: Option<&NSColor>, + shadowColor: Option<&NSColor>, + lightColor: Option<&NSColor>, + ); + #[method_id(initForIncrementalLoad)] + pub unsafe fn initForIncrementalLoad(&self) -> Id; + #[method(incrementalLoadFromData:complete:)] + pub unsafe fn incrementalLoadFromData_complete( + &self, + data: &NSData, + complete: bool, + ) -> NSInteger; + #[method(setColor:atX:y:)] + pub unsafe fn setColor_atX_y(&self, color: &NSColor, x: NSInteger, y: NSInteger); + #[method_id(colorAtX:y:)] + pub unsafe fn colorAtX_y(&self, x: NSInteger, y: NSInteger) -> Option>; + #[method(getPixel:atX:y:)] + pub unsafe fn getPixel_atX_y(&self, p: TodoArray, x: NSInteger, y: NSInteger); + #[method(setPixel:atX:y:)] + pub unsafe fn setPixel_atX_y(&self, p: TodoArray, x: NSInteger, y: NSInteger); + #[method(CGImage)] + pub unsafe fn CGImage(&self) -> CGImageRef; + #[method_id(colorSpace)] + pub unsafe fn colorSpace(&self) -> Id; + #[method_id(bitmapImageRepByConvertingToColorSpace:renderingIntent:)] + pub unsafe fn bitmapImageRepByConvertingToColorSpace_renderingIntent( + &self, + targetSpace: &NSColorSpace, + renderingIntent: NSColorRenderingIntent, + ) -> Option>; + #[method_id(bitmapImageRepByRetaggingWithColorSpace:)] + pub unsafe fn bitmapImageRepByRetaggingWithColorSpace( + &self, + newSpace: &NSColorSpace, + ) -> Option>; + } +); +extern_methods!( + #[doc = "NSBitmapImageFileTypeExtensions"] + unsafe impl NSBitmapImageRep { + #[method_id(representationOfImageRepsInArray:usingType:properties:)] + pub unsafe fn representationOfImageRepsInArray_usingType_properties( + imageReps: &NSArray, + storageType: NSBitmapImageFileType, + properties: &NSDictionary, + ) -> Option>; + #[method_id(representationUsingType:properties:)] + pub unsafe fn representationUsingType_properties( + &self, + storageType: NSBitmapImageFileType, + properties: &NSDictionary, + ) -> Option>; + #[method(setProperty:withValue:)] + pub unsafe fn setProperty_withValue( + &self, + property: &NSBitmapImageRepPropertyKey, + value: Option<&Object>, + ); + #[method_id(valueForProperty:)] + pub unsafe fn valueForProperty( + &self, + property: &NSBitmapImageRepPropertyKey, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSBox.rs b/crates/icrate/src/generated/AppKit/NSBox.rs new file mode 100644 index 000000000..c731cd3d4 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSBox.rs @@ -0,0 +1,83 @@ +use super::__exported::NSFont; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSBox; + unsafe impl ClassType for NSBox { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSBox { + #[method(boxType)] + pub unsafe fn boxType(&self) -> NSBoxType; + #[method(setBoxType:)] + pub unsafe fn setBoxType(&self, boxType: NSBoxType); + #[method(titlePosition)] + pub unsafe fn titlePosition(&self) -> NSTitlePosition; + #[method(setTitlePosition:)] + pub unsafe fn setTitlePosition(&self, titlePosition: NSTitlePosition); + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(titleFont)] + pub unsafe fn titleFont(&self) -> Id; + #[method(setTitleFont:)] + pub unsafe fn setTitleFont(&self, titleFont: &NSFont); + #[method(borderRect)] + pub unsafe fn borderRect(&self) -> NSRect; + #[method(titleRect)] + pub unsafe fn titleRect(&self) -> NSRect; + #[method_id(titleCell)] + pub unsafe fn titleCell(&self) -> Id; + #[method(contentViewMargins)] + pub unsafe fn contentViewMargins(&self) -> NSSize; + #[method(setContentViewMargins:)] + pub unsafe fn setContentViewMargins(&self, contentViewMargins: NSSize); + #[method(sizeToFit)] + pub unsafe fn sizeToFit(&self); + #[method(setFrameFromContentFrame:)] + pub unsafe fn setFrameFromContentFrame(&self, contentFrame: NSRect); + #[method_id(contentView)] + pub unsafe fn contentView(&self) -> Option>; + #[method(setContentView:)] + pub unsafe fn setContentView(&self, contentView: Option<&NSView>); + #[method(isTransparent)] + pub unsafe fn isTransparent(&self) -> bool; + #[method(setTransparent:)] + pub unsafe fn setTransparent(&self, transparent: bool); + #[method(borderWidth)] + pub unsafe fn borderWidth(&self) -> CGFloat; + #[method(setBorderWidth:)] + pub unsafe fn setBorderWidth(&self, borderWidth: CGFloat); + #[method(cornerRadius)] + pub unsafe fn cornerRadius(&self) -> CGFloat; + #[method(setCornerRadius:)] + pub unsafe fn setCornerRadius(&self, cornerRadius: CGFloat); + #[method_id(borderColor)] + pub unsafe fn borderColor(&self) -> Id; + #[method(setBorderColor:)] + pub unsafe fn setBorderColor(&self, borderColor: &NSColor); + #[method_id(fillColor)] + pub unsafe fn fillColor(&self) -> Id; + #[method(setFillColor:)] + pub unsafe fn setFillColor(&self, fillColor: &NSColor); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSBox { + #[method(borderType)] + pub unsafe fn borderType(&self) -> NSBorderType; + #[method(setBorderType:)] + pub unsafe fn setBorderType(&self, borderType: NSBorderType); + #[method(setTitleWithMnemonic:)] + pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs new file mode 100644 index 000000000..22791ca94 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -0,0 +1,325 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSDragging::*; +use crate::AppKit::generated::NSViewController::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSBrowserColumnsAutosaveName = NSString; +use super::__exported::NSIndexSet; +use super::__exported::NSMatrix; +use super::__exported::NSScroller; +extern_class!( + #[derive(Debug)] + pub struct NSBrowser; + unsafe impl ClassType for NSBrowser { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSBrowser { + #[method(cellClass)] + pub unsafe fn cellClass() -> &Class; + #[method(loadColumnZero)] + pub unsafe fn loadColumnZero(&self); + #[method(isLoaded)] + pub unsafe fn isLoaded(&self) -> bool; + #[method(doubleAction)] + pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] + pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method(setCellClass:)] + pub unsafe fn setCellClass(&self, factoryId: &Class); + #[method_id(cellPrototype)] + pub unsafe fn cellPrototype(&self) -> Option>; + #[method(setCellPrototype:)] + pub unsafe fn setCellPrototype(&self, cellPrototype: Option<&Object>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSBrowserDelegate>); + #[method(reusesColumns)] + pub unsafe fn reusesColumns(&self) -> bool; + #[method(setReusesColumns:)] + pub unsafe fn setReusesColumns(&self, reusesColumns: bool); + #[method(hasHorizontalScroller)] + pub unsafe fn hasHorizontalScroller(&self) -> bool; + #[method(setHasHorizontalScroller:)] + pub unsafe fn setHasHorizontalScroller(&self, hasHorizontalScroller: bool); + #[method(autohidesScroller)] + pub unsafe fn autohidesScroller(&self) -> bool; + #[method(setAutohidesScroller:)] + pub unsafe fn setAutohidesScroller(&self, autohidesScroller: bool); + #[method(separatesColumns)] + pub unsafe fn separatesColumns(&self) -> bool; + #[method(setSeparatesColumns:)] + pub unsafe fn setSeparatesColumns(&self, separatesColumns: bool); + #[method(isTitled)] + pub unsafe fn isTitled(&self) -> bool; + #[method(setTitled:)] + pub unsafe fn setTitled(&self, titled: bool); + #[method(minColumnWidth)] + pub unsafe fn minColumnWidth(&self) -> CGFloat; + #[method(setMinColumnWidth:)] + pub unsafe fn setMinColumnWidth(&self, minColumnWidth: CGFloat); + #[method(maxVisibleColumns)] + pub unsafe fn maxVisibleColumns(&self) -> NSInteger; + #[method(setMaxVisibleColumns:)] + pub unsafe fn setMaxVisibleColumns(&self, maxVisibleColumns: NSInteger); + #[method(allowsMultipleSelection)] + pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[method(setAllowsMultipleSelection:)] + pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool); + #[method(allowsBranchSelection)] + pub unsafe fn allowsBranchSelection(&self) -> bool; + #[method(setAllowsBranchSelection:)] + pub unsafe fn setAllowsBranchSelection(&self, allowsBranchSelection: bool); + #[method(allowsEmptySelection)] + pub unsafe fn allowsEmptySelection(&self) -> bool; + #[method(setAllowsEmptySelection:)] + pub unsafe fn setAllowsEmptySelection(&self, allowsEmptySelection: bool); + #[method(takesTitleFromPreviousColumn)] + pub unsafe fn takesTitleFromPreviousColumn(&self) -> bool; + #[method(setTakesTitleFromPreviousColumn:)] + pub unsafe fn setTakesTitleFromPreviousColumn(&self, takesTitleFromPreviousColumn: bool); + #[method(sendsActionOnArrowKeys)] + pub unsafe fn sendsActionOnArrowKeys(&self) -> bool; + #[method(setSendsActionOnArrowKeys:)] + pub unsafe fn setSendsActionOnArrowKeys(&self, sendsActionOnArrowKeys: bool); + #[method_id(itemAtIndexPath:)] + pub unsafe fn itemAtIndexPath(&self, indexPath: &NSIndexPath) + -> Option>; + #[method_id(itemAtRow:inColumn:)] + pub unsafe fn itemAtRow_inColumn( + &self, + row: NSInteger, + column: NSInteger, + ) -> Option>; + #[method_id(indexPathForColumn:)] + pub unsafe fn indexPathForColumn(&self, column: NSInteger) -> Id; + #[method(isLeafItem:)] + pub unsafe fn isLeafItem(&self, item: Option<&Object>) -> bool; + #[method(reloadDataForRowIndexes:inColumn:)] + pub unsafe fn reloadDataForRowIndexes_inColumn( + &self, + rowIndexes: &NSIndexSet, + column: NSInteger, + ); + #[method_id(parentForItemsInColumn:)] + pub unsafe fn parentForItemsInColumn( + &self, + column: NSInteger, + ) -> Option>; + #[method(scrollRowToVisible:inColumn:)] + pub unsafe fn scrollRowToVisible_inColumn(&self, row: NSInteger, column: NSInteger); + #[method(setTitle:ofColumn:)] + pub unsafe fn setTitle_ofColumn(&self, string: &NSString, column: NSInteger); + #[method_id(titleOfColumn:)] + pub unsafe fn titleOfColumn(&self, column: NSInteger) -> Option>; + #[method_id(pathSeparator)] + pub unsafe fn pathSeparator(&self) -> Id; + #[method(setPathSeparator:)] + pub unsafe fn setPathSeparator(&self, pathSeparator: &NSString); + #[method(setPath:)] + pub unsafe fn setPath(&self, path: &NSString) -> bool; + #[method_id(path)] + pub unsafe fn path(&self) -> Id; + #[method_id(pathToColumn:)] + pub unsafe fn pathToColumn(&self, column: NSInteger) -> Id; + #[method(clickedColumn)] + pub unsafe fn clickedColumn(&self) -> NSInteger; + #[method(clickedRow)] + pub unsafe fn clickedRow(&self) -> NSInteger; + #[method(selectedColumn)] + pub unsafe fn selectedColumn(&self) -> NSInteger; + #[method_id(selectedCell)] + pub unsafe fn selectedCell(&self) -> Option>; + #[method_id(selectedCellInColumn:)] + pub unsafe fn selectedCellInColumn(&self, column: NSInteger) -> Option>; + #[method_id(selectedCells)] + pub unsafe fn selectedCells(&self) -> Option, Shared>>; + #[method(selectRow:inColumn:)] + pub unsafe fn selectRow_inColumn(&self, row: NSInteger, column: NSInteger); + #[method(selectedRowInColumn:)] + pub unsafe fn selectedRowInColumn(&self, column: NSInteger) -> NSInteger; + #[method_id(selectionIndexPath)] + pub unsafe fn selectionIndexPath(&self) -> Option>; + #[method(setSelectionIndexPath:)] + pub unsafe fn setSelectionIndexPath(&self, selectionIndexPath: Option<&NSIndexPath>); + #[method_id(selectionIndexPaths)] + pub unsafe fn selectionIndexPaths(&self) -> Id, Shared>; + #[method(setSelectionIndexPaths:)] + pub unsafe fn setSelectionIndexPaths(&self, selectionIndexPaths: &NSArray); + #[method(selectRowIndexes:inColumn:)] + pub unsafe fn selectRowIndexes_inColumn(&self, indexes: &NSIndexSet, column: NSInteger); + #[method_id(selectedRowIndexesInColumn:)] + pub unsafe fn selectedRowIndexesInColumn( + &self, + column: NSInteger, + ) -> Option>; + #[method(reloadColumn:)] + pub unsafe fn reloadColumn(&self, column: NSInteger); + #[method(validateVisibleColumns)] + pub unsafe fn validateVisibleColumns(&self); + #[method(scrollColumnsRightBy:)] + pub unsafe fn scrollColumnsRightBy(&self, shiftAmount: NSInteger); + #[method(scrollColumnsLeftBy:)] + pub unsafe fn scrollColumnsLeftBy(&self, shiftAmount: NSInteger); + #[method(scrollColumnToVisible:)] + pub unsafe fn scrollColumnToVisible(&self, column: NSInteger); + #[method(lastColumn)] + pub unsafe fn lastColumn(&self) -> NSInteger; + #[method(setLastColumn:)] + pub unsafe fn setLastColumn(&self, lastColumn: NSInteger); + #[method(addColumn)] + pub unsafe fn addColumn(&self); + #[method(numberOfVisibleColumns)] + pub unsafe fn numberOfVisibleColumns(&self) -> NSInteger; + #[method(firstVisibleColumn)] + pub unsafe fn firstVisibleColumn(&self) -> NSInteger; + #[method(lastVisibleColumn)] + pub unsafe fn lastVisibleColumn(&self) -> NSInteger; + #[method_id(loadedCellAtRow:column:)] + pub unsafe fn loadedCellAtRow_column( + &self, + row: NSInteger, + col: NSInteger, + ) -> Option>; + #[method(selectAll:)] + pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[method(tile)] + pub unsafe fn tile(&self); + #[method(doClick:)] + pub unsafe fn doClick(&self, sender: Option<&Object>); + #[method(doDoubleClick:)] + pub unsafe fn doDoubleClick(&self, sender: Option<&Object>); + #[method(sendAction)] + pub unsafe fn sendAction(&self) -> bool; + #[method(titleFrameOfColumn:)] + pub unsafe fn titleFrameOfColumn(&self, column: NSInteger) -> NSRect; + #[method(drawTitleOfColumn:inRect:)] + pub unsafe fn drawTitleOfColumn_inRect(&self, column: NSInteger, rect: NSRect); + #[method(titleHeight)] + pub unsafe fn titleHeight(&self) -> CGFloat; + #[method(frameOfColumn:)] + pub unsafe fn frameOfColumn(&self, column: NSInteger) -> NSRect; + #[method(frameOfInsideOfColumn:)] + pub unsafe fn frameOfInsideOfColumn(&self, column: NSInteger) -> NSRect; + #[method(frameOfRow:inColumn:)] + pub unsafe fn frameOfRow_inColumn(&self, row: NSInteger, column: NSInteger) -> NSRect; + #[method(getRow:column:forPoint:)] + pub unsafe fn getRow_column_forPoint( + &self, + row: *mut NSInteger, + column: *mut NSInteger, + point: NSPoint, + ) -> bool; + #[method(columnWidthForColumnContentWidth:)] + pub unsafe fn columnWidthForColumnContentWidth( + &self, + columnContentWidth: CGFloat, + ) -> CGFloat; + #[method(columnContentWidthForColumnWidth:)] + pub unsafe fn columnContentWidthForColumnWidth(&self, columnWidth: CGFloat) -> CGFloat; + #[method(columnResizingType)] + pub unsafe fn columnResizingType(&self) -> NSBrowserColumnResizingType; + #[method(setColumnResizingType:)] + pub unsafe fn setColumnResizingType(&self, columnResizingType: NSBrowserColumnResizingType); + #[method(prefersAllColumnUserResizing)] + pub unsafe fn prefersAllColumnUserResizing(&self) -> bool; + #[method(setPrefersAllColumnUserResizing:)] + pub unsafe fn setPrefersAllColumnUserResizing(&self, prefersAllColumnUserResizing: bool); + #[method(setWidth:ofColumn:)] + pub unsafe fn setWidth_ofColumn(&self, columnWidth: CGFloat, columnIndex: NSInteger); + #[method(widthOfColumn:)] + pub unsafe fn widthOfColumn(&self, column: NSInteger) -> CGFloat; + #[method(rowHeight)] + pub unsafe fn rowHeight(&self) -> CGFloat; + #[method(setRowHeight:)] + pub unsafe fn setRowHeight(&self, rowHeight: CGFloat); + #[method(noteHeightOfRowsWithIndexesChanged:inColumn:)] + pub unsafe fn noteHeightOfRowsWithIndexesChanged_inColumn( + &self, + indexSet: &NSIndexSet, + columnIndex: NSInteger, + ); + #[method(setDefaultColumnWidth:)] + pub unsafe fn setDefaultColumnWidth(&self, columnWidth: CGFloat); + #[method(defaultColumnWidth)] + pub unsafe fn defaultColumnWidth(&self) -> CGFloat; + #[method_id(columnsAutosaveName)] + pub unsafe fn columnsAutosaveName(&self) -> Id; + #[method(setColumnsAutosaveName:)] + pub unsafe fn setColumnsAutosaveName( + &self, + columnsAutosaveName: &NSBrowserColumnsAutosaveName, + ); + #[method(removeSavedColumnsWithAutosaveName:)] + pub unsafe fn removeSavedColumnsWithAutosaveName(name: &NSBrowserColumnsAutosaveName); + #[method(canDragRowsWithIndexes:inColumn:withEvent:)] + pub unsafe fn canDragRowsWithIndexes_inColumn_withEvent( + &self, + rowIndexes: &NSIndexSet, + column: NSInteger, + event: &NSEvent, + ) -> bool; + #[method_id(draggingImageForRowsWithIndexes:inColumn:withEvent:offset:)] + pub unsafe fn draggingImageForRowsWithIndexes_inColumn_withEvent_offset( + &self, + rowIndexes: &NSIndexSet, + column: NSInteger, + event: &NSEvent, + dragImageOffset: NSPointPointer, + ) -> Option>; + #[method(setDraggingSourceOperationMask:forLocal:)] + pub unsafe fn setDraggingSourceOperationMask_forLocal( + &self, + mask: NSDragOperation, + isLocal: bool, + ); + #[method(allowsTypeSelect)] + pub unsafe fn allowsTypeSelect(&self) -> bool; + #[method(setAllowsTypeSelect:)] + pub unsafe fn setAllowsTypeSelect(&self, allowsTypeSelect: bool); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(editItemAtIndexPath:withEvent:select:)] + pub unsafe fn editItemAtIndexPath_withEvent_select( + &self, + indexPath: &NSIndexPath, + event: Option<&NSEvent>, + select: bool, + ); + } +); +pub type NSBrowserDelegate = NSObject; +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSBrowser { + #[method(setAcceptsArrowKeys:)] + pub unsafe fn setAcceptsArrowKeys(&self, flag: bool); + #[method(acceptsArrowKeys)] + pub unsafe fn acceptsArrowKeys(&self) -> bool; + #[method(displayColumn:)] + pub unsafe fn displayColumn(&self, column: NSInteger); + #[method(displayAllColumns)] + pub unsafe fn displayAllColumns(&self); + #[method(scrollViaScroller:)] + pub unsafe fn scrollViaScroller(&self, sender: Option<&NSScroller>); + #[method(updateScroller)] + pub unsafe fn updateScroller(&self); + #[method(setMatrixClass:)] + pub unsafe fn setMatrixClass(&self, factoryId: &Class); + #[method(matrixClass)] + pub unsafe fn matrixClass(&self) -> &Class; + #[method(columnOfMatrix:)] + pub unsafe fn columnOfMatrix(&self, matrix: &NSMatrix) -> NSInteger; + #[method_id(matrixInColumn:)] + pub unsafe fn matrixInColumn(&self, column: NSInteger) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs new file mode 100644 index 000000000..cdce45df6 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs @@ -0,0 +1,53 @@ +use super::__exported::NSImage; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSBrowserCell; + unsafe impl ClassType for NSBrowserCell { + type Super = NSCell; + } +); +extern_methods!( + unsafe impl NSBrowserCell { + #[method_id(initTextCell:)] + pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initImageCell:)] + pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(branchImage)] + pub unsafe fn branchImage() -> Option>; + #[method_id(highlightedBranchImage)] + pub unsafe fn highlightedBranchImage() -> Option>; + #[method_id(highlightColorInView:)] + pub unsafe fn highlightColorInView( + &self, + controlView: &NSView, + ) -> Option>; + #[method(isLeaf)] + pub unsafe fn isLeaf(&self) -> bool; + #[method(setLeaf:)] + pub unsafe fn setLeaf(&self, leaf: bool); + #[method(isLoaded)] + pub unsafe fn isLoaded(&self) -> bool; + #[method(setLoaded:)] + pub unsafe fn setLoaded(&self, loaded: bool); + #[method(reset)] + pub unsafe fn reset(&self); + #[method(set)] + pub unsafe fn set(&self); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(alternateImage)] + pub unsafe fn alternateImage(&self) -> Option>; + #[method(setAlternateImage:)] + pub unsafe fn setAlternateImage(&self, alternateImage: Option<&NSImage>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSButton.rs b/crates/icrate/src/generated/AppKit/NSButton.rs new file mode 100644 index 000000000..001864c65 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSButton.rs @@ -0,0 +1,198 @@ +use super::__exported::NSImageSymbolConfiguration; +use super::__exported::NSSound; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSButtonCell::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSUserInterfaceCompression::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSButton; + unsafe impl ClassType for NSButton { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSButton { + #[method_id(buttonWithTitle:image:target:action:)] + pub unsafe fn buttonWithTitle_image_target_action( + title: &NSString, + image: &NSImage, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(buttonWithTitle:target:action:)] + pub unsafe fn buttonWithTitle_target_action( + title: &NSString, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(buttonWithImage:target:action:)] + pub unsafe fn buttonWithImage_target_action( + image: &NSImage, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(checkboxWithTitle:target:action:)] + pub unsafe fn checkboxWithTitle_target_action( + title: &NSString, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(radioButtonWithTitle:target:action:)] + pub unsafe fn radioButtonWithTitle_target_action( + title: &NSString, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method(setButtonType:)] + pub unsafe fn setButtonType(&self, type_: NSButtonType); + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(attributedTitle)] + pub unsafe fn attributedTitle(&self) -> Id; + #[method(setAttributedTitle:)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); + #[method_id(alternateTitle)] + pub unsafe fn alternateTitle(&self) -> Id; + #[method(setAlternateTitle:)] + pub unsafe fn setAlternateTitle(&self, alternateTitle: &NSString); + #[method_id(attributedAlternateTitle)] + pub unsafe fn attributedAlternateTitle(&self) -> Id; + #[method(setAttributedAlternateTitle:)] + pub unsafe fn setAttributedAlternateTitle( + &self, + attributedAlternateTitle: &NSAttributedString, + ); + #[method(hasDestructiveAction)] + pub unsafe fn hasDestructiveAction(&self) -> bool; + #[method(setHasDestructiveAction:)] + pub unsafe fn setHasDestructiveAction(&self, hasDestructiveAction: bool); + #[method_id(sound)] + pub unsafe fn sound(&self) -> Option>; + #[method(setSound:)] + pub unsafe fn setSound(&self, sound: Option<&NSSound>); + #[method(isSpringLoaded)] + pub unsafe fn isSpringLoaded(&self) -> bool; + #[method(setSpringLoaded:)] + pub unsafe fn setSpringLoaded(&self, springLoaded: bool); + #[method(maxAcceleratorLevel)] + pub unsafe fn maxAcceleratorLevel(&self) -> NSInteger; + #[method(setMaxAcceleratorLevel:)] + pub unsafe fn setMaxAcceleratorLevel(&self, maxAcceleratorLevel: NSInteger); + #[method(setPeriodicDelay:interval:)] + pub unsafe fn setPeriodicDelay_interval(&self, delay: c_float, interval: c_float); + #[method(getPeriodicDelay:interval:)] + pub unsafe fn getPeriodicDelay_interval( + &self, + delay: NonNull, + interval: NonNull, + ); + #[method(bezelStyle)] + pub unsafe fn bezelStyle(&self) -> NSBezelStyle; + #[method(setBezelStyle:)] + pub unsafe fn setBezelStyle(&self, bezelStyle: NSBezelStyle); + #[method(isBordered)] + pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] + pub unsafe fn setBordered(&self, bordered: bool); + #[method(isTransparent)] + pub unsafe fn isTransparent(&self) -> bool; + #[method(setTransparent:)] + pub unsafe fn setTransparent(&self, transparent: bool); + #[method(showsBorderOnlyWhileMouseInside)] + pub unsafe fn showsBorderOnlyWhileMouseInside(&self) -> bool; + #[method(setShowsBorderOnlyWhileMouseInside:)] + pub unsafe fn setShowsBorderOnlyWhileMouseInside( + &self, + showsBorderOnlyWhileMouseInside: bool, + ); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(alternateImage)] + pub unsafe fn alternateImage(&self) -> Option>; + #[method(setAlternateImage:)] + pub unsafe fn setAlternateImage(&self, alternateImage: Option<&NSImage>); + #[method(imagePosition)] + pub unsafe fn imagePosition(&self) -> NSCellImagePosition; + #[method(setImagePosition:)] + pub unsafe fn setImagePosition(&self, imagePosition: NSCellImagePosition); + #[method(imageScaling)] + pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[method(setImageScaling:)] + pub unsafe fn setImageScaling(&self, imageScaling: NSImageScaling); + #[method(imageHugsTitle)] + pub unsafe fn imageHugsTitle(&self) -> bool; + #[method(setImageHugsTitle:)] + pub unsafe fn setImageHugsTitle(&self, imageHugsTitle: bool); + #[method_id(symbolConfiguration)] + pub unsafe fn symbolConfiguration(&self) -> Option>; + #[method(setSymbolConfiguration:)] + pub unsafe fn setSymbolConfiguration( + &self, + symbolConfiguration: Option<&NSImageSymbolConfiguration>, + ); + #[method_id(bezelColor)] + pub unsafe fn bezelColor(&self) -> Option>; + #[method(setBezelColor:)] + pub unsafe fn setBezelColor(&self, bezelColor: Option<&NSColor>); + #[method_id(contentTintColor)] + pub unsafe fn contentTintColor(&self) -> Option>; + #[method(setContentTintColor:)] + pub unsafe fn setContentTintColor(&self, contentTintColor: Option<&NSColor>); + #[method(state)] + pub unsafe fn state(&self) -> NSControlStateValue; + #[method(setState:)] + pub unsafe fn setState(&self, state: NSControlStateValue); + #[method(allowsMixedState)] + pub unsafe fn allowsMixedState(&self) -> bool; + #[method(setAllowsMixedState:)] + pub unsafe fn setAllowsMixedState(&self, allowsMixedState: bool); + #[method(setNextState)] + pub unsafe fn setNextState(&self); + #[method(highlight:)] + pub unsafe fn highlight(&self, flag: bool); + #[method_id(keyEquivalent)] + pub unsafe fn keyEquivalent(&self) -> Id; + #[method(setKeyEquivalent:)] + pub unsafe fn setKeyEquivalent(&self, keyEquivalent: &NSString); + #[method(keyEquivalentModifierMask)] + pub unsafe fn keyEquivalentModifierMask(&self) -> NSEventModifierFlags; + #[method(setKeyEquivalentModifierMask:)] + pub unsafe fn setKeyEquivalentModifierMask( + &self, + keyEquivalentModifierMask: NSEventModifierFlags, + ); + #[method(performKeyEquivalent:)] + pub unsafe fn performKeyEquivalent(&self, key: &NSEvent) -> bool; + #[method(compressWithPrioritizedCompressionOptions:)] + pub unsafe fn compressWithPrioritizedCompressionOptions( + &self, + prioritizedOptions: &NSArray, + ); + #[method(minimumSizeWithPrioritizedCompressionOptions:)] + pub unsafe fn minimumSizeWithPrioritizedCompressionOptions( + &self, + prioritizedOptions: &NSArray, + ) -> NSSize; + #[method_id(activeCompressionOptions)] + pub unsafe fn activeCompressionOptions( + &self, + ) -> Id; + } +); +extern_methods!( + #[doc = "NSButtonDeprecated"] + unsafe impl NSButton { + #[method(setTitleWithMnemonic:)] + pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs new file mode 100644 index 000000000..b1af2e7cb --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -0,0 +1,163 @@ +use super::__exported::NSAttributedString; +use super::__exported::NSFont; +use super::__exported::NSImage; +use super::__exported::NSSound; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSActionCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSButtonCell; + unsafe impl ClassType for NSButtonCell { + type Super = NSActionCell; + } +); +extern_methods!( + unsafe impl NSButtonCell { + #[method_id(initTextCell:)] + pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initImageCell:)] + pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(bezelStyle)] + pub unsafe fn bezelStyle(&self) -> NSBezelStyle; + #[method(setBezelStyle:)] + pub unsafe fn setBezelStyle(&self, bezelStyle: NSBezelStyle); + #[method(setButtonType:)] + pub unsafe fn setButtonType(&self, type_: NSButtonType); + #[method(highlightsBy)] + pub unsafe fn highlightsBy(&self) -> NSCellStyleMask; + #[method(setHighlightsBy:)] + pub unsafe fn setHighlightsBy(&self, highlightsBy: NSCellStyleMask); + #[method(showsStateBy)] + pub unsafe fn showsStateBy(&self) -> NSCellStyleMask; + #[method(setShowsStateBy:)] + pub unsafe fn setShowsStateBy(&self, showsStateBy: NSCellStyleMask); + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(attributedTitle)] + pub unsafe fn attributedTitle(&self) -> Id; + #[method(setAttributedTitle:)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); + #[method_id(alternateTitle)] + pub unsafe fn alternateTitle(&self) -> Id; + #[method(setAlternateTitle:)] + pub unsafe fn setAlternateTitle(&self, alternateTitle: &NSString); + #[method_id(attributedAlternateTitle)] + pub unsafe fn attributedAlternateTitle(&self) -> Id; + #[method(setAttributedAlternateTitle:)] + pub unsafe fn setAttributedAlternateTitle( + &self, + attributedAlternateTitle: &NSAttributedString, + ); + #[method_id(alternateImage)] + pub unsafe fn alternateImage(&self) -> Option>; + #[method(setAlternateImage:)] + pub unsafe fn setAlternateImage(&self, alternateImage: Option<&NSImage>); + #[method(imagePosition)] + pub unsafe fn imagePosition(&self) -> NSCellImagePosition; + #[method(setImagePosition:)] + pub unsafe fn setImagePosition(&self, imagePosition: NSCellImagePosition); + #[method(imageScaling)] + pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[method(setImageScaling:)] + pub unsafe fn setImageScaling(&self, imageScaling: NSImageScaling); + #[method_id(keyEquivalent)] + pub unsafe fn keyEquivalent(&self) -> Id; + #[method(setKeyEquivalent:)] + pub unsafe fn setKeyEquivalent(&self, keyEquivalent: &NSString); + #[method(keyEquivalentModifierMask)] + pub unsafe fn keyEquivalentModifierMask(&self) -> NSEventModifierFlags; + #[method(setKeyEquivalentModifierMask:)] + pub unsafe fn setKeyEquivalentModifierMask( + &self, + keyEquivalentModifierMask: NSEventModifierFlags, + ); + #[method(isTransparent)] + pub unsafe fn isTransparent(&self) -> bool; + #[method(setTransparent:)] + pub unsafe fn setTransparent(&self, transparent: bool); + #[method(isOpaque)] + pub unsafe fn isOpaque(&self) -> bool; + #[method(imageDimsWhenDisabled)] + pub unsafe fn imageDimsWhenDisabled(&self) -> bool; + #[method(setImageDimsWhenDisabled:)] + pub unsafe fn setImageDimsWhenDisabled(&self, imageDimsWhenDisabled: bool); + #[method(showsBorderOnlyWhileMouseInside)] + pub unsafe fn showsBorderOnlyWhileMouseInside(&self) -> bool; + #[method(setShowsBorderOnlyWhileMouseInside:)] + pub unsafe fn setShowsBorderOnlyWhileMouseInside( + &self, + showsBorderOnlyWhileMouseInside: bool, + ); + #[method_id(sound)] + pub unsafe fn sound(&self) -> Option>; + #[method(setSound:)] + pub unsafe fn setSound(&self, sound: Option<&NSSound>); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(setPeriodicDelay:interval:)] + pub unsafe fn setPeriodicDelay_interval(&self, delay: c_float, interval: c_float); + #[method(getPeriodicDelay:interval:)] + pub unsafe fn getPeriodicDelay_interval( + &self, + delay: NonNull, + interval: NonNull, + ); + #[method(performClick:)] + pub unsafe fn performClick(&self, sender: Option<&Object>); + #[method(mouseEntered:)] + pub unsafe fn mouseEntered(&self, event: &NSEvent); + #[method(mouseExited:)] + pub unsafe fn mouseExited(&self, event: &NSEvent); + #[method(drawBezelWithFrame:inView:)] + pub unsafe fn drawBezelWithFrame_inView(&self, frame: NSRect, controlView: &NSView); + #[method(drawImage:withFrame:inView:)] + pub unsafe fn drawImage_withFrame_inView( + &self, + image: &NSImage, + frame: NSRect, + controlView: &NSView, + ); + #[method(drawTitle:withFrame:inView:)] + pub unsafe fn drawTitle_withFrame_inView( + &self, + title: &NSAttributedString, + frame: NSRect, + controlView: &NSView, + ) -> NSRect; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSButtonCell { + #[method(gradientType)] + pub unsafe fn gradientType(&self) -> NSGradientType; + #[method(setGradientType:)] + pub unsafe fn setGradientType(&self, gradientType: NSGradientType); + #[method(setTitleWithMnemonic:)] + pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); + #[method(setAlternateTitleWithMnemonic:)] + pub unsafe fn setAlternateTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); + #[method(setAlternateMnemonicLocation:)] + pub unsafe fn setAlternateMnemonicLocation(&self, location: NSUInteger); + #[method(alternateMnemonicLocation)] + pub unsafe fn alternateMnemonicLocation(&self) -> NSUInteger; + #[method_id(alternateMnemonic)] + pub unsafe fn alternateMnemonic(&self) -> Option>; + #[method_id(keyEquivalentFont)] + pub unsafe fn keyEquivalentFont(&self) -> Option>; + #[method(setKeyEquivalentFont:)] + pub unsafe fn setKeyEquivalentFont(&self, keyEquivalentFont: Option<&NSFont>); + #[method(setKeyEquivalentFont:size:)] + pub unsafe fn setKeyEquivalentFont_size(&self, fontName: &NSString, fontSize: CGFloat); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs new file mode 100644 index 000000000..c6872d2cb --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs @@ -0,0 +1,68 @@ +use super::__exported::NSColor; +use super::__exported::NSImage; +use crate::AppKit::generated::NSTouchBarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSButtonTouchBarItem; + unsafe impl ClassType for NSButtonTouchBarItem { + type Super = NSTouchBarItem; + } +); +extern_methods!( + unsafe impl NSButtonTouchBarItem { + #[method_id(buttonTouchBarItemWithIdentifier:title:target:action:)] + pub unsafe fn buttonTouchBarItemWithIdentifier_title_target_action( + identifier: &NSTouchBarItemIdentifier, + title: &NSString, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(buttonTouchBarItemWithIdentifier:image:target:action:)] + pub unsafe fn buttonTouchBarItemWithIdentifier_image_target_action( + identifier: &NSTouchBarItemIdentifier, + image: &NSImage, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(buttonTouchBarItemWithIdentifier:title:image:target:action:)] + pub unsafe fn buttonTouchBarItemWithIdentifier_title_image_target_action( + identifier: &NSTouchBarItemIdentifier, + title: &NSString, + image: &NSImage, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(bezelColor)] + pub unsafe fn bezelColor(&self) -> Option>; + #[method(setBezelColor:)] + pub unsafe fn setBezelColor(&self, bezelColor: Option<&NSColor>); + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method_id(customizationLabel)] + pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] + pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs new file mode 100644 index 000000000..3bcf79936 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs @@ -0,0 +1,52 @@ +use super::__exported::NSBitmapImageRep; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSGraphics::*; +use crate::AppKit::generated::NSImageRep::*; +use crate::CoreImage::generated::CIImage::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSCIImageRep; + unsafe impl ClassType for NSCIImageRep { + type Super = NSImageRep; + } +); +extern_methods!( + unsafe impl NSCIImageRep { + #[method_id(imageRepWithCIImage:)] + pub unsafe fn imageRepWithCIImage(image: &CIImage) -> Id; + #[method_id(initWithCIImage:)] + pub unsafe fn initWithCIImage(&self, image: &CIImage) -> Id; + #[method_id(CIImage)] + pub unsafe fn CIImage(&self) -> Id; + } +); +extern_methods!( + #[doc = "NSAppKitAdditions"] + unsafe impl CIImage { + #[method_id(initWithBitmapImageRep:)] + pub unsafe fn initWithBitmapImageRep( + &self, + bitmapImageRep: &NSBitmapImageRep, + ) -> Option>; + #[method(drawInRect:fromRect:operation:fraction:)] + pub unsafe fn drawInRect_fromRect_operation_fraction( + &self, + rect: NSRect, + fromRect: NSRect, + op: NSCompositingOperation, + delta: CGFloat, + ); + #[method(drawAtPoint:fromRect:operation:fraction:)] + pub unsafe fn drawAtPoint_fromRect_operation_fraction( + &self, + point: NSPoint, + fromRect: NSRect, + op: NSCompositingOperation, + delta: CGFloat, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs new file mode 100644 index 000000000..9558fb23a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs @@ -0,0 +1,37 @@ +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSGraphics::*; +use crate::AppKit::generated::NSImageRep::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSCachedImageRep; + unsafe impl ClassType for NSCachedImageRep { + type Super = NSImageRep; + } +); +extern_methods!( + unsafe impl NSCachedImageRep { + #[method_id(initWithWindow:rect:)] + pub unsafe fn initWithWindow_rect( + &self, + win: Option<&NSWindow>, + rect: NSRect, + ) -> Option>; + #[method_id(initWithSize:depth:separate:alpha:)] + pub unsafe fn initWithSize_depth_separate_alpha( + &self, + size: NSSize, + depth: NSWindowDepth, + flag: bool, + alpha: bool, + ) -> Option>; + #[method_id(window)] + pub unsafe fn window(&self) -> Option>; + #[method(rect)] + pub unsafe fn rect(&self) -> NSRect; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs new file mode 100644 index 000000000..2afaa7851 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -0,0 +1,77 @@ +use super::__exported::NSTextInputClient; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTouchBar::*; +use crate::AppKit::generated::NSTouchBarItem::*; +use crate::AppKit::generated::NSView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +__inner_extern_class!( + #[derive(Debug)] + pub struct NSCandidateListTouchBarItem; + unsafe impl ClassType for NSCandidateListTouchBarItem { + type Super = NSTouchBarItem; + } +); +extern_methods!( + unsafe impl NSCandidateListTouchBarItem { + #[method_id(client)] + pub unsafe fn client(&self) -> Option>; + #[method(setClient:)] + pub unsafe fn setClient(&self, client: Option<&TodoProtocols>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSCandidateListTouchBarItemDelegate>); + #[method(isCollapsed)] + pub unsafe fn isCollapsed(&self) -> bool; + #[method(setCollapsed:)] + pub unsafe fn setCollapsed(&self, collapsed: bool); + #[method(allowsCollapsing)] + pub unsafe fn allowsCollapsing(&self) -> bool; + #[method(setAllowsCollapsing:)] + pub unsafe fn setAllowsCollapsing(&self, allowsCollapsing: bool); + #[method(isCandidateListVisible)] + pub unsafe fn isCandidateListVisible(&self) -> bool; + #[method(updateWithInsertionPointVisibility:)] + pub unsafe fn updateWithInsertionPointVisibility(&self, isVisible: bool); + #[method(allowsTextInputContextCandidates)] + pub unsafe fn allowsTextInputContextCandidates(&self) -> bool; + #[method(setAllowsTextInputContextCandidates:)] + pub unsafe fn setAllowsTextInputContextCandidates( + &self, + allowsTextInputContextCandidates: bool, + ); + #[method(attributedStringForCandidate)] + pub unsafe fn attributedStringForCandidate(&self) -> TodoBlock; + #[method(setAttributedStringForCandidate:)] + pub unsafe fn setAttributedStringForCandidate( + &self, + attributedStringForCandidate: TodoBlock, + ); + #[method_id(candidates)] + pub unsafe fn candidates(&self) -> Id, Shared>; + #[method(setCandidates:forSelectedRange:inString:)] + pub unsafe fn setCandidates_forSelectedRange_inString( + &self, + candidates: &NSArray, + selectedRange: NSRange, + originalString: Option<&NSString>, + ); + #[method_id(customizationLabel)] + pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] + pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + } +); +pub type NSCandidateListTouchBarItemDelegate = NSObject; +extern_methods!( + #[doc = "NSCandidateListTouchBarItem"] + unsafe impl NSView { + #[method_id(candidateListTouchBarItem)] + pub unsafe fn candidateListTouchBarItem( + &self, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs new file mode 100644 index 000000000..92b871fea --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -0,0 +1,462 @@ +use super::__exported::NSAttributedString; +use super::__exported::NSDraggingImageComponent; +use super::__exported::NSEvent; +use super::__exported::NSFont; +use super::__exported::NSFormatter; +use super::__exported::NSImage; +use super::__exported::NSMenu; +use super::__exported::NSText; +use super::__exported::NSTextView; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAccessibilityProtocols::*; +use crate::AppKit::generated::NSParagraphStyle::*; +use crate::AppKit::generated::NSText::*; +use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSControlStateValue = NSInteger; +extern_class!( + #[derive(Debug)] + pub struct NSCell; + unsafe impl ClassType for NSCell { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCell { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initTextCell:)] + pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initImageCell:)] + pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(prefersTrackingUntilMouseUp)] + pub unsafe fn prefersTrackingUntilMouseUp() -> bool; + #[method_id(controlView)] + pub unsafe fn controlView(&self) -> Option>; + #[method(setControlView:)] + pub unsafe fn setControlView(&self, controlView: Option<&NSView>); + #[method(type)] + pub unsafe fn type_(&self) -> NSCellType; + #[method(setType:)] + pub unsafe fn setType(&self, type_: NSCellType); + #[method(state)] + pub unsafe fn state(&self) -> NSControlStateValue; + #[method(setState:)] + pub unsafe fn setState(&self, state: NSControlStateValue); + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method(tag)] + pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] + pub unsafe fn setTag(&self, tag: NSInteger); + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method(isOpaque)] + pub unsafe fn isOpaque(&self) -> bool; + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method(sendActionOn:)] + pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; + #[method(isContinuous)] + pub unsafe fn isContinuous(&self) -> bool; + #[method(setContinuous:)] + pub unsafe fn setContinuous(&self, continuous: bool); + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] + pub unsafe fn setEditable(&self, editable: bool); + #[method(isSelectable)] + pub unsafe fn isSelectable(&self) -> bool; + #[method(setSelectable:)] + pub unsafe fn setSelectable(&self, selectable: bool); + #[method(isBordered)] + pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] + pub unsafe fn setBordered(&self, bordered: bool); + #[method(isBezeled)] + pub unsafe fn isBezeled(&self) -> bool; + #[method(setBezeled:)] + pub unsafe fn setBezeled(&self, bezeled: bool); + #[method(isScrollable)] + pub unsafe fn isScrollable(&self) -> bool; + #[method(setScrollable:)] + pub unsafe fn setScrollable(&self, scrollable: bool); + #[method(isHighlighted)] + pub unsafe fn isHighlighted(&self) -> bool; + #[method(setHighlighted:)] + pub unsafe fn setHighlighted(&self, highlighted: bool); + #[method(alignment)] + pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(setAlignment:)] + pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[method(wraps)] + pub unsafe fn wraps(&self) -> bool; + #[method(setWraps:)] + pub unsafe fn setWraps(&self, wraps: bool); + #[method_id(font)] + pub unsafe fn font(&self) -> Option>; + #[method(setFont:)] + pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[method_id(keyEquivalent)] + pub unsafe fn keyEquivalent(&self) -> Id; + #[method_id(formatter)] + pub unsafe fn formatter(&self) -> Option>; + #[method(setFormatter:)] + pub unsafe fn setFormatter(&self, formatter: Option<&NSFormatter>); + #[method_id(objectValue)] + pub unsafe fn objectValue(&self) -> Option>; + #[method(setObjectValue:)] + pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); + #[method(hasValidObjectValue)] + pub unsafe fn hasValidObjectValue(&self) -> bool; + #[method_id(stringValue)] + pub unsafe fn stringValue(&self) -> Id; + #[method(setStringValue:)] + pub unsafe fn setStringValue(&self, stringValue: &NSString); + #[method(compare:)] + pub unsafe fn compare(&self, otherCell: &Object) -> NSComparisonResult; + #[method(intValue)] + pub unsafe fn intValue(&self) -> c_int; + #[method(setIntValue:)] + pub unsafe fn setIntValue(&self, intValue: c_int); + #[method(floatValue)] + pub unsafe fn floatValue(&self) -> c_float; + #[method(setFloatValue:)] + pub unsafe fn setFloatValue(&self, floatValue: c_float); + #[method(doubleValue)] + pub unsafe fn doubleValue(&self) -> c_double; + #[method(setDoubleValue:)] + pub unsafe fn setDoubleValue(&self, doubleValue: c_double); + #[method(integerValue)] + pub unsafe fn integerValue(&self) -> NSInteger; + #[method(setIntegerValue:)] + pub unsafe fn setIntegerValue(&self, integerValue: NSInteger); + #[method(takeIntValueFrom:)] + pub unsafe fn takeIntValueFrom(&self, sender: Option<&Object>); + #[method(takeFloatValueFrom:)] + pub unsafe fn takeFloatValueFrom(&self, sender: Option<&Object>); + #[method(takeDoubleValueFrom:)] + pub unsafe fn takeDoubleValueFrom(&self, sender: Option<&Object>); + #[method(takeStringValueFrom:)] + pub unsafe fn takeStringValueFrom(&self, sender: Option<&Object>); + #[method(takeObjectValueFrom:)] + pub unsafe fn takeObjectValueFrom(&self, sender: Option<&Object>); + #[method(takeIntegerValueFrom:)] + pub unsafe fn takeIntegerValueFrom(&self, sender: Option<&Object>); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method(controlSize)] + pub unsafe fn controlSize(&self) -> NSControlSize; + #[method(setControlSize:)] + pub unsafe fn setControlSize(&self, controlSize: NSControlSize); + #[method_id(representedObject)] + pub unsafe fn representedObject(&self) -> Option>; + #[method(setRepresentedObject:)] + pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>); + #[method(cellAttribute:)] + pub unsafe fn cellAttribute(&self, parameter: NSCellAttribute) -> NSInteger; + #[method(setCellAttribute:to:)] + pub unsafe fn setCellAttribute_to(&self, parameter: NSCellAttribute, value: NSInteger); + #[method(imageRectForBounds:)] + pub unsafe fn imageRectForBounds(&self, rect: NSRect) -> NSRect; + #[method(titleRectForBounds:)] + pub unsafe fn titleRectForBounds(&self, rect: NSRect) -> NSRect; + #[method(drawingRectForBounds:)] + pub unsafe fn drawingRectForBounds(&self, rect: NSRect) -> NSRect; + #[method(cellSize)] + pub unsafe fn cellSize(&self) -> NSSize; + #[method(cellSizeForBounds:)] + pub unsafe fn cellSizeForBounds(&self, rect: NSRect) -> NSSize; + #[method_id(highlightColorWithFrame:inView:)] + pub unsafe fn highlightColorWithFrame_inView( + &self, + cellFrame: NSRect, + controlView: &NSView, + ) -> Option>; + #[method(calcDrawInfo:)] + pub unsafe fn calcDrawInfo(&self, rect: NSRect); + #[method_id(setUpFieldEditorAttributes:)] + pub unsafe fn setUpFieldEditorAttributes(&self, textObj: &NSText) -> Id; + #[method(drawInteriorWithFrame:inView:)] + pub unsafe fn drawInteriorWithFrame_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method(drawWithFrame:inView:)] + pub unsafe fn drawWithFrame_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method(highlight:withFrame:inView:)] + pub unsafe fn highlight_withFrame_inView( + &self, + flag: bool, + cellFrame: NSRect, + controlView: &NSView, + ); + #[method(mouseDownFlags)] + pub unsafe fn mouseDownFlags(&self) -> NSInteger; + #[method(getPeriodicDelay:interval:)] + pub unsafe fn getPeriodicDelay_interval( + &self, + delay: NonNull, + interval: NonNull, + ); + #[method(startTrackingAt:inView:)] + pub unsafe fn startTrackingAt_inView( + &self, + startPoint: NSPoint, + controlView: &NSView, + ) -> bool; + #[method(continueTracking:at:inView:)] + pub unsafe fn continueTracking_at_inView( + &self, + lastPoint: NSPoint, + currentPoint: NSPoint, + controlView: &NSView, + ) -> bool; + #[method(stopTracking:at:inView:mouseIsUp:)] + pub unsafe fn stopTracking_at_inView_mouseIsUp( + &self, + lastPoint: NSPoint, + stopPoint: NSPoint, + controlView: &NSView, + flag: bool, + ); + #[method(trackMouse:inRect:ofView:untilMouseUp:)] + pub unsafe fn trackMouse_inRect_ofView_untilMouseUp( + &self, + event: &NSEvent, + cellFrame: NSRect, + controlView: &NSView, + flag: bool, + ) -> bool; + #[method(editWithFrame:inView:editor:delegate:event:)] + pub unsafe fn editWithFrame_inView_editor_delegate_event( + &self, + rect: NSRect, + controlView: &NSView, + textObj: &NSText, + delegate: Option<&Object>, + event: Option<&NSEvent>, + ); + #[method(selectWithFrame:inView:editor:delegate:start:length:)] + pub unsafe fn selectWithFrame_inView_editor_delegate_start_length( + &self, + rect: NSRect, + controlView: &NSView, + textObj: &NSText, + delegate: Option<&Object>, + selStart: NSInteger, + selLength: NSInteger, + ); + #[method(endEditing:)] + pub unsafe fn endEditing(&self, textObj: &NSText); + #[method(resetCursorRect:inView:)] + pub unsafe fn resetCursorRect_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method_id(menu)] + pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] + pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method_id(menuForEvent:inRect:ofView:)] + pub unsafe fn menuForEvent_inRect_ofView( + &self, + event: &NSEvent, + cellFrame: NSRect, + view: &NSView, + ) -> Option>; + #[method_id(defaultMenu)] + pub unsafe fn defaultMenu() -> Option>; + #[method(sendsActionOnEndEditing)] + pub unsafe fn sendsActionOnEndEditing(&self) -> bool; + #[method(setSendsActionOnEndEditing:)] + pub unsafe fn setSendsActionOnEndEditing(&self, sendsActionOnEndEditing: bool); + #[method(baseWritingDirection)] + pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[method(setBaseWritingDirection:)] + pub unsafe fn setBaseWritingDirection(&self, baseWritingDirection: NSWritingDirection); + #[method(lineBreakMode)] + pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[method(setLineBreakMode:)] + pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode); + #[method(allowsUndo)] + pub unsafe fn allowsUndo(&self) -> bool; + #[method(setAllowsUndo:)] + pub unsafe fn setAllowsUndo(&self, allowsUndo: bool); + #[method(truncatesLastVisibleLine)] + pub unsafe fn truncatesLastVisibleLine(&self) -> bool; + #[method(setTruncatesLastVisibleLine:)] + pub unsafe fn setTruncatesLastVisibleLine(&self, truncatesLastVisibleLine: bool); + #[method(userInterfaceLayoutDirection)] + pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setUserInterfaceLayoutDirection:)] + pub unsafe fn setUserInterfaceLayoutDirection( + &self, + userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, + ); + #[method_id(fieldEditorForView:)] + pub unsafe fn fieldEditorForView( + &self, + controlView: &NSView, + ) -> Option>; + #[method(usesSingleLineMode)] + pub unsafe fn usesSingleLineMode(&self) -> bool; + #[method(setUsesSingleLineMode:)] + pub unsafe fn setUsesSingleLineMode(&self, usesSingleLineMode: bool); + #[method_id(draggingImageComponentsWithFrame:inView:)] + pub unsafe fn draggingImageComponentsWithFrame_inView( + &self, + frame: NSRect, + view: &NSView, + ) -> Id, Shared>; + } +); +extern_methods!( + #[doc = "NSKeyboardUI"] + unsafe impl NSCell { + #[method(refusesFirstResponder)] + pub unsafe fn refusesFirstResponder(&self) -> bool; + #[method(setRefusesFirstResponder:)] + pub unsafe fn setRefusesFirstResponder(&self, refusesFirstResponder: bool); + #[method(acceptsFirstResponder)] + pub unsafe fn acceptsFirstResponder(&self) -> bool; + #[method(showsFirstResponder)] + pub unsafe fn showsFirstResponder(&self) -> bool; + #[method(setShowsFirstResponder:)] + pub unsafe fn setShowsFirstResponder(&self, showsFirstResponder: bool); + #[method(performClick:)] + pub unsafe fn performClick(&self, sender: Option<&Object>); + #[method(focusRingType)] + pub unsafe fn focusRingType(&self) -> NSFocusRingType; + #[method(setFocusRingType:)] + pub unsafe fn setFocusRingType(&self, focusRingType: NSFocusRingType); + #[method(defaultFocusRingType)] + pub unsafe fn defaultFocusRingType() -> NSFocusRingType; + #[method(drawFocusRingMaskWithFrame:inView:)] + pub unsafe fn drawFocusRingMaskWithFrame_inView( + &self, + cellFrame: NSRect, + controlView: &NSView, + ); + #[method(focusRingMaskBoundsForFrame:inView:)] + pub unsafe fn focusRingMaskBoundsForFrame_inView( + &self, + cellFrame: NSRect, + controlView: &NSView, + ) -> NSRect; + #[method(wantsNotificationForMarkedText)] + pub unsafe fn wantsNotificationForMarkedText(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSCellAttributedStringMethods"] + unsafe impl NSCell { + #[method_id(attributedStringValue)] + pub unsafe fn attributedStringValue(&self) -> Id; + #[method(setAttributedStringValue:)] + pub unsafe fn setAttributedStringValue(&self, attributedStringValue: &NSAttributedString); + #[method(allowsEditingTextAttributes)] + pub unsafe fn allowsEditingTextAttributes(&self) -> bool; + #[method(setAllowsEditingTextAttributes:)] + pub unsafe fn setAllowsEditingTextAttributes(&self, allowsEditingTextAttributes: bool); + #[method(importsGraphics)] + pub unsafe fn importsGraphics(&self) -> bool; + #[method(setImportsGraphics:)] + pub unsafe fn setImportsGraphics(&self, importsGraphics: bool); + } +); +extern_methods!( + #[doc = "NSCellMixedState"] + unsafe impl NSCell { + #[method(allowsMixedState)] + pub unsafe fn allowsMixedState(&self) -> bool; + #[method(setAllowsMixedState:)] + pub unsafe fn setAllowsMixedState(&self, allowsMixedState: bool); + #[method(nextState)] + pub unsafe fn nextState(&self) -> NSInteger; + #[method(setNextState)] + pub unsafe fn setNextState(&self); + } +); +extern_methods!( + #[doc = "NSCellHitTest"] + unsafe impl NSCell { + #[method(hitTestForEvent:inRect:ofView:)] + pub unsafe fn hitTestForEvent_inRect_ofView( + &self, + event: &NSEvent, + cellFrame: NSRect, + controlView: &NSView, + ) -> NSCellHitResult; + } +); +extern_methods!( + #[doc = "NSCellExpansion"] + unsafe impl NSCell { + #[method(expansionFrameWithFrame:inView:)] + pub unsafe fn expansionFrameWithFrame_inView( + &self, + cellFrame: NSRect, + view: &NSView, + ) -> NSRect; + #[method(drawWithExpansionFrame:inView:)] + pub unsafe fn drawWithExpansionFrame_inView(&self, cellFrame: NSRect, view: &NSView); + } +); +extern_methods!( + #[doc = "NSCellBackgroundStyle"] + unsafe impl NSCell { + #[method(backgroundStyle)] + pub unsafe fn backgroundStyle(&self) -> NSBackgroundStyle; + #[method(setBackgroundStyle:)] + pub unsafe fn setBackgroundStyle(&self, backgroundStyle: NSBackgroundStyle); + #[method(interiorBackgroundStyle)] + pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSCell { + #[method(controlTint)] + pub unsafe fn controlTint(&self) -> NSControlTint; + #[method(setControlTint:)] + pub unsafe fn setControlTint(&self, controlTint: NSControlTint); + #[method(entryType)] + pub unsafe fn entryType(&self) -> NSInteger; + #[method(setEntryType:)] + pub unsafe fn setEntryType(&self, type_: NSInteger); + #[method(isEntryAcceptable:)] + pub unsafe fn isEntryAcceptable(&self, string: &NSString) -> bool; + #[method(setFloatingPointFormat:left:right:)] + pub unsafe fn setFloatingPointFormat_left_right( + &self, + autoRange: bool, + leftDigits: NSUInteger, + rightDigits: NSUInteger, + ); + #[method(setMnemonicLocation:)] + pub unsafe fn setMnemonicLocation(&self, location: NSUInteger); + #[method(mnemonicLocation)] + pub unsafe fn mnemonicLocation(&self) -> NSUInteger; + #[method_id(mnemonic)] + pub unsafe fn mnemonic(&self) -> Id; + #[method(setTitleWithMnemonic:)] + pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: &NSString); + } +); +pub type NSCellStateValue = NSControlStateValue; diff --git a/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs new file mode 100644 index 000000000..e41501f73 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs @@ -0,0 +1,30 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSGestureRecognizer::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSClickGestureRecognizer; + unsafe impl ClassType for NSClickGestureRecognizer { + type Super = NSGestureRecognizer; + } +); +extern_methods!( + unsafe impl NSClickGestureRecognizer { + #[method(buttonMask)] + pub unsafe fn buttonMask(&self) -> NSUInteger; + #[method(setButtonMask:)] + pub unsafe fn setButtonMask(&self, buttonMask: NSUInteger); + #[method(numberOfClicksRequired)] + pub unsafe fn numberOfClicksRequired(&self) -> NSInteger; + #[method(setNumberOfClicksRequired:)] + pub unsafe fn setNumberOfClicksRequired(&self, numberOfClicksRequired: NSInteger); + #[method(numberOfTouchesRequired)] + pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger; + #[method(setNumberOfTouchesRequired:)] + pub unsafe fn setNumberOfTouchesRequired(&self, numberOfTouchesRequired: NSInteger); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSClipView.rs b/crates/icrate/src/generated/AppKit/NSClipView.rs new file mode 100644 index 000000000..c5e917f2c --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSClipView.rs @@ -0,0 +1,79 @@ +use super::__exported::NSColor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSClipView; + unsafe impl ClassType for NSClipView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSClipView { + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(drawsBackground)] + pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] + pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(documentView)] + pub unsafe fn documentView(&self) -> Option>; + #[method(setDocumentView:)] + pub unsafe fn setDocumentView(&self, documentView: Option<&NSView>); + #[method(documentRect)] + pub unsafe fn documentRect(&self) -> NSRect; + #[method_id(documentCursor)] + pub unsafe fn documentCursor(&self) -> Option>; + #[method(setDocumentCursor:)] + pub unsafe fn setDocumentCursor(&self, documentCursor: Option<&NSCursor>); + #[method(documentVisibleRect)] + pub unsafe fn documentVisibleRect(&self) -> NSRect; + #[method(viewFrameChanged:)] + pub unsafe fn viewFrameChanged(&self, notification: &NSNotification); + #[method(viewBoundsChanged:)] + pub unsafe fn viewBoundsChanged(&self, notification: &NSNotification); + #[method(autoscroll:)] + pub unsafe fn autoscroll(&self, event: &NSEvent) -> bool; + #[method(scrollToPoint:)] + pub unsafe fn scrollToPoint(&self, newOrigin: NSPoint); + #[method(constrainBoundsRect:)] + pub unsafe fn constrainBoundsRect(&self, proposedBounds: NSRect) -> NSRect; + #[method(contentInsets)] + pub unsafe fn contentInsets(&self) -> NSEdgeInsets; + #[method(setContentInsets:)] + pub unsafe fn setContentInsets(&self, contentInsets: NSEdgeInsets); + #[method(automaticallyAdjustsContentInsets)] + pub unsafe fn automaticallyAdjustsContentInsets(&self) -> bool; + #[method(setAutomaticallyAdjustsContentInsets:)] + pub unsafe fn setAutomaticallyAdjustsContentInsets( + &self, + automaticallyAdjustsContentInsets: bool, + ); + } +); +extern_methods!( + #[doc = "NSClipViewSuperview"] + unsafe impl NSView { + #[method(reflectScrolledClipView:)] + pub unsafe fn reflectScrolledClipView(&self, clipView: &NSClipView); + #[method(scrollClipView:toPoint:)] + pub unsafe fn scrollClipView_toPoint(&self, clipView: &NSClipView, point: NSPoint); + } +); +extern_methods!( + unsafe impl NSClipView { + #[method(constrainScrollPoint:)] + pub unsafe fn constrainScrollPoint(&self, newOrigin: NSPoint) -> NSPoint; + #[method(copiesOnScroll)] + pub unsafe fn copiesOnScroll(&self) -> bool; + #[method(setCopiesOnScroll:)] + pub unsafe fn setCopiesOnScroll(&self, copiesOnScroll: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs new file mode 100644 index 000000000..798a70021 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCollectionView.rs @@ -0,0 +1,363 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSDragging::*; +use crate::AppKit::generated::NSView::*; +use crate::AppKit::generated::NSViewController::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSCollectionViewSupplementaryElementKind = NSString; +use super::__exported::NSButton; +use super::__exported::NSCollectionViewLayout; +use super::__exported::NSCollectionViewLayoutAttributes; +use super::__exported::NSCollectionViewTransitionLayout; +use super::__exported::NSDraggingImageComponent; +use super::__exported::NSImageView; +use super::__exported::NSIndexSet; +use super::__exported::NSMutableIndexSet; +use super::__exported::NSNib; +use super::__exported::NSTextField; +pub type NSCollectionViewElement = NSObject; +pub type NSCollectionViewSectionHeaderView = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewItem; + unsafe impl ClassType for NSCollectionViewItem { + type Super = NSViewController; + } +); +extern_methods!( + unsafe impl NSCollectionViewItem { + #[method_id(collectionView)] + pub unsafe fn collectionView(&self) -> Option>; + #[method(isSelected)] + pub unsafe fn isSelected(&self) -> bool; + #[method(setSelected:)] + pub unsafe fn setSelected(&self, selected: bool); + #[method(highlightState)] + pub unsafe fn highlightState(&self) -> NSCollectionViewItemHighlightState; + #[method(setHighlightState:)] + pub unsafe fn setHighlightState(&self, highlightState: NSCollectionViewItemHighlightState); + #[method_id(imageView)] + pub unsafe fn imageView(&self) -> Option>; + #[method(setImageView:)] + pub unsafe fn setImageView(&self, imageView: Option<&NSImageView>); + #[method_id(textField)] + pub unsafe fn textField(&self) -> Option>; + #[method(setTextField:)] + pub unsafe fn setTextField(&self, textField: Option<&NSTextField>); + #[method_id(draggingImageComponents)] + pub unsafe fn draggingImageComponents( + &self, + ) -> Id, Shared>; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionView; + unsafe impl ClassType for NSCollectionView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSCollectionView { + #[method_id(dataSource)] + pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] + pub unsafe fn setDataSource(&self, dataSource: Option<&NSCollectionViewDataSource>); + #[method_id(prefetchDataSource)] + pub unsafe fn prefetchDataSource(&self) -> Option>; + #[method(setPrefetchDataSource:)] + pub unsafe fn setPrefetchDataSource( + &self, + prefetchDataSource: Option<&NSCollectionViewPrefetching>, + ); + #[method_id(content)] + pub unsafe fn content(&self) -> Id, Shared>; + #[method(setContent:)] + pub unsafe fn setContent(&self, content: &NSArray); + #[method(reloadData)] + pub unsafe fn reloadData(&self); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSCollectionViewDelegate>); + #[method_id(backgroundView)] + pub unsafe fn backgroundView(&self) -> Option>; + #[method(setBackgroundView:)] + pub unsafe fn setBackgroundView(&self, backgroundView: Option<&NSView>); + #[method(backgroundViewScrollsWithContent)] + pub unsafe fn backgroundViewScrollsWithContent(&self) -> bool; + #[method(setBackgroundViewScrollsWithContent:)] + pub unsafe fn setBackgroundViewScrollsWithContent( + &self, + backgroundViewScrollsWithContent: bool, + ); + #[method_id(collectionViewLayout)] + pub unsafe fn collectionViewLayout(&self) -> Option>; + #[method(setCollectionViewLayout:)] + pub unsafe fn setCollectionViewLayout( + &self, + collectionViewLayout: Option<&NSCollectionViewLayout>, + ); + #[method_id(layoutAttributesForItemAtIndexPath:)] + pub unsafe fn layoutAttributesForItemAtIndexPath( + &self, + indexPath: &NSIndexPath, + ) -> Option>; + #[method_id(layoutAttributesForSupplementaryElementOfKind:atIndexPath:)] + pub unsafe fn layoutAttributesForSupplementaryElementOfKind_atIndexPath( + &self, + kind: &NSCollectionViewSupplementaryElementKind, + indexPath: &NSIndexPath, + ) -> Option>; + #[method(frameForItemAtIndex:)] + pub unsafe fn frameForItemAtIndex(&self, index: NSUInteger) -> NSRect; + #[method(frameForItemAtIndex:withNumberOfItems:)] + pub unsafe fn frameForItemAtIndex_withNumberOfItems( + &self, + index: NSUInteger, + numberOfItems: NSUInteger, + ) -> NSRect; + #[method_id(backgroundColors)] + pub unsafe fn backgroundColors(&self) -> Id, Shared>; + #[method(setBackgroundColors:)] + pub unsafe fn setBackgroundColors(&self, backgroundColors: Option<&NSArray>); + #[method(numberOfSections)] + pub unsafe fn numberOfSections(&self) -> NSInteger; + #[method(numberOfItemsInSection:)] + pub unsafe fn numberOfItemsInSection(&self, section: NSInteger) -> NSInteger; + #[method(isFirstResponder)] + pub unsafe fn isFirstResponder(&self) -> bool; + #[method(isSelectable)] + pub unsafe fn isSelectable(&self) -> bool; + #[method(setSelectable:)] + pub unsafe fn setSelectable(&self, selectable: bool); + #[method(allowsEmptySelection)] + pub unsafe fn allowsEmptySelection(&self) -> bool; + #[method(setAllowsEmptySelection:)] + pub unsafe fn setAllowsEmptySelection(&self, allowsEmptySelection: bool); + #[method(allowsMultipleSelection)] + pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[method(setAllowsMultipleSelection:)] + pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool); + #[method_id(selectionIndexes)] + pub unsafe fn selectionIndexes(&self) -> Id; + #[method(setSelectionIndexes:)] + pub unsafe fn setSelectionIndexes(&self, selectionIndexes: &NSIndexSet); + #[method_id(selectionIndexPaths)] + pub unsafe fn selectionIndexPaths(&self) -> Id, Shared>; + #[method(setSelectionIndexPaths:)] + pub unsafe fn setSelectionIndexPaths(&self, selectionIndexPaths: &NSSet); + #[method(selectItemsAtIndexPaths:scrollPosition:)] + pub unsafe fn selectItemsAtIndexPaths_scrollPosition( + &self, + indexPaths: &NSSet, + scrollPosition: NSCollectionViewScrollPosition, + ); + #[method(deselectItemsAtIndexPaths:)] + pub unsafe fn deselectItemsAtIndexPaths(&self, indexPaths: &NSSet); + #[method(selectAll:)] + pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[method(deselectAll:)] + pub unsafe fn deselectAll(&self, sender: Option<&Object>); + #[method(registerClass:forItemWithIdentifier:)] + pub unsafe fn registerClass_forItemWithIdentifier( + &self, + itemClass: Option<&Class>, + identifier: &NSUserInterfaceItemIdentifier, + ); + #[method(registerNib:forItemWithIdentifier:)] + pub unsafe fn registerNib_forItemWithIdentifier( + &self, + nib: Option<&NSNib>, + identifier: &NSUserInterfaceItemIdentifier, + ); + #[method(registerClass:forSupplementaryViewOfKind:withIdentifier:)] + pub unsafe fn registerClass_forSupplementaryViewOfKind_withIdentifier( + &self, + viewClass: Option<&Class>, + kind: &NSCollectionViewSupplementaryElementKind, + identifier: &NSUserInterfaceItemIdentifier, + ); + #[method(registerNib:forSupplementaryViewOfKind:withIdentifier:)] + pub unsafe fn registerNib_forSupplementaryViewOfKind_withIdentifier( + &self, + nib: Option<&NSNib>, + kind: &NSCollectionViewSupplementaryElementKind, + identifier: &NSUserInterfaceItemIdentifier, + ); + #[method_id(makeItemWithIdentifier:forIndexPath:)] + pub unsafe fn makeItemWithIdentifier_forIndexPath( + &self, + identifier: &NSUserInterfaceItemIdentifier, + indexPath: &NSIndexPath, + ) -> Id; + #[method_id(makeSupplementaryViewOfKind:withIdentifier:forIndexPath:)] + pub unsafe fn makeSupplementaryViewOfKind_withIdentifier_forIndexPath( + &self, + elementKind: &NSCollectionViewSupplementaryElementKind, + identifier: &NSUserInterfaceItemIdentifier, + indexPath: &NSIndexPath, + ) -> Id; + #[method_id(itemAtIndex:)] + pub unsafe fn itemAtIndex( + &self, + index: NSUInteger, + ) -> Option>; + #[method_id(itemAtIndexPath:)] + pub unsafe fn itemAtIndexPath( + &self, + indexPath: &NSIndexPath, + ) -> Option>; + #[method_id(visibleItems)] + pub unsafe fn visibleItems(&self) -> Id, Shared>; + #[method_id(indexPathsForVisibleItems)] + pub unsafe fn indexPathsForVisibleItems(&self) -> Id, Shared>; + #[method_id(indexPathForItem:)] + pub unsafe fn indexPathForItem( + &self, + item: &NSCollectionViewItem, + ) -> Option>; + #[method_id(indexPathForItemAtPoint:)] + pub unsafe fn indexPathForItemAtPoint( + &self, + point: NSPoint, + ) -> Option>; + #[method_id(supplementaryViewForElementKind:atIndexPath:)] + pub unsafe fn supplementaryViewForElementKind_atIndexPath( + &self, + elementKind: &NSCollectionViewSupplementaryElementKind, + indexPath: &NSIndexPath, + ) -> Option>; + #[method_id(visibleSupplementaryViewsOfKind:)] + pub unsafe fn visibleSupplementaryViewsOfKind( + &self, + elementKind: &NSCollectionViewSupplementaryElementKind, + ) -> Id, Shared>; + #[method_id(indexPathsForVisibleSupplementaryElementsOfKind:)] + pub unsafe fn indexPathsForVisibleSupplementaryElementsOfKind( + &self, + elementKind: &NSCollectionViewSupplementaryElementKind, + ) -> Id, Shared>; + #[method(insertSections:)] + pub unsafe fn insertSections(&self, sections: &NSIndexSet); + #[method(deleteSections:)] + pub unsafe fn deleteSections(&self, sections: &NSIndexSet); + #[method(reloadSections:)] + pub unsafe fn reloadSections(&self, sections: &NSIndexSet); + #[method(moveSection:toSection:)] + pub unsafe fn moveSection_toSection(&self, section: NSInteger, newSection: NSInteger); + #[method(insertItemsAtIndexPaths:)] + pub unsafe fn insertItemsAtIndexPaths(&self, indexPaths: &NSSet); + #[method(deleteItemsAtIndexPaths:)] + pub unsafe fn deleteItemsAtIndexPaths(&self, indexPaths: &NSSet); + #[method(reloadItemsAtIndexPaths:)] + pub unsafe fn reloadItemsAtIndexPaths(&self, indexPaths: &NSSet); + #[method(moveItemAtIndexPath:toIndexPath:)] + pub unsafe fn moveItemAtIndexPath_toIndexPath( + &self, + indexPath: &NSIndexPath, + newIndexPath: &NSIndexPath, + ); + #[method(performBatchUpdates:completionHandler:)] + pub unsafe fn performBatchUpdates_completionHandler( + &self, + updates: TodoBlock, + completionHandler: TodoBlock, + ); + #[method(toggleSectionCollapse:)] + pub unsafe fn toggleSectionCollapse(&self, sender: &Object); + #[method(scrollToItemsAtIndexPaths:scrollPosition:)] + pub unsafe fn scrollToItemsAtIndexPaths_scrollPosition( + &self, + indexPaths: &NSSet, + scrollPosition: NSCollectionViewScrollPosition, + ); + #[method(setDraggingSourceOperationMask:forLocal:)] + pub unsafe fn setDraggingSourceOperationMask_forLocal( + &self, + dragOperationMask: NSDragOperation, + localDestination: bool, + ); + #[method_id(draggingImageForItemsAtIndexPaths:withEvent:offset:)] + pub unsafe fn draggingImageForItemsAtIndexPaths_withEvent_offset( + &self, + indexPaths: &NSSet, + event: &NSEvent, + dragImageOffset: NSPointPointer, + ) -> Id; + #[method_id(draggingImageForItemsAtIndexes:withEvent:offset:)] + pub unsafe fn draggingImageForItemsAtIndexes_withEvent_offset( + &self, + indexes: &NSIndexSet, + event: &NSEvent, + dragImageOffset: NSPointPointer, + ) -> Id; + } +); +pub type NSCollectionViewDataSource = NSObject; +pub type NSCollectionViewPrefetching = NSObject; +pub type NSCollectionViewDelegate = NSObject; +extern_methods!( + #[doc = "NSCollectionViewAdditions"] + unsafe impl NSIndexPath { + #[method_id(indexPathForItem:inSection:)] + pub unsafe fn indexPathForItem_inSection( + item: NSInteger, + section: NSInteger, + ) -> Id; + #[method(item)] + pub unsafe fn item(&self) -> NSInteger; + #[method(section)] + pub unsafe fn section(&self) -> NSInteger; + } +); +extern_methods!( + #[doc = "NSCollectionViewAdditions"] + unsafe impl NSSet { + #[method_id(setWithCollectionViewIndexPath:)] + pub unsafe fn setWithCollectionViewIndexPath(indexPath: &NSIndexPath) -> Id; + #[method_id(setWithCollectionViewIndexPaths:)] + pub unsafe fn setWithCollectionViewIndexPaths( + indexPaths: &NSArray, + ) -> Id; + #[method(enumerateIndexPathsWithOptions:usingBlock:)] + pub unsafe fn enumerateIndexPathsWithOptions_usingBlock( + &self, + opts: NSEnumerationOptions, + block: TodoBlock, + ); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSCollectionView { + #[method_id(newItemForRepresentedObject:)] + pub unsafe fn newItemForRepresentedObject( + &self, + object: &Object, + ) -> Id; + #[method_id(itemPrototype)] + pub unsafe fn itemPrototype(&self) -> Option>; + #[method(setItemPrototype:)] + pub unsafe fn setItemPrototype(&self, itemPrototype: Option<&NSCollectionViewItem>); + #[method(maxNumberOfRows)] + pub unsafe fn maxNumberOfRows(&self) -> NSUInteger; + #[method(setMaxNumberOfRows:)] + pub unsafe fn setMaxNumberOfRows(&self, maxNumberOfRows: NSUInteger); + #[method(maxNumberOfColumns)] + pub unsafe fn maxNumberOfColumns(&self) -> NSUInteger; + #[method(setMaxNumberOfColumns:)] + pub unsafe fn setMaxNumberOfColumns(&self, maxNumberOfColumns: NSUInteger); + #[method(minItemSize)] + pub unsafe fn minItemSize(&self) -> NSSize; + #[method(setMinItemSize:)] + pub unsafe fn setMinItemSize(&self, minItemSize: NSSize); + #[method(maxItemSize)] + pub unsafe fn maxItemSize(&self) -> NSSize; + #[method(setMaxItemSize:)] + pub unsafe fn setMaxItemSize(&self, maxItemSize: NSSize); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs new file mode 100644 index 000000000..9506b8598 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -0,0 +1,526 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCollectionViewFlowLayout::*; +use crate::AppKit::generated::NSCollectionViewLayout::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewCompositionalLayoutConfiguration; + unsafe impl ClassType for NSCollectionViewCompositionalLayoutConfiguration { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionViewCompositionalLayoutConfiguration { + #[method(scrollDirection)] + pub unsafe fn scrollDirection(&self) -> NSCollectionViewScrollDirection; + #[method(setScrollDirection:)] + pub unsafe fn setScrollDirection(&self, scrollDirection: NSCollectionViewScrollDirection); + #[method(interSectionSpacing)] + pub unsafe fn interSectionSpacing(&self) -> CGFloat; + #[method(setInterSectionSpacing:)] + pub unsafe fn setInterSectionSpacing(&self, interSectionSpacing: CGFloat); + #[method_id(boundarySupplementaryItems)] + pub unsafe fn boundarySupplementaryItems( + &self, + ) -> Id, Shared>; + #[method(setBoundarySupplementaryItems:)] + pub unsafe fn setBoundarySupplementaryItems( + &self, + boundarySupplementaryItems: &NSArray, + ); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewCompositionalLayout; + unsafe impl ClassType for NSCollectionViewCompositionalLayout { + type Super = NSCollectionViewLayout; + } +); +extern_methods!( + unsafe impl NSCollectionViewCompositionalLayout { + #[method_id(initWithSection:)] + pub unsafe fn initWithSection( + &self, + section: &NSCollectionLayoutSection, + ) -> Id; + #[method_id(initWithSection:configuration:)] + pub unsafe fn initWithSection_configuration( + &self, + section: &NSCollectionLayoutSection, + configuration: &NSCollectionViewCompositionalLayoutConfiguration, + ) -> Id; + #[method_id(initWithSectionProvider:)] + pub unsafe fn initWithSectionProvider( + &self, + sectionProvider: NSCollectionViewCompositionalLayoutSectionProvider, + ) -> Id; + #[method_id(initWithSectionProvider:configuration:)] + pub unsafe fn initWithSectionProvider_configuration( + &self, + sectionProvider: NSCollectionViewCompositionalLayoutSectionProvider, + configuration: &NSCollectionViewCompositionalLayoutConfiguration, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method_id(configuration)] + pub unsafe fn configuration( + &self, + ) -> Id; + #[method(setConfiguration:)] + pub unsafe fn setConfiguration( + &self, + configuration: &NSCollectionViewCompositionalLayoutConfiguration, + ); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutSection; + unsafe impl ClassType for NSCollectionLayoutSection { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutSection { + #[method_id(sectionWithGroup:)] + pub unsafe fn sectionWithGroup(group: &NSCollectionLayoutGroup) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method(contentInsets)] + pub unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets; + #[method(setContentInsets:)] + pub unsafe fn setContentInsets(&self, contentInsets: NSDirectionalEdgeInsets); + #[method(interGroupSpacing)] + pub unsafe fn interGroupSpacing(&self) -> CGFloat; + #[method(setInterGroupSpacing:)] + pub unsafe fn setInterGroupSpacing(&self, interGroupSpacing: CGFloat); + #[method(orthogonalScrollingBehavior)] + pub unsafe fn orthogonalScrollingBehavior( + &self, + ) -> NSCollectionLayoutSectionOrthogonalScrollingBehavior; + #[method(setOrthogonalScrollingBehavior:)] + pub unsafe fn setOrthogonalScrollingBehavior( + &self, + orthogonalScrollingBehavior: NSCollectionLayoutSectionOrthogonalScrollingBehavior, + ); + #[method_id(boundarySupplementaryItems)] + pub unsafe fn boundarySupplementaryItems( + &self, + ) -> Id, Shared>; + #[method(setBoundarySupplementaryItems:)] + pub unsafe fn setBoundarySupplementaryItems( + &self, + boundarySupplementaryItems: &NSArray, + ); + #[method(supplementariesFollowContentInsets)] + pub unsafe fn supplementariesFollowContentInsets(&self) -> bool; + #[method(setSupplementariesFollowContentInsets:)] + pub unsafe fn setSupplementariesFollowContentInsets( + &self, + supplementariesFollowContentInsets: bool, + ); + #[method(visibleItemsInvalidationHandler)] + pub unsafe fn visibleItemsInvalidationHandler( + &self, + ) -> NSCollectionLayoutSectionVisibleItemsInvalidationHandler; + #[method(setVisibleItemsInvalidationHandler:)] + pub unsafe fn setVisibleItemsInvalidationHandler( + &self, + visibleItemsInvalidationHandler : NSCollectionLayoutSectionVisibleItemsInvalidationHandler, + ); + #[method_id(decorationItems)] + pub unsafe fn decorationItems( + &self, + ) -> Id, Shared>; + #[method(setDecorationItems:)] + pub unsafe fn setDecorationItems( + &self, + decorationItems: &NSArray, + ); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutItem; + unsafe impl ClassType for NSCollectionLayoutItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutItem { + #[method_id(itemWithLayoutSize:)] + pub unsafe fn itemWithLayoutSize(layoutSize: &NSCollectionLayoutSize) -> Id; + #[method_id(itemWithLayoutSize:supplementaryItems:)] + pub unsafe fn itemWithLayoutSize_supplementaryItems( + layoutSize: &NSCollectionLayoutSize, + supplementaryItems: &NSArray, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method(contentInsets)] + pub unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets; + #[method(setContentInsets:)] + pub unsafe fn setContentInsets(&self, contentInsets: NSDirectionalEdgeInsets); + #[method_id(edgeSpacing)] + pub unsafe fn edgeSpacing(&self) -> Option>; + #[method(setEdgeSpacing:)] + pub unsafe fn setEdgeSpacing(&self, edgeSpacing: Option<&NSCollectionLayoutEdgeSpacing>); + #[method_id(layoutSize)] + pub unsafe fn layoutSize(&self) -> Id; + #[method_id(supplementaryItems)] + pub unsafe fn supplementaryItems( + &self, + ) -> Id, Shared>; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutGroupCustomItem; + unsafe impl ClassType for NSCollectionLayoutGroupCustomItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutGroupCustomItem { + #[method_id(customItemWithFrame:)] + pub unsafe fn customItemWithFrame(frame: NSRect) -> Id; + #[method_id(customItemWithFrame:zIndex:)] + pub unsafe fn customItemWithFrame_zIndex( + frame: NSRect, + zIndex: NSInteger, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method(frame)] + pub unsafe fn frame(&self) -> NSRect; + #[method(zIndex)] + pub unsafe fn zIndex(&self) -> NSInteger; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutGroup; + unsafe impl ClassType for NSCollectionLayoutGroup { + type Super = NSCollectionLayoutItem; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutGroup { + #[method_id(horizontalGroupWithLayoutSize:subitem:count:)] + pub unsafe fn horizontalGroupWithLayoutSize_subitem_count( + layoutSize: &NSCollectionLayoutSize, + subitem: &NSCollectionLayoutItem, + count: NSInteger, + ) -> Id; + #[method_id(horizontalGroupWithLayoutSize:subitems:)] + pub unsafe fn horizontalGroupWithLayoutSize_subitems( + layoutSize: &NSCollectionLayoutSize, + subitems: &NSArray, + ) -> Id; + #[method_id(verticalGroupWithLayoutSize:subitem:count:)] + pub unsafe fn verticalGroupWithLayoutSize_subitem_count( + layoutSize: &NSCollectionLayoutSize, + subitem: &NSCollectionLayoutItem, + count: NSInteger, + ) -> Id; + #[method_id(verticalGroupWithLayoutSize:subitems:)] + pub unsafe fn verticalGroupWithLayoutSize_subitems( + layoutSize: &NSCollectionLayoutSize, + subitems: &NSArray, + ) -> Id; + #[method_id(customGroupWithLayoutSize:itemProvider:)] + pub unsafe fn customGroupWithLayoutSize_itemProvider( + layoutSize: &NSCollectionLayoutSize, + itemProvider: NSCollectionLayoutGroupCustomItemProvider, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method_id(supplementaryItems)] + pub unsafe fn supplementaryItems( + &self, + ) -> Id, Shared>; + #[method(setSupplementaryItems:)] + pub unsafe fn setSupplementaryItems( + &self, + supplementaryItems: &NSArray, + ); + #[method_id(interItemSpacing)] + pub unsafe fn interItemSpacing(&self) -> Option>; + #[method(setInterItemSpacing:)] + pub unsafe fn setInterItemSpacing( + &self, + interItemSpacing: Option<&NSCollectionLayoutSpacing>, + ); + #[method_id(subitems)] + pub unsafe fn subitems(&self) -> Id, Shared>; + #[method_id(visualDescription)] + pub unsafe fn visualDescription(&self) -> Id; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutDimension; + unsafe impl ClassType for NSCollectionLayoutDimension { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutDimension { + #[method_id(fractionalWidthDimension:)] + pub unsafe fn fractionalWidthDimension(fractionalWidth: CGFloat) -> Id; + #[method_id(fractionalHeightDimension:)] + pub unsafe fn fractionalHeightDimension(fractionalHeight: CGFloat) -> Id; + #[method_id(absoluteDimension:)] + pub unsafe fn absoluteDimension(absoluteDimension: CGFloat) -> Id; + #[method_id(estimatedDimension:)] + pub unsafe fn estimatedDimension(estimatedDimension: CGFloat) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method(isFractionalWidth)] + pub unsafe fn isFractionalWidth(&self) -> bool; + #[method(isFractionalHeight)] + pub unsafe fn isFractionalHeight(&self) -> bool; + #[method(isAbsolute)] + pub unsafe fn isAbsolute(&self) -> bool; + #[method(isEstimated)] + pub unsafe fn isEstimated(&self) -> bool; + #[method(dimension)] + pub unsafe fn dimension(&self) -> CGFloat; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutSize; + unsafe impl ClassType for NSCollectionLayoutSize { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutSize { + #[method_id(sizeWithWidthDimension:heightDimension:)] + pub unsafe fn sizeWithWidthDimension_heightDimension( + width: &NSCollectionLayoutDimension, + height: &NSCollectionLayoutDimension, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method_id(widthDimension)] + pub unsafe fn widthDimension(&self) -> Id; + #[method_id(heightDimension)] + pub unsafe fn heightDimension(&self) -> Id; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutSpacing; + unsafe impl ClassType for NSCollectionLayoutSpacing { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutSpacing { + #[method_id(flexibleSpacing:)] + pub unsafe fn flexibleSpacing(flexibleSpacing: CGFloat) -> Id; + #[method_id(fixedSpacing:)] + pub unsafe fn fixedSpacing(fixedSpacing: CGFloat) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method(spacing)] + pub unsafe fn spacing(&self) -> CGFloat; + #[method(isFlexibleSpacing)] + pub unsafe fn isFlexibleSpacing(&self) -> bool; + #[method(isFixedSpacing)] + pub unsafe fn isFixedSpacing(&self) -> bool; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutEdgeSpacing; + unsafe impl ClassType for NSCollectionLayoutEdgeSpacing { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutEdgeSpacing { + #[method_id(spacingForLeading:top:trailing:bottom:)] + pub unsafe fn spacingForLeading_top_trailing_bottom( + leading: Option<&NSCollectionLayoutSpacing>, + top: Option<&NSCollectionLayoutSpacing>, + trailing: Option<&NSCollectionLayoutSpacing>, + bottom: Option<&NSCollectionLayoutSpacing>, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method_id(leading)] + pub unsafe fn leading(&self) -> Option>; + #[method_id(top)] + pub unsafe fn top(&self) -> Option>; + #[method_id(trailing)] + pub unsafe fn trailing(&self) -> Option>; + #[method_id(bottom)] + pub unsafe fn bottom(&self) -> Option>; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutSupplementaryItem; + unsafe impl ClassType for NSCollectionLayoutSupplementaryItem { + type Super = NSCollectionLayoutItem; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutSupplementaryItem { + #[method_id(supplementaryItemWithLayoutSize:elementKind:containerAnchor:)] + pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor( + layoutSize: &NSCollectionLayoutSize, + elementKind: &NSString, + containerAnchor: &NSCollectionLayoutAnchor, + ) -> Id; + #[method_id(supplementaryItemWithLayoutSize:elementKind:containerAnchor:itemAnchor:)] + pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor_itemAnchor( + layoutSize: &NSCollectionLayoutSize, + elementKind: &NSString, + containerAnchor: &NSCollectionLayoutAnchor, + itemAnchor: &NSCollectionLayoutAnchor, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method(zIndex)] + pub unsafe fn zIndex(&self) -> NSInteger; + #[method(setZIndex:)] + pub unsafe fn setZIndex(&self, zIndex: NSInteger); + #[method_id(elementKind)] + pub unsafe fn elementKind(&self) -> Id; + #[method_id(containerAnchor)] + pub unsafe fn containerAnchor(&self) -> Id; + #[method_id(itemAnchor)] + pub unsafe fn itemAnchor(&self) -> Option>; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutBoundarySupplementaryItem; + unsafe impl ClassType for NSCollectionLayoutBoundarySupplementaryItem { + type Super = NSCollectionLayoutSupplementaryItem; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutBoundarySupplementaryItem { + #[method_id(boundarySupplementaryItemWithLayoutSize:elementKind:alignment:)] + pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment( + layoutSize: &NSCollectionLayoutSize, + elementKind: &NSString, + alignment: NSRectAlignment, + ) -> Id; + #[method_id(boundarySupplementaryItemWithLayoutSize:elementKind:alignment:absoluteOffset:)] + pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment_absoluteOffset( + layoutSize: &NSCollectionLayoutSize, + elementKind: &NSString, + alignment: NSRectAlignment, + absoluteOffset: NSPoint, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method(extendsBoundary)] + pub unsafe fn extendsBoundary(&self) -> bool; + #[method(setExtendsBoundary:)] + pub unsafe fn setExtendsBoundary(&self, extendsBoundary: bool); + #[method(pinToVisibleBounds)] + pub unsafe fn pinToVisibleBounds(&self) -> bool; + #[method(setPinToVisibleBounds:)] + pub unsafe fn setPinToVisibleBounds(&self, pinToVisibleBounds: bool); + #[method(alignment)] + pub unsafe fn alignment(&self) -> NSRectAlignment; + #[method(offset)] + pub unsafe fn offset(&self) -> NSPoint; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutDecorationItem; + unsafe impl ClassType for NSCollectionLayoutDecorationItem { + type Super = NSCollectionLayoutItem; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutDecorationItem { + #[method_id(backgroundDecorationItemWithElementKind:)] + pub unsafe fn backgroundDecorationItemWithElementKind( + elementKind: &NSString, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method(zIndex)] + pub unsafe fn zIndex(&self) -> NSInteger; + #[method(setZIndex:)] + pub unsafe fn setZIndex(&self, zIndex: NSInteger); + #[method_id(elementKind)] + pub unsafe fn elementKind(&self) -> Id; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionLayoutAnchor; + unsafe impl ClassType for NSCollectionLayoutAnchor { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionLayoutAnchor { + #[method_id(layoutAnchorWithEdges:)] + pub unsafe fn layoutAnchorWithEdges(edges: NSDirectionalRectEdge) -> Id; + #[method_id(layoutAnchorWithEdges:absoluteOffset:)] + pub unsafe fn layoutAnchorWithEdges_absoluteOffset( + edges: NSDirectionalRectEdge, + absoluteOffset: NSPoint, + ) -> Id; + #[method_id(layoutAnchorWithEdges:fractionalOffset:)] + pub unsafe fn layoutAnchorWithEdges_fractionalOffset( + edges: NSDirectionalRectEdge, + fractionalOffset: NSPoint, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method(edges)] + pub unsafe fn edges(&self) -> NSDirectionalRectEdge; + #[method(offset)] + pub unsafe fn offset(&self) -> NSPoint; + #[method(isAbsoluteOffset)] + pub unsafe fn isAbsoluteOffset(&self) -> bool; + #[method(isFractionalOffset)] + pub unsafe fn isFractionalOffset(&self) -> bool; + } +); +pub type NSCollectionLayoutContainer = NSObject; +pub type NSCollectionLayoutEnvironment = NSObject; +pub type NSCollectionLayoutVisibleItem = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs new file mode 100644 index 000000000..5d5196ebb --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs @@ -0,0 +1,96 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCollectionView::*; +use crate::AppKit::generated::NSCollectionViewLayout::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewFlowLayoutInvalidationContext; + unsafe impl ClassType for NSCollectionViewFlowLayoutInvalidationContext { + type Super = NSCollectionViewLayoutInvalidationContext; + } +); +extern_methods!( + unsafe impl NSCollectionViewFlowLayoutInvalidationContext { + #[method(invalidateFlowLayoutDelegateMetrics)] + pub unsafe fn invalidateFlowLayoutDelegateMetrics(&self) -> bool; + #[method(setInvalidateFlowLayoutDelegateMetrics:)] + pub unsafe fn setInvalidateFlowLayoutDelegateMetrics( + &self, + invalidateFlowLayoutDelegateMetrics: bool, + ); + #[method(invalidateFlowLayoutAttributes)] + pub unsafe fn invalidateFlowLayoutAttributes(&self) -> bool; + #[method(setInvalidateFlowLayoutAttributes:)] + pub unsafe fn setInvalidateFlowLayoutAttributes( + &self, + invalidateFlowLayoutAttributes: bool, + ); + } +); +pub type NSCollectionViewDelegateFlowLayout = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewFlowLayout; + unsafe impl ClassType for NSCollectionViewFlowLayout { + type Super = NSCollectionViewLayout; + } +); +extern_methods!( + unsafe impl NSCollectionViewFlowLayout { + #[method(minimumLineSpacing)] + pub unsafe fn minimumLineSpacing(&self) -> CGFloat; + #[method(setMinimumLineSpacing:)] + pub unsafe fn setMinimumLineSpacing(&self, minimumLineSpacing: CGFloat); + #[method(minimumInteritemSpacing)] + pub unsafe fn minimumInteritemSpacing(&self) -> CGFloat; + #[method(setMinimumInteritemSpacing:)] + pub unsafe fn setMinimumInteritemSpacing(&self, minimumInteritemSpacing: CGFloat); + #[method(itemSize)] + pub unsafe fn itemSize(&self) -> NSSize; + #[method(setItemSize:)] + pub unsafe fn setItemSize(&self, itemSize: NSSize); + #[method(estimatedItemSize)] + pub unsafe fn estimatedItemSize(&self) -> NSSize; + #[method(setEstimatedItemSize:)] + pub unsafe fn setEstimatedItemSize(&self, estimatedItemSize: NSSize); + #[method(scrollDirection)] + pub unsafe fn scrollDirection(&self) -> NSCollectionViewScrollDirection; + #[method(setScrollDirection:)] + pub unsafe fn setScrollDirection(&self, scrollDirection: NSCollectionViewScrollDirection); + #[method(headerReferenceSize)] + pub unsafe fn headerReferenceSize(&self) -> NSSize; + #[method(setHeaderReferenceSize:)] + pub unsafe fn setHeaderReferenceSize(&self, headerReferenceSize: NSSize); + #[method(footerReferenceSize)] + pub unsafe fn footerReferenceSize(&self) -> NSSize; + #[method(setFooterReferenceSize:)] + pub unsafe fn setFooterReferenceSize(&self, footerReferenceSize: NSSize); + #[method(sectionInset)] + pub unsafe fn sectionInset(&self) -> NSEdgeInsets; + #[method(setSectionInset:)] + pub unsafe fn setSectionInset(&self, sectionInset: NSEdgeInsets); + #[method(sectionHeadersPinToVisibleBounds)] + pub unsafe fn sectionHeadersPinToVisibleBounds(&self) -> bool; + #[method(setSectionHeadersPinToVisibleBounds:)] + pub unsafe fn setSectionHeadersPinToVisibleBounds( + &self, + sectionHeadersPinToVisibleBounds: bool, + ); + #[method(sectionFootersPinToVisibleBounds)] + pub unsafe fn sectionFootersPinToVisibleBounds(&self) -> bool; + #[method(setSectionFootersPinToVisibleBounds:)] + pub unsafe fn setSectionFootersPinToVisibleBounds( + &self, + sectionFootersPinToVisibleBounds: bool, + ); + #[method(sectionAtIndexIsCollapsed:)] + pub unsafe fn sectionAtIndexIsCollapsed(&self, sectionIndex: NSUInteger) -> bool; + #[method(collapseSectionAtIndex:)] + pub unsafe fn collapseSectionAtIndex(&self, sectionIndex: NSUInteger); + #[method(expandSectionAtIndex:)] + pub unsafe fn expandSectionAtIndex(&self, sectionIndex: NSUInteger); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs new file mode 100644 index 000000000..2a767be5e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs @@ -0,0 +1,50 @@ +use super::__exported::NSColor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCollectionViewLayout::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewGridLayout; + unsafe impl ClassType for NSCollectionViewGridLayout { + type Super = NSCollectionViewLayout; + } +); +extern_methods!( + unsafe impl NSCollectionViewGridLayout { + #[method(margins)] + pub unsafe fn margins(&self) -> NSEdgeInsets; + #[method(setMargins:)] + pub unsafe fn setMargins(&self, margins: NSEdgeInsets); + #[method(minimumInteritemSpacing)] + pub unsafe fn minimumInteritemSpacing(&self) -> CGFloat; + #[method(setMinimumInteritemSpacing:)] + pub unsafe fn setMinimumInteritemSpacing(&self, minimumInteritemSpacing: CGFloat); + #[method(minimumLineSpacing)] + pub unsafe fn minimumLineSpacing(&self) -> CGFloat; + #[method(setMinimumLineSpacing:)] + pub unsafe fn setMinimumLineSpacing(&self, minimumLineSpacing: CGFloat); + #[method(maximumNumberOfRows)] + pub unsafe fn maximumNumberOfRows(&self) -> NSUInteger; + #[method(setMaximumNumberOfRows:)] + pub unsafe fn setMaximumNumberOfRows(&self, maximumNumberOfRows: NSUInteger); + #[method(maximumNumberOfColumns)] + pub unsafe fn maximumNumberOfColumns(&self) -> NSUInteger; + #[method(setMaximumNumberOfColumns:)] + pub unsafe fn setMaximumNumberOfColumns(&self, maximumNumberOfColumns: NSUInteger); + #[method(minimumItemSize)] + pub unsafe fn minimumItemSize(&self) -> NSSize; + #[method(setMinimumItemSize:)] + pub unsafe fn setMinimumItemSize(&self, minimumItemSize: NSSize); + #[method(maximumItemSize)] + pub unsafe fn maximumItemSize(&self) -> NSSize; + #[method(setMaximumItemSize:)] + pub unsafe fn setMaximumItemSize(&self, maximumItemSize: NSSize); + #[method_id(backgroundColors)] + pub unsafe fn backgroundColors(&self) -> Id, Shared>; + #[method(setBackgroundColors:)] + pub unsafe fn setBackgroundColors(&self, backgroundColors: Option<&NSArray>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs new file mode 100644 index 000000000..966c108b2 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -0,0 +1,321 @@ +use super::__exported::NSIndexPath; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCollectionView::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSCollectionViewDecorationElementKind = NSString; +use super::__exported::NSCollectionView; +use super::__exported::NSNib; +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewLayoutAttributes; + unsafe impl ClassType for NSCollectionViewLayoutAttributes { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionViewLayoutAttributes { + #[method(frame)] + pub unsafe fn frame(&self) -> NSRect; + #[method(setFrame:)] + pub unsafe fn setFrame(&self, frame: NSRect); + #[method(size)] + pub unsafe fn size(&self) -> NSSize; + #[method(setSize:)] + pub unsafe fn setSize(&self, size: NSSize); + #[method(alpha)] + pub unsafe fn alpha(&self) -> CGFloat; + #[method(setAlpha:)] + pub unsafe fn setAlpha(&self, alpha: CGFloat); + #[method(zIndex)] + pub unsafe fn zIndex(&self) -> NSInteger; + #[method(setZIndex:)] + pub unsafe fn setZIndex(&self, zIndex: NSInteger); + #[method(isHidden)] + pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool); + #[method_id(indexPath)] + pub unsafe fn indexPath(&self) -> Option>; + #[method(setIndexPath:)] + pub unsafe fn setIndexPath(&self, indexPath: Option<&NSIndexPath>); + #[method(representedElementCategory)] + pub unsafe fn representedElementCategory(&self) -> NSCollectionElementCategory; + #[method_id(representedElementKind)] + pub unsafe fn representedElementKind(&self) -> Option>; + #[method_id(layoutAttributesForItemWithIndexPath:)] + pub unsafe fn layoutAttributesForItemWithIndexPath( + indexPath: &NSIndexPath, + ) -> Id; + #[method_id(layoutAttributesForInterItemGapBeforeIndexPath:)] + pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath( + indexPath: &NSIndexPath, + ) -> Id; + #[method_id(layoutAttributesForSupplementaryViewOfKind:withIndexPath:)] + pub unsafe fn layoutAttributesForSupplementaryViewOfKind_withIndexPath( + elementKind: &NSCollectionViewSupplementaryElementKind, + indexPath: &NSIndexPath, + ) -> Id; + #[method_id(layoutAttributesForDecorationViewOfKind:withIndexPath:)] + pub unsafe fn layoutAttributesForDecorationViewOfKind_withIndexPath( + decorationViewKind: &NSCollectionViewDecorationElementKind, + indexPath: &NSIndexPath, + ) -> Id; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewUpdateItem; + unsafe impl ClassType for NSCollectionViewUpdateItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionViewUpdateItem { + #[method_id(indexPathBeforeUpdate)] + pub unsafe fn indexPathBeforeUpdate(&self) -> Option>; + #[method_id(indexPathAfterUpdate)] + pub unsafe fn indexPathAfterUpdate(&self) -> Option>; + #[method(updateAction)] + pub unsafe fn updateAction(&self) -> NSCollectionUpdateAction; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewLayoutInvalidationContext; + unsafe impl ClassType for NSCollectionViewLayoutInvalidationContext { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionViewLayoutInvalidationContext { + #[method(invalidateEverything)] + pub unsafe fn invalidateEverything(&self) -> bool; + #[method(invalidateDataSourceCounts)] + pub unsafe fn invalidateDataSourceCounts(&self) -> bool; + #[method(invalidateItemsAtIndexPaths:)] + pub unsafe fn invalidateItemsAtIndexPaths(&self, indexPaths: &NSSet); + #[method(invalidateSupplementaryElementsOfKind:atIndexPaths:)] + pub unsafe fn invalidateSupplementaryElementsOfKind_atIndexPaths( + &self, + elementKind: &NSCollectionViewSupplementaryElementKind, + indexPaths: &NSSet, + ); + #[method(invalidateDecorationElementsOfKind:atIndexPaths:)] + pub unsafe fn invalidateDecorationElementsOfKind_atIndexPaths( + &self, + elementKind: &NSCollectionViewDecorationElementKind, + indexPaths: &NSSet, + ); + #[method_id(invalidatedItemIndexPaths)] + pub unsafe fn invalidatedItemIndexPaths(&self) -> Option, Shared>>; + #[method_id(invalidatedSupplementaryIndexPaths)] + pub unsafe fn invalidatedSupplementaryIndexPaths( + &self, + ) -> Option< + Id>, Shared>, + >; + #[method_id(invalidatedDecorationIndexPaths)] + pub unsafe fn invalidatedDecorationIndexPaths( + &self, + ) -> Option< + Id>, Shared>, + >; + #[method(contentOffsetAdjustment)] + pub unsafe fn contentOffsetAdjustment(&self) -> NSPoint; + #[method(setContentOffsetAdjustment:)] + pub unsafe fn setContentOffsetAdjustment(&self, contentOffsetAdjustment: NSPoint); + #[method(contentSizeAdjustment)] + pub unsafe fn contentSizeAdjustment(&self) -> NSSize; + #[method(setContentSizeAdjustment:)] + pub unsafe fn setContentSizeAdjustment(&self, contentSizeAdjustment: NSSize); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewLayout; + unsafe impl ClassType for NSCollectionViewLayout { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCollectionViewLayout { + #[method_id(collectionView)] + pub unsafe fn collectionView(&self) -> Option>; + #[method(invalidateLayout)] + pub unsafe fn invalidateLayout(&self); + #[method(invalidateLayoutWithContext:)] + pub unsafe fn invalidateLayoutWithContext( + &self, + context: &NSCollectionViewLayoutInvalidationContext, + ); + #[method(registerClass:forDecorationViewOfKind:)] + pub unsafe fn registerClass_forDecorationViewOfKind( + &self, + viewClass: Option<&Class>, + elementKind: &NSCollectionViewDecorationElementKind, + ); + #[method(registerNib:forDecorationViewOfKind:)] + pub unsafe fn registerNib_forDecorationViewOfKind( + &self, + nib: Option<&NSNib>, + elementKind: &NSCollectionViewDecorationElementKind, + ); + } +); +extern_methods!( + #[doc = "NSSubclassingHooks"] + unsafe impl NSCollectionViewLayout { + #[method(layoutAttributesClass)] + pub unsafe fn layoutAttributesClass() -> &Class; + #[method(invalidationContextClass)] + pub unsafe fn invalidationContextClass() -> &Class; + #[method(prepareLayout)] + pub unsafe fn prepareLayout(&self); + #[method_id(layoutAttributesForElementsInRect:)] + pub unsafe fn layoutAttributesForElementsInRect( + &self, + rect: NSRect, + ) -> Id, Shared>; + #[method_id(layoutAttributesForItemAtIndexPath:)] + pub unsafe fn layoutAttributesForItemAtIndexPath( + &self, + indexPath: &NSIndexPath, + ) -> Option>; + #[method_id(layoutAttributesForSupplementaryViewOfKind:atIndexPath:)] + pub unsafe fn layoutAttributesForSupplementaryViewOfKind_atIndexPath( + &self, + elementKind: &NSCollectionViewSupplementaryElementKind, + indexPath: &NSIndexPath, + ) -> Option>; + #[method_id(layoutAttributesForDecorationViewOfKind:atIndexPath:)] + pub unsafe fn layoutAttributesForDecorationViewOfKind_atIndexPath( + &self, + elementKind: &NSCollectionViewDecorationElementKind, + indexPath: &NSIndexPath, + ) -> Option>; + #[method_id(layoutAttributesForDropTargetAtPoint:)] + pub unsafe fn layoutAttributesForDropTargetAtPoint( + &self, + pointInCollectionView: NSPoint, + ) -> Option>; + #[method_id(layoutAttributesForInterItemGapBeforeIndexPath:)] + pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath( + &self, + indexPath: &NSIndexPath, + ) -> Option>; + #[method(shouldInvalidateLayoutForBoundsChange:)] + pub unsafe fn shouldInvalidateLayoutForBoundsChange(&self, newBounds: NSRect) -> bool; + #[method_id(invalidationContextForBoundsChange:)] + pub unsafe fn invalidationContextForBoundsChange( + &self, + newBounds: NSRect, + ) -> Id; + #[method(shouldInvalidateLayoutForPreferredLayoutAttributes:withOriginalAttributes:)] + pub unsafe fn shouldInvalidateLayoutForPreferredLayoutAttributes_withOriginalAttributes( + &self, + preferredAttributes: &NSCollectionViewLayoutAttributes, + originalAttributes: &NSCollectionViewLayoutAttributes, + ) -> bool; + #[method_id(invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:)] + pub unsafe fn invalidationContextForPreferredLayoutAttributes_withOriginalAttributes( + &self, + preferredAttributes: &NSCollectionViewLayoutAttributes, + originalAttributes: &NSCollectionViewLayoutAttributes, + ) -> Id; + #[method(targetContentOffsetForProposedContentOffset:withScrollingVelocity:)] + pub unsafe fn targetContentOffsetForProposedContentOffset_withScrollingVelocity( + &self, + proposedContentOffset: NSPoint, + velocity: NSPoint, + ) -> NSPoint; + #[method(targetContentOffsetForProposedContentOffset:)] + pub unsafe fn targetContentOffsetForProposedContentOffset( + &self, + proposedContentOffset: NSPoint, + ) -> NSPoint; + #[method(collectionViewContentSize)] + pub unsafe fn collectionViewContentSize(&self) -> NSSize; + } +); +extern_methods!( + #[doc = "NSUpdateSupportHooks"] + unsafe impl NSCollectionViewLayout { + #[method(prepareForCollectionViewUpdates:)] + pub unsafe fn prepareForCollectionViewUpdates( + &self, + updateItems: &NSArray, + ); + #[method(finalizeCollectionViewUpdates)] + pub unsafe fn finalizeCollectionViewUpdates(&self); + #[method(prepareForAnimatedBoundsChange:)] + pub unsafe fn prepareForAnimatedBoundsChange(&self, oldBounds: NSRect); + #[method(finalizeAnimatedBoundsChange)] + pub unsafe fn finalizeAnimatedBoundsChange(&self); + #[method(prepareForTransitionToLayout:)] + pub unsafe fn prepareForTransitionToLayout(&self, newLayout: &NSCollectionViewLayout); + #[method(prepareForTransitionFromLayout:)] + pub unsafe fn prepareForTransitionFromLayout(&self, oldLayout: &NSCollectionViewLayout); + #[method(finalizeLayoutTransition)] + pub unsafe fn finalizeLayoutTransition(&self); + #[method_id(initialLayoutAttributesForAppearingItemAtIndexPath:)] + pub unsafe fn initialLayoutAttributesForAppearingItemAtIndexPath( + &self, + itemIndexPath: &NSIndexPath, + ) -> Option>; + #[method_id(finalLayoutAttributesForDisappearingItemAtIndexPath:)] + pub unsafe fn finalLayoutAttributesForDisappearingItemAtIndexPath( + &self, + itemIndexPath: &NSIndexPath, + ) -> Option>; + #[method_id(initialLayoutAttributesForAppearingSupplementaryElementOfKind:atIndexPath:)] + pub unsafe fn initialLayoutAttributesForAppearingSupplementaryElementOfKind_atIndexPath( + &self, + elementKind: &NSCollectionViewSupplementaryElementKind, + elementIndexPath: &NSIndexPath, + ) -> Option>; + #[method_id(finalLayoutAttributesForDisappearingSupplementaryElementOfKind:atIndexPath:)] + pub unsafe fn finalLayoutAttributesForDisappearingSupplementaryElementOfKind_atIndexPath( + &self, + elementKind: &NSCollectionViewSupplementaryElementKind, + elementIndexPath: &NSIndexPath, + ) -> Option>; + #[method_id(initialLayoutAttributesForAppearingDecorationElementOfKind:atIndexPath:)] + pub unsafe fn initialLayoutAttributesForAppearingDecorationElementOfKind_atIndexPath( + &self, + elementKind: &NSCollectionViewDecorationElementKind, + decorationIndexPath: &NSIndexPath, + ) -> Option>; + #[method_id(finalLayoutAttributesForDisappearingDecorationElementOfKind:atIndexPath:)] + pub unsafe fn finalLayoutAttributesForDisappearingDecorationElementOfKind_atIndexPath( + &self, + elementKind: &NSCollectionViewDecorationElementKind, + decorationIndexPath: &NSIndexPath, + ) -> Option>; + #[method_id(indexPathsToDeleteForSupplementaryViewOfKind:)] + pub unsafe fn indexPathsToDeleteForSupplementaryViewOfKind( + &self, + elementKind: &NSCollectionViewSupplementaryElementKind, + ) -> Id, Shared>; + #[method_id(indexPathsToDeleteForDecorationViewOfKind:)] + pub unsafe fn indexPathsToDeleteForDecorationViewOfKind( + &self, + elementKind: &NSCollectionViewDecorationElementKind, + ) -> Id, Shared>; + #[method_id(indexPathsToInsertForSupplementaryViewOfKind:)] + pub unsafe fn indexPathsToInsertForSupplementaryViewOfKind( + &self, + elementKind: &NSCollectionViewSupplementaryElementKind, + ) -> Id, Shared>; + #[method_id(indexPathsToInsertForDecorationViewOfKind:)] + pub unsafe fn indexPathsToInsertForDecorationViewOfKind( + &self, + elementKind: &NSCollectionViewDecorationElementKind, + ) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs new file mode 100644 index 000000000..3e9c9a722 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs @@ -0,0 +1,43 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCollectionViewLayout::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSCollectionViewTransitionLayoutAnimatedKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewTransitionLayout; + unsafe impl ClassType for NSCollectionViewTransitionLayout { + type Super = NSCollectionViewLayout; + } +); +extern_methods!( + unsafe impl NSCollectionViewTransitionLayout { + #[method(transitionProgress)] + pub unsafe fn transitionProgress(&self) -> CGFloat; + #[method(setTransitionProgress:)] + pub unsafe fn setTransitionProgress(&self, transitionProgress: CGFloat); + #[method_id(currentLayout)] + pub unsafe fn currentLayout(&self) -> Id; + #[method_id(nextLayout)] + pub unsafe fn nextLayout(&self) -> Id; + #[method_id(initWithCurrentLayout:nextLayout:)] + pub unsafe fn initWithCurrentLayout_nextLayout( + &self, + currentLayout: &NSCollectionViewLayout, + newLayout: &NSCollectionViewLayout, + ) -> Id; + #[method(updateValue:forAnimatedKey:)] + pub unsafe fn updateValue_forAnimatedKey( + &self, + value: CGFloat, + key: &NSCollectionViewTransitionLayoutAnimatedKey, + ); + #[method(valueForAnimatedKey:)] + pub unsafe fn valueForAnimatedKey( + &self, + key: &NSCollectionViewTransitionLayoutAnimatedKey, + ) -> CGFloat; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs new file mode 100644 index 000000000..a643b9472 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -0,0 +1,456 @@ +use super::__exported::NSAppearance; +use super::__exported::NSColorSpace; +use super::__exported::NSImage; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSColorList::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::CoreImage::generated::CIColor::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSColor; + unsafe impl ClassType for NSColor { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSColor { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(colorWithColorSpace:components:count:)] + pub unsafe fn colorWithColorSpace_components_count( + space: &NSColorSpace, + components: NonNull, + numberOfComponents: NSInteger, + ) -> Id; + #[method_id(colorWithSRGBRed:green:blue:alpha:)] + pub unsafe fn colorWithSRGBRed_green_blue_alpha( + red: CGFloat, + green: CGFloat, + blue: CGFloat, + alpha: CGFloat, + ) -> Id; + # [method_id (colorWithGenericGamma22White : alpha :)] + pub unsafe fn colorWithGenericGamma22White_alpha( + white: CGFloat, + alpha: CGFloat, + ) -> Id; + # [method_id (colorWithDisplayP3Red : green : blue : alpha :)] + pub unsafe fn colorWithDisplayP3Red_green_blue_alpha( + red: CGFloat, + green: CGFloat, + blue: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithWhite:alpha:)] + pub unsafe fn colorWithWhite_alpha(white: CGFloat, alpha: CGFloat) -> Id; + #[method_id(colorWithRed:green:blue:alpha:)] + pub unsafe fn colorWithRed_green_blue_alpha( + red: CGFloat, + green: CGFloat, + blue: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithHue:saturation:brightness:alpha:)] + pub unsafe fn colorWithHue_saturation_brightness_alpha( + hue: CGFloat, + saturation: CGFloat, + brightness: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithColorSpace:hue:saturation:brightness:alpha:)] + pub unsafe fn colorWithColorSpace_hue_saturation_brightness_alpha( + space: &NSColorSpace, + hue: CGFloat, + saturation: CGFloat, + brightness: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithCatalogName:colorName:)] + pub unsafe fn colorWithCatalogName_colorName( + listName: &NSColorListName, + colorName: &NSColorName, + ) -> Option>; + #[method_id(colorNamed:bundle:)] + pub unsafe fn colorNamed_bundle( + name: &NSColorName, + bundle: Option<&NSBundle>, + ) -> Option>; + #[method_id(colorNamed:)] + pub unsafe fn colorNamed(name: &NSColorName) -> Option>; + #[method_id(colorWithName:dynamicProvider:)] + pub unsafe fn colorWithName_dynamicProvider( + colorName: Option<&NSColorName>, + dynamicProvider: TodoBlock, + ) -> Id; + #[method_id(colorWithDeviceWhite:alpha:)] + pub unsafe fn colorWithDeviceWhite_alpha( + white: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithDeviceRed:green:blue:alpha:)] + pub unsafe fn colorWithDeviceRed_green_blue_alpha( + red: CGFloat, + green: CGFloat, + blue: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithDeviceHue:saturation:brightness:alpha:)] + pub unsafe fn colorWithDeviceHue_saturation_brightness_alpha( + hue: CGFloat, + saturation: CGFloat, + brightness: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithDeviceCyan:magenta:yellow:black:alpha:)] + pub unsafe fn colorWithDeviceCyan_magenta_yellow_black_alpha( + cyan: CGFloat, + magenta: CGFloat, + yellow: CGFloat, + black: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithCalibratedWhite:alpha:)] + pub unsafe fn colorWithCalibratedWhite_alpha( + white: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithCalibratedRed:green:blue:alpha:)] + pub unsafe fn colorWithCalibratedRed_green_blue_alpha( + red: CGFloat, + green: CGFloat, + blue: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithCalibratedHue:saturation:brightness:alpha:)] + pub unsafe fn colorWithCalibratedHue_saturation_brightness_alpha( + hue: CGFloat, + saturation: CGFloat, + brightness: CGFloat, + alpha: CGFloat, + ) -> Id; + #[method_id(colorWithPatternImage:)] + pub unsafe fn colorWithPatternImage(image: &NSImage) -> Id; + #[method(type)] + pub unsafe fn type_(&self) -> NSColorType; + #[method_id(colorUsingType:)] + pub unsafe fn colorUsingType(&self, type_: NSColorType) -> Option>; + #[method_id(colorUsingColorSpace:)] + pub unsafe fn colorUsingColorSpace( + &self, + space: &NSColorSpace, + ) -> Option>; + #[method_id(blackColor)] + pub unsafe fn blackColor() -> Id; + #[method_id(darkGrayColor)] + pub unsafe fn darkGrayColor() -> Id; + #[method_id(lightGrayColor)] + pub unsafe fn lightGrayColor() -> Id; + #[method_id(whiteColor)] + pub unsafe fn whiteColor() -> Id; + #[method_id(grayColor)] + pub unsafe fn grayColor() -> Id; + #[method_id(redColor)] + pub unsafe fn redColor() -> Id; + #[method_id(greenColor)] + pub unsafe fn greenColor() -> Id; + #[method_id(blueColor)] + pub unsafe fn blueColor() -> Id; + #[method_id(cyanColor)] + pub unsafe fn cyanColor() -> Id; + #[method_id(yellowColor)] + pub unsafe fn yellowColor() -> Id; + #[method_id(magentaColor)] + pub unsafe fn magentaColor() -> Id; + #[method_id(orangeColor)] + pub unsafe fn orangeColor() -> Id; + #[method_id(purpleColor)] + pub unsafe fn purpleColor() -> Id; + #[method_id(brownColor)] + pub unsafe fn brownColor() -> Id; + #[method_id(clearColor)] + pub unsafe fn clearColor() -> Id; + #[method_id(labelColor)] + pub unsafe fn labelColor() -> Id; + #[method_id(secondaryLabelColor)] + pub unsafe fn secondaryLabelColor() -> Id; + #[method_id(tertiaryLabelColor)] + pub unsafe fn tertiaryLabelColor() -> Id; + #[method_id(quaternaryLabelColor)] + pub unsafe fn quaternaryLabelColor() -> Id; + #[method_id(linkColor)] + pub unsafe fn linkColor() -> Id; + #[method_id(placeholderTextColor)] + pub unsafe fn placeholderTextColor() -> Id; + #[method_id(windowFrameTextColor)] + pub unsafe fn windowFrameTextColor() -> Id; + #[method_id(selectedMenuItemTextColor)] + pub unsafe fn selectedMenuItemTextColor() -> Id; + #[method_id(alternateSelectedControlTextColor)] + pub unsafe fn alternateSelectedControlTextColor() -> Id; + #[method_id(headerTextColor)] + pub unsafe fn headerTextColor() -> Id; + #[method_id(separatorColor)] + pub unsafe fn separatorColor() -> Id; + #[method_id(gridColor)] + pub unsafe fn gridColor() -> Id; + #[method_id(windowBackgroundColor)] + pub unsafe fn windowBackgroundColor() -> Id; + #[method_id(underPageBackgroundColor)] + pub unsafe fn underPageBackgroundColor() -> Id; + #[method_id(controlBackgroundColor)] + pub unsafe fn controlBackgroundColor() -> Id; + #[method_id(selectedContentBackgroundColor)] + pub unsafe fn selectedContentBackgroundColor() -> Id; + #[method_id(unemphasizedSelectedContentBackgroundColor)] + pub unsafe fn unemphasizedSelectedContentBackgroundColor() -> Id; + #[method_id(alternatingContentBackgroundColors)] + pub unsafe fn alternatingContentBackgroundColors() -> Id, Shared>; + #[method_id(findHighlightColor)] + pub unsafe fn findHighlightColor() -> Id; + #[method_id(textColor)] + pub unsafe fn textColor() -> Id; + #[method_id(textBackgroundColor)] + pub unsafe fn textBackgroundColor() -> Id; + #[method_id(selectedTextColor)] + pub unsafe fn selectedTextColor() -> Id; + #[method_id(selectedTextBackgroundColor)] + pub unsafe fn selectedTextBackgroundColor() -> Id; + #[method_id(unemphasizedSelectedTextBackgroundColor)] + pub unsafe fn unemphasizedSelectedTextBackgroundColor() -> Id; + #[method_id(unemphasizedSelectedTextColor)] + pub unsafe fn unemphasizedSelectedTextColor() -> Id; + #[method_id(controlColor)] + pub unsafe fn controlColor() -> Id; + #[method_id(controlTextColor)] + pub unsafe fn controlTextColor() -> Id; + #[method_id(selectedControlColor)] + pub unsafe fn selectedControlColor() -> Id; + #[method_id(selectedControlTextColor)] + pub unsafe fn selectedControlTextColor() -> Id; + #[method_id(disabledControlTextColor)] + pub unsafe fn disabledControlTextColor() -> Id; + #[method_id(keyboardFocusIndicatorColor)] + pub unsafe fn keyboardFocusIndicatorColor() -> Id; + #[method_id(scrubberTexturedBackgroundColor)] + pub unsafe fn scrubberTexturedBackgroundColor() -> Id; + #[method_id(systemRedColor)] + pub unsafe fn systemRedColor() -> Id; + #[method_id(systemGreenColor)] + pub unsafe fn systemGreenColor() -> Id; + #[method_id(systemBlueColor)] + pub unsafe fn systemBlueColor() -> Id; + #[method_id(systemOrangeColor)] + pub unsafe fn systemOrangeColor() -> Id; + #[method_id(systemYellowColor)] + pub unsafe fn systemYellowColor() -> Id; + #[method_id(systemBrownColor)] + pub unsafe fn systemBrownColor() -> Id; + #[method_id(systemPinkColor)] + pub unsafe fn systemPinkColor() -> Id; + #[method_id(systemPurpleColor)] + pub unsafe fn systemPurpleColor() -> Id; + #[method_id(systemGrayColor)] + pub unsafe fn systemGrayColor() -> Id; + #[method_id(systemTealColor)] + pub unsafe fn systemTealColor() -> Id; + #[method_id(systemIndigoColor)] + pub unsafe fn systemIndigoColor() -> Id; + #[method_id(systemMintColor)] + pub unsafe fn systemMintColor() -> Id; + #[method_id(systemCyanColor)] + pub unsafe fn systemCyanColor() -> Id; + #[method_id(controlAccentColor)] + pub unsafe fn controlAccentColor() -> Id; + #[method(currentControlTint)] + pub unsafe fn currentControlTint() -> NSControlTint; + #[method_id(colorForControlTint:)] + pub unsafe fn colorForControlTint(controlTint: NSControlTint) -> Id; + #[method_id(highlightColor)] + pub unsafe fn highlightColor() -> Id; + #[method_id(shadowColor)] + pub unsafe fn shadowColor() -> Id; + #[method_id(highlightWithLevel:)] + pub unsafe fn highlightWithLevel(&self, val: CGFloat) -> Option>; + #[method_id(shadowWithLevel:)] + pub unsafe fn shadowWithLevel(&self, val: CGFloat) -> Option>; + #[method_id(colorWithSystemEffect:)] + pub unsafe fn colorWithSystemEffect( + &self, + systemEffect: NSColorSystemEffect, + ) -> Id; + #[method(set)] + pub unsafe fn set(&self); + #[method(setFill)] + pub unsafe fn setFill(&self); + #[method(setStroke)] + pub unsafe fn setStroke(&self); + #[method_id(blendedColorWithFraction:ofColor:)] + pub unsafe fn blendedColorWithFraction_ofColor( + &self, + fraction: CGFloat, + color: &NSColor, + ) -> Option>; + #[method_id(colorWithAlphaComponent:)] + pub unsafe fn colorWithAlphaComponent(&self, alpha: CGFloat) -> Id; + #[method_id(catalogNameComponent)] + pub unsafe fn catalogNameComponent(&self) -> Id; + #[method_id(colorNameComponent)] + pub unsafe fn colorNameComponent(&self) -> Id; + #[method_id(localizedCatalogNameComponent)] + pub unsafe fn localizedCatalogNameComponent(&self) -> Id; + #[method_id(localizedColorNameComponent)] + pub unsafe fn localizedColorNameComponent(&self) -> Id; + #[method(redComponent)] + pub unsafe fn redComponent(&self) -> CGFloat; + #[method(greenComponent)] + pub unsafe fn greenComponent(&self) -> CGFloat; + #[method(blueComponent)] + pub unsafe fn blueComponent(&self) -> CGFloat; + #[method(getRed:green:blue:alpha:)] + pub unsafe fn getRed_green_blue_alpha( + &self, + red: *mut CGFloat, + green: *mut CGFloat, + blue: *mut CGFloat, + alpha: *mut CGFloat, + ); + #[method(hueComponent)] + pub unsafe fn hueComponent(&self) -> CGFloat; + #[method(saturationComponent)] + pub unsafe fn saturationComponent(&self) -> CGFloat; + #[method(brightnessComponent)] + pub unsafe fn brightnessComponent(&self) -> CGFloat; + #[method(getHue:saturation:brightness:alpha:)] + pub unsafe fn getHue_saturation_brightness_alpha( + &self, + hue: *mut CGFloat, + saturation: *mut CGFloat, + brightness: *mut CGFloat, + alpha: *mut CGFloat, + ); + #[method(whiteComponent)] + pub unsafe fn whiteComponent(&self) -> CGFloat; + #[method(getWhite:alpha:)] + pub unsafe fn getWhite_alpha(&self, white: *mut CGFloat, alpha: *mut CGFloat); + #[method(cyanComponent)] + pub unsafe fn cyanComponent(&self) -> CGFloat; + #[method(magentaComponent)] + pub unsafe fn magentaComponent(&self) -> CGFloat; + #[method(yellowComponent)] + pub unsafe fn yellowComponent(&self) -> CGFloat; + #[method(blackComponent)] + pub unsafe fn blackComponent(&self) -> CGFloat; + #[method(getCyan:magenta:yellow:black:alpha:)] + pub unsafe fn getCyan_magenta_yellow_black_alpha( + &self, + cyan: *mut CGFloat, + magenta: *mut CGFloat, + yellow: *mut CGFloat, + black: *mut CGFloat, + alpha: *mut CGFloat, + ); + #[method_id(colorSpace)] + pub unsafe fn colorSpace(&self) -> Id; + #[method(numberOfComponents)] + pub unsafe fn numberOfComponents(&self) -> NSInteger; + #[method(getComponents:)] + pub unsafe fn getComponents(&self, components: NonNull); + #[method_id(patternImage)] + pub unsafe fn patternImage(&self) -> Id; + #[method(alphaComponent)] + pub unsafe fn alphaComponent(&self) -> CGFloat; + #[method_id(colorFromPasteboard:)] + pub unsafe fn colorFromPasteboard(pasteBoard: &NSPasteboard) + -> Option>; + #[method(writeToPasteboard:)] + pub unsafe fn writeToPasteboard(&self, pasteBoard: &NSPasteboard); + #[method(drawSwatchInRect:)] + pub unsafe fn drawSwatchInRect(&self, rect: NSRect); + #[method_id(colorWithCGColor:)] + pub unsafe fn colorWithCGColor(cgColor: CGColorRef) -> Option>; + #[method(CGColor)] + pub unsafe fn CGColor(&self) -> CGColorRef; + #[method(ignoresAlpha)] + pub unsafe fn ignoresAlpha() -> bool; + #[method(setIgnoresAlpha:)] + pub unsafe fn setIgnoresAlpha(ignoresAlpha: bool); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSColor { + #[method_id(controlHighlightColor)] + pub unsafe fn controlHighlightColor() -> Id; + #[method_id(controlLightHighlightColor)] + pub unsafe fn controlLightHighlightColor() -> Id; + #[method_id(controlShadowColor)] + pub unsafe fn controlShadowColor() -> Id; + #[method_id(controlDarkShadowColor)] + pub unsafe fn controlDarkShadowColor() -> Id; + #[method_id(scrollBarColor)] + pub unsafe fn scrollBarColor() -> Id; + #[method_id(knobColor)] + pub unsafe fn knobColor() -> Id; + #[method_id(selectedKnobColor)] + pub unsafe fn selectedKnobColor() -> Id; + #[method_id(windowFrameColor)] + pub unsafe fn windowFrameColor() -> Id; + #[method_id(selectedMenuItemColor)] + pub unsafe fn selectedMenuItemColor() -> Id; + #[method_id(headerColor)] + pub unsafe fn headerColor() -> Id; + #[method_id(secondarySelectedControlColor)] + pub unsafe fn secondarySelectedControlColor() -> Id; + #[method_id(alternateSelectedControlColor)] + pub unsafe fn alternateSelectedControlColor() -> Id; + #[method_id(controlAlternatingRowBackgroundColors)] + pub unsafe fn controlAlternatingRowBackgroundColors() -> Id, Shared>; + #[method_id(colorSpaceName)] + pub unsafe fn colorSpaceName(&self) -> Id; + #[method_id(colorUsingColorSpaceName:device:)] + pub unsafe fn colorUsingColorSpaceName_device( + &self, + name: Option<&NSColorSpaceName>, + deviceDescription: Option<&NSDictionary>, + ) -> Option>; + #[method_id(colorUsingColorSpaceName:)] + pub unsafe fn colorUsingColorSpaceName( + &self, + name: &NSColorSpaceName, + ) -> Option>; + } +); +extern_methods!( + #[doc = "NSQuartzCoreAdditions"] + unsafe impl NSColor { + #[method_id(colorWithCIColor:)] + pub unsafe fn colorWithCIColor(color: &CIColor) -> Id; + } +); +extern_methods!( + #[doc = "NSAppKitAdditions"] + unsafe impl CIColor { + #[method_id(initWithColor:)] + pub unsafe fn initWithColor(&self, color: &NSColor) -> Option>; + } +); +extern_methods!( + #[doc = "NSAppKitColorExtensions"] + unsafe impl NSCoder { + #[method_id(decodeNXColor)] + pub unsafe fn decodeNXColor(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSColorList.rs b/crates/icrate/src/generated/AppKit/NSColorList.rs new file mode 100644 index 000000000..276df526f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSColorList.rs @@ -0,0 +1,64 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::CoreFoundation::generated::CFDictionary::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSColorListName = NSString; +pub type NSColorName = NSString; +use super::__exported::NSBundle; +use super::__exported::NSColor; +extern_class!( + #[derive(Debug)] + pub struct NSColorList; + unsafe impl ClassType for NSColorList { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSColorList { + #[method_id(availableColorLists)] + pub unsafe fn availableColorLists() -> Id, Shared>; + #[method_id(colorListNamed:)] + pub unsafe fn colorListNamed(name: &NSColorListName) -> Option>; + #[method_id(initWithName:)] + pub unsafe fn initWithName(&self, name: &NSColorListName) -> Id; + #[method_id(initWithName:fromFile:)] + pub unsafe fn initWithName_fromFile( + &self, + name: &NSColorListName, + path: Option<&NSString>, + ) -> Option>; + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + #[method(setColor:forKey:)] + pub unsafe fn setColor_forKey(&self, color: &NSColor, key: &NSColorName); + #[method(insertColor:key:atIndex:)] + pub unsafe fn insertColor_key_atIndex( + &self, + color: &NSColor, + key: &NSColorName, + loc: NSUInteger, + ); + #[method(removeColorWithKey:)] + pub unsafe fn removeColorWithKey(&self, key: &NSColorName); + #[method_id(colorWithKey:)] + pub unsafe fn colorWithKey(&self, key: &NSColorName) -> Option>; + #[method_id(allKeys)] + pub unsafe fn allKeys(&self) -> Id, Shared>; + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(writeToURL:error:)] + pub unsafe fn writeToURL_error( + &self, + url: Option<&NSURL>, + ) -> Result<(), Id>; + #[method(writeToFile:)] + pub unsafe fn writeToFile(&self, path: Option<&NSString>) -> bool; + #[method(removeFile)] + pub unsafe fn removeFile(&self); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs new file mode 100644 index 000000000..2929a96ff --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -0,0 +1,79 @@ +use super::__exported::NSColorList; +use super::__exported::NSMutableArray; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::AppKit::generated::NSPanel::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSColorPanel; + unsafe impl ClassType for NSColorPanel { + type Super = NSPanel; + } +); +extern_methods!( + unsafe impl NSColorPanel { + #[method_id(sharedColorPanel)] + pub unsafe fn sharedColorPanel() -> Id; + #[method(sharedColorPanelExists)] + pub unsafe fn sharedColorPanelExists() -> bool; + #[method(dragColor:withEvent:fromView:)] + pub unsafe fn dragColor_withEvent_fromView( + color: &NSColor, + event: &NSEvent, + sourceView: &NSView, + ) -> bool; + #[method(setPickerMask:)] + pub unsafe fn setPickerMask(mask: NSColorPanelOptions); + #[method(setPickerMode:)] + pub unsafe fn setPickerMode(mode: NSColorPanelMode); + #[method_id(accessoryView)] + pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method(isContinuous)] + pub unsafe fn isContinuous(&self) -> bool; + #[method(setContinuous:)] + pub unsafe fn setContinuous(&self, continuous: bool); + #[method(showsAlpha)] + pub unsafe fn showsAlpha(&self) -> bool; + #[method(setShowsAlpha:)] + pub unsafe fn setShowsAlpha(&self, showsAlpha: bool); + #[method(mode)] + pub unsafe fn mode(&self) -> NSColorPanelMode; + #[method(setMode:)] + pub unsafe fn setMode(&self, mode: NSColorPanelMode); + #[method_id(color)] + pub unsafe fn color(&self) -> Id; + #[method(setColor:)] + pub unsafe fn setColor(&self, color: &NSColor); + #[method(alpha)] + pub unsafe fn alpha(&self) -> CGFloat; + #[method(setAction:)] + pub unsafe fn setAction(&self, selector: Option); + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(attachColorList:)] + pub unsafe fn attachColorList(&self, colorList: &NSColorList); + #[method(detachColorList:)] + pub unsafe fn detachColorList(&self, colorList: &NSColorList); + } +); +extern_methods!( + #[doc = "NSColorPanel"] + unsafe impl NSApplication { + #[method(orderFrontColorPanel:)] + pub unsafe fn orderFrontColorPanel(&self, sender: Option<&Object>); + } +); +pub type NSColorChanging = NSObject; +extern_methods!( + #[doc = "NSColorPanelResponderMethod"] + unsafe impl NSObject { + #[method(changeColor:)] + pub unsafe fn changeColor(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSColorPicker.rs b/crates/icrate/src/generated/AppKit/NSColorPicker.rs new file mode 100644 index 000000000..08df3344d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSColorPicker.rs @@ -0,0 +1,45 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSColorPicking::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSColorPicker; + unsafe impl ClassType for NSColorPicker { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSColorPicker { + #[method_id(initWithPickerMask:colorPanel:)] + pub unsafe fn initWithPickerMask_colorPanel( + &self, + mask: NSUInteger, + owningColorPanel: &NSColorPanel, + ) -> Option>; + #[method_id(colorPanel)] + pub unsafe fn colorPanel(&self) -> Id; + #[method_id(provideNewButtonImage)] + pub unsafe fn provideNewButtonImage(&self) -> Id; + #[method(insertNewButtonImage:in:)] + pub unsafe fn insertNewButtonImage_in( + &self, + newButtonImage: &NSImage, + buttonCell: &NSButtonCell, + ); + #[method(viewSizeChanged:)] + pub unsafe fn viewSizeChanged(&self, sender: Option<&Object>); + #[method(attachColorList:)] + pub unsafe fn attachColorList(&self, colorList: &NSColorList); + #[method(detachColorList:)] + pub unsafe fn detachColorList(&self, colorList: &NSColorList); + #[method(setMode:)] + pub unsafe fn setMode(&self, mode: NSColorPanelMode); + #[method_id(buttonToolTip)] + pub unsafe fn buttonToolTip(&self) -> Id; + #[method(minContentSize)] + pub unsafe fn minContentSize(&self) -> NSSize; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs new file mode 100644 index 000000000..850419c6c --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs @@ -0,0 +1,74 @@ +use super::__exported::NSColor; +use super::__exported::NSColorList; +use super::__exported::NSColorSpace; +use super::__exported::NSImage; +use super::__exported::NSString; +use super::__exported::NSViewController; +use crate::AppKit::generated::NSTouchBarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSColorPickerTouchBarItem; + unsafe impl ClassType for NSColorPickerTouchBarItem { + type Super = NSTouchBarItem; + } +); +extern_methods!( + unsafe impl NSColorPickerTouchBarItem { + #[method_id(colorPickerWithIdentifier:)] + pub unsafe fn colorPickerWithIdentifier( + identifier: &NSTouchBarItemIdentifier, + ) -> Id; + #[method_id(textColorPickerWithIdentifier:)] + pub unsafe fn textColorPickerWithIdentifier( + identifier: &NSTouchBarItemIdentifier, + ) -> Id; + #[method_id(strokeColorPickerWithIdentifier:)] + pub unsafe fn strokeColorPickerWithIdentifier( + identifier: &NSTouchBarItemIdentifier, + ) -> Id; + #[method_id(colorPickerWithIdentifier:buttonImage:)] + pub unsafe fn colorPickerWithIdentifier_buttonImage( + identifier: &NSTouchBarItemIdentifier, + image: &NSImage, + ) -> Id; + #[method_id(color)] + pub unsafe fn color(&self) -> Id; + #[method(setColor:)] + pub unsafe fn setColor(&self, color: &NSColor); + #[method(showsAlpha)] + pub unsafe fn showsAlpha(&self) -> bool; + #[method(setShowsAlpha:)] + pub unsafe fn setShowsAlpha(&self, showsAlpha: bool); + #[method_id(allowedColorSpaces)] + pub unsafe fn allowedColorSpaces(&self) -> Option, Shared>>; + #[method(setAllowedColorSpaces:)] + pub unsafe fn setAllowedColorSpaces( + &self, + allowedColorSpaces: Option<&NSArray>, + ); + #[method_id(colorList)] + pub unsafe fn colorList(&self) -> Option>; + #[method(setColorList:)] + pub unsafe fn setColorList(&self, colorList: Option<&NSColorList>); + #[method_id(customizationLabel)] + pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] + pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSColorPicking.rs b/crates/icrate/src/generated/AppKit/NSColorPicking.rs new file mode 100644 index 000000000..8af32380e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSColorPicking.rs @@ -0,0 +1,15 @@ +use super::__exported::NSButtonCell; +use super::__exported::NSColor; +use super::__exported::NSColorList; +use super::__exported::NSColorPanel; +use super::__exported::NSImage; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSColorPanel::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSColorPickingDefault = NSObject; +pub type NSColorPickingCustom = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSColorSampler.rs b/crates/icrate/src/generated/AppKit/NSColorSampler.rs new file mode 100644 index 000000000..a3e6d9c95 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSColorSampler.rs @@ -0,0 +1,20 @@ +use super::__exported::NSColor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSColorSampler; + unsafe impl ClassType for NSColorSampler { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSColorSampler { + #[method(showSamplerWithSelectionHandler:)] + pub unsafe fn showSamplerWithSelectionHandler(&self, selectionHandler: TodoBlock); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs new file mode 100644 index 000000000..bfe15fd53 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -0,0 +1,72 @@ +use super::__exported::NSData; +use crate::AppKit::generated::AppKitDefines::*; +use crate::ApplicationServices::generated::ApplicationServices::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSColorSpace; + unsafe impl ClassType for NSColorSpace { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSColorSpace { + #[method_id(initWithICCProfileData:)] + pub unsafe fn initWithICCProfileData(&self, iccData: &NSData) -> Option>; + #[method_id(ICCProfileData)] + pub unsafe fn ICCProfileData(&self) -> Option>; + #[method_id(initWithColorSyncProfile:)] + pub unsafe fn initWithColorSyncProfile( + &self, + prof: NonNull, + ) -> Option>; + #[method(colorSyncProfile)] + pub unsafe fn colorSyncProfile(&self) -> *mut c_void; + #[method_id(initWithCGColorSpace:)] + pub unsafe fn initWithCGColorSpace( + &self, + cgColorSpace: CGColorSpaceRef, + ) -> Option>; + #[method(CGColorSpace)] + pub unsafe fn CGColorSpace(&self) -> CGColorSpaceRef; + #[method(numberOfColorComponents)] + pub unsafe fn numberOfColorComponents(&self) -> NSInteger; + #[method(colorSpaceModel)] + pub unsafe fn colorSpaceModel(&self) -> NSColorSpaceModel; + #[method_id(localizedName)] + pub unsafe fn localizedName(&self) -> Option>; + #[method_id(sRGBColorSpace)] + pub unsafe fn sRGBColorSpace() -> Id; + #[method_id(genericGamma22GrayColorSpace)] + pub unsafe fn genericGamma22GrayColorSpace() -> Id; + #[method_id(extendedSRGBColorSpace)] + pub unsafe fn extendedSRGBColorSpace() -> Id; + #[method_id(extendedGenericGamma22GrayColorSpace)] + pub unsafe fn extendedGenericGamma22GrayColorSpace() -> Id; + #[method_id(displayP3ColorSpace)] + pub unsafe fn displayP3ColorSpace() -> Id; + #[method_id(adobeRGB1998ColorSpace)] + pub unsafe fn adobeRGB1998ColorSpace() -> Id; + #[method_id(genericRGBColorSpace)] + pub unsafe fn genericRGBColorSpace() -> Id; + #[method_id(genericGrayColorSpace)] + pub unsafe fn genericGrayColorSpace() -> Id; + #[method_id(genericCMYKColorSpace)] + pub unsafe fn genericCMYKColorSpace() -> Id; + #[method_id(deviceRGBColorSpace)] + pub unsafe fn deviceRGBColorSpace() -> Id; + #[method_id(deviceGrayColorSpace)] + pub unsafe fn deviceGrayColorSpace() -> Id; + #[method_id(deviceCMYKColorSpace)] + pub unsafe fn deviceCMYKColorSpace() -> Id; + #[method_id(availableColorSpacesWithModel:)] + pub unsafe fn availableColorSpacesWithModel( + model: NSColorSpaceModel, + ) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSColorWell.rs b/crates/icrate/src/generated/AppKit/NSColorWell.rs new file mode 100644 index 000000000..3e8ccd7e7 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSColorWell.rs @@ -0,0 +1,35 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSColorWell; + unsafe impl ClassType for NSColorWell { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSColorWell { + #[method(deactivate)] + pub unsafe fn deactivate(&self); + #[method(activate:)] + pub unsafe fn activate(&self, exclusive: bool); + #[method(isActive)] + pub unsafe fn isActive(&self) -> bool; + #[method(drawWellInside:)] + pub unsafe fn drawWellInside(&self, insideRect: NSRect); + #[method(isBordered)] + pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] + pub unsafe fn setBordered(&self, bordered: bool); + #[method(takeColorFrom:)] + pub unsafe fn takeColorFrom(&self, sender: Option<&Object>); + #[method_id(color)] + pub unsafe fn color(&self) -> Id; + #[method(setColor:)] + pub unsafe fn setColor(&self, color: &NSColor); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSComboBox.rs b/crates/icrate/src/generated/AppKit/NSComboBox.rs new file mode 100644 index 000000000..24a71ee44 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSComboBox.rs @@ -0,0 +1,94 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextField::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSComboBoxDataSource = NSObject; +pub type NSComboBoxDelegate = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSComboBox; + unsafe impl ClassType for NSComboBox { + type Super = NSTextField; + } +); +extern_methods!( + unsafe impl NSComboBox { + #[method(hasVerticalScroller)] + pub unsafe fn hasVerticalScroller(&self) -> bool; + #[method(setHasVerticalScroller:)] + pub unsafe fn setHasVerticalScroller(&self, hasVerticalScroller: bool); + #[method(intercellSpacing)] + pub unsafe fn intercellSpacing(&self) -> NSSize; + #[method(setIntercellSpacing:)] + pub unsafe fn setIntercellSpacing(&self, intercellSpacing: NSSize); + #[method(itemHeight)] + pub unsafe fn itemHeight(&self) -> CGFloat; + #[method(setItemHeight:)] + pub unsafe fn setItemHeight(&self, itemHeight: CGFloat); + #[method(numberOfVisibleItems)] + pub unsafe fn numberOfVisibleItems(&self) -> NSInteger; + #[method(setNumberOfVisibleItems:)] + pub unsafe fn setNumberOfVisibleItems(&self, numberOfVisibleItems: NSInteger); + #[method(isButtonBordered)] + pub unsafe fn isButtonBordered(&self) -> bool; + #[method(setButtonBordered:)] + pub unsafe fn setButtonBordered(&self, buttonBordered: bool); + #[method(reloadData)] + pub unsafe fn reloadData(&self); + #[method(noteNumberOfItemsChanged)] + pub unsafe fn noteNumberOfItemsChanged(&self); + #[method(usesDataSource)] + pub unsafe fn usesDataSource(&self) -> bool; + #[method(setUsesDataSource:)] + pub unsafe fn setUsesDataSource(&self, usesDataSource: bool); + #[method(scrollItemAtIndexToTop:)] + pub unsafe fn scrollItemAtIndexToTop(&self, index: NSInteger); + #[method(scrollItemAtIndexToVisible:)] + pub unsafe fn scrollItemAtIndexToVisible(&self, index: NSInteger); + #[method(selectItemAtIndex:)] + pub unsafe fn selectItemAtIndex(&self, index: NSInteger); + #[method(deselectItemAtIndex:)] + pub unsafe fn deselectItemAtIndex(&self, index: NSInteger); + #[method(indexOfSelectedItem)] + pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(numberOfItems)] + pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(completes)] + pub unsafe fn completes(&self) -> bool; + #[method(setCompletes:)] + pub unsafe fn setCompletes(&self, completes: bool); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSComboBoxDelegate>); + #[method_id(dataSource)] + pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] + pub unsafe fn setDataSource(&self, dataSource: Option<&NSComboBoxDataSource>); + #[method(addItemWithObjectValue:)] + pub unsafe fn addItemWithObjectValue(&self, object: &Object); + #[method(addItemsWithObjectValues:)] + pub unsafe fn addItemsWithObjectValues(&self, objects: &NSArray); + #[method(insertItemWithObjectValue:atIndex:)] + pub unsafe fn insertItemWithObjectValue_atIndex(&self, object: &Object, index: NSInteger); + #[method(removeItemWithObjectValue:)] + pub unsafe fn removeItemWithObjectValue(&self, object: &Object); + #[method(removeItemAtIndex:)] + pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method(removeAllItems)] + pub unsafe fn removeAllItems(&self); + #[method(selectItemWithObjectValue:)] + pub unsafe fn selectItemWithObjectValue(&self, object: Option<&Object>); + #[method_id(itemObjectValueAtIndex:)] + pub unsafe fn itemObjectValueAtIndex(&self, index: NSInteger) -> Id; + #[method_id(objectValueOfSelectedItem)] + pub unsafe fn objectValueOfSelectedItem(&self) -> Option>; + #[method(indexOfItemWithObjectValue:)] + pub unsafe fn indexOfItemWithObjectValue(&self, object: &Object) -> NSInteger; + #[method_id(objectValues)] + pub unsafe fn objectValues(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs new file mode 100644 index 000000000..5dffc97d6 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs @@ -0,0 +1,93 @@ +use super::__exported::NSButtonCell; +use super::__exported::NSTableView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextFieldCell::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSComboBoxCell; + unsafe impl ClassType for NSComboBoxCell { + type Super = NSTextFieldCell; + } +); +extern_methods!( + unsafe impl NSComboBoxCell { + #[method(hasVerticalScroller)] + pub unsafe fn hasVerticalScroller(&self) -> bool; + #[method(setHasVerticalScroller:)] + pub unsafe fn setHasVerticalScroller(&self, hasVerticalScroller: bool); + #[method(intercellSpacing)] + pub unsafe fn intercellSpacing(&self) -> NSSize; + #[method(setIntercellSpacing:)] + pub unsafe fn setIntercellSpacing(&self, intercellSpacing: NSSize); + #[method(itemHeight)] + pub unsafe fn itemHeight(&self) -> CGFloat; + #[method(setItemHeight:)] + pub unsafe fn setItemHeight(&self, itemHeight: CGFloat); + #[method(numberOfVisibleItems)] + pub unsafe fn numberOfVisibleItems(&self) -> NSInteger; + #[method(setNumberOfVisibleItems:)] + pub unsafe fn setNumberOfVisibleItems(&self, numberOfVisibleItems: NSInteger); + #[method(isButtonBordered)] + pub unsafe fn isButtonBordered(&self) -> bool; + #[method(setButtonBordered:)] + pub unsafe fn setButtonBordered(&self, buttonBordered: bool); + #[method(reloadData)] + pub unsafe fn reloadData(&self); + #[method(noteNumberOfItemsChanged)] + pub unsafe fn noteNumberOfItemsChanged(&self); + #[method(usesDataSource)] + pub unsafe fn usesDataSource(&self) -> bool; + #[method(setUsesDataSource:)] + pub unsafe fn setUsesDataSource(&self, usesDataSource: bool); + #[method(scrollItemAtIndexToTop:)] + pub unsafe fn scrollItemAtIndexToTop(&self, index: NSInteger); + #[method(scrollItemAtIndexToVisible:)] + pub unsafe fn scrollItemAtIndexToVisible(&self, index: NSInteger); + #[method(selectItemAtIndex:)] + pub unsafe fn selectItemAtIndex(&self, index: NSInteger); + #[method(deselectItemAtIndex:)] + pub unsafe fn deselectItemAtIndex(&self, index: NSInteger); + #[method(indexOfSelectedItem)] + pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(numberOfItems)] + pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(completes)] + pub unsafe fn completes(&self) -> bool; + #[method(setCompletes:)] + pub unsafe fn setCompletes(&self, completes: bool); + #[method_id(completedString:)] + pub unsafe fn completedString(&self, string: &NSString) -> Option>; + #[method_id(dataSource)] + pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] + pub unsafe fn setDataSource(&self, dataSource: Option<&NSComboBoxCellDataSource>); + #[method(addItemWithObjectValue:)] + pub unsafe fn addItemWithObjectValue(&self, object: &Object); + #[method(addItemsWithObjectValues:)] + pub unsafe fn addItemsWithObjectValues(&self, objects: &NSArray); + #[method(insertItemWithObjectValue:atIndex:)] + pub unsafe fn insertItemWithObjectValue_atIndex(&self, object: &Object, index: NSInteger); + #[method(removeItemWithObjectValue:)] + pub unsafe fn removeItemWithObjectValue(&self, object: &Object); + #[method(removeItemAtIndex:)] + pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method(removeAllItems)] + pub unsafe fn removeAllItems(&self); + #[method(selectItemWithObjectValue:)] + pub unsafe fn selectItemWithObjectValue(&self, object: Option<&Object>); + #[method_id(itemObjectValueAtIndex:)] + pub unsafe fn itemObjectValueAtIndex(&self, index: NSInteger) -> Id; + #[method_id(objectValueOfSelectedItem)] + pub unsafe fn objectValueOfSelectedItem(&self) -> Option>; + #[method(indexOfItemWithObjectValue:)] + pub unsafe fn indexOfItemWithObjectValue(&self, object: &Object) -> NSInteger; + #[method_id(objectValues)] + pub unsafe fn objectValues(&self) -> Id; + } +); +pub type NSComboBoxCellDataSource = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs new file mode 100644 index 000000000..0b211f4d6 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -0,0 +1,230 @@ +use super::__exported::NSAttributedString; +use super::__exported::NSCell; +use super::__exported::NSFont; +use super::__exported::NSFormatter; +use super::__exported::NSNotification; +use super::__exported::NSTextView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSText::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSControl; + unsafe impl ClassType for NSControl { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSControl { + #[method_id(initWithFrame:)] + pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method(tag)] + pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] + pub unsafe fn setTag(&self, tag: NSInteger); + #[method(ignoresMultiClick)] + pub unsafe fn ignoresMultiClick(&self) -> bool; + #[method(setIgnoresMultiClick:)] + pub unsafe fn setIgnoresMultiClick(&self, ignoresMultiClick: bool); + #[method(isContinuous)] + pub unsafe fn isContinuous(&self) -> bool; + #[method(setContinuous:)] + pub unsafe fn setContinuous(&self, continuous: bool); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method(refusesFirstResponder)] + pub unsafe fn refusesFirstResponder(&self) -> bool; + #[method(setRefusesFirstResponder:)] + pub unsafe fn setRefusesFirstResponder(&self, refusesFirstResponder: bool); + #[method(isHighlighted)] + pub unsafe fn isHighlighted(&self) -> bool; + #[method(setHighlighted:)] + pub unsafe fn setHighlighted(&self, highlighted: bool); + #[method(controlSize)] + pub unsafe fn controlSize(&self) -> NSControlSize; + #[method(setControlSize:)] + pub unsafe fn setControlSize(&self, controlSize: NSControlSize); + #[method_id(formatter)] + pub unsafe fn formatter(&self) -> Option>; + #[method(setFormatter:)] + pub unsafe fn setFormatter(&self, formatter: Option<&NSFormatter>); + #[method_id(objectValue)] + pub unsafe fn objectValue(&self) -> Option>; + #[method(setObjectValue:)] + pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); + #[method_id(stringValue)] + pub unsafe fn stringValue(&self) -> Id; + #[method(setStringValue:)] + pub unsafe fn setStringValue(&self, stringValue: &NSString); + #[method_id(attributedStringValue)] + pub unsafe fn attributedStringValue(&self) -> Id; + #[method(setAttributedStringValue:)] + pub unsafe fn setAttributedStringValue(&self, attributedStringValue: &NSAttributedString); + #[method(intValue)] + pub unsafe fn intValue(&self) -> c_int; + #[method(setIntValue:)] + pub unsafe fn setIntValue(&self, intValue: c_int); + #[method(integerValue)] + pub unsafe fn integerValue(&self) -> NSInteger; + #[method(setIntegerValue:)] + pub unsafe fn setIntegerValue(&self, integerValue: NSInteger); + #[method(floatValue)] + pub unsafe fn floatValue(&self) -> c_float; + #[method(setFloatValue:)] + pub unsafe fn setFloatValue(&self, floatValue: c_float); + #[method(doubleValue)] + pub unsafe fn doubleValue(&self) -> c_double; + #[method(setDoubleValue:)] + pub unsafe fn setDoubleValue(&self, doubleValue: c_double); + #[method(sizeThatFits:)] + pub unsafe fn sizeThatFits(&self, size: NSSize) -> NSSize; + #[method(sizeToFit)] + pub unsafe fn sizeToFit(&self); + #[method(sendActionOn:)] + pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; + #[method(sendAction:to:)] + pub unsafe fn sendAction_to(&self, action: Option, target: Option<&Object>) -> bool; + #[method(takeIntValueFrom:)] + pub unsafe fn takeIntValueFrom(&self, sender: Option<&Object>); + #[method(takeFloatValueFrom:)] + pub unsafe fn takeFloatValueFrom(&self, sender: Option<&Object>); + #[method(takeDoubleValueFrom:)] + pub unsafe fn takeDoubleValueFrom(&self, sender: Option<&Object>); + #[method(takeStringValueFrom:)] + pub unsafe fn takeStringValueFrom(&self, sender: Option<&Object>); + #[method(takeObjectValueFrom:)] + pub unsafe fn takeObjectValueFrom(&self, sender: Option<&Object>); + #[method(takeIntegerValueFrom:)] + pub unsafe fn takeIntegerValueFrom(&self, sender: Option<&Object>); + #[method(mouseDown:)] + pub unsafe fn mouseDown(&self, event: &NSEvent); + #[method(performClick:)] + pub unsafe fn performClick(&self, sender: Option<&Object>); + #[method_id(font)] + pub unsafe fn font(&self) -> Option>; + #[method(setFont:)] + pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[method(usesSingleLineMode)] + pub unsafe fn usesSingleLineMode(&self) -> bool; + #[method(setUsesSingleLineMode:)] + pub unsafe fn setUsesSingleLineMode(&self, usesSingleLineMode: bool); + #[method(lineBreakMode)] + pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[method(setLineBreakMode:)] + pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode); + #[method(alignment)] + pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(setAlignment:)] + pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[method(baseWritingDirection)] + pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[method(setBaseWritingDirection:)] + pub unsafe fn setBaseWritingDirection(&self, baseWritingDirection: NSWritingDirection); + #[method(allowsExpansionToolTips)] + pub unsafe fn allowsExpansionToolTips(&self) -> bool; + #[method(setAllowsExpansionToolTips:)] + pub unsafe fn setAllowsExpansionToolTips(&self, allowsExpansionToolTips: bool); + #[method(expansionFrameWithFrame:)] + pub unsafe fn expansionFrameWithFrame(&self, contentFrame: NSRect) -> NSRect; + #[method(drawWithExpansionFrame:inView:)] + pub unsafe fn drawWithExpansionFrame_inView(&self, contentFrame: NSRect, view: &NSView); + } +); +extern_methods!( + #[doc = "NSControlEditableTextMethods"] + unsafe impl NSControl { + #[method_id(currentEditor)] + pub unsafe fn currentEditor(&self) -> Option>; + #[method(abortEditing)] + pub unsafe fn abortEditing(&self) -> bool; + #[method(validateEditing)] + pub unsafe fn validateEditing(&self); + #[method(editWithFrame:editor:delegate:event:)] + pub unsafe fn editWithFrame_editor_delegate_event( + &self, + rect: NSRect, + textObj: &NSText, + delegate: Option<&Object>, + event: &NSEvent, + ); + #[method(selectWithFrame:editor:delegate:start:length:)] + pub unsafe fn selectWithFrame_editor_delegate_start_length( + &self, + rect: NSRect, + textObj: &NSText, + delegate: Option<&Object>, + selStart: NSInteger, + selLength: NSInteger, + ); + #[method(endEditing:)] + pub unsafe fn endEditing(&self, textObj: &NSText); + } +); +pub type NSControlTextEditingDelegate = NSObject; +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSControl { + #[method(setFloatingPointFormat:left:right:)] + pub unsafe fn setFloatingPointFormat_left_right( + &self, + autoRange: bool, + leftDigits: NSUInteger, + rightDigits: NSUInteger, + ); + #[method(cellClass)] + pub unsafe fn cellClass() -> Option<&Class>; + #[method(setCellClass:)] + pub unsafe fn setCellClass(cellClass: Option<&Class>); + #[method_id(cell)] + pub unsafe fn cell(&self) -> Option>; + #[method(setCell:)] + pub unsafe fn setCell(&self, cell: Option<&NSCell>); + #[method_id(selectedCell)] + pub unsafe fn selectedCell(&self) -> Option>; + #[method(selectedTag)] + pub unsafe fn selectedTag(&self) -> NSInteger; + #[method(setNeedsDisplay)] + pub unsafe fn setNeedsDisplay(&self); + #[method(calcSize)] + pub unsafe fn calcSize(&self); + #[method(updateCell:)] + pub unsafe fn updateCell(&self, cell: &NSCell); + #[method(updateCellInside:)] + pub unsafe fn updateCellInside(&self, cell: &NSCell); + #[method(drawCellInside:)] + pub unsafe fn drawCellInside(&self, cell: &NSCell); + #[method(drawCell:)] + pub unsafe fn drawCell(&self, cell: &NSCell); + #[method(selectCell:)] + pub unsafe fn selectCell(&self, cell: &NSCell); + } +); +extern_methods!( + #[doc = "NSControlSubclassNotifications"] + unsafe impl NSObject { + #[method(controlTextDidBeginEditing:)] + pub unsafe fn controlTextDidBeginEditing(&self, obj: &NSNotification); + #[method(controlTextDidEndEditing:)] + pub unsafe fn controlTextDidEndEditing(&self, obj: &NSNotification); + #[method(controlTextDidChange:)] + pub unsafe fn controlTextDidChange(&self, obj: &NSNotification); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSController.rs b/crates/icrate/src/generated/AppKit/NSController.rs new file mode 100644 index 000000000..e1b529fb3 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSController.rs @@ -0,0 +1,42 @@ +use super::__exported::NSMutableArray; +use super::__exported::NSMutableDictionary; +use super::__exported::NSMutableSet; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSKeyValueBinding::*; +use crate::CoreFoundation::generated::CoreFoundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSController; + unsafe impl ClassType for NSController { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSController { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(objectDidBeginEditing:)] + pub unsafe fn objectDidBeginEditing(&self, editor: &NSEditor); + #[method(objectDidEndEditing:)] + pub unsafe fn objectDidEndEditing(&self, editor: &NSEditor); + #[method(discardEditing)] + pub unsafe fn discardEditing(&self); + #[method(commitEditing)] + pub unsafe fn commitEditing(&self) -> bool; + #[method(commitEditingWithDelegate:didCommitSelector:contextInfo:)] + pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( + &self, + delegate: Option<&Object>, + didCommitSelector: Option, + contextInfo: *mut c_void, + ); + #[method(isEditing)] + pub unsafe fn isEditing(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs new file mode 100644 index 000000000..8a925380b --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -0,0 +1,113 @@ +use super::__exported::NSColor; +use super::__exported::NSEvent; +use super::__exported::NSImage; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSCursor; + unsafe impl ClassType for NSCursor { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSCursor { + #[method_id(currentCursor)] + pub unsafe fn currentCursor() -> Id; + #[method_id(currentSystemCursor)] + pub unsafe fn currentSystemCursor() -> Option>; + #[method_id(arrowCursor)] + pub unsafe fn arrowCursor() -> Id; + #[method_id(IBeamCursor)] + pub unsafe fn IBeamCursor() -> Id; + #[method_id(pointingHandCursor)] + pub unsafe fn pointingHandCursor() -> Id; + #[method_id(closedHandCursor)] + pub unsafe fn closedHandCursor() -> Id; + #[method_id(openHandCursor)] + pub unsafe fn openHandCursor() -> Id; + #[method_id(resizeLeftCursor)] + pub unsafe fn resizeLeftCursor() -> Id; + #[method_id(resizeRightCursor)] + pub unsafe fn resizeRightCursor() -> Id; + #[method_id(resizeLeftRightCursor)] + pub unsafe fn resizeLeftRightCursor() -> Id; + #[method_id(resizeUpCursor)] + pub unsafe fn resizeUpCursor() -> Id; + #[method_id(resizeDownCursor)] + pub unsafe fn resizeDownCursor() -> Id; + #[method_id(resizeUpDownCursor)] + pub unsafe fn resizeUpDownCursor() -> Id; + #[method_id(crosshairCursor)] + pub unsafe fn crosshairCursor() -> Id; + #[method_id(disappearingItemCursor)] + pub unsafe fn disappearingItemCursor() -> Id; + #[method_id(operationNotAllowedCursor)] + pub unsafe fn operationNotAllowedCursor() -> Id; + #[method_id(dragLinkCursor)] + pub unsafe fn dragLinkCursor() -> Id; + #[method_id(dragCopyCursor)] + pub unsafe fn dragCopyCursor() -> Id; + #[method_id(contextualMenuCursor)] + pub unsafe fn contextualMenuCursor() -> Id; + #[method_id(IBeamCursorForVerticalLayout)] + pub unsafe fn IBeamCursorForVerticalLayout() -> Id; + #[method_id(initWithImage:hotSpot:)] + pub unsafe fn initWithImage_hotSpot( + &self, + newImage: &NSImage, + point: NSPoint, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(hide)] + pub unsafe fn hide(); + #[method(unhide)] + pub unsafe fn unhide(); + #[method(setHiddenUntilMouseMoves:)] + pub unsafe fn setHiddenUntilMouseMoves(flag: bool); + #[method(pop)] + pub unsafe fn pop(); + #[method_id(image)] + pub unsafe fn image(&self) -> Id; + #[method(hotSpot)] + pub unsafe fn hotSpot(&self) -> NSPoint; + #[method(push)] + pub unsafe fn push(&self); + #[method(pop)] + pub unsafe fn pop(&self); + #[method(set)] + pub unsafe fn set(&self); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSCursor { + #[method_id(initWithImage:foregroundColorHint:backgroundColorHint:hotSpot:)] + pub unsafe fn initWithImage_foregroundColorHint_backgroundColorHint_hotSpot( + &self, + newImage: &NSImage, + fg: Option<&NSColor>, + bg: Option<&NSColor>, + hotSpot: NSPoint, + ) -> Id; + #[method(setOnMouseExited:)] + pub unsafe fn setOnMouseExited(&self, flag: bool); + #[method(setOnMouseEntered:)] + pub unsafe fn setOnMouseEntered(&self, flag: bool); + #[method(isSetOnMouseExited)] + pub unsafe fn isSetOnMouseExited(&self) -> bool; + #[method(isSetOnMouseEntered)] + pub unsafe fn isSetOnMouseEntered(&self) -> bool; + #[method(mouseEntered:)] + pub unsafe fn mouseEntered(&self, event: &NSEvent); + #[method(mouseExited:)] + pub unsafe fn mouseExited(&self, event: &NSEvent); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs new file mode 100644 index 000000000..80e2c6355 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs @@ -0,0 +1,36 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSImageRep::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSCustomImageRep; + unsafe impl ClassType for NSCustomImageRep { + type Super = NSImageRep; + } +); +extern_methods!( + unsafe impl NSCustomImageRep { + #[method_id(initWithSize:flipped:drawingHandler:)] + pub unsafe fn initWithSize_flipped_drawingHandler( + &self, + size: NSSize, + drawingHandlerShouldBeCalledWithFlippedContext: bool, + drawingHandler: TodoBlock, + ) -> Id; + #[method(drawingHandler)] + pub unsafe fn drawingHandler(&self) -> TodoBlock; + #[method_id(initWithDrawSelector:delegate:)] + pub unsafe fn initWithDrawSelector_delegate( + &self, + selector: Sel, + delegate: &Object, + ) -> Id; + #[method(drawSelector)] + pub unsafe fn drawSelector(&self) -> Option; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs new file mode 100644 index 000000000..ed125c425 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs @@ -0,0 +1,29 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTouchBarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSCustomTouchBarItem; + unsafe impl ClassType for NSCustomTouchBarItem { + type Super = NSTouchBarItem; + } +); +extern_methods!( + unsafe impl NSCustomTouchBarItem { + #[method_id(view)] + pub unsafe fn view(&self) -> Id; + #[method(setView:)] + pub unsafe fn setView(&self, view: &NSView); + #[method_id(viewController)] + pub unsafe fn viewController(&self) -> Option>; + #[method(setViewController:)] + pub unsafe fn setViewController(&self, viewController: Option<&NSViewController>); + #[method_id(customizationLabel)] + pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] + pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDataAsset.rs b/crates/icrate/src/generated/AppKit/NSDataAsset.rs new file mode 100644 index 000000000..ecf8dd78c --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDataAsset.rs @@ -0,0 +1,34 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSDataAssetName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSDataAsset; + unsafe impl ClassType for NSDataAsset { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSDataAsset { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithName:)] + pub unsafe fn initWithName(&self, name: &NSDataAssetName) -> Option>; + #[method_id(initWithName:bundle:)] + pub unsafe fn initWithName_bundle( + &self, + name: &NSDataAssetName, + bundle: &NSBundle, + ) -> Option>; + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method_id(data)] + pub unsafe fn data(&self) -> Id; + #[method_id(typeIdentifier)] + pub unsafe fn typeIdentifier(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDatePicker.rs b/crates/icrate/src/generated/AppKit/NSDatePicker.rs new file mode 100644 index 000000000..51ef020be --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDatePicker.rs @@ -0,0 +1,89 @@ +use super::__exported::NSCalendar; +use super::__exported::NSLocale; +use super::__exported::NSTimeZone; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSDatePickerCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSDatePicker; + unsafe impl ClassType for NSDatePicker { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSDatePicker { + #[method(datePickerStyle)] + pub unsafe fn datePickerStyle(&self) -> NSDatePickerStyle; + #[method(setDatePickerStyle:)] + pub unsafe fn setDatePickerStyle(&self, datePickerStyle: NSDatePickerStyle); + #[method(isBezeled)] + pub unsafe fn isBezeled(&self) -> bool; + #[method(setBezeled:)] + pub unsafe fn setBezeled(&self, bezeled: bool); + #[method(isBordered)] + pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] + pub unsafe fn setBordered(&self, bordered: bool); + #[method(drawsBackground)] + pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] + pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method_id(textColor)] + pub unsafe fn textColor(&self) -> Id; + #[method(setTextColor:)] + pub unsafe fn setTextColor(&self, textColor: &NSColor); + #[method(datePickerMode)] + pub unsafe fn datePickerMode(&self) -> NSDatePickerMode; + #[method(setDatePickerMode:)] + pub unsafe fn setDatePickerMode(&self, datePickerMode: NSDatePickerMode); + #[method(datePickerElements)] + pub unsafe fn datePickerElements(&self) -> NSDatePickerElementFlags; + #[method(setDatePickerElements:)] + pub unsafe fn setDatePickerElements(&self, datePickerElements: NSDatePickerElementFlags); + #[method_id(calendar)] + pub unsafe fn calendar(&self) -> Option>; + #[method(setCalendar:)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(locale)] + pub unsafe fn locale(&self) -> Option>; + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(timeZone)] + pub unsafe fn timeZone(&self) -> Option>; + #[method(setTimeZone:)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method_id(dateValue)] + pub unsafe fn dateValue(&self) -> Id; + #[method(setDateValue:)] + pub unsafe fn setDateValue(&self, dateValue: &NSDate); + #[method(timeInterval)] + pub unsafe fn timeInterval(&self) -> NSTimeInterval; + #[method(setTimeInterval:)] + pub unsafe fn setTimeInterval(&self, timeInterval: NSTimeInterval); + #[method_id(minDate)] + pub unsafe fn minDate(&self) -> Option>; + #[method(setMinDate:)] + pub unsafe fn setMinDate(&self, minDate: Option<&NSDate>); + #[method_id(maxDate)] + pub unsafe fn maxDate(&self) -> Option>; + #[method(setMaxDate:)] + pub unsafe fn setMaxDate(&self, maxDate: Option<&NSDate>); + #[method(presentsCalendarOverlay)] + pub unsafe fn presentsCalendarOverlay(&self) -> bool; + #[method(setPresentsCalendarOverlay:)] + pub unsafe fn setPresentsCalendarOverlay(&self, presentsCalendarOverlay: bool); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSDatePickerCellDelegate>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs new file mode 100644 index 000000000..b62bb886a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -0,0 +1,84 @@ +use super::__exported::NSCalendar; +use super::__exported::NSLocale; +use super::__exported::NSTimeZone; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSActionCell::*; +use crate::Foundation::generated::NSDate::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSDatePickerCell; + unsafe impl ClassType for NSDatePickerCell { + type Super = NSActionCell; + } +); +extern_methods!( + unsafe impl NSDatePickerCell { + #[method_id(initTextCell:)] + pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initImageCell:)] + pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method(datePickerStyle)] + pub unsafe fn datePickerStyle(&self) -> NSDatePickerStyle; + #[method(setDatePickerStyle:)] + pub unsafe fn setDatePickerStyle(&self, datePickerStyle: NSDatePickerStyle); + #[method(drawsBackground)] + pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] + pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method_id(textColor)] + pub unsafe fn textColor(&self) -> Id; + #[method(setTextColor:)] + pub unsafe fn setTextColor(&self, textColor: &NSColor); + #[method(datePickerMode)] + pub unsafe fn datePickerMode(&self) -> NSDatePickerMode; + #[method(setDatePickerMode:)] + pub unsafe fn setDatePickerMode(&self, datePickerMode: NSDatePickerMode); + #[method(datePickerElements)] + pub unsafe fn datePickerElements(&self) -> NSDatePickerElementFlags; + #[method(setDatePickerElements:)] + pub unsafe fn setDatePickerElements(&self, datePickerElements: NSDatePickerElementFlags); + #[method_id(calendar)] + pub unsafe fn calendar(&self) -> Option>; + #[method(setCalendar:)] + pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(locale)] + pub unsafe fn locale(&self) -> Option>; + #[method(setLocale:)] + pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(timeZone)] + pub unsafe fn timeZone(&self) -> Option>; + #[method(setTimeZone:)] + pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method_id(dateValue)] + pub unsafe fn dateValue(&self) -> Id; + #[method(setDateValue:)] + pub unsafe fn setDateValue(&self, dateValue: &NSDate); + #[method(timeInterval)] + pub unsafe fn timeInterval(&self) -> NSTimeInterval; + #[method(setTimeInterval:)] + pub unsafe fn setTimeInterval(&self, timeInterval: NSTimeInterval); + #[method_id(minDate)] + pub unsafe fn minDate(&self) -> Option>; + #[method(setMinDate:)] + pub unsafe fn setMinDate(&self, minDate: Option<&NSDate>); + #[method_id(maxDate)] + pub unsafe fn maxDate(&self) -> Option>; + #[method(setMaxDate:)] + pub unsafe fn setMaxDate(&self, maxDate: Option<&NSDate>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSDatePickerCellDelegate>); + } +); +pub type NSDatePickerCellDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs new file mode 100644 index 000000000..a7fe04bf3 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs @@ -0,0 +1,76 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSArrayController::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSDictionaryControllerKeyValuePair; + unsafe impl ClassType for NSDictionaryControllerKeyValuePair { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSDictionaryControllerKeyValuePair { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(key)] + pub unsafe fn key(&self) -> Option>; + #[method(setKey:)] + pub unsafe fn setKey(&self, key: Option<&NSString>); + #[method_id(value)] + pub unsafe fn value(&self) -> Option>; + #[method(setValue:)] + pub unsafe fn setValue(&self, value: Option<&Object>); + #[method_id(localizedKey)] + pub unsafe fn localizedKey(&self) -> Option>; + #[method(setLocalizedKey:)] + pub unsafe fn setLocalizedKey(&self, localizedKey: Option<&NSString>); + #[method(isExplicitlyIncluded)] + pub unsafe fn isExplicitlyIncluded(&self) -> bool; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSDictionaryController; + unsafe impl ClassType for NSDictionaryController { + type Super = NSArrayController; + } +); +extern_methods!( + unsafe impl NSDictionaryController { + #[method_id(newObject)] + pub unsafe fn newObject(&self) -> Id; + #[method_id(initialKey)] + pub unsafe fn initialKey(&self) -> Id; + #[method(setInitialKey:)] + pub unsafe fn setInitialKey(&self, initialKey: &NSString); + #[method_id(initialValue)] + pub unsafe fn initialValue(&self) -> Id; + #[method(setInitialValue:)] + pub unsafe fn setInitialValue(&self, initialValue: &Object); + #[method_id(includedKeys)] + pub unsafe fn includedKeys(&self) -> Id, Shared>; + #[method(setIncludedKeys:)] + pub unsafe fn setIncludedKeys(&self, includedKeys: &NSArray); + #[method_id(excludedKeys)] + pub unsafe fn excludedKeys(&self) -> Id, Shared>; + #[method(setExcludedKeys:)] + pub unsafe fn setExcludedKeys(&self, excludedKeys: &NSArray); + #[method_id(localizedKeyDictionary)] + pub unsafe fn localizedKeyDictionary(&self) + -> Id, Shared>; + #[method(setLocalizedKeyDictionary:)] + pub unsafe fn setLocalizedKeyDictionary( + &self, + localizedKeyDictionary: &NSDictionary, + ); + #[method_id(localizedKeyTable)] + pub unsafe fn localizedKeyTable(&self) -> Option>; + #[method(setLocalizedKeyTable:)] + pub unsafe fn setLocalizedKeyTable(&self, localizedKeyTable: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs new file mode 100644 index 000000000..1e8ce1919 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -0,0 +1,187 @@ +use crate::AppKit::generated::NSCollectionView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +__inner_extern_class!( + #[derive(Debug)] + pub struct NSDiffableDataSourceSnapshot< + SectionIdentifierType: Message, + ItemIdentifierType: Message, + >; + unsafe impl ClassType + for NSDiffableDataSourceSnapshot + { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl + NSDiffableDataSourceSnapshot + { + #[method(numberOfItems)] + pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(numberOfSections)] + pub unsafe fn numberOfSections(&self) -> NSInteger; + #[method_id(sectionIdentifiers)] + pub unsafe fn sectionIdentifiers(&self) -> Id, Shared>; + #[method_id(itemIdentifiers)] + pub unsafe fn itemIdentifiers(&self) -> Id, Shared>; + #[method(numberOfItemsInSection:)] + pub unsafe fn numberOfItemsInSection( + &self, + sectionIdentifier: &SectionIdentifierType, + ) -> NSInteger; + #[method_id(itemIdentifiersInSectionWithIdentifier:)] + pub unsafe fn itemIdentifiersInSectionWithIdentifier( + &self, + sectionIdentifier: &SectionIdentifierType, + ) -> Id, Shared>; + #[method_id(sectionIdentifierForSectionContainingItemIdentifier:)] + pub unsafe fn sectionIdentifierForSectionContainingItemIdentifier( + &self, + itemIdentifier: &ItemIdentifierType, + ) -> Option>; + #[method(indexOfItemIdentifier:)] + pub unsafe fn indexOfItemIdentifier( + &self, + itemIdentifier: &ItemIdentifierType, + ) -> NSInteger; + #[method(indexOfSectionIdentifier:)] + pub unsafe fn indexOfSectionIdentifier( + &self, + sectionIdentifier: &SectionIdentifierType, + ) -> NSInteger; + #[method(appendItemsWithIdentifiers:)] + pub unsafe fn appendItemsWithIdentifiers(&self, identifiers: &NSArray); + #[method(appendItemsWithIdentifiers:intoSectionWithIdentifier:)] + pub unsafe fn appendItemsWithIdentifiers_intoSectionWithIdentifier( + &self, + identifiers: &NSArray, + sectionIdentifier: &SectionIdentifierType, + ); + #[method(insertItemsWithIdentifiers:beforeItemWithIdentifier:)] + pub unsafe fn insertItemsWithIdentifiers_beforeItemWithIdentifier( + &self, + identifiers: &NSArray, + itemIdentifier: &ItemIdentifierType, + ); + #[method(insertItemsWithIdentifiers:afterItemWithIdentifier:)] + pub unsafe fn insertItemsWithIdentifiers_afterItemWithIdentifier( + &self, + identifiers: &NSArray, + itemIdentifier: &ItemIdentifierType, + ); + #[method(deleteItemsWithIdentifiers:)] + pub unsafe fn deleteItemsWithIdentifiers(&self, identifiers: &NSArray); + #[method(deleteAllItems)] + pub unsafe fn deleteAllItems(&self); + #[method(moveItemWithIdentifier:beforeItemWithIdentifier:)] + pub unsafe fn moveItemWithIdentifier_beforeItemWithIdentifier( + &self, + fromIdentifier: &ItemIdentifierType, + toIdentifier: &ItemIdentifierType, + ); + #[method(moveItemWithIdentifier:afterItemWithIdentifier:)] + pub unsafe fn moveItemWithIdentifier_afterItemWithIdentifier( + &self, + fromIdentifier: &ItemIdentifierType, + toIdentifier: &ItemIdentifierType, + ); + #[method(reloadItemsWithIdentifiers:)] + pub unsafe fn reloadItemsWithIdentifiers(&self, identifiers: &NSArray); + #[method(appendSectionsWithIdentifiers:)] + pub unsafe fn appendSectionsWithIdentifiers(&self, sectionIdentifiers: &NSArray); + #[method(insertSectionsWithIdentifiers:beforeSectionWithIdentifier:)] + pub unsafe fn insertSectionsWithIdentifiers_beforeSectionWithIdentifier( + &self, + sectionIdentifiers: &NSArray, + toSectionIdentifier: &SectionIdentifierType, + ); + #[method(insertSectionsWithIdentifiers:afterSectionWithIdentifier:)] + pub unsafe fn insertSectionsWithIdentifiers_afterSectionWithIdentifier( + &self, + sectionIdentifiers: &NSArray, + toSectionIdentifier: &SectionIdentifierType, + ); + #[method(deleteSectionsWithIdentifiers:)] + pub unsafe fn deleteSectionsWithIdentifiers( + &self, + sectionIdentifiers: &NSArray, + ); + #[method(moveSectionWithIdentifier:beforeSectionWithIdentifier:)] + pub unsafe fn moveSectionWithIdentifier_beforeSectionWithIdentifier( + &self, + fromSectionIdentifier: &SectionIdentifierType, + toSectionIdentifier: &SectionIdentifierType, + ); + #[method(moveSectionWithIdentifier:afterSectionWithIdentifier:)] + pub unsafe fn moveSectionWithIdentifier_afterSectionWithIdentifier( + &self, + fromSectionIdentifier: &SectionIdentifierType, + toSectionIdentifier: &SectionIdentifierType, + ); + #[method(reloadSectionsWithIdentifiers:)] + pub unsafe fn reloadSectionsWithIdentifiers( + &self, + sectionIdentifiers: &NSArray, + ); + } +); +__inner_extern_class!( + #[derive(Debug)] + pub struct NSCollectionViewDiffableDataSource< + SectionIdentifierType: Message, + ItemIdentifierType: Message, + >; + unsafe impl ClassType + for NSCollectionViewDiffableDataSource + { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl + NSCollectionViewDiffableDataSource + { + #[method_id(initWithCollectionView:itemProvider:)] + pub unsafe fn initWithCollectionView_itemProvider( + &self, + collectionView: &NSCollectionView, + itemProvider: NSCollectionViewDiffableDataSourceItemProvider, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method_id(snapshot)] + pub unsafe fn snapshot( + &self, + ) -> Id, Shared>; + #[method(applySnapshot:animatingDifferences:)] + pub unsafe fn applySnapshot_animatingDifferences( + &self, + snapshot: &NSDiffableDataSourceSnapshot, + animatingDifferences: bool, + ); + #[method_id(itemIdentifierForIndexPath:)] + pub unsafe fn itemIdentifierForIndexPath( + &self, + indexPath: &NSIndexPath, + ) -> Option>; + #[method_id(indexPathForItemIdentifier:)] + pub unsafe fn indexPathForItemIdentifier( + &self, + identifier: &ItemIdentifierType, + ) -> Option>; + #[method(supplementaryViewProvider)] + pub unsafe fn supplementaryViewProvider( + &self, + ) -> NSCollectionViewDiffableDataSourceSupplementaryViewProvider; + #[method(setSupplementaryViewProvider:)] + pub unsafe fn setSupplementaryViewProvider( + &self, + supplementaryViewProvider: NSCollectionViewDiffableDataSourceSupplementaryViewProvider, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDockTile.rs b/crates/icrate/src/generated/AppKit/NSDockTile.rs new file mode 100644 index 000000000..0ddaf21b0 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDockTile.rs @@ -0,0 +1,41 @@ +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSDockTile; + unsafe impl ClassType for NSDockTile { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSDockTile { + #[method(size)] + pub unsafe fn size(&self) -> NSSize; + #[method_id(contentView)] + pub unsafe fn contentView(&self) -> Option>; + #[method(setContentView:)] + pub unsafe fn setContentView(&self, contentView: Option<&NSView>); + #[method(display)] + pub unsafe fn display(&self); + #[method(showsApplicationBadge)] + pub unsafe fn showsApplicationBadge(&self) -> bool; + #[method(setShowsApplicationBadge:)] + pub unsafe fn setShowsApplicationBadge(&self, showsApplicationBadge: bool); + #[method_id(badgeLabel)] + pub unsafe fn badgeLabel(&self) -> Option>; + #[method(setBadgeLabel:)] + pub unsafe fn setBadgeLabel(&self, badgeLabel: Option<&NSString>); + #[method_id(owner)] + pub unsafe fn owner(&self) -> Option>; + } +); +use super::__exported::NSMenu; +pub type NSDockTilePlugIn = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs new file mode 100644 index 000000000..91d3b918c --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -0,0 +1,562 @@ +use super::__exported::NSData; +use super::__exported::NSDate; +use super::__exported::NSError; +use super::__exported::NSFileWrapper; +use super::__exported::NSMenuItem; +use super::__exported::NSPageLayout; +use super::__exported::NSPrintInfo; +use super::__exported::NSPrintOperation; +use super::__exported::NSSavePanel; +use super::__exported::NSSharingService; +use super::__exported::NSSharingServicePicker; +use super::__exported::NSUndoManager; +use super::__exported::NSView; +use super::__exported::NSWindow; +use super::__exported::NSWindowController; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSKeyValueBinding::*; +use crate::AppKit::generated::NSMenu::*; +use crate::AppKit::generated::NSNib::*; +use crate::AppKit::generated::NSNibDeclarations::*; +use crate::AppKit::generated::NSPrintInfo::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSFilePresenter::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSDocument; + unsafe impl ClassType for NSDocument { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSDocument { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithType:error:)] + pub unsafe fn initWithType_error( + &self, + typeName: &NSString, + ) -> Result, Id>; + #[method(canConcurrentlyReadDocumentsOfType:)] + pub unsafe fn canConcurrentlyReadDocumentsOfType(typeName: &NSString) -> bool; + #[method_id(initWithContentsOfURL:ofType:error:)] + pub unsafe fn initWithContentsOfURL_ofType_error( + &self, + url: &NSURL, + typeName: &NSString, + ) -> Result, Id>; + #[method_id(initForURL:withContentsOfURL:ofType:error:)] + pub unsafe fn initForURL_withContentsOfURL_ofType_error( + &self, + urlOrNil: Option<&NSURL>, + contentsURL: &NSURL, + typeName: &NSString, + ) -> Result, Id>; + #[method_id(fileType)] + pub unsafe fn fileType(&self) -> Option>; + #[method(setFileType:)] + pub unsafe fn setFileType(&self, fileType: Option<&NSString>); + #[method_id(fileURL)] + pub unsafe fn fileURL(&self) -> Option>; + #[method(setFileURL:)] + pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>); + #[method_id(fileModificationDate)] + pub unsafe fn fileModificationDate(&self) -> Option>; + #[method(setFileModificationDate:)] + pub unsafe fn setFileModificationDate(&self, fileModificationDate: Option<&NSDate>); + #[method(isDraft)] + pub unsafe fn isDraft(&self) -> bool; + #[method(setDraft:)] + pub unsafe fn setDraft(&self, draft: bool); + #[method(performActivityWithSynchronousWaiting:usingBlock:)] + pub unsafe fn performActivityWithSynchronousWaiting_usingBlock( + &self, + waitSynchronously: bool, + block: TodoBlock, + ); + #[method(continueActivityUsingBlock:)] + pub unsafe fn continueActivityUsingBlock(&self, block: TodoBlock); + #[method(continueAsynchronousWorkOnMainThreadUsingBlock:)] + pub unsafe fn continueAsynchronousWorkOnMainThreadUsingBlock(&self, block: TodoBlock); + #[method(performSynchronousFileAccessUsingBlock:)] + pub unsafe fn performSynchronousFileAccessUsingBlock(&self, block: TodoBlock); + #[method(performAsynchronousFileAccessUsingBlock:)] + pub unsafe fn performAsynchronousFileAccessUsingBlock(&self, block: TodoBlock); + #[method(revertDocumentToSaved:)] + pub unsafe fn revertDocumentToSaved(&self, sender: Option<&Object>); + #[method(revertToContentsOfURL:ofType:error:)] + pub unsafe fn revertToContentsOfURL_ofType_error( + &self, + url: &NSURL, + typeName: &NSString, + ) -> Result<(), Id>; + #[method(readFromURL:ofType:error:)] + pub unsafe fn readFromURL_ofType_error( + &self, + url: &NSURL, + typeName: &NSString, + ) -> Result<(), Id>; + #[method(readFromFileWrapper:ofType:error:)] + pub unsafe fn readFromFileWrapper_ofType_error( + &self, + fileWrapper: &NSFileWrapper, + typeName: &NSString, + ) -> Result<(), Id>; + #[method(readFromData:ofType:error:)] + pub unsafe fn readFromData_ofType_error( + &self, + data: &NSData, + typeName: &NSString, + ) -> Result<(), Id>; + #[method(isEntireFileLoaded)] + pub unsafe fn isEntireFileLoaded(&self) -> bool; + #[method(writeToURL:ofType:error:)] + pub unsafe fn writeToURL_ofType_error( + &self, + url: &NSURL, + typeName: &NSString, + ) -> Result<(), Id>; + #[method_id(fileWrapperOfType:error:)] + pub unsafe fn fileWrapperOfType_error( + &self, + typeName: &NSString, + ) -> Result, Id>; + #[method_id(dataOfType:error:)] + pub unsafe fn dataOfType_error( + &self, + typeName: &NSString, + ) -> Result, Id>; + #[method(unblockUserInteraction)] + pub unsafe fn unblockUserInteraction(&self); + #[method(autosavingIsImplicitlyCancellable)] + pub unsafe fn autosavingIsImplicitlyCancellable(&self) -> bool; + #[method(writeSafelyToURL:ofType:forSaveOperation:error:)] + pub unsafe fn writeSafelyToURL_ofType_forSaveOperation_error( + &self, + url: &NSURL, + typeName: &NSString, + saveOperation: NSSaveOperationType, + ) -> Result<(), Id>; + #[method(writeToURL:ofType:forSaveOperation:originalContentsURL:error:)] + pub unsafe fn writeToURL_ofType_forSaveOperation_originalContentsURL_error( + &self, + url: &NSURL, + typeName: &NSString, + saveOperation: NSSaveOperationType, + absoluteOriginalContentsURL: Option<&NSURL>, + ) -> Result<(), Id>; + #[method_id(fileAttributesToWriteToURL:ofType:forSaveOperation:originalContentsURL:error:)] + pub unsafe fn fileAttributesToWriteToURL_ofType_forSaveOperation_originalContentsURL_error( + &self, + url: &NSURL, + typeName: &NSString, + saveOperation: NSSaveOperationType, + absoluteOriginalContentsURL: Option<&NSURL>, + ) -> Result, Shared>, Id>; + #[method(keepBackupFile)] + pub unsafe fn keepBackupFile(&self) -> bool; + #[method_id(backupFileURL)] + pub unsafe fn backupFileURL(&self) -> Option>; + #[method(saveDocument:)] + pub unsafe fn saveDocument(&self, sender: Option<&Object>); + #[method(saveDocumentAs:)] + pub unsafe fn saveDocumentAs(&self, sender: Option<&Object>); + #[method(saveDocumentTo:)] + pub unsafe fn saveDocumentTo(&self, sender: Option<&Object>); + #[method(saveDocumentWithDelegate:didSaveSelector:contextInfo:)] + pub unsafe fn saveDocumentWithDelegate_didSaveSelector_contextInfo( + &self, + delegate: Option<&Object>, + didSaveSelector: Option, + contextInfo: *mut c_void, + ); + #[method(runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:)] + pub unsafe fn runModalSavePanelForSaveOperation_delegate_didSaveSelector_contextInfo( + &self, + saveOperation: NSSaveOperationType, + delegate: Option<&Object>, + didSaveSelector: Option, + contextInfo: *mut c_void, + ); + #[method(shouldRunSavePanelWithAccessoryView)] + pub unsafe fn shouldRunSavePanelWithAccessoryView(&self) -> bool; + #[method(prepareSavePanel:)] + pub unsafe fn prepareSavePanel(&self, savePanel: &NSSavePanel) -> bool; + #[method(fileNameExtensionWasHiddenInLastRunSavePanel)] + pub unsafe fn fileNameExtensionWasHiddenInLastRunSavePanel(&self) -> bool; + #[method_id(fileTypeFromLastRunSavePanel)] + pub unsafe fn fileTypeFromLastRunSavePanel(&self) -> Option>; + #[method(saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:)] + pub unsafe fn saveToURL_ofType_forSaveOperation_delegate_didSaveSelector_contextInfo( + &self, + url: &NSURL, + typeName: &NSString, + saveOperation: NSSaveOperationType, + delegate: Option<&Object>, + didSaveSelector: Option, + contextInfo: *mut c_void, + ); + #[method(saveToURL:ofType:forSaveOperation:completionHandler:)] + pub unsafe fn saveToURL_ofType_forSaveOperation_completionHandler( + &self, + url: &NSURL, + typeName: &NSString, + saveOperation: NSSaveOperationType, + completionHandler: TodoBlock, + ); + #[method(canAsynchronouslyWriteToURL:ofType:forSaveOperation:)] + pub unsafe fn canAsynchronouslyWriteToURL_ofType_forSaveOperation( + &self, + url: &NSURL, + typeName: &NSString, + saveOperation: NSSaveOperationType, + ) -> bool; + #[method(checkAutosavingSafetyAndReturnError:)] + pub unsafe fn checkAutosavingSafetyAndReturnError(&self) + -> Result<(), Id>; + #[method(scheduleAutosaving)] + pub unsafe fn scheduleAutosaving(&self); + #[method(hasUnautosavedChanges)] + pub unsafe fn hasUnautosavedChanges(&self) -> bool; + #[method(autosaveDocumentWithDelegate:didAutosaveSelector:contextInfo:)] + pub unsafe fn autosaveDocumentWithDelegate_didAutosaveSelector_contextInfo( + &self, + delegate: Option<&Object>, + didAutosaveSelector: Option, + contextInfo: *mut c_void, + ); + #[method(autosaveWithImplicitCancellability:completionHandler:)] + pub unsafe fn autosaveWithImplicitCancellability_completionHandler( + &self, + autosavingIsImplicitlyCancellable: bool, + completionHandler: TodoBlock, + ); + #[method(autosavesInPlace)] + pub unsafe fn autosavesInPlace() -> bool; + #[method(preservesVersions)] + pub unsafe fn preservesVersions() -> bool; + #[method(browseDocumentVersions:)] + pub unsafe fn browseDocumentVersions(&self, sender: Option<&Object>); + #[method(isBrowsingVersions)] + pub unsafe fn isBrowsingVersions(&self) -> bool; + #[method(stopBrowsingVersionsWithCompletionHandler:)] + pub unsafe fn stopBrowsingVersionsWithCompletionHandler( + &self, + completionHandler: TodoBlock, + ); + #[method(autosavesDrafts)] + pub unsafe fn autosavesDrafts() -> bool; + #[method_id(autosavingFileType)] + pub unsafe fn autosavingFileType(&self) -> Option>; + #[method_id(autosavedContentsFileURL)] + pub unsafe fn autosavedContentsFileURL(&self) -> Option>; + #[method(setAutosavedContentsFileURL:)] + pub unsafe fn setAutosavedContentsFileURL(&self, autosavedContentsFileURL: Option<&NSURL>); + #[method(canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:)] + pub unsafe fn canCloseDocumentWithDelegate_shouldCloseSelector_contextInfo( + &self, + delegate: &Object, + shouldCloseSelector: Option, + contextInfo: *mut c_void, + ); + #[method(close)] + pub unsafe fn close(&self); + #[method(duplicateDocument:)] + pub unsafe fn duplicateDocument(&self, sender: Option<&Object>); + #[method(duplicateDocumentWithDelegate:didDuplicateSelector:contextInfo:)] + pub unsafe fn duplicateDocumentWithDelegate_didDuplicateSelector_contextInfo( + &self, + delegate: Option<&Object>, + didDuplicateSelector: Option, + contextInfo: *mut c_void, + ); + #[method_id(duplicateAndReturnError:)] + pub unsafe fn duplicateAndReturnError( + &self, + ) -> Result, Id>; + #[method(renameDocument:)] + pub unsafe fn renameDocument(&self, sender: Option<&Object>); + #[method(moveDocumentToUbiquityContainer:)] + pub unsafe fn moveDocumentToUbiquityContainer(&self, sender: Option<&Object>); + #[method(moveDocument:)] + pub unsafe fn moveDocument(&self, sender: Option<&Object>); + #[method(moveDocumentWithCompletionHandler:)] + pub unsafe fn moveDocumentWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(moveToURL:completionHandler:)] + pub unsafe fn moveToURL_completionHandler(&self, url: &NSURL, completionHandler: TodoBlock); + #[method(lockDocument:)] + pub unsafe fn lockDocument(&self, sender: Option<&Object>); + #[method(unlockDocument:)] + pub unsafe fn unlockDocument(&self, sender: Option<&Object>); + #[method(lockDocumentWithCompletionHandler:)] + pub unsafe fn lockDocumentWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(lockWithCompletionHandler:)] + pub unsafe fn lockWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(unlockDocumentWithCompletionHandler:)] + pub unsafe fn unlockDocumentWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(unlockWithCompletionHandler:)] + pub unsafe fn unlockWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(isLocked)] + pub unsafe fn isLocked(&self) -> bool; + #[method(runPageLayout:)] + pub unsafe fn runPageLayout(&self, sender: Option<&Object>); + #[method(runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:)] + pub unsafe fn runModalPageLayoutWithPrintInfo_delegate_didRunSelector_contextInfo( + &self, + printInfo: &NSPrintInfo, + delegate: Option<&Object>, + didRunSelector: Option, + contextInfo: *mut c_void, + ); + #[method(preparePageLayout:)] + pub unsafe fn preparePageLayout(&self, pageLayout: &NSPageLayout) -> bool; + #[method(shouldChangePrintInfo:)] + pub unsafe fn shouldChangePrintInfo(&self, newPrintInfo: &NSPrintInfo) -> bool; + #[method_id(printInfo)] + pub unsafe fn printInfo(&self) -> Id; + #[method(setPrintInfo:)] + pub unsafe fn setPrintInfo(&self, printInfo: &NSPrintInfo); + #[method(printDocument:)] + pub unsafe fn printDocument(&self, sender: Option<&Object>); + #[method(printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo:)] + pub unsafe fn printDocumentWithSettings_showPrintPanel_delegate_didPrintSelector_contextInfo( + &self, + printSettings: &NSDictionary, + showPrintPanel: bool, + delegate: Option<&Object>, + didPrintSelector: Option, + contextInfo: *mut c_void, + ); + #[method_id(printOperationWithSettings:error:)] + pub unsafe fn printOperationWithSettings_error( + &self, + printSettings: &NSDictionary, + ) -> Result, Id>; + #[method(runModalPrintOperation:delegate:didRunSelector:contextInfo:)] + pub unsafe fn runModalPrintOperation_delegate_didRunSelector_contextInfo( + &self, + printOperation: &NSPrintOperation, + delegate: Option<&Object>, + didRunSelector: Option, + contextInfo: *mut c_void, + ); + #[method(saveDocumentToPDF:)] + pub unsafe fn saveDocumentToPDF(&self, sender: Option<&Object>); + #[method_id(PDFPrintOperation)] + pub unsafe fn PDFPrintOperation(&self) -> Id; + #[method(allowsDocumentSharing)] + pub unsafe fn allowsDocumentSharing(&self) -> bool; + #[method(shareDocumentWithSharingService:completionHandler:)] + pub unsafe fn shareDocumentWithSharingService_completionHandler( + &self, + sharingService: &NSSharingService, + completionHandler: TodoBlock, + ); + #[method(prepareSharingServicePicker:)] + pub unsafe fn prepareSharingServicePicker( + &self, + sharingServicePicker: &NSSharingServicePicker, + ); + #[method(isDocumentEdited)] + pub unsafe fn isDocumentEdited(&self) -> bool; + #[method(isInViewingMode)] + pub unsafe fn isInViewingMode(&self) -> bool; + #[method(updateChangeCount:)] + pub unsafe fn updateChangeCount(&self, change: NSDocumentChangeType); + #[method_id(changeCountTokenForSaveOperation:)] + pub unsafe fn changeCountTokenForSaveOperation( + &self, + saveOperation: NSSaveOperationType, + ) -> Id; + #[method(updateChangeCountWithToken:forSaveOperation:)] + pub unsafe fn updateChangeCountWithToken_forSaveOperation( + &self, + changeCountToken: &Object, + saveOperation: NSSaveOperationType, + ); + #[method_id(undoManager)] + pub unsafe fn undoManager(&self) -> Option>; + #[method(setUndoManager:)] + pub unsafe fn setUndoManager(&self, undoManager: Option<&NSUndoManager>); + #[method(hasUndoManager)] + pub unsafe fn hasUndoManager(&self) -> bool; + #[method(setHasUndoManager:)] + pub unsafe fn setHasUndoManager(&self, hasUndoManager: bool); + #[method(presentError:modalForWindow:delegate:didPresentSelector:contextInfo:)] + pub unsafe fn presentError_modalForWindow_delegate_didPresentSelector_contextInfo( + &self, + error: &NSError, + window: &NSWindow, + delegate: Option<&Object>, + didPresentSelector: Option, + contextInfo: *mut c_void, + ); + #[method(presentError:)] + pub unsafe fn presentError(&self, error: &NSError) -> bool; + #[method_id(willPresentError:)] + pub unsafe fn willPresentError(&self, error: &NSError) -> Id; + #[method(willNotPresentError:)] + pub unsafe fn willNotPresentError(&self, error: &NSError); + #[method(makeWindowControllers)] + pub unsafe fn makeWindowControllers(&self); + #[method_id(windowNibName)] + pub unsafe fn windowNibName(&self) -> Option>; + #[method(windowControllerWillLoadNib:)] + pub unsafe fn windowControllerWillLoadNib(&self, windowController: &NSWindowController); + #[method(windowControllerDidLoadNib:)] + pub unsafe fn windowControllerDidLoadNib(&self, windowController: &NSWindowController); + #[method(setWindow:)] + pub unsafe fn setWindow(&self, window: Option<&NSWindow>); + #[method(addWindowController:)] + pub unsafe fn addWindowController(&self, windowController: &NSWindowController); + #[method(removeWindowController:)] + pub unsafe fn removeWindowController(&self, windowController: &NSWindowController); + #[method(showWindows)] + pub unsafe fn showWindows(&self); + #[method_id(windowControllers)] + pub unsafe fn windowControllers(&self) -> Id, Shared>; + #[method(shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:)] + pub unsafe fn shouldCloseWindowController_delegate_shouldCloseSelector_contextInfo( + &self, + windowController: &NSWindowController, + delegate: Option<&Object>, + shouldCloseSelector: Option, + contextInfo: *mut c_void, + ); + #[method_id(displayName)] + pub unsafe fn displayName(&self) -> Id; + #[method(setDisplayName:)] + pub unsafe fn setDisplayName(&self, displayName: Option<&NSString>); + #[method_id(defaultDraftName)] + pub unsafe fn defaultDraftName(&self) -> Id; + #[method_id(windowForSheet)] + pub unsafe fn windowForSheet(&self) -> Option>; + #[method_id(readableTypes)] + pub unsafe fn readableTypes() -> Id, Shared>; + #[method_id(writableTypes)] + pub unsafe fn writableTypes() -> Id, Shared>; + #[method(isNativeType:)] + pub unsafe fn isNativeType(type_: &NSString) -> bool; + #[method_id(writableTypesForSaveOperation:)] + pub unsafe fn writableTypesForSaveOperation( + &self, + saveOperation: NSSaveOperationType, + ) -> Id, Shared>; + #[method_id(fileNameExtensionForType:saveOperation:)] + pub unsafe fn fileNameExtensionForType_saveOperation( + &self, + typeName: &NSString, + saveOperation: NSSaveOperationType, + ) -> Option>; + #[method(validateUserInterfaceItem:)] + pub unsafe fn validateUserInterfaceItem(&self, item: &NSValidatedUserInterfaceItem) + -> bool; + #[method(usesUbiquitousStorage)] + pub unsafe fn usesUbiquitousStorage() -> bool; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSDocument { + #[method(saveToURL:ofType:forSaveOperation:error:)] + pub unsafe fn saveToURL_ofType_forSaveOperation_error( + &self, + url: &NSURL, + typeName: &NSString, + saveOperation: NSSaveOperationType, + ) -> Result<(), Id>; + #[method_id(dataRepresentationOfType:)] + pub unsafe fn dataRepresentationOfType( + &self, + type_: &NSString, + ) -> Option>; + #[method_id(fileAttributesToWriteToFile:ofType:saveOperation:)] + pub unsafe fn fileAttributesToWriteToFile_ofType_saveOperation( + &self, + fullDocumentPath: &NSString, + documentTypeName: &NSString, + saveOperationType: NSSaveOperationType, + ) -> Option>; + #[method_id(fileName)] + pub unsafe fn fileName(&self) -> Option>; + #[method_id(fileWrapperRepresentationOfType:)] + pub unsafe fn fileWrapperRepresentationOfType( + &self, + type_: &NSString, + ) -> Option>; + #[method_id(initWithContentsOfFile:ofType:)] + pub unsafe fn initWithContentsOfFile_ofType( + &self, + absolutePath: &NSString, + typeName: &NSString, + ) -> Option>; + #[method_id(initWithContentsOfURL:ofType:)] + pub unsafe fn initWithContentsOfURL_ofType( + &self, + url: &NSURL, + typeName: &NSString, + ) -> Option>; + #[method(loadDataRepresentation:ofType:)] + pub unsafe fn loadDataRepresentation_ofType(&self, data: &NSData, type_: &NSString) + -> bool; + #[method(loadFileWrapperRepresentation:ofType:)] + pub unsafe fn loadFileWrapperRepresentation_ofType( + &self, + wrapper: &NSFileWrapper, + type_: &NSString, + ) -> bool; + #[method(printShowingPrintPanel:)] + pub unsafe fn printShowingPrintPanel(&self, flag: bool); + #[method(readFromFile:ofType:)] + pub unsafe fn readFromFile_ofType(&self, fileName: &NSString, type_: &NSString) -> bool; + #[method(readFromURL:ofType:)] + pub unsafe fn readFromURL_ofType(&self, url: &NSURL, type_: &NSString) -> bool; + #[method(revertToSavedFromFile:ofType:)] + pub unsafe fn revertToSavedFromFile_ofType( + &self, + fileName: &NSString, + type_: &NSString, + ) -> bool; + #[method(revertToSavedFromURL:ofType:)] + pub unsafe fn revertToSavedFromURL_ofType(&self, url: &NSURL, type_: &NSString) -> bool; + #[method(runModalPageLayoutWithPrintInfo:)] + pub unsafe fn runModalPageLayoutWithPrintInfo(&self, printInfo: &NSPrintInfo) -> NSInteger; + #[method(saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:)] + pub unsafe fn saveToFile_saveOperation_delegate_didSaveSelector_contextInfo( + &self, + fileName: &NSString, + saveOperation: NSSaveOperationType, + delegate: Option<&Object>, + didSaveSelector: Option, + contextInfo: *mut c_void, + ); + #[method(setFileName:)] + pub unsafe fn setFileName(&self, fileName: Option<&NSString>); + #[method(writeToFile:ofType:)] + pub unsafe fn writeToFile_ofType(&self, fileName: &NSString, type_: &NSString) -> bool; + #[method(writeToFile:ofType:originalFile:saveOperation:)] + pub unsafe fn writeToFile_ofType_originalFile_saveOperation( + &self, + fullDocumentPath: &NSString, + documentTypeName: &NSString, + fullOriginalDocumentPath: Option<&NSString>, + saveOperationType: NSSaveOperationType, + ) -> bool; + #[method(writeToURL:ofType:)] + pub unsafe fn writeToURL_ofType(&self, url: &NSURL, type_: &NSString) -> bool; + #[method(writeWithBackupToFile:ofType:saveOperation:)] + pub unsafe fn writeWithBackupToFile_ofType_saveOperation( + &self, + fullDocumentPath: &NSString, + documentTypeName: &NSString, + saveOperationType: NSSaveOperationType, + ) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDocumentController.rs b/crates/icrate/src/generated/AppKit/NSDocumentController.rs new file mode 100644 index 000000000..60283bc3a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDocumentController.rs @@ -0,0 +1,256 @@ +use super::__exported::NSDocument; +use super::__exported::NSError; +use super::__exported::NSMenuItem; +use super::__exported::NSMutableDictionary; +use super::__exported::NSOpenPanel; +use super::__exported::NSWindow; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSMenu::*; +use crate::AppKit::generated::NSNibDeclarations::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDate::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSDocumentController; + unsafe impl ClassType for NSDocumentController { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSDocumentController { + #[method_id(sharedDocumentController)] + pub unsafe fn sharedDocumentController() -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(documents)] + pub unsafe fn documents(&self) -> Id, Shared>; + #[method_id(currentDocument)] + pub unsafe fn currentDocument(&self) -> Option>; + #[method_id(currentDirectory)] + pub unsafe fn currentDirectory(&self) -> Option>; + #[method_id(documentForURL:)] + pub unsafe fn documentForURL(&self, url: &NSURL) -> Option>; + #[method_id(documentForWindow:)] + pub unsafe fn documentForWindow(&self, window: &NSWindow) + -> Option>; + #[method(addDocument:)] + pub unsafe fn addDocument(&self, document: &NSDocument); + #[method(removeDocument:)] + pub unsafe fn removeDocument(&self, document: &NSDocument); + #[method(newDocument:)] + pub unsafe fn newDocument(&self, sender: Option<&Object>); + #[method_id(openUntitledDocumentAndDisplay:error:)] + pub unsafe fn openUntitledDocumentAndDisplay_error( + &self, + displayDocument: bool, + ) -> Result, Id>; + #[method_id(makeUntitledDocumentOfType:error:)] + pub unsafe fn makeUntitledDocumentOfType_error( + &self, + typeName: &NSString, + ) -> Result, Id>; + #[method(openDocument:)] + pub unsafe fn openDocument(&self, sender: Option<&Object>); + #[method_id(URLsFromRunningOpenPanel)] + pub unsafe fn URLsFromRunningOpenPanel(&self) -> Option, Shared>>; + #[method(runModalOpenPanel:forTypes:)] + pub unsafe fn runModalOpenPanel_forTypes( + &self, + openPanel: &NSOpenPanel, + types: Option<&NSArray>, + ) -> NSInteger; + #[method(beginOpenPanelWithCompletionHandler:)] + pub unsafe fn beginOpenPanelWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(beginOpenPanel:forTypes:completionHandler:)] + pub unsafe fn beginOpenPanel_forTypes_completionHandler( + &self, + openPanel: &NSOpenPanel, + inTypes: Option<&NSArray>, + completionHandler: TodoBlock, + ); + #[method(openDocumentWithContentsOfURL:display:completionHandler:)] + pub unsafe fn openDocumentWithContentsOfURL_display_completionHandler( + &self, + url: &NSURL, + displayDocument: bool, + completionHandler: TodoBlock, + ); + #[method_id(makeDocumentWithContentsOfURL:ofType:error:)] + pub unsafe fn makeDocumentWithContentsOfURL_ofType_error( + &self, + url: &NSURL, + typeName: &NSString, + ) -> Result, Id>; + #[method(reopenDocumentForURL:withContentsOfURL:display:completionHandler:)] + pub unsafe fn reopenDocumentForURL_withContentsOfURL_display_completionHandler( + &self, + urlOrNil: Option<&NSURL>, + contentsURL: &NSURL, + displayDocument: bool, + completionHandler: TodoBlock, + ); + #[method_id(makeDocumentForURL:withContentsOfURL:ofType:error:)] + pub unsafe fn makeDocumentForURL_withContentsOfURL_ofType_error( + &self, + urlOrNil: Option<&NSURL>, + contentsURL: &NSURL, + typeName: &NSString, + ) -> Result, Id>; + #[method(autosavingDelay)] + pub unsafe fn autosavingDelay(&self) -> NSTimeInterval; + #[method(setAutosavingDelay:)] + pub unsafe fn setAutosavingDelay(&self, autosavingDelay: NSTimeInterval); + #[method(saveAllDocuments:)] + pub unsafe fn saveAllDocuments(&self, sender: Option<&Object>); + #[method(hasEditedDocuments)] + pub unsafe fn hasEditedDocuments(&self) -> bool; + #[method(reviewUnsavedDocumentsWithAlertTitle:cancellable:delegate:didReviewAllSelector:contextInfo:)] + pub unsafe fn reviewUnsavedDocumentsWithAlertTitle_cancellable_delegate_didReviewAllSelector_contextInfo( + &self, + title: Option<&NSString>, + cancellable: bool, + delegate: Option<&Object>, + didReviewAllSelector: Option, + contextInfo: *mut c_void, + ); + #[method(closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo:)] + pub unsafe fn closeAllDocumentsWithDelegate_didCloseAllSelector_contextInfo( + &self, + delegate: Option<&Object>, + didCloseAllSelector: Option, + contextInfo: *mut c_void, + ); + #[method_id(duplicateDocumentWithContentsOfURL:copying:displayName:error:)] + pub unsafe fn duplicateDocumentWithContentsOfURL_copying_displayName_error( + &self, + url: &NSURL, + duplicateByCopying: bool, + displayNameOrNil: Option<&NSString>, + ) -> Result, Id>; + #[method(allowsAutomaticShareMenu)] + pub unsafe fn allowsAutomaticShareMenu(&self) -> bool; + #[method_id(standardShareMenuItem)] + pub unsafe fn standardShareMenuItem(&self) -> Id; + #[method(presentError:modalForWindow:delegate:didPresentSelector:contextInfo:)] + pub unsafe fn presentError_modalForWindow_delegate_didPresentSelector_contextInfo( + &self, + error: &NSError, + window: &NSWindow, + delegate: Option<&Object>, + didPresentSelector: Option, + contextInfo: *mut c_void, + ); + #[method(presentError:)] + pub unsafe fn presentError(&self, error: &NSError) -> bool; + #[method_id(willPresentError:)] + pub unsafe fn willPresentError(&self, error: &NSError) -> Id; + #[method(maximumRecentDocumentCount)] + pub unsafe fn maximumRecentDocumentCount(&self) -> NSUInteger; + #[method(clearRecentDocuments:)] + pub unsafe fn clearRecentDocuments(&self, sender: Option<&Object>); + #[method(noteNewRecentDocument:)] + pub unsafe fn noteNewRecentDocument(&self, document: &NSDocument); + #[method(noteNewRecentDocumentURL:)] + pub unsafe fn noteNewRecentDocumentURL(&self, url: &NSURL); + #[method_id(recentDocumentURLs)] + pub unsafe fn recentDocumentURLs(&self) -> Id, Shared>; + #[method_id(defaultType)] + pub unsafe fn defaultType(&self) -> Option>; + #[method_id(typeForContentsOfURL:error:)] + pub unsafe fn typeForContentsOfURL_error( + &self, + url: &NSURL, + ) -> Result, Id>; + #[method_id(documentClassNames)] + pub unsafe fn documentClassNames(&self) -> Id, Shared>; + #[method(documentClassForType:)] + pub unsafe fn documentClassForType(&self, typeName: &NSString) -> Option<&Class>; + #[method_id(displayNameForType:)] + pub unsafe fn displayNameForType( + &self, + typeName: &NSString, + ) -> Option>; + #[method(validateUserInterfaceItem:)] + pub unsafe fn validateUserInterfaceItem(&self, item: &NSValidatedUserInterfaceItem) + -> bool; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSDocumentController { + #[method_id(openDocumentWithContentsOfURL:display:error:)] + pub unsafe fn openDocumentWithContentsOfURL_display_error( + &self, + url: &NSURL, + displayDocument: bool, + ) -> Result, Id>; + #[method(reopenDocumentForURL:withContentsOfURL:error:)] + pub unsafe fn reopenDocumentForURL_withContentsOfURL_error( + &self, + url: Option<&NSURL>, + contentsURL: &NSURL, + ) -> Result<(), Id>; + #[method_id(fileExtensionsFromType:)] + pub unsafe fn fileExtensionsFromType( + &self, + typeName: &NSString, + ) -> Option>; + #[method_id(typeFromFileExtension:)] + pub unsafe fn typeFromFileExtension( + &self, + fileNameExtensionOrHFSFileType: &NSString, + ) -> Option>; + #[method_id(documentForFileName:)] + pub unsafe fn documentForFileName(&self, fileName: &NSString) + -> Option>; + #[method_id(fileNamesFromRunningOpenPanel)] + pub unsafe fn fileNamesFromRunningOpenPanel(&self) -> Option>; + #[method_id(makeDocumentWithContentsOfFile:ofType:)] + pub unsafe fn makeDocumentWithContentsOfFile_ofType( + &self, + fileName: &NSString, + type_: &NSString, + ) -> Option>; + #[method_id(makeDocumentWithContentsOfURL:ofType:)] + pub unsafe fn makeDocumentWithContentsOfURL_ofType( + &self, + url: &NSURL, + type_: Option<&NSString>, + ) -> Option>; + #[method_id(makeUntitledDocumentOfType:)] + pub unsafe fn makeUntitledDocumentOfType( + &self, + type_: &NSString, + ) -> Option>; + #[method_id(openDocumentWithContentsOfFile:display:)] + pub unsafe fn openDocumentWithContentsOfFile_display( + &self, + fileName: &NSString, + display: bool, + ) -> Option>; + #[method_id(openDocumentWithContentsOfURL:display:)] + pub unsafe fn openDocumentWithContentsOfURL_display( + &self, + url: &NSURL, + display: bool, + ) -> Option>; + #[method_id(openUntitledDocumentOfType:display:)] + pub unsafe fn openUntitledDocumentOfType_display( + &self, + type_: &NSString, + display: bool, + ) -> Option>; + #[method(setShouldCreateUI:)] + pub unsafe fn setShouldCreateUI(&self, flag: bool); + #[method(shouldCreateUI)] + pub unsafe fn shouldCreateUI(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs new file mode 100644 index 000000000..20f49b86b --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs @@ -0,0 +1,36 @@ +use super::__exported::NSCloseCommand; +use super::__exported::NSScriptCommand; +use super::__exported::NSScriptObjectSpecifier; +use super::__exported::NSString; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSDocument::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_methods!( + #[doc = "NSScripting"] + unsafe impl NSDocument { + #[method_id(lastComponentOfFileName)] + pub unsafe fn lastComponentOfFileName(&self) -> Id; + #[method(setLastComponentOfFileName:)] + pub unsafe fn setLastComponentOfFileName(&self, lastComponentOfFileName: &NSString); + #[method_id(handleSaveScriptCommand:)] + pub unsafe fn handleSaveScriptCommand( + &self, + command: &NSScriptCommand, + ) -> Option>; + #[method_id(handleCloseScriptCommand:)] + pub unsafe fn handleCloseScriptCommand( + &self, + command: &NSCloseCommand, + ) -> Option>; + #[method_id(handlePrintScriptCommand:)] + pub unsafe fn handlePrintScriptCommand( + &self, + command: &NSScriptCommand, + ) -> Option>; + #[method_id(objectSpecifier)] + pub unsafe fn objectSpecifier(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs new file mode 100644 index 000000000..71c9cdf81 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDragging.rs @@ -0,0 +1,55 @@ +use super::__exported::NSDraggingItem; +use super::__exported::NSDraggingSession; +use super::__exported::NSImage; +use super::__exported::NSPasteboard; +use super::__exported::NSPasteboardWriting; +use super::__exported::NSView; +use super::__exported::NSWindow; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSDraggingInfo = NSObject; +pub type NSDraggingDestination = NSObject; +pub type NSDraggingSource = NSObject; +pub type NSSpringLoadingDestination = NSObject; +extern_methods!( + #[doc = "NSDraggingSourceDeprecated"] + unsafe impl NSObject { + #[method_id(namesOfPromisedFilesDroppedAtDestination:)] + pub unsafe fn namesOfPromisedFilesDroppedAtDestination( + &self, + dropDestination: &NSURL, + ) -> Option, Shared>>; + #[method(draggingSourceOperationMaskForLocal:)] + pub unsafe fn draggingSourceOperationMaskForLocal(&self, flag: bool) -> NSDragOperation; + #[method(draggedImage:beganAt:)] + pub unsafe fn draggedImage_beganAt(&self, image: Option<&NSImage>, screenPoint: NSPoint); + #[method(draggedImage:endedAt:operation:)] + pub unsafe fn draggedImage_endedAt_operation( + &self, + image: Option<&NSImage>, + screenPoint: NSPoint, + operation: NSDragOperation, + ); + #[method(draggedImage:movedTo:)] + pub unsafe fn draggedImage_movedTo(&self, image: Option<&NSImage>, screenPoint: NSPoint); + #[method(ignoreModifierKeysWhileDragging)] + pub unsafe fn ignoreModifierKeysWhileDragging(&self) -> bool; + #[method(draggedImage:endedAt:deposited:)] + pub unsafe fn draggedImage_endedAt_deposited( + &self, + image: Option<&NSImage>, + screenPoint: NSPoint, + flag: bool, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs new file mode 100644 index 000000000..382575fdd --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -0,0 +1,76 @@ +use super::__exported::NSPasteboardWriting; +use super::__exported::NSString; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSDraggingImageComponentKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSDraggingImageComponent; + unsafe impl ClassType for NSDraggingImageComponent { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSDraggingImageComponent { + #[method_id(draggingImageComponentWithKey:)] + pub unsafe fn draggingImageComponentWithKey( + key: &NSDraggingImageComponentKey, + ) -> Id; + #[method_id(initWithKey:)] + pub unsafe fn initWithKey(&self, key: &NSDraggingImageComponentKey) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(key)] + pub unsafe fn key(&self) -> Id; + #[method(setKey:)] + pub unsafe fn setKey(&self, key: &NSDraggingImageComponentKey); + #[method_id(contents)] + pub unsafe fn contents(&self) -> Option>; + #[method(setContents:)] + pub unsafe fn setContents(&self, contents: Option<&Object>); + #[method(frame)] + pub unsafe fn frame(&self) -> NSRect; + #[method(setFrame:)] + pub unsafe fn setFrame(&self, frame: NSRect); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSDraggingItem; + unsafe impl ClassType for NSDraggingItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSDraggingItem { + #[method_id(initWithPasteboardWriter:)] + pub unsafe fn initWithPasteboardWriter( + &self, + pasteboardWriter: &NSPasteboardWriting, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(item)] + pub unsafe fn item(&self) -> Id; + #[method(draggingFrame)] + pub unsafe fn draggingFrame(&self) -> NSRect; + #[method(setDraggingFrame:)] + pub unsafe fn setDraggingFrame(&self, draggingFrame: NSRect); + #[method(imageComponentsProvider)] + pub unsafe fn imageComponentsProvider(&self) -> TodoBlock; + #[method(setImageComponentsProvider:)] + pub unsafe fn setImageComponentsProvider(&self, imageComponentsProvider: TodoBlock); + #[method(setDraggingFrame:contents:)] + pub unsafe fn setDraggingFrame_contents(&self, frame: NSRect, contents: Option<&Object>); + #[method_id(imageComponents)] + pub unsafe fn imageComponents( + &self, + ) -> Option, Shared>>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs new file mode 100644 index 000000000..3700794a5 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs @@ -0,0 +1,56 @@ +use super::__exported::NSDraggingItem; +use super::__exported::NSDraggingSource; +use super::__exported::NSImage; +use super::__exported::NSPasteboard; +use super::__exported::NSPasteboardWriting; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSDragging::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSDraggingSession; + unsafe impl ClassType for NSDraggingSession { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSDraggingSession { + #[method(draggingFormation)] + pub unsafe fn draggingFormation(&self) -> NSDraggingFormation; + #[method(setDraggingFormation:)] + pub unsafe fn setDraggingFormation(&self, draggingFormation: NSDraggingFormation); + #[method(animatesToStartingPositionsOnCancelOrFail)] + pub unsafe fn animatesToStartingPositionsOnCancelOrFail(&self) -> bool; + #[method(setAnimatesToStartingPositionsOnCancelOrFail:)] + pub unsafe fn setAnimatesToStartingPositionsOnCancelOrFail( + &self, + animatesToStartingPositionsOnCancelOrFail: bool, + ); + #[method(draggingLeaderIndex)] + pub unsafe fn draggingLeaderIndex(&self) -> NSInteger; + #[method(setDraggingLeaderIndex:)] + pub unsafe fn setDraggingLeaderIndex(&self, draggingLeaderIndex: NSInteger); + #[method_id(draggingPasteboard)] + pub unsafe fn draggingPasteboard(&self) -> Id; + #[method(draggingSequenceNumber)] + pub unsafe fn draggingSequenceNumber(&self) -> NSInteger; + #[method(draggingLocation)] + pub unsafe fn draggingLocation(&self) -> NSPoint; + #[method(enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:)] + pub unsafe fn enumerateDraggingItemsWithOptions_forView_classes_searchOptions_usingBlock( + &self, + enumOpts: NSDraggingItemEnumerationOptions, + view: Option<&NSView>, + classArray: &NSArray, + searchOptions: &NSDictionary, + block: TodoBlock, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs new file mode 100644 index 000000000..1e48b44a4 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -0,0 +1,93 @@ +use super::__exported::NSLock; +use super::__exported::NSNotification; +use super::__exported::NSView; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSResponder::*; +use crate::AppKit::generated::NSWindow::*; +use crate::CoreFoundation::generated::CFDate::*; +use crate::CoreFoundation::generated::CFRunLoop::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSDrawer; + unsafe impl ClassType for NSDrawer { + type Super = NSResponder; + } +); +extern_methods!( + unsafe impl NSDrawer { + #[method_id(initWithContentSize:preferredEdge:)] + pub unsafe fn initWithContentSize_preferredEdge( + &self, + contentSize: NSSize, + edge: NSRectEdge, + ) -> Id; + #[method_id(parentWindow)] + pub unsafe fn parentWindow(&self) -> Option>; + #[method(setParentWindow:)] + pub unsafe fn setParentWindow(&self, parentWindow: Option<&NSWindow>); + #[method_id(contentView)] + pub unsafe fn contentView(&self) -> Option>; + #[method(setContentView:)] + pub unsafe fn setContentView(&self, contentView: Option<&NSView>); + #[method(preferredEdge)] + pub unsafe fn preferredEdge(&self) -> NSRectEdge; + #[method(setPreferredEdge:)] + pub unsafe fn setPreferredEdge(&self, preferredEdge: NSRectEdge); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSDrawerDelegate>); + #[method(open)] + pub unsafe fn open(&self); + #[method(openOnEdge:)] + pub unsafe fn openOnEdge(&self, edge: NSRectEdge); + #[method(close)] + pub unsafe fn close(&self); + #[method(open:)] + pub unsafe fn open(&self, sender: Option<&Object>); + #[method(close:)] + pub unsafe fn close(&self, sender: Option<&Object>); + #[method(toggle:)] + pub unsafe fn toggle(&self, sender: Option<&Object>); + #[method(state)] + pub unsafe fn state(&self) -> NSInteger; + #[method(edge)] + pub unsafe fn edge(&self) -> NSRectEdge; + #[method(contentSize)] + pub unsafe fn contentSize(&self) -> NSSize; + #[method(setContentSize:)] + pub unsafe fn setContentSize(&self, contentSize: NSSize); + #[method(minContentSize)] + pub unsafe fn minContentSize(&self) -> NSSize; + #[method(setMinContentSize:)] + pub unsafe fn setMinContentSize(&self, minContentSize: NSSize); + #[method(maxContentSize)] + pub unsafe fn maxContentSize(&self) -> NSSize; + #[method(setMaxContentSize:)] + pub unsafe fn setMaxContentSize(&self, maxContentSize: NSSize); + #[method(leadingOffset)] + pub unsafe fn leadingOffset(&self) -> CGFloat; + #[method(setLeadingOffset:)] + pub unsafe fn setLeadingOffset(&self, leadingOffset: CGFloat); + #[method(trailingOffset)] + pub unsafe fn trailingOffset(&self) -> CGFloat; + #[method(setTrailingOffset:)] + pub unsafe fn setTrailingOffset(&self, trailingOffset: CGFloat); + } +); +extern_methods!( + #[doc = "NSDrawers"] + unsafe impl NSWindow { + #[method_id(drawers)] + pub unsafe fn drawers(&self) -> Option, Shared>>; + } +); +pub type NSDrawerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs new file mode 100644 index 000000000..1b674719d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs @@ -0,0 +1,28 @@ +use super::__exported::NSPDFImageRep; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSImageRep::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSEPSImageRep; + unsafe impl ClassType for NSEPSImageRep { + type Super = NSImageRep; + } +); +extern_methods!( + unsafe impl NSEPSImageRep { + #[method_id(imageRepWithData:)] + pub unsafe fn imageRepWithData(epsData: &NSData) -> Option>; + #[method_id(initWithData:)] + pub unsafe fn initWithData(&self, epsData: &NSData) -> Option>; + #[method(prepareGState)] + pub unsafe fn prepareGState(&self); + #[method_id(EPSRepresentation)] + pub unsafe fn EPSRepresentation(&self) -> Id; + #[method(boundingBox)] + pub unsafe fn boundingBox(&self) -> NSRect; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSErrors.rs b/crates/icrate/src/generated/AppKit/NSErrors.rs new file mode 100644 index 000000000..eb48a72cb --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSErrors.rs @@ -0,0 +1,6 @@ +use super::__exported::NSString; +use crate::AppKit::generated::AppKitDefines::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs new file mode 100644 index 000000000..d5c7cafb9 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -0,0 +1,256 @@ +use super::__exported::NSGraphicsContext; +use super::__exported::NSTrackingArea; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTouch::*; +use crate::ApplicationServices::generated::ApplicationServices::*; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSSet::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSEvent; + unsafe impl ClassType for NSEvent { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSEvent { + #[method(type)] + pub unsafe fn type_(&self) -> NSEventType; + #[method(modifierFlags)] + pub unsafe fn modifierFlags(&self) -> NSEventModifierFlags; + #[method(timestamp)] + pub unsafe fn timestamp(&self) -> NSTimeInterval; + #[method_id(window)] + pub unsafe fn window(&self) -> Option>; + #[method(windowNumber)] + pub unsafe fn windowNumber(&self) -> NSInteger; + #[method_id(context)] + pub unsafe fn context(&self) -> Option>; + #[method(clickCount)] + pub unsafe fn clickCount(&self) -> NSInteger; + #[method(buttonNumber)] + pub unsafe fn buttonNumber(&self) -> NSInteger; + #[method(eventNumber)] + pub unsafe fn eventNumber(&self) -> NSInteger; + #[method(pressure)] + pub unsafe fn pressure(&self) -> c_float; + #[method(locationInWindow)] + pub unsafe fn locationInWindow(&self) -> NSPoint; + #[method(deltaX)] + pub unsafe fn deltaX(&self) -> CGFloat; + #[method(deltaY)] + pub unsafe fn deltaY(&self) -> CGFloat; + #[method(deltaZ)] + pub unsafe fn deltaZ(&self) -> CGFloat; + #[method(hasPreciseScrollingDeltas)] + pub unsafe fn hasPreciseScrollingDeltas(&self) -> bool; + #[method(scrollingDeltaX)] + pub unsafe fn scrollingDeltaX(&self) -> CGFloat; + #[method(scrollingDeltaY)] + pub unsafe fn scrollingDeltaY(&self) -> CGFloat; + #[method(momentumPhase)] + pub unsafe fn momentumPhase(&self) -> NSEventPhase; + #[method(isDirectionInvertedFromDevice)] + pub unsafe fn isDirectionInvertedFromDevice(&self) -> bool; + #[method_id(characters)] + pub unsafe fn characters(&self) -> Option>; + #[method_id(charactersIgnoringModifiers)] + pub unsafe fn charactersIgnoringModifiers(&self) -> Option>; + #[method_id(charactersByApplyingModifiers:)] + pub unsafe fn charactersByApplyingModifiers( + &self, + modifiers: NSEventModifierFlags, + ) -> Option>; + #[method(isARepeat)] + pub unsafe fn isARepeat(&self) -> bool; + #[method(keyCode)] + pub unsafe fn keyCode(&self) -> c_ushort; + #[method(trackingNumber)] + pub unsafe fn trackingNumber(&self) -> NSInteger; + #[method(userData)] + pub unsafe fn userData(&self) -> *mut c_void; + #[method_id(trackingArea)] + pub unsafe fn trackingArea(&self) -> Option>; + #[method(subtype)] + pub unsafe fn subtype(&self) -> NSEventSubtype; + #[method(data1)] + pub unsafe fn data1(&self) -> NSInteger; + #[method(data2)] + pub unsafe fn data2(&self) -> NSInteger; + #[method(eventRef)] + pub unsafe fn eventRef(&self) -> *mut c_void; + #[method_id(eventWithEventRef:)] + pub unsafe fn eventWithEventRef(eventRef: NonNull) -> Option>; + #[method(CGEvent)] + pub unsafe fn CGEvent(&self) -> CGEventRef; + #[method_id(eventWithCGEvent:)] + pub unsafe fn eventWithCGEvent(cgEvent: CGEventRef) -> Option>; + #[method(isMouseCoalescingEnabled)] + pub unsafe fn isMouseCoalescingEnabled() -> bool; + #[method(setMouseCoalescingEnabled:)] + pub unsafe fn setMouseCoalescingEnabled(mouseCoalescingEnabled: bool); + #[method(magnification)] + pub unsafe fn magnification(&self) -> CGFloat; + #[method(deviceID)] + pub unsafe fn deviceID(&self) -> NSUInteger; + #[method(rotation)] + pub unsafe fn rotation(&self) -> c_float; + #[method(absoluteX)] + pub unsafe fn absoluteX(&self) -> NSInteger; + #[method(absoluteY)] + pub unsafe fn absoluteY(&self) -> NSInteger; + #[method(absoluteZ)] + pub unsafe fn absoluteZ(&self) -> NSInteger; + #[method(buttonMask)] + pub unsafe fn buttonMask(&self) -> NSEventButtonMask; + #[method(tilt)] + pub unsafe fn tilt(&self) -> NSPoint; + #[method(tangentialPressure)] + pub unsafe fn tangentialPressure(&self) -> c_float; + #[method_id(vendorDefined)] + pub unsafe fn vendorDefined(&self) -> Id; + #[method(vendorID)] + pub unsafe fn vendorID(&self) -> NSUInteger; + #[method(tabletID)] + pub unsafe fn tabletID(&self) -> NSUInteger; + #[method(pointingDeviceID)] + pub unsafe fn pointingDeviceID(&self) -> NSUInteger; + #[method(systemTabletID)] + pub unsafe fn systemTabletID(&self) -> NSUInteger; + #[method(vendorPointingDeviceType)] + pub unsafe fn vendorPointingDeviceType(&self) -> NSUInteger; + #[method(pointingDeviceSerialNumber)] + pub unsafe fn pointingDeviceSerialNumber(&self) -> NSUInteger; + #[method(uniqueID)] + pub unsafe fn uniqueID(&self) -> c_ulonglong; + #[method(capabilityMask)] + pub unsafe fn capabilityMask(&self) -> NSUInteger; + #[method(pointingDeviceType)] + pub unsafe fn pointingDeviceType(&self) -> NSPointingDeviceType; + #[method(isEnteringProximity)] + pub unsafe fn isEnteringProximity(&self) -> bool; + #[method_id(touchesMatchingPhase:inView:)] + pub unsafe fn touchesMatchingPhase_inView( + &self, + phase: NSTouchPhase, + view: Option<&NSView>, + ) -> Id, Shared>; + #[method_id(allTouches)] + pub unsafe fn allTouches(&self) -> Id, Shared>; + #[method_id(touchesForView:)] + pub unsafe fn touchesForView(&self, view: &NSView) -> Id, Shared>; + #[method_id(coalescedTouchesForTouch:)] + pub unsafe fn coalescedTouchesForTouch( + &self, + touch: &NSTouch, + ) -> Id, Shared>; + #[method(phase)] + pub unsafe fn phase(&self) -> NSEventPhase; + #[method(stage)] + pub unsafe fn stage(&self) -> NSInteger; + #[method(stageTransition)] + pub unsafe fn stageTransition(&self) -> CGFloat; + #[method(associatedEventsMask)] + pub unsafe fn associatedEventsMask(&self) -> NSEventMask; + #[method(pressureBehavior)] + pub unsafe fn pressureBehavior(&self) -> NSPressureBehavior; + #[method(isSwipeTrackingFromScrollEventsEnabled)] + pub unsafe fn isSwipeTrackingFromScrollEventsEnabled() -> bool; + #[method(trackSwipeEventWithOptions:dampenAmountThresholdMin:max:usingHandler:)] + pub unsafe fn trackSwipeEventWithOptions_dampenAmountThresholdMin_max_usingHandler( + &self, + options: NSEventSwipeTrackingOptions, + minDampenThreshold: CGFloat, + maxDampenThreshold: CGFloat, + trackingHandler: TodoBlock, + ); + #[method(startPeriodicEventsAfterDelay:withPeriod:)] + pub unsafe fn startPeriodicEventsAfterDelay_withPeriod( + delay: NSTimeInterval, + period: NSTimeInterval, + ); + #[method(stopPeriodicEvents)] + pub unsafe fn stopPeriodicEvents(); + #[method_id(mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:)] + pub unsafe fn mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure( + type_: NSEventType, + location: NSPoint, + flags: NSEventModifierFlags, + time: NSTimeInterval, + wNum: NSInteger, + unusedPassNil: Option<&NSGraphicsContext>, + eNum: NSInteger, + cNum: NSInteger, + pressure: c_float, + ) -> Option>; + #[method_id(keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:)] + pub unsafe fn keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode( + type_: NSEventType, + location: NSPoint, + flags: NSEventModifierFlags, + time: NSTimeInterval, + wNum: NSInteger, + unusedPassNil: Option<&NSGraphicsContext>, + keys: &NSString, + ukeys: &NSString, + flag: bool, + code: c_ushort, + ) -> Option>; + #[method_id(enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:)] + pub unsafe fn enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData( + type_: NSEventType, + location: NSPoint, + flags: NSEventModifierFlags, + time: NSTimeInterval, + wNum: NSInteger, + unusedPassNil: Option<&NSGraphicsContext>, + eNum: NSInteger, + tNum: NSInteger, + data: *mut c_void, + ) -> Option>; + # [method_id (otherEventWithType : location : modifierFlags : timestamp : windowNumber : context : subtype : data1 : data2 :)] + pub unsafe fn otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2( + type_: NSEventType, + location: NSPoint, + flags: NSEventModifierFlags, + time: NSTimeInterval, + wNum: NSInteger, + unusedPassNil: Option<&NSGraphicsContext>, + subtype: c_short, + d1: NSInteger, + d2: NSInteger, + ) -> Option>; + #[method(mouseLocation)] + pub unsafe fn mouseLocation() -> NSPoint; + #[method(modifierFlags)] + pub unsafe fn modifierFlags() -> NSEventModifierFlags; + #[method(pressedMouseButtons)] + pub unsafe fn pressedMouseButtons() -> NSUInteger; + #[method(doubleClickInterval)] + pub unsafe fn doubleClickInterval() -> NSTimeInterval; + #[method(keyRepeatDelay)] + pub unsafe fn keyRepeatDelay() -> NSTimeInterval; + #[method(keyRepeatInterval)] + pub unsafe fn keyRepeatInterval() -> NSTimeInterval; + #[method_id(addGlobalMonitorForEventsMatchingMask:handler:)] + pub unsafe fn addGlobalMonitorForEventsMatchingMask_handler( + mask: NSEventMask, + block: TodoBlock, + ) -> Option>; + #[method_id(addLocalMonitorForEventsMatchingMask:handler:)] + pub unsafe fn addLocalMonitorForEventsMatchingMask_handler( + mask: NSEventMask, + block: TodoBlock, + ) -> Option>; + #[method(removeMonitor:)] + pub unsafe fn removeMonitor(eventMonitor: &Object); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs new file mode 100644 index 000000000..1ee824dd5 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs @@ -0,0 +1,42 @@ +use super::__exported::NSOperationQueue; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSFilePromiseProvider; + unsafe impl ClassType for NSFilePromiseProvider { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSFilePromiseProvider { + #[method_id(fileType)] + pub unsafe fn fileType(&self) -> Id; + #[method(setFileType:)] + pub unsafe fn setFileType(&self, fileType: &NSString); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSFilePromiseProviderDelegate>); + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + #[method(setUserInfo:)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&Object>); + #[method_id(initWithFileType:delegate:)] + pub unsafe fn initWithFileType_delegate( + &self, + fileType: &NSString, + delegate: &NSFilePromiseProviderDelegate, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + } +); +pub type NSFilePromiseProviderDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs new file mode 100644 index 000000000..0ace368ab --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs @@ -0,0 +1,35 @@ +use super::__exported::NSOperationQueue; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSFilePromiseReceiver; + unsafe impl ClassType for NSFilePromiseReceiver { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSFilePromiseReceiver { + #[method_id(readableDraggedTypes)] + pub unsafe fn readableDraggedTypes() -> Id, Shared>; + #[method_id(fileTypes)] + pub unsafe fn fileTypes(&self) -> Id, Shared>; + #[method_id(fileNames)] + pub unsafe fn fileNames(&self) -> Id, Shared>; + #[method(receivePromisedFilesAtDestination:options:operationQueue:reader:)] + pub unsafe fn receivePromisedFilesAtDestination_options_operationQueue_reader( + &self, + destinationDir: &NSURL, + options: &NSDictionary, + operationQueue: &NSOperationQueue, + reader: TodoBlock, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs new file mode 100644 index 000000000..3bda1d7b0 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs @@ -0,0 +1,16 @@ +use super::__exported::NSImage; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSFileWrapper::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_methods!( + #[doc = "NSExtensions"] + unsafe impl NSFileWrapper { + #[method_id(icon)] + pub unsafe fn icon(&self) -> Option>; + #[method(setIcon:)] + pub unsafe fn setIcon(&self, icon: Option<&NSImage>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs new file mode 100644 index 000000000..dfc78a48b --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -0,0 +1,217 @@ +use super::__exported::NSAffineTransform; +use super::__exported::NSFontDescriptor; +use super::__exported::NSGraphicsContext; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSFontDescriptor::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSFont; + unsafe impl ClassType for NSFont { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSFont { + #[method_id(fontWithName:size:)] + pub unsafe fn fontWithName_size( + fontName: &NSString, + fontSize: CGFloat, + ) -> Option>; + #[method_id(fontWithName:matrix:)] + pub unsafe fn fontWithName_matrix( + fontName: &NSString, + fontMatrix: NonNull, + ) -> Option>; + #[method_id(fontWithDescriptor:size:)] + pub unsafe fn fontWithDescriptor_size( + fontDescriptor: &NSFontDescriptor, + fontSize: CGFloat, + ) -> Option>; + #[method_id(fontWithDescriptor:textTransform:)] + pub unsafe fn fontWithDescriptor_textTransform( + fontDescriptor: &NSFontDescriptor, + textTransform: Option<&NSAffineTransform>, + ) -> Option>; + #[method_id(userFontOfSize:)] + pub unsafe fn userFontOfSize(fontSize: CGFloat) -> Option>; + #[method_id(userFixedPitchFontOfSize:)] + pub unsafe fn userFixedPitchFontOfSize(fontSize: CGFloat) -> Option>; + #[method(setUserFont:)] + pub unsafe fn setUserFont(font: Option<&NSFont>); + #[method(setUserFixedPitchFont:)] + pub unsafe fn setUserFixedPitchFont(font: Option<&NSFont>); + #[method_id(systemFontOfSize:)] + pub unsafe fn systemFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(boldSystemFontOfSize:)] + pub unsafe fn boldSystemFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(labelFontOfSize:)] + pub unsafe fn labelFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(titleBarFontOfSize:)] + pub unsafe fn titleBarFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(menuFontOfSize:)] + pub unsafe fn menuFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(menuBarFontOfSize:)] + pub unsafe fn menuBarFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(messageFontOfSize:)] + pub unsafe fn messageFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(paletteFontOfSize:)] + pub unsafe fn paletteFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(toolTipsFontOfSize:)] + pub unsafe fn toolTipsFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(controlContentFontOfSize:)] + pub unsafe fn controlContentFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(systemFontOfSize:weight:)] + pub unsafe fn systemFontOfSize_weight( + fontSize: CGFloat, + weight: NSFontWeight, + ) -> Id; + #[method_id(monospacedDigitSystemFontOfSize:weight:)] + pub unsafe fn monospacedDigitSystemFontOfSize_weight( + fontSize: CGFloat, + weight: NSFontWeight, + ) -> Id; + #[method_id(monospacedSystemFontOfSize:weight:)] + pub unsafe fn monospacedSystemFontOfSize_weight( + fontSize: CGFloat, + weight: NSFontWeight, + ) -> Id; + #[method_id(fontWithSize:)] + pub unsafe fn fontWithSize(&self, fontSize: CGFloat) -> Id; + #[method(systemFontSize)] + pub unsafe fn systemFontSize() -> CGFloat; + #[method(smallSystemFontSize)] + pub unsafe fn smallSystemFontSize() -> CGFloat; + #[method(labelFontSize)] + pub unsafe fn labelFontSize() -> CGFloat; + #[method(systemFontSizeForControlSize:)] + pub unsafe fn systemFontSizeForControlSize(controlSize: NSControlSize) -> CGFloat; + #[method_id(fontName)] + pub unsafe fn fontName(&self) -> Id; + #[method(pointSize)] + pub unsafe fn pointSize(&self) -> CGFloat; + #[method(matrix)] + pub unsafe fn matrix(&self) -> NonNull; + #[method_id(familyName)] + pub unsafe fn familyName(&self) -> Option>; + #[method_id(displayName)] + pub unsafe fn displayName(&self) -> Option>; + #[method_id(fontDescriptor)] + pub unsafe fn fontDescriptor(&self) -> Id; + #[method_id(textTransform)] + pub unsafe fn textTransform(&self) -> Id; + #[method(numberOfGlyphs)] + pub unsafe fn numberOfGlyphs(&self) -> NSUInteger; + #[method(mostCompatibleStringEncoding)] + pub unsafe fn mostCompatibleStringEncoding(&self) -> NSStringEncoding; + #[method_id(coveredCharacterSet)] + pub unsafe fn coveredCharacterSet(&self) -> Id; + #[method(boundingRectForFont)] + pub unsafe fn boundingRectForFont(&self) -> NSRect; + #[method(maximumAdvancement)] + pub unsafe fn maximumAdvancement(&self) -> NSSize; + #[method(ascender)] + pub unsafe fn ascender(&self) -> CGFloat; + #[method(descender)] + pub unsafe fn descender(&self) -> CGFloat; + #[method(leading)] + pub unsafe fn leading(&self) -> CGFloat; + #[method(underlinePosition)] + pub unsafe fn underlinePosition(&self) -> CGFloat; + #[method(underlineThickness)] + pub unsafe fn underlineThickness(&self) -> CGFloat; + #[method(italicAngle)] + pub unsafe fn italicAngle(&self) -> CGFloat; + #[method(capHeight)] + pub unsafe fn capHeight(&self) -> CGFloat; + #[method(xHeight)] + pub unsafe fn xHeight(&self) -> CGFloat; + #[method(isFixedPitch)] + pub unsafe fn isFixedPitch(&self) -> bool; + #[method(boundingRectForCGGlyph:)] + pub unsafe fn boundingRectForCGGlyph(&self, glyph: CGGlyph) -> NSRect; + #[method(advancementForCGGlyph:)] + pub unsafe fn advancementForCGGlyph(&self, glyph: CGGlyph) -> NSSize; + #[method(getBoundingRects:forCGGlyphs:count:)] + pub unsafe fn getBoundingRects_forCGGlyphs_count( + &self, + bounds: NSRectArray, + glyphs: NonNull, + glyphCount: NSUInteger, + ); + #[method(getAdvancements:forCGGlyphs:count:)] + pub unsafe fn getAdvancements_forCGGlyphs_count( + &self, + advancements: NSSizeArray, + glyphs: NonNull, + glyphCount: NSUInteger, + ); + #[method(set)] + pub unsafe fn set(&self); + #[method(setInContext:)] + pub unsafe fn setInContext(&self, graphicsContext: &NSGraphicsContext); + #[method_id(verticalFont)] + pub unsafe fn verticalFont(&self) -> Id; + #[method(isVertical)] + pub unsafe fn isVertical(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSFont_Deprecated"] + unsafe impl NSFont { + #[method(glyphWithName:)] + pub unsafe fn glyphWithName(&self, name: &NSString) -> NSGlyph; + #[method(boundingRectForGlyph:)] + pub unsafe fn boundingRectForGlyph(&self, glyph: NSGlyph) -> NSRect; + #[method(advancementForGlyph:)] + pub unsafe fn advancementForGlyph(&self, glyph: NSGlyph) -> NSSize; + #[method(getBoundingRects:forGlyphs:count:)] + pub unsafe fn getBoundingRects_forGlyphs_count( + &self, + bounds: NSRectArray, + glyphs: NonNull, + glyphCount: NSUInteger, + ); + #[method(getAdvancements:forGlyphs:count:)] + pub unsafe fn getAdvancements_forGlyphs_count( + &self, + advancements: NSSizeArray, + glyphs: NonNull, + glyphCount: NSUInteger, + ); + #[method(getAdvancements:forPackedGlyphs:length:)] + pub unsafe fn getAdvancements_forPackedGlyphs_length( + &self, + advancements: NSSizeArray, + packedGlyphs: NonNull, + length: NSUInteger, + ); + #[method_id(printerFont)] + pub unsafe fn printerFont(&self) -> Id; + #[method_id(screenFont)] + pub unsafe fn screenFont(&self) -> Id; + #[method_id(screenFontWithRenderingMode:)] + pub unsafe fn screenFontWithRenderingMode( + &self, + renderingMode: NSFontRenderingMode, + ) -> Id; + #[method(renderingMode)] + pub unsafe fn renderingMode(&self) -> NSFontRenderingMode; + } +); +extern_methods!( + #[doc = "NSFont_TextStyles"] + unsafe impl NSFont { + #[method_id(preferredFontForTextStyle:options:)] + pub unsafe fn preferredFontForTextStyle_options( + style: &NSFontTextStyle, + options: &NSDictionary, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs new file mode 100644 index 000000000..917934bb7 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs @@ -0,0 +1,34 @@ +use super::__exported::NSFontDescriptor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSProgress::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSFontAssetRequest; + unsafe impl ClassType for NSFontAssetRequest { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSFontAssetRequest { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithFontDescriptors:options:)] + pub unsafe fn initWithFontDescriptors_options( + &self, + fontDescriptors: &NSArray, + options: NSFontAssetRequestOptions, + ) -> Id; + #[method_id(downloadedFontDescriptors)] + pub unsafe fn downloadedFontDescriptors(&self) -> Id, Shared>; + #[method_id(progress)] + pub unsafe fn progress(&self) -> Id; + #[method(downloadFontAssetsWithCompletionHandler:)] + pub unsafe fn downloadFontAssetsWithCompletionHandler(&self, completionHandler: TodoBlock); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs new file mode 100644 index 000000000..81610011e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSFontCollection.rs @@ -0,0 +1,135 @@ +use super::__exported::NSFontDescriptor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSError::*; +use crate::Foundation::generated::NSLocale::*; +use crate::Foundation::generated::NSString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSFontCollectionMatchingOptionKey = NSString; +pub type NSFontCollectionName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSFontCollection; + unsafe impl ClassType for NSFontCollection { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSFontCollection { + #[method_id(fontCollectionWithDescriptors:)] + pub unsafe fn fontCollectionWithDescriptors( + queryDescriptors: &NSArray, + ) -> Id; + #[method_id(fontCollectionWithAllAvailableDescriptors)] + pub unsafe fn fontCollectionWithAllAvailableDescriptors() -> Id; + #[method_id(fontCollectionWithLocale:)] + pub unsafe fn fontCollectionWithLocale( + locale: &NSLocale, + ) -> Option>; + #[method(showFontCollection:withName:visibility:error:)] + pub unsafe fn showFontCollection_withName_visibility_error( + collection: &NSFontCollection, + name: &NSFontCollectionName, + visibility: NSFontCollectionVisibility, + ) -> Result<(), Id>; + #[method(hideFontCollectionWithName:visibility:error:)] + pub unsafe fn hideFontCollectionWithName_visibility_error( + name: &NSFontCollectionName, + visibility: NSFontCollectionVisibility, + ) -> Result<(), Id>; + #[method(renameFontCollectionWithName:visibility:toName:error:)] + pub unsafe fn renameFontCollectionWithName_visibility_toName_error( + oldName: &NSFontCollectionName, + visibility: NSFontCollectionVisibility, + newName: &NSFontCollectionName, + ) -> Result<(), Id>; + #[method_id(allFontCollectionNames)] + pub unsafe fn allFontCollectionNames() -> Id, Shared>; + #[method_id(fontCollectionWithName:)] + pub unsafe fn fontCollectionWithName( + name: &NSFontCollectionName, + ) -> Option>; + #[method_id(fontCollectionWithName:visibility:)] + pub unsafe fn fontCollectionWithName_visibility( + name: &NSFontCollectionName, + visibility: NSFontCollectionVisibility, + ) -> Option>; + #[method_id(queryDescriptors)] + pub unsafe fn queryDescriptors(&self) -> Option, Shared>>; + #[method_id(exclusionDescriptors)] + pub unsafe fn exclusionDescriptors(&self) -> Option, Shared>>; + #[method_id(matchingDescriptors)] + pub unsafe fn matchingDescriptors(&self) -> Option, Shared>>; + #[method_id(matchingDescriptorsWithOptions:)] + pub unsafe fn matchingDescriptorsWithOptions( + &self, + options: Option<&NSDictionary>, + ) -> Option, Shared>>; + #[method_id(matchingDescriptorsForFamily:)] + pub unsafe fn matchingDescriptorsForFamily( + &self, + family: &NSString, + ) -> Option, Shared>>; + #[method_id(matchingDescriptorsForFamily:options:)] + pub unsafe fn matchingDescriptorsForFamily_options( + &self, + family: &NSString, + options: Option<&NSDictionary>, + ) -> Option, Shared>>; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSMutableFontCollection; + unsafe impl ClassType for NSMutableFontCollection { + type Super = NSFontCollection; + } +); +extern_methods!( + unsafe impl NSMutableFontCollection { + #[method_id(fontCollectionWithDescriptors:)] + pub unsafe fn fontCollectionWithDescriptors( + queryDescriptors: &NSArray, + ) -> Id; + #[method_id(fontCollectionWithAllAvailableDescriptors)] + pub unsafe fn fontCollectionWithAllAvailableDescriptors( + ) -> Id; + #[method_id(fontCollectionWithLocale:)] + pub unsafe fn fontCollectionWithLocale( + locale: &NSLocale, + ) -> Id; + #[method_id(fontCollectionWithName:)] + pub unsafe fn fontCollectionWithName( + name: &NSFontCollectionName, + ) -> Option>; + #[method_id(fontCollectionWithName:visibility:)] + pub unsafe fn fontCollectionWithName_visibility( + name: &NSFontCollectionName, + visibility: NSFontCollectionVisibility, + ) -> Option>; + #[method_id(queryDescriptors)] + pub unsafe fn queryDescriptors(&self) -> Option, Shared>>; + #[method(setQueryDescriptors:)] + pub unsafe fn setQueryDescriptors( + &self, + queryDescriptors: Option<&NSArray>, + ); + #[method_id(exclusionDescriptors)] + pub unsafe fn exclusionDescriptors(&self) -> Option, Shared>>; + #[method(setExclusionDescriptors:)] + pub unsafe fn setExclusionDescriptors( + &self, + exclusionDescriptors: Option<&NSArray>, + ); + #[method(addQueryForDescriptors:)] + pub unsafe fn addQueryForDescriptors(&self, descriptors: &NSArray); + #[method(removeQueryForDescriptors:)] + pub unsafe fn removeQueryForDescriptors(&self, descriptors: &NSArray); + } +); +pub type NSFontCollectionUserInfoKey = NSString; +pub type NSFontCollectionActionTypeKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs new file mode 100644 index 000000000..46a802aa8 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -0,0 +1,125 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSSet::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSFontSymbolicTraits = u32; +use super::__exported::NSAffineTransform; +pub type NSFontDescriptorAttributeName = NSString; +pub type NSFontDescriptorTraitKey = NSString; +pub type NSFontDescriptorVariationKey = NSString; +pub type NSFontDescriptorFeatureKey = NSString; +pub type NSFontWeight = CGFloat; +pub type NSFontDescriptorSystemDesign = NSString; +pub type NSFontTextStyle = NSString; +pub type NSFontTextStyleOptionKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSFontDescriptor; + unsafe impl ClassType for NSFontDescriptor { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSFontDescriptor { + #[method_id(postscriptName)] + pub unsafe fn postscriptName(&self) -> Option>; + #[method(pointSize)] + pub unsafe fn pointSize(&self) -> CGFloat; + #[method_id(matrix)] + pub unsafe fn matrix(&self) -> Option>; + #[method(symbolicTraits)] + pub unsafe fn symbolicTraits(&self) -> NSFontDescriptorSymbolicTraits; + #[method(requiresFontAssetRequest)] + pub unsafe fn requiresFontAssetRequest(&self) -> bool; + #[method_id(objectForKey:)] + pub unsafe fn objectForKey( + &self, + attribute: &NSFontDescriptorAttributeName, + ) -> Option>; + #[method_id(fontAttributes)] + pub unsafe fn fontAttributes( + &self, + ) -> Id, Shared>; + #[method_id(fontDescriptorWithFontAttributes:)] + pub unsafe fn fontDescriptorWithFontAttributes( + attributes: Option<&NSDictionary>, + ) -> Id; + #[method_id(fontDescriptorWithName:size:)] + pub unsafe fn fontDescriptorWithName_size( + fontName: &NSString, + size: CGFloat, + ) -> Id; + #[method_id(fontDescriptorWithName:matrix:)] + pub unsafe fn fontDescriptorWithName_matrix( + fontName: &NSString, + matrix: &NSAffineTransform, + ) -> Id; + #[method_id(initWithFontAttributes:)] + pub unsafe fn initWithFontAttributes( + &self, + attributes: Option<&NSDictionary>, + ) -> Id; + #[method_id(matchingFontDescriptorsWithMandatoryKeys:)] + pub unsafe fn matchingFontDescriptorsWithMandatoryKeys( + &self, + mandatoryKeys: Option<&NSSet>, + ) -> Id, Shared>; + #[method_id(matchingFontDescriptorWithMandatoryKeys:)] + pub unsafe fn matchingFontDescriptorWithMandatoryKeys( + &self, + mandatoryKeys: Option<&NSSet>, + ) -> Option>; + #[method_id(fontDescriptorByAddingAttributes:)] + pub unsafe fn fontDescriptorByAddingAttributes( + &self, + attributes: &NSDictionary, + ) -> Id; + #[method_id(fontDescriptorWithSymbolicTraits:)] + pub unsafe fn fontDescriptorWithSymbolicTraits( + &self, + symbolicTraits: NSFontDescriptorSymbolicTraits, + ) -> Id; + #[method_id(fontDescriptorWithSize:)] + pub unsafe fn fontDescriptorWithSize( + &self, + newPointSize: CGFloat, + ) -> Id; + #[method_id(fontDescriptorWithMatrix:)] + pub unsafe fn fontDescriptorWithMatrix( + &self, + matrix: &NSAffineTransform, + ) -> Id; + #[method_id(fontDescriptorWithFace:)] + pub unsafe fn fontDescriptorWithFace( + &self, + newFace: &NSString, + ) -> Id; + #[method_id(fontDescriptorWithFamily:)] + pub unsafe fn fontDescriptorWithFamily( + &self, + newFamily: &NSString, + ) -> Id; + #[method_id(fontDescriptorWithDesign:)] + pub unsafe fn fontDescriptorWithDesign( + &self, + design: &NSFontDescriptorSystemDesign, + ) -> Option>; + } +); +pub type NSFontFamilyClass = u32; +extern_methods!( + #[doc = "NSFontDescriptor_TextStyles"] + unsafe impl NSFontDescriptor { + #[method_id(preferredFontDescriptorForTextStyle:options:)] + pub unsafe fn preferredFontDescriptorForTextStyle_options( + style: &NSFontTextStyle, + options: &NSDictionary, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSFontManager.rs b/crates/icrate/src/generated/AppKit/NSFontManager.rs new file mode 100644 index 000000000..423961236 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSFontManager.rs @@ -0,0 +1,219 @@ +use super::__exported::NSFont; +use super::__exported::NSFontDescriptor; +use super::__exported::NSFontPanel; +use super::__exported::NSMenu; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSMenu::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSFontManager; + unsafe impl ClassType for NSFontManager { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSFontManager { + #[method(setFontPanelFactory:)] + pub unsafe fn setFontPanelFactory(factoryId: Option<&Class>); + #[method(setFontManagerFactory:)] + pub unsafe fn setFontManagerFactory(factoryId: Option<&Class>); + #[method_id(sharedFontManager)] + pub unsafe fn sharedFontManager() -> Id; + #[method(isMultiple)] + pub unsafe fn isMultiple(&self) -> bool; + #[method_id(selectedFont)] + pub unsafe fn selectedFont(&self) -> Option>; + #[method(setSelectedFont:isMultiple:)] + pub unsafe fn setSelectedFont_isMultiple(&self, fontObj: &NSFont, flag: bool); + #[method(setFontMenu:)] + pub unsafe fn setFontMenu(&self, newMenu: &NSMenu); + #[method_id(fontMenu:)] + pub unsafe fn fontMenu(&self, create: bool) -> Option>; + #[method_id(fontPanel:)] + pub unsafe fn fontPanel(&self, create: bool) -> Option>; + #[method_id(fontWithFamily:traits:weight:size:)] + pub unsafe fn fontWithFamily_traits_weight_size( + &self, + family: &NSString, + traits: NSFontTraitMask, + weight: NSInteger, + size: CGFloat, + ) -> Option>; + #[method(traitsOfFont:)] + pub unsafe fn traitsOfFont(&self, fontObj: &NSFont) -> NSFontTraitMask; + #[method(weightOfFont:)] + pub unsafe fn weightOfFont(&self, fontObj: &NSFont) -> NSInteger; + #[method_id(availableFonts)] + pub unsafe fn availableFonts(&self) -> Id, Shared>; + #[method_id(availableFontFamilies)] + pub unsafe fn availableFontFamilies(&self) -> Id, Shared>; + #[method_id(availableMembersOfFontFamily:)] + pub unsafe fn availableMembersOfFontFamily( + &self, + fam: &NSString, + ) -> Option, Shared>>; + #[method_id(convertFont:)] + pub unsafe fn convertFont(&self, fontObj: &NSFont) -> Id; + #[method_id(convertFont:toSize:)] + pub unsafe fn convertFont_toSize( + &self, + fontObj: &NSFont, + size: CGFloat, + ) -> Id; + #[method_id(convertFont:toFace:)] + pub unsafe fn convertFont_toFace( + &self, + fontObj: &NSFont, + typeface: &NSString, + ) -> Option>; + #[method_id(convertFont:toFamily:)] + pub unsafe fn convertFont_toFamily( + &self, + fontObj: &NSFont, + family: &NSString, + ) -> Id; + #[method_id(convertFont:toHaveTrait:)] + pub unsafe fn convertFont_toHaveTrait( + &self, + fontObj: &NSFont, + trait_: NSFontTraitMask, + ) -> Id; + #[method_id(convertFont:toNotHaveTrait:)] + pub unsafe fn convertFont_toNotHaveTrait( + &self, + fontObj: &NSFont, + trait_: NSFontTraitMask, + ) -> Id; + #[method_id(convertWeight:ofFont:)] + pub unsafe fn convertWeight_ofFont( + &self, + upFlag: bool, + fontObj: &NSFont, + ) -> Id; + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method(action)] + pub unsafe fn action(&self) -> Sel; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Sel); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&Object>); + #[method(sendAction)] + pub unsafe fn sendAction(&self) -> bool; + #[method_id(localizedNameForFamily:face:)] + pub unsafe fn localizedNameForFamily_face( + &self, + family: &NSString, + faceKey: Option<&NSString>, + ) -> Id; + #[method(setSelectedAttributes:isMultiple:)] + pub unsafe fn setSelectedAttributes_isMultiple( + &self, + attributes: &NSDictionary, + flag: bool, + ); + #[method_id(convertAttributes:)] + pub unsafe fn convertAttributes( + &self, + attributes: &NSDictionary, + ) -> Id, Shared>; + #[method_id(availableFontNamesMatchingFontDescriptor:)] + pub unsafe fn availableFontNamesMatchingFontDescriptor( + &self, + descriptor: &NSFontDescriptor, + ) -> Option>; + #[method_id(collectionNames)] + pub unsafe fn collectionNames(&self) -> Id; + #[method_id(fontDescriptorsInCollection:)] + pub unsafe fn fontDescriptorsInCollection( + &self, + collectionNames: &NSString, + ) -> Option>; + #[method(addCollection:options:)] + pub unsafe fn addCollection_options( + &self, + collectionName: &NSString, + collectionOptions: NSFontCollectionOptions, + ) -> bool; + #[method(removeCollection:)] + pub unsafe fn removeCollection(&self, collectionName: &NSString) -> bool; + #[method(addFontDescriptors:toCollection:)] + pub unsafe fn addFontDescriptors_toCollection( + &self, + descriptors: &NSArray, + collectionName: &NSString, + ); + #[method(removeFontDescriptor:fromCollection:)] + pub unsafe fn removeFontDescriptor_fromCollection( + &self, + descriptor: &NSFontDescriptor, + collection: &NSString, + ); + #[method(currentFontAction)] + pub unsafe fn currentFontAction(&self) -> NSFontAction; + #[method(convertFontTraits:)] + pub unsafe fn convertFontTraits(&self, traits: NSFontTraitMask) -> NSFontTraitMask; + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + } +); +extern_methods!( + #[doc = "NSFontManagerMenuActionMethods"] + unsafe impl NSFontManager { + #[method(fontNamed:hasTraits:)] + pub unsafe fn fontNamed_hasTraits( + &self, + fName: &NSString, + someTraits: NSFontTraitMask, + ) -> bool; + #[method_id(availableFontNamesWithTraits:)] + pub unsafe fn availableFontNamesWithTraits( + &self, + someTraits: NSFontTraitMask, + ) -> Option, Shared>>; + #[method(addFontTrait:)] + pub unsafe fn addFontTrait(&self, sender: Option<&Object>); + #[method(removeFontTrait:)] + pub unsafe fn removeFontTrait(&self, sender: Option<&Object>); + #[method(modifyFontViaPanel:)] + pub unsafe fn modifyFontViaPanel(&self, sender: Option<&Object>); + #[method(modifyFont:)] + pub unsafe fn modifyFont(&self, sender: Option<&Object>); + #[method(orderFrontFontPanel:)] + pub unsafe fn orderFrontFontPanel(&self, sender: Option<&Object>); + #[method(orderFrontStylesPanel:)] + pub unsafe fn orderFrontStylesPanel(&self, sender: Option<&Object>); + } +); +extern_methods!( + #[doc = "NSFontManagerDelegate"] + unsafe impl NSObject { + #[method(fontManager:willIncludeFont:)] + pub unsafe fn fontManager_willIncludeFont( + &self, + sender: &Object, + fontName: &NSString, + ) -> bool; + } +); +extern_methods!( + #[doc = "NSFontManagerResponderMethod"] + unsafe impl NSObject { + #[method(changeFont:)] + pub unsafe fn changeFont(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs new file mode 100644 index 000000000..b543175dd --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -0,0 +1,54 @@ +use super::__exported::NSFont; +use super::__exported::NSFontDescriptor; +use super::__exported::NSFontManager; +use super::__exported::NSMutableArray; +use super::__exported::NSMutableDictionary; +use super::__exported::NSTableView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSPanel::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSFontChanging = NSObject; +extern_methods!( + #[doc = "NSFontPanelValidationAdditions"] + unsafe impl NSObject { + #[method(validModesForFontPanel:)] + pub unsafe fn validModesForFontPanel(&self, fontPanel: &NSFontPanel) + -> NSFontPanelModeMask; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSFontPanel; + unsafe impl ClassType for NSFontPanel { + type Super = NSPanel; + } +); +extern_methods!( + unsafe impl NSFontPanel { + #[method_id(sharedFontPanel)] + pub unsafe fn sharedFontPanel() -> Id; + #[method(sharedFontPanelExists)] + pub unsafe fn sharedFontPanelExists() -> bool; + #[method_id(accessoryView)] + pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method(setPanelFont:isMultiple:)] + pub unsafe fn setPanelFont_isMultiple(&self, fontObj: &NSFont, flag: bool); + #[method_id(panelConvertFont:)] + pub unsafe fn panelConvertFont(&self, fontObj: &NSFont) -> Id; + #[method(worksWhenModal)] + pub unsafe fn worksWhenModal(&self) -> bool; + #[method(setWorksWhenModal:)] + pub unsafe fn setWorksWhenModal(&self, worksWhenModal: bool); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method(reloadDefaultFontFamilies)] + pub unsafe fn reloadDefaultFontFamilies(&self); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSForm.rs b/crates/icrate/src/generated/AppKit/NSForm.rs new file mode 100644 index 000000000..00dfdd587 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSForm.rs @@ -0,0 +1,64 @@ +use super::__exported::NSFormCell; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSMatrix::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSForm; + unsafe impl ClassType for NSForm { + type Super = NSMatrix; + } +); +extern_methods!( + unsafe impl NSForm { + #[method(indexOfSelectedItem)] + pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(setEntryWidth:)] + pub unsafe fn setEntryWidth(&self, width: CGFloat); + #[method(setInterlineSpacing:)] + pub unsafe fn setInterlineSpacing(&self, spacing: CGFloat); + #[method(setBordered:)] + pub unsafe fn setBordered(&self, flag: bool); + #[method(setBezeled:)] + pub unsafe fn setBezeled(&self, flag: bool); + #[method(setTitleAlignment:)] + pub unsafe fn setTitleAlignment(&self, mode: NSTextAlignment); + #[method(setTextAlignment:)] + pub unsafe fn setTextAlignment(&self, mode: NSTextAlignment); + #[method(setTitleFont:)] + pub unsafe fn setTitleFont(&self, fontObj: &NSFont); + #[method(setTextFont:)] + pub unsafe fn setTextFont(&self, fontObj: &NSFont); + #[method_id(cellAtIndex:)] + pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Option>; + #[method(drawCellAtIndex:)] + pub unsafe fn drawCellAtIndex(&self, index: NSInteger); + #[method_id(addEntry:)] + pub unsafe fn addEntry(&self, title: &NSString) -> Id; + #[method_id(insertEntry:atIndex:)] + pub unsafe fn insertEntry_atIndex( + &self, + title: &NSString, + index: NSInteger, + ) -> Option>; + #[method(removeEntryAtIndex:)] + pub unsafe fn removeEntryAtIndex(&self, index: NSInteger); + #[method(indexOfCellWithTag:)] + pub unsafe fn indexOfCellWithTag(&self, tag: NSInteger) -> NSInteger; + #[method(selectTextAtIndex:)] + pub unsafe fn selectTextAtIndex(&self, index: NSInteger); + #[method(setFrameSize:)] + pub unsafe fn setFrameSize(&self, newSize: NSSize); + #[method(setTitleBaseWritingDirection:)] + pub unsafe fn setTitleBaseWritingDirection(&self, writingDirection: NSWritingDirection); + #[method(setTextBaseWritingDirection:)] + pub unsafe fn setTextBaseWritingDirection(&self, writingDirection: NSWritingDirection); + #[method(setPreferredTextFieldWidth:)] + pub unsafe fn setPreferredTextFieldWidth(&self, preferredWidth: CGFloat); + #[method(preferredTextFieldWidth)] + pub unsafe fn preferredTextFieldWidth(&self) -> CGFloat; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSFormCell.rs b/crates/icrate/src/generated/AppKit/NSFormCell.rs new file mode 100644 index 000000000..4bb797224 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSFormCell.rs @@ -0,0 +1,81 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSActionCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSFormCell; + unsafe impl ClassType for NSFormCell { + type Super = NSActionCell; + } +); +extern_methods!( + unsafe impl NSFormCell { + #[method_id(initTextCell:)] + pub unsafe fn initTextCell(&self, string: Option<&NSString>) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initImageCell:)] + pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method(titleWidth:)] + pub unsafe fn titleWidth(&self, size: NSSize) -> CGFloat; + #[method(titleWidth)] + pub unsafe fn titleWidth(&self) -> CGFloat; + #[method(setTitleWidth:)] + pub unsafe fn setTitleWidth(&self, titleWidth: CGFloat); + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(titleFont)] + pub unsafe fn titleFont(&self) -> Id; + #[method(setTitleFont:)] + pub unsafe fn setTitleFont(&self, titleFont: &NSFont); + #[method(isOpaque)] + pub unsafe fn isOpaque(&self) -> bool; + #[method_id(placeholderString)] + pub unsafe fn placeholderString(&self) -> Option>; + #[method(setPlaceholderString:)] + pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); + #[method_id(placeholderAttributedString)] + pub unsafe fn placeholderAttributedString(&self) -> Option>; + #[method(setPlaceholderAttributedString:)] + pub unsafe fn setPlaceholderAttributedString( + &self, + placeholderAttributedString: Option<&NSAttributedString>, + ); + #[method(titleAlignment)] + pub unsafe fn titleAlignment(&self) -> NSTextAlignment; + #[method(setTitleAlignment:)] + pub unsafe fn setTitleAlignment(&self, titleAlignment: NSTextAlignment); + #[method(titleBaseWritingDirection)] + pub unsafe fn titleBaseWritingDirection(&self) -> NSWritingDirection; + #[method(setTitleBaseWritingDirection:)] + pub unsafe fn setTitleBaseWritingDirection( + &self, + titleBaseWritingDirection: NSWritingDirection, + ); + #[method(preferredTextFieldWidth)] + pub unsafe fn preferredTextFieldWidth(&self) -> CGFloat; + #[method(setPreferredTextFieldWidth:)] + pub unsafe fn setPreferredTextFieldWidth(&self, preferredTextFieldWidth: CGFloat); + } +); +extern_methods!( + #[doc = "NSKeyboardUI"] + unsafe impl NSFormCell { + #[method(setTitleWithMnemonic:)] + pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); + } +); +extern_methods!( + #[doc = "NSFormCellAttributedStringMethods"] + unsafe impl NSFormCell { + #[method_id(attributedTitle)] + pub unsafe fn attributedTitle(&self) -> Id; + #[method(setAttributedTitle:)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs new file mode 100644 index 000000000..e6224a659 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -0,0 +1,171 @@ +use super::__exported::NSEvent; +use super::__exported::NSPressureConfiguration; +use super::__exported::NSTouch; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTouch::*; +use crate::CoreGraphics::generated::CoreGraphics::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSGestureRecognizer; + unsafe impl ClassType for NSGestureRecognizer { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSGestureRecognizer { + #[method_id(initWithTarget:action:)] + pub unsafe fn initWithTarget_action( + &self, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method(state)] + pub unsafe fn state(&self) -> NSGestureRecognizerState; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSGestureRecognizerDelegate>); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method_id(pressureConfiguration)] + pub unsafe fn pressureConfiguration(&self) -> Id; + #[method(setPressureConfiguration:)] + pub unsafe fn setPressureConfiguration( + &self, + pressureConfiguration: &NSPressureConfiguration, + ); + #[method(delaysPrimaryMouseButtonEvents)] + pub unsafe fn delaysPrimaryMouseButtonEvents(&self) -> bool; + #[method(setDelaysPrimaryMouseButtonEvents:)] + pub unsafe fn setDelaysPrimaryMouseButtonEvents( + &self, + delaysPrimaryMouseButtonEvents: bool, + ); + #[method(delaysSecondaryMouseButtonEvents)] + pub unsafe fn delaysSecondaryMouseButtonEvents(&self) -> bool; + #[method(setDelaysSecondaryMouseButtonEvents:)] + pub unsafe fn setDelaysSecondaryMouseButtonEvents( + &self, + delaysSecondaryMouseButtonEvents: bool, + ); + #[method(delaysOtherMouseButtonEvents)] + pub unsafe fn delaysOtherMouseButtonEvents(&self) -> bool; + #[method(setDelaysOtherMouseButtonEvents:)] + pub unsafe fn setDelaysOtherMouseButtonEvents(&self, delaysOtherMouseButtonEvents: bool); + #[method(delaysKeyEvents)] + pub unsafe fn delaysKeyEvents(&self) -> bool; + #[method(setDelaysKeyEvents:)] + pub unsafe fn setDelaysKeyEvents(&self, delaysKeyEvents: bool); + #[method(delaysMagnificationEvents)] + pub unsafe fn delaysMagnificationEvents(&self) -> bool; + #[method(setDelaysMagnificationEvents:)] + pub unsafe fn setDelaysMagnificationEvents(&self, delaysMagnificationEvents: bool); + #[method(delaysRotationEvents)] + pub unsafe fn delaysRotationEvents(&self) -> bool; + #[method(setDelaysRotationEvents:)] + pub unsafe fn setDelaysRotationEvents(&self, delaysRotationEvents: bool); + #[method(locationInView:)] + pub unsafe fn locationInView(&self, view: Option<&NSView>) -> NSPoint; + } +); +extern_methods!( + #[doc = "NSTouchBar"] + unsafe impl NSGestureRecognizer { + #[method(allowedTouchTypes)] + pub unsafe fn allowedTouchTypes(&self) -> NSTouchTypeMask; + #[method(setAllowedTouchTypes:)] + pub unsafe fn setAllowedTouchTypes(&self, allowedTouchTypes: NSTouchTypeMask); + } +); +pub type NSGestureRecognizerDelegate = NSObject; +extern_methods!( + #[doc = "NSSubclassUse"] + unsafe impl NSGestureRecognizer { + #[method(state)] + pub unsafe fn state(&self) -> NSGestureRecognizerState; + #[method(setState:)] + pub unsafe fn setState(&self, state: NSGestureRecognizerState); + #[method(reset)] + pub unsafe fn reset(&self); + #[method(canPreventGestureRecognizer:)] + pub unsafe fn canPreventGestureRecognizer( + &self, + preventedGestureRecognizer: &NSGestureRecognizer, + ) -> bool; + #[method(canBePreventedByGestureRecognizer:)] + pub unsafe fn canBePreventedByGestureRecognizer( + &self, + preventingGestureRecognizer: &NSGestureRecognizer, + ) -> bool; + #[method(shouldRequireFailureOfGestureRecognizer:)] + pub unsafe fn shouldRequireFailureOfGestureRecognizer( + &self, + otherGestureRecognizer: &NSGestureRecognizer, + ) -> bool; + #[method(shouldBeRequiredToFailByGestureRecognizer:)] + pub unsafe fn shouldBeRequiredToFailByGestureRecognizer( + &self, + otherGestureRecognizer: &NSGestureRecognizer, + ) -> bool; + #[method(mouseDown:)] + pub unsafe fn mouseDown(&self, event: &NSEvent); + #[method(rightMouseDown:)] + pub unsafe fn rightMouseDown(&self, event: &NSEvent); + #[method(otherMouseDown:)] + pub unsafe fn otherMouseDown(&self, event: &NSEvent); + #[method(mouseUp:)] + pub unsafe fn mouseUp(&self, event: &NSEvent); + #[method(rightMouseUp:)] + pub unsafe fn rightMouseUp(&self, event: &NSEvent); + #[method(otherMouseUp:)] + pub unsafe fn otherMouseUp(&self, event: &NSEvent); + #[method(mouseDragged:)] + pub unsafe fn mouseDragged(&self, event: &NSEvent); + #[method(rightMouseDragged:)] + pub unsafe fn rightMouseDragged(&self, event: &NSEvent); + #[method(otherMouseDragged:)] + pub unsafe fn otherMouseDragged(&self, event: &NSEvent); + #[method(keyDown:)] + pub unsafe fn keyDown(&self, event: &NSEvent); + #[method(keyUp:)] + pub unsafe fn keyUp(&self, event: &NSEvent); + #[method(flagsChanged:)] + pub unsafe fn flagsChanged(&self, event: &NSEvent); + #[method(tabletPoint:)] + pub unsafe fn tabletPoint(&self, event: &NSEvent); + #[method(magnifyWithEvent:)] + pub unsafe fn magnifyWithEvent(&self, event: &NSEvent); + #[method(rotateWithEvent:)] + pub unsafe fn rotateWithEvent(&self, event: &NSEvent); + #[method(pressureChangeWithEvent:)] + pub unsafe fn pressureChangeWithEvent(&self, event: &NSEvent); + #[method(touchesBeganWithEvent:)] + pub unsafe fn touchesBeganWithEvent(&self, event: &NSEvent); + #[method(touchesMovedWithEvent:)] + pub unsafe fn touchesMovedWithEvent(&self, event: &NSEvent); + #[method(touchesEndedWithEvent:)] + pub unsafe fn touchesEndedWithEvent(&self, event: &NSEvent); + #[method(touchesCancelledWithEvent:)] + pub unsafe fn touchesCancelledWithEvent(&self, event: &NSEvent); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs new file mode 100644 index 000000000..8151e6979 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs @@ -0,0 +1,28 @@ +use crate::AppKit::generated::NSFont::*; +use crate::Foundation::generated::NSAttributedString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSGlyphStorage = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSGlyphGenerator; + unsafe impl ClassType for NSGlyphGenerator { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSGlyphGenerator { + #[method(generateGlyphsForGlyphStorage:desiredNumberOfCharacters:glyphIndex:characterIndex:)] + pub unsafe fn generateGlyphsForGlyphStorage_desiredNumberOfCharacters_glyphIndex_characterIndex( + &self, + glyphStorage: &NSGlyphStorage, + nChars: NSUInteger, + glyphIndex: *mut NSUInteger, + charIndex: *mut NSUInteger, + ); + #[method_id(sharedGlyphGenerator)] + pub unsafe fn sharedGlyphGenerator() -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs new file mode 100644 index 000000000..a65bacd73 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs @@ -0,0 +1,56 @@ +use crate::AppKit::generated::NSFont::*; +use crate::Foundation::generated::NSString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSGlyphInfo; + unsafe impl ClassType for NSGlyphInfo { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSGlyphInfo { + #[method_id(glyphInfoWithCGGlyph:forFont:baseString:)] + pub unsafe fn glyphInfoWithCGGlyph_forFont_baseString( + glyph: CGGlyph, + font: &NSFont, + string: &NSString, + ) -> Option>; + #[method(glyphID)] + pub unsafe fn glyphID(&self) -> CGGlyph; + #[method_id(baseString)] + pub unsafe fn baseString(&self) -> Id; + } +); +extern_methods!( + #[doc = "NSGlyphInfo_Deprecated"] + unsafe impl NSGlyphInfo { + #[method_id(glyphInfoWithGlyphName:forFont:baseString:)] + pub unsafe fn glyphInfoWithGlyphName_forFont_baseString( + glyphName: &NSString, + font: &NSFont, + string: &NSString, + ) -> Option>; + #[method_id(glyphInfoWithGlyph:forFont:baseString:)] + pub unsafe fn glyphInfoWithGlyph_forFont_baseString( + glyph: NSGlyph, + font: &NSFont, + string: &NSString, + ) -> Option>; + #[method_id(glyphInfoWithCharacterIdentifier:collection:baseString:)] + pub unsafe fn glyphInfoWithCharacterIdentifier_collection_baseString( + cid: NSUInteger, + characterCollection: NSCharacterCollection, + string: &NSString, + ) -> Option>; + #[method_id(glyphName)] + pub unsafe fn glyphName(&self) -> Option>; + #[method(characterIdentifier)] + pub unsafe fn characterIdentifier(&self) -> NSUInteger; + #[method(characterCollection)] + pub unsafe fn characterCollection(&self) -> NSCharacterCollection; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs new file mode 100644 index 000000000..412781cf2 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSGradient.rs @@ -0,0 +1,87 @@ +use super::__exported::NSBezierPath; +use super::__exported::NSColor; +use super::__exported::NSColorSpace; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSGradient; + unsafe impl ClassType for NSGradient { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSGradient { + #[method_id(initWithStartingColor:endingColor:)] + pub unsafe fn initWithStartingColor_endingColor( + &self, + startingColor: &NSColor, + endingColor: &NSColor, + ) -> Option>; + #[method_id(initWithColors:)] + pub unsafe fn initWithColors( + &self, + colorArray: &NSArray, + ) -> Option>; + #[method_id(initWithColors:atLocations:colorSpace:)] + pub unsafe fn initWithColors_atLocations_colorSpace( + &self, + colorArray: &NSArray, + locations: *mut CGFloat, + colorSpace: &NSColorSpace, + ) -> Option>; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(drawFromPoint:toPoint:options:)] + pub unsafe fn drawFromPoint_toPoint_options( + &self, + startingPoint: NSPoint, + endingPoint: NSPoint, + options: NSGradientDrawingOptions, + ); + #[method(drawInRect:angle:)] + pub unsafe fn drawInRect_angle(&self, rect: NSRect, angle: CGFloat); + #[method(drawInBezierPath:angle:)] + pub unsafe fn drawInBezierPath_angle(&self, path: &NSBezierPath, angle: CGFloat); + #[method(drawFromCenter:radius:toCenter:radius:options:)] + pub unsafe fn drawFromCenter_radius_toCenter_radius_options( + &self, + startCenter: NSPoint, + startRadius: CGFloat, + endCenter: NSPoint, + endRadius: CGFloat, + options: NSGradientDrawingOptions, + ); + #[method(drawInRect:relativeCenterPosition:)] + pub unsafe fn drawInRect_relativeCenterPosition( + &self, + rect: NSRect, + relativeCenterPosition: NSPoint, + ); + #[method(drawInBezierPath:relativeCenterPosition:)] + pub unsafe fn drawInBezierPath_relativeCenterPosition( + &self, + path: &NSBezierPath, + relativeCenterPosition: NSPoint, + ); + #[method_id(colorSpace)] + pub unsafe fn colorSpace(&self) -> Id; + #[method(numberOfColorStops)] + pub unsafe fn numberOfColorStops(&self) -> NSInteger; + #[method(getColor:location:atIndex:)] + pub unsafe fn getColor_location_atIndex( + &self, + color: Option<&mut Id>, + location: *mut CGFloat, + index: NSInteger, + ); + #[method_id(interpolatedColorAtLocation:)] + pub unsafe fn interpolatedColorAtLocation(&self, location: CGFloat) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs new file mode 100644 index 000000000..70284da23 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSGraphics.rs @@ -0,0 +1,10 @@ +use super::__exported::NSColor; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSGeometry::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSColorSpaceName = NSString; +pub type NSDeviceDescriptionKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs new file mode 100644 index 000000000..101beebd2 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -0,0 +1,119 @@ +use super::__exported::NSBitmapImageRep; +use super::__exported::NSString; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSGraphics::*; +use crate::CoreGraphics::generated::CGContext::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSGraphicsContextAttributeKey = NSString; +pub type NSGraphicsContextRepresentationFormatName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSGraphicsContext; + unsafe impl ClassType for NSGraphicsContext { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSGraphicsContext { + #[method_id(graphicsContextWithAttributes:)] + pub unsafe fn graphicsContextWithAttributes( + attributes: &NSDictionary, + ) -> Option>; + #[method_id(graphicsContextWithWindow:)] + pub unsafe fn graphicsContextWithWindow(window: &NSWindow) + -> Id; + #[method_id(graphicsContextWithBitmapImageRep:)] + pub unsafe fn graphicsContextWithBitmapImageRep( + bitmapRep: &NSBitmapImageRep, + ) -> Option>; + #[method_id(graphicsContextWithCGContext:flipped:)] + pub unsafe fn graphicsContextWithCGContext_flipped( + graphicsPort: CGContextRef, + initialFlippedState: bool, + ) -> Id; + #[method_id(currentContext)] + pub unsafe fn currentContext() -> Option>; + #[method(setCurrentContext:)] + pub unsafe fn setCurrentContext(currentContext: Option<&NSGraphicsContext>); + #[method(currentContextDrawingToScreen)] + pub unsafe fn currentContextDrawingToScreen() -> bool; + #[method(saveGraphicsState)] + pub unsafe fn saveGraphicsState(); + #[method(restoreGraphicsState)] + pub unsafe fn restoreGraphicsState(); + #[method_id(attributes)] + pub unsafe fn attributes( + &self, + ) -> Option, Shared>>; + #[method(isDrawingToScreen)] + pub unsafe fn isDrawingToScreen(&self) -> bool; + #[method(saveGraphicsState)] + pub unsafe fn saveGraphicsState(&self); + #[method(restoreGraphicsState)] + pub unsafe fn restoreGraphicsState(&self); + #[method(flushGraphics)] + pub unsafe fn flushGraphics(&self); + #[method(CGContext)] + pub unsafe fn CGContext(&self) -> CGContextRef; + #[method(isFlipped)] + pub unsafe fn isFlipped(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSGraphicsContext_RenderingOptions"] + unsafe impl NSGraphicsContext { + #[method(shouldAntialias)] + pub unsafe fn shouldAntialias(&self) -> bool; + #[method(setShouldAntialias:)] + pub unsafe fn setShouldAntialias(&self, shouldAntialias: bool); + #[method(imageInterpolation)] + pub unsafe fn imageInterpolation(&self) -> NSImageInterpolation; + #[method(setImageInterpolation:)] + pub unsafe fn setImageInterpolation(&self, imageInterpolation: NSImageInterpolation); + #[method(patternPhase)] + pub unsafe fn patternPhase(&self) -> NSPoint; + #[method(setPatternPhase:)] + pub unsafe fn setPatternPhase(&self, patternPhase: NSPoint); + #[method(compositingOperation)] + pub unsafe fn compositingOperation(&self) -> NSCompositingOperation; + #[method(setCompositingOperation:)] + pub unsafe fn setCompositingOperation(&self, compositingOperation: NSCompositingOperation); + #[method(colorRenderingIntent)] + pub unsafe fn colorRenderingIntent(&self) -> NSColorRenderingIntent; + #[method(setColorRenderingIntent:)] + pub unsafe fn setColorRenderingIntent(&self, colorRenderingIntent: NSColorRenderingIntent); + } +); +use super::__exported::CIContext; +extern_methods!( + #[doc = "NSQuartzCoreAdditions"] + unsafe impl NSGraphicsContext { + #[method_id(CIContext)] + pub unsafe fn CIContext(&self) -> Option>; + } +); +extern_methods!( + #[doc = "NSGraphicsContextDeprecated"] + unsafe impl NSGraphicsContext { + #[method(setGraphicsState:)] + pub unsafe fn setGraphicsState(gState: NSInteger); + #[method_id(focusStack)] + pub unsafe fn focusStack(&self) -> Option>; + #[method(setFocusStack:)] + pub unsafe fn setFocusStack(&self, stack: Option<&Object>); + #[method_id(graphicsContextWithGraphicsPort:flipped:)] + pub unsafe fn graphicsContextWithGraphicsPort_flipped( + graphicsPort: NonNull, + initialFlippedState: bool, + ) -> Id; + #[method(graphicsPort)] + pub unsafe fn graphicsPort(&self) -> NonNull; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs new file mode 100644 index 000000000..c6a9aaf64 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -0,0 +1,225 @@ +use super::__exported::NSLayoutConstraint; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSLayoutAnchor::*; +use crate::AppKit::generated::NSView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSGridView; + unsafe impl ClassType for NSGridView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSGridView { + #[method_id(initWithFrame:)] + pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(gridViewWithNumberOfColumns:rows:)] + pub unsafe fn gridViewWithNumberOfColumns_rows( + columnCount: NSInteger, + rowCount: NSInteger, + ) -> Id; + #[method_id(gridViewWithViews:)] + pub unsafe fn gridViewWithViews(rows: &NSArray>) -> Id; + #[method(numberOfRows)] + pub unsafe fn numberOfRows(&self) -> NSInteger; + #[method(numberOfColumns)] + pub unsafe fn numberOfColumns(&self) -> NSInteger; + #[method_id(rowAtIndex:)] + pub unsafe fn rowAtIndex(&self, index: NSInteger) -> Id; + #[method(indexOfRow:)] + pub unsafe fn indexOfRow(&self, row: &NSGridRow) -> NSInteger; + #[method_id(columnAtIndex:)] + pub unsafe fn columnAtIndex(&self, index: NSInteger) -> Id; + #[method(indexOfColumn:)] + pub unsafe fn indexOfColumn(&self, column: &NSGridColumn) -> NSInteger; + #[method_id(cellAtColumnIndex:rowIndex:)] + pub unsafe fn cellAtColumnIndex_rowIndex( + &self, + columnIndex: NSInteger, + rowIndex: NSInteger, + ) -> Id; + #[method_id(cellForView:)] + pub unsafe fn cellForView(&self, view: &NSView) -> Option>; + #[method_id(addRowWithViews:)] + pub unsafe fn addRowWithViews(&self, views: &NSArray) -> Id; + #[method_id(insertRowAtIndex:withViews:)] + pub unsafe fn insertRowAtIndex_withViews( + &self, + index: NSInteger, + views: &NSArray, + ) -> Id; + #[method(moveRowAtIndex:toIndex:)] + pub unsafe fn moveRowAtIndex_toIndex(&self, fromIndex: NSInteger, toIndex: NSInteger); + #[method(removeRowAtIndex:)] + pub unsafe fn removeRowAtIndex(&self, index: NSInteger); + #[method_id(addColumnWithViews:)] + pub unsafe fn addColumnWithViews( + &self, + views: &NSArray, + ) -> Id; + #[method_id(insertColumnAtIndex:withViews:)] + pub unsafe fn insertColumnAtIndex_withViews( + &self, + index: NSInteger, + views: &NSArray, + ) -> Id; + #[method(moveColumnAtIndex:toIndex:)] + pub unsafe fn moveColumnAtIndex_toIndex(&self, fromIndex: NSInteger, toIndex: NSInteger); + #[method(removeColumnAtIndex:)] + pub unsafe fn removeColumnAtIndex(&self, index: NSInteger); + #[method(xPlacement)] + pub unsafe fn xPlacement(&self) -> NSGridCellPlacement; + #[method(setXPlacement:)] + pub unsafe fn setXPlacement(&self, xPlacement: NSGridCellPlacement); + #[method(yPlacement)] + pub unsafe fn yPlacement(&self) -> NSGridCellPlacement; + #[method(setYPlacement:)] + pub unsafe fn setYPlacement(&self, yPlacement: NSGridCellPlacement); + #[method(rowAlignment)] + pub unsafe fn rowAlignment(&self) -> NSGridRowAlignment; + #[method(setRowAlignment:)] + pub unsafe fn setRowAlignment(&self, rowAlignment: NSGridRowAlignment); + #[method(rowSpacing)] + pub unsafe fn rowSpacing(&self) -> CGFloat; + #[method(setRowSpacing:)] + pub unsafe fn setRowSpacing(&self, rowSpacing: CGFloat); + #[method(columnSpacing)] + pub unsafe fn columnSpacing(&self) -> CGFloat; + #[method(setColumnSpacing:)] + pub unsafe fn setColumnSpacing(&self, columnSpacing: CGFloat); + #[method(mergeCellsInHorizontalRange:verticalRange:)] + pub unsafe fn mergeCellsInHorizontalRange_verticalRange( + &self, + hRange: NSRange, + vRange: NSRange, + ); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSGridRow; + unsafe impl ClassType for NSGridRow { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSGridRow { + #[method_id(gridView)] + pub unsafe fn gridView(&self) -> Option>; + #[method(numberOfCells)] + pub unsafe fn numberOfCells(&self) -> NSInteger; + #[method_id(cellAtIndex:)] + pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Id; + #[method(yPlacement)] + pub unsafe fn yPlacement(&self) -> NSGridCellPlacement; + #[method(setYPlacement:)] + pub unsafe fn setYPlacement(&self, yPlacement: NSGridCellPlacement); + #[method(rowAlignment)] + pub unsafe fn rowAlignment(&self) -> NSGridRowAlignment; + #[method(setRowAlignment:)] + pub unsafe fn setRowAlignment(&self, rowAlignment: NSGridRowAlignment); + #[method(height)] + pub unsafe fn height(&self) -> CGFloat; + #[method(setHeight:)] + pub unsafe fn setHeight(&self, height: CGFloat); + #[method(topPadding)] + pub unsafe fn topPadding(&self) -> CGFloat; + #[method(setTopPadding:)] + pub unsafe fn setTopPadding(&self, topPadding: CGFloat); + #[method(bottomPadding)] + pub unsafe fn bottomPadding(&self) -> CGFloat; + #[method(setBottomPadding:)] + pub unsafe fn setBottomPadding(&self, bottomPadding: CGFloat); + #[method(isHidden)] + pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool); + #[method(mergeCellsInRange:)] + pub unsafe fn mergeCellsInRange(&self, range: NSRange); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSGridColumn; + unsafe impl ClassType for NSGridColumn { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSGridColumn { + #[method_id(gridView)] + pub unsafe fn gridView(&self) -> Option>; + #[method(numberOfCells)] + pub unsafe fn numberOfCells(&self) -> NSInteger; + #[method_id(cellAtIndex:)] + pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Id; + #[method(xPlacement)] + pub unsafe fn xPlacement(&self) -> NSGridCellPlacement; + #[method(setXPlacement:)] + pub unsafe fn setXPlacement(&self, xPlacement: NSGridCellPlacement); + #[method(width)] + pub unsafe fn width(&self) -> CGFloat; + #[method(setWidth:)] + pub unsafe fn setWidth(&self, width: CGFloat); + #[method(leadingPadding)] + pub unsafe fn leadingPadding(&self) -> CGFloat; + #[method(setLeadingPadding:)] + pub unsafe fn setLeadingPadding(&self, leadingPadding: CGFloat); + #[method(trailingPadding)] + pub unsafe fn trailingPadding(&self) -> CGFloat; + #[method(setTrailingPadding:)] + pub unsafe fn setTrailingPadding(&self, trailingPadding: CGFloat); + #[method(isHidden)] + pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool); + #[method(mergeCellsInRange:)] + pub unsafe fn mergeCellsInRange(&self, range: NSRange); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSGridCell; + unsafe impl ClassType for NSGridCell { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSGridCell { + #[method_id(contentView)] + pub unsafe fn contentView(&self) -> Option>; + #[method(setContentView:)] + pub unsafe fn setContentView(&self, contentView: Option<&NSView>); + #[method_id(emptyContentView)] + pub unsafe fn emptyContentView() -> Id; + #[method_id(row)] + pub unsafe fn row(&self) -> Option>; + #[method_id(column)] + pub unsafe fn column(&self) -> Option>; + #[method(xPlacement)] + pub unsafe fn xPlacement(&self) -> NSGridCellPlacement; + #[method(setXPlacement:)] + pub unsafe fn setXPlacement(&self, xPlacement: NSGridCellPlacement); + #[method(yPlacement)] + pub unsafe fn yPlacement(&self) -> NSGridCellPlacement; + #[method(setYPlacement:)] + pub unsafe fn setYPlacement(&self, yPlacement: NSGridCellPlacement); + #[method(rowAlignment)] + pub unsafe fn rowAlignment(&self) -> NSGridRowAlignment; + #[method(setRowAlignment:)] + pub unsafe fn setRowAlignment(&self, rowAlignment: NSGridRowAlignment); + #[method_id(customPlacementConstraints)] + pub unsafe fn customPlacementConstraints(&self) -> Id, Shared>; + #[method(setCustomPlacementConstraints:)] + pub unsafe fn setCustomPlacementConstraints( + &self, + customPlacementConstraints: &NSArray, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs new file mode 100644 index 000000000..86066b8e6 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs @@ -0,0 +1,69 @@ +use crate::AppKit::generated::NSTouchBarItem::*; +use crate::AppKit::generated::NSUserInterfaceCompression::*; +use crate::AppKit::generated::NSUserInterfaceLayout::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSGroupTouchBarItem; + unsafe impl ClassType for NSGroupTouchBarItem { + type Super = NSTouchBarItem; + } +); +extern_methods!( + unsafe impl NSGroupTouchBarItem { + #[method_id(groupItemWithIdentifier:items:)] + pub unsafe fn groupItemWithIdentifier_items( + identifier: &NSTouchBarItemIdentifier, + items: &NSArray, + ) -> Id; + #[method_id(groupItemWithIdentifier:items:allowedCompressionOptions:)] + pub unsafe fn groupItemWithIdentifier_items_allowedCompressionOptions( + identifier: &NSTouchBarItemIdentifier, + items: &NSArray, + allowedCompressionOptions: &NSUserInterfaceCompressionOptions, + ) -> Id; + #[method_id(alertStyleGroupItemWithIdentifier:)] + pub unsafe fn alertStyleGroupItemWithIdentifier( + identifier: &NSTouchBarItemIdentifier, + ) -> Id; + #[method_id(groupTouchBar)] + pub unsafe fn groupTouchBar(&self) -> Id; + #[method(setGroupTouchBar:)] + pub unsafe fn setGroupTouchBar(&self, groupTouchBar: &NSTouchBar); + #[method_id(customizationLabel)] + pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] + pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + #[method(groupUserInterfaceLayoutDirection)] + pub unsafe fn groupUserInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setGroupUserInterfaceLayoutDirection:)] + pub unsafe fn setGroupUserInterfaceLayoutDirection( + &self, + groupUserInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, + ); + #[method(prefersEqualWidths)] + pub unsafe fn prefersEqualWidths(&self) -> bool; + #[method(setPrefersEqualWidths:)] + pub unsafe fn setPrefersEqualWidths(&self, prefersEqualWidths: bool); + #[method(preferredItemWidth)] + pub unsafe fn preferredItemWidth(&self) -> CGFloat; + #[method(setPreferredItemWidth:)] + pub unsafe fn setPreferredItemWidth(&self, preferredItemWidth: CGFloat); + #[method_id(effectiveCompressionOptions)] + pub unsafe fn effectiveCompressionOptions( + &self, + ) -> Id; + #[method_id(prioritizedCompressionOptions)] + pub unsafe fn prioritizedCompressionOptions( + &self, + ) -> Id, Shared>; + #[method(setPrioritizedCompressionOptions:)] + pub unsafe fn setPrioritizedCompressionOptions( + &self, + prioritizedCompressionOptions: &NSArray, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs new file mode 100644 index 000000000..7ddea1999 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs @@ -0,0 +1,21 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSHapticFeedbackPerformer = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSHapticFeedbackManager; + unsafe impl ClassType for NSHapticFeedbackManager { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSHapticFeedbackManager { + #[method_id(defaultPerformer)] + pub unsafe fn defaultPerformer() -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSHelpManager.rs b/crates/icrate/src/generated/AppKit/NSHelpManager.rs new file mode 100644 index 000000000..2ad9bf993 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSHelpManager.rs @@ -0,0 +1,81 @@ +use super::__exported::NSAttributedString; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::Foundation::generated::NSBundle::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSMapTable::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSHelpBookName = NSString; +pub type NSHelpAnchorName = NSString; +pub type NSHelpManagerContextHelpKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSHelpManager; + unsafe impl ClassType for NSHelpManager { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSHelpManager { + #[method_id(sharedHelpManager)] + pub unsafe fn sharedHelpManager() -> Id; + #[method(isContextHelpModeActive)] + pub unsafe fn isContextHelpModeActive() -> bool; + #[method(setContextHelpModeActive:)] + pub unsafe fn setContextHelpModeActive(contextHelpModeActive: bool); + #[method(setContextHelp:forObject:)] + pub unsafe fn setContextHelp_forObject( + &self, + attrString: &NSAttributedString, + object: &Object, + ); + #[method(removeContextHelpForObject:)] + pub unsafe fn removeContextHelpForObject(&self, object: &Object); + #[method_id(contextHelpForObject:)] + pub unsafe fn contextHelpForObject( + &self, + object: &Object, + ) -> Option>; + #[method(showContextHelpForObject:locationHint:)] + pub unsafe fn showContextHelpForObject_locationHint( + &self, + object: &Object, + pt: NSPoint, + ) -> bool; + #[method(openHelpAnchor:inBook:)] + pub unsafe fn openHelpAnchor_inBook( + &self, + anchor: &NSHelpAnchorName, + book: Option<&NSHelpBookName>, + ); + #[method(findString:inBook:)] + pub unsafe fn findString_inBook(&self, query: &NSString, book: Option<&NSHelpBookName>); + #[method(registerBooksInBundle:)] + pub unsafe fn registerBooksInBundle(&self, bundle: &NSBundle) -> bool; + } +); +extern_methods!( + #[doc = "NSBundleHelpExtension"] + unsafe impl NSBundle { + #[method_id(contextHelpForKey:)] + pub unsafe fn contextHelpForKey( + &self, + key: &NSHelpManagerContextHelpKey, + ) -> Option>; + } +); +extern_methods!( + #[doc = "NSApplicationHelpExtension"] + unsafe impl NSApplication { + #[method(activateContextHelpMode:)] + pub unsafe fn activateContextHelpMode(&self, sender: Option<&Object>); + #[method(showHelp:)] + pub unsafe fn showHelp(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs new file mode 100644 index 000000000..39a2504a4 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -0,0 +1,381 @@ +use super::__exported::NSColor; +use super::__exported::NSGraphicsContext; +use super::__exported::NSImageRep; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSBitmapImageRep::*; +use crate::AppKit::generated::NSFontDescriptor::*; +use crate::AppKit::generated::NSGraphics::*; +use crate::AppKit::generated::NSLayoutConstraint::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::ApplicationServices::generated::ApplicationServices::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSBundle::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSImageName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSImage; + unsafe impl ClassType for NSImage { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSImage { + #[method_id(imageNamed:)] + pub unsafe fn imageNamed(name: &NSImageName) -> Option>; + #[method_id(imageWithSystemSymbolName:accessibilityDescription:)] + pub unsafe fn imageWithSystemSymbolName_accessibilityDescription( + symbolName: &NSString, + description: Option<&NSString>, + ) -> Option>; + #[method_id(initWithSize:)] + pub unsafe fn initWithSize(&self, size: NSSize) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initWithData:)] + pub unsafe fn initWithData(&self, data: &NSData) -> Option>; + #[method_id(initWithContentsOfFile:)] + pub unsafe fn initWithContentsOfFile( + &self, + fileName: &NSString, + ) -> Option>; + #[method_id(initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + #[method_id(initByReferencingFile:)] + pub unsafe fn initByReferencingFile(&self, fileName: &NSString) + -> Option>; + #[method_id(initByReferencingURL:)] + pub unsafe fn initByReferencingURL(&self, url: &NSURL) -> Id; + #[method_id(initWithPasteboard:)] + pub unsafe fn initWithPasteboard( + &self, + pasteboard: &NSPasteboard, + ) -> Option>; + #[method_id(initWithDataIgnoringOrientation:)] + pub unsafe fn initWithDataIgnoringOrientation( + &self, + data: &NSData, + ) -> Option>; + #[method_id(imageWithSize:flipped:drawingHandler:)] + pub unsafe fn imageWithSize_flipped_drawingHandler( + size: NSSize, + drawingHandlerShouldBeCalledWithFlippedContext: bool, + drawingHandler: TodoBlock, + ) -> Id; + #[method(size)] + pub unsafe fn size(&self) -> NSSize; + #[method(setSize:)] + pub unsafe fn setSize(&self, size: NSSize); + #[method(setName:)] + pub unsafe fn setName(&self, string: Option<&NSImageName>) -> bool; + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(usesEPSOnResolutionMismatch)] + pub unsafe fn usesEPSOnResolutionMismatch(&self) -> bool; + #[method(setUsesEPSOnResolutionMismatch:)] + pub unsafe fn setUsesEPSOnResolutionMismatch(&self, usesEPSOnResolutionMismatch: bool); + #[method(prefersColorMatch)] + pub unsafe fn prefersColorMatch(&self) -> bool; + #[method(setPrefersColorMatch:)] + pub unsafe fn setPrefersColorMatch(&self, prefersColorMatch: bool); + #[method(matchesOnMultipleResolution)] + pub unsafe fn matchesOnMultipleResolution(&self) -> bool; + #[method(setMatchesOnMultipleResolution:)] + pub unsafe fn setMatchesOnMultipleResolution(&self, matchesOnMultipleResolution: bool); + #[method(matchesOnlyOnBestFittingAxis)] + pub unsafe fn matchesOnlyOnBestFittingAxis(&self) -> bool; + #[method(setMatchesOnlyOnBestFittingAxis:)] + pub unsafe fn setMatchesOnlyOnBestFittingAxis(&self, matchesOnlyOnBestFittingAxis: bool); + #[method(drawAtPoint:fromRect:operation:fraction:)] + pub unsafe fn drawAtPoint_fromRect_operation_fraction( + &self, + point: NSPoint, + fromRect: NSRect, + op: NSCompositingOperation, + delta: CGFloat, + ); + #[method(drawInRect:fromRect:operation:fraction:)] + pub unsafe fn drawInRect_fromRect_operation_fraction( + &self, + rect: NSRect, + fromRect: NSRect, + op: NSCompositingOperation, + delta: CGFloat, + ); + #[method(drawInRect:fromRect:operation:fraction:respectFlipped:hints:)] + pub unsafe fn drawInRect_fromRect_operation_fraction_respectFlipped_hints( + &self, + dstSpacePortionRect: NSRect, + srcSpacePortionRect: NSRect, + op: NSCompositingOperation, + requestedAlpha: CGFloat, + respectContextIsFlipped: bool, + hints: Option<&NSDictionary>, + ); + #[method(drawRepresentation:inRect:)] + pub unsafe fn drawRepresentation_inRect(&self, imageRep: &NSImageRep, rect: NSRect) + -> bool; + #[method(drawInRect:)] + pub unsafe fn drawInRect(&self, rect: NSRect); + #[method(recache)] + pub unsafe fn recache(&self); + #[method_id(TIFFRepresentation)] + pub unsafe fn TIFFRepresentation(&self) -> Option>; + #[method_id(TIFFRepresentationUsingCompression:factor:)] + pub unsafe fn TIFFRepresentationUsingCompression_factor( + &self, + comp: NSTIFFCompression, + factor: c_float, + ) -> Option>; + #[method_id(representations)] + pub unsafe fn representations(&self) -> Id, Shared>; + #[method(addRepresentations:)] + pub unsafe fn addRepresentations(&self, imageReps: &NSArray); + #[method(addRepresentation:)] + pub unsafe fn addRepresentation(&self, imageRep: &NSImageRep); + #[method(removeRepresentation:)] + pub unsafe fn removeRepresentation(&self, imageRep: &NSImageRep); + #[method(isValid)] + pub unsafe fn isValid(&self) -> bool; + #[method(lockFocus)] + pub unsafe fn lockFocus(&self); + #[method(lockFocusFlipped:)] + pub unsafe fn lockFocusFlipped(&self, flipped: bool); + #[method(unlockFocus)] + pub unsafe fn unlockFocus(&self); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSImageDelegate>); + #[method_id(imageTypes)] + pub unsafe fn imageTypes() -> Id, Shared>; + #[method_id(imageUnfilteredTypes)] + pub unsafe fn imageUnfilteredTypes() -> Id, Shared>; + #[method(canInitWithPasteboard:)] + pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; + #[method(cancelIncrementalLoad)] + pub unsafe fn cancelIncrementalLoad(&self); + #[method(cacheMode)] + pub unsafe fn cacheMode(&self) -> NSImageCacheMode; + #[method(setCacheMode:)] + pub unsafe fn setCacheMode(&self, cacheMode: NSImageCacheMode); + #[method(alignmentRect)] + pub unsafe fn alignmentRect(&self) -> NSRect; + #[method(setAlignmentRect:)] + pub unsafe fn setAlignmentRect(&self, alignmentRect: NSRect); + #[method(isTemplate)] + pub unsafe fn isTemplate(&self) -> bool; + #[method(setTemplate:)] + pub unsafe fn setTemplate(&self, template: bool); + #[method_id(accessibilityDescription)] + pub unsafe fn accessibilityDescription(&self) -> Option>; + #[method(setAccessibilityDescription:)] + pub unsafe fn setAccessibilityDescription( + &self, + accessibilityDescription: Option<&NSString>, + ); + #[method_id(initWithCGImage:size:)] + pub unsafe fn initWithCGImage_size( + &self, + cgImage: CGImageRef, + size: NSSize, + ) -> Id; + #[method(CGImageForProposedRect:context:hints:)] + pub unsafe fn CGImageForProposedRect_context_hints( + &self, + proposedDestRect: *mut NSRect, + referenceContext: Option<&NSGraphicsContext>, + hints: Option<&NSDictionary>, + ) -> CGImageRef; + #[method_id(bestRepresentationForRect:context:hints:)] + pub unsafe fn bestRepresentationForRect_context_hints( + &self, + rect: NSRect, + referenceContext: Option<&NSGraphicsContext>, + hints: Option<&NSDictionary>, + ) -> Option>; + #[method(hitTestRect:withImageDestinationRect:context:hints:flipped:)] + pub unsafe fn hitTestRect_withImageDestinationRect_context_hints_flipped( + &self, + testRectDestSpace: NSRect, + imageRectDestSpace: NSRect, + context: Option<&NSGraphicsContext>, + hints: Option<&NSDictionary>, + flipped: bool, + ) -> bool; + #[method(recommendedLayerContentsScale:)] + pub unsafe fn recommendedLayerContentsScale( + &self, + preferredContentsScale: CGFloat, + ) -> CGFloat; + #[method_id(layerContentsForContentsScale:)] + pub unsafe fn layerContentsForContentsScale( + &self, + layerContentsScale: CGFloat, + ) -> Id; + #[method(capInsets)] + pub unsafe fn capInsets(&self) -> NSEdgeInsets; + #[method(setCapInsets:)] + pub unsafe fn setCapInsets(&self, capInsets: NSEdgeInsets); + #[method(resizingMode)] + pub unsafe fn resizingMode(&self) -> NSImageResizingMode; + #[method(setResizingMode:)] + pub unsafe fn setResizingMode(&self, resizingMode: NSImageResizingMode); + #[method_id(imageWithSymbolConfiguration:)] + pub unsafe fn imageWithSymbolConfiguration( + &self, + configuration: &NSImageSymbolConfiguration, + ) -> Option>; + #[method_id(symbolConfiguration)] + pub unsafe fn symbolConfiguration(&self) -> Id; + } +); +extern_methods!( + unsafe impl NSImage {} +); +pub type NSImageDelegate = NSObject; +extern_methods!( + #[doc = "NSBundleImageExtension"] + unsafe impl NSBundle { + #[method_id(imageForResource:)] + pub unsafe fn imageForResource(&self, name: &NSImageName) -> Option>; + #[method_id(pathForImageResource:)] + pub unsafe fn pathForImageResource( + &self, + name: &NSImageName, + ) -> Option>; + #[method_id(URLForImageResource:)] + pub unsafe fn URLForImageResource(&self, name: &NSImageName) -> Option>; + } +); +extern_methods!( + unsafe impl NSImage { + #[method_id(bestRepresentationForDevice:)] + pub unsafe fn bestRepresentationForDevice( + &self, + deviceDescription: Option<&NSDictionary>, + ) -> Option>; + #[method_id(imageUnfilteredFileTypes)] + pub unsafe fn imageUnfilteredFileTypes() -> Id, Shared>; + #[method_id(imageUnfilteredPasteboardTypes)] + pub unsafe fn imageUnfilteredPasteboardTypes() -> Id, Shared>; + #[method_id(imageFileTypes)] + pub unsafe fn imageFileTypes() -> Id, Shared>; + #[method_id(imagePasteboardTypes)] + pub unsafe fn imagePasteboardTypes() -> Id, Shared>; + #[method_id(initWithIconRef:)] + pub unsafe fn initWithIconRef(&self, iconRef: IconRef) -> Id; + #[method(setFlipped:)] + pub unsafe fn setFlipped(&self, flag: bool); + #[method(isFlipped)] + pub unsafe fn isFlipped(&self) -> bool; + #[method(dissolveToPoint:fraction:)] + pub unsafe fn dissolveToPoint_fraction(&self, point: NSPoint, fraction: CGFloat); + #[method(dissolveToPoint:fromRect:fraction:)] + pub unsafe fn dissolveToPoint_fromRect_fraction( + &self, + point: NSPoint, + rect: NSRect, + fraction: CGFloat, + ); + #[method(compositeToPoint:operation:)] + pub unsafe fn compositeToPoint_operation(&self, point: NSPoint, op: NSCompositingOperation); + #[method(compositeToPoint:fromRect:operation:)] + pub unsafe fn compositeToPoint_fromRect_operation( + &self, + point: NSPoint, + rect: NSRect, + op: NSCompositingOperation, + ); + #[method(compositeToPoint:operation:fraction:)] + pub unsafe fn compositeToPoint_operation_fraction( + &self, + point: NSPoint, + op: NSCompositingOperation, + delta: CGFloat, + ); + #[method(compositeToPoint:fromRect:operation:fraction:)] + pub unsafe fn compositeToPoint_fromRect_operation_fraction( + &self, + point: NSPoint, + rect: NSRect, + op: NSCompositingOperation, + delta: CGFloat, + ); + #[method(lockFocusOnRepresentation:)] + pub unsafe fn lockFocusOnRepresentation(&self, imageRepresentation: Option<&NSImageRep>); + #[method(setScalesWhenResized:)] + pub unsafe fn setScalesWhenResized(&self, flag: bool); + #[method(scalesWhenResized)] + pub unsafe fn scalesWhenResized(&self) -> bool; + #[method(setDataRetained:)] + pub unsafe fn setDataRetained(&self, flag: bool); + #[method(isDataRetained)] + pub unsafe fn isDataRetained(&self) -> bool; + #[method(setCachedSeparately:)] + pub unsafe fn setCachedSeparately(&self, flag: bool); + #[method(isCachedSeparately)] + pub unsafe fn isCachedSeparately(&self) -> bool; + #[method(setCacheDepthMatchesImageDepth:)] + pub unsafe fn setCacheDepthMatchesImageDepth(&self, flag: bool); + #[method(cacheDepthMatchesImageDepth)] + pub unsafe fn cacheDepthMatchesImageDepth(&self) -> bool; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSImageSymbolConfiguration; + unsafe impl ClassType for NSImageSymbolConfiguration { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSImageSymbolConfiguration { + #[method_id(configurationWithPointSize:weight:scale:)] + pub unsafe fn configurationWithPointSize_weight_scale( + pointSize: CGFloat, + weight: NSFontWeight, + scale: NSImageSymbolScale, + ) -> Id; + #[method_id(configurationWithPointSize:weight:)] + pub unsafe fn configurationWithPointSize_weight( + pointSize: CGFloat, + weight: NSFontWeight, + ) -> Id; + #[method_id(configurationWithTextStyle:scale:)] + pub unsafe fn configurationWithTextStyle_scale( + style: &NSFontTextStyle, + scale: NSImageSymbolScale, + ) -> Id; + #[method_id(configurationWithTextStyle:)] + pub unsafe fn configurationWithTextStyle(style: &NSFontTextStyle) -> Id; + #[method_id(configurationWithScale:)] + pub unsafe fn configurationWithScale(scale: NSImageSymbolScale) -> Id; + #[method_id(configurationWithHierarchicalColor:)] + pub unsafe fn configurationWithHierarchicalColor( + hierarchicalColor: &NSColor, + ) -> Id; + #[method_id(configurationWithPaletteColors:)] + pub unsafe fn configurationWithPaletteColors( + paletteColors: &NSArray, + ) -> Id; + #[method_id(configurationPreferringMulticolor)] + pub unsafe fn configurationPreferringMulticolor() -> Id; + #[method_id(configurationByApplyingConfiguration:)] + pub unsafe fn configurationByApplyingConfiguration( + &self, + configuration: &NSImageSymbolConfiguration, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSImageCell.rs b/crates/icrate/src/generated/AppKit/NSImageCell.rs new file mode 100644 index 000000000..e96b79295 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSImageCell.rs @@ -0,0 +1,30 @@ +use super::__exported::NSImage; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSImageCell; + unsafe impl ClassType for NSImageCell { + type Super = NSCell; + } +); +extern_methods!( + unsafe impl NSImageCell { + #[method(imageAlignment)] + pub unsafe fn imageAlignment(&self) -> NSImageAlignment; + #[method(setImageAlignment:)] + pub unsafe fn setImageAlignment(&self, imageAlignment: NSImageAlignment); + #[method(imageScaling)] + pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[method(setImageScaling:)] + pub unsafe fn setImageScaling(&self, imageScaling: NSImageScaling); + #[method(imageFrameStyle)] + pub unsafe fn imageFrameStyle(&self) -> NSImageFrameStyle; + #[method(setImageFrameStyle:)] + pub unsafe fn setImageFrameStyle(&self, imageFrameStyle: NSImageFrameStyle); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs new file mode 100644 index 000000000..8e5542d76 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -0,0 +1,141 @@ +use super::__exported::NSGraphicsContext; +use super::__exported::NSPasteboard; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSColorSpace::*; +use crate::AppKit::generated::NSGraphics::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::AppKit::generated::NSUserInterfaceLayout::*; +use crate::ApplicationServices::generated::ApplicationServices::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSImageHintKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSImageRep; + unsafe impl ClassType for NSImageRep { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSImageRep { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(draw)] + pub unsafe fn draw(&self) -> bool; + #[method(drawAtPoint:)] + pub unsafe fn drawAtPoint(&self, point: NSPoint) -> bool; + #[method(drawInRect:)] + pub unsafe fn drawInRect(&self, rect: NSRect) -> bool; + #[method(drawInRect:fromRect:operation:fraction:respectFlipped:hints:)] + pub unsafe fn drawInRect_fromRect_operation_fraction_respectFlipped_hints( + &self, + dstSpacePortionRect: NSRect, + srcSpacePortionRect: NSRect, + op: NSCompositingOperation, + requestedAlpha: CGFloat, + respectContextIsFlipped: bool, + hints: Option<&NSDictionary>, + ) -> bool; + #[method(size)] + pub unsafe fn size(&self) -> NSSize; + #[method(setSize:)] + pub unsafe fn setSize(&self, size: NSSize); + #[method(hasAlpha)] + pub unsafe fn hasAlpha(&self) -> bool; + #[method(setAlpha:)] + pub unsafe fn setAlpha(&self, alpha: bool); + #[method(isOpaque)] + pub unsafe fn isOpaque(&self) -> bool; + #[method(setOpaque:)] + pub unsafe fn setOpaque(&self, opaque: bool); + #[method_id(colorSpaceName)] + pub unsafe fn colorSpaceName(&self) -> Id; + #[method(setColorSpaceName:)] + pub unsafe fn setColorSpaceName(&self, colorSpaceName: &NSColorSpaceName); + #[method(bitsPerSample)] + pub unsafe fn bitsPerSample(&self) -> NSInteger; + #[method(setBitsPerSample:)] + pub unsafe fn setBitsPerSample(&self, bitsPerSample: NSInteger); + #[method(pixelsWide)] + pub unsafe fn pixelsWide(&self) -> NSInteger; + #[method(setPixelsWide:)] + pub unsafe fn setPixelsWide(&self, pixelsWide: NSInteger); + #[method(pixelsHigh)] + pub unsafe fn pixelsHigh(&self) -> NSInteger; + #[method(setPixelsHigh:)] + pub unsafe fn setPixelsHigh(&self, pixelsHigh: NSInteger); + #[method(layoutDirection)] + pub unsafe fn layoutDirection(&self) -> NSImageLayoutDirection; + #[method(setLayoutDirection:)] + pub unsafe fn setLayoutDirection(&self, layoutDirection: NSImageLayoutDirection); + #[method(registerImageRepClass:)] + pub unsafe fn registerImageRepClass(imageRepClass: &Class); + #[method(unregisterImageRepClass:)] + pub unsafe fn unregisterImageRepClass(imageRepClass: &Class); + #[method_id(registeredImageRepClasses)] + pub unsafe fn registeredImageRepClasses() -> Id, Shared>; + #[method(imageRepClassForFileType:)] + pub unsafe fn imageRepClassForFileType(type_: &NSString) -> Option<&Class>; + #[method(imageRepClassForPasteboardType:)] + pub unsafe fn imageRepClassForPasteboardType(type_: &NSPasteboardType) -> Option<&Class>; + #[method(imageRepClassForType:)] + pub unsafe fn imageRepClassForType(type_: &NSString) -> Option<&Class>; + #[method(imageRepClassForData:)] + pub unsafe fn imageRepClassForData(data: &NSData) -> Option<&Class>; + #[method(canInitWithData:)] + pub unsafe fn canInitWithData(data: &NSData) -> bool; + #[method_id(imageUnfilteredFileTypes)] + pub unsafe fn imageUnfilteredFileTypes() -> Id, Shared>; + #[method_id(imageUnfilteredPasteboardTypes)] + pub unsafe fn imageUnfilteredPasteboardTypes() -> Id, Shared>; + #[method_id(imageFileTypes)] + pub unsafe fn imageFileTypes() -> Id, Shared>; + #[method_id(imagePasteboardTypes)] + pub unsafe fn imagePasteboardTypes() -> Id, Shared>; + #[method_id(imageUnfilteredTypes)] + pub unsafe fn imageUnfilteredTypes() -> Id, Shared>; + #[method_id(imageTypes)] + pub unsafe fn imageTypes() -> Id, Shared>; + #[method(canInitWithPasteboard:)] + pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; + #[method_id(imageRepsWithContentsOfFile:)] + pub unsafe fn imageRepsWithContentsOfFile( + filename: &NSString, + ) -> Option, Shared>>; + #[method_id(imageRepWithContentsOfFile:)] + pub unsafe fn imageRepWithContentsOfFile( + filename: &NSString, + ) -> Option>; + #[method_id(imageRepsWithContentsOfURL:)] + pub unsafe fn imageRepsWithContentsOfURL( + url: &NSURL, + ) -> Option, Shared>>; + #[method_id(imageRepWithContentsOfURL:)] + pub unsafe fn imageRepWithContentsOfURL(url: &NSURL) -> Option>; + #[method_id(imageRepsWithPasteboard:)] + pub unsafe fn imageRepsWithPasteboard( + pasteboard: &NSPasteboard, + ) -> Option, Shared>>; + #[method_id(imageRepWithPasteboard:)] + pub unsafe fn imageRepWithPasteboard( + pasteboard: &NSPasteboard, + ) -> Option>; + #[method(CGImageForProposedRect:context:hints:)] + pub unsafe fn CGImageForProposedRect_context_hints( + &self, + proposedDestRect: *mut NSRect, + context: Option<&NSGraphicsContext>, + hints: Option<&NSDictionary>, + ) -> CGImageRef; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSImageView.rs b/crates/icrate/src/generated/AppKit/NSImageView.rs new file mode 100644 index 000000000..88847ed5a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSImageView.rs @@ -0,0 +1,61 @@ +use super::__exported::NSImageSymbolConfiguration; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSImageCell::*; +use crate::AppKit::generated::NSMenu::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSImageView; + unsafe impl ClassType for NSImageView { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSImageView { + #[method_id(imageViewWithImage:)] + pub unsafe fn imageViewWithImage(image: &NSImage) -> Id; + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] + pub unsafe fn setEditable(&self, editable: bool); + #[method(imageAlignment)] + pub unsafe fn imageAlignment(&self) -> NSImageAlignment; + #[method(setImageAlignment:)] + pub unsafe fn setImageAlignment(&self, imageAlignment: NSImageAlignment); + #[method(imageScaling)] + pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[method(setImageScaling:)] + pub unsafe fn setImageScaling(&self, imageScaling: NSImageScaling); + #[method(imageFrameStyle)] + pub unsafe fn imageFrameStyle(&self) -> NSImageFrameStyle; + #[method(setImageFrameStyle:)] + pub unsafe fn setImageFrameStyle(&self, imageFrameStyle: NSImageFrameStyle); + #[method_id(symbolConfiguration)] + pub unsafe fn symbolConfiguration(&self) -> Option>; + #[method(setSymbolConfiguration:)] + pub unsafe fn setSymbolConfiguration( + &self, + symbolConfiguration: Option<&NSImageSymbolConfiguration>, + ); + #[method_id(contentTintColor)] + pub unsafe fn contentTintColor(&self) -> Option>; + #[method(setContentTintColor:)] + pub unsafe fn setContentTintColor(&self, contentTintColor: Option<&NSColor>); + #[method(animates)] + pub unsafe fn animates(&self) -> bool; + #[method(setAnimates:)] + pub unsafe fn setAnimates(&self, animates: bool); + #[method(allowsCutCopyPaste)] + pub unsafe fn allowsCutCopyPaste(&self) -> bool; + #[method(setAllowsCutCopyPaste:)] + pub unsafe fn setAllowsCutCopyPaste(&self, allowsCutCopyPaste: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSInputManager.rs b/crates/icrate/src/generated/AppKit/NSInputManager.rs new file mode 100644 index 000000000..218504bff --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSInputManager.rs @@ -0,0 +1,61 @@ +use super::__exported::NSArray; +use super::__exported::NSAttributedString; +use super::__exported::NSEvent; +use super::__exported::NSImage; +use super::__exported::NSInputServer; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextInput = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSInputManager; + unsafe impl ClassType for NSInputManager { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSInputManager { + #[method_id(currentInputManager)] + pub unsafe fn currentInputManager() -> Option>; + #[method(cycleToNextInputLanguage:)] + pub unsafe fn cycleToNextInputLanguage(sender: Option<&Object>); + #[method(cycleToNextInputServerInLanguage:)] + pub unsafe fn cycleToNextInputServerInLanguage(sender: Option<&Object>); + #[method_id(initWithName:host:)] + pub unsafe fn initWithName_host( + &self, + inputServerName: Option<&NSString>, + hostName: Option<&NSString>, + ) -> Option>; + #[method_id(localizedInputManagerName)] + pub unsafe fn localizedInputManagerName(&self) -> Option>; + #[method(markedTextAbandoned:)] + pub unsafe fn markedTextAbandoned(&self, cli: Option<&Object>); + #[method(markedTextSelectionChanged:client:)] + pub unsafe fn markedTextSelectionChanged_client( + &self, + newSel: NSRange, + cli: Option<&Object>, + ); + #[method(wantsToInterpretAllKeystrokes)] + pub unsafe fn wantsToInterpretAllKeystrokes(&self) -> bool; + #[method_id(language)] + pub unsafe fn language(&self) -> Option>; + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method_id(server)] + pub unsafe fn server(&self) -> Option>; + #[method(wantsToHandleMouseEvents)] + pub unsafe fn wantsToHandleMouseEvents(&self) -> bool; + #[method(handleMouseEvent:)] + pub unsafe fn handleMouseEvent(&self, mouseEvent: Option<&NSEvent>) -> bool; + #[method(wantsToDelayTextChangeNotifications)] + pub unsafe fn wantsToDelayTextChangeNotifications(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSInputServer.rs b/crates/icrate/src/generated/AppKit/NSInputServer.rs new file mode 100644 index 000000000..e77518a77 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSInputServer.rs @@ -0,0 +1,27 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSInputServiceProvider = NSObject; +pub type NSInputServerMouseTracker = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSInputServer; + unsafe impl ClassType for NSInputServer { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSInputServer { + #[method_id(initWithDelegate:name:)] + pub unsafe fn initWithDelegate_name( + &self, + delegate: Option<&Object>, + name: Option<&NSString>, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs new file mode 100644 index 000000000..34978f546 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -0,0 +1,16 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSResponder::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSInterfaceStyle = NSUInteger; +extern_methods!( + #[doc = "NSInterfaceStyle"] + unsafe impl NSResponder { + #[method(interfaceStyle)] + pub unsafe fn interfaceStyle(&self) -> NSInterfaceStyle; + #[method(setInterfaceStyle:)] + pub unsafe fn setInterfaceStyle(&self, interfaceStyle: NSInterfaceStyle); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSItemProvider.rs b/crates/icrate/src/generated/AppKit/NSItemProvider.rs new file mode 100644 index 000000000..124827806 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSItemProvider.rs @@ -0,0 +1,18 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSItemProvider::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_methods!( + #[doc = "NSItemSourceInfo"] + unsafe impl NSItemProvider { + #[method(sourceFrame)] + pub unsafe fn sourceFrame(&self) -> NSRect; + #[method(containerFrame)] + pub unsafe fn containerFrame(&self) -> NSRect; + #[method(preferredPresentationSize)] + pub unsafe fn preferredPresentationSize(&self) -> NSSize; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs new file mode 100644 index 000000000..baf558732 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -0,0 +1,127 @@ +use super::__exported::NSAttributeDescription; +use super::__exported::NSError; +use super::__exported::NSString; +use crate::AppKit::generated::AppKitDefines::*; +use crate::CoreData::generated::NSManagedObjectContext::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSBindingName = NSString; +pub type NSBindingOption = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSBindingSelectionMarker; + unsafe impl ClassType for NSBindingSelectionMarker { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSBindingSelectionMarker { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(multipleValuesSelectionMarker)] + pub unsafe fn multipleValuesSelectionMarker() -> Id; + #[method_id(noSelectionMarker)] + pub unsafe fn noSelectionMarker() -> Id; + #[method_id(notApplicableSelectionMarker)] + pub unsafe fn notApplicableSelectionMarker() -> Id; + #[method(setDefaultPlaceholder:forMarker:onClass:withBinding:)] + pub unsafe fn setDefaultPlaceholder_forMarker_onClass_withBinding( + placeholder: Option<&Object>, + marker: Option<&NSBindingSelectionMarker>, + objectClass: &Class, + binding: &NSBindingName, + ); + #[method_id(defaultPlaceholderForMarker:onClass:withBinding:)] + pub unsafe fn defaultPlaceholderForMarker_onClass_withBinding( + marker: Option<&NSBindingSelectionMarker>, + objectClass: &Class, + binding: &NSBindingName, + ) -> Option>; + } +); +pub type NSBindingInfoKey = NSString; +extern_methods!( + #[doc = "NSKeyValueBindingCreation"] + unsafe impl NSObject { + #[method(exposeBinding:)] + pub unsafe fn exposeBinding(binding: &NSBindingName); + #[method_id(exposedBindings)] + pub unsafe fn exposedBindings(&self) -> Id, Shared>; + #[method(valueClassForBinding:)] + pub unsafe fn valueClassForBinding(&self, binding: &NSBindingName) -> Option<&Class>; + #[method(bind:toObject:withKeyPath:options:)] + pub unsafe fn bind_toObject_withKeyPath_options( + &self, + binding: &NSBindingName, + observable: &Object, + keyPath: &NSString, + options: Option<&NSDictionary>, + ); + #[method(unbind:)] + pub unsafe fn unbind(&self, binding: &NSBindingName); + #[method_id(infoForBinding:)] + pub unsafe fn infoForBinding( + &self, + binding: &NSBindingName, + ) -> Option, Shared>>; + #[method_id(optionDescriptionsForBinding:)] + pub unsafe fn optionDescriptionsForBinding( + &self, + binding: &NSBindingName, + ) -> Id, Shared>; + } +); +extern_methods!( + #[doc = "NSPlaceholders"] + unsafe impl NSObject { + #[method(setDefaultPlaceholder:forMarker:withBinding:)] + pub unsafe fn setDefaultPlaceholder_forMarker_withBinding( + placeholder: Option<&Object>, + marker: Option<&Object>, + binding: &NSBindingName, + ); + #[method_id(defaultPlaceholderForMarker:withBinding:)] + pub unsafe fn defaultPlaceholderForMarker_withBinding( + marker: Option<&Object>, + binding: &NSBindingName, + ) -> Option>; + } +); +pub type NSEditor = NSObject; +pub type NSEditorRegistration = NSObject; +extern_methods!( + #[doc = "NSEditor"] + unsafe impl NSObject { + #[method(discardEditing)] + pub unsafe fn discardEditing(&self); + #[method(commitEditing)] + pub unsafe fn commitEditing(&self) -> bool; + #[method(commitEditingWithDelegate:didCommitSelector:contextInfo:)] + pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( + &self, + delegate: Option<&Object>, + didCommitSelector: Option, + contextInfo: *mut c_void, + ); + #[method(commitEditingAndReturnError:)] + pub unsafe fn commitEditingAndReturnError(&self) -> Result<(), Id>; + } +); +extern_methods!( + #[doc = "NSEditorRegistration"] + unsafe impl NSObject { + #[method(objectDidBeginEditing:)] + pub unsafe fn objectDidBeginEditing(&self, editor: &NSEditor); + #[method(objectDidEndEditing:)] + pub unsafe fn objectDidEndEditing(&self, editor: &NSEditor); + } +); +extern_methods!( + #[doc = "NSEditorAndEditorRegistrationConformance"] + unsafe impl NSManagedObjectContext {} +); diff --git a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs new file mode 100644 index 000000000..2c13ee061 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs @@ -0,0 +1,193 @@ +use super::__exported::NSLayoutConstraint; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +__inner_extern_class!( + #[derive(Debug)] + pub struct NSLayoutAnchor; + unsafe impl ClassType for NSLayoutAnchor { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSLayoutAnchor { + #[method_id(constraintEqualToAnchor:)] + pub unsafe fn constraintEqualToAnchor( + &self, + anchor: &NSLayoutAnchor, + ) -> Id; + #[method_id(constraintGreaterThanOrEqualToAnchor:)] + pub unsafe fn constraintGreaterThanOrEqualToAnchor( + &self, + anchor: &NSLayoutAnchor, + ) -> Id; + #[method_id(constraintLessThanOrEqualToAnchor:)] + pub unsafe fn constraintLessThanOrEqualToAnchor( + &self, + anchor: &NSLayoutAnchor, + ) -> Id; + #[method_id(constraintEqualToAnchor:constant:)] + pub unsafe fn constraintEqualToAnchor_constant( + &self, + anchor: &NSLayoutAnchor, + c: CGFloat, + ) -> Id; + #[method_id(constraintGreaterThanOrEqualToAnchor:constant:)] + pub unsafe fn constraintGreaterThanOrEqualToAnchor_constant( + &self, + anchor: &NSLayoutAnchor, + c: CGFloat, + ) -> Id; + #[method_id(constraintLessThanOrEqualToAnchor:constant:)] + pub unsafe fn constraintLessThanOrEqualToAnchor_constant( + &self, + anchor: &NSLayoutAnchor, + c: CGFloat, + ) -> Id; + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method_id(item)] + pub unsafe fn item(&self) -> Option>; + #[method(hasAmbiguousLayout)] + pub unsafe fn hasAmbiguousLayout(&self) -> bool; + #[method_id(constraintsAffectingLayout)] + pub unsafe fn constraintsAffectingLayout(&self) -> Id, Shared>; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSLayoutXAxisAnchor; + unsafe impl ClassType for NSLayoutXAxisAnchor { + type Super = NSLayoutAnchor; + } +); +extern_methods!( + unsafe impl NSLayoutXAxisAnchor { + #[method_id(anchorWithOffsetToAnchor:)] + pub unsafe fn anchorWithOffsetToAnchor( + &self, + otherAnchor: &NSLayoutXAxisAnchor, + ) -> Id; + #[method_id(constraintEqualToSystemSpacingAfterAnchor:multiplier:)] + pub unsafe fn constraintEqualToSystemSpacingAfterAnchor_multiplier( + &self, + anchor: &NSLayoutXAxisAnchor, + multiplier: CGFloat, + ) -> Id; + #[method_id(constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:)] + pub unsafe fn constraintGreaterThanOrEqualToSystemSpacingAfterAnchor_multiplier( + &self, + anchor: &NSLayoutXAxisAnchor, + multiplier: CGFloat, + ) -> Id; + #[method_id(constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:)] + pub unsafe fn constraintLessThanOrEqualToSystemSpacingAfterAnchor_multiplier( + &self, + anchor: &NSLayoutXAxisAnchor, + multiplier: CGFloat, + ) -> Id; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSLayoutYAxisAnchor; + unsafe impl ClassType for NSLayoutYAxisAnchor { + type Super = NSLayoutAnchor; + } +); +extern_methods!( + unsafe impl NSLayoutYAxisAnchor { + #[method_id(anchorWithOffsetToAnchor:)] + pub unsafe fn anchorWithOffsetToAnchor( + &self, + otherAnchor: &NSLayoutYAxisAnchor, + ) -> Id; + #[method_id(constraintEqualToSystemSpacingBelowAnchor:multiplier:)] + pub unsafe fn constraintEqualToSystemSpacingBelowAnchor_multiplier( + &self, + anchor: &NSLayoutYAxisAnchor, + multiplier: CGFloat, + ) -> Id; + #[method_id(constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:)] + pub unsafe fn constraintGreaterThanOrEqualToSystemSpacingBelowAnchor_multiplier( + &self, + anchor: &NSLayoutYAxisAnchor, + multiplier: CGFloat, + ) -> Id; + #[method_id(constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:)] + pub unsafe fn constraintLessThanOrEqualToSystemSpacingBelowAnchor_multiplier( + &self, + anchor: &NSLayoutYAxisAnchor, + multiplier: CGFloat, + ) -> Id; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSLayoutDimension; + unsafe impl ClassType for NSLayoutDimension { + type Super = NSLayoutAnchor; + } +); +extern_methods!( + unsafe impl NSLayoutDimension { + #[method_id(constraintEqualToConstant:)] + pub unsafe fn constraintEqualToConstant( + &self, + c: CGFloat, + ) -> Id; + #[method_id(constraintGreaterThanOrEqualToConstant:)] + pub unsafe fn constraintGreaterThanOrEqualToConstant( + &self, + c: CGFloat, + ) -> Id; + #[method_id(constraintLessThanOrEqualToConstant:)] + pub unsafe fn constraintLessThanOrEqualToConstant( + &self, + c: CGFloat, + ) -> Id; + #[method_id(constraintEqualToAnchor:multiplier:)] + pub unsafe fn constraintEqualToAnchor_multiplier( + &self, + anchor: &NSLayoutDimension, + m: CGFloat, + ) -> Id; + #[method_id(constraintGreaterThanOrEqualToAnchor:multiplier:)] + pub unsafe fn constraintGreaterThanOrEqualToAnchor_multiplier( + &self, + anchor: &NSLayoutDimension, + m: CGFloat, + ) -> Id; + #[method_id(constraintLessThanOrEqualToAnchor:multiplier:)] + pub unsafe fn constraintLessThanOrEqualToAnchor_multiplier( + &self, + anchor: &NSLayoutDimension, + m: CGFloat, + ) -> Id; + #[method_id(constraintEqualToAnchor:multiplier:constant:)] + pub unsafe fn constraintEqualToAnchor_multiplier_constant( + &self, + anchor: &NSLayoutDimension, + m: CGFloat, + c: CGFloat, + ) -> Id; + #[method_id(constraintGreaterThanOrEqualToAnchor:multiplier:constant:)] + pub unsafe fn constraintGreaterThanOrEqualToAnchor_multiplier_constant( + &self, + anchor: &NSLayoutDimension, + m: CGFloat, + c: CGFloat, + ) -> Id; + #[method_id(constraintLessThanOrEqualToAnchor:multiplier:constant:)] + pub unsafe fn constraintLessThanOrEqualToAnchor_multiplier_constant( + &self, + anchor: &NSLayoutDimension, + m: CGFloat, + c: CGFloat, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs new file mode 100644 index 000000000..19ca1586e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -0,0 +1,276 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAnimation::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSLayoutAnchor::*; +use crate::AppKit::generated::NSView::*; +use crate::AppKit::generated::NSWindow::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSLayoutConstraint; + unsafe impl ClassType for NSLayoutConstraint { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSLayoutConstraint { + #[method_id(constraintsWithVisualFormat:options:metrics:views:)] + pub unsafe fn constraintsWithVisualFormat_options_metrics_views( + format: &NSString, + opts: NSLayoutFormatOptions, + metrics: Option<&NSDictionary>, + views: &NSDictionary, + ) -> Id, Shared>; + #[method_id(constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:)] + pub unsafe fn constraintWithItem_attribute_relatedBy_toItem_attribute_multiplier_constant( + view1: &Object, + attr1: NSLayoutAttribute, + relation: NSLayoutRelation, + view2: Option<&Object>, + attr2: NSLayoutAttribute, + multiplier: CGFloat, + c: CGFloat, + ) -> Id; + #[method(priority)] + pub unsafe fn priority(&self) -> NSLayoutPriority; + #[method(setPriority:)] + pub unsafe fn setPriority(&self, priority: NSLayoutPriority); + #[method(shouldBeArchived)] + pub unsafe fn shouldBeArchived(&self) -> bool; + #[method(setShouldBeArchived:)] + pub unsafe fn setShouldBeArchived(&self, shouldBeArchived: bool); + #[method_id(firstItem)] + pub unsafe fn firstItem(&self) -> Option>; + #[method_id(secondItem)] + pub unsafe fn secondItem(&self) -> Option>; + #[method(firstAttribute)] + pub unsafe fn firstAttribute(&self) -> NSLayoutAttribute; + #[method(secondAttribute)] + pub unsafe fn secondAttribute(&self) -> NSLayoutAttribute; + #[method_id(firstAnchor)] + pub unsafe fn firstAnchor(&self) -> Id; + #[method_id(secondAnchor)] + pub unsafe fn secondAnchor(&self) -> Option>; + #[method(relation)] + pub unsafe fn relation(&self) -> NSLayoutRelation; + #[method(multiplier)] + pub unsafe fn multiplier(&self) -> CGFloat; + #[method(constant)] + pub unsafe fn constant(&self) -> CGFloat; + #[method(setConstant:)] + pub unsafe fn setConstant(&self, constant: CGFloat); + #[method(isActive)] + pub unsafe fn isActive(&self) -> bool; + #[method(setActive:)] + pub unsafe fn setActive(&self, active: bool); + #[method(activateConstraints:)] + pub unsafe fn activateConstraints(constraints: &NSArray); + #[method(deactivateConstraints:)] + pub unsafe fn deactivateConstraints(constraints: &NSArray); + } +); +extern_methods!( + #[doc = "NSIdentifier"] + unsafe impl NSLayoutConstraint { + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Option>; + #[method(setIdentifier:)] + pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>); + } +); +extern_methods!( + unsafe impl NSLayoutConstraint {} +); +extern_methods!( + #[doc = "NSConstraintBasedLayoutInstallingConstraints"] + unsafe impl NSView { + #[method_id(leadingAnchor)] + pub unsafe fn leadingAnchor(&self) -> Id; + #[method_id(trailingAnchor)] + pub unsafe fn trailingAnchor(&self) -> Id; + #[method_id(leftAnchor)] + pub unsafe fn leftAnchor(&self) -> Id; + #[method_id(rightAnchor)] + pub unsafe fn rightAnchor(&self) -> Id; + #[method_id(topAnchor)] + pub unsafe fn topAnchor(&self) -> Id; + #[method_id(bottomAnchor)] + pub unsafe fn bottomAnchor(&self) -> Id; + #[method_id(widthAnchor)] + pub unsafe fn widthAnchor(&self) -> Id; + #[method_id(heightAnchor)] + pub unsafe fn heightAnchor(&self) -> Id; + #[method_id(centerXAnchor)] + pub unsafe fn centerXAnchor(&self) -> Id; + #[method_id(centerYAnchor)] + pub unsafe fn centerYAnchor(&self) -> Id; + #[method_id(firstBaselineAnchor)] + pub unsafe fn firstBaselineAnchor(&self) -> Id; + #[method_id(lastBaselineAnchor)] + pub unsafe fn lastBaselineAnchor(&self) -> Id; + #[method_id(constraints)] + pub unsafe fn constraints(&self) -> Id, Shared>; + #[method(addConstraint:)] + pub unsafe fn addConstraint(&self, constraint: &NSLayoutConstraint); + #[method(addConstraints:)] + pub unsafe fn addConstraints(&self, constraints: &NSArray); + #[method(removeConstraint:)] + pub unsafe fn removeConstraint(&self, constraint: &NSLayoutConstraint); + #[method(removeConstraints:)] + pub unsafe fn removeConstraints(&self, constraints: &NSArray); + } +); +extern_methods!( + #[doc = "NSConstraintBasedLayoutCoreMethods"] + unsafe impl NSWindow { + #[method(updateConstraintsIfNeeded)] + pub unsafe fn updateConstraintsIfNeeded(&self); + #[method(layoutIfNeeded)] + pub unsafe fn layoutIfNeeded(&self); + } +); +extern_methods!( + #[doc = "NSConstraintBasedLayoutCoreMethods"] + unsafe impl NSView { + #[method(updateConstraintsForSubtreeIfNeeded)] + pub unsafe fn updateConstraintsForSubtreeIfNeeded(&self); + #[method(updateConstraints)] + pub unsafe fn updateConstraints(&self); + #[method(needsUpdateConstraints)] + pub unsafe fn needsUpdateConstraints(&self) -> bool; + #[method(setNeedsUpdateConstraints:)] + pub unsafe fn setNeedsUpdateConstraints(&self, needsUpdateConstraints: bool); + } +); +extern_methods!( + #[doc = "NSConstraintBasedCompatibility"] + unsafe impl NSView { + #[method(translatesAutoresizingMaskIntoConstraints)] + pub unsafe fn translatesAutoresizingMaskIntoConstraints(&self) -> bool; + #[method(setTranslatesAutoresizingMaskIntoConstraints:)] + pub unsafe fn setTranslatesAutoresizingMaskIntoConstraints( + &self, + translatesAutoresizingMaskIntoConstraints: bool, + ); + #[method(requiresConstraintBasedLayout)] + pub unsafe fn requiresConstraintBasedLayout() -> bool; + } +); +extern_methods!( + #[doc = "NSConstraintBasedLayoutLayering"] + unsafe impl NSView { + #[method(alignmentRectForFrame:)] + pub unsafe fn alignmentRectForFrame(&self, frame: NSRect) -> NSRect; + #[method(frameForAlignmentRect:)] + pub unsafe fn frameForAlignmentRect(&self, alignmentRect: NSRect) -> NSRect; + #[method(alignmentRectInsets)] + pub unsafe fn alignmentRectInsets(&self) -> NSEdgeInsets; + #[method(firstBaselineOffsetFromTop)] + pub unsafe fn firstBaselineOffsetFromTop(&self) -> CGFloat; + #[method(lastBaselineOffsetFromBottom)] + pub unsafe fn lastBaselineOffsetFromBottom(&self) -> CGFloat; + #[method(baselineOffsetFromBottom)] + pub unsafe fn baselineOffsetFromBottom(&self) -> CGFloat; + #[method(intrinsicContentSize)] + pub unsafe fn intrinsicContentSize(&self) -> NSSize; + #[method(invalidateIntrinsicContentSize)] + pub unsafe fn invalidateIntrinsicContentSize(&self); + #[method(contentHuggingPriorityForOrientation:)] + pub unsafe fn contentHuggingPriorityForOrientation( + &self, + orientation: NSLayoutConstraintOrientation, + ) -> NSLayoutPriority; + #[method(setContentHuggingPriority:forOrientation:)] + pub unsafe fn setContentHuggingPriority_forOrientation( + &self, + priority: NSLayoutPriority, + orientation: NSLayoutConstraintOrientation, + ); + #[method(contentCompressionResistancePriorityForOrientation:)] + pub unsafe fn contentCompressionResistancePriorityForOrientation( + &self, + orientation: NSLayoutConstraintOrientation, + ) -> NSLayoutPriority; + #[method(setContentCompressionResistancePriority:forOrientation:)] + pub unsafe fn setContentCompressionResistancePriority_forOrientation( + &self, + priority: NSLayoutPriority, + orientation: NSLayoutConstraintOrientation, + ); + #[method(isHorizontalContentSizeConstraintActive)] + pub unsafe fn isHorizontalContentSizeConstraintActive(&self) -> bool; + #[method(setHorizontalContentSizeConstraintActive:)] + pub unsafe fn setHorizontalContentSizeConstraintActive( + &self, + horizontalContentSizeConstraintActive: bool, + ); + #[method(isVerticalContentSizeConstraintActive)] + pub unsafe fn isVerticalContentSizeConstraintActive(&self) -> bool; + #[method(setVerticalContentSizeConstraintActive:)] + pub unsafe fn setVerticalContentSizeConstraintActive( + &self, + verticalContentSizeConstraintActive: bool, + ); + } +); +extern_methods!( + #[doc = "NSConstraintBasedLayoutLayering"] + unsafe impl NSControl { + #[method(invalidateIntrinsicContentSizeForCell:)] + pub unsafe fn invalidateIntrinsicContentSizeForCell(&self, cell: &NSCell); + } +); +extern_methods!( + #[doc = "NSConstraintBasedLayoutAnchoring"] + unsafe impl NSWindow { + #[method(anchorAttributeForOrientation:)] + pub unsafe fn anchorAttributeForOrientation( + &self, + orientation: NSLayoutConstraintOrientation, + ) -> NSLayoutAttribute; + #[method(setAnchorAttribute:forOrientation:)] + pub unsafe fn setAnchorAttribute_forOrientation( + &self, + attr: NSLayoutAttribute, + orientation: NSLayoutConstraintOrientation, + ); + } +); +extern_methods!( + #[doc = "NSConstraintBasedLayoutFittingSize"] + unsafe impl NSView { + #[method(fittingSize)] + pub unsafe fn fittingSize(&self) -> NSSize; + } +); +extern_methods!( + #[doc = "NSConstraintBasedLayoutDebugging"] + unsafe impl NSView { + #[method_id(constraintsAffectingLayoutForOrientation:)] + pub unsafe fn constraintsAffectingLayoutForOrientation( + &self, + orientation: NSLayoutConstraintOrientation, + ) -> Id, Shared>; + #[method(hasAmbiguousLayout)] + pub unsafe fn hasAmbiguousLayout(&self) -> bool; + #[method(exerciseAmbiguityInLayout)] + pub unsafe fn exerciseAmbiguityInLayout(&self); + } +); +extern_methods!( + #[doc = "NSConstraintBasedLayoutDebugging"] + unsafe impl NSWindow { + #[method(visualizeConstraints:)] + pub unsafe fn visualizeConstraints( + &self, + constraints: Option<&NSArray>, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs new file mode 100644 index 000000000..66a60b773 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs @@ -0,0 +1,72 @@ +use super::__exported::NSLayoutConstraint; +use super::__exported::NSLayoutDimension; +use super::__exported::NSLayoutXAxisAnchor; +use super::__exported::NSLayoutYAxisAnchor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSLayoutAnchor::*; +use crate::AppKit::generated::NSLayoutConstraint::*; +use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; +use crate::AppKit::generated::NSView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSLayoutGuide; + unsafe impl ClassType for NSLayoutGuide { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSLayoutGuide { + #[method(frame)] + pub unsafe fn frame(&self) -> NSRect; + #[method_id(owningView)] + pub unsafe fn owningView(&self) -> Option>; + #[method(setOwningView:)] + pub unsafe fn setOwningView(&self, owningView: Option<&NSView>); + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Id; + #[method(setIdentifier:)] + pub unsafe fn setIdentifier(&self, identifier: &NSUserInterfaceItemIdentifier); + #[method_id(leadingAnchor)] + pub unsafe fn leadingAnchor(&self) -> Id; + #[method_id(trailingAnchor)] + pub unsafe fn trailingAnchor(&self) -> Id; + #[method_id(leftAnchor)] + pub unsafe fn leftAnchor(&self) -> Id; + #[method_id(rightAnchor)] + pub unsafe fn rightAnchor(&self) -> Id; + #[method_id(topAnchor)] + pub unsafe fn topAnchor(&self) -> Id; + #[method_id(bottomAnchor)] + pub unsafe fn bottomAnchor(&self) -> Id; + #[method_id(widthAnchor)] + pub unsafe fn widthAnchor(&self) -> Id; + #[method_id(heightAnchor)] + pub unsafe fn heightAnchor(&self) -> Id; + #[method_id(centerXAnchor)] + pub unsafe fn centerXAnchor(&self) -> Id; + #[method_id(centerYAnchor)] + pub unsafe fn centerYAnchor(&self) -> Id; + #[method(hasAmbiguousLayout)] + pub unsafe fn hasAmbiguousLayout(&self) -> bool; + #[method_id(constraintsAffectingLayoutForOrientation:)] + pub unsafe fn constraintsAffectingLayoutForOrientation( + &self, + orientation: NSLayoutConstraintOrientation, + ) -> Id, Shared>; + } +); +extern_methods!( + #[doc = "NSLayoutGuideSupport"] + unsafe impl NSView { + #[method(addLayoutGuide:)] + pub unsafe fn addLayoutGuide(&self, guide: &NSLayoutGuide); + #[method(removeLayoutGuide:)] + pub unsafe fn removeLayoutGuide(&self, guide: &NSLayoutGuide); + #[method_id(layoutGuides)] + pub unsafe fn layoutGuides(&self) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs new file mode 100644 index 000000000..ce38543b1 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -0,0 +1,748 @@ +use super::__exported::NSAffineTransform; +use super::__exported::NSBox; +use super::__exported::NSColor; +use super::__exported::NSGraphicsContext; +use super::__exported::NSRulerMarker; +use super::__exported::NSRulerView; +use super::__exported::NSTextContainer; +use super::__exported::NSTextView; +use super::__exported::NSTypesetter; +use crate::AppKit::generated::NSFont::*; +use crate::AppKit::generated::NSGlyphGenerator::*; +use crate::AppKit::generated::NSTextStorage::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextLayoutOrientationProvider = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSLayoutManager; + unsafe impl ClassType for NSLayoutManager { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSLayoutManager { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(textStorage)] + pub unsafe fn textStorage(&self) -> Option>; + #[method(setTextStorage:)] + pub unsafe fn setTextStorage(&self, textStorage: Option<&NSTextStorage>); + #[method(replaceTextStorage:)] + pub unsafe fn replaceTextStorage(&self, newTextStorage: &NSTextStorage); + #[method_id(textContainers)] + pub unsafe fn textContainers(&self) -> Id, Shared>; + #[method(addTextContainer:)] + pub unsafe fn addTextContainer(&self, container: &NSTextContainer); + #[method(insertTextContainer:atIndex:)] + pub unsafe fn insertTextContainer_atIndex( + &self, + container: &NSTextContainer, + index: NSUInteger, + ); + #[method(removeTextContainerAtIndex:)] + pub unsafe fn removeTextContainerAtIndex(&self, index: NSUInteger); + #[method(textContainerChangedGeometry:)] + pub unsafe fn textContainerChangedGeometry(&self, container: &NSTextContainer); + #[method(textContainerChangedTextView:)] + pub unsafe fn textContainerChangedTextView(&self, container: &NSTextContainer); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSLayoutManagerDelegate>); + #[method(showsInvisibleCharacters)] + pub unsafe fn showsInvisibleCharacters(&self) -> bool; + #[method(setShowsInvisibleCharacters:)] + pub unsafe fn setShowsInvisibleCharacters(&self, showsInvisibleCharacters: bool); + #[method(showsControlCharacters)] + pub unsafe fn showsControlCharacters(&self) -> bool; + #[method(setShowsControlCharacters:)] + pub unsafe fn setShowsControlCharacters(&self, showsControlCharacters: bool); + #[method(usesDefaultHyphenation)] + pub unsafe fn usesDefaultHyphenation(&self) -> bool; + #[method(setUsesDefaultHyphenation:)] + pub unsafe fn setUsesDefaultHyphenation(&self, usesDefaultHyphenation: bool); + #[method(usesFontLeading)] + pub unsafe fn usesFontLeading(&self) -> bool; + #[method(setUsesFontLeading:)] + pub unsafe fn setUsesFontLeading(&self, usesFontLeading: bool); + #[method(allowsNonContiguousLayout)] + pub unsafe fn allowsNonContiguousLayout(&self) -> bool; + #[method(setAllowsNonContiguousLayout:)] + pub unsafe fn setAllowsNonContiguousLayout(&self, allowsNonContiguousLayout: bool); + #[method(hasNonContiguousLayout)] + pub unsafe fn hasNonContiguousLayout(&self) -> bool; + #[method(limitsLayoutForSuspiciousContents)] + pub unsafe fn limitsLayoutForSuspiciousContents(&self) -> bool; + #[method(setLimitsLayoutForSuspiciousContents:)] + pub unsafe fn setLimitsLayoutForSuspiciousContents( + &self, + limitsLayoutForSuspiciousContents: bool, + ); + #[method(backgroundLayoutEnabled)] + pub unsafe fn backgroundLayoutEnabled(&self) -> bool; + #[method(setBackgroundLayoutEnabled:)] + pub unsafe fn setBackgroundLayoutEnabled(&self, backgroundLayoutEnabled: bool); + #[method(defaultAttachmentScaling)] + pub unsafe fn defaultAttachmentScaling(&self) -> NSImageScaling; + #[method(setDefaultAttachmentScaling:)] + pub unsafe fn setDefaultAttachmentScaling(&self, defaultAttachmentScaling: NSImageScaling); + #[method_id(typesetter)] + pub unsafe fn typesetter(&self) -> Id; + #[method(setTypesetter:)] + pub unsafe fn setTypesetter(&self, typesetter: &NSTypesetter); + #[method(typesetterBehavior)] + pub unsafe fn typesetterBehavior(&self) -> NSTypesetterBehavior; + #[method(setTypesetterBehavior:)] + pub unsafe fn setTypesetterBehavior(&self, typesetterBehavior: NSTypesetterBehavior); + #[method(invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange:)] + pub unsafe fn invalidateGlyphsForCharacterRange_changeInLength_actualCharacterRange( + &self, + charRange: NSRange, + delta: NSInteger, + actualCharRange: NSRangePointer, + ); + #[method(invalidateLayoutForCharacterRange:actualCharacterRange:)] + pub unsafe fn invalidateLayoutForCharacterRange_actualCharacterRange( + &self, + charRange: NSRange, + actualCharRange: NSRangePointer, + ); + #[method(invalidateDisplayForCharacterRange:)] + pub unsafe fn invalidateDisplayForCharacterRange(&self, charRange: NSRange); + #[method(invalidateDisplayForGlyphRange:)] + pub unsafe fn invalidateDisplayForGlyphRange(&self, glyphRange: NSRange); + #[method(processEditingForTextStorage:edited:range:changeInLength:invalidatedRange:)] + pub unsafe fn processEditingForTextStorage_edited_range_changeInLength_invalidatedRange( + &self, + textStorage: &NSTextStorage, + editMask: NSTextStorageEditActions, + newCharRange: NSRange, + delta: NSInteger, + invalidatedCharRange: NSRange, + ); + #[method(ensureGlyphsForCharacterRange:)] + pub unsafe fn ensureGlyphsForCharacterRange(&self, charRange: NSRange); + #[method(ensureGlyphsForGlyphRange:)] + pub unsafe fn ensureGlyphsForGlyphRange(&self, glyphRange: NSRange); + #[method(ensureLayoutForCharacterRange:)] + pub unsafe fn ensureLayoutForCharacterRange(&self, charRange: NSRange); + #[method(ensureLayoutForGlyphRange:)] + pub unsafe fn ensureLayoutForGlyphRange(&self, glyphRange: NSRange); + #[method(ensureLayoutForTextContainer:)] + pub unsafe fn ensureLayoutForTextContainer(&self, container: &NSTextContainer); + #[method(ensureLayoutForBoundingRect:inTextContainer:)] + pub unsafe fn ensureLayoutForBoundingRect_inTextContainer( + &self, + bounds: NSRect, + container: &NSTextContainer, + ); + #[method(setGlyphs:properties:characterIndexes:font:forGlyphRange:)] + pub unsafe fn setGlyphs_properties_characterIndexes_font_forGlyphRange( + &self, + glyphs: NonNull, + props: NonNull, + charIndexes: NonNull, + aFont: &NSFont, + glyphRange: NSRange, + ); + #[method(numberOfGlyphs)] + pub unsafe fn numberOfGlyphs(&self) -> NSUInteger; + #[method(CGGlyphAtIndex:isValidIndex:)] + pub unsafe fn CGGlyphAtIndex_isValidIndex( + &self, + glyphIndex: NSUInteger, + isValidIndex: *mut bool, + ) -> CGGlyph; + #[method(CGGlyphAtIndex:)] + pub unsafe fn CGGlyphAtIndex(&self, glyphIndex: NSUInteger) -> CGGlyph; + #[method(isValidGlyphIndex:)] + pub unsafe fn isValidGlyphIndex(&self, glyphIndex: NSUInteger) -> bool; + #[method(propertyForGlyphAtIndex:)] + pub unsafe fn propertyForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> NSGlyphProperty; + #[method(characterIndexForGlyphAtIndex:)] + pub unsafe fn characterIndexForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> NSUInteger; + #[method(glyphIndexForCharacterAtIndex:)] + pub unsafe fn glyphIndexForCharacterAtIndex(&self, charIndex: NSUInteger) -> NSUInteger; + #[method(getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:)] + pub unsafe fn getGlyphsInRange_glyphs_properties_characterIndexes_bidiLevels( + &self, + glyphRange: NSRange, + glyphBuffer: *mut CGGlyph, + props: *mut NSGlyphProperty, + charIndexBuffer: *mut NSUInteger, + bidiLevelBuffer: *mut c_uchar, + ) -> NSUInteger; + #[method(setTextContainer:forGlyphRange:)] + pub unsafe fn setTextContainer_forGlyphRange( + &self, + container: &NSTextContainer, + glyphRange: NSRange, + ); + #[method(setLineFragmentRect:forGlyphRange:usedRect:)] + pub unsafe fn setLineFragmentRect_forGlyphRange_usedRect( + &self, + fragmentRect: NSRect, + glyphRange: NSRange, + usedRect: NSRect, + ); + #[method(setExtraLineFragmentRect:usedRect:textContainer:)] + pub unsafe fn setExtraLineFragmentRect_usedRect_textContainer( + &self, + fragmentRect: NSRect, + usedRect: NSRect, + container: &NSTextContainer, + ); + #[method(setLocation:forStartOfGlyphRange:)] + pub unsafe fn setLocation_forStartOfGlyphRange( + &self, + location: NSPoint, + glyphRange: NSRange, + ); + #[method(setNotShownAttribute:forGlyphAtIndex:)] + pub unsafe fn setNotShownAttribute_forGlyphAtIndex( + &self, + flag: bool, + glyphIndex: NSUInteger, + ); + #[method(setDrawsOutsideLineFragment:forGlyphAtIndex:)] + pub unsafe fn setDrawsOutsideLineFragment_forGlyphAtIndex( + &self, + flag: bool, + glyphIndex: NSUInteger, + ); + #[method(setAttachmentSize:forGlyphRange:)] + pub unsafe fn setAttachmentSize_forGlyphRange( + &self, + attachmentSize: NSSize, + glyphRange: NSRange, + ); + #[method(getFirstUnlaidCharacterIndex:glyphIndex:)] + pub unsafe fn getFirstUnlaidCharacterIndex_glyphIndex( + &self, + charIndex: *mut NSUInteger, + glyphIndex: *mut NSUInteger, + ); + #[method(firstUnlaidCharacterIndex)] + pub unsafe fn firstUnlaidCharacterIndex(&self) -> NSUInteger; + #[method(firstUnlaidGlyphIndex)] + pub unsafe fn firstUnlaidGlyphIndex(&self) -> NSUInteger; + #[method_id(textContainerForGlyphAtIndex:effectiveRange:)] + pub unsafe fn textContainerForGlyphAtIndex_effectiveRange( + &self, + glyphIndex: NSUInteger, + effectiveGlyphRange: NSRangePointer, + ) -> Option>; + #[method_id(textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:)] + pub unsafe fn textContainerForGlyphAtIndex_effectiveRange_withoutAdditionalLayout( + &self, + glyphIndex: NSUInteger, + effectiveGlyphRange: NSRangePointer, + flag: bool, + ) -> Option>; + #[method(usedRectForTextContainer:)] + pub unsafe fn usedRectForTextContainer(&self, container: &NSTextContainer) -> NSRect; + #[method(lineFragmentRectForGlyphAtIndex:effectiveRange:)] + pub unsafe fn lineFragmentRectForGlyphAtIndex_effectiveRange( + &self, + glyphIndex: NSUInteger, + effectiveGlyphRange: NSRangePointer, + ) -> NSRect; + #[method(lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:)] + pub unsafe fn lineFragmentRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout( + &self, + glyphIndex: NSUInteger, + effectiveGlyphRange: NSRangePointer, + flag: bool, + ) -> NSRect; + #[method(lineFragmentUsedRectForGlyphAtIndex:effectiveRange:)] + pub unsafe fn lineFragmentUsedRectForGlyphAtIndex_effectiveRange( + &self, + glyphIndex: NSUInteger, + effectiveGlyphRange: NSRangePointer, + ) -> NSRect; + #[method(lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:)] + pub unsafe fn lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout( + &self, + glyphIndex: NSUInteger, + effectiveGlyphRange: NSRangePointer, + flag: bool, + ) -> NSRect; + #[method(extraLineFragmentRect)] + pub unsafe fn extraLineFragmentRect(&self) -> NSRect; + #[method(extraLineFragmentUsedRect)] + pub unsafe fn extraLineFragmentUsedRect(&self) -> NSRect; + #[method_id(extraLineFragmentTextContainer)] + pub unsafe fn extraLineFragmentTextContainer(&self) -> Option>; + #[method(locationForGlyphAtIndex:)] + pub unsafe fn locationForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> NSPoint; + #[method(notShownAttributeForGlyphAtIndex:)] + pub unsafe fn notShownAttributeForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> bool; + #[method(drawsOutsideLineFragmentForGlyphAtIndex:)] + pub unsafe fn drawsOutsideLineFragmentForGlyphAtIndex( + &self, + glyphIndex: NSUInteger, + ) -> bool; + #[method(attachmentSizeForGlyphAtIndex:)] + pub unsafe fn attachmentSizeForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> NSSize; + #[method(truncatedGlyphRangeInLineFragmentForGlyphAtIndex:)] + pub unsafe fn truncatedGlyphRangeInLineFragmentForGlyphAtIndex( + &self, + glyphIndex: NSUInteger, + ) -> NSRange; + #[method(glyphRangeForCharacterRange:actualCharacterRange:)] + pub unsafe fn glyphRangeForCharacterRange_actualCharacterRange( + &self, + charRange: NSRange, + actualCharRange: NSRangePointer, + ) -> NSRange; + #[method(characterRangeForGlyphRange:actualGlyphRange:)] + pub unsafe fn characterRangeForGlyphRange_actualGlyphRange( + &self, + glyphRange: NSRange, + actualGlyphRange: NSRangePointer, + ) -> NSRange; + #[method(glyphRangeForTextContainer:)] + pub unsafe fn glyphRangeForTextContainer(&self, container: &NSTextContainer) -> NSRange; + #[method(rangeOfNominallySpacedGlyphsContainingIndex:)] + pub unsafe fn rangeOfNominallySpacedGlyphsContainingIndex( + &self, + glyphIndex: NSUInteger, + ) -> NSRange; + #[method(boundingRectForGlyphRange:inTextContainer:)] + pub unsafe fn boundingRectForGlyphRange_inTextContainer( + &self, + glyphRange: NSRange, + container: &NSTextContainer, + ) -> NSRect; + #[method(glyphRangeForBoundingRect:inTextContainer:)] + pub unsafe fn glyphRangeForBoundingRect_inTextContainer( + &self, + bounds: NSRect, + container: &NSTextContainer, + ) -> NSRange; + #[method(glyphRangeForBoundingRectWithoutAdditionalLayout:inTextContainer:)] + pub unsafe fn glyphRangeForBoundingRectWithoutAdditionalLayout_inTextContainer( + &self, + bounds: NSRect, + container: &NSTextContainer, + ) -> NSRange; + #[method(glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:)] + pub unsafe fn glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph( + &self, + point: NSPoint, + container: &NSTextContainer, + partialFraction: *mut CGFloat, + ) -> NSUInteger; + #[method(glyphIndexForPoint:inTextContainer:)] + pub unsafe fn glyphIndexForPoint_inTextContainer( + &self, + point: NSPoint, + container: &NSTextContainer, + ) -> NSUInteger; + #[method(fractionOfDistanceThroughGlyphForPoint:inTextContainer:)] + pub unsafe fn fractionOfDistanceThroughGlyphForPoint_inTextContainer( + &self, + point: NSPoint, + container: &NSTextContainer, + ) -> CGFloat; + #[method(characterIndexForPoint:inTextContainer:fractionOfDistanceBetweenInsertionPoints:)] + pub unsafe fn characterIndexForPoint_inTextContainer_fractionOfDistanceBetweenInsertionPoints( + &self, + point: NSPoint, + container: &NSTextContainer, + partialFraction: *mut CGFloat, + ) -> NSUInteger; + #[method(getLineFragmentInsertionPointsForCharacterAtIndex:alternatePositions:inDisplayOrder:positions:characterIndexes:)] + pub unsafe fn getLineFragmentInsertionPointsForCharacterAtIndex_alternatePositions_inDisplayOrder_positions_characterIndexes( + &self, + charIndex: NSUInteger, + aFlag: bool, + dFlag: bool, + positions: *mut CGFloat, + charIndexes: *mut NSUInteger, + ) -> NSUInteger; + #[method(enumerateLineFragmentsForGlyphRange:usingBlock:)] + pub unsafe fn enumerateLineFragmentsForGlyphRange_usingBlock( + &self, + glyphRange: NSRange, + block: TodoBlock, + ); + #[method(enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:)] + pub unsafe fn enumerateEnclosingRectsForGlyphRange_withinSelectedGlyphRange_inTextContainer_usingBlock( + &self, + glyphRange: NSRange, + selectedRange: NSRange, + textContainer: &NSTextContainer, + block: TodoBlock, + ); + #[method(drawBackgroundForGlyphRange:atPoint:)] + pub unsafe fn drawBackgroundForGlyphRange_atPoint( + &self, + glyphsToShow: NSRange, + origin: NSPoint, + ); + #[method(drawGlyphsForGlyphRange:atPoint:)] + pub unsafe fn drawGlyphsForGlyphRange_atPoint( + &self, + glyphsToShow: NSRange, + origin: NSPoint, + ); + #[method(showCGGlyphs:positions:count:font:textMatrix:attributes:inContext:)] + pub unsafe fn showCGGlyphs_positions_count_font_textMatrix_attributes_inContext( + &self, + glyphs: NonNull, + positions: NonNull, + glyphCount: NSInteger, + font: &NSFont, + textMatrix: CGAffineTransform, + attributes: &NSDictionary, + CGContext: CGContextRef, + ); + #[method(fillBackgroundRectArray:count:forCharacterRange:color:)] + pub unsafe fn fillBackgroundRectArray_count_forCharacterRange_color( + &self, + rectArray: NonNull, + rectCount: NSUInteger, + charRange: NSRange, + color: &NSColor, + ); + #[method(drawUnderlineForGlyphRange:underlineType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] + pub unsafe fn drawUnderlineForGlyphRange_underlineType_baselineOffset_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( + &self, + glyphRange: NSRange, + underlineVal: NSUnderlineStyle, + baselineOffset: CGFloat, + lineRect: NSRect, + lineGlyphRange: NSRange, + containerOrigin: NSPoint, + ); + #[method(underlineGlyphRange:underlineType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] + pub unsafe fn underlineGlyphRange_underlineType_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( + &self, + glyphRange: NSRange, + underlineVal: NSUnderlineStyle, + lineRect: NSRect, + lineGlyphRange: NSRange, + containerOrigin: NSPoint, + ); + #[method(drawStrikethroughForGlyphRange:strikethroughType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] + pub unsafe fn drawStrikethroughForGlyphRange_strikethroughType_baselineOffset_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( + &self, + glyphRange: NSRange, + strikethroughVal: NSUnderlineStyle, + baselineOffset: CGFloat, + lineRect: NSRect, + lineGlyphRange: NSRange, + containerOrigin: NSPoint, + ); + #[method(strikethroughGlyphRange:strikethroughType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] + pub unsafe fn strikethroughGlyphRange_strikethroughType_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( + &self, + glyphRange: NSRange, + strikethroughVal: NSUnderlineStyle, + lineRect: NSRect, + lineGlyphRange: NSRange, + containerOrigin: NSPoint, + ); + #[method(showAttachmentCell:inRect:characterIndex:)] + pub unsafe fn showAttachmentCell_inRect_characterIndex( + &self, + cell: &NSCell, + rect: NSRect, + attachmentIndex: NSUInteger, + ); + #[method(setLayoutRect:forTextBlock:glyphRange:)] + pub unsafe fn setLayoutRect_forTextBlock_glyphRange( + &self, + rect: NSRect, + block: &NSTextBlock, + glyphRange: NSRange, + ); + #[method(setBoundsRect:forTextBlock:glyphRange:)] + pub unsafe fn setBoundsRect_forTextBlock_glyphRange( + &self, + rect: NSRect, + block: &NSTextBlock, + glyphRange: NSRange, + ); + #[method(layoutRectForTextBlock:glyphRange:)] + pub unsafe fn layoutRectForTextBlock_glyphRange( + &self, + block: &NSTextBlock, + glyphRange: NSRange, + ) -> NSRect; + #[method(boundsRectForTextBlock:glyphRange:)] + pub unsafe fn boundsRectForTextBlock_glyphRange( + &self, + block: &NSTextBlock, + glyphRange: NSRange, + ) -> NSRect; + #[method(layoutRectForTextBlock:atIndex:effectiveRange:)] + pub unsafe fn layoutRectForTextBlock_atIndex_effectiveRange( + &self, + block: &NSTextBlock, + glyphIndex: NSUInteger, + effectiveGlyphRange: NSRangePointer, + ) -> NSRect; + #[method(boundsRectForTextBlock:atIndex:effectiveRange:)] + pub unsafe fn boundsRectForTextBlock_atIndex_effectiveRange( + &self, + block: &NSTextBlock, + glyphIndex: NSUInteger, + effectiveGlyphRange: NSRangePointer, + ) -> NSRect; + #[method_id(temporaryAttributesAtCharacterIndex:effectiveRange:)] + pub unsafe fn temporaryAttributesAtCharacterIndex_effectiveRange( + &self, + charIndex: NSUInteger, + effectiveCharRange: NSRangePointer, + ) -> Id, Shared>; + #[method(setTemporaryAttributes:forCharacterRange:)] + pub unsafe fn setTemporaryAttributes_forCharacterRange( + &self, + attrs: &NSDictionary, + charRange: NSRange, + ); + #[method(addTemporaryAttributes:forCharacterRange:)] + pub unsafe fn addTemporaryAttributes_forCharacterRange( + &self, + attrs: &NSDictionary, + charRange: NSRange, + ); + #[method(removeTemporaryAttribute:forCharacterRange:)] + pub unsafe fn removeTemporaryAttribute_forCharacterRange( + &self, + attrName: &NSAttributedStringKey, + charRange: NSRange, + ); + #[method_id(temporaryAttribute:atCharacterIndex:effectiveRange:)] + pub unsafe fn temporaryAttribute_atCharacterIndex_effectiveRange( + &self, + attrName: &NSAttributedStringKey, + location: NSUInteger, + range: NSRangePointer, + ) -> Option>; + #[method_id(temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:)] + pub unsafe fn temporaryAttribute_atCharacterIndex_longestEffectiveRange_inRange( + &self, + attrName: &NSAttributedStringKey, + location: NSUInteger, + range: NSRangePointer, + rangeLimit: NSRange, + ) -> Option>; + #[method_id(temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:)] + pub unsafe fn temporaryAttributesAtCharacterIndex_longestEffectiveRange_inRange( + &self, + location: NSUInteger, + range: NSRangePointer, + rangeLimit: NSRange, + ) -> Id, Shared>; + #[method(addTemporaryAttribute:value:forCharacterRange:)] + pub unsafe fn addTemporaryAttribute_value_forCharacterRange( + &self, + attrName: &NSAttributedStringKey, + value: &Object, + charRange: NSRange, + ); + #[method(defaultLineHeightForFont:)] + pub unsafe fn defaultLineHeightForFont(&self, theFont: &NSFont) -> CGFloat; + #[method(defaultBaselineOffsetForFont:)] + pub unsafe fn defaultBaselineOffsetForFont(&self, theFont: &NSFont) -> CGFloat; + } +); +extern_methods!( + #[doc = "NSTextViewSupport"] + unsafe impl NSLayoutManager { + #[method_id(rulerMarkersForTextView:paragraphStyle:ruler:)] + pub unsafe fn rulerMarkersForTextView_paragraphStyle_ruler( + &self, + view: &NSTextView, + style: &NSParagraphStyle, + ruler: &NSRulerView, + ) -> Id, Shared>; + #[method_id(rulerAccessoryViewForTextView:paragraphStyle:ruler:enabled:)] + pub unsafe fn rulerAccessoryViewForTextView_paragraphStyle_ruler_enabled( + &self, + view: &NSTextView, + style: &NSParagraphStyle, + ruler: &NSRulerView, + isEnabled: bool, + ) -> Option>; + #[method(layoutManagerOwnsFirstResponderInWindow:)] + pub unsafe fn layoutManagerOwnsFirstResponderInWindow(&self, window: &NSWindow) -> bool; + #[method_id(firstTextView)] + pub unsafe fn firstTextView(&self) -> Option>; + #[method_id(textViewForBeginningOfSelection)] + pub unsafe fn textViewForBeginningOfSelection(&self) -> Option>; + } +); +pub type NSLayoutManagerDelegate = NSObject; +extern_methods!( + #[doc = "NSLayoutManagerDeprecated"] + unsafe impl NSLayoutManager { + #[method(glyphAtIndex:isValidIndex:)] + pub unsafe fn glyphAtIndex_isValidIndex( + &self, + glyphIndex: NSUInteger, + isValidIndex: *mut bool, + ) -> NSGlyph; + #[method(glyphAtIndex:)] + pub unsafe fn glyphAtIndex(&self, glyphIndex: NSUInteger) -> NSGlyph; + #[method(rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:)] + pub unsafe fn rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount( + &self, + charRange: NSRange, + selCharRange: NSRange, + container: &NSTextContainer, + rectCount: NonNull, + ) -> NSRectArray; + #[method(rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:)] + pub unsafe fn rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount( + &self, + glyphRange: NSRange, + selGlyphRange: NSRange, + container: &NSTextContainer, + rectCount: NonNull, + ) -> NSRectArray; + #[method(usesScreenFonts)] + pub unsafe fn usesScreenFonts(&self) -> bool; + #[method(setUsesScreenFonts:)] + pub unsafe fn setUsesScreenFonts(&self, usesScreenFonts: bool); + #[method_id(substituteFontForFont:)] + pub unsafe fn substituteFontForFont(&self, originalFont: &NSFont) -> Id; + #[method(insertGlyphs:length:forStartingGlyphAtIndex:characterIndex:)] + pub unsafe fn insertGlyphs_length_forStartingGlyphAtIndex_characterIndex( + &self, + glyphs: NonNull, + length: NSUInteger, + glyphIndex: NSUInteger, + charIndex: NSUInteger, + ); + #[method(insertGlyph:atGlyphIndex:characterIndex:)] + pub unsafe fn insertGlyph_atGlyphIndex_characterIndex( + &self, + glyph: NSGlyph, + glyphIndex: NSUInteger, + charIndex: NSUInteger, + ); + #[method(replaceGlyphAtIndex:withGlyph:)] + pub unsafe fn replaceGlyphAtIndex_withGlyph( + &self, + glyphIndex: NSUInteger, + newGlyph: NSGlyph, + ); + #[method(deleteGlyphsInRange:)] + pub unsafe fn deleteGlyphsInRange(&self, glyphRange: NSRange); + #[method(setCharacterIndex:forGlyphAtIndex:)] + pub unsafe fn setCharacterIndex_forGlyphAtIndex( + &self, + charIndex: NSUInteger, + glyphIndex: NSUInteger, + ); + #[method(setIntAttribute:value:forGlyphAtIndex:)] + pub unsafe fn setIntAttribute_value_forGlyphAtIndex( + &self, + attributeTag: NSInteger, + val: NSInteger, + glyphIndex: NSUInteger, + ); + #[method(invalidateGlyphsOnLayoutInvalidationForGlyphRange:)] + pub unsafe fn invalidateGlyphsOnLayoutInvalidationForGlyphRange(&self, glyphRange: NSRange); + #[method(intAttribute:forGlyphAtIndex:)] + pub unsafe fn intAttribute_forGlyphAtIndex( + &self, + attributeTag: NSInteger, + glyphIndex: NSUInteger, + ) -> NSInteger; + #[method(getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:)] + pub unsafe fn getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits( + &self, + glyphRange: NSRange, + glyphBuffer: *mut NSGlyph, + charIndexBuffer: *mut NSUInteger, + inscribeBuffer: *mut NSGlyphInscription, + elasticBuffer: *mut bool, + ) -> NSUInteger; + #[method(getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)] + pub unsafe fn getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels( + &self, + glyphRange: NSRange, + glyphBuffer: *mut NSGlyph, + charIndexBuffer: *mut NSUInteger, + inscribeBuffer: *mut NSGlyphInscription, + elasticBuffer: *mut bool, + bidiLevelBuffer: *mut c_uchar, + ) -> NSUInteger; + #[method(getGlyphs:range:)] + pub unsafe fn getGlyphs_range( + &self, + glyphArray: *mut NSGlyph, + glyphRange: NSRange, + ) -> NSUInteger; + #[method(invalidateLayoutForCharacterRange:isSoft:actualCharacterRange:)] + pub unsafe fn invalidateLayoutForCharacterRange_isSoft_actualCharacterRange( + &self, + charRange: NSRange, + flag: bool, + actualCharRange: NSRangePointer, + ); + #[method(textStorage:edited:range:changeInLength:invalidatedRange:)] + pub unsafe fn textStorage_edited_range_changeInLength_invalidatedRange( + &self, + str: &NSTextStorage, + editedMask: NSTextStorageEditedOptions, + newCharRange: NSRange, + delta: NSInteger, + invalidatedCharRange: NSRange, + ); + #[method(setLocations:startingGlyphIndexes:count:forGlyphRange:)] + pub unsafe fn setLocations_startingGlyphIndexes_count_forGlyphRange( + &self, + locations: NSPointArray, + glyphIndexes: NonNull, + count: NSUInteger, + glyphRange: NSRange, + ); + #[method(showPackedGlyphs:length:glyphRange:atPoint:font:color:printingAdjustment:)] + pub unsafe fn showPackedGlyphs_length_glyphRange_atPoint_font_color_printingAdjustment( + &self, + glyphs: NonNull, + glyphLen: NSUInteger, + glyphRange: NSRange, + point: NSPoint, + font: &NSFont, + color: &NSColor, + printingAdjustment: NSSize, + ); + #[method(showCGGlyphs:positions:count:font:matrix:attributes:inContext:)] + pub unsafe fn showCGGlyphs_positions_count_font_matrix_attributes_inContext( + &self, + glyphs: NonNull, + positions: NonNull, + glyphCount: NSUInteger, + font: &NSFont, + textMatrix: &NSAffineTransform, + attributes: &NSDictionary, + graphicsContext: &NSGraphicsContext, + ); + #[method(hyphenationFactor)] + pub unsafe fn hyphenationFactor(&self) -> c_float; + #[method(setHyphenationFactor:)] + pub unsafe fn setHyphenationFactor(&self, hyphenationFactor: c_float); + } +); +extern_methods!( + #[doc = "NSGlyphGeneration"] + unsafe impl NSLayoutManager { + #[method_id(glyphGenerator)] + pub unsafe fn glyphGenerator(&self) -> Id; + #[method(setGlyphGenerator:)] + pub unsafe fn setGlyphGenerator(&self, glyphGenerator: &NSGlyphGenerator); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs new file mode 100644 index 000000000..2901f7d1d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs @@ -0,0 +1,89 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSLevelIndicatorCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSLevelIndicator; + unsafe impl ClassType for NSLevelIndicator { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSLevelIndicator { + #[method(levelIndicatorStyle)] + pub unsafe fn levelIndicatorStyle(&self) -> NSLevelIndicatorStyle; + #[method(setLevelIndicatorStyle:)] + pub unsafe fn setLevelIndicatorStyle(&self, levelIndicatorStyle: NSLevelIndicatorStyle); + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] + pub unsafe fn setEditable(&self, editable: bool); + #[method(minValue)] + pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] + pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] + pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] + pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(warningValue)] + pub unsafe fn warningValue(&self) -> c_double; + #[method(setWarningValue:)] + pub unsafe fn setWarningValue(&self, warningValue: c_double); + #[method(criticalValue)] + pub unsafe fn criticalValue(&self) -> c_double; + #[method(setCriticalValue:)] + pub unsafe fn setCriticalValue(&self, criticalValue: c_double); + #[method(tickMarkPosition)] + pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[method(setTickMarkPosition:)] + pub unsafe fn setTickMarkPosition(&self, tickMarkPosition: NSTickMarkPosition); + #[method(numberOfTickMarks)] + pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[method(setNumberOfTickMarks:)] + pub unsafe fn setNumberOfTickMarks(&self, numberOfTickMarks: NSInteger); + #[method(numberOfMajorTickMarks)] + pub unsafe fn numberOfMajorTickMarks(&self) -> NSInteger; + #[method(setNumberOfMajorTickMarks:)] + pub unsafe fn setNumberOfMajorTickMarks(&self, numberOfMajorTickMarks: NSInteger); + #[method(tickMarkValueAtIndex:)] + pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; + #[method(rectOfTickMarkAtIndex:)] + pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[method_id(fillColor)] + pub unsafe fn fillColor(&self) -> Id; + #[method(setFillColor:)] + pub unsafe fn setFillColor(&self, fillColor: Option<&NSColor>); + #[method_id(warningFillColor)] + pub unsafe fn warningFillColor(&self) -> Id; + #[method(setWarningFillColor:)] + pub unsafe fn setWarningFillColor(&self, warningFillColor: Option<&NSColor>); + #[method_id(criticalFillColor)] + pub unsafe fn criticalFillColor(&self) -> Id; + #[method(setCriticalFillColor:)] + pub unsafe fn setCriticalFillColor(&self, criticalFillColor: Option<&NSColor>); + #[method(drawsTieredCapacityLevels)] + pub unsafe fn drawsTieredCapacityLevels(&self) -> bool; + #[method(setDrawsTieredCapacityLevels:)] + pub unsafe fn setDrawsTieredCapacityLevels(&self, drawsTieredCapacityLevels: bool); + #[method(placeholderVisibility)] + pub unsafe fn placeholderVisibility(&self) -> NSLevelIndicatorPlaceholderVisibility; + #[method(setPlaceholderVisibility:)] + pub unsafe fn setPlaceholderVisibility( + &self, + placeholderVisibility: NSLevelIndicatorPlaceholderVisibility, + ); + #[method_id(ratingImage)] + pub unsafe fn ratingImage(&self) -> Option>; + #[method(setRatingImage:)] + pub unsafe fn setRatingImage(&self, ratingImage: Option<&NSImage>); + #[method_id(ratingPlaceholderImage)] + pub unsafe fn ratingPlaceholderImage(&self) -> Option>; + #[method(setRatingPlaceholderImage:)] + pub unsafe fn setRatingPlaceholderImage(&self, ratingPlaceholderImage: Option<&NSImage>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs new file mode 100644 index 000000000..5b0d8b03d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -0,0 +1,59 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSActionCell::*; +use crate::AppKit::generated::NSSliderCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSLevelIndicatorCell; + unsafe impl ClassType for NSLevelIndicatorCell { + type Super = NSActionCell; + } +); +extern_methods!( + unsafe impl NSLevelIndicatorCell { + #[method_id(initWithLevelIndicatorStyle:)] + pub unsafe fn initWithLevelIndicatorStyle( + &self, + levelIndicatorStyle: NSLevelIndicatorStyle, + ) -> Id; + #[method(levelIndicatorStyle)] + pub unsafe fn levelIndicatorStyle(&self) -> NSLevelIndicatorStyle; + #[method(setLevelIndicatorStyle:)] + pub unsafe fn setLevelIndicatorStyle(&self, levelIndicatorStyle: NSLevelIndicatorStyle); + #[method(minValue)] + pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] + pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] + pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] + pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(warningValue)] + pub unsafe fn warningValue(&self) -> c_double; + #[method(setWarningValue:)] + pub unsafe fn setWarningValue(&self, warningValue: c_double); + #[method(criticalValue)] + pub unsafe fn criticalValue(&self) -> c_double; + #[method(setCriticalValue:)] + pub unsafe fn setCriticalValue(&self, criticalValue: c_double); + #[method(tickMarkPosition)] + pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[method(setTickMarkPosition:)] + pub unsafe fn setTickMarkPosition(&self, tickMarkPosition: NSTickMarkPosition); + #[method(numberOfTickMarks)] + pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[method(setNumberOfTickMarks:)] + pub unsafe fn setNumberOfTickMarks(&self, numberOfTickMarks: NSInteger); + #[method(numberOfMajorTickMarks)] + pub unsafe fn numberOfMajorTickMarks(&self) -> NSInteger; + #[method(setNumberOfMajorTickMarks:)] + pub unsafe fn setNumberOfMajorTickMarks(&self, numberOfMajorTickMarks: NSInteger); + #[method(rectOfTickMarkAtIndex:)] + pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[method(tickMarkValueAtIndex:)] + pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs new file mode 100644 index 000000000..c094d4a66 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs @@ -0,0 +1,22 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSGestureRecognizer::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSMagnificationGestureRecognizer; + unsafe impl ClassType for NSMagnificationGestureRecognizer { + type Super = NSGestureRecognizer; + } +); +extern_methods!( + unsafe impl NSMagnificationGestureRecognizer { + #[method(magnification)] + pub unsafe fn magnification(&self) -> CGFloat; + #[method(setMagnification:)] + pub unsafe fn setMagnification(&self, magnification: CGFloat); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs new file mode 100644 index 000000000..7b1772109 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -0,0 +1,283 @@ +use super::__exported::NSColor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSMatrix; + unsafe impl ClassType for NSMatrix { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSMatrix { + #[method_id(initWithFrame:)] + pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithFrame:mode:prototype:numberOfRows:numberOfColumns:)] + pub unsafe fn initWithFrame_mode_prototype_numberOfRows_numberOfColumns( + &self, + frameRect: NSRect, + mode: NSMatrixMode, + cell: &NSCell, + rowsHigh: NSInteger, + colsWide: NSInteger, + ) -> Id; + #[method_id(initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:)] + pub unsafe fn initWithFrame_mode_cellClass_numberOfRows_numberOfColumns( + &self, + frameRect: NSRect, + mode: NSMatrixMode, + factoryId: Option<&Class>, + rowsHigh: NSInteger, + colsWide: NSInteger, + ) -> Id; + #[method(cellClass)] + pub unsafe fn cellClass(&self) -> &Class; + #[method(setCellClass:)] + pub unsafe fn setCellClass(&self, cellClass: &Class); + #[method_id(prototype)] + pub unsafe fn prototype(&self) -> Option>; + #[method(setPrototype:)] + pub unsafe fn setPrototype(&self, prototype: Option<&NSCell>); + #[method_id(makeCellAtRow:column:)] + pub unsafe fn makeCellAtRow_column( + &self, + row: NSInteger, + col: NSInteger, + ) -> Id; + #[method(mode)] + pub unsafe fn mode(&self) -> NSMatrixMode; + #[method(setMode:)] + pub unsafe fn setMode(&self, mode: NSMatrixMode); + #[method(allowsEmptySelection)] + pub unsafe fn allowsEmptySelection(&self) -> bool; + #[method(setAllowsEmptySelection:)] + pub unsafe fn setAllowsEmptySelection(&self, allowsEmptySelection: bool); + #[method(sendAction:to:forAllCells:)] + pub unsafe fn sendAction_to_forAllCells(&self, selector: Sel, object: &Object, flag: bool); + #[method_id(cells)] + pub unsafe fn cells(&self) -> Id, Shared>; + #[method(sortUsingSelector:)] + pub unsafe fn sortUsingSelector(&self, comparator: Sel); + #[method(sortUsingFunction:context:)] + pub unsafe fn sortUsingFunction_context( + &self, + compare: NonNull, + context: *mut c_void, + ); + #[method_id(selectedCell)] + pub unsafe fn selectedCell(&self) -> Option>; + #[method_id(selectedCells)] + pub unsafe fn selectedCells(&self) -> Id, Shared>; + #[method(selectedRow)] + pub unsafe fn selectedRow(&self) -> NSInteger; + #[method(selectedColumn)] + pub unsafe fn selectedColumn(&self) -> NSInteger; + #[method(isSelectionByRect)] + pub unsafe fn isSelectionByRect(&self) -> bool; + #[method(setSelectionByRect:)] + pub unsafe fn setSelectionByRect(&self, selectionByRect: bool); + #[method(setSelectionFrom:to:anchor:highlight:)] + pub unsafe fn setSelectionFrom_to_anchor_highlight( + &self, + startPos: NSInteger, + endPos: NSInteger, + anchorPos: NSInteger, + lit: bool, + ); + #[method(deselectSelectedCell)] + pub unsafe fn deselectSelectedCell(&self); + #[method(deselectAllCells)] + pub unsafe fn deselectAllCells(&self); + #[method(selectCellAtRow:column:)] + pub unsafe fn selectCellAtRow_column(&self, row: NSInteger, col: NSInteger); + #[method(selectAll:)] + pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[method(selectCellWithTag:)] + pub unsafe fn selectCellWithTag(&self, tag: NSInteger) -> bool; + #[method(cellSize)] + pub unsafe fn cellSize(&self) -> NSSize; + #[method(setCellSize:)] + pub unsafe fn setCellSize(&self, cellSize: NSSize); + #[method(intercellSpacing)] + pub unsafe fn intercellSpacing(&self) -> NSSize; + #[method(setIntercellSpacing:)] + pub unsafe fn setIntercellSpacing(&self, intercellSpacing: NSSize); + #[method(setScrollable:)] + pub unsafe fn setScrollable(&self, flag: bool); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method_id(cellBackgroundColor)] + pub unsafe fn cellBackgroundColor(&self) -> Option>; + #[method(setCellBackgroundColor:)] + pub unsafe fn setCellBackgroundColor(&self, cellBackgroundColor: Option<&NSColor>); + #[method(drawsCellBackground)] + pub unsafe fn drawsCellBackground(&self) -> bool; + #[method(setDrawsCellBackground:)] + pub unsafe fn setDrawsCellBackground(&self, drawsCellBackground: bool); + #[method(drawsBackground)] + pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] + pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method(setState:atRow:column:)] + pub unsafe fn setState_atRow_column( + &self, + value: NSInteger, + row: NSInteger, + col: NSInteger, + ); + #[method(getNumberOfRows:columns:)] + pub unsafe fn getNumberOfRows_columns( + &self, + rowCount: *mut NSInteger, + colCount: *mut NSInteger, + ); + #[method(numberOfRows)] + pub unsafe fn numberOfRows(&self) -> NSInteger; + #[method(numberOfColumns)] + pub unsafe fn numberOfColumns(&self) -> NSInteger; + #[method_id(cellAtRow:column:)] + pub unsafe fn cellAtRow_column( + &self, + row: NSInteger, + col: NSInteger, + ) -> Option>; + #[method(cellFrameAtRow:column:)] + pub unsafe fn cellFrameAtRow_column(&self, row: NSInteger, col: NSInteger) -> NSRect; + #[method(getRow:column:ofCell:)] + pub unsafe fn getRow_column_ofCell( + &self, + row: NonNull, + col: NonNull, + cell: &NSCell, + ) -> bool; + #[method(getRow:column:forPoint:)] + pub unsafe fn getRow_column_forPoint( + &self, + row: NonNull, + col: NonNull, + point: NSPoint, + ) -> bool; + #[method(renewRows:columns:)] + pub unsafe fn renewRows_columns(&self, newRows: NSInteger, newCols: NSInteger); + #[method(putCell:atRow:column:)] + pub unsafe fn putCell_atRow_column(&self, newCell: &NSCell, row: NSInteger, col: NSInteger); + #[method(addRow)] + pub unsafe fn addRow(&self); + #[method(addRowWithCells:)] + pub unsafe fn addRowWithCells(&self, newCells: &NSArray); + #[method(insertRow:)] + pub unsafe fn insertRow(&self, row: NSInteger); + #[method(insertRow:withCells:)] + pub unsafe fn insertRow_withCells( + &self, + row: NSInteger, + newCells: Option<&NSArray>, + ); + #[method(removeRow:)] + pub unsafe fn removeRow(&self, row: NSInteger); + #[method(addColumn)] + pub unsafe fn addColumn(&self); + #[method(addColumnWithCells:)] + pub unsafe fn addColumnWithCells(&self, newCells: &NSArray); + #[method(insertColumn:)] + pub unsafe fn insertColumn(&self, column: NSInteger); + #[method(insertColumn:withCells:)] + pub unsafe fn insertColumn_withCells( + &self, + column: NSInteger, + newCells: Option<&NSArray>, + ); + #[method(removeColumn:)] + pub unsafe fn removeColumn(&self, col: NSInteger); + #[method_id(cellWithTag:)] + pub unsafe fn cellWithTag(&self, tag: NSInteger) -> Option>; + #[method(doubleAction)] + pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] + pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method(autosizesCells)] + pub unsafe fn autosizesCells(&self) -> bool; + #[method(setAutosizesCells:)] + pub unsafe fn setAutosizesCells(&self, autosizesCells: bool); + #[method(sizeToCells)] + pub unsafe fn sizeToCells(&self); + #[method(setValidateSize:)] + pub unsafe fn setValidateSize(&self, flag: bool); + #[method(drawCellAtRow:column:)] + pub unsafe fn drawCellAtRow_column(&self, row: NSInteger, col: NSInteger); + #[method(highlightCell:atRow:column:)] + pub unsafe fn highlightCell_atRow_column(&self, flag: bool, row: NSInteger, col: NSInteger); + #[method(isAutoscroll)] + pub unsafe fn isAutoscroll(&self) -> bool; + #[method(setAutoscroll:)] + pub unsafe fn setAutoscroll(&self, autoscroll: bool); + #[method(scrollCellToVisibleAtRow:column:)] + pub unsafe fn scrollCellToVisibleAtRow_column(&self, row: NSInteger, col: NSInteger); + #[method(mouseDownFlags)] + pub unsafe fn mouseDownFlags(&self) -> NSInteger; + #[method(mouseDown:)] + pub unsafe fn mouseDown(&self, event: &NSEvent); + #[method(performKeyEquivalent:)] + pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; + #[method(sendAction)] + pub unsafe fn sendAction(&self) -> bool; + #[method(sendDoubleAction)] + pub unsafe fn sendDoubleAction(&self); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSMatrixDelegate>); + #[method(textShouldBeginEditing:)] + pub unsafe fn textShouldBeginEditing(&self, textObject: &NSText) -> bool; + #[method(textShouldEndEditing:)] + pub unsafe fn textShouldEndEditing(&self, textObject: &NSText) -> bool; + #[method(textDidBeginEditing:)] + pub unsafe fn textDidBeginEditing(&self, notification: &NSNotification); + #[method(textDidEndEditing:)] + pub unsafe fn textDidEndEditing(&self, notification: &NSNotification); + #[method(textDidChange:)] + pub unsafe fn textDidChange(&self, notification: &NSNotification); + #[method(selectText:)] + pub unsafe fn selectText(&self, sender: Option<&Object>); + #[method_id(selectTextAtRow:column:)] + pub unsafe fn selectTextAtRow_column( + &self, + row: NSInteger, + col: NSInteger, + ) -> Option>; + #[method(acceptsFirstMouse:)] + pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool; + #[method(resetCursorRects)] + pub unsafe fn resetCursorRects(&self); + #[method(setToolTip:forCell:)] + pub unsafe fn setToolTip_forCell(&self, toolTipString: Option<&NSString>, cell: &NSCell); + #[method_id(toolTipForCell:)] + pub unsafe fn toolTipForCell(&self, cell: &NSCell) -> Option>; + #[method(autorecalculatesCellSize)] + pub unsafe fn autorecalculatesCellSize(&self) -> bool; + #[method(setAutorecalculatesCellSize:)] + pub unsafe fn setAutorecalculatesCellSize(&self, autorecalculatesCellSize: bool); + } +); +extern_methods!( + #[doc = "NSKeyboardUI"] + unsafe impl NSMatrix { + #[method(tabKeyTraversesCells)] + pub unsafe fn tabKeyTraversesCells(&self) -> bool; + #[method(setTabKeyTraversesCells:)] + pub unsafe fn setTabKeyTraversesCells(&self, tabKeyTraversesCells: bool); + #[method_id(keyCell)] + pub unsafe fn keyCell(&self) -> Option>; + #[method(setKeyCell:)] + pub unsafe fn setKeyCell(&self, keyCell: Option<&NSCell>); + } +); +pub type NSMatrixDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs new file mode 100644 index 000000000..9d02bf2ba --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs @@ -0,0 +1,35 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSMediaLibraryBrowserController; + unsafe impl ClassType for NSMediaLibraryBrowserController { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSMediaLibraryBrowserController { + #[method(isVisible)] + pub unsafe fn isVisible(&self) -> bool; + #[method(setVisible:)] + pub unsafe fn setVisible(&self, visible: bool); + #[method(frame)] + pub unsafe fn frame(&self) -> NSRect; + #[method(setFrame:)] + pub unsafe fn setFrame(&self, frame: NSRect); + #[method(mediaLibraries)] + pub unsafe fn mediaLibraries(&self) -> NSMediaLibrary; + #[method(setMediaLibraries:)] + pub unsafe fn setMediaLibraries(&self, mediaLibraries: NSMediaLibrary); + #[method_id(sharedMediaLibraryBrowserController)] + pub unsafe fn sharedMediaLibraryBrowserController( + ) -> Id; + #[method(togglePanel:)] + pub unsafe fn togglePanel(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs new file mode 100644 index 000000000..2a4d9a1d1 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -0,0 +1,224 @@ +use super::__exported::NSEvent; +use super::__exported::NSFont; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSMenuItem::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSMenu; + unsafe impl ClassType for NSMenu { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSMenu { + #[method_id(initWithTitle:)] + pub unsafe fn initWithTitle(&self, title: &NSString) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method(popUpContextMenu:withEvent:forView:)] + pub unsafe fn popUpContextMenu_withEvent_forView( + menu: &NSMenu, + event: &NSEvent, + view: &NSView, + ); + #[method(popUpContextMenu:withEvent:forView:withFont:)] + pub unsafe fn popUpContextMenu_withEvent_forView_withFont( + menu: &NSMenu, + event: &NSEvent, + view: &NSView, + font: Option<&NSFont>, + ); + #[method(popUpMenuPositioningItem:atLocation:inView:)] + pub unsafe fn popUpMenuPositioningItem_atLocation_inView( + &self, + item: Option<&NSMenuItem>, + location: NSPoint, + view: Option<&NSView>, + ) -> bool; + #[method(setMenuBarVisible:)] + pub unsafe fn setMenuBarVisible(visible: bool); + #[method(menuBarVisible)] + pub unsafe fn menuBarVisible() -> bool; + #[method_id(supermenu)] + pub unsafe fn supermenu(&self) -> Option>; + #[method(setSupermenu:)] + pub unsafe fn setSupermenu(&self, supermenu: Option<&NSMenu>); + #[method(insertItem:atIndex:)] + pub unsafe fn insertItem_atIndex(&self, newItem: &NSMenuItem, index: NSInteger); + #[method(addItem:)] + pub unsafe fn addItem(&self, newItem: &NSMenuItem); + #[method_id(insertItemWithTitle:action:keyEquivalent:atIndex:)] + pub unsafe fn insertItemWithTitle_action_keyEquivalent_atIndex( + &self, + string: &NSString, + selector: Option, + charCode: &NSString, + index: NSInteger, + ) -> Id; + #[method_id(addItemWithTitle:action:keyEquivalent:)] + pub unsafe fn addItemWithTitle_action_keyEquivalent( + &self, + string: &NSString, + selector: Option, + charCode: &NSString, + ) -> Id; + #[method(removeItemAtIndex:)] + pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method(removeItem:)] + pub unsafe fn removeItem(&self, item: &NSMenuItem); + #[method(setSubmenu:forItem:)] + pub unsafe fn setSubmenu_forItem(&self, menu: Option<&NSMenu>, item: &NSMenuItem); + #[method(removeAllItems)] + pub unsafe fn removeAllItems(&self); + #[method_id(itemArray)] + pub unsafe fn itemArray(&self) -> Id, Shared>; + #[method(setItemArray:)] + pub unsafe fn setItemArray(&self, itemArray: &NSArray); + #[method(numberOfItems)] + pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method_id(itemAtIndex:)] + pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; + #[method(indexOfItem:)] + pub unsafe fn indexOfItem(&self, item: &NSMenuItem) -> NSInteger; + #[method(indexOfItemWithTitle:)] + pub unsafe fn indexOfItemWithTitle(&self, title: &NSString) -> NSInteger; + #[method(indexOfItemWithTag:)] + pub unsafe fn indexOfItemWithTag(&self, tag: NSInteger) -> NSInteger; + #[method(indexOfItemWithRepresentedObject:)] + pub unsafe fn indexOfItemWithRepresentedObject(&self, object: Option<&Object>) + -> NSInteger; + #[method(indexOfItemWithSubmenu:)] + pub unsafe fn indexOfItemWithSubmenu(&self, submenu: Option<&NSMenu>) -> NSInteger; + #[method(indexOfItemWithTarget:andAction:)] + pub unsafe fn indexOfItemWithTarget_andAction( + &self, + target: Option<&Object>, + actionSelector: Option, + ) -> NSInteger; + #[method_id(itemWithTitle:)] + pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; + #[method_id(itemWithTag:)] + pub unsafe fn itemWithTag(&self, tag: NSInteger) -> Option>; + #[method(autoenablesItems)] + pub unsafe fn autoenablesItems(&self) -> bool; + #[method(setAutoenablesItems:)] + pub unsafe fn setAutoenablesItems(&self, autoenablesItems: bool); + #[method(update)] + pub unsafe fn update(&self); + #[method(performKeyEquivalent:)] + pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; + #[method(itemChanged:)] + pub unsafe fn itemChanged(&self, item: &NSMenuItem); + #[method(performActionForItemAtIndex:)] + pub unsafe fn performActionForItemAtIndex(&self, index: NSInteger); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSMenuDelegate>); + #[method(menuBarHeight)] + pub unsafe fn menuBarHeight(&self) -> CGFloat; + #[method(cancelTracking)] + pub unsafe fn cancelTracking(&self); + #[method(cancelTrackingWithoutAnimation)] + pub unsafe fn cancelTrackingWithoutAnimation(&self); + #[method_id(highlightedItem)] + pub unsafe fn highlightedItem(&self) -> Option>; + #[method(minimumWidth)] + pub unsafe fn minimumWidth(&self) -> CGFloat; + #[method(setMinimumWidth:)] + pub unsafe fn setMinimumWidth(&self, minimumWidth: CGFloat); + #[method(size)] + pub unsafe fn size(&self) -> NSSize; + #[method_id(font)] + pub unsafe fn font(&self) -> Option>; + #[method(setFont:)] + pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[method(allowsContextMenuPlugIns)] + pub unsafe fn allowsContextMenuPlugIns(&self) -> bool; + #[method(setAllowsContextMenuPlugIns:)] + pub unsafe fn setAllowsContextMenuPlugIns(&self, allowsContextMenuPlugIns: bool); + #[method(showsStateColumn)] + pub unsafe fn showsStateColumn(&self) -> bool; + #[method(setShowsStateColumn:)] + pub unsafe fn setShowsStateColumn(&self, showsStateColumn: bool); + #[method(userInterfaceLayoutDirection)] + pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setUserInterfaceLayoutDirection:)] + pub unsafe fn setUserInterfaceLayoutDirection( + &self, + userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, + ); + } +); +extern_methods!( + #[doc = "NSSubmenuAction"] + unsafe impl NSMenu { + #[method(submenuAction:)] + pub unsafe fn submenuAction(&self, sender: Option<&Object>); + } +); +pub type NSMenuItemValidation = NSObject; +extern_methods!( + #[doc = "NSMenuValidation"] + unsafe impl NSObject { + #[method(validateMenuItem:)] + pub unsafe fn validateMenuItem(&self, menuItem: &NSMenuItem) -> bool; + } +); +pub type NSMenuDelegate = NSObject; +extern_methods!( + #[doc = "NSMenuPropertiesToUpdate"] + unsafe impl NSMenu { + #[method(propertiesToUpdate)] + pub unsafe fn propertiesToUpdate(&self) -> NSMenuProperties; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSMenu { + #[method(setMenuRepresentation:)] + pub unsafe fn setMenuRepresentation(&self, menuRep: Option<&Object>); + #[method_id(menuRepresentation)] + pub unsafe fn menuRepresentation(&self) -> Option>; + #[method(setContextMenuRepresentation:)] + pub unsafe fn setContextMenuRepresentation(&self, menuRep: Option<&Object>); + #[method_id(contextMenuRepresentation)] + pub unsafe fn contextMenuRepresentation(&self) -> Option>; + #[method(setTearOffMenuRepresentation:)] + pub unsafe fn setTearOffMenuRepresentation(&self, menuRep: Option<&Object>); + #[method_id(tearOffMenuRepresentation)] + pub unsafe fn tearOffMenuRepresentation(&self) -> Option>; + #[method(menuZone)] + pub unsafe fn menuZone() -> *mut NSZone; + #[method(setMenuZone:)] + pub unsafe fn setMenuZone(zone: *mut NSZone); + #[method_id(attachedMenu)] + pub unsafe fn attachedMenu(&self) -> Option>; + #[method(isAttached)] + pub unsafe fn isAttached(&self) -> bool; + #[method(sizeToFit)] + pub unsafe fn sizeToFit(&self); + #[method(locationForSubmenu:)] + pub unsafe fn locationForSubmenu(&self, submenu: Option<&NSMenu>) -> NSPoint; + #[method(menuChangedMessagesEnabled)] + pub unsafe fn menuChangedMessagesEnabled(&self) -> bool; + #[method(setMenuChangedMessagesEnabled:)] + pub unsafe fn setMenuChangedMessagesEnabled(&self, menuChangedMessagesEnabled: bool); + #[method(helpRequested:)] + pub unsafe fn helpRequested(&self, eventPtr: &NSEvent); + #[method(isTornOff)] + pub unsafe fn isTornOff(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs new file mode 100644 index 000000000..971373174 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -0,0 +1,178 @@ +use super::__exported::NSAttributedString; +use super::__exported::NSImage; +use super::__exported::NSMenu; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSMenuItem; + unsafe impl ClassType for NSMenuItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSMenuItem { + #[method(usesUserKeyEquivalents)] + pub unsafe fn usesUserKeyEquivalents() -> bool; + #[method(setUsesUserKeyEquivalents:)] + pub unsafe fn setUsesUserKeyEquivalents(usesUserKeyEquivalents: bool); + #[method_id(separatorItem)] + pub unsafe fn separatorItem() -> Id; + #[method_id(initWithTitle:action:keyEquivalent:)] + pub unsafe fn initWithTitle_action_keyEquivalent( + &self, + string: &NSString, + selector: Option, + charCode: &NSString, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(menu)] + pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] + pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method(hasSubmenu)] + pub unsafe fn hasSubmenu(&self) -> bool; + #[method_id(submenu)] + pub unsafe fn submenu(&self) -> Option>; + #[method(setSubmenu:)] + pub unsafe fn setSubmenu(&self, submenu: Option<&NSMenu>); + #[method_id(parentItem)] + pub unsafe fn parentItem(&self) -> Option>; + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(attributedTitle)] + pub unsafe fn attributedTitle(&self) -> Option>; + #[method(setAttributedTitle:)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); + #[method(isSeparatorItem)] + pub unsafe fn isSeparatorItem(&self) -> bool; + #[method_id(keyEquivalent)] + pub unsafe fn keyEquivalent(&self) -> Id; + #[method(setKeyEquivalent:)] + pub unsafe fn setKeyEquivalent(&self, keyEquivalent: &NSString); + #[method(keyEquivalentModifierMask)] + pub unsafe fn keyEquivalentModifierMask(&self) -> NSEventModifierFlags; + #[method(setKeyEquivalentModifierMask:)] + pub unsafe fn setKeyEquivalentModifierMask( + &self, + keyEquivalentModifierMask: NSEventModifierFlags, + ); + #[method_id(userKeyEquivalent)] + pub unsafe fn userKeyEquivalent(&self) -> Id; + #[method(allowsKeyEquivalentWhenHidden)] + pub unsafe fn allowsKeyEquivalentWhenHidden(&self) -> bool; + #[method(setAllowsKeyEquivalentWhenHidden:)] + pub unsafe fn setAllowsKeyEquivalentWhenHidden(&self, allowsKeyEquivalentWhenHidden: bool); + #[method(allowsAutomaticKeyEquivalentLocalization)] + pub unsafe fn allowsAutomaticKeyEquivalentLocalization(&self) -> bool; + #[method(setAllowsAutomaticKeyEquivalentLocalization:)] + pub unsafe fn setAllowsAutomaticKeyEquivalentLocalization( + &self, + allowsAutomaticKeyEquivalentLocalization: bool, + ); + #[method(allowsAutomaticKeyEquivalentMirroring)] + pub unsafe fn allowsAutomaticKeyEquivalentMirroring(&self) -> bool; + #[method(setAllowsAutomaticKeyEquivalentMirroring:)] + pub unsafe fn setAllowsAutomaticKeyEquivalentMirroring( + &self, + allowsAutomaticKeyEquivalentMirroring: bool, + ); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method(state)] + pub unsafe fn state(&self) -> NSControlStateValue; + #[method(setState:)] + pub unsafe fn setState(&self, state: NSControlStateValue); + #[method_id(onStateImage)] + pub unsafe fn onStateImage(&self) -> Option>; + #[method(setOnStateImage:)] + pub unsafe fn setOnStateImage(&self, onStateImage: Option<&NSImage>); + #[method_id(offStateImage)] + pub unsafe fn offStateImage(&self) -> Option>; + #[method(setOffStateImage:)] + pub unsafe fn setOffStateImage(&self, offStateImage: Option<&NSImage>); + #[method_id(mixedStateImage)] + pub unsafe fn mixedStateImage(&self) -> Option>; + #[method(setMixedStateImage:)] + pub unsafe fn setMixedStateImage(&self, mixedStateImage: Option<&NSImage>); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method(isAlternate)] + pub unsafe fn isAlternate(&self) -> bool; + #[method(setAlternate:)] + pub unsafe fn setAlternate(&self, alternate: bool); + #[method(indentationLevel)] + pub unsafe fn indentationLevel(&self) -> NSInteger; + #[method(setIndentationLevel:)] + pub unsafe fn setIndentationLevel(&self, indentationLevel: NSInteger); + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method(tag)] + pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] + pub unsafe fn setTag(&self, tag: NSInteger); + #[method_id(representedObject)] + pub unsafe fn representedObject(&self) -> Option>; + #[method(setRepresentedObject:)] + pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>); + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method(setView:)] + pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(isHighlighted)] + pub unsafe fn isHighlighted(&self) -> bool; + #[method(isHidden)] + pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool); + #[method(isHiddenOrHasHiddenAncestor)] + pub unsafe fn isHiddenOrHasHiddenAncestor(&self) -> bool; + #[method_id(toolTip)] + pub unsafe fn toolTip(&self) -> Option>; + #[method(setToolTip:)] + pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + } +); +extern_methods!( + #[doc = "NSViewEnclosingMenuItem"] + unsafe impl NSView { + #[method_id(enclosingMenuItem)] + pub unsafe fn enclosingMenuItem(&self) -> Option>; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSMenuItem { + #[method(setMnemonicLocation:)] + pub unsafe fn setMnemonicLocation(&self, location: NSUInteger); + #[method(mnemonicLocation)] + pub unsafe fn mnemonicLocation(&self) -> NSUInteger; + #[method_id(mnemonic)] + pub unsafe fn mnemonic(&self) -> Option>; + #[method(setTitleWithMnemonic:)] + pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: &NSString); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs new file mode 100644 index 000000000..4d8d819b7 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs @@ -0,0 +1,83 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSButtonCell::*; +use crate::AppKit::generated::NSMenu::*; +use crate::AppKit::generated::NSMenuItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSMenuItemCell; + unsafe impl ClassType for NSMenuItemCell { + type Super = NSButtonCell; + } +); +extern_methods!( + unsafe impl NSMenuItemCell { + #[method_id(initTextCell:)] + pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(menuItem)] + pub unsafe fn menuItem(&self) -> Option>; + #[method(setMenuItem:)] + pub unsafe fn setMenuItem(&self, menuItem: Option<&NSMenuItem>); + #[method(needsSizing)] + pub unsafe fn needsSizing(&self) -> bool; + #[method(setNeedsSizing:)] + pub unsafe fn setNeedsSizing(&self, needsSizing: bool); + #[method(calcSize)] + pub unsafe fn calcSize(&self); + #[method(needsDisplay)] + pub unsafe fn needsDisplay(&self) -> bool; + #[method(setNeedsDisplay:)] + pub unsafe fn setNeedsDisplay(&self, needsDisplay: bool); + #[method(stateImageWidth)] + pub unsafe fn stateImageWidth(&self) -> CGFloat; + #[method(imageWidth)] + pub unsafe fn imageWidth(&self) -> CGFloat; + #[method(titleWidth)] + pub unsafe fn titleWidth(&self) -> CGFloat; + #[method(keyEquivalentWidth)] + pub unsafe fn keyEquivalentWidth(&self) -> CGFloat; + #[method(stateImageRectForBounds:)] + pub unsafe fn stateImageRectForBounds(&self, cellFrame: NSRect) -> NSRect; + #[method(titleRectForBounds:)] + pub unsafe fn titleRectForBounds(&self, cellFrame: NSRect) -> NSRect; + #[method(keyEquivalentRectForBounds:)] + pub unsafe fn keyEquivalentRectForBounds(&self, cellFrame: NSRect) -> NSRect; + #[method(drawSeparatorItemWithFrame:inView:)] + pub unsafe fn drawSeparatorItemWithFrame_inView( + &self, + cellFrame: NSRect, + controlView: &NSView, + ); + #[method(drawStateImageWithFrame:inView:)] + pub unsafe fn drawStateImageWithFrame_inView( + &self, + cellFrame: NSRect, + controlView: &NSView, + ); + #[method(drawImageWithFrame:inView:)] + pub unsafe fn drawImageWithFrame_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method(drawTitleWithFrame:inView:)] + pub unsafe fn drawTitleWithFrame_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method(drawKeyEquivalentWithFrame:inView:)] + pub unsafe fn drawKeyEquivalentWithFrame_inView( + &self, + cellFrame: NSRect, + controlView: &NSView, + ); + #[method(drawBorderAndBackgroundWithFrame:inView:)] + pub unsafe fn drawBorderAndBackgroundWithFrame_inView( + &self, + cellFrame: NSRect, + controlView: &NSView, + ); + #[method(tag)] + pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] + pub unsafe fn setTag(&self, tag: NSInteger); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs new file mode 100644 index 000000000..defd8b620 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs @@ -0,0 +1,25 @@ +use super::__exported::NSMenu; +use crate::AppKit::generated::NSToolbarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSMenuToolbarItem; + unsafe impl ClassType for NSMenuToolbarItem { + type Super = NSToolbarItem; + } +); +extern_methods!( + unsafe impl NSMenuToolbarItem { + #[method_id(menu)] + pub unsafe fn menu(&self) -> Id; + #[method(setMenu:)] + pub unsafe fn setMenu(&self, menu: &NSMenu); + #[method(showsIndicator)] + pub unsafe fn showsIndicator(&self) -> bool; + #[method(setShowsIndicator:)] + pub unsafe fn setShowsIndicator(&self, showsIndicator: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSMovie.rs b/crates/icrate/src/generated/AppKit/NSMovie.rs new file mode 100644 index 000000000..f18d0b4dc --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSMovie.rs @@ -0,0 +1,26 @@ +use super::__exported::QTMovie; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSMovie; + unsafe impl ClassType for NSMovie { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSMovie { + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(init)] + pub unsafe fn init(&self) -> Option>; + #[method_id(initWithMovie:)] + pub unsafe fn initWithMovie(&self, movie: &QTMovie) -> Option>; + #[method_id(QTMovie)] + pub unsafe fn QTMovie(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs new file mode 100644 index 000000000..cf41374bf --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -0,0 +1,57 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSNibName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSNib; + unsafe impl ClassType for NSNib { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSNib { + #[method_id(initWithNibNamed:bundle:)] + pub unsafe fn initWithNibNamed_bundle( + &self, + nibName: &NSNibName, + bundle: Option<&NSBundle>, + ) -> Option>; + #[method_id(initWithNibData:bundle:)] + pub unsafe fn initWithNibData_bundle( + &self, + nibData: &NSData, + bundle: Option<&NSBundle>, + ) -> Id; + #[method(instantiateWithOwner:topLevelObjects:)] + pub unsafe fn instantiateWithOwner_topLevelObjects( + &self, + owner: Option<&Object>, + topLevelObjects: Option<&mut Option>>, + ) -> bool; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSNib { + #[method_id(initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + &self, + nibFileURL: Option<&NSURL>, + ) -> Option>; + #[method(instantiateNibWithExternalNameTable:)] + pub unsafe fn instantiateNibWithExternalNameTable( + &self, + externalNameTable: Option<&NSDictionary>, + ) -> bool; + #[method(instantiateNibWithOwner:topLevelObjects:)] + pub unsafe fn instantiateNibWithOwner_topLevelObjects( + &self, + owner: Option<&Object>, + topLevelObjects: Option<&mut Option>>, + ) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs b/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs new file mode 100644 index 000000000..d52c6a49a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs @@ -0,0 +1,4 @@ +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/AppKit/NSNibLoading.rs b/crates/icrate/src/generated/AppKit/NSNibLoading.rs new file mode 100644 index 000000000..6d07cdaba --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSNibLoading.rs @@ -0,0 +1,54 @@ +use super::__exported::NSDictionary; +use super::__exported::NSString; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSNib::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSBundle::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_methods!( + #[doc = "NSNibLoading"] + unsafe impl NSBundle { + #[method(loadNibNamed:owner:topLevelObjects:)] + pub unsafe fn loadNibNamed_owner_topLevelObjects( + &self, + nibName: &NSNibName, + owner: Option<&Object>, + topLevelObjects: Option<&mut Option>>, + ) -> bool; + } +); +extern_methods!( + #[doc = "NSNibAwaking"] + unsafe impl NSObject { + #[method(awakeFromNib)] + pub unsafe fn awakeFromNib(&self); + #[method(prepareForInterfaceBuilder)] + pub unsafe fn prepareForInterfaceBuilder(&self); + } +); +extern_methods!( + #[doc = "NSNibLoadingDeprecated"] + unsafe impl NSBundle { + #[method(loadNibFile:externalNameTable:withZone:)] + pub unsafe fn loadNibFile_externalNameTable_withZone( + fileName: Option<&NSString>, + context: Option<&NSDictionary>, + zone: *mut NSZone, + ) -> bool; + #[method(loadNibNamed:owner:)] + pub unsafe fn loadNibNamed_owner( + nibName: Option<&NSString>, + owner: Option<&Object>, + ) -> bool; + #[method(loadNibFile:externalNameTable:withZone:)] + pub unsafe fn loadNibFile_externalNameTable_withZone( + &self, + fileName: Option<&NSString>, + context: Option<&NSDictionary>, + zone: *mut NSZone, + ) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSObjectController.rs b/crates/icrate/src/generated/AppKit/NSObjectController.rs new file mode 100644 index 000000000..4554ce39a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSObjectController.rs @@ -0,0 +1,100 @@ +use super::__exported::NSError; +use super::__exported::NSFetchRequest; +use super::__exported::NSManagedObjectContext; +use super::__exported::NSPredicate; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSController::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSObjectController; + unsafe impl ClassType for NSObjectController { + type Super = NSController; + } +); +extern_methods!( + unsafe impl NSObjectController { + #[method_id(initWithContent:)] + pub unsafe fn initWithContent(&self, content: Option<&Object>) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(content)] + pub unsafe fn content(&self) -> Option>; + #[method(setContent:)] + pub unsafe fn setContent(&self, content: Option<&Object>); + #[method_id(selection)] + pub unsafe fn selection(&self) -> Id; + #[method_id(selectedObjects)] + pub unsafe fn selectedObjects(&self) -> Id; + #[method(automaticallyPreparesContent)] + pub unsafe fn automaticallyPreparesContent(&self) -> bool; + #[method(setAutomaticallyPreparesContent:)] + pub unsafe fn setAutomaticallyPreparesContent(&self, automaticallyPreparesContent: bool); + #[method(prepareContent)] + pub unsafe fn prepareContent(&self); + #[method(objectClass)] + pub unsafe fn objectClass(&self) -> Option<&Class>; + #[method(setObjectClass:)] + pub unsafe fn setObjectClass(&self, objectClass: Option<&Class>); + #[method_id(newObject)] + pub unsafe fn newObject(&self) -> Id; + #[method(addObject:)] + pub unsafe fn addObject(&self, object: &Object); + #[method(removeObject:)] + pub unsafe fn removeObject(&self, object: &Object); + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] + pub unsafe fn setEditable(&self, editable: bool); + #[method(add:)] + pub unsafe fn add(&self, sender: Option<&Object>); + #[method(canAdd)] + pub unsafe fn canAdd(&self) -> bool; + #[method(remove:)] + pub unsafe fn remove(&self, sender: Option<&Object>); + #[method(canRemove)] + pub unsafe fn canRemove(&self) -> bool; + #[method(validateUserInterfaceItem:)] + pub unsafe fn validateUserInterfaceItem(&self, item: &NSValidatedUserInterfaceItem) + -> bool; + } +); +extern_methods!( + #[doc = "NSManagedController"] + unsafe impl NSObjectController { + #[method_id(managedObjectContext)] + pub unsafe fn managedObjectContext(&self) -> Option>; + #[method(setManagedObjectContext:)] + pub unsafe fn setManagedObjectContext( + &self, + managedObjectContext: Option<&NSManagedObjectContext>, + ); + #[method_id(entityName)] + pub unsafe fn entityName(&self) -> Option>; + #[method(setEntityName:)] + pub unsafe fn setEntityName(&self, entityName: Option<&NSString>); + #[method_id(fetchPredicate)] + pub unsafe fn fetchPredicate(&self) -> Option>; + #[method(setFetchPredicate:)] + pub unsafe fn setFetchPredicate(&self, fetchPredicate: Option<&NSPredicate>); + #[method(fetchWithRequest:merge:error:)] + pub unsafe fn fetchWithRequest_merge_error( + &self, + fetchRequest: Option<&NSFetchRequest>, + merge: bool, + ) -> Result<(), Id>; + #[method(fetch:)] + pub unsafe fn fetch(&self, sender: Option<&Object>); + #[method(usesLazyFetching)] + pub unsafe fn usesLazyFetching(&self) -> bool; + #[method(setUsesLazyFetching:)] + pub unsafe fn setUsesLazyFetching(&self, usesLazyFetching: bool); + #[method_id(defaultFetchRequest)] + pub unsafe fn defaultFetchRequest(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs new file mode 100644 index 000000000..a68e3e460 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -0,0 +1,193 @@ +use super::__exported::NSData; +use super::__exported::NSScreen; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +use crate::OpenGL::generated::gltypes::*; +use crate::OpenGL::generated::CGLTypes::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSOpenGLPixelFormatAttribute = u32; +extern_class!( + #[derive(Debug)] + pub struct NSOpenGLPixelFormat; + unsafe impl ClassType for NSOpenGLPixelFormat { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSOpenGLPixelFormat { + #[method_id(initWithCGLPixelFormatObj:)] + pub unsafe fn initWithCGLPixelFormatObj( + &self, + format: CGLPixelFormatObj, + ) -> Option>; + #[method_id(initWithAttributes:)] + pub unsafe fn initWithAttributes( + &self, + attribs: NonNull, + ) -> Option>; + #[method_id(initWithData:)] + pub unsafe fn initWithData(&self, attribs: Option<&NSData>) -> Option>; + #[method_id(attributes)] + pub unsafe fn attributes(&self) -> Option>; + #[method(setAttributes:)] + pub unsafe fn setAttributes(&self, attribs: Option<&NSData>); + #[method(getValues:forAttribute:forVirtualScreen:)] + pub unsafe fn getValues_forAttribute_forVirtualScreen( + &self, + vals: NonNull, + attrib: NSOpenGLPixelFormatAttribute, + screen: GLint, + ); + #[method(numberOfVirtualScreens)] + pub unsafe fn numberOfVirtualScreens(&self) -> GLint; + #[method(CGLPixelFormatObj)] + pub unsafe fn CGLPixelFormatObj(&self) -> CGLPixelFormatObj; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSOpenGLPixelBuffer; + unsafe impl ClassType for NSOpenGLPixelBuffer { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSOpenGLPixelBuffer { + #[method_id(initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh:)] + pub unsafe fn initWithTextureTarget_textureInternalFormat_textureMaxMipMapLevel_pixelsWide_pixelsHigh( + &self, + target: GLenum, + format: GLenum, + maxLevel: GLint, + pixelsWide: GLsizei, + pixelsHigh: GLsizei, + ) -> Option>; + #[method_id(initWithCGLPBufferObj:)] + pub unsafe fn initWithCGLPBufferObj( + &self, + pbuffer: CGLPBufferObj, + ) -> Option>; + #[method(CGLPBufferObj)] + pub unsafe fn CGLPBufferObj(&self) -> CGLPBufferObj; + #[method(pixelsWide)] + pub unsafe fn pixelsWide(&self) -> GLsizei; + #[method(pixelsHigh)] + pub unsafe fn pixelsHigh(&self) -> GLsizei; + #[method(textureTarget)] + pub unsafe fn textureTarget(&self) -> GLenum; + #[method(textureInternalFormat)] + pub unsafe fn textureInternalFormat(&self) -> GLenum; + #[method(textureMaxMipMapLevel)] + pub unsafe fn textureMaxMipMapLevel(&self) -> GLint; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSOpenGLContext; + unsafe impl ClassType for NSOpenGLContext { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSOpenGLContext { + #[method_id(initWithFormat:shareContext:)] + pub unsafe fn initWithFormat_shareContext( + &self, + format: &NSOpenGLPixelFormat, + share: Option<&NSOpenGLContext>, + ) -> Option>; + #[method_id(initWithCGLContextObj:)] + pub unsafe fn initWithCGLContextObj( + &self, + context: CGLContextObj, + ) -> Option>; + #[method_id(pixelFormat)] + pub unsafe fn pixelFormat(&self) -> Id; + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method(setView:)] + pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(setFullScreen)] + pub unsafe fn setFullScreen(&self); + #[method(setOffScreen:width:height:rowbytes:)] + pub unsafe fn setOffScreen_width_height_rowbytes( + &self, + baseaddr: NonNull, + width: GLsizei, + height: GLsizei, + rowbytes: GLint, + ); + #[method(clearDrawable)] + pub unsafe fn clearDrawable(&self); + #[method(update)] + pub unsafe fn update(&self); + #[method(flushBuffer)] + pub unsafe fn flushBuffer(&self); + #[method(makeCurrentContext)] + pub unsafe fn makeCurrentContext(&self); + #[method(clearCurrentContext)] + pub unsafe fn clearCurrentContext(); + #[method_id(currentContext)] + pub unsafe fn currentContext() -> Option>; + #[method(copyAttributesFromContext:withMask:)] + pub unsafe fn copyAttributesFromContext_withMask( + &self, + context: &NSOpenGLContext, + mask: GLbitfield, + ); + #[method(setValues:forParameter:)] + pub unsafe fn setValues_forParameter( + &self, + vals: NonNull, + param: NSOpenGLContextParameter, + ); + #[method(getValues:forParameter:)] + pub unsafe fn getValues_forParameter( + &self, + vals: NonNull, + param: NSOpenGLContextParameter, + ); + #[method(currentVirtualScreen)] + pub unsafe fn currentVirtualScreen(&self) -> GLint; + #[method(setCurrentVirtualScreen:)] + pub unsafe fn setCurrentVirtualScreen(&self, currentVirtualScreen: GLint); + #[method(createTexture:fromView:internalFormat:)] + pub unsafe fn createTexture_fromView_internalFormat( + &self, + target: GLenum, + view: &NSView, + format: GLenum, + ); + #[method(CGLContextObj)] + pub unsafe fn CGLContextObj(&self) -> CGLContextObj; + } +); +extern_methods!( + #[doc = "NSOpenGLPixelBuffer"] + unsafe impl NSOpenGLContext { + #[method(setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:)] + pub unsafe fn setPixelBuffer_cubeMapFace_mipMapLevel_currentVirtualScreen( + &self, + pixelBuffer: &NSOpenGLPixelBuffer, + face: GLenum, + level: GLint, + screen: GLint, + ); + #[method_id(pixelBuffer)] + pub unsafe fn pixelBuffer(&self) -> Option>; + #[method(pixelBufferCubeMapFace)] + pub unsafe fn pixelBufferCubeMapFace(&self) -> GLenum; + #[method(pixelBufferMipMapLevel)] + pub unsafe fn pixelBufferMipMapLevel(&self) -> GLint; + #[method(setTextureImageToPixelBuffer:colorBuffer:)] + pub unsafe fn setTextureImageToPixelBuffer_colorBuffer( + &self, + pixelBuffer: &NSOpenGLPixelBuffer, + source: GLenum, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs new file mode 100644 index 000000000..3e96bc653 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs @@ -0,0 +1,57 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSOpenGL::*; +use crate::AppKit::generated::NSView::*; +use crate::QuartzCore::generated::CAOpenGLLayer::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSOpenGLLayer; + unsafe impl ClassType for NSOpenGLLayer { + type Super = CAOpenGLLayer; + } +); +extern_methods!( + unsafe impl NSOpenGLLayer { + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method(setView:)] + pub unsafe fn setView(&self, view: Option<&NSView>); + #[method_id(openGLPixelFormat)] + pub unsafe fn openGLPixelFormat(&self) -> Option>; + #[method(setOpenGLPixelFormat:)] + pub unsafe fn setOpenGLPixelFormat(&self, openGLPixelFormat: Option<&NSOpenGLPixelFormat>); + #[method_id(openGLContext)] + pub unsafe fn openGLContext(&self) -> Option>; + #[method(setOpenGLContext:)] + pub unsafe fn setOpenGLContext(&self, openGLContext: Option<&NSOpenGLContext>); + #[method_id(openGLPixelFormatForDisplayMask:)] + pub unsafe fn openGLPixelFormatForDisplayMask( + &self, + mask: u32, + ) -> Id; + #[method_id(openGLContextForPixelFormat:)] + pub unsafe fn openGLContextForPixelFormat( + &self, + pixelFormat: &NSOpenGLPixelFormat, + ) -> Id; + #[method(canDrawInOpenGLContext:pixelFormat:forLayerTime:displayTime:)] + pub unsafe fn canDrawInOpenGLContext_pixelFormat_forLayerTime_displayTime( + &self, + context: &NSOpenGLContext, + pixelFormat: &NSOpenGLPixelFormat, + t: CFTimeInterval, + ts: NonNull, + ) -> bool; + #[method(drawInOpenGLContext:pixelFormat:forLayerTime:displayTime:)] + pub unsafe fn drawInOpenGLContext_pixelFormat_forLayerTime_displayTime( + &self, + context: &NSOpenGLContext, + pixelFormat: &NSOpenGLPixelFormat, + t: CFTimeInterval, + ts: NonNull, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs new file mode 100644 index 000000000..345217e8e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs @@ -0,0 +1,82 @@ +use super::__exported::NSOpenGLContext; +use super::__exported::NSOpenGLPixelFormat; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSOpenGL::*; +use crate::AppKit::generated::NSView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSOpenGLView; + unsafe impl ClassType for NSOpenGLView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSOpenGLView { + #[method_id(defaultPixelFormat)] + pub unsafe fn defaultPixelFormat() -> Id; + #[method_id(initWithFrame:pixelFormat:)] + pub unsafe fn initWithFrame_pixelFormat( + &self, + frameRect: NSRect, + format: Option<&NSOpenGLPixelFormat>, + ) -> Option>; + #[method_id(openGLContext)] + pub unsafe fn openGLContext(&self) -> Option>; + #[method(setOpenGLContext:)] + pub unsafe fn setOpenGLContext(&self, openGLContext: Option<&NSOpenGLContext>); + #[method(clearGLContext)] + pub unsafe fn clearGLContext(&self); + #[method(update)] + pub unsafe fn update(&self); + #[method(reshape)] + pub unsafe fn reshape(&self); + #[method_id(pixelFormat)] + pub unsafe fn pixelFormat(&self) -> Option>; + #[method(setPixelFormat:)] + pub unsafe fn setPixelFormat(&self, pixelFormat: Option<&NSOpenGLPixelFormat>); + #[method(prepareOpenGL)] + pub unsafe fn prepareOpenGL(&self); + #[method(wantsBestResolutionOpenGLSurface)] + pub unsafe fn wantsBestResolutionOpenGLSurface(&self) -> bool; + #[method(setWantsBestResolutionOpenGLSurface:)] + pub unsafe fn setWantsBestResolutionOpenGLSurface( + &self, + wantsBestResolutionOpenGLSurface: bool, + ); + #[method(wantsExtendedDynamicRangeOpenGLSurface)] + pub unsafe fn wantsExtendedDynamicRangeOpenGLSurface(&self) -> bool; + #[method(setWantsExtendedDynamicRangeOpenGLSurface:)] + pub unsafe fn setWantsExtendedDynamicRangeOpenGLSurface( + &self, + wantsExtendedDynamicRangeOpenGLSurface: bool, + ); + } +); +extern_methods!( + #[doc = "NSOpenGLSurfaceResolution"] + unsafe impl NSView { + #[method(wantsBestResolutionOpenGLSurface)] + pub unsafe fn wantsBestResolutionOpenGLSurface(&self) -> bool; + #[method(setWantsBestResolutionOpenGLSurface:)] + pub unsafe fn setWantsBestResolutionOpenGLSurface( + &self, + wantsBestResolutionOpenGLSurface: bool, + ); + } +); +extern_methods!( + #[doc = "NSExtendedDynamicRange"] + unsafe impl NSView { + #[method(wantsExtendedDynamicRangeOpenGLSurface)] + pub unsafe fn wantsExtendedDynamicRangeOpenGLSurface(&self) -> bool; + #[method(setWantsExtendedDynamicRangeOpenGLSurface:)] + pub unsafe fn setWantsExtendedDynamicRangeOpenGLSurface( + &self, + wantsExtendedDynamicRangeOpenGLSurface: bool, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs new file mode 100644 index 000000000..2e50bfb49 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs @@ -0,0 +1,89 @@ +use super::__exported::NSString; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSSavePanel::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSOpenPanel; + unsafe impl ClassType for NSOpenPanel { + type Super = NSSavePanel; + } +); +extern_methods!( + unsafe impl NSOpenPanel { + #[method_id(openPanel)] + pub unsafe fn openPanel() -> Id; + #[method_id(URLs)] + pub unsafe fn URLs(&self) -> Id, Shared>; + #[method(resolvesAliases)] + pub unsafe fn resolvesAliases(&self) -> bool; + #[method(setResolvesAliases:)] + pub unsafe fn setResolvesAliases(&self, resolvesAliases: bool); + #[method(canChooseDirectories)] + pub unsafe fn canChooseDirectories(&self) -> bool; + #[method(setCanChooseDirectories:)] + pub unsafe fn setCanChooseDirectories(&self, canChooseDirectories: bool); + #[method(allowsMultipleSelection)] + pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[method(setAllowsMultipleSelection:)] + pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool); + #[method(canChooseFiles)] + pub unsafe fn canChooseFiles(&self) -> bool; + #[method(setCanChooseFiles:)] + pub unsafe fn setCanChooseFiles(&self, canChooseFiles: bool); + #[method(canResolveUbiquitousConflicts)] + pub unsafe fn canResolveUbiquitousConflicts(&self) -> bool; + #[method(setCanResolveUbiquitousConflicts:)] + pub unsafe fn setCanResolveUbiquitousConflicts(&self, canResolveUbiquitousConflicts: bool); + #[method(canDownloadUbiquitousContents)] + pub unsafe fn canDownloadUbiquitousContents(&self) -> bool; + #[method(setCanDownloadUbiquitousContents:)] + pub unsafe fn setCanDownloadUbiquitousContents(&self, canDownloadUbiquitousContents: bool); + #[method(isAccessoryViewDisclosed)] + pub unsafe fn isAccessoryViewDisclosed(&self) -> bool; + #[method(setAccessoryViewDisclosed:)] + pub unsafe fn setAccessoryViewDisclosed(&self, accessoryViewDisclosed: bool); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSOpenPanel { + #[method_id(filenames)] + pub unsafe fn filenames(&self) -> Id; + #[method(beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:)] + pub unsafe fn beginSheetForDirectory_file_types_modalForWindow_modalDelegate_didEndSelector_contextInfo( + &self, + path: Option<&NSString>, + name: Option<&NSString>, + fileTypes: Option<&NSArray>, + docWindow: Option<&NSWindow>, + delegate: Option<&Object>, + didEndSelector: Option, + contextInfo: *mut c_void, + ); + #[method(beginForDirectory:file:types:modelessDelegate:didEndSelector:contextInfo:)] + pub unsafe fn beginForDirectory_file_types_modelessDelegate_didEndSelector_contextInfo( + &self, + path: Option<&NSString>, + name: Option<&NSString>, + fileTypes: Option<&NSArray>, + delegate: Option<&Object>, + didEndSelector: Option, + contextInfo: *mut c_void, + ); + #[method(runModalForDirectory:file:types:)] + pub unsafe fn runModalForDirectory_file_types( + &self, + path: Option<&NSString>, + name: Option<&NSString>, + fileTypes: Option<&NSArray>, + ) -> NSInteger; + #[method(runModalForTypes:)] + pub unsafe fn runModalForTypes(&self, fileTypes: Option<&NSArray>) -> NSInteger; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs new file mode 100644 index 000000000..58724ae21 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -0,0 +1,149 @@ +use super::__exported::NSButtonCell; +use super::__exported::NSNotification; +use super::__exported::NSString; +use super::__exported::NSTableColumn; +use super::__exported::NSTableHeaderView; +use super::__exported::NSTableView; +use super::__exported::NSTintConfiguration; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTableView::*; +use crate::CoreFoundation::generated::CFDictionary::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSOutlineView; + unsafe impl ClassType for NSOutlineView { + type Super = NSTableView; + } +); +extern_methods!( + unsafe impl NSOutlineView { + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSOutlineViewDelegate>); + #[method_id(dataSource)] + pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] + pub unsafe fn setDataSource(&self, dataSource: Option<&NSOutlineViewDataSource>); + #[method_id(outlineTableColumn)] + pub unsafe fn outlineTableColumn(&self) -> Option>; + #[method(setOutlineTableColumn:)] + pub unsafe fn setOutlineTableColumn(&self, outlineTableColumn: Option<&NSTableColumn>); + #[method(isExpandable:)] + pub unsafe fn isExpandable(&self, item: Option<&Object>) -> bool; + #[method(numberOfChildrenOfItem:)] + pub unsafe fn numberOfChildrenOfItem(&self, item: Option<&Object>) -> NSInteger; + #[method_id(child:ofItem:)] + pub unsafe fn child_ofItem( + &self, + index: NSInteger, + item: Option<&Object>, + ) -> Option>; + #[method(expandItem:expandChildren:)] + pub unsafe fn expandItem_expandChildren(&self, item: Option<&Object>, expandChildren: bool); + #[method(expandItem:)] + pub unsafe fn expandItem(&self, item: Option<&Object>); + #[method(collapseItem:collapseChildren:)] + pub unsafe fn collapseItem_collapseChildren( + &self, + item: Option<&Object>, + collapseChildren: bool, + ); + #[method(collapseItem:)] + pub unsafe fn collapseItem(&self, item: Option<&Object>); + #[method(reloadItem:reloadChildren:)] + pub unsafe fn reloadItem_reloadChildren(&self, item: Option<&Object>, reloadChildren: bool); + #[method(reloadItem:)] + pub unsafe fn reloadItem(&self, item: Option<&Object>); + #[method_id(parentForItem:)] + pub unsafe fn parentForItem(&self, item: Option<&Object>) -> Option>; + #[method(childIndexForItem:)] + pub unsafe fn childIndexForItem(&self, item: &Object) -> NSInteger; + #[method_id(itemAtRow:)] + pub unsafe fn itemAtRow(&self, row: NSInteger) -> Option>; + #[method(rowForItem:)] + pub unsafe fn rowForItem(&self, item: Option<&Object>) -> NSInteger; + #[method(levelForItem:)] + pub unsafe fn levelForItem(&self, item: Option<&Object>) -> NSInteger; + #[method(levelForRow:)] + pub unsafe fn levelForRow(&self, row: NSInteger) -> NSInteger; + #[method(isItemExpanded:)] + pub unsafe fn isItemExpanded(&self, item: Option<&Object>) -> bool; + #[method(indentationPerLevel)] + pub unsafe fn indentationPerLevel(&self) -> CGFloat; + #[method(setIndentationPerLevel:)] + pub unsafe fn setIndentationPerLevel(&self, indentationPerLevel: CGFloat); + #[method(indentationMarkerFollowsCell)] + pub unsafe fn indentationMarkerFollowsCell(&self) -> bool; + #[method(setIndentationMarkerFollowsCell:)] + pub unsafe fn setIndentationMarkerFollowsCell(&self, indentationMarkerFollowsCell: bool); + #[method(autoresizesOutlineColumn)] + pub unsafe fn autoresizesOutlineColumn(&self) -> bool; + #[method(setAutoresizesOutlineColumn:)] + pub unsafe fn setAutoresizesOutlineColumn(&self, autoresizesOutlineColumn: bool); + #[method(frameOfOutlineCellAtRow:)] + pub unsafe fn frameOfOutlineCellAtRow(&self, row: NSInteger) -> NSRect; + #[method(setDropItem:dropChildIndex:)] + pub unsafe fn setDropItem_dropChildIndex(&self, item: Option<&Object>, index: NSInteger); + #[method(shouldCollapseAutoExpandedItemsForDeposited:)] + pub unsafe fn shouldCollapseAutoExpandedItemsForDeposited(&self, deposited: bool) -> bool; + #[method(autosaveExpandedItems)] + pub unsafe fn autosaveExpandedItems(&self) -> bool; + #[method(setAutosaveExpandedItems:)] + pub unsafe fn setAutosaveExpandedItems(&self, autosaveExpandedItems: bool); + #[method(insertItemsAtIndexes:inParent:withAnimation:)] + pub unsafe fn insertItemsAtIndexes_inParent_withAnimation( + &self, + indexes: &NSIndexSet, + parent: Option<&Object>, + animationOptions: NSTableViewAnimationOptions, + ); + #[method(removeItemsAtIndexes:inParent:withAnimation:)] + pub unsafe fn removeItemsAtIndexes_inParent_withAnimation( + &self, + indexes: &NSIndexSet, + parent: Option<&Object>, + animationOptions: NSTableViewAnimationOptions, + ); + #[method(moveItemAtIndex:inParent:toIndex:inParent:)] + pub unsafe fn moveItemAtIndex_inParent_toIndex_inParent( + &self, + fromIndex: NSInteger, + oldParent: Option<&Object>, + toIndex: NSInteger, + newParent: Option<&Object>, + ); + #[method(insertRowsAtIndexes:withAnimation:)] + pub unsafe fn insertRowsAtIndexes_withAnimation( + &self, + indexes: &NSIndexSet, + animationOptions: NSTableViewAnimationOptions, + ); + #[method(removeRowsAtIndexes:withAnimation:)] + pub unsafe fn removeRowsAtIndexes_withAnimation( + &self, + indexes: &NSIndexSet, + animationOptions: NSTableViewAnimationOptions, + ); + #[method(moveRowAtIndex:toIndex:)] + pub unsafe fn moveRowAtIndex_toIndex(&self, oldIndex: NSInteger, newIndex: NSInteger); + #[method(userInterfaceLayoutDirection)] + pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setUserInterfaceLayoutDirection:)] + pub unsafe fn setUserInterfaceLayoutDirection( + &self, + userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, + ); + #[method(stronglyReferencesItems)] + pub unsafe fn stronglyReferencesItems(&self) -> bool; + #[method(setStronglyReferencesItems:)] + pub unsafe fn setStronglyReferencesItems(&self, stronglyReferencesItems: bool); + } +); +pub type NSOutlineViewDataSource = NSObject; +pub type NSOutlineViewDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs new file mode 100644 index 000000000..83510dc12 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs @@ -0,0 +1,31 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSImageRep::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPDFImageRep; + unsafe impl ClassType for NSPDFImageRep { + type Super = NSImageRep; + } +); +extern_methods!( + unsafe impl NSPDFImageRep { + #[method_id(imageRepWithData:)] + pub unsafe fn imageRepWithData(pdfData: &NSData) -> Option>; + #[method_id(initWithData:)] + pub unsafe fn initWithData(&self, pdfData: &NSData) -> Option>; + #[method_id(PDFRepresentation)] + pub unsafe fn PDFRepresentation(&self) -> Id; + #[method(bounds)] + pub unsafe fn bounds(&self) -> NSRect; + #[method(currentPage)] + pub unsafe fn currentPage(&self) -> NSInteger; + #[method(setCurrentPage:)] + pub unsafe fn setCurrentPage(&self, currentPage: NSInteger); + #[method(pageCount)] + pub unsafe fn pageCount(&self) -> NSInteger; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs new file mode 100644 index 000000000..a747b4579 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs @@ -0,0 +1,46 @@ +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSPrintInfo::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPDFInfo; + unsafe impl ClassType for NSPDFInfo { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPDFInfo { + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + #[method(setURL:)] + pub unsafe fn setURL(&self, URL: Option<&NSURL>); + #[method(isFileExtensionHidden)] + pub unsafe fn isFileExtensionHidden(&self) -> bool; + #[method(setFileExtensionHidden:)] + pub unsafe fn setFileExtensionHidden(&self, fileExtensionHidden: bool); + #[method_id(tagNames)] + pub unsafe fn tagNames(&self) -> Id, Shared>; + #[method(setTagNames:)] + pub unsafe fn setTagNames(&self, tagNames: &NSArray); + #[method(orientation)] + pub unsafe fn orientation(&self) -> NSPaperOrientation; + #[method(setOrientation:)] + pub unsafe fn setOrientation(&self, orientation: NSPaperOrientation); + #[method(paperSize)] + pub unsafe fn paperSize(&self) -> NSSize; + #[method(setPaperSize:)] + pub unsafe fn setPaperSize(&self, paperSize: NSSize); + #[method_id(attributes)] + pub unsafe fn attributes( + &self, + ) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs new file mode 100644 index 000000000..020756fa7 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs @@ -0,0 +1,43 @@ +use super::__exported::NSMutableArray; +use super::__exported::NSPDFInfo; +use super::__exported::NSString; +use super::__exported::NSViewController; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPDFPanel; + unsafe impl ClassType for NSPDFPanel { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPDFPanel { + #[method_id(panel)] + pub unsafe fn panel() -> Id; + #[method_id(accessoryController)] + pub unsafe fn accessoryController(&self) -> Option>; + #[method(setAccessoryController:)] + pub unsafe fn setAccessoryController(&self, accessoryController: Option<&NSViewController>); + #[method(options)] + pub unsafe fn options(&self) -> NSPDFPanelOptions; + #[method(setOptions:)] + pub unsafe fn setOptions(&self, options: NSPDFPanelOptions); + #[method_id(defaultFileName)] + pub unsafe fn defaultFileName(&self) -> Id; + #[method(setDefaultFileName:)] + pub unsafe fn setDefaultFileName(&self, defaultFileName: &NSString); + #[method(beginSheetWithPDFInfo:modalForWindow:completionHandler:)] + pub unsafe fn beginSheetWithPDFInfo_modalForWindow_completionHandler( + &self, + pdfInfo: &NSPDFInfo, + docWindow: Option<&NSWindow>, + completionHandler: TodoBlock, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs new file mode 100644 index 000000000..6633e1f93 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs @@ -0,0 +1,25 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSImageRep::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPICTImageRep; + unsafe impl ClassType for NSPICTImageRep { + type Super = NSImageRep; + } +); +extern_methods!( + unsafe impl NSPICTImageRep { + #[method_id(imageRepWithData:)] + pub unsafe fn imageRepWithData(pictData: &NSData) -> Option>; + #[method_id(initWithData:)] + pub unsafe fn initWithData(&self, pictData: &NSData) -> Option>; + #[method_id(PICTRepresentation)] + pub unsafe fn PICTRepresentation(&self) -> Id; + #[method(boundingBox)] + pub unsafe fn boundingBox(&self) -> NSRect; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPageController.rs b/crates/icrate/src/generated/AppKit/NSPageController.rs new file mode 100644 index 000000000..c290feb34 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPageController.rs @@ -0,0 +1,52 @@ +use super::__exported::NSMutableDictionary; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAnimation::*; +use crate::AppKit::generated::NSViewController::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPageControllerObjectIdentifier = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSPageController; + unsafe impl ClassType for NSPageController { + type Super = NSViewController; + } +); +extern_methods!( + unsafe impl NSPageController { + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSPageControllerDelegate>); + #[method_id(selectedViewController)] + pub unsafe fn selectedViewController(&self) -> Option>; + #[method(transitionStyle)] + pub unsafe fn transitionStyle(&self) -> NSPageControllerTransitionStyle; + #[method(setTransitionStyle:)] + pub unsafe fn setTransitionStyle(&self, transitionStyle: NSPageControllerTransitionStyle); + #[method_id(arrangedObjects)] + pub unsafe fn arrangedObjects(&self) -> Id; + #[method(setArrangedObjects:)] + pub unsafe fn setArrangedObjects(&self, arrangedObjects: &NSArray); + #[method(selectedIndex)] + pub unsafe fn selectedIndex(&self) -> NSInteger; + #[method(setSelectedIndex:)] + pub unsafe fn setSelectedIndex(&self, selectedIndex: NSInteger); + #[method(navigateForwardToObject:)] + pub unsafe fn navigateForwardToObject(&self, object: &Object); + #[method(completeTransition)] + pub unsafe fn completeTransition(&self); + #[method(navigateBack:)] + pub unsafe fn navigateBack(&self, sender: Option<&Object>); + #[method(navigateForward:)] + pub unsafe fn navigateForward(&self, sender: Option<&Object>); + #[method(takeSelectedIndexFrom:)] + pub unsafe fn takeSelectedIndexFrom(&self, sender: Option<&Object>); + } +); +pub type NSPageControllerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPageLayout.rs b/crates/icrate/src/generated/AppKit/NSPageLayout.rs new file mode 100644 index 000000000..a0bdf52e5 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPageLayout.rs @@ -0,0 +1,66 @@ +use super::__exported::NSPrintInfo; +use super::__exported::NSView; +use super::__exported::NSViewController; +use super::__exported::NSWindow; +use super::__exported::NSWindowController; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPageLayout; + unsafe impl ClassType for NSPageLayout { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPageLayout { + #[method_id(pageLayout)] + pub unsafe fn pageLayout() -> Id; + #[method(addAccessoryController:)] + pub unsafe fn addAccessoryController(&self, accessoryController: &NSViewController); + #[method(removeAccessoryController:)] + pub unsafe fn removeAccessoryController(&self, accessoryController: &NSViewController); + #[method_id(accessoryControllers)] + pub unsafe fn accessoryControllers(&self) -> Id, Shared>; + #[method(beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:)] + pub unsafe fn beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo( + &self, + printInfo: &NSPrintInfo, + docWindow: &NSWindow, + delegate: Option<&Object>, + didEndSelector: Option, + contextInfo: *mut c_void, + ); + #[method(runModalWithPrintInfo:)] + pub unsafe fn runModalWithPrintInfo(&self, printInfo: &NSPrintInfo) -> NSInteger; + #[method(runModal)] + pub unsafe fn runModal(&self) -> NSInteger; + #[method_id(printInfo)] + pub unsafe fn printInfo(&self) -> Option>; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSPageLayout { + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method_id(accessoryView)] + pub unsafe fn accessoryView(&self) -> Option>; + #[method(readPrintInfo)] + pub unsafe fn readPrintInfo(&self); + #[method(writePrintInfo)] + pub unsafe fn writePrintInfo(&self); + } +); +extern_methods!( + #[doc = "NSPageLayoutPanel"] + unsafe impl NSApplication { + #[method(runPageLayout:)] + pub unsafe fn runPageLayout(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs new file mode 100644 index 000000000..c882747d2 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs @@ -0,0 +1,32 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSGestureRecognizer::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPanGestureRecognizer; + unsafe impl ClassType for NSPanGestureRecognizer { + type Super = NSGestureRecognizer; + } +); +extern_methods!( + unsafe impl NSPanGestureRecognizer { + #[method(buttonMask)] + pub unsafe fn buttonMask(&self) -> NSUInteger; + #[method(setButtonMask:)] + pub unsafe fn setButtonMask(&self, buttonMask: NSUInteger); + #[method(translationInView:)] + pub unsafe fn translationInView(&self, view: Option<&NSView>) -> NSPoint; + #[method(setTranslation:inView:)] + pub unsafe fn setTranslation_inView(&self, translation: NSPoint, view: Option<&NSView>); + #[method(velocityInView:)] + pub unsafe fn velocityInView(&self, view: Option<&NSView>) -> NSPoint; + #[method(numberOfTouchesRequired)] + pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger; + #[method(setNumberOfTouchesRequired:)] + pub unsafe fn setNumberOfTouchesRequired(&self, numberOfTouchesRequired: NSInteger); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs new file mode 100644 index 000000000..9e9c68221 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -0,0 +1,29 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSWindow::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPanel; + unsafe impl ClassType for NSPanel { + type Super = NSWindow; + } +); +extern_methods!( + unsafe impl NSPanel { + #[method(isFloatingPanel)] + pub unsafe fn isFloatingPanel(&self) -> bool; + #[method(setFloatingPanel:)] + pub unsafe fn setFloatingPanel(&self, floatingPanel: bool); + #[method(becomesKeyOnlyIfNeeded)] + pub unsafe fn becomesKeyOnlyIfNeeded(&self) -> bool; + #[method(setBecomesKeyOnlyIfNeeded:)] + pub unsafe fn setBecomesKeyOnlyIfNeeded(&self, becomesKeyOnlyIfNeeded: bool); + #[method(worksWhenModal)] + pub unsafe fn worksWhenModal(&self) -> bool; + #[method(setWorksWhenModal:)] + pub unsafe fn setWorksWhenModal(&self, worksWhenModal: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs new file mode 100644 index 000000000..68ad3f2ff --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -0,0 +1,222 @@ +use super::__exported::NSTextBlock; +use super::__exported::NSTextList; +use crate::AppKit::generated::NSText::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextTabOptionKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSTextTab; + unsafe impl ClassType for NSTextTab { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextTab { + #[method_id(columnTerminatorsForLocale:)] + pub unsafe fn columnTerminatorsForLocale( + aLocale: Option<&NSLocale>, + ) -> Id; + #[method_id(initWithTextAlignment:location:options:)] + pub unsafe fn initWithTextAlignment_location_options( + &self, + alignment: NSTextAlignment, + loc: CGFloat, + options: &NSDictionary, + ) -> Id; + #[method(alignment)] + pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(location)] + pub unsafe fn location(&self) -> CGFloat; + #[method_id(options)] + pub unsafe fn options(&self) -> Id, Shared>; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSParagraphStyle; + unsafe impl ClassType for NSParagraphStyle { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSParagraphStyle { + #[method_id(defaultParagraphStyle)] + pub unsafe fn defaultParagraphStyle() -> Id; + #[method(defaultWritingDirectionForLanguage:)] + pub unsafe fn defaultWritingDirectionForLanguage( + languageName: Option<&NSString>, + ) -> NSWritingDirection; + #[method(lineSpacing)] + pub unsafe fn lineSpacing(&self) -> CGFloat; + #[method(paragraphSpacing)] + pub unsafe fn paragraphSpacing(&self) -> CGFloat; + #[method(alignment)] + pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(headIndent)] + pub unsafe fn headIndent(&self) -> CGFloat; + #[method(tailIndent)] + pub unsafe fn tailIndent(&self) -> CGFloat; + #[method(firstLineHeadIndent)] + pub unsafe fn firstLineHeadIndent(&self) -> CGFloat; + #[method(minimumLineHeight)] + pub unsafe fn minimumLineHeight(&self) -> CGFloat; + #[method(maximumLineHeight)] + pub unsafe fn maximumLineHeight(&self) -> CGFloat; + #[method(lineBreakMode)] + pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[method(baseWritingDirection)] + pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[method(lineHeightMultiple)] + pub unsafe fn lineHeightMultiple(&self) -> CGFloat; + #[method(paragraphSpacingBefore)] + pub unsafe fn paragraphSpacingBefore(&self) -> CGFloat; + #[method(hyphenationFactor)] + pub unsafe fn hyphenationFactor(&self) -> c_float; + #[method(usesDefaultHyphenation)] + pub unsafe fn usesDefaultHyphenation(&self) -> bool; + #[method_id(tabStops)] + pub unsafe fn tabStops(&self) -> Id, Shared>; + #[method(defaultTabInterval)] + pub unsafe fn defaultTabInterval(&self) -> CGFloat; + #[method(allowsDefaultTighteningForTruncation)] + pub unsafe fn allowsDefaultTighteningForTruncation(&self) -> bool; + #[method(tighteningFactorForTruncation)] + pub unsafe fn tighteningFactorForTruncation(&self) -> c_float; + #[method_id(textBlocks)] + pub unsafe fn textBlocks(&self) -> Id, Shared>; + #[method_id(textLists)] + pub unsafe fn textLists(&self) -> Id, Shared>; + #[method(headerLevel)] + pub unsafe fn headerLevel(&self) -> NSInteger; + #[method(lineBreakStrategy)] + pub unsafe fn lineBreakStrategy(&self) -> NSLineBreakStrategy; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSMutableParagraphStyle; + unsafe impl ClassType for NSMutableParagraphStyle { + type Super = NSParagraphStyle; + } +); +extern_methods!( + unsafe impl NSMutableParagraphStyle { + #[method(lineSpacing)] + pub unsafe fn lineSpacing(&self) -> CGFloat; + #[method(setLineSpacing:)] + pub unsafe fn setLineSpacing(&self, lineSpacing: CGFloat); + #[method(paragraphSpacing)] + pub unsafe fn paragraphSpacing(&self) -> CGFloat; + #[method(setParagraphSpacing:)] + pub unsafe fn setParagraphSpacing(&self, paragraphSpacing: CGFloat); + #[method(alignment)] + pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(setAlignment:)] + pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[method(firstLineHeadIndent)] + pub unsafe fn firstLineHeadIndent(&self) -> CGFloat; + #[method(setFirstLineHeadIndent:)] + pub unsafe fn setFirstLineHeadIndent(&self, firstLineHeadIndent: CGFloat); + #[method(headIndent)] + pub unsafe fn headIndent(&self) -> CGFloat; + #[method(setHeadIndent:)] + pub unsafe fn setHeadIndent(&self, headIndent: CGFloat); + #[method(tailIndent)] + pub unsafe fn tailIndent(&self) -> CGFloat; + #[method(setTailIndent:)] + pub unsafe fn setTailIndent(&self, tailIndent: CGFloat); + #[method(lineBreakMode)] + pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[method(setLineBreakMode:)] + pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode); + #[method(minimumLineHeight)] + pub unsafe fn minimumLineHeight(&self) -> CGFloat; + #[method(setMinimumLineHeight:)] + pub unsafe fn setMinimumLineHeight(&self, minimumLineHeight: CGFloat); + #[method(maximumLineHeight)] + pub unsafe fn maximumLineHeight(&self) -> CGFloat; + #[method(setMaximumLineHeight:)] + pub unsafe fn setMaximumLineHeight(&self, maximumLineHeight: CGFloat); + #[method(baseWritingDirection)] + pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[method(setBaseWritingDirection:)] + pub unsafe fn setBaseWritingDirection(&self, baseWritingDirection: NSWritingDirection); + #[method(lineHeightMultiple)] + pub unsafe fn lineHeightMultiple(&self) -> CGFloat; + #[method(setLineHeightMultiple:)] + pub unsafe fn setLineHeightMultiple(&self, lineHeightMultiple: CGFloat); + #[method(paragraphSpacingBefore)] + pub unsafe fn paragraphSpacingBefore(&self) -> CGFloat; + #[method(setParagraphSpacingBefore:)] + pub unsafe fn setParagraphSpacingBefore(&self, paragraphSpacingBefore: CGFloat); + #[method(hyphenationFactor)] + pub unsafe fn hyphenationFactor(&self) -> c_float; + #[method(setHyphenationFactor:)] + pub unsafe fn setHyphenationFactor(&self, hyphenationFactor: c_float); + #[method(usesDefaultHyphenation)] + pub unsafe fn usesDefaultHyphenation(&self) -> bool; + #[method(setUsesDefaultHyphenation:)] + pub unsafe fn setUsesDefaultHyphenation(&self, usesDefaultHyphenation: bool); + #[method_id(tabStops)] + pub unsafe fn tabStops(&self) -> Id, Shared>; + #[method(setTabStops:)] + pub unsafe fn setTabStops(&self, tabStops: Option<&NSArray>); + #[method(defaultTabInterval)] + pub unsafe fn defaultTabInterval(&self) -> CGFloat; + #[method(setDefaultTabInterval:)] + pub unsafe fn setDefaultTabInterval(&self, defaultTabInterval: CGFloat); + #[method(allowsDefaultTighteningForTruncation)] + pub unsafe fn allowsDefaultTighteningForTruncation(&self) -> bool; + #[method(setAllowsDefaultTighteningForTruncation:)] + pub unsafe fn setAllowsDefaultTighteningForTruncation( + &self, + allowsDefaultTighteningForTruncation: bool, + ); + #[method(addTabStop:)] + pub unsafe fn addTabStop(&self, anObject: &NSTextTab); + #[method(removeTabStop:)] + pub unsafe fn removeTabStop(&self, anObject: &NSTextTab); + #[method(setParagraphStyle:)] + pub unsafe fn setParagraphStyle(&self, obj: &NSParagraphStyle); + #[method(tighteningFactorForTruncation)] + pub unsafe fn tighteningFactorForTruncation(&self) -> c_float; + #[method(setTighteningFactorForTruncation:)] + pub unsafe fn setTighteningFactorForTruncation( + &self, + tighteningFactorForTruncation: c_float, + ); + #[method_id(textBlocks)] + pub unsafe fn textBlocks(&self) -> Id, Shared>; + #[method(setTextBlocks:)] + pub unsafe fn setTextBlocks(&self, textBlocks: &NSArray); + #[method_id(textLists)] + pub unsafe fn textLists(&self) -> Id, Shared>; + #[method(setTextLists:)] + pub unsafe fn setTextLists(&self, textLists: &NSArray); + #[method(headerLevel)] + pub unsafe fn headerLevel(&self) -> NSInteger; + #[method(setHeaderLevel:)] + pub unsafe fn setHeaderLevel(&self, headerLevel: NSInteger); + #[method(lineBreakStrategy)] + pub unsafe fn lineBreakStrategy(&self) -> NSLineBreakStrategy; + #[method(setLineBreakStrategy:)] + pub unsafe fn setLineBreakStrategy(&self, lineBreakStrategy: NSLineBreakStrategy); + } +); +extern_methods!( + #[doc = "NSTextTabDeprecated"] + unsafe impl NSTextTab { + #[method_id(initWithType:location:)] + pub unsafe fn initWithType_location( + &self, + type_: NSTextTabType, + loc: CGFloat, + ) -> Id; + #[method(tabStopType)] + pub unsafe fn tabStopType(&self) -> NSTextTabType; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs new file mode 100644 index 000000000..b9b05d3f8 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -0,0 +1,186 @@ +use super::__exported::NSData; +use super::__exported::NSFileWrapper; +use super::__exported::NSMutableDictionary; +use crate::AppKit::generated::AppKitDefines::*; +use crate::CoreFoundation::generated::CFBase::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSString::*; +use crate::Foundation::generated::NSURL::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPasteboardType = NSString; +pub type NSPasteboardName = NSString; +pub type NSPasteboardReadingOptionKey = NSString; +use super::__exported::NSPasteboardItem; +extern_class!( + #[derive(Debug)] + pub struct NSPasteboard; + unsafe impl ClassType for NSPasteboard { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPasteboard { + #[method_id(generalPasteboard)] + pub unsafe fn generalPasteboard() -> Id; + #[method_id(pasteboardWithName:)] + pub unsafe fn pasteboardWithName(name: &NSPasteboardName) -> Id; + #[method_id(pasteboardWithUniqueName)] + pub unsafe fn pasteboardWithUniqueName() -> Id; + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method(changeCount)] + pub unsafe fn changeCount(&self) -> NSInteger; + #[method(prepareForNewContentsWithOptions:)] + pub unsafe fn prepareForNewContentsWithOptions( + &self, + options: NSPasteboardContentsOptions, + ) -> NSInteger; + #[method(clearContents)] + pub unsafe fn clearContents(&self) -> NSInteger; + #[method(writeObjects:)] + pub unsafe fn writeObjects(&self, objects: &NSArray) -> bool; + #[method_id(readObjectsForClasses:options:)] + pub unsafe fn readObjectsForClasses_options( + &self, + classArray: &NSArray, + options: Option<&NSDictionary>, + ) -> Option>; + #[method_id(pasteboardItems)] + pub unsafe fn pasteboardItems(&self) -> Option, Shared>>; + #[method(indexOfPasteboardItem:)] + pub unsafe fn indexOfPasteboardItem(&self, pasteboardItem: &NSPasteboardItem) + -> NSUInteger; + #[method(canReadItemWithDataConformingToTypes:)] + pub unsafe fn canReadItemWithDataConformingToTypes( + &self, + types: &NSArray, + ) -> bool; + #[method(canReadObjectForClasses:options:)] + pub unsafe fn canReadObjectForClasses_options( + &self, + classArray: &NSArray, + options: Option<&NSDictionary>, + ) -> bool; + #[method(declareTypes:owner:)] + pub unsafe fn declareTypes_owner( + &self, + newTypes: &NSArray, + newOwner: Option<&Object>, + ) -> NSInteger; + #[method(addTypes:owner:)] + pub unsafe fn addTypes_owner( + &self, + newTypes: &NSArray, + newOwner: Option<&Object>, + ) -> NSInteger; + #[method_id(types)] + pub unsafe fn types(&self) -> Option, Shared>>; + #[method_id(availableTypeFromArray:)] + pub unsafe fn availableTypeFromArray( + &self, + types: &NSArray, + ) -> Option>; + #[method(setData:forType:)] + pub unsafe fn setData_forType( + &self, + data: Option<&NSData>, + dataType: &NSPasteboardType, + ) -> bool; + #[method(setPropertyList:forType:)] + pub unsafe fn setPropertyList_forType( + &self, + plist: &Object, + dataType: &NSPasteboardType, + ) -> bool; + #[method(setString:forType:)] + pub unsafe fn setString_forType( + &self, + string: &NSString, + dataType: &NSPasteboardType, + ) -> bool; + #[method_id(dataForType:)] + pub unsafe fn dataForType(&self, dataType: &NSPasteboardType) + -> Option>; + #[method_id(propertyListForType:)] + pub unsafe fn propertyListForType( + &self, + dataType: &NSPasteboardType, + ) -> Option>; + #[method_id(stringForType:)] + pub unsafe fn stringForType( + &self, + dataType: &NSPasteboardType, + ) -> Option>; + } +); +extern_methods!( + #[doc = "FilterServices"] + unsafe impl NSPasteboard { + #[method_id(typesFilterableTo:)] + pub unsafe fn typesFilterableTo( + type_: &NSPasteboardType, + ) -> Id, Shared>; + #[method_id(pasteboardByFilteringFile:)] + pub unsafe fn pasteboardByFilteringFile(filename: &NSString) -> Id; + #[method_id(pasteboardByFilteringData:ofType:)] + pub unsafe fn pasteboardByFilteringData_ofType( + data: &NSData, + type_: &NSPasteboardType, + ) -> Id; + #[method_id(pasteboardByFilteringTypesInPasteboard:)] + pub unsafe fn pasteboardByFilteringTypesInPasteboard( + pboard: &NSPasteboard, + ) -> Id; + } +); +pub type NSPasteboardTypeOwner = NSObject; +extern_methods!( + #[doc = "NSPasteboardOwner"] + unsafe impl NSObject { + #[method(pasteboard:provideDataForType:)] + pub unsafe fn pasteboard_provideDataForType( + &self, + sender: &NSPasteboard, + type_: &NSPasteboardType, + ); + #[method(pasteboardChangedOwner:)] + pub unsafe fn pasteboardChangedOwner(&self, sender: &NSPasteboard); + } +); +pub type NSPasteboardWriting = NSObject; +pub type NSPasteboardReading = NSObject; +extern_methods!( + #[doc = "NSPasteboardSupport"] + unsafe impl NSURL { + #[method_id(URLFromPasteboard:)] + pub unsafe fn URLFromPasteboard(pasteBoard: &NSPasteboard) -> Option>; + #[method(writeToPasteboard:)] + pub unsafe fn writeToPasteboard(&self, pasteBoard: &NSPasteboard); + } +); +extern_methods!( + #[doc = "NSPasteboardSupport"] + unsafe impl NSString {} +); +extern_methods!( + #[doc = "NSFileContents"] + unsafe impl NSPasteboard { + #[method(writeFileContents:)] + pub unsafe fn writeFileContents(&self, filename: &NSString) -> bool; + #[method_id(readFileContentsType:toFile:)] + pub unsafe fn readFileContentsType_toFile( + &self, + type_: Option<&NSPasteboardType>, + filename: &NSString, + ) -> Option>; + #[method(writeFileWrapper:)] + pub unsafe fn writeFileWrapper(&self, wrapper: &NSFileWrapper) -> bool; + #[method_id(readFileWrapper)] + pub unsafe fn readFileWrapper(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs new file mode 100644 index 000000000..fcb7b105f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs @@ -0,0 +1,57 @@ +use super::__exported::NSPasteboard; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::CoreFoundation::generated::CFBase::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPasteboardItem; + unsafe impl ClassType for NSPasteboardItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPasteboardItem { + #[method_id(types)] + pub unsafe fn types(&self) -> Id, Shared>; + #[method_id(availableTypeFromArray:)] + pub unsafe fn availableTypeFromArray( + &self, + types: &NSArray, + ) -> Option>; + #[method(setDataProvider:forTypes:)] + pub unsafe fn setDataProvider_forTypes( + &self, + dataProvider: &NSPasteboardItemDataProvider, + types: &NSArray, + ) -> bool; + #[method(setData:forType:)] + pub unsafe fn setData_forType(&self, data: &NSData, type_: &NSPasteboardType) -> bool; + #[method(setString:forType:)] + pub unsafe fn setString_forType(&self, string: &NSString, type_: &NSPasteboardType) + -> bool; + #[method(setPropertyList:forType:)] + pub unsafe fn setPropertyList_forType( + &self, + propertyList: &Object, + type_: &NSPasteboardType, + ) -> bool; + #[method_id(dataForType:)] + pub unsafe fn dataForType(&self, type_: &NSPasteboardType) -> Option>; + #[method_id(stringForType:)] + pub unsafe fn stringForType( + &self, + type_: &NSPasteboardType, + ) -> Option>; + #[method_id(propertyListForType:)] + pub unsafe fn propertyListForType( + &self, + type_: &NSPasteboardType, + ) -> Option>; + } +); +pub type NSPasteboardItemDataProvider = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs new file mode 100644 index 000000000..63217f4ba --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -0,0 +1,106 @@ +use super::__exported::NSAnimation; +use super::__exported::NSImage; +use super::__exported::NSNotification; +use super::__exported::NSOpenPanel; +use super::__exported::NSPathComponentCell; +use super::__exported::NSPopUpButtonCell; +use super::__exported::NSString; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSActionCell::*; +use crate::AppKit::generated::NSMenu::*; +use crate::AppKit::generated::NSSavePanel::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPathCell; + unsafe impl ClassType for NSPathCell { + type Super = NSActionCell; + } +); +extern_methods!( + unsafe impl NSPathCell { + #[method(pathStyle)] + pub unsafe fn pathStyle(&self) -> NSPathStyle; + #[method(setPathStyle:)] + pub unsafe fn setPathStyle(&self, pathStyle: NSPathStyle); + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + #[method(setURL:)] + pub unsafe fn setURL(&self, URL: Option<&NSURL>); + #[method(setObjectValue:)] + pub unsafe fn setObjectValue(&self, obj: Option<&NSCopying>); + #[method_id(allowedTypes)] + pub unsafe fn allowedTypes(&self) -> Option, Shared>>; + #[method(setAllowedTypes:)] + pub unsafe fn setAllowedTypes(&self, allowedTypes: Option<&NSArray>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSPathCellDelegate>); + #[method(pathComponentCellClass)] + pub unsafe fn pathComponentCellClass() -> &Class; + #[method_id(pathComponentCells)] + pub unsafe fn pathComponentCells(&self) -> Id, Shared>; + #[method(setPathComponentCells:)] + pub unsafe fn setPathComponentCells( + &self, + pathComponentCells: &NSArray, + ); + #[method(rectOfPathComponentCell:withFrame:inView:)] + pub unsafe fn rectOfPathComponentCell_withFrame_inView( + &self, + cell: &NSPathComponentCell, + frame: NSRect, + view: &NSView, + ) -> NSRect; + #[method_id(pathComponentCellAtPoint:withFrame:inView:)] + pub unsafe fn pathComponentCellAtPoint_withFrame_inView( + &self, + point: NSPoint, + frame: NSRect, + view: &NSView, + ) -> Option>; + #[method_id(clickedPathComponentCell)] + pub unsafe fn clickedPathComponentCell(&self) -> Option>; + #[method(mouseEntered:withFrame:inView:)] + pub unsafe fn mouseEntered_withFrame_inView( + &self, + event: &NSEvent, + frame: NSRect, + view: &NSView, + ); + #[method(mouseExited:withFrame:inView:)] + pub unsafe fn mouseExited_withFrame_inView( + &self, + event: &NSEvent, + frame: NSRect, + view: &NSView, + ); + #[method(doubleAction)] + pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] + pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method_id(placeholderString)] + pub unsafe fn placeholderString(&self) -> Option>; + #[method(setPlaceholderString:)] + pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); + #[method_id(placeholderAttributedString)] + pub unsafe fn placeholderAttributedString(&self) -> Option>; + #[method(setPlaceholderAttributedString:)] + pub unsafe fn setPlaceholderAttributedString( + &self, + placeholderAttributedString: Option<&NSAttributedString>, + ); + } +); +pub type NSPathCellDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs new file mode 100644 index 000000000..9bd3f3e67 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs @@ -0,0 +1,29 @@ +use super::__exported::NSImage; +use super::__exported::NSString; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextFieldCell::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPathComponentCell; + unsafe impl ClassType for NSPathComponentCell { + type Super = NSTextFieldCell; + } +); +extern_methods!( + unsafe impl NSPathComponentCell { + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + #[method(setURL:)] + pub unsafe fn setURL(&self, URL: Option<&NSURL>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPathControl.rs b/crates/icrate/src/generated/AppKit/NSPathControl.rs new file mode 100644 index 000000000..2f47af037 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPathControl.rs @@ -0,0 +1,91 @@ +use super::__exported::NSOpenPanel; +use super::__exported::NSPathComponentCell; +use super::__exported::NSPathControlItem; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSDragging::*; +use crate::AppKit::generated::NSPathCell::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPathControl; + unsafe impl ClassType for NSPathControl { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSPathControl { + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] + pub unsafe fn setEditable(&self, editable: bool); + #[method_id(allowedTypes)] + pub unsafe fn allowedTypes(&self) -> Option, Shared>>; + #[method(setAllowedTypes:)] + pub unsafe fn setAllowedTypes(&self, allowedTypes: Option<&NSArray>); + #[method_id(placeholderString)] + pub unsafe fn placeholderString(&self) -> Option>; + #[method(setPlaceholderString:)] + pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); + #[method_id(placeholderAttributedString)] + pub unsafe fn placeholderAttributedString(&self) -> Option>; + #[method(setPlaceholderAttributedString:)] + pub unsafe fn setPlaceholderAttributedString( + &self, + placeholderAttributedString: Option<&NSAttributedString>, + ); + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + #[method(setURL:)] + pub unsafe fn setURL(&self, URL: Option<&NSURL>); + #[method(doubleAction)] + pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] + pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method(pathStyle)] + pub unsafe fn pathStyle(&self) -> NSPathStyle; + #[method(setPathStyle:)] + pub unsafe fn setPathStyle(&self, pathStyle: NSPathStyle); + #[method_id(clickedPathItem)] + pub unsafe fn clickedPathItem(&self) -> Option>; + #[method_id(pathItems)] + pub unsafe fn pathItems(&self) -> Id, Shared>; + #[method(setPathItems:)] + pub unsafe fn setPathItems(&self, pathItems: &NSArray); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSPathControlDelegate>); + #[method(setDraggingSourceOperationMask:forLocal:)] + pub unsafe fn setDraggingSourceOperationMask_forLocal( + &self, + mask: NSDragOperation, + isLocal: bool, + ); + #[method_id(menu)] + pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] + pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + } +); +pub type NSPathControlDelegate = NSObject; +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSPathControl { + #[method_id(clickedPathComponentCell)] + pub unsafe fn clickedPathComponentCell(&self) -> Option>; + #[method_id(pathComponentCells)] + pub unsafe fn pathComponentCells(&self) -> Id, Shared>; + #[method(setPathComponentCells:)] + pub unsafe fn setPathComponentCells(&self, cells: &NSArray); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs new file mode 100644 index 000000000..68e7aaa77 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs @@ -0,0 +1,33 @@ +use super::__exported::NSPathComponentCell; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSImage::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPathControlItem; + unsafe impl ClassType for NSPathControlItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPathControlItem { + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(attributedTitle)] + pub unsafe fn attributedTitle(&self) -> Id; + #[method(setAttributedTitle:)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs new file mode 100644 index 000000000..08ae08249 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs @@ -0,0 +1,73 @@ +use super::__exported::NSManagedObjectContext; +use super::__exported::NSManagedObjectModel; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSDocument::*; +use crate::Foundation::generated::NSDictionary::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPersistentDocument; + unsafe impl ClassType for NSPersistentDocument { + type Super = NSDocument; + } +); +extern_methods!( + unsafe impl NSPersistentDocument { + #[method_id(managedObjectContext)] + pub unsafe fn managedObjectContext(&self) -> Option>; + #[method(setManagedObjectContext:)] + pub unsafe fn setManagedObjectContext( + &self, + managedObjectContext: Option<&NSManagedObjectContext>, + ); + #[method_id(managedObjectModel)] + pub unsafe fn managedObjectModel(&self) -> Option>; + #[method(configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:)] + pub unsafe fn configurePersistentStoreCoordinatorForURL_ofType_modelConfiguration_storeOptions_error( + &self, + url: &NSURL, + fileType: &NSString, + configuration: Option<&NSString>, + storeOptions: Option<&NSDictionary>, + ) -> Result<(), Id>; + #[method_id(persistentStoreTypeForFileType:)] + pub unsafe fn persistentStoreTypeForFileType( + &self, + fileType: &NSString, + ) -> Id; + #[method(writeToURL:ofType:forSaveOperation:originalContentsURL:error:)] + pub unsafe fn writeToURL_ofType_forSaveOperation_originalContentsURL_error( + &self, + absoluteURL: &NSURL, + typeName: &NSString, + saveOperation: NSSaveOperationType, + absoluteOriginalContentsURL: Option<&NSURL>, + ) -> Result<(), Id>; + #[method(readFromURL:ofType:error:)] + pub unsafe fn readFromURL_ofType_error( + &self, + absoluteURL: &NSURL, + typeName: &NSString, + ) -> Result<(), Id>; + #[method(revertToContentsOfURL:ofType:error:)] + pub unsafe fn revertToContentsOfURL_ofType_error( + &self, + inAbsoluteURL: &NSURL, + inTypeName: &NSString, + ) -> Result<(), Id>; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSPersistentDocument { + #[method(configurePersistentStoreCoordinatorForURL:ofType:error:)] + pub unsafe fn configurePersistentStoreCoordinatorForURL_ofType_error( + &self, + url: Option<&NSURL>, + fileType: Option<&NSString>, + ) -> Result<(), Id>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs new file mode 100644 index 000000000..ec395946f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs @@ -0,0 +1,99 @@ +use super::__exported::NSColor; +use super::__exported::NSImage; +use crate::AppKit::generated::NSTouchBarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPickerTouchBarItem; + unsafe impl ClassType for NSPickerTouchBarItem { + type Super = NSTouchBarItem; + } +); +extern_methods!( + unsafe impl NSPickerTouchBarItem { + #[method_id(pickerTouchBarItemWithIdentifier:labels:selectionMode:target:action:)] + pub unsafe fn pickerTouchBarItemWithIdentifier_labels_selectionMode_target_action( + identifier: &NSTouchBarItemIdentifier, + labels: &NSArray, + selectionMode: NSPickerTouchBarItemSelectionMode, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(pickerTouchBarItemWithIdentifier:images:selectionMode:target:action:)] + pub unsafe fn pickerTouchBarItemWithIdentifier_images_selectionMode_target_action( + identifier: &NSTouchBarItemIdentifier, + images: &NSArray, + selectionMode: NSPickerTouchBarItemSelectionMode, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method(controlRepresentation)] + pub unsafe fn controlRepresentation(&self) -> NSPickerTouchBarItemControlRepresentation; + #[method(setControlRepresentation:)] + pub unsafe fn setControlRepresentation( + &self, + controlRepresentation: NSPickerTouchBarItemControlRepresentation, + ); + #[method_id(collapsedRepresentationLabel)] + pub unsafe fn collapsedRepresentationLabel(&self) -> Id; + #[method(setCollapsedRepresentationLabel:)] + pub unsafe fn setCollapsedRepresentationLabel( + &self, + collapsedRepresentationLabel: &NSString, + ); + #[method_id(collapsedRepresentationImage)] + pub unsafe fn collapsedRepresentationImage(&self) -> Option>; + #[method(setCollapsedRepresentationImage:)] + pub unsafe fn setCollapsedRepresentationImage( + &self, + collapsedRepresentationImage: Option<&NSImage>, + ); + #[method(selectedIndex)] + pub unsafe fn selectedIndex(&self) -> NSInteger; + #[method(setSelectedIndex:)] + pub unsafe fn setSelectedIndex(&self, selectedIndex: NSInteger); + #[method_id(selectionColor)] + pub unsafe fn selectionColor(&self) -> Option>; + #[method(setSelectionColor:)] + pub unsafe fn setSelectionColor(&self, selectionColor: Option<&NSColor>); + #[method(selectionMode)] + pub unsafe fn selectionMode(&self) -> NSPickerTouchBarItemSelectionMode; + #[method(setSelectionMode:)] + pub unsafe fn setSelectionMode(&self, selectionMode: NSPickerTouchBarItemSelectionMode); + #[method(numberOfOptions)] + pub unsafe fn numberOfOptions(&self) -> NSInteger; + #[method(setNumberOfOptions:)] + pub unsafe fn setNumberOfOptions(&self, numberOfOptions: NSInteger); + #[method(setImage:atIndex:)] + pub unsafe fn setImage_atIndex(&self, image: Option<&NSImage>, index: NSInteger); + #[method_id(imageAtIndex:)] + pub unsafe fn imageAtIndex(&self, index: NSInteger) -> Option>; + #[method(setLabel:atIndex:)] + pub unsafe fn setLabel_atIndex(&self, label: &NSString, index: NSInteger); + #[method_id(labelAtIndex:)] + pub unsafe fn labelAtIndex(&self, index: NSInteger) -> Option>; + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method(setEnabled:atIndex:)] + pub unsafe fn setEnabled_atIndex(&self, enabled: bool, index: NSInteger); + #[method(isEnabledAtIndex:)] + pub unsafe fn isEnabledAtIndex(&self, index: NSInteger) -> bool; + #[method_id(customizationLabel)] + pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] + pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs new file mode 100644 index 000000000..b1a9045ef --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -0,0 +1,103 @@ +use super::__exported::NSMenu; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSButton::*; +use crate::AppKit::generated::NSMenuItem::*; +use crate::AppKit::generated::NSMenuItemCell::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPopUpButton; + unsafe impl ClassType for NSPopUpButton { + type Super = NSButton; + } +); +extern_methods!( + unsafe impl NSPopUpButton { + #[method_id(initWithFrame:pullsDown:)] + pub unsafe fn initWithFrame_pullsDown( + &self, + buttonFrame: NSRect, + flag: bool, + ) -> Id; + #[method_id(menu)] + pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] + pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method(pullsDown)] + pub unsafe fn pullsDown(&self) -> bool; + #[method(setPullsDown:)] + pub unsafe fn setPullsDown(&self, pullsDown: bool); + #[method(autoenablesItems)] + pub unsafe fn autoenablesItems(&self) -> bool; + #[method(setAutoenablesItems:)] + pub unsafe fn setAutoenablesItems(&self, autoenablesItems: bool); + #[method(preferredEdge)] + pub unsafe fn preferredEdge(&self) -> NSRectEdge; + #[method(setPreferredEdge:)] + pub unsafe fn setPreferredEdge(&self, preferredEdge: NSRectEdge); + #[method(addItemWithTitle:)] + pub unsafe fn addItemWithTitle(&self, title: &NSString); + #[method(addItemsWithTitles:)] + pub unsafe fn addItemsWithTitles(&self, itemTitles: &NSArray); + #[method(insertItemWithTitle:atIndex:)] + pub unsafe fn insertItemWithTitle_atIndex(&self, title: &NSString, index: NSInteger); + #[method(removeItemWithTitle:)] + pub unsafe fn removeItemWithTitle(&self, title: &NSString); + #[method(removeItemAtIndex:)] + pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method(removeAllItems)] + pub unsafe fn removeAllItems(&self); + #[method_id(itemArray)] + pub unsafe fn itemArray(&self) -> Id, Shared>; + #[method(numberOfItems)] + pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(indexOfItem:)] + pub unsafe fn indexOfItem(&self, item: &NSMenuItem) -> NSInteger; + #[method(indexOfItemWithTitle:)] + pub unsafe fn indexOfItemWithTitle(&self, title: &NSString) -> NSInteger; + #[method(indexOfItemWithTag:)] + pub unsafe fn indexOfItemWithTag(&self, tag: NSInteger) -> NSInteger; + #[method(indexOfItemWithRepresentedObject:)] + pub unsafe fn indexOfItemWithRepresentedObject(&self, obj: Option<&Object>) -> NSInteger; + #[method(indexOfItemWithTarget:andAction:)] + pub unsafe fn indexOfItemWithTarget_andAction( + &self, + target: Option<&Object>, + actionSelector: Option, + ) -> NSInteger; + #[method_id(itemAtIndex:)] + pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; + #[method_id(itemWithTitle:)] + pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; + #[method_id(lastItem)] + pub unsafe fn lastItem(&self) -> Option>; + #[method(selectItem:)] + pub unsafe fn selectItem(&self, item: Option<&NSMenuItem>); + #[method(selectItemAtIndex:)] + pub unsafe fn selectItemAtIndex(&self, index: NSInteger); + #[method(selectItemWithTitle:)] + pub unsafe fn selectItemWithTitle(&self, title: &NSString); + #[method(selectItemWithTag:)] + pub unsafe fn selectItemWithTag(&self, tag: NSInteger) -> bool; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, string: &NSString); + #[method_id(selectedItem)] + pub unsafe fn selectedItem(&self) -> Option>; + #[method(indexOfSelectedItem)] + pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(selectedTag)] + pub unsafe fn selectedTag(&self) -> NSInteger; + #[method(synchronizeTitleAndSelectedItem)] + pub unsafe fn synchronizeTitleAndSelectedItem(&self); + #[method_id(itemTitleAtIndex:)] + pub unsafe fn itemTitleAtIndex(&self, index: NSInteger) -> Id; + #[method_id(itemTitles)] + pub unsafe fn itemTitles(&self) -> Id, Shared>; + #[method_id(titleOfSelectedItem)] + pub unsafe fn titleOfSelectedItem(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs new file mode 100644 index 000000000..8f066a2ee --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -0,0 +1,121 @@ +use super::__exported::NSMenu; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSMenu::*; +use crate::AppKit::generated::NSMenuItem::*; +use crate::AppKit::generated::NSMenuItemCell::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPopUpButtonCell; + unsafe impl ClassType for NSPopUpButtonCell { + type Super = NSMenuItemCell; + } +); +extern_methods!( + unsafe impl NSPopUpButtonCell { + #[method_id(initTextCell:pullsDown:)] + pub unsafe fn initTextCell_pullsDown( + &self, + stringValue: &NSString, + pullDown: bool, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(menu)] + pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] + pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method(pullsDown)] + pub unsafe fn pullsDown(&self) -> bool; + #[method(setPullsDown:)] + pub unsafe fn setPullsDown(&self, pullsDown: bool); + #[method(autoenablesItems)] + pub unsafe fn autoenablesItems(&self) -> bool; + #[method(setAutoenablesItems:)] + pub unsafe fn setAutoenablesItems(&self, autoenablesItems: bool); + #[method(preferredEdge)] + pub unsafe fn preferredEdge(&self) -> NSRectEdge; + #[method(setPreferredEdge:)] + pub unsafe fn setPreferredEdge(&self, preferredEdge: NSRectEdge); + #[method(usesItemFromMenu)] + pub unsafe fn usesItemFromMenu(&self) -> bool; + #[method(setUsesItemFromMenu:)] + pub unsafe fn setUsesItemFromMenu(&self, usesItemFromMenu: bool); + #[method(altersStateOfSelectedItem)] + pub unsafe fn altersStateOfSelectedItem(&self) -> bool; + #[method(setAltersStateOfSelectedItem:)] + pub unsafe fn setAltersStateOfSelectedItem(&self, altersStateOfSelectedItem: bool); + #[method(addItemWithTitle:)] + pub unsafe fn addItemWithTitle(&self, title: &NSString); + #[method(addItemsWithTitles:)] + pub unsafe fn addItemsWithTitles(&self, itemTitles: &NSArray); + #[method(insertItemWithTitle:atIndex:)] + pub unsafe fn insertItemWithTitle_atIndex(&self, title: &NSString, index: NSInteger); + #[method(removeItemWithTitle:)] + pub unsafe fn removeItemWithTitle(&self, title: &NSString); + #[method(removeItemAtIndex:)] + pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method(removeAllItems)] + pub unsafe fn removeAllItems(&self); + #[method_id(itemArray)] + pub unsafe fn itemArray(&self) -> Id, Shared>; + #[method(numberOfItems)] + pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(indexOfItem:)] + pub unsafe fn indexOfItem(&self, item: &NSMenuItem) -> NSInteger; + #[method(indexOfItemWithTitle:)] + pub unsafe fn indexOfItemWithTitle(&self, title: &NSString) -> NSInteger; + #[method(indexOfItemWithTag:)] + pub unsafe fn indexOfItemWithTag(&self, tag: NSInteger) -> NSInteger; + #[method(indexOfItemWithRepresentedObject:)] + pub unsafe fn indexOfItemWithRepresentedObject(&self, obj: Option<&Object>) -> NSInteger; + #[method(indexOfItemWithTarget:andAction:)] + pub unsafe fn indexOfItemWithTarget_andAction( + &self, + target: Option<&Object>, + actionSelector: Option, + ) -> NSInteger; + #[method_id(itemAtIndex:)] + pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; + #[method_id(itemWithTitle:)] + pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; + #[method_id(lastItem)] + pub unsafe fn lastItem(&self) -> Option>; + #[method(selectItem:)] + pub unsafe fn selectItem(&self, item: Option<&NSMenuItem>); + #[method(selectItemAtIndex:)] + pub unsafe fn selectItemAtIndex(&self, index: NSInteger); + #[method(selectItemWithTitle:)] + pub unsafe fn selectItemWithTitle(&self, title: &NSString); + #[method(selectItemWithTag:)] + pub unsafe fn selectItemWithTag(&self, tag: NSInteger) -> bool; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, string: Option<&NSString>); + #[method_id(selectedItem)] + pub unsafe fn selectedItem(&self) -> Option>; + #[method(indexOfSelectedItem)] + pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(synchronizeTitleAndSelectedItem)] + pub unsafe fn synchronizeTitleAndSelectedItem(&self); + #[method_id(itemTitleAtIndex:)] + pub unsafe fn itemTitleAtIndex(&self, index: NSInteger) -> Id; + #[method_id(itemTitles)] + pub unsafe fn itemTitles(&self) -> Id, Shared>; + #[method_id(titleOfSelectedItem)] + pub unsafe fn titleOfSelectedItem(&self) -> Option>; + #[method(attachPopUpWithFrame:inView:)] + pub unsafe fn attachPopUpWithFrame_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method(dismissPopUp)] + pub unsafe fn dismissPopUp(&self); + #[method(performClickWithFrame:inView:)] + pub unsafe fn performClickWithFrame_inView(&self, frame: NSRect, controlView: &NSView); + #[method(arrowPosition)] + pub unsafe fn arrowPosition(&self) -> NSPopUpArrowPosition; + #[method(setArrowPosition:)] + pub unsafe fn setArrowPosition(&self, arrowPosition: NSPopUpArrowPosition); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs new file mode 100644 index 000000000..c08cd2ead --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -0,0 +1,80 @@ +use super::__exported::NSNotification; +use super::__exported::NSString; +use super::__exported::NSView; +use super::__exported::NSViewController; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAppearance::*; +use crate::AppKit::generated::NSNibDeclarations::*; +use crate::AppKit::generated::NSResponder::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPopover; + unsafe impl ClassType for NSPopover { + type Super = NSResponder; + } +); +extern_methods!( + unsafe impl NSPopover { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSPopoverDelegate>); + #[method_id(appearance)] + pub unsafe fn appearance(&self) -> Option>; + #[method(setAppearance:)] + pub unsafe fn setAppearance(&self, appearance: Option<&NSAppearance>); + #[method_id(effectiveAppearance)] + pub unsafe fn effectiveAppearance(&self) -> Id; + #[method(behavior)] + pub unsafe fn behavior(&self) -> NSPopoverBehavior; + #[method(setBehavior:)] + pub unsafe fn setBehavior(&self, behavior: NSPopoverBehavior); + #[method(animates)] + pub unsafe fn animates(&self) -> bool; + #[method(setAnimates:)] + pub unsafe fn setAnimates(&self, animates: bool); + #[method_id(contentViewController)] + pub unsafe fn contentViewController(&self) -> Option>; + #[method(setContentViewController:)] + pub unsafe fn setContentViewController( + &self, + contentViewController: Option<&NSViewController>, + ); + #[method(contentSize)] + pub unsafe fn contentSize(&self) -> NSSize; + #[method(setContentSize:)] + pub unsafe fn setContentSize(&self, contentSize: NSSize); + #[method(isShown)] + pub unsafe fn isShown(&self) -> bool; + #[method(isDetached)] + pub unsafe fn isDetached(&self) -> bool; + #[method(positioningRect)] + pub unsafe fn positioningRect(&self) -> NSRect; + #[method(setPositioningRect:)] + pub unsafe fn setPositioningRect(&self, positioningRect: NSRect); + #[method(showRelativeToRect:ofView:preferredEdge:)] + pub unsafe fn showRelativeToRect_ofView_preferredEdge( + &self, + positioningRect: NSRect, + positioningView: &NSView, + preferredEdge: NSRectEdge, + ); + #[method(performClose:)] + pub unsafe fn performClose(&self, sender: Option<&Object>); + #[method(close)] + pub unsafe fn close(&self); + } +); +pub type NSPopoverCloseReasonValue = NSString; +pub type NSPopoverDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs new file mode 100644 index 000000000..818657d8b --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs @@ -0,0 +1,58 @@ +use crate::AppKit::generated::NSTouchBarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPopoverTouchBarItem; + unsafe impl ClassType for NSPopoverTouchBarItem { + type Super = NSTouchBarItem; + } +); +extern_methods!( + unsafe impl NSPopoverTouchBarItem { + #[method_id(popoverTouchBar)] + pub unsafe fn popoverTouchBar(&self) -> Id; + #[method(setPopoverTouchBar:)] + pub unsafe fn setPopoverTouchBar(&self, popoverTouchBar: &NSTouchBar); + #[method_id(customizationLabel)] + pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] + pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + #[method_id(collapsedRepresentation)] + pub unsafe fn collapsedRepresentation(&self) -> Id; + #[method(setCollapsedRepresentation:)] + pub unsafe fn setCollapsedRepresentation(&self, collapsedRepresentation: &NSView); + #[method_id(collapsedRepresentationImage)] + pub unsafe fn collapsedRepresentationImage(&self) -> Option>; + #[method(setCollapsedRepresentationImage:)] + pub unsafe fn setCollapsedRepresentationImage( + &self, + collapsedRepresentationImage: Option<&NSImage>, + ); + #[method_id(collapsedRepresentationLabel)] + pub unsafe fn collapsedRepresentationLabel(&self) -> Id; + #[method(setCollapsedRepresentationLabel:)] + pub unsafe fn setCollapsedRepresentationLabel( + &self, + collapsedRepresentationLabel: &NSString, + ); + #[method_id(pressAndHoldTouchBar)] + pub unsafe fn pressAndHoldTouchBar(&self) -> Option>; + #[method(setPressAndHoldTouchBar:)] + pub unsafe fn setPressAndHoldTouchBar(&self, pressAndHoldTouchBar: Option<&NSTouchBar>); + #[method(showsCloseButton)] + pub unsafe fn showsCloseButton(&self) -> bool; + #[method(setShowsCloseButton:)] + pub unsafe fn setShowsCloseButton(&self, showsCloseButton: bool); + #[method(showPopover:)] + pub unsafe fn showPopover(&self, sender: Option<&Object>); + #[method(dismissPopover:)] + pub unsafe fn dismissPopover(&self, sender: Option<&Object>); + #[method_id(makeStandardActivatePopoverGestureRecognizer)] + pub unsafe fn makeStandardActivatePopoverGestureRecognizer( + &self, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs new file mode 100644 index 000000000..a619158e5 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs @@ -0,0 +1,24 @@ +use super::__exported::NSArray; +use super::__exported::NSPredicateEditorRowTemplate; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSRuleEditor::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPredicateEditor; + unsafe impl ClassType for NSPredicateEditor { + type Super = NSRuleEditor; + } +); +extern_methods!( + unsafe impl NSPredicateEditor { + #[method_id(rowTemplates)] + pub unsafe fn rowTemplates(&self) -> Id, Shared>; + #[method(setRowTemplates:)] + pub unsafe fn setRowTemplates(&self, rowTemplates: &NSArray); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs new file mode 100644 index 000000000..1f523cab9 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs @@ -0,0 +1,81 @@ +use super::__exported::NSEntityDescription; +use super::__exported::NSPredicate; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::CoreData::generated::NSAttributeDescription::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSComparisonPredicate::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPredicateEditorRowTemplate; + unsafe impl ClassType for NSPredicateEditorRowTemplate { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPredicateEditorRowTemplate { + #[method(matchForPredicate:)] + pub unsafe fn matchForPredicate(&self, predicate: &NSPredicate) -> c_double; + #[method_id(templateViews)] + pub unsafe fn templateViews(&self) -> Id, Shared>; + #[method(setPredicate:)] + pub unsafe fn setPredicate(&self, predicate: &NSPredicate); + #[method_id(predicateWithSubpredicates:)] + pub unsafe fn predicateWithSubpredicates( + &self, + subpredicates: Option<&NSArray>, + ) -> Id; + #[method_id(displayableSubpredicatesOfPredicate:)] + pub unsafe fn displayableSubpredicatesOfPredicate( + &self, + predicate: &NSPredicate, + ) -> Option, Shared>>; + #[method_id(initWithLeftExpressions:rightExpressions:modifier:operators:options:)] + pub unsafe fn initWithLeftExpressions_rightExpressions_modifier_operators_options( + &self, + leftExpressions: &NSArray, + rightExpressions: &NSArray, + modifier: NSComparisonPredicateModifier, + operators: &NSArray, + options: NSUInteger, + ) -> Id; + #[method_id(initWithLeftExpressions:rightExpressionAttributeType:modifier:operators:options:)] + pub unsafe fn initWithLeftExpressions_rightExpressionAttributeType_modifier_operators_options( + &self, + leftExpressions: &NSArray, + attributeType: NSAttributeType, + modifier: NSComparisonPredicateModifier, + operators: &NSArray, + options: NSUInteger, + ) -> Id; + #[method_id(initWithCompoundTypes:)] + pub unsafe fn initWithCompoundTypes( + &self, + compoundTypes: &NSArray, + ) -> Id; + #[method_id(leftExpressions)] + pub unsafe fn leftExpressions(&self) -> Option, Shared>>; + #[method_id(rightExpressions)] + pub unsafe fn rightExpressions(&self) -> Option, Shared>>; + #[method(rightExpressionAttributeType)] + pub unsafe fn rightExpressionAttributeType(&self) -> NSAttributeType; + #[method(modifier)] + pub unsafe fn modifier(&self) -> NSComparisonPredicateModifier; + #[method_id(operators)] + pub unsafe fn operators(&self) -> Option, Shared>>; + #[method(options)] + pub unsafe fn options(&self) -> NSUInteger; + #[method_id(compoundTypes)] + pub unsafe fn compoundTypes(&self) -> Option, Shared>>; + #[method_id(templatesWithAttributeKeyPaths:inEntityDescription:)] + pub unsafe fn templatesWithAttributeKeyPaths_inEntityDescription( + keyPaths: &NSArray, + entityDescription: &NSEntityDescription, + ) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs new file mode 100644 index 000000000..0b134d51b --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs @@ -0,0 +1,34 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSGestureRecognizer::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPressGestureRecognizer; + unsafe impl ClassType for NSPressGestureRecognizer { + type Super = NSGestureRecognizer; + } +); +extern_methods!( + unsafe impl NSPressGestureRecognizer { + #[method(buttonMask)] + pub unsafe fn buttonMask(&self) -> NSUInteger; + #[method(setButtonMask:)] + pub unsafe fn setButtonMask(&self, buttonMask: NSUInteger); + #[method(minimumPressDuration)] + pub unsafe fn minimumPressDuration(&self) -> NSTimeInterval; + #[method(setMinimumPressDuration:)] + pub unsafe fn setMinimumPressDuration(&self, minimumPressDuration: NSTimeInterval); + #[method(allowableMovement)] + pub unsafe fn allowableMovement(&self) -> CGFloat; + #[method(setAllowableMovement:)] + pub unsafe fn setAllowableMovement(&self, allowableMovement: CGFloat); + #[method(numberOfTouchesRequired)] + pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger; + #[method(setNumberOfTouchesRequired:)] + pub unsafe fn setNumberOfTouchesRequired(&self, numberOfTouchesRequired: NSInteger); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs new file mode 100644 index 000000000..92b439d4f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs @@ -0,0 +1,41 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSEvent::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPressureConfiguration; + unsafe impl ClassType for NSPressureConfiguration { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPressureConfiguration { + #[method(pressureBehavior)] + pub unsafe fn pressureBehavior(&self) -> NSPressureBehavior; + #[method_id(initWithPressureBehavior:)] + pub unsafe fn initWithPressureBehavior( + &self, + pressureBehavior: NSPressureBehavior, + ) -> Id; + #[method(set)] + pub unsafe fn set(&self); + } +); +extern_methods!( + #[doc = "NSPressureConfiguration"] + unsafe impl NSView { + #[method_id(pressureConfiguration)] + pub unsafe fn pressureConfiguration(&self) -> Option>; + #[method(setPressureConfiguration:)] + pub unsafe fn setPressureConfiguration( + &self, + pressureConfiguration: Option<&NSPressureConfiguration>, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs new file mode 100644 index 000000000..1007bfee1 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -0,0 +1,138 @@ +use super::__exported::NSPDFInfo; +use super::__exported::NSPrinter; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSPrinter::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPrintInfoAttributeKey = NSString; +pub type NSPrintJobDispositionValue = NSString; +pub type NSPrintInfoSettingKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSPrintInfo; + unsafe impl ClassType for NSPrintInfo { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPrintInfo { + #[method_id(sharedPrintInfo)] + pub unsafe fn sharedPrintInfo() -> Id; + #[method(setSharedPrintInfo:)] + pub unsafe fn setSharedPrintInfo(sharedPrintInfo: &NSPrintInfo); + #[method_id(initWithDictionary:)] + pub unsafe fn initWithDictionary( + &self, + attributes: &NSDictionary, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(dictionary)] + pub unsafe fn dictionary( + &self, + ) -> Id, Shared>; + #[method_id(paperName)] + pub unsafe fn paperName(&self) -> Option>; + #[method(setPaperName:)] + pub unsafe fn setPaperName(&self, paperName: Option<&NSPrinterPaperName>); + #[method(paperSize)] + pub unsafe fn paperSize(&self) -> NSSize; + #[method(setPaperSize:)] + pub unsafe fn setPaperSize(&self, paperSize: NSSize); + #[method(orientation)] + pub unsafe fn orientation(&self) -> NSPaperOrientation; + #[method(setOrientation:)] + pub unsafe fn setOrientation(&self, orientation: NSPaperOrientation); + #[method(scalingFactor)] + pub unsafe fn scalingFactor(&self) -> CGFloat; + #[method(setScalingFactor:)] + pub unsafe fn setScalingFactor(&self, scalingFactor: CGFloat); + #[method(leftMargin)] + pub unsafe fn leftMargin(&self) -> CGFloat; + #[method(setLeftMargin:)] + pub unsafe fn setLeftMargin(&self, leftMargin: CGFloat); + #[method(rightMargin)] + pub unsafe fn rightMargin(&self) -> CGFloat; + #[method(setRightMargin:)] + pub unsafe fn setRightMargin(&self, rightMargin: CGFloat); + #[method(topMargin)] + pub unsafe fn topMargin(&self) -> CGFloat; + #[method(setTopMargin:)] + pub unsafe fn setTopMargin(&self, topMargin: CGFloat); + #[method(bottomMargin)] + pub unsafe fn bottomMargin(&self) -> CGFloat; + #[method(setBottomMargin:)] + pub unsafe fn setBottomMargin(&self, bottomMargin: CGFloat); + #[method(isHorizontallyCentered)] + pub unsafe fn isHorizontallyCentered(&self) -> bool; + #[method(setHorizontallyCentered:)] + pub unsafe fn setHorizontallyCentered(&self, horizontallyCentered: bool); + #[method(isVerticallyCentered)] + pub unsafe fn isVerticallyCentered(&self) -> bool; + #[method(setVerticallyCentered:)] + pub unsafe fn setVerticallyCentered(&self, verticallyCentered: bool); + #[method(horizontalPagination)] + pub unsafe fn horizontalPagination(&self) -> NSPrintingPaginationMode; + #[method(setHorizontalPagination:)] + pub unsafe fn setHorizontalPagination( + &self, + horizontalPagination: NSPrintingPaginationMode, + ); + #[method(verticalPagination)] + pub unsafe fn verticalPagination(&self) -> NSPrintingPaginationMode; + #[method(setVerticalPagination:)] + pub unsafe fn setVerticalPagination(&self, verticalPagination: NSPrintingPaginationMode); + #[method_id(jobDisposition)] + pub unsafe fn jobDisposition(&self) -> Id; + #[method(setJobDisposition:)] + pub unsafe fn setJobDisposition(&self, jobDisposition: &NSPrintJobDispositionValue); + #[method_id(printer)] + pub unsafe fn printer(&self) -> Id; + #[method(setPrinter:)] + pub unsafe fn setPrinter(&self, printer: &NSPrinter); + #[method(setUpPrintOperationDefaultValues)] + pub unsafe fn setUpPrintOperationDefaultValues(&self); + #[method(imageablePageBounds)] + pub unsafe fn imageablePageBounds(&self) -> NSRect; + #[method_id(localizedPaperName)] + pub unsafe fn localizedPaperName(&self) -> Option>; + #[method_id(defaultPrinter)] + pub unsafe fn defaultPrinter() -> Option>; + #[method_id(printSettings)] + pub unsafe fn printSettings( + &self, + ) -> Id, Shared>; + #[method(PMPrintSession)] + pub unsafe fn PMPrintSession(&self) -> NonNull; + #[method(PMPageFormat)] + pub unsafe fn PMPageFormat(&self) -> NonNull; + #[method(PMPrintSettings)] + pub unsafe fn PMPrintSettings(&self) -> NonNull; + #[method(updateFromPMPageFormat)] + pub unsafe fn updateFromPMPageFormat(&self); + #[method(updateFromPMPrintSettings)] + pub unsafe fn updateFromPMPrintSettings(&self); + #[method(isSelectionOnly)] + pub unsafe fn isSelectionOnly(&self) -> bool; + #[method(setSelectionOnly:)] + pub unsafe fn setSelectionOnly(&self, selectionOnly: bool); + #[method(takeSettingsFromPDFInfo:)] + pub unsafe fn takeSettingsFromPDFInfo(&self, inPDFInfo: &NSPDFInfo); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSPrintInfo { + #[method(setDefaultPrinter:)] + pub unsafe fn setDefaultPrinter(printer: Option<&NSPrinter>); + #[method(sizeForPaperName:)] + pub unsafe fn sizeForPaperName(name: Option<&NSPrinterPaperName>) -> NSSize; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs new file mode 100644 index 000000000..9dc01fe26 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -0,0 +1,155 @@ +use super::__exported::NSGraphicsContext; +use super::__exported::NSMutableData; +use super::__exported::NSPDFPanel; +use super::__exported::NSPrintInfo; +use super::__exported::NSPrintPanel; +use super::__exported::NSView; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSRange::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSPrintOperation; + unsafe impl ClassType for NSPrintOperation { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPrintOperation { + #[method_id(printOperationWithView:printInfo:)] + pub unsafe fn printOperationWithView_printInfo( + view: &NSView, + printInfo: &NSPrintInfo, + ) -> Id; + #[method_id(PDFOperationWithView:insideRect:toData:printInfo:)] + pub unsafe fn PDFOperationWithView_insideRect_toData_printInfo( + view: &NSView, + rect: NSRect, + data: &NSMutableData, + printInfo: &NSPrintInfo, + ) -> Id; + #[method_id(PDFOperationWithView:insideRect:toPath:printInfo:)] + pub unsafe fn PDFOperationWithView_insideRect_toPath_printInfo( + view: &NSView, + rect: NSRect, + path: &NSString, + printInfo: &NSPrintInfo, + ) -> Id; + #[method_id(EPSOperationWithView:insideRect:toData:printInfo:)] + pub unsafe fn EPSOperationWithView_insideRect_toData_printInfo( + view: &NSView, + rect: NSRect, + data: &NSMutableData, + printInfo: &NSPrintInfo, + ) -> Id; + #[method_id(EPSOperationWithView:insideRect:toPath:printInfo:)] + pub unsafe fn EPSOperationWithView_insideRect_toPath_printInfo( + view: &NSView, + rect: NSRect, + path: &NSString, + printInfo: &NSPrintInfo, + ) -> Id; + #[method_id(printOperationWithView:)] + pub unsafe fn printOperationWithView(view: &NSView) -> Id; + #[method_id(PDFOperationWithView:insideRect:toData:)] + pub unsafe fn PDFOperationWithView_insideRect_toData( + view: &NSView, + rect: NSRect, + data: &NSMutableData, + ) -> Id; + #[method_id(EPSOperationWithView:insideRect:toData:)] + pub unsafe fn EPSOperationWithView_insideRect_toData( + view: &NSView, + rect: NSRect, + data: Option<&NSMutableData>, + ) -> Id; + #[method_id(currentOperation)] + pub unsafe fn currentOperation() -> Option>; + #[method(setCurrentOperation:)] + pub unsafe fn setCurrentOperation(currentOperation: Option<&NSPrintOperation>); + #[method(isCopyingOperation)] + pub unsafe fn isCopyingOperation(&self) -> bool; + #[method(preferredRenderingQuality)] + pub unsafe fn preferredRenderingQuality(&self) -> NSPrintRenderingQuality; + #[method_id(jobTitle)] + pub unsafe fn jobTitle(&self) -> Option>; + #[method(setJobTitle:)] + pub unsafe fn setJobTitle(&self, jobTitle: Option<&NSString>); + #[method(showsPrintPanel)] + pub unsafe fn showsPrintPanel(&self) -> bool; + #[method(setShowsPrintPanel:)] + pub unsafe fn setShowsPrintPanel(&self, showsPrintPanel: bool); + #[method(showsProgressPanel)] + pub unsafe fn showsProgressPanel(&self) -> bool; + #[method(setShowsProgressPanel:)] + pub unsafe fn setShowsProgressPanel(&self, showsProgressPanel: bool); + #[method_id(printPanel)] + pub unsafe fn printPanel(&self) -> Id; + #[method(setPrintPanel:)] + pub unsafe fn setPrintPanel(&self, printPanel: &NSPrintPanel); + #[method_id(PDFPanel)] + pub unsafe fn PDFPanel(&self) -> Id; + #[method(setPDFPanel:)] + pub unsafe fn setPDFPanel(&self, PDFPanel: &NSPDFPanel); + #[method(canSpawnSeparateThread)] + pub unsafe fn canSpawnSeparateThread(&self) -> bool; + #[method(setCanSpawnSeparateThread:)] + pub unsafe fn setCanSpawnSeparateThread(&self, canSpawnSeparateThread: bool); + #[method(pageOrder)] + pub unsafe fn pageOrder(&self) -> NSPrintingPageOrder; + #[method(setPageOrder:)] + pub unsafe fn setPageOrder(&self, pageOrder: NSPrintingPageOrder); + #[method(runOperationModalForWindow:delegate:didRunSelector:contextInfo:)] + pub unsafe fn runOperationModalForWindow_delegate_didRunSelector_contextInfo( + &self, + docWindow: &NSWindow, + delegate: Option<&Object>, + didRunSelector: Option, + contextInfo: *mut c_void, + ); + #[method(runOperation)] + pub unsafe fn runOperation(&self) -> bool; + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method_id(printInfo)] + pub unsafe fn printInfo(&self) -> Id; + #[method(setPrintInfo:)] + pub unsafe fn setPrintInfo(&self, printInfo: &NSPrintInfo); + #[method_id(context)] + pub unsafe fn context(&self) -> Option>; + #[method(pageRange)] + pub unsafe fn pageRange(&self) -> NSRange; + #[method(currentPage)] + pub unsafe fn currentPage(&self) -> NSInteger; + #[method_id(createContext)] + pub unsafe fn createContext(&self) -> Option>; + #[method(destroyContext)] + pub unsafe fn destroyContext(&self); + #[method(deliverResult)] + pub unsafe fn deliverResult(&self) -> bool; + #[method(cleanUpOperation)] + pub unsafe fn cleanUpOperation(&self); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSPrintOperation { + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, view: Option<&NSView>); + #[method_id(accessoryView)] + pub unsafe fn accessoryView(&self) -> Option>; + #[method(setJobStyleHint:)] + pub unsafe fn setJobStyleHint(&self, hint: Option<&NSString>); + #[method_id(jobStyleHint)] + pub unsafe fn jobStyleHint(&self) -> Option>; + #[method(setShowPanels:)] + pub unsafe fn setShowPanels(&self, flag: bool); + #[method(showPanels)] + pub unsafe fn showPanels(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs new file mode 100644 index 000000000..ce59b6fdf --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -0,0 +1,82 @@ +use super::__exported::NSPrintInfo; +use super::__exported::NSSet; +use super::__exported::NSView; +use super::__exported::NSViewController; +use super::__exported::NSWindow; +use super::__exported::NSWindowController; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSHelpManager::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSSet::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPrintPanelJobStyleHint = NSString; +pub type NSPrintPanelAccessorySummaryKey = NSString; +pub type NSPrintPanelAccessorizing = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSPrintPanel; + unsafe impl ClassType for NSPrintPanel { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPrintPanel { + #[method_id(printPanel)] + pub unsafe fn printPanel() -> Id; + #[method(addAccessoryController:)] + pub unsafe fn addAccessoryController(&self, accessoryController: &TodoProtocols); + #[method(removeAccessoryController:)] + pub unsafe fn removeAccessoryController(&self, accessoryController: &TodoProtocols); + #[method_id(accessoryControllers)] + pub unsafe fn accessoryControllers(&self) -> Id, Shared>; + #[method(options)] + pub unsafe fn options(&self) -> NSPrintPanelOptions; + #[method(setOptions:)] + pub unsafe fn setOptions(&self, options: NSPrintPanelOptions); + #[method(setDefaultButtonTitle:)] + pub unsafe fn setDefaultButtonTitle(&self, defaultButtonTitle: Option<&NSString>); + #[method_id(defaultButtonTitle)] + pub unsafe fn defaultButtonTitle(&self) -> Option>; + #[method_id(helpAnchor)] + pub unsafe fn helpAnchor(&self) -> Option>; + #[method(setHelpAnchor:)] + pub unsafe fn setHelpAnchor(&self, helpAnchor: Option<&NSHelpAnchorName>); + #[method_id(jobStyleHint)] + pub unsafe fn jobStyleHint(&self) -> Option>; + #[method(setJobStyleHint:)] + pub unsafe fn setJobStyleHint(&self, jobStyleHint: Option<&NSPrintPanelJobStyleHint>); + #[method(beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:)] + pub unsafe fn beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo( + &self, + printInfo: &NSPrintInfo, + docWindow: &NSWindow, + delegate: Option<&Object>, + didEndSelector: Option, + contextInfo: *mut c_void, + ); + #[method(runModalWithPrintInfo:)] + pub unsafe fn runModalWithPrintInfo(&self, printInfo: &NSPrintInfo) -> NSInteger; + #[method(runModal)] + pub unsafe fn runModal(&self) -> NSInteger; + #[method_id(printInfo)] + pub unsafe fn printInfo(&self) -> Id; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSPrintPanel { + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method_id(accessoryView)] + pub unsafe fn accessoryView(&self) -> Option>; + #[method(updateFromPrintInfo)] + pub unsafe fn updateFromPrintInfo(&self); + #[method(finalWritePrintInfo)] + pub unsafe fn finalWritePrintInfo(&self); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPrinter.rs b/crates/icrate/src/generated/AppKit/NSPrinter.rs new file mode 100644 index 000000000..a52db4901 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSPrinter.rs @@ -0,0 +1,106 @@ +use super::__exported::NSString; +use crate::AppKit::generated::NSGraphics::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPrinterTypeName = NSString; +pub type NSPrinterPaperName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSPrinter; + unsafe impl ClassType for NSPrinter { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSPrinter { + #[method_id(printerNames)] + pub unsafe fn printerNames() -> Id, Shared>; + #[method_id(printerTypes)] + pub unsafe fn printerTypes() -> Id, Shared>; + #[method_id(printerWithName:)] + pub unsafe fn printerWithName(name: &NSString) -> Option>; + #[method_id(printerWithType:)] + pub unsafe fn printerWithType(type_: &NSPrinterTypeName) -> Option>; + #[method_id(name)] + pub unsafe fn name(&self) -> Id; + #[method_id(type)] + pub unsafe fn type_(&self) -> Id; + #[method(languageLevel)] + pub unsafe fn languageLevel(&self) -> NSInteger; + #[method(pageSizeForPaper:)] + pub unsafe fn pageSizeForPaper(&self, paperName: &NSPrinterPaperName) -> NSSize; + #[method_id(deviceDescription)] + pub unsafe fn deviceDescription( + &self, + ) -> Id, Shared>; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSPrinter { + #[method(statusForTable:)] + pub unsafe fn statusForTable(&self, tableName: &NSString) -> NSPrinterTableStatus; + #[method(isKey:inTable:)] + pub unsafe fn isKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> bool; + #[method(booleanForKey:inTable:)] + pub unsafe fn booleanForKey_inTable( + &self, + key: Option<&NSString>, + table: &NSString, + ) -> bool; + #[method(floatForKey:inTable:)] + pub unsafe fn floatForKey_inTable( + &self, + key: Option<&NSString>, + table: &NSString, + ) -> c_float; + #[method(intForKey:inTable:)] + pub unsafe fn intForKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> c_int; + #[method(rectForKey:inTable:)] + pub unsafe fn rectForKey_inTable(&self, key: Option<&NSString>, table: &NSString) + -> NSRect; + #[method(sizeForKey:inTable:)] + pub unsafe fn sizeForKey_inTable(&self, key: Option<&NSString>, table: &NSString) + -> NSSize; + #[method_id(stringForKey:inTable:)] + pub unsafe fn stringForKey_inTable( + &self, + key: Option<&NSString>, + table: &NSString, + ) -> Option>; + #[method_id(stringListForKey:inTable:)] + pub unsafe fn stringListForKey_inTable( + &self, + key: Option<&NSString>, + table: &NSString, + ) -> Option>; + #[method(imageRectForPaper:)] + pub unsafe fn imageRectForPaper(&self, paperName: Option<&NSString>) -> NSRect; + #[method(acceptsBinary)] + pub unsafe fn acceptsBinary(&self) -> bool; + #[method(isColor)] + pub unsafe fn isColor(&self) -> bool; + #[method(isFontAvailable:)] + pub unsafe fn isFontAvailable(&self, faceName: Option<&NSString>) -> bool; + #[method(isOutputStackInReverseOrder)] + pub unsafe fn isOutputStackInReverseOrder(&self) -> bool; + #[method_id(printerWithName:domain:includeUnavailable:)] + pub unsafe fn printerWithName_domain_includeUnavailable( + name: &NSString, + domain: Option<&NSString>, + flag: bool, + ) -> Option>; + #[method_id(domain)] + pub unsafe fn domain(&self) -> Id; + #[method_id(host)] + pub unsafe fn host(&self) -> Id; + #[method_id(note)] + pub unsafe fn note(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs new file mode 100644 index 000000000..5cb034f39 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs @@ -0,0 +1,78 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSProgressIndicator; + unsafe impl ClassType for NSProgressIndicator { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSProgressIndicator { + #[method(isIndeterminate)] + pub unsafe fn isIndeterminate(&self) -> bool; + #[method(setIndeterminate:)] + pub unsafe fn setIndeterminate(&self, indeterminate: bool); + #[method(isBezeled)] + pub unsafe fn isBezeled(&self) -> bool; + #[method(setBezeled:)] + pub unsafe fn setBezeled(&self, bezeled: bool); + #[method(controlTint)] + pub unsafe fn controlTint(&self) -> NSControlTint; + #[method(setControlTint:)] + pub unsafe fn setControlTint(&self, controlTint: NSControlTint); + #[method(controlSize)] + pub unsafe fn controlSize(&self) -> NSControlSize; + #[method(setControlSize:)] + pub unsafe fn setControlSize(&self, controlSize: NSControlSize); + #[method(doubleValue)] + pub unsafe fn doubleValue(&self) -> c_double; + #[method(setDoubleValue:)] + pub unsafe fn setDoubleValue(&self, doubleValue: c_double); + #[method(incrementBy:)] + pub unsafe fn incrementBy(&self, delta: c_double); + #[method(minValue)] + pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] + pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] + pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] + pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(usesThreadedAnimation)] + pub unsafe fn usesThreadedAnimation(&self) -> bool; + #[method(setUsesThreadedAnimation:)] + pub unsafe fn setUsesThreadedAnimation(&self, usesThreadedAnimation: bool); + #[method(startAnimation:)] + pub unsafe fn startAnimation(&self, sender: Option<&Object>); + #[method(stopAnimation:)] + pub unsafe fn stopAnimation(&self, sender: Option<&Object>); + #[method(style)] + pub unsafe fn style(&self) -> NSProgressIndicatorStyle; + #[method(setStyle:)] + pub unsafe fn setStyle(&self, style: NSProgressIndicatorStyle); + #[method(sizeToFit)] + pub unsafe fn sizeToFit(&self); + #[method(isDisplayedWhenStopped)] + pub unsafe fn isDisplayedWhenStopped(&self) -> bool; + #[method(setDisplayedWhenStopped:)] + pub unsafe fn setDisplayedWhenStopped(&self, displayedWhenStopped: bool); + } +); +extern_methods!( + #[doc = "NSProgressIndicatorDeprecated"] + unsafe impl NSProgressIndicator { + #[method(animationDelay)] + pub unsafe fn animationDelay(&self) -> NSTimeInterval; + #[method(setAnimationDelay:)] + pub unsafe fn setAnimationDelay(&self, delay: NSTimeInterval); + #[method(animate:)] + pub unsafe fn animate(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSResponder.rs b/crates/icrate/src/generated/AppKit/NSResponder.rs new file mode 100644 index 000000000..36b364313 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSResponder.rs @@ -0,0 +1,205 @@ +use super::__exported::NSError; +use super::__exported::NSEvent; +use super::__exported::NSMenu; +use super::__exported::NSUndoManager; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAccessibilityProtocols::*; +use crate::AppKit::generated::NSEvent::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSResponder; + unsafe impl ClassType for NSResponder { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSResponder { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(nextResponder)] + pub unsafe fn nextResponder(&self) -> Option>; + #[method(setNextResponder:)] + pub unsafe fn setNextResponder(&self, nextResponder: Option<&NSResponder>); + #[method(tryToPerform:with:)] + pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; + #[method(performKeyEquivalent:)] + pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; + #[method_id(validRequestorForSendType:returnType:)] + pub unsafe fn validRequestorForSendType_returnType( + &self, + sendType: Option<&NSPasteboardType>, + returnType: Option<&NSPasteboardType>, + ) -> Option>; + #[method(mouseDown:)] + pub unsafe fn mouseDown(&self, event: &NSEvent); + #[method(rightMouseDown:)] + pub unsafe fn rightMouseDown(&self, event: &NSEvent); + #[method(otherMouseDown:)] + pub unsafe fn otherMouseDown(&self, event: &NSEvent); + #[method(mouseUp:)] + pub unsafe fn mouseUp(&self, event: &NSEvent); + #[method(rightMouseUp:)] + pub unsafe fn rightMouseUp(&self, event: &NSEvent); + #[method(otherMouseUp:)] + pub unsafe fn otherMouseUp(&self, event: &NSEvent); + #[method(mouseMoved:)] + pub unsafe fn mouseMoved(&self, event: &NSEvent); + #[method(mouseDragged:)] + pub unsafe fn mouseDragged(&self, event: &NSEvent); + #[method(scrollWheel:)] + pub unsafe fn scrollWheel(&self, event: &NSEvent); + #[method(rightMouseDragged:)] + pub unsafe fn rightMouseDragged(&self, event: &NSEvent); + #[method(otherMouseDragged:)] + pub unsafe fn otherMouseDragged(&self, event: &NSEvent); + #[method(mouseEntered:)] + pub unsafe fn mouseEntered(&self, event: &NSEvent); + #[method(mouseExited:)] + pub unsafe fn mouseExited(&self, event: &NSEvent); + #[method(keyDown:)] + pub unsafe fn keyDown(&self, event: &NSEvent); + #[method(keyUp:)] + pub unsafe fn keyUp(&self, event: &NSEvent); + #[method(flagsChanged:)] + pub unsafe fn flagsChanged(&self, event: &NSEvent); + #[method(tabletPoint:)] + pub unsafe fn tabletPoint(&self, event: &NSEvent); + #[method(tabletProximity:)] + pub unsafe fn tabletProximity(&self, event: &NSEvent); + #[method(cursorUpdate:)] + pub unsafe fn cursorUpdate(&self, event: &NSEvent); + #[method(magnifyWithEvent:)] + pub unsafe fn magnifyWithEvent(&self, event: &NSEvent); + #[method(rotateWithEvent:)] + pub unsafe fn rotateWithEvent(&self, event: &NSEvent); + #[method(swipeWithEvent:)] + pub unsafe fn swipeWithEvent(&self, event: &NSEvent); + #[method(beginGestureWithEvent:)] + pub unsafe fn beginGestureWithEvent(&self, event: &NSEvent); + #[method(endGestureWithEvent:)] + pub unsafe fn endGestureWithEvent(&self, event: &NSEvent); + #[method(smartMagnifyWithEvent:)] + pub unsafe fn smartMagnifyWithEvent(&self, event: &NSEvent); + #[method(changeModeWithEvent:)] + pub unsafe fn changeModeWithEvent(&self, event: &NSEvent); + #[method(touchesBeganWithEvent:)] + pub unsafe fn touchesBeganWithEvent(&self, event: &NSEvent); + #[method(touchesMovedWithEvent:)] + pub unsafe fn touchesMovedWithEvent(&self, event: &NSEvent); + #[method(touchesEndedWithEvent:)] + pub unsafe fn touchesEndedWithEvent(&self, event: &NSEvent); + #[method(touchesCancelledWithEvent:)] + pub unsafe fn touchesCancelledWithEvent(&self, event: &NSEvent); + #[method(quickLookWithEvent:)] + pub unsafe fn quickLookWithEvent(&self, event: &NSEvent); + #[method(pressureChangeWithEvent:)] + pub unsafe fn pressureChangeWithEvent(&self, event: &NSEvent); + #[method(noResponderFor:)] + pub unsafe fn noResponderFor(&self, eventSelector: Sel); + #[method(acceptsFirstResponder)] + pub unsafe fn acceptsFirstResponder(&self) -> bool; + #[method(becomeFirstResponder)] + pub unsafe fn becomeFirstResponder(&self) -> bool; + #[method(resignFirstResponder)] + pub unsafe fn resignFirstResponder(&self) -> bool; + #[method(interpretKeyEvents:)] + pub unsafe fn interpretKeyEvents(&self, eventArray: &NSArray); + #[method(flushBufferedKeyEvents)] + pub unsafe fn flushBufferedKeyEvents(&self); + #[method_id(menu)] + pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] + pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method(showContextHelp:)] + pub unsafe fn showContextHelp(&self, sender: Option<&Object>); + #[method(helpRequested:)] + pub unsafe fn helpRequested(&self, eventPtr: &NSEvent); + #[method(shouldBeTreatedAsInkEvent:)] + pub unsafe fn shouldBeTreatedAsInkEvent(&self, event: &NSEvent) -> bool; + #[method(wantsScrollEventsForSwipeTrackingOnAxis:)] + pub unsafe fn wantsScrollEventsForSwipeTrackingOnAxis( + &self, + axis: NSEventGestureAxis, + ) -> bool; + #[method(wantsForwardedScrollEventsForAxis:)] + pub unsafe fn wantsForwardedScrollEventsForAxis(&self, axis: NSEventGestureAxis) -> bool; + #[method_id(supplementalTargetForAction:sender:)] + pub unsafe fn supplementalTargetForAction_sender( + &self, + action: Sel, + sender: Option<&Object>, + ) -> Option>; + } +); +pub type NSStandardKeyBindingResponding = NSObject; +extern_methods!( + #[doc = "NSStandardKeyBindingMethods"] + unsafe impl NSResponder {} +); +extern_methods!( + #[doc = "NSUndoSupport"] + unsafe impl NSResponder { + #[method_id(undoManager)] + pub unsafe fn undoManager(&self) -> Option>; + } +); +extern_methods!( + #[doc = "NSControlEditingSupport"] + unsafe impl NSResponder { + #[method(validateProposedFirstResponder:forEvent:)] + pub unsafe fn validateProposedFirstResponder_forEvent( + &self, + responder: &NSResponder, + event: Option<&NSEvent>, + ) -> bool; + } +); +extern_methods!( + #[doc = "NSErrorPresentation"] + unsafe impl NSResponder { + #[method(presentError:modalForWindow:delegate:didPresentSelector:contextInfo:)] + pub unsafe fn presentError_modalForWindow_delegate_didPresentSelector_contextInfo( + &self, + error: &NSError, + window: &NSWindow, + delegate: Option<&Object>, + didPresentSelector: Option, + contextInfo: *mut c_void, + ); + #[method(presentError:)] + pub unsafe fn presentError(&self, error: &NSError) -> bool; + #[method_id(willPresentError:)] + pub unsafe fn willPresentError(&self, error: &NSError) -> Id; + } +); +extern_methods!( + #[doc = "NSTextFinderSupport"] + unsafe impl NSResponder { + #[method(performTextFinderAction:)] + pub unsafe fn performTextFinderAction(&self, sender: Option<&Object>); + } +); +extern_methods!( + #[doc = "NSWindowTabbing"] + unsafe impl NSResponder { + #[method(newWindowForTab:)] + pub unsafe fn newWindowForTab(&self, sender: Option<&Object>); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSResponder { + #[method(performMnemonic:)] + pub unsafe fn performMnemonic(&self, string: &NSString) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs new file mode 100644 index 000000000..c3235968f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs @@ -0,0 +1,26 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSGestureRecognizer::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSRotationGestureRecognizer; + unsafe impl ClassType for NSRotationGestureRecognizer { + type Super = NSGestureRecognizer; + } +); +extern_methods!( + unsafe impl NSRotationGestureRecognizer { + #[method(rotation)] + pub unsafe fn rotation(&self) -> CGFloat; + #[method(setRotation:)] + pub unsafe fn setRotation(&self, rotation: CGFloat); + #[method(rotationInDegrees)] + pub unsafe fn rotationInDegrees(&self) -> CGFloat; + #[method(setRotationInDegrees:)] + pub unsafe fn setRotationInDegrees(&self, rotationInDegrees: CGFloat); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs new file mode 100644 index 000000000..ee210d614 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -0,0 +1,137 @@ +use super::__exported::NSIndexSet; +use super::__exported::NSPredicate; +use super::__exported::NSString; +use super::__exported::NSView; +use super::__exported::NSViewAnimation; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSRuleEditorPredicatePartKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSRuleEditor; + unsafe impl ClassType for NSRuleEditor { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSRuleEditor { + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSRuleEditorDelegate>); + #[method_id(formattingStringsFilename)] + pub unsafe fn formattingStringsFilename(&self) -> Option>; + #[method(setFormattingStringsFilename:)] + pub unsafe fn setFormattingStringsFilename( + &self, + formattingStringsFilename: Option<&NSString>, + ); + #[method_id(formattingDictionary)] + pub unsafe fn formattingDictionary( + &self, + ) -> Option, Shared>>; + #[method(setFormattingDictionary:)] + pub unsafe fn setFormattingDictionary( + &self, + formattingDictionary: Option<&NSDictionary>, + ); + #[method(reloadCriteria)] + pub unsafe fn reloadCriteria(&self); + #[method(nestingMode)] + pub unsafe fn nestingMode(&self) -> NSRuleEditorNestingMode; + #[method(setNestingMode:)] + pub unsafe fn setNestingMode(&self, nestingMode: NSRuleEditorNestingMode); + #[method(rowHeight)] + pub unsafe fn rowHeight(&self) -> CGFloat; + #[method(setRowHeight:)] + pub unsafe fn setRowHeight(&self, rowHeight: CGFloat); + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] + pub unsafe fn setEditable(&self, editable: bool); + #[method(canRemoveAllRows)] + pub unsafe fn canRemoveAllRows(&self) -> bool; + #[method(setCanRemoveAllRows:)] + pub unsafe fn setCanRemoveAllRows(&self, canRemoveAllRows: bool); + #[method_id(predicate)] + pub unsafe fn predicate(&self) -> Option>; + #[method(reloadPredicate)] + pub unsafe fn reloadPredicate(&self); + #[method_id(predicateForRow:)] + pub unsafe fn predicateForRow(&self, row: NSInteger) -> Option>; + #[method(numberOfRows)] + pub unsafe fn numberOfRows(&self) -> NSInteger; + #[method_id(subrowIndexesForRow:)] + pub unsafe fn subrowIndexesForRow(&self, rowIndex: NSInteger) -> Id; + #[method_id(criteriaForRow:)] + pub unsafe fn criteriaForRow(&self, row: NSInteger) -> Id; + #[method_id(displayValuesForRow:)] + pub unsafe fn displayValuesForRow(&self, row: NSInteger) -> Id; + #[method(rowForDisplayValue:)] + pub unsafe fn rowForDisplayValue(&self, displayValue: &Object) -> NSInteger; + #[method(rowTypeForRow:)] + pub unsafe fn rowTypeForRow(&self, rowIndex: NSInteger) -> NSRuleEditorRowType; + #[method(parentRowForRow:)] + pub unsafe fn parentRowForRow(&self, rowIndex: NSInteger) -> NSInteger; + #[method(addRow:)] + pub unsafe fn addRow(&self, sender: Option<&Object>); + #[method(insertRowAtIndex:withType:asSubrowOfRow:animate:)] + pub unsafe fn insertRowAtIndex_withType_asSubrowOfRow_animate( + &self, + rowIndex: NSInteger, + rowType: NSRuleEditorRowType, + parentRow: NSInteger, + shouldAnimate: bool, + ); + #[method(setCriteria:andDisplayValues:forRowAtIndex:)] + pub unsafe fn setCriteria_andDisplayValues_forRowAtIndex( + &self, + criteria: &NSArray, + values: &NSArray, + rowIndex: NSInteger, + ); + #[method(removeRowAtIndex:)] + pub unsafe fn removeRowAtIndex(&self, rowIndex: NSInteger); + #[method(removeRowsAtIndexes:includeSubrows:)] + pub unsafe fn removeRowsAtIndexes_includeSubrows( + &self, + rowIndexes: &NSIndexSet, + includeSubrows: bool, + ); + #[method_id(selectedRowIndexes)] + pub unsafe fn selectedRowIndexes(&self) -> Id; + #[method(selectRowIndexes:byExtendingSelection:)] + pub unsafe fn selectRowIndexes_byExtendingSelection( + &self, + indexes: &NSIndexSet, + extend: bool, + ); + #[method(rowClass)] + pub unsafe fn rowClass(&self) -> &Class; + #[method(setRowClass:)] + pub unsafe fn setRowClass(&self, rowClass: &Class); + #[method_id(rowTypeKeyPath)] + pub unsafe fn rowTypeKeyPath(&self) -> Id; + #[method(setRowTypeKeyPath:)] + pub unsafe fn setRowTypeKeyPath(&self, rowTypeKeyPath: &NSString); + #[method_id(subrowsKeyPath)] + pub unsafe fn subrowsKeyPath(&self) -> Id; + #[method(setSubrowsKeyPath:)] + pub unsafe fn setSubrowsKeyPath(&self, subrowsKeyPath: &NSString); + #[method_id(criteriaKeyPath)] + pub unsafe fn criteriaKeyPath(&self) -> Id; + #[method(setCriteriaKeyPath:)] + pub unsafe fn setCriteriaKeyPath(&self, criteriaKeyPath: &NSString); + #[method_id(displayValuesKeyPath)] + pub unsafe fn displayValuesKeyPath(&self) -> Id; + #[method(setDisplayValuesKeyPath:)] + pub unsafe fn setDisplayValuesKeyPath(&self, displayValuesKeyPath: &NSString); + } +); +pub type NSRuleEditorDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs new file mode 100644 index 000000000..56b74df1e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs @@ -0,0 +1,69 @@ +use super::__exported::NSEvent; +use super::__exported::NSImage; +use super::__exported::NSRulerView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSRulerMarker; + unsafe impl ClassType for NSRulerMarker { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSRulerMarker { + #[method_id(initWithRulerView:markerLocation:image:imageOrigin:)] + pub unsafe fn initWithRulerView_markerLocation_image_imageOrigin( + &self, + ruler: &NSRulerView, + location: CGFloat, + image: &NSImage, + imageOrigin: NSPoint, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(ruler)] + pub unsafe fn ruler(&self) -> Option>; + #[method(markerLocation)] + pub unsafe fn markerLocation(&self) -> CGFloat; + #[method(setMarkerLocation:)] + pub unsafe fn setMarkerLocation(&self, markerLocation: CGFloat); + #[method_id(image)] + pub unsafe fn image(&self) -> Id; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: &NSImage); + #[method(imageOrigin)] + pub unsafe fn imageOrigin(&self) -> NSPoint; + #[method(setImageOrigin:)] + pub unsafe fn setImageOrigin(&self, imageOrigin: NSPoint); + #[method(isMovable)] + pub unsafe fn isMovable(&self) -> bool; + #[method(setMovable:)] + pub unsafe fn setMovable(&self, movable: bool); + #[method(isRemovable)] + pub unsafe fn isRemovable(&self) -> bool; + #[method(setRemovable:)] + pub unsafe fn setRemovable(&self, removable: bool); + #[method(isDragging)] + pub unsafe fn isDragging(&self) -> bool; + #[method_id(representedObject)] + pub unsafe fn representedObject(&self) -> Option>; + #[method(setRepresentedObject:)] + pub unsafe fn setRepresentedObject(&self, representedObject: Option<&NSCopying>); + #[method(imageRectInRuler)] + pub unsafe fn imageRectInRuler(&self) -> NSRect; + #[method(thicknessRequiredInRuler)] + pub unsafe fn thicknessRequiredInRuler(&self) -> CGFloat; + #[method(drawRect:)] + pub unsafe fn drawRect(&self, rect: NSRect); + #[method(trackMouse:adding:)] + pub unsafe fn trackMouse_adding(&self, mouseDownEvent: &NSEvent, isAdding: bool) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs new file mode 100644 index 000000000..3e7664c55 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -0,0 +1,167 @@ +use super::__exported::NSRulerMarker; +use super::__exported::NSScrollView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSRulerViewUnitName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSRulerView; + unsafe impl ClassType for NSRulerView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSRulerView { + #[method(registerUnitWithName:abbreviation:unitToPointsConversionFactor:stepUpCycle:stepDownCycle:)] + pub unsafe fn registerUnitWithName_abbreviation_unitToPointsConversionFactor_stepUpCycle_stepDownCycle( + unitName: &NSRulerViewUnitName, + abbreviation: &NSString, + conversionFactor: CGFloat, + stepUpCycle: &NSArray, + stepDownCycle: &NSArray, + ); + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initWithScrollView:orientation:)] + pub unsafe fn initWithScrollView_orientation( + &self, + scrollView: Option<&NSScrollView>, + orientation: NSRulerOrientation, + ) -> Id; + #[method_id(scrollView)] + pub unsafe fn scrollView(&self) -> Option>; + #[method(setScrollView:)] + pub unsafe fn setScrollView(&self, scrollView: Option<&NSScrollView>); + #[method(orientation)] + pub unsafe fn orientation(&self) -> NSRulerOrientation; + #[method(setOrientation:)] + pub unsafe fn setOrientation(&self, orientation: NSRulerOrientation); + #[method(baselineLocation)] + pub unsafe fn baselineLocation(&self) -> CGFloat; + #[method(requiredThickness)] + pub unsafe fn requiredThickness(&self) -> CGFloat; + #[method(ruleThickness)] + pub unsafe fn ruleThickness(&self) -> CGFloat; + #[method(setRuleThickness:)] + pub unsafe fn setRuleThickness(&self, ruleThickness: CGFloat); + #[method(reservedThicknessForMarkers)] + pub unsafe fn reservedThicknessForMarkers(&self) -> CGFloat; + #[method(setReservedThicknessForMarkers:)] + pub unsafe fn setReservedThicknessForMarkers(&self, reservedThicknessForMarkers: CGFloat); + #[method(reservedThicknessForAccessoryView)] + pub unsafe fn reservedThicknessForAccessoryView(&self) -> CGFloat; + #[method(setReservedThicknessForAccessoryView:)] + pub unsafe fn setReservedThicknessForAccessoryView( + &self, + reservedThicknessForAccessoryView: CGFloat, + ); + #[method_id(measurementUnits)] + pub unsafe fn measurementUnits(&self) -> Id; + #[method(setMeasurementUnits:)] + pub unsafe fn setMeasurementUnits(&self, measurementUnits: &NSRulerViewUnitName); + #[method(originOffset)] + pub unsafe fn originOffset(&self) -> CGFloat; + #[method(setOriginOffset:)] + pub unsafe fn setOriginOffset(&self, originOffset: CGFloat); + #[method_id(clientView)] + pub unsafe fn clientView(&self) -> Option>; + #[method(setClientView:)] + pub unsafe fn setClientView(&self, clientView: Option<&NSView>); + #[method(addMarker:)] + pub unsafe fn addMarker(&self, marker: &NSRulerMarker); + #[method(removeMarker:)] + pub unsafe fn removeMarker(&self, marker: &NSRulerMarker); + #[method_id(markers)] + pub unsafe fn markers(&self) -> Option, Shared>>; + #[method(setMarkers:)] + pub unsafe fn setMarkers(&self, markers: Option<&NSArray>); + #[method(trackMarker:withMouseEvent:)] + pub unsafe fn trackMarker_withMouseEvent( + &self, + marker: &NSRulerMarker, + event: &NSEvent, + ) -> bool; + #[method_id(accessoryView)] + pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method(moveRulerlineFromLocation:toLocation:)] + pub unsafe fn moveRulerlineFromLocation_toLocation( + &self, + oldLocation: CGFloat, + newLocation: CGFloat, + ); + #[method(invalidateHashMarks)] + pub unsafe fn invalidateHashMarks(&self); + #[method(drawHashMarksAndLabelsInRect:)] + pub unsafe fn drawHashMarksAndLabelsInRect(&self, rect: NSRect); + #[method(drawMarkersInRect:)] + pub unsafe fn drawMarkersInRect(&self, rect: NSRect); + #[method(isFlipped)] + pub unsafe fn isFlipped(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSRulerMarkerClientViewDelegation"] + unsafe impl NSView { + #[method(rulerView:shouldMoveMarker:)] + pub unsafe fn rulerView_shouldMoveMarker( + &self, + ruler: &NSRulerView, + marker: &NSRulerMarker, + ) -> bool; + #[method(rulerView:willMoveMarker:toLocation:)] + pub unsafe fn rulerView_willMoveMarker_toLocation( + &self, + ruler: &NSRulerView, + marker: &NSRulerMarker, + location: CGFloat, + ) -> CGFloat; + #[method(rulerView:didMoveMarker:)] + pub unsafe fn rulerView_didMoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:shouldRemoveMarker:)] + pub unsafe fn rulerView_shouldRemoveMarker( + &self, + ruler: &NSRulerView, + marker: &NSRulerMarker, + ) -> bool; + #[method(rulerView:didRemoveMarker:)] + pub unsafe fn rulerView_didRemoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:shouldAddMarker:)] + pub unsafe fn rulerView_shouldAddMarker( + &self, + ruler: &NSRulerView, + marker: &NSRulerMarker, + ) -> bool; + #[method(rulerView:willAddMarker:atLocation:)] + pub unsafe fn rulerView_willAddMarker_atLocation( + &self, + ruler: &NSRulerView, + marker: &NSRulerMarker, + location: CGFloat, + ) -> CGFloat; + #[method(rulerView:didAddMarker:)] + pub unsafe fn rulerView_didAddMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:handleMouseDown:)] + pub unsafe fn rulerView_handleMouseDown(&self, ruler: &NSRulerView, event: &NSEvent); + #[method(rulerView:willSetClientView:)] + pub unsafe fn rulerView_willSetClientView(&self, ruler: &NSRulerView, newClient: &NSView); + #[method(rulerView:locationForPoint:)] + pub unsafe fn rulerView_locationForPoint( + &self, + ruler: &NSRulerView, + point: NSPoint, + ) -> CGFloat; + #[method(rulerView:pointForLocation:)] + pub unsafe fn rulerView_pointForLocation( + &self, + ruler: &NSRulerView, + point: CGFloat, + ) -> NSPoint; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs new file mode 100644 index 000000000..45efd2e3d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs @@ -0,0 +1,80 @@ +use super::__exported::NSDate; +use super::__exported::NSImage; +use super::__exported::NSLock; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSWorkspace::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSRunningApplication; + unsafe impl ClassType for NSRunningApplication { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSRunningApplication { + #[method(isTerminated)] + pub unsafe fn isTerminated(&self) -> bool; + #[method(isFinishedLaunching)] + pub unsafe fn isFinishedLaunching(&self) -> bool; + #[method(isHidden)] + pub unsafe fn isHidden(&self) -> bool; + #[method(isActive)] + pub unsafe fn isActive(&self) -> bool; + #[method(ownsMenuBar)] + pub unsafe fn ownsMenuBar(&self) -> bool; + #[method(activationPolicy)] + pub unsafe fn activationPolicy(&self) -> NSApplicationActivationPolicy; + #[method_id(localizedName)] + pub unsafe fn localizedName(&self) -> Option>; + #[method_id(bundleIdentifier)] + pub unsafe fn bundleIdentifier(&self) -> Option>; + #[method_id(bundleURL)] + pub unsafe fn bundleURL(&self) -> Option>; + #[method_id(executableURL)] + pub unsafe fn executableURL(&self) -> Option>; + #[method(processIdentifier)] + pub unsafe fn processIdentifier(&self) -> pid_t; + #[method_id(launchDate)] + pub unsafe fn launchDate(&self) -> Option>; + #[method_id(icon)] + pub unsafe fn icon(&self) -> Option>; + #[method(executableArchitecture)] + pub unsafe fn executableArchitecture(&self) -> NSInteger; + #[method(hide)] + pub unsafe fn hide(&self) -> bool; + #[method(unhide)] + pub unsafe fn unhide(&self) -> bool; + #[method(activateWithOptions:)] + pub unsafe fn activateWithOptions(&self, options: NSApplicationActivationOptions) -> bool; + #[method(terminate)] + pub unsafe fn terminate(&self) -> bool; + #[method(forceTerminate)] + pub unsafe fn forceTerminate(&self) -> bool; + #[method_id(runningApplicationsWithBundleIdentifier:)] + pub unsafe fn runningApplicationsWithBundleIdentifier( + bundleIdentifier: &NSString, + ) -> Id, Shared>; + #[method_id(runningApplicationWithProcessIdentifier:)] + pub unsafe fn runningApplicationWithProcessIdentifier( + pid: pid_t, + ) -> Option>; + #[method_id(currentApplication)] + pub unsafe fn currentApplication() -> Id; + #[method(terminateAutomaticallyTerminableApplications)] + pub unsafe fn terminateAutomaticallyTerminableApplications(); + } +); +extern_methods!( + #[doc = "NSWorkspaceRunningApplications"] + unsafe impl NSWorkspace { + #[method_id(runningApplications)] + pub unsafe fn runningApplications(&self) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs new file mode 100644 index 000000000..29a83f548 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -0,0 +1,178 @@ +use super::__exported::NSBox; +use super::__exported::NSControl; +use super::__exported::NSProgressIndicator; +use super::__exported::NSTextField; +use super::__exported::NSTextView; +use super::__exported::NSView; +use super::__exported::UTType; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSNibDeclarations::*; +use crate::AppKit::generated::NSPanel::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSavePanel; + unsafe impl ClassType for NSSavePanel { + type Super = NSPanel; + } +); +extern_methods!( + unsafe impl NSSavePanel { + #[method_id(savePanel)] + pub unsafe fn savePanel() -> Id; + #[method_id(URL)] + pub unsafe fn URL(&self) -> Option>; + #[method_id(directoryURL)] + pub unsafe fn directoryURL(&self) -> Option>; + #[method(setDirectoryURL:)] + pub unsafe fn setDirectoryURL(&self, directoryURL: Option<&NSURL>); + #[method_id(allowedContentTypes)] + pub unsafe fn allowedContentTypes(&self) -> Id, Shared>; + #[method(setAllowedContentTypes:)] + pub unsafe fn setAllowedContentTypes(&self, allowedContentTypes: &NSArray); + #[method(allowsOtherFileTypes)] + pub unsafe fn allowsOtherFileTypes(&self) -> bool; + #[method(setAllowsOtherFileTypes:)] + pub unsafe fn setAllowsOtherFileTypes(&self, allowsOtherFileTypes: bool); + #[method_id(accessoryView)] + pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSOpenSavePanelDelegate>); + #[method(isExpanded)] + pub unsafe fn isExpanded(&self) -> bool; + #[method(canCreateDirectories)] + pub unsafe fn canCreateDirectories(&self) -> bool; + #[method(setCanCreateDirectories:)] + pub unsafe fn setCanCreateDirectories(&self, canCreateDirectories: bool); + #[method(canSelectHiddenExtension)] + pub unsafe fn canSelectHiddenExtension(&self) -> bool; + #[method(setCanSelectHiddenExtension:)] + pub unsafe fn setCanSelectHiddenExtension(&self, canSelectHiddenExtension: bool); + #[method(isExtensionHidden)] + pub unsafe fn isExtensionHidden(&self) -> bool; + #[method(setExtensionHidden:)] + pub unsafe fn setExtensionHidden(&self, extensionHidden: bool); + #[method(treatsFilePackagesAsDirectories)] + pub unsafe fn treatsFilePackagesAsDirectories(&self) -> bool; + #[method(setTreatsFilePackagesAsDirectories:)] + pub unsafe fn setTreatsFilePackagesAsDirectories( + &self, + treatsFilePackagesAsDirectories: bool, + ); + #[method_id(prompt)] + pub unsafe fn prompt(&self) -> Id; + #[method(setPrompt:)] + pub unsafe fn setPrompt(&self, prompt: Option<&NSString>); + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(nameFieldLabel)] + pub unsafe fn nameFieldLabel(&self) -> Id; + #[method(setNameFieldLabel:)] + pub unsafe fn setNameFieldLabel(&self, nameFieldLabel: Option<&NSString>); + #[method_id(nameFieldStringValue)] + pub unsafe fn nameFieldStringValue(&self) -> Id; + #[method(setNameFieldStringValue:)] + pub unsafe fn setNameFieldStringValue(&self, nameFieldStringValue: &NSString); + #[method_id(message)] + pub unsafe fn message(&self) -> Id; + #[method(setMessage:)] + pub unsafe fn setMessage(&self, message: Option<&NSString>); + #[method(validateVisibleColumns)] + pub unsafe fn validateVisibleColumns(&self); + #[method(showsHiddenFiles)] + pub unsafe fn showsHiddenFiles(&self) -> bool; + #[method(setShowsHiddenFiles:)] + pub unsafe fn setShowsHiddenFiles(&self, showsHiddenFiles: bool); + #[method(showsTagField)] + pub unsafe fn showsTagField(&self) -> bool; + #[method(setShowsTagField:)] + pub unsafe fn setShowsTagField(&self, showsTagField: bool); + #[method_id(tagNames)] + pub unsafe fn tagNames(&self) -> Option, Shared>>; + #[method(setTagNames:)] + pub unsafe fn setTagNames(&self, tagNames: Option<&NSArray>); + #[method(ok:)] + pub unsafe fn ok(&self, sender: Option<&Object>); + #[method(cancel:)] + pub unsafe fn cancel(&self, sender: Option<&Object>); + #[method(beginSheetModalForWindow:completionHandler:)] + pub unsafe fn beginSheetModalForWindow_completionHandler( + &self, + window: &NSWindow, + handler: TodoBlock, + ); + #[method(beginWithCompletionHandler:)] + pub unsafe fn beginWithCompletionHandler(&self, handler: TodoBlock); + #[method(runModal)] + pub unsafe fn runModal(&self) -> NSModalResponse; + } +); +pub type NSOpenSavePanelDelegate = NSObject; +extern_methods!( + #[doc = "NSSavePanelDelegateDeprecated"] + unsafe impl NSObject { + #[method(panel:isValidFilename:)] + pub unsafe fn panel_isValidFilename(&self, sender: &Object, filename: &NSString) -> bool; + #[method(panel:directoryDidChange:)] + pub unsafe fn panel_directoryDidChange(&self, sender: &Object, path: &NSString); + #[method(panel:compareFilename:with:caseSensitive:)] + pub unsafe fn panel_compareFilename_with_caseSensitive( + &self, + sender: &Object, + name1: &NSString, + name2: &NSString, + caseSensitive: bool, + ) -> NSComparisonResult; + #[method(panel:shouldShowFilename:)] + pub unsafe fn panel_shouldShowFilename(&self, sender: &Object, filename: &NSString) + -> bool; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSSavePanel { + #[method_id(filename)] + pub unsafe fn filename(&self) -> Id; + #[method_id(directory)] + pub unsafe fn directory(&self) -> Id; + #[method(setDirectory:)] + pub unsafe fn setDirectory(&self, path: Option<&NSString>); + #[method_id(requiredFileType)] + pub unsafe fn requiredFileType(&self) -> Option>; + #[method(setRequiredFileType:)] + pub unsafe fn setRequiredFileType(&self, type_: Option<&NSString>); + #[method(beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:)] + pub unsafe fn beginSheetForDirectory_file_modalForWindow_modalDelegate_didEndSelector_contextInfo( + &self, + path: &NSString, + name: Option<&NSString>, + docWindow: Option<&NSWindow>, + delegate: Option<&Object>, + didEndSelector: Option, + contextInfo: *mut c_void, + ); + #[method(runModalForDirectory:file:)] + pub unsafe fn runModalForDirectory_file( + &self, + path: Option<&NSString>, + name: Option<&NSString>, + ) -> NSInteger; + #[method(selectText:)] + pub unsafe fn selectText(&self, sender: Option<&Object>); + #[method_id(allowedFileTypes)] + pub unsafe fn allowedFileTypes(&self) -> Option, Shared>>; + #[method(setAllowedFileTypes:)] + pub unsafe fn setAllowedFileTypes(&self, allowedFileTypes: Option<&NSArray>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSScreen.rs b/crates/icrate/src/generated/AppKit/NSScreen.rs new file mode 100644 index 000000000..dcde552a0 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSScreen.rs @@ -0,0 +1,99 @@ +use super::__exported::NSColorSpace; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSGraphics::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSScreen; + unsafe impl ClassType for NSScreen { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSScreen { + #[method_id(screens)] + pub unsafe fn screens() -> Id, Shared>; + #[method_id(mainScreen)] + pub unsafe fn mainScreen() -> Option>; + #[method_id(deepestScreen)] + pub unsafe fn deepestScreen() -> Option>; + #[method(screensHaveSeparateSpaces)] + pub unsafe fn screensHaveSeparateSpaces() -> bool; + #[method(depth)] + pub unsafe fn depth(&self) -> NSWindowDepth; + #[method(frame)] + pub unsafe fn frame(&self) -> NSRect; + #[method(visibleFrame)] + pub unsafe fn visibleFrame(&self) -> NSRect; + #[method_id(deviceDescription)] + pub unsafe fn deviceDescription( + &self, + ) -> Id, Shared>; + #[method_id(colorSpace)] + pub unsafe fn colorSpace(&self) -> Option>; + #[method(supportedWindowDepths)] + pub unsafe fn supportedWindowDepths(&self) -> NonNull; + #[method(canRepresentDisplayGamut:)] + pub unsafe fn canRepresentDisplayGamut(&self, displayGamut: NSDisplayGamut) -> bool; + #[method(convertRectToBacking:)] + pub unsafe fn convertRectToBacking(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromBacking:)] + pub unsafe fn convertRectFromBacking(&self, rect: NSRect) -> NSRect; + #[method(backingAlignedRect:options:)] + pub unsafe fn backingAlignedRect_options( + &self, + rect: NSRect, + options: NSAlignmentOptions, + ) -> NSRect; + #[method(backingScaleFactor)] + pub unsafe fn backingScaleFactor(&self) -> CGFloat; + #[method_id(localizedName)] + pub unsafe fn localizedName(&self) -> Id; + #[method(safeAreaInsets)] + pub unsafe fn safeAreaInsets(&self) -> NSEdgeInsets; + #[method(auxiliaryTopLeftArea)] + pub unsafe fn auxiliaryTopLeftArea(&self) -> NSRect; + #[method(auxiliaryTopRightArea)] + pub unsafe fn auxiliaryTopRightArea(&self) -> NSRect; + } +); +extern_methods!( + unsafe impl NSScreen { + #[method(maximumExtendedDynamicRangeColorComponentValue)] + pub unsafe fn maximumExtendedDynamicRangeColorComponentValue(&self) -> CGFloat; + #[method(maximumPotentialExtendedDynamicRangeColorComponentValue)] + pub unsafe fn maximumPotentialExtendedDynamicRangeColorComponentValue(&self) -> CGFloat; + #[method(maximumReferenceExtendedDynamicRangeColorComponentValue)] + pub unsafe fn maximumReferenceExtendedDynamicRangeColorComponentValue(&self) -> CGFloat; + } +); +extern_methods!( + unsafe impl NSScreen { + #[method(maximumFramesPerSecond)] + pub unsafe fn maximumFramesPerSecond(&self) -> NSInteger; + #[method(minimumRefreshInterval)] + pub unsafe fn minimumRefreshInterval(&self) -> NSTimeInterval; + #[method(maximumRefreshInterval)] + pub unsafe fn maximumRefreshInterval(&self) -> NSTimeInterval; + #[method(displayUpdateGranularity)] + pub unsafe fn displayUpdateGranularity(&self) -> NSTimeInterval; + #[method(lastDisplayUpdateTimestamp)] + pub unsafe fn lastDisplayUpdateTimestamp(&self) -> NSTimeInterval; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSScreen { + #[method(userSpaceScaleFactor)] + pub unsafe fn userSpaceScaleFactor(&self) -> CGFloat; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs new file mode 100644 index 000000000..9d87c1b7f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -0,0 +1,249 @@ +use super::__exported::NSClipView; +use super::__exported::NSColor; +use super::__exported::NSRulerView; +use super::__exported::NSScroller; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSScroller::*; +use crate::AppKit::generated::NSTextFinder::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::NSDate::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSScrollView; + unsafe impl ClassType for NSScrollView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSScrollView { + #[method_id(initWithFrame:)] + pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:)] + pub unsafe fn frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle( + cSize: NSSize, + horizontalScrollerClass: Option<&Class>, + verticalScrollerClass: Option<&Class>, + type_: NSBorderType, + controlSize: NSControlSize, + scrollerStyle: NSScrollerStyle, + ) -> NSSize; + #[method(contentSizeForFrameSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:)] + pub unsafe fn contentSizeForFrameSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle( + fSize: NSSize, + horizontalScrollerClass: Option<&Class>, + verticalScrollerClass: Option<&Class>, + type_: NSBorderType, + controlSize: NSControlSize, + scrollerStyle: NSScrollerStyle, + ) -> NSSize; + #[method(frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:)] + pub unsafe fn frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType( + cSize: NSSize, + hFlag: bool, + vFlag: bool, + type_: NSBorderType, + ) -> NSSize; + #[method(contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:)] + pub unsafe fn contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType( + fSize: NSSize, + hFlag: bool, + vFlag: bool, + type_: NSBorderType, + ) -> NSSize; + #[method(documentVisibleRect)] + pub unsafe fn documentVisibleRect(&self) -> NSRect; + #[method(contentSize)] + pub unsafe fn contentSize(&self) -> NSSize; + #[method_id(documentView)] + pub unsafe fn documentView(&self) -> Option>; + #[method(setDocumentView:)] + pub unsafe fn setDocumentView(&self, documentView: Option<&NSView>); + #[method_id(contentView)] + pub unsafe fn contentView(&self) -> Id; + #[method(setContentView:)] + pub unsafe fn setContentView(&self, contentView: &NSClipView); + #[method_id(documentCursor)] + pub unsafe fn documentCursor(&self) -> Option>; + #[method(setDocumentCursor:)] + pub unsafe fn setDocumentCursor(&self, documentCursor: Option<&NSCursor>); + #[method(borderType)] + pub unsafe fn borderType(&self) -> NSBorderType; + #[method(setBorderType:)] + pub unsafe fn setBorderType(&self, borderType: NSBorderType); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(drawsBackground)] + pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] + pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method(hasVerticalScroller)] + pub unsafe fn hasVerticalScroller(&self) -> bool; + #[method(setHasVerticalScroller:)] + pub unsafe fn setHasVerticalScroller(&self, hasVerticalScroller: bool); + #[method(hasHorizontalScroller)] + pub unsafe fn hasHorizontalScroller(&self) -> bool; + #[method(setHasHorizontalScroller:)] + pub unsafe fn setHasHorizontalScroller(&self, hasHorizontalScroller: bool); + #[method_id(verticalScroller)] + pub unsafe fn verticalScroller(&self) -> Option>; + #[method(setVerticalScroller:)] + pub unsafe fn setVerticalScroller(&self, verticalScroller: Option<&NSScroller>); + #[method_id(horizontalScroller)] + pub unsafe fn horizontalScroller(&self) -> Option>; + #[method(setHorizontalScroller:)] + pub unsafe fn setHorizontalScroller(&self, horizontalScroller: Option<&NSScroller>); + #[method(autohidesScrollers)] + pub unsafe fn autohidesScrollers(&self) -> bool; + #[method(setAutohidesScrollers:)] + pub unsafe fn setAutohidesScrollers(&self, autohidesScrollers: bool); + #[method(horizontalLineScroll)] + pub unsafe fn horizontalLineScroll(&self) -> CGFloat; + #[method(setHorizontalLineScroll:)] + pub unsafe fn setHorizontalLineScroll(&self, horizontalLineScroll: CGFloat); + #[method(verticalLineScroll)] + pub unsafe fn verticalLineScroll(&self) -> CGFloat; + #[method(setVerticalLineScroll:)] + pub unsafe fn setVerticalLineScroll(&self, verticalLineScroll: CGFloat); + #[method(lineScroll)] + pub unsafe fn lineScroll(&self) -> CGFloat; + #[method(setLineScroll:)] + pub unsafe fn setLineScroll(&self, lineScroll: CGFloat); + #[method(horizontalPageScroll)] + pub unsafe fn horizontalPageScroll(&self) -> CGFloat; + #[method(setHorizontalPageScroll:)] + pub unsafe fn setHorizontalPageScroll(&self, horizontalPageScroll: CGFloat); + #[method(verticalPageScroll)] + pub unsafe fn verticalPageScroll(&self) -> CGFloat; + #[method(setVerticalPageScroll:)] + pub unsafe fn setVerticalPageScroll(&self, verticalPageScroll: CGFloat); + #[method(pageScroll)] + pub unsafe fn pageScroll(&self) -> CGFloat; + #[method(setPageScroll:)] + pub unsafe fn setPageScroll(&self, pageScroll: CGFloat); + #[method(scrollsDynamically)] + pub unsafe fn scrollsDynamically(&self) -> bool; + #[method(setScrollsDynamically:)] + pub unsafe fn setScrollsDynamically(&self, scrollsDynamically: bool); + #[method(tile)] + pub unsafe fn tile(&self); + #[method(reflectScrolledClipView:)] + pub unsafe fn reflectScrolledClipView(&self, cView: &NSClipView); + #[method(scrollWheel:)] + pub unsafe fn scrollWheel(&self, event: &NSEvent); + #[method(scrollerStyle)] + pub unsafe fn scrollerStyle(&self) -> NSScrollerStyle; + #[method(setScrollerStyle:)] + pub unsafe fn setScrollerStyle(&self, scrollerStyle: NSScrollerStyle); + #[method(scrollerKnobStyle)] + pub unsafe fn scrollerKnobStyle(&self) -> NSScrollerKnobStyle; + #[method(setScrollerKnobStyle:)] + pub unsafe fn setScrollerKnobStyle(&self, scrollerKnobStyle: NSScrollerKnobStyle); + #[method(flashScrollers)] + pub unsafe fn flashScrollers(&self); + #[method(horizontalScrollElasticity)] + pub unsafe fn horizontalScrollElasticity(&self) -> NSScrollElasticity; + #[method(setHorizontalScrollElasticity:)] + pub unsafe fn setHorizontalScrollElasticity( + &self, + horizontalScrollElasticity: NSScrollElasticity, + ); + #[method(verticalScrollElasticity)] + pub unsafe fn verticalScrollElasticity(&self) -> NSScrollElasticity; + #[method(setVerticalScrollElasticity:)] + pub unsafe fn setVerticalScrollElasticity( + &self, + verticalScrollElasticity: NSScrollElasticity, + ); + #[method(usesPredominantAxisScrolling)] + pub unsafe fn usesPredominantAxisScrolling(&self) -> bool; + #[method(setUsesPredominantAxisScrolling:)] + pub unsafe fn setUsesPredominantAxisScrolling(&self, usesPredominantAxisScrolling: bool); + #[method(allowsMagnification)] + pub unsafe fn allowsMagnification(&self) -> bool; + #[method(setAllowsMagnification:)] + pub unsafe fn setAllowsMagnification(&self, allowsMagnification: bool); + #[method(magnification)] + pub unsafe fn magnification(&self) -> CGFloat; + #[method(setMagnification:)] + pub unsafe fn setMagnification(&self, magnification: CGFloat); + #[method(maxMagnification)] + pub unsafe fn maxMagnification(&self) -> CGFloat; + #[method(setMaxMagnification:)] + pub unsafe fn setMaxMagnification(&self, maxMagnification: CGFloat); + #[method(minMagnification)] + pub unsafe fn minMagnification(&self) -> CGFloat; + #[method(setMinMagnification:)] + pub unsafe fn setMinMagnification(&self, minMagnification: CGFloat); + #[method(magnifyToFitRect:)] + pub unsafe fn magnifyToFitRect(&self, rect: NSRect); + #[method(setMagnification:centeredAtPoint:)] + pub unsafe fn setMagnification_centeredAtPoint( + &self, + magnification: CGFloat, + point: NSPoint, + ); + #[method(addFloatingSubview:forAxis:)] + pub unsafe fn addFloatingSubview_forAxis(&self, view: &NSView, axis: NSEventGestureAxis); + #[method(automaticallyAdjustsContentInsets)] + pub unsafe fn automaticallyAdjustsContentInsets(&self) -> bool; + #[method(setAutomaticallyAdjustsContentInsets:)] + pub unsafe fn setAutomaticallyAdjustsContentInsets( + &self, + automaticallyAdjustsContentInsets: bool, + ); + #[method(contentInsets)] + pub unsafe fn contentInsets(&self) -> NSEdgeInsets; + #[method(setContentInsets:)] + pub unsafe fn setContentInsets(&self, contentInsets: NSEdgeInsets); + #[method(scrollerInsets)] + pub unsafe fn scrollerInsets(&self) -> NSEdgeInsets; + #[method(setScrollerInsets:)] + pub unsafe fn setScrollerInsets(&self, scrollerInsets: NSEdgeInsets); + } +); +extern_methods!( + #[doc = "NSRulerSupport"] + unsafe impl NSScrollView { + #[method(rulerViewClass)] + pub unsafe fn rulerViewClass() -> Option<&Class>; + #[method(setRulerViewClass:)] + pub unsafe fn setRulerViewClass(rulerViewClass: Option<&Class>); + #[method(rulersVisible)] + pub unsafe fn rulersVisible(&self) -> bool; + #[method(setRulersVisible:)] + pub unsafe fn setRulersVisible(&self, rulersVisible: bool); + #[method(hasHorizontalRuler)] + pub unsafe fn hasHorizontalRuler(&self) -> bool; + #[method(setHasHorizontalRuler:)] + pub unsafe fn setHasHorizontalRuler(&self, hasHorizontalRuler: bool); + #[method(hasVerticalRuler)] + pub unsafe fn hasVerticalRuler(&self) -> bool; + #[method(setHasVerticalRuler:)] + pub unsafe fn setHasVerticalRuler(&self, hasVerticalRuler: bool); + #[method_id(horizontalRulerView)] + pub unsafe fn horizontalRulerView(&self) -> Option>; + #[method(setHorizontalRulerView:)] + pub unsafe fn setHorizontalRulerView(&self, horizontalRulerView: Option<&NSRulerView>); + #[method_id(verticalRulerView)] + pub unsafe fn verticalRulerView(&self) -> Option>; + #[method(setVerticalRulerView:)] + pub unsafe fn setVerticalRulerView(&self, verticalRulerView: Option<&NSRulerView>); + } +); +extern_methods!( + #[doc = "NSFindBarSupport"] + unsafe impl NSScrollView { + #[method(findBarPosition)] + pub unsafe fn findBarPosition(&self) -> NSScrollViewFindBarPosition; + #[method(setFindBarPosition:)] + pub unsafe fn setFindBarPosition(&self, findBarPosition: NSScrollViewFindBarPosition); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSScroller.rs b/crates/icrate/src/generated/AppKit/NSScroller.rs new file mode 100644 index 000000000..0418df56c --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSScroller.rs @@ -0,0 +1,86 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSControl::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSScroller; + unsafe impl ClassType for NSScroller { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSScroller { + #[method(isCompatibleWithOverlayScrollers)] + pub unsafe fn isCompatibleWithOverlayScrollers() -> bool; + #[method(scrollerWidthForControlSize:scrollerStyle:)] + pub unsafe fn scrollerWidthForControlSize_scrollerStyle( + controlSize: NSControlSize, + scrollerStyle: NSScrollerStyle, + ) -> CGFloat; + #[method(preferredScrollerStyle)] + pub unsafe fn preferredScrollerStyle() -> NSScrollerStyle; + #[method(scrollerStyle)] + pub unsafe fn scrollerStyle(&self) -> NSScrollerStyle; + #[method(setScrollerStyle:)] + pub unsafe fn setScrollerStyle(&self, scrollerStyle: NSScrollerStyle); + #[method(knobStyle)] + pub unsafe fn knobStyle(&self) -> NSScrollerKnobStyle; + #[method(setKnobStyle:)] + pub unsafe fn setKnobStyle(&self, knobStyle: NSScrollerKnobStyle); + #[method(rectForPart:)] + pub unsafe fn rectForPart(&self, partCode: NSScrollerPart) -> NSRect; + #[method(checkSpaceForParts)] + pub unsafe fn checkSpaceForParts(&self); + #[method(usableParts)] + pub unsafe fn usableParts(&self) -> NSUsableScrollerParts; + #[method(controlSize)] + pub unsafe fn controlSize(&self) -> NSControlSize; + #[method(setControlSize:)] + pub unsafe fn setControlSize(&self, controlSize: NSControlSize); + #[method(drawKnob)] + pub unsafe fn drawKnob(&self); + #[method(drawKnobSlotInRect:highlight:)] + pub unsafe fn drawKnobSlotInRect_highlight(&self, slotRect: NSRect, flag: bool); + #[method(testPart:)] + pub unsafe fn testPart(&self, point: NSPoint) -> NSScrollerPart; + #[method(trackKnob:)] + pub unsafe fn trackKnob(&self, event: &NSEvent); + #[method(hitPart)] + pub unsafe fn hitPart(&self) -> NSScrollerPart; + #[method(knobProportion)] + pub unsafe fn knobProportion(&self) -> CGFloat; + #[method(setKnobProportion:)] + pub unsafe fn setKnobProportion(&self, knobProportion: CGFloat); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSScroller { + #[method(scrollerWidthForControlSize:)] + pub unsafe fn scrollerWidthForControlSize(controlSize: NSControlSize) -> CGFloat; + #[method(scrollerWidth)] + pub unsafe fn scrollerWidth() -> CGFloat; + #[method(setFloatValue:knobProportion:)] + pub unsafe fn setFloatValue_knobProportion(&self, value: c_float, proportion: CGFloat); + #[method(arrowsPosition)] + pub unsafe fn arrowsPosition(&self) -> NSScrollArrowPosition; + #[method(setArrowsPosition:)] + pub unsafe fn setArrowsPosition(&self, arrowsPosition: NSScrollArrowPosition); + #[method(controlTint)] + pub unsafe fn controlTint(&self) -> NSControlTint; + #[method(setControlTint:)] + pub unsafe fn setControlTint(&self, controlTint: NSControlTint); + #[method(highlight:)] + pub unsafe fn highlight(&self, flag: bool); + #[method(trackScrollButtons:)] + pub unsafe fn trackScrollButtons(&self, event: &NSEvent); + #[method(drawParts)] + pub unsafe fn drawParts(&self); + #[method(drawArrow:highlight:)] + pub unsafe fn drawArrow_highlight(&self, whichArrow: NSScrollerArrow, flag: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs new file mode 100644 index 000000000..4718d83d8 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -0,0 +1,163 @@ +use super::__exported::NSButton; +use super::__exported::NSNib; +use super::__exported::NSPanGestureRecognizer; +use super::__exported::NSPressGestureRecognizer; +use super::__exported::NSScrubberItemView; +use super::__exported::NSScrubberLayout; +use super::__exported::NSScrubberSelectionView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSScrubberDataSource = NSObject; +pub type NSScrubberDelegate = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSScrubberSelectionStyle; + unsafe impl ClassType for NSScrubberSelectionStyle { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSScrubberSelectionStyle { + #[method_id(outlineOverlayStyle)] + pub unsafe fn outlineOverlayStyle() -> Id; + #[method_id(roundedBackgroundStyle)] + pub unsafe fn roundedBackgroundStyle() -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(makeSelectionView)] + pub unsafe fn makeSelectionView(&self) -> Option>; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSScrubber; + unsafe impl ClassType for NSScrubber { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSScrubber { + #[method_id(dataSource)] + pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] + pub unsafe fn setDataSource(&self, dataSource: Option<&NSScrubberDataSource>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSScrubberDelegate>); + #[method_id(scrubberLayout)] + pub unsafe fn scrubberLayout(&self) -> Id; + #[method(setScrubberLayout:)] + pub unsafe fn setScrubberLayout(&self, scrubberLayout: &NSScrubberLayout); + #[method(numberOfItems)] + pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(highlightedIndex)] + pub unsafe fn highlightedIndex(&self) -> NSInteger; + #[method(selectedIndex)] + pub unsafe fn selectedIndex(&self) -> NSInteger; + #[method(setSelectedIndex:)] + pub unsafe fn setSelectedIndex(&self, selectedIndex: NSInteger); + #[method(mode)] + pub unsafe fn mode(&self) -> NSScrubberMode; + #[method(setMode:)] + pub unsafe fn setMode(&self, mode: NSScrubberMode); + #[method(itemAlignment)] + pub unsafe fn itemAlignment(&self) -> NSScrubberAlignment; + #[method(setItemAlignment:)] + pub unsafe fn setItemAlignment(&self, itemAlignment: NSScrubberAlignment); + #[method(isContinuous)] + pub unsafe fn isContinuous(&self) -> bool; + #[method(setContinuous:)] + pub unsafe fn setContinuous(&self, continuous: bool); + #[method(floatsSelectionViews)] + pub unsafe fn floatsSelectionViews(&self) -> bool; + #[method(setFloatsSelectionViews:)] + pub unsafe fn setFloatsSelectionViews(&self, floatsSelectionViews: bool); + #[method_id(selectionBackgroundStyle)] + pub unsafe fn selectionBackgroundStyle( + &self, + ) -> Option>; + #[method(setSelectionBackgroundStyle:)] + pub unsafe fn setSelectionBackgroundStyle( + &self, + selectionBackgroundStyle: Option<&NSScrubberSelectionStyle>, + ); + #[method_id(selectionOverlayStyle)] + pub unsafe fn selectionOverlayStyle(&self) -> Option>; + #[method(setSelectionOverlayStyle:)] + pub unsafe fn setSelectionOverlayStyle( + &self, + selectionOverlayStyle: Option<&NSScrubberSelectionStyle>, + ); + #[method(showsArrowButtons)] + pub unsafe fn showsArrowButtons(&self) -> bool; + #[method(setShowsArrowButtons:)] + pub unsafe fn setShowsArrowButtons(&self, showsArrowButtons: bool); + #[method(showsAdditionalContentIndicators)] + pub unsafe fn showsAdditionalContentIndicators(&self) -> bool; + #[method(setShowsAdditionalContentIndicators:)] + pub unsafe fn setShowsAdditionalContentIndicators( + &self, + showsAdditionalContentIndicators: bool, + ); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method_id(backgroundView)] + pub unsafe fn backgroundView(&self) -> Option>; + #[method(setBackgroundView:)] + pub unsafe fn setBackgroundView(&self, backgroundView: Option<&NSView>); + #[method_id(initWithFrame:)] + pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(reloadData)] + pub unsafe fn reloadData(&self); + #[method(performSequentialBatchUpdates:)] + pub unsafe fn performSequentialBatchUpdates(&self, updateBlock: TodoBlock); + #[method(insertItemsAtIndexes:)] + pub unsafe fn insertItemsAtIndexes(&self, indexes: &NSIndexSet); + #[method(removeItemsAtIndexes:)] + pub unsafe fn removeItemsAtIndexes(&self, indexes: &NSIndexSet); + #[method(reloadItemsAtIndexes:)] + pub unsafe fn reloadItemsAtIndexes(&self, indexes: &NSIndexSet); + #[method(moveItemAtIndex:toIndex:)] + pub unsafe fn moveItemAtIndex_toIndex(&self, oldIndex: NSInteger, newIndex: NSInteger); + #[method(scrollItemAtIndex:toAlignment:)] + pub unsafe fn scrollItemAtIndex_toAlignment( + &self, + index: NSInteger, + alignment: NSScrubberAlignment, + ); + #[method_id(itemViewForItemAtIndex:)] + pub unsafe fn itemViewForItemAtIndex( + &self, + index: NSInteger, + ) -> Option>; + #[method(registerClass:forItemIdentifier:)] + pub unsafe fn registerClass_forItemIdentifier( + &self, + itemViewClass: Option<&Class>, + itemIdentifier: &NSUserInterfaceItemIdentifier, + ); + #[method(registerNib:forItemIdentifier:)] + pub unsafe fn registerNib_forItemIdentifier( + &self, + nib: Option<&NSNib>, + itemIdentifier: &NSUserInterfaceItemIdentifier, + ); + #[method_id(makeItemWithIdentifier:owner:)] + pub unsafe fn makeItemWithIdentifier_owner( + &self, + itemIdentifier: &NSUserInterfaceItemIdentifier, + owner: Option<&Object>, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs new file mode 100644 index 000000000..ced537831 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs @@ -0,0 +1,90 @@ +use super::__exported::NSImageView; +use super::__exported::NSScrubberLayoutAttributes; +use super::__exported::NSTextField; +use crate::os::generated::lock::*; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSImageCell::*; +use crate::AppKit::generated::NSView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSScrubberArrangedView; + unsafe impl ClassType for NSScrubberArrangedView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSScrubberArrangedView { + #[method(isSelected)] + pub unsafe fn isSelected(&self) -> bool; + #[method(setSelected:)] + pub unsafe fn setSelected(&self, selected: bool); + #[method(isHighlighted)] + pub unsafe fn isHighlighted(&self) -> bool; + #[method(setHighlighted:)] + pub unsafe fn setHighlighted(&self, highlighted: bool); + #[method(applyLayoutAttributes:)] + pub unsafe fn applyLayoutAttributes(&self, layoutAttributes: &NSScrubberLayoutAttributes); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSScrubberSelectionView; + unsafe impl ClassType for NSScrubberSelectionView { + type Super = NSScrubberArrangedView; + } +); +extern_methods!( + unsafe impl NSScrubberSelectionView {} +); +extern_class!( + #[derive(Debug)] + pub struct NSScrubberItemView; + unsafe impl ClassType for NSScrubberItemView { + type Super = NSScrubberArrangedView; + } +); +extern_methods!( + unsafe impl NSScrubberItemView {} +); +extern_class!( + #[derive(Debug)] + pub struct NSScrubberTextItemView; + unsafe impl ClassType for NSScrubberTextItemView { + type Super = NSScrubberItemView; + } +); +extern_methods!( + unsafe impl NSScrubberTextItemView { + #[method_id(textField)] + pub unsafe fn textField(&self) -> Id; + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSScrubberImageItemView; + unsafe impl ClassType for NSScrubberImageItemView { + type Super = NSScrubberItemView; + } +); +extern_methods!( + unsafe impl NSScrubberImageItemView { + #[method_id(imageView)] + pub unsafe fn imageView(&self) -> Id; + #[method_id(image)] + pub unsafe fn image(&self) -> Id; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: &NSImage); + #[method(imageAlignment)] + pub unsafe fn imageAlignment(&self) -> NSImageAlignment; + #[method(setImageAlignment:)] + pub unsafe fn setImageAlignment(&self, imageAlignment: NSImageAlignment); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs new file mode 100644 index 000000000..9bb1beb10 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs @@ -0,0 +1,127 @@ +use super::__exported::NSIndexSet; +use super::__exported::NSScrubber; +use super::__exported::NSScrubberDelegate; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSGeometry::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSScrubberLayoutAttributes; + unsafe impl ClassType for NSScrubberLayoutAttributes { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSScrubberLayoutAttributes { + #[method(itemIndex)] + pub unsafe fn itemIndex(&self) -> NSInteger; + #[method(setItemIndex:)] + pub unsafe fn setItemIndex(&self, itemIndex: NSInteger); + #[method(frame)] + pub unsafe fn frame(&self) -> NSRect; + #[method(setFrame:)] + pub unsafe fn setFrame(&self, frame: NSRect); + #[method(alpha)] + pub unsafe fn alpha(&self) -> CGFloat; + #[method(setAlpha:)] + pub unsafe fn setAlpha(&self, alpha: CGFloat); + #[method_id(layoutAttributesForItemAtIndex:)] + pub unsafe fn layoutAttributesForItemAtIndex(index: NSInteger) -> Id; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSScrubberLayout; + unsafe impl ClassType for NSScrubberLayout { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSScrubberLayout { + #[method(layoutAttributesClass)] + pub unsafe fn layoutAttributesClass() -> &Class; + #[method_id(scrubber)] + pub unsafe fn scrubber(&self) -> Option>; + #[method(visibleRect)] + pub unsafe fn visibleRect(&self) -> NSRect; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(invalidateLayout)] + pub unsafe fn invalidateLayout(&self); + #[method(prepareLayout)] + pub unsafe fn prepareLayout(&self); + #[method(scrubberContentSize)] + pub unsafe fn scrubberContentSize(&self) -> NSSize; + #[method_id(layoutAttributesForItemAtIndex:)] + pub unsafe fn layoutAttributesForItemAtIndex( + &self, + index: NSInteger, + ) -> Option>; + #[method_id(layoutAttributesForItemsInRect:)] + pub unsafe fn layoutAttributesForItemsInRect( + &self, + rect: NSRect, + ) -> Id, Shared>; + #[method(shouldInvalidateLayoutForSelectionChange)] + pub unsafe fn shouldInvalidateLayoutForSelectionChange(&self) -> bool; + #[method(shouldInvalidateLayoutForHighlightChange)] + pub unsafe fn shouldInvalidateLayoutForHighlightChange(&self) -> bool; + #[method(shouldInvalidateLayoutForChangeFromVisibleRect:toVisibleRect:)] + pub unsafe fn shouldInvalidateLayoutForChangeFromVisibleRect_toVisibleRect( + &self, + fromVisibleRect: NSRect, + toVisibleRect: NSRect, + ) -> bool; + #[method(automaticallyMirrorsInRightToLeftLayout)] + pub unsafe fn automaticallyMirrorsInRightToLeftLayout(&self) -> bool; + } +); +pub type NSScrubberFlowLayoutDelegate = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSScrubberFlowLayout; + unsafe impl ClassType for NSScrubberFlowLayout { + type Super = NSScrubberLayout; + } +); +extern_methods!( + unsafe impl NSScrubberFlowLayout { + #[method(itemSpacing)] + pub unsafe fn itemSpacing(&self) -> CGFloat; + #[method(setItemSpacing:)] + pub unsafe fn setItemSpacing(&self, itemSpacing: CGFloat); + #[method(itemSize)] + pub unsafe fn itemSize(&self) -> NSSize; + #[method(setItemSize:)] + pub unsafe fn setItemSize(&self, itemSize: NSSize); + #[method(invalidateLayoutForItemsAtIndexes:)] + pub unsafe fn invalidateLayoutForItemsAtIndexes(&self, invalidItemIndexes: &NSIndexSet); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSScrubberProportionalLayout; + unsafe impl ClassType for NSScrubberProportionalLayout { + type Super = NSScrubberLayout; + } +); +extern_methods!( + unsafe impl NSScrubberProportionalLayout { + #[method(numberOfVisibleItems)] + pub unsafe fn numberOfVisibleItems(&self) -> NSInteger; + #[method(setNumberOfVisibleItems:)] + pub unsafe fn setNumberOfVisibleItems(&self, numberOfVisibleItems: NSInteger); + #[method_id(initWithNumberOfVisibleItems:)] + pub unsafe fn initWithNumberOfVisibleItems( + &self, + numberOfVisibleItems: NSInteger, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSearchField.rs b/crates/icrate/src/generated/AppKit/NSSearchField.rs new file mode 100644 index 000000000..47734191e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSearchField.rs @@ -0,0 +1,74 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextField::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSSearchFieldRecentsAutosaveName = NSString; +pub type NSSearchFieldDelegate = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSSearchField; + unsafe impl ClassType for NSSearchField { + type Super = NSTextField; + } +); +extern_methods!( + unsafe impl NSSearchField { + #[method(searchTextBounds)] + pub unsafe fn searchTextBounds(&self) -> NSRect; + #[method(searchButtonBounds)] + pub unsafe fn searchButtonBounds(&self) -> NSRect; + #[method(cancelButtonBounds)] + pub unsafe fn cancelButtonBounds(&self) -> NSRect; + #[method_id(recentSearches)] + pub unsafe fn recentSearches(&self) -> Id, Shared>; + #[method(setRecentSearches:)] + pub unsafe fn setRecentSearches(&self, recentSearches: &NSArray); + #[method_id(recentsAutosaveName)] + pub unsafe fn recentsAutosaveName( + &self, + ) -> Option>; + #[method(setRecentsAutosaveName:)] + pub unsafe fn setRecentsAutosaveName( + &self, + recentsAutosaveName: Option<&NSSearchFieldRecentsAutosaveName>, + ); + #[method_id(searchMenuTemplate)] + pub unsafe fn searchMenuTemplate(&self) -> Option>; + #[method(setSearchMenuTemplate:)] + pub unsafe fn setSearchMenuTemplate(&self, searchMenuTemplate: Option<&NSMenu>); + #[method(sendsWholeSearchString)] + pub unsafe fn sendsWholeSearchString(&self) -> bool; + #[method(setSendsWholeSearchString:)] + pub unsafe fn setSendsWholeSearchString(&self, sendsWholeSearchString: bool); + #[method(maximumRecents)] + pub unsafe fn maximumRecents(&self) -> NSInteger; + #[method(setMaximumRecents:)] + pub unsafe fn setMaximumRecents(&self, maximumRecents: NSInteger); + #[method(sendsSearchStringImmediately)] + pub unsafe fn sendsSearchStringImmediately(&self) -> bool; + #[method(setSendsSearchStringImmediately:)] + pub unsafe fn setSendsSearchStringImmediately(&self, sendsSearchStringImmediately: bool); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSSearchFieldDelegate>); + } +); +extern_methods!( + #[doc = "NSSearchField_Deprecated"] + unsafe impl NSSearchField { + #[method(rectForSearchTextWhenCentered:)] + pub unsafe fn rectForSearchTextWhenCentered(&self, isCentered: bool) -> NSRect; + #[method(rectForSearchButtonWhenCentered:)] + pub unsafe fn rectForSearchButtonWhenCentered(&self, isCentered: bool) -> NSRect; + #[method(rectForCancelButtonWhenCentered:)] + pub unsafe fn rectForCancelButtonWhenCentered(&self, isCentered: bool) -> NSRect; + #[method(centersPlaceholder)] + pub unsafe fn centersPlaceholder(&self) -> bool; + #[method(setCentersPlaceholder:)] + pub unsafe fn setCentersPlaceholder(&self, centersPlaceholder: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs new file mode 100644 index 000000000..b79eaffcc --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs @@ -0,0 +1,77 @@ +use super::__exported::NSButtonCell; +use super::__exported::NSImage; +use super::__exported::NSMenu; +use super::__exported::NSMutableArray; +use super::__exported::NSTimer; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSSearchField::*; +use crate::AppKit::generated::NSTextFieldCell::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSearchFieldCell; + unsafe impl ClassType for NSSearchFieldCell { + type Super = NSTextFieldCell; + } +); +extern_methods!( + unsafe impl NSSearchFieldCell { + #[method_id(initTextCell:)] + pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initImageCell:)] + pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method_id(searchButtonCell)] + pub unsafe fn searchButtonCell(&self) -> Option>; + #[method(setSearchButtonCell:)] + pub unsafe fn setSearchButtonCell(&self, searchButtonCell: Option<&NSButtonCell>); + #[method_id(cancelButtonCell)] + pub unsafe fn cancelButtonCell(&self) -> Option>; + #[method(setCancelButtonCell:)] + pub unsafe fn setCancelButtonCell(&self, cancelButtonCell: Option<&NSButtonCell>); + #[method(resetSearchButtonCell)] + pub unsafe fn resetSearchButtonCell(&self); + #[method(resetCancelButtonCell)] + pub unsafe fn resetCancelButtonCell(&self); + #[method(searchTextRectForBounds:)] + pub unsafe fn searchTextRectForBounds(&self, rect: NSRect) -> NSRect; + #[method(searchButtonRectForBounds:)] + pub unsafe fn searchButtonRectForBounds(&self, rect: NSRect) -> NSRect; + #[method(cancelButtonRectForBounds:)] + pub unsafe fn cancelButtonRectForBounds(&self, rect: NSRect) -> NSRect; + #[method_id(searchMenuTemplate)] + pub unsafe fn searchMenuTemplate(&self) -> Option>; + #[method(setSearchMenuTemplate:)] + pub unsafe fn setSearchMenuTemplate(&self, searchMenuTemplate: Option<&NSMenu>); + #[method(sendsWholeSearchString)] + pub unsafe fn sendsWholeSearchString(&self) -> bool; + #[method(setSendsWholeSearchString:)] + pub unsafe fn setSendsWholeSearchString(&self, sendsWholeSearchString: bool); + #[method(maximumRecents)] + pub unsafe fn maximumRecents(&self) -> NSInteger; + #[method(setMaximumRecents:)] + pub unsafe fn setMaximumRecents(&self, maximumRecents: NSInteger); + #[method_id(recentSearches)] + pub unsafe fn recentSearches(&self) -> Id, Shared>; + #[method(setRecentSearches:)] + pub unsafe fn setRecentSearches(&self, recentSearches: Option<&NSArray>); + #[method_id(recentsAutosaveName)] + pub unsafe fn recentsAutosaveName( + &self, + ) -> Option>; + #[method(setRecentsAutosaveName:)] + pub unsafe fn setRecentsAutosaveName( + &self, + recentsAutosaveName: Option<&NSSearchFieldRecentsAutosaveName>, + ); + #[method(sendsSearchStringImmediately)] + pub unsafe fn sendsSearchStringImmediately(&self) -> bool; + #[method(setSendsSearchStringImmediately:)] + pub unsafe fn setSendsSearchStringImmediately(&self, sendsSearchStringImmediately: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs new file mode 100644 index 000000000..d99c148a6 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs @@ -0,0 +1,42 @@ +use super::__exported::NSSearchField; +use super::__exported::NSView; +use crate::AppKit::generated::NSToolbarItem::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSearchToolbarItem; + unsafe impl ClassType for NSSearchToolbarItem { + type Super = NSToolbarItem; + } +); +extern_methods!( + unsafe impl NSSearchToolbarItem { + #[method_id(searchField)] + pub unsafe fn searchField(&self) -> Id; + #[method(setSearchField:)] + pub unsafe fn setSearchField(&self, searchField: &NSSearchField); + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method(setView:)] + pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(resignsFirstResponderWithCancel)] + pub unsafe fn resignsFirstResponderWithCancel(&self) -> bool; + #[method(setResignsFirstResponderWithCancel:)] + pub unsafe fn setResignsFirstResponderWithCancel( + &self, + resignsFirstResponderWithCancel: bool, + ); + #[method(preferredWidthForSearchField)] + pub unsafe fn preferredWidthForSearchField(&self) -> CGFloat; + #[method(setPreferredWidthForSearchField:)] + pub unsafe fn setPreferredWidthForSearchField(&self, preferredWidthForSearchField: CGFloat); + #[method(beginSearchInteraction)] + pub unsafe fn beginSearchInteraction(&self); + #[method(endSearchInteraction)] + pub unsafe fn endSearchInteraction(&self); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSecureTextField.rs b/crates/icrate/src/generated/AppKit/NSSecureTextField.rs new file mode 100644 index 000000000..a5943fc86 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSecureTextField.rs @@ -0,0 +1,32 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextField::*; +use crate::AppKit::generated::NSTextFieldCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSecureTextField; + unsafe impl ClassType for NSSecureTextField { + type Super = NSTextField; + } +); +extern_methods!( + unsafe impl NSSecureTextField {} +); +extern_class!( + #[derive(Debug)] + pub struct NSSecureTextFieldCell; + unsafe impl ClassType for NSSecureTextFieldCell { + type Super = NSTextFieldCell; + } +); +extern_methods!( + unsafe impl NSSecureTextFieldCell { + #[method(echosBullets)] + pub unsafe fn echosBullets(&self) -> bool; + #[method(setEchosBullets:)] + pub unsafe fn setEchosBullets(&self, echosBullets: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs new file mode 100644 index 000000000..e7961938b --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs @@ -0,0 +1,99 @@ +use super::__exported::NSMutableArray; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSActionCell::*; +use crate::AppKit::generated::NSSegmentedControl::*; +use crate::Foundation::generated::NSGeometry::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSegmentedCell; + unsafe impl ClassType for NSSegmentedCell { + type Super = NSActionCell; + } +); +extern_methods!( + unsafe impl NSSegmentedCell { + #[method(segmentCount)] + pub unsafe fn segmentCount(&self) -> NSInteger; + #[method(setSegmentCount:)] + pub unsafe fn setSegmentCount(&self, segmentCount: NSInteger); + #[method(selectedSegment)] + pub unsafe fn selectedSegment(&self) -> NSInteger; + #[method(setSelectedSegment:)] + pub unsafe fn setSelectedSegment(&self, selectedSegment: NSInteger); + #[method(selectSegmentWithTag:)] + pub unsafe fn selectSegmentWithTag(&self, tag: NSInteger) -> bool; + #[method(makeNextSegmentKey)] + pub unsafe fn makeNextSegmentKey(&self); + #[method(makePreviousSegmentKey)] + pub unsafe fn makePreviousSegmentKey(&self); + #[method(trackingMode)] + pub unsafe fn trackingMode(&self) -> NSSegmentSwitchTracking; + #[method(setTrackingMode:)] + pub unsafe fn setTrackingMode(&self, trackingMode: NSSegmentSwitchTracking); + #[method(setWidth:forSegment:)] + pub unsafe fn setWidth_forSegment(&self, width: CGFloat, segment: NSInteger); + #[method(widthForSegment:)] + pub unsafe fn widthForSegment(&self, segment: NSInteger) -> CGFloat; + #[method(setImage:forSegment:)] + pub unsafe fn setImage_forSegment(&self, image: Option<&NSImage>, segment: NSInteger); + #[method_id(imageForSegment:)] + pub unsafe fn imageForSegment(&self, segment: NSInteger) -> Option>; + #[method(setImageScaling:forSegment:)] + pub unsafe fn setImageScaling_forSegment( + &self, + scaling: NSImageScaling, + segment: NSInteger, + ); + #[method(imageScalingForSegment:)] + pub unsafe fn imageScalingForSegment(&self, segment: NSInteger) -> NSImageScaling; + #[method(setLabel:forSegment:)] + pub unsafe fn setLabel_forSegment(&self, label: &NSString, segment: NSInteger); + #[method_id(labelForSegment:)] + pub unsafe fn labelForSegment(&self, segment: NSInteger) -> Option>; + #[method(setSelected:forSegment:)] + pub unsafe fn setSelected_forSegment(&self, selected: bool, segment: NSInteger); + #[method(isSelectedForSegment:)] + pub unsafe fn isSelectedForSegment(&self, segment: NSInteger) -> bool; + #[method(setEnabled:forSegment:)] + pub unsafe fn setEnabled_forSegment(&self, enabled: bool, segment: NSInteger); + #[method(isEnabledForSegment:)] + pub unsafe fn isEnabledForSegment(&self, segment: NSInteger) -> bool; + #[method(setMenu:forSegment:)] + pub unsafe fn setMenu_forSegment(&self, menu: Option<&NSMenu>, segment: NSInteger); + #[method_id(menuForSegment:)] + pub unsafe fn menuForSegment(&self, segment: NSInteger) -> Option>; + #[method(setToolTip:forSegment:)] + pub unsafe fn setToolTip_forSegment(&self, toolTip: Option<&NSString>, segment: NSInteger); + #[method_id(toolTipForSegment:)] + pub unsafe fn toolTipForSegment(&self, segment: NSInteger) -> Option>; + #[method(setTag:forSegment:)] + pub unsafe fn setTag_forSegment(&self, tag: NSInteger, segment: NSInteger); + #[method(tagForSegment:)] + pub unsafe fn tagForSegment(&self, segment: NSInteger) -> NSInteger; + #[method(segmentStyle)] + pub unsafe fn segmentStyle(&self) -> NSSegmentStyle; + #[method(setSegmentStyle:)] + pub unsafe fn setSegmentStyle(&self, segmentStyle: NSSegmentStyle); + #[method(drawSegment:inFrame:withView:)] + pub unsafe fn drawSegment_inFrame_withView( + &self, + segment: NSInteger, + frame: NSRect, + controlView: &NSView, + ); + } +); +extern_methods!( + #[doc = "NSSegmentBackgroundStyle"] + unsafe impl NSSegmentedCell { + #[method(interiorBackgroundStyleForSegment:)] + pub unsafe fn interiorBackgroundStyleForSegment( + &self, + segment: NSInteger, + ) -> NSBackgroundStyle; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs new file mode 100644 index 000000000..5af688503 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs @@ -0,0 +1,146 @@ +use super::__exported::NSImage; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSUserInterfaceCompression::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSegmentedControl; + unsafe impl ClassType for NSSegmentedControl { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSSegmentedControl { + #[method(segmentCount)] + pub unsafe fn segmentCount(&self) -> NSInteger; + #[method(setSegmentCount:)] + pub unsafe fn setSegmentCount(&self, segmentCount: NSInteger); + #[method(selectedSegment)] + pub unsafe fn selectedSegment(&self) -> NSInteger; + #[method(setSelectedSegment:)] + pub unsafe fn setSelectedSegment(&self, selectedSegment: NSInteger); + #[method(selectSegmentWithTag:)] + pub unsafe fn selectSegmentWithTag(&self, tag: NSInteger) -> bool; + #[method(setWidth:forSegment:)] + pub unsafe fn setWidth_forSegment(&self, width: CGFloat, segment: NSInteger); + #[method(widthForSegment:)] + pub unsafe fn widthForSegment(&self, segment: NSInteger) -> CGFloat; + #[method(setImage:forSegment:)] + pub unsafe fn setImage_forSegment(&self, image: Option<&NSImage>, segment: NSInteger); + #[method_id(imageForSegment:)] + pub unsafe fn imageForSegment(&self, segment: NSInteger) -> Option>; + #[method(setImageScaling:forSegment:)] + pub unsafe fn setImageScaling_forSegment( + &self, + scaling: NSImageScaling, + segment: NSInteger, + ); + #[method(imageScalingForSegment:)] + pub unsafe fn imageScalingForSegment(&self, segment: NSInteger) -> NSImageScaling; + #[method(setLabel:forSegment:)] + pub unsafe fn setLabel_forSegment(&self, label: &NSString, segment: NSInteger); + #[method_id(labelForSegment:)] + pub unsafe fn labelForSegment(&self, segment: NSInteger) -> Option>; + #[method(setMenu:forSegment:)] + pub unsafe fn setMenu_forSegment(&self, menu: Option<&NSMenu>, segment: NSInteger); + #[method_id(menuForSegment:)] + pub unsafe fn menuForSegment(&self, segment: NSInteger) -> Option>; + #[method(setSelected:forSegment:)] + pub unsafe fn setSelected_forSegment(&self, selected: bool, segment: NSInteger); + #[method(isSelectedForSegment:)] + pub unsafe fn isSelectedForSegment(&self, segment: NSInteger) -> bool; + #[method(setEnabled:forSegment:)] + pub unsafe fn setEnabled_forSegment(&self, enabled: bool, segment: NSInteger); + #[method(isEnabledForSegment:)] + pub unsafe fn isEnabledForSegment(&self, segment: NSInteger) -> bool; + #[method(setToolTip:forSegment:)] + pub unsafe fn setToolTip_forSegment(&self, toolTip: Option<&NSString>, segment: NSInteger); + #[method_id(toolTipForSegment:)] + pub unsafe fn toolTipForSegment(&self, segment: NSInteger) -> Option>; + #[method(setTag:forSegment:)] + pub unsafe fn setTag_forSegment(&self, tag: NSInteger, segment: NSInteger); + #[method(tagForSegment:)] + pub unsafe fn tagForSegment(&self, segment: NSInteger) -> NSInteger; + #[method(setShowsMenuIndicator:forSegment:)] + pub unsafe fn setShowsMenuIndicator_forSegment( + &self, + showsMenuIndicator: bool, + segment: NSInteger, + ); + #[method(showsMenuIndicatorForSegment:)] + pub unsafe fn showsMenuIndicatorForSegment(&self, segment: NSInteger) -> bool; + #[method(segmentStyle)] + pub unsafe fn segmentStyle(&self) -> NSSegmentStyle; + #[method(setSegmentStyle:)] + pub unsafe fn setSegmentStyle(&self, segmentStyle: NSSegmentStyle); + #[method(isSpringLoaded)] + pub unsafe fn isSpringLoaded(&self) -> bool; + #[method(setSpringLoaded:)] + pub unsafe fn setSpringLoaded(&self, springLoaded: bool); + #[method(trackingMode)] + pub unsafe fn trackingMode(&self) -> NSSegmentSwitchTracking; + #[method(setTrackingMode:)] + pub unsafe fn setTrackingMode(&self, trackingMode: NSSegmentSwitchTracking); + #[method(doubleValueForSelectedSegment)] + pub unsafe fn doubleValueForSelectedSegment(&self) -> c_double; + #[method_id(selectedSegmentBezelColor)] + pub unsafe fn selectedSegmentBezelColor(&self) -> Option>; + #[method(setSelectedSegmentBezelColor:)] + pub unsafe fn setSelectedSegmentBezelColor( + &self, + selectedSegmentBezelColor: Option<&NSColor>, + ); + #[method(indexOfSelectedItem)] + pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(setAlignment:forSegment:)] + pub unsafe fn setAlignment_forSegment( + &self, + alignment: NSTextAlignment, + segment: NSInteger, + ); + #[method(alignmentForSegment:)] + pub unsafe fn alignmentForSegment(&self, segment: NSInteger) -> NSTextAlignment; + #[method(segmentDistribution)] + pub unsafe fn segmentDistribution(&self) -> NSSegmentDistribution; + #[method(setSegmentDistribution:)] + pub unsafe fn setSegmentDistribution(&self, segmentDistribution: NSSegmentDistribution); + #[method(compressWithPrioritizedCompressionOptions:)] + pub unsafe fn compressWithPrioritizedCompressionOptions( + &self, + prioritizedOptions: &NSArray, + ); + #[method(minimumSizeWithPrioritizedCompressionOptions:)] + pub unsafe fn minimumSizeWithPrioritizedCompressionOptions( + &self, + prioritizedOptions: &NSArray, + ) -> NSSize; + #[method_id(activeCompressionOptions)] + pub unsafe fn activeCompressionOptions( + &self, + ) -> Id; + } +); +extern_methods!( + #[doc = "NSSegmentedControlConvenience"] + unsafe impl NSSegmentedControl { + #[method_id(segmentedControlWithLabels:trackingMode:target:action:)] + pub unsafe fn segmentedControlWithLabels_trackingMode_target_action( + labels: &NSArray, + trackingMode: NSSegmentSwitchTracking, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(segmentedControlWithImages:trackingMode:target:action:)] + pub unsafe fn segmentedControlWithImages_trackingMode_target_action( + images: &NSArray, + trackingMode: NSSegmentSwitchTracking, + target: Option<&Object>, + action: Option, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSShadow.rs b/crates/icrate/src/generated/AppKit/NSShadow.rs new file mode 100644 index 000000000..2dab41c3a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSShadow.rs @@ -0,0 +1,35 @@ +use super::__exported::NSColor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSShadow; + unsafe impl ClassType for NSShadow { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSShadow { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method(shadowOffset)] + pub unsafe fn shadowOffset(&self) -> NSSize; + #[method(setShadowOffset:)] + pub unsafe fn setShadowOffset(&self, shadowOffset: NSSize); + #[method(shadowBlurRadius)] + pub unsafe fn shadowBlurRadius(&self) -> CGFloat; + #[method(setShadowBlurRadius:)] + pub unsafe fn setShadowBlurRadius(&self, shadowBlurRadius: CGFloat); + #[method_id(shadowColor)] + pub unsafe fn shadowColor(&self) -> Option>; + #[method(setShadowColor:)] + pub unsafe fn setShadowColor(&self, shadowColor: Option<&NSColor>); + #[method(set)] + pub unsafe fn set(&self); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs new file mode 100644 index 000000000..600f24472 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -0,0 +1,126 @@ +use super::__exported::CKContainer; +use super::__exported::CKShare; +use super::__exported::NSError; +use super::__exported::NSImage; +use super::__exported::NSString; +use super::__exported::NSView; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSItemProvider::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSSharingServiceName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSSharingService; + unsafe impl ClassType for NSSharingService { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSSharingService { + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSSharingServiceDelegate>); + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method_id(image)] + pub unsafe fn image(&self) -> Id; + #[method_id(alternateImage)] + pub unsafe fn alternateImage(&self) -> Option>; + #[method_id(menuItemTitle)] + pub unsafe fn menuItemTitle(&self) -> Id; + #[method(setMenuItemTitle:)] + pub unsafe fn setMenuItemTitle(&self, menuItemTitle: &NSString); + #[method_id(recipients)] + pub unsafe fn recipients(&self) -> Option, Shared>>; + #[method(setRecipients:)] + pub unsafe fn setRecipients(&self, recipients: Option<&NSArray>); + #[method_id(subject)] + pub unsafe fn subject(&self) -> Option>; + #[method(setSubject:)] + pub unsafe fn setSubject(&self, subject: Option<&NSString>); + #[method_id(messageBody)] + pub unsafe fn messageBody(&self) -> Option>; + #[method_id(permanentLink)] + pub unsafe fn permanentLink(&self) -> Option>; + #[method_id(accountName)] + pub unsafe fn accountName(&self) -> Option>; + #[method_id(attachmentFileURLs)] + pub unsafe fn attachmentFileURLs(&self) -> Option, Shared>>; + #[method_id(sharingServicesForItems:)] + pub unsafe fn sharingServicesForItems( + items: &NSArray, + ) -> Id, Shared>; + #[method_id(sharingServiceNamed:)] + pub unsafe fn sharingServiceNamed( + serviceName: &NSSharingServiceName, + ) -> Option>; + #[method_id(initWithTitle:image:alternateImage:handler:)] + pub unsafe fn initWithTitle_image_alternateImage_handler( + &self, + title: &NSString, + image: &NSImage, + alternateImage: Option<&NSImage>, + block: TodoBlock, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method(canPerformWithItems:)] + pub unsafe fn canPerformWithItems(&self, items: Option<&NSArray>) -> bool; + #[method(performWithItems:)] + pub unsafe fn performWithItems(&self, items: &NSArray); + } +); +pub type NSSharingServiceDelegate = NSObject; +pub type NSCloudSharingServiceDelegate = NSObject; +extern_methods!( + #[doc = "NSCloudKitSharing"] + unsafe impl NSItemProvider { + #[method(registerCloudKitShareWithPreparationHandler:)] + pub unsafe fn registerCloudKitShareWithPreparationHandler( + &self, + preparationHandler: TodoBlock, + ); + #[method(registerCloudKitShare:container:)] + pub unsafe fn registerCloudKitShare_container( + &self, + share: &CKShare, + container: &CKContainer, + ); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSSharingServicePicker; + unsafe impl ClassType for NSSharingServicePicker { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSSharingServicePicker { + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSSharingServicePickerDelegate>); + #[method_id(initWithItems:)] + pub unsafe fn initWithItems(&self, items: &NSArray) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method(showRelativeToRect:ofView:preferredEdge:)] + pub unsafe fn showRelativeToRect_ofView_preferredEdge( + &self, + rect: NSRect, + view: &NSView, + preferredEdge: NSRectEdge, + ); + } +); +pub type NSSharingServicePickerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs new file mode 100644 index 000000000..3eab5f098 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs @@ -0,0 +1,27 @@ +use crate::AppKit::generated::NSSharingService::*; +use crate::AppKit::generated::NSToolbarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSharingServicePickerToolbarItem; + unsafe impl ClassType for NSSharingServicePickerToolbarItem { + type Super = NSToolbarItem; + } +); +extern_methods!( + unsafe impl NSSharingServicePickerToolbarItem { + #[method_id(delegate)] + pub unsafe fn delegate( + &self, + ) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate( + &self, + delegate: Option<&NSSharingServicePickerToolbarItemDelegate>, + ); + } +); +pub type NSSharingServicePickerToolbarItemDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs new file mode 100644 index 000000000..ad2f6b626 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs @@ -0,0 +1,41 @@ +use super::__exported::NSImage; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSSharingService::*; +use crate::AppKit::generated::NSTouchBarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSharingServicePickerTouchBarItem; + unsafe impl ClassType for NSSharingServicePickerTouchBarItem { + type Super = NSTouchBarItem; + } +); +extern_methods!( + unsafe impl NSSharingServicePickerTouchBarItem { + #[method_id(delegate)] + pub unsafe fn delegate( + &self, + ) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate( + &self, + delegate: Option<&NSSharingServicePickerTouchBarItemDelegate>, + ); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method_id(buttonTitle)] + pub unsafe fn buttonTitle(&self) -> Id; + #[method(setButtonTitle:)] + pub unsafe fn setButtonTitle(&self, buttonTitle: &NSString); + #[method_id(buttonImage)] + pub unsafe fn buttonImage(&self) -> Option>; + #[method(setButtonImage:)] + pub unsafe fn setButtonImage(&self, buttonImage: Option<&NSImage>); + } +); +pub type NSSharingServicePickerTouchBarItemDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSlider.rs b/crates/icrate/src/generated/AppKit/NSSlider.rs new file mode 100644 index 000000000..85461fde0 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSlider.rs @@ -0,0 +1,123 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSSliderCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSlider; + unsafe impl ClassType for NSSlider { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSSlider { + #[method(sliderType)] + pub unsafe fn sliderType(&self) -> NSSliderType; + #[method(setSliderType:)] + pub unsafe fn setSliderType(&self, sliderType: NSSliderType); + #[method(minValue)] + pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] + pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] + pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] + pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(altIncrementValue)] + pub unsafe fn altIncrementValue(&self) -> c_double; + #[method(setAltIncrementValue:)] + pub unsafe fn setAltIncrementValue(&self, altIncrementValue: c_double); + #[method(knobThickness)] + pub unsafe fn knobThickness(&self) -> CGFloat; + #[method(acceptsFirstMouse:)] + pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool; + #[method(isVertical)] + pub unsafe fn isVertical(&self) -> bool; + #[method(setVertical:)] + pub unsafe fn setVertical(&self, vertical: bool); + #[method_id(trackFillColor)] + pub unsafe fn trackFillColor(&self) -> Option>; + #[method(setTrackFillColor:)] + pub unsafe fn setTrackFillColor(&self, trackFillColor: Option<&NSColor>); + } +); +extern_methods!( + #[doc = "NSSliderVerticalGetter"] + unsafe impl NSSlider { + #[method(isVertical)] + pub unsafe fn isVertical(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSTickMarkSupport"] + unsafe impl NSSlider { + #[method(numberOfTickMarks)] + pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[method(setNumberOfTickMarks:)] + pub unsafe fn setNumberOfTickMarks(&self, numberOfTickMarks: NSInteger); + #[method(tickMarkPosition)] + pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[method(setTickMarkPosition:)] + pub unsafe fn setTickMarkPosition(&self, tickMarkPosition: NSTickMarkPosition); + #[method(allowsTickMarkValuesOnly)] + pub unsafe fn allowsTickMarkValuesOnly(&self) -> bool; + #[method(setAllowsTickMarkValuesOnly:)] + pub unsafe fn setAllowsTickMarkValuesOnly(&self, allowsTickMarkValuesOnly: bool); + #[method(tickMarkValueAtIndex:)] + pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; + #[method(rectOfTickMarkAtIndex:)] + pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[method(indexOfTickMarkAtPoint:)] + pub unsafe fn indexOfTickMarkAtPoint(&self, point: NSPoint) -> NSInteger; + #[method(closestTickMarkValueToValue:)] + pub unsafe fn closestTickMarkValueToValue(&self, value: c_double) -> c_double; + } +); +extern_methods!( + #[doc = "NSSliderConvenience"] + unsafe impl NSSlider { + #[method_id(sliderWithTarget:action:)] + pub unsafe fn sliderWithTarget_action( + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(sliderWithValue:minValue:maxValue:target:action:)] + pub unsafe fn sliderWithValue_minValue_maxValue_target_action( + value: c_double, + minValue: c_double, + maxValue: c_double, + target: Option<&Object>, + action: Option, + ) -> Id; + } +); +extern_methods!( + #[doc = "NSSliderDeprecated"] + unsafe impl NSSlider { + #[method(setTitleCell:)] + pub unsafe fn setTitleCell(&self, cell: Option<&NSCell>); + #[method_id(titleCell)] + pub unsafe fn titleCell(&self) -> Option>; + #[method(setTitleColor:)] + pub unsafe fn setTitleColor(&self, newColor: Option<&NSColor>); + #[method_id(titleColor)] + pub unsafe fn titleColor(&self) -> Option>; + #[method(setTitleFont:)] + pub unsafe fn setTitleFont(&self, fontObj: Option<&NSFont>); + #[method_id(titleFont)] + pub unsafe fn titleFont(&self) -> Option>; + #[method_id(title)] + pub unsafe fn title(&self) -> Option>; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, string: Option<&NSString>); + #[method(setKnobThickness:)] + pub unsafe fn setKnobThickness(&self, thickness: CGFloat); + #[method(setImage:)] + pub unsafe fn setImage(&self, backgroundImage: Option<&NSImage>); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs new file mode 100644 index 000000000..fd83ed26d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs @@ -0,0 +1,60 @@ +use super::__exported::NSImage; +use super::__exported::NSSlider; +use crate::AppKit::generated::NSAccessibility::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSliderAccessory; + unsafe impl ClassType for NSSliderAccessory { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSSliderAccessory { + #[method_id(accessoryWithImage:)] + pub unsafe fn accessoryWithImage(image: &NSImage) -> Id; + #[method_id(behavior)] + pub unsafe fn behavior(&self) -> Id; + #[method(setBehavior:)] + pub unsafe fn setBehavior(&self, behavior: &NSSliderAccessoryBehavior); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + } +); +extern_methods!( + unsafe impl NSSliderAccessory {} +); +extern_class!( + #[derive(Debug)] + pub struct NSSliderAccessoryBehavior; + unsafe impl ClassType for NSSliderAccessoryBehavior { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSSliderAccessoryBehavior { + #[method_id(automaticBehavior)] + pub unsafe fn automaticBehavior() -> Id; + #[method_id(valueStepBehavior)] + pub unsafe fn valueStepBehavior() -> Id; + #[method_id(valueResetBehavior)] + pub unsafe fn valueResetBehavior() -> Id; + #[method_id(behaviorWithTarget:action:)] + pub unsafe fn behaviorWithTarget_action( + target: Option<&Object>, + action: Sel, + ) -> Id; + #[method_id(behaviorWithHandler:)] + pub unsafe fn behaviorWithHandler( + handler: TodoBlock, + ) -> Id; + #[method(handleAction:)] + pub unsafe fn handleAction(&self, sender: &NSSliderAccessory); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs new file mode 100644 index 000000000..0f8bc11ad --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -0,0 +1,114 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSActionCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSliderCell; + unsafe impl ClassType for NSSliderCell { + type Super = NSActionCell; + } +); +extern_methods!( + unsafe impl NSSliderCell { + #[method(prefersTrackingUntilMouseUp)] + pub unsafe fn prefersTrackingUntilMouseUp() -> bool; + #[method(minValue)] + pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] + pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] + pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] + pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(altIncrementValue)] + pub unsafe fn altIncrementValue(&self) -> c_double; + #[method(setAltIncrementValue:)] + pub unsafe fn setAltIncrementValue(&self, altIncrementValue: c_double); + #[method(sliderType)] + pub unsafe fn sliderType(&self) -> NSSliderType; + #[method(setSliderType:)] + pub unsafe fn setSliderType(&self, sliderType: NSSliderType); + #[method(isVertical)] + pub unsafe fn isVertical(&self) -> bool; + #[method(setVertical:)] + pub unsafe fn setVertical(&self, vertical: bool); + #[method(trackRect)] + pub unsafe fn trackRect(&self) -> NSRect; + #[method(knobThickness)] + pub unsafe fn knobThickness(&self) -> CGFloat; + #[method(knobRectFlipped:)] + pub unsafe fn knobRectFlipped(&self, flipped: bool) -> NSRect; + #[method(barRectFlipped:)] + pub unsafe fn barRectFlipped(&self, flipped: bool) -> NSRect; + #[method(drawKnob:)] + pub unsafe fn drawKnob(&self, knobRect: NSRect); + #[method(drawKnob)] + pub unsafe fn drawKnob(&self); + #[method(drawBarInside:flipped:)] + pub unsafe fn drawBarInside_flipped(&self, rect: NSRect, flipped: bool); + } +); +extern_methods!( + #[doc = "NSSliderCellVerticalGetter"] + unsafe impl NSSliderCell { + #[method(isVertical)] + pub unsafe fn isVertical(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSTickMarkSupport"] + unsafe impl NSSliderCell { + #[method(numberOfTickMarks)] + pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[method(setNumberOfTickMarks:)] + pub unsafe fn setNumberOfTickMarks(&self, numberOfTickMarks: NSInteger); + #[method(tickMarkPosition)] + pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[method(setTickMarkPosition:)] + pub unsafe fn setTickMarkPosition(&self, tickMarkPosition: NSTickMarkPosition); + #[method(allowsTickMarkValuesOnly)] + pub unsafe fn allowsTickMarkValuesOnly(&self) -> bool; + #[method(setAllowsTickMarkValuesOnly:)] + pub unsafe fn setAllowsTickMarkValuesOnly(&self, allowsTickMarkValuesOnly: bool); + #[method(tickMarkValueAtIndex:)] + pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; + #[method(rectOfTickMarkAtIndex:)] + pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[method(indexOfTickMarkAtPoint:)] + pub unsafe fn indexOfTickMarkAtPoint(&self, point: NSPoint) -> NSInteger; + #[method(closestTickMarkValueToValue:)] + pub unsafe fn closestTickMarkValueToValue(&self, value: c_double) -> c_double; + #[method(drawTickMarks)] + pub unsafe fn drawTickMarks(&self); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSSliderCell { + #[method(setTitleCell:)] + pub unsafe fn setTitleCell(&self, cell: Option<&NSCell>); + #[method_id(titleCell)] + pub unsafe fn titleCell(&self) -> Option>; + #[method(setTitleColor:)] + pub unsafe fn setTitleColor(&self, newColor: Option<&NSColor>); + #[method_id(titleColor)] + pub unsafe fn titleColor(&self) -> Option>; + #[method(setTitleFont:)] + pub unsafe fn setTitleFont(&self, fontObj: Option<&NSFont>); + #[method_id(titleFont)] + pub unsafe fn titleFont(&self) -> Option>; + #[method_id(title)] + pub unsafe fn title(&self) -> Option>; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, string: Option<&NSString>); + #[method(setKnobThickness:)] + pub unsafe fn setKnobThickness(&self, thickness: CGFloat); + #[method(setImage:)] + pub unsafe fn setImage(&self, backgroundImage: Option<&NSImage>); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs new file mode 100644 index 000000000..1eb8416d6 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs @@ -0,0 +1,72 @@ +use super::__exported::NSSlider; +use super::__exported::NSSliderAccessory; +use crate::AppKit::generated::NSTouchBarItem::*; +use crate::AppKit::generated::NSUserInterfaceCompression::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSSliderAccessoryWidth = CGFloat; +extern_class!( + #[derive(Debug)] + pub struct NSSliderTouchBarItem; + unsafe impl ClassType for NSSliderTouchBarItem { + type Super = NSTouchBarItem; + } +); +extern_methods!( + unsafe impl NSSliderTouchBarItem { + #[method_id(view)] + pub unsafe fn view(&self) -> Id; + #[method_id(slider)] + pub unsafe fn slider(&self) -> Id; + #[method(setSlider:)] + pub unsafe fn setSlider(&self, slider: &NSSlider); + #[method(doubleValue)] + pub unsafe fn doubleValue(&self) -> c_double; + #[method(setDoubleValue:)] + pub unsafe fn setDoubleValue(&self, doubleValue: c_double); + #[method(minimumSliderWidth)] + pub unsafe fn minimumSliderWidth(&self) -> CGFloat; + #[method(setMinimumSliderWidth:)] + pub unsafe fn setMinimumSliderWidth(&self, minimumSliderWidth: CGFloat); + #[method(maximumSliderWidth)] + pub unsafe fn maximumSliderWidth(&self) -> CGFloat; + #[method(setMaximumSliderWidth:)] + pub unsafe fn setMaximumSliderWidth(&self, maximumSliderWidth: CGFloat); + #[method_id(label)] + pub unsafe fn label(&self) -> Option>; + #[method(setLabel:)] + pub unsafe fn setLabel(&self, label: Option<&NSString>); + #[method_id(minimumValueAccessory)] + pub unsafe fn minimumValueAccessory(&self) -> Option>; + #[method(setMinimumValueAccessory:)] + pub unsafe fn setMinimumValueAccessory( + &self, + minimumValueAccessory: Option<&NSSliderAccessory>, + ); + #[method_id(maximumValueAccessory)] + pub unsafe fn maximumValueAccessory(&self) -> Option>; + #[method(setMaximumValueAccessory:)] + pub unsafe fn setMaximumValueAccessory( + &self, + maximumValueAccessory: Option<&NSSliderAccessory>, + ); + #[method(valueAccessoryWidth)] + pub unsafe fn valueAccessoryWidth(&self) -> NSSliderAccessoryWidth; + #[method(setValueAccessoryWidth:)] + pub unsafe fn setValueAccessoryWidth(&self, valueAccessoryWidth: NSSliderAccessoryWidth); + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method_id(customizationLabel)] + pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] + pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs new file mode 100644 index 000000000..8d5a899c4 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -0,0 +1,116 @@ +use super::__exported::NSData; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSBundle::*; +use crate::Foundation::generated::NSDate::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSSoundName = NSString; +pub type NSSoundPlaybackDeviceIdentifier = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSSound; + unsafe impl ClassType for NSSound { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSSound { + #[method_id(soundNamed:)] + pub unsafe fn soundNamed(name: &NSSoundName) -> Option>; + #[method_id(initWithContentsOfURL:byReference:)] + pub unsafe fn initWithContentsOfURL_byReference( + &self, + url: &NSURL, + byRef: bool, + ) -> Option>; + #[method_id(initWithContentsOfFile:byReference:)] + pub unsafe fn initWithContentsOfFile_byReference( + &self, + path: &NSString, + byRef: bool, + ) -> Option>; + #[method_id(initWithData:)] + pub unsafe fn initWithData(&self, data: &NSData) -> Option>; + #[method(setName:)] + pub unsafe fn setName(&self, string: Option<&NSSoundName>) -> bool; + #[method_id(name)] + pub unsafe fn name(&self) -> Option>; + #[method(canInitWithPasteboard:)] + pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; + #[method_id(soundUnfilteredTypes)] + pub unsafe fn soundUnfilteredTypes() -> Id, Shared>; + #[method_id(initWithPasteboard:)] + pub unsafe fn initWithPasteboard( + &self, + pasteboard: &NSPasteboard, + ) -> Option>; + #[method(writeToPasteboard:)] + pub unsafe fn writeToPasteboard(&self, pasteboard: &NSPasteboard); + #[method(play)] + pub unsafe fn play(&self) -> bool; + #[method(pause)] + pub unsafe fn pause(&self) -> bool; + #[method(resume)] + pub unsafe fn resume(&self) -> bool; + #[method(stop)] + pub unsafe fn stop(&self) -> bool; + #[method(isPlaying)] + pub unsafe fn isPlaying(&self) -> bool; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSSoundDelegate>); + #[method(duration)] + pub unsafe fn duration(&self) -> NSTimeInterval; + #[method(volume)] + pub unsafe fn volume(&self) -> c_float; + #[method(setVolume:)] + pub unsafe fn setVolume(&self, volume: c_float); + #[method(currentTime)] + pub unsafe fn currentTime(&self) -> NSTimeInterval; + #[method(setCurrentTime:)] + pub unsafe fn setCurrentTime(&self, currentTime: NSTimeInterval); + #[method(loops)] + pub unsafe fn loops(&self) -> bool; + #[method(setLoops:)] + pub unsafe fn setLoops(&self, loops: bool); + #[method_id(playbackDeviceIdentifier)] + pub unsafe fn playbackDeviceIdentifier( + &self, + ) -> Option>; + #[method(setPlaybackDeviceIdentifier:)] + pub unsafe fn setPlaybackDeviceIdentifier( + &self, + playbackDeviceIdentifier: Option<&NSSoundPlaybackDeviceIdentifier>, + ); + #[method(setChannelMapping:)] + pub unsafe fn setChannelMapping(&self, channelMapping: Option<&NSArray>); + #[method_id(channelMapping)] + pub unsafe fn channelMapping(&self) -> Option>; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSSound { + #[method_id(soundUnfilteredFileTypes)] + pub unsafe fn soundUnfilteredFileTypes() -> Option>; + #[method_id(soundUnfilteredPasteboardTypes)] + pub unsafe fn soundUnfilteredPasteboardTypes() -> Option>; + } +); +pub type NSSoundDelegate = NSObject; +extern_methods!( + #[doc = "NSBundleSoundExtensions"] + unsafe impl NSBundle { + #[method_id(pathForSoundResource:)] + pub unsafe fn pathForSoundResource( + &self, + name: &NSSoundName, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs new file mode 100644 index 000000000..3b1183dac --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs @@ -0,0 +1,46 @@ +use super::__exported::NSString; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSpeechRecognizer; + unsafe impl ClassType for NSSpeechRecognizer { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSSpeechRecognizer { + #[method_id(init)] + pub unsafe fn init(&self) -> Option>; + #[method(startListening)] + pub unsafe fn startListening(&self); + #[method(stopListening)] + pub unsafe fn stopListening(&self); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSSpeechRecognizerDelegate>); + #[method_id(commands)] + pub unsafe fn commands(&self) -> Option, Shared>>; + #[method(setCommands:)] + pub unsafe fn setCommands(&self, commands: Option<&NSArray>); + #[method_id(displayedCommandsTitle)] + pub unsafe fn displayedCommandsTitle(&self) -> Option>; + #[method(setDisplayedCommandsTitle:)] + pub unsafe fn setDisplayedCommandsTitle(&self, displayedCommandsTitle: Option<&NSString>); + #[method(listensInForegroundOnly)] + pub unsafe fn listensInForegroundOnly(&self) -> bool; + #[method(setListensInForegroundOnly:)] + pub unsafe fn setListensInForegroundOnly(&self, listensInForegroundOnly: bool); + #[method(blocksOtherRecognizers)] + pub unsafe fn blocksOtherRecognizers(&self) -> bool; + #[method(setBlocksOtherRecognizers:)] + pub unsafe fn setBlocksOtherRecognizers(&self, blocksOtherRecognizers: bool); + } +); +pub type NSSpeechRecognizerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs new file mode 100644 index 000000000..c7349e93f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -0,0 +1,102 @@ +use super::__exported::NSError; +use super::__exported::NSString; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSSpeechSynthesizerVoiceName = NSString; +pub type NSVoiceAttributeKey = NSString; +pub type NSSpeechDictionaryKey = NSString; +pub type NSVoiceGenderName = NSString; +pub type NSSpeechPropertyKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSSpeechSynthesizer; + unsafe impl ClassType for NSSpeechSynthesizer { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSSpeechSynthesizer { + #[method_id(initWithVoice:)] + pub unsafe fn initWithVoice( + &self, + voice: Option<&NSSpeechSynthesizerVoiceName>, + ) -> Option>; + #[method(startSpeakingString:)] + pub unsafe fn startSpeakingString(&self, string: &NSString) -> bool; + #[method(startSpeakingString:toURL:)] + pub unsafe fn startSpeakingString_toURL(&self, string: &NSString, url: &NSURL) -> bool; + #[method(isSpeaking)] + pub unsafe fn isSpeaking(&self) -> bool; + #[method(stopSpeaking)] + pub unsafe fn stopSpeaking(&self); + #[method(stopSpeakingAtBoundary:)] + pub unsafe fn stopSpeakingAtBoundary(&self, boundary: NSSpeechBoundary); + #[method(pauseSpeakingAtBoundary:)] + pub unsafe fn pauseSpeakingAtBoundary(&self, boundary: NSSpeechBoundary); + #[method(continueSpeaking)] + pub unsafe fn continueSpeaking(&self); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSSpeechSynthesizerDelegate>); + #[method_id(voice)] + pub unsafe fn voice(&self) -> Option>; + #[method(setVoice:)] + pub unsafe fn setVoice(&self, voice: Option<&NSSpeechSynthesizerVoiceName>) -> bool; + #[method(rate)] + pub unsafe fn rate(&self) -> c_float; + #[method(setRate:)] + pub unsafe fn setRate(&self, rate: c_float); + #[method(volume)] + pub unsafe fn volume(&self) -> c_float; + #[method(setVolume:)] + pub unsafe fn setVolume(&self, volume: c_float); + #[method(usesFeedbackWindow)] + pub unsafe fn usesFeedbackWindow(&self) -> bool; + #[method(setUsesFeedbackWindow:)] + pub unsafe fn setUsesFeedbackWindow(&self, usesFeedbackWindow: bool); + #[method(addSpeechDictionary:)] + pub unsafe fn addSpeechDictionary( + &self, + speechDictionary: &NSDictionary, + ); + #[method_id(phonemesFromText:)] + pub unsafe fn phonemesFromText(&self, text: &NSString) -> Id; + #[method_id(objectForProperty:error:)] + pub unsafe fn objectForProperty_error( + &self, + property: &NSSpeechPropertyKey, + ) -> Result, Id>; + #[method(setObject:forProperty:error:)] + pub unsafe fn setObject_forProperty_error( + &self, + object: Option<&Object>, + property: &NSSpeechPropertyKey, + ) -> Result<(), Id>; + #[method(isAnyApplicationSpeaking)] + pub unsafe fn isAnyApplicationSpeaking() -> bool; + #[method_id(defaultVoice)] + pub unsafe fn defaultVoice() -> Id; + #[method_id(availableVoices)] + pub unsafe fn availableVoices() -> Id, Shared>; + #[method_id(attributesForVoice:)] + pub unsafe fn attributesForVoice( + voice: &NSSpeechSynthesizerVoiceName, + ) -> Id, Shared>; + } +); +pub type NSSpeechSynthesizerDelegate = NSObject; +pub type NSSpeechMode = NSString; +pub type NSSpeechStatusKey = NSString; +pub type NSSpeechErrorKey = NSString; +pub type NSSpeechSynthesizerInfoKey = NSString; +pub type NSSpeechPhonemeInfoKey = NSString; +pub type NSSpeechCommandDelimiterKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs new file mode 100644 index 000000000..26fcb6de9 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -0,0 +1,274 @@ +use super::__exported::NSMenu; +use super::__exported::NSOrthography; +use super::__exported::NSPanel; +use super::__exported::NSString; +use super::__exported::NSView; +use super::__exported::NSViewController; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +use crate::Foundation::generated::NSTextCheckingResult::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextCheckingOptionKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSSpellChecker; + unsafe impl ClassType for NSSpellChecker { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSSpellChecker { + #[method_id(sharedSpellChecker)] + pub unsafe fn sharedSpellChecker() -> Id; + #[method(sharedSpellCheckerExists)] + pub unsafe fn sharedSpellCheckerExists() -> bool; + #[method(uniqueSpellDocumentTag)] + pub unsafe fn uniqueSpellDocumentTag() -> NSInteger; + #[method(checkSpellingOfString:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:)] + pub unsafe fn checkSpellingOfString_startingAt_language_wrap_inSpellDocumentWithTag_wordCount( + &self, + stringToCheck: &NSString, + startingOffset: NSInteger, + language: Option<&NSString>, + wrapFlag: bool, + tag: NSInteger, + wordCount: *mut NSInteger, + ) -> NSRange; + #[method(checkSpellingOfString:startingAt:)] + pub unsafe fn checkSpellingOfString_startingAt( + &self, + stringToCheck: &NSString, + startingOffset: NSInteger, + ) -> NSRange; + #[method(countWordsInString:language:)] + pub unsafe fn countWordsInString_language( + &self, + stringToCount: &NSString, + language: Option<&NSString>, + ) -> NSInteger; + #[method(checkGrammarOfString:startingAt:language:wrap:inSpellDocumentWithTag:details:)] + pub unsafe fn checkGrammarOfString_startingAt_language_wrap_inSpellDocumentWithTag_details( + &self, + stringToCheck: &NSString, + startingOffset: NSInteger, + language: Option<&NSString>, + wrapFlag: bool, + tag: NSInteger, + details: Option<&mut Option>, Shared>>>, + ) -> NSRange; + #[method_id(checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)] + pub unsafe fn checkString_range_types_options_inSpellDocumentWithTag_orthography_wordCount( + &self, + stringToCheck: &NSString, + range: NSRange, + checkingTypes: NSTextCheckingTypes, + options: Option<&NSDictionary>, + tag: NSInteger, + orthography: Option<&mut Option>>, + wordCount: *mut NSInteger, + ) -> Id, Shared>; + #[method(requestCheckingOfString:range:types:options:inSpellDocumentWithTag:completionHandler:)] + pub unsafe fn requestCheckingOfString_range_types_options_inSpellDocumentWithTag_completionHandler( + &self, + stringToCheck: &NSString, + range: NSRange, + checkingTypes: NSTextCheckingTypes, + options: Option<&NSDictionary>, + tag: NSInteger, + completionHandler: TodoBlock, + ) -> NSInteger; + #[method(requestCandidatesForSelectedRange:inString:types:options:inSpellDocumentWithTag:completionHandler:)] + pub unsafe fn requestCandidatesForSelectedRange_inString_types_options_inSpellDocumentWithTag_completionHandler( + &self, + selectedRange: NSRange, + stringToCheck: &NSString, + checkingTypes: NSTextCheckingTypes, + options: Option<&NSDictionary>, + tag: NSInteger, + completionHandler: TodoBlock, + ) -> NSInteger; + #[method_id(menuForResult:string:options:atLocation:inView:)] + pub unsafe fn menuForResult_string_options_atLocation_inView( + &self, + result: &NSTextCheckingResult, + checkedString: &NSString, + options: Option<&NSDictionary>, + location: NSPoint, + view: &NSView, + ) -> Option>; + #[method_id(userQuotesArrayForLanguage:)] + pub unsafe fn userQuotesArrayForLanguage( + &self, + language: &NSString, + ) -> Id, Shared>; + #[method_id(userReplacementsDictionary)] + pub unsafe fn userReplacementsDictionary( + &self, + ) -> Id, Shared>; + #[method(updateSpellingPanelWithMisspelledWord:)] + pub unsafe fn updateSpellingPanelWithMisspelledWord(&self, word: &NSString); + #[method(updateSpellingPanelWithGrammarString:detail:)] + pub unsafe fn updateSpellingPanelWithGrammarString_detail( + &self, + string: &NSString, + detail: &NSDictionary, + ); + #[method_id(spellingPanel)] + pub unsafe fn spellingPanel(&self) -> Id; + #[method_id(accessoryView)] + pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method_id(substitutionsPanel)] + pub unsafe fn substitutionsPanel(&self) -> Id; + #[method_id(substitutionsPanelAccessoryViewController)] + pub unsafe fn substitutionsPanelAccessoryViewController( + &self, + ) -> Option>; + #[method(setSubstitutionsPanelAccessoryViewController:)] + pub unsafe fn setSubstitutionsPanelAccessoryViewController( + &self, + substitutionsPanelAccessoryViewController: Option<&NSViewController>, + ); + #[method(updatePanels)] + pub unsafe fn updatePanels(&self); + #[method(ignoreWord:inSpellDocumentWithTag:)] + pub unsafe fn ignoreWord_inSpellDocumentWithTag( + &self, + wordToIgnore: &NSString, + tag: NSInteger, + ); + #[method_id(ignoredWordsInSpellDocumentWithTag:)] + pub unsafe fn ignoredWordsInSpellDocumentWithTag( + &self, + tag: NSInteger, + ) -> Option, Shared>>; + #[method(setIgnoredWords:inSpellDocumentWithTag:)] + pub unsafe fn setIgnoredWords_inSpellDocumentWithTag( + &self, + words: &NSArray, + tag: NSInteger, + ); + #[method_id(guessesForWordRange:inString:language:inSpellDocumentWithTag:)] + pub unsafe fn guessesForWordRange_inString_language_inSpellDocumentWithTag( + &self, + range: NSRange, + string: &NSString, + language: Option<&NSString>, + tag: NSInteger, + ) -> Option, Shared>>; + #[method_id(correctionForWordRange:inString:language:inSpellDocumentWithTag:)] + pub unsafe fn correctionForWordRange_inString_language_inSpellDocumentWithTag( + &self, + range: NSRange, + string: &NSString, + language: &NSString, + tag: NSInteger, + ) -> Option>; + #[method_id(completionsForPartialWordRange:inString:language:inSpellDocumentWithTag:)] + pub unsafe fn completionsForPartialWordRange_inString_language_inSpellDocumentWithTag( + &self, + range: NSRange, + string: &NSString, + language: Option<&NSString>, + tag: NSInteger, + ) -> Option, Shared>>; + #[method_id(languageForWordRange:inString:orthography:)] + pub unsafe fn languageForWordRange_inString_orthography( + &self, + range: NSRange, + string: &NSString, + orthography: Option<&NSOrthography>, + ) -> Option>; + #[method(closeSpellDocumentWithTag:)] + pub unsafe fn closeSpellDocumentWithTag(&self, tag: NSInteger); + #[method(recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:)] + pub unsafe fn recordResponse_toCorrection_forWord_language_inSpellDocumentWithTag( + &self, + response: NSCorrectionResponse, + correction: &NSString, + word: &NSString, + language: Option<&NSString>, + tag: NSInteger, + ); + #[method(showCorrectionIndicatorOfType:primaryString:alternativeStrings:forStringInRect:view:completionHandler:)] + pub unsafe fn showCorrectionIndicatorOfType_primaryString_alternativeStrings_forStringInRect_view_completionHandler( + &self, + type_: NSCorrectionIndicatorType, + primaryString: &NSString, + alternativeStrings: &NSArray, + rectOfTypedString: NSRect, + view: &NSView, + completionBlock: TodoBlock, + ); + #[method(dismissCorrectionIndicatorForView:)] + pub unsafe fn dismissCorrectionIndicatorForView(&self, view: &NSView); + #[method(preventsAutocorrectionBeforeString:language:)] + pub unsafe fn preventsAutocorrectionBeforeString_language( + &self, + string: &NSString, + language: Option<&NSString>, + ) -> bool; + #[method(deletesAutospaceBetweenString:andString:language:)] + pub unsafe fn deletesAutospaceBetweenString_andString_language( + &self, + precedingString: &NSString, + followingString: &NSString, + language: Option<&NSString>, + ) -> bool; + #[method_id(availableLanguages)] + pub unsafe fn availableLanguages(&self) -> Id, Shared>; + #[method_id(userPreferredLanguages)] + pub unsafe fn userPreferredLanguages(&self) -> Id, Shared>; + #[method(automaticallyIdentifiesLanguages)] + pub unsafe fn automaticallyIdentifiesLanguages(&self) -> bool; + #[method(setAutomaticallyIdentifiesLanguages:)] + pub unsafe fn setAutomaticallyIdentifiesLanguages( + &self, + automaticallyIdentifiesLanguages: bool, + ); + #[method(setWordFieldStringValue:)] + pub unsafe fn setWordFieldStringValue(&self, string: &NSString); + #[method(learnWord:)] + pub unsafe fn learnWord(&self, word: &NSString); + #[method(hasLearnedWord:)] + pub unsafe fn hasLearnedWord(&self, word: &NSString) -> bool; + #[method(unlearnWord:)] + pub unsafe fn unlearnWord(&self, word: &NSString); + #[method(isAutomaticTextReplacementEnabled)] + pub unsafe fn isAutomaticTextReplacementEnabled() -> bool; + #[method(isAutomaticSpellingCorrectionEnabled)] + pub unsafe fn isAutomaticSpellingCorrectionEnabled() -> bool; + #[method(isAutomaticQuoteSubstitutionEnabled)] + pub unsafe fn isAutomaticQuoteSubstitutionEnabled() -> bool; + #[method(isAutomaticDashSubstitutionEnabled)] + pub unsafe fn isAutomaticDashSubstitutionEnabled() -> bool; + #[method(isAutomaticCapitalizationEnabled)] + pub unsafe fn isAutomaticCapitalizationEnabled() -> bool; + #[method(isAutomaticPeriodSubstitutionEnabled)] + pub unsafe fn isAutomaticPeriodSubstitutionEnabled() -> bool; + #[method(isAutomaticTextCompletionEnabled)] + pub unsafe fn isAutomaticTextCompletionEnabled() -> bool; + #[method_id(language)] + pub unsafe fn language(&self) -> Id; + #[method(setLanguage:)] + pub unsafe fn setLanguage(&self, language: &NSString) -> bool; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSSpellChecker { + #[method_id(guessesForWord:)] + pub unsafe fn guessesForWord(&self, word: Option<&NSString>) + -> Option>; + #[method(forgetWord:)] + pub unsafe fn forgetWord(&self, word: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs new file mode 100644 index 000000000..5251da992 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs @@ -0,0 +1,8 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSChangeSpelling = NSObject; +pub type NSIgnoreMisspelledWords = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs new file mode 100644 index 000000000..ef18c019a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -0,0 +1,100 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSLayoutConstraint::*; +use crate::AppKit::generated::NSView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSSplitViewAutosaveName = NSString; +use super::__exported::NSNotification; +extern_class!( + #[derive(Debug)] + pub struct NSSplitView; + unsafe impl ClassType for NSSplitView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSSplitView { + #[method(isVertical)] + pub unsafe fn isVertical(&self) -> bool; + #[method(setVertical:)] + pub unsafe fn setVertical(&self, vertical: bool); + #[method(dividerStyle)] + pub unsafe fn dividerStyle(&self) -> NSSplitViewDividerStyle; + #[method(setDividerStyle:)] + pub unsafe fn setDividerStyle(&self, dividerStyle: NSSplitViewDividerStyle); + #[method_id(autosaveName)] + pub unsafe fn autosaveName(&self) -> Option>; + #[method(setAutosaveName:)] + pub unsafe fn setAutosaveName(&self, autosaveName: Option<&NSSplitViewAutosaveName>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSSplitViewDelegate>); + #[method(drawDividerInRect:)] + pub unsafe fn drawDividerInRect(&self, rect: NSRect); + #[method_id(dividerColor)] + pub unsafe fn dividerColor(&self) -> Id; + #[method(dividerThickness)] + pub unsafe fn dividerThickness(&self) -> CGFloat; + #[method(adjustSubviews)] + pub unsafe fn adjustSubviews(&self); + #[method(isSubviewCollapsed:)] + pub unsafe fn isSubviewCollapsed(&self, subview: &NSView) -> bool; + #[method(minPossiblePositionOfDividerAtIndex:)] + pub unsafe fn minPossiblePositionOfDividerAtIndex( + &self, + dividerIndex: NSInteger, + ) -> CGFloat; + #[method(maxPossiblePositionOfDividerAtIndex:)] + pub unsafe fn maxPossiblePositionOfDividerAtIndex( + &self, + dividerIndex: NSInteger, + ) -> CGFloat; + #[method(setPosition:ofDividerAtIndex:)] + pub unsafe fn setPosition_ofDividerAtIndex( + &self, + position: CGFloat, + dividerIndex: NSInteger, + ); + #[method(holdingPriorityForSubviewAtIndex:)] + pub unsafe fn holdingPriorityForSubviewAtIndex( + &self, + subviewIndex: NSInteger, + ) -> NSLayoutPriority; + #[method(setHoldingPriority:forSubviewAtIndex:)] + pub unsafe fn setHoldingPriority_forSubviewAtIndex( + &self, + priority: NSLayoutPriority, + subviewIndex: NSInteger, + ); + } +); +extern_methods!( + #[doc = "NSSplitViewArrangedSubviews"] + unsafe impl NSSplitView { + #[method(arrangesAllSubviews)] + pub unsafe fn arrangesAllSubviews(&self) -> bool; + #[method(setArrangesAllSubviews:)] + pub unsafe fn setArrangesAllSubviews(&self, arrangesAllSubviews: bool); + #[method_id(arrangedSubviews)] + pub unsafe fn arrangedSubviews(&self) -> Id, Shared>; + #[method(addArrangedSubview:)] + pub unsafe fn addArrangedSubview(&self, view: &NSView); + #[method(insertArrangedSubview:atIndex:)] + pub unsafe fn insertArrangedSubview_atIndex(&self, view: &NSView, index: NSInteger); + #[method(removeArrangedSubview:)] + pub unsafe fn removeArrangedSubview(&self, view: &NSView); + } +); +pub type NSSplitViewDelegate = NSObject; +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSSplitView { + #[method(setIsPaneSplitter:)] + pub unsafe fn setIsPaneSplitter(&self, flag: bool); + #[method(isPaneSplitter)] + pub unsafe fn isPaneSplitter(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs new file mode 100644 index 000000000..c9f80bfc1 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs @@ -0,0 +1,96 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSSplitView::*; +use crate::AppKit::generated::NSSplitViewItem::*; +use crate::AppKit::generated::NSViewController::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSplitViewController; + unsafe impl ClassType for NSSplitViewController { + type Super = NSViewController; + } +); +extern_methods!( + unsafe impl NSSplitViewController { + #[method_id(splitView)] + pub unsafe fn splitView(&self) -> Id; + #[method(setSplitView:)] + pub unsafe fn setSplitView(&self, splitView: &NSSplitView); + #[method_id(splitViewItems)] + pub unsafe fn splitViewItems(&self) -> Id, Shared>; + #[method(setSplitViewItems:)] + pub unsafe fn setSplitViewItems(&self, splitViewItems: &NSArray); + #[method(addSplitViewItem:)] + pub unsafe fn addSplitViewItem(&self, splitViewItem: &NSSplitViewItem); + #[method(insertSplitViewItem:atIndex:)] + pub unsafe fn insertSplitViewItem_atIndex( + &self, + splitViewItem: &NSSplitViewItem, + index: NSInteger, + ); + #[method(removeSplitViewItem:)] + pub unsafe fn removeSplitViewItem(&self, splitViewItem: &NSSplitViewItem); + #[method_id(splitViewItemForViewController:)] + pub unsafe fn splitViewItemForViewController( + &self, + viewController: &NSViewController, + ) -> Option>; + #[method(minimumThicknessForInlineSidebars)] + pub unsafe fn minimumThicknessForInlineSidebars(&self) -> CGFloat; + #[method(setMinimumThicknessForInlineSidebars:)] + pub unsafe fn setMinimumThicknessForInlineSidebars( + &self, + minimumThicknessForInlineSidebars: CGFloat, + ); + #[method(validateUserInterfaceItem:)] + pub unsafe fn validateUserInterfaceItem(&self, item: &NSValidatedUserInterfaceItem) + -> bool; + #[method(viewDidLoad)] + pub unsafe fn viewDidLoad(&self); + #[method(splitView:canCollapseSubview:)] + pub unsafe fn splitView_canCollapseSubview( + &self, + splitView: &NSSplitView, + subview: &NSView, + ) -> bool; + #[method(splitView:shouldCollapseSubview:forDoubleClickOnDividerAtIndex:)] + pub unsafe fn splitView_shouldCollapseSubview_forDoubleClickOnDividerAtIndex( + &self, + splitView: &NSSplitView, + subview: &NSView, + dividerIndex: NSInteger, + ) -> bool; + #[method(splitView:shouldHideDividerAtIndex:)] + pub unsafe fn splitView_shouldHideDividerAtIndex( + &self, + splitView: &NSSplitView, + dividerIndex: NSInteger, + ) -> bool; + #[method(splitView:effectiveRect:forDrawnRect:ofDividerAtIndex:)] + pub unsafe fn splitView_effectiveRect_forDrawnRect_ofDividerAtIndex( + &self, + splitView: &NSSplitView, + proposedEffectiveRect: NSRect, + drawnRect: NSRect, + dividerIndex: NSInteger, + ) -> NSRect; + #[method(splitView:additionalEffectiveRectOfDividerAtIndex:)] + pub unsafe fn splitView_additionalEffectiveRectOfDividerAtIndex( + &self, + splitView: &NSSplitView, + dividerIndex: NSInteger, + ) -> NSRect; + } +); +extern_methods!( + #[doc = "NSSplitViewControllerToggleSidebarAction"] + unsafe impl NSSplitViewController { + #[method(toggleSidebar:)] + pub unsafe fn toggleSidebar(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs new file mode 100644 index 000000000..47f66e119 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs @@ -0,0 +1,85 @@ +use super::__exported::NSViewController; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAnimation::*; +use crate::AppKit::generated::NSLayoutConstraint::*; +use crate::AppKit::generated::NSWindow::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSplitViewItem; + unsafe impl ClassType for NSSplitViewItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSSplitViewItem { + #[method_id(splitViewItemWithViewController:)] + pub unsafe fn splitViewItemWithViewController( + viewController: &NSViewController, + ) -> Id; + #[method_id(sidebarWithViewController:)] + pub unsafe fn sidebarWithViewController( + viewController: &NSViewController, + ) -> Id; + #[method_id(contentListWithViewController:)] + pub unsafe fn contentListWithViewController( + viewController: &NSViewController, + ) -> Id; + #[method(behavior)] + pub unsafe fn behavior(&self) -> NSSplitViewItemBehavior; + #[method_id(viewController)] + pub unsafe fn viewController(&self) -> Id; + #[method(setViewController:)] + pub unsafe fn setViewController(&self, viewController: &NSViewController); + #[method(isCollapsed)] + pub unsafe fn isCollapsed(&self) -> bool; + #[method(setCollapsed:)] + pub unsafe fn setCollapsed(&self, collapsed: bool); + #[method(canCollapse)] + pub unsafe fn canCollapse(&self) -> bool; + #[method(setCanCollapse:)] + pub unsafe fn setCanCollapse(&self, canCollapse: bool); + #[method(collapseBehavior)] + pub unsafe fn collapseBehavior(&self) -> NSSplitViewItemCollapseBehavior; + #[method(setCollapseBehavior:)] + pub unsafe fn setCollapseBehavior(&self, collapseBehavior: NSSplitViewItemCollapseBehavior); + #[method(minimumThickness)] + pub unsafe fn minimumThickness(&self) -> CGFloat; + #[method(setMinimumThickness:)] + pub unsafe fn setMinimumThickness(&self, minimumThickness: CGFloat); + #[method(maximumThickness)] + pub unsafe fn maximumThickness(&self) -> CGFloat; + #[method(setMaximumThickness:)] + pub unsafe fn setMaximumThickness(&self, maximumThickness: CGFloat); + #[method(preferredThicknessFraction)] + pub unsafe fn preferredThicknessFraction(&self) -> CGFloat; + #[method(setPreferredThicknessFraction:)] + pub unsafe fn setPreferredThicknessFraction(&self, preferredThicknessFraction: CGFloat); + #[method(holdingPriority)] + pub unsafe fn holdingPriority(&self) -> NSLayoutPriority; + #[method(setHoldingPriority:)] + pub unsafe fn setHoldingPriority(&self, holdingPriority: NSLayoutPriority); + #[method(automaticMaximumThickness)] + pub unsafe fn automaticMaximumThickness(&self) -> CGFloat; + #[method(setAutomaticMaximumThickness:)] + pub unsafe fn setAutomaticMaximumThickness(&self, automaticMaximumThickness: CGFloat); + #[method(isSpringLoaded)] + pub unsafe fn isSpringLoaded(&self) -> bool; + #[method(setSpringLoaded:)] + pub unsafe fn setSpringLoaded(&self, springLoaded: bool); + #[method(allowsFullHeightLayout)] + pub unsafe fn allowsFullHeightLayout(&self) -> bool; + #[method(setAllowsFullHeightLayout:)] + pub unsafe fn setAllowsFullHeightLayout(&self, allowsFullHeightLayout: bool); + #[method(titlebarSeparatorStyle)] + pub unsafe fn titlebarSeparatorStyle(&self) -> NSTitlebarSeparatorStyle; + #[method(setTitlebarSeparatorStyle:)] + pub unsafe fn setTitlebarSeparatorStyle( + &self, + titlebarSeparatorStyle: NSTitlebarSeparatorStyle, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs new file mode 100644 index 000000000..91ec548e2 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -0,0 +1,137 @@ +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::AppKit::generated::NSLayoutConstraint::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSStackView; + unsafe impl ClassType for NSStackView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSStackView { + #[method_id(stackViewWithViews:)] + pub unsafe fn stackViewWithViews(views: &NSArray) -> Id; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSStackViewDelegate>); + #[method(orientation)] + pub unsafe fn orientation(&self) -> NSUserInterfaceLayoutOrientation; + #[method(setOrientation:)] + pub unsafe fn setOrientation(&self, orientation: NSUserInterfaceLayoutOrientation); + #[method(alignment)] + pub unsafe fn alignment(&self) -> NSLayoutAttribute; + #[method(setAlignment:)] + pub unsafe fn setAlignment(&self, alignment: NSLayoutAttribute); + #[method(edgeInsets)] + pub unsafe fn edgeInsets(&self) -> NSEdgeInsets; + #[method(setEdgeInsets:)] + pub unsafe fn setEdgeInsets(&self, edgeInsets: NSEdgeInsets); + #[method(distribution)] + pub unsafe fn distribution(&self) -> NSStackViewDistribution; + #[method(setDistribution:)] + pub unsafe fn setDistribution(&self, distribution: NSStackViewDistribution); + #[method(spacing)] + pub unsafe fn spacing(&self) -> CGFloat; + #[method(setSpacing:)] + pub unsafe fn setSpacing(&self, spacing: CGFloat); + #[method(setCustomSpacing:afterView:)] + pub unsafe fn setCustomSpacing_afterView(&self, spacing: CGFloat, view: &NSView); + #[method(customSpacingAfterView:)] + pub unsafe fn customSpacingAfterView(&self, view: &NSView) -> CGFloat; + #[method(detachesHiddenViews)] + pub unsafe fn detachesHiddenViews(&self) -> bool; + #[method(setDetachesHiddenViews:)] + pub unsafe fn setDetachesHiddenViews(&self, detachesHiddenViews: bool); + #[method_id(arrangedSubviews)] + pub unsafe fn arrangedSubviews(&self) -> Id, Shared>; + #[method(addArrangedSubview:)] + pub unsafe fn addArrangedSubview(&self, view: &NSView); + #[method(insertArrangedSubview:atIndex:)] + pub unsafe fn insertArrangedSubview_atIndex(&self, view: &NSView, index: NSInteger); + #[method(removeArrangedSubview:)] + pub unsafe fn removeArrangedSubview(&self, view: &NSView); + #[method_id(detachedViews)] + pub unsafe fn detachedViews(&self) -> Id, Shared>; + #[method(setVisibilityPriority:forView:)] + pub unsafe fn setVisibilityPriority_forView( + &self, + priority: NSStackViewVisibilityPriority, + view: &NSView, + ); + #[method(visibilityPriorityForView:)] + pub unsafe fn visibilityPriorityForView( + &self, + view: &NSView, + ) -> NSStackViewVisibilityPriority; + #[method(clippingResistancePriorityForOrientation:)] + pub unsafe fn clippingResistancePriorityForOrientation( + &self, + orientation: NSLayoutConstraintOrientation, + ) -> NSLayoutPriority; + #[method(setClippingResistancePriority:forOrientation:)] + pub unsafe fn setClippingResistancePriority_forOrientation( + &self, + clippingResistancePriority: NSLayoutPriority, + orientation: NSLayoutConstraintOrientation, + ); + #[method(huggingPriorityForOrientation:)] + pub unsafe fn huggingPriorityForOrientation( + &self, + orientation: NSLayoutConstraintOrientation, + ) -> NSLayoutPriority; + #[method(setHuggingPriority:forOrientation:)] + pub unsafe fn setHuggingPriority_forOrientation( + &self, + huggingPriority: NSLayoutPriority, + orientation: NSLayoutConstraintOrientation, + ); + } +); +pub type NSStackViewDelegate = NSObject; +extern_methods!( + #[doc = "NSStackViewGravityAreas"] + unsafe impl NSStackView { + #[method(addView:inGravity:)] + pub unsafe fn addView_inGravity(&self, view: &NSView, gravity: NSStackViewGravity); + #[method(insertView:atIndex:inGravity:)] + pub unsafe fn insertView_atIndex_inGravity( + &self, + view: &NSView, + index: NSUInteger, + gravity: NSStackViewGravity, + ); + #[method(removeView:)] + pub unsafe fn removeView(&self, view: &NSView); + #[method_id(viewsInGravity:)] + pub unsafe fn viewsInGravity( + &self, + gravity: NSStackViewGravity, + ) -> Id, Shared>; + #[method(setViews:inGravity:)] + pub unsafe fn setViews_inGravity( + &self, + views: &NSArray, + gravity: NSStackViewGravity, + ); + #[method_id(views)] + pub unsafe fn views(&self) -> Id, Shared>; + } +); +extern_methods!( + #[doc = "NSStackViewDeprecated"] + unsafe impl NSStackView { + #[method(hasEqualSpacing)] + pub unsafe fn hasEqualSpacing(&self) -> bool; + #[method(setHasEqualSpacing:)] + pub unsafe fn setHasEqualSpacing(&self, hasEqualSpacing: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSStatusBar.rs b/crates/icrate/src/generated/AppKit/NSStatusBar.rs new file mode 100644 index 000000000..3bf15a5b8 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSStatusBar.rs @@ -0,0 +1,32 @@ +use super::__exported::NSColor; +use super::__exported::NSFont; +use super::__exported::NSMutableArray; +use super::__exported::NSStatusItem; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSStatusBar; + unsafe impl ClassType for NSStatusBar { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSStatusBar { + #[method_id(systemStatusBar)] + pub unsafe fn systemStatusBar() -> Id; + #[method_id(statusItemWithLength:)] + pub unsafe fn statusItemWithLength(&self, length: CGFloat) -> Id; + #[method(removeStatusItem:)] + pub unsafe fn removeStatusItem(&self, item: &NSStatusItem); + #[method(isVertical)] + pub unsafe fn isVertical(&self) -> bool; + #[method(thickness)] + pub unsafe fn thickness(&self) -> CGFloat; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs b/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs new file mode 100644 index 000000000..4f168583e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs @@ -0,0 +1,21 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSButton::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSStatusBarButton; + unsafe impl ClassType for NSStatusBarButton { + type Super = NSButton; + } +); +extern_methods!( + unsafe impl NSStatusBarButton { + #[method(appearsDisabled)] + pub unsafe fn appearsDisabled(&self) -> bool; + #[method(setAppearsDisabled:)] + pub unsafe fn setAppearsDisabled(&self, appearsDisabled: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs new file mode 100644 index 000000000..23d44cf5b --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSStatusItem.rs @@ -0,0 +1,109 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSEvent::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSStatusItemAutosaveName = NSString; +use super::__exported::NSAttributedString; +use super::__exported::NSImage; +use super::__exported::NSMenu; +use super::__exported::NSStatusBar; +use super::__exported::NSStatusBarButton; +use super::__exported::NSView; +use super::__exported::NSWindow; +extern_class!( + #[derive(Debug)] + pub struct NSStatusItem; + unsafe impl ClassType for NSStatusItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSStatusItem { + #[method_id(statusBar)] + pub unsafe fn statusBar(&self) -> Option>; + #[method(length)] + pub unsafe fn length(&self) -> CGFloat; + #[method(setLength:)] + pub unsafe fn setLength(&self, length: CGFloat); + #[method_id(menu)] + pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] + pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method_id(button)] + pub unsafe fn button(&self) -> Option>; + #[method(behavior)] + pub unsafe fn behavior(&self) -> NSStatusItemBehavior; + #[method(setBehavior:)] + pub unsafe fn setBehavior(&self, behavior: NSStatusItemBehavior); + #[method(isVisible)] + pub unsafe fn isVisible(&self) -> bool; + #[method(setVisible:)] + pub unsafe fn setVisible(&self, visible: bool); + #[method_id(autosaveName)] + pub unsafe fn autosaveName(&self) -> Id; + #[method(setAutosaveName:)] + pub unsafe fn setAutosaveName(&self, autosaveName: Option<&NSStatusItemAutosaveName>); + } +); +extern_methods!( + #[doc = "NSStatusItemDeprecated"] + unsafe impl NSStatusItem { + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method(doubleAction)] + pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] + pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method_id(title)] + pub unsafe fn title(&self) -> Option>; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(attributedTitle)] + pub unsafe fn attributedTitle(&self) -> Option>; + #[method(setAttributedTitle:)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(alternateImage)] + pub unsafe fn alternateImage(&self) -> Option>; + #[method(setAlternateImage:)] + pub unsafe fn setAlternateImage(&self, alternateImage: Option<&NSImage>); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method(highlightMode)] + pub unsafe fn highlightMode(&self) -> bool; + #[method(setHighlightMode:)] + pub unsafe fn setHighlightMode(&self, highlightMode: bool); + #[method_id(toolTip)] + pub unsafe fn toolTip(&self) -> Option>; + #[method(setToolTip:)] + pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + #[method(sendActionOn:)] + pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method(setView:)] + pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(drawStatusBarBackgroundInRect:withHighlight:)] + pub unsafe fn drawStatusBarBackgroundInRect_withHighlight( + &self, + rect: NSRect, + highlight: bool, + ); + #[method(popUpStatusItemMenu:)] + pub unsafe fn popUpStatusItemMenu(&self, menu: &NSMenu); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSStepper.rs b/crates/icrate/src/generated/AppKit/NSStepper.rs new file mode 100644 index 000000000..f21ad392a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSStepper.rs @@ -0,0 +1,37 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSStepper; + unsafe impl ClassType for NSStepper { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSStepper { + #[method(minValue)] + pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] + pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] + pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] + pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(increment)] + pub unsafe fn increment(&self) -> c_double; + #[method(setIncrement:)] + pub unsafe fn setIncrement(&self, increment: c_double); + #[method(valueWraps)] + pub unsafe fn valueWraps(&self) -> bool; + #[method(setValueWraps:)] + pub unsafe fn setValueWraps(&self, valueWraps: bool); + #[method(autorepeat)] + pub unsafe fn autorepeat(&self) -> bool; + #[method(setAutorepeat:)] + pub unsafe fn setAutorepeat(&self, autorepeat: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSStepperCell.rs b/crates/icrate/src/generated/AppKit/NSStepperCell.rs new file mode 100644 index 000000000..c78d6e979 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSStepperCell.rs @@ -0,0 +1,37 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSActionCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSStepperCell; + unsafe impl ClassType for NSStepperCell { + type Super = NSActionCell; + } +); +extern_methods!( + unsafe impl NSStepperCell { + #[method(minValue)] + pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] + pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] + pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] + pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(increment)] + pub unsafe fn increment(&self) -> c_double; + #[method(setIncrement:)] + pub unsafe fn setIncrement(&self, increment: c_double); + #[method(valueWraps)] + pub unsafe fn valueWraps(&self) -> bool; + #[method(setValueWraps:)] + pub unsafe fn setValueWraps(&self, valueWraps: bool); + #[method(autorepeat)] + pub unsafe fn autorepeat(&self) -> bool; + #[method(setAutorepeat:)] + pub unsafe fn setAutorepeat(&self, autorepeat: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs new file mode 100644 index 000000000..268256793 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs @@ -0,0 +1,54 @@ +use crate::AppKit::generated::NSTouchBarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSStepperTouchBarItem; + unsafe impl ClassType for NSStepperTouchBarItem { + type Super = NSTouchBarItem; + } +); +extern_methods!( + unsafe impl NSStepperTouchBarItem { + #[method_id(stepperTouchBarItemWithIdentifier:formatter:)] + pub unsafe fn stepperTouchBarItemWithIdentifier_formatter( + identifier: &NSTouchBarItemIdentifier, + formatter: &NSFormatter, + ) -> Id; + #[method_id(stepperTouchBarItemWithIdentifier:drawingHandler:)] + pub unsafe fn stepperTouchBarItemWithIdentifier_drawingHandler( + identifier: &NSTouchBarItemIdentifier, + drawingHandler: TodoBlock, + ) -> Id; + #[method(maxValue)] + pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] + pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(minValue)] + pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] + pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(increment)] + pub unsafe fn increment(&self) -> c_double; + #[method(setIncrement:)] + pub unsafe fn setIncrement(&self, increment: c_double); + #[method(value)] + pub unsafe fn value(&self) -> c_double; + #[method(setValue:)] + pub unsafe fn setValue(&self, value: c_double); + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method_id(customizationLabel)] + pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] + pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSStoryboard.rs b/crates/icrate/src/generated/AppKit/NSStoryboard.rs new file mode 100644 index 000000000..36fe0461e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSStoryboard.rs @@ -0,0 +1,44 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSStoryboardName = NSString; +pub type NSStoryboardSceneIdentifier = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSStoryboard; + unsafe impl ClassType for NSStoryboard { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSStoryboard { + #[method_id(mainStoryboard)] + pub unsafe fn mainStoryboard() -> Option>; + #[method_id(storyboardWithName:bundle:)] + pub unsafe fn storyboardWithName_bundle( + name: &NSStoryboardName, + storyboardBundleOrNil: Option<&NSBundle>, + ) -> Id; + #[method_id(instantiateInitialController)] + pub unsafe fn instantiateInitialController(&self) -> Option>; + #[method_id(instantiateInitialControllerWithCreator:)] + pub unsafe fn instantiateInitialControllerWithCreator( + &self, + block: NSStoryboardControllerCreator, + ) -> Option>; + #[method_id(instantiateControllerWithIdentifier:)] + pub unsafe fn instantiateControllerWithIdentifier( + &self, + identifier: &NSStoryboardSceneIdentifier, + ) -> Id; + #[method_id(instantiateControllerWithIdentifier:creator:)] + pub unsafe fn instantiateControllerWithIdentifier_creator( + &self, + identifier: &NSStoryboardSceneIdentifier, + block: NSStoryboardControllerCreator, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs new file mode 100644 index 000000000..d7c2edd7f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs @@ -0,0 +1,41 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSStoryboardSegueIdentifier = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSStoryboardSegue; + unsafe impl ClassType for NSStoryboardSegue { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSStoryboardSegue { + #[method_id(segueWithIdentifier:source:destination:performHandler:)] + pub unsafe fn segueWithIdentifier_source_destination_performHandler( + identifier: &NSStoryboardSegueIdentifier, + sourceController: &Object, + destinationController: &Object, + performHandler: TodoBlock, + ) -> Id; + #[method_id(initWithIdentifier:source:destination:)] + pub unsafe fn initWithIdentifier_source_destination( + &self, + identifier: &NSStoryboardSegueIdentifier, + sourceController: &Object, + destinationController: &Object, + ) -> Id; + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Option>; + #[method_id(sourceController)] + pub unsafe fn sourceController(&self) -> Id; + #[method_id(destinationController)] + pub unsafe fn destinationController(&self) -> Id; + #[method(perform)] + pub unsafe fn perform(&self); + } +); +pub type NSSeguePerforming = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs new file mode 100644 index 000000000..dcc217273 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs @@ -0,0 +1,130 @@ +use crate::AppKit::generated::NSAttributedString::*; +use crate::Foundation::generated::NSString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSStringDrawingContext; + unsafe impl ClassType for NSStringDrawingContext { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSStringDrawingContext { + #[method(minimumScaleFactor)] + pub unsafe fn minimumScaleFactor(&self) -> CGFloat; + #[method(setMinimumScaleFactor:)] + pub unsafe fn setMinimumScaleFactor(&self, minimumScaleFactor: CGFloat); + #[method(actualScaleFactor)] + pub unsafe fn actualScaleFactor(&self) -> CGFloat; + #[method(totalBounds)] + pub unsafe fn totalBounds(&self) -> NSRect; + } +); +extern_methods!( + #[doc = "NSStringDrawing"] + unsafe impl NSString { + #[method(sizeWithAttributes:)] + pub unsafe fn sizeWithAttributes( + &self, + attrs: Option<&NSDictionary>, + ) -> NSSize; + #[method(drawAtPoint:withAttributes:)] + pub unsafe fn drawAtPoint_withAttributes( + &self, + point: NSPoint, + attrs: Option<&NSDictionary>, + ); + #[method(drawInRect:withAttributes:)] + pub unsafe fn drawInRect_withAttributes( + &self, + rect: NSRect, + attrs: Option<&NSDictionary>, + ); + } +); +extern_methods!( + #[doc = "NSStringDrawing"] + unsafe impl NSAttributedString { + #[method(size)] + pub unsafe fn size(&self) -> NSSize; + #[method(drawAtPoint:)] + pub unsafe fn drawAtPoint(&self, point: NSPoint); + #[method(drawInRect:)] + pub unsafe fn drawInRect(&self, rect: NSRect); + } +); +extern_methods!( + #[doc = "NSExtendedStringDrawing"] + unsafe impl NSString { + #[method(drawWithRect:options:attributes:context:)] + pub unsafe fn drawWithRect_options_attributes_context( + &self, + rect: NSRect, + options: NSStringDrawingOptions, + attributes: Option<&NSDictionary>, + context: Option<&NSStringDrawingContext>, + ); + #[method(boundingRectWithSize:options:attributes:context:)] + pub unsafe fn boundingRectWithSize_options_attributes_context( + &self, + size: NSSize, + options: NSStringDrawingOptions, + attributes: Option<&NSDictionary>, + context: Option<&NSStringDrawingContext>, + ) -> NSRect; + } +); +extern_methods!( + #[doc = "NSExtendedStringDrawing"] + unsafe impl NSAttributedString { + #[method(drawWithRect:options:context:)] + pub unsafe fn drawWithRect_options_context( + &self, + rect: NSRect, + options: NSStringDrawingOptions, + context: Option<&NSStringDrawingContext>, + ); + #[method(boundingRectWithSize:options:context:)] + pub unsafe fn boundingRectWithSize_options_context( + &self, + size: NSSize, + options: NSStringDrawingOptions, + context: Option<&NSStringDrawingContext>, + ) -> NSRect; + } +); +extern_methods!( + #[doc = "NSStringDrawingDeprecated"] + unsafe impl NSString { + #[method(drawWithRect:options:attributes:)] + pub unsafe fn drawWithRect_options_attributes( + &self, + rect: NSRect, + options: NSStringDrawingOptions, + attributes: Option<&NSDictionary>, + ); + #[method(boundingRectWithSize:options:attributes:)] + pub unsafe fn boundingRectWithSize_options_attributes( + &self, + size: NSSize, + options: NSStringDrawingOptions, + attributes: Option<&NSDictionary>, + ) -> NSRect; + } +); +extern_methods!( + #[doc = "NSStringDrawingDeprecated"] + unsafe impl NSAttributedString { + #[method(drawWithRect:options:)] + pub unsafe fn drawWithRect_options(&self, rect: NSRect, options: NSStringDrawingOptions); + #[method(boundingRectWithSize:options:)] + pub unsafe fn boundingRectWithSize_options( + &self, + size: NSSize, + options: NSStringDrawingOptions, + ) -> NSRect; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSwitch.rs b/crates/icrate/src/generated/AppKit/NSSwitch.rs new file mode 100644 index 000000000..a80590abd --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSSwitch.rs @@ -0,0 +1,21 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSSwitch; + unsafe impl ClassType for NSSwitch { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSSwitch { + #[method(state)] + pub unsafe fn state(&self) -> NSControlStateValue; + #[method(setState:)] + pub unsafe fn setState(&self, state: NSControlStateValue); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs new file mode 100644 index 000000000..6f9d14b22 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -0,0 +1,109 @@ +use super::__exported::NSFont; +use super::__exported::NSTabViewItem; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSLayoutConstraint::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTabView; + unsafe impl ClassType for NSTabView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSTabView { + #[method(selectTabViewItem:)] + pub unsafe fn selectTabViewItem(&self, tabViewItem: Option<&NSTabViewItem>); + #[method(selectTabViewItemAtIndex:)] + pub unsafe fn selectTabViewItemAtIndex(&self, index: NSInteger); + #[method(selectTabViewItemWithIdentifier:)] + pub unsafe fn selectTabViewItemWithIdentifier(&self, identifier: &Object); + #[method(takeSelectedTabViewItemFromSender:)] + pub unsafe fn takeSelectedTabViewItemFromSender(&self, sender: Option<&Object>); + #[method(selectFirstTabViewItem:)] + pub unsafe fn selectFirstTabViewItem(&self, sender: Option<&Object>); + #[method(selectLastTabViewItem:)] + pub unsafe fn selectLastTabViewItem(&self, sender: Option<&Object>); + #[method(selectNextTabViewItem:)] + pub unsafe fn selectNextTabViewItem(&self, sender: Option<&Object>); + #[method(selectPreviousTabViewItem:)] + pub unsafe fn selectPreviousTabViewItem(&self, sender: Option<&Object>); + #[method_id(selectedTabViewItem)] + pub unsafe fn selectedTabViewItem(&self) -> Option>; + #[method_id(font)] + pub unsafe fn font(&self) -> Id; + #[method(setFont:)] + pub unsafe fn setFont(&self, font: &NSFont); + #[method(tabViewType)] + pub unsafe fn tabViewType(&self) -> NSTabViewType; + #[method(setTabViewType:)] + pub unsafe fn setTabViewType(&self, tabViewType: NSTabViewType); + #[method(tabPosition)] + pub unsafe fn tabPosition(&self) -> NSTabPosition; + #[method(setTabPosition:)] + pub unsafe fn setTabPosition(&self, tabPosition: NSTabPosition); + #[method(tabViewBorderType)] + pub unsafe fn tabViewBorderType(&self) -> NSTabViewBorderType; + #[method(setTabViewBorderType:)] + pub unsafe fn setTabViewBorderType(&self, tabViewBorderType: NSTabViewBorderType); + #[method_id(tabViewItems)] + pub unsafe fn tabViewItems(&self) -> Id, Shared>; + #[method(setTabViewItems:)] + pub unsafe fn setTabViewItems(&self, tabViewItems: &NSArray); + #[method(allowsTruncatedLabels)] + pub unsafe fn allowsTruncatedLabels(&self) -> bool; + #[method(setAllowsTruncatedLabels:)] + pub unsafe fn setAllowsTruncatedLabels(&self, allowsTruncatedLabels: bool); + #[method(minimumSize)] + pub unsafe fn minimumSize(&self) -> NSSize; + #[method(drawsBackground)] + pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] + pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method(controlSize)] + pub unsafe fn controlSize(&self) -> NSControlSize; + #[method(setControlSize:)] + pub unsafe fn setControlSize(&self, controlSize: NSControlSize); + #[method(addTabViewItem:)] + pub unsafe fn addTabViewItem(&self, tabViewItem: &NSTabViewItem); + #[method(insertTabViewItem:atIndex:)] + pub unsafe fn insertTabViewItem_atIndex( + &self, + tabViewItem: &NSTabViewItem, + index: NSInteger, + ); + #[method(removeTabViewItem:)] + pub unsafe fn removeTabViewItem(&self, tabViewItem: &NSTabViewItem); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTabViewDelegate>); + #[method_id(tabViewItemAtPoint:)] + pub unsafe fn tabViewItemAtPoint( + &self, + point: NSPoint, + ) -> Option>; + #[method(contentRect)] + pub unsafe fn contentRect(&self) -> NSRect; + #[method(numberOfTabViewItems)] + pub unsafe fn numberOfTabViewItems(&self) -> NSInteger; + #[method(indexOfTabViewItem:)] + pub unsafe fn indexOfTabViewItem(&self, tabViewItem: &NSTabViewItem) -> NSInteger; + #[method_id(tabViewItemAtIndex:)] + pub unsafe fn tabViewItemAtIndex(&self, index: NSInteger) -> Id; + #[method(indexOfTabViewItemWithIdentifier:)] + pub unsafe fn indexOfTabViewItemWithIdentifier(&self, identifier: &Object) -> NSInteger; + #[method(controlTint)] + pub unsafe fn controlTint(&self) -> NSControlTint; + #[method(setControlTint:)] + pub unsafe fn setControlTint(&self, controlTint: NSControlTint); + } +); +pub type NSTabViewDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTabViewController.rs b/crates/icrate/src/generated/AppKit/NSTabViewController.rs new file mode 100644 index 000000000..bd26170de --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTabViewController.rs @@ -0,0 +1,107 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTabView::*; +use crate::AppKit::generated::NSToolbar::*; +use crate::AppKit::generated::NSViewController::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTabViewController; + unsafe impl ClassType for NSTabViewController { + type Super = NSViewController; + } +); +extern_methods!( + unsafe impl NSTabViewController { + #[method(tabStyle)] + pub unsafe fn tabStyle(&self) -> NSTabViewControllerTabStyle; + #[method(setTabStyle:)] + pub unsafe fn setTabStyle(&self, tabStyle: NSTabViewControllerTabStyle); + #[method_id(tabView)] + pub unsafe fn tabView(&self) -> Id; + #[method(setTabView:)] + pub unsafe fn setTabView(&self, tabView: &NSTabView); + #[method(transitionOptions)] + pub unsafe fn transitionOptions(&self) -> NSViewControllerTransitionOptions; + #[method(setTransitionOptions:)] + pub unsafe fn setTransitionOptions( + &self, + transitionOptions: NSViewControllerTransitionOptions, + ); + #[method(canPropagateSelectedChildViewControllerTitle)] + pub unsafe fn canPropagateSelectedChildViewControllerTitle(&self) -> bool; + #[method(setCanPropagateSelectedChildViewControllerTitle:)] + pub unsafe fn setCanPropagateSelectedChildViewControllerTitle( + &self, + canPropagateSelectedChildViewControllerTitle: bool, + ); + #[method_id(tabViewItems)] + pub unsafe fn tabViewItems(&self) -> Id, Shared>; + #[method(setTabViewItems:)] + pub unsafe fn setTabViewItems(&self, tabViewItems: &NSArray); + #[method(selectedTabViewItemIndex)] + pub unsafe fn selectedTabViewItemIndex(&self) -> NSInteger; + #[method(setSelectedTabViewItemIndex:)] + pub unsafe fn setSelectedTabViewItemIndex(&self, selectedTabViewItemIndex: NSInteger); + #[method(addTabViewItem:)] + pub unsafe fn addTabViewItem(&self, tabViewItem: &NSTabViewItem); + #[method(insertTabViewItem:atIndex:)] + pub unsafe fn insertTabViewItem_atIndex( + &self, + tabViewItem: &NSTabViewItem, + index: NSInteger, + ); + #[method(removeTabViewItem:)] + pub unsafe fn removeTabViewItem(&self, tabViewItem: &NSTabViewItem); + #[method_id(tabViewItemForViewController:)] + pub unsafe fn tabViewItemForViewController( + &self, + viewController: &NSViewController, + ) -> Option>; + #[method(viewDidLoad)] + pub unsafe fn viewDidLoad(&self); + #[method(tabView:willSelectTabViewItem:)] + pub unsafe fn tabView_willSelectTabViewItem( + &self, + tabView: &NSTabView, + tabViewItem: Option<&NSTabViewItem>, + ); + #[method(tabView:didSelectTabViewItem:)] + pub unsafe fn tabView_didSelectTabViewItem( + &self, + tabView: &NSTabView, + tabViewItem: Option<&NSTabViewItem>, + ); + #[method(tabView:shouldSelectTabViewItem:)] + pub unsafe fn tabView_shouldSelectTabViewItem( + &self, + tabView: &NSTabView, + tabViewItem: Option<&NSTabViewItem>, + ) -> bool; + #[method_id(toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:)] + pub unsafe fn toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar( + &self, + toolbar: &NSToolbar, + itemIdentifier: &NSToolbarItemIdentifier, + flag: bool, + ) -> Option>; + #[method_id(toolbarDefaultItemIdentifiers:)] + pub unsafe fn toolbarDefaultItemIdentifiers( + &self, + toolbar: &NSToolbar, + ) -> Id, Shared>; + #[method_id(toolbarAllowedItemIdentifiers:)] + pub unsafe fn toolbarAllowedItemIdentifiers( + &self, + toolbar: &NSToolbar, + ) -> Id, Shared>; + #[method_id(toolbarSelectableItemIdentifiers:)] + pub unsafe fn toolbarSelectableItemIdentifiers( + &self, + toolbar: &NSToolbar, + ) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs new file mode 100644 index 000000000..84c22453a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs @@ -0,0 +1,70 @@ +use super::__exported::NSColor; +use super::__exported::NSImage; +use super::__exported::NSTabView; +use super::__exported::NSView; +use super::__exported::NSViewController; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTabViewItem; + unsafe impl ClassType for NSTabViewItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTabViewItem { + #[method_id(tabViewItemWithViewController:)] + pub unsafe fn tabViewItemWithViewController( + viewController: &NSViewController, + ) -> Id; + #[method_id(initWithIdentifier:)] + pub unsafe fn initWithIdentifier(&self, identifier: Option<&Object>) -> Id; + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Option>; + #[method(setIdentifier:)] + pub unsafe fn setIdentifier(&self, identifier: Option<&Object>); + #[method_id(color)] + pub unsafe fn color(&self) -> Id; + #[method(setColor:)] + pub unsafe fn setColor(&self, color: &NSColor); + #[method_id(label)] + pub unsafe fn label(&self) -> Id; + #[method(setLabel:)] + pub unsafe fn setLabel(&self, label: &NSString); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method(setView:)] + pub unsafe fn setView(&self, view: Option<&NSView>); + #[method_id(viewController)] + pub unsafe fn viewController(&self) -> Option>; + #[method(setViewController:)] + pub unsafe fn setViewController(&self, viewController: Option<&NSViewController>); + #[method(tabState)] + pub unsafe fn tabState(&self) -> NSTabState; + #[method_id(tabView)] + pub unsafe fn tabView(&self) -> Option>; + #[method_id(initialFirstResponder)] + pub unsafe fn initialFirstResponder(&self) -> Option>; + #[method(setInitialFirstResponder:)] + pub unsafe fn setInitialFirstResponder(&self, initialFirstResponder: Option<&NSView>); + #[method_id(toolTip)] + pub unsafe fn toolTip(&self) -> Option>; + #[method(setToolTip:)] + pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + #[method(drawLabel:inRect:)] + pub unsafe fn drawLabel_inRect(&self, shouldTruncateLabel: bool, labelRect: NSRect); + #[method(sizeOfLabel:)] + pub unsafe fn sizeOfLabel(&self, computeMin: bool) -> NSSize; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTableCellView.rs b/crates/icrate/src/generated/AppKit/NSTableCellView.rs new file mode 100644 index 000000000..3c165aa97 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTableCellView.rs @@ -0,0 +1,49 @@ +use super::__exported::NSDraggingImageComponent; +use super::__exported::NSImageView; +use super::__exported::NSTextField; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSNibDeclarations::*; +use crate::AppKit::generated::NSTableView::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTableCellView; + unsafe impl ClassType for NSTableCellView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSTableCellView { + #[method_id(objectValue)] + pub unsafe fn objectValue(&self) -> Option>; + #[method(setObjectValue:)] + pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); + #[method_id(textField)] + pub unsafe fn textField(&self) -> Option>; + #[method(setTextField:)] + pub unsafe fn setTextField(&self, textField: Option<&NSTextField>); + #[method_id(imageView)] + pub unsafe fn imageView(&self) -> Option>; + #[method(setImageView:)] + pub unsafe fn setImageView(&self, imageView: Option<&NSImageView>); + #[method(backgroundStyle)] + pub unsafe fn backgroundStyle(&self) -> NSBackgroundStyle; + #[method(setBackgroundStyle:)] + pub unsafe fn setBackgroundStyle(&self, backgroundStyle: NSBackgroundStyle); + #[method(rowSizeStyle)] + pub unsafe fn rowSizeStyle(&self) -> NSTableViewRowSizeStyle; + #[method(setRowSizeStyle:)] + pub unsafe fn setRowSizeStyle(&self, rowSizeStyle: NSTableViewRowSizeStyle); + #[method_id(draggingImageComponents)] + pub unsafe fn draggingImageComponents( + &self, + ) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs new file mode 100644 index 000000000..82e77eaab --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTableColumn.rs @@ -0,0 +1,99 @@ +use super::__exported::NSCell; +use super::__exported::NSImage; +use super::__exported::NSSortDescriptor; +use super::__exported::NSTableHeaderCell; +use super::__exported::NSTableView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTableColumn; + unsafe impl ClassType for NSTableColumn { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTableColumn { + #[method_id(initWithIdentifier:)] + pub unsafe fn initWithIdentifier( + &self, + identifier: &NSUserInterfaceItemIdentifier, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Id; + #[method(setIdentifier:)] + pub unsafe fn setIdentifier(&self, identifier: &NSUserInterfaceItemIdentifier); + #[method_id(tableView)] + pub unsafe fn tableView(&self) -> Option>; + #[method(setTableView:)] + pub unsafe fn setTableView(&self, tableView: Option<&NSTableView>); + #[method(width)] + pub unsafe fn width(&self) -> CGFloat; + #[method(setWidth:)] + pub unsafe fn setWidth(&self, width: CGFloat); + #[method(minWidth)] + pub unsafe fn minWidth(&self) -> CGFloat; + #[method(setMinWidth:)] + pub unsafe fn setMinWidth(&self, minWidth: CGFloat); + #[method(maxWidth)] + pub unsafe fn maxWidth(&self) -> CGFloat; + #[method(setMaxWidth:)] + pub unsafe fn setMaxWidth(&self, maxWidth: CGFloat); + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(headerCell)] + pub unsafe fn headerCell(&self) -> Id; + #[method(setHeaderCell:)] + pub unsafe fn setHeaderCell(&self, headerCell: &NSTableHeaderCell); + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] + pub unsafe fn setEditable(&self, editable: bool); + #[method(sizeToFit)] + pub unsafe fn sizeToFit(&self); + #[method_id(sortDescriptorPrototype)] + pub unsafe fn sortDescriptorPrototype(&self) -> Option>; + #[method(setSortDescriptorPrototype:)] + pub unsafe fn setSortDescriptorPrototype( + &self, + sortDescriptorPrototype: Option<&NSSortDescriptor>, + ); + #[method(resizingMask)] + pub unsafe fn resizingMask(&self) -> NSTableColumnResizingOptions; + #[method(setResizingMask:)] + pub unsafe fn setResizingMask(&self, resizingMask: NSTableColumnResizingOptions); + #[method_id(headerToolTip)] + pub unsafe fn headerToolTip(&self) -> Option>; + #[method(setHeaderToolTip:)] + pub unsafe fn setHeaderToolTip(&self, headerToolTip: Option<&NSString>); + #[method(isHidden)] + pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool); + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSTableColumn { + #[method(setResizable:)] + pub unsafe fn setResizable(&self, flag: bool); + #[method(isResizable)] + pub unsafe fn isResizable(&self) -> bool; + #[method_id(dataCell)] + pub unsafe fn dataCell(&self) -> Id; + #[method(setDataCell:)] + pub unsafe fn setDataCell(&self, dataCell: &Object); + #[method_id(dataCellForRow:)] + pub unsafe fn dataCellForRow(&self, row: NSInteger) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs new file mode 100644 index 000000000..8b397f037 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs @@ -0,0 +1,27 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextFieldCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTableHeaderCell; + unsafe impl ClassType for NSTableHeaderCell { + type Super = NSTextFieldCell; + } +); +extern_methods!( + unsafe impl NSTableHeaderCell { + #[method(drawSortIndicatorWithFrame:inView:ascending:priority:)] + pub unsafe fn drawSortIndicatorWithFrame_inView_ascending_priority( + &self, + cellFrame: NSRect, + controlView: &NSView, + ascending: bool, + priority: NSInteger, + ); + #[method(sortIndicatorRectForBounds:)] + pub unsafe fn sortIndicatorRectForBounds(&self, rect: NSRect) -> NSRect; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs new file mode 100644 index 000000000..2d7d5aad6 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs @@ -0,0 +1,35 @@ +use super::__exported::NSColor; +use super::__exported::NSCursor; +use super::__exported::NSImage; +use super::__exported::NSTableView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTableHeaderView; + unsafe impl ClassType for NSTableHeaderView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSTableHeaderView { + #[method_id(tableView)] + pub unsafe fn tableView(&self) -> Option>; + #[method(setTableView:)] + pub unsafe fn setTableView(&self, tableView: Option<&NSTableView>); + #[method(draggedColumn)] + pub unsafe fn draggedColumn(&self) -> NSInteger; + #[method(draggedDistance)] + pub unsafe fn draggedDistance(&self) -> CGFloat; + #[method(resizedColumn)] + pub unsafe fn resizedColumn(&self) -> NSInteger; + #[method(headerRectOfColumn:)] + pub unsafe fn headerRectOfColumn(&self, column: NSInteger) -> NSRect; + #[method(columnAtPoint:)] + pub unsafe fn columnAtPoint(&self, point: NSPoint) -> NSInteger; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTableRowView.rs b/crates/icrate/src/generated/AppKit/NSTableRowView.rs new file mode 100644 index 000000000..57483d34d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTableRowView.rs @@ -0,0 +1,87 @@ +use super::__exported::NSLayoutConstraint; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSTableView::*; +use crate::AppKit::generated::NSView::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTableRowView; + unsafe impl ClassType for NSTableRowView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSTableRowView { + #[method(selectionHighlightStyle)] + pub unsafe fn selectionHighlightStyle(&self) -> NSTableViewSelectionHighlightStyle; + #[method(setSelectionHighlightStyle:)] + pub unsafe fn setSelectionHighlightStyle( + &self, + selectionHighlightStyle: NSTableViewSelectionHighlightStyle, + ); + #[method(isEmphasized)] + pub unsafe fn isEmphasized(&self) -> bool; + #[method(setEmphasized:)] + pub unsafe fn setEmphasized(&self, emphasized: bool); + #[method(isGroupRowStyle)] + pub unsafe fn isGroupRowStyle(&self) -> bool; + #[method(setGroupRowStyle:)] + pub unsafe fn setGroupRowStyle(&self, groupRowStyle: bool); + #[method(isSelected)] + pub unsafe fn isSelected(&self) -> bool; + #[method(setSelected:)] + pub unsafe fn setSelected(&self, selected: bool); + #[method(isPreviousRowSelected)] + pub unsafe fn isPreviousRowSelected(&self) -> bool; + #[method(setPreviousRowSelected:)] + pub unsafe fn setPreviousRowSelected(&self, previousRowSelected: bool); + #[method(isNextRowSelected)] + pub unsafe fn isNextRowSelected(&self) -> bool; + #[method(setNextRowSelected:)] + pub unsafe fn setNextRowSelected(&self, nextRowSelected: bool); + #[method(isFloating)] + pub unsafe fn isFloating(&self) -> bool; + #[method(setFloating:)] + pub unsafe fn setFloating(&self, floating: bool); + #[method(isTargetForDropOperation)] + pub unsafe fn isTargetForDropOperation(&self) -> bool; + #[method(setTargetForDropOperation:)] + pub unsafe fn setTargetForDropOperation(&self, targetForDropOperation: bool); + #[method(draggingDestinationFeedbackStyle)] + pub unsafe fn draggingDestinationFeedbackStyle( + &self, + ) -> NSTableViewDraggingDestinationFeedbackStyle; + #[method(setDraggingDestinationFeedbackStyle:)] + pub unsafe fn setDraggingDestinationFeedbackStyle( + &self, + draggingDestinationFeedbackStyle: NSTableViewDraggingDestinationFeedbackStyle, + ); + #[method(indentationForDropOperation)] + pub unsafe fn indentationForDropOperation(&self) -> CGFloat; + #[method(setIndentationForDropOperation:)] + pub unsafe fn setIndentationForDropOperation(&self, indentationForDropOperation: CGFloat); + #[method(interiorBackgroundStyle)] + pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle; + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(drawBackgroundInRect:)] + pub unsafe fn drawBackgroundInRect(&self, dirtyRect: NSRect); + #[method(drawSelectionInRect:)] + pub unsafe fn drawSelectionInRect(&self, dirtyRect: NSRect); + #[method(drawSeparatorInRect:)] + pub unsafe fn drawSeparatorInRect(&self, dirtyRect: NSRect); + #[method(drawDraggingDestinationFeedbackInRect:)] + pub unsafe fn drawDraggingDestinationFeedbackInRect(&self, dirtyRect: NSRect); + #[method_id(viewAtColumn:)] + pub unsafe fn viewAtColumn(&self, column: NSInteger) -> Option>; + #[method(numberOfColumns)] + pub unsafe fn numberOfColumns(&self) -> NSInteger; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs new file mode 100644 index 000000000..300ad2f06 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -0,0 +1,486 @@ +use super::__exported::NSIndexSet; +use super::__exported::NSMutableIndexSet; +use super::__exported::NSNib; +use super::__exported::NSSortDescriptor; +use super::__exported::NSTableColumn; +use super::__exported::NSTableHeaderView; +use super::__exported::NSTableRowView; +use super::__exported::NSTableViewRowAction; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSDragging::*; +use crate::AppKit::generated::NSTextView::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTableViewAutosaveName = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSTableView; + unsafe impl ClassType for NSTableView { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSTableView { + #[method_id(initWithFrame:)] + pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(dataSource)] + pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] + pub unsafe fn setDataSource(&self, dataSource: Option<&NSTableViewDataSource>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTableViewDelegate>); + #[method_id(headerView)] + pub unsafe fn headerView(&self) -> Option>; + #[method(setHeaderView:)] + pub unsafe fn setHeaderView(&self, headerView: Option<&NSTableHeaderView>); + #[method_id(cornerView)] + pub unsafe fn cornerView(&self) -> Option>; + #[method(setCornerView:)] + pub unsafe fn setCornerView(&self, cornerView: Option<&NSView>); + #[method(allowsColumnReordering)] + pub unsafe fn allowsColumnReordering(&self) -> bool; + #[method(setAllowsColumnReordering:)] + pub unsafe fn setAllowsColumnReordering(&self, allowsColumnReordering: bool); + #[method(allowsColumnResizing)] + pub unsafe fn allowsColumnResizing(&self) -> bool; + #[method(setAllowsColumnResizing:)] + pub unsafe fn setAllowsColumnResizing(&self, allowsColumnResizing: bool); + #[method(columnAutoresizingStyle)] + pub unsafe fn columnAutoresizingStyle(&self) -> NSTableViewColumnAutoresizingStyle; + #[method(setColumnAutoresizingStyle:)] + pub unsafe fn setColumnAutoresizingStyle( + &self, + columnAutoresizingStyle: NSTableViewColumnAutoresizingStyle, + ); + #[method(gridStyleMask)] + pub unsafe fn gridStyleMask(&self) -> NSTableViewGridLineStyle; + #[method(setGridStyleMask:)] + pub unsafe fn setGridStyleMask(&self, gridStyleMask: NSTableViewGridLineStyle); + #[method(intercellSpacing)] + pub unsafe fn intercellSpacing(&self) -> NSSize; + #[method(setIntercellSpacing:)] + pub unsafe fn setIntercellSpacing(&self, intercellSpacing: NSSize); + #[method(usesAlternatingRowBackgroundColors)] + pub unsafe fn usesAlternatingRowBackgroundColors(&self) -> bool; + #[method(setUsesAlternatingRowBackgroundColors:)] + pub unsafe fn setUsesAlternatingRowBackgroundColors( + &self, + usesAlternatingRowBackgroundColors: bool, + ); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method_id(gridColor)] + pub unsafe fn gridColor(&self) -> Id; + #[method(setGridColor:)] + pub unsafe fn setGridColor(&self, gridColor: &NSColor); + #[method(rowSizeStyle)] + pub unsafe fn rowSizeStyle(&self) -> NSTableViewRowSizeStyle; + #[method(setRowSizeStyle:)] + pub unsafe fn setRowSizeStyle(&self, rowSizeStyle: NSTableViewRowSizeStyle); + #[method(effectiveRowSizeStyle)] + pub unsafe fn effectiveRowSizeStyle(&self) -> NSTableViewRowSizeStyle; + #[method(rowHeight)] + pub unsafe fn rowHeight(&self) -> CGFloat; + #[method(setRowHeight:)] + pub unsafe fn setRowHeight(&self, rowHeight: CGFloat); + #[method(noteHeightOfRowsWithIndexesChanged:)] + pub unsafe fn noteHeightOfRowsWithIndexesChanged(&self, indexSet: &NSIndexSet); + #[method_id(tableColumns)] + pub unsafe fn tableColumns(&self) -> Id, Shared>; + #[method(numberOfColumns)] + pub unsafe fn numberOfColumns(&self) -> NSInteger; + #[method(numberOfRows)] + pub unsafe fn numberOfRows(&self) -> NSInteger; + #[method(addTableColumn:)] + pub unsafe fn addTableColumn(&self, tableColumn: &NSTableColumn); + #[method(removeTableColumn:)] + pub unsafe fn removeTableColumn(&self, tableColumn: &NSTableColumn); + #[method(moveColumn:toColumn:)] + pub unsafe fn moveColumn_toColumn(&self, oldIndex: NSInteger, newIndex: NSInteger); + #[method(columnWithIdentifier:)] + pub unsafe fn columnWithIdentifier( + &self, + identifier: &NSUserInterfaceItemIdentifier, + ) -> NSInteger; + #[method_id(tableColumnWithIdentifier:)] + pub unsafe fn tableColumnWithIdentifier( + &self, + identifier: &NSUserInterfaceItemIdentifier, + ) -> Option>; + #[method(tile)] + pub unsafe fn tile(&self); + #[method(sizeToFit)] + pub unsafe fn sizeToFit(&self); + #[method(sizeLastColumnToFit)] + pub unsafe fn sizeLastColumnToFit(&self); + #[method(scrollRowToVisible:)] + pub unsafe fn scrollRowToVisible(&self, row: NSInteger); + #[method(scrollColumnToVisible:)] + pub unsafe fn scrollColumnToVisible(&self, column: NSInteger); + #[method(reloadData)] + pub unsafe fn reloadData(&self); + #[method(noteNumberOfRowsChanged)] + pub unsafe fn noteNumberOfRowsChanged(&self); + #[method(reloadDataForRowIndexes:columnIndexes:)] + pub unsafe fn reloadDataForRowIndexes_columnIndexes( + &self, + rowIndexes: &NSIndexSet, + columnIndexes: &NSIndexSet, + ); + #[method(editedColumn)] + pub unsafe fn editedColumn(&self) -> NSInteger; + #[method(editedRow)] + pub unsafe fn editedRow(&self) -> NSInteger; + #[method(clickedColumn)] + pub unsafe fn clickedColumn(&self) -> NSInteger; + #[method(clickedRow)] + pub unsafe fn clickedRow(&self) -> NSInteger; + #[method(doubleAction)] + pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] + pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method_id(sortDescriptors)] + pub unsafe fn sortDescriptors(&self) -> Id, Shared>; + #[method(setSortDescriptors:)] + pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); + #[method(setIndicatorImage:inTableColumn:)] + pub unsafe fn setIndicatorImage_inTableColumn( + &self, + image: Option<&NSImage>, + tableColumn: &NSTableColumn, + ); + #[method_id(indicatorImageInTableColumn:)] + pub unsafe fn indicatorImageInTableColumn( + &self, + tableColumn: &NSTableColumn, + ) -> Option>; + #[method_id(highlightedTableColumn)] + pub unsafe fn highlightedTableColumn(&self) -> Option>; + #[method(setHighlightedTableColumn:)] + pub unsafe fn setHighlightedTableColumn( + &self, + highlightedTableColumn: Option<&NSTableColumn>, + ); + #[method(verticalMotionCanBeginDrag)] + pub unsafe fn verticalMotionCanBeginDrag(&self) -> bool; + #[method(setVerticalMotionCanBeginDrag:)] + pub unsafe fn setVerticalMotionCanBeginDrag(&self, verticalMotionCanBeginDrag: bool); + #[method(canDragRowsWithIndexes:atPoint:)] + pub unsafe fn canDragRowsWithIndexes_atPoint( + &self, + rowIndexes: &NSIndexSet, + mouseDownPoint: NSPoint, + ) -> bool; + #[method_id(dragImageForRowsWithIndexes:tableColumns:event:offset:)] + pub unsafe fn dragImageForRowsWithIndexes_tableColumns_event_offset( + &self, + dragRows: &NSIndexSet, + tableColumns: &NSArray, + dragEvent: &NSEvent, + dragImageOffset: NSPointPointer, + ) -> Id; + #[method(setDraggingSourceOperationMask:forLocal:)] + pub unsafe fn setDraggingSourceOperationMask_forLocal( + &self, + mask: NSDragOperation, + isLocal: bool, + ); + #[method(setDropRow:dropOperation:)] + pub unsafe fn setDropRow_dropOperation( + &self, + row: NSInteger, + dropOperation: NSTableViewDropOperation, + ); + #[method(allowsMultipleSelection)] + pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[method(setAllowsMultipleSelection:)] + pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool); + #[method(allowsEmptySelection)] + pub unsafe fn allowsEmptySelection(&self) -> bool; + #[method(setAllowsEmptySelection:)] + pub unsafe fn setAllowsEmptySelection(&self, allowsEmptySelection: bool); + #[method(allowsColumnSelection)] + pub unsafe fn allowsColumnSelection(&self) -> bool; + #[method(setAllowsColumnSelection:)] + pub unsafe fn setAllowsColumnSelection(&self, allowsColumnSelection: bool); + #[method(selectAll:)] + pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[method(deselectAll:)] + pub unsafe fn deselectAll(&self, sender: Option<&Object>); + #[method(selectColumnIndexes:byExtendingSelection:)] + pub unsafe fn selectColumnIndexes_byExtendingSelection( + &self, + indexes: &NSIndexSet, + extend: bool, + ); + #[method(selectRowIndexes:byExtendingSelection:)] + pub unsafe fn selectRowIndexes_byExtendingSelection( + &self, + indexes: &NSIndexSet, + extend: bool, + ); + #[method_id(selectedColumnIndexes)] + pub unsafe fn selectedColumnIndexes(&self) -> Id; + #[method_id(selectedRowIndexes)] + pub unsafe fn selectedRowIndexes(&self) -> Id; + #[method(deselectColumn:)] + pub unsafe fn deselectColumn(&self, column: NSInteger); + #[method(deselectRow:)] + pub unsafe fn deselectRow(&self, row: NSInteger); + #[method(selectedColumn)] + pub unsafe fn selectedColumn(&self) -> NSInteger; + #[method(selectedRow)] + pub unsafe fn selectedRow(&self) -> NSInteger; + #[method(isColumnSelected:)] + pub unsafe fn isColumnSelected(&self, column: NSInteger) -> bool; + #[method(isRowSelected:)] + pub unsafe fn isRowSelected(&self, row: NSInteger) -> bool; + #[method(numberOfSelectedColumns)] + pub unsafe fn numberOfSelectedColumns(&self) -> NSInteger; + #[method(numberOfSelectedRows)] + pub unsafe fn numberOfSelectedRows(&self) -> NSInteger; + #[method(allowsTypeSelect)] + pub unsafe fn allowsTypeSelect(&self) -> bool; + #[method(setAllowsTypeSelect:)] + pub unsafe fn setAllowsTypeSelect(&self, allowsTypeSelect: bool); + #[method(style)] + pub unsafe fn style(&self) -> NSTableViewStyle; + #[method(setStyle:)] + pub unsafe fn setStyle(&self, style: NSTableViewStyle); + #[method(effectiveStyle)] + pub unsafe fn effectiveStyle(&self) -> NSTableViewStyle; + #[method(selectionHighlightStyle)] + pub unsafe fn selectionHighlightStyle(&self) -> NSTableViewSelectionHighlightStyle; + #[method(setSelectionHighlightStyle:)] + pub unsafe fn setSelectionHighlightStyle( + &self, + selectionHighlightStyle: NSTableViewSelectionHighlightStyle, + ); + #[method(draggingDestinationFeedbackStyle)] + pub unsafe fn draggingDestinationFeedbackStyle( + &self, + ) -> NSTableViewDraggingDestinationFeedbackStyle; + #[method(setDraggingDestinationFeedbackStyle:)] + pub unsafe fn setDraggingDestinationFeedbackStyle( + &self, + draggingDestinationFeedbackStyle: NSTableViewDraggingDestinationFeedbackStyle, + ); + #[method(rectOfColumn:)] + pub unsafe fn rectOfColumn(&self, column: NSInteger) -> NSRect; + #[method(rectOfRow:)] + pub unsafe fn rectOfRow(&self, row: NSInteger) -> NSRect; + #[method_id(columnIndexesInRect:)] + pub unsafe fn columnIndexesInRect(&self, rect: NSRect) -> Id; + #[method(rowsInRect:)] + pub unsafe fn rowsInRect(&self, rect: NSRect) -> NSRange; + #[method(columnAtPoint:)] + pub unsafe fn columnAtPoint(&self, point: NSPoint) -> NSInteger; + #[method(rowAtPoint:)] + pub unsafe fn rowAtPoint(&self, point: NSPoint) -> NSInteger; + #[method(frameOfCellAtColumn:row:)] + pub unsafe fn frameOfCellAtColumn_row(&self, column: NSInteger, row: NSInteger) -> NSRect; + #[method_id(autosaveName)] + pub unsafe fn autosaveName(&self) -> Option>; + #[method(setAutosaveName:)] + pub unsafe fn setAutosaveName(&self, autosaveName: Option<&NSTableViewAutosaveName>); + #[method(autosaveTableColumns)] + pub unsafe fn autosaveTableColumns(&self) -> bool; + #[method(setAutosaveTableColumns:)] + pub unsafe fn setAutosaveTableColumns(&self, autosaveTableColumns: bool); + #[method(editColumn:row:withEvent:select:)] + pub unsafe fn editColumn_row_withEvent_select( + &self, + column: NSInteger, + row: NSInteger, + event: Option<&NSEvent>, + select: bool, + ); + #[method(drawRow:clipRect:)] + pub unsafe fn drawRow_clipRect(&self, row: NSInteger, clipRect: NSRect); + #[method(highlightSelectionInClipRect:)] + pub unsafe fn highlightSelectionInClipRect(&self, clipRect: NSRect); + #[method(drawGridInClipRect:)] + pub unsafe fn drawGridInClipRect(&self, clipRect: NSRect); + #[method(drawBackgroundInClipRect:)] + pub unsafe fn drawBackgroundInClipRect(&self, clipRect: NSRect); + #[method_id(viewAtColumn:row:makeIfNecessary:)] + pub unsafe fn viewAtColumn_row_makeIfNecessary( + &self, + column: NSInteger, + row: NSInteger, + makeIfNecessary: bool, + ) -> Option>; + #[method_id(rowViewAtRow:makeIfNecessary:)] + pub unsafe fn rowViewAtRow_makeIfNecessary( + &self, + row: NSInteger, + makeIfNecessary: bool, + ) -> Option>; + #[method(rowForView:)] + pub unsafe fn rowForView(&self, view: &NSView) -> NSInteger; + #[method(columnForView:)] + pub unsafe fn columnForView(&self, view: &NSView) -> NSInteger; + #[method_id(makeViewWithIdentifier:owner:)] + pub unsafe fn makeViewWithIdentifier_owner( + &self, + identifier: &NSUserInterfaceItemIdentifier, + owner: Option<&Object>, + ) -> Option>; + #[method(enumerateAvailableRowViewsUsingBlock:)] + pub unsafe fn enumerateAvailableRowViewsUsingBlock(&self, handler: TodoBlock); + #[method(floatsGroupRows)] + pub unsafe fn floatsGroupRows(&self) -> bool; + #[method(setFloatsGroupRows:)] + pub unsafe fn setFloatsGroupRows(&self, floatsGroupRows: bool); + #[method(rowActionsVisible)] + pub unsafe fn rowActionsVisible(&self) -> bool; + #[method(setRowActionsVisible:)] + pub unsafe fn setRowActionsVisible(&self, rowActionsVisible: bool); + #[method(beginUpdates)] + pub unsafe fn beginUpdates(&self); + #[method(endUpdates)] + pub unsafe fn endUpdates(&self); + #[method(insertRowsAtIndexes:withAnimation:)] + pub unsafe fn insertRowsAtIndexes_withAnimation( + &self, + indexes: &NSIndexSet, + animationOptions: NSTableViewAnimationOptions, + ); + #[method(removeRowsAtIndexes:withAnimation:)] + pub unsafe fn removeRowsAtIndexes_withAnimation( + &self, + indexes: &NSIndexSet, + animationOptions: NSTableViewAnimationOptions, + ); + #[method(moveRowAtIndex:toIndex:)] + pub unsafe fn moveRowAtIndex_toIndex(&self, oldIndex: NSInteger, newIndex: NSInteger); + #[method(hideRowsAtIndexes:withAnimation:)] + pub unsafe fn hideRowsAtIndexes_withAnimation( + &self, + indexes: &NSIndexSet, + rowAnimation: NSTableViewAnimationOptions, + ); + #[method(unhideRowsAtIndexes:withAnimation:)] + pub unsafe fn unhideRowsAtIndexes_withAnimation( + &self, + indexes: &NSIndexSet, + rowAnimation: NSTableViewAnimationOptions, + ); + #[method_id(hiddenRowIndexes)] + pub unsafe fn hiddenRowIndexes(&self) -> Id; + #[method(registerNib:forIdentifier:)] + pub unsafe fn registerNib_forIdentifier( + &self, + nib: Option<&NSNib>, + identifier: &NSUserInterfaceItemIdentifier, + ); + #[method_id(registeredNibsByIdentifier)] + pub unsafe fn registeredNibsByIdentifier( + &self, + ) -> Option, Shared>>; + #[method(didAddRowView:forRow:)] + pub unsafe fn didAddRowView_forRow(&self, rowView: &NSTableRowView, row: NSInteger); + #[method(didRemoveRowView:forRow:)] + pub unsafe fn didRemoveRowView_forRow(&self, rowView: &NSTableRowView, row: NSInteger); + #[method(usesStaticContents)] + pub unsafe fn usesStaticContents(&self) -> bool; + #[method(setUsesStaticContents:)] + pub unsafe fn setUsesStaticContents(&self, usesStaticContents: bool); + #[method(userInterfaceLayoutDirection)] + pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setUserInterfaceLayoutDirection:)] + pub unsafe fn setUserInterfaceLayoutDirection( + &self, + userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, + ); + #[method(usesAutomaticRowHeights)] + pub unsafe fn usesAutomaticRowHeights(&self) -> bool; + #[method(setUsesAutomaticRowHeights:)] + pub unsafe fn setUsesAutomaticRowHeights(&self, usesAutomaticRowHeights: bool); + } +); +pub type NSTableViewDelegate = NSObject; +pub type NSTableViewDataSource = NSObject; +extern_methods!( + #[doc = "NSTableViewDataSourceDeprecated"] + unsafe impl NSObject { + #[method(tableView:writeRows:toPasteboard:)] + pub unsafe fn tableView_writeRows_toPasteboard( + &self, + tableView: &NSTableView, + rows: &NSArray, + pboard: &NSPasteboard, + ) -> bool; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSTableView { + #[method(setDrawsGrid:)] + pub unsafe fn setDrawsGrid(&self, flag: bool); + #[method(drawsGrid)] + pub unsafe fn drawsGrid(&self) -> bool; + #[method(selectColumn:byExtendingSelection:)] + pub unsafe fn selectColumn_byExtendingSelection(&self, column: NSInteger, extend: bool); + #[method(selectRow:byExtendingSelection:)] + pub unsafe fn selectRow_byExtendingSelection(&self, row: NSInteger, extend: bool); + #[method_id(selectedColumnEnumerator)] + pub unsafe fn selectedColumnEnumerator(&self) -> Id; + #[method_id(selectedRowEnumerator)] + pub unsafe fn selectedRowEnumerator(&self) -> Id; + #[method_id(dragImageForRows:event:dragImageOffset:)] + pub unsafe fn dragImageForRows_event_dragImageOffset( + &self, + dragRows: &NSArray, + dragEvent: &NSEvent, + dragImageOffset: NSPointPointer, + ) -> Option>; + #[method(setAutoresizesAllColumnsToFit:)] + pub unsafe fn setAutoresizesAllColumnsToFit(&self, flag: bool); + #[method(autoresizesAllColumnsToFit)] + pub unsafe fn autoresizesAllColumnsToFit(&self) -> bool; + #[method(columnsInRect:)] + pub unsafe fn columnsInRect(&self, rect: NSRect) -> NSRange; + #[method_id(preparedCellAtColumn:row:)] + pub unsafe fn preparedCellAtColumn_row( + &self, + column: NSInteger, + row: NSInteger, + ) -> Option>; + #[method(textShouldBeginEditing:)] + pub unsafe fn textShouldBeginEditing(&self, textObject: &NSText) -> bool; + #[method(textShouldEndEditing:)] + pub unsafe fn textShouldEndEditing(&self, textObject: &NSText) -> bool; + #[method(textDidBeginEditing:)] + pub unsafe fn textDidBeginEditing(&self, notification: &NSNotification); + #[method(textDidEndEditing:)] + pub unsafe fn textDidEndEditing(&self, notification: &NSNotification); + #[method(textDidChange:)] + pub unsafe fn textDidChange(&self, notification: &NSNotification); + #[method(shouldFocusCell:atColumn:row:)] + pub unsafe fn shouldFocusCell_atColumn_row( + &self, + cell: &NSCell, + column: NSInteger, + row: NSInteger, + ) -> bool; + #[method(focusedColumn)] + pub unsafe fn focusedColumn(&self) -> NSInteger; + #[method(setFocusedColumn:)] + pub unsafe fn setFocusedColumn(&self, focusedColumn: NSInteger); + #[method(performClickOnCellAtColumn:row:)] + pub unsafe fn performClickOnCellAtColumn_row(&self, column: NSInteger, row: NSInteger); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs new file mode 100644 index 000000000..b1dca9b6c --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -0,0 +1,94 @@ +use super::__exported::NSDiffableDataSourceSnapshot; +use super::__exported::NSTableCellView; +use super::__exported::NSTableRowView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTableView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +__inner_extern_class!( + #[derive(Debug)] + pub struct NSTableViewDiffableDataSource< + SectionIdentifierType: Message, + ItemIdentifierType: Message, + >; + unsafe impl ClassType + for NSTableViewDiffableDataSource + { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl + NSTableViewDiffableDataSource + { + #[method_id(initWithTableView:cellProvider:)] + pub unsafe fn initWithTableView_cellProvider( + &self, + tableView: &NSTableView, + cellProvider: NSTableViewDiffableDataSourceCellProvider, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method_id(snapshot)] + pub unsafe fn snapshot( + &self, + ) -> Id, Shared>; + #[method(applySnapshot:animatingDifferences:)] + pub unsafe fn applySnapshot_animatingDifferences( + &self, + snapshot: &NSDiffableDataSourceSnapshot, + animatingDifferences: bool, + ); + #[method(applySnapshot:animatingDifferences:completion:)] + pub unsafe fn applySnapshot_animatingDifferences_completion( + &self, + snapshot: &NSDiffableDataSourceSnapshot, + animatingDifferences: bool, + completion: TodoBlock, + ); + #[method_id(itemIdentifierForRow:)] + pub unsafe fn itemIdentifierForRow( + &self, + row: NSInteger, + ) -> Option>; + #[method(rowForItemIdentifier:)] + pub unsafe fn rowForItemIdentifier(&self, identifier: &ItemIdentifierType) -> NSInteger; + #[method_id(sectionIdentifierForRow:)] + pub unsafe fn sectionIdentifierForRow( + &self, + row: NSInteger, + ) -> Option>; + #[method(rowForSectionIdentifier:)] + pub unsafe fn rowForSectionIdentifier( + &self, + identifier: &SectionIdentifierType, + ) -> NSInteger; + #[method(rowViewProvider)] + pub unsafe fn rowViewProvider(&self) -> NSTableViewDiffableDataSourceRowProvider; + #[method(setRowViewProvider:)] + pub unsafe fn setRowViewProvider( + &self, + rowViewProvider: NSTableViewDiffableDataSourceRowProvider, + ); + #[method(sectionHeaderViewProvider)] + pub unsafe fn sectionHeaderViewProvider( + &self, + ) -> NSTableViewDiffableDataSourceSectionHeaderViewProvider; + #[method(setSectionHeaderViewProvider:)] + pub unsafe fn setSectionHeaderViewProvider( + &self, + sectionHeaderViewProvider: NSTableViewDiffableDataSourceSectionHeaderViewProvider, + ); + #[method(defaultRowAnimation)] + pub unsafe fn defaultRowAnimation(&self) -> NSTableViewAnimationOptions; + #[method(setDefaultRowAnimation:)] + pub unsafe fn setDefaultRowAnimation( + &self, + defaultRowAnimation: NSTableViewAnimationOptions, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs new file mode 100644 index 000000000..61bc362a6 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs @@ -0,0 +1,40 @@ +use super::__exported::NSButton; +use super::__exported::NSColor; +use super::__exported::NSImage; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTableViewRowAction; + unsafe impl ClassType for NSTableViewRowAction { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTableViewRowAction { + #[method_id(rowActionWithStyle:title:handler:)] + pub unsafe fn rowActionWithStyle_title_handler( + style: NSTableViewRowActionStyle, + title: &NSString, + handler: TodoBlock, + ) -> Id; + #[method(style)] + pub unsafe fn style(&self) -> NSTableViewRowActionStyle; + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs new file mode 100644 index 000000000..7d652b260 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -0,0 +1,166 @@ +use super::__exported::NSColor; +use super::__exported::NSFont; +use super::__exported::NSNotification; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSSpellProtocol::*; +use crate::AppKit::generated::NSView::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSText; + unsafe impl ClassType for NSText { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSText { + #[method_id(initWithFrame:)] + pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(string)] + pub unsafe fn string(&self) -> Id; + #[method(setString:)] + pub unsafe fn setString(&self, string: &NSString); + #[method(replaceCharactersInRange:withString:)] + pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, string: &NSString); + #[method(replaceCharactersInRange:withRTF:)] + pub unsafe fn replaceCharactersInRange_withRTF(&self, range: NSRange, rtfData: &NSData); + #[method(replaceCharactersInRange:withRTFD:)] + pub unsafe fn replaceCharactersInRange_withRTFD(&self, range: NSRange, rtfdData: &NSData); + #[method_id(RTFFromRange:)] + pub unsafe fn RTFFromRange(&self, range: NSRange) -> Option>; + #[method_id(RTFDFromRange:)] + pub unsafe fn RTFDFromRange(&self, range: NSRange) -> Option>; + #[method(writeRTFDToFile:atomically:)] + pub unsafe fn writeRTFDToFile_atomically(&self, path: &NSString, flag: bool) -> bool; + #[method(readRTFDFromFile:)] + pub unsafe fn readRTFDFromFile(&self, path: &NSString) -> bool; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextDelegate>); + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] + pub unsafe fn setEditable(&self, editable: bool); + #[method(isSelectable)] + pub unsafe fn isSelectable(&self) -> bool; + #[method(setSelectable:)] + pub unsafe fn setSelectable(&self, selectable: bool); + #[method(isRichText)] + pub unsafe fn isRichText(&self) -> bool; + #[method(setRichText:)] + pub unsafe fn setRichText(&self, richText: bool); + #[method(importsGraphics)] + pub unsafe fn importsGraphics(&self) -> bool; + #[method(setImportsGraphics:)] + pub unsafe fn setImportsGraphics(&self, importsGraphics: bool); + #[method(isFieldEditor)] + pub unsafe fn isFieldEditor(&self) -> bool; + #[method(setFieldEditor:)] + pub unsafe fn setFieldEditor(&self, fieldEditor: bool); + #[method(usesFontPanel)] + pub unsafe fn usesFontPanel(&self) -> bool; + #[method(setUsesFontPanel:)] + pub unsafe fn setUsesFontPanel(&self, usesFontPanel: bool); + #[method(drawsBackground)] + pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] + pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(isRulerVisible)] + pub unsafe fn isRulerVisible(&self) -> bool; + #[method(selectedRange)] + pub unsafe fn selectedRange(&self) -> NSRange; + #[method(setSelectedRange:)] + pub unsafe fn setSelectedRange(&self, selectedRange: NSRange); + #[method(scrollRangeToVisible:)] + pub unsafe fn scrollRangeToVisible(&self, range: NSRange); + #[method_id(font)] + pub unsafe fn font(&self) -> Option>; + #[method(setFont:)] + pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[method_id(textColor)] + pub unsafe fn textColor(&self) -> Option>; + #[method(setTextColor:)] + pub unsafe fn setTextColor(&self, textColor: Option<&NSColor>); + #[method(alignment)] + pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(setAlignment:)] + pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[method(baseWritingDirection)] + pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[method(setBaseWritingDirection:)] + pub unsafe fn setBaseWritingDirection(&self, baseWritingDirection: NSWritingDirection); + #[method(setTextColor:range:)] + pub unsafe fn setTextColor_range(&self, color: Option<&NSColor>, range: NSRange); + #[method(setFont:range:)] + pub unsafe fn setFont_range(&self, font: &NSFont, range: NSRange); + #[method(maxSize)] + pub unsafe fn maxSize(&self) -> NSSize; + #[method(setMaxSize:)] + pub unsafe fn setMaxSize(&self, maxSize: NSSize); + #[method(minSize)] + pub unsafe fn minSize(&self) -> NSSize; + #[method(setMinSize:)] + pub unsafe fn setMinSize(&self, minSize: NSSize); + #[method(isHorizontallyResizable)] + pub unsafe fn isHorizontallyResizable(&self) -> bool; + #[method(setHorizontallyResizable:)] + pub unsafe fn setHorizontallyResizable(&self, horizontallyResizable: bool); + #[method(isVerticallyResizable)] + pub unsafe fn isVerticallyResizable(&self) -> bool; + #[method(setVerticallyResizable:)] + pub unsafe fn setVerticallyResizable(&self, verticallyResizable: bool); + #[method(sizeToFit)] + pub unsafe fn sizeToFit(&self); + #[method(copy:)] + pub unsafe fn copy(&self, sender: Option<&Object>); + #[method(copyFont:)] + pub unsafe fn copyFont(&self, sender: Option<&Object>); + #[method(copyRuler:)] + pub unsafe fn copyRuler(&self, sender: Option<&Object>); + #[method(cut:)] + pub unsafe fn cut(&self, sender: Option<&Object>); + #[method(delete:)] + pub unsafe fn delete(&self, sender: Option<&Object>); + #[method(paste:)] + pub unsafe fn paste(&self, sender: Option<&Object>); + #[method(pasteFont:)] + pub unsafe fn pasteFont(&self, sender: Option<&Object>); + #[method(pasteRuler:)] + pub unsafe fn pasteRuler(&self, sender: Option<&Object>); + #[method(selectAll:)] + pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[method(changeFont:)] + pub unsafe fn changeFont(&self, sender: Option<&Object>); + #[method(alignLeft:)] + pub unsafe fn alignLeft(&self, sender: Option<&Object>); + #[method(alignRight:)] + pub unsafe fn alignRight(&self, sender: Option<&Object>); + #[method(alignCenter:)] + pub unsafe fn alignCenter(&self, sender: Option<&Object>); + #[method(subscript:)] + pub unsafe fn subscript(&self, sender: Option<&Object>); + #[method(superscript:)] + pub unsafe fn superscript(&self, sender: Option<&Object>); + #[method(underline:)] + pub unsafe fn underline(&self, sender: Option<&Object>); + #[method(unscript:)] + pub unsafe fn unscript(&self, sender: Option<&Object>); + #[method(showGuessPanel:)] + pub unsafe fn showGuessPanel(&self, sender: Option<&Object>); + #[method(checkSpelling:)] + pub unsafe fn checkSpelling(&self, sender: Option<&Object>); + #[method(toggleRuler:)] + pub unsafe fn toggleRuler(&self, sender: Option<&Object>); + } +); +pub type NSTextDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs new file mode 100644 index 000000000..476502e57 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs @@ -0,0 +1,32 @@ +use super::__exported::NSString; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextAlternatives; + unsafe impl ClassType for NSTextAlternatives { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextAlternatives { + #[method_id(initWithPrimaryString:alternativeStrings:)] + pub unsafe fn initWithPrimaryString_alternativeStrings( + &self, + primaryString: &NSString, + alternativeStrings: &NSArray, + ) -> Id; + #[method_id(primaryString)] + pub unsafe fn primaryString(&self) -> Id; + #[method_id(alternativeStrings)] + pub unsafe fn alternativeStrings(&self) -> Id, Shared>; + #[method(noteSelectedAlternativeString:)] + pub unsafe fn noteSelectedAlternativeString(&self, alternativeString: &NSString); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs new file mode 100644 index 000000000..5cd3a5a55 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -0,0 +1,151 @@ +use super::__exported::NSFileWrapper; +use super::__exported::NSImage; +use super::__exported::NSLayoutManager; +use super::__exported::NSTextAttachmentCell; +use super::__exported::NSTextAttachmentCell; +use super::__exported::NSTextContainer; +use super::__exported::NSTextLayoutManager; +use super::__exported::NSTextLocation; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextAttachmentCell::*; +use crate::CoreGraphics::generated::CGGeometry::*; +use crate::Foundation::generated::NSAttributedString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextAttachmentContainer = NSObject; +pub type NSTextAttachmentLayout = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSTextAttachment; + unsafe impl ClassType for NSTextAttachment { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextAttachment { + #[method_id(initWithData:ofType:)] + pub unsafe fn initWithData_ofType( + &self, + contentData: Option<&NSData>, + uti: Option<&NSString>, + ) -> Id; + #[method_id(initWithFileWrapper:)] + pub unsafe fn initWithFileWrapper( + &self, + fileWrapper: Option<&NSFileWrapper>, + ) -> Id; + #[method_id(contents)] + pub unsafe fn contents(&self) -> Option>; + #[method(setContents:)] + pub unsafe fn setContents(&self, contents: Option<&NSData>); + #[method_id(fileType)] + pub unsafe fn fileType(&self) -> Option>; + #[method(setFileType:)] + pub unsafe fn setFileType(&self, fileType: Option<&NSString>); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method(bounds)] + pub unsafe fn bounds(&self) -> CGRect; + #[method(setBounds:)] + pub unsafe fn setBounds(&self, bounds: CGRect); + #[method_id(fileWrapper)] + pub unsafe fn fileWrapper(&self) -> Option>; + #[method(setFileWrapper:)] + pub unsafe fn setFileWrapper(&self, fileWrapper: Option<&NSFileWrapper>); + #[method_id(attachmentCell)] + pub unsafe fn attachmentCell(&self) -> Option>; + #[method(setAttachmentCell:)] + pub unsafe fn setAttachmentCell(&self, attachmentCell: Option<&NSTextAttachmentCell>); + #[method(lineLayoutPadding)] + pub unsafe fn lineLayoutPadding(&self) -> CGFloat; + #[method(setLineLayoutPadding:)] + pub unsafe fn setLineLayoutPadding(&self, lineLayoutPadding: CGFloat); + #[method(textAttachmentViewProviderClassForFileType:)] + pub unsafe fn textAttachmentViewProviderClassForFileType( + fileType: &NSString, + ) -> Option<&Class>; + #[method(registerTextAttachmentViewProviderClass:forFileType:)] + pub unsafe fn registerTextAttachmentViewProviderClass_forFileType( + textAttachmentViewProviderClass: &Class, + fileType: &NSString, + ); + #[method(allowsTextAttachmentView)] + pub unsafe fn allowsTextAttachmentView(&self) -> bool; + #[method(setAllowsTextAttachmentView:)] + pub unsafe fn setAllowsTextAttachmentView(&self, allowsTextAttachmentView: bool); + #[method(usesTextAttachmentView)] + pub unsafe fn usesTextAttachmentView(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSAttributedStringAttachmentConveniences"] + unsafe impl NSAttributedString { + #[method_id(attributedStringWithAttachment:)] + pub unsafe fn attributedStringWithAttachment( + attachment: &NSTextAttachment, + ) -> Id; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSTextAttachmentViewProvider; + unsafe impl ClassType for NSTextAttachmentViewProvider { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextAttachmentViewProvider { + #[method_id(initWithTextAttachment:parentView:textLayoutManager:location:)] + pub unsafe fn initWithTextAttachment_parentView_textLayoutManager_location( + &self, + textAttachment: &NSTextAttachment, + parentView: Option<&NSView>, + textLayoutManager: Option<&NSTextLayoutManager>, + location: &NSTextLocation, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method_id(textAttachment)] + pub unsafe fn textAttachment(&self) -> Option>; + #[method_id(textLayoutManager)] + pub unsafe fn textLayoutManager(&self) -> Option>; + #[method_id(location)] + pub unsafe fn location(&self) -> Id; + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method(setView:)] + pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(loadView)] + pub unsafe fn loadView(&self); + #[method(tracksTextAttachmentViewBounds)] + pub unsafe fn tracksTextAttachmentViewBounds(&self) -> bool; + #[method(setTracksTextAttachmentViewBounds:)] + pub unsafe fn setTracksTextAttachmentViewBounds( + &self, + tracksTextAttachmentViewBounds: bool, + ); + #[method(attachmentBoundsForAttributes:location:textContainer:proposedLineFragment:position:)] + pub unsafe fn attachmentBoundsForAttributes_location_textContainer_proposedLineFragment_position( + &self, + attributes: &NSDictionary, + location: &NSTextLocation, + textContainer: Option<&NSTextContainer>, + proposedLineFragment: CGRect, + position: CGPoint, + ) -> CGRect; + } +); +extern_methods!( + #[doc = "NSMutableAttributedStringAttachmentConveniences"] + unsafe impl NSMutableAttributedString { + #[method(updateAttachmentsFromPath:)] + pub unsafe fn updateAttachmentsFromPath(&self, path: &NSString); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs new file mode 100644 index 000000000..00b16b0af --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs @@ -0,0 +1,19 @@ +use super::__exported::NSLayoutManager; +use super::__exported::NSTextAttachment; +use super::__exported::NSTextContainer; +use crate::AppKit::generated::NSCell::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextAttachmentCell = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSTextAttachmentCell; + unsafe impl ClassType for NSTextAttachmentCell { + type Super = NSCell; + } +); +extern_methods!( + unsafe impl NSTextAttachmentCell {} +); diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs new file mode 100644 index 000000000..c95749eb7 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs @@ -0,0 +1,17 @@ +use super::__exported::NSAttributedString; +use super::__exported::NSCandidateListTouchBarItem; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextInputClient::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSAttributedString::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextInputTraits = NSObject; +pub type NSTextCheckingClient = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs new file mode 100644 index 000000000..2f0dc6c25 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs @@ -0,0 +1,79 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSSpellChecker::*; +use crate::AppKit::generated::NSTextCheckingClient::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSAttributedString::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +use crate::Foundation::generated::NSString::*; +use crate::Foundation::generated::NSTextCheckingResult::*; +use crate::Foundation::generated::NSValue::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextCheckingController; + unsafe impl ClassType for NSTextCheckingController { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextCheckingController { + #[method_id(initWithClient:)] + pub unsafe fn initWithClient(&self, client: &NSTextCheckingClient) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(client)] + pub unsafe fn client(&self) -> Id; + #[method(invalidate)] + pub unsafe fn invalidate(&self); + #[method(didChangeTextInRange:)] + pub unsafe fn didChangeTextInRange(&self, range: NSRange); + #[method(insertedTextInRange:)] + pub unsafe fn insertedTextInRange(&self, range: NSRange); + #[method(didChangeSelectedRange)] + pub unsafe fn didChangeSelectedRange(&self); + #[method(considerTextCheckingForRange:)] + pub unsafe fn considerTextCheckingForRange(&self, range: NSRange); + #[method(checkTextInRange:types:options:)] + pub unsafe fn checkTextInRange_types_options( + &self, + range: NSRange, + checkingTypes: NSTextCheckingTypes, + options: &NSDictionary, + ); + #[method(checkTextInSelection:)] + pub unsafe fn checkTextInSelection(&self, sender: Option<&Object>); + #[method(checkTextInDocument:)] + pub unsafe fn checkTextInDocument(&self, sender: Option<&Object>); + #[method(orderFrontSubstitutionsPanel:)] + pub unsafe fn orderFrontSubstitutionsPanel(&self, sender: Option<&Object>); + #[method(checkSpelling:)] + pub unsafe fn checkSpelling(&self, sender: Option<&Object>); + #[method(showGuessPanel:)] + pub unsafe fn showGuessPanel(&self, sender: Option<&Object>); + #[method(changeSpelling:)] + pub unsafe fn changeSpelling(&self, sender: Option<&Object>); + #[method(ignoreSpelling:)] + pub unsafe fn ignoreSpelling(&self, sender: Option<&Object>); + #[method(updateCandidates)] + pub unsafe fn updateCandidates(&self); + #[method_id(validAnnotations)] + pub unsafe fn validAnnotations(&self) -> Id, Shared>; + #[method_id(menuAtIndex:clickedOnSelection:effectiveRange:)] + pub unsafe fn menuAtIndex_clickedOnSelection_effectiveRange( + &self, + location: NSUInteger, + clickedOnSelection: bool, + effectiveRange: NSRangePointer, + ) -> Option>; + #[method(spellCheckerDocumentTag)] + pub unsafe fn spellCheckerDocumentTag(&self) -> NSInteger; + #[method(setSpellCheckerDocumentTag:)] + pub unsafe fn setSpellCheckerDocumentTag(&self, spellCheckerDocumentTag: NSInteger); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextContainer.rs b/crates/icrate/src/generated/AppKit/NSTextContainer.rs new file mode 100644 index 000000000..3d4cc82a2 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextContainer.rs @@ -0,0 +1,95 @@ +use super::__exported::NSBezierPath; +use super::__exported::NSTextLayoutManager; +use crate::AppKit::generated::NSLayoutManager::*; +use crate::AppKit::generated::NSParagraphStyle::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextContainer; + unsafe impl ClassType for NSTextContainer { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextContainer { + #[method_id(initWithSize:)] + pub unsafe fn initWithSize(&self, size: NSSize) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(layoutManager)] + pub unsafe fn layoutManager(&self) -> Option>; + #[method(setLayoutManager:)] + pub unsafe fn setLayoutManager(&self, layoutManager: Option<&NSLayoutManager>); + #[method(replaceLayoutManager:)] + pub unsafe fn replaceLayoutManager(&self, newLayoutManager: &NSLayoutManager); + #[method_id(textLayoutManager)] + pub unsafe fn textLayoutManager(&self) -> Option>; + #[method(size)] + pub unsafe fn size(&self) -> NSSize; + #[method(setSize:)] + pub unsafe fn setSize(&self, size: NSSize); + #[method_id(exclusionPaths)] + pub unsafe fn exclusionPaths(&self) -> Id, Shared>; + #[method(setExclusionPaths:)] + pub unsafe fn setExclusionPaths(&self, exclusionPaths: &NSArray); + #[method(lineBreakMode)] + pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[method(setLineBreakMode:)] + pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode); + #[method(lineFragmentPadding)] + pub unsafe fn lineFragmentPadding(&self) -> CGFloat; + #[method(setLineFragmentPadding:)] + pub unsafe fn setLineFragmentPadding(&self, lineFragmentPadding: CGFloat); + #[method(maximumNumberOfLines)] + pub unsafe fn maximumNumberOfLines(&self) -> NSUInteger; + #[method(setMaximumNumberOfLines:)] + pub unsafe fn setMaximumNumberOfLines(&self, maximumNumberOfLines: NSUInteger); + #[method(lineFragmentRectForProposedRect:atIndex:writingDirection:remainingRect:)] + pub unsafe fn lineFragmentRectForProposedRect_atIndex_writingDirection_remainingRect( + &self, + proposedRect: NSRect, + characterIndex: NSUInteger, + baseWritingDirection: NSWritingDirection, + remainingRect: *mut NSRect, + ) -> NSRect; + #[method(isSimpleRectangularTextContainer)] + pub unsafe fn isSimpleRectangularTextContainer(&self) -> bool; + #[method(widthTracksTextView)] + pub unsafe fn widthTracksTextView(&self) -> bool; + #[method(setWidthTracksTextView:)] + pub unsafe fn setWidthTracksTextView(&self, widthTracksTextView: bool); + #[method(heightTracksTextView)] + pub unsafe fn heightTracksTextView(&self) -> bool; + #[method(setHeightTracksTextView:)] + pub unsafe fn setHeightTracksTextView(&self, heightTracksTextView: bool); + #[method_id(textView)] + pub unsafe fn textView(&self) -> Option>; + #[method(setTextView:)] + pub unsafe fn setTextView(&self, textView: Option<&NSTextView>); + } +); +extern_methods!( + #[doc = "NSTextContainerDeprecated"] + unsafe impl NSTextContainer { + #[method_id(initWithContainerSize:)] + pub unsafe fn initWithContainerSize(&self, aContainerSize: NSSize) -> Id; + #[method(containerSize)] + pub unsafe fn containerSize(&self) -> NSSize; + #[method(setContainerSize:)] + pub unsafe fn setContainerSize(&self, containerSize: NSSize); + #[method(lineFragmentRectForProposedRect:sweepDirection:movementDirection:remainingRect:)] + pub unsafe fn lineFragmentRectForProposedRect_sweepDirection_movementDirection_remainingRect( + &self, + proposedRect: NSRect, + sweepDirection: NSLineSweepDirection, + movementDirection: NSLineMovementDirection, + remainingRect: NSRectPointer, + ) -> NSRect; + #[method(containsPoint:)] + pub unsafe fn containsPoint(&self, point: NSPoint) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextContent.rs b/crates/icrate/src/generated/AppKit/NSTextContent.rs new file mode 100644 index 000000000..5c6b2e238 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextContent.rs @@ -0,0 +1,8 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextContentType = NSString; +pub type NSTextContent = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs new file mode 100644 index 000000000..5c8f30c1d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -0,0 +1,127 @@ +use super::__exported::NSTextElement; +use super::__exported::NSTextLayoutManager; +use super::__exported::NSTextLocation; +use super::__exported::NSTextParagraph; +use super::__exported::NSTextRange; +use super::__exported::NSTextStorage; +use super::__exported::NSTextStorageObserving; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSNotification::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextElementProvider = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSTextContentManager; + unsafe impl ClassType for NSTextContentManager { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextContentManager { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextContentManagerDelegate>); + #[method_id(textLayoutManagers)] + pub unsafe fn textLayoutManagers(&self) -> Id, Shared>; + #[method(addTextLayoutManager:)] + pub unsafe fn addTextLayoutManager(&self, textLayoutManager: &NSTextLayoutManager); + #[method(removeTextLayoutManager:)] + pub unsafe fn removeTextLayoutManager(&self, textLayoutManager: &NSTextLayoutManager); + #[method_id(primaryTextLayoutManager)] + pub unsafe fn primaryTextLayoutManager(&self) -> Option>; + #[method(setPrimaryTextLayoutManager:)] + pub unsafe fn setPrimaryTextLayoutManager( + &self, + primaryTextLayoutManager: Option<&NSTextLayoutManager>, + ); + #[method(synchronizeTextLayoutManagers:)] + pub unsafe fn synchronizeTextLayoutManagers(&self, completionHandler: TodoBlock); + #[method_id(textElementsForRange:)] + pub unsafe fn textElementsForRange( + &self, + range: &NSTextRange, + ) -> Id, Shared>; + #[method(hasEditingTransaction)] + pub unsafe fn hasEditingTransaction(&self) -> bool; + #[method(performEditingTransactionUsingBlock:)] + pub unsafe fn performEditingTransactionUsingBlock(&self, transaction: TodoBlock); + #[method(recordEditActionInRange:newTextRange:)] + pub unsafe fn recordEditActionInRange_newTextRange( + &self, + originalTextRange: &NSTextRange, + newTextRange: &NSTextRange, + ); + #[method(automaticallySynchronizesTextLayoutManagers)] + pub unsafe fn automaticallySynchronizesTextLayoutManagers(&self) -> bool; + #[method(setAutomaticallySynchronizesTextLayoutManagers:)] + pub unsafe fn setAutomaticallySynchronizesTextLayoutManagers( + &self, + automaticallySynchronizesTextLayoutManagers: bool, + ); + #[method(automaticallySynchronizesToBackingStore)] + pub unsafe fn automaticallySynchronizesToBackingStore(&self) -> bool; + #[method(setAutomaticallySynchronizesToBackingStore:)] + pub unsafe fn setAutomaticallySynchronizesToBackingStore( + &self, + automaticallySynchronizesToBackingStore: bool, + ); + } +); +pub type NSTextContentManagerDelegate = NSObject; +pub type NSTextContentStorageDelegate = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSTextContentStorage; + unsafe impl ClassType for NSTextContentStorage { + type Super = NSTextContentManager; + } +); +extern_methods!( + unsafe impl NSTextContentStorage { + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextContentStorageDelegate>); + #[method_id(attributedString)] + pub unsafe fn attributedString(&self) -> Option>; + #[method(setAttributedString:)] + pub unsafe fn setAttributedString(&self, attributedString: Option<&NSAttributedString>); + #[method_id(attributedStringForTextElement:)] + pub unsafe fn attributedStringForTextElement( + &self, + textElement: &NSTextElement, + ) -> Option>; + #[method_id(textElementForAttributedString:)] + pub unsafe fn textElementForAttributedString( + &self, + attributedString: &NSAttributedString, + ) -> Option>; + #[method_id(locationFromLocation:withOffset:)] + pub unsafe fn locationFromLocation_withOffset( + &self, + location: &NSTextLocation, + offset: NSInteger, + ) -> Option>; + #[method(offsetFromLocation:toLocation:)] + pub unsafe fn offsetFromLocation_toLocation( + &self, + from: &NSTextLocation, + to: &NSTextLocation, + ) -> NSInteger; + #[method_id(adjustedRangeFromRange:forEditingTextSelection:)] + pub unsafe fn adjustedRangeFromRange_forEditingTextSelection( + &self, + textRange: &NSTextRange, + forEditingTextSelection: bool, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextElement.rs b/crates/icrate/src/generated/AppKit/NSTextElement.rs new file mode 100644 index 000000000..3db76d774 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextElement.rs @@ -0,0 +1,56 @@ +use super::__exported::NSTextContentManager; +use super::__exported::NSTextRange; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextElement; + unsafe impl ClassType for NSTextElement { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextElement { + #[method_id(initWithTextContentManager:)] + pub unsafe fn initWithTextContentManager( + &self, + textContentManager: Option<&NSTextContentManager>, + ) -> Id; + #[method_id(textContentManager)] + pub unsafe fn textContentManager(&self) -> Option>; + #[method(setTextContentManager:)] + pub unsafe fn setTextContentManager( + &self, + textContentManager: Option<&NSTextContentManager>, + ); + #[method_id(elementRange)] + pub unsafe fn elementRange(&self) -> Option>; + #[method(setElementRange:)] + pub unsafe fn setElementRange(&self, elementRange: Option<&NSTextRange>); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSTextParagraph; + unsafe impl ClassType for NSTextParagraph { + type Super = NSTextElement; + } +); +extern_methods!( + unsafe impl NSTextParagraph { + #[method_id(initWithAttributedString:)] + pub unsafe fn initWithAttributedString( + &self, + attributedString: Option<&NSAttributedString>, + ) -> Id; + #[method_id(attributedString)] + pub unsafe fn attributedString(&self) -> Id; + #[method_id(paragraphContentRange)] + pub unsafe fn paragraphContentRange(&self) -> Option>; + #[method_id(paragraphSeparatorRange)] + pub unsafe fn paragraphSeparatorRange(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextField.rs b/crates/icrate/src/generated/AppKit/NSTextField.rs new file mode 100644 index 000000000..b86f1c7ef --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextField.rs @@ -0,0 +1,156 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSControl::*; +use crate::AppKit::generated::NSParagraphStyle::*; +use crate::AppKit::generated::NSTextContent::*; +use crate::AppKit::generated::NSTextFieldCell::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextField; + unsafe impl ClassType for NSTextField { + type Super = NSControl; + } +); +extern_methods!( + unsafe impl NSTextField { + #[method_id(placeholderString)] + pub unsafe fn placeholderString(&self) -> Option>; + #[method(setPlaceholderString:)] + pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); + #[method_id(placeholderAttributedString)] + pub unsafe fn placeholderAttributedString(&self) -> Option>; + #[method(setPlaceholderAttributedString:)] + pub unsafe fn setPlaceholderAttributedString( + &self, + placeholderAttributedString: Option<&NSAttributedString>, + ); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(drawsBackground)] + pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] + pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(textColor)] + pub unsafe fn textColor(&self) -> Option>; + #[method(setTextColor:)] + pub unsafe fn setTextColor(&self, textColor: Option<&NSColor>); + #[method(isBordered)] + pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] + pub unsafe fn setBordered(&self, bordered: bool); + #[method(isBezeled)] + pub unsafe fn isBezeled(&self) -> bool; + #[method(setBezeled:)] + pub unsafe fn setBezeled(&self, bezeled: bool); + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] + pub unsafe fn setEditable(&self, editable: bool); + #[method(isSelectable)] + pub unsafe fn isSelectable(&self) -> bool; + #[method(setSelectable:)] + pub unsafe fn setSelectable(&self, selectable: bool); + #[method(selectText:)] + pub unsafe fn selectText(&self, sender: Option<&Object>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextFieldDelegate>); + #[method(textShouldBeginEditing:)] + pub unsafe fn textShouldBeginEditing(&self, textObject: &NSText) -> bool; + #[method(textShouldEndEditing:)] + pub unsafe fn textShouldEndEditing(&self, textObject: &NSText) -> bool; + #[method(textDidBeginEditing:)] + pub unsafe fn textDidBeginEditing(&self, notification: &NSNotification); + #[method(textDidEndEditing:)] + pub unsafe fn textDidEndEditing(&self, notification: &NSNotification); + #[method(textDidChange:)] + pub unsafe fn textDidChange(&self, notification: &NSNotification); + #[method(acceptsFirstResponder)] + pub unsafe fn acceptsFirstResponder(&self) -> bool; + #[method(bezelStyle)] + pub unsafe fn bezelStyle(&self) -> NSTextFieldBezelStyle; + #[method(setBezelStyle:)] + pub unsafe fn setBezelStyle(&self, bezelStyle: NSTextFieldBezelStyle); + #[method(preferredMaxLayoutWidth)] + pub unsafe fn preferredMaxLayoutWidth(&self) -> CGFloat; + #[method(setPreferredMaxLayoutWidth:)] + pub unsafe fn setPreferredMaxLayoutWidth(&self, preferredMaxLayoutWidth: CGFloat); + #[method(maximumNumberOfLines)] + pub unsafe fn maximumNumberOfLines(&self) -> NSInteger; + #[method(setMaximumNumberOfLines:)] + pub unsafe fn setMaximumNumberOfLines(&self, maximumNumberOfLines: NSInteger); + #[method(allowsDefaultTighteningForTruncation)] + pub unsafe fn allowsDefaultTighteningForTruncation(&self) -> bool; + #[method(setAllowsDefaultTighteningForTruncation:)] + pub unsafe fn setAllowsDefaultTighteningForTruncation( + &self, + allowsDefaultTighteningForTruncation: bool, + ); + #[method(lineBreakStrategy)] + pub unsafe fn lineBreakStrategy(&self) -> NSLineBreakStrategy; + #[method(setLineBreakStrategy:)] + pub unsafe fn setLineBreakStrategy(&self, lineBreakStrategy: NSLineBreakStrategy); + } +); +extern_methods!( + #[doc = "NSTouchBar"] + unsafe impl NSTextField { + #[method(isAutomaticTextCompletionEnabled)] + pub unsafe fn isAutomaticTextCompletionEnabled(&self) -> bool; + #[method(setAutomaticTextCompletionEnabled:)] + pub unsafe fn setAutomaticTextCompletionEnabled( + &self, + automaticTextCompletionEnabled: bool, + ); + #[method(allowsCharacterPickerTouchBarItem)] + pub unsafe fn allowsCharacterPickerTouchBarItem(&self) -> bool; + #[method(setAllowsCharacterPickerTouchBarItem:)] + pub unsafe fn setAllowsCharacterPickerTouchBarItem( + &self, + allowsCharacterPickerTouchBarItem: bool, + ); + } +); +extern_methods!( + #[doc = "NSTextFieldConvenience"] + unsafe impl NSTextField { + #[method_id(labelWithString:)] + pub unsafe fn labelWithString(stringValue: &NSString) -> Id; + #[method_id(wrappingLabelWithString:)] + pub unsafe fn wrappingLabelWithString(stringValue: &NSString) -> Id; + #[method_id(labelWithAttributedString:)] + pub unsafe fn labelWithAttributedString( + attributedStringValue: &NSAttributedString, + ) -> Id; + #[method_id(textFieldWithString:)] + pub unsafe fn textFieldWithString(stringValue: &NSString) -> Id; + } +); +extern_methods!( + #[doc = "NSTextFieldAttributedStringMethods"] + unsafe impl NSTextField { + #[method(allowsEditingTextAttributes)] + pub unsafe fn allowsEditingTextAttributes(&self) -> bool; + #[method(setAllowsEditingTextAttributes:)] + pub unsafe fn setAllowsEditingTextAttributes(&self, allowsEditingTextAttributes: bool); + #[method(importsGraphics)] + pub unsafe fn importsGraphics(&self) -> bool; + #[method(setImportsGraphics:)] + pub unsafe fn setImportsGraphics(&self, importsGraphics: bool); + } +); +pub type NSTextFieldDelegate = NSObject; +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSTextField { + #[method(setTitleWithMnemonic:)] + pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs new file mode 100644 index 000000000..4e58bfb45 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs @@ -0,0 +1,63 @@ +use super::__exported::NSColor; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSActionCell::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextFieldCell; + unsafe impl ClassType for NSTextFieldCell { + type Super = NSActionCell; + } +); +extern_methods!( + unsafe impl NSTextFieldCell { + #[method_id(initTextCell:)] + pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initImageCell:)] + pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(drawsBackground)] + pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] + pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(textColor)] + pub unsafe fn textColor(&self) -> Option>; + #[method(setTextColor:)] + pub unsafe fn setTextColor(&self, textColor: Option<&NSColor>); + #[method_id(setUpFieldEditorAttributes:)] + pub unsafe fn setUpFieldEditorAttributes(&self, textObj: &NSText) -> Id; + #[method(bezelStyle)] + pub unsafe fn bezelStyle(&self) -> NSTextFieldBezelStyle; + #[method(setBezelStyle:)] + pub unsafe fn setBezelStyle(&self, bezelStyle: NSTextFieldBezelStyle); + #[method_id(placeholderString)] + pub unsafe fn placeholderString(&self) -> Option>; + #[method(setPlaceholderString:)] + pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); + #[method_id(placeholderAttributedString)] + pub unsafe fn placeholderAttributedString(&self) -> Option>; + #[method(setPlaceholderAttributedString:)] + pub unsafe fn setPlaceholderAttributedString( + &self, + placeholderAttributedString: Option<&NSAttributedString>, + ); + #[method(setWantsNotificationForMarkedText:)] + pub unsafe fn setWantsNotificationForMarkedText(&self, flag: bool); + #[method_id(allowedInputSourceLocales)] + pub unsafe fn allowedInputSourceLocales(&self) -> Option, Shared>>; + #[method(setAllowedInputSourceLocales:)] + pub unsafe fn setAllowedInputSourceLocales( + &self, + allowedInputSourceLocales: Option<&NSArray>, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs new file mode 100644 index 000000000..d59cc047d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -0,0 +1,68 @@ +use super::__exported::NSOperationQueue; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSNibDeclarations::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPasteboardTypeTextFinderOptionKey = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSTextFinder; + unsafe impl ClassType for NSTextFinder { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextFinder { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(client)] + pub unsafe fn client(&self) -> Option>; + #[method(setClient:)] + pub unsafe fn setClient(&self, client: Option<&NSTextFinderClient>); + #[method(performAction:)] + pub unsafe fn performAction(&self, op: NSTextFinderAction); + #[method(validateAction:)] + pub unsafe fn validateAction(&self, op: NSTextFinderAction) -> bool; + #[method_id(findBarContainer)] + pub unsafe fn findBarContainer(&self) -> Option>; + #[method(setFindBarContainer:)] + pub unsafe fn setFindBarContainer( + &self, + findBarContainer: Option<&NSTextFinderBarContainer>, + ); + #[method(cancelFindIndicator)] + pub unsafe fn cancelFindIndicator(&self); + #[method(findIndicatorNeedsUpdate)] + pub unsafe fn findIndicatorNeedsUpdate(&self) -> bool; + #[method(setFindIndicatorNeedsUpdate:)] + pub unsafe fn setFindIndicatorNeedsUpdate(&self, findIndicatorNeedsUpdate: bool); + #[method(isIncrementalSearchingEnabled)] + pub unsafe fn isIncrementalSearchingEnabled(&self) -> bool; + #[method(setIncrementalSearchingEnabled:)] + pub unsafe fn setIncrementalSearchingEnabled(&self, incrementalSearchingEnabled: bool); + #[method(incrementalSearchingShouldDimContentView)] + pub unsafe fn incrementalSearchingShouldDimContentView(&self) -> bool; + #[method(setIncrementalSearchingShouldDimContentView:)] + pub unsafe fn setIncrementalSearchingShouldDimContentView( + &self, + incrementalSearchingShouldDimContentView: bool, + ); + #[method_id(incrementalMatchRanges)] + pub unsafe fn incrementalMatchRanges(&self) -> Id, Shared>; + #[method(drawIncrementalMatchHighlightInRect:)] + pub unsafe fn drawIncrementalMatchHighlightInRect(rect: NSRect); + #[method(noteClientStringWillChange)] + pub unsafe fn noteClientStringWillChange(&self); + } +); +pub type NSTextFinderClient = NSObject; +pub type NSTextFinderBarContainer = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs new file mode 100644 index 000000000..1a31f7b31 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs @@ -0,0 +1,12 @@ +use super::__exported::NSAttributedString; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSAttributedString::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +use crate::Foundation::generated::NSRange::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextInputClient = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs new file mode 100644 index 000000000..aa48459cc --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs @@ -0,0 +1,67 @@ +use super::__exported::NSEvent; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextInputClient::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSNotification::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextInputSourceIdentifier = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSTextInputContext; + unsafe impl ClassType for NSTextInputContext { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextInputContext { + #[method_id(currentInputContext)] + pub unsafe fn currentInputContext() -> Option>; + #[method_id(initWithClient:)] + pub unsafe fn initWithClient(&self, client: &NSTextInputClient) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(client)] + pub unsafe fn client(&self) -> Id; + #[method(acceptsGlyphInfo)] + pub unsafe fn acceptsGlyphInfo(&self) -> bool; + #[method(setAcceptsGlyphInfo:)] + pub unsafe fn setAcceptsGlyphInfo(&self, acceptsGlyphInfo: bool); + #[method_id(allowedInputSourceLocales)] + pub unsafe fn allowedInputSourceLocales(&self) -> Option, Shared>>; + #[method(setAllowedInputSourceLocales:)] + pub unsafe fn setAllowedInputSourceLocales( + &self, + allowedInputSourceLocales: Option<&NSArray>, + ); + #[method(activate)] + pub unsafe fn activate(&self); + #[method(deactivate)] + pub unsafe fn deactivate(&self); + #[method(handleEvent:)] + pub unsafe fn handleEvent(&self, event: &NSEvent) -> bool; + #[method(discardMarkedText)] + pub unsafe fn discardMarkedText(&self); + #[method(invalidateCharacterCoordinates)] + pub unsafe fn invalidateCharacterCoordinates(&self); + #[method_id(keyboardInputSources)] + pub unsafe fn keyboardInputSources( + &self, + ) -> Option, Shared>>; + #[method_id(selectedKeyboardInputSource)] + pub unsafe fn selectedKeyboardInputSource( + &self, + ) -> Option>; + #[method(setSelectedKeyboardInputSource:)] + pub unsafe fn setSelectedKeyboardInputSource( + &self, + selectedKeyboardInputSource: Option<&NSTextInputSourceIdentifier>, + ); + #[method_id(localizedNameForInputSource:)] + pub unsafe fn localizedNameForInputSource( + inputSourceIdentifier: &NSTextInputSourceIdentifier, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs new file mode 100644 index 000000000..ef104c142 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -0,0 +1,71 @@ +use super::__exported::NSOperationQueue; +use super::__exported::NSTextAttachmentViewProvider; +use super::__exported::NSTextElement; +use super::__exported::NSTextLayoutManager; +use super::__exported::NSTextLineFragment; +use super::__exported::NSTextLocation; +use super::__exported::NSTextParagraph; +use super::__exported::NSTextRange; +use crate::CoreGraphics::generated::CoreGraphics::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextLayoutFragment; + unsafe impl ClassType for NSTextLayoutFragment { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextLayoutFragment { + #[method_id(initWithTextElement:range:)] + pub unsafe fn initWithTextElement_range( + &self, + textElement: &NSTextElement, + rangeInElement: Option<&NSTextRange>, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(textLayoutManager)] + pub unsafe fn textLayoutManager(&self) -> Option>; + #[method_id(textElement)] + pub unsafe fn textElement(&self) -> Option>; + #[method_id(rangeInElement)] + pub unsafe fn rangeInElement(&self) -> Id; + #[method_id(textLineFragments)] + pub unsafe fn textLineFragments(&self) -> Id, Shared>; + #[method_id(layoutQueue)] + pub unsafe fn layoutQueue(&self) -> Option>; + #[method(setLayoutQueue:)] + pub unsafe fn setLayoutQueue(&self, layoutQueue: Option<&NSOperationQueue>); + #[method(state)] + pub unsafe fn state(&self) -> NSTextLayoutFragmentState; + #[method(invalidateLayout)] + pub unsafe fn invalidateLayout(&self); + #[method(layoutFragmentFrame)] + pub unsafe fn layoutFragmentFrame(&self) -> CGRect; + #[method(renderingSurfaceBounds)] + pub unsafe fn renderingSurfaceBounds(&self) -> CGRect; + #[method(leadingPadding)] + pub unsafe fn leadingPadding(&self) -> CGFloat; + #[method(trailingPadding)] + pub unsafe fn trailingPadding(&self) -> CGFloat; + #[method(topMargin)] + pub unsafe fn topMargin(&self) -> CGFloat; + #[method(bottomMargin)] + pub unsafe fn bottomMargin(&self) -> CGFloat; + #[method(drawAtPoint:inContext:)] + pub unsafe fn drawAtPoint_inContext(&self, point: CGPoint, context: CGContextRef); + #[method_id(textAttachmentViewProviders)] + pub unsafe fn textAttachmentViewProviders( + &self, + ) -> Id, Shared>; + #[method(frameForTextAttachmentAtLocation:)] + pub unsafe fn frameForTextAttachmentAtLocation(&self, location: &NSTextLocation) -> CGRect; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs new file mode 100644 index 000000000..88f2d82c1 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -0,0 +1,167 @@ +use super::__exported::NSTextContainer; +use super::__exported::NSTextContentManager; +use super::__exported::NSTextElement; +use super::__exported::NSTextLocation; +use super::__exported::NSTextRange; +use super::__exported::NSTextSelection; +use super::__exported::NSTextSelectionDataSource; +use super::__exported::NSTextSelectionNavigation; +use super::__exported::NSTextViewportLayoutController; +use crate::AppKit::generated::NSTextLayoutFragment::*; +use crate::CoreGraphics::generated::CGGeometry::*; +use crate::Foundation::generated::NSAttributedString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextLayoutManager; + unsafe impl ClassType for NSTextLayoutManager { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextLayoutManager { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextLayoutManagerDelegate>); + #[method(usesFontLeading)] + pub unsafe fn usesFontLeading(&self) -> bool; + #[method(setUsesFontLeading:)] + pub unsafe fn setUsesFontLeading(&self, usesFontLeading: bool); + #[method(limitsLayoutForSuspiciousContents)] + pub unsafe fn limitsLayoutForSuspiciousContents(&self) -> bool; + #[method(setLimitsLayoutForSuspiciousContents:)] + pub unsafe fn setLimitsLayoutForSuspiciousContents( + &self, + limitsLayoutForSuspiciousContents: bool, + ); + #[method(usesHyphenation)] + pub unsafe fn usesHyphenation(&self) -> bool; + #[method(setUsesHyphenation:)] + pub unsafe fn setUsesHyphenation(&self, usesHyphenation: bool); + #[method_id(textContentManager)] + pub unsafe fn textContentManager(&self) -> Option>; + #[method(replaceTextContentManager:)] + pub unsafe fn replaceTextContentManager(&self, textContentManager: &NSTextContentManager); + #[method_id(textContainer)] + pub unsafe fn textContainer(&self) -> Option>; + #[method(setTextContainer:)] + pub unsafe fn setTextContainer(&self, textContainer: Option<&NSTextContainer>); + #[method(usageBoundsForTextContainer)] + pub unsafe fn usageBoundsForTextContainer(&self) -> CGRect; + #[method_id(textViewportLayoutController)] + pub unsafe fn textViewportLayoutController( + &self, + ) -> Id; + #[method_id(layoutQueue)] + pub unsafe fn layoutQueue(&self) -> Option>; + #[method(setLayoutQueue:)] + pub unsafe fn setLayoutQueue(&self, layoutQueue: Option<&NSOperationQueue>); + #[method(ensureLayoutForRange:)] + pub unsafe fn ensureLayoutForRange(&self, range: &NSTextRange); + #[method(ensureLayoutForBounds:)] + pub unsafe fn ensureLayoutForBounds(&self, bounds: CGRect); + #[method(invalidateLayoutForRange:)] + pub unsafe fn invalidateLayoutForRange(&self, range: &NSTextRange); + #[method_id(textLayoutFragmentForPosition:)] + pub unsafe fn textLayoutFragmentForPosition( + &self, + position: CGPoint, + ) -> Option>; + #[method_id(textLayoutFragmentForLocation:)] + pub unsafe fn textLayoutFragmentForLocation( + &self, + location: &NSTextLocation, + ) -> Option>; + #[method_id(enumerateTextLayoutFragmentsFromLocation:options:usingBlock:)] + pub unsafe fn enumerateTextLayoutFragmentsFromLocation_options_usingBlock( + &self, + location: Option<&NSTextLocation>, + options: NSTextLayoutFragmentEnumerationOptions, + block: TodoBlock, + ) -> Option>; + #[method_id(textSelections)] + pub unsafe fn textSelections(&self) -> Id, Shared>; + #[method(setTextSelections:)] + pub unsafe fn setTextSelections(&self, textSelections: &NSArray); + #[method_id(textSelectionNavigation)] + pub unsafe fn textSelectionNavigation(&self) -> Id; + #[method(setTextSelectionNavigation:)] + pub unsafe fn setTextSelectionNavigation( + &self, + textSelectionNavigation: &NSTextSelectionNavigation, + ); + #[method(enumerateRenderingAttributesFromLocation:reverse:usingBlock:)] + pub unsafe fn enumerateRenderingAttributesFromLocation_reverse_usingBlock( + &self, + location: &NSTextLocation, + reverse: bool, + block: TodoBlock, + ); + #[method(setRenderingAttributes:forTextRange:)] + pub unsafe fn setRenderingAttributes_forTextRange( + &self, + renderingAttributes: &NSDictionary, + textRange: &NSTextRange, + ); + #[method(addRenderingAttribute:value:forTextRange:)] + pub unsafe fn addRenderingAttribute_value_forTextRange( + &self, + renderingAttribute: &NSAttributedStringKey, + value: Option<&Object>, + textRange: &NSTextRange, + ); + #[method(removeRenderingAttribute:forTextRange:)] + pub unsafe fn removeRenderingAttribute_forTextRange( + &self, + renderingAttribute: &NSAttributedStringKey, + textRange: &NSTextRange, + ); + #[method(invalidateRenderingAttributesForTextRange:)] + pub unsafe fn invalidateRenderingAttributesForTextRange(&self, textRange: &NSTextRange); + #[method(renderingAttributesValidator)] + pub unsafe fn renderingAttributesValidator(&self) -> TodoBlock; + #[method(setRenderingAttributesValidator:)] + pub unsafe fn setRenderingAttributesValidator( + &self, + renderingAttributesValidator: TodoBlock, + ); + #[method_id(linkRenderingAttributes)] + pub unsafe fn linkRenderingAttributes( + ) -> Id, Shared>; + #[method_id(renderingAttributesForLink:atLocation:)] + pub unsafe fn renderingAttributesForLink_atLocation( + &self, + link: &Object, + location: &NSTextLocation, + ) -> Id, Shared>; + #[method(enumerateTextSegmentsInRange:type:options:usingBlock:)] + pub unsafe fn enumerateTextSegmentsInRange_type_options_usingBlock( + &self, + textRange: &NSTextRange, + type_: NSTextLayoutManagerSegmentType, + options: NSTextLayoutManagerSegmentOptions, + block: TodoBlock, + ); + #[method(replaceContentsInRange:withTextElements:)] + pub unsafe fn replaceContentsInRange_withTextElements( + &self, + range: &NSTextRange, + textElements: &NSArray, + ); + #[method(replaceContentsInRange:withAttributedString:)] + pub unsafe fn replaceContentsInRange_withAttributedString( + &self, + range: &NSTextRange, + attributedString: &NSAttributedString, + ); + } +); +pub type NSTextLayoutManagerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs new file mode 100644 index 000000000..d9da0d8eb --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs @@ -0,0 +1,51 @@ +use crate::CoreGraphics::generated::CoreGraphics::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSAttributedString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextLineFragment; + unsafe impl ClassType for NSTextLineFragment { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextLineFragment { + #[method_id(initWithAttributedString:range:)] + pub unsafe fn initWithAttributedString_range( + &self, + attributedString: &NSAttributedString, + range: NSRange, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, aDecoder: &NSCoder) -> Option>; + #[method_id(initWithString:attributes:range:)] + pub unsafe fn initWithString_attributes_range( + &self, + string: &NSString, + attributes: &NSDictionary, + range: NSRange, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(attributedString)] + pub unsafe fn attributedString(&self) -> Id; + #[method(characterRange)] + pub unsafe fn characterRange(&self) -> NSRange; + #[method(typographicBounds)] + pub unsafe fn typographicBounds(&self) -> CGRect; + #[method(glyphOrigin)] + pub unsafe fn glyphOrigin(&self) -> CGPoint; + #[method(drawAtPoint:inContext:)] + pub unsafe fn drawAtPoint_inContext(&self, point: CGPoint, context: CGContextRef); + #[method(locationForCharacterAtIndex:)] + pub unsafe fn locationForCharacterAtIndex(&self, index: NSInteger) -> CGPoint; + #[method(characterIndexForPoint:)] + pub unsafe fn characterIndexForPoint(&self, point: CGPoint) -> NSInteger; + #[method(fractionOfDistanceThroughGlyphForPoint:)] + pub unsafe fn fractionOfDistanceThroughGlyphForPoint(&self, point: CGPoint) -> CGFloat; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs new file mode 100644 index 000000000..00b61ea2c --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -0,0 +1,34 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextListMarkerFormat = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSTextList; + unsafe impl ClassType for NSTextList { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextList { + #[method_id(initWithMarkerFormat:options:)] + pub unsafe fn initWithMarkerFormat_options( + &self, + format: &NSTextListMarkerFormat, + mask: NSUInteger, + ) -> Id; + #[method_id(markerFormat)] + pub unsafe fn markerFormat(&self) -> Id; + #[method(listOptions)] + pub unsafe fn listOptions(&self) -> NSTextListOptions; + #[method_id(markerForItemNumber:)] + pub unsafe fn markerForItemNumber(&self, itemNum: NSInteger) -> Id; + #[method(startingItemNumber)] + pub unsafe fn startingItemNumber(&self) -> NSInteger; + #[method(setStartingItemNumber:)] + pub unsafe fn setStartingItemNumber(&self, startingItemNumber: NSInteger); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextRange.rs b/crates/icrate/src/generated/AppKit/NSTextRange.rs new file mode 100644 index 000000000..442d423a1 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextRange.rs @@ -0,0 +1,53 @@ +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextLocation = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSTextRange; + unsafe impl ClassType for NSTextRange { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextRange { + #[method_id(initWithLocation:endLocation:)] + pub unsafe fn initWithLocation_endLocation( + &self, + location: &NSTextLocation, + endLocation: Option<&NSTextLocation>, + ) -> Option>; + #[method_id(initWithLocation:)] + pub unsafe fn initWithLocation(&self, location: &NSTextLocation) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method(isEmpty)] + pub unsafe fn isEmpty(&self) -> bool; + #[method_id(location)] + pub unsafe fn location(&self) -> Id; + #[method_id(endLocation)] + pub unsafe fn endLocation(&self) -> Id; + #[method(isEqualToTextRange:)] + pub unsafe fn isEqualToTextRange(&self, textRange: &NSTextRange) -> bool; + #[method(containsLocation:)] + pub unsafe fn containsLocation(&self, location: &NSTextLocation) -> bool; + #[method(containsRange:)] + pub unsafe fn containsRange(&self, textRange: &NSTextRange) -> bool; + #[method(intersectsWithTextRange:)] + pub unsafe fn intersectsWithTextRange(&self, textRange: &NSTextRange) -> bool; + #[method_id(textRangeByIntersectingWithTextRange:)] + pub unsafe fn textRangeByIntersectingWithTextRange( + &self, + textRange: &NSTextRange, + ) -> Option>; + #[method_id(textRangeByFormingUnionWithTextRange:)] + pub unsafe fn textRangeByFormingUnionWithTextRange( + &self, + textRange: &NSTextRange, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextSelection.rs b/crates/icrate/src/generated/AppKit/NSTextSelection.rs new file mode 100644 index 000000000..80ef3b875 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextSelection.rs @@ -0,0 +1,80 @@ +use super::__exported::NSTextLocation; +use super::__exported::NSTextRange; +use crate::CoreGraphics::generated::CGGeometry::*; +use crate::Foundation::generated::NSAttributedString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextSelection; + unsafe impl ClassType for NSTextSelection { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextSelection { + #[method_id(initWithRanges:affinity:granularity:)] + pub unsafe fn initWithRanges_affinity_granularity( + &self, + textRanges: &NSArray, + affinity: NSTextSelectionAffinity, + granularity: NSTextSelectionGranularity, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(initWithRange:affinity:granularity:)] + pub unsafe fn initWithRange_affinity_granularity( + &self, + range: &NSTextRange, + affinity: NSTextSelectionAffinity, + granularity: NSTextSelectionGranularity, + ) -> Id; + #[method_id(initWithLocation:affinity:)] + pub unsafe fn initWithLocation_affinity( + &self, + location: &NSTextLocation, + affinity: NSTextSelectionAffinity, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(textRanges)] + pub unsafe fn textRanges(&self) -> Id, Shared>; + #[method(granularity)] + pub unsafe fn granularity(&self) -> NSTextSelectionGranularity; + #[method(affinity)] + pub unsafe fn affinity(&self) -> NSTextSelectionAffinity; + #[method(isTransient)] + pub unsafe fn isTransient(&self) -> bool; + #[method(anchorPositionOffset)] + pub unsafe fn anchorPositionOffset(&self) -> CGFloat; + #[method(setAnchorPositionOffset:)] + pub unsafe fn setAnchorPositionOffset(&self, anchorPositionOffset: CGFloat); + #[method(isLogical)] + pub unsafe fn isLogical(&self) -> bool; + #[method(setLogical:)] + pub unsafe fn setLogical(&self, logical: bool); + #[method_id(secondarySelectionLocation)] + pub unsafe fn secondarySelectionLocation(&self) -> Option>; + #[method(setSecondarySelectionLocation:)] + pub unsafe fn setSecondarySelectionLocation( + &self, + secondarySelectionLocation: Option<&NSTextLocation>, + ); + #[method_id(typingAttributes)] + pub unsafe fn typingAttributes( + &self, + ) -> Id, Shared>; + #[method(setTypingAttributes:)] + pub unsafe fn setTypingAttributes( + &self, + typingAttributes: &NSDictionary, + ); + #[method_id(textSelectionWithTextRanges:)] + pub unsafe fn textSelectionWithTextRanges( + &self, + textRanges: &NSArray, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs new file mode 100644 index 000000000..1f59d97d4 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -0,0 +1,95 @@ +use super::__exported::NSTextLineFragment; +use super::__exported::NSTextLocation; +use super::__exported::NSTextRange; +use super::__exported::NSTextSelection; +use crate::AppKit::generated::NSTextSelection::*; +use crate::CoreGraphics::generated::CGGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextSelectionNavigation; + unsafe impl ClassType for NSTextSelectionNavigation { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextSelectionNavigation { + #[method_id(initWithDataSource:)] + pub unsafe fn initWithDataSource( + &self, + dataSource: &NSTextSelectionDataSource, + ) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(textSelectionDataSource)] + pub unsafe fn textSelectionDataSource( + &self, + ) -> Option>; + #[method(allowsNonContiguousRanges)] + pub unsafe fn allowsNonContiguousRanges(&self) -> bool; + #[method(setAllowsNonContiguousRanges:)] + pub unsafe fn setAllowsNonContiguousRanges(&self, allowsNonContiguousRanges: bool); + #[method(rotatesCoordinateSystemForLayoutOrientation)] + pub unsafe fn rotatesCoordinateSystemForLayoutOrientation(&self) -> bool; + #[method(setRotatesCoordinateSystemForLayoutOrientation:)] + pub unsafe fn setRotatesCoordinateSystemForLayoutOrientation( + &self, + rotatesCoordinateSystemForLayoutOrientation: bool, + ); + #[method(flushLayoutCache)] + pub unsafe fn flushLayoutCache(&self); + #[method_id(destinationSelectionForTextSelection:direction:destination:extending:confined:)] + pub unsafe fn destinationSelectionForTextSelection_direction_destination_extending_confined( + &self, + textSelection: &NSTextSelection, + direction: NSTextSelectionNavigationDirection, + destination: NSTextSelectionNavigationDestination, + extending: bool, + confined: bool, + ) -> Option>; + #[method_id(textSelectionsInteractingAtPoint:inContainerAtLocation:anchors:modifiers:selecting:bounds:)] + pub unsafe fn textSelectionsInteractingAtPoint_inContainerAtLocation_anchors_modifiers_selecting_bounds( + &self, + point: CGPoint, + containerLocation: &NSTextLocation, + anchors: &NSArray, + modifiers: NSTextSelectionNavigationModifier, + selecting: bool, + bounds: CGRect, + ) -> Id, Shared>; + #[method_id(textSelectionForSelectionGranularity:enclosingTextSelection:)] + pub unsafe fn textSelectionForSelectionGranularity_enclosingTextSelection( + &self, + selectionGranularity: NSTextSelectionGranularity, + textSelection: &NSTextSelection, + ) -> Id; + #[method_id(textSelectionForSelectionGranularity:enclosingPoint:inContainerAtLocation:)] + pub unsafe fn textSelectionForSelectionGranularity_enclosingPoint_inContainerAtLocation( + &self, + selectionGranularity: NSTextSelectionGranularity, + point: CGPoint, + location: &NSTextLocation, + ) -> Option>; + #[method_id(resolvedInsertionLocationForTextSelection:writingDirection:)] + pub unsafe fn resolvedInsertionLocationForTextSelection_writingDirection( + &self, + textSelection: &NSTextSelection, + writingDirection: NSTextSelectionNavigationWritingDirection, + ) -> Option>; + #[method_id(deletionRangesForTextSelection:direction:destination:allowsDecomposition:)] + pub unsafe fn deletionRangesForTextSelection_direction_destination_allowsDecomposition( + &self, + textSelection: &NSTextSelection, + direction: NSTextSelectionNavigationDirection, + destination: NSTextSelectionNavigationDestination, + allowsDecomposition: bool, + ) -> Id, Shared>; + } +); +pub type NSTextSelectionDataSource = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs new file mode 100644 index 000000000..38a49b57d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -0,0 +1,71 @@ +use super::__exported::NSArray; +use super::__exported::NSLayoutManager; +use super::__exported::NSNotification; +use crate::AppKit::generated::NSAttributedString::*; +use crate::Foundation::generated::NSNotification::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextStorage; + unsafe impl ClassType for NSTextStorage { + type Super = NSMutableAttributedString; + } +); +extern_methods!( + unsafe impl NSTextStorage { + #[method_id(layoutManagers)] + pub unsafe fn layoutManagers(&self) -> Id, Shared>; + #[method(addLayoutManager:)] + pub unsafe fn addLayoutManager(&self, aLayoutManager: &NSLayoutManager); + #[method(removeLayoutManager:)] + pub unsafe fn removeLayoutManager(&self, aLayoutManager: &NSLayoutManager); + #[method(editedMask)] + pub unsafe fn editedMask(&self) -> NSTextStorageEditActions; + #[method(editedRange)] + pub unsafe fn editedRange(&self) -> NSRange; + #[method(changeInLength)] + pub unsafe fn changeInLength(&self) -> NSInteger; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextStorageDelegate>); + #[method(edited:range:changeInLength:)] + pub unsafe fn edited_range_changeInLength( + &self, + editedMask: NSTextStorageEditActions, + editedRange: NSRange, + delta: NSInteger, + ); + #[method(processEditing)] + pub unsafe fn processEditing(&self); + #[method(fixesAttributesLazily)] + pub unsafe fn fixesAttributesLazily(&self) -> bool; + #[method(invalidateAttributesInRange:)] + pub unsafe fn invalidateAttributesInRange(&self, range: NSRange); + #[method(ensureAttributesAreFixedInRange:)] + pub unsafe fn ensureAttributesAreFixedInRange(&self, range: NSRange); + #[method_id(textStorageObserver)] + pub unsafe fn textStorageObserver(&self) -> Option>; + #[method(setTextStorageObserver:)] + pub unsafe fn setTextStorageObserver( + &self, + textStorageObserver: Option<&NSTextStorageObserving>, + ); + } +); +pub type NSTextStorageDelegate = NSObject; +pub type NSTextStorageObserving = NSObject; +pub type NSTextStorageEditedOptions = NSUInteger; +extern_methods!( + #[doc = "NSDeprecatedTextStorageDelegateInterface"] + unsafe impl NSObject { + #[method(textStorageWillProcessEditing:)] + pub unsafe fn textStorageWillProcessEditing(&self, notification: &NSNotification); + #[method(textStorageDidProcessEditing:)] + pub unsafe fn textStorageDidProcessEditing(&self, notification: &NSNotification); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs new file mode 100644 index 000000000..bbba3b110 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs @@ -0,0 +1,35 @@ +use crate::AppKit::generated::NSTextStorage::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_methods!( + #[doc = "Scripting"] + unsafe impl NSTextStorage { + #[method_id(attributeRuns)] + pub unsafe fn attributeRuns(&self) -> Id, Shared>; + #[method(setAttributeRuns:)] + pub unsafe fn setAttributeRuns(&self, attributeRuns: &NSArray); + #[method_id(paragraphs)] + pub unsafe fn paragraphs(&self) -> Id, Shared>; + #[method(setParagraphs:)] + pub unsafe fn setParagraphs(&self, paragraphs: &NSArray); + #[method_id(words)] + pub unsafe fn words(&self) -> Id, Shared>; + #[method(setWords:)] + pub unsafe fn setWords(&self, words: &NSArray); + #[method_id(characters)] + pub unsafe fn characters(&self) -> Id, Shared>; + #[method(setCharacters:)] + pub unsafe fn setCharacters(&self, characters: &NSArray); + #[method_id(font)] + pub unsafe fn font(&self) -> Option>; + #[method(setFont:)] + pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[method_id(foregroundColor)] + pub unsafe fn foregroundColor(&self) -> Option>; + #[method(setForegroundColor:)] + pub unsafe fn setForegroundColor(&self, foregroundColor: Option<&NSColor>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextTable.rs b/crates/icrate/src/generated/AppKit/NSTextTable.rs new file mode 100644 index 000000000..c1aac4f4b --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextTable.rs @@ -0,0 +1,189 @@ +use super::__exported::NSLayoutManager; +use super::__exported::NSTextContainer; +use crate::AppKit::generated::NSText::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextBlock; + unsafe impl ClassType for NSTextBlock { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextBlock { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method(setValue:type:forDimension:)] + pub unsafe fn setValue_type_forDimension( + &self, + val: CGFloat, + type_: NSTextBlockValueType, + dimension: NSTextBlockDimension, + ); + #[method(valueForDimension:)] + pub unsafe fn valueForDimension(&self, dimension: NSTextBlockDimension) -> CGFloat; + #[method(valueTypeForDimension:)] + pub unsafe fn valueTypeForDimension( + &self, + dimension: NSTextBlockDimension, + ) -> NSTextBlockValueType; + #[method(setContentWidth:type:)] + pub unsafe fn setContentWidth_type(&self, val: CGFloat, type_: NSTextBlockValueType); + #[method(contentWidth)] + pub unsafe fn contentWidth(&self) -> CGFloat; + #[method(contentWidthValueType)] + pub unsafe fn contentWidthValueType(&self) -> NSTextBlockValueType; + #[method(setWidth:type:forLayer:edge:)] + pub unsafe fn setWidth_type_forLayer_edge( + &self, + val: CGFloat, + type_: NSTextBlockValueType, + layer: NSTextBlockLayer, + edge: NSRectEdge, + ); + #[method(setWidth:type:forLayer:)] + pub unsafe fn setWidth_type_forLayer( + &self, + val: CGFloat, + type_: NSTextBlockValueType, + layer: NSTextBlockLayer, + ); + #[method(widthForLayer:edge:)] + pub unsafe fn widthForLayer_edge( + &self, + layer: NSTextBlockLayer, + edge: NSRectEdge, + ) -> CGFloat; + #[method(widthValueTypeForLayer:edge:)] + pub unsafe fn widthValueTypeForLayer_edge( + &self, + layer: NSTextBlockLayer, + edge: NSRectEdge, + ) -> NSTextBlockValueType; + #[method(verticalAlignment)] + pub unsafe fn verticalAlignment(&self) -> NSTextBlockVerticalAlignment; + #[method(setVerticalAlignment:)] + pub unsafe fn setVerticalAlignment(&self, verticalAlignment: NSTextBlockVerticalAlignment); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(setBorderColor:forEdge:)] + pub unsafe fn setBorderColor_forEdge(&self, color: Option<&NSColor>, edge: NSRectEdge); + #[method(setBorderColor:)] + pub unsafe fn setBorderColor(&self, color: Option<&NSColor>); + #[method_id(borderColorForEdge:)] + pub unsafe fn borderColorForEdge(&self, edge: NSRectEdge) -> Option>; + #[method(rectForLayoutAtPoint:inRect:textContainer:characterRange:)] + pub unsafe fn rectForLayoutAtPoint_inRect_textContainer_characterRange( + &self, + startingPoint: NSPoint, + rect: NSRect, + textContainer: &NSTextContainer, + charRange: NSRange, + ) -> NSRect; + #[method(boundsRectForContentRect:inRect:textContainer:characterRange:)] + pub unsafe fn boundsRectForContentRect_inRect_textContainer_characterRange( + &self, + contentRect: NSRect, + rect: NSRect, + textContainer: &NSTextContainer, + charRange: NSRange, + ) -> NSRect; + #[method(drawBackgroundWithFrame:inView:characterRange:layoutManager:)] + pub unsafe fn drawBackgroundWithFrame_inView_characterRange_layoutManager( + &self, + frameRect: NSRect, + controlView: &NSView, + charRange: NSRange, + layoutManager: &NSLayoutManager, + ); + } +); +extern_class!( + #[derive(Debug)] + pub struct NSTextTableBlock; + unsafe impl ClassType for NSTextTableBlock { + type Super = NSTextBlock; + } +); +extern_methods!( + unsafe impl NSTextTableBlock { + #[method_id(initWithTable:startingRow:rowSpan:startingColumn:columnSpan:)] + pub unsafe fn initWithTable_startingRow_rowSpan_startingColumn_columnSpan( + &self, + table: &NSTextTable, + row: NSInteger, + rowSpan: NSInteger, + col: NSInteger, + colSpan: NSInteger, + ) -> Id; + #[method_id(table)] + pub unsafe fn table(&self) -> Id; + #[method(startingRow)] + pub unsafe fn startingRow(&self) -> NSInteger; + #[method(rowSpan)] + pub unsafe fn rowSpan(&self) -> NSInteger; + #[method(startingColumn)] + pub unsafe fn startingColumn(&self) -> NSInteger; + #[method(columnSpan)] + pub unsafe fn columnSpan(&self) -> NSInteger; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSTextTable; + unsafe impl ClassType for NSTextTable { + type Super = NSTextBlock; + } +); +extern_methods!( + unsafe impl NSTextTable { + #[method(numberOfColumns)] + pub unsafe fn numberOfColumns(&self) -> NSUInteger; + #[method(setNumberOfColumns:)] + pub unsafe fn setNumberOfColumns(&self, numberOfColumns: NSUInteger); + #[method(layoutAlgorithm)] + pub unsafe fn layoutAlgorithm(&self) -> NSTextTableLayoutAlgorithm; + #[method(setLayoutAlgorithm:)] + pub unsafe fn setLayoutAlgorithm(&self, layoutAlgorithm: NSTextTableLayoutAlgorithm); + #[method(collapsesBorders)] + pub unsafe fn collapsesBorders(&self) -> bool; + #[method(setCollapsesBorders:)] + pub unsafe fn setCollapsesBorders(&self, collapsesBorders: bool); + #[method(hidesEmptyCells)] + pub unsafe fn hidesEmptyCells(&self) -> bool; + #[method(setHidesEmptyCells:)] + pub unsafe fn setHidesEmptyCells(&self, hidesEmptyCells: bool); + #[method(rectForBlock:layoutAtPoint:inRect:textContainer:characterRange:)] + pub unsafe fn rectForBlock_layoutAtPoint_inRect_textContainer_characterRange( + &self, + block: &NSTextTableBlock, + startingPoint: NSPoint, + rect: NSRect, + textContainer: &NSTextContainer, + charRange: NSRange, + ) -> NSRect; + #[method(boundsRectForBlock:contentRect:inRect:textContainer:characterRange:)] + pub unsafe fn boundsRectForBlock_contentRect_inRect_textContainer_characterRange( + &self, + block: &NSTextTableBlock, + contentRect: NSRect, + rect: NSRect, + textContainer: &NSTextContainer, + charRange: NSRange, + ) -> NSRect; + #[method(drawBackgroundForBlock:withFrame:inView:characterRange:layoutManager:)] + pub unsafe fn drawBackgroundForBlock_withFrame_inView_characterRange_layoutManager( + &self, + block: &NSTextTableBlock, + frameRect: NSRect, + controlView: &NSView, + charRange: NSRange, + layoutManager: &NSLayoutManager, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs new file mode 100644 index 000000000..c6b23a405 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -0,0 +1,745 @@ +use super::__exported::NSLayoutManager; +use super::__exported::NSOrthography; +use super::__exported::NSParagraphStyle; +use super::__exported::NSRulerMarker; +use super::__exported::NSRulerView; +use super::__exported::NSSharingServicePicker; +use super::__exported::NSTextAttachment; +use super::__exported::NSTextAttachmentCell; +use super::__exported::NSTextContainer; +use super::__exported::NSTextContentStorage; +use super::__exported::NSTextLayoutManager; +use super::__exported::NSTextLayoutOrientationProvider; +use super::__exported::NSTextStorage; +use super::__exported::NSUndoManager; +use super::__exported::NSValue; +use super::__exported::QLPreviewItem; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCandidateListTouchBarItem::*; +use crate::AppKit::generated::NSColorPanel::*; +use crate::AppKit::generated::NSDragging::*; +use crate::AppKit::generated::NSInputManager::*; +use crate::AppKit::generated::NSLayoutManager::*; +use crate::AppKit::generated::NSMenu::*; +use crate::AppKit::generated::NSNibDeclarations::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::AppKit::generated::NSSpellChecker::*; +use crate::AppKit::generated::NSText::*; +use crate::AppKit::generated::NSTextAttachment::*; +use crate::AppKit::generated::NSTextContent::*; +use crate::AppKit::generated::NSTextFinder::*; +use crate::AppKit::generated::NSTextInputClient::*; +use crate::AppKit::generated::NSTouchBarItem::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSTextCheckingResult::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTextView; + unsafe impl ClassType for NSTextView { + type Super = NSText; + } +); +extern_methods!( + unsafe impl NSTextView { + #[method_id(initWithFrame:textContainer:)] + pub unsafe fn initWithFrame_textContainer( + &self, + frameRect: NSRect, + container: Option<&NSTextContainer>, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(initWithFrame:)] + pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(textContainer)] + pub unsafe fn textContainer(&self) -> Option>; + #[method(setTextContainer:)] + pub unsafe fn setTextContainer(&self, textContainer: Option<&NSTextContainer>); + #[method(replaceTextContainer:)] + pub unsafe fn replaceTextContainer(&self, newContainer: &NSTextContainer); + #[method(textContainerInset)] + pub unsafe fn textContainerInset(&self) -> NSSize; + #[method(setTextContainerInset:)] + pub unsafe fn setTextContainerInset(&self, textContainerInset: NSSize); + #[method(textContainerOrigin)] + pub unsafe fn textContainerOrigin(&self) -> NSPoint; + #[method(invalidateTextContainerOrigin)] + pub unsafe fn invalidateTextContainerOrigin(&self); + #[method_id(layoutManager)] + pub unsafe fn layoutManager(&self) -> Option>; + #[method_id(textStorage)] + pub unsafe fn textStorage(&self) -> Option>; + #[method_id(textLayoutManager)] + pub unsafe fn textLayoutManager(&self) -> Option>; + #[method_id(textContentStorage)] + pub unsafe fn textContentStorage(&self) -> Option>; + #[method(insertText:)] + pub unsafe fn insertText(&self, insertString: &Object); + #[method(setConstrainedFrameSize:)] + pub unsafe fn setConstrainedFrameSize(&self, desiredSize: NSSize); + #[method(setAlignment:range:)] + pub unsafe fn setAlignment_range(&self, alignment: NSTextAlignment, range: NSRange); + #[method(setBaseWritingDirection:range:)] + pub unsafe fn setBaseWritingDirection_range( + &self, + writingDirection: NSWritingDirection, + range: NSRange, + ); + #[method(turnOffKerning:)] + pub unsafe fn turnOffKerning(&self, sender: Option<&Object>); + #[method(tightenKerning:)] + pub unsafe fn tightenKerning(&self, sender: Option<&Object>); + #[method(loosenKerning:)] + pub unsafe fn loosenKerning(&self, sender: Option<&Object>); + #[method(useStandardKerning:)] + pub unsafe fn useStandardKerning(&self, sender: Option<&Object>); + #[method(turnOffLigatures:)] + pub unsafe fn turnOffLigatures(&self, sender: Option<&Object>); + #[method(useStandardLigatures:)] + pub unsafe fn useStandardLigatures(&self, sender: Option<&Object>); + #[method(useAllLigatures:)] + pub unsafe fn useAllLigatures(&self, sender: Option<&Object>); + #[method(raiseBaseline:)] + pub unsafe fn raiseBaseline(&self, sender: Option<&Object>); + #[method(lowerBaseline:)] + pub unsafe fn lowerBaseline(&self, sender: Option<&Object>); + #[method(toggleTraditionalCharacterShape:)] + pub unsafe fn toggleTraditionalCharacterShape(&self, sender: Option<&Object>); + #[method(outline:)] + pub unsafe fn outline(&self, sender: Option<&Object>); + #[method(performFindPanelAction:)] + pub unsafe fn performFindPanelAction(&self, sender: Option<&Object>); + #[method(alignJustified:)] + pub unsafe fn alignJustified(&self, sender: Option<&Object>); + #[method(changeColor:)] + pub unsafe fn changeColor(&self, sender: Option<&Object>); + #[method(changeAttributes:)] + pub unsafe fn changeAttributes(&self, sender: Option<&Object>); + #[method(changeDocumentBackgroundColor:)] + pub unsafe fn changeDocumentBackgroundColor(&self, sender: Option<&Object>); + #[method(orderFrontSpacingPanel:)] + pub unsafe fn orderFrontSpacingPanel(&self, sender: Option<&Object>); + #[method(orderFrontLinkPanel:)] + pub unsafe fn orderFrontLinkPanel(&self, sender: Option<&Object>); + #[method(orderFrontListPanel:)] + pub unsafe fn orderFrontListPanel(&self, sender: Option<&Object>); + #[method(orderFrontTablePanel:)] + pub unsafe fn orderFrontTablePanel(&self, sender: Option<&Object>); + #[method(rulerView:didMoveMarker:)] + pub unsafe fn rulerView_didMoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:didRemoveMarker:)] + pub unsafe fn rulerView_didRemoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:didAddMarker:)] + pub unsafe fn rulerView_didAddMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:shouldMoveMarker:)] + pub unsafe fn rulerView_shouldMoveMarker( + &self, + ruler: &NSRulerView, + marker: &NSRulerMarker, + ) -> bool; + #[method(rulerView:shouldAddMarker:)] + pub unsafe fn rulerView_shouldAddMarker( + &self, + ruler: &NSRulerView, + marker: &NSRulerMarker, + ) -> bool; + #[method(rulerView:willMoveMarker:toLocation:)] + pub unsafe fn rulerView_willMoveMarker_toLocation( + &self, + ruler: &NSRulerView, + marker: &NSRulerMarker, + location: CGFloat, + ) -> CGFloat; + #[method(rulerView:shouldRemoveMarker:)] + pub unsafe fn rulerView_shouldRemoveMarker( + &self, + ruler: &NSRulerView, + marker: &NSRulerMarker, + ) -> bool; + #[method(rulerView:willAddMarker:atLocation:)] + pub unsafe fn rulerView_willAddMarker_atLocation( + &self, + ruler: &NSRulerView, + marker: &NSRulerMarker, + location: CGFloat, + ) -> CGFloat; + #[method(rulerView:handleMouseDown:)] + pub unsafe fn rulerView_handleMouseDown(&self, ruler: &NSRulerView, event: &NSEvent); + #[method(setNeedsDisplayInRect:avoidAdditionalLayout:)] + pub unsafe fn setNeedsDisplayInRect_avoidAdditionalLayout(&self, rect: NSRect, flag: bool); + #[method(shouldDrawInsertionPoint)] + pub unsafe fn shouldDrawInsertionPoint(&self) -> bool; + #[method(drawInsertionPointInRect:color:turnedOn:)] + pub unsafe fn drawInsertionPointInRect_color_turnedOn( + &self, + rect: NSRect, + color: &NSColor, + flag: bool, + ); + #[method(drawViewBackgroundInRect:)] + pub unsafe fn drawViewBackgroundInRect(&self, rect: NSRect); + #[method(updateRuler)] + pub unsafe fn updateRuler(&self); + #[method(updateFontPanel)] + pub unsafe fn updateFontPanel(&self); + #[method(updateDragTypeRegistration)] + pub unsafe fn updateDragTypeRegistration(&self); + #[method(selectionRangeForProposedRange:granularity:)] + pub unsafe fn selectionRangeForProposedRange_granularity( + &self, + proposedCharRange: NSRange, + granularity: NSSelectionGranularity, + ) -> NSRange; + #[method(clickedOnLink:atIndex:)] + pub unsafe fn clickedOnLink_atIndex(&self, link: &Object, charIndex: NSUInteger); + #[method(startSpeaking:)] + pub unsafe fn startSpeaking(&self, sender: Option<&Object>); + #[method(stopSpeaking:)] + pub unsafe fn stopSpeaking(&self, sender: Option<&Object>); + #[method(setLayoutOrientation:)] + pub unsafe fn setLayoutOrientation(&self, orientation: NSTextLayoutOrientation); + #[method(changeLayoutOrientation:)] + pub unsafe fn changeLayoutOrientation(&self, sender: Option<&Object>); + #[method(characterIndexForInsertionAtPoint:)] + pub unsafe fn characterIndexForInsertionAtPoint(&self, point: NSPoint) -> NSUInteger; + #[method(stronglyReferencesTextStorage)] + pub unsafe fn stronglyReferencesTextStorage() -> bool; + #[method(performValidatedReplacementInRange:withAttributedString:)] + pub unsafe fn performValidatedReplacementInRange_withAttributedString( + &self, + range: NSRange, + attributedString: &NSAttributedString, + ) -> bool; + #[method(usesAdaptiveColorMappingForDarkAppearance)] + pub unsafe fn usesAdaptiveColorMappingForDarkAppearance(&self) -> bool; + #[method(setUsesAdaptiveColorMappingForDarkAppearance:)] + pub unsafe fn setUsesAdaptiveColorMappingForDarkAppearance( + &self, + usesAdaptiveColorMappingForDarkAppearance: bool, + ); + } +); +extern_methods!( + #[doc = "NSCompletion"] + unsafe impl NSTextView { + #[method(complete:)] + pub unsafe fn complete(&self, sender: Option<&Object>); + #[method(rangeForUserCompletion)] + pub unsafe fn rangeForUserCompletion(&self) -> NSRange; + #[method_id(completionsForPartialWordRange:indexOfSelectedItem:)] + pub unsafe fn completionsForPartialWordRange_indexOfSelectedItem( + &self, + charRange: NSRange, + index: NonNull, + ) -> Option, Shared>>; + #[method(insertCompletion:forPartialWordRange:movement:isFinal:)] + pub unsafe fn insertCompletion_forPartialWordRange_movement_isFinal( + &self, + word: &NSString, + charRange: NSRange, + movement: NSInteger, + flag: bool, + ); + } +); +extern_methods!( + #[doc = "NSPasteboard"] + unsafe impl NSTextView { + #[method_id(writablePasteboardTypes)] + pub unsafe fn writablePasteboardTypes(&self) -> Id, Shared>; + #[method(writeSelectionToPasteboard:type:)] + pub unsafe fn writeSelectionToPasteboard_type( + &self, + pboard: &NSPasteboard, + type_: &NSPasteboardType, + ) -> bool; + #[method(writeSelectionToPasteboard:types:)] + pub unsafe fn writeSelectionToPasteboard_types( + &self, + pboard: &NSPasteboard, + types: &NSArray, + ) -> bool; + #[method_id(readablePasteboardTypes)] + pub unsafe fn readablePasteboardTypes(&self) -> Id, Shared>; + #[method_id(preferredPasteboardTypeFromArray:restrictedToTypesFromArray:)] + pub unsafe fn preferredPasteboardTypeFromArray_restrictedToTypesFromArray( + &self, + availableTypes: &NSArray, + allowedTypes: Option<&NSArray>, + ) -> Option>; + #[method(readSelectionFromPasteboard:type:)] + pub unsafe fn readSelectionFromPasteboard_type( + &self, + pboard: &NSPasteboard, + type_: &NSPasteboardType, + ) -> bool; + #[method(readSelectionFromPasteboard:)] + pub unsafe fn readSelectionFromPasteboard(&self, pboard: &NSPasteboard) -> bool; + #[method(registerForServices)] + pub unsafe fn registerForServices(); + #[method_id(validRequestorForSendType:returnType:)] + pub unsafe fn validRequestorForSendType_returnType( + &self, + sendType: Option<&NSPasteboardType>, + returnType: Option<&NSPasteboardType>, + ) -> Option>; + #[method(pasteAsPlainText:)] + pub unsafe fn pasteAsPlainText(&self, sender: Option<&Object>); + #[method(pasteAsRichText:)] + pub unsafe fn pasteAsRichText(&self, sender: Option<&Object>); + } +); +extern_methods!( + #[doc = "NSDragging"] + unsafe impl NSTextView { + #[method(dragSelectionWithEvent:offset:slideBack:)] + pub unsafe fn dragSelectionWithEvent_offset_slideBack( + &self, + event: &NSEvent, + mouseOffset: NSSize, + slideBack: bool, + ) -> bool; + #[method_id(dragImageForSelectionWithEvent:origin:)] + pub unsafe fn dragImageForSelectionWithEvent_origin( + &self, + event: &NSEvent, + origin: NSPointPointer, + ) -> Option>; + #[method_id(acceptableDragTypes)] + pub unsafe fn acceptableDragTypes(&self) -> Id, Shared>; + #[method(dragOperationForDraggingInfo:type:)] + pub unsafe fn dragOperationForDraggingInfo_type( + &self, + dragInfo: &NSDraggingInfo, + type_: &NSPasteboardType, + ) -> NSDragOperation; + #[method(cleanUpAfterDragOperation)] + pub unsafe fn cleanUpAfterDragOperation(&self); + } +); +extern_methods!( + #[doc = "NSSharing"] + unsafe impl NSTextView { + #[method_id(selectedRanges)] + pub unsafe fn selectedRanges(&self) -> Id, Shared>; + #[method(setSelectedRanges:)] + pub unsafe fn setSelectedRanges(&self, selectedRanges: &NSArray); + #[method(setSelectedRanges:affinity:stillSelecting:)] + pub unsafe fn setSelectedRanges_affinity_stillSelecting( + &self, + ranges: &NSArray, + affinity: NSSelectionAffinity, + stillSelectingFlag: bool, + ); + #[method(setSelectedRange:affinity:stillSelecting:)] + pub unsafe fn setSelectedRange_affinity_stillSelecting( + &self, + charRange: NSRange, + affinity: NSSelectionAffinity, + stillSelectingFlag: bool, + ); + #[method(selectionAffinity)] + pub unsafe fn selectionAffinity(&self) -> NSSelectionAffinity; + #[method(selectionGranularity)] + pub unsafe fn selectionGranularity(&self) -> NSSelectionGranularity; + #[method(setSelectionGranularity:)] + pub unsafe fn setSelectionGranularity(&self, selectionGranularity: NSSelectionGranularity); + #[method_id(selectedTextAttributes)] + pub unsafe fn selectedTextAttributes( + &self, + ) -> Id, Shared>; + #[method(setSelectedTextAttributes:)] + pub unsafe fn setSelectedTextAttributes( + &self, + selectedTextAttributes: &NSDictionary, + ); + #[method_id(insertionPointColor)] + pub unsafe fn insertionPointColor(&self) -> Id; + #[method(setInsertionPointColor:)] + pub unsafe fn setInsertionPointColor(&self, insertionPointColor: &NSColor); + #[method(updateInsertionPointStateAndRestartTimer:)] + pub unsafe fn updateInsertionPointStateAndRestartTimer(&self, restartFlag: bool); + #[method_id(markedTextAttributes)] + pub unsafe fn markedTextAttributes( + &self, + ) -> Option, Shared>>; + #[method(setMarkedTextAttributes:)] + pub unsafe fn setMarkedTextAttributes( + &self, + markedTextAttributes: Option<&NSDictionary>, + ); + #[method_id(linkTextAttributes)] + pub unsafe fn linkTextAttributes( + &self, + ) -> Option, Shared>>; + #[method(setLinkTextAttributes:)] + pub unsafe fn setLinkTextAttributes( + &self, + linkTextAttributes: Option<&NSDictionary>, + ); + #[method(displaysLinkToolTips)] + pub unsafe fn displaysLinkToolTips(&self) -> bool; + #[method(setDisplaysLinkToolTips:)] + pub unsafe fn setDisplaysLinkToolTips(&self, displaysLinkToolTips: bool); + #[method(acceptsGlyphInfo)] + pub unsafe fn acceptsGlyphInfo(&self) -> bool; + #[method(setAcceptsGlyphInfo:)] + pub unsafe fn setAcceptsGlyphInfo(&self, acceptsGlyphInfo: bool); + #[method(usesRuler)] + pub unsafe fn usesRuler(&self) -> bool; + #[method(setUsesRuler:)] + pub unsafe fn setUsesRuler(&self, usesRuler: bool); + #[method(usesInspectorBar)] + pub unsafe fn usesInspectorBar(&self) -> bool; + #[method(setUsesInspectorBar:)] + pub unsafe fn setUsesInspectorBar(&self, usesInspectorBar: bool); + #[method(isContinuousSpellCheckingEnabled)] + pub unsafe fn isContinuousSpellCheckingEnabled(&self) -> bool; + #[method(setContinuousSpellCheckingEnabled:)] + pub unsafe fn setContinuousSpellCheckingEnabled( + &self, + continuousSpellCheckingEnabled: bool, + ); + #[method(toggleContinuousSpellChecking:)] + pub unsafe fn toggleContinuousSpellChecking(&self, sender: Option<&Object>); + #[method(spellCheckerDocumentTag)] + pub unsafe fn spellCheckerDocumentTag(&self) -> NSInteger; + #[method(isGrammarCheckingEnabled)] + pub unsafe fn isGrammarCheckingEnabled(&self) -> bool; + #[method(setGrammarCheckingEnabled:)] + pub unsafe fn setGrammarCheckingEnabled(&self, grammarCheckingEnabled: bool); + #[method(toggleGrammarChecking:)] + pub unsafe fn toggleGrammarChecking(&self, sender: Option<&Object>); + #[method(setSpellingState:range:)] + pub unsafe fn setSpellingState_range(&self, value: NSInteger, charRange: NSRange); + #[method_id(typingAttributes)] + pub unsafe fn typingAttributes( + &self, + ) -> Id, Shared>; + #[method(setTypingAttributes:)] + pub unsafe fn setTypingAttributes( + &self, + typingAttributes: &NSDictionary, + ); + #[method(shouldChangeTextInRanges:replacementStrings:)] + pub unsafe fn shouldChangeTextInRanges_replacementStrings( + &self, + affectedRanges: &NSArray, + replacementStrings: Option<&NSArray>, + ) -> bool; + #[method_id(rangesForUserTextChange)] + pub unsafe fn rangesForUserTextChange(&self) -> Option, Shared>>; + #[method_id(rangesForUserCharacterAttributeChange)] + pub unsafe fn rangesForUserCharacterAttributeChange( + &self, + ) -> Option, Shared>>; + #[method_id(rangesForUserParagraphAttributeChange)] + pub unsafe fn rangesForUserParagraphAttributeChange( + &self, + ) -> Option, Shared>>; + #[method(shouldChangeTextInRange:replacementString:)] + pub unsafe fn shouldChangeTextInRange_replacementString( + &self, + affectedCharRange: NSRange, + replacementString: Option<&NSString>, + ) -> bool; + #[method(didChangeText)] + pub unsafe fn didChangeText(&self); + #[method(rangeForUserTextChange)] + pub unsafe fn rangeForUserTextChange(&self) -> NSRange; + #[method(rangeForUserCharacterAttributeChange)] + pub unsafe fn rangeForUserCharacterAttributeChange(&self) -> NSRange; + #[method(rangeForUserParagraphAttributeChange)] + pub unsafe fn rangeForUserParagraphAttributeChange(&self) -> NSRange; + #[method(allowsDocumentBackgroundColorChange)] + pub unsafe fn allowsDocumentBackgroundColorChange(&self) -> bool; + #[method(setAllowsDocumentBackgroundColorChange:)] + pub unsafe fn setAllowsDocumentBackgroundColorChange( + &self, + allowsDocumentBackgroundColorChange: bool, + ); + #[method_id(defaultParagraphStyle)] + pub unsafe fn defaultParagraphStyle(&self) -> Option>; + #[method(setDefaultParagraphStyle:)] + pub unsafe fn setDefaultParagraphStyle( + &self, + defaultParagraphStyle: Option<&NSParagraphStyle>, + ); + #[method(allowsUndo)] + pub unsafe fn allowsUndo(&self) -> bool; + #[method(setAllowsUndo:)] + pub unsafe fn setAllowsUndo(&self, allowsUndo: bool); + #[method(breakUndoCoalescing)] + pub unsafe fn breakUndoCoalescing(&self); + #[method(isCoalescingUndo)] + pub unsafe fn isCoalescingUndo(&self) -> bool; + #[method(allowsImageEditing)] + pub unsafe fn allowsImageEditing(&self) -> bool; + #[method(setAllowsImageEditing:)] + pub unsafe fn setAllowsImageEditing(&self, allowsImageEditing: bool); + #[method(showFindIndicatorForRange:)] + pub unsafe fn showFindIndicatorForRange(&self, charRange: NSRange); + #[method(usesRolloverButtonForSelection)] + pub unsafe fn usesRolloverButtonForSelection(&self) -> bool; + #[method(setUsesRolloverButtonForSelection:)] + pub unsafe fn setUsesRolloverButtonForSelection( + &self, + usesRolloverButtonForSelection: bool, + ); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextViewDelegate>); + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] + pub unsafe fn setEditable(&self, editable: bool); + #[method(isSelectable)] + pub unsafe fn isSelectable(&self) -> bool; + #[method(setSelectable:)] + pub unsafe fn setSelectable(&self, selectable: bool); + #[method(isRichText)] + pub unsafe fn isRichText(&self) -> bool; + #[method(setRichText:)] + pub unsafe fn setRichText(&self, richText: bool); + #[method(importsGraphics)] + pub unsafe fn importsGraphics(&self) -> bool; + #[method(setImportsGraphics:)] + pub unsafe fn setImportsGraphics(&self, importsGraphics: bool); + #[method(drawsBackground)] + pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] + pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(isFieldEditor)] + pub unsafe fn isFieldEditor(&self) -> bool; + #[method(setFieldEditor:)] + pub unsafe fn setFieldEditor(&self, fieldEditor: bool); + #[method(usesFontPanel)] + pub unsafe fn usesFontPanel(&self) -> bool; + #[method(setUsesFontPanel:)] + pub unsafe fn setUsesFontPanel(&self, usesFontPanel: bool); + #[method(isRulerVisible)] + pub unsafe fn isRulerVisible(&self) -> bool; + #[method(setRulerVisible:)] + pub unsafe fn setRulerVisible(&self, rulerVisible: bool); + #[method(setSelectedRange:)] + pub unsafe fn setSelectedRange(&self, charRange: NSRange); + #[method_id(allowedInputSourceLocales)] + pub unsafe fn allowedInputSourceLocales(&self) -> Option, Shared>>; + #[method(setAllowedInputSourceLocales:)] + pub unsafe fn setAllowedInputSourceLocales( + &self, + allowedInputSourceLocales: Option<&NSArray>, + ); + } +); +extern_methods!( + #[doc = "NSTextChecking"] + unsafe impl NSTextView { + #[method(smartInsertDeleteEnabled)] + pub unsafe fn smartInsertDeleteEnabled(&self) -> bool; + #[method(setSmartInsertDeleteEnabled:)] + pub unsafe fn setSmartInsertDeleteEnabled(&self, smartInsertDeleteEnabled: bool); + #[method(smartDeleteRangeForProposedRange:)] + pub unsafe fn smartDeleteRangeForProposedRange( + &self, + proposedCharRange: NSRange, + ) -> NSRange; + #[method(toggleSmartInsertDelete:)] + pub unsafe fn toggleSmartInsertDelete(&self, sender: Option<&Object>); + #[method(smartInsertForString:replacingRange:beforeString:afterString:)] + pub unsafe fn smartInsertForString_replacingRange_beforeString_afterString( + &self, + pasteString: &NSString, + charRangeToReplace: NSRange, + beforeString: Option<&mut Option>>, + afterString: Option<&mut Option>>, + ); + #[method_id(smartInsertBeforeStringForString:replacingRange:)] + pub unsafe fn smartInsertBeforeStringForString_replacingRange( + &self, + pasteString: &NSString, + charRangeToReplace: NSRange, + ) -> Option>; + #[method_id(smartInsertAfterStringForString:replacingRange:)] + pub unsafe fn smartInsertAfterStringForString_replacingRange( + &self, + pasteString: &NSString, + charRangeToReplace: NSRange, + ) -> Option>; + #[method(isAutomaticQuoteSubstitutionEnabled)] + pub unsafe fn isAutomaticQuoteSubstitutionEnabled(&self) -> bool; + #[method(setAutomaticQuoteSubstitutionEnabled:)] + pub unsafe fn setAutomaticQuoteSubstitutionEnabled( + &self, + automaticQuoteSubstitutionEnabled: bool, + ); + #[method(toggleAutomaticQuoteSubstitution:)] + pub unsafe fn toggleAutomaticQuoteSubstitution(&self, sender: Option<&Object>); + #[method(isAutomaticLinkDetectionEnabled)] + pub unsafe fn isAutomaticLinkDetectionEnabled(&self) -> bool; + #[method(setAutomaticLinkDetectionEnabled:)] + pub unsafe fn setAutomaticLinkDetectionEnabled(&self, automaticLinkDetectionEnabled: bool); + #[method(toggleAutomaticLinkDetection:)] + pub unsafe fn toggleAutomaticLinkDetection(&self, sender: Option<&Object>); + #[method(isAutomaticDataDetectionEnabled)] + pub unsafe fn isAutomaticDataDetectionEnabled(&self) -> bool; + #[method(setAutomaticDataDetectionEnabled:)] + pub unsafe fn setAutomaticDataDetectionEnabled(&self, automaticDataDetectionEnabled: bool); + #[method(toggleAutomaticDataDetection:)] + pub unsafe fn toggleAutomaticDataDetection(&self, sender: Option<&Object>); + #[method(isAutomaticDashSubstitutionEnabled)] + pub unsafe fn isAutomaticDashSubstitutionEnabled(&self) -> bool; + #[method(setAutomaticDashSubstitutionEnabled:)] + pub unsafe fn setAutomaticDashSubstitutionEnabled( + &self, + automaticDashSubstitutionEnabled: bool, + ); + #[method(toggleAutomaticDashSubstitution:)] + pub unsafe fn toggleAutomaticDashSubstitution(&self, sender: Option<&Object>); + #[method(isAutomaticTextReplacementEnabled)] + pub unsafe fn isAutomaticTextReplacementEnabled(&self) -> bool; + #[method(setAutomaticTextReplacementEnabled:)] + pub unsafe fn setAutomaticTextReplacementEnabled( + &self, + automaticTextReplacementEnabled: bool, + ); + #[method(toggleAutomaticTextReplacement:)] + pub unsafe fn toggleAutomaticTextReplacement(&self, sender: Option<&Object>); + #[method(isAutomaticSpellingCorrectionEnabled)] + pub unsafe fn isAutomaticSpellingCorrectionEnabled(&self) -> bool; + #[method(setAutomaticSpellingCorrectionEnabled:)] + pub unsafe fn setAutomaticSpellingCorrectionEnabled( + &self, + automaticSpellingCorrectionEnabled: bool, + ); + #[method(toggleAutomaticSpellingCorrection:)] + pub unsafe fn toggleAutomaticSpellingCorrection(&self, sender: Option<&Object>); + #[method(enabledTextCheckingTypes)] + pub unsafe fn enabledTextCheckingTypes(&self) -> NSTextCheckingTypes; + #[method(setEnabledTextCheckingTypes:)] + pub unsafe fn setEnabledTextCheckingTypes( + &self, + enabledTextCheckingTypes: NSTextCheckingTypes, + ); + #[method(checkTextInRange:types:options:)] + pub unsafe fn checkTextInRange_types_options( + &self, + range: NSRange, + checkingTypes: NSTextCheckingTypes, + options: &NSDictionary, + ); + #[method(handleTextCheckingResults:forRange:types:options:orthography:wordCount:)] + pub unsafe fn handleTextCheckingResults_forRange_types_options_orthography_wordCount( + &self, + results: &NSArray, + range: NSRange, + checkingTypes: NSTextCheckingTypes, + options: &NSDictionary, + orthography: &NSOrthography, + wordCount: NSInteger, + ); + #[method(orderFrontSubstitutionsPanel:)] + pub unsafe fn orderFrontSubstitutionsPanel(&self, sender: Option<&Object>); + #[method(checkTextInSelection:)] + pub unsafe fn checkTextInSelection(&self, sender: Option<&Object>); + #[method(checkTextInDocument:)] + pub unsafe fn checkTextInDocument(&self, sender: Option<&Object>); + #[method(usesFindPanel)] + pub unsafe fn usesFindPanel(&self) -> bool; + #[method(setUsesFindPanel:)] + pub unsafe fn setUsesFindPanel(&self, usesFindPanel: bool); + #[method(usesFindBar)] + pub unsafe fn usesFindBar(&self) -> bool; + #[method(setUsesFindBar:)] + pub unsafe fn setUsesFindBar(&self, usesFindBar: bool); + #[method(isIncrementalSearchingEnabled)] + pub unsafe fn isIncrementalSearchingEnabled(&self) -> bool; + #[method(setIncrementalSearchingEnabled:)] + pub unsafe fn setIncrementalSearchingEnabled(&self, incrementalSearchingEnabled: bool); + } +); +extern_methods!( + #[doc = "NSQuickLookPreview"] + unsafe impl NSTextView { + #[method(toggleQuickLookPreviewPanel:)] + pub unsafe fn toggleQuickLookPreviewPanel(&self, sender: Option<&Object>); + #[method_id(quickLookPreviewableItemsInRanges:)] + pub unsafe fn quickLookPreviewableItemsInRanges( + &self, + ranges: &NSArray, + ) -> Id, Shared>; + #[method(updateQuickLookPreviewPanel)] + pub unsafe fn updateQuickLookPreviewPanel(&self); + } +); +extern_methods!( + #[doc = "NSTextView_SharingService"] + unsafe impl NSTextView { + #[method(orderFrontSharingServicePicker:)] + pub unsafe fn orderFrontSharingServicePicker(&self, sender: Option<&Object>); + } +); +extern_methods!( + #[doc = "NSTextView_TouchBar"] + unsafe impl NSTextView { + #[method(isAutomaticTextCompletionEnabled)] + pub unsafe fn isAutomaticTextCompletionEnabled(&self) -> bool; + #[method(setAutomaticTextCompletionEnabled:)] + pub unsafe fn setAutomaticTextCompletionEnabled( + &self, + automaticTextCompletionEnabled: bool, + ); + #[method(toggleAutomaticTextCompletion:)] + pub unsafe fn toggleAutomaticTextCompletion(&self, sender: Option<&Object>); + #[method(allowsCharacterPickerTouchBarItem)] + pub unsafe fn allowsCharacterPickerTouchBarItem(&self) -> bool; + #[method(setAllowsCharacterPickerTouchBarItem:)] + pub unsafe fn setAllowsCharacterPickerTouchBarItem( + &self, + allowsCharacterPickerTouchBarItem: bool, + ); + #[method(updateTouchBarItemIdentifiers)] + pub unsafe fn updateTouchBarItemIdentifiers(&self); + #[method(updateTextTouchBarItems)] + pub unsafe fn updateTextTouchBarItems(&self); + #[method(updateCandidates)] + pub unsafe fn updateCandidates(&self); + #[method_id(candidateListTouchBarItem)] + pub unsafe fn candidateListTouchBarItem( + &self, + ) -> Option>; + } +); +extern_methods!( + #[doc = "NSTextView_Factory"] + unsafe impl NSTextView { + #[method_id(scrollableTextView)] + pub unsafe fn scrollableTextView() -> Id; + #[method_id(fieldEditor)] + pub unsafe fn fieldEditor() -> Id; + #[method_id(scrollableDocumentContentTextView)] + pub unsafe fn scrollableDocumentContentTextView() -> Id; + #[method_id(scrollablePlainDocumentContentTextView)] + pub unsafe fn scrollablePlainDocumentContentTextView() -> Id; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSTextView { + #[method(toggleBaseWritingDirection:)] + pub unsafe fn toggleBaseWritingDirection(&self, sender: Option<&Object>); + } +); +pub type NSTextViewDelegate = NSObject; +pub type NSPasteboardTypeFindPanelSearchOptionKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs new file mode 100644 index 000000000..d9298fada --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs @@ -0,0 +1,51 @@ +use super::__exported::NSTextLayoutFragment; +use super::__exported::NSTextLayoutManager; +use super::__exported::NSTextLocation; +use super::__exported::NSTextRange; +use crate::CoreGraphics::generated::CGGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextViewportLayoutControllerDelegate = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSTextViewportLayoutController; + unsafe impl ClassType for NSTextViewportLayoutController { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTextViewportLayoutController { + #[method_id(initWithTextLayoutManager:)] + pub unsafe fn initWithTextLayoutManager( + &self, + textLayoutManager: &NSTextLayoutManager, + ) -> Id; + #[method_id(new)] + pub unsafe fn new() -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(delegate)] + pub unsafe fn delegate(&self) + -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTextViewportLayoutControllerDelegate>); + #[method_id(textLayoutManager)] + pub unsafe fn textLayoutManager(&self) -> Option>; + #[method(viewportBounds)] + pub unsafe fn viewportBounds(&self) -> CGRect; + #[method_id(viewportRange)] + pub unsafe fn viewportRange(&self) -> Option>; + #[method(layoutViewport)] + pub unsafe fn layoutViewport(&self); + #[method(relocateViewportToTextLocation:)] + pub unsafe fn relocateViewportToTextLocation( + &self, + textLocation: &NSTextLocation, + ) -> CGFloat; + #[method(adjustViewportByVerticalOffset:)] + pub unsafe fn adjustViewportByVerticalOffset(&self, verticalOffset: CGFloat); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs new file mode 100644 index 000000000..787fa2fb3 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs @@ -0,0 +1,30 @@ +use crate::AppKit::generated::NSColor::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTintConfiguration; + unsafe impl ClassType for NSTintConfiguration { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTintConfiguration { + #[method_id(defaultTintConfiguration)] + pub unsafe fn defaultTintConfiguration() -> Id; + #[method_id(monochromeTintConfiguration)] + pub unsafe fn monochromeTintConfiguration() -> Id; + #[method_id(tintConfigurationWithPreferredColor:)] + pub unsafe fn tintConfigurationWithPreferredColor(color: &NSColor) -> Id; + #[method_id(tintConfigurationWithFixedColor:)] + pub unsafe fn tintConfigurationWithFixedColor(color: &NSColor) -> Id; + #[method_id(baseTintColor)] + pub unsafe fn baseTintColor(&self) -> Option>; + #[method_id(equivalentContentTintColor)] + pub unsafe fn equivalentContentTintColor(&self) -> Option>; + #[method(adaptsToUserAccentColor)] + pub unsafe fn adaptsToUserAccentColor(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs b/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs new file mode 100644 index 000000000..6945b300f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs @@ -0,0 +1,41 @@ +use super::__exported::NSClipView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSLayoutConstraint::*; +use crate::AppKit::generated::NSViewController::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTitlebarAccessoryViewController; + unsafe impl ClassType for NSTitlebarAccessoryViewController { + type Super = NSViewController; + } +); +extern_methods!( + unsafe impl NSTitlebarAccessoryViewController { + #[method(layoutAttribute)] + pub unsafe fn layoutAttribute(&self) -> NSLayoutAttribute; + #[method(setLayoutAttribute:)] + pub unsafe fn setLayoutAttribute(&self, layoutAttribute: NSLayoutAttribute); + #[method(fullScreenMinHeight)] + pub unsafe fn fullScreenMinHeight(&self) -> CGFloat; + #[method(setFullScreenMinHeight:)] + pub unsafe fn setFullScreenMinHeight(&self, fullScreenMinHeight: CGFloat); + #[method(isHidden)] + pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool); + #[method(automaticallyAdjustsSize)] + pub unsafe fn automaticallyAdjustsSize(&self) -> bool; + #[method(setAutomaticallyAdjustsSize:)] + pub unsafe fn setAutomaticallyAdjustsSize(&self, automaticallyAdjustsSize: bool); + #[method(viewWillAppear)] + pub unsafe fn viewWillAppear(&self); + #[method(viewDidAppear)] + pub unsafe fn viewDidAppear(&self); + #[method(viewDidDisappear)] + pub unsafe fn viewDidDisappear(&self); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTokenField.rs b/crates/icrate/src/generated/AppKit/NSTokenField.rs new file mode 100644 index 000000000..3eb81eb7f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTokenField.rs @@ -0,0 +1,44 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextContainer::*; +use crate::AppKit::generated::NSTextField::*; +use crate::AppKit::generated::NSTokenFieldCell::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTokenFieldDelegate = NSObject; +extern_class!( + #[derive(Debug)] + pub struct NSTokenField; + unsafe impl ClassType for NSTokenField { + type Super = NSTextField; + } +); +extern_methods!( + unsafe impl NSTokenField { + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTokenFieldDelegate>); + #[method(tokenStyle)] + pub unsafe fn tokenStyle(&self) -> NSTokenStyle; + #[method(setTokenStyle:)] + pub unsafe fn setTokenStyle(&self, tokenStyle: NSTokenStyle); + #[method(completionDelay)] + pub unsafe fn completionDelay(&self) -> NSTimeInterval; + #[method(setCompletionDelay:)] + pub unsafe fn setCompletionDelay(&self, completionDelay: NSTimeInterval); + #[method(defaultCompletionDelay)] + pub unsafe fn defaultCompletionDelay() -> NSTimeInterval; + #[method_id(tokenizingCharacterSet)] + pub unsafe fn tokenizingCharacterSet(&self) -> Id; + #[method(setTokenizingCharacterSet:)] + pub unsafe fn setTokenizingCharacterSet( + &self, + tokenizingCharacterSet: Option<&NSCharacterSet>, + ); + #[method_id(defaultTokenizingCharacterSet)] + pub unsafe fn defaultTokenizingCharacterSet() -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs new file mode 100644 index 000000000..8050e168b --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -0,0 +1,43 @@ +use super::__exported::NSTextContainer; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSTextFieldCell::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTokenFieldCell; + unsafe impl ClassType for NSTokenFieldCell { + type Super = NSTextFieldCell; + } +); +extern_methods!( + unsafe impl NSTokenFieldCell { + #[method(tokenStyle)] + pub unsafe fn tokenStyle(&self) -> NSTokenStyle; + #[method(setTokenStyle:)] + pub unsafe fn setTokenStyle(&self, tokenStyle: NSTokenStyle); + #[method(completionDelay)] + pub unsafe fn completionDelay(&self) -> NSTimeInterval; + #[method(setCompletionDelay:)] + pub unsafe fn setCompletionDelay(&self, completionDelay: NSTimeInterval); + #[method(defaultCompletionDelay)] + pub unsafe fn defaultCompletionDelay() -> NSTimeInterval; + #[method_id(tokenizingCharacterSet)] + pub unsafe fn tokenizingCharacterSet(&self) -> Id; + #[method(setTokenizingCharacterSet:)] + pub unsafe fn setTokenizingCharacterSet( + &self, + tokenizingCharacterSet: Option<&NSCharacterSet>, + ); + #[method_id(defaultTokenizingCharacterSet)] + pub unsafe fn defaultTokenizingCharacterSet() -> Id; + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTokenFieldCellDelegate>); + } +); +pub type NSTokenFieldCellDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs new file mode 100644 index 000000000..ccef3d1b3 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -0,0 +1,126 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSToolbarIdentifier = NSString; +pub type NSToolbarItemIdentifier = NSString; +use super::__exported::NSToolbarItem; +use super::__exported::NSView; +use super::__exported::NSWindow; +extern_class!( + #[derive(Debug)] + pub struct NSToolbar; + unsafe impl ClassType for NSToolbar { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSToolbar { + #[method_id(initWithIdentifier:)] + pub unsafe fn initWithIdentifier( + &self, + identifier: &NSToolbarIdentifier, + ) -> Id; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method(insertItemWithItemIdentifier:atIndex:)] + pub unsafe fn insertItemWithItemIdentifier_atIndex( + &self, + itemIdentifier: &NSToolbarItemIdentifier, + index: NSInteger, + ); + #[method(removeItemAtIndex:)] + pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSToolbarDelegate>); + #[method(isVisible)] + pub unsafe fn isVisible(&self) -> bool; + #[method(setVisible:)] + pub unsafe fn setVisible(&self, visible: bool); + #[method(runCustomizationPalette:)] + pub unsafe fn runCustomizationPalette(&self, sender: Option<&Object>); + #[method(customizationPaletteIsRunning)] + pub unsafe fn customizationPaletteIsRunning(&self) -> bool; + #[method(displayMode)] + pub unsafe fn displayMode(&self) -> NSToolbarDisplayMode; + #[method(setDisplayMode:)] + pub unsafe fn setDisplayMode(&self, displayMode: NSToolbarDisplayMode); + #[method_id(selectedItemIdentifier)] + pub unsafe fn selectedItemIdentifier(&self) -> Option>; + #[method(setSelectedItemIdentifier:)] + pub unsafe fn setSelectedItemIdentifier( + &self, + selectedItemIdentifier: Option<&NSToolbarItemIdentifier>, + ); + #[method(sizeMode)] + pub unsafe fn sizeMode(&self) -> NSToolbarSizeMode; + #[method(setSizeMode:)] + pub unsafe fn setSizeMode(&self, sizeMode: NSToolbarSizeMode); + #[method(showsBaselineSeparator)] + pub unsafe fn showsBaselineSeparator(&self) -> bool; + #[method(setShowsBaselineSeparator:)] + pub unsafe fn setShowsBaselineSeparator(&self, showsBaselineSeparator: bool); + #[method(allowsUserCustomization)] + pub unsafe fn allowsUserCustomization(&self) -> bool; + #[method(setAllowsUserCustomization:)] + pub unsafe fn setAllowsUserCustomization(&self, allowsUserCustomization: bool); + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Id; + #[method_id(items)] + pub unsafe fn items(&self) -> Id, Shared>; + #[method_id(visibleItems)] + pub unsafe fn visibleItems(&self) -> Option, Shared>>; + #[method_id(centeredItemIdentifier)] + pub unsafe fn centeredItemIdentifier(&self) -> Option>; + #[method(setCenteredItemIdentifier:)] + pub unsafe fn setCenteredItemIdentifier( + &self, + centeredItemIdentifier: Option<&NSToolbarItemIdentifier>, + ); + #[method(autosavesConfiguration)] + pub unsafe fn autosavesConfiguration(&self) -> bool; + #[method(setAutosavesConfiguration:)] + pub unsafe fn setAutosavesConfiguration(&self, autosavesConfiguration: bool); + #[method(setConfigurationFromDictionary:)] + pub unsafe fn setConfigurationFromDictionary( + &self, + configDict: &NSDictionary, + ); + #[method_id(configurationDictionary)] + pub unsafe fn configurationDictionary(&self) -> Id, Shared>; + #[method(validateVisibleItems)] + pub unsafe fn validateVisibleItems(&self); + #[method(allowsExtensionItems)] + pub unsafe fn allowsExtensionItems(&self) -> bool; + #[method(setAllowsExtensionItems:)] + pub unsafe fn setAllowsExtensionItems(&self, allowsExtensionItems: bool); + } +); +pub type NSToolbarDelegate = NSObject; +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSToolbar { + #[method_id(fullScreenAccessoryView)] + pub unsafe fn fullScreenAccessoryView(&self) -> Option>; + #[method(setFullScreenAccessoryView:)] + pub unsafe fn setFullScreenAccessoryView(&self, fullScreenAccessoryView: Option<&NSView>); + #[method(fullScreenAccessoryViewMinHeight)] + pub unsafe fn fullScreenAccessoryViewMinHeight(&self) -> CGFloat; + #[method(setFullScreenAccessoryViewMinHeight:)] + pub unsafe fn setFullScreenAccessoryViewMinHeight( + &self, + fullScreenAccessoryViewMinHeight: CGFloat, + ); + #[method(fullScreenAccessoryViewMaxHeight)] + pub unsafe fn fullScreenAccessoryViewMaxHeight(&self) -> CGFloat; + #[method(setFullScreenAccessoryViewMaxHeight:)] + pub unsafe fn setFullScreenAccessoryViewMaxHeight( + &self, + fullScreenAccessoryViewMaxHeight: CGFloat, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs new file mode 100644 index 000000000..c531da2b5 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -0,0 +1,122 @@ +use super::__exported::CKShare; +use super::__exported::NSImage; +use super::__exported::NSMenuItem; +use super::__exported::NSView; +use crate::AppKit::generated::NSMenu::*; +use crate::AppKit::generated::NSText::*; +use crate::AppKit::generated::NSToolbar::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +use crate::Foundation::generated::Foundation::*; +use crate::Foundation::generated::NSGeometry::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSToolbarItemVisibilityPriority = NSInteger; +extern_class!( + #[derive(Debug)] + pub struct NSToolbarItem; + unsafe impl ClassType for NSToolbarItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSToolbarItem { + #[method_id(initWithItemIdentifier:)] + pub unsafe fn initWithItemIdentifier( + &self, + itemIdentifier: &NSToolbarItemIdentifier, + ) -> Id; + #[method_id(itemIdentifier)] + pub unsafe fn itemIdentifier(&self) -> Id; + #[method_id(toolbar)] + pub unsafe fn toolbar(&self) -> Option>; + #[method_id(label)] + pub unsafe fn label(&self) -> Id; + #[method(setLabel:)] + pub unsafe fn setLabel(&self, label: &NSString); + #[method_id(paletteLabel)] + pub unsafe fn paletteLabel(&self) -> Id; + #[method(setPaletteLabel:)] + pub unsafe fn setPaletteLabel(&self, paletteLabel: &NSString); + #[method_id(toolTip)] + pub unsafe fn toolTip(&self) -> Option>; + #[method(setToolTip:)] + pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + #[method_id(menuFormRepresentation)] + pub unsafe fn menuFormRepresentation(&self) -> Option>; + #[method(setMenuFormRepresentation:)] + pub unsafe fn setMenuFormRepresentation(&self, menuFormRepresentation: Option<&NSMenuItem>); + #[method(tag)] + pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] + pub unsafe fn setTag(&self, tag: NSInteger); + #[method_id(target)] + pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] + pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] + pub unsafe fn action(&self) -> Option; + #[method(setAction:)] + pub unsafe fn setAction(&self, action: Option); + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] + pub unsafe fn setEnabled(&self, enabled: bool); + #[method_id(image)] + pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] + pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method(isBordered)] + pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] + pub unsafe fn setBordered(&self, bordered: bool); + #[method(isNavigational)] + pub unsafe fn isNavigational(&self) -> bool; + #[method(setNavigational:)] + pub unsafe fn setNavigational(&self, navigational: bool); + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method(setView:)] + pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(minSize)] + pub unsafe fn minSize(&self) -> NSSize; + #[method(setMinSize:)] + pub unsafe fn setMinSize(&self, minSize: NSSize); + #[method(maxSize)] + pub unsafe fn maxSize(&self) -> NSSize; + #[method(setMaxSize:)] + pub unsafe fn setMaxSize(&self, maxSize: NSSize); + #[method(visibilityPriority)] + pub unsafe fn visibilityPriority(&self) -> NSToolbarItemVisibilityPriority; + #[method(setVisibilityPriority:)] + pub unsafe fn setVisibilityPriority( + &self, + visibilityPriority: NSToolbarItemVisibilityPriority, + ); + #[method(validate)] + pub unsafe fn validate(&self); + #[method(autovalidates)] + pub unsafe fn autovalidates(&self) -> bool; + #[method(setAutovalidates:)] + pub unsafe fn setAutovalidates(&self, autovalidates: bool); + #[method(allowsDuplicatesInToolbar)] + pub unsafe fn allowsDuplicatesInToolbar(&self) -> bool; + } +); +extern_methods!( + unsafe impl NSToolbarItem {} +); +pub type NSToolbarItemValidation = NSObject; +extern_methods!( + #[doc = "NSToolbarItemValidation"] + unsafe impl NSObject { + #[method(validateToolbarItem:)] + pub unsafe fn validateToolbarItem(&self, item: &NSToolbarItem) -> bool; + } +); +pub type NSCloudSharingValidation = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs new file mode 100644 index 000000000..325d3b786 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs @@ -0,0 +1,58 @@ +use crate::AppKit::generated::NSToolbarItem::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSToolbarItemGroup; + unsafe impl ClassType for NSToolbarItemGroup { + type Super = NSToolbarItem; + } +); +extern_methods!( + unsafe impl NSToolbarItemGroup { + #[method_id(groupWithItemIdentifier:titles:selectionMode:labels:target:action:)] + pub unsafe fn groupWithItemIdentifier_titles_selectionMode_labels_target_action( + itemIdentifier: &NSToolbarItemIdentifier, + titles: &NSArray, + selectionMode: NSToolbarItemGroupSelectionMode, + labels: Option<&NSArray>, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(groupWithItemIdentifier:images:selectionMode:labels:target:action:)] + pub unsafe fn groupWithItemIdentifier_images_selectionMode_labels_target_action( + itemIdentifier: &NSToolbarItemIdentifier, + images: &NSArray, + selectionMode: NSToolbarItemGroupSelectionMode, + labels: Option<&NSArray>, + target: Option<&Object>, + action: Option, + ) -> Id; + #[method_id(subitems)] + pub unsafe fn subitems(&self) -> Id, Shared>; + #[method(setSubitems:)] + pub unsafe fn setSubitems(&self, subitems: &NSArray); + #[method(controlRepresentation)] + pub unsafe fn controlRepresentation(&self) -> NSToolbarItemGroupControlRepresentation; + #[method(setControlRepresentation:)] + pub unsafe fn setControlRepresentation( + &self, + controlRepresentation: NSToolbarItemGroupControlRepresentation, + ); + #[method(selectionMode)] + pub unsafe fn selectionMode(&self) -> NSToolbarItemGroupSelectionMode; + #[method(setSelectionMode:)] + pub unsafe fn setSelectionMode(&self, selectionMode: NSToolbarItemGroupSelectionMode); + #[method(selectedIndex)] + pub unsafe fn selectedIndex(&self) -> NSInteger; + #[method(setSelectedIndex:)] + pub unsafe fn setSelectedIndex(&self, selectedIndex: NSInteger); + #[method(setSelected:atIndex:)] + pub unsafe fn setSelected_atIndex(&self, selected: bool, index: NSInteger); + #[method(isSelectedAtIndex:)] + pub unsafe fn isSelectedAtIndex(&self, index: NSInteger) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs new file mode 100644 index 000000000..8c29c082d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTouch.rs @@ -0,0 +1,44 @@ +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTouch; + unsafe impl ClassType for NSTouch { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTouch { + #[method_id(identity)] + pub unsafe fn identity(&self) -> Id; + #[method(phase)] + pub unsafe fn phase(&self) -> NSTouchPhase; + #[method(normalizedPosition)] + pub unsafe fn normalizedPosition(&self) -> NSPoint; + #[method(isResting)] + pub unsafe fn isResting(&self) -> bool; + #[method_id(device)] + pub unsafe fn device(&self) -> Option>; + #[method(deviceSize)] + pub unsafe fn deviceSize(&self) -> NSSize; + } +); +extern_methods!( + #[doc = "NSTouchBar"] + unsafe impl NSTouch { + #[method(type)] + pub unsafe fn type_(&self) -> NSTouchType; + #[method(locationInView:)] + pub unsafe fn locationInView(&self, view: Option<&NSView>) -> NSPoint; + #[method(previousLocationInView:)] + pub unsafe fn previousLocationInView(&self, view: Option<&NSView>) -> NSPoint; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTouchBar.rs b/crates/icrate/src/generated/AppKit/NSTouchBar.rs new file mode 100644 index 000000000..85eaa86ca --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTouchBar.rs @@ -0,0 +1,127 @@ +use crate::AppKit::generated::NSApplication::*; +use crate::AppKit::generated::NSResponder::*; +use crate::AppKit::generated::NSTouchBarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTouchBarCustomizationIdentifier = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSTouchBar; + unsafe impl ClassType for NSTouchBar { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTouchBar { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(customizationIdentifier)] + pub unsafe fn customizationIdentifier( + &self, + ) -> Option>; + #[method(setCustomizationIdentifier:)] + pub unsafe fn setCustomizationIdentifier( + &self, + customizationIdentifier: Option<&NSTouchBarCustomizationIdentifier>, + ); + #[method_id(customizationAllowedItemIdentifiers)] + pub unsafe fn customizationAllowedItemIdentifiers( + &self, + ) -> Id, Shared>; + #[method(setCustomizationAllowedItemIdentifiers:)] + pub unsafe fn setCustomizationAllowedItemIdentifiers( + &self, + customizationAllowedItemIdentifiers: &NSArray, + ); + #[method_id(customizationRequiredItemIdentifiers)] + pub unsafe fn customizationRequiredItemIdentifiers( + &self, + ) -> Id, Shared>; + #[method(setCustomizationRequiredItemIdentifiers:)] + pub unsafe fn setCustomizationRequiredItemIdentifiers( + &self, + customizationRequiredItemIdentifiers: &NSArray, + ); + #[method_id(defaultItemIdentifiers)] + pub unsafe fn defaultItemIdentifiers( + &self, + ) -> Id, Shared>; + #[method(setDefaultItemIdentifiers:)] + pub unsafe fn setDefaultItemIdentifiers( + &self, + defaultItemIdentifiers: &NSArray, + ); + #[method_id(itemIdentifiers)] + pub unsafe fn itemIdentifiers(&self) -> Id, Shared>; + #[method_id(principalItemIdentifier)] + pub unsafe fn principalItemIdentifier( + &self, + ) -> Option>; + #[method(setPrincipalItemIdentifier:)] + pub unsafe fn setPrincipalItemIdentifier( + &self, + principalItemIdentifier: Option<&NSTouchBarItemIdentifier>, + ); + #[method_id(escapeKeyReplacementItemIdentifier)] + pub unsafe fn escapeKeyReplacementItemIdentifier( + &self, + ) -> Option>; + #[method(setEscapeKeyReplacementItemIdentifier:)] + pub unsafe fn setEscapeKeyReplacementItemIdentifier( + &self, + escapeKeyReplacementItemIdentifier: Option<&NSTouchBarItemIdentifier>, + ); + #[method_id(templateItems)] + pub unsafe fn templateItems(&self) -> Id, Shared>; + #[method(setTemplateItems:)] + pub unsafe fn setTemplateItems(&self, templateItems: &NSSet); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSTouchBarDelegate>); + #[method_id(itemForIdentifier:)] + pub unsafe fn itemForIdentifier( + &self, + identifier: &NSTouchBarItemIdentifier, + ) -> Option>; + #[method(isVisible)] + pub unsafe fn isVisible(&self) -> bool; + #[method(isAutomaticCustomizeTouchBarMenuItemEnabled)] + pub unsafe fn isAutomaticCustomizeTouchBarMenuItemEnabled() -> bool; + #[method(setAutomaticCustomizeTouchBarMenuItemEnabled:)] + pub unsafe fn setAutomaticCustomizeTouchBarMenuItemEnabled( + automaticCustomizeTouchBarMenuItemEnabled: bool, + ); + } +); +pub type NSTouchBarDelegate = NSObject; +pub type NSTouchBarProvider = NSObject; +extern_methods!( + #[doc = "NSTouchBarProvider"] + unsafe impl NSResponder { + #[method_id(touchBar)] + pub unsafe fn touchBar(&self) -> Option>; + #[method(setTouchBar:)] + pub unsafe fn setTouchBar(&self, touchBar: Option<&NSTouchBar>); + #[method_id(makeTouchBar)] + pub unsafe fn makeTouchBar(&self) -> Option>; + } +); +extern_methods!( + #[doc = "NSTouchBarCustomization"] + unsafe impl NSApplication { + #[method(isAutomaticCustomizeTouchBarMenuItemEnabled)] + pub unsafe fn isAutomaticCustomizeTouchBarMenuItemEnabled(&self) -> bool; + #[method(setAutomaticCustomizeTouchBarMenuItemEnabled:)] + pub unsafe fn setAutomaticCustomizeTouchBarMenuItemEnabled( + &self, + automaticCustomizeTouchBarMenuItemEnabled: bool, + ); + #[method(toggleTouchBarCustomizationPalette:)] + pub unsafe fn toggleTouchBarCustomizationPalette(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs new file mode 100644 index 000000000..d6f584a7d --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -0,0 +1,47 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTouchBarItemIdentifier = NSString; +use super::__exported::NSGestureRecognizer; +use super::__exported::NSImage; +use super::__exported::NSString; +use super::__exported::NSTouchBar; +use super::__exported::NSView; +use super::__exported::NSViewController; +extern_class!( + #[derive(Debug)] + pub struct NSTouchBarItem; + unsafe impl ClassType for NSTouchBarItem { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTouchBarItem { + #[method_id(initWithIdentifier:)] + pub unsafe fn initWithIdentifier( + &self, + identifier: &NSTouchBarItemIdentifier, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Id; + #[method(visibilityPriority)] + pub unsafe fn visibilityPriority(&self) -> NSTouchBarItemPriority; + #[method(setVisibilityPriority:)] + pub unsafe fn setVisibilityPriority(&self, visibilityPriority: NSTouchBarItemPriority); + #[method_id(view)] + pub unsafe fn view(&self) -> Option>; + #[method_id(viewController)] + pub unsafe fn viewController(&self) -> Option>; + #[method_id(customizationLabel)] + pub unsafe fn customizationLabel(&self) -> Id; + #[method(isVisible)] + pub unsafe fn isVisible(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs new file mode 100644 index 000000000..503facf3e --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs @@ -0,0 +1,36 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObjCRuntime::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTrackingArea; + unsafe impl ClassType for NSTrackingArea { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTrackingArea { + #[method_id(initWithRect:options:owner:userInfo:)] + pub unsafe fn initWithRect_options_owner_userInfo( + &self, + rect: NSRect, + options: NSTrackingAreaOptions, + owner: Option<&Object>, + userInfo: Option<&NSDictionary>, + ) -> Id; + #[method(rect)] + pub unsafe fn rect(&self) -> NSRect; + #[method(options)] + pub unsafe fn options(&self) -> NSTrackingAreaOptions; + #[method_id(owner)] + pub unsafe fn owner(&self) -> Option>; + #[method_id(userInfo)] + pub unsafe fn userInfo(&self) -> Option, Shared>>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs new file mode 100644 index 000000000..e03182694 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs @@ -0,0 +1,31 @@ +use super::__exported::NSSplitView; +use crate::AppKit::generated::NSToolbarItem::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTrackingSeparatorToolbarItem; + unsafe impl ClassType for NSTrackingSeparatorToolbarItem { + type Super = NSToolbarItem; + } +); +extern_methods!( + unsafe impl NSTrackingSeparatorToolbarItem { + #[method_id(trackingSeparatorToolbarItemWithIdentifier:splitView:dividerIndex:)] + pub unsafe fn trackingSeparatorToolbarItemWithIdentifier_splitView_dividerIndex( + identifier: &NSToolbarItemIdentifier, + splitView: &NSSplitView, + dividerIndex: NSInteger, + ) -> Id; + #[method_id(splitView)] + pub unsafe fn splitView(&self) -> Id; + #[method(setSplitView:)] + pub unsafe fn setSplitView(&self, splitView: &NSSplitView); + #[method(dividerIndex)] + pub unsafe fn dividerIndex(&self) -> NSInteger; + #[method(setDividerIndex:)] + pub unsafe fn setDividerIndex(&self, dividerIndex: NSInteger); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTreeController.rs b/crates/icrate/src/generated/AppKit/NSTreeController.rs new file mode 100644 index 000000000..2afc3ade4 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTreeController.rs @@ -0,0 +1,133 @@ +use super::__exported::NSSortDescriptor; +use super::__exported::NSTreeNode; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSObjectController::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSIndexPath::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTreeController; + unsafe impl ClassType for NSTreeController { + type Super = NSObjectController; + } +); +extern_methods!( + unsafe impl NSTreeController { + #[method(rearrangeObjects)] + pub unsafe fn rearrangeObjects(&self); + #[method_id(arrangedObjects)] + pub unsafe fn arrangedObjects(&self) -> Id; + #[method_id(childrenKeyPath)] + pub unsafe fn childrenKeyPath(&self) -> Option>; + #[method(setChildrenKeyPath:)] + pub unsafe fn setChildrenKeyPath(&self, childrenKeyPath: Option<&NSString>); + #[method_id(countKeyPath)] + pub unsafe fn countKeyPath(&self) -> Option>; + #[method(setCountKeyPath:)] + pub unsafe fn setCountKeyPath(&self, countKeyPath: Option<&NSString>); + #[method_id(leafKeyPath)] + pub unsafe fn leafKeyPath(&self) -> Option>; + #[method(setLeafKeyPath:)] + pub unsafe fn setLeafKeyPath(&self, leafKeyPath: Option<&NSString>); + #[method_id(sortDescriptors)] + pub unsafe fn sortDescriptors(&self) -> Id, Shared>; + #[method(setSortDescriptors:)] + pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); + #[method_id(content)] + pub unsafe fn content(&self) -> Option>; + #[method(setContent:)] + pub unsafe fn setContent(&self, content: Option<&Object>); + #[method(add:)] + pub unsafe fn add(&self, sender: Option<&Object>); + #[method(remove:)] + pub unsafe fn remove(&self, sender: Option<&Object>); + #[method(addChild:)] + pub unsafe fn addChild(&self, sender: Option<&Object>); + #[method(insert:)] + pub unsafe fn insert(&self, sender: Option<&Object>); + #[method(insertChild:)] + pub unsafe fn insertChild(&self, sender: Option<&Object>); + #[method(canInsert)] + pub unsafe fn canInsert(&self) -> bool; + #[method(canInsertChild)] + pub unsafe fn canInsertChild(&self) -> bool; + #[method(canAddChild)] + pub unsafe fn canAddChild(&self) -> bool; + #[method(insertObject:atArrangedObjectIndexPath:)] + pub unsafe fn insertObject_atArrangedObjectIndexPath( + &self, + object: Option<&Object>, + indexPath: &NSIndexPath, + ); + #[method(insertObjects:atArrangedObjectIndexPaths:)] + pub unsafe fn insertObjects_atArrangedObjectIndexPaths( + &self, + objects: &NSArray, + indexPaths: &NSArray, + ); + #[method(removeObjectAtArrangedObjectIndexPath:)] + pub unsafe fn removeObjectAtArrangedObjectIndexPath(&self, indexPath: &NSIndexPath); + #[method(removeObjectsAtArrangedObjectIndexPaths:)] + pub unsafe fn removeObjectsAtArrangedObjectIndexPaths( + &self, + indexPaths: &NSArray, + ); + #[method(avoidsEmptySelection)] + pub unsafe fn avoidsEmptySelection(&self) -> bool; + #[method(setAvoidsEmptySelection:)] + pub unsafe fn setAvoidsEmptySelection(&self, avoidsEmptySelection: bool); + #[method(preservesSelection)] + pub unsafe fn preservesSelection(&self) -> bool; + #[method(setPreservesSelection:)] + pub unsafe fn setPreservesSelection(&self, preservesSelection: bool); + #[method(selectsInsertedObjects)] + pub unsafe fn selectsInsertedObjects(&self) -> bool; + #[method(setSelectsInsertedObjects:)] + pub unsafe fn setSelectsInsertedObjects(&self, selectsInsertedObjects: bool); + #[method(alwaysUsesMultipleValuesMarker)] + pub unsafe fn alwaysUsesMultipleValuesMarker(&self) -> bool; + #[method(setAlwaysUsesMultipleValuesMarker:)] + pub unsafe fn setAlwaysUsesMultipleValuesMarker( + &self, + alwaysUsesMultipleValuesMarker: bool, + ); + #[method_id(selectedObjects)] + pub unsafe fn selectedObjects(&self) -> Id; + #[method(setSelectionIndexPaths:)] + pub unsafe fn setSelectionIndexPaths(&self, indexPaths: &NSArray) -> bool; + #[method_id(selectionIndexPaths)] + pub unsafe fn selectionIndexPaths(&self) -> Id, Shared>; + #[method(setSelectionIndexPath:)] + pub unsafe fn setSelectionIndexPath(&self, indexPath: Option<&NSIndexPath>) -> bool; + #[method_id(selectionIndexPath)] + pub unsafe fn selectionIndexPath(&self) -> Option>; + #[method(addSelectionIndexPaths:)] + pub unsafe fn addSelectionIndexPaths(&self, indexPaths: &NSArray) -> bool; + #[method(removeSelectionIndexPaths:)] + pub unsafe fn removeSelectionIndexPaths(&self, indexPaths: &NSArray) -> bool; + #[method_id(selectedNodes)] + pub unsafe fn selectedNodes(&self) -> Id, Shared>; + #[method(moveNode:toIndexPath:)] + pub unsafe fn moveNode_toIndexPath(&self, node: &NSTreeNode, indexPath: &NSIndexPath); + #[method(moveNodes:toIndexPath:)] + pub unsafe fn moveNodes_toIndexPath( + &self, + nodes: &NSArray, + startingIndexPath: &NSIndexPath, + ); + #[method_id(childrenKeyPathForNode:)] + pub unsafe fn childrenKeyPathForNode( + &self, + node: &NSTreeNode, + ) -> Option>; + #[method_id(countKeyPathForNode:)] + pub unsafe fn countKeyPathForNode(&self, node: &NSTreeNode) + -> Option>; + #[method_id(leafKeyPathForNode:)] + pub unsafe fn leafKeyPathForNode(&self, node: &NSTreeNode) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTreeNode.rs b/crates/icrate/src/generated/AppKit/NSTreeNode.rs new file mode 100644 index 000000000..1d6aecdc7 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTreeNode.rs @@ -0,0 +1,53 @@ +use super::__exported::NSIndexPath; +use super::__exported::NSSortDescriptor; +use super::__exported::NSTreeController; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTreeNode; + unsafe impl ClassType for NSTreeNode { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTreeNode { + #[method_id(treeNodeWithRepresentedObject:)] + pub unsafe fn treeNodeWithRepresentedObject( + modelObject: Option<&Object>, + ) -> Id; + #[method_id(initWithRepresentedObject:)] + pub unsafe fn initWithRepresentedObject( + &self, + modelObject: Option<&Object>, + ) -> Id; + #[method_id(representedObject)] + pub unsafe fn representedObject(&self) -> Option>; + #[method_id(indexPath)] + pub unsafe fn indexPath(&self) -> Id; + #[method(isLeaf)] + pub unsafe fn isLeaf(&self) -> bool; + #[method_id(childNodes)] + pub unsafe fn childNodes(&self) -> Option, Shared>>; + #[method_id(mutableChildNodes)] + pub unsafe fn mutableChildNodes(&self) -> Id, Shared>; + #[method_id(descendantNodeAtIndexPath:)] + pub unsafe fn descendantNodeAtIndexPath( + &self, + indexPath: &NSIndexPath, + ) -> Option>; + #[method_id(parentNode)] + pub unsafe fn parentNode(&self) -> Option>; + #[method(sortWithSortDescriptors:recursively:)] + pub unsafe fn sortWithSortDescriptors_recursively( + &self, + sortDescriptors: &NSArray, + recursively: bool, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs new file mode 100644 index 000000000..12d27677a --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSTypesetter.rs @@ -0,0 +1,288 @@ +use crate::AppKit::generated::NSLayoutManager::*; +use crate::AppKit::generated::NSParagraphStyle::*; +use crate::CoreFoundation::generated::CFCharacterSet::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSTypesetter; + unsafe impl ClassType for NSTypesetter { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSTypesetter { + #[method(usesFontLeading)] + pub unsafe fn usesFontLeading(&self) -> bool; + #[method(setUsesFontLeading:)] + pub unsafe fn setUsesFontLeading(&self, usesFontLeading: bool); + #[method(typesetterBehavior)] + pub unsafe fn typesetterBehavior(&self) -> NSTypesetterBehavior; + #[method(setTypesetterBehavior:)] + pub unsafe fn setTypesetterBehavior(&self, typesetterBehavior: NSTypesetterBehavior); + #[method(hyphenationFactor)] + pub unsafe fn hyphenationFactor(&self) -> c_float; + #[method(setHyphenationFactor:)] + pub unsafe fn setHyphenationFactor(&self, hyphenationFactor: c_float); + #[method(lineFragmentPadding)] + pub unsafe fn lineFragmentPadding(&self) -> CGFloat; + #[method(setLineFragmentPadding:)] + pub unsafe fn setLineFragmentPadding(&self, lineFragmentPadding: CGFloat); + #[method_id(substituteFontForFont:)] + pub unsafe fn substituteFontForFont(&self, originalFont: &NSFont) -> Id; + #[method_id(textTabForGlyphLocation:writingDirection:maxLocation:)] + pub unsafe fn textTabForGlyphLocation_writingDirection_maxLocation( + &self, + glyphLocation: CGFloat, + direction: NSWritingDirection, + maxLocation: CGFloat, + ) -> Option>; + #[method(bidiProcessingEnabled)] + pub unsafe fn bidiProcessingEnabled(&self) -> bool; + #[method(setBidiProcessingEnabled:)] + pub unsafe fn setBidiProcessingEnabled(&self, bidiProcessingEnabled: bool); + #[method_id(attributedString)] + pub unsafe fn attributedString(&self) -> Option>; + #[method(setAttributedString:)] + pub unsafe fn setAttributedString(&self, attributedString: Option<&NSAttributedString>); + #[method(setParagraphGlyphRange:separatorGlyphRange:)] + pub unsafe fn setParagraphGlyphRange_separatorGlyphRange( + &self, + paragraphRange: NSRange, + paragraphSeparatorRange: NSRange, + ); + #[method(paragraphGlyphRange)] + pub unsafe fn paragraphGlyphRange(&self) -> NSRange; + #[method(paragraphSeparatorGlyphRange)] + pub unsafe fn paragraphSeparatorGlyphRange(&self) -> NSRange; + #[method(paragraphCharacterRange)] + pub unsafe fn paragraphCharacterRange(&self) -> NSRange; + #[method(paragraphSeparatorCharacterRange)] + pub unsafe fn paragraphSeparatorCharacterRange(&self) -> NSRange; + #[method(layoutParagraphAtPoint:)] + pub unsafe fn layoutParagraphAtPoint( + &self, + lineFragmentOrigin: NSPointPointer, + ) -> NSUInteger; + #[method(beginParagraph)] + pub unsafe fn beginParagraph(&self); + #[method(endParagraph)] + pub unsafe fn endParagraph(&self); + #[method(beginLineWithGlyphAtIndex:)] + pub unsafe fn beginLineWithGlyphAtIndex(&self, glyphIndex: NSUInteger); + #[method(endLineWithGlyphRange:)] + pub unsafe fn endLineWithGlyphRange(&self, lineGlyphRange: NSRange); + #[method(lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( + &self, + glyphIndex: NSUInteger, + rect: NSRect, + ) -> CGFloat; + #[method(paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect( + &self, + glyphIndex: NSUInteger, + rect: NSRect, + ) -> CGFloat; + #[method(paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( + &self, + glyphIndex: NSUInteger, + rect: NSRect, + ) -> CGFloat; + #[method(getLineFragmentRect:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:)] + pub unsafe fn getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin( + &self, + lineFragmentRect: NSRectPointer, + lineFragmentUsedRect: NSRectPointer, + paragraphSeparatorGlyphRange: NSRange, + lineOrigin: NSPoint, + ); + #[method_id(attributesForExtraLineFragment)] + pub unsafe fn attributesForExtraLineFragment( + &self, + ) -> Id, Shared>; + #[method_id(layoutManager)] + pub unsafe fn layoutManager(&self) -> Option>; + #[method_id(textContainers)] + pub unsafe fn textContainers(&self) -> Option, Shared>>; + #[method_id(currentTextContainer)] + pub unsafe fn currentTextContainer(&self) -> Option>; + #[method_id(currentParagraphStyle)] + pub unsafe fn currentParagraphStyle(&self) -> Option>; + #[method(setHardInvalidation:forGlyphRange:)] + pub unsafe fn setHardInvalidation_forGlyphRange(&self, flag: bool, glyphRange: NSRange); + #[method(layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:nextGlyphIndex:)] + pub unsafe fn layoutGlyphsInLayoutManager_startingAtGlyphIndex_maxNumberOfLineFragments_nextGlyphIndex( + &self, + layoutManager: &NSLayoutManager, + startGlyphIndex: NSUInteger, + maxNumLines: NSUInteger, + nextGlyph: NonNull, + ); + #[method(layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:)] + pub unsafe fn layoutCharactersInRange_forLayoutManager_maximumNumberOfLineFragments( + &self, + characterRange: NSRange, + layoutManager: &NSLayoutManager, + maxNumLines: NSUInteger, + ) -> NSRange; + #[method(printingAdjustmentInLayoutManager:forNominallySpacedGlyphRange:packedGlyphs:count:)] + pub unsafe fn printingAdjustmentInLayoutManager_forNominallySpacedGlyphRange_packedGlyphs_count( + layoutMgr: &NSLayoutManager, + nominallySpacedGlyphsRange: NSRange, + packedGlyphs: NonNull, + packedGlyphsCount: NSUInteger, + ) -> NSSize; + #[method(baselineOffsetInLayoutManager:glyphIndex:)] + pub unsafe fn baselineOffsetInLayoutManager_glyphIndex( + &self, + layoutMgr: &NSLayoutManager, + glyphIndex: NSUInteger, + ) -> CGFloat; + #[method_id(sharedSystemTypesetter)] + pub unsafe fn sharedSystemTypesetter() -> Id; + #[method_id(sharedSystemTypesetterForBehavior:)] + pub unsafe fn sharedSystemTypesetterForBehavior( + behavior: NSTypesetterBehavior, + ) -> Id; + #[method(defaultTypesetterBehavior)] + pub unsafe fn defaultTypesetterBehavior() -> NSTypesetterBehavior; + } +); +extern_methods!( + #[doc = "NSLayoutPhaseInterface"] + unsafe impl NSTypesetter { + #[method(willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:)] + pub unsafe fn willSetLineFragmentRect_forGlyphRange_usedRect_baselineOffset( + &self, + lineRect: NSRectPointer, + glyphRange: NSRange, + usedRect: NSRectPointer, + baselineOffset: NonNull, + ); + #[method(shouldBreakLineByWordBeforeCharacterAtIndex:)] + pub unsafe fn shouldBreakLineByWordBeforeCharacterAtIndex( + &self, + charIndex: NSUInteger, + ) -> bool; + #[method(shouldBreakLineByHyphenatingBeforeCharacterAtIndex:)] + pub unsafe fn shouldBreakLineByHyphenatingBeforeCharacterAtIndex( + &self, + charIndex: NSUInteger, + ) -> bool; + #[method(hyphenationFactorForGlyphAtIndex:)] + pub unsafe fn hyphenationFactorForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> c_float; + #[method(hyphenCharacterForGlyphAtIndex:)] + pub unsafe fn hyphenCharacterForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> UTF32Char; + #[method(boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:)] + pub unsafe fn boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex( + &self, + glyphIndex: NSUInteger, + textContainer: &NSTextContainer, + proposedRect: NSRect, + glyphPosition: NSPoint, + charIndex: NSUInteger, + ) -> NSRect; + } +); +extern_methods!( + #[doc = "NSGlyphStorageInterface"] + unsafe impl NSTypesetter { + #[method(characterRangeForGlyphRange:actualGlyphRange:)] + pub unsafe fn characterRangeForGlyphRange_actualGlyphRange( + &self, + glyphRange: NSRange, + actualGlyphRange: NSRangePointer, + ) -> NSRange; + #[method(glyphRangeForCharacterRange:actualCharacterRange:)] + pub unsafe fn glyphRangeForCharacterRange_actualCharacterRange( + &self, + charRange: NSRange, + actualCharRange: NSRangePointer, + ) -> NSRange; + #[method(getLineFragmentRect:usedRect:remainingRect:forStartingGlyphAtIndex:proposedRect:lineSpacing:paragraphSpacingBefore:paragraphSpacingAfter:)] + pub unsafe fn getLineFragmentRect_usedRect_remainingRect_forStartingGlyphAtIndex_proposedRect_lineSpacing_paragraphSpacingBefore_paragraphSpacingAfter( + &self, + lineFragmentRect: NSRectPointer, + lineFragmentUsedRect: NSRectPointer, + remainingRect: NSRectPointer, + startingGlyphIndex: NSUInteger, + proposedRect: NSRect, + lineSpacing: CGFloat, + paragraphSpacingBefore: CGFloat, + paragraphSpacingAfter: CGFloat, + ); + #[method(setLineFragmentRect:forGlyphRange:usedRect:baselineOffset:)] + pub unsafe fn setLineFragmentRect_forGlyphRange_usedRect_baselineOffset( + &self, + fragmentRect: NSRect, + glyphRange: NSRange, + usedRect: NSRect, + baselineOffset: CGFloat, + ); + #[method(setNotShownAttribute:forGlyphRange:)] + pub unsafe fn setNotShownAttribute_forGlyphRange(&self, flag: bool, glyphRange: NSRange); + #[method(setDrawsOutsideLineFragment:forGlyphRange:)] + pub unsafe fn setDrawsOutsideLineFragment_forGlyphRange( + &self, + flag: bool, + glyphRange: NSRange, + ); + #[method(setLocation:withAdvancements:forStartOfGlyphRange:)] + pub unsafe fn setLocation_withAdvancements_forStartOfGlyphRange( + &self, + location: NSPoint, + advancements: *mut CGFloat, + glyphRange: NSRange, + ); + #[method(setAttachmentSize:forGlyphRange:)] + pub unsafe fn setAttachmentSize_forGlyphRange( + &self, + attachmentSize: NSSize, + glyphRange: NSRange, + ); + #[method(setBidiLevels:forGlyphRange:)] + pub unsafe fn setBidiLevels_forGlyphRange(&self, levels: *mut u8, glyphRange: NSRange); + } +); +extern_methods!( + #[doc = "NSTypesetter_Deprecated"] + unsafe impl NSTypesetter { + #[method(actionForControlCharacterAtIndex:)] + pub unsafe fn actionForControlCharacterAtIndex( + &self, + charIndex: NSUInteger, + ) -> NSTypesetterControlCharacterAction; + #[method(getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)] + pub unsafe fn getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels( + &self, + glyphsRange: NSRange, + glyphBuffer: *mut NSGlyph, + charIndexBuffer: *mut NSUInteger, + inscribeBuffer: *mut NSGlyphInscription, + elasticBuffer: *mut bool, + bidiLevelBuffer: *mut c_uchar, + ) -> NSUInteger; + #[method(substituteGlyphsInRange:withGlyphs:)] + pub unsafe fn substituteGlyphsInRange_withGlyphs( + &self, + glyphRange: NSRange, + glyphs: *mut NSGlyph, + ); + #[method(insertGlyph:atGlyphIndex:characterIndex:)] + pub unsafe fn insertGlyph_atGlyphIndex_characterIndex( + &self, + glyph: NSGlyph, + glyphIndex: NSUInteger, + characterIndex: NSUInteger, + ); + #[method(deleteGlyphsInRange:)] + pub unsafe fn deleteGlyphsInRange(&self, glyphRange: NSRange); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSUserActivity.rs b/crates/icrate/src/generated/AppKit/NSUserActivity.rs new file mode 100644 index 000000000..30b18a383 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSUserActivity.rs @@ -0,0 +1,31 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSDocument::*; +use crate::AppKit::generated::NSResponder::*; +use crate::Foundation::generated::NSUserActivity::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSUserActivityRestoring = NSObject; +extern_methods!( + #[doc = "NSUserActivity"] + unsafe impl NSResponder { + #[method_id(userActivity)] + pub unsafe fn userActivity(&self) -> Option>; + #[method(setUserActivity:)] + pub unsafe fn setUserActivity(&self, userActivity: Option<&NSUserActivity>); + #[method(updateUserActivityState:)] + pub unsafe fn updateUserActivityState(&self, userActivity: &NSUserActivity); + } +); +extern_methods!( + #[doc = "NSUserActivity"] + unsafe impl NSDocument { + #[method_id(userActivity)] + pub unsafe fn userActivity(&self) -> Option>; + #[method(setUserActivity:)] + pub unsafe fn setUserActivity(&self, userActivity: Option<&NSUserActivity>); + #[method(updateUserActivityState:)] + pub unsafe fn updateUserActivityState(&self, activity: &NSUserActivity); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs new file mode 100644 index 000000000..908cbfd26 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs @@ -0,0 +1,52 @@ +use super::__exported::NSUserDefaults; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSController::*; +use crate::Foundation::generated::NSDictionary::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSUserDefaultsController; + unsafe impl ClassType for NSUserDefaultsController { + type Super = NSController; + } +); +extern_methods!( + unsafe impl NSUserDefaultsController { + #[method_id(sharedUserDefaultsController)] + pub unsafe fn sharedUserDefaultsController() -> Id; + #[method_id(initWithDefaults:initialValues:)] + pub unsafe fn initWithDefaults_initialValues( + &self, + defaults: Option<&NSUserDefaults>, + initialValues: Option<&NSDictionary>, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(defaults)] + pub unsafe fn defaults(&self) -> Id; + #[method_id(initialValues)] + pub unsafe fn initialValues(&self) -> Option, Shared>>; + #[method(setInitialValues:)] + pub unsafe fn setInitialValues( + &self, + initialValues: Option<&NSDictionary>, + ); + #[method(appliesImmediately)] + pub unsafe fn appliesImmediately(&self) -> bool; + #[method(setAppliesImmediately:)] + pub unsafe fn setAppliesImmediately(&self, appliesImmediately: bool); + #[method(hasUnappliedChanges)] + pub unsafe fn hasUnappliedChanges(&self) -> bool; + #[method_id(values)] + pub unsafe fn values(&self) -> Id; + #[method(revert:)] + pub unsafe fn revert(&self, sender: Option<&Object>); + #[method(save:)] + pub unsafe fn save(&self, sender: Option<&Object>); + #[method(revertToInitialValues:)] + pub unsafe fn revertToInitialValues(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs new file mode 100644 index 000000000..6160d629f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs @@ -0,0 +1,58 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObjCRuntime::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSUserInterfaceCompressionOptions; + unsafe impl ClassType for NSUserInterfaceCompressionOptions { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSUserInterfaceCompressionOptions { + #[method_id(init)] + pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initWithIdentifier:)] + pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id; + #[method_id(initWithCompressionOptions:)] + pub unsafe fn initWithCompressionOptions( + &self, + options: &NSSet, + ) -> Id; + #[method(containsOptions:)] + pub unsafe fn containsOptions(&self, options: &NSUserInterfaceCompressionOptions) -> bool; + #[method(intersectsOptions:)] + pub unsafe fn intersectsOptions(&self, options: &NSUserInterfaceCompressionOptions) + -> bool; + #[method(isEmpty)] + pub unsafe fn isEmpty(&self) -> bool; + #[method_id(optionsByAddingOptions:)] + pub unsafe fn optionsByAddingOptions( + &self, + options: &NSUserInterfaceCompressionOptions, + ) -> Id; + #[method_id(optionsByRemovingOptions:)] + pub unsafe fn optionsByRemovingOptions( + &self, + options: &NSUserInterfaceCompressionOptions, + ) -> Id; + #[method_id(hideImagesOption)] + pub unsafe fn hideImagesOption() -> Id; + #[method_id(hideTextOption)] + pub unsafe fn hideTextOption() -> Id; + #[method_id(reduceMetricsOption)] + pub unsafe fn reduceMetricsOption() -> Id; + #[method_id(breakEqualWidthsOption)] + pub unsafe fn breakEqualWidthsOption() -> Id; + #[method_id(standardOptions)] + pub unsafe fn standardOptions() -> Id; + } +); +pub type NSUserInterfaceCompression = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs new file mode 100644 index 000000000..d062384e4 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs @@ -0,0 +1,8 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSUserInterfaceItemIdentifier = NSString; +pub type NSUserInterfaceItemIdentification = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs new file mode 100644 index 000000000..fa2334869 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs @@ -0,0 +1,32 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSString::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSUserInterfaceItemSearching = NSObject; +extern_methods!( + #[doc = "NSUserInterfaceItemSearching"] + unsafe impl NSApplication { + #[method(registerUserInterfaceItemSearchHandler:)] + pub unsafe fn registerUserInterfaceItemSearchHandler( + &self, + handler: &NSUserInterfaceItemSearching, + ); + #[method(unregisterUserInterfaceItemSearchHandler:)] + pub unsafe fn unregisterUserInterfaceItemSearchHandler( + &self, + handler: &NSUserInterfaceItemSearching, + ); + #[method(searchString:inUserInterfaceItemString:searchRange:foundRange:)] + pub unsafe fn searchString_inUserInterfaceItemString_searchRange_foundRange( + &self, + searchString: &NSString, + stringToSearch: &NSString, + searchRange: NSRange, + foundRange: *mut NSRange, + ) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs new file mode 100644 index 000000000..7c06f4cd4 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs @@ -0,0 +1,5 @@ +use crate::AppKit::generated::AppKitDefines::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs new file mode 100644 index 000000000..e324a8490 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs @@ -0,0 +1,8 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSValidatedUserInterfaceItem = NSObject; +pub type NSUserInterfaceValidations = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs new file mode 100644 index 000000000..78cca8965 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -0,0 +1,783 @@ +use super::__exported::CALayer; +use super::__exported::CIFilter; +use super::__exported::NSAttributedString; +use super::__exported::NSBitmapImageRep; +use super::__exported::NSCursor; +use super::__exported::NSDraggingSession; +use super::__exported::NSDraggingSource; +use super::__exported::NSGestureRecognizer; +use super::__exported::NSGraphicsContext; +use super::__exported::NSImage; +use super::__exported::NSLayoutGuide; +use super::__exported::NSScreen; +use super::__exported::NSScrollView; +use super::__exported::NSShadow; +use super::__exported::NSTextInputContext; +use super::__exported::NSTrackingArea; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAnimation::*; +use crate::AppKit::generated::NSAppearance::*; +use crate::AppKit::generated::NSDragging::*; +use crate::AppKit::generated::NSGraphics::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::AppKit::generated::NSResponder::*; +use crate::AppKit::generated::NSTouch::*; +use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; +use crate::AppKit::generated::NSUserInterfaceLayout::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSRange::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTrackingRectTag = NSInteger; +pub type NSToolTipTag = NSInteger; +extern_class!( + #[derive(Debug)] + pub struct NSView; + unsafe impl ClassType for NSView { + type Super = NSResponder; + } +); +extern_methods!( + unsafe impl NSView { + #[method_id(initWithFrame:)] + pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(window)] + pub unsafe fn window(&self) -> Option>; + #[method_id(superview)] + pub unsafe fn superview(&self) -> Option>; + #[method_id(subviews)] + pub unsafe fn subviews(&self) -> Id, Shared>; + #[method(setSubviews:)] + pub unsafe fn setSubviews(&self, subviews: &NSArray); + #[method(isDescendantOf:)] + pub unsafe fn isDescendantOf(&self, view: &NSView) -> bool; + #[method_id(ancestorSharedWithView:)] + pub unsafe fn ancestorSharedWithView(&self, view: &NSView) -> Option>; + #[method_id(opaqueAncestor)] + pub unsafe fn opaqueAncestor(&self) -> Option>; + #[method(isHidden)] + pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool); + #[method(isHiddenOrHasHiddenAncestor)] + pub unsafe fn isHiddenOrHasHiddenAncestor(&self) -> bool; + #[method(getRectsBeingDrawn:count:)] + pub unsafe fn getRectsBeingDrawn_count( + &self, + rects: *mut *mut NSRect, + count: *mut NSInteger, + ); + #[method(needsToDrawRect:)] + pub unsafe fn needsToDrawRect(&self, rect: NSRect) -> bool; + #[method(wantsDefaultClipping)] + pub unsafe fn wantsDefaultClipping(&self) -> bool; + #[method(viewDidHide)] + pub unsafe fn viewDidHide(&self); + #[method(viewDidUnhide)] + pub unsafe fn viewDidUnhide(&self); + #[method(addSubview:)] + pub unsafe fn addSubview(&self, view: &NSView); + #[method(addSubview:positioned:relativeTo:)] + pub unsafe fn addSubview_positioned_relativeTo( + &self, + view: &NSView, + place: NSWindowOrderingMode, + otherView: Option<&NSView>, + ); + #[method(sortSubviewsUsingFunction:context:)] + pub unsafe fn sortSubviewsUsingFunction_context( + &self, + compare: NonNull, + context: *mut c_void, + ); + #[method(viewWillMoveToWindow:)] + pub unsafe fn viewWillMoveToWindow(&self, newWindow: Option<&NSWindow>); + #[method(viewDidMoveToWindow)] + pub unsafe fn viewDidMoveToWindow(&self); + #[method(viewWillMoveToSuperview:)] + pub unsafe fn viewWillMoveToSuperview(&self, newSuperview: Option<&NSView>); + #[method(viewDidMoveToSuperview)] + pub unsafe fn viewDidMoveToSuperview(&self); + #[method(didAddSubview:)] + pub unsafe fn didAddSubview(&self, subview: &NSView); + #[method(willRemoveSubview:)] + pub unsafe fn willRemoveSubview(&self, subview: &NSView); + #[method(removeFromSuperview)] + pub unsafe fn removeFromSuperview(&self); + #[method(replaceSubview:with:)] + pub unsafe fn replaceSubview_with(&self, oldView: &NSView, newView: &NSView); + #[method(removeFromSuperviewWithoutNeedingDisplay)] + pub unsafe fn removeFromSuperviewWithoutNeedingDisplay(&self); + #[method(viewDidChangeBackingProperties)] + pub unsafe fn viewDidChangeBackingProperties(&self); + #[method(postsFrameChangedNotifications)] + pub unsafe fn postsFrameChangedNotifications(&self) -> bool; + #[method(setPostsFrameChangedNotifications:)] + pub unsafe fn setPostsFrameChangedNotifications( + &self, + postsFrameChangedNotifications: bool, + ); + #[method(resizeSubviewsWithOldSize:)] + pub unsafe fn resizeSubviewsWithOldSize(&self, oldSize: NSSize); + #[method(resizeWithOldSuperviewSize:)] + pub unsafe fn resizeWithOldSuperviewSize(&self, oldSize: NSSize); + #[method(autoresizesSubviews)] + pub unsafe fn autoresizesSubviews(&self) -> bool; + #[method(setAutoresizesSubviews:)] + pub unsafe fn setAutoresizesSubviews(&self, autoresizesSubviews: bool); + #[method(autoresizingMask)] + pub unsafe fn autoresizingMask(&self) -> NSAutoresizingMaskOptions; + #[method(setAutoresizingMask:)] + pub unsafe fn setAutoresizingMask(&self, autoresizingMask: NSAutoresizingMaskOptions); + #[method(setFrameOrigin:)] + pub unsafe fn setFrameOrigin(&self, newOrigin: NSPoint); + #[method(setFrameSize:)] + pub unsafe fn setFrameSize(&self, newSize: NSSize); + #[method(frame)] + pub unsafe fn frame(&self) -> NSRect; + #[method(setFrame:)] + pub unsafe fn setFrame(&self, frame: NSRect); + #[method(frameRotation)] + pub unsafe fn frameRotation(&self) -> CGFloat; + #[method(setFrameRotation:)] + pub unsafe fn setFrameRotation(&self, frameRotation: CGFloat); + #[method(frameCenterRotation)] + pub unsafe fn frameCenterRotation(&self) -> CGFloat; + #[method(setFrameCenterRotation:)] + pub unsafe fn setFrameCenterRotation(&self, frameCenterRotation: CGFloat); + #[method(setBoundsOrigin:)] + pub unsafe fn setBoundsOrigin(&self, newOrigin: NSPoint); + #[method(setBoundsSize:)] + pub unsafe fn setBoundsSize(&self, newSize: NSSize); + #[method(boundsRotation)] + pub unsafe fn boundsRotation(&self) -> CGFloat; + #[method(setBoundsRotation:)] + pub unsafe fn setBoundsRotation(&self, boundsRotation: CGFloat); + #[method(translateOriginToPoint:)] + pub unsafe fn translateOriginToPoint(&self, translation: NSPoint); + #[method(scaleUnitSquareToSize:)] + pub unsafe fn scaleUnitSquareToSize(&self, newUnitSize: NSSize); + #[method(rotateByAngle:)] + pub unsafe fn rotateByAngle(&self, angle: CGFloat); + #[method(bounds)] + pub unsafe fn bounds(&self) -> NSRect; + #[method(setBounds:)] + pub unsafe fn setBounds(&self, bounds: NSRect); + #[method(isFlipped)] + pub unsafe fn isFlipped(&self) -> bool; + #[method(isRotatedFromBase)] + pub unsafe fn isRotatedFromBase(&self) -> bool; + #[method(isRotatedOrScaledFromBase)] + pub unsafe fn isRotatedOrScaledFromBase(&self) -> bool; + #[method(isOpaque)] + pub unsafe fn isOpaque(&self) -> bool; + #[method(convertPoint:fromView:)] + pub unsafe fn convertPoint_fromView( + &self, + point: NSPoint, + view: Option<&NSView>, + ) -> NSPoint; + #[method(convertPoint:toView:)] + pub unsafe fn convertPoint_toView(&self, point: NSPoint, view: Option<&NSView>) -> NSPoint; + #[method(convertSize:fromView:)] + pub unsafe fn convertSize_fromView(&self, size: NSSize, view: Option<&NSView>) -> NSSize; + #[method(convertSize:toView:)] + pub unsafe fn convertSize_toView(&self, size: NSSize, view: Option<&NSView>) -> NSSize; + #[method(convertRect:fromView:)] + pub unsafe fn convertRect_fromView(&self, rect: NSRect, view: Option<&NSView>) -> NSRect; + #[method(convertRect:toView:)] + pub unsafe fn convertRect_toView(&self, rect: NSRect, view: Option<&NSView>) -> NSRect; + #[method(backingAlignedRect:options:)] + pub unsafe fn backingAlignedRect_options( + &self, + rect: NSRect, + options: NSAlignmentOptions, + ) -> NSRect; + #[method(centerScanRect:)] + pub unsafe fn centerScanRect(&self, rect: NSRect) -> NSRect; + #[method(convertPointToBacking:)] + pub unsafe fn convertPointToBacking(&self, point: NSPoint) -> NSPoint; + #[method(convertPointFromBacking:)] + pub unsafe fn convertPointFromBacking(&self, point: NSPoint) -> NSPoint; + #[method(convertSizeToBacking:)] + pub unsafe fn convertSizeToBacking(&self, size: NSSize) -> NSSize; + #[method(convertSizeFromBacking:)] + pub unsafe fn convertSizeFromBacking(&self, size: NSSize) -> NSSize; + #[method(convertRectToBacking:)] + pub unsafe fn convertRectToBacking(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromBacking:)] + pub unsafe fn convertRectFromBacking(&self, rect: NSRect) -> NSRect; + #[method(convertPointToLayer:)] + pub unsafe fn convertPointToLayer(&self, point: NSPoint) -> NSPoint; + #[method(convertPointFromLayer:)] + pub unsafe fn convertPointFromLayer(&self, point: NSPoint) -> NSPoint; + #[method(convertSizeToLayer:)] + pub unsafe fn convertSizeToLayer(&self, size: NSSize) -> NSSize; + #[method(convertSizeFromLayer:)] + pub unsafe fn convertSizeFromLayer(&self, size: NSSize) -> NSSize; + #[method(convertRectToLayer:)] + pub unsafe fn convertRectToLayer(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromLayer:)] + pub unsafe fn convertRectFromLayer(&self, rect: NSRect) -> NSRect; + #[method(canDrawConcurrently)] + pub unsafe fn canDrawConcurrently(&self) -> bool; + #[method(setCanDrawConcurrently:)] + pub unsafe fn setCanDrawConcurrently(&self, canDrawConcurrently: bool); + #[method(canDraw)] + pub unsafe fn canDraw(&self) -> bool; + #[method(setNeedsDisplayInRect:)] + pub unsafe fn setNeedsDisplayInRect(&self, invalidRect: NSRect); + #[method(needsDisplay)] + pub unsafe fn needsDisplay(&self) -> bool; + #[method(setNeedsDisplay:)] + pub unsafe fn setNeedsDisplay(&self, needsDisplay: bool); + #[method(lockFocus)] + pub unsafe fn lockFocus(&self); + #[method(unlockFocus)] + pub unsafe fn unlockFocus(&self); + #[method(lockFocusIfCanDraw)] + pub unsafe fn lockFocusIfCanDraw(&self) -> bool; + #[method(lockFocusIfCanDrawInContext:)] + pub unsafe fn lockFocusIfCanDrawInContext(&self, context: &NSGraphicsContext) -> bool; + #[method_id(focusView)] + pub unsafe fn focusView() -> Option>; + #[method(visibleRect)] + pub unsafe fn visibleRect(&self) -> NSRect; + #[method(display)] + pub unsafe fn display(&self); + #[method(displayIfNeeded)] + pub unsafe fn displayIfNeeded(&self); + #[method(displayIfNeededIgnoringOpacity)] + pub unsafe fn displayIfNeededIgnoringOpacity(&self); + #[method(displayRect:)] + pub unsafe fn displayRect(&self, rect: NSRect); + #[method(displayIfNeededInRect:)] + pub unsafe fn displayIfNeededInRect(&self, rect: NSRect); + #[method(displayRectIgnoringOpacity:)] + pub unsafe fn displayRectIgnoringOpacity(&self, rect: NSRect); + #[method(displayIfNeededInRectIgnoringOpacity:)] + pub unsafe fn displayIfNeededInRectIgnoringOpacity(&self, rect: NSRect); + #[method(drawRect:)] + pub unsafe fn drawRect(&self, dirtyRect: NSRect); + #[method(displayRectIgnoringOpacity:inContext:)] + pub unsafe fn displayRectIgnoringOpacity_inContext( + &self, + rect: NSRect, + context: &NSGraphicsContext, + ); + #[method_id(bitmapImageRepForCachingDisplayInRect:)] + pub unsafe fn bitmapImageRepForCachingDisplayInRect( + &self, + rect: NSRect, + ) -> Option>; + #[method(cacheDisplayInRect:toBitmapImageRep:)] + pub unsafe fn cacheDisplayInRect_toBitmapImageRep( + &self, + rect: NSRect, + bitmapImageRep: &NSBitmapImageRep, + ); + #[method(viewWillDraw)] + pub unsafe fn viewWillDraw(&self); + #[method(scrollPoint:)] + pub unsafe fn scrollPoint(&self, point: NSPoint); + #[method(scrollRectToVisible:)] + pub unsafe fn scrollRectToVisible(&self, rect: NSRect) -> bool; + #[method(autoscroll:)] + pub unsafe fn autoscroll(&self, event: &NSEvent) -> bool; + #[method(adjustScroll:)] + pub unsafe fn adjustScroll(&self, newVisible: NSRect) -> NSRect; + #[method(scrollRect:by:)] + pub unsafe fn scrollRect_by(&self, rect: NSRect, delta: NSSize); + #[method(translateRectsNeedingDisplayInRect:by:)] + pub unsafe fn translateRectsNeedingDisplayInRect_by(&self, clipRect: NSRect, delta: NSSize); + #[method_id(hitTest:)] + pub unsafe fn hitTest(&self, point: NSPoint) -> Option>; + #[method(mouse:inRect:)] + pub unsafe fn mouse_inRect(&self, point: NSPoint, rect: NSRect) -> bool; + #[method_id(viewWithTag:)] + pub unsafe fn viewWithTag(&self, tag: NSInteger) -> Option>; + #[method(tag)] + pub unsafe fn tag(&self) -> NSInteger; + #[method(performKeyEquivalent:)] + pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; + #[method(acceptsFirstMouse:)] + pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool; + #[method(shouldDelayWindowOrderingForEvent:)] + pub unsafe fn shouldDelayWindowOrderingForEvent(&self, event: &NSEvent) -> bool; + #[method(needsPanelToBecomeKey)] + pub unsafe fn needsPanelToBecomeKey(&self) -> bool; + #[method(mouseDownCanMoveWindow)] + pub unsafe fn mouseDownCanMoveWindow(&self) -> bool; + #[method(acceptsTouchEvents)] + pub unsafe fn acceptsTouchEvents(&self) -> bool; + #[method(setAcceptsTouchEvents:)] + pub unsafe fn setAcceptsTouchEvents(&self, acceptsTouchEvents: bool); + #[method(wantsRestingTouches)] + pub unsafe fn wantsRestingTouches(&self) -> bool; + #[method(setWantsRestingTouches:)] + pub unsafe fn setWantsRestingTouches(&self, wantsRestingTouches: bool); + #[method(addCursorRect:cursor:)] + pub unsafe fn addCursorRect_cursor(&self, rect: NSRect, object: &NSCursor); + #[method(removeCursorRect:cursor:)] + pub unsafe fn removeCursorRect_cursor(&self, rect: NSRect, object: &NSCursor); + #[method(discardCursorRects)] + pub unsafe fn discardCursorRects(&self); + #[method(resetCursorRects)] + pub unsafe fn resetCursorRects(&self); + #[method(addTrackingRect:owner:userData:assumeInside:)] + pub unsafe fn addTrackingRect_owner_userData_assumeInside( + &self, + rect: NSRect, + owner: &Object, + data: *mut c_void, + flag: bool, + ) -> NSTrackingRectTag; + #[method(removeTrackingRect:)] + pub unsafe fn removeTrackingRect(&self, tag: NSTrackingRectTag); + #[method_id(makeBackingLayer)] + pub unsafe fn makeBackingLayer(&self) -> Id; + #[method(layerContentsRedrawPolicy)] + pub unsafe fn layerContentsRedrawPolicy(&self) -> NSViewLayerContentsRedrawPolicy; + #[method(setLayerContentsRedrawPolicy:)] + pub unsafe fn setLayerContentsRedrawPolicy( + &self, + layerContentsRedrawPolicy: NSViewLayerContentsRedrawPolicy, + ); + #[method(layerContentsPlacement)] + pub unsafe fn layerContentsPlacement(&self) -> NSViewLayerContentsPlacement; + #[method(setLayerContentsPlacement:)] + pub unsafe fn setLayerContentsPlacement( + &self, + layerContentsPlacement: NSViewLayerContentsPlacement, + ); + #[method(wantsLayer)] + pub unsafe fn wantsLayer(&self) -> bool; + #[method(setWantsLayer:)] + pub unsafe fn setWantsLayer(&self, wantsLayer: bool); + #[method_id(layer)] + pub unsafe fn layer(&self) -> Option>; + #[method(setLayer:)] + pub unsafe fn setLayer(&self, layer: Option<&CALayer>); + #[method(wantsUpdateLayer)] + pub unsafe fn wantsUpdateLayer(&self) -> bool; + #[method(updateLayer)] + pub unsafe fn updateLayer(&self); + #[method(canDrawSubviewsIntoLayer)] + pub unsafe fn canDrawSubviewsIntoLayer(&self) -> bool; + #[method(setCanDrawSubviewsIntoLayer:)] + pub unsafe fn setCanDrawSubviewsIntoLayer(&self, canDrawSubviewsIntoLayer: bool); + #[method(layoutSubtreeIfNeeded)] + pub unsafe fn layoutSubtreeIfNeeded(&self); + #[method(layout)] + pub unsafe fn layout(&self); + #[method(needsLayout)] + pub unsafe fn needsLayout(&self) -> bool; + #[method(setNeedsLayout:)] + pub unsafe fn setNeedsLayout(&self, needsLayout: bool); + #[method(alphaValue)] + pub unsafe fn alphaValue(&self) -> CGFloat; + #[method(setAlphaValue:)] + pub unsafe fn setAlphaValue(&self, alphaValue: CGFloat); + #[method(layerUsesCoreImageFilters)] + pub unsafe fn layerUsesCoreImageFilters(&self) -> bool; + #[method(setLayerUsesCoreImageFilters:)] + pub unsafe fn setLayerUsesCoreImageFilters(&self, layerUsesCoreImageFilters: bool); + #[method_id(backgroundFilters)] + pub unsafe fn backgroundFilters(&self) -> Id, Shared>; + #[method(setBackgroundFilters:)] + pub unsafe fn setBackgroundFilters(&self, backgroundFilters: &NSArray); + #[method_id(compositingFilter)] + pub unsafe fn compositingFilter(&self) -> Option>; + #[method(setCompositingFilter:)] + pub unsafe fn setCompositingFilter(&self, compositingFilter: Option<&CIFilter>); + #[method_id(contentFilters)] + pub unsafe fn contentFilters(&self) -> Id, Shared>; + #[method(setContentFilters:)] + pub unsafe fn setContentFilters(&self, contentFilters: &NSArray); + #[method_id(shadow)] + pub unsafe fn shadow(&self) -> Option>; + #[method(setShadow:)] + pub unsafe fn setShadow(&self, shadow: Option<&NSShadow>); + #[method(addTrackingArea:)] + pub unsafe fn addTrackingArea(&self, trackingArea: &NSTrackingArea); + #[method(removeTrackingArea:)] + pub unsafe fn removeTrackingArea(&self, trackingArea: &NSTrackingArea); + #[method_id(trackingAreas)] + pub unsafe fn trackingAreas(&self) -> Id, Shared>; + #[method(updateTrackingAreas)] + pub unsafe fn updateTrackingAreas(&self); + #[method(postsBoundsChangedNotifications)] + pub unsafe fn postsBoundsChangedNotifications(&self) -> bool; + #[method(setPostsBoundsChangedNotifications:)] + pub unsafe fn setPostsBoundsChangedNotifications( + &self, + postsBoundsChangedNotifications: bool, + ); + #[method_id(enclosingScrollView)] + pub unsafe fn enclosingScrollView(&self) -> Option>; + #[method_id(menuForEvent:)] + pub unsafe fn menuForEvent(&self, event: &NSEvent) -> Option>; + #[method_id(defaultMenu)] + pub unsafe fn defaultMenu() -> Option>; + #[method(willOpenMenu:withEvent:)] + pub unsafe fn willOpenMenu_withEvent(&self, menu: &NSMenu, event: &NSEvent); + #[method(didCloseMenu:withEvent:)] + pub unsafe fn didCloseMenu_withEvent(&self, menu: &NSMenu, event: Option<&NSEvent>); + #[method_id(toolTip)] + pub unsafe fn toolTip(&self) -> Option>; + #[method(setToolTip:)] + pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + #[method(addToolTipRect:owner:userData:)] + pub unsafe fn addToolTipRect_owner_userData( + &self, + rect: NSRect, + owner: &Object, + data: *mut c_void, + ) -> NSToolTipTag; + #[method(removeToolTip:)] + pub unsafe fn removeToolTip(&self, tag: NSToolTipTag); + #[method(removeAllToolTips)] + pub unsafe fn removeAllToolTips(&self); + #[method(viewWillStartLiveResize)] + pub unsafe fn viewWillStartLiveResize(&self); + #[method(viewDidEndLiveResize)] + pub unsafe fn viewDidEndLiveResize(&self); + #[method(inLiveResize)] + pub unsafe fn inLiveResize(&self) -> bool; + #[method(preservesContentDuringLiveResize)] + pub unsafe fn preservesContentDuringLiveResize(&self) -> bool; + #[method(rectPreservedDuringLiveResize)] + pub unsafe fn rectPreservedDuringLiveResize(&self) -> NSRect; + #[method(getRectsExposedDuringLiveResize:count:)] + pub unsafe fn getRectsExposedDuringLiveResize_count( + &self, + exposedRects: [NSRect; 4usize], + count: NonNull, + ); + #[method_id(inputContext)] + pub unsafe fn inputContext(&self) -> Option>; + #[method(rectForSmartMagnificationAtPoint:inRect:)] + pub unsafe fn rectForSmartMagnificationAtPoint_inRect( + &self, + location: NSPoint, + visibleRect: NSRect, + ) -> NSRect; + #[method(userInterfaceLayoutDirection)] + pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setUserInterfaceLayoutDirection:)] + pub unsafe fn setUserInterfaceLayoutDirection( + &self, + userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, + ); + #[method(prepareForReuse)] + pub unsafe fn prepareForReuse(&self); + #[method(isCompatibleWithResponsiveScrolling)] + pub unsafe fn isCompatibleWithResponsiveScrolling() -> bool; + #[method(prepareContentInRect:)] + pub unsafe fn prepareContentInRect(&self, rect: NSRect); + #[method(preparedContentRect)] + pub unsafe fn preparedContentRect(&self) -> NSRect; + #[method(setPreparedContentRect:)] + pub unsafe fn setPreparedContentRect(&self, preparedContentRect: NSRect); + #[method(allowsVibrancy)] + pub unsafe fn allowsVibrancy(&self) -> bool; + #[method(viewDidChangeEffectiveAppearance)] + pub unsafe fn viewDidChangeEffectiveAppearance(&self); + } +); +pub type NSViewLayerContentScaleDelegate = NSObject; +extern_methods!( + #[doc = "NSLayerDelegateContentsScaleUpdating"] + unsafe impl NSObject { + #[method(layer:shouldInheritContentsScale:fromWindow:)] + pub unsafe fn layer_shouldInheritContentsScale_fromWindow( + &self, + layer: &CALayer, + newScale: CGFloat, + window: &NSWindow, + ) -> bool; + } +); +pub type NSViewToolTipOwner = NSObject; +extern_methods!( + #[doc = "NSToolTipOwner"] + unsafe impl NSObject { + #[method_id(view:stringForToolTip:point:userData:)] + pub unsafe fn view_stringForToolTip_point_userData( + &self, + view: &NSView, + tag: NSToolTipTag, + point: NSPoint, + data: *mut c_void, + ) -> Id; + } +); +extern_methods!( + #[doc = "NSKeyboardUI"] + unsafe impl NSView { + #[method_id(nextKeyView)] + pub unsafe fn nextKeyView(&self) -> Option>; + #[method(setNextKeyView:)] + pub unsafe fn setNextKeyView(&self, nextKeyView: Option<&NSView>); + #[method_id(previousKeyView)] + pub unsafe fn previousKeyView(&self) -> Option>; + #[method_id(nextValidKeyView)] + pub unsafe fn nextValidKeyView(&self) -> Option>; + #[method_id(previousValidKeyView)] + pub unsafe fn previousValidKeyView(&self) -> Option>; + #[method(canBecomeKeyView)] + pub unsafe fn canBecomeKeyView(&self) -> bool; + #[method(setKeyboardFocusRingNeedsDisplayInRect:)] + pub unsafe fn setKeyboardFocusRingNeedsDisplayInRect(&self, rect: NSRect); + #[method(focusRingType)] + pub unsafe fn focusRingType(&self) -> NSFocusRingType; + #[method(setFocusRingType:)] + pub unsafe fn setFocusRingType(&self, focusRingType: NSFocusRingType); + #[method(defaultFocusRingType)] + pub unsafe fn defaultFocusRingType() -> NSFocusRingType; + #[method(drawFocusRingMask)] + pub unsafe fn drawFocusRingMask(&self); + #[method(focusRingMaskBounds)] + pub unsafe fn focusRingMaskBounds(&self) -> NSRect; + #[method(noteFocusRingMaskChanged)] + pub unsafe fn noteFocusRingMaskChanged(&self); + } +); +extern_methods!( + #[doc = "NSPrinting"] + unsafe impl NSView { + #[method(writeEPSInsideRect:toPasteboard:)] + pub unsafe fn writeEPSInsideRect_toPasteboard( + &self, + rect: NSRect, + pasteboard: &NSPasteboard, + ); + #[method_id(dataWithEPSInsideRect:)] + pub unsafe fn dataWithEPSInsideRect(&self, rect: NSRect) -> Id; + #[method(writePDFInsideRect:toPasteboard:)] + pub unsafe fn writePDFInsideRect_toPasteboard( + &self, + rect: NSRect, + pasteboard: &NSPasteboard, + ); + #[method_id(dataWithPDFInsideRect:)] + pub unsafe fn dataWithPDFInsideRect(&self, rect: NSRect) -> Id; + #[method(print:)] + pub unsafe fn print(&self, sender: Option<&Object>); + #[method(knowsPageRange:)] + pub unsafe fn knowsPageRange(&self, range: NSRangePointer) -> bool; + #[method(heightAdjustLimit)] + pub unsafe fn heightAdjustLimit(&self) -> CGFloat; + #[method(widthAdjustLimit)] + pub unsafe fn widthAdjustLimit(&self) -> CGFloat; + #[method(adjustPageWidthNew:left:right:limit:)] + pub unsafe fn adjustPageWidthNew_left_right_limit( + &self, + newRight: NonNull, + oldLeft: CGFloat, + oldRight: CGFloat, + rightLimit: CGFloat, + ); + #[method(adjustPageHeightNew:top:bottom:limit:)] + pub unsafe fn adjustPageHeightNew_top_bottom_limit( + &self, + newBottom: NonNull, + oldTop: CGFloat, + oldBottom: CGFloat, + bottomLimit: CGFloat, + ); + #[method(rectForPage:)] + pub unsafe fn rectForPage(&self, page: NSInteger) -> NSRect; + #[method(locationOfPrintRect:)] + pub unsafe fn locationOfPrintRect(&self, rect: NSRect) -> NSPoint; + #[method(drawPageBorderWithSize:)] + pub unsafe fn drawPageBorderWithSize(&self, borderSize: NSSize); + #[method_id(pageHeader)] + pub unsafe fn pageHeader(&self) -> Id; + #[method_id(pageFooter)] + pub unsafe fn pageFooter(&self) -> Id; + #[method(drawSheetBorderWithSize:)] + pub unsafe fn drawSheetBorderWithSize(&self, borderSize: NSSize); + #[method_id(printJobTitle)] + pub unsafe fn printJobTitle(&self) -> Id; + #[method(beginDocument)] + pub unsafe fn beginDocument(&self); + #[method(endDocument)] + pub unsafe fn endDocument(&self); + #[method(beginPageInRect:atPlacement:)] + pub unsafe fn beginPageInRect_atPlacement(&self, rect: NSRect, location: NSPoint); + #[method(endPage)] + pub unsafe fn endPage(&self); + } +); +extern_methods!( + #[doc = "NSDrag"] + unsafe impl NSView { + #[method_id(beginDraggingSessionWithItems:event:source:)] + pub unsafe fn beginDraggingSessionWithItems_event_source( + &self, + items: &NSArray, + event: &NSEvent, + source: &NSDraggingSource, + ) -> Id; + #[method_id(registeredDraggedTypes)] + pub unsafe fn registeredDraggedTypes(&self) -> Id, Shared>; + #[method(registerForDraggedTypes:)] + pub unsafe fn registerForDraggedTypes(&self, newTypes: &NSArray); + #[method(unregisterDraggedTypes)] + pub unsafe fn unregisterDraggedTypes(&self); + } +); +pub type NSViewFullScreenModeOptionKey = NSString; +extern_methods!( + #[doc = "NSFullScreenMode"] + unsafe impl NSView { + #[method(enterFullScreenMode:withOptions:)] + pub unsafe fn enterFullScreenMode_withOptions( + &self, + screen: &NSScreen, + options: Option<&NSDictionary>, + ) -> bool; + #[method(exitFullScreenModeWithOptions:)] + pub unsafe fn exitFullScreenModeWithOptions( + &self, + options: Option<&NSDictionary>, + ); + #[method(isInFullScreenMode)] + pub unsafe fn isInFullScreenMode(&self) -> bool; + } +); +pub type NSDefinitionOptionKey = NSString; +pub type NSDefinitionPresentationType = NSString; +extern_methods!( + #[doc = "NSDefinition"] + unsafe impl NSView { + #[method(showDefinitionForAttributedString:atPoint:)] + pub unsafe fn showDefinitionForAttributedString_atPoint( + &self, + attrString: Option<&NSAttributedString>, + textBaselineOrigin: NSPoint, + ); + #[method(showDefinitionForAttributedString:range:options:baselineOriginProvider:)] + pub unsafe fn showDefinitionForAttributedString_range_options_baselineOriginProvider( + &self, + attrString: Option<&NSAttributedString>, + targetRange: NSRange, + options: Option<&NSDictionary>, + originProvider: TodoBlock, + ); + } +); +extern_methods!( + #[doc = "NSFindIndicator"] + unsafe impl NSView { + #[method(isDrawingFindIndicator)] + pub unsafe fn isDrawingFindIndicator(&self) -> bool; + } +); +extern_methods!( + #[doc = "NSGestureRecognizer"] + unsafe impl NSView { + #[method_id(gestureRecognizers)] + pub unsafe fn gestureRecognizers(&self) -> Id, Shared>; + #[method(setGestureRecognizers:)] + pub unsafe fn setGestureRecognizers( + &self, + gestureRecognizers: &NSArray, + ); + #[method(addGestureRecognizer:)] + pub unsafe fn addGestureRecognizer(&self, gestureRecognizer: &NSGestureRecognizer); + #[method(removeGestureRecognizer:)] + pub unsafe fn removeGestureRecognizer(&self, gestureRecognizer: &NSGestureRecognizer); + } +); +extern_methods!( + #[doc = "NSTouchBar"] + unsafe impl NSView { + #[method(allowedTouchTypes)] + pub unsafe fn allowedTouchTypes(&self) -> NSTouchTypeMask; + #[method(setAllowedTouchTypes:)] + pub unsafe fn setAllowedTouchTypes(&self, allowedTouchTypes: NSTouchTypeMask); + } +); +extern_methods!( + #[doc = "NSSafeAreas"] + unsafe impl NSView { + #[method(safeAreaInsets)] + pub unsafe fn safeAreaInsets(&self) -> NSEdgeInsets; + #[method(additionalSafeAreaInsets)] + pub unsafe fn additionalSafeAreaInsets(&self) -> NSEdgeInsets; + #[method(setAdditionalSafeAreaInsets:)] + pub unsafe fn setAdditionalSafeAreaInsets(&self, additionalSafeAreaInsets: NSEdgeInsets); + #[method_id(safeAreaLayoutGuide)] + pub unsafe fn safeAreaLayoutGuide(&self) -> Id; + #[method(safeAreaRect)] + pub unsafe fn safeAreaRect(&self) -> NSRect; + #[method_id(layoutMarginsGuide)] + pub unsafe fn layoutMarginsGuide(&self) -> Id; + } +); +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSView { + #[method(dragImage:at:offset:event:pasteboard:source:slideBack:)] + pub unsafe fn dragImage_at_offset_event_pasteboard_source_slideBack( + &self, + image: &NSImage, + viewLocation: NSPoint, + initialOffset: NSSize, + event: &NSEvent, + pboard: &NSPasteboard, + sourceObj: &Object, + slideFlag: bool, + ); + #[method(dragFile:fromRect:slideBack:event:)] + pub unsafe fn dragFile_fromRect_slideBack_event( + &self, + filename: &NSString, + rect: NSRect, + flag: bool, + event: &NSEvent, + ) -> bool; + #[method(dragPromisedFilesOfTypes:fromRect:source:slideBack:event:)] + pub unsafe fn dragPromisedFilesOfTypes_fromRect_source_slideBack_event( + &self, + typeArray: &NSArray, + rect: NSRect, + sourceObject: &Object, + flag: bool, + event: &NSEvent, + ) -> bool; + #[method(convertPointToBase:)] + pub unsafe fn convertPointToBase(&self, point: NSPoint) -> NSPoint; + #[method(convertPointFromBase:)] + pub unsafe fn convertPointFromBase(&self, point: NSPoint) -> NSPoint; + #[method(convertSizeToBase:)] + pub unsafe fn convertSizeToBase(&self, size: NSSize) -> NSSize; + #[method(convertSizeFromBase:)] + pub unsafe fn convertSizeFromBase(&self, size: NSSize) -> NSSize; + #[method(convertRectToBase:)] + pub unsafe fn convertRectToBase(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromBase:)] + pub unsafe fn convertRectFromBase(&self, rect: NSRect) -> NSRect; + #[method(performMnemonic:)] + pub unsafe fn performMnemonic(&self, string: &NSString) -> bool; + #[method(shouldDrawColor)] + pub unsafe fn shouldDrawColor(&self) -> bool; + #[method(gState)] + pub unsafe fn gState(&self) -> NSInteger; + #[method(allocateGState)] + pub unsafe fn allocateGState(&self); + #[method(setUpGState)] + pub unsafe fn setUpGState(&self); + #[method(renewGState)] + pub unsafe fn renewGState(&self); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs new file mode 100644 index 000000000..6101b36c7 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -0,0 +1,195 @@ +use super::__exported::NSBundle; +use super::__exported::NSExtensionRequestHandling; +use super::__exported::NSPointerArray; +use super::__exported::NSView; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSKeyValueBinding::*; +use crate::AppKit::generated::NSNib::*; +use crate::AppKit::generated::NSNibDeclarations::*; +use crate::AppKit::generated::NSPopover::*; +use crate::AppKit::generated::NSResponder::*; +use crate::AppKit::generated::NSStoryboard::*; +use crate::AppKit::generated::NSStoryboardSegue::*; +use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSViewController; + unsafe impl ClassType for NSViewController { + type Super = NSResponder; + } +); +extern_methods!( + unsafe impl NSViewController { + #[method_id(initWithNibName:bundle:)] + pub unsafe fn initWithNibName_bundle( + &self, + nibNameOrNil: Option<&NSNibName>, + nibBundleOrNil: Option<&NSBundle>, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(nibName)] + pub unsafe fn nibName(&self) -> Option>; + #[method_id(nibBundle)] + pub unsafe fn nibBundle(&self) -> Option>; + #[method_id(representedObject)] + pub unsafe fn representedObject(&self) -> Option>; + #[method(setRepresentedObject:)] + pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>); + #[method_id(title)] + pub unsafe fn title(&self) -> Option>; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(view)] + pub unsafe fn view(&self) -> Id; + #[method(setView:)] + pub unsafe fn setView(&self, view: &NSView); + #[method(loadView)] + pub unsafe fn loadView(&self); + #[method(commitEditingWithDelegate:didCommitSelector:contextInfo:)] + pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( + &self, + delegate: Option<&Object>, + didCommitSelector: Option, + contextInfo: *mut c_void, + ); + #[method(commitEditing)] + pub unsafe fn commitEditing(&self) -> bool; + #[method(discardEditing)] + pub unsafe fn discardEditing(&self); + #[method(viewDidLoad)] + pub unsafe fn viewDidLoad(&self); + #[method(isViewLoaded)] + pub unsafe fn isViewLoaded(&self) -> bool; + #[method(viewWillAppear)] + pub unsafe fn viewWillAppear(&self); + #[method(viewDidAppear)] + pub unsafe fn viewDidAppear(&self); + #[method(viewWillDisappear)] + pub unsafe fn viewWillDisappear(&self); + #[method(viewDidDisappear)] + pub unsafe fn viewDidDisappear(&self); + #[method(preferredContentSize)] + pub unsafe fn preferredContentSize(&self) -> NSSize; + #[method(setPreferredContentSize:)] + pub unsafe fn setPreferredContentSize(&self, preferredContentSize: NSSize); + #[method(updateViewConstraints)] + pub unsafe fn updateViewConstraints(&self); + #[method(viewWillLayout)] + pub unsafe fn viewWillLayout(&self); + #[method(viewDidLayout)] + pub unsafe fn viewDidLayout(&self); + } +); +extern_methods!( + #[doc = "NSViewControllerPresentation"] + unsafe impl NSViewController { + #[method(presentViewController:animator:)] + pub unsafe fn presentViewController_animator( + &self, + viewController: &NSViewController, + animator: &NSViewControllerPresentationAnimator, + ); + #[method(dismissViewController:)] + pub unsafe fn dismissViewController(&self, viewController: &NSViewController); + #[method(dismissController:)] + pub unsafe fn dismissController(&self, sender: Option<&Object>); + #[method_id(presentedViewControllers)] + pub unsafe fn presentedViewControllers( + &self, + ) -> Option, Shared>>; + #[method_id(presentingViewController)] + pub unsafe fn presentingViewController(&self) -> Option>; + } +); +extern_methods!( + #[doc = "NSViewControllerPresentationAndTransitionStyles"] + unsafe impl NSViewController { + #[method(presentViewControllerAsSheet:)] + pub unsafe fn presentViewControllerAsSheet(&self, viewController: &NSViewController); + #[method(presentViewControllerAsModalWindow:)] + pub unsafe fn presentViewControllerAsModalWindow(&self, viewController: &NSViewController); + #[method(presentViewController:asPopoverRelativeToRect:ofView:preferredEdge:behavior:)] + pub unsafe fn presentViewController_asPopoverRelativeToRect_ofView_preferredEdge_behavior( + &self, + viewController: &NSViewController, + positioningRect: NSRect, + positioningView: &NSView, + preferredEdge: NSRectEdge, + behavior: NSPopoverBehavior, + ); + #[method(transitionFromViewController:toViewController:options:completionHandler:)] + pub unsafe fn transitionFromViewController_toViewController_options_completionHandler( + &self, + fromViewController: &NSViewController, + toViewController: &NSViewController, + options: NSViewControllerTransitionOptions, + completion: TodoBlock, + ); + } +); +extern_methods!( + #[doc = "NSViewControllerContainer"] + unsafe impl NSViewController { + #[method_id(parentViewController)] + pub unsafe fn parentViewController(&self) -> Option>; + #[method_id(childViewControllers)] + pub unsafe fn childViewControllers(&self) -> Id, Shared>; + #[method(setChildViewControllers:)] + pub unsafe fn setChildViewControllers( + &self, + childViewControllers: &NSArray, + ); + #[method(addChildViewController:)] + pub unsafe fn addChildViewController(&self, childViewController: &NSViewController); + #[method(removeFromParentViewController)] + pub unsafe fn removeFromParentViewController(&self); + #[method(insertChildViewController:atIndex:)] + pub unsafe fn insertChildViewController_atIndex( + &self, + childViewController: &NSViewController, + index: NSInteger, + ); + #[method(removeChildViewControllerAtIndex:)] + pub unsafe fn removeChildViewControllerAtIndex(&self, index: NSInteger); + #[method(preferredContentSizeDidChangeForViewController:)] + pub unsafe fn preferredContentSizeDidChangeForViewController( + &self, + viewController: &NSViewController, + ); + #[method(viewWillTransitionToSize:)] + pub unsafe fn viewWillTransitionToSize(&self, newSize: NSSize); + } +); +pub type NSViewControllerPresentationAnimator = NSObject; +extern_methods!( + #[doc = "NSViewControllerStoryboardingMethods"] + unsafe impl NSViewController { + #[method_id(storyboard)] + pub unsafe fn storyboard(&self) -> Option>; + } +); +extern_methods!( + #[doc = "NSExtensionAdditions"] + unsafe impl NSViewController { + #[method_id(extensionContext)] + pub unsafe fn extensionContext(&self) -> Option>; + #[method_id(sourceItemView)] + pub unsafe fn sourceItemView(&self) -> Option>; + #[method(setSourceItemView:)] + pub unsafe fn setSourceItemView(&self, sourceItemView: Option<&NSView>); + #[method(preferredScreenOrigin)] + pub unsafe fn preferredScreenOrigin(&self) -> NSPoint; + #[method(setPreferredScreenOrigin:)] + pub unsafe fn setPreferredScreenOrigin(&self, preferredScreenOrigin: NSPoint); + #[method(preferredMinimumSize)] + pub unsafe fn preferredMinimumSize(&self) -> NSSize; + #[method(preferredMaximumSize)] + pub unsafe fn preferredMaximumSize(&self) -> NSSize; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs new file mode 100644 index 000000000..0739239c5 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs @@ -0,0 +1,47 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSCell::*; +use crate::AppKit::generated::NSImage::*; +use crate::AppKit::generated::NSView::*; +use crate::AppKit::generated::NSWindow::*; +use crate::Foundation::generated::NSObjCRuntime::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSVisualEffectView; + unsafe impl ClassType for NSVisualEffectView { + type Super = NSView; + } +); +extern_methods!( + unsafe impl NSVisualEffectView { + #[method(material)] + pub unsafe fn material(&self) -> NSVisualEffectMaterial; + #[method(setMaterial:)] + pub unsafe fn setMaterial(&self, material: NSVisualEffectMaterial); + #[method(interiorBackgroundStyle)] + pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle; + #[method(blendingMode)] + pub unsafe fn blendingMode(&self) -> NSVisualEffectBlendingMode; + #[method(setBlendingMode:)] + pub unsafe fn setBlendingMode(&self, blendingMode: NSVisualEffectBlendingMode); + #[method(state)] + pub unsafe fn state(&self) -> NSVisualEffectState; + #[method(setState:)] + pub unsafe fn setState(&self, state: NSVisualEffectState); + #[method_id(maskImage)] + pub unsafe fn maskImage(&self) -> Option>; + #[method(setMaskImage:)] + pub unsafe fn setMaskImage(&self, maskImage: Option<&NSImage>); + #[method(isEmphasized)] + pub unsafe fn isEmphasized(&self) -> bool; + #[method(setEmphasized:)] + pub unsafe fn setEmphasized(&self, emphasized: bool); + #[method(viewDidMoveToWindow)] + pub unsafe fn viewDidMoveToWindow(&self); + #[method(viewWillMoveToWindow:)] + pub unsafe fn viewWillMoveToWindow(&self, newWindow: Option<&NSWindow>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs new file mode 100644 index 000000000..33e778d71 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -0,0 +1,864 @@ +use super::__exported::NSButton; +use super::__exported::NSButtonCell; +use super::__exported::NSColor; +use super::__exported::NSColorSpace; +use super::__exported::NSDate; +use super::__exported::NSDockTile; +use super::__exported::NSEvent; +use super::__exported::NSGraphicsContext; +use super::__exported::NSImage; +use super::__exported::NSMutableSet; +use super::__exported::NSNotification; +use super::__exported::NSScreen; +use super::__exported::NSSet; +use super::__exported::NSText; +use super::__exported::NSTitlebarAccessoryViewController; +use super::__exported::NSToolbar; +use super::__exported::NSView; +use super::__exported::NSViewController; +use super::__exported::NSWindowController; +use super::__exported::NSWindowTab; +use super::__exported::NSWindowTabGroup; +use super::__exported::NSURL; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSAnimation::*; +use crate::AppKit::generated::NSAppearance::*; +use crate::AppKit::generated::NSApplication::*; +use crate::AppKit::generated::NSGraphics::*; +use crate::AppKit::generated::NSMenu::*; +use crate::AppKit::generated::NSPasteboard::*; +use crate::AppKit::generated::NSResponder::*; +use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; +use crate::AppKit::generated::NSUserInterfaceValidation::*; +use crate::ApplicationServices::generated::ApplicationServices::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDate::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSGeometry::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSWindowLevel = NSInteger; +pub type NSWindowFrameAutosaveName = NSString; +pub type NSWindowPersistableFrameDescriptor = NSString; +pub type NSWindowTabbingIdentifier = NSString; +extern_class!( + #[derive(Debug)] + pub struct NSWindow; + unsafe impl ClassType for NSWindow { + type Super = NSResponder; + } +); +extern_methods!( + unsafe impl NSWindow { + #[method(frameRectForContentRect:styleMask:)] + pub unsafe fn frameRectForContentRect_styleMask( + cRect: NSRect, + style: NSWindowStyleMask, + ) -> NSRect; + #[method(contentRectForFrameRect:styleMask:)] + pub unsafe fn contentRectForFrameRect_styleMask( + fRect: NSRect, + style: NSWindowStyleMask, + ) -> NSRect; + #[method(minFrameWidthWithTitle:styleMask:)] + pub unsafe fn minFrameWidthWithTitle_styleMask( + title: &NSString, + style: NSWindowStyleMask, + ) -> CGFloat; + #[method(defaultDepthLimit)] + pub unsafe fn defaultDepthLimit() -> NSWindowDepth; + #[method(frameRectForContentRect:)] + pub unsafe fn frameRectForContentRect(&self, contentRect: NSRect) -> NSRect; + #[method(contentRectForFrameRect:)] + pub unsafe fn contentRectForFrameRect(&self, frameRect: NSRect) -> NSRect; + #[method_id(initWithContentRect:styleMask:backing:defer:)] + pub unsafe fn initWithContentRect_styleMask_backing_defer( + &self, + contentRect: NSRect, + style: NSWindowStyleMask, + backingStoreType: NSBackingStoreType, + flag: bool, + ) -> Id; + #[method_id(initWithContentRect:styleMask:backing:defer:screen:)] + pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( + &self, + contentRect: NSRect, + style: NSWindowStyleMask, + backingStoreType: NSBackingStoreType, + flag: bool, + screen: Option<&NSScreen>, + ) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(subtitle)] + pub unsafe fn subtitle(&self) -> Id; + #[method(setSubtitle:)] + pub unsafe fn setSubtitle(&self, subtitle: &NSString); + #[method(titleVisibility)] + pub unsafe fn titleVisibility(&self) -> NSWindowTitleVisibility; + #[method(setTitleVisibility:)] + pub unsafe fn setTitleVisibility(&self, titleVisibility: NSWindowTitleVisibility); + #[method(titlebarAppearsTransparent)] + pub unsafe fn titlebarAppearsTransparent(&self) -> bool; + #[method(setTitlebarAppearsTransparent:)] + pub unsafe fn setTitlebarAppearsTransparent(&self, titlebarAppearsTransparent: bool); + #[method(toolbarStyle)] + pub unsafe fn toolbarStyle(&self) -> NSWindowToolbarStyle; + #[method(setToolbarStyle:)] + pub unsafe fn setToolbarStyle(&self, toolbarStyle: NSWindowToolbarStyle); + #[method(contentLayoutRect)] + pub unsafe fn contentLayoutRect(&self) -> NSRect; + #[method_id(contentLayoutGuide)] + pub unsafe fn contentLayoutGuide(&self) -> Option>; + #[method_id(titlebarAccessoryViewControllers)] + pub unsafe fn titlebarAccessoryViewControllers( + &self, + ) -> Id, Shared>; + #[method(setTitlebarAccessoryViewControllers:)] + pub unsafe fn setTitlebarAccessoryViewControllers( + &self, + titlebarAccessoryViewControllers: &NSArray, + ); + #[method(addTitlebarAccessoryViewController:)] + pub unsafe fn addTitlebarAccessoryViewController( + &self, + childViewController: &NSTitlebarAccessoryViewController, + ); + #[method(insertTitlebarAccessoryViewController:atIndex:)] + pub unsafe fn insertTitlebarAccessoryViewController_atIndex( + &self, + childViewController: &NSTitlebarAccessoryViewController, + index: NSInteger, + ); + #[method(removeTitlebarAccessoryViewControllerAtIndex:)] + pub unsafe fn removeTitlebarAccessoryViewControllerAtIndex(&self, index: NSInteger); + #[method_id(representedURL)] + pub unsafe fn representedURL(&self) -> Option>; + #[method(setRepresentedURL:)] + pub unsafe fn setRepresentedURL(&self, representedURL: Option<&NSURL>); + #[method_id(representedFilename)] + pub unsafe fn representedFilename(&self) -> Id; + #[method(setRepresentedFilename:)] + pub unsafe fn setRepresentedFilename(&self, representedFilename: &NSString); + #[method(setTitleWithRepresentedFilename:)] + pub unsafe fn setTitleWithRepresentedFilename(&self, filename: &NSString); + #[method(isExcludedFromWindowsMenu)] + pub unsafe fn isExcludedFromWindowsMenu(&self) -> bool; + #[method(setExcludedFromWindowsMenu:)] + pub unsafe fn setExcludedFromWindowsMenu(&self, excludedFromWindowsMenu: bool); + #[method_id(contentView)] + pub unsafe fn contentView(&self) -> Option>; + #[method(setContentView:)] + pub unsafe fn setContentView(&self, contentView: Option<&NSView>); + #[method_id(delegate)] + pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSWindowDelegate>); + #[method(windowNumber)] + pub unsafe fn windowNumber(&self) -> NSInteger; + #[method(styleMask)] + pub unsafe fn styleMask(&self) -> NSWindowStyleMask; + #[method(setStyleMask:)] + pub unsafe fn setStyleMask(&self, styleMask: NSWindowStyleMask); + #[method_id(fieldEditor:forObject:)] + pub unsafe fn fieldEditor_forObject( + &self, + createFlag: bool, + object: Option<&Object>, + ) -> Option>; + #[method(endEditingFor:)] + pub unsafe fn endEditingFor(&self, object: Option<&Object>); + #[method(constrainFrameRect:toScreen:)] + pub unsafe fn constrainFrameRect_toScreen( + &self, + frameRect: NSRect, + screen: Option<&NSScreen>, + ) -> NSRect; + #[method(setFrame:display:)] + pub unsafe fn setFrame_display(&self, frameRect: NSRect, flag: bool); + #[method(setContentSize:)] + pub unsafe fn setContentSize(&self, size: NSSize); + #[method(setFrameOrigin:)] + pub unsafe fn setFrameOrigin(&self, point: NSPoint); + #[method(setFrameTopLeftPoint:)] + pub unsafe fn setFrameTopLeftPoint(&self, point: NSPoint); + #[method(cascadeTopLeftFromPoint:)] + pub unsafe fn cascadeTopLeftFromPoint(&self, topLeftPoint: NSPoint) -> NSPoint; + #[method(frame)] + pub unsafe fn frame(&self) -> NSRect; + #[method(animationResizeTime:)] + pub unsafe fn animationResizeTime(&self, newFrame: NSRect) -> NSTimeInterval; + #[method(setFrame:display:animate:)] + pub unsafe fn setFrame_display_animate( + &self, + frameRect: NSRect, + displayFlag: bool, + animateFlag: bool, + ); + #[method(inLiveResize)] + pub unsafe fn inLiveResize(&self) -> bool; + #[method(resizeIncrements)] + pub unsafe fn resizeIncrements(&self) -> NSSize; + #[method(setResizeIncrements:)] + pub unsafe fn setResizeIncrements(&self, resizeIncrements: NSSize); + #[method(aspectRatio)] + pub unsafe fn aspectRatio(&self) -> NSSize; + #[method(setAspectRatio:)] + pub unsafe fn setAspectRatio(&self, aspectRatio: NSSize); + #[method(contentResizeIncrements)] + pub unsafe fn contentResizeIncrements(&self) -> NSSize; + #[method(setContentResizeIncrements:)] + pub unsafe fn setContentResizeIncrements(&self, contentResizeIncrements: NSSize); + #[method(contentAspectRatio)] + pub unsafe fn contentAspectRatio(&self) -> NSSize; + #[method(setContentAspectRatio:)] + pub unsafe fn setContentAspectRatio(&self, contentAspectRatio: NSSize); + #[method(viewsNeedDisplay)] + pub unsafe fn viewsNeedDisplay(&self) -> bool; + #[method(setViewsNeedDisplay:)] + pub unsafe fn setViewsNeedDisplay(&self, viewsNeedDisplay: bool); + #[method(displayIfNeeded)] + pub unsafe fn displayIfNeeded(&self); + #[method(display)] + pub unsafe fn display(&self); + #[method(preservesContentDuringLiveResize)] + pub unsafe fn preservesContentDuringLiveResize(&self) -> bool; + #[method(setPreservesContentDuringLiveResize:)] + pub unsafe fn setPreservesContentDuringLiveResize( + &self, + preservesContentDuringLiveResize: bool, + ); + #[method(update)] + pub unsafe fn update(&self); + #[method(makeFirstResponder:)] + pub unsafe fn makeFirstResponder(&self, responder: Option<&NSResponder>) -> bool; + #[method_id(firstResponder)] + pub unsafe fn firstResponder(&self) -> Option>; + #[method(resizeFlags)] + pub unsafe fn resizeFlags(&self) -> NSEventModifierFlags; + #[method(close)] + pub unsafe fn close(&self); + #[method(isReleasedWhenClosed)] + pub unsafe fn isReleasedWhenClosed(&self) -> bool; + #[method(setReleasedWhenClosed:)] + pub unsafe fn setReleasedWhenClosed(&self, releasedWhenClosed: bool); + #[method(miniaturize:)] + pub unsafe fn miniaturize(&self, sender: Option<&Object>); + #[method(deminiaturize:)] + pub unsafe fn deminiaturize(&self, sender: Option<&Object>); + #[method(isZoomed)] + pub unsafe fn isZoomed(&self) -> bool; + #[method(zoom:)] + pub unsafe fn zoom(&self, sender: Option<&Object>); + #[method(isMiniaturized)] + pub unsafe fn isMiniaturized(&self) -> bool; + #[method(tryToPerform:with:)] + pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; + #[method_id(validRequestorForSendType:returnType:)] + pub unsafe fn validRequestorForSendType_returnType( + &self, + sendType: Option<&NSPasteboardType>, + returnType: Option<&NSPasteboardType>, + ) -> Option>; + #[method_id(backgroundColor)] + pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] + pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(setContentBorderThickness:forEdge:)] + pub unsafe fn setContentBorderThickness_forEdge( + &self, + thickness: CGFloat, + edge: NSRectEdge, + ); + #[method(contentBorderThicknessForEdge:)] + pub unsafe fn contentBorderThicknessForEdge(&self, edge: NSRectEdge) -> CGFloat; + #[method(setAutorecalculatesContentBorderThickness:forEdge:)] + pub unsafe fn setAutorecalculatesContentBorderThickness_forEdge( + &self, + flag: bool, + edge: NSRectEdge, + ); + #[method(autorecalculatesContentBorderThicknessForEdge:)] + pub unsafe fn autorecalculatesContentBorderThicknessForEdge( + &self, + edge: NSRectEdge, + ) -> bool; + #[method(isMovable)] + pub unsafe fn isMovable(&self) -> bool; + #[method(setMovable:)] + pub unsafe fn setMovable(&self, movable: bool); + #[method(isMovableByWindowBackground)] + pub unsafe fn isMovableByWindowBackground(&self) -> bool; + #[method(setMovableByWindowBackground:)] + pub unsafe fn setMovableByWindowBackground(&self, movableByWindowBackground: bool); + #[method(hidesOnDeactivate)] + pub unsafe fn hidesOnDeactivate(&self) -> bool; + #[method(setHidesOnDeactivate:)] + pub unsafe fn setHidesOnDeactivate(&self, hidesOnDeactivate: bool); + #[method(canHide)] + pub unsafe fn canHide(&self) -> bool; + #[method(setCanHide:)] + pub unsafe fn setCanHide(&self, canHide: bool); + #[method(center)] + pub unsafe fn center(&self); + #[method(makeKeyAndOrderFront:)] + pub unsafe fn makeKeyAndOrderFront(&self, sender: Option<&Object>); + #[method(orderFront:)] + pub unsafe fn orderFront(&self, sender: Option<&Object>); + #[method(orderBack:)] + pub unsafe fn orderBack(&self, sender: Option<&Object>); + #[method(orderOut:)] + pub unsafe fn orderOut(&self, sender: Option<&Object>); + #[method(orderWindow:relativeTo:)] + pub unsafe fn orderWindow_relativeTo( + &self, + place: NSWindowOrderingMode, + otherWin: NSInteger, + ); + #[method(orderFrontRegardless)] + pub unsafe fn orderFrontRegardless(&self); + #[method_id(miniwindowImage)] + pub unsafe fn miniwindowImage(&self) -> Option>; + #[method(setMiniwindowImage:)] + pub unsafe fn setMiniwindowImage(&self, miniwindowImage: Option<&NSImage>); + #[method_id(miniwindowTitle)] + pub unsafe fn miniwindowTitle(&self) -> Id; + #[method(setMiniwindowTitle:)] + pub unsafe fn setMiniwindowTitle(&self, miniwindowTitle: Option<&NSString>); + #[method_id(dockTile)] + pub unsafe fn dockTile(&self) -> Id; + #[method(isDocumentEdited)] + pub unsafe fn isDocumentEdited(&self) -> bool; + #[method(setDocumentEdited:)] + pub unsafe fn setDocumentEdited(&self, documentEdited: bool); + #[method(isVisible)] + pub unsafe fn isVisible(&self) -> bool; + #[method(isKeyWindow)] + pub unsafe fn isKeyWindow(&self) -> bool; + #[method(isMainWindow)] + pub unsafe fn isMainWindow(&self) -> bool; + #[method(canBecomeKeyWindow)] + pub unsafe fn canBecomeKeyWindow(&self) -> bool; + #[method(canBecomeMainWindow)] + pub unsafe fn canBecomeMainWindow(&self) -> bool; + #[method(makeKeyWindow)] + pub unsafe fn makeKeyWindow(&self); + #[method(makeMainWindow)] + pub unsafe fn makeMainWindow(&self); + #[method(becomeKeyWindow)] + pub unsafe fn becomeKeyWindow(&self); + #[method(resignKeyWindow)] + pub unsafe fn resignKeyWindow(&self); + #[method(becomeMainWindow)] + pub unsafe fn becomeMainWindow(&self); + #[method(resignMainWindow)] + pub unsafe fn resignMainWindow(&self); + #[method(worksWhenModal)] + pub unsafe fn worksWhenModal(&self) -> bool; + #[method(preventsApplicationTerminationWhenModal)] + pub unsafe fn preventsApplicationTerminationWhenModal(&self) -> bool; + #[method(setPreventsApplicationTerminationWhenModal:)] + pub unsafe fn setPreventsApplicationTerminationWhenModal( + &self, + preventsApplicationTerminationWhenModal: bool, + ); + #[method(convertRectToScreen:)] + pub unsafe fn convertRectToScreen(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromScreen:)] + pub unsafe fn convertRectFromScreen(&self, rect: NSRect) -> NSRect; + #[method(convertPointToScreen:)] + pub unsafe fn convertPointToScreen(&self, point: NSPoint) -> NSPoint; + #[method(convertPointFromScreen:)] + pub unsafe fn convertPointFromScreen(&self, point: NSPoint) -> NSPoint; + #[method(convertRectToBacking:)] + pub unsafe fn convertRectToBacking(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromBacking:)] + pub unsafe fn convertRectFromBacking(&self, rect: NSRect) -> NSRect; + #[method(convertPointToBacking:)] + pub unsafe fn convertPointToBacking(&self, point: NSPoint) -> NSPoint; + #[method(convertPointFromBacking:)] + pub unsafe fn convertPointFromBacking(&self, point: NSPoint) -> NSPoint; + #[method(backingAlignedRect:options:)] + pub unsafe fn backingAlignedRect_options( + &self, + rect: NSRect, + options: NSAlignmentOptions, + ) -> NSRect; + #[method(backingScaleFactor)] + pub unsafe fn backingScaleFactor(&self) -> CGFloat; + #[method(performClose:)] + pub unsafe fn performClose(&self, sender: Option<&Object>); + #[method(performMiniaturize:)] + pub unsafe fn performMiniaturize(&self, sender: Option<&Object>); + #[method(performZoom:)] + pub unsafe fn performZoom(&self, sender: Option<&Object>); + #[method_id(dataWithEPSInsideRect:)] + pub unsafe fn dataWithEPSInsideRect(&self, rect: NSRect) -> Id; + #[method_id(dataWithPDFInsideRect:)] + pub unsafe fn dataWithPDFInsideRect(&self, rect: NSRect) -> Id; + #[method(print:)] + pub unsafe fn print(&self, sender: Option<&Object>); + #[method(allowsToolTipsWhenApplicationIsInactive)] + pub unsafe fn allowsToolTipsWhenApplicationIsInactive(&self) -> bool; + #[method(setAllowsToolTipsWhenApplicationIsInactive:)] + pub unsafe fn setAllowsToolTipsWhenApplicationIsInactive( + &self, + allowsToolTipsWhenApplicationIsInactive: bool, + ); + #[method(backingType)] + pub unsafe fn backingType(&self) -> NSBackingStoreType; + #[method(setBackingType:)] + pub unsafe fn setBackingType(&self, backingType: NSBackingStoreType); + #[method(level)] + pub unsafe fn level(&self) -> NSWindowLevel; + #[method(setLevel:)] + pub unsafe fn setLevel(&self, level: NSWindowLevel); + #[method(depthLimit)] + pub unsafe fn depthLimit(&self) -> NSWindowDepth; + #[method(setDepthLimit:)] + pub unsafe fn setDepthLimit(&self, depthLimit: NSWindowDepth); + #[method(setDynamicDepthLimit:)] + pub unsafe fn setDynamicDepthLimit(&self, flag: bool); + #[method(hasDynamicDepthLimit)] + pub unsafe fn hasDynamicDepthLimit(&self) -> bool; + #[method_id(screen)] + pub unsafe fn screen(&self) -> Option>; + #[method_id(deepestScreen)] + pub unsafe fn deepestScreen(&self) -> Option>; + #[method(hasShadow)] + pub unsafe fn hasShadow(&self) -> bool; + #[method(setHasShadow:)] + pub unsafe fn setHasShadow(&self, hasShadow: bool); + #[method(invalidateShadow)] + pub unsafe fn invalidateShadow(&self); + #[method(alphaValue)] + pub unsafe fn alphaValue(&self) -> CGFloat; + #[method(setAlphaValue:)] + pub unsafe fn setAlphaValue(&self, alphaValue: CGFloat); + #[method(isOpaque)] + pub unsafe fn isOpaque(&self) -> bool; + #[method(setOpaque:)] + pub unsafe fn setOpaque(&self, opaque: bool); + #[method(sharingType)] + pub unsafe fn sharingType(&self) -> NSWindowSharingType; + #[method(setSharingType:)] + pub unsafe fn setSharingType(&self, sharingType: NSWindowSharingType); + #[method(allowsConcurrentViewDrawing)] + pub unsafe fn allowsConcurrentViewDrawing(&self) -> bool; + #[method(setAllowsConcurrentViewDrawing:)] + pub unsafe fn setAllowsConcurrentViewDrawing(&self, allowsConcurrentViewDrawing: bool); + #[method(displaysWhenScreenProfileChanges)] + pub unsafe fn displaysWhenScreenProfileChanges(&self) -> bool; + #[method(setDisplaysWhenScreenProfileChanges:)] + pub unsafe fn setDisplaysWhenScreenProfileChanges( + &self, + displaysWhenScreenProfileChanges: bool, + ); + #[method(disableScreenUpdatesUntilFlush)] + pub unsafe fn disableScreenUpdatesUntilFlush(&self); + #[method(canBecomeVisibleWithoutLogin)] + pub unsafe fn canBecomeVisibleWithoutLogin(&self) -> bool; + #[method(setCanBecomeVisibleWithoutLogin:)] + pub unsafe fn setCanBecomeVisibleWithoutLogin(&self, canBecomeVisibleWithoutLogin: bool); + #[method(collectionBehavior)] + pub unsafe fn collectionBehavior(&self) -> NSWindowCollectionBehavior; + #[method(setCollectionBehavior:)] + pub unsafe fn setCollectionBehavior(&self, collectionBehavior: NSWindowCollectionBehavior); + #[method(animationBehavior)] + pub unsafe fn animationBehavior(&self) -> NSWindowAnimationBehavior; + #[method(setAnimationBehavior:)] + pub unsafe fn setAnimationBehavior(&self, animationBehavior: NSWindowAnimationBehavior); + #[method(isOnActiveSpace)] + pub unsafe fn isOnActiveSpace(&self) -> bool; + #[method(toggleFullScreen:)] + pub unsafe fn toggleFullScreen(&self, sender: Option<&Object>); + #[method_id(stringWithSavedFrame)] + pub unsafe fn stringWithSavedFrame(&self) + -> Id; + #[method(setFrameFromString:)] + pub unsafe fn setFrameFromString(&self, string: &NSWindowPersistableFrameDescriptor); + #[method(saveFrameUsingName:)] + pub unsafe fn saveFrameUsingName(&self, name: &NSWindowFrameAutosaveName); + #[method(setFrameUsingName:force:)] + pub unsafe fn setFrameUsingName_force( + &self, + name: &NSWindowFrameAutosaveName, + force: bool, + ) -> bool; + #[method(setFrameUsingName:)] + pub unsafe fn setFrameUsingName(&self, name: &NSWindowFrameAutosaveName) -> bool; + #[method(setFrameAutosaveName:)] + pub unsafe fn setFrameAutosaveName(&self, name: &NSWindowFrameAutosaveName) -> bool; + #[method_id(frameAutosaveName)] + pub unsafe fn frameAutosaveName(&self) -> Id; + #[method(removeFrameUsingName:)] + pub unsafe fn removeFrameUsingName(name: &NSWindowFrameAutosaveName); + #[method(minSize)] + pub unsafe fn minSize(&self) -> NSSize; + #[method(setMinSize:)] + pub unsafe fn setMinSize(&self, minSize: NSSize); + #[method(maxSize)] + pub unsafe fn maxSize(&self) -> NSSize; + #[method(setMaxSize:)] + pub unsafe fn setMaxSize(&self, maxSize: NSSize); + #[method(contentMinSize)] + pub unsafe fn contentMinSize(&self) -> NSSize; + #[method(setContentMinSize:)] + pub unsafe fn setContentMinSize(&self, contentMinSize: NSSize); + #[method(contentMaxSize)] + pub unsafe fn contentMaxSize(&self) -> NSSize; + #[method(setContentMaxSize:)] + pub unsafe fn setContentMaxSize(&self, contentMaxSize: NSSize); + #[method(minFullScreenContentSize)] + pub unsafe fn minFullScreenContentSize(&self) -> NSSize; + #[method(setMinFullScreenContentSize:)] + pub unsafe fn setMinFullScreenContentSize(&self, minFullScreenContentSize: NSSize); + #[method(maxFullScreenContentSize)] + pub unsafe fn maxFullScreenContentSize(&self) -> NSSize; + #[method(setMaxFullScreenContentSize:)] + pub unsafe fn setMaxFullScreenContentSize(&self, maxFullScreenContentSize: NSSize); + #[method_id(deviceDescription)] + pub unsafe fn deviceDescription( + &self, + ) -> Id, Shared>; + #[method_id(windowController)] + pub unsafe fn windowController(&self) -> Option>; + #[method(setWindowController:)] + pub unsafe fn setWindowController(&self, windowController: Option<&NSWindowController>); + #[method(beginSheet:completionHandler:)] + pub unsafe fn beginSheet_completionHandler( + &self, + sheetWindow: &NSWindow, + handler: TodoBlock, + ); + #[method(beginCriticalSheet:completionHandler:)] + pub unsafe fn beginCriticalSheet_completionHandler( + &self, + sheetWindow: &NSWindow, + handler: TodoBlock, + ); + #[method(endSheet:)] + pub unsafe fn endSheet(&self, sheetWindow: &NSWindow); + #[method(endSheet:returnCode:)] + pub unsafe fn endSheet_returnCode( + &self, + sheetWindow: &NSWindow, + returnCode: NSModalResponse, + ); + #[method_id(sheets)] + pub unsafe fn sheets(&self) -> Id, Shared>; + #[method_id(attachedSheet)] + pub unsafe fn attachedSheet(&self) -> Option>; + #[method(isSheet)] + pub unsafe fn isSheet(&self) -> bool; + #[method_id(sheetParent)] + pub unsafe fn sheetParent(&self) -> Option>; + #[method_id(standardWindowButton:forStyleMask:)] + pub unsafe fn standardWindowButton_forStyleMask( + b: NSWindowButton, + styleMask: NSWindowStyleMask, + ) -> Option>; + #[method_id(standardWindowButton:)] + pub unsafe fn standardWindowButton( + &self, + b: NSWindowButton, + ) -> Option>; + #[method(addChildWindow:ordered:)] + pub unsafe fn addChildWindow_ordered( + &self, + childWin: &NSWindow, + place: NSWindowOrderingMode, + ); + #[method(removeChildWindow:)] + pub unsafe fn removeChildWindow(&self, childWin: &NSWindow); + #[method_id(childWindows)] + pub unsafe fn childWindows(&self) -> Option, Shared>>; + #[method_id(parentWindow)] + pub unsafe fn parentWindow(&self) -> Option>; + #[method(setParentWindow:)] + pub unsafe fn setParentWindow(&self, parentWindow: Option<&NSWindow>); + #[method_id(appearanceSource)] + pub unsafe fn appearanceSource(&self) -> Option>; + #[method(setAppearanceSource:)] + pub unsafe fn setAppearanceSource(&self, appearanceSource: Option<&TodoProtocols>); + #[method_id(colorSpace)] + pub unsafe fn colorSpace(&self) -> Option>; + #[method(setColorSpace:)] + pub unsafe fn setColorSpace(&self, colorSpace: Option<&NSColorSpace>); + #[method(canRepresentDisplayGamut:)] + pub unsafe fn canRepresentDisplayGamut(&self, displayGamut: NSDisplayGamut) -> bool; + #[method_id(windowNumbersWithOptions:)] + pub unsafe fn windowNumbersWithOptions( + options: NSWindowNumberListOptions, + ) -> Option, Shared>>; + #[method(windowNumberAtPoint:belowWindowWithWindowNumber:)] + pub unsafe fn windowNumberAtPoint_belowWindowWithWindowNumber( + point: NSPoint, + windowNumber: NSInteger, + ) -> NSInteger; + #[method(occlusionState)] + pub unsafe fn occlusionState(&self) -> NSWindowOcclusionState; + #[method(titlebarSeparatorStyle)] + pub unsafe fn titlebarSeparatorStyle(&self) -> NSTitlebarSeparatorStyle; + #[method(setTitlebarSeparatorStyle:)] + pub unsafe fn setTitlebarSeparatorStyle( + &self, + titlebarSeparatorStyle: NSTitlebarSeparatorStyle, + ); + #[method_id(contentViewController)] + pub unsafe fn contentViewController(&self) -> Option>; + #[method(setContentViewController:)] + pub unsafe fn setContentViewController( + &self, + contentViewController: Option<&NSViewController>, + ); + #[method_id(windowWithContentViewController:)] + pub unsafe fn windowWithContentViewController( + contentViewController: &NSViewController, + ) -> Id; + #[method(performWindowDragWithEvent:)] + pub unsafe fn performWindowDragWithEvent(&self, event: &NSEvent); + #[method_id(initialFirstResponder)] + pub unsafe fn initialFirstResponder(&self) -> Option>; + #[method(setInitialFirstResponder:)] + pub unsafe fn setInitialFirstResponder(&self, initialFirstResponder: Option<&NSView>); + #[method(selectNextKeyView:)] + pub unsafe fn selectNextKeyView(&self, sender: Option<&Object>); + #[method(selectPreviousKeyView:)] + pub unsafe fn selectPreviousKeyView(&self, sender: Option<&Object>); + #[method(selectKeyViewFollowingView:)] + pub unsafe fn selectKeyViewFollowingView(&self, view: &NSView); + #[method(selectKeyViewPrecedingView:)] + pub unsafe fn selectKeyViewPrecedingView(&self, view: &NSView); + #[method(keyViewSelectionDirection)] + pub unsafe fn keyViewSelectionDirection(&self) -> NSSelectionDirection; + #[method_id(defaultButtonCell)] + pub unsafe fn defaultButtonCell(&self) -> Option>; + #[method(setDefaultButtonCell:)] + pub unsafe fn setDefaultButtonCell(&self, defaultButtonCell: Option<&NSButtonCell>); + #[method(disableKeyEquivalentForDefaultButtonCell)] + pub unsafe fn disableKeyEquivalentForDefaultButtonCell(&self); + #[method(enableKeyEquivalentForDefaultButtonCell)] + pub unsafe fn enableKeyEquivalentForDefaultButtonCell(&self); + #[method(autorecalculatesKeyViewLoop)] + pub unsafe fn autorecalculatesKeyViewLoop(&self) -> bool; + #[method(setAutorecalculatesKeyViewLoop:)] + pub unsafe fn setAutorecalculatesKeyViewLoop(&self, autorecalculatesKeyViewLoop: bool); + #[method(recalculateKeyViewLoop)] + pub unsafe fn recalculateKeyViewLoop(&self); + #[method_id(toolbar)] + pub unsafe fn toolbar(&self) -> Option>; + #[method(setToolbar:)] + pub unsafe fn setToolbar(&self, toolbar: Option<&NSToolbar>); + #[method(toggleToolbarShown:)] + pub unsafe fn toggleToolbarShown(&self, sender: Option<&Object>); + #[method(runToolbarCustomizationPalette:)] + pub unsafe fn runToolbarCustomizationPalette(&self, sender: Option<&Object>); + #[method(showsToolbarButton)] + pub unsafe fn showsToolbarButton(&self) -> bool; + #[method(setShowsToolbarButton:)] + pub unsafe fn setShowsToolbarButton(&self, showsToolbarButton: bool); + #[method(allowsAutomaticWindowTabbing)] + pub unsafe fn allowsAutomaticWindowTabbing() -> bool; + #[method(setAllowsAutomaticWindowTabbing:)] + pub unsafe fn setAllowsAutomaticWindowTabbing(allowsAutomaticWindowTabbing: bool); + #[method(userTabbingPreference)] + pub unsafe fn userTabbingPreference() -> NSWindowUserTabbingPreference; + #[method(tabbingMode)] + pub unsafe fn tabbingMode(&self) -> NSWindowTabbingMode; + #[method(setTabbingMode:)] + pub unsafe fn setTabbingMode(&self, tabbingMode: NSWindowTabbingMode); + #[method_id(tabbingIdentifier)] + pub unsafe fn tabbingIdentifier(&self) -> Id; + #[method(setTabbingIdentifier:)] + pub unsafe fn setTabbingIdentifier(&self, tabbingIdentifier: &NSWindowTabbingIdentifier); + #[method(selectNextTab:)] + pub unsafe fn selectNextTab(&self, sender: Option<&Object>); + #[method(selectPreviousTab:)] + pub unsafe fn selectPreviousTab(&self, sender: Option<&Object>); + #[method(moveTabToNewWindow:)] + pub unsafe fn moveTabToNewWindow(&self, sender: Option<&Object>); + #[method(mergeAllWindows:)] + pub unsafe fn mergeAllWindows(&self, sender: Option<&Object>); + #[method(toggleTabBar:)] + pub unsafe fn toggleTabBar(&self, sender: Option<&Object>); + #[method(toggleTabOverview:)] + pub unsafe fn toggleTabOverview(&self, sender: Option<&Object>); + #[method_id(tabbedWindows)] + pub unsafe fn tabbedWindows(&self) -> Option, Shared>>; + #[method(addTabbedWindow:ordered:)] + pub unsafe fn addTabbedWindow_ordered( + &self, + window: &NSWindow, + ordered: NSWindowOrderingMode, + ); + #[method_id(tab)] + pub unsafe fn tab(&self) -> Id; + #[method_id(tabGroup)] + pub unsafe fn tabGroup(&self) -> Option>; + #[method(windowTitlebarLayoutDirection)] + pub unsafe fn windowTitlebarLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + } +); +extern_methods!( + #[doc = "NSEvent"] + unsafe impl NSWindow { + #[method(trackEventsMatchingMask:timeout:mode:handler:)] + pub unsafe fn trackEventsMatchingMask_timeout_mode_handler( + &self, + mask: NSEventMask, + timeout: NSTimeInterval, + mode: &NSRunLoopMode, + trackingHandler: TodoBlock, + ); + #[method_id(nextEventMatchingMask:)] + pub unsafe fn nextEventMatchingMask( + &self, + mask: NSEventMask, + ) -> Option>; + #[method_id(nextEventMatchingMask:untilDate:inMode:dequeue:)] + pub unsafe fn nextEventMatchingMask_untilDate_inMode_dequeue( + &self, + mask: NSEventMask, + expiration: Option<&NSDate>, + mode: &NSRunLoopMode, + deqFlag: bool, + ) -> Option>; + #[method(discardEventsMatchingMask:beforeEvent:)] + pub unsafe fn discardEventsMatchingMask_beforeEvent( + &self, + mask: NSEventMask, + lastEvent: Option<&NSEvent>, + ); + #[method(postEvent:atStart:)] + pub unsafe fn postEvent_atStart(&self, event: &NSEvent, flag: bool); + #[method(sendEvent:)] + pub unsafe fn sendEvent(&self, event: &NSEvent); + #[method_id(currentEvent)] + pub unsafe fn currentEvent(&self) -> Option>; + #[method(acceptsMouseMovedEvents)] + pub unsafe fn acceptsMouseMovedEvents(&self) -> bool; + #[method(setAcceptsMouseMovedEvents:)] + pub unsafe fn setAcceptsMouseMovedEvents(&self, acceptsMouseMovedEvents: bool); + #[method(ignoresMouseEvents)] + pub unsafe fn ignoresMouseEvents(&self) -> bool; + #[method(setIgnoresMouseEvents:)] + pub unsafe fn setIgnoresMouseEvents(&self, ignoresMouseEvents: bool); + #[method(mouseLocationOutsideOfEventStream)] + pub unsafe fn mouseLocationOutsideOfEventStream(&self) -> NSPoint; + } +); +extern_methods!( + #[doc = "NSCursorRect"] + unsafe impl NSWindow { + #[method(disableCursorRects)] + pub unsafe fn disableCursorRects(&self); + #[method(enableCursorRects)] + pub unsafe fn enableCursorRects(&self); + #[method(discardCursorRects)] + pub unsafe fn discardCursorRects(&self); + #[method(areCursorRectsEnabled)] + pub unsafe fn areCursorRectsEnabled(&self) -> bool; + #[method(invalidateCursorRectsForView:)] + pub unsafe fn invalidateCursorRectsForView(&self, view: &NSView); + #[method(resetCursorRects)] + pub unsafe fn resetCursorRects(&self); + } +); +extern_methods!( + #[doc = "NSDrag"] + unsafe impl NSWindow { + #[method(dragImage:at:offset:event:pasteboard:source:slideBack:)] + pub unsafe fn dragImage_at_offset_event_pasteboard_source_slideBack( + &self, + image: &NSImage, + baseLocation: NSPoint, + initialOffset: NSSize, + event: &NSEvent, + pboard: &NSPasteboard, + sourceObj: &Object, + slideFlag: bool, + ); + #[method(registerForDraggedTypes:)] + pub unsafe fn registerForDraggedTypes(&self, newTypes: &NSArray); + #[method(unregisterDraggedTypes)] + pub unsafe fn unregisterDraggedTypes(&self); + } +); +extern_methods!( + #[doc = "NSCarbonExtensions"] + unsafe impl NSWindow { + #[method_id(initWithWindowRef:)] + pub unsafe fn initWithWindowRef( + &self, + windowRef: NonNull, + ) -> Option>; + #[method(windowRef)] + pub unsafe fn windowRef(&self) -> NonNull; + } +); +pub type NSWindowDelegate = NSObject; +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSWindow { + #[method(cacheImageInRect:)] + pub unsafe fn cacheImageInRect(&self, rect: NSRect); + #[method(restoreCachedImage)] + pub unsafe fn restoreCachedImage(&self); + #[method(discardCachedImage)] + pub unsafe fn discardCachedImage(&self); + #[method(menuChanged:)] + pub unsafe fn menuChanged(menu: &NSMenu); + #[method(gState)] + pub unsafe fn gState(&self) -> NSInteger; + #[method(convertBaseToScreen:)] + pub unsafe fn convertBaseToScreen(&self, point: NSPoint) -> NSPoint; + #[method(convertScreenToBase:)] + pub unsafe fn convertScreenToBase(&self, point: NSPoint) -> NSPoint; + #[method(userSpaceScaleFactor)] + pub unsafe fn userSpaceScaleFactor(&self) -> CGFloat; + #[method(useOptimizedDrawing:)] + pub unsafe fn useOptimizedDrawing(&self, flag: bool); + #[method(canStoreColor)] + pub unsafe fn canStoreColor(&self) -> bool; + #[method(disableFlushWindow)] + pub unsafe fn disableFlushWindow(&self); + #[method(enableFlushWindow)] + pub unsafe fn enableFlushWindow(&self); + #[method(isFlushWindowDisabled)] + pub unsafe fn isFlushWindowDisabled(&self) -> bool; + #[method(flushWindow)] + pub unsafe fn flushWindow(&self); + #[method(flushWindowIfNeeded)] + pub unsafe fn flushWindowIfNeeded(&self); + #[method(isAutodisplay)] + pub unsafe fn isAutodisplay(&self) -> bool; + #[method(setAutodisplay:)] + pub unsafe fn setAutodisplay(&self, autodisplay: bool); + #[method_id(graphicsContext)] + pub unsafe fn graphicsContext(&self) -> Option>; + #[method(isOneShot)] + pub unsafe fn isOneShot(&self) -> bool; + #[method(setOneShot:)] + pub unsafe fn setOneShot(&self, oneShot: bool); + #[method(preferredBackingLocation)] + pub unsafe fn preferredBackingLocation(&self) -> NSWindowBackingLocation; + #[method(setPreferredBackingLocation:)] + pub unsafe fn setPreferredBackingLocation( + &self, + preferredBackingLocation: NSWindowBackingLocation, + ); + #[method(backingLocation)] + pub unsafe fn backingLocation(&self) -> NSWindowBackingLocation; + #[method(showsResizeIndicator)] + pub unsafe fn showsResizeIndicator(&self) -> bool; + #[method(setShowsResizeIndicator:)] + pub unsafe fn setShowsResizeIndicator(&self, showsResizeIndicator: bool); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSWindowController.rs b/crates/icrate/src/generated/AppKit/NSWindowController.rs new file mode 100644 index 000000000..3d666a649 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSWindowController.rs @@ -0,0 +1,115 @@ +use super::__exported::NSArray; +use super::__exported::NSDocument; +use super::__exported::NSStoryboard; +use super::__exported::NSViewController; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSNib::*; +use crate::AppKit::generated::NSNibDeclarations::*; +use crate::AppKit::generated::NSResponder::*; +use crate::AppKit::generated::NSStoryboardSegue::*; +use crate::AppKit::generated::NSWindow::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSWindowController; + unsafe impl ClassType for NSWindowController { + type Super = NSResponder; + } +); +extern_methods!( + unsafe impl NSWindowController { + #[method_id(initWithWindow:)] + pub unsafe fn initWithWindow(&self, window: Option<&NSWindow>) -> Id; + #[method_id(initWithCoder:)] + pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(initWithWindowNibName:)] + pub unsafe fn initWithWindowNibName(&self, windowNibName: &NSNibName) -> Id; + #[method_id(initWithWindowNibName:owner:)] + pub unsafe fn initWithWindowNibName_owner( + &self, + windowNibName: &NSNibName, + owner: &Object, + ) -> Id; + #[method_id(initWithWindowNibPath:owner:)] + pub unsafe fn initWithWindowNibPath_owner( + &self, + windowNibPath: &NSString, + owner: &Object, + ) -> Id; + #[method_id(windowNibName)] + pub unsafe fn windowNibName(&self) -> Option>; + #[method_id(windowNibPath)] + pub unsafe fn windowNibPath(&self) -> Option>; + #[method_id(owner)] + pub unsafe fn owner(&self) -> Option>; + #[method_id(windowFrameAutosaveName)] + pub unsafe fn windowFrameAutosaveName(&self) -> Id; + #[method(setWindowFrameAutosaveName:)] + pub unsafe fn setWindowFrameAutosaveName( + &self, + windowFrameAutosaveName: &NSWindowFrameAutosaveName, + ); + #[method(shouldCascadeWindows)] + pub unsafe fn shouldCascadeWindows(&self) -> bool; + #[method(setShouldCascadeWindows:)] + pub unsafe fn setShouldCascadeWindows(&self, shouldCascadeWindows: bool); + #[method_id(document)] + pub unsafe fn document(&self) -> Option>; + #[method(setDocument:)] + pub unsafe fn setDocument(&self, document: Option<&Object>); + #[method(setDocumentEdited:)] + pub unsafe fn setDocumentEdited(&self, dirtyFlag: bool); + #[method(shouldCloseDocument)] + pub unsafe fn shouldCloseDocument(&self) -> bool; + #[method(setShouldCloseDocument:)] + pub unsafe fn setShouldCloseDocument(&self, shouldCloseDocument: bool); + #[method(synchronizeWindowTitleWithDocumentName)] + pub unsafe fn synchronizeWindowTitleWithDocumentName(&self); + #[method_id(windowTitleForDocumentDisplayName:)] + pub unsafe fn windowTitleForDocumentDisplayName( + &self, + displayName: &NSString, + ) -> Id; + #[method_id(contentViewController)] + pub unsafe fn contentViewController(&self) -> Option>; + #[method(setContentViewController:)] + pub unsafe fn setContentViewController( + &self, + contentViewController: Option<&NSViewController>, + ); + #[method_id(window)] + pub unsafe fn window(&self) -> Option>; + #[method(setWindow:)] + pub unsafe fn setWindow(&self, window: Option<&NSWindow>); + #[method(isWindowLoaded)] + pub unsafe fn isWindowLoaded(&self) -> bool; + #[method(windowWillLoad)] + pub unsafe fn windowWillLoad(&self); + #[method(windowDidLoad)] + pub unsafe fn windowDidLoad(&self); + #[method(loadWindow)] + pub unsafe fn loadWindow(&self); + #[method(close)] + pub unsafe fn close(&self); + #[method(showWindow:)] + pub unsafe fn showWindow(&self, sender: Option<&Object>); + } +); +extern_methods!( + #[doc = "NSWindowControllerStoryboardingMethods"] + unsafe impl NSWindowController { + #[method_id(storyboard)] + pub unsafe fn storyboard(&self) -> Option>; + } +); +extern_methods!( + #[doc = "NSWindowControllerDismissing"] + unsafe impl NSWindowController { + #[method(dismissController:)] + pub unsafe fn dismissController(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs new file mode 100644 index 000000000..615d5c92f --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -0,0 +1,106 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSApplication::*; +use crate::AppKit::generated::NSDocument::*; +use crate::AppKit::generated::NSDocumentController::*; +use crate::AppKit::generated::NSWindow::*; +use crate::Foundation::generated::NSArray::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +pub type NSWindowRestoration = NSObject; +extern_methods!( + #[doc = "NSWindowRestoration"] + unsafe impl NSDocumentController {} +); +extern_methods!( + #[doc = "NSWindowRestoration"] + unsafe impl NSApplication { + #[method(restoreWindowWithIdentifier:state:completionHandler:)] + pub unsafe fn restoreWindowWithIdentifier_state_completionHandler( + &self, + identifier: &NSUserInterfaceItemIdentifier, + state: &NSCoder, + completionHandler: TodoBlock, + ) -> bool; + } +); +extern_methods!( + #[doc = "NSUserInterfaceRestoration"] + unsafe impl NSWindow { + #[method(isRestorable)] + pub unsafe fn isRestorable(&self) -> bool; + #[method(setRestorable:)] + pub unsafe fn setRestorable(&self, restorable: bool); + #[method_id(restorationClass)] + pub unsafe fn restorationClass(&self) -> Option>; + #[method(setRestorationClass:)] + pub unsafe fn setRestorationClass(&self, restorationClass: Option<&TodoProtocols>); + #[method(disableSnapshotRestoration)] + pub unsafe fn disableSnapshotRestoration(&self); + #[method(enableSnapshotRestoration)] + pub unsafe fn enableSnapshotRestoration(&self); + } +); +extern_methods!( + #[doc = "NSRestorableState"] + unsafe impl NSResponder { + #[method(encodeRestorableStateWithCoder:)] + pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder); + #[method(encodeRestorableStateWithCoder:backgroundQueue:)] + pub unsafe fn encodeRestorableStateWithCoder_backgroundQueue( + &self, + coder: &NSCoder, + queue: &NSOperationQueue, + ); + #[method(restoreStateWithCoder:)] + pub unsafe fn restoreStateWithCoder(&self, coder: &NSCoder); + #[method(invalidateRestorableState)] + pub unsafe fn invalidateRestorableState(&self); + #[method_id(restorableStateKeyPaths)] + pub unsafe fn restorableStateKeyPaths() -> Id, Shared>; + #[method_id(allowedClassesForRestorableStateKeyPath:)] + pub unsafe fn allowedClassesForRestorableStateKeyPath( + keyPath: &NSString, + ) -> Id, Shared>; + } +); +extern_methods!( + #[doc = "NSRestorableStateExtension"] + unsafe impl NSApplication { + #[method(extendStateRestoration)] + pub unsafe fn extendStateRestoration(&self); + #[method(completeStateRestoration)] + pub unsafe fn completeStateRestoration(&self); + } +); +extern_methods!( + #[doc = "NSRestorableState"] + unsafe impl NSDocument { + #[method(restoreDocumentWindowWithIdentifier:state:completionHandler:)] + pub unsafe fn restoreDocumentWindowWithIdentifier_state_completionHandler( + &self, + identifier: &NSUserInterfaceItemIdentifier, + state: &NSCoder, + completionHandler: TodoBlock, + ); + #[method(encodeRestorableStateWithCoder:)] + pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder); + #[method(encodeRestorableStateWithCoder:backgroundQueue:)] + pub unsafe fn encodeRestorableStateWithCoder_backgroundQueue( + &self, + coder: &NSCoder, + queue: &NSOperationQueue, + ); + #[method(restoreStateWithCoder:)] + pub unsafe fn restoreStateWithCoder(&self, coder: &NSCoder); + #[method(invalidateRestorableState)] + pub unsafe fn invalidateRestorableState(&self); + #[method_id(restorableStateKeyPaths)] + pub unsafe fn restorableStateKeyPaths() -> Id, Shared>; + #[method_id(allowedClassesForRestorableStateKeyPath:)] + pub unsafe fn allowedClassesForRestorableStateKeyPath( + keyPath: &NSString, + ) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs new file mode 100644 index 000000000..fb6f9c2ca --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs @@ -0,0 +1,52 @@ +use super::__exported::NSCloseCommand; +use super::__exported::NSScriptCommand; +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSWindow::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_methods!( + #[doc = "NSScripting"] + unsafe impl NSWindow { + #[method(hasCloseBox)] + pub unsafe fn hasCloseBox(&self) -> bool; + #[method(hasTitleBar)] + pub unsafe fn hasTitleBar(&self) -> bool; + #[method(isFloatingPanel)] + pub unsafe fn isFloatingPanel(&self) -> bool; + #[method(isMiniaturizable)] + pub unsafe fn isMiniaturizable(&self) -> bool; + #[method(isModalPanel)] + pub unsafe fn isModalPanel(&self) -> bool; + #[method(isResizable)] + pub unsafe fn isResizable(&self) -> bool; + #[method(isZoomable)] + pub unsafe fn isZoomable(&self) -> bool; + #[method(orderedIndex)] + pub unsafe fn orderedIndex(&self) -> NSInteger; + #[method(setOrderedIndex:)] + pub unsafe fn setOrderedIndex(&self, orderedIndex: NSInteger); + #[method(setIsMiniaturized:)] + pub unsafe fn setIsMiniaturized(&self, flag: bool); + #[method(setIsVisible:)] + pub unsafe fn setIsVisible(&self, flag: bool); + #[method(setIsZoomed:)] + pub unsafe fn setIsZoomed(&self, flag: bool); + #[method_id(handleCloseScriptCommand:)] + pub unsafe fn handleCloseScriptCommand( + &self, + command: &NSCloseCommand, + ) -> Option>; + #[method_id(handlePrintScriptCommand:)] + pub unsafe fn handlePrintScriptCommand( + &self, + command: &NSScriptCommand, + ) -> Option>; + #[method_id(handleSaveScriptCommand:)] + pub unsafe fn handleSaveScriptCommand( + &self, + command: &NSScriptCommand, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSWindowTab.rs b/crates/icrate/src/generated/AppKit/NSWindowTab.rs new file mode 100644 index 000000000..657a8c574 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSWindowTab.rs @@ -0,0 +1,36 @@ +use super::__exported::NSImage; +use super::__exported::NSView; +use super::__exported::NSWindow; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSWindowTab; + unsafe impl ClassType for NSWindowTab { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSWindowTab { + #[method_id(title)] + pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] + pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(attributedTitle)] + pub unsafe fn attributedTitle(&self) -> Option>; + #[method(setAttributedTitle:)] + pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); + #[method_id(toolTip)] + pub unsafe fn toolTip(&self) -> Id; + #[method(setToolTip:)] + pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + #[method_id(accessoryView)] + pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] + pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs new file mode 100644 index 000000000..cad078ff6 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs @@ -0,0 +1,38 @@ +use crate::AppKit::generated::AppKitDefines::*; +use crate::AppKit::generated::NSWindow::*; +use crate::Foundation::generated::Foundation::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSWindowTabGroup; + unsafe impl ClassType for NSWindowTabGroup { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSWindowTabGroup { + #[method_id(identifier)] + pub unsafe fn identifier(&self) -> Id; + #[method_id(windows)] + pub unsafe fn windows(&self) -> Id, Shared>; + #[method(isOverviewVisible)] + pub unsafe fn isOverviewVisible(&self) -> bool; + #[method(setOverviewVisible:)] + pub unsafe fn setOverviewVisible(&self, overviewVisible: bool); + #[method(isTabBarVisible)] + pub unsafe fn isTabBarVisible(&self) -> bool; + #[method_id(selectedWindow)] + pub unsafe fn selectedWindow(&self) -> Option>; + #[method(setSelectedWindow:)] + pub unsafe fn setSelectedWindow(&self, selectedWindow: Option<&NSWindow>); + #[method(addWindow:)] + pub unsafe fn addWindow(&self, window: &NSWindow); + #[method(insertWindow:atIndex:)] + pub unsafe fn insertWindow_atIndex(&self, window: &NSWindow, index: NSInteger); + #[method(removeWindow:)] + pub unsafe fn removeWindow(&self, window: &NSWindow); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs new file mode 100644 index 000000000..27eda1224 --- /dev/null +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -0,0 +1,471 @@ +use super::__exported::NSAppleEventDescriptor; +use super::__exported::NSColor; +use super::__exported::NSError; +use super::__exported::NSImage; +use super::__exported::NSNotificationCenter; +use super::__exported::NSRunningApplication; +use super::__exported::NSScreen; +use super::__exported::NSView; +use super::__exported::UTType; +use super::__exported::NSURL; +use crate::mach::generated::machine::*; +use crate::AppKit::generated::AppKitDefines::*; +use crate::Foundation::generated::NSArray::*; +use crate::Foundation::generated::NSDictionary::*; +use crate::Foundation::generated::NSFileManager::*; +use crate::Foundation::generated::NSGeometry::*; +use crate::Foundation::generated::NSObject::*; +#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType}; +extern_class!( + #[derive(Debug)] + pub struct NSWorkspace; + unsafe impl ClassType for NSWorkspace { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSWorkspace { + #[method_id(sharedWorkspace)] + pub unsafe fn sharedWorkspace() -> Id; + #[method_id(notificationCenter)] + pub unsafe fn notificationCenter(&self) -> Id; + #[method(openURL:)] + pub unsafe fn openURL(&self, url: &NSURL) -> bool; + #[method(openURL:configuration:completionHandler:)] + pub unsafe fn openURL_configuration_completionHandler( + &self, + url: &NSURL, + configuration: &NSWorkspaceOpenConfiguration, + completionHandler: TodoBlock, + ); + #[method(openURLs:withApplicationAtURL:configuration:completionHandler:)] + pub unsafe fn openURLs_withApplicationAtURL_configuration_completionHandler( + &self, + urls: &NSArray, + applicationURL: &NSURL, + configuration: &NSWorkspaceOpenConfiguration, + completionHandler: TodoBlock, + ); + #[method(openApplicationAtURL:configuration:completionHandler:)] + pub unsafe fn openApplicationAtURL_configuration_completionHandler( + &self, + applicationURL: &NSURL, + configuration: &NSWorkspaceOpenConfiguration, + completionHandler: TodoBlock, + ); + #[method(selectFile:inFileViewerRootedAtPath:)] + pub unsafe fn selectFile_inFileViewerRootedAtPath( + &self, + fullPath: Option<&NSString>, + rootFullPath: &NSString, + ) -> bool; + #[method(activateFileViewerSelectingURLs:)] + pub unsafe fn activateFileViewerSelectingURLs(&self, fileURLs: &NSArray); + #[method(showSearchResultsForQueryString:)] + pub unsafe fn showSearchResultsForQueryString(&self, queryString: &NSString) -> bool; + #[method(noteFileSystemChanged:)] + pub unsafe fn noteFileSystemChanged(&self, path: &NSString); + #[method(isFilePackageAtPath:)] + pub unsafe fn isFilePackageAtPath(&self, fullPath: &NSString) -> bool; + #[method_id(iconForFile:)] + pub unsafe fn iconForFile(&self, fullPath: &NSString) -> Id; + #[method_id(iconForFiles:)] + pub unsafe fn iconForFiles( + &self, + fullPaths: &NSArray, + ) -> Option>; + #[method_id(iconForContentType:)] + pub unsafe fn iconForContentType(&self, contentType: &UTType) -> Id; + #[method(setIcon:forFile:options:)] + pub unsafe fn setIcon_forFile_options( + &self, + image: Option<&NSImage>, + fullPath: &NSString, + options: NSWorkspaceIconCreationOptions, + ) -> bool; + #[method_id(fileLabels)] + pub unsafe fn fileLabels(&self) -> Id, Shared>; + #[method_id(fileLabelColors)] + pub unsafe fn fileLabelColors(&self) -> Id, Shared>; + #[method(recycleURLs:completionHandler:)] + pub unsafe fn recycleURLs_completionHandler( + &self, + URLs: &NSArray, + handler: TodoBlock, + ); + #[method(duplicateURLs:completionHandler:)] + pub unsafe fn duplicateURLs_completionHandler( + &self, + URLs: &NSArray, + handler: TodoBlock, + ); + #[method(getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:)] + pub unsafe fn getFileSystemInfoForPath_isRemovable_isWritable_isUnmountable_description_type( + &self, + fullPath: &NSString, + removableFlag: *mut bool, + writableFlag: *mut bool, + unmountableFlag: *mut bool, + description: Option<&mut Option>>, + fileSystemType: Option<&mut Option>>, + ) -> bool; + #[method(unmountAndEjectDeviceAtPath:)] + pub unsafe fn unmountAndEjectDeviceAtPath(&self, path: &NSString) -> bool; + #[method(unmountAndEjectDeviceAtURL:error:)] + pub unsafe fn unmountAndEjectDeviceAtURL_error( + &self, + url: &NSURL, + ) -> Result<(), Id>; + #[method(extendPowerOffBy:)] + pub unsafe fn extendPowerOffBy(&self, requested: NSInteger) -> NSInteger; + #[method(hideOtherApplications)] + pub unsafe fn hideOtherApplications(&self); + #[method_id(URLForApplicationWithBundleIdentifier:)] + pub unsafe fn URLForApplicationWithBundleIdentifier( + &self, + bundleIdentifier: &NSString, + ) -> Option>; + #[method_id(URLsForApplicationsWithBundleIdentifier:)] + pub unsafe fn URLsForApplicationsWithBundleIdentifier( + &self, + bundleIdentifier: &NSString, + ) -> Id, Shared>; + #[method_id(URLForApplicationToOpenURL:)] + pub unsafe fn URLForApplicationToOpenURL(&self, url: &NSURL) -> Option>; + #[method_id(URLsForApplicationsToOpenURL:)] + pub unsafe fn URLsForApplicationsToOpenURL( + &self, + url: &NSURL, + ) -> Id, Shared>; + #[method(setDefaultApplicationAtURL:toOpenContentTypeOfFileAtURL:completionHandler:)] + pub unsafe fn setDefaultApplicationAtURL_toOpenContentTypeOfFileAtURL_completionHandler( + &self, + applicationURL: &NSURL, + url: &NSURL, + completionHandler: TodoBlock, + ); + #[method(setDefaultApplicationAtURL:toOpenURLsWithScheme:completionHandler:)] + pub unsafe fn setDefaultApplicationAtURL_toOpenURLsWithScheme_completionHandler( + &self, + applicationURL: &NSURL, + urlScheme: &NSString, + completionHandler: TodoBlock, + ); + #[method(setDefaultApplicationAtURL:toOpenFileAtURL:completionHandler:)] + pub unsafe fn setDefaultApplicationAtURL_toOpenFileAtURL_completionHandler( + &self, + applicationURL: &NSURL, + url: &NSURL, + completionHandler: TodoBlock, + ); + #[method_id(URLForApplicationToOpenContentType:)] + pub unsafe fn URLForApplicationToOpenContentType( + &self, + contentType: &UTType, + ) -> Option>; + #[method_id(URLsForApplicationsToOpenContentType:)] + pub unsafe fn URLsForApplicationsToOpenContentType( + &self, + contentType: &UTType, + ) -> Id, Shared>; + #[method(setDefaultApplicationAtURL:toOpenContentType:completionHandler:)] + pub unsafe fn setDefaultApplicationAtURL_toOpenContentType_completionHandler( + &self, + applicationURL: &NSURL, + contentType: &UTType, + completionHandler: TodoBlock, + ); + #[method_id(frontmostApplication)] + pub unsafe fn frontmostApplication(&self) -> Option>; + #[method_id(menuBarOwningApplication)] + pub unsafe fn menuBarOwningApplication(&self) -> Option>; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSWorkspaceOpenConfiguration; + unsafe impl ClassType for NSWorkspaceOpenConfiguration { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSWorkspaceOpenConfiguration { + #[method_id(configuration)] + pub unsafe fn configuration() -> Id; + #[method(promptsUserIfNeeded)] + pub unsafe fn promptsUserIfNeeded(&self) -> bool; + #[method(setPromptsUserIfNeeded:)] + pub unsafe fn setPromptsUserIfNeeded(&self, promptsUserIfNeeded: bool); + #[method(addsToRecentItems)] + pub unsafe fn addsToRecentItems(&self) -> bool; + #[method(setAddsToRecentItems:)] + pub unsafe fn setAddsToRecentItems(&self, addsToRecentItems: bool); + #[method(activates)] + pub unsafe fn activates(&self) -> bool; + #[method(setActivates:)] + pub unsafe fn setActivates(&self, activates: bool); + #[method(hides)] + pub unsafe fn hides(&self) -> bool; + #[method(setHides:)] + pub unsafe fn setHides(&self, hides: bool); + #[method(hidesOthers)] + pub unsafe fn hidesOthers(&self) -> bool; + #[method(setHidesOthers:)] + pub unsafe fn setHidesOthers(&self, hidesOthers: bool); + #[method(isForPrinting)] + pub unsafe fn isForPrinting(&self) -> bool; + #[method(setForPrinting:)] + pub unsafe fn setForPrinting(&self, forPrinting: bool); + #[method(createsNewApplicationInstance)] + pub unsafe fn createsNewApplicationInstance(&self) -> bool; + #[method(setCreatesNewApplicationInstance:)] + pub unsafe fn setCreatesNewApplicationInstance(&self, createsNewApplicationInstance: bool); + #[method(allowsRunningApplicationSubstitution)] + pub unsafe fn allowsRunningApplicationSubstitution(&self) -> bool; + #[method(setAllowsRunningApplicationSubstitution:)] + pub unsafe fn setAllowsRunningApplicationSubstitution( + &self, + allowsRunningApplicationSubstitution: bool, + ); + #[method_id(arguments)] + pub unsafe fn arguments(&self) -> Id, Shared>; + #[method(setArguments:)] + pub unsafe fn setArguments(&self, arguments: &NSArray); + #[method_id(environment)] + pub unsafe fn environment(&self) -> Id, Shared>; + #[method(setEnvironment:)] + pub unsafe fn setEnvironment(&self, environment: &NSDictionary); + #[method_id(appleEvent)] + pub unsafe fn appleEvent(&self) -> Option>; + #[method(setAppleEvent:)] + pub unsafe fn setAppleEvent(&self, appleEvent: Option<&NSAppleEventDescriptor>); + #[method(architecture)] + pub unsafe fn architecture(&self) -> cpu_type_t; + #[method(setArchitecture:)] + pub unsafe fn setArchitecture(&self, architecture: cpu_type_t); + #[method(requiresUniversalLinks)] + pub unsafe fn requiresUniversalLinks(&self) -> bool; + #[method(setRequiresUniversalLinks:)] + pub unsafe fn setRequiresUniversalLinks(&self, requiresUniversalLinks: bool); + } +); +pub type NSWorkspaceDesktopImageOptionKey = NSString; +extern_methods!( + #[doc = "NSDesktopImages"] + unsafe impl NSWorkspace { + #[method(setDesktopImageURL:forScreen:options:error:)] + pub unsafe fn setDesktopImageURL_forScreen_options_error( + &self, + url: &NSURL, + screen: &NSScreen, + options: &NSDictionary, + ) -> Result<(), Id>; + #[method_id(desktopImageURLForScreen:)] + pub unsafe fn desktopImageURLForScreen( + &self, + screen: &NSScreen, + ) -> Option>; + #[method_id(desktopImageOptionsForScreen:)] + pub unsafe fn desktopImageOptionsForScreen( + &self, + screen: &NSScreen, + ) -> Option, Shared>>; + } +); +extern_class!( + #[derive(Debug)] + pub struct NSWorkspaceAuthorization; + unsafe impl ClassType for NSWorkspaceAuthorization { + type Super = NSObject; + } +); +extern_methods!( + unsafe impl NSWorkspaceAuthorization {} +); +extern_methods!( + #[doc = "NSWorkspaceAuthorization"] + unsafe impl NSWorkspace { + #[method(requestAuthorizationOfType:completionHandler:)] + pub unsafe fn requestAuthorizationOfType_completionHandler( + &self, + type_: NSWorkspaceAuthorizationType, + completionHandler: TodoBlock, + ); + } +); +extern_methods!( + #[doc = "NSWorkspaceAuthorization"] + unsafe impl NSFileManager { + #[method_id(fileManagerWithAuthorization:)] + pub unsafe fn fileManagerWithAuthorization( + authorization: &NSWorkspaceAuthorization, + ) -> Id; + } +); +pub type NSWorkspaceFileOperationName = NSString; +pub type NSWorkspaceLaunchConfigurationKey = NSString; +extern_methods!( + #[doc = "NSDeprecated"] + unsafe impl NSWorkspace { + #[method(openFile:)] + pub unsafe fn openFile(&self, fullPath: &NSString) -> bool; + #[method(openFile:withApplication:)] + pub unsafe fn openFile_withApplication( + &self, + fullPath: &NSString, + appName: Option<&NSString>, + ) -> bool; + #[method(openFile:withApplication:andDeactivate:)] + pub unsafe fn openFile_withApplication_andDeactivate( + &self, + fullPath: &NSString, + appName: Option<&NSString>, + flag: bool, + ) -> bool; + #[method(launchApplication:)] + pub unsafe fn launchApplication(&self, appName: &NSString) -> bool; + #[method_id(launchApplicationAtURL:options:configuration:error:)] + pub unsafe fn launchApplicationAtURL_options_configuration_error( + &self, + url: &NSURL, + options: NSWorkspaceLaunchOptions, + configuration: &NSDictionary, + ) -> Result, Id>; + #[method_id(openURL:options:configuration:error:)] + pub unsafe fn openURL_options_configuration_error( + &self, + url: &NSURL, + options: NSWorkspaceLaunchOptions, + configuration: &NSDictionary, + ) -> Result, Id>; + #[method_id(openURLs:withApplicationAtURL:options:configuration:error:)] + pub unsafe fn openURLs_withApplicationAtURL_options_configuration_error( + &self, + urls: &NSArray, + applicationURL: &NSURL, + options: NSWorkspaceLaunchOptions, + configuration: &NSDictionary, + ) -> Result, Id>; + #[method(launchApplication:showIcon:autolaunch:)] + pub unsafe fn launchApplication_showIcon_autolaunch( + &self, + appName: &NSString, + showIcon: bool, + autolaunch: bool, + ) -> bool; + #[method_id(fullPathForApplication:)] + pub unsafe fn fullPathForApplication( + &self, + appName: &NSString, + ) -> Option>; + #[method_id(absolutePathForAppBundleWithIdentifier:)] + pub unsafe fn absolutePathForAppBundleWithIdentifier( + &self, + bundleIdentifier: &NSString, + ) -> Option>; + #[method(launchAppWithBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifier:)] + pub unsafe fn launchAppWithBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifier( + &self, + bundleIdentifier: &NSString, + options: NSWorkspaceLaunchOptions, + descriptor: Option<&NSAppleEventDescriptor>, + identifier: Option<&mut Option>>, + ) -> bool; + #[method(openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:)] + pub unsafe fn openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers( + &self, + urls: &NSArray, + bundleIdentifier: Option<&NSString>, + options: NSWorkspaceLaunchOptions, + descriptor: Option<&NSAppleEventDescriptor>, + identifiers: Option<&mut Option, Shared>>>, + ) -> bool; + #[method(openTempFile:)] + pub unsafe fn openTempFile(&self, fullPath: &NSString) -> bool; + #[method(findApplications)] + pub unsafe fn findApplications(&self); + #[method(noteUserDefaultsChanged)] + pub unsafe fn noteUserDefaultsChanged(&self); + #[method(slideImage:from:to:)] + pub unsafe fn slideImage_from_to( + &self, + image: &NSImage, + fromPoint: NSPoint, + toPoint: NSPoint, + ); + #[method(checkForRemovableMedia)] + pub unsafe fn checkForRemovableMedia(&self); + #[method(noteFileSystemChanged)] + pub unsafe fn noteFileSystemChanged(&self); + #[method(fileSystemChanged)] + pub unsafe fn fileSystemChanged(&self) -> bool; + #[method(userDefaultsChanged)] + pub unsafe fn userDefaultsChanged(&self) -> bool; + #[method_id(mountNewRemovableMedia)] + pub unsafe fn mountNewRemovableMedia(&self) -> Option>; + #[method_id(activeApplication)] + pub unsafe fn activeApplication(&self) -> Option>; + #[method_id(mountedLocalVolumePaths)] + pub unsafe fn mountedLocalVolumePaths(&self) -> Option>; + #[method_id(mountedRemovableMedia)] + pub unsafe fn mountedRemovableMedia(&self) -> Option>; + #[method_id(launchedApplications)] + pub unsafe fn launchedApplications(&self) -> Option>; + #[method(openFile:fromImage:at:inView:)] + pub unsafe fn openFile_fromImage_at_inView( + &self, + fullPath: &NSString, + image: Option<&NSImage>, + point: NSPoint, + view: Option<&NSView>, + ) -> bool; + #[method(performFileOperation:source:destination:files:tag:)] + pub unsafe fn performFileOperation_source_destination_files_tag( + &self, + operation: &NSWorkspaceFileOperationName, + source: &NSString, + destination: &NSString, + files: &NSArray, + tag: *mut NSInteger, + ) -> bool; + #[method(getInfoForFile:application:type:)] + pub unsafe fn getInfoForFile_application_type( + &self, + fullPath: &NSString, + appName: Option<&mut Option>>, + type_: Option<&mut Option>>, + ) -> bool; + #[method_id(iconForFileType:)] + pub unsafe fn iconForFileType(&self, fileType: &NSString) -> Id; + #[method_id(typeOfFile:error:)] + pub unsafe fn typeOfFile_error( + &self, + absoluteFilePath: &NSString, + ) -> Result, Id>; + #[method_id(localizedDescriptionForType:)] + pub unsafe fn localizedDescriptionForType( + &self, + typeName: &NSString, + ) -> Option>; + #[method_id(preferredFilenameExtensionForType:)] + pub unsafe fn preferredFilenameExtensionForType( + &self, + typeName: &NSString, + ) -> Option>; + #[method(filenameExtension:isValidForType:)] + pub unsafe fn filenameExtension_isValidForType( + &self, + filenameExtension: &NSString, + typeName: &NSString, + ) -> bool; + #[method(type:conformsToType:)] + pub unsafe fn type_conformsToType( + &self, + firstTypeName: &NSString, + secondTypeName: &NSString, + ) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index 8b1378917..672e33e00 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -1 +1,696 @@ - +pub(crate) mod AppKitDefines; +pub(crate) mod AppKitErrors; +pub(crate) mod NSATSTypesetter; +pub(crate) mod NSAccessibility; +pub(crate) mod NSAccessibilityConstants; +pub(crate) mod NSAccessibilityCustomAction; +pub(crate) mod NSAccessibilityCustomRotor; +pub(crate) mod NSAccessibilityElement; +pub(crate) mod NSAccessibilityProtocols; +pub(crate) mod NSActionCell; +pub(crate) mod NSAffineTransform; +pub(crate) mod NSAlert; +pub(crate) mod NSAlignmentFeedbackFilter; +pub(crate) mod NSAnimation; +pub(crate) mod NSAnimationContext; +pub(crate) mod NSAppearance; +pub(crate) mod NSAppleScriptExtensions; +pub(crate) mod NSApplication; +pub(crate) mod NSApplicationScripting; +pub(crate) mod NSArrayController; +pub(crate) mod NSAttributedString; +pub(crate) mod NSBezierPath; +pub(crate) mod NSBitmapImageRep; +pub(crate) mod NSBox; +pub(crate) mod NSBrowser; +pub(crate) mod NSBrowserCell; +pub(crate) mod NSButton; +pub(crate) mod NSButtonCell; +pub(crate) mod NSButtonTouchBarItem; +pub(crate) mod NSCIImageRep; +pub(crate) mod NSCachedImageRep; +pub(crate) mod NSCandidateListTouchBarItem; +pub(crate) mod NSCell; +pub(crate) mod NSClickGestureRecognizer; +pub(crate) mod NSClipView; +pub(crate) mod NSCollectionView; +pub(crate) mod NSCollectionViewCompositionalLayout; +pub(crate) mod NSCollectionViewFlowLayout; +pub(crate) mod NSCollectionViewGridLayout; +pub(crate) mod NSCollectionViewLayout; +pub(crate) mod NSCollectionViewTransitionLayout; +pub(crate) mod NSColor; +pub(crate) mod NSColorList; +pub(crate) mod NSColorPanel; +pub(crate) mod NSColorPicker; +pub(crate) mod NSColorPickerTouchBarItem; +pub(crate) mod NSColorPicking; +pub(crate) mod NSColorSampler; +pub(crate) mod NSColorSpace; +pub(crate) mod NSColorWell; +pub(crate) mod NSComboBox; +pub(crate) mod NSComboBoxCell; +pub(crate) mod NSControl; +pub(crate) mod NSController; +pub(crate) mod NSCursor; +pub(crate) mod NSCustomImageRep; +pub(crate) mod NSCustomTouchBarItem; +pub(crate) mod NSDataAsset; +pub(crate) mod NSDatePicker; +pub(crate) mod NSDatePickerCell; +pub(crate) mod NSDictionaryController; +pub(crate) mod NSDiffableDataSource; +pub(crate) mod NSDockTile; +pub(crate) mod NSDocument; +pub(crate) mod NSDocumentController; +pub(crate) mod NSDocumentScripting; +pub(crate) mod NSDragging; +pub(crate) mod NSDraggingItem; +pub(crate) mod NSDraggingSession; +pub(crate) mod NSDrawer; +pub(crate) mod NSEPSImageRep; +pub(crate) mod NSErrors; +pub(crate) mod NSEvent; +pub(crate) mod NSFilePromiseProvider; +pub(crate) mod NSFilePromiseReceiver; +pub(crate) mod NSFileWrapperExtensions; +pub(crate) mod NSFont; +pub(crate) mod NSFontAssetRequest; +pub(crate) mod NSFontCollection; +pub(crate) mod NSFontDescriptor; +pub(crate) mod NSFontManager; +pub(crate) mod NSFontPanel; +pub(crate) mod NSForm; +pub(crate) mod NSFormCell; +pub(crate) mod NSGestureRecognizer; +pub(crate) mod NSGlyphGenerator; +pub(crate) mod NSGlyphInfo; +pub(crate) mod NSGradient; +pub(crate) mod NSGraphics; +pub(crate) mod NSGraphicsContext; +pub(crate) mod NSGridView; +pub(crate) mod NSGroupTouchBarItem; +pub(crate) mod NSHapticFeedback; +pub(crate) mod NSHelpManager; +pub(crate) mod NSImage; +pub(crate) mod NSImageCell; +pub(crate) mod NSImageRep; +pub(crate) mod NSImageView; +pub(crate) mod NSInputManager; +pub(crate) mod NSInputServer; +pub(crate) mod NSInterfaceStyle; +pub(crate) mod NSItemProvider; +pub(crate) mod NSKeyValueBinding; +pub(crate) mod NSLayoutAnchor; +pub(crate) mod NSLayoutConstraint; +pub(crate) mod NSLayoutGuide; +pub(crate) mod NSLayoutManager; +pub(crate) mod NSLevelIndicator; +pub(crate) mod NSLevelIndicatorCell; +pub(crate) mod NSMagnificationGestureRecognizer; +pub(crate) mod NSMatrix; +pub(crate) mod NSMediaLibraryBrowserController; +pub(crate) mod NSMenu; +pub(crate) mod NSMenuItem; +pub(crate) mod NSMenuItemCell; +pub(crate) mod NSMenuToolbarItem; +pub(crate) mod NSMovie; +pub(crate) mod NSNib; +pub(crate) mod NSNibDeclarations; +pub(crate) mod NSNibLoading; +pub(crate) mod NSObjectController; +pub(crate) mod NSOpenGL; +pub(crate) mod NSOpenGLLayer; +pub(crate) mod NSOpenGLView; +pub(crate) mod NSOpenPanel; +pub(crate) mod NSOutlineView; +pub(crate) mod NSPDFImageRep; +pub(crate) mod NSPDFInfo; +pub(crate) mod NSPDFPanel; +pub(crate) mod NSPICTImageRep; +pub(crate) mod NSPageController; +pub(crate) mod NSPageLayout; +pub(crate) mod NSPanGestureRecognizer; +pub(crate) mod NSPanel; +pub(crate) mod NSParagraphStyle; +pub(crate) mod NSPasteboard; +pub(crate) mod NSPasteboardItem; +pub(crate) mod NSPathCell; +pub(crate) mod NSPathComponentCell; +pub(crate) mod NSPathControl; +pub(crate) mod NSPathControlItem; +pub(crate) mod NSPersistentDocument; +pub(crate) mod NSPickerTouchBarItem; +pub(crate) mod NSPopUpButton; +pub(crate) mod NSPopUpButtonCell; +pub(crate) mod NSPopover; +pub(crate) mod NSPopoverTouchBarItem; +pub(crate) mod NSPredicateEditor; +pub(crate) mod NSPredicateEditorRowTemplate; +pub(crate) mod NSPressGestureRecognizer; +pub(crate) mod NSPressureConfiguration; +pub(crate) mod NSPrintInfo; +pub(crate) mod NSPrintOperation; +pub(crate) mod NSPrintPanel; +pub(crate) mod NSPrinter; +pub(crate) mod NSProgressIndicator; +pub(crate) mod NSResponder; +pub(crate) mod NSRotationGestureRecognizer; +pub(crate) mod NSRuleEditor; +pub(crate) mod NSRulerMarker; +pub(crate) mod NSRulerView; +pub(crate) mod NSRunningApplication; +pub(crate) mod NSSavePanel; +pub(crate) mod NSScreen; +pub(crate) mod NSScrollView; +pub(crate) mod NSScroller; +pub(crate) mod NSScrubber; +pub(crate) mod NSScrubberItemView; +pub(crate) mod NSScrubberLayout; +pub(crate) mod NSSearchField; +pub(crate) mod NSSearchFieldCell; +pub(crate) mod NSSearchToolbarItem; +pub(crate) mod NSSecureTextField; +pub(crate) mod NSSegmentedCell; +pub(crate) mod NSSegmentedControl; +pub(crate) mod NSShadow; +pub(crate) mod NSSharingService; +pub(crate) mod NSSharingServicePickerToolbarItem; +pub(crate) mod NSSharingServicePickerTouchBarItem; +pub(crate) mod NSSlider; +pub(crate) mod NSSliderAccessory; +pub(crate) mod NSSliderCell; +pub(crate) mod NSSliderTouchBarItem; +pub(crate) mod NSSound; +pub(crate) mod NSSpeechRecognizer; +pub(crate) mod NSSpeechSynthesizer; +pub(crate) mod NSSpellChecker; +pub(crate) mod NSSpellProtocol; +pub(crate) mod NSSplitView; +pub(crate) mod NSSplitViewController; +pub(crate) mod NSSplitViewItem; +pub(crate) mod NSStackView; +pub(crate) mod NSStatusBar; +pub(crate) mod NSStatusBarButton; +pub(crate) mod NSStatusItem; +pub(crate) mod NSStepper; +pub(crate) mod NSStepperCell; +pub(crate) mod NSStepperTouchBarItem; +pub(crate) mod NSStoryboard; +pub(crate) mod NSStoryboardSegue; +pub(crate) mod NSStringDrawing; +pub(crate) mod NSSwitch; +pub(crate) mod NSTabView; +pub(crate) mod NSTabViewController; +pub(crate) mod NSTabViewItem; +pub(crate) mod NSTableCellView; +pub(crate) mod NSTableColumn; +pub(crate) mod NSTableHeaderCell; +pub(crate) mod NSTableHeaderView; +pub(crate) mod NSTableRowView; +pub(crate) mod NSTableView; +pub(crate) mod NSTableViewDiffableDataSource; +pub(crate) mod NSTableViewRowAction; +pub(crate) mod NSText; +pub(crate) mod NSTextAlternatives; +pub(crate) mod NSTextAttachment; +pub(crate) mod NSTextAttachmentCell; +pub(crate) mod NSTextCheckingClient; +pub(crate) mod NSTextCheckingController; +pub(crate) mod NSTextContainer; +pub(crate) mod NSTextContent; +pub(crate) mod NSTextContentManager; +pub(crate) mod NSTextElement; +pub(crate) mod NSTextField; +pub(crate) mod NSTextFieldCell; +pub(crate) mod NSTextFinder; +pub(crate) mod NSTextInputClient; +pub(crate) mod NSTextInputContext; +pub(crate) mod NSTextLayoutFragment; +pub(crate) mod NSTextLayoutManager; +pub(crate) mod NSTextLineFragment; +pub(crate) mod NSTextList; +pub(crate) mod NSTextRange; +pub(crate) mod NSTextSelection; +pub(crate) mod NSTextSelectionNavigation; +pub(crate) mod NSTextStorage; +pub(crate) mod NSTextStorageScripting; +pub(crate) mod NSTextTable; +pub(crate) mod NSTextView; +pub(crate) mod NSTextViewportLayoutController; +pub(crate) mod NSTintConfiguration; +pub(crate) mod NSTitlebarAccessoryViewController; +pub(crate) mod NSTokenField; +pub(crate) mod NSTokenFieldCell; +pub(crate) mod NSToolbar; +pub(crate) mod NSToolbarItem; +pub(crate) mod NSToolbarItemGroup; +pub(crate) mod NSTouch; +pub(crate) mod NSTouchBar; +pub(crate) mod NSTouchBarItem; +pub(crate) mod NSTrackingArea; +pub(crate) mod NSTrackingSeparatorToolbarItem; +pub(crate) mod NSTreeController; +pub(crate) mod NSTreeNode; +pub(crate) mod NSTypesetter; +pub(crate) mod NSUserActivity; +pub(crate) mod NSUserDefaultsController; +pub(crate) mod NSUserInterfaceCompression; +pub(crate) mod NSUserInterfaceItemIdentification; +pub(crate) mod NSUserInterfaceItemSearching; +pub(crate) mod NSUserInterfaceLayout; +pub(crate) mod NSUserInterfaceValidation; +pub(crate) mod NSView; +pub(crate) mod NSViewController; +pub(crate) mod NSVisualEffectView; +pub(crate) mod NSWindow; +pub(crate) mod NSWindowController; +pub(crate) mod NSWindowRestoration; +pub(crate) mod NSWindowScripting; +pub(crate) mod NSWindowTab; +pub(crate) mod NSWindowTabGroup; +pub(crate) mod NSWorkspace; +mod __exported { + pub use super::NSATSTypesetter::NSATSTypesetter; + pub use super::NSAccessibilityConstants::{ + NSAccessibilityActionName, NSAccessibilityAnnotationAttributeKey, + NSAccessibilityAttributeName, NSAccessibilityFontAttributeKey, NSAccessibilityLoadingToken, + NSAccessibilityNotificationName, NSAccessibilityNotificationUserInfoKey, + NSAccessibilityOrientationValue, NSAccessibilityParameterizedAttributeName, + NSAccessibilityRole, NSAccessibilityRulerMarkerTypeValue, NSAccessibilityRulerUnitValue, + NSAccessibilitySortDirectionValue, NSAccessibilitySubrole, + }; + pub use super::NSAccessibilityCustomAction::NSAccessibilityCustomAction; + pub use super::NSAccessibilityCustomRotor::{ + NSAccessibilityCustomRotor, NSAccessibilityCustomRotorItemResult, + NSAccessibilityCustomRotorItemSearchDelegate, NSAccessibilityCustomRotorSearchParameters, + }; + pub use super::NSAccessibilityElement::NSAccessibilityElement; + pub use super::NSAccessibilityProtocols::{ + NSAccessibility, NSAccessibilityButton, NSAccessibilityCheckBox, + NSAccessibilityContainsTransientUI, NSAccessibilityElement, NSAccessibilityElementLoading, + NSAccessibilityGroup, NSAccessibilityImage, NSAccessibilityLayoutArea, + NSAccessibilityLayoutItem, NSAccessibilityList, NSAccessibilityNavigableStaticText, + NSAccessibilityOutline, NSAccessibilityProgressIndicator, NSAccessibilityRadioButton, + NSAccessibilityRow, NSAccessibilitySlider, NSAccessibilityStaticText, + NSAccessibilityStepper, NSAccessibilitySwitch, NSAccessibilityTable, + }; + pub use super::NSActionCell::NSActionCell; + pub use super::NSAlert::{NSAlert, NSAlertDelegate}; + pub use super::NSAlignmentFeedbackFilter::{ + NSAlignmentFeedbackFilter, NSAlignmentFeedbackToken, + }; + pub use super::NSAnimation::{ + NSAnimatablePropertyContainer, NSAnimatablePropertyKey, NSAnimation, NSAnimationDelegate, + NSViewAnimation, NSViewAnimationEffectName, NSViewAnimationKey, + }; + pub use super::NSAnimationContext::NSAnimationContext; + pub use super::NSAppearance::{NSAppearance, NSAppearanceCustomization, NSAppearanceName}; + pub use super::NSApplication::{ + NSAboutPanelOptionKey, NSApplication, NSApplicationDelegate, NSModalResponse, + NSServiceProviderName, NSServicesMenuRequestor, + }; + pub use super::NSArrayController::NSArrayController; + pub use super::NSAttributedString::{ + NSAttributedStringDocumentAttributeKey, NSAttributedStringDocumentReadingOptionKey, + NSAttributedStringDocumentType, NSTextEffectStyle, NSTextLayoutSectionKey, + }; + pub use super::NSBezierPath::NSBezierPath; + pub use super::NSBitmapImageRep::{NSBitmapImageRep, NSBitmapImageRepPropertyKey}; + pub use super::NSBox::NSBox; + pub use super::NSBrowser::{NSBrowser, NSBrowserColumnsAutosaveName, NSBrowserDelegate}; + pub use super::NSBrowserCell::NSBrowserCell; + pub use super::NSButton::NSButton; + pub use super::NSButtonCell::NSButtonCell; + pub use super::NSButtonTouchBarItem::NSButtonTouchBarItem; + pub use super::NSCIImageRep::NSCIImageRep; + pub use super::NSCachedImageRep::NSCachedImageRep; + pub use super::NSCandidateListTouchBarItem::{ + NSCandidateListTouchBarItem, NSCandidateListTouchBarItemDelegate, + }; + pub use super::NSCell::{NSCell, NSCellStateValue, NSControlStateValue}; + pub use super::NSClickGestureRecognizer::NSClickGestureRecognizer; + pub use super::NSClipView::NSClipView; + pub use super::NSCollectionView::{ + NSCollectionView, NSCollectionViewDataSource, NSCollectionViewDelegate, + NSCollectionViewElement, NSCollectionViewItem, NSCollectionViewPrefetching, + NSCollectionViewSectionHeaderView, NSCollectionViewSupplementaryElementKind, + }; + pub use super::NSCollectionViewCompositionalLayout::{ + NSCollectionLayoutAnchor, NSCollectionLayoutBoundarySupplementaryItem, + NSCollectionLayoutContainer, NSCollectionLayoutDecorationItem, NSCollectionLayoutDimension, + NSCollectionLayoutEdgeSpacing, NSCollectionLayoutEnvironment, NSCollectionLayoutGroup, + NSCollectionLayoutGroupCustomItem, NSCollectionLayoutItem, NSCollectionLayoutSection, + NSCollectionLayoutSize, NSCollectionLayoutSpacing, NSCollectionLayoutSupplementaryItem, + NSCollectionLayoutVisibleItem, NSCollectionViewCompositionalLayout, + NSCollectionViewCompositionalLayoutConfiguration, + }; + pub use super::NSCollectionViewFlowLayout::{ + NSCollectionViewDelegateFlowLayout, NSCollectionViewFlowLayout, + NSCollectionViewFlowLayoutInvalidationContext, + }; + pub use super::NSCollectionViewGridLayout::NSCollectionViewGridLayout; + pub use super::NSCollectionViewLayout::{ + NSCollectionViewDecorationElementKind, NSCollectionViewLayout, + NSCollectionViewLayoutAttributes, NSCollectionViewLayoutInvalidationContext, + NSCollectionViewUpdateItem, + }; + pub use super::NSCollectionViewTransitionLayout::{ + NSCollectionViewTransitionLayout, NSCollectionViewTransitionLayoutAnimatedKey, + }; + pub use super::NSColor::NSColor; + pub use super::NSColorList::{NSColorList, NSColorListName, NSColorName}; + pub use super::NSColorPanel::{NSColorChanging, NSColorPanel}; + pub use super::NSColorPicker::NSColorPicker; + pub use super::NSColorPickerTouchBarItem::NSColorPickerTouchBarItem; + pub use super::NSColorPicking::{NSColorPickingCustom, NSColorPickingDefault}; + pub use super::NSColorSampler::NSColorSampler; + pub use super::NSColorSpace::NSColorSpace; + pub use super::NSColorWell::NSColorWell; + pub use super::NSComboBox::{NSComboBox, NSComboBoxDataSource, NSComboBoxDelegate}; + pub use super::NSComboBoxCell::{NSComboBoxCell, NSComboBoxCellDataSource}; + pub use super::NSControl::{NSControl, NSControlTextEditingDelegate}; + pub use super::NSController::NSController; + pub use super::NSCursor::NSCursor; + pub use super::NSCustomImageRep::NSCustomImageRep; + pub use super::NSCustomTouchBarItem::NSCustomTouchBarItem; + pub use super::NSDataAsset::{NSDataAsset, NSDataAssetName}; + pub use super::NSDatePicker::NSDatePicker; + pub use super::NSDatePickerCell::{NSDatePickerCell, NSDatePickerCellDelegate}; + pub use super::NSDictionaryController::{ + NSDictionaryController, NSDictionaryControllerKeyValuePair, + }; + pub use super::NSDiffableDataSource::{ + NSCollectionViewDiffableDataSource, NSDiffableDataSourceSnapshot, + }; + pub use super::NSDockTile::{NSDockTile, NSDockTilePlugIn}; + pub use super::NSDocument::NSDocument; + pub use super::NSDocumentController::NSDocumentController; + pub use super::NSDragging::{ + NSDraggingDestination, NSDraggingInfo, NSDraggingSource, NSSpringLoadingDestination, + }; + pub use super::NSDraggingItem::{ + NSDraggingImageComponent, NSDraggingImageComponentKey, NSDraggingItem, + }; + pub use super::NSDraggingSession::NSDraggingSession; + pub use super::NSDrawer::{NSDrawer, NSDrawerDelegate}; + pub use super::NSEPSImageRep::NSEPSImageRep; + pub use super::NSEvent::NSEvent; + pub use super::NSFilePromiseProvider::{NSFilePromiseProvider, NSFilePromiseProviderDelegate}; + pub use super::NSFilePromiseReceiver::NSFilePromiseReceiver; + pub use super::NSFont::NSFont; + pub use super::NSFontAssetRequest::NSFontAssetRequest; + pub use super::NSFontCollection::{ + NSFontCollection, NSFontCollectionActionTypeKey, NSFontCollectionMatchingOptionKey, + NSFontCollectionName, NSFontCollectionUserInfoKey, NSMutableFontCollection, + }; + pub use super::NSFontDescriptor::{ + NSFontDescriptor, NSFontDescriptorAttributeName, NSFontDescriptorFeatureKey, + NSFontDescriptorSystemDesign, NSFontDescriptorTraitKey, NSFontDescriptorVariationKey, + NSFontFamilyClass, NSFontSymbolicTraits, NSFontTextStyle, NSFontTextStyleOptionKey, + NSFontWeight, + }; + pub use super::NSFontManager::NSFontManager; + pub use super::NSFontPanel::{NSFontChanging, NSFontPanel}; + pub use super::NSForm::NSForm; + pub use super::NSFormCell::NSFormCell; + pub use super::NSGestureRecognizer::{NSGestureRecognizer, NSGestureRecognizerDelegate}; + pub use super::NSGlyphGenerator::{NSGlyphGenerator, NSGlyphStorage}; + pub use super::NSGlyphInfo::NSGlyphInfo; + pub use super::NSGradient::NSGradient; + pub use super::NSGraphics::{NSColorSpaceName, NSDeviceDescriptionKey}; + pub use super::NSGraphicsContext::{ + NSGraphicsContext, NSGraphicsContextAttributeKey, NSGraphicsContextRepresentationFormatName, + }; + pub use super::NSGridView::{NSGridCell, NSGridColumn, NSGridRow, NSGridView}; + pub use super::NSGroupTouchBarItem::NSGroupTouchBarItem; + pub use super::NSHapticFeedback::{NSHapticFeedbackManager, NSHapticFeedbackPerformer}; + pub use super::NSHelpManager::{ + NSHelpAnchorName, NSHelpBookName, NSHelpManager, NSHelpManagerContextHelpKey, + }; + pub use super::NSImage::{NSImage, NSImageDelegate, NSImageName, NSImageSymbolConfiguration}; + pub use super::NSImageCell::NSImageCell; + pub use super::NSImageRep::{NSImageHintKey, NSImageRep}; + pub use super::NSImageView::NSImageView; + pub use super::NSInputManager::{NSInputManager, NSTextInput}; + pub use super::NSInputServer::{ + NSInputServer, NSInputServerMouseTracker, NSInputServiceProvider, + }; + pub use super::NSInterfaceStyle::NSInterfaceStyle; + pub use super::NSKeyValueBinding::{ + NSBindingInfoKey, NSBindingName, NSBindingOption, NSBindingSelectionMarker, NSEditor, + NSEditorRegistration, + }; + pub use super::NSLayoutAnchor::{ + NSLayoutAnchor, NSLayoutDimension, NSLayoutXAxisAnchor, NSLayoutYAxisAnchor, + }; + pub use super::NSLayoutConstraint::NSLayoutConstraint; + pub use super::NSLayoutGuide::NSLayoutGuide; + pub use super::NSLayoutManager::{ + NSLayoutManager, NSLayoutManagerDelegate, NSTextLayoutOrientationProvider, + }; + pub use super::NSLevelIndicator::NSLevelIndicator; + pub use super::NSLevelIndicatorCell::NSLevelIndicatorCell; + pub use super::NSMagnificationGestureRecognizer::NSMagnificationGestureRecognizer; + pub use super::NSMatrix::{NSMatrix, NSMatrixDelegate}; + pub use super::NSMediaLibraryBrowserController::NSMediaLibraryBrowserController; + pub use super::NSMenu::{NSMenu, NSMenuDelegate, NSMenuItemValidation}; + pub use super::NSMenuItem::NSMenuItem; + pub use super::NSMenuItemCell::NSMenuItemCell; + pub use super::NSMenuToolbarItem::NSMenuToolbarItem; + pub use super::NSMovie::NSMovie; + pub use super::NSNib::{NSNib, NSNibName}; + pub use super::NSObjectController::NSObjectController; + pub use super::NSOpenGL::{ + NSOpenGLContext, NSOpenGLPixelBuffer, NSOpenGLPixelFormat, NSOpenGLPixelFormatAttribute, + }; + pub use super::NSOpenGLLayer::NSOpenGLLayer; + pub use super::NSOpenGLView::NSOpenGLView; + pub use super::NSOpenPanel::NSOpenPanel; + pub use super::NSOutlineView::{NSOutlineView, NSOutlineViewDataSource, NSOutlineViewDelegate}; + pub use super::NSPDFImageRep::NSPDFImageRep; + pub use super::NSPDFInfo::NSPDFInfo; + pub use super::NSPDFPanel::NSPDFPanel; + pub use super::NSPICTImageRep::NSPICTImageRep; + pub use super::NSPageController::{ + NSPageController, NSPageControllerDelegate, NSPageControllerObjectIdentifier, + }; + pub use super::NSPageLayout::NSPageLayout; + pub use super::NSPanGestureRecognizer::NSPanGestureRecognizer; + pub use super::NSPanel::NSPanel; + pub use super::NSParagraphStyle::{ + NSMutableParagraphStyle, NSParagraphStyle, NSTextTab, NSTextTabOptionKey, + }; + pub use super::NSPasteboard::{ + NSPasteboard, NSPasteboardName, NSPasteboardReading, NSPasteboardReadingOptionKey, + NSPasteboardType, NSPasteboardTypeOwner, NSPasteboardWriting, + }; + pub use super::NSPasteboardItem::{NSPasteboardItem, NSPasteboardItemDataProvider}; + pub use super::NSPathCell::{NSPathCell, NSPathCellDelegate}; + pub use super::NSPathComponentCell::NSPathComponentCell; + pub use super::NSPathControl::{NSPathControl, NSPathControlDelegate}; + pub use super::NSPathControlItem::NSPathControlItem; + pub use super::NSPersistentDocument::NSPersistentDocument; + pub use super::NSPickerTouchBarItem::NSPickerTouchBarItem; + pub use super::NSPopUpButton::NSPopUpButton; + pub use super::NSPopUpButtonCell::NSPopUpButtonCell; + pub use super::NSPopover::{NSPopover, NSPopoverCloseReasonValue, NSPopoverDelegate}; + pub use super::NSPopoverTouchBarItem::NSPopoverTouchBarItem; + pub use super::NSPredicateEditor::NSPredicateEditor; + pub use super::NSPredicateEditorRowTemplate::NSPredicateEditorRowTemplate; + pub use super::NSPressGestureRecognizer::NSPressGestureRecognizer; + pub use super::NSPressureConfiguration::NSPressureConfiguration; + pub use super::NSPrintInfo::{ + NSPrintInfo, NSPrintInfoAttributeKey, NSPrintInfoSettingKey, NSPrintJobDispositionValue, + }; + pub use super::NSPrintOperation::NSPrintOperation; + pub use super::NSPrintPanel::{ + NSPrintPanel, NSPrintPanelAccessorizing, NSPrintPanelAccessorySummaryKey, + NSPrintPanelJobStyleHint, + }; + pub use super::NSPrinter::{NSPrinter, NSPrinterPaperName, NSPrinterTypeName}; + pub use super::NSProgressIndicator::NSProgressIndicator; + pub use super::NSResponder::{NSResponder, NSStandardKeyBindingResponding}; + pub use super::NSRotationGestureRecognizer::NSRotationGestureRecognizer; + pub use super::NSRuleEditor::{ + NSRuleEditor, NSRuleEditorDelegate, NSRuleEditorPredicatePartKey, + }; + pub use super::NSRulerMarker::NSRulerMarker; + pub use super::NSRulerView::{NSRulerView, NSRulerViewUnitName}; + pub use super::NSRunningApplication::NSRunningApplication; + pub use super::NSSavePanel::{NSOpenSavePanelDelegate, NSSavePanel}; + pub use super::NSScreen::NSScreen; + pub use super::NSScrollView::NSScrollView; + pub use super::NSScroller::NSScroller; + pub use super::NSScrubber::{ + NSScrubber, NSScrubberDataSource, NSScrubberDelegate, NSScrubberSelectionStyle, + }; + pub use super::NSScrubberItemView::{ + NSScrubberArrangedView, NSScrubberImageItemView, NSScrubberItemView, + NSScrubberSelectionView, NSScrubberTextItemView, + }; + pub use super::NSScrubberLayout::{ + NSScrubberFlowLayout, NSScrubberFlowLayoutDelegate, NSScrubberLayout, + NSScrubberLayoutAttributes, NSScrubberProportionalLayout, + }; + pub use super::NSSearchField::{ + NSSearchField, NSSearchFieldDelegate, NSSearchFieldRecentsAutosaveName, + }; + pub use super::NSSearchFieldCell::NSSearchFieldCell; + pub use super::NSSearchToolbarItem::NSSearchToolbarItem; + pub use super::NSSecureTextField::{NSSecureTextField, NSSecureTextFieldCell}; + pub use super::NSSegmentedCell::NSSegmentedCell; + pub use super::NSSegmentedControl::NSSegmentedControl; + pub use super::NSShadow::NSShadow; + pub use super::NSSharingService::{ + NSCloudSharingServiceDelegate, NSSharingService, NSSharingServiceDelegate, + NSSharingServiceName, NSSharingServicePicker, NSSharingServicePickerDelegate, + }; + pub use super::NSSharingServicePickerToolbarItem::{ + NSSharingServicePickerToolbarItem, NSSharingServicePickerToolbarItemDelegate, + }; + pub use super::NSSharingServicePickerTouchBarItem::{ + NSSharingServicePickerTouchBarItem, NSSharingServicePickerTouchBarItemDelegate, + }; + pub use super::NSSlider::NSSlider; + pub use super::NSSliderAccessory::{NSSliderAccessory, NSSliderAccessoryBehavior}; + pub use super::NSSliderCell::NSSliderCell; + pub use super::NSSliderTouchBarItem::{NSSliderAccessoryWidth, NSSliderTouchBarItem}; + pub use super::NSSound::{ + NSSound, NSSoundDelegate, NSSoundName, NSSoundPlaybackDeviceIdentifier, + }; + pub use super::NSSpeechRecognizer::{NSSpeechRecognizer, NSSpeechRecognizerDelegate}; + pub use super::NSSpeechSynthesizer::{ + NSSpeechCommandDelimiterKey, NSSpeechDictionaryKey, NSSpeechErrorKey, NSSpeechMode, + NSSpeechPhonemeInfoKey, NSSpeechPropertyKey, NSSpeechStatusKey, NSSpeechSynthesizer, + NSSpeechSynthesizerDelegate, NSSpeechSynthesizerInfoKey, NSSpeechSynthesizerVoiceName, + NSVoiceAttributeKey, NSVoiceGenderName, + }; + pub use super::NSSpellChecker::{NSSpellChecker, NSTextCheckingOptionKey}; + pub use super::NSSpellProtocol::{NSChangeSpelling, NSIgnoreMisspelledWords}; + pub use super::NSSplitView::{NSSplitView, NSSplitViewAutosaveName, NSSplitViewDelegate}; + pub use super::NSSplitViewController::NSSplitViewController; + pub use super::NSSplitViewItem::NSSplitViewItem; + pub use super::NSStackView::{NSStackView, NSStackViewDelegate}; + pub use super::NSStatusBar::NSStatusBar; + pub use super::NSStatusBarButton::NSStatusBarButton; + pub use super::NSStatusItem::{NSStatusItem, NSStatusItemAutosaveName}; + pub use super::NSStepper::NSStepper; + pub use super::NSStepperCell::NSStepperCell; + pub use super::NSStepperTouchBarItem::NSStepperTouchBarItem; + pub use super::NSStoryboard::{NSStoryboard, NSStoryboardName, NSStoryboardSceneIdentifier}; + pub use super::NSStoryboardSegue::{ + NSSeguePerforming, NSStoryboardSegue, NSStoryboardSegueIdentifier, + }; + pub use super::NSStringDrawing::NSStringDrawingContext; + pub use super::NSSwitch::NSSwitch; + pub use super::NSTabView::{NSTabView, NSTabViewDelegate}; + pub use super::NSTabViewController::NSTabViewController; + pub use super::NSTabViewItem::NSTabViewItem; + pub use super::NSTableCellView::NSTableCellView; + pub use super::NSTableColumn::NSTableColumn; + pub use super::NSTableHeaderCell::NSTableHeaderCell; + pub use super::NSTableHeaderView::NSTableHeaderView; + pub use super::NSTableRowView::NSTableRowView; + pub use super::NSTableView::{ + NSTableView, NSTableViewAutosaveName, NSTableViewDataSource, NSTableViewDelegate, + }; + pub use super::NSTableViewDiffableDataSource::NSTableViewDiffableDataSource; + pub use super::NSTableViewRowAction::NSTableViewRowAction; + pub use super::NSText::{NSText, NSTextDelegate}; + pub use super::NSTextAlternatives::NSTextAlternatives; + pub use super::NSTextAttachment::{ + NSTextAttachment, NSTextAttachmentContainer, NSTextAttachmentLayout, + NSTextAttachmentViewProvider, + }; + pub use super::NSTextAttachmentCell::NSTextAttachmentCell; + pub use super::NSTextCheckingClient::{NSTextCheckingClient, NSTextInputTraits}; + pub use super::NSTextCheckingController::NSTextCheckingController; + pub use super::NSTextContainer::NSTextContainer; + pub use super::NSTextContent::{NSTextContent, NSTextContentType}; + pub use super::NSTextContentManager::{ + NSTextContentManager, NSTextContentManagerDelegate, NSTextContentStorage, + NSTextContentStorageDelegate, NSTextElementProvider, + }; + pub use super::NSTextElement::{NSTextElement, NSTextParagraph}; + pub use super::NSTextField::{NSTextField, NSTextFieldDelegate}; + pub use super::NSTextFieldCell::NSTextFieldCell; + pub use super::NSTextFinder::{ + NSPasteboardTypeTextFinderOptionKey, NSTextFinder, NSTextFinderBarContainer, + NSTextFinderClient, + }; + pub use super::NSTextInputClient::NSTextInputClient; + pub use super::NSTextInputContext::{NSTextInputContext, NSTextInputSourceIdentifier}; + pub use super::NSTextLayoutFragment::NSTextLayoutFragment; + pub use super::NSTextLayoutManager::{NSTextLayoutManager, NSTextLayoutManagerDelegate}; + pub use super::NSTextLineFragment::NSTextLineFragment; + pub use super::NSTextList::{NSTextList, NSTextListMarkerFormat}; + pub use super::NSTextRange::{NSTextLocation, NSTextRange}; + pub use super::NSTextSelection::NSTextSelection; + pub use super::NSTextSelectionNavigation::{ + NSTextSelectionDataSource, NSTextSelectionNavigation, + }; + pub use super::NSTextStorage::{ + NSTextStorage, NSTextStorageDelegate, NSTextStorageEditedOptions, NSTextStorageObserving, + }; + pub use super::NSTextTable::{NSTextBlock, NSTextTable, NSTextTableBlock}; + pub use super::NSTextView::{ + NSPasteboardTypeFindPanelSearchOptionKey, NSTextView, NSTextViewDelegate, + }; + pub use super::NSTextViewportLayoutController::{ + NSTextViewportLayoutController, NSTextViewportLayoutControllerDelegate, + }; + pub use super::NSTintConfiguration::NSTintConfiguration; + pub use super::NSTitlebarAccessoryViewController::NSTitlebarAccessoryViewController; + pub use super::NSTokenField::{NSTokenField, NSTokenFieldDelegate}; + pub use super::NSTokenFieldCell::{NSTokenFieldCell, NSTokenFieldCellDelegate}; + pub use super::NSToolbar::{ + NSToolbar, NSToolbarDelegate, NSToolbarIdentifier, NSToolbarItemIdentifier, + }; + pub use super::NSToolbarItem::{ + NSCloudSharingValidation, NSToolbarItem, NSToolbarItemValidation, + NSToolbarItemVisibilityPriority, + }; + pub use super::NSToolbarItemGroup::NSToolbarItemGroup; + pub use super::NSTouch::NSTouch; + pub use super::NSTouchBar::{ + NSTouchBar, NSTouchBarCustomizationIdentifier, NSTouchBarDelegate, NSTouchBarProvider, + }; + pub use super::NSTouchBarItem::{NSTouchBarItem, NSTouchBarItemIdentifier}; + pub use super::NSTrackingArea::NSTrackingArea; + pub use super::NSTrackingSeparatorToolbarItem::NSTrackingSeparatorToolbarItem; + pub use super::NSTreeController::NSTreeController; + pub use super::NSTreeNode::NSTreeNode; + pub use super::NSTypesetter::NSTypesetter; + pub use super::NSUserActivity::NSUserActivityRestoring; + pub use super::NSUserDefaultsController::NSUserDefaultsController; + pub use super::NSUserInterfaceCompression::{ + NSUserInterfaceCompression, NSUserInterfaceCompressionOptions, + }; + pub use super::NSUserInterfaceItemIdentification::{ + NSUserInterfaceItemIdentification, NSUserInterfaceItemIdentifier, + }; + pub use super::NSUserInterfaceItemSearching::NSUserInterfaceItemSearching; + pub use super::NSUserInterfaceValidation::{ + NSUserInterfaceValidations, NSValidatedUserInterfaceItem, + }; + pub use super::NSView::{ + NSDefinitionOptionKey, NSDefinitionPresentationType, NSToolTipTag, NSTrackingRectTag, + NSView, NSViewFullScreenModeOptionKey, NSViewLayerContentScaleDelegate, NSViewToolTipOwner, + }; + pub use super::NSViewController::{NSViewController, NSViewControllerPresentationAnimator}; + pub use super::NSVisualEffectView::NSVisualEffectView; + pub use super::NSWindow::{ + NSWindow, NSWindowDelegate, NSWindowFrameAutosaveName, NSWindowLevel, + NSWindowPersistableFrameDescriptor, NSWindowTabbingIdentifier, + }; + pub use super::NSWindowController::NSWindowController; + pub use super::NSWindowRestoration::NSWindowRestoration; + pub use super::NSWindowTab::NSWindowTab; + pub use super::NSWindowTabGroup::NSWindowTabGroup; + pub use super::NSWorkspace::{ + NSWorkspace, NSWorkspaceAuthorization, NSWorkspaceDesktopImageOptionKey, + NSWorkspaceFileOperationName, NSWorkspaceLaunchConfigurationKey, + NSWorkspaceOpenConfiguration, + }; +} From f2585f18fed9e06c9eb00491bb83a72b22448c58 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 9 Oct 2022 03:55:24 +0200 Subject: [PATCH 068/131] Speed things up by optionally formatting at the end instead --- crates/header-translator/src/lib.rs | 4 ++-- crates/header-translator/src/main.rs | 32 ++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index f1e04dc84..3f1234313 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -88,9 +88,9 @@ pub fn format_method_macro(code: &[u8]) -> Vec { .to_vec() } -pub fn run_cargo_fmt() { +pub fn run_cargo_fmt(package: &str) { let status = Command::new("cargo") - .args(["fmt", "--package=icrate"]) + .args(["fmt", "--package", package]) .current_dir(Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap()) .status() .expect("failed running cargo fmt"); diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 05e603cae..e6b705d67 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,12 +1,14 @@ use std::collections::{BTreeMap, HashMap}; use std::fs; -use std::io; +use std::io::{self, Write}; use std::path::Path; use clang::{Clang, EntityVisitResult, Index}; use quote::{format_ident, quote}; -use header_translator::{run_rustfmt, Config, RustFile, Stmt}; +use header_translator::{format_method_macro, run_cargo_fmt, run_rustfmt, Config, RustFile, Stmt}; + +const FORMAT_INCREMENTALLY: bool = false; fn main() { let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR")); @@ -31,6 +33,7 @@ fn main() { "-x", "objective-c", "-fobjc-arc", + "--target=x86_64-apple-macos", "-fobjc-abi-version=2", // 3?? // "-mmacosx-version-min=" "-fparse-all-comments", @@ -148,7 +151,15 @@ fn main() { let mut path = output_path.join(&name); path.set_extension("rs"); - fs::write(&path, run_rustfmt(tokens)).unwrap(); + let output = if FORMAT_INCREMENTALLY { + run_rustfmt(tokens) + } else { + let mut buf = Vec::new(); + write!(buf, "{}", tokens).unwrap(); + format_method_macro(&buf) + }; + + fs::write(&path, output).unwrap(); (format_ident!("{}", name), declared_types) }) @@ -172,9 +183,22 @@ fn main() { } }; + let output = if FORMAT_INCREMENTALLY { + run_rustfmt(tokens) + } else { + let mut buf = Vec::new(); + write!(buf, "{}", tokens).unwrap(); + buf + }; + // truncate if the file exists - fs::write(output_path.join("mod.rs"), run_rustfmt(tokens)).unwrap(); + fs::write(output_path.join("mod.rs"), output).unwrap(); println!("status: written framework {library}"); } + + if !FORMAT_INCREMENTALLY { + println!("status: formatting"); + run_cargo_fmt("icrate"); + } } From 9cbb09eb449b9ed61d2dabd35eca9fec892f5cde Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 10 Oct 2022 00:58:03 +0200 Subject: [PATCH 069/131] Prepare for parsing more than one SDK --- crates/header-translator/Cargo.toml | 1 + crates/header-translator/src/main.rs | 229 ++++++++++++++++----------- 2 files changed, 136 insertions(+), 94 deletions(-) diff --git a/crates/header-translator/Cargo.toml b/crates/header-translator/Cargo.toml index 743379fa1..2eb1dac3a 100644 --- a/crates/header-translator/Cargo.toml +++ b/crates/header-translator/Cargo.toml @@ -16,3 +16,4 @@ toml = "0.5.9" serde = { version = "1.0.144", features = ["derive"] } regex = { version = "1.6" } lazy_static = { version = "1.4.0" } +apple-sdk = { version = "0.2.0" } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index e6b705d67..7b8d332e1 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,8 +1,9 @@ -use std::collections::{BTreeMap, HashMap}; +use std::collections::BTreeMap; use std::fs; use std::io::{self, Write}; use std::path::Path; +use apple_sdk::{Platform, SdkPath}; use clang::{Clang, EntityVisitResult, Index}; use quote::{format_ident, quote}; @@ -15,36 +16,106 @@ fn main() { let workspace_dir = manifest_dir.parent().unwrap(); let crate_src = workspace_dir.join("icrate/src"); - // let sysroot = Path::new("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"); - let sysroot = workspace_dir.join("ideas/MacOSX-SDK-changes/MacOSXA.B.C.sdk"); - let framework_dir = sysroot.join("System/Library/Frameworks"); + println!("status: loading configs..."); + let configs = load_configs(&crate_src); + println!("status: loaded {} configs", configs.len()); let clang = Clang::new().unwrap(); let index = Index::new(&clang, true, true); + + let mut result = None; + + // TODO: Parse multiple SDKs, and compare + for path in [ + workspace_dir.join("ideas/MacOSX-SDK-changes/MacOSXA.B.C.sdk"), + // Path::new("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"), + ] { + let sdk = SdkPath::from_path(path).expect("sdk from path"); + println!("status: parsing {:?}...", sdk.platform); + result = Some(parse(&index, &configs, &sdk)); + println!("status: done parsing {:?}", sdk.platform); + } + + for (library, files) in result.unwrap() { + println!("status: writing framework {library}..."); + let output_path = crate_src.join("generated").join(&library); + output_files(&output_path, files, FORMAT_INCREMENTALLY); + println!("status: written framework {library}"); + } + + if !FORMAT_INCREMENTALLY { + println!("status: formatting"); + run_cargo_fmt("icrate"); + } +} + +fn load_configs(crate_src: &Path) -> BTreeMap { + crate_src + .read_dir() + .expect("read_dir") + .filter_map(|dir| { + let dir = dir.expect("dir"); + if !dir.file_type().expect("file type").is_dir() { + return None; + } + let path = dir.path(); + let file = path.join("translation-config.toml"); + match Config::from_file(&file) { + Ok(config) => Some(( + path.file_name() + .expect("framework name") + .to_string_lossy() + .to_string(), + config, + )), + Err(err) if err.kind() == io::ErrorKind::NotFound => None, + Err(err) => panic!("{file:?}: {err}"), + } + }) + .collect() +} + +fn parse( + index: &Index<'_>, + configs: &BTreeMap, + sdk: &SdkPath, +) -> BTreeMap> { + let (target, version_min) = match &sdk.platform { + Platform::MacOsX => ("--target=x86_64-apple-macos", "-mmacosx-version-min=10.14"), + Platform::IPhoneOs => ("--target=x86_64-apple-ios", "-miphoneos-version-min=10.14"), + _ => ("--target=x86_64-apple-macos", "-mmacosx-version-min=10.14"), + }; + let tu = index - .parser(&manifest_dir.join("framework-includes.h")) + .parser(&Path::new(env!("CARGO_MANIFEST_DIR")).join("framework-includes.h")) .detailed_preprocessing_record(true) - // .single_file_parse(true) + .incomplete(true) .skip_function_bodies(true) + .keep_going(true) + // .single_file_parse(true) .include_attributed_types(true) .visit_implicit_attributes(true) + // .ignore_non_errors_from_included_files(true) .retain_excluded_conditional_blocks(true) .arguments(&[ "-x", "objective-c", + target, + "-Wall", + "-Wextra", "-fobjc-arc", - "--target=x86_64-apple-macos", + "-fobjc-arc-exceptions", "-fobjc-abi-version=2", // 3?? - // "-mmacosx-version-min=" - "-fparse-all-comments", - // "-fapinotes", + // "-fparse-all-comments", + "-fapinotes", + version_min, "-isysroot", - sysroot.to_str().unwrap(), + sdk.path.to_str().unwrap(), ]) .parse() .unwrap(); - println!("status: initialized clang"); + println!("status: initialized translation unit {:?}", sdk.platform); dbg!(&tu); dbg!(tu.get_target()); @@ -72,34 +143,9 @@ fn main() { dbg!(&entity); dbg!(entity.get_availability()); - let configs: HashMap = crate_src - .read_dir() - .expect("read_dir") - .filter_map(|dir| { - let dir = dir.expect("dir"); - if !dir.file_type().expect("file type").is_dir() { - return None; - } - let path = dir.path(); - let file = path.join("translation-config.toml"); - match Config::from_file(&file) { - Ok(config) => Some(( - path.file_name() - .expect("framework name") - .to_string_lossy() - .to_string(), - config, - )), - Err(err) if err.kind() == io::ErrorKind::NotFound => None, - Err(err) => panic!("{file:?}: {err}"), - } - }) - .collect(); - - println!("status: loaded {} configs", configs.len()); - - let mut result: HashMap> = HashMap::new(); + let mut result: BTreeMap> = BTreeMap::new(); + let framework_dir = sdk.path.join("System/Library/Frameworks"); entity.visit_children(|entity, _parent| { if let Some(location) = entity.get_location() { if let Some(file) = location.get_file_location().file { @@ -138,67 +184,62 @@ fn main() { EntityVisitResult::Continue }); - println!("status: loaded data"); - - for (library, files) in result.into_iter() { - let output_path = crate_src.join("generated").join(&library); + result +} - let declared: Vec<_> = files - .into_iter() - .map(|(name, file)| { - let (declared_types, tokens) = file.finish(); - - let mut path = output_path.join(&name); - path.set_extension("rs"); - - let output = if FORMAT_INCREMENTALLY { - run_rustfmt(tokens) - } else { - let mut buf = Vec::new(); - write!(buf, "{}", tokens).unwrap(); - format_method_macro(&buf) - }; - - fs::write(&path, output).unwrap(); - - (format_ident!("{}", name), declared_types) - }) - .collect(); - - let mod_names = declared.iter().map(|(name, _)| name); - let mod_imports = declared.iter().filter_map(|(name, declared_types)| { - if !declared_types.is_empty() { - let declared_types = declared_types.iter().map(|name| format_ident!("{}", name)); - Some(quote!(super::#name::{#(#declared_types,)*})) +fn output_files( + output_path: &Path, + files: impl IntoIterator, + format_incrementally: bool, +) { + let declared: Vec<_> = files + .into_iter() + .map(|(name, file)| { + let (declared_types, tokens) = file.finish(); + + let mut path = output_path.join(&name); + path.set_extension("rs"); + + let output = if format_incrementally { + run_rustfmt(tokens) } else { - None - } - }); + let mut buf = Vec::new(); + write!(buf, "{}", tokens).unwrap(); + format_method_macro(&buf) + }; - let tokens = quote! { - #(pub(crate) mod #mod_names;)* + fs::write(&path, output).unwrap(); - mod __exported { - #(pub use #mod_imports;)* - } - }; + (format_ident!("{}", name), declared_types) + }) + .collect(); - let output = if FORMAT_INCREMENTALLY { - run_rustfmt(tokens) + let mod_names = declared.iter().map(|(name, _)| name); + let mod_imports = declared.iter().filter_map(|(name, declared_types)| { + if !declared_types.is_empty() { + let declared_types = declared_types.iter().map(|name| format_ident!("{}", name)); + Some(quote!(super::#name::{#(#declared_types,)*})) } else { - let mut buf = Vec::new(); - write!(buf, "{}", tokens).unwrap(); - buf - }; - - // truncate if the file exists - fs::write(output_path.join("mod.rs"), output).unwrap(); + None + } + }); - println!("status: written framework {library}"); - } + let tokens = quote! { + #(pub(crate) mod #mod_names;)* - if !FORMAT_INCREMENTALLY { - println!("status: formatting"); - run_cargo_fmt("icrate"); - } + mod __exported { + #(pub use #mod_imports;)* + } + }; + + let output = if format_incrementally { + run_rustfmt(tokens) + } else { + let mut buf = Vec::new(); + write!(buf, "{}", tokens).unwrap(); + buf + }; + + // truncate if the file exists + fs::write(output_path.join("mod.rs"), output).unwrap(); } From 2d12042ae7e9c8f31da0dde5c641b2688747cc7e Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 10 Oct 2022 02:17:22 +0200 Subject: [PATCH 070/131] Specify a minimum deployment target --- crates/header-translator/src/main.rs | 6 +++--- crates/icrate/src/generated/AppKit/NSPopover.rs | 8 +++----- crates/icrate/src/generated/Foundation/NSOperation.rs | 6 +++--- crates/icrate/src/generated/Foundation/NSXPCConnection.rs | 6 +++--- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 7b8d332e1..f47ac369e 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -81,9 +81,9 @@ fn parse( sdk: &SdkPath, ) -> BTreeMap> { let (target, version_min) = match &sdk.platform { - Platform::MacOsX => ("--target=x86_64-apple-macos", "-mmacosx-version-min=10.14"), - Platform::IPhoneOs => ("--target=x86_64-apple-ios", "-miphoneos-version-min=10.14"), - _ => ("--target=x86_64-apple-macos", "-mmacosx-version-min=10.14"), + Platform::MacOsX => ("--target=x86_64-apple-macos", "-mmacosx-version-min=10.7"), + Platform::IPhoneOs => ("--target=x86_64-apple-ios", "-miphoneos-version-min=7.0"), + _ => ("--target=x86_64-apple-macos", "-mmacosx-version-min=10.7"), }; let tu = index diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index c08cd2ead..c7d61777f 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -30,12 +30,10 @@ extern_methods!( pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSPopoverDelegate>); - #[method_id(appearance)] - pub unsafe fn appearance(&self) -> Option>; + #[method(appearance)] + pub unsafe fn appearance(&self) -> NSPopoverAppearance; #[method(setAppearance:)] - pub unsafe fn setAppearance(&self, appearance: Option<&NSAppearance>); - #[method_id(effectiveAppearance)] - pub unsafe fn effectiveAppearance(&self) -> Id; + pub unsafe fn setAppearance(&self, appearance: NSPopoverAppearance); #[method(behavior)] pub unsafe fn behavior(&self) -> NSPopoverBehavior; #[method(setBehavior:)] diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index da4bf4320..28127b016 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -144,10 +144,10 @@ extern_methods!( pub unsafe fn qualityOfService(&self) -> NSQualityOfService; #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); - #[method_id(underlyingQueue)] - pub unsafe fn underlyingQueue(&self) -> Option>; + #[method(underlyingQueue)] + pub unsafe fn underlyingQueue(&self) -> dispatch_queue_t; #[method(setUnderlyingQueue:)] - pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: Option<&dispatch_queue_t>); + pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: dispatch_queue_t); #[method(cancelAllOperations)] pub unsafe fn cancelAllOperations(&self); #[method(waitUntilAllOperationsAreFinished)] diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index b22613ea9..2643b799c 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -208,13 +208,13 @@ extern_class!( extern_methods!( unsafe impl NSXPCCoder { #[method(encodeXPCObject:forKey:)] - pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: &xpc_object_t, key: &NSString); - #[method_id(decodeXPCObjectOfType:forKey:)] + pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: xpc_object_t, key: &NSString); + #[method(decodeXPCObjectOfType:forKey:)] pub unsafe fn decodeXPCObjectOfType_forKey( &self, type_: xpc_type_t, key: &NSString, - ) -> Option>; + ) -> xpc_object_t; #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; #[method(setUserInfo:)] From 5b2cf144da8d293c84052a8081915ee11b0312ab Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 10 Oct 2022 02:26:57 +0200 Subject: [PATCH 071/131] Document SDK situation --- crates/header-translator/README.md | 38 +++++++++++++++++++ crates/icrate/README.md | 11 ++++++ .../src/Foundation/translation-config.toml | 4 ++ .../src/generated/Foundation/NSBundle.rs | 7 ---- 4 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 crates/header-translator/README.md diff --git a/crates/header-translator/README.md b/crates/header-translator/README.md new file mode 100644 index 000000000..0a18956e7 --- /dev/null +++ b/crates/header-translator/README.md @@ -0,0 +1,38 @@ +# Objective-C header translator + +For use in making `icrate`. + +```console +cargo run --bin header-translator -- /Applications/Xcode.app/Contents/Developer +``` + +## SDKs + +We do not redistribute the relevant SDKs, to hopefully avoid a license violation. You can download the SDKs yourself (they're bundled in XCode) from [Apple's website](https://developer.apple.com/download/all/?q=xcode) (requires an Apple ID). + +The following diffs are applied to silence warnings when compiling the headers using `clang 11.0.0`: + +```diff +--- a/XYZ.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSBundle.h ++++ b/XYZ.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSBundle.h +@@ -88,7 +88,7 @@ NS_ASSUME_NONNULL_BEGIN + + /* Methods for retrieving localized strings. */ + - (NSString *)localizedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1); +-- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); ++- (NSString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); + + /* Methods for obtaining various information about a bundle. */ + @property (nullable, readonly, copy) NSString *bundleIdentifier; +--- a/XYZ.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h ++++ b/XYZ.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h +@@ -497,7 +497,7 @@ API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) + * If an error occurs, any outstanding reads will also fail, and new + * read requests will error out immediately. + */ +-- (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler; ++- (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable data, BOOL atEOF, NSError * _Nullable error))completionHandler; + + /* Write the data completely to the underlying socket. If all the + * bytes have not been written by the timeout, a timeout error will +``` diff --git a/crates/icrate/README.md b/crates/icrate/README.md index 431f73ea4..3b5632360 100644 --- a/crates/icrate/README.md +++ b/crates/icrate/README.md @@ -6,3 +6,14 @@ [![CI](https://github.com/madsmtm/objc2/actions/workflows/ci.yml/badge.svg)](https://github.com/madsmtm/objc2/actions/workflows/ci.yml) Rust bindings to Apple's frameworks. + +These are automatically generated from the SDKs in Xcode 14.0.1 (will be periodically updated). + +Currently supports: +- macOS: `7.0-12.3` +- iOS/iPadOS: `7.0-16.0` (WIP) +- tvOS: `9.0-16.0` (WIP) +- watchOS: `1.0-9.0` (WIP) + +This crate is part of the [`objc2` project](https://github.com/madsmtm/objc2), +see that for related crates. diff --git a/crates/icrate/src/Foundation/translation-config.toml b/crates/icrate/src/Foundation/translation-config.toml index 0294540a7..b79976127 100644 --- a/crates/icrate/src/Foundation/translation-config.toml +++ b/crates/icrate/src/Foundation/translation-config.toml @@ -47,3 +47,7 @@ propertyListFromData_mutabilityOption_format_errorDescription = { skipped = true skipped = true [class.NSPropertyListSerialization.methods.writePropertyList_toStream_format_options_error] skipped = true + +# Not supported on clang 11.0.0 +[class.NSBundle.methods.localizedAttributedStringForKey_value_table] +skipped = true diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index b878680a5..821600eb7 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -191,13 +191,6 @@ extern_methods!( value: Option<&NSString>, tableName: Option<&NSString>, ) -> Id; - #[method_id(localizedAttributedStringForKey:value:table:)] - pub unsafe fn localizedAttributedStringForKey_value_table( - &self, - key: &NSString, - value: Option<&NSString>, - tableName: Option<&NSString>, - ) -> Id; #[method_id(bundleIdentifier)] pub unsafe fn bundleIdentifier(&self) -> Option>; #[method_id(infoDictionary)] From 1bf196634847944ec23975c2404c6df77eddf586 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 10 Oct 2022 02:27:35 +0200 Subject: [PATCH 072/131] Parse headers on iOS as well --- crates/header-translator/framework-includes.h | 5 ++ crates/header-translator/src/main.rs | 47 ++++++++++++++----- 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/crates/header-translator/framework-includes.h b/crates/header-translator/framework-includes.h index 3ea8199fb..1db4dc494 100644 --- a/crates/header-translator/framework-includes.h +++ b/crates/header-translator/framework-includes.h @@ -1,2 +1,7 @@ +#include + #import + +#if TARGET_OS_OSX #import +#endif diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index f47ac369e..527373e5a 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,9 +1,9 @@ use std::collections::BTreeMap; use std::fs; use std::io::{self, Write}; -use std::path::Path; +use std::path::{Path, PathBuf}; -use apple_sdk::{Platform, SdkPath}; +use apple_sdk::{AppleSdk, DeveloperDirectory, Platform, SdkPath, SimpleSdk}; use clang::{Clang, EntityVisitResult, Index}; use quote::{format_ident, quote}; @@ -23,16 +23,41 @@ fn main() { let clang = Clang::new().unwrap(); let index = Index::new(&clang, true, true); + let developer_dir = DeveloperDirectory::from(PathBuf::from( + std::env::args_os() + .skip(1) + .next() + .expect("must specify developer directory as first argument"), + )); + + let sdks = developer_dir + .platforms() + .expect("developer dir platforms") + .into_iter() + .filter_map(|platform| { + matches!(&*platform, Platform::MacOsX | Platform::IPhoneOs).then(|| { + let sdks: Vec<_> = platform + .find_sdks::() + .expect("platform sdks") + .into_iter() + .filter(|sdk| !sdk.is_symlink() && sdk.platform() == &*platform) + .collect(); + if sdks.len() != 1 { + panic!("found multiple sdks {sdks:?} in {:?}", &*platform); + } + sdks[0].sdk_path() + }) + }); + let mut result = None; - // TODO: Parse multiple SDKs, and compare - for path in [ - workspace_dir.join("ideas/MacOSX-SDK-changes/MacOSXA.B.C.sdk"), - // Path::new("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"), - ] { - let sdk = SdkPath::from_path(path).expect("sdk from path"); + // TODO: Compare SDKs + for sdk in sdks { println!("status: parsing {:?}...", sdk.platform); - result = Some(parse(&index, &configs, &sdk)); + let res = parse(&index, &configs, &sdk); + if sdk.platform == Platform::MacOsX { + result = Some(res); + } println!("status: done parsing {:?}", sdk.platform); } @@ -82,8 +107,8 @@ fn parse( ) -> BTreeMap> { let (target, version_min) = match &sdk.platform { Platform::MacOsX => ("--target=x86_64-apple-macos", "-mmacosx-version-min=10.7"), - Platform::IPhoneOs => ("--target=x86_64-apple-ios", "-miphoneos-version-min=7.0"), - _ => ("--target=x86_64-apple-macos", "-mmacosx-version-min=10.7"), + Platform::IPhoneOs => ("--target=arm64-apple-ios", "-miphoneos-version-min=7.0"), + _ => todo!(), }; let tu = index From e59d24aeaf3b25c64034452ec15a0abb1d3e56e0 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 24 Oct 2022 14:58:41 +0200 Subject: [PATCH 073/131] Refactor stmt parsing a bit --- crates/header-translator/src/main.rs | 60 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 527373e5a..9ad3b499e 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -4,7 +4,7 @@ use std::io::{self, Write}; use std::path::{Path, PathBuf}; use apple_sdk::{AppleSdk, DeveloperDirectory, Platform, SdkPath, SimpleSdk}; -use clang::{Clang, EntityVisitResult, Index}; +use clang::{Clang, Entity, EntityVisitResult, Index}; use quote::{format_ident, quote}; use header_translator::{format_method_macro, run_cargo_fmt, run_rustfmt, Config, RustFile, Stmt}; @@ -49,19 +49,32 @@ fn main() { }) }); - let mut result = None; + let mut result: BTreeMap> = BTreeMap::new(); // TODO: Compare SDKs for sdk in sdks { println!("status: parsing {:?}...", sdk.platform); - let res = parse(&index, &configs, &sdk); - if sdk.platform == Platform::MacOsX { - result = Some(res); - } + parse_and_visit_stmts(&index, &sdk, |library, file_name, entity| { + if let Some(config) = configs.get(library) { + if file_name != library { + let files = result.entry(library.to_string()).or_default(); + let file = files + .entry(file_name.to_string()) + .or_insert_with(RustFile::new); + if let Some(stmt) = Stmt::parse(&entity, &config) { + if sdk.platform == Platform::MacOsX { + file.add_stmt(stmt); + } + } + } + } else { + // println!("library not found {library}"); + } + }); println!("status: done parsing {:?}", sdk.platform); } - for (library, files) in result.unwrap() { + for (library, files) in result { println!("status: writing framework {library}..."); let output_path = crate_src.join("generated").join(&library); output_files(&output_path, files, FORMAT_INCREMENTALLY); @@ -100,11 +113,11 @@ fn load_configs(crate_src: &Path) -> BTreeMap { .collect() } -fn parse( +fn parse_and_visit_stmts( index: &Index<'_>, - configs: &BTreeMap, sdk: &SdkPath, -) -> BTreeMap> { + mut f: impl FnMut(&str, &str, Entity<'_>), +) { let (target, version_min) = match &sdk.platform { Platform::MacOsX => ("--target=x86_64-apple-macos", "-mmacosx-version-min=10.7"), Platform::IPhoneOs => ("--target=arm64-apple-ios", "-miphoneos-version-min=7.0"), @@ -168,8 +181,6 @@ fn parse( dbg!(&entity); dbg!(entity.get_availability()); - let mut result: BTreeMap> = BTreeMap::new(); - let framework_dir = sdk.path.join("System/Library/Frameworks"); entity.visit_children(|entity, _parent| { if let Some(location) = entity.get_location() { @@ -185,31 +196,20 @@ fn parse( .expect("component to_str") .strip_suffix(".framework") .expect("framework fileending"); + let path = components.as_path(); + let name = path + .file_stem() + .expect("path file stem") + .to_string_lossy() + .to_owned(); - if let Some(config) = configs.get(library) { - let name = path - .file_stem() - .expect("path file stem") - .to_string_lossy() - .to_owned(); - if name != library { - let files = result.entry(library.to_string()).or_default(); - let file = files.entry(name.to_string()).or_insert_with(RustFile::new); - if let Some(stmt) = Stmt::parse(&entity, &config) { - file.add_stmt(stmt); - } - } - } else { - // println!("library not found {library}"); - } + f(&library, &name, entity); } } } EntityVisitResult::Continue }); - - result } fn output_files( From 7dc510743981ab41e5b2975cc480e4a1b11efc58 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 29 Oct 2022 23:28:22 +0200 Subject: [PATCH 074/131] Remove Stmt::FileImport and Stmt::ItemImport These are not nearly enough to make imports work well anyhow, so I'll rip it out and find a better solution --- crates/header-translator/src/lib.rs | 7 +-- crates/header-translator/src/stmt.rs | 49 ++----------------- .../src/generated/AppKit/AppKitDefines.rs | 1 - .../src/generated/AppKit/AppKitErrors.rs | 2 - .../src/generated/AppKit/NSATSTypesetter.rs | 2 - .../src/generated/AppKit/NSAccessibility.rs | 13 ----- .../AppKit/NSAccessibilityConstants.rs | 2 - .../AppKit/NSAccessibilityCustomAction.rs | 2 - .../AppKit/NSAccessibilityCustomRotor.rs | 4 -- .../AppKit/NSAccessibilityElement.rs | 4 -- .../AppKit/NSAccessibilityProtocols.rs | 5 -- .../src/generated/AppKit/NSActionCell.rs | 2 - .../src/generated/AppKit/NSAffineTransform.rs | 3 -- crates/icrate/src/generated/AppKit/NSAlert.rs | 12 ----- .../AppKit/NSAlignmentFeedbackFilter.rs | 6 --- .../src/generated/AppKit/NSAnimation.rs | 5 -- .../generated/AppKit/NSAnimationContext.rs | 5 -- .../src/generated/AppKit/NSAppearance.rs | 5 -- .../AppKit/NSAppleScriptExtensions.rs | 3 -- .../src/generated/AppKit/NSApplication.rs | 26 ---------- .../AppKit/NSApplicationScripting.rs | 5 -- .../src/generated/AppKit/NSArrayController.rs | 7 --- .../generated/AppKit/NSAttributedString.rs | 11 ----- .../src/generated/AppKit/NSBezierPath.rs | 5 -- .../src/generated/AppKit/NSBitmapImageRep.rs | 8 --- crates/icrate/src/generated/AppKit/NSBox.rs | 3 -- .../icrate/src/generated/AppKit/NSBrowser.rs | 9 ---- .../src/generated/AppKit/NSBrowserCell.rs | 3 -- .../icrate/src/generated/AppKit/NSButton.rs | 7 --- .../src/generated/AppKit/NSButtonCell.rs | 6 --- .../generated/AppKit/NSButtonTouchBarItem.rs | 3 -- .../src/generated/AppKit/NSCIImageRep.rs | 5 -- .../src/generated/AppKit/NSCachedImageRep.rs | 4 -- .../AppKit/NSCandidateListTouchBarItem.rs | 5 -- crates/icrate/src/generated/AppKit/NSCell.rs | 18 ------- .../AppKit/NSClickGestureRecognizer.rs | 3 -- .../icrate/src/generated/AppKit/NSClipView.rs | 4 -- .../src/generated/AppKit/NSCollectionView.rs | 15 ------ .../NSCollectionViewCompositionalLayout.rs | 3 -- .../AppKit/NSCollectionViewFlowLayout.rs | 3 -- .../AppKit/NSCollectionViewGridLayout.rs | 3 -- .../AppKit/NSCollectionViewLayout.rs | 8 --- .../NSCollectionViewTransitionLayout.rs | 2 - crates/icrate/src/generated/AppKit/NSColor.rs | 14 ------ .../src/generated/AppKit/NSColorList.rs | 7 --- .../src/generated/AppKit/NSColorPanel.rs | 5 -- .../src/generated/AppKit/NSColorPicker.rs | 2 - .../AppKit/NSColorPickerTouchBarItem.rs | 7 --- .../src/generated/AppKit/NSColorPicking.rs | 9 ---- .../src/generated/AppKit/NSColorSampler.rs | 3 -- .../src/generated/AppKit/NSColorSpace.rs | 5 -- .../src/generated/AppKit/NSColorWell.rs | 2 - .../icrate/src/generated/AppKit/NSComboBox.rs | 3 -- .../src/generated/AppKit/NSComboBoxCell.rs | 5 -- .../icrate/src/generated/AppKit/NSControl.rs | 11 ----- .../src/generated/AppKit/NSController.rs | 6 --- .../icrate/src/generated/AppKit/NSCursor.rs | 7 --- .../src/generated/AppKit/NSCustomImageRep.rs | 2 - .../generated/AppKit/NSCustomTouchBarItem.rs | 2 - .../src/generated/AppKit/NSDataAsset.rs | 2 - .../src/generated/AppKit/NSDatePicker.rs | 6 --- .../src/generated/AppKit/NSDatePickerCell.rs | 6 --- .../AppKit/NSDictionaryController.rs | 4 -- .../generated/AppKit/NSDiffableDataSource.rs | 1 - .../icrate/src/generated/AppKit/NSDockTile.rs | 7 --- .../icrate/src/generated/AppKit/NSDocument.rs | 26 ---------- .../generated/AppKit/NSDocumentController.rs | 13 ----- .../generated/AppKit/NSDocumentScripting.rs | 6 --- .../icrate/src/generated/AppKit/NSDragging.rs | 15 ------ .../src/generated/AppKit/NSDraggingItem.rs | 6 --- .../src/generated/AppKit/NSDraggingSession.rs | 11 ----- .../icrate/src/generated/AppKit/NSDrawer.rs | 12 ----- .../src/generated/AppKit/NSEPSImageRep.rs | 3 -- .../icrate/src/generated/AppKit/NSErrors.rs | 2 - crates/icrate/src/generated/AppKit/NSEvent.rs | 11 ----- .../generated/AppKit/NSFilePromiseProvider.rs | 6 --- .../generated/AppKit/NSFilePromiseReceiver.rs | 6 --- .../AppKit/NSFileWrapperExtensions.rs | 3 -- crates/icrate/src/generated/AppKit/NSFont.rs | 8 --- .../generated/AppKit/NSFontAssetRequest.rs | 5 -- .../src/generated/AppKit/NSFontCollection.rs | 7 --- .../src/generated/AppKit/NSFontDescriptor.rs | 7 --- .../src/generated/AppKit/NSFontManager.rs | 10 ---- .../src/generated/AppKit/NSFontPanel.rs | 8 --- crates/icrate/src/generated/AppKit/NSForm.rs | 3 -- .../icrate/src/generated/AppKit/NSFormCell.rs | 2 - .../generated/AppKit/NSGestureRecognizer.rs | 8 --- .../src/generated/AppKit/NSGlyphGenerator.rs | 2 - .../src/generated/AppKit/NSGlyphInfo.rs | 2 - .../icrate/src/generated/AppKit/NSGradient.rs | 7 --- .../icrate/src/generated/AppKit/NSGraphics.rs | 4 -- .../src/generated/AppKit/NSGraphicsContext.rs | 10 ---- .../icrate/src/generated/AppKit/NSGridView.rs | 4 -- .../generated/AppKit/NSGroupTouchBarItem.rs | 3 -- .../src/generated/AppKit/NSHapticFeedback.rs | 3 -- .../src/generated/AppKit/NSHelpManager.rs | 9 ---- crates/icrate/src/generated/AppKit/NSImage.rs | 16 ------ .../src/generated/AppKit/NSImageCell.rs | 3 -- .../icrate/src/generated/AppKit/NSImageRep.rs | 14 ------ .../src/generated/AppKit/NSImageView.rs | 5 -- .../src/generated/AppKit/NSInputManager.rs | 9 ---- .../src/generated/AppKit/NSInputServer.rs | 4 -- .../src/generated/AppKit/NSInterfaceStyle.rs | 2 - .../src/generated/AppKit/NSItemProvider.rs | 3 -- .../src/generated/AppKit/NSKeyValueBinding.rs | 8 --- .../src/generated/AppKit/NSLayoutAnchor.rs | 4 -- .../generated/AppKit/NSLayoutConstraint.rs | 10 ---- .../src/generated/AppKit/NSLayoutGuide.rs | 9 ---- .../src/generated/AppKit/NSLayoutManager.rs | 13 ----- .../src/generated/AppKit/NSLevelIndicator.rs | 3 -- .../generated/AppKit/NSLevelIndicatorCell.rs | 3 -- .../NSMagnificationGestureRecognizer.rs | 3 -- .../icrate/src/generated/AppKit/NSMatrix.rs | 5 -- .../AppKit/NSMediaLibraryBrowserController.rs | 3 -- crates/icrate/src/generated/AppKit/NSMenu.rs | 8 --- .../icrate/src/generated/AppKit/NSMenuItem.rs | 11 ----- .../src/generated/AppKit/NSMenuItemCell.rs | 4 -- .../src/generated/AppKit/NSMenuToolbarItem.rs | 2 - crates/icrate/src/generated/AppKit/NSMovie.rs | 3 -- crates/icrate/src/generated/AppKit/NSNib.rs | 2 - .../src/generated/AppKit/NSNibLoading.rs | 6 --- .../generated/AppKit/NSObjectController.rs | 8 --- .../icrate/src/generated/AppKit/NSOpenGL.rs | 7 --- .../src/generated/AppKit/NSOpenGLLayer.rs | 4 -- .../src/generated/AppKit/NSOpenGLView.rs | 5 -- .../src/generated/AppKit/NSOpenPanel.rs | 5 -- .../src/generated/AppKit/NSOutlineView.rs | 11 ----- .../src/generated/AppKit/NSPDFImageRep.rs | 2 - .../icrate/src/generated/AppKit/NSPDFInfo.rs | 7 --- .../icrate/src/generated/AppKit/NSPDFPanel.rs | 7 --- .../src/generated/AppKit/NSPICTImageRep.rs | 2 - .../src/generated/AppKit/NSPageController.rs | 7 --- .../src/generated/AppKit/NSPageLayout.rs | 8 --- .../AppKit/NSPanGestureRecognizer.rs | 3 -- crates/icrate/src/generated/AppKit/NSPanel.rs | 2 - .../src/generated/AppKit/NSParagraphStyle.rs | 4 -- .../src/generated/AppKit/NSPasteboard.rs | 11 ----- .../src/generated/AppKit/NSPasteboardItem.rs | 5 -- .../icrate/src/generated/AppKit/NSPathCell.rs | 14 ------ .../generated/AppKit/NSPathComponentCell.rs | 6 --- .../src/generated/AppKit/NSPathControl.rs | 9 ---- .../src/generated/AppKit/NSPathControlItem.rs | 4 -- .../generated/AppKit/NSPersistentDocument.rs | 5 -- .../generated/AppKit/NSPickerTouchBarItem.rs | 3 -- .../src/generated/AppKit/NSPopUpButton.rs | 6 --- .../src/generated/AppKit/NSPopUpButtonCell.rs | 6 --- .../icrate/src/generated/AppKit/NSPopover.rs | 11 ----- .../generated/AppKit/NSPopoverTouchBarItem.rs | 1 - .../src/generated/AppKit/NSPredicateEditor.rs | 5 -- .../AppKit/NSPredicateEditorRowTemplate.rs | 8 --- .../AppKit/NSPressGestureRecognizer.rs | 3 -- .../AppKit/NSPressureConfiguration.rs | 5 -- .../src/generated/AppKit/NSPrintInfo.rs | 7 --- .../src/generated/AppKit/NSPrintOperation.rs | 10 ---- .../src/generated/AppKit/NSPrintPanel.rs | 12 ----- .../icrate/src/generated/AppKit/NSPrinter.rs | 6 --- .../generated/AppKit/NSProgressIndicator.rs | 4 -- .../src/generated/AppKit/NSResponder.rs | 11 ----- .../AppKit/NSRotationGestureRecognizer.rs | 3 -- .../src/generated/AppKit/NSRuleEditor.rs | 9 ---- .../src/generated/AppKit/NSRulerMarker.rs | 6 --- .../src/generated/AppKit/NSRulerView.rs | 5 -- .../generated/AppKit/NSRunningApplication.rs | 8 --- .../src/generated/AppKit/NSSavePanel.rs | 12 ----- .../icrate/src/generated/AppKit/NSScreen.rs | 9 ---- .../src/generated/AppKit/NSScrollView.rs | 9 ---- .../icrate/src/generated/AppKit/NSScroller.rs | 3 -- .../icrate/src/generated/AppKit/NSScrubber.rs | 9 ---- .../generated/AppKit/NSScrubberItemView.rs | 7 --- .../src/generated/AppKit/NSScrubberLayout.rs | 5 -- .../src/generated/AppKit/NSSearchField.rs | 3 -- .../src/generated/AppKit/NSSearchFieldCell.rs | 9 ---- .../generated/AppKit/NSSearchToolbarItem.rs | 4 -- .../src/generated/AppKit/NSSecureTextField.rs | 3 -- .../src/generated/AppKit/NSSegmentedCell.rs | 5 -- .../generated/AppKit/NSSegmentedControl.rs | 5 -- .../icrate/src/generated/AppKit/NSShadow.rs | 4 -- .../src/generated/AppKit/NSSharingService.rs | 13 ----- .../NSSharingServicePickerToolbarItem.rs | 2 - .../NSSharingServicePickerTouchBarItem.rs | 4 -- .../icrate/src/generated/AppKit/NSSlider.rs | 3 -- .../src/generated/AppKit/NSSliderAccessory.rs | 4 -- .../src/generated/AppKit/NSSliderCell.rs | 2 - .../generated/AppKit/NSSliderTouchBarItem.rs | 4 -- crates/icrate/src/generated/AppKit/NSSound.rs | 7 --- .../generated/AppKit/NSSpeechRecognizer.rs | 4 -- .../generated/AppKit/NSSpeechSynthesizer.rs | 8 --- .../src/generated/AppKit/NSSpellChecker.rs | 13 ----- .../src/generated/AppKit/NSSpellProtocol.rs | 2 - .../src/generated/AppKit/NSSplitView.rs | 4 -- .../generated/AppKit/NSSplitViewController.rs | 6 --- .../src/generated/AppKit/NSSplitViewItem.rs | 5 -- .../src/generated/AppKit/NSStackView.rs | 6 --- .../src/generated/AppKit/NSStatusBar.rs | 7 --- .../src/generated/AppKit/NSStatusBarButton.rs | 2 - .../src/generated/AppKit/NSStatusItem.rs | 10 ---- .../icrate/src/generated/AppKit/NSStepper.rs | 2 - .../src/generated/AppKit/NSStepperCell.rs | 2 - .../generated/AppKit/NSStepperTouchBarItem.rs | 1 - .../src/generated/AppKit/NSStoryboard.rs | 2 - .../src/generated/AppKit/NSStoryboardSegue.rs | 2 - .../src/generated/AppKit/NSStringDrawing.rs | 2 - .../icrate/src/generated/AppKit/NSSwitch.rs | 2 - .../icrate/src/generated/AppKit/NSTabView.rs | 8 --- .../generated/AppKit/NSTabViewController.rs | 5 -- .../src/generated/AppKit/NSTabViewItem.rs | 9 ---- .../src/generated/AppKit/NSTableCellView.rs | 10 ---- .../src/generated/AppKit/NSTableColumn.rs | 9 ---- .../src/generated/AppKit/NSTableHeaderCell.rs | 2 - .../src/generated/AppKit/NSTableHeaderView.rs | 6 --- .../src/generated/AppKit/NSTableRowView.rs | 6 --- .../src/generated/AppKit/NSTableView.rs | 15 ------ .../AppKit/NSTableViewDiffableDataSource.rs | 5 -- .../generated/AppKit/NSTableViewRowAction.rs | 5 -- crates/icrate/src/generated/AppKit/NSText.rs | 6 --- .../generated/AppKit/NSTextAlternatives.rs | 5 -- .../src/generated/AppKit/NSTextAttachment.rs | 13 ----- .../generated/AppKit/NSTextAttachmentCell.rs | 4 -- .../generated/AppKit/NSTextCheckingClient.rs | 11 ----- .../AppKit/NSTextCheckingController.rs | 12 ----- .../src/generated/AppKit/NSTextContainer.rs | 5 -- .../src/generated/AppKit/NSTextContent.rs | 2 - .../generated/AppKit/NSTextContentManager.rs | 10 ---- .../src/generated/AppKit/NSTextElement.rs | 3 -- .../src/generated/AppKit/NSTextField.rs | 6 --- .../src/generated/AppKit/NSTextFieldCell.rs | 4 -- .../src/generated/AppKit/NSTextFinder.rs | 8 --- .../src/generated/AppKit/NSTextInputClient.rs | 7 --- .../generated/AppKit/NSTextInputContext.rs | 5 -- .../generated/AppKit/NSTextLayoutFragment.rs | 10 ---- .../generated/AppKit/NSTextLayoutManager.rs | 12 ----- .../generated/AppKit/NSTextLineFragment.rs | 3 -- .../icrate/src/generated/AppKit/NSTextList.rs | 2 - .../src/generated/AppKit/NSTextRange.rs | 1 - .../src/generated/AppKit/NSTextSelection.rs | 4 -- .../AppKit/NSTextSelectionNavigation.rs | 7 --- .../src/generated/AppKit/NSTextStorage.rs | 6 --- .../AppKit/NSTextStorageScripting.rs | 2 - .../src/generated/AppKit/NSTextTable.rs | 3 -- .../icrate/src/generated/AppKit/NSTextView.rs | 36 -------------- .../AppKit/NSTextViewportLayoutController.rs | 6 --- .../generated/AppKit/NSTintConfiguration.rs | 1 - .../NSTitlebarAccessoryViewController.rs | 4 -- .../src/generated/AppKit/NSTokenField.rs | 5 -- .../src/generated/AppKit/NSTokenFieldCell.rs | 4 -- .../icrate/src/generated/AppKit/NSToolbar.rs | 5 -- .../src/generated/AppKit/NSToolbarItem.rs | 10 ---- .../generated/AppKit/NSToolbarItemGroup.rs | 2 - crates/icrate/src/generated/AppKit/NSTouch.rs | 6 --- .../icrate/src/generated/AppKit/NSTouchBar.rs | 3 -- .../src/generated/AppKit/NSTouchBarItem.rs | 8 --- .../src/generated/AppKit/NSTrackingArea.rs | 5 -- .../AppKit/NSTrackingSeparatorToolbarItem.rs | 2 - .../src/generated/AppKit/NSTreeController.rs | 6 --- .../icrate/src/generated/AppKit/NSTreeNode.rs | 6 --- .../src/generated/AppKit/NSTypesetter.rs | 6 --- .../src/generated/AppKit/NSUserActivity.rs | 4 -- .../AppKit/NSUserDefaultsController.rs | 4 -- .../AppKit/NSUserInterfaceCompression.rs | 4 -- .../NSUserInterfaceItemIdentification.rs | 2 - .../AppKit/NSUserInterfaceItemSearching.rs | 4 -- .../generated/AppKit/NSUserInterfaceLayout.rs | 1 - .../AppKit/NSUserInterfaceValidation.rs | 2 - crates/icrate/src/generated/AppKit/NSView.rs | 31 ------------ .../src/generated/AppKit/NSViewController.rs | 14 ------ .../generated/AppKit/NSVisualEffectView.rs | 6 --- .../icrate/src/generated/AppKit/NSWindow.rs | 37 -------------- .../generated/AppKit/NSWindowController.rs | 11 ----- .../generated/AppKit/NSWindowRestoration.rs | 6 --- .../src/generated/AppKit/NSWindowScripting.rs | 4 -- .../src/generated/AppKit/NSWindowTab.rs | 5 -- .../src/generated/AppKit/NSWindowTabGroup.rs | 3 -- .../src/generated/AppKit/NSWorkspace.rs | 17 ------- .../generated/Foundation/FoundationErrors.rs | 2 - .../FoundationLegacySwiftCompatibility.rs | 1 - .../generated/Foundation/NSAffineTransform.rs | 3 -- .../Foundation/NSAppleEventDescriptor.rs | 4 -- .../Foundation/NSAppleEventManager.rs | 4 -- .../src/generated/Foundation/NSAppleScript.rs | 5 -- .../src/generated/Foundation/NSArchiver.rs | 7 --- .../src/generated/Foundation/NSArray.rs | 9 ---- .../Foundation/NSAttributedString.rs | 2 - .../generated/Foundation/NSAutoreleasePool.rs | 1 - .../NSBackgroundActivityScheduler.rs | 3 -- .../src/generated/Foundation/NSBundle.rs | 13 ----- .../Foundation/NSByteCountFormatter.rs | 2 - .../src/generated/Foundation/NSByteOrder.rs | 2 - .../src/generated/Foundation/NSCache.rs | 2 - .../src/generated/Foundation/NSCalendar.rs | 9 ---- .../generated/Foundation/NSCalendarDate.rs | 4 -- .../generated/Foundation/NSCharacterSet.rs | 5 -- .../Foundation/NSClassDescription.rs | 6 --- .../src/generated/Foundation/NSCoder.rs | 4 -- .../Foundation/NSComparisonPredicate.rs | 3 -- .../Foundation/NSCompoundPredicate.rs | 2 - .../src/generated/Foundation/NSConnection.rs | 13 ----- .../icrate/src/generated/Foundation/NSData.rs | 5 -- .../icrate/src/generated/Foundation/NSDate.rs | 3 -- .../Foundation/NSDateComponentsFormatter.rs | 3 -- .../generated/Foundation/NSDateFormatter.rs | 10 ---- .../generated/Foundation/NSDateInterval.rs | 3 -- .../Foundation/NSDateIntervalFormatter.rs | 7 --- .../src/generated/Foundation/NSDecimal.rs | 2 - .../generated/Foundation/NSDecimalNumber.rs | 5 -- .../src/generated/Foundation/NSDictionary.rs | 6 --- .../generated/Foundation/NSDistantObject.rs | 4 -- .../generated/Foundation/NSDistributedLock.rs | 2 - .../NSDistributedNotificationCenter.rs | 3 -- .../generated/Foundation/NSEnergyFormatter.rs | 1 - .../src/generated/Foundation/NSEnumerator.rs | 2 - .../src/generated/Foundation/NSError.rs | 4 -- .../src/generated/Foundation/NSException.rs | 6 --- .../src/generated/Foundation/NSExpression.rs | 5 -- .../Foundation/NSExtensionContext.rs | 1 - .../generated/Foundation/NSExtensionItem.rs | 2 - .../Foundation/NSExtensionRequestHandling.rs | 2 - .../generated/Foundation/NSFileCoordinator.rs | 8 --- .../src/generated/Foundation/NSFileHandle.rs | 9 ---- .../src/generated/Foundation/NSFileManager.rs | 16 ------ .../generated/Foundation/NSFilePresenter.rs | 6 --- .../src/generated/Foundation/NSFileVersion.rs | 8 --- .../src/generated/Foundation/NSFileWrapper.rs | 6 --- .../src/generated/Foundation/NSFormatter.rs | 6 --- .../Foundation/NSGarbageCollector.rs | 1 - .../src/generated/Foundation/NSGeometry.rs | 5 -- .../generated/Foundation/NSHFSFileTypes.rs | 3 -- .../src/generated/Foundation/NSHTTPCookie.rs | 8 --- .../Foundation/NSHTTPCookieStorage.rs | 9 ---- .../src/generated/Foundation/NSHashTable.rs | 5 -- .../icrate/src/generated/Foundation/NSHost.rs | 4 -- .../Foundation/NSISO8601DateFormatter.rs | 5 -- .../src/generated/Foundation/NSIndexPath.rs | 2 - .../src/generated/Foundation/NSIndexSet.rs | 2 - .../generated/Foundation/NSInflectionRule.rs | 2 - .../src/generated/Foundation/NSInvocation.rs | 2 - .../generated/Foundation/NSItemProvider.rs | 2 - .../Foundation/NSJSONSerialization.rs | 5 -- .../generated/Foundation/NSKeyValueCoding.rs | 7 --- .../Foundation/NSKeyValueObserving.rs | 6 --- .../generated/Foundation/NSKeyedArchiver.rs | 8 --- .../generated/Foundation/NSLengthFormatter.rs | 1 - .../Foundation/NSLinguisticTagger.rs | 5 -- .../generated/Foundation/NSListFormatter.rs | 3 -- .../src/generated/Foundation/NSLocale.rs | 7 --- .../icrate/src/generated/Foundation/NSLock.rs | 2 - .../src/generated/Foundation/NSMapTable.rs | 5 -- .../generated/Foundation/NSMassFormatter.rs | 2 - .../src/generated/Foundation/NSMeasurement.rs | 2 - .../Foundation/NSMeasurementFormatter.rs | 5 -- .../src/generated/Foundation/NSMetadata.rs | 11 ----- .../Foundation/NSMetadataAttributes.rs | 2 - .../generated/Foundation/NSMethodSignature.rs | 1 - .../src/generated/Foundation/NSMorphology.rs | 4 -- .../src/generated/Foundation/NSNetServices.rs | 12 ----- .../generated/Foundation/NSNotification.rs | 4 -- .../Foundation/NSNotificationQueue.rs | 6 --- .../icrate/src/generated/Foundation/NSNull.rs | 1 - .../generated/Foundation/NSNumberFormatter.rs | 9 ---- .../src/generated/Foundation/NSObjCRuntime.rs | 4 -- .../src/generated/Foundation/NSObject.rs | 9 ---- .../generated/Foundation/NSObjectScripting.rs | 4 -- .../src/generated/Foundation/NSOperation.rs | 7 --- .../Foundation/NSOrderedCollectionChange.rs | 1 - .../NSOrderedCollectionDifference.rs | 4 -- .../src/generated/Foundation/NSOrderedSet.rs | 9 ---- .../src/generated/Foundation/NSOrthography.rs | 4 -- .../generated/Foundation/NSPathUtilities.rs | 2 - .../Foundation/NSPersonNameComponents.rs | 3 -- .../NSPersonNameComponentsFormatter.rs | 2 - .../generated/Foundation/NSPointerArray.rs | 3 -- .../Foundation/NSPointerFunctions.rs | 1 - .../icrate/src/generated/Foundation/NSPort.rs | 9 ---- .../src/generated/Foundation/NSPortCoder.rs | 4 -- .../src/generated/Foundation/NSPortMessage.rs | 5 -- .../generated/Foundation/NSPortNameServer.rs | 3 -- .../src/generated/Foundation/NSPredicate.rs | 6 --- .../src/generated/Foundation/NSProcessInfo.rs | 6 --- .../src/generated/Foundation/NSProgress.rs | 9 ---- .../generated/Foundation/NSPropertyList.rs | 7 --- .../generated/Foundation/NSProtocolChecker.rs | 2 - .../src/generated/Foundation/NSProxy.rs | 3 -- .../src/generated/Foundation/NSRange.rs | 3 -- .../Foundation/NSRegularExpression.rs | 4 -- .../Foundation/NSRelativeDateTimeFormatter.rs | 5 -- .../src/generated/Foundation/NSRunLoop.rs | 7 --- .../src/generated/Foundation/NSScanner.rs | 4 -- .../Foundation/NSScriptClassDescription.rs | 2 - .../Foundation/NSScriptCoercionHandler.rs | 1 - .../generated/Foundation/NSScriptCommand.rs | 7 --- .../Foundation/NSScriptCommandDescription.rs | 5 -- .../Foundation/NSScriptExecutionContext.rs | 2 - .../Foundation/NSScriptKeyValueCoding.rs | 2 - .../Foundation/NSScriptObjectSpecifiers.rs | 7 --- .../NSScriptStandardSuiteCommands.rs | 5 -- .../Foundation/NSScriptSuiteRegistry.rs | 10 ---- .../Foundation/NSScriptWhoseTests.rs | 4 -- .../icrate/src/generated/Foundation/NSSet.rs | 5 -- .../generated/Foundation/NSSortDescriptor.rs | 3 -- .../src/generated/Foundation/NSSpellServer.rs | 6 --- .../src/generated/Foundation/NSStream.rs | 9 ---- .../src/generated/Foundation/NSString.rs | 10 ---- .../icrate/src/generated/Foundation/NSTask.rs | 5 -- .../Foundation/NSTextCheckingResult.rs | 11 ----- .../src/generated/Foundation/NSThread.rs | 8 --- .../src/generated/Foundation/NSTimeZone.rs | 9 ---- .../src/generated/Foundation/NSTimer.rs | 2 - .../icrate/src/generated/Foundation/NSURL.rs | 9 ---- .../NSURLAuthenticationChallenge.rs | 6 --- .../src/generated/Foundation/NSURLCache.rs | 10 ---- .../generated/Foundation/NSURLConnection.rs | 15 ------ .../generated/Foundation/NSURLCredential.rs | 5 -- .../Foundation/NSURLCredentialStorage.rs | 8 --- .../src/generated/Foundation/NSURLDownload.rs | 9 ---- .../src/generated/Foundation/NSURLError.rs | 4 -- .../src/generated/Foundation/NSURLHandle.rs | 5 -- .../Foundation/NSURLProtectionSpace.rs | 6 --- .../src/generated/Foundation/NSURLProtocol.rs | 11 ----- .../src/generated/Foundation/NSURLRequest.rs | 8 --- .../src/generated/Foundation/NSURLResponse.rs | 7 --- .../src/generated/Foundation/NSURLSession.rs | 25 ---------- .../icrate/src/generated/Foundation/NSUUID.rs | 3 -- .../Foundation/NSUbiquitousKeyValueStore.rs | 6 --- .../src/generated/Foundation/NSUndoManager.rs | 5 -- .../icrate/src/generated/Foundation/NSUnit.rs | 1 - .../generated/Foundation/NSUserActivity.rs | 11 ----- .../generated/Foundation/NSUserDefaults.rs | 8 --- .../Foundation/NSUserNotification.rs | 9 ---- .../generated/Foundation/NSUserScriptTask.rs | 9 ---- .../src/generated/Foundation/NSValue.rs | 3 -- .../Foundation/NSValueTransformer.rs | 3 -- .../src/generated/Foundation/NSXMLDTD.rs | 5 -- .../src/generated/Foundation/NSXMLDTDNode.rs | 1 - .../src/generated/Foundation/NSXMLDocument.rs | 5 -- .../src/generated/Foundation/NSXMLElement.rs | 6 --- .../src/generated/Foundation/NSXMLNode.rs | 9 ---- .../generated/Foundation/NSXMLNodeOptions.rs | 1 - .../src/generated/Foundation/NSXMLParser.rs | 9 ---- .../generated/Foundation/NSXPCConnection.rs | 12 ----- .../icrate/src/generated/Foundation/NSZone.rs | 3 -- 439 files changed, 4 insertions(+), 2636 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 3f1234313..99c4c683d 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -33,8 +33,6 @@ impl RustFile { pub fn add_stmt(&mut self, stmt: Stmt) { match &stmt { - Stmt::FileImport { .. } => {} - Stmt::ItemImport { .. } => {} Stmt::ClassDecl { name, .. } => { self.declared_types.insert(name.clone()); } @@ -50,10 +48,7 @@ impl RustFile { } pub fn finish(self) -> (HashSet, TokenStream) { - let iter = self.stmts.iter().filter(|stmt| match stmt { - Stmt::ItemImport { name } => !self.declared_types.contains(name), - _ => true, - }); + let iter = self.stmts.iter(); let tokens = quote! { #[allow(unused_imports)] diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 1bb17461d..c45fe9c0f 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -154,11 +154,6 @@ fn parse_objc_decl( #[derive(Debug, Clone)] pub enum Stmt { - /// #import - FileImport { framework: String, file: String }, - /// @class Name; - /// @protocol Name; - ItemImport { name: String }, /// @interface name: superclass ClassDecl { name: String, @@ -196,32 +191,9 @@ pub enum Stmt { impl Stmt { pub fn parse(entity: &Entity<'_>, config: &Config) -> Option { match entity.get_kind() { - EntityKind::InclusionDirective => { - // let file = entity.get_file().expect("inclusion file"); - let name = entity.get_name().expect("inclusion name"); - let mut iter = name.split('/'); - let framework = iter.next().expect("inclusion name has framework"); - let file = iter.next()?; - if iter.count() != 0 { - // TODO: Fix this - println!("skipping inclusion of {name:?}"); - return None; - } - - Some(Self::FileImport { - framework: framework.to_string(), - file: file - .strip_suffix(".h") - .expect("inclusion name file is header") - .to_string(), - }) - } - EntityKind::ObjCClassRef | EntityKind::ObjCProtocolRef => { - let name = entity.get_name().expect("objc ref has name"); - - // We intentionally don't handle generics here - Some(Self::ItemImport { name }) - } + EntityKind::InclusionDirective => None, + // These are inconsequential for us, since we resolve imports differently + EntityKind::ObjCClassRef | EntityKind::ObjCProtocolRef => None, EntityKind::MacroExpansion | EntityKind::MacroDefinition => None, EntityKind::ObjCInterfaceDecl => { // entity.get_mangled_objc_names() @@ -380,21 +352,6 @@ impl Stmt { impl ToTokens for Stmt { fn to_tokens(&self, tokens: &mut TokenStream) { let result = match self { - Self::FileImport { framework, file } => { - let framework = format_ident!("{}", framework); - let file = format_ident!("{}", file); - - quote! { - use crate::#framework::generated::#file::*; - } - } - Self::ItemImport { name } => { - let name = format_ident!("{}", name); - - quote! { - use super::__exported::#name; - } - } Self::ClassDecl { name, availability: _, diff --git a/crates/icrate/src/generated/AppKit/AppKitDefines.rs b/crates/icrate/src/generated/AppKit/AppKitDefines.rs index 5362722ad..d52c6a49a 100644 --- a/crates/icrate/src/generated/AppKit/AppKitDefines.rs +++ b/crates/icrate/src/generated/AppKit/AppKitDefines.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/AppKitErrors.rs b/crates/icrate/src/generated/AppKit/AppKitErrors.rs index fea2787aa..d52c6a49a 100644 --- a/crates/icrate/src/generated/AppKit/AppKitErrors.rs +++ b/crates/icrate/src/generated/AppKit/AppKitErrors.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs index b87ffaa13..a1c72df0b 100644 --- a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::NSParagraphStyle::*; -use crate::AppKit::generated::NSTypesetter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibility.rs b/crates/icrate/src/generated/AppKit/NSAccessibility.rs index a5a213d25..cb7e736b9 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibility.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibility.rs @@ -1,16 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSString; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAccessibilityConstants::*; -use crate::AppKit::generated::NSAccessibilityCustomRotor::*; -use crate::AppKit::generated::NSAccessibilityElement::*; -use crate::AppKit::generated::NSAccessibilityProtocols::*; -use crate::AppKit::generated::NSErrors::*; -use crate::AppKit::generated::NSWorkspace::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs index d5886c93a..a71983bdb 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs index c8336301f..b9cd9fdd6 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs index 9e214cc4a..4b7afe445 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs @@ -1,7 +1,3 @@ -use super::__exported::NSAccessibilityCustomRotorItemLoadDelegate; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAccessibilityProtocols::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs index 89637b9da..a34b6c821 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs @@ -1,7 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAccessibilityConstants::*; -use crate::AppKit::generated::NSAccessibilityProtocols::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs index d9582c27c..b24a1b4fd 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs @@ -1,8 +1,3 @@ -use super::__exported::NSAccessibilityCustomRotor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAccessibilityConstants::*; -use crate::AppKit::generated::NSAccessibilityCustomAction::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSActionCell.rs b/crates/icrate/src/generated/AppKit/NSActionCell.rs index 6c502c73a..7fe819809 100644 --- a/crates/icrate/src/generated/AppKit/NSActionCell.rs +++ b/crates/icrate/src/generated/AppKit/NSActionCell.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs index da8544cb7..49ef9e8d7 100644 --- a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs +++ b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs @@ -1,6 +1,3 @@ -use super::__exported::NSBezierPath; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSAffineTransform::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index 5ee70ebf4..d523608a4 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -1,15 +1,3 @@ -use super::__exported::NSButton; -use super::__exported::NSError; -use super::__exported::NSImage; -use super::__exported::NSPanel; -use super::__exported::NSTextField; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::AppKit::generated::NSGraphics::*; -use crate::AppKit::generated::NSHelpManager::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs index c7fee0d93..8464e1cd9 100644 --- a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs +++ b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs @@ -1,9 +1,3 @@ -use super::__exported::NSPanGestureRecognizer; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSEvent::*; -use crate::AppKit::generated::NSHapticFeedback::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index c2627de5e..c6f061ee5 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -1,8 +1,3 @@ -use super::__exported::NSGraphicsContext; -use super::__exported::NSString; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs index 819974f30..b0555e193 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs @@ -1,8 +1,3 @@ -use super::__exported::CAMediaTimingFunction; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index e163edfdc..7eafa59b6 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -1,8 +1,3 @@ -use super::__exported::NSBundle; -use super::__exported::NSString; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs index 0389847a0..2145b589b 100644 --- a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs +++ b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs @@ -1,6 +1,3 @@ -use super::__exported::NSAttributedString; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSAppleScript::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 9ce6444ef..1084d80a0 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -1,29 +1,3 @@ -use super::__exported::CKShareMetadata; -use super::__exported::INIntent; -use super::__exported::NSDate; -use super::__exported::NSDictionary; -use super::__exported::NSDockTile; -use super::__exported::NSError; -use super::__exported::NSException; -use super::__exported::NSGraphicsContext; -use super::__exported::NSImage; -use super::__exported::NSNotification; -use super::__exported::NSPasteboard; -use super::__exported::NSUserActivity; -use super::__exported::NSUserActivityRestoring; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAppearance::*; -use crate::AppKit::generated::NSMenu::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::AppKit::generated::NSPrintInfo::*; -use crate::AppKit::generated::NSResponder::*; -use crate::AppKit::generated::NSRunningApplication::*; -use crate::AppKit::generated::NSUserActivity::*; -use crate::AppKit::generated::NSUserInterfaceLayout::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs index 1fc307e45..4b3792399 100644 --- a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs @@ -1,8 +1,3 @@ -use super::__exported::NSDocument; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSArrayController.rs b/crates/icrate/src/generated/AppKit/NSArrayController.rs index da75c6278..ef2854715 100644 --- a/crates/icrate/src/generated/AppKit/NSArrayController.rs +++ b/crates/icrate/src/generated/AppKit/NSArrayController.rs @@ -1,10 +1,3 @@ -use super::__exported::NSIndexSet; -use super::__exported::NSMutableIndexSet; -use super::__exported::NSSortDescriptor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSObjectController::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index 21779e4e0..6e592a48a 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -1,14 +1,3 @@ -use super::__exported::NSFileWrapper; -use super::__exported::NSTextBlock; -use super::__exported::NSTextList; -use super::__exported::NSTextTable; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSFontManager::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::AppKit::generated::NSText::*; -use crate::Foundation::generated::NSAttributedString::*; -use crate::Foundation::generated::NSItemProvider::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index 5ff0d908a..1046e2e62 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -1,8 +1,3 @@ -use super::__exported::NSAffineTransform; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSFont::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index cfd5215ce..ac6ee98c0 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -1,11 +1,3 @@ -use super::__exported::CIImage; -use super::__exported::NSColor; -use super::__exported::NSColorSpace; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSImageRep::*; -use crate::ApplicationServices::generated::ApplicationServices::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSBox.rs b/crates/icrate/src/generated/AppKit/NSBox.rs index c731cd3d4..61af8a961 100644 --- a/crates/icrate/src/generated/AppKit/NSBox.rs +++ b/crates/icrate/src/generated/AppKit/NSBox.rs @@ -1,6 +1,3 @@ -use super::__exported::NSFont; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index 22791ca94..a08d8cc1c 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -1,17 +1,8 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSDragging::*; -use crate::AppKit::generated::NSViewController::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSBrowserColumnsAutosaveName = NSString; -use super::__exported::NSIndexSet; -use super::__exported::NSMatrix; -use super::__exported::NSScroller; extern_class!( #[derive(Debug)] pub struct NSBrowser; diff --git a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs index cdce45df6..d063e52e4 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs @@ -1,6 +1,3 @@ -use super::__exported::NSImage; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSButton.rs b/crates/icrate/src/generated/AppKit/NSButton.rs index 001864c65..6a92c24bc 100644 --- a/crates/icrate/src/generated/AppKit/NSButton.rs +++ b/crates/icrate/src/generated/AppKit/NSButton.rs @@ -1,10 +1,3 @@ -use super::__exported::NSImageSymbolConfiguration; -use super::__exported::NSSound; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSButtonCell::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSUserInterfaceCompression::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs index b1af2e7cb..43b410ac0 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -1,9 +1,3 @@ -use super::__exported::NSAttributedString; -use super::__exported::NSFont; -use super::__exported::NSImage; -use super::__exported::NSSound; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSActionCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs index c6872d2cb..497484d2a 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs @@ -1,6 +1,3 @@ -use super::__exported::NSColor; -use super::__exported::NSImage; -use crate::AppKit::generated::NSTouchBarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs index 3bcf79936..fc99dab36 100644 --- a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs @@ -1,8 +1,3 @@ -use super::__exported::NSBitmapImageRep; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSGraphics::*; -use crate::AppKit::generated::NSImageRep::*; -use crate::CoreImage::generated::CIImage::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs index 9558fb23a..8ac8933be 100644 --- a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs @@ -1,7 +1,3 @@ -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSGraphics::*; -use crate::AppKit::generated::NSImageRep::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index 2afaa7851..be67be7ef 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -1,8 +1,3 @@ -use super::__exported::NSTextInputClient; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTouchBar::*; -use crate::AppKit::generated::NSTouchBarItem::*; -use crate::AppKit::generated::NSView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index 92b871fea..e5b9b9792 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -1,21 +1,3 @@ -use super::__exported::NSAttributedString; -use super::__exported::NSDraggingImageComponent; -use super::__exported::NSEvent; -use super::__exported::NSFont; -use super::__exported::NSFormatter; -use super::__exported::NSImage; -use super::__exported::NSMenu; -use super::__exported::NSText; -use super::__exported::NSTextView; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAccessibilityProtocols::*; -use crate::AppKit::generated::NSParagraphStyle::*; -use crate::AppKit::generated::NSText::*; -use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs index e41501f73..1a785a1f8 100644 --- a/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSGestureRecognizer::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSClipView.rs b/crates/icrate/src/generated/AppKit/NSClipView.rs index c5e917f2c..b5f215890 100644 --- a/crates/icrate/src/generated/AppKit/NSClipView.rs +++ b/crates/icrate/src/generated/AppKit/NSClipView.rs @@ -1,7 +1,3 @@ -use super::__exported::NSColor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs index 798a70021..860b3897b 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionView.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionView.rs @@ -1,23 +1,8 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSDragging::*; -use crate::AppKit::generated::NSView::*; -use crate::AppKit::generated::NSViewController::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSCollectionViewSupplementaryElementKind = NSString; -use super::__exported::NSButton; -use super::__exported::NSCollectionViewLayout; -use super::__exported::NSCollectionViewLayoutAttributes; -use super::__exported::NSCollectionViewTransitionLayout; -use super::__exported::NSDraggingImageComponent; -use super::__exported::NSImageView; -use super::__exported::NSIndexSet; -use super::__exported::NSMutableIndexSet; -use super::__exported::NSNib; -use super::__exported::NSTextField; pub type NSCollectionViewElement = NSObject; pub type NSCollectionViewSectionHeaderView = NSObject; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 9506b8598..7cdbd6f85 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCollectionViewFlowLayout::*; -use crate::AppKit::generated::NSCollectionViewLayout::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs index 5d5196ebb..90e42329b 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCollectionView::*; -use crate::AppKit::generated::NSCollectionViewLayout::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs index 2a767be5e..d558f1ea4 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs @@ -1,6 +1,3 @@ -use super::__exported::NSColor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCollectionViewLayout::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs index 966c108b2..6433c7c3d 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -1,16 +1,8 @@ -use super::__exported::NSIndexPath; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCollectionView::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSCollectionViewDecorationElementKind = NSString; -use super::__exported::NSCollectionView; -use super::__exported::NSNib; extern_class!( #[derive(Debug)] pub struct NSCollectionViewLayoutAttributes; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs index 3e9c9a722..9acfd7df6 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCollectionViewLayout::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index a643b9472..e831aceff 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -1,17 +1,3 @@ -use super::__exported::NSAppearance; -use super::__exported::NSColorSpace; -use super::__exported::NSImage; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSColorList::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::CoreImage::generated::CIColor::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSColorList.rs b/crates/icrate/src/generated/AppKit/NSColorList.rs index 276df526f..a4c6e16b7 100644 --- a/crates/icrate/src/generated/AppKit/NSColorList.rs +++ b/crates/icrate/src/generated/AppKit/NSColorList.rs @@ -1,16 +1,9 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::CoreFoundation::generated::CFDictionary::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSColorListName = NSString; pub type NSColorName = NSString; -use super::__exported::NSBundle; -use super::__exported::NSColor; extern_class!( #[derive(Debug)] pub struct NSColorList; diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index 2929a96ff..c5ecf300c 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -1,8 +1,3 @@ -use super::__exported::NSColorList; -use super::__exported::NSMutableArray; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::AppKit::generated::NSPanel::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSColorPicker.rs b/crates/icrate/src/generated/AppKit/NSColorPicker.rs index 08df3344d..49f76eaba 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicker.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicker.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSColorPicking::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs index 850419c6c..120dbd80b 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs @@ -1,10 +1,3 @@ -use super::__exported::NSColor; -use super::__exported::NSColorList; -use super::__exported::NSColorSpace; -use super::__exported::NSImage; -use super::__exported::NSString; -use super::__exported::NSViewController; -use crate::AppKit::generated::NSTouchBarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSColorPicking.rs b/crates/icrate/src/generated/AppKit/NSColorPicking.rs index 8af32380e..d51464ef2 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicking.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicking.rs @@ -1,12 +1,3 @@ -use super::__exported::NSButtonCell; -use super::__exported::NSColor; -use super::__exported::NSColorList; -use super::__exported::NSColorPanel; -use super::__exported::NSImage; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSColorPanel::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSColorSampler.rs b/crates/icrate/src/generated/AppKit/NSColorSampler.rs index a3e6d9c95..cb6f79ca0 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSampler.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSampler.rs @@ -1,6 +1,3 @@ -use super::__exported::NSColor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index bfe15fd53..d75a0ac6f 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -1,8 +1,3 @@ -use super::__exported::NSData; -use crate::AppKit::generated::AppKitDefines::*; -use crate::ApplicationServices::generated::ApplicationServices::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSColorWell.rs b/crates/icrate/src/generated/AppKit/NSColorWell.rs index 3e8ccd7e7..87f21e90a 100644 --- a/crates/icrate/src/generated/AppKit/NSColorWell.rs +++ b/crates/icrate/src/generated/AppKit/NSColorWell.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSComboBox.rs b/crates/icrate/src/generated/AppKit/NSComboBox.rs index 24a71ee44..ccca67fda 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBox.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBox.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextField::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs index 5dffc97d6..ed36538a8 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs @@ -1,8 +1,3 @@ -use super::__exported::NSButtonCell; -use super::__exported::NSTableView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextFieldCell::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index 0b211f4d6..969090e90 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -1,14 +1,3 @@ -use super::__exported::NSAttributedString; -use super::__exported::NSCell; -use super::__exported::NSFont; -use super::__exported::NSFormatter; -use super::__exported::NSNotification; -use super::__exported::NSTextView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSText::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSController.rs b/crates/icrate/src/generated/AppKit/NSController.rs index e1b529fb3..3cf96754a 100644 --- a/crates/icrate/src/generated/AppKit/NSController.rs +++ b/crates/icrate/src/generated/AppKit/NSController.rs @@ -1,9 +1,3 @@ -use super::__exported::NSMutableArray; -use super::__exported::NSMutableDictionary; -use super::__exported::NSMutableSet; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSKeyValueBinding::*; -use crate::CoreFoundation::generated::CoreFoundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs index 8a925380b..33869c430 100644 --- a/crates/icrate/src/generated/AppKit/NSCursor.rs +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -1,10 +1,3 @@ -use super::__exported::NSColor; -use super::__exported::NSEvent; -use super::__exported::NSImage; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs index 80e2c6355..9040c6bab 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSImageRep::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs index ed125c425..c2553efe1 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTouchBarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDataAsset.rs b/crates/icrate/src/generated/AppKit/NSDataAsset.rs index ecf8dd78c..63ef4ac32 100644 --- a/crates/icrate/src/generated/AppKit/NSDataAsset.rs +++ b/crates/icrate/src/generated/AppKit/NSDataAsset.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDatePicker.rs b/crates/icrate/src/generated/AppKit/NSDatePicker.rs index 51ef020be..e24646ae0 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePicker.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePicker.rs @@ -1,9 +1,3 @@ -use super::__exported::NSCalendar; -use super::__exported::NSLocale; -use super::__exported::NSTimeZone; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSDatePickerCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index b62bb886a..205d3f430 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -1,9 +1,3 @@ -use super::__exported::NSCalendar; -use super::__exported::NSLocale; -use super::__exported::NSTimeZone; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSActionCell::*; -use crate::Foundation::generated::NSDate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs index a7fe04bf3..ab42d7189 100644 --- a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs +++ b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs @@ -1,7 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSArrayController::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index 1e8ce1919..80705d00d 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -1,4 +1,3 @@ -use crate::AppKit::generated::NSCollectionView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDockTile.rs b/crates/icrate/src/generated/AppKit/NSDockTile.rs index 0ddaf21b0..fe727bebb 100644 --- a/crates/icrate/src/generated/AppKit/NSDockTile.rs +++ b/crates/icrate/src/generated/AppKit/NSDockTile.rs @@ -1,9 +1,3 @@ -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -37,5 +31,4 @@ extern_methods!( pub unsafe fn owner(&self) -> Option>; } ); -use super::__exported::NSMenu; pub type NSDockTilePlugIn = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index 91d3b918c..f2d0b49d9 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -1,29 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSDate; -use super::__exported::NSError; -use super::__exported::NSFileWrapper; -use super::__exported::NSMenuItem; -use super::__exported::NSPageLayout; -use super::__exported::NSPrintInfo; -use super::__exported::NSPrintOperation; -use super::__exported::NSSavePanel; -use super::__exported::NSSharingService; -use super::__exported::NSSharingServicePicker; -use super::__exported::NSUndoManager; -use super::__exported::NSView; -use super::__exported::NSWindow; -use super::__exported::NSWindowController; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSKeyValueBinding::*; -use crate::AppKit::generated::NSMenu::*; -use crate::AppKit::generated::NSNib::*; -use crate::AppKit::generated::NSNibDeclarations::*; -use crate::AppKit::generated::NSPrintInfo::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSFilePresenter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDocumentController.rs b/crates/icrate/src/generated/AppKit/NSDocumentController.rs index 60283bc3a..19372367c 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentController.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentController.rs @@ -1,16 +1,3 @@ -use super::__exported::NSDocument; -use super::__exported::NSError; -use super::__exported::NSMenuItem; -use super::__exported::NSMutableDictionary; -use super::__exported::NSOpenPanel; -use super::__exported::NSWindow; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSMenu::*; -use crate::AppKit::generated::NSNibDeclarations::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs index 20f49b86b..4af004715 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs @@ -1,9 +1,3 @@ -use super::__exported::NSCloseCommand; -use super::__exported::NSScriptCommand; -use super::__exported::NSScriptObjectSpecifier; -use super::__exported::NSString; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSDocument::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs index 71c9cdf81..2180691a0 100644 --- a/crates/icrate/src/generated/AppKit/NSDragging.rs +++ b/crates/icrate/src/generated/AppKit/NSDragging.rs @@ -1,18 +1,3 @@ -use super::__exported::NSDraggingItem; -use super::__exported::NSDraggingSession; -use super::__exported::NSImage; -use super::__exported::NSPasteboard; -use super::__exported::NSPasteboardWriting; -use super::__exported::NSView; -use super::__exported::NSWindow; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs index 382575fdd..c3e88b1e9 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -1,9 +1,3 @@ -use super::__exported::NSPasteboardWriting; -use super::__exported::NSString; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs index 3700794a5..26d5a361e 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs @@ -1,14 +1,3 @@ -use super::__exported::NSDraggingItem; -use super::__exported::NSDraggingSource; -use super::__exported::NSImage; -use super::__exported::NSPasteboard; -use super::__exported::NSPasteboardWriting; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSDragging::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index 1e48b44a4..6a28e4707 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -1,15 +1,3 @@ -use super::__exported::NSLock; -use super::__exported::NSNotification; -use super::__exported::NSView; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSResponder::*; -use crate::AppKit::generated::NSWindow::*; -use crate::CoreFoundation::generated::CFDate::*; -use crate::CoreFoundation::generated::CFRunLoop::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs index 1b674719d..1c5db6417 100644 --- a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs @@ -1,6 +1,3 @@ -use super::__exported::NSPDFImageRep; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSImageRep::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSErrors.rs b/crates/icrate/src/generated/AppKit/NSErrors.rs index eb48a72cb..d52c6a49a 100644 --- a/crates/icrate/src/generated/AppKit/NSErrors.rs +++ b/crates/icrate/src/generated/AppKit/NSErrors.rs @@ -1,5 +1,3 @@ -use super::__exported::NSString; -use crate::AppKit::generated::AppKitDefines::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index d5c7cafb9..5e2b0cc81 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -1,14 +1,3 @@ -use super::__exported::NSGraphicsContext; -use super::__exported::NSTrackingArea; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTouch::*; -use crate::ApplicationServices::generated::ApplicationServices::*; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs index 1ee824dd5..d71cffb80 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs @@ -1,9 +1,3 @@ -use super::__exported::NSOperationQueue; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs index 0ace368ab..33996ff09 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs @@ -1,9 +1,3 @@ -use super::__exported::NSOperationQueue; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs index 3bda1d7b0..a7d1b1c79 100644 --- a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs +++ b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs @@ -1,6 +1,3 @@ -use super::__exported::NSImage; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSFileWrapper::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index dfc78a48b..64094fce1 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -1,11 +1,3 @@ -use super::__exported::NSAffineTransform; -use super::__exported::NSFontDescriptor; -use super::__exported::NSGraphicsContext; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSFontDescriptor::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs index 917934bb7..5b6a1342a 100644 --- a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs +++ b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs @@ -1,8 +1,3 @@ -use super::__exported::NSFontDescriptor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSProgress::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index 81610011e..4038127b3 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/NSFontCollection.rs @@ -1,10 +1,3 @@ -use super::__exported::NSFontDescriptor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSError::*; -use crate::Foundation::generated::NSLocale::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 46a802aa8..5a2c0ca11 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -1,15 +1,8 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSFontSymbolicTraits = u32; -use super::__exported::NSAffineTransform; pub type NSFontDescriptorAttributeName = NSString; pub type NSFontDescriptorTraitKey = NSString; pub type NSFontDescriptorVariationKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSFontManager.rs b/crates/icrate/src/generated/AppKit/NSFontManager.rs index 423961236..1d859ecbd 100644 --- a/crates/icrate/src/generated/AppKit/NSFontManager.rs +++ b/crates/icrate/src/generated/AppKit/NSFontManager.rs @@ -1,13 +1,3 @@ -use super::__exported::NSFont; -use super::__exported::NSFontDescriptor; -use super::__exported::NSFontPanel; -use super::__exported::NSMenu; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSMenu::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index b543175dd..906f98d1e 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -1,11 +1,3 @@ -use super::__exported::NSFont; -use super::__exported::NSFontDescriptor; -use super::__exported::NSFontManager; -use super::__exported::NSMutableArray; -use super::__exported::NSMutableDictionary; -use super::__exported::NSTableView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSPanel::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSForm.rs b/crates/icrate/src/generated/AppKit/NSForm.rs index 00dfdd587..0463b674f 100644 --- a/crates/icrate/src/generated/AppKit/NSForm.rs +++ b/crates/icrate/src/generated/AppKit/NSForm.rs @@ -1,6 +1,3 @@ -use super::__exported::NSFormCell; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSMatrix::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSFormCell.rs b/crates/icrate/src/generated/AppKit/NSFormCell.rs index 4bb797224..114a266dd 100644 --- a/crates/icrate/src/generated/AppKit/NSFormCell.rs +++ b/crates/icrate/src/generated/AppKit/NSFormCell.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSActionCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index e6224a659..e7c7337d1 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -1,11 +1,3 @@ -use super::__exported::NSEvent; -use super::__exported::NSPressureConfiguration; -use super::__exported::NSTouch; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTouch::*; -use crate::CoreGraphics::generated::CoreGraphics::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index 8151e6979..b09fa4e5e 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::NSFont::*; -use crate::Foundation::generated::NSAttributedString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs index a65bacd73..cd394bebd 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::NSFont::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index 412781cf2..0c2fedec6 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/NSGradient.rs @@ -1,10 +1,3 @@ -use super::__exported::NSBezierPath; -use super::__exported::NSColor; -use super::__exported::NSColorSpace; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs index 70284da23..d9262f940 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphics.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphics.rs @@ -1,7 +1,3 @@ -use super::__exported::NSColor; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSGeometry::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index 101beebd2..63aa5da65 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -1,12 +1,3 @@ -use super::__exported::NSBitmapImageRep; -use super::__exported::NSString; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSGraphics::*; -use crate::CoreGraphics::generated::CGContext::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -91,7 +82,6 @@ extern_methods!( pub unsafe fn setColorRenderingIntent(&self, colorRenderingIntent: NSColorRenderingIntent); } ); -use super::__exported::CIContext; extern_methods!( #[doc = "NSQuartzCoreAdditions"] unsafe impl NSGraphicsContext { diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index c6a9aaf64..2a2e15cf0 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -1,7 +1,3 @@ -use super::__exported::NSLayoutConstraint; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSLayoutAnchor::*; -use crate::AppKit::generated::NSView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs index 86066b8e6..9352a7c2c 100644 --- a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::NSTouchBarItem::*; -use crate::AppKit::generated::NSUserInterfaceCompression::*; -use crate::AppKit::generated::NSUserInterfaceLayout::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs index 7ddea1999..07f9cb919 100644 --- a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs +++ b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSHelpManager.rs b/crates/icrate/src/generated/AppKit/NSHelpManager.rs index 2ad9bf993..da3c77172 100644 --- a/crates/icrate/src/generated/AppKit/NSHelpManager.rs +++ b/crates/icrate/src/generated/AppKit/NSHelpManager.rs @@ -1,12 +1,3 @@ -use super::__exported::NSAttributedString; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::Foundation::generated::NSBundle::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSMapTable::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index 39a2504a4..d09f5ca8c 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -1,19 +1,3 @@ -use super::__exported::NSColor; -use super::__exported::NSGraphicsContext; -use super::__exported::NSImageRep; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSBitmapImageRep::*; -use crate::AppKit::generated::NSFontDescriptor::*; -use crate::AppKit::generated::NSGraphics::*; -use crate::AppKit::generated::NSLayoutConstraint::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::ApplicationServices::generated::ApplicationServices::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSBundle::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSImageCell.rs b/crates/icrate/src/generated/AppKit/NSImageCell.rs index e96b79295..788412411 100644 --- a/crates/icrate/src/generated/AppKit/NSImageCell.rs +++ b/crates/icrate/src/generated/AppKit/NSImageCell.rs @@ -1,6 +1,3 @@ -use super::__exported::NSImage; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index 8e5542d76..2907e7698 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -1,17 +1,3 @@ -use super::__exported::NSGraphicsContext; -use super::__exported::NSPasteboard; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSColorSpace::*; -use crate::AppKit::generated::NSGraphics::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::AppKit::generated::NSUserInterfaceLayout::*; -use crate::ApplicationServices::generated::ApplicationServices::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSImageView.rs b/crates/icrate/src/generated/AppKit/NSImageView.rs index 88847ed5a..a4ffaae36 100644 --- a/crates/icrate/src/generated/AppKit/NSImageView.rs +++ b/crates/icrate/src/generated/AppKit/NSImageView.rs @@ -1,8 +1,3 @@ -use super::__exported::NSImageSymbolConfiguration; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSImageCell::*; -use crate::AppKit::generated::NSMenu::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSInputManager.rs b/crates/icrate/src/generated/AppKit/NSInputManager.rs index 218504bff..1652cb264 100644 --- a/crates/icrate/src/generated/AppKit/NSInputManager.rs +++ b/crates/icrate/src/generated/AppKit/NSInputManager.rs @@ -1,12 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSAttributedString; -use super::__exported::NSEvent; -use super::__exported::NSImage; -use super::__exported::NSInputServer; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSInputServer.rs b/crates/icrate/src/generated/AppKit/NSInputServer.rs index e77518a77..06e5f22a3 100644 --- a/crates/icrate/src/generated/AppKit/NSInputServer.rs +++ b/crates/icrate/src/generated/AppKit/NSInputServer.rs @@ -1,7 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs index 34978f546..6eb277b1c 100644 --- a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSResponder::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSItemProvider.rs b/crates/icrate/src/generated/AppKit/NSItemProvider.rs index 124827806..b261038b6 100644 --- a/crates/icrate/src/generated/AppKit/NSItemProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSItemProvider.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSItemProvider::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index baf558732..54f19c78e 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -1,11 +1,3 @@ -use super::__exported::NSAttributeDescription; -use super::__exported::NSError; -use super::__exported::NSString; -use crate::AppKit::generated::AppKitDefines::*; -use crate::CoreData::generated::NSManagedObjectContext::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs index 2c13ee061..47709a663 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs @@ -1,7 +1,3 @@ -use super::__exported::NSLayoutConstraint; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index 19ca1586e..a7e16afad 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -1,13 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAnimation::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSLayoutAnchor::*; -use crate::AppKit::generated::NSView::*; -use crate::AppKit::generated::NSWindow::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs index 66a60b773..3776519fc 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs @@ -1,12 +1,3 @@ -use super::__exported::NSLayoutConstraint; -use super::__exported::NSLayoutDimension; -use super::__exported::NSLayoutXAxisAnchor; -use super::__exported::NSLayoutYAxisAnchor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSLayoutAnchor::*; -use crate::AppKit::generated::NSLayoutConstraint::*; -use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; -use crate::AppKit::generated::NSView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index ce38543b1..21a972c8d 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -1,16 +1,3 @@ -use super::__exported::NSAffineTransform; -use super::__exported::NSBox; -use super::__exported::NSColor; -use super::__exported::NSGraphicsContext; -use super::__exported::NSRulerMarker; -use super::__exported::NSRulerView; -use super::__exported::NSTextContainer; -use super::__exported::NSTextView; -use super::__exported::NSTypesetter; -use crate::AppKit::generated::NSFont::*; -use crate::AppKit::generated::NSGlyphGenerator::*; -use crate::AppKit::generated::NSTextStorage::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs index 2901f7d1d..cc340a648 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSLevelIndicatorCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs index 5b0d8b03d..5c86149eb 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSActionCell::*; -use crate::AppKit::generated::NSSliderCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs index c094d4a66..1a2140c24 100644 --- a/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSGestureRecognizer::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index 7b1772109..e1b92570b 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -1,8 +1,3 @@ -use super::__exported::NSColor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs index 9d02bf2ba..94f3a6a7d 100644 --- a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs +++ b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 2a4d9a1d1..52b69c57f 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -1,11 +1,3 @@ -use super::__exported::NSEvent; -use super::__exported::NSFont; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSMenuItem::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs index 971373174..2118bf700 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -1,14 +1,3 @@ -use super::__exported::NSAttributedString; -use super::__exported::NSImage; -use super::__exported::NSMenu; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs index 4d8d819b7..041d76d53 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs @@ -1,7 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSButtonCell::*; -use crate::AppKit::generated::NSMenu::*; -use crate::AppKit::generated::NSMenuItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs index defd8b620..05941b602 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs @@ -1,5 +1,3 @@ -use super::__exported::NSMenu; -use crate::AppKit::generated::NSToolbarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSMovie.rs b/crates/icrate/src/generated/AppKit/NSMovie.rs index f18d0b4dc..bb5d8e0fc 100644 --- a/crates/icrate/src/generated/AppKit/NSMovie.rs +++ b/crates/icrate/src/generated/AppKit/NSMovie.rs @@ -1,6 +1,3 @@ -use super::__exported::QTMovie; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index cf41374bf..046e62a60 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSNibLoading.rs b/crates/icrate/src/generated/AppKit/NSNibLoading.rs index 6d07cdaba..09c006355 100644 --- a/crates/icrate/src/generated/AppKit/NSNibLoading.rs +++ b/crates/icrate/src/generated/AppKit/NSNibLoading.rs @@ -1,9 +1,3 @@ -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSNib::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSBundle::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSObjectController.rs b/crates/icrate/src/generated/AppKit/NSObjectController.rs index 4554ce39a..17784a65c 100644 --- a/crates/icrate/src/generated/AppKit/NSObjectController.rs +++ b/crates/icrate/src/generated/AppKit/NSObjectController.rs @@ -1,11 +1,3 @@ -use super::__exported::NSError; -use super::__exported::NSFetchRequest; -use super::__exported::NSManagedObjectContext; -use super::__exported::NSPredicate; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSController::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index a68e3e460..08fac479c 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -1,10 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSScreen; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; -use crate::OpenGL::generated::gltypes::*; -use crate::OpenGL::generated::CGLTypes::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs index 3e96bc653..c0128ffe0 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs @@ -1,7 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSOpenGL::*; -use crate::AppKit::generated::NSView::*; -use crate::QuartzCore::generated::CAOpenGLLayer::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs index 345217e8e..25b88c5ef 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs @@ -1,8 +1,3 @@ -use super::__exported::NSOpenGLContext; -use super::__exported::NSOpenGLPixelFormat; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSOpenGL::*; -use crate::AppKit::generated::NSView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs index 2e50bfb49..7ae1079a8 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs @@ -1,8 +1,3 @@ -use super::__exported::NSString; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSSavePanel::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index 58724ae21..5953affe1 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -1,14 +1,3 @@ -use super::__exported::NSButtonCell; -use super::__exported::NSNotification; -use super::__exported::NSString; -use super::__exported::NSTableColumn; -use super::__exported::NSTableHeaderView; -use super::__exported::NSTableView; -use super::__exported::NSTintConfiguration; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTableView::*; -use crate::CoreFoundation::generated::CFDictionary::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs index 83510dc12..52e3ac050 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSImageRep::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs index a747b4579..5af9e2771 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs @@ -1,10 +1,3 @@ -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSPrintInfo::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs index 020756fa7..134a31534 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs @@ -1,10 +1,3 @@ -use super::__exported::NSMutableArray; -use super::__exported::NSPDFInfo; -use super::__exported::NSString; -use super::__exported::NSViewController; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs index 6633e1f93..c97ed2c77 100644 --- a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSImageRep::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPageController.rs b/crates/icrate/src/generated/AppKit/NSPageController.rs index c290feb34..6282fd1c6 100644 --- a/crates/icrate/src/generated/AppKit/NSPageController.rs +++ b/crates/icrate/src/generated/AppKit/NSPageController.rs @@ -1,10 +1,3 @@ -use super::__exported::NSMutableDictionary; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAnimation::*; -use crate::AppKit::generated::NSViewController::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPageLayout.rs b/crates/icrate/src/generated/AppKit/NSPageLayout.rs index a0bdf52e5..405c9d934 100644 --- a/crates/icrate/src/generated/AppKit/NSPageLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSPageLayout.rs @@ -1,11 +1,3 @@ -use super::__exported::NSPrintInfo; -use super::__exported::NSView; -use super::__exported::NSViewController; -use super::__exported::NSWindow; -use super::__exported::NSWindowController; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs index c882747d2..5f3391921 100644 --- a/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSGestureRecognizer::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index 9e9c68221..fe4d1bf21 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSWindow::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index 68ad3f2ff..a78c10d45 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -1,7 +1,3 @@ -use super::__exported::NSTextBlock; -use super::__exported::NSTextList; -use crate::AppKit::generated::NSText::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index b9b05d3f8..d8ec42be5 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -1,13 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSFileWrapper; -use super::__exported::NSMutableDictionary; -use crate::AppKit::generated::AppKitDefines::*; -use crate::CoreFoundation::generated::CFBase::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSString::*; -use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -15,7 +5,6 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSPasteboardType = NSString; pub type NSPasteboardName = NSString; pub type NSPasteboardReadingOptionKey = NSString; -use super::__exported::NSPasteboardItem; extern_class!( #[derive(Debug)] pub struct NSPasteboard; diff --git a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs index fcb7b105f..a47d8d07b 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs @@ -1,8 +1,3 @@ -use super::__exported::NSPasteboard; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::CoreFoundation::generated::CFBase::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs index 63217f4ba..72aaf5742 100644 --- a/crates/icrate/src/generated/AppKit/NSPathCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -1,17 +1,3 @@ -use super::__exported::NSAnimation; -use super::__exported::NSImage; -use super::__exported::NSNotification; -use super::__exported::NSOpenPanel; -use super::__exported::NSPathComponentCell; -use super::__exported::NSPopUpButtonCell; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSActionCell::*; -use crate::AppKit::generated::NSMenu::*; -use crate::AppKit::generated::NSSavePanel::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs index 9bd3f3e67..9d63a3567 100644 --- a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs @@ -1,9 +1,3 @@ -use super::__exported::NSImage; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextFieldCell::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPathControl.rs b/crates/icrate/src/generated/AppKit/NSPathControl.rs index 2f47af037..dfcbd9c6a 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControl.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControl.rs @@ -1,12 +1,3 @@ -use super::__exported::NSOpenPanel; -use super::__exported::NSPathComponentCell; -use super::__exported::NSPathControlItem; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSDragging::*; -use crate::AppKit::generated::NSPathCell::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs index 68e7aaa77..0eca894c3 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs @@ -1,7 +1,3 @@ -use super::__exported::NSPathComponentCell; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSImage::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs index 08ae08249..05b46c565 100644 --- a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs @@ -1,8 +1,3 @@ -use super::__exported::NSManagedObjectContext; -use super::__exported::NSManagedObjectModel; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSDocument::*; -use crate::Foundation::generated::NSDictionary::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs index ec395946f..940c88602 100644 --- a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs @@ -1,6 +1,3 @@ -use super::__exported::NSColor; -use super::__exported::NSImage; -use crate::AppKit::generated::NSTouchBarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs index b1a9045ef..7eb9dbd8a 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -1,9 +1,3 @@ -use super::__exported::NSMenu; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSButton::*; -use crate::AppKit::generated::NSMenuItem::*; -use crate::AppKit::generated::NSMenuItemCell::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index 8f066a2ee..522a14447 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -1,9 +1,3 @@ -use super::__exported::NSMenu; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSMenu::*; -use crate::AppKit::generated::NSMenuItem::*; -use crate::AppKit::generated::NSMenuItemCell::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index c7d61777f..4f4e65c46 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -1,14 +1,3 @@ -use super::__exported::NSNotification; -use super::__exported::NSString; -use super::__exported::NSView; -use super::__exported::NSViewController; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAppearance::*; -use crate::AppKit::generated::NSNibDeclarations::*; -use crate::AppKit::generated::NSResponder::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs index 818657d8b..e59f9d7c8 100644 --- a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs @@ -1,4 +1,3 @@ -use crate::AppKit::generated::NSTouchBarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs index a619158e5..3005855ce 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSPredicateEditorRowTemplate; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSRuleEditor::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs index 1f523cab9..0385b571f 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs @@ -1,11 +1,3 @@ -use super::__exported::NSEntityDescription; -use super::__exported::NSPredicate; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::CoreData::generated::NSAttributeDescription::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSComparisonPredicate::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs index 0b134d51b..b8202cc5e 100644 --- a/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSGestureRecognizer::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs index 92b439d4f..dcf4f9869 100644 --- a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs @@ -1,8 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSEvent::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs index 1007bfee1..c16d89a4c 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -1,10 +1,3 @@ -use super::__exported::NSPDFInfo; -use super::__exported::NSPrinter; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSPrinter::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs index 9dc01fe26..057a2bbad 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -1,13 +1,3 @@ -use super::__exported::NSGraphicsContext; -use super::__exported::NSMutableData; -use super::__exported::NSPDFPanel; -use super::__exported::NSPrintInfo; -use super::__exported::NSPrintPanel; -use super::__exported::NSView; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index ce59b6fdf..4f28390db 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -1,15 +1,3 @@ -use super::__exported::NSPrintInfo; -use super::__exported::NSSet; -use super::__exported::NSView; -use super::__exported::NSViewController; -use super::__exported::NSWindow; -use super::__exported::NSWindowController; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSHelpManager::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSPrinter.rs b/crates/icrate/src/generated/AppKit/NSPrinter.rs index a52db4901..4298a8421 100644 --- a/crates/icrate/src/generated/AppKit/NSPrinter.rs +++ b/crates/icrate/src/generated/AppKit/NSPrinter.rs @@ -1,9 +1,3 @@ -use super::__exported::NSString; -use crate::AppKit::generated::NSGraphics::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs index 5cb034f39..6fad2d669 100644 --- a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs @@ -1,7 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSResponder.rs b/crates/icrate/src/generated/AppKit/NSResponder.rs index 36b364313..405a0871d 100644 --- a/crates/icrate/src/generated/AppKit/NSResponder.rs +++ b/crates/icrate/src/generated/AppKit/NSResponder.rs @@ -1,14 +1,3 @@ -use super::__exported::NSError; -use super::__exported::NSEvent; -use super::__exported::NSMenu; -use super::__exported::NSUndoManager; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAccessibilityProtocols::*; -use crate::AppKit::generated::NSEvent::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs index c3235968f..e0cb0ee11 100644 --- a/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSGestureRecognizer::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index ee210d614..61695fe73 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -1,12 +1,3 @@ -use super::__exported::NSIndexSet; -use super::__exported::NSPredicate; -use super::__exported::NSString; -use super::__exported::NSView; -use super::__exported::NSViewAnimation; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs index 56b74df1e..100ffbd7e 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs @@ -1,9 +1,3 @@ -use super::__exported::NSEvent; -use super::__exported::NSImage; -use super::__exported::NSRulerView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs index 3e7664c55..edd54e106 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerView.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -1,8 +1,3 @@ -use super::__exported::NSRulerMarker; -use super::__exported::NSScrollView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs index 45efd2e3d..daf1d10d1 100644 --- a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs @@ -1,11 +1,3 @@ -use super::__exported::NSDate; -use super::__exported::NSImage; -use super::__exported::NSLock; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSWorkspace::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index 29a83f548..4c614ebd7 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -1,15 +1,3 @@ -use super::__exported::NSBox; -use super::__exported::NSControl; -use super::__exported::NSProgressIndicator; -use super::__exported::NSTextField; -use super::__exported::NSTextView; -use super::__exported::NSView; -use super::__exported::UTType; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSNibDeclarations::*; -use crate::AppKit::generated::NSPanel::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSScreen.rs b/crates/icrate/src/generated/AppKit/NSScreen.rs index dcde552a0..3d9bc4cb1 100644 --- a/crates/icrate/src/generated/AppKit/NSScreen.rs +++ b/crates/icrate/src/generated/AppKit/NSScreen.rs @@ -1,12 +1,3 @@ -use super::__exported::NSColorSpace; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSGraphics::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index 9d87c1b7f..c9b3a290a 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -1,12 +1,3 @@ -use super::__exported::NSClipView; -use super::__exported::NSColor; -use super::__exported::NSRulerView; -use super::__exported::NSScroller; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSScroller::*; -use crate::AppKit::generated::NSTextFinder::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::NSDate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSScroller.rs b/crates/icrate/src/generated/AppKit/NSScroller.rs index 0418df56c..f297b04c1 100644 --- a/crates/icrate/src/generated/AppKit/NSScroller.rs +++ b/crates/icrate/src/generated/AppKit/NSScroller.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSControl::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs index 4718d83d8..e7cecf68d 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubber.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -1,12 +1,3 @@ -use super::__exported::NSButton; -use super::__exported::NSNib; -use super::__exported::NSPanGestureRecognizer; -use super::__exported::NSPressGestureRecognizer; -use super::__exported::NSScrubberItemView; -use super::__exported::NSScrubberLayout; -use super::__exported::NSScrubberSelectionView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs index ced537831..ca310032a 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs @@ -1,10 +1,3 @@ -use super::__exported::NSImageView; -use super::__exported::NSScrubberLayoutAttributes; -use super::__exported::NSTextField; -use crate::os::generated::lock::*; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSImageCell::*; -use crate::AppKit::generated::NSView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs index 9bb1beb10..20f6584bf 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs @@ -1,8 +1,3 @@ -use super::__exported::NSIndexSet; -use super::__exported::NSScrubber; -use super::__exported::NSScrubberDelegate; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSGeometry::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSearchField.rs b/crates/icrate/src/generated/AppKit/NSSearchField.rs index 47734191e..8cc9d8698 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchField.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchField.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextField::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs index b79eaffcc..61f8d40d3 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs @@ -1,12 +1,3 @@ -use super::__exported::NSButtonCell; -use super::__exported::NSImage; -use super::__exported::NSMenu; -use super::__exported::NSMutableArray; -use super::__exported::NSTimer; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSSearchField::*; -use crate::AppKit::generated::NSTextFieldCell::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs index d99c148a6..e82224d9b 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs @@ -1,7 +1,3 @@ -use super::__exported::NSSearchField; -use super::__exported::NSView; -use crate::AppKit::generated::NSToolbarItem::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSecureTextField.rs b/crates/icrate/src/generated/AppKit/NSSecureTextField.rs index a5943fc86..395be5ec3 100644 --- a/crates/icrate/src/generated/AppKit/NSSecureTextField.rs +++ b/crates/icrate/src/generated/AppKit/NSSecureTextField.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextField::*; -use crate::AppKit::generated::NSTextFieldCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs index e7961938b..a10ca8cb6 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs @@ -1,8 +1,3 @@ -use super::__exported::NSMutableArray; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSActionCell::*; -use crate::AppKit::generated::NSSegmentedControl::*; -use crate::Foundation::generated::NSGeometry::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs index 5af688503..2dc2c46e1 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs @@ -1,8 +1,3 @@ -use super::__exported::NSImage; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSUserInterfaceCompression::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSShadow.rs b/crates/icrate/src/generated/AppKit/NSShadow.rs index 2dab41c3a..4f1254b39 100644 --- a/crates/icrate/src/generated/AppKit/NSShadow.rs +++ b/crates/icrate/src/generated/AppKit/NSShadow.rs @@ -1,7 +1,3 @@ -use super::__exported::NSColor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index 600f24472..4499a2e5d 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -1,16 +1,3 @@ -use super::__exported::CKContainer; -use super::__exported::CKShare; -use super::__exported::NSError; -use super::__exported::NSImage; -use super::__exported::NSString; -use super::__exported::NSView; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSItemProvider::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs index 3eab5f098..c5ef60d1e 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::NSSharingService::*; -use crate::AppKit::generated::NSToolbarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs index ad2f6b626..52f434337 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs @@ -1,7 +1,3 @@ -use super::__exported::NSImage; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSSharingService::*; -use crate::AppKit::generated::NSTouchBarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSlider.rs b/crates/icrate/src/generated/AppKit/NSSlider.rs index 85461fde0..65f32ad97 100644 --- a/crates/icrate/src/generated/AppKit/NSSlider.rs +++ b/crates/icrate/src/generated/AppKit/NSSlider.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSSliderCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs index fd83ed26d..39e9b385d 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs @@ -1,7 +1,3 @@ -use super::__exported::NSImage; -use super::__exported::NSSlider; -use crate::AppKit::generated::NSAccessibility::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index 0f8bc11ad..99f8ee6eb 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSActionCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs index 1eb8416d6..5060d76d1 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs @@ -1,7 +1,3 @@ -use super::__exported::NSSlider; -use super::__exported::NSSliderAccessory; -use crate::AppKit::generated::NSTouchBarItem::*; -use crate::AppKit::generated::NSUserInterfaceCompression::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs index 8d5a899c4..30726d044 100644 --- a/crates/icrate/src/generated/AppKit/NSSound.rs +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -1,10 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSBundle::*; -use crate::Foundation::generated::NSDate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs index 3b1183dac..ce9a7dc3d 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs @@ -1,7 +1,3 @@ -use super::__exported::NSString; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index c7349e93f..768343ba3 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -1,11 +1,3 @@ -use super::__exported::NSError; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index 26fcb6de9..c42b5814b 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -1,16 +1,3 @@ -use super::__exported::NSMenu; -use super::__exported::NSOrthography; -use super::__exported::NSPanel; -use super::__exported::NSString; -use super::__exported::NSView; -use super::__exported::NSViewController; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; -use crate::Foundation::generated::NSTextCheckingResult::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs index 5251da992..e5147c331 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs index ef18c019a..a37a76962 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitView.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -1,12 +1,8 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSLayoutConstraint::*; -use crate::AppKit::generated::NSView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSSplitViewAutosaveName = NSString; -use super::__exported::NSNotification; extern_class!( #[derive(Debug)] pub struct NSSplitView; diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs index c9f80bfc1..403e09051 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs @@ -1,9 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSSplitView::*; -use crate::AppKit::generated::NSSplitViewItem::*; -use crate::AppKit::generated::NSViewController::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs index 47f66e119..d0ea389e8 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs @@ -1,8 +1,3 @@ -use super::__exported::NSViewController; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAnimation::*; -use crate::AppKit::generated::NSLayoutConstraint::*; -use crate::AppKit::generated::NSWindow::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index 91ec548e2..6e7f6df30 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -1,9 +1,3 @@ -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::AppKit::generated::NSLayoutConstraint::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSStatusBar.rs b/crates/icrate/src/generated/AppKit/NSStatusBar.rs index 3bf15a5b8..e5c700502 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBar.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBar.rs @@ -1,10 +1,3 @@ -use super::__exported::NSColor; -use super::__exported::NSFont; -use super::__exported::NSMutableArray; -use super::__exported::NSStatusItem; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs b/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs index 4f168583e..7e50e1777 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSButton::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs index 23d44cf5b..fe52b9599 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusItem.rs @@ -1,18 +1,8 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSEvent::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSStatusItemAutosaveName = NSString; -use super::__exported::NSAttributedString; -use super::__exported::NSImage; -use super::__exported::NSMenu; -use super::__exported::NSStatusBar; -use super::__exported::NSStatusBarButton; -use super::__exported::NSView; -use super::__exported::NSWindow; extern_class!( #[derive(Debug)] pub struct NSStatusItem; diff --git a/crates/icrate/src/generated/AppKit/NSStepper.rs b/crates/icrate/src/generated/AppKit/NSStepper.rs index f21ad392a..2d743bb0b 100644 --- a/crates/icrate/src/generated/AppKit/NSStepper.rs +++ b/crates/icrate/src/generated/AppKit/NSStepper.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSStepperCell.rs b/crates/icrate/src/generated/AppKit/NSStepperCell.rs index c78d6e979..dec76e271 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperCell.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperCell.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSActionCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs index 268256793..d8c785910 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs @@ -1,4 +1,3 @@ -use crate::AppKit::generated::NSTouchBarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSStoryboard.rs b/crates/icrate/src/generated/AppKit/NSStoryboard.rs index 36fe0461e..7bb811574 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboard.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboard.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs index d7c2edd7f..ea793d38b 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs index dcc217273..29e856755 100644 --- a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs +++ b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::NSAttributedString::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSSwitch.rs b/crates/icrate/src/generated/AppKit/NSSwitch.rs index a80590abd..faae033a5 100644 --- a/crates/icrate/src/generated/AppKit/NSSwitch.rs +++ b/crates/icrate/src/generated/AppKit/NSSwitch.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs index 6f9d14b22..323082f10 100644 --- a/crates/icrate/src/generated/AppKit/NSTabView.rs +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -1,11 +1,3 @@ -use super::__exported::NSFont; -use super::__exported::NSTabViewItem; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSLayoutConstraint::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTabViewController.rs b/crates/icrate/src/generated/AppKit/NSTabViewController.rs index bd26170de..262000a4f 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewController.rs @@ -1,8 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTabView::*; -use crate::AppKit::generated::NSToolbar::*; -use crate::AppKit::generated::NSViewController::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs index 84c22453a..cae023c5f 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs @@ -1,12 +1,3 @@ -use super::__exported::NSColor; -use super::__exported::NSImage; -use super::__exported::NSTabView; -use super::__exported::NSView; -use super::__exported::NSViewController; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTableCellView.rs b/crates/icrate/src/generated/AppKit/NSTableCellView.rs index 3c165aa97..872107b94 100644 --- a/crates/icrate/src/generated/AppKit/NSTableCellView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableCellView.rs @@ -1,13 +1,3 @@ -use super::__exported::NSDraggingImageComponent; -use super::__exported::NSImageView; -use super::__exported::NSTextField; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSNibDeclarations::*; -use crate::AppKit::generated::NSTableView::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs index 82e77eaab..e353855cf 100644 --- a/crates/icrate/src/generated/AppKit/NSTableColumn.rs +++ b/crates/icrate/src/generated/AppKit/NSTableColumn.rs @@ -1,12 +1,3 @@ -use super::__exported::NSCell; -use super::__exported::NSImage; -use super::__exported::NSSortDescriptor; -use super::__exported::NSTableHeaderCell; -use super::__exported::NSTableView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs index 8b397f037..afcbd719b 100644 --- a/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextFieldCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs index 2d7d5aad6..6e44c1235 100644 --- a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs @@ -1,9 +1,3 @@ -use super::__exported::NSColor; -use super::__exported::NSCursor; -use super::__exported::NSImage; -use super::__exported::NSTableView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTableRowView.rs b/crates/icrate/src/generated/AppKit/NSTableRowView.rs index 57483d34d..c0befb27d 100644 --- a/crates/icrate/src/generated/AppKit/NSTableRowView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableRowView.rs @@ -1,9 +1,3 @@ -use super::__exported::NSLayoutConstraint; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSTableView::*; -use crate::AppKit::generated::NSView::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index 300ad2f06..1268e6ea7 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -1,18 +1,3 @@ -use super::__exported::NSIndexSet; -use super::__exported::NSMutableIndexSet; -use super::__exported::NSNib; -use super::__exported::NSSortDescriptor; -use super::__exported::NSTableColumn; -use super::__exported::NSTableHeaderView; -use super::__exported::NSTableRowView; -use super::__exported::NSTableViewRowAction; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSDragging::*; -use crate::AppKit::generated::NSTextView::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs index b1dca9b6c..92d890385 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -1,8 +1,3 @@ -use super::__exported::NSDiffableDataSourceSnapshot; -use super::__exported::NSTableCellView; -use super::__exported::NSTableRowView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTableView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs index 61bc362a6..9c7a1619e 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs @@ -1,8 +1,3 @@ -use super::__exported::NSButton; -use super::__exported::NSColor; -use super::__exported::NSImage; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index 7d652b260..25b7a32dc 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -1,9 +1,3 @@ -use super::__exported::NSColor; -use super::__exported::NSFont; -use super::__exported::NSNotification; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSSpellProtocol::*; -use crate::AppKit::generated::NSView::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs index 476502e57..3d3306342 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs @@ -1,8 +1,3 @@ -use super::__exported::NSString; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index 5cd3a5a55..2aa6c60f1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -1,16 +1,3 @@ -use super::__exported::NSFileWrapper; -use super::__exported::NSImage; -use super::__exported::NSLayoutManager; -use super::__exported::NSTextAttachmentCell; -use super::__exported::NSTextAttachmentCell; -use super::__exported::NSTextContainer; -use super::__exported::NSTextLayoutManager; -use super::__exported::NSTextLocation; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextAttachmentCell::*; -use crate::CoreGraphics::generated::CGGeometry::*; -use crate::Foundation::generated::NSAttributedString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs index 00b16b0af..d700f3ae2 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs @@ -1,7 +1,3 @@ -use super::__exported::NSLayoutManager; -use super::__exported::NSTextAttachment; -use super::__exported::NSTextContainer; -use crate::AppKit::generated::NSCell::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs index c95749eb7..a295d7167 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs @@ -1,14 +1,3 @@ -use super::__exported::NSAttributedString; -use super::__exported::NSCandidateListTouchBarItem; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextInputClient::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSAttributedString::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs index 2f0dc6c25..37643e709 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs @@ -1,15 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSSpellChecker::*; -use crate::AppKit::generated::NSTextCheckingClient::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSAttributedString::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; -use crate::Foundation::generated::NSString::*; -use crate::Foundation::generated::NSTextCheckingResult::*; -use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextContainer.rs b/crates/icrate/src/generated/AppKit/NSTextContainer.rs index 3d4cc82a2..3e4d6bdf0 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContainer.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContainer.rs @@ -1,8 +1,3 @@ -use super::__exported::NSBezierPath; -use super::__exported::NSTextLayoutManager; -use crate::AppKit::generated::NSLayoutManager::*; -use crate::AppKit::generated::NSParagraphStyle::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextContent.rs b/crates/icrate/src/generated/AppKit/NSTextContent.rs index 5c6b2e238..d44cba4ce 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContent.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContent.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index 5c8f30c1d..43a5acc01 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -1,13 +1,3 @@ -use super::__exported::NSTextElement; -use super::__exported::NSTextLayoutManager; -use super::__exported::NSTextLocation; -use super::__exported::NSTextParagraph; -use super::__exported::NSTextRange; -use super::__exported::NSTextStorage; -use super::__exported::NSTextStorageObserving; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSNotification::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextElement.rs b/crates/icrate/src/generated/AppKit/NSTextElement.rs index 3db76d774..e347631c8 100644 --- a/crates/icrate/src/generated/AppKit/NSTextElement.rs +++ b/crates/icrate/src/generated/AppKit/NSTextElement.rs @@ -1,6 +1,3 @@ -use super::__exported::NSTextContentManager; -use super::__exported::NSTextRange; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextField.rs b/crates/icrate/src/generated/AppKit/NSTextField.rs index b86f1c7ef..158256fae 100644 --- a/crates/icrate/src/generated/AppKit/NSTextField.rs +++ b/crates/icrate/src/generated/AppKit/NSTextField.rs @@ -1,9 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSControl::*; -use crate::AppKit::generated::NSParagraphStyle::*; -use crate::AppKit::generated::NSTextContent::*; -use crate::AppKit::generated::NSTextFieldCell::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs index 4e58bfb45..2e455d614 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs @@ -1,7 +1,3 @@ -use super::__exported::NSColor; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSActionCell::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index d59cc047d..d8bb33ec2 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -1,11 +1,3 @@ -use super::__exported::NSOperationQueue; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSNibDeclarations::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs index 1a31f7b31..9aa194a49 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs @@ -1,10 +1,3 @@ -use super::__exported::NSAttributedString; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSAttributedString::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs index aa48459cc..2396a8591 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs @@ -1,8 +1,3 @@ -use super::__exported::NSEvent; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextInputClient::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSNotification::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index ef104c142..f3b72226b 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -1,13 +1,3 @@ -use super::__exported::NSOperationQueue; -use super::__exported::NSTextAttachmentViewProvider; -use super::__exported::NSTextElement; -use super::__exported::NSTextLayoutManager; -use super::__exported::NSTextLineFragment; -use super::__exported::NSTextLocation; -use super::__exported::NSTextParagraph; -use super::__exported::NSTextRange; -use crate::CoreGraphics::generated::CoreGraphics::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index 88f2d82c1..a1798ce37 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -1,15 +1,3 @@ -use super::__exported::NSTextContainer; -use super::__exported::NSTextContentManager; -use super::__exported::NSTextElement; -use super::__exported::NSTextLocation; -use super::__exported::NSTextRange; -use super::__exported::NSTextSelection; -use super::__exported::NSTextSelectionDataSource; -use super::__exported::NSTextSelectionNavigation; -use super::__exported::NSTextViewportLayoutController; -use crate::AppKit::generated::NSTextLayoutFragment::*; -use crate::CoreGraphics::generated::CGGeometry::*; -use crate::Foundation::generated::NSAttributedString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs index d9da0d8eb..ccd4d4376 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs @@ -1,6 +1,3 @@ -use crate::CoreGraphics::generated::CoreGraphics::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSAttributedString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index 00b61ea2c..f9cce353b 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextRange.rs b/crates/icrate/src/generated/AppKit/NSTextRange.rs index 442d423a1..bf39c0263 100644 --- a/crates/icrate/src/generated/AppKit/NSTextRange.rs +++ b/crates/icrate/src/generated/AppKit/NSTextRange.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextSelection.rs b/crates/icrate/src/generated/AppKit/NSTextSelection.rs index 80ef3b875..df2dccc58 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelection.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelection.rs @@ -1,7 +1,3 @@ -use super::__exported::NSTextLocation; -use super::__exported::NSTextRange; -use crate::CoreGraphics::generated::CGGeometry::*; -use crate::Foundation::generated::NSAttributedString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index 1f59d97d4..af254d78a 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -1,10 +1,3 @@ -use super::__exported::NSTextLineFragment; -use super::__exported::NSTextLocation; -use super::__exported::NSTextRange; -use super::__exported::NSTextSelection; -use crate::AppKit::generated::NSTextSelection::*; -use crate::CoreGraphics::generated::CGGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index 38a49b57d..687fad7ea 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -1,9 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSLayoutManager; -use super::__exported::NSNotification; -use crate::AppKit::generated::NSAttributedString::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs index bbba3b110..71768c5c1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::NSTextStorage::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextTable.rs b/crates/icrate/src/generated/AppKit/NSTextTable.rs index c1aac4f4b..c52edd80c 100644 --- a/crates/icrate/src/generated/AppKit/NSTextTable.rs +++ b/crates/icrate/src/generated/AppKit/NSTextTable.rs @@ -1,6 +1,3 @@ -use super::__exported::NSLayoutManager; -use super::__exported::NSTextContainer; -use crate::AppKit::generated::NSText::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index c6b23a405..9d2e024f1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -1,39 +1,3 @@ -use super::__exported::NSLayoutManager; -use super::__exported::NSOrthography; -use super::__exported::NSParagraphStyle; -use super::__exported::NSRulerMarker; -use super::__exported::NSRulerView; -use super::__exported::NSSharingServicePicker; -use super::__exported::NSTextAttachment; -use super::__exported::NSTextAttachmentCell; -use super::__exported::NSTextContainer; -use super::__exported::NSTextContentStorage; -use super::__exported::NSTextLayoutManager; -use super::__exported::NSTextLayoutOrientationProvider; -use super::__exported::NSTextStorage; -use super::__exported::NSUndoManager; -use super::__exported::NSValue; -use super::__exported::QLPreviewItem; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCandidateListTouchBarItem::*; -use crate::AppKit::generated::NSColorPanel::*; -use crate::AppKit::generated::NSDragging::*; -use crate::AppKit::generated::NSInputManager::*; -use crate::AppKit::generated::NSLayoutManager::*; -use crate::AppKit::generated::NSMenu::*; -use crate::AppKit::generated::NSNibDeclarations::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::AppKit::generated::NSSpellChecker::*; -use crate::AppKit::generated::NSText::*; -use crate::AppKit::generated::NSTextAttachment::*; -use crate::AppKit::generated::NSTextContent::*; -use crate::AppKit::generated::NSTextFinder::*; -use crate::AppKit::generated::NSTextInputClient::*; -use crate::AppKit::generated::NSTouchBarItem::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSTextCheckingResult::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs index d9298fada..49bba0368 100644 --- a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs @@ -1,9 +1,3 @@ -use super::__exported::NSTextLayoutFragment; -use super::__exported::NSTextLayoutManager; -use super::__exported::NSTextLocation; -use super::__exported::NSTextRange; -use crate::CoreGraphics::generated::CGGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs index 787fa2fb3..4a41ac860 100644 --- a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs @@ -1,4 +1,3 @@ -use crate::AppKit::generated::NSColor::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs b/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs index 6945b300f..a0e15e247 100644 --- a/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs @@ -1,7 +1,3 @@ -use super::__exported::NSClipView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSLayoutConstraint::*; -use crate::AppKit::generated::NSViewController::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTokenField.rs b/crates/icrate/src/generated/AppKit/NSTokenField.rs index 3eb81eb7f..e1760b882 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenField.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenField.rs @@ -1,8 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextContainer::*; -use crate::AppKit::generated::NSTextField::*; -use crate::AppKit::generated::NSTokenFieldCell::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs index 8050e168b..d4502ce88 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -1,7 +1,3 @@ -use super::__exported::NSTextContainer; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSTextFieldCell::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index ccef3d1b3..9b442d0a2 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -1,14 +1,9 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSToolbarIdentifier = NSString; pub type NSToolbarItemIdentifier = NSString; -use super::__exported::NSToolbarItem; -use super::__exported::NSView; -use super::__exported::NSWindow; extern_class!( #[derive(Debug)] pub struct NSToolbar; diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index c531da2b5..f49a886bb 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -1,13 +1,3 @@ -use super::__exported::CKShare; -use super::__exported::NSImage; -use super::__exported::NSMenuItem; -use super::__exported::NSView; -use crate::AppKit::generated::NSMenu::*; -use crate::AppKit::generated::NSText::*; -use crate::AppKit::generated::NSToolbar::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; -use crate::Foundation::generated::Foundation::*; -use crate::Foundation::generated::NSGeometry::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs index 325d3b786..514d2fc1f 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::NSToolbarItem::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs index 8c29c082d..b390c4c10 100644 --- a/crates/icrate/src/generated/AppKit/NSTouch.rs +++ b/crates/icrate/src/generated/AppKit/NSTouch.rs @@ -1,9 +1,3 @@ -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTouchBar.rs b/crates/icrate/src/generated/AppKit/NSTouchBar.rs index 85eaa86ca..287a56766 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBar.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBar.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::NSApplication::*; -use crate::AppKit::generated::NSResponder::*; -use crate::AppKit::generated::NSTouchBarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs index d6f584a7d..03f89c3f0 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -1,16 +1,8 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSTouchBarItemIdentifier = NSString; -use super::__exported::NSGestureRecognizer; -use super::__exported::NSImage; -use super::__exported::NSString; -use super::__exported::NSTouchBar; -use super::__exported::NSView; -use super::__exported::NSViewController; extern_class!( #[derive(Debug)] pub struct NSTouchBarItem; diff --git a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs index 503facf3e..e7336de61 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs @@ -1,8 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs index e03182694..4ff768c89 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs @@ -1,5 +1,3 @@ -use super::__exported::NSSplitView; -use crate::AppKit::generated::NSToolbarItem::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTreeController.rs b/crates/icrate/src/generated/AppKit/NSTreeController.rs index 2afc3ade4..4bc0c693f 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeController.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeController.rs @@ -1,9 +1,3 @@ -use super::__exported::NSSortDescriptor; -use super::__exported::NSTreeNode; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSObjectController::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSIndexPath::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTreeNode.rs b/crates/icrate/src/generated/AppKit/NSTreeNode.rs index 1d6aecdc7..056837ca0 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeNode.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeNode.rs @@ -1,9 +1,3 @@ -use super::__exported::NSIndexPath; -use super::__exported::NSSortDescriptor; -use super::__exported::NSTreeController; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs index 12d27677a..20e41a93a 100644 --- a/crates/icrate/src/generated/AppKit/NSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSTypesetter.rs @@ -1,9 +1,3 @@ -use crate::AppKit::generated::NSLayoutManager::*; -use crate::AppKit::generated::NSParagraphStyle::*; -use crate::CoreFoundation::generated::CFCharacterSet::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSUserActivity.rs b/crates/icrate/src/generated/AppKit/NSUserActivity.rs index 30b18a383..9c7818240 100644 --- a/crates/icrate/src/generated/AppKit/NSUserActivity.rs +++ b/crates/icrate/src/generated/AppKit/NSUserActivity.rs @@ -1,7 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSDocument::*; -use crate::AppKit::generated::NSResponder::*; -use crate::Foundation::generated::NSUserActivity::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs index 908cbfd26..6100b2d45 100644 --- a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs +++ b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs @@ -1,7 +1,3 @@ -use super::__exported::NSUserDefaults; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSController::*; -use crate::Foundation::generated::NSDictionary::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs index 6160d629f..04a45378a 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs @@ -1,7 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs index d062384e4..e44a5d89e 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs index fa2334869..9f2f8a97c 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs @@ -1,7 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs index 7c06f4cd4..d52c6a49a 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs @@ -1,4 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs index e324a8490..62a170520 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs @@ -1,5 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 78cca8965..447329be0 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -1,34 +1,3 @@ -use super::__exported::CALayer; -use super::__exported::CIFilter; -use super::__exported::NSAttributedString; -use super::__exported::NSBitmapImageRep; -use super::__exported::NSCursor; -use super::__exported::NSDraggingSession; -use super::__exported::NSDraggingSource; -use super::__exported::NSGestureRecognizer; -use super::__exported::NSGraphicsContext; -use super::__exported::NSImage; -use super::__exported::NSLayoutGuide; -use super::__exported::NSScreen; -use super::__exported::NSScrollView; -use super::__exported::NSShadow; -use super::__exported::NSTextInputContext; -use super::__exported::NSTrackingArea; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAnimation::*; -use crate::AppKit::generated::NSAppearance::*; -use crate::AppKit::generated::NSDragging::*; -use crate::AppKit::generated::NSGraphics::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::AppKit::generated::NSResponder::*; -use crate::AppKit::generated::NSTouch::*; -use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; -use crate::AppKit::generated::NSUserInterfaceLayout::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index 6101b36c7..78890bb3a 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -1,17 +1,3 @@ -use super::__exported::NSBundle; -use super::__exported::NSExtensionRequestHandling; -use super::__exported::NSPointerArray; -use super::__exported::NSView; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSKeyValueBinding::*; -use crate::AppKit::generated::NSNib::*; -use crate::AppKit::generated::NSNibDeclarations::*; -use crate::AppKit::generated::NSPopover::*; -use crate::AppKit::generated::NSResponder::*; -use crate::AppKit::generated::NSStoryboard::*; -use crate::AppKit::generated::NSStoryboardSegue::*; -use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs index 0739239c5..d84fcbcc8 100644 --- a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs +++ b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs @@ -1,9 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSCell::*; -use crate::AppKit::generated::NSImage::*; -use crate::AppKit::generated::NSView::*; -use crate::AppKit::generated::NSWindow::*; -use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 33e778d71..2215d1ad9 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -1,40 +1,3 @@ -use super::__exported::NSButton; -use super::__exported::NSButtonCell; -use super::__exported::NSColor; -use super::__exported::NSColorSpace; -use super::__exported::NSDate; -use super::__exported::NSDockTile; -use super::__exported::NSEvent; -use super::__exported::NSGraphicsContext; -use super::__exported::NSImage; -use super::__exported::NSMutableSet; -use super::__exported::NSNotification; -use super::__exported::NSScreen; -use super::__exported::NSSet; -use super::__exported::NSText; -use super::__exported::NSTitlebarAccessoryViewController; -use super::__exported::NSToolbar; -use super::__exported::NSView; -use super::__exported::NSViewController; -use super::__exported::NSWindowController; -use super::__exported::NSWindowTab; -use super::__exported::NSWindowTabGroup; -use super::__exported::NSURL; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSAnimation::*; -use crate::AppKit::generated::NSAppearance::*; -use crate::AppKit::generated::NSApplication::*; -use crate::AppKit::generated::NSGraphics::*; -use crate::AppKit::generated::NSMenu::*; -use crate::AppKit::generated::NSPasteboard::*; -use crate::AppKit::generated::NSResponder::*; -use crate::AppKit::generated::NSUserInterfaceItemIdentification::*; -use crate::AppKit::generated::NSUserInterfaceValidation::*; -use crate::ApplicationServices::generated::ApplicationServices::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSGeometry::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSWindowController.rs b/crates/icrate/src/generated/AppKit/NSWindowController.rs index 3d666a649..ed25b253e 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowController.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowController.rs @@ -1,14 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDocument; -use super::__exported::NSStoryboard; -use super::__exported::NSViewController; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSNib::*; -use crate::AppKit::generated::NSNibDeclarations::*; -use crate::AppKit::generated::NSResponder::*; -use crate::AppKit::generated::NSStoryboardSegue::*; -use crate::AppKit::generated::NSWindow::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs index 615d5c92f..a6ad67e21 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -1,9 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSApplication::*; -use crate::AppKit::generated::NSDocument::*; -use crate::AppKit::generated::NSDocumentController::*; -use crate::AppKit::generated::NSWindow::*; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs index fb6f9c2ca..0c9c82ff8 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs @@ -1,7 +1,3 @@ -use super::__exported::NSCloseCommand; -use super::__exported::NSScriptCommand; -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSWindow::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSWindowTab.rs b/crates/icrate/src/generated/AppKit/NSWindowTab.rs index 657a8c574..3b1daddec 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowTab.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowTab.rs @@ -1,8 +1,3 @@ -use super::__exported::NSImage; -use super::__exported::NSView; -use super::__exported::NSWindow; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs index cad078ff6..a04d57b7e 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs @@ -1,6 +1,3 @@ -use crate::AppKit::generated::AppKitDefines::*; -use crate::AppKit::generated::NSWindow::*; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index 27eda1224..5051e97fe 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -1,20 +1,3 @@ -use super::__exported::NSAppleEventDescriptor; -use super::__exported::NSColor; -use super::__exported::NSError; -use super::__exported::NSImage; -use super::__exported::NSNotificationCenter; -use super::__exported::NSRunningApplication; -use super::__exported::NSScreen; -use super::__exported::NSView; -use super::__exported::UTType; -use super::__exported::NSURL; -use crate::mach::generated::machine::*; -use crate::AppKit::generated::AppKitDefines::*; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSFileManager::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs index 60e05e3b5..d52c6a49a 100644 --- a/crates/icrate/src/generated/Foundation/FoundationErrors.rs +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::NSError::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs index 5362722ad..d52c6a49a 100644 --- a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs +++ b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index 49756ec68..725808413 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -1,6 +1,3 @@ -use crate::CoreGraphics::generated::CGAffineTransform::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 3060e0fb0..360d46c60 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -1,7 +1,3 @@ -use super::__exported::NSData; -use crate::CoreServices::generated::CoreServices::*; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index 776b79ac2..e68fdd53a 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -1,7 +1,3 @@ -use super::__exported::NSAppleEventDescriptor; -use crate::CoreServices::generated::CoreServices::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index c295fb632..d67171002 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -1,8 +1,3 @@ -use super::__exported::NSAppleEventDescriptor; -use super::__exported::NSDictionary; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 0e89d2e58..05ef63485 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -1,10 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSMutableArray; -use super::__exported::NSMutableData; -use super::__exported::NSMutableDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSCoder::*; -use crate::Foundation::generated::NSException::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index ad69800c1..9002e0a76 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -1,12 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSIndexSet; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSEnumerator::*; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSOrderedCollectionDifference::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index 93129acaa..15bc317c6 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs index 3816bd4ed..3cb0d9fe7 100644 --- a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 24bcaf28b..8a95fbbfc 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -1,6 +1,3 @@ -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 821600eb7..c43db3934 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -1,16 +1,3 @@ -use super::__exported::NSError; -use super::__exported::NSLock; -use super::__exported::NSNumber; -use super::__exported::NSString; -use super::__exported::NSURL; -use super::__exported::NSUUID; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSProgress::*; -use crate::Foundation::generated::NSSet::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 8065fbed8..b524edfad 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::NSFormatter::*; -use crate::Foundation::generated::NSMeasurement::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index 9796b03ca..d52c6a49a 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -1,5 +1,3 @@ -use crate::CoreFoundation::generated::CFByteOrder::*; -use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 718552de5..5f8182038 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -1,5 +1,3 @@ -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index a5a96b1df..5a0ceaefc 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -1,12 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSLocale; -use super::__exported::NSString; -use super::__exported::NSTimeZone; -use crate::CoreFoundation::generated::CFCalendar::*; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index 2a648105c..90681a06b 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -1,7 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSString; -use super::__exported::NSTimeZone; -use crate::Foundation::generated::NSDate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 0c7461460..7e484ce59 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -1,8 +1,3 @@ -use super::__exported::NSData; -use crate::CoreFoundation::generated::CFCharacterSet::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index a5b635bfc..8f88ec4fc 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -1,9 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSException::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index e5556b289..115daa3e8 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -1,7 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSSet; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index 6afdc176f..cf16c0a1b 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -1,6 +1,3 @@ -use super::__exported::NSExpression; -use super::__exported::NSPredicateOperator; -use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 7477f92e0..229fcfe51 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -1,5 +1,3 @@ -use super::__exported::NSArray; -use crate::Foundation::generated::NSPredicate::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index bcea2f3d4..5381de24c 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -1,16 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSDistantObject; -use super::__exported::NSException; -use super::__exported::NSMutableData; -use super::__exported::NSNumber; -use super::__exported::NSPort; -use super::__exported::NSPortNameServer; -use super::__exported::NSRunLoop; -use super::__exported::NSString; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 5fc225173..56b774e63 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -1,8 +1,3 @@ -use super::__exported::NSError; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 67da3451a..9430fa650 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -1,6 +1,3 @@ -use super::__exported::NSString; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index f2048c4aa..fe4aae6b0 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -1,6 +1,3 @@ -use crate::Foundation::generated::NSCalendar::*; -use crate::Foundation::generated::NSFormatter::*; -use crate::Foundation::generated::NSNumberFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index a1b8ecdec..25d7117df 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -1,13 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSCalendar; -use super::__exported::NSDate; -use super::__exported::NSError; -use super::__exported::NSLocale; -use super::__exported::NSMutableDictionary; -use super::__exported::NSString; -use super::__exported::NSTimeZone; -use crate::CoreFoundation::generated::CFDateFormatter::*; -use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index 3d9d7b84b..00b90df76 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -1,6 +1,3 @@ -use crate::Foundation::generated::NSCoder::*; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index 1e76ff7f0..e62cb194c 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -1,10 +1,3 @@ -use super::__exported::NSCalendar; -use super::__exported::NSDate; -use super::__exported::NSLocale; -use super::__exported::NSTimeZone; -use crate::dispatch::generated::dispatch::*; -use crate::Foundation::generated::NSDateInterval::*; -use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs index 53a1f0c4f..d52c6a49a 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimal.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -1,5 +1,3 @@ -use super::__exported::NSDictionary; -use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index f65bc7e2c..cf91aa8a4 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -1,8 +1,3 @@ -use crate::Foundation::generated::NSDecimal::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSException::*; -use crate::Foundation::generated::NSScanner::*; -use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 1f151b1fb..faddec751 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -1,9 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSSet; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSEnumerator::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index f2ef062c5..e62d940de 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -1,7 +1,3 @@ -use super::__exported::NSCoder; -use super::__exported::NSConnection; -use super::__exported::Protocol; -use crate::Foundation::generated::NSProxy::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index 84882edd2..590a905a5 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -1,5 +1,3 @@ -use super::__exported::NSDate; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index cfa263e94..157985a1c 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -1,6 +1,3 @@ -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSNotification::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index d6222b477..058645a4d 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 3bfee3523..6472b06a3 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -1,5 +1,3 @@ -use super::__exported::NSArray; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 54f28a6f3..c255ebd8f 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -1,7 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 739762f73..869bf5092 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -1,9 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSNumber; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index ebeecc59a..f3976de85 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSMutableDictionary; -use super::__exported::NSPredicate; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index 4f676dd93..c805bc7d0 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index 85946a9a9..ea611b1cd 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::Foundation::*; -use crate::Foundation::generated::NSItemProvider::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs index cdad7804f..d819b90bb 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs @@ -1,5 +1,3 @@ -use super::__exported::NSExtensionContext; -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 91ba5b873..039b117d6 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -1,11 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSError; -use super::__exported::NSFilePresenter; -use super::__exported::NSMutableDictionary; -use super::__exported::NSOperationQueue; -use super::__exported::NSSet; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 649a7e1cc..440225794 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -1,12 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSError; -use super::__exported::NSString; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSException::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; -use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index deceb7db9..1ff0cb8b2 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -1,19 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSDate; -use super::__exported::NSError; -use super::__exported::NSLock; -use super::__exported::NSNumber; -use super::__exported::NSXPCConnection; -use crate::dispatch::generated::dispatch::*; -use crate::CoreFoundation::generated::CFBase::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSEnumerator::*; -use crate::Foundation::generated::NSError::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSPathUtilities::*; -use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs index 65db8e4fd..1e9a07179 100644 --- a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs +++ b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs @@ -1,9 +1,3 @@ -use super::__exported::NSError; -use super::__exported::NSFileVersion; -use super::__exported::NSOperationQueue; -use super::__exported::NSSet; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSURL::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index aa9b19247..d5d2a0600 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -1,11 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDate; -use super::__exported::NSDictionary; -use super::__exported::NSError; -use super::__exported::NSPersonNameComponents; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index d481a6c0b..f7a355cfb 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -1,9 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSError; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index b4127f99d..5c76bcdec 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -1,9 +1,3 @@ -use super::__exported::NSAttributedString; -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSAttributedString::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs index d0ca5cf2e..9ddf47c63 100644 --- a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index ab468ff14..93de098ab 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -1,7 +1,3 @@ -use crate::CoreGraphics::generated::CGBase::*; -use crate::CoreGraphics::generated::CGGeometry::*; -use crate::Foundation::generated::NSCoder::*; -use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -9,7 +5,6 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSPoint = CGPoint; pub type NSSize = CGSize; pub type NSRect = CGRect; -use super::__exported::NSString; extern_methods!( #[doc = "NSValueGeometryExtensions"] unsafe impl NSValue { diff --git a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs index d7522e9d6..d52c6a49a 100644 --- a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs +++ b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs @@ -1,6 +1,3 @@ -use super::__exported::NSString; -use crate::CoreFoundation::generated::CFBase::*; -use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index 673984a4b..2fb2dd29d 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -1,17 +1,9 @@ -use super::__exported::NSArray; -use super::__exported::NSDate; -use super::__exported::NSDictionary; -use super::__exported::NSNumber; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSHTTPCookiePropertyKey = NSString; pub type NSHTTPCookieStringPolicy = NSString; -use super::__exported::NSHTTPCookieInternal; extern_class!( #[derive(Debug)] pub struct NSHTTPCookie; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index 7f448fc5b..a3e62c102 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -1,12 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDate; -use super::__exported::NSHTTPCookie; -use super::__exported::NSHTTPCookieStorageInternal; -use super::__exported::NSSortDescriptor; -use super::__exported::NSURLSessionTask; -use super::__exported::NSURL; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 2e3e42aa9..34d8e4cec 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSSet; -use crate::Foundation::generated::NSEnumerator::*; -use crate::Foundation::generated::NSPointerFunctions::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index 2e4d47c39..2730b38aa 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -1,7 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSMutableArray; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 384c52968..786d3b8f4 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -1,8 +1,3 @@ -use super::__exported::NSDate; -use super::__exported::NSString; -use super::__exported::NSTimeZone; -use crate::CoreFoundation::generated::CFDateFormatter::*; -use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index 026ab973b..928266f46 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index 06420f0fb..447e862e7 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index 9a3673573..52f712748 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -1,5 +1,3 @@ -use super::__exported::NSMorphology; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index d4fc8def2..1bb627bcf 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -1,5 +1,3 @@ -use super::__exported::NSMethodSignature; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 2418ab7c9..87af49b73 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -1,5 +1,3 @@ -use super::__exported::NSProgress; -use crate::Foundation::generated::NSArray::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index c93b2e310..6dc4c2dde 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -1,8 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSError; -use super::__exported::NSInputStream; -use super::__exported::NSOutputStream; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index 170b81c95..11b8df126 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -1,10 +1,3 @@ -use super::__exported::NSError; -use super::__exported::NSString; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSException::*; -use crate::Foundation::generated::NSOrderedSet::*; -use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 45f1e19d7..1f8f7d24a 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -1,9 +1,3 @@ -use super::__exported::NSIndexSet; -use super::__exported::NSString; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSOrderedSet::*; -use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 4b560dc14..07ff7524a 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -1,11 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSMutableData; -use super::__exported::NSString; -use crate::Foundation::generated::NSCoder::*; -use crate::Foundation::generated::NSException::*; -use crate::Foundation::generated::NSGeometry::*; -use crate::Foundation::generated::NSPropertyList::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index f7ec0dd6e..857556010 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::Foundation::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 6bf08752e..174df9dc5 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSOrthography; -use super::__exported::NSValue; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index 85f15ace8..29a30208d 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -1,6 +1,3 @@ -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSFormatter::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 7853067b9..ebeb934c8 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -1,15 +1,8 @@ -use super::__exported::NSCalendar; -use crate::CoreFoundation::generated::CFLocale::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSLocaleKey = NSString; -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSString; extern_class!( #[derive(Debug)] pub struct NSLocale; diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index 6bb800922..90d148948 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -1,5 +1,3 @@ -use super::__exported::NSDate; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 0200c9666..331afe7a0 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use crate::Foundation::generated::NSEnumerator::*; -use crate::Foundation::generated::NSPointerFunctions::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 65ba9d7ab..557f2f0bf 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -1,5 +1,3 @@ -use super::__exported::NSNumberFormatter; -use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index 926cbbea7..c2dd7f83d 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSUnit::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index b1db2e835..8fa7ebb77 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -1,8 +1,3 @@ -use crate::Foundation::generated::NSFormatter::*; -use crate::Foundation::generated::NSLocale::*; -use crate::Foundation::generated::NSMeasurement::*; -use crate::Foundation::generated::NSNumberFormatter::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 587ca9149..e041166cd 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -1,14 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSOperationQueue; -use super::__exported::NSPredicate; -use super::__exported::NSSortDescriptor; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSMetadataAttributes::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs index 249ee1e9a..d52c6a49a 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -1,5 +1,3 @@ -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index 093ed028c..4057e00ba 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index 3645cea44..4d8327e82 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -1,7 +1,3 @@ -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSError::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 5ec0f9c85..78b132241 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -1,15 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSInputStream; -use super::__exported::NSNumber; -use super::__exported::NSOutputStream; -use super::__exported::NSRunLoop; -use super::__exported::NSString; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSError::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 12088ba21..f2f1dcd59 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -1,12 +1,8 @@ -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSNotificationName = NSString; -use super::__exported::NSDictionary; -use super::__exported::NSOperationQueue; -use super::__exported::NSString; extern_class!( #[derive(Debug)] pub struct NSNotification; diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index 731194cf2..e203dc5d8 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -1,9 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSNotification; -use super::__exported::NSNotificationCenter; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSNull.rs b/crates/icrate/src/generated/Foundation/NSNull.rs index 29bac3d66..b572a3a8b 100644 --- a/crates/icrate/src/generated/Foundation/NSNull.rs +++ b/crates/icrate/src/generated/Foundation/NSNull.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 7cf6d29e0..d44c520d7 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -1,11 +1,3 @@ -use super::__exported::NSCache; -use super::__exported::NSError; -use super::__exported::NSLocale; -use super::__exported::NSMutableDictionary; -use super::__exported::NSRecursiveLock; -use super::__exported::NSString; -use crate::CoreFoundation::generated::CFNumberFormatter::*; -use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -316,7 +308,6 @@ extern_methods!( ); } ); -use super::__exported::NSDecimalNumberHandler; extern_methods!( #[doc = "NSNumberFormatterCompatibility"] unsafe impl NSNumberFormatter { diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index cf5cbc6c5..6cfe01616 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -1,7 +1,3 @@ -use super::__exported::NSString; -use super::__exported::Protocol; -use crate::objc::generated::NSObjCRuntime::*; -use crate::CoreFoundation::generated::CFAvailability::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index e99118a30..cab2d5434 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -1,12 +1,3 @@ -use super::__exported::NSCoder; -use super::__exported::NSEnumerator; -use super::__exported::NSInvocation; -use super::__exported::NSMethodSignature; -use super::__exported::NSString; -use super::__exported::Protocol; -use crate::objc::generated::NSObject::*; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSZone::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs index e1cc946de..ee7c6140c 100644 --- a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -1,7 +1,3 @@ -use super::__exported::NSDictionary; -use super::__exported::NSScriptObjectSpecifier; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 28127b016..42318c5c0 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -1,10 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSSet; -use crate::dispatch::generated::dispatch::*; -use crate::sys::generated::qos::*; -use crate::Foundation::generated::NSException::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSProgress::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 94fe1430c..c94129758 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 9123c11c1..be8f8df1d 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -1,7 +1,3 @@ -use super::__exported::NSArray; -use crate::Foundation::generated::NSEnumerator::*; -use crate::Foundation::generated::NSIndexSet::*; -use crate::Foundation::generated::NSOrderedCollectionChange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 06ea98190..ec2af1838 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -1,12 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSIndexSet; -use super::__exported::NSSet; -use super::__exported::NSString; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSEnumerator::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSOrderedCollectionDifference::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index 7314f4b64..bc325d9ff 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -1,7 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index 4e51fbd49..bde3a739c 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs index b72409c19..fd6ecba2e 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -1,6 +1,3 @@ -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSString::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index d150b3c81..9e134fed1 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::NSFormatter::*; -use crate::Foundation::generated::NSPersonNameComponents::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index 87643f9cc..5f1a00dbf 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -1,6 +1,3 @@ -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSPointerFunctions::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 6092e1645..43cb1e412 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index fff77fdcd..0b4675e7e 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -1,12 +1,3 @@ -use super::__exported::NSConnection; -use super::__exported::NSData; -use super::__exported::NSDate; -use super::__exported::NSMutableArray; -use super::__exported::NSPortMessage; -use super::__exported::NSRunLoop; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index a6d3f4b5b..272f91d17 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -1,7 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSConnection; -use super::__exported::NSPort; -use crate::Foundation::generated::NSCoder::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index 0c81ab68d..65b33feb2 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDate; -use super::__exported::NSMutableArray; -use super::__exported::NSPort; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index ea18722d2..bebbd7fbb 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -1,6 +1,3 @@ -use super::__exported::NSPort; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 95f455c41..624f2572e 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -1,9 +1,3 @@ -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSOrderedSet::*; -use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 9720175a7..cae1547ea 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -1,9 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 4e1b5a6f3..d56f25804 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -1,12 +1,3 @@ -use super::__exported::NSDictionary; -use super::__exported::NSLock; -use super::__exported::NSMutableDictionary; -use super::__exported::NSMutableSet; -use super::__exported::NSXPCConnection; -use super::__exported::NSURL; -use super::__exported::NSUUID; -use crate::Foundation::generated::NSDictionary::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 4cd221d0d..90da8ab83 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -1,10 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSError; -use super::__exported::NSInputStream; -use super::__exported::NSOutputStream; -use super::__exported::NSString; -use crate::CoreFoundation::generated::CFPropertyList::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index 06f91555e..74b9aaee9 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSProxy::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 07cb9813d..4b2b4db57 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -1,6 +1,3 @@ -use super::__exported::NSInvocation; -use super::__exported::NSMethodSignature; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index 4e41fc131..f0c59642c 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -1,6 +1,3 @@ -use super::__exported::NSString; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSValue::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index dcdb93d65..bd9c9cb10 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -1,7 +1,3 @@ -use super::__exported::NSArray; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSString::*; -use crate::Foundation::generated::NSTextCheckingResult::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index d93df7101..8e603f73b 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -1,8 +1,3 @@ -use super::__exported::NSCalendar; -use super::__exported::NSDateComponents; -use super::__exported::NSLocale; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSFormatter::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 962ddbc3b..f0171125c 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -1,10 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSPort; -use super::__exported::NSString; -use super::__exported::NSTimer; -use crate::CoreFoundation::generated::CFRunLoop::*; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index e11304c11..3807e4a25 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -1,7 +1,3 @@ -use super::__exported::NSCharacterSet; -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index 5899ae713..ff8cd0fe8 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -1,5 +1,3 @@ -use super::__exported::NSScriptCommandDescription; -use crate::Foundation::generated::NSClassDescription::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs index f0c7734c4..3a3ad46b8 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index b7b69e48f..6b681881a 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -1,10 +1,3 @@ -use super::__exported::NSAppleEventDescriptor; -use super::__exported::NSDictionary; -use super::__exported::NSMutableDictionary; -use super::__exported::NSScriptCommandDescription; -use super::__exported::NSScriptObjectSpecifier; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index 5eedac73a..3bc45100c 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSScriptCommand; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index 951d89e27..398227d92 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -1,5 +1,3 @@ -use super::__exported::NSConnection; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index 204ec4857..a1a1d1483 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -1,5 +1,3 @@ -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index 265b756a2..3cb95aeaf 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -1,10 +1,3 @@ -use super::__exported::NSAppleEventDescriptor; -use super::__exported::NSArray; -use super::__exported::NSNumber; -use super::__exported::NSScriptClassDescription; -use super::__exported::NSScriptWhoseTest; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index 4e6951aa9..3d9a34a3b 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -1,8 +1,3 @@ -use super::__exported::NSDictionary; -use super::__exported::NSScriptClassDescription; -use super::__exported::NSScriptObjectSpecifier; -use super::__exported::NSString; -use crate::Foundation::generated::NSScriptCommand::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 3a2bcbc61..2ac4ad741 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -1,13 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSBundle; -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSMutableArray; -use super::__exported::NSMutableDictionary; -use super::__exported::NSMutableSet; -use super::__exported::NSScriptClassDescription; -use super::__exported::NSScriptCommandDescription; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index 6e44fba35..a11568251 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -1,7 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSScriptObjectSpecifier; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index a26f70d33..cb729116c 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSEnumerator::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index 57c73553d..8742a50e3 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -1,6 +1,3 @@ -use crate::Foundation::generated::NSArray::*; -use crate::Foundation::generated::NSOrderedSet::*; -use crate::Foundation::generated::NSSet::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 52818bb38..07ea71a9b 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -1,9 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSOrthography; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; -use crate::Foundation::generated::NSTextCheckingResult::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 7c61eb51f..3d9558f12 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -1,12 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSError; -use super::__exported::NSHost; -use super::__exported::NSRunLoop; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSError::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 6e05dc53e..787adc6bc 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -1,13 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSCharacterSet; -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSError; -use super::__exported::NSLocale; -use super::__exported::NSURL; -use crate::Foundation::generated::NSItemProvider::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 2181e36fe..41db9d2aa 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 0019bc3bc..6906f3e86 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -1,14 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDate; -use super::__exported::NSDictionary; -use super::__exported::NSOrthography; -use super::__exported::NSRegularExpression; -use super::__exported::NSString; -use super::__exported::NSTimeZone; -use super::__exported::NSURL; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRange::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 274ea6428..e28f02874 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -1,11 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDate; -use super::__exported::NSMutableDictionary; -use super::__exported::NSNumber; -use super::__exported::NSString; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 70b5d97f0..f30b58887 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -1,12 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSDate; -use super::__exported::NSDictionary; -use super::__exported::NSLocale; -use super::__exported::NSString; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 631823d55..e4d24d89c 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -1,5 +1,3 @@ -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index 2d5901857..c5b7b8640 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -1,12 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSNumber; -use crate::Foundation::generated::NSCharacterSet::*; -use crate::Foundation::generated::NSItemProvider::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSString::*; -use crate::Foundation::generated::NSURLHandle::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index fb4273222..5fdf520fc 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -1,14 +1,8 @@ -use super::__exported::NSError; -use super::__exported::NSURLCredential; -use super::__exported::NSURLProtectionSpace; -use super::__exported::NSURLResponse; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; pub type NSURLAuthenticationChallengeSender = NSObject; -use super::__exported::NSURLAuthenticationChallengeInternal; extern_class!( #[derive(Debug)] pub struct NSURLAuthenticationChallenge; diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 92609b12d..637b2a36d 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -1,11 +1,3 @@ -use super::__exported::NSCachedURLResponseInternal; -use super::__exported::NSData; -use super::__exported::NSDate; -use super::__exported::NSDictionary; -use super::__exported::NSURLRequest; -use super::__exported::NSURLResponse; -use super::__exported::NSURLSessionDataTask; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -43,8 +35,6 @@ extern_methods!( pub unsafe fn storagePolicy(&self) -> NSURLCacheStoragePolicy; } ); -use super::__exported::NSURLCacheInternal; -use super::__exported::NSURLRequest; extern_class!( #[derive(Debug)] pub struct NSURLCache; diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index d103853ee..bf2061e19 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -1,18 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSCachedURLResponse; -use super::__exported::NSData; -use super::__exported::NSError; -use super::__exported::NSInputStream; -use super::__exported::NSOperationQueue; -use super::__exported::NSRunLoop; -use super::__exported::NSURLAuthenticationChallenge; -use super::__exported::NSURLConnectionInternal; -use super::__exported::NSURLProtectionSpace; -use super::__exported::NSURLRequest; -use super::__exported::NSURLResponse; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index 95f411a1d..171ea6613 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSString; -use super::__exported::NSURLCredentialInternal; -use crate::Foundation::generated::NSObject::*; -use crate::Security::generated::Security::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 3c6d490d0..4740e9303 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -1,11 +1,3 @@ -use super::__exported::NSDictionary; -use super::__exported::NSString; -use super::__exported::NSURLCredential; -use super::__exported::NSURLCredentialStorageInternal; -use super::__exported::NSURLSessionTask; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSURLProtectionSpace::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index 8355717c2..3b5453f4a 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -1,12 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSError; -use super::__exported::NSString; -use super::__exported::NSURLAuthenticationChallenge; -use super::__exported::NSURLDownloadInternal; -use super::__exported::NSURLProtectionSpace; -use super::__exported::NSURLRequest; -use super::__exported::NSURLResponse; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index 31d6018ed..d52c6a49a 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -1,7 +1,3 @@ -use super::__exported::NSString; -use crate::CoreServices::generated::CoreServices::*; -use crate::Foundation::generated::NSError::*; -use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index e118d742e..c670a6383 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -1,8 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSMutableArray; -use super::__exported::NSMutableData; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 47de5359a..3536dc733 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -1,9 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSString; -use super::__exported::NSURLProtectionSpaceInternal; -use crate::Foundation::generated::NSObject::*; -use crate::Security::generated::Security::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index e914cd722..9c0f3d3a3 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -1,14 +1,3 @@ -use super::__exported::NSCachedURLResponse; -use super::__exported::NSError; -use super::__exported::NSMutableURLRequest; -use super::__exported::NSURLAuthenticationChallenge; -use super::__exported::NSURLConnection; -use super::__exported::NSURLProtocolInternal; -use super::__exported::NSURLRequest; -use super::__exported::NSURLResponse; -use super::__exported::NSURLSessionTask; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSURLCache::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 960dcf662..38eec3c2f 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -1,11 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSInputStream; -use super::__exported::NSString; -use super::__exported::NSURLRequestInternal; -use super::__exported::NSURL; -use crate::Foundation::generated::NSDate::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index 244b41fe5..67c7d8fcf 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -1,9 +1,3 @@ -use super::__exported::NSDictionary; -use super::__exported::NSString; -use super::__exported::NSURLRequest; -use super::__exported::NSURLResponseInternal; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] @@ -37,7 +31,6 @@ extern_methods!( pub unsafe fn suggestedFilename(&self) -> Option>; } ); -use super::__exported::NSHTTPURLResponseInternal; extern_class!( #[derive(Debug)] pub struct NSHTTPURLResponse; diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 2f4f78d23..2effa79fc 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -1,28 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSCachedURLResponse; -use super::__exported::NSData; -use super::__exported::NSDateInterval; -use super::__exported::NSDictionary; -use super::__exported::NSError; -use super::__exported::NSHTTPCookie; -use super::__exported::NSHTTPURLResponse; -use super::__exported::NSInputStream; -use super::__exported::NSNetService; -use super::__exported::NSOperationQueue; -use super::__exported::NSOutputStream; -use super::__exported::NSString; -use super::__exported::NSURLAuthenticationChallenge; -use super::__exported::NSURLCache; -use super::__exported::NSURLCredential; -use super::__exported::NSURLCredentialStorage; -use super::__exported::NSURLProtectionSpace; -use super::__exported::NSURLResponse; -use super::__exported::NSURL; -use crate::Foundation::generated::NSHTTPCookieStorage::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSProgress::*; -use crate::Foundation::generated::NSURLRequest::*; -use crate::Security::generated::SecureTransport::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index 7529c3dc1..75d2c275d 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -1,6 +1,3 @@ -use crate::uuid::generated::uuid::*; -use crate::CoreFoundation::generated::CFUUID::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 30a34fc49..dbbd17997 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -1,9 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index b78b57db2..6982cb3d3 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSString; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSRunLoop::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index d06a97900..3bb0b0b12 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 627d7dd36..6935ad7f0 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -1,14 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSError; -use super::__exported::NSInputStream; -use super::__exported::NSOutputStream; -use super::__exported::NSSet; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObjCRuntime::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index f187fdb64..5311786f3 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -1,11 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSMutableDictionary; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSNotification::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 2dc6863de..fcd8f75a2 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -1,12 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSAttributedString; -use super::__exported::NSDate; -use super::__exported::NSDateComponents; -use super::__exported::NSDictionary; -use super::__exported::NSImage; -use super::__exported::NSString; -use super::__exported::NSTimeZone; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index a84937c4b..8ba86d983 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -1,12 +1,3 @@ -use super::__exported::NSAppleEventDescriptor; -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSError; -use super::__exported::NSFileHandle; -use super::__exported::NSString; -use super::__exported::NSXPCConnection; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index b2fe9377f..72a20589e 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -1,6 +1,3 @@ -use super::__exported::NSDictionary; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index e54b834bd..7bd034629 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -1,6 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSString; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index f51ae2d06..becdb811d 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSMutableDictionary; -use super::__exported::NSXMLDTDNode; -use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index 1dbf96672..9787b93b9 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index cce445b4c..c26489bd4 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -1,8 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSXMLDTD; -use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index 9cbba066d..b31f5bb33 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -1,9 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSEnumerator; -use super::__exported::NSMutableArray; -use super::__exported::NSString; -use crate::Foundation::generated::NSXMLNode::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 84a77b084..d2d1bbd98 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -1,12 +1,3 @@ -use super::__exported::NSArray; -use super::__exported::NSDictionary; -use super::__exported::NSError; -use super::__exported::NSString; -use super::__exported::NSXMLDocument; -use super::__exported::NSXMLElement; -use super::__exported::NSURL; -use crate::Foundation::generated::NSObject::*; -use crate::Foundation::generated::NSXMLNodeOptions::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs index 5362722ad..d52c6a49a 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -1,4 +1,3 @@ -use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index c961fac2e..29154136f 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -1,12 +1,3 @@ -use super::__exported::NSData; -use super::__exported::NSDictionary; -use super::__exported::NSError; -use super::__exported::NSInputStream; -use super::__exported::NSSet; -use super::__exported::NSString; -use super::__exported::NSURL; -use crate::Foundation::generated::NSError::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 2643b799c..23f960665 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -1,15 +1,3 @@ -use super::__exported::NSError; -use super::__exported::NSLock; -use super::__exported::NSMutableDictionary; -use super::__exported::NSOperationQueue; -use super::__exported::NSSet; -use super::__exported::NSString; -use crate::bsm::generated::audit::*; -use crate::dispatch::generated::dispatch::*; -use crate::xpc::generated::xpc::*; -use crate::CoreFoundation::generated::CFDictionary::*; -use crate::Foundation::generated::NSCoder::*; -use crate::Foundation::generated::NSObject::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index d7522e9d6..d52c6a49a 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -1,6 +1,3 @@ -use super::__exported::NSString; -use crate::CoreFoundation::generated::CFBase::*; -use crate::Foundation::generated::NSObjCRuntime::*; #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] From 74a3615530d702624caceca58d14a95f93772bc2 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sat, 29 Oct 2022 23:45:18 +0200 Subject: [PATCH 075/131] Do preprocessing step explicitly as the first thing --- crates/header-translator/src/main.rs | 58 +++++++++++++++++++++++----- crates/header-translator/src/stmt.rs | 2 - 2 files changed, 48 insertions(+), 12 deletions(-) diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 9ad3b499e..7d0253de9 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -4,7 +4,7 @@ use std::io::{self, Write}; use std::path::{Path, PathBuf}; use apple_sdk::{AppleSdk, DeveloperDirectory, Platform, SdkPath, SimpleSdk}; -use clang::{Clang, Entity, EntityVisitResult, Index}; +use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index}; use quote::{format_ident, quote}; use header_translator::{format_method_macro, run_cargo_fmt, run_rustfmt, Config, RustFile, Stmt}; @@ -49,21 +49,59 @@ fn main() { }) }); - let mut result: BTreeMap> = BTreeMap::new(); + let mut result: BTreeMap> = configs + .iter() + .map(|(library, _)| (library.clone(), BTreeMap::new())) + .collect(); // TODO: Compare SDKs for sdk in sdks { println!("status: parsing {:?}...", sdk.platform); + + let mut preprocessing = true; + parse_and_visit_stmts(&index, &sdk, |library, file_name, entity| { if let Some(config) = configs.get(library) { - if file_name != library { - let files = result.entry(library.to_string()).or_default(); - let file = files - .entry(file_name.to_string()) - .or_insert_with(RustFile::new); - if let Some(stmt) = Stmt::parse(&entity, &config) { - if sdk.platform == Platform::MacOsX { - file.add_stmt(stmt); + let files = result.get_mut(library).expect("files"); + match entity.get_kind() { + EntityKind::InclusionDirective if preprocessing => { + // println!("{library}/{file_name}.h: {entity:?}"); + // If umbrella header + let name = entity.get_name().expect("inclusion name"); + let mut iter = name.split('/'); + let framework = iter.next().expect("inclusion name has framework"); + if framework == library { + let included = iter + .next() + .expect("inclusion name has file") + .strip_suffix(".h") + .expect("inclusion name file is header") + .to_string(); + if iter.count() != 0 { + panic!("invalid inclusion of {name:?}"); + } + + // If inclusion is not umbrella header + if included != library { + // The file is often included twice, even + // within the same file, so insertion can fail + files.entry(included).or_insert_with(RustFile::new); + } + } + } + EntityKind::MacroExpansion if preprocessing => {} + EntityKind::MacroDefinition if preprocessing => {} + _ => { + if preprocessing { + println!("status: preprocessed {:?}...", sdk.platform); + } + preprocessing = false; + // No more includes / macro expansions after this line + let file = files.get_mut(file_name).expect("file"); + if let Some(stmt) = Stmt::parse(&entity, &config) { + if sdk.platform == Platform::MacOsX { + file.add_stmt(stmt); + } } } } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index c45fe9c0f..9f669c69d 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -191,10 +191,8 @@ pub enum Stmt { impl Stmt { pub fn parse(entity: &Entity<'_>, config: &Config) -> Option { match entity.get_kind() { - EntityKind::InclusionDirective => None, // These are inconsequential for us, since we resolve imports differently EntityKind::ObjCClassRef | EntityKind::ObjCProtocolRef => None, - EntityKind::MacroExpansion | EntityKind::MacroDefinition => None, EntityKind::ObjCInterfaceDecl => { // entity.get_mangled_objc_names() let name = entity.get_name().expect("class name"); From b5321fbf354b3d46924af1936cd9f85934e1bcf4 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 30 Oct 2022 01:25:07 +0200 Subject: [PATCH 076/131] Refactor so that file writing is done using plain Display Allows us to vastly improve the speed, as well as allowing us to make the output much prettier wrt. newlines and such in the future (proc_macro2 / quote output is not really meant to be consumed by human eyes) --- crates/header-translator/Cargo.toml | 5 - crates/header-translator/src/lib.rs | 85 ++-------- crates/header-translator/src/main.rs | 53 +++---- crates/header-translator/src/method.rs | 75 +++------ crates/header-translator/src/property.rs | 14 +- crates/header-translator/src/rust_type.rs | 150 +++++++++--------- crates/header-translator/src/stmt.rs | 115 +++++++------- .../src/generated/AppKit/NSBezierPath.rs | 4 +- .../NSCollectionViewCompositionalLayout.rs | 2 +- crates/icrate/src/generated/AppKit/NSColor.rs | 4 +- crates/icrate/src/generated/AppKit/NSEvent.rs | 2 +- crates/icrate/src/generated/AppKit/NSView.rs | 2 +- crates/icrate/src/generated/AppKit/mod.rs | 1 + .../Foundation/NSAppleEventDescriptor.rs | 2 +- .../src/generated/Foundation/NSCoder.rs | 8 +- .../icrate/src/generated/Foundation/NSData.rs | 10 +- .../icrate/src/generated/Foundation/NSDate.rs | 4 +- .../generated/Foundation/NSDecimalNumber.rs | 4 +- .../generated/Foundation/NSKeyedArchiver.rs | 8 +- .../src/generated/Foundation/NSString.rs | 4 +- .../src/generated/Foundation/NSURLRequest.rs | 2 +- crates/icrate/src/generated/Foundation/mod.rs | 1 + 22 files changed, 234 insertions(+), 321 deletions(-) diff --git a/crates/header-translator/Cargo.toml b/crates/header-translator/Cargo.toml index 2eb1dac3a..c34771e4c 100644 --- a/crates/header-translator/Cargo.toml +++ b/crates/header-translator/Cargo.toml @@ -9,11 +9,6 @@ license = "Zlib OR Apache-2.0 OR MIT" [dependencies] clang = { version = "2.0", features = ["runtime", "clang_10_0"] } -clang-sys = "1.0" -quote = "1.0" -proc-macro2 = "1.0" toml = "0.5.9" serde = { version = "1.0.144", features = ["derive"] } -regex = { version = "1.6" } -lazy_static = { version = "1.4.0" } apple-sdk = { version = "0.2.0" } diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 99c4c683d..8be2379ea 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -1,11 +1,8 @@ use std::collections::HashSet; -use std::io::Write; +use std::fmt::{Display, Write}; use std::path::Path; use std::process::{Command, Stdio}; -use proc_macro2::TokenStream; -use quote::quote; - mod availability; mod config; mod method; @@ -23,6 +20,11 @@ pub struct RustFile { stmts: Vec, } +const INITIAL_IMPORTS: &str = r#"#[allow(unused_imports)] +use objc2::rc::{Id, Shared}; +#[allow(unused_imports)] +use objc2::{extern_class, extern_methods, ClassType};"#; + impl RustFile { pub fn new() -> Self { Self { @@ -47,42 +49,17 @@ impl RustFile { self.stmts.push(stmt); } - pub fn finish(self) -> (HashSet, TokenStream) { - let iter = self.stmts.iter(); - - let tokens = quote! { - #[allow(unused_imports)] - use objc2::{ClassType, extern_class, extern_methods}; - #[allow(unused_imports)] - use objc2::rc::{Id, Shared}; - - #(#iter)* - }; + pub fn finish(self) -> (HashSet, String) { + let mut tokens = String::new(); + writeln!(tokens, "{}", INITIAL_IMPORTS).unwrap(); + for stmt in self.stmts { + write!(tokens, "{}", stmt).unwrap(); + } (self.declared_types, tokens) } } -pub fn format_method_macro(code: &[u8]) -> Vec { - use regex::bytes::{Captures, Regex}; - use std::str; - - lazy_static::lazy_static! { - static ref RE: Regex = Regex::new(r"# ?\[ ?(method_id|method) ?\((([a-zA-Z_]+ ?: ?)+)\) ?\]").unwrap(); - } - - RE.replace_all(code, |caps: &Captures| { - let method = str::from_utf8(caps.get(1).unwrap().as_bytes()) - .unwrap() - .replace(" ", ""); - let selector = str::from_utf8(caps.get(2).unwrap().as_bytes()) - .unwrap() - .replace(" ", ""); - format!("#[{method}({selector})]") - }) - .to_vec() -} - pub fn run_cargo_fmt(package: &str) { let status = Command::new("cargo") .args(["fmt", "--package", package]) @@ -96,7 +73,9 @@ pub fn run_cargo_fmt(package: &str) { ); } -pub fn run_rustfmt(tokens: TokenStream) -> Vec { +pub fn run_rustfmt(data: impl Display) -> Vec { + use std::io::Write; + let mut child = Command::new("rustfmt") .stdin(Stdio::piped()) .stdout(Stdio::piped()) @@ -104,7 +83,7 @@ pub fn run_rustfmt(tokens: TokenStream) -> Vec { .expect("failed running rustfmt"); let mut stdin = child.stdin.take().expect("failed to open stdin"); - write!(stdin, "{}", tokens).expect("failed writing"); + write!(stdin, "{}", data).expect("failed writing"); drop(stdin); let output = child.wait_with_output().expect("failed formatting"); @@ -113,35 +92,5 @@ pub fn run_rustfmt(tokens: TokenStream) -> Vec { panic!("failed running rustfmt with exit code {}", output.status) } - format_method_macro(&output.stdout) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_format_method_macro() { - fn assert_returns(input: &str, expected_output: &str) { - let output = format_method_macro(input.as_bytes()); - assert_eq!(output, expected_output.as_bytes()); - - // Check that running it through twice doesn't change the output - let output = format_method_macro(&output); - assert_eq!(output, expected_output.as_bytes()); - } - - assert_returns( - "# [method_id (descriptorWithDescriptorType : bytes : length :)]", - "#[method_id(descriptorWithDescriptorType:bytes:length:)]", - ); - assert_returns( - "# [method (insertDescriptor : atIndex :)]", - "#[method(insertDescriptor:atIndex:)]", - ); - assert_returns( - "# [method_id (descriptorAtIndex :)]", - "#[method_id(descriptorAtIndex:)]", - ); - } + output.stdout } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 7d0253de9..1c42cdf7a 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -1,13 +1,13 @@ use std::collections::BTreeMap; +use std::fmt::{self, Write}; use std::fs; -use std::io::{self, Write}; +use std::io; use std::path::{Path, PathBuf}; use apple_sdk::{AppleSdk, DeveloperDirectory, Platform, SdkPath, SimpleSdk}; use clang::{Clang, Entity, EntityKind, EntityVisitResult, Index}; -use quote::{format_ident, quote}; -use header_translator::{format_method_macro, run_cargo_fmt, run_rustfmt, Config, RustFile, Stmt}; +use header_translator::{run_cargo_fmt, run_rustfmt, Config, RustFile, Stmt}; const FORMAT_INCREMENTALLY: bool = false; @@ -115,7 +115,7 @@ fn main() { for (library, files) in result { println!("status: writing framework {library}..."); let output_path = crate_src.join("generated").join(&library); - output_files(&output_path, files, FORMAT_INCREMENTALLY); + output_files(&output_path, files, FORMAT_INCREMENTALLY).unwrap(); println!("status: written framework {library}"); } @@ -254,7 +254,7 @@ fn output_files( output_path: &Path, files: impl IntoIterator, format_incrementally: bool, -) { +) -> fmt::Result { let declared: Vec<_> = files .into_iter() .map(|(name, file)| { @@ -266,43 +266,42 @@ fn output_files( let output = if format_incrementally { run_rustfmt(tokens) } else { - let mut buf = Vec::new(); - write!(buf, "{}", tokens).unwrap(); - format_method_macro(&buf) + tokens.into() }; fs::write(&path, output).unwrap(); - (format_ident!("{}", name), declared_types) + (name, declared_types) }) .collect(); - let mod_names = declared.iter().map(|(name, _)| name); - let mod_imports = declared.iter().filter_map(|(name, declared_types)| { - if !declared_types.is_empty() { - let declared_types = declared_types.iter().map(|name| format_ident!("{}", name)); - Some(quote!(super::#name::{#(#declared_types,)*})) - } else { - None - } - }); - - let tokens = quote! { - #(pub(crate) mod #mod_names;)* + let mut tokens = String::new(); - mod __exported { - #(pub use #mod_imports;)* + for (name, _) in &declared { + writeln!(tokens, "pub(crate) mod {name};")?; + } + writeln!(tokens, "")?; + writeln!(tokens, "mod __exported {{")?; + for (name, declared_types) in declared { + if !declared_types.is_empty() { + let declared_types: Vec<_> = declared_types.into_iter().collect(); + writeln!( + tokens, + " pub use super::{name}::{{{}}};", + declared_types.join(",") + )?; } - }; + } + writeln!(tokens, "}}")?; let output = if format_incrementally { run_rustfmt(tokens) } else { - let mut buf = Vec::new(); - write!(buf, "{}", tokens).unwrap(); - buf + tokens.into() }; // truncate if the file exists fs::write(output_path.join("mod.rs"), output).unwrap(); + + Ok(()) } diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index b2907799d..4a7a940e0 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -1,6 +1,6 @@ +use std::fmt; + use clang::{Entity, EntityKind, EntityVisitResult, ObjCQualifiers}; -use proc_macro2::TokenStream; -use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; use crate::config::MethodData; @@ -305,19 +305,13 @@ impl<'tu> PartialMethod<'tu> { } } -impl ToTokens for Method { - fn to_tokens(&self, tokens: &mut TokenStream) { - let fn_name = format_ident!("{}", handle_reserved(&self.fn_name)); - - let mut arguments: Vec<_> = self - .arguments - .iter() - .map(|(param, _qualifier, ty)| (format_ident!("{}", handle_reserved(param)), ty)) - .collect(); +impl fmt::Display for Method { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut arguments = self.arguments.clone(); let is_error = if self.selector.ends_with("error:") || self.selector.ends_with("AndReturnError:") { - let (_, ty) = arguments.last().expect("arguments last"); + let (_, _, ty) = arguments.last().expect("arguments last"); ty.is_error_out() } else { false @@ -327,51 +321,32 @@ impl ToTokens for Method { arguments.pop(); } - let fn_args: Vec<_> = arguments - .iter() - .map(|(param, arg_ty)| quote!(#param: #arg_ty)) - .collect(); - - let selector = if self.selector.contains(':') { - let iter = self - .selector - .split(':') - .filter(|sel| !sel.is_empty()) - .map(|sel| format_ident!("{}", sel)); - - quote!(#(#iter:)*) + if self.result_type.is_id() { + writeln!(f, " #[method_id({})]", self.selector)?; } else { - let sel = format_ident!("{}", self.selector); - quote!(#sel) + writeln!(f, " #[method({})]", self.selector)?; }; - let ret = if is_error { - self.result_type.as_error() - } else { - let ret = &self.result_type; - quote!(#ret) - }; + write!(f, " pub ")?; + if !self.safe { + write!(f, "unsafe ")?; + } + write!(f, "fn {}(", handle_reserved(&self.fn_name))?; + if !self.is_class { + write!(f, "&self, ")?; + } + for (param, _qualifier, arg_ty) in arguments { + write!(f, "{}: {arg_ty},", handle_reserved(¶m))?; + } + write!(f, ")")?; - let macro_name = if self.result_type.is_id() { - format_ident!("method_id") + if is_error { + write!(f, "{};", self.result_type.as_error())?; } else { - format_ident!("method") + write!(f, "{};", self.result_type)?; }; - let unsafe_ = if self.safe { quote!() } else { quote!(unsafe) }; - - let result = if self.is_class { - quote! { - #[#macro_name(#selector)] - pub #unsafe_ fn #fn_name(#(#fn_args),*) #ret; - } - } else { - quote! { - #[#macro_name(#selector)] - pub #unsafe_ fn #fn_name(&self #(, #fn_args)*) #ret; - } - }; - tokens.append_all(result); + Ok(()) } } diff --git a/crates/header-translator/src/property.rs b/crates/header-translator/src/property.rs index 28ce3bcc3..b5661dc00 100644 --- a/crates/header-translator/src/property.rs +++ b/crates/header-translator/src/property.rs @@ -1,6 +1,6 @@ +use std::fmt; + use clang::{Entity, EntityKind, EntityVisitResult, Nullability, ObjCAttributes}; -use proc_macro2::TokenStream; -use quote::ToTokens; use crate::availability::Availability; use crate::config::MethodData; @@ -142,8 +142,8 @@ impl PartialProperty<'_> { } } -impl ToTokens for Property { - fn to_tokens(&self, tokens: &mut TokenStream) { +impl fmt::Display for Property { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let method = Method { selector: self.getter_name.clone(), fn_name: self.getter_name.clone(), @@ -156,8 +156,9 @@ impl ToTokens for Property { result_type: RustTypeReturn::new(self.type_out.clone()), safe: self.safe, }; - method.to_tokens(tokens); + write!(f, "{method}")?; if let Some(setter_name) = &self.setter_name { + writeln!(f, "")?; let method = Method { selector: setter_name.clone() + ":", fn_name: setter_name.clone(), @@ -170,7 +171,8 @@ impl ToTokens for Property { result_type: RustTypeReturn::new(RustType::Void), safe: self.safe, }; - method.to_tokens(tokens); + write!(f, "{method}")?; } + Ok(()) } } diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 7d8d8a7bb..6988b0e6d 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -1,6 +1,6 @@ +use std::fmt; + use clang::{Nullability, Type, TypeKind}; -use proc_macro2::TokenStream; -use quote::{format_ident, quote, ToTokens, TokenStreamExt}; #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct GenericType { @@ -75,11 +75,17 @@ impl GenericType { } } -impl ToTokens for GenericType { - fn to_tokens(&self, tokens: &mut TokenStream) { - let name = format_ident!("{}", self.name); - let generics = &self.generics; - tokens.append_all(quote!(#name <#(#generics),*>)); +impl fmt::Display for GenericType { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.name)?; + if !self.generics.is_empty() { + write!(f, "<")?; + for generic in &self.generics { + write!(f, "{generic},")?; + } + write!(f, ">")?; + } + Ok(()) } } @@ -535,34 +541,34 @@ impl RustType { } } -impl ToTokens for RustType { - fn to_tokens(&self, tokens: &mut TokenStream) { +impl fmt::Display for RustType { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use RustType::*; - let result = match self { + match self { // Primitives - Void => quote!(c_void), - C99Bool => panic!("C99's bool is unsupported"), // quote!(bool) - Char => quote!(c_char), - SChar => quote!(c_schar), - UChar => quote!(c_uchar), - Short => quote!(c_short), - UShort => quote!(c_ushort), - Int => quote!(c_int), - UInt => quote!(c_uint), - Long => quote!(c_long), - ULong => quote!(c_ulong), - LongLong => quote!(c_longlong), - ULongLong => quote!(c_ulonglong), - Float => quote!(c_float), - Double => quote!(c_double), - I8 => quote!(i8), - U8 => quote!(u8), - I16 => quote!(i16), - U16 => quote!(u16), - I32 => quote!(i32), - U32 => quote!(u32), - I64 => quote!(i64), - U64 => quote!(u64), + Void => write!(f, "c_void"), + C99Bool => panic!("C99's bool is unsupported"), // write!(f, "bool") + Char => write!(f, "c_char"), + SChar => write!(f, "c_schar"), + UChar => write!(f, "c_uchar"), + Short => write!(f, "c_short"), + UShort => write!(f, "c_ushort"), + Int => write!(f, "c_int"), + UInt => write!(f, "c_uint"), + Long => write!(f, "c_long"), + ULong => write!(f, "c_ulong"), + LongLong => write!(f, "c_longlong"), + ULongLong => write!(f, "c_ulonglong"), + Float => write!(f, "c_float"), + Double => write!(f, "c_double"), + I8 => write!(f, "i8"), + U8 => write!(f, "u8"), + I16 => write!(f, "i16"), + U16 => write!(f, "u16"), + I32 => write!(f, "i32"), + U32 => write!(f, "u32"), + I64 => write!(f, "i64"), + U64 => write!(f, "u64"), // Objective-C Id { @@ -573,28 +579,27 @@ impl ToTokens for RustType { lifetime: _, nullability, } => { - let tokens = quote!(&#type_); if *nullability == Nullability::NonNull { - tokens + write!(f, "&{type_}") } else { - quote!(Option<#tokens>) + write!(f, "Option<&{type_}>") } } Class { nullability } => { if *nullability == Nullability::NonNull { - quote!(&Class) + write!(f, "&Class") } else { - quote!(Option<&Class>) + write!(f, "Option<&Class>") } } Sel { nullability } => { if *nullability == Nullability::NonNull { - quote!(Sel) + write!(f, "Sel") } else { - quote!(Option) + write!(f, "Option") } } - ObjcBool => quote!(bool), + ObjcBool => write!(f, "bool"), // Others Pointer { @@ -603,27 +608,27 @@ impl ToTokens for RustType { pointee, } => match &**pointee { Self::Id { - type_: tokens, + type_, is_const: false, lifetime: Lifetime::Autoreleasing, nullability: inner_nullability, } => { - let tokens = quote!(Id<#tokens, Shared>); + let tokens = format!("Id<{type_}, Shared>"); let tokens = if *inner_nullability == Nullability::NonNull { tokens } else { - quote!(Option<#tokens>) + format!("Option<{tokens}>") }; let tokens = if *is_const { - quote!(&#tokens) + format!("&{tokens}") } else { - quote!(&mut #tokens) + format!("&mut {tokens}") }; if *nullability == Nullability::NonNull { - tokens + write!(f, "{tokens}") } else { - quote!(Option<#tokens>) + write!(f, "Option<{tokens}>") } } Self::Id { @@ -636,16 +641,16 @@ impl ToTokens for RustType { println!("id*: {self:?}"); } let tokens = if *inner_nullability == Nullability::NonNull { - quote!(NonNull<#tokens>) + format!("NonNull<{tokens}>") } else { - quote!(*mut #tokens) + format!("*mut {tokens}") }; if *nullability == Nullability::NonNull { - quote!(NonNull<#tokens>) + write!(f, "NonNull<{tokens}>") } else if *is_const { - quote!(*const #tokens) + write!(f, "*const {tokens}") } else { - quote!(*mut #tokens) + write!(f, "*mut {tokens}") } } Self::Id { .. } => { @@ -653,24 +658,20 @@ impl ToTokens for RustType { } pointee => { if *nullability == Nullability::NonNull { - quote!(NonNull<#pointee>) + write!(f, "NonNull<{pointee}>") } else if *is_const { - quote!(*const #pointee) + write!(f, "*const {pointee}") } else { - quote!(*mut #pointee) + write!(f, "*mut {pointee}") } } }, Array { element_type, num_elements, - } => quote!([#element_type; #num_elements]), - TypeDef { name } => { - let name = format_ident!("{}", name); - quote!(#name) - } - }; - tokens.append_all(result); + } => write!(f, "[{element_type}; {num_elements}]"), + TypeDef { name } => write!(f, "{name}"), + } } } @@ -698,7 +699,7 @@ impl RustTypeReturn { Self::new(RustType::parse(ty, false, Nullability::Unspecified)) } - pub fn as_error(&self) -> TokenStream { + pub fn as_error(&self) -> String { match &self.inner { RustType::Id { type_, @@ -707,21 +708,21 @@ impl RustTypeReturn { nullability: Nullability::Nullable, } => { // NULL -> error - quote!(-> Result, Id>) + format!(" -> Result, Id>") } RustType::ObjcBool => { // NO -> error - quote!(-> Result<(), Id>) + format!(" -> Result<(), Id>") } _ => panic!("unknown error result type {self:?}"), } } } -impl ToTokens for RustTypeReturn { - fn to_tokens(&self, tokens: &mut TokenStream) { - let result = match &self.inner { - RustType::Void => return, +impl fmt::Display for RustTypeReturn { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match &self.inner { + RustType::Void => Ok(()), RustType::Id { type_, // Ignore @@ -731,13 +732,12 @@ impl ToTokens for RustTypeReturn { nullability, } => { if *nullability == Nullability::NonNull { - quote!(Id<#type_, Shared>) + write!(f, " -> Id<{type_}, Shared>") } else { - quote!(Option>) + write!(f, " -> Option>") } } - type_ => quote!(#type_), - }; - tokens.append_all(quote!(-> #result)); + type_ => write!(f, " -> {type_}"), + } } } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 9f669c69d..4464fd8e5 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -1,8 +1,7 @@ use std::collections::HashSet; +use std::fmt; use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; -use proc_macro2::TokenStream; -use quote::{format_ident, quote, ToTokens, TokenStreamExt}; use crate::availability::Availability; use crate::config::{ClassData, Config}; @@ -16,11 +15,11 @@ pub enum MethodOrProperty { Property(Property), } -impl ToTokens for MethodOrProperty { - fn to_tokens(&self, tokens: &mut TokenStream) { +impl fmt::Display for MethodOrProperty { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { - Self::Method(method) => method.to_tokens(tokens), - Self::Property(property) => property.to_tokens(tokens), + Self::Method(method) => write!(f, "{method}"), + Self::Property(property) => write!(f, "{property}"), } } } @@ -347,9 +346,9 @@ impl Stmt { } } -impl ToTokens for Stmt { - fn to_tokens(&self, tokens: &mut TokenStream) { - let result = match self { +impl fmt::Display for Stmt { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { Self::ClassDecl { name, availability: _, @@ -358,51 +357,45 @@ impl ToTokens for Stmt { protocols: _, methods, } => { - let name = format_ident!("{}", name); - let generics: Vec<_> = generics - .iter() - .map(|name| format_ident!("{}", name)) - .collect(); - let generic_params = if generics.is_empty() { - quote!() + String::new() } else { - quote!(<#(#generics: Message),*>) + format!("<{}: Message>", generics.join(": Message,")) }; let type_ = if generics.is_empty() { - quote!(#name) + name.clone() } else { - quote!(#name<#(#generics),*>) + format!("{name}<{}>", generics.join(",")) }; - let superclass_name = - format_ident!("{}", superclass.as_deref().unwrap_or("Object")); + let superclass_name = superclass.as_deref().unwrap_or("Object"); // TODO: Use ty.get_objc_protocol_declarations() let macro_name = if generics.is_empty() { - quote!(extern_class) + "extern_class" } else { - quote!(__inner_extern_class) + "__inner_extern_class" }; - quote! { - #macro_name!( - #[derive(Debug)] - pub struct #name #generic_params; - - unsafe impl #generic_params ClassType for #type_ { - type Super = #superclass_name; - } - ); - - extern_methods!( - unsafe impl #generic_params #type_ { - #(#methods)* - } - ); + writeln!(f, "{macro_name}!(")?; + writeln!(f, " #[derive(Debug)]")?; + writeln!(f, " pub struct {name}{generic_params};")?; + writeln!( + f, + " unsafe impl{generic_params} ClassType for {type_} {{" + )?; + writeln!(f, " type Super = {superclass_name};")?; + writeln!(f, " }}")?; + writeln!(f, ");")?; + writeln!(f, "extern_methods!(")?; + writeln!(f, " unsafe impl{generic_params} {type_} {{")?; + for method in methods { + writeln!(f, "{method}")?; } + writeln!(f, " }}")?; + writeln!(f, ");")?; } Self::CategoryDecl { class_name, @@ -412,26 +405,28 @@ impl ToTokens for Stmt { protocols: _, methods, } => { - let meta = if let Some(name) = name { - quote!(#[doc = #name]) + let generic_params = if generics.is_empty() { + String::new() } else { - quote!() + format!("<{}: Message>", generics.join(": Message,")) }; - let class_name = format_ident!("{}", class_name); - - let generics: Vec<_> = generics - .iter() - .map(|name| format_ident!("{}", name)) - .collect(); - - quote! { - extern_methods!( - #meta - unsafe impl<#(#generics: Message),*> #class_name<#(#generics),*> { - #(#methods)* - } - ); + + let type_ = if generics.is_empty() { + class_name.clone() + } else { + format!("{class_name}<{}>", generics.join(",")) + }; + + writeln!(f, "extern_methods!(")?; + if let Some(name) = name { + writeln!(f, " #[doc = \"{name}\"]")?; + } + writeln!(f, " unsafe impl{generic_params} {type_} {{")?; + for method in methods { + writeln!(f, "{method}")?; } + writeln!(f, " }}")?; + writeln!(f, ");")?; } Self::ProtocolDecl { name, @@ -439,8 +434,6 @@ impl ToTokens for Stmt { protocols: _, methods: _, } => { - let name = format_ident!("{}", name); - // TODO // quote! { @@ -457,14 +450,12 @@ impl ToTokens for Stmt { // #(#methods)* // } // } - quote!(pub type #name = NSObject;) + writeln!(f, "pub type {name} = NSObject;")?; } Self::AliasDecl { name, type_ } => { - let name = format_ident!("{}", name); - - quote!(pub type #name = #type_;) + writeln!(f, "pub type {name} = {type_};")?; } }; - tokens.append_all(result); + Ok(()) } } diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index 1046e2e62..1a4b7e73d 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -61,7 +61,7 @@ extern_methods!( pub unsafe fn moveToPoint(&self, point: NSPoint); #[method(lineToPoint:)] pub unsafe fn lineToPoint(&self, point: NSPoint); - # [method (curveToPoint : controlPoint1 : controlPoint2 :)] + #[method(curveToPoint:controlPoint1:controlPoint2:)] pub unsafe fn curveToPoint_controlPoint1_controlPoint2( &self, endPoint: NSPoint, @@ -76,7 +76,7 @@ extern_methods!( pub unsafe fn relativeMoveToPoint(&self, point: NSPoint); #[method(relativeLineToPoint:)] pub unsafe fn relativeLineToPoint(&self, point: NSPoint); - # [method (relativeCurveToPoint : controlPoint1 : controlPoint2 :)] + #[method(relativeCurveToPoint:controlPoint1:controlPoint2:)] pub unsafe fn relativeCurveToPoint_controlPoint1_controlPoint2( &self, endPoint: NSPoint, diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 7cdbd6f85..872e252c3 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -131,7 +131,7 @@ extern_methods!( #[method(setVisibleItemsInvalidationHandler:)] pub unsafe fn setVisibleItemsInvalidationHandler( &self, - visibleItemsInvalidationHandler : NSCollectionLayoutSectionVisibleItemsInvalidationHandler, + visibleItemsInvalidationHandler: NSCollectionLayoutSectionVisibleItemsInvalidationHandler, ); #[method_id(decorationItems)] pub unsafe fn decorationItems( diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index e831aceff..4b9686c82 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -28,12 +28,12 @@ extern_methods!( blue: CGFloat, alpha: CGFloat, ) -> Id; - # [method_id (colorWithGenericGamma22White : alpha :)] + #[method_id(colorWithGenericGamma22White:alpha:)] pub unsafe fn colorWithGenericGamma22White_alpha( white: CGFloat, alpha: CGFloat, ) -> Id; - # [method_id (colorWithDisplayP3Red : green : blue : alpha :)] + #[method_id(colorWithDisplayP3Red:green:blue:alpha:)] pub unsafe fn colorWithDisplayP3Red_green_blue_alpha( red: CGFloat, green: CGFloat, diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 5e2b0cc81..ebcda05f0 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -205,7 +205,7 @@ extern_methods!( tNum: NSInteger, data: *mut c_void, ) -> Option>; - # [method_id (otherEventWithType : location : modifierFlags : timestamp : windowNumber : context : subtype : data1 : data2 :)] + #[method_id(otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:)] pub unsafe fn otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2( type_: NSEventType, location: NSPoint, diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 447329be0..94ae9586f 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -427,7 +427,7 @@ extern_methods!( #[method(getRectsExposedDuringLiveResize:count:)] pub unsafe fn getRectsExposedDuringLiveResize_count( &self, - exposedRects: [NSRect; 4usize], + exposedRects: [NSRect; 4], count: NonNull, ); #[method_id(inputContext)] diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index 672e33e00..9af4bf0d5 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -270,6 +270,7 @@ pub(crate) mod NSWindowScripting; pub(crate) mod NSWindowTab; pub(crate) mod NSWindowTabGroup; pub(crate) mod NSWorkspace; + mod __exported { pub use super::NSATSTypesetter::NSATSTypesetter; pub use super::NSAccessibilityConstants::{ diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 360d46c60..fd5833d08 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -31,7 +31,7 @@ extern_methods!( pub unsafe fn descriptorWithEnumCode( enumerator: OSType, ) -> Id; - # [method_id (descriptorWithInt32 :)] + #[method_id(descriptorWithInt32:)] pub unsafe fn descriptorWithInt32(signedInt: SInt32) -> Id; #[method_id(descriptorWithDouble:)] pub unsafe fn descriptorWithDouble( diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 115daa3e8..c62ecd38d 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -96,9 +96,9 @@ extern_methods!( pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString); #[method(encodeInt:forKey:)] pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString); - # [method (encodeInt32 : forKey :)] + #[method(encodeInt32:forKey:)] pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString); - # [method (encodeInt64 : forKey :)] + #[method(encodeInt64:forKey:)] pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString); #[method(encodeFloat:forKey:)] pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString); @@ -124,9 +124,9 @@ extern_methods!( pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool; #[method(decodeIntForKey:)] pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int; - # [method (decodeInt32ForKey :)] + #[method(decodeInt32ForKey:)] pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32; - # [method (decodeInt64ForKey :)] + #[method(decodeInt64ForKey:)] pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t; #[method(decodeFloatForKey:)] pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float; diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 56b774e63..385fd2ea1 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -147,24 +147,24 @@ extern_methods!( extern_methods!( #[doc = "NSDataBase64Encoding"] unsafe impl NSData { - # [method_id (initWithBase64EncodedString : options :)] + #[method_id(initWithBase64EncodedString:options:)] pub unsafe fn initWithBase64EncodedString_options( &self, base64String: &NSString, options: NSDataBase64DecodingOptions, ) -> Option>; - # [method_id (base64EncodedStringWithOptions :)] + #[method_id(base64EncodedStringWithOptions:)] pub unsafe fn base64EncodedStringWithOptions( &self, options: NSDataBase64EncodingOptions, ) -> Id; - # [method_id (initWithBase64EncodedData : options :)] + #[method_id(initWithBase64EncodedData:options:)] pub unsafe fn initWithBase64EncodedData_options( &self, base64Data: &NSData, options: NSDataBase64DecodingOptions, ) -> Option>; - # [method_id (base64EncodedDataWithOptions :)] + #[method_id(base64EncodedDataWithOptions:)] pub unsafe fn base64EncodedDataWithOptions( &self, options: NSDataBase64EncodingOptions, @@ -198,7 +198,7 @@ extern_methods!( &self, path: &NSString, ) -> Option>; - # [method_id (initWithBase64Encoding :)] + #[method_id(initWithBase64Encoding:)] pub unsafe fn initWithBase64Encoding( &self, base64String: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 9430fa650..b088881b3 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -65,7 +65,7 @@ extern_methods!( pub unsafe fn dateWithTimeIntervalSinceReferenceDate( ti: NSTimeInterval, ) -> Id; - # [method_id (dateWithTimeIntervalSince1970 :)] + #[method_id(dateWithTimeIntervalSince1970:)] pub unsafe fn dateWithTimeIntervalSince1970(secs: NSTimeInterval) -> Id; #[method_id(dateWithTimeInterval:sinceDate:)] pub unsafe fn dateWithTimeInterval_sinceDate( @@ -81,7 +81,7 @@ extern_methods!( #[method_id(initWithTimeIntervalSinceNow:)] pub unsafe fn initWithTimeIntervalSinceNow(&self, secs: NSTimeInterval) -> Id; - # [method_id (initWithTimeIntervalSince1970 :)] + #[method_id(initWithTimeIntervalSince1970:)] pub unsafe fn initWithTimeIntervalSince1970( &self, secs: NSTimeInterval, diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index cf91aa8a4..1edbecc27 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -116,12 +116,12 @@ extern_methods!( power: NSUInteger, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - # [method_id (decimalNumberByMultiplyingByPowerOf10 :)] + #[method_id(decimalNumberByMultiplyingByPowerOf10:)] pub unsafe fn decimalNumberByMultiplyingByPowerOf10( &self, power: c_short, ) -> Id; - # [method_id (decimalNumberByMultiplyingByPowerOf10 : withBehavior :)] + #[method_id(decimalNumberByMultiplyingByPowerOf10:withBehavior:)] pub unsafe fn decimalNumberByMultiplyingByPowerOf10_withBehavior( &self, power: c_short, diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 07ff7524a..e1d141750 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -64,9 +64,9 @@ extern_methods!( pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString); #[method(encodeInt:forKey:)] pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString); - # [method (encodeInt32 : forKey :)] + #[method(encodeInt32:forKey:)] pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString); - # [method (encodeInt64 : forKey :)] + #[method(encodeInt64:forKey:)] pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString); #[method(encodeFloat:forKey:)] pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString); @@ -165,9 +165,9 @@ extern_methods!( pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool; #[method(decodeIntForKey:)] pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int; - # [method (decodeInt32ForKey :)] + #[method(decodeInt32ForKey:)] pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32; - # [method (decodeInt64ForKey :)] + #[method(decodeInt64ForKey:)] pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t; #[method(decodeFloatForKey:)] pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 787adc6bc..f96045aa4 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -352,7 +352,7 @@ extern_methods!( characters: NonNull, length: NSUInteger, ) -> Id; - # [method_id (initWithUTF8String :)] + #[method_id(initWithUTF8String:)] pub unsafe fn initWithUTF8String( &self, nullTerminatedCString: NonNull, @@ -410,7 +410,7 @@ extern_methods!( characters: NonNull, length: NSUInteger, ) -> Id; - # [method_id (stringWithUTF8String :)] + #[method_id(stringWithUTF8String:)] pub unsafe fn stringWithUTF8String( nullTerminatedCString: NonNull, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 38eec3c2f..85e107b51 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -101,7 +101,7 @@ extern_methods!( ); #[method(assumesHTTP3Capable)] pub unsafe fn assumesHTTP3Capable(&self) -> bool; - # [method (setAssumesHTTP3Capable :)] + #[method(setAssumesHTTP3Capable:)] pub unsafe fn setAssumesHTTP3Capable(&self, assumesHTTP3Capable: bool); #[method(attribution)] pub unsafe fn attribution(&self) -> NSURLRequestAttribution; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 55bccf75b..e80e1df02 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -164,6 +164,7 @@ pub(crate) mod NSXMLNodeOptions; pub(crate) mod NSXMLParser; pub(crate) mod NSXPCConnection; pub(crate) mod NSZone; + mod __exported { pub use super::NSAffineTransform::NSAffineTransform; pub use super::NSAppleEventDescriptor::NSAppleEventDescriptor; From 55887dd58b1c875603be9986916a7e70556650a3 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 30 Oct 2022 01:38:57 +0200 Subject: [PATCH 077/131] Improve whitespace in generated files and add warning header --- crates/header-translator/src/lib.rs | 9 +- crates/header-translator/src/method.rs | 4 +- crates/header-translator/src/stmt.rs | 4 +- .../src/generated/AppKit/AppKitDefines.rs | 2 + .../src/generated/AppKit/AppKitErrors.rs | 2 + .../src/generated/AppKit/NSATSTypesetter.rs | 46 ++- .../src/generated/AppKit/NSAccessibility.rs | 34 +- .../AppKit/NSAccessibilityConstants.rs | 16 + .../AppKit/NSAccessibilityCustomAction.rs | 14 + .../AppKit/NSAccessibilityCustomRotor.rs | 35 ++ .../AppKit/NSAccessibilityElement.rs | 8 + .../AppKit/NSAccessibilityProtocols.rs | 23 ++ .../src/generated/AppKit/NSActionCell.rs | 10 + .../src/generated/AppKit/NSAffineTransform.rs | 7 +- crates/icrate/src/generated/AppKit/NSAlert.rs | 34 +- .../AppKit/NSAlignmentFeedbackFilter.rs | 12 + .../src/generated/AppKit/NSAnimation.rs | 41 +++ .../generated/AppKit/NSAnimationContext.rs | 17 + .../src/generated/AppKit/NSAppearance.rs | 16 + .../AppKit/NSAppleScriptExtensions.rs | 5 +- .../src/generated/AppKit/NSApplication.rs | 132 ++++++- .../AppKit/NSApplicationScripting.rs | 9 +- .../src/generated/AppKit/NSArrayController.rs | 51 +++ .../generated/AppKit/NSAttributedString.rs | 73 +++- .../src/generated/AppKit/NSBezierPath.rs | 80 ++++- .../src/generated/AppKit/NSBitmapImageRep.rs | 48 ++- crates/icrate/src/generated/AppKit/NSBox.rs | 36 +- .../icrate/src/generated/AppKit/NSBrowser.rs | 128 ++++++- .../src/generated/AppKit/NSBrowserCell.rs | 20 ++ .../icrate/src/generated/AppKit/NSButton.rs | 69 +++- .../src/generated/AppKit/NSButtonCell.rs | 63 +++- .../generated/AppKit/NSButtonTouchBarItem.rs | 21 ++ .../src/generated/AppKit/NSCIImageRep.rs | 12 +- .../src/generated/AppKit/NSCachedImageRep.rs | 8 + .../AppKit/NSCandidateListTouchBarItem.rs | 26 +- crates/icrate/src/generated/AppKit/NSCell.rs | 173 ++++++++- .../AppKit/NSClickGestureRecognizer.rs | 10 + .../icrate/src/generated/AppKit/NSClipView.rs | 30 +- .../src/generated/AppKit/NSCollectionView.rs | 112 +++++- .../NSCollectionViewCompositionalLayout.rs | 157 +++++++++ .../AppKit/NSCollectionViewFlowLayout.rs | 34 ++ .../AppKit/NSCollectionViewGridLayout.rs | 20 ++ .../AppKit/NSCollectionViewLayout.rs | 86 ++++- .../NSCollectionViewTransitionLayout.rs | 12 + crates/icrate/src/generated/AppKit/NSColor.rs | 160 ++++++++- .../src/generated/AppKit/NSColorList.rs | 20 ++ .../src/generated/AppKit/NSColorPanel.rs | 31 +- .../src/generated/AppKit/NSColorPicker.rs | 14 + .../AppKit/NSColorPickerTouchBarItem.rs | 24 ++ .../src/generated/AppKit/NSColorPicking.rs | 4 + .../src/generated/AppKit/NSColorSampler.rs | 5 + .../src/generated/AppKit/NSColorSpace.rs | 26 ++ .../src/generated/AppKit/NSColorWell.rs | 13 + .../icrate/src/generated/AppKit/NSComboBox.rs | 43 +++ .../src/generated/AppKit/NSComboBoxCell.rs | 41 +++ .../icrate/src/generated/AppKit/NSControl.rs | 96 ++++- .../src/generated/AppKit/NSController.rs | 12 + .../icrate/src/generated/AppKit/NSCursor.rs | 44 ++- .../src/generated/AppKit/NSCustomImageRep.rs | 9 + .../generated/AppKit/NSCustomTouchBarItem.rs | 10 + .../src/generated/AppKit/NSDataAsset.rs | 11 + .../src/generated/AppKit/NSDatePicker.rs | 38 ++ .../src/generated/AppKit/NSDatePickerCell.rs | 36 ++ .../AppKit/NSDictionaryController.rs | 27 ++ .../generated/AppKit/NSDiffableDataSource.rs | 40 +++ .../icrate/src/generated/AppKit/NSDockTile.rs | 14 + .../icrate/src/generated/AppKit/NSDocument.rs | 153 +++++++- .../generated/AppKit/NSDocumentController.rs | 65 +++- .../generated/AppKit/NSDocumentScripting.rs | 10 +- .../icrate/src/generated/AppKit/NSDragging.rs | 15 +- .../src/generated/AppKit/NSDraggingItem.rs | 25 ++ .../src/generated/AppKit/NSDraggingSession.rs | 14 + .../icrate/src/generated/AppKit/NSDrawer.rs | 35 +- .../src/generated/AppKit/NSEPSImageRep.rs | 9 + .../icrate/src/generated/AppKit/NSErrors.rs | 2 + crates/icrate/src/generated/AppKit/NSEvent.rs | 86 +++++ .../generated/AppKit/NSFilePromiseProvider.rs | 13 + .../generated/AppKit/NSFilePromiseReceiver.rs | 8 + .../AppKit/NSFileWrapperExtensions.rs | 6 +- crates/icrate/src/generated/AppKit/NSFont.rs | 74 +++- .../generated/AppKit/NSFontAssetRequest.rs | 9 + .../src/generated/AppKit/NSFontCollection.rs | 36 ++ .../src/generated/AppKit/NSFontDescriptor.rs | 37 +- .../src/generated/AppKit/NSFontManager.rs | 63 +++- .../src/generated/AppKit/NSFontPanel.rs | 19 +- crates/icrate/src/generated/AppKit/NSForm.rs | 25 ++ .../icrate/src/generated/AppKit/NSFormCell.rs | 32 +- .../generated/AppKit/NSGestureRecognizer.rs | 65 +++- .../src/generated/AppKit/NSGlyphGenerator.rs | 7 + .../src/generated/AppKit/NSGlyphInfo.rs | 15 +- .../icrate/src/generated/AppKit/NSGradient.rs | 18 + .../icrate/src/generated/AppKit/NSGraphics.rs | 4 + .../src/generated/AppKit/NSGraphicsContext.rs | 44 ++- .../icrate/src/generated/AppKit/NSGridView.rs | 84 +++++ .../generated/AppKit/NSGroupTouchBarItem.rs | 20 ++ .../src/generated/AppKit/NSHapticFeedback.rs | 6 + .../src/generated/AppKit/NSHelpManager.rs | 24 +- crates/icrate/src/generated/AppKit/NSImage.rs | 114 +++++- .../src/generated/AppKit/NSImageCell.rs | 10 + .../icrate/src/generated/AppKit/NSImageRep.rs | 49 +++ .../src/generated/AppKit/NSImageView.rs | 23 ++ .../src/generated/AppKit/NSInputManager.rs | 19 + .../src/generated/AppKit/NSInputServer.rs | 7 + .../src/generated/AppKit/NSInterfaceStyle.rs | 7 +- .../src/generated/AppKit/NSItemProvider.rs | 7 +- .../src/generated/AppKit/NSKeyValueBinding.rs | 41 ++- .../src/generated/AppKit/NSLayoutAnchor.rs | 37 ++ .../generated/AppKit/NSLayoutConstraint.rs | 99 +++++- .../src/generated/AppKit/NSLayoutGuide.rs | 26 +- .../src/generated/AppKit/NSLayoutManager.rs | 162 ++++++++- .../src/generated/AppKit/NSLevelIndicator.rs | 38 ++ .../generated/AppKit/NSLevelIndicatorCell.rs | 23 ++ .../NSMagnificationGestureRecognizer.rs | 6 + .../icrate/src/generated/AppKit/NSMatrix.rs | 104 +++++- .../AppKit/NSMediaLibraryBrowserController.rs | 12 + crates/icrate/src/generated/AppKit/NSMenu.rs | 87 ++++- .../icrate/src/generated/AppKit/NSMenuItem.rs | 72 +++- .../src/generated/AppKit/NSMenuItemCell.rs | 28 ++ .../src/generated/AppKit/NSMenuToolbarItem.rs | 8 + crates/icrate/src/generated/AppKit/NSMovie.rs | 8 + crates/icrate/src/generated/AppKit/NSNib.rs | 13 +- .../src/generated/AppKit/NSNibDeclarations.rs | 2 + .../src/generated/AppKit/NSNibLoading.rs | 14 +- .../generated/AppKit/NSObjectController.rs | 38 +- .../icrate/src/generated/AppKit/NSOpenGL.rs | 52 ++- .../src/generated/AppKit/NSOpenGLLayer.rs | 14 + .../src/generated/AppKit/NSOpenGLView.rs | 26 +- .../src/generated/AppKit/NSOpenPanel.rs | 27 +- .../src/generated/AppKit/NSOutlineView.rs | 49 +++ .../src/generated/AppKit/NSPDFImageRep.rs | 11 + .../icrate/src/generated/AppKit/NSPDFInfo.rs | 15 + .../icrate/src/generated/AppKit/NSPDFPanel.rs | 12 + .../src/generated/AppKit/NSPICTImageRep.rs | 8 + .../src/generated/AppKit/NSPageController.rs | 20 ++ .../src/generated/AppKit/NSPageLayout.rs | 21 +- .../AppKit/NSPanGestureRecognizer.rs | 11 + crates/icrate/src/generated/AppKit/NSPanel.rs | 10 + .../src/generated/AppKit/NSParagraphStyle.rs | 89 ++++- .../src/generated/AppKit/NSPasteboard.rs | 56 ++- .../src/generated/AppKit/NSPasteboardItem.rs | 14 + .../icrate/src/generated/AppKit/NSPathCell.rs | 30 ++ .../generated/AppKit/NSPathComponentCell.rs | 8 + .../src/generated/AppKit/NSPathControl.rs | 34 +- .../src/generated/AppKit/NSPathControlItem.rs | 11 + .../generated/AppKit/NSPersistentDocument.rs | 15 +- .../generated/AppKit/NSPickerTouchBarItem.rs | 34 ++ .../src/generated/AppKit/NSPopUpButton.rs | 41 +++ .../src/generated/AppKit/NSPopUpButtonCell.rs | 50 +++ .../icrate/src/generated/AppKit/NSPopover.rs | 27 ++ .../generated/AppKit/NSPopoverTouchBarItem.rs | 21 ++ .../src/generated/AppKit/NSPredicateEditor.rs | 6 + .../AppKit/NSPredicateEditorRowTemplate.rs | 20 ++ .../AppKit/NSPressGestureRecognizer.rs | 12 + .../AppKit/NSPressureConfiguration.rs | 11 +- .../src/generated/AppKit/NSPrintInfo.rs | 58 ++- .../src/generated/AppKit/NSPrintOperation.rs | 50 ++- .../src/generated/AppKit/NSPrintPanel.rs | 29 +- .../icrate/src/generated/AppKit/NSPrinter.rs | 35 +- .../generated/AppKit/NSProgressIndicator.rs | 33 +- .../src/generated/AppKit/NSResponder.rs | 81 ++++- .../AppKit/NSRotationGestureRecognizer.rs | 8 + .../src/generated/AppKit/NSRuleEditor.rs | 48 +++ .../src/generated/AppKit/NSRulerMarker.rs | 25 ++ .../src/generated/AppKit/NSRulerView.rs | 52 ++- .../generated/AppKit/NSRunningApplication.rs | 30 +- .../src/generated/AppKit/NSSavePanel.rs | 66 +++- .../icrate/src/generated/AppKit/NSScreen.rs | 34 +- .../src/generated/AppKit/NSScrollView.rs | 97 +++++- .../icrate/src/generated/AppKit/NSScroller.rs | 36 +- .../icrate/src/generated/AppKit/NSScrubber.rs | 56 +++ .../generated/AppKit/NSScrubberItemView.rs | 27 ++ .../src/generated/AppKit/NSScrubberLayout.rs | 41 +++ .../src/generated/AppKit/NSSearchField.rs | 30 +- .../src/generated/AppKit/NSSearchFieldCell.rs | 28 ++ .../generated/AppKit/NSSearchToolbarItem.rs | 14 + .../src/generated/AppKit/NSSecureTextField.rs | 9 + .../src/generated/AppKit/NSSegmentedCell.rs | 37 +- .../generated/AppKit/NSSegmentedControl.rs | 50 ++- .../icrate/src/generated/AppKit/NSShadow.rs | 12 + .../src/generated/AppKit/NSSharingService.rs | 40 ++- .../NSSharingServicePickerToolbarItem.rs | 7 + .../NSSharingServicePickerTouchBarItem.rs | 13 + .../icrate/src/generated/AppKit/NSSlider.rs | 50 ++- .../src/generated/AppKit/NSSliderAccessory.rs | 18 + .../src/generated/AppKit/NSSliderCell.rs | 51 ++- .../generated/AppKit/NSSliderTouchBarItem.rs | 28 ++ crates/icrate/src/generated/AppKit/NSSound.rs | 42 ++- .../generated/AppKit/NSSpeechRecognizer.rs | 18 + .../generated/AppKit/NSSpeechSynthesizer.rs | 42 +++ .../src/generated/AppKit/NSSpellChecker.rs | 61 +++- .../src/generated/AppKit/NSSpellProtocol.rs | 4 + .../src/generated/AppKit/NSSplitView.rs | 36 +- .../generated/AppKit/NSSplitViewController.rs | 24 +- .../src/generated/AppKit/NSSplitViewItem.rs | 32 ++ .../src/generated/AppKit/NSStackView.rs | 45 ++- .../src/generated/AppKit/NSStatusBar.rs | 9 + .../src/generated/AppKit/NSStatusBarButton.rs | 6 + .../src/generated/AppKit/NSStatusItem.rs | 44 ++- .../icrate/src/generated/AppKit/NSStepper.rs | 14 + .../src/generated/AppKit/NSStepperCell.rs | 14 + .../generated/AppKit/NSStepperTouchBarItem.rs | 20 ++ .../src/generated/AppKit/NSStoryboard.rs | 12 + .../src/generated/AppKit/NSStoryboardSegue.rs | 12 + .../src/generated/AppKit/NSStringDrawing.rs | 34 +- .../icrate/src/generated/AppKit/NSSwitch.rs | 6 + .../icrate/src/generated/AppKit/NSTabView.rs | 44 +++ .../generated/AppKit/NSTabViewController.rs | 28 ++ .../src/generated/AppKit/NSTabViewItem.rs | 26 ++ .../src/generated/AppKit/NSTableCellView.rs | 15 + .../src/generated/AppKit/NSTableColumn.rs | 38 +- .../src/generated/AppKit/NSTableHeaderCell.rs | 6 + .../src/generated/AppKit/NSTableHeaderView.rs | 11 + .../src/generated/AppKit/NSTableRowView.rs | 33 ++ .../src/generated/AppKit/NSTableView.rs | 171 ++++++++- .../AppKit/NSTableViewDiffableDataSource.rs | 20 ++ .../generated/AppKit/NSTableViewRowAction.rs | 12 + crates/icrate/src/generated/AppKit/NSText.rs | 77 ++++ .../generated/AppKit/NSTextAlternatives.rs | 8 + .../src/generated/AppKit/NSTextAttachment.rs | 47 ++- .../generated/AppKit/NSTextAttachmentCell.rs | 6 + .../generated/AppKit/NSTextCheckingClient.rs | 4 + .../AppKit/NSTextCheckingController.rs | 25 ++ .../src/generated/AppKit/NSTextContainer.rs | 35 +- .../src/generated/AppKit/NSTextContent.rs | 4 + .../generated/AppKit/NSTextContentManager.rs | 36 ++ .../src/generated/AppKit/NSTextElement.rs | 15 + .../src/generated/AppKit/NSTextField.rs | 63 +++- .../src/generated/AppKit/NSTextFieldCell.rs | 23 ++ .../src/generated/AppKit/NSTextFinder.rs | 25 ++ .../src/generated/AppKit/NSTextInputClient.rs | 3 + .../generated/AppKit/NSTextInputContext.rs | 22 ++ .../generated/AppKit/NSTextLayoutFragment.rs | 24 ++ .../generated/AppKit/NSTextLayoutManager.rs | 45 +++ .../generated/AppKit/NSTextLineFragment.rs | 16 + .../icrate/src/generated/AppKit/NSTextList.rs | 11 + .../src/generated/AppKit/NSTextRange.rs | 18 + .../src/generated/AppKit/NSTextSelection.rs | 22 ++ .../AppKit/NSTextSelectionNavigation.rs | 20 ++ .../src/generated/AppKit/NSTextStorage.rs | 26 +- .../AppKit/NSTextStorageScripting.rs | 16 +- .../src/generated/AppKit/NSTextTable.rs | 46 +++ .../icrate/src/generated/AppKit/NSTextView.rs | 246 ++++++++++++- .../AppKit/NSTextViewportLayoutController.rs | 16 + .../generated/AppKit/NSTintConfiguration.rs | 11 + .../NSTitlebarAccessoryViewController.rs | 15 + .../src/generated/AppKit/NSTokenField.rs | 15 + .../src/generated/AppKit/NSTokenFieldCell.rs | 15 + .../icrate/src/generated/AppKit/NSToolbar.rs | 47 ++- .../src/generated/AppKit/NSToolbarItem.rs | 50 ++- .../generated/AppKit/NSToolbarItemGroup.rs | 16 + crates/icrate/src/generated/AppKit/NSTouch.rs | 15 +- .../icrate/src/generated/AppKit/NSTouchBar.rs | 40 ++- .../src/generated/AppKit/NSTouchBarItem.rs | 15 + .../src/generated/AppKit/NSTrackingArea.rs | 9 + .../AppKit/NSTrackingSeparatorToolbarItem.rs | 9 + .../src/generated/AppKit/NSTreeController.rs | 49 +++ .../icrate/src/generated/AppKit/NSTreeNode.rs | 14 + .../src/generated/AppKit/NSTypesetter.rs | 71 +++- .../src/generated/AppKit/NSUserActivity.rs | 13 +- .../AppKit/NSUserDefaultsController.rs | 17 + .../AppKit/NSUserInterfaceCompression.rs | 19 + .../NSUserInterfaceItemIdentification.rs | 4 + .../AppKit/NSUserInterfaceItemSearching.rs | 8 +- .../generated/AppKit/NSUserInterfaceLayout.rs | 2 + .../AppKit/NSUserInterfaceValidation.rs | 4 + crates/icrate/src/generated/AppKit/NSView.rs | 298 +++++++++++++++- .../src/generated/AppKit/NSViewController.rs | 66 +++- .../generated/AppKit/NSVisualEffectView.rs | 17 + .../icrate/src/generated/AppKit/NSWindow.rs | 329 +++++++++++++++++- .../generated/AppKit/NSWindowController.rs | 39 ++- .../generated/AppKit/NSWindowRestoration.rs | 38 +- .../src/generated/AppKit/NSWindowScripting.rs | 19 +- .../src/generated/AppKit/NSWindowTab.rs | 12 + .../src/generated/AppKit/NSWindowTabGroup.rs | 14 + .../src/generated/AppKit/NSWorkspace.rs | 122 ++++++- .../generated/Foundation/FoundationErrors.rs | 2 + .../FoundationLegacySwiftCompatibility.rs | 2 + .../generated/Foundation/NSAffineTransform.rs | 19 + .../Foundation/NSAppleEventDescriptor.rs | 59 ++++ .../Foundation/NSAppleEventManager.rs | 15 + .../src/generated/Foundation/NSAppleScript.rs | 11 + .../src/generated/Foundation/NSArchiver.rs | 31 +- .../src/generated/Foundation/NSArray.rs | 119 ++++++- .../Foundation/NSAttributedString.rs | 89 ++++- .../generated/Foundation/NSAutoreleasePool.rs | 7 + .../NSBackgroundActivityScheduler.rs | 17 + .../src/generated/Foundation/NSBundle.rs | 82 ++++- .../Foundation/NSByteCountFormatter.rs | 27 ++ .../src/generated/Foundation/NSByteOrder.rs | 2 + .../src/generated/Foundation/NSCache.rs | 20 ++ .../src/generated/Foundation/NSCalendar.rs | 117 +++++++ .../generated/Foundation/NSCalendarDate.rs | 40 ++- .../generated/Foundation/NSCharacterSet.rs | 58 +++ .../Foundation/NSClassDescription.rs | 18 +- .../src/generated/Foundation/NSCoder.rs | 70 +++- .../Foundation/NSComparisonPredicate.rs | 15 + .../Foundation/NSCompoundPredicate.rs | 11 + .../src/generated/Foundation/NSConnection.rs | 51 +++ .../icrate/src/generated/Foundation/NSData.rs | 83 ++++- .../icrate/src/generated/Foundation/NSDate.rs | 35 +- .../Foundation/NSDateComponentsFormatter.rs | 32 ++ .../generated/Foundation/NSDateFormatter.rs | 84 ++++- .../generated/Foundation/NSDateInterval.rs | 16 + .../Foundation/NSDateIntervalFormatter.rs | 18 + .../src/generated/Foundation/NSDecimal.rs | 2 + .../generated/Foundation/NSDecimalNumber.rs | 49 ++- .../src/generated/Foundation/NSDictionary.rs | 83 ++++- .../generated/Foundation/NSDistantObject.rs | 11 + .../generated/Foundation/NSDistributedLock.rs | 11 + .../NSDistributedNotificationCenter.rs | 16 + .../generated/Foundation/NSEnergyFormatter.rs | 15 + .../src/generated/Foundation/NSEnumerator.rs | 9 +- .../src/generated/Foundation/NSError.rs | 24 +- .../src/generated/Foundation/NSException.rs | 18 +- .../src/generated/Foundation/NSExpression.rs | 38 ++ .../Foundation/NSExtensionContext.rs | 8 + .../generated/Foundation/NSExtensionItem.rs | 12 + .../Foundation/NSExtensionRequestHandling.rs | 3 + .../generated/Foundation/NSFileCoordinator.rs | 25 ++ .../src/generated/Foundation/NSFileHandle.rs | 60 +++- .../src/generated/Foundation/NSFileManager.rs | 116 +++++- .../generated/Foundation/NSFilePresenter.rs | 3 + .../src/generated/Foundation/NSFileVersion.rs | 27 ++ .../src/generated/Foundation/NSFileWrapper.rs | 40 ++- .../src/generated/Foundation/NSFormatter.rs | 10 + .../Foundation/NSGarbageCollector.rs | 14 + .../src/generated/Foundation/NSGeometry.rs | 31 +- .../generated/Foundation/NSHFSFileTypes.rs | 2 + .../src/generated/Foundation/NSHTTPCookie.rs | 24 ++ .../Foundation/NSHTTPCookieStorage.rs | 19 +- .../src/generated/Foundation/NSHashTable.rs | 27 ++ .../icrate/src/generated/Foundation/NSHost.rs | 16 + .../Foundation/NSISO8601DateFormatter.rs | 12 + .../src/generated/Foundation/NSIndexPath.rs | 17 +- .../src/generated/Foundation/NSIndexSet.rs | 46 +++ .../generated/Foundation/NSInflectionRule.rs | 14 +- .../src/generated/Foundation/NSInvocation.rs | 18 + .../generated/Foundation/NSItemProvider.rs | 29 +- .../Foundation/NSJSONSerialization.rs | 8 + .../generated/Foundation/NSKeyValueCoding.rs | 53 ++- .../Foundation/NSKeyValueObserving.rs | 46 ++- .../generated/Foundation/NSKeyedArchiver.rs | 75 +++- .../generated/Foundation/NSLengthFormatter.rs | 15 + .../Foundation/NSLinguisticTagger.rs | 33 +- .../generated/Foundation/NSListFormatter.rs | 11 + .../src/generated/Foundation/NSLocale.rs | 61 +++- .../icrate/src/generated/Foundation/NSLock.rs | 35 ++ .../src/generated/Foundation/NSMapTable.rs | 26 ++ .../generated/Foundation/NSMassFormatter.rs | 15 + .../src/generated/Foundation/NSMeasurement.rs | 12 + .../Foundation/NSMeasurementFormatter.rs | 14 + .../src/generated/Foundation/NSMetadata.rs | 58 +++ .../Foundation/NSMetadataAttributes.rs | 2 + .../generated/Foundation/NSMethodSignature.rs | 11 + .../src/generated/Foundation/NSMorphology.rs | 32 +- .../src/generated/Foundation/NSNetServices.rs | 44 +++ .../generated/Foundation/NSNotification.rs | 25 +- .../Foundation/NSNotificationQueue.rs | 9 + .../icrate/src/generated/Foundation/NSNull.rs | 5 + .../generated/Foundation/NSNumberFormatter.rs | 142 +++++++- .../src/generated/Foundation/NSObjCRuntime.rs | 4 + .../src/generated/Foundation/NSObject.rs | 19 +- .../generated/Foundation/NSObjectScripting.rs | 9 +- .../src/generated/Foundation/NSOperation.rs | 62 +++- .../Foundation/NSOrderedCollectionChange.rs | 13 + .../NSOrderedCollectionDifference.rs | 12 + .../src/generated/Foundation/NSOrderedSet.rs | 109 +++++- .../src/generated/Foundation/NSOrthography.rs | 19 +- .../generated/Foundation/NSPathUtilities.rs | 24 +- .../Foundation/NSPersonNameComponents.rs | 18 + .../NSPersonNameComponentsFormatter.rs | 15 + .../generated/Foundation/NSPointerArray.rs | 24 +- .../Foundation/NSPointerFunctions.rs | 22 ++ .../icrate/src/generated/Foundation/NSPort.rs | 45 +++ .../src/generated/Foundation/NSPortCoder.rs | 16 +- .../src/generated/Foundation/NSPortMessage.rs | 11 + .../generated/Foundation/NSPortNameServer.rs | 32 ++ .../src/generated/Foundation/NSPredicate.rs | 32 +- .../src/generated/Foundation/NSProcessInfo.rs | 47 ++- .../src/generated/Foundation/NSProgress.rs | 64 ++++ .../generated/Foundation/NSPropertyList.rs | 10 + .../generated/Foundation/NSProtocolChecker.rs | 10 +- .../src/generated/Foundation/NSProxy.rs | 16 + .../src/generated/Foundation/NSRange.rs | 6 +- .../Foundation/NSRegularExpression.rs | 28 +- .../Foundation/NSRelativeDateTimeFormatter.rs | 18 + .../src/generated/Foundation/NSRunLoop.rs | 32 +- .../src/generated/Foundation/NSScanner.rs | 33 +- .../Foundation/NSScriptClassDescription.rs | 31 +- .../Foundation/NSScriptCoercionHandler.rs | 7 + .../generated/Foundation/NSScriptCommand.rs | 30 ++ .../Foundation/NSScriptCommandDescription.rs | 20 ++ .../Foundation/NSScriptExecutionContext.rs | 11 + .../Foundation/NSScriptKeyValueCoding.rs | 12 +- .../Foundation/NSScriptObjectSpecifiers.rs | 99 +++++- .../NSScriptStandardSuiteCommands.rs | 37 ++ .../Foundation/NSScriptSuiteRegistry.rs | 19 + .../Foundation/NSScriptWhoseTests.rs | 38 +- .../icrate/src/generated/Foundation/NSSet.rs | 66 +++- .../generated/Foundation/NSSortDescriptor.rs | 33 +- .../src/generated/Foundation/NSSpellServer.rs | 10 + .../src/generated/Foundation/NSStream.rs | 54 ++- .../src/generated/Foundation/NSString.rs | 169 ++++++++- .../icrate/src/generated/Foundation/NSTask.rs | 44 ++- .../Foundation/NSTextCheckingResult.rs | 43 ++- .../src/generated/Foundation/NSThread.rs | 43 ++- .../src/generated/Foundation/NSTimeZone.rs | 38 +- .../src/generated/Foundation/NSTimer.rs | 21 ++ .../icrate/src/generated/Foundation/NSURL.rs | 180 +++++++++- .../NSURLAuthenticationChallenge.rs | 13 + .../src/generated/Foundation/NSURLCache.rs | 32 +- .../generated/Foundation/NSURLConnection.rs | 24 +- .../generated/Foundation/NSURLCredential.rs | 22 +- .../Foundation/NSURLCredentialStorage.rs | 19 +- .../src/generated/Foundation/NSURLDownload.rs | 14 + .../src/generated/Foundation/NSURLError.rs | 2 + .../src/generated/Foundation/NSURLHandle.rs | 29 ++ .../Foundation/NSURLProtectionSpace.rs | 20 +- .../src/generated/Foundation/NSURLProtocol.rs | 24 +- .../src/generated/Foundation/NSURLRequest.rs | 66 +++- .../src/generated/Foundation/NSURLResponse.rs | 17 + .../src/generated/Foundation/NSURLSession.rs | 235 ++++++++++++- .../icrate/src/generated/Foundation/NSUUID.rs | 11 + .../Foundation/NSUbiquitousKeyValueStore.rs | 24 ++ .../src/generated/Foundation/NSUndoManager.rs | 38 ++ .../icrate/src/generated/Foundation/NSUnit.rs | 271 +++++++++++++++ .../generated/Foundation/NSUserActivity.rs | 48 +++ .../generated/Foundation/NSUserDefaults.rs | 42 +++ .../Foundation/NSUserNotification.rs | 62 ++++ .../generated/Foundation/NSUserScriptTask.rs | 24 ++ .../src/generated/Foundation/NSValue.rs | 76 +++- .../Foundation/NSValueTransformer.rs | 15 + .../src/generated/Foundation/NSXMLDTD.rs | 23 ++ .../src/generated/Foundation/NSXMLDTDNode.rs | 16 + .../src/generated/Foundation/NSXMLDocument.rs | 36 ++ .../src/generated/Foundation/NSXMLElement.rs | 35 +- .../src/generated/Foundation/NSXMLNode.rs | 55 +++ .../generated/Foundation/NSXMLNodeOptions.rs | 2 + .../src/generated/Foundation/NSXMLParser.rs | 29 +- .../generated/Foundation/NSXPCConnection.rs | 65 ++++ .../icrate/src/generated/Foundation/NSZone.rs | 2 + 441 files changed, 15123 insertions(+), 436 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 8be2379ea..61c5efe6d 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -20,10 +20,13 @@ pub struct RustFile { stmts: Vec, } -const INITIAL_IMPORTS: &str = r#"#[allow(unused_imports)] +const INITIAL_IMPORTS: &str = r#"//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +#[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType};"#; +use objc2::{extern_class, extern_methods, ClassType}; +"#; impl RustFile { pub fn new() -> Self { @@ -53,7 +56,7 @@ impl RustFile { let mut tokens = String::new(); writeln!(tokens, "{}", INITIAL_IMPORTS).unwrap(); for stmt in self.stmts { - write!(tokens, "{}", stmt).unwrap(); + writeln!(tokens, "{}", stmt).unwrap(); } (self.declared_types, tokens) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 4a7a940e0..3fdf80a1d 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -341,9 +341,9 @@ impl fmt::Display for Method { write!(f, ")")?; if is_error { - write!(f, "{};", self.result_type.as_error())?; + writeln!(f, "{};", self.result_type.as_error())?; } else { - write!(f, "{};", self.result_type)?; + writeln!(f, "{};", self.result_type)?; }; Ok(()) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 4464fd8e5..6489abea8 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -382,6 +382,7 @@ impl fmt::Display for Stmt { writeln!(f, "{macro_name}!(")?; writeln!(f, " #[derive(Debug)]")?; writeln!(f, " pub struct {name}{generic_params};")?; + writeln!(f, "")?; writeln!( f, " unsafe impl{generic_params} ClassType for {type_} {{" @@ -389,6 +390,7 @@ impl fmt::Display for Stmt { writeln!(f, " type Super = {superclass_name};")?; writeln!(f, " }}")?; writeln!(f, ");")?; + writeln!(f, "")?; writeln!(f, "extern_methods!(")?; writeln!(f, " unsafe impl{generic_params} {type_} {{")?; for method in methods { @@ -419,7 +421,7 @@ impl fmt::Display for Stmt { writeln!(f, "extern_methods!(")?; if let Some(name) = name { - writeln!(f, " #[doc = \"{name}\"]")?; + writeln!(f, " /// {name}")?; } writeln!(f, " unsafe impl{generic_params} {type_} {{")?; for method in methods { diff --git a/crates/icrate/src/generated/AppKit/AppKitDefines.rs b/crates/icrate/src/generated/AppKit/AppKitDefines.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/AppKit/AppKitDefines.rs +++ b/crates/icrate/src/generated/AppKit/AppKitDefines.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/AppKitErrors.rs b/crates/icrate/src/generated/AppKit/AppKitErrors.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/AppKit/AppKitErrors.rs +++ b/crates/icrate/src/generated/AppKit/AppKitErrors.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs index a1c72df0b..fa0ec0145 100644 --- a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs @@ -1,22 +1,28 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSATSTypesetter; + unsafe impl ClassType for NSATSTypesetter { type Super = NSTypesetter; } ); + extern_methods!( unsafe impl NSATSTypesetter { #[method_id(sharedTypesetter)] pub unsafe fn sharedTypesetter() -> Id; } ); + extern_methods!( - #[doc = "NSPantherCompatibility"] + /// NSPantherCompatibility unsafe impl NSATSTypesetter { #[method(lineFragmentRectForProposedRect:remainingRect:)] pub unsafe fn lineFragmentRectForProposedRect_remainingRect( @@ -26,27 +32,37 @@ extern_methods!( ) -> NSRect; } ); + extern_methods!( - #[doc = "NSPrimitiveInterface"] + /// NSPrimitiveInterface unsafe impl NSATSTypesetter { #[method(usesFontLeading)] pub unsafe fn usesFontLeading(&self) -> bool; + #[method(setUsesFontLeading:)] pub unsafe fn setUsesFontLeading(&self, usesFontLeading: bool); + #[method(typesetterBehavior)] pub unsafe fn typesetterBehavior(&self) -> NSTypesetterBehavior; + #[method(setTypesetterBehavior:)] pub unsafe fn setTypesetterBehavior(&self, typesetterBehavior: NSTypesetterBehavior); + #[method(hyphenationFactor)] pub unsafe fn hyphenationFactor(&self) -> c_float; + #[method(setHyphenationFactor:)] pub unsafe fn setHyphenationFactor(&self, hyphenationFactor: c_float); + #[method(lineFragmentPadding)] pub unsafe fn lineFragmentPadding(&self) -> CGFloat; + #[method(setLineFragmentPadding:)] pub unsafe fn setLineFragmentPadding(&self, lineFragmentPadding: CGFloat); + #[method_id(substituteFontForFont:)] pub unsafe fn substituteFontForFont(&self, originalFont: &NSFont) -> Id; + #[method_id(textTabForGlyphLocation:writingDirection:maxLocation:)] pub unsafe fn textTabForGlyphLocation_writingDirection_maxLocation( &self, @@ -54,53 +70,68 @@ extern_methods!( direction: NSWritingDirection, maxLocation: CGFloat, ) -> Option>; + #[method(bidiProcessingEnabled)] pub unsafe fn bidiProcessingEnabled(&self) -> bool; + #[method(setBidiProcessingEnabled:)] pub unsafe fn setBidiProcessingEnabled(&self, bidiProcessingEnabled: bool); + #[method_id(attributedString)] pub unsafe fn attributedString(&self) -> Option>; + #[method(setAttributedString:)] pub unsafe fn setAttributedString(&self, attributedString: Option<&NSAttributedString>); + #[method(setParagraphGlyphRange:separatorGlyphRange:)] pub unsafe fn setParagraphGlyphRange_separatorGlyphRange( &self, paragraphRange: NSRange, paragraphSeparatorRange: NSRange, ); + #[method(paragraphGlyphRange)] pub unsafe fn paragraphGlyphRange(&self) -> NSRange; + #[method(paragraphSeparatorGlyphRange)] pub unsafe fn paragraphSeparatorGlyphRange(&self) -> NSRange; + #[method(layoutParagraphAtPoint:)] pub unsafe fn layoutParagraphAtPoint( &self, lineFragmentOrigin: NonNull, ) -> NSUInteger; + #[method(lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] pub unsafe fn lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, glyphIndex: NSUInteger, rect: NSRect, ) -> CGFloat; + #[method(paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:)] pub unsafe fn paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect( &self, glyphIndex: NSUInteger, rect: NSRect, ) -> CGFloat; + #[method(paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] pub unsafe fn paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, glyphIndex: NSUInteger, rect: NSRect, ) -> CGFloat; + #[method_id(layoutManager)] pub unsafe fn layoutManager(&self) -> Option>; + #[method_id(currentTextContainer)] pub unsafe fn currentTextContainer(&self) -> Option>; + #[method(setHardInvalidation:forGlyphRange:)] pub unsafe fn setHardInvalidation_forGlyphRange(&self, flag: bool, glyphRange: NSRange); + #[method(getLineFragmentRect:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:)] pub unsafe fn getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin( &self, @@ -111,8 +142,9 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSLayoutPhaseInterface"] + /// NSLayoutPhaseInterface unsafe impl NSATSTypesetter { #[method(willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:)] pub unsafe fn willSetLineFragmentRect_forGlyphRange_usedRect_baselineOffset( @@ -122,20 +154,25 @@ extern_methods!( usedRect: NonNull, baselineOffset: NonNull, ); + #[method(shouldBreakLineByWordBeforeCharacterAtIndex:)] pub unsafe fn shouldBreakLineByWordBeforeCharacterAtIndex( &self, charIndex: NSUInteger, ) -> bool; + #[method(shouldBreakLineByHyphenatingBeforeCharacterAtIndex:)] pub unsafe fn shouldBreakLineByHyphenatingBeforeCharacterAtIndex( &self, charIndex: NSUInteger, ) -> bool; + #[method(hyphenationFactorForGlyphAtIndex:)] pub unsafe fn hyphenationFactorForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> c_float; + #[method(hyphenCharacterForGlyphAtIndex:)] pub unsafe fn hyphenCharacterForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> UTF32Char; + #[method(boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:)] pub unsafe fn boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex( &self, @@ -147,8 +184,9 @@ extern_methods!( ) -> NSRect; } ); + extern_methods!( - #[doc = "NSGlyphStorageInterface"] + /// NSGlyphStorageInterface unsafe impl NSATSTypesetter { #[method(getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:)] pub unsafe fn getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits( diff --git a/crates/icrate/src/generated/AppKit/NSAccessibility.rs b/crates/icrate/src/generated/AppKit/NSAccessibility.rs index cb7e736b9..fec43d310 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibility.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibility.rs @@ -1,64 +1,81 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSAccessibility"] + /// NSAccessibility unsafe impl NSObject { #[method_id(accessibilityAttributeNames)] pub unsafe fn accessibilityAttributeNames( &self, ) -> Id, Shared>; + #[method_id(accessibilityAttributeValue:)] pub unsafe fn accessibilityAttributeValue( &self, attribute: &NSAccessibilityAttributeName, ) -> Option>; + #[method(accessibilityIsAttributeSettable:)] pub unsafe fn accessibilityIsAttributeSettable( &self, attribute: &NSAccessibilityAttributeName, ) -> bool; + #[method(accessibilitySetValue:forAttribute:)] pub unsafe fn accessibilitySetValue_forAttribute( &self, value: Option<&Object>, attribute: &NSAccessibilityAttributeName, ); + #[method_id(accessibilityParameterizedAttributeNames)] pub unsafe fn accessibilityParameterizedAttributeNames( &self, ) -> Id, Shared>; + #[method_id(accessibilityAttributeValue:forParameter:)] pub unsafe fn accessibilityAttributeValue_forParameter( &self, attribute: &NSAccessibilityParameterizedAttributeName, parameter: Option<&Object>, ) -> Option>; + #[method_id(accessibilityActionNames)] pub unsafe fn accessibilityActionNames( &self, ) -> Id, Shared>; + #[method_id(accessibilityActionDescription:)] pub unsafe fn accessibilityActionDescription( &self, action: &NSAccessibilityActionName, ) -> Option>; + #[method(accessibilityPerformAction:)] pub unsafe fn accessibilityPerformAction(&self, action: &NSAccessibilityActionName); + #[method(accessibilityIsIgnored)] pub unsafe fn accessibilityIsIgnored(&self) -> bool; + #[method_id(accessibilityHitTest:)] pub unsafe fn accessibilityHitTest(&self, point: NSPoint) -> Option>; + #[method_id(accessibilityFocusedUIElement)] pub unsafe fn accessibilityFocusedUIElement(&self) -> Option>; + #[method(accessibilityIndexOfChild:)] pub unsafe fn accessibilityIndexOfChild(&self, child: &Object) -> NSUInteger; + #[method(accessibilityArrayAttributeCount:)] pub unsafe fn accessibilityArrayAttributeCount( &self, attribute: &NSAccessibilityAttributeName, ) -> NSUInteger; + #[method_id(accessibilityArrayAttributeValues:index:maxCount:)] pub unsafe fn accessibilityArrayAttributeValues_index_maxCount( &self, @@ -66,36 +83,45 @@ extern_methods!( index: NSUInteger, maxCount: NSUInteger, ) -> Id; + #[method(accessibilityNotifiesWhenDestroyed)] pub unsafe fn accessibilityNotifiesWhenDestroyed(&self) -> bool; } ); + extern_methods!( - #[doc = "NSWorkspaceAccessibilityDisplay"] + /// NSWorkspaceAccessibilityDisplay unsafe impl NSWorkspace { #[method(accessibilityDisplayShouldIncreaseContrast)] pub unsafe fn accessibilityDisplayShouldIncreaseContrast(&self) -> bool; + #[method(accessibilityDisplayShouldDifferentiateWithoutColor)] pub unsafe fn accessibilityDisplayShouldDifferentiateWithoutColor(&self) -> bool; + #[method(accessibilityDisplayShouldReduceTransparency)] pub unsafe fn accessibilityDisplayShouldReduceTransparency(&self) -> bool; + #[method(accessibilityDisplayShouldReduceMotion)] pub unsafe fn accessibilityDisplayShouldReduceMotion(&self) -> bool; + #[method(accessibilityDisplayShouldInvertColors)] pub unsafe fn accessibilityDisplayShouldInvertColors(&self) -> bool; } ); + extern_methods!( - #[doc = "NSWorkspaceAccessibility"] + /// NSWorkspaceAccessibility unsafe impl NSWorkspace { #[method(isVoiceOverEnabled)] pub unsafe fn isVoiceOverEnabled(&self) -> bool; + #[method(isSwitchControlEnabled)] pub unsafe fn isSwitchControlEnabled(&self) -> bool; } ); + extern_methods!( - #[doc = "NSAccessibilityAdditions"] + /// NSAccessibilityAdditions unsafe impl NSObject { #[method(accessibilitySetOverrideValue:forAttribute:)] pub unsafe fn accessibilitySetOverrideValue_forAttribute( diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs index a71983bdb..4a09943fa 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs @@ -1,18 +1,34 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSAccessibilityAttributeName = NSString; + pub type NSAccessibilityParameterizedAttributeName = NSString; + pub type NSAccessibilityAnnotationAttributeKey = NSString; + pub type NSAccessibilityFontAttributeKey = NSString; + pub type NSAccessibilityOrientationValue = NSString; + pub type NSAccessibilitySortDirectionValue = NSString; + pub type NSAccessibilityRulerMarkerTypeValue = NSString; + pub type NSAccessibilityRulerUnitValue = NSString; + pub type NSAccessibilityActionName = NSString; + pub type NSAccessibilityNotificationName = NSString; + pub type NSAccessibilityRole = NSString; + pub type NSAccessibilitySubrole = NSString; + pub type NSAccessibilityNotificationUserInfoKey = NSString; + pub type NSAccessibilityLoadingToken = TodoProtocols; diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs index b9cd9fdd6..e4fdcc202 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAccessibilityCustomAction; + unsafe impl ClassType for NSAccessibilityCustomAction { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAccessibilityCustomAction { #[method_id(initWithName:handler:)] @@ -17,6 +22,7 @@ extern_methods!( name: &NSString, handler: TodoBlock, ) -> Id; + #[method_id(initWithName:target:selector:)] pub unsafe fn initWithName_target_selector( &self, @@ -24,20 +30,28 @@ extern_methods!( target: &NSObject, selector: Sel, ) -> Id; + #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method(setName:)] pub unsafe fn setName(&self, name: &NSString); + #[method(handler)] pub unsafe fn handler(&self) -> TodoBlock; + #[method(setHandler:)] pub unsafe fn setHandler(&self, handler: TodoBlock); + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&NSObject>); + #[method(selector)] pub unsafe fn selector(&self) -> Option; + #[method(setSelector:)] pub unsafe fn setSelector(&self, selector: Option); } diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs index 4b7afe445..64a017468 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAccessibilityCustomRotor; + unsafe impl ClassType for NSAccessibilityCustomRotor { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAccessibilityCustomRotor { #[method_id(initWithLabel:itemSearchDelegate:)] @@ -17,33 +22,42 @@ extern_methods!( label: &NSString, itemSearchDelegate: &NSAccessibilityCustomRotorItemSearchDelegate, ) -> Id; + #[method_id(initWithRotorType:itemSearchDelegate:)] pub unsafe fn initWithRotorType_itemSearchDelegate( &self, rotorType: NSAccessibilityCustomRotorType, itemSearchDelegate: &NSAccessibilityCustomRotorItemSearchDelegate, ) -> Id; + #[method(type)] pub unsafe fn type_(&self) -> NSAccessibilityCustomRotorType; + #[method(setType:)] pub unsafe fn setType(&self, type_: NSAccessibilityCustomRotorType); + #[method_id(label)] pub unsafe fn label(&self) -> Id; + #[method(setLabel:)] pub unsafe fn setLabel(&self, label: &NSString); + #[method_id(itemSearchDelegate)] pub unsafe fn itemSearchDelegate( &self, ) -> Option>; + #[method(setItemSearchDelegate:)] pub unsafe fn setItemSearchDelegate( &self, itemSearchDelegate: Option<&NSAccessibilityCustomRotorItemSearchDelegate>, ); + #[method_id(itemLoadingDelegate)] pub unsafe fn itemLoadingDelegate( &self, ) -> Option>; + #[method(setItemLoadingDelegate:)] pub unsafe fn setItemLoadingDelegate( &self, @@ -51,73 +65,94 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSAccessibilityCustomRotorSearchParameters; + unsafe impl ClassType for NSAccessibilityCustomRotorSearchParameters { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAccessibilityCustomRotorSearchParameters { #[method_id(currentItem)] pub unsafe fn currentItem( &self, ) -> Option>; + #[method(setCurrentItem:)] pub unsafe fn setCurrentItem( &self, currentItem: Option<&NSAccessibilityCustomRotorItemResult>, ); + #[method(searchDirection)] pub unsafe fn searchDirection(&self) -> NSAccessibilityCustomRotorSearchDirection; + #[method(setSearchDirection:)] pub unsafe fn setSearchDirection( &self, searchDirection: NSAccessibilityCustomRotorSearchDirection, ); + #[method_id(filterString)] pub unsafe fn filterString(&self) -> Id; + #[method(setFilterString:)] pub unsafe fn setFilterString(&self, filterString: &NSString); } ); + extern_class!( #[derive(Debug)] pub struct NSAccessibilityCustomRotorItemResult; + unsafe impl ClassType for NSAccessibilityCustomRotorItemResult { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAccessibilityCustomRotorItemResult { #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithTargetElement:)] pub unsafe fn initWithTargetElement( &self, targetElement: &NSAccessibilityElement, ) -> Id; + #[method_id(initWithItemLoadingToken:customLabel:)] pub unsafe fn initWithItemLoadingToken_customLabel( &self, itemLoadingToken: &NSAccessibilityLoadingToken, customLabel: &NSString, ) -> Id; + #[method_id(targetElement)] pub unsafe fn targetElement(&self) -> Option>; + #[method_id(itemLoadingToken)] pub unsafe fn itemLoadingToken(&self) -> Option>; + #[method(targetRange)] pub unsafe fn targetRange(&self) -> NSRange; + #[method(setTargetRange:)] pub unsafe fn setTargetRange(&self, targetRange: NSRange); + #[method_id(customLabel)] pub unsafe fn customLabel(&self) -> Option>; + #[method(setCustomLabel:)] pub unsafe fn setCustomLabel(&self, customLabel: Option<&NSString>); } ); + pub type NSAccessibilityCustomRotorItemSearchDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs index a34b6c821..f409f4cb8 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAccessibilityElement; + unsafe impl ClassType for NSAccessibilityElement { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAccessibilityElement { #[method_id(accessibilityElementWithRole:frame:label:parent:)] @@ -18,10 +23,13 @@ extern_methods!( label: Option<&NSString>, parent: Option<&Object>, ) -> Id; + #[method(accessibilityAddChildElement:)] pub unsafe fn accessibilityAddChildElement(&self, childElement: &NSAccessibilityElement); + #[method(accessibilityFrameInParentSpace)] pub unsafe fn accessibilityFrameInParentSpace(&self) -> NSRect; + #[method(setAccessibilityFrameInParentSpace:)] pub unsafe fn setAccessibilityFrameInParentSpace( &self, diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs index b24a1b4fd..861917631 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs @@ -1,25 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSAccessibilityElement = NSObject; + pub type NSAccessibilityGroup = NSObject; + pub type NSAccessibilityButton = NSObject; + pub type NSAccessibilitySwitch = NSObject; + pub type NSAccessibilityRadioButton = NSObject; + pub type NSAccessibilityCheckBox = NSObject; + pub type NSAccessibilityStaticText = NSObject; + pub type NSAccessibilityNavigableStaticText = NSObject; + pub type NSAccessibilityProgressIndicator = NSObject; + pub type NSAccessibilityStepper = NSObject; + pub type NSAccessibilitySlider = NSObject; + pub type NSAccessibilityImage = NSObject; + pub type NSAccessibilityContainsTransientUI = NSObject; + pub type NSAccessibilityTable = NSObject; + pub type NSAccessibilityOutline = NSObject; + pub type NSAccessibilityList = NSObject; + pub type NSAccessibilityRow = NSObject; + pub type NSAccessibilityLayoutArea = NSObject; + pub type NSAccessibilityLayoutItem = NSObject; + pub type NSAccessibilityElementLoading = NSObject; + pub type NSAccessibility = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSActionCell.rs b/crates/icrate/src/generated/AppKit/NSActionCell.rs index 7fe819809..fc50f4f27 100644 --- a/crates/icrate/src/generated/AppKit/NSActionCell.rs +++ b/crates/icrate/src/generated/AppKit/NSActionCell.rs @@ -1,26 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSActionCell; + unsafe impl ClassType for NSActionCell { type Super = NSCell; } ); + extern_methods!( unsafe impl NSActionCell { #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); } diff --git a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs index 49ef9e8d7..7cb420fe2 100644 --- a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs +++ b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSAppKitAdditions"] + /// NSAppKitAdditions unsafe impl NSAffineTransform { #[method_id(transformBezierPath:)] pub unsafe fn transformBezierPath(&self, path: &NSBezierPath) -> Id; + #[method(set)] pub unsafe fn set(&self); + #[method(concat)] pub unsafe fn concat(&self); } diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index d523608a4..b1884ac27 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -1,77 +1,109 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAlert; + unsafe impl ClassType for NSAlert { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAlert { #[method_id(alertWithError:)] pub unsafe fn alertWithError(error: &NSError) -> Id; + #[method_id(messageText)] pub unsafe fn messageText(&self) -> Id; + #[method(setMessageText:)] pub unsafe fn setMessageText(&self, messageText: &NSString); + #[method_id(informativeText)] pub unsafe fn informativeText(&self) -> Id; + #[method(setInformativeText:)] pub unsafe fn setInformativeText(&self, informativeText: &NSString); + #[method_id(icon)] pub unsafe fn icon(&self) -> Option>; + #[method(setIcon:)] pub unsafe fn setIcon(&self, icon: Option<&NSImage>); + #[method_id(addButtonWithTitle:)] pub unsafe fn addButtonWithTitle(&self, title: &NSString) -> Id; + #[method_id(buttons)] pub unsafe fn buttons(&self) -> Id, Shared>; + #[method(showsHelp)] pub unsafe fn showsHelp(&self) -> bool; + #[method(setShowsHelp:)] pub unsafe fn setShowsHelp(&self, showsHelp: bool); + #[method_id(helpAnchor)] pub unsafe fn helpAnchor(&self) -> Option>; + #[method(setHelpAnchor:)] pub unsafe fn setHelpAnchor(&self, helpAnchor: Option<&NSHelpAnchorName>); + #[method(alertStyle)] pub unsafe fn alertStyle(&self) -> NSAlertStyle; + #[method(setAlertStyle:)] pub unsafe fn setAlertStyle(&self, alertStyle: NSAlertStyle); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSAlertDelegate>); + #[method(showsSuppressionButton)] pub unsafe fn showsSuppressionButton(&self) -> bool; + #[method(setShowsSuppressionButton:)] pub unsafe fn setShowsSuppressionButton(&self, showsSuppressionButton: bool); + #[method_id(suppressionButton)] pub unsafe fn suppressionButton(&self) -> Option>; + #[method_id(accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method(layout)] pub unsafe fn layout(&self); + #[method(runModal)] pub unsafe fn runModal(&self) -> NSModalResponse; + #[method(beginSheetModalForWindow:completionHandler:)] pub unsafe fn beginSheetModalForWindow_completionHandler( &self, sheetWindow: &NSWindow, handler: TodoBlock, ); + #[method_id(window)] pub unsafe fn window(&self) -> Id; } ); + pub type NSAlertDelegate = NSObject; + extern_methods!( - #[doc = "NSAlertDeprecated"] + /// NSAlertDeprecated unsafe impl NSAlert { #[method(beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo( diff --git a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs index 8464e1cd9..817d03620 100644 --- a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs +++ b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs @@ -1,23 +1,32 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSAlignmentFeedbackToken = NSObject; + extern_class!( #[derive(Debug)] pub struct NSAlignmentFeedbackFilter; + unsafe impl ClassType for NSAlignmentFeedbackFilter { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAlignmentFeedbackFilter { #[method(inputEventMask)] pub unsafe fn inputEventMask() -> NSEventMask; + #[method(updateWithEvent:)] pub unsafe fn updateWithEvent(&self, event: &NSEvent); + #[method(updateWithPanRecognizer:)] pub unsafe fn updateWithPanRecognizer(&self, panRecognizer: &NSPanGestureRecognizer); + #[method_id(alignmentFeedbackTokenForMovementInView:previousPoint:alignedPoint:defaultPoint:)] pub unsafe fn alignmentFeedbackTokenForMovementInView_previousPoint_alignedPoint_defaultPoint( &self, @@ -26,6 +35,7 @@ extern_methods!( alignedPoint: NSPoint, defaultPoint: NSPoint, ) -> Option>; + #[method_id(alignmentFeedbackTokenForHorizontalMovementInView:previousX:alignedX:defaultX:)] pub unsafe fn alignmentFeedbackTokenForHorizontalMovementInView_previousX_alignedX_defaultX( &self, @@ -34,6 +44,7 @@ extern_methods!( alignedX: CGFloat, defaultX: CGFloat, ) -> Option>; + #[method_id(alignmentFeedbackTokenForVerticalMovementInView:previousY:alignedY:defaultY:)] pub unsafe fn alignmentFeedbackTokenForVerticalMovementInView_previousY_alignedY_defaultY( &self, @@ -42,6 +53,7 @@ extern_methods!( alignedY: CGFloat, defaultY: CGFloat, ) -> Option>; + #[method(performFeedback:performanceTime:)] pub unsafe fn performFeedback_performanceTime( &self, diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index c6f061ee5..2859ed2c6 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAnimation; + unsafe impl ClassType for NSAnimation { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAnimation { #[method_id(initWithDuration:animationCurve:)] @@ -17,82 +22,114 @@ extern_methods!( duration: NSTimeInterval, animationCurve: NSAnimationCurve, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(startAnimation)] pub unsafe fn startAnimation(&self); + #[method(stopAnimation)] pub unsafe fn stopAnimation(&self); + #[method(isAnimating)] pub unsafe fn isAnimating(&self) -> bool; + #[method(currentProgress)] pub unsafe fn currentProgress(&self) -> NSAnimationProgress; + #[method(setCurrentProgress:)] pub unsafe fn setCurrentProgress(&self, currentProgress: NSAnimationProgress); + #[method(duration)] pub unsafe fn duration(&self) -> NSTimeInterval; + #[method(setDuration:)] pub unsafe fn setDuration(&self, duration: NSTimeInterval); + #[method(animationBlockingMode)] pub unsafe fn animationBlockingMode(&self) -> NSAnimationBlockingMode; + #[method(setAnimationBlockingMode:)] pub unsafe fn setAnimationBlockingMode( &self, animationBlockingMode: NSAnimationBlockingMode, ); + #[method(frameRate)] pub unsafe fn frameRate(&self) -> c_float; + #[method(setFrameRate:)] pub unsafe fn setFrameRate(&self, frameRate: c_float); + #[method(animationCurve)] pub unsafe fn animationCurve(&self) -> NSAnimationCurve; + #[method(setAnimationCurve:)] pub unsafe fn setAnimationCurve(&self, animationCurve: NSAnimationCurve); + #[method(currentValue)] pub unsafe fn currentValue(&self) -> c_float; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSAnimationDelegate>); + #[method_id(progressMarks)] pub unsafe fn progressMarks(&self) -> Id, Shared>; + #[method(setProgressMarks:)] pub unsafe fn setProgressMarks(&self, progressMarks: &NSArray); + #[method(addProgressMark:)] pub unsafe fn addProgressMark(&self, progressMark: NSAnimationProgress); + #[method(removeProgressMark:)] pub unsafe fn removeProgressMark(&self, progressMark: NSAnimationProgress); + #[method(startWhenAnimation:reachesProgress:)] pub unsafe fn startWhenAnimation_reachesProgress( &self, animation: &NSAnimation, startProgress: NSAnimationProgress, ); + #[method(stopWhenAnimation:reachesProgress:)] pub unsafe fn stopWhenAnimation_reachesProgress( &self, animation: &NSAnimation, stopProgress: NSAnimationProgress, ); + #[method(clearStartAnimation)] pub unsafe fn clearStartAnimation(&self); + #[method(clearStopAnimation)] pub unsafe fn clearStopAnimation(&self); + #[method_id(runLoopModesForAnimating)] pub unsafe fn runLoopModesForAnimating(&self) -> Option, Shared>>; } ); + pub type NSAnimationDelegate = NSObject; + pub type NSViewAnimationKey = NSString; + pub type NSViewAnimationEffectName = NSString; + extern_class!( #[derive(Debug)] pub struct NSViewAnimation; + unsafe impl ClassType for NSViewAnimation { type Super = NSAnimation; } ); + extern_methods!( unsafe impl NSViewAnimation { #[method_id(initWithViewAnimations:)] @@ -100,10 +137,12 @@ extern_methods!( &self, viewAnimations: &NSArray>, ) -> Id; + #[method_id(viewAnimations)] pub unsafe fn viewAnimations( &self, ) -> Id>, Shared>; + #[method(setViewAnimations:)] pub unsafe fn setViewAnimations( &self, @@ -111,5 +150,7 @@ extern_methods!( ); } ); + pub type NSAnimatablePropertyKey = NSString; + pub type NSAnimatablePropertyContainer = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs index b0555e193..dce43934c 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAnimationContext; + unsafe impl ClassType for NSAnimationContext { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAnimationContext { #[method(runAnimationGroup:completionHandler:)] @@ -16,28 +21,40 @@ extern_methods!( changes: TodoBlock, completionHandler: TodoBlock, ); + #[method(runAnimationGroup:)] pub unsafe fn runAnimationGroup(changes: TodoBlock); + #[method(beginGrouping)] pub unsafe fn beginGrouping(); + #[method(endGrouping)] pub unsafe fn endGrouping(); + #[method_id(currentContext)] pub unsafe fn currentContext() -> Id; + #[method(duration)] pub unsafe fn duration(&self) -> NSTimeInterval; + #[method(setDuration:)] pub unsafe fn setDuration(&self, duration: NSTimeInterval); + #[method_id(timingFunction)] pub unsafe fn timingFunction(&self) -> Option>; + #[method(setTimingFunction:)] pub unsafe fn setTimingFunction(&self, timingFunction: Option<&CAMediaTimingFunction>); + #[method(completionHandler)] pub unsafe fn completionHandler(&self) -> TodoBlock; + #[method(setCompletionHandler:)] pub unsafe fn setCompletionHandler(&self, completionHandler: TodoBlock); + #[method(allowsImplicitAnimation)] pub unsafe fn allowsImplicitAnimation(&self) -> bool; + #[method(setAllowsImplicitAnimation:)] pub unsafe fn setAllowsImplicitAnimation(&self, allowsImplicitAnimation: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index 7eafa59b6..878e5b430 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -1,39 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSAppearanceName = NSString; + extern_class!( #[derive(Debug)] pub struct NSAppearance; + unsafe impl ClassType for NSAppearance { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAppearance { #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method_id(currentAppearance)] pub unsafe fn currentAppearance() -> Option>; + #[method(setCurrentAppearance:)] pub unsafe fn setCurrentAppearance(currentAppearance: Option<&NSAppearance>); + #[method_id(currentDrawingAppearance)] pub unsafe fn currentDrawingAppearance() -> Id; + #[method(performAsCurrentDrawingAppearance:)] pub unsafe fn performAsCurrentDrawingAppearance(&self, block: TodoBlock); + #[method_id(appearanceNamed:)] pub unsafe fn appearanceNamed(name: &NSAppearanceName) -> Option>; + #[method_id(initWithAppearanceNamed:bundle:)] pub unsafe fn initWithAppearanceNamed_bundle( &self, name: &NSAppearanceName, bundle: Option<&NSBundle>, ) -> Option>; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(allowsVibrancy)] pub unsafe fn allowsVibrancy(&self) -> bool; + #[method_id(bestMatchFromAppearancesWithNames:)] pub unsafe fn bestMatchFromAppearancesWithNames( &self, @@ -41,4 +56,5 @@ extern_methods!( ) -> Option>; } ); + pub type NSAppearanceCustomization = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs index 2145b589b..13fcbd573 100644 --- a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs +++ b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs @@ -1,9 +1,12 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSExtensions"] + /// NSExtensions unsafe impl NSAppleScript { #[method_id(richTextSource)] pub unsafe fn richTextSource(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 1084d80a0..da111ca48 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -1,167 +1,233 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSModalResponse = NSInteger; + extern_class!( #[derive(Debug)] pub struct NSApplication; + unsafe impl ClassType for NSApplication { type Super = NSResponder; } ); + extern_methods!( unsafe impl NSApplication { #[method_id(sharedApplication)] pub unsafe fn sharedApplication() -> Id; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSApplicationDelegate>); + #[method(hide:)] pub unsafe fn hide(&self, sender: Option<&Object>); + #[method(unhide:)] pub unsafe fn unhide(&self, sender: Option<&Object>); + #[method(unhideWithoutActivation)] pub unsafe fn unhideWithoutActivation(&self); + #[method_id(windowWithWindowNumber:)] pub unsafe fn windowWithWindowNumber( &self, windowNum: NSInteger, ) -> Option>; + #[method_id(mainWindow)] pub unsafe fn mainWindow(&self) -> Option>; + #[method_id(keyWindow)] pub unsafe fn keyWindow(&self) -> Option>; + #[method(isActive)] pub unsafe fn isActive(&self) -> bool; + #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[method(isRunning)] pub unsafe fn isRunning(&self) -> bool; + #[method(deactivate)] pub unsafe fn deactivate(&self); + #[method(activateIgnoringOtherApps:)] pub unsafe fn activateIgnoringOtherApps(&self, flag: bool); + #[method(hideOtherApplications:)] pub unsafe fn hideOtherApplications(&self, sender: Option<&Object>); + #[method(unhideAllApplications:)] pub unsafe fn unhideAllApplications(&self, sender: Option<&Object>); + #[method(finishLaunching)] pub unsafe fn finishLaunching(&self); + #[method(run)] pub unsafe fn run(&self); + #[method(runModalForWindow:)] pub unsafe fn runModalForWindow(&self, window: &NSWindow) -> NSModalResponse; + #[method(stop:)] pub unsafe fn stop(&self, sender: Option<&Object>); + #[method(stopModal)] pub unsafe fn stopModal(&self); + #[method(stopModalWithCode:)] pub unsafe fn stopModalWithCode(&self, returnCode: NSModalResponse); + #[method(abortModal)] pub unsafe fn abortModal(&self); + #[method_id(modalWindow)] pub unsafe fn modalWindow(&self) -> Option>; + #[method(beginModalSessionForWindow:)] pub unsafe fn beginModalSessionForWindow(&self, window: &NSWindow) -> NSModalSession; + #[method(runModalSession:)] pub unsafe fn runModalSession(&self, session: NSModalSession) -> NSModalResponse; + #[method(endModalSession:)] pub unsafe fn endModalSession(&self, session: NSModalSession); + #[method(terminate:)] pub unsafe fn terminate(&self, sender: Option<&Object>); + #[method(requestUserAttention:)] pub unsafe fn requestUserAttention( &self, requestType: NSRequestUserAttentionType, ) -> NSInteger; + #[method(cancelUserAttentionRequest:)] pub unsafe fn cancelUserAttentionRequest(&self, request: NSInteger); + #[method(enumerateWindowsWithOptions:usingBlock:)] pub unsafe fn enumerateWindowsWithOptions_usingBlock( &self, options: NSWindowListOptions, block: TodoBlock, ); + #[method(preventWindowOrdering)] pub unsafe fn preventWindowOrdering(&self); + #[method_id(windows)] pub unsafe fn windows(&self) -> Id, Shared>; + #[method(setWindowsNeedUpdate:)] pub unsafe fn setWindowsNeedUpdate(&self, needUpdate: bool); + #[method(updateWindows)] pub unsafe fn updateWindows(&self); + #[method_id(mainMenu)] pub unsafe fn mainMenu(&self) -> Option>; + #[method(setMainMenu:)] pub unsafe fn setMainMenu(&self, mainMenu: Option<&NSMenu>); + #[method_id(helpMenu)] pub unsafe fn helpMenu(&self) -> Option>; + #[method(setHelpMenu:)] pub unsafe fn setHelpMenu(&self, helpMenu: Option<&NSMenu>); + #[method_id(applicationIconImage)] pub unsafe fn applicationIconImage(&self) -> Option>; + #[method(setApplicationIconImage:)] pub unsafe fn setApplicationIconImage(&self, applicationIconImage: Option<&NSImage>); + #[method(activationPolicy)] pub unsafe fn activationPolicy(&self) -> NSApplicationActivationPolicy; + #[method(setActivationPolicy:)] pub unsafe fn setActivationPolicy( &self, activationPolicy: NSApplicationActivationPolicy, ) -> bool; + #[method_id(dockTile)] pub unsafe fn dockTile(&self) -> Id; + #[method(reportException:)] pub unsafe fn reportException(&self, exception: &NSException); + #[method(detachDrawingThread:toTarget:withObject:)] pub unsafe fn detachDrawingThread_toTarget_withObject( selector: Sel, target: &Object, argument: Option<&Object>, ); + #[method(replyToApplicationShouldTerminate:)] pub unsafe fn replyToApplicationShouldTerminate(&self, shouldTerminate: bool); + #[method(replyToOpenOrPrint:)] pub unsafe fn replyToOpenOrPrint(&self, reply: NSApplicationDelegateReply); + #[method(orderFrontCharacterPalette:)] pub unsafe fn orderFrontCharacterPalette(&self, sender: Option<&Object>); + #[method(presentationOptions)] pub unsafe fn presentationOptions(&self) -> NSApplicationPresentationOptions; + #[method(setPresentationOptions:)] pub unsafe fn setPresentationOptions( &self, presentationOptions: NSApplicationPresentationOptions, ); + #[method(currentSystemPresentationOptions)] pub unsafe fn currentSystemPresentationOptions(&self) -> NSApplicationPresentationOptions; + #[method(occlusionState)] pub unsafe fn occlusionState(&self) -> NSApplicationOcclusionState; + #[method(isProtectedDataAvailable)] pub unsafe fn isProtectedDataAvailable(&self) -> bool; } ); + extern_methods!( - #[doc = "NSAppearanceCustomization"] + /// NSAppearanceCustomization unsafe impl NSApplication { #[method_id(appearance)] pub unsafe fn appearance(&self) -> Option>; + #[method(setAppearance:)] pub unsafe fn setAppearance(&self, appearance: Option<&NSAppearance>); + #[method_id(effectiveAppearance)] pub unsafe fn effectiveAppearance(&self) -> Id; } ); + extern_methods!( - #[doc = "NSEvent"] + /// NSEvent unsafe impl NSApplication { #[method(sendEvent:)] pub unsafe fn sendEvent(&self, event: &NSEvent); + #[method(postEvent:atStart:)] pub unsafe fn postEvent_atStart(&self, event: &NSEvent, flag: bool); + #[method_id(currentEvent)] pub unsafe fn currentEvent(&self) -> Option>; + #[method_id(nextEventMatchingMask:untilDate:inMode:dequeue:)] pub unsafe fn nextEventMatchingMask_untilDate_inMode_dequeue( &self, @@ -170,6 +236,7 @@ extern_methods!( mode: &NSRunLoopMode, deqFlag: bool, ) -> Option>; + #[method(discardEventsMatchingMask:beforeEvent:)] pub unsafe fn discardEventsMatchingMask_beforeEvent( &self, @@ -178,8 +245,9 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSResponder"] + /// NSResponder unsafe impl NSApplication { #[method(sendAction:to:from:)] pub unsafe fn sendAction_to_from( @@ -188,8 +256,10 @@ extern_methods!( target: Option<&Object>, sender: Option<&Object>, ) -> bool; + #[method_id(targetForAction:)] pub unsafe fn targetForAction(&self, action: Sel) -> Option>; + #[method_id(targetForAction:to:from:)] pub unsafe fn targetForAction_to_from( &self, @@ -197,8 +267,10 @@ extern_methods!( target: Option<&Object>, sender: Option<&Object>, ) -> Option>; + #[method(tryToPerform:with:)] pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; + #[method_id(validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, @@ -207,17 +279,22 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSWindowsMenu"] + /// NSWindowsMenu unsafe impl NSApplication { #[method_id(windowsMenu)] pub unsafe fn windowsMenu(&self) -> Option>; + #[method(setWindowsMenu:)] pub unsafe fn setWindowsMenu(&self, windowsMenu: Option<&NSMenu>); + #[method(arrangeInFront:)] pub unsafe fn arrangeInFront(&self, sender: Option<&Object>); + #[method(removeWindowsItem:)] pub unsafe fn removeWindowsItem(&self, win: &NSWindow); + #[method(addWindowsItem:title:filename:)] pub unsafe fn addWindowsItem_title_filename( &self, @@ -225,6 +302,7 @@ extern_methods!( string: &NSString, isFilename: bool, ); + #[method(changeWindowsItem:title:filename:)] pub unsafe fn changeWindowsItem_title_filename( &self, @@ -232,27 +310,34 @@ extern_methods!( string: &NSString, isFilename: bool, ); + #[method(updateWindowsItem:)] pub unsafe fn updateWindowsItem(&self, win: &NSWindow); + #[method(miniaturizeAll:)] pub unsafe fn miniaturizeAll(&self, sender: Option<&Object>); } ); + extern_methods!( - #[doc = "NSFullKeyboardAccess"] + /// NSFullKeyboardAccess unsafe impl NSApplication { #[method(isFullKeyboardAccessEnabled)] pub unsafe fn isFullKeyboardAccessEnabled(&self) -> bool; } ); + pub type NSApplicationDelegate = NSObject; + extern_methods!( - #[doc = "NSServicesMenu"] + /// NSServicesMenu unsafe impl NSApplication { #[method_id(servicesMenu)] pub unsafe fn servicesMenu(&self) -> Option>; + #[method(setServicesMenu:)] pub unsafe fn setServicesMenu(&self, servicesMenu: Option<&NSMenu>); + #[method(registerServicesMenuSendTypes:returnTypes:)] pub unsafe fn registerServicesMenuSendTypes_returnTypes( &self, @@ -261,22 +346,28 @@ extern_methods!( ); } ); + pub type NSServicesMenuRequestor = NSObject; + extern_methods!( - #[doc = "NSServicesHandling"] + /// NSServicesHandling unsafe impl NSApplication { #[method_id(servicesProvider)] pub unsafe fn servicesProvider(&self) -> Option>; + #[method(setServicesProvider:)] pub unsafe fn setServicesProvider(&self, servicesProvider: Option<&Object>); } ); + pub type NSAboutPanelOptionKey = NSString; + extern_methods!( - #[doc = "NSStandardAboutPanel"] + /// NSStandardAboutPanel unsafe impl NSApplication { #[method(orderFrontStandardAboutPanel:)] pub unsafe fn orderFrontStandardAboutPanel(&self, sender: Option<&Object>); + #[method(orderFrontStandardAboutPanelWithOptions:)] pub unsafe fn orderFrontStandardAboutPanelWithOptions( &self, @@ -284,40 +375,50 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSApplicationLayoutDirection"] + /// NSApplicationLayoutDirection unsafe impl NSApplication { #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; } ); + extern_methods!( - #[doc = "NSRestorableUserInterface"] + /// NSRestorableUserInterface unsafe impl NSApplication { #[method(disableRelaunchOnLogin)] pub unsafe fn disableRelaunchOnLogin(&self); + #[method(enableRelaunchOnLogin)] pub unsafe fn enableRelaunchOnLogin(&self); } ); + extern_methods!( - #[doc = "NSRemoteNotifications"] + /// NSRemoteNotifications unsafe impl NSApplication { #[method(registerForRemoteNotifications)] pub unsafe fn registerForRemoteNotifications(&self); + #[method(unregisterForRemoteNotifications)] pub unsafe fn unregisterForRemoteNotifications(&self); + #[method(isRegisteredForRemoteNotifications)] pub unsafe fn isRegisteredForRemoteNotifications(&self) -> bool; + #[method(registerForRemoteNotificationTypes:)] pub unsafe fn registerForRemoteNotificationTypes(&self, types: NSRemoteNotificationType); + #[method(enabledRemoteNotificationTypes)] pub unsafe fn enabledRemoteNotificationTypes(&self) -> NSRemoteNotificationType; } ); + pub type NSServiceProviderName = NSString; + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSApplication { #[method(runModalForWindow:relativeToWindow:)] pub unsafe fn runModalForWindow_relativeToWindow( @@ -325,18 +426,21 @@ extern_methods!( window: Option<&NSWindow>, docWindow: Option<&NSWindow>, ) -> NSInteger; + #[method(beginModalSessionForWindow:relativeToWindow:)] pub unsafe fn beginModalSessionForWindow_relativeToWindow( &self, window: Option<&NSWindow>, docWindow: Option<&NSWindow>, ) -> NSModalSession; + #[method(application:printFiles:)] pub unsafe fn application_printFiles( &self, sender: Option<&NSApplication>, filenames: Option<&NSArray>, ); + #[method(beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo( &self, @@ -346,16 +450,20 @@ extern_methods!( didEndSelector: Option, contextInfo: *mut c_void, ); + #[method(endSheet:)] pub unsafe fn endSheet(&self, sheet: &NSWindow); + #[method(endSheet:returnCode:)] pub unsafe fn endSheet_returnCode(&self, sheet: &NSWindow, returnCode: NSInteger); + #[method_id(makeWindowsPerform:inOrder:)] pub unsafe fn makeWindowsPerform_inOrder( &self, selector: Sel, flag: bool, ) -> Option>; + #[method_id(context)] pub unsafe fn context(&self) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs index 4b3792399..77d88117b 100644 --- a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs @@ -1,18 +1,23 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSScripting"] + /// NSScripting unsafe impl NSApplication { #[method_id(orderedDocuments)] pub unsafe fn orderedDocuments(&self) -> Id, Shared>; + #[method_id(orderedWindows)] pub unsafe fn orderedWindows(&self) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSApplicationScriptingDelegation"] + /// NSApplicationScriptingDelegation unsafe impl NSObject { #[method(application:delegateHandlesKey:)] pub unsafe fn application_delegateHandlesKey( diff --git a/crates/icrate/src/generated/AppKit/NSArrayController.rs b/crates/icrate/src/generated/AppKit/NSArrayController.rs index ef2854715..e83ae43b3 100644 --- a/crates/icrate/src/generated/AppKit/NSArrayController.rs +++ b/crates/icrate/src/generated/AppKit/NSArrayController.rs @@ -1,123 +1,174 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSArrayController; + unsafe impl ClassType for NSArrayController { type Super = NSObjectController; } ); + extern_methods!( unsafe impl NSArrayController { #[method(rearrangeObjects)] pub unsafe fn rearrangeObjects(&self); + #[method(automaticallyRearrangesObjects)] pub unsafe fn automaticallyRearrangesObjects(&self) -> bool; + #[method(setAutomaticallyRearrangesObjects:)] pub unsafe fn setAutomaticallyRearrangesObjects( &self, automaticallyRearrangesObjects: bool, ); + #[method_id(automaticRearrangementKeyPaths)] pub unsafe fn automaticRearrangementKeyPaths( &self, ) -> Option, Shared>>; + #[method(didChangeArrangementCriteria)] pub unsafe fn didChangeArrangementCriteria(&self); + #[method_id(sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id, Shared>; + #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); + #[method_id(filterPredicate)] pub unsafe fn filterPredicate(&self) -> Option>; + #[method(setFilterPredicate:)] pub unsafe fn setFilterPredicate(&self, filterPredicate: Option<&NSPredicate>); + #[method(clearsFilterPredicateOnInsertion)] pub unsafe fn clearsFilterPredicateOnInsertion(&self) -> bool; + #[method(setClearsFilterPredicateOnInsertion:)] pub unsafe fn setClearsFilterPredicateOnInsertion( &self, clearsFilterPredicateOnInsertion: bool, ); + #[method_id(arrangeObjects:)] pub unsafe fn arrangeObjects(&self, objects: &NSArray) -> Id; + #[method_id(arrangedObjects)] pub unsafe fn arrangedObjects(&self) -> Id; + #[method(avoidsEmptySelection)] pub unsafe fn avoidsEmptySelection(&self) -> bool; + #[method(setAvoidsEmptySelection:)] pub unsafe fn setAvoidsEmptySelection(&self, avoidsEmptySelection: bool); + #[method(preservesSelection)] pub unsafe fn preservesSelection(&self) -> bool; + #[method(setPreservesSelection:)] pub unsafe fn setPreservesSelection(&self, preservesSelection: bool); + #[method(selectsInsertedObjects)] pub unsafe fn selectsInsertedObjects(&self) -> bool; + #[method(setSelectsInsertedObjects:)] pub unsafe fn setSelectsInsertedObjects(&self, selectsInsertedObjects: bool); + #[method(alwaysUsesMultipleValuesMarker)] pub unsafe fn alwaysUsesMultipleValuesMarker(&self) -> bool; + #[method(setAlwaysUsesMultipleValuesMarker:)] pub unsafe fn setAlwaysUsesMultipleValuesMarker( &self, alwaysUsesMultipleValuesMarker: bool, ); + #[method(setSelectionIndexes:)] pub unsafe fn setSelectionIndexes(&self, indexes: &NSIndexSet) -> bool; + #[method_id(selectionIndexes)] pub unsafe fn selectionIndexes(&self) -> Id; + #[method(setSelectionIndex:)] pub unsafe fn setSelectionIndex(&self, index: NSUInteger) -> bool; + #[method(selectionIndex)] pub unsafe fn selectionIndex(&self) -> NSUInteger; + #[method(addSelectionIndexes:)] pub unsafe fn addSelectionIndexes(&self, indexes: &NSIndexSet) -> bool; + #[method(removeSelectionIndexes:)] pub unsafe fn removeSelectionIndexes(&self, indexes: &NSIndexSet) -> bool; + #[method(setSelectedObjects:)] pub unsafe fn setSelectedObjects(&self, objects: &NSArray) -> bool; + #[method_id(selectedObjects)] pub unsafe fn selectedObjects(&self) -> Id; + #[method(addSelectedObjects:)] pub unsafe fn addSelectedObjects(&self, objects: &NSArray) -> bool; + #[method(removeSelectedObjects:)] pub unsafe fn removeSelectedObjects(&self, objects: &NSArray) -> bool; + #[method(add:)] pub unsafe fn add(&self, sender: Option<&Object>); + #[method(remove:)] pub unsafe fn remove(&self, sender: Option<&Object>); + #[method(insert:)] pub unsafe fn insert(&self, sender: Option<&Object>); + #[method(canInsert)] pub unsafe fn canInsert(&self) -> bool; + #[method(selectNext:)] pub unsafe fn selectNext(&self, sender: Option<&Object>); + #[method(selectPrevious:)] pub unsafe fn selectPrevious(&self, sender: Option<&Object>); + #[method(canSelectNext)] pub unsafe fn canSelectNext(&self) -> bool; + #[method(canSelectPrevious)] pub unsafe fn canSelectPrevious(&self) -> bool; + #[method(addObject:)] pub unsafe fn addObject(&self, object: &Object); + #[method(addObjects:)] pub unsafe fn addObjects(&self, objects: &NSArray); + #[method(insertObject:atArrangedObjectIndex:)] pub unsafe fn insertObject_atArrangedObjectIndex(&self, object: &Object, index: NSUInteger); + #[method(insertObjects:atArrangedObjectIndexes:)] pub unsafe fn insertObjects_atArrangedObjectIndexes( &self, objects: &NSArray, indexes: &NSIndexSet, ); + #[method(removeObjectAtArrangedObjectIndex:)] pub unsafe fn removeObjectAtArrangedObjectIndex(&self, index: NSUInteger); + #[method(removeObjectsAtArrangedObjectIndexes:)] pub unsafe fn removeObjectsAtArrangedObjectIndexes(&self, indexes: &NSIndexSet); + #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &Object); + #[method(removeObjects:)] pub unsafe fn removeObjects(&self, objects: &NSArray); } diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index 6e592a48a..5ca9104fd 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -1,27 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextEffectStyle = NSString; + extern_methods!( - #[doc = "NSAttributedStringAttributeFixing"] + /// NSAttributedStringAttributeFixing unsafe impl NSMutableAttributedString { #[method(fixAttributesInRange:)] pub unsafe fn fixAttributesInRange(&self, range: NSRange); + #[method(fixFontAttributeInRange:)] pub unsafe fn fixFontAttributeInRange(&self, range: NSRange); + #[method(fixParagraphStyleAttributeInRange:)] pub unsafe fn fixParagraphStyleAttributeInRange(&self, range: NSRange); + #[method(fixAttachmentAttributeInRange:)] pub unsafe fn fixAttachmentAttributeInRange(&self, range: NSRange); } ); + pub type NSAttributedStringDocumentType = NSString; + pub type NSTextLayoutSectionKey = NSString; + pub type NSAttributedStringDocumentAttributeKey = NSString; + pub type NSAttributedStringDocumentReadingOptionKey = NSString; + extern_methods!( - #[doc = "NSAttributedStringDocumentFormats"] + /// NSAttributedStringDocumentFormats unsafe impl NSAttributedString { #[method_id(initWithURL:options:documentAttributes:error:)] pub unsafe fn initWithURL_options_documentAttributes_error( @@ -34,6 +46,7 @@ extern_methods!( >, >, ) -> Result, Id>; + #[method_id(initWithData:options:documentAttributes:error:)] pub unsafe fn initWithData_options_documentAttributes_error( &self, @@ -45,18 +58,21 @@ extern_methods!( >, >, ) -> Result, Id>; + #[method_id(dataFromRange:documentAttributes:error:)] pub unsafe fn dataFromRange_documentAttributes_error( &self, range: NSRange, dict: &NSDictionary, ) -> Result, Id>; + #[method_id(fileWrapperFromRange:documentAttributes:error:)] pub unsafe fn fileWrapperFromRange_documentAttributes_error( &self, range: NSRange, dict: &NSDictionary, ) -> Result, Id>; + #[method_id(initWithRTF:documentAttributes:)] pub unsafe fn initWithRTF_documentAttributes( &self, @@ -67,6 +83,7 @@ extern_methods!( >, >, ) -> Option>; + #[method_id(initWithRTFD:documentAttributes:)] pub unsafe fn initWithRTFD_documentAttributes( &self, @@ -77,6 +94,7 @@ extern_methods!( >, >, ) -> Option>; + #[method_id(initWithHTML:documentAttributes:)] pub unsafe fn initWithHTML_documentAttributes( &self, @@ -87,6 +105,7 @@ extern_methods!( >, >, ) -> Option>; + #[method_id(initWithHTML:baseURL:documentAttributes:)] pub unsafe fn initWithHTML_baseURL_documentAttributes( &self, @@ -98,6 +117,7 @@ extern_methods!( >, >, ) -> Option>; + #[method_id(initWithDocFormat:documentAttributes:)] pub unsafe fn initWithDocFormat_documentAttributes( &self, @@ -108,6 +128,7 @@ extern_methods!( >, >, ) -> Option>; + #[method_id(initWithHTML:options:documentAttributes:)] pub unsafe fn initWithHTML_options_documentAttributes( &self, @@ -119,6 +140,7 @@ extern_methods!( >, >, ) -> Option>; + #[method_id(initWithRTFDFileWrapper:documentAttributes:)] pub unsafe fn initWithRTFDFileWrapper_documentAttributes( &self, @@ -129,24 +151,28 @@ extern_methods!( >, >, ) -> Option>; + #[method_id(RTFFromRange:documentAttributes:)] pub unsafe fn RTFFromRange_documentAttributes( &self, range: NSRange, dict: &NSDictionary, ) -> Option>; + #[method_id(RTFDFromRange:documentAttributes:)] pub unsafe fn RTFDFromRange_documentAttributes( &self, range: NSRange, dict: &NSDictionary, ) -> Option>; + #[method_id(RTFDFileWrapperFromRange:documentAttributes:)] pub unsafe fn RTFDFileWrapperFromRange_documentAttributes( &self, range: NSRange, dict: &NSDictionary, ) -> Option>; + #[method_id(docFormatFromRange:documentAttributes:)] pub unsafe fn docFormatFromRange_documentAttributes( &self, @@ -155,8 +181,9 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSMutableAttributedStringDocumentFormats"] + /// NSMutableAttributedStringDocumentFormats unsafe impl NSMutableAttributedString { #[method(readFromURL:options:documentAttributes:error:)] pub unsafe fn readFromURL_options_documentAttributes_error( @@ -169,6 +196,7 @@ extern_methods!( >, >, ) -> Result<(), Id>; + #[method(readFromData:options:documentAttributes:error:)] pub unsafe fn readFromData_options_documentAttributes_error( &self, @@ -182,59 +210,70 @@ extern_methods!( ) -> Result<(), Id>; } ); + extern_methods!( - #[doc = "NSAttributedStringKitAdditions"] + /// NSAttributedStringKitAdditions unsafe impl NSAttributedString { #[method_id(fontAttributesInRange:)] pub unsafe fn fontAttributesInRange( &self, range: NSRange, ) -> Id, Shared>; + #[method_id(rulerAttributesInRange:)] pub unsafe fn rulerAttributesInRange( &self, range: NSRange, ) -> Id, Shared>; + #[method(containsAttachmentsInRange:)] pub unsafe fn containsAttachmentsInRange(&self, range: NSRange) -> bool; + #[method(lineBreakBeforeIndex:withinRange:)] pub unsafe fn lineBreakBeforeIndex_withinRange( &self, location: NSUInteger, aRange: NSRange, ) -> NSUInteger; + #[method(lineBreakByHyphenatingBeforeIndex:withinRange:)] pub unsafe fn lineBreakByHyphenatingBeforeIndex_withinRange( &self, location: NSUInteger, aRange: NSRange, ) -> NSUInteger; + #[method(doubleClickAtIndex:)] pub unsafe fn doubleClickAtIndex(&self, location: NSUInteger) -> NSRange; + #[method(nextWordFromIndex:forward:)] pub unsafe fn nextWordFromIndex_forward( &self, location: NSUInteger, isForward: bool, ) -> NSUInteger; + #[method(rangeOfTextBlock:atIndex:)] pub unsafe fn rangeOfTextBlock_atIndex( &self, block: &NSTextBlock, location: NSUInteger, ) -> NSRange; + #[method(rangeOfTextTable:atIndex:)] pub unsafe fn rangeOfTextTable_atIndex( &self, table: &NSTextTable, location: NSUInteger, ) -> NSRange; + #[method(rangeOfTextList:atIndex:)] pub unsafe fn rangeOfTextList_atIndex( &self, list: &NSTextList, location: NSUInteger, ) -> NSRange; + #[method(itemNumberInTextList:atIndex:)] pub unsafe fn itemNumberInTextList_atIndex( &self, @@ -243,28 +282,36 @@ extern_methods!( ) -> NSInteger; } ); + extern_methods!( - #[doc = "NSAttributedStringPasteboardAdditions"] + /// NSAttributedStringPasteboardAdditions unsafe impl NSAttributedString { #[method_id(textTypes)] pub unsafe fn textTypes() -> Id, Shared>; + #[method_id(textUnfilteredTypes)] pub unsafe fn textUnfilteredTypes() -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSMutableAttributedStringKitAdditions"] + /// NSMutableAttributedStringKitAdditions unsafe impl NSMutableAttributedString { #[method(superscriptRange:)] pub unsafe fn superscriptRange(&self, range: NSRange); + #[method(subscriptRange:)] pub unsafe fn subscriptRange(&self, range: NSRange); + #[method(unscriptRange:)] pub unsafe fn unscriptRange(&self, range: NSRange); + #[method(applyFontTraits:range:)] pub unsafe fn applyFontTraits_range(&self, traitMask: NSFontTraitMask, range: NSRange); + #[method(setAlignment:range:)] pub unsafe fn setAlignment_range(&self, alignment: NSTextAlignment, range: NSRange); + #[method(setBaseWritingDirection:range:)] pub unsafe fn setBaseWritingDirection_range( &self, @@ -273,31 +320,39 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSDeprecatedKitAdditions"] + /// NSDeprecatedKitAdditions unsafe impl NSAttributedString { #[method(containsAttachments)] pub unsafe fn containsAttachments(&self) -> bool; + #[method_id(textFileTypes)] pub unsafe fn textFileTypes() -> Id; + #[method_id(textPasteboardTypes)] pub unsafe fn textPasteboardTypes() -> Id; + #[method_id(textUnfilteredFileTypes)] pub unsafe fn textUnfilteredFileTypes() -> Id; + #[method_id(textUnfilteredPasteboardTypes)] pub unsafe fn textUnfilteredPasteboardTypes() -> Id; + #[method_id(initWithURL:documentAttributes:)] pub unsafe fn initWithURL_documentAttributes( &self, url: &NSURL, dict: Option<&mut Option>>, ) -> Option>; + #[method_id(initWithPath:documentAttributes:)] pub unsafe fn initWithPath_documentAttributes( &self, path: &NSString, dict: Option<&mut Option>>, ) -> Option>; + #[method_id(URLAtIndex:effectiveRange:)] pub unsafe fn URLAtIndex_effectiveRange( &self, @@ -306,8 +361,9 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSDeprecatedKitAdditions"] + /// NSDeprecatedKitAdditions unsafe impl NSMutableAttributedString { #[method(readFromURL:options:documentAttributes:)] pub unsafe fn readFromURL_options_documentAttributes( @@ -316,6 +372,7 @@ extern_methods!( options: &NSDictionary, dict: Option<&mut Option>>, ) -> bool; + #[method(readFromData:options:documentAttributes:)] pub unsafe fn readFromData_options_documentAttributes( &self, diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index 1a4b7e73d..d9e85a1a9 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -1,66 +1,94 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSBezierPath; + unsafe impl ClassType for NSBezierPath { type Super = NSObject; } ); + extern_methods!( unsafe impl NSBezierPath { #[method_id(bezierPath)] pub unsafe fn bezierPath() -> Id; + #[method_id(bezierPathWithRect:)] pub unsafe fn bezierPathWithRect(rect: NSRect) -> Id; + #[method_id(bezierPathWithOvalInRect:)] pub unsafe fn bezierPathWithOvalInRect(rect: NSRect) -> Id; + #[method_id(bezierPathWithRoundedRect:xRadius:yRadius:)] pub unsafe fn bezierPathWithRoundedRect_xRadius_yRadius( rect: NSRect, xRadius: CGFloat, yRadius: CGFloat, ) -> Id; + #[method(fillRect:)] pub unsafe fn fillRect(rect: NSRect); + #[method(strokeRect:)] pub unsafe fn strokeRect(rect: NSRect); + #[method(clipRect:)] pub unsafe fn clipRect(rect: NSRect); + #[method(strokeLineFromPoint:toPoint:)] pub unsafe fn strokeLineFromPoint_toPoint(point1: NSPoint, point2: NSPoint); + #[method(drawPackedGlyphs:atPoint:)] pub unsafe fn drawPackedGlyphs_atPoint(packedGlyphs: NonNull, point: NSPoint); + #[method(defaultMiterLimit)] pub unsafe fn defaultMiterLimit() -> CGFloat; + #[method(setDefaultMiterLimit:)] pub unsafe fn setDefaultMiterLimit(defaultMiterLimit: CGFloat); + #[method(defaultFlatness)] pub unsafe fn defaultFlatness() -> CGFloat; + #[method(setDefaultFlatness:)] pub unsafe fn setDefaultFlatness(defaultFlatness: CGFloat); + #[method(defaultWindingRule)] pub unsafe fn defaultWindingRule() -> NSWindingRule; + #[method(setDefaultWindingRule:)] pub unsafe fn setDefaultWindingRule(defaultWindingRule: NSWindingRule); + #[method(defaultLineCapStyle)] pub unsafe fn defaultLineCapStyle() -> NSLineCapStyle; + #[method(setDefaultLineCapStyle:)] pub unsafe fn setDefaultLineCapStyle(defaultLineCapStyle: NSLineCapStyle); + #[method(defaultLineJoinStyle)] pub unsafe fn defaultLineJoinStyle() -> NSLineJoinStyle; + #[method(setDefaultLineJoinStyle:)] pub unsafe fn setDefaultLineJoinStyle(defaultLineJoinStyle: NSLineJoinStyle); + #[method(defaultLineWidth)] pub unsafe fn defaultLineWidth() -> CGFloat; + #[method(setDefaultLineWidth:)] pub unsafe fn setDefaultLineWidth(defaultLineWidth: CGFloat); + #[method(moveToPoint:)] pub unsafe fn moveToPoint(&self, point: NSPoint); + #[method(lineToPoint:)] pub unsafe fn lineToPoint(&self, point: NSPoint); + #[method(curveToPoint:controlPoint1:controlPoint2:)] pub unsafe fn curveToPoint_controlPoint1_controlPoint2( &self, @@ -68,14 +96,19 @@ extern_methods!( controlPoint1: NSPoint, controlPoint2: NSPoint, ); + #[method(closePath)] pub unsafe fn closePath(&self); + #[method(removeAllPoints)] pub unsafe fn removeAllPoints(&self); + #[method(relativeMoveToPoint:)] pub unsafe fn relativeMoveToPoint(&self, point: NSPoint); + #[method(relativeLineToPoint:)] pub unsafe fn relativeLineToPoint(&self, point: NSPoint); + #[method(relativeCurveToPoint:controlPoint1:controlPoint2:)] pub unsafe fn relativeCurveToPoint_controlPoint1_controlPoint2( &self, @@ -83,30 +116,43 @@ extern_methods!( controlPoint1: NSPoint, controlPoint2: NSPoint, ); + #[method(lineWidth)] pub unsafe fn lineWidth(&self) -> CGFloat; + #[method(setLineWidth:)] pub unsafe fn setLineWidth(&self, lineWidth: CGFloat); + #[method(lineCapStyle)] pub unsafe fn lineCapStyle(&self) -> NSLineCapStyle; + #[method(setLineCapStyle:)] pub unsafe fn setLineCapStyle(&self, lineCapStyle: NSLineCapStyle); + #[method(lineJoinStyle)] pub unsafe fn lineJoinStyle(&self) -> NSLineJoinStyle; + #[method(setLineJoinStyle:)] pub unsafe fn setLineJoinStyle(&self, lineJoinStyle: NSLineJoinStyle); + #[method(windingRule)] pub unsafe fn windingRule(&self) -> NSWindingRule; + #[method(setWindingRule:)] pub unsafe fn setWindingRule(&self, windingRule: NSWindingRule); + #[method(miterLimit)] pub unsafe fn miterLimit(&self) -> CGFloat; + #[method(setMiterLimit:)] pub unsafe fn setMiterLimit(&self, miterLimit: CGFloat); + #[method(flatness)] pub unsafe fn flatness(&self) -> CGFloat; + #[method(setFlatness:)] pub unsafe fn setFlatness(&self, flatness: CGFloat); + #[method(getLineDash:count:phase:)] pub unsafe fn getLineDash_count_phase( &self, @@ -114,6 +160,7 @@ extern_methods!( count: *mut NSInteger, phase: *mut CGFloat, ); + #[method(setLineDash:count:phase:)] pub unsafe fn setLineDash_count_phase( &self, @@ -121,52 +168,72 @@ extern_methods!( count: NSInteger, phase: CGFloat, ); + #[method(stroke)] pub unsafe fn stroke(&self); + #[method(fill)] pub unsafe fn fill(&self); + #[method(addClip)] pub unsafe fn addClip(&self); + #[method(setClip)] pub unsafe fn setClip(&self); + #[method_id(bezierPathByFlatteningPath)] pub unsafe fn bezierPathByFlatteningPath(&self) -> Id; + #[method_id(bezierPathByReversingPath)] pub unsafe fn bezierPathByReversingPath(&self) -> Id; + #[method(transformUsingAffineTransform:)] pub unsafe fn transformUsingAffineTransform(&self, transform: &NSAffineTransform); + #[method(isEmpty)] pub unsafe fn isEmpty(&self) -> bool; + #[method(currentPoint)] pub unsafe fn currentPoint(&self) -> NSPoint; + #[method(controlPointBounds)] pub unsafe fn controlPointBounds(&self) -> NSRect; + #[method(bounds)] pub unsafe fn bounds(&self) -> NSRect; + #[method(elementCount)] pub unsafe fn elementCount(&self) -> NSInteger; + #[method(elementAtIndex:associatedPoints:)] pub unsafe fn elementAtIndex_associatedPoints( &self, index: NSInteger, points: NSPointArray, ) -> NSBezierPathElement; + #[method(elementAtIndex:)] pub unsafe fn elementAtIndex(&self, index: NSInteger) -> NSBezierPathElement; + #[method(setAssociatedPoints:atIndex:)] pub unsafe fn setAssociatedPoints_atIndex(&self, points: NSPointArray, index: NSInteger); + #[method(appendBezierPath:)] pub unsafe fn appendBezierPath(&self, path: &NSBezierPath); + #[method(appendBezierPathWithRect:)] pub unsafe fn appendBezierPathWithRect(&self, rect: NSRect); + #[method(appendBezierPathWithPoints:count:)] pub unsafe fn appendBezierPathWithPoints_count( &self, points: NSPointArray, count: NSInteger, ); + #[method(appendBezierPathWithOvalInRect:)] pub unsafe fn appendBezierPathWithOvalInRect(&self, rect: NSRect); + #[method(appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:)] pub unsafe fn appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise( &self, @@ -176,6 +243,7 @@ extern_methods!( endAngle: CGFloat, clockwise: bool, ); + #[method(appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:)] pub unsafe fn appendBezierPathWithArcWithCenter_radius_startAngle_endAngle( &self, @@ -184,6 +252,7 @@ extern_methods!( startAngle: CGFloat, endAngle: CGFloat, ); + #[method(appendBezierPathWithArcFromPoint:toPoint:radius:)] pub unsafe fn appendBezierPathWithArcFromPoint_toPoint_radius( &self, @@ -191,8 +260,10 @@ extern_methods!( point2: NSPoint, radius: CGFloat, ); + #[method(appendBezierPathWithCGGlyph:inFont:)] pub unsafe fn appendBezierPathWithCGGlyph_inFont(&self, glyph: CGGlyph, font: &NSFont); + #[method(appendBezierPathWithCGGlyphs:count:inFont:)] pub unsafe fn appendBezierPathWithCGGlyphs_count_inFont( &self, @@ -200,6 +271,7 @@ extern_methods!( count: NSInteger, font: &NSFont, ); + #[method(appendBezierPathWithRoundedRect:xRadius:yRadius:)] pub unsafe fn appendBezierPathWithRoundedRect_xRadius_yRadius( &self, @@ -207,19 +279,24 @@ extern_methods!( xRadius: CGFloat, yRadius: CGFloat, ); + #[method(containsPoint:)] pub unsafe fn containsPoint(&self, point: NSPoint) -> bool; } ); + extern_methods!( - #[doc = "NSBezierPathDeprecated"] + /// NSBezierPathDeprecated unsafe impl NSBezierPath { #[method(cachesBezierPath)] pub unsafe fn cachesBezierPath(&self) -> bool; + #[method(setCachesBezierPath:)] pub unsafe fn setCachesBezierPath(&self, flag: bool); + #[method(appendBezierPathWithGlyph:inFont:)] pub unsafe fn appendBezierPathWithGlyph_inFont(&self, glyph: NSGlyph, font: &NSFont); + #[method(appendBezierPathWithGlyphs:count:inFont:)] pub unsafe fn appendBezierPathWithGlyphs_count_inFont( &self, @@ -227,6 +304,7 @@ extern_methods!( count: NSInteger, font: &NSFont, ); + #[method(appendBezierPathWithPackedGlyphs:)] pub unsafe fn appendBezierPathWithPackedGlyphs(&self, packedGlyphs: NonNull); } diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index ac6ee98c0..f7cace228 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -1,19 +1,26 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSBitmapImageRepPropertyKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSBitmapImageRep; + unsafe impl ClassType for NSBitmapImageRep { type Super = NSImageRep; } ); + extern_methods!( unsafe impl NSBitmapImageRep { #[method_id(initWithFocusedViewRect:)] pub unsafe fn initWithFocusedViewRect(&self, rect: NSRect) -> Option>; + #[method_id(initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:)] pub unsafe fn initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel( &self, @@ -28,6 +35,7 @@ extern_methods!( rBytes: NSInteger, pBits: NSInteger, ) -> Option>; + #[method_id(initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:)] pub unsafe fn initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel( &self, @@ -43,71 +51,95 @@ extern_methods!( rBytes: NSInteger, pBits: NSInteger, ) -> Option>; + #[method_id(initWithCGImage:)] pub unsafe fn initWithCGImage(&self, cgImage: CGImageRef) -> Id; + #[method_id(initWithCIImage:)] pub unsafe fn initWithCIImage(&self, ciImage: &CIImage) -> Id; + #[method_id(imageRepsWithData:)] pub unsafe fn imageRepsWithData(data: &NSData) -> Id, Shared>; + #[method_id(imageRepWithData:)] pub unsafe fn imageRepWithData(data: &NSData) -> Option>; + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Option>; + #[method(bitmapData)] pub unsafe fn bitmapData(&self) -> *mut c_uchar; + #[method(getBitmapDataPlanes:)] pub unsafe fn getBitmapDataPlanes(&self, data: NonNull<*mut c_uchar>); + #[method(isPlanar)] pub unsafe fn isPlanar(&self) -> bool; + #[method(samplesPerPixel)] pub unsafe fn samplesPerPixel(&self) -> NSInteger; + #[method(bitsPerPixel)] pub unsafe fn bitsPerPixel(&self) -> NSInteger; + #[method(bytesPerRow)] pub unsafe fn bytesPerRow(&self) -> NSInteger; + #[method(bytesPerPlane)] pub unsafe fn bytesPerPlane(&self) -> NSInteger; + #[method(numberOfPlanes)] pub unsafe fn numberOfPlanes(&self) -> NSInteger; + #[method(bitmapFormat)] pub unsafe fn bitmapFormat(&self) -> NSBitmapFormat; + #[method(getCompression:factor:)] pub unsafe fn getCompression_factor( &self, compression: *mut NSTIFFCompression, factor: *mut c_float, ); + #[method(setCompression:factor:)] pub unsafe fn setCompression_factor(&self, compression: NSTIFFCompression, factor: c_float); + #[method_id(TIFFRepresentation)] pub unsafe fn TIFFRepresentation(&self) -> Option>; + #[method_id(TIFFRepresentationUsingCompression:factor:)] pub unsafe fn TIFFRepresentationUsingCompression_factor( &self, comp: NSTIFFCompression, factor: c_float, ) -> Option>; + #[method_id(TIFFRepresentationOfImageRepsInArray:)] pub unsafe fn TIFFRepresentationOfImageRepsInArray( array: &NSArray, ) -> Option>; + #[method_id(TIFFRepresentationOfImageRepsInArray:usingCompression:factor:)] pub unsafe fn TIFFRepresentationOfImageRepsInArray_usingCompression_factor( array: &NSArray, comp: NSTIFFCompression, factor: c_float, ) -> Option>; + #[method(getTIFFCompressionTypes:count:)] pub unsafe fn getTIFFCompressionTypes_count( list: NonNull<*mut NSTIFFCompression>, numTypes: NonNull, ); + #[method_id(localizedNameForTIFFCompressionType:)] pub unsafe fn localizedNameForTIFFCompressionType( compression: NSTIFFCompression, ) -> Option>; + #[method(canBeCompressedUsing:)] pub unsafe fn canBeCompressedUsing(&self, compression: NSTIFFCompression) -> bool; + #[method(colorizeByMappingGray:toColor:blackMapping:whiteMapping:)] pub unsafe fn colorizeByMappingGray_toColor_blackMapping_whiteMapping( &self, @@ -116,32 +148,42 @@ extern_methods!( shadowColor: Option<&NSColor>, lightColor: Option<&NSColor>, ); + #[method_id(initForIncrementalLoad)] pub unsafe fn initForIncrementalLoad(&self) -> Id; + #[method(incrementalLoadFromData:complete:)] pub unsafe fn incrementalLoadFromData_complete( &self, data: &NSData, complete: bool, ) -> NSInteger; + #[method(setColor:atX:y:)] pub unsafe fn setColor_atX_y(&self, color: &NSColor, x: NSInteger, y: NSInteger); + #[method_id(colorAtX:y:)] pub unsafe fn colorAtX_y(&self, x: NSInteger, y: NSInteger) -> Option>; + #[method(getPixel:atX:y:)] pub unsafe fn getPixel_atX_y(&self, p: TodoArray, x: NSInteger, y: NSInteger); + #[method(setPixel:atX:y:)] pub unsafe fn setPixel_atX_y(&self, p: TodoArray, x: NSInteger, y: NSInteger); + #[method(CGImage)] pub unsafe fn CGImage(&self) -> CGImageRef; + #[method_id(colorSpace)] pub unsafe fn colorSpace(&self) -> Id; + #[method_id(bitmapImageRepByConvertingToColorSpace:renderingIntent:)] pub unsafe fn bitmapImageRepByConvertingToColorSpace_renderingIntent( &self, targetSpace: &NSColorSpace, renderingIntent: NSColorRenderingIntent, ) -> Option>; + #[method_id(bitmapImageRepByRetaggingWithColorSpace:)] pub unsafe fn bitmapImageRepByRetaggingWithColorSpace( &self, @@ -149,8 +191,9 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSBitmapImageFileTypeExtensions"] + /// NSBitmapImageFileTypeExtensions unsafe impl NSBitmapImageRep { #[method_id(representationOfImageRepsInArray:usingType:properties:)] pub unsafe fn representationOfImageRepsInArray_usingType_properties( @@ -158,18 +201,21 @@ extern_methods!( storageType: NSBitmapImageFileType, properties: &NSDictionary, ) -> Option>; + #[method_id(representationUsingType:properties:)] pub unsafe fn representationUsingType_properties( &self, storageType: NSBitmapImageFileType, properties: &NSDictionary, ) -> Option>; + #[method(setProperty:withValue:)] pub unsafe fn setProperty_withValue( &self, property: &NSBitmapImageRepPropertyKey, value: Option<&Object>, ); + #[method_id(valueForProperty:)] pub unsafe fn valueForProperty( &self, diff --git a/crates/icrate/src/generated/AppKit/NSBox.rs b/crates/icrate/src/generated/AppKit/NSBox.rs index 61af8a961..ad41f8ef3 100644 --- a/crates/icrate/src/generated/AppKit/NSBox.rs +++ b/crates/icrate/src/generated/AppKit/NSBox.rs @@ -1,79 +1,113 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSBox; + unsafe impl ClassType for NSBox { type Super = NSView; } ); + extern_methods!( unsafe impl NSBox { #[method(boxType)] pub unsafe fn boxType(&self) -> NSBoxType; + #[method(setBoxType:)] pub unsafe fn setBoxType(&self, boxType: NSBoxType); + #[method(titlePosition)] pub unsafe fn titlePosition(&self) -> NSTitlePosition; + #[method(setTitlePosition:)] pub unsafe fn setTitlePosition(&self, titlePosition: NSTitlePosition); + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(titleFont)] pub unsafe fn titleFont(&self) -> Id; + #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, titleFont: &NSFont); + #[method(borderRect)] pub unsafe fn borderRect(&self) -> NSRect; + #[method(titleRect)] pub unsafe fn titleRect(&self) -> NSRect; + #[method_id(titleCell)] pub unsafe fn titleCell(&self) -> Id; + #[method(contentViewMargins)] pub unsafe fn contentViewMargins(&self) -> NSSize; + #[method(setContentViewMargins:)] pub unsafe fn setContentViewMargins(&self, contentViewMargins: NSSize); + #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[method(setFrameFromContentFrame:)] pub unsafe fn setFrameFromContentFrame(&self, contentFrame: NSRect); + #[method_id(contentView)] pub unsafe fn contentView(&self) -> Option>; + #[method(setContentView:)] pub unsafe fn setContentView(&self, contentView: Option<&NSView>); + #[method(isTransparent)] pub unsafe fn isTransparent(&self) -> bool; + #[method(setTransparent:)] pub unsafe fn setTransparent(&self, transparent: bool); + #[method(borderWidth)] pub unsafe fn borderWidth(&self) -> CGFloat; + #[method(setBorderWidth:)] pub unsafe fn setBorderWidth(&self, borderWidth: CGFloat); + #[method(cornerRadius)] pub unsafe fn cornerRadius(&self) -> CGFloat; + #[method(setCornerRadius:)] pub unsafe fn setCornerRadius(&self, cornerRadius: CGFloat); + #[method_id(borderColor)] pub unsafe fn borderColor(&self) -> Id; + #[method(setBorderColor:)] pub unsafe fn setBorderColor(&self, borderColor: &NSColor); + #[method_id(fillColor)] pub unsafe fn fillColor(&self) -> Id; + #[method(setFillColor:)] pub unsafe fn setFillColor(&self, fillColor: &NSColor); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSBox { #[method(borderType)] pub unsafe fn borderType(&self) -> NSBorderType; + #[method(setBorderType:)] pub unsafe fn setBorderType(&self, borderType: NSBorderType); + #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); } diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index a08d8cc1c..e02de949b 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -1,206 +1,297 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSBrowserColumnsAutosaveName = NSString; + extern_class!( #[derive(Debug)] pub struct NSBrowser; + unsafe impl ClassType for NSBrowser { type Super = NSControl; } ); + extern_methods!( unsafe impl NSBrowser { #[method(cellClass)] pub unsafe fn cellClass() -> &Class; + #[method(loadColumnZero)] pub unsafe fn loadColumnZero(&self); + #[method(isLoaded)] pub unsafe fn isLoaded(&self) -> bool; + #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method(setCellClass:)] pub unsafe fn setCellClass(&self, factoryId: &Class); + #[method_id(cellPrototype)] pub unsafe fn cellPrototype(&self) -> Option>; + #[method(setCellPrototype:)] pub unsafe fn setCellPrototype(&self, cellPrototype: Option<&Object>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSBrowserDelegate>); + #[method(reusesColumns)] pub unsafe fn reusesColumns(&self) -> bool; + #[method(setReusesColumns:)] pub unsafe fn setReusesColumns(&self, reusesColumns: bool); + #[method(hasHorizontalScroller)] pub unsafe fn hasHorizontalScroller(&self) -> bool; + #[method(setHasHorizontalScroller:)] pub unsafe fn setHasHorizontalScroller(&self, hasHorizontalScroller: bool); + #[method(autohidesScroller)] pub unsafe fn autohidesScroller(&self) -> bool; + #[method(setAutohidesScroller:)] pub unsafe fn setAutohidesScroller(&self, autohidesScroller: bool); + #[method(separatesColumns)] pub unsafe fn separatesColumns(&self) -> bool; + #[method(setSeparatesColumns:)] pub unsafe fn setSeparatesColumns(&self, separatesColumns: bool); + #[method(isTitled)] pub unsafe fn isTitled(&self) -> bool; + #[method(setTitled:)] pub unsafe fn setTitled(&self, titled: bool); + #[method(minColumnWidth)] pub unsafe fn minColumnWidth(&self) -> CGFloat; + #[method(setMinColumnWidth:)] pub unsafe fn setMinColumnWidth(&self, minColumnWidth: CGFloat); + #[method(maxVisibleColumns)] pub unsafe fn maxVisibleColumns(&self) -> NSInteger; + #[method(setMaxVisibleColumns:)] pub unsafe fn setMaxVisibleColumns(&self, maxVisibleColumns: NSInteger); + #[method(allowsMultipleSelection)] pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[method(setAllowsMultipleSelection:)] pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool); + #[method(allowsBranchSelection)] pub unsafe fn allowsBranchSelection(&self) -> bool; + #[method(setAllowsBranchSelection:)] pub unsafe fn setAllowsBranchSelection(&self, allowsBranchSelection: bool); + #[method(allowsEmptySelection)] pub unsafe fn allowsEmptySelection(&self) -> bool; + #[method(setAllowsEmptySelection:)] pub unsafe fn setAllowsEmptySelection(&self, allowsEmptySelection: bool); + #[method(takesTitleFromPreviousColumn)] pub unsafe fn takesTitleFromPreviousColumn(&self) -> bool; + #[method(setTakesTitleFromPreviousColumn:)] pub unsafe fn setTakesTitleFromPreviousColumn(&self, takesTitleFromPreviousColumn: bool); + #[method(sendsActionOnArrowKeys)] pub unsafe fn sendsActionOnArrowKeys(&self) -> bool; + #[method(setSendsActionOnArrowKeys:)] pub unsafe fn setSendsActionOnArrowKeys(&self, sendsActionOnArrowKeys: bool); + #[method_id(itemAtIndexPath:)] pub unsafe fn itemAtIndexPath(&self, indexPath: &NSIndexPath) -> Option>; + #[method_id(itemAtRow:inColumn:)] pub unsafe fn itemAtRow_inColumn( &self, row: NSInteger, column: NSInteger, ) -> Option>; + #[method_id(indexPathForColumn:)] pub unsafe fn indexPathForColumn(&self, column: NSInteger) -> Id; + #[method(isLeafItem:)] pub unsafe fn isLeafItem(&self, item: Option<&Object>) -> bool; + #[method(reloadDataForRowIndexes:inColumn:)] pub unsafe fn reloadDataForRowIndexes_inColumn( &self, rowIndexes: &NSIndexSet, column: NSInteger, ); + #[method_id(parentForItemsInColumn:)] pub unsafe fn parentForItemsInColumn( &self, column: NSInteger, ) -> Option>; + #[method(scrollRowToVisible:inColumn:)] pub unsafe fn scrollRowToVisible_inColumn(&self, row: NSInteger, column: NSInteger); + #[method(setTitle:ofColumn:)] pub unsafe fn setTitle_ofColumn(&self, string: &NSString, column: NSInteger); + #[method_id(titleOfColumn:)] pub unsafe fn titleOfColumn(&self, column: NSInteger) -> Option>; + #[method_id(pathSeparator)] pub unsafe fn pathSeparator(&self) -> Id; + #[method(setPathSeparator:)] pub unsafe fn setPathSeparator(&self, pathSeparator: &NSString); + #[method(setPath:)] pub unsafe fn setPath(&self, path: &NSString) -> bool; + #[method_id(path)] pub unsafe fn path(&self) -> Id; + #[method_id(pathToColumn:)] pub unsafe fn pathToColumn(&self, column: NSInteger) -> Id; + #[method(clickedColumn)] pub unsafe fn clickedColumn(&self) -> NSInteger; + #[method(clickedRow)] pub unsafe fn clickedRow(&self) -> NSInteger; + #[method(selectedColumn)] pub unsafe fn selectedColumn(&self) -> NSInteger; + #[method_id(selectedCell)] pub unsafe fn selectedCell(&self) -> Option>; + #[method_id(selectedCellInColumn:)] pub unsafe fn selectedCellInColumn(&self, column: NSInteger) -> Option>; + #[method_id(selectedCells)] pub unsafe fn selectedCells(&self) -> Option, Shared>>; + #[method(selectRow:inColumn:)] pub unsafe fn selectRow_inColumn(&self, row: NSInteger, column: NSInteger); + #[method(selectedRowInColumn:)] pub unsafe fn selectedRowInColumn(&self, column: NSInteger) -> NSInteger; + #[method_id(selectionIndexPath)] pub unsafe fn selectionIndexPath(&self) -> Option>; + #[method(setSelectionIndexPath:)] pub unsafe fn setSelectionIndexPath(&self, selectionIndexPath: Option<&NSIndexPath>); + #[method_id(selectionIndexPaths)] pub unsafe fn selectionIndexPaths(&self) -> Id, Shared>; + #[method(setSelectionIndexPaths:)] pub unsafe fn setSelectionIndexPaths(&self, selectionIndexPaths: &NSArray); + #[method(selectRowIndexes:inColumn:)] pub unsafe fn selectRowIndexes_inColumn(&self, indexes: &NSIndexSet, column: NSInteger); + #[method_id(selectedRowIndexesInColumn:)] pub unsafe fn selectedRowIndexesInColumn( &self, column: NSInteger, ) -> Option>; + #[method(reloadColumn:)] pub unsafe fn reloadColumn(&self, column: NSInteger); + #[method(validateVisibleColumns)] pub unsafe fn validateVisibleColumns(&self); + #[method(scrollColumnsRightBy:)] pub unsafe fn scrollColumnsRightBy(&self, shiftAmount: NSInteger); + #[method(scrollColumnsLeftBy:)] pub unsafe fn scrollColumnsLeftBy(&self, shiftAmount: NSInteger); + #[method(scrollColumnToVisible:)] pub unsafe fn scrollColumnToVisible(&self, column: NSInteger); + #[method(lastColumn)] pub unsafe fn lastColumn(&self) -> NSInteger; + #[method(setLastColumn:)] pub unsafe fn setLastColumn(&self, lastColumn: NSInteger); + #[method(addColumn)] pub unsafe fn addColumn(&self); + #[method(numberOfVisibleColumns)] pub unsafe fn numberOfVisibleColumns(&self) -> NSInteger; + #[method(firstVisibleColumn)] pub unsafe fn firstVisibleColumn(&self) -> NSInteger; + #[method(lastVisibleColumn)] pub unsafe fn lastVisibleColumn(&self) -> NSInteger; + #[method_id(loadedCellAtRow:column:)] pub unsafe fn loadedCellAtRow_column( &self, row: NSInteger, col: NSInteger, ) -> Option>; + #[method(selectAll:)] pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[method(tile)] pub unsafe fn tile(&self); + #[method(doClick:)] pub unsafe fn doClick(&self, sender: Option<&Object>); + #[method(doDoubleClick:)] pub unsafe fn doDoubleClick(&self, sender: Option<&Object>); + #[method(sendAction)] pub unsafe fn sendAction(&self) -> bool; + #[method(titleFrameOfColumn:)] pub unsafe fn titleFrameOfColumn(&self, column: NSInteger) -> NSRect; + #[method(drawTitleOfColumn:inRect:)] pub unsafe fn drawTitleOfColumn_inRect(&self, column: NSInteger, rect: NSRect); + #[method(titleHeight)] pub unsafe fn titleHeight(&self) -> CGFloat; + #[method(frameOfColumn:)] pub unsafe fn frameOfColumn(&self, column: NSInteger) -> NSRect; + #[method(frameOfInsideOfColumn:)] pub unsafe fn frameOfInsideOfColumn(&self, column: NSInteger) -> NSRect; + #[method(frameOfRow:inColumn:)] pub unsafe fn frameOfRow_inColumn(&self, row: NSInteger, column: NSInteger) -> NSRect; + #[method(getRow:column:forPoint:)] pub unsafe fn getRow_column_forPoint( &self, @@ -208,48 +299,65 @@ extern_methods!( column: *mut NSInteger, point: NSPoint, ) -> bool; + #[method(columnWidthForColumnContentWidth:)] pub unsafe fn columnWidthForColumnContentWidth( &self, columnContentWidth: CGFloat, ) -> CGFloat; + #[method(columnContentWidthForColumnWidth:)] pub unsafe fn columnContentWidthForColumnWidth(&self, columnWidth: CGFloat) -> CGFloat; + #[method(columnResizingType)] pub unsafe fn columnResizingType(&self) -> NSBrowserColumnResizingType; + #[method(setColumnResizingType:)] pub unsafe fn setColumnResizingType(&self, columnResizingType: NSBrowserColumnResizingType); + #[method(prefersAllColumnUserResizing)] pub unsafe fn prefersAllColumnUserResizing(&self) -> bool; + #[method(setPrefersAllColumnUserResizing:)] pub unsafe fn setPrefersAllColumnUserResizing(&self, prefersAllColumnUserResizing: bool); + #[method(setWidth:ofColumn:)] pub unsafe fn setWidth_ofColumn(&self, columnWidth: CGFloat, columnIndex: NSInteger); + #[method(widthOfColumn:)] pub unsafe fn widthOfColumn(&self, column: NSInteger) -> CGFloat; + #[method(rowHeight)] pub unsafe fn rowHeight(&self) -> CGFloat; + #[method(setRowHeight:)] pub unsafe fn setRowHeight(&self, rowHeight: CGFloat); + #[method(noteHeightOfRowsWithIndexesChanged:inColumn:)] pub unsafe fn noteHeightOfRowsWithIndexesChanged_inColumn( &self, indexSet: &NSIndexSet, columnIndex: NSInteger, ); + #[method(setDefaultColumnWidth:)] pub unsafe fn setDefaultColumnWidth(&self, columnWidth: CGFloat); + #[method(defaultColumnWidth)] pub unsafe fn defaultColumnWidth(&self) -> CGFloat; + #[method_id(columnsAutosaveName)] pub unsafe fn columnsAutosaveName(&self) -> Id; + #[method(setColumnsAutosaveName:)] pub unsafe fn setColumnsAutosaveName( &self, columnsAutosaveName: &NSBrowserColumnsAutosaveName, ); + #[method(removeSavedColumnsWithAutosaveName:)] pub unsafe fn removeSavedColumnsWithAutosaveName(name: &NSBrowserColumnsAutosaveName); + #[method(canDragRowsWithIndexes:inColumn:withEvent:)] pub unsafe fn canDragRowsWithIndexes_inColumn_withEvent( &self, @@ -257,6 +365,7 @@ extern_methods!( column: NSInteger, event: &NSEvent, ) -> bool; + #[method_id(draggingImageForRowsWithIndexes:inColumn:withEvent:offset:)] pub unsafe fn draggingImageForRowsWithIndexes_inColumn_withEvent_offset( &self, @@ -265,20 +374,26 @@ extern_methods!( event: &NSEvent, dragImageOffset: NSPointPointer, ) -> Option>; + #[method(setDraggingSourceOperationMask:forLocal:)] pub unsafe fn setDraggingSourceOperationMask_forLocal( &self, mask: NSDragOperation, isLocal: bool, ); + #[method(allowsTypeSelect)] pub unsafe fn allowsTypeSelect(&self) -> bool; + #[method(setAllowsTypeSelect:)] pub unsafe fn setAllowsTypeSelect(&self, allowsTypeSelect: bool); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(editItemAtIndexPath:withEvent:select:)] pub unsafe fn editItemAtIndexPath_withEvent_select( &self, @@ -288,28 +403,39 @@ extern_methods!( ); } ); + pub type NSBrowserDelegate = NSObject; + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSBrowser { #[method(setAcceptsArrowKeys:)] pub unsafe fn setAcceptsArrowKeys(&self, flag: bool); + #[method(acceptsArrowKeys)] pub unsafe fn acceptsArrowKeys(&self) -> bool; + #[method(displayColumn:)] pub unsafe fn displayColumn(&self, column: NSInteger); + #[method(displayAllColumns)] pub unsafe fn displayAllColumns(&self); + #[method(scrollViaScroller:)] pub unsafe fn scrollViaScroller(&self, sender: Option<&NSScroller>); + #[method(updateScroller)] pub unsafe fn updateScroller(&self); + #[method(setMatrixClass:)] pub unsafe fn setMatrixClass(&self, factoryId: &Class); + #[method(matrixClass)] pub unsafe fn matrixClass(&self) -> &Class; + #[method(columnOfMatrix:)] pub unsafe fn columnOfMatrix(&self, matrix: &NSMatrix) -> NSInteger; + #[method_id(matrixInColumn:)] pub unsafe fn matrixInColumn(&self, column: NSInteger) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs index d063e52e4..72e9e5b7a 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs @@ -1,49 +1,69 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSBrowserCell; + unsafe impl ClassType for NSBrowserCell { type Super = NSCell; } ); + extern_methods!( unsafe impl NSBrowserCell { #[method_id(initTextCell:)] pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initImageCell:)] pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(branchImage)] pub unsafe fn branchImage() -> Option>; + #[method_id(highlightedBranchImage)] pub unsafe fn highlightedBranchImage() -> Option>; + #[method_id(highlightColorInView:)] pub unsafe fn highlightColorInView( &self, controlView: &NSView, ) -> Option>; + #[method(isLeaf)] pub unsafe fn isLeaf(&self) -> bool; + #[method(setLeaf:)] pub unsafe fn setLeaf(&self, leaf: bool); + #[method(isLoaded)] pub unsafe fn isLoaded(&self) -> bool; + #[method(setLoaded:)] pub unsafe fn setLoaded(&self, loaded: bool); + #[method(reset)] pub unsafe fn reset(&self); + #[method(set)] pub unsafe fn set(&self); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; + #[method(setAlternateImage:)] pub unsafe fn setAlternateImage(&self, alternateImage: Option<&NSImage>); } diff --git a/crates/icrate/src/generated/AppKit/NSButton.rs b/crates/icrate/src/generated/AppKit/NSButton.rs index 6a92c24bc..3178df7d9 100644 --- a/crates/icrate/src/generated/AppKit/NSButton.rs +++ b/crates/icrate/src/generated/AppKit/NSButton.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSButton; + unsafe impl ClassType for NSButton { type Super = NSControl; } ); + extern_methods!( unsafe impl NSButton { #[method_id(buttonWithTitle:image:target:action:)] @@ -18,172 +23,234 @@ extern_methods!( target: Option<&Object>, action: Option, ) -> Id; + #[method_id(buttonWithTitle:target:action:)] pub unsafe fn buttonWithTitle_target_action( title: &NSString, target: Option<&Object>, action: Option, ) -> Id; + #[method_id(buttonWithImage:target:action:)] pub unsafe fn buttonWithImage_target_action( image: &NSImage, target: Option<&Object>, action: Option, ) -> Id; + #[method_id(checkboxWithTitle:target:action:)] pub unsafe fn checkboxWithTitle_target_action( title: &NSString, target: Option<&Object>, action: Option, ) -> Id; + #[method_id(radioButtonWithTitle:target:action:)] pub unsafe fn radioButtonWithTitle_target_action( title: &NSString, target: Option<&Object>, action: Option, ) -> Id; + #[method(setButtonType:)] pub unsafe fn setButtonType(&self, type_: NSButtonType); + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; + #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); + #[method_id(alternateTitle)] pub unsafe fn alternateTitle(&self) -> Id; + #[method(setAlternateTitle:)] pub unsafe fn setAlternateTitle(&self, alternateTitle: &NSString); + #[method_id(attributedAlternateTitle)] pub unsafe fn attributedAlternateTitle(&self) -> Id; + #[method(setAttributedAlternateTitle:)] pub unsafe fn setAttributedAlternateTitle( &self, attributedAlternateTitle: &NSAttributedString, ); + #[method(hasDestructiveAction)] pub unsafe fn hasDestructiveAction(&self) -> bool; + #[method(setHasDestructiveAction:)] pub unsafe fn setHasDestructiveAction(&self, hasDestructiveAction: bool); + #[method_id(sound)] pub unsafe fn sound(&self) -> Option>; + #[method(setSound:)] pub unsafe fn setSound(&self, sound: Option<&NSSound>); + #[method(isSpringLoaded)] pub unsafe fn isSpringLoaded(&self) -> bool; + #[method(setSpringLoaded:)] pub unsafe fn setSpringLoaded(&self, springLoaded: bool); + #[method(maxAcceleratorLevel)] pub unsafe fn maxAcceleratorLevel(&self) -> NSInteger; + #[method(setMaxAcceleratorLevel:)] pub unsafe fn setMaxAcceleratorLevel(&self, maxAcceleratorLevel: NSInteger); + #[method(setPeriodicDelay:interval:)] pub unsafe fn setPeriodicDelay_interval(&self, delay: c_float, interval: c_float); + #[method(getPeriodicDelay:interval:)] pub unsafe fn getPeriodicDelay_interval( &self, delay: NonNull, interval: NonNull, ); + #[method(bezelStyle)] pub unsafe fn bezelStyle(&self) -> NSBezelStyle; + #[method(setBezelStyle:)] pub unsafe fn setBezelStyle(&self, bezelStyle: NSBezelStyle); + #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[method(isTransparent)] pub unsafe fn isTransparent(&self) -> bool; + #[method(setTransparent:)] pub unsafe fn setTransparent(&self, transparent: bool); + #[method(showsBorderOnlyWhileMouseInside)] pub unsafe fn showsBorderOnlyWhileMouseInside(&self) -> bool; + #[method(setShowsBorderOnlyWhileMouseInside:)] pub unsafe fn setShowsBorderOnlyWhileMouseInside( &self, showsBorderOnlyWhileMouseInside: bool, ); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; + #[method(setAlternateImage:)] pub unsafe fn setAlternateImage(&self, alternateImage: Option<&NSImage>); + #[method(imagePosition)] pub unsafe fn imagePosition(&self) -> NSCellImagePosition; + #[method(setImagePosition:)] pub unsafe fn setImagePosition(&self, imagePosition: NSCellImagePosition); + #[method(imageScaling)] pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[method(setImageScaling:)] pub unsafe fn setImageScaling(&self, imageScaling: NSImageScaling); + #[method(imageHugsTitle)] pub unsafe fn imageHugsTitle(&self) -> bool; + #[method(setImageHugsTitle:)] pub unsafe fn setImageHugsTitle(&self, imageHugsTitle: bool); + #[method_id(symbolConfiguration)] pub unsafe fn symbolConfiguration(&self) -> Option>; + #[method(setSymbolConfiguration:)] pub unsafe fn setSymbolConfiguration( &self, symbolConfiguration: Option<&NSImageSymbolConfiguration>, ); + #[method_id(bezelColor)] pub unsafe fn bezelColor(&self) -> Option>; + #[method(setBezelColor:)] pub unsafe fn setBezelColor(&self, bezelColor: Option<&NSColor>); + #[method_id(contentTintColor)] pub unsafe fn contentTintColor(&self) -> Option>; + #[method(setContentTintColor:)] pub unsafe fn setContentTintColor(&self, contentTintColor: Option<&NSColor>); + #[method(state)] pub unsafe fn state(&self) -> NSControlStateValue; + #[method(setState:)] pub unsafe fn setState(&self, state: NSControlStateValue); + #[method(allowsMixedState)] pub unsafe fn allowsMixedState(&self) -> bool; + #[method(setAllowsMixedState:)] pub unsafe fn setAllowsMixedState(&self, allowsMixedState: bool); + #[method(setNextState)] pub unsafe fn setNextState(&self); + #[method(highlight:)] pub unsafe fn highlight(&self, flag: bool); + #[method_id(keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; + #[method(setKeyEquivalent:)] pub unsafe fn setKeyEquivalent(&self, keyEquivalent: &NSString); + #[method(keyEquivalentModifierMask)] pub unsafe fn keyEquivalentModifierMask(&self) -> NSEventModifierFlags; + #[method(setKeyEquivalentModifierMask:)] pub unsafe fn setKeyEquivalentModifierMask( &self, keyEquivalentModifierMask: NSEventModifierFlags, ); + #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, key: &NSEvent) -> bool; + #[method(compressWithPrioritizedCompressionOptions:)] pub unsafe fn compressWithPrioritizedCompressionOptions( &self, prioritizedOptions: &NSArray, ); + #[method(minimumSizeWithPrioritizedCompressionOptions:)] pub unsafe fn minimumSizeWithPrioritizedCompressionOptions( &self, prioritizedOptions: &NSArray, ) -> NSSize; + #[method_id(activeCompressionOptions)] pub unsafe fn activeCompressionOptions( &self, ) -> Id; } ); + extern_methods!( - #[doc = "NSButtonDeprecated"] + /// NSButtonDeprecated unsafe impl NSButton { #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs index 43b410ac0..30bdf286b 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -1,119 +1,169 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSButtonCell; + unsafe impl ClassType for NSButtonCell { type Super = NSActionCell; } ); + extern_methods!( unsafe impl NSButtonCell { #[method_id(initTextCell:)] pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initImageCell:)] pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(bezelStyle)] pub unsafe fn bezelStyle(&self) -> NSBezelStyle; + #[method(setBezelStyle:)] pub unsafe fn setBezelStyle(&self, bezelStyle: NSBezelStyle); + #[method(setButtonType:)] pub unsafe fn setButtonType(&self, type_: NSButtonType); + #[method(highlightsBy)] pub unsafe fn highlightsBy(&self) -> NSCellStyleMask; + #[method(setHighlightsBy:)] pub unsafe fn setHighlightsBy(&self, highlightsBy: NSCellStyleMask); + #[method(showsStateBy)] pub unsafe fn showsStateBy(&self) -> NSCellStyleMask; + #[method(setShowsStateBy:)] pub unsafe fn setShowsStateBy(&self, showsStateBy: NSCellStyleMask); + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; + #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); + #[method_id(alternateTitle)] pub unsafe fn alternateTitle(&self) -> Id; + #[method(setAlternateTitle:)] pub unsafe fn setAlternateTitle(&self, alternateTitle: &NSString); + #[method_id(attributedAlternateTitle)] pub unsafe fn attributedAlternateTitle(&self) -> Id; + #[method(setAttributedAlternateTitle:)] pub unsafe fn setAttributedAlternateTitle( &self, attributedAlternateTitle: &NSAttributedString, ); + #[method_id(alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; + #[method(setAlternateImage:)] pub unsafe fn setAlternateImage(&self, alternateImage: Option<&NSImage>); + #[method(imagePosition)] pub unsafe fn imagePosition(&self) -> NSCellImagePosition; + #[method(setImagePosition:)] pub unsafe fn setImagePosition(&self, imagePosition: NSCellImagePosition); + #[method(imageScaling)] pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[method(setImageScaling:)] pub unsafe fn setImageScaling(&self, imageScaling: NSImageScaling); + #[method_id(keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; + #[method(setKeyEquivalent:)] pub unsafe fn setKeyEquivalent(&self, keyEquivalent: &NSString); + #[method(keyEquivalentModifierMask)] pub unsafe fn keyEquivalentModifierMask(&self) -> NSEventModifierFlags; + #[method(setKeyEquivalentModifierMask:)] pub unsafe fn setKeyEquivalentModifierMask( &self, keyEquivalentModifierMask: NSEventModifierFlags, ); + #[method(isTransparent)] pub unsafe fn isTransparent(&self) -> bool; + #[method(setTransparent:)] pub unsafe fn setTransparent(&self, transparent: bool); + #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[method(imageDimsWhenDisabled)] pub unsafe fn imageDimsWhenDisabled(&self) -> bool; + #[method(setImageDimsWhenDisabled:)] pub unsafe fn setImageDimsWhenDisabled(&self, imageDimsWhenDisabled: bool); + #[method(showsBorderOnlyWhileMouseInside)] pub unsafe fn showsBorderOnlyWhileMouseInside(&self) -> bool; + #[method(setShowsBorderOnlyWhileMouseInside:)] pub unsafe fn setShowsBorderOnlyWhileMouseInside( &self, showsBorderOnlyWhileMouseInside: bool, ); + #[method_id(sound)] pub unsafe fn sound(&self) -> Option>; + #[method(setSound:)] pub unsafe fn setSound(&self, sound: Option<&NSSound>); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(setPeriodicDelay:interval:)] pub unsafe fn setPeriodicDelay_interval(&self, delay: c_float, interval: c_float); + #[method(getPeriodicDelay:interval:)] pub unsafe fn getPeriodicDelay_interval( &self, delay: NonNull, interval: NonNull, ); + #[method(performClick:)] pub unsafe fn performClick(&self, sender: Option<&Object>); + #[method(mouseEntered:)] pub unsafe fn mouseEntered(&self, event: &NSEvent); + #[method(mouseExited:)] pub unsafe fn mouseExited(&self, event: &NSEvent); + #[method(drawBezelWithFrame:inView:)] pub unsafe fn drawBezelWithFrame_inView(&self, frame: NSRect, controlView: &NSView); + #[method(drawImage:withFrame:inView:)] pub unsafe fn drawImage_withFrame_inView( &self, @@ -121,6 +171,7 @@ extern_methods!( frame: NSRect, controlView: &NSView, ); + #[method(drawTitle:withFrame:inView:)] pub unsafe fn drawTitle_withFrame_inView( &self, @@ -130,27 +181,37 @@ extern_methods!( ) -> NSRect; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSButtonCell { #[method(gradientType)] pub unsafe fn gradientType(&self) -> NSGradientType; + #[method(setGradientType:)] pub unsafe fn setGradientType(&self, gradientType: NSGradientType); + #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); + #[method(setAlternateTitleWithMnemonic:)] pub unsafe fn setAlternateTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); + #[method(setAlternateMnemonicLocation:)] pub unsafe fn setAlternateMnemonicLocation(&self, location: NSUInteger); + #[method(alternateMnemonicLocation)] pub unsafe fn alternateMnemonicLocation(&self) -> NSUInteger; + #[method_id(alternateMnemonic)] pub unsafe fn alternateMnemonic(&self) -> Option>; + #[method_id(keyEquivalentFont)] pub unsafe fn keyEquivalentFont(&self) -> Option>; + #[method(setKeyEquivalentFont:)] pub unsafe fn setKeyEquivalentFont(&self, keyEquivalentFont: Option<&NSFont>); + #[method(setKeyEquivalentFont:size:)] pub unsafe fn setKeyEquivalentFont_size(&self, fontName: &NSString, fontSize: CGFloat); } diff --git a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs index 497484d2a..2631f9e81 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSButtonTouchBarItem; + unsafe impl ClassType for NSButtonTouchBarItem { type Super = NSTouchBarItem; } ); + extern_methods!( unsafe impl NSButtonTouchBarItem { #[method_id(buttonTouchBarItemWithIdentifier:title:target:action:)] @@ -18,6 +23,7 @@ extern_methods!( target: Option<&Object>, action: Option, ) -> Id; + #[method_id(buttonTouchBarItemWithIdentifier:image:target:action:)] pub unsafe fn buttonTouchBarItemWithIdentifier_image_target_action( identifier: &NSTouchBarItemIdentifier, @@ -25,6 +31,7 @@ extern_methods!( target: Option<&Object>, action: Option, ) -> Id; + #[method_id(buttonTouchBarItemWithIdentifier:title:image:target:action:)] pub unsafe fn buttonTouchBarItemWithIdentifier_title_image_target_action( identifier: &NSTouchBarItemIdentifier, @@ -33,32 +40,46 @@ extern_methods!( target: Option<&Object>, action: Option, ) -> Id; + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(bezelColor)] pub unsafe fn bezelColor(&self) -> Option>; + #[method(setBezelColor:)] pub unsafe fn setBezelColor(&self, bezelColor: Option<&NSColor>); + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method_id(customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); } diff --git a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs index fc99dab36..9b1039042 100644 --- a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs @@ -1,32 +1,41 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCIImageRep; + unsafe impl ClassType for NSCIImageRep { type Super = NSImageRep; } ); + extern_methods!( unsafe impl NSCIImageRep { #[method_id(imageRepWithCIImage:)] pub unsafe fn imageRepWithCIImage(image: &CIImage) -> Id; + #[method_id(initWithCIImage:)] pub unsafe fn initWithCIImage(&self, image: &CIImage) -> Id; + #[method_id(CIImage)] pub unsafe fn CIImage(&self) -> Id; } ); + extern_methods!( - #[doc = "NSAppKitAdditions"] + /// NSAppKitAdditions unsafe impl CIImage { #[method_id(initWithBitmapImageRep:)] pub unsafe fn initWithBitmapImageRep( &self, bitmapImageRep: &NSBitmapImageRep, ) -> Option>; + #[method(drawInRect:fromRect:operation:fraction:)] pub unsafe fn drawInRect_fromRect_operation_fraction( &self, @@ -35,6 +44,7 @@ extern_methods!( op: NSCompositingOperation, delta: CGFloat, ); + #[method(drawAtPoint:fromRect:operation:fraction:)] pub unsafe fn drawAtPoint_fromRect_operation_fraction( &self, diff --git a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs index 8ac8933be..96703e6a5 100644 --- a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCachedImageRep; + unsafe impl ClassType for NSCachedImageRep { type Super = NSImageRep; } ); + extern_methods!( unsafe impl NSCachedImageRep { #[method_id(initWithWindow:rect:)] @@ -17,6 +22,7 @@ extern_methods!( win: Option<&NSWindow>, rect: NSRect, ) -> Option>; + #[method_id(initWithSize:depth:separate:alpha:)] pub unsafe fn initWithSize_depth_separate_alpha( &self, @@ -25,8 +31,10 @@ extern_methods!( flag: bool, alpha: bool, ) -> Option>; + #[method_id(window)] pub unsafe fn window(&self) -> Option>; + #[method(rect)] pub unsafe fn rect(&self) -> NSRect; } diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index be67be7ef..2a70da17a 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -1,52 +1,72 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSCandidateListTouchBarItem; + unsafe impl ClassType for NSCandidateListTouchBarItem { type Super = NSTouchBarItem; } ); + extern_methods!( unsafe impl NSCandidateListTouchBarItem { #[method_id(client)] pub unsafe fn client(&self) -> Option>; + #[method(setClient:)] pub unsafe fn setClient(&self, client: Option<&TodoProtocols>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSCandidateListTouchBarItemDelegate>); + #[method(isCollapsed)] pub unsafe fn isCollapsed(&self) -> bool; + #[method(setCollapsed:)] pub unsafe fn setCollapsed(&self, collapsed: bool); + #[method(allowsCollapsing)] pub unsafe fn allowsCollapsing(&self) -> bool; + #[method(setAllowsCollapsing:)] pub unsafe fn setAllowsCollapsing(&self, allowsCollapsing: bool); + #[method(isCandidateListVisible)] pub unsafe fn isCandidateListVisible(&self) -> bool; + #[method(updateWithInsertionPointVisibility:)] pub unsafe fn updateWithInsertionPointVisibility(&self, isVisible: bool); + #[method(allowsTextInputContextCandidates)] pub unsafe fn allowsTextInputContextCandidates(&self) -> bool; + #[method(setAllowsTextInputContextCandidates:)] pub unsafe fn setAllowsTextInputContextCandidates( &self, allowsTextInputContextCandidates: bool, ); + #[method(attributedStringForCandidate)] pub unsafe fn attributedStringForCandidate(&self) -> TodoBlock; + #[method(setAttributedStringForCandidate:)] pub unsafe fn setAttributedStringForCandidate( &self, attributedStringForCandidate: TodoBlock, ); + #[method_id(candidates)] pub unsafe fn candidates(&self) -> Id, Shared>; + #[method(setCandidates:forSelectedRange:inString:)] pub unsafe fn setCandidates_forSelectedRange_inString( &self, @@ -54,15 +74,19 @@ extern_methods!( selectedRange: NSRange, originalString: Option<&NSString>, ); + #[method_id(customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); } ); + pub type NSCandidateListTouchBarItemDelegate = NSObject; + extern_methods!( - #[doc = "NSCandidateListTouchBarItem"] + /// NSCandidateListTouchBarItem unsafe impl NSView { #[method_id(candidateListTouchBarItem)] pub unsafe fn candidateListTouchBarItem( diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index e5b9b9792..9b2f1f54a 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -1,189 +1,279 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSControlStateValue = NSInteger; + extern_class!( #[derive(Debug)] pub struct NSCell; + unsafe impl ClassType for NSCell { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCell { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initTextCell:)] pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initImageCell:)] pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(prefersTrackingUntilMouseUp)] pub unsafe fn prefersTrackingUntilMouseUp() -> bool; + #[method_id(controlView)] pub unsafe fn controlView(&self) -> Option>; + #[method(setControlView:)] pub unsafe fn setControlView(&self, controlView: Option<&NSView>); + #[method(type)] pub unsafe fn type_(&self) -> NSCellType; + #[method(setType:)] pub unsafe fn setType(&self, type_: NSCellType); + #[method(state)] pub unsafe fn state(&self) -> NSControlStateValue; + #[method(setState:)] pub unsafe fn setState(&self, state: NSControlStateValue); + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method(sendActionOn:)] pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; + #[method(isContinuous)] pub unsafe fn isContinuous(&self) -> bool; + #[method(setContinuous:)] pub unsafe fn setContinuous(&self, continuous: bool); + #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[method(isSelectable)] pub unsafe fn isSelectable(&self) -> bool; + #[method(setSelectable:)] pub unsafe fn setSelectable(&self, selectable: bool); + #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[method(isBezeled)] pub unsafe fn isBezeled(&self) -> bool; + #[method(setBezeled:)] pub unsafe fn setBezeled(&self, bezeled: bool); + #[method(isScrollable)] pub unsafe fn isScrollable(&self) -> bool; + #[method(setScrollable:)] pub unsafe fn setScrollable(&self, scrollable: bool); + #[method(isHighlighted)] pub unsafe fn isHighlighted(&self) -> bool; + #[method(setHighlighted:)] pub unsafe fn setHighlighted(&self, highlighted: bool); + #[method(alignment)] pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(setAlignment:)] pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[method(wraps)] pub unsafe fn wraps(&self) -> bool; + #[method(setWraps:)] pub unsafe fn setWraps(&self, wraps: bool); + #[method_id(font)] pub unsafe fn font(&self) -> Option>; + #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[method_id(keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; + #[method_id(formatter)] pub unsafe fn formatter(&self) -> Option>; + #[method(setFormatter:)] pub unsafe fn setFormatter(&self, formatter: Option<&NSFormatter>); + #[method_id(objectValue)] pub unsafe fn objectValue(&self) -> Option>; + #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); + #[method(hasValidObjectValue)] pub unsafe fn hasValidObjectValue(&self) -> bool; + #[method_id(stringValue)] pub unsafe fn stringValue(&self) -> Id; + #[method(setStringValue:)] pub unsafe fn setStringValue(&self, stringValue: &NSString); + #[method(compare:)] pub unsafe fn compare(&self, otherCell: &Object) -> NSComparisonResult; + #[method(intValue)] pub unsafe fn intValue(&self) -> c_int; + #[method(setIntValue:)] pub unsafe fn setIntValue(&self, intValue: c_int); + #[method(floatValue)] pub unsafe fn floatValue(&self) -> c_float; + #[method(setFloatValue:)] pub unsafe fn setFloatValue(&self, floatValue: c_float); + #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[method(setDoubleValue:)] pub unsafe fn setDoubleValue(&self, doubleValue: c_double); + #[method(integerValue)] pub unsafe fn integerValue(&self) -> NSInteger; + #[method(setIntegerValue:)] pub unsafe fn setIntegerValue(&self, integerValue: NSInteger); + #[method(takeIntValueFrom:)] pub unsafe fn takeIntValueFrom(&self, sender: Option<&Object>); + #[method(takeFloatValueFrom:)] pub unsafe fn takeFloatValueFrom(&self, sender: Option<&Object>); + #[method(takeDoubleValueFrom:)] pub unsafe fn takeDoubleValueFrom(&self, sender: Option<&Object>); + #[method(takeStringValueFrom:)] pub unsafe fn takeStringValueFrom(&self, sender: Option<&Object>); + #[method(takeObjectValueFrom:)] pub unsafe fn takeObjectValueFrom(&self, sender: Option<&Object>); + #[method(takeIntegerValueFrom:)] pub unsafe fn takeIntegerValueFrom(&self, sender: Option<&Object>); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; + #[method(setControlSize:)] pub unsafe fn setControlSize(&self, controlSize: NSControlSize); + #[method_id(representedObject)] pub unsafe fn representedObject(&self) -> Option>; + #[method(setRepresentedObject:)] pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>); + #[method(cellAttribute:)] pub unsafe fn cellAttribute(&self, parameter: NSCellAttribute) -> NSInteger; + #[method(setCellAttribute:to:)] pub unsafe fn setCellAttribute_to(&self, parameter: NSCellAttribute, value: NSInteger); + #[method(imageRectForBounds:)] pub unsafe fn imageRectForBounds(&self, rect: NSRect) -> NSRect; + #[method(titleRectForBounds:)] pub unsafe fn titleRectForBounds(&self, rect: NSRect) -> NSRect; + #[method(drawingRectForBounds:)] pub unsafe fn drawingRectForBounds(&self, rect: NSRect) -> NSRect; + #[method(cellSize)] pub unsafe fn cellSize(&self) -> NSSize; + #[method(cellSizeForBounds:)] pub unsafe fn cellSizeForBounds(&self, rect: NSRect) -> NSSize; + #[method_id(highlightColorWithFrame:inView:)] pub unsafe fn highlightColorWithFrame_inView( &self, cellFrame: NSRect, controlView: &NSView, ) -> Option>; + #[method(calcDrawInfo:)] pub unsafe fn calcDrawInfo(&self, rect: NSRect); + #[method_id(setUpFieldEditorAttributes:)] pub unsafe fn setUpFieldEditorAttributes(&self, textObj: &NSText) -> Id; + #[method(drawInteriorWithFrame:inView:)] pub unsafe fn drawInteriorWithFrame_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method(drawWithFrame:inView:)] pub unsafe fn drawWithFrame_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method(highlight:withFrame:inView:)] pub unsafe fn highlight_withFrame_inView( &self, @@ -191,20 +281,24 @@ extern_methods!( cellFrame: NSRect, controlView: &NSView, ); + #[method(mouseDownFlags)] pub unsafe fn mouseDownFlags(&self) -> NSInteger; + #[method(getPeriodicDelay:interval:)] pub unsafe fn getPeriodicDelay_interval( &self, delay: NonNull, interval: NonNull, ); + #[method(startTrackingAt:inView:)] pub unsafe fn startTrackingAt_inView( &self, startPoint: NSPoint, controlView: &NSView, ) -> bool; + #[method(continueTracking:at:inView:)] pub unsafe fn continueTracking_at_inView( &self, @@ -212,6 +306,7 @@ extern_methods!( currentPoint: NSPoint, controlView: &NSView, ) -> bool; + #[method(stopTracking:at:inView:mouseIsUp:)] pub unsafe fn stopTracking_at_inView_mouseIsUp( &self, @@ -220,6 +315,7 @@ extern_methods!( controlView: &NSView, flag: bool, ); + #[method(trackMouse:inRect:ofView:untilMouseUp:)] pub unsafe fn trackMouse_inRect_ofView_untilMouseUp( &self, @@ -228,6 +324,7 @@ extern_methods!( controlView: &NSView, flag: bool, ) -> bool; + #[method(editWithFrame:inView:editor:delegate:event:)] pub unsafe fn editWithFrame_inView_editor_delegate_event( &self, @@ -237,6 +334,7 @@ extern_methods!( delegate: Option<&Object>, event: Option<&NSEvent>, ); + #[method(selectWithFrame:inView:editor:delegate:start:length:)] pub unsafe fn selectWithFrame_inView_editor_delegate_start_length( &self, @@ -247,14 +345,19 @@ extern_methods!( selStart: NSInteger, selLength: NSInteger, ); + #[method(endEditing:)] pub unsafe fn endEditing(&self, textObj: &NSText); + #[method(resetCursorRect:inView:)] pub unsafe fn resetCursorRect_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method_id(menu)] pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method_id(menuForEvent:inRect:ofView:)] pub unsafe fn menuForEvent_inRect_ofView( &self, @@ -262,44 +365,61 @@ extern_methods!( cellFrame: NSRect, view: &NSView, ) -> Option>; + #[method_id(defaultMenu)] pub unsafe fn defaultMenu() -> Option>; + #[method(sendsActionOnEndEditing)] pub unsafe fn sendsActionOnEndEditing(&self) -> bool; + #[method(setSendsActionOnEndEditing:)] pub unsafe fn setSendsActionOnEndEditing(&self, sendsActionOnEndEditing: bool); + #[method(baseWritingDirection)] pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[method(setBaseWritingDirection:)] pub unsafe fn setBaseWritingDirection(&self, baseWritingDirection: NSWritingDirection); + #[method(lineBreakMode)] pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[method(setLineBreakMode:)] pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode); + #[method(allowsUndo)] pub unsafe fn allowsUndo(&self) -> bool; + #[method(setAllowsUndo:)] pub unsafe fn setAllowsUndo(&self, allowsUndo: bool); + #[method(truncatesLastVisibleLine)] pub unsafe fn truncatesLastVisibleLine(&self) -> bool; + #[method(setTruncatesLastVisibleLine:)] pub unsafe fn setTruncatesLastVisibleLine(&self, truncatesLastVisibleLine: bool); + #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setUserInterfaceLayoutDirection:)] pub unsafe fn setUserInterfaceLayoutDirection( &self, userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, ); + #[method_id(fieldEditorForView:)] pub unsafe fn fieldEditorForView( &self, controlView: &NSView, ) -> Option>; + #[method(usesSingleLineMode)] pub unsafe fn usesSingleLineMode(&self) -> bool; + #[method(setUsesSingleLineMode:)] pub unsafe fn setUsesSingleLineMode(&self, usesSingleLineMode: bool); + #[method_id(draggingImageComponentsWithFrame:inView:)] pub unsafe fn draggingImageComponentsWithFrame_inView( &self, @@ -308,75 +428,98 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSKeyboardUI"] + /// NSKeyboardUI unsafe impl NSCell { #[method(refusesFirstResponder)] pub unsafe fn refusesFirstResponder(&self) -> bool; + #[method(setRefusesFirstResponder:)] pub unsafe fn setRefusesFirstResponder(&self, refusesFirstResponder: bool); + #[method(acceptsFirstResponder)] pub unsafe fn acceptsFirstResponder(&self) -> bool; + #[method(showsFirstResponder)] pub unsafe fn showsFirstResponder(&self) -> bool; + #[method(setShowsFirstResponder:)] pub unsafe fn setShowsFirstResponder(&self, showsFirstResponder: bool); + #[method(performClick:)] pub unsafe fn performClick(&self, sender: Option<&Object>); + #[method(focusRingType)] pub unsafe fn focusRingType(&self) -> NSFocusRingType; + #[method(setFocusRingType:)] pub unsafe fn setFocusRingType(&self, focusRingType: NSFocusRingType); + #[method(defaultFocusRingType)] pub unsafe fn defaultFocusRingType() -> NSFocusRingType; + #[method(drawFocusRingMaskWithFrame:inView:)] pub unsafe fn drawFocusRingMaskWithFrame_inView( &self, cellFrame: NSRect, controlView: &NSView, ); + #[method(focusRingMaskBoundsForFrame:inView:)] pub unsafe fn focusRingMaskBoundsForFrame_inView( &self, cellFrame: NSRect, controlView: &NSView, ) -> NSRect; + #[method(wantsNotificationForMarkedText)] pub unsafe fn wantsNotificationForMarkedText(&self) -> bool; } ); + extern_methods!( - #[doc = "NSCellAttributedStringMethods"] + /// NSCellAttributedStringMethods unsafe impl NSCell { #[method_id(attributedStringValue)] pub unsafe fn attributedStringValue(&self) -> Id; + #[method(setAttributedStringValue:)] pub unsafe fn setAttributedStringValue(&self, attributedStringValue: &NSAttributedString); + #[method(allowsEditingTextAttributes)] pub unsafe fn allowsEditingTextAttributes(&self) -> bool; + #[method(setAllowsEditingTextAttributes:)] pub unsafe fn setAllowsEditingTextAttributes(&self, allowsEditingTextAttributes: bool); + #[method(importsGraphics)] pub unsafe fn importsGraphics(&self) -> bool; + #[method(setImportsGraphics:)] pub unsafe fn setImportsGraphics(&self, importsGraphics: bool); } ); + extern_methods!( - #[doc = "NSCellMixedState"] + /// NSCellMixedState unsafe impl NSCell { #[method(allowsMixedState)] pub unsafe fn allowsMixedState(&self) -> bool; + #[method(setAllowsMixedState:)] pub unsafe fn setAllowsMixedState(&self, allowsMixedState: bool); + #[method(nextState)] pub unsafe fn nextState(&self) -> NSInteger; + #[method(setNextState)] pub unsafe fn setNextState(&self); } ); + extern_methods!( - #[doc = "NSCellHitTest"] + /// NSCellHitTest unsafe impl NSCell { #[method(hitTestForEvent:inRect:ofView:)] pub unsafe fn hitTestForEvent_inRect_ofView( @@ -387,8 +530,9 @@ extern_methods!( ) -> NSCellHitResult; } ); + extern_methods!( - #[doc = "NSCellExpansion"] + /// NSCellExpansion unsafe impl NSCell { #[method(expansionFrameWithFrame:inView:)] pub unsafe fn expansionFrameWithFrame_inView( @@ -396,34 +540,44 @@ extern_methods!( cellFrame: NSRect, view: &NSView, ) -> NSRect; + #[method(drawWithExpansionFrame:inView:)] pub unsafe fn drawWithExpansionFrame_inView(&self, cellFrame: NSRect, view: &NSView); } ); + extern_methods!( - #[doc = "NSCellBackgroundStyle"] + /// NSCellBackgroundStyle unsafe impl NSCell { #[method(backgroundStyle)] pub unsafe fn backgroundStyle(&self) -> NSBackgroundStyle; + #[method(setBackgroundStyle:)] pub unsafe fn setBackgroundStyle(&self, backgroundStyle: NSBackgroundStyle); + #[method(interiorBackgroundStyle)] pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSCell { #[method(controlTint)] pub unsafe fn controlTint(&self) -> NSControlTint; + #[method(setControlTint:)] pub unsafe fn setControlTint(&self, controlTint: NSControlTint); + #[method(entryType)] pub unsafe fn entryType(&self) -> NSInteger; + #[method(setEntryType:)] pub unsafe fn setEntryType(&self, type_: NSInteger); + #[method(isEntryAcceptable:)] pub unsafe fn isEntryAcceptable(&self, string: &NSString) -> bool; + #[method(setFloatingPointFormat:left:right:)] pub unsafe fn setFloatingPointFormat_left_right( &self, @@ -431,14 +585,19 @@ extern_methods!( leftDigits: NSUInteger, rightDigits: NSUInteger, ); + #[method(setMnemonicLocation:)] pub unsafe fn setMnemonicLocation(&self, location: NSUInteger); + #[method(mnemonicLocation)] pub unsafe fn mnemonicLocation(&self) -> NSUInteger; + #[method_id(mnemonic)] pub unsafe fn mnemonic(&self) -> Id; + #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: &NSString); } ); + pub type NSCellStateValue = NSControlStateValue; diff --git a/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs index 1a785a1f8..9a586d3ca 100644 --- a/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs @@ -1,26 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSClickGestureRecognizer; + unsafe impl ClassType for NSClickGestureRecognizer { type Super = NSGestureRecognizer; } ); + extern_methods!( unsafe impl NSClickGestureRecognizer { #[method(buttonMask)] pub unsafe fn buttonMask(&self) -> NSUInteger; + #[method(setButtonMask:)] pub unsafe fn setButtonMask(&self, buttonMask: NSUInteger); + #[method(numberOfClicksRequired)] pub unsafe fn numberOfClicksRequired(&self) -> NSInteger; + #[method(setNumberOfClicksRequired:)] pub unsafe fn setNumberOfClicksRequired(&self, numberOfClicksRequired: NSInteger); + #[method(numberOfTouchesRequired)] pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger; + #[method(setNumberOfTouchesRequired:)] pub unsafe fn setNumberOfTouchesRequired(&self, numberOfTouchesRequired: NSInteger); } diff --git a/crates/icrate/src/generated/AppKit/NSClipView.rs b/crates/icrate/src/generated/AppKit/NSClipView.rs index b5f215890..c635d2a2c 100644 --- a/crates/icrate/src/generated/AppKit/NSClipView.rs +++ b/crates/icrate/src/generated/AppKit/NSClipView.rs @@ -1,52 +1,75 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSClipView; + unsafe impl ClassType for NSClipView { type Super = NSView; } ); + extern_methods!( unsafe impl NSClipView { #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(documentView)] pub unsafe fn documentView(&self) -> Option>; + #[method(setDocumentView:)] pub unsafe fn setDocumentView(&self, documentView: Option<&NSView>); + #[method(documentRect)] pub unsafe fn documentRect(&self) -> NSRect; + #[method_id(documentCursor)] pub unsafe fn documentCursor(&self) -> Option>; + #[method(setDocumentCursor:)] pub unsafe fn setDocumentCursor(&self, documentCursor: Option<&NSCursor>); + #[method(documentVisibleRect)] pub unsafe fn documentVisibleRect(&self) -> NSRect; + #[method(viewFrameChanged:)] pub unsafe fn viewFrameChanged(&self, notification: &NSNotification); + #[method(viewBoundsChanged:)] pub unsafe fn viewBoundsChanged(&self, notification: &NSNotification); + #[method(autoscroll:)] pub unsafe fn autoscroll(&self, event: &NSEvent) -> bool; + #[method(scrollToPoint:)] pub unsafe fn scrollToPoint(&self, newOrigin: NSPoint); + #[method(constrainBoundsRect:)] pub unsafe fn constrainBoundsRect(&self, proposedBounds: NSRect) -> NSRect; + #[method(contentInsets)] pub unsafe fn contentInsets(&self) -> NSEdgeInsets; + #[method(setContentInsets:)] pub unsafe fn setContentInsets(&self, contentInsets: NSEdgeInsets); + #[method(automaticallyAdjustsContentInsets)] pub unsafe fn automaticallyAdjustsContentInsets(&self) -> bool; + #[method(setAutomaticallyAdjustsContentInsets:)] pub unsafe fn setAutomaticallyAdjustsContentInsets( &self, @@ -54,21 +77,26 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSClipViewSuperview"] + /// NSClipViewSuperview unsafe impl NSView { #[method(reflectScrolledClipView:)] pub unsafe fn reflectScrolledClipView(&self, clipView: &NSClipView); + #[method(scrollClipView:toPoint:)] pub unsafe fn scrollClipView_toPoint(&self, clipView: &NSClipView, point: NSPoint); } ); + extern_methods!( unsafe impl NSClipView { #[method(constrainScrollPoint:)] pub unsafe fn constrainScrollPoint(&self, newOrigin: NSPoint) -> NSPoint; + #[method(copiesOnScroll)] pub unsafe fn copiesOnScroll(&self) -> bool; + #[method(setCopiesOnScroll:)] pub unsafe fn setCopiesOnScroll(&self, copiesOnScroll: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs index 860b3897b..ae47825f7 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionView.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionView.rs @@ -1,164 +1,224 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSCollectionViewSupplementaryElementKind = NSString; + pub type NSCollectionViewElement = NSObject; + pub type NSCollectionViewSectionHeaderView = NSObject; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewItem; + unsafe impl ClassType for NSCollectionViewItem { type Super = NSViewController; } ); + extern_methods!( unsafe impl NSCollectionViewItem { #[method_id(collectionView)] pub unsafe fn collectionView(&self) -> Option>; + #[method(isSelected)] pub unsafe fn isSelected(&self) -> bool; + #[method(setSelected:)] pub unsafe fn setSelected(&self, selected: bool); + #[method(highlightState)] pub unsafe fn highlightState(&self) -> NSCollectionViewItemHighlightState; + #[method(setHighlightState:)] pub unsafe fn setHighlightState(&self, highlightState: NSCollectionViewItemHighlightState); + #[method_id(imageView)] pub unsafe fn imageView(&self) -> Option>; + #[method(setImageView:)] pub unsafe fn setImageView(&self, imageView: Option<&NSImageView>); + #[method_id(textField)] pub unsafe fn textField(&self) -> Option>; + #[method(setTextField:)] pub unsafe fn setTextField(&self, textField: Option<&NSTextField>); + #[method_id(draggingImageComponents)] pub unsafe fn draggingImageComponents( &self, ) -> Id, Shared>; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionView; + unsafe impl ClassType for NSCollectionView { type Super = NSView; } ); + extern_methods!( unsafe impl NSCollectionView { #[method_id(dataSource)] pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] pub unsafe fn setDataSource(&self, dataSource: Option<&NSCollectionViewDataSource>); + #[method_id(prefetchDataSource)] pub unsafe fn prefetchDataSource(&self) -> Option>; + #[method(setPrefetchDataSource:)] pub unsafe fn setPrefetchDataSource( &self, prefetchDataSource: Option<&NSCollectionViewPrefetching>, ); + #[method_id(content)] pub unsafe fn content(&self) -> Id, Shared>; + #[method(setContent:)] pub unsafe fn setContent(&self, content: &NSArray); + #[method(reloadData)] pub unsafe fn reloadData(&self); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSCollectionViewDelegate>); + #[method_id(backgroundView)] pub unsafe fn backgroundView(&self) -> Option>; + #[method(setBackgroundView:)] pub unsafe fn setBackgroundView(&self, backgroundView: Option<&NSView>); + #[method(backgroundViewScrollsWithContent)] pub unsafe fn backgroundViewScrollsWithContent(&self) -> bool; + #[method(setBackgroundViewScrollsWithContent:)] pub unsafe fn setBackgroundViewScrollsWithContent( &self, backgroundViewScrollsWithContent: bool, ); + #[method_id(collectionViewLayout)] pub unsafe fn collectionViewLayout(&self) -> Option>; + #[method(setCollectionViewLayout:)] pub unsafe fn setCollectionViewLayout( &self, collectionViewLayout: Option<&NSCollectionViewLayout>, ); + #[method_id(layoutAttributesForItemAtIndexPath:)] pub unsafe fn layoutAttributesForItemAtIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; + #[method_id(layoutAttributesForSupplementaryElementOfKind:atIndexPath:)] pub unsafe fn layoutAttributesForSupplementaryElementOfKind_atIndexPath( &self, kind: &NSCollectionViewSupplementaryElementKind, indexPath: &NSIndexPath, ) -> Option>; + #[method(frameForItemAtIndex:)] pub unsafe fn frameForItemAtIndex(&self, index: NSUInteger) -> NSRect; + #[method(frameForItemAtIndex:withNumberOfItems:)] pub unsafe fn frameForItemAtIndex_withNumberOfItems( &self, index: NSUInteger, numberOfItems: NSUInteger, ) -> NSRect; + #[method_id(backgroundColors)] pub unsafe fn backgroundColors(&self) -> Id, Shared>; + #[method(setBackgroundColors:)] pub unsafe fn setBackgroundColors(&self, backgroundColors: Option<&NSArray>); + #[method(numberOfSections)] pub unsafe fn numberOfSections(&self) -> NSInteger; + #[method(numberOfItemsInSection:)] pub unsafe fn numberOfItemsInSection(&self, section: NSInteger) -> NSInteger; + #[method(isFirstResponder)] pub unsafe fn isFirstResponder(&self) -> bool; + #[method(isSelectable)] pub unsafe fn isSelectable(&self) -> bool; + #[method(setSelectable:)] pub unsafe fn setSelectable(&self, selectable: bool); + #[method(allowsEmptySelection)] pub unsafe fn allowsEmptySelection(&self) -> bool; + #[method(setAllowsEmptySelection:)] pub unsafe fn setAllowsEmptySelection(&self, allowsEmptySelection: bool); + #[method(allowsMultipleSelection)] pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[method(setAllowsMultipleSelection:)] pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool); + #[method_id(selectionIndexes)] pub unsafe fn selectionIndexes(&self) -> Id; + #[method(setSelectionIndexes:)] pub unsafe fn setSelectionIndexes(&self, selectionIndexes: &NSIndexSet); + #[method_id(selectionIndexPaths)] pub unsafe fn selectionIndexPaths(&self) -> Id, Shared>; + #[method(setSelectionIndexPaths:)] pub unsafe fn setSelectionIndexPaths(&self, selectionIndexPaths: &NSSet); + #[method(selectItemsAtIndexPaths:scrollPosition:)] pub unsafe fn selectItemsAtIndexPaths_scrollPosition( &self, indexPaths: &NSSet, scrollPosition: NSCollectionViewScrollPosition, ); + #[method(deselectItemsAtIndexPaths:)] pub unsafe fn deselectItemsAtIndexPaths(&self, indexPaths: &NSSet); + #[method(selectAll:)] pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[method(deselectAll:)] pub unsafe fn deselectAll(&self, sender: Option<&Object>); + #[method(registerClass:forItemWithIdentifier:)] pub unsafe fn registerClass_forItemWithIdentifier( &self, itemClass: Option<&Class>, identifier: &NSUserInterfaceItemIdentifier, ); + #[method(registerNib:forItemWithIdentifier:)] pub unsafe fn registerNib_forItemWithIdentifier( &self, nib: Option<&NSNib>, identifier: &NSUserInterfaceItemIdentifier, ); + #[method(registerClass:forSupplementaryViewOfKind:withIdentifier:)] pub unsafe fn registerClass_forSupplementaryViewOfKind_withIdentifier( &self, @@ -166,6 +226,7 @@ extern_methods!( kind: &NSCollectionViewSupplementaryElementKind, identifier: &NSUserInterfaceItemIdentifier, ); + #[method(registerNib:forSupplementaryViewOfKind:withIdentifier:)] pub unsafe fn registerNib_forSupplementaryViewOfKind_withIdentifier( &self, @@ -173,12 +234,14 @@ extern_methods!( kind: &NSCollectionViewSupplementaryElementKind, identifier: &NSUserInterfaceItemIdentifier, ); + #[method_id(makeItemWithIdentifier:forIndexPath:)] pub unsafe fn makeItemWithIdentifier_forIndexPath( &self, identifier: &NSUserInterfaceItemIdentifier, indexPath: &NSIndexPath, ) -> Id; + #[method_id(makeSupplementaryViewOfKind:withIdentifier:forIndexPath:)] pub unsafe fn makeSupplementaryViewOfKind_withIdentifier_forIndexPath( &self, @@ -186,86 +249,108 @@ extern_methods!( identifier: &NSUserInterfaceItemIdentifier, indexPath: &NSIndexPath, ) -> Id; + #[method_id(itemAtIndex:)] pub unsafe fn itemAtIndex( &self, index: NSUInteger, ) -> Option>; + #[method_id(itemAtIndexPath:)] pub unsafe fn itemAtIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; + #[method_id(visibleItems)] pub unsafe fn visibleItems(&self) -> Id, Shared>; + #[method_id(indexPathsForVisibleItems)] pub unsafe fn indexPathsForVisibleItems(&self) -> Id, Shared>; + #[method_id(indexPathForItem:)] pub unsafe fn indexPathForItem( &self, item: &NSCollectionViewItem, ) -> Option>; + #[method_id(indexPathForItemAtPoint:)] pub unsafe fn indexPathForItemAtPoint( &self, point: NSPoint, ) -> Option>; + #[method_id(supplementaryViewForElementKind:atIndexPath:)] pub unsafe fn supplementaryViewForElementKind_atIndexPath( &self, elementKind: &NSCollectionViewSupplementaryElementKind, indexPath: &NSIndexPath, ) -> Option>; + #[method_id(visibleSupplementaryViewsOfKind:)] pub unsafe fn visibleSupplementaryViewsOfKind( &self, elementKind: &NSCollectionViewSupplementaryElementKind, ) -> Id, Shared>; + #[method_id(indexPathsForVisibleSupplementaryElementsOfKind:)] pub unsafe fn indexPathsForVisibleSupplementaryElementsOfKind( &self, elementKind: &NSCollectionViewSupplementaryElementKind, ) -> Id, Shared>; + #[method(insertSections:)] pub unsafe fn insertSections(&self, sections: &NSIndexSet); + #[method(deleteSections:)] pub unsafe fn deleteSections(&self, sections: &NSIndexSet); + #[method(reloadSections:)] pub unsafe fn reloadSections(&self, sections: &NSIndexSet); + #[method(moveSection:toSection:)] pub unsafe fn moveSection_toSection(&self, section: NSInteger, newSection: NSInteger); + #[method(insertItemsAtIndexPaths:)] pub unsafe fn insertItemsAtIndexPaths(&self, indexPaths: &NSSet); + #[method(deleteItemsAtIndexPaths:)] pub unsafe fn deleteItemsAtIndexPaths(&self, indexPaths: &NSSet); + #[method(reloadItemsAtIndexPaths:)] pub unsafe fn reloadItemsAtIndexPaths(&self, indexPaths: &NSSet); + #[method(moveItemAtIndexPath:toIndexPath:)] pub unsafe fn moveItemAtIndexPath_toIndexPath( &self, indexPath: &NSIndexPath, newIndexPath: &NSIndexPath, ); + #[method(performBatchUpdates:completionHandler:)] pub unsafe fn performBatchUpdates_completionHandler( &self, updates: TodoBlock, completionHandler: TodoBlock, ); + #[method(toggleSectionCollapse:)] pub unsafe fn toggleSectionCollapse(&self, sender: &Object); + #[method(scrollToItemsAtIndexPaths:scrollPosition:)] pub unsafe fn scrollToItemsAtIndexPaths_scrollPosition( &self, indexPaths: &NSSet, scrollPosition: NSCollectionViewScrollPosition, ); + #[method(setDraggingSourceOperationMask:forLocal:)] pub unsafe fn setDraggingSourceOperationMask_forLocal( &self, dragOperationMask: NSDragOperation, localDestination: bool, ); + #[method_id(draggingImageForItemsAtIndexPaths:withEvent:offset:)] pub unsafe fn draggingImageForItemsAtIndexPaths_withEvent_offset( &self, @@ -273,6 +358,7 @@ extern_methods!( event: &NSEvent, dragImageOffset: NSPointPointer, ) -> Id; + #[method_id(draggingImageForItemsAtIndexes:withEvent:offset:)] pub unsafe fn draggingImageForItemsAtIndexes_withEvent_offset( &self, @@ -282,32 +368,41 @@ extern_methods!( ) -> Id; } ); + pub type NSCollectionViewDataSource = NSObject; + pub type NSCollectionViewPrefetching = NSObject; + pub type NSCollectionViewDelegate = NSObject; + extern_methods!( - #[doc = "NSCollectionViewAdditions"] + /// NSCollectionViewAdditions unsafe impl NSIndexPath { #[method_id(indexPathForItem:inSection:)] pub unsafe fn indexPathForItem_inSection( item: NSInteger, section: NSInteger, ) -> Id; + #[method(item)] pub unsafe fn item(&self) -> NSInteger; + #[method(section)] pub unsafe fn section(&self) -> NSInteger; } ); + extern_methods!( - #[doc = "NSCollectionViewAdditions"] + /// NSCollectionViewAdditions unsafe impl NSSet { #[method_id(setWithCollectionViewIndexPath:)] pub unsafe fn setWithCollectionViewIndexPath(indexPath: &NSIndexPath) -> Id; + #[method_id(setWithCollectionViewIndexPaths:)] pub unsafe fn setWithCollectionViewIndexPaths( indexPaths: &NSArray, ) -> Id; + #[method(enumerateIndexPathsWithOptions:usingBlock:)] pub unsafe fn enumerateIndexPathsWithOptions_usingBlock( &self, @@ -316,32 +411,43 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSCollectionView { #[method_id(newItemForRepresentedObject:)] pub unsafe fn newItemForRepresentedObject( &self, object: &Object, ) -> Id; + #[method_id(itemPrototype)] pub unsafe fn itemPrototype(&self) -> Option>; + #[method(setItemPrototype:)] pub unsafe fn setItemPrototype(&self, itemPrototype: Option<&NSCollectionViewItem>); + #[method(maxNumberOfRows)] pub unsafe fn maxNumberOfRows(&self) -> NSUInteger; + #[method(setMaxNumberOfRows:)] pub unsafe fn setMaxNumberOfRows(&self, maxNumberOfRows: NSUInteger); + #[method(maxNumberOfColumns)] pub unsafe fn maxNumberOfColumns(&self) -> NSUInteger; + #[method(setMaxNumberOfColumns:)] pub unsafe fn setMaxNumberOfColumns(&self, maxNumberOfColumns: NSUInteger); + #[method(minItemSize)] pub unsafe fn minItemSize(&self) -> NSSize; + #[method(setMinItemSize:)] pub unsafe fn setMinItemSize(&self, minItemSize: NSSize); + #[method(maxItemSize)] pub unsafe fn maxItemSize(&self) -> NSSize; + #[method(setMaxItemSize:)] pub unsafe fn setMaxItemSize(&self, maxItemSize: NSSize); } diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 872e252c3..855e42091 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -1,28 +1,38 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewCompositionalLayoutConfiguration; + unsafe impl ClassType for NSCollectionViewCompositionalLayoutConfiguration { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionViewCompositionalLayoutConfiguration { #[method(scrollDirection)] pub unsafe fn scrollDirection(&self) -> NSCollectionViewScrollDirection; + #[method(setScrollDirection:)] pub unsafe fn setScrollDirection(&self, scrollDirection: NSCollectionViewScrollDirection); + #[method(interSectionSpacing)] pub unsafe fn interSectionSpacing(&self) -> CGFloat; + #[method(setInterSectionSpacing:)] pub unsafe fn setInterSectionSpacing(&self, interSectionSpacing: CGFloat); + #[method_id(boundarySupplementaryItems)] pub unsafe fn boundarySupplementaryItems( &self, ) -> Id, Shared>; + #[method(setBoundarySupplementaryItems:)] pub unsafe fn setBoundarySupplementaryItems( &self, @@ -30,13 +40,16 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionViewCompositionalLayout; + unsafe impl ClassType for NSCollectionViewCompositionalLayout { type Super = NSCollectionViewLayout; } ); + extern_methods!( unsafe impl NSCollectionViewCompositionalLayout { #[method_id(initWithSection:)] @@ -44,31 +57,38 @@ extern_methods!( &self, section: &NSCollectionLayoutSection, ) -> Id; + #[method_id(initWithSection:configuration:)] pub unsafe fn initWithSection_configuration( &self, section: &NSCollectionLayoutSection, configuration: &NSCollectionViewCompositionalLayoutConfiguration, ) -> Id; + #[method_id(initWithSectionProvider:)] pub unsafe fn initWithSectionProvider( &self, sectionProvider: NSCollectionViewCompositionalLayoutSectionProvider, ) -> Id; + #[method_id(initWithSectionProvider:configuration:)] pub unsafe fn initWithSectionProvider_configuration( &self, sectionProvider: NSCollectionViewCompositionalLayoutSectionProvider, configuration: &NSCollectionViewCompositionalLayoutConfiguration, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(configuration)] pub unsafe fn configuration( &self, ) -> Id; + #[method(setConfiguration:)] pub unsafe fn setConfiguration( &self, @@ -76,67 +96,86 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutSection; + unsafe impl ClassType for NSCollectionLayoutSection { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionLayoutSection { #[method_id(sectionWithGroup:)] pub unsafe fn sectionWithGroup(group: &NSCollectionLayoutGroup) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method(contentInsets)] pub unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets; + #[method(setContentInsets:)] pub unsafe fn setContentInsets(&self, contentInsets: NSDirectionalEdgeInsets); + #[method(interGroupSpacing)] pub unsafe fn interGroupSpacing(&self) -> CGFloat; + #[method(setInterGroupSpacing:)] pub unsafe fn setInterGroupSpacing(&self, interGroupSpacing: CGFloat); + #[method(orthogonalScrollingBehavior)] pub unsafe fn orthogonalScrollingBehavior( &self, ) -> NSCollectionLayoutSectionOrthogonalScrollingBehavior; + #[method(setOrthogonalScrollingBehavior:)] pub unsafe fn setOrthogonalScrollingBehavior( &self, orthogonalScrollingBehavior: NSCollectionLayoutSectionOrthogonalScrollingBehavior, ); + #[method_id(boundarySupplementaryItems)] pub unsafe fn boundarySupplementaryItems( &self, ) -> Id, Shared>; + #[method(setBoundarySupplementaryItems:)] pub unsafe fn setBoundarySupplementaryItems( &self, boundarySupplementaryItems: &NSArray, ); + #[method(supplementariesFollowContentInsets)] pub unsafe fn supplementariesFollowContentInsets(&self) -> bool; + #[method(setSupplementariesFollowContentInsets:)] pub unsafe fn setSupplementariesFollowContentInsets( &self, supplementariesFollowContentInsets: bool, ); + #[method(visibleItemsInvalidationHandler)] pub unsafe fn visibleItemsInvalidationHandler( &self, ) -> NSCollectionLayoutSectionVisibleItemsInvalidationHandler; + #[method(setVisibleItemsInvalidationHandler:)] pub unsafe fn setVisibleItemsInvalidationHandler( &self, visibleItemsInvalidationHandler: NSCollectionLayoutSectionVisibleItemsInvalidationHandler, ); + #[method_id(decorationItems)] pub unsafe fn decorationItems( &self, ) -> Id, Shared>; + #[method(setDecorationItems:)] pub unsafe fn setDecorationItems( &self, @@ -144,75 +183,98 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutItem; + unsafe impl ClassType for NSCollectionLayoutItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionLayoutItem { #[method_id(itemWithLayoutSize:)] pub unsafe fn itemWithLayoutSize(layoutSize: &NSCollectionLayoutSize) -> Id; + #[method_id(itemWithLayoutSize:supplementaryItems:)] pub unsafe fn itemWithLayoutSize_supplementaryItems( layoutSize: &NSCollectionLayoutSize, supplementaryItems: &NSArray, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method(contentInsets)] pub unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets; + #[method(setContentInsets:)] pub unsafe fn setContentInsets(&self, contentInsets: NSDirectionalEdgeInsets); + #[method_id(edgeSpacing)] pub unsafe fn edgeSpacing(&self) -> Option>; + #[method(setEdgeSpacing:)] pub unsafe fn setEdgeSpacing(&self, edgeSpacing: Option<&NSCollectionLayoutEdgeSpacing>); + #[method_id(layoutSize)] pub unsafe fn layoutSize(&self) -> Id; + #[method_id(supplementaryItems)] pub unsafe fn supplementaryItems( &self, ) -> Id, Shared>; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutGroupCustomItem; + unsafe impl ClassType for NSCollectionLayoutGroupCustomItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionLayoutGroupCustomItem { #[method_id(customItemWithFrame:)] pub unsafe fn customItemWithFrame(frame: NSRect) -> Id; + #[method_id(customItemWithFrame:zIndex:)] pub unsafe fn customItemWithFrame_zIndex( frame: NSRect, zIndex: NSInteger, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[method(zIndex)] pub unsafe fn zIndex(&self) -> NSInteger; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutGroup; + unsafe impl ClassType for NSCollectionLayoutGroup { type Super = NSCollectionLayoutItem; } ); + extern_methods!( unsafe impl NSCollectionLayoutGroup { #[method_id(horizontalGroupWithLayoutSize:subitem:count:)] @@ -221,93 +283,121 @@ extern_methods!( subitem: &NSCollectionLayoutItem, count: NSInteger, ) -> Id; + #[method_id(horizontalGroupWithLayoutSize:subitems:)] pub unsafe fn horizontalGroupWithLayoutSize_subitems( layoutSize: &NSCollectionLayoutSize, subitems: &NSArray, ) -> Id; + #[method_id(verticalGroupWithLayoutSize:subitem:count:)] pub unsafe fn verticalGroupWithLayoutSize_subitem_count( layoutSize: &NSCollectionLayoutSize, subitem: &NSCollectionLayoutItem, count: NSInteger, ) -> Id; + #[method_id(verticalGroupWithLayoutSize:subitems:)] pub unsafe fn verticalGroupWithLayoutSize_subitems( layoutSize: &NSCollectionLayoutSize, subitems: &NSArray, ) -> Id; + #[method_id(customGroupWithLayoutSize:itemProvider:)] pub unsafe fn customGroupWithLayoutSize_itemProvider( layoutSize: &NSCollectionLayoutSize, itemProvider: NSCollectionLayoutGroupCustomItemProvider, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(supplementaryItems)] pub unsafe fn supplementaryItems( &self, ) -> Id, Shared>; + #[method(setSupplementaryItems:)] pub unsafe fn setSupplementaryItems( &self, supplementaryItems: &NSArray, ); + #[method_id(interItemSpacing)] pub unsafe fn interItemSpacing(&self) -> Option>; + #[method(setInterItemSpacing:)] pub unsafe fn setInterItemSpacing( &self, interItemSpacing: Option<&NSCollectionLayoutSpacing>, ); + #[method_id(subitems)] pub unsafe fn subitems(&self) -> Id, Shared>; + #[method_id(visualDescription)] pub unsafe fn visualDescription(&self) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutDimension; + unsafe impl ClassType for NSCollectionLayoutDimension { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionLayoutDimension { #[method_id(fractionalWidthDimension:)] pub unsafe fn fractionalWidthDimension(fractionalWidth: CGFloat) -> Id; + #[method_id(fractionalHeightDimension:)] pub unsafe fn fractionalHeightDimension(fractionalHeight: CGFloat) -> Id; + #[method_id(absoluteDimension:)] pub unsafe fn absoluteDimension(absoluteDimension: CGFloat) -> Id; + #[method_id(estimatedDimension:)] pub unsafe fn estimatedDimension(estimatedDimension: CGFloat) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method(isFractionalWidth)] pub unsafe fn isFractionalWidth(&self) -> bool; + #[method(isFractionalHeight)] pub unsafe fn isFractionalHeight(&self) -> bool; + #[method(isAbsolute)] pub unsafe fn isAbsolute(&self) -> bool; + #[method(isEstimated)] pub unsafe fn isEstimated(&self) -> bool; + #[method(dimension)] pub unsafe fn dimension(&self) -> CGFloat; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutSize; + unsafe impl ClassType for NSCollectionLayoutSize { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionLayoutSize { #[method_id(sizeWithWidthDimension:heightDimension:)] @@ -315,48 +405,64 @@ extern_methods!( width: &NSCollectionLayoutDimension, height: &NSCollectionLayoutDimension, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(widthDimension)] pub unsafe fn widthDimension(&self) -> Id; + #[method_id(heightDimension)] pub unsafe fn heightDimension(&self) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutSpacing; + unsafe impl ClassType for NSCollectionLayoutSpacing { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionLayoutSpacing { #[method_id(flexibleSpacing:)] pub unsafe fn flexibleSpacing(flexibleSpacing: CGFloat) -> Id; + #[method_id(fixedSpacing:)] pub unsafe fn fixedSpacing(fixedSpacing: CGFloat) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method(spacing)] pub unsafe fn spacing(&self) -> CGFloat; + #[method(isFlexibleSpacing)] pub unsafe fn isFlexibleSpacing(&self) -> bool; + #[method(isFixedSpacing)] pub unsafe fn isFixedSpacing(&self) -> bool; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutEdgeSpacing; + unsafe impl ClassType for NSCollectionLayoutEdgeSpacing { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionLayoutEdgeSpacing { #[method_id(spacingForLeading:top:trailing:bottom:)] @@ -366,27 +472,36 @@ extern_methods!( trailing: Option<&NSCollectionLayoutSpacing>, bottom: Option<&NSCollectionLayoutSpacing>, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(leading)] pub unsafe fn leading(&self) -> Option>; + #[method_id(top)] pub unsafe fn top(&self) -> Option>; + #[method_id(trailing)] pub unsafe fn trailing(&self) -> Option>; + #[method_id(bottom)] pub unsafe fn bottom(&self) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutSupplementaryItem; + unsafe impl ClassType for NSCollectionLayoutSupplementaryItem { type Super = NSCollectionLayoutItem; } ); + extern_methods!( unsafe impl NSCollectionLayoutSupplementaryItem { #[method_id(supplementaryItemWithLayoutSize:elementKind:containerAnchor:)] @@ -395,6 +510,7 @@ extern_methods!( elementKind: &NSString, containerAnchor: &NSCollectionLayoutAnchor, ) -> Id; + #[method_id(supplementaryItemWithLayoutSize:elementKind:containerAnchor:itemAnchor:)] pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor_itemAnchor( layoutSize: &NSCollectionLayoutSize, @@ -402,29 +518,39 @@ extern_methods!( containerAnchor: &NSCollectionLayoutAnchor, itemAnchor: &NSCollectionLayoutAnchor, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method(zIndex)] pub unsafe fn zIndex(&self) -> NSInteger; + #[method(setZIndex:)] pub unsafe fn setZIndex(&self, zIndex: NSInteger); + #[method_id(elementKind)] pub unsafe fn elementKind(&self) -> Id; + #[method_id(containerAnchor)] pub unsafe fn containerAnchor(&self) -> Id; + #[method_id(itemAnchor)] pub unsafe fn itemAnchor(&self) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutBoundarySupplementaryItem; + unsafe impl ClassType for NSCollectionLayoutBoundarySupplementaryItem { type Super = NSCollectionLayoutSupplementaryItem; } ); + extern_methods!( unsafe impl NSCollectionLayoutBoundarySupplementaryItem { #[method_id(boundarySupplementaryItemWithLayoutSize:elementKind:alignment:)] @@ -433,6 +559,7 @@ extern_methods!( elementKind: &NSString, alignment: NSRectAlignment, ) -> Id; + #[method_id(boundarySupplementaryItemWithLayoutSize:elementKind:alignment:absoluteOffset:)] pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment_absoluteOffset( layoutSize: &NSCollectionLayoutSize, @@ -440,84 +567,114 @@ extern_methods!( alignment: NSRectAlignment, absoluteOffset: NSPoint, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method(extendsBoundary)] pub unsafe fn extendsBoundary(&self) -> bool; + #[method(setExtendsBoundary:)] pub unsafe fn setExtendsBoundary(&self, extendsBoundary: bool); + #[method(pinToVisibleBounds)] pub unsafe fn pinToVisibleBounds(&self) -> bool; + #[method(setPinToVisibleBounds:)] pub unsafe fn setPinToVisibleBounds(&self, pinToVisibleBounds: bool); + #[method(alignment)] pub unsafe fn alignment(&self) -> NSRectAlignment; + #[method(offset)] pub unsafe fn offset(&self) -> NSPoint; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutDecorationItem; + unsafe impl ClassType for NSCollectionLayoutDecorationItem { type Super = NSCollectionLayoutItem; } ); + extern_methods!( unsafe impl NSCollectionLayoutDecorationItem { #[method_id(backgroundDecorationItemWithElementKind:)] pub unsafe fn backgroundDecorationItemWithElementKind( elementKind: &NSString, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method(zIndex)] pub unsafe fn zIndex(&self) -> NSInteger; + #[method(setZIndex:)] pub unsafe fn setZIndex(&self, zIndex: NSInteger); + #[method_id(elementKind)] pub unsafe fn elementKind(&self) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutAnchor; + unsafe impl ClassType for NSCollectionLayoutAnchor { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionLayoutAnchor { #[method_id(layoutAnchorWithEdges:)] pub unsafe fn layoutAnchorWithEdges(edges: NSDirectionalRectEdge) -> Id; + #[method_id(layoutAnchorWithEdges:absoluteOffset:)] pub unsafe fn layoutAnchorWithEdges_absoluteOffset( edges: NSDirectionalRectEdge, absoluteOffset: NSPoint, ) -> Id; + #[method_id(layoutAnchorWithEdges:fractionalOffset:)] pub unsafe fn layoutAnchorWithEdges_fractionalOffset( edges: NSDirectionalRectEdge, fractionalOffset: NSPoint, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method(edges)] pub unsafe fn edges(&self) -> NSDirectionalRectEdge; + #[method(offset)] pub unsafe fn offset(&self) -> NSPoint; + #[method(isAbsoluteOffset)] pub unsafe fn isAbsoluteOffset(&self) -> bool; + #[method(isFractionalOffset)] pub unsafe fn isFractionalOffset(&self) -> bool; } ); + pub type NSCollectionLayoutContainer = NSObject; + pub type NSCollectionLayoutEnvironment = NSObject; + pub type NSCollectionLayoutVisibleItem = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs index 90e42329b..e19838b64 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs @@ -1,25 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewFlowLayoutInvalidationContext; + unsafe impl ClassType for NSCollectionViewFlowLayoutInvalidationContext { type Super = NSCollectionViewLayoutInvalidationContext; } ); + extern_methods!( unsafe impl NSCollectionViewFlowLayoutInvalidationContext { #[method(invalidateFlowLayoutDelegateMetrics)] pub unsafe fn invalidateFlowLayoutDelegateMetrics(&self) -> bool; + #[method(setInvalidateFlowLayoutDelegateMetrics:)] pub unsafe fn setInvalidateFlowLayoutDelegateMetrics( &self, invalidateFlowLayoutDelegateMetrics: bool, ); + #[method(invalidateFlowLayoutAttributes)] pub unsafe fn invalidateFlowLayoutAttributes(&self) -> bool; + #[method(setInvalidateFlowLayoutAttributes:)] pub unsafe fn setInvalidateFlowLayoutAttributes( &self, @@ -27,66 +35,92 @@ extern_methods!( ); } ); + pub type NSCollectionViewDelegateFlowLayout = NSObject; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewFlowLayout; + unsafe impl ClassType for NSCollectionViewFlowLayout { type Super = NSCollectionViewLayout; } ); + extern_methods!( unsafe impl NSCollectionViewFlowLayout { #[method(minimumLineSpacing)] pub unsafe fn minimumLineSpacing(&self) -> CGFloat; + #[method(setMinimumLineSpacing:)] pub unsafe fn setMinimumLineSpacing(&self, minimumLineSpacing: CGFloat); + #[method(minimumInteritemSpacing)] pub unsafe fn minimumInteritemSpacing(&self) -> CGFloat; + #[method(setMinimumInteritemSpacing:)] pub unsafe fn setMinimumInteritemSpacing(&self, minimumInteritemSpacing: CGFloat); + #[method(itemSize)] pub unsafe fn itemSize(&self) -> NSSize; + #[method(setItemSize:)] pub unsafe fn setItemSize(&self, itemSize: NSSize); + #[method(estimatedItemSize)] pub unsafe fn estimatedItemSize(&self) -> NSSize; + #[method(setEstimatedItemSize:)] pub unsafe fn setEstimatedItemSize(&self, estimatedItemSize: NSSize); + #[method(scrollDirection)] pub unsafe fn scrollDirection(&self) -> NSCollectionViewScrollDirection; + #[method(setScrollDirection:)] pub unsafe fn setScrollDirection(&self, scrollDirection: NSCollectionViewScrollDirection); + #[method(headerReferenceSize)] pub unsafe fn headerReferenceSize(&self) -> NSSize; + #[method(setHeaderReferenceSize:)] pub unsafe fn setHeaderReferenceSize(&self, headerReferenceSize: NSSize); + #[method(footerReferenceSize)] pub unsafe fn footerReferenceSize(&self) -> NSSize; + #[method(setFooterReferenceSize:)] pub unsafe fn setFooterReferenceSize(&self, footerReferenceSize: NSSize); + #[method(sectionInset)] pub unsafe fn sectionInset(&self) -> NSEdgeInsets; + #[method(setSectionInset:)] pub unsafe fn setSectionInset(&self, sectionInset: NSEdgeInsets); + #[method(sectionHeadersPinToVisibleBounds)] pub unsafe fn sectionHeadersPinToVisibleBounds(&self) -> bool; + #[method(setSectionHeadersPinToVisibleBounds:)] pub unsafe fn setSectionHeadersPinToVisibleBounds( &self, sectionHeadersPinToVisibleBounds: bool, ); + #[method(sectionFootersPinToVisibleBounds)] pub unsafe fn sectionFootersPinToVisibleBounds(&self) -> bool; + #[method(setSectionFootersPinToVisibleBounds:)] pub unsafe fn setSectionFootersPinToVisibleBounds( &self, sectionFootersPinToVisibleBounds: bool, ); + #[method(sectionAtIndexIsCollapsed:)] pub unsafe fn sectionAtIndexIsCollapsed(&self, sectionIndex: NSUInteger) -> bool; + #[method(collapseSectionAtIndex:)] pub unsafe fn collapseSectionAtIndex(&self, sectionIndex: NSUInteger); + #[method(expandSectionAtIndex:)] pub unsafe fn expandSectionAtIndex(&self, sectionIndex: NSUInteger); } diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs index d558f1ea4..45255eee7 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs @@ -1,46 +1,66 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewGridLayout; + unsafe impl ClassType for NSCollectionViewGridLayout { type Super = NSCollectionViewLayout; } ); + extern_methods!( unsafe impl NSCollectionViewGridLayout { #[method(margins)] pub unsafe fn margins(&self) -> NSEdgeInsets; + #[method(setMargins:)] pub unsafe fn setMargins(&self, margins: NSEdgeInsets); + #[method(minimumInteritemSpacing)] pub unsafe fn minimumInteritemSpacing(&self) -> CGFloat; + #[method(setMinimumInteritemSpacing:)] pub unsafe fn setMinimumInteritemSpacing(&self, minimumInteritemSpacing: CGFloat); + #[method(minimumLineSpacing)] pub unsafe fn minimumLineSpacing(&self) -> CGFloat; + #[method(setMinimumLineSpacing:)] pub unsafe fn setMinimumLineSpacing(&self, minimumLineSpacing: CGFloat); + #[method(maximumNumberOfRows)] pub unsafe fn maximumNumberOfRows(&self) -> NSUInteger; + #[method(setMaximumNumberOfRows:)] pub unsafe fn setMaximumNumberOfRows(&self, maximumNumberOfRows: NSUInteger); + #[method(maximumNumberOfColumns)] pub unsafe fn maximumNumberOfColumns(&self) -> NSUInteger; + #[method(setMaximumNumberOfColumns:)] pub unsafe fn setMaximumNumberOfColumns(&self, maximumNumberOfColumns: NSUInteger); + #[method(minimumItemSize)] pub unsafe fn minimumItemSize(&self) -> NSSize; + #[method(setMinimumItemSize:)] pub unsafe fn setMinimumItemSize(&self, minimumItemSize: NSSize); + #[method(maximumItemSize)] pub unsafe fn maximumItemSize(&self) -> NSSize; + #[method(setMaximumItemSize:)] pub unsafe fn setMaximumItemSize(&self, maximumItemSize: NSSize); + #[method_id(backgroundColors)] pub unsafe fn backgroundColors(&self) -> Id, Shared>; + #[method(setBackgroundColors:)] pub unsafe fn setBackgroundColors(&self, backgroundColors: Option<&NSArray>); } diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs index 6433c7c3d..65ef919f9 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -1,58 +1,81 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSCollectionViewDecorationElementKind = NSString; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewLayoutAttributes; + unsafe impl ClassType for NSCollectionViewLayoutAttributes { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionViewLayoutAttributes { #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[method(setFrame:)] pub unsafe fn setFrame(&self, frame: NSRect); + #[method(size)] pub unsafe fn size(&self) -> NSSize; + #[method(setSize:)] pub unsafe fn setSize(&self, size: NSSize); + #[method(alpha)] pub unsafe fn alpha(&self) -> CGFloat; + #[method(setAlpha:)] pub unsafe fn setAlpha(&self, alpha: CGFloat); + #[method(zIndex)] pub unsafe fn zIndex(&self) -> NSInteger; + #[method(setZIndex:)] pub unsafe fn setZIndex(&self, zIndex: NSInteger); + #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[method_id(indexPath)] pub unsafe fn indexPath(&self) -> Option>; + #[method(setIndexPath:)] pub unsafe fn setIndexPath(&self, indexPath: Option<&NSIndexPath>); + #[method(representedElementCategory)] pub unsafe fn representedElementCategory(&self) -> NSCollectionElementCategory; + #[method_id(representedElementKind)] pub unsafe fn representedElementKind(&self) -> Option>; + #[method_id(layoutAttributesForItemWithIndexPath:)] pub unsafe fn layoutAttributesForItemWithIndexPath( indexPath: &NSIndexPath, ) -> Id; + #[method_id(layoutAttributesForInterItemGapBeforeIndexPath:)] pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath( indexPath: &NSIndexPath, ) -> Id; + #[method_id(layoutAttributesForSupplementaryViewOfKind:withIndexPath:)] pub unsafe fn layoutAttributesForSupplementaryViewOfKind_withIndexPath( elementKind: &NSCollectionViewSupplementaryElementKind, indexPath: &NSIndexPath, ) -> Id; + #[method_id(layoutAttributesForDecorationViewOfKind:withIndexPath:)] pub unsafe fn layoutAttributesForDecorationViewOfKind_withIndexPath( decorationViewKind: &NSCollectionViewDecorationElementKind, @@ -60,98 +83,124 @@ extern_methods!( ) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionViewUpdateItem; + unsafe impl ClassType for NSCollectionViewUpdateItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionViewUpdateItem { #[method_id(indexPathBeforeUpdate)] pub unsafe fn indexPathBeforeUpdate(&self) -> Option>; + #[method_id(indexPathAfterUpdate)] pub unsafe fn indexPathAfterUpdate(&self) -> Option>; + #[method(updateAction)] pub unsafe fn updateAction(&self) -> NSCollectionUpdateAction; } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionViewLayoutInvalidationContext; + unsafe impl ClassType for NSCollectionViewLayoutInvalidationContext { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionViewLayoutInvalidationContext { #[method(invalidateEverything)] pub unsafe fn invalidateEverything(&self) -> bool; + #[method(invalidateDataSourceCounts)] pub unsafe fn invalidateDataSourceCounts(&self) -> bool; + #[method(invalidateItemsAtIndexPaths:)] pub unsafe fn invalidateItemsAtIndexPaths(&self, indexPaths: &NSSet); + #[method(invalidateSupplementaryElementsOfKind:atIndexPaths:)] pub unsafe fn invalidateSupplementaryElementsOfKind_atIndexPaths( &self, elementKind: &NSCollectionViewSupplementaryElementKind, indexPaths: &NSSet, ); + #[method(invalidateDecorationElementsOfKind:atIndexPaths:)] pub unsafe fn invalidateDecorationElementsOfKind_atIndexPaths( &self, elementKind: &NSCollectionViewDecorationElementKind, indexPaths: &NSSet, ); + #[method_id(invalidatedItemIndexPaths)] pub unsafe fn invalidatedItemIndexPaths(&self) -> Option, Shared>>; + #[method_id(invalidatedSupplementaryIndexPaths)] pub unsafe fn invalidatedSupplementaryIndexPaths( &self, ) -> Option< Id>, Shared>, >; + #[method_id(invalidatedDecorationIndexPaths)] pub unsafe fn invalidatedDecorationIndexPaths( &self, ) -> Option< Id>, Shared>, >; + #[method(contentOffsetAdjustment)] pub unsafe fn contentOffsetAdjustment(&self) -> NSPoint; + #[method(setContentOffsetAdjustment:)] pub unsafe fn setContentOffsetAdjustment(&self, contentOffsetAdjustment: NSPoint); + #[method(contentSizeAdjustment)] pub unsafe fn contentSizeAdjustment(&self) -> NSSize; + #[method(setContentSizeAdjustment:)] pub unsafe fn setContentSizeAdjustment(&self, contentSizeAdjustment: NSSize); } ); + extern_class!( #[derive(Debug)] pub struct NSCollectionViewLayout; + unsafe impl ClassType for NSCollectionViewLayout { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionViewLayout { #[method_id(collectionView)] pub unsafe fn collectionView(&self) -> Option>; + #[method(invalidateLayout)] pub unsafe fn invalidateLayout(&self); + #[method(invalidateLayoutWithContext:)] pub unsafe fn invalidateLayoutWithContext( &self, context: &NSCollectionViewLayoutInvalidationContext, ); + #[method(registerClass:forDecorationViewOfKind:)] pub unsafe fn registerClass_forDecorationViewOfKind( &self, viewClass: Option<&Class>, elementKind: &NSCollectionViewDecorationElementKind, ); + #[method(registerNib:forDecorationViewOfKind:)] pub unsafe fn registerNib_forDecorationViewOfKind( &self, @@ -160,150 +209,183 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSSubclassingHooks"] + /// NSSubclassingHooks unsafe impl NSCollectionViewLayout { #[method(layoutAttributesClass)] pub unsafe fn layoutAttributesClass() -> &Class; + #[method(invalidationContextClass)] pub unsafe fn invalidationContextClass() -> &Class; + #[method(prepareLayout)] pub unsafe fn prepareLayout(&self); + #[method_id(layoutAttributesForElementsInRect:)] pub unsafe fn layoutAttributesForElementsInRect( &self, rect: NSRect, ) -> Id, Shared>; + #[method_id(layoutAttributesForItemAtIndexPath:)] pub unsafe fn layoutAttributesForItemAtIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; + #[method_id(layoutAttributesForSupplementaryViewOfKind:atIndexPath:)] pub unsafe fn layoutAttributesForSupplementaryViewOfKind_atIndexPath( &self, elementKind: &NSCollectionViewSupplementaryElementKind, indexPath: &NSIndexPath, ) -> Option>; + #[method_id(layoutAttributesForDecorationViewOfKind:atIndexPath:)] pub unsafe fn layoutAttributesForDecorationViewOfKind_atIndexPath( &self, elementKind: &NSCollectionViewDecorationElementKind, indexPath: &NSIndexPath, ) -> Option>; + #[method_id(layoutAttributesForDropTargetAtPoint:)] pub unsafe fn layoutAttributesForDropTargetAtPoint( &self, pointInCollectionView: NSPoint, ) -> Option>; + #[method_id(layoutAttributesForInterItemGapBeforeIndexPath:)] pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; + #[method(shouldInvalidateLayoutForBoundsChange:)] pub unsafe fn shouldInvalidateLayoutForBoundsChange(&self, newBounds: NSRect) -> bool; + #[method_id(invalidationContextForBoundsChange:)] pub unsafe fn invalidationContextForBoundsChange( &self, newBounds: NSRect, ) -> Id; + #[method(shouldInvalidateLayoutForPreferredLayoutAttributes:withOriginalAttributes:)] pub unsafe fn shouldInvalidateLayoutForPreferredLayoutAttributes_withOriginalAttributes( &self, preferredAttributes: &NSCollectionViewLayoutAttributes, originalAttributes: &NSCollectionViewLayoutAttributes, ) -> bool; + #[method_id(invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:)] pub unsafe fn invalidationContextForPreferredLayoutAttributes_withOriginalAttributes( &self, preferredAttributes: &NSCollectionViewLayoutAttributes, originalAttributes: &NSCollectionViewLayoutAttributes, ) -> Id; + #[method(targetContentOffsetForProposedContentOffset:withScrollingVelocity:)] pub unsafe fn targetContentOffsetForProposedContentOffset_withScrollingVelocity( &self, proposedContentOffset: NSPoint, velocity: NSPoint, ) -> NSPoint; + #[method(targetContentOffsetForProposedContentOffset:)] pub unsafe fn targetContentOffsetForProposedContentOffset( &self, proposedContentOffset: NSPoint, ) -> NSPoint; + #[method(collectionViewContentSize)] pub unsafe fn collectionViewContentSize(&self) -> NSSize; } ); + extern_methods!( - #[doc = "NSUpdateSupportHooks"] + /// NSUpdateSupportHooks unsafe impl NSCollectionViewLayout { #[method(prepareForCollectionViewUpdates:)] pub unsafe fn prepareForCollectionViewUpdates( &self, updateItems: &NSArray, ); + #[method(finalizeCollectionViewUpdates)] pub unsafe fn finalizeCollectionViewUpdates(&self); + #[method(prepareForAnimatedBoundsChange:)] pub unsafe fn prepareForAnimatedBoundsChange(&self, oldBounds: NSRect); + #[method(finalizeAnimatedBoundsChange)] pub unsafe fn finalizeAnimatedBoundsChange(&self); + #[method(prepareForTransitionToLayout:)] pub unsafe fn prepareForTransitionToLayout(&self, newLayout: &NSCollectionViewLayout); + #[method(prepareForTransitionFromLayout:)] pub unsafe fn prepareForTransitionFromLayout(&self, oldLayout: &NSCollectionViewLayout); + #[method(finalizeLayoutTransition)] pub unsafe fn finalizeLayoutTransition(&self); + #[method_id(initialLayoutAttributesForAppearingItemAtIndexPath:)] pub unsafe fn initialLayoutAttributesForAppearingItemAtIndexPath( &self, itemIndexPath: &NSIndexPath, ) -> Option>; + #[method_id(finalLayoutAttributesForDisappearingItemAtIndexPath:)] pub unsafe fn finalLayoutAttributesForDisappearingItemAtIndexPath( &self, itemIndexPath: &NSIndexPath, ) -> Option>; + #[method_id(initialLayoutAttributesForAppearingSupplementaryElementOfKind:atIndexPath:)] pub unsafe fn initialLayoutAttributesForAppearingSupplementaryElementOfKind_atIndexPath( &self, elementKind: &NSCollectionViewSupplementaryElementKind, elementIndexPath: &NSIndexPath, ) -> Option>; + #[method_id(finalLayoutAttributesForDisappearingSupplementaryElementOfKind:atIndexPath:)] pub unsafe fn finalLayoutAttributesForDisappearingSupplementaryElementOfKind_atIndexPath( &self, elementKind: &NSCollectionViewSupplementaryElementKind, elementIndexPath: &NSIndexPath, ) -> Option>; + #[method_id(initialLayoutAttributesForAppearingDecorationElementOfKind:atIndexPath:)] pub unsafe fn initialLayoutAttributesForAppearingDecorationElementOfKind_atIndexPath( &self, elementKind: &NSCollectionViewDecorationElementKind, decorationIndexPath: &NSIndexPath, ) -> Option>; + #[method_id(finalLayoutAttributesForDisappearingDecorationElementOfKind:atIndexPath:)] pub unsafe fn finalLayoutAttributesForDisappearingDecorationElementOfKind_atIndexPath( &self, elementKind: &NSCollectionViewDecorationElementKind, decorationIndexPath: &NSIndexPath, ) -> Option>; + #[method_id(indexPathsToDeleteForSupplementaryViewOfKind:)] pub unsafe fn indexPathsToDeleteForSupplementaryViewOfKind( &self, elementKind: &NSCollectionViewSupplementaryElementKind, ) -> Id, Shared>; + #[method_id(indexPathsToDeleteForDecorationViewOfKind:)] pub unsafe fn indexPathsToDeleteForDecorationViewOfKind( &self, elementKind: &NSCollectionViewDecorationElementKind, ) -> Id, Shared>; + #[method_id(indexPathsToInsertForSupplementaryViewOfKind:)] pub unsafe fn indexPathsToInsertForSupplementaryViewOfKind( &self, elementKind: &NSCollectionViewSupplementaryElementKind, ) -> Id, Shared>; + #[method_id(indexPathsToInsertForDecorationViewOfKind:)] pub unsafe fn indexPathsToInsertForDecorationViewOfKind( &self, diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs index 9acfd7df6..5633b0dd6 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs @@ -1,37 +1,49 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSCollectionViewTransitionLayoutAnimatedKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewTransitionLayout; + unsafe impl ClassType for NSCollectionViewTransitionLayout { type Super = NSCollectionViewLayout; } ); + extern_methods!( unsafe impl NSCollectionViewTransitionLayout { #[method(transitionProgress)] pub unsafe fn transitionProgress(&self) -> CGFloat; + #[method(setTransitionProgress:)] pub unsafe fn setTransitionProgress(&self, transitionProgress: CGFloat); + #[method_id(currentLayout)] pub unsafe fn currentLayout(&self) -> Id; + #[method_id(nextLayout)] pub unsafe fn nextLayout(&self) -> Id; + #[method_id(initWithCurrentLayout:nextLayout:)] pub unsafe fn initWithCurrentLayout_nextLayout( &self, currentLayout: &NSCollectionViewLayout, newLayout: &NSCollectionViewLayout, ) -> Id; + #[method(updateValue:forAnimatedKey:)] pub unsafe fn updateValue_forAnimatedKey( &self, value: CGFloat, key: &NSCollectionViewTransitionLayoutAnimatedKey, ); + #[method(valueForAnimatedKey:)] pub unsafe fn valueForAnimatedKey( &self, diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index 4b9686c82..e9536d3ba 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -1,26 +1,34 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSColor; + unsafe impl ClassType for NSColor { type Super = NSObject; } ); + extern_methods!( unsafe impl NSColor { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(colorWithColorSpace:components:count:)] pub unsafe fn colorWithColorSpace_components_count( space: &NSColorSpace, components: NonNull, numberOfComponents: NSInteger, ) -> Id; + #[method_id(colorWithSRGBRed:green:blue:alpha:)] pub unsafe fn colorWithSRGBRed_green_blue_alpha( red: CGFloat, @@ -28,11 +36,13 @@ extern_methods!( blue: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithGenericGamma22White:alpha:)] pub unsafe fn colorWithGenericGamma22White_alpha( white: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithDisplayP3Red:green:blue:alpha:)] pub unsafe fn colorWithDisplayP3Red_green_blue_alpha( red: CGFloat, @@ -40,8 +50,10 @@ extern_methods!( blue: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithWhite:alpha:)] pub unsafe fn colorWithWhite_alpha(white: CGFloat, alpha: CGFloat) -> Id; + #[method_id(colorWithRed:green:blue:alpha:)] pub unsafe fn colorWithRed_green_blue_alpha( red: CGFloat, @@ -49,6 +61,7 @@ extern_methods!( blue: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithHue:saturation:brightness:alpha:)] pub unsafe fn colorWithHue_saturation_brightness_alpha( hue: CGFloat, @@ -56,6 +69,7 @@ extern_methods!( brightness: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithColorSpace:hue:saturation:brightness:alpha:)] pub unsafe fn colorWithColorSpace_hue_saturation_brightness_alpha( space: &NSColorSpace, @@ -64,28 +78,34 @@ extern_methods!( brightness: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithCatalogName:colorName:)] pub unsafe fn colorWithCatalogName_colorName( listName: &NSColorListName, colorName: &NSColorName, ) -> Option>; + #[method_id(colorNamed:bundle:)] pub unsafe fn colorNamed_bundle( name: &NSColorName, bundle: Option<&NSBundle>, ) -> Option>; + #[method_id(colorNamed:)] pub unsafe fn colorNamed(name: &NSColorName) -> Option>; + #[method_id(colorWithName:dynamicProvider:)] pub unsafe fn colorWithName_dynamicProvider( colorName: Option<&NSColorName>, dynamicProvider: TodoBlock, ) -> Id; + #[method_id(colorWithDeviceWhite:alpha:)] pub unsafe fn colorWithDeviceWhite_alpha( white: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithDeviceRed:green:blue:alpha:)] pub unsafe fn colorWithDeviceRed_green_blue_alpha( red: CGFloat, @@ -93,6 +113,7 @@ extern_methods!( blue: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithDeviceHue:saturation:brightness:alpha:)] pub unsafe fn colorWithDeviceHue_saturation_brightness_alpha( hue: CGFloat, @@ -100,6 +121,7 @@ extern_methods!( brightness: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithDeviceCyan:magenta:yellow:black:alpha:)] pub unsafe fn colorWithDeviceCyan_magenta_yellow_black_alpha( cyan: CGFloat, @@ -108,11 +130,13 @@ extern_methods!( black: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithCalibratedWhite:alpha:)] pub unsafe fn colorWithCalibratedWhite_alpha( white: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithCalibratedRed:green:blue:alpha:)] pub unsafe fn colorWithCalibratedRed_green_blue_alpha( red: CGFloat, @@ -120,6 +144,7 @@ extern_methods!( blue: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithCalibratedHue:saturation:brightness:alpha:)] pub unsafe fn colorWithCalibratedHue_saturation_brightness_alpha( hue: CGFloat, @@ -127,184 +152,269 @@ extern_methods!( brightness: CGFloat, alpha: CGFloat, ) -> Id; + #[method_id(colorWithPatternImage:)] pub unsafe fn colorWithPatternImage(image: &NSImage) -> Id; + #[method(type)] pub unsafe fn type_(&self) -> NSColorType; + #[method_id(colorUsingType:)] pub unsafe fn colorUsingType(&self, type_: NSColorType) -> Option>; + #[method_id(colorUsingColorSpace:)] pub unsafe fn colorUsingColorSpace( &self, space: &NSColorSpace, ) -> Option>; + #[method_id(blackColor)] pub unsafe fn blackColor() -> Id; + #[method_id(darkGrayColor)] pub unsafe fn darkGrayColor() -> Id; + #[method_id(lightGrayColor)] pub unsafe fn lightGrayColor() -> Id; + #[method_id(whiteColor)] pub unsafe fn whiteColor() -> Id; + #[method_id(grayColor)] pub unsafe fn grayColor() -> Id; + #[method_id(redColor)] pub unsafe fn redColor() -> Id; + #[method_id(greenColor)] pub unsafe fn greenColor() -> Id; + #[method_id(blueColor)] pub unsafe fn blueColor() -> Id; + #[method_id(cyanColor)] pub unsafe fn cyanColor() -> Id; + #[method_id(yellowColor)] pub unsafe fn yellowColor() -> Id; + #[method_id(magentaColor)] pub unsafe fn magentaColor() -> Id; + #[method_id(orangeColor)] pub unsafe fn orangeColor() -> Id; + #[method_id(purpleColor)] pub unsafe fn purpleColor() -> Id; + #[method_id(brownColor)] pub unsafe fn brownColor() -> Id; + #[method_id(clearColor)] pub unsafe fn clearColor() -> Id; + #[method_id(labelColor)] pub unsafe fn labelColor() -> Id; + #[method_id(secondaryLabelColor)] pub unsafe fn secondaryLabelColor() -> Id; + #[method_id(tertiaryLabelColor)] pub unsafe fn tertiaryLabelColor() -> Id; + #[method_id(quaternaryLabelColor)] pub unsafe fn quaternaryLabelColor() -> Id; + #[method_id(linkColor)] pub unsafe fn linkColor() -> Id; + #[method_id(placeholderTextColor)] pub unsafe fn placeholderTextColor() -> Id; + #[method_id(windowFrameTextColor)] pub unsafe fn windowFrameTextColor() -> Id; + #[method_id(selectedMenuItemTextColor)] pub unsafe fn selectedMenuItemTextColor() -> Id; + #[method_id(alternateSelectedControlTextColor)] pub unsafe fn alternateSelectedControlTextColor() -> Id; + #[method_id(headerTextColor)] pub unsafe fn headerTextColor() -> Id; + #[method_id(separatorColor)] pub unsafe fn separatorColor() -> Id; + #[method_id(gridColor)] pub unsafe fn gridColor() -> Id; + #[method_id(windowBackgroundColor)] pub unsafe fn windowBackgroundColor() -> Id; + #[method_id(underPageBackgroundColor)] pub unsafe fn underPageBackgroundColor() -> Id; + #[method_id(controlBackgroundColor)] pub unsafe fn controlBackgroundColor() -> Id; + #[method_id(selectedContentBackgroundColor)] pub unsafe fn selectedContentBackgroundColor() -> Id; + #[method_id(unemphasizedSelectedContentBackgroundColor)] pub unsafe fn unemphasizedSelectedContentBackgroundColor() -> Id; + #[method_id(alternatingContentBackgroundColors)] pub unsafe fn alternatingContentBackgroundColors() -> Id, Shared>; + #[method_id(findHighlightColor)] pub unsafe fn findHighlightColor() -> Id; + #[method_id(textColor)] pub unsafe fn textColor() -> Id; + #[method_id(textBackgroundColor)] pub unsafe fn textBackgroundColor() -> Id; + #[method_id(selectedTextColor)] pub unsafe fn selectedTextColor() -> Id; + #[method_id(selectedTextBackgroundColor)] pub unsafe fn selectedTextBackgroundColor() -> Id; + #[method_id(unemphasizedSelectedTextBackgroundColor)] pub unsafe fn unemphasizedSelectedTextBackgroundColor() -> Id; + #[method_id(unemphasizedSelectedTextColor)] pub unsafe fn unemphasizedSelectedTextColor() -> Id; + #[method_id(controlColor)] pub unsafe fn controlColor() -> Id; + #[method_id(controlTextColor)] pub unsafe fn controlTextColor() -> Id; + #[method_id(selectedControlColor)] pub unsafe fn selectedControlColor() -> Id; + #[method_id(selectedControlTextColor)] pub unsafe fn selectedControlTextColor() -> Id; + #[method_id(disabledControlTextColor)] pub unsafe fn disabledControlTextColor() -> Id; + #[method_id(keyboardFocusIndicatorColor)] pub unsafe fn keyboardFocusIndicatorColor() -> Id; + #[method_id(scrubberTexturedBackgroundColor)] pub unsafe fn scrubberTexturedBackgroundColor() -> Id; + #[method_id(systemRedColor)] pub unsafe fn systemRedColor() -> Id; + #[method_id(systemGreenColor)] pub unsafe fn systemGreenColor() -> Id; + #[method_id(systemBlueColor)] pub unsafe fn systemBlueColor() -> Id; + #[method_id(systemOrangeColor)] pub unsafe fn systemOrangeColor() -> Id; + #[method_id(systemYellowColor)] pub unsafe fn systemYellowColor() -> Id; + #[method_id(systemBrownColor)] pub unsafe fn systemBrownColor() -> Id; + #[method_id(systemPinkColor)] pub unsafe fn systemPinkColor() -> Id; + #[method_id(systemPurpleColor)] pub unsafe fn systemPurpleColor() -> Id; + #[method_id(systemGrayColor)] pub unsafe fn systemGrayColor() -> Id; + #[method_id(systemTealColor)] pub unsafe fn systemTealColor() -> Id; + #[method_id(systemIndigoColor)] pub unsafe fn systemIndigoColor() -> Id; + #[method_id(systemMintColor)] pub unsafe fn systemMintColor() -> Id; + #[method_id(systemCyanColor)] pub unsafe fn systemCyanColor() -> Id; + #[method_id(controlAccentColor)] pub unsafe fn controlAccentColor() -> Id; + #[method(currentControlTint)] pub unsafe fn currentControlTint() -> NSControlTint; + #[method_id(colorForControlTint:)] pub unsafe fn colorForControlTint(controlTint: NSControlTint) -> Id; + #[method_id(highlightColor)] pub unsafe fn highlightColor() -> Id; + #[method_id(shadowColor)] pub unsafe fn shadowColor() -> Id; + #[method_id(highlightWithLevel:)] pub unsafe fn highlightWithLevel(&self, val: CGFloat) -> Option>; + #[method_id(shadowWithLevel:)] pub unsafe fn shadowWithLevel(&self, val: CGFloat) -> Option>; + #[method_id(colorWithSystemEffect:)] pub unsafe fn colorWithSystemEffect( &self, systemEffect: NSColorSystemEffect, ) -> Id; + #[method(set)] pub unsafe fn set(&self); + #[method(setFill)] pub unsafe fn setFill(&self); + #[method(setStroke)] pub unsafe fn setStroke(&self); + #[method_id(blendedColorWithFraction:ofColor:)] pub unsafe fn blendedColorWithFraction_ofColor( &self, fraction: CGFloat, color: &NSColor, ) -> Option>; + #[method_id(colorWithAlphaComponent:)] pub unsafe fn colorWithAlphaComponent(&self, alpha: CGFloat) -> Id; + #[method_id(catalogNameComponent)] pub unsafe fn catalogNameComponent(&self) -> Id; + #[method_id(colorNameComponent)] pub unsafe fn colorNameComponent(&self) -> Id; + #[method_id(localizedCatalogNameComponent)] pub unsafe fn localizedCatalogNameComponent(&self) -> Id; + #[method_id(localizedColorNameComponent)] pub unsafe fn localizedColorNameComponent(&self) -> Id; + #[method(redComponent)] pub unsafe fn redComponent(&self) -> CGFloat; + #[method(greenComponent)] pub unsafe fn greenComponent(&self) -> CGFloat; + #[method(blueComponent)] pub unsafe fn blueComponent(&self) -> CGFloat; + #[method(getRed:green:blue:alpha:)] pub unsafe fn getRed_green_blue_alpha( &self, @@ -313,12 +423,16 @@ extern_methods!( blue: *mut CGFloat, alpha: *mut CGFloat, ); + #[method(hueComponent)] pub unsafe fn hueComponent(&self) -> CGFloat; + #[method(saturationComponent)] pub unsafe fn saturationComponent(&self) -> CGFloat; + #[method(brightnessComponent)] pub unsafe fn brightnessComponent(&self) -> CGFloat; + #[method(getHue:saturation:brightness:alpha:)] pub unsafe fn getHue_saturation_brightness_alpha( &self, @@ -327,18 +441,25 @@ extern_methods!( brightness: *mut CGFloat, alpha: *mut CGFloat, ); + #[method(whiteComponent)] pub unsafe fn whiteComponent(&self) -> CGFloat; + #[method(getWhite:alpha:)] pub unsafe fn getWhite_alpha(&self, white: *mut CGFloat, alpha: *mut CGFloat); + #[method(cyanComponent)] pub unsafe fn cyanComponent(&self) -> CGFloat; + #[method(magentaComponent)] pub unsafe fn magentaComponent(&self) -> CGFloat; + #[method(yellowComponent)] pub unsafe fn yellowComponent(&self) -> CGFloat; + #[method(blackComponent)] pub unsafe fn blackComponent(&self) -> CGFloat; + #[method(getCyan:magenta:yellow:black:alpha:)] pub unsafe fn getCyan_magenta_yellow_black_alpha( &self, @@ -348,70 +469,98 @@ extern_methods!( black: *mut CGFloat, alpha: *mut CGFloat, ); + #[method_id(colorSpace)] pub unsafe fn colorSpace(&self) -> Id; + #[method(numberOfComponents)] pub unsafe fn numberOfComponents(&self) -> NSInteger; + #[method(getComponents:)] pub unsafe fn getComponents(&self, components: NonNull); + #[method_id(patternImage)] pub unsafe fn patternImage(&self) -> Id; + #[method(alphaComponent)] pub unsafe fn alphaComponent(&self) -> CGFloat; + #[method_id(colorFromPasteboard:)] pub unsafe fn colorFromPasteboard(pasteBoard: &NSPasteboard) -> Option>; + #[method(writeToPasteboard:)] pub unsafe fn writeToPasteboard(&self, pasteBoard: &NSPasteboard); + #[method(drawSwatchInRect:)] pub unsafe fn drawSwatchInRect(&self, rect: NSRect); + #[method_id(colorWithCGColor:)] pub unsafe fn colorWithCGColor(cgColor: CGColorRef) -> Option>; + #[method(CGColor)] pub unsafe fn CGColor(&self) -> CGColorRef; + #[method(ignoresAlpha)] pub unsafe fn ignoresAlpha() -> bool; + #[method(setIgnoresAlpha:)] pub unsafe fn setIgnoresAlpha(ignoresAlpha: bool); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSColor { #[method_id(controlHighlightColor)] pub unsafe fn controlHighlightColor() -> Id; + #[method_id(controlLightHighlightColor)] pub unsafe fn controlLightHighlightColor() -> Id; + #[method_id(controlShadowColor)] pub unsafe fn controlShadowColor() -> Id; + #[method_id(controlDarkShadowColor)] pub unsafe fn controlDarkShadowColor() -> Id; + #[method_id(scrollBarColor)] pub unsafe fn scrollBarColor() -> Id; + #[method_id(knobColor)] pub unsafe fn knobColor() -> Id; + #[method_id(selectedKnobColor)] pub unsafe fn selectedKnobColor() -> Id; + #[method_id(windowFrameColor)] pub unsafe fn windowFrameColor() -> Id; + #[method_id(selectedMenuItemColor)] pub unsafe fn selectedMenuItemColor() -> Id; + #[method_id(headerColor)] pub unsafe fn headerColor() -> Id; + #[method_id(secondarySelectedControlColor)] pub unsafe fn secondarySelectedControlColor() -> Id; + #[method_id(alternateSelectedControlColor)] pub unsafe fn alternateSelectedControlColor() -> Id; + #[method_id(controlAlternatingRowBackgroundColors)] pub unsafe fn controlAlternatingRowBackgroundColors() -> Id, Shared>; + #[method_id(colorSpaceName)] pub unsafe fn colorSpaceName(&self) -> Id; + #[method_id(colorUsingColorSpaceName:device:)] pub unsafe fn colorUsingColorSpaceName_device( &self, name: Option<&NSColorSpaceName>, deviceDescription: Option<&NSDictionary>, ) -> Option>; + #[method_id(colorUsingColorSpaceName:)] pub unsafe fn colorUsingColorSpaceName( &self, @@ -419,22 +568,25 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSQuartzCoreAdditions"] + /// NSQuartzCoreAdditions unsafe impl NSColor { #[method_id(colorWithCIColor:)] pub unsafe fn colorWithCIColor(color: &CIColor) -> Id; } ); + extern_methods!( - #[doc = "NSAppKitAdditions"] + /// NSAppKitAdditions unsafe impl CIColor { #[method_id(initWithColor:)] pub unsafe fn initWithColor(&self, color: &NSColor) -> Option>; } ); + extern_methods!( - #[doc = "NSAppKitColorExtensions"] + /// NSAppKitColorExtensions unsafe impl NSCoder { #[method_id(decodeNXColor)] pub unsafe fn decodeNXColor(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSColorList.rs b/crates/icrate/src/generated/AppKit/NSColorList.rs index a4c6e16b7..976c0c647 100644 --- a/crates/icrate/src/generated/AppKit/NSColorList.rs +++ b/crates/icrate/src/generated/AppKit/NSColorList.rs @@ -1,34 +1,47 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSColorListName = NSString; + pub type NSColorName = NSString; + extern_class!( #[derive(Debug)] pub struct NSColorList; + unsafe impl ClassType for NSColorList { type Super = NSObject; } ); + extern_methods!( unsafe impl NSColorList { #[method_id(availableColorLists)] pub unsafe fn availableColorLists() -> Id, Shared>; + #[method_id(colorListNamed:)] pub unsafe fn colorListNamed(name: &NSColorListName) -> Option>; + #[method_id(initWithName:)] pub unsafe fn initWithName(&self, name: &NSColorListName) -> Id; + #[method_id(initWithName:fromFile:)] pub unsafe fn initWithName_fromFile( &self, name: &NSColorListName, path: Option<&NSString>, ) -> Option>; + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method(setColor:forKey:)] pub unsafe fn setColor_forKey(&self, color: &NSColor, key: &NSColorName); + #[method(insertColor:key:atIndex:)] pub unsafe fn insertColor_key_atIndex( &self, @@ -36,21 +49,28 @@ extern_methods!( key: &NSColorName, loc: NSUInteger, ); + #[method(removeColorWithKey:)] pub unsafe fn removeColorWithKey(&self, key: &NSColorName); + #[method_id(colorWithKey:)] pub unsafe fn colorWithKey(&self, key: &NSColorName) -> Option>; + #[method_id(allKeys)] pub unsafe fn allKeys(&self) -> Id, Shared>; + #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(writeToURL:error:)] pub unsafe fn writeToURL_error( &self, url: Option<&NSURL>, ) -> Result<(), Id>; + #[method(writeToFile:)] pub unsafe fn writeToFile(&self, path: Option<&NSString>) -> bool; + #[method(removeFile)] pub unsafe fn removeFile(&self); } diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index c5ecf300c..9ebc90f69 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -1,72 +1,99 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSColorPanel; + unsafe impl ClassType for NSColorPanel { type Super = NSPanel; } ); + extern_methods!( unsafe impl NSColorPanel { #[method_id(sharedColorPanel)] pub unsafe fn sharedColorPanel() -> Id; + #[method(sharedColorPanelExists)] pub unsafe fn sharedColorPanelExists() -> bool; + #[method(dragColor:withEvent:fromView:)] pub unsafe fn dragColor_withEvent_fromView( color: &NSColor, event: &NSEvent, sourceView: &NSView, ) -> bool; + #[method(setPickerMask:)] pub unsafe fn setPickerMask(mask: NSColorPanelOptions); + #[method(setPickerMode:)] pub unsafe fn setPickerMode(mode: NSColorPanelMode); + #[method_id(accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method(isContinuous)] pub unsafe fn isContinuous(&self) -> bool; + #[method(setContinuous:)] pub unsafe fn setContinuous(&self, continuous: bool); + #[method(showsAlpha)] pub unsafe fn showsAlpha(&self) -> bool; + #[method(setShowsAlpha:)] pub unsafe fn setShowsAlpha(&self, showsAlpha: bool); + #[method(mode)] pub unsafe fn mode(&self) -> NSColorPanelMode; + #[method(setMode:)] pub unsafe fn setMode(&self, mode: NSColorPanelMode); + #[method_id(color)] pub unsafe fn color(&self) -> Id; + #[method(setColor:)] pub unsafe fn setColor(&self, color: &NSColor); + #[method(alpha)] pub unsafe fn alpha(&self) -> CGFloat; + #[method(setAction:)] pub unsafe fn setAction(&self, selector: Option); + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(attachColorList:)] pub unsafe fn attachColorList(&self, colorList: &NSColorList); + #[method(detachColorList:)] pub unsafe fn detachColorList(&self, colorList: &NSColorList); } ); + extern_methods!( - #[doc = "NSColorPanel"] + /// NSColorPanel unsafe impl NSApplication { #[method(orderFrontColorPanel:)] pub unsafe fn orderFrontColorPanel(&self, sender: Option<&Object>); } ); + pub type NSColorChanging = NSObject; + extern_methods!( - #[doc = "NSColorPanelResponderMethod"] + /// NSColorPanelResponderMethod unsafe impl NSObject { #[method(changeColor:)] pub unsafe fn changeColor(&self, sender: Option<&Object>); diff --git a/crates/icrate/src/generated/AppKit/NSColorPicker.rs b/crates/icrate/src/generated/AppKit/NSColorPicker.rs index 49f76eaba..b6776cd6a 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicker.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicker.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSColorPicker; + unsafe impl ClassType for NSColorPicker { type Super = NSObject; } ); + extern_methods!( unsafe impl NSColorPicker { #[method_id(initWithPickerMask:colorPanel:)] @@ -17,26 +22,35 @@ extern_methods!( mask: NSUInteger, owningColorPanel: &NSColorPanel, ) -> Option>; + #[method_id(colorPanel)] pub unsafe fn colorPanel(&self) -> Id; + #[method_id(provideNewButtonImage)] pub unsafe fn provideNewButtonImage(&self) -> Id; + #[method(insertNewButtonImage:in:)] pub unsafe fn insertNewButtonImage_in( &self, newButtonImage: &NSImage, buttonCell: &NSButtonCell, ); + #[method(viewSizeChanged:)] pub unsafe fn viewSizeChanged(&self, sender: Option<&Object>); + #[method(attachColorList:)] pub unsafe fn attachColorList(&self, colorList: &NSColorList); + #[method(detachColorList:)] pub unsafe fn detachColorList(&self, colorList: &NSColorList); + #[method(setMode:)] pub unsafe fn setMode(&self, mode: NSColorPanelMode); + #[method_id(buttonToolTip)] pub unsafe fn buttonToolTip(&self) -> Id; + #[method(minContentSize)] pub unsafe fn minContentSize(&self) -> NSSize; } diff --git a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs index 120dbd80b..1c6e3e300 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs @@ -1,66 +1,90 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSColorPickerTouchBarItem; + unsafe impl ClassType for NSColorPickerTouchBarItem { type Super = NSTouchBarItem; } ); + extern_methods!( unsafe impl NSColorPickerTouchBarItem { #[method_id(colorPickerWithIdentifier:)] pub unsafe fn colorPickerWithIdentifier( identifier: &NSTouchBarItemIdentifier, ) -> Id; + #[method_id(textColorPickerWithIdentifier:)] pub unsafe fn textColorPickerWithIdentifier( identifier: &NSTouchBarItemIdentifier, ) -> Id; + #[method_id(strokeColorPickerWithIdentifier:)] pub unsafe fn strokeColorPickerWithIdentifier( identifier: &NSTouchBarItemIdentifier, ) -> Id; + #[method_id(colorPickerWithIdentifier:buttonImage:)] pub unsafe fn colorPickerWithIdentifier_buttonImage( identifier: &NSTouchBarItemIdentifier, image: &NSImage, ) -> Id; + #[method_id(color)] pub unsafe fn color(&self) -> Id; + #[method(setColor:)] pub unsafe fn setColor(&self, color: &NSColor); + #[method(showsAlpha)] pub unsafe fn showsAlpha(&self) -> bool; + #[method(setShowsAlpha:)] pub unsafe fn setShowsAlpha(&self, showsAlpha: bool); + #[method_id(allowedColorSpaces)] pub unsafe fn allowedColorSpaces(&self) -> Option, Shared>>; + #[method(setAllowedColorSpaces:)] pub unsafe fn setAllowedColorSpaces( &self, allowedColorSpaces: Option<&NSArray>, ); + #[method_id(colorList)] pub unsafe fn colorList(&self) -> Option>; + #[method(setColorList:)] pub unsafe fn setColorList(&self, colorList: Option<&NSColorList>); + #[method_id(customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSColorPicking.rs b/crates/icrate/src/generated/AppKit/NSColorPicking.rs index d51464ef2..221cf7279 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicking.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicking.rs @@ -1,6 +1,10 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSColorPickingDefault = NSObject; + pub type NSColorPickingCustom = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSColorSampler.rs b/crates/icrate/src/generated/AppKit/NSColorSampler.rs index cb6f79ca0..882daacb7 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSampler.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSampler.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSColorSampler; + unsafe impl ClassType for NSColorSampler { type Super = NSObject; } ); + extern_methods!( unsafe impl NSColorSampler { #[method(showSamplerWithSelectionHandler:)] diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index d75a0ac6f..d60c9373e 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -1,64 +1,90 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSColorSpace; + unsafe impl ClassType for NSColorSpace { type Super = NSObject; } ); + extern_methods!( unsafe impl NSColorSpace { #[method_id(initWithICCProfileData:)] pub unsafe fn initWithICCProfileData(&self, iccData: &NSData) -> Option>; + #[method_id(ICCProfileData)] pub unsafe fn ICCProfileData(&self) -> Option>; + #[method_id(initWithColorSyncProfile:)] pub unsafe fn initWithColorSyncProfile( &self, prof: NonNull, ) -> Option>; + #[method(colorSyncProfile)] pub unsafe fn colorSyncProfile(&self) -> *mut c_void; + #[method_id(initWithCGColorSpace:)] pub unsafe fn initWithCGColorSpace( &self, cgColorSpace: CGColorSpaceRef, ) -> Option>; + #[method(CGColorSpace)] pub unsafe fn CGColorSpace(&self) -> CGColorSpaceRef; + #[method(numberOfColorComponents)] pub unsafe fn numberOfColorComponents(&self) -> NSInteger; + #[method(colorSpaceModel)] pub unsafe fn colorSpaceModel(&self) -> NSColorSpaceModel; + #[method_id(localizedName)] pub unsafe fn localizedName(&self) -> Option>; + #[method_id(sRGBColorSpace)] pub unsafe fn sRGBColorSpace() -> Id; + #[method_id(genericGamma22GrayColorSpace)] pub unsafe fn genericGamma22GrayColorSpace() -> Id; + #[method_id(extendedSRGBColorSpace)] pub unsafe fn extendedSRGBColorSpace() -> Id; + #[method_id(extendedGenericGamma22GrayColorSpace)] pub unsafe fn extendedGenericGamma22GrayColorSpace() -> Id; + #[method_id(displayP3ColorSpace)] pub unsafe fn displayP3ColorSpace() -> Id; + #[method_id(adobeRGB1998ColorSpace)] pub unsafe fn adobeRGB1998ColorSpace() -> Id; + #[method_id(genericRGBColorSpace)] pub unsafe fn genericRGBColorSpace() -> Id; + #[method_id(genericGrayColorSpace)] pub unsafe fn genericGrayColorSpace() -> Id; + #[method_id(genericCMYKColorSpace)] pub unsafe fn genericCMYKColorSpace() -> Id; + #[method_id(deviceRGBColorSpace)] pub unsafe fn deviceRGBColorSpace() -> Id; + #[method_id(deviceGrayColorSpace)] pub unsafe fn deviceGrayColorSpace() -> Id; + #[method_id(deviceCMYKColorSpace)] pub unsafe fn deviceCMYKColorSpace() -> Id; + #[method_id(availableColorSpacesWithModel:)] pub unsafe fn availableColorSpacesWithModel( model: NSColorSpaceModel, diff --git a/crates/icrate/src/generated/AppKit/NSColorWell.rs b/crates/icrate/src/generated/AppKit/NSColorWell.rs index 87f21e90a..86ae4d99e 100644 --- a/crates/icrate/src/generated/AppKit/NSColorWell.rs +++ b/crates/icrate/src/generated/AppKit/NSColorWell.rs @@ -1,32 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSColorWell; + unsafe impl ClassType for NSColorWell { type Super = NSControl; } ); + extern_methods!( unsafe impl NSColorWell { #[method(deactivate)] pub unsafe fn deactivate(&self); + #[method(activate:)] pub unsafe fn activate(&self, exclusive: bool); + #[method(isActive)] pub unsafe fn isActive(&self) -> bool; + #[method(drawWellInside:)] pub unsafe fn drawWellInside(&self, insideRect: NSRect); + #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[method(takeColorFrom:)] pub unsafe fn takeColorFrom(&self, sender: Option<&Object>); + #[method_id(color)] pub unsafe fn color(&self) -> Id; + #[method(setColor:)] pub unsafe fn setColor(&self, color: &NSColor); } diff --git a/crates/icrate/src/generated/AppKit/NSComboBox.rs b/crates/icrate/src/generated/AppKit/NSComboBox.rs index ccca67fda..f6832fbfd 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBox.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBox.rs @@ -1,90 +1,133 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSComboBoxDataSource = NSObject; + pub type NSComboBoxDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSComboBox; + unsafe impl ClassType for NSComboBox { type Super = NSTextField; } ); + extern_methods!( unsafe impl NSComboBox { #[method(hasVerticalScroller)] pub unsafe fn hasVerticalScroller(&self) -> bool; + #[method(setHasVerticalScroller:)] pub unsafe fn setHasVerticalScroller(&self, hasVerticalScroller: bool); + #[method(intercellSpacing)] pub unsafe fn intercellSpacing(&self) -> NSSize; + #[method(setIntercellSpacing:)] pub unsafe fn setIntercellSpacing(&self, intercellSpacing: NSSize); + #[method(itemHeight)] pub unsafe fn itemHeight(&self) -> CGFloat; + #[method(setItemHeight:)] pub unsafe fn setItemHeight(&self, itemHeight: CGFloat); + #[method(numberOfVisibleItems)] pub unsafe fn numberOfVisibleItems(&self) -> NSInteger; + #[method(setNumberOfVisibleItems:)] pub unsafe fn setNumberOfVisibleItems(&self, numberOfVisibleItems: NSInteger); + #[method(isButtonBordered)] pub unsafe fn isButtonBordered(&self) -> bool; + #[method(setButtonBordered:)] pub unsafe fn setButtonBordered(&self, buttonBordered: bool); + #[method(reloadData)] pub unsafe fn reloadData(&self); + #[method(noteNumberOfItemsChanged)] pub unsafe fn noteNumberOfItemsChanged(&self); + #[method(usesDataSource)] pub unsafe fn usesDataSource(&self) -> bool; + #[method(setUsesDataSource:)] pub unsafe fn setUsesDataSource(&self, usesDataSource: bool); + #[method(scrollItemAtIndexToTop:)] pub unsafe fn scrollItemAtIndexToTop(&self, index: NSInteger); + #[method(scrollItemAtIndexToVisible:)] pub unsafe fn scrollItemAtIndexToVisible(&self, index: NSInteger); + #[method(selectItemAtIndex:)] pub unsafe fn selectItemAtIndex(&self, index: NSInteger); + #[method(deselectItemAtIndex:)] pub unsafe fn deselectItemAtIndex(&self, index: NSInteger); + #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(completes)] pub unsafe fn completes(&self) -> bool; + #[method(setCompletes:)] pub unsafe fn setCompletes(&self, completes: bool); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSComboBoxDelegate>); + #[method_id(dataSource)] pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] pub unsafe fn setDataSource(&self, dataSource: Option<&NSComboBoxDataSource>); + #[method(addItemWithObjectValue:)] pub unsafe fn addItemWithObjectValue(&self, object: &Object); + #[method(addItemsWithObjectValues:)] pub unsafe fn addItemsWithObjectValues(&self, objects: &NSArray); + #[method(insertItemWithObjectValue:atIndex:)] pub unsafe fn insertItemWithObjectValue_atIndex(&self, object: &Object, index: NSInteger); + #[method(removeItemWithObjectValue:)] pub unsafe fn removeItemWithObjectValue(&self, object: &Object); + #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); + #[method(selectItemWithObjectValue:)] pub unsafe fn selectItemWithObjectValue(&self, object: Option<&Object>); + #[method_id(itemObjectValueAtIndex:)] pub unsafe fn itemObjectValueAtIndex(&self, index: NSInteger) -> Id; + #[method_id(objectValueOfSelectedItem)] pub unsafe fn objectValueOfSelectedItem(&self) -> Option>; + #[method(indexOfItemWithObjectValue:)] pub unsafe fn indexOfItemWithObjectValue(&self, object: &Object) -> NSInteger; + #[method_id(objectValues)] pub unsafe fn objectValues(&self) -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs index ed36538a8..31f33c223 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs @@ -1,88 +1,129 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSComboBoxCell; + unsafe impl ClassType for NSComboBoxCell { type Super = NSTextFieldCell; } ); + extern_methods!( unsafe impl NSComboBoxCell { #[method(hasVerticalScroller)] pub unsafe fn hasVerticalScroller(&self) -> bool; + #[method(setHasVerticalScroller:)] pub unsafe fn setHasVerticalScroller(&self, hasVerticalScroller: bool); + #[method(intercellSpacing)] pub unsafe fn intercellSpacing(&self) -> NSSize; + #[method(setIntercellSpacing:)] pub unsafe fn setIntercellSpacing(&self, intercellSpacing: NSSize); + #[method(itemHeight)] pub unsafe fn itemHeight(&self) -> CGFloat; + #[method(setItemHeight:)] pub unsafe fn setItemHeight(&self, itemHeight: CGFloat); + #[method(numberOfVisibleItems)] pub unsafe fn numberOfVisibleItems(&self) -> NSInteger; + #[method(setNumberOfVisibleItems:)] pub unsafe fn setNumberOfVisibleItems(&self, numberOfVisibleItems: NSInteger); + #[method(isButtonBordered)] pub unsafe fn isButtonBordered(&self) -> bool; + #[method(setButtonBordered:)] pub unsafe fn setButtonBordered(&self, buttonBordered: bool); + #[method(reloadData)] pub unsafe fn reloadData(&self); + #[method(noteNumberOfItemsChanged)] pub unsafe fn noteNumberOfItemsChanged(&self); + #[method(usesDataSource)] pub unsafe fn usesDataSource(&self) -> bool; + #[method(setUsesDataSource:)] pub unsafe fn setUsesDataSource(&self, usesDataSource: bool); + #[method(scrollItemAtIndexToTop:)] pub unsafe fn scrollItemAtIndexToTop(&self, index: NSInteger); + #[method(scrollItemAtIndexToVisible:)] pub unsafe fn scrollItemAtIndexToVisible(&self, index: NSInteger); + #[method(selectItemAtIndex:)] pub unsafe fn selectItemAtIndex(&self, index: NSInteger); + #[method(deselectItemAtIndex:)] pub unsafe fn deselectItemAtIndex(&self, index: NSInteger); + #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(completes)] pub unsafe fn completes(&self) -> bool; + #[method(setCompletes:)] pub unsafe fn setCompletes(&self, completes: bool); + #[method_id(completedString:)] pub unsafe fn completedString(&self, string: &NSString) -> Option>; + #[method_id(dataSource)] pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] pub unsafe fn setDataSource(&self, dataSource: Option<&NSComboBoxCellDataSource>); + #[method(addItemWithObjectValue:)] pub unsafe fn addItemWithObjectValue(&self, object: &Object); + #[method(addItemsWithObjectValues:)] pub unsafe fn addItemsWithObjectValues(&self, objects: &NSArray); + #[method(insertItemWithObjectValue:atIndex:)] pub unsafe fn insertItemWithObjectValue_atIndex(&self, object: &Object, index: NSInteger); + #[method(removeItemWithObjectValue:)] pub unsafe fn removeItemWithObjectValue(&self, object: &Object); + #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); + #[method(selectItemWithObjectValue:)] pub unsafe fn selectItemWithObjectValue(&self, object: Option<&Object>); + #[method_id(itemObjectValueAtIndex:)] pub unsafe fn itemObjectValueAtIndex(&self, index: NSInteger) -> Id; + #[method_id(objectValueOfSelectedItem)] pub unsafe fn objectValueOfSelectedItem(&self) -> Option>; + #[method(indexOfItemWithObjectValue:)] pub unsafe fn indexOfItemWithObjectValue(&self, object: &Object) -> NSInteger; + #[method_id(objectValues)] pub unsafe fn objectValues(&self) -> Id; } ); + pub type NSComboBoxCellDataSource = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index 969090e90..205b18f1e 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -1,151 +1,221 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSControl; + unsafe impl ClassType for NSControl { type Super = NSView; } ); + extern_methods!( unsafe impl NSControl { #[method_id(initWithFrame:)] pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); + #[method(ignoresMultiClick)] pub unsafe fn ignoresMultiClick(&self) -> bool; + #[method(setIgnoresMultiClick:)] pub unsafe fn setIgnoresMultiClick(&self, ignoresMultiClick: bool); + #[method(isContinuous)] pub unsafe fn isContinuous(&self) -> bool; + #[method(setContinuous:)] pub unsafe fn setContinuous(&self, continuous: bool); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method(refusesFirstResponder)] pub unsafe fn refusesFirstResponder(&self) -> bool; + #[method(setRefusesFirstResponder:)] pub unsafe fn setRefusesFirstResponder(&self, refusesFirstResponder: bool); + #[method(isHighlighted)] pub unsafe fn isHighlighted(&self) -> bool; + #[method(setHighlighted:)] pub unsafe fn setHighlighted(&self, highlighted: bool); + #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; + #[method(setControlSize:)] pub unsafe fn setControlSize(&self, controlSize: NSControlSize); + #[method_id(formatter)] pub unsafe fn formatter(&self) -> Option>; + #[method(setFormatter:)] pub unsafe fn setFormatter(&self, formatter: Option<&NSFormatter>); + #[method_id(objectValue)] pub unsafe fn objectValue(&self) -> Option>; + #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); + #[method_id(stringValue)] pub unsafe fn stringValue(&self) -> Id; + #[method(setStringValue:)] pub unsafe fn setStringValue(&self, stringValue: &NSString); + #[method_id(attributedStringValue)] pub unsafe fn attributedStringValue(&self) -> Id; + #[method(setAttributedStringValue:)] pub unsafe fn setAttributedStringValue(&self, attributedStringValue: &NSAttributedString); + #[method(intValue)] pub unsafe fn intValue(&self) -> c_int; + #[method(setIntValue:)] pub unsafe fn setIntValue(&self, intValue: c_int); + #[method(integerValue)] pub unsafe fn integerValue(&self) -> NSInteger; + #[method(setIntegerValue:)] pub unsafe fn setIntegerValue(&self, integerValue: NSInteger); + #[method(floatValue)] pub unsafe fn floatValue(&self) -> c_float; + #[method(setFloatValue:)] pub unsafe fn setFloatValue(&self, floatValue: c_float); + #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[method(setDoubleValue:)] pub unsafe fn setDoubleValue(&self, doubleValue: c_double); + #[method(sizeThatFits:)] pub unsafe fn sizeThatFits(&self, size: NSSize) -> NSSize; + #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[method(sendActionOn:)] pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; + #[method(sendAction:to:)] pub unsafe fn sendAction_to(&self, action: Option, target: Option<&Object>) -> bool; + #[method(takeIntValueFrom:)] pub unsafe fn takeIntValueFrom(&self, sender: Option<&Object>); + #[method(takeFloatValueFrom:)] pub unsafe fn takeFloatValueFrom(&self, sender: Option<&Object>); + #[method(takeDoubleValueFrom:)] pub unsafe fn takeDoubleValueFrom(&self, sender: Option<&Object>); + #[method(takeStringValueFrom:)] pub unsafe fn takeStringValueFrom(&self, sender: Option<&Object>); + #[method(takeObjectValueFrom:)] pub unsafe fn takeObjectValueFrom(&self, sender: Option<&Object>); + #[method(takeIntegerValueFrom:)] pub unsafe fn takeIntegerValueFrom(&self, sender: Option<&Object>); + #[method(mouseDown:)] pub unsafe fn mouseDown(&self, event: &NSEvent); + #[method(performClick:)] pub unsafe fn performClick(&self, sender: Option<&Object>); + #[method_id(font)] pub unsafe fn font(&self) -> Option>; + #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[method(usesSingleLineMode)] pub unsafe fn usesSingleLineMode(&self) -> bool; + #[method(setUsesSingleLineMode:)] pub unsafe fn setUsesSingleLineMode(&self, usesSingleLineMode: bool); + #[method(lineBreakMode)] pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[method(setLineBreakMode:)] pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode); + #[method(alignment)] pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(setAlignment:)] pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[method(baseWritingDirection)] pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[method(setBaseWritingDirection:)] pub unsafe fn setBaseWritingDirection(&self, baseWritingDirection: NSWritingDirection); + #[method(allowsExpansionToolTips)] pub unsafe fn allowsExpansionToolTips(&self) -> bool; + #[method(setAllowsExpansionToolTips:)] pub unsafe fn setAllowsExpansionToolTips(&self, allowsExpansionToolTips: bool); + #[method(expansionFrameWithFrame:)] pub unsafe fn expansionFrameWithFrame(&self, contentFrame: NSRect) -> NSRect; + #[method(drawWithExpansionFrame:inView:)] pub unsafe fn drawWithExpansionFrame_inView(&self, contentFrame: NSRect, view: &NSView); } ); + extern_methods!( - #[doc = "NSControlEditableTextMethods"] + /// NSControlEditableTextMethods unsafe impl NSControl { #[method_id(currentEditor)] pub unsafe fn currentEditor(&self) -> Option>; + #[method(abortEditing)] pub unsafe fn abortEditing(&self) -> bool; + #[method(validateEditing)] pub unsafe fn validateEditing(&self); + #[method(editWithFrame:editor:delegate:event:)] pub unsafe fn editWithFrame_editor_delegate_event( &self, @@ -154,6 +224,7 @@ extern_methods!( delegate: Option<&Object>, event: &NSEvent, ); + #[method(selectWithFrame:editor:delegate:start:length:)] pub unsafe fn selectWithFrame_editor_delegate_start_length( &self, @@ -163,13 +234,16 @@ extern_methods!( selStart: NSInteger, selLength: NSInteger, ); + #[method(endEditing:)] pub unsafe fn endEditing(&self, textObj: &NSText); } ); + pub type NSControlTextEditingDelegate = NSObject; + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSControl { #[method(setFloatingPointFormat:left:right:)] pub unsafe fn setFloatingPointFormat_left_right( @@ -178,41 +252,57 @@ extern_methods!( leftDigits: NSUInteger, rightDigits: NSUInteger, ); + #[method(cellClass)] pub unsafe fn cellClass() -> Option<&Class>; + #[method(setCellClass:)] pub unsafe fn setCellClass(cellClass: Option<&Class>); + #[method_id(cell)] pub unsafe fn cell(&self) -> Option>; + #[method(setCell:)] pub unsafe fn setCell(&self, cell: Option<&NSCell>); + #[method_id(selectedCell)] pub unsafe fn selectedCell(&self) -> Option>; + #[method(selectedTag)] pub unsafe fn selectedTag(&self) -> NSInteger; + #[method(setNeedsDisplay)] pub unsafe fn setNeedsDisplay(&self); + #[method(calcSize)] pub unsafe fn calcSize(&self); + #[method(updateCell:)] pub unsafe fn updateCell(&self, cell: &NSCell); + #[method(updateCellInside:)] pub unsafe fn updateCellInside(&self, cell: &NSCell); + #[method(drawCellInside:)] pub unsafe fn drawCellInside(&self, cell: &NSCell); + #[method(drawCell:)] pub unsafe fn drawCell(&self, cell: &NSCell); + #[method(selectCell:)] pub unsafe fn selectCell(&self, cell: &NSCell); } ); + extern_methods!( - #[doc = "NSControlSubclassNotifications"] + /// NSControlSubclassNotifications unsafe impl NSObject { #[method(controlTextDidBeginEditing:)] pub unsafe fn controlTextDidBeginEditing(&self, obj: &NSNotification); + #[method(controlTextDidEndEditing:)] pub unsafe fn controlTextDidEndEditing(&self, obj: &NSNotification); + #[method(controlTextDidChange:)] pub unsafe fn controlTextDidChange(&self, obj: &NSNotification); } diff --git a/crates/icrate/src/generated/AppKit/NSController.rs b/crates/icrate/src/generated/AppKit/NSController.rs index 3cf96754a..0d2e81ad5 100644 --- a/crates/icrate/src/generated/AppKit/NSController.rs +++ b/crates/icrate/src/generated/AppKit/NSController.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSController; + unsafe impl ClassType for NSController { type Super = NSObject; } ); + extern_methods!( unsafe impl NSController { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(objectDidBeginEditing:)] pub unsafe fn objectDidBeginEditing(&self, editor: &NSEditor); + #[method(objectDidEndEditing:)] pub unsafe fn objectDidEndEditing(&self, editor: &NSEditor); + #[method(discardEditing)] pub unsafe fn discardEditing(&self); + #[method(commitEditing)] pub unsafe fn commitEditing(&self) -> bool; + #[method(commitEditingWithDelegate:didCommitSelector:contextInfo:)] pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( &self, @@ -30,6 +41,7 @@ extern_methods!( didCommitSelector: Option, contextInfo: *mut c_void, ); + #[method(isEditing)] pub unsafe fn isEditing(&self) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs index 33869c430..88d1c1267 100644 --- a/crates/icrate/src/generated/AppKit/NSCursor.rs +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -1,86 +1,122 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCursor; + unsafe impl ClassType for NSCursor { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCursor { #[method_id(currentCursor)] pub unsafe fn currentCursor() -> Id; + #[method_id(currentSystemCursor)] pub unsafe fn currentSystemCursor() -> Option>; + #[method_id(arrowCursor)] pub unsafe fn arrowCursor() -> Id; + #[method_id(IBeamCursor)] pub unsafe fn IBeamCursor() -> Id; + #[method_id(pointingHandCursor)] pub unsafe fn pointingHandCursor() -> Id; + #[method_id(closedHandCursor)] pub unsafe fn closedHandCursor() -> Id; + #[method_id(openHandCursor)] pub unsafe fn openHandCursor() -> Id; + #[method_id(resizeLeftCursor)] pub unsafe fn resizeLeftCursor() -> Id; + #[method_id(resizeRightCursor)] pub unsafe fn resizeRightCursor() -> Id; + #[method_id(resizeLeftRightCursor)] pub unsafe fn resizeLeftRightCursor() -> Id; + #[method_id(resizeUpCursor)] pub unsafe fn resizeUpCursor() -> Id; + #[method_id(resizeDownCursor)] pub unsafe fn resizeDownCursor() -> Id; + #[method_id(resizeUpDownCursor)] pub unsafe fn resizeUpDownCursor() -> Id; + #[method_id(crosshairCursor)] pub unsafe fn crosshairCursor() -> Id; + #[method_id(disappearingItemCursor)] pub unsafe fn disappearingItemCursor() -> Id; + #[method_id(operationNotAllowedCursor)] pub unsafe fn operationNotAllowedCursor() -> Id; + #[method_id(dragLinkCursor)] pub unsafe fn dragLinkCursor() -> Id; + #[method_id(dragCopyCursor)] pub unsafe fn dragCopyCursor() -> Id; + #[method_id(contextualMenuCursor)] pub unsafe fn contextualMenuCursor() -> Id; + #[method_id(IBeamCursorForVerticalLayout)] pub unsafe fn IBeamCursorForVerticalLayout() -> Id; + #[method_id(initWithImage:hotSpot:)] pub unsafe fn initWithImage_hotSpot( &self, newImage: &NSImage, point: NSPoint, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(hide)] pub unsafe fn hide(); + #[method(unhide)] pub unsafe fn unhide(); + #[method(setHiddenUntilMouseMoves:)] pub unsafe fn setHiddenUntilMouseMoves(flag: bool); + #[method(pop)] pub unsafe fn pop(); + #[method_id(image)] pub unsafe fn image(&self) -> Id; + #[method(hotSpot)] pub unsafe fn hotSpot(&self) -> NSPoint; + #[method(push)] pub unsafe fn push(&self); + #[method(pop)] pub unsafe fn pop(&self); + #[method(set)] pub unsafe fn set(&self); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSCursor { #[method_id(initWithImage:foregroundColorHint:backgroundColorHint:hotSpot:)] pub unsafe fn initWithImage_foregroundColorHint_backgroundColorHint_hotSpot( @@ -90,16 +126,22 @@ extern_methods!( bg: Option<&NSColor>, hotSpot: NSPoint, ) -> Id; + #[method(setOnMouseExited:)] pub unsafe fn setOnMouseExited(&self, flag: bool); + #[method(setOnMouseEntered:)] pub unsafe fn setOnMouseEntered(&self, flag: bool); + #[method(isSetOnMouseExited)] pub unsafe fn isSetOnMouseExited(&self) -> bool; + #[method(isSetOnMouseEntered)] pub unsafe fn isSetOnMouseEntered(&self) -> bool; + #[method(mouseEntered:)] pub unsafe fn mouseEntered(&self, event: &NSEvent); + #[method(mouseExited:)] pub unsafe fn mouseExited(&self, event: &NSEvent); } diff --git a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs index 9040c6bab..18d9be5eb 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCustomImageRep; + unsafe impl ClassType for NSCustomImageRep { type Super = NSImageRep; } ); + extern_methods!( unsafe impl NSCustomImageRep { #[method_id(initWithSize:flipped:drawingHandler:)] @@ -18,16 +23,20 @@ extern_methods!( drawingHandlerShouldBeCalledWithFlippedContext: bool, drawingHandler: TodoBlock, ) -> Id; + #[method(drawingHandler)] pub unsafe fn drawingHandler(&self) -> TodoBlock; + #[method_id(initWithDrawSelector:delegate:)] pub unsafe fn initWithDrawSelector_delegate( &self, selector: Sel, delegate: &Object, ) -> Id; + #[method(drawSelector)] pub unsafe fn drawSelector(&self) -> Option; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs index c2553efe1..e987ded61 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs @@ -1,26 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCustomTouchBarItem; + unsafe impl ClassType for NSCustomTouchBarItem { type Super = NSTouchBarItem; } ); + extern_methods!( unsafe impl NSCustomTouchBarItem { #[method_id(view)] pub unsafe fn view(&self) -> Id; + #[method(setView:)] pub unsafe fn setView(&self, view: &NSView); + #[method_id(viewController)] pub unsafe fn viewController(&self) -> Option>; + #[method(setViewController:)] pub unsafe fn setViewController(&self, viewController: Option<&NSViewController>); + #[method_id(customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); } diff --git a/crates/icrate/src/generated/AppKit/NSDataAsset.rs b/crates/icrate/src/generated/AppKit/NSDataAsset.rs index 63ef4ac32..c5823eff4 100644 --- a/crates/icrate/src/generated/AppKit/NSDataAsset.rs +++ b/crates/icrate/src/generated/AppKit/NSDataAsset.rs @@ -1,31 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSDataAssetName = NSString; + extern_class!( #[derive(Debug)] pub struct NSDataAsset; + unsafe impl ClassType for NSDataAsset { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDataAsset { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithName:)] pub unsafe fn initWithName(&self, name: &NSDataAssetName) -> Option>; + #[method_id(initWithName:bundle:)] pub unsafe fn initWithName_bundle( &self, name: &NSDataAssetName, bundle: &NSBundle, ) -> Option>; + #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method_id(data)] pub unsafe fn data(&self) -> Id; + #[method_id(typeIdentifier)] pub unsafe fn typeIdentifier(&self) -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSDatePicker.rs b/crates/icrate/src/generated/AppKit/NSDatePicker.rs index e24646ae0..d1222afea 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePicker.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePicker.rs @@ -1,82 +1,120 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDatePicker; + unsafe impl ClassType for NSDatePicker { type Super = NSControl; } ); + extern_methods!( unsafe impl NSDatePicker { #[method(datePickerStyle)] pub unsafe fn datePickerStyle(&self) -> NSDatePickerStyle; + #[method(setDatePickerStyle:)] pub unsafe fn setDatePickerStyle(&self, datePickerStyle: NSDatePickerStyle); + #[method(isBezeled)] pub unsafe fn isBezeled(&self) -> bool; + #[method(setBezeled:)] pub unsafe fn setBezeled(&self, bezeled: bool); + #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method_id(textColor)] pub unsafe fn textColor(&self) -> Id; + #[method(setTextColor:)] pub unsafe fn setTextColor(&self, textColor: &NSColor); + #[method(datePickerMode)] pub unsafe fn datePickerMode(&self) -> NSDatePickerMode; + #[method(setDatePickerMode:)] pub unsafe fn setDatePickerMode(&self, datePickerMode: NSDatePickerMode); + #[method(datePickerElements)] pub unsafe fn datePickerElements(&self) -> NSDatePickerElementFlags; + #[method(setDatePickerElements:)] pub unsafe fn setDatePickerElements(&self, datePickerElements: NSDatePickerElementFlags); + #[method_id(calendar)] pub unsafe fn calendar(&self) -> Option>; + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(locale)] pub unsafe fn locale(&self) -> Option>; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Option>; + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method_id(dateValue)] pub unsafe fn dateValue(&self) -> Id; + #[method(setDateValue:)] pub unsafe fn setDateValue(&self, dateValue: &NSDate); + #[method(timeInterval)] pub unsafe fn timeInterval(&self) -> NSTimeInterval; + #[method(setTimeInterval:)] pub unsafe fn setTimeInterval(&self, timeInterval: NSTimeInterval); + #[method_id(minDate)] pub unsafe fn minDate(&self) -> Option>; + #[method(setMinDate:)] pub unsafe fn setMinDate(&self, minDate: Option<&NSDate>); + #[method_id(maxDate)] pub unsafe fn maxDate(&self) -> Option>; + #[method(setMaxDate:)] pub unsafe fn setMaxDate(&self, maxDate: Option<&NSDate>); + #[method(presentsCalendarOverlay)] pub unsafe fn presentsCalendarOverlay(&self) -> bool; + #[method(setPresentsCalendarOverlay:)] pub unsafe fn setPresentsCalendarOverlay(&self, presentsCalendarOverlay: bool); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSDatePickerCellDelegate>); } diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index 205d3f430..d73e0890b 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -1,78 +1,114 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDatePickerCell; + unsafe impl ClassType for NSDatePickerCell { type Super = NSActionCell; } ); + extern_methods!( unsafe impl NSDatePickerCell { #[method_id(initTextCell:)] pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initImageCell:)] pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method(datePickerStyle)] pub unsafe fn datePickerStyle(&self) -> NSDatePickerStyle; + #[method(setDatePickerStyle:)] pub unsafe fn setDatePickerStyle(&self, datePickerStyle: NSDatePickerStyle); + #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method_id(textColor)] pub unsafe fn textColor(&self) -> Id; + #[method(setTextColor:)] pub unsafe fn setTextColor(&self, textColor: &NSColor); + #[method(datePickerMode)] pub unsafe fn datePickerMode(&self) -> NSDatePickerMode; + #[method(setDatePickerMode:)] pub unsafe fn setDatePickerMode(&self, datePickerMode: NSDatePickerMode); + #[method(datePickerElements)] pub unsafe fn datePickerElements(&self) -> NSDatePickerElementFlags; + #[method(setDatePickerElements:)] pub unsafe fn setDatePickerElements(&self, datePickerElements: NSDatePickerElementFlags); + #[method_id(calendar)] pub unsafe fn calendar(&self) -> Option>; + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(locale)] pub unsafe fn locale(&self) -> Option>; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Option>; + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method_id(dateValue)] pub unsafe fn dateValue(&self) -> Id; + #[method(setDateValue:)] pub unsafe fn setDateValue(&self, dateValue: &NSDate); + #[method(timeInterval)] pub unsafe fn timeInterval(&self) -> NSTimeInterval; + #[method(setTimeInterval:)] pub unsafe fn setTimeInterval(&self, timeInterval: NSTimeInterval); + #[method_id(minDate)] pub unsafe fn minDate(&self) -> Option>; + #[method(setMinDate:)] pub unsafe fn setMinDate(&self, minDate: Option<&NSDate>); + #[method_id(maxDate)] pub unsafe fn maxDate(&self) -> Option>; + #[method(setMaxDate:)] pub unsafe fn setMaxDate(&self, maxDate: Option<&NSDate>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSDatePickerCellDelegate>); } ); + pub type NSDatePickerCellDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs index ab42d7189..a5a7a5c61 100644 --- a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs +++ b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs @@ -1,71 +1,98 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDictionaryControllerKeyValuePair; + unsafe impl ClassType for NSDictionaryControllerKeyValuePair { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDictionaryControllerKeyValuePair { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(key)] pub unsafe fn key(&self) -> Option>; + #[method(setKey:)] pub unsafe fn setKey(&self, key: Option<&NSString>); + #[method_id(value)] pub unsafe fn value(&self) -> Option>; + #[method(setValue:)] pub unsafe fn setValue(&self, value: Option<&Object>); + #[method_id(localizedKey)] pub unsafe fn localizedKey(&self) -> Option>; + #[method(setLocalizedKey:)] pub unsafe fn setLocalizedKey(&self, localizedKey: Option<&NSString>); + #[method(isExplicitlyIncluded)] pub unsafe fn isExplicitlyIncluded(&self) -> bool; } ); + extern_class!( #[derive(Debug)] pub struct NSDictionaryController; + unsafe impl ClassType for NSDictionaryController { type Super = NSArrayController; } ); + extern_methods!( unsafe impl NSDictionaryController { #[method_id(newObject)] pub unsafe fn newObject(&self) -> Id; + #[method_id(initialKey)] pub unsafe fn initialKey(&self) -> Id; + #[method(setInitialKey:)] pub unsafe fn setInitialKey(&self, initialKey: &NSString); + #[method_id(initialValue)] pub unsafe fn initialValue(&self) -> Id; + #[method(setInitialValue:)] pub unsafe fn setInitialValue(&self, initialValue: &Object); + #[method_id(includedKeys)] pub unsafe fn includedKeys(&self) -> Id, Shared>; + #[method(setIncludedKeys:)] pub unsafe fn setIncludedKeys(&self, includedKeys: &NSArray); + #[method_id(excludedKeys)] pub unsafe fn excludedKeys(&self) -> Id, Shared>; + #[method(setExcludedKeys:)] pub unsafe fn setExcludedKeys(&self, excludedKeys: &NSArray); + #[method_id(localizedKeyDictionary)] pub unsafe fn localizedKeyDictionary(&self) -> Id, Shared>; + #[method(setLocalizedKeyDictionary:)] pub unsafe fn setLocalizedKeyDictionary( &self, localizedKeyDictionary: &NSDictionary, ); + #[method_id(localizedKeyTable)] pub unsafe fn localizedKeyTable(&self) -> Option>; + #[method(setLocalizedKeyTable:)] pub unsafe fn setLocalizedKeyTable(&self, localizedKeyTable: Option<&NSString>); } diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index 80705d00d..d012a3c4e 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -1,125 +1,154 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSDiffableDataSourceSnapshot< SectionIdentifierType: Message, ItemIdentifierType: Message, >; + unsafe impl ClassType for NSDiffableDataSourceSnapshot { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDiffableDataSourceSnapshot { #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(numberOfSections)] pub unsafe fn numberOfSections(&self) -> NSInteger; + #[method_id(sectionIdentifiers)] pub unsafe fn sectionIdentifiers(&self) -> Id, Shared>; + #[method_id(itemIdentifiers)] pub unsafe fn itemIdentifiers(&self) -> Id, Shared>; + #[method(numberOfItemsInSection:)] pub unsafe fn numberOfItemsInSection( &self, sectionIdentifier: &SectionIdentifierType, ) -> NSInteger; + #[method_id(itemIdentifiersInSectionWithIdentifier:)] pub unsafe fn itemIdentifiersInSectionWithIdentifier( &self, sectionIdentifier: &SectionIdentifierType, ) -> Id, Shared>; + #[method_id(sectionIdentifierForSectionContainingItemIdentifier:)] pub unsafe fn sectionIdentifierForSectionContainingItemIdentifier( &self, itemIdentifier: &ItemIdentifierType, ) -> Option>; + #[method(indexOfItemIdentifier:)] pub unsafe fn indexOfItemIdentifier( &self, itemIdentifier: &ItemIdentifierType, ) -> NSInteger; + #[method(indexOfSectionIdentifier:)] pub unsafe fn indexOfSectionIdentifier( &self, sectionIdentifier: &SectionIdentifierType, ) -> NSInteger; + #[method(appendItemsWithIdentifiers:)] pub unsafe fn appendItemsWithIdentifiers(&self, identifiers: &NSArray); + #[method(appendItemsWithIdentifiers:intoSectionWithIdentifier:)] pub unsafe fn appendItemsWithIdentifiers_intoSectionWithIdentifier( &self, identifiers: &NSArray, sectionIdentifier: &SectionIdentifierType, ); + #[method(insertItemsWithIdentifiers:beforeItemWithIdentifier:)] pub unsafe fn insertItemsWithIdentifiers_beforeItemWithIdentifier( &self, identifiers: &NSArray, itemIdentifier: &ItemIdentifierType, ); + #[method(insertItemsWithIdentifiers:afterItemWithIdentifier:)] pub unsafe fn insertItemsWithIdentifiers_afterItemWithIdentifier( &self, identifiers: &NSArray, itemIdentifier: &ItemIdentifierType, ); + #[method(deleteItemsWithIdentifiers:)] pub unsafe fn deleteItemsWithIdentifiers(&self, identifiers: &NSArray); + #[method(deleteAllItems)] pub unsafe fn deleteAllItems(&self); + #[method(moveItemWithIdentifier:beforeItemWithIdentifier:)] pub unsafe fn moveItemWithIdentifier_beforeItemWithIdentifier( &self, fromIdentifier: &ItemIdentifierType, toIdentifier: &ItemIdentifierType, ); + #[method(moveItemWithIdentifier:afterItemWithIdentifier:)] pub unsafe fn moveItemWithIdentifier_afterItemWithIdentifier( &self, fromIdentifier: &ItemIdentifierType, toIdentifier: &ItemIdentifierType, ); + #[method(reloadItemsWithIdentifiers:)] pub unsafe fn reloadItemsWithIdentifiers(&self, identifiers: &NSArray); + #[method(appendSectionsWithIdentifiers:)] pub unsafe fn appendSectionsWithIdentifiers(&self, sectionIdentifiers: &NSArray); + #[method(insertSectionsWithIdentifiers:beforeSectionWithIdentifier:)] pub unsafe fn insertSectionsWithIdentifiers_beforeSectionWithIdentifier( &self, sectionIdentifiers: &NSArray, toSectionIdentifier: &SectionIdentifierType, ); + #[method(insertSectionsWithIdentifiers:afterSectionWithIdentifier:)] pub unsafe fn insertSectionsWithIdentifiers_afterSectionWithIdentifier( &self, sectionIdentifiers: &NSArray, toSectionIdentifier: &SectionIdentifierType, ); + #[method(deleteSectionsWithIdentifiers:)] pub unsafe fn deleteSectionsWithIdentifiers( &self, sectionIdentifiers: &NSArray, ); + #[method(moveSectionWithIdentifier:beforeSectionWithIdentifier:)] pub unsafe fn moveSectionWithIdentifier_beforeSectionWithIdentifier( &self, fromSectionIdentifier: &SectionIdentifierType, toSectionIdentifier: &SectionIdentifierType, ); + #[method(moveSectionWithIdentifier:afterSectionWithIdentifier:)] pub unsafe fn moveSectionWithIdentifier_afterSectionWithIdentifier( &self, fromSectionIdentifier: &SectionIdentifierType, toSectionIdentifier: &SectionIdentifierType, ); + #[method(reloadSectionsWithIdentifiers:)] pub unsafe fn reloadSectionsWithIdentifiers( &self, @@ -127,18 +156,21 @@ extern_methods!( ); } ); + __inner_extern_class!( #[derive(Debug)] pub struct NSCollectionViewDiffableDataSource< SectionIdentifierType: Message, ItemIdentifierType: Message, >; + unsafe impl ClassType for NSCollectionViewDiffableDataSource { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCollectionViewDiffableDataSource @@ -149,34 +181,42 @@ extern_methods!( collectionView: &NSCollectionView, itemProvider: NSCollectionViewDiffableDataSourceItemProvider, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(snapshot)] pub unsafe fn snapshot( &self, ) -> Id, Shared>; + #[method(applySnapshot:animatingDifferences:)] pub unsafe fn applySnapshot_animatingDifferences( &self, snapshot: &NSDiffableDataSourceSnapshot, animatingDifferences: bool, ); + #[method_id(itemIdentifierForIndexPath:)] pub unsafe fn itemIdentifierForIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; + #[method_id(indexPathForItemIdentifier:)] pub unsafe fn indexPathForItemIdentifier( &self, identifier: &ItemIdentifierType, ) -> Option>; + #[method(supplementaryViewProvider)] pub unsafe fn supplementaryViewProvider( &self, ) -> NSCollectionViewDiffableDataSourceSupplementaryViewProvider; + #[method(setSupplementaryViewProvider:)] pub unsafe fn setSupplementaryViewProvider( &self, diff --git a/crates/icrate/src/generated/AppKit/NSDockTile.rs b/crates/icrate/src/generated/AppKit/NSDockTile.rs index fe727bebb..e77c023db 100644 --- a/crates/icrate/src/generated/AppKit/NSDockTile.rs +++ b/crates/icrate/src/generated/AppKit/NSDockTile.rs @@ -1,34 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDockTile; + unsafe impl ClassType for NSDockTile { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDockTile { #[method(size)] pub unsafe fn size(&self) -> NSSize; + #[method_id(contentView)] pub unsafe fn contentView(&self) -> Option>; + #[method(setContentView:)] pub unsafe fn setContentView(&self, contentView: Option<&NSView>); + #[method(display)] pub unsafe fn display(&self); + #[method(showsApplicationBadge)] pub unsafe fn showsApplicationBadge(&self) -> bool; + #[method(setShowsApplicationBadge:)] pub unsafe fn setShowsApplicationBadge(&self, showsApplicationBadge: bool); + #[method_id(badgeLabel)] pub unsafe fn badgeLabel(&self) -> Option>; + #[method(setBadgeLabel:)] pub unsafe fn setBadgeLabel(&self, badgeLabel: Option<&NSString>); + #[method_id(owner)] pub unsafe fn owner(&self) -> Option>; } ); + pub type NSDockTilePlugIn = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index f2d0b49d9..d6ef6d051 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -1,31 +1,40 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDocument; + unsafe impl ClassType for NSDocument { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDocument { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithType:error:)] pub unsafe fn initWithType_error( &self, typeName: &NSString, ) -> Result, Id>; + #[method(canConcurrentlyReadDocumentsOfType:)] pub unsafe fn canConcurrentlyReadDocumentsOfType(typeName: &NSString) -> bool; + #[method_id(initWithContentsOfURL:ofType:error:)] pub unsafe fn initWithContentsOfURL_ofType_error( &self, url: &NSURL, typeName: &NSString, ) -> Result, Id>; + #[method_id(initForURL:withContentsOfURL:ofType:error:)] pub unsafe fn initForURL_withContentsOfURL_ofType_error( &self, @@ -33,84 +42,109 @@ extern_methods!( contentsURL: &NSURL, typeName: &NSString, ) -> Result, Id>; + #[method_id(fileType)] pub unsafe fn fileType(&self) -> Option>; + #[method(setFileType:)] pub unsafe fn setFileType(&self, fileType: Option<&NSString>); + #[method_id(fileURL)] pub unsafe fn fileURL(&self) -> Option>; + #[method(setFileURL:)] pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>); + #[method_id(fileModificationDate)] pub unsafe fn fileModificationDate(&self) -> Option>; + #[method(setFileModificationDate:)] pub unsafe fn setFileModificationDate(&self, fileModificationDate: Option<&NSDate>); + #[method(isDraft)] pub unsafe fn isDraft(&self) -> bool; + #[method(setDraft:)] pub unsafe fn setDraft(&self, draft: bool); + #[method(performActivityWithSynchronousWaiting:usingBlock:)] pub unsafe fn performActivityWithSynchronousWaiting_usingBlock( &self, waitSynchronously: bool, block: TodoBlock, ); + #[method(continueActivityUsingBlock:)] pub unsafe fn continueActivityUsingBlock(&self, block: TodoBlock); + #[method(continueAsynchronousWorkOnMainThreadUsingBlock:)] pub unsafe fn continueAsynchronousWorkOnMainThreadUsingBlock(&self, block: TodoBlock); + #[method(performSynchronousFileAccessUsingBlock:)] pub unsafe fn performSynchronousFileAccessUsingBlock(&self, block: TodoBlock); + #[method(performAsynchronousFileAccessUsingBlock:)] pub unsafe fn performAsynchronousFileAccessUsingBlock(&self, block: TodoBlock); + #[method(revertDocumentToSaved:)] pub unsafe fn revertDocumentToSaved(&self, sender: Option<&Object>); + #[method(revertToContentsOfURL:ofType:error:)] pub unsafe fn revertToContentsOfURL_ofType_error( &self, url: &NSURL, typeName: &NSString, ) -> Result<(), Id>; + #[method(readFromURL:ofType:error:)] pub unsafe fn readFromURL_ofType_error( &self, url: &NSURL, typeName: &NSString, ) -> Result<(), Id>; + #[method(readFromFileWrapper:ofType:error:)] pub unsafe fn readFromFileWrapper_ofType_error( &self, fileWrapper: &NSFileWrapper, typeName: &NSString, ) -> Result<(), Id>; + #[method(readFromData:ofType:error:)] pub unsafe fn readFromData_ofType_error( &self, data: &NSData, typeName: &NSString, ) -> Result<(), Id>; + #[method(isEntireFileLoaded)] pub unsafe fn isEntireFileLoaded(&self) -> bool; + #[method(writeToURL:ofType:error:)] pub unsafe fn writeToURL_ofType_error( &self, url: &NSURL, typeName: &NSString, ) -> Result<(), Id>; + #[method_id(fileWrapperOfType:error:)] pub unsafe fn fileWrapperOfType_error( &self, typeName: &NSString, ) -> Result, Id>; + #[method_id(dataOfType:error:)] pub unsafe fn dataOfType_error( &self, typeName: &NSString, ) -> Result, Id>; + #[method(unblockUserInteraction)] pub unsafe fn unblockUserInteraction(&self); + #[method(autosavingIsImplicitlyCancellable)] pub unsafe fn autosavingIsImplicitlyCancellable(&self) -> bool; + #[method(writeSafelyToURL:ofType:forSaveOperation:error:)] pub unsafe fn writeSafelyToURL_ofType_forSaveOperation_error( &self, @@ -118,6 +152,7 @@ extern_methods!( typeName: &NSString, saveOperation: NSSaveOperationType, ) -> Result<(), Id>; + #[method(writeToURL:ofType:forSaveOperation:originalContentsURL:error:)] pub unsafe fn writeToURL_ofType_forSaveOperation_originalContentsURL_error( &self, @@ -126,6 +161,7 @@ extern_methods!( saveOperation: NSSaveOperationType, absoluteOriginalContentsURL: Option<&NSURL>, ) -> Result<(), Id>; + #[method_id(fileAttributesToWriteToURL:ofType:forSaveOperation:originalContentsURL:error:)] pub unsafe fn fileAttributesToWriteToURL_ofType_forSaveOperation_originalContentsURL_error( &self, @@ -134,16 +170,22 @@ extern_methods!( saveOperation: NSSaveOperationType, absoluteOriginalContentsURL: Option<&NSURL>, ) -> Result, Shared>, Id>; + #[method(keepBackupFile)] pub unsafe fn keepBackupFile(&self) -> bool; + #[method_id(backupFileURL)] pub unsafe fn backupFileURL(&self) -> Option>; + #[method(saveDocument:)] pub unsafe fn saveDocument(&self, sender: Option<&Object>); + #[method(saveDocumentAs:)] pub unsafe fn saveDocumentAs(&self, sender: Option<&Object>); + #[method(saveDocumentTo:)] pub unsafe fn saveDocumentTo(&self, sender: Option<&Object>); + #[method(saveDocumentWithDelegate:didSaveSelector:contextInfo:)] pub unsafe fn saveDocumentWithDelegate_didSaveSelector_contextInfo( &self, @@ -151,6 +193,7 @@ extern_methods!( didSaveSelector: Option, contextInfo: *mut c_void, ); + #[method(runModalSavePanelForSaveOperation:delegate:didSaveSelector:contextInfo:)] pub unsafe fn runModalSavePanelForSaveOperation_delegate_didSaveSelector_contextInfo( &self, @@ -159,14 +202,19 @@ extern_methods!( didSaveSelector: Option, contextInfo: *mut c_void, ); + #[method(shouldRunSavePanelWithAccessoryView)] pub unsafe fn shouldRunSavePanelWithAccessoryView(&self) -> bool; + #[method(prepareSavePanel:)] pub unsafe fn prepareSavePanel(&self, savePanel: &NSSavePanel) -> bool; + #[method(fileNameExtensionWasHiddenInLastRunSavePanel)] pub unsafe fn fileNameExtensionWasHiddenInLastRunSavePanel(&self) -> bool; + #[method_id(fileTypeFromLastRunSavePanel)] pub unsafe fn fileTypeFromLastRunSavePanel(&self) -> Option>; + #[method(saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:)] pub unsafe fn saveToURL_ofType_forSaveOperation_delegate_didSaveSelector_contextInfo( &self, @@ -177,6 +225,7 @@ extern_methods!( didSaveSelector: Option, contextInfo: *mut c_void, ); + #[method(saveToURL:ofType:forSaveOperation:completionHandler:)] pub unsafe fn saveToURL_ofType_forSaveOperation_completionHandler( &self, @@ -185,6 +234,7 @@ extern_methods!( saveOperation: NSSaveOperationType, completionHandler: TodoBlock, ); + #[method(canAsynchronouslyWriteToURL:ofType:forSaveOperation:)] pub unsafe fn canAsynchronouslyWriteToURL_ofType_forSaveOperation( &self, @@ -192,13 +242,17 @@ extern_methods!( typeName: &NSString, saveOperation: NSSaveOperationType, ) -> bool; + #[method(checkAutosavingSafetyAndReturnError:)] pub unsafe fn checkAutosavingSafetyAndReturnError(&self) -> Result<(), Id>; + #[method(scheduleAutosaving)] pub unsafe fn scheduleAutosaving(&self); + #[method(hasUnautosavedChanges)] pub unsafe fn hasUnautosavedChanges(&self) -> bool; + #[method(autosaveDocumentWithDelegate:didAutosaveSelector:contextInfo:)] pub unsafe fn autosaveDocumentWithDelegate_didAutosaveSelector_contextInfo( &self, @@ -206,33 +260,44 @@ extern_methods!( didAutosaveSelector: Option, contextInfo: *mut c_void, ); + #[method(autosaveWithImplicitCancellability:completionHandler:)] pub unsafe fn autosaveWithImplicitCancellability_completionHandler( &self, autosavingIsImplicitlyCancellable: bool, completionHandler: TodoBlock, ); + #[method(autosavesInPlace)] pub unsafe fn autosavesInPlace() -> bool; + #[method(preservesVersions)] pub unsafe fn preservesVersions() -> bool; + #[method(browseDocumentVersions:)] pub unsafe fn browseDocumentVersions(&self, sender: Option<&Object>); + #[method(isBrowsingVersions)] pub unsafe fn isBrowsingVersions(&self) -> bool; + #[method(stopBrowsingVersionsWithCompletionHandler:)] pub unsafe fn stopBrowsingVersionsWithCompletionHandler( &self, completionHandler: TodoBlock, ); + #[method(autosavesDrafts)] pub unsafe fn autosavesDrafts() -> bool; + #[method_id(autosavingFileType)] pub unsafe fn autosavingFileType(&self) -> Option>; + #[method_id(autosavedContentsFileURL)] pub unsafe fn autosavedContentsFileURL(&self) -> Option>; + #[method(setAutosavedContentsFileURL:)] pub unsafe fn setAutosavedContentsFileURL(&self, autosavedContentsFileURL: Option<&NSURL>); + #[method(canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:)] pub unsafe fn canCloseDocumentWithDelegate_shouldCloseSelector_contextInfo( &self, @@ -240,10 +305,13 @@ extern_methods!( shouldCloseSelector: Option, contextInfo: *mut c_void, ); + #[method(close)] pub unsafe fn close(&self); + #[method(duplicateDocument:)] pub unsafe fn duplicateDocument(&self, sender: Option<&Object>); + #[method(duplicateDocumentWithDelegate:didDuplicateSelector:contextInfo:)] pub unsafe fn duplicateDocumentWithDelegate_didDuplicateSelector_contextInfo( &self, @@ -251,36 +319,51 @@ extern_methods!( didDuplicateSelector: Option, contextInfo: *mut c_void, ); + #[method_id(duplicateAndReturnError:)] pub unsafe fn duplicateAndReturnError( &self, ) -> Result, Id>; + #[method(renameDocument:)] pub unsafe fn renameDocument(&self, sender: Option<&Object>); + #[method(moveDocumentToUbiquityContainer:)] pub unsafe fn moveDocumentToUbiquityContainer(&self, sender: Option<&Object>); + #[method(moveDocument:)] pub unsafe fn moveDocument(&self, sender: Option<&Object>); + #[method(moveDocumentWithCompletionHandler:)] pub unsafe fn moveDocumentWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(moveToURL:completionHandler:)] pub unsafe fn moveToURL_completionHandler(&self, url: &NSURL, completionHandler: TodoBlock); + #[method(lockDocument:)] pub unsafe fn lockDocument(&self, sender: Option<&Object>); + #[method(unlockDocument:)] pub unsafe fn unlockDocument(&self, sender: Option<&Object>); + #[method(lockDocumentWithCompletionHandler:)] pub unsafe fn lockDocumentWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(lockWithCompletionHandler:)] pub unsafe fn lockWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(unlockDocumentWithCompletionHandler:)] pub unsafe fn unlockDocumentWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(unlockWithCompletionHandler:)] pub unsafe fn unlockWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(isLocked)] pub unsafe fn isLocked(&self) -> bool; + #[method(runPageLayout:)] pub unsafe fn runPageLayout(&self, sender: Option<&Object>); + #[method(runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:)] pub unsafe fn runModalPageLayoutWithPrintInfo_delegate_didRunSelector_contextInfo( &self, @@ -289,16 +372,22 @@ extern_methods!( didRunSelector: Option, contextInfo: *mut c_void, ); + #[method(preparePageLayout:)] pub unsafe fn preparePageLayout(&self, pageLayout: &NSPageLayout) -> bool; + #[method(shouldChangePrintInfo:)] pub unsafe fn shouldChangePrintInfo(&self, newPrintInfo: &NSPrintInfo) -> bool; + #[method_id(printInfo)] pub unsafe fn printInfo(&self) -> Id; + #[method(setPrintInfo:)] pub unsafe fn setPrintInfo(&self, printInfo: &NSPrintInfo); + #[method(printDocument:)] pub unsafe fn printDocument(&self, sender: Option<&Object>); + #[method(printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo:)] pub unsafe fn printDocumentWithSettings_showPrintPanel_delegate_didPrintSelector_contextInfo( &self, @@ -308,11 +397,13 @@ extern_methods!( didPrintSelector: Option, contextInfo: *mut c_void, ); + #[method_id(printOperationWithSettings:error:)] pub unsafe fn printOperationWithSettings_error( &self, printSettings: &NSDictionary, ) -> Result, Id>; + #[method(runModalPrintOperation:delegate:didRunSelector:contextInfo:)] pub unsafe fn runModalPrintOperation_delegate_didRunSelector_contextInfo( &self, @@ -321,48 +412,63 @@ extern_methods!( didRunSelector: Option, contextInfo: *mut c_void, ); + #[method(saveDocumentToPDF:)] pub unsafe fn saveDocumentToPDF(&self, sender: Option<&Object>); + #[method_id(PDFPrintOperation)] pub unsafe fn PDFPrintOperation(&self) -> Id; + #[method(allowsDocumentSharing)] pub unsafe fn allowsDocumentSharing(&self) -> bool; + #[method(shareDocumentWithSharingService:completionHandler:)] pub unsafe fn shareDocumentWithSharingService_completionHandler( &self, sharingService: &NSSharingService, completionHandler: TodoBlock, ); + #[method(prepareSharingServicePicker:)] pub unsafe fn prepareSharingServicePicker( &self, sharingServicePicker: &NSSharingServicePicker, ); + #[method(isDocumentEdited)] pub unsafe fn isDocumentEdited(&self) -> bool; + #[method(isInViewingMode)] pub unsafe fn isInViewingMode(&self) -> bool; + #[method(updateChangeCount:)] pub unsafe fn updateChangeCount(&self, change: NSDocumentChangeType); + #[method_id(changeCountTokenForSaveOperation:)] pub unsafe fn changeCountTokenForSaveOperation( &self, saveOperation: NSSaveOperationType, ) -> Id; + #[method(updateChangeCountWithToken:forSaveOperation:)] pub unsafe fn updateChangeCountWithToken_forSaveOperation( &self, changeCountToken: &Object, saveOperation: NSSaveOperationType, ); + #[method_id(undoManager)] pub unsafe fn undoManager(&self) -> Option>; + #[method(setUndoManager:)] pub unsafe fn setUndoManager(&self, undoManager: Option<&NSUndoManager>); + #[method(hasUndoManager)] pub unsafe fn hasUndoManager(&self) -> bool; + #[method(setHasUndoManager:)] pub unsafe fn setHasUndoManager(&self, hasUndoManager: bool); + #[method(presentError:modalForWindow:delegate:didPresentSelector:contextInfo:)] pub unsafe fn presentError_modalForWindow_delegate_didPresentSelector_contextInfo( &self, @@ -372,30 +478,43 @@ extern_methods!( didPresentSelector: Option, contextInfo: *mut c_void, ); + #[method(presentError:)] pub unsafe fn presentError(&self, error: &NSError) -> bool; + #[method_id(willPresentError:)] pub unsafe fn willPresentError(&self, error: &NSError) -> Id; + #[method(willNotPresentError:)] pub unsafe fn willNotPresentError(&self, error: &NSError); + #[method(makeWindowControllers)] pub unsafe fn makeWindowControllers(&self); + #[method_id(windowNibName)] pub unsafe fn windowNibName(&self) -> Option>; + #[method(windowControllerWillLoadNib:)] pub unsafe fn windowControllerWillLoadNib(&self, windowController: &NSWindowController); + #[method(windowControllerDidLoadNib:)] pub unsafe fn windowControllerDidLoadNib(&self, windowController: &NSWindowController); + #[method(setWindow:)] pub unsafe fn setWindow(&self, window: Option<&NSWindow>); + #[method(addWindowController:)] pub unsafe fn addWindowController(&self, windowController: &NSWindowController); + #[method(removeWindowController:)] pub unsafe fn removeWindowController(&self, windowController: &NSWindowController); + #[method(showWindows)] pub unsafe fn showWindows(&self); + #[method_id(windowControllers)] pub unsafe fn windowControllers(&self) -> Id, Shared>; + #[method(shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:)] pub unsafe fn shouldCloseWindowController_delegate_shouldCloseSelector_contextInfo( &self, @@ -404,40 +523,52 @@ extern_methods!( shouldCloseSelector: Option, contextInfo: *mut c_void, ); + #[method_id(displayName)] pub unsafe fn displayName(&self) -> Id; + #[method(setDisplayName:)] pub unsafe fn setDisplayName(&self, displayName: Option<&NSString>); + #[method_id(defaultDraftName)] pub unsafe fn defaultDraftName(&self) -> Id; + #[method_id(windowForSheet)] pub unsafe fn windowForSheet(&self) -> Option>; + #[method_id(readableTypes)] pub unsafe fn readableTypes() -> Id, Shared>; + #[method_id(writableTypes)] pub unsafe fn writableTypes() -> Id, Shared>; + #[method(isNativeType:)] pub unsafe fn isNativeType(type_: &NSString) -> bool; + #[method_id(writableTypesForSaveOperation:)] pub unsafe fn writableTypesForSaveOperation( &self, saveOperation: NSSaveOperationType, ) -> Id, Shared>; + #[method_id(fileNameExtensionForType:saveOperation:)] pub unsafe fn fileNameExtensionForType_saveOperation( &self, typeName: &NSString, saveOperation: NSSaveOperationType, ) -> Option>; + #[method(validateUserInterfaceItem:)] pub unsafe fn validateUserInterfaceItem(&self, item: &NSValidatedUserInterfaceItem) -> bool; + #[method(usesUbiquitousStorage)] pub unsafe fn usesUbiquitousStorage() -> bool; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSDocument { #[method(saveToURL:ofType:forSaveOperation:error:)] pub unsafe fn saveToURL_ofType_forSaveOperation_error( @@ -446,11 +577,13 @@ extern_methods!( typeName: &NSString, saveOperation: NSSaveOperationType, ) -> Result<(), Id>; + #[method_id(dataRepresentationOfType:)] pub unsafe fn dataRepresentationOfType( &self, type_: &NSString, ) -> Option>; + #[method_id(fileAttributesToWriteToFile:ofType:saveOperation:)] pub unsafe fn fileAttributesToWriteToFile_ofType_saveOperation( &self, @@ -458,50 +591,63 @@ extern_methods!( documentTypeName: &NSString, saveOperationType: NSSaveOperationType, ) -> Option>; + #[method_id(fileName)] pub unsafe fn fileName(&self) -> Option>; + #[method_id(fileWrapperRepresentationOfType:)] pub unsafe fn fileWrapperRepresentationOfType( &self, type_: &NSString, ) -> Option>; + #[method_id(initWithContentsOfFile:ofType:)] pub unsafe fn initWithContentsOfFile_ofType( &self, absolutePath: &NSString, typeName: &NSString, ) -> Option>; + #[method_id(initWithContentsOfURL:ofType:)] pub unsafe fn initWithContentsOfURL_ofType( &self, url: &NSURL, typeName: &NSString, ) -> Option>; + #[method(loadDataRepresentation:ofType:)] pub unsafe fn loadDataRepresentation_ofType(&self, data: &NSData, type_: &NSString) -> bool; + #[method(loadFileWrapperRepresentation:ofType:)] pub unsafe fn loadFileWrapperRepresentation_ofType( &self, wrapper: &NSFileWrapper, type_: &NSString, ) -> bool; + #[method(printShowingPrintPanel:)] pub unsafe fn printShowingPrintPanel(&self, flag: bool); + #[method(readFromFile:ofType:)] pub unsafe fn readFromFile_ofType(&self, fileName: &NSString, type_: &NSString) -> bool; + #[method(readFromURL:ofType:)] pub unsafe fn readFromURL_ofType(&self, url: &NSURL, type_: &NSString) -> bool; + #[method(revertToSavedFromFile:ofType:)] pub unsafe fn revertToSavedFromFile_ofType( &self, fileName: &NSString, type_: &NSString, ) -> bool; + #[method(revertToSavedFromURL:ofType:)] pub unsafe fn revertToSavedFromURL_ofType(&self, url: &NSURL, type_: &NSString) -> bool; + #[method(runModalPageLayoutWithPrintInfo:)] pub unsafe fn runModalPageLayoutWithPrintInfo(&self, printInfo: &NSPrintInfo) -> NSInteger; + #[method(saveToFile:saveOperation:delegate:didSaveSelector:contextInfo:)] pub unsafe fn saveToFile_saveOperation_delegate_didSaveSelector_contextInfo( &self, @@ -511,10 +657,13 @@ extern_methods!( didSaveSelector: Option, contextInfo: *mut c_void, ); + #[method(setFileName:)] pub unsafe fn setFileName(&self, fileName: Option<&NSString>); + #[method(writeToFile:ofType:)] pub unsafe fn writeToFile_ofType(&self, fileName: &NSString, type_: &NSString) -> bool; + #[method(writeToFile:ofType:originalFile:saveOperation:)] pub unsafe fn writeToFile_ofType_originalFile_saveOperation( &self, @@ -523,8 +672,10 @@ extern_methods!( fullOriginalDocumentPath: Option<&NSString>, saveOperationType: NSSaveOperationType, ) -> bool; + #[method(writeToURL:ofType:)] pub unsafe fn writeToURL_ofType(&self, url: &NSURL, type_: &NSString) -> bool; + #[method(writeWithBackupToFile:ofType:saveOperation:)] pub unsafe fn writeWithBackupToFile_ofType_saveOperation( &self, diff --git a/crates/icrate/src/generated/AppKit/NSDocumentController.rs b/crates/icrate/src/generated/AppKit/NSDocumentController.rs index 19372367c..c55d2e609 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentController.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentController.rs @@ -1,61 +1,83 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDocumentController; + unsafe impl ClassType for NSDocumentController { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDocumentController { #[method_id(sharedDocumentController)] pub unsafe fn sharedDocumentController() -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(documents)] pub unsafe fn documents(&self) -> Id, Shared>; + #[method_id(currentDocument)] pub unsafe fn currentDocument(&self) -> Option>; + #[method_id(currentDirectory)] pub unsafe fn currentDirectory(&self) -> Option>; + #[method_id(documentForURL:)] pub unsafe fn documentForURL(&self, url: &NSURL) -> Option>; + #[method_id(documentForWindow:)] pub unsafe fn documentForWindow(&self, window: &NSWindow) -> Option>; + #[method(addDocument:)] pub unsafe fn addDocument(&self, document: &NSDocument); + #[method(removeDocument:)] pub unsafe fn removeDocument(&self, document: &NSDocument); + #[method(newDocument:)] pub unsafe fn newDocument(&self, sender: Option<&Object>); + #[method_id(openUntitledDocumentAndDisplay:error:)] pub unsafe fn openUntitledDocumentAndDisplay_error( &self, displayDocument: bool, ) -> Result, Id>; + #[method_id(makeUntitledDocumentOfType:error:)] pub unsafe fn makeUntitledDocumentOfType_error( &self, typeName: &NSString, ) -> Result, Id>; + #[method(openDocument:)] pub unsafe fn openDocument(&self, sender: Option<&Object>); + #[method_id(URLsFromRunningOpenPanel)] pub unsafe fn URLsFromRunningOpenPanel(&self) -> Option, Shared>>; + #[method(runModalOpenPanel:forTypes:)] pub unsafe fn runModalOpenPanel_forTypes( &self, openPanel: &NSOpenPanel, types: Option<&NSArray>, ) -> NSInteger; + #[method(beginOpenPanelWithCompletionHandler:)] pub unsafe fn beginOpenPanelWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(beginOpenPanel:forTypes:completionHandler:)] pub unsafe fn beginOpenPanel_forTypes_completionHandler( &self, @@ -63,6 +85,7 @@ extern_methods!( inTypes: Option<&NSArray>, completionHandler: TodoBlock, ); + #[method(openDocumentWithContentsOfURL:display:completionHandler:)] pub unsafe fn openDocumentWithContentsOfURL_display_completionHandler( &self, @@ -70,12 +93,14 @@ extern_methods!( displayDocument: bool, completionHandler: TodoBlock, ); + #[method_id(makeDocumentWithContentsOfURL:ofType:error:)] pub unsafe fn makeDocumentWithContentsOfURL_ofType_error( &self, url: &NSURL, typeName: &NSString, ) -> Result, Id>; + #[method(reopenDocumentForURL:withContentsOfURL:display:completionHandler:)] pub unsafe fn reopenDocumentForURL_withContentsOfURL_display_completionHandler( &self, @@ -84,6 +109,7 @@ extern_methods!( displayDocument: bool, completionHandler: TodoBlock, ); + #[method_id(makeDocumentForURL:withContentsOfURL:ofType:error:)] pub unsafe fn makeDocumentForURL_withContentsOfURL_ofType_error( &self, @@ -91,14 +117,19 @@ extern_methods!( contentsURL: &NSURL, typeName: &NSString, ) -> Result, Id>; + #[method(autosavingDelay)] pub unsafe fn autosavingDelay(&self) -> NSTimeInterval; + #[method(setAutosavingDelay:)] pub unsafe fn setAutosavingDelay(&self, autosavingDelay: NSTimeInterval); + #[method(saveAllDocuments:)] pub unsafe fn saveAllDocuments(&self, sender: Option<&Object>); + #[method(hasEditedDocuments)] pub unsafe fn hasEditedDocuments(&self) -> bool; + #[method(reviewUnsavedDocumentsWithAlertTitle:cancellable:delegate:didReviewAllSelector:contextInfo:)] pub unsafe fn reviewUnsavedDocumentsWithAlertTitle_cancellable_delegate_didReviewAllSelector_contextInfo( &self, @@ -108,6 +139,7 @@ extern_methods!( didReviewAllSelector: Option, contextInfo: *mut c_void, ); + #[method(closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo:)] pub unsafe fn closeAllDocumentsWithDelegate_didCloseAllSelector_contextInfo( &self, @@ -115,6 +147,7 @@ extern_methods!( didCloseAllSelector: Option, contextInfo: *mut c_void, ); + #[method_id(duplicateDocumentWithContentsOfURL:copying:displayName:error:)] pub unsafe fn duplicateDocumentWithContentsOfURL_copying_displayName_error( &self, @@ -122,10 +155,13 @@ extern_methods!( duplicateByCopying: bool, displayNameOrNil: Option<&NSString>, ) -> Result, Id>; + #[method(allowsAutomaticShareMenu)] pub unsafe fn allowsAutomaticShareMenu(&self) -> bool; + #[method_id(standardShareMenuItem)] pub unsafe fn standardShareMenuItem(&self) -> Id; + #[method(presentError:modalForWindow:delegate:didPresentSelector:contextInfo:)] pub unsafe fn presentError_modalForWindow_delegate_didPresentSelector_contextInfo( &self, @@ -135,43 +171,57 @@ extern_methods!( didPresentSelector: Option, contextInfo: *mut c_void, ); + #[method(presentError:)] pub unsafe fn presentError(&self, error: &NSError) -> bool; + #[method_id(willPresentError:)] pub unsafe fn willPresentError(&self, error: &NSError) -> Id; + #[method(maximumRecentDocumentCount)] pub unsafe fn maximumRecentDocumentCount(&self) -> NSUInteger; + #[method(clearRecentDocuments:)] pub unsafe fn clearRecentDocuments(&self, sender: Option<&Object>); + #[method(noteNewRecentDocument:)] pub unsafe fn noteNewRecentDocument(&self, document: &NSDocument); + #[method(noteNewRecentDocumentURL:)] pub unsafe fn noteNewRecentDocumentURL(&self, url: &NSURL); + #[method_id(recentDocumentURLs)] pub unsafe fn recentDocumentURLs(&self) -> Id, Shared>; + #[method_id(defaultType)] pub unsafe fn defaultType(&self) -> Option>; + #[method_id(typeForContentsOfURL:error:)] pub unsafe fn typeForContentsOfURL_error( &self, url: &NSURL, ) -> Result, Id>; + #[method_id(documentClassNames)] pub unsafe fn documentClassNames(&self) -> Id, Shared>; + #[method(documentClassForType:)] pub unsafe fn documentClassForType(&self, typeName: &NSString) -> Option<&Class>; + #[method_id(displayNameForType:)] pub unsafe fn displayNameForType( &self, typeName: &NSString, ) -> Option>; + #[method(validateUserInterfaceItem:)] pub unsafe fn validateUserInterfaceItem(&self, item: &NSValidatedUserInterfaceItem) -> bool; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSDocumentController { #[method_id(openDocumentWithContentsOfURL:display:error:)] pub unsafe fn openDocumentWithContentsOfURL_display_error( @@ -179,64 +229,77 @@ extern_methods!( url: &NSURL, displayDocument: bool, ) -> Result, Id>; + #[method(reopenDocumentForURL:withContentsOfURL:error:)] pub unsafe fn reopenDocumentForURL_withContentsOfURL_error( &self, url: Option<&NSURL>, contentsURL: &NSURL, ) -> Result<(), Id>; + #[method_id(fileExtensionsFromType:)] pub unsafe fn fileExtensionsFromType( &self, typeName: &NSString, ) -> Option>; + #[method_id(typeFromFileExtension:)] pub unsafe fn typeFromFileExtension( &self, fileNameExtensionOrHFSFileType: &NSString, ) -> Option>; + #[method_id(documentForFileName:)] pub unsafe fn documentForFileName(&self, fileName: &NSString) -> Option>; + #[method_id(fileNamesFromRunningOpenPanel)] pub unsafe fn fileNamesFromRunningOpenPanel(&self) -> Option>; + #[method_id(makeDocumentWithContentsOfFile:ofType:)] pub unsafe fn makeDocumentWithContentsOfFile_ofType( &self, fileName: &NSString, type_: &NSString, ) -> Option>; + #[method_id(makeDocumentWithContentsOfURL:ofType:)] pub unsafe fn makeDocumentWithContentsOfURL_ofType( &self, url: &NSURL, type_: Option<&NSString>, ) -> Option>; + #[method_id(makeUntitledDocumentOfType:)] pub unsafe fn makeUntitledDocumentOfType( &self, type_: &NSString, ) -> Option>; + #[method_id(openDocumentWithContentsOfFile:display:)] pub unsafe fn openDocumentWithContentsOfFile_display( &self, fileName: &NSString, display: bool, ) -> Option>; + #[method_id(openDocumentWithContentsOfURL:display:)] pub unsafe fn openDocumentWithContentsOfURL_display( &self, url: &NSURL, display: bool, ) -> Option>; + #[method_id(openUntitledDocumentOfType:display:)] pub unsafe fn openUntitledDocumentOfType_display( &self, type_: &NSString, display: bool, ) -> Option>; + #[method(setShouldCreateUI:)] pub unsafe fn setShouldCreateUI(&self, flag: bool); + #[method(shouldCreateUI)] pub unsafe fn shouldCreateUI(&self) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs index 4af004715..f25437e10 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs @@ -1,29 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSScripting"] + /// NSScripting unsafe impl NSDocument { #[method_id(lastComponentOfFileName)] pub unsafe fn lastComponentOfFileName(&self) -> Id; + #[method(setLastComponentOfFileName:)] pub unsafe fn setLastComponentOfFileName(&self, lastComponentOfFileName: &NSString); + #[method_id(handleSaveScriptCommand:)] pub unsafe fn handleSaveScriptCommand( &self, command: &NSScriptCommand, ) -> Option>; + #[method_id(handleCloseScriptCommand:)] pub unsafe fn handleCloseScriptCommand( &self, command: &NSCloseCommand, ) -> Option>; + #[method_id(handlePrintScriptCommand:)] pub unsafe fn handlePrintScriptCommand( &self, command: &NSScriptCommand, ) -> Option>; + #[method_id(objectSpecifier)] pub unsafe fn objectSpecifier(&self) -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs index 2180691a0..0d1f4f700 100644 --- a/crates/icrate/src/generated/AppKit/NSDragging.rs +++ b/crates/icrate/src/generated/AppKit/NSDragging.rs @@ -1,23 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSDraggingInfo = NSObject; + pub type NSDraggingDestination = NSObject; + pub type NSDraggingSource = NSObject; + pub type NSSpringLoadingDestination = NSObject; + extern_methods!( - #[doc = "NSDraggingSourceDeprecated"] + /// NSDraggingSourceDeprecated unsafe impl NSObject { #[method_id(namesOfPromisedFilesDroppedAtDestination:)] pub unsafe fn namesOfPromisedFilesDroppedAtDestination( &self, dropDestination: &NSURL, ) -> Option, Shared>>; + #[method(draggingSourceOperationMaskForLocal:)] pub unsafe fn draggingSourceOperationMaskForLocal(&self, flag: bool) -> NSDragOperation; + #[method(draggedImage:beganAt:)] pub unsafe fn draggedImage_beganAt(&self, image: Option<&NSImage>, screenPoint: NSPoint); + #[method(draggedImage:endedAt:operation:)] pub unsafe fn draggedImage_endedAt_operation( &self, @@ -25,10 +35,13 @@ extern_methods!( screenPoint: NSPoint, operation: NSDragOperation, ); + #[method(draggedImage:movedTo:)] pub unsafe fn draggedImage_movedTo(&self, image: Option<&NSImage>, screenPoint: NSPoint); + #[method(ignoreModifierKeysWhileDragging)] pub unsafe fn ignoreModifierKeysWhileDragging(&self) -> bool; + #[method(draggedImage:endedAt:deposited:)] pub unsafe fn draggedImage_endedAt_deposited( &self, diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs index c3e88b1e9..a5fa583cf 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -1,46 +1,63 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSDraggingImageComponentKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSDraggingImageComponent; + unsafe impl ClassType for NSDraggingImageComponent { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDraggingImageComponent { #[method_id(draggingImageComponentWithKey:)] pub unsafe fn draggingImageComponentWithKey( key: &NSDraggingImageComponentKey, ) -> Id; + #[method_id(initWithKey:)] pub unsafe fn initWithKey(&self, key: &NSDraggingImageComponentKey) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(key)] pub unsafe fn key(&self) -> Id; + #[method(setKey:)] pub unsafe fn setKey(&self, key: &NSDraggingImageComponentKey); + #[method_id(contents)] pub unsafe fn contents(&self) -> Option>; + #[method(setContents:)] pub unsafe fn setContents(&self, contents: Option<&Object>); + #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[method(setFrame:)] pub unsafe fn setFrame(&self, frame: NSRect); } ); + extern_class!( #[derive(Debug)] pub struct NSDraggingItem; + unsafe impl ClassType for NSDraggingItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDraggingItem { #[method_id(initWithPasteboardWriter:)] @@ -48,20 +65,28 @@ extern_methods!( &self, pasteboardWriter: &NSPasteboardWriting, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(item)] pub unsafe fn item(&self) -> Id; + #[method(draggingFrame)] pub unsafe fn draggingFrame(&self) -> NSRect; + #[method(setDraggingFrame:)] pub unsafe fn setDraggingFrame(&self, draggingFrame: NSRect); + #[method(imageComponentsProvider)] pub unsafe fn imageComponentsProvider(&self) -> TodoBlock; + #[method(setImageComponentsProvider:)] pub unsafe fn setImageComponentsProvider(&self, imageComponentsProvider: TodoBlock); + #[method(setDraggingFrame:contents:)] pub unsafe fn setDraggingFrame_contents(&self, frame: NSRect, contents: Option<&Object>); + #[method_id(imageComponents)] pub unsafe fn imageComponents( &self, diff --git a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs index 26d5a361e..a7ac4cd36 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs @@ -1,37 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDraggingSession; + unsafe impl ClassType for NSDraggingSession { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDraggingSession { #[method(draggingFormation)] pub unsafe fn draggingFormation(&self) -> NSDraggingFormation; + #[method(setDraggingFormation:)] pub unsafe fn setDraggingFormation(&self, draggingFormation: NSDraggingFormation); + #[method(animatesToStartingPositionsOnCancelOrFail)] pub unsafe fn animatesToStartingPositionsOnCancelOrFail(&self) -> bool; + #[method(setAnimatesToStartingPositionsOnCancelOrFail:)] pub unsafe fn setAnimatesToStartingPositionsOnCancelOrFail( &self, animatesToStartingPositionsOnCancelOrFail: bool, ); + #[method(draggingLeaderIndex)] pub unsafe fn draggingLeaderIndex(&self) -> NSInteger; + #[method(setDraggingLeaderIndex:)] pub unsafe fn setDraggingLeaderIndex(&self, draggingLeaderIndex: NSInteger); + #[method_id(draggingPasteboard)] pub unsafe fn draggingPasteboard(&self) -> Id; + #[method(draggingSequenceNumber)] pub unsafe fn draggingSequenceNumber(&self) -> NSInteger; + #[method(draggingLocation)] pub unsafe fn draggingLocation(&self) -> NSPoint; + #[method(enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:)] pub unsafe fn enumerateDraggingItemsWithOptions_forView_classes_searchOptions_usingBlock( &self, diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index 6a28e4707..6fb40e116 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDrawer; + unsafe impl ClassType for NSDrawer { type Super = NSResponder; } ); + extern_methods!( unsafe impl NSDrawer { #[method_id(initWithContentSize:preferredEdge:)] @@ -17,65 +22,93 @@ extern_methods!( contentSize: NSSize, edge: NSRectEdge, ) -> Id; + #[method_id(parentWindow)] pub unsafe fn parentWindow(&self) -> Option>; + #[method(setParentWindow:)] pub unsafe fn setParentWindow(&self, parentWindow: Option<&NSWindow>); + #[method_id(contentView)] pub unsafe fn contentView(&self) -> Option>; + #[method(setContentView:)] pub unsafe fn setContentView(&self, contentView: Option<&NSView>); + #[method(preferredEdge)] pub unsafe fn preferredEdge(&self) -> NSRectEdge; + #[method(setPreferredEdge:)] pub unsafe fn setPreferredEdge(&self, preferredEdge: NSRectEdge); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSDrawerDelegate>); + #[method(open)] pub unsafe fn open(&self); + #[method(openOnEdge:)] pub unsafe fn openOnEdge(&self, edge: NSRectEdge); + #[method(close)] pub unsafe fn close(&self); + #[method(open:)] pub unsafe fn open(&self, sender: Option<&Object>); + #[method(close:)] pub unsafe fn close(&self, sender: Option<&Object>); + #[method(toggle:)] pub unsafe fn toggle(&self, sender: Option<&Object>); + #[method(state)] pub unsafe fn state(&self) -> NSInteger; + #[method(edge)] pub unsafe fn edge(&self) -> NSRectEdge; + #[method(contentSize)] pub unsafe fn contentSize(&self) -> NSSize; + #[method(setContentSize:)] pub unsafe fn setContentSize(&self, contentSize: NSSize); + #[method(minContentSize)] pub unsafe fn minContentSize(&self) -> NSSize; + #[method(setMinContentSize:)] pub unsafe fn setMinContentSize(&self, minContentSize: NSSize); + #[method(maxContentSize)] pub unsafe fn maxContentSize(&self) -> NSSize; + #[method(setMaxContentSize:)] pub unsafe fn setMaxContentSize(&self, maxContentSize: NSSize); + #[method(leadingOffset)] pub unsafe fn leadingOffset(&self) -> CGFloat; + #[method(setLeadingOffset:)] pub unsafe fn setLeadingOffset(&self, leadingOffset: CGFloat); + #[method(trailingOffset)] pub unsafe fn trailingOffset(&self) -> CGFloat; + #[method(setTrailingOffset:)] pub unsafe fn setTrailingOffset(&self, trailingOffset: CGFloat); } ); + extern_methods!( - #[doc = "NSDrawers"] + /// NSDrawers unsafe impl NSWindow { #[method_id(drawers)] pub unsafe fn drawers(&self) -> Option, Shared>>; } ); + pub type NSDrawerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs index 1c5db6417..a0622a919 100644 --- a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs @@ -1,24 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSEPSImageRep; + unsafe impl ClassType for NSEPSImageRep { type Super = NSImageRep; } ); + extern_methods!( unsafe impl NSEPSImageRep { #[method_id(imageRepWithData:)] pub unsafe fn imageRepWithData(epsData: &NSData) -> Option>; + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, epsData: &NSData) -> Option>; + #[method(prepareGState)] pub unsafe fn prepareGState(&self); + #[method_id(EPSRepresentation)] pub unsafe fn EPSRepresentation(&self) -> Id; + #[method(boundingBox)] pub unsafe fn boundingBox(&self) -> NSRect; } diff --git a/crates/icrate/src/generated/AppKit/NSErrors.rs b/crates/icrate/src/generated/AppKit/NSErrors.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/AppKit/NSErrors.rs +++ b/crates/icrate/src/generated/AppKit/NSErrors.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index ebcda05f0..9da445f5f 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -1,158 +1,229 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSEvent; + unsafe impl ClassType for NSEvent { type Super = NSObject; } ); + extern_methods!( unsafe impl NSEvent { #[method(type)] pub unsafe fn type_(&self) -> NSEventType; + #[method(modifierFlags)] pub unsafe fn modifierFlags(&self) -> NSEventModifierFlags; + #[method(timestamp)] pub unsafe fn timestamp(&self) -> NSTimeInterval; + #[method_id(window)] pub unsafe fn window(&self) -> Option>; + #[method(windowNumber)] pub unsafe fn windowNumber(&self) -> NSInteger; + #[method_id(context)] pub unsafe fn context(&self) -> Option>; + #[method(clickCount)] pub unsafe fn clickCount(&self) -> NSInteger; + #[method(buttonNumber)] pub unsafe fn buttonNumber(&self) -> NSInteger; + #[method(eventNumber)] pub unsafe fn eventNumber(&self) -> NSInteger; + #[method(pressure)] pub unsafe fn pressure(&self) -> c_float; + #[method(locationInWindow)] pub unsafe fn locationInWindow(&self) -> NSPoint; + #[method(deltaX)] pub unsafe fn deltaX(&self) -> CGFloat; + #[method(deltaY)] pub unsafe fn deltaY(&self) -> CGFloat; + #[method(deltaZ)] pub unsafe fn deltaZ(&self) -> CGFloat; + #[method(hasPreciseScrollingDeltas)] pub unsafe fn hasPreciseScrollingDeltas(&self) -> bool; + #[method(scrollingDeltaX)] pub unsafe fn scrollingDeltaX(&self) -> CGFloat; + #[method(scrollingDeltaY)] pub unsafe fn scrollingDeltaY(&self) -> CGFloat; + #[method(momentumPhase)] pub unsafe fn momentumPhase(&self) -> NSEventPhase; + #[method(isDirectionInvertedFromDevice)] pub unsafe fn isDirectionInvertedFromDevice(&self) -> bool; + #[method_id(characters)] pub unsafe fn characters(&self) -> Option>; + #[method_id(charactersIgnoringModifiers)] pub unsafe fn charactersIgnoringModifiers(&self) -> Option>; + #[method_id(charactersByApplyingModifiers:)] pub unsafe fn charactersByApplyingModifiers( &self, modifiers: NSEventModifierFlags, ) -> Option>; + #[method(isARepeat)] pub unsafe fn isARepeat(&self) -> bool; + #[method(keyCode)] pub unsafe fn keyCode(&self) -> c_ushort; + #[method(trackingNumber)] pub unsafe fn trackingNumber(&self) -> NSInteger; + #[method(userData)] pub unsafe fn userData(&self) -> *mut c_void; + #[method_id(trackingArea)] pub unsafe fn trackingArea(&self) -> Option>; + #[method(subtype)] pub unsafe fn subtype(&self) -> NSEventSubtype; + #[method(data1)] pub unsafe fn data1(&self) -> NSInteger; + #[method(data2)] pub unsafe fn data2(&self) -> NSInteger; + #[method(eventRef)] pub unsafe fn eventRef(&self) -> *mut c_void; + #[method_id(eventWithEventRef:)] pub unsafe fn eventWithEventRef(eventRef: NonNull) -> Option>; + #[method(CGEvent)] pub unsafe fn CGEvent(&self) -> CGEventRef; + #[method_id(eventWithCGEvent:)] pub unsafe fn eventWithCGEvent(cgEvent: CGEventRef) -> Option>; + #[method(isMouseCoalescingEnabled)] pub unsafe fn isMouseCoalescingEnabled() -> bool; + #[method(setMouseCoalescingEnabled:)] pub unsafe fn setMouseCoalescingEnabled(mouseCoalescingEnabled: bool); + #[method(magnification)] pub unsafe fn magnification(&self) -> CGFloat; + #[method(deviceID)] pub unsafe fn deviceID(&self) -> NSUInteger; + #[method(rotation)] pub unsafe fn rotation(&self) -> c_float; + #[method(absoluteX)] pub unsafe fn absoluteX(&self) -> NSInteger; + #[method(absoluteY)] pub unsafe fn absoluteY(&self) -> NSInteger; + #[method(absoluteZ)] pub unsafe fn absoluteZ(&self) -> NSInteger; + #[method(buttonMask)] pub unsafe fn buttonMask(&self) -> NSEventButtonMask; + #[method(tilt)] pub unsafe fn tilt(&self) -> NSPoint; + #[method(tangentialPressure)] pub unsafe fn tangentialPressure(&self) -> c_float; + #[method_id(vendorDefined)] pub unsafe fn vendorDefined(&self) -> Id; + #[method(vendorID)] pub unsafe fn vendorID(&self) -> NSUInteger; + #[method(tabletID)] pub unsafe fn tabletID(&self) -> NSUInteger; + #[method(pointingDeviceID)] pub unsafe fn pointingDeviceID(&self) -> NSUInteger; + #[method(systemTabletID)] pub unsafe fn systemTabletID(&self) -> NSUInteger; + #[method(vendorPointingDeviceType)] pub unsafe fn vendorPointingDeviceType(&self) -> NSUInteger; + #[method(pointingDeviceSerialNumber)] pub unsafe fn pointingDeviceSerialNumber(&self) -> NSUInteger; + #[method(uniqueID)] pub unsafe fn uniqueID(&self) -> c_ulonglong; + #[method(capabilityMask)] pub unsafe fn capabilityMask(&self) -> NSUInteger; + #[method(pointingDeviceType)] pub unsafe fn pointingDeviceType(&self) -> NSPointingDeviceType; + #[method(isEnteringProximity)] pub unsafe fn isEnteringProximity(&self) -> bool; + #[method_id(touchesMatchingPhase:inView:)] pub unsafe fn touchesMatchingPhase_inView( &self, phase: NSTouchPhase, view: Option<&NSView>, ) -> Id, Shared>; + #[method_id(allTouches)] pub unsafe fn allTouches(&self) -> Id, Shared>; + #[method_id(touchesForView:)] pub unsafe fn touchesForView(&self, view: &NSView) -> Id, Shared>; + #[method_id(coalescedTouchesForTouch:)] pub unsafe fn coalescedTouchesForTouch( &self, touch: &NSTouch, ) -> Id, Shared>; + #[method(phase)] pub unsafe fn phase(&self) -> NSEventPhase; + #[method(stage)] pub unsafe fn stage(&self) -> NSInteger; + #[method(stageTransition)] pub unsafe fn stageTransition(&self) -> CGFloat; + #[method(associatedEventsMask)] pub unsafe fn associatedEventsMask(&self) -> NSEventMask; + #[method(pressureBehavior)] pub unsafe fn pressureBehavior(&self) -> NSPressureBehavior; + #[method(isSwipeTrackingFromScrollEventsEnabled)] pub unsafe fn isSwipeTrackingFromScrollEventsEnabled() -> bool; + #[method(trackSwipeEventWithOptions:dampenAmountThresholdMin:max:usingHandler:)] pub unsafe fn trackSwipeEventWithOptions_dampenAmountThresholdMin_max_usingHandler( &self, @@ -161,13 +232,16 @@ extern_methods!( maxDampenThreshold: CGFloat, trackingHandler: TodoBlock, ); + #[method(startPeriodicEventsAfterDelay:withPeriod:)] pub unsafe fn startPeriodicEventsAfterDelay_withPeriod( delay: NSTimeInterval, period: NSTimeInterval, ); + #[method(stopPeriodicEvents)] pub unsafe fn stopPeriodicEvents(); + #[method_id(mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:)] pub unsafe fn mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure( type_: NSEventType, @@ -180,6 +254,7 @@ extern_methods!( cNum: NSInteger, pressure: c_float, ) -> Option>; + #[method_id(keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:)] pub unsafe fn keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode( type_: NSEventType, @@ -193,6 +268,7 @@ extern_methods!( flag: bool, code: c_ushort, ) -> Option>; + #[method_id(enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:)] pub unsafe fn enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData( type_: NSEventType, @@ -205,6 +281,7 @@ extern_methods!( tNum: NSInteger, data: *mut c_void, ) -> Option>; + #[method_id(otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:)] pub unsafe fn otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2( type_: NSEventType, @@ -217,28 +294,37 @@ extern_methods!( d1: NSInteger, d2: NSInteger, ) -> Option>; + #[method(mouseLocation)] pub unsafe fn mouseLocation() -> NSPoint; + #[method(modifierFlags)] pub unsafe fn modifierFlags() -> NSEventModifierFlags; + #[method(pressedMouseButtons)] pub unsafe fn pressedMouseButtons() -> NSUInteger; + #[method(doubleClickInterval)] pub unsafe fn doubleClickInterval() -> NSTimeInterval; + #[method(keyRepeatDelay)] pub unsafe fn keyRepeatDelay() -> NSTimeInterval; + #[method(keyRepeatInterval)] pub unsafe fn keyRepeatInterval() -> NSTimeInterval; + #[method_id(addGlobalMonitorForEventsMatchingMask:handler:)] pub unsafe fn addGlobalMonitorForEventsMatchingMask_handler( mask: NSEventMask, block: TodoBlock, ) -> Option>; + #[method_id(addLocalMonitorForEventsMatchingMask:handler:)] pub unsafe fn addLocalMonitorForEventsMatchingMask_handler( mask: NSEventMask, block: TodoBlock, ) -> Option>; + #[method(removeMonitor:)] pub unsafe fn removeMonitor(eventMonitor: &Object); } diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs index d71cffb80..546d8d10b 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs @@ -1,36 +1,49 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFilePromiseProvider; + unsafe impl ClassType for NSFilePromiseProvider { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFilePromiseProvider { #[method_id(fileType)] pub unsafe fn fileType(&self) -> Id; + #[method(setFileType:)] pub unsafe fn setFileType(&self, fileType: &NSString); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSFilePromiseProviderDelegate>); + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; + #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&Object>); + #[method_id(initWithFileType:delegate:)] pub unsafe fn initWithFileType_delegate( &self, fileType: &NSString, delegate: &NSFilePromiseProviderDelegate, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; } ); + pub type NSFilePromiseProviderDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs index 33996ff09..5f5889e02 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs @@ -1,22 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFilePromiseReceiver; + unsafe impl ClassType for NSFilePromiseReceiver { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFilePromiseReceiver { #[method_id(readableDraggedTypes)] pub unsafe fn readableDraggedTypes() -> Id, Shared>; + #[method_id(fileTypes)] pub unsafe fn fileTypes(&self) -> Id, Shared>; + #[method_id(fileNames)] pub unsafe fn fileNames(&self) -> Id, Shared>; + #[method(receivePromisedFilesAtDestination:options:operationQueue:reader:)] pub unsafe fn receivePromisedFilesAtDestination_options_operationQueue_reader( &self, diff --git a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs index a7d1b1c79..3a28f4f70 100644 --- a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs +++ b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs @@ -1,12 +1,16 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSExtensions"] + /// NSExtensions unsafe impl NSFileWrapper { #[method_id(icon)] pub unsafe fn icon(&self) -> Option>; + #[method(setIcon:)] pub unsafe fn setIcon(&self, icon: Option<&NSImage>); } diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 64094fce1..30b0253c6 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFont; + unsafe impl ClassType for NSFont { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFont { #[method_id(fontWithName:size:)] @@ -16,120 +21,169 @@ extern_methods!( fontName: &NSString, fontSize: CGFloat, ) -> Option>; + #[method_id(fontWithName:matrix:)] pub unsafe fn fontWithName_matrix( fontName: &NSString, fontMatrix: NonNull, ) -> Option>; + #[method_id(fontWithDescriptor:size:)] pub unsafe fn fontWithDescriptor_size( fontDescriptor: &NSFontDescriptor, fontSize: CGFloat, ) -> Option>; + #[method_id(fontWithDescriptor:textTransform:)] pub unsafe fn fontWithDescriptor_textTransform( fontDescriptor: &NSFontDescriptor, textTransform: Option<&NSAffineTransform>, ) -> Option>; + #[method_id(userFontOfSize:)] pub unsafe fn userFontOfSize(fontSize: CGFloat) -> Option>; + #[method_id(userFixedPitchFontOfSize:)] pub unsafe fn userFixedPitchFontOfSize(fontSize: CGFloat) -> Option>; + #[method(setUserFont:)] pub unsafe fn setUserFont(font: Option<&NSFont>); + #[method(setUserFixedPitchFont:)] pub unsafe fn setUserFixedPitchFont(font: Option<&NSFont>); + #[method_id(systemFontOfSize:)] pub unsafe fn systemFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(boldSystemFontOfSize:)] pub unsafe fn boldSystemFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(labelFontOfSize:)] pub unsafe fn labelFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(titleBarFontOfSize:)] pub unsafe fn titleBarFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(menuFontOfSize:)] pub unsafe fn menuFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(menuBarFontOfSize:)] pub unsafe fn menuBarFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(messageFontOfSize:)] pub unsafe fn messageFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(paletteFontOfSize:)] pub unsafe fn paletteFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(toolTipsFontOfSize:)] pub unsafe fn toolTipsFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(controlContentFontOfSize:)] pub unsafe fn controlContentFontOfSize(fontSize: CGFloat) -> Id; + #[method_id(systemFontOfSize:weight:)] pub unsafe fn systemFontOfSize_weight( fontSize: CGFloat, weight: NSFontWeight, ) -> Id; + #[method_id(monospacedDigitSystemFontOfSize:weight:)] pub unsafe fn monospacedDigitSystemFontOfSize_weight( fontSize: CGFloat, weight: NSFontWeight, ) -> Id; + #[method_id(monospacedSystemFontOfSize:weight:)] pub unsafe fn monospacedSystemFontOfSize_weight( fontSize: CGFloat, weight: NSFontWeight, ) -> Id; + #[method_id(fontWithSize:)] pub unsafe fn fontWithSize(&self, fontSize: CGFloat) -> Id; + #[method(systemFontSize)] pub unsafe fn systemFontSize() -> CGFloat; + #[method(smallSystemFontSize)] pub unsafe fn smallSystemFontSize() -> CGFloat; + #[method(labelFontSize)] pub unsafe fn labelFontSize() -> CGFloat; + #[method(systemFontSizeForControlSize:)] pub unsafe fn systemFontSizeForControlSize(controlSize: NSControlSize) -> CGFloat; + #[method_id(fontName)] pub unsafe fn fontName(&self) -> Id; + #[method(pointSize)] pub unsafe fn pointSize(&self) -> CGFloat; + #[method(matrix)] pub unsafe fn matrix(&self) -> NonNull; + #[method_id(familyName)] pub unsafe fn familyName(&self) -> Option>; + #[method_id(displayName)] pub unsafe fn displayName(&self) -> Option>; + #[method_id(fontDescriptor)] pub unsafe fn fontDescriptor(&self) -> Id; + #[method_id(textTransform)] pub unsafe fn textTransform(&self) -> Id; + #[method(numberOfGlyphs)] pub unsafe fn numberOfGlyphs(&self) -> NSUInteger; + #[method(mostCompatibleStringEncoding)] pub unsafe fn mostCompatibleStringEncoding(&self) -> NSStringEncoding; + #[method_id(coveredCharacterSet)] pub unsafe fn coveredCharacterSet(&self) -> Id; + #[method(boundingRectForFont)] pub unsafe fn boundingRectForFont(&self) -> NSRect; + #[method(maximumAdvancement)] pub unsafe fn maximumAdvancement(&self) -> NSSize; + #[method(ascender)] pub unsafe fn ascender(&self) -> CGFloat; + #[method(descender)] pub unsafe fn descender(&self) -> CGFloat; + #[method(leading)] pub unsafe fn leading(&self) -> CGFloat; + #[method(underlinePosition)] pub unsafe fn underlinePosition(&self) -> CGFloat; + #[method(underlineThickness)] pub unsafe fn underlineThickness(&self) -> CGFloat; + #[method(italicAngle)] pub unsafe fn italicAngle(&self) -> CGFloat; + #[method(capHeight)] pub unsafe fn capHeight(&self) -> CGFloat; + #[method(xHeight)] pub unsafe fn xHeight(&self) -> CGFloat; + #[method(isFixedPitch)] pub unsafe fn isFixedPitch(&self) -> bool; + #[method(boundingRectForCGGlyph:)] pub unsafe fn boundingRectForCGGlyph(&self, glyph: CGGlyph) -> NSRect; + #[method(advancementForCGGlyph:)] pub unsafe fn advancementForCGGlyph(&self, glyph: CGGlyph) -> NSSize; + #[method(getBoundingRects:forCGGlyphs:count:)] pub unsafe fn getBoundingRects_forCGGlyphs_count( &self, @@ -137,6 +191,7 @@ extern_methods!( glyphs: NonNull, glyphCount: NSUInteger, ); + #[method(getAdvancements:forCGGlyphs:count:)] pub unsafe fn getAdvancements_forCGGlyphs_count( &self, @@ -144,25 +199,33 @@ extern_methods!( glyphs: NonNull, glyphCount: NSUInteger, ); + #[method(set)] pub unsafe fn set(&self); + #[method(setInContext:)] pub unsafe fn setInContext(&self, graphicsContext: &NSGraphicsContext); + #[method_id(verticalFont)] pub unsafe fn verticalFont(&self) -> Id; + #[method(isVertical)] pub unsafe fn isVertical(&self) -> bool; } ); + extern_methods!( - #[doc = "NSFont_Deprecated"] + /// NSFont_Deprecated unsafe impl NSFont { #[method(glyphWithName:)] pub unsafe fn glyphWithName(&self, name: &NSString) -> NSGlyph; + #[method(boundingRectForGlyph:)] pub unsafe fn boundingRectForGlyph(&self, glyph: NSGlyph) -> NSRect; + #[method(advancementForGlyph:)] pub unsafe fn advancementForGlyph(&self, glyph: NSGlyph) -> NSSize; + #[method(getBoundingRects:forGlyphs:count:)] pub unsafe fn getBoundingRects_forGlyphs_count( &self, @@ -170,6 +233,7 @@ extern_methods!( glyphs: NonNull, glyphCount: NSUInteger, ); + #[method(getAdvancements:forGlyphs:count:)] pub unsafe fn getAdvancements_forGlyphs_count( &self, @@ -177,6 +241,7 @@ extern_methods!( glyphs: NonNull, glyphCount: NSUInteger, ); + #[method(getAdvancements:forPackedGlyphs:length:)] pub unsafe fn getAdvancements_forPackedGlyphs_length( &self, @@ -184,21 +249,26 @@ extern_methods!( packedGlyphs: NonNull, length: NSUInteger, ); + #[method_id(printerFont)] pub unsafe fn printerFont(&self) -> Id; + #[method_id(screenFont)] pub unsafe fn screenFont(&self) -> Id; + #[method_id(screenFontWithRenderingMode:)] pub unsafe fn screenFontWithRenderingMode( &self, renderingMode: NSFontRenderingMode, ) -> Id; + #[method(renderingMode)] pub unsafe fn renderingMode(&self) -> NSFontRenderingMode; } ); + extern_methods!( - #[doc = "NSFont_TextStyles"] + /// NSFont_TextStyles unsafe impl NSFont { #[method_id(preferredFontForTextStyle:options:)] pub unsafe fn preferredFontForTextStyle_options( diff --git a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs index 5b6a1342a..7505f3631 100644 --- a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs +++ b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs @@ -1,28 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFontAssetRequest; + unsafe impl ClassType for NSFontAssetRequest { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFontAssetRequest { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithFontDescriptors:options:)] pub unsafe fn initWithFontDescriptors_options( &self, fontDescriptors: &NSArray, options: NSFontAssetRequestOptions, ) -> Id; + #[method_id(downloadedFontDescriptors)] pub unsafe fn downloadedFontDescriptors(&self) -> Id, Shared>; + #[method_id(progress)] pub unsafe fn progress(&self) -> Id; + #[method(downloadFontAssetsWithCompletionHandler:)] pub unsafe fn downloadFontAssetsWithCompletionHandler(&self, completionHandler: TodoBlock); } diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index 4038127b3..9b7b4710e 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/NSFontCollection.rs @@ -1,72 +1,93 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSFontCollectionMatchingOptionKey = NSString; + pub type NSFontCollectionName = NSString; + extern_class!( #[derive(Debug)] pub struct NSFontCollection; + unsafe impl ClassType for NSFontCollection { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFontCollection { #[method_id(fontCollectionWithDescriptors:)] pub unsafe fn fontCollectionWithDescriptors( queryDescriptors: &NSArray, ) -> Id; + #[method_id(fontCollectionWithAllAvailableDescriptors)] pub unsafe fn fontCollectionWithAllAvailableDescriptors() -> Id; + #[method_id(fontCollectionWithLocale:)] pub unsafe fn fontCollectionWithLocale( locale: &NSLocale, ) -> Option>; + #[method(showFontCollection:withName:visibility:error:)] pub unsafe fn showFontCollection_withName_visibility_error( collection: &NSFontCollection, name: &NSFontCollectionName, visibility: NSFontCollectionVisibility, ) -> Result<(), Id>; + #[method(hideFontCollectionWithName:visibility:error:)] pub unsafe fn hideFontCollectionWithName_visibility_error( name: &NSFontCollectionName, visibility: NSFontCollectionVisibility, ) -> Result<(), Id>; + #[method(renameFontCollectionWithName:visibility:toName:error:)] pub unsafe fn renameFontCollectionWithName_visibility_toName_error( oldName: &NSFontCollectionName, visibility: NSFontCollectionVisibility, newName: &NSFontCollectionName, ) -> Result<(), Id>; + #[method_id(allFontCollectionNames)] pub unsafe fn allFontCollectionNames() -> Id, Shared>; + #[method_id(fontCollectionWithName:)] pub unsafe fn fontCollectionWithName( name: &NSFontCollectionName, ) -> Option>; + #[method_id(fontCollectionWithName:visibility:)] pub unsafe fn fontCollectionWithName_visibility( name: &NSFontCollectionName, visibility: NSFontCollectionVisibility, ) -> Option>; + #[method_id(queryDescriptors)] pub unsafe fn queryDescriptors(&self) -> Option, Shared>>; + #[method_id(exclusionDescriptors)] pub unsafe fn exclusionDescriptors(&self) -> Option, Shared>>; + #[method_id(matchingDescriptors)] pub unsafe fn matchingDescriptors(&self) -> Option, Shared>>; + #[method_id(matchingDescriptorsWithOptions:)] pub unsafe fn matchingDescriptorsWithOptions( &self, options: Option<&NSDictionary>, ) -> Option, Shared>>; + #[method_id(matchingDescriptorsForFamily:)] pub unsafe fn matchingDescriptorsForFamily( &self, family: &NSString, ) -> Option, Shared>>; + #[method_id(matchingDescriptorsForFamily:options:)] pub unsafe fn matchingDescriptorsForFamily_options( &self, @@ -75,54 +96,69 @@ extern_methods!( ) -> Option, Shared>>; } ); + extern_class!( #[derive(Debug)] pub struct NSMutableFontCollection; + unsafe impl ClassType for NSMutableFontCollection { type Super = NSFontCollection; } ); + extern_methods!( unsafe impl NSMutableFontCollection { #[method_id(fontCollectionWithDescriptors:)] pub unsafe fn fontCollectionWithDescriptors( queryDescriptors: &NSArray, ) -> Id; + #[method_id(fontCollectionWithAllAvailableDescriptors)] pub unsafe fn fontCollectionWithAllAvailableDescriptors( ) -> Id; + #[method_id(fontCollectionWithLocale:)] pub unsafe fn fontCollectionWithLocale( locale: &NSLocale, ) -> Id; + #[method_id(fontCollectionWithName:)] pub unsafe fn fontCollectionWithName( name: &NSFontCollectionName, ) -> Option>; + #[method_id(fontCollectionWithName:visibility:)] pub unsafe fn fontCollectionWithName_visibility( name: &NSFontCollectionName, visibility: NSFontCollectionVisibility, ) -> Option>; + #[method_id(queryDescriptors)] pub unsafe fn queryDescriptors(&self) -> Option, Shared>>; + #[method(setQueryDescriptors:)] pub unsafe fn setQueryDescriptors( &self, queryDescriptors: Option<&NSArray>, ); + #[method_id(exclusionDescriptors)] pub unsafe fn exclusionDescriptors(&self) -> Option, Shared>>; + #[method(setExclusionDescriptors:)] pub unsafe fn setExclusionDescriptors( &self, exclusionDescriptors: Option<&NSArray>, ); + #[method(addQueryForDescriptors:)] pub unsafe fn addQueryForDescriptors(&self, descriptors: &NSArray); + #[method(removeQueryForDescriptors:)] pub unsafe fn removeQueryForDescriptors(&self, descriptors: &NSArray); } ); + pub type NSFontCollectionUserInfoKey = NSString; + pub type NSFontCollectionActionTypeKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 5a2c0ca11..8cff3d732 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -1,103 +1,136 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSFontSymbolicTraits = u32; + pub type NSFontDescriptorAttributeName = NSString; + pub type NSFontDescriptorTraitKey = NSString; + pub type NSFontDescriptorVariationKey = NSString; + pub type NSFontDescriptorFeatureKey = NSString; + pub type NSFontWeight = CGFloat; + pub type NSFontDescriptorSystemDesign = NSString; + pub type NSFontTextStyle = NSString; + pub type NSFontTextStyleOptionKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSFontDescriptor; + unsafe impl ClassType for NSFontDescriptor { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFontDescriptor { #[method_id(postscriptName)] pub unsafe fn postscriptName(&self) -> Option>; + #[method(pointSize)] pub unsafe fn pointSize(&self) -> CGFloat; + #[method_id(matrix)] pub unsafe fn matrix(&self) -> Option>; + #[method(symbolicTraits)] pub unsafe fn symbolicTraits(&self) -> NSFontDescriptorSymbolicTraits; + #[method(requiresFontAssetRequest)] pub unsafe fn requiresFontAssetRequest(&self) -> bool; + #[method_id(objectForKey:)] pub unsafe fn objectForKey( &self, attribute: &NSFontDescriptorAttributeName, ) -> Option>; + #[method_id(fontAttributes)] pub unsafe fn fontAttributes( &self, ) -> Id, Shared>; + #[method_id(fontDescriptorWithFontAttributes:)] pub unsafe fn fontDescriptorWithFontAttributes( attributes: Option<&NSDictionary>, ) -> Id; + #[method_id(fontDescriptorWithName:size:)] pub unsafe fn fontDescriptorWithName_size( fontName: &NSString, size: CGFloat, ) -> Id; + #[method_id(fontDescriptorWithName:matrix:)] pub unsafe fn fontDescriptorWithName_matrix( fontName: &NSString, matrix: &NSAffineTransform, ) -> Id; + #[method_id(initWithFontAttributes:)] pub unsafe fn initWithFontAttributes( &self, attributes: Option<&NSDictionary>, ) -> Id; + #[method_id(matchingFontDescriptorsWithMandatoryKeys:)] pub unsafe fn matchingFontDescriptorsWithMandatoryKeys( &self, mandatoryKeys: Option<&NSSet>, ) -> Id, Shared>; + #[method_id(matchingFontDescriptorWithMandatoryKeys:)] pub unsafe fn matchingFontDescriptorWithMandatoryKeys( &self, mandatoryKeys: Option<&NSSet>, ) -> Option>; + #[method_id(fontDescriptorByAddingAttributes:)] pub unsafe fn fontDescriptorByAddingAttributes( &self, attributes: &NSDictionary, ) -> Id; + #[method_id(fontDescriptorWithSymbolicTraits:)] pub unsafe fn fontDescriptorWithSymbolicTraits( &self, symbolicTraits: NSFontDescriptorSymbolicTraits, ) -> Id; + #[method_id(fontDescriptorWithSize:)] pub unsafe fn fontDescriptorWithSize( &self, newPointSize: CGFloat, ) -> Id; + #[method_id(fontDescriptorWithMatrix:)] pub unsafe fn fontDescriptorWithMatrix( &self, matrix: &NSAffineTransform, ) -> Id; + #[method_id(fontDescriptorWithFace:)] pub unsafe fn fontDescriptorWithFace( &self, newFace: &NSString, ) -> Id; + #[method_id(fontDescriptorWithFamily:)] pub unsafe fn fontDescriptorWithFamily( &self, newFamily: &NSString, ) -> Id; + #[method_id(fontDescriptorWithDesign:)] pub unsafe fn fontDescriptorWithDesign( &self, @@ -105,9 +138,11 @@ extern_methods!( ) -> Option>; } ); + pub type NSFontFamilyClass = u32; + extern_methods!( - #[doc = "NSFontDescriptor_TextStyles"] + /// NSFontDescriptor_TextStyles unsafe impl NSFontDescriptor { #[method_id(preferredFontDescriptorForTextStyle:options:)] pub unsafe fn preferredFontDescriptorForTextStyle_options( diff --git a/crates/icrate/src/generated/AppKit/NSFontManager.rs b/crates/icrate/src/generated/AppKit/NSFontManager.rs index 1d859ecbd..cbd5069c8 100644 --- a/crates/icrate/src/generated/AppKit/NSFontManager.rs +++ b/crates/icrate/src/generated/AppKit/NSFontManager.rs @@ -1,34 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFontManager; + unsafe impl ClassType for NSFontManager { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFontManager { #[method(setFontPanelFactory:)] pub unsafe fn setFontPanelFactory(factoryId: Option<&Class>); + #[method(setFontManagerFactory:)] pub unsafe fn setFontManagerFactory(factoryId: Option<&Class>); + #[method_id(sharedFontManager)] pub unsafe fn sharedFontManager() -> Id; + #[method(isMultiple)] pub unsafe fn isMultiple(&self) -> bool; + #[method_id(selectedFont)] pub unsafe fn selectedFont(&self) -> Option>; + #[method(setSelectedFont:isMultiple:)] pub unsafe fn setSelectedFont_isMultiple(&self, fontObj: &NSFont, flag: bool); + #[method(setFontMenu:)] pub unsafe fn setFontMenu(&self, newMenu: &NSMenu); + #[method_id(fontMenu:)] pub unsafe fn fontMenu(&self, create: bool) -> Option>; + #[method_id(fontPanel:)] pub unsafe fn fontPanel(&self, create: bool) -> Option>; + #[method_id(fontWithFamily:traits:weight:size:)] pub unsafe fn fontWithFamily_traits_weight_size( &self, @@ -37,132 +51,166 @@ extern_methods!( weight: NSInteger, size: CGFloat, ) -> Option>; + #[method(traitsOfFont:)] pub unsafe fn traitsOfFont(&self, fontObj: &NSFont) -> NSFontTraitMask; + #[method(weightOfFont:)] pub unsafe fn weightOfFont(&self, fontObj: &NSFont) -> NSInteger; + #[method_id(availableFonts)] pub unsafe fn availableFonts(&self) -> Id, Shared>; + #[method_id(availableFontFamilies)] pub unsafe fn availableFontFamilies(&self) -> Id, Shared>; + #[method_id(availableMembersOfFontFamily:)] pub unsafe fn availableMembersOfFontFamily( &self, fam: &NSString, ) -> Option, Shared>>; + #[method_id(convertFont:)] pub unsafe fn convertFont(&self, fontObj: &NSFont) -> Id; + #[method_id(convertFont:toSize:)] pub unsafe fn convertFont_toSize( &self, fontObj: &NSFont, size: CGFloat, ) -> Id; + #[method_id(convertFont:toFace:)] pub unsafe fn convertFont_toFace( &self, fontObj: &NSFont, typeface: &NSString, ) -> Option>; + #[method_id(convertFont:toFamily:)] pub unsafe fn convertFont_toFamily( &self, fontObj: &NSFont, family: &NSString, ) -> Id; + #[method_id(convertFont:toHaveTrait:)] pub unsafe fn convertFont_toHaveTrait( &self, fontObj: &NSFont, trait_: NSFontTraitMask, ) -> Id; + #[method_id(convertFont:toNotHaveTrait:)] pub unsafe fn convertFont_toNotHaveTrait( &self, fontObj: &NSFont, trait_: NSFontTraitMask, ) -> Id; + #[method_id(convertWeight:ofFont:)] pub unsafe fn convertWeight_ofFont( &self, upFlag: bool, fontObj: &NSFont, ) -> Id; + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method(action)] pub unsafe fn action(&self) -> Sel; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Sel); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&Object>); + #[method(sendAction)] pub unsafe fn sendAction(&self) -> bool; + #[method_id(localizedNameForFamily:face:)] pub unsafe fn localizedNameForFamily_face( &self, family: &NSString, faceKey: Option<&NSString>, ) -> Id; + #[method(setSelectedAttributes:isMultiple:)] pub unsafe fn setSelectedAttributes_isMultiple( &self, attributes: &NSDictionary, flag: bool, ); + #[method_id(convertAttributes:)] pub unsafe fn convertAttributes( &self, attributes: &NSDictionary, ) -> Id, Shared>; + #[method_id(availableFontNamesMatchingFontDescriptor:)] pub unsafe fn availableFontNamesMatchingFontDescriptor( &self, descriptor: &NSFontDescriptor, ) -> Option>; + #[method_id(collectionNames)] pub unsafe fn collectionNames(&self) -> Id; + #[method_id(fontDescriptorsInCollection:)] pub unsafe fn fontDescriptorsInCollection( &self, collectionNames: &NSString, ) -> Option>; + #[method(addCollection:options:)] pub unsafe fn addCollection_options( &self, collectionName: &NSString, collectionOptions: NSFontCollectionOptions, ) -> bool; + #[method(removeCollection:)] pub unsafe fn removeCollection(&self, collectionName: &NSString) -> bool; + #[method(addFontDescriptors:toCollection:)] pub unsafe fn addFontDescriptors_toCollection( &self, descriptors: &NSArray, collectionName: &NSString, ); + #[method(removeFontDescriptor:fromCollection:)] pub unsafe fn removeFontDescriptor_fromCollection( &self, descriptor: &NSFontDescriptor, collection: &NSString, ); + #[method(currentFontAction)] pub unsafe fn currentFontAction(&self) -> NSFontAction; + #[method(convertFontTraits:)] pub unsafe fn convertFontTraits(&self, traits: NSFontTraitMask) -> NSFontTraitMask; + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); } ); + extern_methods!( - #[doc = "NSFontManagerMenuActionMethods"] + /// NSFontManagerMenuActionMethods unsafe impl NSFontManager { #[method(fontNamed:hasTraits:)] pub unsafe fn fontNamed_hasTraits( @@ -170,27 +218,35 @@ extern_methods!( fName: &NSString, someTraits: NSFontTraitMask, ) -> bool; + #[method_id(availableFontNamesWithTraits:)] pub unsafe fn availableFontNamesWithTraits( &self, someTraits: NSFontTraitMask, ) -> Option, Shared>>; + #[method(addFontTrait:)] pub unsafe fn addFontTrait(&self, sender: Option<&Object>); + #[method(removeFontTrait:)] pub unsafe fn removeFontTrait(&self, sender: Option<&Object>); + #[method(modifyFontViaPanel:)] pub unsafe fn modifyFontViaPanel(&self, sender: Option<&Object>); + #[method(modifyFont:)] pub unsafe fn modifyFont(&self, sender: Option<&Object>); + #[method(orderFrontFontPanel:)] pub unsafe fn orderFrontFontPanel(&self, sender: Option<&Object>); + #[method(orderFrontStylesPanel:)] pub unsafe fn orderFrontStylesPanel(&self, sender: Option<&Object>); } ); + extern_methods!( - #[doc = "NSFontManagerDelegate"] + /// NSFontManagerDelegate unsafe impl NSObject { #[method(fontManager:willIncludeFont:)] pub unsafe fn fontManager_willIncludeFont( @@ -200,8 +256,9 @@ extern_methods!( ) -> bool; } ); + extern_methods!( - #[doc = "NSFontManagerResponderMethod"] + /// NSFontManagerResponderMethod unsafe impl NSObject { #[method(changeFont:)] pub unsafe fn changeFont(&self, sender: Option<&Object>); diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index 906f98d1e..f4d6f5309 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -1,45 +1,62 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSFontChanging = NSObject; + extern_methods!( - #[doc = "NSFontPanelValidationAdditions"] + /// NSFontPanelValidationAdditions unsafe impl NSObject { #[method(validModesForFontPanel:)] pub unsafe fn validModesForFontPanel(&self, fontPanel: &NSFontPanel) -> NSFontPanelModeMask; } ); + extern_class!( #[derive(Debug)] pub struct NSFontPanel; + unsafe impl ClassType for NSFontPanel { type Super = NSPanel; } ); + extern_methods!( unsafe impl NSFontPanel { #[method_id(sharedFontPanel)] pub unsafe fn sharedFontPanel() -> Id; + #[method(sharedFontPanelExists)] pub unsafe fn sharedFontPanelExists() -> bool; + #[method_id(accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method(setPanelFont:isMultiple:)] pub unsafe fn setPanelFont_isMultiple(&self, fontObj: &NSFont, flag: bool); + #[method_id(panelConvertFont:)] pub unsafe fn panelConvertFont(&self, fontObj: &NSFont) -> Id; + #[method(worksWhenModal)] pub unsafe fn worksWhenModal(&self) -> bool; + #[method(setWorksWhenModal:)] pub unsafe fn setWorksWhenModal(&self, worksWhenModal: bool); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method(reloadDefaultFontFamilies)] pub unsafe fn reloadDefaultFontFamilies(&self); } diff --git a/crates/icrate/src/generated/AppKit/NSForm.rs b/crates/icrate/src/generated/AppKit/NSForm.rs index 0463b674f..bbdb53aa4 100644 --- a/crates/icrate/src/generated/AppKit/NSForm.rs +++ b/crates/icrate/src/generated/AppKit/NSForm.rs @@ -1,60 +1,85 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSForm; + unsafe impl ClassType for NSForm { type Super = NSMatrix; } ); + extern_methods!( unsafe impl NSForm { #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(setEntryWidth:)] pub unsafe fn setEntryWidth(&self, width: CGFloat); + #[method(setInterlineSpacing:)] pub unsafe fn setInterlineSpacing(&self, spacing: CGFloat); + #[method(setBordered:)] pub unsafe fn setBordered(&self, flag: bool); + #[method(setBezeled:)] pub unsafe fn setBezeled(&self, flag: bool); + #[method(setTitleAlignment:)] pub unsafe fn setTitleAlignment(&self, mode: NSTextAlignment); + #[method(setTextAlignment:)] pub unsafe fn setTextAlignment(&self, mode: NSTextAlignment); + #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, fontObj: &NSFont); + #[method(setTextFont:)] pub unsafe fn setTextFont(&self, fontObj: &NSFont); + #[method_id(cellAtIndex:)] pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Option>; + #[method(drawCellAtIndex:)] pub unsafe fn drawCellAtIndex(&self, index: NSInteger); + #[method_id(addEntry:)] pub unsafe fn addEntry(&self, title: &NSString) -> Id; + #[method_id(insertEntry:atIndex:)] pub unsafe fn insertEntry_atIndex( &self, title: &NSString, index: NSInteger, ) -> Option>; + #[method(removeEntryAtIndex:)] pub unsafe fn removeEntryAtIndex(&self, index: NSInteger); + #[method(indexOfCellWithTag:)] pub unsafe fn indexOfCellWithTag(&self, tag: NSInteger) -> NSInteger; + #[method(selectTextAtIndex:)] pub unsafe fn selectTextAtIndex(&self, index: NSInteger); + #[method(setFrameSize:)] pub unsafe fn setFrameSize(&self, newSize: NSSize); + #[method(setTitleBaseWritingDirection:)] pub unsafe fn setTitleBaseWritingDirection(&self, writingDirection: NSWritingDirection); + #[method(setTextBaseWritingDirection:)] pub unsafe fn setTextBaseWritingDirection(&self, writingDirection: NSWritingDirection); + #[method(setPreferredTextFieldWidth:)] pub unsafe fn setPreferredTextFieldWidth(&self, preferredWidth: CGFloat); + #[method(preferredTextFieldWidth)] pub unsafe fn preferredTextFieldWidth(&self) -> CGFloat; } diff --git a/crates/icrate/src/generated/AppKit/NSFormCell.rs b/crates/icrate/src/generated/AppKit/NSFormCell.rs index 114a266dd..9c9aaddb2 100644 --- a/crates/icrate/src/generated/AppKit/NSFormCell.rs +++ b/crates/icrate/src/generated/AppKit/NSFormCell.rs @@ -1,78 +1,106 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFormCell; + unsafe impl ClassType for NSFormCell { type Super = NSActionCell; } ); + extern_methods!( unsafe impl NSFormCell { #[method_id(initTextCell:)] pub unsafe fn initTextCell(&self, string: Option<&NSString>) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initImageCell:)] pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method(titleWidth:)] pub unsafe fn titleWidth(&self, size: NSSize) -> CGFloat; + #[method(titleWidth)] pub unsafe fn titleWidth(&self) -> CGFloat; + #[method(setTitleWidth:)] pub unsafe fn setTitleWidth(&self, titleWidth: CGFloat); + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(titleFont)] pub unsafe fn titleFont(&self) -> Id; + #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, titleFont: &NSFont); + #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[method_id(placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; + #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); + #[method_id(placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; + #[method(setPlaceholderAttributedString:)] pub unsafe fn setPlaceholderAttributedString( &self, placeholderAttributedString: Option<&NSAttributedString>, ); + #[method(titleAlignment)] pub unsafe fn titleAlignment(&self) -> NSTextAlignment; + #[method(setTitleAlignment:)] pub unsafe fn setTitleAlignment(&self, titleAlignment: NSTextAlignment); + #[method(titleBaseWritingDirection)] pub unsafe fn titleBaseWritingDirection(&self) -> NSWritingDirection; + #[method(setTitleBaseWritingDirection:)] pub unsafe fn setTitleBaseWritingDirection( &self, titleBaseWritingDirection: NSWritingDirection, ); + #[method(preferredTextFieldWidth)] pub unsafe fn preferredTextFieldWidth(&self) -> CGFloat; + #[method(setPreferredTextFieldWidth:)] pub unsafe fn setPreferredTextFieldWidth(&self, preferredTextFieldWidth: CGFloat); } ); + extern_methods!( - #[doc = "NSKeyboardUI"] + /// NSKeyboardUI unsafe impl NSFormCell { #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); } ); + extern_methods!( - #[doc = "NSFormCellAttributedStringMethods"] + /// NSFormCellAttributedStringMethods unsafe impl NSFormCell { #[method_id(attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; + #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); } diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index e7c7337d1..661ea035d 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSGestureRecognizer; + unsafe impl ClassType for NSGestureRecognizer { type Super = NSObject; } ); + extern_methods!( unsafe impl NSGestureRecognizer { #[method_id(initWithTarget:action:)] @@ -17,146 +22,202 @@ extern_methods!( target: Option<&Object>, action: Option, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method(state)] pub unsafe fn state(&self) -> NSGestureRecognizerState; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSGestureRecognizerDelegate>); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method_id(pressureConfiguration)] pub unsafe fn pressureConfiguration(&self) -> Id; + #[method(setPressureConfiguration:)] pub unsafe fn setPressureConfiguration( &self, pressureConfiguration: &NSPressureConfiguration, ); + #[method(delaysPrimaryMouseButtonEvents)] pub unsafe fn delaysPrimaryMouseButtonEvents(&self) -> bool; + #[method(setDelaysPrimaryMouseButtonEvents:)] pub unsafe fn setDelaysPrimaryMouseButtonEvents( &self, delaysPrimaryMouseButtonEvents: bool, ); + #[method(delaysSecondaryMouseButtonEvents)] pub unsafe fn delaysSecondaryMouseButtonEvents(&self) -> bool; + #[method(setDelaysSecondaryMouseButtonEvents:)] pub unsafe fn setDelaysSecondaryMouseButtonEvents( &self, delaysSecondaryMouseButtonEvents: bool, ); + #[method(delaysOtherMouseButtonEvents)] pub unsafe fn delaysOtherMouseButtonEvents(&self) -> bool; + #[method(setDelaysOtherMouseButtonEvents:)] pub unsafe fn setDelaysOtherMouseButtonEvents(&self, delaysOtherMouseButtonEvents: bool); + #[method(delaysKeyEvents)] pub unsafe fn delaysKeyEvents(&self) -> bool; + #[method(setDelaysKeyEvents:)] pub unsafe fn setDelaysKeyEvents(&self, delaysKeyEvents: bool); + #[method(delaysMagnificationEvents)] pub unsafe fn delaysMagnificationEvents(&self) -> bool; + #[method(setDelaysMagnificationEvents:)] pub unsafe fn setDelaysMagnificationEvents(&self, delaysMagnificationEvents: bool); + #[method(delaysRotationEvents)] pub unsafe fn delaysRotationEvents(&self) -> bool; + #[method(setDelaysRotationEvents:)] pub unsafe fn setDelaysRotationEvents(&self, delaysRotationEvents: bool); + #[method(locationInView:)] pub unsafe fn locationInView(&self, view: Option<&NSView>) -> NSPoint; } ); + extern_methods!( - #[doc = "NSTouchBar"] + /// NSTouchBar unsafe impl NSGestureRecognizer { #[method(allowedTouchTypes)] pub unsafe fn allowedTouchTypes(&self) -> NSTouchTypeMask; + #[method(setAllowedTouchTypes:)] pub unsafe fn setAllowedTouchTypes(&self, allowedTouchTypes: NSTouchTypeMask); } ); + pub type NSGestureRecognizerDelegate = NSObject; + extern_methods!( - #[doc = "NSSubclassUse"] + /// NSSubclassUse unsafe impl NSGestureRecognizer { #[method(state)] pub unsafe fn state(&self) -> NSGestureRecognizerState; + #[method(setState:)] pub unsafe fn setState(&self, state: NSGestureRecognizerState); + #[method(reset)] pub unsafe fn reset(&self); + #[method(canPreventGestureRecognizer:)] pub unsafe fn canPreventGestureRecognizer( &self, preventedGestureRecognizer: &NSGestureRecognizer, ) -> bool; + #[method(canBePreventedByGestureRecognizer:)] pub unsafe fn canBePreventedByGestureRecognizer( &self, preventingGestureRecognizer: &NSGestureRecognizer, ) -> bool; + #[method(shouldRequireFailureOfGestureRecognizer:)] pub unsafe fn shouldRequireFailureOfGestureRecognizer( &self, otherGestureRecognizer: &NSGestureRecognizer, ) -> bool; + #[method(shouldBeRequiredToFailByGestureRecognizer:)] pub unsafe fn shouldBeRequiredToFailByGestureRecognizer( &self, otherGestureRecognizer: &NSGestureRecognizer, ) -> bool; + #[method(mouseDown:)] pub unsafe fn mouseDown(&self, event: &NSEvent); + #[method(rightMouseDown:)] pub unsafe fn rightMouseDown(&self, event: &NSEvent); + #[method(otherMouseDown:)] pub unsafe fn otherMouseDown(&self, event: &NSEvent); + #[method(mouseUp:)] pub unsafe fn mouseUp(&self, event: &NSEvent); + #[method(rightMouseUp:)] pub unsafe fn rightMouseUp(&self, event: &NSEvent); + #[method(otherMouseUp:)] pub unsafe fn otherMouseUp(&self, event: &NSEvent); + #[method(mouseDragged:)] pub unsafe fn mouseDragged(&self, event: &NSEvent); + #[method(rightMouseDragged:)] pub unsafe fn rightMouseDragged(&self, event: &NSEvent); + #[method(otherMouseDragged:)] pub unsafe fn otherMouseDragged(&self, event: &NSEvent); + #[method(keyDown:)] pub unsafe fn keyDown(&self, event: &NSEvent); + #[method(keyUp:)] pub unsafe fn keyUp(&self, event: &NSEvent); + #[method(flagsChanged:)] pub unsafe fn flagsChanged(&self, event: &NSEvent); + #[method(tabletPoint:)] pub unsafe fn tabletPoint(&self, event: &NSEvent); + #[method(magnifyWithEvent:)] pub unsafe fn magnifyWithEvent(&self, event: &NSEvent); + #[method(rotateWithEvent:)] pub unsafe fn rotateWithEvent(&self, event: &NSEvent); + #[method(pressureChangeWithEvent:)] pub unsafe fn pressureChangeWithEvent(&self, event: &NSEvent); + #[method(touchesBeganWithEvent:)] pub unsafe fn touchesBeganWithEvent(&self, event: &NSEvent); + #[method(touchesMovedWithEvent:)] pub unsafe fn touchesMovedWithEvent(&self, event: &NSEvent); + #[method(touchesEndedWithEvent:)] pub unsafe fn touchesEndedWithEvent(&self, event: &NSEvent); + #[method(touchesCancelledWithEvent:)] pub unsafe fn touchesCancelledWithEvent(&self, event: &NSEvent); } diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index b09fa4e5e..60debd295 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSGlyphStorage = NSObject; + extern_class!( #[derive(Debug)] pub struct NSGlyphGenerator; + unsafe impl ClassType for NSGlyphGenerator { type Super = NSObject; } ); + extern_methods!( unsafe impl NSGlyphGenerator { #[method(generateGlyphsForGlyphStorage:desiredNumberOfCharacters:glyphIndex:characterIndex:)] @@ -20,6 +26,7 @@ extern_methods!( glyphIndex: *mut NSUInteger, charIndex: *mut NSUInteger, ); + #[method_id(sharedGlyphGenerator)] pub unsafe fn sharedGlyphGenerator() -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs index cd394bebd..d18bcd62f 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSGlyphInfo; + unsafe impl ClassType for NSGlyphInfo { type Super = NSObject; } ); + extern_methods!( unsafe impl NSGlyphInfo { #[method_id(glyphInfoWithCGGlyph:forFont:baseString:)] @@ -17,14 +22,17 @@ extern_methods!( font: &NSFont, string: &NSString, ) -> Option>; + #[method(glyphID)] pub unsafe fn glyphID(&self) -> CGGlyph; + #[method_id(baseString)] pub unsafe fn baseString(&self) -> Id; } ); + extern_methods!( - #[doc = "NSGlyphInfo_Deprecated"] + /// NSGlyphInfo_Deprecated unsafe impl NSGlyphInfo { #[method_id(glyphInfoWithGlyphName:forFont:baseString:)] pub unsafe fn glyphInfoWithGlyphName_forFont_baseString( @@ -32,22 +40,27 @@ extern_methods!( font: &NSFont, string: &NSString, ) -> Option>; + #[method_id(glyphInfoWithGlyph:forFont:baseString:)] pub unsafe fn glyphInfoWithGlyph_forFont_baseString( glyph: NSGlyph, font: &NSFont, string: &NSString, ) -> Option>; + #[method_id(glyphInfoWithCharacterIdentifier:collection:baseString:)] pub unsafe fn glyphInfoWithCharacterIdentifier_collection_baseString( cid: NSUInteger, characterCollection: NSCharacterCollection, string: &NSString, ) -> Option>; + #[method_id(glyphName)] pub unsafe fn glyphName(&self) -> Option>; + #[method(characterIdentifier)] pub unsafe fn characterIdentifier(&self) -> NSUInteger; + #[method(characterCollection)] pub unsafe fn characterCollection(&self) -> NSCharacterCollection; } diff --git a/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index 0c2fedec6..025464976 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/NSGradient.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSGradient; + unsafe impl ClassType for NSGradient { type Super = NSObject; } ); + extern_methods!( unsafe impl NSGradient { #[method_id(initWithStartingColor:endingColor:)] @@ -17,11 +22,13 @@ extern_methods!( startingColor: &NSColor, endingColor: &NSColor, ) -> Option>; + #[method_id(initWithColors:)] pub unsafe fn initWithColors( &self, colorArray: &NSArray, ) -> Option>; + #[method_id(initWithColors:atLocations:colorSpace:)] pub unsafe fn initWithColors_atLocations_colorSpace( &self, @@ -29,8 +36,10 @@ extern_methods!( locations: *mut CGFloat, colorSpace: &NSColorSpace, ) -> Option>; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(drawFromPoint:toPoint:options:)] pub unsafe fn drawFromPoint_toPoint_options( &self, @@ -38,10 +47,13 @@ extern_methods!( endingPoint: NSPoint, options: NSGradientDrawingOptions, ); + #[method(drawInRect:angle:)] pub unsafe fn drawInRect_angle(&self, rect: NSRect, angle: CGFloat); + #[method(drawInBezierPath:angle:)] pub unsafe fn drawInBezierPath_angle(&self, path: &NSBezierPath, angle: CGFloat); + #[method(drawFromCenter:radius:toCenter:radius:options:)] pub unsafe fn drawFromCenter_radius_toCenter_radius_options( &self, @@ -51,22 +63,27 @@ extern_methods!( endRadius: CGFloat, options: NSGradientDrawingOptions, ); + #[method(drawInRect:relativeCenterPosition:)] pub unsafe fn drawInRect_relativeCenterPosition( &self, rect: NSRect, relativeCenterPosition: NSPoint, ); + #[method(drawInBezierPath:relativeCenterPosition:)] pub unsafe fn drawInBezierPath_relativeCenterPosition( &self, path: &NSBezierPath, relativeCenterPosition: NSPoint, ); + #[method_id(colorSpace)] pub unsafe fn colorSpace(&self) -> Id; + #[method(numberOfColorStops)] pub unsafe fn numberOfColorStops(&self) -> NSInteger; + #[method(getColor:location:atIndex:)] pub unsafe fn getColor_location_atIndex( &self, @@ -74,6 +91,7 @@ extern_methods!( location: *mut CGFloat, index: NSInteger, ); + #[method_id(interpolatedColorAtLocation:)] pub unsafe fn interpolatedColorAtLocation(&self, location: CGFloat) -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs index d9262f940..6e83f727a 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphics.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphics.rs @@ -1,6 +1,10 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSColorSpaceName = NSString; + pub type NSDeviceDescriptionKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index 63aa5da65..14aa50979 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -1,108 +1,146 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSGraphicsContextAttributeKey = NSString; + pub type NSGraphicsContextRepresentationFormatName = NSString; + extern_class!( #[derive(Debug)] pub struct NSGraphicsContext; + unsafe impl ClassType for NSGraphicsContext { type Super = NSObject; } ); + extern_methods!( unsafe impl NSGraphicsContext { #[method_id(graphicsContextWithAttributes:)] pub unsafe fn graphicsContextWithAttributes( attributes: &NSDictionary, ) -> Option>; + #[method_id(graphicsContextWithWindow:)] pub unsafe fn graphicsContextWithWindow(window: &NSWindow) -> Id; + #[method_id(graphicsContextWithBitmapImageRep:)] pub unsafe fn graphicsContextWithBitmapImageRep( bitmapRep: &NSBitmapImageRep, ) -> Option>; + #[method_id(graphicsContextWithCGContext:flipped:)] pub unsafe fn graphicsContextWithCGContext_flipped( graphicsPort: CGContextRef, initialFlippedState: bool, ) -> Id; + #[method_id(currentContext)] pub unsafe fn currentContext() -> Option>; + #[method(setCurrentContext:)] pub unsafe fn setCurrentContext(currentContext: Option<&NSGraphicsContext>); + #[method(currentContextDrawingToScreen)] pub unsafe fn currentContextDrawingToScreen() -> bool; + #[method(saveGraphicsState)] pub unsafe fn saveGraphicsState(); + #[method(restoreGraphicsState)] pub unsafe fn restoreGraphicsState(); + #[method_id(attributes)] pub unsafe fn attributes( &self, ) -> Option, Shared>>; + #[method(isDrawingToScreen)] pub unsafe fn isDrawingToScreen(&self) -> bool; + #[method(saveGraphicsState)] pub unsafe fn saveGraphicsState(&self); + #[method(restoreGraphicsState)] pub unsafe fn restoreGraphicsState(&self); + #[method(flushGraphics)] pub unsafe fn flushGraphics(&self); + #[method(CGContext)] pub unsafe fn CGContext(&self) -> CGContextRef; + #[method(isFlipped)] pub unsafe fn isFlipped(&self) -> bool; } ); + extern_methods!( - #[doc = "NSGraphicsContext_RenderingOptions"] + /// NSGraphicsContext_RenderingOptions unsafe impl NSGraphicsContext { #[method(shouldAntialias)] pub unsafe fn shouldAntialias(&self) -> bool; + #[method(setShouldAntialias:)] pub unsafe fn setShouldAntialias(&self, shouldAntialias: bool); + #[method(imageInterpolation)] pub unsafe fn imageInterpolation(&self) -> NSImageInterpolation; + #[method(setImageInterpolation:)] pub unsafe fn setImageInterpolation(&self, imageInterpolation: NSImageInterpolation); + #[method(patternPhase)] pub unsafe fn patternPhase(&self) -> NSPoint; + #[method(setPatternPhase:)] pub unsafe fn setPatternPhase(&self, patternPhase: NSPoint); + #[method(compositingOperation)] pub unsafe fn compositingOperation(&self) -> NSCompositingOperation; + #[method(setCompositingOperation:)] pub unsafe fn setCompositingOperation(&self, compositingOperation: NSCompositingOperation); + #[method(colorRenderingIntent)] pub unsafe fn colorRenderingIntent(&self) -> NSColorRenderingIntent; + #[method(setColorRenderingIntent:)] pub unsafe fn setColorRenderingIntent(&self, colorRenderingIntent: NSColorRenderingIntent); } ); + extern_methods!( - #[doc = "NSQuartzCoreAdditions"] + /// NSQuartzCoreAdditions unsafe impl NSGraphicsContext { #[method_id(CIContext)] pub unsafe fn CIContext(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSGraphicsContextDeprecated"] + /// NSGraphicsContextDeprecated unsafe impl NSGraphicsContext { #[method(setGraphicsState:)] pub unsafe fn setGraphicsState(gState: NSInteger); + #[method_id(focusStack)] pub unsafe fn focusStack(&self) -> Option>; + #[method(setFocusStack:)] pub unsafe fn setFocusStack(&self, stack: Option<&Object>); + #[method_id(graphicsContextWithGraphicsPort:flipped:)] pub unsafe fn graphicsContextWithGraphicsPort_flipped( graphicsPort: NonNull, initialFlippedState: bool, ) -> Id; + #[method(graphicsPort)] pub unsafe fn graphicsPort(&self) -> NonNull; } diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index 2a2e15cf0..82b468264 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -1,94 +1,129 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSGridView; + unsafe impl ClassType for NSGridView { type Super = NSView; } ); + extern_methods!( unsafe impl NSGridView { #[method_id(initWithFrame:)] pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(gridViewWithNumberOfColumns:rows:)] pub unsafe fn gridViewWithNumberOfColumns_rows( columnCount: NSInteger, rowCount: NSInteger, ) -> Id; + #[method_id(gridViewWithViews:)] pub unsafe fn gridViewWithViews(rows: &NSArray>) -> Id; + #[method(numberOfRows)] pub unsafe fn numberOfRows(&self) -> NSInteger; + #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSInteger; + #[method_id(rowAtIndex:)] pub unsafe fn rowAtIndex(&self, index: NSInteger) -> Id; + #[method(indexOfRow:)] pub unsafe fn indexOfRow(&self, row: &NSGridRow) -> NSInteger; + #[method_id(columnAtIndex:)] pub unsafe fn columnAtIndex(&self, index: NSInteger) -> Id; + #[method(indexOfColumn:)] pub unsafe fn indexOfColumn(&self, column: &NSGridColumn) -> NSInteger; + #[method_id(cellAtColumnIndex:rowIndex:)] pub unsafe fn cellAtColumnIndex_rowIndex( &self, columnIndex: NSInteger, rowIndex: NSInteger, ) -> Id; + #[method_id(cellForView:)] pub unsafe fn cellForView(&self, view: &NSView) -> Option>; + #[method_id(addRowWithViews:)] pub unsafe fn addRowWithViews(&self, views: &NSArray) -> Id; + #[method_id(insertRowAtIndex:withViews:)] pub unsafe fn insertRowAtIndex_withViews( &self, index: NSInteger, views: &NSArray, ) -> Id; + #[method(moveRowAtIndex:toIndex:)] pub unsafe fn moveRowAtIndex_toIndex(&self, fromIndex: NSInteger, toIndex: NSInteger); + #[method(removeRowAtIndex:)] pub unsafe fn removeRowAtIndex(&self, index: NSInteger); + #[method_id(addColumnWithViews:)] pub unsafe fn addColumnWithViews( &self, views: &NSArray, ) -> Id; + #[method_id(insertColumnAtIndex:withViews:)] pub unsafe fn insertColumnAtIndex_withViews( &self, index: NSInteger, views: &NSArray, ) -> Id; + #[method(moveColumnAtIndex:toIndex:)] pub unsafe fn moveColumnAtIndex_toIndex(&self, fromIndex: NSInteger, toIndex: NSInteger); + #[method(removeColumnAtIndex:)] pub unsafe fn removeColumnAtIndex(&self, index: NSInteger); + #[method(xPlacement)] pub unsafe fn xPlacement(&self) -> NSGridCellPlacement; + #[method(setXPlacement:)] pub unsafe fn setXPlacement(&self, xPlacement: NSGridCellPlacement); + #[method(yPlacement)] pub unsafe fn yPlacement(&self) -> NSGridCellPlacement; + #[method(setYPlacement:)] pub unsafe fn setYPlacement(&self, yPlacement: NSGridCellPlacement); + #[method(rowAlignment)] pub unsafe fn rowAlignment(&self) -> NSGridRowAlignment; + #[method(setRowAlignment:)] pub unsafe fn setRowAlignment(&self, rowAlignment: NSGridRowAlignment); + #[method(rowSpacing)] pub unsafe fn rowSpacing(&self) -> CGFloat; + #[method(setRowSpacing:)] pub unsafe fn setRowSpacing(&self, rowSpacing: CGFloat); + #[method(columnSpacing)] pub unsafe fn columnSpacing(&self) -> CGFloat; + #[method(setColumnSpacing:)] pub unsafe fn setColumnSpacing(&self, columnSpacing: CGFloat); + #[method(mergeCellsInHorizontalRange:verticalRange:)] pub unsafe fn mergeCellsInHorizontalRange_verticalRange( &self, @@ -97,121 +132,170 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSGridRow; + unsafe impl ClassType for NSGridRow { type Super = NSObject; } ); + extern_methods!( unsafe impl NSGridRow { #[method_id(gridView)] pub unsafe fn gridView(&self) -> Option>; + #[method(numberOfCells)] pub unsafe fn numberOfCells(&self) -> NSInteger; + #[method_id(cellAtIndex:)] pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Id; + #[method(yPlacement)] pub unsafe fn yPlacement(&self) -> NSGridCellPlacement; + #[method(setYPlacement:)] pub unsafe fn setYPlacement(&self, yPlacement: NSGridCellPlacement); + #[method(rowAlignment)] pub unsafe fn rowAlignment(&self) -> NSGridRowAlignment; + #[method(setRowAlignment:)] pub unsafe fn setRowAlignment(&self, rowAlignment: NSGridRowAlignment); + #[method(height)] pub unsafe fn height(&self) -> CGFloat; + #[method(setHeight:)] pub unsafe fn setHeight(&self, height: CGFloat); + #[method(topPadding)] pub unsafe fn topPadding(&self) -> CGFloat; + #[method(setTopPadding:)] pub unsafe fn setTopPadding(&self, topPadding: CGFloat); + #[method(bottomPadding)] pub unsafe fn bottomPadding(&self) -> CGFloat; + #[method(setBottomPadding:)] pub unsafe fn setBottomPadding(&self, bottomPadding: CGFloat); + #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[method(mergeCellsInRange:)] pub unsafe fn mergeCellsInRange(&self, range: NSRange); } ); + extern_class!( #[derive(Debug)] pub struct NSGridColumn; + unsafe impl ClassType for NSGridColumn { type Super = NSObject; } ); + extern_methods!( unsafe impl NSGridColumn { #[method_id(gridView)] pub unsafe fn gridView(&self) -> Option>; + #[method(numberOfCells)] pub unsafe fn numberOfCells(&self) -> NSInteger; + #[method_id(cellAtIndex:)] pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Id; + #[method(xPlacement)] pub unsafe fn xPlacement(&self) -> NSGridCellPlacement; + #[method(setXPlacement:)] pub unsafe fn setXPlacement(&self, xPlacement: NSGridCellPlacement); + #[method(width)] pub unsafe fn width(&self) -> CGFloat; + #[method(setWidth:)] pub unsafe fn setWidth(&self, width: CGFloat); + #[method(leadingPadding)] pub unsafe fn leadingPadding(&self) -> CGFloat; + #[method(setLeadingPadding:)] pub unsafe fn setLeadingPadding(&self, leadingPadding: CGFloat); + #[method(trailingPadding)] pub unsafe fn trailingPadding(&self) -> CGFloat; + #[method(setTrailingPadding:)] pub unsafe fn setTrailingPadding(&self, trailingPadding: CGFloat); + #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[method(mergeCellsInRange:)] pub unsafe fn mergeCellsInRange(&self, range: NSRange); } ); + extern_class!( #[derive(Debug)] pub struct NSGridCell; + unsafe impl ClassType for NSGridCell { type Super = NSObject; } ); + extern_methods!( unsafe impl NSGridCell { #[method_id(contentView)] pub unsafe fn contentView(&self) -> Option>; + #[method(setContentView:)] pub unsafe fn setContentView(&self, contentView: Option<&NSView>); + #[method_id(emptyContentView)] pub unsafe fn emptyContentView() -> Id; + #[method_id(row)] pub unsafe fn row(&self) -> Option>; + #[method_id(column)] pub unsafe fn column(&self) -> Option>; + #[method(xPlacement)] pub unsafe fn xPlacement(&self) -> NSGridCellPlacement; + #[method(setXPlacement:)] pub unsafe fn setXPlacement(&self, xPlacement: NSGridCellPlacement); + #[method(yPlacement)] pub unsafe fn yPlacement(&self) -> NSGridCellPlacement; + #[method(setYPlacement:)] pub unsafe fn setYPlacement(&self, yPlacement: NSGridCellPlacement); + #[method(rowAlignment)] pub unsafe fn rowAlignment(&self) -> NSGridRowAlignment; + #[method(setRowAlignment:)] pub unsafe fn setRowAlignment(&self, rowAlignment: NSGridRowAlignment); + #[method_id(customPlacementConstraints)] pub unsafe fn customPlacementConstraints(&self) -> Id, Shared>; + #[method(setCustomPlacementConstraints:)] pub unsafe fn setCustomPlacementConstraints( &self, diff --git a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs index 9352a7c2c..88bfa48ed 100644 --- a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSGroupTouchBarItem; + unsafe impl ClassType for NSGroupTouchBarItem { type Super = NSTouchBarItem; } ); + extern_methods!( unsafe impl NSGroupTouchBarItem { #[method_id(groupItemWithIdentifier:items:)] @@ -16,47 +21,62 @@ extern_methods!( identifier: &NSTouchBarItemIdentifier, items: &NSArray, ) -> Id; + #[method_id(groupItemWithIdentifier:items:allowedCompressionOptions:)] pub unsafe fn groupItemWithIdentifier_items_allowedCompressionOptions( identifier: &NSTouchBarItemIdentifier, items: &NSArray, allowedCompressionOptions: &NSUserInterfaceCompressionOptions, ) -> Id; + #[method_id(alertStyleGroupItemWithIdentifier:)] pub unsafe fn alertStyleGroupItemWithIdentifier( identifier: &NSTouchBarItemIdentifier, ) -> Id; + #[method_id(groupTouchBar)] pub unsafe fn groupTouchBar(&self) -> Id; + #[method(setGroupTouchBar:)] pub unsafe fn setGroupTouchBar(&self, groupTouchBar: &NSTouchBar); + #[method_id(customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + #[method(groupUserInterfaceLayoutDirection)] pub unsafe fn groupUserInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setGroupUserInterfaceLayoutDirection:)] pub unsafe fn setGroupUserInterfaceLayoutDirection( &self, groupUserInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, ); + #[method(prefersEqualWidths)] pub unsafe fn prefersEqualWidths(&self) -> bool; + #[method(setPrefersEqualWidths:)] pub unsafe fn setPrefersEqualWidths(&self, prefersEqualWidths: bool); + #[method(preferredItemWidth)] pub unsafe fn preferredItemWidth(&self) -> CGFloat; + #[method(setPreferredItemWidth:)] pub unsafe fn setPreferredItemWidth(&self, preferredItemWidth: CGFloat); + #[method_id(effectiveCompressionOptions)] pub unsafe fn effectiveCompressionOptions( &self, ) -> Id; + #[method_id(prioritizedCompressionOptions)] pub unsafe fn prioritizedCompressionOptions( &self, ) -> Id, Shared>; + #[method(setPrioritizedCompressionOptions:)] pub unsafe fn setPrioritizedCompressionOptions( &self, diff --git a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs index 07f9cb919..77d5fa014 100644 --- a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs +++ b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSHapticFeedbackPerformer = NSObject; + extern_class!( #[derive(Debug)] pub struct NSHapticFeedbackManager; + unsafe impl ClassType for NSHapticFeedbackManager { type Super = NSObject; } ); + extern_methods!( unsafe impl NSHapticFeedbackManager { #[method_id(defaultPerformer)] diff --git a/crates/icrate/src/generated/AppKit/NSHelpManager.rs b/crates/icrate/src/generated/AppKit/NSHelpManager.rs index da3c77172..55ee6e43c 100644 --- a/crates/icrate/src/generated/AppKit/NSHelpManager.rs +++ b/crates/icrate/src/generated/AppKit/NSHelpManager.rs @@ -1,58 +1,76 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSHelpBookName = NSString; + pub type NSHelpAnchorName = NSString; + pub type NSHelpManagerContextHelpKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSHelpManager; + unsafe impl ClassType for NSHelpManager { type Super = NSObject; } ); + extern_methods!( unsafe impl NSHelpManager { #[method_id(sharedHelpManager)] pub unsafe fn sharedHelpManager() -> Id; + #[method(isContextHelpModeActive)] pub unsafe fn isContextHelpModeActive() -> bool; + #[method(setContextHelpModeActive:)] pub unsafe fn setContextHelpModeActive(contextHelpModeActive: bool); + #[method(setContextHelp:forObject:)] pub unsafe fn setContextHelp_forObject( &self, attrString: &NSAttributedString, object: &Object, ); + #[method(removeContextHelpForObject:)] pub unsafe fn removeContextHelpForObject(&self, object: &Object); + #[method_id(contextHelpForObject:)] pub unsafe fn contextHelpForObject( &self, object: &Object, ) -> Option>; + #[method(showContextHelpForObject:locationHint:)] pub unsafe fn showContextHelpForObject_locationHint( &self, object: &Object, pt: NSPoint, ) -> bool; + #[method(openHelpAnchor:inBook:)] pub unsafe fn openHelpAnchor_inBook( &self, anchor: &NSHelpAnchorName, book: Option<&NSHelpBookName>, ); + #[method(findString:inBook:)] pub unsafe fn findString_inBook(&self, query: &NSString, book: Option<&NSHelpBookName>); + #[method(registerBooksInBundle:)] pub unsafe fn registerBooksInBundle(&self, bundle: &NSBundle) -> bool; } ); + extern_methods!( - #[doc = "NSBundleHelpExtension"] + /// NSBundleHelpExtension unsafe impl NSBundle { #[method_id(contextHelpForKey:)] pub unsafe fn contextHelpForKey( @@ -61,11 +79,13 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSApplicationHelpExtension"] + /// NSApplicationHelpExtension unsafe impl NSApplication { #[method(activateContextHelpMode:)] pub unsafe fn activateContextHelpMode(&self, sender: Option<&Object>); + #[method(showHelp:)] pub unsafe fn showHelp(&self, sender: Option<&Object>); } diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index d09f5ca8c..8bbfc862e 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -1,86 +1,118 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSImageName = NSString; + extern_class!( #[derive(Debug)] pub struct NSImage; + unsafe impl ClassType for NSImage { type Super = NSObject; } ); + extern_methods!( unsafe impl NSImage { #[method_id(imageNamed:)] pub unsafe fn imageNamed(name: &NSImageName) -> Option>; + #[method_id(imageWithSystemSymbolName:accessibilityDescription:)] pub unsafe fn imageWithSystemSymbolName_accessibilityDescription( symbolName: &NSString, description: Option<&NSString>, ) -> Option>; + #[method_id(initWithSize:)] pub unsafe fn initWithSize(&self, size: NSSize) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Option>; + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( &self, fileName: &NSString, ) -> Option>; + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + #[method_id(initByReferencingFile:)] pub unsafe fn initByReferencingFile(&self, fileName: &NSString) -> Option>; + #[method_id(initByReferencingURL:)] pub unsafe fn initByReferencingURL(&self, url: &NSURL) -> Id; + #[method_id(initWithPasteboard:)] pub unsafe fn initWithPasteboard( &self, pasteboard: &NSPasteboard, ) -> Option>; + #[method_id(initWithDataIgnoringOrientation:)] pub unsafe fn initWithDataIgnoringOrientation( &self, data: &NSData, ) -> Option>; + #[method_id(imageWithSize:flipped:drawingHandler:)] pub unsafe fn imageWithSize_flipped_drawingHandler( size: NSSize, drawingHandlerShouldBeCalledWithFlippedContext: bool, drawingHandler: TodoBlock, ) -> Id; + #[method(size)] pub unsafe fn size(&self) -> NSSize; + #[method(setSize:)] pub unsafe fn setSize(&self, size: NSSize); + #[method(setName:)] pub unsafe fn setName(&self, string: Option<&NSImageName>) -> bool; + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(usesEPSOnResolutionMismatch)] pub unsafe fn usesEPSOnResolutionMismatch(&self) -> bool; + #[method(setUsesEPSOnResolutionMismatch:)] pub unsafe fn setUsesEPSOnResolutionMismatch(&self, usesEPSOnResolutionMismatch: bool); + #[method(prefersColorMatch)] pub unsafe fn prefersColorMatch(&self) -> bool; + #[method(setPrefersColorMatch:)] pub unsafe fn setPrefersColorMatch(&self, prefersColorMatch: bool); + #[method(matchesOnMultipleResolution)] pub unsafe fn matchesOnMultipleResolution(&self) -> bool; + #[method(setMatchesOnMultipleResolution:)] pub unsafe fn setMatchesOnMultipleResolution(&self, matchesOnMultipleResolution: bool); + #[method(matchesOnlyOnBestFittingAxis)] pub unsafe fn matchesOnlyOnBestFittingAxis(&self) -> bool; + #[method(setMatchesOnlyOnBestFittingAxis:)] pub unsafe fn setMatchesOnlyOnBestFittingAxis(&self, matchesOnlyOnBestFittingAxis: bool); + #[method(drawAtPoint:fromRect:operation:fraction:)] pub unsafe fn drawAtPoint_fromRect_operation_fraction( &self, @@ -89,6 +121,7 @@ extern_methods!( op: NSCompositingOperation, delta: CGFloat, ); + #[method(drawInRect:fromRect:operation:fraction:)] pub unsafe fn drawInRect_fromRect_operation_fraction( &self, @@ -97,6 +130,7 @@ extern_methods!( op: NSCompositingOperation, delta: CGFloat, ); + #[method(drawInRect:fromRect:operation:fraction:respectFlipped:hints:)] pub unsafe fn drawInRect_fromRect_operation_fraction_respectFlipped_hints( &self, @@ -107,74 +141,103 @@ extern_methods!( respectContextIsFlipped: bool, hints: Option<&NSDictionary>, ); + #[method(drawRepresentation:inRect:)] pub unsafe fn drawRepresentation_inRect(&self, imageRep: &NSImageRep, rect: NSRect) -> bool; + #[method(drawInRect:)] pub unsafe fn drawInRect(&self, rect: NSRect); + #[method(recache)] pub unsafe fn recache(&self); + #[method_id(TIFFRepresentation)] pub unsafe fn TIFFRepresentation(&self) -> Option>; + #[method_id(TIFFRepresentationUsingCompression:factor:)] pub unsafe fn TIFFRepresentationUsingCompression_factor( &self, comp: NSTIFFCompression, factor: c_float, ) -> Option>; + #[method_id(representations)] pub unsafe fn representations(&self) -> Id, Shared>; + #[method(addRepresentations:)] pub unsafe fn addRepresentations(&self, imageReps: &NSArray); + #[method(addRepresentation:)] pub unsafe fn addRepresentation(&self, imageRep: &NSImageRep); + #[method(removeRepresentation:)] pub unsafe fn removeRepresentation(&self, imageRep: &NSImageRep); + #[method(isValid)] pub unsafe fn isValid(&self) -> bool; + #[method(lockFocus)] pub unsafe fn lockFocus(&self); + #[method(lockFocusFlipped:)] pub unsafe fn lockFocusFlipped(&self, flipped: bool); + #[method(unlockFocus)] pub unsafe fn unlockFocus(&self); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSImageDelegate>); + #[method_id(imageTypes)] pub unsafe fn imageTypes() -> Id, Shared>; + #[method_id(imageUnfilteredTypes)] pub unsafe fn imageUnfilteredTypes() -> Id, Shared>; + #[method(canInitWithPasteboard:)] pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; + #[method(cancelIncrementalLoad)] pub unsafe fn cancelIncrementalLoad(&self); + #[method(cacheMode)] pub unsafe fn cacheMode(&self) -> NSImageCacheMode; + #[method(setCacheMode:)] pub unsafe fn setCacheMode(&self, cacheMode: NSImageCacheMode); + #[method(alignmentRect)] pub unsafe fn alignmentRect(&self) -> NSRect; + #[method(setAlignmentRect:)] pub unsafe fn setAlignmentRect(&self, alignmentRect: NSRect); + #[method(isTemplate)] pub unsafe fn isTemplate(&self) -> bool; + #[method(setTemplate:)] pub unsafe fn setTemplate(&self, template: bool); + #[method_id(accessibilityDescription)] pub unsafe fn accessibilityDescription(&self) -> Option>; + #[method(setAccessibilityDescription:)] pub unsafe fn setAccessibilityDescription( &self, accessibilityDescription: Option<&NSString>, ); + #[method_id(initWithCGImage:size:)] pub unsafe fn initWithCGImage_size( &self, cgImage: CGImageRef, size: NSSize, ) -> Id; + #[method(CGImageForProposedRect:context:hints:)] pub unsafe fn CGImageForProposedRect_context_hints( &self, @@ -182,6 +245,7 @@ extern_methods!( referenceContext: Option<&NSGraphicsContext>, hints: Option<&NSDictionary>, ) -> CGImageRef; + #[method_id(bestRepresentationForRect:context:hints:)] pub unsafe fn bestRepresentationForRect_context_hints( &self, @@ -189,6 +253,7 @@ extern_methods!( referenceContext: Option<&NSGraphicsContext>, hints: Option<&NSDictionary>, ) -> Option>; + #[method(hitTestRect:withImageDestinationRect:context:hints:flipped:)] pub unsafe fn hitTestRect_withImageDestinationRect_context_hints_flipped( &self, @@ -198,51 +263,65 @@ extern_methods!( hints: Option<&NSDictionary>, flipped: bool, ) -> bool; + #[method(recommendedLayerContentsScale:)] pub unsafe fn recommendedLayerContentsScale( &self, preferredContentsScale: CGFloat, ) -> CGFloat; + #[method_id(layerContentsForContentsScale:)] pub unsafe fn layerContentsForContentsScale( &self, layerContentsScale: CGFloat, ) -> Id; + #[method(capInsets)] pub unsafe fn capInsets(&self) -> NSEdgeInsets; + #[method(setCapInsets:)] pub unsafe fn setCapInsets(&self, capInsets: NSEdgeInsets); + #[method(resizingMode)] pub unsafe fn resizingMode(&self) -> NSImageResizingMode; + #[method(setResizingMode:)] pub unsafe fn setResizingMode(&self, resizingMode: NSImageResizingMode); + #[method_id(imageWithSymbolConfiguration:)] pub unsafe fn imageWithSymbolConfiguration( &self, configuration: &NSImageSymbolConfiguration, ) -> Option>; + #[method_id(symbolConfiguration)] pub unsafe fn symbolConfiguration(&self) -> Id; } ); + extern_methods!( unsafe impl NSImage {} ); + pub type NSImageDelegate = NSObject; + extern_methods!( - #[doc = "NSBundleImageExtension"] + /// NSBundleImageExtension unsafe impl NSBundle { #[method_id(imageForResource:)] pub unsafe fn imageForResource(&self, name: &NSImageName) -> Option>; + #[method_id(pathForImageResource:)] pub unsafe fn pathForImageResource( &self, name: &NSImageName, ) -> Option>; + #[method_id(URLForImageResource:)] pub unsafe fn URLForImageResource(&self, name: &NSImageName) -> Option>; } ); + extern_methods!( unsafe impl NSImage { #[method_id(bestRepresentationForDevice:)] @@ -250,22 +329,31 @@ extern_methods!( &self, deviceDescription: Option<&NSDictionary>, ) -> Option>; + #[method_id(imageUnfilteredFileTypes)] pub unsafe fn imageUnfilteredFileTypes() -> Id, Shared>; + #[method_id(imageUnfilteredPasteboardTypes)] pub unsafe fn imageUnfilteredPasteboardTypes() -> Id, Shared>; + #[method_id(imageFileTypes)] pub unsafe fn imageFileTypes() -> Id, Shared>; + #[method_id(imagePasteboardTypes)] pub unsafe fn imagePasteboardTypes() -> Id, Shared>; + #[method_id(initWithIconRef:)] pub unsafe fn initWithIconRef(&self, iconRef: IconRef) -> Id; + #[method(setFlipped:)] pub unsafe fn setFlipped(&self, flag: bool); + #[method(isFlipped)] pub unsafe fn isFlipped(&self) -> bool; + #[method(dissolveToPoint:fraction:)] pub unsafe fn dissolveToPoint_fraction(&self, point: NSPoint, fraction: CGFloat); + #[method(dissolveToPoint:fromRect:fraction:)] pub unsafe fn dissolveToPoint_fromRect_fraction( &self, @@ -273,8 +361,10 @@ extern_methods!( rect: NSRect, fraction: CGFloat, ); + #[method(compositeToPoint:operation:)] pub unsafe fn compositeToPoint_operation(&self, point: NSPoint, op: NSCompositingOperation); + #[method(compositeToPoint:fromRect:operation:)] pub unsafe fn compositeToPoint_fromRect_operation( &self, @@ -282,6 +372,7 @@ extern_methods!( rect: NSRect, op: NSCompositingOperation, ); + #[method(compositeToPoint:operation:fraction:)] pub unsafe fn compositeToPoint_operation_fraction( &self, @@ -289,6 +380,7 @@ extern_methods!( op: NSCompositingOperation, delta: CGFloat, ); + #[method(compositeToPoint:fromRect:operation:fraction:)] pub unsafe fn compositeToPoint_fromRect_operation_fraction( &self, @@ -297,33 +389,45 @@ extern_methods!( op: NSCompositingOperation, delta: CGFloat, ); + #[method(lockFocusOnRepresentation:)] pub unsafe fn lockFocusOnRepresentation(&self, imageRepresentation: Option<&NSImageRep>); + #[method(setScalesWhenResized:)] pub unsafe fn setScalesWhenResized(&self, flag: bool); + #[method(scalesWhenResized)] pub unsafe fn scalesWhenResized(&self) -> bool; + #[method(setDataRetained:)] pub unsafe fn setDataRetained(&self, flag: bool); + #[method(isDataRetained)] pub unsafe fn isDataRetained(&self) -> bool; + #[method(setCachedSeparately:)] pub unsafe fn setCachedSeparately(&self, flag: bool); + #[method(isCachedSeparately)] pub unsafe fn isCachedSeparately(&self) -> bool; + #[method(setCacheDepthMatchesImageDepth:)] pub unsafe fn setCacheDepthMatchesImageDepth(&self, flag: bool); + #[method(cacheDepthMatchesImageDepth)] pub unsafe fn cacheDepthMatchesImageDepth(&self) -> bool; } ); + extern_class!( #[derive(Debug)] pub struct NSImageSymbolConfiguration; + unsafe impl ClassType for NSImageSymbolConfiguration { type Super = NSObject; } ); + extern_methods!( unsafe impl NSImageSymbolConfiguration { #[method_id(configurationWithPointSize:weight:scale:)] @@ -332,30 +436,38 @@ extern_methods!( weight: NSFontWeight, scale: NSImageSymbolScale, ) -> Id; + #[method_id(configurationWithPointSize:weight:)] pub unsafe fn configurationWithPointSize_weight( pointSize: CGFloat, weight: NSFontWeight, ) -> Id; + #[method_id(configurationWithTextStyle:scale:)] pub unsafe fn configurationWithTextStyle_scale( style: &NSFontTextStyle, scale: NSImageSymbolScale, ) -> Id; + #[method_id(configurationWithTextStyle:)] pub unsafe fn configurationWithTextStyle(style: &NSFontTextStyle) -> Id; + #[method_id(configurationWithScale:)] pub unsafe fn configurationWithScale(scale: NSImageSymbolScale) -> Id; + #[method_id(configurationWithHierarchicalColor:)] pub unsafe fn configurationWithHierarchicalColor( hierarchicalColor: &NSColor, ) -> Id; + #[method_id(configurationWithPaletteColors:)] pub unsafe fn configurationWithPaletteColors( paletteColors: &NSArray, ) -> Id; + #[method_id(configurationPreferringMulticolor)] pub unsafe fn configurationPreferringMulticolor() -> Id; + #[method_id(configurationByApplyingConfiguration:)] pub unsafe fn configurationByApplyingConfiguration( &self, diff --git a/crates/icrate/src/generated/AppKit/NSImageCell.rs b/crates/icrate/src/generated/AppKit/NSImageCell.rs index 788412411..6a2460bb1 100644 --- a/crates/icrate/src/generated/AppKit/NSImageCell.rs +++ b/crates/icrate/src/generated/AppKit/NSImageCell.rs @@ -1,26 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSImageCell; + unsafe impl ClassType for NSImageCell { type Super = NSCell; } ); + extern_methods!( unsafe impl NSImageCell { #[method(imageAlignment)] pub unsafe fn imageAlignment(&self) -> NSImageAlignment; + #[method(setImageAlignment:)] pub unsafe fn setImageAlignment(&self, imageAlignment: NSImageAlignment); + #[method(imageScaling)] pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[method(setImageScaling:)] pub unsafe fn setImageScaling(&self, imageScaling: NSImageScaling); + #[method(imageFrameStyle)] pub unsafe fn imageFrameStyle(&self) -> NSImageFrameStyle; + #[method(setImageFrameStyle:)] pub unsafe fn setImageFrameStyle(&self, imageFrameStyle: NSImageFrameStyle); } diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index 2907e7698..7b83350ea 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -1,27 +1,38 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSImageHintKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSImageRep; + unsafe impl ClassType for NSImageRep { type Super = NSObject; } ); + extern_methods!( unsafe impl NSImageRep { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(draw)] pub unsafe fn draw(&self) -> bool; + #[method(drawAtPoint:)] pub unsafe fn drawAtPoint(&self, point: NSPoint) -> bool; + #[method(drawInRect:)] pub unsafe fn drawInRect(&self, rect: NSRect) -> bool; + #[method(drawInRect:fromRect:operation:fraction:respectFlipped:hints:)] pub unsafe fn drawInRect_fromRect_operation_fraction_respectFlipped_hints( &self, @@ -32,90 +43,128 @@ extern_methods!( respectContextIsFlipped: bool, hints: Option<&NSDictionary>, ) -> bool; + #[method(size)] pub unsafe fn size(&self) -> NSSize; + #[method(setSize:)] pub unsafe fn setSize(&self, size: NSSize); + #[method(hasAlpha)] pub unsafe fn hasAlpha(&self) -> bool; + #[method(setAlpha:)] pub unsafe fn setAlpha(&self, alpha: bool); + #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[method(setOpaque:)] pub unsafe fn setOpaque(&self, opaque: bool); + #[method_id(colorSpaceName)] pub unsafe fn colorSpaceName(&self) -> Id; + #[method(setColorSpaceName:)] pub unsafe fn setColorSpaceName(&self, colorSpaceName: &NSColorSpaceName); + #[method(bitsPerSample)] pub unsafe fn bitsPerSample(&self) -> NSInteger; + #[method(setBitsPerSample:)] pub unsafe fn setBitsPerSample(&self, bitsPerSample: NSInteger); + #[method(pixelsWide)] pub unsafe fn pixelsWide(&self) -> NSInteger; + #[method(setPixelsWide:)] pub unsafe fn setPixelsWide(&self, pixelsWide: NSInteger); + #[method(pixelsHigh)] pub unsafe fn pixelsHigh(&self) -> NSInteger; + #[method(setPixelsHigh:)] pub unsafe fn setPixelsHigh(&self, pixelsHigh: NSInteger); + #[method(layoutDirection)] pub unsafe fn layoutDirection(&self) -> NSImageLayoutDirection; + #[method(setLayoutDirection:)] pub unsafe fn setLayoutDirection(&self, layoutDirection: NSImageLayoutDirection); + #[method(registerImageRepClass:)] pub unsafe fn registerImageRepClass(imageRepClass: &Class); + #[method(unregisterImageRepClass:)] pub unsafe fn unregisterImageRepClass(imageRepClass: &Class); + #[method_id(registeredImageRepClasses)] pub unsafe fn registeredImageRepClasses() -> Id, Shared>; + #[method(imageRepClassForFileType:)] pub unsafe fn imageRepClassForFileType(type_: &NSString) -> Option<&Class>; + #[method(imageRepClassForPasteboardType:)] pub unsafe fn imageRepClassForPasteboardType(type_: &NSPasteboardType) -> Option<&Class>; + #[method(imageRepClassForType:)] pub unsafe fn imageRepClassForType(type_: &NSString) -> Option<&Class>; + #[method(imageRepClassForData:)] pub unsafe fn imageRepClassForData(data: &NSData) -> Option<&Class>; + #[method(canInitWithData:)] pub unsafe fn canInitWithData(data: &NSData) -> bool; + #[method_id(imageUnfilteredFileTypes)] pub unsafe fn imageUnfilteredFileTypes() -> Id, Shared>; + #[method_id(imageUnfilteredPasteboardTypes)] pub unsafe fn imageUnfilteredPasteboardTypes() -> Id, Shared>; + #[method_id(imageFileTypes)] pub unsafe fn imageFileTypes() -> Id, Shared>; + #[method_id(imagePasteboardTypes)] pub unsafe fn imagePasteboardTypes() -> Id, Shared>; + #[method_id(imageUnfilteredTypes)] pub unsafe fn imageUnfilteredTypes() -> Id, Shared>; + #[method_id(imageTypes)] pub unsafe fn imageTypes() -> Id, Shared>; + #[method(canInitWithPasteboard:)] pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; + #[method_id(imageRepsWithContentsOfFile:)] pub unsafe fn imageRepsWithContentsOfFile( filename: &NSString, ) -> Option, Shared>>; + #[method_id(imageRepWithContentsOfFile:)] pub unsafe fn imageRepWithContentsOfFile( filename: &NSString, ) -> Option>; + #[method_id(imageRepsWithContentsOfURL:)] pub unsafe fn imageRepsWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; + #[method_id(imageRepWithContentsOfURL:)] pub unsafe fn imageRepWithContentsOfURL(url: &NSURL) -> Option>; + #[method_id(imageRepsWithPasteboard:)] pub unsafe fn imageRepsWithPasteboard( pasteboard: &NSPasteboard, ) -> Option, Shared>>; + #[method_id(imageRepWithPasteboard:)] pub unsafe fn imageRepWithPasteboard( pasteboard: &NSPasteboard, ) -> Option>; + #[method(CGImageForProposedRect:context:hints:)] pub unsafe fn CGImageForProposedRect_context_hints( &self, diff --git a/crates/icrate/src/generated/AppKit/NSImageView.rs b/crates/icrate/src/generated/AppKit/NSImageView.rs index a4ffaae36..c4f53307d 100644 --- a/crates/icrate/src/generated/AppKit/NSImageView.rs +++ b/crates/icrate/src/generated/AppKit/NSImageView.rs @@ -1,55 +1,78 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSImageView; + unsafe impl ClassType for NSImageView { type Super = NSControl; } ); + extern_methods!( unsafe impl NSImageView { #[method_id(imageViewWithImage:)] pub unsafe fn imageViewWithImage(image: &NSImage) -> Id; + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[method(imageAlignment)] pub unsafe fn imageAlignment(&self) -> NSImageAlignment; + #[method(setImageAlignment:)] pub unsafe fn setImageAlignment(&self, imageAlignment: NSImageAlignment); + #[method(imageScaling)] pub unsafe fn imageScaling(&self) -> NSImageScaling; + #[method(setImageScaling:)] pub unsafe fn setImageScaling(&self, imageScaling: NSImageScaling); + #[method(imageFrameStyle)] pub unsafe fn imageFrameStyle(&self) -> NSImageFrameStyle; + #[method(setImageFrameStyle:)] pub unsafe fn setImageFrameStyle(&self, imageFrameStyle: NSImageFrameStyle); + #[method_id(symbolConfiguration)] pub unsafe fn symbolConfiguration(&self) -> Option>; + #[method(setSymbolConfiguration:)] pub unsafe fn setSymbolConfiguration( &self, symbolConfiguration: Option<&NSImageSymbolConfiguration>, ); + #[method_id(contentTintColor)] pub unsafe fn contentTintColor(&self) -> Option>; + #[method(setContentTintColor:)] pub unsafe fn setContentTintColor(&self, contentTintColor: Option<&NSColor>); + #[method(animates)] pub unsafe fn animates(&self) -> bool; + #[method(setAnimates:)] pub unsafe fn setAnimates(&self, animates: bool); + #[method(allowsCutCopyPaste)] pub unsafe fn allowsCutCopyPaste(&self) -> bool; + #[method(setAllowsCutCopyPaste:)] pub unsafe fn setAllowsCutCopyPaste(&self, allowsCutCopyPaste: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSInputManager.rs b/crates/icrate/src/generated/AppKit/NSInputManager.rs index 1652cb264..34998d7bf 100644 --- a/crates/icrate/src/generated/AppKit/NSInputManager.rs +++ b/crates/icrate/src/generated/AppKit/NSInputManager.rs @@ -1,51 +1,70 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextInput = NSObject; + extern_class!( #[derive(Debug)] pub struct NSInputManager; + unsafe impl ClassType for NSInputManager { type Super = NSObject; } ); + extern_methods!( unsafe impl NSInputManager { #[method_id(currentInputManager)] pub unsafe fn currentInputManager() -> Option>; + #[method(cycleToNextInputLanguage:)] pub unsafe fn cycleToNextInputLanguage(sender: Option<&Object>); + #[method(cycleToNextInputServerInLanguage:)] pub unsafe fn cycleToNextInputServerInLanguage(sender: Option<&Object>); + #[method_id(initWithName:host:)] pub unsafe fn initWithName_host( &self, inputServerName: Option<&NSString>, hostName: Option<&NSString>, ) -> Option>; + #[method_id(localizedInputManagerName)] pub unsafe fn localizedInputManagerName(&self) -> Option>; + #[method(markedTextAbandoned:)] pub unsafe fn markedTextAbandoned(&self, cli: Option<&Object>); + #[method(markedTextSelectionChanged:client:)] pub unsafe fn markedTextSelectionChanged_client( &self, newSel: NSRange, cli: Option<&Object>, ); + #[method(wantsToInterpretAllKeystrokes)] pub unsafe fn wantsToInterpretAllKeystrokes(&self) -> bool; + #[method_id(language)] pub unsafe fn language(&self) -> Option>; + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method_id(server)] pub unsafe fn server(&self) -> Option>; + #[method(wantsToHandleMouseEvents)] pub unsafe fn wantsToHandleMouseEvents(&self) -> bool; + #[method(handleMouseEvent:)] pub unsafe fn handleMouseEvent(&self, mouseEvent: Option<&NSEvent>) -> bool; + #[method(wantsToDelayTextChangeNotifications)] pub unsafe fn wantsToDelayTextChangeNotifications(&self) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSInputServer.rs b/crates/icrate/src/generated/AppKit/NSInputServer.rs index 06e5f22a3..9eddef952 100644 --- a/crates/icrate/src/generated/AppKit/NSInputServer.rs +++ b/crates/icrate/src/generated/AppKit/NSInputServer.rs @@ -1,16 +1,23 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSInputServiceProvider = NSObject; + pub type NSInputServerMouseTracker = NSObject; + extern_class!( #[derive(Debug)] pub struct NSInputServer; + unsafe impl ClassType for NSInputServer { type Super = NSObject; } ); + extern_methods!( unsafe impl NSInputServer { #[method_id(initWithDelegate:name:)] diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs index 6eb277b1c..454c87364 100644 --- a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -1,13 +1,18 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSInterfaceStyle = NSUInteger; + extern_methods!( - #[doc = "NSInterfaceStyle"] + /// NSInterfaceStyle unsafe impl NSResponder { #[method(interfaceStyle)] pub unsafe fn interfaceStyle(&self) -> NSInterfaceStyle; + #[method(setInterfaceStyle:)] pub unsafe fn setInterfaceStyle(&self, interfaceStyle: NSInterfaceStyle); } diff --git a/crates/icrate/src/generated/AppKit/NSItemProvider.rs b/crates/icrate/src/generated/AppKit/NSItemProvider.rs index b261038b6..85621e0ec 100644 --- a/crates/icrate/src/generated/AppKit/NSItemProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSItemProvider.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSItemSourceInfo"] + /// NSItemSourceInfo unsafe impl NSItemProvider { #[method(sourceFrame)] pub unsafe fn sourceFrame(&self) -> NSRect; + #[method(containerFrame)] pub unsafe fn containerFrame(&self) -> NSRect; + #[method(preferredPresentationSize)] pub unsafe fn preferredPresentationSize(&self) -> NSSize; } diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index 54f19c78e..7ce11e789 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -1,26 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSBindingName = NSString; + pub type NSBindingOption = NSString; + extern_class!( #[derive(Debug)] pub struct NSBindingSelectionMarker; + unsafe impl ClassType for NSBindingSelectionMarker { type Super = NSObject; } ); + extern_methods!( unsafe impl NSBindingSelectionMarker { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(multipleValuesSelectionMarker)] pub unsafe fn multipleValuesSelectionMarker() -> Id; + #[method_id(noSelectionMarker)] pub unsafe fn noSelectionMarker() -> Id; + #[method_id(notApplicableSelectionMarker)] pub unsafe fn notApplicableSelectionMarker() -> Id; + #[method(setDefaultPlaceholder:forMarker:onClass:withBinding:)] pub unsafe fn setDefaultPlaceholder_forMarker_onClass_withBinding( placeholder: Option<&Object>, @@ -28,6 +39,7 @@ extern_methods!( objectClass: &Class, binding: &NSBindingName, ); + #[method_id(defaultPlaceholderForMarker:onClass:withBinding:)] pub unsafe fn defaultPlaceholderForMarker_onClass_withBinding( marker: Option<&NSBindingSelectionMarker>, @@ -36,16 +48,21 @@ extern_methods!( ) -> Option>; } ); + pub type NSBindingInfoKey = NSString; + extern_methods!( - #[doc = "NSKeyValueBindingCreation"] + /// NSKeyValueBindingCreation unsafe impl NSObject { #[method(exposeBinding:)] pub unsafe fn exposeBinding(binding: &NSBindingName); + #[method_id(exposedBindings)] pub unsafe fn exposedBindings(&self) -> Id, Shared>; + #[method(valueClassForBinding:)] pub unsafe fn valueClassForBinding(&self, binding: &NSBindingName) -> Option<&Class>; + #[method(bind:toObject:withKeyPath:options:)] pub unsafe fn bind_toObject_withKeyPath_options( &self, @@ -54,13 +71,16 @@ extern_methods!( keyPath: &NSString, options: Option<&NSDictionary>, ); + #[method(unbind:)] pub unsafe fn unbind(&self, binding: &NSBindingName); + #[method_id(infoForBinding:)] pub unsafe fn infoForBinding( &self, binding: &NSBindingName, ) -> Option, Shared>>; + #[method_id(optionDescriptionsForBinding:)] pub unsafe fn optionDescriptionsForBinding( &self, @@ -68,8 +88,9 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSPlaceholders"] + /// NSPlaceholders unsafe impl NSObject { #[method(setDefaultPlaceholder:forMarker:withBinding:)] pub unsafe fn setDefaultPlaceholder_forMarker_withBinding( @@ -77,6 +98,7 @@ extern_methods!( marker: Option<&Object>, binding: &NSBindingName, ); + #[method_id(defaultPlaceholderForMarker:withBinding:)] pub unsafe fn defaultPlaceholderForMarker_withBinding( marker: Option<&Object>, @@ -84,15 +106,20 @@ extern_methods!( ) -> Option>; } ); + pub type NSEditor = NSObject; + pub type NSEditorRegistration = NSObject; + extern_methods!( - #[doc = "NSEditor"] + /// NSEditor unsafe impl NSObject { #[method(discardEditing)] pub unsafe fn discardEditing(&self); + #[method(commitEditing)] pub unsafe fn commitEditing(&self) -> bool; + #[method(commitEditingWithDelegate:didCommitSelector:contextInfo:)] pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( &self, @@ -100,20 +127,24 @@ extern_methods!( didCommitSelector: Option, contextInfo: *mut c_void, ); + #[method(commitEditingAndReturnError:)] pub unsafe fn commitEditingAndReturnError(&self) -> Result<(), Id>; } ); + extern_methods!( - #[doc = "NSEditorRegistration"] + /// NSEditorRegistration unsafe impl NSObject { #[method(objectDidBeginEditing:)] pub unsafe fn objectDidBeginEditing(&self, editor: &NSEditor); + #[method(objectDidEndEditing:)] pub unsafe fn objectDidEndEditing(&self, editor: &NSEditor); } ); + extern_methods!( - #[doc = "NSEditorAndEditorRegistrationConformance"] + /// NSEditorAndEditorRegistrationConformance unsafe impl NSManagedObjectContext {} ); diff --git a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs index 47709a663..c1d387ea1 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSLayoutAnchor; + unsafe impl ClassType for NSLayoutAnchor { type Super = NSObject; } ); + extern_methods!( unsafe impl NSLayoutAnchor { #[method_id(constraintEqualToAnchor:)] @@ -16,51 +21,63 @@ extern_methods!( &self, anchor: &NSLayoutAnchor, ) -> Id; + #[method_id(constraintGreaterThanOrEqualToAnchor:)] pub unsafe fn constraintGreaterThanOrEqualToAnchor( &self, anchor: &NSLayoutAnchor, ) -> Id; + #[method_id(constraintLessThanOrEqualToAnchor:)] pub unsafe fn constraintLessThanOrEqualToAnchor( &self, anchor: &NSLayoutAnchor, ) -> Id; + #[method_id(constraintEqualToAnchor:constant:)] pub unsafe fn constraintEqualToAnchor_constant( &self, anchor: &NSLayoutAnchor, c: CGFloat, ) -> Id; + #[method_id(constraintGreaterThanOrEqualToAnchor:constant:)] pub unsafe fn constraintGreaterThanOrEqualToAnchor_constant( &self, anchor: &NSLayoutAnchor, c: CGFloat, ) -> Id; + #[method_id(constraintLessThanOrEqualToAnchor:constant:)] pub unsafe fn constraintLessThanOrEqualToAnchor_constant( &self, anchor: &NSLayoutAnchor, c: CGFloat, ) -> Id; + #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method_id(item)] pub unsafe fn item(&self) -> Option>; + #[method(hasAmbiguousLayout)] pub unsafe fn hasAmbiguousLayout(&self) -> bool; + #[method_id(constraintsAffectingLayout)] pub unsafe fn constraintsAffectingLayout(&self) -> Id, Shared>; } ); + extern_class!( #[derive(Debug)] pub struct NSLayoutXAxisAnchor; + unsafe impl ClassType for NSLayoutXAxisAnchor { type Super = NSLayoutAnchor; } ); + extern_methods!( unsafe impl NSLayoutXAxisAnchor { #[method_id(anchorWithOffsetToAnchor:)] @@ -68,18 +85,21 @@ extern_methods!( &self, otherAnchor: &NSLayoutXAxisAnchor, ) -> Id; + #[method_id(constraintEqualToSystemSpacingAfterAnchor:multiplier:)] pub unsafe fn constraintEqualToSystemSpacingAfterAnchor_multiplier( &self, anchor: &NSLayoutXAxisAnchor, multiplier: CGFloat, ) -> Id; + #[method_id(constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:)] pub unsafe fn constraintGreaterThanOrEqualToSystemSpacingAfterAnchor_multiplier( &self, anchor: &NSLayoutXAxisAnchor, multiplier: CGFloat, ) -> Id; + #[method_id(constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:)] pub unsafe fn constraintLessThanOrEqualToSystemSpacingAfterAnchor_multiplier( &self, @@ -88,13 +108,16 @@ extern_methods!( ) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSLayoutYAxisAnchor; + unsafe impl ClassType for NSLayoutYAxisAnchor { type Super = NSLayoutAnchor; } ); + extern_methods!( unsafe impl NSLayoutYAxisAnchor { #[method_id(anchorWithOffsetToAnchor:)] @@ -102,18 +125,21 @@ extern_methods!( &self, otherAnchor: &NSLayoutYAxisAnchor, ) -> Id; + #[method_id(constraintEqualToSystemSpacingBelowAnchor:multiplier:)] pub unsafe fn constraintEqualToSystemSpacingBelowAnchor_multiplier( &self, anchor: &NSLayoutYAxisAnchor, multiplier: CGFloat, ) -> Id; + #[method_id(constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:)] pub unsafe fn constraintGreaterThanOrEqualToSystemSpacingBelowAnchor_multiplier( &self, anchor: &NSLayoutYAxisAnchor, multiplier: CGFloat, ) -> Id; + #[method_id(constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:)] pub unsafe fn constraintLessThanOrEqualToSystemSpacingBelowAnchor_multiplier( &self, @@ -122,13 +148,16 @@ extern_methods!( ) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSLayoutDimension; + unsafe impl ClassType for NSLayoutDimension { type Super = NSLayoutAnchor; } ); + extern_methods!( unsafe impl NSLayoutDimension { #[method_id(constraintEqualToConstant:)] @@ -136,34 +165,40 @@ extern_methods!( &self, c: CGFloat, ) -> Id; + #[method_id(constraintGreaterThanOrEqualToConstant:)] pub unsafe fn constraintGreaterThanOrEqualToConstant( &self, c: CGFloat, ) -> Id; + #[method_id(constraintLessThanOrEqualToConstant:)] pub unsafe fn constraintLessThanOrEqualToConstant( &self, c: CGFloat, ) -> Id; + #[method_id(constraintEqualToAnchor:multiplier:)] pub unsafe fn constraintEqualToAnchor_multiplier( &self, anchor: &NSLayoutDimension, m: CGFloat, ) -> Id; + #[method_id(constraintGreaterThanOrEqualToAnchor:multiplier:)] pub unsafe fn constraintGreaterThanOrEqualToAnchor_multiplier( &self, anchor: &NSLayoutDimension, m: CGFloat, ) -> Id; + #[method_id(constraintLessThanOrEqualToAnchor:multiplier:)] pub unsafe fn constraintLessThanOrEqualToAnchor_multiplier( &self, anchor: &NSLayoutDimension, m: CGFloat, ) -> Id; + #[method_id(constraintEqualToAnchor:multiplier:constant:)] pub unsafe fn constraintEqualToAnchor_multiplier_constant( &self, @@ -171,6 +206,7 @@ extern_methods!( m: CGFloat, c: CGFloat, ) -> Id; + #[method_id(constraintGreaterThanOrEqualToAnchor:multiplier:constant:)] pub unsafe fn constraintGreaterThanOrEqualToAnchor_multiplier_constant( &self, @@ -178,6 +214,7 @@ extern_methods!( m: CGFloat, c: CGFloat, ) -> Id; + #[method_id(constraintLessThanOrEqualToAnchor:multiplier:constant:)] pub unsafe fn constraintLessThanOrEqualToAnchor_multiplier_constant( &self, diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index a7e16afad..365b103e0 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSLayoutConstraint; + unsafe impl ClassType for NSLayoutConstraint { type Super = NSObject; } ); + extern_methods!( unsafe impl NSLayoutConstraint { #[method_id(constraintsWithVisualFormat:options:metrics:views:)] @@ -18,6 +23,7 @@ extern_methods!( metrics: Option<&NSDictionary>, views: &NSDictionary, ) -> Id, Shared>; + #[method_id(constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:)] pub unsafe fn constraintWithItem_attribute_relatedBy_toItem_attribute_multiplier_constant( view1: &Object, @@ -28,181 +34,244 @@ extern_methods!( multiplier: CGFloat, c: CGFloat, ) -> Id; + #[method(priority)] pub unsafe fn priority(&self) -> NSLayoutPriority; + #[method(setPriority:)] pub unsafe fn setPriority(&self, priority: NSLayoutPriority); + #[method(shouldBeArchived)] pub unsafe fn shouldBeArchived(&self) -> bool; + #[method(setShouldBeArchived:)] pub unsafe fn setShouldBeArchived(&self, shouldBeArchived: bool); + #[method_id(firstItem)] pub unsafe fn firstItem(&self) -> Option>; + #[method_id(secondItem)] pub unsafe fn secondItem(&self) -> Option>; + #[method(firstAttribute)] pub unsafe fn firstAttribute(&self) -> NSLayoutAttribute; + #[method(secondAttribute)] pub unsafe fn secondAttribute(&self) -> NSLayoutAttribute; + #[method_id(firstAnchor)] pub unsafe fn firstAnchor(&self) -> Id; + #[method_id(secondAnchor)] pub unsafe fn secondAnchor(&self) -> Option>; + #[method(relation)] pub unsafe fn relation(&self) -> NSLayoutRelation; + #[method(multiplier)] pub unsafe fn multiplier(&self) -> CGFloat; + #[method(constant)] pub unsafe fn constant(&self) -> CGFloat; + #[method(setConstant:)] pub unsafe fn setConstant(&self, constant: CGFloat); + #[method(isActive)] pub unsafe fn isActive(&self) -> bool; + #[method(setActive:)] pub unsafe fn setActive(&self, active: bool); + #[method(activateConstraints:)] pub unsafe fn activateConstraints(constraints: &NSArray); + #[method(deactivateConstraints:)] pub unsafe fn deactivateConstraints(constraints: &NSArray); } ); + extern_methods!( - #[doc = "NSIdentifier"] + /// NSIdentifier unsafe impl NSLayoutConstraint { #[method_id(identifier)] pub unsafe fn identifier(&self) -> Option>; + #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>); } ); + extern_methods!( unsafe impl NSLayoutConstraint {} ); + extern_methods!( - #[doc = "NSConstraintBasedLayoutInstallingConstraints"] + /// NSConstraintBasedLayoutInstallingConstraints unsafe impl NSView { #[method_id(leadingAnchor)] pub unsafe fn leadingAnchor(&self) -> Id; + #[method_id(trailingAnchor)] pub unsafe fn trailingAnchor(&self) -> Id; + #[method_id(leftAnchor)] pub unsafe fn leftAnchor(&self) -> Id; + #[method_id(rightAnchor)] pub unsafe fn rightAnchor(&self) -> Id; + #[method_id(topAnchor)] pub unsafe fn topAnchor(&self) -> Id; + #[method_id(bottomAnchor)] pub unsafe fn bottomAnchor(&self) -> Id; + #[method_id(widthAnchor)] pub unsafe fn widthAnchor(&self) -> Id; + #[method_id(heightAnchor)] pub unsafe fn heightAnchor(&self) -> Id; + #[method_id(centerXAnchor)] pub unsafe fn centerXAnchor(&self) -> Id; + #[method_id(centerYAnchor)] pub unsafe fn centerYAnchor(&self) -> Id; + #[method_id(firstBaselineAnchor)] pub unsafe fn firstBaselineAnchor(&self) -> Id; + #[method_id(lastBaselineAnchor)] pub unsafe fn lastBaselineAnchor(&self) -> Id; + #[method_id(constraints)] pub unsafe fn constraints(&self) -> Id, Shared>; + #[method(addConstraint:)] pub unsafe fn addConstraint(&self, constraint: &NSLayoutConstraint); + #[method(addConstraints:)] pub unsafe fn addConstraints(&self, constraints: &NSArray); + #[method(removeConstraint:)] pub unsafe fn removeConstraint(&self, constraint: &NSLayoutConstraint); + #[method(removeConstraints:)] pub unsafe fn removeConstraints(&self, constraints: &NSArray); } ); + extern_methods!( - #[doc = "NSConstraintBasedLayoutCoreMethods"] + /// NSConstraintBasedLayoutCoreMethods unsafe impl NSWindow { #[method(updateConstraintsIfNeeded)] pub unsafe fn updateConstraintsIfNeeded(&self); + #[method(layoutIfNeeded)] pub unsafe fn layoutIfNeeded(&self); } ); + extern_methods!( - #[doc = "NSConstraintBasedLayoutCoreMethods"] + /// NSConstraintBasedLayoutCoreMethods unsafe impl NSView { #[method(updateConstraintsForSubtreeIfNeeded)] pub unsafe fn updateConstraintsForSubtreeIfNeeded(&self); + #[method(updateConstraints)] pub unsafe fn updateConstraints(&self); + #[method(needsUpdateConstraints)] pub unsafe fn needsUpdateConstraints(&self) -> bool; + #[method(setNeedsUpdateConstraints:)] pub unsafe fn setNeedsUpdateConstraints(&self, needsUpdateConstraints: bool); } ); + extern_methods!( - #[doc = "NSConstraintBasedCompatibility"] + /// NSConstraintBasedCompatibility unsafe impl NSView { #[method(translatesAutoresizingMaskIntoConstraints)] pub unsafe fn translatesAutoresizingMaskIntoConstraints(&self) -> bool; + #[method(setTranslatesAutoresizingMaskIntoConstraints:)] pub unsafe fn setTranslatesAutoresizingMaskIntoConstraints( &self, translatesAutoresizingMaskIntoConstraints: bool, ); + #[method(requiresConstraintBasedLayout)] pub unsafe fn requiresConstraintBasedLayout() -> bool; } ); + extern_methods!( - #[doc = "NSConstraintBasedLayoutLayering"] + /// NSConstraintBasedLayoutLayering unsafe impl NSView { #[method(alignmentRectForFrame:)] pub unsafe fn alignmentRectForFrame(&self, frame: NSRect) -> NSRect; + #[method(frameForAlignmentRect:)] pub unsafe fn frameForAlignmentRect(&self, alignmentRect: NSRect) -> NSRect; + #[method(alignmentRectInsets)] pub unsafe fn alignmentRectInsets(&self) -> NSEdgeInsets; + #[method(firstBaselineOffsetFromTop)] pub unsafe fn firstBaselineOffsetFromTop(&self) -> CGFloat; + #[method(lastBaselineOffsetFromBottom)] pub unsafe fn lastBaselineOffsetFromBottom(&self) -> CGFloat; + #[method(baselineOffsetFromBottom)] pub unsafe fn baselineOffsetFromBottom(&self) -> CGFloat; + #[method(intrinsicContentSize)] pub unsafe fn intrinsicContentSize(&self) -> NSSize; + #[method(invalidateIntrinsicContentSize)] pub unsafe fn invalidateIntrinsicContentSize(&self); + #[method(contentHuggingPriorityForOrientation:)] pub unsafe fn contentHuggingPriorityForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> NSLayoutPriority; + #[method(setContentHuggingPriority:forOrientation:)] pub unsafe fn setContentHuggingPriority_forOrientation( &self, priority: NSLayoutPriority, orientation: NSLayoutConstraintOrientation, ); + #[method(contentCompressionResistancePriorityForOrientation:)] pub unsafe fn contentCompressionResistancePriorityForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> NSLayoutPriority; + #[method(setContentCompressionResistancePriority:forOrientation:)] pub unsafe fn setContentCompressionResistancePriority_forOrientation( &self, priority: NSLayoutPriority, orientation: NSLayoutConstraintOrientation, ); + #[method(isHorizontalContentSizeConstraintActive)] pub unsafe fn isHorizontalContentSizeConstraintActive(&self) -> bool; + #[method(setHorizontalContentSizeConstraintActive:)] pub unsafe fn setHorizontalContentSizeConstraintActive( &self, horizontalContentSizeConstraintActive: bool, ); + #[method(isVerticalContentSizeConstraintActive)] pub unsafe fn isVerticalContentSizeConstraintActive(&self) -> bool; + #[method(setVerticalContentSizeConstraintActive:)] pub unsafe fn setVerticalContentSizeConstraintActive( &self, @@ -210,21 +279,24 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSConstraintBasedLayoutLayering"] + /// NSConstraintBasedLayoutLayering unsafe impl NSControl { #[method(invalidateIntrinsicContentSizeForCell:)] pub unsafe fn invalidateIntrinsicContentSizeForCell(&self, cell: &NSCell); } ); + extern_methods!( - #[doc = "NSConstraintBasedLayoutAnchoring"] + /// NSConstraintBasedLayoutAnchoring unsafe impl NSWindow { #[method(anchorAttributeForOrientation:)] pub unsafe fn anchorAttributeForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> NSLayoutAttribute; + #[method(setAnchorAttribute:forOrientation:)] pub unsafe fn setAnchorAttribute_forOrientation( &self, @@ -233,29 +305,34 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSConstraintBasedLayoutFittingSize"] + /// NSConstraintBasedLayoutFittingSize unsafe impl NSView { #[method(fittingSize)] pub unsafe fn fittingSize(&self) -> NSSize; } ); + extern_methods!( - #[doc = "NSConstraintBasedLayoutDebugging"] + /// NSConstraintBasedLayoutDebugging unsafe impl NSView { #[method_id(constraintsAffectingLayoutForOrientation:)] pub unsafe fn constraintsAffectingLayoutForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> Id, Shared>; + #[method(hasAmbiguousLayout)] pub unsafe fn hasAmbiguousLayout(&self) -> bool; + #[method(exerciseAmbiguityInLayout)] pub unsafe fn exerciseAmbiguityInLayout(&self); } ); + extern_methods!( - #[doc = "NSConstraintBasedLayoutDebugging"] + /// NSConstraintBasedLayoutDebugging unsafe impl NSWindow { #[method(visualizeConstraints:)] pub unsafe fn visualizeConstraints( diff --git a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs index 3776519fc..be2e63a50 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs @@ -1,48 +1,69 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSLayoutGuide; + unsafe impl ClassType for NSLayoutGuide { type Super = NSObject; } ); + extern_methods!( unsafe impl NSLayoutGuide { #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[method_id(owningView)] pub unsafe fn owningView(&self) -> Option>; + #[method(setOwningView:)] pub unsafe fn setOwningView(&self, owningView: Option<&NSView>); + #[method_id(identifier)] pub unsafe fn identifier(&self) -> Id; + #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: &NSUserInterfaceItemIdentifier); + #[method_id(leadingAnchor)] pub unsafe fn leadingAnchor(&self) -> Id; + #[method_id(trailingAnchor)] pub unsafe fn trailingAnchor(&self) -> Id; + #[method_id(leftAnchor)] pub unsafe fn leftAnchor(&self) -> Id; + #[method_id(rightAnchor)] pub unsafe fn rightAnchor(&self) -> Id; + #[method_id(topAnchor)] pub unsafe fn topAnchor(&self) -> Id; + #[method_id(bottomAnchor)] pub unsafe fn bottomAnchor(&self) -> Id; + #[method_id(widthAnchor)] pub unsafe fn widthAnchor(&self) -> Id; + #[method_id(heightAnchor)] pub unsafe fn heightAnchor(&self) -> Id; + #[method_id(centerXAnchor)] pub unsafe fn centerXAnchor(&self) -> Id; + #[method_id(centerYAnchor)] pub unsafe fn centerYAnchor(&self) -> Id; + #[method(hasAmbiguousLayout)] pub unsafe fn hasAmbiguousLayout(&self) -> bool; + #[method_id(constraintsAffectingLayoutForOrientation:)] pub unsafe fn constraintsAffectingLayoutForOrientation( &self, @@ -50,13 +71,16 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSLayoutGuideSupport"] + /// NSLayoutGuideSupport unsafe impl NSView { #[method(addLayoutGuide:)] pub unsafe fn addLayoutGuide(&self, guide: &NSLayoutGuide); + #[method(removeLayoutGuide:)] pub unsafe fn removeLayoutGuide(&self, guide: &NSLayoutGuide); + #[method_id(layoutGuides)] pub unsafe fn layoutGuides(&self) -> Id, Shared>; } diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index 21a972c8d..b5ee3e291 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -1,92 +1,132 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextLayoutOrientationProvider = NSObject; + extern_class!( #[derive(Debug)] pub struct NSLayoutManager; + unsafe impl ClassType for NSLayoutManager { type Super = NSObject; } ); + extern_methods!( unsafe impl NSLayoutManager { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(textStorage)] pub unsafe fn textStorage(&self) -> Option>; + #[method(setTextStorage:)] pub unsafe fn setTextStorage(&self, textStorage: Option<&NSTextStorage>); + #[method(replaceTextStorage:)] pub unsafe fn replaceTextStorage(&self, newTextStorage: &NSTextStorage); + #[method_id(textContainers)] pub unsafe fn textContainers(&self) -> Id, Shared>; + #[method(addTextContainer:)] pub unsafe fn addTextContainer(&self, container: &NSTextContainer); + #[method(insertTextContainer:atIndex:)] pub unsafe fn insertTextContainer_atIndex( &self, container: &NSTextContainer, index: NSUInteger, ); + #[method(removeTextContainerAtIndex:)] pub unsafe fn removeTextContainerAtIndex(&self, index: NSUInteger); + #[method(textContainerChangedGeometry:)] pub unsafe fn textContainerChangedGeometry(&self, container: &NSTextContainer); + #[method(textContainerChangedTextView:)] pub unsafe fn textContainerChangedTextView(&self, container: &NSTextContainer); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSLayoutManagerDelegate>); + #[method(showsInvisibleCharacters)] pub unsafe fn showsInvisibleCharacters(&self) -> bool; + #[method(setShowsInvisibleCharacters:)] pub unsafe fn setShowsInvisibleCharacters(&self, showsInvisibleCharacters: bool); + #[method(showsControlCharacters)] pub unsafe fn showsControlCharacters(&self) -> bool; + #[method(setShowsControlCharacters:)] pub unsafe fn setShowsControlCharacters(&self, showsControlCharacters: bool); + #[method(usesDefaultHyphenation)] pub unsafe fn usesDefaultHyphenation(&self) -> bool; + #[method(setUsesDefaultHyphenation:)] pub unsafe fn setUsesDefaultHyphenation(&self, usesDefaultHyphenation: bool); + #[method(usesFontLeading)] pub unsafe fn usesFontLeading(&self) -> bool; + #[method(setUsesFontLeading:)] pub unsafe fn setUsesFontLeading(&self, usesFontLeading: bool); + #[method(allowsNonContiguousLayout)] pub unsafe fn allowsNonContiguousLayout(&self) -> bool; + #[method(setAllowsNonContiguousLayout:)] pub unsafe fn setAllowsNonContiguousLayout(&self, allowsNonContiguousLayout: bool); + #[method(hasNonContiguousLayout)] pub unsafe fn hasNonContiguousLayout(&self) -> bool; + #[method(limitsLayoutForSuspiciousContents)] pub unsafe fn limitsLayoutForSuspiciousContents(&self) -> bool; + #[method(setLimitsLayoutForSuspiciousContents:)] pub unsafe fn setLimitsLayoutForSuspiciousContents( &self, limitsLayoutForSuspiciousContents: bool, ); + #[method(backgroundLayoutEnabled)] pub unsafe fn backgroundLayoutEnabled(&self) -> bool; + #[method(setBackgroundLayoutEnabled:)] pub unsafe fn setBackgroundLayoutEnabled(&self, backgroundLayoutEnabled: bool); + #[method(defaultAttachmentScaling)] pub unsafe fn defaultAttachmentScaling(&self) -> NSImageScaling; + #[method(setDefaultAttachmentScaling:)] pub unsafe fn setDefaultAttachmentScaling(&self, defaultAttachmentScaling: NSImageScaling); + #[method_id(typesetter)] pub unsafe fn typesetter(&self) -> Id; + #[method(setTypesetter:)] pub unsafe fn setTypesetter(&self, typesetter: &NSTypesetter); + #[method(typesetterBehavior)] pub unsafe fn typesetterBehavior(&self) -> NSTypesetterBehavior; + #[method(setTypesetterBehavior:)] pub unsafe fn setTypesetterBehavior(&self, typesetterBehavior: NSTypesetterBehavior); + #[method(invalidateGlyphsForCharacterRange:changeInLength:actualCharacterRange:)] pub unsafe fn invalidateGlyphsForCharacterRange_changeInLength_actualCharacterRange( &self, @@ -94,16 +134,20 @@ extern_methods!( delta: NSInteger, actualCharRange: NSRangePointer, ); + #[method(invalidateLayoutForCharacterRange:actualCharacterRange:)] pub unsafe fn invalidateLayoutForCharacterRange_actualCharacterRange( &self, charRange: NSRange, actualCharRange: NSRangePointer, ); + #[method(invalidateDisplayForCharacterRange:)] pub unsafe fn invalidateDisplayForCharacterRange(&self, charRange: NSRange); + #[method(invalidateDisplayForGlyphRange:)] pub unsafe fn invalidateDisplayForGlyphRange(&self, glyphRange: NSRange); + #[method(processEditingForTextStorage:edited:range:changeInLength:invalidatedRange:)] pub unsafe fn processEditingForTextStorage_edited_range_changeInLength_invalidatedRange( &self, @@ -113,22 +157,29 @@ extern_methods!( delta: NSInteger, invalidatedCharRange: NSRange, ); + #[method(ensureGlyphsForCharacterRange:)] pub unsafe fn ensureGlyphsForCharacterRange(&self, charRange: NSRange); + #[method(ensureGlyphsForGlyphRange:)] pub unsafe fn ensureGlyphsForGlyphRange(&self, glyphRange: NSRange); + #[method(ensureLayoutForCharacterRange:)] pub unsafe fn ensureLayoutForCharacterRange(&self, charRange: NSRange); + #[method(ensureLayoutForGlyphRange:)] pub unsafe fn ensureLayoutForGlyphRange(&self, glyphRange: NSRange); + #[method(ensureLayoutForTextContainer:)] pub unsafe fn ensureLayoutForTextContainer(&self, container: &NSTextContainer); + #[method(ensureLayoutForBoundingRect:inTextContainer:)] pub unsafe fn ensureLayoutForBoundingRect_inTextContainer( &self, bounds: NSRect, container: &NSTextContainer, ); + #[method(setGlyphs:properties:characterIndexes:font:forGlyphRange:)] pub unsafe fn setGlyphs_properties_characterIndexes_font_forGlyphRange( &self, @@ -138,24 +189,32 @@ extern_methods!( aFont: &NSFont, glyphRange: NSRange, ); + #[method(numberOfGlyphs)] pub unsafe fn numberOfGlyphs(&self) -> NSUInteger; + #[method(CGGlyphAtIndex:isValidIndex:)] pub unsafe fn CGGlyphAtIndex_isValidIndex( &self, glyphIndex: NSUInteger, isValidIndex: *mut bool, ) -> CGGlyph; + #[method(CGGlyphAtIndex:)] pub unsafe fn CGGlyphAtIndex(&self, glyphIndex: NSUInteger) -> CGGlyph; + #[method(isValidGlyphIndex:)] pub unsafe fn isValidGlyphIndex(&self, glyphIndex: NSUInteger) -> bool; + #[method(propertyForGlyphAtIndex:)] pub unsafe fn propertyForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> NSGlyphProperty; + #[method(characterIndexForGlyphAtIndex:)] pub unsafe fn characterIndexForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> NSUInteger; + #[method(glyphIndexForCharacterAtIndex:)] pub unsafe fn glyphIndexForCharacterAtIndex(&self, charIndex: NSUInteger) -> NSUInteger; + #[method(getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:)] pub unsafe fn getGlyphsInRange_glyphs_properties_characterIndexes_bidiLevels( &self, @@ -165,12 +224,14 @@ extern_methods!( charIndexBuffer: *mut NSUInteger, bidiLevelBuffer: *mut c_uchar, ) -> NSUInteger; + #[method(setTextContainer:forGlyphRange:)] pub unsafe fn setTextContainer_forGlyphRange( &self, container: &NSTextContainer, glyphRange: NSRange, ); + #[method(setLineFragmentRect:forGlyphRange:usedRect:)] pub unsafe fn setLineFragmentRect_forGlyphRange_usedRect( &self, @@ -178,6 +239,7 @@ extern_methods!( glyphRange: NSRange, usedRect: NSRect, ); + #[method(setExtraLineFragmentRect:usedRect:textContainer:)] pub unsafe fn setExtraLineFragmentRect_usedRect_textContainer( &self, @@ -185,46 +247,55 @@ extern_methods!( usedRect: NSRect, container: &NSTextContainer, ); + #[method(setLocation:forStartOfGlyphRange:)] pub unsafe fn setLocation_forStartOfGlyphRange( &self, location: NSPoint, glyphRange: NSRange, ); + #[method(setNotShownAttribute:forGlyphAtIndex:)] pub unsafe fn setNotShownAttribute_forGlyphAtIndex( &self, flag: bool, glyphIndex: NSUInteger, ); + #[method(setDrawsOutsideLineFragment:forGlyphAtIndex:)] pub unsafe fn setDrawsOutsideLineFragment_forGlyphAtIndex( &self, flag: bool, glyphIndex: NSUInteger, ); + #[method(setAttachmentSize:forGlyphRange:)] pub unsafe fn setAttachmentSize_forGlyphRange( &self, attachmentSize: NSSize, glyphRange: NSRange, ); + #[method(getFirstUnlaidCharacterIndex:glyphIndex:)] pub unsafe fn getFirstUnlaidCharacterIndex_glyphIndex( &self, charIndex: *mut NSUInteger, glyphIndex: *mut NSUInteger, ); + #[method(firstUnlaidCharacterIndex)] pub unsafe fn firstUnlaidCharacterIndex(&self) -> NSUInteger; + #[method(firstUnlaidGlyphIndex)] pub unsafe fn firstUnlaidGlyphIndex(&self) -> NSUInteger; + #[method_id(textContainerForGlyphAtIndex:effectiveRange:)] pub unsafe fn textContainerForGlyphAtIndex_effectiveRange( &self, glyphIndex: NSUInteger, effectiveGlyphRange: NSRangePointer, ) -> Option>; + #[method_id(textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:)] pub unsafe fn textContainerForGlyphAtIndex_effectiveRange_withoutAdditionalLayout( &self, @@ -232,14 +303,17 @@ extern_methods!( effectiveGlyphRange: NSRangePointer, flag: bool, ) -> Option>; + #[method(usedRectForTextContainer:)] pub unsafe fn usedRectForTextContainer(&self, container: &NSTextContainer) -> NSRect; + #[method(lineFragmentRectForGlyphAtIndex:effectiveRange:)] pub unsafe fn lineFragmentRectForGlyphAtIndex_effectiveRange( &self, glyphIndex: NSUInteger, effectiveGlyphRange: NSRangePointer, ) -> NSRect; + #[method(lineFragmentRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:)] pub unsafe fn lineFragmentRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout( &self, @@ -247,12 +321,14 @@ extern_methods!( effectiveGlyphRange: NSRangePointer, flag: bool, ) -> NSRect; + #[method(lineFragmentUsedRectForGlyphAtIndex:effectiveRange:)] pub unsafe fn lineFragmentUsedRectForGlyphAtIndex_effectiveRange( &self, glyphIndex: NSUInteger, effectiveGlyphRange: NSRangePointer, ) -> NSRect; + #[method(lineFragmentUsedRectForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:)] pub unsafe fn lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAdditionalLayout( &self, @@ -260,65 +336,81 @@ extern_methods!( effectiveGlyphRange: NSRangePointer, flag: bool, ) -> NSRect; + #[method(extraLineFragmentRect)] pub unsafe fn extraLineFragmentRect(&self) -> NSRect; + #[method(extraLineFragmentUsedRect)] pub unsafe fn extraLineFragmentUsedRect(&self) -> NSRect; + #[method_id(extraLineFragmentTextContainer)] pub unsafe fn extraLineFragmentTextContainer(&self) -> Option>; + #[method(locationForGlyphAtIndex:)] pub unsafe fn locationForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> NSPoint; + #[method(notShownAttributeForGlyphAtIndex:)] pub unsafe fn notShownAttributeForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> bool; + #[method(drawsOutsideLineFragmentForGlyphAtIndex:)] pub unsafe fn drawsOutsideLineFragmentForGlyphAtIndex( &self, glyphIndex: NSUInteger, ) -> bool; + #[method(attachmentSizeForGlyphAtIndex:)] pub unsafe fn attachmentSizeForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> NSSize; + #[method(truncatedGlyphRangeInLineFragmentForGlyphAtIndex:)] pub unsafe fn truncatedGlyphRangeInLineFragmentForGlyphAtIndex( &self, glyphIndex: NSUInteger, ) -> NSRange; + #[method(glyphRangeForCharacterRange:actualCharacterRange:)] pub unsafe fn glyphRangeForCharacterRange_actualCharacterRange( &self, charRange: NSRange, actualCharRange: NSRangePointer, ) -> NSRange; + #[method(characterRangeForGlyphRange:actualGlyphRange:)] pub unsafe fn characterRangeForGlyphRange_actualGlyphRange( &self, glyphRange: NSRange, actualGlyphRange: NSRangePointer, ) -> NSRange; + #[method(glyphRangeForTextContainer:)] pub unsafe fn glyphRangeForTextContainer(&self, container: &NSTextContainer) -> NSRange; + #[method(rangeOfNominallySpacedGlyphsContainingIndex:)] pub unsafe fn rangeOfNominallySpacedGlyphsContainingIndex( &self, glyphIndex: NSUInteger, ) -> NSRange; + #[method(boundingRectForGlyphRange:inTextContainer:)] pub unsafe fn boundingRectForGlyphRange_inTextContainer( &self, glyphRange: NSRange, container: &NSTextContainer, ) -> NSRect; + #[method(glyphRangeForBoundingRect:inTextContainer:)] pub unsafe fn glyphRangeForBoundingRect_inTextContainer( &self, bounds: NSRect, container: &NSTextContainer, ) -> NSRange; + #[method(glyphRangeForBoundingRectWithoutAdditionalLayout:inTextContainer:)] pub unsafe fn glyphRangeForBoundingRectWithoutAdditionalLayout_inTextContainer( &self, bounds: NSRect, container: &NSTextContainer, ) -> NSRange; + #[method(glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:)] pub unsafe fn glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph( &self, @@ -326,18 +418,21 @@ extern_methods!( container: &NSTextContainer, partialFraction: *mut CGFloat, ) -> NSUInteger; + #[method(glyphIndexForPoint:inTextContainer:)] pub unsafe fn glyphIndexForPoint_inTextContainer( &self, point: NSPoint, container: &NSTextContainer, ) -> NSUInteger; + #[method(fractionOfDistanceThroughGlyphForPoint:inTextContainer:)] pub unsafe fn fractionOfDistanceThroughGlyphForPoint_inTextContainer( &self, point: NSPoint, container: &NSTextContainer, ) -> CGFloat; + #[method(characterIndexForPoint:inTextContainer:fractionOfDistanceBetweenInsertionPoints:)] pub unsafe fn characterIndexForPoint_inTextContainer_fractionOfDistanceBetweenInsertionPoints( &self, @@ -345,6 +440,7 @@ extern_methods!( container: &NSTextContainer, partialFraction: *mut CGFloat, ) -> NSUInteger; + #[method(getLineFragmentInsertionPointsForCharacterAtIndex:alternatePositions:inDisplayOrder:positions:characterIndexes:)] pub unsafe fn getLineFragmentInsertionPointsForCharacterAtIndex_alternatePositions_inDisplayOrder_positions_characterIndexes( &self, @@ -354,12 +450,14 @@ extern_methods!( positions: *mut CGFloat, charIndexes: *mut NSUInteger, ) -> NSUInteger; + #[method(enumerateLineFragmentsForGlyphRange:usingBlock:)] pub unsafe fn enumerateLineFragmentsForGlyphRange_usingBlock( &self, glyphRange: NSRange, block: TodoBlock, ); + #[method(enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:)] pub unsafe fn enumerateEnclosingRectsForGlyphRange_withinSelectedGlyphRange_inTextContainer_usingBlock( &self, @@ -368,18 +466,21 @@ extern_methods!( textContainer: &NSTextContainer, block: TodoBlock, ); + #[method(drawBackgroundForGlyphRange:atPoint:)] pub unsafe fn drawBackgroundForGlyphRange_atPoint( &self, glyphsToShow: NSRange, origin: NSPoint, ); + #[method(drawGlyphsForGlyphRange:atPoint:)] pub unsafe fn drawGlyphsForGlyphRange_atPoint( &self, glyphsToShow: NSRange, origin: NSPoint, ); + #[method(showCGGlyphs:positions:count:font:textMatrix:attributes:inContext:)] pub unsafe fn showCGGlyphs_positions_count_font_textMatrix_attributes_inContext( &self, @@ -391,6 +492,7 @@ extern_methods!( attributes: &NSDictionary, CGContext: CGContextRef, ); + #[method(fillBackgroundRectArray:count:forCharacterRange:color:)] pub unsafe fn fillBackgroundRectArray_count_forCharacterRange_color( &self, @@ -399,6 +501,7 @@ extern_methods!( charRange: NSRange, color: &NSColor, ); + #[method(drawUnderlineForGlyphRange:underlineType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] pub unsafe fn drawUnderlineForGlyphRange_underlineType_baselineOffset_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( &self, @@ -409,6 +512,7 @@ extern_methods!( lineGlyphRange: NSRange, containerOrigin: NSPoint, ); + #[method(underlineGlyphRange:underlineType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] pub unsafe fn underlineGlyphRange_underlineType_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( &self, @@ -418,6 +522,7 @@ extern_methods!( lineGlyphRange: NSRange, containerOrigin: NSPoint, ); + #[method(drawStrikethroughForGlyphRange:strikethroughType:baselineOffset:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] pub unsafe fn drawStrikethroughForGlyphRange_strikethroughType_baselineOffset_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( &self, @@ -428,6 +533,7 @@ extern_methods!( lineGlyphRange: NSRange, containerOrigin: NSPoint, ); + #[method(strikethroughGlyphRange:strikethroughType:lineFragmentRect:lineFragmentGlyphRange:containerOrigin:)] pub unsafe fn strikethroughGlyphRange_strikethroughType_lineFragmentRect_lineFragmentGlyphRange_containerOrigin( &self, @@ -437,6 +543,7 @@ extern_methods!( lineGlyphRange: NSRange, containerOrigin: NSPoint, ); + #[method(showAttachmentCell:inRect:characterIndex:)] pub unsafe fn showAttachmentCell_inRect_characterIndex( &self, @@ -444,6 +551,7 @@ extern_methods!( rect: NSRect, attachmentIndex: NSUInteger, ); + #[method(setLayoutRect:forTextBlock:glyphRange:)] pub unsafe fn setLayoutRect_forTextBlock_glyphRange( &self, @@ -451,6 +559,7 @@ extern_methods!( block: &NSTextBlock, glyphRange: NSRange, ); + #[method(setBoundsRect:forTextBlock:glyphRange:)] pub unsafe fn setBoundsRect_forTextBlock_glyphRange( &self, @@ -458,18 +567,21 @@ extern_methods!( block: &NSTextBlock, glyphRange: NSRange, ); + #[method(layoutRectForTextBlock:glyphRange:)] pub unsafe fn layoutRectForTextBlock_glyphRange( &self, block: &NSTextBlock, glyphRange: NSRange, ) -> NSRect; + #[method(boundsRectForTextBlock:glyphRange:)] pub unsafe fn boundsRectForTextBlock_glyphRange( &self, block: &NSTextBlock, glyphRange: NSRange, ) -> NSRect; + #[method(layoutRectForTextBlock:atIndex:effectiveRange:)] pub unsafe fn layoutRectForTextBlock_atIndex_effectiveRange( &self, @@ -477,6 +589,7 @@ extern_methods!( glyphIndex: NSUInteger, effectiveGlyphRange: NSRangePointer, ) -> NSRect; + #[method(boundsRectForTextBlock:atIndex:effectiveRange:)] pub unsafe fn boundsRectForTextBlock_atIndex_effectiveRange( &self, @@ -484,30 +597,35 @@ extern_methods!( glyphIndex: NSUInteger, effectiveGlyphRange: NSRangePointer, ) -> NSRect; + #[method_id(temporaryAttributesAtCharacterIndex:effectiveRange:)] pub unsafe fn temporaryAttributesAtCharacterIndex_effectiveRange( &self, charIndex: NSUInteger, effectiveCharRange: NSRangePointer, ) -> Id, Shared>; + #[method(setTemporaryAttributes:forCharacterRange:)] pub unsafe fn setTemporaryAttributes_forCharacterRange( &self, attrs: &NSDictionary, charRange: NSRange, ); + #[method(addTemporaryAttributes:forCharacterRange:)] pub unsafe fn addTemporaryAttributes_forCharacterRange( &self, attrs: &NSDictionary, charRange: NSRange, ); + #[method(removeTemporaryAttribute:forCharacterRange:)] pub unsafe fn removeTemporaryAttribute_forCharacterRange( &self, attrName: &NSAttributedStringKey, charRange: NSRange, ); + #[method_id(temporaryAttribute:atCharacterIndex:effectiveRange:)] pub unsafe fn temporaryAttribute_atCharacterIndex_effectiveRange( &self, @@ -515,6 +633,7 @@ extern_methods!( location: NSUInteger, range: NSRangePointer, ) -> Option>; + #[method_id(temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:)] pub unsafe fn temporaryAttribute_atCharacterIndex_longestEffectiveRange_inRange( &self, @@ -523,6 +642,7 @@ extern_methods!( range: NSRangePointer, rangeLimit: NSRange, ) -> Option>; + #[method_id(temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:)] pub unsafe fn temporaryAttributesAtCharacterIndex_longestEffectiveRange_inRange( &self, @@ -530,6 +650,7 @@ extern_methods!( range: NSRangePointer, rangeLimit: NSRange, ) -> Id, Shared>; + #[method(addTemporaryAttribute:value:forCharacterRange:)] pub unsafe fn addTemporaryAttribute_value_forCharacterRange( &self, @@ -537,14 +658,17 @@ extern_methods!( value: &Object, charRange: NSRange, ); + #[method(defaultLineHeightForFont:)] pub unsafe fn defaultLineHeightForFont(&self, theFont: &NSFont) -> CGFloat; + #[method(defaultBaselineOffsetForFont:)] pub unsafe fn defaultBaselineOffsetForFont(&self, theFont: &NSFont) -> CGFloat; } ); + extern_methods!( - #[doc = "NSTextViewSupport"] + /// NSTextViewSupport unsafe impl NSLayoutManager { #[method_id(rulerMarkersForTextView:paragraphStyle:ruler:)] pub unsafe fn rulerMarkersForTextView_paragraphStyle_ruler( @@ -553,6 +677,7 @@ extern_methods!( style: &NSParagraphStyle, ruler: &NSRulerView, ) -> Id, Shared>; + #[method_id(rulerAccessoryViewForTextView:paragraphStyle:ruler:enabled:)] pub unsafe fn rulerAccessoryViewForTextView_paragraphStyle_ruler_enabled( &self, @@ -561,17 +686,22 @@ extern_methods!( ruler: &NSRulerView, isEnabled: bool, ) -> Option>; + #[method(layoutManagerOwnsFirstResponderInWindow:)] pub unsafe fn layoutManagerOwnsFirstResponderInWindow(&self, window: &NSWindow) -> bool; + #[method_id(firstTextView)] pub unsafe fn firstTextView(&self) -> Option>; + #[method_id(textViewForBeginningOfSelection)] pub unsafe fn textViewForBeginningOfSelection(&self) -> Option>; } ); + pub type NSLayoutManagerDelegate = NSObject; + extern_methods!( - #[doc = "NSLayoutManagerDeprecated"] + /// NSLayoutManagerDeprecated unsafe impl NSLayoutManager { #[method(glyphAtIndex:isValidIndex:)] pub unsafe fn glyphAtIndex_isValidIndex( @@ -579,8 +709,10 @@ extern_methods!( glyphIndex: NSUInteger, isValidIndex: *mut bool, ) -> NSGlyph; + #[method(glyphAtIndex:)] pub unsafe fn glyphAtIndex(&self, glyphIndex: NSUInteger) -> NSGlyph; + #[method(rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:)] pub unsafe fn rectArrayForCharacterRange_withinSelectedCharacterRange_inTextContainer_rectCount( &self, @@ -589,6 +721,7 @@ extern_methods!( container: &NSTextContainer, rectCount: NonNull, ) -> NSRectArray; + #[method(rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:)] pub unsafe fn rectArrayForGlyphRange_withinSelectedGlyphRange_inTextContainer_rectCount( &self, @@ -597,12 +730,16 @@ extern_methods!( container: &NSTextContainer, rectCount: NonNull, ) -> NSRectArray; + #[method(usesScreenFonts)] pub unsafe fn usesScreenFonts(&self) -> bool; + #[method(setUsesScreenFonts:)] pub unsafe fn setUsesScreenFonts(&self, usesScreenFonts: bool); + #[method_id(substituteFontForFont:)] pub unsafe fn substituteFontForFont(&self, originalFont: &NSFont) -> Id; + #[method(insertGlyphs:length:forStartingGlyphAtIndex:characterIndex:)] pub unsafe fn insertGlyphs_length_forStartingGlyphAtIndex_characterIndex( &self, @@ -611,6 +748,7 @@ extern_methods!( glyphIndex: NSUInteger, charIndex: NSUInteger, ); + #[method(insertGlyph:atGlyphIndex:characterIndex:)] pub unsafe fn insertGlyph_atGlyphIndex_characterIndex( &self, @@ -618,20 +756,24 @@ extern_methods!( glyphIndex: NSUInteger, charIndex: NSUInteger, ); + #[method(replaceGlyphAtIndex:withGlyph:)] pub unsafe fn replaceGlyphAtIndex_withGlyph( &self, glyphIndex: NSUInteger, newGlyph: NSGlyph, ); + #[method(deleteGlyphsInRange:)] pub unsafe fn deleteGlyphsInRange(&self, glyphRange: NSRange); + #[method(setCharacterIndex:forGlyphAtIndex:)] pub unsafe fn setCharacterIndex_forGlyphAtIndex( &self, charIndex: NSUInteger, glyphIndex: NSUInteger, ); + #[method(setIntAttribute:value:forGlyphAtIndex:)] pub unsafe fn setIntAttribute_value_forGlyphAtIndex( &self, @@ -639,14 +781,17 @@ extern_methods!( val: NSInteger, glyphIndex: NSUInteger, ); + #[method(invalidateGlyphsOnLayoutInvalidationForGlyphRange:)] pub unsafe fn invalidateGlyphsOnLayoutInvalidationForGlyphRange(&self, glyphRange: NSRange); + #[method(intAttribute:forGlyphAtIndex:)] pub unsafe fn intAttribute_forGlyphAtIndex( &self, attributeTag: NSInteger, glyphIndex: NSUInteger, ) -> NSInteger; + #[method(getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:)] pub unsafe fn getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits( &self, @@ -656,6 +801,7 @@ extern_methods!( inscribeBuffer: *mut NSGlyphInscription, elasticBuffer: *mut bool, ) -> NSUInteger; + #[method(getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)] pub unsafe fn getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels( &self, @@ -666,12 +812,14 @@ extern_methods!( elasticBuffer: *mut bool, bidiLevelBuffer: *mut c_uchar, ) -> NSUInteger; + #[method(getGlyphs:range:)] pub unsafe fn getGlyphs_range( &self, glyphArray: *mut NSGlyph, glyphRange: NSRange, ) -> NSUInteger; + #[method(invalidateLayoutForCharacterRange:isSoft:actualCharacterRange:)] pub unsafe fn invalidateLayoutForCharacterRange_isSoft_actualCharacterRange( &self, @@ -679,6 +827,7 @@ extern_methods!( flag: bool, actualCharRange: NSRangePointer, ); + #[method(textStorage:edited:range:changeInLength:invalidatedRange:)] pub unsafe fn textStorage_edited_range_changeInLength_invalidatedRange( &self, @@ -688,6 +837,7 @@ extern_methods!( delta: NSInteger, invalidatedCharRange: NSRange, ); + #[method(setLocations:startingGlyphIndexes:count:forGlyphRange:)] pub unsafe fn setLocations_startingGlyphIndexes_count_forGlyphRange( &self, @@ -696,6 +846,7 @@ extern_methods!( count: NSUInteger, glyphRange: NSRange, ); + #[method(showPackedGlyphs:length:glyphRange:atPoint:font:color:printingAdjustment:)] pub unsafe fn showPackedGlyphs_length_glyphRange_atPoint_font_color_printingAdjustment( &self, @@ -707,6 +858,7 @@ extern_methods!( color: &NSColor, printingAdjustment: NSSize, ); + #[method(showCGGlyphs:positions:count:font:matrix:attributes:inContext:)] pub unsafe fn showCGGlyphs_positions_count_font_matrix_attributes_inContext( &self, @@ -718,17 +870,21 @@ extern_methods!( attributes: &NSDictionary, graphicsContext: &NSGraphicsContext, ); + #[method(hyphenationFactor)] pub unsafe fn hyphenationFactor(&self) -> c_float; + #[method(setHyphenationFactor:)] pub unsafe fn setHyphenationFactor(&self, hyphenationFactor: c_float); } ); + extern_methods!( - #[doc = "NSGlyphGeneration"] + /// NSGlyphGeneration unsafe impl NSLayoutManager { #[method_id(glyphGenerator)] pub unsafe fn glyphGenerator(&self) -> Id; + #[method(setGlyphGenerator:)] pub unsafe fn setGlyphGenerator(&self, glyphGenerator: &NSGlyphGenerator); } diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs index cc340a648..334af3c39 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs @@ -1,85 +1,123 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSLevelIndicator; + unsafe impl ClassType for NSLevelIndicator { type Super = NSControl; } ); + extern_methods!( unsafe impl NSLevelIndicator { #[method(levelIndicatorStyle)] pub unsafe fn levelIndicatorStyle(&self) -> NSLevelIndicatorStyle; + #[method(setLevelIndicatorStyle:)] pub unsafe fn setLevelIndicatorStyle(&self, levelIndicatorStyle: NSLevelIndicatorStyle); + #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(warningValue)] pub unsafe fn warningValue(&self) -> c_double; + #[method(setWarningValue:)] pub unsafe fn setWarningValue(&self, warningValue: c_double); + #[method(criticalValue)] pub unsafe fn criticalValue(&self) -> c_double; + #[method(setCriticalValue:)] pub unsafe fn setCriticalValue(&self, criticalValue: c_double); + #[method(tickMarkPosition)] pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[method(setTickMarkPosition:)] pub unsafe fn setTickMarkPosition(&self, tickMarkPosition: NSTickMarkPosition); + #[method(numberOfTickMarks)] pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[method(setNumberOfTickMarks:)] pub unsafe fn setNumberOfTickMarks(&self, numberOfTickMarks: NSInteger); + #[method(numberOfMajorTickMarks)] pub unsafe fn numberOfMajorTickMarks(&self) -> NSInteger; + #[method(setNumberOfMajorTickMarks:)] pub unsafe fn setNumberOfMajorTickMarks(&self, numberOfMajorTickMarks: NSInteger); + #[method(tickMarkValueAtIndex:)] pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; + #[method(rectOfTickMarkAtIndex:)] pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[method_id(fillColor)] pub unsafe fn fillColor(&self) -> Id; + #[method(setFillColor:)] pub unsafe fn setFillColor(&self, fillColor: Option<&NSColor>); + #[method_id(warningFillColor)] pub unsafe fn warningFillColor(&self) -> Id; + #[method(setWarningFillColor:)] pub unsafe fn setWarningFillColor(&self, warningFillColor: Option<&NSColor>); + #[method_id(criticalFillColor)] pub unsafe fn criticalFillColor(&self) -> Id; + #[method(setCriticalFillColor:)] pub unsafe fn setCriticalFillColor(&self, criticalFillColor: Option<&NSColor>); + #[method(drawsTieredCapacityLevels)] pub unsafe fn drawsTieredCapacityLevels(&self) -> bool; + #[method(setDrawsTieredCapacityLevels:)] pub unsafe fn setDrawsTieredCapacityLevels(&self, drawsTieredCapacityLevels: bool); + #[method(placeholderVisibility)] pub unsafe fn placeholderVisibility(&self) -> NSLevelIndicatorPlaceholderVisibility; + #[method(setPlaceholderVisibility:)] pub unsafe fn setPlaceholderVisibility( &self, placeholderVisibility: NSLevelIndicatorPlaceholderVisibility, ); + #[method_id(ratingImage)] pub unsafe fn ratingImage(&self) -> Option>; + #[method(setRatingImage:)] pub unsafe fn setRatingImage(&self, ratingImage: Option<&NSImage>); + #[method_id(ratingPlaceholderImage)] pub unsafe fn ratingPlaceholderImage(&self) -> Option>; + #[method(setRatingPlaceholderImage:)] pub unsafe fn setRatingPlaceholderImage(&self, ratingPlaceholderImage: Option<&NSImage>); } diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs index 5c86149eb..bae75ac41 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSLevelIndicatorCell; + unsafe impl ClassType for NSLevelIndicatorCell { type Super = NSActionCell; } ); + extern_methods!( unsafe impl NSLevelIndicatorCell { #[method_id(initWithLevelIndicatorStyle:)] @@ -16,40 +21,58 @@ extern_methods!( &self, levelIndicatorStyle: NSLevelIndicatorStyle, ) -> Id; + #[method(levelIndicatorStyle)] pub unsafe fn levelIndicatorStyle(&self) -> NSLevelIndicatorStyle; + #[method(setLevelIndicatorStyle:)] pub unsafe fn setLevelIndicatorStyle(&self, levelIndicatorStyle: NSLevelIndicatorStyle); + #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(warningValue)] pub unsafe fn warningValue(&self) -> c_double; + #[method(setWarningValue:)] pub unsafe fn setWarningValue(&self, warningValue: c_double); + #[method(criticalValue)] pub unsafe fn criticalValue(&self) -> c_double; + #[method(setCriticalValue:)] pub unsafe fn setCriticalValue(&self, criticalValue: c_double); + #[method(tickMarkPosition)] pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[method(setTickMarkPosition:)] pub unsafe fn setTickMarkPosition(&self, tickMarkPosition: NSTickMarkPosition); + #[method(numberOfTickMarks)] pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[method(setNumberOfTickMarks:)] pub unsafe fn setNumberOfTickMarks(&self, numberOfTickMarks: NSInteger); + #[method(numberOfMajorTickMarks)] pub unsafe fn numberOfMajorTickMarks(&self) -> NSInteger; + #[method(setNumberOfMajorTickMarks:)] pub unsafe fn setNumberOfMajorTickMarks(&self, numberOfMajorTickMarks: NSInteger); + #[method(rectOfTickMarkAtIndex:)] pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[method(tickMarkValueAtIndex:)] pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; } diff --git a/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs index 1a2140c24..8b822d44d 100644 --- a/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs @@ -1,18 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMagnificationGestureRecognizer; + unsafe impl ClassType for NSMagnificationGestureRecognizer { type Super = NSGestureRecognizer; } ); + extern_methods!( unsafe impl NSMagnificationGestureRecognizer { #[method(magnification)] pub unsafe fn magnification(&self) -> CGFloat; + #[method(setMagnification:)] pub unsafe fn setMagnification(&self, magnification: CGFloat); } diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index e1b92570b..761889d4f 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -1,18 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMatrix; + unsafe impl ClassType for NSMatrix { type Super = NSControl; } ); + extern_methods!( unsafe impl NSMatrix { #[method_id(initWithFrame:)] pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithFrame:mode:prototype:numberOfRows:numberOfColumns:)] pub unsafe fn initWithFrame_mode_prototype_numberOfRows_numberOfColumns( &self, @@ -22,6 +28,7 @@ extern_methods!( rowsHigh: NSInteger, colsWide: NSInteger, ) -> Id; + #[method_id(initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:)] pub unsafe fn initWithFrame_mode_cellClass_numberOfRows_numberOfColumns( &self, @@ -31,52 +38,72 @@ extern_methods!( rowsHigh: NSInteger, colsWide: NSInteger, ) -> Id; + #[method(cellClass)] pub unsafe fn cellClass(&self) -> &Class; + #[method(setCellClass:)] pub unsafe fn setCellClass(&self, cellClass: &Class); + #[method_id(prototype)] pub unsafe fn prototype(&self) -> Option>; + #[method(setPrototype:)] pub unsafe fn setPrototype(&self, prototype: Option<&NSCell>); + #[method_id(makeCellAtRow:column:)] pub unsafe fn makeCellAtRow_column( &self, row: NSInteger, col: NSInteger, ) -> Id; + #[method(mode)] pub unsafe fn mode(&self) -> NSMatrixMode; + #[method(setMode:)] pub unsafe fn setMode(&self, mode: NSMatrixMode); + #[method(allowsEmptySelection)] pub unsafe fn allowsEmptySelection(&self) -> bool; + #[method(setAllowsEmptySelection:)] pub unsafe fn setAllowsEmptySelection(&self, allowsEmptySelection: bool); + #[method(sendAction:to:forAllCells:)] pub unsafe fn sendAction_to_forAllCells(&self, selector: Sel, object: &Object, flag: bool); + #[method_id(cells)] pub unsafe fn cells(&self) -> Id, Shared>; + #[method(sortUsingSelector:)] pub unsafe fn sortUsingSelector(&self, comparator: Sel); + #[method(sortUsingFunction:context:)] pub unsafe fn sortUsingFunction_context( &self, compare: NonNull, context: *mut c_void, ); + #[method_id(selectedCell)] pub unsafe fn selectedCell(&self) -> Option>; + #[method_id(selectedCells)] pub unsafe fn selectedCells(&self) -> Id, Shared>; + #[method(selectedRow)] pub unsafe fn selectedRow(&self) -> NSInteger; + #[method(selectedColumn)] pub unsafe fn selectedColumn(&self) -> NSInteger; + #[method(isSelectionByRect)] pub unsafe fn isSelectionByRect(&self) -> bool; + #[method(setSelectionByRect:)] pub unsafe fn setSelectionByRect(&self, selectionByRect: bool); + #[method(setSelectionFrom:to:anchor:highlight:)] pub unsafe fn setSelectionFrom_to_anchor_highlight( &self, @@ -85,42 +112,61 @@ extern_methods!( anchorPos: NSInteger, lit: bool, ); + #[method(deselectSelectedCell)] pub unsafe fn deselectSelectedCell(&self); + #[method(deselectAllCells)] pub unsafe fn deselectAllCells(&self); + #[method(selectCellAtRow:column:)] pub unsafe fn selectCellAtRow_column(&self, row: NSInteger, col: NSInteger); + #[method(selectAll:)] pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[method(selectCellWithTag:)] pub unsafe fn selectCellWithTag(&self, tag: NSInteger) -> bool; + #[method(cellSize)] pub unsafe fn cellSize(&self) -> NSSize; + #[method(setCellSize:)] pub unsafe fn setCellSize(&self, cellSize: NSSize); + #[method(intercellSpacing)] pub unsafe fn intercellSpacing(&self) -> NSSize; + #[method(setIntercellSpacing:)] pub unsafe fn setIntercellSpacing(&self, intercellSpacing: NSSize); + #[method(setScrollable:)] pub unsafe fn setScrollable(&self, flag: bool); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method_id(cellBackgroundColor)] pub unsafe fn cellBackgroundColor(&self) -> Option>; + #[method(setCellBackgroundColor:)] pub unsafe fn setCellBackgroundColor(&self, cellBackgroundColor: Option<&NSColor>); + #[method(drawsCellBackground)] pub unsafe fn drawsCellBackground(&self) -> bool; + #[method(setDrawsCellBackground:)] pub unsafe fn setDrawsCellBackground(&self, drawsCellBackground: bool); + #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method(setState:atRow:column:)] pub unsafe fn setState_atRow_column( &self, @@ -128,24 +174,30 @@ extern_methods!( row: NSInteger, col: NSInteger, ); + #[method(getNumberOfRows:columns:)] pub unsafe fn getNumberOfRows_columns( &self, rowCount: *mut NSInteger, colCount: *mut NSInteger, ); + #[method(numberOfRows)] pub unsafe fn numberOfRows(&self) -> NSInteger; + #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSInteger; + #[method_id(cellAtRow:column:)] pub unsafe fn cellAtRow_column( &self, row: NSInteger, col: NSInteger, ) -> Option>; + #[method(cellFrameAtRow:column:)] pub unsafe fn cellFrameAtRow_column(&self, row: NSInteger, col: NSInteger) -> NSRect; + #[method(getRow:column:ofCell:)] pub unsafe fn getRow_column_ofCell( &self, @@ -153,6 +205,7 @@ extern_methods!( col: NonNull, cell: &NSCell, ) -> bool; + #[method(getRow:column:forPoint:)] pub unsafe fn getRow_column_forPoint( &self, @@ -160,119 +213,168 @@ extern_methods!( col: NonNull, point: NSPoint, ) -> bool; + #[method(renewRows:columns:)] pub unsafe fn renewRows_columns(&self, newRows: NSInteger, newCols: NSInteger); + #[method(putCell:atRow:column:)] pub unsafe fn putCell_atRow_column(&self, newCell: &NSCell, row: NSInteger, col: NSInteger); + #[method(addRow)] pub unsafe fn addRow(&self); + #[method(addRowWithCells:)] pub unsafe fn addRowWithCells(&self, newCells: &NSArray); + #[method(insertRow:)] pub unsafe fn insertRow(&self, row: NSInteger); + #[method(insertRow:withCells:)] pub unsafe fn insertRow_withCells( &self, row: NSInteger, newCells: Option<&NSArray>, ); + #[method(removeRow:)] pub unsafe fn removeRow(&self, row: NSInteger); + #[method(addColumn)] pub unsafe fn addColumn(&self); + #[method(addColumnWithCells:)] pub unsafe fn addColumnWithCells(&self, newCells: &NSArray); + #[method(insertColumn:)] pub unsafe fn insertColumn(&self, column: NSInteger); + #[method(insertColumn:withCells:)] pub unsafe fn insertColumn_withCells( &self, column: NSInteger, newCells: Option<&NSArray>, ); + #[method(removeColumn:)] pub unsafe fn removeColumn(&self, col: NSInteger); + #[method_id(cellWithTag:)] pub unsafe fn cellWithTag(&self, tag: NSInteger) -> Option>; + #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method(autosizesCells)] pub unsafe fn autosizesCells(&self) -> bool; + #[method(setAutosizesCells:)] pub unsafe fn setAutosizesCells(&self, autosizesCells: bool); + #[method(sizeToCells)] pub unsafe fn sizeToCells(&self); + #[method(setValidateSize:)] pub unsafe fn setValidateSize(&self, flag: bool); + #[method(drawCellAtRow:column:)] pub unsafe fn drawCellAtRow_column(&self, row: NSInteger, col: NSInteger); + #[method(highlightCell:atRow:column:)] pub unsafe fn highlightCell_atRow_column(&self, flag: bool, row: NSInteger, col: NSInteger); + #[method(isAutoscroll)] pub unsafe fn isAutoscroll(&self) -> bool; + #[method(setAutoscroll:)] pub unsafe fn setAutoscroll(&self, autoscroll: bool); + #[method(scrollCellToVisibleAtRow:column:)] pub unsafe fn scrollCellToVisibleAtRow_column(&self, row: NSInteger, col: NSInteger); + #[method(mouseDownFlags)] pub unsafe fn mouseDownFlags(&self) -> NSInteger; + #[method(mouseDown:)] pub unsafe fn mouseDown(&self, event: &NSEvent); + #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; + #[method(sendAction)] pub unsafe fn sendAction(&self) -> bool; + #[method(sendDoubleAction)] pub unsafe fn sendDoubleAction(&self); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSMatrixDelegate>); + #[method(textShouldBeginEditing:)] pub unsafe fn textShouldBeginEditing(&self, textObject: &NSText) -> bool; + #[method(textShouldEndEditing:)] pub unsafe fn textShouldEndEditing(&self, textObject: &NSText) -> bool; + #[method(textDidBeginEditing:)] pub unsafe fn textDidBeginEditing(&self, notification: &NSNotification); + #[method(textDidEndEditing:)] pub unsafe fn textDidEndEditing(&self, notification: &NSNotification); + #[method(textDidChange:)] pub unsafe fn textDidChange(&self, notification: &NSNotification); + #[method(selectText:)] pub unsafe fn selectText(&self, sender: Option<&Object>); + #[method_id(selectTextAtRow:column:)] pub unsafe fn selectTextAtRow_column( &self, row: NSInteger, col: NSInteger, ) -> Option>; + #[method(acceptsFirstMouse:)] pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool; + #[method(resetCursorRects)] pub unsafe fn resetCursorRects(&self); + #[method(setToolTip:forCell:)] pub unsafe fn setToolTip_forCell(&self, toolTipString: Option<&NSString>, cell: &NSCell); + #[method_id(toolTipForCell:)] pub unsafe fn toolTipForCell(&self, cell: &NSCell) -> Option>; + #[method(autorecalculatesCellSize)] pub unsafe fn autorecalculatesCellSize(&self) -> bool; + #[method(setAutorecalculatesCellSize:)] pub unsafe fn setAutorecalculatesCellSize(&self, autorecalculatesCellSize: bool); } ); + extern_methods!( - #[doc = "NSKeyboardUI"] + /// NSKeyboardUI unsafe impl NSMatrix { #[method(tabKeyTraversesCells)] pub unsafe fn tabKeyTraversesCells(&self) -> bool; + #[method(setTabKeyTraversesCells:)] pub unsafe fn setTabKeyTraversesCells(&self, tabKeyTraversesCells: bool); + #[method_id(keyCell)] pub unsafe fn keyCell(&self) -> Option>; + #[method(setKeyCell:)] pub unsafe fn setKeyCell(&self, keyCell: Option<&NSCell>); } ); + pub type NSMatrixDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs index 94f3a6a7d..35bc18dc3 100644 --- a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs +++ b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs @@ -1,31 +1,43 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMediaLibraryBrowserController; + unsafe impl ClassType for NSMediaLibraryBrowserController { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMediaLibraryBrowserController { #[method(isVisible)] pub unsafe fn isVisible(&self) -> bool; + #[method(setVisible:)] pub unsafe fn setVisible(&self, visible: bool); + #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[method(setFrame:)] pub unsafe fn setFrame(&self, frame: NSRect); + #[method(mediaLibraries)] pub unsafe fn mediaLibraries(&self) -> NSMediaLibrary; + #[method(setMediaLibraries:)] pub unsafe fn setMediaLibraries(&self, mediaLibraries: NSMediaLibrary); + #[method_id(sharedMediaLibraryBrowserController)] pub unsafe fn sharedMediaLibraryBrowserController( ) -> Id; + #[method(togglePanel:)] pub unsafe fn togglePanel(&self, sender: Option<&Object>); } diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 52b69c57f..2caa308f9 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -1,30 +1,40 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMenu; + unsafe impl ClassType for NSMenu { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMenu { #[method_id(initWithTitle:)] pub unsafe fn initWithTitle(&self, title: &NSString) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method(popUpContextMenu:withEvent:forView:)] pub unsafe fn popUpContextMenu_withEvent_forView( menu: &NSMenu, event: &NSEvent, view: &NSView, ); + #[method(popUpContextMenu:withEvent:forView:withFont:)] pub unsafe fn popUpContextMenu_withEvent_forView_withFont( menu: &NSMenu, @@ -32,6 +42,7 @@ extern_methods!( view: &NSView, font: Option<&NSFont>, ); + #[method(popUpMenuPositioningItem:atLocation:inView:)] pub unsafe fn popUpMenuPositioningItem_atLocation_inView( &self, @@ -39,18 +50,25 @@ extern_methods!( location: NSPoint, view: Option<&NSView>, ) -> bool; + #[method(setMenuBarVisible:)] pub unsafe fn setMenuBarVisible(visible: bool); + #[method(menuBarVisible)] pub unsafe fn menuBarVisible() -> bool; + #[method_id(supermenu)] pub unsafe fn supermenu(&self) -> Option>; + #[method(setSupermenu:)] pub unsafe fn setSupermenu(&self, supermenu: Option<&NSMenu>); + #[method(insertItem:atIndex:)] pub unsafe fn insertItem_atIndex(&self, newItem: &NSMenuItem, index: NSInteger); + #[method(addItem:)] pub unsafe fn addItem(&self, newItem: &NSMenuItem); + #[method_id(insertItemWithTitle:action:keyEquivalent:atIndex:)] pub unsafe fn insertItemWithTitle_action_keyEquivalent_atIndex( &self, @@ -59,6 +77,7 @@ extern_methods!( charCode: &NSString, index: NSInteger, ) -> Id; + #[method_id(addItemWithTitle:action:keyEquivalent:)] pub unsafe fn addItemWithTitle_action_keyEquivalent( &self, @@ -66,87 +85,126 @@ extern_methods!( selector: Option, charCode: &NSString, ) -> Id; + #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method(removeItem:)] pub unsafe fn removeItem(&self, item: &NSMenuItem); + #[method(setSubmenu:forItem:)] pub unsafe fn setSubmenu_forItem(&self, menu: Option<&NSMenu>, item: &NSMenuItem); + #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); + #[method_id(itemArray)] pub unsafe fn itemArray(&self) -> Id, Shared>; + #[method(setItemArray:)] pub unsafe fn setItemArray(&self, itemArray: &NSArray); + #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method_id(itemAtIndex:)] pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; + #[method(indexOfItem:)] pub unsafe fn indexOfItem(&self, item: &NSMenuItem) -> NSInteger; + #[method(indexOfItemWithTitle:)] pub unsafe fn indexOfItemWithTitle(&self, title: &NSString) -> NSInteger; + #[method(indexOfItemWithTag:)] pub unsafe fn indexOfItemWithTag(&self, tag: NSInteger) -> NSInteger; + #[method(indexOfItemWithRepresentedObject:)] pub unsafe fn indexOfItemWithRepresentedObject(&self, object: Option<&Object>) -> NSInteger; + #[method(indexOfItemWithSubmenu:)] pub unsafe fn indexOfItemWithSubmenu(&self, submenu: Option<&NSMenu>) -> NSInteger; + #[method(indexOfItemWithTarget:andAction:)] pub unsafe fn indexOfItemWithTarget_andAction( &self, target: Option<&Object>, actionSelector: Option, ) -> NSInteger; + #[method_id(itemWithTitle:)] pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; + #[method_id(itemWithTag:)] pub unsafe fn itemWithTag(&self, tag: NSInteger) -> Option>; + #[method(autoenablesItems)] pub unsafe fn autoenablesItems(&self) -> bool; + #[method(setAutoenablesItems:)] pub unsafe fn setAutoenablesItems(&self, autoenablesItems: bool); + #[method(update)] pub unsafe fn update(&self); + #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; + #[method(itemChanged:)] pub unsafe fn itemChanged(&self, item: &NSMenuItem); + #[method(performActionForItemAtIndex:)] pub unsafe fn performActionForItemAtIndex(&self, index: NSInteger); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSMenuDelegate>); + #[method(menuBarHeight)] pub unsafe fn menuBarHeight(&self) -> CGFloat; + #[method(cancelTracking)] pub unsafe fn cancelTracking(&self); + #[method(cancelTrackingWithoutAnimation)] pub unsafe fn cancelTrackingWithoutAnimation(&self); + #[method_id(highlightedItem)] pub unsafe fn highlightedItem(&self) -> Option>; + #[method(minimumWidth)] pub unsafe fn minimumWidth(&self) -> CGFloat; + #[method(setMinimumWidth:)] pub unsafe fn setMinimumWidth(&self, minimumWidth: CGFloat); + #[method(size)] pub unsafe fn size(&self) -> NSSize; + #[method_id(font)] pub unsafe fn font(&self) -> Option>; + #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[method(allowsContextMenuPlugIns)] pub unsafe fn allowsContextMenuPlugIns(&self) -> bool; + #[method(setAllowsContextMenuPlugIns:)] pub unsafe fn setAllowsContextMenuPlugIns(&self, allowsContextMenuPlugIns: bool); + #[method(showsStateColumn)] pub unsafe fn showsStateColumn(&self) -> bool; + #[method(setShowsStateColumn:)] pub unsafe fn setShowsStateColumn(&self, showsStateColumn: bool); + #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setUserInterfaceLayoutDirection:)] pub unsafe fn setUserInterfaceLayoutDirection( &self, @@ -154,62 +212,83 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSSubmenuAction"] + /// NSSubmenuAction unsafe impl NSMenu { #[method(submenuAction:)] pub unsafe fn submenuAction(&self, sender: Option<&Object>); } ); + pub type NSMenuItemValidation = NSObject; + extern_methods!( - #[doc = "NSMenuValidation"] + /// NSMenuValidation unsafe impl NSObject { #[method(validateMenuItem:)] pub unsafe fn validateMenuItem(&self, menuItem: &NSMenuItem) -> bool; } ); + pub type NSMenuDelegate = NSObject; + extern_methods!( - #[doc = "NSMenuPropertiesToUpdate"] + /// NSMenuPropertiesToUpdate unsafe impl NSMenu { #[method(propertiesToUpdate)] pub unsafe fn propertiesToUpdate(&self) -> NSMenuProperties; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSMenu { #[method(setMenuRepresentation:)] pub unsafe fn setMenuRepresentation(&self, menuRep: Option<&Object>); + #[method_id(menuRepresentation)] pub unsafe fn menuRepresentation(&self) -> Option>; + #[method(setContextMenuRepresentation:)] pub unsafe fn setContextMenuRepresentation(&self, menuRep: Option<&Object>); + #[method_id(contextMenuRepresentation)] pub unsafe fn contextMenuRepresentation(&self) -> Option>; + #[method(setTearOffMenuRepresentation:)] pub unsafe fn setTearOffMenuRepresentation(&self, menuRep: Option<&Object>); + #[method_id(tearOffMenuRepresentation)] pub unsafe fn tearOffMenuRepresentation(&self) -> Option>; + #[method(menuZone)] pub unsafe fn menuZone() -> *mut NSZone; + #[method(setMenuZone:)] pub unsafe fn setMenuZone(zone: *mut NSZone); + #[method_id(attachedMenu)] pub unsafe fn attachedMenu(&self) -> Option>; + #[method(isAttached)] pub unsafe fn isAttached(&self) -> bool; + #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[method(locationForSubmenu:)] pub unsafe fn locationForSubmenu(&self, submenu: Option<&NSMenu>) -> NSPoint; + #[method(menuChangedMessagesEnabled)] pub unsafe fn menuChangedMessagesEnabled(&self) -> bool; + #[method(setMenuChangedMessagesEnabled:)] pub unsafe fn setMenuChangedMessagesEnabled(&self, menuChangedMessagesEnabled: bool); + #[method(helpRequested:)] pub unsafe fn helpRequested(&self, eventPtr: &NSEvent); + #[method(isTornOff)] pub unsafe fn isTornOff(&self) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs index 2118bf700..8c490548b 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -1,22 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMenuItem; + unsafe impl ClassType for NSMenuItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMenuItem { #[method(usesUserKeyEquivalents)] pub unsafe fn usesUserKeyEquivalents() -> bool; + #[method(setUsesUserKeyEquivalents:)] pub unsafe fn setUsesUserKeyEquivalents(usesUserKeyEquivalents: bool); + #[method_id(separatorItem)] pub unsafe fn separatorItem() -> Id; + #[method_id(initWithTitle:action:keyEquivalent:)] pub unsafe fn initWithTitle_action_keyEquivalent( &self, @@ -24,143 +32,203 @@ extern_methods!( selector: Option, charCode: &NSString, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(menu)] pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method(hasSubmenu)] pub unsafe fn hasSubmenu(&self) -> bool; + #[method_id(submenu)] pub unsafe fn submenu(&self) -> Option>; + #[method(setSubmenu:)] pub unsafe fn setSubmenu(&self, submenu: Option<&NSMenu>); + #[method_id(parentItem)] pub unsafe fn parentItem(&self) -> Option>; + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; + #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); + #[method(isSeparatorItem)] pub unsafe fn isSeparatorItem(&self) -> bool; + #[method_id(keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; + #[method(setKeyEquivalent:)] pub unsafe fn setKeyEquivalent(&self, keyEquivalent: &NSString); + #[method(keyEquivalentModifierMask)] pub unsafe fn keyEquivalentModifierMask(&self) -> NSEventModifierFlags; + #[method(setKeyEquivalentModifierMask:)] pub unsafe fn setKeyEquivalentModifierMask( &self, keyEquivalentModifierMask: NSEventModifierFlags, ); + #[method_id(userKeyEquivalent)] pub unsafe fn userKeyEquivalent(&self) -> Id; + #[method(allowsKeyEquivalentWhenHidden)] pub unsafe fn allowsKeyEquivalentWhenHidden(&self) -> bool; + #[method(setAllowsKeyEquivalentWhenHidden:)] pub unsafe fn setAllowsKeyEquivalentWhenHidden(&self, allowsKeyEquivalentWhenHidden: bool); + #[method(allowsAutomaticKeyEquivalentLocalization)] pub unsafe fn allowsAutomaticKeyEquivalentLocalization(&self) -> bool; + #[method(setAllowsAutomaticKeyEquivalentLocalization:)] pub unsafe fn setAllowsAutomaticKeyEquivalentLocalization( &self, allowsAutomaticKeyEquivalentLocalization: bool, ); + #[method(allowsAutomaticKeyEquivalentMirroring)] pub unsafe fn allowsAutomaticKeyEquivalentMirroring(&self) -> bool; + #[method(setAllowsAutomaticKeyEquivalentMirroring:)] pub unsafe fn setAllowsAutomaticKeyEquivalentMirroring( &self, allowsAutomaticKeyEquivalentMirroring: bool, ); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method(state)] pub unsafe fn state(&self) -> NSControlStateValue; + #[method(setState:)] pub unsafe fn setState(&self, state: NSControlStateValue); + #[method_id(onStateImage)] pub unsafe fn onStateImage(&self) -> Option>; + #[method(setOnStateImage:)] pub unsafe fn setOnStateImage(&self, onStateImage: Option<&NSImage>); + #[method_id(offStateImage)] pub unsafe fn offStateImage(&self) -> Option>; + #[method(setOffStateImage:)] pub unsafe fn setOffStateImage(&self, offStateImage: Option<&NSImage>); + #[method_id(mixedStateImage)] pub unsafe fn mixedStateImage(&self) -> Option>; + #[method(setMixedStateImage:)] pub unsafe fn setMixedStateImage(&self, mixedStateImage: Option<&NSImage>); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method(isAlternate)] pub unsafe fn isAlternate(&self) -> bool; + #[method(setAlternate:)] pub unsafe fn setAlternate(&self, alternate: bool); + #[method(indentationLevel)] pub unsafe fn indentationLevel(&self) -> NSInteger; + #[method(setIndentationLevel:)] pub unsafe fn setIndentationLevel(&self, indentationLevel: NSInteger); + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); + #[method_id(representedObject)] pub unsafe fn representedObject(&self) -> Option>; + #[method(setRepresentedObject:)] pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>); + #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(isHighlighted)] pub unsafe fn isHighlighted(&self) -> bool; + #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[method(isHiddenOrHasHiddenAncestor)] pub unsafe fn isHiddenOrHasHiddenAncestor(&self) -> bool; + #[method_id(toolTip)] pub unsafe fn toolTip(&self) -> Option>; + #[method(setToolTip:)] pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); } ); + extern_methods!( - #[doc = "NSViewEnclosingMenuItem"] + /// NSViewEnclosingMenuItem unsafe impl NSView { #[method_id(enclosingMenuItem)] pub unsafe fn enclosingMenuItem(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSMenuItem { #[method(setMnemonicLocation:)] pub unsafe fn setMnemonicLocation(&self, location: NSUInteger); + #[method(mnemonicLocation)] pub unsafe fn mnemonicLocation(&self) -> NSUInteger; + #[method_id(mnemonic)] pub unsafe fn mnemonic(&self) -> Option>; + #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: &NSString); } diff --git a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs index 041d76d53..ada3f0d5c 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs @@ -1,78 +1,106 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMenuItemCell; + unsafe impl ClassType for NSMenuItemCell { type Super = NSButtonCell; } ); + extern_methods!( unsafe impl NSMenuItemCell { #[method_id(initTextCell:)] pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(menuItem)] pub unsafe fn menuItem(&self) -> Option>; + #[method(setMenuItem:)] pub unsafe fn setMenuItem(&self, menuItem: Option<&NSMenuItem>); + #[method(needsSizing)] pub unsafe fn needsSizing(&self) -> bool; + #[method(setNeedsSizing:)] pub unsafe fn setNeedsSizing(&self, needsSizing: bool); + #[method(calcSize)] pub unsafe fn calcSize(&self); + #[method(needsDisplay)] pub unsafe fn needsDisplay(&self) -> bool; + #[method(setNeedsDisplay:)] pub unsafe fn setNeedsDisplay(&self, needsDisplay: bool); + #[method(stateImageWidth)] pub unsafe fn stateImageWidth(&self) -> CGFloat; + #[method(imageWidth)] pub unsafe fn imageWidth(&self) -> CGFloat; + #[method(titleWidth)] pub unsafe fn titleWidth(&self) -> CGFloat; + #[method(keyEquivalentWidth)] pub unsafe fn keyEquivalentWidth(&self) -> CGFloat; + #[method(stateImageRectForBounds:)] pub unsafe fn stateImageRectForBounds(&self, cellFrame: NSRect) -> NSRect; + #[method(titleRectForBounds:)] pub unsafe fn titleRectForBounds(&self, cellFrame: NSRect) -> NSRect; + #[method(keyEquivalentRectForBounds:)] pub unsafe fn keyEquivalentRectForBounds(&self, cellFrame: NSRect) -> NSRect; + #[method(drawSeparatorItemWithFrame:inView:)] pub unsafe fn drawSeparatorItemWithFrame_inView( &self, cellFrame: NSRect, controlView: &NSView, ); + #[method(drawStateImageWithFrame:inView:)] pub unsafe fn drawStateImageWithFrame_inView( &self, cellFrame: NSRect, controlView: &NSView, ); + #[method(drawImageWithFrame:inView:)] pub unsafe fn drawImageWithFrame_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method(drawTitleWithFrame:inView:)] pub unsafe fn drawTitleWithFrame_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method(drawKeyEquivalentWithFrame:inView:)] pub unsafe fn drawKeyEquivalentWithFrame_inView( &self, cellFrame: NSRect, controlView: &NSView, ); + #[method(drawBorderAndBackgroundWithFrame:inView:)] pub unsafe fn drawBorderAndBackgroundWithFrame_inView( &self, cellFrame: NSRect, controlView: &NSView, ); + #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); } diff --git a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs index 05941b602..dce08c647 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs @@ -1,22 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMenuToolbarItem; + unsafe impl ClassType for NSMenuToolbarItem { type Super = NSToolbarItem; } ); + extern_methods!( unsafe impl NSMenuToolbarItem { #[method_id(menu)] pub unsafe fn menu(&self) -> Id; + #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: &NSMenu); + #[method(showsIndicator)] pub unsafe fn showsIndicator(&self) -> bool; + #[method(setShowsIndicator:)] pub unsafe fn setShowsIndicator(&self, showsIndicator: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSMovie.rs b/crates/icrate/src/generated/AppKit/NSMovie.rs index bb5d8e0fc..c5ff54b86 100644 --- a/crates/icrate/src/generated/AppKit/NSMovie.rs +++ b/crates/icrate/src/generated/AppKit/NSMovie.rs @@ -1,22 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMovie; + unsafe impl ClassType for NSMovie { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMovie { #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(init)] pub unsafe fn init(&self) -> Option>; + #[method_id(initWithMovie:)] pub unsafe fn initWithMovie(&self, movie: &QTMovie) -> Option>; + #[method_id(QTMovie)] pub unsafe fn QTMovie(&self) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index 046e62a60..dc33a6df5 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSNibName = NSString; + extern_class!( #[derive(Debug)] pub struct NSNib; + unsafe impl ClassType for NSNib { type Super = NSObject; } ); + extern_methods!( unsafe impl NSNib { #[method_id(initWithNibNamed:bundle:)] @@ -18,12 +24,14 @@ extern_methods!( nibName: &NSNibName, bundle: Option<&NSBundle>, ) -> Option>; + #[method_id(initWithNibData:bundle:)] pub unsafe fn initWithNibData_bundle( &self, nibData: &NSData, bundle: Option<&NSBundle>, ) -> Id; + #[method(instantiateWithOwner:topLevelObjects:)] pub unsafe fn instantiateWithOwner_topLevelObjects( &self, @@ -32,19 +40,22 @@ extern_methods!( ) -> bool; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSNib { #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, nibFileURL: Option<&NSURL>, ) -> Option>; + #[method(instantiateNibWithExternalNameTable:)] pub unsafe fn instantiateNibWithExternalNameTable( &self, externalNameTable: Option<&NSDictionary>, ) -> bool; + #[method(instantiateNibWithOwner:topLevelObjects:)] pub unsafe fn instantiateNibWithOwner_topLevelObjects( &self, diff --git a/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs b/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs +++ b/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSNibLoading.rs b/crates/icrate/src/generated/AppKit/NSNibLoading.rs index 09c006355..868382e28 100644 --- a/crates/icrate/src/generated/AppKit/NSNibLoading.rs +++ b/crates/icrate/src/generated/AppKit/NSNibLoading.rs @@ -1,9 +1,12 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSNibLoading"] + /// NSNibLoading unsafe impl NSBundle { #[method(loadNibNamed:owner:topLevelObjects:)] pub unsafe fn loadNibNamed_owner_topLevelObjects( @@ -14,17 +17,20 @@ extern_methods!( ) -> bool; } ); + extern_methods!( - #[doc = "NSNibAwaking"] + /// NSNibAwaking unsafe impl NSObject { #[method(awakeFromNib)] pub unsafe fn awakeFromNib(&self); + #[method(prepareForInterfaceBuilder)] pub unsafe fn prepareForInterfaceBuilder(&self); } ); + extern_methods!( - #[doc = "NSNibLoadingDeprecated"] + /// NSNibLoadingDeprecated unsafe impl NSBundle { #[method(loadNibFile:externalNameTable:withZone:)] pub unsafe fn loadNibFile_externalNameTable_withZone( @@ -32,11 +38,13 @@ extern_methods!( context: Option<&NSDictionary>, zone: *mut NSZone, ) -> bool; + #[method(loadNibNamed:owner:)] pub unsafe fn loadNibNamed_owner( nibName: Option<&NSString>, owner: Option<&Object>, ) -> bool; + #[method(loadNibFile:externalNameTable:withZone:)] pub unsafe fn loadNibFile_externalNameTable_withZone( &self, diff --git a/crates/icrate/src/generated/AppKit/NSObjectController.rs b/crates/icrate/src/generated/AppKit/NSObjectController.rs index 17784a65c..daab6325e 100644 --- a/crates/icrate/src/generated/AppKit/NSObjectController.rs +++ b/crates/icrate/src/generated/AppKit/NSObjectController.rs @@ -1,91 +1,127 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSObjectController; + unsafe impl ClassType for NSObjectController { type Super = NSController; } ); + extern_methods!( unsafe impl NSObjectController { #[method_id(initWithContent:)] pub unsafe fn initWithContent(&self, content: Option<&Object>) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(content)] pub unsafe fn content(&self) -> Option>; + #[method(setContent:)] pub unsafe fn setContent(&self, content: Option<&Object>); + #[method_id(selection)] pub unsafe fn selection(&self) -> Id; + #[method_id(selectedObjects)] pub unsafe fn selectedObjects(&self) -> Id; + #[method(automaticallyPreparesContent)] pub unsafe fn automaticallyPreparesContent(&self) -> bool; + #[method(setAutomaticallyPreparesContent:)] pub unsafe fn setAutomaticallyPreparesContent(&self, automaticallyPreparesContent: bool); + #[method(prepareContent)] pub unsafe fn prepareContent(&self); + #[method(objectClass)] pub unsafe fn objectClass(&self) -> Option<&Class>; + #[method(setObjectClass:)] pub unsafe fn setObjectClass(&self, objectClass: Option<&Class>); + #[method_id(newObject)] pub unsafe fn newObject(&self) -> Id; + #[method(addObject:)] pub unsafe fn addObject(&self, object: &Object); + #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &Object); + #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[method(add:)] pub unsafe fn add(&self, sender: Option<&Object>); + #[method(canAdd)] pub unsafe fn canAdd(&self) -> bool; + #[method(remove:)] pub unsafe fn remove(&self, sender: Option<&Object>); + #[method(canRemove)] pub unsafe fn canRemove(&self) -> bool; + #[method(validateUserInterfaceItem:)] pub unsafe fn validateUserInterfaceItem(&self, item: &NSValidatedUserInterfaceItem) -> bool; } ); + extern_methods!( - #[doc = "NSManagedController"] + /// NSManagedController unsafe impl NSObjectController { #[method_id(managedObjectContext)] pub unsafe fn managedObjectContext(&self) -> Option>; + #[method(setManagedObjectContext:)] pub unsafe fn setManagedObjectContext( &self, managedObjectContext: Option<&NSManagedObjectContext>, ); + #[method_id(entityName)] pub unsafe fn entityName(&self) -> Option>; + #[method(setEntityName:)] pub unsafe fn setEntityName(&self, entityName: Option<&NSString>); + #[method_id(fetchPredicate)] pub unsafe fn fetchPredicate(&self) -> Option>; + #[method(setFetchPredicate:)] pub unsafe fn setFetchPredicate(&self, fetchPredicate: Option<&NSPredicate>); + #[method(fetchWithRequest:merge:error:)] pub unsafe fn fetchWithRequest_merge_error( &self, fetchRequest: Option<&NSFetchRequest>, merge: bool, ) -> Result<(), Id>; + #[method(fetch:)] pub unsafe fn fetch(&self, sender: Option<&Object>); + #[method(usesLazyFetching)] pub unsafe fn usesLazyFetching(&self) -> bool; + #[method(setUsesLazyFetching:)] pub unsafe fn setUsesLazyFetching(&self, usesLazyFetching: bool); + #[method_id(defaultFetchRequest)] pub unsafe fn defaultFetchRequest(&self) -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index 08fac479c..8216c4f0d 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSOpenGLPixelFormatAttribute = u32; + extern_class!( #[derive(Debug)] pub struct NSOpenGLPixelFormat; + unsafe impl ClassType for NSOpenGLPixelFormat { type Super = NSObject; } ); + extern_methods!( unsafe impl NSOpenGLPixelFormat { #[method_id(initWithCGLPixelFormatObj:)] @@ -17,17 +23,22 @@ extern_methods!( &self, format: CGLPixelFormatObj, ) -> Option>; + #[method_id(initWithAttributes:)] pub unsafe fn initWithAttributes( &self, attribs: NonNull, ) -> Option>; + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, attribs: Option<&NSData>) -> Option>; + #[method_id(attributes)] pub unsafe fn attributes(&self) -> Option>; + #[method(setAttributes:)] pub unsafe fn setAttributes(&self, attribs: Option<&NSData>); + #[method(getValues:forAttribute:forVirtualScreen:)] pub unsafe fn getValues_forAttribute_forVirtualScreen( &self, @@ -35,19 +46,24 @@ extern_methods!( attrib: NSOpenGLPixelFormatAttribute, screen: GLint, ); + #[method(numberOfVirtualScreens)] pub unsafe fn numberOfVirtualScreens(&self) -> GLint; + #[method(CGLPixelFormatObj)] pub unsafe fn CGLPixelFormatObj(&self) -> CGLPixelFormatObj; } ); + extern_class!( #[derive(Debug)] pub struct NSOpenGLPixelBuffer; + unsafe impl ClassType for NSOpenGLPixelBuffer { type Super = NSObject; } ); + extern_methods!( unsafe impl NSOpenGLPixelBuffer { #[method_id(initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh:)] @@ -59,32 +75,42 @@ extern_methods!( pixelsWide: GLsizei, pixelsHigh: GLsizei, ) -> Option>; + #[method_id(initWithCGLPBufferObj:)] pub unsafe fn initWithCGLPBufferObj( &self, pbuffer: CGLPBufferObj, ) -> Option>; + #[method(CGLPBufferObj)] pub unsafe fn CGLPBufferObj(&self) -> CGLPBufferObj; + #[method(pixelsWide)] pub unsafe fn pixelsWide(&self) -> GLsizei; + #[method(pixelsHigh)] pub unsafe fn pixelsHigh(&self) -> GLsizei; + #[method(textureTarget)] pub unsafe fn textureTarget(&self) -> GLenum; + #[method(textureInternalFormat)] pub unsafe fn textureInternalFormat(&self) -> GLenum; + #[method(textureMaxMipMapLevel)] pub unsafe fn textureMaxMipMapLevel(&self) -> GLint; } ); + extern_class!( #[derive(Debug)] pub struct NSOpenGLContext; + unsafe impl ClassType for NSOpenGLContext { type Super = NSObject; } ); + extern_methods!( unsafe impl NSOpenGLContext { #[method_id(initWithFormat:shareContext:)] @@ -93,19 +119,25 @@ extern_methods!( format: &NSOpenGLPixelFormat, share: Option<&NSOpenGLContext>, ) -> Option>; + #[method_id(initWithCGLContextObj:)] pub unsafe fn initWithCGLContextObj( &self, context: CGLContextObj, ) -> Option>; + #[method_id(pixelFormat)] pub unsafe fn pixelFormat(&self) -> Id; + #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(setFullScreen)] pub unsafe fn setFullScreen(&self); + #[method(setOffScreen:width:height:rowbytes:)] pub unsafe fn setOffScreen_width_height_rowbytes( &self, @@ -114,40 +146,52 @@ extern_methods!( height: GLsizei, rowbytes: GLint, ); + #[method(clearDrawable)] pub unsafe fn clearDrawable(&self); + #[method(update)] pub unsafe fn update(&self); + #[method(flushBuffer)] pub unsafe fn flushBuffer(&self); + #[method(makeCurrentContext)] pub unsafe fn makeCurrentContext(&self); + #[method(clearCurrentContext)] pub unsafe fn clearCurrentContext(); + #[method_id(currentContext)] pub unsafe fn currentContext() -> Option>; + #[method(copyAttributesFromContext:withMask:)] pub unsafe fn copyAttributesFromContext_withMask( &self, context: &NSOpenGLContext, mask: GLbitfield, ); + #[method(setValues:forParameter:)] pub unsafe fn setValues_forParameter( &self, vals: NonNull, param: NSOpenGLContextParameter, ); + #[method(getValues:forParameter:)] pub unsafe fn getValues_forParameter( &self, vals: NonNull, param: NSOpenGLContextParameter, ); + #[method(currentVirtualScreen)] pub unsafe fn currentVirtualScreen(&self) -> GLint; + #[method(setCurrentVirtualScreen:)] pub unsafe fn setCurrentVirtualScreen(&self, currentVirtualScreen: GLint); + #[method(createTexture:fromView:internalFormat:)] pub unsafe fn createTexture_fromView_internalFormat( &self, @@ -155,12 +199,14 @@ extern_methods!( view: &NSView, format: GLenum, ); + #[method(CGLContextObj)] pub unsafe fn CGLContextObj(&self) -> CGLContextObj; } ); + extern_methods!( - #[doc = "NSOpenGLPixelBuffer"] + /// NSOpenGLPixelBuffer unsafe impl NSOpenGLContext { #[method(setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:)] pub unsafe fn setPixelBuffer_cubeMapFace_mipMapLevel_currentVirtualScreen( @@ -170,12 +216,16 @@ extern_methods!( level: GLint, screen: GLint, ); + #[method_id(pixelBuffer)] pub unsafe fn pixelBuffer(&self) -> Option>; + #[method(pixelBufferCubeMapFace)] pub unsafe fn pixelBufferCubeMapFace(&self) -> GLenum; + #[method(pixelBufferMipMapLevel)] pub unsafe fn pixelBufferMipMapLevel(&self) -> GLint; + #[method(setTextureImageToPixelBuffer:colorBuffer:)] pub unsafe fn setTextureImageToPixelBuffer_colorBuffer( &self, diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs index c0128ffe0..3879b04a8 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs @@ -1,38 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSOpenGLLayer; + unsafe impl ClassType for NSOpenGLLayer { type Super = CAOpenGLLayer; } ); + extern_methods!( unsafe impl NSOpenGLLayer { #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); + #[method_id(openGLPixelFormat)] pub unsafe fn openGLPixelFormat(&self) -> Option>; + #[method(setOpenGLPixelFormat:)] pub unsafe fn setOpenGLPixelFormat(&self, openGLPixelFormat: Option<&NSOpenGLPixelFormat>); + #[method_id(openGLContext)] pub unsafe fn openGLContext(&self) -> Option>; + #[method(setOpenGLContext:)] pub unsafe fn setOpenGLContext(&self, openGLContext: Option<&NSOpenGLContext>); + #[method_id(openGLPixelFormatForDisplayMask:)] pub unsafe fn openGLPixelFormatForDisplayMask( &self, mask: u32, ) -> Id; + #[method_id(openGLContextForPixelFormat:)] pub unsafe fn openGLContextForPixelFormat( &self, pixelFormat: &NSOpenGLPixelFormat, ) -> Id; + #[method(canDrawInOpenGLContext:pixelFormat:forLayerTime:displayTime:)] pub unsafe fn canDrawInOpenGLContext_pixelFormat_forLayerTime_displayTime( &self, @@ -41,6 +54,7 @@ extern_methods!( t: CFTimeInterval, ts: NonNull, ) -> bool; + #[method(drawInOpenGLContext:pixelFormat:forLayerTime:displayTime:)] pub unsafe fn drawInOpenGLContext_pixelFormat_forLayerTime_displayTime( &self, diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs index 25b88c5ef..6c8be517d 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs @@ -1,49 +1,67 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSOpenGLView; + unsafe impl ClassType for NSOpenGLView { type Super = NSView; } ); + extern_methods!( unsafe impl NSOpenGLView { #[method_id(defaultPixelFormat)] pub unsafe fn defaultPixelFormat() -> Id; + #[method_id(initWithFrame:pixelFormat:)] pub unsafe fn initWithFrame_pixelFormat( &self, frameRect: NSRect, format: Option<&NSOpenGLPixelFormat>, ) -> Option>; + #[method_id(openGLContext)] pub unsafe fn openGLContext(&self) -> Option>; + #[method(setOpenGLContext:)] pub unsafe fn setOpenGLContext(&self, openGLContext: Option<&NSOpenGLContext>); + #[method(clearGLContext)] pub unsafe fn clearGLContext(&self); + #[method(update)] pub unsafe fn update(&self); + #[method(reshape)] pub unsafe fn reshape(&self); + #[method_id(pixelFormat)] pub unsafe fn pixelFormat(&self) -> Option>; + #[method(setPixelFormat:)] pub unsafe fn setPixelFormat(&self, pixelFormat: Option<&NSOpenGLPixelFormat>); + #[method(prepareOpenGL)] pub unsafe fn prepareOpenGL(&self); + #[method(wantsBestResolutionOpenGLSurface)] pub unsafe fn wantsBestResolutionOpenGLSurface(&self) -> bool; + #[method(setWantsBestResolutionOpenGLSurface:)] pub unsafe fn setWantsBestResolutionOpenGLSurface( &self, wantsBestResolutionOpenGLSurface: bool, ); + #[method(wantsExtendedDynamicRangeOpenGLSurface)] pub unsafe fn wantsExtendedDynamicRangeOpenGLSurface(&self) -> bool; + #[method(setWantsExtendedDynamicRangeOpenGLSurface:)] pub unsafe fn setWantsExtendedDynamicRangeOpenGLSurface( &self, @@ -51,11 +69,13 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSOpenGLSurfaceResolution"] + /// NSOpenGLSurfaceResolution unsafe impl NSView { #[method(wantsBestResolutionOpenGLSurface)] pub unsafe fn wantsBestResolutionOpenGLSurface(&self) -> bool; + #[method(setWantsBestResolutionOpenGLSurface:)] pub unsafe fn setWantsBestResolutionOpenGLSurface( &self, @@ -63,11 +83,13 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSExtendedDynamicRange"] + /// NSExtendedDynamicRange unsafe impl NSView { #[method(wantsExtendedDynamicRangeOpenGLSurface)] pub unsafe fn wantsExtendedDynamicRangeOpenGLSurface(&self) -> bool; + #[method(setWantsExtendedDynamicRangeOpenGLSurface:)] pub unsafe fn setWantsExtendedDynamicRangeOpenGLSurface( &self, diff --git a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs index 7ae1079a8..801869839 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs @@ -1,55 +1,77 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSOpenPanel; + unsafe impl ClassType for NSOpenPanel { type Super = NSSavePanel; } ); + extern_methods!( unsafe impl NSOpenPanel { #[method_id(openPanel)] pub unsafe fn openPanel() -> Id; + #[method_id(URLs)] pub unsafe fn URLs(&self) -> Id, Shared>; + #[method(resolvesAliases)] pub unsafe fn resolvesAliases(&self) -> bool; + #[method(setResolvesAliases:)] pub unsafe fn setResolvesAliases(&self, resolvesAliases: bool); + #[method(canChooseDirectories)] pub unsafe fn canChooseDirectories(&self) -> bool; + #[method(setCanChooseDirectories:)] pub unsafe fn setCanChooseDirectories(&self, canChooseDirectories: bool); + #[method(allowsMultipleSelection)] pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[method(setAllowsMultipleSelection:)] pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool); + #[method(canChooseFiles)] pub unsafe fn canChooseFiles(&self) -> bool; + #[method(setCanChooseFiles:)] pub unsafe fn setCanChooseFiles(&self, canChooseFiles: bool); + #[method(canResolveUbiquitousConflicts)] pub unsafe fn canResolveUbiquitousConflicts(&self) -> bool; + #[method(setCanResolveUbiquitousConflicts:)] pub unsafe fn setCanResolveUbiquitousConflicts(&self, canResolveUbiquitousConflicts: bool); + #[method(canDownloadUbiquitousContents)] pub unsafe fn canDownloadUbiquitousContents(&self) -> bool; + #[method(setCanDownloadUbiquitousContents:)] pub unsafe fn setCanDownloadUbiquitousContents(&self, canDownloadUbiquitousContents: bool); + #[method(isAccessoryViewDisclosed)] pub unsafe fn isAccessoryViewDisclosed(&self) -> bool; + #[method(setAccessoryViewDisclosed:)] pub unsafe fn setAccessoryViewDisclosed(&self, accessoryViewDisclosed: bool); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSOpenPanel { #[method_id(filenames)] pub unsafe fn filenames(&self) -> Id; + #[method(beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheetForDirectory_file_types_modalForWindow_modalDelegate_didEndSelector_contextInfo( &self, @@ -61,6 +83,7 @@ extern_methods!( didEndSelector: Option, contextInfo: *mut c_void, ); + #[method(beginForDirectory:file:types:modelessDelegate:didEndSelector:contextInfo:)] pub unsafe fn beginForDirectory_file_types_modelessDelegate_didEndSelector_contextInfo( &self, @@ -71,6 +94,7 @@ extern_methods!( didEndSelector: Option, contextInfo: *mut c_void, ); + #[method(runModalForDirectory:file:types:)] pub unsafe fn runModalForDirectory_file_types( &self, @@ -78,6 +102,7 @@ extern_methods!( name: Option<&NSString>, fileTypes: Option<&NSArray>, ) -> NSInteger; + #[method(runModalForTypes:)] pub unsafe fn runModalForTypes(&self, fileTypes: Option<&NSArray>) -> NSInteger; } diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index 5953affe1..76c58230c 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -1,90 +1,128 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSOutlineView; + unsafe impl ClassType for NSOutlineView { type Super = NSTableView; } ); + extern_methods!( unsafe impl NSOutlineView { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSOutlineViewDelegate>); + #[method_id(dataSource)] pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] pub unsafe fn setDataSource(&self, dataSource: Option<&NSOutlineViewDataSource>); + #[method_id(outlineTableColumn)] pub unsafe fn outlineTableColumn(&self) -> Option>; + #[method(setOutlineTableColumn:)] pub unsafe fn setOutlineTableColumn(&self, outlineTableColumn: Option<&NSTableColumn>); + #[method(isExpandable:)] pub unsafe fn isExpandable(&self, item: Option<&Object>) -> bool; + #[method(numberOfChildrenOfItem:)] pub unsafe fn numberOfChildrenOfItem(&self, item: Option<&Object>) -> NSInteger; + #[method_id(child:ofItem:)] pub unsafe fn child_ofItem( &self, index: NSInteger, item: Option<&Object>, ) -> Option>; + #[method(expandItem:expandChildren:)] pub unsafe fn expandItem_expandChildren(&self, item: Option<&Object>, expandChildren: bool); + #[method(expandItem:)] pub unsafe fn expandItem(&self, item: Option<&Object>); + #[method(collapseItem:collapseChildren:)] pub unsafe fn collapseItem_collapseChildren( &self, item: Option<&Object>, collapseChildren: bool, ); + #[method(collapseItem:)] pub unsafe fn collapseItem(&self, item: Option<&Object>); + #[method(reloadItem:reloadChildren:)] pub unsafe fn reloadItem_reloadChildren(&self, item: Option<&Object>, reloadChildren: bool); + #[method(reloadItem:)] pub unsafe fn reloadItem(&self, item: Option<&Object>); + #[method_id(parentForItem:)] pub unsafe fn parentForItem(&self, item: Option<&Object>) -> Option>; + #[method(childIndexForItem:)] pub unsafe fn childIndexForItem(&self, item: &Object) -> NSInteger; + #[method_id(itemAtRow:)] pub unsafe fn itemAtRow(&self, row: NSInteger) -> Option>; + #[method(rowForItem:)] pub unsafe fn rowForItem(&self, item: Option<&Object>) -> NSInteger; + #[method(levelForItem:)] pub unsafe fn levelForItem(&self, item: Option<&Object>) -> NSInteger; + #[method(levelForRow:)] pub unsafe fn levelForRow(&self, row: NSInteger) -> NSInteger; + #[method(isItemExpanded:)] pub unsafe fn isItemExpanded(&self, item: Option<&Object>) -> bool; + #[method(indentationPerLevel)] pub unsafe fn indentationPerLevel(&self) -> CGFloat; + #[method(setIndentationPerLevel:)] pub unsafe fn setIndentationPerLevel(&self, indentationPerLevel: CGFloat); + #[method(indentationMarkerFollowsCell)] pub unsafe fn indentationMarkerFollowsCell(&self) -> bool; + #[method(setIndentationMarkerFollowsCell:)] pub unsafe fn setIndentationMarkerFollowsCell(&self, indentationMarkerFollowsCell: bool); + #[method(autoresizesOutlineColumn)] pub unsafe fn autoresizesOutlineColumn(&self) -> bool; + #[method(setAutoresizesOutlineColumn:)] pub unsafe fn setAutoresizesOutlineColumn(&self, autoresizesOutlineColumn: bool); + #[method(frameOfOutlineCellAtRow:)] pub unsafe fn frameOfOutlineCellAtRow(&self, row: NSInteger) -> NSRect; + #[method(setDropItem:dropChildIndex:)] pub unsafe fn setDropItem_dropChildIndex(&self, item: Option<&Object>, index: NSInteger); + #[method(shouldCollapseAutoExpandedItemsForDeposited:)] pub unsafe fn shouldCollapseAutoExpandedItemsForDeposited(&self, deposited: bool) -> bool; + #[method(autosaveExpandedItems)] pub unsafe fn autosaveExpandedItems(&self) -> bool; + #[method(setAutosaveExpandedItems:)] pub unsafe fn setAutosaveExpandedItems(&self, autosaveExpandedItems: bool); + #[method(insertItemsAtIndexes:inParent:withAnimation:)] pub unsafe fn insertItemsAtIndexes_inParent_withAnimation( &self, @@ -92,6 +130,7 @@ extern_methods!( parent: Option<&Object>, animationOptions: NSTableViewAnimationOptions, ); + #[method(removeItemsAtIndexes:inParent:withAnimation:)] pub unsafe fn removeItemsAtIndexes_inParent_withAnimation( &self, @@ -99,6 +138,7 @@ extern_methods!( parent: Option<&Object>, animationOptions: NSTableViewAnimationOptions, ); + #[method(moveItemAtIndex:inParent:toIndex:inParent:)] pub unsafe fn moveItemAtIndex_inParent_toIndex_inParent( &self, @@ -107,32 +147,41 @@ extern_methods!( toIndex: NSInteger, newParent: Option<&Object>, ); + #[method(insertRowsAtIndexes:withAnimation:)] pub unsafe fn insertRowsAtIndexes_withAnimation( &self, indexes: &NSIndexSet, animationOptions: NSTableViewAnimationOptions, ); + #[method(removeRowsAtIndexes:withAnimation:)] pub unsafe fn removeRowsAtIndexes_withAnimation( &self, indexes: &NSIndexSet, animationOptions: NSTableViewAnimationOptions, ); + #[method(moveRowAtIndex:toIndex:)] pub unsafe fn moveRowAtIndex_toIndex(&self, oldIndex: NSInteger, newIndex: NSInteger); + #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setUserInterfaceLayoutDirection:)] pub unsafe fn setUserInterfaceLayoutDirection( &self, userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, ); + #[method(stronglyReferencesItems)] pub unsafe fn stronglyReferencesItems(&self) -> bool; + #[method(setStronglyReferencesItems:)] pub unsafe fn setStronglyReferencesItems(&self, stronglyReferencesItems: bool); } ); + pub type NSOutlineViewDataSource = NSObject; + pub type NSOutlineViewDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs index 52e3ac050..ab942ad4f 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPDFImageRep; + unsafe impl ClassType for NSPDFImageRep { type Super = NSImageRep; } ); + extern_methods!( unsafe impl NSPDFImageRep { #[method_id(imageRepWithData:)] pub unsafe fn imageRepWithData(pdfData: &NSData) -> Option>; + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, pdfData: &NSData) -> Option>; + #[method_id(PDFRepresentation)] pub unsafe fn PDFRepresentation(&self) -> Id; + #[method(bounds)] pub unsafe fn bounds(&self) -> NSRect; + #[method(currentPage)] pub unsafe fn currentPage(&self) -> NSInteger; + #[method(setCurrentPage:)] pub unsafe fn setCurrentPage(&self, currentPage: NSInteger); + #[method(pageCount)] pub unsafe fn pageCount(&self) -> NSInteger; } diff --git a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs index 5af9e2771..6eaec1d57 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs @@ -1,36 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPDFInfo; + unsafe impl ClassType for NSPDFInfo { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPDFInfo { #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; + #[method(setURL:)] pub unsafe fn setURL(&self, URL: Option<&NSURL>); + #[method(isFileExtensionHidden)] pub unsafe fn isFileExtensionHidden(&self) -> bool; + #[method(setFileExtensionHidden:)] pub unsafe fn setFileExtensionHidden(&self, fileExtensionHidden: bool); + #[method_id(tagNames)] pub unsafe fn tagNames(&self) -> Id, Shared>; + #[method(setTagNames:)] pub unsafe fn setTagNames(&self, tagNames: &NSArray); + #[method(orientation)] pub unsafe fn orientation(&self) -> NSPaperOrientation; + #[method(setOrientation:)] pub unsafe fn setOrientation(&self, orientation: NSPaperOrientation); + #[method(paperSize)] pub unsafe fn paperSize(&self) -> NSSize; + #[method(setPaperSize:)] pub unsafe fn setPaperSize(&self, paperSize: NSSize); + #[method_id(attributes)] pub unsafe fn attributes( &self, diff --git a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs index 134a31534..1a6d095a8 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs @@ -1,30 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPDFPanel; + unsafe impl ClassType for NSPDFPanel { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPDFPanel { #[method_id(panel)] pub unsafe fn panel() -> Id; + #[method_id(accessoryController)] pub unsafe fn accessoryController(&self) -> Option>; + #[method(setAccessoryController:)] pub unsafe fn setAccessoryController(&self, accessoryController: Option<&NSViewController>); + #[method(options)] pub unsafe fn options(&self) -> NSPDFPanelOptions; + #[method(setOptions:)] pub unsafe fn setOptions(&self, options: NSPDFPanelOptions); + #[method_id(defaultFileName)] pub unsafe fn defaultFileName(&self) -> Id; + #[method(setDefaultFileName:)] pub unsafe fn setDefaultFileName(&self, defaultFileName: &NSString); + #[method(beginSheetWithPDFInfo:modalForWindow:completionHandler:)] pub unsafe fn beginSheetWithPDFInfo_modalForWindow_completionHandler( &self, diff --git a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs index c97ed2c77..74c8e1ce6 100644 --- a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs @@ -1,22 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPICTImageRep; + unsafe impl ClassType for NSPICTImageRep { type Super = NSImageRep; } ); + extern_methods!( unsafe impl NSPICTImageRep { #[method_id(imageRepWithData:)] pub unsafe fn imageRepWithData(pictData: &NSData) -> Option>; + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, pictData: &NSData) -> Option>; + #[method_id(PICTRepresentation)] pub unsafe fn PICTRepresentation(&self) -> Id; + #[method(boundingBox)] pub unsafe fn boundingBox(&self) -> NSRect; } diff --git a/crates/icrate/src/generated/AppKit/NSPageController.rs b/crates/icrate/src/generated/AppKit/NSPageController.rs index 6282fd1c6..8da5436e3 100644 --- a/crates/icrate/src/generated/AppKit/NSPageController.rs +++ b/crates/icrate/src/generated/AppKit/NSPageController.rs @@ -1,45 +1,65 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSPageControllerObjectIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSPageController; + unsafe impl ClassType for NSPageController { type Super = NSViewController; } ); + extern_methods!( unsafe impl NSPageController { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSPageControllerDelegate>); + #[method_id(selectedViewController)] pub unsafe fn selectedViewController(&self) -> Option>; + #[method(transitionStyle)] pub unsafe fn transitionStyle(&self) -> NSPageControllerTransitionStyle; + #[method(setTransitionStyle:)] pub unsafe fn setTransitionStyle(&self, transitionStyle: NSPageControllerTransitionStyle); + #[method_id(arrangedObjects)] pub unsafe fn arrangedObjects(&self) -> Id; + #[method(setArrangedObjects:)] pub unsafe fn setArrangedObjects(&self, arrangedObjects: &NSArray); + #[method(selectedIndex)] pub unsafe fn selectedIndex(&self) -> NSInteger; + #[method(setSelectedIndex:)] pub unsafe fn setSelectedIndex(&self, selectedIndex: NSInteger); + #[method(navigateForwardToObject:)] pub unsafe fn navigateForwardToObject(&self, object: &Object); + #[method(completeTransition)] pub unsafe fn completeTransition(&self); + #[method(navigateBack:)] pub unsafe fn navigateBack(&self, sender: Option<&Object>); + #[method(navigateForward:)] pub unsafe fn navigateForward(&self, sender: Option<&Object>); + #[method(takeSelectedIndexFrom:)] pub unsafe fn takeSelectedIndexFrom(&self, sender: Option<&Object>); } ); + pub type NSPageControllerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPageLayout.rs b/crates/icrate/src/generated/AppKit/NSPageLayout.rs index 405c9d934..65129ff68 100644 --- a/crates/icrate/src/generated/AppKit/NSPageLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSPageLayout.rs @@ -1,24 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPageLayout; + unsafe impl ClassType for NSPageLayout { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPageLayout { #[method_id(pageLayout)] pub unsafe fn pageLayout() -> Id; + #[method(addAccessoryController:)] pub unsafe fn addAccessoryController(&self, accessoryController: &NSViewController); + #[method(removeAccessoryController:)] pub unsafe fn removeAccessoryController(&self, accessoryController: &NSViewController); + #[method_id(accessoryControllers)] pub unsafe fn accessoryControllers(&self) -> Id, Shared>; + #[method(beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo( &self, @@ -28,29 +37,37 @@ extern_methods!( didEndSelector: Option, contextInfo: *mut c_void, ); + #[method(runModalWithPrintInfo:)] pub unsafe fn runModalWithPrintInfo(&self, printInfo: &NSPrintInfo) -> NSInteger; + #[method(runModal)] pub unsafe fn runModal(&self) -> NSInteger; + #[method_id(printInfo)] pub unsafe fn printInfo(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSPageLayout { #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method_id(accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[method(readPrintInfo)] pub unsafe fn readPrintInfo(&self); + #[method(writePrintInfo)] pub unsafe fn writePrintInfo(&self); } ); + extern_methods!( - #[doc = "NSPageLayoutPanel"] + /// NSPageLayoutPanel unsafe impl NSApplication { #[method(runPageLayout:)] pub unsafe fn runPageLayout(&self, sender: Option<&Object>); diff --git a/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs index 5f3391921..33ebc4421 100644 --- a/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPanGestureRecognizer; + unsafe impl ClassType for NSPanGestureRecognizer { type Super = NSGestureRecognizer; } ); + extern_methods!( unsafe impl NSPanGestureRecognizer { #[method(buttonMask)] pub unsafe fn buttonMask(&self) -> NSUInteger; + #[method(setButtonMask:)] pub unsafe fn setButtonMask(&self, buttonMask: NSUInteger); + #[method(translationInView:)] pub unsafe fn translationInView(&self, view: Option<&NSView>) -> NSPoint; + #[method(setTranslation:inView:)] pub unsafe fn setTranslation_inView(&self, translation: NSPoint, view: Option<&NSView>); + #[method(velocityInView:)] pub unsafe fn velocityInView(&self, view: Option<&NSView>) -> NSPoint; + #[method(numberOfTouchesRequired)] pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger; + #[method(setNumberOfTouchesRequired:)] pub unsafe fn setNumberOfTouchesRequired(&self, numberOfTouchesRequired: NSInteger); } diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index fe4d1bf21..a5b9656dd 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -1,26 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPanel; + unsafe impl ClassType for NSPanel { type Super = NSWindow; } ); + extern_methods!( unsafe impl NSPanel { #[method(isFloatingPanel)] pub unsafe fn isFloatingPanel(&self) -> bool; + #[method(setFloatingPanel:)] pub unsafe fn setFloatingPanel(&self, floatingPanel: bool); + #[method(becomesKeyOnlyIfNeeded)] pub unsafe fn becomesKeyOnlyIfNeeded(&self) -> bool; + #[method(setBecomesKeyOnlyIfNeeded:)] pub unsafe fn setBecomesKeyOnlyIfNeeded(&self, becomesKeyOnlyIfNeeded: bool); + #[method(worksWhenModal)] pub unsafe fn worksWhenModal(&self) -> bool; + #[method(setWorksWhenModal:)] pub unsafe fn setWorksWhenModal(&self, worksWhenModal: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index a78c10d45..38e427ab6 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -1,21 +1,28 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextTabOptionKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSTextTab; + unsafe impl ClassType for NSTextTab { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextTab { #[method_id(columnTerminatorsForLocale:)] pub unsafe fn columnTerminatorsForLocale( aLocale: Option<&NSLocale>, ) -> Id; + #[method_id(initWithTextAlignment:location:options:)] pub unsafe fn initWithTextAlignment_location_options( &self, @@ -23,188 +30,267 @@ extern_methods!( loc: CGFloat, options: &NSDictionary, ) -> Id; + #[method(alignment)] pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(location)] pub unsafe fn location(&self) -> CGFloat; + #[method_id(options)] pub unsafe fn options(&self) -> Id, Shared>; } ); + extern_class!( #[derive(Debug)] pub struct NSParagraphStyle; + unsafe impl ClassType for NSParagraphStyle { type Super = NSObject; } ); + extern_methods!( unsafe impl NSParagraphStyle { #[method_id(defaultParagraphStyle)] pub unsafe fn defaultParagraphStyle() -> Id; + #[method(defaultWritingDirectionForLanguage:)] pub unsafe fn defaultWritingDirectionForLanguage( languageName: Option<&NSString>, ) -> NSWritingDirection; + #[method(lineSpacing)] pub unsafe fn lineSpacing(&self) -> CGFloat; + #[method(paragraphSpacing)] pub unsafe fn paragraphSpacing(&self) -> CGFloat; + #[method(alignment)] pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(headIndent)] pub unsafe fn headIndent(&self) -> CGFloat; + #[method(tailIndent)] pub unsafe fn tailIndent(&self) -> CGFloat; + #[method(firstLineHeadIndent)] pub unsafe fn firstLineHeadIndent(&self) -> CGFloat; + #[method(minimumLineHeight)] pub unsafe fn minimumLineHeight(&self) -> CGFloat; + #[method(maximumLineHeight)] pub unsafe fn maximumLineHeight(&self) -> CGFloat; + #[method(lineBreakMode)] pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[method(baseWritingDirection)] pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[method(lineHeightMultiple)] pub unsafe fn lineHeightMultiple(&self) -> CGFloat; + #[method(paragraphSpacingBefore)] pub unsafe fn paragraphSpacingBefore(&self) -> CGFloat; + #[method(hyphenationFactor)] pub unsafe fn hyphenationFactor(&self) -> c_float; + #[method(usesDefaultHyphenation)] pub unsafe fn usesDefaultHyphenation(&self) -> bool; + #[method_id(tabStops)] pub unsafe fn tabStops(&self) -> Id, Shared>; + #[method(defaultTabInterval)] pub unsafe fn defaultTabInterval(&self) -> CGFloat; + #[method(allowsDefaultTighteningForTruncation)] pub unsafe fn allowsDefaultTighteningForTruncation(&self) -> bool; + #[method(tighteningFactorForTruncation)] pub unsafe fn tighteningFactorForTruncation(&self) -> c_float; + #[method_id(textBlocks)] pub unsafe fn textBlocks(&self) -> Id, Shared>; + #[method_id(textLists)] pub unsafe fn textLists(&self) -> Id, Shared>; + #[method(headerLevel)] pub unsafe fn headerLevel(&self) -> NSInteger; + #[method(lineBreakStrategy)] pub unsafe fn lineBreakStrategy(&self) -> NSLineBreakStrategy; } ); + extern_class!( #[derive(Debug)] pub struct NSMutableParagraphStyle; + unsafe impl ClassType for NSMutableParagraphStyle { type Super = NSParagraphStyle; } ); + extern_methods!( unsafe impl NSMutableParagraphStyle { #[method(lineSpacing)] pub unsafe fn lineSpacing(&self) -> CGFloat; + #[method(setLineSpacing:)] pub unsafe fn setLineSpacing(&self, lineSpacing: CGFloat); + #[method(paragraphSpacing)] pub unsafe fn paragraphSpacing(&self) -> CGFloat; + #[method(setParagraphSpacing:)] pub unsafe fn setParagraphSpacing(&self, paragraphSpacing: CGFloat); + #[method(alignment)] pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(setAlignment:)] pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[method(firstLineHeadIndent)] pub unsafe fn firstLineHeadIndent(&self) -> CGFloat; + #[method(setFirstLineHeadIndent:)] pub unsafe fn setFirstLineHeadIndent(&self, firstLineHeadIndent: CGFloat); + #[method(headIndent)] pub unsafe fn headIndent(&self) -> CGFloat; + #[method(setHeadIndent:)] pub unsafe fn setHeadIndent(&self, headIndent: CGFloat); + #[method(tailIndent)] pub unsafe fn tailIndent(&self) -> CGFloat; + #[method(setTailIndent:)] pub unsafe fn setTailIndent(&self, tailIndent: CGFloat); + #[method(lineBreakMode)] pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[method(setLineBreakMode:)] pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode); + #[method(minimumLineHeight)] pub unsafe fn minimumLineHeight(&self) -> CGFloat; + #[method(setMinimumLineHeight:)] pub unsafe fn setMinimumLineHeight(&self, minimumLineHeight: CGFloat); + #[method(maximumLineHeight)] pub unsafe fn maximumLineHeight(&self) -> CGFloat; + #[method(setMaximumLineHeight:)] pub unsafe fn setMaximumLineHeight(&self, maximumLineHeight: CGFloat); + #[method(baseWritingDirection)] pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[method(setBaseWritingDirection:)] pub unsafe fn setBaseWritingDirection(&self, baseWritingDirection: NSWritingDirection); + #[method(lineHeightMultiple)] pub unsafe fn lineHeightMultiple(&self) -> CGFloat; + #[method(setLineHeightMultiple:)] pub unsafe fn setLineHeightMultiple(&self, lineHeightMultiple: CGFloat); + #[method(paragraphSpacingBefore)] pub unsafe fn paragraphSpacingBefore(&self) -> CGFloat; + #[method(setParagraphSpacingBefore:)] pub unsafe fn setParagraphSpacingBefore(&self, paragraphSpacingBefore: CGFloat); + #[method(hyphenationFactor)] pub unsafe fn hyphenationFactor(&self) -> c_float; + #[method(setHyphenationFactor:)] pub unsafe fn setHyphenationFactor(&self, hyphenationFactor: c_float); + #[method(usesDefaultHyphenation)] pub unsafe fn usesDefaultHyphenation(&self) -> bool; + #[method(setUsesDefaultHyphenation:)] pub unsafe fn setUsesDefaultHyphenation(&self, usesDefaultHyphenation: bool); + #[method_id(tabStops)] pub unsafe fn tabStops(&self) -> Id, Shared>; + #[method(setTabStops:)] pub unsafe fn setTabStops(&self, tabStops: Option<&NSArray>); + #[method(defaultTabInterval)] pub unsafe fn defaultTabInterval(&self) -> CGFloat; + #[method(setDefaultTabInterval:)] pub unsafe fn setDefaultTabInterval(&self, defaultTabInterval: CGFloat); + #[method(allowsDefaultTighteningForTruncation)] pub unsafe fn allowsDefaultTighteningForTruncation(&self) -> bool; + #[method(setAllowsDefaultTighteningForTruncation:)] pub unsafe fn setAllowsDefaultTighteningForTruncation( &self, allowsDefaultTighteningForTruncation: bool, ); + #[method(addTabStop:)] pub unsafe fn addTabStop(&self, anObject: &NSTextTab); + #[method(removeTabStop:)] pub unsafe fn removeTabStop(&self, anObject: &NSTextTab); + #[method(setParagraphStyle:)] pub unsafe fn setParagraphStyle(&self, obj: &NSParagraphStyle); + #[method(tighteningFactorForTruncation)] pub unsafe fn tighteningFactorForTruncation(&self) -> c_float; + #[method(setTighteningFactorForTruncation:)] pub unsafe fn setTighteningFactorForTruncation( &self, tighteningFactorForTruncation: c_float, ); + #[method_id(textBlocks)] pub unsafe fn textBlocks(&self) -> Id, Shared>; + #[method(setTextBlocks:)] pub unsafe fn setTextBlocks(&self, textBlocks: &NSArray); + #[method_id(textLists)] pub unsafe fn textLists(&self) -> Id, Shared>; + #[method(setTextLists:)] pub unsafe fn setTextLists(&self, textLists: &NSArray); + #[method(headerLevel)] pub unsafe fn headerLevel(&self) -> NSInteger; + #[method(setHeaderLevel:)] pub unsafe fn setHeaderLevel(&self, headerLevel: NSInteger); + #[method(lineBreakStrategy)] pub unsafe fn lineBreakStrategy(&self) -> NSLineBreakStrategy; + #[method(setLineBreakStrategy:)] pub unsafe fn setLineBreakStrategy(&self, lineBreakStrategy: NSLineBreakStrategy); } ); + extern_methods!( - #[doc = "NSTextTabDeprecated"] + /// NSTextTabDeprecated unsafe impl NSTextTab { #[method_id(initWithType:location:)] pub unsafe fn initWithType_location( @@ -212,6 +298,7 @@ extern_methods!( type_: NSTextTabType, loc: CGFloat, ) -> Id; + #[method(tabStopType)] pub unsafe fn tabStopType(&self) -> NSTextTabType; } diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index d8ec42be5..1179f08ef 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -1,105 +1,135 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSPasteboardType = NSString; + pub type NSPasteboardName = NSString; + pub type NSPasteboardReadingOptionKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSPasteboard; + unsafe impl ClassType for NSPasteboard { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPasteboard { #[method_id(generalPasteboard)] pub unsafe fn generalPasteboard() -> Id; + #[method_id(pasteboardWithName:)] pub unsafe fn pasteboardWithName(name: &NSPasteboardName) -> Id; + #[method_id(pasteboardWithUniqueName)] pub unsafe fn pasteboardWithUniqueName() -> Id; + #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method(changeCount)] pub unsafe fn changeCount(&self) -> NSInteger; + #[method(prepareForNewContentsWithOptions:)] pub unsafe fn prepareForNewContentsWithOptions( &self, options: NSPasteboardContentsOptions, ) -> NSInteger; + #[method(clearContents)] pub unsafe fn clearContents(&self) -> NSInteger; + #[method(writeObjects:)] pub unsafe fn writeObjects(&self, objects: &NSArray) -> bool; + #[method_id(readObjectsForClasses:options:)] pub unsafe fn readObjectsForClasses_options( &self, classArray: &NSArray, options: Option<&NSDictionary>, ) -> Option>; + #[method_id(pasteboardItems)] pub unsafe fn pasteboardItems(&self) -> Option, Shared>>; + #[method(indexOfPasteboardItem:)] pub unsafe fn indexOfPasteboardItem(&self, pasteboardItem: &NSPasteboardItem) -> NSUInteger; + #[method(canReadItemWithDataConformingToTypes:)] pub unsafe fn canReadItemWithDataConformingToTypes( &self, types: &NSArray, ) -> bool; + #[method(canReadObjectForClasses:options:)] pub unsafe fn canReadObjectForClasses_options( &self, classArray: &NSArray, options: Option<&NSDictionary>, ) -> bool; + #[method(declareTypes:owner:)] pub unsafe fn declareTypes_owner( &self, newTypes: &NSArray, newOwner: Option<&Object>, ) -> NSInteger; + #[method(addTypes:owner:)] pub unsafe fn addTypes_owner( &self, newTypes: &NSArray, newOwner: Option<&Object>, ) -> NSInteger; + #[method_id(types)] pub unsafe fn types(&self) -> Option, Shared>>; + #[method_id(availableTypeFromArray:)] pub unsafe fn availableTypeFromArray( &self, types: &NSArray, ) -> Option>; + #[method(setData:forType:)] pub unsafe fn setData_forType( &self, data: Option<&NSData>, dataType: &NSPasteboardType, ) -> bool; + #[method(setPropertyList:forType:)] pub unsafe fn setPropertyList_forType( &self, plist: &Object, dataType: &NSPasteboardType, ) -> bool; + #[method(setString:forType:)] pub unsafe fn setString_forType( &self, string: &NSString, dataType: &NSPasteboardType, ) -> bool; + #[method_id(dataForType:)] pub unsafe fn dataForType(&self, dataType: &NSPasteboardType) -> Option>; + #[method_id(propertyListForType:)] pub unsafe fn propertyListForType( &self, dataType: &NSPasteboardType, ) -> Option>; + #[method_id(stringForType:)] pub unsafe fn stringForType( &self, @@ -107,29 +137,35 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "FilterServices"] + /// FilterServices unsafe impl NSPasteboard { #[method_id(typesFilterableTo:)] pub unsafe fn typesFilterableTo( type_: &NSPasteboardType, ) -> Id, Shared>; + #[method_id(pasteboardByFilteringFile:)] pub unsafe fn pasteboardByFilteringFile(filename: &NSString) -> Id; + #[method_id(pasteboardByFilteringData:ofType:)] pub unsafe fn pasteboardByFilteringData_ofType( data: &NSData, type_: &NSPasteboardType, ) -> Id; + #[method_id(pasteboardByFilteringTypesInPasteboard:)] pub unsafe fn pasteboardByFilteringTypesInPasteboard( pboard: &NSPasteboard, ) -> Id; } ); + pub type NSPasteboardTypeOwner = NSObject; + extern_methods!( - #[doc = "NSPasteboardOwner"] + /// NSPasteboardOwner unsafe impl NSObject { #[method(pasteboard:provideDataForType:)] pub unsafe fn pasteboard_provideDataForType( @@ -137,38 +173,48 @@ extern_methods!( sender: &NSPasteboard, type_: &NSPasteboardType, ); + #[method(pasteboardChangedOwner:)] pub unsafe fn pasteboardChangedOwner(&self, sender: &NSPasteboard); } ); + pub type NSPasteboardWriting = NSObject; + pub type NSPasteboardReading = NSObject; + extern_methods!( - #[doc = "NSPasteboardSupport"] + /// NSPasteboardSupport unsafe impl NSURL { #[method_id(URLFromPasteboard:)] pub unsafe fn URLFromPasteboard(pasteBoard: &NSPasteboard) -> Option>; + #[method(writeToPasteboard:)] pub unsafe fn writeToPasteboard(&self, pasteBoard: &NSPasteboard); } ); + extern_methods!( - #[doc = "NSPasteboardSupport"] + /// NSPasteboardSupport unsafe impl NSString {} ); + extern_methods!( - #[doc = "NSFileContents"] + /// NSFileContents unsafe impl NSPasteboard { #[method(writeFileContents:)] pub unsafe fn writeFileContents(&self, filename: &NSString) -> bool; + #[method_id(readFileContentsType:toFile:)] pub unsafe fn readFileContentsType_toFile( &self, type_: Option<&NSPasteboardType>, filename: &NSString, ) -> Option>; + #[method(writeFileWrapper:)] pub unsafe fn writeFileWrapper(&self, wrapper: &NSFileWrapper) -> bool; + #[method_id(readFileWrapper)] pub unsafe fn readFileWrapper(&self) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs index a47d8d07b..9a3e5703f 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs @@ -1,47 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPasteboardItem; + unsafe impl ClassType for NSPasteboardItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPasteboardItem { #[method_id(types)] pub unsafe fn types(&self) -> Id, Shared>; + #[method_id(availableTypeFromArray:)] pub unsafe fn availableTypeFromArray( &self, types: &NSArray, ) -> Option>; + #[method(setDataProvider:forTypes:)] pub unsafe fn setDataProvider_forTypes( &self, dataProvider: &NSPasteboardItemDataProvider, types: &NSArray, ) -> bool; + #[method(setData:forType:)] pub unsafe fn setData_forType(&self, data: &NSData, type_: &NSPasteboardType) -> bool; + #[method(setString:forType:)] pub unsafe fn setString_forType(&self, string: &NSString, type_: &NSPasteboardType) -> bool; + #[method(setPropertyList:forType:)] pub unsafe fn setPropertyList_forType( &self, propertyList: &Object, type_: &NSPasteboardType, ) -> bool; + #[method_id(dataForType:)] pub unsafe fn dataForType(&self, type_: &NSPasteboardType) -> Option>; + #[method_id(stringForType:)] pub unsafe fn stringForType( &self, type_: &NSPasteboardType, ) -> Option>; + #[method_id(propertyListForType:)] pub unsafe fn propertyListForType( &self, @@ -49,4 +62,5 @@ extern_methods!( ) -> Option>; } ); + pub type NSPasteboardItemDataProvider = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs index 72aaf5742..7403d700a 100644 --- a/crates/icrate/src/generated/AppKit/NSPathCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -1,43 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPathCell; + unsafe impl ClassType for NSPathCell { type Super = NSActionCell; } ); + extern_methods!( unsafe impl NSPathCell { #[method(pathStyle)] pub unsafe fn pathStyle(&self) -> NSPathStyle; + #[method(setPathStyle:)] pub unsafe fn setPathStyle(&self, pathStyle: NSPathStyle); + #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; + #[method(setURL:)] pub unsafe fn setURL(&self, URL: Option<&NSURL>); + #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, obj: Option<&NSCopying>); + #[method_id(allowedTypes)] pub unsafe fn allowedTypes(&self) -> Option, Shared>>; + #[method(setAllowedTypes:)] pub unsafe fn setAllowedTypes(&self, allowedTypes: Option<&NSArray>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSPathCellDelegate>); + #[method(pathComponentCellClass)] pub unsafe fn pathComponentCellClass() -> &Class; + #[method_id(pathComponentCells)] pub unsafe fn pathComponentCells(&self) -> Id, Shared>; + #[method(setPathComponentCells:)] pub unsafe fn setPathComponentCells( &self, pathComponentCells: &NSArray, ); + #[method(rectOfPathComponentCell:withFrame:inView:)] pub unsafe fn rectOfPathComponentCell_withFrame_inView( &self, @@ -45,6 +62,7 @@ extern_methods!( frame: NSRect, view: &NSView, ) -> NSRect; + #[method_id(pathComponentCellAtPoint:withFrame:inView:)] pub unsafe fn pathComponentCellAtPoint_withFrame_inView( &self, @@ -52,8 +70,10 @@ extern_methods!( frame: NSRect, view: &NSView, ) -> Option>; + #[method_id(clickedPathComponentCell)] pub unsafe fn clickedPathComponentCell(&self) -> Option>; + #[method(mouseEntered:withFrame:inView:)] pub unsafe fn mouseEntered_withFrame_inView( &self, @@ -61,6 +81,7 @@ extern_methods!( frame: NSRect, view: &NSView, ); + #[method(mouseExited:withFrame:inView:)] pub unsafe fn mouseExited_withFrame_inView( &self, @@ -68,20 +89,28 @@ extern_methods!( frame: NSRect, view: &NSView, ); + #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method_id(placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; + #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); + #[method_id(placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; + #[method(setPlaceholderAttributedString:)] pub unsafe fn setPlaceholderAttributedString( &self, @@ -89,4 +118,5 @@ extern_methods!( ); } ); + pub type NSPathCellDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs index 9d63a3567..72fc29e23 100644 --- a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs @@ -1,22 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPathComponentCell; + unsafe impl ClassType for NSPathComponentCell { type Super = NSTextFieldCell; } ); + extern_methods!( unsafe impl NSPathComponentCell { #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; + #[method(setURL:)] pub unsafe fn setURL(&self, URL: Option<&NSURL>); } diff --git a/crates/icrate/src/generated/AppKit/NSPathControl.rs b/crates/icrate/src/generated/AppKit/NSPathControl.rs index dfcbd9c6a..6e394e80f 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControl.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControl.rs @@ -1,81 +1,113 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPathControl; + unsafe impl ClassType for NSPathControl { type Super = NSControl; } ); + extern_methods!( unsafe impl NSPathControl { #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[method_id(allowedTypes)] pub unsafe fn allowedTypes(&self) -> Option, Shared>>; + #[method(setAllowedTypes:)] pub unsafe fn setAllowedTypes(&self, allowedTypes: Option<&NSArray>); + #[method_id(placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; + #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); + #[method_id(placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; + #[method(setPlaceholderAttributedString:)] pub unsafe fn setPlaceholderAttributedString( &self, placeholderAttributedString: Option<&NSAttributedString>, ); + #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; + #[method(setURL:)] pub unsafe fn setURL(&self, URL: Option<&NSURL>); + #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method(pathStyle)] pub unsafe fn pathStyle(&self) -> NSPathStyle; + #[method(setPathStyle:)] pub unsafe fn setPathStyle(&self, pathStyle: NSPathStyle); + #[method_id(clickedPathItem)] pub unsafe fn clickedPathItem(&self) -> Option>; + #[method_id(pathItems)] pub unsafe fn pathItems(&self) -> Id, Shared>; + #[method(setPathItems:)] pub unsafe fn setPathItems(&self, pathItems: &NSArray); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSPathControlDelegate>); + #[method(setDraggingSourceOperationMask:forLocal:)] pub unsafe fn setDraggingSourceOperationMask_forLocal( &self, mask: NSDragOperation, isLocal: bool, ); + #[method_id(menu)] pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); } ); + pub type NSPathControlDelegate = NSObject; + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSPathControl { #[method_id(clickedPathComponentCell)] pub unsafe fn clickedPathComponentCell(&self) -> Option>; + #[method_id(pathComponentCells)] pub unsafe fn pathComponentCells(&self) -> Id, Shared>; + #[method(setPathComponentCells:)] pub unsafe fn setPathComponentCells(&self, cells: &NSArray); } diff --git a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs index 0eca894c3..8356d4c0e 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPathControlItem; + unsafe impl ClassType for NSPathControlItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPathControlItem { #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; + #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs index 05b46c565..9ed6de977 100644 --- a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs @@ -1,25 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPersistentDocument; + unsafe impl ClassType for NSPersistentDocument { type Super = NSDocument; } ); + extern_methods!( unsafe impl NSPersistentDocument { #[method_id(managedObjectContext)] pub unsafe fn managedObjectContext(&self) -> Option>; + #[method(setManagedObjectContext:)] pub unsafe fn setManagedObjectContext( &self, managedObjectContext: Option<&NSManagedObjectContext>, ); + #[method_id(managedObjectModel)] pub unsafe fn managedObjectModel(&self) -> Option>; + #[method(configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:)] pub unsafe fn configurePersistentStoreCoordinatorForURL_ofType_modelConfiguration_storeOptions_error( &self, @@ -28,11 +36,13 @@ extern_methods!( configuration: Option<&NSString>, storeOptions: Option<&NSDictionary>, ) -> Result<(), Id>; + #[method_id(persistentStoreTypeForFileType:)] pub unsafe fn persistentStoreTypeForFileType( &self, fileType: &NSString, ) -> Id; + #[method(writeToURL:ofType:forSaveOperation:originalContentsURL:error:)] pub unsafe fn writeToURL_ofType_forSaveOperation_originalContentsURL_error( &self, @@ -41,12 +51,14 @@ extern_methods!( saveOperation: NSSaveOperationType, absoluteOriginalContentsURL: Option<&NSURL>, ) -> Result<(), Id>; + #[method(readFromURL:ofType:error:)] pub unsafe fn readFromURL_ofType_error( &self, absoluteURL: &NSURL, typeName: &NSString, ) -> Result<(), Id>; + #[method(revertToContentsOfURL:ofType:error:)] pub unsafe fn revertToContentsOfURL_ofType_error( &self, @@ -55,8 +67,9 @@ extern_methods!( ) -> Result<(), Id>; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSPersistentDocument { #[method(configurePersistentStoreCoordinatorForURL:ofType:error:)] pub unsafe fn configurePersistentStoreCoordinatorForURL_ofType_error( diff --git a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs index 940c88602..d0539ed69 100644 --- a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPickerTouchBarItem; + unsafe impl ClassType for NSPickerTouchBarItem { type Super = NSTouchBarItem; } ); + extern_methods!( unsafe impl NSPickerTouchBarItem { #[method_id(pickerTouchBarItemWithIdentifier:labels:selectionMode:target:action:)] @@ -19,6 +24,7 @@ extern_methods!( target: Option<&Object>, action: Option, ) -> Id; + #[method_id(pickerTouchBarItemWithIdentifier:images:selectionMode:target:action:)] pub unsafe fn pickerTouchBarItemWithIdentifier_images_selectionMode_target_action( identifier: &NSTouchBarItemIdentifier, @@ -27,69 +33,97 @@ extern_methods!( target: Option<&Object>, action: Option, ) -> Id; + #[method(controlRepresentation)] pub unsafe fn controlRepresentation(&self) -> NSPickerTouchBarItemControlRepresentation; + #[method(setControlRepresentation:)] pub unsafe fn setControlRepresentation( &self, controlRepresentation: NSPickerTouchBarItemControlRepresentation, ); + #[method_id(collapsedRepresentationLabel)] pub unsafe fn collapsedRepresentationLabel(&self) -> Id; + #[method(setCollapsedRepresentationLabel:)] pub unsafe fn setCollapsedRepresentationLabel( &self, collapsedRepresentationLabel: &NSString, ); + #[method_id(collapsedRepresentationImage)] pub unsafe fn collapsedRepresentationImage(&self) -> Option>; + #[method(setCollapsedRepresentationImage:)] pub unsafe fn setCollapsedRepresentationImage( &self, collapsedRepresentationImage: Option<&NSImage>, ); + #[method(selectedIndex)] pub unsafe fn selectedIndex(&self) -> NSInteger; + #[method(setSelectedIndex:)] pub unsafe fn setSelectedIndex(&self, selectedIndex: NSInteger); + #[method_id(selectionColor)] pub unsafe fn selectionColor(&self) -> Option>; + #[method(setSelectionColor:)] pub unsafe fn setSelectionColor(&self, selectionColor: Option<&NSColor>); + #[method(selectionMode)] pub unsafe fn selectionMode(&self) -> NSPickerTouchBarItemSelectionMode; + #[method(setSelectionMode:)] pub unsafe fn setSelectionMode(&self, selectionMode: NSPickerTouchBarItemSelectionMode); + #[method(numberOfOptions)] pub unsafe fn numberOfOptions(&self) -> NSInteger; + #[method(setNumberOfOptions:)] pub unsafe fn setNumberOfOptions(&self, numberOfOptions: NSInteger); + #[method(setImage:atIndex:)] pub unsafe fn setImage_atIndex(&self, image: Option<&NSImage>, index: NSInteger); + #[method_id(imageAtIndex:)] pub unsafe fn imageAtIndex(&self, index: NSInteger) -> Option>; + #[method(setLabel:atIndex:)] pub unsafe fn setLabel_atIndex(&self, label: &NSString, index: NSInteger); + #[method_id(labelAtIndex:)] pub unsafe fn labelAtIndex(&self, index: NSInteger) -> Option>; + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method(setEnabled:atIndex:)] pub unsafe fn setEnabled_atIndex(&self, enabled: bool, index: NSInteger); + #[method(isEnabledAtIndex:)] pub unsafe fn isEnabledAtIndex(&self, index: NSInteger) -> bool; + #[method_id(customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); } diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs index 7eb9dbd8a..0740c2721 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPopUpButton; + unsafe impl ClassType for NSPopUpButton { type Super = NSButton; } ); + extern_methods!( unsafe impl NSPopUpButton { #[method_id(initWithFrame:pullsDown:)] @@ -17,80 +22,116 @@ extern_methods!( buttonFrame: NSRect, flag: bool, ) -> Id; + #[method_id(menu)] pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method(pullsDown)] pub unsafe fn pullsDown(&self) -> bool; + #[method(setPullsDown:)] pub unsafe fn setPullsDown(&self, pullsDown: bool); + #[method(autoenablesItems)] pub unsafe fn autoenablesItems(&self) -> bool; + #[method(setAutoenablesItems:)] pub unsafe fn setAutoenablesItems(&self, autoenablesItems: bool); + #[method(preferredEdge)] pub unsafe fn preferredEdge(&self) -> NSRectEdge; + #[method(setPreferredEdge:)] pub unsafe fn setPreferredEdge(&self, preferredEdge: NSRectEdge); + #[method(addItemWithTitle:)] pub unsafe fn addItemWithTitle(&self, title: &NSString); + #[method(addItemsWithTitles:)] pub unsafe fn addItemsWithTitles(&self, itemTitles: &NSArray); + #[method(insertItemWithTitle:atIndex:)] pub unsafe fn insertItemWithTitle_atIndex(&self, title: &NSString, index: NSInteger); + #[method(removeItemWithTitle:)] pub unsafe fn removeItemWithTitle(&self, title: &NSString); + #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); + #[method_id(itemArray)] pub unsafe fn itemArray(&self) -> Id, Shared>; + #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(indexOfItem:)] pub unsafe fn indexOfItem(&self, item: &NSMenuItem) -> NSInteger; + #[method(indexOfItemWithTitle:)] pub unsafe fn indexOfItemWithTitle(&self, title: &NSString) -> NSInteger; + #[method(indexOfItemWithTag:)] pub unsafe fn indexOfItemWithTag(&self, tag: NSInteger) -> NSInteger; + #[method(indexOfItemWithRepresentedObject:)] pub unsafe fn indexOfItemWithRepresentedObject(&self, obj: Option<&Object>) -> NSInteger; + #[method(indexOfItemWithTarget:andAction:)] pub unsafe fn indexOfItemWithTarget_andAction( &self, target: Option<&Object>, actionSelector: Option, ) -> NSInteger; + #[method_id(itemAtIndex:)] pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; + #[method_id(itemWithTitle:)] pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; + #[method_id(lastItem)] pub unsafe fn lastItem(&self) -> Option>; + #[method(selectItem:)] pub unsafe fn selectItem(&self, item: Option<&NSMenuItem>); + #[method(selectItemAtIndex:)] pub unsafe fn selectItemAtIndex(&self, index: NSInteger); + #[method(selectItemWithTitle:)] pub unsafe fn selectItemWithTitle(&self, title: &NSString); + #[method(selectItemWithTag:)] pub unsafe fn selectItemWithTag(&self, tag: NSInteger) -> bool; + #[method(setTitle:)] pub unsafe fn setTitle(&self, string: &NSString); + #[method_id(selectedItem)] pub unsafe fn selectedItem(&self) -> Option>; + #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(selectedTag)] pub unsafe fn selectedTag(&self) -> NSInteger; + #[method(synchronizeTitleAndSelectedItem)] pub unsafe fn synchronizeTitleAndSelectedItem(&self); + #[method_id(itemTitleAtIndex:)] pub unsafe fn itemTitleAtIndex(&self, index: NSInteger) -> Id; + #[method_id(itemTitles)] pub unsafe fn itemTitles(&self) -> Id, Shared>; + #[method_id(titleOfSelectedItem)] pub unsafe fn titleOfSelectedItem(&self) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index 522a14447..8bbcb63bc 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPopUpButtonCell; + unsafe impl ClassType for NSPopUpButtonCell { type Super = NSMenuItemCell; } ); + extern_methods!( unsafe impl NSPopUpButtonCell { #[method_id(initTextCell:pullsDown:)] @@ -17,98 +22,143 @@ extern_methods!( stringValue: &NSString, pullDown: bool, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(menu)] pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method(pullsDown)] pub unsafe fn pullsDown(&self) -> bool; + #[method(setPullsDown:)] pub unsafe fn setPullsDown(&self, pullsDown: bool); + #[method(autoenablesItems)] pub unsafe fn autoenablesItems(&self) -> bool; + #[method(setAutoenablesItems:)] pub unsafe fn setAutoenablesItems(&self, autoenablesItems: bool); + #[method(preferredEdge)] pub unsafe fn preferredEdge(&self) -> NSRectEdge; + #[method(setPreferredEdge:)] pub unsafe fn setPreferredEdge(&self, preferredEdge: NSRectEdge); + #[method(usesItemFromMenu)] pub unsafe fn usesItemFromMenu(&self) -> bool; + #[method(setUsesItemFromMenu:)] pub unsafe fn setUsesItemFromMenu(&self, usesItemFromMenu: bool); + #[method(altersStateOfSelectedItem)] pub unsafe fn altersStateOfSelectedItem(&self) -> bool; + #[method(setAltersStateOfSelectedItem:)] pub unsafe fn setAltersStateOfSelectedItem(&self, altersStateOfSelectedItem: bool); + #[method(addItemWithTitle:)] pub unsafe fn addItemWithTitle(&self, title: &NSString); + #[method(addItemsWithTitles:)] pub unsafe fn addItemsWithTitles(&self, itemTitles: &NSArray); + #[method(insertItemWithTitle:atIndex:)] pub unsafe fn insertItemWithTitle_atIndex(&self, title: &NSString, index: NSInteger); + #[method(removeItemWithTitle:)] pub unsafe fn removeItemWithTitle(&self, title: &NSString); + #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); + #[method_id(itemArray)] pub unsafe fn itemArray(&self) -> Id, Shared>; + #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(indexOfItem:)] pub unsafe fn indexOfItem(&self, item: &NSMenuItem) -> NSInteger; + #[method(indexOfItemWithTitle:)] pub unsafe fn indexOfItemWithTitle(&self, title: &NSString) -> NSInteger; + #[method(indexOfItemWithTag:)] pub unsafe fn indexOfItemWithTag(&self, tag: NSInteger) -> NSInteger; + #[method(indexOfItemWithRepresentedObject:)] pub unsafe fn indexOfItemWithRepresentedObject(&self, obj: Option<&Object>) -> NSInteger; + #[method(indexOfItemWithTarget:andAction:)] pub unsafe fn indexOfItemWithTarget_andAction( &self, target: Option<&Object>, actionSelector: Option, ) -> NSInteger; + #[method_id(itemAtIndex:)] pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; + #[method_id(itemWithTitle:)] pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; + #[method_id(lastItem)] pub unsafe fn lastItem(&self) -> Option>; + #[method(selectItem:)] pub unsafe fn selectItem(&self, item: Option<&NSMenuItem>); + #[method(selectItemAtIndex:)] pub unsafe fn selectItemAtIndex(&self, index: NSInteger); + #[method(selectItemWithTitle:)] pub unsafe fn selectItemWithTitle(&self, title: &NSString); + #[method(selectItemWithTag:)] pub unsafe fn selectItemWithTag(&self, tag: NSInteger) -> bool; + #[method(setTitle:)] pub unsafe fn setTitle(&self, string: Option<&NSString>); + #[method_id(selectedItem)] pub unsafe fn selectedItem(&self) -> Option>; + #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(synchronizeTitleAndSelectedItem)] pub unsafe fn synchronizeTitleAndSelectedItem(&self); + #[method_id(itemTitleAtIndex:)] pub unsafe fn itemTitleAtIndex(&self, index: NSInteger) -> Id; + #[method_id(itemTitles)] pub unsafe fn itemTitles(&self) -> Id, Shared>; + #[method_id(titleOfSelectedItem)] pub unsafe fn titleOfSelectedItem(&self) -> Option>; + #[method(attachPopUpWithFrame:inView:)] pub unsafe fn attachPopUpWithFrame_inView(&self, cellFrame: NSRect, controlView: &NSView); + #[method(dismissPopUp)] pub unsafe fn dismissPopUp(&self); + #[method(performClickWithFrame:inView:)] pub unsafe fn performClickWithFrame_inView(&self, frame: NSRect, controlView: &NSView); + #[method(arrowPosition)] pub unsafe fn arrowPosition(&self) -> NSPopUpArrowPosition; + #[method(setArrowPosition:)] pub unsafe fn setArrowPosition(&self, arrowPosition: NSPopUpArrowPosition); } diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index 4f4e65c46..c89ef839c 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -1,55 +1,78 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPopover; + unsafe impl ClassType for NSPopover { type Super = NSResponder; } ); + extern_methods!( unsafe impl NSPopover { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSPopoverDelegate>); + #[method(appearance)] pub unsafe fn appearance(&self) -> NSPopoverAppearance; + #[method(setAppearance:)] pub unsafe fn setAppearance(&self, appearance: NSPopoverAppearance); + #[method(behavior)] pub unsafe fn behavior(&self) -> NSPopoverBehavior; + #[method(setBehavior:)] pub unsafe fn setBehavior(&self, behavior: NSPopoverBehavior); + #[method(animates)] pub unsafe fn animates(&self) -> bool; + #[method(setAnimates:)] pub unsafe fn setAnimates(&self, animates: bool); + #[method_id(contentViewController)] pub unsafe fn contentViewController(&self) -> Option>; + #[method(setContentViewController:)] pub unsafe fn setContentViewController( &self, contentViewController: Option<&NSViewController>, ); + #[method(contentSize)] pub unsafe fn contentSize(&self) -> NSSize; + #[method(setContentSize:)] pub unsafe fn setContentSize(&self, contentSize: NSSize); + #[method(isShown)] pub unsafe fn isShown(&self) -> bool; + #[method(isDetached)] pub unsafe fn isDetached(&self) -> bool; + #[method(positioningRect)] pub unsafe fn positioningRect(&self) -> NSRect; + #[method(setPositioningRect:)] pub unsafe fn setPositioningRect(&self, positioningRect: NSRect); + #[method(showRelativeToRect:ofView:preferredEdge:)] pub unsafe fn showRelativeToRect_ofView_preferredEdge( &self, @@ -57,11 +80,15 @@ extern_methods!( positioningView: &NSView, preferredEdge: NSRectEdge, ); + #[method(performClose:)] pub unsafe fn performClose(&self, sender: Option<&Object>); + #[method(close)] pub unsafe fn close(&self); } ); + pub type NSPopoverCloseReasonValue = NSString; + pub type NSPopoverDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs index e59f9d7c8..13f1c612b 100644 --- a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs @@ -1,54 +1,75 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPopoverTouchBarItem; + unsafe impl ClassType for NSPopoverTouchBarItem { type Super = NSTouchBarItem; } ); + extern_methods!( unsafe impl NSPopoverTouchBarItem { #[method_id(popoverTouchBar)] pub unsafe fn popoverTouchBar(&self) -> Id; + #[method(setPopoverTouchBar:)] pub unsafe fn setPopoverTouchBar(&self, popoverTouchBar: &NSTouchBar); + #[method_id(customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); + #[method_id(collapsedRepresentation)] pub unsafe fn collapsedRepresentation(&self) -> Id; + #[method(setCollapsedRepresentation:)] pub unsafe fn setCollapsedRepresentation(&self, collapsedRepresentation: &NSView); + #[method_id(collapsedRepresentationImage)] pub unsafe fn collapsedRepresentationImage(&self) -> Option>; + #[method(setCollapsedRepresentationImage:)] pub unsafe fn setCollapsedRepresentationImage( &self, collapsedRepresentationImage: Option<&NSImage>, ); + #[method_id(collapsedRepresentationLabel)] pub unsafe fn collapsedRepresentationLabel(&self) -> Id; + #[method(setCollapsedRepresentationLabel:)] pub unsafe fn setCollapsedRepresentationLabel( &self, collapsedRepresentationLabel: &NSString, ); + #[method_id(pressAndHoldTouchBar)] pub unsafe fn pressAndHoldTouchBar(&self) -> Option>; + #[method(setPressAndHoldTouchBar:)] pub unsafe fn setPressAndHoldTouchBar(&self, pressAndHoldTouchBar: Option<&NSTouchBar>); + #[method(showsCloseButton)] pub unsafe fn showsCloseButton(&self) -> bool; + #[method(setShowsCloseButton:)] pub unsafe fn setShowsCloseButton(&self, showsCloseButton: bool); + #[method(showPopover:)] pub unsafe fn showPopover(&self, sender: Option<&Object>); + #[method(dismissPopover:)] pub unsafe fn dismissPopover(&self, sender: Option<&Object>); + #[method_id(makeStandardActivatePopoverGestureRecognizer)] pub unsafe fn makeStandardActivatePopoverGestureRecognizer( &self, diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs index 3005855ce..26db0adcb 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs @@ -1,18 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPredicateEditor; + unsafe impl ClassType for NSPredicateEditor { type Super = NSRuleEditor; } ); + extern_methods!( unsafe impl NSPredicateEditor { #[method_id(rowTemplates)] pub unsafe fn rowTemplates(&self) -> Id, Shared>; + #[method(setRowTemplates:)] pub unsafe fn setRowTemplates(&self, rowTemplates: &NSArray); } diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs index 0385b571f..6a8bb2ba3 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs @@ -1,32 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPredicateEditorRowTemplate; + unsafe impl ClassType for NSPredicateEditorRowTemplate { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPredicateEditorRowTemplate { #[method(matchForPredicate:)] pub unsafe fn matchForPredicate(&self, predicate: &NSPredicate) -> c_double; + #[method_id(templateViews)] pub unsafe fn templateViews(&self) -> Id, Shared>; + #[method(setPredicate:)] pub unsafe fn setPredicate(&self, predicate: &NSPredicate); + #[method_id(predicateWithSubpredicates:)] pub unsafe fn predicateWithSubpredicates( &self, subpredicates: Option<&NSArray>, ) -> Id; + #[method_id(displayableSubpredicatesOfPredicate:)] pub unsafe fn displayableSubpredicatesOfPredicate( &self, predicate: &NSPredicate, ) -> Option, Shared>>; + #[method_id(initWithLeftExpressions:rightExpressions:modifier:operators:options:)] pub unsafe fn initWithLeftExpressions_rightExpressions_modifier_operators_options( &self, @@ -36,6 +46,7 @@ extern_methods!( operators: &NSArray, options: NSUInteger, ) -> Id; + #[method_id(initWithLeftExpressions:rightExpressionAttributeType:modifier:operators:options:)] pub unsafe fn initWithLeftExpressions_rightExpressionAttributeType_modifier_operators_options( &self, @@ -45,25 +56,34 @@ extern_methods!( operators: &NSArray, options: NSUInteger, ) -> Id; + #[method_id(initWithCompoundTypes:)] pub unsafe fn initWithCompoundTypes( &self, compoundTypes: &NSArray, ) -> Id; + #[method_id(leftExpressions)] pub unsafe fn leftExpressions(&self) -> Option, Shared>>; + #[method_id(rightExpressions)] pub unsafe fn rightExpressions(&self) -> Option, Shared>>; + #[method(rightExpressionAttributeType)] pub unsafe fn rightExpressionAttributeType(&self) -> NSAttributeType; + #[method(modifier)] pub unsafe fn modifier(&self) -> NSComparisonPredicateModifier; + #[method_id(operators)] pub unsafe fn operators(&self) -> Option, Shared>>; + #[method(options)] pub unsafe fn options(&self) -> NSUInteger; + #[method_id(compoundTypes)] pub unsafe fn compoundTypes(&self) -> Option, Shared>>; + #[method_id(templatesWithAttributeKeyPaths:inEntityDescription:)] pub unsafe fn templatesWithAttributeKeyPaths_inEntityDescription( keyPaths: &NSArray, diff --git a/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs index b8202cc5e..b80502be1 100644 --- a/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs @@ -1,30 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPressGestureRecognizer; + unsafe impl ClassType for NSPressGestureRecognizer { type Super = NSGestureRecognizer; } ); + extern_methods!( unsafe impl NSPressGestureRecognizer { #[method(buttonMask)] pub unsafe fn buttonMask(&self) -> NSUInteger; + #[method(setButtonMask:)] pub unsafe fn setButtonMask(&self, buttonMask: NSUInteger); + #[method(minimumPressDuration)] pub unsafe fn minimumPressDuration(&self) -> NSTimeInterval; + #[method(setMinimumPressDuration:)] pub unsafe fn setMinimumPressDuration(&self, minimumPressDuration: NSTimeInterval); + #[method(allowableMovement)] pub unsafe fn allowableMovement(&self) -> CGFloat; + #[method(setAllowableMovement:)] pub unsafe fn setAllowableMovement(&self, allowableMovement: CGFloat); + #[method(numberOfTouchesRequired)] pub unsafe fn numberOfTouchesRequired(&self) -> NSInteger; + #[method(setNumberOfTouchesRequired:)] pub unsafe fn setNumberOfTouchesRequired(&self, numberOfTouchesRequired: NSInteger); } diff --git a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs index dcf4f9869..25304f887 100644 --- a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs @@ -1,32 +1,41 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPressureConfiguration; + unsafe impl ClassType for NSPressureConfiguration { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPressureConfiguration { #[method(pressureBehavior)] pub unsafe fn pressureBehavior(&self) -> NSPressureBehavior; + #[method_id(initWithPressureBehavior:)] pub unsafe fn initWithPressureBehavior( &self, pressureBehavior: NSPressureBehavior, ) -> Id; + #[method(set)] pub unsafe fn set(&self); } ); + extern_methods!( - #[doc = "NSPressureConfiguration"] + /// NSPressureConfiguration unsafe impl NSView { #[method_id(pressureConfiguration)] pub unsafe fn pressureConfiguration(&self) -> Option>; + #[method(setPressureConfiguration:)] pub unsafe fn setPressureConfiguration( &self, diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs index c16d89a4c..08ebd1dad 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -1,130 +1,186 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSPrintInfoAttributeKey = NSString; + pub type NSPrintJobDispositionValue = NSString; + pub type NSPrintInfoSettingKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSPrintInfo; + unsafe impl ClassType for NSPrintInfo { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPrintInfo { #[method_id(sharedPrintInfo)] pub unsafe fn sharedPrintInfo() -> Id; + #[method(setSharedPrintInfo:)] pub unsafe fn setSharedPrintInfo(sharedPrintInfo: &NSPrintInfo); + #[method_id(initWithDictionary:)] pub unsafe fn initWithDictionary( &self, attributes: &NSDictionary, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(dictionary)] pub unsafe fn dictionary( &self, ) -> Id, Shared>; + #[method_id(paperName)] pub unsafe fn paperName(&self) -> Option>; + #[method(setPaperName:)] pub unsafe fn setPaperName(&self, paperName: Option<&NSPrinterPaperName>); + #[method(paperSize)] pub unsafe fn paperSize(&self) -> NSSize; + #[method(setPaperSize:)] pub unsafe fn setPaperSize(&self, paperSize: NSSize); + #[method(orientation)] pub unsafe fn orientation(&self) -> NSPaperOrientation; + #[method(setOrientation:)] pub unsafe fn setOrientation(&self, orientation: NSPaperOrientation); + #[method(scalingFactor)] pub unsafe fn scalingFactor(&self) -> CGFloat; + #[method(setScalingFactor:)] pub unsafe fn setScalingFactor(&self, scalingFactor: CGFloat); + #[method(leftMargin)] pub unsafe fn leftMargin(&self) -> CGFloat; + #[method(setLeftMargin:)] pub unsafe fn setLeftMargin(&self, leftMargin: CGFloat); + #[method(rightMargin)] pub unsafe fn rightMargin(&self) -> CGFloat; + #[method(setRightMargin:)] pub unsafe fn setRightMargin(&self, rightMargin: CGFloat); + #[method(topMargin)] pub unsafe fn topMargin(&self) -> CGFloat; + #[method(setTopMargin:)] pub unsafe fn setTopMargin(&self, topMargin: CGFloat); + #[method(bottomMargin)] pub unsafe fn bottomMargin(&self) -> CGFloat; + #[method(setBottomMargin:)] pub unsafe fn setBottomMargin(&self, bottomMargin: CGFloat); + #[method(isHorizontallyCentered)] pub unsafe fn isHorizontallyCentered(&self) -> bool; + #[method(setHorizontallyCentered:)] pub unsafe fn setHorizontallyCentered(&self, horizontallyCentered: bool); + #[method(isVerticallyCentered)] pub unsafe fn isVerticallyCentered(&self) -> bool; + #[method(setVerticallyCentered:)] pub unsafe fn setVerticallyCentered(&self, verticallyCentered: bool); + #[method(horizontalPagination)] pub unsafe fn horizontalPagination(&self) -> NSPrintingPaginationMode; + #[method(setHorizontalPagination:)] pub unsafe fn setHorizontalPagination( &self, horizontalPagination: NSPrintingPaginationMode, ); + #[method(verticalPagination)] pub unsafe fn verticalPagination(&self) -> NSPrintingPaginationMode; + #[method(setVerticalPagination:)] pub unsafe fn setVerticalPagination(&self, verticalPagination: NSPrintingPaginationMode); + #[method_id(jobDisposition)] pub unsafe fn jobDisposition(&self) -> Id; + #[method(setJobDisposition:)] pub unsafe fn setJobDisposition(&self, jobDisposition: &NSPrintJobDispositionValue); + #[method_id(printer)] pub unsafe fn printer(&self) -> Id; + #[method(setPrinter:)] pub unsafe fn setPrinter(&self, printer: &NSPrinter); + #[method(setUpPrintOperationDefaultValues)] pub unsafe fn setUpPrintOperationDefaultValues(&self); + #[method(imageablePageBounds)] pub unsafe fn imageablePageBounds(&self) -> NSRect; + #[method_id(localizedPaperName)] pub unsafe fn localizedPaperName(&self) -> Option>; + #[method_id(defaultPrinter)] pub unsafe fn defaultPrinter() -> Option>; + #[method_id(printSettings)] pub unsafe fn printSettings( &self, ) -> Id, Shared>; + #[method(PMPrintSession)] pub unsafe fn PMPrintSession(&self) -> NonNull; + #[method(PMPageFormat)] pub unsafe fn PMPageFormat(&self) -> NonNull; + #[method(PMPrintSettings)] pub unsafe fn PMPrintSettings(&self) -> NonNull; + #[method(updateFromPMPageFormat)] pub unsafe fn updateFromPMPageFormat(&self); + #[method(updateFromPMPrintSettings)] pub unsafe fn updateFromPMPrintSettings(&self); + #[method(isSelectionOnly)] pub unsafe fn isSelectionOnly(&self) -> bool; + #[method(setSelectionOnly:)] pub unsafe fn setSelectionOnly(&self, selectionOnly: bool); + #[method(takeSettingsFromPDFInfo:)] pub unsafe fn takeSettingsFromPDFInfo(&self, inPDFInfo: &NSPDFInfo); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSPrintInfo { #[method(setDefaultPrinter:)] pub unsafe fn setDefaultPrinter(printer: Option<&NSPrinter>); + #[method(sizeForPaperName:)] pub unsafe fn sizeForPaperName(name: Option<&NSPrinterPaperName>) -> NSSize; } diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs index 057a2bbad..6166fa6f3 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPrintOperation; + unsafe impl ClassType for NSPrintOperation { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPrintOperation { #[method_id(printOperationWithView:printInfo:)] @@ -16,6 +21,7 @@ extern_methods!( view: &NSView, printInfo: &NSPrintInfo, ) -> Id; + #[method_id(PDFOperationWithView:insideRect:toData:printInfo:)] pub unsafe fn PDFOperationWithView_insideRect_toData_printInfo( view: &NSView, @@ -23,6 +29,7 @@ extern_methods!( data: &NSMutableData, printInfo: &NSPrintInfo, ) -> Id; + #[method_id(PDFOperationWithView:insideRect:toPath:printInfo:)] pub unsafe fn PDFOperationWithView_insideRect_toPath_printInfo( view: &NSView, @@ -30,6 +37,7 @@ extern_methods!( path: &NSString, printInfo: &NSPrintInfo, ) -> Id; + #[method_id(EPSOperationWithView:insideRect:toData:printInfo:)] pub unsafe fn EPSOperationWithView_insideRect_toData_printInfo( view: &NSView, @@ -37,6 +45,7 @@ extern_methods!( data: &NSMutableData, printInfo: &NSPrintInfo, ) -> Id; + #[method_id(EPSOperationWithView:insideRect:toPath:printInfo:)] pub unsafe fn EPSOperationWithView_insideRect_toPath_printInfo( view: &NSView, @@ -44,56 +53,78 @@ extern_methods!( path: &NSString, printInfo: &NSPrintInfo, ) -> Id; + #[method_id(printOperationWithView:)] pub unsafe fn printOperationWithView(view: &NSView) -> Id; + #[method_id(PDFOperationWithView:insideRect:toData:)] pub unsafe fn PDFOperationWithView_insideRect_toData( view: &NSView, rect: NSRect, data: &NSMutableData, ) -> Id; + #[method_id(EPSOperationWithView:insideRect:toData:)] pub unsafe fn EPSOperationWithView_insideRect_toData( view: &NSView, rect: NSRect, data: Option<&NSMutableData>, ) -> Id; + #[method_id(currentOperation)] pub unsafe fn currentOperation() -> Option>; + #[method(setCurrentOperation:)] pub unsafe fn setCurrentOperation(currentOperation: Option<&NSPrintOperation>); + #[method(isCopyingOperation)] pub unsafe fn isCopyingOperation(&self) -> bool; + #[method(preferredRenderingQuality)] pub unsafe fn preferredRenderingQuality(&self) -> NSPrintRenderingQuality; + #[method_id(jobTitle)] pub unsafe fn jobTitle(&self) -> Option>; + #[method(setJobTitle:)] pub unsafe fn setJobTitle(&self, jobTitle: Option<&NSString>); + #[method(showsPrintPanel)] pub unsafe fn showsPrintPanel(&self) -> bool; + #[method(setShowsPrintPanel:)] pub unsafe fn setShowsPrintPanel(&self, showsPrintPanel: bool); + #[method(showsProgressPanel)] pub unsafe fn showsProgressPanel(&self) -> bool; + #[method(setShowsProgressPanel:)] pub unsafe fn setShowsProgressPanel(&self, showsProgressPanel: bool); + #[method_id(printPanel)] pub unsafe fn printPanel(&self) -> Id; + #[method(setPrintPanel:)] pub unsafe fn setPrintPanel(&self, printPanel: &NSPrintPanel); + #[method_id(PDFPanel)] pub unsafe fn PDFPanel(&self) -> Id; + #[method(setPDFPanel:)] pub unsafe fn setPDFPanel(&self, PDFPanel: &NSPDFPanel); + #[method(canSpawnSeparateThread)] pub unsafe fn canSpawnSeparateThread(&self) -> bool; + #[method(setCanSpawnSeparateThread:)] pub unsafe fn setCanSpawnSeparateThread(&self, canSpawnSeparateThread: bool); + #[method(pageOrder)] pub unsafe fn pageOrder(&self) -> NSPrintingPageOrder; + #[method(setPageOrder:)] pub unsafe fn setPageOrder(&self, pageOrder: NSPrintingPageOrder); + #[method(runOperationModalForWindow:delegate:didRunSelector:contextInfo:)] pub unsafe fn runOperationModalForWindow_delegate_didRunSelector_contextInfo( &self, @@ -102,43 +133,60 @@ extern_methods!( didRunSelector: Option, contextInfo: *mut c_void, ); + #[method(runOperation)] pub unsafe fn runOperation(&self) -> bool; + #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method_id(printInfo)] pub unsafe fn printInfo(&self) -> Id; + #[method(setPrintInfo:)] pub unsafe fn setPrintInfo(&self, printInfo: &NSPrintInfo); + #[method_id(context)] pub unsafe fn context(&self) -> Option>; + #[method(pageRange)] pub unsafe fn pageRange(&self) -> NSRange; + #[method(currentPage)] pub unsafe fn currentPage(&self) -> NSInteger; + #[method_id(createContext)] pub unsafe fn createContext(&self) -> Option>; + #[method(destroyContext)] pub unsafe fn destroyContext(&self); + #[method(deliverResult)] pub unsafe fn deliverResult(&self) -> bool; + #[method(cleanUpOperation)] pub unsafe fn cleanUpOperation(&self); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSPrintOperation { #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, view: Option<&NSView>); + #[method_id(accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[method(setJobStyleHint:)] pub unsafe fn setJobStyleHint(&self, hint: Option<&NSString>); + #[method_id(jobStyleHint)] pub unsafe fn jobStyleHint(&self) -> Option>; + #[method(setShowPanels:)] pub unsafe fn setShowPanels(&self, flag: bool); + #[method(showPanels)] pub unsafe fn showPanels(&self) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index 4f28390db..410c176ec 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -1,43 +1,63 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSPrintPanelJobStyleHint = NSString; + pub type NSPrintPanelAccessorySummaryKey = NSString; + pub type NSPrintPanelAccessorizing = NSObject; + extern_class!( #[derive(Debug)] pub struct NSPrintPanel; + unsafe impl ClassType for NSPrintPanel { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPrintPanel { #[method_id(printPanel)] pub unsafe fn printPanel() -> Id; + #[method(addAccessoryController:)] pub unsafe fn addAccessoryController(&self, accessoryController: &TodoProtocols); + #[method(removeAccessoryController:)] pub unsafe fn removeAccessoryController(&self, accessoryController: &TodoProtocols); + #[method_id(accessoryControllers)] pub unsafe fn accessoryControllers(&self) -> Id, Shared>; + #[method(options)] pub unsafe fn options(&self) -> NSPrintPanelOptions; + #[method(setOptions:)] pub unsafe fn setOptions(&self, options: NSPrintPanelOptions); + #[method(setDefaultButtonTitle:)] pub unsafe fn setDefaultButtonTitle(&self, defaultButtonTitle: Option<&NSString>); + #[method_id(defaultButtonTitle)] pub unsafe fn defaultButtonTitle(&self) -> Option>; + #[method_id(helpAnchor)] pub unsafe fn helpAnchor(&self) -> Option>; + #[method(setHelpAnchor:)] pub unsafe fn setHelpAnchor(&self, helpAnchor: Option<&NSHelpAnchorName>); + #[method_id(jobStyleHint)] pub unsafe fn jobStyleHint(&self) -> Option>; + #[method(setJobStyleHint:)] pub unsafe fn setJobStyleHint(&self, jobStyleHint: Option<&NSPrintPanelJobStyleHint>); + #[method(beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheetWithPrintInfo_modalForWindow_delegate_didEndSelector_contextInfo( &self, @@ -47,23 +67,30 @@ extern_methods!( didEndSelector: Option, contextInfo: *mut c_void, ); + #[method(runModalWithPrintInfo:)] pub unsafe fn runModalWithPrintInfo(&self, printInfo: &NSPrintInfo) -> NSInteger; + #[method(runModal)] pub unsafe fn runModal(&self) -> NSInteger; + #[method_id(printInfo)] pub unsafe fn printInfo(&self) -> Id; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSPrintPanel { #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method_id(accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[method(updateFromPrintInfo)] pub unsafe fn updateFromPrintInfo(&self); + #[method(finalWritePrintInfo)] pub unsafe fn finalWritePrintInfo(&self); } diff --git a/crates/icrate/src/generated/AppKit/NSPrinter.rs b/crates/icrate/src/generated/AppKit/NSPrinter.rs index 4298a8421..8294732a0 100644 --- a/crates/icrate/src/generated/AppKit/NSPrinter.rs +++ b/crates/icrate/src/generated/AppKit/NSPrinter.rs @@ -1,99 +1,132 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSPrinterTypeName = NSString; + pub type NSPrinterPaperName = NSString; + extern_class!( #[derive(Debug)] pub struct NSPrinter; + unsafe impl ClassType for NSPrinter { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPrinter { #[method_id(printerNames)] pub unsafe fn printerNames() -> Id, Shared>; + #[method_id(printerTypes)] pub unsafe fn printerTypes() -> Id, Shared>; + #[method_id(printerWithName:)] pub unsafe fn printerWithName(name: &NSString) -> Option>; + #[method_id(printerWithType:)] pub unsafe fn printerWithType(type_: &NSPrinterTypeName) -> Option>; + #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method_id(type)] pub unsafe fn type_(&self) -> Id; + #[method(languageLevel)] pub unsafe fn languageLevel(&self) -> NSInteger; + #[method(pageSizeForPaper:)] pub unsafe fn pageSizeForPaper(&self, paperName: &NSPrinterPaperName) -> NSSize; + #[method_id(deviceDescription)] pub unsafe fn deviceDescription( &self, ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSPrinter { #[method(statusForTable:)] pub unsafe fn statusForTable(&self, tableName: &NSString) -> NSPrinterTableStatus; + #[method(isKey:inTable:)] pub unsafe fn isKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> bool; + #[method(booleanForKey:inTable:)] pub unsafe fn booleanForKey_inTable( &self, key: Option<&NSString>, table: &NSString, ) -> bool; + #[method(floatForKey:inTable:)] pub unsafe fn floatForKey_inTable( &self, key: Option<&NSString>, table: &NSString, ) -> c_float; + #[method(intForKey:inTable:)] pub unsafe fn intForKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> c_int; + #[method(rectForKey:inTable:)] pub unsafe fn rectForKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> NSRect; + #[method(sizeForKey:inTable:)] pub unsafe fn sizeForKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> NSSize; + #[method_id(stringForKey:inTable:)] pub unsafe fn stringForKey_inTable( &self, key: Option<&NSString>, table: &NSString, ) -> Option>; + #[method_id(stringListForKey:inTable:)] pub unsafe fn stringListForKey_inTable( &self, key: Option<&NSString>, table: &NSString, ) -> Option>; + #[method(imageRectForPaper:)] pub unsafe fn imageRectForPaper(&self, paperName: Option<&NSString>) -> NSRect; + #[method(acceptsBinary)] pub unsafe fn acceptsBinary(&self) -> bool; + #[method(isColor)] pub unsafe fn isColor(&self) -> bool; + #[method(isFontAvailable:)] pub unsafe fn isFontAvailable(&self, faceName: Option<&NSString>) -> bool; + #[method(isOutputStackInReverseOrder)] pub unsafe fn isOutputStackInReverseOrder(&self) -> bool; + #[method_id(printerWithName:domain:includeUnavailable:)] pub unsafe fn printerWithName_domain_includeUnavailable( name: &NSString, domain: Option<&NSString>, flag: bool, ) -> Option>; + #[method_id(domain)] pub unsafe fn domain(&self) -> Id; + #[method_id(host)] pub unsafe fn host(&self) -> Id; + #[method_id(note)] pub unsafe fn note(&self) -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs index 6fad2d669..9345714c3 100644 --- a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs @@ -1,73 +1,104 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSProgressIndicator; + unsafe impl ClassType for NSProgressIndicator { type Super = NSView; } ); + extern_methods!( unsafe impl NSProgressIndicator { #[method(isIndeterminate)] pub unsafe fn isIndeterminate(&self) -> bool; + #[method(setIndeterminate:)] pub unsafe fn setIndeterminate(&self, indeterminate: bool); + #[method(isBezeled)] pub unsafe fn isBezeled(&self) -> bool; + #[method(setBezeled:)] pub unsafe fn setBezeled(&self, bezeled: bool); + #[method(controlTint)] pub unsafe fn controlTint(&self) -> NSControlTint; + #[method(setControlTint:)] pub unsafe fn setControlTint(&self, controlTint: NSControlTint); + #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; + #[method(setControlSize:)] pub unsafe fn setControlSize(&self, controlSize: NSControlSize); + #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[method(setDoubleValue:)] pub unsafe fn setDoubleValue(&self, doubleValue: c_double); + #[method(incrementBy:)] pub unsafe fn incrementBy(&self, delta: c_double); + #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(usesThreadedAnimation)] pub unsafe fn usesThreadedAnimation(&self) -> bool; + #[method(setUsesThreadedAnimation:)] pub unsafe fn setUsesThreadedAnimation(&self, usesThreadedAnimation: bool); + #[method(startAnimation:)] pub unsafe fn startAnimation(&self, sender: Option<&Object>); + #[method(stopAnimation:)] pub unsafe fn stopAnimation(&self, sender: Option<&Object>); + #[method(style)] pub unsafe fn style(&self) -> NSProgressIndicatorStyle; + #[method(setStyle:)] pub unsafe fn setStyle(&self, style: NSProgressIndicatorStyle); + #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[method(isDisplayedWhenStopped)] pub unsafe fn isDisplayedWhenStopped(&self) -> bool; + #[method(setDisplayedWhenStopped:)] pub unsafe fn setDisplayedWhenStopped(&self, displayedWhenStopped: bool); } ); + extern_methods!( - #[doc = "NSProgressIndicatorDeprecated"] + /// NSProgressIndicatorDeprecated unsafe impl NSProgressIndicator { #[method(animationDelay)] pub unsafe fn animationDelay(&self) -> NSTimeInterval; + #[method(setAnimationDelay:)] pub unsafe fn setAnimationDelay(&self, delay: NSTimeInterval); + #[method(animate:)] pub unsafe fn animate(&self, sender: Option<&Object>); } diff --git a/crates/icrate/src/generated/AppKit/NSResponder.rs b/crates/icrate/src/generated/AppKit/NSResponder.rs index 405a0871d..c6499846d 100644 --- a/crates/icrate/src/generated/AppKit/NSResponder.rs +++ b/crates/icrate/src/generated/AppKit/NSResponder.rs @@ -1,127 +1,184 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSResponder; + unsafe impl ClassType for NSResponder { type Super = NSObject; } ); + extern_methods!( unsafe impl NSResponder { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(nextResponder)] pub unsafe fn nextResponder(&self) -> Option>; + #[method(setNextResponder:)] pub unsafe fn setNextResponder(&self, nextResponder: Option<&NSResponder>); + #[method(tryToPerform:with:)] pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; + #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; + #[method_id(validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, sendType: Option<&NSPasteboardType>, returnType: Option<&NSPasteboardType>, ) -> Option>; + #[method(mouseDown:)] pub unsafe fn mouseDown(&self, event: &NSEvent); + #[method(rightMouseDown:)] pub unsafe fn rightMouseDown(&self, event: &NSEvent); + #[method(otherMouseDown:)] pub unsafe fn otherMouseDown(&self, event: &NSEvent); + #[method(mouseUp:)] pub unsafe fn mouseUp(&self, event: &NSEvent); + #[method(rightMouseUp:)] pub unsafe fn rightMouseUp(&self, event: &NSEvent); + #[method(otherMouseUp:)] pub unsafe fn otherMouseUp(&self, event: &NSEvent); + #[method(mouseMoved:)] pub unsafe fn mouseMoved(&self, event: &NSEvent); + #[method(mouseDragged:)] pub unsafe fn mouseDragged(&self, event: &NSEvent); + #[method(scrollWheel:)] pub unsafe fn scrollWheel(&self, event: &NSEvent); + #[method(rightMouseDragged:)] pub unsafe fn rightMouseDragged(&self, event: &NSEvent); + #[method(otherMouseDragged:)] pub unsafe fn otherMouseDragged(&self, event: &NSEvent); + #[method(mouseEntered:)] pub unsafe fn mouseEntered(&self, event: &NSEvent); + #[method(mouseExited:)] pub unsafe fn mouseExited(&self, event: &NSEvent); + #[method(keyDown:)] pub unsafe fn keyDown(&self, event: &NSEvent); + #[method(keyUp:)] pub unsafe fn keyUp(&self, event: &NSEvent); + #[method(flagsChanged:)] pub unsafe fn flagsChanged(&self, event: &NSEvent); + #[method(tabletPoint:)] pub unsafe fn tabletPoint(&self, event: &NSEvent); + #[method(tabletProximity:)] pub unsafe fn tabletProximity(&self, event: &NSEvent); + #[method(cursorUpdate:)] pub unsafe fn cursorUpdate(&self, event: &NSEvent); + #[method(magnifyWithEvent:)] pub unsafe fn magnifyWithEvent(&self, event: &NSEvent); + #[method(rotateWithEvent:)] pub unsafe fn rotateWithEvent(&self, event: &NSEvent); + #[method(swipeWithEvent:)] pub unsafe fn swipeWithEvent(&self, event: &NSEvent); + #[method(beginGestureWithEvent:)] pub unsafe fn beginGestureWithEvent(&self, event: &NSEvent); + #[method(endGestureWithEvent:)] pub unsafe fn endGestureWithEvent(&self, event: &NSEvent); + #[method(smartMagnifyWithEvent:)] pub unsafe fn smartMagnifyWithEvent(&self, event: &NSEvent); + #[method(changeModeWithEvent:)] pub unsafe fn changeModeWithEvent(&self, event: &NSEvent); + #[method(touchesBeganWithEvent:)] pub unsafe fn touchesBeganWithEvent(&self, event: &NSEvent); + #[method(touchesMovedWithEvent:)] pub unsafe fn touchesMovedWithEvent(&self, event: &NSEvent); + #[method(touchesEndedWithEvent:)] pub unsafe fn touchesEndedWithEvent(&self, event: &NSEvent); + #[method(touchesCancelledWithEvent:)] pub unsafe fn touchesCancelledWithEvent(&self, event: &NSEvent); + #[method(quickLookWithEvent:)] pub unsafe fn quickLookWithEvent(&self, event: &NSEvent); + #[method(pressureChangeWithEvent:)] pub unsafe fn pressureChangeWithEvent(&self, event: &NSEvent); + #[method(noResponderFor:)] pub unsafe fn noResponderFor(&self, eventSelector: Sel); + #[method(acceptsFirstResponder)] pub unsafe fn acceptsFirstResponder(&self) -> bool; + #[method(becomeFirstResponder)] pub unsafe fn becomeFirstResponder(&self) -> bool; + #[method(resignFirstResponder)] pub unsafe fn resignFirstResponder(&self) -> bool; + #[method(interpretKeyEvents:)] pub unsafe fn interpretKeyEvents(&self, eventArray: &NSArray); + #[method(flushBufferedKeyEvents)] pub unsafe fn flushBufferedKeyEvents(&self); + #[method_id(menu)] pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method(showContextHelp:)] pub unsafe fn showContextHelp(&self, sender: Option<&Object>); + #[method(helpRequested:)] pub unsafe fn helpRequested(&self, eventPtr: &NSEvent); + #[method(shouldBeTreatedAsInkEvent:)] pub unsafe fn shouldBeTreatedAsInkEvent(&self, event: &NSEvent) -> bool; + #[method(wantsScrollEventsForSwipeTrackingOnAxis:)] pub unsafe fn wantsScrollEventsForSwipeTrackingOnAxis( &self, axis: NSEventGestureAxis, ) -> bool; + #[method(wantsForwardedScrollEventsForAxis:)] pub unsafe fn wantsForwardedScrollEventsForAxis(&self, axis: NSEventGestureAxis) -> bool; + #[method_id(supplementalTargetForAction:sender:)] pub unsafe fn supplementalTargetForAction_sender( &self, @@ -130,20 +187,24 @@ extern_methods!( ) -> Option>; } ); + pub type NSStandardKeyBindingResponding = NSObject; + extern_methods!( - #[doc = "NSStandardKeyBindingMethods"] + /// NSStandardKeyBindingMethods unsafe impl NSResponder {} ); + extern_methods!( - #[doc = "NSUndoSupport"] + /// NSUndoSupport unsafe impl NSResponder { #[method_id(undoManager)] pub unsafe fn undoManager(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSControlEditingSupport"] + /// NSControlEditingSupport unsafe impl NSResponder { #[method(validateProposedFirstResponder:forEvent:)] pub unsafe fn validateProposedFirstResponder_forEvent( @@ -153,8 +214,9 @@ extern_methods!( ) -> bool; } ); + extern_methods!( - #[doc = "NSErrorPresentation"] + /// NSErrorPresentation unsafe impl NSResponder { #[method(presentError:modalForWindow:delegate:didPresentSelector:contextInfo:)] pub unsafe fn presentError_modalForWindow_delegate_didPresentSelector_contextInfo( @@ -165,28 +227,33 @@ extern_methods!( didPresentSelector: Option, contextInfo: *mut c_void, ); + #[method(presentError:)] pub unsafe fn presentError(&self, error: &NSError) -> bool; + #[method_id(willPresentError:)] pub unsafe fn willPresentError(&self, error: &NSError) -> Id; } ); + extern_methods!( - #[doc = "NSTextFinderSupport"] + /// NSTextFinderSupport unsafe impl NSResponder { #[method(performTextFinderAction:)] pub unsafe fn performTextFinderAction(&self, sender: Option<&Object>); } ); + extern_methods!( - #[doc = "NSWindowTabbing"] + /// NSWindowTabbing unsafe impl NSResponder { #[method(newWindowForTab:)] pub unsafe fn newWindowForTab(&self, sender: Option<&Object>); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSResponder { #[method(performMnemonic:)] pub unsafe fn performMnemonic(&self, string: &NSString) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs index e0cb0ee11..1186a7e75 100644 --- a/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs @@ -1,22 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSRotationGestureRecognizer; + unsafe impl ClassType for NSRotationGestureRecognizer { type Super = NSGestureRecognizer; } ); + extern_methods!( unsafe impl NSRotationGestureRecognizer { #[method(rotation)] pub unsafe fn rotation(&self) -> CGFloat; + #[method(setRotation:)] pub unsafe fn setRotation(&self, rotation: CGFloat); + #[method(rotationInDegrees)] pub unsafe fn rotationInDegrees(&self) -> CGFloat; + #[method(setRotationInDegrees:)] pub unsafe fn setRotationInDegrees(&self, rotationInDegrees: CGFloat); } diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index 61695fe73..01bae959b 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -1,77 +1,109 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSRuleEditorPredicatePartKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSRuleEditor; + unsafe impl ClassType for NSRuleEditor { type Super = NSControl; } ); + extern_methods!( unsafe impl NSRuleEditor { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSRuleEditorDelegate>); + #[method_id(formattingStringsFilename)] pub unsafe fn formattingStringsFilename(&self) -> Option>; + #[method(setFormattingStringsFilename:)] pub unsafe fn setFormattingStringsFilename( &self, formattingStringsFilename: Option<&NSString>, ); + #[method_id(formattingDictionary)] pub unsafe fn formattingDictionary( &self, ) -> Option, Shared>>; + #[method(setFormattingDictionary:)] pub unsafe fn setFormattingDictionary( &self, formattingDictionary: Option<&NSDictionary>, ); + #[method(reloadCriteria)] pub unsafe fn reloadCriteria(&self); + #[method(nestingMode)] pub unsafe fn nestingMode(&self) -> NSRuleEditorNestingMode; + #[method(setNestingMode:)] pub unsafe fn setNestingMode(&self, nestingMode: NSRuleEditorNestingMode); + #[method(rowHeight)] pub unsafe fn rowHeight(&self) -> CGFloat; + #[method(setRowHeight:)] pub unsafe fn setRowHeight(&self, rowHeight: CGFloat); + #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[method(canRemoveAllRows)] pub unsafe fn canRemoveAllRows(&self) -> bool; + #[method(setCanRemoveAllRows:)] pub unsafe fn setCanRemoveAllRows(&self, canRemoveAllRows: bool); + #[method_id(predicate)] pub unsafe fn predicate(&self) -> Option>; + #[method(reloadPredicate)] pub unsafe fn reloadPredicate(&self); + #[method_id(predicateForRow:)] pub unsafe fn predicateForRow(&self, row: NSInteger) -> Option>; + #[method(numberOfRows)] pub unsafe fn numberOfRows(&self) -> NSInteger; + #[method_id(subrowIndexesForRow:)] pub unsafe fn subrowIndexesForRow(&self, rowIndex: NSInteger) -> Id; + #[method_id(criteriaForRow:)] pub unsafe fn criteriaForRow(&self, row: NSInteger) -> Id; + #[method_id(displayValuesForRow:)] pub unsafe fn displayValuesForRow(&self, row: NSInteger) -> Id; + #[method(rowForDisplayValue:)] pub unsafe fn rowForDisplayValue(&self, displayValue: &Object) -> NSInteger; + #[method(rowTypeForRow:)] pub unsafe fn rowTypeForRow(&self, rowIndex: NSInteger) -> NSRuleEditorRowType; + #[method(parentRowForRow:)] pub unsafe fn parentRowForRow(&self, rowIndex: NSInteger) -> NSInteger; + #[method(addRow:)] pub unsafe fn addRow(&self, sender: Option<&Object>); + #[method(insertRowAtIndex:withType:asSubrowOfRow:animate:)] pub unsafe fn insertRowAtIndex_withType_asSubrowOfRow_animate( &self, @@ -80,6 +112,7 @@ extern_methods!( parentRow: NSInteger, shouldAnimate: bool, ); + #[method(setCriteria:andDisplayValues:forRowAtIndex:)] pub unsafe fn setCriteria_andDisplayValues_forRowAtIndex( &self, @@ -87,42 +120,57 @@ extern_methods!( values: &NSArray, rowIndex: NSInteger, ); + #[method(removeRowAtIndex:)] pub unsafe fn removeRowAtIndex(&self, rowIndex: NSInteger); + #[method(removeRowsAtIndexes:includeSubrows:)] pub unsafe fn removeRowsAtIndexes_includeSubrows( &self, rowIndexes: &NSIndexSet, includeSubrows: bool, ); + #[method_id(selectedRowIndexes)] pub unsafe fn selectedRowIndexes(&self) -> Id; + #[method(selectRowIndexes:byExtendingSelection:)] pub unsafe fn selectRowIndexes_byExtendingSelection( &self, indexes: &NSIndexSet, extend: bool, ); + #[method(rowClass)] pub unsafe fn rowClass(&self) -> &Class; + #[method(setRowClass:)] pub unsafe fn setRowClass(&self, rowClass: &Class); + #[method_id(rowTypeKeyPath)] pub unsafe fn rowTypeKeyPath(&self) -> Id; + #[method(setRowTypeKeyPath:)] pub unsafe fn setRowTypeKeyPath(&self, rowTypeKeyPath: &NSString); + #[method_id(subrowsKeyPath)] pub unsafe fn subrowsKeyPath(&self) -> Id; + #[method(setSubrowsKeyPath:)] pub unsafe fn setSubrowsKeyPath(&self, subrowsKeyPath: &NSString); + #[method_id(criteriaKeyPath)] pub unsafe fn criteriaKeyPath(&self) -> Id; + #[method(setCriteriaKeyPath:)] pub unsafe fn setCriteriaKeyPath(&self, criteriaKeyPath: &NSString); + #[method_id(displayValuesKeyPath)] pub unsafe fn displayValuesKeyPath(&self) -> Id; + #[method(setDisplayValuesKeyPath:)] pub unsafe fn setDisplayValuesKeyPath(&self, displayValuesKeyPath: &NSString); } ); + pub type NSRuleEditorDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs index 100ffbd7e..1cbff46e0 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSRulerMarker; + unsafe impl ClassType for NSRulerMarker { type Super = NSObject; } ); + extern_methods!( unsafe impl NSRulerMarker { #[method_id(initWithRulerView:markerLocation:image:imageOrigin:)] @@ -19,44 +24,64 @@ extern_methods!( image: &NSImage, imageOrigin: NSPoint, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(ruler)] pub unsafe fn ruler(&self) -> Option>; + #[method(markerLocation)] pub unsafe fn markerLocation(&self) -> CGFloat; + #[method(setMarkerLocation:)] pub unsafe fn setMarkerLocation(&self, markerLocation: CGFloat); + #[method_id(image)] pub unsafe fn image(&self) -> Id; + #[method(setImage:)] pub unsafe fn setImage(&self, image: &NSImage); + #[method(imageOrigin)] pub unsafe fn imageOrigin(&self) -> NSPoint; + #[method(setImageOrigin:)] pub unsafe fn setImageOrigin(&self, imageOrigin: NSPoint); + #[method(isMovable)] pub unsafe fn isMovable(&self) -> bool; + #[method(setMovable:)] pub unsafe fn setMovable(&self, movable: bool); + #[method(isRemovable)] pub unsafe fn isRemovable(&self) -> bool; + #[method(setRemovable:)] pub unsafe fn setRemovable(&self, removable: bool); + #[method(isDragging)] pub unsafe fn isDragging(&self) -> bool; + #[method_id(representedObject)] pub unsafe fn representedObject(&self) -> Option>; + #[method(setRepresentedObject:)] pub unsafe fn setRepresentedObject(&self, representedObject: Option<&NSCopying>); + #[method(imageRectInRuler)] pub unsafe fn imageRectInRuler(&self) -> NSRect; + #[method(thicknessRequiredInRuler)] pub unsafe fn thicknessRequiredInRuler(&self) -> CGFloat; + #[method(drawRect:)] pub unsafe fn drawRect(&self, rect: NSRect); + #[method(trackMouse:adding:)] pub unsafe fn trackMouse_adding(&self, mouseDownEvent: &NSEvent, isAdding: bool) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs index edd54e106..488a5d948 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerView.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSRulerViewUnitName = NSString; + extern_class!( #[derive(Debug)] pub struct NSRulerView; + unsafe impl ClassType for NSRulerView { type Super = NSView; } ); + extern_methods!( unsafe impl NSRulerView { #[method(registerUnitWithName:abbreviation:unitToPointsConversionFactor:stepUpCycle:stepDownCycle:)] @@ -20,89 +26,122 @@ extern_methods!( stepUpCycle: &NSArray, stepDownCycle: &NSArray, ); + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initWithScrollView:orientation:)] pub unsafe fn initWithScrollView_orientation( &self, scrollView: Option<&NSScrollView>, orientation: NSRulerOrientation, ) -> Id; + #[method_id(scrollView)] pub unsafe fn scrollView(&self) -> Option>; + #[method(setScrollView:)] pub unsafe fn setScrollView(&self, scrollView: Option<&NSScrollView>); + #[method(orientation)] pub unsafe fn orientation(&self) -> NSRulerOrientation; + #[method(setOrientation:)] pub unsafe fn setOrientation(&self, orientation: NSRulerOrientation); + #[method(baselineLocation)] pub unsafe fn baselineLocation(&self) -> CGFloat; + #[method(requiredThickness)] pub unsafe fn requiredThickness(&self) -> CGFloat; + #[method(ruleThickness)] pub unsafe fn ruleThickness(&self) -> CGFloat; + #[method(setRuleThickness:)] pub unsafe fn setRuleThickness(&self, ruleThickness: CGFloat); + #[method(reservedThicknessForMarkers)] pub unsafe fn reservedThicknessForMarkers(&self) -> CGFloat; + #[method(setReservedThicknessForMarkers:)] pub unsafe fn setReservedThicknessForMarkers(&self, reservedThicknessForMarkers: CGFloat); + #[method(reservedThicknessForAccessoryView)] pub unsafe fn reservedThicknessForAccessoryView(&self) -> CGFloat; + #[method(setReservedThicknessForAccessoryView:)] pub unsafe fn setReservedThicknessForAccessoryView( &self, reservedThicknessForAccessoryView: CGFloat, ); + #[method_id(measurementUnits)] pub unsafe fn measurementUnits(&self) -> Id; + #[method(setMeasurementUnits:)] pub unsafe fn setMeasurementUnits(&self, measurementUnits: &NSRulerViewUnitName); + #[method(originOffset)] pub unsafe fn originOffset(&self) -> CGFloat; + #[method(setOriginOffset:)] pub unsafe fn setOriginOffset(&self, originOffset: CGFloat); + #[method_id(clientView)] pub unsafe fn clientView(&self) -> Option>; + #[method(setClientView:)] pub unsafe fn setClientView(&self, clientView: Option<&NSView>); + #[method(addMarker:)] pub unsafe fn addMarker(&self, marker: &NSRulerMarker); + #[method(removeMarker:)] pub unsafe fn removeMarker(&self, marker: &NSRulerMarker); + #[method_id(markers)] pub unsafe fn markers(&self) -> Option, Shared>>; + #[method(setMarkers:)] pub unsafe fn setMarkers(&self, markers: Option<&NSArray>); + #[method(trackMarker:withMouseEvent:)] pub unsafe fn trackMarker_withMouseEvent( &self, marker: &NSRulerMarker, event: &NSEvent, ) -> bool; + #[method_id(accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method(moveRulerlineFromLocation:toLocation:)] pub unsafe fn moveRulerlineFromLocation_toLocation( &self, oldLocation: CGFloat, newLocation: CGFloat, ); + #[method(invalidateHashMarks)] pub unsafe fn invalidateHashMarks(&self); + #[method(drawHashMarksAndLabelsInRect:)] pub unsafe fn drawHashMarksAndLabelsInRect(&self, rect: NSRect); + #[method(drawMarkersInRect:)] pub unsafe fn drawMarkersInRect(&self, rect: NSRect); + #[method(isFlipped)] pub unsafe fn isFlipped(&self) -> bool; } ); + extern_methods!( - #[doc = "NSRulerMarkerClientViewDelegation"] + /// NSRulerMarkerClientViewDelegation unsafe impl NSView { #[method(rulerView:shouldMoveMarker:)] pub unsafe fn rulerView_shouldMoveMarker( @@ -110,6 +149,7 @@ extern_methods!( ruler: &NSRulerView, marker: &NSRulerMarker, ) -> bool; + #[method(rulerView:willMoveMarker:toLocation:)] pub unsafe fn rulerView_willMoveMarker_toLocation( &self, @@ -117,22 +157,27 @@ extern_methods!( marker: &NSRulerMarker, location: CGFloat, ) -> CGFloat; + #[method(rulerView:didMoveMarker:)] pub unsafe fn rulerView_didMoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:shouldRemoveMarker:)] pub unsafe fn rulerView_shouldRemoveMarker( &self, ruler: &NSRulerView, marker: &NSRulerMarker, ) -> bool; + #[method(rulerView:didRemoveMarker:)] pub unsafe fn rulerView_didRemoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:shouldAddMarker:)] pub unsafe fn rulerView_shouldAddMarker( &self, ruler: &NSRulerView, marker: &NSRulerMarker, ) -> bool; + #[method(rulerView:willAddMarker:atLocation:)] pub unsafe fn rulerView_willAddMarker_atLocation( &self, @@ -140,18 +185,23 @@ extern_methods!( marker: &NSRulerMarker, location: CGFloat, ) -> CGFloat; + #[method(rulerView:didAddMarker:)] pub unsafe fn rulerView_didAddMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:handleMouseDown:)] pub unsafe fn rulerView_handleMouseDown(&self, ruler: &NSRulerView, event: &NSEvent); + #[method(rulerView:willSetClientView:)] pub unsafe fn rulerView_willSetClientView(&self, ruler: &NSRulerView, newClient: &NSView); + #[method(rulerView:locationForPoint:)] pub unsafe fn rulerView_locationForPoint( &self, ruler: &NSRulerView, point: NSPoint, ) -> CGFloat; + #[method(rulerView:pointForLocation:)] pub unsafe fn rulerView_pointForLocation( &self, diff --git a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs index daf1d10d1..a7b41f115 100644 --- a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs @@ -1,70 +1,98 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSRunningApplication; + unsafe impl ClassType for NSRunningApplication { type Super = NSObject; } ); + extern_methods!( unsafe impl NSRunningApplication { #[method(isTerminated)] pub unsafe fn isTerminated(&self) -> bool; + #[method(isFinishedLaunching)] pub unsafe fn isFinishedLaunching(&self) -> bool; + #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[method(isActive)] pub unsafe fn isActive(&self) -> bool; + #[method(ownsMenuBar)] pub unsafe fn ownsMenuBar(&self) -> bool; + #[method(activationPolicy)] pub unsafe fn activationPolicy(&self) -> NSApplicationActivationPolicy; + #[method_id(localizedName)] pub unsafe fn localizedName(&self) -> Option>; + #[method_id(bundleIdentifier)] pub unsafe fn bundleIdentifier(&self) -> Option>; + #[method_id(bundleURL)] pub unsafe fn bundleURL(&self) -> Option>; + #[method_id(executableURL)] pub unsafe fn executableURL(&self) -> Option>; + #[method(processIdentifier)] pub unsafe fn processIdentifier(&self) -> pid_t; + #[method_id(launchDate)] pub unsafe fn launchDate(&self) -> Option>; + #[method_id(icon)] pub unsafe fn icon(&self) -> Option>; + #[method(executableArchitecture)] pub unsafe fn executableArchitecture(&self) -> NSInteger; + #[method(hide)] pub unsafe fn hide(&self) -> bool; + #[method(unhide)] pub unsafe fn unhide(&self) -> bool; + #[method(activateWithOptions:)] pub unsafe fn activateWithOptions(&self, options: NSApplicationActivationOptions) -> bool; + #[method(terminate)] pub unsafe fn terminate(&self) -> bool; + #[method(forceTerminate)] pub unsafe fn forceTerminate(&self) -> bool; + #[method_id(runningApplicationsWithBundleIdentifier:)] pub unsafe fn runningApplicationsWithBundleIdentifier( bundleIdentifier: &NSString, ) -> Id, Shared>; + #[method_id(runningApplicationWithProcessIdentifier:)] pub unsafe fn runningApplicationWithProcessIdentifier( pid: pid_t, ) -> Option>; + #[method_id(currentApplication)] pub unsafe fn currentApplication() -> Id; + #[method(terminateAutomaticallyTerminableApplications)] pub unsafe fn terminateAutomaticallyTerminableApplications(); } ); + extern_methods!( - #[doc = "NSWorkspaceRunningApplications"] + /// NSWorkspaceRunningApplications unsafe impl NSWorkspace { #[method_id(runningApplications)] pub unsafe fn runningApplications(&self) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index 4c614ebd7..2bcba9fff 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -1,119 +1,170 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSavePanel; + unsafe impl ClassType for NSSavePanel { type Super = NSPanel; } ); + extern_methods!( unsafe impl NSSavePanel { #[method_id(savePanel)] pub unsafe fn savePanel() -> Id; + #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; + #[method_id(directoryURL)] pub unsafe fn directoryURL(&self) -> Option>; + #[method(setDirectoryURL:)] pub unsafe fn setDirectoryURL(&self, directoryURL: Option<&NSURL>); + #[method_id(allowedContentTypes)] pub unsafe fn allowedContentTypes(&self) -> Id, Shared>; + #[method(setAllowedContentTypes:)] pub unsafe fn setAllowedContentTypes(&self, allowedContentTypes: &NSArray); + #[method(allowsOtherFileTypes)] pub unsafe fn allowsOtherFileTypes(&self) -> bool; + #[method(setAllowsOtherFileTypes:)] pub unsafe fn setAllowsOtherFileTypes(&self, allowsOtherFileTypes: bool); + #[method_id(accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSOpenSavePanelDelegate>); + #[method(isExpanded)] pub unsafe fn isExpanded(&self) -> bool; + #[method(canCreateDirectories)] pub unsafe fn canCreateDirectories(&self) -> bool; + #[method(setCanCreateDirectories:)] pub unsafe fn setCanCreateDirectories(&self, canCreateDirectories: bool); + #[method(canSelectHiddenExtension)] pub unsafe fn canSelectHiddenExtension(&self) -> bool; + #[method(setCanSelectHiddenExtension:)] pub unsafe fn setCanSelectHiddenExtension(&self, canSelectHiddenExtension: bool); + #[method(isExtensionHidden)] pub unsafe fn isExtensionHidden(&self) -> bool; + #[method(setExtensionHidden:)] pub unsafe fn setExtensionHidden(&self, extensionHidden: bool); + #[method(treatsFilePackagesAsDirectories)] pub unsafe fn treatsFilePackagesAsDirectories(&self) -> bool; + #[method(setTreatsFilePackagesAsDirectories:)] pub unsafe fn setTreatsFilePackagesAsDirectories( &self, treatsFilePackagesAsDirectories: bool, ); + #[method_id(prompt)] pub unsafe fn prompt(&self) -> Id; + #[method(setPrompt:)] pub unsafe fn setPrompt(&self, prompt: Option<&NSString>); + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(nameFieldLabel)] pub unsafe fn nameFieldLabel(&self) -> Id; + #[method(setNameFieldLabel:)] pub unsafe fn setNameFieldLabel(&self, nameFieldLabel: Option<&NSString>); + #[method_id(nameFieldStringValue)] pub unsafe fn nameFieldStringValue(&self) -> Id; + #[method(setNameFieldStringValue:)] pub unsafe fn setNameFieldStringValue(&self, nameFieldStringValue: &NSString); + #[method_id(message)] pub unsafe fn message(&self) -> Id; + #[method(setMessage:)] pub unsafe fn setMessage(&self, message: Option<&NSString>); + #[method(validateVisibleColumns)] pub unsafe fn validateVisibleColumns(&self); + #[method(showsHiddenFiles)] pub unsafe fn showsHiddenFiles(&self) -> bool; + #[method(setShowsHiddenFiles:)] pub unsafe fn setShowsHiddenFiles(&self, showsHiddenFiles: bool); + #[method(showsTagField)] pub unsafe fn showsTagField(&self) -> bool; + #[method(setShowsTagField:)] pub unsafe fn setShowsTagField(&self, showsTagField: bool); + #[method_id(tagNames)] pub unsafe fn tagNames(&self) -> Option, Shared>>; + #[method(setTagNames:)] pub unsafe fn setTagNames(&self, tagNames: Option<&NSArray>); + #[method(ok:)] pub unsafe fn ok(&self, sender: Option<&Object>); + #[method(cancel:)] pub unsafe fn cancel(&self, sender: Option<&Object>); + #[method(beginSheetModalForWindow:completionHandler:)] pub unsafe fn beginSheetModalForWindow_completionHandler( &self, window: &NSWindow, handler: TodoBlock, ); + #[method(beginWithCompletionHandler:)] pub unsafe fn beginWithCompletionHandler(&self, handler: TodoBlock); + #[method(runModal)] pub unsafe fn runModal(&self) -> NSModalResponse; } ); + pub type NSOpenSavePanelDelegate = NSObject; + extern_methods!( - #[doc = "NSSavePanelDelegateDeprecated"] + /// NSSavePanelDelegateDeprecated unsafe impl NSObject { #[method(panel:isValidFilename:)] pub unsafe fn panel_isValidFilename(&self, sender: &Object, filename: &NSString) -> bool; + #[method(panel:directoryDidChange:)] pub unsafe fn panel_directoryDidChange(&self, sender: &Object, path: &NSString); + #[method(panel:compareFilename:with:caseSensitive:)] pub unsafe fn panel_compareFilename_with_caseSensitive( &self, @@ -122,24 +173,31 @@ extern_methods!( name2: &NSString, caseSensitive: bool, ) -> NSComparisonResult; + #[method(panel:shouldShowFilename:)] pub unsafe fn panel_shouldShowFilename(&self, sender: &Object, filename: &NSString) -> bool; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSSavePanel { #[method_id(filename)] pub unsafe fn filename(&self) -> Id; + #[method_id(directory)] pub unsafe fn directory(&self) -> Id; + #[method(setDirectory:)] pub unsafe fn setDirectory(&self, path: Option<&NSString>); + #[method_id(requiredFileType)] pub unsafe fn requiredFileType(&self) -> Option>; + #[method(setRequiredFileType:)] pub unsafe fn setRequiredFileType(&self, type_: Option<&NSString>); + #[method(beginSheetForDirectory:file:modalForWindow:modalDelegate:didEndSelector:contextInfo:)] pub unsafe fn beginSheetForDirectory_file_modalForWindow_modalDelegate_didEndSelector_contextInfo( &self, @@ -150,16 +208,20 @@ extern_methods!( didEndSelector: Option, contextInfo: *mut c_void, ); + #[method(runModalForDirectory:file:)] pub unsafe fn runModalForDirectory_file( &self, path: Option<&NSString>, name: Option<&NSString>, ) -> NSInteger; + #[method(selectText:)] pub unsafe fn selectText(&self, sender: Option<&Object>); + #[method_id(allowedFileTypes)] pub unsafe fn allowedFileTypes(&self) -> Option, Shared>>; + #[method(setAllowedFileTypes:)] pub unsafe fn setAllowedFileTypes(&self, allowedFileTypes: Option<&NSArray>); } diff --git a/crates/icrate/src/generated/AppKit/NSScreen.rs b/crates/icrate/src/generated/AppKit/NSScreen.rs index 3d9bc4cb1..3acd3ce05 100644 --- a/crates/icrate/src/generated/AppKit/NSScreen.rs +++ b/crates/icrate/src/generated/AppKit/NSScreen.rs @@ -1,88 +1,120 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScreen; + unsafe impl ClassType for NSScreen { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScreen { #[method_id(screens)] pub unsafe fn screens() -> Id, Shared>; + #[method_id(mainScreen)] pub unsafe fn mainScreen() -> Option>; + #[method_id(deepestScreen)] pub unsafe fn deepestScreen() -> Option>; + #[method(screensHaveSeparateSpaces)] pub unsafe fn screensHaveSeparateSpaces() -> bool; + #[method(depth)] pub unsafe fn depth(&self) -> NSWindowDepth; + #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[method(visibleFrame)] pub unsafe fn visibleFrame(&self) -> NSRect; + #[method_id(deviceDescription)] pub unsafe fn deviceDescription( &self, ) -> Id, Shared>; + #[method_id(colorSpace)] pub unsafe fn colorSpace(&self) -> Option>; + #[method(supportedWindowDepths)] pub unsafe fn supportedWindowDepths(&self) -> NonNull; + #[method(canRepresentDisplayGamut:)] pub unsafe fn canRepresentDisplayGamut(&self, displayGamut: NSDisplayGamut) -> bool; + #[method(convertRectToBacking:)] pub unsafe fn convertRectToBacking(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromBacking:)] pub unsafe fn convertRectFromBacking(&self, rect: NSRect) -> NSRect; + #[method(backingAlignedRect:options:)] pub unsafe fn backingAlignedRect_options( &self, rect: NSRect, options: NSAlignmentOptions, ) -> NSRect; + #[method(backingScaleFactor)] pub unsafe fn backingScaleFactor(&self) -> CGFloat; + #[method_id(localizedName)] pub unsafe fn localizedName(&self) -> Id; + #[method(safeAreaInsets)] pub unsafe fn safeAreaInsets(&self) -> NSEdgeInsets; + #[method(auxiliaryTopLeftArea)] pub unsafe fn auxiliaryTopLeftArea(&self) -> NSRect; + #[method(auxiliaryTopRightArea)] pub unsafe fn auxiliaryTopRightArea(&self) -> NSRect; } ); + extern_methods!( unsafe impl NSScreen { #[method(maximumExtendedDynamicRangeColorComponentValue)] pub unsafe fn maximumExtendedDynamicRangeColorComponentValue(&self) -> CGFloat; + #[method(maximumPotentialExtendedDynamicRangeColorComponentValue)] pub unsafe fn maximumPotentialExtendedDynamicRangeColorComponentValue(&self) -> CGFloat; + #[method(maximumReferenceExtendedDynamicRangeColorComponentValue)] pub unsafe fn maximumReferenceExtendedDynamicRangeColorComponentValue(&self) -> CGFloat; } ); + extern_methods!( unsafe impl NSScreen { #[method(maximumFramesPerSecond)] pub unsafe fn maximumFramesPerSecond(&self) -> NSInteger; + #[method(minimumRefreshInterval)] pub unsafe fn minimumRefreshInterval(&self) -> NSTimeInterval; + #[method(maximumRefreshInterval)] pub unsafe fn maximumRefreshInterval(&self) -> NSTimeInterval; + #[method(displayUpdateGranularity)] pub unsafe fn displayUpdateGranularity(&self) -> NSTimeInterval; + #[method(lastDisplayUpdateTimestamp)] pub unsafe fn lastDisplayUpdateTimestamp(&self) -> NSTimeInterval; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSScreen { #[method(userSpaceScaleFactor)] pub unsafe fn userSpaceScaleFactor(&self) -> CGFloat; diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index c9b3a290a..178d712c4 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -1,20 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScrollView; + unsafe impl ClassType for NSScrollView { type Super = NSView; } ); + extern_methods!( unsafe impl NSScrollView { #[method_id(initWithFrame:)] pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:)] pub unsafe fn frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle( cSize: NSSize, @@ -24,6 +31,7 @@ extern_methods!( controlSize: NSControlSize, scrollerStyle: NSScrollerStyle, ) -> NSSize; + #[method(contentSizeForFrameSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:)] pub unsafe fn contentSizeForFrameSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle( fSize: NSSize, @@ -33,6 +41,7 @@ extern_methods!( controlSize: NSControlSize, scrollerStyle: NSScrollerStyle, ) -> NSSize; + #[method(frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:)] pub unsafe fn frameSizeForContentSize_hasHorizontalScroller_hasVerticalScroller_borderType( cSize: NSSize, @@ -40,6 +49,7 @@ extern_methods!( vFlag: bool, type_: NSBorderType, ) -> NSSize; + #[method(contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:)] pub unsafe fn contentSizeForFrameSize_hasHorizontalScroller_hasVerticalScroller_borderType( fSize: NSSize, @@ -47,193 +57,276 @@ extern_methods!( vFlag: bool, type_: NSBorderType, ) -> NSSize; + #[method(documentVisibleRect)] pub unsafe fn documentVisibleRect(&self) -> NSRect; + #[method(contentSize)] pub unsafe fn contentSize(&self) -> NSSize; + #[method_id(documentView)] pub unsafe fn documentView(&self) -> Option>; + #[method(setDocumentView:)] pub unsafe fn setDocumentView(&self, documentView: Option<&NSView>); + #[method_id(contentView)] pub unsafe fn contentView(&self) -> Id; + #[method(setContentView:)] pub unsafe fn setContentView(&self, contentView: &NSClipView); + #[method_id(documentCursor)] pub unsafe fn documentCursor(&self) -> Option>; + #[method(setDocumentCursor:)] pub unsafe fn setDocumentCursor(&self, documentCursor: Option<&NSCursor>); + #[method(borderType)] pub unsafe fn borderType(&self) -> NSBorderType; + #[method(setBorderType:)] pub unsafe fn setBorderType(&self, borderType: NSBorderType); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method(hasVerticalScroller)] pub unsafe fn hasVerticalScroller(&self) -> bool; + #[method(setHasVerticalScroller:)] pub unsafe fn setHasVerticalScroller(&self, hasVerticalScroller: bool); + #[method(hasHorizontalScroller)] pub unsafe fn hasHorizontalScroller(&self) -> bool; + #[method(setHasHorizontalScroller:)] pub unsafe fn setHasHorizontalScroller(&self, hasHorizontalScroller: bool); + #[method_id(verticalScroller)] pub unsafe fn verticalScroller(&self) -> Option>; + #[method(setVerticalScroller:)] pub unsafe fn setVerticalScroller(&self, verticalScroller: Option<&NSScroller>); + #[method_id(horizontalScroller)] pub unsafe fn horizontalScroller(&self) -> Option>; + #[method(setHorizontalScroller:)] pub unsafe fn setHorizontalScroller(&self, horizontalScroller: Option<&NSScroller>); + #[method(autohidesScrollers)] pub unsafe fn autohidesScrollers(&self) -> bool; + #[method(setAutohidesScrollers:)] pub unsafe fn setAutohidesScrollers(&self, autohidesScrollers: bool); + #[method(horizontalLineScroll)] pub unsafe fn horizontalLineScroll(&self) -> CGFloat; + #[method(setHorizontalLineScroll:)] pub unsafe fn setHorizontalLineScroll(&self, horizontalLineScroll: CGFloat); + #[method(verticalLineScroll)] pub unsafe fn verticalLineScroll(&self) -> CGFloat; + #[method(setVerticalLineScroll:)] pub unsafe fn setVerticalLineScroll(&self, verticalLineScroll: CGFloat); + #[method(lineScroll)] pub unsafe fn lineScroll(&self) -> CGFloat; + #[method(setLineScroll:)] pub unsafe fn setLineScroll(&self, lineScroll: CGFloat); + #[method(horizontalPageScroll)] pub unsafe fn horizontalPageScroll(&self) -> CGFloat; + #[method(setHorizontalPageScroll:)] pub unsafe fn setHorizontalPageScroll(&self, horizontalPageScroll: CGFloat); + #[method(verticalPageScroll)] pub unsafe fn verticalPageScroll(&self) -> CGFloat; + #[method(setVerticalPageScroll:)] pub unsafe fn setVerticalPageScroll(&self, verticalPageScroll: CGFloat); + #[method(pageScroll)] pub unsafe fn pageScroll(&self) -> CGFloat; + #[method(setPageScroll:)] pub unsafe fn setPageScroll(&self, pageScroll: CGFloat); + #[method(scrollsDynamically)] pub unsafe fn scrollsDynamically(&self) -> bool; + #[method(setScrollsDynamically:)] pub unsafe fn setScrollsDynamically(&self, scrollsDynamically: bool); + #[method(tile)] pub unsafe fn tile(&self); + #[method(reflectScrolledClipView:)] pub unsafe fn reflectScrolledClipView(&self, cView: &NSClipView); + #[method(scrollWheel:)] pub unsafe fn scrollWheel(&self, event: &NSEvent); + #[method(scrollerStyle)] pub unsafe fn scrollerStyle(&self) -> NSScrollerStyle; + #[method(setScrollerStyle:)] pub unsafe fn setScrollerStyle(&self, scrollerStyle: NSScrollerStyle); + #[method(scrollerKnobStyle)] pub unsafe fn scrollerKnobStyle(&self) -> NSScrollerKnobStyle; + #[method(setScrollerKnobStyle:)] pub unsafe fn setScrollerKnobStyle(&self, scrollerKnobStyle: NSScrollerKnobStyle); + #[method(flashScrollers)] pub unsafe fn flashScrollers(&self); + #[method(horizontalScrollElasticity)] pub unsafe fn horizontalScrollElasticity(&self) -> NSScrollElasticity; + #[method(setHorizontalScrollElasticity:)] pub unsafe fn setHorizontalScrollElasticity( &self, horizontalScrollElasticity: NSScrollElasticity, ); + #[method(verticalScrollElasticity)] pub unsafe fn verticalScrollElasticity(&self) -> NSScrollElasticity; + #[method(setVerticalScrollElasticity:)] pub unsafe fn setVerticalScrollElasticity( &self, verticalScrollElasticity: NSScrollElasticity, ); + #[method(usesPredominantAxisScrolling)] pub unsafe fn usesPredominantAxisScrolling(&self) -> bool; + #[method(setUsesPredominantAxisScrolling:)] pub unsafe fn setUsesPredominantAxisScrolling(&self, usesPredominantAxisScrolling: bool); + #[method(allowsMagnification)] pub unsafe fn allowsMagnification(&self) -> bool; + #[method(setAllowsMagnification:)] pub unsafe fn setAllowsMagnification(&self, allowsMagnification: bool); + #[method(magnification)] pub unsafe fn magnification(&self) -> CGFloat; + #[method(setMagnification:)] pub unsafe fn setMagnification(&self, magnification: CGFloat); + #[method(maxMagnification)] pub unsafe fn maxMagnification(&self) -> CGFloat; + #[method(setMaxMagnification:)] pub unsafe fn setMaxMagnification(&self, maxMagnification: CGFloat); + #[method(minMagnification)] pub unsafe fn minMagnification(&self) -> CGFloat; + #[method(setMinMagnification:)] pub unsafe fn setMinMagnification(&self, minMagnification: CGFloat); + #[method(magnifyToFitRect:)] pub unsafe fn magnifyToFitRect(&self, rect: NSRect); + #[method(setMagnification:centeredAtPoint:)] pub unsafe fn setMagnification_centeredAtPoint( &self, magnification: CGFloat, point: NSPoint, ); + #[method(addFloatingSubview:forAxis:)] pub unsafe fn addFloatingSubview_forAxis(&self, view: &NSView, axis: NSEventGestureAxis); + #[method(automaticallyAdjustsContentInsets)] pub unsafe fn automaticallyAdjustsContentInsets(&self) -> bool; + #[method(setAutomaticallyAdjustsContentInsets:)] pub unsafe fn setAutomaticallyAdjustsContentInsets( &self, automaticallyAdjustsContentInsets: bool, ); + #[method(contentInsets)] pub unsafe fn contentInsets(&self) -> NSEdgeInsets; + #[method(setContentInsets:)] pub unsafe fn setContentInsets(&self, contentInsets: NSEdgeInsets); + #[method(scrollerInsets)] pub unsafe fn scrollerInsets(&self) -> NSEdgeInsets; + #[method(setScrollerInsets:)] pub unsafe fn setScrollerInsets(&self, scrollerInsets: NSEdgeInsets); } ); + extern_methods!( - #[doc = "NSRulerSupport"] + /// NSRulerSupport unsafe impl NSScrollView { #[method(rulerViewClass)] pub unsafe fn rulerViewClass() -> Option<&Class>; + #[method(setRulerViewClass:)] pub unsafe fn setRulerViewClass(rulerViewClass: Option<&Class>); + #[method(rulersVisible)] pub unsafe fn rulersVisible(&self) -> bool; + #[method(setRulersVisible:)] pub unsafe fn setRulersVisible(&self, rulersVisible: bool); + #[method(hasHorizontalRuler)] pub unsafe fn hasHorizontalRuler(&self) -> bool; + #[method(setHasHorizontalRuler:)] pub unsafe fn setHasHorizontalRuler(&self, hasHorizontalRuler: bool); + #[method(hasVerticalRuler)] pub unsafe fn hasVerticalRuler(&self) -> bool; + #[method(setHasVerticalRuler:)] pub unsafe fn setHasVerticalRuler(&self, hasVerticalRuler: bool); + #[method_id(horizontalRulerView)] pub unsafe fn horizontalRulerView(&self) -> Option>; + #[method(setHorizontalRulerView:)] pub unsafe fn setHorizontalRulerView(&self, horizontalRulerView: Option<&NSRulerView>); + #[method_id(verticalRulerView)] pub unsafe fn verticalRulerView(&self) -> Option>; + #[method(setVerticalRulerView:)] pub unsafe fn setVerticalRulerView(&self, verticalRulerView: Option<&NSRulerView>); } ); + extern_methods!( - #[doc = "NSFindBarSupport"] + /// NSFindBarSupport unsafe impl NSScrollView { #[method(findBarPosition)] pub unsafe fn findBarPosition(&self) -> NSScrollViewFindBarPosition; + #[method(setFindBarPosition:)] pub unsafe fn setFindBarPosition(&self, findBarPosition: NSScrollViewFindBarPosition); } diff --git a/crates/icrate/src/generated/AppKit/NSScroller.rs b/crates/icrate/src/generated/AppKit/NSScroller.rs index f297b04c1..7d1d81dfe 100644 --- a/crates/icrate/src/generated/AppKit/NSScroller.rs +++ b/crates/icrate/src/generated/AppKit/NSScroller.rs @@ -1,82 +1,116 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScroller; + unsafe impl ClassType for NSScroller { type Super = NSControl; } ); + extern_methods!( unsafe impl NSScroller { #[method(isCompatibleWithOverlayScrollers)] pub unsafe fn isCompatibleWithOverlayScrollers() -> bool; + #[method(scrollerWidthForControlSize:scrollerStyle:)] pub unsafe fn scrollerWidthForControlSize_scrollerStyle( controlSize: NSControlSize, scrollerStyle: NSScrollerStyle, ) -> CGFloat; + #[method(preferredScrollerStyle)] pub unsafe fn preferredScrollerStyle() -> NSScrollerStyle; + #[method(scrollerStyle)] pub unsafe fn scrollerStyle(&self) -> NSScrollerStyle; + #[method(setScrollerStyle:)] pub unsafe fn setScrollerStyle(&self, scrollerStyle: NSScrollerStyle); + #[method(knobStyle)] pub unsafe fn knobStyle(&self) -> NSScrollerKnobStyle; + #[method(setKnobStyle:)] pub unsafe fn setKnobStyle(&self, knobStyle: NSScrollerKnobStyle); + #[method(rectForPart:)] pub unsafe fn rectForPart(&self, partCode: NSScrollerPart) -> NSRect; + #[method(checkSpaceForParts)] pub unsafe fn checkSpaceForParts(&self); + #[method(usableParts)] pub unsafe fn usableParts(&self) -> NSUsableScrollerParts; + #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; + #[method(setControlSize:)] pub unsafe fn setControlSize(&self, controlSize: NSControlSize); + #[method(drawKnob)] pub unsafe fn drawKnob(&self); + #[method(drawKnobSlotInRect:highlight:)] pub unsafe fn drawKnobSlotInRect_highlight(&self, slotRect: NSRect, flag: bool); + #[method(testPart:)] pub unsafe fn testPart(&self, point: NSPoint) -> NSScrollerPart; + #[method(trackKnob:)] pub unsafe fn trackKnob(&self, event: &NSEvent); + #[method(hitPart)] pub unsafe fn hitPart(&self) -> NSScrollerPart; + #[method(knobProportion)] pub unsafe fn knobProportion(&self) -> CGFloat; + #[method(setKnobProportion:)] pub unsafe fn setKnobProportion(&self, knobProportion: CGFloat); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSScroller { #[method(scrollerWidthForControlSize:)] pub unsafe fn scrollerWidthForControlSize(controlSize: NSControlSize) -> CGFloat; + #[method(scrollerWidth)] pub unsafe fn scrollerWidth() -> CGFloat; + #[method(setFloatValue:knobProportion:)] pub unsafe fn setFloatValue_knobProportion(&self, value: c_float, proportion: CGFloat); + #[method(arrowsPosition)] pub unsafe fn arrowsPosition(&self) -> NSScrollArrowPosition; + #[method(setArrowsPosition:)] pub unsafe fn setArrowsPosition(&self, arrowsPosition: NSScrollArrowPosition); + #[method(controlTint)] pub unsafe fn controlTint(&self) -> NSControlTint; + #[method(setControlTint:)] pub unsafe fn setControlTint(&self, controlTint: NSControlTint); + #[method(highlight:)] pub unsafe fn highlight(&self, flag: bool); + #[method(trackScrollButtons:)] pub unsafe fn trackScrollButtons(&self, event: &NSEvent); + #[method(drawParts)] pub unsafe fn drawParts(&self); + #[method(drawArrow:highlight:)] pub unsafe fn drawArrow_highlight(&self, whichArrow: NSScrollerArrow, flag: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs index e7cecf68d..1ad8af4ac 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubber.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -1,149 +1,205 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSScrubberDataSource = NSObject; + pub type NSScrubberDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSScrubberSelectionStyle; + unsafe impl ClassType for NSScrubberSelectionStyle { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScrubberSelectionStyle { #[method_id(outlineOverlayStyle)] pub unsafe fn outlineOverlayStyle() -> Id; + #[method_id(roundedBackgroundStyle)] pub unsafe fn roundedBackgroundStyle() -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(makeSelectionView)] pub unsafe fn makeSelectionView(&self) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSScrubber; + unsafe impl ClassType for NSScrubber { type Super = NSView; } ); + extern_methods!( unsafe impl NSScrubber { #[method_id(dataSource)] pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] pub unsafe fn setDataSource(&self, dataSource: Option<&NSScrubberDataSource>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSScrubberDelegate>); + #[method_id(scrubberLayout)] pub unsafe fn scrubberLayout(&self) -> Id; + #[method(setScrubberLayout:)] pub unsafe fn setScrubberLayout(&self, scrubberLayout: &NSScrubberLayout); + #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(highlightedIndex)] pub unsafe fn highlightedIndex(&self) -> NSInteger; + #[method(selectedIndex)] pub unsafe fn selectedIndex(&self) -> NSInteger; + #[method(setSelectedIndex:)] pub unsafe fn setSelectedIndex(&self, selectedIndex: NSInteger); + #[method(mode)] pub unsafe fn mode(&self) -> NSScrubberMode; + #[method(setMode:)] pub unsafe fn setMode(&self, mode: NSScrubberMode); + #[method(itemAlignment)] pub unsafe fn itemAlignment(&self) -> NSScrubberAlignment; + #[method(setItemAlignment:)] pub unsafe fn setItemAlignment(&self, itemAlignment: NSScrubberAlignment); + #[method(isContinuous)] pub unsafe fn isContinuous(&self) -> bool; + #[method(setContinuous:)] pub unsafe fn setContinuous(&self, continuous: bool); + #[method(floatsSelectionViews)] pub unsafe fn floatsSelectionViews(&self) -> bool; + #[method(setFloatsSelectionViews:)] pub unsafe fn setFloatsSelectionViews(&self, floatsSelectionViews: bool); + #[method_id(selectionBackgroundStyle)] pub unsafe fn selectionBackgroundStyle( &self, ) -> Option>; + #[method(setSelectionBackgroundStyle:)] pub unsafe fn setSelectionBackgroundStyle( &self, selectionBackgroundStyle: Option<&NSScrubberSelectionStyle>, ); + #[method_id(selectionOverlayStyle)] pub unsafe fn selectionOverlayStyle(&self) -> Option>; + #[method(setSelectionOverlayStyle:)] pub unsafe fn setSelectionOverlayStyle( &self, selectionOverlayStyle: Option<&NSScrubberSelectionStyle>, ); + #[method(showsArrowButtons)] pub unsafe fn showsArrowButtons(&self) -> bool; + #[method(setShowsArrowButtons:)] pub unsafe fn setShowsArrowButtons(&self, showsArrowButtons: bool); + #[method(showsAdditionalContentIndicators)] pub unsafe fn showsAdditionalContentIndicators(&self) -> bool; + #[method(setShowsAdditionalContentIndicators:)] pub unsafe fn setShowsAdditionalContentIndicators( &self, showsAdditionalContentIndicators: bool, ); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method_id(backgroundView)] pub unsafe fn backgroundView(&self) -> Option>; + #[method(setBackgroundView:)] pub unsafe fn setBackgroundView(&self, backgroundView: Option<&NSView>); + #[method_id(initWithFrame:)] pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(reloadData)] pub unsafe fn reloadData(&self); + #[method(performSequentialBatchUpdates:)] pub unsafe fn performSequentialBatchUpdates(&self, updateBlock: TodoBlock); + #[method(insertItemsAtIndexes:)] pub unsafe fn insertItemsAtIndexes(&self, indexes: &NSIndexSet); + #[method(removeItemsAtIndexes:)] pub unsafe fn removeItemsAtIndexes(&self, indexes: &NSIndexSet); + #[method(reloadItemsAtIndexes:)] pub unsafe fn reloadItemsAtIndexes(&self, indexes: &NSIndexSet); + #[method(moveItemAtIndex:toIndex:)] pub unsafe fn moveItemAtIndex_toIndex(&self, oldIndex: NSInteger, newIndex: NSInteger); + #[method(scrollItemAtIndex:toAlignment:)] pub unsafe fn scrollItemAtIndex_toAlignment( &self, index: NSInteger, alignment: NSScrubberAlignment, ); + #[method_id(itemViewForItemAtIndex:)] pub unsafe fn itemViewForItemAtIndex( &self, index: NSInteger, ) -> Option>; + #[method(registerClass:forItemIdentifier:)] pub unsafe fn registerClass_forItemIdentifier( &self, itemViewClass: Option<&Class>, itemIdentifier: &NSUserInterfaceItemIdentifier, ); + #[method(registerNib:forItemIdentifier:)] pub unsafe fn registerNib_forItemIdentifier( &self, nib: Option<&NSNib>, itemIdentifier: &NSUserInterfaceItemIdentifier, ); + #[method_id(makeItemWithIdentifier:owner:)] pub unsafe fn makeItemWithIdentifier_owner( &self, diff --git a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs index ca310032a..c044da4f6 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs @@ -1,82 +1,109 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScrubberArrangedView; + unsafe impl ClassType for NSScrubberArrangedView { type Super = NSView; } ); + extern_methods!( unsafe impl NSScrubberArrangedView { #[method(isSelected)] pub unsafe fn isSelected(&self) -> bool; + #[method(setSelected:)] pub unsafe fn setSelected(&self, selected: bool); + #[method(isHighlighted)] pub unsafe fn isHighlighted(&self) -> bool; + #[method(setHighlighted:)] pub unsafe fn setHighlighted(&self, highlighted: bool); + #[method(applyLayoutAttributes:)] pub unsafe fn applyLayoutAttributes(&self, layoutAttributes: &NSScrubberLayoutAttributes); } ); + extern_class!( #[derive(Debug)] pub struct NSScrubberSelectionView; + unsafe impl ClassType for NSScrubberSelectionView { type Super = NSScrubberArrangedView; } ); + extern_methods!( unsafe impl NSScrubberSelectionView {} ); + extern_class!( #[derive(Debug)] pub struct NSScrubberItemView; + unsafe impl ClassType for NSScrubberItemView { type Super = NSScrubberArrangedView; } ); + extern_methods!( unsafe impl NSScrubberItemView {} ); + extern_class!( #[derive(Debug)] pub struct NSScrubberTextItemView; + unsafe impl ClassType for NSScrubberTextItemView { type Super = NSScrubberItemView; } ); + extern_methods!( unsafe impl NSScrubberTextItemView { #[method_id(textField)] pub unsafe fn textField(&self) -> Id; + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); } ); + extern_class!( #[derive(Debug)] pub struct NSScrubberImageItemView; + unsafe impl ClassType for NSScrubberImageItemView { type Super = NSScrubberItemView; } ); + extern_methods!( unsafe impl NSScrubberImageItemView { #[method_id(imageView)] pub unsafe fn imageView(&self) -> Id; + #[method_id(image)] pub unsafe fn image(&self) -> Id; + #[method(setImage:)] pub unsafe fn setImage(&self, image: &NSImage); + #[method(imageAlignment)] pub unsafe fn imageAlignment(&self) -> NSImageAlignment; + #[method(setImageAlignment:)] pub unsafe fn setImageAlignment(&self, imageAlignment: NSImageAlignment); } diff --git a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs index 20f6584bf..a9a84a5ff 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs @@ -1,121 +1,162 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScrubberLayoutAttributes; + unsafe impl ClassType for NSScrubberLayoutAttributes { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScrubberLayoutAttributes { #[method(itemIndex)] pub unsafe fn itemIndex(&self) -> NSInteger; + #[method(setItemIndex:)] pub unsafe fn setItemIndex(&self, itemIndex: NSInteger); + #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[method(setFrame:)] pub unsafe fn setFrame(&self, frame: NSRect); + #[method(alpha)] pub unsafe fn alpha(&self) -> CGFloat; + #[method(setAlpha:)] pub unsafe fn setAlpha(&self, alpha: CGFloat); + #[method_id(layoutAttributesForItemAtIndex:)] pub unsafe fn layoutAttributesForItemAtIndex(index: NSInteger) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSScrubberLayout; + unsafe impl ClassType for NSScrubberLayout { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScrubberLayout { #[method(layoutAttributesClass)] pub unsafe fn layoutAttributesClass() -> &Class; + #[method_id(scrubber)] pub unsafe fn scrubber(&self) -> Option>; + #[method(visibleRect)] pub unsafe fn visibleRect(&self) -> NSRect; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(invalidateLayout)] pub unsafe fn invalidateLayout(&self); + #[method(prepareLayout)] pub unsafe fn prepareLayout(&self); + #[method(scrubberContentSize)] pub unsafe fn scrubberContentSize(&self) -> NSSize; + #[method_id(layoutAttributesForItemAtIndex:)] pub unsafe fn layoutAttributesForItemAtIndex( &self, index: NSInteger, ) -> Option>; + #[method_id(layoutAttributesForItemsInRect:)] pub unsafe fn layoutAttributesForItemsInRect( &self, rect: NSRect, ) -> Id, Shared>; + #[method(shouldInvalidateLayoutForSelectionChange)] pub unsafe fn shouldInvalidateLayoutForSelectionChange(&self) -> bool; + #[method(shouldInvalidateLayoutForHighlightChange)] pub unsafe fn shouldInvalidateLayoutForHighlightChange(&self) -> bool; + #[method(shouldInvalidateLayoutForChangeFromVisibleRect:toVisibleRect:)] pub unsafe fn shouldInvalidateLayoutForChangeFromVisibleRect_toVisibleRect( &self, fromVisibleRect: NSRect, toVisibleRect: NSRect, ) -> bool; + #[method(automaticallyMirrorsInRightToLeftLayout)] pub unsafe fn automaticallyMirrorsInRightToLeftLayout(&self) -> bool; } ); + pub type NSScrubberFlowLayoutDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSScrubberFlowLayout; + unsafe impl ClassType for NSScrubberFlowLayout { type Super = NSScrubberLayout; } ); + extern_methods!( unsafe impl NSScrubberFlowLayout { #[method(itemSpacing)] pub unsafe fn itemSpacing(&self) -> CGFloat; + #[method(setItemSpacing:)] pub unsafe fn setItemSpacing(&self, itemSpacing: CGFloat); + #[method(itemSize)] pub unsafe fn itemSize(&self) -> NSSize; + #[method(setItemSize:)] pub unsafe fn setItemSize(&self, itemSize: NSSize); + #[method(invalidateLayoutForItemsAtIndexes:)] pub unsafe fn invalidateLayoutForItemsAtIndexes(&self, invalidItemIndexes: &NSIndexSet); } ); + extern_class!( #[derive(Debug)] pub struct NSScrubberProportionalLayout; + unsafe impl ClassType for NSScrubberProportionalLayout { type Super = NSScrubberLayout; } ); + extern_methods!( unsafe impl NSScrubberProportionalLayout { #[method(numberOfVisibleItems)] pub unsafe fn numberOfVisibleItems(&self) -> NSInteger; + #[method(setNumberOfVisibleItems:)] pub unsafe fn setNumberOfVisibleItems(&self, numberOfVisibleItems: NSInteger); + #[method_id(initWithNumberOfVisibleItems:)] pub unsafe fn initWithNumberOfVisibleItems( &self, numberOfVisibleItems: NSInteger, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSSearchField.rs b/crates/icrate/src/generated/AppKit/NSSearchField.rs index 8cc9d8698..14943f6df 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchField.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchField.rs @@ -1,70 +1,98 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSSearchFieldRecentsAutosaveName = NSString; + pub type NSSearchFieldDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSSearchField; + unsafe impl ClassType for NSSearchField { type Super = NSTextField; } ); + extern_methods!( unsafe impl NSSearchField { #[method(searchTextBounds)] pub unsafe fn searchTextBounds(&self) -> NSRect; + #[method(searchButtonBounds)] pub unsafe fn searchButtonBounds(&self) -> NSRect; + #[method(cancelButtonBounds)] pub unsafe fn cancelButtonBounds(&self) -> NSRect; + #[method_id(recentSearches)] pub unsafe fn recentSearches(&self) -> Id, Shared>; + #[method(setRecentSearches:)] pub unsafe fn setRecentSearches(&self, recentSearches: &NSArray); + #[method_id(recentsAutosaveName)] pub unsafe fn recentsAutosaveName( &self, ) -> Option>; + #[method(setRecentsAutosaveName:)] pub unsafe fn setRecentsAutosaveName( &self, recentsAutosaveName: Option<&NSSearchFieldRecentsAutosaveName>, ); + #[method_id(searchMenuTemplate)] pub unsafe fn searchMenuTemplate(&self) -> Option>; + #[method(setSearchMenuTemplate:)] pub unsafe fn setSearchMenuTemplate(&self, searchMenuTemplate: Option<&NSMenu>); + #[method(sendsWholeSearchString)] pub unsafe fn sendsWholeSearchString(&self) -> bool; + #[method(setSendsWholeSearchString:)] pub unsafe fn setSendsWholeSearchString(&self, sendsWholeSearchString: bool); + #[method(maximumRecents)] pub unsafe fn maximumRecents(&self) -> NSInteger; + #[method(setMaximumRecents:)] pub unsafe fn setMaximumRecents(&self, maximumRecents: NSInteger); + #[method(sendsSearchStringImmediately)] pub unsafe fn sendsSearchStringImmediately(&self) -> bool; + #[method(setSendsSearchStringImmediately:)] pub unsafe fn setSendsSearchStringImmediately(&self, sendsSearchStringImmediately: bool); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSearchFieldDelegate>); } ); + extern_methods!( - #[doc = "NSSearchField_Deprecated"] + /// NSSearchField_Deprecated unsafe impl NSSearchField { #[method(rectForSearchTextWhenCentered:)] pub unsafe fn rectForSearchTextWhenCentered(&self, isCentered: bool) -> NSRect; + #[method(rectForSearchButtonWhenCentered:)] pub unsafe fn rectForSearchButtonWhenCentered(&self, isCentered: bool) -> NSRect; + #[method(rectForCancelButtonWhenCentered:)] pub unsafe fn rectForCancelButtonWhenCentered(&self, isCentered: bool) -> NSRect; + #[method(centersPlaceholder)] pub unsafe fn centersPlaceholder(&self) -> bool; + #[method(setCentersPlaceholder:)] pub unsafe fn setCentersPlaceholder(&self, centersPlaceholder: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs index 61f8d40d3..5fb3a0753 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs @@ -1,67 +1,95 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSearchFieldCell; + unsafe impl ClassType for NSSearchFieldCell { type Super = NSTextFieldCell; } ); + extern_methods!( unsafe impl NSSearchFieldCell { #[method_id(initTextCell:)] pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initImageCell:)] pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method_id(searchButtonCell)] pub unsafe fn searchButtonCell(&self) -> Option>; + #[method(setSearchButtonCell:)] pub unsafe fn setSearchButtonCell(&self, searchButtonCell: Option<&NSButtonCell>); + #[method_id(cancelButtonCell)] pub unsafe fn cancelButtonCell(&self) -> Option>; + #[method(setCancelButtonCell:)] pub unsafe fn setCancelButtonCell(&self, cancelButtonCell: Option<&NSButtonCell>); + #[method(resetSearchButtonCell)] pub unsafe fn resetSearchButtonCell(&self); + #[method(resetCancelButtonCell)] pub unsafe fn resetCancelButtonCell(&self); + #[method(searchTextRectForBounds:)] pub unsafe fn searchTextRectForBounds(&self, rect: NSRect) -> NSRect; + #[method(searchButtonRectForBounds:)] pub unsafe fn searchButtonRectForBounds(&self, rect: NSRect) -> NSRect; + #[method(cancelButtonRectForBounds:)] pub unsafe fn cancelButtonRectForBounds(&self, rect: NSRect) -> NSRect; + #[method_id(searchMenuTemplate)] pub unsafe fn searchMenuTemplate(&self) -> Option>; + #[method(setSearchMenuTemplate:)] pub unsafe fn setSearchMenuTemplate(&self, searchMenuTemplate: Option<&NSMenu>); + #[method(sendsWholeSearchString)] pub unsafe fn sendsWholeSearchString(&self) -> bool; + #[method(setSendsWholeSearchString:)] pub unsafe fn setSendsWholeSearchString(&self, sendsWholeSearchString: bool); + #[method(maximumRecents)] pub unsafe fn maximumRecents(&self) -> NSInteger; + #[method(setMaximumRecents:)] pub unsafe fn setMaximumRecents(&self, maximumRecents: NSInteger); + #[method_id(recentSearches)] pub unsafe fn recentSearches(&self) -> Id, Shared>; + #[method(setRecentSearches:)] pub unsafe fn setRecentSearches(&self, recentSearches: Option<&NSArray>); + #[method_id(recentsAutosaveName)] pub unsafe fn recentsAutosaveName( &self, ) -> Option>; + #[method(setRecentsAutosaveName:)] pub unsafe fn setRecentsAutosaveName( &self, recentsAutosaveName: Option<&NSSearchFieldRecentsAutosaveName>, ); + #[method(sendsSearchStringImmediately)] pub unsafe fn sendsSearchStringImmediately(&self) -> bool; + #[method(setSendsSearchStringImmediately:)] pub unsafe fn setSendsSearchStringImmediately(&self, sendsSearchStringImmediately: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs index e82224d9b..bfa33ba16 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs @@ -1,37 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSearchToolbarItem; + unsafe impl ClassType for NSSearchToolbarItem { type Super = NSToolbarItem; } ); + extern_methods!( unsafe impl NSSearchToolbarItem { #[method_id(searchField)] pub unsafe fn searchField(&self) -> Id; + #[method(setSearchField:)] pub unsafe fn setSearchField(&self, searchField: &NSSearchField); + #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(resignsFirstResponderWithCancel)] pub unsafe fn resignsFirstResponderWithCancel(&self) -> bool; + #[method(setResignsFirstResponderWithCancel:)] pub unsafe fn setResignsFirstResponderWithCancel( &self, resignsFirstResponderWithCancel: bool, ); + #[method(preferredWidthForSearchField)] pub unsafe fn preferredWidthForSearchField(&self) -> CGFloat; + #[method(setPreferredWidthForSearchField:)] pub unsafe fn setPreferredWidthForSearchField(&self, preferredWidthForSearchField: CGFloat); + #[method(beginSearchInteraction)] pub unsafe fn beginSearchInteraction(&self); + #[method(endSearchInteraction)] pub unsafe fn endSearchInteraction(&self); } diff --git a/crates/icrate/src/generated/AppKit/NSSecureTextField.rs b/crates/icrate/src/generated/AppKit/NSSecureTextField.rs index 395be5ec3..5eb11b434 100644 --- a/crates/icrate/src/generated/AppKit/NSSecureTextField.rs +++ b/crates/icrate/src/generated/AppKit/NSSecureTextField.rs @@ -1,28 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSecureTextField; + unsafe impl ClassType for NSSecureTextField { type Super = NSTextField; } ); + extern_methods!( unsafe impl NSSecureTextField {} ); + extern_class!( #[derive(Debug)] pub struct NSSecureTextFieldCell; + unsafe impl ClassType for NSSecureTextFieldCell { type Super = NSTextFieldCell; } ); + extern_methods!( unsafe impl NSSecureTextFieldCell { #[method(echosBullets)] pub unsafe fn echosBullets(&self) -> bool; + #[method(setEchosBullets:)] pub unsafe fn setEchosBullets(&self, echosBullets: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs index a10ca8cb6..4103f354e 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs @@ -1,78 +1,112 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSegmentedCell; + unsafe impl ClassType for NSSegmentedCell { type Super = NSActionCell; } ); + extern_methods!( unsafe impl NSSegmentedCell { #[method(segmentCount)] pub unsafe fn segmentCount(&self) -> NSInteger; + #[method(setSegmentCount:)] pub unsafe fn setSegmentCount(&self, segmentCount: NSInteger); + #[method(selectedSegment)] pub unsafe fn selectedSegment(&self) -> NSInteger; + #[method(setSelectedSegment:)] pub unsafe fn setSelectedSegment(&self, selectedSegment: NSInteger); + #[method(selectSegmentWithTag:)] pub unsafe fn selectSegmentWithTag(&self, tag: NSInteger) -> bool; + #[method(makeNextSegmentKey)] pub unsafe fn makeNextSegmentKey(&self); + #[method(makePreviousSegmentKey)] pub unsafe fn makePreviousSegmentKey(&self); + #[method(trackingMode)] pub unsafe fn trackingMode(&self) -> NSSegmentSwitchTracking; + #[method(setTrackingMode:)] pub unsafe fn setTrackingMode(&self, trackingMode: NSSegmentSwitchTracking); + #[method(setWidth:forSegment:)] pub unsafe fn setWidth_forSegment(&self, width: CGFloat, segment: NSInteger); + #[method(widthForSegment:)] pub unsafe fn widthForSegment(&self, segment: NSInteger) -> CGFloat; + #[method(setImage:forSegment:)] pub unsafe fn setImage_forSegment(&self, image: Option<&NSImage>, segment: NSInteger); + #[method_id(imageForSegment:)] pub unsafe fn imageForSegment(&self, segment: NSInteger) -> Option>; + #[method(setImageScaling:forSegment:)] pub unsafe fn setImageScaling_forSegment( &self, scaling: NSImageScaling, segment: NSInteger, ); + #[method(imageScalingForSegment:)] pub unsafe fn imageScalingForSegment(&self, segment: NSInteger) -> NSImageScaling; + #[method(setLabel:forSegment:)] pub unsafe fn setLabel_forSegment(&self, label: &NSString, segment: NSInteger); + #[method_id(labelForSegment:)] pub unsafe fn labelForSegment(&self, segment: NSInteger) -> Option>; + #[method(setSelected:forSegment:)] pub unsafe fn setSelected_forSegment(&self, selected: bool, segment: NSInteger); + #[method(isSelectedForSegment:)] pub unsafe fn isSelectedForSegment(&self, segment: NSInteger) -> bool; + #[method(setEnabled:forSegment:)] pub unsafe fn setEnabled_forSegment(&self, enabled: bool, segment: NSInteger); + #[method(isEnabledForSegment:)] pub unsafe fn isEnabledForSegment(&self, segment: NSInteger) -> bool; + #[method(setMenu:forSegment:)] pub unsafe fn setMenu_forSegment(&self, menu: Option<&NSMenu>, segment: NSInteger); + #[method_id(menuForSegment:)] pub unsafe fn menuForSegment(&self, segment: NSInteger) -> Option>; + #[method(setToolTip:forSegment:)] pub unsafe fn setToolTip_forSegment(&self, toolTip: Option<&NSString>, segment: NSInteger); + #[method_id(toolTipForSegment:)] pub unsafe fn toolTipForSegment(&self, segment: NSInteger) -> Option>; + #[method(setTag:forSegment:)] pub unsafe fn setTag_forSegment(&self, tag: NSInteger, segment: NSInteger); + #[method(tagForSegment:)] pub unsafe fn tagForSegment(&self, segment: NSInteger) -> NSInteger; + #[method(segmentStyle)] pub unsafe fn segmentStyle(&self) -> NSSegmentStyle; + #[method(setSegmentStyle:)] pub unsafe fn setSegmentStyle(&self, segmentStyle: NSSegmentStyle); + #[method(drawSegment:inFrame:withView:)] pub unsafe fn drawSegment_inFrame_withView( &self, @@ -82,8 +116,9 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSSegmentBackgroundStyle"] + /// NSSegmentBackgroundStyle unsafe impl NSSegmentedCell { #[method(interiorBackgroundStyleForSegment:)] pub unsafe fn interiorBackgroundStyleForSegment( diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs index 2dc2c46e1..41cb6131b 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs @@ -1,127 +1,174 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSegmentedControl; + unsafe impl ClassType for NSSegmentedControl { type Super = NSControl; } ); + extern_methods!( unsafe impl NSSegmentedControl { #[method(segmentCount)] pub unsafe fn segmentCount(&self) -> NSInteger; + #[method(setSegmentCount:)] pub unsafe fn setSegmentCount(&self, segmentCount: NSInteger); + #[method(selectedSegment)] pub unsafe fn selectedSegment(&self) -> NSInteger; + #[method(setSelectedSegment:)] pub unsafe fn setSelectedSegment(&self, selectedSegment: NSInteger); + #[method(selectSegmentWithTag:)] pub unsafe fn selectSegmentWithTag(&self, tag: NSInteger) -> bool; + #[method(setWidth:forSegment:)] pub unsafe fn setWidth_forSegment(&self, width: CGFloat, segment: NSInteger); + #[method(widthForSegment:)] pub unsafe fn widthForSegment(&self, segment: NSInteger) -> CGFloat; + #[method(setImage:forSegment:)] pub unsafe fn setImage_forSegment(&self, image: Option<&NSImage>, segment: NSInteger); + #[method_id(imageForSegment:)] pub unsafe fn imageForSegment(&self, segment: NSInteger) -> Option>; + #[method(setImageScaling:forSegment:)] pub unsafe fn setImageScaling_forSegment( &self, scaling: NSImageScaling, segment: NSInteger, ); + #[method(imageScalingForSegment:)] pub unsafe fn imageScalingForSegment(&self, segment: NSInteger) -> NSImageScaling; + #[method(setLabel:forSegment:)] pub unsafe fn setLabel_forSegment(&self, label: &NSString, segment: NSInteger); + #[method_id(labelForSegment:)] pub unsafe fn labelForSegment(&self, segment: NSInteger) -> Option>; + #[method(setMenu:forSegment:)] pub unsafe fn setMenu_forSegment(&self, menu: Option<&NSMenu>, segment: NSInteger); + #[method_id(menuForSegment:)] pub unsafe fn menuForSegment(&self, segment: NSInteger) -> Option>; + #[method(setSelected:forSegment:)] pub unsafe fn setSelected_forSegment(&self, selected: bool, segment: NSInteger); + #[method(isSelectedForSegment:)] pub unsafe fn isSelectedForSegment(&self, segment: NSInteger) -> bool; + #[method(setEnabled:forSegment:)] pub unsafe fn setEnabled_forSegment(&self, enabled: bool, segment: NSInteger); + #[method(isEnabledForSegment:)] pub unsafe fn isEnabledForSegment(&self, segment: NSInteger) -> bool; + #[method(setToolTip:forSegment:)] pub unsafe fn setToolTip_forSegment(&self, toolTip: Option<&NSString>, segment: NSInteger); + #[method_id(toolTipForSegment:)] pub unsafe fn toolTipForSegment(&self, segment: NSInteger) -> Option>; + #[method(setTag:forSegment:)] pub unsafe fn setTag_forSegment(&self, tag: NSInteger, segment: NSInteger); + #[method(tagForSegment:)] pub unsafe fn tagForSegment(&self, segment: NSInteger) -> NSInteger; + #[method(setShowsMenuIndicator:forSegment:)] pub unsafe fn setShowsMenuIndicator_forSegment( &self, showsMenuIndicator: bool, segment: NSInteger, ); + #[method(showsMenuIndicatorForSegment:)] pub unsafe fn showsMenuIndicatorForSegment(&self, segment: NSInteger) -> bool; + #[method(segmentStyle)] pub unsafe fn segmentStyle(&self) -> NSSegmentStyle; + #[method(setSegmentStyle:)] pub unsafe fn setSegmentStyle(&self, segmentStyle: NSSegmentStyle); + #[method(isSpringLoaded)] pub unsafe fn isSpringLoaded(&self) -> bool; + #[method(setSpringLoaded:)] pub unsafe fn setSpringLoaded(&self, springLoaded: bool); + #[method(trackingMode)] pub unsafe fn trackingMode(&self) -> NSSegmentSwitchTracking; + #[method(setTrackingMode:)] pub unsafe fn setTrackingMode(&self, trackingMode: NSSegmentSwitchTracking); + #[method(doubleValueForSelectedSegment)] pub unsafe fn doubleValueForSelectedSegment(&self) -> c_double; + #[method_id(selectedSegmentBezelColor)] pub unsafe fn selectedSegmentBezelColor(&self) -> Option>; + #[method(setSelectedSegmentBezelColor:)] pub unsafe fn setSelectedSegmentBezelColor( &self, selectedSegmentBezelColor: Option<&NSColor>, ); + #[method(indexOfSelectedItem)] pub unsafe fn indexOfSelectedItem(&self) -> NSInteger; + #[method(setAlignment:forSegment:)] pub unsafe fn setAlignment_forSegment( &self, alignment: NSTextAlignment, segment: NSInteger, ); + #[method(alignmentForSegment:)] pub unsafe fn alignmentForSegment(&self, segment: NSInteger) -> NSTextAlignment; + #[method(segmentDistribution)] pub unsafe fn segmentDistribution(&self) -> NSSegmentDistribution; + #[method(setSegmentDistribution:)] pub unsafe fn setSegmentDistribution(&self, segmentDistribution: NSSegmentDistribution); + #[method(compressWithPrioritizedCompressionOptions:)] pub unsafe fn compressWithPrioritizedCompressionOptions( &self, prioritizedOptions: &NSArray, ); + #[method(minimumSizeWithPrioritizedCompressionOptions:)] pub unsafe fn minimumSizeWithPrioritizedCompressionOptions( &self, prioritizedOptions: &NSArray, ) -> NSSize; + #[method_id(activeCompressionOptions)] pub unsafe fn activeCompressionOptions( &self, ) -> Id; } ); + extern_methods!( - #[doc = "NSSegmentedControlConvenience"] + /// NSSegmentedControlConvenience unsafe impl NSSegmentedControl { #[method_id(segmentedControlWithLabels:trackingMode:target:action:)] pub unsafe fn segmentedControlWithLabels_trackingMode_target_action( @@ -130,6 +177,7 @@ extern_methods!( target: Option<&Object>, action: Option, ) -> Id; + #[method_id(segmentedControlWithImages:trackingMode:target:action:)] pub unsafe fn segmentedControlWithImages_trackingMode_target_action( images: &NSArray, diff --git a/crates/icrate/src/generated/AppKit/NSShadow.rs b/crates/icrate/src/generated/AppKit/NSShadow.rs index 4f1254b39..b81e9da9a 100644 --- a/crates/icrate/src/generated/AppKit/NSShadow.rs +++ b/crates/icrate/src/generated/AppKit/NSShadow.rs @@ -1,30 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSShadow; + unsafe impl ClassType for NSShadow { type Super = NSObject; } ); + extern_methods!( unsafe impl NSShadow { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method(shadowOffset)] pub unsafe fn shadowOffset(&self) -> NSSize; + #[method(setShadowOffset:)] pub unsafe fn setShadowOffset(&self, shadowOffset: NSSize); + #[method(shadowBlurRadius)] pub unsafe fn shadowBlurRadius(&self) -> CGFloat; + #[method(setShadowBlurRadius:)] pub unsafe fn setShadowBlurRadius(&self, shadowBlurRadius: CGFloat); + #[method_id(shadowColor)] pub unsafe fn shadowColor(&self) -> Option>; + #[method(setShadowColor:)] pub unsafe fn setShadowColor(&self, shadowColor: Option<&NSColor>); + #[method(set)] pub unsafe fn set(&self); } diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index 4499a2e5d..34a4b86d1 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -1,55 +1,78 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSSharingServiceName = NSString; + extern_class!( #[derive(Debug)] pub struct NSSharingService; + unsafe impl ClassType for NSSharingService { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSharingService { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSharingServiceDelegate>); + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method_id(image)] pub unsafe fn image(&self) -> Id; + #[method_id(alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; + #[method_id(menuItemTitle)] pub unsafe fn menuItemTitle(&self) -> Id; + #[method(setMenuItemTitle:)] pub unsafe fn setMenuItemTitle(&self, menuItemTitle: &NSString); + #[method_id(recipients)] pub unsafe fn recipients(&self) -> Option, Shared>>; + #[method(setRecipients:)] pub unsafe fn setRecipients(&self, recipients: Option<&NSArray>); + #[method_id(subject)] pub unsafe fn subject(&self) -> Option>; + #[method(setSubject:)] pub unsafe fn setSubject(&self, subject: Option<&NSString>); + #[method_id(messageBody)] pub unsafe fn messageBody(&self) -> Option>; + #[method_id(permanentLink)] pub unsafe fn permanentLink(&self) -> Option>; + #[method_id(accountName)] pub unsafe fn accountName(&self) -> Option>; + #[method_id(attachmentFileURLs)] pub unsafe fn attachmentFileURLs(&self) -> Option, Shared>>; + #[method_id(sharingServicesForItems:)] pub unsafe fn sharingServicesForItems( items: &NSArray, ) -> Id, Shared>; + #[method_id(sharingServiceNamed:)] pub unsafe fn sharingServiceNamed( serviceName: &NSSharingServiceName, ) -> Option>; + #[method_id(initWithTitle:image:alternateImage:handler:)] pub unsafe fn initWithTitle_image_alternateImage_handler( &self, @@ -58,24 +81,31 @@ extern_methods!( alternateImage: Option<&NSImage>, block: TodoBlock, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method(canPerformWithItems:)] pub unsafe fn canPerformWithItems(&self, items: Option<&NSArray>) -> bool; + #[method(performWithItems:)] pub unsafe fn performWithItems(&self, items: &NSArray); } ); + pub type NSSharingServiceDelegate = NSObject; + pub type NSCloudSharingServiceDelegate = NSObject; + extern_methods!( - #[doc = "NSCloudKitSharing"] + /// NSCloudKitSharing unsafe impl NSItemProvider { #[method(registerCloudKitShareWithPreparationHandler:)] pub unsafe fn registerCloudKitShareWithPreparationHandler( &self, preparationHandler: TodoBlock, ); + #[method(registerCloudKitShare:container:)] pub unsafe fn registerCloudKitShare_container( &self, @@ -84,23 +114,30 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSSharingServicePicker; + unsafe impl ClassType for NSSharingServicePicker { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSharingServicePicker { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSharingServicePickerDelegate>); + #[method_id(initWithItems:)] pub unsafe fn initWithItems(&self, items: &NSArray) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method(showRelativeToRect:ofView:preferredEdge:)] pub unsafe fn showRelativeToRect_ofView_preferredEdge( &self, @@ -110,4 +147,5 @@ extern_methods!( ); } ); + pub type NSSharingServicePickerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs index c5ef60d1e..9ea572b95 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs @@ -1,20 +1,26 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSharingServicePickerToolbarItem; + unsafe impl ClassType for NSSharingServicePickerToolbarItem { type Super = NSToolbarItem; } ); + extern_methods!( unsafe impl NSSharingServicePickerToolbarItem { #[method_id(delegate)] pub unsafe fn delegate( &self, ) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate( &self, @@ -22,4 +28,5 @@ extern_methods!( ); } ); + pub type NSSharingServicePickerToolbarItemDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs index 52f434337..4f3da3b77 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs @@ -1,37 +1,50 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSharingServicePickerTouchBarItem; + unsafe impl ClassType for NSSharingServicePickerTouchBarItem { type Super = NSTouchBarItem; } ); + extern_methods!( unsafe impl NSSharingServicePickerTouchBarItem { #[method_id(delegate)] pub unsafe fn delegate( &self, ) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate( &self, delegate: Option<&NSSharingServicePickerTouchBarItemDelegate>, ); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method_id(buttonTitle)] pub unsafe fn buttonTitle(&self) -> Id; + #[method(setButtonTitle:)] pub unsafe fn setButtonTitle(&self, buttonTitle: &NSString); + #[method_id(buttonImage)] pub unsafe fn buttonImage(&self) -> Option>; + #[method(setButtonImage:)] pub unsafe fn setButtonImage(&self, buttonImage: Option<&NSImage>); } ); + pub type NSSharingServicePickerTouchBarItemDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSlider.rs b/crates/icrate/src/generated/AppKit/NSSlider.rs index 65f32ad97..56032ae9e 100644 --- a/crates/icrate/src/generated/AppKit/NSSlider.rs +++ b/crates/icrate/src/generated/AppKit/NSSlider.rs @@ -1,86 +1,117 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSlider; + unsafe impl ClassType for NSSlider { type Super = NSControl; } ); + extern_methods!( unsafe impl NSSlider { #[method(sliderType)] pub unsafe fn sliderType(&self) -> NSSliderType; + #[method(setSliderType:)] pub unsafe fn setSliderType(&self, sliderType: NSSliderType); + #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(altIncrementValue)] pub unsafe fn altIncrementValue(&self) -> c_double; + #[method(setAltIncrementValue:)] pub unsafe fn setAltIncrementValue(&self, altIncrementValue: c_double); + #[method(knobThickness)] pub unsafe fn knobThickness(&self) -> CGFloat; + #[method(acceptsFirstMouse:)] pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool; + #[method(isVertical)] pub unsafe fn isVertical(&self) -> bool; + #[method(setVertical:)] pub unsafe fn setVertical(&self, vertical: bool); + #[method_id(trackFillColor)] pub unsafe fn trackFillColor(&self) -> Option>; + #[method(setTrackFillColor:)] pub unsafe fn setTrackFillColor(&self, trackFillColor: Option<&NSColor>); } ); + extern_methods!( - #[doc = "NSSliderVerticalGetter"] + /// NSSliderVerticalGetter unsafe impl NSSlider { #[method(isVertical)] pub unsafe fn isVertical(&self) -> bool; } ); + extern_methods!( - #[doc = "NSTickMarkSupport"] + /// NSTickMarkSupport unsafe impl NSSlider { #[method(numberOfTickMarks)] pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[method(setNumberOfTickMarks:)] pub unsafe fn setNumberOfTickMarks(&self, numberOfTickMarks: NSInteger); + #[method(tickMarkPosition)] pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[method(setTickMarkPosition:)] pub unsafe fn setTickMarkPosition(&self, tickMarkPosition: NSTickMarkPosition); + #[method(allowsTickMarkValuesOnly)] pub unsafe fn allowsTickMarkValuesOnly(&self) -> bool; + #[method(setAllowsTickMarkValuesOnly:)] pub unsafe fn setAllowsTickMarkValuesOnly(&self, allowsTickMarkValuesOnly: bool); + #[method(tickMarkValueAtIndex:)] pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; + #[method(rectOfTickMarkAtIndex:)] pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[method(indexOfTickMarkAtPoint:)] pub unsafe fn indexOfTickMarkAtPoint(&self, point: NSPoint) -> NSInteger; + #[method(closestTickMarkValueToValue:)] pub unsafe fn closestTickMarkValueToValue(&self, value: c_double) -> c_double; } ); + extern_methods!( - #[doc = "NSSliderConvenience"] + /// NSSliderConvenience unsafe impl NSSlider { #[method_id(sliderWithTarget:action:)] pub unsafe fn sliderWithTarget_action( target: Option<&Object>, action: Option, ) -> Id; + #[method_id(sliderWithValue:minValue:maxValue:target:action:)] pub unsafe fn sliderWithValue_minValue_maxValue_target_action( value: c_double, @@ -91,29 +122,40 @@ extern_methods!( ) -> Id; } ); + extern_methods!( - #[doc = "NSSliderDeprecated"] + /// NSSliderDeprecated unsafe impl NSSlider { #[method(setTitleCell:)] pub unsafe fn setTitleCell(&self, cell: Option<&NSCell>); + #[method_id(titleCell)] pub unsafe fn titleCell(&self) -> Option>; + #[method(setTitleColor:)] pub unsafe fn setTitleColor(&self, newColor: Option<&NSColor>); + #[method_id(titleColor)] pub unsafe fn titleColor(&self) -> Option>; + #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, fontObj: Option<&NSFont>); + #[method_id(titleFont)] pub unsafe fn titleFont(&self) -> Option>; + #[method_id(title)] pub unsafe fn title(&self) -> Option>; + #[method(setTitle:)] pub unsafe fn setTitle(&self, string: Option<&NSString>); + #[method(setKnobThickness:)] pub unsafe fn setKnobThickness(&self, thickness: CGFloat); + #[method(setImage:)] pub unsafe fn setImage(&self, backgroundImage: Option<&NSImage>); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs index 39e9b385d..adf27710f 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs @@ -1,55 +1,73 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSliderAccessory; + unsafe impl ClassType for NSSliderAccessory { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSliderAccessory { #[method_id(accessoryWithImage:)] pub unsafe fn accessoryWithImage(image: &NSImage) -> Id; + #[method_id(behavior)] pub unsafe fn behavior(&self) -> Id; + #[method(setBehavior:)] pub unsafe fn setBehavior(&self, behavior: &NSSliderAccessoryBehavior); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); } ); + extern_methods!( unsafe impl NSSliderAccessory {} ); + extern_class!( #[derive(Debug)] pub struct NSSliderAccessoryBehavior; + unsafe impl ClassType for NSSliderAccessoryBehavior { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSliderAccessoryBehavior { #[method_id(automaticBehavior)] pub unsafe fn automaticBehavior() -> Id; + #[method_id(valueStepBehavior)] pub unsafe fn valueStepBehavior() -> Id; + #[method_id(valueResetBehavior)] pub unsafe fn valueResetBehavior() -> Id; + #[method_id(behaviorWithTarget:action:)] pub unsafe fn behaviorWithTarget_action( target: Option<&Object>, action: Sel, ) -> Id; + #[method_id(behaviorWithHandler:)] pub unsafe fn behaviorWithHandler( handler: TodoBlock, ) -> Id; + #[method(handleAction:)] pub unsafe fn handleAction(&self, sender: &NSSliderAccessory); } diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index 99f8ee6eb..5230250fc 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -1,111 +1,156 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSliderCell; + unsafe impl ClassType for NSSliderCell { type Super = NSActionCell; } ); + extern_methods!( unsafe impl NSSliderCell { #[method(prefersTrackingUntilMouseUp)] pub unsafe fn prefersTrackingUntilMouseUp() -> bool; + #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(altIncrementValue)] pub unsafe fn altIncrementValue(&self) -> c_double; + #[method(setAltIncrementValue:)] pub unsafe fn setAltIncrementValue(&self, altIncrementValue: c_double); + #[method(sliderType)] pub unsafe fn sliderType(&self) -> NSSliderType; + #[method(setSliderType:)] pub unsafe fn setSliderType(&self, sliderType: NSSliderType); + #[method(isVertical)] pub unsafe fn isVertical(&self) -> bool; + #[method(setVertical:)] pub unsafe fn setVertical(&self, vertical: bool); + #[method(trackRect)] pub unsafe fn trackRect(&self) -> NSRect; + #[method(knobThickness)] pub unsafe fn knobThickness(&self) -> CGFloat; + #[method(knobRectFlipped:)] pub unsafe fn knobRectFlipped(&self, flipped: bool) -> NSRect; + #[method(barRectFlipped:)] pub unsafe fn barRectFlipped(&self, flipped: bool) -> NSRect; + #[method(drawKnob:)] pub unsafe fn drawKnob(&self, knobRect: NSRect); + #[method(drawKnob)] pub unsafe fn drawKnob(&self); + #[method(drawBarInside:flipped:)] pub unsafe fn drawBarInside_flipped(&self, rect: NSRect, flipped: bool); } ); + extern_methods!( - #[doc = "NSSliderCellVerticalGetter"] + /// NSSliderCellVerticalGetter unsafe impl NSSliderCell { #[method(isVertical)] pub unsafe fn isVertical(&self) -> bool; } ); + extern_methods!( - #[doc = "NSTickMarkSupport"] + /// NSTickMarkSupport unsafe impl NSSliderCell { #[method(numberOfTickMarks)] pub unsafe fn numberOfTickMarks(&self) -> NSInteger; + #[method(setNumberOfTickMarks:)] pub unsafe fn setNumberOfTickMarks(&self, numberOfTickMarks: NSInteger); + #[method(tickMarkPosition)] pub unsafe fn tickMarkPosition(&self) -> NSTickMarkPosition; + #[method(setTickMarkPosition:)] pub unsafe fn setTickMarkPosition(&self, tickMarkPosition: NSTickMarkPosition); + #[method(allowsTickMarkValuesOnly)] pub unsafe fn allowsTickMarkValuesOnly(&self) -> bool; + #[method(setAllowsTickMarkValuesOnly:)] pub unsafe fn setAllowsTickMarkValuesOnly(&self, allowsTickMarkValuesOnly: bool); + #[method(tickMarkValueAtIndex:)] pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; + #[method(rectOfTickMarkAtIndex:)] pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; + #[method(indexOfTickMarkAtPoint:)] pub unsafe fn indexOfTickMarkAtPoint(&self, point: NSPoint) -> NSInteger; + #[method(closestTickMarkValueToValue:)] pub unsafe fn closestTickMarkValueToValue(&self, value: c_double) -> c_double; + #[method(drawTickMarks)] pub unsafe fn drawTickMarks(&self); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSSliderCell { #[method(setTitleCell:)] pub unsafe fn setTitleCell(&self, cell: Option<&NSCell>); + #[method_id(titleCell)] pub unsafe fn titleCell(&self) -> Option>; + #[method(setTitleColor:)] pub unsafe fn setTitleColor(&self, newColor: Option<&NSColor>); + #[method_id(titleColor)] pub unsafe fn titleColor(&self) -> Option>; + #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, fontObj: Option<&NSFont>); + #[method_id(titleFont)] pub unsafe fn titleFont(&self) -> Option>; + #[method_id(title)] pub unsafe fn title(&self) -> Option>; + #[method(setTitle:)] pub unsafe fn setTitle(&self, string: Option<&NSString>); + #[method(setKnobThickness:)] pub unsafe fn setKnobThickness(&self, thickness: CGFloat); + #[method(setImage:)] pub unsafe fn setImage(&self, backgroundImage: Option<&NSImage>); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs index 5060d76d1..26aa44460 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs @@ -1,67 +1,95 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSSliderAccessoryWidth = CGFloat; + extern_class!( #[derive(Debug)] pub struct NSSliderTouchBarItem; + unsafe impl ClassType for NSSliderTouchBarItem { type Super = NSTouchBarItem; } ); + extern_methods!( unsafe impl NSSliderTouchBarItem { #[method_id(view)] pub unsafe fn view(&self) -> Id; + #[method_id(slider)] pub unsafe fn slider(&self) -> Id; + #[method(setSlider:)] pub unsafe fn setSlider(&self, slider: &NSSlider); + #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[method(setDoubleValue:)] pub unsafe fn setDoubleValue(&self, doubleValue: c_double); + #[method(minimumSliderWidth)] pub unsafe fn minimumSliderWidth(&self) -> CGFloat; + #[method(setMinimumSliderWidth:)] pub unsafe fn setMinimumSliderWidth(&self, minimumSliderWidth: CGFloat); + #[method(maximumSliderWidth)] pub unsafe fn maximumSliderWidth(&self) -> CGFloat; + #[method(setMaximumSliderWidth:)] pub unsafe fn setMaximumSliderWidth(&self, maximumSliderWidth: CGFloat); + #[method_id(label)] pub unsafe fn label(&self) -> Option>; + #[method(setLabel:)] pub unsafe fn setLabel(&self, label: Option<&NSString>); + #[method_id(minimumValueAccessory)] pub unsafe fn minimumValueAccessory(&self) -> Option>; + #[method(setMinimumValueAccessory:)] pub unsafe fn setMinimumValueAccessory( &self, minimumValueAccessory: Option<&NSSliderAccessory>, ); + #[method_id(maximumValueAccessory)] pub unsafe fn maximumValueAccessory(&self) -> Option>; + #[method(setMaximumValueAccessory:)] pub unsafe fn setMaximumValueAccessory( &self, maximumValueAccessory: Option<&NSSliderAccessory>, ); + #[method(valueAccessoryWidth)] pub unsafe fn valueAccessoryWidth(&self) -> NSSliderAccessoryWidth; + #[method(setValueAccessoryWidth:)] pub unsafe fn setValueAccessoryWidth(&self, valueAccessoryWidth: NSSliderAccessoryWidth); + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method_id(customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); } diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs index 30726d044..1783156a8 100644 --- a/crates/icrate/src/generated/AppKit/NSSound.rs +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -1,104 +1,142 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSSoundName = NSString; + pub type NSSoundPlaybackDeviceIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSSound; + unsafe impl ClassType for NSSound { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSound { #[method_id(soundNamed:)] pub unsafe fn soundNamed(name: &NSSoundName) -> Option>; + #[method_id(initWithContentsOfURL:byReference:)] pub unsafe fn initWithContentsOfURL_byReference( &self, url: &NSURL, byRef: bool, ) -> Option>; + #[method_id(initWithContentsOfFile:byReference:)] pub unsafe fn initWithContentsOfFile_byReference( &self, path: &NSString, byRef: bool, ) -> Option>; + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Option>; + #[method(setName:)] pub unsafe fn setName(&self, string: Option<&NSSoundName>) -> bool; + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method(canInitWithPasteboard:)] pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; + #[method_id(soundUnfilteredTypes)] pub unsafe fn soundUnfilteredTypes() -> Id, Shared>; + #[method_id(initWithPasteboard:)] pub unsafe fn initWithPasteboard( &self, pasteboard: &NSPasteboard, ) -> Option>; + #[method(writeToPasteboard:)] pub unsafe fn writeToPasteboard(&self, pasteboard: &NSPasteboard); + #[method(play)] pub unsafe fn play(&self) -> bool; + #[method(pause)] pub unsafe fn pause(&self) -> bool; + #[method(resume)] pub unsafe fn resume(&self) -> bool; + #[method(stop)] pub unsafe fn stop(&self) -> bool; + #[method(isPlaying)] pub unsafe fn isPlaying(&self) -> bool; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSoundDelegate>); + #[method(duration)] pub unsafe fn duration(&self) -> NSTimeInterval; + #[method(volume)] pub unsafe fn volume(&self) -> c_float; + #[method(setVolume:)] pub unsafe fn setVolume(&self, volume: c_float); + #[method(currentTime)] pub unsafe fn currentTime(&self) -> NSTimeInterval; + #[method(setCurrentTime:)] pub unsafe fn setCurrentTime(&self, currentTime: NSTimeInterval); + #[method(loops)] pub unsafe fn loops(&self) -> bool; + #[method(setLoops:)] pub unsafe fn setLoops(&self, loops: bool); + #[method_id(playbackDeviceIdentifier)] pub unsafe fn playbackDeviceIdentifier( &self, ) -> Option>; + #[method(setPlaybackDeviceIdentifier:)] pub unsafe fn setPlaybackDeviceIdentifier( &self, playbackDeviceIdentifier: Option<&NSSoundPlaybackDeviceIdentifier>, ); + #[method(setChannelMapping:)] pub unsafe fn setChannelMapping(&self, channelMapping: Option<&NSArray>); + #[method_id(channelMapping)] pub unsafe fn channelMapping(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSSound { #[method_id(soundUnfilteredFileTypes)] pub unsafe fn soundUnfilteredFileTypes() -> Option>; + #[method_id(soundUnfilteredPasteboardTypes)] pub unsafe fn soundUnfilteredPasteboardTypes() -> Option>; } ); + pub type NSSoundDelegate = NSObject; + extern_methods!( - #[doc = "NSBundleSoundExtensions"] + /// NSBundleSoundExtensions unsafe impl NSBundle { #[method_id(pathForSoundResource:)] pub unsafe fn pathForSoundResource( diff --git a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs index ce9a7dc3d..01238c1d2 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs @@ -1,42 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSpeechRecognizer; + unsafe impl ClassType for NSSpeechRecognizer { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSpeechRecognizer { #[method_id(init)] pub unsafe fn init(&self) -> Option>; + #[method(startListening)] pub unsafe fn startListening(&self); + #[method(stopListening)] pub unsafe fn stopListening(&self); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSpeechRecognizerDelegate>); + #[method_id(commands)] pub unsafe fn commands(&self) -> Option, Shared>>; + #[method(setCommands:)] pub unsafe fn setCommands(&self, commands: Option<&NSArray>); + #[method_id(displayedCommandsTitle)] pub unsafe fn displayedCommandsTitle(&self) -> Option>; + #[method(setDisplayedCommandsTitle:)] pub unsafe fn setDisplayedCommandsTitle(&self, displayedCommandsTitle: Option<&NSString>); + #[method(listensInForegroundOnly)] pub unsafe fn listensInForegroundOnly(&self) -> bool; + #[method(setListensInForegroundOnly:)] pub unsafe fn setListensInForegroundOnly(&self, listensInForegroundOnly: bool); + #[method(blocksOtherRecognizers)] pub unsafe fn blocksOtherRecognizers(&self) -> bool; + #[method(setBlocksOtherRecognizers:)] pub unsafe fn setBlocksOtherRecognizers(&self, blocksOtherRecognizers: bool); } ); + pub type NSSpeechRecognizerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index 768343ba3..14a3e2f04 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -1,19 +1,29 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSSpeechSynthesizerVoiceName = NSString; + pub type NSVoiceAttributeKey = NSString; + pub type NSSpeechDictionaryKey = NSString; + pub type NSVoiceGenderName = NSString; + pub type NSSpeechPropertyKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSSpeechSynthesizer; + unsafe impl ClassType for NSSpeechSynthesizer { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSpeechSynthesizer { #[method_id(initWithVoice:)] @@ -21,74 +31,106 @@ extern_methods!( &self, voice: Option<&NSSpeechSynthesizerVoiceName>, ) -> Option>; + #[method(startSpeakingString:)] pub unsafe fn startSpeakingString(&self, string: &NSString) -> bool; + #[method(startSpeakingString:toURL:)] pub unsafe fn startSpeakingString_toURL(&self, string: &NSString, url: &NSURL) -> bool; + #[method(isSpeaking)] pub unsafe fn isSpeaking(&self) -> bool; + #[method(stopSpeaking)] pub unsafe fn stopSpeaking(&self); + #[method(stopSpeakingAtBoundary:)] pub unsafe fn stopSpeakingAtBoundary(&self, boundary: NSSpeechBoundary); + #[method(pauseSpeakingAtBoundary:)] pub unsafe fn pauseSpeakingAtBoundary(&self, boundary: NSSpeechBoundary); + #[method(continueSpeaking)] pub unsafe fn continueSpeaking(&self); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSpeechSynthesizerDelegate>); + #[method_id(voice)] pub unsafe fn voice(&self) -> Option>; + #[method(setVoice:)] pub unsafe fn setVoice(&self, voice: Option<&NSSpeechSynthesizerVoiceName>) -> bool; + #[method(rate)] pub unsafe fn rate(&self) -> c_float; + #[method(setRate:)] pub unsafe fn setRate(&self, rate: c_float); + #[method(volume)] pub unsafe fn volume(&self) -> c_float; + #[method(setVolume:)] pub unsafe fn setVolume(&self, volume: c_float); + #[method(usesFeedbackWindow)] pub unsafe fn usesFeedbackWindow(&self) -> bool; + #[method(setUsesFeedbackWindow:)] pub unsafe fn setUsesFeedbackWindow(&self, usesFeedbackWindow: bool); + #[method(addSpeechDictionary:)] pub unsafe fn addSpeechDictionary( &self, speechDictionary: &NSDictionary, ); + #[method_id(phonemesFromText:)] pub unsafe fn phonemesFromText(&self, text: &NSString) -> Id; + #[method_id(objectForProperty:error:)] pub unsafe fn objectForProperty_error( &self, property: &NSSpeechPropertyKey, ) -> Result, Id>; + #[method(setObject:forProperty:error:)] pub unsafe fn setObject_forProperty_error( &self, object: Option<&Object>, property: &NSSpeechPropertyKey, ) -> Result<(), Id>; + #[method(isAnyApplicationSpeaking)] pub unsafe fn isAnyApplicationSpeaking() -> bool; + #[method_id(defaultVoice)] pub unsafe fn defaultVoice() -> Id; + #[method_id(availableVoices)] pub unsafe fn availableVoices() -> Id, Shared>; + #[method_id(attributesForVoice:)] pub unsafe fn attributesForVoice( voice: &NSSpeechSynthesizerVoiceName, ) -> Id, Shared>; } ); + pub type NSSpeechSynthesizerDelegate = NSObject; + pub type NSSpeechMode = NSString; + pub type NSSpeechStatusKey = NSString; + pub type NSSpeechErrorKey = NSString; + pub type NSSpeechSynthesizerInfoKey = NSString; + pub type NSSpeechPhonemeInfoKey = NSString; + pub type NSSpeechCommandDelimiterKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index c42b5814b..9a5fcbbf3 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -1,23 +1,32 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextCheckingOptionKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSSpellChecker; + unsafe impl ClassType for NSSpellChecker { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSpellChecker { #[method_id(sharedSpellChecker)] pub unsafe fn sharedSpellChecker() -> Id; + #[method(sharedSpellCheckerExists)] pub unsafe fn sharedSpellCheckerExists() -> bool; + #[method(uniqueSpellDocumentTag)] pub unsafe fn uniqueSpellDocumentTag() -> NSInteger; + #[method(checkSpellingOfString:startingAt:language:wrap:inSpellDocumentWithTag:wordCount:)] pub unsafe fn checkSpellingOfString_startingAt_language_wrap_inSpellDocumentWithTag_wordCount( &self, @@ -28,18 +37,21 @@ extern_methods!( tag: NSInteger, wordCount: *mut NSInteger, ) -> NSRange; + #[method(checkSpellingOfString:startingAt:)] pub unsafe fn checkSpellingOfString_startingAt( &self, stringToCheck: &NSString, startingOffset: NSInteger, ) -> NSRange; + #[method(countWordsInString:language:)] pub unsafe fn countWordsInString_language( &self, stringToCount: &NSString, language: Option<&NSString>, ) -> NSInteger; + #[method(checkGrammarOfString:startingAt:language:wrap:inSpellDocumentWithTag:details:)] pub unsafe fn checkGrammarOfString_startingAt_language_wrap_inSpellDocumentWithTag_details( &self, @@ -50,6 +62,7 @@ extern_methods!( tag: NSInteger, details: Option<&mut Option>, Shared>>>, ) -> NSRange; + #[method_id(checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)] pub unsafe fn checkString_range_types_options_inSpellDocumentWithTag_orthography_wordCount( &self, @@ -61,6 +74,7 @@ extern_methods!( orthography: Option<&mut Option>>, wordCount: *mut NSInteger, ) -> Id, Shared>; + #[method(requestCheckingOfString:range:types:options:inSpellDocumentWithTag:completionHandler:)] pub unsafe fn requestCheckingOfString_range_types_options_inSpellDocumentWithTag_completionHandler( &self, @@ -71,6 +85,7 @@ extern_methods!( tag: NSInteger, completionHandler: TodoBlock, ) -> NSInteger; + #[method(requestCandidatesForSelectedRange:inString:types:options:inSpellDocumentWithTag:completionHandler:)] pub unsafe fn requestCandidatesForSelectedRange_inString_types_options_inSpellDocumentWithTag_completionHandler( &self, @@ -81,6 +96,7 @@ extern_methods!( tag: NSInteger, completionHandler: TodoBlock, ) -> NSInteger; + #[method_id(menuForResult:string:options:atLocation:inView:)] pub unsafe fn menuForResult_string_options_atLocation_inView( &self, @@ -90,59 +106,74 @@ extern_methods!( location: NSPoint, view: &NSView, ) -> Option>; + #[method_id(userQuotesArrayForLanguage:)] pub unsafe fn userQuotesArrayForLanguage( &self, language: &NSString, ) -> Id, Shared>; + #[method_id(userReplacementsDictionary)] pub unsafe fn userReplacementsDictionary( &self, ) -> Id, Shared>; + #[method(updateSpellingPanelWithMisspelledWord:)] pub unsafe fn updateSpellingPanelWithMisspelledWord(&self, word: &NSString); + #[method(updateSpellingPanelWithGrammarString:detail:)] pub unsafe fn updateSpellingPanelWithGrammarString_detail( &self, string: &NSString, detail: &NSDictionary, ); + #[method_id(spellingPanel)] pub unsafe fn spellingPanel(&self) -> Id; + #[method_id(accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); + #[method_id(substitutionsPanel)] pub unsafe fn substitutionsPanel(&self) -> Id; + #[method_id(substitutionsPanelAccessoryViewController)] pub unsafe fn substitutionsPanelAccessoryViewController( &self, ) -> Option>; + #[method(setSubstitutionsPanelAccessoryViewController:)] pub unsafe fn setSubstitutionsPanelAccessoryViewController( &self, substitutionsPanelAccessoryViewController: Option<&NSViewController>, ); + #[method(updatePanels)] pub unsafe fn updatePanels(&self); + #[method(ignoreWord:inSpellDocumentWithTag:)] pub unsafe fn ignoreWord_inSpellDocumentWithTag( &self, wordToIgnore: &NSString, tag: NSInteger, ); + #[method_id(ignoredWordsInSpellDocumentWithTag:)] pub unsafe fn ignoredWordsInSpellDocumentWithTag( &self, tag: NSInteger, ) -> Option, Shared>>; + #[method(setIgnoredWords:inSpellDocumentWithTag:)] pub unsafe fn setIgnoredWords_inSpellDocumentWithTag( &self, words: &NSArray, tag: NSInteger, ); + #[method_id(guessesForWordRange:inString:language:inSpellDocumentWithTag:)] pub unsafe fn guessesForWordRange_inString_language_inSpellDocumentWithTag( &self, @@ -151,6 +182,7 @@ extern_methods!( language: Option<&NSString>, tag: NSInteger, ) -> Option, Shared>>; + #[method_id(correctionForWordRange:inString:language:inSpellDocumentWithTag:)] pub unsafe fn correctionForWordRange_inString_language_inSpellDocumentWithTag( &self, @@ -159,6 +191,7 @@ extern_methods!( language: &NSString, tag: NSInteger, ) -> Option>; + #[method_id(completionsForPartialWordRange:inString:language:inSpellDocumentWithTag:)] pub unsafe fn completionsForPartialWordRange_inString_language_inSpellDocumentWithTag( &self, @@ -167,6 +200,7 @@ extern_methods!( language: Option<&NSString>, tag: NSInteger, ) -> Option, Shared>>; + #[method_id(languageForWordRange:inString:orthography:)] pub unsafe fn languageForWordRange_inString_orthography( &self, @@ -174,8 +208,10 @@ extern_methods!( string: &NSString, orthography: Option<&NSOrthography>, ) -> Option>; + #[method(closeSpellDocumentWithTag:)] pub unsafe fn closeSpellDocumentWithTag(&self, tag: NSInteger); + #[method(recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:)] pub unsafe fn recordResponse_toCorrection_forWord_language_inSpellDocumentWithTag( &self, @@ -185,6 +221,7 @@ extern_methods!( language: Option<&NSString>, tag: NSInteger, ); + #[method(showCorrectionIndicatorOfType:primaryString:alternativeStrings:forStringInRect:view:completionHandler:)] pub unsafe fn showCorrectionIndicatorOfType_primaryString_alternativeStrings_forStringInRect_view_completionHandler( &self, @@ -195,14 +232,17 @@ extern_methods!( view: &NSView, completionBlock: TodoBlock, ); + #[method(dismissCorrectionIndicatorForView:)] pub unsafe fn dismissCorrectionIndicatorForView(&self, view: &NSView); + #[method(preventsAutocorrectionBeforeString:language:)] pub unsafe fn preventsAutocorrectionBeforeString_language( &self, string: &NSString, language: Option<&NSString>, ) -> bool; + #[method(deletesAutospaceBetweenString:andString:language:)] pub unsafe fn deletesAutospaceBetweenString_andString_language( &self, @@ -210,51 +250,70 @@ extern_methods!( followingString: &NSString, language: Option<&NSString>, ) -> bool; + #[method_id(availableLanguages)] pub unsafe fn availableLanguages(&self) -> Id, Shared>; + #[method_id(userPreferredLanguages)] pub unsafe fn userPreferredLanguages(&self) -> Id, Shared>; + #[method(automaticallyIdentifiesLanguages)] pub unsafe fn automaticallyIdentifiesLanguages(&self) -> bool; + #[method(setAutomaticallyIdentifiesLanguages:)] pub unsafe fn setAutomaticallyIdentifiesLanguages( &self, automaticallyIdentifiesLanguages: bool, ); + #[method(setWordFieldStringValue:)] pub unsafe fn setWordFieldStringValue(&self, string: &NSString); + #[method(learnWord:)] pub unsafe fn learnWord(&self, word: &NSString); + #[method(hasLearnedWord:)] pub unsafe fn hasLearnedWord(&self, word: &NSString) -> bool; + #[method(unlearnWord:)] pub unsafe fn unlearnWord(&self, word: &NSString); + #[method(isAutomaticTextReplacementEnabled)] pub unsafe fn isAutomaticTextReplacementEnabled() -> bool; + #[method(isAutomaticSpellingCorrectionEnabled)] pub unsafe fn isAutomaticSpellingCorrectionEnabled() -> bool; + #[method(isAutomaticQuoteSubstitutionEnabled)] pub unsafe fn isAutomaticQuoteSubstitutionEnabled() -> bool; + #[method(isAutomaticDashSubstitutionEnabled)] pub unsafe fn isAutomaticDashSubstitutionEnabled() -> bool; + #[method(isAutomaticCapitalizationEnabled)] pub unsafe fn isAutomaticCapitalizationEnabled() -> bool; + #[method(isAutomaticPeriodSubstitutionEnabled)] pub unsafe fn isAutomaticPeriodSubstitutionEnabled() -> bool; + #[method(isAutomaticTextCompletionEnabled)] pub unsafe fn isAutomaticTextCompletionEnabled() -> bool; + #[method_id(language)] pub unsafe fn language(&self) -> Id; + #[method(setLanguage:)] pub unsafe fn setLanguage(&self, language: &NSString) -> bool; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSSpellChecker { #[method_id(guessesForWord:)] pub unsafe fn guessesForWord(&self, word: Option<&NSString>) -> Option>; + #[method(forgetWord:)] pub unsafe fn forgetWord(&self, word: Option<&NSString>); } diff --git a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs index e5147c331..d5df86943 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs @@ -1,6 +1,10 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSChangeSpelling = NSObject; + pub type NSIgnoreMisspelledWords = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs index a37a76962..cb0418a83 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitView.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -1,64 +1,87 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSSplitViewAutosaveName = NSString; + extern_class!( #[derive(Debug)] pub struct NSSplitView; + unsafe impl ClassType for NSSplitView { type Super = NSView; } ); + extern_methods!( unsafe impl NSSplitView { #[method(isVertical)] pub unsafe fn isVertical(&self) -> bool; + #[method(setVertical:)] pub unsafe fn setVertical(&self, vertical: bool); + #[method(dividerStyle)] pub unsafe fn dividerStyle(&self) -> NSSplitViewDividerStyle; + #[method(setDividerStyle:)] pub unsafe fn setDividerStyle(&self, dividerStyle: NSSplitViewDividerStyle); + #[method_id(autosaveName)] pub unsafe fn autosaveName(&self) -> Option>; + #[method(setAutosaveName:)] pub unsafe fn setAutosaveName(&self, autosaveName: Option<&NSSplitViewAutosaveName>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSplitViewDelegate>); + #[method(drawDividerInRect:)] pub unsafe fn drawDividerInRect(&self, rect: NSRect); + #[method_id(dividerColor)] pub unsafe fn dividerColor(&self) -> Id; + #[method(dividerThickness)] pub unsafe fn dividerThickness(&self) -> CGFloat; + #[method(adjustSubviews)] pub unsafe fn adjustSubviews(&self); + #[method(isSubviewCollapsed:)] pub unsafe fn isSubviewCollapsed(&self, subview: &NSView) -> bool; + #[method(minPossiblePositionOfDividerAtIndex:)] pub unsafe fn minPossiblePositionOfDividerAtIndex( &self, dividerIndex: NSInteger, ) -> CGFloat; + #[method(maxPossiblePositionOfDividerAtIndex:)] pub unsafe fn maxPossiblePositionOfDividerAtIndex( &self, dividerIndex: NSInteger, ) -> CGFloat; + #[method(setPosition:ofDividerAtIndex:)] pub unsafe fn setPosition_ofDividerAtIndex( &self, position: CGFloat, dividerIndex: NSInteger, ); + #[method(holdingPriorityForSubviewAtIndex:)] pub unsafe fn holdingPriorityForSubviewAtIndex( &self, subviewIndex: NSInteger, ) -> NSLayoutPriority; + #[method(setHoldingPriority:forSubviewAtIndex:)] pub unsafe fn setHoldingPriority_forSubviewAtIndex( &self, @@ -67,29 +90,38 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSSplitViewArrangedSubviews"] + /// NSSplitViewArrangedSubviews unsafe impl NSSplitView { #[method(arrangesAllSubviews)] pub unsafe fn arrangesAllSubviews(&self) -> bool; + #[method(setArrangesAllSubviews:)] pub unsafe fn setArrangesAllSubviews(&self, arrangesAllSubviews: bool); + #[method_id(arrangedSubviews)] pub unsafe fn arrangedSubviews(&self) -> Id, Shared>; + #[method(addArrangedSubview:)] pub unsafe fn addArrangedSubview(&self, view: &NSView); + #[method(insertArrangedSubview:atIndex:)] pub unsafe fn insertArrangedSubview_atIndex(&self, view: &NSView, index: NSInteger); + #[method(removeArrangedSubview:)] pub unsafe fn removeArrangedSubview(&self, view: &NSView); } ); + pub type NSSplitViewDelegate = NSObject; + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSSplitView { #[method(setIsPaneSplitter:)] pub unsafe fn setIsPaneSplitter(&self, flag: bool); + #[method(isPaneSplitter)] pub unsafe fn isPaneSplitter(&self) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs index 403e09051..a8a379f57 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs @@ -1,57 +1,75 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSplitViewController; + unsafe impl ClassType for NSSplitViewController { type Super = NSViewController; } ); + extern_methods!( unsafe impl NSSplitViewController { #[method_id(splitView)] pub unsafe fn splitView(&self) -> Id; + #[method(setSplitView:)] pub unsafe fn setSplitView(&self, splitView: &NSSplitView); + #[method_id(splitViewItems)] pub unsafe fn splitViewItems(&self) -> Id, Shared>; + #[method(setSplitViewItems:)] pub unsafe fn setSplitViewItems(&self, splitViewItems: &NSArray); + #[method(addSplitViewItem:)] pub unsafe fn addSplitViewItem(&self, splitViewItem: &NSSplitViewItem); + #[method(insertSplitViewItem:atIndex:)] pub unsafe fn insertSplitViewItem_atIndex( &self, splitViewItem: &NSSplitViewItem, index: NSInteger, ); + #[method(removeSplitViewItem:)] pub unsafe fn removeSplitViewItem(&self, splitViewItem: &NSSplitViewItem); + #[method_id(splitViewItemForViewController:)] pub unsafe fn splitViewItemForViewController( &self, viewController: &NSViewController, ) -> Option>; + #[method(minimumThicknessForInlineSidebars)] pub unsafe fn minimumThicknessForInlineSidebars(&self) -> CGFloat; + #[method(setMinimumThicknessForInlineSidebars:)] pub unsafe fn setMinimumThicknessForInlineSidebars( &self, minimumThicknessForInlineSidebars: CGFloat, ); + #[method(validateUserInterfaceItem:)] pub unsafe fn validateUserInterfaceItem(&self, item: &NSValidatedUserInterfaceItem) -> bool; + #[method(viewDidLoad)] pub unsafe fn viewDidLoad(&self); + #[method(splitView:canCollapseSubview:)] pub unsafe fn splitView_canCollapseSubview( &self, splitView: &NSSplitView, subview: &NSView, ) -> bool; + #[method(splitView:shouldCollapseSubview:forDoubleClickOnDividerAtIndex:)] pub unsafe fn splitView_shouldCollapseSubview_forDoubleClickOnDividerAtIndex( &self, @@ -59,12 +77,14 @@ extern_methods!( subview: &NSView, dividerIndex: NSInteger, ) -> bool; + #[method(splitView:shouldHideDividerAtIndex:)] pub unsafe fn splitView_shouldHideDividerAtIndex( &self, splitView: &NSSplitView, dividerIndex: NSInteger, ) -> bool; + #[method(splitView:effectiveRect:forDrawnRect:ofDividerAtIndex:)] pub unsafe fn splitView_effectiveRect_forDrawnRect_ofDividerAtIndex( &self, @@ -73,6 +93,7 @@ extern_methods!( drawnRect: NSRect, dividerIndex: NSInteger, ) -> NSRect; + #[method(splitView:additionalEffectiveRectOfDividerAtIndex:)] pub unsafe fn splitView_additionalEffectiveRectOfDividerAtIndex( &self, @@ -81,8 +102,9 @@ extern_methods!( ) -> NSRect; } ); + extern_methods!( - #[doc = "NSSplitViewControllerToggleSidebarAction"] + /// NSSplitViewControllerToggleSidebarAction unsafe impl NSSplitViewController { #[method(toggleSidebar:)] pub unsafe fn toggleSidebar(&self, sender: Option<&Object>); diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs index d0ea389e8..883a5f4c9 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs @@ -1,76 +1,108 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSplitViewItem; + unsafe impl ClassType for NSSplitViewItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSplitViewItem { #[method_id(splitViewItemWithViewController:)] pub unsafe fn splitViewItemWithViewController( viewController: &NSViewController, ) -> Id; + #[method_id(sidebarWithViewController:)] pub unsafe fn sidebarWithViewController( viewController: &NSViewController, ) -> Id; + #[method_id(contentListWithViewController:)] pub unsafe fn contentListWithViewController( viewController: &NSViewController, ) -> Id; + #[method(behavior)] pub unsafe fn behavior(&self) -> NSSplitViewItemBehavior; + #[method_id(viewController)] pub unsafe fn viewController(&self) -> Id; + #[method(setViewController:)] pub unsafe fn setViewController(&self, viewController: &NSViewController); + #[method(isCollapsed)] pub unsafe fn isCollapsed(&self) -> bool; + #[method(setCollapsed:)] pub unsafe fn setCollapsed(&self, collapsed: bool); + #[method(canCollapse)] pub unsafe fn canCollapse(&self) -> bool; + #[method(setCanCollapse:)] pub unsafe fn setCanCollapse(&self, canCollapse: bool); + #[method(collapseBehavior)] pub unsafe fn collapseBehavior(&self) -> NSSplitViewItemCollapseBehavior; + #[method(setCollapseBehavior:)] pub unsafe fn setCollapseBehavior(&self, collapseBehavior: NSSplitViewItemCollapseBehavior); + #[method(minimumThickness)] pub unsafe fn minimumThickness(&self) -> CGFloat; + #[method(setMinimumThickness:)] pub unsafe fn setMinimumThickness(&self, minimumThickness: CGFloat); + #[method(maximumThickness)] pub unsafe fn maximumThickness(&self) -> CGFloat; + #[method(setMaximumThickness:)] pub unsafe fn setMaximumThickness(&self, maximumThickness: CGFloat); + #[method(preferredThicknessFraction)] pub unsafe fn preferredThicknessFraction(&self) -> CGFloat; + #[method(setPreferredThicknessFraction:)] pub unsafe fn setPreferredThicknessFraction(&self, preferredThicknessFraction: CGFloat); + #[method(holdingPriority)] pub unsafe fn holdingPriority(&self) -> NSLayoutPriority; + #[method(setHoldingPriority:)] pub unsafe fn setHoldingPriority(&self, holdingPriority: NSLayoutPriority); + #[method(automaticMaximumThickness)] pub unsafe fn automaticMaximumThickness(&self) -> CGFloat; + #[method(setAutomaticMaximumThickness:)] pub unsafe fn setAutomaticMaximumThickness(&self, automaticMaximumThickness: CGFloat); + #[method(isSpringLoaded)] pub unsafe fn isSpringLoaded(&self) -> bool; + #[method(setSpringLoaded:)] pub unsafe fn setSpringLoaded(&self, springLoaded: bool); + #[method(allowsFullHeightLayout)] pub unsafe fn allowsFullHeightLayout(&self) -> bool; + #[method(setAllowsFullHeightLayout:)] pub unsafe fn setAllowsFullHeightLayout(&self, allowsFullHeightLayout: bool); + #[method(titlebarSeparatorStyle)] pub unsafe fn titlebarSeparatorStyle(&self) -> NSTitlebarSeparatorStyle; + #[method(setTitlebarSeparatorStyle:)] pub unsafe fn setTitlebarSeparatorStyle( &self, diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index 6e7f6df30..63aa03e2a 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -1,87 +1,119 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSStackView; + unsafe impl ClassType for NSStackView { type Super = NSView; } ); + extern_methods!( unsafe impl NSStackView { #[method_id(stackViewWithViews:)] pub unsafe fn stackViewWithViews(views: &NSArray) -> Id; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSStackViewDelegate>); + #[method(orientation)] pub unsafe fn orientation(&self) -> NSUserInterfaceLayoutOrientation; + #[method(setOrientation:)] pub unsafe fn setOrientation(&self, orientation: NSUserInterfaceLayoutOrientation); + #[method(alignment)] pub unsafe fn alignment(&self) -> NSLayoutAttribute; + #[method(setAlignment:)] pub unsafe fn setAlignment(&self, alignment: NSLayoutAttribute); + #[method(edgeInsets)] pub unsafe fn edgeInsets(&self) -> NSEdgeInsets; + #[method(setEdgeInsets:)] pub unsafe fn setEdgeInsets(&self, edgeInsets: NSEdgeInsets); + #[method(distribution)] pub unsafe fn distribution(&self) -> NSStackViewDistribution; + #[method(setDistribution:)] pub unsafe fn setDistribution(&self, distribution: NSStackViewDistribution); + #[method(spacing)] pub unsafe fn spacing(&self) -> CGFloat; + #[method(setSpacing:)] pub unsafe fn setSpacing(&self, spacing: CGFloat); + #[method(setCustomSpacing:afterView:)] pub unsafe fn setCustomSpacing_afterView(&self, spacing: CGFloat, view: &NSView); + #[method(customSpacingAfterView:)] pub unsafe fn customSpacingAfterView(&self, view: &NSView) -> CGFloat; + #[method(detachesHiddenViews)] pub unsafe fn detachesHiddenViews(&self) -> bool; + #[method(setDetachesHiddenViews:)] pub unsafe fn setDetachesHiddenViews(&self, detachesHiddenViews: bool); + #[method_id(arrangedSubviews)] pub unsafe fn arrangedSubviews(&self) -> Id, Shared>; + #[method(addArrangedSubview:)] pub unsafe fn addArrangedSubview(&self, view: &NSView); + #[method(insertArrangedSubview:atIndex:)] pub unsafe fn insertArrangedSubview_atIndex(&self, view: &NSView, index: NSInteger); + #[method(removeArrangedSubview:)] pub unsafe fn removeArrangedSubview(&self, view: &NSView); + #[method_id(detachedViews)] pub unsafe fn detachedViews(&self) -> Id, Shared>; + #[method(setVisibilityPriority:forView:)] pub unsafe fn setVisibilityPriority_forView( &self, priority: NSStackViewVisibilityPriority, view: &NSView, ); + #[method(visibilityPriorityForView:)] pub unsafe fn visibilityPriorityForView( &self, view: &NSView, ) -> NSStackViewVisibilityPriority; + #[method(clippingResistancePriorityForOrientation:)] pub unsafe fn clippingResistancePriorityForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> NSLayoutPriority; + #[method(setClippingResistancePriority:forOrientation:)] pub unsafe fn setClippingResistancePriority_forOrientation( &self, clippingResistancePriority: NSLayoutPriority, orientation: NSLayoutConstraintOrientation, ); + #[method(huggingPriorityForOrientation:)] pub unsafe fn huggingPriorityForOrientation( &self, orientation: NSLayoutConstraintOrientation, ) -> NSLayoutPriority; + #[method(setHuggingPriority:forOrientation:)] pub unsafe fn setHuggingPriority_forOrientation( &self, @@ -90,12 +122,15 @@ extern_methods!( ); } ); + pub type NSStackViewDelegate = NSObject; + extern_methods!( - #[doc = "NSStackViewGravityAreas"] + /// NSStackViewGravityAreas unsafe impl NSStackView { #[method(addView:inGravity:)] pub unsafe fn addView_inGravity(&self, view: &NSView, gravity: NSStackViewGravity); + #[method(insertView:atIndex:inGravity:)] pub unsafe fn insertView_atIndex_inGravity( &self, @@ -103,28 +138,34 @@ extern_methods!( index: NSUInteger, gravity: NSStackViewGravity, ); + #[method(removeView:)] pub unsafe fn removeView(&self, view: &NSView); + #[method_id(viewsInGravity:)] pub unsafe fn viewsInGravity( &self, gravity: NSStackViewGravity, ) -> Id, Shared>; + #[method(setViews:inGravity:)] pub unsafe fn setViews_inGravity( &self, views: &NSArray, gravity: NSStackViewGravity, ); + #[method_id(views)] pub unsafe fn views(&self) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSStackViewDeprecated"] + /// NSStackViewDeprecated unsafe impl NSStackView { #[method(hasEqualSpacing)] pub unsafe fn hasEqualSpacing(&self) -> bool; + #[method(setHasEqualSpacing:)] pub unsafe fn setHasEqualSpacing(&self, hasEqualSpacing: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSStatusBar.rs b/crates/icrate/src/generated/AppKit/NSStatusBar.rs index e5c700502..02011f4a2 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBar.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBar.rs @@ -1,24 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSStatusBar; + unsafe impl ClassType for NSStatusBar { type Super = NSObject; } ); + extern_methods!( unsafe impl NSStatusBar { #[method_id(systemStatusBar)] pub unsafe fn systemStatusBar() -> Id; + #[method_id(statusItemWithLength:)] pub unsafe fn statusItemWithLength(&self, length: CGFloat) -> Id; + #[method(removeStatusItem:)] pub unsafe fn removeStatusItem(&self, item: &NSStatusItem); + #[method(isVertical)] pub unsafe fn isVertical(&self) -> bool; + #[method(thickness)] pub unsafe fn thickness(&self) -> CGFloat; } diff --git a/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs b/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs index 7e50e1777..5b557cc9e 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs @@ -1,18 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSStatusBarButton; + unsafe impl ClassType for NSStatusBarButton { type Super = NSButton; } ); + extern_methods!( unsafe impl NSStatusBarButton { #[method(appearsDisabled)] pub unsafe fn appearsDisabled(&self) -> bool; + #[method(setAppearsDisabled:)] pub unsafe fn setAppearsDisabled(&self, appearsDisabled: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs index fe52b9599..6f66c81f7 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusItem.rs @@ -1,98 +1,140 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSStatusItemAutosaveName = NSString; + extern_class!( #[derive(Debug)] pub struct NSStatusItem; + unsafe impl ClassType for NSStatusItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSStatusItem { #[method_id(statusBar)] pub unsafe fn statusBar(&self) -> Option>; + #[method(length)] pub unsafe fn length(&self) -> CGFloat; + #[method(setLength:)] pub unsafe fn setLength(&self, length: CGFloat); + #[method_id(menu)] pub unsafe fn menu(&self) -> Option>; + #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); + #[method_id(button)] pub unsafe fn button(&self) -> Option>; + #[method(behavior)] pub unsafe fn behavior(&self) -> NSStatusItemBehavior; + #[method(setBehavior:)] pub unsafe fn setBehavior(&self, behavior: NSStatusItemBehavior); + #[method(isVisible)] pub unsafe fn isVisible(&self) -> bool; + #[method(setVisible:)] pub unsafe fn setVisible(&self, visible: bool); + #[method_id(autosaveName)] pub unsafe fn autosaveName(&self) -> Id; + #[method(setAutosaveName:)] pub unsafe fn setAutosaveName(&self, autosaveName: Option<&NSStatusItemAutosaveName>); } ); + extern_methods!( - #[doc = "NSStatusItemDeprecated"] + /// NSStatusItemDeprecated unsafe impl NSStatusItem { #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method_id(title)] pub unsafe fn title(&self) -> Option>; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; + #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; + #[method(setAlternateImage:)] pub unsafe fn setAlternateImage(&self, alternateImage: Option<&NSImage>); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method(highlightMode)] pub unsafe fn highlightMode(&self) -> bool; + #[method(setHighlightMode:)] pub unsafe fn setHighlightMode(&self, highlightMode: bool); + #[method_id(toolTip)] pub unsafe fn toolTip(&self) -> Option>; + #[method(setToolTip:)] pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + #[method(sendActionOn:)] pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; + #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(drawStatusBarBackgroundInRect:withHighlight:)] pub unsafe fn drawStatusBarBackgroundInRect_withHighlight( &self, rect: NSRect, highlight: bool, ); + #[method(popUpStatusItemMenu:)] pub unsafe fn popUpStatusItemMenu(&self, menu: &NSMenu); } diff --git a/crates/icrate/src/generated/AppKit/NSStepper.rs b/crates/icrate/src/generated/AppKit/NSStepper.rs index 2d743bb0b..6231b37d0 100644 --- a/crates/icrate/src/generated/AppKit/NSStepper.rs +++ b/crates/icrate/src/generated/AppKit/NSStepper.rs @@ -1,34 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSStepper; + unsafe impl ClassType for NSStepper { type Super = NSControl; } ); + extern_methods!( unsafe impl NSStepper { #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(increment)] pub unsafe fn increment(&self) -> c_double; + #[method(setIncrement:)] pub unsafe fn setIncrement(&self, increment: c_double); + #[method(valueWraps)] pub unsafe fn valueWraps(&self) -> bool; + #[method(setValueWraps:)] pub unsafe fn setValueWraps(&self, valueWraps: bool); + #[method(autorepeat)] pub unsafe fn autorepeat(&self) -> bool; + #[method(setAutorepeat:)] pub unsafe fn setAutorepeat(&self, autorepeat: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSStepperCell.rs b/crates/icrate/src/generated/AppKit/NSStepperCell.rs index dec76e271..0b16fe6a6 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperCell.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperCell.rs @@ -1,34 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSStepperCell; + unsafe impl ClassType for NSStepperCell { type Super = NSActionCell; } ); + extern_methods!( unsafe impl NSStepperCell { #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(increment)] pub unsafe fn increment(&self) -> c_double; + #[method(setIncrement:)] pub unsafe fn setIncrement(&self, increment: c_double); + #[method(valueWraps)] pub unsafe fn valueWraps(&self) -> bool; + #[method(setValueWraps:)] pub unsafe fn setValueWraps(&self, valueWraps: bool); + #[method(autorepeat)] pub unsafe fn autorepeat(&self) -> bool; + #[method(setAutorepeat:)] pub unsafe fn setAutorepeat(&self, autorepeat: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs index d8c785910..c4c5a83eb 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSStepperTouchBarItem; + unsafe impl ClassType for NSStepperTouchBarItem { type Super = NSTouchBarItem; } ); + extern_methods!( unsafe impl NSStepperTouchBarItem { #[method_id(stepperTouchBarItemWithIdentifier:formatter:)] @@ -16,37 +21,52 @@ extern_methods!( identifier: &NSTouchBarItemIdentifier, formatter: &NSFormatter, ) -> Id; + #[method_id(stepperTouchBarItemWithIdentifier:drawingHandler:)] pub unsafe fn stepperTouchBarItemWithIdentifier_drawingHandler( identifier: &NSTouchBarItemIdentifier, drawingHandler: TodoBlock, ) -> Id; + #[method(maxValue)] pub unsafe fn maxValue(&self) -> c_double; + #[method(setMaxValue:)] pub unsafe fn setMaxValue(&self, maxValue: c_double); + #[method(minValue)] pub unsafe fn minValue(&self) -> c_double; + #[method(setMinValue:)] pub unsafe fn setMinValue(&self, minValue: c_double); + #[method(increment)] pub unsafe fn increment(&self) -> c_double; + #[method(setIncrement:)] pub unsafe fn setIncrement(&self, increment: c_double); + #[method(value)] pub unsafe fn value(&self) -> c_double; + #[method(setValue:)] pub unsafe fn setValue(&self, value: c_double); + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method_id(customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; + #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); } diff --git a/crates/icrate/src/generated/AppKit/NSStoryboard.rs b/crates/icrate/src/generated/AppKit/NSStoryboard.rs index 7bb811574..452475d0d 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboard.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboard.rs @@ -1,37 +1,49 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSStoryboardName = NSString; + pub type NSStoryboardSceneIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSStoryboard; + unsafe impl ClassType for NSStoryboard { type Super = NSObject; } ); + extern_methods!( unsafe impl NSStoryboard { #[method_id(mainStoryboard)] pub unsafe fn mainStoryboard() -> Option>; + #[method_id(storyboardWithName:bundle:)] pub unsafe fn storyboardWithName_bundle( name: &NSStoryboardName, storyboardBundleOrNil: Option<&NSBundle>, ) -> Id; + #[method_id(instantiateInitialController)] pub unsafe fn instantiateInitialController(&self) -> Option>; + #[method_id(instantiateInitialControllerWithCreator:)] pub unsafe fn instantiateInitialControllerWithCreator( &self, block: NSStoryboardControllerCreator, ) -> Option>; + #[method_id(instantiateControllerWithIdentifier:)] pub unsafe fn instantiateControllerWithIdentifier( &self, identifier: &NSStoryboardSceneIdentifier, ) -> Id; + #[method_id(instantiateControllerWithIdentifier:creator:)] pub unsafe fn instantiateControllerWithIdentifier_creator( &self, diff --git a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs index ea793d38b..373812ff5 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSStoryboardSegueIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSStoryboardSegue; + unsafe impl ClassType for NSStoryboardSegue { type Super = NSObject; } ); + extern_methods!( unsafe impl NSStoryboardSegue { #[method_id(segueWithIdentifier:source:destination:performHandler:)] @@ -19,6 +25,7 @@ extern_methods!( destinationController: &Object, performHandler: TodoBlock, ) -> Id; + #[method_id(initWithIdentifier:source:destination:)] pub unsafe fn initWithIdentifier_source_destination( &self, @@ -26,14 +33,19 @@ extern_methods!( sourceController: &Object, destinationController: &Object, ) -> Id; + #[method_id(identifier)] pub unsafe fn identifier(&self) -> Option>; + #[method_id(sourceController)] pub unsafe fn sourceController(&self) -> Id; + #[method_id(destinationController)] pub unsafe fn destinationController(&self) -> Id; + #[method(perform)] pub unsafe fn perform(&self); } ); + pub type NSSeguePerforming = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs index 29e856755..522e9f9cf 100644 --- a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs +++ b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs @@ -1,40 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSStringDrawingContext; + unsafe impl ClassType for NSStringDrawingContext { type Super = NSObject; } ); + extern_methods!( unsafe impl NSStringDrawingContext { #[method(minimumScaleFactor)] pub unsafe fn minimumScaleFactor(&self) -> CGFloat; + #[method(setMinimumScaleFactor:)] pub unsafe fn setMinimumScaleFactor(&self, minimumScaleFactor: CGFloat); + #[method(actualScaleFactor)] pub unsafe fn actualScaleFactor(&self) -> CGFloat; + #[method(totalBounds)] pub unsafe fn totalBounds(&self) -> NSRect; } ); + extern_methods!( - #[doc = "NSStringDrawing"] + /// NSStringDrawing unsafe impl NSString { #[method(sizeWithAttributes:)] pub unsafe fn sizeWithAttributes( &self, attrs: Option<&NSDictionary>, ) -> NSSize; + #[method(drawAtPoint:withAttributes:)] pub unsafe fn drawAtPoint_withAttributes( &self, point: NSPoint, attrs: Option<&NSDictionary>, ); + #[method(drawInRect:withAttributes:)] pub unsafe fn drawInRect_withAttributes( &self, @@ -43,19 +54,23 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSStringDrawing"] + /// NSStringDrawing unsafe impl NSAttributedString { #[method(size)] pub unsafe fn size(&self) -> NSSize; + #[method(drawAtPoint:)] pub unsafe fn drawAtPoint(&self, point: NSPoint); + #[method(drawInRect:)] pub unsafe fn drawInRect(&self, rect: NSRect); } ); + extern_methods!( - #[doc = "NSExtendedStringDrawing"] + /// NSExtendedStringDrawing unsafe impl NSString { #[method(drawWithRect:options:attributes:context:)] pub unsafe fn drawWithRect_options_attributes_context( @@ -65,6 +80,7 @@ extern_methods!( attributes: Option<&NSDictionary>, context: Option<&NSStringDrawingContext>, ); + #[method(boundingRectWithSize:options:attributes:context:)] pub unsafe fn boundingRectWithSize_options_attributes_context( &self, @@ -75,8 +91,9 @@ extern_methods!( ) -> NSRect; } ); + extern_methods!( - #[doc = "NSExtendedStringDrawing"] + /// NSExtendedStringDrawing unsafe impl NSAttributedString { #[method(drawWithRect:options:context:)] pub unsafe fn drawWithRect_options_context( @@ -85,6 +102,7 @@ extern_methods!( options: NSStringDrawingOptions, context: Option<&NSStringDrawingContext>, ); + #[method(boundingRectWithSize:options:context:)] pub unsafe fn boundingRectWithSize_options_context( &self, @@ -94,8 +112,9 @@ extern_methods!( ) -> NSRect; } ); + extern_methods!( - #[doc = "NSStringDrawingDeprecated"] + /// NSStringDrawingDeprecated unsafe impl NSString { #[method(drawWithRect:options:attributes:)] pub unsafe fn drawWithRect_options_attributes( @@ -104,6 +123,7 @@ extern_methods!( options: NSStringDrawingOptions, attributes: Option<&NSDictionary>, ); + #[method(boundingRectWithSize:options:attributes:)] pub unsafe fn boundingRectWithSize_options_attributes( &self, @@ -113,11 +133,13 @@ extern_methods!( ) -> NSRect; } ); + extern_methods!( - #[doc = "NSStringDrawingDeprecated"] + /// NSStringDrawingDeprecated unsafe impl NSAttributedString { #[method(drawWithRect:options:)] pub unsafe fn drawWithRect_options(&self, rect: NSRect, options: NSStringDrawingOptions); + #[method(boundingRectWithSize:options:)] pub unsafe fn boundingRectWithSize_options( &self, diff --git a/crates/icrate/src/generated/AppKit/NSSwitch.rs b/crates/icrate/src/generated/AppKit/NSSwitch.rs index faae033a5..75cdf4ce3 100644 --- a/crates/icrate/src/generated/AppKit/NSSwitch.rs +++ b/crates/icrate/src/generated/AppKit/NSSwitch.rs @@ -1,18 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSwitch; + unsafe impl ClassType for NSSwitch { type Super = NSControl; } ); + extern_methods!( unsafe impl NSSwitch { #[method(state)] pub unsafe fn state(&self) -> NSControlStateValue; + #[method(setState:)] pub unsafe fn setState(&self, state: NSControlStateValue); } diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs index 323082f10..49466a828 100644 --- a/crates/icrate/src/generated/AppKit/NSTabView.rs +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -1,101 +1,145 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTabView; + unsafe impl ClassType for NSTabView { type Super = NSView; } ); + extern_methods!( unsafe impl NSTabView { #[method(selectTabViewItem:)] pub unsafe fn selectTabViewItem(&self, tabViewItem: Option<&NSTabViewItem>); + #[method(selectTabViewItemAtIndex:)] pub unsafe fn selectTabViewItemAtIndex(&self, index: NSInteger); + #[method(selectTabViewItemWithIdentifier:)] pub unsafe fn selectTabViewItemWithIdentifier(&self, identifier: &Object); + #[method(takeSelectedTabViewItemFromSender:)] pub unsafe fn takeSelectedTabViewItemFromSender(&self, sender: Option<&Object>); + #[method(selectFirstTabViewItem:)] pub unsafe fn selectFirstTabViewItem(&self, sender: Option<&Object>); + #[method(selectLastTabViewItem:)] pub unsafe fn selectLastTabViewItem(&self, sender: Option<&Object>); + #[method(selectNextTabViewItem:)] pub unsafe fn selectNextTabViewItem(&self, sender: Option<&Object>); + #[method(selectPreviousTabViewItem:)] pub unsafe fn selectPreviousTabViewItem(&self, sender: Option<&Object>); + #[method_id(selectedTabViewItem)] pub unsafe fn selectedTabViewItem(&self) -> Option>; + #[method_id(font)] pub unsafe fn font(&self) -> Id; + #[method(setFont:)] pub unsafe fn setFont(&self, font: &NSFont); + #[method(tabViewType)] pub unsafe fn tabViewType(&self) -> NSTabViewType; + #[method(setTabViewType:)] pub unsafe fn setTabViewType(&self, tabViewType: NSTabViewType); + #[method(tabPosition)] pub unsafe fn tabPosition(&self) -> NSTabPosition; + #[method(setTabPosition:)] pub unsafe fn setTabPosition(&self, tabPosition: NSTabPosition); + #[method(tabViewBorderType)] pub unsafe fn tabViewBorderType(&self) -> NSTabViewBorderType; + #[method(setTabViewBorderType:)] pub unsafe fn setTabViewBorderType(&self, tabViewBorderType: NSTabViewBorderType); + #[method_id(tabViewItems)] pub unsafe fn tabViewItems(&self) -> Id, Shared>; + #[method(setTabViewItems:)] pub unsafe fn setTabViewItems(&self, tabViewItems: &NSArray); + #[method(allowsTruncatedLabels)] pub unsafe fn allowsTruncatedLabels(&self) -> bool; + #[method(setAllowsTruncatedLabels:)] pub unsafe fn setAllowsTruncatedLabels(&self, allowsTruncatedLabels: bool); + #[method(minimumSize)] pub unsafe fn minimumSize(&self) -> NSSize; + #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method(controlSize)] pub unsafe fn controlSize(&self) -> NSControlSize; + #[method(setControlSize:)] pub unsafe fn setControlSize(&self, controlSize: NSControlSize); + #[method(addTabViewItem:)] pub unsafe fn addTabViewItem(&self, tabViewItem: &NSTabViewItem); + #[method(insertTabViewItem:atIndex:)] pub unsafe fn insertTabViewItem_atIndex( &self, tabViewItem: &NSTabViewItem, index: NSInteger, ); + #[method(removeTabViewItem:)] pub unsafe fn removeTabViewItem(&self, tabViewItem: &NSTabViewItem); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTabViewDelegate>); + #[method_id(tabViewItemAtPoint:)] pub unsafe fn tabViewItemAtPoint( &self, point: NSPoint, ) -> Option>; + #[method(contentRect)] pub unsafe fn contentRect(&self) -> NSRect; + #[method(numberOfTabViewItems)] pub unsafe fn numberOfTabViewItems(&self) -> NSInteger; + #[method(indexOfTabViewItem:)] pub unsafe fn indexOfTabViewItem(&self, tabViewItem: &NSTabViewItem) -> NSInteger; + #[method_id(tabViewItemAtIndex:)] pub unsafe fn tabViewItemAtIndex(&self, index: NSInteger) -> Id; + #[method(indexOfTabViewItemWithIdentifier:)] pub unsafe fn indexOfTabViewItemWithIdentifier(&self, identifier: &Object) -> NSInteger; + #[method(controlTint)] pub unsafe fn controlTint(&self) -> NSControlTint; + #[method(setControlTint:)] pub unsafe fn setControlTint(&self, controlTint: NSControlTint); } ); + pub type NSTabViewDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTabViewController.rs b/crates/icrate/src/generated/AppKit/NSTabViewController.rs index 262000a4f..81152901c 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewController.rs @@ -1,81 +1,106 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTabViewController; + unsafe impl ClassType for NSTabViewController { type Super = NSViewController; } ); + extern_methods!( unsafe impl NSTabViewController { #[method(tabStyle)] pub unsafe fn tabStyle(&self) -> NSTabViewControllerTabStyle; + #[method(setTabStyle:)] pub unsafe fn setTabStyle(&self, tabStyle: NSTabViewControllerTabStyle); + #[method_id(tabView)] pub unsafe fn tabView(&self) -> Id; + #[method(setTabView:)] pub unsafe fn setTabView(&self, tabView: &NSTabView); + #[method(transitionOptions)] pub unsafe fn transitionOptions(&self) -> NSViewControllerTransitionOptions; + #[method(setTransitionOptions:)] pub unsafe fn setTransitionOptions( &self, transitionOptions: NSViewControllerTransitionOptions, ); + #[method(canPropagateSelectedChildViewControllerTitle)] pub unsafe fn canPropagateSelectedChildViewControllerTitle(&self) -> bool; + #[method(setCanPropagateSelectedChildViewControllerTitle:)] pub unsafe fn setCanPropagateSelectedChildViewControllerTitle( &self, canPropagateSelectedChildViewControllerTitle: bool, ); + #[method_id(tabViewItems)] pub unsafe fn tabViewItems(&self) -> Id, Shared>; + #[method(setTabViewItems:)] pub unsafe fn setTabViewItems(&self, tabViewItems: &NSArray); + #[method(selectedTabViewItemIndex)] pub unsafe fn selectedTabViewItemIndex(&self) -> NSInteger; + #[method(setSelectedTabViewItemIndex:)] pub unsafe fn setSelectedTabViewItemIndex(&self, selectedTabViewItemIndex: NSInteger); + #[method(addTabViewItem:)] pub unsafe fn addTabViewItem(&self, tabViewItem: &NSTabViewItem); + #[method(insertTabViewItem:atIndex:)] pub unsafe fn insertTabViewItem_atIndex( &self, tabViewItem: &NSTabViewItem, index: NSInteger, ); + #[method(removeTabViewItem:)] pub unsafe fn removeTabViewItem(&self, tabViewItem: &NSTabViewItem); + #[method_id(tabViewItemForViewController:)] pub unsafe fn tabViewItemForViewController( &self, viewController: &NSViewController, ) -> Option>; + #[method(viewDidLoad)] pub unsafe fn viewDidLoad(&self); + #[method(tabView:willSelectTabViewItem:)] pub unsafe fn tabView_willSelectTabViewItem( &self, tabView: &NSTabView, tabViewItem: Option<&NSTabViewItem>, ); + #[method(tabView:didSelectTabViewItem:)] pub unsafe fn tabView_didSelectTabViewItem( &self, tabView: &NSTabView, tabViewItem: Option<&NSTabViewItem>, ); + #[method(tabView:shouldSelectTabViewItem:)] pub unsafe fn tabView_shouldSelectTabViewItem( &self, tabView: &NSTabView, tabViewItem: Option<&NSTabViewItem>, ) -> bool; + #[method_id(toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:)] pub unsafe fn toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar( &self, @@ -83,16 +108,19 @@ extern_methods!( itemIdentifier: &NSToolbarItemIdentifier, flag: bool, ) -> Option>; + #[method_id(toolbarDefaultItemIdentifiers:)] pub unsafe fn toolbarDefaultItemIdentifiers( &self, toolbar: &NSToolbar, ) -> Id, Shared>; + #[method_id(toolbarAllowedItemIdentifiers:)] pub unsafe fn toolbarAllowedItemIdentifiers( &self, toolbar: &NSToolbar, ) -> Id, Shared>; + #[method_id(toolbarSelectableItemIdentifiers:)] pub unsafe fn toolbarSelectableItemIdentifiers( &self, diff --git a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs index cae023c5f..ed0a1f2af 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs @@ -1,60 +1,86 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTabViewItem; + unsafe impl ClassType for NSTabViewItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTabViewItem { #[method_id(tabViewItemWithViewController:)] pub unsafe fn tabViewItemWithViewController( viewController: &NSViewController, ) -> Id; + #[method_id(initWithIdentifier:)] pub unsafe fn initWithIdentifier(&self, identifier: Option<&Object>) -> Id; + #[method_id(identifier)] pub unsafe fn identifier(&self) -> Option>; + #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: Option<&Object>); + #[method_id(color)] pub unsafe fn color(&self) -> Id; + #[method(setColor:)] pub unsafe fn setColor(&self, color: &NSColor); + #[method_id(label)] pub unsafe fn label(&self) -> Id; + #[method(setLabel:)] pub unsafe fn setLabel(&self, label: &NSString); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); + #[method_id(viewController)] pub unsafe fn viewController(&self) -> Option>; + #[method(setViewController:)] pub unsafe fn setViewController(&self, viewController: Option<&NSViewController>); + #[method(tabState)] pub unsafe fn tabState(&self) -> NSTabState; + #[method_id(tabView)] pub unsafe fn tabView(&self) -> Option>; + #[method_id(initialFirstResponder)] pub unsafe fn initialFirstResponder(&self) -> Option>; + #[method(setInitialFirstResponder:)] pub unsafe fn setInitialFirstResponder(&self, initialFirstResponder: Option<&NSView>); + #[method_id(toolTip)] pub unsafe fn toolTip(&self) -> Option>; + #[method(setToolTip:)] pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + #[method(drawLabel:inRect:)] pub unsafe fn drawLabel_inRect(&self, shouldTruncateLabel: bool, labelRect: NSRect); + #[method(sizeOfLabel:)] pub unsafe fn sizeOfLabel(&self, computeMin: bool) -> NSSize; } diff --git a/crates/icrate/src/generated/AppKit/NSTableCellView.rs b/crates/icrate/src/generated/AppKit/NSTableCellView.rs index 872107b94..187202e12 100644 --- a/crates/icrate/src/generated/AppKit/NSTableCellView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableCellView.rs @@ -1,36 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTableCellView; + unsafe impl ClassType for NSTableCellView { type Super = NSView; } ); + extern_methods!( unsafe impl NSTableCellView { #[method_id(objectValue)] pub unsafe fn objectValue(&self) -> Option>; + #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); + #[method_id(textField)] pub unsafe fn textField(&self) -> Option>; + #[method(setTextField:)] pub unsafe fn setTextField(&self, textField: Option<&NSTextField>); + #[method_id(imageView)] pub unsafe fn imageView(&self) -> Option>; + #[method(setImageView:)] pub unsafe fn setImageView(&self, imageView: Option<&NSImageView>); + #[method(backgroundStyle)] pub unsafe fn backgroundStyle(&self) -> NSBackgroundStyle; + #[method(setBackgroundStyle:)] pub unsafe fn setBackgroundStyle(&self, backgroundStyle: NSBackgroundStyle); + #[method(rowSizeStyle)] pub unsafe fn rowSizeStyle(&self) -> NSTableViewRowSizeStyle; + #[method(setRowSizeStyle:)] pub unsafe fn setRowSizeStyle(&self, rowSizeStyle: NSTableViewRowSizeStyle); + #[method_id(draggingImageComponents)] pub unsafe fn draggingImageComponents( &self, diff --git a/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs index e353855cf..cb0ae7274 100644 --- a/crates/icrate/src/generated/AppKit/NSTableColumn.rs +++ b/crates/icrate/src/generated/AppKit/NSTableColumn.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTableColumn; + unsafe impl ClassType for NSTableColumn { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTableColumn { #[method_id(initWithIdentifier:)] @@ -16,74 +21,105 @@ extern_methods!( &self, identifier: &NSUserInterfaceItemIdentifier, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(identifier)] pub unsafe fn identifier(&self) -> Id; + #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: &NSUserInterfaceItemIdentifier); + #[method_id(tableView)] pub unsafe fn tableView(&self) -> Option>; + #[method(setTableView:)] pub unsafe fn setTableView(&self, tableView: Option<&NSTableView>); + #[method(width)] pub unsafe fn width(&self) -> CGFloat; + #[method(setWidth:)] pub unsafe fn setWidth(&self, width: CGFloat); + #[method(minWidth)] pub unsafe fn minWidth(&self) -> CGFloat; + #[method(setMinWidth:)] pub unsafe fn setMinWidth(&self, minWidth: CGFloat); + #[method(maxWidth)] pub unsafe fn maxWidth(&self) -> CGFloat; + #[method(setMaxWidth:)] pub unsafe fn setMaxWidth(&self, maxWidth: CGFloat); + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(headerCell)] pub unsafe fn headerCell(&self) -> Id; + #[method(setHeaderCell:)] pub unsafe fn setHeaderCell(&self, headerCell: &NSTableHeaderCell); + #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[method_id(sortDescriptorPrototype)] pub unsafe fn sortDescriptorPrototype(&self) -> Option>; + #[method(setSortDescriptorPrototype:)] pub unsafe fn setSortDescriptorPrototype( &self, sortDescriptorPrototype: Option<&NSSortDescriptor>, ); + #[method(resizingMask)] pub unsafe fn resizingMask(&self) -> NSTableColumnResizingOptions; + #[method(setResizingMask:)] pub unsafe fn setResizingMask(&self, resizingMask: NSTableColumnResizingOptions); + #[method_id(headerToolTip)] pub unsafe fn headerToolTip(&self) -> Option>; + #[method(setHeaderToolTip:)] pub unsafe fn setHeaderToolTip(&self, headerToolTip: Option<&NSString>); + #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSTableColumn { #[method(setResizable:)] pub unsafe fn setResizable(&self, flag: bool); + #[method(isResizable)] pub unsafe fn isResizable(&self) -> bool; + #[method_id(dataCell)] pub unsafe fn dataCell(&self) -> Id; + #[method(setDataCell:)] pub unsafe fn setDataCell(&self, dataCell: &Object); + #[method_id(dataCellForRow:)] pub unsafe fn dataCellForRow(&self, row: NSInteger) -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs index afcbd719b..4d83a6cb8 100644 --- a/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTableHeaderCell; + unsafe impl ClassType for NSTableHeaderCell { type Super = NSTextFieldCell; } ); + extern_methods!( unsafe impl NSTableHeaderCell { #[method(drawSortIndicatorWithFrame:inView:ascending:priority:)] @@ -19,6 +24,7 @@ extern_methods!( ascending: bool, priority: NSInteger, ); + #[method(sortIndicatorRectForBounds:)] pub unsafe fn sortIndicatorRectForBounds(&self, rect: NSRect) -> NSRect; } diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs index 6e44c1235..0a7728b6c 100644 --- a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTableHeaderView; + unsafe impl ClassType for NSTableHeaderView { type Super = NSView; } ); + extern_methods!( unsafe impl NSTableHeaderView { #[method_id(tableView)] pub unsafe fn tableView(&self) -> Option>; + #[method(setTableView:)] pub unsafe fn setTableView(&self, tableView: Option<&NSTableView>); + #[method(draggedColumn)] pub unsafe fn draggedColumn(&self) -> NSInteger; + #[method(draggedDistance)] pub unsafe fn draggedDistance(&self) -> CGFloat; + #[method(resizedColumn)] pub unsafe fn resizedColumn(&self) -> NSInteger; + #[method(headerRectOfColumn:)] pub unsafe fn headerRectOfColumn(&self, column: NSInteger) -> NSRect; + #[method(columnAtPoint:)] pub unsafe fn columnAtPoint(&self, point: NSPoint) -> NSInteger; } diff --git a/crates/icrate/src/generated/AppKit/NSTableRowView.rs b/crates/icrate/src/generated/AppKit/NSTableRowView.rs index c0befb27d..178ad7f51 100644 --- a/crates/icrate/src/generated/AppKit/NSTableRowView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableRowView.rs @@ -1,80 +1,113 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTableRowView; + unsafe impl ClassType for NSTableRowView { type Super = NSView; } ); + extern_methods!( unsafe impl NSTableRowView { #[method(selectionHighlightStyle)] pub unsafe fn selectionHighlightStyle(&self) -> NSTableViewSelectionHighlightStyle; + #[method(setSelectionHighlightStyle:)] pub unsafe fn setSelectionHighlightStyle( &self, selectionHighlightStyle: NSTableViewSelectionHighlightStyle, ); + #[method(isEmphasized)] pub unsafe fn isEmphasized(&self) -> bool; + #[method(setEmphasized:)] pub unsafe fn setEmphasized(&self, emphasized: bool); + #[method(isGroupRowStyle)] pub unsafe fn isGroupRowStyle(&self) -> bool; + #[method(setGroupRowStyle:)] pub unsafe fn setGroupRowStyle(&self, groupRowStyle: bool); + #[method(isSelected)] pub unsafe fn isSelected(&self) -> bool; + #[method(setSelected:)] pub unsafe fn setSelected(&self, selected: bool); + #[method(isPreviousRowSelected)] pub unsafe fn isPreviousRowSelected(&self) -> bool; + #[method(setPreviousRowSelected:)] pub unsafe fn setPreviousRowSelected(&self, previousRowSelected: bool); + #[method(isNextRowSelected)] pub unsafe fn isNextRowSelected(&self) -> bool; + #[method(setNextRowSelected:)] pub unsafe fn setNextRowSelected(&self, nextRowSelected: bool); + #[method(isFloating)] pub unsafe fn isFloating(&self) -> bool; + #[method(setFloating:)] pub unsafe fn setFloating(&self, floating: bool); + #[method(isTargetForDropOperation)] pub unsafe fn isTargetForDropOperation(&self) -> bool; + #[method(setTargetForDropOperation:)] pub unsafe fn setTargetForDropOperation(&self, targetForDropOperation: bool); + #[method(draggingDestinationFeedbackStyle)] pub unsafe fn draggingDestinationFeedbackStyle( &self, ) -> NSTableViewDraggingDestinationFeedbackStyle; + #[method(setDraggingDestinationFeedbackStyle:)] pub unsafe fn setDraggingDestinationFeedbackStyle( &self, draggingDestinationFeedbackStyle: NSTableViewDraggingDestinationFeedbackStyle, ); + #[method(indentationForDropOperation)] pub unsafe fn indentationForDropOperation(&self) -> CGFloat; + #[method(setIndentationForDropOperation:)] pub unsafe fn setIndentationForDropOperation(&self, indentationForDropOperation: CGFloat); + #[method(interiorBackgroundStyle)] pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle; + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(drawBackgroundInRect:)] pub unsafe fn drawBackgroundInRect(&self, dirtyRect: NSRect); + #[method(drawSelectionInRect:)] pub unsafe fn drawSelectionInRect(&self, dirtyRect: NSRect); + #[method(drawSeparatorInRect:)] pub unsafe fn drawSeparatorInRect(&self, dirtyRect: NSRect); + #[method(drawDraggingDestinationFeedbackInRect:)] pub unsafe fn drawDraggingDestinationFeedbackInRect(&self, dirtyRect: NSRect); + #[method_id(viewAtColumn:)] pub unsafe fn viewAtColumn(&self, column: NSInteger) -> Option>; + #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSInteger; } diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index 1268e6ea7..a1e4751cc 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -1,173 +1,242 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTableViewAutosaveName = NSString; + extern_class!( #[derive(Debug)] pub struct NSTableView; + unsafe impl ClassType for NSTableView { type Super = NSControl; } ); + extern_methods!( unsafe impl NSTableView { #[method_id(initWithFrame:)] pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(dataSource)] pub unsafe fn dataSource(&self) -> Option>; + #[method(setDataSource:)] pub unsafe fn setDataSource(&self, dataSource: Option<&NSTableViewDataSource>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTableViewDelegate>); + #[method_id(headerView)] pub unsafe fn headerView(&self) -> Option>; + #[method(setHeaderView:)] pub unsafe fn setHeaderView(&self, headerView: Option<&NSTableHeaderView>); + #[method_id(cornerView)] pub unsafe fn cornerView(&self) -> Option>; + #[method(setCornerView:)] pub unsafe fn setCornerView(&self, cornerView: Option<&NSView>); + #[method(allowsColumnReordering)] pub unsafe fn allowsColumnReordering(&self) -> bool; + #[method(setAllowsColumnReordering:)] pub unsafe fn setAllowsColumnReordering(&self, allowsColumnReordering: bool); + #[method(allowsColumnResizing)] pub unsafe fn allowsColumnResizing(&self) -> bool; + #[method(setAllowsColumnResizing:)] pub unsafe fn setAllowsColumnResizing(&self, allowsColumnResizing: bool); + #[method(columnAutoresizingStyle)] pub unsafe fn columnAutoresizingStyle(&self) -> NSTableViewColumnAutoresizingStyle; + #[method(setColumnAutoresizingStyle:)] pub unsafe fn setColumnAutoresizingStyle( &self, columnAutoresizingStyle: NSTableViewColumnAutoresizingStyle, ); + #[method(gridStyleMask)] pub unsafe fn gridStyleMask(&self) -> NSTableViewGridLineStyle; + #[method(setGridStyleMask:)] pub unsafe fn setGridStyleMask(&self, gridStyleMask: NSTableViewGridLineStyle); + #[method(intercellSpacing)] pub unsafe fn intercellSpacing(&self) -> NSSize; + #[method(setIntercellSpacing:)] pub unsafe fn setIntercellSpacing(&self, intercellSpacing: NSSize); + #[method(usesAlternatingRowBackgroundColors)] pub unsafe fn usesAlternatingRowBackgroundColors(&self) -> bool; + #[method(setUsesAlternatingRowBackgroundColors:)] pub unsafe fn setUsesAlternatingRowBackgroundColors( &self, usesAlternatingRowBackgroundColors: bool, ); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method_id(gridColor)] pub unsafe fn gridColor(&self) -> Id; + #[method(setGridColor:)] pub unsafe fn setGridColor(&self, gridColor: &NSColor); + #[method(rowSizeStyle)] pub unsafe fn rowSizeStyle(&self) -> NSTableViewRowSizeStyle; + #[method(setRowSizeStyle:)] pub unsafe fn setRowSizeStyle(&self, rowSizeStyle: NSTableViewRowSizeStyle); + #[method(effectiveRowSizeStyle)] pub unsafe fn effectiveRowSizeStyle(&self) -> NSTableViewRowSizeStyle; + #[method(rowHeight)] pub unsafe fn rowHeight(&self) -> CGFloat; + #[method(setRowHeight:)] pub unsafe fn setRowHeight(&self, rowHeight: CGFloat); + #[method(noteHeightOfRowsWithIndexesChanged:)] pub unsafe fn noteHeightOfRowsWithIndexesChanged(&self, indexSet: &NSIndexSet); + #[method_id(tableColumns)] pub unsafe fn tableColumns(&self) -> Id, Shared>; + #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSInteger; + #[method(numberOfRows)] pub unsafe fn numberOfRows(&self) -> NSInteger; + #[method(addTableColumn:)] pub unsafe fn addTableColumn(&self, tableColumn: &NSTableColumn); + #[method(removeTableColumn:)] pub unsafe fn removeTableColumn(&self, tableColumn: &NSTableColumn); + #[method(moveColumn:toColumn:)] pub unsafe fn moveColumn_toColumn(&self, oldIndex: NSInteger, newIndex: NSInteger); + #[method(columnWithIdentifier:)] pub unsafe fn columnWithIdentifier( &self, identifier: &NSUserInterfaceItemIdentifier, ) -> NSInteger; + #[method_id(tableColumnWithIdentifier:)] pub unsafe fn tableColumnWithIdentifier( &self, identifier: &NSUserInterfaceItemIdentifier, ) -> Option>; + #[method(tile)] pub unsafe fn tile(&self); + #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[method(sizeLastColumnToFit)] pub unsafe fn sizeLastColumnToFit(&self); + #[method(scrollRowToVisible:)] pub unsafe fn scrollRowToVisible(&self, row: NSInteger); + #[method(scrollColumnToVisible:)] pub unsafe fn scrollColumnToVisible(&self, column: NSInteger); + #[method(reloadData)] pub unsafe fn reloadData(&self); + #[method(noteNumberOfRowsChanged)] pub unsafe fn noteNumberOfRowsChanged(&self); + #[method(reloadDataForRowIndexes:columnIndexes:)] pub unsafe fn reloadDataForRowIndexes_columnIndexes( &self, rowIndexes: &NSIndexSet, columnIndexes: &NSIndexSet, ); + #[method(editedColumn)] pub unsafe fn editedColumn(&self) -> NSInteger; + #[method(editedRow)] pub unsafe fn editedRow(&self) -> NSInteger; + #[method(clickedColumn)] pub unsafe fn clickedColumn(&self) -> NSInteger; + #[method(clickedRow)] pub unsafe fn clickedRow(&self) -> NSInteger; + #[method(doubleAction)] pub unsafe fn doubleAction(&self) -> Option; + #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, doubleAction: Option); + #[method_id(sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id, Shared>; + #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); + #[method(setIndicatorImage:inTableColumn:)] pub unsafe fn setIndicatorImage_inTableColumn( &self, image: Option<&NSImage>, tableColumn: &NSTableColumn, ); + #[method_id(indicatorImageInTableColumn:)] pub unsafe fn indicatorImageInTableColumn( &self, tableColumn: &NSTableColumn, ) -> Option>; + #[method_id(highlightedTableColumn)] pub unsafe fn highlightedTableColumn(&self) -> Option>; + #[method(setHighlightedTableColumn:)] pub unsafe fn setHighlightedTableColumn( &self, highlightedTableColumn: Option<&NSTableColumn>, ); + #[method(verticalMotionCanBeginDrag)] pub unsafe fn verticalMotionCanBeginDrag(&self) -> bool; + #[method(setVerticalMotionCanBeginDrag:)] pub unsafe fn setVerticalMotionCanBeginDrag(&self, verticalMotionCanBeginDrag: bool); + #[method(canDragRowsWithIndexes:atPoint:)] pub unsafe fn canDragRowsWithIndexes_atPoint( &self, rowIndexes: &NSIndexSet, mouseDownPoint: NSPoint, ) -> bool; + #[method_id(dragImageForRowsWithIndexes:tableColumns:event:offset:)] pub unsafe fn dragImageForRowsWithIndexes_tableColumns_event_offset( &self, @@ -176,114 +245,157 @@ extern_methods!( dragEvent: &NSEvent, dragImageOffset: NSPointPointer, ) -> Id; + #[method(setDraggingSourceOperationMask:forLocal:)] pub unsafe fn setDraggingSourceOperationMask_forLocal( &self, mask: NSDragOperation, isLocal: bool, ); + #[method(setDropRow:dropOperation:)] pub unsafe fn setDropRow_dropOperation( &self, row: NSInteger, dropOperation: NSTableViewDropOperation, ); + #[method(allowsMultipleSelection)] pub unsafe fn allowsMultipleSelection(&self) -> bool; + #[method(setAllowsMultipleSelection:)] pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool); + #[method(allowsEmptySelection)] pub unsafe fn allowsEmptySelection(&self) -> bool; + #[method(setAllowsEmptySelection:)] pub unsafe fn setAllowsEmptySelection(&self, allowsEmptySelection: bool); + #[method(allowsColumnSelection)] pub unsafe fn allowsColumnSelection(&self) -> bool; + #[method(setAllowsColumnSelection:)] pub unsafe fn setAllowsColumnSelection(&self, allowsColumnSelection: bool); + #[method(selectAll:)] pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[method(deselectAll:)] pub unsafe fn deselectAll(&self, sender: Option<&Object>); + #[method(selectColumnIndexes:byExtendingSelection:)] pub unsafe fn selectColumnIndexes_byExtendingSelection( &self, indexes: &NSIndexSet, extend: bool, ); + #[method(selectRowIndexes:byExtendingSelection:)] pub unsafe fn selectRowIndexes_byExtendingSelection( &self, indexes: &NSIndexSet, extend: bool, ); + #[method_id(selectedColumnIndexes)] pub unsafe fn selectedColumnIndexes(&self) -> Id; + #[method_id(selectedRowIndexes)] pub unsafe fn selectedRowIndexes(&self) -> Id; + #[method(deselectColumn:)] pub unsafe fn deselectColumn(&self, column: NSInteger); + #[method(deselectRow:)] pub unsafe fn deselectRow(&self, row: NSInteger); + #[method(selectedColumn)] pub unsafe fn selectedColumn(&self) -> NSInteger; + #[method(selectedRow)] pub unsafe fn selectedRow(&self) -> NSInteger; + #[method(isColumnSelected:)] pub unsafe fn isColumnSelected(&self, column: NSInteger) -> bool; + #[method(isRowSelected:)] pub unsafe fn isRowSelected(&self, row: NSInteger) -> bool; + #[method(numberOfSelectedColumns)] pub unsafe fn numberOfSelectedColumns(&self) -> NSInteger; + #[method(numberOfSelectedRows)] pub unsafe fn numberOfSelectedRows(&self) -> NSInteger; + #[method(allowsTypeSelect)] pub unsafe fn allowsTypeSelect(&self) -> bool; + #[method(setAllowsTypeSelect:)] pub unsafe fn setAllowsTypeSelect(&self, allowsTypeSelect: bool); + #[method(style)] pub unsafe fn style(&self) -> NSTableViewStyle; + #[method(setStyle:)] pub unsafe fn setStyle(&self, style: NSTableViewStyle); + #[method(effectiveStyle)] pub unsafe fn effectiveStyle(&self) -> NSTableViewStyle; + #[method(selectionHighlightStyle)] pub unsafe fn selectionHighlightStyle(&self) -> NSTableViewSelectionHighlightStyle; + #[method(setSelectionHighlightStyle:)] pub unsafe fn setSelectionHighlightStyle( &self, selectionHighlightStyle: NSTableViewSelectionHighlightStyle, ); + #[method(draggingDestinationFeedbackStyle)] pub unsafe fn draggingDestinationFeedbackStyle( &self, ) -> NSTableViewDraggingDestinationFeedbackStyle; + #[method(setDraggingDestinationFeedbackStyle:)] pub unsafe fn setDraggingDestinationFeedbackStyle( &self, draggingDestinationFeedbackStyle: NSTableViewDraggingDestinationFeedbackStyle, ); + #[method(rectOfColumn:)] pub unsafe fn rectOfColumn(&self, column: NSInteger) -> NSRect; + #[method(rectOfRow:)] pub unsafe fn rectOfRow(&self, row: NSInteger) -> NSRect; + #[method_id(columnIndexesInRect:)] pub unsafe fn columnIndexesInRect(&self, rect: NSRect) -> Id; + #[method(rowsInRect:)] pub unsafe fn rowsInRect(&self, rect: NSRect) -> NSRange; + #[method(columnAtPoint:)] pub unsafe fn columnAtPoint(&self, point: NSPoint) -> NSInteger; + #[method(rowAtPoint:)] pub unsafe fn rowAtPoint(&self, point: NSPoint) -> NSInteger; + #[method(frameOfCellAtColumn:row:)] pub unsafe fn frameOfCellAtColumn_row(&self, column: NSInteger, row: NSInteger) -> NSRect; + #[method_id(autosaveName)] pub unsafe fn autosaveName(&self) -> Option>; + #[method(setAutosaveName:)] pub unsafe fn setAutosaveName(&self, autosaveName: Option<&NSTableViewAutosaveName>); + #[method(autosaveTableColumns)] pub unsafe fn autosaveTableColumns(&self) -> bool; + #[method(setAutosaveTableColumns:)] pub unsafe fn setAutosaveTableColumns(&self, autosaveTableColumns: bool); + #[method(editColumn:row:withEvent:select:)] pub unsafe fn editColumn_row_withEvent_select( &self, @@ -292,14 +404,19 @@ extern_methods!( event: Option<&NSEvent>, select: bool, ); + #[method(drawRow:clipRect:)] pub unsafe fn drawRow_clipRect(&self, row: NSInteger, clipRect: NSRect); + #[method(highlightSelectionInClipRect:)] pub unsafe fn highlightSelectionInClipRect(&self, clipRect: NSRect); + #[method(drawGridInClipRect:)] pub unsafe fn drawGridInClipRect(&self, clipRect: NSRect); + #[method(drawBackgroundInClipRect:)] pub unsafe fn drawBackgroundInClipRect(&self, clipRect: NSRect); + #[method_id(viewAtColumn:row:makeIfNecessary:)] pub unsafe fn viewAtColumn_row_makeIfNecessary( &self, @@ -307,99 +424,129 @@ extern_methods!( row: NSInteger, makeIfNecessary: bool, ) -> Option>; + #[method_id(rowViewAtRow:makeIfNecessary:)] pub unsafe fn rowViewAtRow_makeIfNecessary( &self, row: NSInteger, makeIfNecessary: bool, ) -> Option>; + #[method(rowForView:)] pub unsafe fn rowForView(&self, view: &NSView) -> NSInteger; + #[method(columnForView:)] pub unsafe fn columnForView(&self, view: &NSView) -> NSInteger; + #[method_id(makeViewWithIdentifier:owner:)] pub unsafe fn makeViewWithIdentifier_owner( &self, identifier: &NSUserInterfaceItemIdentifier, owner: Option<&Object>, ) -> Option>; + #[method(enumerateAvailableRowViewsUsingBlock:)] pub unsafe fn enumerateAvailableRowViewsUsingBlock(&self, handler: TodoBlock); + #[method(floatsGroupRows)] pub unsafe fn floatsGroupRows(&self) -> bool; + #[method(setFloatsGroupRows:)] pub unsafe fn setFloatsGroupRows(&self, floatsGroupRows: bool); + #[method(rowActionsVisible)] pub unsafe fn rowActionsVisible(&self) -> bool; + #[method(setRowActionsVisible:)] pub unsafe fn setRowActionsVisible(&self, rowActionsVisible: bool); + #[method(beginUpdates)] pub unsafe fn beginUpdates(&self); + #[method(endUpdates)] pub unsafe fn endUpdates(&self); + #[method(insertRowsAtIndexes:withAnimation:)] pub unsafe fn insertRowsAtIndexes_withAnimation( &self, indexes: &NSIndexSet, animationOptions: NSTableViewAnimationOptions, ); + #[method(removeRowsAtIndexes:withAnimation:)] pub unsafe fn removeRowsAtIndexes_withAnimation( &self, indexes: &NSIndexSet, animationOptions: NSTableViewAnimationOptions, ); + #[method(moveRowAtIndex:toIndex:)] pub unsafe fn moveRowAtIndex_toIndex(&self, oldIndex: NSInteger, newIndex: NSInteger); + #[method(hideRowsAtIndexes:withAnimation:)] pub unsafe fn hideRowsAtIndexes_withAnimation( &self, indexes: &NSIndexSet, rowAnimation: NSTableViewAnimationOptions, ); + #[method(unhideRowsAtIndexes:withAnimation:)] pub unsafe fn unhideRowsAtIndexes_withAnimation( &self, indexes: &NSIndexSet, rowAnimation: NSTableViewAnimationOptions, ); + #[method_id(hiddenRowIndexes)] pub unsafe fn hiddenRowIndexes(&self) -> Id; + #[method(registerNib:forIdentifier:)] pub unsafe fn registerNib_forIdentifier( &self, nib: Option<&NSNib>, identifier: &NSUserInterfaceItemIdentifier, ); + #[method_id(registeredNibsByIdentifier)] pub unsafe fn registeredNibsByIdentifier( &self, ) -> Option, Shared>>; + #[method(didAddRowView:forRow:)] pub unsafe fn didAddRowView_forRow(&self, rowView: &NSTableRowView, row: NSInteger); + #[method(didRemoveRowView:forRow:)] pub unsafe fn didRemoveRowView_forRow(&self, rowView: &NSTableRowView, row: NSInteger); + #[method(usesStaticContents)] pub unsafe fn usesStaticContents(&self) -> bool; + #[method(setUsesStaticContents:)] pub unsafe fn setUsesStaticContents(&self, usesStaticContents: bool); + #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setUserInterfaceLayoutDirection:)] pub unsafe fn setUserInterfaceLayoutDirection( &self, userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, ); + #[method(usesAutomaticRowHeights)] pub unsafe fn usesAutomaticRowHeights(&self) -> bool; + #[method(setUsesAutomaticRowHeights:)] pub unsafe fn setUsesAutomaticRowHeights(&self, usesAutomaticRowHeights: bool); } ); + pub type NSTableViewDelegate = NSObject; + pub type NSTableViewDataSource = NSObject; + extern_methods!( - #[doc = "NSTableViewDataSourceDeprecated"] + /// NSTableViewDataSourceDeprecated unsafe impl NSObject { #[method(tableView:writeRows:toPasteboard:)] pub unsafe fn tableView_writeRows_toPasteboard( @@ -410,21 +557,28 @@ extern_methods!( ) -> bool; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSTableView { #[method(setDrawsGrid:)] pub unsafe fn setDrawsGrid(&self, flag: bool); + #[method(drawsGrid)] pub unsafe fn drawsGrid(&self) -> bool; + #[method(selectColumn:byExtendingSelection:)] pub unsafe fn selectColumn_byExtendingSelection(&self, column: NSInteger, extend: bool); + #[method(selectRow:byExtendingSelection:)] pub unsafe fn selectRow_byExtendingSelection(&self, row: NSInteger, extend: bool); + #[method_id(selectedColumnEnumerator)] pub unsafe fn selectedColumnEnumerator(&self) -> Id; + #[method_id(selectedRowEnumerator)] pub unsafe fn selectedRowEnumerator(&self) -> Id; + #[method_id(dragImageForRows:event:dragImageOffset:)] pub unsafe fn dragImageForRows_event_dragImageOffset( &self, @@ -432,28 +586,38 @@ extern_methods!( dragEvent: &NSEvent, dragImageOffset: NSPointPointer, ) -> Option>; + #[method(setAutoresizesAllColumnsToFit:)] pub unsafe fn setAutoresizesAllColumnsToFit(&self, flag: bool); + #[method(autoresizesAllColumnsToFit)] pub unsafe fn autoresizesAllColumnsToFit(&self) -> bool; + #[method(columnsInRect:)] pub unsafe fn columnsInRect(&self, rect: NSRect) -> NSRange; + #[method_id(preparedCellAtColumn:row:)] pub unsafe fn preparedCellAtColumn_row( &self, column: NSInteger, row: NSInteger, ) -> Option>; + #[method(textShouldBeginEditing:)] pub unsafe fn textShouldBeginEditing(&self, textObject: &NSText) -> bool; + #[method(textShouldEndEditing:)] pub unsafe fn textShouldEndEditing(&self, textObject: &NSText) -> bool; + #[method(textDidBeginEditing:)] pub unsafe fn textDidBeginEditing(&self, notification: &NSNotification); + #[method(textDidEndEditing:)] pub unsafe fn textDidEndEditing(&self, notification: &NSNotification); + #[method(textDidChange:)] pub unsafe fn textDidChange(&self, notification: &NSNotification); + #[method(shouldFocusCell:atColumn:row:)] pub unsafe fn shouldFocusCell_atColumn_row( &self, @@ -461,10 +625,13 @@ extern_methods!( column: NSInteger, row: NSInteger, ) -> bool; + #[method(focusedColumn)] pub unsafe fn focusedColumn(&self) -> NSInteger; + #[method(setFocusedColumn:)] pub unsafe fn setFocusedColumn(&self, focusedColumn: NSInteger); + #[method(performClickOnCellAtColumn:row:)] pub unsafe fn performClickOnCellAtColumn_row(&self, column: NSInteger, row: NSInteger); } diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs index 92d890385..0378909f2 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -1,19 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSTableViewDiffableDataSource< SectionIdentifierType: Message, ItemIdentifierType: Message, >; + unsafe impl ClassType for NSTableViewDiffableDataSource { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTableViewDiffableDataSource @@ -24,20 +29,25 @@ extern_methods!( tableView: &NSTableView, cellProvider: NSTableViewDiffableDataSourceCellProvider, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(snapshot)] pub unsafe fn snapshot( &self, ) -> Id, Shared>; + #[method(applySnapshot:animatingDifferences:)] pub unsafe fn applySnapshot_animatingDifferences( &self, snapshot: &NSDiffableDataSourceSnapshot, animatingDifferences: bool, ); + #[method(applySnapshot:animatingDifferences:completion:)] pub unsafe fn applySnapshot_animatingDifferences_completion( &self, @@ -45,41 +55,51 @@ extern_methods!( animatingDifferences: bool, completion: TodoBlock, ); + #[method_id(itemIdentifierForRow:)] pub unsafe fn itemIdentifierForRow( &self, row: NSInteger, ) -> Option>; + #[method(rowForItemIdentifier:)] pub unsafe fn rowForItemIdentifier(&self, identifier: &ItemIdentifierType) -> NSInteger; + #[method_id(sectionIdentifierForRow:)] pub unsafe fn sectionIdentifierForRow( &self, row: NSInteger, ) -> Option>; + #[method(rowForSectionIdentifier:)] pub unsafe fn rowForSectionIdentifier( &self, identifier: &SectionIdentifierType, ) -> NSInteger; + #[method(rowViewProvider)] pub unsafe fn rowViewProvider(&self) -> NSTableViewDiffableDataSourceRowProvider; + #[method(setRowViewProvider:)] pub unsafe fn setRowViewProvider( &self, rowViewProvider: NSTableViewDiffableDataSourceRowProvider, ); + #[method(sectionHeaderViewProvider)] pub unsafe fn sectionHeaderViewProvider( &self, ) -> NSTableViewDiffableDataSourceSectionHeaderViewProvider; + #[method(setSectionHeaderViewProvider:)] pub unsafe fn setSectionHeaderViewProvider( &self, sectionHeaderViewProvider: NSTableViewDiffableDataSourceSectionHeaderViewProvider, ); + #[method(defaultRowAnimation)] pub unsafe fn defaultRowAnimation(&self) -> NSTableViewAnimationOptions; + #[method(setDefaultRowAnimation:)] pub unsafe fn setDefaultRowAnimation( &self, diff --git a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs index 9c7a1619e..d2531345f 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTableViewRowAction; + unsafe impl ClassType for NSTableViewRowAction { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTableViewRowAction { #[method_id(rowActionWithStyle:title:handler:)] @@ -17,18 +22,25 @@ extern_methods!( title: &NSString, handler: TodoBlock, ) -> Id; + #[method(style)] pub unsafe fn style(&self) -> NSTableViewRowActionStyle; + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); } diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index 25b7a32dc..53fad026c 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -1,160 +1,237 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSText; + unsafe impl ClassType for NSText { type Super = NSView; } ); + extern_methods!( unsafe impl NSText { #[method_id(initWithFrame:)] pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(string)] pub unsafe fn string(&self) -> Id; + #[method(setString:)] pub unsafe fn setString(&self, string: &NSString); + #[method(replaceCharactersInRange:withString:)] pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, string: &NSString); + #[method(replaceCharactersInRange:withRTF:)] pub unsafe fn replaceCharactersInRange_withRTF(&self, range: NSRange, rtfData: &NSData); + #[method(replaceCharactersInRange:withRTFD:)] pub unsafe fn replaceCharactersInRange_withRTFD(&self, range: NSRange, rtfdData: &NSData); + #[method_id(RTFFromRange:)] pub unsafe fn RTFFromRange(&self, range: NSRange) -> Option>; + #[method_id(RTFDFromRange:)] pub unsafe fn RTFDFromRange(&self, range: NSRange) -> Option>; + #[method(writeRTFDToFile:atomically:)] pub unsafe fn writeRTFDToFile_atomically(&self, path: &NSString, flag: bool) -> bool; + #[method(readRTFDFromFile:)] pub unsafe fn readRTFDFromFile(&self, path: &NSString) -> bool; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextDelegate>); + #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[method(isSelectable)] pub unsafe fn isSelectable(&self) -> bool; + #[method(setSelectable:)] pub unsafe fn setSelectable(&self, selectable: bool); + #[method(isRichText)] pub unsafe fn isRichText(&self) -> bool; + #[method(setRichText:)] pub unsafe fn setRichText(&self, richText: bool); + #[method(importsGraphics)] pub unsafe fn importsGraphics(&self) -> bool; + #[method(setImportsGraphics:)] pub unsafe fn setImportsGraphics(&self, importsGraphics: bool); + #[method(isFieldEditor)] pub unsafe fn isFieldEditor(&self) -> bool; + #[method(setFieldEditor:)] pub unsafe fn setFieldEditor(&self, fieldEditor: bool); + #[method(usesFontPanel)] pub unsafe fn usesFontPanel(&self) -> bool; + #[method(setUsesFontPanel:)] pub unsafe fn setUsesFontPanel(&self, usesFontPanel: bool); + #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(isRulerVisible)] pub unsafe fn isRulerVisible(&self) -> bool; + #[method(selectedRange)] pub unsafe fn selectedRange(&self) -> NSRange; + #[method(setSelectedRange:)] pub unsafe fn setSelectedRange(&self, selectedRange: NSRange); + #[method(scrollRangeToVisible:)] pub unsafe fn scrollRangeToVisible(&self, range: NSRange); + #[method_id(font)] pub unsafe fn font(&self) -> Option>; + #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[method_id(textColor)] pub unsafe fn textColor(&self) -> Option>; + #[method(setTextColor:)] pub unsafe fn setTextColor(&self, textColor: Option<&NSColor>); + #[method(alignment)] pub unsafe fn alignment(&self) -> NSTextAlignment; + #[method(setAlignment:)] pub unsafe fn setAlignment(&self, alignment: NSTextAlignment); + #[method(baseWritingDirection)] pub unsafe fn baseWritingDirection(&self) -> NSWritingDirection; + #[method(setBaseWritingDirection:)] pub unsafe fn setBaseWritingDirection(&self, baseWritingDirection: NSWritingDirection); + #[method(setTextColor:range:)] pub unsafe fn setTextColor_range(&self, color: Option<&NSColor>, range: NSRange); + #[method(setFont:range:)] pub unsafe fn setFont_range(&self, font: &NSFont, range: NSRange); + #[method(maxSize)] pub unsafe fn maxSize(&self) -> NSSize; + #[method(setMaxSize:)] pub unsafe fn setMaxSize(&self, maxSize: NSSize); + #[method(minSize)] pub unsafe fn minSize(&self) -> NSSize; + #[method(setMinSize:)] pub unsafe fn setMinSize(&self, minSize: NSSize); + #[method(isHorizontallyResizable)] pub unsafe fn isHorizontallyResizable(&self) -> bool; + #[method(setHorizontallyResizable:)] pub unsafe fn setHorizontallyResizable(&self, horizontallyResizable: bool); + #[method(isVerticallyResizable)] pub unsafe fn isVerticallyResizable(&self) -> bool; + #[method(setVerticallyResizable:)] pub unsafe fn setVerticallyResizable(&self, verticallyResizable: bool); + #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); + #[method(copy:)] pub unsafe fn copy(&self, sender: Option<&Object>); + #[method(copyFont:)] pub unsafe fn copyFont(&self, sender: Option<&Object>); + #[method(copyRuler:)] pub unsafe fn copyRuler(&self, sender: Option<&Object>); + #[method(cut:)] pub unsafe fn cut(&self, sender: Option<&Object>); + #[method(delete:)] pub unsafe fn delete(&self, sender: Option<&Object>); + #[method(paste:)] pub unsafe fn paste(&self, sender: Option<&Object>); + #[method(pasteFont:)] pub unsafe fn pasteFont(&self, sender: Option<&Object>); + #[method(pasteRuler:)] pub unsafe fn pasteRuler(&self, sender: Option<&Object>); + #[method(selectAll:)] pub unsafe fn selectAll(&self, sender: Option<&Object>); + #[method(changeFont:)] pub unsafe fn changeFont(&self, sender: Option<&Object>); + #[method(alignLeft:)] pub unsafe fn alignLeft(&self, sender: Option<&Object>); + #[method(alignRight:)] pub unsafe fn alignRight(&self, sender: Option<&Object>); + #[method(alignCenter:)] pub unsafe fn alignCenter(&self, sender: Option<&Object>); + #[method(subscript:)] pub unsafe fn subscript(&self, sender: Option<&Object>); + #[method(superscript:)] pub unsafe fn superscript(&self, sender: Option<&Object>); + #[method(underline:)] pub unsafe fn underline(&self, sender: Option<&Object>); + #[method(unscript:)] pub unsafe fn unscript(&self, sender: Option<&Object>); + #[method(showGuessPanel:)] pub unsafe fn showGuessPanel(&self, sender: Option<&Object>); + #[method(checkSpelling:)] pub unsafe fn checkSpelling(&self, sender: Option<&Object>); + #[method(toggleRuler:)] pub unsafe fn toggleRuler(&self, sender: Option<&Object>); } ); + pub type NSTextDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs index 3d3306342..ada6b0094 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextAlternatives; + unsafe impl ClassType for NSTextAlternatives { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextAlternatives { #[method_id(initWithPrimaryString:alternativeStrings:)] @@ -17,10 +22,13 @@ extern_methods!( primaryString: &NSString, alternativeStrings: &NSArray, ) -> Id; + #[method_id(primaryString)] pub unsafe fn primaryString(&self) -> Id; + #[method_id(alternativeStrings)] pub unsafe fn alternativeStrings(&self) -> Id, Shared>; + #[method(noteSelectedAlternativeString:)] pub unsafe fn noteSelectedAlternativeString(&self, alternativeString: &NSString); } diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index 2aa6c60f1..ac98038a3 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -1,16 +1,23 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextAttachmentContainer = NSObject; + pub type NSTextAttachmentLayout = NSObject; + extern_class!( #[derive(Debug)] pub struct NSTextAttachment; + unsafe impl ClassType for NSTextAttachment { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextAttachment { #[method_id(initWithData:ofType:)] @@ -19,58 +26,79 @@ extern_methods!( contentData: Option<&NSData>, uti: Option<&NSString>, ) -> Id; + #[method_id(initWithFileWrapper:)] pub unsafe fn initWithFileWrapper( &self, fileWrapper: Option<&NSFileWrapper>, ) -> Id; + #[method_id(contents)] pub unsafe fn contents(&self) -> Option>; + #[method(setContents:)] pub unsafe fn setContents(&self, contents: Option<&NSData>); + #[method_id(fileType)] pub unsafe fn fileType(&self) -> Option>; + #[method(setFileType:)] pub unsafe fn setFileType(&self, fileType: Option<&NSString>); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method(bounds)] pub unsafe fn bounds(&self) -> CGRect; + #[method(setBounds:)] pub unsafe fn setBounds(&self, bounds: CGRect); + #[method_id(fileWrapper)] pub unsafe fn fileWrapper(&self) -> Option>; + #[method(setFileWrapper:)] pub unsafe fn setFileWrapper(&self, fileWrapper: Option<&NSFileWrapper>); + #[method_id(attachmentCell)] pub unsafe fn attachmentCell(&self) -> Option>; + #[method(setAttachmentCell:)] pub unsafe fn setAttachmentCell(&self, attachmentCell: Option<&NSTextAttachmentCell>); + #[method(lineLayoutPadding)] pub unsafe fn lineLayoutPadding(&self) -> CGFloat; + #[method(setLineLayoutPadding:)] pub unsafe fn setLineLayoutPadding(&self, lineLayoutPadding: CGFloat); + #[method(textAttachmentViewProviderClassForFileType:)] pub unsafe fn textAttachmentViewProviderClassForFileType( fileType: &NSString, ) -> Option<&Class>; + #[method(registerTextAttachmentViewProviderClass:forFileType:)] pub unsafe fn registerTextAttachmentViewProviderClass_forFileType( textAttachmentViewProviderClass: &Class, fileType: &NSString, ); + #[method(allowsTextAttachmentView)] pub unsafe fn allowsTextAttachmentView(&self) -> bool; + #[method(setAllowsTextAttachmentView:)] pub unsafe fn setAllowsTextAttachmentView(&self, allowsTextAttachmentView: bool); + #[method(usesTextAttachmentView)] pub unsafe fn usesTextAttachmentView(&self) -> bool; } ); + extern_methods!( - #[doc = "NSAttributedStringAttachmentConveniences"] + /// NSAttributedStringAttachmentConveniences unsafe impl NSAttributedString { #[method_id(attributedStringWithAttachment:)] pub unsafe fn attributedStringWithAttachment( @@ -78,13 +106,16 @@ extern_methods!( ) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSTextAttachmentViewProvider; + unsafe impl ClassType for NSTextAttachmentViewProvider { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextAttachmentViewProvider { #[method_id(initWithTextAttachment:parentView:textLayoutManager:location:)] @@ -95,29 +126,40 @@ extern_methods!( textLayoutManager: Option<&NSTextLayoutManager>, location: &NSTextLocation, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(textAttachment)] pub unsafe fn textAttachment(&self) -> Option>; + #[method_id(textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; + #[method_id(location)] pub unsafe fn location(&self) -> Id; + #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(loadView)] pub unsafe fn loadView(&self); + #[method(tracksTextAttachmentViewBounds)] pub unsafe fn tracksTextAttachmentViewBounds(&self) -> bool; + #[method(setTracksTextAttachmentViewBounds:)] pub unsafe fn setTracksTextAttachmentViewBounds( &self, tracksTextAttachmentViewBounds: bool, ); + #[method(attachmentBoundsForAttributes:location:textContainer:proposedLineFragment:position:)] pub unsafe fn attachmentBoundsForAttributes_location_textContainer_proposedLineFragment_position( &self, @@ -129,8 +171,9 @@ extern_methods!( ) -> CGRect; } ); + extern_methods!( - #[doc = "NSMutableAttributedStringAttachmentConveniences"] + /// NSMutableAttributedStringAttachmentConveniences unsafe impl NSMutableAttributedString { #[method(updateAttachmentsFromPath:)] pub unsafe fn updateAttachmentsFromPath(&self, path: &NSString); diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs index d700f3ae2..b78857c59 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextAttachmentCell = NSObject; + extern_class!( #[derive(Debug)] pub struct NSTextAttachmentCell; + unsafe impl ClassType for NSTextAttachmentCell { type Super = NSCell; } ); + extern_methods!( unsafe impl NSTextAttachmentCell {} ); diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs index a295d7167..a904c2a82 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs @@ -1,6 +1,10 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextInputTraits = NSObject; + pub type NSTextCheckingClient = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs index 37643e709..1b6552183 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs @@ -1,32 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextCheckingController; + unsafe impl ClassType for NSTextCheckingController { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextCheckingController { #[method_id(initWithClient:)] pub unsafe fn initWithClient(&self, client: &NSTextCheckingClient) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(client)] pub unsafe fn client(&self) -> Id; + #[method(invalidate)] pub unsafe fn invalidate(&self); + #[method(didChangeTextInRange:)] pub unsafe fn didChangeTextInRange(&self, range: NSRange); + #[method(insertedTextInRange:)] pub unsafe fn insertedTextInRange(&self, range: NSRange); + #[method(didChangeSelectedRange)] pub unsafe fn didChangeSelectedRange(&self); + #[method(considerTextCheckingForRange:)] pub unsafe fn considerTextCheckingForRange(&self, range: NSRange); + #[method(checkTextInRange:types:options:)] pub unsafe fn checkTextInRange_types_options( &self, @@ -34,24 +47,34 @@ extern_methods!( checkingTypes: NSTextCheckingTypes, options: &NSDictionary, ); + #[method(checkTextInSelection:)] pub unsafe fn checkTextInSelection(&self, sender: Option<&Object>); + #[method(checkTextInDocument:)] pub unsafe fn checkTextInDocument(&self, sender: Option<&Object>); + #[method(orderFrontSubstitutionsPanel:)] pub unsafe fn orderFrontSubstitutionsPanel(&self, sender: Option<&Object>); + #[method(checkSpelling:)] pub unsafe fn checkSpelling(&self, sender: Option<&Object>); + #[method(showGuessPanel:)] pub unsafe fn showGuessPanel(&self, sender: Option<&Object>); + #[method(changeSpelling:)] pub unsafe fn changeSpelling(&self, sender: Option<&Object>); + #[method(ignoreSpelling:)] pub unsafe fn ignoreSpelling(&self, sender: Option<&Object>); + #[method(updateCandidates)] pub unsafe fn updateCandidates(&self); + #[method_id(validAnnotations)] pub unsafe fn validAnnotations(&self) -> Id, Shared>; + #[method_id(menuAtIndex:clickedOnSelection:effectiveRange:)] pub unsafe fn menuAtIndex_clickedOnSelection_effectiveRange( &self, @@ -59,8 +82,10 @@ extern_methods!( clickedOnSelection: bool, effectiveRange: NSRangePointer, ) -> Option>; + #[method(spellCheckerDocumentTag)] pub unsafe fn spellCheckerDocumentTag(&self) -> NSInteger; + #[method(setSpellCheckerDocumentTag:)] pub unsafe fn setSpellCheckerDocumentTag(&self, spellCheckerDocumentTag: NSInteger); } diff --git a/crates/icrate/src/generated/AppKit/NSTextContainer.rs b/crates/icrate/src/generated/AppKit/NSTextContainer.rs index 3e4d6bdf0..a939e9ffd 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContainer.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContainer.rs @@ -1,48 +1,69 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextContainer; + unsafe impl ClassType for NSTextContainer { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextContainer { #[method_id(initWithSize:)] pub unsafe fn initWithSize(&self, size: NSSize) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(layoutManager)] pub unsafe fn layoutManager(&self) -> Option>; + #[method(setLayoutManager:)] pub unsafe fn setLayoutManager(&self, layoutManager: Option<&NSLayoutManager>); + #[method(replaceLayoutManager:)] pub unsafe fn replaceLayoutManager(&self, newLayoutManager: &NSLayoutManager); + #[method_id(textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; + #[method(size)] pub unsafe fn size(&self) -> NSSize; + #[method(setSize:)] pub unsafe fn setSize(&self, size: NSSize); + #[method_id(exclusionPaths)] pub unsafe fn exclusionPaths(&self) -> Id, Shared>; + #[method(setExclusionPaths:)] pub unsafe fn setExclusionPaths(&self, exclusionPaths: &NSArray); + #[method(lineBreakMode)] pub unsafe fn lineBreakMode(&self) -> NSLineBreakMode; + #[method(setLineBreakMode:)] pub unsafe fn setLineBreakMode(&self, lineBreakMode: NSLineBreakMode); + #[method(lineFragmentPadding)] pub unsafe fn lineFragmentPadding(&self) -> CGFloat; + #[method(setLineFragmentPadding:)] pub unsafe fn setLineFragmentPadding(&self, lineFragmentPadding: CGFloat); + #[method(maximumNumberOfLines)] pub unsafe fn maximumNumberOfLines(&self) -> NSUInteger; + #[method(setMaximumNumberOfLines:)] pub unsafe fn setMaximumNumberOfLines(&self, maximumNumberOfLines: NSUInteger); + #[method(lineFragmentRectForProposedRect:atIndex:writingDirection:remainingRect:)] pub unsafe fn lineFragmentRectForProposedRect_atIndex_writingDirection_remainingRect( &self, @@ -51,31 +72,42 @@ extern_methods!( baseWritingDirection: NSWritingDirection, remainingRect: *mut NSRect, ) -> NSRect; + #[method(isSimpleRectangularTextContainer)] pub unsafe fn isSimpleRectangularTextContainer(&self) -> bool; + #[method(widthTracksTextView)] pub unsafe fn widthTracksTextView(&self) -> bool; + #[method(setWidthTracksTextView:)] pub unsafe fn setWidthTracksTextView(&self, widthTracksTextView: bool); + #[method(heightTracksTextView)] pub unsafe fn heightTracksTextView(&self) -> bool; + #[method(setHeightTracksTextView:)] pub unsafe fn setHeightTracksTextView(&self, heightTracksTextView: bool); + #[method_id(textView)] pub unsafe fn textView(&self) -> Option>; + #[method(setTextView:)] pub unsafe fn setTextView(&self, textView: Option<&NSTextView>); } ); + extern_methods!( - #[doc = "NSTextContainerDeprecated"] + /// NSTextContainerDeprecated unsafe impl NSTextContainer { #[method_id(initWithContainerSize:)] pub unsafe fn initWithContainerSize(&self, aContainerSize: NSSize) -> Id; + #[method(containerSize)] pub unsafe fn containerSize(&self) -> NSSize; + #[method(setContainerSize:)] pub unsafe fn setContainerSize(&self, containerSize: NSSize); + #[method(lineFragmentRectForProposedRect:sweepDirection:movementDirection:remainingRect:)] pub unsafe fn lineFragmentRectForProposedRect_sweepDirection_movementDirection_remainingRect( &self, @@ -84,6 +116,7 @@ extern_methods!( movementDirection: NSLineMovementDirection, remainingRect: NSRectPointer, ) -> NSRect; + #[method(containsPoint:)] pub unsafe fn containsPoint(&self, point: NSPoint) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSTextContent.rs b/crates/icrate/src/generated/AppKit/NSTextContent.rs index d44cba4ce..0b9512d5d 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContent.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContent.rs @@ -1,6 +1,10 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextContentType = NSString; + pub type NSTextContent = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index 43a5acc01..882751c45 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -1,64 +1,87 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextElementProvider = NSObject; + extern_class!( #[derive(Debug)] pub struct NSTextContentManager; + unsafe impl ClassType for NSTextContentManager { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextContentManager { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextContentManagerDelegate>); + #[method_id(textLayoutManagers)] pub unsafe fn textLayoutManagers(&self) -> Id, Shared>; + #[method(addTextLayoutManager:)] pub unsafe fn addTextLayoutManager(&self, textLayoutManager: &NSTextLayoutManager); + #[method(removeTextLayoutManager:)] pub unsafe fn removeTextLayoutManager(&self, textLayoutManager: &NSTextLayoutManager); + #[method_id(primaryTextLayoutManager)] pub unsafe fn primaryTextLayoutManager(&self) -> Option>; + #[method(setPrimaryTextLayoutManager:)] pub unsafe fn setPrimaryTextLayoutManager( &self, primaryTextLayoutManager: Option<&NSTextLayoutManager>, ); + #[method(synchronizeTextLayoutManagers:)] pub unsafe fn synchronizeTextLayoutManagers(&self, completionHandler: TodoBlock); + #[method_id(textElementsForRange:)] pub unsafe fn textElementsForRange( &self, range: &NSTextRange, ) -> Id, Shared>; + #[method(hasEditingTransaction)] pub unsafe fn hasEditingTransaction(&self) -> bool; + #[method(performEditingTransactionUsingBlock:)] pub unsafe fn performEditingTransactionUsingBlock(&self, transaction: TodoBlock); + #[method(recordEditActionInRange:newTextRange:)] pub unsafe fn recordEditActionInRange_newTextRange( &self, originalTextRange: &NSTextRange, newTextRange: &NSTextRange, ); + #[method(automaticallySynchronizesTextLayoutManagers)] pub unsafe fn automaticallySynchronizesTextLayoutManagers(&self) -> bool; + #[method(setAutomaticallySynchronizesTextLayoutManagers:)] pub unsafe fn setAutomaticallySynchronizesTextLayoutManagers( &self, automaticallySynchronizesTextLayoutManagers: bool, ); + #[method(automaticallySynchronizesToBackingStore)] pub unsafe fn automaticallySynchronizesToBackingStore(&self) -> bool; + #[method(setAutomaticallySynchronizesToBackingStore:)] pub unsafe fn setAutomaticallySynchronizesToBackingStore( &self, @@ -66,47 +89,60 @@ extern_methods!( ); } ); + pub type NSTextContentManagerDelegate = NSObject; + pub type NSTextContentStorageDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSTextContentStorage; + unsafe impl ClassType for NSTextContentStorage { type Super = NSTextContentManager; } ); + extern_methods!( unsafe impl NSTextContentStorage { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextContentStorageDelegate>); + #[method_id(attributedString)] pub unsafe fn attributedString(&self) -> Option>; + #[method(setAttributedString:)] pub unsafe fn setAttributedString(&self, attributedString: Option<&NSAttributedString>); + #[method_id(attributedStringForTextElement:)] pub unsafe fn attributedStringForTextElement( &self, textElement: &NSTextElement, ) -> Option>; + #[method_id(textElementForAttributedString:)] pub unsafe fn textElementForAttributedString( &self, attributedString: &NSAttributedString, ) -> Option>; + #[method_id(locationFromLocation:withOffset:)] pub unsafe fn locationFromLocation_withOffset( &self, location: &NSTextLocation, offset: NSInteger, ) -> Option>; + #[method(offsetFromLocation:toLocation:)] pub unsafe fn offsetFromLocation_toLocation( &self, from: &NSTextLocation, to: &NSTextLocation, ) -> NSInteger; + #[method_id(adjustedRangeFromRange:forEditingTextSelection:)] pub unsafe fn adjustedRangeFromRange_forEditingTextSelection( &self, diff --git a/crates/icrate/src/generated/AppKit/NSTextElement.rs b/crates/icrate/src/generated/AppKit/NSTextElement.rs index e347631c8..45d848896 100644 --- a/crates/icrate/src/generated/AppKit/NSTextElement.rs +++ b/crates/icrate/src/generated/AppKit/NSTextElement.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextElement; + unsafe impl ClassType for NSTextElement { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextElement { #[method_id(initWithTextContentManager:)] @@ -16,26 +21,33 @@ extern_methods!( &self, textContentManager: Option<&NSTextContentManager>, ) -> Id; + #[method_id(textContentManager)] pub unsafe fn textContentManager(&self) -> Option>; + #[method(setTextContentManager:)] pub unsafe fn setTextContentManager( &self, textContentManager: Option<&NSTextContentManager>, ); + #[method_id(elementRange)] pub unsafe fn elementRange(&self) -> Option>; + #[method(setElementRange:)] pub unsafe fn setElementRange(&self, elementRange: Option<&NSTextRange>); } ); + extern_class!( #[derive(Debug)] pub struct NSTextParagraph; + unsafe impl ClassType for NSTextParagraph { type Super = NSTextElement; } ); + extern_methods!( unsafe impl NSTextParagraph { #[method_id(initWithAttributedString:)] @@ -43,10 +55,13 @@ extern_methods!( &self, attributedString: Option<&NSAttributedString>, ) -> Id; + #[method_id(attributedString)] pub unsafe fn attributedString(&self) -> Id; + #[method_id(paragraphContentRange)] pub unsafe fn paragraphContentRange(&self) -> Option>; + #[method_id(paragraphSeparatorRange)] pub unsafe fn paragraphSeparatorRange(&self) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSTextField.rs b/crates/icrate/src/generated/AppKit/NSTextField.rs index 158256fae..c4b8fd95c 100644 --- a/crates/icrate/src/generated/AppKit/NSTextField.rs +++ b/crates/icrate/src/generated/AppKit/NSTextField.rs @@ -1,110 +1,155 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextField; + unsafe impl ClassType for NSTextField { type Super = NSControl; } ); + extern_methods!( unsafe impl NSTextField { #[method_id(placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; + #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); + #[method_id(placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; + #[method(setPlaceholderAttributedString:)] pub unsafe fn setPlaceholderAttributedString( &self, placeholderAttributedString: Option<&NSAttributedString>, ); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(textColor)] pub unsafe fn textColor(&self) -> Option>; + #[method(setTextColor:)] pub unsafe fn setTextColor(&self, textColor: Option<&NSColor>); + #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[method(isBezeled)] pub unsafe fn isBezeled(&self) -> bool; + #[method(setBezeled:)] pub unsafe fn setBezeled(&self, bezeled: bool); + #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[method(isSelectable)] pub unsafe fn isSelectable(&self) -> bool; + #[method(setSelectable:)] pub unsafe fn setSelectable(&self, selectable: bool); + #[method(selectText:)] pub unsafe fn selectText(&self, sender: Option<&Object>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextFieldDelegate>); + #[method(textShouldBeginEditing:)] pub unsafe fn textShouldBeginEditing(&self, textObject: &NSText) -> bool; + #[method(textShouldEndEditing:)] pub unsafe fn textShouldEndEditing(&self, textObject: &NSText) -> bool; + #[method(textDidBeginEditing:)] pub unsafe fn textDidBeginEditing(&self, notification: &NSNotification); + #[method(textDidEndEditing:)] pub unsafe fn textDidEndEditing(&self, notification: &NSNotification); + #[method(textDidChange:)] pub unsafe fn textDidChange(&self, notification: &NSNotification); + #[method(acceptsFirstResponder)] pub unsafe fn acceptsFirstResponder(&self) -> bool; + #[method(bezelStyle)] pub unsafe fn bezelStyle(&self) -> NSTextFieldBezelStyle; + #[method(setBezelStyle:)] pub unsafe fn setBezelStyle(&self, bezelStyle: NSTextFieldBezelStyle); + #[method(preferredMaxLayoutWidth)] pub unsafe fn preferredMaxLayoutWidth(&self) -> CGFloat; + #[method(setPreferredMaxLayoutWidth:)] pub unsafe fn setPreferredMaxLayoutWidth(&self, preferredMaxLayoutWidth: CGFloat); + #[method(maximumNumberOfLines)] pub unsafe fn maximumNumberOfLines(&self) -> NSInteger; + #[method(setMaximumNumberOfLines:)] pub unsafe fn setMaximumNumberOfLines(&self, maximumNumberOfLines: NSInteger); + #[method(allowsDefaultTighteningForTruncation)] pub unsafe fn allowsDefaultTighteningForTruncation(&self) -> bool; + #[method(setAllowsDefaultTighteningForTruncation:)] pub unsafe fn setAllowsDefaultTighteningForTruncation( &self, allowsDefaultTighteningForTruncation: bool, ); + #[method(lineBreakStrategy)] pub unsafe fn lineBreakStrategy(&self) -> NSLineBreakStrategy; + #[method(setLineBreakStrategy:)] pub unsafe fn setLineBreakStrategy(&self, lineBreakStrategy: NSLineBreakStrategy); } ); + extern_methods!( - #[doc = "NSTouchBar"] + /// NSTouchBar unsafe impl NSTextField { #[method(isAutomaticTextCompletionEnabled)] pub unsafe fn isAutomaticTextCompletionEnabled(&self) -> bool; + #[method(setAutomaticTextCompletionEnabled:)] pub unsafe fn setAutomaticTextCompletionEnabled( &self, automaticTextCompletionEnabled: bool, ); + #[method(allowsCharacterPickerTouchBarItem)] pub unsafe fn allowsCharacterPickerTouchBarItem(&self) -> bool; + #[method(setAllowsCharacterPickerTouchBarItem:)] pub unsafe fn setAllowsCharacterPickerTouchBarItem( &self, @@ -112,37 +157,47 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSTextFieldConvenience"] + /// NSTextFieldConvenience unsafe impl NSTextField { #[method_id(labelWithString:)] pub unsafe fn labelWithString(stringValue: &NSString) -> Id; + #[method_id(wrappingLabelWithString:)] pub unsafe fn wrappingLabelWithString(stringValue: &NSString) -> Id; + #[method_id(labelWithAttributedString:)] pub unsafe fn labelWithAttributedString( attributedStringValue: &NSAttributedString, ) -> Id; + #[method_id(textFieldWithString:)] pub unsafe fn textFieldWithString(stringValue: &NSString) -> Id; } ); + extern_methods!( - #[doc = "NSTextFieldAttributedStringMethods"] + /// NSTextFieldAttributedStringMethods unsafe impl NSTextField { #[method(allowsEditingTextAttributes)] pub unsafe fn allowsEditingTextAttributes(&self) -> bool; + #[method(setAllowsEditingTextAttributes:)] pub unsafe fn setAllowsEditingTextAttributes(&self, allowsEditingTextAttributes: bool); + #[method(importsGraphics)] pub unsafe fn importsGraphics(&self) -> bool; + #[method(setImportsGraphics:)] pub unsafe fn setImportsGraphics(&self, importsGraphics: bool); } ); + pub type NSTextFieldDelegate = NSObject; + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSTextField { #[method(setTitleWithMnemonic:)] pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); diff --git a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs index 2e455d614..a2b1ea2b6 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs @@ -1,55 +1,78 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextFieldCell; + unsafe impl ClassType for NSTextFieldCell { type Super = NSActionCell; } ); + extern_methods!( unsafe impl NSTextFieldCell { #[method_id(initTextCell:)] pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initImageCell:)] pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(textColor)] pub unsafe fn textColor(&self) -> Option>; + #[method(setTextColor:)] pub unsafe fn setTextColor(&self, textColor: Option<&NSColor>); + #[method_id(setUpFieldEditorAttributes:)] pub unsafe fn setUpFieldEditorAttributes(&self, textObj: &NSText) -> Id; + #[method(bezelStyle)] pub unsafe fn bezelStyle(&self) -> NSTextFieldBezelStyle; + #[method(setBezelStyle:)] pub unsafe fn setBezelStyle(&self, bezelStyle: NSTextFieldBezelStyle); + #[method_id(placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; + #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); + #[method_id(placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; + #[method(setPlaceholderAttributedString:)] pub unsafe fn setPlaceholderAttributedString( &self, placeholderAttributedString: Option<&NSAttributedString>, ); + #[method(setWantsNotificationForMarkedText:)] pub unsafe fn setWantsNotificationForMarkedText(&self, flag: bool); + #[method_id(allowedInputSourceLocales)] pub unsafe fn allowedInputSourceLocales(&self) -> Option, Shared>>; + #[method(setAllowedInputSourceLocales:)] pub unsafe fn setAllowedInputSourceLocales( &self, diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index d8bb33ec2..4c08f8613 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -1,60 +1,85 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSPasteboardTypeTextFinderOptionKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSTextFinder; + unsafe impl ClassType for NSTextFinder { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextFinder { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(client)] pub unsafe fn client(&self) -> Option>; + #[method(setClient:)] pub unsafe fn setClient(&self, client: Option<&NSTextFinderClient>); + #[method(performAction:)] pub unsafe fn performAction(&self, op: NSTextFinderAction); + #[method(validateAction:)] pub unsafe fn validateAction(&self, op: NSTextFinderAction) -> bool; + #[method_id(findBarContainer)] pub unsafe fn findBarContainer(&self) -> Option>; + #[method(setFindBarContainer:)] pub unsafe fn setFindBarContainer( &self, findBarContainer: Option<&NSTextFinderBarContainer>, ); + #[method(cancelFindIndicator)] pub unsafe fn cancelFindIndicator(&self); + #[method(findIndicatorNeedsUpdate)] pub unsafe fn findIndicatorNeedsUpdate(&self) -> bool; + #[method(setFindIndicatorNeedsUpdate:)] pub unsafe fn setFindIndicatorNeedsUpdate(&self, findIndicatorNeedsUpdate: bool); + #[method(isIncrementalSearchingEnabled)] pub unsafe fn isIncrementalSearchingEnabled(&self) -> bool; + #[method(setIncrementalSearchingEnabled:)] pub unsafe fn setIncrementalSearchingEnabled(&self, incrementalSearchingEnabled: bool); + #[method(incrementalSearchingShouldDimContentView)] pub unsafe fn incrementalSearchingShouldDimContentView(&self) -> bool; + #[method(setIncrementalSearchingShouldDimContentView:)] pub unsafe fn setIncrementalSearchingShouldDimContentView( &self, incrementalSearchingShouldDimContentView: bool, ); + #[method_id(incrementalMatchRanges)] pub unsafe fn incrementalMatchRanges(&self) -> Id, Shared>; + #[method(drawIncrementalMatchHighlightInRect:)] pub unsafe fn drawIncrementalMatchHighlightInRect(rect: NSRect); + #[method(noteClientStringWillChange)] pub unsafe fn noteClientStringWillChange(&self); } ); + pub type NSTextFinderClient = NSObject; + pub type NSTextFinderBarContainer = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs index 9aa194a49..a0708d972 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs @@ -1,5 +1,8 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextInputClient = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs index 2396a8591..56d06943c 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs @@ -1,59 +1,81 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextInputSourceIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSTextInputContext; + unsafe impl ClassType for NSTextInputContext { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextInputContext { #[method_id(currentInputContext)] pub unsafe fn currentInputContext() -> Option>; + #[method_id(initWithClient:)] pub unsafe fn initWithClient(&self, client: &NSTextInputClient) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(client)] pub unsafe fn client(&self) -> Id; + #[method(acceptsGlyphInfo)] pub unsafe fn acceptsGlyphInfo(&self) -> bool; + #[method(setAcceptsGlyphInfo:)] pub unsafe fn setAcceptsGlyphInfo(&self, acceptsGlyphInfo: bool); + #[method_id(allowedInputSourceLocales)] pub unsafe fn allowedInputSourceLocales(&self) -> Option, Shared>>; + #[method(setAllowedInputSourceLocales:)] pub unsafe fn setAllowedInputSourceLocales( &self, allowedInputSourceLocales: Option<&NSArray>, ); + #[method(activate)] pub unsafe fn activate(&self); + #[method(deactivate)] pub unsafe fn deactivate(&self); + #[method(handleEvent:)] pub unsafe fn handleEvent(&self, event: &NSEvent) -> bool; + #[method(discardMarkedText)] pub unsafe fn discardMarkedText(&self); + #[method(invalidateCharacterCoordinates)] pub unsafe fn invalidateCharacterCoordinates(&self); + #[method_id(keyboardInputSources)] pub unsafe fn keyboardInputSources( &self, ) -> Option, Shared>>; + #[method_id(selectedKeyboardInputSource)] pub unsafe fn selectedKeyboardInputSource( &self, ) -> Option>; + #[method(setSelectedKeyboardInputSource:)] pub unsafe fn setSelectedKeyboardInputSource( &self, selectedKeyboardInputSource: Option<&NSTextInputSourceIdentifier>, ); + #[method_id(localizedNameForInputSource:)] pub unsafe fn localizedNameForInputSource( inputSourceIdentifier: &NSTextInputSourceIdentifier, diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index f3b72226b..074ed49d3 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextLayoutFragment; + unsafe impl ClassType for NSTextLayoutFragment { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextLayoutFragment { #[method_id(initWithTextElement:range:)] @@ -17,44 +22,63 @@ extern_methods!( textElement: &NSTextElement, rangeInElement: Option<&NSTextRange>, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; + #[method_id(textElement)] pub unsafe fn textElement(&self) -> Option>; + #[method_id(rangeInElement)] pub unsafe fn rangeInElement(&self) -> Id; + #[method_id(textLineFragments)] pub unsafe fn textLineFragments(&self) -> Id, Shared>; + #[method_id(layoutQueue)] pub unsafe fn layoutQueue(&self) -> Option>; + #[method(setLayoutQueue:)] pub unsafe fn setLayoutQueue(&self, layoutQueue: Option<&NSOperationQueue>); + #[method(state)] pub unsafe fn state(&self) -> NSTextLayoutFragmentState; + #[method(invalidateLayout)] pub unsafe fn invalidateLayout(&self); + #[method(layoutFragmentFrame)] pub unsafe fn layoutFragmentFrame(&self) -> CGRect; + #[method(renderingSurfaceBounds)] pub unsafe fn renderingSurfaceBounds(&self) -> CGRect; + #[method(leadingPadding)] pub unsafe fn leadingPadding(&self) -> CGFloat; + #[method(trailingPadding)] pub unsafe fn trailingPadding(&self) -> CGFloat; + #[method(topMargin)] pub unsafe fn topMargin(&self) -> CGFloat; + #[method(bottomMargin)] pub unsafe fn bottomMargin(&self) -> CGFloat; + #[method(drawAtPoint:inContext:)] pub unsafe fn drawAtPoint_inContext(&self, point: CGPoint, context: CGContextRef); + #[method_id(textAttachmentViewProviders)] pub unsafe fn textAttachmentViewProviders( &self, ) -> Id, Shared>; + #[method(frameForTextAttachmentAtLocation:)] pub unsafe fn frameForTextAttachmentAtLocation(&self, location: &NSTextLocation) -> CGRect; } diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index a1798ce37..231c428a7 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -1,73 +1,101 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextLayoutManager; + unsafe impl ClassType for NSTextLayoutManager { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextLayoutManager { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextLayoutManagerDelegate>); + #[method(usesFontLeading)] pub unsafe fn usesFontLeading(&self) -> bool; + #[method(setUsesFontLeading:)] pub unsafe fn setUsesFontLeading(&self, usesFontLeading: bool); + #[method(limitsLayoutForSuspiciousContents)] pub unsafe fn limitsLayoutForSuspiciousContents(&self) -> bool; + #[method(setLimitsLayoutForSuspiciousContents:)] pub unsafe fn setLimitsLayoutForSuspiciousContents( &self, limitsLayoutForSuspiciousContents: bool, ); + #[method(usesHyphenation)] pub unsafe fn usesHyphenation(&self) -> bool; + #[method(setUsesHyphenation:)] pub unsafe fn setUsesHyphenation(&self, usesHyphenation: bool); + #[method_id(textContentManager)] pub unsafe fn textContentManager(&self) -> Option>; + #[method(replaceTextContentManager:)] pub unsafe fn replaceTextContentManager(&self, textContentManager: &NSTextContentManager); + #[method_id(textContainer)] pub unsafe fn textContainer(&self) -> Option>; + #[method(setTextContainer:)] pub unsafe fn setTextContainer(&self, textContainer: Option<&NSTextContainer>); + #[method(usageBoundsForTextContainer)] pub unsafe fn usageBoundsForTextContainer(&self) -> CGRect; + #[method_id(textViewportLayoutController)] pub unsafe fn textViewportLayoutController( &self, ) -> Id; + #[method_id(layoutQueue)] pub unsafe fn layoutQueue(&self) -> Option>; + #[method(setLayoutQueue:)] pub unsafe fn setLayoutQueue(&self, layoutQueue: Option<&NSOperationQueue>); + #[method(ensureLayoutForRange:)] pub unsafe fn ensureLayoutForRange(&self, range: &NSTextRange); + #[method(ensureLayoutForBounds:)] pub unsafe fn ensureLayoutForBounds(&self, bounds: CGRect); + #[method(invalidateLayoutForRange:)] pub unsafe fn invalidateLayoutForRange(&self, range: &NSTextRange); + #[method_id(textLayoutFragmentForPosition:)] pub unsafe fn textLayoutFragmentForPosition( &self, position: CGPoint, ) -> Option>; + #[method_id(textLayoutFragmentForLocation:)] pub unsafe fn textLayoutFragmentForLocation( &self, location: &NSTextLocation, ) -> Option>; + #[method_id(enumerateTextLayoutFragmentsFromLocation:options:usingBlock:)] pub unsafe fn enumerateTextLayoutFragmentsFromLocation_options_usingBlock( &self, @@ -75,17 +103,22 @@ extern_methods!( options: NSTextLayoutFragmentEnumerationOptions, block: TodoBlock, ) -> Option>; + #[method_id(textSelections)] pub unsafe fn textSelections(&self) -> Id, Shared>; + #[method(setTextSelections:)] pub unsafe fn setTextSelections(&self, textSelections: &NSArray); + #[method_id(textSelectionNavigation)] pub unsafe fn textSelectionNavigation(&self) -> Id; + #[method(setTextSelectionNavigation:)] pub unsafe fn setTextSelectionNavigation( &self, textSelectionNavigation: &NSTextSelectionNavigation, ); + #[method(enumerateRenderingAttributesFromLocation:reverse:usingBlock:)] pub unsafe fn enumerateRenderingAttributesFromLocation_reverse_usingBlock( &self, @@ -93,12 +126,14 @@ extern_methods!( reverse: bool, block: TodoBlock, ); + #[method(setRenderingAttributes:forTextRange:)] pub unsafe fn setRenderingAttributes_forTextRange( &self, renderingAttributes: &NSDictionary, textRange: &NSTextRange, ); + #[method(addRenderingAttribute:value:forTextRange:)] pub unsafe fn addRenderingAttribute_value_forTextRange( &self, @@ -106,30 +141,37 @@ extern_methods!( value: Option<&Object>, textRange: &NSTextRange, ); + #[method(removeRenderingAttribute:forTextRange:)] pub unsafe fn removeRenderingAttribute_forTextRange( &self, renderingAttribute: &NSAttributedStringKey, textRange: &NSTextRange, ); + #[method(invalidateRenderingAttributesForTextRange:)] pub unsafe fn invalidateRenderingAttributesForTextRange(&self, textRange: &NSTextRange); + #[method(renderingAttributesValidator)] pub unsafe fn renderingAttributesValidator(&self) -> TodoBlock; + #[method(setRenderingAttributesValidator:)] pub unsafe fn setRenderingAttributesValidator( &self, renderingAttributesValidator: TodoBlock, ); + #[method_id(linkRenderingAttributes)] pub unsafe fn linkRenderingAttributes( ) -> Id, Shared>; + #[method_id(renderingAttributesForLink:atLocation:)] pub unsafe fn renderingAttributesForLink_atLocation( &self, link: &Object, location: &NSTextLocation, ) -> Id, Shared>; + #[method(enumerateTextSegmentsInRange:type:options:usingBlock:)] pub unsafe fn enumerateTextSegmentsInRange_type_options_usingBlock( &self, @@ -138,12 +180,14 @@ extern_methods!( options: NSTextLayoutManagerSegmentOptions, block: TodoBlock, ); + #[method(replaceContentsInRange:withTextElements:)] pub unsafe fn replaceContentsInRange_withTextElements( &self, range: &NSTextRange, textElements: &NSArray, ); + #[method(replaceContentsInRange:withAttributedString:)] pub unsafe fn replaceContentsInRange_withAttributedString( &self, @@ -152,4 +196,5 @@ extern_methods!( ); } ); + pub type NSTextLayoutManagerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs index ccd4d4376..0485decf4 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextLineFragment; + unsafe impl ClassType for NSTextLineFragment { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextLineFragment { #[method_id(initWithAttributedString:range:)] @@ -17,8 +22,10 @@ extern_methods!( attributedString: &NSAttributedString, range: NSRange, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, aDecoder: &NSCoder) -> Option>; + #[method_id(initWithString:attributes:range:)] pub unsafe fn initWithString_attributes_range( &self, @@ -26,22 +33,31 @@ extern_methods!( attributes: &NSDictionary, range: NSRange, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(attributedString)] pub unsafe fn attributedString(&self) -> Id; + #[method(characterRange)] pub unsafe fn characterRange(&self) -> NSRange; + #[method(typographicBounds)] pub unsafe fn typographicBounds(&self) -> CGRect; + #[method(glyphOrigin)] pub unsafe fn glyphOrigin(&self) -> CGPoint; + #[method(drawAtPoint:inContext:)] pub unsafe fn drawAtPoint_inContext(&self, point: CGPoint, context: CGContextRef); + #[method(locationForCharacterAtIndex:)] pub unsafe fn locationForCharacterAtIndex(&self, index: NSInteger) -> CGPoint; + #[method(characterIndexForPoint:)] pub unsafe fn characterIndexForPoint(&self, point: CGPoint) -> NSInteger; + #[method(fractionOfDistanceThroughGlyphForPoint:)] pub unsafe fn fractionOfDistanceThroughGlyphForPoint(&self, point: CGPoint) -> CGFloat; } diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index f9cce353b..cd3ed9580 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextListMarkerFormat = NSString; + extern_class!( #[derive(Debug)] pub struct NSTextList; + unsafe impl ClassType for NSTextList { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextList { #[method_id(initWithMarkerFormat:options:)] @@ -18,14 +24,19 @@ extern_methods!( format: &NSTextListMarkerFormat, mask: NSUInteger, ) -> Id; + #[method_id(markerFormat)] pub unsafe fn markerFormat(&self) -> Id; + #[method(listOptions)] pub unsafe fn listOptions(&self) -> NSTextListOptions; + #[method_id(markerForItemNumber:)] pub unsafe fn markerForItemNumber(&self, itemNum: NSInteger) -> Id; + #[method(startingItemNumber)] pub unsafe fn startingItemNumber(&self) -> NSInteger; + #[method(setStartingItemNumber:)] pub unsafe fn setStartingItemNumber(&self, startingItemNumber: NSInteger); } diff --git a/crates/icrate/src/generated/AppKit/NSTextRange.rs b/crates/icrate/src/generated/AppKit/NSTextRange.rs index bf39c0263..1f365dad1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextRange.rs +++ b/crates/icrate/src/generated/AppKit/NSTextRange.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextLocation = NSObject; + extern_class!( #[derive(Debug)] pub struct NSTextRange; + unsafe impl ClassType for NSTextRange { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextRange { #[method_id(initWithLocation:endLocation:)] @@ -18,31 +24,43 @@ extern_methods!( location: &NSTextLocation, endLocation: Option<&NSTextLocation>, ) -> Option>; + #[method_id(initWithLocation:)] pub unsafe fn initWithLocation(&self, location: &NSTextLocation) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method(isEmpty)] pub unsafe fn isEmpty(&self) -> bool; + #[method_id(location)] pub unsafe fn location(&self) -> Id; + #[method_id(endLocation)] pub unsafe fn endLocation(&self) -> Id; + #[method(isEqualToTextRange:)] pub unsafe fn isEqualToTextRange(&self, textRange: &NSTextRange) -> bool; + #[method(containsLocation:)] pub unsafe fn containsLocation(&self, location: &NSTextLocation) -> bool; + #[method(containsRange:)] pub unsafe fn containsRange(&self, textRange: &NSTextRange) -> bool; + #[method(intersectsWithTextRange:)] pub unsafe fn intersectsWithTextRange(&self, textRange: &NSTextRange) -> bool; + #[method_id(textRangeByIntersectingWithTextRange:)] pub unsafe fn textRangeByIntersectingWithTextRange( &self, textRange: &NSTextRange, ) -> Option>; + #[method_id(textRangeByFormingUnionWithTextRange:)] pub unsafe fn textRangeByFormingUnionWithTextRange( &self, diff --git a/crates/icrate/src/generated/AppKit/NSTextSelection.rs b/crates/icrate/src/generated/AppKit/NSTextSelection.rs index df2dccc58..c3dec31c2 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelection.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelection.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextSelection; + unsafe impl ClassType for NSTextSelection { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextSelection { #[method_id(initWithRanges:affinity:granularity:)] @@ -18,8 +23,10 @@ extern_methods!( affinity: NSTextSelectionAffinity, granularity: NSTextSelectionGranularity, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(initWithRange:affinity:granularity:)] pub unsafe fn initWithRange_affinity_granularity( &self, @@ -27,46 +34,61 @@ extern_methods!( affinity: NSTextSelectionAffinity, granularity: NSTextSelectionGranularity, ) -> Id; + #[method_id(initWithLocation:affinity:)] pub unsafe fn initWithLocation_affinity( &self, location: &NSTextLocation, affinity: NSTextSelectionAffinity, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(textRanges)] pub unsafe fn textRanges(&self) -> Id, Shared>; + #[method(granularity)] pub unsafe fn granularity(&self) -> NSTextSelectionGranularity; + #[method(affinity)] pub unsafe fn affinity(&self) -> NSTextSelectionAffinity; + #[method(isTransient)] pub unsafe fn isTransient(&self) -> bool; + #[method(anchorPositionOffset)] pub unsafe fn anchorPositionOffset(&self) -> CGFloat; + #[method(setAnchorPositionOffset:)] pub unsafe fn setAnchorPositionOffset(&self, anchorPositionOffset: CGFloat); + #[method(isLogical)] pub unsafe fn isLogical(&self) -> bool; + #[method(setLogical:)] pub unsafe fn setLogical(&self, logical: bool); + #[method_id(secondarySelectionLocation)] pub unsafe fn secondarySelectionLocation(&self) -> Option>; + #[method(setSecondarySelectionLocation:)] pub unsafe fn setSecondarySelectionLocation( &self, secondarySelectionLocation: Option<&NSTextLocation>, ); + #[method_id(typingAttributes)] pub unsafe fn typingAttributes( &self, ) -> Id, Shared>; + #[method(setTypingAttributes:)] pub unsafe fn setTypingAttributes( &self, typingAttributes: &NSDictionary, ); + #[method_id(textSelectionWithTextRanges:)] pub unsafe fn textSelectionWithTextRanges( &self, diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index af254d78a..a7a4793bb 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextSelectionNavigation; + unsafe impl ClassType for NSTextSelectionNavigation { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextSelectionNavigation { #[method_id(initWithDataSource:)] @@ -16,27 +21,36 @@ extern_methods!( &self, dataSource: &NSTextSelectionDataSource, ) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(textSelectionDataSource)] pub unsafe fn textSelectionDataSource( &self, ) -> Option>; + #[method(allowsNonContiguousRanges)] pub unsafe fn allowsNonContiguousRanges(&self) -> bool; + #[method(setAllowsNonContiguousRanges:)] pub unsafe fn setAllowsNonContiguousRanges(&self, allowsNonContiguousRanges: bool); + #[method(rotatesCoordinateSystemForLayoutOrientation)] pub unsafe fn rotatesCoordinateSystemForLayoutOrientation(&self) -> bool; + #[method(setRotatesCoordinateSystemForLayoutOrientation:)] pub unsafe fn setRotatesCoordinateSystemForLayoutOrientation( &self, rotatesCoordinateSystemForLayoutOrientation: bool, ); + #[method(flushLayoutCache)] pub unsafe fn flushLayoutCache(&self); + #[method_id(destinationSelectionForTextSelection:direction:destination:extending:confined:)] pub unsafe fn destinationSelectionForTextSelection_direction_destination_extending_confined( &self, @@ -46,6 +60,7 @@ extern_methods!( extending: bool, confined: bool, ) -> Option>; + #[method_id(textSelectionsInteractingAtPoint:inContainerAtLocation:anchors:modifiers:selecting:bounds:)] pub unsafe fn textSelectionsInteractingAtPoint_inContainerAtLocation_anchors_modifiers_selecting_bounds( &self, @@ -56,12 +71,14 @@ extern_methods!( selecting: bool, bounds: CGRect, ) -> Id, Shared>; + #[method_id(textSelectionForSelectionGranularity:enclosingTextSelection:)] pub unsafe fn textSelectionForSelectionGranularity_enclosingTextSelection( &self, selectionGranularity: NSTextSelectionGranularity, textSelection: &NSTextSelection, ) -> Id; + #[method_id(textSelectionForSelectionGranularity:enclosingPoint:inContainerAtLocation:)] pub unsafe fn textSelectionForSelectionGranularity_enclosingPoint_inContainerAtLocation( &self, @@ -69,12 +86,14 @@ extern_methods!( point: CGPoint, location: &NSTextLocation, ) -> Option>; + #[method_id(resolvedInsertionLocationForTextSelection:writingDirection:)] pub unsafe fn resolvedInsertionLocationForTextSelection_writingDirection( &self, textSelection: &NSTextSelection, writingDirection: NSTextSelectionNavigationWritingDirection, ) -> Option>; + #[method_id(deletionRangesForTextSelection:direction:destination:allowsDecomposition:)] pub unsafe fn deletionRangesForTextSelection_direction_destination_allowsDecomposition( &self, @@ -85,4 +104,5 @@ extern_methods!( ) -> Id, Shared>; } ); + pub type NSTextSelectionDataSource = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index 687fad7ea..bf9b62a25 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -1,32 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextStorage; + unsafe impl ClassType for NSTextStorage { type Super = NSMutableAttributedString; } ); + extern_methods!( unsafe impl NSTextStorage { #[method_id(layoutManagers)] pub unsafe fn layoutManagers(&self) -> Id, Shared>; + #[method(addLayoutManager:)] pub unsafe fn addLayoutManager(&self, aLayoutManager: &NSLayoutManager); + #[method(removeLayoutManager:)] pub unsafe fn removeLayoutManager(&self, aLayoutManager: &NSLayoutManager); + #[method(editedMask)] pub unsafe fn editedMask(&self) -> NSTextStorageEditActions; + #[method(editedRange)] pub unsafe fn editedRange(&self) -> NSRange; + #[method(changeInLength)] pub unsafe fn changeInLength(&self) -> NSInteger; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextStorageDelegate>); + #[method(edited:range:changeInLength:)] pub unsafe fn edited_range_changeInLength( &self, @@ -34,16 +47,22 @@ extern_methods!( editedRange: NSRange, delta: NSInteger, ); + #[method(processEditing)] pub unsafe fn processEditing(&self); + #[method(fixesAttributesLazily)] pub unsafe fn fixesAttributesLazily(&self) -> bool; + #[method(invalidateAttributesInRange:)] pub unsafe fn invalidateAttributesInRange(&self, range: NSRange); + #[method(ensureAttributesAreFixedInRange:)] pub unsafe fn ensureAttributesAreFixedInRange(&self, range: NSRange); + #[method_id(textStorageObserver)] pub unsafe fn textStorageObserver(&self) -> Option>; + #[method(setTextStorageObserver:)] pub unsafe fn setTextStorageObserver( &self, @@ -51,14 +70,19 @@ extern_methods!( ); } ); + pub type NSTextStorageDelegate = NSObject; + pub type NSTextStorageObserving = NSObject; + pub type NSTextStorageEditedOptions = NSUInteger; + extern_methods!( - #[doc = "NSDeprecatedTextStorageDelegateInterface"] + /// NSDeprecatedTextStorageDelegateInterface unsafe impl NSObject { #[method(textStorageWillProcessEditing:)] pub unsafe fn textStorageWillProcessEditing(&self, notification: &NSNotification); + #[method(textStorageDidProcessEditing:)] pub unsafe fn textStorageDidProcessEditing(&self, notification: &NSNotification); } diff --git a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs index 71768c5c1..8819df641 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs @@ -1,32 +1,46 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "Scripting"] + /// Scripting unsafe impl NSTextStorage { #[method_id(attributeRuns)] pub unsafe fn attributeRuns(&self) -> Id, Shared>; + #[method(setAttributeRuns:)] pub unsafe fn setAttributeRuns(&self, attributeRuns: &NSArray); + #[method_id(paragraphs)] pub unsafe fn paragraphs(&self) -> Id, Shared>; + #[method(setParagraphs:)] pub unsafe fn setParagraphs(&self, paragraphs: &NSArray); + #[method_id(words)] pub unsafe fn words(&self) -> Id, Shared>; + #[method(setWords:)] pub unsafe fn setWords(&self, words: &NSArray); + #[method_id(characters)] pub unsafe fn characters(&self) -> Id, Shared>; + #[method(setCharacters:)] pub unsafe fn setCharacters(&self, characters: &NSArray); + #[method_id(font)] pub unsafe fn font(&self) -> Option>; + #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); + #[method_id(foregroundColor)] pub unsafe fn foregroundColor(&self) -> Option>; + #[method(setForegroundColor:)] pub unsafe fn setForegroundColor(&self, foregroundColor: Option<&NSColor>); } diff --git a/crates/icrate/src/generated/AppKit/NSTextTable.rs b/crates/icrate/src/generated/AppKit/NSTextTable.rs index c52edd80c..5504acc58 100644 --- a/crates/icrate/src/generated/AppKit/NSTextTable.rs +++ b/crates/icrate/src/generated/AppKit/NSTextTable.rs @@ -1,18 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextBlock; + unsafe impl ClassType for NSTextBlock { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextBlock { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method(setValue:type:forDimension:)] pub unsafe fn setValue_type_forDimension( &self, @@ -20,19 +26,25 @@ extern_methods!( type_: NSTextBlockValueType, dimension: NSTextBlockDimension, ); + #[method(valueForDimension:)] pub unsafe fn valueForDimension(&self, dimension: NSTextBlockDimension) -> CGFloat; + #[method(valueTypeForDimension:)] pub unsafe fn valueTypeForDimension( &self, dimension: NSTextBlockDimension, ) -> NSTextBlockValueType; + #[method(setContentWidth:type:)] pub unsafe fn setContentWidth_type(&self, val: CGFloat, type_: NSTextBlockValueType); + #[method(contentWidth)] pub unsafe fn contentWidth(&self) -> CGFloat; + #[method(contentWidthValueType)] pub unsafe fn contentWidthValueType(&self) -> NSTextBlockValueType; + #[method(setWidth:type:forLayer:edge:)] pub unsafe fn setWidth_type_forLayer_edge( &self, @@ -41,6 +53,7 @@ extern_methods!( layer: NSTextBlockLayer, edge: NSRectEdge, ); + #[method(setWidth:type:forLayer:)] pub unsafe fn setWidth_type_forLayer( &self, @@ -48,32 +61,42 @@ extern_methods!( type_: NSTextBlockValueType, layer: NSTextBlockLayer, ); + #[method(widthForLayer:edge:)] pub unsafe fn widthForLayer_edge( &self, layer: NSTextBlockLayer, edge: NSRectEdge, ) -> CGFloat; + #[method(widthValueTypeForLayer:edge:)] pub unsafe fn widthValueTypeForLayer_edge( &self, layer: NSTextBlockLayer, edge: NSRectEdge, ) -> NSTextBlockValueType; + #[method(verticalAlignment)] pub unsafe fn verticalAlignment(&self) -> NSTextBlockVerticalAlignment; + #[method(setVerticalAlignment:)] pub unsafe fn setVerticalAlignment(&self, verticalAlignment: NSTextBlockVerticalAlignment); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(setBorderColor:forEdge:)] pub unsafe fn setBorderColor_forEdge(&self, color: Option<&NSColor>, edge: NSRectEdge); + #[method(setBorderColor:)] pub unsafe fn setBorderColor(&self, color: Option<&NSColor>); + #[method_id(borderColorForEdge:)] pub unsafe fn borderColorForEdge(&self, edge: NSRectEdge) -> Option>; + #[method(rectForLayoutAtPoint:inRect:textContainer:characterRange:)] pub unsafe fn rectForLayoutAtPoint_inRect_textContainer_characterRange( &self, @@ -82,6 +105,7 @@ extern_methods!( textContainer: &NSTextContainer, charRange: NSRange, ) -> NSRect; + #[method(boundsRectForContentRect:inRect:textContainer:characterRange:)] pub unsafe fn boundsRectForContentRect_inRect_textContainer_characterRange( &self, @@ -90,6 +114,7 @@ extern_methods!( textContainer: &NSTextContainer, charRange: NSRange, ) -> NSRect; + #[method(drawBackgroundWithFrame:inView:characterRange:layoutManager:)] pub unsafe fn drawBackgroundWithFrame_inView_characterRange_layoutManager( &self, @@ -100,13 +125,16 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSTextTableBlock; + unsafe impl ClassType for NSTextTableBlock { type Super = NSTextBlock; } ); + extern_methods!( unsafe impl NSTextTableBlock { #[method_id(initWithTable:startingRow:rowSpan:startingColumn:columnSpan:)] @@ -118,43 +146,59 @@ extern_methods!( col: NSInteger, colSpan: NSInteger, ) -> Id; + #[method_id(table)] pub unsafe fn table(&self) -> Id; + #[method(startingRow)] pub unsafe fn startingRow(&self) -> NSInteger; + #[method(rowSpan)] pub unsafe fn rowSpan(&self) -> NSInteger; + #[method(startingColumn)] pub unsafe fn startingColumn(&self) -> NSInteger; + #[method(columnSpan)] pub unsafe fn columnSpan(&self) -> NSInteger; } ); + extern_class!( #[derive(Debug)] pub struct NSTextTable; + unsafe impl ClassType for NSTextTable { type Super = NSTextBlock; } ); + extern_methods!( unsafe impl NSTextTable { #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSUInteger; + #[method(setNumberOfColumns:)] pub unsafe fn setNumberOfColumns(&self, numberOfColumns: NSUInteger); + #[method(layoutAlgorithm)] pub unsafe fn layoutAlgorithm(&self) -> NSTextTableLayoutAlgorithm; + #[method(setLayoutAlgorithm:)] pub unsafe fn setLayoutAlgorithm(&self, layoutAlgorithm: NSTextTableLayoutAlgorithm); + #[method(collapsesBorders)] pub unsafe fn collapsesBorders(&self) -> bool; + #[method(setCollapsesBorders:)] pub unsafe fn setCollapsesBorders(&self, collapsesBorders: bool); + #[method(hidesEmptyCells)] pub unsafe fn hidesEmptyCells(&self) -> bool; + #[method(setHidesEmptyCells:)] pub unsafe fn setHidesEmptyCells(&self, hidesEmptyCells: bool); + #[method(rectForBlock:layoutAtPoint:inRect:textContainer:characterRange:)] pub unsafe fn rectForBlock_layoutAtPoint_inRect_textContainer_characterRange( &self, @@ -164,6 +208,7 @@ extern_methods!( textContainer: &NSTextContainer, charRange: NSRange, ) -> NSRect; + #[method(boundsRectForBlock:contentRect:inRect:textContainer:characterRange:)] pub unsafe fn boundsRectForBlock_contentRect_inRect_textContainer_characterRange( &self, @@ -173,6 +218,7 @@ extern_methods!( textContainer: &NSTextContainer, charRange: NSRange, ) -> NSRect; + #[method(drawBackgroundForBlock:withFrame:inView:characterRange:layoutManager:)] pub unsafe fn drawBackgroundForBlock_withFrame_inView_characterRange_layoutManager( &self, diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index 9d2e024f1..603288275 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTextView; + unsafe impl ClassType for NSTextView { type Super = NSText; } ); + extern_methods!( unsafe impl NSTextView { #[method_id(initWithFrame:textContainer:)] @@ -17,102 +22,145 @@ extern_methods!( frameRect: NSRect, container: Option<&NSTextContainer>, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(initWithFrame:)] pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(textContainer)] pub unsafe fn textContainer(&self) -> Option>; + #[method(setTextContainer:)] pub unsafe fn setTextContainer(&self, textContainer: Option<&NSTextContainer>); + #[method(replaceTextContainer:)] pub unsafe fn replaceTextContainer(&self, newContainer: &NSTextContainer); + #[method(textContainerInset)] pub unsafe fn textContainerInset(&self) -> NSSize; + #[method(setTextContainerInset:)] pub unsafe fn setTextContainerInset(&self, textContainerInset: NSSize); + #[method(textContainerOrigin)] pub unsafe fn textContainerOrigin(&self) -> NSPoint; + #[method(invalidateTextContainerOrigin)] pub unsafe fn invalidateTextContainerOrigin(&self); + #[method_id(layoutManager)] pub unsafe fn layoutManager(&self) -> Option>; + #[method_id(textStorage)] pub unsafe fn textStorage(&self) -> Option>; + #[method_id(textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; + #[method_id(textContentStorage)] pub unsafe fn textContentStorage(&self) -> Option>; + #[method(insertText:)] pub unsafe fn insertText(&self, insertString: &Object); + #[method(setConstrainedFrameSize:)] pub unsafe fn setConstrainedFrameSize(&self, desiredSize: NSSize); + #[method(setAlignment:range:)] pub unsafe fn setAlignment_range(&self, alignment: NSTextAlignment, range: NSRange); + #[method(setBaseWritingDirection:range:)] pub unsafe fn setBaseWritingDirection_range( &self, writingDirection: NSWritingDirection, range: NSRange, ); + #[method(turnOffKerning:)] pub unsafe fn turnOffKerning(&self, sender: Option<&Object>); + #[method(tightenKerning:)] pub unsafe fn tightenKerning(&self, sender: Option<&Object>); + #[method(loosenKerning:)] pub unsafe fn loosenKerning(&self, sender: Option<&Object>); + #[method(useStandardKerning:)] pub unsafe fn useStandardKerning(&self, sender: Option<&Object>); + #[method(turnOffLigatures:)] pub unsafe fn turnOffLigatures(&self, sender: Option<&Object>); + #[method(useStandardLigatures:)] pub unsafe fn useStandardLigatures(&self, sender: Option<&Object>); + #[method(useAllLigatures:)] pub unsafe fn useAllLigatures(&self, sender: Option<&Object>); + #[method(raiseBaseline:)] pub unsafe fn raiseBaseline(&self, sender: Option<&Object>); + #[method(lowerBaseline:)] pub unsafe fn lowerBaseline(&self, sender: Option<&Object>); + #[method(toggleTraditionalCharacterShape:)] pub unsafe fn toggleTraditionalCharacterShape(&self, sender: Option<&Object>); + #[method(outline:)] pub unsafe fn outline(&self, sender: Option<&Object>); + #[method(performFindPanelAction:)] pub unsafe fn performFindPanelAction(&self, sender: Option<&Object>); + #[method(alignJustified:)] pub unsafe fn alignJustified(&self, sender: Option<&Object>); + #[method(changeColor:)] pub unsafe fn changeColor(&self, sender: Option<&Object>); + #[method(changeAttributes:)] pub unsafe fn changeAttributes(&self, sender: Option<&Object>); + #[method(changeDocumentBackgroundColor:)] pub unsafe fn changeDocumentBackgroundColor(&self, sender: Option<&Object>); + #[method(orderFrontSpacingPanel:)] pub unsafe fn orderFrontSpacingPanel(&self, sender: Option<&Object>); + #[method(orderFrontLinkPanel:)] pub unsafe fn orderFrontLinkPanel(&self, sender: Option<&Object>); + #[method(orderFrontListPanel:)] pub unsafe fn orderFrontListPanel(&self, sender: Option<&Object>); + #[method(orderFrontTablePanel:)] pub unsafe fn orderFrontTablePanel(&self, sender: Option<&Object>); + #[method(rulerView:didMoveMarker:)] pub unsafe fn rulerView_didMoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:didRemoveMarker:)] pub unsafe fn rulerView_didRemoveMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:didAddMarker:)] pub unsafe fn rulerView_didAddMarker(&self, ruler: &NSRulerView, marker: &NSRulerMarker); + #[method(rulerView:shouldMoveMarker:)] pub unsafe fn rulerView_shouldMoveMarker( &self, ruler: &NSRulerView, marker: &NSRulerMarker, ) -> bool; + #[method(rulerView:shouldAddMarker:)] pub unsafe fn rulerView_shouldAddMarker( &self, ruler: &NSRulerView, marker: &NSRulerMarker, ) -> bool; + #[method(rulerView:willMoveMarker:toLocation:)] pub unsafe fn rulerView_willMoveMarker_toLocation( &self, @@ -120,12 +168,14 @@ extern_methods!( marker: &NSRulerMarker, location: CGFloat, ) -> CGFloat; + #[method(rulerView:shouldRemoveMarker:)] pub unsafe fn rulerView_shouldRemoveMarker( &self, ruler: &NSRulerView, marker: &NSRulerMarker, ) -> bool; + #[method(rulerView:willAddMarker:atLocation:)] pub unsafe fn rulerView_willAddMarker_atLocation( &self, @@ -133,12 +183,16 @@ extern_methods!( marker: &NSRulerMarker, location: CGFloat, ) -> CGFloat; + #[method(rulerView:handleMouseDown:)] pub unsafe fn rulerView_handleMouseDown(&self, ruler: &NSRulerView, event: &NSEvent); + #[method(setNeedsDisplayInRect:avoidAdditionalLayout:)] pub unsafe fn setNeedsDisplayInRect_avoidAdditionalLayout(&self, rect: NSRect, flag: bool); + #[method(shouldDrawInsertionPoint)] pub unsafe fn shouldDrawInsertionPoint(&self) -> bool; + #[method(drawInsertionPointInRect:color:turnedOn:)] pub unsafe fn drawInsertionPointInRect_color_turnedOn( &self, @@ -146,42 +200,57 @@ extern_methods!( color: &NSColor, flag: bool, ); + #[method(drawViewBackgroundInRect:)] pub unsafe fn drawViewBackgroundInRect(&self, rect: NSRect); + #[method(updateRuler)] pub unsafe fn updateRuler(&self); + #[method(updateFontPanel)] pub unsafe fn updateFontPanel(&self); + #[method(updateDragTypeRegistration)] pub unsafe fn updateDragTypeRegistration(&self); + #[method(selectionRangeForProposedRange:granularity:)] pub unsafe fn selectionRangeForProposedRange_granularity( &self, proposedCharRange: NSRange, granularity: NSSelectionGranularity, ) -> NSRange; + #[method(clickedOnLink:atIndex:)] pub unsafe fn clickedOnLink_atIndex(&self, link: &Object, charIndex: NSUInteger); + #[method(startSpeaking:)] pub unsafe fn startSpeaking(&self, sender: Option<&Object>); + #[method(stopSpeaking:)] pub unsafe fn stopSpeaking(&self, sender: Option<&Object>); + #[method(setLayoutOrientation:)] pub unsafe fn setLayoutOrientation(&self, orientation: NSTextLayoutOrientation); + #[method(changeLayoutOrientation:)] pub unsafe fn changeLayoutOrientation(&self, sender: Option<&Object>); + #[method(characterIndexForInsertionAtPoint:)] pub unsafe fn characterIndexForInsertionAtPoint(&self, point: NSPoint) -> NSUInteger; + #[method(stronglyReferencesTextStorage)] pub unsafe fn stronglyReferencesTextStorage() -> bool; + #[method(performValidatedReplacementInRange:withAttributedString:)] pub unsafe fn performValidatedReplacementInRange_withAttributedString( &self, range: NSRange, attributedString: &NSAttributedString, ) -> bool; + #[method(usesAdaptiveColorMappingForDarkAppearance)] pub unsafe fn usesAdaptiveColorMappingForDarkAppearance(&self) -> bool; + #[method(setUsesAdaptiveColorMappingForDarkAppearance:)] pub unsafe fn setUsesAdaptiveColorMappingForDarkAppearance( &self, @@ -189,19 +258,23 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSCompletion"] + /// NSCompletion unsafe impl NSTextView { #[method(complete:)] pub unsafe fn complete(&self, sender: Option<&Object>); + #[method(rangeForUserCompletion)] pub unsafe fn rangeForUserCompletion(&self) -> NSRange; + #[method_id(completionsForPartialWordRange:indexOfSelectedItem:)] pub unsafe fn completionsForPartialWordRange_indexOfSelectedItem( &self, charRange: NSRange, index: NonNull, ) -> Option, Shared>>; + #[method(insertCompletion:forPartialWordRange:movement:isFinal:)] pub unsafe fn insertCompletion_forPartialWordRange_movement_isFinal( &self, @@ -212,55 +285,67 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSPasteboard"] + /// NSPasteboard unsafe impl NSTextView { #[method_id(writablePasteboardTypes)] pub unsafe fn writablePasteboardTypes(&self) -> Id, Shared>; + #[method(writeSelectionToPasteboard:type:)] pub unsafe fn writeSelectionToPasteboard_type( &self, pboard: &NSPasteboard, type_: &NSPasteboardType, ) -> bool; + #[method(writeSelectionToPasteboard:types:)] pub unsafe fn writeSelectionToPasteboard_types( &self, pboard: &NSPasteboard, types: &NSArray, ) -> bool; + #[method_id(readablePasteboardTypes)] pub unsafe fn readablePasteboardTypes(&self) -> Id, Shared>; + #[method_id(preferredPasteboardTypeFromArray:restrictedToTypesFromArray:)] pub unsafe fn preferredPasteboardTypeFromArray_restrictedToTypesFromArray( &self, availableTypes: &NSArray, allowedTypes: Option<&NSArray>, ) -> Option>; + #[method(readSelectionFromPasteboard:type:)] pub unsafe fn readSelectionFromPasteboard_type( &self, pboard: &NSPasteboard, type_: &NSPasteboardType, ) -> bool; + #[method(readSelectionFromPasteboard:)] pub unsafe fn readSelectionFromPasteboard(&self, pboard: &NSPasteboard) -> bool; + #[method(registerForServices)] pub unsafe fn registerForServices(); + #[method_id(validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, sendType: Option<&NSPasteboardType>, returnType: Option<&NSPasteboardType>, ) -> Option>; + #[method(pasteAsPlainText:)] pub unsafe fn pasteAsPlainText(&self, sender: Option<&Object>); + #[method(pasteAsRichText:)] pub unsafe fn pasteAsRichText(&self, sender: Option<&Object>); } ); + extern_methods!( - #[doc = "NSDragging"] + /// NSDragging unsafe impl NSTextView { #[method(dragSelectionWithEvent:offset:slideBack:)] pub unsafe fn dragSelectionWithEvent_offset_slideBack( @@ -269,31 +354,38 @@ extern_methods!( mouseOffset: NSSize, slideBack: bool, ) -> bool; + #[method_id(dragImageForSelectionWithEvent:origin:)] pub unsafe fn dragImageForSelectionWithEvent_origin( &self, event: &NSEvent, origin: NSPointPointer, ) -> Option>; + #[method_id(acceptableDragTypes)] pub unsafe fn acceptableDragTypes(&self) -> Id, Shared>; + #[method(dragOperationForDraggingInfo:type:)] pub unsafe fn dragOperationForDraggingInfo_type( &self, dragInfo: &NSDraggingInfo, type_: &NSPasteboardType, ) -> NSDragOperation; + #[method(cleanUpAfterDragOperation)] pub unsafe fn cleanUpAfterDragOperation(&self); } ); + extern_methods!( - #[doc = "NSSharing"] + /// NSSharing unsafe impl NSTextView { #[method_id(selectedRanges)] pub unsafe fn selectedRanges(&self) -> Id, Shared>; + #[method(setSelectedRanges:)] pub unsafe fn setSelectedRanges(&self, selectedRanges: &NSArray); + #[method(setSelectedRanges:affinity:stillSelecting:)] pub unsafe fn setSelectedRanges_affinity_stillSelecting( &self, @@ -301,6 +393,7 @@ extern_methods!( affinity: NSSelectionAffinity, stillSelectingFlag: bool, ); + #[method(setSelectedRange:affinity:stillSelecting:)] pub unsafe fn setSelectedRange_affinity_stillSelecting( &self, @@ -308,198 +401,273 @@ extern_methods!( affinity: NSSelectionAffinity, stillSelectingFlag: bool, ); + #[method(selectionAffinity)] pub unsafe fn selectionAffinity(&self) -> NSSelectionAffinity; + #[method(selectionGranularity)] pub unsafe fn selectionGranularity(&self) -> NSSelectionGranularity; + #[method(setSelectionGranularity:)] pub unsafe fn setSelectionGranularity(&self, selectionGranularity: NSSelectionGranularity); + #[method_id(selectedTextAttributes)] pub unsafe fn selectedTextAttributes( &self, ) -> Id, Shared>; + #[method(setSelectedTextAttributes:)] pub unsafe fn setSelectedTextAttributes( &self, selectedTextAttributes: &NSDictionary, ); + #[method_id(insertionPointColor)] pub unsafe fn insertionPointColor(&self) -> Id; + #[method(setInsertionPointColor:)] pub unsafe fn setInsertionPointColor(&self, insertionPointColor: &NSColor); + #[method(updateInsertionPointStateAndRestartTimer:)] pub unsafe fn updateInsertionPointStateAndRestartTimer(&self, restartFlag: bool); + #[method_id(markedTextAttributes)] pub unsafe fn markedTextAttributes( &self, ) -> Option, Shared>>; + #[method(setMarkedTextAttributes:)] pub unsafe fn setMarkedTextAttributes( &self, markedTextAttributes: Option<&NSDictionary>, ); + #[method_id(linkTextAttributes)] pub unsafe fn linkTextAttributes( &self, ) -> Option, Shared>>; + #[method(setLinkTextAttributes:)] pub unsafe fn setLinkTextAttributes( &self, linkTextAttributes: Option<&NSDictionary>, ); + #[method(displaysLinkToolTips)] pub unsafe fn displaysLinkToolTips(&self) -> bool; + #[method(setDisplaysLinkToolTips:)] pub unsafe fn setDisplaysLinkToolTips(&self, displaysLinkToolTips: bool); + #[method(acceptsGlyphInfo)] pub unsafe fn acceptsGlyphInfo(&self) -> bool; + #[method(setAcceptsGlyphInfo:)] pub unsafe fn setAcceptsGlyphInfo(&self, acceptsGlyphInfo: bool); + #[method(usesRuler)] pub unsafe fn usesRuler(&self) -> bool; + #[method(setUsesRuler:)] pub unsafe fn setUsesRuler(&self, usesRuler: bool); + #[method(usesInspectorBar)] pub unsafe fn usesInspectorBar(&self) -> bool; + #[method(setUsesInspectorBar:)] pub unsafe fn setUsesInspectorBar(&self, usesInspectorBar: bool); + #[method(isContinuousSpellCheckingEnabled)] pub unsafe fn isContinuousSpellCheckingEnabled(&self) -> bool; + #[method(setContinuousSpellCheckingEnabled:)] pub unsafe fn setContinuousSpellCheckingEnabled( &self, continuousSpellCheckingEnabled: bool, ); + #[method(toggleContinuousSpellChecking:)] pub unsafe fn toggleContinuousSpellChecking(&self, sender: Option<&Object>); + #[method(spellCheckerDocumentTag)] pub unsafe fn spellCheckerDocumentTag(&self) -> NSInteger; + #[method(isGrammarCheckingEnabled)] pub unsafe fn isGrammarCheckingEnabled(&self) -> bool; + #[method(setGrammarCheckingEnabled:)] pub unsafe fn setGrammarCheckingEnabled(&self, grammarCheckingEnabled: bool); + #[method(toggleGrammarChecking:)] pub unsafe fn toggleGrammarChecking(&self, sender: Option<&Object>); + #[method(setSpellingState:range:)] pub unsafe fn setSpellingState_range(&self, value: NSInteger, charRange: NSRange); + #[method_id(typingAttributes)] pub unsafe fn typingAttributes( &self, ) -> Id, Shared>; + #[method(setTypingAttributes:)] pub unsafe fn setTypingAttributes( &self, typingAttributes: &NSDictionary, ); + #[method(shouldChangeTextInRanges:replacementStrings:)] pub unsafe fn shouldChangeTextInRanges_replacementStrings( &self, affectedRanges: &NSArray, replacementStrings: Option<&NSArray>, ) -> bool; + #[method_id(rangesForUserTextChange)] pub unsafe fn rangesForUserTextChange(&self) -> Option, Shared>>; + #[method_id(rangesForUserCharacterAttributeChange)] pub unsafe fn rangesForUserCharacterAttributeChange( &self, ) -> Option, Shared>>; + #[method_id(rangesForUserParagraphAttributeChange)] pub unsafe fn rangesForUserParagraphAttributeChange( &self, ) -> Option, Shared>>; + #[method(shouldChangeTextInRange:replacementString:)] pub unsafe fn shouldChangeTextInRange_replacementString( &self, affectedCharRange: NSRange, replacementString: Option<&NSString>, ) -> bool; + #[method(didChangeText)] pub unsafe fn didChangeText(&self); + #[method(rangeForUserTextChange)] pub unsafe fn rangeForUserTextChange(&self) -> NSRange; + #[method(rangeForUserCharacterAttributeChange)] pub unsafe fn rangeForUserCharacterAttributeChange(&self) -> NSRange; + #[method(rangeForUserParagraphAttributeChange)] pub unsafe fn rangeForUserParagraphAttributeChange(&self) -> NSRange; + #[method(allowsDocumentBackgroundColorChange)] pub unsafe fn allowsDocumentBackgroundColorChange(&self) -> bool; + #[method(setAllowsDocumentBackgroundColorChange:)] pub unsafe fn setAllowsDocumentBackgroundColorChange( &self, allowsDocumentBackgroundColorChange: bool, ); + #[method_id(defaultParagraphStyle)] pub unsafe fn defaultParagraphStyle(&self) -> Option>; + #[method(setDefaultParagraphStyle:)] pub unsafe fn setDefaultParagraphStyle( &self, defaultParagraphStyle: Option<&NSParagraphStyle>, ); + #[method(allowsUndo)] pub unsafe fn allowsUndo(&self) -> bool; + #[method(setAllowsUndo:)] pub unsafe fn setAllowsUndo(&self, allowsUndo: bool); + #[method(breakUndoCoalescing)] pub unsafe fn breakUndoCoalescing(&self); + #[method(isCoalescingUndo)] pub unsafe fn isCoalescingUndo(&self) -> bool; + #[method(allowsImageEditing)] pub unsafe fn allowsImageEditing(&self) -> bool; + #[method(setAllowsImageEditing:)] pub unsafe fn setAllowsImageEditing(&self, allowsImageEditing: bool); + #[method(showFindIndicatorForRange:)] pub unsafe fn showFindIndicatorForRange(&self, charRange: NSRange); + #[method(usesRolloverButtonForSelection)] pub unsafe fn usesRolloverButtonForSelection(&self) -> bool; + #[method(setUsesRolloverButtonForSelection:)] pub unsafe fn setUsesRolloverButtonForSelection( &self, usesRolloverButtonForSelection: bool, ); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextViewDelegate>); + #[method(isEditable)] pub unsafe fn isEditable(&self) -> bool; + #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); + #[method(isSelectable)] pub unsafe fn isSelectable(&self) -> bool; + #[method(setSelectable:)] pub unsafe fn setSelectable(&self, selectable: bool); + #[method(isRichText)] pub unsafe fn isRichText(&self) -> bool; + #[method(setRichText:)] pub unsafe fn setRichText(&self, richText: bool); + #[method(importsGraphics)] pub unsafe fn importsGraphics(&self) -> bool; + #[method(setImportsGraphics:)] pub unsafe fn setImportsGraphics(&self, importsGraphics: bool); + #[method(drawsBackground)] pub unsafe fn drawsBackground(&self) -> bool; + #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); + #[method(isFieldEditor)] pub unsafe fn isFieldEditor(&self) -> bool; + #[method(setFieldEditor:)] pub unsafe fn setFieldEditor(&self, fieldEditor: bool); + #[method(usesFontPanel)] pub unsafe fn usesFontPanel(&self) -> bool; + #[method(setUsesFontPanel:)] pub unsafe fn setUsesFontPanel(&self, usesFontPanel: bool); + #[method(isRulerVisible)] pub unsafe fn isRulerVisible(&self) -> bool; + #[method(setRulerVisible:)] pub unsafe fn setRulerVisible(&self, rulerVisible: bool); + #[method(setSelectedRange:)] pub unsafe fn setSelectedRange(&self, charRange: NSRange); + #[method_id(allowedInputSourceLocales)] pub unsafe fn allowedInputSourceLocales(&self) -> Option, Shared>>; + #[method(setAllowedInputSourceLocales:)] pub unsafe fn setAllowedInputSourceLocales( &self, @@ -507,20 +675,25 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSTextChecking"] + /// NSTextChecking unsafe impl NSTextView { #[method(smartInsertDeleteEnabled)] pub unsafe fn smartInsertDeleteEnabled(&self) -> bool; + #[method(setSmartInsertDeleteEnabled:)] pub unsafe fn setSmartInsertDeleteEnabled(&self, smartInsertDeleteEnabled: bool); + #[method(smartDeleteRangeForProposedRange:)] pub unsafe fn smartDeleteRangeForProposedRange( &self, proposedCharRange: NSRange, ) -> NSRange; + #[method(toggleSmartInsertDelete:)] pub unsafe fn toggleSmartInsertDelete(&self, sender: Option<&Object>); + #[method(smartInsertForString:replacingRange:beforeString:afterString:)] pub unsafe fn smartInsertForString_replacingRange_beforeString_afterString( &self, @@ -529,73 +702,96 @@ extern_methods!( beforeString: Option<&mut Option>>, afterString: Option<&mut Option>>, ); + #[method_id(smartInsertBeforeStringForString:replacingRange:)] pub unsafe fn smartInsertBeforeStringForString_replacingRange( &self, pasteString: &NSString, charRangeToReplace: NSRange, ) -> Option>; + #[method_id(smartInsertAfterStringForString:replacingRange:)] pub unsafe fn smartInsertAfterStringForString_replacingRange( &self, pasteString: &NSString, charRangeToReplace: NSRange, ) -> Option>; + #[method(isAutomaticQuoteSubstitutionEnabled)] pub unsafe fn isAutomaticQuoteSubstitutionEnabled(&self) -> bool; + #[method(setAutomaticQuoteSubstitutionEnabled:)] pub unsafe fn setAutomaticQuoteSubstitutionEnabled( &self, automaticQuoteSubstitutionEnabled: bool, ); + #[method(toggleAutomaticQuoteSubstitution:)] pub unsafe fn toggleAutomaticQuoteSubstitution(&self, sender: Option<&Object>); + #[method(isAutomaticLinkDetectionEnabled)] pub unsafe fn isAutomaticLinkDetectionEnabled(&self) -> bool; + #[method(setAutomaticLinkDetectionEnabled:)] pub unsafe fn setAutomaticLinkDetectionEnabled(&self, automaticLinkDetectionEnabled: bool); + #[method(toggleAutomaticLinkDetection:)] pub unsafe fn toggleAutomaticLinkDetection(&self, sender: Option<&Object>); + #[method(isAutomaticDataDetectionEnabled)] pub unsafe fn isAutomaticDataDetectionEnabled(&self) -> bool; + #[method(setAutomaticDataDetectionEnabled:)] pub unsafe fn setAutomaticDataDetectionEnabled(&self, automaticDataDetectionEnabled: bool); + #[method(toggleAutomaticDataDetection:)] pub unsafe fn toggleAutomaticDataDetection(&self, sender: Option<&Object>); + #[method(isAutomaticDashSubstitutionEnabled)] pub unsafe fn isAutomaticDashSubstitutionEnabled(&self) -> bool; + #[method(setAutomaticDashSubstitutionEnabled:)] pub unsafe fn setAutomaticDashSubstitutionEnabled( &self, automaticDashSubstitutionEnabled: bool, ); + #[method(toggleAutomaticDashSubstitution:)] pub unsafe fn toggleAutomaticDashSubstitution(&self, sender: Option<&Object>); + #[method(isAutomaticTextReplacementEnabled)] pub unsafe fn isAutomaticTextReplacementEnabled(&self) -> bool; + #[method(setAutomaticTextReplacementEnabled:)] pub unsafe fn setAutomaticTextReplacementEnabled( &self, automaticTextReplacementEnabled: bool, ); + #[method(toggleAutomaticTextReplacement:)] pub unsafe fn toggleAutomaticTextReplacement(&self, sender: Option<&Object>); + #[method(isAutomaticSpellingCorrectionEnabled)] pub unsafe fn isAutomaticSpellingCorrectionEnabled(&self) -> bool; + #[method(setAutomaticSpellingCorrectionEnabled:)] pub unsafe fn setAutomaticSpellingCorrectionEnabled( &self, automaticSpellingCorrectionEnabled: bool, ); + #[method(toggleAutomaticSpellingCorrection:)] pub unsafe fn toggleAutomaticSpellingCorrection(&self, sender: Option<&Object>); + #[method(enabledTextCheckingTypes)] pub unsafe fn enabledTextCheckingTypes(&self) -> NSTextCheckingTypes; + #[method(setEnabledTextCheckingTypes:)] pub unsafe fn setEnabledTextCheckingTypes( &self, enabledTextCheckingTypes: NSTextCheckingTypes, ); + #[method(checkTextInRange:types:options:)] pub unsafe fn checkTextInRange_types_options( &self, @@ -603,6 +799,7 @@ extern_methods!( checkingTypes: NSTextCheckingTypes, options: &NSDictionary, ); + #[method(handleTextCheckingResults:forRange:types:options:orthography:wordCount:)] pub unsafe fn handleTextCheckingResults_forRange_types_options_orthography_wordCount( &self, @@ -613,97 +810,126 @@ extern_methods!( orthography: &NSOrthography, wordCount: NSInteger, ); + #[method(orderFrontSubstitutionsPanel:)] pub unsafe fn orderFrontSubstitutionsPanel(&self, sender: Option<&Object>); + #[method(checkTextInSelection:)] pub unsafe fn checkTextInSelection(&self, sender: Option<&Object>); + #[method(checkTextInDocument:)] pub unsafe fn checkTextInDocument(&self, sender: Option<&Object>); + #[method(usesFindPanel)] pub unsafe fn usesFindPanel(&self) -> bool; + #[method(setUsesFindPanel:)] pub unsafe fn setUsesFindPanel(&self, usesFindPanel: bool); + #[method(usesFindBar)] pub unsafe fn usesFindBar(&self) -> bool; + #[method(setUsesFindBar:)] pub unsafe fn setUsesFindBar(&self, usesFindBar: bool); + #[method(isIncrementalSearchingEnabled)] pub unsafe fn isIncrementalSearchingEnabled(&self) -> bool; + #[method(setIncrementalSearchingEnabled:)] pub unsafe fn setIncrementalSearchingEnabled(&self, incrementalSearchingEnabled: bool); } ); + extern_methods!( - #[doc = "NSQuickLookPreview"] + /// NSQuickLookPreview unsafe impl NSTextView { #[method(toggleQuickLookPreviewPanel:)] pub unsafe fn toggleQuickLookPreviewPanel(&self, sender: Option<&Object>); + #[method_id(quickLookPreviewableItemsInRanges:)] pub unsafe fn quickLookPreviewableItemsInRanges( &self, ranges: &NSArray, ) -> Id, Shared>; + #[method(updateQuickLookPreviewPanel)] pub unsafe fn updateQuickLookPreviewPanel(&self); } ); + extern_methods!( - #[doc = "NSTextView_SharingService"] + /// NSTextView_SharingService unsafe impl NSTextView { #[method(orderFrontSharingServicePicker:)] pub unsafe fn orderFrontSharingServicePicker(&self, sender: Option<&Object>); } ); + extern_methods!( - #[doc = "NSTextView_TouchBar"] + /// NSTextView_TouchBar unsafe impl NSTextView { #[method(isAutomaticTextCompletionEnabled)] pub unsafe fn isAutomaticTextCompletionEnabled(&self) -> bool; + #[method(setAutomaticTextCompletionEnabled:)] pub unsafe fn setAutomaticTextCompletionEnabled( &self, automaticTextCompletionEnabled: bool, ); + #[method(toggleAutomaticTextCompletion:)] pub unsafe fn toggleAutomaticTextCompletion(&self, sender: Option<&Object>); + #[method(allowsCharacterPickerTouchBarItem)] pub unsafe fn allowsCharacterPickerTouchBarItem(&self) -> bool; + #[method(setAllowsCharacterPickerTouchBarItem:)] pub unsafe fn setAllowsCharacterPickerTouchBarItem( &self, allowsCharacterPickerTouchBarItem: bool, ); + #[method(updateTouchBarItemIdentifiers)] pub unsafe fn updateTouchBarItemIdentifiers(&self); + #[method(updateTextTouchBarItems)] pub unsafe fn updateTextTouchBarItems(&self); + #[method(updateCandidates)] pub unsafe fn updateCandidates(&self); + #[method_id(candidateListTouchBarItem)] pub unsafe fn candidateListTouchBarItem( &self, ) -> Option>; } ); + extern_methods!( - #[doc = "NSTextView_Factory"] + /// NSTextView_Factory unsafe impl NSTextView { #[method_id(scrollableTextView)] pub unsafe fn scrollableTextView() -> Id; + #[method_id(fieldEditor)] pub unsafe fn fieldEditor() -> Id; + #[method_id(scrollableDocumentContentTextView)] pub unsafe fn scrollableDocumentContentTextView() -> Id; + #[method_id(scrollablePlainDocumentContentTextView)] pub unsafe fn scrollablePlainDocumentContentTextView() -> Id; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSTextView { #[method(toggleBaseWritingDirection:)] pub unsafe fn toggleBaseWritingDirection(&self, sender: Option<&Object>); } ); + pub type NSTextViewDelegate = NSObject; + pub type NSPasteboardTypeFindPanelSearchOptionKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs index 49bba0368..74c2e075f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextViewportLayoutControllerDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSTextViewportLayoutController; + unsafe impl ClassType for NSTextViewportLayoutController { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextViewportLayoutController { #[method_id(initWithTextLayoutManager:)] @@ -17,28 +23,38 @@ extern_methods!( &self, textLayoutManager: &NSTextLayoutManager, ) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextViewportLayoutControllerDelegate>); + #[method_id(textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; + #[method(viewportBounds)] pub unsafe fn viewportBounds(&self) -> CGRect; + #[method_id(viewportRange)] pub unsafe fn viewportRange(&self) -> Option>; + #[method(layoutViewport)] pub unsafe fn layoutViewport(&self); + #[method(relocateViewportToTextLocation:)] pub unsafe fn relocateViewportToTextLocation( &self, textLocation: &NSTextLocation, ) -> CGFloat; + #[method(adjustViewportByVerticalOffset:)] pub unsafe fn adjustViewportByVerticalOffset(&self, verticalOffset: CGFloat); } diff --git a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs index 4a41ac860..85277b93d 100644 --- a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTintConfiguration; + unsafe impl ClassType for NSTintConfiguration { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTintConfiguration { #[method_id(defaultTintConfiguration)] pub unsafe fn defaultTintConfiguration() -> Id; + #[method_id(monochromeTintConfiguration)] pub unsafe fn monochromeTintConfiguration() -> Id; + #[method_id(tintConfigurationWithPreferredColor:)] pub unsafe fn tintConfigurationWithPreferredColor(color: &NSColor) -> Id; + #[method_id(tintConfigurationWithFixedColor:)] pub unsafe fn tintConfigurationWithFixedColor(color: &NSColor) -> Id; + #[method_id(baseTintColor)] pub unsafe fn baseTintColor(&self) -> Option>; + #[method_id(equivalentContentTintColor)] pub unsafe fn equivalentContentTintColor(&self) -> Option>; + #[method(adaptsToUserAccentColor)] pub unsafe fn adaptsToUserAccentColor(&self) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs b/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs index a0e15e247..1d53451aa 100644 --- a/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs @@ -1,36 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTitlebarAccessoryViewController; + unsafe impl ClassType for NSTitlebarAccessoryViewController { type Super = NSViewController; } ); + extern_methods!( unsafe impl NSTitlebarAccessoryViewController { #[method(layoutAttribute)] pub unsafe fn layoutAttribute(&self) -> NSLayoutAttribute; + #[method(setLayoutAttribute:)] pub unsafe fn setLayoutAttribute(&self, layoutAttribute: NSLayoutAttribute); + #[method(fullScreenMinHeight)] pub unsafe fn fullScreenMinHeight(&self) -> CGFloat; + #[method(setFullScreenMinHeight:)] pub unsafe fn setFullScreenMinHeight(&self, fullScreenMinHeight: CGFloat); + #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[method(automaticallyAdjustsSize)] pub unsafe fn automaticallyAdjustsSize(&self) -> bool; + #[method(setAutomaticallyAdjustsSize:)] pub unsafe fn setAutomaticallyAdjustsSize(&self, automaticallyAdjustsSize: bool); + #[method(viewWillAppear)] pub unsafe fn viewWillAppear(&self); + #[method(viewDidAppear)] pub unsafe fn viewDidAppear(&self); + #[method(viewDidDisappear)] pub unsafe fn viewDidDisappear(&self); } diff --git a/crates/icrate/src/generated/AppKit/NSTokenField.rs b/crates/icrate/src/generated/AppKit/NSTokenField.rs index e1760b882..3a3a3bcce 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenField.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenField.rs @@ -1,38 +1,53 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTokenFieldDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSTokenField; + unsafe impl ClassType for NSTokenField { type Super = NSTextField; } ); + extern_methods!( unsafe impl NSTokenField { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTokenFieldDelegate>); + #[method(tokenStyle)] pub unsafe fn tokenStyle(&self) -> NSTokenStyle; + #[method(setTokenStyle:)] pub unsafe fn setTokenStyle(&self, tokenStyle: NSTokenStyle); + #[method(completionDelay)] pub unsafe fn completionDelay(&self) -> NSTimeInterval; + #[method(setCompletionDelay:)] pub unsafe fn setCompletionDelay(&self, completionDelay: NSTimeInterval); + #[method(defaultCompletionDelay)] pub unsafe fn defaultCompletionDelay() -> NSTimeInterval; + #[method_id(tokenizingCharacterSet)] pub unsafe fn tokenizingCharacterSet(&self) -> Id; + #[method(setTokenizingCharacterSet:)] pub unsafe fn setTokenizingCharacterSet( &self, tokenizingCharacterSet: Option<&NSCharacterSet>, ); + #[method_id(defaultTokenizingCharacterSet)] pub unsafe fn defaultTokenizingCharacterSet() -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs index d4502ce88..93835ca7f 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -1,39 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTokenFieldCell; + unsafe impl ClassType for NSTokenFieldCell { type Super = NSTextFieldCell; } ); + extern_methods!( unsafe impl NSTokenFieldCell { #[method(tokenStyle)] pub unsafe fn tokenStyle(&self) -> NSTokenStyle; + #[method(setTokenStyle:)] pub unsafe fn setTokenStyle(&self, tokenStyle: NSTokenStyle); + #[method(completionDelay)] pub unsafe fn completionDelay(&self) -> NSTimeInterval; + #[method(setCompletionDelay:)] pub unsafe fn setCompletionDelay(&self, completionDelay: NSTimeInterval); + #[method(defaultCompletionDelay)] pub unsafe fn defaultCompletionDelay() -> NSTimeInterval; + #[method_id(tokenizingCharacterSet)] pub unsafe fn tokenizingCharacterSet(&self) -> Id; + #[method(setTokenizingCharacterSet:)] pub unsafe fn setTokenizingCharacterSet( &self, tokenizingCharacterSet: Option<&NSCharacterSet>, ); + #[method_id(defaultTokenizingCharacterSet)] pub unsafe fn defaultTokenizingCharacterSet() -> Id; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTokenFieldCellDelegate>); } ); + pub type NSTokenFieldCellDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index 9b442d0a2..81bd1f9e6 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -1,16 +1,23 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSToolbarIdentifier = NSString; + pub type NSToolbarItemIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSToolbar; + unsafe impl ClassType for NSToolbar { type Super = NSObject; } ); + extern_methods!( unsafe impl NSToolbar { #[method_id(initWithIdentifier:)] @@ -18,100 +25,138 @@ extern_methods!( &self, identifier: &NSToolbarIdentifier, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method(insertItemWithItemIdentifier:atIndex:)] pub unsafe fn insertItemWithItemIdentifier_atIndex( &self, itemIdentifier: &NSToolbarItemIdentifier, index: NSInteger, ); + #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSToolbarDelegate>); + #[method(isVisible)] pub unsafe fn isVisible(&self) -> bool; + #[method(setVisible:)] pub unsafe fn setVisible(&self, visible: bool); + #[method(runCustomizationPalette:)] pub unsafe fn runCustomizationPalette(&self, sender: Option<&Object>); + #[method(customizationPaletteIsRunning)] pub unsafe fn customizationPaletteIsRunning(&self) -> bool; + #[method(displayMode)] pub unsafe fn displayMode(&self) -> NSToolbarDisplayMode; + #[method(setDisplayMode:)] pub unsafe fn setDisplayMode(&self, displayMode: NSToolbarDisplayMode); + #[method_id(selectedItemIdentifier)] pub unsafe fn selectedItemIdentifier(&self) -> Option>; + #[method(setSelectedItemIdentifier:)] pub unsafe fn setSelectedItemIdentifier( &self, selectedItemIdentifier: Option<&NSToolbarItemIdentifier>, ); + #[method(sizeMode)] pub unsafe fn sizeMode(&self) -> NSToolbarSizeMode; + #[method(setSizeMode:)] pub unsafe fn setSizeMode(&self, sizeMode: NSToolbarSizeMode); + #[method(showsBaselineSeparator)] pub unsafe fn showsBaselineSeparator(&self) -> bool; + #[method(setShowsBaselineSeparator:)] pub unsafe fn setShowsBaselineSeparator(&self, showsBaselineSeparator: bool); + #[method(allowsUserCustomization)] pub unsafe fn allowsUserCustomization(&self) -> bool; + #[method(setAllowsUserCustomization:)] pub unsafe fn setAllowsUserCustomization(&self, allowsUserCustomization: bool); + #[method_id(identifier)] pub unsafe fn identifier(&self) -> Id; + #[method_id(items)] pub unsafe fn items(&self) -> Id, Shared>; + #[method_id(visibleItems)] pub unsafe fn visibleItems(&self) -> Option, Shared>>; + #[method_id(centeredItemIdentifier)] pub unsafe fn centeredItemIdentifier(&self) -> Option>; + #[method(setCenteredItemIdentifier:)] pub unsafe fn setCenteredItemIdentifier( &self, centeredItemIdentifier: Option<&NSToolbarItemIdentifier>, ); + #[method(autosavesConfiguration)] pub unsafe fn autosavesConfiguration(&self) -> bool; + #[method(setAutosavesConfiguration:)] pub unsafe fn setAutosavesConfiguration(&self, autosavesConfiguration: bool); + #[method(setConfigurationFromDictionary:)] pub unsafe fn setConfigurationFromDictionary( &self, configDict: &NSDictionary, ); + #[method_id(configurationDictionary)] pub unsafe fn configurationDictionary(&self) -> Id, Shared>; + #[method(validateVisibleItems)] pub unsafe fn validateVisibleItems(&self); + #[method(allowsExtensionItems)] pub unsafe fn allowsExtensionItems(&self) -> bool; + #[method(setAllowsExtensionItems:)] pub unsafe fn setAllowsExtensionItems(&self, allowsExtensionItems: bool); } ); + pub type NSToolbarDelegate = NSObject; + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSToolbar { #[method_id(fullScreenAccessoryView)] pub unsafe fn fullScreenAccessoryView(&self) -> Option>; + #[method(setFullScreenAccessoryView:)] pub unsafe fn setFullScreenAccessoryView(&self, fullScreenAccessoryView: Option<&NSView>); + #[method(fullScreenAccessoryViewMinHeight)] pub unsafe fn fullScreenAccessoryViewMinHeight(&self) -> CGFloat; + #[method(setFullScreenAccessoryViewMinHeight:)] pub unsafe fn setFullScreenAccessoryViewMinHeight( &self, fullScreenAccessoryViewMinHeight: CGFloat, ); + #[method(fullScreenAccessoryViewMaxHeight)] pub unsafe fn fullScreenAccessoryViewMaxHeight(&self) -> CGFloat; + #[method(setFullScreenAccessoryViewMaxHeight:)] pub unsafe fn setFullScreenAccessoryViewMaxHeight( &self, diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index f49a886bb..981297780 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSToolbarItemVisibilityPriority = NSInteger; + extern_class!( #[derive(Debug)] pub struct NSToolbarItem; + unsafe impl ClassType for NSToolbarItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSToolbarItem { #[method_id(initWithItemIdentifier:)] @@ -17,96 +23,138 @@ extern_methods!( &self, itemIdentifier: &NSToolbarItemIdentifier, ) -> Id; + #[method_id(itemIdentifier)] pub unsafe fn itemIdentifier(&self) -> Id; + #[method_id(toolbar)] pub unsafe fn toolbar(&self) -> Option>; + #[method_id(label)] pub unsafe fn label(&self) -> Id; + #[method(setLabel:)] pub unsafe fn setLabel(&self, label: &NSString); + #[method_id(paletteLabel)] pub unsafe fn paletteLabel(&self) -> Id; + #[method(setPaletteLabel:)] pub unsafe fn setPaletteLabel(&self, paletteLabel: &NSString); + #[method_id(toolTip)] pub unsafe fn toolTip(&self) -> Option>; + #[method(setToolTip:)] pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + #[method_id(menuFormRepresentation)] pub unsafe fn menuFormRepresentation(&self) -> Option>; + #[method(setMenuFormRepresentation:)] pub unsafe fn setMenuFormRepresentation(&self, menuFormRepresentation: Option<&NSMenuItem>); + #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(action)] pub unsafe fn action(&self) -> Option; + #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); + #[method_id(image)] pub unsafe fn image(&self) -> Option>; + #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method(isBordered)] pub unsafe fn isBordered(&self) -> bool; + #[method(setBordered:)] pub unsafe fn setBordered(&self, bordered: bool); + #[method(isNavigational)] pub unsafe fn isNavigational(&self) -> bool; + #[method(setNavigational:)] pub unsafe fn setNavigational(&self, navigational: bool); + #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); + #[method(minSize)] pub unsafe fn minSize(&self) -> NSSize; + #[method(setMinSize:)] pub unsafe fn setMinSize(&self, minSize: NSSize); + #[method(maxSize)] pub unsafe fn maxSize(&self) -> NSSize; + #[method(setMaxSize:)] pub unsafe fn setMaxSize(&self, maxSize: NSSize); + #[method(visibilityPriority)] pub unsafe fn visibilityPriority(&self) -> NSToolbarItemVisibilityPriority; + #[method(setVisibilityPriority:)] pub unsafe fn setVisibilityPriority( &self, visibilityPriority: NSToolbarItemVisibilityPriority, ); + #[method(validate)] pub unsafe fn validate(&self); + #[method(autovalidates)] pub unsafe fn autovalidates(&self) -> bool; + #[method(setAutovalidates:)] pub unsafe fn setAutovalidates(&self, autovalidates: bool); + #[method(allowsDuplicatesInToolbar)] pub unsafe fn allowsDuplicatesInToolbar(&self) -> bool; } ); + extern_methods!( unsafe impl NSToolbarItem {} ); + pub type NSToolbarItemValidation = NSObject; + extern_methods!( - #[doc = "NSToolbarItemValidation"] + /// NSToolbarItemValidation unsafe impl NSObject { #[method(validateToolbarItem:)] pub unsafe fn validateToolbarItem(&self, item: &NSToolbarItem) -> bool; } ); + pub type NSCloudSharingValidation = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs index 514d2fc1f..5e3bdaee6 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSToolbarItemGroup; + unsafe impl ClassType for NSToolbarItemGroup { type Super = NSToolbarItem; } ); + extern_methods!( unsafe impl NSToolbarItemGroup { #[method_id(groupWithItemIdentifier:titles:selectionMode:labels:target:action:)] @@ -20,6 +25,7 @@ extern_methods!( target: Option<&Object>, action: Option, ) -> Id; + #[method_id(groupWithItemIdentifier:images:selectionMode:labels:target:action:)] pub unsafe fn groupWithItemIdentifier_images_selectionMode_labels_target_action( itemIdentifier: &NSToolbarItemIdentifier, @@ -29,27 +35,37 @@ extern_methods!( target: Option<&Object>, action: Option, ) -> Id; + #[method_id(subitems)] pub unsafe fn subitems(&self) -> Id, Shared>; + #[method(setSubitems:)] pub unsafe fn setSubitems(&self, subitems: &NSArray); + #[method(controlRepresentation)] pub unsafe fn controlRepresentation(&self) -> NSToolbarItemGroupControlRepresentation; + #[method(setControlRepresentation:)] pub unsafe fn setControlRepresentation( &self, controlRepresentation: NSToolbarItemGroupControlRepresentation, ); + #[method(selectionMode)] pub unsafe fn selectionMode(&self) -> NSToolbarItemGroupSelectionMode; + #[method(setSelectionMode:)] pub unsafe fn setSelectionMode(&self, selectionMode: NSToolbarItemGroupSelectionMode); + #[method(selectedIndex)] pub unsafe fn selectedIndex(&self) -> NSInteger; + #[method(setSelectedIndex:)] pub unsafe fn setSelectedIndex(&self, selectedIndex: NSInteger); + #[method(setSelected:atIndex:)] pub unsafe fn setSelected_atIndex(&self, selected: bool, index: NSInteger); + #[method(isSelectedAtIndex:)] pub unsafe fn isSelectedAtIndex(&self, index: NSInteger) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs index b390c4c10..081c88ce6 100644 --- a/crates/icrate/src/generated/AppKit/NSTouch.rs +++ b/crates/icrate/src/generated/AppKit/NSTouch.rs @@ -1,37 +1,50 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTouch; + unsafe impl ClassType for NSTouch { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTouch { #[method_id(identity)] pub unsafe fn identity(&self) -> Id; + #[method(phase)] pub unsafe fn phase(&self) -> NSTouchPhase; + #[method(normalizedPosition)] pub unsafe fn normalizedPosition(&self) -> NSPoint; + #[method(isResting)] pub unsafe fn isResting(&self) -> bool; + #[method_id(device)] pub unsafe fn device(&self) -> Option>; + #[method(deviceSize)] pub unsafe fn deviceSize(&self) -> NSSize; } ); + extern_methods!( - #[doc = "NSTouchBar"] + /// NSTouchBar unsafe impl NSTouch { #[method(type)] pub unsafe fn type_(&self) -> NSTouchType; + #[method(locationInView:)] pub unsafe fn locationInView(&self, view: Option<&NSView>) -> NSPoint; + #[method(previousLocationInView:)] pub unsafe fn previousLocationInView(&self, view: Option<&NSView>) -> NSPoint; } diff --git a/crates/icrate/src/generated/AppKit/NSTouchBar.rs b/crates/icrate/src/generated/AppKit/NSTouchBar.rs index 287a56766..f4c06d7f9 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBar.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBar.rs @@ -1,123 +1,159 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTouchBarCustomizationIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSTouchBar; + unsafe impl ClassType for NSTouchBar { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTouchBar { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(customizationIdentifier)] pub unsafe fn customizationIdentifier( &self, ) -> Option>; + #[method(setCustomizationIdentifier:)] pub unsafe fn setCustomizationIdentifier( &self, customizationIdentifier: Option<&NSTouchBarCustomizationIdentifier>, ); + #[method_id(customizationAllowedItemIdentifiers)] pub unsafe fn customizationAllowedItemIdentifiers( &self, ) -> Id, Shared>; + #[method(setCustomizationAllowedItemIdentifiers:)] pub unsafe fn setCustomizationAllowedItemIdentifiers( &self, customizationAllowedItemIdentifiers: &NSArray, ); + #[method_id(customizationRequiredItemIdentifiers)] pub unsafe fn customizationRequiredItemIdentifiers( &self, ) -> Id, Shared>; + #[method(setCustomizationRequiredItemIdentifiers:)] pub unsafe fn setCustomizationRequiredItemIdentifiers( &self, customizationRequiredItemIdentifiers: &NSArray, ); + #[method_id(defaultItemIdentifiers)] pub unsafe fn defaultItemIdentifiers( &self, ) -> Id, Shared>; + #[method(setDefaultItemIdentifiers:)] pub unsafe fn setDefaultItemIdentifiers( &self, defaultItemIdentifiers: &NSArray, ); + #[method_id(itemIdentifiers)] pub unsafe fn itemIdentifiers(&self) -> Id, Shared>; + #[method_id(principalItemIdentifier)] pub unsafe fn principalItemIdentifier( &self, ) -> Option>; + #[method(setPrincipalItemIdentifier:)] pub unsafe fn setPrincipalItemIdentifier( &self, principalItemIdentifier: Option<&NSTouchBarItemIdentifier>, ); + #[method_id(escapeKeyReplacementItemIdentifier)] pub unsafe fn escapeKeyReplacementItemIdentifier( &self, ) -> Option>; + #[method(setEscapeKeyReplacementItemIdentifier:)] pub unsafe fn setEscapeKeyReplacementItemIdentifier( &self, escapeKeyReplacementItemIdentifier: Option<&NSTouchBarItemIdentifier>, ); + #[method_id(templateItems)] pub unsafe fn templateItems(&self) -> Id, Shared>; + #[method(setTemplateItems:)] pub unsafe fn setTemplateItems(&self, templateItems: &NSSet); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTouchBarDelegate>); + #[method_id(itemForIdentifier:)] pub unsafe fn itemForIdentifier( &self, identifier: &NSTouchBarItemIdentifier, ) -> Option>; + #[method(isVisible)] pub unsafe fn isVisible(&self) -> bool; + #[method(isAutomaticCustomizeTouchBarMenuItemEnabled)] pub unsafe fn isAutomaticCustomizeTouchBarMenuItemEnabled() -> bool; + #[method(setAutomaticCustomizeTouchBarMenuItemEnabled:)] pub unsafe fn setAutomaticCustomizeTouchBarMenuItemEnabled( automaticCustomizeTouchBarMenuItemEnabled: bool, ); } ); + pub type NSTouchBarDelegate = NSObject; + pub type NSTouchBarProvider = NSObject; + extern_methods!( - #[doc = "NSTouchBarProvider"] + /// NSTouchBarProvider unsafe impl NSResponder { #[method_id(touchBar)] pub unsafe fn touchBar(&self) -> Option>; + #[method(setTouchBar:)] pub unsafe fn setTouchBar(&self, touchBar: Option<&NSTouchBar>); + #[method_id(makeTouchBar)] pub unsafe fn makeTouchBar(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSTouchBarCustomization"] + /// NSTouchBarCustomization unsafe impl NSApplication { #[method(isAutomaticCustomizeTouchBarMenuItemEnabled)] pub unsafe fn isAutomaticCustomizeTouchBarMenuItemEnabled(&self) -> bool; + #[method(setAutomaticCustomizeTouchBarMenuItemEnabled:)] pub unsafe fn setAutomaticCustomizeTouchBarMenuItemEnabled( &self, automaticCustomizeTouchBarMenuItemEnabled: bool, ); + #[method(toggleTouchBarCustomizationPalette:)] pub unsafe fn toggleTouchBarCustomizationPalette(&self, sender: Option<&Object>); } diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs index 03f89c3f0..a2f052f80 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTouchBarItemIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSTouchBarItem; + unsafe impl ClassType for NSTouchBarItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTouchBarItem { #[method_id(initWithIdentifier:)] @@ -17,22 +23,31 @@ extern_methods!( &self, identifier: &NSTouchBarItemIdentifier, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(identifier)] pub unsafe fn identifier(&self) -> Id; + #[method(visibilityPriority)] pub unsafe fn visibilityPriority(&self) -> NSTouchBarItemPriority; + #[method(setVisibilityPriority:)] pub unsafe fn setVisibilityPriority(&self, visibilityPriority: NSTouchBarItemPriority); + #[method_id(view)] pub unsafe fn view(&self) -> Option>; + #[method_id(viewController)] pub unsafe fn viewController(&self) -> Option>; + #[method_id(customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; + #[method(isVisible)] pub unsafe fn isVisible(&self) -> bool; } diff --git a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs index e7336de61..73b32d30c 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTrackingArea; + unsafe impl ClassType for NSTrackingArea { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTrackingArea { #[method_id(initWithRect:options:owner:userInfo:)] @@ -19,12 +24,16 @@ extern_methods!( owner: Option<&Object>, userInfo: Option<&NSDictionary>, ) -> Id; + #[method(rect)] pub unsafe fn rect(&self) -> NSRect; + #[method(options)] pub unsafe fn options(&self) -> NSTrackingAreaOptions; + #[method_id(owner)] pub unsafe fn owner(&self) -> Option>; + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option, Shared>>; } diff --git a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs index 4ff768c89..560ff7bfa 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTrackingSeparatorToolbarItem; + unsafe impl ClassType for NSTrackingSeparatorToolbarItem { type Super = NSToolbarItem; } ); + extern_methods!( unsafe impl NSTrackingSeparatorToolbarItem { #[method_id(trackingSeparatorToolbarItemWithIdentifier:splitView:dividerIndex:)] @@ -17,12 +22,16 @@ extern_methods!( splitView: &NSSplitView, dividerIndex: NSInteger, ) -> Id; + #[method_id(splitView)] pub unsafe fn splitView(&self) -> Id; + #[method(setSplitView:)] pub unsafe fn setSplitView(&self, splitView: &NSSplitView); + #[method(dividerIndex)] pub unsafe fn dividerIndex(&self) -> NSInteger; + #[method(setDividerIndex:)] pub unsafe fn setDividerIndex(&self, dividerIndex: NSInteger); } diff --git a/crates/icrate/src/generated/AppKit/NSTreeController.rs b/crates/icrate/src/generated/AppKit/NSTreeController.rs index 4bc0c693f..d20acae2f 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeController.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeController.rs @@ -1,126 +1,175 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTreeController; + unsafe impl ClassType for NSTreeController { type Super = NSObjectController; } ); + extern_methods!( unsafe impl NSTreeController { #[method(rearrangeObjects)] pub unsafe fn rearrangeObjects(&self); + #[method_id(arrangedObjects)] pub unsafe fn arrangedObjects(&self) -> Id; + #[method_id(childrenKeyPath)] pub unsafe fn childrenKeyPath(&self) -> Option>; + #[method(setChildrenKeyPath:)] pub unsafe fn setChildrenKeyPath(&self, childrenKeyPath: Option<&NSString>); + #[method_id(countKeyPath)] pub unsafe fn countKeyPath(&self) -> Option>; + #[method(setCountKeyPath:)] pub unsafe fn setCountKeyPath(&self, countKeyPath: Option<&NSString>); + #[method_id(leafKeyPath)] pub unsafe fn leafKeyPath(&self) -> Option>; + #[method(setLeafKeyPath:)] pub unsafe fn setLeafKeyPath(&self, leafKeyPath: Option<&NSString>); + #[method_id(sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id, Shared>; + #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); + #[method_id(content)] pub unsafe fn content(&self) -> Option>; + #[method(setContent:)] pub unsafe fn setContent(&self, content: Option<&Object>); + #[method(add:)] pub unsafe fn add(&self, sender: Option<&Object>); + #[method(remove:)] pub unsafe fn remove(&self, sender: Option<&Object>); + #[method(addChild:)] pub unsafe fn addChild(&self, sender: Option<&Object>); + #[method(insert:)] pub unsafe fn insert(&self, sender: Option<&Object>); + #[method(insertChild:)] pub unsafe fn insertChild(&self, sender: Option<&Object>); + #[method(canInsert)] pub unsafe fn canInsert(&self) -> bool; + #[method(canInsertChild)] pub unsafe fn canInsertChild(&self) -> bool; + #[method(canAddChild)] pub unsafe fn canAddChild(&self) -> bool; + #[method(insertObject:atArrangedObjectIndexPath:)] pub unsafe fn insertObject_atArrangedObjectIndexPath( &self, object: Option<&Object>, indexPath: &NSIndexPath, ); + #[method(insertObjects:atArrangedObjectIndexPaths:)] pub unsafe fn insertObjects_atArrangedObjectIndexPaths( &self, objects: &NSArray, indexPaths: &NSArray, ); + #[method(removeObjectAtArrangedObjectIndexPath:)] pub unsafe fn removeObjectAtArrangedObjectIndexPath(&self, indexPath: &NSIndexPath); + #[method(removeObjectsAtArrangedObjectIndexPaths:)] pub unsafe fn removeObjectsAtArrangedObjectIndexPaths( &self, indexPaths: &NSArray, ); + #[method(avoidsEmptySelection)] pub unsafe fn avoidsEmptySelection(&self) -> bool; + #[method(setAvoidsEmptySelection:)] pub unsafe fn setAvoidsEmptySelection(&self, avoidsEmptySelection: bool); + #[method(preservesSelection)] pub unsafe fn preservesSelection(&self) -> bool; + #[method(setPreservesSelection:)] pub unsafe fn setPreservesSelection(&self, preservesSelection: bool); + #[method(selectsInsertedObjects)] pub unsafe fn selectsInsertedObjects(&self) -> bool; + #[method(setSelectsInsertedObjects:)] pub unsafe fn setSelectsInsertedObjects(&self, selectsInsertedObjects: bool); + #[method(alwaysUsesMultipleValuesMarker)] pub unsafe fn alwaysUsesMultipleValuesMarker(&self) -> bool; + #[method(setAlwaysUsesMultipleValuesMarker:)] pub unsafe fn setAlwaysUsesMultipleValuesMarker( &self, alwaysUsesMultipleValuesMarker: bool, ); + #[method_id(selectedObjects)] pub unsafe fn selectedObjects(&self) -> Id; + #[method(setSelectionIndexPaths:)] pub unsafe fn setSelectionIndexPaths(&self, indexPaths: &NSArray) -> bool; + #[method_id(selectionIndexPaths)] pub unsafe fn selectionIndexPaths(&self) -> Id, Shared>; + #[method(setSelectionIndexPath:)] pub unsafe fn setSelectionIndexPath(&self, indexPath: Option<&NSIndexPath>) -> bool; + #[method_id(selectionIndexPath)] pub unsafe fn selectionIndexPath(&self) -> Option>; + #[method(addSelectionIndexPaths:)] pub unsafe fn addSelectionIndexPaths(&self, indexPaths: &NSArray) -> bool; + #[method(removeSelectionIndexPaths:)] pub unsafe fn removeSelectionIndexPaths(&self, indexPaths: &NSArray) -> bool; + #[method_id(selectedNodes)] pub unsafe fn selectedNodes(&self) -> Id, Shared>; + #[method(moveNode:toIndexPath:)] pub unsafe fn moveNode_toIndexPath(&self, node: &NSTreeNode, indexPath: &NSIndexPath); + #[method(moveNodes:toIndexPath:)] pub unsafe fn moveNodes_toIndexPath( &self, nodes: &NSArray, startingIndexPath: &NSIndexPath, ); + #[method_id(childrenKeyPathForNode:)] pub unsafe fn childrenKeyPathForNode( &self, node: &NSTreeNode, ) -> Option>; + #[method_id(countKeyPathForNode:)] pub unsafe fn countKeyPathForNode(&self, node: &NSTreeNode) -> Option>; + #[method_id(leafKeyPathForNode:)] pub unsafe fn leafKeyPathForNode(&self, node: &NSTreeNode) -> Option>; } diff --git a/crates/icrate/src/generated/AppKit/NSTreeNode.rs b/crates/icrate/src/generated/AppKit/NSTreeNode.rs index 056837ca0..a2d5da0e7 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeNode.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeNode.rs @@ -1,42 +1,56 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTreeNode; + unsafe impl ClassType for NSTreeNode { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTreeNode { #[method_id(treeNodeWithRepresentedObject:)] pub unsafe fn treeNodeWithRepresentedObject( modelObject: Option<&Object>, ) -> Id; + #[method_id(initWithRepresentedObject:)] pub unsafe fn initWithRepresentedObject( &self, modelObject: Option<&Object>, ) -> Id; + #[method_id(representedObject)] pub unsafe fn representedObject(&self) -> Option>; + #[method_id(indexPath)] pub unsafe fn indexPath(&self) -> Id; + #[method(isLeaf)] pub unsafe fn isLeaf(&self) -> bool; + #[method_id(childNodes)] pub unsafe fn childNodes(&self) -> Option, Shared>>; + #[method_id(mutableChildNodes)] pub unsafe fn mutableChildNodes(&self) -> Id, Shared>; + #[method_id(descendantNodeAtIndexPath:)] pub unsafe fn descendantNodeAtIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; + #[method_id(parentNode)] pub unsafe fn parentNode(&self) -> Option>; + #[method(sortWithSortDescriptors:recursively:)] pub unsafe fn sortWithSortDescriptors_recursively( &self, diff --git a/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs index 20e41a93a..7032de278 100644 --- a/crates/icrate/src/generated/AppKit/NSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSTypesetter.rs @@ -1,34 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTypesetter; + unsafe impl ClassType for NSTypesetter { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTypesetter { #[method(usesFontLeading)] pub unsafe fn usesFontLeading(&self) -> bool; + #[method(setUsesFontLeading:)] pub unsafe fn setUsesFontLeading(&self, usesFontLeading: bool); + #[method(typesetterBehavior)] pub unsafe fn typesetterBehavior(&self) -> NSTypesetterBehavior; + #[method(setTypesetterBehavior:)] pub unsafe fn setTypesetterBehavior(&self, typesetterBehavior: NSTypesetterBehavior); + #[method(hyphenationFactor)] pub unsafe fn hyphenationFactor(&self) -> c_float; + #[method(setHyphenationFactor:)] pub unsafe fn setHyphenationFactor(&self, hyphenationFactor: c_float); + #[method(lineFragmentPadding)] pub unsafe fn lineFragmentPadding(&self) -> CGFloat; + #[method(setLineFragmentPadding:)] pub unsafe fn setLineFragmentPadding(&self, lineFragmentPadding: CGFloat); + #[method_id(substituteFontForFont:)] pub unsafe fn substituteFontForFont(&self, originalFont: &NSFont) -> Id; + #[method_id(textTabForGlyphLocation:writingDirection:maxLocation:)] pub unsafe fn textTabForGlyphLocation_writingDirection_maxLocation( &self, @@ -36,59 +50,77 @@ extern_methods!( direction: NSWritingDirection, maxLocation: CGFloat, ) -> Option>; + #[method(bidiProcessingEnabled)] pub unsafe fn bidiProcessingEnabled(&self) -> bool; + #[method(setBidiProcessingEnabled:)] pub unsafe fn setBidiProcessingEnabled(&self, bidiProcessingEnabled: bool); + #[method_id(attributedString)] pub unsafe fn attributedString(&self) -> Option>; + #[method(setAttributedString:)] pub unsafe fn setAttributedString(&self, attributedString: Option<&NSAttributedString>); + #[method(setParagraphGlyphRange:separatorGlyphRange:)] pub unsafe fn setParagraphGlyphRange_separatorGlyphRange( &self, paragraphRange: NSRange, paragraphSeparatorRange: NSRange, ); + #[method(paragraphGlyphRange)] pub unsafe fn paragraphGlyphRange(&self) -> NSRange; + #[method(paragraphSeparatorGlyphRange)] pub unsafe fn paragraphSeparatorGlyphRange(&self) -> NSRange; + #[method(paragraphCharacterRange)] pub unsafe fn paragraphCharacterRange(&self) -> NSRange; + #[method(paragraphSeparatorCharacterRange)] pub unsafe fn paragraphSeparatorCharacterRange(&self) -> NSRange; + #[method(layoutParagraphAtPoint:)] pub unsafe fn layoutParagraphAtPoint( &self, lineFragmentOrigin: NSPointPointer, ) -> NSUInteger; + #[method(beginParagraph)] pub unsafe fn beginParagraph(&self); + #[method(endParagraph)] pub unsafe fn endParagraph(&self); + #[method(beginLineWithGlyphAtIndex:)] pub unsafe fn beginLineWithGlyphAtIndex(&self, glyphIndex: NSUInteger); + #[method(endLineWithGlyphRange:)] pub unsafe fn endLineWithGlyphRange(&self, lineGlyphRange: NSRange); + #[method(lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] pub unsafe fn lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, glyphIndex: NSUInteger, rect: NSRect, ) -> CGFloat; + #[method(paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:)] pub unsafe fn paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect( &self, glyphIndex: NSUInteger, rect: NSRect, ) -> CGFloat; + #[method(paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] pub unsafe fn paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( &self, glyphIndex: NSUInteger, rect: NSRect, ) -> CGFloat; + #[method(getLineFragmentRect:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:)] pub unsafe fn getLineFragmentRect_usedRect_forParagraphSeparatorGlyphRange_atProposedOrigin( &self, @@ -97,20 +129,27 @@ extern_methods!( paragraphSeparatorGlyphRange: NSRange, lineOrigin: NSPoint, ); + #[method_id(attributesForExtraLineFragment)] pub unsafe fn attributesForExtraLineFragment( &self, ) -> Id, Shared>; + #[method_id(layoutManager)] pub unsafe fn layoutManager(&self) -> Option>; + #[method_id(textContainers)] pub unsafe fn textContainers(&self) -> Option, Shared>>; + #[method_id(currentTextContainer)] pub unsafe fn currentTextContainer(&self) -> Option>; + #[method_id(currentParagraphStyle)] pub unsafe fn currentParagraphStyle(&self) -> Option>; + #[method(setHardInvalidation:forGlyphRange:)] pub unsafe fn setHardInvalidation_forGlyphRange(&self, flag: bool, glyphRange: NSRange); + #[method(layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:nextGlyphIndex:)] pub unsafe fn layoutGlyphsInLayoutManager_startingAtGlyphIndex_maxNumberOfLineFragments_nextGlyphIndex( &self, @@ -119,6 +158,7 @@ extern_methods!( maxNumLines: NSUInteger, nextGlyph: NonNull, ); + #[method(layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:)] pub unsafe fn layoutCharactersInRange_forLayoutManager_maximumNumberOfLineFragments( &self, @@ -126,6 +166,7 @@ extern_methods!( layoutManager: &NSLayoutManager, maxNumLines: NSUInteger, ) -> NSRange; + #[method(printingAdjustmentInLayoutManager:forNominallySpacedGlyphRange:packedGlyphs:count:)] pub unsafe fn printingAdjustmentInLayoutManager_forNominallySpacedGlyphRange_packedGlyphs_count( layoutMgr: &NSLayoutManager, @@ -133,24 +174,29 @@ extern_methods!( packedGlyphs: NonNull, packedGlyphsCount: NSUInteger, ) -> NSSize; + #[method(baselineOffsetInLayoutManager:glyphIndex:)] pub unsafe fn baselineOffsetInLayoutManager_glyphIndex( &self, layoutMgr: &NSLayoutManager, glyphIndex: NSUInteger, ) -> CGFloat; + #[method_id(sharedSystemTypesetter)] pub unsafe fn sharedSystemTypesetter() -> Id; + #[method_id(sharedSystemTypesetterForBehavior:)] pub unsafe fn sharedSystemTypesetterForBehavior( behavior: NSTypesetterBehavior, ) -> Id; + #[method(defaultTypesetterBehavior)] pub unsafe fn defaultTypesetterBehavior() -> NSTypesetterBehavior; } ); + extern_methods!( - #[doc = "NSLayoutPhaseInterface"] + /// NSLayoutPhaseInterface unsafe impl NSTypesetter { #[method(willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:)] pub unsafe fn willSetLineFragmentRect_forGlyphRange_usedRect_baselineOffset( @@ -160,20 +206,25 @@ extern_methods!( usedRect: NSRectPointer, baselineOffset: NonNull, ); + #[method(shouldBreakLineByWordBeforeCharacterAtIndex:)] pub unsafe fn shouldBreakLineByWordBeforeCharacterAtIndex( &self, charIndex: NSUInteger, ) -> bool; + #[method(shouldBreakLineByHyphenatingBeforeCharacterAtIndex:)] pub unsafe fn shouldBreakLineByHyphenatingBeforeCharacterAtIndex( &self, charIndex: NSUInteger, ) -> bool; + #[method(hyphenationFactorForGlyphAtIndex:)] pub unsafe fn hyphenationFactorForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> c_float; + #[method(hyphenCharacterForGlyphAtIndex:)] pub unsafe fn hyphenCharacterForGlyphAtIndex(&self, glyphIndex: NSUInteger) -> UTF32Char; + #[method(boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:)] pub unsafe fn boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex( &self, @@ -185,8 +236,9 @@ extern_methods!( ) -> NSRect; } ); + extern_methods!( - #[doc = "NSGlyphStorageInterface"] + /// NSGlyphStorageInterface unsafe impl NSTypesetter { #[method(characterRangeForGlyphRange:actualGlyphRange:)] pub unsafe fn characterRangeForGlyphRange_actualGlyphRange( @@ -194,12 +246,14 @@ extern_methods!( glyphRange: NSRange, actualGlyphRange: NSRangePointer, ) -> NSRange; + #[method(glyphRangeForCharacterRange:actualCharacterRange:)] pub unsafe fn glyphRangeForCharacterRange_actualCharacterRange( &self, charRange: NSRange, actualCharRange: NSRangePointer, ) -> NSRange; + #[method(getLineFragmentRect:usedRect:remainingRect:forStartingGlyphAtIndex:proposedRect:lineSpacing:paragraphSpacingBefore:paragraphSpacingAfter:)] pub unsafe fn getLineFragmentRect_usedRect_remainingRect_forStartingGlyphAtIndex_proposedRect_lineSpacing_paragraphSpacingBefore_paragraphSpacingAfter( &self, @@ -212,6 +266,7 @@ extern_methods!( paragraphSpacingBefore: CGFloat, paragraphSpacingAfter: CGFloat, ); + #[method(setLineFragmentRect:forGlyphRange:usedRect:baselineOffset:)] pub unsafe fn setLineFragmentRect_forGlyphRange_usedRect_baselineOffset( &self, @@ -220,14 +275,17 @@ extern_methods!( usedRect: NSRect, baselineOffset: CGFloat, ); + #[method(setNotShownAttribute:forGlyphRange:)] pub unsafe fn setNotShownAttribute_forGlyphRange(&self, flag: bool, glyphRange: NSRange); + #[method(setDrawsOutsideLineFragment:forGlyphRange:)] pub unsafe fn setDrawsOutsideLineFragment_forGlyphRange( &self, flag: bool, glyphRange: NSRange, ); + #[method(setLocation:withAdvancements:forStartOfGlyphRange:)] pub unsafe fn setLocation_withAdvancements_forStartOfGlyphRange( &self, @@ -235,24 +293,28 @@ extern_methods!( advancements: *mut CGFloat, glyphRange: NSRange, ); + #[method(setAttachmentSize:forGlyphRange:)] pub unsafe fn setAttachmentSize_forGlyphRange( &self, attachmentSize: NSSize, glyphRange: NSRange, ); + #[method(setBidiLevels:forGlyphRange:)] pub unsafe fn setBidiLevels_forGlyphRange(&self, levels: *mut u8, glyphRange: NSRange); } ); + extern_methods!( - #[doc = "NSTypesetter_Deprecated"] + /// NSTypesetter_Deprecated unsafe impl NSTypesetter { #[method(actionForControlCharacterAtIndex:)] pub unsafe fn actionForControlCharacterAtIndex( &self, charIndex: NSUInteger, ) -> NSTypesetterControlCharacterAction; + #[method(getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)] pub unsafe fn getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels( &self, @@ -263,12 +325,14 @@ extern_methods!( elasticBuffer: *mut bool, bidiLevelBuffer: *mut c_uchar, ) -> NSUInteger; + #[method(substituteGlyphsInRange:withGlyphs:)] pub unsafe fn substituteGlyphsInRange_withGlyphs( &self, glyphRange: NSRange, glyphs: *mut NSGlyph, ); + #[method(insertGlyph:atGlyphIndex:characterIndex:)] pub unsafe fn insertGlyph_atGlyphIndex_characterIndex( &self, @@ -276,6 +340,7 @@ extern_methods!( glyphIndex: NSUInteger, characterIndex: NSUInteger, ); + #[method(deleteGlyphsInRange:)] pub unsafe fn deleteGlyphsInRange(&self, glyphRange: NSRange); } diff --git a/crates/icrate/src/generated/AppKit/NSUserActivity.rs b/crates/icrate/src/generated/AppKit/NSUserActivity.rs index 9c7818240..33806a731 100644 --- a/crates/icrate/src/generated/AppKit/NSUserActivity.rs +++ b/crates/icrate/src/generated/AppKit/NSUserActivity.rs @@ -1,26 +1,35 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSUserActivityRestoring = NSObject; + extern_methods!( - #[doc = "NSUserActivity"] + /// NSUserActivity unsafe impl NSResponder { #[method_id(userActivity)] pub unsafe fn userActivity(&self) -> Option>; + #[method(setUserActivity:)] pub unsafe fn setUserActivity(&self, userActivity: Option<&NSUserActivity>); + #[method(updateUserActivityState:)] pub unsafe fn updateUserActivityState(&self, userActivity: &NSUserActivity); } ); + extern_methods!( - #[doc = "NSUserActivity"] + /// NSUserActivity unsafe impl NSDocument { #[method_id(userActivity)] pub unsafe fn userActivity(&self) -> Option>; + #[method(setUserActivity:)] pub unsafe fn setUserActivity(&self, userActivity: Option<&NSUserActivity>); + #[method(updateUserActivityState:)] pub unsafe fn updateUserActivityState(&self, activity: &NSUserActivity); } diff --git a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs index 6100b2d45..833634e07 100644 --- a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs +++ b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs @@ -1,47 +1,64 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSUserDefaultsController; + unsafe impl ClassType for NSUserDefaultsController { type Super = NSController; } ); + extern_methods!( unsafe impl NSUserDefaultsController { #[method_id(sharedUserDefaultsController)] pub unsafe fn sharedUserDefaultsController() -> Id; + #[method_id(initWithDefaults:initialValues:)] pub unsafe fn initWithDefaults_initialValues( &self, defaults: Option<&NSUserDefaults>, initialValues: Option<&NSDictionary>, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(defaults)] pub unsafe fn defaults(&self) -> Id; + #[method_id(initialValues)] pub unsafe fn initialValues(&self) -> Option, Shared>>; + #[method(setInitialValues:)] pub unsafe fn setInitialValues( &self, initialValues: Option<&NSDictionary>, ); + #[method(appliesImmediately)] pub unsafe fn appliesImmediately(&self) -> bool; + #[method(setAppliesImmediately:)] pub unsafe fn setAppliesImmediately(&self, appliesImmediately: bool); + #[method(hasUnappliedChanges)] pub unsafe fn hasUnappliedChanges(&self) -> bool; + #[method_id(values)] pub unsafe fn values(&self) -> Id; + #[method(revert:)] pub unsafe fn revert(&self, sender: Option<&Object>); + #[method(save:)] pub unsafe fn save(&self, sender: Option<&Object>); + #[method(revertToInitialValues:)] pub unsafe fn revertToInitialValues(&self, sender: Option<&Object>); } diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs index 04a45378a..aaae6a7df 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs @@ -1,54 +1,73 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSUserInterfaceCompressionOptions; + unsafe impl ClassType for NSUserInterfaceCompressionOptions { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUserInterfaceCompressionOptions { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initWithIdentifier:)] pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id; + #[method_id(initWithCompressionOptions:)] pub unsafe fn initWithCompressionOptions( &self, options: &NSSet, ) -> Id; + #[method(containsOptions:)] pub unsafe fn containsOptions(&self, options: &NSUserInterfaceCompressionOptions) -> bool; + #[method(intersectsOptions:)] pub unsafe fn intersectsOptions(&self, options: &NSUserInterfaceCompressionOptions) -> bool; + #[method(isEmpty)] pub unsafe fn isEmpty(&self) -> bool; + #[method_id(optionsByAddingOptions:)] pub unsafe fn optionsByAddingOptions( &self, options: &NSUserInterfaceCompressionOptions, ) -> Id; + #[method_id(optionsByRemovingOptions:)] pub unsafe fn optionsByRemovingOptions( &self, options: &NSUserInterfaceCompressionOptions, ) -> Id; + #[method_id(hideImagesOption)] pub unsafe fn hideImagesOption() -> Id; + #[method_id(hideTextOption)] pub unsafe fn hideTextOption() -> Id; + #[method_id(reduceMetricsOption)] pub unsafe fn reduceMetricsOption() -> Id; + #[method_id(breakEqualWidthsOption)] pub unsafe fn breakEqualWidthsOption() -> Id; + #[method_id(standardOptions)] pub unsafe fn standardOptions() -> Id; } ); + pub type NSUserInterfaceCompression = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs index e44a5d89e..bb6f99151 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs @@ -1,6 +1,10 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSUserInterfaceItemIdentifier = NSString; + pub type NSUserInterfaceItemIdentification = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs index 9f2f8a97c..b00dd80d7 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs @@ -1,21 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSUserInterfaceItemSearching = NSObject; + extern_methods!( - #[doc = "NSUserInterfaceItemSearching"] + /// NSUserInterfaceItemSearching unsafe impl NSApplication { #[method(registerUserInterfaceItemSearchHandler:)] pub unsafe fn registerUserInterfaceItemSearchHandler( &self, handler: &NSUserInterfaceItemSearching, ); + #[method(unregisterUserInterfaceItemSearchHandler:)] pub unsafe fn unregisterUserInterfaceItemSearchHandler( &self, handler: &NSUserInterfaceItemSearching, ); + #[method(searchString:inUserInterfaceItemString:searchRange:foundRange:)] pub unsafe fn searchString_inUserInterfaceItemString_searchRange_foundRange( &self, diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs index 62a170520..f84e1d7ae 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs @@ -1,6 +1,10 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSValidatedUserInterfaceItem = NSObject; + pub type NSUserInterfaceValidations = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 94ae9586f..5eb2237e1 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -1,58 +1,83 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTrackingRectTag = NSInteger; + pub type NSToolTipTag = NSInteger; + extern_class!( #[derive(Debug)] pub struct NSView; + unsafe impl ClassType for NSView { type Super = NSResponder; } ); + extern_methods!( unsafe impl NSView { #[method_id(initWithFrame:)] pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(window)] pub unsafe fn window(&self) -> Option>; + #[method_id(superview)] pub unsafe fn superview(&self) -> Option>; + #[method_id(subviews)] pub unsafe fn subviews(&self) -> Id, Shared>; + #[method(setSubviews:)] pub unsafe fn setSubviews(&self, subviews: &NSArray); + #[method(isDescendantOf:)] pub unsafe fn isDescendantOf(&self, view: &NSView) -> bool; + #[method_id(ancestorSharedWithView:)] pub unsafe fn ancestorSharedWithView(&self, view: &NSView) -> Option>; + #[method_id(opaqueAncestor)] pub unsafe fn opaqueAncestor(&self) -> Option>; + #[method(isHidden)] pub unsafe fn isHidden(&self) -> bool; + #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); + #[method(isHiddenOrHasHiddenAncestor)] pub unsafe fn isHiddenOrHasHiddenAncestor(&self) -> bool; + #[method(getRectsBeingDrawn:count:)] pub unsafe fn getRectsBeingDrawn_count( &self, rects: *mut *mut NSRect, count: *mut NSInteger, ); + #[method(needsToDrawRect:)] pub unsafe fn needsToDrawRect(&self, rect: NSRect) -> bool; + #[method(wantsDefaultClipping)] pub unsafe fn wantsDefaultClipping(&self) -> bool; + #[method(viewDidHide)] pub unsafe fn viewDidHide(&self); + #[method(viewDidUnhide)] pub unsafe fn viewDidUnhide(&self); + #[method(addSubview:)] pub unsafe fn addSubview(&self, view: &NSView); + #[method(addSubview:positioned:relativeTo:)] pub unsafe fn addSubview_positioned_relativeTo( &self, @@ -60,246 +85,354 @@ extern_methods!( place: NSWindowOrderingMode, otherView: Option<&NSView>, ); + #[method(sortSubviewsUsingFunction:context:)] pub unsafe fn sortSubviewsUsingFunction_context( &self, compare: NonNull, context: *mut c_void, ); + #[method(viewWillMoveToWindow:)] pub unsafe fn viewWillMoveToWindow(&self, newWindow: Option<&NSWindow>); + #[method(viewDidMoveToWindow)] pub unsafe fn viewDidMoveToWindow(&self); + #[method(viewWillMoveToSuperview:)] pub unsafe fn viewWillMoveToSuperview(&self, newSuperview: Option<&NSView>); + #[method(viewDidMoveToSuperview)] pub unsafe fn viewDidMoveToSuperview(&self); + #[method(didAddSubview:)] pub unsafe fn didAddSubview(&self, subview: &NSView); + #[method(willRemoveSubview:)] pub unsafe fn willRemoveSubview(&self, subview: &NSView); + #[method(removeFromSuperview)] pub unsafe fn removeFromSuperview(&self); + #[method(replaceSubview:with:)] pub unsafe fn replaceSubview_with(&self, oldView: &NSView, newView: &NSView); + #[method(removeFromSuperviewWithoutNeedingDisplay)] pub unsafe fn removeFromSuperviewWithoutNeedingDisplay(&self); + #[method(viewDidChangeBackingProperties)] pub unsafe fn viewDidChangeBackingProperties(&self); + #[method(postsFrameChangedNotifications)] pub unsafe fn postsFrameChangedNotifications(&self) -> bool; + #[method(setPostsFrameChangedNotifications:)] pub unsafe fn setPostsFrameChangedNotifications( &self, postsFrameChangedNotifications: bool, ); + #[method(resizeSubviewsWithOldSize:)] pub unsafe fn resizeSubviewsWithOldSize(&self, oldSize: NSSize); + #[method(resizeWithOldSuperviewSize:)] pub unsafe fn resizeWithOldSuperviewSize(&self, oldSize: NSSize); + #[method(autoresizesSubviews)] pub unsafe fn autoresizesSubviews(&self) -> bool; + #[method(setAutoresizesSubviews:)] pub unsafe fn setAutoresizesSubviews(&self, autoresizesSubviews: bool); + #[method(autoresizingMask)] pub unsafe fn autoresizingMask(&self) -> NSAutoresizingMaskOptions; + #[method(setAutoresizingMask:)] pub unsafe fn setAutoresizingMask(&self, autoresizingMask: NSAutoresizingMaskOptions); + #[method(setFrameOrigin:)] pub unsafe fn setFrameOrigin(&self, newOrigin: NSPoint); + #[method(setFrameSize:)] pub unsafe fn setFrameSize(&self, newSize: NSSize); + #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[method(setFrame:)] pub unsafe fn setFrame(&self, frame: NSRect); + #[method(frameRotation)] pub unsafe fn frameRotation(&self) -> CGFloat; + #[method(setFrameRotation:)] pub unsafe fn setFrameRotation(&self, frameRotation: CGFloat); + #[method(frameCenterRotation)] pub unsafe fn frameCenterRotation(&self) -> CGFloat; + #[method(setFrameCenterRotation:)] pub unsafe fn setFrameCenterRotation(&self, frameCenterRotation: CGFloat); + #[method(setBoundsOrigin:)] pub unsafe fn setBoundsOrigin(&self, newOrigin: NSPoint); + #[method(setBoundsSize:)] pub unsafe fn setBoundsSize(&self, newSize: NSSize); + #[method(boundsRotation)] pub unsafe fn boundsRotation(&self) -> CGFloat; + #[method(setBoundsRotation:)] pub unsafe fn setBoundsRotation(&self, boundsRotation: CGFloat); + #[method(translateOriginToPoint:)] pub unsafe fn translateOriginToPoint(&self, translation: NSPoint); + #[method(scaleUnitSquareToSize:)] pub unsafe fn scaleUnitSquareToSize(&self, newUnitSize: NSSize); + #[method(rotateByAngle:)] pub unsafe fn rotateByAngle(&self, angle: CGFloat); + #[method(bounds)] pub unsafe fn bounds(&self) -> NSRect; + #[method(setBounds:)] pub unsafe fn setBounds(&self, bounds: NSRect); + #[method(isFlipped)] pub unsafe fn isFlipped(&self) -> bool; + #[method(isRotatedFromBase)] pub unsafe fn isRotatedFromBase(&self) -> bool; + #[method(isRotatedOrScaledFromBase)] pub unsafe fn isRotatedOrScaledFromBase(&self) -> bool; + #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[method(convertPoint:fromView:)] pub unsafe fn convertPoint_fromView( &self, point: NSPoint, view: Option<&NSView>, ) -> NSPoint; + #[method(convertPoint:toView:)] pub unsafe fn convertPoint_toView(&self, point: NSPoint, view: Option<&NSView>) -> NSPoint; + #[method(convertSize:fromView:)] pub unsafe fn convertSize_fromView(&self, size: NSSize, view: Option<&NSView>) -> NSSize; + #[method(convertSize:toView:)] pub unsafe fn convertSize_toView(&self, size: NSSize, view: Option<&NSView>) -> NSSize; + #[method(convertRect:fromView:)] pub unsafe fn convertRect_fromView(&self, rect: NSRect, view: Option<&NSView>) -> NSRect; + #[method(convertRect:toView:)] pub unsafe fn convertRect_toView(&self, rect: NSRect, view: Option<&NSView>) -> NSRect; + #[method(backingAlignedRect:options:)] pub unsafe fn backingAlignedRect_options( &self, rect: NSRect, options: NSAlignmentOptions, ) -> NSRect; + #[method(centerScanRect:)] pub unsafe fn centerScanRect(&self, rect: NSRect) -> NSRect; + #[method(convertPointToBacking:)] pub unsafe fn convertPointToBacking(&self, point: NSPoint) -> NSPoint; + #[method(convertPointFromBacking:)] pub unsafe fn convertPointFromBacking(&self, point: NSPoint) -> NSPoint; + #[method(convertSizeToBacking:)] pub unsafe fn convertSizeToBacking(&self, size: NSSize) -> NSSize; + #[method(convertSizeFromBacking:)] pub unsafe fn convertSizeFromBacking(&self, size: NSSize) -> NSSize; + #[method(convertRectToBacking:)] pub unsafe fn convertRectToBacking(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromBacking:)] pub unsafe fn convertRectFromBacking(&self, rect: NSRect) -> NSRect; + #[method(convertPointToLayer:)] pub unsafe fn convertPointToLayer(&self, point: NSPoint) -> NSPoint; + #[method(convertPointFromLayer:)] pub unsafe fn convertPointFromLayer(&self, point: NSPoint) -> NSPoint; + #[method(convertSizeToLayer:)] pub unsafe fn convertSizeToLayer(&self, size: NSSize) -> NSSize; + #[method(convertSizeFromLayer:)] pub unsafe fn convertSizeFromLayer(&self, size: NSSize) -> NSSize; + #[method(convertRectToLayer:)] pub unsafe fn convertRectToLayer(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromLayer:)] pub unsafe fn convertRectFromLayer(&self, rect: NSRect) -> NSRect; + #[method(canDrawConcurrently)] pub unsafe fn canDrawConcurrently(&self) -> bool; + #[method(setCanDrawConcurrently:)] pub unsafe fn setCanDrawConcurrently(&self, canDrawConcurrently: bool); + #[method(canDraw)] pub unsafe fn canDraw(&self) -> bool; + #[method(setNeedsDisplayInRect:)] pub unsafe fn setNeedsDisplayInRect(&self, invalidRect: NSRect); + #[method(needsDisplay)] pub unsafe fn needsDisplay(&self) -> bool; + #[method(setNeedsDisplay:)] pub unsafe fn setNeedsDisplay(&self, needsDisplay: bool); + #[method(lockFocus)] pub unsafe fn lockFocus(&self); + #[method(unlockFocus)] pub unsafe fn unlockFocus(&self); + #[method(lockFocusIfCanDraw)] pub unsafe fn lockFocusIfCanDraw(&self) -> bool; + #[method(lockFocusIfCanDrawInContext:)] pub unsafe fn lockFocusIfCanDrawInContext(&self, context: &NSGraphicsContext) -> bool; + #[method_id(focusView)] pub unsafe fn focusView() -> Option>; + #[method(visibleRect)] pub unsafe fn visibleRect(&self) -> NSRect; + #[method(display)] pub unsafe fn display(&self); + #[method(displayIfNeeded)] pub unsafe fn displayIfNeeded(&self); + #[method(displayIfNeededIgnoringOpacity)] pub unsafe fn displayIfNeededIgnoringOpacity(&self); + #[method(displayRect:)] pub unsafe fn displayRect(&self, rect: NSRect); + #[method(displayIfNeededInRect:)] pub unsafe fn displayIfNeededInRect(&self, rect: NSRect); + #[method(displayRectIgnoringOpacity:)] pub unsafe fn displayRectIgnoringOpacity(&self, rect: NSRect); + #[method(displayIfNeededInRectIgnoringOpacity:)] pub unsafe fn displayIfNeededInRectIgnoringOpacity(&self, rect: NSRect); + #[method(drawRect:)] pub unsafe fn drawRect(&self, dirtyRect: NSRect); + #[method(displayRectIgnoringOpacity:inContext:)] pub unsafe fn displayRectIgnoringOpacity_inContext( &self, rect: NSRect, context: &NSGraphicsContext, ); + #[method_id(bitmapImageRepForCachingDisplayInRect:)] pub unsafe fn bitmapImageRepForCachingDisplayInRect( &self, rect: NSRect, ) -> Option>; + #[method(cacheDisplayInRect:toBitmapImageRep:)] pub unsafe fn cacheDisplayInRect_toBitmapImageRep( &self, rect: NSRect, bitmapImageRep: &NSBitmapImageRep, ); + #[method(viewWillDraw)] pub unsafe fn viewWillDraw(&self); + #[method(scrollPoint:)] pub unsafe fn scrollPoint(&self, point: NSPoint); + #[method(scrollRectToVisible:)] pub unsafe fn scrollRectToVisible(&self, rect: NSRect) -> bool; + #[method(autoscroll:)] pub unsafe fn autoscroll(&self, event: &NSEvent) -> bool; + #[method(adjustScroll:)] pub unsafe fn adjustScroll(&self, newVisible: NSRect) -> NSRect; + #[method(scrollRect:by:)] pub unsafe fn scrollRect_by(&self, rect: NSRect, delta: NSSize); + #[method(translateRectsNeedingDisplayInRect:by:)] pub unsafe fn translateRectsNeedingDisplayInRect_by(&self, clipRect: NSRect, delta: NSSize); + #[method_id(hitTest:)] pub unsafe fn hitTest(&self, point: NSPoint) -> Option>; + #[method(mouse:inRect:)] pub unsafe fn mouse_inRect(&self, point: NSPoint, rect: NSRect) -> bool; + #[method_id(viewWithTag:)] pub unsafe fn viewWithTag(&self, tag: NSInteger) -> Option>; + #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; + #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; + #[method(acceptsFirstMouse:)] pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool; + #[method(shouldDelayWindowOrderingForEvent:)] pub unsafe fn shouldDelayWindowOrderingForEvent(&self, event: &NSEvent) -> bool; + #[method(needsPanelToBecomeKey)] pub unsafe fn needsPanelToBecomeKey(&self) -> bool; + #[method(mouseDownCanMoveWindow)] pub unsafe fn mouseDownCanMoveWindow(&self) -> bool; + #[method(acceptsTouchEvents)] pub unsafe fn acceptsTouchEvents(&self) -> bool; + #[method(setAcceptsTouchEvents:)] pub unsafe fn setAcceptsTouchEvents(&self, acceptsTouchEvents: bool); + #[method(wantsRestingTouches)] pub unsafe fn wantsRestingTouches(&self) -> bool; + #[method(setWantsRestingTouches:)] pub unsafe fn setWantsRestingTouches(&self, wantsRestingTouches: bool); + #[method(addCursorRect:cursor:)] pub unsafe fn addCursorRect_cursor(&self, rect: NSRect, object: &NSCursor); + #[method(removeCursorRect:cursor:)] pub unsafe fn removeCursorRect_cursor(&self, rect: NSRect, object: &NSCursor); + #[method(discardCursorRects)] pub unsafe fn discardCursorRects(&self); + #[method(resetCursorRects)] pub unsafe fn resetCursorRects(&self); + #[method(addTrackingRect:owner:userData:assumeInside:)] pub unsafe fn addTrackingRect_owner_userData_assumeInside( &self, @@ -308,101 +441,145 @@ extern_methods!( data: *mut c_void, flag: bool, ) -> NSTrackingRectTag; + #[method(removeTrackingRect:)] pub unsafe fn removeTrackingRect(&self, tag: NSTrackingRectTag); + #[method_id(makeBackingLayer)] pub unsafe fn makeBackingLayer(&self) -> Id; + #[method(layerContentsRedrawPolicy)] pub unsafe fn layerContentsRedrawPolicy(&self) -> NSViewLayerContentsRedrawPolicy; + #[method(setLayerContentsRedrawPolicy:)] pub unsafe fn setLayerContentsRedrawPolicy( &self, layerContentsRedrawPolicy: NSViewLayerContentsRedrawPolicy, ); + #[method(layerContentsPlacement)] pub unsafe fn layerContentsPlacement(&self) -> NSViewLayerContentsPlacement; + #[method(setLayerContentsPlacement:)] pub unsafe fn setLayerContentsPlacement( &self, layerContentsPlacement: NSViewLayerContentsPlacement, ); + #[method(wantsLayer)] pub unsafe fn wantsLayer(&self) -> bool; + #[method(setWantsLayer:)] pub unsafe fn setWantsLayer(&self, wantsLayer: bool); + #[method_id(layer)] pub unsafe fn layer(&self) -> Option>; + #[method(setLayer:)] pub unsafe fn setLayer(&self, layer: Option<&CALayer>); + #[method(wantsUpdateLayer)] pub unsafe fn wantsUpdateLayer(&self) -> bool; + #[method(updateLayer)] pub unsafe fn updateLayer(&self); + #[method(canDrawSubviewsIntoLayer)] pub unsafe fn canDrawSubviewsIntoLayer(&self) -> bool; + #[method(setCanDrawSubviewsIntoLayer:)] pub unsafe fn setCanDrawSubviewsIntoLayer(&self, canDrawSubviewsIntoLayer: bool); + #[method(layoutSubtreeIfNeeded)] pub unsafe fn layoutSubtreeIfNeeded(&self); + #[method(layout)] pub unsafe fn layout(&self); + #[method(needsLayout)] pub unsafe fn needsLayout(&self) -> bool; + #[method(setNeedsLayout:)] pub unsafe fn setNeedsLayout(&self, needsLayout: bool); + #[method(alphaValue)] pub unsafe fn alphaValue(&self) -> CGFloat; + #[method(setAlphaValue:)] pub unsafe fn setAlphaValue(&self, alphaValue: CGFloat); + #[method(layerUsesCoreImageFilters)] pub unsafe fn layerUsesCoreImageFilters(&self) -> bool; + #[method(setLayerUsesCoreImageFilters:)] pub unsafe fn setLayerUsesCoreImageFilters(&self, layerUsesCoreImageFilters: bool); + #[method_id(backgroundFilters)] pub unsafe fn backgroundFilters(&self) -> Id, Shared>; + #[method(setBackgroundFilters:)] pub unsafe fn setBackgroundFilters(&self, backgroundFilters: &NSArray); + #[method_id(compositingFilter)] pub unsafe fn compositingFilter(&self) -> Option>; + #[method(setCompositingFilter:)] pub unsafe fn setCompositingFilter(&self, compositingFilter: Option<&CIFilter>); + #[method_id(contentFilters)] pub unsafe fn contentFilters(&self) -> Id, Shared>; + #[method(setContentFilters:)] pub unsafe fn setContentFilters(&self, contentFilters: &NSArray); + #[method_id(shadow)] pub unsafe fn shadow(&self) -> Option>; + #[method(setShadow:)] pub unsafe fn setShadow(&self, shadow: Option<&NSShadow>); + #[method(addTrackingArea:)] pub unsafe fn addTrackingArea(&self, trackingArea: &NSTrackingArea); + #[method(removeTrackingArea:)] pub unsafe fn removeTrackingArea(&self, trackingArea: &NSTrackingArea); + #[method_id(trackingAreas)] pub unsafe fn trackingAreas(&self) -> Id, Shared>; + #[method(updateTrackingAreas)] pub unsafe fn updateTrackingAreas(&self); + #[method(postsBoundsChangedNotifications)] pub unsafe fn postsBoundsChangedNotifications(&self) -> bool; + #[method(setPostsBoundsChangedNotifications:)] pub unsafe fn setPostsBoundsChangedNotifications( &self, postsBoundsChangedNotifications: bool, ); + #[method_id(enclosingScrollView)] pub unsafe fn enclosingScrollView(&self) -> Option>; + #[method_id(menuForEvent:)] pub unsafe fn menuForEvent(&self, event: &NSEvent) -> Option>; + #[method_id(defaultMenu)] pub unsafe fn defaultMenu() -> Option>; + #[method(willOpenMenu:withEvent:)] pub unsafe fn willOpenMenu_withEvent(&self, menu: &NSMenu, event: &NSEvent); + #[method(didCloseMenu:withEvent:)] pub unsafe fn didCloseMenu_withEvent(&self, menu: &NSMenu, event: Option<&NSEvent>); + #[method_id(toolTip)] pub unsafe fn toolTip(&self) -> Option>; + #[method(setToolTip:)] pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + #[method(addToolTipRect:owner:userData:)] pub unsafe fn addToolTipRect_owner_userData( &self, @@ -410,60 +587,81 @@ extern_methods!( owner: &Object, data: *mut c_void, ) -> NSToolTipTag; + #[method(removeToolTip:)] pub unsafe fn removeToolTip(&self, tag: NSToolTipTag); + #[method(removeAllToolTips)] pub unsafe fn removeAllToolTips(&self); + #[method(viewWillStartLiveResize)] pub unsafe fn viewWillStartLiveResize(&self); + #[method(viewDidEndLiveResize)] pub unsafe fn viewDidEndLiveResize(&self); + #[method(inLiveResize)] pub unsafe fn inLiveResize(&self) -> bool; + #[method(preservesContentDuringLiveResize)] pub unsafe fn preservesContentDuringLiveResize(&self) -> bool; + #[method(rectPreservedDuringLiveResize)] pub unsafe fn rectPreservedDuringLiveResize(&self) -> NSRect; + #[method(getRectsExposedDuringLiveResize:count:)] pub unsafe fn getRectsExposedDuringLiveResize_count( &self, exposedRects: [NSRect; 4], count: NonNull, ); + #[method_id(inputContext)] pub unsafe fn inputContext(&self) -> Option>; + #[method(rectForSmartMagnificationAtPoint:inRect:)] pub unsafe fn rectForSmartMagnificationAtPoint_inRect( &self, location: NSPoint, visibleRect: NSRect, ) -> NSRect; + #[method(userInterfaceLayoutDirection)] pub unsafe fn userInterfaceLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; + #[method(setUserInterfaceLayoutDirection:)] pub unsafe fn setUserInterfaceLayoutDirection( &self, userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, ); + #[method(prepareForReuse)] pub unsafe fn prepareForReuse(&self); + #[method(isCompatibleWithResponsiveScrolling)] pub unsafe fn isCompatibleWithResponsiveScrolling() -> bool; + #[method(prepareContentInRect:)] pub unsafe fn prepareContentInRect(&self, rect: NSRect); + #[method(preparedContentRect)] pub unsafe fn preparedContentRect(&self) -> NSRect; + #[method(setPreparedContentRect:)] pub unsafe fn setPreparedContentRect(&self, preparedContentRect: NSRect); + #[method(allowsVibrancy)] pub unsafe fn allowsVibrancy(&self) -> bool; + #[method(viewDidChangeEffectiveAppearance)] pub unsafe fn viewDidChangeEffectiveAppearance(&self); } ); + pub type NSViewLayerContentScaleDelegate = NSObject; + extern_methods!( - #[doc = "NSLayerDelegateContentsScaleUpdating"] + /// NSLayerDelegateContentsScaleUpdating unsafe impl NSObject { #[method(layer:shouldInheritContentsScale:fromWindow:)] pub unsafe fn layer_shouldInheritContentsScale_fromWindow( @@ -474,9 +672,11 @@ extern_methods!( ) -> bool; } ); + pub type NSViewToolTipOwner = NSObject; + extern_methods!( - #[doc = "NSToolTipOwner"] + /// NSToolTipOwner unsafe impl NSObject { #[method_id(view:stringForToolTip:point:userData:)] pub unsafe fn view_stringForToolTip_point_userData( @@ -488,39 +688,53 @@ extern_methods!( ) -> Id; } ); + extern_methods!( - #[doc = "NSKeyboardUI"] + /// NSKeyboardUI unsafe impl NSView { #[method_id(nextKeyView)] pub unsafe fn nextKeyView(&self) -> Option>; + #[method(setNextKeyView:)] pub unsafe fn setNextKeyView(&self, nextKeyView: Option<&NSView>); + #[method_id(previousKeyView)] pub unsafe fn previousKeyView(&self) -> Option>; + #[method_id(nextValidKeyView)] pub unsafe fn nextValidKeyView(&self) -> Option>; + #[method_id(previousValidKeyView)] pub unsafe fn previousValidKeyView(&self) -> Option>; + #[method(canBecomeKeyView)] pub unsafe fn canBecomeKeyView(&self) -> bool; + #[method(setKeyboardFocusRingNeedsDisplayInRect:)] pub unsafe fn setKeyboardFocusRingNeedsDisplayInRect(&self, rect: NSRect); + #[method(focusRingType)] pub unsafe fn focusRingType(&self) -> NSFocusRingType; + #[method(setFocusRingType:)] pub unsafe fn setFocusRingType(&self, focusRingType: NSFocusRingType); + #[method(defaultFocusRingType)] pub unsafe fn defaultFocusRingType() -> NSFocusRingType; + #[method(drawFocusRingMask)] pub unsafe fn drawFocusRingMask(&self); + #[method(focusRingMaskBounds)] pub unsafe fn focusRingMaskBounds(&self) -> NSRect; + #[method(noteFocusRingMaskChanged)] pub unsafe fn noteFocusRingMaskChanged(&self); } ); + extern_methods!( - #[doc = "NSPrinting"] + /// NSPrinting unsafe impl NSView { #[method(writeEPSInsideRect:toPasteboard:)] pub unsafe fn writeEPSInsideRect_toPasteboard( @@ -528,24 +742,32 @@ extern_methods!( rect: NSRect, pasteboard: &NSPasteboard, ); + #[method_id(dataWithEPSInsideRect:)] pub unsafe fn dataWithEPSInsideRect(&self, rect: NSRect) -> Id; + #[method(writePDFInsideRect:toPasteboard:)] pub unsafe fn writePDFInsideRect_toPasteboard( &self, rect: NSRect, pasteboard: &NSPasteboard, ); + #[method_id(dataWithPDFInsideRect:)] pub unsafe fn dataWithPDFInsideRect(&self, rect: NSRect) -> Id; + #[method(print:)] pub unsafe fn print(&self, sender: Option<&Object>); + #[method(knowsPageRange:)] pub unsafe fn knowsPageRange(&self, range: NSRangePointer) -> bool; + #[method(heightAdjustLimit)] pub unsafe fn heightAdjustLimit(&self) -> CGFloat; + #[method(widthAdjustLimit)] pub unsafe fn widthAdjustLimit(&self) -> CGFloat; + #[method(adjustPageWidthNew:left:right:limit:)] pub unsafe fn adjustPageWidthNew_left_right_limit( &self, @@ -554,6 +776,7 @@ extern_methods!( oldRight: CGFloat, rightLimit: CGFloat, ); + #[method(adjustPageHeightNew:top:bottom:limit:)] pub unsafe fn adjustPageHeightNew_top_bottom_limit( &self, @@ -562,32 +785,44 @@ extern_methods!( oldBottom: CGFloat, bottomLimit: CGFloat, ); + #[method(rectForPage:)] pub unsafe fn rectForPage(&self, page: NSInteger) -> NSRect; + #[method(locationOfPrintRect:)] pub unsafe fn locationOfPrintRect(&self, rect: NSRect) -> NSPoint; + #[method(drawPageBorderWithSize:)] pub unsafe fn drawPageBorderWithSize(&self, borderSize: NSSize); + #[method_id(pageHeader)] pub unsafe fn pageHeader(&self) -> Id; + #[method_id(pageFooter)] pub unsafe fn pageFooter(&self) -> Id; + #[method(drawSheetBorderWithSize:)] pub unsafe fn drawSheetBorderWithSize(&self, borderSize: NSSize); + #[method_id(printJobTitle)] pub unsafe fn printJobTitle(&self) -> Id; + #[method(beginDocument)] pub unsafe fn beginDocument(&self); + #[method(endDocument)] pub unsafe fn endDocument(&self); + #[method(beginPageInRect:atPlacement:)] pub unsafe fn beginPageInRect_atPlacement(&self, rect: NSRect, location: NSPoint); + #[method(endPage)] pub unsafe fn endPage(&self); } ); + extern_methods!( - #[doc = "NSDrag"] + /// NSDrag unsafe impl NSView { #[method_id(beginDraggingSessionWithItems:event:source:)] pub unsafe fn beginDraggingSessionWithItems_event_source( @@ -596,17 +831,22 @@ extern_methods!( event: &NSEvent, source: &NSDraggingSource, ) -> Id; + #[method_id(registeredDraggedTypes)] pub unsafe fn registeredDraggedTypes(&self) -> Id, Shared>; + #[method(registerForDraggedTypes:)] pub unsafe fn registerForDraggedTypes(&self, newTypes: &NSArray); + #[method(unregisterDraggedTypes)] pub unsafe fn unregisterDraggedTypes(&self); } ); + pub type NSViewFullScreenModeOptionKey = NSString; + extern_methods!( - #[doc = "NSFullScreenMode"] + /// NSFullScreenMode unsafe impl NSView { #[method(enterFullScreenMode:withOptions:)] pub unsafe fn enterFullScreenMode_withOptions( @@ -614,19 +854,24 @@ extern_methods!( screen: &NSScreen, options: Option<&NSDictionary>, ) -> bool; + #[method(exitFullScreenModeWithOptions:)] pub unsafe fn exitFullScreenModeWithOptions( &self, options: Option<&NSDictionary>, ); + #[method(isInFullScreenMode)] pub unsafe fn isInFullScreenMode(&self) -> bool; } ); + pub type NSDefinitionOptionKey = NSString; + pub type NSDefinitionPresentationType = NSString; + extern_methods!( - #[doc = "NSDefinition"] + /// NSDefinition unsafe impl NSView { #[method(showDefinitionForAttributedString:atPoint:)] pub unsafe fn showDefinitionForAttributedString_atPoint( @@ -634,6 +879,7 @@ extern_methods!( attrString: Option<&NSAttributedString>, textBaselineOrigin: NSPoint, ); + #[method(showDefinitionForAttributedString:range:options:baselineOriginProvider:)] pub unsafe fn showDefinitionForAttributedString_range_options_baselineOriginProvider( &self, @@ -644,57 +890,71 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSFindIndicator"] + /// NSFindIndicator unsafe impl NSView { #[method(isDrawingFindIndicator)] pub unsafe fn isDrawingFindIndicator(&self) -> bool; } ); + extern_methods!( - #[doc = "NSGestureRecognizer"] + /// NSGestureRecognizer unsafe impl NSView { #[method_id(gestureRecognizers)] pub unsafe fn gestureRecognizers(&self) -> Id, Shared>; + #[method(setGestureRecognizers:)] pub unsafe fn setGestureRecognizers( &self, gestureRecognizers: &NSArray, ); + #[method(addGestureRecognizer:)] pub unsafe fn addGestureRecognizer(&self, gestureRecognizer: &NSGestureRecognizer); + #[method(removeGestureRecognizer:)] pub unsafe fn removeGestureRecognizer(&self, gestureRecognizer: &NSGestureRecognizer); } ); + extern_methods!( - #[doc = "NSTouchBar"] + /// NSTouchBar unsafe impl NSView { #[method(allowedTouchTypes)] pub unsafe fn allowedTouchTypes(&self) -> NSTouchTypeMask; + #[method(setAllowedTouchTypes:)] pub unsafe fn setAllowedTouchTypes(&self, allowedTouchTypes: NSTouchTypeMask); } ); + extern_methods!( - #[doc = "NSSafeAreas"] + /// NSSafeAreas unsafe impl NSView { #[method(safeAreaInsets)] pub unsafe fn safeAreaInsets(&self) -> NSEdgeInsets; + #[method(additionalSafeAreaInsets)] pub unsafe fn additionalSafeAreaInsets(&self) -> NSEdgeInsets; + #[method(setAdditionalSafeAreaInsets:)] pub unsafe fn setAdditionalSafeAreaInsets(&self, additionalSafeAreaInsets: NSEdgeInsets); + #[method_id(safeAreaLayoutGuide)] pub unsafe fn safeAreaLayoutGuide(&self) -> Id; + #[method(safeAreaRect)] pub unsafe fn safeAreaRect(&self) -> NSRect; + #[method_id(layoutMarginsGuide)] pub unsafe fn layoutMarginsGuide(&self) -> Id; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSView { #[method(dragImage:at:offset:event:pasteboard:source:slideBack:)] pub unsafe fn dragImage_at_offset_event_pasteboard_source_slideBack( @@ -707,6 +967,7 @@ extern_methods!( sourceObj: &Object, slideFlag: bool, ); + #[method(dragFile:fromRect:slideBack:event:)] pub unsafe fn dragFile_fromRect_slideBack_event( &self, @@ -715,6 +976,7 @@ extern_methods!( flag: bool, event: &NSEvent, ) -> bool; + #[method(dragPromisedFilesOfTypes:fromRect:source:slideBack:event:)] pub unsafe fn dragPromisedFilesOfTypes_fromRect_source_slideBack_event( &self, @@ -724,28 +986,40 @@ extern_methods!( flag: bool, event: &NSEvent, ) -> bool; + #[method(convertPointToBase:)] pub unsafe fn convertPointToBase(&self, point: NSPoint) -> NSPoint; + #[method(convertPointFromBase:)] pub unsafe fn convertPointFromBase(&self, point: NSPoint) -> NSPoint; + #[method(convertSizeToBase:)] pub unsafe fn convertSizeToBase(&self, size: NSSize) -> NSSize; + #[method(convertSizeFromBase:)] pub unsafe fn convertSizeFromBase(&self, size: NSSize) -> NSSize; + #[method(convertRectToBase:)] pub unsafe fn convertRectToBase(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromBase:)] pub unsafe fn convertRectFromBase(&self, rect: NSRect) -> NSRect; + #[method(performMnemonic:)] pub unsafe fn performMnemonic(&self, string: &NSString) -> bool; + #[method(shouldDrawColor)] pub unsafe fn shouldDrawColor(&self) -> bool; + #[method(gState)] pub unsafe fn gState(&self) -> NSInteger; + #[method(allocateGState)] pub unsafe fn allocateGState(&self); + #[method(setUpGState)] pub unsafe fn setUpGState(&self); + #[method(renewGState)] pub unsafe fn renewGState(&self); } diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index 78890bb3a..7f9edf0e7 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSViewController; + unsafe impl ClassType for NSViewController { type Super = NSResponder; } ); + extern_methods!( unsafe impl NSViewController { #[method_id(initWithNibName:bundle:)] @@ -17,26 +22,37 @@ extern_methods!( nibNameOrNil: Option<&NSNibName>, nibBundleOrNil: Option<&NSBundle>, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(nibName)] pub unsafe fn nibName(&self) -> Option>; + #[method_id(nibBundle)] pub unsafe fn nibBundle(&self) -> Option>; + #[method_id(representedObject)] pub unsafe fn representedObject(&self) -> Option>; + #[method(setRepresentedObject:)] pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>); + #[method_id(title)] pub unsafe fn title(&self) -> Option>; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(view)] pub unsafe fn view(&self) -> Id; + #[method(setView:)] pub unsafe fn setView(&self, view: &NSView); + #[method(loadView)] pub unsafe fn loadView(&self); + #[method(commitEditingWithDelegate:didCommitSelector:contextInfo:)] pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( &self, @@ -44,36 +60,50 @@ extern_methods!( didCommitSelector: Option, contextInfo: *mut c_void, ); + #[method(commitEditing)] pub unsafe fn commitEditing(&self) -> bool; + #[method(discardEditing)] pub unsafe fn discardEditing(&self); + #[method(viewDidLoad)] pub unsafe fn viewDidLoad(&self); + #[method(isViewLoaded)] pub unsafe fn isViewLoaded(&self) -> bool; + #[method(viewWillAppear)] pub unsafe fn viewWillAppear(&self); + #[method(viewDidAppear)] pub unsafe fn viewDidAppear(&self); + #[method(viewWillDisappear)] pub unsafe fn viewWillDisappear(&self); + #[method(viewDidDisappear)] pub unsafe fn viewDidDisappear(&self); + #[method(preferredContentSize)] pub unsafe fn preferredContentSize(&self) -> NSSize; + #[method(setPreferredContentSize:)] pub unsafe fn setPreferredContentSize(&self, preferredContentSize: NSSize); + #[method(updateViewConstraints)] pub unsafe fn updateViewConstraints(&self); + #[method(viewWillLayout)] pub unsafe fn viewWillLayout(&self); + #[method(viewDidLayout)] pub unsafe fn viewDidLayout(&self); } ); + extern_methods!( - #[doc = "NSViewControllerPresentation"] + /// NSViewControllerPresentation unsafe impl NSViewController { #[method(presentViewController:animator:)] pub unsafe fn presentViewController_animator( @@ -81,25 +111,32 @@ extern_methods!( viewController: &NSViewController, animator: &NSViewControllerPresentationAnimator, ); + #[method(dismissViewController:)] pub unsafe fn dismissViewController(&self, viewController: &NSViewController); + #[method(dismissController:)] pub unsafe fn dismissController(&self, sender: Option<&Object>); + #[method_id(presentedViewControllers)] pub unsafe fn presentedViewControllers( &self, ) -> Option, Shared>>; + #[method_id(presentingViewController)] pub unsafe fn presentingViewController(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSViewControllerPresentationAndTransitionStyles"] + /// NSViewControllerPresentationAndTransitionStyles unsafe impl NSViewController { #[method(presentViewControllerAsSheet:)] pub unsafe fn presentViewControllerAsSheet(&self, viewController: &NSViewController); + #[method(presentViewControllerAsModalWindow:)] pub unsafe fn presentViewControllerAsModalWindow(&self, viewController: &NSViewController); + #[method(presentViewController:asPopoverRelativeToRect:ofView:preferredEdge:behavior:)] pub unsafe fn presentViewController_asPopoverRelativeToRect_ofView_preferredEdge_behavior( &self, @@ -109,6 +146,7 @@ extern_methods!( preferredEdge: NSRectEdge, behavior: NSPopoverBehavior, ); + #[method(transitionFromViewController:toViewController:options:completionHandler:)] pub unsafe fn transitionFromViewController_toViewController_options_completionHandler( &self, @@ -119,62 +157,80 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSViewControllerContainer"] + /// NSViewControllerContainer unsafe impl NSViewController { #[method_id(parentViewController)] pub unsafe fn parentViewController(&self) -> Option>; + #[method_id(childViewControllers)] pub unsafe fn childViewControllers(&self) -> Id, Shared>; + #[method(setChildViewControllers:)] pub unsafe fn setChildViewControllers( &self, childViewControllers: &NSArray, ); + #[method(addChildViewController:)] pub unsafe fn addChildViewController(&self, childViewController: &NSViewController); + #[method(removeFromParentViewController)] pub unsafe fn removeFromParentViewController(&self); + #[method(insertChildViewController:atIndex:)] pub unsafe fn insertChildViewController_atIndex( &self, childViewController: &NSViewController, index: NSInteger, ); + #[method(removeChildViewControllerAtIndex:)] pub unsafe fn removeChildViewControllerAtIndex(&self, index: NSInteger); + #[method(preferredContentSizeDidChangeForViewController:)] pub unsafe fn preferredContentSizeDidChangeForViewController( &self, viewController: &NSViewController, ); + #[method(viewWillTransitionToSize:)] pub unsafe fn viewWillTransitionToSize(&self, newSize: NSSize); } ); + pub type NSViewControllerPresentationAnimator = NSObject; + extern_methods!( - #[doc = "NSViewControllerStoryboardingMethods"] + /// NSViewControllerStoryboardingMethods unsafe impl NSViewController { #[method_id(storyboard)] pub unsafe fn storyboard(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSExtensionAdditions"] + /// NSExtensionAdditions unsafe impl NSViewController { #[method_id(extensionContext)] pub unsafe fn extensionContext(&self) -> Option>; + #[method_id(sourceItemView)] pub unsafe fn sourceItemView(&self) -> Option>; + #[method(setSourceItemView:)] pub unsafe fn setSourceItemView(&self, sourceItemView: Option<&NSView>); + #[method(preferredScreenOrigin)] pub unsafe fn preferredScreenOrigin(&self) -> NSPoint; + #[method(setPreferredScreenOrigin:)] pub unsafe fn setPreferredScreenOrigin(&self, preferredScreenOrigin: NSPoint); + #[method(preferredMinimumSize)] pub unsafe fn preferredMinimumSize(&self) -> NSSize; + #[method(preferredMaximumSize)] pub unsafe fn preferredMaximumSize(&self) -> NSSize; } diff --git a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs index d84fcbcc8..09132d1f0 100644 --- a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs +++ b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs @@ -1,40 +1,57 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSVisualEffectView; + unsafe impl ClassType for NSVisualEffectView { type Super = NSView; } ); + extern_methods!( unsafe impl NSVisualEffectView { #[method(material)] pub unsafe fn material(&self) -> NSVisualEffectMaterial; + #[method(setMaterial:)] pub unsafe fn setMaterial(&self, material: NSVisualEffectMaterial); + #[method(interiorBackgroundStyle)] pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle; + #[method(blendingMode)] pub unsafe fn blendingMode(&self) -> NSVisualEffectBlendingMode; + #[method(setBlendingMode:)] pub unsafe fn setBlendingMode(&self, blendingMode: NSVisualEffectBlendingMode); + #[method(state)] pub unsafe fn state(&self) -> NSVisualEffectState; + #[method(setState:)] pub unsafe fn setState(&self, state: NSVisualEffectState); + #[method_id(maskImage)] pub unsafe fn maskImage(&self) -> Option>; + #[method(setMaskImage:)] pub unsafe fn setMaskImage(&self, maskImage: Option<&NSImage>); + #[method(isEmphasized)] pub unsafe fn isEmphasized(&self) -> bool; + #[method(setEmphasized:)] pub unsafe fn setEmphasized(&self, emphasized: bool); + #[method(viewDidMoveToWindow)] pub unsafe fn viewDidMoveToWindow(&self); + #[method(viewWillMoveToWindow:)] pub unsafe fn viewWillMoveToWindow(&self, newWindow: Option<&NSWindow>); } diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 2215d1ad9..40d5b34b4 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -1,18 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSWindowLevel = NSInteger; + pub type NSWindowFrameAutosaveName = NSString; + pub type NSWindowPersistableFrameDescriptor = NSString; + pub type NSWindowTabbingIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSWindow; + unsafe impl ClassType for NSWindow { type Super = NSResponder; } ); + extern_methods!( unsafe impl NSWindow { #[method(frameRectForContentRect:styleMask:)] @@ -20,22 +29,28 @@ extern_methods!( cRect: NSRect, style: NSWindowStyleMask, ) -> NSRect; + #[method(contentRectForFrameRect:styleMask:)] pub unsafe fn contentRectForFrameRect_styleMask( fRect: NSRect, style: NSWindowStyleMask, ) -> NSRect; + #[method(minFrameWidthWithTitle:styleMask:)] pub unsafe fn minFrameWidthWithTitle_styleMask( title: &NSString, style: NSWindowStyleMask, ) -> CGFloat; + #[method(defaultDepthLimit)] pub unsafe fn defaultDepthLimit() -> NSWindowDepth; + #[method(frameRectForContentRect:)] pub unsafe fn frameRectForContentRect(&self, contentRect: NSRect) -> NSRect; + #[method(contentRectForFrameRect:)] pub unsafe fn contentRectForFrameRect(&self, frameRect: NSRect) -> NSRect; + #[method_id(initWithContentRect:styleMask:backing:defer:)] pub unsafe fn initWithContentRect_styleMask_backing_defer( &self, @@ -44,6 +59,7 @@ extern_methods!( backingStoreType: NSBackingStoreType, flag: bool, ) -> Id; + #[method_id(initWithContentRect:styleMask:backing:defer:screen:)] pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( &self, @@ -53,110 +69,153 @@ extern_methods!( flag: bool, screen: Option<&NSScreen>, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); + #[method_id(subtitle)] pub unsafe fn subtitle(&self) -> Id; + #[method(setSubtitle:)] pub unsafe fn setSubtitle(&self, subtitle: &NSString); + #[method(titleVisibility)] pub unsafe fn titleVisibility(&self) -> NSWindowTitleVisibility; + #[method(setTitleVisibility:)] pub unsafe fn setTitleVisibility(&self, titleVisibility: NSWindowTitleVisibility); + #[method(titlebarAppearsTransparent)] pub unsafe fn titlebarAppearsTransparent(&self) -> bool; + #[method(setTitlebarAppearsTransparent:)] pub unsafe fn setTitlebarAppearsTransparent(&self, titlebarAppearsTransparent: bool); + #[method(toolbarStyle)] pub unsafe fn toolbarStyle(&self) -> NSWindowToolbarStyle; + #[method(setToolbarStyle:)] pub unsafe fn setToolbarStyle(&self, toolbarStyle: NSWindowToolbarStyle); + #[method(contentLayoutRect)] pub unsafe fn contentLayoutRect(&self) -> NSRect; + #[method_id(contentLayoutGuide)] pub unsafe fn contentLayoutGuide(&self) -> Option>; + #[method_id(titlebarAccessoryViewControllers)] pub unsafe fn titlebarAccessoryViewControllers( &self, ) -> Id, Shared>; + #[method(setTitlebarAccessoryViewControllers:)] pub unsafe fn setTitlebarAccessoryViewControllers( &self, titlebarAccessoryViewControllers: &NSArray, ); + #[method(addTitlebarAccessoryViewController:)] pub unsafe fn addTitlebarAccessoryViewController( &self, childViewController: &NSTitlebarAccessoryViewController, ); + #[method(insertTitlebarAccessoryViewController:atIndex:)] pub unsafe fn insertTitlebarAccessoryViewController_atIndex( &self, childViewController: &NSTitlebarAccessoryViewController, index: NSInteger, ); + #[method(removeTitlebarAccessoryViewControllerAtIndex:)] pub unsafe fn removeTitlebarAccessoryViewControllerAtIndex(&self, index: NSInteger); + #[method_id(representedURL)] pub unsafe fn representedURL(&self) -> Option>; + #[method(setRepresentedURL:)] pub unsafe fn setRepresentedURL(&self, representedURL: Option<&NSURL>); + #[method_id(representedFilename)] pub unsafe fn representedFilename(&self) -> Id; + #[method(setRepresentedFilename:)] pub unsafe fn setRepresentedFilename(&self, representedFilename: &NSString); + #[method(setTitleWithRepresentedFilename:)] pub unsafe fn setTitleWithRepresentedFilename(&self, filename: &NSString); + #[method(isExcludedFromWindowsMenu)] pub unsafe fn isExcludedFromWindowsMenu(&self) -> bool; + #[method(setExcludedFromWindowsMenu:)] pub unsafe fn setExcludedFromWindowsMenu(&self, excludedFromWindowsMenu: bool); + #[method_id(contentView)] pub unsafe fn contentView(&self) -> Option>; + #[method(setContentView:)] pub unsafe fn setContentView(&self, contentView: Option<&NSView>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSWindowDelegate>); + #[method(windowNumber)] pub unsafe fn windowNumber(&self) -> NSInteger; + #[method(styleMask)] pub unsafe fn styleMask(&self) -> NSWindowStyleMask; + #[method(setStyleMask:)] pub unsafe fn setStyleMask(&self, styleMask: NSWindowStyleMask); + #[method_id(fieldEditor:forObject:)] pub unsafe fn fieldEditor_forObject( &self, createFlag: bool, object: Option<&Object>, ) -> Option>; + #[method(endEditingFor:)] pub unsafe fn endEditingFor(&self, object: Option<&Object>); + #[method(constrainFrameRect:toScreen:)] pub unsafe fn constrainFrameRect_toScreen( &self, frameRect: NSRect, screen: Option<&NSScreen>, ) -> NSRect; + #[method(setFrame:display:)] pub unsafe fn setFrame_display(&self, frameRect: NSRect, flag: bool); + #[method(setContentSize:)] pub unsafe fn setContentSize(&self, size: NSSize); + #[method(setFrameOrigin:)] pub unsafe fn setFrameOrigin(&self, point: NSPoint); + #[method(setFrameTopLeftPoint:)] pub unsafe fn setFrameTopLeftPoint(&self, point: NSPoint); + #[method(cascadeTopLeftFromPoint:)] pub unsafe fn cascadeTopLeftFromPoint(&self, topLeftPoint: NSPoint) -> NSPoint; + #[method(frame)] pub unsafe fn frame(&self) -> NSRect; + #[method(animationResizeTime:)] pub unsafe fn animationResizeTime(&self, newFrame: NSRect) -> NSTimeInterval; + #[method(setFrame:display:animate:)] pub unsafe fn setFrame_display_animate( &self, @@ -164,513 +223,725 @@ extern_methods!( displayFlag: bool, animateFlag: bool, ); + #[method(inLiveResize)] pub unsafe fn inLiveResize(&self) -> bool; + #[method(resizeIncrements)] pub unsafe fn resizeIncrements(&self) -> NSSize; + #[method(setResizeIncrements:)] pub unsafe fn setResizeIncrements(&self, resizeIncrements: NSSize); + #[method(aspectRatio)] pub unsafe fn aspectRatio(&self) -> NSSize; + #[method(setAspectRatio:)] pub unsafe fn setAspectRatio(&self, aspectRatio: NSSize); + #[method(contentResizeIncrements)] pub unsafe fn contentResizeIncrements(&self) -> NSSize; + #[method(setContentResizeIncrements:)] pub unsafe fn setContentResizeIncrements(&self, contentResizeIncrements: NSSize); + #[method(contentAspectRatio)] pub unsafe fn contentAspectRatio(&self) -> NSSize; + #[method(setContentAspectRatio:)] pub unsafe fn setContentAspectRatio(&self, contentAspectRatio: NSSize); + #[method(viewsNeedDisplay)] pub unsafe fn viewsNeedDisplay(&self) -> bool; + #[method(setViewsNeedDisplay:)] pub unsafe fn setViewsNeedDisplay(&self, viewsNeedDisplay: bool); + #[method(displayIfNeeded)] pub unsafe fn displayIfNeeded(&self); + #[method(display)] pub unsafe fn display(&self); + #[method(preservesContentDuringLiveResize)] pub unsafe fn preservesContentDuringLiveResize(&self) -> bool; + #[method(setPreservesContentDuringLiveResize:)] pub unsafe fn setPreservesContentDuringLiveResize( &self, preservesContentDuringLiveResize: bool, ); + #[method(update)] pub unsafe fn update(&self); + #[method(makeFirstResponder:)] pub unsafe fn makeFirstResponder(&self, responder: Option<&NSResponder>) -> bool; + #[method_id(firstResponder)] pub unsafe fn firstResponder(&self) -> Option>; + #[method(resizeFlags)] pub unsafe fn resizeFlags(&self) -> NSEventModifierFlags; + #[method(close)] pub unsafe fn close(&self); + #[method(isReleasedWhenClosed)] pub unsafe fn isReleasedWhenClosed(&self) -> bool; + #[method(setReleasedWhenClosed:)] pub unsafe fn setReleasedWhenClosed(&self, releasedWhenClosed: bool); + #[method(miniaturize:)] pub unsafe fn miniaturize(&self, sender: Option<&Object>); + #[method(deminiaturize:)] pub unsafe fn deminiaturize(&self, sender: Option<&Object>); + #[method(isZoomed)] pub unsafe fn isZoomed(&self) -> bool; + #[method(zoom:)] pub unsafe fn zoom(&self, sender: Option<&Object>); + #[method(isMiniaturized)] pub unsafe fn isMiniaturized(&self) -> bool; + #[method(tryToPerform:with:)] pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; + #[method_id(validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, sendType: Option<&NSPasteboardType>, returnType: Option<&NSPasteboardType>, ) -> Option>; + #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; + #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); + #[method(setContentBorderThickness:forEdge:)] pub unsafe fn setContentBorderThickness_forEdge( &self, thickness: CGFloat, edge: NSRectEdge, ); + #[method(contentBorderThicknessForEdge:)] pub unsafe fn contentBorderThicknessForEdge(&self, edge: NSRectEdge) -> CGFloat; + #[method(setAutorecalculatesContentBorderThickness:forEdge:)] pub unsafe fn setAutorecalculatesContentBorderThickness_forEdge( &self, flag: bool, edge: NSRectEdge, ); + #[method(autorecalculatesContentBorderThicknessForEdge:)] pub unsafe fn autorecalculatesContentBorderThicknessForEdge( &self, edge: NSRectEdge, ) -> bool; + #[method(isMovable)] pub unsafe fn isMovable(&self) -> bool; + #[method(setMovable:)] pub unsafe fn setMovable(&self, movable: bool); + #[method(isMovableByWindowBackground)] pub unsafe fn isMovableByWindowBackground(&self) -> bool; + #[method(setMovableByWindowBackground:)] pub unsafe fn setMovableByWindowBackground(&self, movableByWindowBackground: bool); + #[method(hidesOnDeactivate)] pub unsafe fn hidesOnDeactivate(&self) -> bool; + #[method(setHidesOnDeactivate:)] pub unsafe fn setHidesOnDeactivate(&self, hidesOnDeactivate: bool); + #[method(canHide)] pub unsafe fn canHide(&self) -> bool; + #[method(setCanHide:)] pub unsafe fn setCanHide(&self, canHide: bool); + #[method(center)] pub unsafe fn center(&self); + #[method(makeKeyAndOrderFront:)] pub unsafe fn makeKeyAndOrderFront(&self, sender: Option<&Object>); + #[method(orderFront:)] pub unsafe fn orderFront(&self, sender: Option<&Object>); + #[method(orderBack:)] pub unsafe fn orderBack(&self, sender: Option<&Object>); + #[method(orderOut:)] pub unsafe fn orderOut(&self, sender: Option<&Object>); + #[method(orderWindow:relativeTo:)] pub unsafe fn orderWindow_relativeTo( &self, place: NSWindowOrderingMode, otherWin: NSInteger, ); + #[method(orderFrontRegardless)] pub unsafe fn orderFrontRegardless(&self); + #[method_id(miniwindowImage)] pub unsafe fn miniwindowImage(&self) -> Option>; + #[method(setMiniwindowImage:)] pub unsafe fn setMiniwindowImage(&self, miniwindowImage: Option<&NSImage>); + #[method_id(miniwindowTitle)] pub unsafe fn miniwindowTitle(&self) -> Id; + #[method(setMiniwindowTitle:)] pub unsafe fn setMiniwindowTitle(&self, miniwindowTitle: Option<&NSString>); + #[method_id(dockTile)] pub unsafe fn dockTile(&self) -> Id; + #[method(isDocumentEdited)] pub unsafe fn isDocumentEdited(&self) -> bool; + #[method(setDocumentEdited:)] pub unsafe fn setDocumentEdited(&self, documentEdited: bool); + #[method(isVisible)] pub unsafe fn isVisible(&self) -> bool; + #[method(isKeyWindow)] pub unsafe fn isKeyWindow(&self) -> bool; + #[method(isMainWindow)] pub unsafe fn isMainWindow(&self) -> bool; + #[method(canBecomeKeyWindow)] pub unsafe fn canBecomeKeyWindow(&self) -> bool; + #[method(canBecomeMainWindow)] pub unsafe fn canBecomeMainWindow(&self) -> bool; + #[method(makeKeyWindow)] pub unsafe fn makeKeyWindow(&self); + #[method(makeMainWindow)] pub unsafe fn makeMainWindow(&self); + #[method(becomeKeyWindow)] pub unsafe fn becomeKeyWindow(&self); + #[method(resignKeyWindow)] pub unsafe fn resignKeyWindow(&self); + #[method(becomeMainWindow)] pub unsafe fn becomeMainWindow(&self); + #[method(resignMainWindow)] pub unsafe fn resignMainWindow(&self); + #[method(worksWhenModal)] pub unsafe fn worksWhenModal(&self) -> bool; + #[method(preventsApplicationTerminationWhenModal)] pub unsafe fn preventsApplicationTerminationWhenModal(&self) -> bool; + #[method(setPreventsApplicationTerminationWhenModal:)] pub unsafe fn setPreventsApplicationTerminationWhenModal( &self, preventsApplicationTerminationWhenModal: bool, ); + #[method(convertRectToScreen:)] pub unsafe fn convertRectToScreen(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromScreen:)] pub unsafe fn convertRectFromScreen(&self, rect: NSRect) -> NSRect; + #[method(convertPointToScreen:)] pub unsafe fn convertPointToScreen(&self, point: NSPoint) -> NSPoint; + #[method(convertPointFromScreen:)] pub unsafe fn convertPointFromScreen(&self, point: NSPoint) -> NSPoint; + #[method(convertRectToBacking:)] pub unsafe fn convertRectToBacking(&self, rect: NSRect) -> NSRect; + #[method(convertRectFromBacking:)] pub unsafe fn convertRectFromBacking(&self, rect: NSRect) -> NSRect; + #[method(convertPointToBacking:)] pub unsafe fn convertPointToBacking(&self, point: NSPoint) -> NSPoint; + #[method(convertPointFromBacking:)] pub unsafe fn convertPointFromBacking(&self, point: NSPoint) -> NSPoint; + #[method(backingAlignedRect:options:)] pub unsafe fn backingAlignedRect_options( &self, rect: NSRect, options: NSAlignmentOptions, ) -> NSRect; + #[method(backingScaleFactor)] pub unsafe fn backingScaleFactor(&self) -> CGFloat; + #[method(performClose:)] pub unsafe fn performClose(&self, sender: Option<&Object>); + #[method(performMiniaturize:)] pub unsafe fn performMiniaturize(&self, sender: Option<&Object>); + #[method(performZoom:)] pub unsafe fn performZoom(&self, sender: Option<&Object>); + #[method_id(dataWithEPSInsideRect:)] pub unsafe fn dataWithEPSInsideRect(&self, rect: NSRect) -> Id; + #[method_id(dataWithPDFInsideRect:)] pub unsafe fn dataWithPDFInsideRect(&self, rect: NSRect) -> Id; + #[method(print:)] pub unsafe fn print(&self, sender: Option<&Object>); + #[method(allowsToolTipsWhenApplicationIsInactive)] pub unsafe fn allowsToolTipsWhenApplicationIsInactive(&self) -> bool; + #[method(setAllowsToolTipsWhenApplicationIsInactive:)] pub unsafe fn setAllowsToolTipsWhenApplicationIsInactive( &self, allowsToolTipsWhenApplicationIsInactive: bool, ); + #[method(backingType)] pub unsafe fn backingType(&self) -> NSBackingStoreType; + #[method(setBackingType:)] pub unsafe fn setBackingType(&self, backingType: NSBackingStoreType); + #[method(level)] pub unsafe fn level(&self) -> NSWindowLevel; + #[method(setLevel:)] pub unsafe fn setLevel(&self, level: NSWindowLevel); + #[method(depthLimit)] pub unsafe fn depthLimit(&self) -> NSWindowDepth; + #[method(setDepthLimit:)] pub unsafe fn setDepthLimit(&self, depthLimit: NSWindowDepth); + #[method(setDynamicDepthLimit:)] pub unsafe fn setDynamicDepthLimit(&self, flag: bool); + #[method(hasDynamicDepthLimit)] pub unsafe fn hasDynamicDepthLimit(&self) -> bool; + #[method_id(screen)] pub unsafe fn screen(&self) -> Option>; + #[method_id(deepestScreen)] pub unsafe fn deepestScreen(&self) -> Option>; + #[method(hasShadow)] pub unsafe fn hasShadow(&self) -> bool; + #[method(setHasShadow:)] pub unsafe fn setHasShadow(&self, hasShadow: bool); + #[method(invalidateShadow)] pub unsafe fn invalidateShadow(&self); + #[method(alphaValue)] pub unsafe fn alphaValue(&self) -> CGFloat; + #[method(setAlphaValue:)] pub unsafe fn setAlphaValue(&self, alphaValue: CGFloat); + #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; + #[method(setOpaque:)] pub unsafe fn setOpaque(&self, opaque: bool); + #[method(sharingType)] pub unsafe fn sharingType(&self) -> NSWindowSharingType; + #[method(setSharingType:)] pub unsafe fn setSharingType(&self, sharingType: NSWindowSharingType); + #[method(allowsConcurrentViewDrawing)] pub unsafe fn allowsConcurrentViewDrawing(&self) -> bool; + #[method(setAllowsConcurrentViewDrawing:)] pub unsafe fn setAllowsConcurrentViewDrawing(&self, allowsConcurrentViewDrawing: bool); + #[method(displaysWhenScreenProfileChanges)] pub unsafe fn displaysWhenScreenProfileChanges(&self) -> bool; + #[method(setDisplaysWhenScreenProfileChanges:)] pub unsafe fn setDisplaysWhenScreenProfileChanges( &self, displaysWhenScreenProfileChanges: bool, ); + #[method(disableScreenUpdatesUntilFlush)] pub unsafe fn disableScreenUpdatesUntilFlush(&self); + #[method(canBecomeVisibleWithoutLogin)] pub unsafe fn canBecomeVisibleWithoutLogin(&self) -> bool; + #[method(setCanBecomeVisibleWithoutLogin:)] pub unsafe fn setCanBecomeVisibleWithoutLogin(&self, canBecomeVisibleWithoutLogin: bool); + #[method(collectionBehavior)] pub unsafe fn collectionBehavior(&self) -> NSWindowCollectionBehavior; + #[method(setCollectionBehavior:)] pub unsafe fn setCollectionBehavior(&self, collectionBehavior: NSWindowCollectionBehavior); + #[method(animationBehavior)] pub unsafe fn animationBehavior(&self) -> NSWindowAnimationBehavior; + #[method(setAnimationBehavior:)] pub unsafe fn setAnimationBehavior(&self, animationBehavior: NSWindowAnimationBehavior); + #[method(isOnActiveSpace)] pub unsafe fn isOnActiveSpace(&self) -> bool; + #[method(toggleFullScreen:)] pub unsafe fn toggleFullScreen(&self, sender: Option<&Object>); + #[method_id(stringWithSavedFrame)] pub unsafe fn stringWithSavedFrame(&self) -> Id; + #[method(setFrameFromString:)] pub unsafe fn setFrameFromString(&self, string: &NSWindowPersistableFrameDescriptor); + #[method(saveFrameUsingName:)] pub unsafe fn saveFrameUsingName(&self, name: &NSWindowFrameAutosaveName); + #[method(setFrameUsingName:force:)] pub unsafe fn setFrameUsingName_force( &self, name: &NSWindowFrameAutosaveName, force: bool, ) -> bool; + #[method(setFrameUsingName:)] pub unsafe fn setFrameUsingName(&self, name: &NSWindowFrameAutosaveName) -> bool; + #[method(setFrameAutosaveName:)] pub unsafe fn setFrameAutosaveName(&self, name: &NSWindowFrameAutosaveName) -> bool; + #[method_id(frameAutosaveName)] pub unsafe fn frameAutosaveName(&self) -> Id; + #[method(removeFrameUsingName:)] pub unsafe fn removeFrameUsingName(name: &NSWindowFrameAutosaveName); + #[method(minSize)] pub unsafe fn minSize(&self) -> NSSize; + #[method(setMinSize:)] pub unsafe fn setMinSize(&self, minSize: NSSize); + #[method(maxSize)] pub unsafe fn maxSize(&self) -> NSSize; + #[method(setMaxSize:)] pub unsafe fn setMaxSize(&self, maxSize: NSSize); + #[method(contentMinSize)] pub unsafe fn contentMinSize(&self) -> NSSize; + #[method(setContentMinSize:)] pub unsafe fn setContentMinSize(&self, contentMinSize: NSSize); + #[method(contentMaxSize)] pub unsafe fn contentMaxSize(&self) -> NSSize; + #[method(setContentMaxSize:)] pub unsafe fn setContentMaxSize(&self, contentMaxSize: NSSize); + #[method(minFullScreenContentSize)] pub unsafe fn minFullScreenContentSize(&self) -> NSSize; + #[method(setMinFullScreenContentSize:)] pub unsafe fn setMinFullScreenContentSize(&self, minFullScreenContentSize: NSSize); + #[method(maxFullScreenContentSize)] pub unsafe fn maxFullScreenContentSize(&self) -> NSSize; + #[method(setMaxFullScreenContentSize:)] pub unsafe fn setMaxFullScreenContentSize(&self, maxFullScreenContentSize: NSSize); + #[method_id(deviceDescription)] pub unsafe fn deviceDescription( &self, ) -> Id, Shared>; + #[method_id(windowController)] pub unsafe fn windowController(&self) -> Option>; + #[method(setWindowController:)] pub unsafe fn setWindowController(&self, windowController: Option<&NSWindowController>); + #[method(beginSheet:completionHandler:)] pub unsafe fn beginSheet_completionHandler( &self, sheetWindow: &NSWindow, handler: TodoBlock, ); + #[method(beginCriticalSheet:completionHandler:)] pub unsafe fn beginCriticalSheet_completionHandler( &self, sheetWindow: &NSWindow, handler: TodoBlock, ); + #[method(endSheet:)] pub unsafe fn endSheet(&self, sheetWindow: &NSWindow); + #[method(endSheet:returnCode:)] pub unsafe fn endSheet_returnCode( &self, sheetWindow: &NSWindow, returnCode: NSModalResponse, ); + #[method_id(sheets)] pub unsafe fn sheets(&self) -> Id, Shared>; + #[method_id(attachedSheet)] pub unsafe fn attachedSheet(&self) -> Option>; + #[method(isSheet)] pub unsafe fn isSheet(&self) -> bool; + #[method_id(sheetParent)] pub unsafe fn sheetParent(&self) -> Option>; + #[method_id(standardWindowButton:forStyleMask:)] pub unsafe fn standardWindowButton_forStyleMask( b: NSWindowButton, styleMask: NSWindowStyleMask, ) -> Option>; + #[method_id(standardWindowButton:)] pub unsafe fn standardWindowButton( &self, b: NSWindowButton, ) -> Option>; + #[method(addChildWindow:ordered:)] pub unsafe fn addChildWindow_ordered( &self, childWin: &NSWindow, place: NSWindowOrderingMode, ); + #[method(removeChildWindow:)] pub unsafe fn removeChildWindow(&self, childWin: &NSWindow); + #[method_id(childWindows)] pub unsafe fn childWindows(&self) -> Option, Shared>>; + #[method_id(parentWindow)] pub unsafe fn parentWindow(&self) -> Option>; + #[method(setParentWindow:)] pub unsafe fn setParentWindow(&self, parentWindow: Option<&NSWindow>); + #[method_id(appearanceSource)] pub unsafe fn appearanceSource(&self) -> Option>; + #[method(setAppearanceSource:)] pub unsafe fn setAppearanceSource(&self, appearanceSource: Option<&TodoProtocols>); + #[method_id(colorSpace)] pub unsafe fn colorSpace(&self) -> Option>; + #[method(setColorSpace:)] pub unsafe fn setColorSpace(&self, colorSpace: Option<&NSColorSpace>); + #[method(canRepresentDisplayGamut:)] pub unsafe fn canRepresentDisplayGamut(&self, displayGamut: NSDisplayGamut) -> bool; + #[method_id(windowNumbersWithOptions:)] pub unsafe fn windowNumbersWithOptions( options: NSWindowNumberListOptions, ) -> Option, Shared>>; + #[method(windowNumberAtPoint:belowWindowWithWindowNumber:)] pub unsafe fn windowNumberAtPoint_belowWindowWithWindowNumber( point: NSPoint, windowNumber: NSInteger, ) -> NSInteger; + #[method(occlusionState)] pub unsafe fn occlusionState(&self) -> NSWindowOcclusionState; + #[method(titlebarSeparatorStyle)] pub unsafe fn titlebarSeparatorStyle(&self) -> NSTitlebarSeparatorStyle; + #[method(setTitlebarSeparatorStyle:)] pub unsafe fn setTitlebarSeparatorStyle( &self, titlebarSeparatorStyle: NSTitlebarSeparatorStyle, ); + #[method_id(contentViewController)] pub unsafe fn contentViewController(&self) -> Option>; + #[method(setContentViewController:)] pub unsafe fn setContentViewController( &self, contentViewController: Option<&NSViewController>, ); + #[method_id(windowWithContentViewController:)] pub unsafe fn windowWithContentViewController( contentViewController: &NSViewController, ) -> Id; + #[method(performWindowDragWithEvent:)] pub unsafe fn performWindowDragWithEvent(&self, event: &NSEvent); + #[method_id(initialFirstResponder)] pub unsafe fn initialFirstResponder(&self) -> Option>; + #[method(setInitialFirstResponder:)] pub unsafe fn setInitialFirstResponder(&self, initialFirstResponder: Option<&NSView>); + #[method(selectNextKeyView:)] pub unsafe fn selectNextKeyView(&self, sender: Option<&Object>); + #[method(selectPreviousKeyView:)] pub unsafe fn selectPreviousKeyView(&self, sender: Option<&Object>); + #[method(selectKeyViewFollowingView:)] pub unsafe fn selectKeyViewFollowingView(&self, view: &NSView); + #[method(selectKeyViewPrecedingView:)] pub unsafe fn selectKeyViewPrecedingView(&self, view: &NSView); + #[method(keyViewSelectionDirection)] pub unsafe fn keyViewSelectionDirection(&self) -> NSSelectionDirection; + #[method_id(defaultButtonCell)] pub unsafe fn defaultButtonCell(&self) -> Option>; + #[method(setDefaultButtonCell:)] pub unsafe fn setDefaultButtonCell(&self, defaultButtonCell: Option<&NSButtonCell>); + #[method(disableKeyEquivalentForDefaultButtonCell)] pub unsafe fn disableKeyEquivalentForDefaultButtonCell(&self); + #[method(enableKeyEquivalentForDefaultButtonCell)] pub unsafe fn enableKeyEquivalentForDefaultButtonCell(&self); + #[method(autorecalculatesKeyViewLoop)] pub unsafe fn autorecalculatesKeyViewLoop(&self) -> bool; + #[method(setAutorecalculatesKeyViewLoop:)] pub unsafe fn setAutorecalculatesKeyViewLoop(&self, autorecalculatesKeyViewLoop: bool); + #[method(recalculateKeyViewLoop)] pub unsafe fn recalculateKeyViewLoop(&self); + #[method_id(toolbar)] pub unsafe fn toolbar(&self) -> Option>; + #[method(setToolbar:)] pub unsafe fn setToolbar(&self, toolbar: Option<&NSToolbar>); + #[method(toggleToolbarShown:)] pub unsafe fn toggleToolbarShown(&self, sender: Option<&Object>); + #[method(runToolbarCustomizationPalette:)] pub unsafe fn runToolbarCustomizationPalette(&self, sender: Option<&Object>); + #[method(showsToolbarButton)] pub unsafe fn showsToolbarButton(&self) -> bool; + #[method(setShowsToolbarButton:)] pub unsafe fn setShowsToolbarButton(&self, showsToolbarButton: bool); + #[method(allowsAutomaticWindowTabbing)] pub unsafe fn allowsAutomaticWindowTabbing() -> bool; + #[method(setAllowsAutomaticWindowTabbing:)] pub unsafe fn setAllowsAutomaticWindowTabbing(allowsAutomaticWindowTabbing: bool); + #[method(userTabbingPreference)] pub unsafe fn userTabbingPreference() -> NSWindowUserTabbingPreference; + #[method(tabbingMode)] pub unsafe fn tabbingMode(&self) -> NSWindowTabbingMode; + #[method(setTabbingMode:)] pub unsafe fn setTabbingMode(&self, tabbingMode: NSWindowTabbingMode); + #[method_id(tabbingIdentifier)] pub unsafe fn tabbingIdentifier(&self) -> Id; + #[method(setTabbingIdentifier:)] pub unsafe fn setTabbingIdentifier(&self, tabbingIdentifier: &NSWindowTabbingIdentifier); + #[method(selectNextTab:)] pub unsafe fn selectNextTab(&self, sender: Option<&Object>); + #[method(selectPreviousTab:)] pub unsafe fn selectPreviousTab(&self, sender: Option<&Object>); + #[method(moveTabToNewWindow:)] pub unsafe fn moveTabToNewWindow(&self, sender: Option<&Object>); + #[method(mergeAllWindows:)] pub unsafe fn mergeAllWindows(&self, sender: Option<&Object>); + #[method(toggleTabBar:)] pub unsafe fn toggleTabBar(&self, sender: Option<&Object>); + #[method(toggleTabOverview:)] pub unsafe fn toggleTabOverview(&self, sender: Option<&Object>); + #[method_id(tabbedWindows)] pub unsafe fn tabbedWindows(&self) -> Option, Shared>>; + #[method(addTabbedWindow:ordered:)] pub unsafe fn addTabbedWindow_ordered( &self, window: &NSWindow, ordered: NSWindowOrderingMode, ); + #[method_id(tab)] pub unsafe fn tab(&self) -> Id; + #[method_id(tabGroup)] pub unsafe fn tabGroup(&self) -> Option>; + #[method(windowTitlebarLayoutDirection)] pub unsafe fn windowTitlebarLayoutDirection(&self) -> NSUserInterfaceLayoutDirection; } ); + extern_methods!( - #[doc = "NSEvent"] + /// NSEvent unsafe impl NSWindow { #[method(trackEventsMatchingMask:timeout:mode:handler:)] pub unsafe fn trackEventsMatchingMask_timeout_mode_handler( @@ -680,11 +951,13 @@ extern_methods!( mode: &NSRunLoopMode, trackingHandler: TodoBlock, ); + #[method_id(nextEventMatchingMask:)] pub unsafe fn nextEventMatchingMask( &self, mask: NSEventMask, ) -> Option>; + #[method_id(nextEventMatchingMask:untilDate:inMode:dequeue:)] pub unsafe fn nextEventMatchingMask_untilDate_inMode_dequeue( &self, @@ -693,49 +966,65 @@ extern_methods!( mode: &NSRunLoopMode, deqFlag: bool, ) -> Option>; + #[method(discardEventsMatchingMask:beforeEvent:)] pub unsafe fn discardEventsMatchingMask_beforeEvent( &self, mask: NSEventMask, lastEvent: Option<&NSEvent>, ); + #[method(postEvent:atStart:)] pub unsafe fn postEvent_atStart(&self, event: &NSEvent, flag: bool); + #[method(sendEvent:)] pub unsafe fn sendEvent(&self, event: &NSEvent); + #[method_id(currentEvent)] pub unsafe fn currentEvent(&self) -> Option>; + #[method(acceptsMouseMovedEvents)] pub unsafe fn acceptsMouseMovedEvents(&self) -> bool; + #[method(setAcceptsMouseMovedEvents:)] pub unsafe fn setAcceptsMouseMovedEvents(&self, acceptsMouseMovedEvents: bool); + #[method(ignoresMouseEvents)] pub unsafe fn ignoresMouseEvents(&self) -> bool; + #[method(setIgnoresMouseEvents:)] pub unsafe fn setIgnoresMouseEvents(&self, ignoresMouseEvents: bool); + #[method(mouseLocationOutsideOfEventStream)] pub unsafe fn mouseLocationOutsideOfEventStream(&self) -> NSPoint; } ); + extern_methods!( - #[doc = "NSCursorRect"] + /// NSCursorRect unsafe impl NSWindow { #[method(disableCursorRects)] pub unsafe fn disableCursorRects(&self); + #[method(enableCursorRects)] pub unsafe fn enableCursorRects(&self); + #[method(discardCursorRects)] pub unsafe fn discardCursorRects(&self); + #[method(areCursorRectsEnabled)] pub unsafe fn areCursorRectsEnabled(&self) -> bool; + #[method(invalidateCursorRectsForView:)] pub unsafe fn invalidateCursorRectsForView(&self, view: &NSView); + #[method(resetCursorRects)] pub unsafe fn resetCursorRects(&self); } ); + extern_methods!( - #[doc = "NSDrag"] + /// NSDrag unsafe impl NSWindow { #[method(dragImage:at:offset:event:pasteboard:source:slideBack:)] pub unsafe fn dragImage_at_offset_event_pasteboard_source_slideBack( @@ -748,79 +1037,109 @@ extern_methods!( sourceObj: &Object, slideFlag: bool, ); + #[method(registerForDraggedTypes:)] pub unsafe fn registerForDraggedTypes(&self, newTypes: &NSArray); + #[method(unregisterDraggedTypes)] pub unsafe fn unregisterDraggedTypes(&self); } ); + extern_methods!( - #[doc = "NSCarbonExtensions"] + /// NSCarbonExtensions unsafe impl NSWindow { #[method_id(initWithWindowRef:)] pub unsafe fn initWithWindowRef( &self, windowRef: NonNull, ) -> Option>; + #[method(windowRef)] pub unsafe fn windowRef(&self) -> NonNull; } ); + pub type NSWindowDelegate = NSObject; + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSWindow { #[method(cacheImageInRect:)] pub unsafe fn cacheImageInRect(&self, rect: NSRect); + #[method(restoreCachedImage)] pub unsafe fn restoreCachedImage(&self); + #[method(discardCachedImage)] pub unsafe fn discardCachedImage(&self); + #[method(menuChanged:)] pub unsafe fn menuChanged(menu: &NSMenu); + #[method(gState)] pub unsafe fn gState(&self) -> NSInteger; + #[method(convertBaseToScreen:)] pub unsafe fn convertBaseToScreen(&self, point: NSPoint) -> NSPoint; + #[method(convertScreenToBase:)] pub unsafe fn convertScreenToBase(&self, point: NSPoint) -> NSPoint; + #[method(userSpaceScaleFactor)] pub unsafe fn userSpaceScaleFactor(&self) -> CGFloat; + #[method(useOptimizedDrawing:)] pub unsafe fn useOptimizedDrawing(&self, flag: bool); + #[method(canStoreColor)] pub unsafe fn canStoreColor(&self) -> bool; + #[method(disableFlushWindow)] pub unsafe fn disableFlushWindow(&self); + #[method(enableFlushWindow)] pub unsafe fn enableFlushWindow(&self); + #[method(isFlushWindowDisabled)] pub unsafe fn isFlushWindowDisabled(&self) -> bool; + #[method(flushWindow)] pub unsafe fn flushWindow(&self); + #[method(flushWindowIfNeeded)] pub unsafe fn flushWindowIfNeeded(&self); + #[method(isAutodisplay)] pub unsafe fn isAutodisplay(&self) -> bool; + #[method(setAutodisplay:)] pub unsafe fn setAutodisplay(&self, autodisplay: bool); + #[method_id(graphicsContext)] pub unsafe fn graphicsContext(&self) -> Option>; + #[method(isOneShot)] pub unsafe fn isOneShot(&self) -> bool; + #[method(setOneShot:)] pub unsafe fn setOneShot(&self, oneShot: bool); + #[method(preferredBackingLocation)] pub unsafe fn preferredBackingLocation(&self) -> NSWindowBackingLocation; + #[method(setPreferredBackingLocation:)] pub unsafe fn setPreferredBackingLocation( &self, preferredBackingLocation: NSWindowBackingLocation, ); + #[method(backingLocation)] pub unsafe fn backingLocation(&self) -> NSWindowBackingLocation; + #[method(showsResizeIndicator)] pub unsafe fn showsResizeIndicator(&self) -> bool; + #[method(setShowsResizeIndicator:)] pub unsafe fn setShowsResizeIndicator(&self, showsResizeIndicator: bool); } diff --git a/crates/icrate/src/generated/AppKit/NSWindowController.rs b/crates/icrate/src/generated/AppKit/NSWindowController.rs index ed25b253e..d34d7d299 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowController.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowController.rs @@ -1,102 +1,137 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSWindowController; + unsafe impl ClassType for NSWindowController { type Super = NSResponder; } ); + extern_methods!( unsafe impl NSWindowController { #[method_id(initWithWindow:)] pub unsafe fn initWithWindow(&self, window: Option<&NSWindow>) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(initWithWindowNibName:)] pub unsafe fn initWithWindowNibName(&self, windowNibName: &NSNibName) -> Id; + #[method_id(initWithWindowNibName:owner:)] pub unsafe fn initWithWindowNibName_owner( &self, windowNibName: &NSNibName, owner: &Object, ) -> Id; + #[method_id(initWithWindowNibPath:owner:)] pub unsafe fn initWithWindowNibPath_owner( &self, windowNibPath: &NSString, owner: &Object, ) -> Id; + #[method_id(windowNibName)] pub unsafe fn windowNibName(&self) -> Option>; + #[method_id(windowNibPath)] pub unsafe fn windowNibPath(&self) -> Option>; + #[method_id(owner)] pub unsafe fn owner(&self) -> Option>; + #[method_id(windowFrameAutosaveName)] pub unsafe fn windowFrameAutosaveName(&self) -> Id; + #[method(setWindowFrameAutosaveName:)] pub unsafe fn setWindowFrameAutosaveName( &self, windowFrameAutosaveName: &NSWindowFrameAutosaveName, ); + #[method(shouldCascadeWindows)] pub unsafe fn shouldCascadeWindows(&self) -> bool; + #[method(setShouldCascadeWindows:)] pub unsafe fn setShouldCascadeWindows(&self, shouldCascadeWindows: bool); + #[method_id(document)] pub unsafe fn document(&self) -> Option>; + #[method(setDocument:)] pub unsafe fn setDocument(&self, document: Option<&Object>); + #[method(setDocumentEdited:)] pub unsafe fn setDocumentEdited(&self, dirtyFlag: bool); + #[method(shouldCloseDocument)] pub unsafe fn shouldCloseDocument(&self) -> bool; + #[method(setShouldCloseDocument:)] pub unsafe fn setShouldCloseDocument(&self, shouldCloseDocument: bool); + #[method(synchronizeWindowTitleWithDocumentName)] pub unsafe fn synchronizeWindowTitleWithDocumentName(&self); + #[method_id(windowTitleForDocumentDisplayName:)] pub unsafe fn windowTitleForDocumentDisplayName( &self, displayName: &NSString, ) -> Id; + #[method_id(contentViewController)] pub unsafe fn contentViewController(&self) -> Option>; + #[method(setContentViewController:)] pub unsafe fn setContentViewController( &self, contentViewController: Option<&NSViewController>, ); + #[method_id(window)] pub unsafe fn window(&self) -> Option>; + #[method(setWindow:)] pub unsafe fn setWindow(&self, window: Option<&NSWindow>); + #[method(isWindowLoaded)] pub unsafe fn isWindowLoaded(&self) -> bool; + #[method(windowWillLoad)] pub unsafe fn windowWillLoad(&self); + #[method(windowDidLoad)] pub unsafe fn windowDidLoad(&self); + #[method(loadWindow)] pub unsafe fn loadWindow(&self); + #[method(close)] pub unsafe fn close(&self); + #[method(showWindow:)] pub unsafe fn showWindow(&self, sender: Option<&Object>); } ); + extern_methods!( - #[doc = "NSWindowControllerStoryboardingMethods"] + /// NSWindowControllerStoryboardingMethods unsafe impl NSWindowController { #[method_id(storyboard)] pub unsafe fn storyboard(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSWindowControllerDismissing"] + /// NSWindowControllerDismissing unsafe impl NSWindowController { #[method(dismissController:)] pub unsafe fn dismissController(&self, sender: Option<&Object>); diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs index a6ad67e21..953f8fe0a 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSWindowRestoration = NSObject; + extern_methods!( - #[doc = "NSWindowRestoration"] + /// NSWindowRestoration unsafe impl NSDocumentController {} ); + extern_methods!( - #[doc = "NSWindowRestoration"] + /// NSWindowRestoration unsafe impl NSApplication { #[method(restoreWindowWithIdentifier:state:completionHandler:)] pub unsafe fn restoreWindowWithIdentifier_state_completionHandler( @@ -19,57 +24,72 @@ extern_methods!( ) -> bool; } ); + extern_methods!( - #[doc = "NSUserInterfaceRestoration"] + /// NSUserInterfaceRestoration unsafe impl NSWindow { #[method(isRestorable)] pub unsafe fn isRestorable(&self) -> bool; + #[method(setRestorable:)] pub unsafe fn setRestorable(&self, restorable: bool); + #[method_id(restorationClass)] pub unsafe fn restorationClass(&self) -> Option>; + #[method(setRestorationClass:)] pub unsafe fn setRestorationClass(&self, restorationClass: Option<&TodoProtocols>); + #[method(disableSnapshotRestoration)] pub unsafe fn disableSnapshotRestoration(&self); + #[method(enableSnapshotRestoration)] pub unsafe fn enableSnapshotRestoration(&self); } ); + extern_methods!( - #[doc = "NSRestorableState"] + /// NSRestorableState unsafe impl NSResponder { #[method(encodeRestorableStateWithCoder:)] pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder); + #[method(encodeRestorableStateWithCoder:backgroundQueue:)] pub unsafe fn encodeRestorableStateWithCoder_backgroundQueue( &self, coder: &NSCoder, queue: &NSOperationQueue, ); + #[method(restoreStateWithCoder:)] pub unsafe fn restoreStateWithCoder(&self, coder: &NSCoder); + #[method(invalidateRestorableState)] pub unsafe fn invalidateRestorableState(&self); + #[method_id(restorableStateKeyPaths)] pub unsafe fn restorableStateKeyPaths() -> Id, Shared>; + #[method_id(allowedClassesForRestorableStateKeyPath:)] pub unsafe fn allowedClassesForRestorableStateKeyPath( keyPath: &NSString, ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSRestorableStateExtension"] + /// NSRestorableStateExtension unsafe impl NSApplication { #[method(extendStateRestoration)] pub unsafe fn extendStateRestoration(&self); + #[method(completeStateRestoration)] pub unsafe fn completeStateRestoration(&self); } ); + extern_methods!( - #[doc = "NSRestorableState"] + /// NSRestorableState unsafe impl NSDocument { #[method(restoreDocumentWindowWithIdentifier:state:completionHandler:)] pub unsafe fn restoreDocumentWindowWithIdentifier_state_completionHandler( @@ -78,20 +98,26 @@ extern_methods!( state: &NSCoder, completionHandler: TodoBlock, ); + #[method(encodeRestorableStateWithCoder:)] pub unsafe fn encodeRestorableStateWithCoder(&self, coder: &NSCoder); + #[method(encodeRestorableStateWithCoder:backgroundQueue:)] pub unsafe fn encodeRestorableStateWithCoder_backgroundQueue( &self, coder: &NSCoder, queue: &NSOperationQueue, ); + #[method(restoreStateWithCoder:)] pub unsafe fn restoreStateWithCoder(&self, coder: &NSCoder); + #[method(invalidateRestorableState)] pub unsafe fn invalidateRestorableState(&self); + #[method_id(restorableStateKeyPaths)] pub unsafe fn restorableStateKeyPaths() -> Id, Shared>; + #[method_id(allowedClassesForRestorableStateKeyPath:)] pub unsafe fn allowedClassesForRestorableStateKeyPath( keyPath: &NSString, diff --git a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs index 0c9c82ff8..2c98ec8ed 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs @@ -1,44 +1,61 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSScripting"] + /// NSScripting unsafe impl NSWindow { #[method(hasCloseBox)] pub unsafe fn hasCloseBox(&self) -> bool; + #[method(hasTitleBar)] pub unsafe fn hasTitleBar(&self) -> bool; + #[method(isFloatingPanel)] pub unsafe fn isFloatingPanel(&self) -> bool; + #[method(isMiniaturizable)] pub unsafe fn isMiniaturizable(&self) -> bool; + #[method(isModalPanel)] pub unsafe fn isModalPanel(&self) -> bool; + #[method(isResizable)] pub unsafe fn isResizable(&self) -> bool; + #[method(isZoomable)] pub unsafe fn isZoomable(&self) -> bool; + #[method(orderedIndex)] pub unsafe fn orderedIndex(&self) -> NSInteger; + #[method(setOrderedIndex:)] pub unsafe fn setOrderedIndex(&self, orderedIndex: NSInteger); + #[method(setIsMiniaturized:)] pub unsafe fn setIsMiniaturized(&self, flag: bool); + #[method(setIsVisible:)] pub unsafe fn setIsVisible(&self, flag: bool); + #[method(setIsZoomed:)] pub unsafe fn setIsZoomed(&self, flag: bool); + #[method_id(handleCloseScriptCommand:)] pub unsafe fn handleCloseScriptCommand( &self, command: &NSCloseCommand, ) -> Option>; + #[method_id(handlePrintScriptCommand:)] pub unsafe fn handlePrintScriptCommand( &self, command: &NSScriptCommand, ) -> Option>; + #[method_id(handleSaveScriptCommand:)] pub unsafe fn handleSaveScriptCommand( &self, diff --git a/crates/icrate/src/generated/AppKit/NSWindowTab.rs b/crates/icrate/src/generated/AppKit/NSWindowTab.rs index 3b1daddec..9df096250 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowTab.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowTab.rs @@ -1,30 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSWindowTab; + unsafe impl ClassType for NSWindowTab { type Super = NSObject; } ); + extern_methods!( unsafe impl NSWindowTab { #[method_id(title)] pub unsafe fn title(&self) -> Id; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; + #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); + #[method_id(toolTip)] pub unsafe fn toolTip(&self) -> Id; + #[method(setToolTip:)] pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); + #[method_id(accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; + #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); } diff --git a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs index a04d57b7e..4dc80a3e7 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs @@ -1,34 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSWindowTabGroup; + unsafe impl ClassType for NSWindowTabGroup { type Super = NSObject; } ); + extern_methods!( unsafe impl NSWindowTabGroup { #[method_id(identifier)] pub unsafe fn identifier(&self) -> Id; + #[method_id(windows)] pub unsafe fn windows(&self) -> Id, Shared>; + #[method(isOverviewVisible)] pub unsafe fn isOverviewVisible(&self) -> bool; + #[method(setOverviewVisible:)] pub unsafe fn setOverviewVisible(&self, overviewVisible: bool); + #[method(isTabBarVisible)] pub unsafe fn isTabBarVisible(&self) -> bool; + #[method_id(selectedWindow)] pub unsafe fn selectedWindow(&self) -> Option>; + #[method(setSelectedWindow:)] pub unsafe fn setSelectedWindow(&self, selectedWindow: Option<&NSWindow>); + #[method(addWindow:)] pub unsafe fn addWindow(&self, window: &NSWindow); + #[method(insertWindow:atIndex:)] pub unsafe fn insertWindow_atIndex(&self, window: &NSWindow, index: NSInteger); + #[method(removeWindow:)] pub unsafe fn removeWindow(&self, window: &NSWindow); } diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index 5051e97fe..c30a4c4ba 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -1,22 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSWorkspace; + unsafe impl ClassType for NSWorkspace { type Super = NSObject; } ); + extern_methods!( unsafe impl NSWorkspace { #[method_id(sharedWorkspace)] pub unsafe fn sharedWorkspace() -> Id; + #[method_id(notificationCenter)] pub unsafe fn notificationCenter(&self) -> Id; + #[method(openURL:)] pub unsafe fn openURL(&self, url: &NSURL) -> bool; + #[method(openURL:configuration:completionHandler:)] pub unsafe fn openURL_configuration_completionHandler( &self, @@ -24,6 +32,7 @@ extern_methods!( configuration: &NSWorkspaceOpenConfiguration, completionHandler: TodoBlock, ); + #[method(openURLs:withApplicationAtURL:configuration:completionHandler:)] pub unsafe fn openURLs_withApplicationAtURL_configuration_completionHandler( &self, @@ -32,6 +41,7 @@ extern_methods!( configuration: &NSWorkspaceOpenConfiguration, completionHandler: TodoBlock, ); + #[method(openApplicationAtURL:configuration:completionHandler:)] pub unsafe fn openApplicationAtURL_configuration_completionHandler( &self, @@ -39,29 +49,38 @@ extern_methods!( configuration: &NSWorkspaceOpenConfiguration, completionHandler: TodoBlock, ); + #[method(selectFile:inFileViewerRootedAtPath:)] pub unsafe fn selectFile_inFileViewerRootedAtPath( &self, fullPath: Option<&NSString>, rootFullPath: &NSString, ) -> bool; + #[method(activateFileViewerSelectingURLs:)] pub unsafe fn activateFileViewerSelectingURLs(&self, fileURLs: &NSArray); + #[method(showSearchResultsForQueryString:)] pub unsafe fn showSearchResultsForQueryString(&self, queryString: &NSString) -> bool; + #[method(noteFileSystemChanged:)] pub unsafe fn noteFileSystemChanged(&self, path: &NSString); + #[method(isFilePackageAtPath:)] pub unsafe fn isFilePackageAtPath(&self, fullPath: &NSString) -> bool; + #[method_id(iconForFile:)] pub unsafe fn iconForFile(&self, fullPath: &NSString) -> Id; + #[method_id(iconForFiles:)] pub unsafe fn iconForFiles( &self, fullPaths: &NSArray, ) -> Option>; + #[method_id(iconForContentType:)] pub unsafe fn iconForContentType(&self, contentType: &UTType) -> Id; + #[method(setIcon:forFile:options:)] pub unsafe fn setIcon_forFile_options( &self, @@ -69,22 +88,27 @@ extern_methods!( fullPath: &NSString, options: NSWorkspaceIconCreationOptions, ) -> bool; + #[method_id(fileLabels)] pub unsafe fn fileLabels(&self) -> Id, Shared>; + #[method_id(fileLabelColors)] pub unsafe fn fileLabelColors(&self) -> Id, Shared>; + #[method(recycleURLs:completionHandler:)] pub unsafe fn recycleURLs_completionHandler( &self, URLs: &NSArray, handler: TodoBlock, ); + #[method(duplicateURLs:completionHandler:)] pub unsafe fn duplicateURLs_completionHandler( &self, URLs: &NSArray, handler: TodoBlock, ); + #[method(getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:)] pub unsafe fn getFileSystemInfoForPath_isRemovable_isWritable_isUnmountable_description_type( &self, @@ -95,34 +119,43 @@ extern_methods!( description: Option<&mut Option>>, fileSystemType: Option<&mut Option>>, ) -> bool; + #[method(unmountAndEjectDeviceAtPath:)] pub unsafe fn unmountAndEjectDeviceAtPath(&self, path: &NSString) -> bool; + #[method(unmountAndEjectDeviceAtURL:error:)] pub unsafe fn unmountAndEjectDeviceAtURL_error( &self, url: &NSURL, ) -> Result<(), Id>; + #[method(extendPowerOffBy:)] pub unsafe fn extendPowerOffBy(&self, requested: NSInteger) -> NSInteger; + #[method(hideOtherApplications)] pub unsafe fn hideOtherApplications(&self); + #[method_id(URLForApplicationWithBundleIdentifier:)] pub unsafe fn URLForApplicationWithBundleIdentifier( &self, bundleIdentifier: &NSString, ) -> Option>; + #[method_id(URLsForApplicationsWithBundleIdentifier:)] pub unsafe fn URLsForApplicationsWithBundleIdentifier( &self, bundleIdentifier: &NSString, ) -> Id, Shared>; + #[method_id(URLForApplicationToOpenURL:)] pub unsafe fn URLForApplicationToOpenURL(&self, url: &NSURL) -> Option>; + #[method_id(URLsForApplicationsToOpenURL:)] pub unsafe fn URLsForApplicationsToOpenURL( &self, url: &NSURL, ) -> Id, Shared>; + #[method(setDefaultApplicationAtURL:toOpenContentTypeOfFileAtURL:completionHandler:)] pub unsafe fn setDefaultApplicationAtURL_toOpenContentTypeOfFileAtURL_completionHandler( &self, @@ -130,6 +163,7 @@ extern_methods!( url: &NSURL, completionHandler: TodoBlock, ); + #[method(setDefaultApplicationAtURL:toOpenURLsWithScheme:completionHandler:)] pub unsafe fn setDefaultApplicationAtURL_toOpenURLsWithScheme_completionHandler( &self, @@ -137,6 +171,7 @@ extern_methods!( urlScheme: &NSString, completionHandler: TodoBlock, ); + #[method(setDefaultApplicationAtURL:toOpenFileAtURL:completionHandler:)] pub unsafe fn setDefaultApplicationAtURL_toOpenFileAtURL_completionHandler( &self, @@ -144,16 +179,19 @@ extern_methods!( url: &NSURL, completionHandler: TodoBlock, ); + #[method_id(URLForApplicationToOpenContentType:)] pub unsafe fn URLForApplicationToOpenContentType( &self, contentType: &UTType, ) -> Option>; + #[method_id(URLsForApplicationsToOpenContentType:)] pub unsafe fn URLsForApplicationsToOpenContentType( &self, contentType: &UTType, ) -> Id, Shared>; + #[method(setDefaultApplicationAtURL:toOpenContentType:completionHandler:)] pub unsafe fn setDefaultApplicationAtURL_toOpenContentType_completionHandler( &self, @@ -161,83 +199,116 @@ extern_methods!( contentType: &UTType, completionHandler: TodoBlock, ); + #[method_id(frontmostApplication)] pub unsafe fn frontmostApplication(&self) -> Option>; + #[method_id(menuBarOwningApplication)] pub unsafe fn menuBarOwningApplication(&self) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSWorkspaceOpenConfiguration; + unsafe impl ClassType for NSWorkspaceOpenConfiguration { type Super = NSObject; } ); + extern_methods!( unsafe impl NSWorkspaceOpenConfiguration { #[method_id(configuration)] pub unsafe fn configuration() -> Id; + #[method(promptsUserIfNeeded)] pub unsafe fn promptsUserIfNeeded(&self) -> bool; + #[method(setPromptsUserIfNeeded:)] pub unsafe fn setPromptsUserIfNeeded(&self, promptsUserIfNeeded: bool); + #[method(addsToRecentItems)] pub unsafe fn addsToRecentItems(&self) -> bool; + #[method(setAddsToRecentItems:)] pub unsafe fn setAddsToRecentItems(&self, addsToRecentItems: bool); + #[method(activates)] pub unsafe fn activates(&self) -> bool; + #[method(setActivates:)] pub unsafe fn setActivates(&self, activates: bool); + #[method(hides)] pub unsafe fn hides(&self) -> bool; + #[method(setHides:)] pub unsafe fn setHides(&self, hides: bool); + #[method(hidesOthers)] pub unsafe fn hidesOthers(&self) -> bool; + #[method(setHidesOthers:)] pub unsafe fn setHidesOthers(&self, hidesOthers: bool); + #[method(isForPrinting)] pub unsafe fn isForPrinting(&self) -> bool; + #[method(setForPrinting:)] pub unsafe fn setForPrinting(&self, forPrinting: bool); + #[method(createsNewApplicationInstance)] pub unsafe fn createsNewApplicationInstance(&self) -> bool; + #[method(setCreatesNewApplicationInstance:)] pub unsafe fn setCreatesNewApplicationInstance(&self, createsNewApplicationInstance: bool); + #[method(allowsRunningApplicationSubstitution)] pub unsafe fn allowsRunningApplicationSubstitution(&self) -> bool; + #[method(setAllowsRunningApplicationSubstitution:)] pub unsafe fn setAllowsRunningApplicationSubstitution( &self, allowsRunningApplicationSubstitution: bool, ); + #[method_id(arguments)] pub unsafe fn arguments(&self) -> Id, Shared>; + #[method(setArguments:)] pub unsafe fn setArguments(&self, arguments: &NSArray); + #[method_id(environment)] pub unsafe fn environment(&self) -> Id, Shared>; + #[method(setEnvironment:)] pub unsafe fn setEnvironment(&self, environment: &NSDictionary); + #[method_id(appleEvent)] pub unsafe fn appleEvent(&self) -> Option>; + #[method(setAppleEvent:)] pub unsafe fn setAppleEvent(&self, appleEvent: Option<&NSAppleEventDescriptor>); + #[method(architecture)] pub unsafe fn architecture(&self) -> cpu_type_t; + #[method(setArchitecture:)] pub unsafe fn setArchitecture(&self, architecture: cpu_type_t); + #[method(requiresUniversalLinks)] pub unsafe fn requiresUniversalLinks(&self) -> bool; + #[method(setRequiresUniversalLinks:)] pub unsafe fn setRequiresUniversalLinks(&self, requiresUniversalLinks: bool); } ); + pub type NSWorkspaceDesktopImageOptionKey = NSString; + extern_methods!( - #[doc = "NSDesktopImages"] + /// NSDesktopImages unsafe impl NSWorkspace { #[method(setDesktopImageURL:forScreen:options:error:)] pub unsafe fn setDesktopImageURL_forScreen_options_error( @@ -246,11 +317,13 @@ extern_methods!( screen: &NSScreen, options: &NSDictionary, ) -> Result<(), Id>; + #[method_id(desktopImageURLForScreen:)] pub unsafe fn desktopImageURLForScreen( &self, screen: &NSScreen, ) -> Option>; + #[method_id(desktopImageOptionsForScreen:)] pub unsafe fn desktopImageOptionsForScreen( &self, @@ -258,18 +331,22 @@ extern_methods!( ) -> Option, Shared>>; } ); + extern_class!( #[derive(Debug)] pub struct NSWorkspaceAuthorization; + unsafe impl ClassType for NSWorkspaceAuthorization { type Super = NSObject; } ); + extern_methods!( unsafe impl NSWorkspaceAuthorization {} ); + extern_methods!( - #[doc = "NSWorkspaceAuthorization"] + /// NSWorkspaceAuthorization unsafe impl NSWorkspace { #[method(requestAuthorizationOfType:completionHandler:)] pub unsafe fn requestAuthorizationOfType_completionHandler( @@ -279,8 +356,9 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSWorkspaceAuthorization"] + /// NSWorkspaceAuthorization unsafe impl NSFileManager { #[method_id(fileManagerWithAuthorization:)] pub unsafe fn fileManagerWithAuthorization( @@ -288,19 +366,24 @@ extern_methods!( ) -> Id; } ); + pub type NSWorkspaceFileOperationName = NSString; + pub type NSWorkspaceLaunchConfigurationKey = NSString; + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSWorkspace { #[method(openFile:)] pub unsafe fn openFile(&self, fullPath: &NSString) -> bool; + #[method(openFile:withApplication:)] pub unsafe fn openFile_withApplication( &self, fullPath: &NSString, appName: Option<&NSString>, ) -> bool; + #[method(openFile:withApplication:andDeactivate:)] pub unsafe fn openFile_withApplication_andDeactivate( &self, @@ -308,8 +391,10 @@ extern_methods!( appName: Option<&NSString>, flag: bool, ) -> bool; + #[method(launchApplication:)] pub unsafe fn launchApplication(&self, appName: &NSString) -> bool; + #[method_id(launchApplicationAtURL:options:configuration:error:)] pub unsafe fn launchApplicationAtURL_options_configuration_error( &self, @@ -317,6 +402,7 @@ extern_methods!( options: NSWorkspaceLaunchOptions, configuration: &NSDictionary, ) -> Result, Id>; + #[method_id(openURL:options:configuration:error:)] pub unsafe fn openURL_options_configuration_error( &self, @@ -324,6 +410,7 @@ extern_methods!( options: NSWorkspaceLaunchOptions, configuration: &NSDictionary, ) -> Result, Id>; + #[method_id(openURLs:withApplicationAtURL:options:configuration:error:)] pub unsafe fn openURLs_withApplicationAtURL_options_configuration_error( &self, @@ -332,6 +419,7 @@ extern_methods!( options: NSWorkspaceLaunchOptions, configuration: &NSDictionary, ) -> Result, Id>; + #[method(launchApplication:showIcon:autolaunch:)] pub unsafe fn launchApplication_showIcon_autolaunch( &self, @@ -339,16 +427,19 @@ extern_methods!( showIcon: bool, autolaunch: bool, ) -> bool; + #[method_id(fullPathForApplication:)] pub unsafe fn fullPathForApplication( &self, appName: &NSString, ) -> Option>; + #[method_id(absolutePathForAppBundleWithIdentifier:)] pub unsafe fn absolutePathForAppBundleWithIdentifier( &self, bundleIdentifier: &NSString, ) -> Option>; + #[method(launchAppWithBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifier:)] pub unsafe fn launchAppWithBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifier( &self, @@ -357,6 +448,7 @@ extern_methods!( descriptor: Option<&NSAppleEventDescriptor>, identifier: Option<&mut Option>>, ) -> bool; + #[method(openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:)] pub unsafe fn openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers( &self, @@ -366,12 +458,16 @@ extern_methods!( descriptor: Option<&NSAppleEventDescriptor>, identifiers: Option<&mut Option, Shared>>>, ) -> bool; + #[method(openTempFile:)] pub unsafe fn openTempFile(&self, fullPath: &NSString) -> bool; + #[method(findApplications)] pub unsafe fn findApplications(&self); + #[method(noteUserDefaultsChanged)] pub unsafe fn noteUserDefaultsChanged(&self); + #[method(slideImage:from:to:)] pub unsafe fn slideImage_from_to( &self, @@ -379,24 +475,34 @@ extern_methods!( fromPoint: NSPoint, toPoint: NSPoint, ); + #[method(checkForRemovableMedia)] pub unsafe fn checkForRemovableMedia(&self); + #[method(noteFileSystemChanged)] pub unsafe fn noteFileSystemChanged(&self); + #[method(fileSystemChanged)] pub unsafe fn fileSystemChanged(&self) -> bool; + #[method(userDefaultsChanged)] pub unsafe fn userDefaultsChanged(&self) -> bool; + #[method_id(mountNewRemovableMedia)] pub unsafe fn mountNewRemovableMedia(&self) -> Option>; + #[method_id(activeApplication)] pub unsafe fn activeApplication(&self) -> Option>; + #[method_id(mountedLocalVolumePaths)] pub unsafe fn mountedLocalVolumePaths(&self) -> Option>; + #[method_id(mountedRemovableMedia)] pub unsafe fn mountedRemovableMedia(&self) -> Option>; + #[method_id(launchedApplications)] pub unsafe fn launchedApplications(&self) -> Option>; + #[method(openFile:fromImage:at:inView:)] pub unsafe fn openFile_fromImage_at_inView( &self, @@ -405,6 +511,7 @@ extern_methods!( point: NSPoint, view: Option<&NSView>, ) -> bool; + #[method(performFileOperation:source:destination:files:tag:)] pub unsafe fn performFileOperation_source_destination_files_tag( &self, @@ -414,6 +521,7 @@ extern_methods!( files: &NSArray, tag: *mut NSInteger, ) -> bool; + #[method(getInfoForFile:application:type:)] pub unsafe fn getInfoForFile_application_type( &self, @@ -421,29 +529,35 @@ extern_methods!( appName: Option<&mut Option>>, type_: Option<&mut Option>>, ) -> bool; + #[method_id(iconForFileType:)] pub unsafe fn iconForFileType(&self, fileType: &NSString) -> Id; + #[method_id(typeOfFile:error:)] pub unsafe fn typeOfFile_error( &self, absoluteFilePath: &NSString, ) -> Result, Id>; + #[method_id(localizedDescriptionForType:)] pub unsafe fn localizedDescriptionForType( &self, typeName: &NSString, ) -> Option>; + #[method_id(preferredFilenameExtensionForType:)] pub unsafe fn preferredFilenameExtensionForType( &self, typeName: &NSString, ) -> Option>; + #[method(filenameExtension:isValidForType:)] pub unsafe fn filenameExtension_isValidForType( &self, filenameExtension: &NSString, typeName: &NSString, ) -> bool; + #[method(type:conformsToType:)] pub unsafe fn type_conformsToType( &self, diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/Foundation/FoundationErrors.rs +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs +++ b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index 725808413..30cbaff47 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -1,44 +1,63 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAffineTransform; + unsafe impl ClassType for NSAffineTransform { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAffineTransform { #[method_id(transform)] pub unsafe fn transform() -> Id; + #[method_id(initWithTransform:)] pub unsafe fn initWithTransform(&self, transform: &NSAffineTransform) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method(translateXBy:yBy:)] pub unsafe fn translateXBy_yBy(&self, deltaX: CGFloat, deltaY: CGFloat); + #[method(rotateByDegrees:)] pub unsafe fn rotateByDegrees(&self, angle: CGFloat); + #[method(rotateByRadians:)] pub unsafe fn rotateByRadians(&self, angle: CGFloat); + #[method(scaleBy:)] pub unsafe fn scaleBy(&self, scale: CGFloat); + #[method(scaleXBy:yBy:)] pub unsafe fn scaleXBy_yBy(&self, scaleX: CGFloat, scaleY: CGFloat); + #[method(invert)] pub unsafe fn invert(&self); + #[method(appendTransform:)] pub unsafe fn appendTransform(&self, transform: &NSAffineTransform); + #[method(prependTransform:)] pub unsafe fn prependTransform(&self, transform: &NSAffineTransform); + #[method(transformPoint:)] pub unsafe fn transformPoint(&self, aPoint: NSPoint) -> NSPoint; + #[method(transformSize:)] pub unsafe fn transformSize(&self, aSize: NSSize) -> NSSize; + #[method(transformStruct)] pub unsafe fn transformStruct(&self) -> NSAffineTransformStruct; + #[method(setTransformStruct:)] pub unsafe fn setTransformStruct(&self, transformStruct: NSAffineTransformStruct); } diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index fd5833d08..0f1101619 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -1,53 +1,69 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAppleEventDescriptor; + unsafe impl ClassType for NSAppleEventDescriptor { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAppleEventDescriptor { #[method_id(nullDescriptor)] pub unsafe fn nullDescriptor() -> Id; + #[method_id(descriptorWithDescriptorType:bytes:length:)] pub unsafe fn descriptorWithDescriptorType_bytes_length( descriptorType: DescType, bytes: *mut c_void, byteCount: NSUInteger, ) -> Option>; + #[method_id(descriptorWithDescriptorType:data:)] pub unsafe fn descriptorWithDescriptorType_data( descriptorType: DescType, data: Option<&NSData>, ) -> Option>; + #[method_id(descriptorWithBoolean:)] pub unsafe fn descriptorWithBoolean(boolean: Boolean) -> Id; + #[method_id(descriptorWithEnumCode:)] pub unsafe fn descriptorWithEnumCode( enumerator: OSType, ) -> Id; + #[method_id(descriptorWithInt32:)] pub unsafe fn descriptorWithInt32(signedInt: SInt32) -> Id; + #[method_id(descriptorWithDouble:)] pub unsafe fn descriptorWithDouble( doubleValue: c_double, ) -> Id; + #[method_id(descriptorWithTypeCode:)] pub unsafe fn descriptorWithTypeCode( typeCode: OSType, ) -> Id; + #[method_id(descriptorWithString:)] pub unsafe fn descriptorWithString(string: &NSString) -> Id; + #[method_id(descriptorWithDate:)] pub unsafe fn descriptorWithDate(date: &NSDate) -> Id; + #[method_id(descriptorWithFileURL:)] pub unsafe fn descriptorWithFileURL(fileURL: &NSURL) -> Id; + #[method_id(appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] pub unsafe fn appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID( eventClass: AEEventClass, @@ -56,26 +72,34 @@ extern_methods!( returnID: AEReturnID, transactionID: AETransactionID, ) -> Id; + #[method_id(listDescriptor)] pub unsafe fn listDescriptor() -> Id; + #[method_id(recordDescriptor)] pub unsafe fn recordDescriptor() -> Id; + #[method_id(currentProcessDescriptor)] pub unsafe fn currentProcessDescriptor() -> Id; + #[method_id(descriptorWithProcessIdentifier:)] pub unsafe fn descriptorWithProcessIdentifier( processIdentifier: pid_t, ) -> Id; + #[method_id(descriptorWithBundleIdentifier:)] pub unsafe fn descriptorWithBundleIdentifier( bundleIdentifier: &NSString, ) -> Id; + #[method_id(descriptorWithApplicationURL:)] pub unsafe fn descriptorWithApplicationURL( applicationURL: &NSURL, ) -> Id; + #[method_id(initWithAEDescNoCopy:)] pub unsafe fn initWithAEDescNoCopy(&self, aeDesc: NonNull) -> Id; + #[method_id(initWithDescriptorType:bytes:length:)] pub unsafe fn initWithDescriptorType_bytes_length( &self, @@ -83,12 +107,14 @@ extern_methods!( bytes: *mut c_void, byteCount: NSUInteger, ) -> Option>; + #[method_id(initWithDescriptorType:data:)] pub unsafe fn initWithDescriptorType_data( &self, descriptorType: DescType, data: Option<&NSData>, ) -> Option>; + #[method_id(initWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] pub unsafe fn initWithEventClass_eventID_targetDescriptor_returnID_transactionID( &self, @@ -98,102 +124,135 @@ extern_methods!( returnID: AEReturnID, transactionID: AETransactionID, ) -> Id; + #[method_id(initListDescriptor)] pub unsafe fn initListDescriptor(&self) -> Id; + #[method_id(initRecordDescriptor)] pub unsafe fn initRecordDescriptor(&self) -> Id; + #[method(aeDesc)] pub unsafe fn aeDesc(&self) -> *mut AEDesc; + #[method(descriptorType)] pub unsafe fn descriptorType(&self) -> DescType; + #[method_id(data)] pub unsafe fn data(&self) -> Id; + #[method(booleanValue)] pub unsafe fn booleanValue(&self) -> Boolean; + #[method(enumCodeValue)] pub unsafe fn enumCodeValue(&self) -> OSType; + #[method(int32Value)] pub unsafe fn int32Value(&self) -> SInt32; + #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[method(typeCodeValue)] pub unsafe fn typeCodeValue(&self) -> OSType; + #[method_id(stringValue)] pub unsafe fn stringValue(&self) -> Option>; + #[method_id(dateValue)] pub unsafe fn dateValue(&self) -> Option>; + #[method_id(fileURLValue)] pub unsafe fn fileURLValue(&self) -> Option>; + #[method(eventClass)] pub unsafe fn eventClass(&self) -> AEEventClass; + #[method(eventID)] pub unsafe fn eventID(&self) -> AEEventID; + #[method(returnID)] pub unsafe fn returnID(&self) -> AEReturnID; + #[method(transactionID)] pub unsafe fn transactionID(&self) -> AETransactionID; + #[method(setParamDescriptor:forKeyword:)] pub unsafe fn setParamDescriptor_forKeyword( &self, descriptor: &NSAppleEventDescriptor, keyword: AEKeyword, ); + #[method_id(paramDescriptorForKeyword:)] pub unsafe fn paramDescriptorForKeyword( &self, keyword: AEKeyword, ) -> Option>; + #[method(removeParamDescriptorWithKeyword:)] pub unsafe fn removeParamDescriptorWithKeyword(&self, keyword: AEKeyword); + #[method(setAttributeDescriptor:forKeyword:)] pub unsafe fn setAttributeDescriptor_forKeyword( &self, descriptor: &NSAppleEventDescriptor, keyword: AEKeyword, ); + #[method_id(attributeDescriptorForKeyword:)] pub unsafe fn attributeDescriptorForKeyword( &self, keyword: AEKeyword, ) -> Option>; + #[method_id(sendEventWithOptions:timeout:error:)] pub unsafe fn sendEventWithOptions_timeout_error( &self, sendOptions: NSAppleEventSendOptions, timeoutInSeconds: NSTimeInterval, ) -> Result, Id>; + #[method(isRecordDescriptor)] pub unsafe fn isRecordDescriptor(&self) -> bool; + #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; + #[method(insertDescriptor:atIndex:)] pub unsafe fn insertDescriptor_atIndex( &self, descriptor: &NSAppleEventDescriptor, index: NSInteger, ); + #[method_id(descriptorAtIndex:)] pub unsafe fn descriptorAtIndex( &self, index: NSInteger, ) -> Option>; + #[method(removeDescriptorAtIndex:)] pub unsafe fn removeDescriptorAtIndex(&self, index: NSInteger); + #[method(setDescriptor:forKeyword:)] pub unsafe fn setDescriptor_forKeyword( &self, descriptor: &NSAppleEventDescriptor, keyword: AEKeyword, ); + #[method_id(descriptorForKeyword:)] pub unsafe fn descriptorForKeyword( &self, keyword: AEKeyword, ) -> Option>; + #[method(removeDescriptorWithKeyword:)] pub unsafe fn removeDescriptorWithKeyword(&self, keyword: AEKeyword); + #[method(keywordForDescriptorAtIndex:)] pub unsafe fn keywordForDescriptorAtIndex(&self, index: NSInteger) -> AEKeyword; + #[method_id(coerceToDescriptorType:)] pub unsafe fn coerceToDescriptorType( &self, diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index e68fdd53a..b9ec49321 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -1,18 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAppleEventManager; + unsafe impl ClassType for NSAppleEventManager { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAppleEventManager { #[method_id(sharedAppleEventManager)] pub unsafe fn sharedAppleEventManager() -> Id; + #[method(setEventHandler:andSelector:forEventClass:andEventID:)] pub unsafe fn setEventHandler_andSelector_forEventClass_andEventID( &self, @@ -21,12 +27,14 @@ extern_methods!( eventClass: AEEventClass, eventID: AEEventID, ); + #[method(removeEventHandlerForEventClass:andEventID:)] pub unsafe fn removeEventHandlerForEventClass_andEventID( &self, eventClass: AEEventClass, eventID: AEEventID, ); + #[method(dispatchRawAppleEvent:withRawReply:handlerRefCon:)] pub unsafe fn dispatchRawAppleEvent_withRawReply_handlerRefCon( &self, @@ -34,27 +42,34 @@ extern_methods!( theReply: NonNull, handlerRefCon: SRefCon, ) -> OSErr; + #[method_id(currentAppleEvent)] pub unsafe fn currentAppleEvent(&self) -> Option>; + #[method_id(currentReplyAppleEvent)] pub unsafe fn currentReplyAppleEvent(&self) -> Option>; + #[method(suspendCurrentAppleEvent)] pub unsafe fn suspendCurrentAppleEvent(&self) -> NSAppleEventManagerSuspensionID; + #[method_id(appleEventForSuspensionID:)] pub unsafe fn appleEventForSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, ) -> Id; + #[method_id(replyAppleEventForSuspensionID:)] pub unsafe fn replyAppleEventForSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, ) -> Id; + #[method(setCurrentAppleEventAndReplyEventWithSuspensionID:)] pub unsafe fn setCurrentAppleEventAndReplyEventWithSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, ); + #[method(resumeWithSuspensionID:)] pub unsafe fn resumeWithSuspensionID(&self, suspensionID: NSAppleEventManagerSuspensionID); } diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index d67171002..a1e7cb134 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAppleScript; + unsafe impl ClassType for NSAppleScript { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAppleScript { #[method_id(initWithContentsOfURL:error:)] @@ -17,22 +22,28 @@ extern_methods!( url: &NSURL, errorInfo: Option<&mut Option, Shared>>>, ) -> Option>; + #[method_id(initWithSource:)] pub unsafe fn initWithSource(&self, source: &NSString) -> Option>; + #[method_id(source)] pub unsafe fn source(&self) -> Option>; + #[method(isCompiled)] pub unsafe fn isCompiled(&self) -> bool; + #[method(compileAndReturnError:)] pub unsafe fn compileAndReturnError( &self, errorInfo: Option<&mut Option, Shared>>>, ) -> bool; + #[method_id(executeAndReturnError:)] pub unsafe fn executeAndReturnError( &self, errorInfo: Option<&mut Option, Shared>>>, ) -> Id; + #[method_id(executeAppleEvent:error:)] pub unsafe fn executeAppleEvent_error( &self, diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 05ef63485..aa7362689 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSArchiver; + unsafe impl ClassType for NSArchiver { type Super = NSCoder; } ); + extern_methods!( unsafe impl NSArchiver { #[method_id(initForWritingWithMutableData:)] @@ -16,80 +21,104 @@ extern_methods!( &self, mdata: &NSMutableData, ) -> Id; + #[method_id(archiverData)] pub unsafe fn archiverData(&self) -> Id; + #[method(encodeRootObject:)] pub unsafe fn encodeRootObject(&self, rootObject: &Object); + #[method(encodeConditionalObject:)] pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>); + #[method_id(archivedDataWithRootObject:)] pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id; + #[method(archiveRootObject:toFile:)] pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool; + #[method(encodeClassName:intoClassName:)] pub unsafe fn encodeClassName_intoClassName( &self, trueName: &NSString, inArchiveName: &NSString, ); + #[method_id(classNameEncodedForTrueClassName:)] pub unsafe fn classNameEncodedForTrueClassName( &self, trueName: &NSString, ) -> Option>; + #[method(replaceObject:withObject:)] pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object); } ); + extern_class!( #[derive(Debug)] pub struct NSUnarchiver; + unsafe impl ClassType for NSUnarchiver { type Super = NSCoder; } ); + extern_methods!( unsafe impl NSUnarchiver { #[method_id(initForReadingWithData:)] pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Option>; + #[method(setObjectZone:)] pub unsafe fn setObjectZone(&self, zone: *mut NSZone); + #[method(objectZone)] pub unsafe fn objectZone(&self) -> *mut NSZone; + #[method(isAtEnd)] pub unsafe fn isAtEnd(&self) -> bool; + #[method(systemVersion)] pub unsafe fn systemVersion(&self) -> c_uint; + #[method_id(unarchiveObjectWithData:)] pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option>; + #[method_id(unarchiveObjectWithFile:)] pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option>; + #[method(decodeClassName:asClassName:)] pub unsafe fn decodeClassName_asClassName(inArchiveName: &NSString, trueName: &NSString); + #[method(decodeClassName:asClassName:)] pub unsafe fn decodeClassName_asClassName( &self, inArchiveName: &NSString, trueName: &NSString, ); + #[method_id(classNameDecodedForArchiveClassName:)] pub unsafe fn classNameDecodedForArchiveClassName( inArchiveName: &NSString, ) -> Id; + #[method_id(classNameDecodedForArchiveClassName:)] pub unsafe fn classNameDecodedForArchiveClassName( &self, inArchiveName: &NSString, ) -> Id; + #[method(replaceObject:withObject:)] pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object); } ); + extern_methods!( - #[doc = "NSArchiverCallback"] + /// NSArchiverCallback unsafe impl NSObject { #[method(classForArchiver)] pub unsafe fn classForArchiver(&self) -> Option<&Class>; + #[method_id(replacementObjectForArchiver:)] pub unsafe fn replacementObjectForArchiver( &self, diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 9002e0a76..5236a205c 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -1,102 +1,132 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSArray; + unsafe impl ClassType for NSArray { type Super = NSObject; } ); + extern_methods!( unsafe impl NSArray { #[method(count)] pub unsafe fn count(&self) -> NSUInteger; + #[method_id(objectAtIndex:)] pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithObjects:count:)] pub unsafe fn initWithObjects_count( &self, objects: TodoArray, cnt: NSUInteger, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSExtendedArray"] + /// NSExtendedArray unsafe impl NSArray { #[method_id(arrayByAddingObject:)] pub unsafe fn arrayByAddingObject( &self, anObject: &ObjectType, ) -> Id, Shared>; + #[method_id(arrayByAddingObjectsFromArray:)] pub unsafe fn arrayByAddingObjectsFromArray( &self, otherArray: &NSArray, ) -> Id, Shared>; + #[method_id(componentsJoinedByString:)] pub unsafe fn componentsJoinedByString(&self, separator: &NSString) -> Id; + #[method(containsObject:)] pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool; + #[method_id(description)] pub unsafe fn description(&self) -> Id; + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; + #[method_id(descriptionWithLocale:indent:)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, level: NSUInteger, ) -> Id; + #[method_id(firstObjectCommonWithArray:)] pub unsafe fn firstObjectCommonWithArray( &self, otherArray: &NSArray, ) -> Option>; + #[method(getObjects:range:)] pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange); + #[method(indexOfObject:)] pub unsafe fn indexOfObject(&self, anObject: &ObjectType) -> NSUInteger; + #[method(indexOfObject:inRange:)] pub unsafe fn indexOfObject_inRange( &self, anObject: &ObjectType, range: NSRange, ) -> NSUInteger; + #[method(indexOfObjectIdenticalTo:)] pub unsafe fn indexOfObjectIdenticalTo(&self, anObject: &ObjectType) -> NSUInteger; + #[method(indexOfObjectIdenticalTo:inRange:)] pub unsafe fn indexOfObjectIdenticalTo_inRange( &self, anObject: &ObjectType, range: NSRange, ) -> NSUInteger; + #[method(isEqualToArray:)] pub unsafe fn isEqualToArray(&self, otherArray: &NSArray) -> bool; + #[method_id(firstObject)] pub unsafe fn firstObject(&self) -> Option>; + #[method_id(lastObject)] pub unsafe fn lastObject(&self) -> Option>; + #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + #[method_id(reverseObjectEnumerator)] pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared>; + #[method_id(sortedArrayHint)] pub unsafe fn sortedArrayHint(&self) -> Id; + #[method_id(sortedArrayUsingFunction:context:)] pub unsafe fn sortedArrayUsingFunction_context( &self, comparator: NonNull, context: *mut c_void, ) -> Id, Shared>; + #[method_id(sortedArrayUsingFunction:context:hint:)] pub unsafe fn sortedArrayUsingFunction_context_hint( &self, @@ -104,38 +134,48 @@ extern_methods!( context: *mut c_void, hint: Option<&NSData>, ) -> Id, Shared>; + #[method_id(sortedArrayUsingSelector:)] pub unsafe fn sortedArrayUsingSelector( &self, comparator: Sel, ) -> Id, Shared>; + #[method_id(subarrayWithRange:)] pub unsafe fn subarrayWithRange(&self, range: NSRange) -> Id, Shared>; + #[method(writeToURL:error:)] pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id>; + #[method(makeObjectsPerformSelector:)] pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel); + #[method(makeObjectsPerformSelector:withObject:)] pub unsafe fn makeObjectsPerformSelector_withObject( &self, aSelector: Sel, argument: Option<&Object>, ); + #[method_id(objectsAtIndexes:)] pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet, ) -> Id, Shared>; + #[method_id(objectAtIndexedSubscript:)] pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; + #[method(enumerateObjectsUsingBlock:)] pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); + #[method(enumerateObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); + #[method(enumerateObjectsAtIndexes:options:usingBlock:)] pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( &self, @@ -143,14 +183,17 @@ extern_methods!( opts: NSEnumerationOptions, block: TodoBlock, ); + #[method(indexOfObjectPassingTest:)] pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger; + #[method(indexOfObjectWithOptions:passingTest:)] pub unsafe fn indexOfObjectWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; + #[method(indexOfObjectAtIndexes:options:passingTest:)] pub unsafe fn indexOfObjectAtIndexes_options_passingTest( &self, @@ -158,17 +201,20 @@ extern_methods!( opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; + #[method_id(indexesOfObjectsPassingTest:)] pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: TodoBlock, ) -> Id; + #[method_id(indexesOfObjectsWithOptions:passingTest:)] pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; + #[method_id(indexesOfObjectsAtIndexes:options:passingTest:)] pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, @@ -176,17 +222,20 @@ extern_methods!( opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; + #[method_id(sortedArrayUsingComparator:)] pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator, ) -> Id, Shared>; + #[method_id(sortedArrayWithOptions:usingComparator:)] pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, ) -> Id, Shared>; + #[method(indexOfObject:inSortedRange:options:usingComparator:)] pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, @@ -197,41 +246,50 @@ extern_methods!( ) -> NSUInteger; } ); + extern_methods!( - #[doc = "NSArrayCreation"] + /// NSArrayCreation unsafe impl NSArray { #[method_id(array)] pub unsafe fn array() -> Id; + #[method_id(arrayWithObject:)] pub unsafe fn arrayWithObject(anObject: &ObjectType) -> Id; + #[method_id(arrayWithObjects:count:)] pub unsafe fn arrayWithObjects_count( objects: TodoArray, cnt: NSUInteger, ) -> Id; + #[method_id(arrayWithArray:)] pub unsafe fn arrayWithArray(array: &NSArray) -> Id; + #[method_id(initWithArray:)] pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; + #[method_id(initWithArray:copyItems:)] pub unsafe fn initWithArray_copyItems( &self, array: &NSArray, flag: bool, ) -> Id; + #[method_id(initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, ) -> Result, Shared>, Id>; + #[method_id(arrayWithContentsOfURL:error:)] pub unsafe fn arrayWithContentsOfURL_error( url: &NSURL, ) -> Result, Shared>, Id>; } ); + extern_methods!( - #[doc = "NSArrayDiffing"] + /// NSArrayDiffing unsafe impl NSArray { #[method_id(differenceFromArray:withOptions:usingEquivalenceTest:)] pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( @@ -240,17 +298,20 @@ extern_methods!( options: NSOrderedCollectionDifferenceCalculationOptions, block: TodoBlock, ) -> Id, Shared>; + #[method_id(differenceFromArray:withOptions:)] pub unsafe fn differenceFromArray_withOptions( &self, other: &NSArray, options: NSOrderedCollectionDifferenceCalculationOptions, ) -> Id, Shared>; + #[method_id(differenceFromArray:)] pub unsafe fn differenceFromArray( &self, other: &NSArray, ) -> Id, Shared>; + #[method_id(arrayByApplyingDifference:)] pub unsafe fn arrayByApplyingDifference( &self, @@ -258,101 +319,129 @@ extern_methods!( ) -> Option, Shared>>; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSArray { #[method(getObjects:)] pub unsafe fn getObjects(&self, objects: TodoArray); + #[method_id(arrayWithContentsOfFile:)] pub unsafe fn arrayWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; + #[method_id(arrayWithContentsOfURL:)] pub unsafe fn arrayWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, ) -> Option, Shared>>; + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, url: &NSURL, ) -> Option, Shared>>; + #[method(writeToFile:atomically:)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, ) -> bool; + #[method(writeToURL:atomically:)] pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; } ); + __inner_extern_class!( #[derive(Debug)] pub struct NSMutableArray; + unsafe impl ClassType for NSMutableArray { type Super = NSArray; } ); + extern_methods!( unsafe impl NSMutableArray { #[method(addObject:)] pub unsafe fn addObject(&self, anObject: &ObjectType); + #[method(insertObject:atIndex:)] pub unsafe fn insertObject_atIndex(&self, anObject: &ObjectType, index: NSUInteger); + #[method(removeLastObject)] pub unsafe fn removeLastObject(&self); + #[method(removeObjectAtIndex:)] pub unsafe fn removeObjectAtIndex(&self, index: NSUInteger); + #[method(replaceObjectAtIndex:withObject:)] pub unsafe fn replaceObjectAtIndex_withObject( &self, index: NSUInteger, anObject: &ObjectType, ); + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSExtendedMutableArray"] + /// NSExtendedMutableArray unsafe impl NSMutableArray { #[method(addObjectsFromArray:)] pub unsafe fn addObjectsFromArray(&self, otherArray: &NSArray); + #[method(exchangeObjectAtIndex:withObjectAtIndex:)] pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( &self, idx1: NSUInteger, idx2: NSUInteger, ); + #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); + #[method(removeObject:inRange:)] pub unsafe fn removeObject_inRange(&self, anObject: &ObjectType, range: NSRange); + #[method(removeObject:)] pub unsafe fn removeObject(&self, anObject: &ObjectType); + #[method(removeObjectIdenticalTo:inRange:)] pub unsafe fn removeObjectIdenticalTo_inRange(&self, anObject: &ObjectType, range: NSRange); + #[method(removeObjectIdenticalTo:)] pub unsafe fn removeObjectIdenticalTo(&self, anObject: &ObjectType); + #[method(removeObjectsFromIndices:numIndices:)] pub unsafe fn removeObjectsFromIndices_numIndices( &self, indices: NonNull, cnt: NSUInteger, ); + #[method(removeObjectsInArray:)] pub unsafe fn removeObjectsInArray(&self, otherArray: &NSArray); + #[method(removeObjectsInRange:)] pub unsafe fn removeObjectsInRange(&self, range: NSRange); + #[method(replaceObjectsInRange:withObjectsFromArray:range:)] pub unsafe fn replaceObjectsInRange_withObjectsFromArray_range( &self, @@ -360,40 +449,50 @@ extern_methods!( otherArray: &NSArray, otherRange: NSRange, ); + #[method(replaceObjectsInRange:withObjectsFromArray:)] pub unsafe fn replaceObjectsInRange_withObjectsFromArray( &self, range: NSRange, otherArray: &NSArray, ); + #[method(setArray:)] pub unsafe fn setArray(&self, otherArray: &NSArray); + #[method(sortUsingFunction:context:)] pub unsafe fn sortUsingFunction_context( &self, compare: NonNull, context: *mut c_void, ); + #[method(sortUsingSelector:)] pub unsafe fn sortUsingSelector(&self, comparator: Sel); + #[method(insertObjects:atIndexes:)] pub unsafe fn insertObjects_atIndexes( &self, objects: &NSArray, indexes: &NSIndexSet, ); + #[method(removeObjectsAtIndexes:)] pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet); + #[method(replaceObjectsAtIndexes:withObjects:)] pub unsafe fn replaceObjectsAtIndexes_withObjects( &self, indexes: &NSIndexSet, objects: &NSArray, ); + #[method(setObject:atIndexedSubscript:)] pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger); + #[method(sortUsingComparator:)] pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator); + #[method(sortWithOptions:usingComparator:)] pub unsafe fn sortWithOptions_usingComparator( &self, @@ -402,24 +501,29 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSMutableArrayCreation"] + /// NSMutableArrayCreation unsafe impl NSMutableArray { #[method_id(arrayWithCapacity:)] pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id; + #[method_id(arrayWithContentsOfFile:)] pub unsafe fn arrayWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; + #[method_id(arrayWithContentsOfURL:)] pub unsafe fn arrayWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, ) -> Option, Shared>>; + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, @@ -427,8 +531,9 @@ extern_methods!( ) -> Option, Shared>>; } ); + extern_methods!( - #[doc = "NSMutableArrayDiffing"] + /// NSMutableArrayDiffing unsafe impl NSMutableArray { #[method(applyDifference:)] pub unsafe fn applyDifference( diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index 15bc317c6..fb7e50277 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -1,19 +1,26 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSAttributedStringKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSAttributedString; + unsafe impl ClassType for NSAttributedString { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAttributedString { #[method_id(string)] pub unsafe fn string(&self) -> Id; + #[method_id(attributesAtIndex:effectiveRange:)] pub unsafe fn attributesAtIndex_effectiveRange( &self, @@ -22,11 +29,13 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSExtendedAttributedString"] + /// NSExtendedAttributedString unsafe impl NSAttributedString { #[method(length)] pub unsafe fn length(&self) -> NSUInteger; + #[method_id(attribute:atIndex:effectiveRange:)] pub unsafe fn attribute_atIndex_effectiveRange( &self, @@ -34,11 +43,13 @@ extern_methods!( location: NSUInteger, range: NSRangePointer, ) -> Option>; + #[method_id(attributedSubstringFromRange:)] pub unsafe fn attributedSubstringFromRange( &self, range: NSRange, ) -> Id; + #[method_id(attributesAtIndex:longestEffectiveRange:inRange:)] pub unsafe fn attributesAtIndex_longestEffectiveRange_inRange( &self, @@ -46,6 +57,7 @@ extern_methods!( range: NSRangePointer, rangeLimit: NSRange, ) -> Id, Shared>; + #[method_id(attribute:atIndex:longestEffectiveRange:inRange:)] pub unsafe fn attribute_atIndex_longestEffectiveRange_inRange( &self, @@ -54,21 +66,26 @@ extern_methods!( range: NSRangePointer, rangeLimit: NSRange, ) -> Option>; + #[method(isEqualToAttributedString:)] pub unsafe fn isEqualToAttributedString(&self, other: &NSAttributedString) -> bool; + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, str: &NSString) -> Id; + #[method_id(initWithString:attributes:)] pub unsafe fn initWithString_attributes( &self, str: &NSString, attrs: Option<&NSDictionary>, ) -> Id; + #[method_id(initWithAttributedString:)] pub unsafe fn initWithAttributedString( &self, attrStr: &NSAttributedString, ) -> Id; + #[method(enumerateAttributesInRange:options:usingBlock:)] pub unsafe fn enumerateAttributesInRange_options_usingBlock( &self, @@ -76,6 +93,7 @@ extern_methods!( opts: NSAttributedStringEnumerationOptions, block: TodoBlock, ); + #[method(enumerateAttribute:inRange:options:usingBlock:)] pub unsafe fn enumerateAttribute_inRange_options_usingBlock( &self, @@ -86,17 +104,21 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSMutableAttributedString; + unsafe impl ClassType for NSMutableAttributedString { type Super = NSAttributedString; } ); + extern_methods!( unsafe impl NSMutableAttributedString { #[method(replaceCharactersInRange:withString:)] pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, str: &NSString); + #[method(setAttributes:range:)] pub unsafe fn setAttributes_range( &self, @@ -105,11 +127,13 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSExtendedMutableAttributedString"] + /// NSExtendedMutableAttributedString unsafe impl NSMutableAttributedString { #[method_id(mutableString)] pub unsafe fn mutableString(&self) -> Id; + #[method(addAttribute:value:range:)] pub unsafe fn addAttribute_value_range( &self, @@ -117,75 +141,96 @@ extern_methods!( value: &Object, range: NSRange, ); + #[method(addAttributes:range:)] pub unsafe fn addAttributes_range( &self, attrs: &NSDictionary, range: NSRange, ); + #[method(removeAttribute:range:)] pub unsafe fn removeAttribute_range(&self, name: &NSAttributedStringKey, range: NSRange); + #[method(replaceCharactersInRange:withAttributedString:)] pub unsafe fn replaceCharactersInRange_withAttributedString( &self, range: NSRange, attrString: &NSAttributedString, ); + #[method(insertAttributedString:atIndex:)] pub unsafe fn insertAttributedString_atIndex( &self, attrString: &NSAttributedString, loc: NSUInteger, ); + #[method(appendAttributedString:)] pub unsafe fn appendAttributedString(&self, attrString: &NSAttributedString); + #[method(deleteCharactersInRange:)] pub unsafe fn deleteCharactersInRange(&self, range: NSRange); + #[method(setAttributedString:)] pub unsafe fn setAttributedString(&self, attrString: &NSAttributedString); + #[method(beginEditing)] pub unsafe fn beginEditing(&self); + #[method(endEditing)] pub unsafe fn endEditing(&self); } ); + extern_class!( #[derive(Debug)] pub struct NSAttributedStringMarkdownParsingOptions; + unsafe impl ClassType for NSAttributedStringMarkdownParsingOptions { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAttributedStringMarkdownParsingOptions { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method(allowsExtendedAttributes)] pub unsafe fn allowsExtendedAttributes(&self) -> bool; + #[method(setAllowsExtendedAttributes:)] pub unsafe fn setAllowsExtendedAttributes(&self, allowsExtendedAttributes: bool); + #[method(interpretedSyntax)] pub unsafe fn interpretedSyntax(&self) -> NSAttributedStringMarkdownInterpretedSyntax; + #[method(setInterpretedSyntax:)] pub unsafe fn setInterpretedSyntax( &self, interpretedSyntax: NSAttributedStringMarkdownInterpretedSyntax, ); + #[method(failurePolicy)] pub unsafe fn failurePolicy(&self) -> NSAttributedStringMarkdownParsingFailurePolicy; + #[method(setFailurePolicy:)] pub unsafe fn setFailurePolicy( &self, failurePolicy: NSAttributedStringMarkdownParsingFailurePolicy, ); + #[method_id(languageCode)] pub unsafe fn languageCode(&self) -> Option>; + #[method(setLanguageCode:)] pub unsafe fn setLanguageCode(&self, languageCode: Option<&NSString>); } ); + extern_methods!( - #[doc = "NSAttributedStringCreateFromMarkdown"] + /// NSAttributedStringCreateFromMarkdown unsafe impl NSAttributedString { #[method_id(initWithContentsOfMarkdownFileAtURL:options:baseURL:error:)] pub unsafe fn initWithContentsOfMarkdownFileAtURL_options_baseURL_error( @@ -194,6 +239,7 @@ extern_methods!( options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, ) -> Result, Id>; + #[method_id(initWithMarkdown:options:baseURL:error:)] pub unsafe fn initWithMarkdown_options_baseURL_error( &self, @@ -201,6 +247,7 @@ extern_methods!( options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, ) -> Result, Id>; + #[method_id(initWithMarkdownString:options:baseURL:error:)] pub unsafe fn initWithMarkdownString_options_baseURL_error( &self, @@ -210,8 +257,9 @@ extern_methods!( ) -> Result, Id>; } ); + extern_methods!( - #[doc = "NSAttributedStringFormatting"] + /// NSAttributedStringFormatting unsafe impl NSAttributedString { #[method_id(initWithFormat:options:locale:arguments:)] pub unsafe fn initWithFormat_options_locale_arguments( @@ -223,75 +271,91 @@ extern_methods!( ) -> Id; } ); + extern_methods!( - #[doc = "NSMutableAttributedStringFormatting"] + /// NSMutableAttributedStringFormatting unsafe impl NSMutableAttributedString {} ); + extern_methods!( - #[doc = "NSMorphology"] + /// NSMorphology unsafe impl NSAttributedString { #[method_id(attributedStringByInflectingString)] pub unsafe fn attributedStringByInflectingString(&self) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSPresentationIntent; + unsafe impl ClassType for NSPresentationIntent { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPresentationIntent { #[method(intentKind)] pub unsafe fn intentKind(&self) -> NSPresentationIntentKind; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(parentIntent)] pub unsafe fn parentIntent(&self) -> Option>; + #[method_id(paragraphIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn paragraphIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(headerIntentWithIdentity:level:nestedInsideIntent:)] pub unsafe fn headerIntentWithIdentity_level_nestedInsideIntent( identity: NSInteger, level: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(codeBlockIntentWithIdentity:languageHint:nestedInsideIntent:)] pub unsafe fn codeBlockIntentWithIdentity_languageHint_nestedInsideIntent( identity: NSInteger, languageHint: Option<&NSString>, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(thematicBreakIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn thematicBreakIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(orderedListIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn orderedListIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(unorderedListIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn unorderedListIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(listItemIntentWithIdentity:ordinal:nestedInsideIntent:)] pub unsafe fn listItemIntentWithIdentity_ordinal_nestedInsideIntent( identity: NSInteger, ordinal: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(blockQuoteIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn blockQuoteIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(tableIntentWithIdentity:columnCount:alignments:nestedInsideIntent:)] pub unsafe fn tableIntentWithIdentity_columnCount_alignments_nestedInsideIntent( identity: NSInteger, @@ -299,41 +363,54 @@ extern_methods!( alignments: &NSArray, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(tableHeaderRowIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn tableHeaderRowIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(tableRowIntentWithIdentity:row:nestedInsideIntent:)] pub unsafe fn tableRowIntentWithIdentity_row_nestedInsideIntent( identity: NSInteger, row: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method_id(tableCellIntentWithIdentity:column:nestedInsideIntent:)] pub unsafe fn tableCellIntentWithIdentity_column_nestedInsideIntent( identity: NSInteger, column: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; + #[method(identity)] pub unsafe fn identity(&self) -> NSInteger; + #[method(ordinal)] pub unsafe fn ordinal(&self) -> NSInteger; + #[method_id(columnAlignments)] pub unsafe fn columnAlignments(&self) -> Option, Shared>>; + #[method(columnCount)] pub unsafe fn columnCount(&self) -> NSInteger; + #[method(headerLevel)] pub unsafe fn headerLevel(&self) -> NSInteger; + #[method_id(languageHint)] pub unsafe fn languageHint(&self) -> Option>; + #[method(column)] pub unsafe fn column(&self) -> NSInteger; + #[method(row)] pub unsafe fn row(&self) -> NSInteger; + #[method(indentationLevel)] pub unsafe fn indentationLevel(&self) -> NSInteger; + #[method(isEquivalentToPresentationIntent:)] pub unsafe fn isEquivalentToPresentationIntent(&self, other: &NSPresentationIntent) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs index 3cb0d9fe7..9647baaa8 100644 --- a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -1,20 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSAutoreleasePool; + unsafe impl ClassType for NSAutoreleasePool { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAutoreleasePool { #[method(addObject:)] pub unsafe fn addObject(anObject: &Object); + #[method(addObject:)] pub unsafe fn addObject(&self, anObject: &Object); + #[method(drain)] pub unsafe fn drain(&self); } diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 8a95fbbfc..ed74dca35 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -1,40 +1,57 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSBackgroundActivityScheduler; + unsafe impl ClassType for NSBackgroundActivityScheduler { type Super = NSObject; } ); + extern_methods!( unsafe impl NSBackgroundActivityScheduler { #[method_id(initWithIdentifier:)] pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id; + #[method_id(identifier)] pub unsafe fn identifier(&self) -> Id; + #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); + #[method(repeats)] pub unsafe fn repeats(&self) -> bool; + #[method(setRepeats:)] pub unsafe fn setRepeats(&self, repeats: bool); + #[method(interval)] pub unsafe fn interval(&self) -> NSTimeInterval; + #[method(setInterval:)] pub unsafe fn setInterval(&self, interval: NSTimeInterval); + #[method(tolerance)] pub unsafe fn tolerance(&self) -> NSTimeInterval; + #[method(setTolerance:)] pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval); + #[method(scheduleWithBlock:)] pub unsafe fn scheduleWithBlock(&self, block: TodoBlock); + #[method(invalidate)] pub unsafe fn invalidate(&self); + #[method(shouldDefer)] pub unsafe fn shouldDefer(&self) -> bool; } diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index c43db3934..93e42242c 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -1,84 +1,120 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSBundle; + unsafe impl ClassType for NSBundle { type Super = NSObject; } ); + extern_methods!( unsafe impl NSBundle { #[method_id(mainBundle)] pub unsafe fn mainBundle() -> Id; + #[method_id(bundleWithPath:)] pub unsafe fn bundleWithPath(path: &NSString) -> Option>; + #[method_id(initWithPath:)] pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; + #[method_id(bundleWithURL:)] pub unsafe fn bundleWithURL(url: &NSURL) -> Option>; + #[method_id(initWithURL:)] pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; + #[method_id(bundleForClass:)] pub unsafe fn bundleForClass(aClass: &Class) -> Id; + #[method_id(bundleWithIdentifier:)] pub unsafe fn bundleWithIdentifier(identifier: &NSString) -> Option>; + #[method_id(allBundles)] pub unsafe fn allBundles() -> Id, Shared>; + #[method_id(allFrameworks)] pub unsafe fn allFrameworks() -> Id, Shared>; + #[method(load)] pub unsafe fn load(&self) -> bool; + #[method(isLoaded)] pub unsafe fn isLoaded(&self) -> bool; + #[method(unload)] pub unsafe fn unload(&self) -> bool; + #[method(preflightAndReturnError:)] pub unsafe fn preflightAndReturnError(&self) -> Result<(), Id>; + #[method(loadAndReturnError:)] pub unsafe fn loadAndReturnError(&self) -> Result<(), Id>; + #[method_id(bundleURL)] pub unsafe fn bundleURL(&self) -> Id; + #[method_id(resourceURL)] pub unsafe fn resourceURL(&self) -> Option>; + #[method_id(executableURL)] pub unsafe fn executableURL(&self) -> Option>; + #[method_id(URLForAuxiliaryExecutable:)] pub unsafe fn URLForAuxiliaryExecutable( &self, executableName: &NSString, ) -> Option>; + #[method_id(privateFrameworksURL)] pub unsafe fn privateFrameworksURL(&self) -> Option>; + #[method_id(sharedFrameworksURL)] pub unsafe fn sharedFrameworksURL(&self) -> Option>; + #[method_id(sharedSupportURL)] pub unsafe fn sharedSupportURL(&self) -> Option>; + #[method_id(builtInPlugInsURL)] pub unsafe fn builtInPlugInsURL(&self) -> Option>; + #[method_id(appStoreReceiptURL)] pub unsafe fn appStoreReceiptURL(&self) -> Option>; + #[method_id(bundlePath)] pub unsafe fn bundlePath(&self) -> Id; + #[method_id(resourcePath)] pub unsafe fn resourcePath(&self) -> Option>; + #[method_id(executablePath)] pub unsafe fn executablePath(&self) -> Option>; + #[method_id(pathForAuxiliaryExecutable:)] pub unsafe fn pathForAuxiliaryExecutable( &self, executableName: &NSString, ) -> Option>; + #[method_id(privateFrameworksPath)] pub unsafe fn privateFrameworksPath(&self) -> Option>; + #[method_id(sharedFrameworksPath)] pub unsafe fn sharedFrameworksPath(&self) -> Option>; + #[method_id(sharedSupportPath)] pub unsafe fn sharedSupportPath(&self) -> Option>; + #[method_id(builtInPlugInsPath)] pub unsafe fn builtInPlugInsPath(&self) -> Option>; + #[method_id(URLForResource:withExtension:subdirectory:inBundleWithURL:)] pub unsafe fn URLForResource_withExtension_subdirectory_inBundleWithURL( name: Option<&NSString>, @@ -86,18 +122,21 @@ extern_methods!( subpath: Option<&NSString>, bundleURL: &NSURL, ) -> Option>; + #[method_id(URLsForResourcesWithExtension:subdirectory:inBundleWithURL:)] pub unsafe fn URLsForResourcesWithExtension_subdirectory_inBundleWithURL( ext: Option<&NSString>, subpath: Option<&NSString>, bundleURL: &NSURL, ) -> Option, Shared>>; + #[method_id(URLForResource:withExtension:)] pub unsafe fn URLForResource_withExtension( &self, name: Option<&NSString>, ext: Option<&NSString>, ) -> Option>; + #[method_id(URLForResource:withExtension:subdirectory:)] pub unsafe fn URLForResource_withExtension_subdirectory( &self, @@ -105,6 +144,7 @@ extern_methods!( ext: Option<&NSString>, subpath: Option<&NSString>, ) -> Option>; + #[method_id(URLForResource:withExtension:subdirectory:localization:)] pub unsafe fn URLForResource_withExtension_subdirectory_localization( &self, @@ -113,12 +153,14 @@ extern_methods!( subpath: Option<&NSString>, localizationName: Option<&NSString>, ) -> Option>; + #[method_id(URLsForResourcesWithExtension:subdirectory:)] pub unsafe fn URLsForResourcesWithExtension_subdirectory( &self, ext: Option<&NSString>, subpath: Option<&NSString>, ) -> Option, Shared>>; + #[method_id(URLsForResourcesWithExtension:subdirectory:localization:)] pub unsafe fn URLsForResourcesWithExtension_subdirectory_localization( &self, @@ -126,23 +168,27 @@ extern_methods!( subpath: Option<&NSString>, localizationName: Option<&NSString>, ) -> Option, Shared>>; + #[method_id(pathForResource:ofType:inDirectory:)] pub unsafe fn pathForResource_ofType_inDirectory( name: Option<&NSString>, ext: Option<&NSString>, bundlePath: &NSString, ) -> Option>; + #[method_id(pathsForResourcesOfType:inDirectory:)] pub unsafe fn pathsForResourcesOfType_inDirectory( ext: Option<&NSString>, bundlePath: &NSString, ) -> Id, Shared>; + #[method_id(pathForResource:ofType:)] pub unsafe fn pathForResource_ofType( &self, name: Option<&NSString>, ext: Option<&NSString>, ) -> Option>; + #[method_id(pathForResource:ofType:inDirectory:)] pub unsafe fn pathForResource_ofType_inDirectory( &self, @@ -150,6 +196,7 @@ extern_methods!( ext: Option<&NSString>, subpath: Option<&NSString>, ) -> Option>; + #[method_id(pathForResource:ofType:inDirectory:forLocalization:)] pub unsafe fn pathForResource_ofType_inDirectory_forLocalization( &self, @@ -158,12 +205,14 @@ extern_methods!( subpath: Option<&NSString>, localizationName: Option<&NSString>, ) -> Option>; + #[method_id(pathsForResourcesOfType:inDirectory:)] pub unsafe fn pathsForResourcesOfType_inDirectory( &self, ext: Option<&NSString>, subpath: Option<&NSString>, ) -> Id, Shared>; + #[method_id(pathsForResourcesOfType:inDirectory:forLocalization:)] pub unsafe fn pathsForResourcesOfType_inDirectory_forLocalization( &self, @@ -171,6 +220,7 @@ extern_methods!( subpath: Option<&NSString>, localizationName: Option<&NSString>, ) -> Id, Shared>; + #[method_id(localizedStringForKey:value:table:)] pub unsafe fn localizedStringForKey_value_table( &self, @@ -178,44 +228,57 @@ extern_methods!( value: Option<&NSString>, tableName: Option<&NSString>, ) -> Id; + #[method_id(bundleIdentifier)] pub unsafe fn bundleIdentifier(&self) -> Option>; + #[method_id(infoDictionary)] pub unsafe fn infoDictionary(&self) -> Option, Shared>>; + #[method_id(localizedInfoDictionary)] pub unsafe fn localizedInfoDictionary( &self, ) -> Option, Shared>>; + #[method_id(objectForInfoDictionaryKey:)] pub unsafe fn objectForInfoDictionaryKey( &self, key: &NSString, ) -> Option>; + #[method(classNamed:)] pub unsafe fn classNamed(&self, className: &NSString) -> Option<&Class>; + #[method(principalClass)] pub unsafe fn principalClass(&self) -> Option<&Class>; + #[method_id(preferredLocalizations)] pub unsafe fn preferredLocalizations(&self) -> Id, Shared>; + #[method_id(localizations)] pub unsafe fn localizations(&self) -> Id, Shared>; + #[method_id(developmentLocalization)] pub unsafe fn developmentLocalization(&self) -> Option>; + #[method_id(preferredLocalizationsFromArray:)] pub unsafe fn preferredLocalizationsFromArray( localizationsArray: &NSArray, ) -> Id, Shared>; + #[method_id(preferredLocalizationsFromArray:forPreferences:)] pub unsafe fn preferredLocalizationsFromArray_forPreferences( localizationsArray: &NSArray, preferencesArray: Option<&NSArray>, ) -> Id, Shared>; + #[method_id(executableArchitectures)] pub unsafe fn executableArchitectures(&self) -> Option, Shared>>; } ); + extern_methods!( - #[doc = "NSBundleExtensionMethods"] + /// NSBundleExtensionMethods unsafe impl NSString { #[method_id(variantFittingPresentationWidth:)] pub unsafe fn variantFittingPresentationWidth( @@ -224,51 +287,65 @@ extern_methods!( ) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSBundleResourceRequest; + unsafe impl ClassType for NSBundleResourceRequest { type Super = NSObject; } ); + extern_methods!( unsafe impl NSBundleResourceRequest { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithTags:)] pub unsafe fn initWithTags(&self, tags: &NSSet) -> Id; + #[method_id(initWithTags:bundle:)] pub unsafe fn initWithTags_bundle( &self, tags: &NSSet, bundle: &NSBundle, ) -> Id; + #[method(loadingPriority)] pub unsafe fn loadingPriority(&self) -> c_double; + #[method(setLoadingPriority:)] pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double); + #[method_id(tags)] pub unsafe fn tags(&self) -> Id, Shared>; + #[method_id(bundle)] pub unsafe fn bundle(&self) -> Id; + #[method(beginAccessingResourcesWithCompletionHandler:)] pub unsafe fn beginAccessingResourcesWithCompletionHandler( &self, completionHandler: TodoBlock, ); + #[method(conditionallyBeginAccessingResourcesWithCompletionHandler:)] pub unsafe fn conditionallyBeginAccessingResourcesWithCompletionHandler( &self, completionHandler: TodoBlock, ); + #[method(endAccessingResources)] pub unsafe fn endAccessingResources(&self); + #[method_id(progress)] pub unsafe fn progress(&self) -> Id; } ); + extern_methods!( - #[doc = "NSBundleResourceRequestAdditions"] + /// NSBundleResourceRequestAdditions unsafe impl NSBundle { #[method(setPreservationPriority:forTags:)] pub unsafe fn setPreservationPriority_forTags( @@ -276,6 +353,7 @@ extern_methods!( priority: c_double, tags: &NSSet, ); + #[method(preservationPriorityForTag:)] pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double; } diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index b524edfad..9bfdbce39 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSByteCountFormatter; + unsafe impl ClassType for NSByteCountFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSByteCountFormatter { #[method_id(stringFromByteCount:countStyle:)] @@ -16,57 +21,79 @@ extern_methods!( byteCount: c_longlong, countStyle: NSByteCountFormatterCountStyle, ) -> Id; + #[method_id(stringFromByteCount:)] pub unsafe fn stringFromByteCount(&self, byteCount: c_longlong) -> Id; + #[method_id(stringFromMeasurement:countStyle:)] pub unsafe fn stringFromMeasurement_countStyle( measurement: &NSMeasurement, countStyle: NSByteCountFormatterCountStyle, ) -> Id; + #[method_id(stringFromMeasurement:)] pub unsafe fn stringFromMeasurement( &self, measurement: &NSMeasurement, ) -> Id; + #[method_id(stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, ) -> Option>; + #[method(allowedUnits)] pub unsafe fn allowedUnits(&self) -> NSByteCountFormatterUnits; + #[method(setAllowedUnits:)] pub unsafe fn setAllowedUnits(&self, allowedUnits: NSByteCountFormatterUnits); + #[method(countStyle)] pub unsafe fn countStyle(&self) -> NSByteCountFormatterCountStyle; + #[method(setCountStyle:)] pub unsafe fn setCountStyle(&self, countStyle: NSByteCountFormatterCountStyle); + #[method(allowsNonnumericFormatting)] pub unsafe fn allowsNonnumericFormatting(&self) -> bool; + #[method(setAllowsNonnumericFormatting:)] pub unsafe fn setAllowsNonnumericFormatting(&self, allowsNonnumericFormatting: bool); + #[method(includesUnit)] pub unsafe fn includesUnit(&self) -> bool; + #[method(setIncludesUnit:)] pub unsafe fn setIncludesUnit(&self, includesUnit: bool); + #[method(includesCount)] pub unsafe fn includesCount(&self) -> bool; + #[method(setIncludesCount:)] pub unsafe fn setIncludesCount(&self, includesCount: bool); + #[method(includesActualByteCount)] pub unsafe fn includesActualByteCount(&self) -> bool; + #[method(setIncludesActualByteCount:)] pub unsafe fn setIncludesActualByteCount(&self, includesActualByteCount: bool); + #[method(isAdaptive)] pub unsafe fn isAdaptive(&self) -> bool; + #[method(setAdaptive:)] pub unsafe fn setAdaptive(&self, adaptive: bool); + #[method(zeroPadsFractionDigits)] pub unsafe fn zeroPadsFractionDigits(&self) -> bool; + #[method(setZeroPadsFractionDigits:)] pub unsafe fn setZeroPadsFractionDigits(&self, zeroPadsFractionDigits: bool); + #[method(formattingContext)] pub unsafe fn formattingContext(&self) -> NSFormattingContext; + #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); } diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 5f8182038..b01b9fc0a 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -1,44 +1,63 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSCache; + unsafe impl ClassType for NSCache { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCache { #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method(setName:)] pub unsafe fn setName(&self, name: &NSString); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>); + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, key: &KeyType) -> Option>; + #[method(setObject:forKey:)] pub unsafe fn setObject_forKey(&self, obj: &ObjectType, key: &KeyType); + #[method(setObject:forKey:cost:)] pub unsafe fn setObject_forKey_cost(&self, obj: &ObjectType, key: &KeyType, g: NSUInteger); + #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, key: &KeyType); + #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); + #[method(totalCostLimit)] pub unsafe fn totalCostLimit(&self) -> NSUInteger; + #[method(setTotalCostLimit:)] pub unsafe fn setTotalCostLimit(&self, totalCostLimit: NSUInteger); + #[method(countLimit)] pub unsafe fn countLimit(&self) -> NSUInteger; + #[method(setCountLimit:)] pub unsafe fn setCountLimit(&self, countLimit: NSUInteger); + #[method(evictsObjectsWithDiscardedContent)] pub unsafe fn evictsObjectsWithDiscardedContent(&self) -> bool; + #[method(setEvictsObjectsWithDiscardedContent:)] pub unsafe fn setEvictsObjectsWithDiscardedContent( &self, @@ -46,4 +65,5 @@ extern_methods!( ); } ); + pub type NSCacheDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 5a0ceaefc..fdce11bbd 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -1,94 +1,136 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSCalendarIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSCalendar; + unsafe impl ClassType for NSCalendar { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCalendar { #[method_id(currentCalendar)] pub unsafe fn currentCalendar() -> Id; + #[method_id(autoupdatingCurrentCalendar)] pub unsafe fn autoupdatingCurrentCalendar() -> Id; + #[method_id(calendarWithIdentifier:)] pub unsafe fn calendarWithIdentifier( calendarIdentifierConstant: &NSCalendarIdentifier, ) -> Option>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCalendarIdentifier:)] pub unsafe fn initWithCalendarIdentifier( &self, ident: &NSCalendarIdentifier, ) -> Option>; + #[method_id(calendarIdentifier)] pub unsafe fn calendarIdentifier(&self) -> Id; + #[method_id(locale)] pub unsafe fn locale(&self) -> Option>; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Id; + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: &NSTimeZone); + #[method(firstWeekday)] pub unsafe fn firstWeekday(&self) -> NSUInteger; + #[method(setFirstWeekday:)] pub unsafe fn setFirstWeekday(&self, firstWeekday: NSUInteger); + #[method(minimumDaysInFirstWeek)] pub unsafe fn minimumDaysInFirstWeek(&self) -> NSUInteger; + #[method(setMinimumDaysInFirstWeek:)] pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger); + #[method_id(eraSymbols)] pub unsafe fn eraSymbols(&self) -> Id, Shared>; + #[method_id(longEraSymbols)] pub unsafe fn longEraSymbols(&self) -> Id, Shared>; + #[method_id(monthSymbols)] pub unsafe fn monthSymbols(&self) -> Id, Shared>; + #[method_id(shortMonthSymbols)] pub unsafe fn shortMonthSymbols(&self) -> Id, Shared>; + #[method_id(veryShortMonthSymbols)] pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared>; + #[method_id(standaloneMonthSymbols)] pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared>; + #[method_id(shortStandaloneMonthSymbols)] pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared>; + #[method_id(veryShortStandaloneMonthSymbols)] pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared>; + #[method_id(weekdaySymbols)] pub unsafe fn weekdaySymbols(&self) -> Id, Shared>; + #[method_id(shortWeekdaySymbols)] pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared>; + #[method_id(veryShortWeekdaySymbols)] pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared>; + #[method_id(standaloneWeekdaySymbols)] pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared>; + #[method_id(shortStandaloneWeekdaySymbols)] pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + #[method_id(veryShortStandaloneWeekdaySymbols)] pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + #[method_id(quarterSymbols)] pub unsafe fn quarterSymbols(&self) -> Id, Shared>; + #[method_id(shortQuarterSymbols)] pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared>; + #[method_id(standaloneQuarterSymbols)] pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared>; + #[method_id(shortStandaloneQuarterSymbols)] pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared>; + #[method_id(AMSymbol)] pub unsafe fn AMSymbol(&self) -> Id; + #[method_id(PMSymbol)] pub unsafe fn PMSymbol(&self) -> Id; + #[method(minimumRangeOfUnit:)] pub unsafe fn minimumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange; + #[method(maximumRangeOfUnit:)] pub unsafe fn maximumRangeOfUnit(&self, unit: NSCalendarUnit) -> NSRange; + #[method(rangeOfUnit:inUnit:forDate:)] pub unsafe fn rangeOfUnit_inUnit_forDate( &self, @@ -96,6 +138,7 @@ extern_methods!( larger: NSCalendarUnit, date: &NSDate, ) -> NSRange; + #[method(ordinalityOfUnit:inUnit:forDate:)] pub unsafe fn ordinalityOfUnit_inUnit_forDate( &self, @@ -103,6 +146,7 @@ extern_methods!( larger: NSCalendarUnit, date: &NSDate, ) -> NSUInteger; + #[method(rangeOfUnit:startDate:interval:forDate:)] pub unsafe fn rangeOfUnit_startDate_interval_forDate( &self, @@ -111,17 +155,20 @@ extern_methods!( tip: *mut NSTimeInterval, date: &NSDate, ) -> bool; + #[method_id(dateFromComponents:)] pub unsafe fn dateFromComponents( &self, comps: &NSDateComponents, ) -> Option>; + #[method_id(components:fromDate:)] pub unsafe fn components_fromDate( &self, unitFlags: NSCalendarUnit, date: &NSDate, ) -> Id; + #[method_id(dateByAddingComponents:toDate:options:)] pub unsafe fn dateByAddingComponents_toDate_options( &self, @@ -129,6 +176,7 @@ extern_methods!( date: &NSDate, opts: NSCalendarOptions, ) -> Option>; + #[method_id(components:fromDate:toDate:options:)] pub unsafe fn components_fromDate_toDate_options( &self, @@ -137,6 +185,7 @@ extern_methods!( resultDate: &NSDate, opts: NSCalendarOptions, ) -> Id; + #[method(getEra:year:month:day:fromDate:)] pub unsafe fn getEra_year_month_day_fromDate( &self, @@ -146,6 +195,7 @@ extern_methods!( dayValuePointer: *mut NSInteger, date: &NSDate, ); + #[method(getEra:yearForWeekOfYear:weekOfYear:weekday:fromDate:)] pub unsafe fn getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate( &self, @@ -155,6 +205,7 @@ extern_methods!( weekdayValuePointer: *mut NSInteger, date: &NSDate, ); + #[method(getHour:minute:second:nanosecond:fromDate:)] pub unsafe fn getHour_minute_second_nanosecond_fromDate( &self, @@ -164,8 +215,10 @@ extern_methods!( nanosecondValuePointer: *mut NSInteger, date: &NSDate, ); + #[method(component:fromDate:)] pub unsafe fn component_fromDate(&self, unit: NSCalendarUnit, date: &NSDate) -> NSInteger; + #[method_id(dateWithEra:year:month:day:hour:minute:second:nanosecond:)] pub unsafe fn dateWithEra_year_month_day_hour_minute_second_nanosecond( &self, @@ -178,6 +231,7 @@ extern_methods!( secondValue: NSInteger, nanosecondValue: NSInteger, ) -> Option>; + #[method_id(dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:)] pub unsafe fn dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond( &self, @@ -190,14 +244,17 @@ extern_methods!( secondValue: NSInteger, nanosecondValue: NSInteger, ) -> Option>; + #[method_id(startOfDayForDate:)] pub unsafe fn startOfDayForDate(&self, date: &NSDate) -> Id; + #[method_id(componentsInTimeZone:fromDate:)] pub unsafe fn componentsInTimeZone_fromDate( &self, timezone: &NSTimeZone, date: &NSDate, ) -> Id; + #[method(compareDate:toDate:toUnitGranularity:)] pub unsafe fn compareDate_toDate_toUnitGranularity( &self, @@ -205,6 +262,7 @@ extern_methods!( date2: &NSDate, unit: NSCalendarUnit, ) -> NSComparisonResult; + #[method(isDate:equalToDate:toUnitGranularity:)] pub unsafe fn isDate_equalToDate_toUnitGranularity( &self, @@ -212,16 +270,22 @@ extern_methods!( date2: &NSDate, unit: NSCalendarUnit, ) -> bool; + #[method(isDate:inSameDayAsDate:)] pub unsafe fn isDate_inSameDayAsDate(&self, date1: &NSDate, date2: &NSDate) -> bool; + #[method(isDateInToday:)] pub unsafe fn isDateInToday(&self, date: &NSDate) -> bool; + #[method(isDateInYesterday:)] pub unsafe fn isDateInYesterday(&self, date: &NSDate) -> bool; + #[method(isDateInTomorrow:)] pub unsafe fn isDateInTomorrow(&self, date: &NSDate) -> bool; + #[method(isDateInWeekend:)] pub unsafe fn isDateInWeekend(&self, date: &NSDate) -> bool; + #[method(rangeOfWeekendStartDate:interval:containingDate:)] pub unsafe fn rangeOfWeekendStartDate_interval_containingDate( &self, @@ -229,6 +293,7 @@ extern_methods!( tip: *mut NSTimeInterval, date: &NSDate, ) -> bool; + #[method(nextWeekendStartDate:interval:options:afterDate:)] pub unsafe fn nextWeekendStartDate_interval_options_afterDate( &self, @@ -237,6 +302,7 @@ extern_methods!( options: NSCalendarOptions, date: &NSDate, ) -> bool; + #[method_id(components:fromDateComponents:toDateComponents:options:)] pub unsafe fn components_fromDateComponents_toDateComponents_options( &self, @@ -245,6 +311,7 @@ extern_methods!( resultDateComp: &NSDateComponents, options: NSCalendarOptions, ) -> Id; + #[method_id(dateByAddingUnit:value:toDate:options:)] pub unsafe fn dateByAddingUnit_value_toDate_options( &self, @@ -253,6 +320,7 @@ extern_methods!( date: &NSDate, options: NSCalendarOptions, ) -> Option>; + #[method(enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:)] pub unsafe fn enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock( &self, @@ -261,6 +329,7 @@ extern_methods!( opts: NSCalendarOptions, block: TodoBlock, ); + #[method_id(nextDateAfterDate:matchingComponents:options:)] pub unsafe fn nextDateAfterDate_matchingComponents_options( &self, @@ -268,6 +337,7 @@ extern_methods!( comps: &NSDateComponents, options: NSCalendarOptions, ) -> Option>; + #[method_id(nextDateAfterDate:matchingUnit:value:options:)] pub unsafe fn nextDateAfterDate_matchingUnit_value_options( &self, @@ -276,6 +346,7 @@ extern_methods!( value: NSInteger, options: NSCalendarOptions, ) -> Option>; + #[method_id(nextDateAfterDate:matchingHour:minute:second:options:)] pub unsafe fn nextDateAfterDate_matchingHour_minute_second_options( &self, @@ -285,6 +356,7 @@ extern_methods!( secondValue: NSInteger, options: NSCalendarOptions, ) -> Option>; + #[method_id(dateBySettingUnit:value:ofDate:options:)] pub unsafe fn dateBySettingUnit_value_ofDate_options( &self, @@ -293,6 +365,7 @@ extern_methods!( date: &NSDate, opts: NSCalendarOptions, ) -> Option>; + #[method_id(dateBySettingHour:minute:second:ofDate:options:)] pub unsafe fn dateBySettingHour_minute_second_ofDate_options( &self, @@ -302,6 +375,7 @@ extern_methods!( date: &NSDate, opts: NSCalendarOptions, ) -> Option>; + #[method(date:matchesComponents:)] pub unsafe fn date_matchesComponents( &self, @@ -310,95 +384,138 @@ extern_methods!( ) -> bool; } ); + extern_class!( #[derive(Debug)] pub struct NSDateComponents; + unsafe impl ClassType for NSDateComponents { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDateComponents { #[method_id(calendar)] pub unsafe fn calendar(&self) -> Option>; + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Option>; + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method(era)] pub unsafe fn era(&self) -> NSInteger; + #[method(setEra:)] pub unsafe fn setEra(&self, era: NSInteger); + #[method(year)] pub unsafe fn year(&self) -> NSInteger; + #[method(setYear:)] pub unsafe fn setYear(&self, year: NSInteger); + #[method(month)] pub unsafe fn month(&self) -> NSInteger; + #[method(setMonth:)] pub unsafe fn setMonth(&self, month: NSInteger); + #[method(day)] pub unsafe fn day(&self) -> NSInteger; + #[method(setDay:)] pub unsafe fn setDay(&self, day: NSInteger); + #[method(hour)] pub unsafe fn hour(&self) -> NSInteger; + #[method(setHour:)] pub unsafe fn setHour(&self, hour: NSInteger); + #[method(minute)] pub unsafe fn minute(&self) -> NSInteger; + #[method(setMinute:)] pub unsafe fn setMinute(&self, minute: NSInteger); + #[method(second)] pub unsafe fn second(&self) -> NSInteger; + #[method(setSecond:)] pub unsafe fn setSecond(&self, second: NSInteger); + #[method(nanosecond)] pub unsafe fn nanosecond(&self) -> NSInteger; + #[method(setNanosecond:)] pub unsafe fn setNanosecond(&self, nanosecond: NSInteger); + #[method(weekday)] pub unsafe fn weekday(&self) -> NSInteger; + #[method(setWeekday:)] pub unsafe fn setWeekday(&self, weekday: NSInteger); + #[method(weekdayOrdinal)] pub unsafe fn weekdayOrdinal(&self) -> NSInteger; + #[method(setWeekdayOrdinal:)] pub unsafe fn setWeekdayOrdinal(&self, weekdayOrdinal: NSInteger); + #[method(quarter)] pub unsafe fn quarter(&self) -> NSInteger; + #[method(setQuarter:)] pub unsafe fn setQuarter(&self, quarter: NSInteger); + #[method(weekOfMonth)] pub unsafe fn weekOfMonth(&self) -> NSInteger; + #[method(setWeekOfMonth:)] pub unsafe fn setWeekOfMonth(&self, weekOfMonth: NSInteger); + #[method(weekOfYear)] pub unsafe fn weekOfYear(&self) -> NSInteger; + #[method(setWeekOfYear:)] pub unsafe fn setWeekOfYear(&self, weekOfYear: NSInteger); + #[method(yearForWeekOfYear)] pub unsafe fn yearForWeekOfYear(&self) -> NSInteger; + #[method(setYearForWeekOfYear:)] pub unsafe fn setYearForWeekOfYear(&self, yearForWeekOfYear: NSInteger); + #[method(isLeapMonth)] pub unsafe fn isLeapMonth(&self) -> bool; + #[method(setLeapMonth:)] pub unsafe fn setLeapMonth(&self, leapMonth: bool); + #[method_id(date)] pub unsafe fn date(&self) -> Option>; + #[method(week)] pub unsafe fn week(&self) -> NSInteger; + #[method(setWeek:)] pub unsafe fn setWeek(&self, v: NSInteger); + #[method(setValue:forComponent:)] pub unsafe fn setValue_forComponent(&self, value: NSInteger, unit: NSCalendarUnit); + #[method(valueForComponent:)] pub unsafe fn valueForComponent(&self, unit: NSCalendarUnit) -> NSInteger; + #[method(isValidDate)] pub unsafe fn isValidDate(&self) -> bool; + #[method(isValidDateInCalendar:)] pub unsafe fn isValidDateInCalendar(&self, calendar: &NSCalendar) -> bool; } diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index 90681a06b..87b1dcef0 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -1,29 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCalendarDate; + unsafe impl ClassType for NSCalendarDate { type Super = NSDate; } ); + extern_methods!( unsafe impl NSCalendarDate { #[method_id(calendarDate)] pub unsafe fn calendarDate() -> Id; + #[method_id(dateWithString:calendarFormat:locale:)] pub unsafe fn dateWithString_calendarFormat_locale( description: &NSString, format: &NSString, locale: Option<&Object>, ) -> Option>; + #[method_id(dateWithString:calendarFormat:)] pub unsafe fn dateWithString_calendarFormat( description: &NSString, format: &NSString, ) -> Option>; + #[method_id(dateWithYear:month:day:hour:minute:second:timeZone:)] pub unsafe fn dateWithYear_month_day_hour_minute_second_timeZone( year: NSInteger, @@ -34,6 +42,7 @@ extern_methods!( second: NSUInteger, aTimeZone: Option<&NSTimeZone>, ) -> Id; + #[method_id(dateByAddingYears:months:days:hours:minutes:seconds:)] pub unsafe fn dateByAddingYears_months_days_hours_minutes_seconds( &self, @@ -44,42 +53,57 @@ extern_methods!( minute: NSInteger, second: NSInteger, ) -> Id; + #[method(dayOfCommonEra)] pub unsafe fn dayOfCommonEra(&self) -> NSInteger; + #[method(dayOfMonth)] pub unsafe fn dayOfMonth(&self) -> NSInteger; + #[method(dayOfWeek)] pub unsafe fn dayOfWeek(&self) -> NSInteger; + #[method(dayOfYear)] pub unsafe fn dayOfYear(&self) -> NSInteger; + #[method(hourOfDay)] pub unsafe fn hourOfDay(&self) -> NSInteger; + #[method(minuteOfHour)] pub unsafe fn minuteOfHour(&self) -> NSInteger; + #[method(monthOfYear)] pub unsafe fn monthOfYear(&self) -> NSInteger; + #[method(secondOfMinute)] pub unsafe fn secondOfMinute(&self) -> NSInteger; + #[method(yearOfCommonEra)] pub unsafe fn yearOfCommonEra(&self) -> NSInteger; + #[method_id(calendarFormat)] pub unsafe fn calendarFormat(&self) -> Id; + #[method_id(descriptionWithCalendarFormat:locale:)] pub unsafe fn descriptionWithCalendarFormat_locale( &self, format: &NSString, locale: Option<&Object>, ) -> Id; + #[method_id(descriptionWithCalendarFormat:)] pub unsafe fn descriptionWithCalendarFormat( &self, format: &NSString, ) -> Id; + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; + #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Id; + #[method_id(initWithString:calendarFormat:locale:)] pub unsafe fn initWithString_calendarFormat_locale( &self, @@ -87,14 +111,17 @@ extern_methods!( format: &NSString, locale: Option<&Object>, ) -> Option>; + #[method_id(initWithString:calendarFormat:)] pub unsafe fn initWithString_calendarFormat( &self, description: &NSString, format: &NSString, ) -> Option>; + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, description: &NSString) -> Option>; + #[method_id(initWithYear:month:day:hour:minute:second:timeZone:)] pub unsafe fn initWithYear_month_day_hour_minute_second_timeZone( &self, @@ -106,10 +133,13 @@ extern_methods!( second: NSUInteger, aTimeZone: Option<&NSTimeZone>, ) -> Id; + #[method(setCalendarFormat:)] pub unsafe fn setCalendarFormat(&self, format: Option<&NSString>); + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, aTimeZone: Option<&NSTimeZone>); + #[method(years:months:days:hours:minutes:seconds:sinceDate:)] pub unsafe fn years_months_days_hours_minutes_seconds_sinceDate( &self, @@ -121,32 +151,39 @@ extern_methods!( sp: *mut NSInteger, date: &NSCalendarDate, ); + #[method_id(distantFuture)] pub unsafe fn distantFuture() -> Id; + #[method_id(distantPast)] pub unsafe fn distantPast() -> Id; } ); + extern_methods!( - #[doc = "NSCalendarDateExtras"] + /// NSCalendarDateExtras unsafe impl NSDate { #[method_id(dateWithNaturalLanguageString:locale:)] pub unsafe fn dateWithNaturalLanguageString_locale( string: &NSString, locale: Option<&Object>, ) -> Option>; + #[method_id(dateWithNaturalLanguageString:)] pub unsafe fn dateWithNaturalLanguageString( string: &NSString, ) -> Option>; + #[method_id(dateWithString:)] pub unsafe fn dateWithString(aString: &NSString) -> Id; + #[method_id(dateWithCalendarFormat:timeZone:)] pub unsafe fn dateWithCalendarFormat_timeZone( &self, format: Option<&NSString>, aTimeZone: Option<&NSTimeZone>, ) -> Id; + #[method_id(descriptionWithCalendarFormat:timeZone:locale:)] pub unsafe fn descriptionWithCalendarFormat_timeZone_locale( &self, @@ -154,6 +191,7 @@ extern_methods!( aTimeZone: Option<&NSTimeZone>, locale: Option<&Object>, ) -> Option>; + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, description: &NSString) -> Option>; } diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 7e484ce59..1e1b1d9f1 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -1,139 +1,197 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCharacterSet; + unsafe impl ClassType for NSCharacterSet { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCharacterSet { #[method_id(controlCharacterSet)] pub unsafe fn controlCharacterSet() -> Id; + #[method_id(whitespaceCharacterSet)] pub unsafe fn whitespaceCharacterSet() -> Id; + #[method_id(whitespaceAndNewlineCharacterSet)] pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id; + #[method_id(decimalDigitCharacterSet)] pub unsafe fn decimalDigitCharacterSet() -> Id; + #[method_id(letterCharacterSet)] pub unsafe fn letterCharacterSet() -> Id; + #[method_id(lowercaseLetterCharacterSet)] pub unsafe fn lowercaseLetterCharacterSet() -> Id; + #[method_id(uppercaseLetterCharacterSet)] pub unsafe fn uppercaseLetterCharacterSet() -> Id; + #[method_id(nonBaseCharacterSet)] pub unsafe fn nonBaseCharacterSet() -> Id; + #[method_id(alphanumericCharacterSet)] pub unsafe fn alphanumericCharacterSet() -> Id; + #[method_id(decomposableCharacterSet)] pub unsafe fn decomposableCharacterSet() -> Id; + #[method_id(illegalCharacterSet)] pub unsafe fn illegalCharacterSet() -> Id; + #[method_id(punctuationCharacterSet)] pub unsafe fn punctuationCharacterSet() -> Id; + #[method_id(capitalizedLetterCharacterSet)] pub unsafe fn capitalizedLetterCharacterSet() -> Id; + #[method_id(symbolCharacterSet)] pub unsafe fn symbolCharacterSet() -> Id; + #[method_id(newlineCharacterSet)] pub unsafe fn newlineCharacterSet() -> Id; + #[method_id(characterSetWithRange:)] pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id; + #[method_id(characterSetWithCharactersInString:)] pub unsafe fn characterSetWithCharactersInString( aString: &NSString, ) -> Id; + #[method_id(characterSetWithBitmapRepresentation:)] pub unsafe fn characterSetWithBitmapRepresentation( data: &NSData, ) -> Id; + #[method_id(characterSetWithContentsOfFile:)] pub unsafe fn characterSetWithContentsOfFile( fName: &NSString, ) -> Option>; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method(characterIsMember:)] pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool; + #[method_id(bitmapRepresentation)] pub unsafe fn bitmapRepresentation(&self) -> Id; + #[method_id(invertedSet)] pub unsafe fn invertedSet(&self) -> Id; + #[method(longCharacterIsMember:)] pub unsafe fn longCharacterIsMember(&self, theLongChar: UTF32Char) -> bool; + #[method(isSupersetOfSet:)] pub unsafe fn isSupersetOfSet(&self, theOtherSet: &NSCharacterSet) -> bool; + #[method(hasMemberInPlane:)] pub unsafe fn hasMemberInPlane(&self, thePlane: u8) -> bool; } ); + extern_class!( #[derive(Debug)] pub struct NSMutableCharacterSet; + unsafe impl ClassType for NSMutableCharacterSet { type Super = NSCharacterSet; } ); + extern_methods!( unsafe impl NSMutableCharacterSet { #[method(addCharactersInRange:)] pub unsafe fn addCharactersInRange(&self, aRange: NSRange); + #[method(removeCharactersInRange:)] pub unsafe fn removeCharactersInRange(&self, aRange: NSRange); + #[method(addCharactersInString:)] pub unsafe fn addCharactersInString(&self, aString: &NSString); + #[method(removeCharactersInString:)] pub unsafe fn removeCharactersInString(&self, aString: &NSString); + #[method(formUnionWithCharacterSet:)] pub unsafe fn formUnionWithCharacterSet(&self, otherSet: &NSCharacterSet); + #[method(formIntersectionWithCharacterSet:)] pub unsafe fn formIntersectionWithCharacterSet(&self, otherSet: &NSCharacterSet); + #[method(invert)] pub unsafe fn invert(&self); + #[method_id(controlCharacterSet)] pub unsafe fn controlCharacterSet() -> Id; + #[method_id(whitespaceCharacterSet)] pub unsafe fn whitespaceCharacterSet() -> Id; + #[method_id(whitespaceAndNewlineCharacterSet)] pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id; + #[method_id(decimalDigitCharacterSet)] pub unsafe fn decimalDigitCharacterSet() -> Id; + #[method_id(letterCharacterSet)] pub unsafe fn letterCharacterSet() -> Id; + #[method_id(lowercaseLetterCharacterSet)] pub unsafe fn lowercaseLetterCharacterSet() -> Id; + #[method_id(uppercaseLetterCharacterSet)] pub unsafe fn uppercaseLetterCharacterSet() -> Id; + #[method_id(nonBaseCharacterSet)] pub unsafe fn nonBaseCharacterSet() -> Id; + #[method_id(alphanumericCharacterSet)] pub unsafe fn alphanumericCharacterSet() -> Id; + #[method_id(decomposableCharacterSet)] pub unsafe fn decomposableCharacterSet() -> Id; + #[method_id(illegalCharacterSet)] pub unsafe fn illegalCharacterSet() -> Id; + #[method_id(punctuationCharacterSet)] pub unsafe fn punctuationCharacterSet() -> Id; + #[method_id(capitalizedLetterCharacterSet)] pub unsafe fn capitalizedLetterCharacterSet() -> Id; + #[method_id(symbolCharacterSet)] pub unsafe fn symbolCharacterSet() -> Id; + #[method_id(newlineCharacterSet)] pub unsafe fn newlineCharacterSet() -> Id; + #[method_id(characterSetWithRange:)] pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id; + #[method_id(characterSetWithCharactersInString:)] pub unsafe fn characterSetWithCharactersInString( aString: &NSString, ) -> Id; + #[method_id(characterSetWithBitmapRepresentation:)] pub unsafe fn characterSetWithBitmapRepresentation( data: &NSData, ) -> Id; + #[method_id(characterSetWithContentsOfFile:)] pub unsafe fn characterSetWithContentsOfFile( fName: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index 8f88ec4fc..46cd51eed 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSClassDescription; + unsafe impl ClassType for NSClassDescription { type Super = NSObject; } ); + extern_methods!( unsafe impl NSClassDescription { #[method(registerClassDescription:forClass:)] @@ -16,18 +21,24 @@ extern_methods!( description: &NSClassDescription, aClass: &Class, ); + #[method(invalidateClassDescriptionCache)] pub unsafe fn invalidateClassDescriptionCache(); + #[method_id(classDescriptionForClass:)] pub unsafe fn classDescriptionForClass( aClass: &Class, ) -> Option>; + #[method_id(attributeKeys)] pub unsafe fn attributeKeys(&self) -> Id, Shared>; + #[method_id(toOneRelationshipKeys)] pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared>; + #[method_id(toManyRelationshipKeys)] pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared>; + #[method_id(inverseForRelationshipKey:)] pub unsafe fn inverseForRelationshipKey( &self, @@ -35,17 +46,22 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSClassDescriptionPrimitives"] + /// NSClassDescriptionPrimitives unsafe impl NSObject { #[method_id(classDescription)] pub unsafe fn classDescription(&self) -> Id; + #[method_id(attributeKeys)] pub unsafe fn attributeKeys(&self) -> Id, Shared>; + #[method_id(toOneRelationshipKeys)] pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared>; + #[method_id(toManyRelationshipKeys)] pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared>; + #[method_id(inverseForRelationshipKey:)] pub unsafe fn inverseForRelationshipKey( &self, diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index c62ecd38d..10f48220d 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCoder; + unsafe impl ClassType for NSCoder { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCoder { #[method(encodeValueOfObjCType:at:)] @@ -17,10 +22,13 @@ extern_methods!( type_: NonNull, addr: NonNull, ); + #[method(encodeDataObject:)] pub unsafe fn encodeDataObject(&self, data: &NSData); + #[method_id(decodeDataObject)] pub unsafe fn decodeDataObject(&self) -> Option>; + #[method(decodeValueOfObjCType:at:size:)] pub unsafe fn decodeValueOfObjCType_at_size( &self, @@ -28,23 +36,30 @@ extern_methods!( data: NonNull, size: NSUInteger, ); + #[method(versionForClassName:)] pub unsafe fn versionForClassName(&self, className: &NSString) -> NSInteger; } ); + extern_methods!( - #[doc = "NSExtendedCoder"] + /// NSExtendedCoder unsafe impl NSCoder { #[method(encodeObject:)] pub unsafe fn encodeObject(&self, object: Option<&Object>); + #[method(encodeRootObject:)] pub unsafe fn encodeRootObject(&self, rootObject: &Object); + #[method(encodeBycopyObject:)] pub unsafe fn encodeBycopyObject(&self, anObject: Option<&Object>); + #[method(encodeByrefObject:)] pub unsafe fn encodeByrefObject(&self, anObject: Option<&Object>); + #[method(encodeConditionalObject:)] pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>); + #[method(encodeArrayOfObjCType:count:at:)] pub unsafe fn encodeArrayOfObjCType_count_at( &self, @@ -52,14 +67,18 @@ extern_methods!( count: NSUInteger, array: NonNull, ); + #[method(encodeBytes:length:)] pub unsafe fn encodeBytes_length(&self, byteaddr: *mut c_void, length: NSUInteger); + #[method_id(decodeObject)] pub unsafe fn decodeObject(&self) -> Option>; + #[method_id(decodeTopLevelObjectAndReturnError:)] pub unsafe fn decodeTopLevelObjectAndReturnError( &self, ) -> Result, Id>; + #[method(decodeArrayOfObjCType:count:at:)] pub unsafe fn decodeArrayOfObjCType_count_at( &self, @@ -67,43 +86,59 @@ extern_methods!( count: NSUInteger, array: NonNull, ); + #[method(decodeBytesWithReturnedLength:)] pub unsafe fn decodeBytesWithReturnedLength( &self, lengthp: NonNull, ) -> *mut c_void; + #[method(encodePropertyList:)] pub unsafe fn encodePropertyList(&self, aPropertyList: &Object); + #[method_id(decodePropertyList)] pub unsafe fn decodePropertyList(&self) -> Option>; + #[method(setObjectZone:)] pub unsafe fn setObjectZone(&self, zone: *mut NSZone); + #[method(objectZone)] pub unsafe fn objectZone(&self) -> *mut NSZone; + #[method(systemVersion)] pub unsafe fn systemVersion(&self) -> c_uint; + #[method(allowsKeyedCoding)] pub unsafe fn allowsKeyedCoding(&self) -> bool; + #[method(encodeObject:forKey:)] pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString); + #[method(encodeConditionalObject:forKey:)] pub unsafe fn encodeConditionalObject_forKey( &self, object: Option<&Object>, key: &NSString, ); + #[method(encodeBool:forKey:)] pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString); + #[method(encodeInt:forKey:)] pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString); + #[method(encodeInt32:forKey:)] pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString); + #[method(encodeInt64:forKey:)] pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString); + #[method(encodeFloat:forKey:)] pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString); + #[method(encodeDouble:forKey:)] pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString); + #[method(encodeBytes:length:forKey:)] pub unsafe fn encodeBytes_length_forKey( &self, @@ -111,57 +146,74 @@ extern_methods!( length: NSUInteger, key: &NSString, ); + #[method(containsValueForKey:)] pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; + #[method_id(decodeObjectForKey:)] pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option>; + #[method_id(decodeTopLevelObjectForKey:error:)] pub unsafe fn decodeTopLevelObjectForKey_error( &self, key: &NSString, ) -> Result, Id>; + #[method(decodeBoolForKey:)] pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool; + #[method(decodeIntForKey:)] pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int; + #[method(decodeInt32ForKey:)] pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32; + #[method(decodeInt64ForKey:)] pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t; + #[method(decodeFloatForKey:)] pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float; + #[method(decodeDoubleForKey:)] pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double; + #[method(decodeBytesForKey:returnedLength:)] pub unsafe fn decodeBytesForKey_returnedLength( &self, key: &NSString, lengthp: *mut NSUInteger, ) -> *mut u8; + #[method(encodeInteger:forKey:)] pub unsafe fn encodeInteger_forKey(&self, value: NSInteger, key: &NSString); + #[method(decodeIntegerForKey:)] pub unsafe fn decodeIntegerForKey(&self, key: &NSString) -> NSInteger; + #[method(requiresSecureCoding)] pub unsafe fn requiresSecureCoding(&self) -> bool; + #[method_id(decodeObjectOfClass:forKey:)] pub unsafe fn decodeObjectOfClass_forKey( &self, aClass: &Class, key: &NSString, ) -> Option>; + #[method_id(decodeTopLevelObjectOfClass:forKey:error:)] pub unsafe fn decodeTopLevelObjectOfClass_forKey_error( &self, aClass: &Class, key: &NSString, ) -> Result, Id>; + #[method_id(decodeArrayOfObjectsOfClass:forKey:)] pub unsafe fn decodeArrayOfObjectsOfClass_forKey( &self, cls: &Class, key: &NSString, ) -> Option>; + #[method_id(decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:)] pub unsafe fn decodeDictionaryWithKeysOfClass_objectsOfClass_forKey( &self, @@ -169,24 +221,28 @@ extern_methods!( objectCls: &Class, key: &NSString, ) -> Option>; + #[method_id(decodeObjectOfClasses:forKey:)] pub unsafe fn decodeObjectOfClasses_forKey( &self, classes: Option<&NSSet>, key: &NSString, ) -> Option>; + #[method_id(decodeTopLevelObjectOfClasses:forKey:error:)] pub unsafe fn decodeTopLevelObjectOfClasses_forKey_error( &self, classes: Option<&NSSet>, key: &NSString, ) -> Result, Id>; + #[method_id(decodeArrayOfObjectsOfClasses:forKey:)] pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( &self, classes: &NSSet, key: &NSString, ) -> Option>; + #[method_id(decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:)] pub unsafe fn decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey( &self, @@ -194,30 +250,38 @@ extern_methods!( objectClasses: &NSSet, key: &NSString, ) -> Option>; + #[method_id(decodePropertyListForKey:)] pub unsafe fn decodePropertyListForKey(&self, key: &NSString) -> Option>; + #[method_id(allowedClasses)] pub unsafe fn allowedClasses(&self) -> Option, Shared>>; + #[method(failWithError:)] pub unsafe fn failWithError(&self, error: &NSError); + #[method(decodingFailurePolicy)] pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy; + #[method_id(error)] pub unsafe fn error(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSTypedstreamCompatibility"] + /// NSTypedstreamCompatibility unsafe impl NSCoder { #[method(encodeNXObject:)] pub unsafe fn encodeNXObject(&self, object: &Object); + #[method_id(decodeNXObject)] pub unsafe fn decodeNXObject(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSCoder { #[method(decodeValueOfObjCType:at:)] pub unsafe fn decodeValueOfObjCType_at( diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index cf16c0a1b..0b3f7f11a 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSComparisonPredicate; + unsafe impl ClassType for NSComparisonPredicate { type Super = NSPredicate; } ); + extern_methods!( unsafe impl NSComparisonPredicate { #[method_id(predicateWithLeftExpression:rightExpression:modifier:type:options:)] @@ -19,12 +24,14 @@ extern_methods!( type_: NSPredicateOperatorType, options: NSComparisonPredicateOptions, ) -> Id; + #[method_id(predicateWithLeftExpression:rightExpression:customSelector:)] pub unsafe fn predicateWithLeftExpression_rightExpression_customSelector( lhs: &NSExpression, rhs: &NSExpression, selector: Sel, ) -> Id; + #[method_id(initWithLeftExpression:rightExpression:modifier:type:options:)] pub unsafe fn initWithLeftExpression_rightExpression_modifier_type_options( &self, @@ -34,6 +41,7 @@ extern_methods!( type_: NSPredicateOperatorType, options: NSComparisonPredicateOptions, ) -> Id; + #[method_id(initWithLeftExpression:rightExpression:customSelector:)] pub unsafe fn initWithLeftExpression_rightExpression_customSelector( &self, @@ -41,18 +49,25 @@ extern_methods!( rhs: &NSExpression, selector: Sel, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(predicateOperatorType)] pub unsafe fn predicateOperatorType(&self) -> NSPredicateOperatorType; + #[method(comparisonPredicateModifier)] pub unsafe fn comparisonPredicateModifier(&self) -> NSComparisonPredicateModifier; + #[method_id(leftExpression)] pub unsafe fn leftExpression(&self) -> Id; + #[method_id(rightExpression)] pub unsafe fn rightExpression(&self) -> Id; + #[method(customSelector)] pub unsafe fn customSelector(&self) -> Option; + #[method(options)] pub unsafe fn options(&self) -> NSComparisonPredicateOptions; } diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 229fcfe51..b13e566c8 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCompoundPredicate; + unsafe impl ClassType for NSCompoundPredicate { type Super = NSPredicate; } ); + extern_methods!( unsafe impl NSCompoundPredicate { #[method_id(initWithType:subpredicates:)] @@ -17,20 +22,26 @@ extern_methods!( type_: NSCompoundPredicateType, subpredicates: &NSArray, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(compoundPredicateType)] pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType; + #[method_id(subpredicates)] pub unsafe fn subpredicates(&self) -> Id; + #[method_id(andPredicateWithSubpredicates:)] pub unsafe fn andPredicateWithSubpredicates( subpredicates: &NSArray, ) -> Id; + #[method_id(orPredicateWithSubpredicates:)] pub unsafe fn orPredicateWithSubpredicates( subpredicates: &NSArray, ) -> Id; + #[method_id(notPredicateWithSubpredicate:)] pub unsafe fn notPredicateWithSubpredicate( predicate: &NSPredicate, diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 5381de24c..ff3a22ba1 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -1,149 +1,200 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSConnection; + unsafe impl ClassType for NSConnection { type Super = NSObject; } ); + extern_methods!( unsafe impl NSConnection { #[method_id(statistics)] pub unsafe fn statistics(&self) -> Id, Shared>; + #[method_id(allConnections)] pub unsafe fn allConnections() -> Id, Shared>; + #[method_id(defaultConnection)] pub unsafe fn defaultConnection() -> Id; + #[method_id(connectionWithRegisteredName:host:)] pub unsafe fn connectionWithRegisteredName_host( name: &NSString, hostName: Option<&NSString>, ) -> Option>; + #[method_id(connectionWithRegisteredName:host:usingNameServer:)] pub unsafe fn connectionWithRegisteredName_host_usingNameServer( name: &NSString, hostName: Option<&NSString>, server: &NSPortNameServer, ) -> Option>; + #[method_id(rootProxyForConnectionWithRegisteredName:host:)] pub unsafe fn rootProxyForConnectionWithRegisteredName_host( name: &NSString, hostName: Option<&NSString>, ) -> Option>; + #[method_id(rootProxyForConnectionWithRegisteredName:host:usingNameServer:)] pub unsafe fn rootProxyForConnectionWithRegisteredName_host_usingNameServer( name: &NSString, hostName: Option<&NSString>, server: &NSPortNameServer, ) -> Option>; + #[method_id(serviceConnectionWithName:rootObject:usingNameServer:)] pub unsafe fn serviceConnectionWithName_rootObject_usingNameServer( name: &NSString, root: &Object, server: &NSPortNameServer, ) -> Option>; + #[method_id(serviceConnectionWithName:rootObject:)] pub unsafe fn serviceConnectionWithName_rootObject( name: &NSString, root: &Object, ) -> Option>; + #[method(requestTimeout)] pub unsafe fn requestTimeout(&self) -> NSTimeInterval; + #[method(setRequestTimeout:)] pub unsafe fn setRequestTimeout(&self, requestTimeout: NSTimeInterval); + #[method(replyTimeout)] pub unsafe fn replyTimeout(&self) -> NSTimeInterval; + #[method(setReplyTimeout:)] pub unsafe fn setReplyTimeout(&self, replyTimeout: NSTimeInterval); + #[method_id(rootObject)] pub unsafe fn rootObject(&self) -> Option>; + #[method(setRootObject:)] pub unsafe fn setRootObject(&self, rootObject: Option<&Object>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSConnectionDelegate>); + #[method(independentConversationQueueing)] pub unsafe fn independentConversationQueueing(&self) -> bool; + #[method(setIndependentConversationQueueing:)] pub unsafe fn setIndependentConversationQueueing( &self, independentConversationQueueing: bool, ); + #[method(isValid)] pub unsafe fn isValid(&self) -> bool; + #[method_id(rootProxy)] pub unsafe fn rootProxy(&self) -> Id; + #[method(invalidate)] pub unsafe fn invalidate(&self); + #[method(addRequestMode:)] pub unsafe fn addRequestMode(&self, rmode: &NSString); + #[method(removeRequestMode:)] pub unsafe fn removeRequestMode(&self, rmode: &NSString); + #[method_id(requestModes)] pub unsafe fn requestModes(&self) -> Id, Shared>; + #[method(registerName:)] pub unsafe fn registerName(&self, name: Option<&NSString>) -> bool; + #[method(registerName:withNameServer:)] pub unsafe fn registerName_withNameServer( &self, name: Option<&NSString>, server: &NSPortNameServer, ) -> bool; + #[method_id(connectionWithReceivePort:sendPort:)] pub unsafe fn connectionWithReceivePort_sendPort( receivePort: Option<&NSPort>, sendPort: Option<&NSPort>, ) -> Option>; + #[method_id(currentConversation)] pub unsafe fn currentConversation() -> Option>; + #[method_id(initWithReceivePort:sendPort:)] pub unsafe fn initWithReceivePort_sendPort( &self, receivePort: Option<&NSPort>, sendPort: Option<&NSPort>, ) -> Option>; + #[method_id(sendPort)] pub unsafe fn sendPort(&self) -> Id; + #[method_id(receivePort)] pub unsafe fn receivePort(&self) -> Id; + #[method(enableMultipleThreads)] pub unsafe fn enableMultipleThreads(&self); + #[method(multipleThreadsEnabled)] pub unsafe fn multipleThreadsEnabled(&self) -> bool; + #[method(addRunLoop:)] pub unsafe fn addRunLoop(&self, runloop: &NSRunLoop); + #[method(removeRunLoop:)] pub unsafe fn removeRunLoop(&self, runloop: &NSRunLoop); + #[method(runInNewThread)] pub unsafe fn runInNewThread(&self); + #[method_id(remoteObjects)] pub unsafe fn remoteObjects(&self) -> Id; + #[method_id(localObjects)] pub unsafe fn localObjects(&self) -> Id; + #[method(dispatchWithComponents:)] pub unsafe fn dispatchWithComponents(&self, components: &NSArray); } ); + pub type NSConnectionDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSDistantObjectRequest; + unsafe impl ClassType for NSDistantObjectRequest { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDistantObjectRequest { #[method_id(invocation)] pub unsafe fn invocation(&self) -> Id; + #[method_id(connection)] pub unsafe fn connection(&self) -> Id; + #[method_id(conversation)] pub unsafe fn conversation(&self) -> Id; + #[method(replyWithException:)] pub unsafe fn replyWithException(&self, exception: Option<&NSException>); } diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 385fd2ea1..1d93aad41 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -1,55 +1,71 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSData; + unsafe impl ClassType for NSData { type Super = NSObject; } ); + extern_methods!( unsafe impl NSData { #[method(length)] pub unsafe fn length(&self) -> NSUInteger; + #[method(bytes)] pub unsafe fn bytes(&self) -> NonNull; } ); + extern_methods!( - #[doc = "NSExtendedData"] + /// NSExtendedData unsafe impl NSData { #[method_id(description)] pub unsafe fn description(&self) -> Id; + #[method(getBytes:length:)] pub unsafe fn getBytes_length(&self, buffer: NonNull, length: NSUInteger); + #[method(getBytes:range:)] pub unsafe fn getBytes_range(&self, buffer: NonNull, range: NSRange); + #[method(isEqualToData:)] pub unsafe fn isEqualToData(&self, other: &NSData) -> bool; + #[method_id(subdataWithRange:)] pub unsafe fn subdataWithRange(&self, range: NSRange) -> Id; + #[method(writeToFile:atomically:)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, ) -> bool; + #[method(writeToURL:atomically:)] pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; + #[method(writeToFile:options:error:)] pub unsafe fn writeToFile_options_error( &self, path: &NSString, writeOptionsMask: NSDataWritingOptions, ) -> Result<(), Id>; + #[method(writeToURL:options:error:)] pub unsafe fn writeToURL_options_error( &self, url: &NSURL, writeOptionsMask: NSDataWritingOptions, ) -> Result<(), Id>; + #[method(rangeOfData:options:range:)] pub unsafe fn rangeOfData_options_range( &self, @@ -57,57 +73,69 @@ extern_methods!( mask: NSDataSearchOptions, searchRange: NSRange, ) -> NSRange; + #[method(enumerateByteRangesUsingBlock:)] pub unsafe fn enumerateByteRangesUsingBlock(&self, block: TodoBlock); } ); + extern_methods!( - #[doc = "NSDataCreation"] + /// NSDataCreation unsafe impl NSData { #[method_id(data)] pub unsafe fn data() -> Id; + #[method_id(dataWithBytes:length:)] pub unsafe fn dataWithBytes_length( bytes: *mut c_void, length: NSUInteger, ) -> Id; + #[method_id(dataWithBytesNoCopy:length:)] pub unsafe fn dataWithBytesNoCopy_length( bytes: NonNull, length: NSUInteger, ) -> Id; + #[method_id(dataWithBytesNoCopy:length:freeWhenDone:)] pub unsafe fn dataWithBytesNoCopy_length_freeWhenDone( bytes: NonNull, length: NSUInteger, b: bool, ) -> Id; + #[method_id(dataWithContentsOfFile:options:error:)] pub unsafe fn dataWithContentsOfFile_options_error( path: &NSString, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; + #[method_id(dataWithContentsOfURL:options:error:)] pub unsafe fn dataWithContentsOfURL_options_error( url: &NSURL, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; + #[method_id(dataWithContentsOfFile:)] pub unsafe fn dataWithContentsOfFile(path: &NSString) -> Option>; + #[method_id(dataWithContentsOfURL:)] pub unsafe fn dataWithContentsOfURL(url: &NSURL) -> Option>; + #[method_id(initWithBytes:length:)] pub unsafe fn initWithBytes_length( &self, bytes: *mut c_void, length: NSUInteger, ) -> Id; + #[method_id(initWithBytesNoCopy:length:)] pub unsafe fn initWithBytesNoCopy_length( &self, bytes: NonNull, length: NSUInteger, ) -> Id; + #[method_id(initWithBytesNoCopy:length:freeWhenDone:)] pub unsafe fn initWithBytesNoCopy_length_freeWhenDone( &self, @@ -115,6 +143,7 @@ extern_methods!( length: NSUInteger, b: bool, ) -> Id; + #[method_id(initWithBytesNoCopy:length:deallocator:)] pub unsafe fn initWithBytesNoCopy_length_deallocator( &self, @@ -122,30 +151,37 @@ extern_methods!( length: NSUInteger, deallocator: TodoBlock, ) -> Id; + #[method_id(initWithContentsOfFile:options:error:)] pub unsafe fn initWithContentsOfFile_options_error( &self, path: &NSString, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; + #[method_id(initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option>; + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Id; + #[method_id(dataWithData:)] pub unsafe fn dataWithData(data: &NSData) -> Id; } ); + extern_methods!( - #[doc = "NSDataBase64Encoding"] + /// NSDataBase64Encoding unsafe impl NSData { #[method_id(initWithBase64EncodedString:options:)] pub unsafe fn initWithBase64EncodedString_options( @@ -153,17 +189,20 @@ extern_methods!( base64String: &NSString, options: NSDataBase64DecodingOptions, ) -> Option>; + #[method_id(base64EncodedStringWithOptions:)] pub unsafe fn base64EncodedStringWithOptions( &self, options: NSDataBase64EncodingOptions, ) -> Id; + #[method_id(initWithBase64EncodedData:options:)] pub unsafe fn initWithBase64EncodedData_options( &self, base64Data: &NSData, options: NSDataBase64DecodingOptions, ) -> Option>; + #[method_id(base64EncodedDataWithOptions:)] pub unsafe fn base64EncodedDataWithOptions( &self, @@ -171,14 +210,16 @@ extern_methods!( ) -> Id; } ); + extern_methods!( - #[doc = "NSDataCompression"] + /// NSDataCompression unsafe impl NSData { #[method_id(decompressedDataUsingAlgorithm:error:)] pub unsafe fn decompressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, ) -> Result, Id>; + #[method_id(compressedDataUsingAlgorithm:error:)] pub unsafe fn compressedDataUsingAlgorithm_error( &self, @@ -186,59 +227,76 @@ extern_methods!( ) -> Result, Id>; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSData { #[method(getBytes:)] pub unsafe fn getBytes(&self, buffer: NonNull); + #[method_id(dataWithContentsOfMappedFile:)] pub unsafe fn dataWithContentsOfMappedFile(path: &NSString) -> Option>; + #[method_id(initWithContentsOfMappedFile:)] pub unsafe fn initWithContentsOfMappedFile( &self, path: &NSString, ) -> Option>; + #[method_id(initWithBase64Encoding:)] pub unsafe fn initWithBase64Encoding( &self, base64String: &NSString, ) -> Option>; + #[method_id(base64Encoding)] pub unsafe fn base64Encoding(&self) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSMutableData; + unsafe impl ClassType for NSMutableData { type Super = NSData; } ); + extern_methods!( unsafe impl NSMutableData { #[method(mutableBytes)] pub unsafe fn mutableBytes(&self) -> NonNull; + #[method(length)] pub unsafe fn length(&self) -> NSUInteger; + #[method(setLength:)] pub unsafe fn setLength(&self, length: NSUInteger); } ); + extern_methods!( - #[doc = "NSExtendedMutableData"] + /// NSExtendedMutableData unsafe impl NSMutableData { #[method(appendBytes:length:)] pub unsafe fn appendBytes_length(&self, bytes: NonNull, length: NSUInteger); + #[method(appendData:)] pub unsafe fn appendData(&self, other: &NSData); + #[method(increaseLengthBy:)] pub unsafe fn increaseLengthBy(&self, extraLength: NSUInteger); + #[method(replaceBytesInRange:withBytes:)] pub unsafe fn replaceBytesInRange_withBytes(&self, range: NSRange, bytes: NonNull); + #[method(resetBytesInRange:)] pub unsafe fn resetBytesInRange(&self, range: NSRange); + #[method(setData:)] pub unsafe fn setData(&self, data: &NSData); + #[method(replaceBytesInRange:withBytes:length:)] pub unsafe fn replaceBytesInRange_withBytes_length( &self, @@ -248,27 +306,33 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSMutableDataCreation"] + /// NSMutableDataCreation unsafe impl NSMutableData { #[method_id(dataWithCapacity:)] pub unsafe fn dataWithCapacity(aNumItems: NSUInteger) -> Option>; + #[method_id(dataWithLength:)] pub unsafe fn dataWithLength(length: NSUInteger) -> Option>; + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Option>; + #[method_id(initWithLength:)] pub unsafe fn initWithLength(&self, length: NSUInteger) -> Option>; } ); + extern_methods!( - #[doc = "NSMutableDataCompression"] + /// NSMutableDataCompression unsafe impl NSMutableData { #[method(decompressUsingAlgorithm:error:)] pub unsafe fn decompressUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, ) -> Result<(), Id>; + #[method(compressUsingAlgorithm:error:)] pub unsafe fn compressUsingAlgorithm_error( &self, @@ -276,13 +340,16 @@ extern_methods!( ) -> Result<(), Id>; } ); + extern_class!( #[derive(Debug)] pub struct NSPurgeableData; + unsafe impl ClassType for NSPurgeableData { type Super = NSMutableData; } ); + extern_methods!( unsafe impl NSPurgeableData {} ); diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index b088881b3..8d1d27d85 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -1,91 +1,122 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDate; + unsafe impl ClassType for NSDate { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDate { #[method(timeIntervalSinceReferenceDate)] pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithTimeIntervalSinceReferenceDate:)] pub unsafe fn initWithTimeIntervalSinceReferenceDate( &self, ti: NSTimeInterval, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSExtendedDate"] + /// NSExtendedDate unsafe impl NSDate { #[method(timeIntervalSinceDate:)] pub unsafe fn timeIntervalSinceDate(&self, anotherDate: &NSDate) -> NSTimeInterval; + #[method(timeIntervalSinceNow)] pub unsafe fn timeIntervalSinceNow(&self) -> NSTimeInterval; + #[method(timeIntervalSince1970)] pub unsafe fn timeIntervalSince1970(&self) -> NSTimeInterval; + #[method_id(addTimeInterval:)] pub unsafe fn addTimeInterval(&self, seconds: NSTimeInterval) -> Id; + #[method_id(dateByAddingTimeInterval:)] pub unsafe fn dateByAddingTimeInterval(&self, ti: NSTimeInterval) -> Id; + #[method_id(earlierDate:)] pub unsafe fn earlierDate(&self, anotherDate: &NSDate) -> Id; + #[method_id(laterDate:)] pub unsafe fn laterDate(&self, anotherDate: &NSDate) -> Id; + #[method(compare:)] pub unsafe fn compare(&self, other: &NSDate) -> NSComparisonResult; + #[method(isEqualToDate:)] pub unsafe fn isEqualToDate(&self, otherDate: &NSDate) -> bool; + #[method_id(description)] pub unsafe fn description(&self) -> Id; + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; + #[method(timeIntervalSinceReferenceDate)] pub unsafe fn timeIntervalSinceReferenceDate() -> NSTimeInterval; } ); + extern_methods!( - #[doc = "NSDateCreation"] + /// NSDateCreation unsafe impl NSDate { #[method_id(date)] pub unsafe fn date() -> Id; + #[method_id(dateWithTimeIntervalSinceNow:)] pub unsafe fn dateWithTimeIntervalSinceNow(secs: NSTimeInterval) -> Id; + #[method_id(dateWithTimeIntervalSinceReferenceDate:)] pub unsafe fn dateWithTimeIntervalSinceReferenceDate( ti: NSTimeInterval, ) -> Id; + #[method_id(dateWithTimeIntervalSince1970:)] pub unsafe fn dateWithTimeIntervalSince1970(secs: NSTimeInterval) -> Id; + #[method_id(dateWithTimeInterval:sinceDate:)] pub unsafe fn dateWithTimeInterval_sinceDate( secsToBeAdded: NSTimeInterval, date: &NSDate, ) -> Id; + #[method_id(distantFuture)] pub unsafe fn distantFuture() -> Id; + #[method_id(distantPast)] pub unsafe fn distantPast() -> Id; + #[method_id(now)] pub unsafe fn now() -> Id; + #[method_id(initWithTimeIntervalSinceNow:)] pub unsafe fn initWithTimeIntervalSinceNow(&self, secs: NSTimeInterval) -> Id; + #[method_id(initWithTimeIntervalSince1970:)] pub unsafe fn initWithTimeIntervalSince1970( &self, secs: NSTimeInterval, ) -> Id; + #[method_id(initWithTimeInterval:sinceDate:)] pub unsafe fn initWithTimeInterval_sinceDate( &self, diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index fe4aae6b0..59180f990 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDateComponentsFormatter; + unsafe impl ClassType for NSDateComponentsFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSDateComponentsFormatter { #[method_id(stringForObjectValue:)] @@ -16,76 +21,103 @@ extern_methods!( &self, obj: Option<&Object>, ) -> Option>; + #[method_id(stringFromDateComponents:)] pub unsafe fn stringFromDateComponents( &self, components: &NSDateComponents, ) -> Option>; + #[method_id(stringFromDate:toDate:)] pub unsafe fn stringFromDate_toDate( &self, startDate: &NSDate, endDate: &NSDate, ) -> Option>; + #[method_id(stringFromTimeInterval:)] pub unsafe fn stringFromTimeInterval( &self, ti: NSTimeInterval, ) -> Option>; + #[method_id(localizedStringFromDateComponents:unitsStyle:)] pub unsafe fn localizedStringFromDateComponents_unitsStyle( components: &NSDateComponents, unitsStyle: NSDateComponentsFormatterUnitsStyle, ) -> Option>; + #[method(unitsStyle)] pub unsafe fn unitsStyle(&self) -> NSDateComponentsFormatterUnitsStyle; + #[method(setUnitsStyle:)] pub unsafe fn setUnitsStyle(&self, unitsStyle: NSDateComponentsFormatterUnitsStyle); + #[method(allowedUnits)] pub unsafe fn allowedUnits(&self) -> NSCalendarUnit; + #[method(setAllowedUnits:)] pub unsafe fn setAllowedUnits(&self, allowedUnits: NSCalendarUnit); + #[method(zeroFormattingBehavior)] pub unsafe fn zeroFormattingBehavior( &self, ) -> NSDateComponentsFormatterZeroFormattingBehavior; + #[method(setZeroFormattingBehavior:)] pub unsafe fn setZeroFormattingBehavior( &self, zeroFormattingBehavior: NSDateComponentsFormatterZeroFormattingBehavior, ); + #[method_id(calendar)] pub unsafe fn calendar(&self) -> Option>; + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(referenceDate)] pub unsafe fn referenceDate(&self) -> Option>; + #[method(setReferenceDate:)] pub unsafe fn setReferenceDate(&self, referenceDate: Option<&NSDate>); + #[method(allowsFractionalUnits)] pub unsafe fn allowsFractionalUnits(&self) -> bool; + #[method(setAllowsFractionalUnits:)] pub unsafe fn setAllowsFractionalUnits(&self, allowsFractionalUnits: bool); + #[method(maximumUnitCount)] pub unsafe fn maximumUnitCount(&self) -> NSInteger; + #[method(setMaximumUnitCount:)] pub unsafe fn setMaximumUnitCount(&self, maximumUnitCount: NSInteger); + #[method(collapsesLargestUnit)] pub unsafe fn collapsesLargestUnit(&self) -> bool; + #[method(setCollapsesLargestUnit:)] pub unsafe fn setCollapsesLargestUnit(&self, collapsesLargestUnit: bool); + #[method(includesApproximationPhrase)] pub unsafe fn includesApproximationPhrase(&self) -> bool; + #[method(setIncludesApproximationPhrase:)] pub unsafe fn setIncludesApproximationPhrase(&self, includesApproximationPhrase: bool); + #[method(includesTimeRemainingPhrase)] pub unsafe fn includesTimeRemainingPhrase(&self) -> bool; + #[method(setIncludesTimeRemainingPhrase:)] pub unsafe fn setIncludesTimeRemainingPhrase(&self, includesTimeRemainingPhrase: bool); + #[method(formattingContext)] pub unsafe fn formattingContext(&self) -> NSFormattingContext; + #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 25d7117df..b73ff78c6 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -1,20 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDateFormatter; + unsafe impl ClassType for NSDateFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSDateFormatter { #[method(formattingContext)] pub unsafe fn formattingContext(&self) -> NSFormattingContext; + #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); + #[method(getObjectValue:forString:range:error:)] pub unsafe fn getObjectValue_forString_range_error( &self, @@ -22,202 +29,276 @@ extern_methods!( string: &NSString, rangep: *mut NSRange, ) -> Result<(), Id>; + #[method_id(stringFromDate:)] pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; + #[method_id(dateFromString:)] pub unsafe fn dateFromString(&self, string: &NSString) -> Option>; + #[method_id(localizedStringFromDate:dateStyle:timeStyle:)] pub unsafe fn localizedStringFromDate_dateStyle_timeStyle( date: &NSDate, dstyle: NSDateFormatterStyle, tstyle: NSDateFormatterStyle, ) -> Id; + #[method_id(dateFormatFromTemplate:options:locale:)] pub unsafe fn dateFormatFromTemplate_options_locale( tmplate: &NSString, opts: NSUInteger, locale: Option<&NSLocale>, ) -> Option>; + #[method(defaultFormatterBehavior)] pub unsafe fn defaultFormatterBehavior() -> NSDateFormatterBehavior; + #[method(setDefaultFormatterBehavior:)] pub unsafe fn setDefaultFormatterBehavior( defaultFormatterBehavior: NSDateFormatterBehavior, ); + #[method(setLocalizedDateFormatFromTemplate:)] pub unsafe fn setLocalizedDateFormatFromTemplate(&self, dateFormatTemplate: &NSString); + #[method_id(dateFormat)] pub unsafe fn dateFormat(&self) -> Id; + #[method(setDateFormat:)] pub unsafe fn setDateFormat(&self, dateFormat: Option<&NSString>); + #[method(dateStyle)] pub unsafe fn dateStyle(&self) -> NSDateFormatterStyle; + #[method(setDateStyle:)] pub unsafe fn setDateStyle(&self, dateStyle: NSDateFormatterStyle); + #[method(timeStyle)] pub unsafe fn timeStyle(&self) -> NSDateFormatterStyle; + #[method(setTimeStyle:)] pub unsafe fn setTimeStyle(&self, timeStyle: NSDateFormatterStyle); + #[method_id(locale)] pub unsafe fn locale(&self) -> Id; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method(generatesCalendarDates)] pub unsafe fn generatesCalendarDates(&self) -> bool; + #[method(setGeneratesCalendarDates:)] pub unsafe fn setGeneratesCalendarDates(&self, generatesCalendarDates: bool); + #[method(formatterBehavior)] pub unsafe fn formatterBehavior(&self) -> NSDateFormatterBehavior; + #[method(setFormatterBehavior:)] pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSDateFormatterBehavior); + #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Id; + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method_id(calendar)] pub unsafe fn calendar(&self) -> Id; + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method(isLenient)] pub unsafe fn isLenient(&self) -> bool; + #[method(setLenient:)] pub unsafe fn setLenient(&self, lenient: bool); + #[method_id(twoDigitStartDate)] pub unsafe fn twoDigitStartDate(&self) -> Option>; + #[method(setTwoDigitStartDate:)] pub unsafe fn setTwoDigitStartDate(&self, twoDigitStartDate: Option<&NSDate>); + #[method_id(defaultDate)] pub unsafe fn defaultDate(&self) -> Option>; + #[method(setDefaultDate:)] pub unsafe fn setDefaultDate(&self, defaultDate: Option<&NSDate>); + #[method_id(eraSymbols)] pub unsafe fn eraSymbols(&self) -> Id, Shared>; + #[method(setEraSymbols:)] pub unsafe fn setEraSymbols(&self, eraSymbols: Option<&NSArray>); + #[method_id(monthSymbols)] pub unsafe fn monthSymbols(&self) -> Id, Shared>; + #[method(setMonthSymbols:)] pub unsafe fn setMonthSymbols(&self, monthSymbols: Option<&NSArray>); + #[method_id(shortMonthSymbols)] pub unsafe fn shortMonthSymbols(&self) -> Id, Shared>; + #[method(setShortMonthSymbols:)] pub unsafe fn setShortMonthSymbols(&self, shortMonthSymbols: Option<&NSArray>); + #[method_id(weekdaySymbols)] pub unsafe fn weekdaySymbols(&self) -> Id, Shared>; + #[method(setWeekdaySymbols:)] pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: Option<&NSArray>); + #[method_id(shortWeekdaySymbols)] pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared>; + #[method(setShortWeekdaySymbols:)] pub unsafe fn setShortWeekdaySymbols( &self, shortWeekdaySymbols: Option<&NSArray>, ); + #[method_id(AMSymbol)] pub unsafe fn AMSymbol(&self) -> Id; + #[method(setAMSymbol:)] pub unsafe fn setAMSymbol(&self, AMSymbol: Option<&NSString>); + #[method_id(PMSymbol)] pub unsafe fn PMSymbol(&self) -> Id; + #[method(setPMSymbol:)] pub unsafe fn setPMSymbol(&self, PMSymbol: Option<&NSString>); + #[method_id(longEraSymbols)] pub unsafe fn longEraSymbols(&self) -> Id, Shared>; + #[method(setLongEraSymbols:)] pub unsafe fn setLongEraSymbols(&self, longEraSymbols: Option<&NSArray>); + #[method_id(veryShortMonthSymbols)] pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared>; + #[method(setVeryShortMonthSymbols:)] pub unsafe fn setVeryShortMonthSymbols( &self, veryShortMonthSymbols: Option<&NSArray>, ); + #[method_id(standaloneMonthSymbols)] pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared>; + #[method(setStandaloneMonthSymbols:)] pub unsafe fn setStandaloneMonthSymbols( &self, standaloneMonthSymbols: Option<&NSArray>, ); + #[method_id(shortStandaloneMonthSymbols)] pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared>; + #[method(setShortStandaloneMonthSymbols:)] pub unsafe fn setShortStandaloneMonthSymbols( &self, shortStandaloneMonthSymbols: Option<&NSArray>, ); + #[method_id(veryShortStandaloneMonthSymbols)] pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared>; + #[method(setVeryShortStandaloneMonthSymbols:)] pub unsafe fn setVeryShortStandaloneMonthSymbols( &self, veryShortStandaloneMonthSymbols: Option<&NSArray>, ); + #[method_id(veryShortWeekdaySymbols)] pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared>; + #[method(setVeryShortWeekdaySymbols:)] pub unsafe fn setVeryShortWeekdaySymbols( &self, veryShortWeekdaySymbols: Option<&NSArray>, ); + #[method_id(standaloneWeekdaySymbols)] pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared>; + #[method(setStandaloneWeekdaySymbols:)] pub unsafe fn setStandaloneWeekdaySymbols( &self, standaloneWeekdaySymbols: Option<&NSArray>, ); + #[method_id(shortStandaloneWeekdaySymbols)] pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + #[method(setShortStandaloneWeekdaySymbols:)] pub unsafe fn setShortStandaloneWeekdaySymbols( &self, shortStandaloneWeekdaySymbols: Option<&NSArray>, ); + #[method_id(veryShortStandaloneWeekdaySymbols)] pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared>; + #[method(setVeryShortStandaloneWeekdaySymbols:)] pub unsafe fn setVeryShortStandaloneWeekdaySymbols( &self, veryShortStandaloneWeekdaySymbols: Option<&NSArray>, ); + #[method_id(quarterSymbols)] pub unsafe fn quarterSymbols(&self) -> Id, Shared>; + #[method(setQuarterSymbols:)] pub unsafe fn setQuarterSymbols(&self, quarterSymbols: Option<&NSArray>); + #[method_id(shortQuarterSymbols)] pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared>; + #[method(setShortQuarterSymbols:)] pub unsafe fn setShortQuarterSymbols( &self, shortQuarterSymbols: Option<&NSArray>, ); + #[method_id(standaloneQuarterSymbols)] pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared>; + #[method(setStandaloneQuarterSymbols:)] pub unsafe fn setStandaloneQuarterSymbols( &self, standaloneQuarterSymbols: Option<&NSArray>, ); + #[method_id(shortStandaloneQuarterSymbols)] pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared>; + #[method(setShortStandaloneQuarterSymbols:)] pub unsafe fn setShortStandaloneQuarterSymbols( &self, shortStandaloneQuarterSymbols: Option<&NSArray>, ); + #[method_id(gregorianStartDate)] pub unsafe fn gregorianStartDate(&self) -> Option>; + #[method(setGregorianStartDate:)] pub unsafe fn setGregorianStartDate(&self, gregorianStartDate: Option<&NSDate>); + #[method(doesRelativeDateFormatting)] pub unsafe fn doesRelativeDateFormatting(&self) -> bool; + #[method(setDoesRelativeDateFormatting:)] pub unsafe fn setDoesRelativeDateFormatting(&self, doesRelativeDateFormatting: bool); } ); + extern_methods!( - #[doc = "NSDateFormatterCompatibility"] + /// NSDateFormatterCompatibility unsafe impl NSDateFormatter { #[method_id(initWithDateFormat:allowNaturalLanguage:)] pub unsafe fn initWithDateFormat_allowNaturalLanguage( @@ -225,6 +306,7 @@ extern_methods!( format: &NSString, flag: bool, ) -> Id; + #[method(allowsNaturalLanguage)] pub unsafe fn allowsNaturalLanguage(&self) -> bool; } diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index 00b90df76..a98fa1daa 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -1,49 +1,65 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDateInterval; + unsafe impl ClassType for NSDateInterval { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDateInterval { #[method_id(startDate)] pub unsafe fn startDate(&self) -> Id; + #[method_id(endDate)] pub unsafe fn endDate(&self) -> Id; + #[method(duration)] pub unsafe fn duration(&self) -> NSTimeInterval; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + #[method_id(initWithStartDate:duration:)] pub unsafe fn initWithStartDate_duration( &self, startDate: &NSDate, duration: NSTimeInterval, ) -> Id; + #[method_id(initWithStartDate:endDate:)] pub unsafe fn initWithStartDate_endDate( &self, startDate: &NSDate, endDate: &NSDate, ) -> Id; + #[method(compare:)] pub unsafe fn compare(&self, dateInterval: &NSDateInterval) -> NSComparisonResult; + #[method(isEqualToDateInterval:)] pub unsafe fn isEqualToDateInterval(&self, dateInterval: &NSDateInterval) -> bool; + #[method(intersectsDateInterval:)] pub unsafe fn intersectsDateInterval(&self, dateInterval: &NSDateInterval) -> bool; + #[method_id(intersectionWithDateInterval:)] pub unsafe fn intersectionWithDateInterval( &self, dateInterval: &NSDateInterval, ) -> Option>; + #[method(containsDate:)] pub unsafe fn containsDate(&self, date: &NSDate) -> bool; } diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index e62cb194c..fd3129c5c 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -1,46 +1,64 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDateIntervalFormatter; + unsafe impl ClassType for NSDateIntervalFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSDateIntervalFormatter { #[method_id(locale)] pub unsafe fn locale(&self) -> Id; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(calendar)] pub unsafe fn calendar(&self) -> Id; + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Id; + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method_id(dateTemplate)] pub unsafe fn dateTemplate(&self) -> Id; + #[method(setDateTemplate:)] pub unsafe fn setDateTemplate(&self, dateTemplate: Option<&NSString>); + #[method(dateStyle)] pub unsafe fn dateStyle(&self) -> NSDateIntervalFormatterStyle; + #[method(setDateStyle:)] pub unsafe fn setDateStyle(&self, dateStyle: NSDateIntervalFormatterStyle); + #[method(timeStyle)] pub unsafe fn timeStyle(&self) -> NSDateIntervalFormatterStyle; + #[method(setTimeStyle:)] pub unsafe fn setTimeStyle(&self, timeStyle: NSDateIntervalFormatterStyle); + #[method_id(stringFromDate:toDate:)] pub unsafe fn stringFromDate_toDate( &self, fromDate: &NSDate, toDate: &NSDate, ) -> Id; + #[method_id(stringFromDateInterval:)] pub unsafe fn stringFromDateInterval( &self, diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimal.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index 1edbecc27..33ab91812 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSDecimalNumberBehaviors = NSObject; + extern_class!( #[derive(Debug)] pub struct NSDecimalNumber; + unsafe impl ClassType for NSDecimalNumber { type Super = NSNumber; } ); + extern_methods!( unsafe impl NSDecimalNumber { #[method_id(initWithMantissa:exponent:isNegative:)] @@ -19,142 +25,178 @@ extern_methods!( exponent: c_short, flag: bool, ) -> Id; + #[method_id(initWithDecimal:)] pub unsafe fn initWithDecimal(&self, dcm: NSDecimal) -> Id; + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, numberValue: Option<&NSString>) -> Id; + #[method_id(initWithString:locale:)] pub unsafe fn initWithString_locale( &self, numberValue: Option<&NSString>, locale: Option<&Object>, ) -> Id; + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; + #[method(decimalValue)] pub unsafe fn decimalValue(&self) -> NSDecimal; + #[method_id(decimalNumberWithMantissa:exponent:isNegative:)] pub unsafe fn decimalNumberWithMantissa_exponent_isNegative( mantissa: c_ulonglong, exponent: c_short, flag: bool, ) -> Id; + #[method_id(decimalNumberWithDecimal:)] pub unsafe fn decimalNumberWithDecimal(dcm: NSDecimal) -> Id; + #[method_id(decimalNumberWithString:)] pub unsafe fn decimalNumberWithString( numberValue: Option<&NSString>, ) -> Id; + #[method_id(decimalNumberWithString:locale:)] pub unsafe fn decimalNumberWithString_locale( numberValue: Option<&NSString>, locale: Option<&Object>, ) -> Id; + #[method_id(zero)] pub unsafe fn zero() -> Id; + #[method_id(one)] pub unsafe fn one() -> Id; + #[method_id(minimumDecimalNumber)] pub unsafe fn minimumDecimalNumber() -> Id; + #[method_id(maximumDecimalNumber)] pub unsafe fn maximumDecimalNumber() -> Id; + #[method_id(notANumber)] pub unsafe fn notANumber() -> Id; + #[method_id(decimalNumberByAdding:)] pub unsafe fn decimalNumberByAdding( &self, decimalNumber: &NSDecimalNumber, ) -> Id; + #[method_id(decimalNumberByAdding:withBehavior:)] pub unsafe fn decimalNumberByAdding_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; + #[method_id(decimalNumberBySubtracting:)] pub unsafe fn decimalNumberBySubtracting( &self, decimalNumber: &NSDecimalNumber, ) -> Id; + #[method_id(decimalNumberBySubtracting:withBehavior:)] pub unsafe fn decimalNumberBySubtracting_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; + #[method_id(decimalNumberByMultiplyingBy:)] pub unsafe fn decimalNumberByMultiplyingBy( &self, decimalNumber: &NSDecimalNumber, ) -> Id; + #[method_id(decimalNumberByMultiplyingBy:withBehavior:)] pub unsafe fn decimalNumberByMultiplyingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; + #[method_id(decimalNumberByDividingBy:)] pub unsafe fn decimalNumberByDividingBy( &self, decimalNumber: &NSDecimalNumber, ) -> Id; + #[method_id(decimalNumberByDividingBy:withBehavior:)] pub unsafe fn decimalNumberByDividingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; + #[method_id(decimalNumberByRaisingToPower:)] pub unsafe fn decimalNumberByRaisingToPower( &self, power: NSUInteger, ) -> Id; + #[method_id(decimalNumberByRaisingToPower:withBehavior:)] pub unsafe fn decimalNumberByRaisingToPower_withBehavior( &self, power: NSUInteger, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; + #[method_id(decimalNumberByMultiplyingByPowerOf10:)] pub unsafe fn decimalNumberByMultiplyingByPowerOf10( &self, power: c_short, ) -> Id; + #[method_id(decimalNumberByMultiplyingByPowerOf10:withBehavior:)] pub unsafe fn decimalNumberByMultiplyingByPowerOf10_withBehavior( &self, power: c_short, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; + #[method_id(decimalNumberByRoundingAccordingToBehavior:)] pub unsafe fn decimalNumberByRoundingAccordingToBehavior( &self, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; + #[method(compare:)] pub unsafe fn compare(&self, decimalNumber: &NSNumber) -> NSComparisonResult; + #[method_id(defaultBehavior)] pub unsafe fn defaultBehavior() -> Id; + #[method(setDefaultBehavior:)] pub unsafe fn setDefaultBehavior(defaultBehavior: &NSDecimalNumberBehaviors); + #[method(objCType)] pub unsafe fn objCType(&self) -> NonNull; + #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; } ); + extern_class!( #[derive(Debug)] pub struct NSDecimalNumberHandler; + unsafe impl ClassType for NSDecimalNumberHandler { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDecimalNumberHandler { #[method_id(defaultDecimalNumberHandler)] pub unsafe fn defaultDecimalNumberHandler() -> Id; + #[method_id(initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:)] pub unsafe fn initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( &self, @@ -165,6 +207,7 @@ extern_methods!( underflow: bool, divideByZero: bool, ) -> Id; + #[method_id(decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:)] pub unsafe fn decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( roundingMode: NSRoundingMode, @@ -176,15 +219,17 @@ extern_methods!( ) -> Id; } ); + extern_methods!( - #[doc = "NSDecimalNumberExtensions"] + /// NSDecimalNumberExtensions unsafe impl NSNumber { #[method(decimalValue)] pub unsafe fn decimalValue(&self) -> NSDecimal; } ); + extern_methods!( - #[doc = "NSDecimalNumberScanning"] + /// NSDecimalNumberScanning unsafe impl NSScanner { #[method(scanDecimal:)] pub unsafe fn scanDecimal(&self, dcm: *mut NSDecimal) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index faddec751..e507d1cac 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -1,24 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSDictionary; + unsafe impl ClassType for NSDictionary { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDictionary { #[method(count)] pub unsafe fn count(&self) -> NSUInteger; + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option>; + #[method_id(keyEnumerator)] pub unsafe fn keyEnumerator(&self) -> Id, Shared>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithObjects:forKeys:count:)] pub unsafe fn initWithObjects_forKeys_count( &self, @@ -26,55 +35,69 @@ extern_methods!( keys: TodoArray, cnt: NSUInteger, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSExtendedDictionary"] + /// NSExtendedDictionary unsafe impl NSDictionary { #[method_id(allKeys)] pub unsafe fn allKeys(&self) -> Id, Shared>; + #[method_id(allKeysForObject:)] pub unsafe fn allKeysForObject( &self, anObject: &ObjectType, ) -> Id, Shared>; + #[method_id(allValues)] pub unsafe fn allValues(&self) -> Id, Shared>; + #[method_id(description)] pub unsafe fn description(&self) -> Id; + #[method_id(descriptionInStringsFileFormat)] pub unsafe fn descriptionInStringsFileFormat(&self) -> Id; + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; + #[method_id(descriptionWithLocale:indent:)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, level: NSUInteger, ) -> Id; + #[method(isEqualToDictionary:)] pub unsafe fn isEqualToDictionary( &self, otherDictionary: &NSDictionary, ) -> bool; + #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + #[method_id(objectsForKeys:notFoundMarker:)] pub unsafe fn objectsForKeys_notFoundMarker( &self, keys: &NSArray, marker: &ObjectType, ) -> Id, Shared>; + #[method(writeToURL:error:)] pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id>; + #[method_id(keysSortedByValueUsingSelector:)] pub unsafe fn keysSortedByValueUsingSelector( &self, comparator: Sel, ) -> Id, Shared>; + #[method(getObjects:andKeys:count:)] pub unsafe fn getObjects_andKeys_count( &self, @@ -82,35 +105,42 @@ extern_methods!( keys: TodoArray, count: NSUInteger, ); + #[method_id(objectForKeyedSubscript:)] pub unsafe fn objectForKeyedSubscript( &self, key: &KeyType, ) -> Option>; + #[method(enumerateKeysAndObjectsUsingBlock:)] pub unsafe fn enumerateKeysAndObjectsUsingBlock(&self, block: TodoBlock); + #[method(enumerateKeysAndObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); + #[method_id(keysSortedByValueUsingComparator:)] pub unsafe fn keysSortedByValueUsingComparator( &self, cmptr: NSComparator, ) -> Id, Shared>; + #[method_id(keysSortedByValueWithOptions:usingComparator:)] pub unsafe fn keysSortedByValueWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, ) -> Id, Shared>; + #[method_id(keysOfEntriesPassingTest:)] pub unsafe fn keysOfEntriesPassingTest( &self, predicate: TodoBlock, ) -> Id, Shared>; + #[method_id(keysOfEntriesWithOptions:passingTest:)] pub unsafe fn keysOfEntriesWithOptions_passingTest( &self, @@ -119,151 +149,185 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSDictionary { #[method(getObjects:andKeys:)] pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray); + #[method_id(dictionaryWithContentsOfFile:)] pub unsafe fn dictionaryWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; + #[method_id(dictionaryWithContentsOfURL:)] pub unsafe fn dictionaryWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, ) -> Option, Shared>>; + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, url: &NSURL, ) -> Option, Shared>>; + #[method(writeToFile:atomically:)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, ) -> bool; + #[method(writeToURL:atomically:)] pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; } ); + extern_methods!( - #[doc = "NSDictionaryCreation"] + /// NSDictionaryCreation unsafe impl NSDictionary { #[method_id(dictionary)] pub unsafe fn dictionary() -> Id; + #[method_id(dictionaryWithObject:forKey:)] pub unsafe fn dictionaryWithObject_forKey( object: &ObjectType, key: &NSCopying, ) -> Id; + #[method_id(dictionaryWithObjects:forKeys:count:)] pub unsafe fn dictionaryWithObjects_forKeys_count( objects: TodoArray, keys: TodoArray, cnt: NSUInteger, ) -> Id; + #[method_id(dictionaryWithDictionary:)] pub unsafe fn dictionaryWithDictionary( dict: &NSDictionary, ) -> Id; + #[method_id(dictionaryWithObjects:forKeys:)] pub unsafe fn dictionaryWithObjects_forKeys( objects: &NSArray, keys: &NSArray, ) -> Id; + #[method_id(initWithDictionary:)] pub unsafe fn initWithDictionary( &self, otherDictionary: &NSDictionary, ) -> Id; + #[method_id(initWithDictionary:copyItems:)] pub unsafe fn initWithDictionary_copyItems( &self, otherDictionary: &NSDictionary, flag: bool, ) -> Id; + #[method_id(initWithObjects:forKeys:)] pub unsafe fn initWithObjects_forKeys( &self, objects: &NSArray, keys: &NSArray, ) -> Id; + #[method_id(initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( &self, url: &NSURL, ) -> Result, Shared>, Id>; + #[method_id(dictionaryWithContentsOfURL:error:)] pub unsafe fn dictionaryWithContentsOfURL_error( url: &NSURL, ) -> Result, Shared>, Id>; } ); + __inner_extern_class!( #[derive(Debug)] pub struct NSMutableDictionary; + unsafe impl ClassType for NSMutableDictionary { type Super = NSDictionary; } ); + extern_methods!( unsafe impl NSMutableDictionary { #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, aKey: &KeyType); + #[method(setObject:forKey:)] pub unsafe fn setObject_forKey(&self, anObject: &ObjectType, aKey: &NSCopying); + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSExtendedMutableDictionary"] + /// NSExtendedMutableDictionary unsafe impl NSMutableDictionary { #[method(addEntriesFromDictionary:)] pub unsafe fn addEntriesFromDictionary( &self, otherDictionary: &NSDictionary, ); + #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); + #[method(removeObjectsForKeys:)] pub unsafe fn removeObjectsForKeys(&self, keyArray: &NSArray); + #[method(setDictionary:)] pub unsafe fn setDictionary(&self, otherDictionary: &NSDictionary); + #[method(setObject:forKeyedSubscript:)] pub unsafe fn setObject_forKeyedSubscript(&self, obj: Option<&ObjectType>, key: &NSCopying); } ); + extern_methods!( - #[doc = "NSMutableDictionaryCreation"] + /// NSMutableDictionaryCreation unsafe impl NSMutableDictionary { #[method_id(dictionaryWithCapacity:)] pub unsafe fn dictionaryWithCapacity(numItems: NSUInteger) -> Id; + #[method_id(dictionaryWithContentsOfFile:)] pub unsafe fn dictionaryWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; + #[method_id(dictionaryWithContentsOfURL:)] pub unsafe fn dictionaryWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( &self, path: &NSString, ) -> Option, Shared>>; + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, @@ -271,15 +335,17 @@ extern_methods!( ) -> Option, Shared>>; } ); + extern_methods!( - #[doc = "NSSharedKeySetDictionary"] + /// NSSharedKeySetDictionary unsafe impl NSDictionary { #[method_id(sharedKeySetForKeys:)] pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id; } ); + extern_methods!( - #[doc = "NSSharedKeySetDictionary"] + /// NSSharedKeySetDictionary unsafe impl NSMutableDictionary { #[method_id(dictionaryWithSharedKeySet:)] pub unsafe fn dictionaryWithSharedKeySet( @@ -287,8 +353,9 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSGenericFastEnumeraiton"] + /// NSGenericFastEnumeraiton unsafe impl NSDictionary { #[method(countByEnumeratingWithState:objects:count:)] pub unsafe fn countByEnumeratingWithState_objects_count( diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index e62d940de..11dff0515 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDistantObject; + unsafe impl ClassType for NSDistantObject { type Super = NSProxy; } ); + extern_methods!( unsafe impl NSDistantObject { #[method_id(proxyWithTarget:connection:)] @@ -16,27 +21,33 @@ extern_methods!( target: &Object, connection: &NSConnection, ) -> Option>; + #[method_id(initWithTarget:connection:)] pub unsafe fn initWithTarget_connection( &self, target: &Object, connection: &NSConnection, ) -> Option>; + #[method_id(proxyWithLocal:connection:)] pub unsafe fn proxyWithLocal_connection( target: &Object, connection: &NSConnection, ) -> Id; + #[method_id(initWithLocal:connection:)] pub unsafe fn initWithLocal_connection( &self, target: &Object, connection: &NSConnection, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method(setProtocolForProxy:)] pub unsafe fn setProtocolForProxy(&self, proto: Option<&Protocol>); + #[method_id(connectionForProxy)] pub unsafe fn connectionForProxy(&self) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index 590a905a5..78a12a12d 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSDistributedLock; + unsafe impl ClassType for NSDistributedLock { type Super = NSObject; } ); + extern_methods!( unsafe impl NSDistributedLock { #[method_id(lockWithPath:)] pub unsafe fn lockWithPath(path: &NSString) -> Option>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithPath:)] pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; + #[method(tryLock)] pub unsafe fn tryLock(&self) -> bool; + #[method(unlock)] pub unsafe fn unlock(&self); + #[method(breakLock)] pub unsafe fn breakLock(&self); + #[method_id(lockDate)] pub unsafe fn lockDate(&self) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 157985a1c..625f67dbe 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -1,23 +1,31 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSDistributedNotificationCenterType = NSString; + extern_class!( #[derive(Debug)] pub struct NSDistributedNotificationCenter; + unsafe impl ClassType for NSDistributedNotificationCenter { type Super = NSNotificationCenter; } ); + extern_methods!( unsafe impl NSDistributedNotificationCenter { #[method_id(notificationCenterForType:)] pub unsafe fn notificationCenterForType( notificationCenterType: &NSDistributedNotificationCenterType, ) -> Id; + #[method_id(defaultCenter)] pub unsafe fn defaultCenter() -> Id; + #[method(addObserver:selector:name:object:suspensionBehavior:)] pub unsafe fn addObserver_selector_name_object_suspensionBehavior( &self, @@ -27,6 +35,7 @@ extern_methods!( object: Option<&NSString>, suspensionBehavior: NSNotificationSuspensionBehavior, ); + #[method(postNotificationName:object:userInfo:deliverImmediately:)] pub unsafe fn postNotificationName_object_userInfo_deliverImmediately( &self, @@ -35,6 +44,7 @@ extern_methods!( userInfo: Option<&NSDictionary>, deliverImmediately: bool, ); + #[method(postNotificationName:object:userInfo:options:)] pub unsafe fn postNotificationName_object_userInfo_options( &self, @@ -43,10 +53,13 @@ extern_methods!( userInfo: Option<&NSDictionary>, options: NSDistributedNotificationOptions, ); + #[method(suspended)] pub unsafe fn suspended(&self) -> bool; + #[method(setSuspended:)] pub unsafe fn setSuspended(&self, suspended: bool); + #[method(addObserver:selector:name:object:)] pub unsafe fn addObserver_selector_name_object( &self, @@ -55,12 +68,14 @@ extern_methods!( aName: Option<&NSNotificationName>, anObject: Option<&NSString>, ); + #[method(postNotificationName:object:)] pub unsafe fn postNotificationName_object( &self, aName: &NSNotificationName, anObject: Option<&NSString>, ); + #[method(postNotificationName:object:userInfo:)] pub unsafe fn postNotificationName_object_userInfo( &self, @@ -68,6 +83,7 @@ extern_methods!( anObject: Option<&NSString>, aUserInfo: Option<&NSDictionary>, ); + #[method(removeObserver:name:object:)] pub unsafe fn removeObserver_name_object( &self, diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 058645a4d..09f64c88d 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -1,48 +1,63 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSEnergyFormatter; + unsafe impl ClassType for NSEnergyFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSEnergyFormatter { #[method_id(numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; + #[method(setNumberFormatter:)] pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); + #[method(unitStyle)] pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; + #[method(setUnitStyle:)] pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); + #[method(isForFoodEnergyUse)] pub unsafe fn isForFoodEnergyUse(&self) -> bool; + #[method(setForFoodEnergyUse:)] pub unsafe fn setForFoodEnergyUse(&self, forFoodEnergyUse: bool); + #[method_id(stringFromValue:unit:)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSEnergyFormatterUnit, ) -> Id; + #[method_id(stringFromJoules:)] pub unsafe fn stringFromJoules(&self, numberInJoules: c_double) -> Id; + #[method_id(unitStringFromValue:unit:)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSEnergyFormatterUnit, ) -> Id; + #[method_id(unitStringFromJoules:usedUnit:)] pub unsafe fn unitStringFromJoules_usedUnit( &self, numberInJoules: c_double, unitp: *mut NSEnergyFormatterUnit, ) -> Id; + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 6472b06a3..9a8318f13 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -1,23 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSFastEnumeration = NSObject; + __inner_extern_class!( #[derive(Debug)] pub struct NSEnumerator; + unsafe impl ClassType for NSEnumerator { type Super = NSObject; } ); + extern_methods!( unsafe impl NSEnumerator { #[method_id(nextObject)] pub unsafe fn nextObject(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSExtendedEnumerator"] + /// NSExtendedEnumerator unsafe impl NSEnumerator { #[method_id(allObjects)] pub unsafe fn allObjects(&self) -> Id, Shared>; diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index c255ebd8f..2d54bb686 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -1,16 +1,23 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSErrorDomain = NSString; + pub type NSErrorUserInfoKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSError; + unsafe impl ClassType for NSError { type Super = NSObject; } ); + extern_methods!( unsafe impl NSError { #[method_id(initWithDomain:code:userInfo:)] @@ -20,43 +27,57 @@ extern_methods!( code: NSInteger, dict: Option<&NSDictionary>, ) -> Id; + #[method_id(errorWithDomain:code:userInfo:)] pub unsafe fn errorWithDomain_code_userInfo( domain: &NSErrorDomain, code: NSInteger, dict: Option<&NSDictionary>, ) -> Id; + #[method_id(domain)] pub unsafe fn domain(&self) -> Id; + #[method(code)] pub unsafe fn code(&self) -> NSInteger; + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Id, Shared>; + #[method_id(localizedDescription)] pub unsafe fn localizedDescription(&self) -> Id; + #[method_id(localizedFailureReason)] pub unsafe fn localizedFailureReason(&self) -> Option>; + #[method_id(localizedRecoverySuggestion)] pub unsafe fn localizedRecoverySuggestion(&self) -> Option>; + #[method_id(localizedRecoveryOptions)] pub unsafe fn localizedRecoveryOptions(&self) -> Option, Shared>>; + #[method_id(recoveryAttempter)] pub unsafe fn recoveryAttempter(&self) -> Option>; + #[method_id(helpAnchor)] pub unsafe fn helpAnchor(&self) -> Option>; + #[method_id(underlyingErrors)] pub unsafe fn underlyingErrors(&self) -> Id, Shared>; + #[method(setUserInfoValueProviderForDomain:provider:)] pub unsafe fn setUserInfoValueProviderForDomain_provider( errorDomain: &NSErrorDomain, provider: TodoBlock, ); + #[method(userInfoValueProviderForDomain:)] pub unsafe fn userInfoValueProviderForDomain(errorDomain: &NSErrorDomain) -> TodoBlock; } ); + extern_methods!( - #[doc = "NSErrorRecoveryAttempting"] + /// NSErrorRecoveryAttempting unsafe impl NSObject { #[method(attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:)] pub unsafe fn attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo( @@ -67,6 +88,7 @@ extern_methods!( didRecoverSelector: Option, contextInfo: *mut c_void, ); + #[method(attemptRecoveryFromError:optionIndex:)] pub unsafe fn attemptRecoveryFromError_optionIndex( &self, diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 869bf5092..c1eeda957 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSException; + unsafe impl ClassType for NSException { type Super = NSObject; } ); + extern_methods!( unsafe impl NSException { #[method_id(exceptionWithName:reason:userInfo:)] @@ -17,6 +22,7 @@ extern_methods!( reason: Option<&NSString>, userInfo: Option<&NSDictionary>, ) -> Id; + #[method_id(initWithName:reason:userInfo:)] pub unsafe fn initWithName_reason_userInfo( &self, @@ -24,22 +30,29 @@ extern_methods!( aReason: Option<&NSString>, aUserInfo: Option<&NSDictionary>, ) -> Id; + #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method_id(reason)] pub unsafe fn reason(&self) -> Option>; + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; + #[method_id(callStackReturnAddresses)] pub unsafe fn callStackReturnAddresses(&self) -> Id, Shared>; + #[method_id(callStackSymbols)] pub unsafe fn callStackSymbols(&self) -> Id, Shared>; + #[method(raise)] pub unsafe fn raise(&self); } ); + extern_methods!( - #[doc = "NSExceptionRaisingConveniences"] + /// NSExceptionRaisingConveniences unsafe impl NSException { #[method(raise:format:arguments:)] pub unsafe fn raise_format_arguments( @@ -49,13 +62,16 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSAssertionHandler; + unsafe impl ClassType for NSAssertionHandler { type Super = NSObject; } ); + extern_methods!( unsafe impl NSAssertionHandler { #[method_id(currentHandler)] diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index f3976de85..8eef892a7 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSExpression; + unsafe impl ClassType for NSExpression { type Super = NSObject; } ); + extern_methods!( unsafe impl NSExpression { #[method_id(expressionWithFormat:argumentArray:)] @@ -16,106 +21,139 @@ extern_methods!( expressionFormat: &NSString, arguments: &NSArray, ) -> Id; + #[method_id(expressionWithFormat:arguments:)] pub unsafe fn expressionWithFormat_arguments( expressionFormat: &NSString, argList: va_list, ) -> Id; + #[method_id(expressionForConstantValue:)] pub unsafe fn expressionForConstantValue(obj: Option<&Object>) -> Id; + #[method_id(expressionForEvaluatedObject)] pub unsafe fn expressionForEvaluatedObject() -> Id; + #[method_id(expressionForVariable:)] pub unsafe fn expressionForVariable(string: &NSString) -> Id; + #[method_id(expressionForKeyPath:)] pub unsafe fn expressionForKeyPath(keyPath: &NSString) -> Id; + #[method_id(expressionForFunction:arguments:)] pub unsafe fn expressionForFunction_arguments( name: &NSString, parameters: &NSArray, ) -> Id; + #[method_id(expressionForAggregate:)] pub unsafe fn expressionForAggregate( subexpressions: &NSArray, ) -> Id; + #[method_id(expressionForUnionSet:with:)] pub unsafe fn expressionForUnionSet_with( left: &NSExpression, right: &NSExpression, ) -> Id; + #[method_id(expressionForIntersectSet:with:)] pub unsafe fn expressionForIntersectSet_with( left: &NSExpression, right: &NSExpression, ) -> Id; + #[method_id(expressionForMinusSet:with:)] pub unsafe fn expressionForMinusSet_with( left: &NSExpression, right: &NSExpression, ) -> Id; + #[method_id(expressionForSubquery:usingIteratorVariable:predicate:)] pub unsafe fn expressionForSubquery_usingIteratorVariable_predicate( expression: &NSExpression, variable: &NSString, predicate: &NSPredicate, ) -> Id; + #[method_id(expressionForFunction:selectorName:arguments:)] pub unsafe fn expressionForFunction_selectorName_arguments( target: &NSExpression, name: &NSString, parameters: Option<&NSArray>, ) -> Id; + #[method_id(expressionForAnyKey)] pub unsafe fn expressionForAnyKey() -> Id; + #[method_id(expressionForBlock:arguments:)] pub unsafe fn expressionForBlock_arguments( block: TodoBlock, arguments: Option<&NSArray>, ) -> Id; + #[method_id(expressionForConditional:trueExpression:falseExpression:)] pub unsafe fn expressionForConditional_trueExpression_falseExpression( predicate: &NSPredicate, trueExpression: &NSExpression, falseExpression: &NSExpression, ) -> Id; + #[method_id(initWithExpressionType:)] pub unsafe fn initWithExpressionType(&self, type_: NSExpressionType) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method(expressionType)] pub unsafe fn expressionType(&self) -> NSExpressionType; + #[method_id(constantValue)] pub unsafe fn constantValue(&self) -> Option>; + #[method_id(keyPath)] pub unsafe fn keyPath(&self) -> Id; + #[method_id(function)] pub unsafe fn function(&self) -> Id; + #[method_id(variable)] pub unsafe fn variable(&self) -> Id; + #[method_id(operand)] pub unsafe fn operand(&self) -> Id; + #[method_id(arguments)] pub unsafe fn arguments(&self) -> Option, Shared>>; + #[method_id(collection)] pub unsafe fn collection(&self) -> Id; + #[method_id(predicate)] pub unsafe fn predicate(&self) -> Id; + #[method_id(leftExpression)] pub unsafe fn leftExpression(&self) -> Id; + #[method_id(rightExpression)] pub unsafe fn rightExpression(&self) -> Id; + #[method_id(trueExpression)] pub unsafe fn trueExpression(&self) -> Id; + #[method_id(falseExpression)] pub unsafe fn falseExpression(&self) -> Id; + #[method(expressionBlock)] pub unsafe fn expressionBlock(&self) -> TodoBlock; + #[method_id(expressionValueWithObject:context:)] pub unsafe fn expressionValueWithObject_context( &self, object: Option<&Object>, context: Option<&NSMutableDictionary>, ) -> Option>; + #[method(allowEvaluation)] pub unsafe fn allowEvaluation(&self); } diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index c805bc7d0..5d7cf4d07 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -1,26 +1,34 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSExtensionContext; + unsafe impl ClassType for NSExtensionContext { type Super = NSObject; } ); + extern_methods!( unsafe impl NSExtensionContext { #[method_id(inputItems)] pub unsafe fn inputItems(&self) -> Id; + #[method(completeRequestReturningItems:completionHandler:)] pub unsafe fn completeRequestReturningItems_completionHandler( &self, items: Option<&NSArray>, completionHandler: TodoBlock, ); + #[method(cancelRequestWithError:)] pub unsafe fn cancelRequestWithError(&self, error: &NSError); + #[method(openURL:completionHandler:)] pub unsafe fn openURL_completionHandler(&self, URL: &NSURL, completionHandler: TodoBlock); } diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index ea611b1cd..b6e5f4665 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -1,33 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSExtensionItem; + unsafe impl ClassType for NSExtensionItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSExtensionItem { #[method_id(attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; + #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); + #[method_id(attributedContentText)] pub unsafe fn attributedContentText(&self) -> Option>; + #[method(setAttributedContentText:)] pub unsafe fn setAttributedContentText( &self, attributedContentText: Option<&NSAttributedString>, ); + #[method_id(attachments)] pub unsafe fn attachments(&self) -> Option, Shared>>; + #[method(setAttachments:)] pub unsafe fn setAttachments(&self, attachments: Option<&NSArray>); + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; + #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); } diff --git a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs index d819b90bb..81e62de5a 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs @@ -1,5 +1,8 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSExtensionRequestHandling = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 039b117d6..ec3d1678d 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFileAccessIntent; + unsafe impl ClassType for NSFileAccessIntent { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFileAccessIntent { #[method_id(readingIntentWithURL:options:)] @@ -16,39 +21,50 @@ extern_methods!( url: &NSURL, options: NSFileCoordinatorReadingOptions, ) -> Id; + #[method_id(writingIntentWithURL:options:)] pub unsafe fn writingIntentWithURL_options( url: &NSURL, options: NSFileCoordinatorWritingOptions, ) -> Id; + #[method_id(URL)] pub unsafe fn URL(&self) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSFileCoordinator; + unsafe impl ClassType for NSFileCoordinator { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFileCoordinator { #[method(addFilePresenter:)] pub unsafe fn addFilePresenter(filePresenter: &NSFilePresenter); + #[method(removeFilePresenter:)] pub unsafe fn removeFilePresenter(filePresenter: &NSFilePresenter); + #[method_id(filePresenters)] pub unsafe fn filePresenters() -> Id, Shared>; + #[method_id(initWithFilePresenter:)] pub unsafe fn initWithFilePresenter( &self, filePresenterOrNil: Option<&NSFilePresenter>, ) -> Id; + #[method_id(purposeIdentifier)] pub unsafe fn purposeIdentifier(&self) -> Id; + #[method(setPurposeIdentifier:)] pub unsafe fn setPurposeIdentifier(&self, purposeIdentifier: &NSString); + #[method(coordinateAccessWithIntents:queue:byAccessor:)] pub unsafe fn coordinateAccessWithIntents_queue_byAccessor( &self, @@ -56,6 +72,7 @@ extern_methods!( queue: &NSOperationQueue, accessor: TodoBlock, ); + #[method(coordinateReadingItemAtURL:options:error:byAccessor:)] pub unsafe fn coordinateReadingItemAtURL_options_error_byAccessor( &self, @@ -64,6 +81,7 @@ extern_methods!( outError: *mut *mut NSError, reader: TodoBlock, ); + #[method(coordinateWritingItemAtURL:options:error:byAccessor:)] pub unsafe fn coordinateWritingItemAtURL_options_error_byAccessor( &self, @@ -72,6 +90,7 @@ extern_methods!( outError: *mut *mut NSError, writer: TodoBlock, ); + #[method(coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:)] pub unsafe fn coordinateReadingItemAtURL_options_writingItemAtURL_options_error_byAccessor( &self, @@ -82,6 +101,7 @@ extern_methods!( outError: *mut *mut NSError, readerWriter: TodoBlock, ); + #[method(coordinateWritingItemAtURL:options:writingItemAtURL:options:error:byAccessor:)] pub unsafe fn coordinateWritingItemAtURL_options_writingItemAtURL_options_error_byAccessor( &self, @@ -92,6 +112,7 @@ extern_methods!( outError: *mut *mut NSError, writer: TodoBlock, ); + #[method(prepareForReadingItemsAtURLs:options:writingItemsAtURLs:options:error:byAccessor:)] pub unsafe fn prepareForReadingItemsAtURLs_options_writingItemsAtURLs_options_error_byAccessor( &self, @@ -102,16 +123,20 @@ extern_methods!( outError: *mut *mut NSError, batchAccessor: TodoBlock, ); + #[method(itemAtURL:willMoveToURL:)] pub unsafe fn itemAtURL_willMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL); + #[method(itemAtURL:didMoveToURL:)] pub unsafe fn itemAtURL_didMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL); + #[method(itemAtURL:didChangeUbiquityAttributes:)] pub unsafe fn itemAtURL_didChangeUbiquityAttributes( &self, url: &NSURL, attributes: &NSSet, ); + #[method(cancel)] pub unsafe fn cancel(&self); } diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 440225794..71fc51d42 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -1,179 +1,233 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFileHandle; + unsafe impl ClassType for NSFileHandle { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFileHandle { #[method_id(availableData)] pub unsafe fn availableData(&self) -> Id; + #[method_id(initWithFileDescriptor:closeOnDealloc:)] pub unsafe fn initWithFileDescriptor_closeOnDealloc( &self, fd: c_int, closeopt: bool, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(readDataToEndOfFileAndReturnError:)] pub unsafe fn readDataToEndOfFileAndReturnError( &self, ) -> Result, Id>; + #[method_id(readDataUpToLength:error:)] pub unsafe fn readDataUpToLength_error( &self, length: NSUInteger, ) -> Result, Id>; + #[method(writeData:error:)] pub unsafe fn writeData_error(&self, data: &NSData) -> Result<(), Id>; + #[method(getOffset:error:)] pub unsafe fn getOffset_error( &self, offsetInFile: NonNull, ) -> Result<(), Id>; + #[method(seekToEndReturningOffset:error:)] pub unsafe fn seekToEndReturningOffset_error( &self, offsetInFile: *mut c_ulonglong, ) -> Result<(), Id>; + #[method(seekToOffset:error:)] pub unsafe fn seekToOffset_error( &self, offset: c_ulonglong, ) -> Result<(), Id>; + #[method(truncateAtOffset:error:)] pub unsafe fn truncateAtOffset_error( &self, offset: c_ulonglong, ) -> Result<(), Id>; + #[method(synchronizeAndReturnError:)] pub unsafe fn synchronizeAndReturnError(&self) -> Result<(), Id>; + #[method(closeAndReturnError:)] pub unsafe fn closeAndReturnError(&self) -> Result<(), Id>; } ); + extern_methods!( - #[doc = "NSFileHandleCreation"] + /// NSFileHandleCreation unsafe impl NSFileHandle { #[method_id(fileHandleWithStandardInput)] pub unsafe fn fileHandleWithStandardInput() -> Id; + #[method_id(fileHandleWithStandardOutput)] pub unsafe fn fileHandleWithStandardOutput() -> Id; + #[method_id(fileHandleWithStandardError)] pub unsafe fn fileHandleWithStandardError() -> Id; + #[method_id(fileHandleWithNullDevice)] pub unsafe fn fileHandleWithNullDevice() -> Id; + #[method_id(fileHandleForReadingAtPath:)] pub unsafe fn fileHandleForReadingAtPath(path: &NSString) -> Option>; + #[method_id(fileHandleForWritingAtPath:)] pub unsafe fn fileHandleForWritingAtPath(path: &NSString) -> Option>; + #[method_id(fileHandleForUpdatingAtPath:)] pub unsafe fn fileHandleForUpdatingAtPath(path: &NSString) -> Option>; + #[method_id(fileHandleForReadingFromURL:error:)] pub unsafe fn fileHandleForReadingFromURL_error( url: &NSURL, ) -> Result, Id>; + #[method_id(fileHandleForWritingToURL:error:)] pub unsafe fn fileHandleForWritingToURL_error( url: &NSURL, ) -> Result, Id>; + #[method_id(fileHandleForUpdatingURL:error:)] pub unsafe fn fileHandleForUpdatingURL_error( url: &NSURL, ) -> Result, Id>; } ); + extern_methods!( - #[doc = "NSFileHandleAsynchronousAccess"] + /// NSFileHandleAsynchronousAccess unsafe impl NSFileHandle { #[method(readInBackgroundAndNotifyForModes:)] pub unsafe fn readInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, ); + #[method(readInBackgroundAndNotify)] pub unsafe fn readInBackgroundAndNotify(&self); + #[method(readToEndOfFileInBackgroundAndNotifyForModes:)] pub unsafe fn readToEndOfFileInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, ); + #[method(readToEndOfFileInBackgroundAndNotify)] pub unsafe fn readToEndOfFileInBackgroundAndNotify(&self); + #[method(acceptConnectionInBackgroundAndNotifyForModes:)] pub unsafe fn acceptConnectionInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, ); + #[method(acceptConnectionInBackgroundAndNotify)] pub unsafe fn acceptConnectionInBackgroundAndNotify(&self); + #[method(waitForDataInBackgroundAndNotifyForModes:)] pub unsafe fn waitForDataInBackgroundAndNotifyForModes( &self, modes: Option<&NSArray>, ); + #[method(waitForDataInBackgroundAndNotify)] pub unsafe fn waitForDataInBackgroundAndNotify(&self); + #[method(readabilityHandler)] pub unsafe fn readabilityHandler(&self) -> TodoBlock; + #[method(setReadabilityHandler:)] pub unsafe fn setReadabilityHandler(&self, readabilityHandler: TodoBlock); + #[method(writeabilityHandler)] pub unsafe fn writeabilityHandler(&self) -> TodoBlock; + #[method(setWriteabilityHandler:)] pub unsafe fn setWriteabilityHandler(&self, writeabilityHandler: TodoBlock); } ); + extern_methods!( - #[doc = "NSFileHandlePlatformSpecific"] + /// NSFileHandlePlatformSpecific unsafe impl NSFileHandle { #[method_id(initWithFileDescriptor:)] pub unsafe fn initWithFileDescriptor(&self, fd: c_int) -> Id; + #[method(fileDescriptor)] pub unsafe fn fileDescriptor(&self) -> c_int; } ); + extern_methods!( unsafe impl NSFileHandle { #[method_id(readDataToEndOfFile)] pub unsafe fn readDataToEndOfFile(&self) -> Id; + #[method_id(readDataOfLength:)] pub unsafe fn readDataOfLength(&self, length: NSUInteger) -> Id; + #[method(writeData:)] pub unsafe fn writeData(&self, data: &NSData); + #[method(offsetInFile)] pub unsafe fn offsetInFile(&self) -> c_ulonglong; + #[method(seekToEndOfFile)] pub unsafe fn seekToEndOfFile(&self) -> c_ulonglong; + #[method(seekToFileOffset:)] pub unsafe fn seekToFileOffset(&self, offset: c_ulonglong); + #[method(truncateFileAtOffset:)] pub unsafe fn truncateFileAtOffset(&self, offset: c_ulonglong); + #[method(synchronizeFile)] pub unsafe fn synchronizeFile(&self); + #[method(closeFile)] pub unsafe fn closeFile(&self); } ); + extern_class!( #[derive(Debug)] pub struct NSPipe; + unsafe impl ClassType for NSPipe { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPipe { #[method_id(fileHandleForReading)] pub unsafe fn fileHandleForReading(&self) -> Id; + #[method_id(fileHandleForWriting)] pub unsafe fn fileHandleForWriting(&self) -> Id; + #[method_id(pipe)] pub unsafe fn pipe() -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 1ff0cb8b2..42ea882cd 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSFileAttributeKey = NSString; + pub type NSFileAttributeType = NSString; + pub type NSFileProtectionType = NSString; + pub type NSFileProviderServiceName = NSString; + extern_class!( #[derive(Debug)] pub struct NSFileManager; + unsafe impl ClassType for NSFileManager { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFileManager { #[method_id(defaultManager)] pub unsafe fn defaultManager() -> Id; + #[method_id(mountedVolumeURLsIncludingResourceValuesForKeys:options:)] pub unsafe fn mountedVolumeURLsIncludingResourceValuesForKeys_options( &self, propertyKeys: Option<&NSArray>, options: NSVolumeEnumerationOptions, ) -> Option, Shared>>; + #[method(unmountVolumeAtURL:options:completionHandler:)] pub unsafe fn unmountVolumeAtURL_options_completionHandler( &self, @@ -30,6 +41,7 @@ extern_methods!( mask: NSFileManagerUnmountOptions, completionHandler: TodoBlock, ); + #[method_id(contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:)] pub unsafe fn contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error( &self, @@ -37,12 +49,14 @@ extern_methods!( keys: Option<&NSArray>, mask: NSDirectoryEnumerationOptions, ) -> Result, Shared>, Id>; + #[method_id(URLsForDirectory:inDomains:)] pub unsafe fn URLsForDirectory_inDomains( &self, directory: NSSearchPathDirectory, domainMask: NSSearchPathDomainMask, ) -> Id, Shared>; + #[method_id(URLForDirectory:inDomain:appropriateForURL:create:error:)] pub unsafe fn URLForDirectory_inDomain_appropriateForURL_create_error( &self, @@ -51,6 +65,7 @@ extern_methods!( url: Option<&NSURL>, shouldCreate: bool, ) -> Result, Id>; + #[method(getRelationship:ofDirectoryAtURL:toItemAtURL:error:)] pub unsafe fn getRelationship_ofDirectoryAtURL_toItemAtURL_error( &self, @@ -58,6 +73,7 @@ extern_methods!( directoryURL: &NSURL, otherURL: &NSURL, ) -> Result<(), Id>; + #[method(getRelationship:ofDirectory:inDomain:toItemAtURL:error:)] pub unsafe fn getRelationship_ofDirectory_inDomain_toItemAtURL_error( &self, @@ -66,6 +82,7 @@ extern_methods!( domainMask: NSSearchPathDomainMask, url: &NSURL, ) -> Result<(), Id>; + #[method(createDirectoryAtURL:withIntermediateDirectories:attributes:error:)] pub unsafe fn createDirectoryAtURL_withIntermediateDirectories_attributes_error( &self, @@ -73,22 +90,27 @@ extern_methods!( createIntermediates: bool, attributes: Option<&NSDictionary>, ) -> Result<(), Id>; + #[method(createSymbolicLinkAtURL:withDestinationURL:error:)] pub unsafe fn createSymbolicLinkAtURL_withDestinationURL_error( &self, url: &NSURL, destURL: &NSURL, ) -> Result<(), Id>; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSFileManagerDelegate>); + #[method(setAttributes:ofItemAtPath:error:)] pub unsafe fn setAttributes_ofItemAtPath_error( &self, attributes: &NSDictionary, path: &NSString, ) -> Result<(), Id>; + #[method(createDirectoryAtPath:withIntermediateDirectories:attributes:error:)] pub unsafe fn createDirectoryAtPath_withIntermediateDirectories_attributes_error( &self, @@ -96,125 +118,148 @@ extern_methods!( createIntermediates: bool, attributes: Option<&NSDictionary>, ) -> Result<(), Id>; + #[method_id(contentsOfDirectoryAtPath:error:)] pub unsafe fn contentsOfDirectoryAtPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; + #[method_id(subpathsOfDirectoryAtPath:error:)] pub unsafe fn subpathsOfDirectoryAtPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; + #[method_id(attributesOfItemAtPath:error:)] pub unsafe fn attributesOfItemAtPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; + #[method_id(attributesOfFileSystemForPath:error:)] pub unsafe fn attributesOfFileSystemForPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; + #[method(createSymbolicLinkAtPath:withDestinationPath:error:)] pub unsafe fn createSymbolicLinkAtPath_withDestinationPath_error( &self, path: &NSString, destPath: &NSString, ) -> Result<(), Id>; + #[method_id(destinationOfSymbolicLinkAtPath:error:)] pub unsafe fn destinationOfSymbolicLinkAtPath_error( &self, path: &NSString, ) -> Result, Id>; + #[method(copyItemAtPath:toPath:error:)] pub unsafe fn copyItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, ) -> Result<(), Id>; + #[method(moveItemAtPath:toPath:error:)] pub unsafe fn moveItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, ) -> Result<(), Id>; + #[method(linkItemAtPath:toPath:error:)] pub unsafe fn linkItemAtPath_toPath_error( &self, srcPath: &NSString, dstPath: &NSString, ) -> Result<(), Id>; + #[method(removeItemAtPath:error:)] pub unsafe fn removeItemAtPath_error( &self, path: &NSString, ) -> Result<(), Id>; + #[method(copyItemAtURL:toURL:error:)] pub unsafe fn copyItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, ) -> Result<(), Id>; + #[method(moveItemAtURL:toURL:error:)] pub unsafe fn moveItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, ) -> Result<(), Id>; + #[method(linkItemAtURL:toURL:error:)] pub unsafe fn linkItemAtURL_toURL_error( &self, srcURL: &NSURL, dstURL: &NSURL, ) -> Result<(), Id>; + #[method(removeItemAtURL:error:)] pub unsafe fn removeItemAtURL_error(&self, URL: &NSURL) -> Result<(), Id>; + #[method(trashItemAtURL:resultingItemURL:error:)] pub unsafe fn trashItemAtURL_resultingItemURL_error( &self, url: &NSURL, outResultingURL: Option<&mut Option>>, ) -> Result<(), Id>; + #[method_id(fileAttributesAtPath:traverseLink:)] pub unsafe fn fileAttributesAtPath_traverseLink( &self, path: &NSString, yorn: bool, ) -> Option>; + #[method(changeFileAttributes:atPath:)] pub unsafe fn changeFileAttributes_atPath( &self, attributes: &NSDictionary, path: &NSString, ) -> bool; + #[method_id(directoryContentsAtPath:)] pub unsafe fn directoryContentsAtPath( &self, path: &NSString, ) -> Option>; + #[method_id(fileSystemAttributesAtPath:)] pub unsafe fn fileSystemAttributesAtPath( &self, path: &NSString, ) -> Option>; + #[method_id(pathContentOfSymbolicLinkAtPath:)] pub unsafe fn pathContentOfSymbolicLinkAtPath( &self, path: &NSString, ) -> Option>; + #[method(createSymbolicLinkAtPath:pathContent:)] pub unsafe fn createSymbolicLinkAtPath_pathContent( &self, path: &NSString, otherpath: &NSString, ) -> bool; + #[method(createDirectoryAtPath:attributes:)] pub unsafe fn createDirectoryAtPath_attributes( &self, path: &NSString, attributes: &NSDictionary, ) -> bool; + #[method(linkPath:toPath:handler:)] pub unsafe fn linkPath_toPath_handler( &self, @@ -222,6 +267,7 @@ extern_methods!( dest: &NSString, handler: Option<&Object>, ) -> bool; + #[method(copyPath:toPath:handler:)] pub unsafe fn copyPath_toPath_handler( &self, @@ -229,6 +275,7 @@ extern_methods!( dest: &NSString, handler: Option<&Object>, ) -> bool; + #[method(movePath:toPath:handler:)] pub unsafe fn movePath_toPath_handler( &self, @@ -236,50 +283,64 @@ extern_methods!( dest: &NSString, handler: Option<&Object>, ) -> bool; + #[method(removeFileAtPath:handler:)] pub unsafe fn removeFileAtPath_handler( &self, path: &NSString, handler: Option<&Object>, ) -> bool; + #[method_id(currentDirectoryPath)] pub unsafe fn currentDirectoryPath(&self) -> Id; + #[method(changeCurrentDirectoryPath:)] pub unsafe fn changeCurrentDirectoryPath(&self, path: &NSString) -> bool; + #[method(fileExistsAtPath:)] pub unsafe fn fileExistsAtPath(&self, path: &NSString) -> bool; + #[method(fileExistsAtPath:isDirectory:)] pub unsafe fn fileExistsAtPath_isDirectory( &self, path: &NSString, isDirectory: *mut bool, ) -> bool; + #[method(isReadableFileAtPath:)] pub unsafe fn isReadableFileAtPath(&self, path: &NSString) -> bool; + #[method(isWritableFileAtPath:)] pub unsafe fn isWritableFileAtPath(&self, path: &NSString) -> bool; + #[method(isExecutableFileAtPath:)] pub unsafe fn isExecutableFileAtPath(&self, path: &NSString) -> bool; + #[method(isDeletableFileAtPath:)] pub unsafe fn isDeletableFileAtPath(&self, path: &NSString) -> bool; + #[method(contentsEqualAtPath:andPath:)] pub unsafe fn contentsEqualAtPath_andPath( &self, path1: &NSString, path2: &NSString, ) -> bool; + #[method_id(displayNameAtPath:)] pub unsafe fn displayNameAtPath(&self, path: &NSString) -> Id; + #[method_id(componentsToDisplayForPath:)] pub unsafe fn componentsToDisplayForPath( &self, path: &NSString, ) -> Option, Shared>>; + #[method_id(enumeratorAtPath:)] pub unsafe fn enumeratorAtPath( &self, path: &NSString, ) -> Option, Shared>>; + #[method_id(enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:)] pub unsafe fn enumeratorAtURL_includingPropertiesForKeys_options_errorHandler( &self, @@ -288,13 +349,16 @@ extern_methods!( mask: NSDirectoryEnumerationOptions, handler: TodoBlock, ) -> Option, Shared>>; + #[method_id(subpathsAtPath:)] pub unsafe fn subpathsAtPath( &self, path: &NSString, ) -> Option, Shared>>; + #[method_id(contentsAtPath:)] pub unsafe fn contentsAtPath(&self, path: &NSString) -> Option>; + #[method(createFileAtPath:contents:attributes:)] pub unsafe fn createFileAtPath_contents_attributes( &self, @@ -302,14 +366,17 @@ extern_methods!( data: Option<&NSData>, attr: Option<&NSDictionary>, ) -> bool; + #[method(fileSystemRepresentationWithPath:)] pub unsafe fn fileSystemRepresentationWithPath(&self, path: &NSString) -> NonNull; + #[method_id(stringWithFileSystemRepresentation:length:)] pub unsafe fn stringWithFileSystemRepresentation_length( &self, str: NonNull, len: NSUInteger, ) -> Id; + #[method(replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:)] pub unsafe fn replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error( &self, @@ -319,6 +386,7 @@ extern_methods!( options: NSFileManagerItemReplacementOptions, resultingURL: Option<&mut Option>>, ) -> Result<(), Id>; + #[method(setUbiquitous:itemAtURL:destinationURL:error:)] pub unsafe fn setUbiquitous_itemAtURL_destinationURL_error( &self, @@ -326,37 +394,45 @@ extern_methods!( url: &NSURL, destinationURL: &NSURL, ) -> Result<(), Id>; + #[method(isUbiquitousItemAtURL:)] pub unsafe fn isUbiquitousItemAtURL(&self, url: &NSURL) -> bool; + #[method(startDownloadingUbiquitousItemAtURL:error:)] pub unsafe fn startDownloadingUbiquitousItemAtURL_error( &self, url: &NSURL, ) -> Result<(), Id>; + #[method(evictUbiquitousItemAtURL:error:)] pub unsafe fn evictUbiquitousItemAtURL_error( &self, url: &NSURL, ) -> Result<(), Id>; + #[method_id(URLForUbiquityContainerIdentifier:)] pub unsafe fn URLForUbiquityContainerIdentifier( &self, containerIdentifier: Option<&NSString>, ) -> Option>; + #[method_id(URLForPublishingUbiquitousItemAtURL:expirationDate:error:)] pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( &self, url: &NSURL, outDate: Option<&mut Option>>, ) -> Result, Id>; + #[method_id(ubiquityIdentityToken)] pub unsafe fn ubiquityIdentityToken(&self) -> Option>; + #[method(getFileProviderServicesForItemAtURL:completionHandler:)] pub unsafe fn getFileProviderServicesForItemAtURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, ); + #[method_id(containerURLForSecurityApplicationGroupIdentifier:)] pub unsafe fn containerURLForSecurityApplicationGroupIdentifier( &self, @@ -364,20 +440,24 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSUserInformation"] + /// NSUserInformation unsafe impl NSFileManager { #[method_id(homeDirectoryForCurrentUser)] pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id; + #[method_id(temporaryDirectory)] pub unsafe fn temporaryDirectory(&self) -> Id; + #[method_id(homeDirectoryForUser:)] pub unsafe fn homeDirectoryForUser(&self, userName: &NSString) -> Option>; } ); + extern_methods!( - #[doc = "NSCopyLinkMoveHandler"] + /// NSCopyLinkMoveHandler unsafe impl NSObject { #[method(fileManager:shouldProceedAfterError:)] pub unsafe fn fileManager_shouldProceedAfterError( @@ -385,45 +465,58 @@ extern_methods!( fm: &NSFileManager, errorInfo: &NSDictionary, ) -> bool; + #[method(fileManager:willProcessPath:)] pub unsafe fn fileManager_willProcessPath(&self, fm: &NSFileManager, path: &NSString); } ); + pub type NSFileManagerDelegate = NSObject; + __inner_extern_class!( #[derive(Debug)] pub struct NSDirectoryEnumerator; + unsafe impl ClassType for NSDirectoryEnumerator { type Super = NSEnumerator; } ); + extern_methods!( unsafe impl NSDirectoryEnumerator { #[method_id(fileAttributes)] pub unsafe fn fileAttributes( &self, ) -> Option, Shared>>; + #[method_id(directoryAttributes)] pub unsafe fn directoryAttributes( &self, ) -> Option, Shared>>; + #[method(isEnumeratingDirectoryPostOrder)] pub unsafe fn isEnumeratingDirectoryPostOrder(&self) -> bool; + #[method(skipDescendents)] pub unsafe fn skipDescendents(&self); + #[method(level)] pub unsafe fn level(&self) -> NSUInteger; + #[method(skipDescendants)] pub unsafe fn skipDescendants(&self); } ); + extern_class!( #[derive(Debug)] pub struct NSFileProviderService; + unsafe impl ClassType for NSFileProviderService { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFileProviderService { #[method(getFileProviderConnectionWithCompletionHandler:)] @@ -431,43 +524,60 @@ extern_methods!( &self, completionHandler: TodoBlock, ); + #[method_id(name)] pub unsafe fn name(&self) -> Id; } ); + extern_methods!( - #[doc = "NSFileAttributes"] + /// NSFileAttributes unsafe impl NSDictionary { #[method(fileSize)] pub unsafe fn fileSize(&self) -> c_ulonglong; + #[method_id(fileModificationDate)] pub unsafe fn fileModificationDate(&self) -> Option>; + #[method_id(fileType)] pub unsafe fn fileType(&self) -> Option>; + #[method(filePosixPermissions)] pub unsafe fn filePosixPermissions(&self) -> NSUInteger; + #[method_id(fileOwnerAccountName)] pub unsafe fn fileOwnerAccountName(&self) -> Option>; + #[method_id(fileGroupOwnerAccountName)] pub unsafe fn fileGroupOwnerAccountName(&self) -> Option>; + #[method(fileSystemNumber)] pub unsafe fn fileSystemNumber(&self) -> NSInteger; + #[method(fileSystemFileNumber)] pub unsafe fn fileSystemFileNumber(&self) -> NSUInteger; + #[method(fileExtensionHidden)] pub unsafe fn fileExtensionHidden(&self) -> bool; + #[method(fileHFSCreatorCode)] pub unsafe fn fileHFSCreatorCode(&self) -> OSType; + #[method(fileHFSTypeCode)] pub unsafe fn fileHFSTypeCode(&self) -> OSType; + #[method(fileIsImmutable)] pub unsafe fn fileIsImmutable(&self) -> bool; + #[method(fileIsAppendOnly)] pub unsafe fn fileIsAppendOnly(&self) -> bool; + #[method_id(fileCreationDate)] pub unsafe fn fileCreationDate(&self) -> Option>; + #[method_id(fileOwnerAccountID)] pub unsafe fn fileOwnerAccountID(&self) -> Option>; + #[method_id(fileGroupOwnerAccountID)] pub unsafe fn fileGroupOwnerAccountID(&self) -> Option>; } diff --git a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs index 1e9a07179..173b3c70a 100644 --- a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs +++ b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs @@ -1,5 +1,8 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSFilePresenter = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index d5d2a0600..9d6c86bc7 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -1,81 +1,108 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFileVersion; + unsafe impl ClassType for NSFileVersion { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFileVersion { #[method_id(currentVersionOfItemAtURL:)] pub unsafe fn currentVersionOfItemAtURL(url: &NSURL) -> Option>; + #[method_id(otherVersionsOfItemAtURL:)] pub unsafe fn otherVersionsOfItemAtURL( url: &NSURL, ) -> Option, Shared>>; + #[method_id(unresolvedConflictVersionsOfItemAtURL:)] pub unsafe fn unresolvedConflictVersionsOfItemAtURL( url: &NSURL, ) -> Option, Shared>>; + #[method(getNonlocalVersionsOfItemAtURL:completionHandler:)] pub unsafe fn getNonlocalVersionsOfItemAtURL_completionHandler( url: &NSURL, completionHandler: TodoBlock, ); + #[method_id(versionOfItemAtURL:forPersistentIdentifier:)] pub unsafe fn versionOfItemAtURL_forPersistentIdentifier( url: &NSURL, persistentIdentifier: &Object, ) -> Option>; + #[method_id(addVersionOfItemAtURL:withContentsOfURL:options:error:)] pub unsafe fn addVersionOfItemAtURL_withContentsOfURL_options_error( url: &NSURL, contentsURL: &NSURL, options: NSFileVersionAddingOptions, ) -> Result, Id>; + #[method_id(temporaryDirectoryURLForNewVersionOfItemAtURL:)] pub unsafe fn temporaryDirectoryURLForNewVersionOfItemAtURL( url: &NSURL, ) -> Id; + #[method_id(URL)] pub unsafe fn URL(&self) -> Id; + #[method_id(localizedName)] pub unsafe fn localizedName(&self) -> Option>; + #[method_id(localizedNameOfSavingComputer)] pub unsafe fn localizedNameOfSavingComputer(&self) -> Option>; + #[method_id(originatorNameComponents)] pub unsafe fn originatorNameComponents(&self) -> Option>; + #[method_id(modificationDate)] pub unsafe fn modificationDate(&self) -> Option>; + #[method_id(persistentIdentifier)] pub unsafe fn persistentIdentifier(&self) -> Id; + #[method(isConflict)] pub unsafe fn isConflict(&self) -> bool; + #[method(isResolved)] pub unsafe fn isResolved(&self) -> bool; + #[method(setResolved:)] pub unsafe fn setResolved(&self, resolved: bool); + #[method(isDiscardable)] pub unsafe fn isDiscardable(&self) -> bool; + #[method(setDiscardable:)] pub unsafe fn setDiscardable(&self, discardable: bool); + #[method(hasLocalContents)] pub unsafe fn hasLocalContents(&self) -> bool; + #[method(hasThumbnail)] pub unsafe fn hasThumbnail(&self) -> bool; + #[method_id(replaceItemAtURL:options:error:)] pub unsafe fn replaceItemAtURL_options_error( &self, url: &NSURL, options: NSFileVersionReplacingOptions, ) -> Result, Id>; + #[method(removeAndReturnError:)] pub unsafe fn removeAndReturnError(&self) -> Result<(), Id>; + #[method(removeOtherVersionsOfItemAtURL:error:)] pub unsafe fn removeOtherVersionsOfItemAtURL_error( url: &NSURL, diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index f7a355cfb..90181cc51 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFileWrapper; + unsafe impl ClassType for NSFileWrapper { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFileWrapper { #[method_id(initWithURL:options:error:)] @@ -17,48 +22,65 @@ extern_methods!( url: &NSURL, options: NSFileWrapperReadingOptions, ) -> Result, Id>; + #[method_id(initDirectoryWithFileWrappers:)] pub unsafe fn initDirectoryWithFileWrappers( &self, childrenByPreferredName: &NSDictionary, ) -> Id; + #[method_id(initRegularFileWithContents:)] pub unsafe fn initRegularFileWithContents(&self, contents: &NSData) -> Id; + #[method_id(initSymbolicLinkWithDestinationURL:)] pub unsafe fn initSymbolicLinkWithDestinationURL(&self, url: &NSURL) -> Id; + #[method_id(initWithSerializedRepresentation:)] pub unsafe fn initWithSerializedRepresentation( &self, serializeRepresentation: &NSData, ) -> Option>; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method(isDirectory)] pub unsafe fn isDirectory(&self) -> bool; + #[method(isRegularFile)] pub unsafe fn isRegularFile(&self) -> bool; + #[method(isSymbolicLink)] pub unsafe fn isSymbolicLink(&self) -> bool; + #[method_id(preferredFilename)] pub unsafe fn preferredFilename(&self) -> Option>; + #[method(setPreferredFilename:)] pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>); + #[method_id(filename)] pub unsafe fn filename(&self) -> Option>; + #[method(setFilename:)] pub unsafe fn setFilename(&self, filename: Option<&NSString>); + #[method_id(fileAttributes)] pub unsafe fn fileAttributes(&self) -> Id, Shared>; + #[method(setFileAttributes:)] pub unsafe fn setFileAttributes(&self, fileAttributes: &NSDictionary); + #[method(matchesContentsOfURL:)] pub unsafe fn matchesContentsOfURL(&self, url: &NSURL) -> bool; + #[method(readFromURL:options:error:)] pub unsafe fn readFromURL_options_error( &self, url: &NSURL, options: NSFileWrapperReadingOptions, ) -> Result<(), Id>; + #[method(writeToURL:options:originalContentsURL:error:)] pub unsafe fn writeToURL_options_originalContentsURL_error( &self, @@ -66,45 +88,58 @@ extern_methods!( options: NSFileWrapperWritingOptions, originalContentsURL: Option<&NSURL>, ) -> Result<(), Id>; + #[method_id(serializedRepresentation)] pub unsafe fn serializedRepresentation(&self) -> Option>; + #[method_id(addFileWrapper:)] pub unsafe fn addFileWrapper(&self, child: &NSFileWrapper) -> Id; + #[method_id(addRegularFileWithContents:preferredFilename:)] pub unsafe fn addRegularFileWithContents_preferredFilename( &self, data: &NSData, fileName: &NSString, ) -> Id; + #[method(removeFileWrapper:)] pub unsafe fn removeFileWrapper(&self, child: &NSFileWrapper); + #[method_id(fileWrappers)] pub unsafe fn fileWrappers( &self, ) -> Option, Shared>>; + #[method_id(keyForFileWrapper:)] pub unsafe fn keyForFileWrapper( &self, child: &NSFileWrapper, ) -> Option>; + #[method_id(regularFileContents)] pub unsafe fn regularFileContents(&self) -> Option>; + #[method_id(symbolicLinkDestinationURL)] pub unsafe fn symbolicLinkDestinationURL(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSFileWrapper { #[method_id(initWithPath:)] pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; + #[method_id(initSymbolicLinkWithDestination:)] pub unsafe fn initSymbolicLinkWithDestination(&self, path: &NSString) -> Id; + #[method(needsToBeUpdatedFromPath:)] pub unsafe fn needsToBeUpdatedFromPath(&self, path: &NSString) -> bool; + #[method(updateFromPath:)] pub unsafe fn updateFromPath(&self, path: &NSString) -> bool; + #[method(writeToFile:atomically:updateFilenames:)] pub unsafe fn writeToFile_atomically_updateFilenames( &self, @@ -112,14 +147,17 @@ extern_methods!( atomicFlag: bool, updateFilenamesFlag: bool, ) -> bool; + #[method_id(addFileWithPath:)] pub unsafe fn addFileWithPath(&self, path: &NSString) -> Id; + #[method_id(addSymbolicLinkWithDestination:preferredFilename:)] pub unsafe fn addSymbolicLinkWithDestination_preferredFilename( &self, path: &NSString, filename: &NSString, ) -> Id; + #[method_id(symbolicLinkDestination)] pub unsafe fn symbolicLinkDestination(&self) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index 5c76bcdec..8f34b9d6e 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSFormatter; + unsafe impl ClassType for NSFormatter { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFormatter { #[method_id(stringForObjectValue:)] @@ -16,17 +21,20 @@ extern_methods!( &self, obj: Option<&Object>, ) -> Option>; + #[method_id(attributedStringForObjectValue:withDefaultAttributes:)] pub unsafe fn attributedStringForObjectValue_withDefaultAttributes( &self, obj: &Object, attrs: Option<&NSDictionary>, ) -> Option>; + #[method_id(editingStringForObjectValue:)] pub unsafe fn editingStringForObjectValue( &self, obj: &Object, ) -> Option>; + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, @@ -34,6 +42,7 @@ extern_methods!( string: &NSString, error: Option<&mut Option>>, ) -> bool; + #[method(isPartialStringValid:newEditingString:errorDescription:)] pub unsafe fn isPartialStringValid_newEditingString_errorDescription( &self, @@ -41,6 +50,7 @@ extern_methods!( newString: Option<&mut Option>>, error: Option<&mut Option>>, ) -> bool; + #[method(isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:)] pub unsafe fn isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription( &self, diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs index 9ddf47c63..be712e173 100644 --- a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -1,34 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSGarbageCollector; + unsafe impl ClassType for NSGarbageCollector { type Super = NSObject; } ); + extern_methods!( unsafe impl NSGarbageCollector { #[method_id(defaultCollector)] pub unsafe fn defaultCollector() -> Id; + #[method(isCollecting)] pub unsafe fn isCollecting(&self) -> bool; + #[method(disable)] pub unsafe fn disable(&self); + #[method(enable)] pub unsafe fn enable(&self); + #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; + #[method(collectIfNeeded)] pub unsafe fn collectIfNeeded(&self); + #[method(collectExhaustively)] pub unsafe fn collectExhaustively(&self); + #[method(disableCollectorForPointer:)] pub unsafe fn disableCollectorForPointer(&self, ptr: NonNull); + #[method(enableCollectorForPointer:)] pub unsafe fn enableCollectorForPointer(&self, ptr: NonNull); + #[method(zone)] pub unsafe fn zone(&self) -> NonNull; } diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 93de098ab..12f1cf57d 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -1,61 +1,86 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSPoint = CGPoint; + pub type NSSize = CGSize; + pub type NSRect = CGRect; + extern_methods!( - #[doc = "NSValueGeometryExtensions"] + /// NSValueGeometryExtensions unsafe impl NSValue { #[method_id(valueWithPoint:)] pub unsafe fn valueWithPoint(point: NSPoint) -> Id; + #[method_id(valueWithSize:)] pub unsafe fn valueWithSize(size: NSSize) -> Id; + #[method_id(valueWithRect:)] pub unsafe fn valueWithRect(rect: NSRect) -> Id; + #[method_id(valueWithEdgeInsets:)] pub unsafe fn valueWithEdgeInsets(insets: NSEdgeInsets) -> Id; + #[method(pointValue)] pub unsafe fn pointValue(&self) -> NSPoint; + #[method(sizeValue)] pub unsafe fn sizeValue(&self) -> NSSize; + #[method(rectValue)] pub unsafe fn rectValue(&self) -> NSRect; + #[method(edgeInsetsValue)] pub unsafe fn edgeInsetsValue(&self) -> NSEdgeInsets; } ); + extern_methods!( - #[doc = "NSGeometryCoding"] + /// NSGeometryCoding unsafe impl NSCoder { #[method(encodePoint:)] pub unsafe fn encodePoint(&self, point: NSPoint); + #[method(decodePoint)] pub unsafe fn decodePoint(&self) -> NSPoint; + #[method(encodeSize:)] pub unsafe fn encodeSize(&self, size: NSSize); + #[method(decodeSize)] pub unsafe fn decodeSize(&self) -> NSSize; + #[method(encodeRect:)] pub unsafe fn encodeRect(&self, rect: NSRect); + #[method(decodeRect)] pub unsafe fn decodeRect(&self) -> NSRect; } ); + extern_methods!( - #[doc = "NSGeometryKeyedCoding"] + /// NSGeometryKeyedCoding unsafe impl NSCoder { #[method(encodePoint:forKey:)] pub unsafe fn encodePoint_forKey(&self, point: NSPoint, key: &NSString); + #[method(encodeSize:forKey:)] pub unsafe fn encodeSize_forKey(&self, size: NSSize, key: &NSString); + #[method(encodeRect:forKey:)] pub unsafe fn encodeRect_forKey(&self, rect: NSRect, key: &NSString); + #[method(decodePointForKey:)] pub unsafe fn decodePointForKey(&self, key: &NSString) -> NSPoint; + #[method(decodeSizeForKey:)] pub unsafe fn decodeSizeForKey(&self, key: &NSString) -> NSSize; + #[method(decodeRectForKey:)] pub unsafe fn decodeRectForKey(&self, key: &NSString) -> NSRect; } diff --git a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs +++ b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index 2fb2dd29d..df6618c5e 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -1,16 +1,23 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSHTTPCookiePropertyKey = NSString; + pub type NSHTTPCookieStringPolicy = NSString; + extern_class!( #[derive(Debug)] pub struct NSHTTPCookie; + unsafe impl ClassType for NSHTTPCookie { type Super = NSObject; } ); + extern_methods!( unsafe impl NSHTTPCookie { #[method_id(initWithProperties:)] @@ -18,47 +25,64 @@ extern_methods!( &self, properties: &NSDictionary, ) -> Option>; + #[method_id(cookieWithProperties:)] pub unsafe fn cookieWithProperties( properties: &NSDictionary, ) -> Option>; + #[method_id(requestHeaderFieldsWithCookies:)] pub unsafe fn requestHeaderFieldsWithCookies( cookies: &NSArray, ) -> Id, Shared>; + #[method_id(cookiesWithResponseHeaderFields:forURL:)] pub unsafe fn cookiesWithResponseHeaderFields_forURL( headerFields: &NSDictionary, URL: &NSURL, ) -> Id, Shared>; + #[method_id(properties)] pub unsafe fn properties( &self, ) -> Option, Shared>>; + #[method(version)] pub unsafe fn version(&self) -> NSUInteger; + #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method_id(value)] pub unsafe fn value(&self) -> Id; + #[method_id(expiresDate)] pub unsafe fn expiresDate(&self) -> Option>; + #[method(isSessionOnly)] pub unsafe fn isSessionOnly(&self) -> bool; + #[method_id(domain)] pub unsafe fn domain(&self) -> Id; + #[method_id(path)] pub unsafe fn path(&self) -> Id; + #[method(isSecure)] pub unsafe fn isSecure(&self) -> bool; + #[method(isHTTPOnly)] pub unsafe fn isHTTPOnly(&self) -> bool; + #[method_id(comment)] pub unsafe fn comment(&self) -> Option>; + #[method_id(commentURL)] pub unsafe fn commentURL(&self) -> Option>; + #[method_id(portList)] pub unsafe fn portList(&self) -> Option, Shared>>; + #[method_id(sameSitePolicy)] pub unsafe fn sameSitePolicy(&self) -> Option>; } diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index a3e62c102..955e1d5b2 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -1,35 +1,47 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSHTTPCookieStorage; + unsafe impl ClassType for NSHTTPCookieStorage { type Super = NSObject; } ); + extern_methods!( unsafe impl NSHTTPCookieStorage { #[method_id(sharedHTTPCookieStorage)] pub unsafe fn sharedHTTPCookieStorage() -> Id; + #[method_id(sharedCookieStorageForGroupContainerIdentifier:)] pub unsafe fn sharedCookieStorageForGroupContainerIdentifier( identifier: &NSString, ) -> Id; + #[method_id(cookies)] pub unsafe fn cookies(&self) -> Option, Shared>>; + #[method(setCookie:)] pub unsafe fn setCookie(&self, cookie: &NSHTTPCookie); + #[method(deleteCookie:)] pub unsafe fn deleteCookie(&self, cookie: &NSHTTPCookie); + #[method(removeCookiesSinceDate:)] pub unsafe fn removeCookiesSinceDate(&self, date: &NSDate); + #[method_id(cookiesForURL:)] pub unsafe fn cookiesForURL( &self, URL: &NSURL, ) -> Option, Shared>>; + #[method(setCookies:forURL:mainDocumentURL:)] pub unsafe fn setCookies_forURL_mainDocumentURL( &self, @@ -37,10 +49,13 @@ extern_methods!( URL: Option<&NSURL>, mainDocumentURL: Option<&NSURL>, ); + #[method(cookieAcceptPolicy)] pub unsafe fn cookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy; + #[method(setCookieAcceptPolicy:)] pub unsafe fn setCookieAcceptPolicy(&self, cookieAcceptPolicy: NSHTTPCookieAcceptPolicy); + #[method_id(sortedCookiesUsingDescriptors:)] pub unsafe fn sortedCookiesUsingDescriptors( &self, @@ -48,8 +63,9 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSURLSessionTaskAdditions"] + /// NSURLSessionTaskAdditions unsafe impl NSHTTPCookieStorage { #[method(storeCookies:forTask:)] pub unsafe fn storeCookies_forTask( @@ -57,6 +73,7 @@ extern_methods!( cookies: &NSArray, task: &NSURLSessionTask, ); + #[method(getCookiesForTask:completionHandler:)] pub unsafe fn getCookiesForTask_completionHandler( &self, diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 34d8e4cec..f6ac795c9 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSHashTableOptions = NSUInteger; + __inner_extern_class!( #[derive(Debug)] pub struct NSHashTable; + unsafe impl ClassType for NSHashTable { type Super = NSObject; } ); + extern_methods!( unsafe impl NSHashTable { #[method_id(initWithOptions:capacity:)] @@ -18,52 +24,73 @@ extern_methods!( options: NSPointerFunctionsOptions, initialCapacity: NSUInteger, ) -> Id; + #[method_id(initWithPointerFunctions:capacity:)] pub unsafe fn initWithPointerFunctions_capacity( &self, functions: &NSPointerFunctions, initialCapacity: NSUInteger, ) -> Id; + #[method_id(hashTableWithOptions:)] pub unsafe fn hashTableWithOptions( options: NSPointerFunctionsOptions, ) -> Id, Shared>; + #[method_id(hashTableWithWeakObjects)] pub unsafe fn hashTableWithWeakObjects() -> Id; + #[method_id(weakObjectsHashTable)] pub unsafe fn weakObjectsHashTable() -> Id, Shared>; + #[method_id(pointerFunctions)] pub unsafe fn pointerFunctions(&self) -> Id; + #[method(count)] pub unsafe fn count(&self) -> NSUInteger; + #[method_id(member:)] pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option>; + #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + #[method(addObject:)] pub unsafe fn addObject(&self, object: Option<&ObjectType>); + #[method(removeObject:)] pub unsafe fn removeObject(&self, object: Option<&ObjectType>); + #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); + #[method_id(allObjects)] pub unsafe fn allObjects(&self) -> Id, Shared>; + #[method_id(anyObject)] pub unsafe fn anyObject(&self) -> Option>; + #[method(containsObject:)] pub unsafe fn containsObject(&self, anObject: Option<&ObjectType>) -> bool; + #[method(intersectsHashTable:)] pub unsafe fn intersectsHashTable(&self, other: &NSHashTable) -> bool; + #[method(isEqualToHashTable:)] pub unsafe fn isEqualToHashTable(&self, other: &NSHashTable) -> bool; + #[method(isSubsetOfHashTable:)] pub unsafe fn isSubsetOfHashTable(&self, other: &NSHashTable) -> bool; + #[method(intersectHashTable:)] pub unsafe fn intersectHashTable(&self, other: &NSHashTable); + #[method(unionHashTable:)] pub unsafe fn unionHashTable(&self, other: &NSHashTable); + #[method(minusHashTable:)] pub unsafe fn minusHashTable(&self, other: &NSHashTable); + #[method_id(setRepresentation)] pub unsafe fn setRepresentation(&self) -> Id, Shared>; } diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index 2730b38aa..a2b8e3b02 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -1,38 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSHost; + unsafe impl ClassType for NSHost { type Super = NSObject; } ); + extern_methods!( unsafe impl NSHost { #[method_id(currentHost)] pub unsafe fn currentHost() -> Id; + #[method_id(hostWithName:)] pub unsafe fn hostWithName(name: Option<&NSString>) -> Id; + #[method_id(hostWithAddress:)] pub unsafe fn hostWithAddress(address: &NSString) -> Id; + #[method(isEqualToHost:)] pub unsafe fn isEqualToHost(&self, aHost: &NSHost) -> bool; + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method_id(names)] pub unsafe fn names(&self) -> Id, Shared>; + #[method_id(address)] pub unsafe fn address(&self) -> Option>; + #[method_id(addresses)] pub unsafe fn addresses(&self) -> Id, Shared>; + #[method_id(localizedName)] pub unsafe fn localizedName(&self) -> Option>; + #[method(setHostCacheEnabled:)] pub unsafe fn setHostCacheEnabled(flag: bool); + #[method(isHostCacheEnabled)] pub unsafe fn isHostCacheEnabled() -> bool; + #[method(flushHostCache)] pub unsafe fn flushHostCache(); } diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 786d3b8f4..42e140c00 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -1,30 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSISO8601DateFormatter; + unsafe impl ClassType for NSISO8601DateFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSISO8601DateFormatter { #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Id; + #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); + #[method(formatOptions)] pub unsafe fn formatOptions(&self) -> NSISO8601DateFormatOptions; + #[method(setFormatOptions:)] pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions); + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(stringFromDate:)] pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; + #[method_id(dateFromString:)] pub unsafe fn dateFromString(&self, string: &NSString) -> Option>; + #[method_id(stringFromDate:timeZone:formatOptions:)] pub unsafe fn stringFromDate_timeZone_formatOptions( date: &NSDate, diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index 928266f46..fbed52ab1 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -1,47 +1,62 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSIndexPath; + unsafe impl ClassType for NSIndexPath { type Super = NSObject; } ); + extern_methods!( unsafe impl NSIndexPath { #[method_id(indexPathWithIndex:)] pub unsafe fn indexPathWithIndex(index: NSUInteger) -> Id; + #[method_id(indexPathWithIndexes:length:)] pub unsafe fn indexPathWithIndexes_length( indexes: TodoArray, length: NSUInteger, ) -> Id; + #[method_id(initWithIndexes:length:)] pub unsafe fn initWithIndexes_length( &self, indexes: TodoArray, length: NSUInteger, ) -> Id; + #[method_id(initWithIndex:)] pub unsafe fn initWithIndex(&self, index: NSUInteger) -> Id; + #[method_id(indexPathByAddingIndex:)] pub unsafe fn indexPathByAddingIndex(&self, index: NSUInteger) -> Id; + #[method_id(indexPathByRemovingLastIndex)] pub unsafe fn indexPathByRemovingLastIndex(&self) -> Id; + #[method(indexAtPosition:)] pub unsafe fn indexAtPosition(&self, position: NSUInteger) -> NSUInteger; + #[method(length)] pub unsafe fn length(&self) -> NSUInteger; + #[method(getIndexes:range:)] pub unsafe fn getIndexes_range(&self, indexes: NonNull, positionRange: NSRange); + #[method(compare:)] pub unsafe fn compare(&self, otherObject: &NSIndexPath) -> NSComparisonResult; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSIndexPath { #[method(getIndexes:)] pub unsafe fn getIndexes(&self, indexes: NonNull); diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index 447e862e7..5dca81c9f 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -1,44 +1,63 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSIndexSet; + unsafe impl ClassType for NSIndexSet { type Super = NSObject; } ); + extern_methods!( unsafe impl NSIndexSet { #[method_id(indexSet)] pub unsafe fn indexSet() -> Id; + #[method_id(indexSetWithIndex:)] pub unsafe fn indexSetWithIndex(value: NSUInteger) -> Id; + #[method_id(indexSetWithIndexesInRange:)] pub unsafe fn indexSetWithIndexesInRange(range: NSRange) -> Id; + #[method_id(initWithIndexesInRange:)] pub unsafe fn initWithIndexesInRange(&self, range: NSRange) -> Id; + #[method_id(initWithIndexSet:)] pub unsafe fn initWithIndexSet(&self, indexSet: &NSIndexSet) -> Id; + #[method_id(initWithIndex:)] pub unsafe fn initWithIndex(&self, value: NSUInteger) -> Id; + #[method(isEqualToIndexSet:)] pub unsafe fn isEqualToIndexSet(&self, indexSet: &NSIndexSet) -> bool; + #[method(count)] pub unsafe fn count(&self) -> NSUInteger; + #[method(firstIndex)] pub unsafe fn firstIndex(&self) -> NSUInteger; + #[method(lastIndex)] pub unsafe fn lastIndex(&self) -> NSUInteger; + #[method(indexGreaterThanIndex:)] pub unsafe fn indexGreaterThanIndex(&self, value: NSUInteger) -> NSUInteger; + #[method(indexLessThanIndex:)] pub unsafe fn indexLessThanIndex(&self, value: NSUInteger) -> NSUInteger; + #[method(indexGreaterThanOrEqualToIndex:)] pub unsafe fn indexGreaterThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger; + #[method(indexLessThanOrEqualToIndex:)] pub unsafe fn indexLessThanOrEqualToIndex(&self, value: NSUInteger) -> NSUInteger; + #[method(getIndexes:maxCount:inIndexRange:)] pub unsafe fn getIndexes_maxCount_inIndexRange( &self, @@ -46,24 +65,32 @@ extern_methods!( bufferSize: NSUInteger, range: NSRangePointer, ) -> NSUInteger; + #[method(countOfIndexesInRange:)] pub unsafe fn countOfIndexesInRange(&self, range: NSRange) -> NSUInteger; + #[method(containsIndex:)] pub unsafe fn containsIndex(&self, value: NSUInteger) -> bool; + #[method(containsIndexesInRange:)] pub unsafe fn containsIndexesInRange(&self, range: NSRange) -> bool; + #[method(containsIndexes:)] pub unsafe fn containsIndexes(&self, indexSet: &NSIndexSet) -> bool; + #[method(intersectsIndexesInRange:)] pub unsafe fn intersectsIndexesInRange(&self, range: NSRange) -> bool; + #[method(enumerateIndexesUsingBlock:)] pub unsafe fn enumerateIndexesUsingBlock(&self, block: TodoBlock); + #[method(enumerateIndexesWithOptions:usingBlock:)] pub unsafe fn enumerateIndexesWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); + #[method(enumerateIndexesInRange:options:usingBlock:)] pub unsafe fn enumerateIndexesInRange_options_usingBlock( &self, @@ -71,14 +98,17 @@ extern_methods!( opts: NSEnumerationOptions, block: TodoBlock, ); + #[method(indexPassingTest:)] pub unsafe fn indexPassingTest(&self, predicate: TodoBlock) -> NSUInteger; + #[method(indexWithOptions:passingTest:)] pub unsafe fn indexWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; + #[method(indexInRange:options:passingTest:)] pub unsafe fn indexInRange_options_passingTest( &self, @@ -86,14 +116,17 @@ extern_methods!( opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; + #[method_id(indexesPassingTest:)] pub unsafe fn indexesPassingTest(&self, predicate: TodoBlock) -> Id; + #[method_id(indexesWithOptions:passingTest:)] pub unsafe fn indexesWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; + #[method_id(indexesInRange:options:passingTest:)] pub unsafe fn indexesInRange_options_passingTest( &self, @@ -101,14 +134,17 @@ extern_methods!( opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; + #[method(enumerateRangesUsingBlock:)] pub unsafe fn enumerateRangesUsingBlock(&self, block: TodoBlock); + #[method(enumerateRangesWithOptions:usingBlock:)] pub unsafe fn enumerateRangesWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); + #[method(enumerateRangesInRange:options:usingBlock:)] pub unsafe fn enumerateRangesInRange_options_usingBlock( &self, @@ -118,29 +154,39 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSMutableIndexSet; + unsafe impl ClassType for NSMutableIndexSet { type Super = NSIndexSet; } ); + extern_methods!( unsafe impl NSMutableIndexSet { #[method(addIndexes:)] pub unsafe fn addIndexes(&self, indexSet: &NSIndexSet); + #[method(removeIndexes:)] pub unsafe fn removeIndexes(&self, indexSet: &NSIndexSet); + #[method(removeAllIndexes)] pub unsafe fn removeAllIndexes(&self); + #[method(addIndex:)] pub unsafe fn addIndex(&self, value: NSUInteger); + #[method(removeIndex:)] pub unsafe fn removeIndex(&self, value: NSUInteger); + #[method(addIndexesInRange:)] pub unsafe fn addIndexesInRange(&self, range: NSRange); + #[method(removeIndexesInRange:)] pub unsafe fn removeIndexesInRange(&self, range: NSRange); + #[method(shiftIndexesStartingAtIndex:by:)] pub unsafe fn shiftIndexesStartingAtIndex_by(&self, index: NSUInteger, delta: NSInteger); } diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index 52f712748..f822fbcc1 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -1,42 +1,54 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSInflectionRule; + unsafe impl ClassType for NSInflectionRule { type Super = NSObject; } ); + extern_methods!( unsafe impl NSInflectionRule { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(automaticRule)] pub unsafe fn automaticRule() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSInflectionRuleExplicit; + unsafe impl ClassType for NSInflectionRuleExplicit { type Super = NSInflectionRule; } ); + extern_methods!( unsafe impl NSInflectionRuleExplicit { #[method_id(initWithMorphology:)] pub unsafe fn initWithMorphology(&self, morphology: &NSMorphology) -> Id; + #[method_id(morphology)] pub unsafe fn morphology(&self) -> Id; } ); + extern_methods!( - #[doc = "NSInflectionAvailability"] + /// NSInflectionAvailability unsafe impl NSInflectionRule { #[method(canInflectLanguage:)] pub unsafe fn canInflectLanguage(language: &NSString) -> bool; + #[method(canInflectPreferredLocalization)] pub unsafe fn canInflectPreferredLocalization() -> bool; } diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index 1bb627bcf..99bd1ba30 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -1,44 +1,62 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSInvocation; + unsafe impl ClassType for NSInvocation { type Super = NSObject; } ); + extern_methods!( unsafe impl NSInvocation { #[method_id(invocationWithMethodSignature:)] pub unsafe fn invocationWithMethodSignature( sig: &NSMethodSignature, ) -> Id; + #[method_id(methodSignature)] pub unsafe fn methodSignature(&self) -> Id; + #[method(retainArguments)] pub unsafe fn retainArguments(&self); + #[method(argumentsRetained)] pub unsafe fn argumentsRetained(&self) -> bool; + #[method_id(target)] pub unsafe fn target(&self) -> Option>; + #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); + #[method(selector)] pub unsafe fn selector(&self) -> Sel; + #[method(setSelector:)] pub unsafe fn setSelector(&self, selector: Sel); + #[method(getReturnValue:)] pub unsafe fn getReturnValue(&self, retLoc: NonNull); + #[method(setReturnValue:)] pub unsafe fn setReturnValue(&self, retLoc: NonNull); + #[method(getArgument:atIndex:)] pub unsafe fn getArgument_atIndex(&self, argumentLocation: NonNull, idx: NSInteger); + #[method(setArgument:atIndex:)] pub unsafe fn setArgument_atIndex(&self, argumentLocation: NonNull, idx: NSInteger); + #[method(invoke)] pub unsafe fn invoke(&self); + #[method(invokeWithTarget:)] pub unsafe fn invokeWithTarget(&self, target: &Object); } diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 87af49b73..646e1b162 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -1,20 +1,28 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSItemProviderWriting = NSObject; + pub type NSItemProviderReading = NSObject; + extern_class!( #[derive(Debug)] pub struct NSItemProvider; + unsafe impl ClassType for NSItemProvider { type Super = NSObject; } ); + extern_methods!( unsafe impl NSItemProvider { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method(registerDataRepresentationForTypeIdentifier:visibility:loadHandler:)] pub unsafe fn registerDataRepresentationForTypeIdentifier_visibility_loadHandler( &self, @@ -22,6 +30,7 @@ extern_methods!( visibility: NSItemProviderRepresentationVisibility, loadHandler: TodoBlock, ); + #[method(registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:)] pub unsafe fn registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler( &self, @@ -30,68 +39,83 @@ extern_methods!( visibility: NSItemProviderRepresentationVisibility, loadHandler: TodoBlock, ); + #[method_id(registeredTypeIdentifiers)] pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared>; + #[method_id(registeredTypeIdentifiersWithFileOptions:)] pub unsafe fn registeredTypeIdentifiersWithFileOptions( &self, fileOptions: NSItemProviderFileOptions, ) -> Id, Shared>; + #[method(hasItemConformingToTypeIdentifier:)] pub unsafe fn hasItemConformingToTypeIdentifier(&self, typeIdentifier: &NSString) -> bool; + #[method(hasRepresentationConformingToTypeIdentifier:fileOptions:)] pub unsafe fn hasRepresentationConformingToTypeIdentifier_fileOptions( &self, typeIdentifier: &NSString, fileOptions: NSItemProviderFileOptions, ) -> bool; + #[method_id(loadDataRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadDataRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, ) -> Id; + #[method_id(loadFileRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadFileRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, ) -> Id; + #[method_id(loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadInPlaceFileRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, ) -> Id; + #[method_id(suggestedName)] pub unsafe fn suggestedName(&self) -> Option>; + #[method(setSuggestedName:)] pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>); + #[method_id(initWithObject:)] pub unsafe fn initWithObject(&self, object: &NSItemProviderWriting) -> Id; + #[method(registerObject:visibility:)] pub unsafe fn registerObject_visibility( &self, object: &NSItemProviderWriting, visibility: NSItemProviderRepresentationVisibility, ); + #[method_id(initWithItem:typeIdentifier:)] pub unsafe fn initWithItem_typeIdentifier( &self, item: Option<&NSSecureCoding>, typeIdentifier: Option<&NSString>, ) -> Id; + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( &self, fileURL: Option<&NSURL>, ) -> Option>; + #[method(registerItemForTypeIdentifier:loadHandler:)] pub unsafe fn registerItemForTypeIdentifier_loadHandler( &self, typeIdentifier: &NSString, loadHandler: NSItemProviderLoadHandler, ); + #[method(loadItemForTypeIdentifier:options:completionHandler:)] pub unsafe fn loadItemForTypeIdentifier_options_completionHandler( &self, @@ -101,13 +125,16 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSPreviewSupport"] + /// NSPreviewSupport unsafe impl NSItemProvider { #[method(previewImageHandler)] pub unsafe fn previewImageHandler(&self) -> NSItemProviderLoadHandler; + #[method(setPreviewImageHandler:)] pub unsafe fn setPreviewImageHandler(&self, previewImageHandler: NSItemProviderLoadHandler); + #[method(loadPreviewImageWithOptions:completionHandler:)] pub unsafe fn loadPreviewImageWithOptions_completionHandler( &self, diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 6dc4c2dde..ae9122ca7 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -1,28 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSJSONSerialization; + unsafe impl ClassType for NSJSONSerialization { type Super = NSObject; } ); + extern_methods!( unsafe impl NSJSONSerialization { #[method(isValidJSONObject:)] pub unsafe fn isValidJSONObject(obj: &Object) -> bool; + #[method_id(dataWithJSONObject:options:error:)] pub unsafe fn dataWithJSONObject_options_error( obj: &Object, opt: NSJSONWritingOptions, ) -> Result, Id>; + #[method_id(JSONObjectWithData:options:error:)] pub unsafe fn JSONObjectWithData_options_error( data: &NSData, opt: NSJSONReadingOptions, ) -> Result, Id>; + #[method_id(JSONObjectWithStream:options:error:)] pub unsafe fn JSONObjectWithStream_options_error( stream: &NSInputStream, diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index 11b8df126..c988142a1 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -1,68 +1,89 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSKeyValueOperator = NSString; + extern_methods!( - #[doc = "NSKeyValueCoding"] + /// NSKeyValueCoding unsafe impl NSObject { #[method(accessInstanceVariablesDirectly)] pub unsafe fn accessInstanceVariablesDirectly() -> bool; + #[method_id(valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; + #[method(setValue:forKey:)] pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); + #[method(validateValue:forKey:error:)] pub unsafe fn validateValue_forKey_error( &self, ioValue: &mut Option>, inKey: &NSString, ) -> Result<(), Id>; + #[method_id(mutableArrayValueForKey:)] pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id; + #[method_id(mutableOrderedSetValueForKey:)] pub unsafe fn mutableOrderedSetValueForKey( &self, key: &NSString, ) -> Id; + #[method_id(mutableSetValueForKey:)] pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id; + #[method_id(valueForKeyPath:)] pub unsafe fn valueForKeyPath(&self, keyPath: &NSString) -> Option>; + #[method(setValue:forKeyPath:)] pub unsafe fn setValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString); + #[method(validateValue:forKeyPath:error:)] pub unsafe fn validateValue_forKeyPath_error( &self, ioValue: &mut Option>, inKeyPath: &NSString, ) -> Result<(), Id>; + #[method_id(mutableArrayValueForKeyPath:)] pub unsafe fn mutableArrayValueForKeyPath( &self, keyPath: &NSString, ) -> Id; + #[method_id(mutableOrderedSetValueForKeyPath:)] pub unsafe fn mutableOrderedSetValueForKeyPath( &self, keyPath: &NSString, ) -> Id; + #[method_id(mutableSetValueForKeyPath:)] pub unsafe fn mutableSetValueForKeyPath( &self, keyPath: &NSString, ) -> Id; + #[method_id(valueForUndefinedKey:)] pub unsafe fn valueForUndefinedKey(&self, key: &NSString) -> Option>; + #[method(setValue:forUndefinedKey:)] pub unsafe fn setValue_forUndefinedKey(&self, value: Option<&Object>, key: &NSString); + #[method(setNilValueForKey:)] pub unsafe fn setNilValueForKey(&self, key: &NSString); + #[method_id(dictionaryWithValuesForKeys:)] pub unsafe fn dictionaryWithValuesForKeys( &self, keys: &NSArray, ) -> Id, Shared>; + #[method(setValuesForKeysWithDictionary:)] pub unsafe fn setValuesForKeysWithDictionary( &self, @@ -70,71 +91,89 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSKeyValueCoding"] + /// NSKeyValueCoding unsafe impl NSArray { #[method_id(valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Id; + #[method(setValue:forKey:)] pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); } ); + extern_methods!( - #[doc = "NSKeyValueCoding"] + /// NSKeyValueCoding unsafe impl NSDictionary { #[method_id(valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; } ); + extern_methods!( - #[doc = "NSKeyValueCoding"] + /// NSKeyValueCoding unsafe impl NSMutableDictionary { #[method(setValue:forKey:)] pub unsafe fn setValue_forKey(&self, value: Option<&ObjectType>, key: &NSString); } ); + extern_methods!( - #[doc = "NSKeyValueCoding"] + /// NSKeyValueCoding unsafe impl NSOrderedSet { #[method_id(valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Id; + #[method(setValue:forKey:)] pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); } ); + extern_methods!( - #[doc = "NSKeyValueCoding"] + /// NSKeyValueCoding unsafe impl NSSet { #[method_id(valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Id; + #[method(setValue:forKey:)] pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); } ); + extern_methods!( - #[doc = "NSDeprecatedKeyValueCoding"] + /// NSDeprecatedKeyValueCoding unsafe impl NSObject { #[method(useStoredAccessor)] pub unsafe fn useStoredAccessor() -> bool; + #[method_id(storedValueForKey:)] pub unsafe fn storedValueForKey(&self, key: &NSString) -> Option>; + #[method(takeStoredValue:forKey:)] pub unsafe fn takeStoredValue_forKey(&self, value: Option<&Object>, key: &NSString); + #[method(takeValue:forKey:)] pub unsafe fn takeValue_forKey(&self, value: Option<&Object>, key: &NSString); + #[method(takeValue:forKeyPath:)] pub unsafe fn takeValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString); + #[method_id(handleQueryWithUnboundKey:)] pub unsafe fn handleQueryWithUnboundKey( &self, key: &NSString, ) -> Option>; + #[method(handleTakeValue:forUnboundKey:)] pub unsafe fn handleTakeValue_forUnboundKey(&self, value: Option<&Object>, key: &NSString); + #[method(unableToSetNilForKey:)] pub unsafe fn unableToSetNilForKey(&self, key: &NSString); + #[method_id(valuesForKeys:)] pub unsafe fn valuesForKeys(&self, keys: &NSArray) -> Id; + #[method(takeValuesFromDictionary:)] pub unsafe fn takeValuesFromDictionary(&self, properties: &NSDictionary); } diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 1f8f7d24a..0db933403 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -1,10 +1,14 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSKeyValueChangeKey = NSString; + extern_methods!( - #[doc = "NSKeyValueObserving"] + /// NSKeyValueObserving unsafe impl NSObject { #[method(observeValueForKeyPath:ofObject:change:context:)] pub unsafe fn observeValueForKeyPath_ofObject_change_context( @@ -16,8 +20,9 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSKeyValueObserverRegistration"] + /// NSKeyValueObserverRegistration unsafe impl NSObject { #[method(addObserver:forKeyPath:options:context:)] pub unsafe fn addObserver_forKeyPath_options_context( @@ -27,6 +32,7 @@ extern_methods!( options: NSKeyValueObservingOptions, context: *mut c_void, ); + #[method(removeObserver:forKeyPath:context:)] pub unsafe fn removeObserver_forKeyPath_context( &self, @@ -34,12 +40,14 @@ extern_methods!( keyPath: &NSString, context: *mut c_void, ); + #[method(removeObserver:forKeyPath:)] pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); + extern_methods!( - #[doc = "NSKeyValueObserverRegistration"] + /// NSKeyValueObserverRegistration unsafe impl NSArray { #[method(addObserver:toObjectsAtIndexes:forKeyPath:options:context:)] pub unsafe fn addObserver_toObjectsAtIndexes_forKeyPath_options_context( @@ -50,6 +58,7 @@ extern_methods!( options: NSKeyValueObservingOptions, context: *mut c_void, ); + #[method(removeObserver:fromObjectsAtIndexes:forKeyPath:context:)] pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath_context( &self, @@ -58,6 +67,7 @@ extern_methods!( keyPath: &NSString, context: *mut c_void, ); + #[method(removeObserver:fromObjectsAtIndexes:forKeyPath:)] pub unsafe fn removeObserver_fromObjectsAtIndexes_forKeyPath( &self, @@ -65,6 +75,7 @@ extern_methods!( indexes: &NSIndexSet, keyPath: &NSString, ); + #[method(addObserver:forKeyPath:options:context:)] pub unsafe fn addObserver_forKeyPath_options_context( &self, @@ -73,6 +84,7 @@ extern_methods!( options: NSKeyValueObservingOptions, context: *mut c_void, ); + #[method(removeObserver:forKeyPath:context:)] pub unsafe fn removeObserver_forKeyPath_context( &self, @@ -80,12 +92,14 @@ extern_methods!( keyPath: &NSString, context: *mut c_void, ); + #[method(removeObserver:forKeyPath:)] pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); + extern_methods!( - #[doc = "NSKeyValueObserverRegistration"] + /// NSKeyValueObserverRegistration unsafe impl NSOrderedSet { #[method(addObserver:forKeyPath:options:context:)] pub unsafe fn addObserver_forKeyPath_options_context( @@ -95,6 +109,7 @@ extern_methods!( options: NSKeyValueObservingOptions, context: *mut c_void, ); + #[method(removeObserver:forKeyPath:context:)] pub unsafe fn removeObserver_forKeyPath_context( &self, @@ -102,12 +117,14 @@ extern_methods!( keyPath: &NSString, context: *mut c_void, ); + #[method(removeObserver:forKeyPath:)] pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); + extern_methods!( - #[doc = "NSKeyValueObserverRegistration"] + /// NSKeyValueObserverRegistration unsafe impl NSSet { #[method(addObserver:forKeyPath:options:context:)] pub unsafe fn addObserver_forKeyPath_options_context( @@ -117,6 +134,7 @@ extern_methods!( options: NSKeyValueObservingOptions, context: *mut c_void, ); + #[method(removeObserver:forKeyPath:context:)] pub unsafe fn removeObserver_forKeyPath_context( &self, @@ -124,17 +142,21 @@ extern_methods!( keyPath: &NSString, context: *mut c_void, ); + #[method(removeObserver:forKeyPath:)] pub unsafe fn removeObserver_forKeyPath(&self, observer: &NSObject, keyPath: &NSString); } ); + extern_methods!( - #[doc = "NSKeyValueObserverNotification"] + /// NSKeyValueObserverNotification unsafe impl NSObject { #[method(willChangeValueForKey:)] pub unsafe fn willChangeValueForKey(&self, key: &NSString); + #[method(didChangeValueForKey:)] pub unsafe fn didChangeValueForKey(&self, key: &NSString); + #[method(willChange:valuesAtIndexes:forKey:)] pub unsafe fn willChange_valuesAtIndexes_forKey( &self, @@ -142,6 +164,7 @@ extern_methods!( indexes: &NSIndexSet, key: &NSString, ); + #[method(didChange:valuesAtIndexes:forKey:)] pub unsafe fn didChange_valuesAtIndexes_forKey( &self, @@ -149,6 +172,7 @@ extern_methods!( indexes: &NSIndexSet, key: &NSString, ); + #[method(willChangeValueForKey:withSetMutation:usingObjects:)] pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects( &self, @@ -156,6 +180,7 @@ extern_methods!( mutationKind: NSKeyValueSetMutationKind, objects: &NSSet, ); + #[method(didChangeValueForKey:withSetMutation:usingObjects:)] pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects( &self, @@ -165,23 +190,28 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSKeyValueObservingCustomization"] + /// NSKeyValueObservingCustomization unsafe impl NSObject { #[method_id(keyPathsForValuesAffectingValueForKey:)] pub unsafe fn keyPathsForValuesAffectingValueForKey( key: &NSString, ) -> Id, Shared>; + #[method(automaticallyNotifiesObserversForKey:)] pub unsafe fn automaticallyNotifiesObserversForKey(key: &NSString) -> bool; + #[method(observationInfo)] pub unsafe fn observationInfo(&self) -> *mut c_void; + #[method(setObservationInfo:)] pub unsafe fn setObservationInfo(&self, observationInfo: *mut c_void); } ); + extern_methods!( - #[doc = "NSDeprecatedKeyValueObservingCustomization"] + /// NSDeprecatedKeyValueObservingCustomization unsafe impl NSObject { #[method(setKeys:triggerChangeNotificationsForDependentKey:)] pub unsafe fn setKeys_triggerChangeNotificationsForDependentKey( diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index e1d141750..7fb555545 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSKeyedArchiver; + unsafe impl ClassType for NSKeyedArchiver { type Super = NSCoder; } ); + extern_methods!( unsafe impl NSKeyedArchiver { #[method_id(initRequiringSecureCoding:)] @@ -16,62 +21,86 @@ extern_methods!( &self, requiresSecureCoding: bool, ) -> Id; + #[method_id(archivedDataWithRootObject:requiringSecureCoding:error:)] pub unsafe fn archivedDataWithRootObject_requiringSecureCoding_error( object: &Object, requiresSecureCoding: bool, ) -> Result, Id>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initForWritingWithMutableData:)] pub unsafe fn initForWritingWithMutableData( &self, data: &NSMutableData, ) -> Id; + #[method_id(archivedDataWithRootObject:)] pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id; + #[method(archiveRootObject:toFile:)] pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedArchiverDelegate>); + #[method(outputFormat)] pub unsafe fn outputFormat(&self) -> NSPropertyListFormat; + #[method(setOutputFormat:)] pub unsafe fn setOutputFormat(&self, outputFormat: NSPropertyListFormat); + #[method_id(encodedData)] pub unsafe fn encodedData(&self) -> Id; + #[method(finishEncoding)] pub unsafe fn finishEncoding(&self); + #[method(setClassName:forClass:)] pub unsafe fn setClassName_forClass(codedName: Option<&NSString>, cls: &Class); + #[method(setClassName:forClass:)] pub unsafe fn setClassName_forClass(&self, codedName: Option<&NSString>, cls: &Class); + #[method_id(classNameForClass:)] pub unsafe fn classNameForClass(cls: &Class) -> Option>; + #[method_id(classNameForClass:)] pub unsafe fn classNameForClass(&self, cls: &Class) -> Option>; + #[method(encodeObject:forKey:)] pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString); + #[method(encodeConditionalObject:forKey:)] pub unsafe fn encodeConditionalObject_forKey( &self, object: Option<&Object>, key: &NSString, ); + #[method(encodeBool:forKey:)] pub unsafe fn encodeBool_forKey(&self, value: bool, key: &NSString); + #[method(encodeInt:forKey:)] pub unsafe fn encodeInt_forKey(&self, value: c_int, key: &NSString); + #[method(encodeInt32:forKey:)] pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString); + #[method(encodeInt64:forKey:)] pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString); + #[method(encodeFloat:forKey:)] pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString); + #[method(encodeDouble:forKey:)] pub unsafe fn encodeDouble_forKey(&self, value: c_double, key: &NSString); + #[method(encodeBytes:length:forKey:)] pub unsafe fn encodeBytes_length_forKey( &self, @@ -79,19 +108,24 @@ extern_methods!( length: NSUInteger, key: &NSString, ); + #[method(requiresSecureCoding)] pub unsafe fn requiresSecureCoding(&self) -> bool; + #[method(setRequiresSecureCoding:)] pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool); } ); + extern_class!( #[derive(Debug)] pub struct NSKeyedUnarchiver; + unsafe impl ClassType for NSKeyedUnarchiver { type Super = NSCoder; } ); + extern_methods!( unsafe impl NSKeyedUnarchiver { #[method_id(initForReadingFromData:error:)] @@ -99,92 +133,123 @@ extern_methods!( &self, data: &NSData, ) -> Result, Id>; + #[method_id(unarchivedObjectOfClass:fromData:error:)] pub unsafe fn unarchivedObjectOfClass_fromData_error( cls: &Class, data: &NSData, ) -> Result, Id>; + #[method_id(unarchivedArrayOfObjectsOfClass:fromData:error:)] pub unsafe fn unarchivedArrayOfObjectsOfClass_fromData_error( cls: &Class, data: &NSData, ) -> Result, Id>; + #[method_id(unarchivedDictionaryWithKeysOfClass:objectsOfClass:fromData:error:)] pub unsafe fn unarchivedDictionaryWithKeysOfClass_objectsOfClass_fromData_error( keyCls: &Class, valueCls: &Class, data: &NSData, ) -> Result, Id>; + #[method_id(unarchivedObjectOfClasses:fromData:error:)] pub unsafe fn unarchivedObjectOfClasses_fromData_error( classes: &NSSet, data: &NSData, ) -> Result, Id>; + #[method_id(unarchivedArrayOfObjectsOfClasses:fromData:error:)] pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( classes: &NSSet, data: &NSData, ) -> Result, Id>; + #[method_id(unarchivedDictionaryWithKeysOfClasses:objectsOfClasses:fromData:error:)] pub unsafe fn unarchivedDictionaryWithKeysOfClasses_objectsOfClasses_fromData_error( keyClasses: &NSSet, valueClasses: &NSSet, data: &NSData, ) -> Result, Id>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initForReadingWithData:)] pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Id; + #[method_id(unarchiveObjectWithData:)] pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option>; + #[method_id(unarchiveTopLevelObjectWithData:error:)] pub unsafe fn unarchiveTopLevelObjectWithData_error( data: &NSData, ) -> Result, Id>; + #[method_id(unarchiveObjectWithFile:)] pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option>; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSKeyedUnarchiverDelegate>); + #[method(finishDecoding)] pub unsafe fn finishDecoding(&self); + #[method(setClass:forClassName:)] pub unsafe fn setClass_forClassName(cls: Option<&Class>, codedName: &NSString); + #[method(setClass:forClassName:)] pub unsafe fn setClass_forClassName(&self, cls: Option<&Class>, codedName: &NSString); + #[method(classForClassName:)] pub unsafe fn classForClassName(codedName: &NSString) -> Option<&Class>; + #[method(classForClassName:)] pub unsafe fn classForClassName(&self, codedName: &NSString) -> Option<&Class>; + #[method(containsValueForKey:)] pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; + #[method_id(decodeObjectForKey:)] pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option>; + #[method(decodeBoolForKey:)] pub unsafe fn decodeBoolForKey(&self, key: &NSString) -> bool; + #[method(decodeIntForKey:)] pub unsafe fn decodeIntForKey(&self, key: &NSString) -> c_int; + #[method(decodeInt32ForKey:)] pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32; + #[method(decodeInt64ForKey:)] pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t; + #[method(decodeFloatForKey:)] pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float; + #[method(decodeDoubleForKey:)] pub unsafe fn decodeDoubleForKey(&self, key: &NSString) -> c_double; + #[method(decodeBytesForKey:returnedLength:)] pub unsafe fn decodeBytesForKey_returnedLength( &self, key: &NSString, lengthp: *mut NSUInteger, ) -> *mut u8; + #[method(requiresSecureCoding)] pub unsafe fn requiresSecureCoding(&self) -> bool; + #[method(setRequiresSecureCoding:)] pub unsafe fn setRequiresSecureCoding(&self, requiresSecureCoding: bool); + #[method(decodingFailurePolicy)] pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy; + #[method(setDecodingFailurePolicy:)] pub unsafe fn setDecodingFailurePolicy( &self, @@ -192,24 +257,30 @@ extern_methods!( ); } ); + pub type NSKeyedArchiverDelegate = NSObject; + pub type NSKeyedUnarchiverDelegate = NSObject; + extern_methods!( - #[doc = "NSKeyedArchiverObjectSubstitution"] + /// NSKeyedArchiverObjectSubstitution unsafe impl NSObject { #[method(classForKeyedArchiver)] pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class>; + #[method_id(replacementObjectForKeyedArchiver:)] pub unsafe fn replacementObjectForKeyedArchiver( &self, archiver: &NSKeyedArchiver, ) -> Option>; + #[method_id(classFallbacksForKeyedArchiver)] pub unsafe fn classFallbacksForKeyedArchiver() -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSKeyedUnarchiverObjectSubstitution"] + /// NSKeyedUnarchiverObjectSubstitution unsafe impl NSObject { #[method(classForKeyedUnarchiver)] pub unsafe fn classForKeyedUnarchiver() -> &Class; diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index 857556010..668361076 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -1,48 +1,63 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSLengthFormatter; + unsafe impl ClassType for NSLengthFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSLengthFormatter { #[method_id(numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; + #[method(setNumberFormatter:)] pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); + #[method(unitStyle)] pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; + #[method(setUnitStyle:)] pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); + #[method(isForPersonHeightUse)] pub unsafe fn isForPersonHeightUse(&self) -> bool; + #[method(setForPersonHeightUse:)] pub unsafe fn setForPersonHeightUse(&self, forPersonHeightUse: bool); + #[method_id(stringFromValue:unit:)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSLengthFormatterUnit, ) -> Id; + #[method_id(stringFromMeters:)] pub unsafe fn stringFromMeters(&self, numberInMeters: c_double) -> Id; + #[method_id(unitStringFromValue:unit:)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSLengthFormatterUnit, ) -> Id; + #[method_id(unitStringFromMeters:usedUnit:)] pub unsafe fn unitStringFromMeters_usedUnit( &self, numberInMeters: c_double, unitp: *mut NSLengthFormatterUnit, ) -> Id; + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 174df9dc5..bcdb3c4ca 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -1,16 +1,23 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSLinguisticTagScheme = NSString; + pub type NSLinguisticTag = NSString; + extern_class!( #[derive(Debug)] pub struct NSLinguisticTagger; + unsafe impl ClassType for NSLinguisticTagger { type Super = NSObject; } ); + extern_methods!( unsafe impl NSLinguisticTagger { #[method_id(initWithTagSchemes:options:)] @@ -19,47 +26,58 @@ extern_methods!( tagSchemes: &NSArray, opts: NSUInteger, ) -> Id; + #[method_id(tagSchemes)] pub unsafe fn tagSchemes(&self) -> Id, Shared>; + #[method_id(string)] pub unsafe fn string(&self) -> Option>; + #[method(setString:)] pub unsafe fn setString(&self, string: Option<&NSString>); + #[method_id(availableTagSchemesForUnit:language:)] pub unsafe fn availableTagSchemesForUnit_language( unit: NSLinguisticTaggerUnit, language: &NSString, ) -> Id, Shared>; + #[method_id(availableTagSchemesForLanguage:)] pub unsafe fn availableTagSchemesForLanguage( language: &NSString, ) -> Id, Shared>; + #[method(setOrthography:range:)] pub unsafe fn setOrthography_range( &self, orthography: Option<&NSOrthography>, range: NSRange, ); + #[method_id(orthographyAtIndex:effectiveRange:)] pub unsafe fn orthographyAtIndex_effectiveRange( &self, charIndex: NSUInteger, effectiveRange: NSRangePointer, ) -> Option>; + #[method(stringEditedInRange:changeInLength:)] pub unsafe fn stringEditedInRange_changeInLength( &self, newRange: NSRange, delta: NSInteger, ); + #[method(tokenRangeAtIndex:unit:)] pub unsafe fn tokenRangeAtIndex_unit( &self, charIndex: NSUInteger, unit: NSLinguisticTaggerUnit, ) -> NSRange; + #[method(sentenceRangeForRange:)] pub unsafe fn sentenceRangeForRange(&self, range: NSRange) -> NSRange; + #[method(enumerateTagsInRange:unit:scheme:options:usingBlock:)] pub unsafe fn enumerateTagsInRange_unit_scheme_options_usingBlock( &self, @@ -69,6 +87,7 @@ extern_methods!( options: NSLinguisticTaggerOptions, block: TodoBlock, ); + #[method_id(tagAtIndex:unit:scheme:tokenRange:)] pub unsafe fn tagAtIndex_unit_scheme_tokenRange( &self, @@ -77,6 +96,7 @@ extern_methods!( scheme: &NSLinguisticTagScheme, tokenRange: NSRangePointer, ) -> Option>; + #[method_id(tagsInRange:unit:scheme:options:tokenRanges:)] pub unsafe fn tagsInRange_unit_scheme_options_tokenRanges( &self, @@ -86,6 +106,7 @@ extern_methods!( options: NSLinguisticTaggerOptions, tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared>; + #[method(enumerateTagsInRange:scheme:options:usingBlock:)] pub unsafe fn enumerateTagsInRange_scheme_options_usingBlock( &self, @@ -94,6 +115,7 @@ extern_methods!( opts: NSLinguisticTaggerOptions, block: TodoBlock, ); + #[method_id(tagAtIndex:scheme:tokenRange:sentenceRange:)] pub unsafe fn tagAtIndex_scheme_tokenRange_sentenceRange( &self, @@ -102,6 +124,7 @@ extern_methods!( tokenRange: NSRangePointer, sentenceRange: NSRangePointer, ) -> Option>; + #[method_id(tagsInRange:scheme:options:tokenRanges:)] pub unsafe fn tagsInRange_scheme_options_tokenRanges( &self, @@ -110,10 +133,13 @@ extern_methods!( opts: NSLinguisticTaggerOptions, tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared>; + #[method_id(dominantLanguage)] pub unsafe fn dominantLanguage(&self) -> Option>; + #[method_id(dominantLanguageForString:)] pub unsafe fn dominantLanguageForString(string: &NSString) -> Option>; + #[method_id(tagForString:atIndex:unit:scheme:orthography:tokenRange:)] pub unsafe fn tagForString_atIndex_unit_scheme_orthography_tokenRange( string: &NSString, @@ -123,6 +149,7 @@ extern_methods!( orthography: Option<&NSOrthography>, tokenRange: NSRangePointer, ) -> Option>; + #[method_id(tagsForString:range:unit:scheme:options:orthography:tokenRanges:)] pub unsafe fn tagsForString_range_unit_scheme_options_orthography_tokenRanges( string: &NSString, @@ -133,6 +160,7 @@ extern_methods!( orthography: Option<&NSOrthography>, tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared>; + #[method(enumerateTagsForString:range:unit:scheme:options:orthography:usingBlock:)] pub unsafe fn enumerateTagsForString_range_unit_scheme_options_orthography_usingBlock( string: &NSString, @@ -143,6 +171,7 @@ extern_methods!( orthography: Option<&NSOrthography>, block: TodoBlock, ); + #[method_id(possibleTagsAtIndex:scheme:tokenRange:sentenceRange:scores:)] pub unsafe fn possibleTagsAtIndex_scheme_tokenRange_sentenceRange_scores( &self, @@ -154,8 +183,9 @@ extern_methods!( ) -> Option, Shared>>; } ); + extern_methods!( - #[doc = "NSLinguisticAnalysis"] + /// NSLinguisticAnalysis unsafe impl NSString { #[method_id(linguisticTagsInRange:scheme:options:orthography:tokenRanges:)] pub unsafe fn linguisticTagsInRange_scheme_options_orthography_tokenRanges( @@ -166,6 +196,7 @@ extern_methods!( orthography: Option<&NSOrthography>, tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared>; + #[method(enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:)] pub unsafe fn enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock( &self, diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index 29a30208d..67ec82bac 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -1,30 +1,41 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSListFormatter; + unsafe impl ClassType for NSListFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSListFormatter { #[method_id(locale)] pub unsafe fn locale(&self) -> Id; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(itemFormatter)] pub unsafe fn itemFormatter(&self) -> Option>; + #[method(setItemFormatter:)] pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>); + #[method_id(localizedStringByJoiningStrings:)] pub unsafe fn localizedStringByJoiningStrings( strings: &NSArray, ) -> Id; + #[method_id(stringFromItems:)] pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option>; + #[method_id(stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index ebeb934c8..c5d3bff7e 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -1,173 +1,228 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSLocaleKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSLocale; + unsafe impl ClassType for NSLocale { type Super = NSObject; } ); + extern_methods!( unsafe impl NSLocale { #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, key: &NSLocaleKey) -> Option>; + #[method_id(displayNameForKey:value:)] pub unsafe fn displayNameForKey_value( &self, key: &NSLocaleKey, value: &Object, ) -> Option>; + #[method_id(initWithLocaleIdentifier:)] pub unsafe fn initWithLocaleIdentifier(&self, string: &NSString) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSExtendedLocale"] + /// NSExtendedLocale unsafe impl NSLocale { #[method_id(localeIdentifier)] pub unsafe fn localeIdentifier(&self) -> Id; + #[method_id(localizedStringForLocaleIdentifier:)] pub unsafe fn localizedStringForLocaleIdentifier( &self, localeIdentifier: &NSString, ) -> Id; + #[method_id(languageCode)] pub unsafe fn languageCode(&self) -> Id; + #[method_id(localizedStringForLanguageCode:)] pub unsafe fn localizedStringForLanguageCode( &self, languageCode: &NSString, ) -> Option>; + #[method_id(countryCode)] pub unsafe fn countryCode(&self) -> Option>; + #[method_id(localizedStringForCountryCode:)] pub unsafe fn localizedStringForCountryCode( &self, countryCode: &NSString, ) -> Option>; + #[method_id(scriptCode)] pub unsafe fn scriptCode(&self) -> Option>; + #[method_id(localizedStringForScriptCode:)] pub unsafe fn localizedStringForScriptCode( &self, scriptCode: &NSString, ) -> Option>; + #[method_id(variantCode)] pub unsafe fn variantCode(&self) -> Option>; + #[method_id(localizedStringForVariantCode:)] pub unsafe fn localizedStringForVariantCode( &self, variantCode: &NSString, ) -> Option>; + #[method_id(exemplarCharacterSet)] pub unsafe fn exemplarCharacterSet(&self) -> Id; + #[method_id(calendarIdentifier)] pub unsafe fn calendarIdentifier(&self) -> Id; + #[method_id(localizedStringForCalendarIdentifier:)] pub unsafe fn localizedStringForCalendarIdentifier( &self, calendarIdentifier: &NSString, ) -> Option>; + #[method_id(collationIdentifier)] pub unsafe fn collationIdentifier(&self) -> Option>; + #[method_id(localizedStringForCollationIdentifier:)] pub unsafe fn localizedStringForCollationIdentifier( &self, collationIdentifier: &NSString, ) -> Option>; + #[method(usesMetricSystem)] pub unsafe fn usesMetricSystem(&self) -> bool; + #[method_id(decimalSeparator)] pub unsafe fn decimalSeparator(&self) -> Id; + #[method_id(groupingSeparator)] pub unsafe fn groupingSeparator(&self) -> Id; + #[method_id(currencySymbol)] pub unsafe fn currencySymbol(&self) -> Id; + #[method_id(currencyCode)] pub unsafe fn currencyCode(&self) -> Option>; + #[method_id(localizedStringForCurrencyCode:)] pub unsafe fn localizedStringForCurrencyCode( &self, currencyCode: &NSString, ) -> Option>; + #[method_id(collatorIdentifier)] pub unsafe fn collatorIdentifier(&self) -> Id; + #[method_id(localizedStringForCollatorIdentifier:)] pub unsafe fn localizedStringForCollatorIdentifier( &self, collatorIdentifier: &NSString, ) -> Option>; + #[method_id(quotationBeginDelimiter)] pub unsafe fn quotationBeginDelimiter(&self) -> Id; + #[method_id(quotationEndDelimiter)] pub unsafe fn quotationEndDelimiter(&self) -> Id; + #[method_id(alternateQuotationBeginDelimiter)] pub unsafe fn alternateQuotationBeginDelimiter(&self) -> Id; + #[method_id(alternateQuotationEndDelimiter)] pub unsafe fn alternateQuotationEndDelimiter(&self) -> Id; } ); + extern_methods!( - #[doc = "NSLocaleCreation"] + /// NSLocaleCreation unsafe impl NSLocale { #[method_id(autoupdatingCurrentLocale)] pub unsafe fn autoupdatingCurrentLocale() -> Id; + #[method_id(currentLocale)] pub unsafe fn currentLocale() -> Id; + #[method_id(systemLocale)] pub unsafe fn systemLocale() -> Id; + #[method_id(localeWithLocaleIdentifier:)] pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; } ); + extern_methods!( - #[doc = "NSLocaleGeneralInfo"] + /// NSLocaleGeneralInfo unsafe impl NSLocale { #[method_id(availableLocaleIdentifiers)] pub unsafe fn availableLocaleIdentifiers() -> Id, Shared>; + #[method_id(ISOLanguageCodes)] pub unsafe fn ISOLanguageCodes() -> Id, Shared>; + #[method_id(ISOCountryCodes)] pub unsafe fn ISOCountryCodes() -> Id, Shared>; + #[method_id(ISOCurrencyCodes)] pub unsafe fn ISOCurrencyCodes() -> Id, Shared>; + #[method_id(commonISOCurrencyCodes)] pub unsafe fn commonISOCurrencyCodes() -> Id, Shared>; + #[method_id(preferredLanguages)] pub unsafe fn preferredLanguages() -> Id, Shared>; + #[method_id(componentsFromLocaleIdentifier:)] pub unsafe fn componentsFromLocaleIdentifier( string: &NSString, ) -> Id, Shared>; + #[method_id(localeIdentifierFromComponents:)] pub unsafe fn localeIdentifierFromComponents( dict: &NSDictionary, ) -> Id; + #[method_id(canonicalLocaleIdentifierFromString:)] pub unsafe fn canonicalLocaleIdentifierFromString( string: &NSString, ) -> Id; + #[method_id(canonicalLanguageIdentifierFromString:)] pub unsafe fn canonicalLanguageIdentifierFromString( string: &NSString, ) -> Id; + #[method_id(localeIdentifierFromWindowsLocaleCode:)] pub unsafe fn localeIdentifierFromWindowsLocaleCode( lcid: u32, ) -> Option>; + #[method(windowsLocaleCodeFromLocaleIdentifier:)] pub unsafe fn windowsLocaleCodeFromLocaleIdentifier(localeIdentifier: &NSString) -> u32; + #[method(characterDirectionForLanguage:)] pub unsafe fn characterDirectionForLanguage( isoLangCode: &NSString, ) -> NSLocaleLanguageDirection; + #[method(lineDirectionForLanguage:)] pub unsafe fn lineDirectionForLanguage(isoLangCode: &NSString) -> NSLocaleLanguageDirection; diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index 90d148948..596905456 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -1,100 +1,135 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSLocking = NSObject; + extern_class!( #[derive(Debug)] pub struct NSLock; + unsafe impl ClassType for NSLock { type Super = NSObject; } ); + extern_methods!( unsafe impl NSLock { #[method(tryLock)] pub unsafe fn tryLock(&self) -> bool; + #[method(lockBeforeDate:)] pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); } ); + extern_class!( #[derive(Debug)] pub struct NSConditionLock; + unsafe impl ClassType for NSConditionLock { type Super = NSObject; } ); + extern_methods!( unsafe impl NSConditionLock { #[method_id(initWithCondition:)] pub unsafe fn initWithCondition(&self, condition: NSInteger) -> Id; + #[method(condition)] pub unsafe fn condition(&self) -> NSInteger; + #[method(lockWhenCondition:)] pub unsafe fn lockWhenCondition(&self, condition: NSInteger); + #[method(tryLock)] pub unsafe fn tryLock(&self) -> bool; + #[method(tryLockWhenCondition:)] pub unsafe fn tryLockWhenCondition(&self, condition: NSInteger) -> bool; + #[method(unlockWithCondition:)] pub unsafe fn unlockWithCondition(&self, condition: NSInteger); + #[method(lockBeforeDate:)] pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; + #[method(lockWhenCondition:beforeDate:)] pub unsafe fn lockWhenCondition_beforeDate( &self, condition: NSInteger, limit: &NSDate, ) -> bool; + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); } ); + extern_class!( #[derive(Debug)] pub struct NSRecursiveLock; + unsafe impl ClassType for NSRecursiveLock { type Super = NSObject; } ); + extern_methods!( unsafe impl NSRecursiveLock { #[method(tryLock)] pub unsafe fn tryLock(&self) -> bool; + #[method(lockBeforeDate:)] pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); } ); + extern_class!( #[derive(Debug)] pub struct NSCondition; + unsafe impl ClassType for NSCondition { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCondition { #[method(wait)] pub unsafe fn wait(&self); + #[method(waitUntilDate:)] pub unsafe fn waitUntilDate(&self, limit: &NSDate) -> bool; + #[method(signal)] pub unsafe fn signal(&self); + #[method(broadcast)] pub unsafe fn broadcast(&self); + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); } diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 331afe7a0..3d8033530 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSMapTableOptions = NSUInteger; + __inner_extern_class!( #[derive(Debug)] pub struct NSMapTable; + unsafe impl ClassType for NSMapTable { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMapTable { #[method_id(initWithKeyOptions:valueOptions:capacity:)] @@ -19,6 +25,7 @@ extern_methods!( valueOptions: NSPointerFunctionsOptions, initialCapacity: NSUInteger, ) -> Id; + #[method_id(initWithKeyPointerFunctions:valuePointerFunctions:capacity:)] pub unsafe fn initWithKeyPointerFunctions_valuePointerFunctions_capacity( &self, @@ -26,50 +33,69 @@ extern_methods!( valueFunctions: &NSPointerFunctions, initialCapacity: NSUInteger, ) -> Id; + #[method_id(mapTableWithKeyOptions:valueOptions:)] pub unsafe fn mapTableWithKeyOptions_valueOptions( keyOptions: NSPointerFunctionsOptions, valueOptions: NSPointerFunctionsOptions, ) -> Id, Shared>; + #[method_id(mapTableWithStrongToStrongObjects)] pub unsafe fn mapTableWithStrongToStrongObjects() -> Id; + #[method_id(mapTableWithWeakToStrongObjects)] pub unsafe fn mapTableWithWeakToStrongObjects() -> Id; + #[method_id(mapTableWithStrongToWeakObjects)] pub unsafe fn mapTableWithStrongToWeakObjects() -> Id; + #[method_id(mapTableWithWeakToWeakObjects)] pub unsafe fn mapTableWithWeakToWeakObjects() -> Id; + #[method_id(strongToStrongObjectsMapTable)] pub unsafe fn strongToStrongObjectsMapTable() -> Id, Shared>; + #[method_id(weakToStrongObjectsMapTable)] pub unsafe fn weakToStrongObjectsMapTable() -> Id, Shared>; + #[method_id(strongToWeakObjectsMapTable)] pub unsafe fn strongToWeakObjectsMapTable() -> Id, Shared>; + #[method_id(weakToWeakObjectsMapTable)] pub unsafe fn weakToWeakObjectsMapTable() -> Id, Shared>; + #[method_id(keyPointerFunctions)] pub unsafe fn keyPointerFunctions(&self) -> Id; + #[method_id(valuePointerFunctions)] pub unsafe fn valuePointerFunctions(&self) -> Id; + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, aKey: Option<&KeyType>) -> Option>; + #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, aKey: Option<&KeyType>); + #[method(setObject:forKey:)] pub unsafe fn setObject_forKey( &self, anObject: Option<&ObjectType>, aKey: Option<&KeyType>, ); + #[method(count)] pub unsafe fn count(&self) -> NSUInteger; + #[method_id(keyEnumerator)] pub unsafe fn keyEnumerator(&self) -> Id, Shared>; + #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Option, Shared>>; + #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); + #[method_id(dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation( &self, diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 557f2f0bf..53f3ddf1c 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -1,51 +1,66 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMassFormatter; + unsafe impl ClassType for NSMassFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSMassFormatter { #[method_id(numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; + #[method(setNumberFormatter:)] pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); + #[method(unitStyle)] pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; + #[method(setUnitStyle:)] pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); + #[method(isForPersonMassUse)] pub unsafe fn isForPersonMassUse(&self) -> bool; + #[method(setForPersonMassUse:)] pub unsafe fn setForPersonMassUse(&self, forPersonMassUse: bool); + #[method_id(stringFromValue:unit:)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSMassFormatterUnit, ) -> Id; + #[method_id(stringFromKilograms:)] pub unsafe fn stringFromKilograms( &self, numberInKilograms: c_double, ) -> Id; + #[method_id(unitStringFromValue:unit:)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSMassFormatterUnit, ) -> Id; + #[method_id(unitStringFromKilograms:usedUnit:)] pub unsafe fn unitStringFromKilograms_usedUnit( &self, numberInKilograms: c_double, unitp: *mut NSMassFormatterUnit, ) -> Id; + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index c2dd7f83d..1fe9bf72b 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -1,40 +1,52 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSMeasurement; + unsafe impl ClassType for NSMeasurement { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMeasurement { #[method_id(unit)] pub unsafe fn unit(&self) -> Id; + #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithDoubleValue:unit:)] pub unsafe fn initWithDoubleValue_unit( &self, doubleValue: c_double, unit: &UnitType, ) -> Id; + #[method(canBeConvertedToUnit:)] pub unsafe fn canBeConvertedToUnit(&self, unit: &NSUnit) -> bool; + #[method_id(measurementByConvertingToUnit:)] pub unsafe fn measurementByConvertingToUnit( &self, unit: &NSUnit, ) -> Id; + #[method_id(measurementByAddingMeasurement:)] pub unsafe fn measurementByAddingMeasurement( &self, measurement: &NSMeasurement, ) -> Id, Shared>; + #[method_id(measurementBySubtractingMeasurement:)] pub unsafe fn measurementBySubtractingMeasurement( &self, diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 8fa7ebb77..ec0648043 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -1,37 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMeasurementFormatter; + unsafe impl ClassType for NSMeasurementFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSMeasurementFormatter { #[method(unitOptions)] pub unsafe fn unitOptions(&self) -> NSMeasurementFormatterUnitOptions; + #[method(setUnitOptions:)] pub unsafe fn setUnitOptions(&self, unitOptions: NSMeasurementFormatterUnitOptions); + #[method(unitStyle)] pub unsafe fn unitStyle(&self) -> NSFormattingUnitStyle; + #[method(setUnitStyle:)] pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); + #[method_id(locale)] pub unsafe fn locale(&self) -> Id; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; + #[method(setNumberFormatter:)] pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); + #[method_id(stringFromMeasurement:)] pub unsafe fn stringFromMeasurement( &self, measurement: &NSMeasurement, ) -> Id; + #[method_id(stringFromUnit:)] pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index e041166cd..35f4bd84b 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -1,91 +1,129 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMetadataQuery; + unsafe impl ClassType for NSMetadataQuery { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMetadataQuery { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSMetadataQueryDelegate>); + #[method_id(predicate)] pub unsafe fn predicate(&self) -> Option>; + #[method(setPredicate:)] pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>); + #[method_id(sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id, Shared>; + #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); + #[method_id(valueListAttributes)] pub unsafe fn valueListAttributes(&self) -> Id, Shared>; + #[method(setValueListAttributes:)] pub unsafe fn setValueListAttributes(&self, valueListAttributes: &NSArray); + #[method_id(groupingAttributes)] pub unsafe fn groupingAttributes(&self) -> Option, Shared>>; + #[method(setGroupingAttributes:)] pub unsafe fn setGroupingAttributes(&self, groupingAttributes: Option<&NSArray>); + #[method(notificationBatchingInterval)] pub unsafe fn notificationBatchingInterval(&self) -> NSTimeInterval; + #[method(setNotificationBatchingInterval:)] pub unsafe fn setNotificationBatchingInterval( &self, notificationBatchingInterval: NSTimeInterval, ); + #[method_id(searchScopes)] pub unsafe fn searchScopes(&self) -> Id; + #[method(setSearchScopes:)] pub unsafe fn setSearchScopes(&self, searchScopes: &NSArray); + #[method_id(searchItems)] pub unsafe fn searchItems(&self) -> Option>; + #[method(setSearchItems:)] pub unsafe fn setSearchItems(&self, searchItems: Option<&NSArray>); + #[method_id(operationQueue)] pub unsafe fn operationQueue(&self) -> Option>; + #[method(setOperationQueue:)] pub unsafe fn setOperationQueue(&self, operationQueue: Option<&NSOperationQueue>); + #[method(startQuery)] pub unsafe fn startQuery(&self) -> bool; + #[method(stopQuery)] pub unsafe fn stopQuery(&self); + #[method(isStarted)] pub unsafe fn isStarted(&self) -> bool; + #[method(isGathering)] pub unsafe fn isGathering(&self) -> bool; + #[method(isStopped)] pub unsafe fn isStopped(&self) -> bool; + #[method(disableUpdates)] pub unsafe fn disableUpdates(&self); + #[method(enableUpdates)] pub unsafe fn enableUpdates(&self); + #[method(resultCount)] pub unsafe fn resultCount(&self) -> NSUInteger; + #[method_id(resultAtIndex:)] pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; + #[method(enumerateResultsUsingBlock:)] pub unsafe fn enumerateResultsUsingBlock(&self, block: TodoBlock); + #[method(enumerateResultsWithOptions:usingBlock:)] pub unsafe fn enumerateResultsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); + #[method_id(results)] pub unsafe fn results(&self) -> Id; + #[method(indexOfResult:)] pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger; + #[method_id(valueLists)] pub unsafe fn valueLists( &self, ) -> Id>, Shared>; + #[method_id(groupedResults)] pub unsafe fn groupedResults(&self) -> Id, Shared>; + #[method_id(valueOfAttribute:forResultAtIndex:)] pub unsafe fn valueOfAttribute_forResultAtIndex( &self, @@ -94,65 +132,85 @@ extern_methods!( ) -> Option>; } ); + pub type NSMetadataQueryDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSMetadataItem; + unsafe impl ClassType for NSMetadataItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMetadataItem { #[method_id(initWithURL:)] pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; + #[method_id(valueForAttribute:)] pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option>; + #[method_id(valuesForAttributes:)] pub unsafe fn valuesForAttributes( &self, keys: &NSArray, ) -> Option, Shared>>; + #[method_id(attributes)] pub unsafe fn attributes(&self) -> Id, Shared>; } ); + extern_class!( #[derive(Debug)] pub struct NSMetadataQueryAttributeValueTuple; + unsafe impl ClassType for NSMetadataQueryAttributeValueTuple { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMetadataQueryAttributeValueTuple { #[method_id(attribute)] pub unsafe fn attribute(&self) -> Id; + #[method_id(value)] pub unsafe fn value(&self) -> Option>; + #[method(count)] pub unsafe fn count(&self) -> NSUInteger; } ); + extern_class!( #[derive(Debug)] pub struct NSMetadataQueryResultGroup; + unsafe impl ClassType for NSMetadataQueryResultGroup { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMetadataQueryResultGroup { #[method_id(attribute)] pub unsafe fn attribute(&self) -> Id; + #[method_id(value)] pub unsafe fn value(&self) -> Id; + #[method_id(subgroups)] pub unsafe fn subgroups(&self) -> Option, Shared>>; + #[method(resultCount)] pub unsafe fn resultCount(&self) -> NSUInteger; + #[method_id(resultAtIndex:)] pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; + #[method_id(results)] pub unsafe fn results(&self) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index 4057e00ba..63da8dfd3 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -1,30 +1,41 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMethodSignature; + unsafe impl ClassType for NSMethodSignature { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMethodSignature { #[method_id(signatureWithObjCTypes:)] pub unsafe fn signatureWithObjCTypes( types: NonNull, ) -> Option>; + #[method(numberOfArguments)] pub unsafe fn numberOfArguments(&self) -> NSUInteger; + #[method(getArgumentTypeAtIndex:)] pub unsafe fn getArgumentTypeAtIndex(&self, idx: NSUInteger) -> NonNull; + #[method(frameLength)] pub unsafe fn frameLength(&self) -> NSUInteger; + #[method(isOneway)] pub unsafe fn isOneway(&self) -> bool; + #[method(methodReturnType)] pub unsafe fn methodReturnType(&self) -> NonNull; + #[method(methodReturnLength)] pub unsafe fn methodReturnLength(&self) -> NSUInteger; } diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index 4d8327e82..aeed366bd 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -1,38 +1,50 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSMorphology; + unsafe impl ClassType for NSMorphology { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMorphology { #[method(grammaticalGender)] pub unsafe fn grammaticalGender(&self) -> NSGrammaticalGender; + #[method(setGrammaticalGender:)] pub unsafe fn setGrammaticalGender(&self, grammaticalGender: NSGrammaticalGender); + #[method(partOfSpeech)] pub unsafe fn partOfSpeech(&self) -> NSGrammaticalPartOfSpeech; + #[method(setPartOfSpeech:)] pub unsafe fn setPartOfSpeech(&self, partOfSpeech: NSGrammaticalPartOfSpeech); + #[method(number)] pub unsafe fn number(&self) -> NSGrammaticalNumber; + #[method(setNumber:)] pub unsafe fn setNumber(&self, number: NSGrammaticalNumber); } ); + extern_methods!( - #[doc = "NSCustomPronouns"] + /// NSCustomPronouns unsafe impl NSMorphology { #[method_id(customPronounForLanguage:)] pub unsafe fn customPronounForLanguage( &self, language: &NSString, ) -> Option>; + #[method(setCustomPronoun:forLanguage:error:)] pub unsafe fn setCustomPronoun_forLanguage_error( &self, @@ -41,47 +53,63 @@ extern_methods!( ) -> Result<(), Id>; } ); + extern_class!( #[derive(Debug)] pub struct NSMorphologyCustomPronoun; + unsafe impl ClassType for NSMorphologyCustomPronoun { type Super = NSObject; } ); + extern_methods!( unsafe impl NSMorphologyCustomPronoun { #[method(isSupportedForLanguage:)] pub unsafe fn isSupportedForLanguage(language: &NSString) -> bool; + #[method_id(requiredKeysForLanguage:)] pub unsafe fn requiredKeysForLanguage(language: &NSString) -> Id, Shared>; + #[method_id(subjectForm)] pub unsafe fn subjectForm(&self) -> Option>; + #[method(setSubjectForm:)] pub unsafe fn setSubjectForm(&self, subjectForm: Option<&NSString>); + #[method_id(objectForm)] pub unsafe fn objectForm(&self) -> Option>; + #[method(setObjectForm:)] pub unsafe fn setObjectForm(&self, objectForm: Option<&NSString>); + #[method_id(possessiveForm)] pub unsafe fn possessiveForm(&self) -> Option>; + #[method(setPossessiveForm:)] pub unsafe fn setPossessiveForm(&self, possessiveForm: Option<&NSString>); + #[method_id(possessiveAdjectiveForm)] pub unsafe fn possessiveAdjectiveForm(&self) -> Option>; + #[method(setPossessiveAdjectiveForm:)] pub unsafe fn setPossessiveAdjectiveForm(&self, possessiveAdjectiveForm: Option<&NSString>); + #[method_id(reflexiveForm)] pub unsafe fn reflexiveForm(&self) -> Option>; + #[method(setReflexiveForm:)] pub unsafe fn setReflexiveForm(&self, reflexiveForm: Option<&NSString>); } ); + extern_methods!( - #[doc = "NSMorphologyUserSettings"] + /// NSMorphologyUserSettings unsafe impl NSMorphology { #[method(isUnspecified)] pub unsafe fn isUnspecified(&self) -> bool; + #[method_id(userMorphology)] pub unsafe fn userMorphology() -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 78b132241..c13b24edd 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSNetService; + unsafe impl ClassType for NSNetService { type Super = NSObject; } ); + extern_methods!( unsafe impl NSNetService { #[method_id(initWithDomain:type:name:port:)] @@ -19,6 +24,7 @@ extern_methods!( name: &NSString, port: c_int, ) -> Id; + #[method_id(initWithDomain:type:name:)] pub unsafe fn initWithDomain_type_name( &self, @@ -26,94 +32,132 @@ extern_methods!( type_: &NSString, name: &NSString, ) -> Id; + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceDelegate>); + #[method(includesPeerToPeer)] pub unsafe fn includesPeerToPeer(&self) -> bool; + #[method(setIncludesPeerToPeer:)] pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool); + #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method_id(type)] pub unsafe fn type_(&self) -> Id; + #[method_id(domain)] pub unsafe fn domain(&self) -> Id; + #[method_id(hostName)] pub unsafe fn hostName(&self) -> Option>; + #[method_id(addresses)] pub unsafe fn addresses(&self) -> Option, Shared>>; + #[method(port)] pub unsafe fn port(&self) -> NSInteger; + #[method(publish)] pub unsafe fn publish(&self); + #[method(publishWithOptions:)] pub unsafe fn publishWithOptions(&self, options: NSNetServiceOptions); + #[method(resolve)] pub unsafe fn resolve(&self); + #[method(stop)] pub unsafe fn stop(&self); + #[method_id(dictionaryFromTXTRecordData:)] pub unsafe fn dictionaryFromTXTRecordData( txtData: &NSData, ) -> Id, Shared>; + #[method_id(dataFromTXTRecordDictionary:)] pub unsafe fn dataFromTXTRecordDictionary( txtDictionary: &NSDictionary, ) -> Id; + #[method(resolveWithTimeout:)] pub unsafe fn resolveWithTimeout(&self, timeout: NSTimeInterval); + #[method(setTXTRecordData:)] pub unsafe fn setTXTRecordData(&self, recordData: Option<&NSData>) -> bool; + #[method_id(TXTRecordData)] pub unsafe fn TXTRecordData(&self) -> Option>; + #[method(startMonitoring)] pub unsafe fn startMonitoring(&self); + #[method(stopMonitoring)] pub unsafe fn stopMonitoring(&self); } ); + extern_class!( #[derive(Debug)] pub struct NSNetServiceBrowser; + unsafe impl ClassType for NSNetServiceBrowser { type Super = NSObject; } ); + extern_methods!( unsafe impl NSNetServiceBrowser { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSNetServiceBrowserDelegate>); + #[method(includesPeerToPeer)] pub unsafe fn includesPeerToPeer(&self) -> bool; + #[method(setIncludesPeerToPeer:)] pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool); + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(searchForBrowsableDomains)] pub unsafe fn searchForBrowsableDomains(&self); + #[method(searchForRegistrationDomains)] pub unsafe fn searchForRegistrationDomains(&self); + #[method(searchForServicesOfType:inDomain:)] pub unsafe fn searchForServicesOfType_inDomain( &self, type_: &NSString, domainString: &NSString, ); + #[method(stop)] pub unsafe fn stop(&self); } ); + pub type NSNetServiceDelegate = NSObject; + pub type NSNetServiceBrowserDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index f2f1dcd59..d7ba5715b 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -1,23 +1,32 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSNotificationName = NSString; + extern_class!( #[derive(Debug)] pub struct NSNotification; + unsafe impl ClassType for NSNotification { type Super = NSObject; } ); + extern_methods!( unsafe impl NSNotification { #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method_id(object)] pub unsafe fn object(&self) -> Option>; + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; + #[method_id(initWithName:object:userInfo:)] pub unsafe fn initWithName_object_userInfo( &self, @@ -25,39 +34,47 @@ extern_methods!( object: Option<&Object>, userInfo: Option<&NSDictionary>, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSNotificationCreation"] + /// NSNotificationCreation unsafe impl NSNotification { #[method_id(notificationWithName:object:)] pub unsafe fn notificationWithName_object( aName: &NSNotificationName, anObject: Option<&Object>, ) -> Id; + #[method_id(notificationWithName:object:userInfo:)] pub unsafe fn notificationWithName_object_userInfo( aName: &NSNotificationName, anObject: Option<&Object>, aUserInfo: Option<&NSDictionary>, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSNotificationCenter; + unsafe impl ClassType for NSNotificationCenter { type Super = NSObject; } ); + extern_methods!( unsafe impl NSNotificationCenter { #[method_id(defaultCenter)] pub unsafe fn defaultCenter() -> Id; + #[method(addObserver:selector:name:object:)] pub unsafe fn addObserver_selector_name_object( &self, @@ -66,14 +83,17 @@ extern_methods!( aName: Option<&NSNotificationName>, anObject: Option<&Object>, ); + #[method(postNotification:)] pub unsafe fn postNotification(&self, notification: &NSNotification); + #[method(postNotificationName:object:)] pub unsafe fn postNotificationName_object( &self, aName: &NSNotificationName, anObject: Option<&Object>, ); + #[method(postNotificationName:object:userInfo:)] pub unsafe fn postNotificationName_object_userInfo( &self, @@ -81,8 +101,10 @@ extern_methods!( anObject: Option<&Object>, aUserInfo: Option<&NSDictionary>, ); + #[method(removeObserver:)] pub unsafe fn removeObserver(&self, observer: &Object); + #[method(removeObserver:name:object:)] pub unsafe fn removeObserver_name_object( &self, @@ -90,6 +112,7 @@ extern_methods!( aName: Option<&NSNotificationName>, anObject: Option<&Object>, ); + #[method_id(addObserverForName:object:queue:usingBlock:)] pub unsafe fn addObserverForName_object_queue_usingBlock( &self, diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index e203dc5d8..4a4f5db80 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -1,29 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSNotificationQueue; + unsafe impl ClassType for NSNotificationQueue { type Super = NSObject; } ); + extern_methods!( unsafe impl NSNotificationQueue { #[method_id(defaultQueue)] pub unsafe fn defaultQueue() -> Id; + #[method_id(initWithNotificationCenter:)] pub unsafe fn initWithNotificationCenter( &self, notificationCenter: &NSNotificationCenter, ) -> Id; + #[method(enqueueNotification:postingStyle:)] pub unsafe fn enqueueNotification_postingStyle( &self, notification: &NSNotification, postingStyle: NSPostingStyle, ); + #[method(enqueueNotification:postingStyle:coalesceMask:forModes:)] pub unsafe fn enqueueNotification_postingStyle_coalesceMask_forModes( &self, @@ -32,6 +40,7 @@ extern_methods!( coalesceMask: NSNotificationCoalescing, modes: Option<&NSArray>, ); + #[method(dequeueNotificationsMatching:coalesceMask:)] pub unsafe fn dequeueNotificationsMatching_coalesceMask( &self, diff --git a/crates/icrate/src/generated/Foundation/NSNull.rs b/crates/icrate/src/generated/Foundation/NSNull.rs index b572a3a8b..3e59f4da6 100644 --- a/crates/icrate/src/generated/Foundation/NSNull.rs +++ b/crates/icrate/src/generated/Foundation/NSNull.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSNull; + unsafe impl ClassType for NSNull { type Super = NSObject; } ); + extern_methods!( unsafe impl NSNull { #[method_id(null)] diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index d44c520d7..654e53cf3 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -1,20 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSNumberFormatter; + unsafe impl ClassType for NSNumberFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSNumberFormatter { #[method(formattingContext)] pub unsafe fn formattingContext(&self) -> NSFormattingContext; + #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); + #[method(getObjectValue:forString:range:error:)] pub unsafe fn getObjectValue_forString_range_error( &self, @@ -22,285 +29,402 @@ extern_methods!( string: &NSString, rangep: *mut NSRange, ) -> Result<(), Id>; + #[method_id(stringFromNumber:)] pub unsafe fn stringFromNumber(&self, number: &NSNumber) -> Option>; + #[method_id(numberFromString:)] pub unsafe fn numberFromString(&self, string: &NSString) -> Option>; + #[method_id(localizedStringFromNumber:numberStyle:)] pub unsafe fn localizedStringFromNumber_numberStyle( num: &NSNumber, nstyle: NSNumberFormatterStyle, ) -> Id; + #[method(defaultFormatterBehavior)] pub unsafe fn defaultFormatterBehavior() -> NSNumberFormatterBehavior; + #[method(setDefaultFormatterBehavior:)] pub unsafe fn setDefaultFormatterBehavior(behavior: NSNumberFormatterBehavior); + #[method(numberStyle)] pub unsafe fn numberStyle(&self) -> NSNumberFormatterStyle; + #[method(setNumberStyle:)] pub unsafe fn setNumberStyle(&self, numberStyle: NSNumberFormatterStyle); + #[method_id(locale)] pub unsafe fn locale(&self) -> Id; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method(generatesDecimalNumbers)] pub unsafe fn generatesDecimalNumbers(&self) -> bool; + #[method(setGeneratesDecimalNumbers:)] pub unsafe fn setGeneratesDecimalNumbers(&self, generatesDecimalNumbers: bool); + #[method(formatterBehavior)] pub unsafe fn formatterBehavior(&self) -> NSNumberFormatterBehavior; + #[method(setFormatterBehavior:)] pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSNumberFormatterBehavior); + #[method_id(negativeFormat)] pub unsafe fn negativeFormat(&self) -> Id; + #[method(setNegativeFormat:)] pub unsafe fn setNegativeFormat(&self, negativeFormat: Option<&NSString>); + #[method_id(textAttributesForNegativeValues)] pub unsafe fn textAttributesForNegativeValues( &self, ) -> Option, Shared>>; + #[method(setTextAttributesForNegativeValues:)] pub unsafe fn setTextAttributesForNegativeValues( &self, textAttributesForNegativeValues: Option<&NSDictionary>, ); + #[method_id(positiveFormat)] pub unsafe fn positiveFormat(&self) -> Id; + #[method(setPositiveFormat:)] pub unsafe fn setPositiveFormat(&self, positiveFormat: Option<&NSString>); + #[method_id(textAttributesForPositiveValues)] pub unsafe fn textAttributesForPositiveValues( &self, ) -> Option, Shared>>; + #[method(setTextAttributesForPositiveValues:)] pub unsafe fn setTextAttributesForPositiveValues( &self, textAttributesForPositiveValues: Option<&NSDictionary>, ); + #[method(allowsFloats)] pub unsafe fn allowsFloats(&self) -> bool; + #[method(setAllowsFloats:)] pub unsafe fn setAllowsFloats(&self, allowsFloats: bool); + #[method_id(decimalSeparator)] pub unsafe fn decimalSeparator(&self) -> Id; + #[method(setDecimalSeparator:)] pub unsafe fn setDecimalSeparator(&self, decimalSeparator: Option<&NSString>); + #[method(alwaysShowsDecimalSeparator)] pub unsafe fn alwaysShowsDecimalSeparator(&self) -> bool; + #[method(setAlwaysShowsDecimalSeparator:)] pub unsafe fn setAlwaysShowsDecimalSeparator(&self, alwaysShowsDecimalSeparator: bool); + #[method_id(currencyDecimalSeparator)] pub unsafe fn currencyDecimalSeparator(&self) -> Id; + #[method(setCurrencyDecimalSeparator:)] pub unsafe fn setCurrencyDecimalSeparator( &self, currencyDecimalSeparator: Option<&NSString>, ); + #[method(usesGroupingSeparator)] pub unsafe fn usesGroupingSeparator(&self) -> bool; + #[method(setUsesGroupingSeparator:)] pub unsafe fn setUsesGroupingSeparator(&self, usesGroupingSeparator: bool); + #[method_id(groupingSeparator)] pub unsafe fn groupingSeparator(&self) -> Id; + #[method(setGroupingSeparator:)] pub unsafe fn setGroupingSeparator(&self, groupingSeparator: Option<&NSString>); + #[method_id(zeroSymbol)] pub unsafe fn zeroSymbol(&self) -> Option>; + #[method(setZeroSymbol:)] pub unsafe fn setZeroSymbol(&self, zeroSymbol: Option<&NSString>); + #[method_id(textAttributesForZero)] pub unsafe fn textAttributesForZero( &self, ) -> Option, Shared>>; + #[method(setTextAttributesForZero:)] pub unsafe fn setTextAttributesForZero( &self, textAttributesForZero: Option<&NSDictionary>, ); + #[method_id(nilSymbol)] pub unsafe fn nilSymbol(&self) -> Id; + #[method(setNilSymbol:)] pub unsafe fn setNilSymbol(&self, nilSymbol: &NSString); + #[method_id(textAttributesForNil)] pub unsafe fn textAttributesForNil( &self, ) -> Option, Shared>>; + #[method(setTextAttributesForNil:)] pub unsafe fn setTextAttributesForNil( &self, textAttributesForNil: Option<&NSDictionary>, ); + #[method_id(notANumberSymbol)] pub unsafe fn notANumberSymbol(&self) -> Id; + #[method(setNotANumberSymbol:)] pub unsafe fn setNotANumberSymbol(&self, notANumberSymbol: Option<&NSString>); + #[method_id(textAttributesForNotANumber)] pub unsafe fn textAttributesForNotANumber( &self, ) -> Option, Shared>>; + #[method(setTextAttributesForNotANumber:)] pub unsafe fn setTextAttributesForNotANumber( &self, textAttributesForNotANumber: Option<&NSDictionary>, ); + #[method_id(positiveInfinitySymbol)] pub unsafe fn positiveInfinitySymbol(&self) -> Id; + #[method(setPositiveInfinitySymbol:)] pub unsafe fn setPositiveInfinitySymbol(&self, positiveInfinitySymbol: &NSString); + #[method_id(textAttributesForPositiveInfinity)] pub unsafe fn textAttributesForPositiveInfinity( &self, ) -> Option, Shared>>; + #[method(setTextAttributesForPositiveInfinity:)] pub unsafe fn setTextAttributesForPositiveInfinity( &self, textAttributesForPositiveInfinity: Option<&NSDictionary>, ); + #[method_id(negativeInfinitySymbol)] pub unsafe fn negativeInfinitySymbol(&self) -> Id; + #[method(setNegativeInfinitySymbol:)] pub unsafe fn setNegativeInfinitySymbol(&self, negativeInfinitySymbol: &NSString); + #[method_id(textAttributesForNegativeInfinity)] pub unsafe fn textAttributesForNegativeInfinity( &self, ) -> Option, Shared>>; + #[method(setTextAttributesForNegativeInfinity:)] pub unsafe fn setTextAttributesForNegativeInfinity( &self, textAttributesForNegativeInfinity: Option<&NSDictionary>, ); + #[method_id(positivePrefix)] pub unsafe fn positivePrefix(&self) -> Id; + #[method(setPositivePrefix:)] pub unsafe fn setPositivePrefix(&self, positivePrefix: Option<&NSString>); + #[method_id(positiveSuffix)] pub unsafe fn positiveSuffix(&self) -> Id; + #[method(setPositiveSuffix:)] pub unsafe fn setPositiveSuffix(&self, positiveSuffix: Option<&NSString>); + #[method_id(negativePrefix)] pub unsafe fn negativePrefix(&self) -> Id; + #[method(setNegativePrefix:)] pub unsafe fn setNegativePrefix(&self, negativePrefix: Option<&NSString>); + #[method_id(negativeSuffix)] pub unsafe fn negativeSuffix(&self) -> Id; + #[method(setNegativeSuffix:)] pub unsafe fn setNegativeSuffix(&self, negativeSuffix: Option<&NSString>); + #[method_id(currencyCode)] pub unsafe fn currencyCode(&self) -> Id; + #[method(setCurrencyCode:)] pub unsafe fn setCurrencyCode(&self, currencyCode: Option<&NSString>); + #[method_id(currencySymbol)] pub unsafe fn currencySymbol(&self) -> Id; + #[method(setCurrencySymbol:)] pub unsafe fn setCurrencySymbol(&self, currencySymbol: Option<&NSString>); + #[method_id(internationalCurrencySymbol)] pub unsafe fn internationalCurrencySymbol(&self) -> Id; + #[method(setInternationalCurrencySymbol:)] pub unsafe fn setInternationalCurrencySymbol( &self, internationalCurrencySymbol: Option<&NSString>, ); + #[method_id(percentSymbol)] pub unsafe fn percentSymbol(&self) -> Id; + #[method(setPercentSymbol:)] pub unsafe fn setPercentSymbol(&self, percentSymbol: Option<&NSString>); + #[method_id(perMillSymbol)] pub unsafe fn perMillSymbol(&self) -> Id; + #[method(setPerMillSymbol:)] pub unsafe fn setPerMillSymbol(&self, perMillSymbol: Option<&NSString>); + #[method_id(minusSign)] pub unsafe fn minusSign(&self) -> Id; + #[method(setMinusSign:)] pub unsafe fn setMinusSign(&self, minusSign: Option<&NSString>); + #[method_id(plusSign)] pub unsafe fn plusSign(&self) -> Id; + #[method(setPlusSign:)] pub unsafe fn setPlusSign(&self, plusSign: Option<&NSString>); + #[method_id(exponentSymbol)] pub unsafe fn exponentSymbol(&self) -> Id; + #[method(setExponentSymbol:)] pub unsafe fn setExponentSymbol(&self, exponentSymbol: Option<&NSString>); + #[method(groupingSize)] pub unsafe fn groupingSize(&self) -> NSUInteger; + #[method(setGroupingSize:)] pub unsafe fn setGroupingSize(&self, groupingSize: NSUInteger); + #[method(secondaryGroupingSize)] pub unsafe fn secondaryGroupingSize(&self) -> NSUInteger; + #[method(setSecondaryGroupingSize:)] pub unsafe fn setSecondaryGroupingSize(&self, secondaryGroupingSize: NSUInteger); + #[method_id(multiplier)] pub unsafe fn multiplier(&self) -> Option>; + #[method(setMultiplier:)] pub unsafe fn setMultiplier(&self, multiplier: Option<&NSNumber>); + #[method(formatWidth)] pub unsafe fn formatWidth(&self) -> NSUInteger; + #[method(setFormatWidth:)] pub unsafe fn setFormatWidth(&self, formatWidth: NSUInteger); + #[method_id(paddingCharacter)] pub unsafe fn paddingCharacter(&self) -> Id; + #[method(setPaddingCharacter:)] pub unsafe fn setPaddingCharacter(&self, paddingCharacter: Option<&NSString>); + #[method(paddingPosition)] pub unsafe fn paddingPosition(&self) -> NSNumberFormatterPadPosition; + #[method(setPaddingPosition:)] pub unsafe fn setPaddingPosition(&self, paddingPosition: NSNumberFormatterPadPosition); + #[method(roundingMode)] pub unsafe fn roundingMode(&self) -> NSNumberFormatterRoundingMode; + #[method(setRoundingMode:)] pub unsafe fn setRoundingMode(&self, roundingMode: NSNumberFormatterRoundingMode); + #[method_id(roundingIncrement)] pub unsafe fn roundingIncrement(&self) -> Id; + #[method(setRoundingIncrement:)] pub unsafe fn setRoundingIncrement(&self, roundingIncrement: Option<&NSNumber>); + #[method(minimumIntegerDigits)] pub unsafe fn minimumIntegerDigits(&self) -> NSUInteger; + #[method(setMinimumIntegerDigits:)] pub unsafe fn setMinimumIntegerDigits(&self, minimumIntegerDigits: NSUInteger); + #[method(maximumIntegerDigits)] pub unsafe fn maximumIntegerDigits(&self) -> NSUInteger; + #[method(setMaximumIntegerDigits:)] pub unsafe fn setMaximumIntegerDigits(&self, maximumIntegerDigits: NSUInteger); + #[method(minimumFractionDigits)] pub unsafe fn minimumFractionDigits(&self) -> NSUInteger; + #[method(setMinimumFractionDigits:)] pub unsafe fn setMinimumFractionDigits(&self, minimumFractionDigits: NSUInteger); + #[method(maximumFractionDigits)] pub unsafe fn maximumFractionDigits(&self) -> NSUInteger; + #[method(setMaximumFractionDigits:)] pub unsafe fn setMaximumFractionDigits(&self, maximumFractionDigits: NSUInteger); + #[method_id(minimum)] pub unsafe fn minimum(&self) -> Option>; + #[method(setMinimum:)] pub unsafe fn setMinimum(&self, minimum: Option<&NSNumber>); + #[method_id(maximum)] pub unsafe fn maximum(&self) -> Option>; + #[method(setMaximum:)] pub unsafe fn setMaximum(&self, maximum: Option<&NSNumber>); + #[method_id(currencyGroupingSeparator)] pub unsafe fn currencyGroupingSeparator(&self) -> Id; + #[method(setCurrencyGroupingSeparator:)] pub unsafe fn setCurrencyGroupingSeparator( &self, currencyGroupingSeparator: Option<&NSString>, ); + #[method(isLenient)] pub unsafe fn isLenient(&self) -> bool; + #[method(setLenient:)] pub unsafe fn setLenient(&self, lenient: bool); + #[method(usesSignificantDigits)] pub unsafe fn usesSignificantDigits(&self) -> bool; + #[method(setUsesSignificantDigits:)] pub unsafe fn setUsesSignificantDigits(&self, usesSignificantDigits: bool); + #[method(minimumSignificantDigits)] pub unsafe fn minimumSignificantDigits(&self) -> NSUInteger; + #[method(setMinimumSignificantDigits:)] pub unsafe fn setMinimumSignificantDigits(&self, minimumSignificantDigits: NSUInteger); + #[method(maximumSignificantDigits)] pub unsafe fn maximumSignificantDigits(&self) -> NSUInteger; + #[method(setMaximumSignificantDigits:)] pub unsafe fn setMaximumSignificantDigits(&self, maximumSignificantDigits: NSUInteger); + #[method(isPartialStringValidationEnabled)] pub unsafe fn isPartialStringValidationEnabled(&self) -> bool; + #[method(setPartialStringValidationEnabled:)] pub unsafe fn setPartialStringValidationEnabled( &self, @@ -308,45 +432,61 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSNumberFormatterCompatibility"] + /// NSNumberFormatterCompatibility unsafe impl NSNumberFormatter { #[method(hasThousandSeparators)] pub unsafe fn hasThousandSeparators(&self) -> bool; + #[method(setHasThousandSeparators:)] pub unsafe fn setHasThousandSeparators(&self, hasThousandSeparators: bool); + #[method_id(thousandSeparator)] pub unsafe fn thousandSeparator(&self) -> Id; + #[method(setThousandSeparator:)] pub unsafe fn setThousandSeparator(&self, thousandSeparator: Option<&NSString>); + #[method(localizesFormat)] pub unsafe fn localizesFormat(&self) -> bool; + #[method(setLocalizesFormat:)] pub unsafe fn setLocalizesFormat(&self, localizesFormat: bool); + #[method_id(format)] pub unsafe fn format(&self) -> Id; + #[method(setFormat:)] pub unsafe fn setFormat(&self, format: &NSString); + #[method_id(attributedStringForZero)] pub unsafe fn attributedStringForZero(&self) -> Id; + #[method(setAttributedStringForZero:)] pub unsafe fn setAttributedStringForZero( &self, attributedStringForZero: &NSAttributedString, ); + #[method_id(attributedStringForNil)] pub unsafe fn attributedStringForNil(&self) -> Id; + #[method(setAttributedStringForNil:)] pub unsafe fn setAttributedStringForNil(&self, attributedStringForNil: &NSAttributedString); + #[method_id(attributedStringForNotANumber)] pub unsafe fn attributedStringForNotANumber(&self) -> Id; + #[method(setAttributedStringForNotANumber:)] pub unsafe fn setAttributedStringForNotANumber( &self, attributedStringForNotANumber: &NSAttributedString, ); + #[method_id(roundingBehavior)] pub unsafe fn roundingBehavior(&self) -> Id; + #[method(setRoundingBehavior:)] pub unsafe fn setRoundingBehavior(&self, roundingBehavior: &NSDecimalNumberHandler); } diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 6cfe01616..a392649a2 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -1,6 +1,10 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSExceptionName = NSString; + pub type NSRunLoopMode = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index cab2d5434..f48e020f7 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -1,20 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSCopying = NSObject; + pub type NSMutableCopying = NSObject; + pub type NSCoding = NSObject; + pub type NSSecureCoding = NSObject; + extern_methods!( - #[doc = "NSCoderMethods"] + /// NSCoderMethods unsafe impl NSObject { #[method(version)] pub unsafe fn version() -> NSInteger; + #[method(setVersion:)] pub unsafe fn setVersion(aVersion: NSInteger); + #[method(classForCoder)] pub unsafe fn classForCoder(&self) -> &Class; + #[method_id(replacementObjectForCoder:)] pub unsafe fn replacementObjectForCoder( &self, @@ -22,16 +32,19 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSDeprecatedMethods"] + /// NSDeprecatedMethods unsafe impl NSObject { #[method(poseAsClass:)] pub unsafe fn poseAsClass(aClass: &Class); } ); + pub type NSDiscardableContent = NSObject; + extern_methods!( - #[doc = "NSDiscardableContentProxy"] + /// NSDiscardableContentProxy unsafe impl NSObject { #[method_id(autoContentAccessingProxy)] pub unsafe fn autoContentAccessingProxy(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs index ee7c6140c..96de7a7ad 100644 --- a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -1,24 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSScripting"] + /// NSScripting unsafe impl NSObject { #[method_id(scriptingValueForSpecifier:)] pub unsafe fn scriptingValueForSpecifier( &self, objectSpecifier: &NSScriptObjectSpecifier, ) -> Option>; + #[method_id(scriptingProperties)] pub unsafe fn scriptingProperties( &self, ) -> Option, Shared>>; + #[method(setScriptingProperties:)] pub unsafe fn setScriptingProperties( &self, scriptingProperties: Option<&NSDictionary>, ); + #[method_id(copyScriptingValue:forKey:withProperties:)] pub unsafe fn copyScriptingValue_forKey_withProperties( &self, @@ -26,6 +32,7 @@ extern_methods!( key: &NSString, properties: &NSDictionary, ) -> Option>; + #[method_id(newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:)] pub unsafe fn newScriptingObjectOfClass_forValueForKey_withContentsValue_properties( &self, diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 42318c5c0..624323711 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -1,86 +1,120 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSOperation; + unsafe impl ClassType for NSOperation { type Super = NSObject; } ); + extern_methods!( unsafe impl NSOperation { #[method(start)] pub unsafe fn start(&self); + #[method(main)] pub unsafe fn main(&self); + #[method(isCancelled)] pub unsafe fn isCancelled(&self) -> bool; + #[method(cancel)] pub unsafe fn cancel(&self); + #[method(isExecuting)] pub unsafe fn isExecuting(&self) -> bool; + #[method(isFinished)] pub unsafe fn isFinished(&self) -> bool; + #[method(isConcurrent)] pub unsafe fn isConcurrent(&self) -> bool; + #[method(isAsynchronous)] pub unsafe fn isAsynchronous(&self) -> bool; + #[method(isReady)] pub unsafe fn isReady(&self) -> bool; + #[method(addDependency:)] pub unsafe fn addDependency(&self, op: &NSOperation); + #[method(removeDependency:)] pub unsafe fn removeDependency(&self, op: &NSOperation); + #[method_id(dependencies)] pub unsafe fn dependencies(&self) -> Id, Shared>; + #[method(queuePriority)] pub unsafe fn queuePriority(&self) -> NSOperationQueuePriority; + #[method(setQueuePriority:)] pub unsafe fn setQueuePriority(&self, queuePriority: NSOperationQueuePriority); + #[method(completionBlock)] pub unsafe fn completionBlock(&self) -> TodoBlock; + #[method(setCompletionBlock:)] pub unsafe fn setCompletionBlock(&self, completionBlock: TodoBlock); + #[method(waitUntilFinished)] pub unsafe fn waitUntilFinished(&self); + #[method(threadPriority)] pub unsafe fn threadPriority(&self) -> c_double; + #[method(setThreadPriority:)] pub unsafe fn setThreadPriority(&self, threadPriority: c_double); + #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); } ); + extern_class!( #[derive(Debug)] pub struct NSBlockOperation; + unsafe impl ClassType for NSBlockOperation { type Super = NSOperation; } ); + extern_methods!( unsafe impl NSBlockOperation { #[method_id(blockOperationWithBlock:)] pub unsafe fn blockOperationWithBlock(block: TodoBlock) -> Id; + #[method(addExecutionBlock:)] pub unsafe fn addExecutionBlock(&self, block: TodoBlock); } ); + extern_class!( #[derive(Debug)] pub struct NSInvocationOperation; + unsafe impl ClassType for NSInvocationOperation { type Super = NSOperation; } ); + extern_methods!( unsafe impl NSInvocationOperation { #[method_id(initWithTarget:selector:object:)] @@ -90,72 +124,98 @@ extern_methods!( sel: Sel, arg: Option<&Object>, ) -> Option>; + #[method_id(initWithInvocation:)] pub unsafe fn initWithInvocation(&self, inv: &NSInvocation) -> Id; + #[method_id(invocation)] pub unsafe fn invocation(&self) -> Id; + #[method_id(result)] pub unsafe fn result(&self) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSOperationQueue; + unsafe impl ClassType for NSOperationQueue { type Super = NSObject; } ); + extern_methods!( unsafe impl NSOperationQueue { #[method_id(progress)] pub unsafe fn progress(&self) -> Id; + #[method(addOperation:)] pub unsafe fn addOperation(&self, op: &NSOperation); + #[method(addOperations:waitUntilFinished:)] pub unsafe fn addOperations_waitUntilFinished( &self, ops: &NSArray, wait: bool, ); + #[method(addOperationWithBlock:)] pub unsafe fn addOperationWithBlock(&self, block: TodoBlock); + #[method(addBarrierBlock:)] pub unsafe fn addBarrierBlock(&self, barrier: TodoBlock); + #[method(maxConcurrentOperationCount)] pub unsafe fn maxConcurrentOperationCount(&self) -> NSInteger; + #[method(setMaxConcurrentOperationCount:)] pub unsafe fn setMaxConcurrentOperationCount(&self, maxConcurrentOperationCount: NSInteger); + #[method(isSuspended)] pub unsafe fn isSuspended(&self) -> bool; + #[method(setSuspended:)] pub unsafe fn setSuspended(&self, suspended: bool); + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); + #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); + #[method(underlyingQueue)] pub unsafe fn underlyingQueue(&self) -> dispatch_queue_t; + #[method(setUnderlyingQueue:)] pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: dispatch_queue_t); + #[method(cancelAllOperations)] pub unsafe fn cancelAllOperations(&self); + #[method(waitUntilAllOperationsAreFinished)] pub unsafe fn waitUntilAllOperationsAreFinished(&self); + #[method_id(currentQueue)] pub unsafe fn currentQueue() -> Option>; + #[method_id(mainQueue)] pub unsafe fn mainQueue() -> Id; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSOperationQueue { #[method_id(operations)] pub unsafe fn operations(&self) -> Id, Shared>; + #[method(operationCount)] pub unsafe fn operationCount(&self) -> NSUInteger; } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index c94129758..b914fa6d6 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedCollectionChange; + unsafe impl ClassType for NSOrderedCollectionChange { type Super = NSObject; } ); + extern_methods!( unsafe impl NSOrderedCollectionChange { #[method_id(changeWithObject:type:index:)] @@ -17,6 +22,7 @@ extern_methods!( type_: NSCollectionChangeType, index: NSUInteger, ) -> Id, Shared>; + #[method_id(changeWithObject:type:index:associatedIndex:)] pub unsafe fn changeWithObject_type_index_associatedIndex( anObject: Option<&ObjectType>, @@ -24,16 +30,22 @@ extern_methods!( index: NSUInteger, associatedIndex: NSUInteger, ) -> Id, Shared>; + #[method_id(object)] pub unsafe fn object(&self) -> Option>; + #[method(changeType)] pub unsafe fn changeType(&self) -> NSCollectionChangeType; + #[method(index)] pub unsafe fn index(&self) -> NSUInteger; + #[method(associatedIndex)] pub unsafe fn associatedIndex(&self) -> NSUInteger; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithObject:type:index:)] pub unsafe fn initWithObject_type_index( &self, @@ -41,6 +53,7 @@ extern_methods!( type_: NSCollectionChangeType, index: NSUInteger, ) -> Id; + #[method_id(initWithObject:type:index:associatedIndex:)] pub unsafe fn initWithObject_type_index_associatedIndex( &self, diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index be8f8df1d..3d7caacc8 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedCollectionDifference; + unsafe impl ClassType for NSOrderedCollectionDifference { type Super = NSObject; } ); + extern_methods!( unsafe impl NSOrderedCollectionDifference { #[method_id(initWithChanges:)] @@ -16,6 +21,7 @@ extern_methods!( &self, changes: &NSArray>, ) -> Id; + #[method_id(initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:)] pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges( &self, @@ -25,6 +31,7 @@ extern_methods!( removedObjects: Option<&NSArray>, changes: &NSArray>, ) -> Id; + #[method_id(initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:)] pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects( &self, @@ -33,20 +40,25 @@ extern_methods!( removes: &NSIndexSet, removedObjects: Option<&NSArray>, ) -> Id; + #[method_id(insertions)] pub unsafe fn insertions( &self, ) -> Id>, Shared>; + #[method_id(removals)] pub unsafe fn removals(&self) -> Id>, Shared>; + #[method(hasChanges)] pub unsafe fn hasChanges(&self) -> bool; + #[method_id(differenceByTransformingChangesWithBlock:)] pub unsafe fn differenceByTransformingChangesWithBlock( &self, block: TodoBlock, ) -> Id, Shared>; + #[method_id(inverseDifference)] pub unsafe fn inverseDifference(&self) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index ec2af1838..195fda30c 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -1,80 +1,109 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedSet; + unsafe impl ClassType for NSOrderedSet { type Super = NSObject; } ); + extern_methods!( unsafe impl NSOrderedSet { #[method(count)] pub unsafe fn count(&self) -> NSUInteger; + #[method_id(objectAtIndex:)] pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Id; + #[method(indexOfObject:)] pub unsafe fn indexOfObject(&self, object: &ObjectType) -> NSUInteger; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithObjects:count:)] pub unsafe fn initWithObjects_count( &self, objects: TodoArray, cnt: NSUInteger, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSExtendedOrderedSet"] + /// NSExtendedOrderedSet unsafe impl NSOrderedSet { #[method(getObjects:range:)] pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange); + #[method_id(objectsAtIndexes:)] pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet, ) -> Id, Shared>; + #[method_id(firstObject)] pub unsafe fn firstObject(&self) -> Option>; + #[method_id(lastObject)] pub unsafe fn lastObject(&self) -> Option>; + #[method(isEqualToOrderedSet:)] pub unsafe fn isEqualToOrderedSet(&self, other: &NSOrderedSet) -> bool; + #[method(containsObject:)] pub unsafe fn containsObject(&self, object: &ObjectType) -> bool; + #[method(intersectsOrderedSet:)] pub unsafe fn intersectsOrderedSet(&self, other: &NSOrderedSet) -> bool; + #[method(intersectsSet:)] pub unsafe fn intersectsSet(&self, set: &NSSet) -> bool; + #[method(isSubsetOfOrderedSet:)] pub unsafe fn isSubsetOfOrderedSet(&self, other: &NSOrderedSet) -> bool; + #[method(isSubsetOfSet:)] pub unsafe fn isSubsetOfSet(&self, set: &NSSet) -> bool; + #[method_id(objectAtIndexedSubscript:)] pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; + #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + #[method_id(reverseObjectEnumerator)] pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared>; + #[method_id(reversedOrderedSet)] pub unsafe fn reversedOrderedSet(&self) -> Id, Shared>; + #[method_id(array)] pub unsafe fn array(&self) -> Id, Shared>; + #[method_id(set)] pub unsafe fn set(&self) -> Id, Shared>; + #[method(enumerateObjectsUsingBlock:)] pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); + #[method(enumerateObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); + #[method(enumerateObjectsAtIndexes:options:usingBlock:)] pub unsafe fn enumerateObjectsAtIndexes_options_usingBlock( &self, @@ -82,14 +111,17 @@ extern_methods!( opts: NSEnumerationOptions, block: TodoBlock, ); + #[method(indexOfObjectPassingTest:)] pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger; + #[method(indexOfObjectWithOptions:passingTest:)] pub unsafe fn indexOfObjectWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; + #[method(indexOfObjectAtIndexes:options:passingTest:)] pub unsafe fn indexOfObjectAtIndexes_options_passingTest( &self, @@ -97,17 +129,20 @@ extern_methods!( opts: NSEnumerationOptions, predicate: TodoBlock, ) -> NSUInteger; + #[method_id(indexesOfObjectsPassingTest:)] pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: TodoBlock, ) -> Id; + #[method_id(indexesOfObjectsWithOptions:passingTest:)] pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; + #[method_id(indexesOfObjectsAtIndexes:options:passingTest:)] pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, @@ -115,6 +150,7 @@ extern_methods!( opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; + #[method(indexOfObject:inSortedRange:options:usingComparator:)] pub unsafe fn indexOfObject_inSortedRange_options_usingComparator( &self, @@ -123,22 +159,27 @@ extern_methods!( opts: NSBinarySearchingOptions, cmp: NSComparator, ) -> NSUInteger; + #[method_id(sortedArrayUsingComparator:)] pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator, ) -> Id, Shared>; + #[method_id(sortedArrayWithOptions:usingComparator:)] pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, ) -> Id, Shared>; + #[method_id(description)] pub unsafe fn description(&self) -> Id; + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; + #[method_id(descriptionWithLocale:indent:)] pub unsafe fn descriptionWithLocale_indent( &self, @@ -147,52 +188,65 @@ extern_methods!( ) -> Id; } ); + extern_methods!( - #[doc = "NSOrderedSetCreation"] + /// NSOrderedSetCreation unsafe impl NSOrderedSet { #[method_id(orderedSet)] pub unsafe fn orderedSet() -> Id; + #[method_id(orderedSetWithObject:)] pub unsafe fn orderedSetWithObject(object: &ObjectType) -> Id; + #[method_id(orderedSetWithObjects:count:)] pub unsafe fn orderedSetWithObjects_count( objects: TodoArray, cnt: NSUInteger, ) -> Id; + #[method_id(orderedSetWithOrderedSet:)] pub unsafe fn orderedSetWithOrderedSet(set: &NSOrderedSet) -> Id; + #[method_id(orderedSetWithOrderedSet:range:copyItems:)] pub unsafe fn orderedSetWithOrderedSet_range_copyItems( set: &NSOrderedSet, range: NSRange, flag: bool, ) -> Id; + #[method_id(orderedSetWithArray:)] pub unsafe fn orderedSetWithArray(array: &NSArray) -> Id; + #[method_id(orderedSetWithArray:range:copyItems:)] pub unsafe fn orderedSetWithArray_range_copyItems( array: &NSArray, range: NSRange, flag: bool, ) -> Id; + #[method_id(orderedSetWithSet:)] pub unsafe fn orderedSetWithSet(set: &NSSet) -> Id; + #[method_id(orderedSetWithSet:copyItems:)] pub unsafe fn orderedSetWithSet_copyItems( set: &NSSet, flag: bool, ) -> Id; + #[method_id(initWithObject:)] pub unsafe fn initWithObject(&self, object: &ObjectType) -> Id; + #[method_id(initWithOrderedSet:)] pub unsafe fn initWithOrderedSet(&self, set: &NSOrderedSet) -> Id; + #[method_id(initWithOrderedSet:copyItems:)] pub unsafe fn initWithOrderedSet_copyItems( &self, set: &NSOrderedSet, flag: bool, ) -> Id; + #[method_id(initWithOrderedSet:range:copyItems:)] pub unsafe fn initWithOrderedSet_range_copyItems( &self, @@ -200,14 +254,17 @@ extern_methods!( range: NSRange, flag: bool, ) -> Id; + #[method_id(initWithArray:)] pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; + #[method_id(initWithArray:copyItems:)] pub unsafe fn initWithArray_copyItems( &self, set: &NSArray, flag: bool, ) -> Id; + #[method_id(initWithArray:range:copyItems:)] pub unsafe fn initWithArray_range_copyItems( &self, @@ -215,8 +272,10 @@ extern_methods!( range: NSRange, flag: bool, ) -> Id; + #[method_id(initWithSet:)] pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; + #[method_id(initWithSet:copyItems:)] pub unsafe fn initWithSet_copyItems( &self, @@ -225,8 +284,9 @@ extern_methods!( ) -> Id; } ); + extern_methods!( - #[doc = "NSOrderedSetDiffing"] + /// NSOrderedSetDiffing unsafe impl NSOrderedSet { #[method_id(differenceFromOrderedSet:withOptions:usingEquivalenceTest:)] pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( @@ -235,17 +295,20 @@ extern_methods!( options: NSOrderedCollectionDifferenceCalculationOptions, block: TodoBlock, ) -> Id, Shared>; + #[method_id(differenceFromOrderedSet:withOptions:)] pub unsafe fn differenceFromOrderedSet_withOptions( &self, other: &NSOrderedSet, options: NSOrderedCollectionDifferenceCalculationOptions, ) -> Id, Shared>; + #[method_id(differenceFromOrderedSet:)] pub unsafe fn differenceFromOrderedSet( &self, other: &NSOrderedSet, ) -> Id, Shared>; + #[method_id(orderedSetByApplyingDifference:)] pub unsafe fn orderedSetByApplyingDifference( &self, @@ -253,56 +316,73 @@ extern_methods!( ) -> Option, Shared>>; } ); + __inner_extern_class!( #[derive(Debug)] pub struct NSMutableOrderedSet; + unsafe impl ClassType for NSMutableOrderedSet { type Super = NSOrderedSet; } ); + extern_methods!( unsafe impl NSMutableOrderedSet { #[method(insertObject:atIndex:)] pub unsafe fn insertObject_atIndex(&self, object: &ObjectType, idx: NSUInteger); + #[method(removeObjectAtIndex:)] pub unsafe fn removeObjectAtIndex(&self, idx: NSUInteger); + #[method(replaceObjectAtIndex:withObject:)] pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: &ObjectType); + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; } ); + extern_methods!( - #[doc = "NSExtendedMutableOrderedSet"] + /// NSExtendedMutableOrderedSet unsafe impl NSMutableOrderedSet { #[method(addObject:)] pub unsafe fn addObject(&self, object: &ObjectType); + #[method(addObjects:count:)] pub unsafe fn addObjects_count(&self, objects: TodoArray, count: NSUInteger); + #[method(addObjectsFromArray:)] pub unsafe fn addObjectsFromArray(&self, array: &NSArray); + #[method(exchangeObjectAtIndex:withObjectAtIndex:)] pub unsafe fn exchangeObjectAtIndex_withObjectAtIndex( &self, idx1: NSUInteger, idx2: NSUInteger, ); + #[method(moveObjectsAtIndexes:toIndex:)] pub unsafe fn moveObjectsAtIndexes_toIndex(&self, indexes: &NSIndexSet, idx: NSUInteger); + #[method(insertObjects:atIndexes:)] pub unsafe fn insertObjects_atIndexes( &self, objects: &NSArray, indexes: &NSIndexSet, ); + #[method(setObject:atIndex:)] pub unsafe fn setObject_atIndex(&self, obj: &ObjectType, idx: NSUInteger); + #[method(setObject:atIndexedSubscript:)] pub unsafe fn setObject_atIndexedSubscript(&self, obj: &ObjectType, idx: NSUInteger); + #[method(replaceObjectsInRange:withObjects:count:)] pub unsafe fn replaceObjectsInRange_withObjects_count( &self, @@ -310,42 +390,57 @@ extern_methods!( objects: TodoArray, count: NSUInteger, ); + #[method(replaceObjectsAtIndexes:withObjects:)] pub unsafe fn replaceObjectsAtIndexes_withObjects( &self, indexes: &NSIndexSet, objects: &NSArray, ); + #[method(removeObjectsInRange:)] pub unsafe fn removeObjectsInRange(&self, range: NSRange); + #[method(removeObjectsAtIndexes:)] pub unsafe fn removeObjectsAtIndexes(&self, indexes: &NSIndexSet); + #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); + #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &ObjectType); + #[method(removeObjectsInArray:)] pub unsafe fn removeObjectsInArray(&self, array: &NSArray); + #[method(intersectOrderedSet:)] pub unsafe fn intersectOrderedSet(&self, other: &NSOrderedSet); + #[method(minusOrderedSet:)] pub unsafe fn minusOrderedSet(&self, other: &NSOrderedSet); + #[method(unionOrderedSet:)] pub unsafe fn unionOrderedSet(&self, other: &NSOrderedSet); + #[method(intersectSet:)] pub unsafe fn intersectSet(&self, other: &NSSet); + #[method(minusSet:)] pub unsafe fn minusSet(&self, other: &NSSet); + #[method(unionSet:)] pub unsafe fn unionSet(&self, other: &NSSet); + #[method(sortUsingComparator:)] pub unsafe fn sortUsingComparator(&self, cmptr: NSComparator); + #[method(sortWithOptions:usingComparator:)] pub unsafe fn sortWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, ); + #[method(sortRange:options:usingComparator:)] pub unsafe fn sortRange_options_usingComparator( &self, @@ -355,15 +450,17 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSMutableOrderedSetCreation"] + /// NSMutableOrderedSetCreation unsafe impl NSMutableOrderedSet { #[method_id(orderedSetWithCapacity:)] pub unsafe fn orderedSetWithCapacity(numItems: NSUInteger) -> Id; } ); + extern_methods!( - #[doc = "NSMutableOrderedSetDiffing"] + /// NSMutableOrderedSetDiffing unsafe impl NSMutableOrderedSet { #[method(applyDifference:)] pub unsafe fn applyDifference( diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index bc325d9ff..a38fecc95 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -1,55 +1,70 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSOrthography; + unsafe impl ClassType for NSOrthography { type Super = NSObject; } ); + extern_methods!( unsafe impl NSOrthography { #[method_id(dominantScript)] pub unsafe fn dominantScript(&self) -> Id; + #[method_id(languageMap)] pub unsafe fn languageMap(&self) -> Id>, Shared>; + #[method_id(initWithDominantScript:languageMap:)] pub unsafe fn initWithDominantScript_languageMap( &self, script: &NSString, map: &NSDictionary>, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSOrthographyExtended"] + /// NSOrthographyExtended unsafe impl NSOrthography { #[method_id(languagesForScript:)] pub unsafe fn languagesForScript( &self, script: &NSString, ) -> Option, Shared>>; + #[method_id(dominantLanguageForScript:)] pub unsafe fn dominantLanguageForScript( &self, script: &NSString, ) -> Option>; + #[method_id(dominantLanguage)] pub unsafe fn dominantLanguage(&self) -> Id; + #[method_id(allScripts)] pub unsafe fn allScripts(&self) -> Id, Shared>; + #[method_id(allLanguages)] pub unsafe fn allLanguages(&self) -> Id, Shared>; + #[method_id(defaultOrthographyForLanguage:)] pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id; } ); + extern_methods!( - #[doc = "NSOrthographyCreation"] + /// NSOrthographyCreation unsafe impl NSOrthography { #[method_id(orthographyWithDominantScript:languageMap:)] pub unsafe fn orthographyWithDominantScript_languageMap( diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index bde3a739c..a87a614fe 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -1,44 +1,61 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSStringPathExtensions"] + /// NSStringPathExtensions unsafe impl NSString { #[method_id(pathWithComponents:)] pub unsafe fn pathWithComponents(components: &NSArray) -> Id; + #[method_id(pathComponents)] pub unsafe fn pathComponents(&self) -> Id, Shared>; + #[method(isAbsolutePath)] pub unsafe fn isAbsolutePath(&self) -> bool; + #[method_id(lastPathComponent)] pub unsafe fn lastPathComponent(&self) -> Id; + #[method_id(stringByDeletingLastPathComponent)] pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id; + #[method_id(stringByAppendingPathComponent:)] pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id; + #[method_id(pathExtension)] pub unsafe fn pathExtension(&self) -> Id; + #[method_id(stringByDeletingPathExtension)] pub unsafe fn stringByDeletingPathExtension(&self) -> Id; + #[method_id(stringByAppendingPathExtension:)] pub unsafe fn stringByAppendingPathExtension( &self, str: &NSString, ) -> Option>; + #[method_id(stringByAbbreviatingWithTildeInPath)] pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id; + #[method_id(stringByExpandingTildeInPath)] pub unsafe fn stringByExpandingTildeInPath(&self) -> Id; + #[method_id(stringByStandardizingPath)] pub unsafe fn stringByStandardizingPath(&self) -> Id; + #[method_id(stringByResolvingSymlinksInPath)] pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id; + #[method_id(stringsByAppendingPaths:)] pub unsafe fn stringsByAppendingPaths( &self, paths: &NSArray, ) -> Id, Shared>; + #[method(completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:)] pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( &self, @@ -47,8 +64,10 @@ extern_methods!( outputArray: Option<&mut Option, Shared>>>, filterTypes: Option<&NSArray>, ) -> NSUInteger; + #[method(fileSystemRepresentation)] pub unsafe fn fileSystemRepresentation(&self) -> NonNull; + #[method(getFileSystemRepresentation:maxLength:)] pub unsafe fn getFileSystemRepresentation_maxLength( &self, @@ -57,8 +76,9 @@ extern_methods!( ) -> bool; } ); + extern_methods!( - #[doc = "NSArrayPathExtensions"] + /// NSArrayPathExtensions unsafe impl NSArray { #[method_id(pathsMatchingExtensions:)] pub unsafe fn pathsMatchingExtensions( diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs index fd6ecba2e..68f620b3e 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -1,42 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPersonNameComponents; + unsafe impl ClassType for NSPersonNameComponents { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPersonNameComponents { #[method_id(namePrefix)] pub unsafe fn namePrefix(&self) -> Option>; + #[method(setNamePrefix:)] pub unsafe fn setNamePrefix(&self, namePrefix: Option<&NSString>); + #[method_id(givenName)] pub unsafe fn givenName(&self) -> Option>; + #[method(setGivenName:)] pub unsafe fn setGivenName(&self, givenName: Option<&NSString>); + #[method_id(middleName)] pub unsafe fn middleName(&self) -> Option>; + #[method(setMiddleName:)] pub unsafe fn setMiddleName(&self, middleName: Option<&NSString>); + #[method_id(familyName)] pub unsafe fn familyName(&self) -> Option>; + #[method(setFamilyName:)] pub unsafe fn setFamilyName(&self, familyName: Option<&NSString>); + #[method_id(nameSuffix)] pub unsafe fn nameSuffix(&self) -> Option>; + #[method(setNameSuffix:)] pub unsafe fn setNameSuffix(&self, nameSuffix: Option<&NSString>); + #[method_id(nickname)] pub unsafe fn nickname(&self) -> Option>; + #[method(setNickname:)] pub unsafe fn setNickname(&self, nickname: Option<&NSString>); + #[method_id(phoneticRepresentation)] pub unsafe fn phoneticRepresentation(&self) -> Option>; + #[method(setPhoneticRepresentation:)] pub unsafe fn setPhoneticRepresentation( &self, diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index 9e134fed1..826c5536f 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -1,49 +1,64 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPersonNameComponentsFormatter; + unsafe impl ClassType for NSPersonNameComponentsFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSPersonNameComponentsFormatter { #[method(style)] pub unsafe fn style(&self) -> NSPersonNameComponentsFormatterStyle; + #[method(setStyle:)] pub unsafe fn setStyle(&self, style: NSPersonNameComponentsFormatterStyle); + #[method(isPhonetic)] pub unsafe fn isPhonetic(&self) -> bool; + #[method(setPhonetic:)] pub unsafe fn setPhonetic(&self, phonetic: bool); + #[method_id(locale)] pub unsafe fn locale(&self) -> Id; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(localizedStringFromPersonNameComponents:style:options:)] pub unsafe fn localizedStringFromPersonNameComponents_style_options( components: &NSPersonNameComponents, nameFormatStyle: NSPersonNameComponentsFormatterStyle, nameOptions: NSPersonNameComponentsFormatterOptions, ) -> Id; + #[method_id(stringFromPersonNameComponents:)] pub unsafe fn stringFromPersonNameComponents( &self, components: &NSPersonNameComponents, ) -> Id; + #[method_id(annotatedStringFromPersonNameComponents:)] pub unsafe fn annotatedStringFromPersonNameComponents( &self, components: &NSPersonNameComponents, ) -> Id; + #[method_id(personNameComponentsFromString:)] pub unsafe fn personNameComponentsFromString( &self, string: &NSString, ) -> Option>; + #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index 5f1a00dbf..e3b5281fb 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPointerArray; + unsafe impl ClassType for NSPointerArray { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPointerArray { #[method_id(initWithOptions:)] @@ -16,54 +21,71 @@ extern_methods!( &self, options: NSPointerFunctionsOptions, ) -> Id; + #[method_id(initWithPointerFunctions:)] pub unsafe fn initWithPointerFunctions( &self, functions: &NSPointerFunctions, ) -> Id; + #[method_id(pointerArrayWithOptions:)] pub unsafe fn pointerArrayWithOptions( options: NSPointerFunctionsOptions, ) -> Id; + #[method_id(pointerArrayWithPointerFunctions:)] pub unsafe fn pointerArrayWithPointerFunctions( functions: &NSPointerFunctions, ) -> Id; + #[method_id(pointerFunctions)] pub unsafe fn pointerFunctions(&self) -> Id; + #[method(pointerAtIndex:)] pub unsafe fn pointerAtIndex(&self, index: NSUInteger) -> *mut c_void; + #[method(addPointer:)] pub unsafe fn addPointer(&self, pointer: *mut c_void); + #[method(removePointerAtIndex:)] pub unsafe fn removePointerAtIndex(&self, index: NSUInteger); + #[method(insertPointer:atIndex:)] pub unsafe fn insertPointer_atIndex(&self, item: *mut c_void, index: NSUInteger); + #[method(replacePointerAtIndex:withPointer:)] pub unsafe fn replacePointerAtIndex_withPointer( &self, index: NSUInteger, item: *mut c_void, ); + #[method(compact)] pub unsafe fn compact(&self); + #[method(count)] pub unsafe fn count(&self) -> NSUInteger; + #[method(setCount:)] pub unsafe fn setCount(&self, count: NSUInteger); } ); + extern_methods!( - #[doc = "NSPointerArrayConveniences"] + /// NSPointerArrayConveniences unsafe impl NSPointerArray { #[method_id(pointerArrayWithStrongObjects)] pub unsafe fn pointerArrayWithStrongObjects() -> Id; + #[method_id(pointerArrayWithWeakObjects)] pub unsafe fn pointerArrayWithWeakObjects() -> Id; + #[method_id(strongObjectsPointerArray)] pub unsafe fn strongObjectsPointerArray() -> Id; + #[method_id(weakObjectsPointerArray)] pub unsafe fn weakObjectsPointerArray() -> Id; + #[method_id(allObjects)] pub unsafe fn allObjects(&self) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 43cb1e412..9ce1228d1 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPointerFunctions; + unsafe impl ClassType for NSPointerFunctions { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPointerFunctions { #[method_id(initWithOptions:)] @@ -16,40 +21,57 @@ extern_methods!( &self, options: NSPointerFunctionsOptions, ) -> Id; + #[method_id(pointerFunctionsWithOptions:)] pub unsafe fn pointerFunctionsWithOptions( options: NSPointerFunctionsOptions, ) -> Id; + #[method(hashFunction)] pub unsafe fn hashFunction(&self) -> *mut TodoFunction; + #[method(setHashFunction:)] pub unsafe fn setHashFunction(&self, hashFunction: *mut TodoFunction); + #[method(isEqualFunction)] pub unsafe fn isEqualFunction(&self) -> *mut TodoFunction; + #[method(setIsEqualFunction:)] pub unsafe fn setIsEqualFunction(&self, isEqualFunction: *mut TodoFunction); + #[method(sizeFunction)] pub unsafe fn sizeFunction(&self) -> *mut TodoFunction; + #[method(setSizeFunction:)] pub unsafe fn setSizeFunction(&self, sizeFunction: *mut TodoFunction); + #[method(descriptionFunction)] pub unsafe fn descriptionFunction(&self) -> *mut TodoFunction; + #[method(setDescriptionFunction:)] pub unsafe fn setDescriptionFunction(&self, descriptionFunction: *mut TodoFunction); + #[method(relinquishFunction)] pub unsafe fn relinquishFunction(&self) -> *mut TodoFunction; + #[method(setRelinquishFunction:)] pub unsafe fn setRelinquishFunction(&self, relinquishFunction: *mut TodoFunction); + #[method(acquireFunction)] pub unsafe fn acquireFunction(&self) -> *mut TodoFunction; + #[method(setAcquireFunction:)] pub unsafe fn setAcquireFunction(&self, acquireFunction: *mut TodoFunction); + #[method(usesStrongWriteBarrier)] pub unsafe fn usesStrongWriteBarrier(&self) -> bool; + #[method(setUsesStrongWriteBarrier:)] pub unsafe fn setUsesStrongWriteBarrier(&self, usesStrongWriteBarrier: bool); + #[method(usesWeakReadAndWriteBarriers)] pub unsafe fn usesWeakReadAndWriteBarriers(&self) -> bool; + #[method(setUsesWeakReadAndWriteBarriers:)] pub unsafe fn setUsesWeakReadAndWriteBarriers(&self, usesWeakReadAndWriteBarriers: bool); } diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 0b4675e7e..900416cd7 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -1,32 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPort; + unsafe impl ClassType for NSPort { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPort { #[method_id(port)] pub unsafe fn port() -> Id; + #[method(invalidate)] pub unsafe fn invalidate(&self); + #[method(isValid)] pub unsafe fn isValid(&self) -> bool; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, anObject: Option<&NSPortDelegate>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(reservedSpaceLength)] pub unsafe fn reservedSpaceLength(&self) -> NSUInteger; + #[method(sendBeforeDate:components:from:reserved:)] pub unsafe fn sendBeforeDate_components_from_reserved( &self, @@ -35,6 +48,7 @@ extern_methods!( receivePort: Option<&NSPort>, headerSpaceReserved: NSUInteger, ) -> bool; + #[method(sendBeforeDate:msgid:components:from:reserved:)] pub unsafe fn sendBeforeDate_msgid_components_from_reserved( &self, @@ -44,6 +58,7 @@ extern_methods!( receivePort: Option<&NSPort>, headerSpaceReserved: NSUInteger, ) -> bool; + #[method(addConnection:toRunLoop:forMode:)] pub unsafe fn addConnection_toRunLoop_forMode( &self, @@ -51,6 +66,7 @@ extern_methods!( runLoop: &NSRunLoop, mode: &NSRunLoopMode, ); + #[method(removeConnection:fromRunLoop:forMode:)] pub unsafe fn removeConnection_fromRunLoop_forMode( &self, @@ -60,67 +76,88 @@ extern_methods!( ); } ); + pub type NSPortDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSMachPort; + unsafe impl ClassType for NSMachPort { type Super = NSPort; } ); + extern_methods!( unsafe impl NSMachPort { #[method_id(portWithMachPort:)] pub unsafe fn portWithMachPort(machPort: u32) -> Id; + #[method_id(initWithMachPort:)] pub unsafe fn initWithMachPort(&self, machPort: u32) -> Id; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, anObject: Option<&NSMachPortDelegate>); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method_id(portWithMachPort:options:)] pub unsafe fn portWithMachPort_options( machPort: u32, f: NSMachPortOptions, ) -> Id; + #[method_id(initWithMachPort:options:)] pub unsafe fn initWithMachPort_options( &self, machPort: u32, f: NSMachPortOptions, ) -> Id; + #[method(machPort)] pub unsafe fn machPort(&self) -> u32; + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, runLoop: &NSRunLoop, mode: &NSRunLoopMode); } ); + pub type NSMachPortDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSMessagePort; + unsafe impl ClassType for NSMessagePort { type Super = NSPort; } ); + extern_methods!( unsafe impl NSMessagePort {} ); + extern_class!( #[derive(Debug)] pub struct NSSocketPort; + unsafe impl ClassType for NSSocketPort { type Super = NSPort; } ); + extern_methods!( unsafe impl NSSocketPort { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithTCPPort:)] pub unsafe fn initWithTCPPort(&self, port: c_ushort) -> Option>; + #[method_id(initWithProtocolFamily:socketType:protocol:address:)] pub unsafe fn initWithProtocolFamily_socketType_protocol_address( &self, @@ -129,6 +166,7 @@ extern_methods!( protocol: c_int, address: &NSData, ) -> Option>; + #[method_id(initWithProtocolFamily:socketType:protocol:socket:)] pub unsafe fn initWithProtocolFamily_socketType_protocol_socket( &self, @@ -137,12 +175,14 @@ extern_methods!( protocol: c_int, sock: NSSocketNativeHandle, ) -> Option>; + #[method_id(initRemoteWithTCPPort:host:)] pub unsafe fn initRemoteWithTCPPort_host( &self, port: c_ushort, hostName: Option<&NSString>, ) -> Option>; + #[method_id(initRemoteWithProtocolFamily:socketType:protocol:address:)] pub unsafe fn initRemoteWithProtocolFamily_socketType_protocol_address( &self, @@ -151,14 +191,19 @@ extern_methods!( protocol: c_int, address: &NSData, ) -> Id; + #[method(protocolFamily)] pub unsafe fn protocolFamily(&self) -> c_int; + #[method(socketType)] pub unsafe fn socketType(&self) -> c_int; + #[method(protocol)] pub unsafe fn protocol(&self) -> c_int; + #[method_id(address)] pub unsafe fn address(&self) -> Id; + #[method(socket)] pub unsafe fn socket(&self) -> NSSocketNativeHandle; } diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index 272f91d17..539c65720 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -1,32 +1,43 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPortCoder; + unsafe impl ClassType for NSPortCoder { type Super = NSCoder; } ); + extern_methods!( unsafe impl NSPortCoder { #[method(isBycopy)] pub unsafe fn isBycopy(&self) -> bool; + #[method(isByref)] pub unsafe fn isByref(&self) -> bool; + #[method(encodePortObject:)] pub unsafe fn encodePortObject(&self, aport: &NSPort); + #[method_id(decodePortObject)] pub unsafe fn decodePortObject(&self) -> Option>; + #[method_id(connection)] pub unsafe fn connection(&self) -> Option>; + #[method_id(portCoderWithReceivePort:sendPort:components:)] pub unsafe fn portCoderWithReceivePort_sendPort_components( rcvPort: Option<&NSPort>, sndPort: Option<&NSPort>, comps: Option<&NSArray>, ) -> Id; + #[method_id(initWithReceivePort:sendPort:components:)] pub unsafe fn initWithReceivePort_sendPort_components( &self, @@ -34,15 +45,18 @@ extern_methods!( sndPort: Option<&NSPort>, comps: Option<&NSArray>, ) -> Id; + #[method(dispatch)] pub unsafe fn dispatch(&self); } ); + extern_methods!( - #[doc = "NSDistributedObjects"] + /// NSDistributedObjects unsafe impl NSObject { #[method(classForPortCoder)] pub unsafe fn classForPortCoder(&self) -> &Class; + #[method_id(replacementObjectForPortCoder:)] pub unsafe fn replacementObjectForPortCoder( &self, diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index 65b33feb2..e912d8fef 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPortMessage; + unsafe impl ClassType for NSPortMessage { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPortMessage { #[method_id(initWithSendPort:receivePort:components:)] @@ -18,16 +23,22 @@ extern_methods!( replyPort: Option<&NSPort>, components: Option<&NSArray>, ) -> Id; + #[method_id(components)] pub unsafe fn components(&self) -> Option>; + #[method_id(receivePort)] pub unsafe fn receivePort(&self) -> Option>; + #[method_id(sendPort)] pub unsafe fn sendPort(&self) -> Option>; + #[method(sendBeforeDate:)] pub unsafe fn sendBeforeDate(&self, date: &NSDate) -> bool; + #[method(msgid)] pub unsafe fn msgid(&self) -> u32; + #[method(setMsgid:)] pub unsafe fn setMsgid(&self, msgid: u32); } diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index bebbd7fbb..6c5d36372 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -1,70 +1,91 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPortNameServer; + unsafe impl ClassType for NSPortNameServer { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPortNameServer { #[method_id(systemDefaultPortNameServer)] pub unsafe fn systemDefaultPortNameServer() -> Id; + #[method_id(portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; + #[method_id(portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, host: Option<&NSString>, ) -> Option>; + #[method(registerPort:name:)] pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool; + #[method(removePortForName:)] pub unsafe fn removePortForName(&self, name: &NSString) -> bool; } ); + extern_class!( #[derive(Debug)] pub struct NSMachBootstrapServer; + unsafe impl ClassType for NSMachBootstrapServer { type Super = NSPortNameServer; } ); + extern_methods!( unsafe impl NSMachBootstrapServer { #[method_id(sharedInstance)] pub unsafe fn sharedInstance() -> Id; + #[method_id(portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; + #[method_id(portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, host: Option<&NSString>, ) -> Option>; + #[method(registerPort:name:)] pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool; + #[method_id(servicePortWithName:)] pub unsafe fn servicePortWithName(&self, name: &NSString) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSMessagePortNameServer; + unsafe impl ClassType for NSMessagePortNameServer { type Super = NSPortNameServer; } ); + extern_methods!( unsafe impl NSMessagePortNameServer { #[method_id(sharedInstance)] pub unsafe fn sharedInstance() -> Id; + #[method_id(portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; + #[method_id(portForName:host:)] pub unsafe fn portForName_host( &self, @@ -73,29 +94,37 @@ extern_methods!( ) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSSocketPortNameServer; + unsafe impl ClassType for NSSocketPortNameServer { type Super = NSPortNameServer; } ); + extern_methods!( unsafe impl NSSocketPortNameServer { #[method_id(sharedInstance)] pub unsafe fn sharedInstance() -> Id; + #[method_id(portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; + #[method_id(portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, host: Option<&NSString>, ) -> Option>; + #[method(registerPort:name:)] pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool; + #[method(removePortForName:)] pub unsafe fn removePortForName(&self, name: &NSString) -> bool; + #[method_id(portForName:host:nameServerPortNumber:)] pub unsafe fn portForName_host_nameServerPortNumber( &self, @@ -103,6 +132,7 @@ extern_methods!( host: Option<&NSString>, portNumber: u16, ) -> Option>; + #[method(registerPort:name:nameServerPortNumber:)] pub unsafe fn registerPort_name_nameServerPortNumber( &self, @@ -110,8 +140,10 @@ extern_methods!( name: &NSString, portNumber: u16, ) -> bool; + #[method(defaultNameServerPortNumber)] pub unsafe fn defaultNameServerPortNumber(&self) -> u16; + #[method(setDefaultNameServerPortNumber:)] pub unsafe fn setDefaultNameServerPortNumber(&self, defaultNameServerPortNumber: u16); } diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 624f2572e..f7967aa99 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSPredicate; + unsafe impl ClassType for NSPredicate { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPredicate { #[method_id(predicateWithFormat:argumentArray:)] @@ -16,40 +21,50 @@ extern_methods!( predicateFormat: &NSString, arguments: Option<&NSArray>, ) -> Id; + #[method_id(predicateWithFormat:arguments:)] pub unsafe fn predicateWithFormat_arguments( predicateFormat: &NSString, argList: va_list, ) -> Id; + #[method_id(predicateFromMetadataQueryString:)] pub unsafe fn predicateFromMetadataQueryString( queryString: &NSString, ) -> Option>; + #[method_id(predicateWithValue:)] pub unsafe fn predicateWithValue(value: bool) -> Id; + #[method_id(predicateWithBlock:)] pub unsafe fn predicateWithBlock(block: TodoBlock) -> Id; + #[method_id(predicateFormat)] pub unsafe fn predicateFormat(&self) -> Id; + #[method_id(predicateWithSubstitutionVariables:)] pub unsafe fn predicateWithSubstitutionVariables( &self, variables: &NSDictionary, ) -> Id; + #[method(evaluateWithObject:)] pub unsafe fn evaluateWithObject(&self, object: Option<&Object>) -> bool; + #[method(evaluateWithObject:substitutionVariables:)] pub unsafe fn evaluateWithObject_substitutionVariables( &self, object: Option<&Object>, bindings: Option<&NSDictionary>, ) -> bool; + #[method(allowEvaluation)] pub unsafe fn allowEvaluation(&self); } ); + extern_methods!( - #[doc = "NSPredicateSupport"] + /// NSPredicateSupport unsafe impl NSArray { #[method_id(filteredArrayUsingPredicate:)] pub unsafe fn filteredArrayUsingPredicate( @@ -58,15 +73,17 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSPredicateSupport"] + /// NSPredicateSupport unsafe impl NSMutableArray { #[method(filterUsingPredicate:)] pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate); } ); + extern_methods!( - #[doc = "NSPredicateSupport"] + /// NSPredicateSupport unsafe impl NSSet { #[method_id(filteredSetUsingPredicate:)] pub unsafe fn filteredSetUsingPredicate( @@ -75,15 +92,17 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSPredicateSupport"] + /// NSPredicateSupport unsafe impl NSMutableSet { #[method(filterUsingPredicate:)] pub unsafe fn filterUsingPredicate(&self, predicate: &NSPredicate); } ); + extern_methods!( - #[doc = "NSPredicateSupport"] + /// NSPredicateSupport unsafe impl NSOrderedSet { #[method_id(filteredOrderedSetUsingPredicate:)] pub unsafe fn filteredOrderedSetUsingPredicate( @@ -92,8 +111,9 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSPredicateSupport"] + /// NSPredicateSupport unsafe impl NSMutableOrderedSet { #[method(filterUsingPredicate:)] pub unsafe fn filterUsingPredicate(&self, p: &NSPredicate); diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index cae1547ea..9c1ba9915 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -1,63 +1,90 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSProcessInfo; + unsafe impl ClassType for NSProcessInfo { type Super = NSObject; } ); + extern_methods!( unsafe impl NSProcessInfo { #[method_id(processInfo)] pub unsafe fn processInfo() -> Id; + #[method_id(environment)] pub unsafe fn environment(&self) -> Id, Shared>; + #[method_id(arguments)] pub unsafe fn arguments(&self) -> Id, Shared>; + #[method_id(hostName)] pub unsafe fn hostName(&self) -> Id; + #[method_id(processName)] pub unsafe fn processName(&self) -> Id; + #[method(setProcessName:)] pub unsafe fn setProcessName(&self, processName: &NSString); + #[method(processIdentifier)] pub unsafe fn processIdentifier(&self) -> c_int; + #[method_id(globallyUniqueString)] pub unsafe fn globallyUniqueString(&self) -> Id; + #[method(operatingSystem)] pub unsafe fn operatingSystem(&self) -> NSUInteger; + #[method_id(operatingSystemName)] pub unsafe fn operatingSystemName(&self) -> Id; + #[method_id(operatingSystemVersionString)] pub unsafe fn operatingSystemVersionString(&self) -> Id; + #[method(operatingSystemVersion)] pub unsafe fn operatingSystemVersion(&self) -> NSOperatingSystemVersion; + #[method(processorCount)] pub unsafe fn processorCount(&self) -> NSUInteger; + #[method(activeProcessorCount)] pub unsafe fn activeProcessorCount(&self) -> NSUInteger; + #[method(physicalMemory)] pub unsafe fn physicalMemory(&self) -> c_ulonglong; + #[method(isOperatingSystemAtLeastVersion:)] pub unsafe fn isOperatingSystemAtLeastVersion( &self, version: NSOperatingSystemVersion, ) -> bool; + #[method(systemUptime)] pub unsafe fn systemUptime(&self) -> NSTimeInterval; + #[method(disableSuddenTermination)] pub unsafe fn disableSuddenTermination(&self); + #[method(enableSuddenTermination)] pub unsafe fn enableSuddenTermination(&self); + #[method(disableAutomaticTermination:)] pub unsafe fn disableAutomaticTermination(&self, reason: &NSString); + #[method(enableAutomaticTermination:)] pub unsafe fn enableAutomaticTermination(&self, reason: &NSString); + #[method(automaticTerminationSupportEnabled)] pub unsafe fn automaticTerminationSupportEnabled(&self) -> bool; + #[method(setAutomaticTerminationSupportEnabled:)] pub unsafe fn setAutomaticTerminationSupportEnabled( &self, @@ -65,8 +92,9 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSProcessInfoActivity"] + /// NSProcessInfoActivity unsafe impl NSProcessInfo { #[method_id(beginActivityWithOptions:reason:)] pub unsafe fn beginActivityWithOptions_reason( @@ -74,8 +102,10 @@ extern_methods!( options: NSActivityOptions, reason: &NSString, ) -> Id; + #[method(endActivity:)] pub unsafe fn endActivity(&self, activity: &NSObject); + #[method(performActivityWithOptions:reason:usingBlock:)] pub unsafe fn performActivityWithOptions_reason_usingBlock( &self, @@ -83,6 +113,7 @@ extern_methods!( reason: &NSString, block: TodoBlock, ); + #[method(performExpiringActivityWithReason:usingBlock:)] pub unsafe fn performExpiringActivityWithReason_usingBlock( &self, @@ -91,34 +122,40 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSUserInformation"] + /// NSUserInformation unsafe impl NSProcessInfo { #[method_id(userName)] pub unsafe fn userName(&self) -> Id; + #[method_id(fullUserName)] pub unsafe fn fullUserName(&self) -> Id; } ); + extern_methods!( - #[doc = "NSProcessInfoThermalState"] + /// NSProcessInfoThermalState unsafe impl NSProcessInfo { #[method(thermalState)] pub unsafe fn thermalState(&self) -> NSProcessInfoThermalState; } ); + extern_methods!( - #[doc = "NSProcessInfoPowerState"] + /// NSProcessInfoPowerState unsafe impl NSProcessInfo { #[method(isLowPowerModeEnabled)] pub unsafe fn isLowPowerModeEnabled(&self) -> bool; } ); + extern_methods!( - #[doc = "NSProcessInfoPlatform"] + /// NSProcessInfoPlatform unsafe impl NSProcessInfo { #[method(isMacCatalystApp)] pub unsafe fn isMacCatalystApp(&self) -> bool; + #[method(isiOSAppOnMac)] pub unsafe fn isiOSAppOnMac(&self) -> bool; } diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index d56f25804..2670d02e5 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -1,162 +1,226 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSProgressKind = NSString; + pub type NSProgressUserInfoKey = NSString; + pub type NSProgressFileOperationKind = NSString; + extern_class!( #[derive(Debug)] pub struct NSProgress; + unsafe impl ClassType for NSProgress { type Super = NSObject; } ); + extern_methods!( unsafe impl NSProgress { #[method_id(currentProgress)] pub unsafe fn currentProgress() -> Option>; + #[method_id(progressWithTotalUnitCount:)] pub unsafe fn progressWithTotalUnitCount(unitCount: int64_t) -> Id; + #[method_id(discreteProgressWithTotalUnitCount:)] pub unsafe fn discreteProgressWithTotalUnitCount( unitCount: int64_t, ) -> Id; + #[method_id(progressWithTotalUnitCount:parent:pendingUnitCount:)] pub unsafe fn progressWithTotalUnitCount_parent_pendingUnitCount( unitCount: int64_t, parent: &NSProgress, portionOfParentTotalUnitCount: int64_t, ) -> Id; + #[method_id(initWithParent:userInfo:)] pub unsafe fn initWithParent_userInfo( &self, parentProgressOrNil: Option<&NSProgress>, userInfoOrNil: Option<&NSDictionary>, ) -> Id; + #[method(becomeCurrentWithPendingUnitCount:)] pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unitCount: int64_t); + #[method(performAsCurrentWithPendingUnitCount:usingBlock:)] pub unsafe fn performAsCurrentWithPendingUnitCount_usingBlock( &self, unitCount: int64_t, work: TodoBlock, ); + #[method(resignCurrent)] pub unsafe fn resignCurrent(&self); + #[method(addChild:withPendingUnitCount:)] pub unsafe fn addChild_withPendingUnitCount( &self, child: &NSProgress, inUnitCount: int64_t, ); + #[method(totalUnitCount)] pub unsafe fn totalUnitCount(&self) -> int64_t; + #[method(setTotalUnitCount:)] pub unsafe fn setTotalUnitCount(&self, totalUnitCount: int64_t); + #[method(completedUnitCount)] pub unsafe fn completedUnitCount(&self) -> int64_t; + #[method(setCompletedUnitCount:)] pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: int64_t); + #[method_id(localizedDescription)] pub unsafe fn localizedDescription(&self) -> Id; + #[method(setLocalizedDescription:)] pub unsafe fn setLocalizedDescription(&self, localizedDescription: Option<&NSString>); + #[method_id(localizedAdditionalDescription)] pub unsafe fn localizedAdditionalDescription(&self) -> Id; + #[method(setLocalizedAdditionalDescription:)] pub unsafe fn setLocalizedAdditionalDescription( &self, localizedAdditionalDescription: Option<&NSString>, ); + #[method(isCancellable)] pub unsafe fn isCancellable(&self) -> bool; + #[method(setCancellable:)] pub unsafe fn setCancellable(&self, cancellable: bool); + #[method(isPausable)] pub unsafe fn isPausable(&self) -> bool; + #[method(setPausable:)] pub unsafe fn setPausable(&self, pausable: bool); + #[method(isCancelled)] pub unsafe fn isCancelled(&self) -> bool; + #[method(isPaused)] pub unsafe fn isPaused(&self) -> bool; + #[method(cancellationHandler)] pub unsafe fn cancellationHandler(&self) -> TodoBlock; + #[method(setCancellationHandler:)] pub unsafe fn setCancellationHandler(&self, cancellationHandler: TodoBlock); + #[method(pausingHandler)] pub unsafe fn pausingHandler(&self) -> TodoBlock; + #[method(setPausingHandler:)] pub unsafe fn setPausingHandler(&self, pausingHandler: TodoBlock); + #[method(resumingHandler)] pub unsafe fn resumingHandler(&self) -> TodoBlock; + #[method(setResumingHandler:)] pub unsafe fn setResumingHandler(&self, resumingHandler: TodoBlock); + #[method(setUserInfoObject:forKey:)] pub unsafe fn setUserInfoObject_forKey( &self, objectOrNil: Option<&Object>, key: &NSProgressUserInfoKey, ); + #[method(isIndeterminate)] pub unsafe fn isIndeterminate(&self) -> bool; + #[method(fractionCompleted)] pub unsafe fn fractionCompleted(&self) -> c_double; + #[method(isFinished)] pub unsafe fn isFinished(&self) -> bool; + #[method(cancel)] pub unsafe fn cancel(&self); + #[method(pause)] pub unsafe fn pause(&self); + #[method(resume)] pub unsafe fn resume(&self); + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Id, Shared>; + #[method_id(kind)] pub unsafe fn kind(&self) -> Option>; + #[method(setKind:)] pub unsafe fn setKind(&self, kind: Option<&NSProgressKind>); + #[method_id(estimatedTimeRemaining)] pub unsafe fn estimatedTimeRemaining(&self) -> Option>; + #[method(setEstimatedTimeRemaining:)] pub unsafe fn setEstimatedTimeRemaining(&self, estimatedTimeRemaining: Option<&NSNumber>); + #[method_id(throughput)] pub unsafe fn throughput(&self) -> Option>; + #[method(setThroughput:)] pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>); + #[method_id(fileOperationKind)] pub unsafe fn fileOperationKind(&self) -> Option>; + #[method(setFileOperationKind:)] pub unsafe fn setFileOperationKind( &self, fileOperationKind: Option<&NSProgressFileOperationKind>, ); + #[method_id(fileURL)] pub unsafe fn fileURL(&self) -> Option>; + #[method(setFileURL:)] pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>); + #[method_id(fileTotalCount)] pub unsafe fn fileTotalCount(&self) -> Option>; + #[method(setFileTotalCount:)] pub unsafe fn setFileTotalCount(&self, fileTotalCount: Option<&NSNumber>); + #[method_id(fileCompletedCount)] pub unsafe fn fileCompletedCount(&self) -> Option>; + #[method(setFileCompletedCount:)] pub unsafe fn setFileCompletedCount(&self, fileCompletedCount: Option<&NSNumber>); + #[method(publish)] pub unsafe fn publish(&self); + #[method(unpublish)] pub unsafe fn unpublish(&self); + #[method_id(addSubscriberForFileURL:withPublishingHandler:)] pub unsafe fn addSubscriberForFileURL_withPublishingHandler( url: &NSURL, publishingHandler: NSProgressPublishingHandler, ) -> Id; + #[method(removeSubscriber:)] pub unsafe fn removeSubscriber(subscriber: &Object); + #[method(isOld)] pub unsafe fn isOld(&self) -> bool; } ); + pub type NSProgressReporting = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 90da8ab83..92a87e6db 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -1,16 +1,23 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSPropertyListReadOptions = NSPropertyListMutabilityOptions; + pub type NSPropertyListWriteOptions = NSUInteger; + extern_class!( #[derive(Debug)] pub struct NSPropertyListSerialization; + unsafe impl ClassType for NSPropertyListSerialization { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPropertyListSerialization { #[method(propertyList:isValidForFormat:)] @@ -18,18 +25,21 @@ extern_methods!( plist: &Object, format: NSPropertyListFormat, ) -> bool; + #[method_id(dataWithPropertyList:format:options:error:)] pub unsafe fn dataWithPropertyList_format_options_error( plist: &Object, format: NSPropertyListFormat, opt: NSPropertyListWriteOptions, ) -> Result, Id>; + #[method_id(propertyListWithData:options:format:error:)] pub unsafe fn propertyListWithData_options_format_error( data: &NSData, opt: NSPropertyListReadOptions, format: *mut NSPropertyListFormat, ) -> Result, Id>; + #[method_id(propertyListWithStream:options:format:error:)] pub unsafe fn propertyListWithStream_options_format_error( stream: &NSInputStream, diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index 74b9aaee9..1275f9bfa 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -1,30 +1,38 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSProtocolChecker; + unsafe impl ClassType for NSProtocolChecker { type Super = NSProxy; } ); + extern_methods!( unsafe impl NSProtocolChecker { #[method_id(protocol)] pub unsafe fn protocol(&self) -> Id; + #[method_id(target)] pub unsafe fn target(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSProtocolCheckerCreation"] + /// NSProtocolCheckerCreation unsafe impl NSProtocolChecker { #[method_id(protocolCheckerWithTarget:protocol:)] pub unsafe fn protocolCheckerWithTarget_protocol( anObject: &NSObject, aProtocol: &Protocol, ) -> Id; + #[method_id(initWithTarget:protocol:)] pub unsafe fn initWithTarget_protocol( &self, diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 4b2b4db57..185181637 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -1,41 +1,57 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSProxy; + unsafe impl ClassType for NSProxy { type Super = Object; } ); + extern_methods!( unsafe impl NSProxy { #[method_id(alloc)] pub unsafe fn alloc() -> Id; + #[method_id(allocWithZone:)] pub unsafe fn allocWithZone(zone: *mut NSZone) -> Id; + #[method(class)] pub unsafe fn class() -> &Class; + #[method(forwardInvocation:)] pub unsafe fn forwardInvocation(&self, invocation: &NSInvocation); + #[method_id(methodSignatureForSelector:)] pub unsafe fn methodSignatureForSelector( &self, sel: Sel, ) -> Option>; + #[method(dealloc)] pub unsafe fn dealloc(&self); + #[method(finalize)] pub unsafe fn finalize(&self); + #[method_id(description)] pub unsafe fn description(&self) -> Id; + #[method_id(debugDescription)] pub unsafe fn debugDescription(&self) -> Id; + #[method(respondsToSelector:)] pub unsafe fn respondsToSelector(aSelector: Sel) -> bool; + #[method(allowsWeakReference)] pub unsafe fn allowsWeakReference(&self) -> bool; + #[method(retainWeakReference)] pub unsafe fn retainWeakReference(&self) -> bool; } diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index f0c59642c..723f41bb0 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -1,12 +1,16 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSValueRangeExtensions"] + /// NSValueRangeExtensions unsafe impl NSValue { #[method_id(valueWithRange:)] pub unsafe fn valueWithRange(range: NSRange) -> Id; + #[method(rangeValue)] pub unsafe fn rangeValue(&self) -> NSRange; } diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index bd9c9cb10..5d0b61c83 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSRegularExpression; + unsafe impl ClassType for NSRegularExpression { type Super = NSObject; } ); + extern_methods!( unsafe impl NSRegularExpression { #[method_id(regularExpressionWithPattern:options:error:)] @@ -16,24 +21,30 @@ extern_methods!( pattern: &NSString, options: NSRegularExpressionOptions, ) -> Result, Id>; + #[method_id(initWithPattern:options:error:)] pub unsafe fn initWithPattern_options_error( &self, pattern: &NSString, options: NSRegularExpressionOptions, ) -> Result, Id>; + #[method_id(pattern)] pub unsafe fn pattern(&self) -> Id; + #[method(options)] pub unsafe fn options(&self) -> NSRegularExpressionOptions; + #[method(numberOfCaptureGroups)] pub unsafe fn numberOfCaptureGroups(&self) -> NSUInteger; + #[method_id(escapedPatternForString:)] pub unsafe fn escapedPatternForString(string: &NSString) -> Id; } ); + extern_methods!( - #[doc = "NSMatching"] + /// NSMatching unsafe impl NSRegularExpression { #[method(enumerateMatchesInString:options:range:usingBlock:)] pub unsafe fn enumerateMatchesInString_options_range_usingBlock( @@ -43,6 +54,7 @@ extern_methods!( range: NSRange, block: TodoBlock, ); + #[method_id(matchesInString:options:range:)] pub unsafe fn matchesInString_options_range( &self, @@ -50,6 +62,7 @@ extern_methods!( options: NSMatchingOptions, range: NSRange, ) -> Id, Shared>; + #[method(numberOfMatchesInString:options:range:)] pub unsafe fn numberOfMatchesInString_options_range( &self, @@ -57,6 +70,7 @@ extern_methods!( options: NSMatchingOptions, range: NSRange, ) -> NSUInteger; + #[method_id(firstMatchInString:options:range:)] pub unsafe fn firstMatchInString_options_range( &self, @@ -64,6 +78,7 @@ extern_methods!( options: NSMatchingOptions, range: NSRange, ) -> Option>; + #[method(rangeOfFirstMatchInString:options:range:)] pub unsafe fn rangeOfFirstMatchInString_options_range( &self, @@ -73,8 +88,9 @@ extern_methods!( ) -> NSRange; } ); + extern_methods!( - #[doc = "NSReplacement"] + /// NSReplacement unsafe impl NSRegularExpression { #[method_id(stringByReplacingMatchesInString:options:range:withTemplate:)] pub unsafe fn stringByReplacingMatchesInString_options_range_withTemplate( @@ -84,6 +100,7 @@ extern_methods!( range: NSRange, templ: &NSString, ) -> Id; + #[method(replaceMatchesInString:options:range:withTemplate:)] pub unsafe fn replaceMatchesInString_options_range_withTemplate( &self, @@ -92,6 +109,7 @@ extern_methods!( range: NSRange, templ: &NSString, ) -> NSUInteger; + #[method_id(replacementStringForResult:inString:offset:template:)] pub unsafe fn replacementStringForResult_inString_offset_template( &self, @@ -100,28 +118,34 @@ extern_methods!( offset: NSInteger, templ: &NSString, ) -> Id; + #[method_id(escapedTemplateForString:)] pub unsafe fn escapedTemplateForString(string: &NSString) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSDataDetector; + unsafe impl ClassType for NSDataDetector { type Super = NSRegularExpression; } ); + extern_methods!( unsafe impl NSDataDetector { #[method_id(dataDetectorWithTypes:error:)] pub unsafe fn dataDetectorWithTypes_error( checkingTypes: NSTextCheckingTypes, ) -> Result, Id>; + #[method_id(initWithTypes:error:)] pub unsafe fn initWithTypes_error( &self, checkingTypes: NSTextCheckingTypes, ) -> Result, Id>; + #[method(checkingTypes)] pub unsafe fn checkingTypes(&self) -> NSTextCheckingTypes; } diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index 8e603f73b..82f57fe4b 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -1,52 +1,70 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSRelativeDateTimeFormatter; + unsafe impl ClassType for NSRelativeDateTimeFormatter { type Super = NSFormatter; } ); + extern_methods!( unsafe impl NSRelativeDateTimeFormatter { #[method(dateTimeStyle)] pub unsafe fn dateTimeStyle(&self) -> NSRelativeDateTimeFormatterStyle; + #[method(setDateTimeStyle:)] pub unsafe fn setDateTimeStyle(&self, dateTimeStyle: NSRelativeDateTimeFormatterStyle); + #[method(unitsStyle)] pub unsafe fn unitsStyle(&self) -> NSRelativeDateTimeFormatterUnitsStyle; + #[method(setUnitsStyle:)] pub unsafe fn setUnitsStyle(&self, unitsStyle: NSRelativeDateTimeFormatterUnitsStyle); + #[method(formattingContext)] pub unsafe fn formattingContext(&self) -> NSFormattingContext; + #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); + #[method_id(calendar)] pub unsafe fn calendar(&self) -> Id; + #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); + #[method_id(locale)] pub unsafe fn locale(&self) -> Id; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); + #[method_id(localizedStringFromDateComponents:)] pub unsafe fn localizedStringFromDateComponents( &self, dateComponents: &NSDateComponents, ) -> Id; + #[method_id(localizedStringFromTimeInterval:)] pub unsafe fn localizedStringFromTimeInterval( &self, timeInterval: NSTimeInterval, ) -> Id; + #[method_id(localizedStringForDate:relativeToDate:)] pub unsafe fn localizedStringForDate_relativeToDate( &self, date: &NSDate, referenceDate: &NSDate, ) -> Id; + #[method_id(stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index f0171125c..650d1aa60 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -1,32 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSRunLoop; + unsafe impl ClassType for NSRunLoop { type Super = NSObject; } ); + extern_methods!( unsafe impl NSRunLoop { #[method_id(currentRunLoop)] pub unsafe fn currentRunLoop() -> Id; + #[method_id(mainRunLoop)] pub unsafe fn mainRunLoop() -> Id; + #[method_id(currentMode)] pub unsafe fn currentMode(&self) -> Option>; + #[method(getCFRunLoop)] pub unsafe fn getCFRunLoop(&self) -> CFRunLoopRef; + #[method(addTimer:forMode:)] pub unsafe fn addTimer_forMode(&self, timer: &NSTimer, mode: &NSRunLoopMode); + #[method(addPort:forMode:)] pub unsafe fn addPort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode); + #[method(removePort:forMode:)] pub unsafe fn removePort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode); + #[method_id(limitDateForMode:)] pub unsafe fn limitDateForMode(&self, mode: &NSRunLoopMode) -> Option>; + #[method(acceptInputForMode:beforeDate:)] pub unsafe fn acceptInputForMode_beforeDate( &self, @@ -35,25 +48,32 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSRunLoopConveniences"] + /// NSRunLoopConveniences unsafe impl NSRunLoop { #[method(run)] pub unsafe fn run(&self); + #[method(runUntilDate:)] pub unsafe fn runUntilDate(&self, limitDate: &NSDate); + #[method(runMode:beforeDate:)] pub unsafe fn runMode_beforeDate(&self, mode: &NSRunLoopMode, limitDate: &NSDate) -> bool; + #[method(configureAsServer)] pub unsafe fn configureAsServer(&self); + #[method(performInModes:block:)] pub unsafe fn performInModes_block(&self, modes: &NSArray, block: TodoBlock); + #[method(performBlock:)] pub unsafe fn performBlock(&self, block: TodoBlock); } ); + extern_methods!( - #[doc = "NSDelayedPerforming"] + /// NSDelayedPerforming unsafe impl NSObject { #[method(performSelector:withObject:afterDelay:inModes:)] pub unsafe fn performSelector_withObject_afterDelay_inModes( @@ -63,6 +83,7 @@ extern_methods!( delay: NSTimeInterval, modes: &NSArray, ); + #[method(performSelector:withObject:afterDelay:)] pub unsafe fn performSelector_withObject_afterDelay( &self, @@ -70,18 +91,21 @@ extern_methods!( anArgument: Option<&Object>, delay: NSTimeInterval, ); + #[method(cancelPreviousPerformRequestsWithTarget:selector:object:)] pub unsafe fn cancelPreviousPerformRequestsWithTarget_selector_object( aTarget: &Object, aSelector: Sel, anArgument: Option<&Object>, ); + #[method(cancelPreviousPerformRequestsWithTarget:)] pub unsafe fn cancelPreviousPerformRequestsWithTarget(aTarget: &Object); } ); + extern_methods!( - #[doc = "NSOrderedPerform"] + /// NSOrderedPerform unsafe impl NSRunLoop { #[method(performSelector:target:argument:order:modes:)] pub unsafe fn performSelector_target_argument_order_modes( @@ -92,6 +116,7 @@ extern_methods!( order: NSUInteger, modes: &NSArray, ); + #[method(cancelPerformSelector:target:argument:)] pub unsafe fn cancelPerformSelector_target_argument( &self, @@ -99,6 +124,7 @@ extern_methods!( target: &Object, arg: Option<&Object>, ); + #[method(cancelPerformSelectorsWithTarget:)] pub unsafe fn cancelPerformSelectorsWithTarget(&self, target: &Object); } diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 3807e4a25..93091bca3 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -1,92 +1,123 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScanner; + unsafe impl ClassType for NSScanner { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScanner { #[method_id(string)] pub unsafe fn string(&self) -> Id; + #[method(scanLocation)] pub unsafe fn scanLocation(&self) -> NSUInteger; + #[method(setScanLocation:)] pub unsafe fn setScanLocation(&self, scanLocation: NSUInteger); + #[method_id(charactersToBeSkipped)] pub unsafe fn charactersToBeSkipped(&self) -> Option>; + #[method(setCharactersToBeSkipped:)] pub unsafe fn setCharactersToBeSkipped( &self, charactersToBeSkipped: Option<&NSCharacterSet>, ); + #[method(caseSensitive)] pub unsafe fn caseSensitive(&self) -> bool; + #[method(setCaseSensitive:)] pub unsafe fn setCaseSensitive(&self, caseSensitive: bool); + #[method_id(locale)] pub unsafe fn locale(&self) -> Option>; + #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&Object>); + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, string: &NSString) -> Id; } ); + extern_methods!( - #[doc = "NSExtendedScanner"] + /// NSExtendedScanner unsafe impl NSScanner { #[method(scanInt:)] pub unsafe fn scanInt(&self, result: *mut c_int) -> bool; + #[method(scanInteger:)] pub unsafe fn scanInteger(&self, result: *mut NSInteger) -> bool; + #[method(scanLongLong:)] pub unsafe fn scanLongLong(&self, result: *mut c_longlong) -> bool; + #[method(scanUnsignedLongLong:)] pub unsafe fn scanUnsignedLongLong(&self, result: *mut c_ulonglong) -> bool; + #[method(scanFloat:)] pub unsafe fn scanFloat(&self, result: *mut c_float) -> bool; + #[method(scanDouble:)] pub unsafe fn scanDouble(&self, result: *mut c_double) -> bool; + #[method(scanHexInt:)] pub unsafe fn scanHexInt(&self, result: *mut c_uint) -> bool; + #[method(scanHexLongLong:)] pub unsafe fn scanHexLongLong(&self, result: *mut c_ulonglong) -> bool; + #[method(scanHexFloat:)] pub unsafe fn scanHexFloat(&self, result: *mut c_float) -> bool; + #[method(scanHexDouble:)] pub unsafe fn scanHexDouble(&self, result: *mut c_double) -> bool; + #[method(scanString:intoString:)] pub unsafe fn scanString_intoString( &self, string: &NSString, result: Option<&mut Option>>, ) -> bool; + #[method(scanCharactersFromSet:intoString:)] pub unsafe fn scanCharactersFromSet_intoString( &self, set: &NSCharacterSet, result: Option<&mut Option>>, ) -> bool; + #[method(scanUpToString:intoString:)] pub unsafe fn scanUpToString_intoString( &self, string: &NSString, result: Option<&mut Option>>, ) -> bool; + #[method(scanUpToCharactersFromSet:intoString:)] pub unsafe fn scanUpToCharactersFromSet_intoString( &self, set: &NSCharacterSet, result: Option<&mut Option>>, ) -> bool; + #[method(isAtEnd)] pub unsafe fn isAtEnd(&self) -> bool; + #[method_id(scannerWithString:)] pub unsafe fn scannerWithString(string: &NSString) -> Id; + #[method_id(localizedScannerWithString:)] pub unsafe fn localizedScannerWithString(string: &NSString) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index ff8cd0fe8..0c22917ac 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -1,20 +1,26 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScriptClassDescription; + unsafe impl ClassType for NSScriptClassDescription { type Super = NSClassDescription; } ); + extern_methods!( unsafe impl NSScriptClassDescription { #[method_id(classDescriptionForClass:)] pub unsafe fn classDescriptionForClass( aClass: &Class, ) -> Option>; + #[method_id(initWithSuiteName:className:dictionary:)] pub unsafe fn initWithSuiteName_className_dictionary( &self, @@ -22,71 +28,92 @@ extern_methods!( className: &NSString, classDeclaration: Option<&NSDictionary>, ) -> Option>; + #[method_id(suiteName)] pub unsafe fn suiteName(&self) -> Option>; + #[method_id(className)] pub unsafe fn className(&self) -> Option>; + #[method_id(implementationClassName)] pub unsafe fn implementationClassName(&self) -> Option>; + #[method_id(superclassDescription)] pub unsafe fn superclassDescription(&self) -> Option>; + #[method(appleEventCode)] pub unsafe fn appleEventCode(&self) -> FourCharCode; + #[method(matchesAppleEventCode:)] pub unsafe fn matchesAppleEventCode(&self, appleEventCode: FourCharCode) -> bool; + #[method(supportsCommand:)] pub unsafe fn supportsCommand( &self, commandDescription: &NSScriptCommandDescription, ) -> bool; + #[method(selectorForCommand:)] pub unsafe fn selectorForCommand( &self, commandDescription: &NSScriptCommandDescription, ) -> Option; + #[method_id(typeForKey:)] pub unsafe fn typeForKey(&self, key: &NSString) -> Option>; + #[method_id(classDescriptionForKey:)] pub unsafe fn classDescriptionForKey( &self, key: &NSString, ) -> Option>; + #[method(appleEventCodeForKey:)] pub unsafe fn appleEventCodeForKey(&self, key: &NSString) -> FourCharCode; + #[method_id(keyWithAppleEventCode:)] pub unsafe fn keyWithAppleEventCode( &self, appleEventCode: FourCharCode, ) -> Option>; + #[method_id(defaultSubcontainerAttributeKey)] pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option>; + #[method(isLocationRequiredToCreateForKey:)] pub unsafe fn isLocationRequiredToCreateForKey( &self, toManyRelationshipKey: &NSString, ) -> bool; + #[method(hasPropertyForKey:)] pub unsafe fn hasPropertyForKey(&self, key: &NSString) -> bool; + #[method(hasOrderedToManyRelationshipForKey:)] pub unsafe fn hasOrderedToManyRelationshipForKey(&self, key: &NSString) -> bool; + #[method(hasReadablePropertyForKey:)] pub unsafe fn hasReadablePropertyForKey(&self, key: &NSString) -> bool; + #[method(hasWritablePropertyForKey:)] pub unsafe fn hasWritablePropertyForKey(&self, key: &NSString) -> bool; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSScriptClassDescription { #[method(isReadOnlyKey:)] pub unsafe fn isReadOnlyKey(&self, key: &NSString) -> bool; } ); + extern_methods!( - #[doc = "NSScriptClassDescription"] + /// NSScriptClassDescription unsafe impl NSObject { #[method(classCode)] pub unsafe fn classCode(&self) -> FourCharCode; + #[method_id(className)] pub unsafe fn className(&self) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs index 3a3ad46b8..251b103f0 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -1,24 +1,31 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScriptCoercionHandler; + unsafe impl ClassType for NSScriptCoercionHandler { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScriptCoercionHandler { #[method_id(sharedCoercionHandler)] pub unsafe fn sharedCoercionHandler() -> Id; + #[method_id(coerceValue:toClass:)] pub unsafe fn coerceValue_toClass( &self, value: &Object, toClass: &Class, ) -> Option>; + #[method(registerCoercer:selector:toConvertFromClass:toClass:)] pub unsafe fn registerCoercer_selector_toConvertFromClass_toClass( &self, diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 6b681881a..f8fc15670 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScriptCommand; + unsafe impl ClassType for NSScriptCommand { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScriptCommand { #[method_id(initWithCommandDescription:)] @@ -16,69 +21,94 @@ extern_methods!( &self, commandDef: &NSScriptCommandDescription, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(commandDescription)] pub unsafe fn commandDescription(&self) -> Id; + #[method_id(directParameter)] pub unsafe fn directParameter(&self) -> Option>; + #[method(setDirectParameter:)] pub unsafe fn setDirectParameter(&self, directParameter: Option<&Object>); + #[method_id(receiversSpecifier)] pub unsafe fn receiversSpecifier(&self) -> Option>; + #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier( &self, receiversSpecifier: Option<&NSScriptObjectSpecifier>, ); + #[method_id(evaluatedReceivers)] pub unsafe fn evaluatedReceivers(&self) -> Option>; + #[method_id(arguments)] pub unsafe fn arguments(&self) -> Option, Shared>>; + #[method(setArguments:)] pub unsafe fn setArguments(&self, arguments: Option<&NSDictionary>); + #[method_id(evaluatedArguments)] pub unsafe fn evaluatedArguments( &self, ) -> Option, Shared>>; + #[method(isWellFormed)] pub unsafe fn isWellFormed(&self) -> bool; + #[method_id(performDefaultImplementation)] pub unsafe fn performDefaultImplementation(&self) -> Option>; + #[method_id(executeCommand)] pub unsafe fn executeCommand(&self) -> Option>; + #[method(scriptErrorNumber)] pub unsafe fn scriptErrorNumber(&self) -> NSInteger; + #[method(setScriptErrorNumber:)] pub unsafe fn setScriptErrorNumber(&self, scriptErrorNumber: NSInteger); + #[method_id(scriptErrorOffendingObjectDescriptor)] pub unsafe fn scriptErrorOffendingObjectDescriptor( &self, ) -> Option>; + #[method(setScriptErrorOffendingObjectDescriptor:)] pub unsafe fn setScriptErrorOffendingObjectDescriptor( &self, scriptErrorOffendingObjectDescriptor: Option<&NSAppleEventDescriptor>, ); + #[method_id(scriptErrorExpectedTypeDescriptor)] pub unsafe fn scriptErrorExpectedTypeDescriptor( &self, ) -> Option>; + #[method(setScriptErrorExpectedTypeDescriptor:)] pub unsafe fn setScriptErrorExpectedTypeDescriptor( &self, scriptErrorExpectedTypeDescriptor: Option<&NSAppleEventDescriptor>, ); + #[method_id(scriptErrorString)] pub unsafe fn scriptErrorString(&self) -> Option>; + #[method(setScriptErrorString:)] pub unsafe fn setScriptErrorString(&self, scriptErrorString: Option<&NSString>); + #[method_id(currentCommand)] pub unsafe fn currentCommand() -> Option>; + #[method_id(appleEvent)] pub unsafe fn appleEvent(&self) -> Option>; + #[method(suspendExecution)] pub unsafe fn suspendExecution(&self); + #[method(resumeExecutionWithResult:)] pub unsafe fn resumeExecutionWithResult(&self, result: Option<&Object>); } diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index 3bc45100c..da4236dc4 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -1,18 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScriptCommandDescription; + unsafe impl ClassType for NSScriptCommandDescription { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScriptCommandDescription { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithSuiteName:commandName:dictionary:)] pub unsafe fn initWithSuiteName_commandName_dictionary( &self, @@ -20,38 +26,52 @@ extern_methods!( commandName: &NSString, commandDeclaration: Option<&NSDictionary>, ) -> Option>; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(suiteName)] pub unsafe fn suiteName(&self) -> Id; + #[method_id(commandName)] pub unsafe fn commandName(&self) -> Id; + #[method(appleEventClassCode)] pub unsafe fn appleEventClassCode(&self) -> FourCharCode; + #[method(appleEventCode)] pub unsafe fn appleEventCode(&self) -> FourCharCode; + #[method_id(commandClassName)] pub unsafe fn commandClassName(&self) -> Id; + #[method_id(returnType)] pub unsafe fn returnType(&self) -> Option>; + #[method(appleEventCodeForReturnType)] pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode; + #[method_id(argumentNames)] pub unsafe fn argumentNames(&self) -> Id, Shared>; + #[method_id(typeForArgumentWithName:)] pub unsafe fn typeForArgumentWithName( &self, argumentName: &NSString, ) -> Option>; + #[method(appleEventCodeForArgumentWithName:)] pub unsafe fn appleEventCodeForArgumentWithName( &self, argumentName: &NSString, ) -> FourCharCode; + #[method(isOptionalArgumentWithName:)] pub unsafe fn isOptionalArgumentWithName(&self, argumentName: &NSString) -> bool; + #[method_id(createCommandInstance)] pub unsafe fn createCommandInstance(&self) -> Id; + #[method_id(createCommandInstanceWithZone:)] pub unsafe fn createCommandInstanceWithZone( &self, diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index 398227d92..f14a2a0a8 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScriptExecutionContext; + unsafe impl ClassType for NSScriptExecutionContext { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScriptExecutionContext { #[method_id(sharedScriptExecutionContext)] pub unsafe fn sharedScriptExecutionContext() -> Id; + #[method_id(topLevelObject)] pub unsafe fn topLevelObject(&self) -> Option>; + #[method(setTopLevelObject:)] pub unsafe fn setTopLevelObject(&self, topLevelObject: Option<&Object>); + #[method_id(objectBeingTested)] pub unsafe fn objectBeingTested(&self) -> Option>; + #[method(setObjectBeingTested:)] pub unsafe fn setObjectBeingTested(&self, objectBeingTested: Option<&Object>); + #[method_id(rangeContainerObject)] pub unsafe fn rangeContainerObject(&self) -> Option>; + #[method(setRangeContainerObject:)] pub unsafe fn setRangeContainerObject(&self, rangeContainerObject: Option<&Object>); } diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index a1a1d1483..91abe6c14 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -1,9 +1,12 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_methods!( - #[doc = "NSScriptKeyValueCoding"] + /// NSScriptKeyValueCoding unsafe impl NSObject { #[method_id(valueAtIndex:inPropertyWithKey:)] pub unsafe fn valueAtIndex_inPropertyWithKey( @@ -11,18 +14,21 @@ extern_methods!( index: NSUInteger, key: &NSString, ) -> Option>; + #[method_id(valueWithName:inPropertyWithKey:)] pub unsafe fn valueWithName_inPropertyWithKey( &self, name: &NSString, key: &NSString, ) -> Option>; + #[method_id(valueWithUniqueID:inPropertyWithKey:)] pub unsafe fn valueWithUniqueID_inPropertyWithKey( &self, uniqueID: &Object, key: &NSString, ) -> Option>; + #[method(insertValue:atIndex:inPropertyWithKey:)] pub unsafe fn insertValue_atIndex_inPropertyWithKey( &self, @@ -30,12 +36,14 @@ extern_methods!( index: NSUInteger, key: &NSString, ); + #[method(removeValueAtIndex:fromPropertyWithKey:)] pub unsafe fn removeValueAtIndex_fromPropertyWithKey( &self, index: NSUInteger, key: &NSString, ); + #[method(replaceValueAtIndex:inPropertyWithKey:withValue:)] pub unsafe fn replaceValueAtIndex_inPropertyWithKey_withValue( &self, @@ -43,8 +51,10 @@ extern_methods!( key: &NSString, value: &Object, ); + #[method(insertValue:inPropertyWithKey:)] pub unsafe fn insertValue_inPropertyWithKey(&self, value: &Object, key: &NSString); + #[method_id(coerceValue:forKey:)] pub unsafe fn coerceValue_forKey( &self, diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index 3cb95aeaf..c3d7a3a58 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -1,26 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScriptObjectSpecifier; + unsafe impl ClassType for NSScriptObjectSpecifier { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScriptObjectSpecifier { #[method_id(objectSpecifierWithDescriptor:)] pub unsafe fn objectSpecifierWithDescriptor( descriptor: &NSAppleEventDescriptor, ) -> Option>; + #[method_id(initWithContainerSpecifier:key:)] pub unsafe fn initWithContainerSpecifier_key( &self, container: &NSScriptObjectSpecifier, property: &NSString, ) -> Id; + #[method_id(initWithContainerClassDescription:containerSpecifier:key:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key( &self, @@ -28,75 +35,98 @@ extern_methods!( container: Option<&NSScriptObjectSpecifier>, property: &NSString, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(childSpecifier)] pub unsafe fn childSpecifier(&self) -> Option>; + #[method(setChildSpecifier:)] pub unsafe fn setChildSpecifier(&self, childSpecifier: Option<&NSScriptObjectSpecifier>); + #[method_id(containerSpecifier)] pub unsafe fn containerSpecifier(&self) -> Option>; + #[method(setContainerSpecifier:)] pub unsafe fn setContainerSpecifier( &self, containerSpecifier: Option<&NSScriptObjectSpecifier>, ); + #[method(containerIsObjectBeingTested)] pub unsafe fn containerIsObjectBeingTested(&self) -> bool; + #[method(setContainerIsObjectBeingTested:)] pub unsafe fn setContainerIsObjectBeingTested(&self, containerIsObjectBeingTested: bool); + #[method(containerIsRangeContainerObject)] pub unsafe fn containerIsRangeContainerObject(&self) -> bool; + #[method(setContainerIsRangeContainerObject:)] pub unsafe fn setContainerIsRangeContainerObject( &self, containerIsRangeContainerObject: bool, ); + #[method_id(key)] pub unsafe fn key(&self) -> Id; + #[method(setKey:)] pub unsafe fn setKey(&self, key: &NSString); + #[method_id(containerClassDescription)] pub unsafe fn containerClassDescription( &self, ) -> Option>; + #[method(setContainerClassDescription:)] pub unsafe fn setContainerClassDescription( &self, containerClassDescription: Option<&NSScriptClassDescription>, ); + #[method_id(keyClassDescription)] pub unsafe fn keyClassDescription(&self) -> Option>; + #[method(indicesOfObjectsByEvaluatingWithContainer:count:)] pub unsafe fn indicesOfObjectsByEvaluatingWithContainer_count( &self, container: &Object, count: NonNull, ) -> *mut NSInteger; + #[method_id(objectsByEvaluatingWithContainers:)] pub unsafe fn objectsByEvaluatingWithContainers( &self, containers: &Object, ) -> Option>; + #[method_id(objectsByEvaluatingSpecifier)] pub unsafe fn objectsByEvaluatingSpecifier(&self) -> Option>; + #[method(evaluationErrorNumber)] pub unsafe fn evaluationErrorNumber(&self) -> NSInteger; + #[method(setEvaluationErrorNumber:)] pub unsafe fn setEvaluationErrorNumber(&self, evaluationErrorNumber: NSInteger); + #[method_id(evaluationErrorSpecifier)] pub unsafe fn evaluationErrorSpecifier( &self, ) -> Option>; + #[method_id(descriptor)] pub unsafe fn descriptor(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSScriptObjectSpecifiers"] + /// NSScriptObjectSpecifiers unsafe impl NSObject { #[method_id(objectSpecifier)] pub unsafe fn objectSpecifier(&self) -> Option>; + #[method_id(indicesOfObjectsByEvaluatingObjectSpecifier:)] pub unsafe fn indicesOfObjectsByEvaluatingObjectSpecifier( &self, @@ -104,13 +134,16 @@ extern_methods!( ) -> Option, Shared>>; } ); + extern_class!( #[derive(Debug)] pub struct NSIndexSpecifier; + unsafe impl ClassType for NSIndexSpecifier { type Super = NSScriptObjectSpecifier; } ); + extern_methods!( unsafe impl NSIndexSpecifier { #[method_id(initWithContainerClassDescription:containerSpecifier:key:index:)] @@ -121,33 +154,42 @@ extern_methods!( property: &NSString, index: NSInteger, ) -> Id; + #[method(index)] pub unsafe fn index(&self) -> NSInteger; + #[method(setIndex:)] pub unsafe fn setIndex(&self, index: NSInteger); } ); + extern_class!( #[derive(Debug)] pub struct NSMiddleSpecifier; + unsafe impl ClassType for NSMiddleSpecifier { type Super = NSScriptObjectSpecifier; } ); + extern_methods!( unsafe impl NSMiddleSpecifier {} ); + extern_class!( #[derive(Debug)] pub struct NSNameSpecifier; + unsafe impl ClassType for NSNameSpecifier { type Super = NSScriptObjectSpecifier; } ); + extern_methods!( unsafe impl NSNameSpecifier { #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(initWithContainerClassDescription:containerSpecifier:key:name:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_name( &self, @@ -156,19 +198,24 @@ extern_methods!( property: &NSString, name: &NSString, ) -> Id; + #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method(setName:)] pub unsafe fn setName(&self, name: &NSString); } ); + extern_class!( #[derive(Debug)] pub struct NSPositionalSpecifier; + unsafe impl ClassType for NSPositionalSpecifier { type Super = NSObject; } ); + extern_methods!( unsafe impl NSPositionalSpecifier { #[method_id(initWithPosition:objectSpecifier:)] @@ -177,58 +224,76 @@ extern_methods!( position: NSInsertionPosition, specifier: &NSScriptObjectSpecifier, ) -> Id; + #[method(position)] pub unsafe fn position(&self) -> NSInsertionPosition; + #[method_id(objectSpecifier)] pub unsafe fn objectSpecifier(&self) -> Id; + #[method(setInsertionClassDescription:)] pub unsafe fn setInsertionClassDescription( &self, classDescription: &NSScriptClassDescription, ); + #[method(evaluate)] pub unsafe fn evaluate(&self); + #[method_id(insertionContainer)] pub unsafe fn insertionContainer(&self) -> Option>; + #[method_id(insertionKey)] pub unsafe fn insertionKey(&self) -> Option>; + #[method(insertionIndex)] pub unsafe fn insertionIndex(&self) -> NSInteger; + #[method(insertionReplaces)] pub unsafe fn insertionReplaces(&self) -> bool; } ); + extern_class!( #[derive(Debug)] pub struct NSPropertySpecifier; + unsafe impl ClassType for NSPropertySpecifier { type Super = NSScriptObjectSpecifier; } ); + extern_methods!( unsafe impl NSPropertySpecifier {} ); + extern_class!( #[derive(Debug)] pub struct NSRandomSpecifier; + unsafe impl ClassType for NSRandomSpecifier { type Super = NSScriptObjectSpecifier; } ); + extern_methods!( unsafe impl NSRandomSpecifier {} ); + extern_class!( #[derive(Debug)] pub struct NSRangeSpecifier; + unsafe impl ClassType for NSRangeSpecifier { type Super = NSScriptObjectSpecifier; } ); + extern_methods!( unsafe impl NSRangeSpecifier { #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(initWithContainerClassDescription:containerSpecifier:key:startSpecifier:endSpecifier:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_startSpecifier_endSpecifier( &self, @@ -238,27 +303,35 @@ extern_methods!( startSpec: Option<&NSScriptObjectSpecifier>, endSpec: Option<&NSScriptObjectSpecifier>, ) -> Id; + #[method_id(startSpecifier)] pub unsafe fn startSpecifier(&self) -> Option>; + #[method(setStartSpecifier:)] pub unsafe fn setStartSpecifier(&self, startSpecifier: Option<&NSScriptObjectSpecifier>); + #[method_id(endSpecifier)] pub unsafe fn endSpecifier(&self) -> Option>; + #[method(setEndSpecifier:)] pub unsafe fn setEndSpecifier(&self, endSpecifier: Option<&NSScriptObjectSpecifier>); } ); + extern_class!( #[derive(Debug)] pub struct NSRelativeSpecifier; + unsafe impl ClassType for NSRelativeSpecifier { type Super = NSScriptObjectSpecifier; } ); + extern_methods!( unsafe impl NSRelativeSpecifier { #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(initWithContainerClassDescription:containerSpecifier:key:relativePosition:baseSpecifier:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_relativePosition_baseSpecifier( &self, @@ -268,27 +341,35 @@ extern_methods!( relPos: NSRelativePosition, baseSpecifier: Option<&NSScriptObjectSpecifier>, ) -> Id; + #[method(relativePosition)] pub unsafe fn relativePosition(&self) -> NSRelativePosition; + #[method(setRelativePosition:)] pub unsafe fn setRelativePosition(&self, relativePosition: NSRelativePosition); + #[method_id(baseSpecifier)] pub unsafe fn baseSpecifier(&self) -> Option>; + #[method(setBaseSpecifier:)] pub unsafe fn setBaseSpecifier(&self, baseSpecifier: Option<&NSScriptObjectSpecifier>); } ); + extern_class!( #[derive(Debug)] pub struct NSUniqueIDSpecifier; + unsafe impl ClassType for NSUniqueIDSpecifier { type Super = NSScriptObjectSpecifier; } ); + extern_methods!( unsafe impl NSUniqueIDSpecifier { #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(initWithContainerClassDescription:containerSpecifier:key:uniqueID:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_uniqueID( &self, @@ -297,23 +378,29 @@ extern_methods!( property: &NSString, uniqueID: &Object, ) -> Id; + #[method_id(uniqueID)] pub unsafe fn uniqueID(&self) -> Id; + #[method(setUniqueID:)] pub unsafe fn setUniqueID(&self, uniqueID: &Object); } ); + extern_class!( #[derive(Debug)] pub struct NSWhoseSpecifier; + unsafe impl ClassType for NSWhoseSpecifier { type Super = NSScriptObjectSpecifier; } ); + extern_methods!( unsafe impl NSWhoseSpecifier { #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(initWithContainerClassDescription:containerSpecifier:key:test:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_test( &self, @@ -322,30 +409,40 @@ extern_methods!( property: &NSString, test: &NSScriptWhoseTest, ) -> Id; + #[method_id(test)] pub unsafe fn test(&self) -> Id; + #[method(setTest:)] pub unsafe fn setTest(&self, test: &NSScriptWhoseTest); + #[method(startSubelementIdentifier)] pub unsafe fn startSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier; + #[method(setStartSubelementIdentifier:)] pub unsafe fn setStartSubelementIdentifier( &self, startSubelementIdentifier: NSWhoseSubelementIdentifier, ); + #[method(startSubelementIndex)] pub unsafe fn startSubelementIndex(&self) -> NSInteger; + #[method(setStartSubelementIndex:)] pub unsafe fn setStartSubelementIndex(&self, startSubelementIndex: NSInteger); + #[method(endSubelementIdentifier)] pub unsafe fn endSubelementIdentifier(&self) -> NSWhoseSubelementIdentifier; + #[method(setEndSubelementIdentifier:)] pub unsafe fn setEndSubelementIdentifier( &self, endSubelementIdentifier: NSWhoseSubelementIdentifier, ); + #[method(endSubelementIndex)] pub unsafe fn endSubelementIndex(&self) -> NSInteger; + #[method(setEndSubelementIndex:)] pub unsafe fn setEndSubelementIndex(&self, endSubelementIndex: NSInteger); } diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index 3d9a34a3b..3b679174f 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -1,134 +1,171 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCloneCommand; + unsafe impl ClassType for NSCloneCommand { type Super = NSScriptCommand; } ); + extern_methods!( unsafe impl NSCloneCommand { #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); + #[method_id(keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSCloseCommand; + unsafe impl ClassType for NSCloseCommand { type Super = NSScriptCommand; } ); + extern_methods!( unsafe impl NSCloseCommand { #[method(saveOptions)] pub unsafe fn saveOptions(&self) -> NSSaveOptions; } ); + extern_class!( #[derive(Debug)] pub struct NSCountCommand; + unsafe impl ClassType for NSCountCommand { type Super = NSScriptCommand; } ); + extern_methods!( unsafe impl NSCountCommand {} ); + extern_class!( #[derive(Debug)] pub struct NSCreateCommand; + unsafe impl ClassType for NSCreateCommand { type Super = NSScriptCommand; } ); + extern_methods!( unsafe impl NSCreateCommand { #[method_id(createClassDescription)] pub unsafe fn createClassDescription(&self) -> Id; + #[method_id(resolvedKeyDictionary)] pub unsafe fn resolvedKeyDictionary(&self) -> Id, Shared>; } ); + extern_class!( #[derive(Debug)] pub struct NSDeleteCommand; + unsafe impl ClassType for NSDeleteCommand { type Super = NSScriptCommand; } ); + extern_methods!( unsafe impl NSDeleteCommand { #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); + #[method_id(keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSExistsCommand; + unsafe impl ClassType for NSExistsCommand { type Super = NSScriptCommand; } ); + extern_methods!( unsafe impl NSExistsCommand {} ); + extern_class!( #[derive(Debug)] pub struct NSGetCommand; + unsafe impl ClassType for NSGetCommand { type Super = NSScriptCommand; } ); + extern_methods!( unsafe impl NSGetCommand {} ); + extern_class!( #[derive(Debug)] pub struct NSMoveCommand; + unsafe impl ClassType for NSMoveCommand { type Super = NSScriptCommand; } ); + extern_methods!( unsafe impl NSMoveCommand { #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); + #[method_id(keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSQuitCommand; + unsafe impl ClassType for NSQuitCommand { type Super = NSScriptCommand; } ); + extern_methods!( unsafe impl NSQuitCommand { #[method(saveOptions)] pub unsafe fn saveOptions(&self) -> NSSaveOptions; } ); + extern_class!( #[derive(Debug)] pub struct NSSetCommand; + unsafe impl ClassType for NSSetCommand { type Super = NSScriptCommand; } ); + extern_methods!( unsafe impl NSSetCommand { #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); + #[method_id(keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 2ac4ad741..86d081a87 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -1,67 +1,86 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScriptSuiteRegistry; + unsafe impl ClassType for NSScriptSuiteRegistry { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScriptSuiteRegistry { #[method_id(sharedScriptSuiteRegistry)] pub unsafe fn sharedScriptSuiteRegistry() -> Id; + #[method(setSharedScriptSuiteRegistry:)] pub unsafe fn setSharedScriptSuiteRegistry(registry: &NSScriptSuiteRegistry); + #[method(loadSuitesFromBundle:)] pub unsafe fn loadSuitesFromBundle(&self, bundle: &NSBundle); + #[method(loadSuiteWithDictionary:fromBundle:)] pub unsafe fn loadSuiteWithDictionary_fromBundle( &self, suiteDeclaration: &NSDictionary, bundle: &NSBundle, ); + #[method(registerClassDescription:)] pub unsafe fn registerClassDescription(&self, classDescription: &NSScriptClassDescription); + #[method(registerCommandDescription:)] pub unsafe fn registerCommandDescription( &self, commandDescription: &NSScriptCommandDescription, ); + #[method_id(suiteNames)] pub unsafe fn suiteNames(&self) -> Id, Shared>; + #[method(appleEventCodeForSuite:)] pub unsafe fn appleEventCodeForSuite(&self, suiteName: &NSString) -> FourCharCode; + #[method_id(bundleForSuite:)] pub unsafe fn bundleForSuite(&self, suiteName: &NSString) -> Option>; + #[method_id(classDescriptionsInSuite:)] pub unsafe fn classDescriptionsInSuite( &self, suiteName: &NSString, ) -> Option, Shared>>; + #[method_id(commandDescriptionsInSuite:)] pub unsafe fn commandDescriptionsInSuite( &self, suiteName: &NSString, ) -> Option, Shared>>; + #[method_id(suiteForAppleEventCode:)] pub unsafe fn suiteForAppleEventCode( &self, appleEventCode: FourCharCode, ) -> Option>; + #[method_id(classDescriptionWithAppleEventCode:)] pub unsafe fn classDescriptionWithAppleEventCode( &self, appleEventCode: FourCharCode, ) -> Option>; + #[method_id(commandDescriptionWithAppleEventClass:andAppleEventCode:)] pub unsafe fn commandDescriptionWithAppleEventClass_andAppleEventCode( &self, appleEventClassCode: FourCharCode, appleEventIDCode: FourCharCode, ) -> Option>; + #[method_id(aeteResource:)] pub unsafe fn aeteResource(&self, languageName: &NSString) -> Option>; } diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index a11568251..b8805f72a 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -1,31 +1,41 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSScriptWhoseTest; + unsafe impl ClassType for NSScriptWhoseTest { type Super = NSObject; } ); + extern_methods!( unsafe impl NSScriptWhoseTest { #[method(isTrue)] pub unsafe fn isTrue(&self) -> bool; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSLogicalTest; + unsafe impl ClassType for NSLogicalTest { type Super = NSScriptWhoseTest; } ); + extern_methods!( unsafe impl NSLogicalTest { #[method_id(initAndTestWithTests:)] @@ -33,28 +43,35 @@ extern_methods!( &self, subTests: &NSArray, ) -> Id; + #[method_id(initOrTestWithTests:)] pub unsafe fn initOrTestWithTests( &self, subTests: &NSArray, ) -> Id; + #[method_id(initNotTestWithTest:)] pub unsafe fn initNotTestWithTest(&self, subTest: &NSScriptWhoseTest) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSSpecifierTest; + unsafe impl ClassType for NSSpecifierTest { type Super = NSScriptWhoseTest; } ); + extern_methods!( unsafe impl NSSpecifierTest { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + #[method_id(initWithObjectSpecifier:comparisonOperator:testObject:)] pub unsafe fn initWithObjectSpecifier_comparisonOperator_testObject( &self, @@ -64,46 +81,63 @@ extern_methods!( ) -> Id; } ); + extern_methods!( - #[doc = "NSComparisonMethods"] + /// NSComparisonMethods unsafe impl NSObject { #[method(isEqualTo:)] pub unsafe fn isEqualTo(&self, object: Option<&Object>) -> bool; + #[method(isLessThanOrEqualTo:)] pub unsafe fn isLessThanOrEqualTo(&self, object: Option<&Object>) -> bool; + #[method(isLessThan:)] pub unsafe fn isLessThan(&self, object: Option<&Object>) -> bool; + #[method(isGreaterThanOrEqualTo:)] pub unsafe fn isGreaterThanOrEqualTo(&self, object: Option<&Object>) -> bool; + #[method(isGreaterThan:)] pub unsafe fn isGreaterThan(&self, object: Option<&Object>) -> bool; + #[method(isNotEqualTo:)] pub unsafe fn isNotEqualTo(&self, object: Option<&Object>) -> bool; + #[method(doesContain:)] pub unsafe fn doesContain(&self, object: &Object) -> bool; + #[method(isLike:)] pub unsafe fn isLike(&self, object: &NSString) -> bool; + #[method(isCaseInsensitiveLike:)] pub unsafe fn isCaseInsensitiveLike(&self, object: &NSString) -> bool; } ); + extern_methods!( - #[doc = "NSScriptingComparisonMethods"] + /// NSScriptingComparisonMethods unsafe impl NSObject { #[method(scriptingIsEqualTo:)] pub unsafe fn scriptingIsEqualTo(&self, object: &Object) -> bool; + #[method(scriptingIsLessThanOrEqualTo:)] pub unsafe fn scriptingIsLessThanOrEqualTo(&self, object: &Object) -> bool; + #[method(scriptingIsLessThan:)] pub unsafe fn scriptingIsLessThan(&self, object: &Object) -> bool; + #[method(scriptingIsGreaterThanOrEqualTo:)] pub unsafe fn scriptingIsGreaterThanOrEqualTo(&self, object: &Object) -> bool; + #[method(scriptingIsGreaterThan:)] pub unsafe fn scriptingIsGreaterThan(&self, object: &Object) -> bool; + #[method(scriptingBeginsWith:)] pub unsafe fn scriptingBeginsWith(&self, object: &Object) -> bool; + #[method(scriptingEndsWith:)] pub unsafe fn scriptingEndsWith(&self, object: &Object) -> bool; + #[method(scriptingContains:)] pub unsafe fn scriptingContains(&self, object: &Object) -> bool; } diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index cb729116c..33caf22ea 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -1,90 +1,117 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + __inner_extern_class!( #[derive(Debug)] pub struct NSSet; + unsafe impl ClassType for NSSet { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSet { #[method(count)] pub unsafe fn count(&self) -> NSUInteger; + #[method_id(member:)] pub unsafe fn member(&self, object: &ObjectType) -> Option>; + #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithObjects:count:)] pub unsafe fn initWithObjects_count( &self, objects: TodoArray, cnt: NSUInteger, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSExtendedSet"] + /// NSExtendedSet unsafe impl NSSet { #[method_id(allObjects)] pub unsafe fn allObjects(&self) -> Id, Shared>; + #[method_id(anyObject)] pub unsafe fn anyObject(&self) -> Option>; + #[method(containsObject:)] pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool; + #[method_id(description)] pub unsafe fn description(&self) -> Id; + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; + #[method(intersectsSet:)] pub unsafe fn intersectsSet(&self, otherSet: &NSSet) -> bool; + #[method(isEqualToSet:)] pub unsafe fn isEqualToSet(&self, otherSet: &NSSet) -> bool; + #[method(isSubsetOfSet:)] pub unsafe fn isSubsetOfSet(&self, otherSet: &NSSet) -> bool; + #[method(makeObjectsPerformSelector:)] pub unsafe fn makeObjectsPerformSelector(&self, aSelector: Sel); + #[method(makeObjectsPerformSelector:withObject:)] pub unsafe fn makeObjectsPerformSelector_withObject( &self, aSelector: Sel, argument: Option<&Object>, ); + #[method_id(setByAddingObject:)] pub unsafe fn setByAddingObject( &self, anObject: &ObjectType, ) -> Id, Shared>; + #[method_id(setByAddingObjectsFromSet:)] pub unsafe fn setByAddingObjectsFromSet( &self, other: &NSSet, ) -> Id, Shared>; + #[method_id(setByAddingObjectsFromArray:)] pub unsafe fn setByAddingObjectsFromArray( &self, other: &NSArray, ) -> Id, Shared>; + #[method(enumerateObjectsUsingBlock:)] pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); + #[method(enumerateObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, block: TodoBlock, ); + #[method_id(objectsPassingTest:)] pub unsafe fn objectsPassingTest( &self, predicate: TodoBlock, ) -> Id, Shared>; + #[method_id(objectsWithOptions:passingTest:)] pub unsafe fn objectsWithOptions_passingTest( &self, @@ -93,98 +120,129 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSSetCreation"] + /// NSSetCreation unsafe impl NSSet { #[method_id(set)] pub unsafe fn set() -> Id; + #[method_id(setWithObject:)] pub unsafe fn setWithObject(object: &ObjectType) -> Id; + #[method_id(setWithObjects:count:)] pub unsafe fn setWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id; + #[method_id(setWithSet:)] pub unsafe fn setWithSet(set: &NSSet) -> Id; + #[method_id(setWithArray:)] pub unsafe fn setWithArray(array: &NSArray) -> Id; + #[method_id(initWithSet:)] pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; + #[method_id(initWithSet:copyItems:)] pub unsafe fn initWithSet_copyItems( &self, set: &NSSet, flag: bool, ) -> Id; + #[method_id(initWithArray:)] pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; } ); + __inner_extern_class!( #[derive(Debug)] pub struct NSMutableSet; + unsafe impl ClassType for NSMutableSet { type Super = NSSet; } ); + extern_methods!( unsafe impl NSMutableSet { #[method(addObject:)] pub unsafe fn addObject(&self, object: &ObjectType); + #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &ObjectType); + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; } ); + extern_methods!( - #[doc = "NSExtendedMutableSet"] + /// NSExtendedMutableSet unsafe impl NSMutableSet { #[method(addObjectsFromArray:)] pub unsafe fn addObjectsFromArray(&self, array: &NSArray); + #[method(intersectSet:)] pub unsafe fn intersectSet(&self, otherSet: &NSSet); + #[method(minusSet:)] pub unsafe fn minusSet(&self, otherSet: &NSSet); + #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); + #[method(unionSet:)] pub unsafe fn unionSet(&self, otherSet: &NSSet); + #[method(setSet:)] pub unsafe fn setSet(&self, otherSet: &NSSet); } ); + extern_methods!( - #[doc = "NSMutableSetCreation"] + /// NSMutableSetCreation unsafe impl NSMutableSet { #[method_id(setWithCapacity:)] pub unsafe fn setWithCapacity(numItems: NSUInteger) -> Id; } ); + __inner_extern_class!( #[derive(Debug)] pub struct NSCountedSet; + unsafe impl ClassType for NSCountedSet { type Super = NSMutableSet; } ); + extern_methods!( unsafe impl NSCountedSet { #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + #[method_id(initWithArray:)] pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; + #[method_id(initWithSet:)] pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; + #[method(countForObject:)] pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger; + #[method_id(objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; + #[method(addObject:)] pub unsafe fn addObject(&self, object: &ObjectType); + #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &ObjectType); } diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index 8742a50e3..02bf51098 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSortDescriptor; + unsafe impl ClassType for NSSortDescriptor { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSortDescriptor { #[method_id(sortDescriptorWithKey:ascending:)] @@ -16,18 +21,21 @@ extern_methods!( key: Option<&NSString>, ascending: bool, ) -> Id; + #[method_id(sortDescriptorWithKey:ascending:selector:)] pub unsafe fn sortDescriptorWithKey_ascending_selector( key: Option<&NSString>, ascending: bool, selector: Option, ) -> Id; + #[method_id(initWithKey:ascending:)] pub unsafe fn initWithKey_ascending( &self, key: Option<&NSString>, ascending: bool, ) -> Id; + #[method_id(initWithKey:ascending:selector:)] pub unsafe fn initWithKey_ascending_selector( &self, @@ -35,22 +43,29 @@ extern_methods!( ascending: bool, selector: Option, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(key)] pub unsafe fn key(&self) -> Option>; + #[method(ascending)] pub unsafe fn ascending(&self) -> bool; + #[method(selector)] pub unsafe fn selector(&self) -> Option; + #[method(allowEvaluation)] pub unsafe fn allowEvaluation(&self); + #[method_id(sortDescriptorWithKey:ascending:comparator:)] pub unsafe fn sortDescriptorWithKey_ascending_comparator( key: Option<&NSString>, ascending: bool, cmptr: NSComparator, ) -> Id; + #[method_id(initWithKey:ascending:comparator:)] pub unsafe fn initWithKey_ascending_comparator( &self, @@ -58,20 +73,24 @@ extern_methods!( ascending: bool, cmptr: NSComparator, ) -> Id; + #[method(comparator)] pub unsafe fn comparator(&self) -> NSComparator; + #[method(compareObject:toObject:)] pub unsafe fn compareObject_toObject( &self, object1: &Object, object2: &Object, ) -> NSComparisonResult; + #[method_id(reversedSortDescriptor)] pub unsafe fn reversedSortDescriptor(&self) -> Id; } ); + extern_methods!( - #[doc = "NSSortDescriptorSorting"] + /// NSSortDescriptorSorting unsafe impl NSSet { #[method_id(sortedArrayUsingDescriptors:)] pub unsafe fn sortedArrayUsingDescriptors( @@ -80,8 +99,9 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSSortDescriptorSorting"] + /// NSSortDescriptorSorting unsafe impl NSArray { #[method_id(sortedArrayUsingDescriptors:)] pub unsafe fn sortedArrayUsingDescriptors( @@ -90,15 +110,17 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSSortDescriptorSorting"] + /// NSSortDescriptorSorting unsafe impl NSMutableArray { #[method(sortUsingDescriptors:)] pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray); } ); + extern_methods!( - #[doc = "NSKeyValueSorting"] + /// NSKeyValueSorting unsafe impl NSOrderedSet { #[method_id(sortedArrayUsingDescriptors:)] pub unsafe fn sortedArrayUsingDescriptors( @@ -107,8 +129,9 @@ extern_methods!( ) -> Id, Shared>; } ); + extern_methods!( - #[doc = "NSKeyValueSorting"] + /// NSKeyValueSorting unsafe impl NSMutableOrderedSet { #[method(sortUsingDescriptors:)] pub unsafe fn sortUsingDescriptors(&self, sortDescriptors: &NSArray); diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 07ea71a9b..6644c828b 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -1,34 +1,44 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSSpellServer; + unsafe impl ClassType for NSSpellServer { type Super = NSObject; } ); + extern_methods!( unsafe impl NSSpellServer { #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSpellServerDelegate>); + #[method(registerLanguage:byVendor:)] pub unsafe fn registerLanguage_byVendor( &self, language: Option<&NSString>, vendor: Option<&NSString>, ) -> bool; + #[method(isWordInUserDictionaries:caseSensitive:)] pub unsafe fn isWordInUserDictionaries_caseSensitive( &self, word: &NSString, flag: bool, ) -> bool; + #[method(run)] pub unsafe fn run(&self); } ); + pub type NSSpellServerDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 3d9558f12..ae2876f85 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -1,92 +1,121 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSStreamPropertyKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSStream; + unsafe impl ClassType for NSStream { type Super = NSObject; } ); + extern_methods!( unsafe impl NSStream { #[method(open)] pub unsafe fn open(&self); + #[method(close)] pub unsafe fn close(&self); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>); + #[method_id(propertyForKey:)] pub unsafe fn propertyForKey( &self, key: &NSStreamPropertyKey, ) -> Option>; + #[method(setProperty:forKey:)] pub unsafe fn setProperty_forKey( &self, property: Option<&Object>, key: &NSStreamPropertyKey, ) -> bool; + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(streamStatus)] pub unsafe fn streamStatus(&self) -> NSStreamStatus; + #[method_id(streamError)] pub unsafe fn streamError(&self) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSInputStream; + unsafe impl ClassType for NSInputStream { type Super = NSStream; } ); + extern_methods!( unsafe impl NSInputStream { #[method(read:maxLength:)] pub unsafe fn read_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger; + #[method(getBuffer:length:)] pub unsafe fn getBuffer_length( &self, buffer: NonNull<*mut u8>, len: NonNull, ) -> bool; + #[method(hasBytesAvailable)] pub unsafe fn hasBytesAvailable(&self) -> bool; + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Id; + #[method_id(initWithURL:)] pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSOutputStream; + unsafe impl ClassType for NSOutputStream { type Super = NSStream; } ); + extern_methods!( unsafe impl NSOutputStream { #[method(write:maxLength:)] pub unsafe fn write_maxLength(&self, buffer: NonNull, len: NSUInteger) -> NSInteger; + #[method(hasSpaceAvailable)] pub unsafe fn hasSpaceAvailable(&self) -> bool; + #[method_id(initToMemory)] pub unsafe fn initToMemory(&self) -> Id; + #[method_id(initToBuffer:capacity:)] pub unsafe fn initToBuffer_capacity( &self, buffer: NonNull, capacity: NSUInteger, ) -> Id; + #[method_id(initWithURL:append:)] pub unsafe fn initWithURL_append( &self, @@ -95,8 +124,9 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSSocketStreamCreationExtensions"] + /// NSSocketStreamCreationExtensions unsafe impl NSStream { #[method(getStreamsToHostWithName:port:inputStream:outputStream:)] pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( @@ -105,6 +135,7 @@ extern_methods!( inputStream: Option<&mut Option>>, outputStream: Option<&mut Option>>, ); + #[method(getStreamsToHost:port:inputStream:outputStream:)] pub unsafe fn getStreamsToHost_port_inputStream_outputStream( host: &NSHost, @@ -114,8 +145,9 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSStreamBoundPairCreationExtensions"] + /// NSStreamBoundPairCreationExtensions unsafe impl NSStream { #[method(getBoundStreamsWithBufferSize:inputStream:outputStream:)] pub unsafe fn getBoundStreamsWithBufferSize_inputStream_outputStream( @@ -125,21 +157,26 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSInputStreamExtensions"] + /// NSInputStreamExtensions unsafe impl NSInputStream { #[method_id(initWithFileAtPath:)] pub unsafe fn initWithFileAtPath(&self, path: &NSString) -> Option>; + #[method_id(inputStreamWithData:)] pub unsafe fn inputStreamWithData(data: &NSData) -> Option>; + #[method_id(inputStreamWithFileAtPath:)] pub unsafe fn inputStreamWithFileAtPath(path: &NSString) -> Option>; + #[method_id(inputStreamWithURL:)] pub unsafe fn inputStreamWithURL(url: &NSURL) -> Option>; } ); + extern_methods!( - #[doc = "NSOutputStreamExtensions"] + /// NSOutputStreamExtensions unsafe impl NSOutputStream { #[method_id(initToFileAtPath:append:)] pub unsafe fn initToFileAtPath_append( @@ -147,18 +184,22 @@ extern_methods!( path: &NSString, shouldAppend: bool, ) -> Option>; + #[method_id(outputStreamToMemory)] pub unsafe fn outputStreamToMemory() -> Id; + #[method_id(outputStreamToBuffer:capacity:)] pub unsafe fn outputStreamToBuffer_capacity( buffer: NonNull, capacity: NSUInteger, ) -> Id; + #[method_id(outputStreamToFileAtPath:append:)] pub unsafe fn outputStreamToFileAtPath_append( path: &NSString, shouldAppend: bool, ) -> Id; + #[method_id(outputStreamWithURL:append:)] pub unsafe fn outputStreamWithURL_append( url: &NSURL, @@ -166,8 +207,13 @@ extern_methods!( ) -> Option>; } ); + pub type NSStreamDelegate = NSObject; + pub type NSStreamSocketSecurityLevel = NSString; + pub type NSStreamSOCKSProxyConfiguration = NSString; + pub type NSStreamSOCKSProxyVersion = NSString; + pub type NSStreamNetworkServiceTypeValue = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index f96045aa4..34bac34d8 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -1,47 +1,64 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSStringEncoding = NSUInteger; + extern_class!( #[derive(Debug)] pub struct NSString; + unsafe impl ClassType for NSString { type Super = NSObject; } ); + extern_methods!( unsafe impl NSString { #[method(length)] pub fn length(&self) -> NSUInteger; + #[method(characterAtIndex:)] pub unsafe fn characterAtIndex(&self, index: NSUInteger) -> unichar; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + pub type NSStringTransform = NSString; + extern_methods!( - #[doc = "NSStringExtensionMethods"] + /// NSStringExtensionMethods unsafe impl NSString { #[method_id(substringFromIndex:)] pub unsafe fn substringFromIndex(&self, from: NSUInteger) -> Id; + #[method_id(substringToIndex:)] pub unsafe fn substringToIndex(&self, to: NSUInteger) -> Id; + #[method_id(substringWithRange:)] pub unsafe fn substringWithRange(&self, range: NSRange) -> Id; + #[method(getCharacters:range:)] pub unsafe fn getCharacters_range(&self, buffer: NonNull, range: NSRange); + #[method(compare:)] pub unsafe fn compare(&self, string: &NSString) -> NSComparisonResult; + #[method(compare:options:)] pub unsafe fn compare_options( &self, string: &NSString, mask: NSStringCompareOptions, ) -> NSComparisonResult; + #[method(compare:options:range:)] pub unsafe fn compare_options_range( &self, @@ -49,6 +66,7 @@ extern_methods!( mask: NSStringCompareOptions, rangeOfReceiverToCompare: NSRange, ) -> NSComparisonResult; + #[method(compare:options:range:locale:)] pub unsafe fn compare_options_range_locale( &self, @@ -57,45 +75,60 @@ extern_methods!( rangeOfReceiverToCompare: NSRange, locale: Option<&Object>, ) -> NSComparisonResult; + #[method(caseInsensitiveCompare:)] pub unsafe fn caseInsensitiveCompare(&self, string: &NSString) -> NSComparisonResult; + #[method(localizedCompare:)] pub unsafe fn localizedCompare(&self, string: &NSString) -> NSComparisonResult; + #[method(localizedCaseInsensitiveCompare:)] pub unsafe fn localizedCaseInsensitiveCompare( &self, string: &NSString, ) -> NSComparisonResult; + #[method(localizedStandardCompare:)] pub unsafe fn localizedStandardCompare(&self, string: &NSString) -> NSComparisonResult; + #[method(isEqualToString:)] pub unsafe fn isEqualToString(&self, aString: &NSString) -> bool; + #[method(hasPrefix:)] pub unsafe fn hasPrefix(&self, str: &NSString) -> bool; + #[method(hasSuffix:)] pub unsafe fn hasSuffix(&self, str: &NSString) -> bool; + #[method_id(commonPrefixWithString:options:)] pub unsafe fn commonPrefixWithString_options( &self, str: &NSString, mask: NSStringCompareOptions, ) -> Id; + #[method(containsString:)] pub unsafe fn containsString(&self, str: &NSString) -> bool; + #[method(localizedCaseInsensitiveContainsString:)] pub unsafe fn localizedCaseInsensitiveContainsString(&self, str: &NSString) -> bool; + #[method(localizedStandardContainsString:)] pub unsafe fn localizedStandardContainsString(&self, str: &NSString) -> bool; + #[method(localizedStandardRangeOfString:)] pub unsafe fn localizedStandardRangeOfString(&self, str: &NSString) -> NSRange; + #[method(rangeOfString:)] pub unsafe fn rangeOfString(&self, searchString: &NSString) -> NSRange; + #[method(rangeOfString:options:)] pub unsafe fn rangeOfString_options( &self, searchString: &NSString, mask: NSStringCompareOptions, ) -> NSRange; + #[method(rangeOfString:options:range:)] pub unsafe fn rangeOfString_options_range( &self, @@ -103,6 +136,7 @@ extern_methods!( mask: NSStringCompareOptions, rangeOfReceiverToSearch: NSRange, ) -> NSRange; + #[method(rangeOfString:options:range:locale:)] pub unsafe fn rangeOfString_options_range_locale( &self, @@ -111,14 +145,17 @@ extern_methods!( rangeOfReceiverToSearch: NSRange, locale: Option<&NSLocale>, ) -> NSRange; + #[method(rangeOfCharacterFromSet:)] pub unsafe fn rangeOfCharacterFromSet(&self, searchSet: &NSCharacterSet) -> NSRange; + #[method(rangeOfCharacterFromSet:options:)] pub unsafe fn rangeOfCharacterFromSet_options( &self, searchSet: &NSCharacterSet, mask: NSStringCompareOptions, ) -> NSRange; + #[method(rangeOfCharacterFromSet:options:range:)] pub unsafe fn rangeOfCharacterFromSet_options_range( &self, @@ -126,51 +163,70 @@ extern_methods!( mask: NSStringCompareOptions, rangeOfReceiverToSearch: NSRange, ) -> NSRange; + #[method(rangeOfComposedCharacterSequenceAtIndex:)] pub unsafe fn rangeOfComposedCharacterSequenceAtIndex(&self, index: NSUInteger) -> NSRange; + #[method(rangeOfComposedCharacterSequencesForRange:)] pub unsafe fn rangeOfComposedCharacterSequencesForRange(&self, range: NSRange) -> NSRange; + #[method_id(stringByAppendingString:)] pub fn stringByAppendingString(&self, aString: &NSString) -> Id; + #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[method(floatValue)] pub unsafe fn floatValue(&self) -> c_float; + #[method(intValue)] pub unsafe fn intValue(&self) -> c_int; + #[method(integerValue)] pub unsafe fn integerValue(&self) -> NSInteger; + #[method(longLongValue)] pub unsafe fn longLongValue(&self) -> c_longlong; + #[method(boolValue)] pub unsafe fn boolValue(&self) -> bool; + #[method_id(uppercaseString)] pub unsafe fn uppercaseString(&self) -> Id; + #[method_id(lowercaseString)] pub unsafe fn lowercaseString(&self) -> Id; + #[method_id(capitalizedString)] pub unsafe fn capitalizedString(&self) -> Id; + #[method_id(localizedUppercaseString)] pub unsafe fn localizedUppercaseString(&self) -> Id; + #[method_id(localizedLowercaseString)] pub unsafe fn localizedLowercaseString(&self) -> Id; + #[method_id(localizedCapitalizedString)] pub unsafe fn localizedCapitalizedString(&self) -> Id; + #[method_id(uppercaseStringWithLocale:)] pub unsafe fn uppercaseStringWithLocale( &self, locale: Option<&NSLocale>, ) -> Id; + #[method_id(lowercaseStringWithLocale:)] pub unsafe fn lowercaseStringWithLocale( &self, locale: Option<&NSLocale>, ) -> Id; + #[method_id(capitalizedStringWithLocale:)] pub unsafe fn capitalizedStringWithLocale( &self, locale: Option<&NSLocale>, ) -> Id; + #[method(getLineStart:end:contentsEnd:forRange:)] pub unsafe fn getLineStart_end_contentsEnd_forRange( &self, @@ -179,8 +235,10 @@ extern_methods!( contentsEndPtr: *mut NSUInteger, range: NSRange, ); + #[method(lineRangeForRange:)] pub unsafe fn lineRangeForRange(&self, range: NSRange) -> NSRange; + #[method(getParagraphStart:end:contentsEnd:forRange:)] pub unsafe fn getParagraphStart_end_contentsEnd_forRange( &self, @@ -189,8 +247,10 @@ extern_methods!( contentsEndPtr: *mut NSUInteger, range: NSRange, ); + #[method(paragraphRangeForRange:)] pub unsafe fn paragraphRangeForRange(&self, range: NSRange) -> NSRange; + #[method(enumerateSubstringsInRange:options:usingBlock:)] pub unsafe fn enumerateSubstringsInRange_options_usingBlock( &self, @@ -198,29 +258,38 @@ extern_methods!( opts: NSStringEnumerationOptions, block: TodoBlock, ); + #[method(enumerateLinesUsingBlock:)] pub unsafe fn enumerateLinesUsingBlock(&self, block: TodoBlock); + #[method(UTF8String)] pub fn UTF8String(&self) -> *mut c_char; + #[method(fastestEncoding)] pub unsafe fn fastestEncoding(&self) -> NSStringEncoding; + #[method(smallestEncoding)] pub unsafe fn smallestEncoding(&self) -> NSStringEncoding; + #[method_id(dataUsingEncoding:allowLossyConversion:)] pub unsafe fn dataUsingEncoding_allowLossyConversion( &self, encoding: NSStringEncoding, lossy: bool, ) -> Option>; + #[method_id(dataUsingEncoding:)] pub unsafe fn dataUsingEncoding( &self, encoding: NSStringEncoding, ) -> Option>; + #[method(canBeConvertedToEncoding:)] pub unsafe fn canBeConvertedToEncoding(&self, encoding: NSStringEncoding) -> bool; + #[method(cStringUsingEncoding:)] pub unsafe fn cStringUsingEncoding(&self, encoding: NSStringEncoding) -> *mut c_char; + #[method(getCString:maxLength:encoding:)] pub unsafe fn getCString_maxLength_encoding( &self, @@ -228,6 +297,7 @@ extern_methods!( maxBufferCount: NSUInteger, encoding: NSStringEncoding, ) -> bool; + #[method(getBytes:maxLength:usedLength:encoding:options:range:remainingRange:)] pub unsafe fn getBytes_maxLength_usedLength_encoding_options_range_remainingRange( &self, @@ -239,42 +309,55 @@ extern_methods!( range: NSRange, leftover: NSRangePointer, ) -> bool; + #[method(maximumLengthOfBytesUsingEncoding:)] pub unsafe fn maximumLengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger; + #[method(lengthOfBytesUsingEncoding:)] pub fn lengthOfBytesUsingEncoding(&self, enc: NSStringEncoding) -> NSUInteger; + #[method(availableStringEncodings)] pub unsafe fn availableStringEncodings() -> NonNull; + #[method_id(localizedNameOfStringEncoding:)] pub unsafe fn localizedNameOfStringEncoding( encoding: NSStringEncoding, ) -> Id; + #[method(defaultCStringEncoding)] pub unsafe fn defaultCStringEncoding() -> NSStringEncoding; + #[method_id(decomposedStringWithCanonicalMapping)] pub unsafe fn decomposedStringWithCanonicalMapping(&self) -> Id; + #[method_id(precomposedStringWithCanonicalMapping)] pub unsafe fn precomposedStringWithCanonicalMapping(&self) -> Id; + #[method_id(decomposedStringWithCompatibilityMapping)] pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id; + #[method_id(precomposedStringWithCompatibilityMapping)] pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id; + #[method_id(componentsSeparatedByString:)] pub unsafe fn componentsSeparatedByString( &self, separator: &NSString, ) -> Id, Shared>; + #[method_id(componentsSeparatedByCharactersInSet:)] pub unsafe fn componentsSeparatedByCharactersInSet( &self, separator: &NSCharacterSet, ) -> Id, Shared>; + #[method_id(stringByTrimmingCharactersInSet:)] pub unsafe fn stringByTrimmingCharactersInSet( &self, set: &NSCharacterSet, ) -> Id; + #[method_id(stringByPaddingToLength:withString:startingAtIndex:)] pub unsafe fn stringByPaddingToLength_withString_startingAtIndex( &self, @@ -282,12 +365,14 @@ extern_methods!( padString: &NSString, padIndex: NSUInteger, ) -> Id; + #[method_id(stringByFoldingWithOptions:locale:)] pub unsafe fn stringByFoldingWithOptions_locale( &self, options: NSStringCompareOptions, locale: Option<&NSLocale>, ) -> Id; + #[method_id(stringByReplacingOccurrencesOfString:withString:options:range:)] pub unsafe fn stringByReplacingOccurrencesOfString_withString_options_range( &self, @@ -296,24 +381,28 @@ extern_methods!( options: NSStringCompareOptions, searchRange: NSRange, ) -> Id; + #[method_id(stringByReplacingOccurrencesOfString:withString:)] pub unsafe fn stringByReplacingOccurrencesOfString_withString( &self, target: &NSString, replacement: &NSString, ) -> Id; + #[method_id(stringByReplacingCharactersInRange:withString:)] pub unsafe fn stringByReplacingCharactersInRange_withString( &self, range: NSRange, replacement: &NSString, ) -> Id; + #[method_id(stringByApplyingTransform:reverse:)] pub unsafe fn stringByApplyingTransform_reverse( &self, transform: &NSStringTransform, reverse: bool, ) -> Option>; + #[method(writeToURL:atomically:encoding:error:)] pub unsafe fn writeToURL_atomically_encoding_error( &self, @@ -321,6 +410,7 @@ extern_methods!( useAuxiliaryFile: bool, enc: NSStringEncoding, ) -> Result<(), Id>; + #[method(writeToFile:atomically:encoding:error:)] pub unsafe fn writeToFile_atomically_encoding_error( &self, @@ -328,10 +418,13 @@ extern_methods!( useAuxiliaryFile: bool, enc: NSStringEncoding, ) -> Result<(), Id>; + #[method_id(description)] pub unsafe fn description(&self) -> Id; + #[method(hash)] pub unsafe fn hash(&self) -> NSUInteger; + #[method_id(initWithCharactersNoCopy:length:freeWhenDone:)] pub unsafe fn initWithCharactersNoCopy_length_freeWhenDone( &self, @@ -339,6 +432,7 @@ extern_methods!( length: NSUInteger, freeBuffer: bool, ) -> Id; + #[method_id(initWithCharactersNoCopy:length:deallocator:)] pub unsafe fn initWithCharactersNoCopy_length_deallocator( &self, @@ -346,25 +440,30 @@ extern_methods!( len: NSUInteger, deallocator: TodoBlock, ) -> Id; + #[method_id(initWithCharacters:length:)] pub unsafe fn initWithCharacters_length( &self, characters: NonNull, length: NSUInteger, ) -> Id; + #[method_id(initWithUTF8String:)] pub unsafe fn initWithUTF8String( &self, nullTerminatedCString: NonNull, ) -> Option>; + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, aString: &NSString) -> Id; + #[method_id(initWithFormat:arguments:)] pub unsafe fn initWithFormat_arguments( &self, format: &NSString, argList: va_list, ) -> Id; + #[method_id(initWithFormat:locale:arguments:)] pub unsafe fn initWithFormat_locale_arguments( &self, @@ -372,12 +471,14 @@ extern_methods!( locale: Option<&Object>, argList: va_list, ) -> Id; + #[method_id(initWithData:encoding:)] pub unsafe fn initWithData_encoding( &self, data: &NSData, encoding: NSStringEncoding, ) -> Option>; + #[method_id(initWithBytes:length:encoding:)] pub unsafe fn initWithBytes_length_encoding( &self, @@ -385,6 +486,7 @@ extern_methods!( len: NSUInteger, encoding: NSStringEncoding, ) -> Option>; + #[method_id(initWithBytesNoCopy:length:encoding:freeWhenDone:)] pub unsafe fn initWithBytesNoCopy_length_encoding_freeWhenDone( &self, @@ -393,6 +495,7 @@ extern_methods!( encoding: NSStringEncoding, freeBuffer: bool, ) -> Option>; + #[method_id(initWithBytesNoCopy:length:encoding:deallocator:)] pub unsafe fn initWithBytesNoCopy_length_encoding_deallocator( &self, @@ -401,69 +504,83 @@ extern_methods!( encoding: NSStringEncoding, deallocator: TodoBlock, ) -> Option>; + #[method_id(string)] pub unsafe fn string() -> Id; + #[method_id(stringWithString:)] pub unsafe fn stringWithString(string: &NSString) -> Id; + #[method_id(stringWithCharacters:length:)] pub unsafe fn stringWithCharacters_length( characters: NonNull, length: NSUInteger, ) -> Id; + #[method_id(stringWithUTF8String:)] pub unsafe fn stringWithUTF8String( nullTerminatedCString: NonNull, ) -> Option>; + #[method_id(initWithCString:encoding:)] pub unsafe fn initWithCString_encoding( &self, nullTerminatedCString: NonNull, encoding: NSStringEncoding, ) -> Option>; + #[method_id(stringWithCString:encoding:)] pub unsafe fn stringWithCString_encoding( cString: NonNull, enc: NSStringEncoding, ) -> Option>; + #[method_id(initWithContentsOfURL:encoding:error:)] pub unsafe fn initWithContentsOfURL_encoding_error( &self, url: &NSURL, enc: NSStringEncoding, ) -> Result, Id>; + #[method_id(initWithContentsOfFile:encoding:error:)] pub unsafe fn initWithContentsOfFile_encoding_error( &self, path: &NSString, enc: NSStringEncoding, ) -> Result, Id>; + #[method_id(stringWithContentsOfURL:encoding:error:)] pub unsafe fn stringWithContentsOfURL_encoding_error( url: &NSURL, enc: NSStringEncoding, ) -> Result, Id>; + #[method_id(stringWithContentsOfFile:encoding:error:)] pub unsafe fn stringWithContentsOfFile_encoding_error( path: &NSString, enc: NSStringEncoding, ) -> Result, Id>; + #[method_id(initWithContentsOfURL:usedEncoding:error:)] pub unsafe fn initWithContentsOfURL_usedEncoding_error( &self, url: &NSURL, enc: *mut NSStringEncoding, ) -> Result, Id>; + #[method_id(initWithContentsOfFile:usedEncoding:error:)] pub unsafe fn initWithContentsOfFile_usedEncoding_error( &self, path: &NSString, enc: *mut NSStringEncoding, ) -> Result, Id>; + #[method_id(stringWithContentsOfURL:usedEncoding:error:)] pub unsafe fn stringWithContentsOfURL_usedEncoding_error( url: &NSURL, enc: *mut NSStringEncoding, ) -> Result, Id>; + #[method_id(stringWithContentsOfFile:usedEncoding:error:)] pub unsafe fn stringWithContentsOfFile_usedEncoding_error( path: &NSString, @@ -471,9 +588,11 @@ extern_methods!( ) -> Result, Id>; } ); + pub type NSStringEncodingDetectionOptionsKey = NSString; + extern_methods!( - #[doc = "NSStringEncodingDetection"] + /// NSStringEncodingDetection unsafe impl NSString { #[method(stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:)] pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( @@ -484,17 +603,21 @@ extern_methods!( ) -> NSStringEncoding; } ); + extern_methods!( - #[doc = "NSItemProvider"] + /// NSItemProvider unsafe impl NSString {} ); + extern_class!( #[derive(Debug)] pub struct NSMutableString; + unsafe impl ClassType for NSMutableString { type Super = NSString; } ); + extern_methods!( unsafe impl NSMutableString { #[method(replaceCharactersInRange:withString:)] @@ -505,17 +628,22 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSMutableStringExtensionMethods"] + /// NSMutableStringExtensionMethods unsafe impl NSMutableString { #[method(insertString:atIndex:)] pub unsafe fn insertString_atIndex(&self, aString: &NSString, loc: NSUInteger); + #[method(deleteCharactersInRange:)] pub unsafe fn deleteCharactersInRange(&self, range: NSRange); + #[method(appendString:)] pub unsafe fn appendString(&self, aString: &NSString); + #[method(setString:)] pub unsafe fn setString(&self, aString: &NSString); + #[method(replaceOccurrencesOfString:withString:options:range:)] pub unsafe fn replaceOccurrencesOfString_withString_options_range( &self, @@ -524,6 +652,7 @@ extern_methods!( options: NSStringCompareOptions, searchRange: NSRange, ) -> NSUInteger; + #[method(applyTransform:reverse:range:updatedRange:)] pub unsafe fn applyTransform_reverse_range_updatedRange( &self, @@ -532,34 +661,44 @@ extern_methods!( range: NSRange, resultingRange: NSRangePointer, ) -> bool; + #[method_id(initWithCapacity:)] pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Id; + #[method_id(stringWithCapacity:)] pub unsafe fn stringWithCapacity(capacity: NSUInteger) -> Id; } ); + extern_methods!( - #[doc = "NSExtendedStringPropertyListParsing"] + /// NSExtendedStringPropertyListParsing unsafe impl NSString { #[method_id(propertyList)] pub unsafe fn propertyList(&self) -> Id; + #[method_id(propertyListFromStringsFileFormat)] pub unsafe fn propertyListFromStringsFileFormat(&self) -> Option>; } ); + extern_methods!( - #[doc = "NSStringDeprecated"] + /// NSStringDeprecated unsafe impl NSString { #[method(cString)] pub unsafe fn cString(&self) -> *mut c_char; + #[method(lossyCString)] pub unsafe fn lossyCString(&self) -> *mut c_char; + #[method(cStringLength)] pub unsafe fn cStringLength(&self) -> NSUInteger; + #[method(getCString:)] pub unsafe fn getCString(&self, bytes: NonNull); + #[method(getCString:maxLength:)] pub unsafe fn getCString_maxLength(&self, bytes: NonNull, maxLength: NSUInteger); + #[method(getCString:maxLength:range:remainingRange:)] pub unsafe fn getCString_maxLength_range_remainingRange( &self, @@ -568,22 +707,29 @@ extern_methods!( aRange: NSRange, leftoverRange: NSRangePointer, ); + #[method(writeToFile:atomically:)] pub unsafe fn writeToFile_atomically( &self, path: &NSString, useAuxiliaryFile: bool, ) -> bool; + #[method(writeToURL:atomically:)] pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; + #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option>; + #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + #[method_id(stringWithContentsOfFile:)] pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option>; + #[method_id(stringWithContentsOfURL:)] pub unsafe fn stringWithContentsOfURL(url: &NSURL) -> Option>; + #[method_id(initWithCStringNoCopy:length:freeWhenDone:)] pub unsafe fn initWithCStringNoCopy_length_freeWhenDone( &self, @@ -591,42 +737,53 @@ extern_methods!( length: NSUInteger, freeBuffer: bool, ) -> Option>; + #[method_id(initWithCString:length:)] pub unsafe fn initWithCString_length( &self, bytes: NonNull, length: NSUInteger, ) -> Option>; + #[method_id(initWithCString:)] pub unsafe fn initWithCString(&self, bytes: NonNull) -> Option>; + #[method_id(stringWithCString:length:)] pub unsafe fn stringWithCString_length( bytes: NonNull, length: NSUInteger, ) -> Option>; + #[method_id(stringWithCString:)] pub unsafe fn stringWithCString(bytes: NonNull) -> Option>; + #[method(getCharacters:)] pub unsafe fn getCharacters(&self, buffer: NonNull); } ); + extern_class!( #[derive(Debug)] pub struct NSSimpleCString; + unsafe impl ClassType for NSSimpleCString { type Super = NSString; } ); + extern_methods!( unsafe impl NSSimpleCString {} ); + extern_class!( #[derive(Debug)] pub struct NSConstantString; + unsafe impl ClassType for NSConstantString { type Super = NSSimpleCString; } ); + extern_methods!( unsafe impl NSConstantString {} ); diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 41db9d2aa..040ff4cf5 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -1,76 +1,109 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTask; + unsafe impl ClassType for NSTask { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTask { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(executableURL)] pub unsafe fn executableURL(&self) -> Option>; + #[method(setExecutableURL:)] pub unsafe fn setExecutableURL(&self, executableURL: Option<&NSURL>); + #[method_id(arguments)] pub unsafe fn arguments(&self) -> Option, Shared>>; + #[method(setArguments:)] pub unsafe fn setArguments(&self, arguments: Option<&NSArray>); + #[method_id(environment)] pub unsafe fn environment(&self) -> Option, Shared>>; + #[method(setEnvironment:)] pub unsafe fn setEnvironment(&self, environment: Option<&NSDictionary>); + #[method_id(currentDirectoryURL)] pub unsafe fn currentDirectoryURL(&self) -> Option>; + #[method(setCurrentDirectoryURL:)] pub unsafe fn setCurrentDirectoryURL(&self, currentDirectoryURL: Option<&NSURL>); + #[method_id(standardInput)] pub unsafe fn standardInput(&self) -> Option>; + #[method(setStandardInput:)] pub unsafe fn setStandardInput(&self, standardInput: Option<&Object>); + #[method_id(standardOutput)] pub unsafe fn standardOutput(&self) -> Option>; + #[method(setStandardOutput:)] pub unsafe fn setStandardOutput(&self, standardOutput: Option<&Object>); + #[method_id(standardError)] pub unsafe fn standardError(&self) -> Option>; + #[method(setStandardError:)] pub unsafe fn setStandardError(&self, standardError: Option<&Object>); + #[method(launchAndReturnError:)] pub unsafe fn launchAndReturnError(&self) -> Result<(), Id>; + #[method(interrupt)] pub unsafe fn interrupt(&self); + #[method(terminate)] pub unsafe fn terminate(&self); + #[method(suspend)] pub unsafe fn suspend(&self) -> bool; + #[method(resume)] pub unsafe fn resume(&self) -> bool; + #[method(processIdentifier)] pub unsafe fn processIdentifier(&self) -> c_int; + #[method(isRunning)] pub unsafe fn isRunning(&self) -> bool; + #[method(terminationStatus)] pub unsafe fn terminationStatus(&self) -> c_int; + #[method(terminationReason)] pub unsafe fn terminationReason(&self) -> NSTaskTerminationReason; + #[method(terminationHandler)] pub unsafe fn terminationHandler(&self) -> TodoBlock; + #[method(setTerminationHandler:)] pub unsafe fn setTerminationHandler(&self, terminationHandler: TodoBlock); + #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); } ); + extern_methods!( - #[doc = "NSTaskConveniences"] + /// NSTaskConveniences unsafe impl NSTask { #[method_id(launchedTaskWithExecutableURL:arguments:error:terminationHandler:)] pub unsafe fn launchedTaskWithExecutableURL_arguments_error_terminationHandler( @@ -79,23 +112,30 @@ extern_methods!( error: *mut *mut NSError, terminationHandler: TodoBlock, ) -> Option>; + #[method(waitUntilExit)] pub unsafe fn waitUntilExit(&self); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSTask { #[method_id(launchPath)] pub unsafe fn launchPath(&self) -> Option>; + #[method(setLaunchPath:)] pub unsafe fn setLaunchPath(&self, launchPath: Option<&NSString>); + #[method_id(currentDirectoryPath)] pub unsafe fn currentDirectoryPath(&self) -> Id; + #[method(setCurrentDirectoryPath:)] pub unsafe fn setCurrentDirectoryPath(&self, currentDirectoryPath: &NSString); + #[method(launch)] pub unsafe fn launch(&self); + #[method_id(launchedTaskWithLaunchPath:arguments:)] pub unsafe fn launchedTaskWithLaunchPath_arguments( path: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 6906f3e86..b4059cca4 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -1,92 +1,121 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSTextCheckingTypes = u64; + pub type NSTextCheckingKey = NSString; + extern_class!( #[derive(Debug)] pub struct NSTextCheckingResult; + unsafe impl ClassType for NSTextCheckingResult { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTextCheckingResult { #[method(resultType)] pub unsafe fn resultType(&self) -> NSTextCheckingType; + #[method(range)] pub unsafe fn range(&self) -> NSRange; } ); + extern_methods!( - #[doc = "NSTextCheckingResultOptional"] + /// NSTextCheckingResultOptional unsafe impl NSTextCheckingResult { #[method_id(orthography)] pub unsafe fn orthography(&self) -> Option>; + #[method_id(grammarDetails)] pub unsafe fn grammarDetails( &self, ) -> Option>, Shared>>; + #[method_id(date)] pub unsafe fn date(&self) -> Option>; + #[method_id(timeZone)] pub unsafe fn timeZone(&self) -> Option>; + #[method(duration)] pub unsafe fn duration(&self) -> NSTimeInterval; + #[method_id(components)] pub unsafe fn components( &self, ) -> Option, Shared>>; + #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; + #[method_id(replacementString)] pub unsafe fn replacementString(&self) -> Option>; + #[method_id(alternativeStrings)] pub unsafe fn alternativeStrings(&self) -> Option, Shared>>; + #[method_id(regularExpression)] pub unsafe fn regularExpression(&self) -> Option>; + #[method_id(phoneNumber)] pub unsafe fn phoneNumber(&self) -> Option>; + #[method(numberOfRanges)] pub unsafe fn numberOfRanges(&self) -> NSUInteger; + #[method(rangeAtIndex:)] pub unsafe fn rangeAtIndex(&self, idx: NSUInteger) -> NSRange; + #[method(rangeWithName:)] pub unsafe fn rangeWithName(&self, name: &NSString) -> NSRange; + #[method_id(resultByAdjustingRangesWithOffset:)] pub unsafe fn resultByAdjustingRangesWithOffset( &self, offset: NSInteger, ) -> Id; + #[method_id(addressComponents)] pub unsafe fn addressComponents( &self, ) -> Option, Shared>>; } ); + extern_methods!( - #[doc = "NSTextCheckingResultCreation"] + /// NSTextCheckingResultCreation unsafe impl NSTextCheckingResult { #[method_id(orthographyCheckingResultWithRange:orthography:)] pub unsafe fn orthographyCheckingResultWithRange_orthography( range: NSRange, orthography: &NSOrthography, ) -> Id; + #[method_id(spellCheckingResultWithRange:)] pub unsafe fn spellCheckingResultWithRange( range: NSRange, ) -> Id; + #[method_id(grammarCheckingResultWithRange:details:)] pub unsafe fn grammarCheckingResultWithRange_details( range: NSRange, details: &NSArray>, ) -> Id; + #[method_id(dateCheckingResultWithRange:date:)] pub unsafe fn dateCheckingResultWithRange_date( range: NSRange, date: &NSDate, ) -> Id; + #[method_id(dateCheckingResultWithRange:date:timeZone:duration:)] pub unsafe fn dateCheckingResultWithRange_date_timeZone_duration( range: NSRange, @@ -94,53 +123,63 @@ extern_methods!( timeZone: &NSTimeZone, duration: NSTimeInterval, ) -> Id; + #[method_id(addressCheckingResultWithRange:components:)] pub unsafe fn addressCheckingResultWithRange_components( range: NSRange, components: &NSDictionary, ) -> Id; + #[method_id(linkCheckingResultWithRange:URL:)] pub unsafe fn linkCheckingResultWithRange_URL( range: NSRange, url: &NSURL, ) -> Id; + #[method_id(quoteCheckingResultWithRange:replacementString:)] pub unsafe fn quoteCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; + #[method_id(dashCheckingResultWithRange:replacementString:)] pub unsafe fn dashCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; + #[method_id(replacementCheckingResultWithRange:replacementString:)] pub unsafe fn replacementCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; + #[method_id(correctionCheckingResultWithRange:replacementString:)] pub unsafe fn correctionCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; + #[method_id(correctionCheckingResultWithRange:replacementString:alternativeStrings:)] pub unsafe fn correctionCheckingResultWithRange_replacementString_alternativeStrings( range: NSRange, replacementString: &NSString, alternativeStrings: &NSArray, ) -> Id; + #[method_id(regularExpressionCheckingResultWithRanges:count:regularExpression:)] pub unsafe fn regularExpressionCheckingResultWithRanges_count_regularExpression( ranges: NSRangePointer, count: NSUInteger, regularExpression: &NSRegularExpression, ) -> Id; + #[method_id(phoneNumberCheckingResultWithRange:phoneNumber:)] pub unsafe fn phoneNumberCheckingResultWithRange_phoneNumber( range: NSRange, phoneNumber: &NSString, ) -> Id; + #[method_id(transitInformationCheckingResultWithRange:components:)] pub unsafe fn transitInformationCheckingResultWithRange_components( range: NSRange, diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index e28f02874..55d4763a9 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -1,68 +1,97 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSThread; + unsafe impl ClassType for NSThread { type Super = NSObject; } ); + extern_methods!( unsafe impl NSThread { #[method_id(currentThread)] pub unsafe fn currentThread() -> Id; + #[method(detachNewThreadWithBlock:)] pub unsafe fn detachNewThreadWithBlock(block: TodoBlock); + #[method(detachNewThreadSelector:toTarget:withObject:)] pub unsafe fn detachNewThreadSelector_toTarget_withObject( selector: Sel, target: &Object, argument: Option<&Object>, ); + #[method(isMultiThreaded)] pub unsafe fn isMultiThreaded() -> bool; + #[method_id(threadDictionary)] pub unsafe fn threadDictionary(&self) -> Id; + #[method(sleepUntilDate:)] pub unsafe fn sleepUntilDate(date: &NSDate); + #[method(sleepForTimeInterval:)] pub unsafe fn sleepForTimeInterval(ti: NSTimeInterval); + #[method(exit)] pub unsafe fn exit(); + #[method(threadPriority)] pub unsafe fn threadPriority() -> c_double; + #[method(setThreadPriority:)] pub unsafe fn setThreadPriority(p: c_double) -> bool; + #[method(threadPriority)] pub unsafe fn threadPriority(&self) -> c_double; + #[method(setThreadPriority:)] pub unsafe fn setThreadPriority(&self, threadPriority: c_double); + #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; + #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); + #[method_id(callStackReturnAddresses)] pub unsafe fn callStackReturnAddresses() -> Id, Shared>; + #[method_id(callStackSymbols)] pub unsafe fn callStackSymbols() -> Id, Shared>; + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); + #[method(stackSize)] pub unsafe fn stackSize(&self) -> NSUInteger; + #[method(setStackSize:)] pub unsafe fn setStackSize(&self, stackSize: NSUInteger); + #[method(isMainThread)] pub unsafe fn isMainThread(&self) -> bool; + #[method(isMainThread)] pub unsafe fn isMainThread() -> bool; + #[method_id(mainThread)] pub unsafe fn mainThread() -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithTarget:selector:object:)] pub unsafe fn initWithTarget_selector_object( &self, @@ -70,24 +99,32 @@ extern_methods!( selector: Sel, argument: Option<&Object>, ) -> Id; + #[method_id(initWithBlock:)] pub unsafe fn initWithBlock(&self, block: TodoBlock) -> Id; + #[method(isExecuting)] pub unsafe fn isExecuting(&self) -> bool; + #[method(isFinished)] pub unsafe fn isFinished(&self) -> bool; + #[method(isCancelled)] pub unsafe fn isCancelled(&self) -> bool; + #[method(cancel)] pub unsafe fn cancel(&self); + #[method(start)] pub unsafe fn start(&self); + #[method(main)] pub unsafe fn main(&self); } ); + extern_methods!( - #[doc = "NSThreadPerformAdditions"] + /// NSThreadPerformAdditions unsafe impl NSObject { #[method(performSelectorOnMainThread:withObject:waitUntilDone:modes:)] pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone_modes( @@ -97,6 +134,7 @@ extern_methods!( wait: bool, array: Option<&NSArray>, ); + #[method(performSelectorOnMainThread:withObject:waitUntilDone:)] pub unsafe fn performSelectorOnMainThread_withObject_waitUntilDone( &self, @@ -104,6 +142,7 @@ extern_methods!( arg: Option<&Object>, wait: bool, ); + #[method(performSelector:onThread:withObject:waitUntilDone:modes:)] pub unsafe fn performSelector_onThread_withObject_waitUntilDone_modes( &self, @@ -113,6 +152,7 @@ extern_methods!( wait: bool, array: Option<&NSArray>, ); + #[method(performSelector:onThread:withObject:waitUntilDone:)] pub unsafe fn performSelector_onThread_withObject_waitUntilDone( &self, @@ -121,6 +161,7 @@ extern_methods!( arg: Option<&Object>, wait: bool, ); + #[method(performSelectorInBackground:withObject:)] pub unsafe fn performSelectorInBackground_withObject( &self, diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index f30b58887..13c0e7c92 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTimeZone; + unsafe impl ClassType for NSTimeZone { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTimeZone { #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method_id(data)] pub unsafe fn data(&self) -> Id; + #[method(secondsFromGMTForDate:)] pub unsafe fn secondsFromGMTForDate(&self, aDate: &NSDate) -> NSInteger; + #[method_id(abbreviationForDate:)] pub unsafe fn abbreviationForDate(&self, aDate: &NSDate) -> Option>; + #[method(isDaylightSavingTimeForDate:)] pub unsafe fn isDaylightSavingTimeForDate(&self, aDate: &NSDate) -> bool; + #[method(daylightSavingTimeOffsetForDate:)] pub unsafe fn daylightSavingTimeOffsetForDate(&self, aDate: &NSDate) -> NSTimeInterval; + #[method_id(nextDaylightSavingTimeTransitionAfterDate:)] pub unsafe fn nextDaylightSavingTimeTransitionAfterDate( &self, @@ -30,43 +41,60 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSExtendedTimeZone"] + /// NSExtendedTimeZone unsafe impl NSTimeZone { #[method_id(systemTimeZone)] pub unsafe fn systemTimeZone() -> Id; + #[method(resetSystemTimeZone)] pub unsafe fn resetSystemTimeZone(); + #[method_id(defaultTimeZone)] pub unsafe fn defaultTimeZone() -> Id; + #[method(setDefaultTimeZone:)] pub unsafe fn setDefaultTimeZone(defaultTimeZone: &NSTimeZone); + #[method_id(localTimeZone)] pub unsafe fn localTimeZone() -> Id; + #[method_id(knownTimeZoneNames)] pub unsafe fn knownTimeZoneNames() -> Id, Shared>; + #[method_id(abbreviationDictionary)] pub unsafe fn abbreviationDictionary() -> Id, Shared>; + #[method(setAbbreviationDictionary:)] pub unsafe fn setAbbreviationDictionary( abbreviationDictionary: &NSDictionary, ); + #[method_id(timeZoneDataVersion)] pub unsafe fn timeZoneDataVersion() -> Id; + #[method(secondsFromGMT)] pub unsafe fn secondsFromGMT(&self) -> NSInteger; + #[method_id(abbreviation)] pub unsafe fn abbreviation(&self) -> Option>; + #[method(isDaylightSavingTime)] pub unsafe fn isDaylightSavingTime(&self) -> bool; + #[method(daylightSavingTimeOffset)] pub unsafe fn daylightSavingTimeOffset(&self) -> NSTimeInterval; + #[method_id(nextDaylightSavingTimeTransition)] pub unsafe fn nextDaylightSavingTimeTransition(&self) -> Option>; + #[method_id(description)] pub unsafe fn description(&self) -> Id; + #[method(isEqualToTimeZone:)] pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool; + #[method_id(localizedName:locale:)] pub unsafe fn localizedName_locale( &self, @@ -75,26 +103,32 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSTimeZoneCreation"] + /// NSTimeZoneCreation unsafe impl NSTimeZone { #[method_id(timeZoneWithName:)] pub unsafe fn timeZoneWithName(tzName: &NSString) -> Option>; + #[method_id(timeZoneWithName:data:)] pub unsafe fn timeZoneWithName_data( tzName: &NSString, aData: Option<&NSData>, ) -> Option>; + #[method_id(initWithName:)] pub unsafe fn initWithName(&self, tzName: &NSString) -> Option>; + #[method_id(initWithName:data:)] pub unsafe fn initWithName_data( &self, tzName: &NSString, aData: Option<&NSData>, ) -> Option>; + #[method_id(timeZoneForSecondsFromGMT:)] pub unsafe fn timeZoneForSecondsFromGMT(seconds: NSInteger) -> Id; + #[method_id(timeZoneWithAbbreviation:)] pub unsafe fn timeZoneWithAbbreviation(abbreviation: &NSString) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index e4d24d89c..1e1754dbe 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSTimer; + unsafe impl ClassType for NSTimer { type Super = NSObject; } ); + extern_methods!( unsafe impl NSTimer { #[method_id(timerWithTimeInterval:invocation:repeats:)] @@ -17,12 +22,14 @@ extern_methods!( invocation: &NSInvocation, yesOrNo: bool, ) -> Id; + #[method_id(scheduledTimerWithTimeInterval:invocation:repeats:)] pub unsafe fn scheduledTimerWithTimeInterval_invocation_repeats( ti: NSTimeInterval, invocation: &NSInvocation, yesOrNo: bool, ) -> Id; + #[method_id(timerWithTimeInterval:target:selector:userInfo:repeats:)] pub unsafe fn timerWithTimeInterval_target_selector_userInfo_repeats( ti: NSTimeInterval, @@ -31,6 +38,7 @@ extern_methods!( userInfo: Option<&Object>, yesOrNo: bool, ) -> Id; + #[method_id(scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:)] pub unsafe fn scheduledTimerWithTimeInterval_target_selector_userInfo_repeats( ti: NSTimeInterval, @@ -39,18 +47,21 @@ extern_methods!( userInfo: Option<&Object>, yesOrNo: bool, ) -> Id; + #[method_id(timerWithTimeInterval:repeats:block:)] pub unsafe fn timerWithTimeInterval_repeats_block( interval: NSTimeInterval, repeats: bool, block: TodoBlock, ) -> Id; + #[method_id(scheduledTimerWithTimeInterval:repeats:block:)] pub unsafe fn scheduledTimerWithTimeInterval_repeats_block( interval: NSTimeInterval, repeats: bool, block: TodoBlock, ) -> Id; + #[method_id(initWithFireDate:interval:repeats:block:)] pub unsafe fn initWithFireDate_interval_repeats_block( &self, @@ -59,6 +70,7 @@ extern_methods!( repeats: bool, block: TodoBlock, ) -> Id; + #[method_id(initWithFireDate:interval:target:selector:userInfo:repeats:)] pub unsafe fn initWithFireDate_interval_target_selector_userInfo_repeats( &self, @@ -69,22 +81,31 @@ extern_methods!( ui: Option<&Object>, rep: bool, ) -> Id; + #[method(fire)] pub unsafe fn fire(&self); + #[method_id(fireDate)] pub unsafe fn fireDate(&self) -> Id; + #[method(setFireDate:)] pub unsafe fn setFireDate(&self, fireDate: &NSDate); + #[method(timeInterval)] pub unsafe fn timeInterval(&self) -> NSTimeInterval; + #[method(tolerance)] pub unsafe fn tolerance(&self) -> NSTimeInterval; + #[method(setTolerance:)] pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval); + #[method(invalidate)] pub unsafe fn invalidate(&self); + #[method(isValid)] pub unsafe fn isValid(&self) -> bool; + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; } diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index c5b7b8640..a71579ede 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -1,22 +1,35 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSURLResourceKey = NSString; + pub type NSURLFileResourceType = NSString; + pub type NSURLThumbnailDictionaryItem = NSString; + pub type NSURLFileProtectionType = NSString; + pub type NSURLUbiquitousItemDownloadingStatus = NSString; + pub type NSURLUbiquitousSharedItemRole = NSString; + pub type NSURLUbiquitousSharedItemPermissions = NSString; + pub type NSURLBookmarkFileCreationOptions = NSUInteger; + extern_class!( #[derive(Debug)] pub struct NSURL; + unsafe impl ClassType for NSURL { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURL { #[method_id(initWithScheme:host:path:)] @@ -26,6 +39,7 @@ extern_methods!( host: Option<&NSString>, path: &NSString, ) -> Option>; + #[method_id(initFileURLWithPath:isDirectory:relativeToURL:)] pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL( &self, @@ -33,38 +47,46 @@ extern_methods!( isDir: bool, baseURL: Option<&NSURL>, ) -> Id; + #[method_id(initFileURLWithPath:relativeToURL:)] pub unsafe fn initFileURLWithPath_relativeToURL( &self, path: &NSString, baseURL: Option<&NSURL>, ) -> Id; + #[method_id(initFileURLWithPath:isDirectory:)] pub unsafe fn initFileURLWithPath_isDirectory( &self, path: &NSString, isDir: bool, ) -> Id; + #[method_id(initFileURLWithPath:)] pub unsafe fn initFileURLWithPath(&self, path: &NSString) -> Id; + #[method_id(fileURLWithPath:isDirectory:relativeToURL:)] pub unsafe fn fileURLWithPath_isDirectory_relativeToURL( path: &NSString, isDir: bool, baseURL: Option<&NSURL>, ) -> Id; + #[method_id(fileURLWithPath:relativeToURL:)] pub unsafe fn fileURLWithPath_relativeToURL( path: &NSString, baseURL: Option<&NSURL>, ) -> Id; + #[method_id(fileURLWithPath:isDirectory:)] pub unsafe fn fileURLWithPath_isDirectory( path: &NSString, isDir: bool, ) -> Id; + #[method_id(fileURLWithPath:)] pub unsafe fn fileURLWithPath(path: &NSString) -> Id; + #[method_id(initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL( &self, @@ -72,137 +94,179 @@ extern_methods!( isDir: bool, baseURL: Option<&NSURL>, ) -> Id; + #[method_id(fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL( path: NonNull, isDir: bool, baseURL: Option<&NSURL>, ) -> Id; + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, URLString: &NSString) -> Option>; + #[method_id(initWithString:relativeToURL:)] pub unsafe fn initWithString_relativeToURL( &self, URLString: &NSString, baseURL: Option<&NSURL>, ) -> Option>; + #[method_id(URLWithString:)] pub unsafe fn URLWithString(URLString: &NSString) -> Option>; + #[method_id(URLWithString:relativeToURL:)] pub unsafe fn URLWithString_relativeToURL( URLString: &NSString, baseURL: Option<&NSURL>, ) -> Option>; + #[method_id(initWithDataRepresentation:relativeToURL:)] pub unsafe fn initWithDataRepresentation_relativeToURL( &self, data: &NSData, baseURL: Option<&NSURL>, ) -> Id; + #[method_id(URLWithDataRepresentation:relativeToURL:)] pub unsafe fn URLWithDataRepresentation_relativeToURL( data: &NSData, baseURL: Option<&NSURL>, ) -> Id; + #[method_id(initAbsoluteURLWithDataRepresentation:relativeToURL:)] pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL( &self, data: &NSData, baseURL: Option<&NSURL>, ) -> Id; + #[method_id(absoluteURLWithDataRepresentation:relativeToURL:)] pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL( data: &NSData, baseURL: Option<&NSURL>, ) -> Id; + #[method_id(dataRepresentation)] pub unsafe fn dataRepresentation(&self) -> Id; + #[method_id(absoluteString)] pub unsafe fn absoluteString(&self) -> Option>; + #[method_id(relativeString)] pub unsafe fn relativeString(&self) -> Id; + #[method_id(baseURL)] pub unsafe fn baseURL(&self) -> Option>; + #[method_id(absoluteURL)] pub unsafe fn absoluteURL(&self) -> Option>; + #[method_id(scheme)] pub unsafe fn scheme(&self) -> Option>; + #[method_id(resourceSpecifier)] pub unsafe fn resourceSpecifier(&self) -> Option>; + #[method_id(host)] pub unsafe fn host(&self) -> Option>; + #[method_id(port)] pub unsafe fn port(&self) -> Option>; + #[method_id(user)] pub unsafe fn user(&self) -> Option>; + #[method_id(password)] pub unsafe fn password(&self) -> Option>; + #[method_id(path)] pub unsafe fn path(&self) -> Option>; + #[method_id(fragment)] pub unsafe fn fragment(&self) -> Option>; + #[method_id(parameterString)] pub unsafe fn parameterString(&self) -> Option>; + #[method_id(query)] pub unsafe fn query(&self) -> Option>; + #[method_id(relativePath)] pub unsafe fn relativePath(&self) -> Option>; + #[method(hasDirectoryPath)] pub unsafe fn hasDirectoryPath(&self) -> bool; + #[method(getFileSystemRepresentation:maxLength:)] pub unsafe fn getFileSystemRepresentation_maxLength( &self, buffer: NonNull, maxBufferLength: NSUInteger, ) -> bool; + #[method(fileSystemRepresentation)] pub unsafe fn fileSystemRepresentation(&self) -> NonNull; + #[method(isFileURL)] pub unsafe fn isFileURL(&self) -> bool; + #[method_id(standardizedURL)] pub unsafe fn standardizedURL(&self) -> Option>; + #[method(checkResourceIsReachableAndReturnError:)] pub unsafe fn checkResourceIsReachableAndReturnError( &self, ) -> Result<(), Id>; + #[method(isFileReferenceURL)] pub unsafe fn isFileReferenceURL(&self) -> bool; + #[method_id(fileReferenceURL)] pub unsafe fn fileReferenceURL(&self) -> Option>; + #[method_id(filePathURL)] pub unsafe fn filePathURL(&self) -> Option>; + #[method(getResourceValue:forKey:error:)] pub unsafe fn getResourceValue_forKey_error( &self, value: &mut Option>, key: &NSURLResourceKey, ) -> Result<(), Id>; + #[method_id(resourceValuesForKeys:error:)] pub unsafe fn resourceValuesForKeys_error( &self, keys: &NSArray, ) -> Result, Shared>, Id>; + #[method(setResourceValue:forKey:error:)] pub unsafe fn setResourceValue_forKey_error( &self, value: Option<&Object>, key: &NSURLResourceKey, ) -> Result<(), Id>; + #[method(setResourceValues:error:)] pub unsafe fn setResourceValues_error( &self, keyedValues: &NSDictionary, ) -> Result<(), Id>; + #[method(removeCachedResourceValueForKey:)] pub unsafe fn removeCachedResourceValueForKey(&self, key: &NSURLResourceKey); + #[method(removeAllCachedResourceValues)] pub unsafe fn removeAllCachedResourceValues(&self); + #[method(setTemporaryResourceValue:forKey:)] pub unsafe fn setTemporaryResourceValue_forKey( &self, value: Option<&Object>, key: &NSURLResourceKey, ); + #[method_id(bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:)] pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error( &self, @@ -210,6 +274,7 @@ extern_methods!( keys: Option<&NSArray>, relativeURL: Option<&NSURL>, ) -> Result, Id>; + #[method_id(initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( &self, @@ -218,6 +283,7 @@ extern_methods!( relativeURL: Option<&NSURL>, isStale: *mut bool, ) -> Result, Id>; + #[method_id(URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( bookmarkData: &NSData, @@ -225,34 +291,41 @@ extern_methods!( relativeURL: Option<&NSURL>, isStale: *mut bool, ) -> Result, Id>; + #[method_id(resourceValuesForKeys:fromBookmarkData:)] pub unsafe fn resourceValuesForKeys_fromBookmarkData( keys: &NSArray, bookmarkData: &NSData, ) -> Option, Shared>>; + #[method(writeBookmarkData:toURL:options:error:)] pub unsafe fn writeBookmarkData_toURL_options_error( bookmarkData: &NSData, bookmarkFileURL: &NSURL, options: NSURLBookmarkFileCreationOptions, ) -> Result<(), Id>; + #[method_id(bookmarkDataWithContentsOfURL:error:)] pub unsafe fn bookmarkDataWithContentsOfURL_error( bookmarkFileURL: &NSURL, ) -> Result, Id>; + #[method_id(URLByResolvingAliasFileAtURL:options:error:)] pub unsafe fn URLByResolvingAliasFileAtURL_options_error( url: &NSURL, options: NSURLBookmarkResolutionOptions, ) -> Result, Id>; + #[method(startAccessingSecurityScopedResource)] pub unsafe fn startAccessingSecurityScopedResource(&self) -> bool; + #[method(stopAccessingSecurityScopedResource)] pub unsafe fn stopAccessingSecurityScopedResource(&self); } ); + extern_methods!( - #[doc = "NSPromisedItems"] + /// NSPromisedItems unsafe impl NSURL { #[method(getPromisedItemResourceValue:forKey:error:)] pub unsafe fn getPromisedItemResourceValue_forKey_error( @@ -260,28 +333,34 @@ extern_methods!( value: &mut Option>, key: &NSURLResourceKey, ) -> Result<(), Id>; + #[method_id(promisedItemResourceValuesForKeys:error:)] pub unsafe fn promisedItemResourceValuesForKeys_error( &self, keys: &NSArray, ) -> Result, Shared>, Id>; + #[method(checkPromisedItemIsReachableAndReturnError:)] pub unsafe fn checkPromisedItemIsReachableAndReturnError( &self, ) -> Result<(), Id>; } ); + extern_methods!( - #[doc = "NSItemProvider"] + /// NSItemProvider unsafe impl NSURL {} ); + extern_class!( #[derive(Debug)] pub struct NSURLQueryItem; + unsafe impl ClassType for NSURLQueryItem { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLQueryItem { #[method_id(initWithName:value:)] @@ -290,130 +369,183 @@ extern_methods!( name: &NSString, value: Option<&NSString>, ) -> Id; + #[method_id(queryItemWithName:value:)] pub unsafe fn queryItemWithName_value( name: &NSString, value: Option<&NSString>, ) -> Id; + #[method_id(name)] pub unsafe fn name(&self) -> Id; + #[method_id(value)] pub unsafe fn value(&self) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSURLComponents; + unsafe impl ClassType for NSURLComponents { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLComponents { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithURL:resolvingAgainstBaseURL:)] pub unsafe fn initWithURL_resolvingAgainstBaseURL( &self, url: &NSURL, resolve: bool, ) -> Option>; + #[method_id(componentsWithURL:resolvingAgainstBaseURL:)] pub unsafe fn componentsWithURL_resolvingAgainstBaseURL( url: &NSURL, resolve: bool, ) -> Option>; + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, URLString: &NSString) -> Option>; + #[method_id(componentsWithString:)] pub unsafe fn componentsWithString(URLString: &NSString) -> Option>; + #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; + #[method_id(URLRelativeToURL:)] pub unsafe fn URLRelativeToURL(&self, baseURL: Option<&NSURL>) -> Option>; + #[method_id(string)] pub unsafe fn string(&self) -> Option>; + #[method_id(scheme)] pub unsafe fn scheme(&self) -> Option>; + #[method(setScheme:)] pub unsafe fn setScheme(&self, scheme: Option<&NSString>); + #[method_id(user)] pub unsafe fn user(&self) -> Option>; + #[method(setUser:)] pub unsafe fn setUser(&self, user: Option<&NSString>); + #[method_id(password)] pub unsafe fn password(&self) -> Option>; + #[method(setPassword:)] pub unsafe fn setPassword(&self, password: Option<&NSString>); + #[method_id(host)] pub unsafe fn host(&self) -> Option>; + #[method(setHost:)] pub unsafe fn setHost(&self, host: Option<&NSString>); + #[method_id(port)] pub unsafe fn port(&self) -> Option>; + #[method(setPort:)] pub unsafe fn setPort(&self, port: Option<&NSNumber>); + #[method_id(path)] pub unsafe fn path(&self) -> Option>; + #[method(setPath:)] pub unsafe fn setPath(&self, path: Option<&NSString>); + #[method_id(query)] pub unsafe fn query(&self) -> Option>; + #[method(setQuery:)] pub unsafe fn setQuery(&self, query: Option<&NSString>); + #[method_id(fragment)] pub unsafe fn fragment(&self) -> Option>; + #[method(setFragment:)] pub unsafe fn setFragment(&self, fragment: Option<&NSString>); + #[method_id(percentEncodedUser)] pub unsafe fn percentEncodedUser(&self) -> Option>; + #[method(setPercentEncodedUser:)] pub unsafe fn setPercentEncodedUser(&self, percentEncodedUser: Option<&NSString>); + #[method_id(percentEncodedPassword)] pub unsafe fn percentEncodedPassword(&self) -> Option>; + #[method(setPercentEncodedPassword:)] pub unsafe fn setPercentEncodedPassword(&self, percentEncodedPassword: Option<&NSString>); + #[method_id(percentEncodedHost)] pub unsafe fn percentEncodedHost(&self) -> Option>; + #[method(setPercentEncodedHost:)] pub unsafe fn setPercentEncodedHost(&self, percentEncodedHost: Option<&NSString>); + #[method_id(percentEncodedPath)] pub unsafe fn percentEncodedPath(&self) -> Option>; + #[method(setPercentEncodedPath:)] pub unsafe fn setPercentEncodedPath(&self, percentEncodedPath: Option<&NSString>); + #[method_id(percentEncodedQuery)] pub unsafe fn percentEncodedQuery(&self) -> Option>; + #[method(setPercentEncodedQuery:)] pub unsafe fn setPercentEncodedQuery(&self, percentEncodedQuery: Option<&NSString>); + #[method_id(percentEncodedFragment)] pub unsafe fn percentEncodedFragment(&self) -> Option>; + #[method(setPercentEncodedFragment:)] pub unsafe fn setPercentEncodedFragment(&self, percentEncodedFragment: Option<&NSString>); + #[method(rangeOfScheme)] pub unsafe fn rangeOfScheme(&self) -> NSRange; + #[method(rangeOfUser)] pub unsafe fn rangeOfUser(&self) -> NSRange; + #[method(rangeOfPassword)] pub unsafe fn rangeOfPassword(&self) -> NSRange; + #[method(rangeOfHost)] pub unsafe fn rangeOfHost(&self) -> NSRange; + #[method(rangeOfPort)] pub unsafe fn rangeOfPort(&self) -> NSRange; + #[method(rangeOfPath)] pub unsafe fn rangeOfPath(&self) -> NSRange; + #[method(rangeOfQuery)] pub unsafe fn rangeOfQuery(&self) -> NSRange; + #[method(rangeOfFragment)] pub unsafe fn rangeOfFragment(&self) -> NSRange; + #[method_id(queryItems)] pub unsafe fn queryItems(&self) -> Option, Shared>>; + #[method(setQueryItems:)] pub unsafe fn setQueryItems(&self, queryItems: Option<&NSArray>); + #[method_id(percentEncodedQueryItems)] pub unsafe fn percentEncodedQueryItems( &self, ) -> Option, Shared>>; + #[method(setPercentEncodedQueryItems:)] pub unsafe fn setPercentEncodedQueryItems( &self, @@ -421,38 +553,48 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSURLUtilities"] + /// NSURLUtilities unsafe impl NSCharacterSet { #[method_id(URLUserAllowedCharacterSet)] pub unsafe fn URLUserAllowedCharacterSet() -> Id; + #[method_id(URLPasswordAllowedCharacterSet)] pub unsafe fn URLPasswordAllowedCharacterSet() -> Id; + #[method_id(URLHostAllowedCharacterSet)] pub unsafe fn URLHostAllowedCharacterSet() -> Id; + #[method_id(URLPathAllowedCharacterSet)] pub unsafe fn URLPathAllowedCharacterSet() -> Id; + #[method_id(URLQueryAllowedCharacterSet)] pub unsafe fn URLQueryAllowedCharacterSet() -> Id; + #[method_id(URLFragmentAllowedCharacterSet)] pub unsafe fn URLFragmentAllowedCharacterSet() -> Id; } ); + extern_methods!( - #[doc = "NSURLUtilities"] + /// NSURLUtilities unsafe impl NSString { #[method_id(stringByAddingPercentEncodingWithAllowedCharacters:)] pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters( &self, allowedCharacters: &NSCharacterSet, ) -> Option>; + #[method_id(stringByRemovingPercentEncoding)] pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option>; + #[method_id(stringByAddingPercentEscapesUsingEncoding:)] pub unsafe fn stringByAddingPercentEscapesUsingEncoding( &self, enc: NSStringEncoding, ) -> Option>; + #[method_id(stringByReplacingPercentEscapesUsingEncoding:)] pub unsafe fn stringByReplacingPercentEscapesUsingEncoding( &self, @@ -460,67 +602,85 @@ extern_methods!( ) -> Option>; } ); + extern_methods!( - #[doc = "NSURLPathUtilities"] + /// NSURLPathUtilities unsafe impl NSURL { #[method_id(fileURLWithPathComponents:)] pub unsafe fn fileURLWithPathComponents( components: &NSArray, ) -> Option>; + #[method_id(pathComponents)] pub unsafe fn pathComponents(&self) -> Option, Shared>>; + #[method_id(lastPathComponent)] pub unsafe fn lastPathComponent(&self) -> Option>; + #[method_id(pathExtension)] pub unsafe fn pathExtension(&self) -> Option>; + #[method_id(URLByAppendingPathComponent:)] pub unsafe fn URLByAppendingPathComponent( &self, pathComponent: &NSString, ) -> Option>; + #[method_id(URLByAppendingPathComponent:isDirectory:)] pub unsafe fn URLByAppendingPathComponent_isDirectory( &self, pathComponent: &NSString, isDirectory: bool, ) -> Option>; + #[method_id(URLByDeletingLastPathComponent)] pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option>; + #[method_id(URLByAppendingPathExtension:)] pub unsafe fn URLByAppendingPathExtension( &self, pathExtension: &NSString, ) -> Option>; + #[method_id(URLByDeletingPathExtension)] pub unsafe fn URLByDeletingPathExtension(&self) -> Option>; + #[method_id(URLByStandardizingPath)] pub unsafe fn URLByStandardizingPath(&self) -> Option>; + #[method_id(URLByResolvingSymlinksInPath)] pub unsafe fn URLByResolvingSymlinksInPath(&self) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSFileSecurity; + unsafe impl ClassType for NSFileSecurity { type Super = NSObject; } ); + extern_methods!( unsafe impl NSFileSecurity { #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSURLClient"] + /// NSURLClient unsafe impl NSObject { #[method(URL:resourceDataDidBecomeAvailable:)] pub unsafe fn URL_resourceDataDidBecomeAvailable(&self, sender: &NSURL, newBytes: &NSData); + #[method(URLResourceDidFinishLoading:)] pub unsafe fn URLResourceDidFinishLoading(&self, sender: &NSURL); + #[method(URLResourceDidCancelLoading:)] pub unsafe fn URLResourceDidCancelLoading(&self, sender: &NSURL); + #[method(URL:resourceDidFailLoadingWithReason:)] pub unsafe fn URL_resourceDidFailLoadingWithReason( &self, @@ -529,26 +689,32 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSURLLoading"] + /// NSURLLoading unsafe impl NSURL { #[method_id(resourceDataUsingCache:)] pub unsafe fn resourceDataUsingCache( &self, shouldUseCache: bool, ) -> Option>; + #[method(loadResourceDataNotifyingClient:usingCache:)] pub unsafe fn loadResourceDataNotifyingClient_usingCache( &self, client: &Object, shouldUseCache: bool, ); + #[method_id(propertyForKey:)] pub unsafe fn propertyForKey(&self, propertyKey: &NSString) -> Option>; + #[method(setResourceData:)] pub unsafe fn setResourceData(&self, data: &NSData) -> bool; + #[method(setProperty:forKey:)] pub unsafe fn setProperty_forKey(&self, property: &Object, propertyKey: &NSString) -> bool; + #[method_id(URLHandleUsingCache:)] pub unsafe fn URLHandleUsingCache( &self, diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index 5fdf520fc..542b6e3ee 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSURLAuthenticationChallengeSender = NSObject; + extern_class!( #[derive(Debug)] pub struct NSURLAuthenticationChallenge; + unsafe impl ClassType for NSURLAuthenticationChallenge { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLAuthenticationChallenge { #[method_id(initWithProtectionSpace:proposedCredential:previousFailureCount:failureResponse:error:sender:)] @@ -22,22 +28,29 @@ extern_methods!( error: Option<&NSError>, sender: &NSURLAuthenticationChallengeSender, ) -> Id; + #[method_id(initWithAuthenticationChallenge:sender:)] pub unsafe fn initWithAuthenticationChallenge_sender( &self, challenge: &NSURLAuthenticationChallenge, sender: &NSURLAuthenticationChallengeSender, ) -> Id; + #[method_id(protectionSpace)] pub unsafe fn protectionSpace(&self) -> Id; + #[method_id(proposedCredential)] pub unsafe fn proposedCredential(&self) -> Option>; + #[method(previousFailureCount)] pub unsafe fn previousFailureCount(&self) -> NSInteger; + #[method_id(failureResponse)] pub unsafe fn failureResponse(&self) -> Option>; + #[method_id(error)] pub unsafe fn error(&self) -> Option>; + #[method_id(sender)] pub unsafe fn sender(&self) -> Option>; } diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 637b2a36d..9c1e50178 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSCachedURLResponse; + unsafe impl ClassType for NSCachedURLResponse { type Super = NSObject; } ); + extern_methods!( unsafe impl NSCachedURLResponse { #[method_id(initWithResponse:data:)] @@ -17,6 +22,7 @@ extern_methods!( response: &NSURLResponse, data: &NSData, ) -> Id; + #[method_id(initWithResponse:data:userInfo:storagePolicy:)] pub unsafe fn initWithResponse_data_userInfo_storagePolicy( &self, @@ -25,29 +31,38 @@ extern_methods!( userInfo: Option<&NSDictionary>, storagePolicy: NSURLCacheStoragePolicy, ) -> Id; + #[method_id(response)] pub unsafe fn response(&self) -> Id; + #[method_id(data)] pub unsafe fn data(&self) -> Id; + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; + #[method(storagePolicy)] pub unsafe fn storagePolicy(&self) -> NSURLCacheStoragePolicy; } ); + extern_class!( #[derive(Debug)] pub struct NSURLCache; + unsafe impl ClassType for NSURLCache { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLCache { #[method_id(sharedURLCache)] pub unsafe fn sharedURLCache() -> Id; + #[method(setSharedURLCache:)] pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache); + #[method_id(initWithMemoryCapacity:diskCapacity:diskPath:)] pub unsafe fn initWithMemoryCapacity_diskCapacity_diskPath( &self, @@ -55,6 +70,7 @@ extern_methods!( diskCapacity: NSUInteger, path: Option<&NSString>, ) -> Id; + #[method_id(initWithMemoryCapacity:diskCapacity:directoryURL:)] pub unsafe fn initWithMemoryCapacity_diskCapacity_directoryURL( &self, @@ -62,39 +78,51 @@ extern_methods!( diskCapacity: NSUInteger, directoryURL: Option<&NSURL>, ) -> Id; + #[method_id(cachedResponseForRequest:)] pub unsafe fn cachedResponseForRequest( &self, request: &NSURLRequest, ) -> Option>; + #[method(storeCachedResponse:forRequest:)] pub unsafe fn storeCachedResponse_forRequest( &self, cachedResponse: &NSCachedURLResponse, request: &NSURLRequest, ); + #[method(removeCachedResponseForRequest:)] pub unsafe fn removeCachedResponseForRequest(&self, request: &NSURLRequest); + #[method(removeAllCachedResponses)] pub unsafe fn removeAllCachedResponses(&self); + #[method(removeCachedResponsesSinceDate:)] pub unsafe fn removeCachedResponsesSinceDate(&self, date: &NSDate); + #[method(memoryCapacity)] pub unsafe fn memoryCapacity(&self) -> NSUInteger; + #[method(setMemoryCapacity:)] pub unsafe fn setMemoryCapacity(&self, memoryCapacity: NSUInteger); + #[method(diskCapacity)] pub unsafe fn diskCapacity(&self) -> NSUInteger; + #[method(setDiskCapacity:)] pub unsafe fn setDiskCapacity(&self, diskCapacity: NSUInteger); + #[method(currentMemoryUsage)] pub unsafe fn currentMemoryUsage(&self) -> NSUInteger; + #[method(currentDiskUsage)] pub unsafe fn currentDiskUsage(&self) -> NSUInteger; } ); + extern_methods!( - #[doc = "NSURLSessionTaskAdditions"] + /// NSURLSessionTaskAdditions unsafe impl NSURLCache { #[method(storeCachedResponse:forDataTask:)] pub unsafe fn storeCachedResponse_forDataTask( @@ -102,12 +130,14 @@ extern_methods!( cachedResponse: &NSCachedURLResponse, dataTask: &NSURLSessionDataTask, ); + #[method(getCachedResponseForDataTask:completionHandler:)] pub unsafe fn getCachedResponseForDataTask_completionHandler( &self, dataTask: &NSURLSessionDataTask, completionHandler: TodoBlock, ); + #[method(removeCachedResponseForDataTask:)] pub unsafe fn removeCachedResponseForDataTask(&self, dataTask: &NSURLSessionDataTask); } diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index bf2061e19..f78dd9a47 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSURLConnection; + unsafe impl ClassType for NSURLConnection { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLConnection { #[method_id(initWithRequest:delegate:startImmediately:)] @@ -18,44 +23,58 @@ extern_methods!( delegate: Option<&Object>, startImmediately: bool, ) -> Option>; + #[method_id(initWithRequest:delegate:)] pub unsafe fn initWithRequest_delegate( &self, request: &NSURLRequest, delegate: Option<&Object>, ) -> Option>; + #[method_id(connectionWithRequest:delegate:)] pub unsafe fn connectionWithRequest_delegate( request: &NSURLRequest, delegate: Option<&Object>, ) -> Option>; + #[method_id(originalRequest)] pub unsafe fn originalRequest(&self) -> Id; + #[method_id(currentRequest)] pub unsafe fn currentRequest(&self) -> Id; + #[method(start)] pub unsafe fn start(&self); + #[method(cancel)] pub unsafe fn cancel(&self); + #[method(scheduleInRunLoop:forMode:)] pub unsafe fn scheduleInRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); + #[method(unscheduleFromRunLoop:forMode:)] pub unsafe fn unscheduleFromRunLoop_forMode( &self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode, ); + #[method(setDelegateQueue:)] pub unsafe fn setDelegateQueue(&self, queue: Option<&NSOperationQueue>); + #[method(canHandleRequest:)] pub unsafe fn canHandleRequest(request: &NSURLRequest) -> bool; } ); + pub type NSURLConnectionDelegate = NSObject; + pub type NSURLConnectionDataDelegate = NSObject; + pub type NSURLConnectionDownloadDelegate = NSObject; + extern_methods!( - #[doc = "NSURLConnectionSynchronousLoading"] + /// NSURLConnectionSynchronousLoading unsafe impl NSURLConnection { #[method_id(sendSynchronousRequest:returningResponse:error:)] pub unsafe fn sendSynchronousRequest_returningResponse_error( @@ -64,8 +83,9 @@ extern_methods!( ) -> Result, Id>; } ); + extern_methods!( - #[doc = "NSURLConnectionQueuedLoading"] + /// NSURLConnectionQueuedLoading unsafe impl NSURLConnection { #[method(sendAsynchronousRequest:queue:completionHandler:)] pub unsafe fn sendAsynchronousRequest_queue_completionHandler( diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index 171ea6613..b4e4360ea 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -1,22 +1,28 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSURLCredential; + unsafe impl ClassType for NSURLCredential { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLCredential { #[method(persistence)] pub unsafe fn persistence(&self) -> NSURLCredentialPersistence; } ); + extern_methods!( - #[doc = "NSInternetPassword"] + /// NSInternetPassword unsafe impl NSURLCredential { #[method_id(initWithUser:password:persistence:)] pub unsafe fn initWithUser_password_persistence( @@ -25,22 +31,27 @@ extern_methods!( password: &NSString, persistence: NSURLCredentialPersistence, ) -> Id; + #[method_id(credentialWithUser:password:persistence:)] pub unsafe fn credentialWithUser_password_persistence( user: &NSString, password: &NSString, persistence: NSURLCredentialPersistence, ) -> Id; + #[method_id(user)] pub unsafe fn user(&self) -> Option>; + #[method_id(password)] pub unsafe fn password(&self) -> Option>; + #[method(hasPassword)] pub unsafe fn hasPassword(&self) -> bool; } ); + extern_methods!( - #[doc = "NSClientCertificate"] + /// NSClientCertificate unsafe impl NSURLCredential { #[method_id(initWithIdentity:certificates:persistence:)] pub unsafe fn initWithIdentity_certificates_persistence( @@ -49,23 +60,28 @@ extern_methods!( certArray: Option<&NSArray>, persistence: NSURLCredentialPersistence, ) -> Id; + #[method_id(credentialWithIdentity:certificates:persistence:)] pub unsafe fn credentialWithIdentity_certificates_persistence( identity: SecIdentityRef, certArray: Option<&NSArray>, persistence: NSURLCredentialPersistence, ) -> Id; + #[method(identity)] pub unsafe fn identity(&self) -> SecIdentityRef; + #[method_id(certificates)] pub unsafe fn certificates(&self) -> Id; } ); + extern_methods!( - #[doc = "NSServerTrust"] + /// NSServerTrust unsafe impl NSURLCredential { #[method_id(initWithTrust:)] pub unsafe fn initWithTrust(&self, trust: SecTrustRef) -> Id; + #[method_id(credentialForTrust:)] pub unsafe fn credentialForTrust(trust: SecTrustRef) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 4740e9303..1613ce6f1 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -1,39 +1,49 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSURLCredentialStorage; + unsafe impl ClassType for NSURLCredentialStorage { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLCredentialStorage { #[method_id(sharedCredentialStorage)] pub unsafe fn sharedCredentialStorage() -> Id; + #[method_id(credentialsForProtectionSpace:)] pub unsafe fn credentialsForProtectionSpace( &self, space: &NSURLProtectionSpace, ) -> Option, Shared>>; + #[method_id(allCredentials)] pub unsafe fn allCredentials( &self, ) -> Id>, Shared>; + #[method(setCredential:forProtectionSpace:)] pub unsafe fn setCredential_forProtectionSpace( &self, credential: &NSURLCredential, space: &NSURLProtectionSpace, ); + #[method(removeCredential:forProtectionSpace:)] pub unsafe fn removeCredential_forProtectionSpace( &self, credential: &NSURLCredential, space: &NSURLProtectionSpace, ); + #[method(removeCredential:forProtectionSpace:options:)] pub unsafe fn removeCredential_forProtectionSpace_options( &self, @@ -41,11 +51,13 @@ extern_methods!( space: &NSURLProtectionSpace, options: Option<&NSDictionary>, ); + #[method_id(defaultCredentialForProtectionSpace:)] pub unsafe fn defaultCredentialForProtectionSpace( &self, space: &NSURLProtectionSpace, ) -> Option>; + #[method(setDefaultCredential:forProtectionSpace:)] pub unsafe fn setDefaultCredential_forProtectionSpace( &self, @@ -54,8 +66,9 @@ extern_methods!( ); } ); + extern_methods!( - #[doc = "NSURLSessionTaskAdditions"] + /// NSURLSessionTaskAdditions unsafe impl NSURLCredentialStorage { #[method(getCredentialsForProtectionSpace:task:completionHandler:)] pub unsafe fn getCredentialsForProtectionSpace_task_completionHandler( @@ -64,6 +77,7 @@ extern_methods!( task: &NSURLSessionTask, completionHandler: TodoBlock, ); + #[method(setCredential:forProtectionSpace:task:)] pub unsafe fn setCredential_forProtectionSpace_task( &self, @@ -71,6 +85,7 @@ extern_methods!( protectionSpace: &NSURLProtectionSpace, task: &NSURLSessionTask, ); + #[method(removeCredential:forProtectionSpace:options:task:)] pub unsafe fn removeCredential_forProtectionSpace_options_task( &self, @@ -79,6 +94,7 @@ extern_methods!( options: Option<&NSDictionary>, task: &NSURLSessionTask, ); + #[method(getDefaultCredentialForProtectionSpace:task:completionHandler:)] pub unsafe fn getDefaultCredentialForProtectionSpace_task_completionHandler( &self, @@ -86,6 +102,7 @@ extern_methods!( task: &NSURLSessionTask, completionHandler: TodoBlock, ); + #[method(setDefaultCredential:forProtectionSpace:task:)] pub unsafe fn setDefaultCredential_forProtectionSpace_task( &self, diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index 3b5453f4a..da37f6efb 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -1,24 +1,31 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSURLDownload; + unsafe impl ClassType for NSURLDownload { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLDownload { #[method(canResumeDownloadDecodedWithEncodingMIMEType:)] pub unsafe fn canResumeDownloadDecodedWithEncodingMIMEType(MIMEType: &NSString) -> bool; + #[method_id(initWithRequest:delegate:)] pub unsafe fn initWithRequest_delegate( &self, request: &NSURLRequest, delegate: Option<&NSURLDownloadDelegate>, ) -> Id; + #[method_id(initWithResumeData:delegate:path:)] pub unsafe fn initWithResumeData_delegate_path( &self, @@ -26,18 +33,25 @@ extern_methods!( delegate: Option<&NSURLDownloadDelegate>, path: &NSString, ) -> Id; + #[method(cancel)] pub unsafe fn cancel(&self); + #[method(setDestination:allowOverwrite:)] pub unsafe fn setDestination_allowOverwrite(&self, path: &NSString, allowOverwrite: bool); + #[method_id(request)] pub unsafe fn request(&self) -> Id; + #[method_id(resumeData)] pub unsafe fn resumeData(&self) -> Option>; + #[method(deletesFileUponFailure)] pub unsafe fn deletesFileUponFailure(&self) -> bool; + #[method(setDeletesFileUponFailure:)] pub unsafe fn setDeletesFileUponFailure(&self, deletesFileUponFailure: bool); } ); + pub type NSURLDownloadDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index c670a6383..9d82691b4 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -1,77 +1,106 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSURLHandleClient = NSObject; + extern_class!( #[derive(Debug)] pub struct NSURLHandle; + unsafe impl ClassType for NSURLHandle { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLHandle { #[method(registerURLHandleClass:)] pub unsafe fn registerURLHandleClass(anURLHandleSubclass: Option<&Class>); + #[method(URLHandleClassForURL:)] pub unsafe fn URLHandleClassForURL(anURL: Option<&NSURL>) -> Option<&Class>; + #[method(status)] pub unsafe fn status(&self) -> NSURLHandleStatus; + #[method_id(failureReason)] pub unsafe fn failureReason(&self) -> Option>; + #[method(addClient:)] pub unsafe fn addClient(&self, client: Option<&NSURLHandleClient>); + #[method(removeClient:)] pub unsafe fn removeClient(&self, client: Option<&NSURLHandleClient>); + #[method(loadInBackground)] pub unsafe fn loadInBackground(&self); + #[method(cancelLoadInBackground)] pub unsafe fn cancelLoadInBackground(&self); + #[method_id(resourceData)] pub unsafe fn resourceData(&self) -> Option>; + #[method_id(availableResourceData)] pub unsafe fn availableResourceData(&self) -> Option>; + #[method(expectedResourceDataSize)] pub unsafe fn expectedResourceDataSize(&self) -> c_longlong; + #[method(flushCachedData)] pub unsafe fn flushCachedData(&self); + #[method(backgroundLoadDidFailWithReason:)] pub unsafe fn backgroundLoadDidFailWithReason(&self, reason: Option<&NSString>); + #[method(didLoadBytes:loadComplete:)] pub unsafe fn didLoadBytes_loadComplete(&self, newBytes: Option<&NSData>, yorn: bool); + #[method(canInitWithURL:)] pub unsafe fn canInitWithURL(anURL: Option<&NSURL>) -> bool; + #[method_id(cachedHandleForURL:)] pub unsafe fn cachedHandleForURL(anURL: Option<&NSURL>) -> Option>; + #[method_id(initWithURL:cached:)] pub unsafe fn initWithURL_cached( &self, anURL: Option<&NSURL>, willCache: bool, ) -> Option>; + #[method_id(propertyForKey:)] pub unsafe fn propertyForKey( &self, propertyKey: Option<&NSString>, ) -> Option>; + #[method_id(propertyForKeyIfAvailable:)] pub unsafe fn propertyForKeyIfAvailable( &self, propertyKey: Option<&NSString>, ) -> Option>; + #[method(writeProperty:forKey:)] pub unsafe fn writeProperty_forKey( &self, propertyValue: Option<&Object>, propertyKey: Option<&NSString>, ) -> bool; + #[method(writeData:)] pub unsafe fn writeData(&self, data: Option<&NSData>) -> bool; + #[method_id(loadInForeground)] pub unsafe fn loadInForeground(&self) -> Option>; + #[method(beginLoadInBackground)] pub unsafe fn beginLoadInBackground(&self); + #[method(endLoadInBackground)] pub unsafe fn endLoadInBackground(&self); } diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 3536dc733..04510d981 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSURLProtectionSpace; + unsafe impl ClassType for NSURLProtectionSpace { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLProtectionSpace { #[method_id(initWithHost:port:protocol:realm:authenticationMethod:)] @@ -20,6 +25,7 @@ extern_methods!( realm: Option<&NSString>, authenticationMethod: Option<&NSString>, ) -> Id; + #[method_id(initWithProxyHost:port:type:realm:authenticationMethod:)] pub unsafe fn initWithProxyHost_port_type_realm_authenticationMethod( &self, @@ -29,33 +35,43 @@ extern_methods!( realm: Option<&NSString>, authenticationMethod: Option<&NSString>, ) -> Id; + #[method_id(realm)] pub unsafe fn realm(&self) -> Option>; + #[method(receivesCredentialSecurely)] pub unsafe fn receivesCredentialSecurely(&self) -> bool; + #[method(isProxy)] pub unsafe fn isProxy(&self) -> bool; + #[method_id(host)] pub unsafe fn host(&self) -> Id; + #[method(port)] pub unsafe fn port(&self) -> NSInteger; + #[method_id(proxyType)] pub unsafe fn proxyType(&self) -> Option>; + #[method_id(protocol)] pub unsafe fn protocol(&self) -> Option>; + #[method_id(authenticationMethod)] pub unsafe fn authenticationMethod(&self) -> Id; } ); + extern_methods!( - #[doc = "NSClientCertificateSpace"] + /// NSClientCertificateSpace unsafe impl NSURLProtectionSpace { #[method_id(distinguishedNames)] pub unsafe fn distinguishedNames(&self) -> Option, Shared>>; } ); + extern_methods!( - #[doc = "NSServerTrustValidationSpace"] + /// NSServerTrustValidationSpace unsafe impl NSURLProtectionSpace { #[method(serverTrust)] pub unsafe fn serverTrust(&self) -> SecTrustRef; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 9c0f3d3a3..c845acf9b 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSURLProtocolClient = NSObject; + extern_class!( #[derive(Debug)] pub struct NSURLProtocol; + unsafe impl ClassType for NSURLProtocol { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLProtocol { #[method_id(initWithRequest:cachedResponse:client:)] @@ -19,51 +25,66 @@ extern_methods!( cachedResponse: Option<&NSCachedURLResponse>, client: Option<&NSURLProtocolClient>, ) -> Id; + #[method_id(client)] pub unsafe fn client(&self) -> Option>; + #[method_id(request)] pub unsafe fn request(&self) -> Id; + #[method_id(cachedResponse)] pub unsafe fn cachedResponse(&self) -> Option>; + #[method(canInitWithRequest:)] pub unsafe fn canInitWithRequest(request: &NSURLRequest) -> bool; + #[method_id(canonicalRequestForRequest:)] pub unsafe fn canonicalRequestForRequest( request: &NSURLRequest, ) -> Id; + #[method(requestIsCacheEquivalent:toRequest:)] pub unsafe fn requestIsCacheEquivalent_toRequest( a: &NSURLRequest, b: &NSURLRequest, ) -> bool; + #[method(startLoading)] pub unsafe fn startLoading(&self); + #[method(stopLoading)] pub unsafe fn stopLoading(&self); + #[method_id(propertyForKey:inRequest:)] pub unsafe fn propertyForKey_inRequest( key: &NSString, request: &NSURLRequest, ) -> Option>; + #[method(setProperty:forKey:inRequest:)] pub unsafe fn setProperty_forKey_inRequest( value: &Object, key: &NSString, request: &NSMutableURLRequest, ); + #[method(removePropertyForKey:inRequest:)] pub unsafe fn removePropertyForKey_inRequest(key: &NSString, request: &NSMutableURLRequest); + #[method(registerClass:)] pub unsafe fn registerClass(protocolClass: &Class) -> bool; + #[method(unregisterClass:)] pub unsafe fn unregisterClass(protocolClass: &Class); } ); + extern_methods!( - #[doc = "NSURLSessionTaskAdditions"] + /// NSURLSessionTaskAdditions unsafe impl NSURLProtocol { #[method(canInitWithTask:)] pub unsafe fn canInitWithTask(task: &NSURLSessionTask) -> bool; + #[method_id(initWithTask:cachedResponse:client:)] pub unsafe fn initWithTask_cachedResponse_client( &self, @@ -71,6 +92,7 @@ extern_methods!( cachedResponse: Option<&NSCachedURLResponse>, client: Option<&NSURLProtocolClient>, ) -> Id; + #[method_id(task)] pub unsafe fn task(&self) -> Option>; } diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 85e107b51..c1fcdd247 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -1,28 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSURLRequest; + unsafe impl ClassType for NSURLRequest { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLRequest { #[method_id(requestWithURL:)] pub unsafe fn requestWithURL(URL: &NSURL) -> Id; + #[method(supportsSecureCoding)] pub unsafe fn supportsSecureCoding() -> bool; + #[method_id(requestWithURL:cachePolicy:timeoutInterval:)] pub unsafe fn requestWithURL_cachePolicy_timeoutInterval( URL: &NSURL, cachePolicy: NSURLRequestCachePolicy, timeoutInterval: NSTimeInterval, ) -> Id; + #[method_id(initWithURL:)] pub unsafe fn initWithURL(&self, URL: &NSURL) -> Id; + #[method_id(initWithURL:cachePolicy:timeoutInterval:)] pub unsafe fn initWithURL_cachePolicy_timeoutInterval( &self, @@ -30,147 +39,200 @@ extern_methods!( cachePolicy: NSURLRequestCachePolicy, timeoutInterval: NSTimeInterval, ) -> Id; + #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; + #[method(cachePolicy)] pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy; + #[method(timeoutInterval)] pub unsafe fn timeoutInterval(&self) -> NSTimeInterval; + #[method_id(mainDocumentURL)] pub unsafe fn mainDocumentURL(&self) -> Option>; + #[method(networkServiceType)] pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType; + #[method(allowsCellularAccess)] pub unsafe fn allowsCellularAccess(&self) -> bool; + #[method(allowsExpensiveNetworkAccess)] pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool; + #[method(allowsConstrainedNetworkAccess)] pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool; + #[method(assumesHTTP3Capable)] pub unsafe fn assumesHTTP3Capable(&self) -> bool; + #[method(attribution)] pub unsafe fn attribution(&self) -> NSURLRequestAttribution; } ); + extern_class!( #[derive(Debug)] pub struct NSMutableURLRequest; + unsafe impl ClassType for NSMutableURLRequest { type Super = NSURLRequest; } ); + extern_methods!( unsafe impl NSMutableURLRequest { #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; + #[method(setURL:)] pub unsafe fn setURL(&self, URL: Option<&NSURL>); + #[method(cachePolicy)] pub unsafe fn cachePolicy(&self) -> NSURLRequestCachePolicy; + #[method(setCachePolicy:)] pub unsafe fn setCachePolicy(&self, cachePolicy: NSURLRequestCachePolicy); + #[method(timeoutInterval)] pub unsafe fn timeoutInterval(&self) -> NSTimeInterval; + #[method(setTimeoutInterval:)] pub unsafe fn setTimeoutInterval(&self, timeoutInterval: NSTimeInterval); + #[method_id(mainDocumentURL)] pub unsafe fn mainDocumentURL(&self) -> Option>; + #[method(setMainDocumentURL:)] pub unsafe fn setMainDocumentURL(&self, mainDocumentURL: Option<&NSURL>); + #[method(networkServiceType)] pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType; + #[method(setNetworkServiceType:)] pub unsafe fn setNetworkServiceType( &self, networkServiceType: NSURLRequestNetworkServiceType, ); + #[method(allowsCellularAccess)] pub unsafe fn allowsCellularAccess(&self) -> bool; + #[method(setAllowsCellularAccess:)] pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool); + #[method(allowsExpensiveNetworkAccess)] pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool; + #[method(setAllowsExpensiveNetworkAccess:)] pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool); + #[method(allowsConstrainedNetworkAccess)] pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool; + #[method(setAllowsConstrainedNetworkAccess:)] pub unsafe fn setAllowsConstrainedNetworkAccess( &self, allowsConstrainedNetworkAccess: bool, ); + #[method(assumesHTTP3Capable)] pub unsafe fn assumesHTTP3Capable(&self) -> bool; + #[method(setAssumesHTTP3Capable:)] pub unsafe fn setAssumesHTTP3Capable(&self, assumesHTTP3Capable: bool); + #[method(attribution)] pub unsafe fn attribution(&self) -> NSURLRequestAttribution; + #[method(setAttribution:)] pub unsafe fn setAttribution(&self, attribution: NSURLRequestAttribution); } ); + extern_methods!( - #[doc = "NSHTTPURLRequest"] + /// NSHTTPURLRequest unsafe impl NSURLRequest { #[method_id(HTTPMethod)] pub unsafe fn HTTPMethod(&self) -> Option>; + #[method_id(allHTTPHeaderFields)] pub unsafe fn allHTTPHeaderFields( &self, ) -> Option, Shared>>; + #[method_id(valueForHTTPHeaderField:)] pub unsafe fn valueForHTTPHeaderField( &self, field: &NSString, ) -> Option>; + #[method_id(HTTPBody)] pub unsafe fn HTTPBody(&self) -> Option>; + #[method_id(HTTPBodyStream)] pub unsafe fn HTTPBodyStream(&self) -> Option>; + #[method(HTTPShouldHandleCookies)] pub unsafe fn HTTPShouldHandleCookies(&self) -> bool; + #[method(HTTPShouldUsePipelining)] pub unsafe fn HTTPShouldUsePipelining(&self) -> bool; } ); + extern_methods!( - #[doc = "NSMutableHTTPURLRequest"] + /// NSMutableHTTPURLRequest unsafe impl NSMutableURLRequest { #[method_id(HTTPMethod)] pub unsafe fn HTTPMethod(&self) -> Id; + #[method(setHTTPMethod:)] pub unsafe fn setHTTPMethod(&self, HTTPMethod: &NSString); + #[method_id(allHTTPHeaderFields)] pub unsafe fn allHTTPHeaderFields( &self, ) -> Option, Shared>>; + #[method(setAllHTTPHeaderFields:)] pub unsafe fn setAllHTTPHeaderFields( &self, allHTTPHeaderFields: Option<&NSDictionary>, ); + #[method(setValue:forHTTPHeaderField:)] pub unsafe fn setValue_forHTTPHeaderField( &self, value: Option<&NSString>, field: &NSString, ); + #[method(addValue:forHTTPHeaderField:)] pub unsafe fn addValue_forHTTPHeaderField(&self, value: &NSString, field: &NSString); + #[method_id(HTTPBody)] pub unsafe fn HTTPBody(&self) -> Option>; + #[method(setHTTPBody:)] pub unsafe fn setHTTPBody(&self, HTTPBody: Option<&NSData>); + #[method_id(HTTPBodyStream)] pub unsafe fn HTTPBodyStream(&self) -> Option>; + #[method(setHTTPBodyStream:)] pub unsafe fn setHTTPBodyStream(&self, HTTPBodyStream: Option<&NSInputStream>); + #[method(HTTPShouldHandleCookies)] pub unsafe fn HTTPShouldHandleCookies(&self) -> bool; + #[method(setHTTPShouldHandleCookies:)] pub unsafe fn setHTTPShouldHandleCookies(&self, HTTPShouldHandleCookies: bool); + #[method(HTTPShouldUsePipelining)] pub unsafe fn HTTPShouldUsePipelining(&self) -> bool; + #[method(setHTTPShouldUsePipelining:)] pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool); } diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index 67c7d8fcf..96a8e0ed1 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSURLResponse; + unsafe impl ClassType for NSURLResponse { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLResponse { #[method_id(initWithURL:MIMEType:expectedContentLength:textEncodingName:)] @@ -19,25 +24,33 @@ extern_methods!( length: NSInteger, name: Option<&NSString>, ) -> Id; + #[method_id(URL)] pub unsafe fn URL(&self) -> Option>; + #[method_id(MIMEType)] pub unsafe fn MIMEType(&self) -> Option>; + #[method(expectedContentLength)] pub unsafe fn expectedContentLength(&self) -> c_longlong; + #[method_id(textEncodingName)] pub unsafe fn textEncodingName(&self) -> Option>; + #[method_id(suggestedFilename)] pub unsafe fn suggestedFilename(&self) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSHTTPURLResponse; + unsafe impl ClassType for NSHTTPURLResponse { type Super = NSURLResponse; } ); + extern_methods!( unsafe impl NSHTTPURLResponse { #[method_id(initWithURL:statusCode:HTTPVersion:headerFields:)] @@ -48,15 +61,19 @@ extern_methods!( HTTPVersion: Option<&NSString>, headerFields: Option<&NSDictionary>, ) -> Option>; + #[method(statusCode)] pub unsafe fn statusCode(&self) -> NSInteger; + #[method_id(allHeaderFields)] pub unsafe fn allHeaderFields(&self) -> Id; + #[method_id(valueForHTTPHeaderField:)] pub unsafe fn valueForHTTPHeaderField( &self, field: &NSString, ) -> Option>; + #[method_id(localizedStringForStatusCode:)] pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 2effa79fc..c40cd9af7 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -1,124 +1,158 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSURLSession; + unsafe impl ClassType for NSURLSession { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLSession { #[method_id(sharedSession)] pub unsafe fn sharedSession() -> Id; + #[method_id(sessionWithConfiguration:)] pub unsafe fn sessionWithConfiguration( configuration: &NSURLSessionConfiguration, ) -> Id; + #[method_id(sessionWithConfiguration:delegate:delegateQueue:)] pub unsafe fn sessionWithConfiguration_delegate_delegateQueue( configuration: &NSURLSessionConfiguration, delegate: Option<&NSURLSessionDelegate>, queue: Option<&NSOperationQueue>, ) -> Id; + #[method_id(delegateQueue)] pub unsafe fn delegateQueue(&self) -> Id; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method_id(configuration)] pub unsafe fn configuration(&self) -> Id; + #[method_id(sessionDescription)] pub unsafe fn sessionDescription(&self) -> Option>; + #[method(setSessionDescription:)] pub unsafe fn setSessionDescription(&self, sessionDescription: Option<&NSString>); + #[method(finishTasksAndInvalidate)] pub unsafe fn finishTasksAndInvalidate(&self); + #[method(invalidateAndCancel)] pub unsafe fn invalidateAndCancel(&self); + #[method(resetWithCompletionHandler:)] pub unsafe fn resetWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(flushWithCompletionHandler:)] pub unsafe fn flushWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(getTasksWithCompletionHandler:)] pub unsafe fn getTasksWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(getAllTasksWithCompletionHandler:)] pub unsafe fn getAllTasksWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method_id(dataTaskWithRequest:)] pub unsafe fn dataTaskWithRequest( &self, request: &NSURLRequest, ) -> Id; + #[method_id(dataTaskWithURL:)] pub unsafe fn dataTaskWithURL(&self, url: &NSURL) -> Id; + #[method_id(uploadTaskWithRequest:fromFile:)] pub unsafe fn uploadTaskWithRequest_fromFile( &self, request: &NSURLRequest, fileURL: &NSURL, ) -> Id; + #[method_id(uploadTaskWithRequest:fromData:)] pub unsafe fn uploadTaskWithRequest_fromData( &self, request: &NSURLRequest, bodyData: &NSData, ) -> Id; + #[method_id(uploadTaskWithStreamedRequest:)] pub unsafe fn uploadTaskWithStreamedRequest( &self, request: &NSURLRequest, ) -> Id; + #[method_id(downloadTaskWithRequest:)] pub unsafe fn downloadTaskWithRequest( &self, request: &NSURLRequest, ) -> Id; + #[method_id(downloadTaskWithURL:)] pub unsafe fn downloadTaskWithURL( &self, url: &NSURL, ) -> Id; + #[method_id(downloadTaskWithResumeData:)] pub unsafe fn downloadTaskWithResumeData( &self, resumeData: &NSData, ) -> Id; + #[method_id(streamTaskWithHostName:port:)] pub unsafe fn streamTaskWithHostName_port( &self, hostname: &NSString, port: NSInteger, ) -> Id; + #[method_id(streamTaskWithNetService:)] pub unsafe fn streamTaskWithNetService( &self, service: &NSNetService, ) -> Id; + #[method_id(webSocketTaskWithURL:)] pub unsafe fn webSocketTaskWithURL( &self, url: &NSURL, ) -> Id; + #[method_id(webSocketTaskWithURL:protocols:)] pub unsafe fn webSocketTaskWithURL_protocols( &self, url: &NSURL, protocols: &NSArray, ) -> Id; + #[method_id(webSocketTaskWithRequest:)] pub unsafe fn webSocketTaskWithRequest( &self, request: &NSURLRequest, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } ); + extern_methods!( - #[doc = "NSURLSessionAsynchronousConvenience"] + /// NSURLSessionAsynchronousConvenience unsafe impl NSURLSession { #[method_id(dataTaskWithRequest:completionHandler:)] pub unsafe fn dataTaskWithRequest_completionHandler( @@ -126,12 +160,14 @@ extern_methods!( request: &NSURLRequest, completionHandler: TodoBlock, ) -> Id; + #[method_id(dataTaskWithURL:completionHandler:)] pub unsafe fn dataTaskWithURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, ) -> Id; + #[method_id(uploadTaskWithRequest:fromFile:completionHandler:)] pub unsafe fn uploadTaskWithRequest_fromFile_completionHandler( &self, @@ -139,6 +175,7 @@ extern_methods!( fileURL: &NSURL, completionHandler: TodoBlock, ) -> Id; + #[method_id(uploadTaskWithRequest:fromData:completionHandler:)] pub unsafe fn uploadTaskWithRequest_fromData_completionHandler( &self, @@ -146,18 +183,21 @@ extern_methods!( bodyData: Option<&NSData>, completionHandler: TodoBlock, ) -> Id; + #[method_id(downloadTaskWithRequest:completionHandler:)] pub unsafe fn downloadTaskWithRequest_completionHandler( &self, request: &NSURLRequest, completionHandler: TodoBlock, ) -> Id; + #[method_id(downloadTaskWithURL:completionHandler:)] pub unsafe fn downloadTaskWithURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, ) -> Id; + #[method_id(downloadTaskWithResumeData:completionHandler:)] pub unsafe fn downloadTaskWithResumeData_completionHandler( &self, @@ -166,137 +206,185 @@ extern_methods!( ) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSURLSessionTask; + unsafe impl ClassType for NSURLSessionTask { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLSessionTask { #[method(taskIdentifier)] pub unsafe fn taskIdentifier(&self) -> NSUInteger; + #[method_id(originalRequest)] pub unsafe fn originalRequest(&self) -> Option>; + #[method_id(currentRequest)] pub unsafe fn currentRequest(&self) -> Option>; + #[method_id(response)] pub unsafe fn response(&self) -> Option>; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSURLSessionTaskDelegate>); + #[method_id(progress)] pub unsafe fn progress(&self) -> Id; + #[method_id(earliestBeginDate)] pub unsafe fn earliestBeginDate(&self) -> Option>; + #[method(setEarliestBeginDate:)] pub unsafe fn setEarliestBeginDate(&self, earliestBeginDate: Option<&NSDate>); + #[method(countOfBytesClientExpectsToSend)] pub unsafe fn countOfBytesClientExpectsToSend(&self) -> int64_t; + #[method(setCountOfBytesClientExpectsToSend:)] pub unsafe fn setCountOfBytesClientExpectsToSend( &self, countOfBytesClientExpectsToSend: int64_t, ); + #[method(countOfBytesClientExpectsToReceive)] pub unsafe fn countOfBytesClientExpectsToReceive(&self) -> int64_t; + #[method(setCountOfBytesClientExpectsToReceive:)] pub unsafe fn setCountOfBytesClientExpectsToReceive( &self, countOfBytesClientExpectsToReceive: int64_t, ); + #[method(countOfBytesSent)] pub unsafe fn countOfBytesSent(&self) -> int64_t; + #[method(countOfBytesReceived)] pub unsafe fn countOfBytesReceived(&self) -> int64_t; + #[method(countOfBytesExpectedToSend)] pub unsafe fn countOfBytesExpectedToSend(&self) -> int64_t; + #[method(countOfBytesExpectedToReceive)] pub unsafe fn countOfBytesExpectedToReceive(&self) -> int64_t; + #[method_id(taskDescription)] pub unsafe fn taskDescription(&self) -> Option>; + #[method(setTaskDescription:)] pub unsafe fn setTaskDescription(&self, taskDescription: Option<&NSString>); + #[method(cancel)] pub unsafe fn cancel(&self); + #[method(state)] pub unsafe fn state(&self) -> NSURLSessionTaskState; + #[method_id(error)] pub unsafe fn error(&self) -> Option>; + #[method(suspend)] pub unsafe fn suspend(&self); + #[method(resume)] pub unsafe fn resume(&self); + #[method(priority)] pub unsafe fn priority(&self) -> c_float; + #[method(setPriority:)] pub unsafe fn setPriority(&self, priority: c_float); + #[method(prefersIncrementalDelivery)] pub unsafe fn prefersIncrementalDelivery(&self) -> bool; + #[method(setPrefersIncrementalDelivery:)] pub unsafe fn setPrefersIncrementalDelivery(&self, prefersIncrementalDelivery: bool); + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSURLSessionDataTask; + unsafe impl ClassType for NSURLSessionDataTask { type Super = NSURLSessionTask; } ); + extern_methods!( unsafe impl NSURLSessionDataTask { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSURLSessionUploadTask; + unsafe impl ClassType for NSURLSessionUploadTask { type Super = NSURLSessionDataTask; } ); + extern_methods!( unsafe impl NSURLSessionUploadTask { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSURLSessionDownloadTask; + unsafe impl ClassType for NSURLSessionDownloadTask { type Super = NSURLSessionTask; } ); + extern_methods!( unsafe impl NSURLSessionDownloadTask { #[method(cancelByProducingResumeData:)] pub unsafe fn cancelByProducingResumeData(&self, completionHandler: TodoBlock); + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSURLSessionStreamTask; + unsafe impl ClassType for NSURLSessionStreamTask { type Super = NSURLSessionTask; } ); + extern_methods!( unsafe impl NSURLSessionStreamTask { #[method(readDataOfMinLength:maxLength:timeout:completionHandler:)] @@ -307,6 +395,7 @@ extern_methods!( timeout: NSTimeInterval, completionHandler: TodoBlock, ); + #[method(writeData:timeout:completionHandler:)] pub unsafe fn writeData_timeout_completionHandler( &self, @@ -314,54 +403,73 @@ extern_methods!( timeout: NSTimeInterval, completionHandler: TodoBlock, ); + #[method(captureStreams)] pub unsafe fn captureStreams(&self); + #[method(closeWrite)] pub unsafe fn closeWrite(&self); + #[method(closeRead)] pub unsafe fn closeRead(&self); + #[method(startSecureConnection)] pub unsafe fn startSecureConnection(&self); + #[method(stopSecureConnection)] pub unsafe fn stopSecureConnection(&self); + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSURLSessionWebSocketMessage; + unsafe impl ClassType for NSURLSessionWebSocketMessage { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLSessionWebSocketMessage { #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Id; + #[method_id(initWithString:)] pub unsafe fn initWithString(&self, string: &NSString) -> Id; + #[method(type)] pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType; + #[method_id(data)] pub unsafe fn data(&self) -> Option>; + #[method_id(string)] pub unsafe fn string(&self) -> Option>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSURLSessionWebSocketTask; + unsafe impl ClassType for NSURLSessionWebSocketTask { type Super = NSURLSessionTask; } ); + extern_methods!( unsafe impl NSURLSessionWebSocketTask { #[method(sendMessage:completionHandler:)] @@ -370,216 +478,294 @@ extern_methods!( message: &NSURLSessionWebSocketMessage, completionHandler: TodoBlock, ); + #[method(receiveMessageWithCompletionHandler:)] pub unsafe fn receiveMessageWithCompletionHandler(&self, completionHandler: TodoBlock); + #[method(sendPingWithPongReceiveHandler:)] pub unsafe fn sendPingWithPongReceiveHandler(&self, pongReceiveHandler: TodoBlock); + #[method(cancelWithCloseCode:reason:)] pub unsafe fn cancelWithCloseCode_reason( &self, closeCode: NSURLSessionWebSocketCloseCode, reason: Option<&NSData>, ); + #[method(maximumMessageSize)] pub unsafe fn maximumMessageSize(&self) -> NSInteger; + #[method(setMaximumMessageSize:)] pub unsafe fn setMaximumMessageSize(&self, maximumMessageSize: NSInteger); + #[method(closeCode)] pub unsafe fn closeCode(&self) -> NSURLSessionWebSocketCloseCode; + #[method_id(closeReason)] pub unsafe fn closeReason(&self) -> Option>; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSURLSessionConfiguration; + unsafe impl ClassType for NSURLSessionConfiguration { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLSessionConfiguration { #[method_id(defaultSessionConfiguration)] pub unsafe fn defaultSessionConfiguration() -> Id; + #[method_id(ephemeralSessionConfiguration)] pub unsafe fn ephemeralSessionConfiguration() -> Id; + #[method_id(backgroundSessionConfigurationWithIdentifier:)] pub unsafe fn backgroundSessionConfigurationWithIdentifier( identifier: &NSString, ) -> Id; + #[method_id(identifier)] pub unsafe fn identifier(&self) -> Option>; + #[method(requestCachePolicy)] pub unsafe fn requestCachePolicy(&self) -> NSURLRequestCachePolicy; + #[method(setRequestCachePolicy:)] pub unsafe fn setRequestCachePolicy(&self, requestCachePolicy: NSURLRequestCachePolicy); + #[method(timeoutIntervalForRequest)] pub unsafe fn timeoutIntervalForRequest(&self) -> NSTimeInterval; + #[method(setTimeoutIntervalForRequest:)] pub unsafe fn setTimeoutIntervalForRequest( &self, timeoutIntervalForRequest: NSTimeInterval, ); + #[method(timeoutIntervalForResource)] pub unsafe fn timeoutIntervalForResource(&self) -> NSTimeInterval; + #[method(setTimeoutIntervalForResource:)] pub unsafe fn setTimeoutIntervalForResource( &self, timeoutIntervalForResource: NSTimeInterval, ); + #[method(networkServiceType)] pub unsafe fn networkServiceType(&self) -> NSURLRequestNetworkServiceType; + #[method(setNetworkServiceType:)] pub unsafe fn setNetworkServiceType( &self, networkServiceType: NSURLRequestNetworkServiceType, ); + #[method(allowsCellularAccess)] pub unsafe fn allowsCellularAccess(&self) -> bool; + #[method(setAllowsCellularAccess:)] pub unsafe fn setAllowsCellularAccess(&self, allowsCellularAccess: bool); + #[method(allowsExpensiveNetworkAccess)] pub unsafe fn allowsExpensiveNetworkAccess(&self) -> bool; + #[method(setAllowsExpensiveNetworkAccess:)] pub unsafe fn setAllowsExpensiveNetworkAccess(&self, allowsExpensiveNetworkAccess: bool); + #[method(allowsConstrainedNetworkAccess)] pub unsafe fn allowsConstrainedNetworkAccess(&self) -> bool; + #[method(setAllowsConstrainedNetworkAccess:)] pub unsafe fn setAllowsConstrainedNetworkAccess( &self, allowsConstrainedNetworkAccess: bool, ); + #[method(waitsForConnectivity)] pub unsafe fn waitsForConnectivity(&self) -> bool; + #[method(setWaitsForConnectivity:)] pub unsafe fn setWaitsForConnectivity(&self, waitsForConnectivity: bool); + #[method(isDiscretionary)] pub unsafe fn isDiscretionary(&self) -> bool; + #[method(setDiscretionary:)] pub unsafe fn setDiscretionary(&self, discretionary: bool); + #[method_id(sharedContainerIdentifier)] pub unsafe fn sharedContainerIdentifier(&self) -> Option>; + #[method(setSharedContainerIdentifier:)] pub unsafe fn setSharedContainerIdentifier( &self, sharedContainerIdentifier: Option<&NSString>, ); + #[method(sessionSendsLaunchEvents)] pub unsafe fn sessionSendsLaunchEvents(&self) -> bool; + #[method(setSessionSendsLaunchEvents:)] pub unsafe fn setSessionSendsLaunchEvents(&self, sessionSendsLaunchEvents: bool); + #[method_id(connectionProxyDictionary)] pub unsafe fn connectionProxyDictionary(&self) -> Option>; + #[method(setConnectionProxyDictionary:)] pub unsafe fn setConnectionProxyDictionary( &self, connectionProxyDictionary: Option<&NSDictionary>, ); + #[method(TLSMinimumSupportedProtocol)] pub unsafe fn TLSMinimumSupportedProtocol(&self) -> SSLProtocol; + #[method(setTLSMinimumSupportedProtocol:)] pub unsafe fn setTLSMinimumSupportedProtocol( &self, TLSMinimumSupportedProtocol: SSLProtocol, ); + #[method(TLSMaximumSupportedProtocol)] pub unsafe fn TLSMaximumSupportedProtocol(&self) -> SSLProtocol; + #[method(setTLSMaximumSupportedProtocol:)] pub unsafe fn setTLSMaximumSupportedProtocol( &self, TLSMaximumSupportedProtocol: SSLProtocol, ); + #[method(TLSMinimumSupportedProtocolVersion)] pub unsafe fn TLSMinimumSupportedProtocolVersion(&self) -> tls_protocol_version_t; + #[method(setTLSMinimumSupportedProtocolVersion:)] pub unsafe fn setTLSMinimumSupportedProtocolVersion( &self, TLSMinimumSupportedProtocolVersion: tls_protocol_version_t, ); + #[method(TLSMaximumSupportedProtocolVersion)] pub unsafe fn TLSMaximumSupportedProtocolVersion(&self) -> tls_protocol_version_t; + #[method(setTLSMaximumSupportedProtocolVersion:)] pub unsafe fn setTLSMaximumSupportedProtocolVersion( &self, TLSMaximumSupportedProtocolVersion: tls_protocol_version_t, ); + #[method(HTTPShouldUsePipelining)] pub unsafe fn HTTPShouldUsePipelining(&self) -> bool; + #[method(setHTTPShouldUsePipelining:)] pub unsafe fn setHTTPShouldUsePipelining(&self, HTTPShouldUsePipelining: bool); + #[method(HTTPShouldSetCookies)] pub unsafe fn HTTPShouldSetCookies(&self) -> bool; + #[method(setHTTPShouldSetCookies:)] pub unsafe fn setHTTPShouldSetCookies(&self, HTTPShouldSetCookies: bool); + #[method(HTTPCookieAcceptPolicy)] pub unsafe fn HTTPCookieAcceptPolicy(&self) -> NSHTTPCookieAcceptPolicy; + #[method(setHTTPCookieAcceptPolicy:)] pub unsafe fn setHTTPCookieAcceptPolicy( &self, HTTPCookieAcceptPolicy: NSHTTPCookieAcceptPolicy, ); + #[method_id(HTTPAdditionalHeaders)] pub unsafe fn HTTPAdditionalHeaders(&self) -> Option>; + #[method(setHTTPAdditionalHeaders:)] pub unsafe fn setHTTPAdditionalHeaders(&self, HTTPAdditionalHeaders: Option<&NSDictionary>); + #[method(HTTPMaximumConnectionsPerHost)] pub unsafe fn HTTPMaximumConnectionsPerHost(&self) -> NSInteger; + #[method(setHTTPMaximumConnectionsPerHost:)] pub unsafe fn setHTTPMaximumConnectionsPerHost( &self, HTTPMaximumConnectionsPerHost: NSInteger, ); + #[method_id(HTTPCookieStorage)] pub unsafe fn HTTPCookieStorage(&self) -> Option>; + #[method(setHTTPCookieStorage:)] pub unsafe fn setHTTPCookieStorage(&self, HTTPCookieStorage: Option<&NSHTTPCookieStorage>); + #[method_id(URLCredentialStorage)] pub unsafe fn URLCredentialStorage(&self) -> Option>; + #[method(setURLCredentialStorage:)] pub unsafe fn setURLCredentialStorage( &self, URLCredentialStorage: Option<&NSURLCredentialStorage>, ); + #[method_id(URLCache)] pub unsafe fn URLCache(&self) -> Option>; + #[method(setURLCache:)] pub unsafe fn setURLCache(&self, URLCache: Option<&NSURLCache>); + #[method(shouldUseExtendedBackgroundIdleMode)] pub unsafe fn shouldUseExtendedBackgroundIdleMode(&self) -> bool; + #[method(setShouldUseExtendedBackgroundIdleMode:)] pub unsafe fn setShouldUseExtendedBackgroundIdleMode( &self, shouldUseExtendedBackgroundIdleMode: bool, ); + #[method_id(protocolClasses)] pub unsafe fn protocolClasses(&self) -> Option, Shared>>; + #[method(setProtocolClasses:)] pub unsafe fn setProtocolClasses(&self, protocolClasses: Option<&NSArray>); + #[method(multipathServiceType)] pub unsafe fn multipathServiceType(&self) -> NSURLSessionMultipathServiceType; + #[method(setMultipathServiceType:)] pub unsafe fn setMultipathServiceType( &self, multipathServiceType: NSURLSessionMultipathServiceType, ); + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } ); + pub type NSURLSessionDelegate = NSObject; + pub type NSURLSessionTaskDelegate = NSObject; + pub type NSURLSessionDataDelegate = NSObject; + pub type NSURLSessionDownloadDelegate = NSObject; + pub type NSURLSessionStreamDelegate = NSObject; + pub type NSURLSessionWebSocketDelegate = NSObject; + extern_methods!( - #[doc = "NSURLSessionDeprecated"] + /// NSURLSessionDeprecated unsafe impl NSURLSessionConfiguration { #[method_id(backgroundSessionConfiguration:)] pub unsafe fn backgroundSessionConfiguration( @@ -587,110 +773,155 @@ extern_methods!( ) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSURLSessionTaskTransactionMetrics; + unsafe impl ClassType for NSURLSessionTaskTransactionMetrics { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLSessionTaskTransactionMetrics { #[method_id(request)] pub unsafe fn request(&self) -> Id; + #[method_id(response)] pub unsafe fn response(&self) -> Option>; + #[method_id(fetchStartDate)] pub unsafe fn fetchStartDate(&self) -> Option>; + #[method_id(domainLookupStartDate)] pub unsafe fn domainLookupStartDate(&self) -> Option>; + #[method_id(domainLookupEndDate)] pub unsafe fn domainLookupEndDate(&self) -> Option>; + #[method_id(connectStartDate)] pub unsafe fn connectStartDate(&self) -> Option>; + #[method_id(secureConnectionStartDate)] pub unsafe fn secureConnectionStartDate(&self) -> Option>; + #[method_id(secureConnectionEndDate)] pub unsafe fn secureConnectionEndDate(&self) -> Option>; + #[method_id(connectEndDate)] pub unsafe fn connectEndDate(&self) -> Option>; + #[method_id(requestStartDate)] pub unsafe fn requestStartDate(&self) -> Option>; + #[method_id(requestEndDate)] pub unsafe fn requestEndDate(&self) -> Option>; + #[method_id(responseStartDate)] pub unsafe fn responseStartDate(&self) -> Option>; + #[method_id(responseEndDate)] pub unsafe fn responseEndDate(&self) -> Option>; + #[method_id(networkProtocolName)] pub unsafe fn networkProtocolName(&self) -> Option>; + #[method(isProxyConnection)] pub unsafe fn isProxyConnection(&self) -> bool; + #[method(isReusedConnection)] pub unsafe fn isReusedConnection(&self) -> bool; + #[method(resourceFetchType)] pub unsafe fn resourceFetchType(&self) -> NSURLSessionTaskMetricsResourceFetchType; + #[method(countOfRequestHeaderBytesSent)] pub unsafe fn countOfRequestHeaderBytesSent(&self) -> int64_t; + #[method(countOfRequestBodyBytesSent)] pub unsafe fn countOfRequestBodyBytesSent(&self) -> int64_t; + #[method(countOfRequestBodyBytesBeforeEncoding)] pub unsafe fn countOfRequestBodyBytesBeforeEncoding(&self) -> int64_t; + #[method(countOfResponseHeaderBytesReceived)] pub unsafe fn countOfResponseHeaderBytesReceived(&self) -> int64_t; + #[method(countOfResponseBodyBytesReceived)] pub unsafe fn countOfResponseBodyBytesReceived(&self) -> int64_t; + #[method(countOfResponseBodyBytesAfterDecoding)] pub unsafe fn countOfResponseBodyBytesAfterDecoding(&self) -> int64_t; + #[method_id(localAddress)] pub unsafe fn localAddress(&self) -> Option>; + #[method_id(localPort)] pub unsafe fn localPort(&self) -> Option>; + #[method_id(remoteAddress)] pub unsafe fn remoteAddress(&self) -> Option>; + #[method_id(remotePort)] pub unsafe fn remotePort(&self) -> Option>; + #[method_id(negotiatedTLSProtocolVersion)] pub unsafe fn negotiatedTLSProtocolVersion(&self) -> Option>; + #[method_id(negotiatedTLSCipherSuite)] pub unsafe fn negotiatedTLSCipherSuite(&self) -> Option>; + #[method(isCellular)] pub unsafe fn isCellular(&self) -> bool; + #[method(isExpensive)] pub unsafe fn isExpensive(&self) -> bool; + #[method(isConstrained)] pub unsafe fn isConstrained(&self) -> bool; + #[method(isMultipath)] pub unsafe fn isMultipath(&self) -> bool; + #[method(domainResolutionProtocol)] pub unsafe fn domainResolutionProtocol( &self, ) -> NSURLSessionTaskMetricsDomainResolutionProtocol; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSURLSessionTaskMetrics; + unsafe impl ClassType for NSURLSessionTaskMetrics { type Super = NSObject; } ); + extern_methods!( unsafe impl NSURLSessionTaskMetrics { #[method_id(transactionMetrics)] pub unsafe fn transactionMetrics( &self, ) -> Id, Shared>; + #[method_id(taskInterval)] pub unsafe fn taskInterval(&self) -> Id; + #[method(redirectCount)] pub unsafe fn redirectCount(&self) -> NSUInteger; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index 75d2c275d..3fe584660 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -1,28 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSUUID; + unsafe impl ClassType for NSUUID { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUUID { #[method_id(UUID)] pub unsafe fn UUID() -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithUUIDString:)] pub unsafe fn initWithUUIDString(&self, string: &NSString) -> Option>; + #[method_id(initWithUUIDBytes:)] pub unsafe fn initWithUUIDBytes(&self, bytes: uuid_t) -> Id; + #[method(getUUIDBytes:)] pub unsafe fn getUUIDBytes(&self, uuid: uuid_t); + #[method(compare:)] pub unsafe fn compare(&self, otherUUID: &NSUUID) -> NSComparisonResult; + #[method_id(UUIDString)] pub unsafe fn UUIDString(&self) -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index dbbd17997..6b9186744 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -1,62 +1,86 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSUbiquitousKeyValueStore; + unsafe impl ClassType for NSUbiquitousKeyValueStore { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUbiquitousKeyValueStore { #[method_id(defaultStore)] pub unsafe fn defaultStore() -> Id; + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, aKey: &NSString) -> Option>; + #[method(setObject:forKey:)] pub unsafe fn setObject_forKey(&self, anObject: Option<&Object>, aKey: &NSString); + #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, aKey: &NSString); + #[method_id(stringForKey:)] pub unsafe fn stringForKey(&self, aKey: &NSString) -> Option>; + #[method_id(arrayForKey:)] pub unsafe fn arrayForKey(&self, aKey: &NSString) -> Option>; + #[method_id(dictionaryForKey:)] pub unsafe fn dictionaryForKey( &self, aKey: &NSString, ) -> Option, Shared>>; + #[method_id(dataForKey:)] pub unsafe fn dataForKey(&self, aKey: &NSString) -> Option>; + #[method(longLongForKey:)] pub unsafe fn longLongForKey(&self, aKey: &NSString) -> c_longlong; + #[method(doubleForKey:)] pub unsafe fn doubleForKey(&self, aKey: &NSString) -> c_double; + #[method(boolForKey:)] pub unsafe fn boolForKey(&self, aKey: &NSString) -> bool; + #[method(setString:forKey:)] pub unsafe fn setString_forKey(&self, aString: Option<&NSString>, aKey: &NSString); + #[method(setData:forKey:)] pub unsafe fn setData_forKey(&self, aData: Option<&NSData>, aKey: &NSString); + #[method(setArray:forKey:)] pub unsafe fn setArray_forKey(&self, anArray: Option<&NSArray>, aKey: &NSString); + #[method(setDictionary:forKey:)] pub unsafe fn setDictionary_forKey( &self, aDictionary: Option<&NSDictionary>, aKey: &NSString, ); + #[method(setLongLong:forKey:)] pub unsafe fn setLongLong_forKey(&self, value: c_longlong, aKey: &NSString); + #[method(setDouble:forKey:)] pub unsafe fn setDouble_forKey(&self, value: c_double, aKey: &NSString); + #[method(setBool:forKey:)] pub unsafe fn setBool_forKey(&self, value: bool, aKey: &NSString); + #[method_id(dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared>; + #[method(synchronize)] pub unsafe fn synchronize(&self) -> bool; } diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index 6982cb3d3..a9fc3c433 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -1,58 +1,84 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSUndoManager; + unsafe impl ClassType for NSUndoManager { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUndoManager { #[method(beginUndoGrouping)] pub unsafe fn beginUndoGrouping(&self); + #[method(endUndoGrouping)] pub unsafe fn endUndoGrouping(&self); + #[method(groupingLevel)] pub unsafe fn groupingLevel(&self) -> NSInteger; + #[method(disableUndoRegistration)] pub unsafe fn disableUndoRegistration(&self); + #[method(enableUndoRegistration)] pub unsafe fn enableUndoRegistration(&self); + #[method(isUndoRegistrationEnabled)] pub unsafe fn isUndoRegistrationEnabled(&self) -> bool; + #[method(groupsByEvent)] pub unsafe fn groupsByEvent(&self) -> bool; + #[method(setGroupsByEvent:)] pub unsafe fn setGroupsByEvent(&self, groupsByEvent: bool); + #[method(levelsOfUndo)] pub unsafe fn levelsOfUndo(&self) -> NSUInteger; + #[method(setLevelsOfUndo:)] pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger); + #[method_id(runLoopModes)] pub unsafe fn runLoopModes(&self) -> Id, Shared>; + #[method(setRunLoopModes:)] pub unsafe fn setRunLoopModes(&self, runLoopModes: &NSArray); + #[method(undo)] pub unsafe fn undo(&self); + #[method(redo)] pub unsafe fn redo(&self); + #[method(undoNestedGroup)] pub unsafe fn undoNestedGroup(&self); + #[method(canUndo)] pub unsafe fn canUndo(&self) -> bool; + #[method(canRedo)] pub unsafe fn canRedo(&self) -> bool; + #[method(isUndoing)] pub unsafe fn isUndoing(&self) -> bool; + #[method(isRedoing)] pub unsafe fn isRedoing(&self) -> bool; + #[method(removeAllActions)] pub unsafe fn removeAllActions(&self); + #[method(removeAllActionsWithTarget:)] pub unsafe fn removeAllActionsWithTarget(&self, target: &Object); + #[method(registerUndoWithTarget:selector:object:)] pub unsafe fn registerUndoWithTarget_selector_object( &self, @@ -60,35 +86,47 @@ extern_methods!( selector: Sel, anObject: Option<&Object>, ); + #[method_id(prepareWithInvocationTarget:)] pub unsafe fn prepareWithInvocationTarget(&self, target: &Object) -> Id; + #[method(registerUndoWithTarget:handler:)] pub unsafe fn registerUndoWithTarget_handler( &self, target: &Object, undoHandler: TodoBlock, ); + #[method(setActionIsDiscardable:)] pub unsafe fn setActionIsDiscardable(&self, discardable: bool); + #[method(undoActionIsDiscardable)] pub unsafe fn undoActionIsDiscardable(&self) -> bool; + #[method(redoActionIsDiscardable)] pub unsafe fn redoActionIsDiscardable(&self) -> bool; + #[method_id(undoActionName)] pub unsafe fn undoActionName(&self) -> Id; + #[method_id(redoActionName)] pub unsafe fn redoActionName(&self) -> Id; + #[method(setActionName:)] pub unsafe fn setActionName(&self, actionName: &NSString); + #[method_id(undoMenuItemTitle)] pub unsafe fn undoMenuItemTitle(&self) -> Id; + #[method_id(redoMenuItemTitle)] pub unsafe fn redoMenuItemTitle(&self) -> Id; + #[method_id(undoMenuTitleForUndoActionName:)] pub unsafe fn undoMenuTitleForUndoActionName( &self, actionName: &NSString, ) -> Id; + #[method_id(redoMenuTitleForUndoActionName:)] pub unsafe fn redoMenuTitleForUndoActionName( &self, diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index 3bb0b0b12..8ed516e20 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -1,37 +1,49 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSUnitConverter; + unsafe impl ClassType for NSUnitConverter { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUnitConverter { #[method(baseUnitValueFromValue:)] pub unsafe fn baseUnitValueFromValue(&self, value: c_double) -> c_double; + #[method(valueFromBaseUnitValue:)] pub unsafe fn valueFromBaseUnitValue(&self, baseUnitValue: c_double) -> c_double; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitConverterLinear; + unsafe impl ClassType for NSUnitConverterLinear { type Super = NSUnitConverter; } ); + extern_methods!( unsafe impl NSUnitConverterLinear { #[method(coefficient)] pub unsafe fn coefficient(&self) -> c_double; + #[method(constant)] pub unsafe fn constant(&self) -> c_double; + #[method_id(initWithCoefficient:)] pub unsafe fn initWithCoefficient(&self, coefficient: c_double) -> Id; + #[method_id(initWithCoefficient:constant:)] pub unsafe fn initWithCoefficient_constant( &self, @@ -40,694 +52,953 @@ extern_methods!( ) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnit; + unsafe impl ClassType for NSUnit { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUnit { #[method_id(symbol)] pub unsafe fn symbol(&self) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(new)] pub unsafe fn new() -> Id; + #[method_id(initWithSymbol:)] pub unsafe fn initWithSymbol(&self, symbol: &NSString) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSDimension; + unsafe impl ClassType for NSDimension { type Super = NSUnit; } ); + extern_methods!( unsafe impl NSDimension { #[method_id(converter)] pub unsafe fn converter(&self) -> Id; + #[method_id(initWithSymbol:converter:)] pub unsafe fn initWithSymbol_converter( &self, symbol: &NSString, converter: &NSUnitConverter, ) -> Id; + #[method_id(baseUnit)] pub unsafe fn baseUnit() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitAcceleration; + unsafe impl ClassType for NSUnitAcceleration { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitAcceleration { #[method_id(metersPerSecondSquared)] pub unsafe fn metersPerSecondSquared() -> Id; + #[method_id(gravity)] pub unsafe fn gravity() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitAngle; + unsafe impl ClassType for NSUnitAngle { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitAngle { #[method_id(degrees)] pub unsafe fn degrees() -> Id; + #[method_id(arcMinutes)] pub unsafe fn arcMinutes() -> Id; + #[method_id(arcSeconds)] pub unsafe fn arcSeconds() -> Id; + #[method_id(radians)] pub unsafe fn radians() -> Id; + #[method_id(gradians)] pub unsafe fn gradians() -> Id; + #[method_id(revolutions)] pub unsafe fn revolutions() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitArea; + unsafe impl ClassType for NSUnitArea { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitArea { #[method_id(squareMegameters)] pub unsafe fn squareMegameters() -> Id; + #[method_id(squareKilometers)] pub unsafe fn squareKilometers() -> Id; + #[method_id(squareMeters)] pub unsafe fn squareMeters() -> Id; + #[method_id(squareCentimeters)] pub unsafe fn squareCentimeters() -> Id; + #[method_id(squareMillimeters)] pub unsafe fn squareMillimeters() -> Id; + #[method_id(squareMicrometers)] pub unsafe fn squareMicrometers() -> Id; + #[method_id(squareNanometers)] pub unsafe fn squareNanometers() -> Id; + #[method_id(squareInches)] pub unsafe fn squareInches() -> Id; + #[method_id(squareFeet)] pub unsafe fn squareFeet() -> Id; + #[method_id(squareYards)] pub unsafe fn squareYards() -> Id; + #[method_id(squareMiles)] pub unsafe fn squareMiles() -> Id; + #[method_id(acres)] pub unsafe fn acres() -> Id; + #[method_id(ares)] pub unsafe fn ares() -> Id; + #[method_id(hectares)] pub unsafe fn hectares() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitConcentrationMass; + unsafe impl ClassType for NSUnitConcentrationMass { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitConcentrationMass { #[method_id(gramsPerLiter)] pub unsafe fn gramsPerLiter() -> Id; + #[method_id(milligramsPerDeciliter)] pub unsafe fn milligramsPerDeciliter() -> Id; + #[method_id(millimolesPerLiterWithGramsPerMole:)] pub unsafe fn millimolesPerLiterWithGramsPerMole( gramsPerMole: c_double, ) -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitDispersion; + unsafe impl ClassType for NSUnitDispersion { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitDispersion { #[method_id(partsPerMillion)] pub unsafe fn partsPerMillion() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitDuration; + unsafe impl ClassType for NSUnitDuration { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitDuration { #[method_id(hours)] pub unsafe fn hours() -> Id; + #[method_id(minutes)] pub unsafe fn minutes() -> Id; + #[method_id(seconds)] pub unsafe fn seconds() -> Id; + #[method_id(milliseconds)] pub unsafe fn milliseconds() -> Id; + #[method_id(microseconds)] pub unsafe fn microseconds() -> Id; + #[method_id(nanoseconds)] pub unsafe fn nanoseconds() -> Id; + #[method_id(picoseconds)] pub unsafe fn picoseconds() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitElectricCharge; + unsafe impl ClassType for NSUnitElectricCharge { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitElectricCharge { #[method_id(coulombs)] pub unsafe fn coulombs() -> Id; + #[method_id(megaampereHours)] pub unsafe fn megaampereHours() -> Id; + #[method_id(kiloampereHours)] pub unsafe fn kiloampereHours() -> Id; + #[method_id(ampereHours)] pub unsafe fn ampereHours() -> Id; + #[method_id(milliampereHours)] pub unsafe fn milliampereHours() -> Id; + #[method_id(microampereHours)] pub unsafe fn microampereHours() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitElectricCurrent; + unsafe impl ClassType for NSUnitElectricCurrent { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitElectricCurrent { #[method_id(megaamperes)] pub unsafe fn megaamperes() -> Id; + #[method_id(kiloamperes)] pub unsafe fn kiloamperes() -> Id; + #[method_id(amperes)] pub unsafe fn amperes() -> Id; + #[method_id(milliamperes)] pub unsafe fn milliamperes() -> Id; + #[method_id(microamperes)] pub unsafe fn microamperes() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitElectricPotentialDifference; + unsafe impl ClassType for NSUnitElectricPotentialDifference { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitElectricPotentialDifference { #[method_id(megavolts)] pub unsafe fn megavolts() -> Id; + #[method_id(kilovolts)] pub unsafe fn kilovolts() -> Id; + #[method_id(volts)] pub unsafe fn volts() -> Id; + #[method_id(millivolts)] pub unsafe fn millivolts() -> Id; + #[method_id(microvolts)] pub unsafe fn microvolts() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitElectricResistance; + unsafe impl ClassType for NSUnitElectricResistance { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitElectricResistance { #[method_id(megaohms)] pub unsafe fn megaohms() -> Id; + #[method_id(kiloohms)] pub unsafe fn kiloohms() -> Id; + #[method_id(ohms)] pub unsafe fn ohms() -> Id; + #[method_id(milliohms)] pub unsafe fn milliohms() -> Id; + #[method_id(microohms)] pub unsafe fn microohms() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitEnergy; + unsafe impl ClassType for NSUnitEnergy { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitEnergy { #[method_id(kilojoules)] pub unsafe fn kilojoules() -> Id; + #[method_id(joules)] pub unsafe fn joules() -> Id; + #[method_id(kilocalories)] pub unsafe fn kilocalories() -> Id; + #[method_id(calories)] pub unsafe fn calories() -> Id; + #[method_id(kilowattHours)] pub unsafe fn kilowattHours() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitFrequency; + unsafe impl ClassType for NSUnitFrequency { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitFrequency { #[method_id(terahertz)] pub unsafe fn terahertz() -> Id; + #[method_id(gigahertz)] pub unsafe fn gigahertz() -> Id; + #[method_id(megahertz)] pub unsafe fn megahertz() -> Id; + #[method_id(kilohertz)] pub unsafe fn kilohertz() -> Id; + #[method_id(hertz)] pub unsafe fn hertz() -> Id; + #[method_id(millihertz)] pub unsafe fn millihertz() -> Id; + #[method_id(microhertz)] pub unsafe fn microhertz() -> Id; + #[method_id(nanohertz)] pub unsafe fn nanohertz() -> Id; + #[method_id(framesPerSecond)] pub unsafe fn framesPerSecond() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitFuelEfficiency; + unsafe impl ClassType for NSUnitFuelEfficiency { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitFuelEfficiency { #[method_id(litersPer100Kilometers)] pub unsafe fn litersPer100Kilometers() -> Id; + #[method_id(milesPerImperialGallon)] pub unsafe fn milesPerImperialGallon() -> Id; + #[method_id(milesPerGallon)] pub unsafe fn milesPerGallon() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitInformationStorage; + unsafe impl ClassType for NSUnitInformationStorage { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitInformationStorage { #[method_id(bytes)] pub unsafe fn bytes() -> Id; + #[method_id(bits)] pub unsafe fn bits() -> Id; + #[method_id(nibbles)] pub unsafe fn nibbles() -> Id; + #[method_id(yottabytes)] pub unsafe fn yottabytes() -> Id; + #[method_id(zettabytes)] pub unsafe fn zettabytes() -> Id; + #[method_id(exabytes)] pub unsafe fn exabytes() -> Id; + #[method_id(petabytes)] pub unsafe fn petabytes() -> Id; + #[method_id(terabytes)] pub unsafe fn terabytes() -> Id; + #[method_id(gigabytes)] pub unsafe fn gigabytes() -> Id; + #[method_id(megabytes)] pub unsafe fn megabytes() -> Id; + #[method_id(kilobytes)] pub unsafe fn kilobytes() -> Id; + #[method_id(yottabits)] pub unsafe fn yottabits() -> Id; + #[method_id(zettabits)] pub unsafe fn zettabits() -> Id; + #[method_id(exabits)] pub unsafe fn exabits() -> Id; + #[method_id(petabits)] pub unsafe fn petabits() -> Id; + #[method_id(terabits)] pub unsafe fn terabits() -> Id; + #[method_id(gigabits)] pub unsafe fn gigabits() -> Id; + #[method_id(megabits)] pub unsafe fn megabits() -> Id; + #[method_id(kilobits)] pub unsafe fn kilobits() -> Id; + #[method_id(yobibytes)] pub unsafe fn yobibytes() -> Id; + #[method_id(zebibytes)] pub unsafe fn zebibytes() -> Id; + #[method_id(exbibytes)] pub unsafe fn exbibytes() -> Id; + #[method_id(pebibytes)] pub unsafe fn pebibytes() -> Id; + #[method_id(tebibytes)] pub unsafe fn tebibytes() -> Id; + #[method_id(gibibytes)] pub unsafe fn gibibytes() -> Id; + #[method_id(mebibytes)] pub unsafe fn mebibytes() -> Id; + #[method_id(kibibytes)] pub unsafe fn kibibytes() -> Id; + #[method_id(yobibits)] pub unsafe fn yobibits() -> Id; + #[method_id(zebibits)] pub unsafe fn zebibits() -> Id; + #[method_id(exbibits)] pub unsafe fn exbibits() -> Id; + #[method_id(pebibits)] pub unsafe fn pebibits() -> Id; + #[method_id(tebibits)] pub unsafe fn tebibits() -> Id; + #[method_id(gibibits)] pub unsafe fn gibibits() -> Id; + #[method_id(mebibits)] pub unsafe fn mebibits() -> Id; + #[method_id(kibibits)] pub unsafe fn kibibits() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitLength; + unsafe impl ClassType for NSUnitLength { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitLength { #[method_id(megameters)] pub unsafe fn megameters() -> Id; + #[method_id(kilometers)] pub unsafe fn kilometers() -> Id; + #[method_id(hectometers)] pub unsafe fn hectometers() -> Id; + #[method_id(decameters)] pub unsafe fn decameters() -> Id; + #[method_id(meters)] pub unsafe fn meters() -> Id; + #[method_id(decimeters)] pub unsafe fn decimeters() -> Id; + #[method_id(centimeters)] pub unsafe fn centimeters() -> Id; + #[method_id(millimeters)] pub unsafe fn millimeters() -> Id; + #[method_id(micrometers)] pub unsafe fn micrometers() -> Id; + #[method_id(nanometers)] pub unsafe fn nanometers() -> Id; + #[method_id(picometers)] pub unsafe fn picometers() -> Id; + #[method_id(inches)] pub unsafe fn inches() -> Id; + #[method_id(feet)] pub unsafe fn feet() -> Id; + #[method_id(yards)] pub unsafe fn yards() -> Id; + #[method_id(miles)] pub unsafe fn miles() -> Id; + #[method_id(scandinavianMiles)] pub unsafe fn scandinavianMiles() -> Id; + #[method_id(lightyears)] pub unsafe fn lightyears() -> Id; + #[method_id(nauticalMiles)] pub unsafe fn nauticalMiles() -> Id; + #[method_id(fathoms)] pub unsafe fn fathoms() -> Id; + #[method_id(furlongs)] pub unsafe fn furlongs() -> Id; + #[method_id(astronomicalUnits)] pub unsafe fn astronomicalUnits() -> Id; + #[method_id(parsecs)] pub unsafe fn parsecs() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitIlluminance; + unsafe impl ClassType for NSUnitIlluminance { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitIlluminance { #[method_id(lux)] pub unsafe fn lux() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitMass; + unsafe impl ClassType for NSUnitMass { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitMass { #[method_id(kilograms)] pub unsafe fn kilograms() -> Id; + #[method_id(grams)] pub unsafe fn grams() -> Id; + #[method_id(decigrams)] pub unsafe fn decigrams() -> Id; + #[method_id(centigrams)] pub unsafe fn centigrams() -> Id; + #[method_id(milligrams)] pub unsafe fn milligrams() -> Id; + #[method_id(micrograms)] pub unsafe fn micrograms() -> Id; + #[method_id(nanograms)] pub unsafe fn nanograms() -> Id; + #[method_id(picograms)] pub unsafe fn picograms() -> Id; + #[method_id(ounces)] pub unsafe fn ounces() -> Id; + #[method_id(poundsMass)] pub unsafe fn poundsMass() -> Id; + #[method_id(stones)] pub unsafe fn stones() -> Id; + #[method_id(metricTons)] pub unsafe fn metricTons() -> Id; + #[method_id(shortTons)] pub unsafe fn shortTons() -> Id; + #[method_id(carats)] pub unsafe fn carats() -> Id; + #[method_id(ouncesTroy)] pub unsafe fn ouncesTroy() -> Id; + #[method_id(slugs)] pub unsafe fn slugs() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitPower; + unsafe impl ClassType for NSUnitPower { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitPower { #[method_id(terawatts)] pub unsafe fn terawatts() -> Id; + #[method_id(gigawatts)] pub unsafe fn gigawatts() -> Id; + #[method_id(megawatts)] pub unsafe fn megawatts() -> Id; + #[method_id(kilowatts)] pub unsafe fn kilowatts() -> Id; + #[method_id(watts)] pub unsafe fn watts() -> Id; + #[method_id(milliwatts)] pub unsafe fn milliwatts() -> Id; + #[method_id(microwatts)] pub unsafe fn microwatts() -> Id; + #[method_id(nanowatts)] pub unsafe fn nanowatts() -> Id; + #[method_id(picowatts)] pub unsafe fn picowatts() -> Id; + #[method_id(femtowatts)] pub unsafe fn femtowatts() -> Id; + #[method_id(horsepower)] pub unsafe fn horsepower() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitPressure; + unsafe impl ClassType for NSUnitPressure { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitPressure { #[method_id(newtonsPerMetersSquared)] pub unsafe fn newtonsPerMetersSquared() -> Id; + #[method_id(gigapascals)] pub unsafe fn gigapascals() -> Id; + #[method_id(megapascals)] pub unsafe fn megapascals() -> Id; + #[method_id(kilopascals)] pub unsafe fn kilopascals() -> Id; + #[method_id(hectopascals)] pub unsafe fn hectopascals() -> Id; + #[method_id(inchesOfMercury)] pub unsafe fn inchesOfMercury() -> Id; + #[method_id(bars)] pub unsafe fn bars() -> Id; + #[method_id(millibars)] pub unsafe fn millibars() -> Id; + #[method_id(millimetersOfMercury)] pub unsafe fn millimetersOfMercury() -> Id; + #[method_id(poundsForcePerSquareInch)] pub unsafe fn poundsForcePerSquareInch() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitSpeed; + unsafe impl ClassType for NSUnitSpeed { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitSpeed { #[method_id(metersPerSecond)] pub unsafe fn metersPerSecond() -> Id; + #[method_id(kilometersPerHour)] pub unsafe fn kilometersPerHour() -> Id; + #[method_id(milesPerHour)] pub unsafe fn milesPerHour() -> Id; + #[method_id(knots)] pub unsafe fn knots() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitTemperature; + unsafe impl ClassType for NSUnitTemperature { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitTemperature { #[method_id(kelvin)] pub unsafe fn kelvin() -> Id; + #[method_id(celsius)] pub unsafe fn celsius() -> Id; + #[method_id(fahrenheit)] pub unsafe fn fahrenheit() -> Id; } ); + extern_class!( #[derive(Debug)] pub struct NSUnitVolume; + unsafe impl ClassType for NSUnitVolume { type Super = NSDimension; } ); + extern_methods!( unsafe impl NSUnitVolume { #[method_id(megaliters)] pub unsafe fn megaliters() -> Id; + #[method_id(kiloliters)] pub unsafe fn kiloliters() -> Id; + #[method_id(liters)] pub unsafe fn liters() -> Id; + #[method_id(deciliters)] pub unsafe fn deciliters() -> Id; + #[method_id(centiliters)] pub unsafe fn centiliters() -> Id; + #[method_id(milliliters)] pub unsafe fn milliliters() -> Id; + #[method_id(cubicKilometers)] pub unsafe fn cubicKilometers() -> Id; + #[method_id(cubicMeters)] pub unsafe fn cubicMeters() -> Id; + #[method_id(cubicDecimeters)] pub unsafe fn cubicDecimeters() -> Id; + #[method_id(cubicCentimeters)] pub unsafe fn cubicCentimeters() -> Id; + #[method_id(cubicMillimeters)] pub unsafe fn cubicMillimeters() -> Id; + #[method_id(cubicInches)] pub unsafe fn cubicInches() -> Id; + #[method_id(cubicFeet)] pub unsafe fn cubicFeet() -> Id; + #[method_id(cubicYards)] pub unsafe fn cubicYards() -> Id; + #[method_id(cubicMiles)] pub unsafe fn cubicMiles() -> Id; + #[method_id(acreFeet)] pub unsafe fn acreFeet() -> Id; + #[method_id(bushels)] pub unsafe fn bushels() -> Id; + #[method_id(teaspoons)] pub unsafe fn teaspoons() -> Id; + #[method_id(tablespoons)] pub unsafe fn tablespoons() -> Id; + #[method_id(fluidOunces)] pub unsafe fn fluidOunces() -> Id; + #[method_id(cups)] pub unsafe fn cups() -> Id; + #[method_id(pints)] pub unsafe fn pints() -> Id; + #[method_id(quarts)] pub unsafe fn quarts() -> Id; + #[method_id(gallons)] pub unsafe fn gallons() -> Id; + #[method_id(imperialTeaspoons)] pub unsafe fn imperialTeaspoons() -> Id; + #[method_id(imperialTablespoons)] pub unsafe fn imperialTablespoons() -> Id; + #[method_id(imperialFluidOunces)] pub unsafe fn imperialFluidOunces() -> Id; + #[method_id(imperialPints)] pub unsafe fn imperialPints() -> Id; + #[method_id(imperialQuarts)] pub unsafe fn imperialQuarts() -> Id; + #[method_id(imperialGallons)] pub unsafe fn imperialGallons() -> Id; + #[method_id(metricCups)] pub unsafe fn metricCups() -> Id; } diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 6935ad7f0..d980fd696 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -1,115 +1,163 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSUserActivityPersistentIdentifier = NSString; + extern_class!( #[derive(Debug)] pub struct NSUserActivity; + unsafe impl ClassType for NSUserActivity { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUserActivity { #[method_id(initWithActivityType:)] pub unsafe fn initWithActivityType(&self, activityType: &NSString) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(activityType)] pub unsafe fn activityType(&self) -> Id; + #[method_id(title)] pub unsafe fn title(&self) -> Option>; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; + #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); + #[method(addUserInfoEntriesFromDictionary:)] pub unsafe fn addUserInfoEntriesFromDictionary(&self, otherDictionary: &NSDictionary); + #[method_id(requiredUserInfoKeys)] pub unsafe fn requiredUserInfoKeys(&self) -> Option, Shared>>; + #[method(setRequiredUserInfoKeys:)] pub unsafe fn setRequiredUserInfoKeys( &self, requiredUserInfoKeys: Option<&NSSet>, ); + #[method(needsSave)] pub unsafe fn needsSave(&self) -> bool; + #[method(setNeedsSave:)] pub unsafe fn setNeedsSave(&self, needsSave: bool); + #[method_id(webpageURL)] pub unsafe fn webpageURL(&self) -> Option>; + #[method(setWebpageURL:)] pub unsafe fn setWebpageURL(&self, webpageURL: Option<&NSURL>); + #[method_id(referrerURL)] pub unsafe fn referrerURL(&self) -> Option>; + #[method(setReferrerURL:)] pub unsafe fn setReferrerURL(&self, referrerURL: Option<&NSURL>); + #[method_id(expirationDate)] pub unsafe fn expirationDate(&self) -> Option>; + #[method(setExpirationDate:)] pub unsafe fn setExpirationDate(&self, expirationDate: Option<&NSDate>); + #[method_id(keywords)] pub unsafe fn keywords(&self) -> Id, Shared>; + #[method(setKeywords:)] pub unsafe fn setKeywords(&self, keywords: &NSSet); + #[method(supportsContinuationStreams)] pub unsafe fn supportsContinuationStreams(&self) -> bool; + #[method(setSupportsContinuationStreams:)] pub unsafe fn setSupportsContinuationStreams(&self, supportsContinuationStreams: bool); + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSUserActivityDelegate>); + #[method_id(targetContentIdentifier)] pub unsafe fn targetContentIdentifier(&self) -> Option>; + #[method(setTargetContentIdentifier:)] pub unsafe fn setTargetContentIdentifier(&self, targetContentIdentifier: Option<&NSString>); + #[method(becomeCurrent)] pub unsafe fn becomeCurrent(&self); + #[method(resignCurrent)] pub unsafe fn resignCurrent(&self); + #[method(invalidate)] pub unsafe fn invalidate(&self); + #[method(getContinuationStreamsWithCompletionHandler:)] pub unsafe fn getContinuationStreamsWithCompletionHandler( &self, completionHandler: TodoBlock, ); + #[method(isEligibleForHandoff)] pub unsafe fn isEligibleForHandoff(&self) -> bool; + #[method(setEligibleForHandoff:)] pub unsafe fn setEligibleForHandoff(&self, eligibleForHandoff: bool); + #[method(isEligibleForSearch)] pub unsafe fn isEligibleForSearch(&self) -> bool; + #[method(setEligibleForSearch:)] pub unsafe fn setEligibleForSearch(&self, eligibleForSearch: bool); + #[method(isEligibleForPublicIndexing)] pub unsafe fn isEligibleForPublicIndexing(&self) -> bool; + #[method(setEligibleForPublicIndexing:)] pub unsafe fn setEligibleForPublicIndexing(&self, eligibleForPublicIndexing: bool); + #[method(isEligibleForPrediction)] pub unsafe fn isEligibleForPrediction(&self) -> bool; + #[method(setEligibleForPrediction:)] pub unsafe fn setEligibleForPrediction(&self, eligibleForPrediction: bool); + #[method_id(persistentIdentifier)] pub unsafe fn persistentIdentifier( &self, ) -> Option>; + #[method(setPersistentIdentifier:)] pub unsafe fn setPersistentIdentifier( &self, persistentIdentifier: Option<&NSUserActivityPersistentIdentifier>, ); + #[method(deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:)] pub unsafe fn deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler( persistentIdentifiers: &NSArray, handler: TodoBlock, ); + #[method(deleteAllSavedUserActivitiesWithCompletionHandler:)] pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: TodoBlock); } ); + pub type NSUserActivityDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index 5311786f3..f08a88f38 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -1,117 +1,159 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSUserDefaults; + unsafe impl ClassType for NSUserDefaults { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUserDefaults { #[method_id(standardUserDefaults)] pub unsafe fn standardUserDefaults() -> Id; + #[method(resetStandardUserDefaults)] pub unsafe fn resetStandardUserDefaults(); + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithSuiteName:)] pub unsafe fn initWithSuiteName( &self, suitename: Option<&NSString>, ) -> Option>; + #[method_id(initWithUser:)] pub unsafe fn initWithUser(&self, username: &NSString) -> Option>; + #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, defaultName: &NSString) -> Option>; + #[method(setObject:forKey:)] pub unsafe fn setObject_forKey(&self, value: Option<&Object>, defaultName: &NSString); + #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, defaultName: &NSString); + #[method_id(stringForKey:)] pub unsafe fn stringForKey(&self, defaultName: &NSString) -> Option>; + #[method_id(arrayForKey:)] pub unsafe fn arrayForKey(&self, defaultName: &NSString) -> Option>; + #[method_id(dictionaryForKey:)] pub unsafe fn dictionaryForKey( &self, defaultName: &NSString, ) -> Option, Shared>>; + #[method_id(dataForKey:)] pub unsafe fn dataForKey(&self, defaultName: &NSString) -> Option>; + #[method_id(stringArrayForKey:)] pub unsafe fn stringArrayForKey( &self, defaultName: &NSString, ) -> Option, Shared>>; + #[method(integerForKey:)] pub unsafe fn integerForKey(&self, defaultName: &NSString) -> NSInteger; + #[method(floatForKey:)] pub unsafe fn floatForKey(&self, defaultName: &NSString) -> c_float; + #[method(doubleForKey:)] pub unsafe fn doubleForKey(&self, defaultName: &NSString) -> c_double; + #[method(boolForKey:)] pub unsafe fn boolForKey(&self, defaultName: &NSString) -> bool; + #[method_id(URLForKey:)] pub unsafe fn URLForKey(&self, defaultName: &NSString) -> Option>; + #[method(setInteger:forKey:)] pub unsafe fn setInteger_forKey(&self, value: NSInteger, defaultName: &NSString); + #[method(setFloat:forKey:)] pub unsafe fn setFloat_forKey(&self, value: c_float, defaultName: &NSString); + #[method(setDouble:forKey:)] pub unsafe fn setDouble_forKey(&self, value: c_double, defaultName: &NSString); + #[method(setBool:forKey:)] pub unsafe fn setBool_forKey(&self, value: bool, defaultName: &NSString); + #[method(setURL:forKey:)] pub unsafe fn setURL_forKey(&self, url: Option<&NSURL>, defaultName: &NSString); + #[method(registerDefaults:)] pub unsafe fn registerDefaults( &self, registrationDictionary: &NSDictionary, ); + #[method(addSuiteNamed:)] pub unsafe fn addSuiteNamed(&self, suiteName: &NSString); + #[method(removeSuiteNamed:)] pub unsafe fn removeSuiteNamed(&self, suiteName: &NSString); + #[method_id(dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared>; + #[method_id(volatileDomainNames)] pub unsafe fn volatileDomainNames(&self) -> Id, Shared>; + #[method_id(volatileDomainForName:)] pub unsafe fn volatileDomainForName( &self, domainName: &NSString, ) -> Id, Shared>; + #[method(setVolatileDomain:forName:)] pub unsafe fn setVolatileDomain_forName( &self, domain: &NSDictionary, domainName: &NSString, ); + #[method(removeVolatileDomainForName:)] pub unsafe fn removeVolatileDomainForName(&self, domainName: &NSString); + #[method_id(persistentDomainNames)] pub unsafe fn persistentDomainNames(&self) -> Id; + #[method_id(persistentDomainForName:)] pub unsafe fn persistentDomainForName( &self, domainName: &NSString, ) -> Option, Shared>>; + #[method(setPersistentDomain:forName:)] pub unsafe fn setPersistentDomain_forName( &self, domain: &NSDictionary, domainName: &NSString, ); + #[method(removePersistentDomainForName:)] pub unsafe fn removePersistentDomainForName(&self, domainName: &NSString); + #[method(synchronize)] pub unsafe fn synchronize(&self) -> bool; + #[method(objectIsForcedForKey:)] pub unsafe fn objectIsForcedForKey(&self, key: &NSString) -> bool; + #[method(objectIsForcedForKey:inDomain:)] pub unsafe fn objectIsForcedForKey_inDomain( &self, diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index fcd8f75a2..42e22cc73 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -1,113 +1,159 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSUserNotification; + unsafe impl ClassType for NSUserNotification { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUserNotification { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(title)] pub unsafe fn title(&self) -> Option>; + #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); + #[method_id(subtitle)] pub unsafe fn subtitle(&self) -> Option>; + #[method(setSubtitle:)] pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>); + #[method_id(informativeText)] pub unsafe fn informativeText(&self) -> Option>; + #[method(setInformativeText:)] pub unsafe fn setInformativeText(&self, informativeText: Option<&NSString>); + #[method_id(actionButtonTitle)] pub unsafe fn actionButtonTitle(&self) -> Id; + #[method(setActionButtonTitle:)] pub unsafe fn setActionButtonTitle(&self, actionButtonTitle: &NSString); + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option, Shared>>; + #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); + #[method_id(deliveryDate)] pub unsafe fn deliveryDate(&self) -> Option>; + #[method(setDeliveryDate:)] pub unsafe fn setDeliveryDate(&self, deliveryDate: Option<&NSDate>); + #[method_id(deliveryTimeZone)] pub unsafe fn deliveryTimeZone(&self) -> Option>; + #[method(setDeliveryTimeZone:)] pub unsafe fn setDeliveryTimeZone(&self, deliveryTimeZone: Option<&NSTimeZone>); + #[method_id(deliveryRepeatInterval)] pub unsafe fn deliveryRepeatInterval(&self) -> Option>; + #[method(setDeliveryRepeatInterval:)] pub unsafe fn setDeliveryRepeatInterval( &self, deliveryRepeatInterval: Option<&NSDateComponents>, ); + #[method_id(actualDeliveryDate)] pub unsafe fn actualDeliveryDate(&self) -> Option>; + #[method(isPresented)] pub unsafe fn isPresented(&self) -> bool; + #[method(isRemote)] pub unsafe fn isRemote(&self) -> bool; + #[method_id(soundName)] pub unsafe fn soundName(&self) -> Option>; + #[method(setSoundName:)] pub unsafe fn setSoundName(&self, soundName: Option<&NSString>); + #[method(hasActionButton)] pub unsafe fn hasActionButton(&self) -> bool; + #[method(setHasActionButton:)] pub unsafe fn setHasActionButton(&self, hasActionButton: bool); + #[method(activationType)] pub unsafe fn activationType(&self) -> NSUserNotificationActivationType; + #[method_id(otherButtonTitle)] pub unsafe fn otherButtonTitle(&self) -> Id; + #[method(setOtherButtonTitle:)] pub unsafe fn setOtherButtonTitle(&self, otherButtonTitle: &NSString); + #[method_id(identifier)] pub unsafe fn identifier(&self) -> Option>; + #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>); + #[method_id(contentImage)] pub unsafe fn contentImage(&self) -> Option>; + #[method(setContentImage:)] pub unsafe fn setContentImage(&self, contentImage: Option<&NSImage>); + #[method(hasReplyButton)] pub unsafe fn hasReplyButton(&self) -> bool; + #[method(setHasReplyButton:)] pub unsafe fn setHasReplyButton(&self, hasReplyButton: bool); + #[method_id(responsePlaceholder)] pub unsafe fn responsePlaceholder(&self) -> Option>; + #[method(setResponsePlaceholder:)] pub unsafe fn setResponsePlaceholder(&self, responsePlaceholder: Option<&NSString>); + #[method_id(response)] pub unsafe fn response(&self) -> Option>; + #[method_id(additionalActions)] pub unsafe fn additionalActions( &self, ) -> Option, Shared>>; + #[method(setAdditionalActions:)] pub unsafe fn setAdditionalActions( &self, additionalActions: Option<&NSArray>, ); + #[method_id(additionalActivationAction)] pub unsafe fn additionalActivationAction( &self, ) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSUserNotificationAction; + unsafe impl ClassType for NSUserNotificationAction { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUserNotificationAction { #[method_id(actionWithIdentifier:title:)] @@ -115,46 +161,62 @@ extern_methods!( identifier: Option<&NSString>, title: Option<&NSString>, ) -> Id; + #[method_id(identifier)] pub unsafe fn identifier(&self) -> Option>; + #[method_id(title)] pub unsafe fn title(&self) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSUserNotificationCenter; + unsafe impl ClassType for NSUserNotificationCenter { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUserNotificationCenter { #[method_id(defaultUserNotificationCenter)] pub unsafe fn defaultUserNotificationCenter() -> Id; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSUserNotificationCenterDelegate>); + #[method_id(scheduledNotifications)] pub unsafe fn scheduledNotifications(&self) -> Id, Shared>; + #[method(setScheduledNotifications:)] pub unsafe fn setScheduledNotifications( &self, scheduledNotifications: &NSArray, ); + #[method(scheduleNotification:)] pub unsafe fn scheduleNotification(&self, notification: &NSUserNotification); + #[method(removeScheduledNotification:)] pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification); + #[method_id(deliveredNotifications)] pub unsafe fn deliveredNotifications(&self) -> Id, Shared>; + #[method(deliverNotification:)] pub unsafe fn deliverNotification(&self, notification: &NSUserNotification); + #[method(removeDeliveredNotification:)] pub unsafe fn removeDeliveredNotification(&self, notification: &NSUserNotification); + #[method(removeAllDeliveredNotifications)] pub unsafe fn removeAllDeliveredNotifications(&self); } ); + pub type NSUserNotificationCenterDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index 8ba86d983..083613b13 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -1,14 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSUserScriptTask; + unsafe impl ClassType for NSUserScriptTask { type Super = NSObject; } ); + extern_methods!( unsafe impl NSUserScriptTask { #[method_id(initWithURL:error:)] @@ -16,8 +21,10 @@ extern_methods!( &self, url: &NSURL, ) -> Result, Id>; + #[method_id(scriptURL)] pub unsafe fn scriptURL(&self) -> Id; + #[method(executeWithCompletionHandler:)] pub unsafe fn executeWithCompletionHandler( &self, @@ -25,27 +32,36 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSUserUnixTask; + unsafe impl ClassType for NSUserUnixTask { type Super = NSUserScriptTask; } ); + extern_methods!( unsafe impl NSUserUnixTask { #[method_id(standardInput)] pub unsafe fn standardInput(&self) -> Option>; + #[method(setStandardInput:)] pub unsafe fn setStandardInput(&self, standardInput: Option<&NSFileHandle>); + #[method_id(standardOutput)] pub unsafe fn standardOutput(&self) -> Option>; + #[method(setStandardOutput:)] pub unsafe fn setStandardOutput(&self, standardOutput: Option<&NSFileHandle>); + #[method_id(standardError)] pub unsafe fn standardError(&self) -> Option>; + #[method(setStandardError:)] pub unsafe fn setStandardError(&self, standardError: Option<&NSFileHandle>); + #[method(executeWithArguments:completionHandler:)] pub unsafe fn executeWithArguments_completionHandler( &self, @@ -54,13 +70,16 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSUserAppleScriptTask; + unsafe impl ClassType for NSUserAppleScriptTask { type Super = NSUserScriptTask; } ); + extern_methods!( unsafe impl NSUserAppleScriptTask { #[method(executeWithAppleEvent:completionHandler:)] @@ -71,19 +90,24 @@ extern_methods!( ); } ); + extern_class!( #[derive(Debug)] pub struct NSUserAutomatorTask; + unsafe impl ClassType for NSUserAutomatorTask { type Super = NSUserScriptTask; } ); + extern_methods!( unsafe impl NSUserAutomatorTask { #[method_id(variables)] pub unsafe fn variables(&self) -> Option, Shared>>; + #[method(setVariables:)] pub unsafe fn setVariables(&self, variables: Option<&NSDictionary>); + #[method(executeWithInput:completionHandler:)] pub unsafe fn executeWithInput_completionHandler( &self, diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index 72a20589e..e9cfb658e 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -1,38 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSValue; + unsafe impl ClassType for NSValue { type Super = NSObject; } ); + extern_methods!( unsafe impl NSValue { #[method(getValue:size:)] pub unsafe fn getValue_size(&self, value: NonNull, size: NSUInteger); + #[method(objCType)] pub unsafe fn objCType(&self) -> NonNull; + #[method_id(initWithBytes:objCType:)] pub unsafe fn initWithBytes_objCType( &self, value: NonNull, type_: NonNull, ) -> Id; + #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; } ); + extern_methods!( - #[doc = "NSValueCreation"] + /// NSValueCreation unsafe impl NSValue { #[method_id(valueWithBytes:objCType:)] pub unsafe fn valueWithBytes_objCType( value: NonNull, type_: NonNull, ) -> Id; + #[method_id(value:withObjCType:)] pub unsafe fn value_withObjCType( value: NonNull, @@ -40,140 +50,198 @@ extern_methods!( ) -> Id; } ); + extern_methods!( - #[doc = "NSValueExtensionMethods"] + /// NSValueExtensionMethods unsafe impl NSValue { #[method_id(valueWithNonretainedObject:)] pub unsafe fn valueWithNonretainedObject(anObject: Option<&Object>) -> Id; + #[method_id(nonretainedObjectValue)] pub unsafe fn nonretainedObjectValue(&self) -> Option>; + #[method_id(valueWithPointer:)] pub unsafe fn valueWithPointer(pointer: *mut c_void) -> Id; + #[method(pointerValue)] pub unsafe fn pointerValue(&self) -> *mut c_void; + #[method(isEqualToValue:)] pub unsafe fn isEqualToValue(&self, value: &NSValue) -> bool; } ); + extern_class!( #[derive(Debug)] pub struct NSNumber; + unsafe impl ClassType for NSNumber { type Super = NSValue; } ); + extern_methods!( unsafe impl NSNumber { #[method_id(initWithCoder:)] pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + #[method_id(initWithChar:)] pub unsafe fn initWithChar(&self, value: c_char) -> Id; + #[method_id(initWithUnsignedChar:)] pub unsafe fn initWithUnsignedChar(&self, value: c_uchar) -> Id; + #[method_id(initWithShort:)] pub unsafe fn initWithShort(&self, value: c_short) -> Id; + #[method_id(initWithUnsignedShort:)] pub unsafe fn initWithUnsignedShort(&self, value: c_ushort) -> Id; + #[method_id(initWithInt:)] pub unsafe fn initWithInt(&self, value: c_int) -> Id; + #[method_id(initWithUnsignedInt:)] pub unsafe fn initWithUnsignedInt(&self, value: c_uint) -> Id; + #[method_id(initWithLong:)] pub unsafe fn initWithLong(&self, value: c_long) -> Id; + #[method_id(initWithUnsignedLong:)] pub unsafe fn initWithUnsignedLong(&self, value: c_ulong) -> Id; + #[method_id(initWithLongLong:)] pub unsafe fn initWithLongLong(&self, value: c_longlong) -> Id; + #[method_id(initWithUnsignedLongLong:)] pub unsafe fn initWithUnsignedLongLong(&self, value: c_ulonglong) -> Id; + #[method_id(initWithFloat:)] pub unsafe fn initWithFloat(&self, value: c_float) -> Id; + #[method_id(initWithDouble:)] pub unsafe fn initWithDouble(&self, value: c_double) -> Id; + #[method_id(initWithBool:)] pub unsafe fn initWithBool(&self, value: bool) -> Id; + #[method_id(initWithInteger:)] pub unsafe fn initWithInteger(&self, value: NSInteger) -> Id; + #[method_id(initWithUnsignedInteger:)] pub unsafe fn initWithUnsignedInteger(&self, value: NSUInteger) -> Id; + #[method(charValue)] pub unsafe fn charValue(&self) -> c_char; + #[method(unsignedCharValue)] pub unsafe fn unsignedCharValue(&self) -> c_uchar; + #[method(shortValue)] pub unsafe fn shortValue(&self) -> c_short; + #[method(unsignedShortValue)] pub unsafe fn unsignedShortValue(&self) -> c_ushort; + #[method(intValue)] pub unsafe fn intValue(&self) -> c_int; + #[method(unsignedIntValue)] pub unsafe fn unsignedIntValue(&self) -> c_uint; + #[method(longValue)] pub unsafe fn longValue(&self) -> c_long; + #[method(unsignedLongValue)] pub unsafe fn unsignedLongValue(&self) -> c_ulong; + #[method(longLongValue)] pub unsafe fn longLongValue(&self) -> c_longlong; + #[method(unsignedLongLongValue)] pub unsafe fn unsignedLongLongValue(&self) -> c_ulonglong; + #[method(floatValue)] pub unsafe fn floatValue(&self) -> c_float; + #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; + #[method(boolValue)] pub unsafe fn boolValue(&self) -> bool; + #[method(integerValue)] pub unsafe fn integerValue(&self) -> NSInteger; + #[method(unsignedIntegerValue)] pub unsafe fn unsignedIntegerValue(&self) -> NSUInteger; + #[method_id(stringValue)] pub unsafe fn stringValue(&self) -> Id; + #[method(compare:)] pub unsafe fn compare(&self, otherNumber: &NSNumber) -> NSComparisonResult; + #[method(isEqualToNumber:)] pub unsafe fn isEqualToNumber(&self, number: &NSNumber) -> bool; + #[method_id(descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; } ); + extern_methods!( - #[doc = "NSNumberCreation"] + /// NSNumberCreation unsafe impl NSNumber { #[method_id(numberWithChar:)] pub unsafe fn numberWithChar(value: c_char) -> Id; + #[method_id(numberWithUnsignedChar:)] pub unsafe fn numberWithUnsignedChar(value: c_uchar) -> Id; + #[method_id(numberWithShort:)] pub unsafe fn numberWithShort(value: c_short) -> Id; + #[method_id(numberWithUnsignedShort:)] pub unsafe fn numberWithUnsignedShort(value: c_ushort) -> Id; + #[method_id(numberWithInt:)] pub unsafe fn numberWithInt(value: c_int) -> Id; + #[method_id(numberWithUnsignedInt:)] pub unsafe fn numberWithUnsignedInt(value: c_uint) -> Id; + #[method_id(numberWithLong:)] pub unsafe fn numberWithLong(value: c_long) -> Id; + #[method_id(numberWithUnsignedLong:)] pub unsafe fn numberWithUnsignedLong(value: c_ulong) -> Id; + #[method_id(numberWithLongLong:)] pub unsafe fn numberWithLongLong(value: c_longlong) -> Id; + #[method_id(numberWithUnsignedLongLong:)] pub unsafe fn numberWithUnsignedLongLong(value: c_ulonglong) -> Id; + #[method_id(numberWithFloat:)] pub unsafe fn numberWithFloat(value: c_float) -> Id; + #[method_id(numberWithDouble:)] pub unsafe fn numberWithDouble(value: c_double) -> Id; + #[method_id(numberWithBool:)] pub unsafe fn numberWithBool(value: bool) -> Id; + #[method_id(numberWithInteger:)] pub unsafe fn numberWithInteger(value: NSInteger) -> Id; + #[method_id(numberWithUnsignedInteger:)] pub unsafe fn numberWithUnsignedInteger(value: NSUInteger) -> Id; } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSValue { #[method(getValue:)] pub unsafe fn getValue(&self, value: NonNull); diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index 7bd034629..f29c70080 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -1,15 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSValueTransformerName = NSString; + extern_class!( #[derive(Debug)] pub struct NSValueTransformer; + unsafe impl ClassType for NSValueTransformer { type Super = NSObject; } ); + extern_methods!( unsafe impl NSValueTransformer { #[method(setValueTransformer:forName:)] @@ -17,19 +23,25 @@ extern_methods!( transformer: Option<&NSValueTransformer>, name: &NSValueTransformerName, ); + #[method_id(valueTransformerForName:)] pub unsafe fn valueTransformerForName( name: &NSValueTransformerName, ) -> Option>; + #[method_id(valueTransformerNames)] pub unsafe fn valueTransformerNames() -> Id, Shared>; + #[method(transformedValueClass)] pub unsafe fn transformedValueClass() -> &Class; + #[method(allowsReverseTransformation)] pub unsafe fn allowsReverseTransformation() -> bool; + #[method_id(transformedValue:)] pub unsafe fn transformedValue(&self, value: Option<&Object>) -> Option>; + #[method_id(reverseTransformedValue:)] pub unsafe fn reverseTransformedValue( &self, @@ -37,13 +49,16 @@ extern_methods!( ) -> Option>; } ); + extern_class!( #[derive(Debug)] pub struct NSSecureUnarchiveFromDataTransformer; + unsafe impl ClassType for NSSecureUnarchiveFromDataTransformer { type Super = NSValueTransformer; } ); + extern_methods!( unsafe impl NSSecureUnarchiveFromDataTransformer { #[method_id(allowedTopLevelClasses)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index becdb811d..9f3ead7b7 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -1,81 +1,104 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSXMLDTD; + unsafe impl ClassType for NSXMLDTD { type Super = NSXMLNode; } ); + extern_methods!( unsafe impl NSXMLDTD { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; + #[method_id(initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, mask: NSXMLNodeOptions, ) -> Result, Id>; + #[method_id(initWithData:options:error:)] pub unsafe fn initWithData_options_error( &self, data: &NSData, mask: NSXMLNodeOptions, ) -> Result, Id>; + #[method_id(publicID)] pub unsafe fn publicID(&self) -> Option>; + #[method(setPublicID:)] pub unsafe fn setPublicID(&self, publicID: Option<&NSString>); + #[method_id(systemID)] pub unsafe fn systemID(&self) -> Option>; + #[method(setSystemID:)] pub unsafe fn setSystemID(&self, systemID: Option<&NSString>); + #[method(insertChild:atIndex:)] pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger); + #[method(insertChildren:atIndex:)] pub unsafe fn insertChildren_atIndex( &self, children: &NSArray, index: NSUInteger, ); + #[method(removeChildAtIndex:)] pub unsafe fn removeChildAtIndex(&self, index: NSUInteger); + #[method(setChildren:)] pub unsafe fn setChildren(&self, children: Option<&NSArray>); + #[method(addChild:)] pub unsafe fn addChild(&self, child: &NSXMLNode); + #[method(replaceChildAtIndex:withNode:)] pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); + #[method_id(entityDeclarationForName:)] pub unsafe fn entityDeclarationForName( &self, name: &NSString, ) -> Option>; + #[method_id(notationDeclarationForName:)] pub unsafe fn notationDeclarationForName( &self, name: &NSString, ) -> Option>; + #[method_id(elementDeclarationForName:)] pub unsafe fn elementDeclarationForName( &self, name: &NSString, ) -> Option>; + #[method_id(attributeDeclarationForName:elementName:)] pub unsafe fn attributeDeclarationForName_elementName( &self, name: &NSString, elementName: &NSString, ) -> Option>; + #[method_id(predefinedEntityDeclarationForName:)] pub unsafe fn predefinedEntityDeclarationForName( name: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index 9787b93b9..08596ed21 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -1,42 +1,58 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSXMLDTDNode; + unsafe impl ClassType for NSXMLDTDNode { type Super = NSXMLNode; } ); + extern_methods!( unsafe impl NSXMLDTDNode { #[method_id(initWithXMLString:)] pub unsafe fn initWithXMLString(&self, string: &NSString) -> Option>; + #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; + #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method(DTDKind)] pub unsafe fn DTDKind(&self) -> NSXMLDTDNodeKind; + #[method(setDTDKind:)] pub unsafe fn setDTDKind(&self, DTDKind: NSXMLDTDNodeKind); + #[method(isExternal)] pub unsafe fn isExternal(&self) -> bool; + #[method_id(publicID)] pub unsafe fn publicID(&self) -> Option>; + #[method(setPublicID:)] pub unsafe fn setPublicID(&self, publicID: Option<&NSString>); + #[method_id(systemID)] pub unsafe fn systemID(&self) -> Option>; + #[method(setSystemID:)] pub unsafe fn setSystemID(&self, systemID: Option<&NSString>); + #[method_id(notationName)] pub unsafe fn notationName(&self) -> Option>; + #[method(setNotationName:)] pub unsafe fn setNotationName(&self, notationName: Option<&NSString>); } diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index c26489bd4..d8cf6b3cc 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -1,109 +1,145 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSXMLDocument; + unsafe impl ClassType for NSXMLDocument { type Super = NSXMLNode; } ); + extern_methods!( unsafe impl NSXMLDocument { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithXMLString:options:error:)] pub unsafe fn initWithXMLString_options_error( &self, string: &NSString, mask: NSXMLNodeOptions, ) -> Result, Id>; + #[method_id(initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( &self, url: &NSURL, mask: NSXMLNodeOptions, ) -> Result, Id>; + #[method_id(initWithData:options:error:)] pub unsafe fn initWithData_options_error( &self, data: &NSData, mask: NSXMLNodeOptions, ) -> Result, Id>; + #[method_id(initWithRootElement:)] pub unsafe fn initWithRootElement( &self, element: Option<&NSXMLElement>, ) -> Id; + #[method(replacementClassForClass:)] pub unsafe fn replacementClassForClass(cls: &Class) -> &Class; + #[method_id(characterEncoding)] pub unsafe fn characterEncoding(&self) -> Option>; + #[method(setCharacterEncoding:)] pub unsafe fn setCharacterEncoding(&self, characterEncoding: Option<&NSString>); + #[method_id(version)] pub unsafe fn version(&self) -> Option>; + #[method(setVersion:)] pub unsafe fn setVersion(&self, version: Option<&NSString>); + #[method(isStandalone)] pub unsafe fn isStandalone(&self) -> bool; + #[method(setStandalone:)] pub unsafe fn setStandalone(&self, standalone: bool); + #[method(documentContentKind)] pub unsafe fn documentContentKind(&self) -> NSXMLDocumentContentKind; + #[method(setDocumentContentKind:)] pub unsafe fn setDocumentContentKind(&self, documentContentKind: NSXMLDocumentContentKind); + #[method_id(MIMEType)] pub unsafe fn MIMEType(&self) -> Option>; + #[method(setMIMEType:)] pub unsafe fn setMIMEType(&self, MIMEType: Option<&NSString>); + #[method_id(DTD)] pub unsafe fn DTD(&self) -> Option>; + #[method(setDTD:)] pub unsafe fn setDTD(&self, DTD: Option<&NSXMLDTD>); + #[method(setRootElement:)] pub unsafe fn setRootElement(&self, root: &NSXMLElement); + #[method_id(rootElement)] pub unsafe fn rootElement(&self) -> Option>; + #[method(insertChild:atIndex:)] pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger); + #[method(insertChildren:atIndex:)] pub unsafe fn insertChildren_atIndex( &self, children: &NSArray, index: NSUInteger, ); + #[method(removeChildAtIndex:)] pub unsafe fn removeChildAtIndex(&self, index: NSUInteger); + #[method(setChildren:)] pub unsafe fn setChildren(&self, children: Option<&NSArray>); + #[method(addChild:)] pub unsafe fn addChild(&self, child: &NSXMLNode); + #[method(replaceChildAtIndex:withNode:)] pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); + #[method_id(XMLData)] pub unsafe fn XMLData(&self) -> Id; + #[method_id(XMLDataWithOptions:)] pub unsafe fn XMLDataWithOptions(&self, options: NSXMLNodeOptions) -> Id; + #[method_id(objectByApplyingXSLT:arguments:error:)] pub unsafe fn objectByApplyingXSLT_arguments_error( &self, xslt: &NSData, arguments: Option<&NSDictionary>, ) -> Result, Id>; + #[method_id(objectByApplyingXSLTString:arguments:error:)] pub unsafe fn objectByApplyingXSLTString_arguments_error( &self, xslt: &NSString, arguments: Option<&NSDictionary>, ) -> Result, Id>; + #[method_id(objectByApplyingXSLTAtURL:arguments:error:)] pub unsafe fn objectByApplyingXSLTAtURL_arguments_error( &self, xsltURL: &NSURL, argument: Option<&NSDictionary>, ) -> Result, Id>; + #[method(validateAndReturnError:)] pub unsafe fn validateAndReturnError(&self) -> Result<(), Id>; } diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index b31f5bb33..60a7abe10 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -1,112 +1,145 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSXMLElement; + unsafe impl ClassType for NSXMLElement { type Super = NSXMLNode; } ); + extern_methods!( unsafe impl NSXMLElement { #[method_id(initWithName:)] pub unsafe fn initWithName(&self, name: &NSString) -> Id; + #[method_id(initWithName:URI:)] pub unsafe fn initWithName_URI( &self, name: &NSString, URI: Option<&NSString>, ) -> Id; + #[method_id(initWithName:stringValue:)] pub unsafe fn initWithName_stringValue( &self, name: &NSString, string: Option<&NSString>, ) -> Id; + #[method_id(initWithXMLString:error:)] pub unsafe fn initWithXMLString_error( &self, string: &NSString, ) -> Result, Id>; + #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; + #[method_id(elementsForName:)] pub unsafe fn elementsForName(&self, name: &NSString) -> Id, Shared>; + #[method_id(elementsForLocalName:URI:)] pub unsafe fn elementsForLocalName_URI( &self, localName: &NSString, URI: Option<&NSString>, ) -> Id, Shared>; + #[method(addAttribute:)] pub unsafe fn addAttribute(&self, attribute: &NSXMLNode); + #[method(removeAttributeForName:)] pub unsafe fn removeAttributeForName(&self, name: &NSString); + #[method_id(attributes)] pub unsafe fn attributes(&self) -> Option, Shared>>; + #[method(setAttributes:)] pub unsafe fn setAttributes(&self, attributes: Option<&NSArray>); + #[method(setAttributesWithDictionary:)] pub unsafe fn setAttributesWithDictionary( &self, attributes: &NSDictionary, ); + #[method_id(attributeForName:)] pub unsafe fn attributeForName(&self, name: &NSString) -> Option>; + #[method_id(attributeForLocalName:URI:)] pub unsafe fn attributeForLocalName_URI( &self, localName: &NSString, URI: Option<&NSString>, ) -> Option>; + #[method(addNamespace:)] pub unsafe fn addNamespace(&self, aNamespace: &NSXMLNode); + #[method(removeNamespaceForPrefix:)] pub unsafe fn removeNamespaceForPrefix(&self, name: &NSString); + #[method_id(namespaces)] pub unsafe fn namespaces(&self) -> Option, Shared>>; + #[method(setNamespaces:)] pub unsafe fn setNamespaces(&self, namespaces: Option<&NSArray>); + #[method_id(namespaceForPrefix:)] pub unsafe fn namespaceForPrefix(&self, name: &NSString) -> Option>; + #[method_id(resolveNamespaceForName:)] pub unsafe fn resolveNamespaceForName( &self, name: &NSString, ) -> Option>; + #[method_id(resolvePrefixForNamespaceURI:)] pub unsafe fn resolvePrefixForNamespaceURI( &self, namespaceURI: &NSString, ) -> Option>; + #[method(insertChild:atIndex:)] pub unsafe fn insertChild_atIndex(&self, child: &NSXMLNode, index: NSUInteger); + #[method(insertChildren:atIndex:)] pub unsafe fn insertChildren_atIndex( &self, children: &NSArray, index: NSUInteger, ); + #[method(removeChildAtIndex:)] pub unsafe fn removeChildAtIndex(&self, index: NSUInteger); + #[method(setChildren:)] pub unsafe fn setChildren(&self, children: Option<&NSArray>); + #[method(addChild:)] pub unsafe fn addChild(&self, child: &NSXMLNode); + #[method(replaceChildAtIndex:withNode:)] pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); + #[method(normalizeAdjacentTextNodesPreservingCDATA:)] pub unsafe fn normalizeAdjacentTextNodesPreservingCDATA(&self, preserve: bool); } ); + extern_methods!( - #[doc = "NSDeprecated"] + /// NSDeprecated unsafe impl NSXMLElement { #[method(setAttributesAsDictionary:)] pub unsafe fn setAttributesAsDictionary(&self, attributes: &NSDictionary); diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index d2d1bbd98..4dea914dd 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -1,155 +1,210 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSXMLNode; + unsafe impl ClassType for NSXMLNode { type Super = NSObject; } ); + extern_methods!( unsafe impl NSXMLNode { #[method_id(init)] pub unsafe fn init(&self) -> Id; + #[method_id(initWithKind:)] pub unsafe fn initWithKind(&self, kind: NSXMLNodeKind) -> Id; + #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( &self, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; + #[method_id(document)] pub unsafe fn document() -> Id; + #[method_id(documentWithRootElement:)] pub unsafe fn documentWithRootElement(element: &NSXMLElement) -> Id; + #[method_id(elementWithName:)] pub unsafe fn elementWithName(name: &NSString) -> Id; + #[method_id(elementWithName:URI:)] pub unsafe fn elementWithName_URI(name: &NSString, URI: &NSString) -> Id; + #[method_id(elementWithName:stringValue:)] pub unsafe fn elementWithName_stringValue( name: &NSString, string: &NSString, ) -> Id; + #[method_id(elementWithName:children:attributes:)] pub unsafe fn elementWithName_children_attributes( name: &NSString, children: Option<&NSArray>, attributes: Option<&NSArray>, ) -> Id; + #[method_id(attributeWithName:stringValue:)] pub unsafe fn attributeWithName_stringValue( name: &NSString, stringValue: &NSString, ) -> Id; + #[method_id(attributeWithName:URI:stringValue:)] pub unsafe fn attributeWithName_URI_stringValue( name: &NSString, URI: &NSString, stringValue: &NSString, ) -> Id; + #[method_id(namespaceWithName:stringValue:)] pub unsafe fn namespaceWithName_stringValue( name: &NSString, stringValue: &NSString, ) -> Id; + #[method_id(processingInstructionWithName:stringValue:)] pub unsafe fn processingInstructionWithName_stringValue( name: &NSString, stringValue: &NSString, ) -> Id; + #[method_id(commentWithStringValue:)] pub unsafe fn commentWithStringValue(stringValue: &NSString) -> Id; + #[method_id(textWithStringValue:)] pub unsafe fn textWithStringValue(stringValue: &NSString) -> Id; + #[method_id(DTDNodeWithXMLString:)] pub unsafe fn DTDNodeWithXMLString(string: &NSString) -> Option>; + #[method(kind)] pub unsafe fn kind(&self) -> NSXMLNodeKind; + #[method_id(name)] pub unsafe fn name(&self) -> Option>; + #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); + #[method_id(objectValue)] pub unsafe fn objectValue(&self) -> Option>; + #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); + #[method_id(stringValue)] pub unsafe fn stringValue(&self) -> Option>; + #[method(setStringValue:)] pub unsafe fn setStringValue(&self, stringValue: Option<&NSString>); + #[method(setStringValue:resolvingEntities:)] pub unsafe fn setStringValue_resolvingEntities(&self, string: &NSString, resolve: bool); + #[method(index)] pub unsafe fn index(&self) -> NSUInteger; + #[method(level)] pub unsafe fn level(&self) -> NSUInteger; + #[method_id(rootDocument)] pub unsafe fn rootDocument(&self) -> Option>; + #[method_id(parent)] pub unsafe fn parent(&self) -> Option>; + #[method(childCount)] pub unsafe fn childCount(&self) -> NSUInteger; + #[method_id(children)] pub unsafe fn children(&self) -> Option, Shared>>; + #[method_id(childAtIndex:)] pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option>; + #[method_id(previousSibling)] pub unsafe fn previousSibling(&self) -> Option>; + #[method_id(nextSibling)] pub unsafe fn nextSibling(&self) -> Option>; + #[method_id(previousNode)] pub unsafe fn previousNode(&self) -> Option>; + #[method_id(nextNode)] pub unsafe fn nextNode(&self) -> Option>; + #[method(detach)] pub unsafe fn detach(&self); + #[method_id(XPath)] pub unsafe fn XPath(&self) -> Option>; + #[method_id(localName)] pub unsafe fn localName(&self) -> Option>; + #[method_id(prefix)] pub unsafe fn prefix(&self) -> Option>; + #[method_id(URI)] pub unsafe fn URI(&self) -> Option>; + #[method(setURI:)] pub unsafe fn setURI(&self, URI: Option<&NSString>); + #[method_id(localNameForName:)] pub unsafe fn localNameForName(name: &NSString) -> Id; + #[method_id(prefixForName:)] pub unsafe fn prefixForName(name: &NSString) -> Option>; + #[method_id(predefinedNamespaceForPrefix:)] pub unsafe fn predefinedNamespaceForPrefix( name: &NSString, ) -> Option>; + #[method_id(description)] pub unsafe fn description(&self) -> Id; + #[method_id(XMLString)] pub unsafe fn XMLString(&self) -> Id; + #[method_id(XMLStringWithOptions:)] pub unsafe fn XMLStringWithOptions( &self, options: NSXMLNodeOptions, ) -> Id; + #[method_id(canonicalXMLStringPreservingComments:)] pub unsafe fn canonicalXMLStringPreservingComments( &self, comments: bool, ) -> Id; + #[method_id(nodesForXPath:error:)] pub unsafe fn nodesForXPath_error( &self, xpath: &NSString, ) -> Result, Shared>, Id>; + #[method_id(objectsForXQuery:constants:error:)] pub unsafe fn objectsForXQuery_constants_error( &self, xquery: &NSString, constants: Option<&NSDictionary>, ) -> Result, Id>; + #[method_id(objectsForXQuery:error:)] pub unsafe fn objectsForXQuery_error( &self, diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 29154136f..d2d122601 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -1,73 +1,100 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + extern_class!( #[derive(Debug)] pub struct NSXMLParser; + unsafe impl ClassType for NSXMLParser { type Super = NSObject; } ); + extern_methods!( unsafe impl NSXMLParser { #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + #[method_id(initWithData:)] pub unsafe fn initWithData(&self, data: &NSData) -> Id; + #[method_id(initWithStream:)] pub unsafe fn initWithStream(&self, stream: &NSInputStream) -> Id; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSXMLParserDelegate>); + #[method(shouldProcessNamespaces)] pub unsafe fn shouldProcessNamespaces(&self) -> bool; + #[method(setShouldProcessNamespaces:)] pub unsafe fn setShouldProcessNamespaces(&self, shouldProcessNamespaces: bool); + #[method(shouldReportNamespacePrefixes)] pub unsafe fn shouldReportNamespacePrefixes(&self) -> bool; + #[method(setShouldReportNamespacePrefixes:)] pub unsafe fn setShouldReportNamespacePrefixes(&self, shouldReportNamespacePrefixes: bool); + #[method(externalEntityResolvingPolicy)] pub unsafe fn externalEntityResolvingPolicy( &self, ) -> NSXMLParserExternalEntityResolvingPolicy; + #[method(setExternalEntityResolvingPolicy:)] pub unsafe fn setExternalEntityResolvingPolicy( &self, externalEntityResolvingPolicy: NSXMLParserExternalEntityResolvingPolicy, ); + #[method_id(allowedExternalEntityURLs)] pub unsafe fn allowedExternalEntityURLs(&self) -> Option, Shared>>; + #[method(setAllowedExternalEntityURLs:)] pub unsafe fn setAllowedExternalEntityURLs( &self, allowedExternalEntityURLs: Option<&NSSet>, ); + #[method(parse)] pub unsafe fn parse(&self) -> bool; + #[method(abortParsing)] pub unsafe fn abortParsing(&self); + #[method_id(parserError)] pub unsafe fn parserError(&self) -> Option>; + #[method(shouldResolveExternalEntities)] pub unsafe fn shouldResolveExternalEntities(&self) -> bool; + #[method(setShouldResolveExternalEntities:)] pub unsafe fn setShouldResolveExternalEntities(&self, shouldResolveExternalEntities: bool); } ); + extern_methods!( - #[doc = "NSXMLParserLocatorAdditions"] + /// NSXMLParserLocatorAdditions unsafe impl NSXMLParser { #[method_id(publicID)] pub unsafe fn publicID(&self) -> Option>; + #[method_id(systemID)] pub unsafe fn systemID(&self) -> Option>; + #[method(lineNumber)] pub unsafe fn lineNumber(&self) -> NSInteger; + #[method(columnNumber)] pub unsafe fn columnNumber(&self) -> NSInteger; } ); + pub type NSXMLParserDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 23f960665..a7521ef80 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -1,134 +1,184 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + pub type NSXPCProxyCreating = NSObject; + extern_class!( #[derive(Debug)] pub struct NSXPCConnection; + unsafe impl ClassType for NSXPCConnection { type Super = NSObject; } ); + extern_methods!( unsafe impl NSXPCConnection { #[method_id(initWithServiceName:)] pub unsafe fn initWithServiceName(&self, serviceName: &NSString) -> Id; + #[method_id(serviceName)] pub unsafe fn serviceName(&self) -> Option>; + #[method_id(initWithMachServiceName:options:)] pub unsafe fn initWithMachServiceName_options( &self, name: &NSString, options: NSXPCConnectionOptions, ) -> Id; + #[method_id(initWithListenerEndpoint:)] pub unsafe fn initWithListenerEndpoint( &self, endpoint: &NSXPCListenerEndpoint, ) -> Id; + #[method_id(endpoint)] pub unsafe fn endpoint(&self) -> Id; + #[method_id(exportedInterface)] pub unsafe fn exportedInterface(&self) -> Option>; + #[method(setExportedInterface:)] pub unsafe fn setExportedInterface(&self, exportedInterface: Option<&NSXPCInterface>); + #[method_id(exportedObject)] pub unsafe fn exportedObject(&self) -> Option>; + #[method(setExportedObject:)] pub unsafe fn setExportedObject(&self, exportedObject: Option<&Object>); + #[method_id(remoteObjectInterface)] pub unsafe fn remoteObjectInterface(&self) -> Option>; + #[method(setRemoteObjectInterface:)] pub unsafe fn setRemoteObjectInterface( &self, remoteObjectInterface: Option<&NSXPCInterface>, ); + #[method_id(remoteObjectProxy)] pub unsafe fn remoteObjectProxy(&self) -> Id; + #[method_id(remoteObjectProxyWithErrorHandler:)] pub unsafe fn remoteObjectProxyWithErrorHandler( &self, handler: TodoBlock, ) -> Id; + #[method_id(synchronousRemoteObjectProxyWithErrorHandler:)] pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( &self, handler: TodoBlock, ) -> Id; + #[method(interruptionHandler)] pub unsafe fn interruptionHandler(&self) -> TodoBlock; + #[method(setInterruptionHandler:)] pub unsafe fn setInterruptionHandler(&self, interruptionHandler: TodoBlock); + #[method(invalidationHandler)] pub unsafe fn invalidationHandler(&self) -> TodoBlock; + #[method(setInvalidationHandler:)] pub unsafe fn setInvalidationHandler(&self, invalidationHandler: TodoBlock); + #[method(resume)] pub unsafe fn resume(&self); + #[method(suspend)] pub unsafe fn suspend(&self); + #[method(invalidate)] pub unsafe fn invalidate(&self); + #[method(auditSessionIdentifier)] pub unsafe fn auditSessionIdentifier(&self) -> au_asid_t; + #[method(processIdentifier)] pub unsafe fn processIdentifier(&self) -> pid_t; + #[method(effectiveUserIdentifier)] pub unsafe fn effectiveUserIdentifier(&self) -> uid_t; + #[method(effectiveGroupIdentifier)] pub unsafe fn effectiveGroupIdentifier(&self) -> gid_t; + #[method_id(currentConnection)] pub unsafe fn currentConnection() -> Option>; + #[method(scheduleSendBarrierBlock:)] pub unsafe fn scheduleSendBarrierBlock(&self, block: TodoBlock); } ); + extern_class!( #[derive(Debug)] pub struct NSXPCListener; + unsafe impl ClassType for NSXPCListener { type Super = NSObject; } ); + extern_methods!( unsafe impl NSXPCListener { #[method_id(serviceListener)] pub unsafe fn serviceListener() -> Id; + #[method_id(anonymousListener)] pub unsafe fn anonymousListener() -> Id; + #[method_id(initWithMachServiceName:)] pub unsafe fn initWithMachServiceName(&self, name: &NSString) -> Id; + #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; + #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSXPCListenerDelegate>); + #[method_id(endpoint)] pub unsafe fn endpoint(&self) -> Id; + #[method(resume)] pub unsafe fn resume(&self); + #[method(suspend)] pub unsafe fn suspend(&self); + #[method(invalidate)] pub unsafe fn invalidate(&self); } ); + pub type NSXPCListenerDelegate = NSObject; + extern_class!( #[derive(Debug)] pub struct NSXPCInterface; + unsafe impl ClassType for NSXPCInterface { type Super = NSObject; } ); + extern_methods!( unsafe impl NSXPCInterface { #[method_id(interfaceWithProtocol:)] pub unsafe fn interfaceWithProtocol(protocol: &Protocol) -> Id; + #[method_id(protocol)] pub unsafe fn protocol(&self) -> Id; + #[method(setProtocol:)] pub unsafe fn setProtocol(&self, protocol: &Protocol); + #[method(setClasses:forSelector:argumentIndex:ofReply:)] pub unsafe fn setClasses_forSelector_argumentIndex_ofReply( &self, @@ -137,6 +187,7 @@ extern_methods!( arg: NSUInteger, ofReply: bool, ); + #[method_id(classesForSelector:argumentIndex:ofReply:)] pub unsafe fn classesForSelector_argumentIndex_ofReply( &self, @@ -144,6 +195,7 @@ extern_methods!( arg: NSUInteger, ofReply: bool, ) -> Id, Shared>; + #[method(setInterface:forSelector:argumentIndex:ofReply:)] pub unsafe fn setInterface_forSelector_argumentIndex_ofReply( &self, @@ -152,6 +204,7 @@ extern_methods!( arg: NSUInteger, ofReply: bool, ); + #[method_id(interfaceForSelector:argumentIndex:ofReply:)] pub unsafe fn interfaceForSelector_argumentIndex_ofReply( &self, @@ -159,6 +212,7 @@ extern_methods!( arg: NSUInteger, ofReply: bool, ) -> Option>; + #[method(setXPCType:forSelector:argumentIndex:ofReply:)] pub unsafe fn setXPCType_forSelector_argumentIndex_ofReply( &self, @@ -167,6 +221,7 @@ extern_methods!( arg: NSUInteger, ofReply: bool, ); + #[method(XPCTypeForSelector:argumentIndex:ofReply:)] pub unsafe fn XPCTypeForSelector_argumentIndex_ofReply( &self, @@ -176,37 +231,47 @@ extern_methods!( ) -> xpc_type_t; } ); + extern_class!( #[derive(Debug)] pub struct NSXPCListenerEndpoint; + unsafe impl ClassType for NSXPCListenerEndpoint { type Super = NSObject; } ); + extern_methods!( unsafe impl NSXPCListenerEndpoint {} ); + extern_class!( #[derive(Debug)] pub struct NSXPCCoder; + unsafe impl ClassType for NSXPCCoder { type Super = NSCoder; } ); + extern_methods!( unsafe impl NSXPCCoder { #[method(encodeXPCObject:forKey:)] pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: xpc_object_t, key: &NSString); + #[method(decodeXPCObjectOfType:forKey:)] pub unsafe fn decodeXPCObjectOfType_forKey( &self, type_: xpc_type_t, key: &NSString, ) -> xpc_object_t; + #[method_id(userInfo)] pub unsafe fn userInfo(&self) -> Option>; + #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&NSObject>); + #[method_id(connection)] pub unsafe fn connection(&self) -> Option>; } diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index d52c6a49a..9810872e4 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -1,3 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT #[allow(unused_imports)] use objc2::rc::{Id, Shared}; #[allow(unused_imports)] From e31a8402d055e5535f1ad29ffa5c8ffcbb52f7c5 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 30 Oct 2022 11:52:56 +0100 Subject: [PATCH 078/131] Don't crash on unions --- crates/header-translator/src/stmt.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 6489abea8..73b44d13e 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -339,6 +339,10 @@ impl Stmt { // TODO None } + EntityKind::UnionDecl => { + // TODO + None + } _ => { panic!("Unknown: {:?}", entity) } From bed5cae34888ed48981fbdfafeeb56ab89cbcfa0 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Oct 2022 01:29:32 +0100 Subject: [PATCH 079/131] Add initial enum parsing --- crates/header-translator/src/lib.rs | 4 + crates/header-translator/src/method.rs | 13 +- crates/header-translator/src/property.rs | 7 +- crates/header-translator/src/stmt.rs | 116 +++++++++++++++++- .../header-translator/src/unexposed_macro.rs | 56 +++++++++ 5 files changed, 188 insertions(+), 8 deletions(-) create mode 100644 crates/header-translator/src/unexposed_macro.rs diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 61c5efe6d..0e25d6249 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -10,6 +10,7 @@ mod objc2_utils; mod property; mod rust_type; mod stmt; +mod unexposed_macro; pub use self::config::Config; pub use self::stmt::Stmt; @@ -45,6 +46,9 @@ impl RustFile { Stmt::ProtocolDecl { name, .. } => { self.declared_types.insert(name.clone()); } + Stmt::EnumDecl { name, variants, .. } => { + // TODO + } Stmt::AliasDecl { name, .. } => { self.declared_types.insert(name.clone()); } diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 3fdf80a1d..ab35f012b 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -6,6 +6,7 @@ use crate::availability::Availability; use crate::config::MethodData; use crate::objc2_utils::in_selector_family; use crate::rust_type::{RustType, RustTypeReturn}; +use crate::unexposed_macro::UnexposedMacro; #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] pub enum Qualifier { @@ -202,7 +203,11 @@ impl<'tu> PartialMethod<'tu> { } is_consumed = true; } - EntityKind::UnexposedAttr => {} + EntityKind::UnexposedAttr => { + if let Some(macro_) = UnexposedMacro::parse(&entity) { + println!("method argument {fn_name}/{name}: {macro_:?}"); + } + } // For some reason we recurse into array types EntityKind::IntegerLiteral => {} _ => panic!("Unknown method argument child: {:?}, {:?}", entity, _parent), @@ -271,7 +276,11 @@ impl<'tu> PartialMethod<'tu> { // TODO: Can we use this for something? // } - EntityKind::UnexposedAttr => {} + EntityKind::UnexposedAttr => { + if let Some(macro_) = UnexposedMacro::parse(&entity) { + println!("method {fn_name}: {macro_:?}"); + } + } _ => panic!("Unknown method child: {:?}, {:?}", entity, _parent), }; // TODO: Verify that Continue is good enough diff --git a/crates/header-translator/src/property.rs b/crates/header-translator/src/property.rs index b5661dc00..19f3947b5 100644 --- a/crates/header-translator/src/property.rs +++ b/crates/header-translator/src/property.rs @@ -6,6 +6,7 @@ use crate::availability::Availability; use crate::config::MethodData; use crate::method::{MemoryManagement, Method, Qualifier}; use crate::rust_type::{RustType, RustTypeReturn}; +use crate::unexposed_macro::UnexposedMacro; #[allow(dead_code)] #[derive(Debug, Clone)] @@ -119,7 +120,11 @@ impl PartialProperty<'_> { EntityKind::IbOutletAttr => { // TODO: What is this? } - EntityKind::UnexposedAttr => {} + EntityKind::UnexposedAttr => { + if let Some(macro_) = UnexposedMacro::parse(&entity) { + println!("property {name}: {macro_:?}"); + } + } _ => panic!("Unknown property child: {:?}, {:?}", entity, _parent), }; EntityVisitResult::Continue diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 73b44d13e..018f09317 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -8,6 +8,7 @@ use crate::config::{ClassData, Config}; use crate::method::Method; use crate::property::Property; use crate::rust_type::{GenericType, RustType}; +use crate::unexposed_macro::UnexposedMacro; #[derive(Debug, Clone)] pub enum MethodOrProperty { @@ -134,7 +135,11 @@ fn parse_objc_decl( EntityKind::ObjCException if superclass.is_some() => { // Maybe useful for knowing when to implement `Error` for the type } - EntityKind::UnexposedAttr => {} + EntityKind::UnexposedAttr => { + if let Some(macro_) = UnexposedMacro::parse(&entity) { + println!("objc decl {entity:?}: {macro_:?}"); + } + } _ => panic!("unknown objc decl child {entity:?}"), }; EntityVisitResult::Continue @@ -181,6 +186,26 @@ pub enum Stmt { protocols: Vec, methods: Vec, }, + /// typedef NS_OPTIONS(type, name) { + /// variants* + /// }; + /// + /// typedef NS_ENUM(type, name) { + /// variants* + /// }; + /// + /// enum name { + /// variants* + /// }; + /// + /// enum { + /// variants* + /// }; + EnumDecl { + name: Option, + kind: Option, + variants: Vec<(String, Option)>, + }, /// typedef Type TypedefName; AliasDecl { name: String, type_: RustType }, // /// typedef struct Name { fields } TypedefName; @@ -332,15 +357,89 @@ impl Stmt { } } EntityKind::StructDecl => { - // println!("struct: {:?}", entity.get_display_name()); + // println!( + // "struct: {:?}, {:?}, {:#?}, {:#?}", + // entity.get_display_name(), + // entity.get_name(), + // entity.has_attributes(), + // entity.get_children(), + // ); + // EntityKind::FieldDecl | EntityKind::IntegerLiteral | EntityKind::ObjCBoxable => {} None } - EntityKind::EnumDecl | EntityKind::VarDecl | EntityKind::FunctionDecl => { - // TODO + EntityKind::EnumDecl => { + let name = entity.get_name(); + let mut kind = None; + let mut variants = Vec::new(); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::EnumConstantDecl => { + let name = entity.get_name().expect("enum constant name"); + // TODO + variants.push((name, None)); + } + EntityKind::UnexposedAttr => { + if let Some(macro_) = UnexposedMacro::parse(&entity) { + if let Some(kind) = &kind { + assert_eq!( + kind, ¯o_, + "got differing enum kinds in {name:?}" + ); + } else { + kind = Some(macro_); + } + } + } + EntityKind::FlagEnum => { + let macro_ = UnexposedMacro::Options; + if let Some(kind) = &kind { + assert_eq!(kind, ¯o_, "got differing enum kinds in {name:?}"); + } else { + kind = Some(macro_); + } + } + _ => { + panic!("unknown enum child {entity:?} in {name:?}"); + } + } + EntityVisitResult::Continue + }); + + Some(Self::EnumDecl { + name, + kind, + variants, + }) + } + EntityKind::VarDecl => { + // println!( + // "var: {:?}, {:?}, {:#?}, {:#?}", + // entity.get_display_name(), + // entity.get_name(), + // entity.has_attributes(), + // entity.get_children(), + // ); + None + } + EntityKind::FunctionDecl => { + // println!( + // "function: {:?}, {:?}, {:#?}, {:#?}", + // entity.get_display_name(), + // entity.get_name(), + // entity.has_attributes(), + // entity.get_children(), + // ); None } EntityKind::UnionDecl => { - // TODO + // println!( + // "union: {:?}, {:?}, {:#?}, {:#?}", + // entity.get_display_name(), + // entity.get_name(), + // entity.has_attributes(), + // entity.get_children(), + // ); None } _ => { @@ -458,6 +557,13 @@ impl fmt::Display for Stmt { // } writeln!(f, "pub type {name} = NSObject;")?; } + Self::EnumDecl { + name, + kind, + variants, + } => { + // TODO + } Self::AliasDecl { name, type_ } => { writeln!(f, "pub type {name} = {type_};")?; } diff --git a/crates/header-translator/src/unexposed_macro.rs b/crates/header-translator/src/unexposed_macro.rs new file mode 100644 index 000000000..54aabfbee --- /dev/null +++ b/crates/header-translator/src/unexposed_macro.rs @@ -0,0 +1,56 @@ +use clang::{Entity, EntityKind}; + +/// Parts of `EntityKind::UnexposedAttr` that we can easily parse. +#[derive(Clone, Debug, PartialEq, Eq, Hash)] +pub enum UnexposedMacro { + Enum, + Options, + ClosedEnum, + ErrorEnum, +} + +impl UnexposedMacro { + fn from_name(s: &str) -> Option { + match s { + "NS_ENUM" => Some(Self::Enum), + "NS_OPTIONS" => Some(Self::Options), + "NS_CLOSED_ENUM" => Some(Self::ClosedEnum), + "NS_ERROR_ENUM" => Some(Self::ErrorEnum), + // TODO + "NS_FORMAT_FUNCTION" => None, + "NS_FORMAT_ARGUMENT" => None, + // Uninteresting, their data is already exposed elsewhere + "API_AVAILABLE" + | "API_UNAVAILABLE" + | "API_DEPRECATED" + | "API_DEPRECATED_WITH_REPLACEMENT" + | "NS_SWIFT_UNAVAILABLE" + | "NS_SWIFT_NAME" + | "NS_CLASS_AVAILABLE_MAC" + | "NS_AVAILABLE" + | "NS_OPENGL_DEPRECATED" + | "NS_OPENGL_CLASS_DEPRECATED" + | "NS_OPENGL_ENUM_DEPRECATED" => None, + name => panic!("unknown unexposed macro name {name}"), + } + } + + pub fn parse(entity: &Entity<'_>) -> Option { + let location = entity.get_location().expect("unexposed attr location"); + if let Some(parsed) = location.get_entity() { + match parsed.get_kind() { + EntityKind::MacroExpansion => { + let macro_name = parsed.get_name().expect("macro name"); + Self::from_name(¯o_name) + } + // Some macros can't be found using this method, + // for example NS_NOESCAPE. + _ => None, + } + } else { + // File-global macros like APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST + // are not findable with this approach + None + } + } +} From a90165808ddeb21927cec9625879d9a0566b8f0d Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Oct 2022 01:28:35 +0100 Subject: [PATCH 080/131] Add initial enum expr parsing --- crates/header-translator/Cargo.toml | 1 + crates/header-translator/src/expr.rs | 104 +++++++++++++++++++++++++++ crates/header-translator/src/lib.rs | 1 + crates/header-translator/src/stmt.rs | 9 ++- 4 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 crates/header-translator/src/expr.rs diff --git a/crates/header-translator/Cargo.toml b/crates/header-translator/Cargo.toml index c34771e4c..f8fcdd9fd 100644 --- a/crates/header-translator/Cargo.toml +++ b/crates/header-translator/Cargo.toml @@ -12,3 +12,4 @@ 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/crates/header-translator/src/expr.rs b/crates/header-translator/src/expr.rs new file mode 100644 index 000000000..9f4ed4497 --- /dev/null +++ b/crates/header-translator/src/expr.rs @@ -0,0 +1,104 @@ +use std::collections::HashMap; +use std::fmt; +use std::num::Wrapping; + +use cexpr::expr::EvalResult; +use clang::token::{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 type Identifiers = HashMap, EvalResult>; + +impl Expr { + pub fn parse(entity: &Entity<'_>, identifiers: &Identifiers) -> Option { + let mut res = None; + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::UnexposedAttr => { + if let Some(macro_) = UnexposedMacro::parse(&entity) { + 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"); + } + 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"), + } + } +} + +/// 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 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, + }; + + let spelling: Vec = t.get_spelling().into(); + + Some(token::Token { + kind, + raw: spelling.into_boxed_slice(), + }) +} diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 0e25d6249..2562b62c4 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -5,6 +5,7 @@ use std::process::{Command, Stdio}; mod availability; mod config; +mod expr; mod method; mod objc2_utils; mod property; diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 018f09317..e9f026d2d 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -5,6 +5,7 @@ use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; use crate::availability::Availability; use crate::config::{ClassData, Config}; +use crate::expr::Expr; use crate::method::Method; use crate::property::Property; use crate::rust_type::{GenericType, RustType}; @@ -204,7 +205,7 @@ pub enum Stmt { EnumDecl { name: Option, kind: Option, - variants: Vec<(String, Option)>, + variants: Vec<(String, Option)>, }, /// typedef Type TypedefName; AliasDecl { name: String, type_: RustType }, @@ -376,8 +377,10 @@ impl Stmt { match entity.get_kind() { EntityKind::EnumConstantDecl => { let name = entity.get_name().expect("enum constant name"); - // TODO - variants.push((name, None)); + variants.push(( + name, + Expr::parse(&entity, &std::collections::HashMap::new()), + )); } EntityKind::UnexposedAttr => { if let Some(macro_) = UnexposedMacro::parse(&entity) { From 73622effe8190f88a63cc5023d9089dfd60d727f Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Oct 2022 01:49:31 +0100 Subject: [PATCH 081/131] Add very simple enum output --- crates/header-translator/src/lib.rs | 17 +- crates/header-translator/src/rust_type.rs | 10 + crates/header-translator/src/stmt.rs | 30 +- .../src/generated/AppKit/AppKitErrors.rs | 22 + .../AppKit/NSAccessibilityConstants.rs | 37 + .../AppKit/NSAccessibilityCustomRotor.rs | 30 + crates/icrate/src/generated/AppKit/NSAlert.rs | 5 + .../src/generated/AppKit/NSAnimation.rs | 11 + .../src/generated/AppKit/NSApplication.rs | 57 + .../generated/AppKit/NSAttributedString.rs | 27 + .../src/generated/AppKit/NSBezierPath.rs | 20 + .../src/generated/AppKit/NSBitmapImageRep.rs | 35 + crates/icrate/src/generated/AppKit/NSBox.rs | 14 + .../icrate/src/generated/AppKit/NSBrowser.rs | 9 + .../src/generated/AppKit/NSButtonCell.rs | 34 + crates/icrate/src/generated/AppKit/NSCell.rs | 83 ++ .../src/generated/AppKit/NSCollectionView.rs | 23 + .../NSCollectionViewCompositionalLayout.rs | 33 + .../AppKit/NSCollectionViewFlowLayout.rs | 4 + .../AppKit/NSCollectionViewLayout.rs | 13 + crates/icrate/src/generated/AppKit/NSColor.rs | 12 + .../src/generated/AppKit/NSColorPanel.rs | 22 + .../src/generated/AppKit/NSColorSpace.rs | 10 + .../src/generated/AppKit/NSDatePickerCell.rs | 17 + .../icrate/src/generated/AppKit/NSDocument.rs | 18 + .../icrate/src/generated/AppKit/NSDragging.rs | 39 + .../icrate/src/generated/AppKit/NSDrawer.rs | 6 + crates/icrate/src/generated/AppKit/NSEvent.rs | 206 +++ crates/icrate/src/generated/AppKit/NSFont.rs | 12 + .../generated/AppKit/NSFontAssetRequest.rs | 3 + .../src/generated/AppKit/NSFontCollection.rs | 5 + .../src/generated/AppKit/NSFontDescriptor.rs | 32 + .../src/generated/AppKit/NSFontManager.rs | 27 + .../src/generated/AppKit/NSFontPanel.rs | 21 + .../generated/AppKit/NSGestureRecognizer.rs | 9 + .../src/generated/AppKit/NSGlyphGenerator.rs | 4 + .../src/generated/AppKit/NSGlyphInfo.rs | 8 + .../icrate/src/generated/AppKit/NSGradient.rs | 4 + .../icrate/src/generated/AppKit/NSGraphics.rs | 71 ++ .../src/generated/AppKit/NSGraphicsContext.rs | 7 + .../icrate/src/generated/AppKit/NSGridView.rs | 16 + .../src/generated/AppKit/NSHapticFeedback.rs | 10 + crates/icrate/src/generated/AppKit/NSImage.rs | 22 + .../src/generated/AppKit/NSImageCell.rs | 18 + .../icrate/src/generated/AppKit/NSImageRep.rs | 7 + .../src/generated/AppKit/NSInterfaceStyle.rs | 5 + .../generated/AppKit/NSLayoutConstraint.rs | 43 + .../src/generated/AppKit/NSLayoutManager.rs | 38 + .../src/generated/AppKit/NSLevelIndicator.rs | 6 + .../generated/AppKit/NSLevelIndicatorCell.rs | 6 + .../icrate/src/generated/AppKit/NSMatrix.rs | 6 + .../AppKit/NSMediaLibraryBrowserController.rs | 5 + crates/icrate/src/generated/AppKit/NSMenu.rs | 8 + .../icrate/src/generated/AppKit/NSOpenGL.rs | 68 + .../src/generated/AppKit/NSOutlineView.rs | 2 + .../icrate/src/generated/AppKit/NSPDFPanel.rs | 5 + .../src/generated/AppKit/NSPageController.rs | 5 + crates/icrate/src/generated/AppKit/NSPanel.rs | 3 + .../src/generated/AppKit/NSParagraphStyle.rs | 20 + .../src/generated/AppKit/NSPasteboard.rs | 12 + .../icrate/src/generated/AppKit/NSPathCell.rs | 5 + .../generated/AppKit/NSPickerTouchBarItem.rs | 13 + .../src/generated/AppKit/NSPopUpButtonCell.rs | 5 + .../icrate/src/generated/AppKit/NSPopover.rs | 9 + .../src/generated/AppKit/NSPrintInfo.rs | 13 + .../src/generated/AppKit/NSPrintOperation.rs | 10 + .../src/generated/AppKit/NSPrintPanel.rs | 10 + .../icrate/src/generated/AppKit/NSPrinter.rs | 5 + .../generated/AppKit/NSProgressIndicator.rs | 10 + .../src/generated/AppKit/NSRuleEditor.rs | 10 + .../src/generated/AppKit/NSRulerView.rs | 4 + .../generated/AppKit/NSRunningApplication.rs | 9 + .../src/generated/AppKit/NSSavePanel.rs | 3 + .../src/generated/AppKit/NSScrollView.rs | 10 + .../icrate/src/generated/AppKit/NSScroller.rs | 33 + .../icrate/src/generated/AppKit/NSScrubber.rs | 10 + .../generated/AppKit/NSSegmentedControl.rs | 22 + .../src/generated/AppKit/NSSharingService.rs | 12 + .../src/generated/AppKit/NSSliderCell.rs | 10 + .../generated/AppKit/NSSpeechSynthesizer.rs | 5 + .../src/generated/AppKit/NSSpellChecker.rs | 13 + .../src/generated/AppKit/NSSplitView.rs | 5 + .../src/generated/AppKit/NSSplitViewItem.rs | 13 + .../src/generated/AppKit/NSStackView.rs | 15 + .../src/generated/AppKit/NSStatusItem.rs | 4 + .../src/generated/AppKit/NSStringDrawing.rs | 8 + .../icrate/src/generated/AppKit/NSTabView.rs | 21 + .../generated/AppKit/NSTabViewController.rs | 6 + .../src/generated/AppKit/NSTabViewItem.rs | 5 + .../src/generated/AppKit/NSTableColumn.rs | 5 + .../src/generated/AppKit/NSTableView.rs | 61 + .../generated/AppKit/NSTableViewRowAction.rs | 4 + crates/icrate/src/generated/AppKit/NSText.rs | 48 + .../src/generated/AppKit/NSTextAttachment.rs | 2 + .../generated/AppKit/NSTextCheckingClient.rs | 5 + .../src/generated/AppKit/NSTextContainer.rs | 13 + .../generated/AppKit/NSTextContentManager.rs | 4 + .../src/generated/AppKit/NSTextFieldCell.rs | 4 + .../src/generated/AppKit/NSTextFinder.rs | 21 + .../generated/AppKit/NSTextLayoutFragment.rs | 16 + .../generated/AppKit/NSTextLayoutManager.rs | 16 + .../icrate/src/generated/AppKit/NSTextList.rs | 3 + .../src/generated/AppKit/NSTextSelection.rs | 11 + .../AppKit/NSTextSelectionNavigation.rs | 34 + .../src/generated/AppKit/NSTextStorage.rs | 4 + .../src/generated/AppKit/NSTextTable.rs | 27 + .../icrate/src/generated/AppKit/NSTextView.rs | 27 + .../src/generated/AppKit/NSTokenFieldCell.rs | 7 + .../icrate/src/generated/AppKit/NSToolbar.rs | 11 + .../generated/AppKit/NSToolbarItemGroup.rs | 13 + crates/icrate/src/generated/AppKit/NSTouch.rs | 17 + .../src/generated/AppKit/NSTrackingArea.rs | 12 + .../src/generated/AppKit/NSTypesetter.rs | 8 + .../generated/AppKit/NSUserInterfaceLayout.rs | 8 + crates/icrate/src/generated/AppKit/NSView.rs | 36 + .../src/generated/AppKit/NSViewController.rs | 11 + .../generated/AppKit/NSVisualEffectView.rs | 30 + .../icrate/src/generated/AppKit/NSWindow.rs | 97 ++ .../src/generated/AppKit/NSWorkspace.rs | 23 + crates/icrate/src/generated/AppKit/mod.rs | 1100 +++++++++++++++-- .../generated/Foundation/FoundationErrors.rs | 84 ++ .../Foundation/NSAppleEventDescriptor.rs | 13 + .../src/generated/Foundation/NSArray.rs | 5 + .../Foundation/NSAttributedString.rs | 57 + .../NSBackgroundActivityScheduler.rs | 4 + .../src/generated/Foundation/NSBundle.rs | 6 + .../Foundation/NSByteCountFormatter.rs | 19 + .../src/generated/Foundation/NSByteOrder.rs | 4 + .../src/generated/Foundation/NSCalendar.rs | 49 + .../generated/Foundation/NSCharacterSet.rs | 2 + .../src/generated/Foundation/NSCoder.rs | 4 + .../Foundation/NSComparisonPredicate.rs | 26 + .../Foundation/NSCompoundPredicate.rs | 5 + .../icrate/src/generated/Foundation/NSData.rs | 38 + .../Foundation/NSDateComponentsFormatter.rs | 24 + .../generated/Foundation/NSDateFormatter.rs | 12 + .../Foundation/NSDateIntervalFormatter.rs | 7 + .../src/generated/Foundation/NSDecimal.rs | 13 + .../NSDistributedNotificationCenter.rs | 10 + .../generated/Foundation/NSEnergyFormatter.rs | 6 + .../src/generated/Foundation/NSExpression.rs | 15 + .../generated/Foundation/NSFileCoordinator.rs | 15 + .../src/generated/Foundation/NSFileManager.rs | 25 + .../src/generated/Foundation/NSFileVersion.rs | 6 + .../src/generated/Foundation/NSFileWrapper.rs | 8 + .../src/generated/Foundation/NSFormatter.rs | 13 + .../src/generated/Foundation/NSGeometry.rs | 34 + .../Foundation/NSHTTPCookieStorage.rs | 5 + .../Foundation/NSISO8601DateFormatter.rs | 16 + .../generated/Foundation/NSItemProvider.rs | 16 + .../Foundation/NSJSONSerialization.rs | 14 + .../Foundation/NSKeyValueObserving.rs | 18 + .../generated/Foundation/NSLengthFormatter.rs | 10 + .../Foundation/NSLinguisticTagger.rs | 13 + .../src/generated/Foundation/NSLocale.rs | 7 + .../generated/Foundation/NSMassFormatter.rs | 7 + .../Foundation/NSMeasurementFormatter.rs | 6 + .../src/generated/Foundation/NSMorphology.rs | 32 + .../src/generated/Foundation/NSNetServices.rs | 15 + .../Foundation/NSNotificationQueue.rs | 10 + .../generated/Foundation/NSNumberFormatter.rs | 32 + .../src/generated/Foundation/NSObjCRuntime.rs | 20 + .../src/generated/Foundation/NSOperation.rs | 7 + .../Foundation/NSOrderedCollectionChange.rs | 4 + .../NSOrderedCollectionDifference.rs | 8 + .../generated/Foundation/NSPathUtilities.rs | 36 + .../NSPersonNameComponentsFormatter.rs | 10 + .../Foundation/NSPointerFunctions.rs | 15 + .../icrate/src/generated/Foundation/NSPort.rs | 5 + .../src/generated/Foundation/NSProcessInfo.rs | 24 + .../generated/Foundation/NSPropertyList.rs | 10 + .../Foundation/NSRegularExpression.rs | 23 + .../Foundation/NSRelativeDateTimeFormatter.rs | 11 + .../generated/Foundation/NSScriptCommand.rs | 12 + .../Foundation/NSScriptObjectSpecifiers.rs | 26 + .../NSScriptStandardSuiteCommands.rs | 5 + .../Foundation/NSScriptWhoseTests.rs | 10 + .../src/generated/Foundation/NSStream.rs | 18 + .../src/generated/Foundation/NSString.rs | 53 + .../icrate/src/generated/Foundation/NSTask.rs | 4 + .../Foundation/NSTextCheckingResult.rs | 19 + .../src/generated/Foundation/NSTimeZone.rs | 8 + .../icrate/src/generated/Foundation/NSURL.rs | 17 + .../src/generated/Foundation/NSURLCache.rs | 5 + .../generated/Foundation/NSURLCredential.rs | 6 + .../src/generated/Foundation/NSURLError.rs | 59 + .../src/generated/Foundation/NSURLHandle.rs | 6 + .../src/generated/Foundation/NSURLRequest.rs | 24 + .../src/generated/Foundation/NSURLSession.rs | 73 ++ .../Foundation/NSUbiquitousKeyValueStore.rs | 5 + .../Foundation/NSUserNotification.rs | 8 + .../src/generated/Foundation/NSXMLDTDNode.rs | 22 + .../src/generated/Foundation/NSXMLDocument.rs | 6 + .../src/generated/Foundation/NSXMLNode.rs | 15 + .../generated/Foundation/NSXMLNodeOptions.rs | 30 + .../src/generated/Foundation/NSXMLParser.rs | 102 ++ .../generated/Foundation/NSXPCConnection.rs | 3 + .../icrate/src/generated/Foundation/NSZone.rs | 3 + crates/icrate/src/generated/Foundation/mod.rs | 782 ++++++++++-- 199 files changed, 5306 insertions(+), 221 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 2562b62c4..8afe4ce3a 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -48,7 +48,22 @@ impl RustFile { self.declared_types.insert(name.clone()); } Stmt::EnumDecl { name, variants, .. } => { - // TODO + // Fix weirdness with enums, they're found twice for some reason + if let Some(Stmt::EnumDecl { + name: last_name, .. + }) = self.stmts.last() + { + if last_name == name { + self.stmts.pop(); + } + } + + if let Some(name) = name { + self.declared_types.insert(name.clone()); + } + for (name, _) in variants { + self.declared_types.insert(name.clone()); + } } Stmt::AliasDecl { name, .. } => { self.declared_types.insert(name.clone()); diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 6988b0e6d..b8c9bfba9 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -539,6 +539,16 @@ impl RustType { this } + + pub fn parse_enum(ty: Type<'_>) -> Self { + let this = Self::parse(ty, false, Nullability::Unspecified); + + this.visit_lifetime(|_lifetime| { + panic!("unexpected lifetime in enum {this:?}"); + }); + + this + } } impl fmt::Display for RustType { diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index e9f026d2d..569c7ac05 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -204,8 +204,9 @@ pub enum Stmt { /// }; EnumDecl { name: Option, + ty: RustType, kind: Option, - variants: Vec<(String, Option)>, + variants: Vec<(String, (i64, u64))>, }, /// typedef Type TypedefName; AliasDecl { name: String, type_: RustType }, @@ -370,6 +371,8 @@ impl Stmt { } EntityKind::EnumDecl => { let name = entity.get_name(); + let ty = + RustType::parse_enum(entity.get_enum_underlying_type().expect("enum type")); let mut kind = None; let mut variants = Vec::new(); @@ -377,10 +380,11 @@ impl Stmt { match entity.get_kind() { EntityKind::EnumConstantDecl => { let name = entity.get_name().expect("enum constant name"); - variants.push(( - name, - Expr::parse(&entity, &std::collections::HashMap::new()), - )); + let val = entity + .get_enum_constant_value() + .expect("enum constant value"); + let _expr = Expr::parse(&entity, &std::collections::HashMap::new()); + variants.push((name, val)); } EntityKind::UnexposedAttr => { if let Some(macro_) = UnexposedMacro::parse(&entity) { @@ -411,6 +415,7 @@ impl Stmt { Some(Self::EnumDecl { name, + ty, kind, variants, }) @@ -562,10 +567,21 @@ impl fmt::Display for Stmt { } Self::EnumDecl { name, - kind, + ty, + // TODO: Use the enum kind + kind: _, variants, } => { - // TODO + 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};")?; + } + } else { + for (variant_name, (signed_val, _unsigned_val)) in variants { + writeln!(f, "pub const {variant_name}: i32 = {signed_val};")?; + } + } } Self::AliasDecl { name, type_ } => { writeln!(f, "pub type {name} = {type_};")?; diff --git a/crates/icrate/src/generated/AppKit/AppKitErrors.rs b/crates/icrate/src/generated/AppKit/AppKitErrors.rs index 9810872e4..669f90eb6 100644 --- a/crates/icrate/src/generated/AppKit/AppKitErrors.rs +++ b/crates/icrate/src/generated/AppKit/AppKitErrors.rs @@ -4,3 +4,25 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + +pub const NSTextReadInapplicableDocumentTypeError: i32 = 65806; +pub const NSTextWriteInapplicableDocumentTypeError: i32 = 66062; +pub const NSTextReadWriteErrorMinimum: i32 = 65792; +pub const NSTextReadWriteErrorMaximum: i32 = 66303; +pub const NSFontAssetDownloadError: i32 = 66304; +pub const NSFontErrorMinimum: i32 = 66304; +pub const NSFontErrorMaximum: i32 = 66335; +pub const NSServiceApplicationNotFoundError: i32 = 66560; +pub const NSServiceApplicationLaunchFailedError: i32 = 66561; +pub const NSServiceRequestTimedOutError: i32 = 66562; +pub const NSServiceInvalidPasteboardDataError: i32 = 66563; +pub const NSServiceMalformedServiceDictionaryError: i32 = 66564; +pub const NSServiceMiscellaneousError: i32 = 66800; +pub const NSServiceErrorMinimum: i32 = 66560; +pub const NSServiceErrorMaximum: i32 = 66817; +pub const NSSharingServiceNotConfiguredError: i32 = 67072; +pub const NSSharingServiceErrorMinimum: i32 = 67072; +pub const NSSharingServiceErrorMaximum: i32 = 67327; +pub const NSWorkspaceAuthorizationInvalidError: i32 = 67328; +pub const NSWorkspaceErrorMinimum: i32 = 67328; +pub const NSWorkspaceErrorMaximum: i32 = 67455; diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs index 4a09943fa..1bd685326 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs @@ -11,16 +11,48 @@ pub type NSAccessibilityParameterizedAttributeName = NSString; pub type NSAccessibilityAnnotationAttributeKey = NSString; +pub type NSAccessibilityAnnotationPosition = NSInteger; +pub const NSAccessibilityAnnotationPositionFullRange: NSAccessibilityAnnotationPosition = 0; +pub const NSAccessibilityAnnotationPositionStart: NSAccessibilityAnnotationPosition = 1; +pub const NSAccessibilityAnnotationPositionEnd: NSAccessibilityAnnotationPosition = 2; + pub type NSAccessibilityFontAttributeKey = NSString; +pub type NSAccessibilityOrientation = NSInteger; +pub const NSAccessibilityOrientationUnknown: NSAccessibilityOrientation = 0; +pub const NSAccessibilityOrientationVertical: NSAccessibilityOrientation = 1; +pub const NSAccessibilityOrientationHorizontal: NSAccessibilityOrientation = 2; + pub type NSAccessibilityOrientationValue = NSString; pub type NSAccessibilitySortDirectionValue = NSString; +pub type NSAccessibilitySortDirection = NSInteger; +pub const NSAccessibilitySortDirectionUnknown: NSAccessibilitySortDirection = 0; +pub const NSAccessibilitySortDirectionAscending: NSAccessibilitySortDirection = 1; +pub const NSAccessibilitySortDirectionDescending: NSAccessibilitySortDirection = 2; + pub type NSAccessibilityRulerMarkerTypeValue = NSString; +pub type NSAccessibilityRulerMarkerType = NSInteger; +pub const NSAccessibilityRulerMarkerTypeUnknown: NSAccessibilityRulerMarkerType = 0; +pub const NSAccessibilityRulerMarkerTypeTabStopLeft: NSAccessibilityRulerMarkerType = 1; +pub const NSAccessibilityRulerMarkerTypeTabStopRight: NSAccessibilityRulerMarkerType = 2; +pub const NSAccessibilityRulerMarkerTypeTabStopCenter: NSAccessibilityRulerMarkerType = 3; +pub const NSAccessibilityRulerMarkerTypeTabStopDecimal: NSAccessibilityRulerMarkerType = 4; +pub const NSAccessibilityRulerMarkerTypeIndentHead: NSAccessibilityRulerMarkerType = 5; +pub const NSAccessibilityRulerMarkerTypeIndentTail: NSAccessibilityRulerMarkerType = 6; +pub const NSAccessibilityRulerMarkerTypeIndentFirstLine: NSAccessibilityRulerMarkerType = 7; + pub type NSAccessibilityRulerUnitValue = NSString; +pub type NSAccessibilityUnits = NSInteger; +pub const NSAccessibilityUnitsUnknown: NSAccessibilityUnits = 0; +pub const NSAccessibilityUnitsInches: NSAccessibilityUnits = 1; +pub const NSAccessibilityUnitsCentimeters: NSAccessibilityUnits = 2; +pub const NSAccessibilityUnitsPoints: NSAccessibilityUnits = 3; +pub const NSAccessibilityUnitsPicas: NSAccessibilityUnits = 4; + pub type NSAccessibilityActionName = NSString; pub type NSAccessibilityNotificationName = NSString; @@ -31,4 +63,9 @@ pub type NSAccessibilitySubrole = NSString; pub type NSAccessibilityNotificationUserInfoKey = NSString; +pub type NSAccessibilityPriorityLevel = NSInteger; +pub const NSAccessibilityPriorityLow: NSAccessibilityPriorityLevel = 10; +pub const NSAccessibilityPriorityMedium: NSAccessibilityPriorityLevel = 50; +pub const NSAccessibilityPriorityHigh: NSAccessibilityPriorityLevel = 90; + pub type NSAccessibilityLoadingToken = TodoProtocols; diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs index 64a017468..4b3a0bc16 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs @@ -5,6 +5,36 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSAccessibilityCustomRotorSearchDirection = NSInteger; +pub const NSAccessibilityCustomRotorSearchDirectionPrevious: + NSAccessibilityCustomRotorSearchDirection = 0; +pub const NSAccessibilityCustomRotorSearchDirectionNext: NSAccessibilityCustomRotorSearchDirection = + 1; + +pub type NSAccessibilityCustomRotorType = NSInteger; +pub const NSAccessibilityCustomRotorTypeCustom: NSAccessibilityCustomRotorType = 0; +pub const NSAccessibilityCustomRotorTypeAny: NSAccessibilityCustomRotorType = 1; +pub const NSAccessibilityCustomRotorTypeAnnotation: NSAccessibilityCustomRotorType = 2; +pub const NSAccessibilityCustomRotorTypeBoldText: NSAccessibilityCustomRotorType = 3; +pub const NSAccessibilityCustomRotorTypeHeading: NSAccessibilityCustomRotorType = 4; +pub const NSAccessibilityCustomRotorTypeHeadingLevel1: NSAccessibilityCustomRotorType = 5; +pub const NSAccessibilityCustomRotorTypeHeadingLevel2: NSAccessibilityCustomRotorType = 6; +pub const NSAccessibilityCustomRotorTypeHeadingLevel3: NSAccessibilityCustomRotorType = 7; +pub const NSAccessibilityCustomRotorTypeHeadingLevel4: NSAccessibilityCustomRotorType = 8; +pub const NSAccessibilityCustomRotorTypeHeadingLevel5: NSAccessibilityCustomRotorType = 9; +pub const NSAccessibilityCustomRotorTypeHeadingLevel6: NSAccessibilityCustomRotorType = 10; +pub const NSAccessibilityCustomRotorTypeImage: NSAccessibilityCustomRotorType = 11; +pub const NSAccessibilityCustomRotorTypeItalicText: NSAccessibilityCustomRotorType = 12; +pub const NSAccessibilityCustomRotorTypeLandmark: NSAccessibilityCustomRotorType = 13; +pub const NSAccessibilityCustomRotorTypeLink: NSAccessibilityCustomRotorType = 14; +pub const NSAccessibilityCustomRotorTypeList: NSAccessibilityCustomRotorType = 15; +pub const NSAccessibilityCustomRotorTypeMisspelledWord: NSAccessibilityCustomRotorType = 16; +pub const NSAccessibilityCustomRotorTypeTable: NSAccessibilityCustomRotorType = 17; +pub const NSAccessibilityCustomRotorTypeTextField: NSAccessibilityCustomRotorType = 18; +pub const NSAccessibilityCustomRotorTypeUnderlinedText: NSAccessibilityCustomRotorType = 19; +pub const NSAccessibilityCustomRotorTypeVisitedLink: NSAccessibilityCustomRotorType = 20; +pub const NSAccessibilityCustomRotorTypeAudiograph: NSAccessibilityCustomRotorType = 21; + extern_class!( #[derive(Debug)] pub struct NSAccessibilityCustomRotor; diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index b1884ac27..7e24456f9 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSAlertStyle = NSUInteger; +pub const NSAlertStyleWarning: NSAlertStyle = 0; +pub const NSAlertStyleInformational: NSAlertStyle = 1; +pub const NSAlertStyleCritical: NSAlertStyle = 2; + extern_class!( #[derive(Debug)] pub struct NSAlert; diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index 2859ed2c6..6a03dcc62 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -5,6 +5,17 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSAnimationCurve = NSUInteger; +pub const NSAnimationEaseInOut: NSAnimationCurve = 0; +pub const NSAnimationEaseIn: NSAnimationCurve = 1; +pub const NSAnimationEaseOut: NSAnimationCurve = 2; +pub const NSAnimationLinear: NSAnimationCurve = 3; + +pub type NSAnimationBlockingMode = NSUInteger; +pub const NSAnimationBlocking: NSAnimationBlockingMode = 0; +pub const NSAnimationNonblocking: NSAnimationBlockingMode = 1; +pub const NSAnimationNonblockingThreaded: NSAnimationBlockingMode = 2; + extern_class!( #[derive(Debug)] pub struct NSAnimation; diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index da111ca48..61587f528 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -7,6 +7,42 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSModalResponse = NSInteger; +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 NSApplicationPresentationDisableSessionTermination: NSApplicationPresentationOptions = + 128; +pub const NSApplicationPresentationDisableHideApplication: NSApplicationPresentationOptions = 256; +pub const NSApplicationPresentationDisableMenuBarTransparency: NSApplicationPresentationOptions = + 512; +pub const NSApplicationPresentationFullScreen: NSApplicationPresentationOptions = 1024; +pub const NSApplicationPresentationAutoHideToolbar: NSApplicationPresentationOptions = 2048; +pub const NSApplicationPresentationDisableCursorLocationAssistance: + NSApplicationPresentationOptions = 4096; + +pub type NSApplicationOcclusionState = NSUInteger; +pub const NSApplicationOcclusionStateVisible: NSApplicationOcclusionState = 2; + +pub type NSWindowListOptions = NSInteger; +pub const NSWindowListOrderedFrontToBack: NSWindowListOptions = 1; + +pub type NSRequestUserAttentionType = NSUInteger; +pub const NSCriticalRequest: NSRequestUserAttentionType = 0; +pub const NSInformationalRequest: NSRequestUserAttentionType = 10; + +pub type NSApplicationDelegateReply = NSUInteger; +pub const NSApplicationDelegateReplySuccess: NSApplicationDelegateReply = 0; +pub const NSApplicationDelegateReplyCancel: NSApplicationDelegateReply = 1; +pub const NSApplicationDelegateReplyFailure: NSApplicationDelegateReply = 2; + extern_class!( #[derive(Debug)] pub struct NSApplication; @@ -327,6 +363,17 @@ extern_methods!( } ); +pub type NSApplicationTerminateReply = NSUInteger; +pub const NSTerminateCancel: NSApplicationTerminateReply = 0; +pub const NSTerminateNow: NSApplicationTerminateReply = 1; +pub const NSTerminateLater: NSApplicationTerminateReply = 2; + +pub type NSApplicationPrintReply = NSUInteger; +pub const NSPrintingCancelled: NSApplicationPrintReply = 0; +pub const NSPrintingSuccess: NSApplicationPrintReply = 1; +pub const NSPrintingFailure: NSApplicationPrintReply = 3; +pub const NSPrintingReplyLater: NSApplicationPrintReply = 2; + pub type NSApplicationDelegate = NSObject; extern_methods!( @@ -395,6 +442,12 @@ 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; + extern_methods!( /// NSRemoteNotifications unsafe impl NSApplication { @@ -417,6 +470,10 @@ extern_methods!( pub type NSServiceProviderName = NSString; +pub const NSRunStoppedResponse: i32 = -1000; +pub const NSRunAbortedResponse: i32 = -1001; +pub const NSRunContinuesResponse: i32 = -1002; + extern_methods!( /// NSDeprecated unsafe impl NSApplication { diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index 5ca9104fd..d1fe669e8 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -5,8 +5,28 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSWritingDirectionFormatType = NSInteger; +pub const NSWritingDirectionEmbedding: NSWritingDirectionFormatType = 0; +pub const NSWritingDirectionOverride: NSWritingDirectionFormatType = 2; + pub type NSTextEffectStyle = NSString; +pub type NSSpellingState = NSInteger; +pub const NSSpellingStateSpellingFlag: NSSpellingState = 1; +pub const NSSpellingStateGrammarFlag: NSSpellingState = 2; + extern_methods!( /// NSAttributedStringAttributeFixing unsafe impl NSMutableAttributedString { @@ -28,6 +48,10 @@ pub type NSAttributedStringDocumentType = NSString; pub type NSTextLayoutSectionKey = NSString; +pub type NSTextScalingType = NSInteger; +pub const NSTextScalingStandard: NSTextScalingType = 0; +pub const NSTextScalingiOS: NSTextScalingType = 1; + pub type NSAttributedStringDocumentAttributeKey = NSString; pub type NSAttributedStringDocumentReadingOptionKey = NSString; @@ -321,6 +345,9 @@ extern_methods!( } ); +pub const NSNoUnderlineStyle: i32 = 0; +pub const NSSingleUnderlineStyle: i32 = 1; + extern_methods!( /// NSDeprecatedKitAdditions unsafe impl NSAttributedString { diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index d9e85a1a9..084c75d95 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -5,6 +5,26 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSLineCapStyle = NSUInteger; +pub const NSLineCapStyleButt: NSLineCapStyle = 0; +pub const NSLineCapStyleRound: NSLineCapStyle = 1; +pub const NSLineCapStyleSquare: NSLineCapStyle = 2; + +pub type NSLineJoinStyle = NSUInteger; +pub const NSLineJoinStyleMiter: NSLineJoinStyle = 0; +pub const NSLineJoinStyleRound: NSLineJoinStyle = 1; +pub const NSLineJoinStyleBevel: NSLineJoinStyle = 2; + +pub type NSWindingRule = NSUInteger; +pub const NSWindingRuleNonZero: NSWindingRule = 0; +pub const NSWindingRuleEvenOdd: NSWindingRule = 1; + +pub type NSBezierPathElement = NSUInteger; +pub const NSBezierPathElementMoveTo: NSBezierPathElement = 0; +pub const NSBezierPathElementLineTo: NSBezierPathElement = 1; +pub const NSBezierPathElementCurveTo: NSBezierPathElement = 2; +pub const NSBezierPathElementClosePath: NSBezierPathElement = 3; + extern_class!( #[derive(Debug)] pub struct NSBezierPath; diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index f7cace228..82546b659 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -5,6 +5,41 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTIFFCompression = NSUInteger; +pub const NSTIFFCompressionNone: NSTIFFCompression = 1; +pub const NSTIFFCompressionCCITTFAX3: NSTIFFCompression = 3; +pub const NSTIFFCompressionCCITTFAX4: NSTIFFCompression = 4; +pub const NSTIFFCompressionLZW: NSTIFFCompression = 5; +pub const NSTIFFCompressionJPEG: NSTIFFCompression = 6; +pub const NSTIFFCompressionNEXT: NSTIFFCompression = 32766; +pub const NSTIFFCompressionPackBits: NSTIFFCompression = 32773; +pub const NSTIFFCompressionOldJPEG: NSTIFFCompression = 32865; + +pub type NSBitmapImageFileType = NSUInteger; +pub const NSBitmapImageFileTypeTIFF: NSBitmapImageFileType = 0; +pub const NSBitmapImageFileTypeBMP: NSBitmapImageFileType = 1; +pub const NSBitmapImageFileTypeGIF: NSBitmapImageFileType = 2; +pub const NSBitmapImageFileTypeJPEG: NSBitmapImageFileType = 3; +pub const NSBitmapImageFileTypePNG: NSBitmapImageFileType = 4; +pub const NSBitmapImageFileTypeJPEG2000: NSBitmapImageFileType = 5; + +pub type NSImageRepLoadStatus = NSInteger; +pub const NSImageRepLoadStatusUnknownType: NSImageRepLoadStatus = -1; +pub const NSImageRepLoadStatusReadingHeader: NSImageRepLoadStatus = -2; +pub const NSImageRepLoadStatusWillNeedAllData: NSImageRepLoadStatus = -3; +pub const NSImageRepLoadStatusInvalidData: NSImageRepLoadStatus = -4; +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 type NSBitmapImageRepPropertyKey = NSString; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSBox.rs b/crates/icrate/src/generated/AppKit/NSBox.rs index ad41f8ef3..7c5472bb5 100644 --- a/crates/icrate/src/generated/AppKit/NSBox.rs +++ b/crates/icrate/src/generated/AppKit/NSBox.rs @@ -5,6 +5,20 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTitlePosition = NSUInteger; +pub const NSNoTitle: NSTitlePosition = 0; +pub const NSAboveTop: NSTitlePosition = 1; +pub const NSAtTop: NSTitlePosition = 2; +pub const NSBelowTop: NSTitlePosition = 3; +pub const NSAboveBottom: NSTitlePosition = 4; +pub const NSAtBottom: NSTitlePosition = 5; +pub const NSBelowBottom: NSTitlePosition = 6; + +pub type NSBoxType = NSUInteger; +pub const NSBoxPrimary: NSBoxType = 0; +pub const NSBoxSeparator: NSBoxType = 2; +pub const NSBoxCustom: NSBoxType = 4; + extern_class!( #[derive(Debug)] pub struct NSBox; diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index e02de949b..5c5c1ef00 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -7,6 +7,15 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSBrowserColumnsAutosaveName = NSString; +pub type NSBrowserColumnResizingType = NSUInteger; +pub const NSBrowserNoColumnResizing: NSBrowserColumnResizingType = 0; +pub const NSBrowserAutoColumnResizing: NSBrowserColumnResizingType = 1; +pub const NSBrowserUserColumnResizing: NSBrowserColumnResizingType = 2; + +pub type NSBrowserDropOperation = NSUInteger; +pub const NSBrowserDropOn: NSBrowserDropOperation = 0; +pub const NSBrowserDropAbove: NSBrowserDropOperation = 1; + extern_class!( #[derive(Debug)] pub struct NSBrowser; diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs index 30bdf286b..4332d846d 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -5,6 +5,33 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSButtonType = NSUInteger; +pub const NSButtonTypeMomentaryLight: NSButtonType = 0; +pub const NSButtonTypePushOnPushOff: NSButtonType = 1; +pub const NSButtonTypeToggle: NSButtonType = 2; +pub const NSButtonTypeSwitch: NSButtonType = 3; +pub const NSButtonTypeRadio: NSButtonType = 4; +pub const NSButtonTypeMomentaryChange: NSButtonType = 5; +pub const NSButtonTypeOnOff: NSButtonType = 6; +pub const NSButtonTypeMomentaryPushIn: NSButtonType = 7; +pub const NSButtonTypeAccelerator: NSButtonType = 8; +pub const NSButtonTypeMultiLevelAccelerator: NSButtonType = 9; + +pub type NSBezelStyle = NSUInteger; +pub const NSBezelStyleRounded: NSBezelStyle = 1; +pub const NSBezelStyleRegularSquare: NSBezelStyle = 2; +pub const NSBezelStyleDisclosure: NSBezelStyle = 5; +pub const NSBezelStyleShadowlessSquare: NSBezelStyle = 6; +pub const NSBezelStyleCircular: NSBezelStyle = 7; +pub const NSBezelStyleTexturedSquare: NSBezelStyle = 8; +pub const NSBezelStyleHelpButton: NSBezelStyle = 9; +pub const NSBezelStyleSmallSquare: NSBezelStyle = 10; +pub const NSBezelStyleTexturedRounded: NSBezelStyle = 11; +pub const NSBezelStyleRoundRect: NSBezelStyle = 12; +pub const NSBezelStyleRecessed: NSBezelStyle = 13; +pub const NSBezelStyleRoundedDisclosure: NSBezelStyle = 14; +pub const NSBezelStyleInline: NSBezelStyle = 15; + extern_class!( #[derive(Debug)] pub struct NSButtonCell; @@ -182,6 +209,13 @@ extern_methods!( } ); +pub type NSGradientType = NSUInteger; +pub const NSGradientNone: NSGradientType = 0; +pub const NSGradientConcaveWeak: NSGradientType = 1; +pub const NSGradientConcaveStrong: NSGradientType = 2; +pub const NSGradientConvexWeak: NSGradientType = 3; +pub const NSGradientConvexStrong: NSGradientType = 4; + extern_methods!( /// NSDeprecated unsafe impl NSButtonCell { diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index 9b2f1f54a..5db28f75e 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -5,8 +5,71 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSCellType = NSUInteger; +pub const NSNullCellType: NSCellType = 0; +pub const NSTextCellType: NSCellType = 1; +pub const NSImageCellType: NSCellType = 2; + +pub type NSCellAttribute = NSUInteger; +pub const NSCellDisabled: NSCellAttribute = 0; +pub const NSCellState: NSCellAttribute = 1; +pub const NSPushInCell: NSCellAttribute = 2; +pub const NSCellEditable: NSCellAttribute = 3; +pub const NSChangeGrayCell: NSCellAttribute = 4; +pub const NSCellHighlighted: NSCellAttribute = 5; +pub const NSCellLightsByContents: NSCellAttribute = 6; +pub const NSCellLightsByGray: NSCellAttribute = 7; +pub const NSChangeBackgroundCell: NSCellAttribute = 8; +pub const NSCellLightsByBackground: NSCellAttribute = 9; +pub const NSCellIsBordered: NSCellAttribute = 10; +pub const NSCellHasOverlappingImage: NSCellAttribute = 11; +pub const NSCellHasImageHorizontal: NSCellAttribute = 12; +pub const NSCellHasImageOnLeftOrBottom: NSCellAttribute = 13; +pub const NSCellChangesContents: NSCellAttribute = 14; +pub const NSCellIsInsetButton: NSCellAttribute = 15; +pub const NSCellAllowsMixedState: NSCellAttribute = 16; + +pub type NSCellImagePosition = NSUInteger; +pub const NSNoImage: NSCellImagePosition = 0; +pub const NSImageOnly: NSCellImagePosition = 1; +pub const NSImageLeft: NSCellImagePosition = 2; +pub const NSImageRight: NSCellImagePosition = 3; +pub const NSImageBelow: NSCellImagePosition = 4; +pub const NSImageAbove: NSCellImagePosition = 5; +pub const NSImageOverlaps: NSCellImagePosition = 6; +pub const NSImageLeading: NSCellImagePosition = 7; +pub const NSImageTrailing: NSCellImagePosition = 8; + +pub type NSImageScaling = NSUInteger; +pub const NSImageScaleProportionallyDown: NSImageScaling = 0; +pub const NSImageScaleAxesIndependently: NSImageScaling = 1; +pub const NSImageScaleNone: NSImageScaling = 2; +pub const NSImageScaleProportionallyUpOrDown: NSImageScaling = 3; +pub const NSScaleProportionally: NSImageScaling = 0; +pub const NSScaleToFit: NSImageScaling = 1; +pub const NSScaleNone: NSImageScaling = 2; + pub type NSControlStateValue = NSInteger; +pub type NSCellStyleMask = NSUInteger; +pub const NSNoCellMask: NSCellStyleMask = 0; +pub const NSContentsCellMask: NSCellStyleMask = 1; +pub const NSPushInCellMask: NSCellStyleMask = 2; +pub const NSChangeGrayCellMask: NSCellStyleMask = 4; +pub const NSChangeBackgroundCellMask: NSCellStyleMask = 8; + +pub type NSControlTint = NSUInteger; +pub const NSDefaultControlTint: NSControlTint = 0; +pub const NSBlueControlTint: NSControlTint = 1; +pub const NSGraphiteControlTint: NSControlTint = 6; +pub const NSClearControlTint: NSControlTint = 7; + +pub type NSControlSize = NSUInteger; +pub const NSControlSizeRegular: NSControlSize = 0; +pub const NSControlSizeSmall: NSControlSize = 1; +pub const NSControlSizeMini: NSControlSize = 2; +pub const NSControlSizeLarge: NSControlSize = 3; + extern_class!( #[derive(Debug)] pub struct NSCell; @@ -518,6 +581,12 @@ 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; + extern_methods!( /// NSCellHitTest unsafe impl NSCell { @@ -546,6 +615,12 @@ extern_methods!( } ); +pub type NSBackgroundStyle = NSInteger; +pub const NSBackgroundStyleNormal: NSBackgroundStyle = 0; +pub const NSBackgroundStyleEmphasized: NSBackgroundStyle = 1; +pub const NSBackgroundStyleRaised: NSBackgroundStyle = 2; +pub const NSBackgroundStyleLowered: NSBackgroundStyle = 3; + extern_methods!( /// NSCellBackgroundStyle unsafe impl NSCell { @@ -601,3 +676,11 @@ extern_methods!( ); pub type NSCellStateValue = NSControlStateValue; + +pub const NSAnyType: i32 = 0; +pub const NSIntType: i32 = 1; +pub const NSPositiveIntType: i32 = 2; +pub const NSFloatType: i32 = 3; +pub const NSPositiveFloatType: i32 = 4; +pub const NSDoubleType: i32 = 6; +pub const NSPositiveDoubleType: i32 = 7; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs index ae47825f7..c34c57954 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionView.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionView.rs @@ -5,6 +5,29 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSCollectionViewDropOperation = NSInteger; +pub const NSCollectionViewDropOn: NSCollectionViewDropOperation = 0; +pub const NSCollectionViewDropBefore: NSCollectionViewDropOperation = 1; + +pub type NSCollectionViewItemHighlightState = NSInteger; +pub const NSCollectionViewItemHighlightNone: NSCollectionViewItemHighlightState = 0; +pub const NSCollectionViewItemHighlightForSelection: NSCollectionViewItemHighlightState = 1; +pub const NSCollectionViewItemHighlightForDeselection: NSCollectionViewItemHighlightState = 2; +pub const NSCollectionViewItemHighlightAsDropTarget: NSCollectionViewItemHighlightState = 3; + +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 type NSCollectionViewSupplementaryElementKind = NSString; pub type NSCollectionViewElement = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 855e42091..255dcba34 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -5,6 +5,25 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSRectAlignment = NSInteger; +pub const NSRectAlignmentNone: NSRectAlignment = 0; +pub const NSRectAlignmentTop: NSRectAlignment = 1; +pub const NSRectAlignmentTopLeading: NSRectAlignment = 2; +pub const NSRectAlignmentLeading: NSRectAlignment = 3; +pub const NSRectAlignmentBottomLeading: NSRectAlignment = 4; +pub const NSRectAlignmentBottom: NSRectAlignment = 5; +pub const NSRectAlignmentBottomTrailing: NSRectAlignment = 6; +pub const NSRectAlignmentTrailing: NSRectAlignment = 7; +pub const NSRectAlignmentTopTrailing: NSRectAlignment = 8; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewCompositionalLayoutConfiguration; @@ -97,6 +116,20 @@ extern_methods!( } ); +pub type NSCollectionLayoutSectionOrthogonalScrollingBehavior = NSInteger; +pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorNone: + NSCollectionLayoutSectionOrthogonalScrollingBehavior = 0; +pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuous: + NSCollectionLayoutSectionOrthogonalScrollingBehavior = 1; +pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary: + NSCollectionLayoutSectionOrthogonalScrollingBehavior = 2; +pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging: + NSCollectionLayoutSectionOrthogonalScrollingBehavior = 3; +pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging: + NSCollectionLayoutSectionOrthogonalScrollingBehavior = 4; +pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered: + NSCollectionLayoutSectionOrthogonalScrollingBehavior = 5; + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutSection; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs index e19838b64..70eaa1522 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSCollectionViewScrollDirection = NSInteger; +pub const NSCollectionViewScrollDirectionVertical: NSCollectionViewScrollDirection = 0; +pub const NSCollectionViewScrollDirectionHorizontal: NSCollectionViewScrollDirection = 1; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewFlowLayoutInvalidationContext; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs index 65ef919f9..5d9bf1ccc 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSCollectionElementCategory = NSInteger; +pub const NSCollectionElementCategoryItem: NSCollectionElementCategory = 0; +pub const NSCollectionElementCategorySupplementaryView: NSCollectionElementCategory = 1; +pub const NSCollectionElementCategoryDecorationView: NSCollectionElementCategory = 2; +pub const NSCollectionElementCategoryInterItemGap: NSCollectionElementCategory = 3; + pub type NSCollectionViewDecorationElementKind = NSString; extern_class!( @@ -84,6 +90,13 @@ extern_methods!( } ); +pub type NSCollectionUpdateAction = NSInteger; +pub const NSCollectionUpdateActionInsert: NSCollectionUpdateAction = 0; +pub const NSCollectionUpdateActionDelete: NSCollectionUpdateAction = 1; +pub const NSCollectionUpdateActionReload: NSCollectionUpdateAction = 2; +pub const NSCollectionUpdateActionMove: NSCollectionUpdateAction = 3; +pub const NSCollectionUpdateActionNone: NSCollectionUpdateAction = 4; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewUpdateItem; diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index e9536d3ba..0fb2e98b0 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -5,6 +5,18 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSColorType = NSInteger; +pub const NSColorTypeComponentBased: NSColorType = 0; +pub const NSColorTypePattern: NSColorType = 1; +pub const NSColorTypeCatalog: NSColorType = 2; + +pub type NSColorSystemEffect = NSInteger; +pub const NSColorSystemEffectNone: NSColorSystemEffect = 0; +pub const NSColorSystemEffectPressed: NSColorSystemEffect = 1; +pub const NSColorSystemEffectDeepPressed: NSColorSystemEffect = 2; +pub const NSColorSystemEffectDisabled: NSColorSystemEffect = 3; +pub const NSColorSystemEffectRollover: NSColorSystemEffect = 4; + extern_class!( #[derive(Debug)] pub struct NSColor; diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index 9ebc90f69..57710de2e 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -5,6 +5,28 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSColorPanelMode = NSInteger; +pub const NSColorPanelModeNone: NSColorPanelMode = -1; +pub const NSColorPanelModeGray: NSColorPanelMode = 0; +pub const NSColorPanelModeRGB: NSColorPanelMode = 1; +pub const NSColorPanelModeCMYK: NSColorPanelMode = 2; +pub const NSColorPanelModeHSB: NSColorPanelMode = 3; +pub const NSColorPanelModeCustomPalette: NSColorPanelMode = 4; +pub const NSColorPanelModeColorList: NSColorPanelMode = 5; +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; + extern_class!( #[derive(Debug)] pub struct NSColorPanel; diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index d60c9373e..28da1da00 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSColorSpaceModel = NSInteger; +pub const NSColorSpaceModelUnknown: NSColorSpaceModel = -1; +pub const NSColorSpaceModelGray: NSColorSpaceModel = 0; +pub const NSColorSpaceModelRGB: NSColorSpaceModel = 1; +pub const NSColorSpaceModelCMYK: NSColorSpaceModel = 2; +pub const NSColorSpaceModelLAB: NSColorSpaceModel = 3; +pub const NSColorSpaceModelDeviceN: NSColorSpaceModel = 4; +pub const NSColorSpaceModelIndexed: NSColorSpaceModel = 5; +pub const NSColorSpaceModelPatterned: NSColorSpaceModel = 6; + extern_class!( #[derive(Debug)] pub struct NSColorSpace; diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index d73e0890b..942309986 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -5,6 +5,23 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSDatePickerStyle = NSUInteger; +pub const NSDatePickerStyleTextFieldAndStepper: NSDatePickerStyle = 0; +pub const NSDatePickerStyleClockAndCalendar: NSDatePickerStyle = 1; +pub const NSDatePickerStyleTextField: NSDatePickerStyle = 2; + +pub type NSDatePickerMode = NSUInteger; +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; + extern_class!( #[derive(Debug)] pub struct NSDatePickerCell; diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index d6ef6d051..b89a10aca 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -5,6 +5,24 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSDocumentChangeType = NSUInteger; +pub const NSChangeDone: NSDocumentChangeType = 0; +pub const NSChangeUndone: NSDocumentChangeType = 1; +pub const NSChangeRedone: NSDocumentChangeType = 5; +pub const NSChangeCleared: NSDocumentChangeType = 2; +pub const NSChangeReadOtherContents: NSDocumentChangeType = 3; +pub const NSChangeAutosaved: NSDocumentChangeType = 4; +pub const NSChangeDiscardable: NSDocumentChangeType = 256; + +pub type NSSaveOperationType = NSUInteger; +pub const NSSaveOperation: NSSaveOperationType = 0; +pub const NSSaveAsOperation: NSSaveOperationType = 1; +pub const NSSaveToOperation: NSSaveOperationType = 2; +pub const NSAutosaveInPlaceOperation: NSSaveOperationType = 4; +pub const NSAutosaveElsewhereOperation: NSSaveOperationType = 3; +pub const NSAutosaveAsOperation: NSSaveOperationType = 5; +pub const NSAutosaveOperation: NSSaveOperationType = 3; + extern_class!( #[derive(Debug)] pub struct NSDocument; diff --git a/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs index 0d1f4f700..0355a29c7 100644 --- a/crates/icrate/src/generated/AppKit/NSDragging.rs +++ b/crates/icrate/src/generated/AppKit/NSDragging.rs @@ -5,12 +5,51 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSDragOperation = NSUInteger; +pub const NSDragOperationNone: NSDragOperation = 0; +pub const NSDragOperationCopy: NSDragOperation = 1; +pub const NSDragOperationLink: NSDragOperation = 2; +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 NSDragOperationAll_Obsolete: NSDragOperation = 15; +pub const NSDragOperationAll: NSDragOperation = 15; + +pub type NSDraggingFormation = NSInteger; +pub const NSDraggingFormationDefault: NSDraggingFormation = 0; +pub const NSDraggingFormationNone: NSDraggingFormation = 1; +pub const NSDraggingFormationPile: NSDraggingFormation = 2; +pub const NSDraggingFormationList: NSDraggingFormation = 3; +pub const NSDraggingFormationStack: NSDraggingFormation = 4; + +pub type NSDraggingContext = NSInteger; +pub const NSDraggingContextOutsideApplication: NSDraggingContext = 0; +pub const NSDraggingContextWithinApplication: NSDraggingContext = 1; + +pub type NSDraggingItemEnumerationOptions = NSUInteger; +pub const NSDraggingItemEnumerationConcurrent: NSDraggingItemEnumerationOptions = 1; +pub const NSDraggingItemEnumerationClearNonenumeratedImages: NSDraggingItemEnumerationOptions = + 65536; + +pub type NSSpringLoadingHighlight = NSInteger; +pub const NSSpringLoadingHighlightNone: NSSpringLoadingHighlight = 0; +pub const NSSpringLoadingHighlightStandard: NSSpringLoadingHighlight = 1; +pub const NSSpringLoadingHighlightEmphasized: NSSpringLoadingHighlight = 2; + pub type NSDraggingInfo = NSObject; pub type NSDraggingDestination = NSObject; 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 type NSSpringLoadingDestination = NSObject; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index 6fb40e116..84e7f6e96 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSDrawerState = NSUInteger; +pub const NSDrawerClosedState: NSDrawerState = 0; +pub const NSDrawerOpeningState: NSDrawerState = 1; +pub const NSDrawerOpenState: NSDrawerState = 2; +pub const NSDrawerClosingState: NSDrawerState = 3; + extern_class!( #[derive(Debug)] pub struct NSDrawer; diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 9da445f5f..940146ceb 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -5,6 +5,139 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSEventType = NSUInteger; +pub const NSEventTypeLeftMouseDown: NSEventType = 1; +pub const NSEventTypeLeftMouseUp: NSEventType = 2; +pub const NSEventTypeRightMouseDown: NSEventType = 3; +pub const NSEventTypeRightMouseUp: NSEventType = 4; +pub const NSEventTypeMouseMoved: NSEventType = 5; +pub const NSEventTypeLeftMouseDragged: NSEventType = 6; +pub const NSEventTypeRightMouseDragged: NSEventType = 7; +pub const NSEventTypeMouseEntered: NSEventType = 8; +pub const NSEventTypeMouseExited: NSEventType = 9; +pub const NSEventTypeKeyDown: NSEventType = 10; +pub const NSEventTypeKeyUp: NSEventType = 11; +pub const NSEventTypeFlagsChanged: NSEventType = 12; +pub const NSEventTypeAppKitDefined: NSEventType = 13; +pub const NSEventTypeSystemDefined: NSEventType = 14; +pub const NSEventTypeApplicationDefined: NSEventType = 15; +pub const NSEventTypePeriodic: NSEventType = 16; +pub const NSEventTypeCursorUpdate: NSEventType = 17; +pub const NSEventTypeScrollWheel: NSEventType = 22; +pub const NSEventTypeTabletPoint: NSEventType = 23; +pub const NSEventTypeTabletProximity: NSEventType = 24; +pub const NSEventTypeOtherMouseDown: NSEventType = 25; +pub const NSEventTypeOtherMouseUp: NSEventType = 26; +pub const NSEventTypeOtherMouseDragged: NSEventType = 27; +pub const NSEventTypeGesture: NSEventType = 29; +pub const NSEventTypeMagnify: NSEventType = 30; +pub const NSEventTypeSwipe: NSEventType = 31; +pub const NSEventTypeRotate: NSEventType = 18; +pub const NSEventTypeBeginGesture: NSEventType = 19; +pub const NSEventTypeEndGesture: NSEventType = 20; +pub const NSEventTypeSmartMagnify: NSEventType = 32; +pub const NSEventTypeQuickLook: NSEventType = 33; +pub const NSEventTypePressure: NSEventType = 34; +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 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 type NSPointingDeviceType = NSUInteger; +pub const NSPointingDeviceTypeUnknown: NSPointingDeviceType = 0; +pub const NSPointingDeviceTypePen: NSPointingDeviceType = 1; +pub const NSPointingDeviceTypeCursor: NSPointingDeviceType = 2; +pub const NSPointingDeviceTypeEraser: NSPointingDeviceType = 3; + +pub type NSEventButtonMask = NSUInteger; +pub const NSEventButtonMaskPenTip: NSEventButtonMask = 1; +pub const NSEventButtonMaskPenLowerSide: NSEventButtonMask = 2; +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 type NSEventGestureAxis = NSInteger; +pub const NSEventGestureAxisNone: NSEventGestureAxis = 0; +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 type NSEventSubtype = c_short; +pub const NSEventSubtypeWindowExposed: NSEventSubtype = 0; +pub const NSEventSubtypeApplicationActivated: NSEventSubtype = 1; +pub const NSEventSubtypeApplicationDeactivated: NSEventSubtype = 2; +pub const NSEventSubtypeWindowMoved: NSEventSubtype = 4; +pub const NSEventSubtypeScreenChanged: NSEventSubtype = 8; +pub const NSEventSubtypePowerOff: NSEventSubtype = 1; +pub const NSEventSubtypeMouseEvent: NSEventSubtype = 0; +pub const NSEventSubtypeTabletPoint: NSEventSubtype = 1; +pub const NSEventSubtypeTabletProximity: NSEventSubtype = 2; +pub const NSEventSubtypeTouch: NSEventSubtype = 3; + +pub type NSPressureBehavior = NSInteger; +pub const NSPressureBehaviorUnknown: NSPressureBehavior = -1; +pub const NSPressureBehaviorPrimaryDefault: NSPressureBehavior = 0; +pub const NSPressureBehaviorPrimaryClick: NSPressureBehavior = 1; +pub const NSPressureBehaviorPrimaryGeneric: NSPressureBehavior = 2; +pub const NSPressureBehaviorPrimaryAccelerator: NSPressureBehavior = 3; +pub const NSPressureBehaviorPrimaryDeepClick: NSPressureBehavior = 5; +pub const NSPressureBehaviorPrimaryDeepDrag: NSPressureBehavior = 6; + extern_class!( #[derive(Debug)] pub struct NSEvent; @@ -329,3 +462,76 @@ extern_methods!( pub unsafe fn removeMonitor(eventMonitor: &Object); } ); + +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; diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 30b0253c6..1aa65ab68 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -214,6 +214,18 @@ extern_methods!( } ); +pub const NSControlGlyph: i32 = 16777215; +pub const NSNullGlyph: i32 = 0; + +pub type NSFontRenderingMode = NSUInteger; +pub const NSFontDefaultRenderingMode: NSFontRenderingMode = 0; +pub const NSFontAntialiasedRenderingMode: NSFontRenderingMode = 1; +pub const NSFontIntegerAdvancementsRenderingMode: NSFontRenderingMode = 2; +pub const NSFontAntialiasedIntegerAdvancementsRenderingMode: NSFontRenderingMode = 3; + +pub type NSMultibyteGlyphPacking = NSUInteger; +pub const NSNativeShortGlyphPacking: NSMultibyteGlyphPacking = 5; + extern_methods!( /// NSFont_Deprecated unsafe impl NSFont { diff --git a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs index 7505f3631..e426bc6b2 100644 --- a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs +++ b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs @@ -5,6 +5,9 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSFontAssetRequestOptions = NSUInteger; +pub const NSFontAssetRequestOptionUsesStandardUI: NSFontAssetRequestOptions = 1; + extern_class!( #[derive(Debug)] pub struct NSFontAssetRequest; diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index 9b7b4710e..4ce306005 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/NSFontCollection.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSFontCollectionMatchingOptionKey = NSString; pub type NSFontCollectionName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 8cff3d732..70f6661f8 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -7,6 +7,30 @@ 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 type NSFontDescriptorAttributeName = NSString; pub type NSFontDescriptorTraitKey = NSString; @@ -141,6 +165,14 @@ extern_methods!( pub type NSFontFamilyClass = u32; +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; + extern_methods!( /// NSFontDescriptor_TextStyles unsafe impl NSFontDescriptor { diff --git a/crates/icrate/src/generated/AppKit/NSFontManager.rs b/crates/icrate/src/generated/AppKit/NSFontManager.rs index cbd5069c8..eb0440547 100644 --- a/crates/icrate/src/generated/AppKit/NSFontManager.rs +++ b/crates/icrate/src/generated/AppKit/NSFontManager.rs @@ -5,6 +5,33 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSFontCollectionOptions = NSUInteger; +pub const NSFontCollectionApplicationOnlyMask: NSFontCollectionOptions = 1; + +pub type NSFontAction = NSUInteger; +pub const NSNoFontChangeAction: NSFontAction = 0; +pub const NSViaPanelFontAction: NSFontAction = 1; +pub const NSAddTraitFontAction: NSFontAction = 2; +pub const NSSizeUpFontAction: NSFontAction = 3; +pub const NSSizeDownFontAction: NSFontAction = 4; +pub const NSHeavierFontAction: NSFontAction = 5; +pub const NSLighterFontAction: NSFontAction = 6; +pub const NSRemoveTraitFontAction: NSFontAction = 7; + extern_class!( #[derive(Debug)] pub struct NSFontManager; diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index f4d6f5309..1d1032634 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -5,6 +5,19 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSFontChanging = NSObject; extern_methods!( @@ -61,3 +74,11 @@ extern_methods!( pub unsafe fn reloadDefaultFontFamilies(&self); } ); + +pub const NSFPPreviewButton: i32 = 131; +pub const NSFPRevertButton: i32 = 130; +pub const NSFPSetButton: i32 = 132; +pub const NSFPPreviewField: i32 = 128; +pub const NSFPSizeField: i32 = 129; +pub const NSFPSizeTitle: i32 = 133; +pub const NSFPCurrentField: i32 = 134; diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index 661ea035d..f911e6713 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -5,6 +5,15 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSGestureRecognizerState = NSInteger; +pub const NSGestureRecognizerStatePossible: NSGestureRecognizerState = 0; +pub const NSGestureRecognizerStateBegan: NSGestureRecognizerState = 1; +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; + extern_class!( #[derive(Debug)] pub struct NSGestureRecognizer; diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index 60debd295..8fc07e065 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs @@ -5,6 +5,10 @@ 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 type NSGlyphStorage = NSObject; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs index d18bcd62f..238ea057f 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs @@ -31,6 +31,14 @@ extern_methods!( } ); +pub type NSCharacterCollection = NSUInteger; +pub const NSIdentityMappingCharacterCollection: NSCharacterCollection = 0; +pub const NSAdobeCNS1CharacterCollection: NSCharacterCollection = 1; +pub const NSAdobeGB1CharacterCollection: NSCharacterCollection = 2; +pub const NSAdobeJapan1CharacterCollection: NSCharacterCollection = 3; +pub const NSAdobeJapan2CharacterCollection: NSCharacterCollection = 4; +pub const NSAdobeKorea1CharacterCollection: NSCharacterCollection = 5; + extern_methods!( /// NSGlyphInfo_Deprecated unsafe impl NSGlyphInfo { diff --git a/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index 025464976..3814a7582 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/NSGradient.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSGradientDrawingOptions = NSUInteger; +pub const NSGradientDrawsBeforeStartingLocation: NSGradientDrawingOptions = 1; +pub const NSGradientDrawsAfterEndingLocation: NSGradientDrawingOptions = 2; + extern_class!( #[derive(Debug)] pub struct NSGradient; diff --git a/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs index 6e83f727a..ee5b56e65 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphics.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphics.rs @@ -5,6 +5,77 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSCompositingOperation = NSUInteger; +pub const NSCompositingOperationClear: NSCompositingOperation = 0; +pub const NSCompositingOperationCopy: NSCompositingOperation = 1; +pub const NSCompositingOperationSourceOver: NSCompositingOperation = 2; +pub const NSCompositingOperationSourceIn: NSCompositingOperation = 3; +pub const NSCompositingOperationSourceOut: NSCompositingOperation = 4; +pub const NSCompositingOperationSourceAtop: NSCompositingOperation = 5; +pub const NSCompositingOperationDestinationOver: NSCompositingOperation = 6; +pub const NSCompositingOperationDestinationIn: NSCompositingOperation = 7; +pub const NSCompositingOperationDestinationOut: NSCompositingOperation = 8; +pub const NSCompositingOperationDestinationAtop: NSCompositingOperation = 9; +pub const NSCompositingOperationXOR: NSCompositingOperation = 10; +pub const NSCompositingOperationPlusDarker: NSCompositingOperation = 11; +pub const NSCompositingOperationHighlight: NSCompositingOperation = 12; +pub const NSCompositingOperationPlusLighter: NSCompositingOperation = 13; +pub const NSCompositingOperationMultiply: NSCompositingOperation = 14; +pub const NSCompositingOperationScreen: NSCompositingOperation = 15; +pub const NSCompositingOperationOverlay: NSCompositingOperation = 16; +pub const NSCompositingOperationDarken: NSCompositingOperation = 17; +pub const NSCompositingOperationLighten: NSCompositingOperation = 18; +pub const NSCompositingOperationColorDodge: NSCompositingOperation = 19; +pub const NSCompositingOperationColorBurn: NSCompositingOperation = 20; +pub const NSCompositingOperationSoftLight: NSCompositingOperation = 21; +pub const NSCompositingOperationHardLight: NSCompositingOperation = 22; +pub const NSCompositingOperationDifference: NSCompositingOperation = 23; +pub const NSCompositingOperationExclusion: NSCompositingOperation = 24; +pub const NSCompositingOperationHue: NSCompositingOperation = 25; +pub const NSCompositingOperationSaturation: NSCompositingOperation = 26; +pub const NSCompositingOperationColor: NSCompositingOperation = 27; +pub const NSCompositingOperationLuminosity: NSCompositingOperation = 28; + +pub type NSBackingStoreType = NSUInteger; +pub const NSBackingStoreRetained: NSBackingStoreType = 0; +pub const NSBackingStoreNonretained: NSBackingStoreType = 1; +pub const NSBackingStoreBuffered: NSBackingStoreType = 2; + +pub type NSWindowOrderingMode = NSInteger; +pub const NSWindowAbove: NSWindowOrderingMode = 1; +pub const NSWindowBelow: NSWindowOrderingMode = -1; +pub const NSWindowOut: NSWindowOrderingMode = 0; + +pub type NSFocusRingPlacement = NSUInteger; +pub const NSFocusRingOnly: NSFocusRingPlacement = 0; +pub const NSFocusRingBelow: NSFocusRingPlacement = 1; +pub const NSFocusRingAbove: NSFocusRingPlacement = 2; + +pub type NSFocusRingType = NSUInteger; +pub const NSFocusRingTypeDefault: NSFocusRingType = 0; +pub const NSFocusRingTypeNone: NSFocusRingType = 1; +pub const NSFocusRingTypeExterior: NSFocusRingType = 2; + +pub type NSColorRenderingIntent = NSInteger; +pub const NSColorRenderingIntentDefault: NSColorRenderingIntent = 0; +pub const NSColorRenderingIntentAbsoluteColorimetric: NSColorRenderingIntent = 1; +pub const NSColorRenderingIntentRelativeColorimetric: NSColorRenderingIntent = 2; +pub const NSColorRenderingIntentPerceptual: NSColorRenderingIntent = 3; +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 type NSDisplayGamut = NSInteger; +pub const NSDisplayGamutSRGB: NSDisplayGamut = 1; +pub const NSDisplayGamutP3: NSDisplayGamut = 2; + pub type NSDeviceDescriptionKey = NSString; + +pub type NSAnimationEffect = NSUInteger; +pub const NSAnimationEffectDisappearingItemDefault: NSAnimationEffect = 0; +pub const NSAnimationEffectPoof: NSAnimationEffect = 10; diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index 14aa50979..e48d6e37a 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -9,6 +9,13 @@ pub type NSGraphicsContextAttributeKey = NSString; pub type NSGraphicsContextRepresentationFormatName = NSString; +pub type NSImageInterpolation = NSUInteger; +pub const NSImageInterpolationDefault: NSImageInterpolation = 0; +pub const NSImageInterpolationNone: NSImageInterpolation = 1; +pub const NSImageInterpolationLow: NSImageInterpolation = 2; +pub const NSImageInterpolationMedium: NSImageInterpolation = 4; +pub const NSImageInterpolationHigh: NSImageInterpolation = 3; + extern_class!( #[derive(Debug)] pub struct NSGraphicsContext; diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index 82b468264..76e8a14c6 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -5,6 +5,22 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +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 NSGridCellPlacementTrailing: NSGridCellPlacement = 3; +pub const NSGridCellPlacementBottom: NSGridCellPlacement = 3; +pub const NSGridCellPlacementCenter: NSGridCellPlacement = 4; +pub const NSGridCellPlacementFill: NSGridCellPlacement = 5; + +pub type NSGridRowAlignment = NSInteger; +pub const NSGridRowAlignmentInherited: NSGridRowAlignment = 0; +pub const NSGridRowAlignmentNone: NSGridRowAlignment = 1; +pub const NSGridRowAlignmentFirstBaseline: NSGridRowAlignment = 2; +pub const NSGridRowAlignmentLastBaseline: NSGridRowAlignment = 3; + extern_class!( #[derive(Debug)] pub struct NSGridView; diff --git a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs index 77d5fa014..e0dd8a2d1 100644 --- a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs +++ b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSHapticFeedbackPattern = NSInteger; +pub const NSHapticFeedbackPatternGeneric: NSHapticFeedbackPattern = 0; +pub const NSHapticFeedbackPatternAlignment: NSHapticFeedbackPattern = 1; +pub const NSHapticFeedbackPatternLevelChange: NSHapticFeedbackPattern = 2; + +pub type NSHapticFeedbackPerformanceTime = NSUInteger; +pub const NSHapticFeedbackPerformanceTimeDefault: NSHapticFeedbackPerformanceTime = 0; +pub const NSHapticFeedbackPerformanceTimeNow: NSHapticFeedbackPerformanceTime = 1; +pub const NSHapticFeedbackPerformanceTimeDrawCompleted: NSHapticFeedbackPerformanceTime = 2; + pub type NSHapticFeedbackPerformer = NSObject; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index 8bbfc862e..088a0bcb8 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -7,6 +7,23 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSImageName = NSString; +pub type NSImageLoadStatus = NSUInteger; +pub const NSImageLoadStatusCompleted: NSImageLoadStatus = 0; +pub const NSImageLoadStatusCancelled: NSImageLoadStatus = 1; +pub const NSImageLoadStatusInvalidData: NSImageLoadStatus = 2; +pub const NSImageLoadStatusUnexpectedEOF: NSImageLoadStatus = 3; +pub const NSImageLoadStatusReadError: NSImageLoadStatus = 4; + +pub type NSImageCacheMode = NSUInteger; +pub const NSImageCacheDefault: NSImageCacheMode = 0; +pub const NSImageCacheAlways: NSImageCacheMode = 1; +pub const NSImageCacheBySize: NSImageCacheMode = 2; +pub const NSImageCacheNever: NSImageCacheMode = 3; + +pub type NSImageResizingMode = NSInteger; +pub const NSImageResizingModeStretch: NSImageResizingMode = 0; +pub const NSImageResizingModeTile: NSImageResizingMode = 1; + extern_class!( #[derive(Debug)] pub struct NSImage; @@ -419,6 +436,11 @@ extern_methods!( } ); +pub type NSImageSymbolScale = NSInteger; +pub const NSImageSymbolScaleSmall: NSImageSymbolScale = 1; +pub const NSImageSymbolScaleMedium: NSImageSymbolScale = 2; +pub const NSImageSymbolScaleLarge: NSImageSymbolScale = 3; + extern_class!( #[derive(Debug)] pub struct NSImageSymbolConfiguration; diff --git a/crates/icrate/src/generated/AppKit/NSImageCell.rs b/crates/icrate/src/generated/AppKit/NSImageCell.rs index 6a2460bb1..73f553b77 100644 --- a/crates/icrate/src/generated/AppKit/NSImageCell.rs +++ b/crates/icrate/src/generated/AppKit/NSImageCell.rs @@ -5,6 +5,24 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSImageAlignment = NSUInteger; +pub const NSImageAlignCenter: NSImageAlignment = 0; +pub const NSImageAlignTop: NSImageAlignment = 1; +pub const NSImageAlignTopLeft: NSImageAlignment = 2; +pub const NSImageAlignTopRight: NSImageAlignment = 3; +pub const NSImageAlignLeft: NSImageAlignment = 4; +pub const NSImageAlignBottom: NSImageAlignment = 5; +pub const NSImageAlignBottomLeft: NSImageAlignment = 6; +pub const NSImageAlignBottomRight: NSImageAlignment = 7; +pub const NSImageAlignRight: NSImageAlignment = 8; + +pub type NSImageFrameStyle = NSUInteger; +pub const NSImageFrameNone: NSImageFrameStyle = 0; +pub const NSImageFramePhoto: NSImageFrameStyle = 1; +pub const NSImageFrameGrayBezel: NSImageFrameStyle = 2; +pub const NSImageFrameGroove: NSImageFrameStyle = 3; +pub const NSImageFrameButton: NSImageFrameStyle = 4; + extern_class!( #[derive(Debug)] pub struct NSImageCell; diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index 7b83350ea..6af78cd63 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -7,6 +7,13 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSImageHintKey = NSString; +pub const NSImageRepMatchesDevice: i32 = 0; + +pub type NSImageLayoutDirection = NSInteger; +pub const NSImageLayoutDirectionUnspecified: NSImageLayoutDirection = -1; +pub const NSImageLayoutDirectionLeftToRight: NSImageLayoutDirection = 2; +pub const NSImageLayoutDirectionRightToLeft: NSImageLayoutDirection = 3; + extern_class!( #[derive(Debug)] pub struct NSImageRep; diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs index 454c87364..804f4a3ae 100644 --- a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub const NSNoInterfaceStyle: i32 = 0; +pub const NSNextStepInterfaceStyle: i32 = 1; +pub const NSWindows95InterfaceStyle: i32 = 2; +pub const NSMacintoshInterfaceStyle: i32 = 3; + pub type NSInterfaceStyle = NSUInteger; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index 365b103e0..7dbfef008 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -5,6 +5,49 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSLayoutConstraintOrientation = NSInteger; +pub const NSLayoutConstraintOrientationHorizontal: NSLayoutConstraintOrientation = 0; +pub const NSLayoutConstraintOrientationVertical: NSLayoutConstraintOrientation = 1; + +pub type NSLayoutRelation = NSInteger; +pub const NSLayoutRelationLessThanOrEqual: NSLayoutRelation = -1; +pub const NSLayoutRelationEqual: NSLayoutRelation = 0; +pub const NSLayoutRelationGreaterThanOrEqual: NSLayoutRelation = 1; + +pub type NSLayoutAttribute = NSInteger; +pub const NSLayoutAttributeLeft: NSLayoutAttribute = 1; +pub const NSLayoutAttributeRight: NSLayoutAttribute = 2; +pub const NSLayoutAttributeTop: NSLayoutAttribute = 3; +pub const NSLayoutAttributeBottom: NSLayoutAttribute = 4; +pub const NSLayoutAttributeLeading: NSLayoutAttribute = 5; +pub const NSLayoutAttributeTrailing: NSLayoutAttribute = 6; +pub const NSLayoutAttributeWidth: NSLayoutAttribute = 7; +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 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; + extern_class!( #[derive(Debug)] pub struct NSLayoutConstraint; diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index b5ee3e291..4358c3fe5 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -5,8 +5,34 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextLayoutOrientation = NSInteger; +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 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 type NSTextLayoutOrientationProvider = NSObject; +pub type NSTypesetterBehavior = NSInteger; +pub const NSTypesetterLatestBehavior: NSTypesetterBehavior = -1; +pub const NSTypesetterOriginalBehavior: NSTypesetterBehavior = 0; +pub const NSTypesetterBehavior_10_2_WithCompatibility: NSTypesetterBehavior = 1; +pub const NSTypesetterBehavior_10_2: NSTypesetterBehavior = 2; +pub const NSTypesetterBehavior_10_3: NSTypesetterBehavior = 3; +pub const NSTypesetterBehavior_10_4: NSTypesetterBehavior = 4; + extern_class!( #[derive(Debug)] pub struct NSLayoutManager; @@ -700,6 +726,18 @@ extern_methods!( pub type NSLayoutManagerDelegate = NSObject; +pub const NSGlyphAttributeSoft: i32 = 0; +pub const NSGlyphAttributeElastic: i32 = 1; +pub const NSGlyphAttributeBidiLevel: i32 = 2; +pub const NSGlyphAttributeInscribe: i32 = 5; + +pub type NSGlyphInscription = NSUInteger; +pub const NSGlyphInscribeBase: NSGlyphInscription = 0; +pub const NSGlyphInscribeBelow: NSGlyphInscription = 1; +pub const NSGlyphInscribeAbove: NSGlyphInscription = 2; +pub const NSGlyphInscribeOverstrike: NSGlyphInscription = 3; +pub const NSGlyphInscribeOverBelow: NSGlyphInscription = 4; + extern_methods!( /// NSLayoutManagerDeprecated unsafe impl NSLayoutManager { diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs index 334af3c39..24d306e65 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSLevelIndicatorPlaceholderVisibility = NSInteger; +pub const NSLevelIndicatorPlaceholderVisibilityAutomatic: NSLevelIndicatorPlaceholderVisibility = 0; +pub const NSLevelIndicatorPlaceholderVisibilityAlways: NSLevelIndicatorPlaceholderVisibility = 1; +pub const NSLevelIndicatorPlaceholderVisibilityWhileEditing: NSLevelIndicatorPlaceholderVisibility = + 2; + extern_class!( #[derive(Debug)] pub struct NSLevelIndicator; diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs index bae75ac41..8c1f6b1d1 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSLevelIndicatorStyle = NSUInteger; +pub const NSLevelIndicatorStyleRelevancy: NSLevelIndicatorStyle = 0; +pub const NSLevelIndicatorStyleContinuousCapacity: NSLevelIndicatorStyle = 1; +pub const NSLevelIndicatorStyleDiscreteCapacity: NSLevelIndicatorStyle = 2; +pub const NSLevelIndicatorStyleRating: NSLevelIndicatorStyle = 3; + extern_class!( #[derive(Debug)] pub struct NSLevelIndicatorCell; diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index 761889d4f..58dda0431 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSMatrixMode = NSUInteger; +pub const NSRadioModeMatrix: NSMatrixMode = 0; +pub const NSHighlightModeMatrix: NSMatrixMode = 1; +pub const NSListModeMatrix: NSMatrixMode = 2; +pub const NSTrackModeMatrix: NSMatrixMode = 3; + extern_class!( #[derive(Debug)] pub struct NSMatrix; diff --git a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs index 35bc18dc3..908ddce8c 100644 --- a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs +++ b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSMediaLibraryBrowserController; diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 2caa308f9..2c16b0ca5 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -233,6 +233,14 @@ 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; + extern_methods!( /// NSMenuPropertiesToUpdate unsafe impl NSMenu { diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index 8216c4f0d..d0a5f93a1 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -5,8 +5,59 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSOpenGLGlobalOption = u32; +pub const NSOpenGLGOFormatCacheSize: NSOpenGLGlobalOption = 501; +pub const NSOpenGLGOClearFormatCache: NSOpenGLGlobalOption = 502; +pub const NSOpenGLGORetainRenderers: NSOpenGLGlobalOption = 503; +pub const NSOpenGLGOUseBuildCache: NSOpenGLGlobalOption = 506; +pub const NSOpenGLGOResetLibrary: NSOpenGLGlobalOption = 504; + +pub const NSOpenGLPFAAllRenderers: i32 = 1; +pub const NSOpenGLPFATripleBuffer: i32 = 3; +pub const NSOpenGLPFADoubleBuffer: i32 = 5; +pub const NSOpenGLPFAAuxBuffers: i32 = 7; +pub const NSOpenGLPFAColorSize: i32 = 8; +pub const NSOpenGLPFAAlphaSize: i32 = 11; +pub const NSOpenGLPFADepthSize: i32 = 12; +pub const NSOpenGLPFAStencilSize: i32 = 13; +pub const NSOpenGLPFAAccumSize: i32 = 14; +pub const NSOpenGLPFAMinimumPolicy: i32 = 51; +pub const NSOpenGLPFAMaximumPolicy: i32 = 52; +pub const NSOpenGLPFASampleBuffers: i32 = 55; +pub const NSOpenGLPFASamples: i32 = 56; +pub const NSOpenGLPFAAuxDepthStencil: i32 = 57; +pub const NSOpenGLPFAColorFloat: i32 = 58; +pub const NSOpenGLPFAMultisample: i32 = 59; +pub const NSOpenGLPFASupersample: i32 = 60; +pub const NSOpenGLPFASampleAlpha: i32 = 61; +pub const NSOpenGLPFARendererID: i32 = 70; +pub const NSOpenGLPFANoRecovery: i32 = 72; +pub const NSOpenGLPFAAccelerated: i32 = 73; +pub const NSOpenGLPFAClosestPolicy: i32 = 74; +pub const NSOpenGLPFABackingStore: i32 = 76; +pub const NSOpenGLPFAScreenMask: i32 = 84; +pub const NSOpenGLPFAAllowOfflineRenderers: i32 = 96; +pub const NSOpenGLPFAAcceleratedCompute: i32 = 97; +pub const NSOpenGLPFAOpenGLProfile: i32 = 99; +pub const NSOpenGLPFAVirtualScreenCount: i32 = 128; +pub const NSOpenGLPFAStereo: i32 = 6; +pub const NSOpenGLPFAOffScreen: i32 = 53; +pub const NSOpenGLPFAFullScreen: i32 = 54; +pub const NSOpenGLPFASingleRenderer: i32 = 71; +pub const NSOpenGLPFARobust: i32 = 75; +pub const NSOpenGLPFAMPSafe: i32 = 78; +pub const NSOpenGLPFAWindow: i32 = 80; +pub const NSOpenGLPFAMultiScreen: i32 = 81; +pub const NSOpenGLPFACompliant: i32 = 83; +pub const NSOpenGLPFAPixelBuffer: i32 = 90; +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; + extern_class!( #[derive(Debug)] pub struct NSOpenGLPixelFormat; @@ -102,6 +153,23 @@ extern_methods!( } ); +pub type NSOpenGLContextParameter = NSInteger; +pub const NSOpenGLContextParameterSwapInterval: NSOpenGLContextParameter = 222; +pub const NSOpenGLContextParameterSurfaceOrder: NSOpenGLContextParameter = 235; +pub const NSOpenGLContextParameterSurfaceOpacity: NSOpenGLContextParameter = 236; +pub const NSOpenGLContextParameterSurfaceBackingSize: NSOpenGLContextParameter = 304; +pub const NSOpenGLContextParameterReclaimResources: NSOpenGLContextParameter = 308; +pub const NSOpenGLContextParameterCurrentRendererID: NSOpenGLContextParameter = 309; +pub const NSOpenGLContextParameterGPUVertexProcessing: NSOpenGLContextParameter = 310; +pub const NSOpenGLContextParameterGPUFragmentProcessing: NSOpenGLContextParameter = 311; +pub const NSOpenGLContextParameterHasDrawable: NSOpenGLContextParameter = 314; +pub const NSOpenGLContextParameterMPSwapsInFlight: NSOpenGLContextParameter = 315; +pub const NSOpenGLContextParameterSwapRectangle: NSOpenGLContextParameter = 200; +pub const NSOpenGLContextParameterSwapRectangleEnable: NSOpenGLContextParameter = 201; +pub const NSOpenGLContextParameterRasterizationEnable: NSOpenGLContextParameter = 221; +pub const NSOpenGLContextParameterStateValidation: NSOpenGLContextParameter = 301; +pub const NSOpenGLContextParameterSurfaceSurfaceVolatile: NSOpenGLContextParameter = 306; + extern_class!( #[derive(Debug)] pub struct NSOpenGLContext; diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index 76c58230c..92a9f0ac3 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -5,6 +5,8 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub const NSOutlineViewDropOnItemIndex: i32 = -1; + extern_class!( #[derive(Debug)] pub struct NSOutlineView; diff --git a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs index 1a6d095a8..2969675af 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSPDFPanel; diff --git a/crates/icrate/src/generated/AppKit/NSPageController.rs b/crates/icrate/src/generated/AppKit/NSPageController.rs index 8da5436e3..57e3e173c 100644 --- a/crates/icrate/src/generated/AppKit/NSPageController.rs +++ b/crates/icrate/src/generated/AppKit/NSPageController.rs @@ -7,6 +7,11 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSPageControllerObjectIdentifier = NSString; +pub type NSPageControllerTransitionStyle = NSInteger; +pub const NSPageControllerTransitionStyleStackHistory: NSPageControllerTransitionStyle = 0; +pub const NSPageControllerTransitionStyleStackBook: NSPageControllerTransitionStyle = 1; +pub const NSPageControllerTransitionStyleHorizontalStrip: NSPageControllerTransitionStyle = 2; + extern_class!( #[derive(Debug)] pub struct NSPageController; diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index a5b9656dd..1e4a1512d 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -35,3 +35,6 @@ extern_methods!( pub unsafe fn setWorksWhenModal(&self, worksWhenModal: bool); } ); + +pub const NSOKButton: i32 = 1; +pub const NSCancelButton: i32 = 0; diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index 38e427ab6..95081220d 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -5,6 +5,20 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSLineBreakMode = NSUInteger; +pub const NSLineBreakByWordWrapping: NSLineBreakMode = 0; +pub const NSLineBreakByCharWrapping: NSLineBreakMode = 1; +pub const NSLineBreakByClipping: NSLineBreakMode = 2; +pub const NSLineBreakByTruncatingHead: NSLineBreakMode = 3; +pub const NSLineBreakByTruncatingTail: NSLineBreakMode = 4; +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 type NSTextTabOptionKey = NSString; extern_class!( @@ -289,6 +303,12 @@ extern_methods!( } ); +pub type NSTextTabType = NSUInteger; +pub const NSLeftTabStopType: NSTextTabType = 0; +pub const NSRightTabStopType: NSTextTabType = 1; +pub const NSCenterTabStopType: NSTextTabType = 2; +pub const NSDecimalTabStopType: NSTextTabType = 3; + extern_methods!( /// NSTextTabDeprecated unsafe impl NSTextTab { diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index 1179f08ef..3487f566c 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -9,6 +9,9 @@ pub type NSPasteboardType = NSString; pub type NSPasteboardName = NSString; +pub type NSPasteboardContentsOptions = NSUInteger; +pub const NSPasteboardContentsCurrentHostOnly: NSPasteboardContentsOptions = 1; + pub type NSPasteboardReadingOptionKey = NSString; extern_class!( @@ -179,8 +182,17 @@ extern_methods!( } ); +pub type NSPasteboardWritingOptions = NSUInteger; +pub const NSPasteboardWritingPromised: NSPasteboardWritingOptions = 512; + 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 type NSPasteboardReading = NSObject; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs index 7403d700a..d77f4540d 100644 --- a/crates/icrate/src/generated/AppKit/NSPathCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPathStyle = NSInteger; +pub const NSPathStyleStandard: NSPathStyle = 0; +pub const NSPathStylePopUp: NSPathStyle = 2; +pub const NSPathStyleNavigationBar: NSPathStyle = 1; + extern_class!( #[derive(Debug)] pub struct NSPathCell; diff --git a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs index d0539ed69..8b9655c79 100644 --- a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs @@ -5,6 +5,19 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPickerTouchBarItemSelectionMode = NSInteger; +pub const NSPickerTouchBarItemSelectionModeSelectOne: NSPickerTouchBarItemSelectionMode = 0; +pub const NSPickerTouchBarItemSelectionModeSelectAny: NSPickerTouchBarItemSelectionMode = 1; +pub const NSPickerTouchBarItemSelectionModeMomentary: NSPickerTouchBarItemSelectionMode = 2; + +pub type NSPickerTouchBarItemControlRepresentation = NSInteger; +pub const NSPickerTouchBarItemControlRepresentationAutomatic: + NSPickerTouchBarItemControlRepresentation = 0; +pub const NSPickerTouchBarItemControlRepresentationExpanded: + NSPickerTouchBarItemControlRepresentation = 1; +pub const NSPickerTouchBarItemControlRepresentationCollapsed: + NSPickerTouchBarItemControlRepresentation = 2; + extern_class!( #[derive(Debug)] pub struct NSPickerTouchBarItem; diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index 8bbcb63bc..c1f5a4ee6 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPopUpArrowPosition = NSUInteger; +pub const NSPopUpNoArrow: NSPopUpArrowPosition = 0; +pub const NSPopUpArrowAtCenter: NSPopUpArrowPosition = 1; +pub const NSPopUpArrowAtBottom: NSPopUpArrowPosition = 2; + extern_class!( #[derive(Debug)] pub struct NSPopUpButtonCell; diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index c89ef839c..15b0e8d51 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -5,6 +5,15 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPopoverAppearance = NSInteger; +pub const NSPopoverAppearanceMinimal: NSPopoverAppearance = 0; +pub const NSPopoverAppearanceHUD: NSPopoverAppearance = 1; + +pub type NSPopoverBehavior = NSInteger; +pub const NSPopoverBehaviorApplicationDefined: NSPopoverBehavior = 0; +pub const NSPopoverBehaviorTransient: NSPopoverBehavior = 1; +pub const NSPopoverBehaviorSemitransient: NSPopoverBehavior = 2; + extern_class!( #[derive(Debug)] pub struct NSPopover; diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs index 08ebd1dad..28555fc83 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -5,6 +5,15 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPaperOrientation = NSInteger; +pub const NSPaperOrientationPortrait: NSPaperOrientation = 0; +pub const NSPaperOrientationLandscape: NSPaperOrientation = 1; + +pub type NSPrintingPaginationMode = NSUInteger; +pub const NSPrintingPaginationModeAutomatic: NSPrintingPaginationMode = 0; +pub const NSPrintingPaginationModeFit: NSPrintingPaginationMode = 1; +pub const NSPrintingPaginationModeClip: NSPrintingPaginationMode = 2; + pub type NSPrintInfoAttributeKey = NSString; pub type NSPrintJobDispositionValue = NSString; @@ -185,3 +194,7 @@ extern_methods!( pub unsafe fn sizeForPaperName(name: Option<&NSPrinterPaperName>) -> NSSize; } ); + +pub type NSPrintingOrientation = NSUInteger; +pub const NSPortraitOrientation: NSPrintingOrientation = 0; +pub const NSLandscapeOrientation: NSPrintingOrientation = 1; diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs index 6166fa6f3..e27183c80 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPrintingPageOrder = NSInteger; +pub const NSDescendingPageOrder: NSPrintingPageOrder = -1; +pub const NSSpecialPageOrder: NSPrintingPageOrder = 0; +pub const NSAscendingPageOrder: NSPrintingPageOrder = 1; +pub const NSUnknownPageOrder: NSPrintingPageOrder = 2; + +pub type NSPrintRenderingQuality = NSInteger; +pub const NSPrintRenderingQualityBest: NSPrintRenderingQuality = 0; +pub const NSPrintRenderingQualityResponsive: NSPrintRenderingQuality = 1; + extern_class!( #[derive(Debug)] pub struct NSPrintOperation; diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index 410c176ec..16b446cdc 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSPrintPanelJobStyleHint = NSString; pub type NSPrintPanelAccessorySummaryKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSPrinter.rs b/crates/icrate/src/generated/AppKit/NSPrinter.rs index 8294732a0..a9a4cb34e 100644 --- a/crates/icrate/src/generated/AppKit/NSPrinter.rs +++ b/crates/icrate/src/generated/AppKit/NSPrinter.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPrinterTableStatus = NSUInteger; +pub const NSPrinterTableOK: NSPrinterTableStatus = 0; +pub const NSPrinterTableNotFound: NSPrinterTableStatus = 1; +pub const NSPrinterTableError: NSPrinterTableStatus = 2; + pub type NSPrinterTypeName = NSString; pub type NSPrinterPaperName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs index 9345714c3..f7b99d107 100644 --- a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSProgressIndicatorStyle = NSUInteger; +pub const NSProgressIndicatorStyleBar: NSProgressIndicatorStyle = 0; +pub const NSProgressIndicatorStyleSpinning: NSProgressIndicatorStyle = 1; + extern_class!( #[derive(Debug)] pub struct NSProgressIndicator; @@ -90,6 +94,12 @@ extern_methods!( } ); +pub type NSProgressIndicatorThickness = NSUInteger; +pub const NSProgressIndicatorPreferredThickness: NSProgressIndicatorThickness = 14; +pub const NSProgressIndicatorPreferredSmallThickness: NSProgressIndicatorThickness = 10; +pub const NSProgressIndicatorPreferredLargeThickness: NSProgressIndicatorThickness = 18; +pub const NSProgressIndicatorPreferredAquaThickness: NSProgressIndicatorThickness = 12; + extern_methods!( /// NSProgressIndicatorDeprecated unsafe impl NSProgressIndicator { diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index 01bae959b..6302cedd3 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -7,6 +7,16 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSRuleEditorPredicatePartKey = NSString; +pub type NSRuleEditorNestingMode = NSUInteger; +pub const NSRuleEditorNestingModeSingle: NSRuleEditorNestingMode = 0; +pub const NSRuleEditorNestingModeList: NSRuleEditorNestingMode = 1; +pub const NSRuleEditorNestingModeCompound: NSRuleEditorNestingMode = 2; +pub const NSRuleEditorNestingModeSimple: NSRuleEditorNestingMode = 3; + +pub type NSRuleEditorRowType = NSUInteger; +pub const NSRuleEditorRowTypeSimple: NSRuleEditorRowType = 0; +pub const NSRuleEditorRowTypeCompound: NSRuleEditorRowType = 1; + extern_class!( #[derive(Debug)] pub struct NSRuleEditor; diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs index 488a5d948..f57472f9c 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerView.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSRulerOrientation = NSUInteger; +pub const NSHorizontalRuler: NSRulerOrientation = 0; +pub const NSVerticalRuler: NSRulerOrientation = 1; + pub type NSRulerViewUnitName = NSString; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs index a7b41f115..db1c35972 100644 --- a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs @@ -5,6 +5,15 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSApplicationActivationOptions = NSUInteger; +pub const NSApplicationActivateAllWindows: NSApplicationActivationOptions = 1; +pub const NSApplicationActivateIgnoringOtherApps: NSApplicationActivationOptions = 2; + +pub type NSApplicationActivationPolicy = NSInteger; +pub const NSApplicationActivationPolicyRegular: NSApplicationActivationPolicy = 0; +pub const NSApplicationActivationPolicyAccessory: NSApplicationActivationPolicy = 1; +pub const NSApplicationActivationPolicyProhibited: NSApplicationActivationPolicy = 2; + extern_class!( #[derive(Debug)] pub struct NSRunningApplication; diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index 2bcba9fff..cdcbf817f 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -5,6 +5,9 @@ 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; + extern_class!( #[derive(Debug)] pub struct NSSavePanel; diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index 178d712c4..2e3fe765e 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSScrollElasticity = NSInteger; +pub const NSScrollElasticityAutomatic: NSScrollElasticity = 0; +pub const NSScrollElasticityNone: NSScrollElasticity = 1; +pub const NSScrollElasticityAllowed: NSScrollElasticity = 2; + extern_class!( #[derive(Debug)] pub struct NSScrollView; @@ -321,6 +326,11 @@ extern_methods!( } ); +pub type NSScrollViewFindBarPosition = NSInteger; +pub const NSScrollViewFindBarPositionAboveHorizontalRuler: NSScrollViewFindBarPosition = 0; +pub const NSScrollViewFindBarPositionAboveContent: NSScrollViewFindBarPosition = 1; +pub const NSScrollViewFindBarPositionBelowContent: NSScrollViewFindBarPosition = 2; + extern_methods!( /// NSFindBarSupport unsafe impl NSScrollView { diff --git a/crates/icrate/src/generated/AppKit/NSScroller.rs b/crates/icrate/src/generated/AppKit/NSScroller.rs index 7d1d81dfe..a3410d018 100644 --- a/crates/icrate/src/generated/AppKit/NSScroller.rs +++ b/crates/icrate/src/generated/AppKit/NSScroller.rs @@ -5,6 +5,29 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSUsableScrollerParts = NSUInteger; +pub const NSNoScrollerParts: NSUsableScrollerParts = 0; +pub const NSOnlyScrollerArrows: NSUsableScrollerParts = 1; +pub const NSAllScrollerParts: NSUsableScrollerParts = 2; + +pub type NSScrollerPart = NSUInteger; +pub const NSScrollerNoPart: NSScrollerPart = 0; +pub const NSScrollerDecrementPage: NSScrollerPart = 1; +pub const NSScrollerKnob: NSScrollerPart = 2; +pub const NSScrollerIncrementPage: NSScrollerPart = 3; +pub const NSScrollerDecrementLine: NSScrollerPart = 4; +pub const NSScrollerIncrementLine: NSScrollerPart = 5; +pub const NSScrollerKnobSlot: NSScrollerPart = 6; + +pub type NSScrollerStyle = NSInteger; +pub const NSScrollerStyleLegacy: NSScrollerStyle = 0; +pub const NSScrollerStyleOverlay: NSScrollerStyle = 1; + +pub type NSScrollerKnobStyle = NSInteger; +pub const NSScrollerKnobStyleDefault: NSScrollerKnobStyle = 0; +pub const NSScrollerKnobStyleDark: NSScrollerKnobStyle = 1; +pub const NSScrollerKnobStyleLight: NSScrollerKnobStyle = 2; + extern_class!( #[derive(Debug)] pub struct NSScroller; @@ -78,6 +101,16 @@ extern_methods!( } ); +pub type NSScrollArrowPosition = NSUInteger; +pub const NSScrollerArrowsMaxEnd: NSScrollArrowPosition = 0; +pub const NSScrollerArrowsMinEnd: NSScrollArrowPosition = 1; +pub const NSScrollerArrowsDefaultSetting: NSScrollArrowPosition = 0; +pub const NSScrollerArrowsNone: NSScrollArrowPosition = 2; + +pub type NSScrollerArrow = NSUInteger; +pub const NSScrollerIncrementArrow: NSScrollerArrow = 0; +pub const NSScrollerDecrementArrow: NSScrollerArrow = 1; + extern_methods!( /// NSDeprecated unsafe impl NSScroller { diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs index 1ad8af4ac..121957881 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubber.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -9,6 +9,16 @@ pub type NSScrubberDataSource = NSObject; pub type NSScrubberDelegate = NSObject; +pub type NSScrubberMode = NSInteger; +pub const NSScrubberModeFixed: NSScrubberMode = 0; +pub const NSScrubberModeFree: NSScrubberMode = 1; + +pub type NSScrubberAlignment = NSInteger; +pub const NSScrubberAlignmentNone: NSScrubberAlignment = 0; +pub const NSScrubberAlignmentLeading: NSScrubberAlignment = 1; +pub const NSScrubberAlignmentTrailing: NSScrubberAlignment = 2; +pub const NSScrubberAlignmentCenter: NSScrubberAlignment = 3; + extern_class!( #[derive(Debug)] pub struct NSScrubberSelectionStyle; diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs index 41cb6131b..68023fc94 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs @@ -5,6 +5,28 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSSegmentSwitchTracking = NSUInteger; +pub const NSSegmentSwitchTrackingSelectOne: NSSegmentSwitchTracking = 0; +pub const NSSegmentSwitchTrackingSelectAny: NSSegmentSwitchTracking = 1; +pub const NSSegmentSwitchTrackingMomentary: NSSegmentSwitchTracking = 2; +pub const NSSegmentSwitchTrackingMomentaryAccelerator: NSSegmentSwitchTracking = 3; + +pub type NSSegmentStyle = NSInteger; +pub const NSSegmentStyleAutomatic: NSSegmentStyle = 0; +pub const NSSegmentStyleRounded: NSSegmentStyle = 1; +pub const NSSegmentStyleRoundRect: NSSegmentStyle = 3; +pub const NSSegmentStyleTexturedSquare: NSSegmentStyle = 4; +pub const NSSegmentStyleSmallSquare: NSSegmentStyle = 6; +pub const NSSegmentStyleSeparated: NSSegmentStyle = 8; +pub const NSSegmentStyleTexturedRounded: NSSegmentStyle = 2; +pub const NSSegmentStyleCapsule: NSSegmentStyle = 5; + +pub type NSSegmentDistribution = NSInteger; +pub const NSSegmentDistributionFit: NSSegmentDistribution = 0; +pub const NSSegmentDistributionFill: NSSegmentDistribution = 1; +pub const NSSegmentDistributionFillEqually: NSSegmentDistribution = 2; +pub const NSSegmentDistributionFillProportionally: NSSegmentDistribution = 3; + extern_class!( #[derive(Debug)] pub struct NSSegmentedControl; diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index 34a4b86d1..9f52cf230 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -93,8 +93,20 @@ extern_methods!( } ); +pub type NSSharingContentScope = NSInteger; +pub const NSSharingContentScopeItem: NSSharingContentScope = 0; +pub const NSSharingContentScopePartial: NSSharingContentScope = 1; +pub const NSSharingContentScopeFull: NSSharingContentScope = 2; + 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 type NSCloudSharingServiceDelegate = NSObject; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index 5230250fc..0204440b1 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSSliderType = NSUInteger; +pub const NSSliderTypeLinear: NSSliderType = 0; +pub const NSSliderTypeCircular: NSSliderType = 1; + extern_class!( #[derive(Debug)] pub struct NSSliderCell; diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index 14a3e2f04..8c861ac41 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -15,6 +15,11 @@ pub type NSVoiceGenderName = NSString; pub type NSSpeechPropertyKey = NSString; +pub type NSSpeechBoundary = NSUInteger; +pub const NSSpeechImmediateBoundary: NSSpeechBoundary = 0; +pub const NSSpeechWordBoundary: NSSpeechBoundary = 1; +pub const NSSpeechSentenceBoundary: NSSpeechBoundary = 2; + extern_class!( #[derive(Debug)] pub struct NSSpeechSynthesizer; diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index 9a5fcbbf3..fb004a2c3 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -7,6 +7,19 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextCheckingOptionKey = NSString; +pub type NSCorrectionResponse = NSInteger; +pub const NSCorrectionResponseNone: NSCorrectionResponse = 0; +pub const NSCorrectionResponseAccepted: NSCorrectionResponse = 1; +pub const NSCorrectionResponseRejected: NSCorrectionResponse = 2; +pub const NSCorrectionResponseIgnored: NSCorrectionResponse = 3; +pub const NSCorrectionResponseEdited: NSCorrectionResponse = 4; +pub const NSCorrectionResponseReverted: NSCorrectionResponse = 5; + +pub type NSCorrectionIndicatorType = NSInteger; +pub const NSCorrectionIndicatorTypeDefault: NSCorrectionIndicatorType = 0; +pub const NSCorrectionIndicatorTypeReversion: NSCorrectionIndicatorType = 1; +pub const NSCorrectionIndicatorTypeGuesses: NSCorrectionIndicatorType = 2; + extern_class!( #[derive(Debug)] pub struct NSSpellChecker; diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs index cb0418a83..73a6f1972 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitView.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -7,6 +7,11 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSSplitViewAutosaveName = NSString; +pub type NSSplitViewDividerStyle = NSInteger; +pub const NSSplitViewDividerStyleThick: NSSplitViewDividerStyle = 1; +pub const NSSplitViewDividerStyleThin: NSSplitViewDividerStyle = 2; +pub const NSSplitViewDividerStylePaneSplitter: NSSplitViewDividerStyle = 3; + extern_class!( #[derive(Debug)] pub struct NSSplitView; diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs index 883a5f4c9..614ee63c6 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs @@ -5,6 +5,19 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSSplitViewItemBehavior = NSInteger; +pub const NSSplitViewItemBehaviorDefault: NSSplitViewItemBehavior = 0; +pub const NSSplitViewItemBehaviorSidebar: NSSplitViewItemBehavior = 1; +pub const NSSplitViewItemBehaviorContentList: NSSplitViewItemBehavior = 2; + +pub type NSSplitViewItemCollapseBehavior = NSInteger; +pub const NSSplitViewItemCollapseBehaviorDefault: NSSplitViewItemCollapseBehavior = 0; +pub const NSSplitViewItemCollapseBehaviorPreferResizingSplitViewWithFixedSiblings: + NSSplitViewItemCollapseBehavior = 1; +pub const NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitView: + NSSplitViewItemCollapseBehavior = 2; +pub const NSSplitViewItemCollapseBehaviorUseConstraints: NSSplitViewItemCollapseBehavior = 3; + extern_class!( #[derive(Debug)] pub struct NSSplitViewItem; diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index 63aa03e2a..4cb714297 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -5,6 +5,21 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSStackViewGravity = NSInteger; +pub const NSStackViewGravityTop: NSStackViewGravity = 1; +pub const NSStackViewGravityLeading: NSStackViewGravity = 1; +pub const NSStackViewGravityCenter: NSStackViewGravity = 2; +pub const NSStackViewGravityBottom: NSStackViewGravity = 3; +pub const NSStackViewGravityTrailing: NSStackViewGravity = 3; + +pub type NSStackViewDistribution = NSInteger; +pub const NSStackViewDistributionGravityAreas: NSStackViewDistribution = -1; +pub const NSStackViewDistributionFill: NSStackViewDistribution = 0; +pub const NSStackViewDistributionFillEqually: NSStackViewDistribution = 1; +pub const NSStackViewDistributionFillProportionally: NSStackViewDistribution = 2; +pub const NSStackViewDistributionEqualSpacing: NSStackViewDistribution = 3; +pub const NSStackViewDistributionEqualCentering: NSStackViewDistribution = 4; + extern_class!( #[derive(Debug)] pub struct NSStackView; diff --git a/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs index 6f66c81f7..468a07859 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusItem.rs @@ -7,6 +7,10 @@ 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; + extern_class!( #[derive(Debug)] pub struct NSStatusItem; diff --git a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs index 522e9f9cf..39a514d11 100644 --- a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs +++ b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs @@ -69,6 +69,14 @@ 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; + extern_methods!( /// NSExtendedStringDrawing unsafe impl NSString { diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs index 49466a828..24316e4c3 100644 --- a/crates/icrate/src/generated/AppKit/NSTabView.rs +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -5,6 +5,27 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTabViewType = NSUInteger; +pub const NSTopTabsBezelBorder: NSTabViewType = 0; +pub const NSLeftTabsBezelBorder: NSTabViewType = 1; +pub const NSBottomTabsBezelBorder: NSTabViewType = 2; +pub const NSRightTabsBezelBorder: NSTabViewType = 3; +pub const NSNoTabsBezelBorder: NSTabViewType = 4; +pub const NSNoTabsLineBorder: NSTabViewType = 5; +pub const NSNoTabsNoBorder: NSTabViewType = 6; + +pub type NSTabPosition = NSUInteger; +pub const NSTabPositionNone: NSTabPosition = 0; +pub const NSTabPositionTop: NSTabPosition = 1; +pub const NSTabPositionLeft: NSTabPosition = 2; +pub const NSTabPositionBottom: NSTabPosition = 3; +pub const NSTabPositionRight: NSTabPosition = 4; + +pub type NSTabViewBorderType = NSUInteger; +pub const NSTabViewBorderTypeNone: NSTabViewBorderType = 0; +pub const NSTabViewBorderTypeLine: NSTabViewBorderType = 1; +pub const NSTabViewBorderTypeBezel: NSTabViewBorderType = 2; + extern_class!( #[derive(Debug)] pub struct NSTabView; diff --git a/crates/icrate/src/generated/AppKit/NSTabViewController.rs b/crates/icrate/src/generated/AppKit/NSTabViewController.rs index 81152901c..56403cda8 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewController.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTabViewControllerTabStyle = NSInteger; +pub const NSTabViewControllerTabStyleSegmentedControlOnTop: NSTabViewControllerTabStyle = 0; +pub const NSTabViewControllerTabStyleSegmentedControlOnBottom: NSTabViewControllerTabStyle = 1; +pub const NSTabViewControllerTabStyleToolbar: NSTabViewControllerTabStyle = 2; +pub const NSTabViewControllerTabStyleUnspecified: NSTabViewControllerTabStyle = -1; + extern_class!( #[derive(Debug)] pub struct NSTabViewController; diff --git a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs index ed0a1f2af..d632cd690 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTabState = NSUInteger; +pub const NSSelectedTab: NSTabState = 0; +pub const NSBackgroundTab: NSTabState = 1; +pub const NSPressedTab: NSTabState = 2; + extern_class!( #[derive(Debug)] pub struct NSTabViewItem; diff --git a/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs index cb0ae7274..2bb37791f 100644 --- a/crates/icrate/src/generated/AppKit/NSTableColumn.rs +++ b/crates/icrate/src/generated/AppKit/NSTableColumn.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSTableColumn; diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index a1e4751cc..3ebb6aa98 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -5,8 +5,69 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTableViewDropOperation = NSUInteger; +pub const NSTableViewDropOn: NSTableViewDropOperation = 0; +pub const NSTableViewDropAbove: NSTableViewDropOperation = 1; + +pub type NSTableViewColumnAutoresizingStyle = NSUInteger; +pub const NSTableViewNoColumnAutoresizing: NSTableViewColumnAutoresizingStyle = 0; +pub const NSTableViewUniformColumnAutoresizingStyle: NSTableViewColumnAutoresizingStyle = 1; +pub const NSTableViewSequentialColumnAutoresizingStyle: NSTableViewColumnAutoresizingStyle = 2; +pub const NSTableViewReverseSequentialColumnAutoresizingStyle: NSTableViewColumnAutoresizingStyle = + 3; +pub const NSTableViewLastColumnOnlyAutoresizingStyle: NSTableViewColumnAutoresizingStyle = 4; +pub const NSTableViewFirstColumnOnlyAutoresizingStyle: NSTableViewColumnAutoresizingStyle = 5; + +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 type NSTableViewRowSizeStyle = NSInteger; +pub const NSTableViewRowSizeStyleDefault: NSTableViewRowSizeStyle = -1; +pub const NSTableViewRowSizeStyleCustom: NSTableViewRowSizeStyle = 0; +pub const NSTableViewRowSizeStyleSmall: NSTableViewRowSizeStyle = 1; +pub const NSTableViewRowSizeStyleMedium: NSTableViewRowSizeStyle = 2; +pub const NSTableViewRowSizeStyleLarge: NSTableViewRowSizeStyle = 3; + +pub type NSTableViewStyle = NSInteger; +pub const NSTableViewStyleAutomatic: NSTableViewStyle = 0; +pub const NSTableViewStyleFullWidth: NSTableViewStyle = 1; +pub const NSTableViewStyleInset: NSTableViewStyle = 2; +pub const NSTableViewStyleSourceList: NSTableViewStyle = 3; +pub const NSTableViewStylePlain: NSTableViewStyle = 4; + +pub type NSTableViewSelectionHighlightStyle = NSInteger; +pub const NSTableViewSelectionHighlightStyleNone: NSTableViewSelectionHighlightStyle = -1; +pub const NSTableViewSelectionHighlightStyleRegular: NSTableViewSelectionHighlightStyle = 0; +pub const NSTableViewSelectionHighlightStyleSourceList: NSTableViewSelectionHighlightStyle = 1; + +pub type NSTableViewDraggingDestinationFeedbackStyle = NSInteger; +pub const NSTableViewDraggingDestinationFeedbackStyleNone: + NSTableViewDraggingDestinationFeedbackStyle = -1; +pub const NSTableViewDraggingDestinationFeedbackStyleRegular: + NSTableViewDraggingDestinationFeedbackStyle = 0; +pub const NSTableViewDraggingDestinationFeedbackStyleSourceList: + NSTableViewDraggingDestinationFeedbackStyle = 1; +pub const NSTableViewDraggingDestinationFeedbackStyleGap: + NSTableViewDraggingDestinationFeedbackStyle = 2; + +pub type NSTableRowActionEdge = NSInteger; +pub const NSTableRowActionEdgeLeading: NSTableRowActionEdge = 0; +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; + extern_class!( #[derive(Debug)] pub struct NSTableView; diff --git a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs index d2531345f..23bcd3187 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTableViewRowActionStyle = NSInteger; +pub const NSTableViewRowActionStyleRegular: NSTableViewRowActionStyle = 0; +pub const NSTableViewRowActionStyleDestructive: NSTableViewRowActionStyle = 1; + extern_class!( #[derive(Debug)] pub struct NSTableViewRowAction; diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index 53fad026c..74b80e047 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -5,6 +5,18 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextAlignment = NSInteger; +pub const NSTextAlignmentLeft: NSTextAlignment = 0; +pub const NSTextAlignmentRight: NSTextAlignment = 1; +pub const NSTextAlignmentCenter: NSTextAlignment = 2; +pub const NSTextAlignmentJustified: NSTextAlignment = 3; +pub const NSTextAlignmentNatural: NSTextAlignment = 4; + +pub type NSWritingDirection = NSInteger; +pub const NSWritingDirectionNatural: NSWritingDirection = -1; +pub const NSWritingDirectionLeftToRight: NSWritingDirection = 0; +pub const NSWritingDirectionRightToLeft: NSWritingDirection = 1; + extern_class!( #[derive(Debug)] pub struct NSText; @@ -234,4 +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 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 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 NSOtherTextMovement: i32 = 0; + pub type NSTextDelegate = NSObject; + +pub const NSTextWritingDirectionEmbedding: i32 = 0; +pub const NSTextWritingDirectionOverride: i32 = 2; diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index ac98038a3..3ed3d6dde 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -5,6 +5,8 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub const NSAttachmentCharacter: i32 = 65532; + pub type NSTextAttachmentContainer = NSObject; pub type NSTextAttachmentLayout = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs index a904c2a82..a05fc542b 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextInputTraitType = NSInteger; +pub const NSTextInputTraitTypeDefault: NSTextInputTraitType = 0; +pub const NSTextInputTraitTypeNo: NSTextInputTraitType = 1; +pub const NSTextInputTraitTypeYes: NSTextInputTraitType = 2; + pub type NSTextInputTraits = NSObject; pub type NSTextCheckingClient = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextContainer.rs b/crates/icrate/src/generated/AppKit/NSTextContainer.rs index a939e9ffd..00076adea 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContainer.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContainer.rs @@ -96,6 +96,19 @@ extern_methods!( } ); +pub type NSLineSweepDirection = NSUInteger; +pub const NSLineSweepLeft: NSLineSweepDirection = 0; +pub const NSLineSweepRight: NSLineSweepDirection = 1; +pub const NSLineSweepDown: NSLineSweepDirection = 2; +pub const NSLineSweepUp: NSLineSweepDirection = 3; + +pub type NSLineMovementDirection = NSUInteger; +pub const NSLineDoesntMove: NSLineMovementDirection = 0; +pub const NSLineMovesLeft: NSLineMovementDirection = 1; +pub const NSLineMovesRight: NSLineMovementDirection = 2; +pub const NSLineMovesDown: NSLineMovementDirection = 3; +pub const NSLineMovesUp: NSLineMovementDirection = 4; + extern_methods!( /// NSTextContainerDeprecated unsafe impl NSTextContainer { diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index 882751c45..f6ca14643 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextContentManagerEnumerationOptions = NSUInteger; +pub const NSTextContentManagerEnumerationOptionsNone: NSTextContentManagerEnumerationOptions = 0; +pub const NSTextContentManagerEnumerationOptionsReverse: NSTextContentManagerEnumerationOptions = 1; + pub type NSTextElementProvider = NSObject; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs index a2b1ea2b6..d8a66e217 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextFieldBezelStyle = NSUInteger; +pub const NSTextFieldSquareBezel: NSTextFieldBezelStyle = 0; +pub const NSTextFieldRoundedBezel: NSTextFieldBezelStyle = 1; + extern_class!( #[derive(Debug)] pub struct NSTextFieldCell; diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index 4c08f8613..a23e569a1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -5,8 +5,29 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextFinderAction = NSInteger; +pub const NSTextFinderActionShowFindInterface: NSTextFinderAction = 1; +pub const NSTextFinderActionNextMatch: NSTextFinderAction = 2; +pub const NSTextFinderActionPreviousMatch: NSTextFinderAction = 3; +pub const NSTextFinderActionReplaceAll: NSTextFinderAction = 4; +pub const NSTextFinderActionReplace: NSTextFinderAction = 5; +pub const NSTextFinderActionReplaceAndFind: NSTextFinderAction = 6; +pub const NSTextFinderActionSetSearchString: NSTextFinderAction = 7; +pub const NSTextFinderActionReplaceAllInSelection: NSTextFinderAction = 8; +pub const NSTextFinderActionSelectAll: NSTextFinderAction = 9; +pub const NSTextFinderActionSelectAllInSelection: NSTextFinderAction = 10; +pub const NSTextFinderActionHideFindInterface: NSTextFinderAction = 11; +pub const NSTextFinderActionShowReplaceInterface: NSTextFinderAction = 12; +pub const NSTextFinderActionHideReplaceInterface: NSTextFinderAction = 13; + pub type NSPasteboardTypeTextFinderOptionKey = NSString; +pub type NSTextFinderMatchingType = NSInteger; +pub const NSTextFinderMatchingTypeContains: NSTextFinderMatchingType = 0; +pub const NSTextFinderMatchingTypeStartsWith: NSTextFinderMatchingType = 1; +pub const NSTextFinderMatchingTypeFullWord: NSTextFinderMatchingType = 2; +pub const NSTextFinderMatchingTypeEndsWith: NSTextFinderMatchingType = 3; + extern_class!( #[derive(Debug)] pub struct NSTextFinder; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index 074ed49d3..c7c8f0b3b 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -5,6 +5,22 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextLayoutFragmentEnumerationOptions = NSUInteger; +pub const NSTextLayoutFragmentEnumerationOptionsNone: NSTextLayoutFragmentEnumerationOptions = 0; +pub const NSTextLayoutFragmentEnumerationOptionsReverse: NSTextLayoutFragmentEnumerationOptions = 1; +pub const NSTextLayoutFragmentEnumerationOptionsEstimatesSize: + NSTextLayoutFragmentEnumerationOptions = 2; +pub const NSTextLayoutFragmentEnumerationOptionsEnsuresLayout: + NSTextLayoutFragmentEnumerationOptions = 4; +pub const NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment: + NSTextLayoutFragmentEnumerationOptions = 8; + +pub type NSTextLayoutFragmentState = NSUInteger; +pub const NSTextLayoutFragmentStateNone: NSTextLayoutFragmentState = 0; +pub const NSTextLayoutFragmentStateEstimatedUsageBounds: NSTextLayoutFragmentState = 1; +pub const NSTextLayoutFragmentStateCalculatedUsageBounds: NSTextLayoutFragmentState = 2; +pub const NSTextLayoutFragmentStateLayoutAvailable: NSTextLayoutFragmentState = 3; + extern_class!( #[derive(Debug)] pub struct NSTextLayoutFragment; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index 231c428a7..16c513a5f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -5,6 +5,22 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextLayoutManagerSegmentType = NSInteger; +pub const NSTextLayoutManagerSegmentTypeStandard: NSTextLayoutManagerSegmentType = 0; +pub const NSTextLayoutManagerSegmentTypeSelection: NSTextLayoutManagerSegmentType = 1; +pub const NSTextLayoutManagerSegmentTypeHighlight: NSTextLayoutManagerSegmentType = 2; + +pub type NSTextLayoutManagerSegmentOptions = NSUInteger; +pub const NSTextLayoutManagerSegmentOptionsNone: NSTextLayoutManagerSegmentOptions = 0; +pub const NSTextLayoutManagerSegmentOptionsRangeNotRequired: NSTextLayoutManagerSegmentOptions = 1; +pub const NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded: + NSTextLayoutManagerSegmentOptions = 2; +pub const NSTextLayoutManagerSegmentOptionsHeadSegmentExtended: NSTextLayoutManagerSegmentOptions = + 4; +pub const NSTextLayoutManagerSegmentOptionsTailSegmentExtended: NSTextLayoutManagerSegmentOptions = + 8; +pub const NSTextLayoutManagerSegmentOptionsUpstreamAffinity: NSTextLayoutManagerSegmentOptions = 16; + extern_class!( #[derive(Debug)] pub struct NSTextLayoutManager; diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index cd3ed9580..1bf3ebe9b 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -7,6 +7,9 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextListMarkerFormat = NSString; +pub type NSTextListOptions = NSUInteger; +pub const NSTextListPrependEnclosingMarker: NSTextListOptions = 1; + extern_class!( #[derive(Debug)] pub struct NSTextList; diff --git a/crates/icrate/src/generated/AppKit/NSTextSelection.rs b/crates/icrate/src/generated/AppKit/NSTextSelection.rs index c3dec31c2..fb72d2335 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelection.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelection.rs @@ -5,6 +5,17 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextSelectionGranularity = NSInteger; +pub const NSTextSelectionGranularityCharacter: NSTextSelectionGranularity = 0; +pub const NSTextSelectionGranularityWord: NSTextSelectionGranularity = 1; +pub const NSTextSelectionGranularityParagraph: NSTextSelectionGranularity = 2; +pub const NSTextSelectionGranularityLine: NSTextSelectionGranularity = 3; +pub const NSTextSelectionGranularitySentence: NSTextSelectionGranularity = 4; + +pub type NSTextSelectionAffinity = NSInteger; +pub const NSTextSelectionAffinityUpstream: NSTextSelectionAffinity = 0; +pub const NSTextSelectionAffinityDownstream: NSTextSelectionAffinity = 1; + extern_class!( #[derive(Debug)] pub struct NSTextSelection; diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index a7a4793bb..f85cae0f3 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -5,6 +5,40 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextSelectionNavigationDirection = NSInteger; +pub const NSTextSelectionNavigationDirectionForward: NSTextSelectionNavigationDirection = 0; +pub const NSTextSelectionNavigationDirectionBackward: NSTextSelectionNavigationDirection = 1; +pub const NSTextSelectionNavigationDirectionRight: NSTextSelectionNavigationDirection = 2; +pub const NSTextSelectionNavigationDirectionLeft: NSTextSelectionNavigationDirection = 3; +pub const NSTextSelectionNavigationDirectionUp: NSTextSelectionNavigationDirection = 4; +pub const NSTextSelectionNavigationDirectionDown: NSTextSelectionNavigationDirection = 5; + +pub type NSTextSelectionNavigationDestination = NSInteger; +pub const NSTextSelectionNavigationDestinationCharacter: NSTextSelectionNavigationDestination = 0; +pub const NSTextSelectionNavigationDestinationWord: NSTextSelectionNavigationDestination = 1; +pub const NSTextSelectionNavigationDestinationLine: NSTextSelectionNavigationDestination = 2; +pub const NSTextSelectionNavigationDestinationSentence: NSTextSelectionNavigationDestination = 3; +pub const NSTextSelectionNavigationDestinationParagraph: NSTextSelectionNavigationDestination = 4; +pub const NSTextSelectionNavigationDestinationContainer: NSTextSelectionNavigationDestination = 5; +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 type NSTextSelectionNavigationWritingDirection = NSInteger; +pub const NSTextSelectionNavigationWritingDirectionLeftToRight: + NSTextSelectionNavigationWritingDirection = 0; +pub const NSTextSelectionNavigationWritingDirectionRightToLeft: + NSTextSelectionNavigationWritingDirection = 1; + +pub type NSTextSelectionNavigationLayoutOrientation = NSInteger; +pub const NSTextSelectionNavigationLayoutOrientationHorizontal: + NSTextSelectionNavigationLayoutOrientation = 0; +pub const NSTextSelectionNavigationLayoutOrientationVertical: + NSTextSelectionNavigationLayoutOrientation = 1; + extern_class!( #[derive(Debug)] pub struct NSTextSelectionNavigation; diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index bf9b62a25..fb1935400 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextStorageEditActions = NSUInteger; +pub const NSTextStorageEditedAttributes: NSTextStorageEditActions = 1; +pub const NSTextStorageEditedCharacters: NSTextStorageEditActions = 2; + extern_class!( #[derive(Debug)] pub struct NSTextStorage; diff --git a/crates/icrate/src/generated/AppKit/NSTextTable.rs b/crates/icrate/src/generated/AppKit/NSTextTable.rs index 5504acc58..9c960259e 100644 --- a/crates/icrate/src/generated/AppKit/NSTextTable.rs +++ b/crates/icrate/src/generated/AppKit/NSTextTable.rs @@ -5,6 +5,33 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTextBlockValueType = NSUInteger; +pub const NSTextBlockAbsoluteValueType: NSTextBlockValueType = 0; +pub const NSTextBlockPercentageValueType: NSTextBlockValueType = 1; + +pub type NSTextBlockDimension = NSUInteger; +pub const NSTextBlockWidth: NSTextBlockDimension = 0; +pub const NSTextBlockMinimumWidth: NSTextBlockDimension = 1; +pub const NSTextBlockMaximumWidth: NSTextBlockDimension = 2; +pub const NSTextBlockHeight: NSTextBlockDimension = 4; +pub const NSTextBlockMinimumHeight: NSTextBlockDimension = 5; +pub const NSTextBlockMaximumHeight: NSTextBlockDimension = 6; + +pub type NSTextBlockLayer = NSInteger; +pub const NSTextBlockPadding: NSTextBlockLayer = -1; +pub const NSTextBlockBorder: NSTextBlockLayer = 0; +pub const NSTextBlockMargin: NSTextBlockLayer = 1; + +pub type NSTextBlockVerticalAlignment = NSUInteger; +pub const NSTextBlockTopAlignment: NSTextBlockVerticalAlignment = 0; +pub const NSTextBlockMiddleAlignment: NSTextBlockVerticalAlignment = 1; +pub const NSTextBlockBottomAlignment: NSTextBlockVerticalAlignment = 2; +pub const NSTextBlockBaselineAlignment: NSTextBlockVerticalAlignment = 3; + +pub type NSTextTableLayoutAlgorithm = NSUInteger; +pub const NSTextTableAutomaticLayoutAlgorithm: NSTextTableLayoutAlgorithm = 0; +pub const NSTextTableFixedLayoutAlgorithm: NSTextTableLayoutAlgorithm = 1; + extern_class!( #[derive(Debug)] pub struct NSTextBlock; diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index 603288275..2cc242d90 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -5,6 +5,15 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSSelectionGranularity = NSUInteger; +pub const NSSelectByCharacter: NSSelectionGranularity = 0; +pub const NSSelectByWord: NSSelectionGranularity = 1; +pub const NSSelectByParagraph: NSSelectionGranularity = 2; + +pub type NSSelectionAffinity = NSUInteger; +pub const NSSelectionAffinityUpstream: NSSelectionAffinity = 0; +pub const NSSelectionAffinityDownstream: NSSelectionAffinity = 1; + extern_class!( #[derive(Debug)] pub struct NSTextView; @@ -932,4 +941,22 @@ extern_methods!( pub type NSTextViewDelegate = NSObject; +pub type NSFindPanelAction = NSUInteger; +pub const NSFindPanelActionShowFindPanel: NSFindPanelAction = 1; +pub const NSFindPanelActionNext: NSFindPanelAction = 2; +pub const NSFindPanelActionPrevious: NSFindPanelAction = 3; +pub const NSFindPanelActionReplaceAll: NSFindPanelAction = 4; +pub const NSFindPanelActionReplace: NSFindPanelAction = 5; +pub const NSFindPanelActionReplaceAndFind: NSFindPanelAction = 6; +pub const NSFindPanelActionSetFindString: NSFindPanelAction = 7; +pub const NSFindPanelActionReplaceAllInSelection: NSFindPanelAction = 8; +pub const NSFindPanelActionSelectAll: NSFindPanelAction = 9; +pub const NSFindPanelActionSelectAllInSelection: NSFindPanelAction = 10; + pub type NSPasteboardTypeFindPanelSearchOptionKey = NSString; + +pub type NSFindPanelSubstringMatchType = NSUInteger; +pub const NSFindPanelSubstringMatchTypeContains: NSFindPanelSubstringMatchType = 0; +pub const NSFindPanelSubstringMatchTypeStartsWith: NSFindPanelSubstringMatchType = 1; +pub const NSFindPanelSubstringMatchTypeFullWord: NSFindPanelSubstringMatchType = 2; +pub const NSFindPanelSubstringMatchTypeEndsWith: NSFindPanelSubstringMatchType = 3; diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs index 93835ca7f..f5b3553ee 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -5,6 +5,13 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTokenStyle = NSUInteger; +pub const NSTokenStyleDefault: NSTokenStyle = 0; +pub const NSTokenStyleNone: NSTokenStyle = 1; +pub const NSTokenStyleRounded: NSTokenStyle = 2; +pub const NSTokenStyleSquared: NSTokenStyle = 3; +pub const NSTokenStylePlainSquared: NSTokenStyle = 4; + extern_class!( #[derive(Debug)] pub struct NSTokenFieldCell; diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index 81bd1f9e6..a535a8108 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -9,6 +9,17 @@ pub type NSToolbarIdentifier = NSString; pub type NSToolbarItemIdentifier = NSString; +pub type NSToolbarDisplayMode = NSUInteger; +pub const NSToolbarDisplayModeDefault: NSToolbarDisplayMode = 0; +pub const NSToolbarDisplayModeIconAndLabel: NSToolbarDisplayMode = 1; +pub const NSToolbarDisplayModeIconOnly: NSToolbarDisplayMode = 2; +pub const NSToolbarDisplayModeLabelOnly: NSToolbarDisplayMode = 3; + +pub type NSToolbarSizeMode = NSUInteger; +pub const NSToolbarSizeModeDefault: NSToolbarSizeMode = 0; +pub const NSToolbarSizeModeRegular: NSToolbarSizeMode = 1; +pub const NSToolbarSizeModeSmall: NSToolbarSizeMode = 2; + extern_class!( #[derive(Debug)] pub struct NSToolbar; diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs index 5e3bdaee6..52bf4d763 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs @@ -5,6 +5,19 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSToolbarItemGroupSelectionMode = NSInteger; +pub const NSToolbarItemGroupSelectionModeSelectOne: NSToolbarItemGroupSelectionMode = 0; +pub const NSToolbarItemGroupSelectionModeSelectAny: NSToolbarItemGroupSelectionMode = 1; +pub const NSToolbarItemGroupSelectionModeMomentary: NSToolbarItemGroupSelectionMode = 2; + +pub type NSToolbarItemGroupControlRepresentation = NSInteger; +pub const NSToolbarItemGroupControlRepresentationAutomatic: + NSToolbarItemGroupControlRepresentation = 0; +pub const NSToolbarItemGroupControlRepresentationExpanded: NSToolbarItemGroupControlRepresentation = + 1; +pub const NSToolbarItemGroupControlRepresentationCollapsed: + NSToolbarItemGroupControlRepresentation = 2; + extern_class!( #[derive(Debug)] pub struct NSToolbarItemGroup; diff --git a/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs index 081c88ce6..7b548b17c 100644 --- a/crates/icrate/src/generated/AppKit/NSTouch.rs +++ b/crates/icrate/src/generated/AppKit/NSTouch.rs @@ -5,6 +5,23 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 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; + extern_class!( #[derive(Debug)] pub struct NSTouch; diff --git a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs index 73b32d30c..e6d6791f5 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs @@ -5,6 +5,18 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSTrackingArea; diff --git a/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs index 7032de278..06cd918ff 100644 --- a/crates/icrate/src/generated/AppKit/NSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSTypesetter.rs @@ -306,6 +306,14 @@ 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; + extern_methods!( /// NSTypesetter_Deprecated unsafe impl NSTypesetter { diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs index 9810872e4..21b07f7e6 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs @@ -4,3 +4,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + +pub type NSUserInterfaceLayoutDirection = NSInteger; +pub const NSUserInterfaceLayoutDirectionLeftToRight: NSUserInterfaceLayoutDirection = 0; +pub const NSUserInterfaceLayoutDirectionRightToLeft: NSUserInterfaceLayoutDirection = 1; + +pub type NSUserInterfaceLayoutOrientation = NSInteger; +pub const NSUserInterfaceLayoutOrientationHorizontal: NSUserInterfaceLayoutOrientation = 0; +pub const NSUserInterfaceLayoutOrientationVertical: NSUserInterfaceLayoutOrientation = 1; diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 5eb2237e1..f4ef944b2 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -5,6 +5,42 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSAutoresizingMaskOptions = NSUInteger; +pub const NSViewNotSizable: NSAutoresizingMaskOptions = 0; +pub const NSViewMinXMargin: NSAutoresizingMaskOptions = 1; +pub const NSViewWidthSizable: NSAutoresizingMaskOptions = 2; +pub const NSViewMaxXMargin: NSAutoresizingMaskOptions = 4; +pub const NSViewMinYMargin: NSAutoresizingMaskOptions = 8; +pub const NSViewHeightSizable: NSAutoresizingMaskOptions = 16; +pub const NSViewMaxYMargin: NSAutoresizingMaskOptions = 32; + +pub type NSBorderType = NSUInteger; +pub const NSNoBorder: NSBorderType = 0; +pub const NSLineBorder: NSBorderType = 1; +pub const NSBezelBorder: NSBorderType = 2; +pub const NSGrooveBorder: NSBorderType = 3; + +pub type NSViewLayerContentsRedrawPolicy = NSInteger; +pub const NSViewLayerContentsRedrawNever: NSViewLayerContentsRedrawPolicy = 0; +pub const NSViewLayerContentsRedrawOnSetNeedsDisplay: NSViewLayerContentsRedrawPolicy = 1; +pub const NSViewLayerContentsRedrawDuringViewResize: NSViewLayerContentsRedrawPolicy = 2; +pub const NSViewLayerContentsRedrawBeforeViewResize: NSViewLayerContentsRedrawPolicy = 3; +pub const NSViewLayerContentsRedrawCrossfade: NSViewLayerContentsRedrawPolicy = 4; + +pub type NSViewLayerContentsPlacement = NSInteger; +pub const NSViewLayerContentsPlacementScaleAxesIndependently: NSViewLayerContentsPlacement = 0; +pub const NSViewLayerContentsPlacementScaleProportionallyToFit: NSViewLayerContentsPlacement = 1; +pub const NSViewLayerContentsPlacementScaleProportionallyToFill: NSViewLayerContentsPlacement = 2; +pub const NSViewLayerContentsPlacementCenter: NSViewLayerContentsPlacement = 3; +pub const NSViewLayerContentsPlacementTop: NSViewLayerContentsPlacement = 4; +pub const NSViewLayerContentsPlacementTopRight: NSViewLayerContentsPlacement = 5; +pub const NSViewLayerContentsPlacementRight: NSViewLayerContentsPlacement = 6; +pub const NSViewLayerContentsPlacementBottomRight: NSViewLayerContentsPlacement = 7; +pub const NSViewLayerContentsPlacementBottom: NSViewLayerContentsPlacement = 8; +pub const NSViewLayerContentsPlacementBottomLeft: NSViewLayerContentsPlacement = 9; +pub const NSViewLayerContentsPlacementLeft: NSViewLayerContentsPlacement = 10; +pub const NSViewLayerContentsPlacementTopLeft: NSViewLayerContentsPlacement = 11; + pub type NSTrackingRectTag = NSInteger; pub type NSToolTipTag = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index 7f9edf0e7..d1358284b 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -5,6 +5,17 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSViewController; diff --git a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs index 09132d1f0..e540e7acc 100644 --- a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs +++ b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs @@ -5,6 +5,36 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSVisualEffectMaterial = NSInteger; +pub const NSVisualEffectMaterialTitlebar: NSVisualEffectMaterial = 3; +pub const NSVisualEffectMaterialSelection: NSVisualEffectMaterial = 4; +pub const NSVisualEffectMaterialMenu: NSVisualEffectMaterial = 5; +pub const NSVisualEffectMaterialPopover: NSVisualEffectMaterial = 6; +pub const NSVisualEffectMaterialSidebar: NSVisualEffectMaterial = 7; +pub const NSVisualEffectMaterialHeaderView: NSVisualEffectMaterial = 10; +pub const NSVisualEffectMaterialSheet: NSVisualEffectMaterial = 11; +pub const NSVisualEffectMaterialWindowBackground: NSVisualEffectMaterial = 12; +pub const NSVisualEffectMaterialHUDWindow: NSVisualEffectMaterial = 13; +pub const NSVisualEffectMaterialFullScreenUI: NSVisualEffectMaterial = 15; +pub const NSVisualEffectMaterialToolTip: NSVisualEffectMaterial = 17; +pub const NSVisualEffectMaterialContentBackground: NSVisualEffectMaterial = 18; +pub const NSVisualEffectMaterialUnderWindowBackground: NSVisualEffectMaterial = 21; +pub const NSVisualEffectMaterialUnderPageBackground: NSVisualEffectMaterial = 22; +pub const NSVisualEffectMaterialAppearanceBased: NSVisualEffectMaterial = 0; +pub const NSVisualEffectMaterialLight: NSVisualEffectMaterial = 1; +pub const NSVisualEffectMaterialDark: NSVisualEffectMaterial = 2; +pub const NSVisualEffectMaterialMediumLight: NSVisualEffectMaterial = 8; +pub const NSVisualEffectMaterialUltraDark: NSVisualEffectMaterial = 9; + +pub type NSVisualEffectBlendingMode = NSInteger; +pub const NSVisualEffectBlendingModeBehindWindow: NSVisualEffectBlendingMode = 0; +pub const NSVisualEffectBlendingModeWithinWindow: NSVisualEffectBlendingMode = 1; + +pub type NSVisualEffectState = NSInteger; +pub const NSVisualEffectStateFollowsWindowActiveState: NSVisualEffectState = 0; +pub const NSVisualEffectStateActive: NSVisualEffectState = 1; +pub const NSVisualEffectStateInactive: NSVisualEffectState = 2; + extern_class!( #[derive(Debug)] pub struct NSVisualEffectView; diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 40d5b34b4..87ef8cb42 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -5,8 +5,100 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 NSDisplayWindowRunLoopOrdering: i32 = 600000; +pub const NSResetCursorRectsRunLoopOrdering: i32 = 700000; + +pub type NSWindowSharingType = NSUInteger; +pub const NSWindowSharingNone: NSWindowSharingType = 0; +pub const NSWindowSharingReadOnly: NSWindowSharingType = 1; +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 type NSWindowAnimationBehavior = NSInteger; +pub const NSWindowAnimationBehaviorDefault: NSWindowAnimationBehavior = 0; +pub const NSWindowAnimationBehaviorNone: NSWindowAnimationBehavior = 2; +pub const NSWindowAnimationBehaviorDocumentWindow: NSWindowAnimationBehavior = 3; +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 type NSWindowOcclusionState = NSUInteger; +pub const NSWindowOcclusionStateVisible: NSWindowOcclusionState = 2; + pub type NSWindowLevel = NSInteger; +pub type NSSelectionDirection = NSUInteger; +pub const NSDirectSelection: NSSelectionDirection = 0; +pub const NSSelectingNext: NSSelectionDirection = 1; +pub const NSSelectingPrevious: NSSelectionDirection = 2; + +pub type NSWindowButton = NSUInteger; +pub const NSWindowCloseButton: NSWindowButton = 0; +pub const NSWindowMiniaturizeButton: NSWindowButton = 1; +pub const NSWindowZoomButton: NSWindowButton = 2; +pub const NSWindowToolbarButton: NSWindowButton = 3; +pub const NSWindowDocumentIconButton: NSWindowButton = 4; +pub const NSWindowDocumentVersionsButton: NSWindowButton = 6; + +pub type NSWindowTitleVisibility = NSInteger; +pub const NSWindowTitleVisible: NSWindowTitleVisibility = 0; +pub const NSWindowTitleHidden: NSWindowTitleVisibility = 1; + +pub type NSWindowToolbarStyle = NSInteger; +pub const NSWindowToolbarStyleAutomatic: NSWindowToolbarStyle = 0; +pub const NSWindowToolbarStyleExpanded: NSWindowToolbarStyle = 1; +pub const NSWindowToolbarStylePreference: NSWindowToolbarStyle = 2; +pub const NSWindowToolbarStyleUnified: NSWindowToolbarStyle = 3; +pub const NSWindowToolbarStyleUnifiedCompact: NSWindowToolbarStyle = 4; + +pub type NSWindowUserTabbingPreference = NSInteger; +pub const NSWindowUserTabbingPreferenceManual: NSWindowUserTabbingPreference = 0; +pub const NSWindowUserTabbingPreferenceAlways: NSWindowUserTabbingPreference = 1; +pub const NSWindowUserTabbingPreferenceInFullScreen: NSWindowUserTabbingPreference = 2; + +pub type NSWindowTabbingMode = NSInteger; +pub const NSWindowTabbingModeAutomatic: NSWindowTabbingMode = 0; +pub const NSWindowTabbingModePreferred: NSWindowTabbingMode = 1; +pub const NSWindowTabbingModeDisallowed: NSWindowTabbingMode = 2; + +pub type NSTitlebarSeparatorStyle = NSInteger; +pub const NSTitlebarSeparatorStyleAutomatic: NSTitlebarSeparatorStyle = 0; +pub const NSTitlebarSeparatorStyleNone: NSTitlebarSeparatorStyle = 1; +pub const NSTitlebarSeparatorStyleLine: NSTitlebarSeparatorStyle = 2; +pub const NSTitlebarSeparatorStyleShadow: NSTitlebarSeparatorStyle = 3; + pub type NSWindowFrameAutosaveName = NSString; pub type NSWindowPersistableFrameDescriptor = NSString; @@ -1062,6 +1154,11 @@ extern_methods!( pub type NSWindowDelegate = NSObject; +pub type NSWindowBackingLocation = NSUInteger; +pub const NSWindowBackingLocationDefault: NSWindowBackingLocation = 0; +pub const NSWindowBackingLocationVideoMemory: NSWindowBackingLocation = 1; +pub const NSWindowBackingLocationMainMemory: NSWindowBackingLocation = 2; + extern_methods!( /// NSDeprecated unsafe impl NSWindow { diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index c30a4c4ba..db9f7a920 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSWorkspaceIconCreationOptions = NSUInteger; +pub const NSExcludeQuickDrawElementsIconCreationOption: NSWorkspaceIconCreationOptions = 2; +pub const NSExclude10_4ElementsIconCreationOption: NSWorkspaceIconCreationOptions = 4; + extern_class!( #[derive(Debug)] pub struct NSWorkspace; @@ -332,6 +336,11 @@ extern_methods!( } ); +pub type NSWorkspaceAuthorizationType = NSInteger; +pub const NSWorkspaceAuthorizationTypeCreateSymbolicLink: NSWorkspaceAuthorizationType = 0; +pub const NSWorkspaceAuthorizationTypeSetAttributes: NSWorkspaceAuthorizationType = 1; +pub const NSWorkspaceAuthorizationTypeReplaceFile: NSWorkspaceAuthorizationType = 2; + extern_class!( #[derive(Debug)] pub struct NSWorkspaceAuthorization; @@ -369,6 +378,20 @@ 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 type NSWorkspaceLaunchConfigurationKey = NSString; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index 9af4bf0d5..c932bc77d 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -272,19 +272,58 @@ pub(crate) mod NSWindowTabGroup; pub(crate) mod NSWorkspace; mod __exported { + pub use super::AppKitErrors::{ + NSFontAssetDownloadError, NSFontErrorMaximum, NSFontErrorMinimum, + NSServiceApplicationLaunchFailedError, NSServiceApplicationNotFoundError, + NSServiceErrorMaximum, NSServiceErrorMinimum, NSServiceInvalidPasteboardDataError, + NSServiceMalformedServiceDictionaryError, NSServiceMiscellaneousError, + NSServiceRequestTimedOutError, NSSharingServiceErrorMaximum, NSSharingServiceErrorMinimum, + NSSharingServiceNotConfiguredError, NSTextReadInapplicableDocumentTypeError, + NSTextReadWriteErrorMaximum, NSTextReadWriteErrorMinimum, + NSTextWriteInapplicableDocumentTypeError, NSWorkspaceAuthorizationInvalidError, + NSWorkspaceErrorMaximum, NSWorkspaceErrorMinimum, + }; pub use super::NSATSTypesetter::NSATSTypesetter; pub use super::NSAccessibilityConstants::{ NSAccessibilityActionName, NSAccessibilityAnnotationAttributeKey, + NSAccessibilityAnnotationPosition, NSAccessibilityAnnotationPositionEnd, + NSAccessibilityAnnotationPositionFullRange, NSAccessibilityAnnotationPositionStart, NSAccessibilityAttributeName, NSAccessibilityFontAttributeKey, NSAccessibilityLoadingToken, NSAccessibilityNotificationName, NSAccessibilityNotificationUserInfoKey, - NSAccessibilityOrientationValue, NSAccessibilityParameterizedAttributeName, - NSAccessibilityRole, NSAccessibilityRulerMarkerTypeValue, NSAccessibilityRulerUnitValue, - NSAccessibilitySortDirectionValue, NSAccessibilitySubrole, + NSAccessibilityOrientation, NSAccessibilityOrientationHorizontal, + NSAccessibilityOrientationUnknown, NSAccessibilityOrientationValue, + NSAccessibilityOrientationVertical, NSAccessibilityParameterizedAttributeName, + NSAccessibilityPriorityHigh, NSAccessibilityPriorityLevel, NSAccessibilityPriorityLow, + NSAccessibilityPriorityMedium, NSAccessibilityRole, NSAccessibilityRulerMarkerType, + NSAccessibilityRulerMarkerTypeIndentFirstLine, NSAccessibilityRulerMarkerTypeIndentHead, + NSAccessibilityRulerMarkerTypeIndentTail, NSAccessibilityRulerMarkerTypeTabStopCenter, + NSAccessibilityRulerMarkerTypeTabStopDecimal, NSAccessibilityRulerMarkerTypeTabStopLeft, + NSAccessibilityRulerMarkerTypeTabStopRight, NSAccessibilityRulerMarkerTypeUnknown, + NSAccessibilityRulerMarkerTypeValue, NSAccessibilityRulerUnitValue, + NSAccessibilitySortDirection, NSAccessibilitySortDirectionAscending, + NSAccessibilitySortDirectionDescending, NSAccessibilitySortDirectionUnknown, + NSAccessibilitySortDirectionValue, NSAccessibilitySubrole, NSAccessibilityUnits, + NSAccessibilityUnitsCentimeters, NSAccessibilityUnitsInches, NSAccessibilityUnitsPicas, + NSAccessibilityUnitsPoints, NSAccessibilityUnitsUnknown, }; pub use super::NSAccessibilityCustomAction::NSAccessibilityCustomAction; pub use super::NSAccessibilityCustomRotor::{ NSAccessibilityCustomRotor, NSAccessibilityCustomRotorItemResult, - NSAccessibilityCustomRotorItemSearchDelegate, NSAccessibilityCustomRotorSearchParameters, + NSAccessibilityCustomRotorItemSearchDelegate, NSAccessibilityCustomRotorSearchDirection, + NSAccessibilityCustomRotorSearchDirectionNext, + NSAccessibilityCustomRotorSearchDirectionPrevious, + NSAccessibilityCustomRotorSearchParameters, NSAccessibilityCustomRotorType, + NSAccessibilityCustomRotorTypeAnnotation, NSAccessibilityCustomRotorTypeAny, + NSAccessibilityCustomRotorTypeAudiograph, NSAccessibilityCustomRotorTypeBoldText, + NSAccessibilityCustomRotorTypeCustom, NSAccessibilityCustomRotorTypeHeading, + NSAccessibilityCustomRotorTypeHeadingLevel1, NSAccessibilityCustomRotorTypeHeadingLevel2, + NSAccessibilityCustomRotorTypeHeadingLevel3, NSAccessibilityCustomRotorTypeHeadingLevel4, + NSAccessibilityCustomRotorTypeHeadingLevel5, NSAccessibilityCustomRotorTypeHeadingLevel6, + NSAccessibilityCustomRotorTypeImage, NSAccessibilityCustomRotorTypeItalicText, + NSAccessibilityCustomRotorTypeLandmark, NSAccessibilityCustomRotorTypeLink, + NSAccessibilityCustomRotorTypeList, NSAccessibilityCustomRotorTypeMisspelledWord, + NSAccessibilityCustomRotorTypeTable, NSAccessibilityCustomRotorTypeTextField, + NSAccessibilityCustomRotorTypeUnderlinedText, NSAccessibilityCustomRotorTypeVisitedLink, }; pub use super::NSAccessibilityElement::NSAccessibilityElement; pub use super::NSAccessibilityProtocols::{ @@ -297,61 +336,178 @@ mod __exported { NSAccessibilityStepper, NSAccessibilitySwitch, NSAccessibilityTable, }; pub use super::NSActionCell::NSActionCell; - pub use super::NSAlert::{NSAlert, NSAlertDelegate}; + pub use super::NSAlert::{ + NSAlert, NSAlertDelegate, NSAlertStyle, NSAlertStyleCritical, NSAlertStyleInformational, + NSAlertStyleWarning, + }; pub use super::NSAlignmentFeedbackFilter::{ NSAlignmentFeedbackFilter, NSAlignmentFeedbackToken, }; pub use super::NSAnimation::{ - NSAnimatablePropertyContainer, NSAnimatablePropertyKey, NSAnimation, NSAnimationDelegate, - NSViewAnimation, NSViewAnimationEffectName, NSViewAnimationKey, + NSAnimatablePropertyContainer, NSAnimatablePropertyKey, NSAnimation, NSAnimationBlocking, + NSAnimationBlockingMode, NSAnimationCurve, NSAnimationDelegate, NSAnimationEaseIn, + NSAnimationEaseInOut, NSAnimationEaseOut, NSAnimationLinear, NSAnimationNonblocking, + NSAnimationNonblockingThreaded, NSViewAnimation, NSViewAnimationEffectName, + NSViewAnimationKey, }; pub use super::NSAnimationContext::NSAnimationContext; pub use super::NSAppearance::{NSAppearance, NSAppearanceCustomization, NSAppearanceName}; pub use super::NSApplication::{ - NSAboutPanelOptionKey, NSApplication, NSApplicationDelegate, NSModalResponse, - NSServiceProviderName, NSServicesMenuRequestor, + NSAboutPanelOptionKey, NSApplication, NSApplicationDelegate, NSApplicationDelegateReply, + NSApplicationDelegateReplyCancel, NSApplicationDelegateReplyFailure, + NSApplicationDelegateReplySuccess, NSApplicationOcclusionState, + NSApplicationOcclusionStateVisible, NSApplicationPresentationAutoHideDock, + NSApplicationPresentationAutoHideMenuBar, NSApplicationPresentationAutoHideToolbar, + NSApplicationPresentationDefault, NSApplicationPresentationDisableAppleMenu, + NSApplicationPresentationDisableCursorLocationAssistance, + NSApplicationPresentationDisableForceQuit, NSApplicationPresentationDisableHideApplication, + NSApplicationPresentationDisableMenuBarTransparency, + NSApplicationPresentationDisableProcessSwitching, + NSApplicationPresentationDisableSessionTermination, NSApplicationPresentationFullScreen, + NSApplicationPresentationHideDock, NSApplicationPresentationHideMenuBar, + NSApplicationPresentationOptions, NSApplicationPrintReply, NSApplicationTerminateReply, + NSCriticalRequest, NSInformationalRequest, NSModalResponse, NSPrintingCancelled, + NSPrintingFailure, NSPrintingReplyLater, NSPrintingSuccess, NSRemoteNotificationType, + NSRemoteNotificationTypeAlert, NSRemoteNotificationTypeBadge, NSRemoteNotificationTypeNone, + NSRemoteNotificationTypeSound, NSRequestUserAttentionType, NSRunAbortedResponse, + NSRunContinuesResponse, NSRunStoppedResponse, NSServiceProviderName, + NSServicesMenuRequestor, NSTerminateCancel, NSTerminateLater, NSTerminateNow, + NSUpdateWindowsRunLoopOrdering, NSWindowListOptions, NSWindowListOrderedFrontToBack, }; pub use super::NSArrayController::NSArrayController; pub use super::NSAttributedString::{ NSAttributedStringDocumentAttributeKey, NSAttributedStringDocumentReadingOptionKey, - NSAttributedStringDocumentType, NSTextEffectStyle, NSTextLayoutSectionKey, + NSAttributedStringDocumentType, NSNoUnderlineStyle, NSSingleUnderlineStyle, + NSSpellingState, NSSpellingStateGrammarFlag, NSSpellingStateSpellingFlag, + NSTextEffectStyle, NSTextLayoutSectionKey, NSTextScalingStandard, NSTextScalingType, + NSTextScalingiOS, NSUnderlineStyle, NSUnderlineStyleByWord, NSUnderlineStyleDouble, + NSUnderlineStyleNone, NSUnderlineStylePatternDash, NSUnderlineStylePatternDashDot, + NSUnderlineStylePatternDashDotDot, NSUnderlineStylePatternDot, + NSUnderlineStylePatternSolid, NSUnderlineStyleSingle, NSUnderlineStyleThick, + NSWritingDirectionEmbedding, NSWritingDirectionFormatType, NSWritingDirectionOverride, + }; + pub use super::NSBezierPath::{ + NSBezierPath, NSBezierPathElement, NSBezierPathElementClosePath, + NSBezierPathElementCurveTo, NSBezierPathElementLineTo, NSBezierPathElementMoveTo, + NSLineCapStyle, NSLineCapStyleButt, NSLineCapStyleRound, NSLineCapStyleSquare, + NSLineJoinStyle, NSLineJoinStyleBevel, NSLineJoinStyleMiter, NSLineJoinStyleRound, + NSWindingRule, NSWindingRuleEvenOdd, NSWindingRuleNonZero, + }; + pub use super::NSBitmapImageRep::{ + NSBitmapFormat, NSBitmapFormatAlphaFirst, NSBitmapFormatAlphaNonpremultiplied, + NSBitmapFormatFloatingPointSamples, NSBitmapFormatSixteenBitBigEndian, + NSBitmapFormatSixteenBitLittleEndian, NSBitmapFormatThirtyTwoBitBigEndian, + NSBitmapFormatThirtyTwoBitLittleEndian, NSBitmapImageFileType, NSBitmapImageFileTypeBMP, + NSBitmapImageFileTypeGIF, NSBitmapImageFileTypeJPEG, NSBitmapImageFileTypeJPEG2000, + NSBitmapImageFileTypePNG, NSBitmapImageFileTypeTIFF, NSBitmapImageRep, + NSBitmapImageRepPropertyKey, NSImageRepLoadStatus, NSImageRepLoadStatusCompleted, + NSImageRepLoadStatusInvalidData, NSImageRepLoadStatusReadingHeader, + NSImageRepLoadStatusUnexpectedEOF, NSImageRepLoadStatusUnknownType, + NSImageRepLoadStatusWillNeedAllData, NSTIFFCompression, NSTIFFCompressionCCITTFAX3, + NSTIFFCompressionCCITTFAX4, NSTIFFCompressionJPEG, NSTIFFCompressionLZW, + NSTIFFCompressionNEXT, NSTIFFCompressionNone, NSTIFFCompressionOldJPEG, + NSTIFFCompressionPackBits, + }; + pub use super::NSBox::{ + NSAboveBottom, NSAboveTop, NSAtBottom, NSAtTop, NSBelowBottom, NSBelowTop, NSBox, + NSBoxCustom, NSBoxPrimary, NSBoxSeparator, NSBoxType, NSNoTitle, NSTitlePosition, + }; + pub use super::NSBrowser::{ + NSBrowser, NSBrowserAutoColumnResizing, NSBrowserColumnResizingType, + NSBrowserColumnsAutosaveName, NSBrowserDelegate, NSBrowserDropAbove, NSBrowserDropOn, + NSBrowserDropOperation, NSBrowserNoColumnResizing, NSBrowserUserColumnResizing, }; - pub use super::NSBezierPath::NSBezierPath; - pub use super::NSBitmapImageRep::{NSBitmapImageRep, NSBitmapImageRepPropertyKey}; - pub use super::NSBox::NSBox; - pub use super::NSBrowser::{NSBrowser, NSBrowserColumnsAutosaveName, NSBrowserDelegate}; pub use super::NSBrowserCell::NSBrowserCell; pub use super::NSButton::NSButton; - pub use super::NSButtonCell::NSButtonCell; + pub use super::NSButtonCell::{ + NSBezelStyle, NSBezelStyleCircular, NSBezelStyleDisclosure, NSBezelStyleHelpButton, + NSBezelStyleInline, NSBezelStyleRecessed, NSBezelStyleRegularSquare, NSBezelStyleRoundRect, + NSBezelStyleRounded, NSBezelStyleRoundedDisclosure, NSBezelStyleShadowlessSquare, + NSBezelStyleSmallSquare, NSBezelStyleTexturedRounded, NSBezelStyleTexturedSquare, + NSButtonCell, NSButtonType, NSButtonTypeAccelerator, NSButtonTypeMomentaryChange, + NSButtonTypeMomentaryLight, NSButtonTypeMomentaryPushIn, NSButtonTypeMultiLevelAccelerator, + NSButtonTypeOnOff, NSButtonTypePushOnPushOff, NSButtonTypeRadio, NSButtonTypeSwitch, + NSButtonTypeToggle, NSGradientConcaveStrong, NSGradientConcaveWeak, NSGradientConvexStrong, + NSGradientConvexWeak, NSGradientNone, NSGradientType, + }; pub use super::NSButtonTouchBarItem::NSButtonTouchBarItem; pub use super::NSCIImageRep::NSCIImageRep; pub use super::NSCachedImageRep::NSCachedImageRep; pub use super::NSCandidateListTouchBarItem::{ NSCandidateListTouchBarItem, NSCandidateListTouchBarItemDelegate, }; - pub use super::NSCell::{NSCell, NSCellStateValue, NSControlStateValue}; + pub use super::NSCell::{ + NSAnyType, NSBackgroundStyle, NSBackgroundStyleEmphasized, NSBackgroundStyleLowered, + NSBackgroundStyleNormal, NSBackgroundStyleRaised, NSBlueControlTint, NSCell, + NSCellAllowsMixedState, NSCellAttribute, NSCellChangesContents, NSCellDisabled, + NSCellEditable, NSCellHasImageHorizontal, NSCellHasImageOnLeftOrBottom, + NSCellHasOverlappingImage, NSCellHighlighted, NSCellHitContentArea, + NSCellHitEditableTextArea, NSCellHitNone, NSCellHitResult, NSCellHitTrackableArea, + NSCellImagePosition, NSCellIsBordered, NSCellIsInsetButton, NSCellLightsByBackground, + NSCellLightsByContents, NSCellLightsByGray, NSCellState, NSCellStateValue, NSCellStyleMask, + NSCellType, NSChangeBackgroundCell, NSChangeBackgroundCellMask, NSChangeGrayCell, + NSChangeGrayCellMask, NSClearControlTint, NSContentsCellMask, NSControlSize, + NSControlSizeLarge, NSControlSizeMini, NSControlSizeRegular, NSControlSizeSmall, + NSControlStateValue, NSControlTint, NSDefaultControlTint, NSDoubleType, NSFloatType, + NSGraphiteControlTint, NSImageAbove, NSImageBelow, NSImageCellType, NSImageLeading, + NSImageLeft, NSImageOnly, NSImageOverlaps, NSImageRight, NSImageScaleAxesIndependently, + NSImageScaleNone, NSImageScaleProportionallyDown, NSImageScaleProportionallyUpOrDown, + NSImageScaling, NSImageTrailing, NSIntType, NSNoCellMask, NSNoImage, NSNullCellType, + NSPositiveDoubleType, NSPositiveFloatType, NSPositiveIntType, NSPushInCell, + NSPushInCellMask, NSScaleNone, NSScaleProportionally, NSScaleToFit, NSTextCellType, + }; pub use super::NSClickGestureRecognizer::NSClickGestureRecognizer; pub use super::NSClipView::NSClipView; pub use super::NSCollectionView::{ NSCollectionView, NSCollectionViewDataSource, NSCollectionViewDelegate, - NSCollectionViewElement, NSCollectionViewItem, NSCollectionViewPrefetching, - NSCollectionViewSectionHeaderView, NSCollectionViewSupplementaryElementKind, + NSCollectionViewDropBefore, NSCollectionViewDropOn, NSCollectionViewDropOperation, + NSCollectionViewElement, NSCollectionViewItem, NSCollectionViewItemHighlightAsDropTarget, + NSCollectionViewItemHighlightForDeselection, NSCollectionViewItemHighlightForSelection, + NSCollectionViewItemHighlightNone, NSCollectionViewItemHighlightState, + NSCollectionViewPrefetching, NSCollectionViewScrollPosition, + NSCollectionViewScrollPositionBottom, NSCollectionViewScrollPositionCenteredHorizontally, + NSCollectionViewScrollPositionCenteredVertically, + NSCollectionViewScrollPositionLeadingEdge, NSCollectionViewScrollPositionLeft, + NSCollectionViewScrollPositionNearestHorizontalEdge, + NSCollectionViewScrollPositionNearestVerticalEdge, NSCollectionViewScrollPositionNone, + NSCollectionViewScrollPositionRight, NSCollectionViewScrollPositionTop, + NSCollectionViewScrollPositionTrailingEdge, NSCollectionViewSectionHeaderView, + NSCollectionViewSupplementaryElementKind, }; pub use super::NSCollectionViewCompositionalLayout::{ NSCollectionLayoutAnchor, NSCollectionLayoutBoundarySupplementaryItem, NSCollectionLayoutContainer, NSCollectionLayoutDecorationItem, NSCollectionLayoutDimension, NSCollectionLayoutEdgeSpacing, NSCollectionLayoutEnvironment, NSCollectionLayoutGroup, NSCollectionLayoutGroupCustomItem, NSCollectionLayoutItem, NSCollectionLayoutSection, - NSCollectionLayoutSize, NSCollectionLayoutSpacing, NSCollectionLayoutSupplementaryItem, + NSCollectionLayoutSectionOrthogonalScrollingBehavior, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuous, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorNone, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging, NSCollectionLayoutSize, + NSCollectionLayoutSpacing, NSCollectionLayoutSupplementaryItem, NSCollectionLayoutVisibleItem, NSCollectionViewCompositionalLayout, - NSCollectionViewCompositionalLayoutConfiguration, + NSCollectionViewCompositionalLayoutConfiguration, NSDirectionalRectEdge, + NSDirectionalRectEdgeAll, NSDirectionalRectEdgeBottom, NSDirectionalRectEdgeLeading, + NSDirectionalRectEdgeNone, NSDirectionalRectEdgeTop, NSDirectionalRectEdgeTrailing, + NSRectAlignment, NSRectAlignmentBottom, NSRectAlignmentBottomLeading, + NSRectAlignmentBottomTrailing, NSRectAlignmentLeading, NSRectAlignmentNone, + NSRectAlignmentTop, NSRectAlignmentTopLeading, NSRectAlignmentTopTrailing, + NSRectAlignmentTrailing, }; pub use super::NSCollectionViewFlowLayout::{ NSCollectionViewDelegateFlowLayout, NSCollectionViewFlowLayout, - NSCollectionViewFlowLayoutInvalidationContext, + NSCollectionViewFlowLayoutInvalidationContext, NSCollectionViewScrollDirection, + NSCollectionViewScrollDirectionHorizontal, NSCollectionViewScrollDirectionVertical, }; pub use super::NSCollectionViewGridLayout::NSCollectionViewGridLayout; pub use super::NSCollectionViewLayout::{ + NSCollectionElementCategory, NSCollectionElementCategoryDecorationView, + NSCollectionElementCategoryInterItemGap, NSCollectionElementCategoryItem, + NSCollectionElementCategorySupplementaryView, NSCollectionUpdateAction, + NSCollectionUpdateActionDelete, NSCollectionUpdateActionInsert, + NSCollectionUpdateActionMove, NSCollectionUpdateActionNone, NSCollectionUpdateActionReload, NSCollectionViewDecorationElementKind, NSCollectionViewLayout, NSCollectionViewLayoutAttributes, NSCollectionViewLayoutInvalidationContext, NSCollectionViewUpdateItem, @@ -359,14 +515,30 @@ mod __exported { pub use super::NSCollectionViewTransitionLayout::{ NSCollectionViewTransitionLayout, NSCollectionViewTransitionLayoutAnimatedKey, }; - pub use super::NSColor::NSColor; + pub use super::NSColor::{ + NSColor, NSColorSystemEffect, NSColorSystemEffectDeepPressed, NSColorSystemEffectDisabled, + NSColorSystemEffectNone, NSColorSystemEffectPressed, NSColorSystemEffectRollover, + NSColorType, NSColorTypeCatalog, NSColorTypeComponentBased, NSColorTypePattern, + }; pub use super::NSColorList::{NSColorList, NSColorListName, NSColorName}; - pub use super::NSColorPanel::{NSColorChanging, NSColorPanel}; + pub use super::NSColorPanel::{ + NSColorChanging, NSColorPanel, NSColorPanelAllModesMask, NSColorPanelCMYKModeMask, + NSColorPanelColorListModeMask, NSColorPanelCrayonModeMask, + NSColorPanelCustomPaletteModeMask, NSColorPanelGrayModeMask, NSColorPanelHSBModeMask, + NSColorPanelMode, NSColorPanelModeCMYK, NSColorPanelModeColorList, NSColorPanelModeCrayon, + NSColorPanelModeCustomPalette, NSColorPanelModeGray, NSColorPanelModeHSB, + NSColorPanelModeNone, NSColorPanelModeRGB, NSColorPanelModeWheel, NSColorPanelOptions, + NSColorPanelRGBModeMask, NSColorPanelWheelModeMask, + }; pub use super::NSColorPicker::NSColorPicker; pub use super::NSColorPickerTouchBarItem::NSColorPickerTouchBarItem; pub use super::NSColorPicking::{NSColorPickingCustom, NSColorPickingDefault}; pub use super::NSColorSampler::NSColorSampler; - pub use super::NSColorSpace::NSColorSpace; + pub use super::NSColorSpace::{ + NSColorSpace, NSColorSpaceModel, NSColorSpaceModelCMYK, NSColorSpaceModelDeviceN, + NSColorSpaceModelGray, NSColorSpaceModelIndexed, NSColorSpaceModelLAB, + NSColorSpaceModelPatterned, NSColorSpaceModelRGB, NSColorSpaceModelUnknown, + }; pub use super::NSColorWell::NSColorWell; pub use super::NSComboBox::{NSComboBox, NSComboBoxDataSource, NSComboBoxDelegate}; pub use super::NSComboBoxCell::{NSComboBoxCell, NSComboBoxCellDataSource}; @@ -377,7 +549,15 @@ mod __exported { pub use super::NSCustomTouchBarItem::NSCustomTouchBarItem; pub use super::NSDataAsset::{NSDataAsset, NSDataAssetName}; pub use super::NSDatePicker::NSDatePicker; - pub use super::NSDatePickerCell::{NSDatePickerCell, NSDatePickerCellDelegate}; + pub use super::NSDatePickerCell::{ + NSDatePickerCell, NSDatePickerCellDelegate, NSDatePickerElementFlagEra, + NSDatePickerElementFlagHourMinute, NSDatePickerElementFlagHourMinuteSecond, + NSDatePickerElementFlagTimeZone, NSDatePickerElementFlagYearMonth, + NSDatePickerElementFlagYearMonthDay, NSDatePickerElementFlags, NSDatePickerMode, + NSDatePickerModeRange, NSDatePickerModeSingle, NSDatePickerStyle, + NSDatePickerStyleClockAndCalendar, NSDatePickerStyleTextField, + NSDatePickerStyleTextFieldAndStepper, + }; pub use super::NSDictionaryController::{ NSDictionaryController, NSDictionaryControllerKeyValuePair, }; @@ -385,59 +565,264 @@ mod __exported { NSCollectionViewDiffableDataSource, NSDiffableDataSourceSnapshot, }; pub use super::NSDockTile::{NSDockTile, NSDockTilePlugIn}; - pub use super::NSDocument::NSDocument; + pub use super::NSDocument::{ + NSAutosaveAsOperation, NSAutosaveElsewhereOperation, NSAutosaveInPlaceOperation, + NSAutosaveOperation, NSChangeAutosaved, NSChangeCleared, NSChangeDiscardable, NSChangeDone, + NSChangeReadOtherContents, NSChangeRedone, NSChangeUndone, NSDocument, + NSDocumentChangeType, NSSaveAsOperation, NSSaveOperation, NSSaveOperationType, + NSSaveToOperation, + }; pub use super::NSDocumentController::NSDocumentController; pub use super::NSDragging::{ - NSDraggingDestination, NSDraggingInfo, NSDraggingSource, NSSpringLoadingDestination, + NSDragOperation, NSDragOperationAll, NSDragOperationAll_Obsolete, NSDragOperationCopy, + NSDragOperationDelete, NSDragOperationEvery, NSDragOperationGeneric, NSDragOperationLink, + NSDragOperationMove, NSDragOperationNone, NSDragOperationPrivate, NSDraggingContext, + NSDraggingContextOutsideApplication, NSDraggingContextWithinApplication, + NSDraggingDestination, NSDraggingFormation, NSDraggingFormationDefault, + NSDraggingFormationList, NSDraggingFormationNone, NSDraggingFormationPile, + NSDraggingFormationStack, NSDraggingInfo, + NSDraggingItemEnumerationClearNonenumeratedImages, NSDraggingItemEnumerationConcurrent, + NSDraggingItemEnumerationOptions, NSDraggingSource, NSSpringLoadingContinuousActivation, + NSSpringLoadingDestination, NSSpringLoadingDisabled, NSSpringLoadingEnabled, + NSSpringLoadingHighlight, NSSpringLoadingHighlightEmphasized, NSSpringLoadingHighlightNone, + NSSpringLoadingHighlightStandard, NSSpringLoadingNoHover, NSSpringLoadingOptions, }; pub use super::NSDraggingItem::{ NSDraggingImageComponent, NSDraggingImageComponentKey, NSDraggingItem, }; pub use super::NSDraggingSession::NSDraggingSession; - pub use super::NSDrawer::{NSDrawer, NSDrawerDelegate}; + pub use super::NSDrawer::{ + NSDrawer, NSDrawerClosedState, NSDrawerClosingState, NSDrawerDelegate, NSDrawerOpenState, + NSDrawerOpeningState, NSDrawerState, + }; pub use super::NSEPSImageRep::NSEPSImageRep; - pub use super::NSEvent::NSEvent; + pub use super::NSEvent::{ + NSBeginFunctionKey, NSBreakFunctionKey, NSClearDisplayFunctionKey, NSClearLineFunctionKey, + NSDeleteCharFunctionKey, NSDeleteFunctionKey, NSDeleteLineFunctionKey, + NSDownArrowFunctionKey, NSEndFunctionKey, NSEvent, NSEventButtonMask, + NSEventButtonMaskPenLowerSide, NSEventButtonMaskPenTip, NSEventButtonMaskPenUpperSide, + NSEventGestureAxis, NSEventGestureAxisHorizontal, NSEventGestureAxisNone, + NSEventGestureAxisVertical, NSEventMask, NSEventMaskAny, NSEventMaskAppKitDefined, + NSEventMaskApplicationDefined, NSEventMaskBeginGesture, NSEventMaskChangeMode, + NSEventMaskCursorUpdate, NSEventMaskDirectTouch, NSEventMaskEndGesture, + NSEventMaskFlagsChanged, NSEventMaskGesture, NSEventMaskKeyDown, NSEventMaskKeyUp, + NSEventMaskLeftMouseDown, NSEventMaskLeftMouseDragged, NSEventMaskLeftMouseUp, + NSEventMaskMagnify, NSEventMaskMouseEntered, NSEventMaskMouseExited, NSEventMaskMouseMoved, + NSEventMaskOtherMouseDown, NSEventMaskOtherMouseDragged, NSEventMaskOtherMouseUp, + NSEventMaskPeriodic, NSEventMaskPressure, NSEventMaskRightMouseDown, + NSEventMaskRightMouseDragged, NSEventMaskRightMouseUp, NSEventMaskRotate, + NSEventMaskScrollWheel, NSEventMaskSmartMagnify, NSEventMaskSwipe, + NSEventMaskSystemDefined, NSEventMaskTabletPoint, NSEventMaskTabletProximity, + NSEventModifierFlagCapsLock, NSEventModifierFlagCommand, NSEventModifierFlagControl, + NSEventModifierFlagDeviceIndependentFlagsMask, NSEventModifierFlagFunction, + NSEventModifierFlagHelp, NSEventModifierFlagNumericPad, NSEventModifierFlagOption, + NSEventModifierFlagShift, NSEventModifierFlags, NSEventPhase, NSEventPhaseBegan, + NSEventPhaseCancelled, NSEventPhaseChanged, NSEventPhaseEnded, NSEventPhaseMayBegin, + NSEventPhaseNone, NSEventPhaseStationary, NSEventSubtype, + NSEventSubtypeApplicationActivated, NSEventSubtypeApplicationDeactivated, + NSEventSubtypeMouseEvent, NSEventSubtypePowerOff, NSEventSubtypeScreenChanged, + NSEventSubtypeTabletPoint, NSEventSubtypeTabletProximity, NSEventSubtypeTouch, + NSEventSubtypeWindowExposed, NSEventSubtypeWindowMoved, + NSEventSwipeTrackingClampGestureAmount, NSEventSwipeTrackingLockDirection, + NSEventSwipeTrackingOptions, NSEventType, NSEventTypeAppKitDefined, + NSEventTypeApplicationDefined, NSEventTypeBeginGesture, NSEventTypeChangeMode, + NSEventTypeCursorUpdate, NSEventTypeDirectTouch, NSEventTypeEndGesture, + NSEventTypeFlagsChanged, NSEventTypeGesture, NSEventTypeKeyDown, NSEventTypeKeyUp, + NSEventTypeLeftMouseDown, NSEventTypeLeftMouseDragged, NSEventTypeLeftMouseUp, + NSEventTypeMagnify, NSEventTypeMouseEntered, NSEventTypeMouseExited, NSEventTypeMouseMoved, + NSEventTypeOtherMouseDown, NSEventTypeOtherMouseDragged, NSEventTypeOtherMouseUp, + NSEventTypePeriodic, NSEventTypePressure, NSEventTypeQuickLook, NSEventTypeRightMouseDown, + NSEventTypeRightMouseDragged, NSEventTypeRightMouseUp, NSEventTypeRotate, + NSEventTypeScrollWheel, NSEventTypeSmartMagnify, NSEventTypeSwipe, + NSEventTypeSystemDefined, NSEventTypeTabletPoint, NSEventTypeTabletProximity, + NSExecuteFunctionKey, NSF10FunctionKey, NSF11FunctionKey, NSF12FunctionKey, + NSF13FunctionKey, NSF14FunctionKey, NSF15FunctionKey, NSF16FunctionKey, NSF17FunctionKey, + NSF18FunctionKey, NSF19FunctionKey, NSF1FunctionKey, NSF20FunctionKey, NSF21FunctionKey, + NSF22FunctionKey, NSF23FunctionKey, NSF24FunctionKey, NSF25FunctionKey, NSF26FunctionKey, + NSF27FunctionKey, NSF28FunctionKey, NSF29FunctionKey, NSF2FunctionKey, NSF30FunctionKey, + NSF31FunctionKey, NSF32FunctionKey, NSF33FunctionKey, NSF34FunctionKey, NSF35FunctionKey, + NSF3FunctionKey, NSF4FunctionKey, NSF5FunctionKey, NSF6FunctionKey, NSF7FunctionKey, + NSF8FunctionKey, NSF9FunctionKey, NSFindFunctionKey, NSHelpFunctionKey, NSHomeFunctionKey, + NSInsertCharFunctionKey, NSInsertFunctionKey, NSInsertLineFunctionKey, + NSLeftArrowFunctionKey, NSMenuFunctionKey, NSModeSwitchFunctionKey, NSNextFunctionKey, + NSPageDownFunctionKey, NSPageUpFunctionKey, NSPauseFunctionKey, NSPointingDeviceType, + NSPointingDeviceTypeCursor, NSPointingDeviceTypeEraser, NSPointingDeviceTypePen, + NSPointingDeviceTypeUnknown, NSPressureBehavior, NSPressureBehaviorPrimaryAccelerator, + NSPressureBehaviorPrimaryClick, NSPressureBehaviorPrimaryDeepClick, + NSPressureBehaviorPrimaryDeepDrag, NSPressureBehaviorPrimaryDefault, + NSPressureBehaviorPrimaryGeneric, NSPressureBehaviorUnknown, NSPrevFunctionKey, + NSPrintFunctionKey, NSPrintScreenFunctionKey, NSRedoFunctionKey, NSResetFunctionKey, + NSRightArrowFunctionKey, NSScrollLockFunctionKey, NSSelectFunctionKey, NSStopFunctionKey, + NSSysReqFunctionKey, NSSystemFunctionKey, NSUndoFunctionKey, NSUpArrowFunctionKey, + NSUserFunctionKey, + }; pub use super::NSFilePromiseProvider::{NSFilePromiseProvider, NSFilePromiseProviderDelegate}; pub use super::NSFilePromiseReceiver::NSFilePromiseReceiver; - pub use super::NSFont::NSFont; - pub use super::NSFontAssetRequest::NSFontAssetRequest; + pub use super::NSFont::{ + NSControlGlyph, NSFont, NSFontAntialiasedIntegerAdvancementsRenderingMode, + NSFontAntialiasedRenderingMode, NSFontDefaultRenderingMode, + NSFontIntegerAdvancementsRenderingMode, NSFontRenderingMode, NSMultibyteGlyphPacking, + NSNativeShortGlyphPacking, NSNullGlyph, + }; + pub use super::NSFontAssetRequest::{ + NSFontAssetRequest, NSFontAssetRequestOptionUsesStandardUI, NSFontAssetRequestOptions, + }; pub use super::NSFontCollection::{ NSFontCollection, NSFontCollectionActionTypeKey, NSFontCollectionMatchingOptionKey, - NSFontCollectionName, NSFontCollectionUserInfoKey, NSMutableFontCollection, + NSFontCollectionName, NSFontCollectionUserInfoKey, NSFontCollectionVisibility, + NSFontCollectionVisibilityComputer, NSFontCollectionVisibilityProcess, + NSFontCollectionVisibilityUser, NSMutableFontCollection, }; pub use super::NSFontDescriptor::{ - NSFontDescriptor, NSFontDescriptorAttributeName, NSFontDescriptorFeatureKey, - NSFontDescriptorSystemDesign, NSFontDescriptorTraitKey, NSFontDescriptorVariationKey, - NSFontFamilyClass, NSFontSymbolicTraits, NSFontTextStyle, NSFontTextStyleOptionKey, - NSFontWeight, + NSFontBoldTrait, NSFontClarendonSerifsClass, NSFontCondensedTrait, NSFontDescriptor, + NSFontDescriptorAttributeName, NSFontDescriptorClassClarendonSerifs, + NSFontDescriptorClassFreeformSerifs, NSFontDescriptorClassMask, + NSFontDescriptorClassModernSerifs, NSFontDescriptorClassOldStyleSerifs, + NSFontDescriptorClassOrnamentals, NSFontDescriptorClassSansSerif, + NSFontDescriptorClassScripts, NSFontDescriptorClassSlabSerifs, + NSFontDescriptorClassSymbolic, NSFontDescriptorClassTransitionalSerifs, + NSFontDescriptorClassUnknown, NSFontDescriptorFeatureKey, NSFontDescriptorSymbolicTraits, + NSFontDescriptorSystemDesign, NSFontDescriptorTraitBold, NSFontDescriptorTraitCondensed, + NSFontDescriptorTraitEmphasized, NSFontDescriptorTraitExpanded, + NSFontDescriptorTraitItalic, NSFontDescriptorTraitKey, NSFontDescriptorTraitLooseLeading, + NSFontDescriptorTraitMonoSpace, NSFontDescriptorTraitTightLeading, + NSFontDescriptorTraitUIOptimized, NSFontDescriptorTraitVertical, + NSFontDescriptorVariationKey, NSFontExpandedTrait, NSFontFamilyClass, + NSFontFamilyClassMask, NSFontFreeformSerifsClass, NSFontItalicTrait, + NSFontModernSerifsClass, NSFontMonoSpaceTrait, NSFontOldStyleSerifsClass, + NSFontOrnamentalsClass, NSFontSansSerifClass, NSFontScriptsClass, NSFontSlabSerifsClass, + NSFontSymbolicClass, NSFontSymbolicTraits, NSFontTextStyle, NSFontTextStyleOptionKey, + NSFontTransitionalSerifsClass, NSFontUIOptimizedTrait, NSFontUnknownClass, + NSFontVerticalTrait, NSFontWeight, + }; + pub use super::NSFontManager::{ + NSAddTraitFontAction, NSBoldFontMask, NSCompressedFontMask, NSCondensedFontMask, + NSExpandedFontMask, NSFixedPitchFontMask, NSFontAction, + NSFontCollectionApplicationOnlyMask, NSFontCollectionOptions, NSFontManager, + NSFontTraitMask, NSHeavierFontAction, NSItalicFontMask, NSLighterFontAction, + NSNarrowFontMask, NSNoFontChangeAction, NSNonStandardCharacterSetFontMask, + NSPosterFontMask, NSRemoveTraitFontAction, NSSizeDownFontAction, NSSizeUpFontAction, + NSSmallCapsFontMask, NSUnboldFontMask, NSUnitalicFontMask, NSViaPanelFontAction, + }; + pub use super::NSFontPanel::{ + NSFPCurrentField, NSFPPreviewButton, NSFPPreviewField, NSFPRevertButton, NSFPSetButton, + NSFPSizeField, NSFPSizeTitle, NSFontChanging, NSFontPanel, NSFontPanelAllEffectsModeMask, + NSFontPanelAllModesMask, NSFontPanelCollectionModeMask, + NSFontPanelDocumentColorEffectModeMask, NSFontPanelFaceModeMask, NSFontPanelModeMask, + NSFontPanelModeMaskAllEffects, NSFontPanelModeMaskCollection, + NSFontPanelModeMaskDocumentColorEffect, NSFontPanelModeMaskFace, + NSFontPanelModeMaskShadowEffect, NSFontPanelModeMaskSize, + NSFontPanelModeMaskStrikethroughEffect, NSFontPanelModeMaskTextColorEffect, + NSFontPanelModeMaskUnderlineEffect, NSFontPanelModesMaskAllModes, + NSFontPanelModesMaskStandardModes, NSFontPanelShadowEffectModeMask, + NSFontPanelSizeModeMask, NSFontPanelStandardModesMask, + NSFontPanelStrikethroughEffectModeMask, NSFontPanelTextColorEffectModeMask, + NSFontPanelUnderlineEffectModeMask, }; - pub use super::NSFontManager::NSFontManager; - pub use super::NSFontPanel::{NSFontChanging, NSFontPanel}; pub use super::NSForm::NSForm; pub use super::NSFormCell::NSFormCell; - pub use super::NSGestureRecognizer::{NSGestureRecognizer, NSGestureRecognizerDelegate}; - pub use super::NSGlyphGenerator::{NSGlyphGenerator, NSGlyphStorage}; - pub use super::NSGlyphInfo::NSGlyphInfo; - pub use super::NSGradient::NSGradient; - pub use super::NSGraphics::{NSColorSpaceName, NSDeviceDescriptionKey}; + pub use super::NSGestureRecognizer::{ + NSGestureRecognizer, NSGestureRecognizerDelegate, NSGestureRecognizerState, + NSGestureRecognizerStateBegan, NSGestureRecognizerStateCancelled, + NSGestureRecognizerStateChanged, NSGestureRecognizerStateEnded, + NSGestureRecognizerStateFailed, NSGestureRecognizerStatePossible, + NSGestureRecognizerStateRecognized, + }; + pub use super::NSGlyphGenerator::{ + NSGlyphGenerator, NSGlyphStorage, NSShowControlGlyphs, NSShowInvisibleGlyphs, + NSWantsBidiLevels, + }; + pub use super::NSGlyphInfo::{ + NSAdobeCNS1CharacterCollection, NSAdobeGB1CharacterCollection, + NSAdobeJapan1CharacterCollection, NSAdobeJapan2CharacterCollection, + NSAdobeKorea1CharacterCollection, NSCharacterCollection, NSGlyphInfo, + NSIdentityMappingCharacterCollection, + }; + pub use super::NSGradient::{ + NSGradient, NSGradientDrawingOptions, NSGradientDrawsAfterEndingLocation, + NSGradientDrawsBeforeStartingLocation, + }; + pub use super::NSGraphics::{ + NSAnimationEffect, NSAnimationEffectDisappearingItemDefault, NSAnimationEffectPoof, + NSBackingStoreBuffered, NSBackingStoreNonretained, NSBackingStoreRetained, + NSBackingStoreType, NSColorRenderingIntent, NSColorRenderingIntentAbsoluteColorimetric, + NSColorRenderingIntentDefault, NSColorRenderingIntentPerceptual, + NSColorRenderingIntentRelativeColorimetric, NSColorRenderingIntentSaturation, + NSColorSpaceName, NSCompositingOperation, NSCompositingOperationClear, + NSCompositingOperationColor, NSCompositingOperationColorBurn, + NSCompositingOperationColorDodge, NSCompositingOperationCopy, NSCompositingOperationDarken, + NSCompositingOperationDestinationAtop, NSCompositingOperationDestinationIn, + NSCompositingOperationDestinationOut, NSCompositingOperationDestinationOver, + NSCompositingOperationDifference, NSCompositingOperationExclusion, + NSCompositingOperationHardLight, NSCompositingOperationHighlight, + NSCompositingOperationHue, NSCompositingOperationLighten, NSCompositingOperationLuminosity, + NSCompositingOperationMultiply, NSCompositingOperationOverlay, + NSCompositingOperationPlusDarker, NSCompositingOperationPlusLighter, + NSCompositingOperationSaturation, NSCompositingOperationScreen, + NSCompositingOperationSoftLight, NSCompositingOperationSourceAtop, + NSCompositingOperationSourceIn, NSCompositingOperationSourceOut, + NSCompositingOperationSourceOver, NSCompositingOperationXOR, NSDeviceDescriptionKey, + NSDisplayGamut, NSDisplayGamutP3, NSDisplayGamutSRGB, NSFocusRingAbove, NSFocusRingBelow, + NSFocusRingOnly, NSFocusRingPlacement, NSFocusRingType, NSFocusRingTypeDefault, + NSFocusRingTypeExterior, NSFocusRingTypeNone, NSWindowAbove, NSWindowBelow, NSWindowDepth, + NSWindowDepthOnehundredtwentyeightBitRGB, NSWindowDepthSixtyfourBitRGB, + NSWindowDepthTwentyfourBitRGB, NSWindowOrderingMode, NSWindowOut, + }; pub use super::NSGraphicsContext::{ - NSGraphicsContext, NSGraphicsContextAttributeKey, NSGraphicsContextRepresentationFormatName, + NSGraphicsContext, NSGraphicsContextAttributeKey, + NSGraphicsContextRepresentationFormatName, NSImageInterpolation, + NSImageInterpolationDefault, NSImageInterpolationHigh, NSImageInterpolationLow, + NSImageInterpolationMedium, NSImageInterpolationNone, + }; + pub use super::NSGridView::{ + NSGridCell, NSGridCellPlacement, NSGridCellPlacementBottom, NSGridCellPlacementCenter, + NSGridCellPlacementFill, NSGridCellPlacementInherited, NSGridCellPlacementLeading, + NSGridCellPlacementNone, NSGridCellPlacementTop, NSGridCellPlacementTrailing, NSGridColumn, + NSGridRow, NSGridRowAlignment, NSGridRowAlignmentFirstBaseline, + NSGridRowAlignmentInherited, NSGridRowAlignmentLastBaseline, NSGridRowAlignmentNone, + NSGridView, }; - pub use super::NSGridView::{NSGridCell, NSGridColumn, NSGridRow, NSGridView}; pub use super::NSGroupTouchBarItem::NSGroupTouchBarItem; - pub use super::NSHapticFeedback::{NSHapticFeedbackManager, NSHapticFeedbackPerformer}; + pub use super::NSHapticFeedback::{ + NSHapticFeedbackManager, NSHapticFeedbackPattern, NSHapticFeedbackPatternAlignment, + NSHapticFeedbackPatternGeneric, NSHapticFeedbackPatternLevelChange, + NSHapticFeedbackPerformanceTime, NSHapticFeedbackPerformanceTimeDefault, + NSHapticFeedbackPerformanceTimeDrawCompleted, NSHapticFeedbackPerformanceTimeNow, + NSHapticFeedbackPerformer, + }; pub use super::NSHelpManager::{ NSHelpAnchorName, NSHelpBookName, NSHelpManager, NSHelpManagerContextHelpKey, }; - pub use super::NSImage::{NSImage, NSImageDelegate, NSImageName, NSImageSymbolConfiguration}; - pub use super::NSImageCell::NSImageCell; - pub use super::NSImageRep::{NSImageHintKey, NSImageRep}; + pub use super::NSImage::{ + NSImage, NSImageCacheAlways, NSImageCacheBySize, NSImageCacheDefault, NSImageCacheMode, + NSImageCacheNever, NSImageDelegate, NSImageLoadStatus, NSImageLoadStatusCancelled, + NSImageLoadStatusCompleted, NSImageLoadStatusInvalidData, NSImageLoadStatusReadError, + NSImageLoadStatusUnexpectedEOF, NSImageName, NSImageResizingMode, + NSImageResizingModeStretch, NSImageResizingModeTile, NSImageSymbolConfiguration, + NSImageSymbolScale, NSImageSymbolScaleLarge, NSImageSymbolScaleMedium, + NSImageSymbolScaleSmall, + }; + pub use super::NSImageCell::{ + NSImageAlignBottom, NSImageAlignBottomLeft, NSImageAlignBottomRight, NSImageAlignCenter, + NSImageAlignLeft, NSImageAlignRight, NSImageAlignTop, NSImageAlignTopLeft, + NSImageAlignTopRight, NSImageAlignment, NSImageCell, NSImageFrameButton, + NSImageFrameGrayBezel, NSImageFrameGroove, NSImageFrameNone, NSImageFramePhoto, + NSImageFrameStyle, + }; + pub use super::NSImageRep::{ + NSImageHintKey, NSImageLayoutDirection, NSImageLayoutDirectionLeftToRight, + NSImageLayoutDirectionRightToLeft, NSImageLayoutDirectionUnspecified, NSImageRep, + NSImageRepMatchesDevice, + }; pub use super::NSImageView::NSImageView; pub use super::NSInputManager::{NSInputManager, NSTextInput}; pub use super::NSInputServer::{ NSInputServer, NSInputServerMouseTracker, NSInputServiceProvider, }; - pub use super::NSInterfaceStyle::NSInterfaceStyle; + pub use super::NSInterfaceStyle::{ + NSInterfaceStyle, NSMacintoshInterfaceStyle, NSNextStepInterfaceStyle, NSNoInterfaceStyle, + NSWindows95InterfaceStyle, + }; pub use super::NSKeyValueBinding::{ NSBindingInfoKey, NSBindingName, NSBindingOption, NSBindingSelectionMarker, NSEditor, NSEditorRegistration, @@ -445,17 +830,65 @@ mod __exported { pub use super::NSLayoutAnchor::{ NSLayoutAnchor, NSLayoutDimension, NSLayoutXAxisAnchor, NSLayoutYAxisAnchor, }; - pub use super::NSLayoutConstraint::NSLayoutConstraint; + pub use super::NSLayoutConstraint::{ + NSLayoutAttribute, NSLayoutAttributeBaseline, NSLayoutAttributeBottom, + NSLayoutAttributeCenterX, NSLayoutAttributeCenterY, NSLayoutAttributeFirstBaseline, + NSLayoutAttributeHeight, NSLayoutAttributeLastBaseline, NSLayoutAttributeLeading, + NSLayoutAttributeLeft, NSLayoutAttributeNotAnAttribute, NSLayoutAttributeRight, + NSLayoutAttributeTop, NSLayoutAttributeTrailing, NSLayoutAttributeWidth, + NSLayoutConstraint, NSLayoutConstraintOrientation, NSLayoutConstraintOrientationHorizontal, + NSLayoutConstraintOrientationVertical, NSLayoutFormatAlignAllBaseline, + NSLayoutFormatAlignAllBottom, NSLayoutFormatAlignAllCenterX, NSLayoutFormatAlignAllCenterY, + NSLayoutFormatAlignAllFirstBaseline, NSLayoutFormatAlignAllLastBaseline, + NSLayoutFormatAlignAllLeading, NSLayoutFormatAlignAllLeft, NSLayoutFormatAlignAllRight, + NSLayoutFormatAlignAllTop, NSLayoutFormatAlignAllTrailing, NSLayoutFormatAlignmentMask, + NSLayoutFormatDirectionLeadingToTrailing, NSLayoutFormatDirectionLeftToRight, + NSLayoutFormatDirectionMask, NSLayoutFormatDirectionRightToLeft, NSLayoutFormatOptions, + NSLayoutRelation, NSLayoutRelationEqual, NSLayoutRelationGreaterThanOrEqual, + NSLayoutRelationLessThanOrEqual, + }; pub use super::NSLayoutGuide::NSLayoutGuide; pub use super::NSLayoutManager::{ - NSLayoutManager, NSLayoutManagerDelegate, NSTextLayoutOrientationProvider, + NSControlCharacterAction, NSControlCharacterActionContainerBreak, + NSControlCharacterActionHorizontalTab, NSControlCharacterActionLineBreak, + NSControlCharacterActionParagraphBreak, NSControlCharacterActionWhitespace, + NSControlCharacterActionZeroAdvancement, NSGlyphAttributeBidiLevel, + NSGlyphAttributeElastic, NSGlyphAttributeInscribe, NSGlyphAttributeSoft, + NSGlyphInscribeAbove, NSGlyphInscribeBase, NSGlyphInscribeBelow, NSGlyphInscribeOverBelow, + NSGlyphInscribeOverstrike, NSGlyphInscription, NSGlyphProperty, + NSGlyphPropertyControlCharacter, NSGlyphPropertyElastic, NSGlyphPropertyNonBaseCharacter, + NSGlyphPropertyNull, NSLayoutManager, NSLayoutManagerDelegate, NSTextLayoutOrientation, + NSTextLayoutOrientationHorizontal, NSTextLayoutOrientationProvider, + NSTextLayoutOrientationVertical, NSTypesetterBehavior, NSTypesetterBehavior_10_2, + NSTypesetterBehavior_10_2_WithCompatibility, NSTypesetterBehavior_10_3, + NSTypesetterBehavior_10_4, NSTypesetterLatestBehavior, NSTypesetterOriginalBehavior, + }; + pub use super::NSLevelIndicator::{ + NSLevelIndicator, NSLevelIndicatorPlaceholderVisibility, + NSLevelIndicatorPlaceholderVisibilityAlways, + NSLevelIndicatorPlaceholderVisibilityAutomatic, + NSLevelIndicatorPlaceholderVisibilityWhileEditing, + }; + pub use super::NSLevelIndicatorCell::{ + NSLevelIndicatorCell, NSLevelIndicatorStyle, NSLevelIndicatorStyleContinuousCapacity, + NSLevelIndicatorStyleDiscreteCapacity, NSLevelIndicatorStyleRating, + NSLevelIndicatorStyleRelevancy, }; - pub use super::NSLevelIndicator::NSLevelIndicator; - pub use super::NSLevelIndicatorCell::NSLevelIndicatorCell; pub use super::NSMagnificationGestureRecognizer::NSMagnificationGestureRecognizer; - pub use super::NSMatrix::{NSMatrix, NSMatrixDelegate}; - pub use super::NSMediaLibraryBrowserController::NSMediaLibraryBrowserController; - pub use super::NSMenu::{NSMenu, NSMenuDelegate, NSMenuItemValidation}; + pub use super::NSMatrix::{ + NSHighlightModeMatrix, NSListModeMatrix, NSMatrix, NSMatrixDelegate, NSMatrixMode, + NSRadioModeMatrix, NSTrackModeMatrix, + }; + pub use super::NSMediaLibraryBrowserController::{ + NSMediaLibrary, NSMediaLibraryAudio, NSMediaLibraryBrowserController, NSMediaLibraryImage, + NSMediaLibraryMovie, + }; + pub use super::NSMenu::{ + NSMenu, NSMenuDelegate, NSMenuItemValidation, NSMenuProperties, + NSMenuPropertyItemAccessibilityDescription, NSMenuPropertyItemAttributedTitle, + NSMenuPropertyItemEnabled, NSMenuPropertyItemImage, NSMenuPropertyItemKeyEquivalent, + NSMenuPropertyItemTitle, + }; pub use super::NSMenuItem::NSMenuItem; pub use super::NSMenuItemCell::NSMenuItemCell; pub use super::NSMenuToolbarItem::NSMenuToolbarItem; @@ -463,68 +896,178 @@ mod __exported { pub use super::NSNib::{NSNib, NSNibName}; pub use super::NSObjectController::NSObjectController; pub use super::NSOpenGL::{ - NSOpenGLContext, NSOpenGLPixelBuffer, NSOpenGLPixelFormat, NSOpenGLPixelFormatAttribute, + NSOpenGLContext, NSOpenGLContextParameter, NSOpenGLContextParameterCurrentRendererID, + NSOpenGLContextParameterGPUFragmentProcessing, NSOpenGLContextParameterGPUVertexProcessing, + NSOpenGLContextParameterHasDrawable, NSOpenGLContextParameterMPSwapsInFlight, + NSOpenGLContextParameterRasterizationEnable, NSOpenGLContextParameterReclaimResources, + NSOpenGLContextParameterStateValidation, NSOpenGLContextParameterSurfaceBackingSize, + NSOpenGLContextParameterSurfaceOpacity, NSOpenGLContextParameterSurfaceOrder, + NSOpenGLContextParameterSurfaceSurfaceVolatile, NSOpenGLContextParameterSwapInterval, + NSOpenGLContextParameterSwapRectangle, NSOpenGLContextParameterSwapRectangleEnable, + NSOpenGLGOClearFormatCache, NSOpenGLGOFormatCacheSize, NSOpenGLGOResetLibrary, + NSOpenGLGORetainRenderers, NSOpenGLGOUseBuildCache, NSOpenGLGlobalOption, + NSOpenGLPFAAccelerated, NSOpenGLPFAAcceleratedCompute, NSOpenGLPFAAccumSize, + NSOpenGLPFAAllRenderers, NSOpenGLPFAAllowOfflineRenderers, NSOpenGLPFAAlphaSize, + NSOpenGLPFAAuxBuffers, NSOpenGLPFAAuxDepthStencil, NSOpenGLPFABackingStore, + NSOpenGLPFAClosestPolicy, NSOpenGLPFAColorFloat, NSOpenGLPFAColorSize, + NSOpenGLPFACompliant, NSOpenGLPFADepthSize, NSOpenGLPFADoubleBuffer, NSOpenGLPFAFullScreen, + NSOpenGLPFAMPSafe, NSOpenGLPFAMaximumPolicy, NSOpenGLPFAMinimumPolicy, + NSOpenGLPFAMultiScreen, NSOpenGLPFAMultisample, NSOpenGLPFANoRecovery, + NSOpenGLPFAOffScreen, NSOpenGLPFAOpenGLProfile, NSOpenGLPFAPixelBuffer, + NSOpenGLPFARemotePixelBuffer, NSOpenGLPFARendererID, NSOpenGLPFARobust, + NSOpenGLPFASampleAlpha, NSOpenGLPFASampleBuffers, NSOpenGLPFASamples, + NSOpenGLPFAScreenMask, NSOpenGLPFASingleRenderer, NSOpenGLPFAStencilSize, + NSOpenGLPFAStereo, NSOpenGLPFASupersample, NSOpenGLPFATripleBuffer, + NSOpenGLPFAVirtualScreenCount, NSOpenGLPFAWindow, NSOpenGLPixelBuffer, NSOpenGLPixelFormat, + NSOpenGLPixelFormatAttribute, NSOpenGLProfileVersion3_2Core, NSOpenGLProfileVersion4_1Core, + NSOpenGLProfileVersionLegacy, }; pub use super::NSOpenGLLayer::NSOpenGLLayer; pub use super::NSOpenGLView::NSOpenGLView; pub use super::NSOpenPanel::NSOpenPanel; - pub use super::NSOutlineView::{NSOutlineView, NSOutlineViewDataSource, NSOutlineViewDelegate}; + pub use super::NSOutlineView::{ + NSOutlineView, NSOutlineViewDataSource, NSOutlineViewDelegate, NSOutlineViewDropOnItemIndex, + }; pub use super::NSPDFImageRep::NSPDFImageRep; pub use super::NSPDFInfo::NSPDFInfo; - pub use super::NSPDFPanel::NSPDFPanel; + pub use super::NSPDFPanel::{ + NSPDFPanel, NSPDFPanelOptions, NSPDFPanelRequestsParentDirectory, + NSPDFPanelShowsOrientation, NSPDFPanelShowsPaperSize, + }; pub use super::NSPICTImageRep::NSPICTImageRep; pub use super::NSPageController::{ NSPageController, NSPageControllerDelegate, NSPageControllerObjectIdentifier, + NSPageControllerTransitionStyle, NSPageControllerTransitionStyleHorizontalStrip, + NSPageControllerTransitionStyleStackBook, NSPageControllerTransitionStyleStackHistory, }; pub use super::NSPageLayout::NSPageLayout; pub use super::NSPanGestureRecognizer::NSPanGestureRecognizer; - pub use super::NSPanel::NSPanel; + pub use super::NSPanel::{ + NSAlertAlternateReturn, NSAlertDefaultReturn, NSAlertErrorReturn, NSAlertOtherReturn, + NSCancelButton, NSOKButton, NSPanel, + }; pub use super::NSParagraphStyle::{ - NSMutableParagraphStyle, NSParagraphStyle, NSTextTab, NSTextTabOptionKey, + NSCenterTabStopType, NSDecimalTabStopType, NSLeftTabStopType, NSLineBreakByCharWrapping, + NSLineBreakByClipping, NSLineBreakByTruncatingHead, NSLineBreakByTruncatingMiddle, + NSLineBreakByTruncatingTail, NSLineBreakByWordWrapping, NSLineBreakMode, + NSLineBreakStrategy, NSLineBreakStrategyHangulWordPriority, NSLineBreakStrategyNone, + NSLineBreakStrategyPushOut, NSLineBreakStrategyStandard, NSMutableParagraphStyle, + NSParagraphStyle, NSRightTabStopType, NSTextTab, NSTextTabOptionKey, NSTextTabType, }; pub use super::NSPasteboard::{ - NSPasteboard, NSPasteboardName, NSPasteboardReading, NSPasteboardReadingOptionKey, - NSPasteboardType, NSPasteboardTypeOwner, NSPasteboardWriting, + NSPasteboard, NSPasteboardContentsCurrentHostOnly, NSPasteboardContentsOptions, + NSPasteboardName, NSPasteboardReading, NSPasteboardReadingAsData, + NSPasteboardReadingAsKeyedArchive, NSPasteboardReadingAsPropertyList, + NSPasteboardReadingAsString, NSPasteboardReadingOptionKey, NSPasteboardReadingOptions, + NSPasteboardType, NSPasteboardTypeOwner, NSPasteboardWriting, NSPasteboardWritingOptions, + NSPasteboardWritingPromised, }; pub use super::NSPasteboardItem::{NSPasteboardItem, NSPasteboardItemDataProvider}; - pub use super::NSPathCell::{NSPathCell, NSPathCellDelegate}; + pub use super::NSPathCell::{ + NSPathCell, NSPathCellDelegate, NSPathStyle, NSPathStyleNavigationBar, NSPathStylePopUp, + NSPathStyleStandard, + }; pub use super::NSPathComponentCell::NSPathComponentCell; pub use super::NSPathControl::{NSPathControl, NSPathControlDelegate}; pub use super::NSPathControlItem::NSPathControlItem; pub use super::NSPersistentDocument::NSPersistentDocument; - pub use super::NSPickerTouchBarItem::NSPickerTouchBarItem; + pub use super::NSPickerTouchBarItem::{ + NSPickerTouchBarItem, NSPickerTouchBarItemControlRepresentation, + NSPickerTouchBarItemControlRepresentationAutomatic, + NSPickerTouchBarItemControlRepresentationCollapsed, + NSPickerTouchBarItemControlRepresentationExpanded, NSPickerTouchBarItemSelectionMode, + NSPickerTouchBarItemSelectionModeMomentary, NSPickerTouchBarItemSelectionModeSelectAny, + NSPickerTouchBarItemSelectionModeSelectOne, + }; pub use super::NSPopUpButton::NSPopUpButton; - pub use super::NSPopUpButtonCell::NSPopUpButtonCell; - pub use super::NSPopover::{NSPopover, NSPopoverCloseReasonValue, NSPopoverDelegate}; + pub use super::NSPopUpButtonCell::{ + NSPopUpArrowAtBottom, NSPopUpArrowAtCenter, NSPopUpArrowPosition, NSPopUpButtonCell, + NSPopUpNoArrow, + }; + pub use super::NSPopover::{ + NSPopover, NSPopoverAppearance, NSPopoverAppearanceHUD, NSPopoverAppearanceMinimal, + NSPopoverBehavior, NSPopoverBehaviorApplicationDefined, NSPopoverBehaviorSemitransient, + NSPopoverBehaviorTransient, NSPopoverCloseReasonValue, NSPopoverDelegate, + }; pub use super::NSPopoverTouchBarItem::NSPopoverTouchBarItem; pub use super::NSPredicateEditor::NSPredicateEditor; pub use super::NSPredicateEditorRowTemplate::NSPredicateEditorRowTemplate; pub use super::NSPressGestureRecognizer::NSPressGestureRecognizer; pub use super::NSPressureConfiguration::NSPressureConfiguration; pub use super::NSPrintInfo::{ - NSPrintInfo, NSPrintInfoAttributeKey, NSPrintInfoSettingKey, NSPrintJobDispositionValue, + NSLandscapeOrientation, NSPaperOrientation, NSPaperOrientationLandscape, + NSPaperOrientationPortrait, NSPortraitOrientation, NSPrintInfo, NSPrintInfoAttributeKey, + NSPrintInfoSettingKey, NSPrintJobDispositionValue, NSPrintingOrientation, + NSPrintingPaginationMode, NSPrintingPaginationModeAutomatic, NSPrintingPaginationModeClip, + NSPrintingPaginationModeFit, + }; + pub use super::NSPrintOperation::{ + NSAscendingPageOrder, NSDescendingPageOrder, NSPrintOperation, NSPrintRenderingQuality, + NSPrintRenderingQualityBest, NSPrintRenderingQualityResponsive, NSPrintingPageOrder, + NSSpecialPageOrder, NSUnknownPageOrder, }; - pub use super::NSPrintOperation::NSPrintOperation; pub use super::NSPrintPanel::{ NSPrintPanel, NSPrintPanelAccessorizing, NSPrintPanelAccessorySummaryKey, - NSPrintPanelJobStyleHint, + NSPrintPanelJobStyleHint, NSPrintPanelOptions, NSPrintPanelShowsCopies, + NSPrintPanelShowsOrientation, NSPrintPanelShowsPageRange, + NSPrintPanelShowsPageSetupAccessory, NSPrintPanelShowsPaperSize, NSPrintPanelShowsPreview, + NSPrintPanelShowsPrintSelection, NSPrintPanelShowsScaling, + }; + pub use super::NSPrinter::{ + NSPrinter, NSPrinterPaperName, NSPrinterTableError, NSPrinterTableNotFound, + NSPrinterTableOK, NSPrinterTableStatus, NSPrinterTypeName, + }; + pub use super::NSProgressIndicator::{ + NSProgressIndicator, NSProgressIndicatorPreferredAquaThickness, + NSProgressIndicatorPreferredLargeThickness, NSProgressIndicatorPreferredSmallThickness, + NSProgressIndicatorPreferredThickness, NSProgressIndicatorStyle, + NSProgressIndicatorStyleBar, NSProgressIndicatorStyleSpinning, + NSProgressIndicatorThickness, }; - pub use super::NSPrinter::{NSPrinter, NSPrinterPaperName, NSPrinterTypeName}; - pub use super::NSProgressIndicator::NSProgressIndicator; pub use super::NSResponder::{NSResponder, NSStandardKeyBindingResponding}; pub use super::NSRotationGestureRecognizer::NSRotationGestureRecognizer; pub use super::NSRuleEditor::{ - NSRuleEditor, NSRuleEditorDelegate, NSRuleEditorPredicatePartKey, + NSRuleEditor, NSRuleEditorDelegate, NSRuleEditorNestingMode, + NSRuleEditorNestingModeCompound, NSRuleEditorNestingModeList, + NSRuleEditorNestingModeSimple, NSRuleEditorNestingModeSingle, NSRuleEditorPredicatePartKey, + NSRuleEditorRowType, NSRuleEditorRowTypeCompound, NSRuleEditorRowTypeSimple, }; pub use super::NSRulerMarker::NSRulerMarker; - pub use super::NSRulerView::{NSRulerView, NSRulerViewUnitName}; - pub use super::NSRunningApplication::NSRunningApplication; - pub use super::NSSavePanel::{NSOpenSavePanelDelegate, NSSavePanel}; + pub use super::NSRulerView::{ + NSHorizontalRuler, NSRulerOrientation, NSRulerView, NSRulerViewUnitName, NSVerticalRuler, + }; + pub use super::NSRunningApplication::{ + NSApplicationActivateAllWindows, NSApplicationActivateIgnoringOtherApps, + NSApplicationActivationOptions, NSApplicationActivationPolicy, + NSApplicationActivationPolicyAccessory, NSApplicationActivationPolicyProhibited, + NSApplicationActivationPolicyRegular, NSRunningApplication, + }; + pub use super::NSSavePanel::{ + NSFileHandlingPanelCancelButton, NSFileHandlingPanelOKButton, NSOpenSavePanelDelegate, + NSSavePanel, + }; pub use super::NSScreen::NSScreen; - pub use super::NSScrollView::NSScrollView; - pub use super::NSScroller::NSScroller; + pub use super::NSScrollView::{ + NSScrollElasticity, NSScrollElasticityAllowed, NSScrollElasticityAutomatic, + NSScrollElasticityNone, NSScrollView, NSScrollViewFindBarPosition, + NSScrollViewFindBarPositionAboveContent, NSScrollViewFindBarPositionAboveHorizontalRuler, + NSScrollViewFindBarPositionBelowContent, + }; + pub use super::NSScroller::{ + NSAllScrollerParts, NSNoScrollerParts, NSOnlyScrollerArrows, NSScrollArrowPosition, + NSScroller, NSScrollerArrow, NSScrollerArrowsDefaultSetting, NSScrollerArrowsMaxEnd, + NSScrollerArrowsMinEnd, NSScrollerArrowsNone, NSScrollerDecrementArrow, + NSScrollerDecrementLine, NSScrollerDecrementPage, NSScrollerIncrementArrow, + NSScrollerIncrementLine, NSScrollerIncrementPage, NSScrollerKnob, NSScrollerKnobSlot, + NSScrollerKnobStyle, NSScrollerKnobStyleDark, NSScrollerKnobStyleDefault, + NSScrollerKnobStyleLight, NSScrollerNoPart, NSScrollerPart, NSScrollerStyle, + NSScrollerStyleLegacy, NSScrollerStyleOverlay, NSUsableScrollerParts, + }; pub use super::NSScrubber::{ - NSScrubber, NSScrubberDataSource, NSScrubberDelegate, NSScrubberSelectionStyle, + NSScrubber, NSScrubberAlignment, NSScrubberAlignmentCenter, NSScrubberAlignmentLeading, + NSScrubberAlignmentNone, NSScrubberAlignmentTrailing, NSScrubberDataSource, + NSScrubberDelegate, NSScrubberMode, NSScrubberModeFixed, NSScrubberModeFree, + NSScrubberSelectionStyle, }; pub use super::NSScrubberItemView::{ NSScrubberArrangedView, NSScrubberImageItemView, NSScrubberItemView, @@ -541,11 +1084,24 @@ mod __exported { pub use super::NSSearchToolbarItem::NSSearchToolbarItem; pub use super::NSSecureTextField::{NSSecureTextField, NSSecureTextFieldCell}; pub use super::NSSegmentedCell::NSSegmentedCell; - pub use super::NSSegmentedControl::NSSegmentedControl; + pub use super::NSSegmentedControl::{ + NSSegmentDistribution, NSSegmentDistributionFill, NSSegmentDistributionFillEqually, + NSSegmentDistributionFillProportionally, NSSegmentDistributionFit, NSSegmentStyle, + NSSegmentStyleAutomatic, NSSegmentStyleCapsule, NSSegmentStyleRoundRect, + NSSegmentStyleRounded, NSSegmentStyleSeparated, NSSegmentStyleSmallSquare, + NSSegmentStyleTexturedRounded, NSSegmentStyleTexturedSquare, NSSegmentSwitchTracking, + NSSegmentSwitchTrackingMomentary, NSSegmentSwitchTrackingMomentaryAccelerator, + NSSegmentSwitchTrackingSelectAny, NSSegmentSwitchTrackingSelectOne, NSSegmentedControl, + }; pub use super::NSShadow::NSShadow; pub use super::NSSharingService::{ - NSCloudSharingServiceDelegate, NSSharingService, NSSharingServiceDelegate, - NSSharingServiceName, NSSharingServicePicker, NSSharingServicePickerDelegate, + NSCloudKitSharingServiceAllowPrivate, NSCloudKitSharingServiceAllowPublic, + NSCloudKitSharingServiceAllowReadOnly, NSCloudKitSharingServiceAllowReadWrite, + NSCloudKitSharingServiceOptions, NSCloudKitSharingServiceStandard, + NSCloudSharingServiceDelegate, NSSharingContentScope, NSSharingContentScopeFull, + NSSharingContentScopeItem, NSSharingContentScopePartial, NSSharingService, + NSSharingServiceDelegate, NSSharingServiceName, NSSharingServicePicker, + NSSharingServicePickerDelegate, }; pub use super::NSSharingServicePickerToolbarItem::{ NSSharingServicePickerToolbarItem, NSSharingServicePickerToolbarItemDelegate, @@ -555,27 +1111,59 @@ mod __exported { }; pub use super::NSSlider::NSSlider; pub use super::NSSliderAccessory::{NSSliderAccessory, NSSliderAccessoryBehavior}; - pub use super::NSSliderCell::NSSliderCell; + pub use super::NSSliderCell::{ + NSSliderCell, NSSliderType, NSSliderTypeCircular, NSSliderTypeLinear, NSTickMarkPosition, + NSTickMarkPositionAbove, NSTickMarkPositionBelow, NSTickMarkPositionLeading, + NSTickMarkPositionTrailing, + }; pub use super::NSSliderTouchBarItem::{NSSliderAccessoryWidth, NSSliderTouchBarItem}; pub use super::NSSound::{ NSSound, NSSoundDelegate, NSSoundName, NSSoundPlaybackDeviceIdentifier, }; pub use super::NSSpeechRecognizer::{NSSpeechRecognizer, NSSpeechRecognizerDelegate}; pub use super::NSSpeechSynthesizer::{ - NSSpeechCommandDelimiterKey, NSSpeechDictionaryKey, NSSpeechErrorKey, NSSpeechMode, - NSSpeechPhonemeInfoKey, NSSpeechPropertyKey, NSSpeechStatusKey, NSSpeechSynthesizer, + NSSpeechBoundary, NSSpeechCommandDelimiterKey, NSSpeechDictionaryKey, NSSpeechErrorKey, + NSSpeechImmediateBoundary, NSSpeechMode, NSSpeechPhonemeInfoKey, NSSpeechPropertyKey, + NSSpeechSentenceBoundary, NSSpeechStatusKey, NSSpeechSynthesizer, NSSpeechSynthesizerDelegate, NSSpeechSynthesizerInfoKey, NSSpeechSynthesizerVoiceName, - NSVoiceAttributeKey, NSVoiceGenderName, + NSSpeechWordBoundary, NSVoiceAttributeKey, NSVoiceGenderName, + }; + pub use super::NSSpellChecker::{ + NSCorrectionIndicatorType, NSCorrectionIndicatorTypeDefault, + NSCorrectionIndicatorTypeGuesses, NSCorrectionIndicatorTypeReversion, NSCorrectionResponse, + NSCorrectionResponseAccepted, NSCorrectionResponseEdited, NSCorrectionResponseIgnored, + NSCorrectionResponseNone, NSCorrectionResponseRejected, NSCorrectionResponseReverted, + NSSpellChecker, NSTextCheckingOptionKey, }; - pub use super::NSSpellChecker::{NSSpellChecker, NSTextCheckingOptionKey}; pub use super::NSSpellProtocol::{NSChangeSpelling, NSIgnoreMisspelledWords}; - pub use super::NSSplitView::{NSSplitView, NSSplitViewAutosaveName, NSSplitViewDelegate}; + pub use super::NSSplitView::{ + NSSplitView, NSSplitViewAutosaveName, NSSplitViewDelegate, NSSplitViewDividerStyle, + NSSplitViewDividerStylePaneSplitter, NSSplitViewDividerStyleThick, + NSSplitViewDividerStyleThin, + }; pub use super::NSSplitViewController::NSSplitViewController; - pub use super::NSSplitViewItem::NSSplitViewItem; - pub use super::NSStackView::{NSStackView, NSStackViewDelegate}; + pub use super::NSSplitViewItem::{ + NSSplitViewItem, NSSplitViewItemBehavior, NSSplitViewItemBehaviorContentList, + NSSplitViewItemBehaviorDefault, NSSplitViewItemBehaviorSidebar, + NSSplitViewItemCollapseBehavior, NSSplitViewItemCollapseBehaviorDefault, + NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitView, + NSSplitViewItemCollapseBehaviorPreferResizingSplitViewWithFixedSiblings, + NSSplitViewItemCollapseBehaviorUseConstraints, + }; + pub use super::NSStackView::{ + NSStackView, NSStackViewDelegate, NSStackViewDistribution, + NSStackViewDistributionEqualCentering, NSStackViewDistributionEqualSpacing, + NSStackViewDistributionFill, NSStackViewDistributionFillEqually, + NSStackViewDistributionFillProportionally, NSStackViewDistributionGravityAreas, + NSStackViewGravity, NSStackViewGravityBottom, NSStackViewGravityCenter, + NSStackViewGravityLeading, NSStackViewGravityTop, NSStackViewGravityTrailing, + }; pub use super::NSStatusBar::NSStatusBar; pub use super::NSStatusBarButton::NSStatusBarButton; - pub use super::NSStatusItem::{NSStatusItem, NSStatusItemAutosaveName}; + pub use super::NSStatusItem::{ + NSStatusItem, NSStatusItemAutosaveName, NSStatusItemBehavior, + NSStatusItemBehaviorRemovalAllowed, NSStatusItemBehaviorTerminationOnRemoval, + }; pub use super::NSStepper::NSStepper; pub use super::NSStepperCell::NSStepperCell; pub use super::NSStepperTouchBarItem::NSStepperTouchBarItem; @@ -583,60 +1171,198 @@ mod __exported { pub use super::NSStoryboardSegue::{ NSSeguePerforming, NSStoryboardSegue, NSStoryboardSegueIdentifier, }; - pub use super::NSStringDrawing::NSStringDrawingContext; + pub use super::NSStringDrawing::{ + NSStringDrawingContext, NSStringDrawingDisableScreenFontSubstitution, + NSStringDrawingOneShot, NSStringDrawingOptions, NSStringDrawingTruncatesLastVisibleLine, + NSStringDrawingUsesDeviceMetrics, NSStringDrawingUsesFontLeading, + NSStringDrawingUsesLineFragmentOrigin, + }; pub use super::NSSwitch::NSSwitch; - pub use super::NSTabView::{NSTabView, NSTabViewDelegate}; - pub use super::NSTabViewController::NSTabViewController; - pub use super::NSTabViewItem::NSTabViewItem; + pub use super::NSTabView::{ + NSBottomTabsBezelBorder, NSLeftTabsBezelBorder, NSNoTabsBezelBorder, NSNoTabsLineBorder, + NSNoTabsNoBorder, NSRightTabsBezelBorder, NSTabPosition, NSTabPositionBottom, + NSTabPositionLeft, NSTabPositionNone, NSTabPositionRight, NSTabPositionTop, NSTabView, + NSTabViewBorderType, NSTabViewBorderTypeBezel, NSTabViewBorderTypeLine, + NSTabViewBorderTypeNone, NSTabViewDelegate, NSTabViewType, NSTopTabsBezelBorder, + }; + pub use super::NSTabViewController::{ + NSTabViewController, NSTabViewControllerTabStyle, + NSTabViewControllerTabStyleSegmentedControlOnBottom, + NSTabViewControllerTabStyleSegmentedControlOnTop, NSTabViewControllerTabStyleToolbar, + NSTabViewControllerTabStyleUnspecified, + }; + pub use super::NSTabViewItem::{ + NSBackgroundTab, NSPressedTab, NSSelectedTab, NSTabState, NSTabViewItem, + }; pub use super::NSTableCellView::NSTableCellView; - pub use super::NSTableColumn::NSTableColumn; + pub use super::NSTableColumn::{ + NSTableColumn, NSTableColumnAutoresizingMask, NSTableColumnNoResizing, + NSTableColumnResizingOptions, NSTableColumnUserResizingMask, + }; pub use super::NSTableHeaderCell::NSTableHeaderCell; pub use super::NSTableHeaderView::NSTableHeaderView; pub use super::NSTableRowView::NSTableRowView; pub use super::NSTableView::{ - NSTableView, NSTableViewAutosaveName, NSTableViewDataSource, NSTableViewDelegate, + NSTableRowActionEdge, NSTableRowActionEdgeLeading, NSTableRowActionEdgeTrailing, + NSTableView, NSTableViewAnimationEffectFade, NSTableViewAnimationEffectGap, + NSTableViewAnimationEffectNone, NSTableViewAnimationOptions, NSTableViewAnimationSlideDown, + NSTableViewAnimationSlideLeft, NSTableViewAnimationSlideRight, NSTableViewAnimationSlideUp, + NSTableViewAutosaveName, NSTableViewColumnAutoresizingStyle, + NSTableViewDashedHorizontalGridLineMask, NSTableViewDataSource, NSTableViewDelegate, + NSTableViewDraggingDestinationFeedbackStyle, + NSTableViewDraggingDestinationFeedbackStyleGap, + NSTableViewDraggingDestinationFeedbackStyleNone, + NSTableViewDraggingDestinationFeedbackStyleRegular, + NSTableViewDraggingDestinationFeedbackStyleSourceList, NSTableViewDropAbove, + NSTableViewDropOn, NSTableViewDropOperation, NSTableViewFirstColumnOnlyAutoresizingStyle, + NSTableViewGridLineStyle, NSTableViewGridNone, NSTableViewLastColumnOnlyAutoresizingStyle, + NSTableViewNoColumnAutoresizing, NSTableViewReverseSequentialColumnAutoresizingStyle, + NSTableViewRowSizeStyle, NSTableViewRowSizeStyleCustom, NSTableViewRowSizeStyleDefault, + NSTableViewRowSizeStyleLarge, NSTableViewRowSizeStyleMedium, NSTableViewRowSizeStyleSmall, + NSTableViewSelectionHighlightStyle, NSTableViewSelectionHighlightStyleNone, + NSTableViewSelectionHighlightStyleRegular, NSTableViewSelectionHighlightStyleSourceList, + NSTableViewSequentialColumnAutoresizingStyle, NSTableViewSolidHorizontalGridLineMask, + NSTableViewSolidVerticalGridLineMask, NSTableViewStyle, NSTableViewStyleAutomatic, + NSTableViewStyleFullWidth, NSTableViewStyleInset, NSTableViewStylePlain, + NSTableViewStyleSourceList, NSTableViewUniformColumnAutoresizingStyle, }; pub use super::NSTableViewDiffableDataSource::NSTableViewDiffableDataSource; - pub use super::NSTableViewRowAction::NSTableViewRowAction; - pub use super::NSText::{NSText, NSTextDelegate}; + pub use super::NSTableViewRowAction::{ + NSTableViewRowAction, NSTableViewRowActionStyle, NSTableViewRowActionStyleDestructive, + NSTableViewRowActionStyleRegular, + }; + pub use super::NSText::{ + NSBackTabCharacter, NSBackspaceCharacter, NSBacktabTextMovement, NSCancelTextMovement, + NSCarriageReturnCharacter, NSDeleteCharacter, NSDownTextMovement, NSEnterCharacter, + NSFormFeedCharacter, NSIllegalTextMovement, NSLeftTextMovement, NSLineSeparatorCharacter, + NSNewlineCharacter, NSOtherTextMovement, NSParagraphSeparatorCharacter, + NSReturnTextMovement, NSRightTextMovement, NSTabCharacter, NSTabTextMovement, NSText, + NSTextAlignment, NSTextAlignmentCenter, NSTextAlignmentJustified, NSTextAlignmentLeft, + NSTextAlignmentNatural, NSTextAlignmentRight, NSTextDelegate, NSTextMovement, + NSTextMovementBacktab, NSTextMovementCancel, NSTextMovementDown, NSTextMovementLeft, + NSTextMovementOther, NSTextMovementReturn, NSTextMovementRight, NSTextMovementTab, + NSTextMovementUp, NSTextWritingDirectionEmbedding, NSTextWritingDirectionOverride, + NSUpTextMovement, NSWritingDirection, NSWritingDirectionLeftToRight, + NSWritingDirectionNatural, NSWritingDirectionRightToLeft, + }; pub use super::NSTextAlternatives::NSTextAlternatives; pub use super::NSTextAttachment::{ - NSTextAttachment, NSTextAttachmentContainer, NSTextAttachmentLayout, + NSAttachmentCharacter, NSTextAttachment, NSTextAttachmentContainer, NSTextAttachmentLayout, NSTextAttachmentViewProvider, }; pub use super::NSTextAttachmentCell::NSTextAttachmentCell; - pub use super::NSTextCheckingClient::{NSTextCheckingClient, NSTextInputTraits}; + pub use super::NSTextCheckingClient::{ + NSTextCheckingClient, NSTextInputTraitType, NSTextInputTraitTypeDefault, + NSTextInputTraitTypeNo, NSTextInputTraitTypeYes, NSTextInputTraits, + }; pub use super::NSTextCheckingController::NSTextCheckingController; - pub use super::NSTextContainer::NSTextContainer; + pub use super::NSTextContainer::{ + NSLineDoesntMove, NSLineMovementDirection, NSLineMovesDown, NSLineMovesLeft, + NSLineMovesRight, NSLineMovesUp, NSLineSweepDirection, NSLineSweepDown, NSLineSweepLeft, + NSLineSweepRight, NSLineSweepUp, NSTextContainer, + }; pub use super::NSTextContent::{NSTextContent, NSTextContentType}; pub use super::NSTextContentManager::{ - NSTextContentManager, NSTextContentManagerDelegate, NSTextContentStorage, - NSTextContentStorageDelegate, NSTextElementProvider, + NSTextContentManager, NSTextContentManagerDelegate, NSTextContentManagerEnumerationOptions, + NSTextContentManagerEnumerationOptionsNone, NSTextContentManagerEnumerationOptionsReverse, + NSTextContentStorage, NSTextContentStorageDelegate, NSTextElementProvider, }; pub use super::NSTextElement::{NSTextElement, NSTextParagraph}; pub use super::NSTextField::{NSTextField, NSTextFieldDelegate}; - pub use super::NSTextFieldCell::NSTextFieldCell; + pub use super::NSTextFieldCell::{ + NSTextFieldBezelStyle, NSTextFieldCell, NSTextFieldRoundedBezel, NSTextFieldSquareBezel, + }; pub use super::NSTextFinder::{ - NSPasteboardTypeTextFinderOptionKey, NSTextFinder, NSTextFinderBarContainer, - NSTextFinderClient, + NSPasteboardTypeTextFinderOptionKey, NSTextFinder, NSTextFinderAction, + NSTextFinderActionHideFindInterface, NSTextFinderActionHideReplaceInterface, + NSTextFinderActionNextMatch, NSTextFinderActionPreviousMatch, NSTextFinderActionReplace, + NSTextFinderActionReplaceAll, NSTextFinderActionReplaceAllInSelection, + NSTextFinderActionReplaceAndFind, NSTextFinderActionSelectAll, + NSTextFinderActionSelectAllInSelection, NSTextFinderActionSetSearchString, + NSTextFinderActionShowFindInterface, NSTextFinderActionShowReplaceInterface, + NSTextFinderBarContainer, NSTextFinderClient, NSTextFinderMatchingType, + NSTextFinderMatchingTypeContains, NSTextFinderMatchingTypeEndsWith, + NSTextFinderMatchingTypeFullWord, NSTextFinderMatchingTypeStartsWith, }; pub use super::NSTextInputClient::NSTextInputClient; pub use super::NSTextInputContext::{NSTextInputContext, NSTextInputSourceIdentifier}; - pub use super::NSTextLayoutFragment::NSTextLayoutFragment; - pub use super::NSTextLayoutManager::{NSTextLayoutManager, NSTextLayoutManagerDelegate}; + pub use super::NSTextLayoutFragment::{ + NSTextLayoutFragment, NSTextLayoutFragmentEnumerationOptions, + NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment, + NSTextLayoutFragmentEnumerationOptionsEnsuresLayout, + NSTextLayoutFragmentEnumerationOptionsEstimatesSize, + NSTextLayoutFragmentEnumerationOptionsNone, NSTextLayoutFragmentEnumerationOptionsReverse, + NSTextLayoutFragmentState, NSTextLayoutFragmentStateCalculatedUsageBounds, + NSTextLayoutFragmentStateEstimatedUsageBounds, NSTextLayoutFragmentStateLayoutAvailable, + NSTextLayoutFragmentStateNone, + }; + pub use super::NSTextLayoutManager::{ + NSTextLayoutManager, NSTextLayoutManagerDelegate, NSTextLayoutManagerSegmentOptions, + NSTextLayoutManagerSegmentOptionsHeadSegmentExtended, + NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded, + NSTextLayoutManagerSegmentOptionsNone, NSTextLayoutManagerSegmentOptionsRangeNotRequired, + NSTextLayoutManagerSegmentOptionsTailSegmentExtended, + NSTextLayoutManagerSegmentOptionsUpstreamAffinity, NSTextLayoutManagerSegmentType, + NSTextLayoutManagerSegmentTypeHighlight, NSTextLayoutManagerSegmentTypeSelection, + NSTextLayoutManagerSegmentTypeStandard, + }; pub use super::NSTextLineFragment::NSTextLineFragment; - pub use super::NSTextList::{NSTextList, NSTextListMarkerFormat}; + pub use super::NSTextList::{ + NSTextList, NSTextListMarkerFormat, NSTextListOptions, NSTextListPrependEnclosingMarker, + }; pub use super::NSTextRange::{NSTextLocation, NSTextRange}; - pub use super::NSTextSelection::NSTextSelection; + pub use super::NSTextSelection::{ + NSTextSelection, NSTextSelectionAffinity, NSTextSelectionAffinityDownstream, + NSTextSelectionAffinityUpstream, NSTextSelectionGranularity, + NSTextSelectionGranularityCharacter, NSTextSelectionGranularityLine, + NSTextSelectionGranularityParagraph, NSTextSelectionGranularitySentence, + NSTextSelectionGranularityWord, + }; pub use super::NSTextSelectionNavigation::{ - NSTextSelectionDataSource, NSTextSelectionNavigation, + NSTextSelectionDataSource, NSTextSelectionNavigation, NSTextSelectionNavigationDestination, + NSTextSelectionNavigationDestinationCharacter, + NSTextSelectionNavigationDestinationContainer, + NSTextSelectionNavigationDestinationDocument, NSTextSelectionNavigationDestinationLine, + NSTextSelectionNavigationDestinationParagraph, + NSTextSelectionNavigationDestinationSentence, NSTextSelectionNavigationDestinationWord, + NSTextSelectionNavigationDirection, NSTextSelectionNavigationDirectionBackward, + NSTextSelectionNavigationDirectionDown, NSTextSelectionNavigationDirectionForward, + NSTextSelectionNavigationDirectionLeft, NSTextSelectionNavigationDirectionRight, + NSTextSelectionNavigationDirectionUp, NSTextSelectionNavigationLayoutOrientation, + NSTextSelectionNavigationLayoutOrientationHorizontal, + NSTextSelectionNavigationLayoutOrientationVertical, NSTextSelectionNavigationModifier, + NSTextSelectionNavigationModifierExtend, NSTextSelectionNavigationModifierMultiple, + NSTextSelectionNavigationModifierVisual, NSTextSelectionNavigationWritingDirection, + NSTextSelectionNavigationWritingDirectionLeftToRight, + NSTextSelectionNavigationWritingDirectionRightToLeft, }; pub use super::NSTextStorage::{ - NSTextStorage, NSTextStorageDelegate, NSTextStorageEditedOptions, NSTextStorageObserving, + NSTextStorage, NSTextStorageDelegate, NSTextStorageEditActions, + NSTextStorageEditedAttributes, NSTextStorageEditedCharacters, NSTextStorageEditedOptions, + NSTextStorageObserving, + }; + pub use super::NSTextTable::{ + NSTextBlock, NSTextBlockAbsoluteValueType, NSTextBlockBaselineAlignment, NSTextBlockBorder, + NSTextBlockBottomAlignment, NSTextBlockDimension, NSTextBlockHeight, NSTextBlockLayer, + NSTextBlockMargin, NSTextBlockMaximumHeight, NSTextBlockMaximumWidth, + NSTextBlockMiddleAlignment, NSTextBlockMinimumHeight, NSTextBlockMinimumWidth, + NSTextBlockPadding, NSTextBlockPercentageValueType, NSTextBlockTopAlignment, + NSTextBlockValueType, NSTextBlockVerticalAlignment, NSTextBlockWidth, NSTextTable, + NSTextTableAutomaticLayoutAlgorithm, NSTextTableBlock, NSTextTableFixedLayoutAlgorithm, + NSTextTableLayoutAlgorithm, }; - pub use super::NSTextTable::{NSTextBlock, NSTextTable, NSTextTableBlock}; pub use super::NSTextView::{ - NSPasteboardTypeFindPanelSearchOptionKey, NSTextView, NSTextViewDelegate, + NSFindPanelAction, NSFindPanelActionNext, NSFindPanelActionPrevious, + NSFindPanelActionReplace, NSFindPanelActionReplaceAll, + NSFindPanelActionReplaceAllInSelection, NSFindPanelActionReplaceAndFind, + NSFindPanelActionSelectAll, NSFindPanelActionSelectAllInSelection, + NSFindPanelActionSetFindString, NSFindPanelActionShowFindPanel, + NSFindPanelSubstringMatchType, NSFindPanelSubstringMatchTypeContains, + NSFindPanelSubstringMatchTypeEndsWith, NSFindPanelSubstringMatchTypeFullWord, + NSFindPanelSubstringMatchTypeStartsWith, NSPasteboardTypeFindPanelSearchOptionKey, + NSSelectByCharacter, NSSelectByParagraph, NSSelectByWord, NSSelectionAffinity, + NSSelectionAffinityDownstream, NSSelectionAffinityUpstream, NSSelectionGranularity, + NSTextView, NSTextViewDelegate, }; pub use super::NSTextViewportLayoutController::{ NSTextViewportLayoutController, NSTextViewportLayoutControllerDelegate, @@ -644,25 +1370,54 @@ mod __exported { pub use super::NSTintConfiguration::NSTintConfiguration; pub use super::NSTitlebarAccessoryViewController::NSTitlebarAccessoryViewController; pub use super::NSTokenField::{NSTokenField, NSTokenFieldDelegate}; - pub use super::NSTokenFieldCell::{NSTokenFieldCell, NSTokenFieldCellDelegate}; + pub use super::NSTokenFieldCell::{ + NSTokenFieldCell, NSTokenFieldCellDelegate, NSTokenStyle, NSTokenStyleDefault, + NSTokenStyleNone, NSTokenStylePlainSquared, NSTokenStyleRounded, NSTokenStyleSquared, + }; pub use super::NSToolbar::{ - NSToolbar, NSToolbarDelegate, NSToolbarIdentifier, NSToolbarItemIdentifier, + NSToolbar, NSToolbarDelegate, NSToolbarDisplayMode, NSToolbarDisplayModeDefault, + NSToolbarDisplayModeIconAndLabel, NSToolbarDisplayModeIconOnly, + NSToolbarDisplayModeLabelOnly, NSToolbarIdentifier, NSToolbarItemIdentifier, + NSToolbarSizeMode, NSToolbarSizeModeDefault, NSToolbarSizeModeRegular, + NSToolbarSizeModeSmall, }; pub use super::NSToolbarItem::{ NSCloudSharingValidation, NSToolbarItem, NSToolbarItemValidation, NSToolbarItemVisibilityPriority, }; - pub use super::NSToolbarItemGroup::NSToolbarItemGroup; - pub use super::NSTouch::NSTouch; + pub use super::NSToolbarItemGroup::{ + NSToolbarItemGroup, NSToolbarItemGroupControlRepresentation, + NSToolbarItemGroupControlRepresentationAutomatic, + NSToolbarItemGroupControlRepresentationCollapsed, + NSToolbarItemGroupControlRepresentationExpanded, NSToolbarItemGroupSelectionMode, + NSToolbarItemGroupSelectionModeMomentary, NSToolbarItemGroupSelectionModeSelectAny, + NSToolbarItemGroupSelectionModeSelectOne, + }; + pub use super::NSTouch::{ + NSTouch, NSTouchPhase, NSTouchPhaseAny, NSTouchPhaseBegan, NSTouchPhaseCancelled, + NSTouchPhaseEnded, NSTouchPhaseMoved, NSTouchPhaseStationary, NSTouchPhaseTouching, + NSTouchType, NSTouchTypeDirect, NSTouchTypeIndirect, NSTouchTypeMask, + NSTouchTypeMaskDirect, NSTouchTypeMaskIndirect, + }; pub use super::NSTouchBar::{ NSTouchBar, NSTouchBarCustomizationIdentifier, NSTouchBarDelegate, NSTouchBarProvider, }; pub use super::NSTouchBarItem::{NSTouchBarItem, NSTouchBarItemIdentifier}; - pub use super::NSTrackingArea::NSTrackingArea; + pub use super::NSTrackingArea::{ + NSTrackingActiveAlways, NSTrackingActiveInActiveApp, NSTrackingActiveInKeyWindow, + NSTrackingActiveWhenFirstResponder, NSTrackingArea, NSTrackingAreaOptions, + NSTrackingAssumeInside, NSTrackingCursorUpdate, NSTrackingEnabledDuringMouseDrag, + NSTrackingInVisibleRect, NSTrackingMouseEnteredAndExited, NSTrackingMouseMoved, + }; pub use super::NSTrackingSeparatorToolbarItem::NSTrackingSeparatorToolbarItem; pub use super::NSTreeController::NSTreeController; pub use super::NSTreeNode::NSTreeNode; - pub use super::NSTypesetter::NSTypesetter; + pub use super::NSTypesetter::{ + NSTypesetter, NSTypesetterContainerBreakAction, NSTypesetterControlCharacterAction, + NSTypesetterHorizontalTabAction, NSTypesetterLineBreakAction, + NSTypesetterParagraphBreakAction, NSTypesetterWhitespaceAction, + NSTypesetterZeroAdvancementAction, + }; pub use super::NSUserActivity::NSUserActivityRestoring; pub use super::NSUserDefaultsController::NSUserDefaultsController; pub use super::NSUserInterfaceCompression::{ @@ -672,26 +1427,109 @@ mod __exported { NSUserInterfaceItemIdentification, NSUserInterfaceItemIdentifier, }; pub use super::NSUserInterfaceItemSearching::NSUserInterfaceItemSearching; + pub use super::NSUserInterfaceLayout::{ + NSUserInterfaceLayoutDirection, NSUserInterfaceLayoutDirectionLeftToRight, + NSUserInterfaceLayoutDirectionRightToLeft, NSUserInterfaceLayoutOrientation, + NSUserInterfaceLayoutOrientationHorizontal, NSUserInterfaceLayoutOrientationVertical, + }; pub use super::NSUserInterfaceValidation::{ NSUserInterfaceValidations, NSValidatedUserInterfaceItem, }; pub use super::NSView::{ - NSDefinitionOptionKey, NSDefinitionPresentationType, NSToolTipTag, NSTrackingRectTag, - NSView, NSViewFullScreenModeOptionKey, NSViewLayerContentScaleDelegate, NSViewToolTipOwner, + NSAutoresizingMaskOptions, NSBezelBorder, NSBorderType, NSDefinitionOptionKey, + NSDefinitionPresentationType, NSGrooveBorder, NSLineBorder, NSNoBorder, NSToolTipTag, + NSTrackingRectTag, NSView, NSViewFullScreenModeOptionKey, NSViewHeightSizable, + NSViewLayerContentScaleDelegate, NSViewLayerContentsPlacement, + NSViewLayerContentsPlacementBottom, NSViewLayerContentsPlacementBottomLeft, + NSViewLayerContentsPlacementBottomRight, NSViewLayerContentsPlacementCenter, + NSViewLayerContentsPlacementLeft, NSViewLayerContentsPlacementRight, + NSViewLayerContentsPlacementScaleAxesIndependently, + NSViewLayerContentsPlacementScaleProportionallyToFill, + NSViewLayerContentsPlacementScaleProportionallyToFit, NSViewLayerContentsPlacementTop, + NSViewLayerContentsPlacementTopLeft, NSViewLayerContentsPlacementTopRight, + NSViewLayerContentsRedrawBeforeViewResize, NSViewLayerContentsRedrawCrossfade, + NSViewLayerContentsRedrawDuringViewResize, NSViewLayerContentsRedrawNever, + NSViewLayerContentsRedrawOnSetNeedsDisplay, NSViewLayerContentsRedrawPolicy, + NSViewMaxXMargin, NSViewMaxYMargin, NSViewMinXMargin, NSViewMinYMargin, NSViewNotSizable, + NSViewToolTipOwner, NSViewWidthSizable, + }; + pub use super::NSViewController::{ + NSViewController, NSViewControllerPresentationAnimator, + NSViewControllerTransitionAllowUserInteraction, NSViewControllerTransitionCrossfade, + NSViewControllerTransitionNone, NSViewControllerTransitionOptions, + NSViewControllerTransitionSlideBackward, NSViewControllerTransitionSlideDown, + NSViewControllerTransitionSlideForward, NSViewControllerTransitionSlideLeft, + NSViewControllerTransitionSlideRight, NSViewControllerTransitionSlideUp, + }; + pub use super::NSVisualEffectView::{ + NSVisualEffectBlendingMode, NSVisualEffectBlendingModeBehindWindow, + NSVisualEffectBlendingModeWithinWindow, NSVisualEffectMaterial, + NSVisualEffectMaterialAppearanceBased, NSVisualEffectMaterialContentBackground, + NSVisualEffectMaterialDark, NSVisualEffectMaterialFullScreenUI, + NSVisualEffectMaterialHUDWindow, NSVisualEffectMaterialHeaderView, + NSVisualEffectMaterialLight, NSVisualEffectMaterialMediumLight, NSVisualEffectMaterialMenu, + NSVisualEffectMaterialPopover, NSVisualEffectMaterialSelection, + NSVisualEffectMaterialSheet, NSVisualEffectMaterialSidebar, NSVisualEffectMaterialTitlebar, + NSVisualEffectMaterialToolTip, NSVisualEffectMaterialUltraDark, + NSVisualEffectMaterialUnderPageBackground, NSVisualEffectMaterialUnderWindowBackground, + NSVisualEffectMaterialWindowBackground, NSVisualEffectState, NSVisualEffectStateActive, + NSVisualEffectStateFollowsWindowActiveState, NSVisualEffectStateInactive, + NSVisualEffectView, }; - pub use super::NSViewController::{NSViewController, NSViewControllerPresentationAnimator}; - pub use super::NSVisualEffectView::NSVisualEffectView; pub use super::NSWindow::{ - NSWindow, NSWindowDelegate, NSWindowFrameAutosaveName, NSWindowLevel, - NSWindowPersistableFrameDescriptor, NSWindowTabbingIdentifier, + NSDirectSelection, NSDisplayWindowRunLoopOrdering, NSResetCursorRectsRunLoopOrdering, + NSSelectingNext, NSSelectingPrevious, NSSelectionDirection, NSTitlebarSeparatorStyle, + NSTitlebarSeparatorStyleAutomatic, NSTitlebarSeparatorStyleLine, + NSTitlebarSeparatorStyleNone, NSTitlebarSeparatorStyleShadow, NSWindow, + NSWindowAnimationBehavior, NSWindowAnimationBehaviorAlertPanel, + NSWindowAnimationBehaviorDefault, NSWindowAnimationBehaviorDocumentWindow, + NSWindowAnimationBehaviorNone, NSWindowAnimationBehaviorUtilityWindow, + NSWindowBackingLocation, NSWindowBackingLocationDefault, NSWindowBackingLocationMainMemory, + NSWindowBackingLocationVideoMemory, NSWindowButton, NSWindowCloseButton, + NSWindowCollectionBehavior, NSWindowCollectionBehaviorCanJoinAllSpaces, + NSWindowCollectionBehaviorDefault, NSWindowCollectionBehaviorFullScreenAllowsTiling, + NSWindowCollectionBehaviorFullScreenAuxiliary, + NSWindowCollectionBehaviorFullScreenDisallowsTiling, + NSWindowCollectionBehaviorFullScreenNone, NSWindowCollectionBehaviorFullScreenPrimary, + NSWindowCollectionBehaviorIgnoresCycle, NSWindowCollectionBehaviorManaged, + NSWindowCollectionBehaviorMoveToActiveSpace, NSWindowCollectionBehaviorParticipatesInCycle, + NSWindowCollectionBehaviorStationary, NSWindowCollectionBehaviorTransient, + NSWindowDelegate, NSWindowDocumentIconButton, NSWindowDocumentVersionsButton, + NSWindowFrameAutosaveName, NSWindowLevel, NSWindowMiniaturizeButton, + NSWindowNumberListAllApplications, NSWindowNumberListAllSpaces, NSWindowNumberListOptions, + NSWindowOcclusionState, NSWindowOcclusionStateVisible, NSWindowPersistableFrameDescriptor, + NSWindowSharingNone, NSWindowSharingReadOnly, NSWindowSharingReadWrite, + NSWindowSharingType, NSWindowStyleMask, NSWindowStyleMaskBorderless, + NSWindowStyleMaskClosable, NSWindowStyleMaskDocModalWindow, NSWindowStyleMaskFullScreen, + NSWindowStyleMaskFullSizeContentView, NSWindowStyleMaskHUDWindow, + NSWindowStyleMaskMiniaturizable, NSWindowStyleMaskNonactivatingPanel, + NSWindowStyleMaskResizable, NSWindowStyleMaskTexturedBackground, NSWindowStyleMaskTitled, + NSWindowStyleMaskUnifiedTitleAndToolbar, NSWindowStyleMaskUtilityWindow, + NSWindowTabbingIdentifier, NSWindowTabbingMode, NSWindowTabbingModeAutomatic, + NSWindowTabbingModeDisallowed, NSWindowTabbingModePreferred, NSWindowTitleHidden, + NSWindowTitleVisibility, NSWindowTitleVisible, NSWindowToolbarButton, NSWindowToolbarStyle, + NSWindowToolbarStyleAutomatic, NSWindowToolbarStyleExpanded, + NSWindowToolbarStylePreference, NSWindowToolbarStyleUnified, + NSWindowToolbarStyleUnifiedCompact, NSWindowUserTabbingPreference, + NSWindowUserTabbingPreferenceAlways, NSWindowUserTabbingPreferenceInFullScreen, + NSWindowUserTabbingPreferenceManual, NSWindowZoomButton, }; pub use super::NSWindowController::NSWindowController; pub use super::NSWindowRestoration::NSWindowRestoration; pub use super::NSWindowTab::NSWindowTab; pub use super::NSWindowTabGroup::NSWindowTabGroup; pub use super::NSWorkspace::{ - NSWorkspace, NSWorkspaceAuthorization, NSWorkspaceDesktopImageOptionKey, - NSWorkspaceFileOperationName, NSWorkspaceLaunchConfigurationKey, - NSWorkspaceOpenConfiguration, + NSExclude10_4ElementsIconCreationOption, NSExcludeQuickDrawElementsIconCreationOption, + NSWorkspace, NSWorkspaceAuthorization, NSWorkspaceAuthorizationType, + NSWorkspaceAuthorizationTypeCreateSymbolicLink, NSWorkspaceAuthorizationTypeReplaceFile, + NSWorkspaceAuthorizationTypeSetAttributes, NSWorkspaceDesktopImageOptionKey, + NSWorkspaceFileOperationName, NSWorkspaceIconCreationOptions, + NSWorkspaceLaunchAllowingClassicStartup, NSWorkspaceLaunchAndHide, + NSWorkspaceLaunchAndHideOthers, NSWorkspaceLaunchAndPrint, NSWorkspaceLaunchAsync, + NSWorkspaceLaunchConfigurationKey, NSWorkspaceLaunchDefault, + NSWorkspaceLaunchInhibitingBackgroundOnly, NSWorkspaceLaunchNewInstance, + NSWorkspaceLaunchOptions, NSWorkspaceLaunchPreferringClassic, + NSWorkspaceLaunchWithErrorPresentation, NSWorkspaceLaunchWithoutActivation, + NSWorkspaceLaunchWithoutAddingToRecents, NSWorkspaceOpenConfiguration, }; } diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs index 9810872e4..089fce670 100644 --- a/crates/icrate/src/generated/Foundation/FoundationErrors.rs +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -4,3 +4,87 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + +pub const NSFileNoSuchFileError: i32 = 4; +pub const NSFileLockingError: i32 = 255; +pub const NSFileReadUnknownError: i32 = 256; +pub const NSFileReadNoPermissionError: i32 = 257; +pub const NSFileReadInvalidFileNameError: i32 = 258; +pub const NSFileReadCorruptFileError: i32 = 259; +pub const NSFileReadNoSuchFileError: i32 = 260; +pub const NSFileReadInapplicableStringEncodingError: i32 = 261; +pub const NSFileReadUnsupportedSchemeError: i32 = 262; +pub const NSFileReadTooLargeError: i32 = 263; +pub const NSFileReadUnknownStringEncodingError: i32 = 264; +pub const NSFileWriteUnknownError: i32 = 512; +pub const NSFileWriteNoPermissionError: i32 = 513; +pub const NSFileWriteInvalidFileNameError: i32 = 514; +pub const NSFileWriteFileExistsError: i32 = 516; +pub const NSFileWriteInapplicableStringEncodingError: i32 = 517; +pub const NSFileWriteUnsupportedSchemeError: i32 = 518; +pub const NSFileWriteOutOfSpaceError: i32 = 640; +pub const NSFileWriteVolumeReadOnlyError: i32 = 642; +pub const NSFileManagerUnmountUnknownError: i32 = 768; +pub const NSFileManagerUnmountBusyError: i32 = 769; +pub const NSKeyValueValidationError: i32 = 1024; +pub const NSFormattingError: i32 = 2048; +pub const NSUserCancelledError: i32 = 3072; +pub const NSFeatureUnsupportedError: i32 = 3328; +pub const NSExecutableNotLoadableError: i32 = 3584; +pub const NSExecutableArchitectureMismatchError: i32 = 3585; +pub const NSExecutableRuntimeMismatchError: i32 = 3586; +pub const NSExecutableLoadError: i32 = 3587; +pub const NSExecutableLinkError: i32 = 3588; +pub const NSFileErrorMinimum: i32 = 0; +pub const NSFileErrorMaximum: i32 = 1023; +pub const NSValidationErrorMinimum: i32 = 1024; +pub const NSValidationErrorMaximum: i32 = 2047; +pub const NSExecutableErrorMinimum: i32 = 3584; +pub const NSExecutableErrorMaximum: i32 = 3839; +pub const NSFormattingErrorMinimum: i32 = 2048; +pub const NSFormattingErrorMaximum: i32 = 2559; +pub const NSPropertyListReadCorruptError: i32 = 3840; +pub const NSPropertyListReadUnknownVersionError: i32 = 3841; +pub const NSPropertyListReadStreamError: i32 = 3842; +pub const NSPropertyListWriteStreamError: i32 = 3851; +pub const NSPropertyListWriteInvalidError: i32 = 3852; +pub const NSPropertyListErrorMinimum: i32 = 3840; +pub const NSPropertyListErrorMaximum: i32 = 4095; +pub const NSXPCConnectionInterrupted: i32 = 4097; +pub const NSXPCConnectionInvalid: i32 = 4099; +pub const NSXPCConnectionReplyInvalid: i32 = 4101; +pub const NSXPCConnectionErrorMinimum: i32 = 4096; +pub const NSXPCConnectionErrorMaximum: i32 = 4224; +pub const NSUbiquitousFileUnavailableError: i32 = 4353; +pub const NSUbiquitousFileNotUploadedDueToQuotaError: i32 = 4354; +pub const NSUbiquitousFileUbiquityServerNotAvailable: i32 = 4355; +pub const NSUbiquitousFileErrorMinimum: i32 = 4352; +pub const NSUbiquitousFileErrorMaximum: i32 = 4607; +pub const NSUserActivityHandoffFailedError: i32 = 4608; +pub const NSUserActivityConnectionUnavailableError: i32 = 4609; +pub const NSUserActivityRemoteApplicationTimedOutError: i32 = 4610; +pub const NSUserActivityHandoffUserInfoTooLargeError: i32 = 4611; +pub const NSUserActivityErrorMinimum: i32 = 4608; +pub const NSUserActivityErrorMaximum: i32 = 4863; +pub const NSCoderReadCorruptError: i32 = 4864; +pub const NSCoderValueNotFoundError: i32 = 4865; +pub const NSCoderInvalidValueError: i32 = 4866; +pub const NSCoderErrorMinimum: i32 = 4864; +pub const NSCoderErrorMaximum: i32 = 4991; +pub const NSBundleErrorMinimum: i32 = 4992; +pub const NSBundleErrorMaximum: i32 = 5119; +pub const NSBundleOnDemandResourceOutOfSpaceError: i32 = 4992; +pub const NSBundleOnDemandResourceExceededMaximumSizeError: i32 = 4993; +pub const NSBundleOnDemandResourceInvalidTagError: i32 = 4994; +pub const NSCloudSharingNetworkFailureError: i32 = 5120; +pub const NSCloudSharingQuotaExceededError: i32 = 5121; +pub const NSCloudSharingTooManyParticipantsError: i32 = 5122; +pub const NSCloudSharingConflictError: i32 = 5123; +pub const NSCloudSharingNoPermissionError: i32 = 5124; +pub const NSCloudSharingOtherError: i32 = 5375; +pub const NSCloudSharingErrorMinimum: i32 = 5120; +pub const NSCloudSharingErrorMaximum: i32 = 5375; +pub const NSCompressionFailedError: i32 = 5376; +pub const NSDecompressionFailedError: i32 = 5377; +pub const NSCompressionErrorMinimum: i32 = 5376; +pub const NSCompressionErrorMaximum: i32 = 5503; diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 0f1101619..b13576d4e 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -5,6 +5,19 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSAppleEventDescriptor; diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 5236a205c..b20fd1765 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -37,6 +37,11 @@ extern_methods!( } ); +pub type NSBinarySearchingOptions = NSUInteger; +pub const NSBinarySearchingFirstEqual: NSBinarySearchingOptions = 256; +pub const NSBinarySearchingLastEqual: NSBinarySearchingOptions = 512; +pub const NSBinarySearchingInsertionIndex: NSBinarySearchingOptions = 1024; + extern_methods!( /// NSExtendedArray unsafe impl NSArray { diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index fb7e50277..ab95da0e3 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -30,6 +30,11 @@ extern_methods!( } ); +pub type NSAttributedStringEnumerationOptions = NSUInteger; +pub const NSAttributedStringEnumerationReverse: NSAttributedStringEnumerationOptions = 2; +pub const NSAttributedStringEnumerationLongestEffectiveRangeNotRequired: + NSAttributedStringEnumerationOptions = 1048576; + extern_methods!( /// NSExtendedAttributedString unsafe impl NSAttributedString { @@ -183,6 +188,30 @@ 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 type NSAttributedStringMarkdownParsingFailurePolicy = NSInteger; +pub const NSAttributedStringMarkdownParsingFailureReturnError: + NSAttributedStringMarkdownParsingFailurePolicy = 0; +pub const NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible: + NSAttributedStringMarkdownParsingFailurePolicy = 1; + +pub type NSAttributedStringMarkdownInterpretedSyntax = NSInteger; +pub const NSAttributedStringMarkdownInterpretedSyntaxFull: + NSAttributedStringMarkdownInterpretedSyntax = 0; +pub const NSAttributedStringMarkdownInterpretedSyntaxInlineOnly: + NSAttributedStringMarkdownInterpretedSyntax = 1; +pub const NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace: + NSAttributedStringMarkdownInterpretedSyntax = 2; + extern_class!( #[derive(Debug)] pub struct NSAttributedStringMarkdownParsingOptions; @@ -258,6 +287,12 @@ extern_methods!( } ); +pub type NSAttributedStringFormattingOptions = NSUInteger; +pub const NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging: + NSAttributedStringFormattingOptions = 1; +pub const NSAttributedStringFormattingApplyReplacementIndexAttribute: + NSAttributedStringFormattingOptions = 2; + extern_methods!( /// NSAttributedStringFormatting unsafe impl NSAttributedString { @@ -285,6 +320,28 @@ extern_methods!( } ); +pub type NSPresentationIntentKind = NSInteger; +pub const NSPresentationIntentKindParagraph: NSPresentationIntentKind = 0; +pub const NSPresentationIntentKindHeader: NSPresentationIntentKind = 1; +pub const NSPresentationIntentKindOrderedList: NSPresentationIntentKind = 2; +pub const NSPresentationIntentKindUnorderedList: NSPresentationIntentKind = 3; +pub const NSPresentationIntentKindListItem: NSPresentationIntentKind = 4; +pub const NSPresentationIntentKindCodeBlock: NSPresentationIntentKind = 5; +pub const NSPresentationIntentKindBlockQuote: NSPresentationIntentKind = 6; +pub const NSPresentationIntentKindThematicBreak: NSPresentationIntentKind = 7; +pub const NSPresentationIntentKindTable: NSPresentationIntentKind = 8; +pub const NSPresentationIntentKindTableHeaderRow: NSPresentationIntentKind = 9; +pub const NSPresentationIntentKindTableRow: NSPresentationIntentKind = 10; +pub const NSPresentationIntentKindTableCell: NSPresentationIntentKind = 11; + +pub type NSPresentationIntentTableColumnAlignment = NSInteger; +pub const NSPresentationIntentTableColumnAlignmentLeft: NSPresentationIntentTableColumnAlignment = + 0; +pub const NSPresentationIntentTableColumnAlignmentCenter: NSPresentationIntentTableColumnAlignment = + 1; +pub const NSPresentationIntentTableColumnAlignmentRight: NSPresentationIntentTableColumnAlignment = + 2; + extern_class!( #[derive(Debug)] pub struct NSPresentationIntent; diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index ed74dca35..1dd2f4016 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSBackgroundActivityResult = NSInteger; +pub const NSBackgroundActivityResultFinished: NSBackgroundActivityResult = 1; +pub const NSBackgroundActivityResultDeferred: NSBackgroundActivityResult = 2; + extern_class!( #[derive(Debug)] pub struct NSBackgroundActivityScheduler; diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 93e42242c..5d663d286 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -5,6 +5,12 @@ 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; + extern_class!( #[derive(Debug)] pub struct NSBundle; diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 9bfdbce39..5fa652e45 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -5,6 +5,25 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSByteCountFormatterCountStyle = NSInteger; +pub const NSByteCountFormatterCountStyleFile: NSByteCountFormatterCountStyle = 0; +pub const NSByteCountFormatterCountStyleMemory: NSByteCountFormatterCountStyle = 1; +pub const NSByteCountFormatterCountStyleDecimal: NSByteCountFormatterCountStyle = 2; +pub const NSByteCountFormatterCountStyleBinary: NSByteCountFormatterCountStyle = 3; + extern_class!( #[derive(Debug)] pub struct NSByteCountFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index 9810872e4..01f0f4bb4 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -4,3 +4,7 @@ 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; diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index fdce11bbd..eef303031 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -7,6 +7,52 @@ 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 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 NSWrapCalendarComponents: i32 = 1; + extern_class!( #[derive(Debug)] pub struct NSCalendar; @@ -385,6 +431,9 @@ extern_methods!( } ); +pub const NSDateComponentUndefined: i32 = 9223372036854775807; +pub const NSUndefinedDateComponent: i32 = 9223372036854775807; + extern_class!( #[derive(Debug)] pub struct NSDateComponents; diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 1e1b1d9f1..0ddf323ca 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -5,6 +5,8 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub const NSOpenStepUnicodeReservedBase: i32 = 62464; + extern_class!( #[derive(Debug)] pub struct NSCharacterSet; diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 10f48220d..e7837480d 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSDecodingFailurePolicy = NSInteger; +pub const NSDecodingFailurePolicyRaiseException: NSDecodingFailurePolicy = 0; +pub const NSDecodingFailurePolicySetErrorAndReturn: NSDecodingFailurePolicy = 1; + extern_class!( #[derive(Debug)] pub struct NSCoder; diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index 0b3f7f11a..38b1c0fe5 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -5,6 +5,32 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSComparisonPredicateModifier = NSUInteger; +pub const NSDirectPredicateModifier: NSComparisonPredicateModifier = 0; +pub const NSAllPredicateModifier: NSComparisonPredicateModifier = 1; +pub const NSAnyPredicateModifier: NSComparisonPredicateModifier = 2; + +pub type NSPredicateOperatorType = NSUInteger; +pub const NSLessThanPredicateOperatorType: NSPredicateOperatorType = 0; +pub const NSLessThanOrEqualToPredicateOperatorType: NSPredicateOperatorType = 1; +pub const NSGreaterThanPredicateOperatorType: NSPredicateOperatorType = 2; +pub const NSGreaterThanOrEqualToPredicateOperatorType: NSPredicateOperatorType = 3; +pub const NSEqualToPredicateOperatorType: NSPredicateOperatorType = 4; +pub const NSNotEqualToPredicateOperatorType: NSPredicateOperatorType = 5; +pub const NSMatchesPredicateOperatorType: NSPredicateOperatorType = 6; +pub const NSLikePredicateOperatorType: NSPredicateOperatorType = 7; +pub const NSBeginsWithPredicateOperatorType: NSPredicateOperatorType = 8; +pub const NSEndsWithPredicateOperatorType: NSPredicateOperatorType = 9; +pub const NSInPredicateOperatorType: NSPredicateOperatorType = 10; +pub const NSCustomSelectorPredicateOperatorType: NSPredicateOperatorType = 11; +pub const NSContainsPredicateOperatorType: NSPredicateOperatorType = 99; +pub const NSBetweenPredicateOperatorType: NSPredicateOperatorType = 100; + extern_class!( #[derive(Debug)] pub struct NSComparisonPredicate; diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index b13e566c8..6a299a203 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSCompoundPredicateType = NSUInteger; +pub const NSNotPredicateType: NSCompoundPredicateType = 0; +pub const NSAndPredicateType: NSCompoundPredicateType = 1; +pub const NSOrPredicateType: NSCompoundPredicateType = 2; + extern_class!( #[derive(Debug)] pub struct NSCompoundPredicate; diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 1d93aad41..686971af9 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -5,6 +5,38 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 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 NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication: NSDataWritingOptions = + 1073741824; +pub const NSDataWritingFileProtectionMask: NSDataWritingOptions = 4026531840; +pub const NSAtomicWrite: NSDataWritingOptions = 1; + +pub type NSDataSearchOptions = NSUInteger; +pub const NSDataSearchBackwards: NSDataSearchOptions = 1; +pub const NSDataSearchAnchored: NSDataSearchOptions = 2; + +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 type NSDataBase64DecodingOptions = NSUInteger; +pub const NSDataBase64DecodingIgnoreUnknownCharacters: NSDataBase64DecodingOptions = 1; + extern_class!( #[derive(Debug)] pub struct NSData; @@ -211,6 +243,12 @@ extern_methods!( } ); +pub type NSDataCompressionAlgorithm = NSInteger; +pub const NSDataCompressionAlgorithmLZFSE: NSDataCompressionAlgorithm = 0; +pub const NSDataCompressionAlgorithmLZ4: NSDataCompressionAlgorithm = 1; +pub const NSDataCompressionAlgorithmLZMA: NSDataCompressionAlgorithm = 2; +pub const NSDataCompressionAlgorithmZlib: NSDataCompressionAlgorithm = 3; + extern_methods!( /// NSDataCompression unsafe impl NSData { diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 59180f990..bfdec9fe9 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -5,6 +5,30 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSDateComponentsFormatterUnitsStyle = NSInteger; +pub const NSDateComponentsFormatterUnitsStylePositional: NSDateComponentsFormatterUnitsStyle = 0; +pub const NSDateComponentsFormatterUnitsStyleAbbreviated: NSDateComponentsFormatterUnitsStyle = 1; +pub const NSDateComponentsFormatterUnitsStyleShort: NSDateComponentsFormatterUnitsStyle = 2; +pub const NSDateComponentsFormatterUnitsStyleFull: NSDateComponentsFormatterUnitsStyle = 3; +pub const NSDateComponentsFormatterUnitsStyleSpellOut: NSDateComponentsFormatterUnitsStyle = 4; +pub const NSDateComponentsFormatterUnitsStyleBrief: NSDateComponentsFormatterUnitsStyle = 5; + +pub type NSDateComponentsFormatterZeroFormattingBehavior = NSUInteger; +pub const NSDateComponentsFormatterZeroFormattingBehaviorNone: + NSDateComponentsFormatterZeroFormattingBehavior = 0; +pub const NSDateComponentsFormatterZeroFormattingBehaviorDefault: + NSDateComponentsFormatterZeroFormattingBehavior = 1; +pub const NSDateComponentsFormatterZeroFormattingBehaviorDropLeading: + NSDateComponentsFormatterZeroFormattingBehavior = 2; +pub const NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle: + NSDateComponentsFormatterZeroFormattingBehavior = 4; +pub const NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing: + NSDateComponentsFormatterZeroFormattingBehavior = 8; +pub const NSDateComponentsFormatterZeroFormattingBehaviorDropAll: + NSDateComponentsFormatterZeroFormattingBehavior = 14; +pub const NSDateComponentsFormatterZeroFormattingBehaviorPad: + NSDateComponentsFormatterZeroFormattingBehavior = 65536; + extern_class!( #[derive(Debug)] pub struct NSDateComponentsFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index b73ff78c6..29f275a26 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -5,6 +5,18 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSDateFormatterBehavior = NSUInteger; +pub const NSDateFormatterBehaviorDefault: NSDateFormatterBehavior = 0; +pub const NSDateFormatterBehavior10_0: NSDateFormatterBehavior = 1000; +pub const NSDateFormatterBehavior10_4: NSDateFormatterBehavior = 1040; + extern_class!( #[derive(Debug)] pub struct NSDateFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index fd3129c5c..726d74190 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -5,6 +5,13 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSDateIntervalFormatterStyle = NSUInteger; +pub const NSDateIntervalFormatterNoStyle: NSDateIntervalFormatterStyle = 0; +pub const NSDateIntervalFormatterShortStyle: NSDateIntervalFormatterStyle = 1; +pub const NSDateIntervalFormatterMediumStyle: NSDateIntervalFormatterStyle = 2; +pub const NSDateIntervalFormatterLongStyle: NSDateIntervalFormatterStyle = 3; +pub const NSDateIntervalFormatterFullStyle: NSDateIntervalFormatterStyle = 4; + extern_class!( #[derive(Debug)] pub struct NSDateIntervalFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs index 9810872e4..3f69cc1ed 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimal.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -4,3 +4,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + +pub type NSRoundingMode = NSUInteger; +pub const NSRoundPlain: NSRoundingMode = 0; +pub const NSRoundDown: NSRoundingMode = 1; +pub const NSRoundUp: NSRoundingMode = 2; +pub const NSRoundBankers: NSRoundingMode = 3; + +pub type NSCalculationError = NSUInteger; +pub const NSCalculationNoError: NSCalculationError = 0; +pub const NSCalculationLossOfPrecision: NSCalculationError = 1; +pub const NSCalculationUnderflow: NSCalculationError = 2; +pub const NSCalculationOverflow: NSCalculationError = 3; +pub const NSCalculationDivideByZero: NSCalculationError = 4; diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 625f67dbe..00bf86b0e 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -7,6 +7,16 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSDistributedNotificationCenterType = NSString; +pub type NSNotificationSuspensionBehavior = NSUInteger; +pub const NSNotificationSuspensionBehaviorDrop: NSNotificationSuspensionBehavior = 1; +pub const NSNotificationSuspensionBehaviorCoalesce: NSNotificationSuspensionBehavior = 2; +pub const NSNotificationSuspensionBehaviorHold: NSNotificationSuspensionBehavior = 3; +pub const NSNotificationSuspensionBehaviorDeliverImmediately: NSNotificationSuspensionBehavior = 4; + +pub type NSDistributedNotificationOptions = NSUInteger; +pub const NSDistributedNotificationDeliverImmediately: NSDistributedNotificationOptions = 1; +pub const NSDistributedNotificationPostToAllSessions: NSDistributedNotificationOptions = 2; + extern_class!( #[derive(Debug)] pub struct NSDistributedNotificationCenter; diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 09f64c88d..b4cda6e50 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSEnergyFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index 8eef892a7..e4fe3fee4 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -5,6 +5,21 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSExpressionType = NSUInteger; +pub const NSConstantValueExpressionType: NSExpressionType = 0; +pub const NSEvaluatedObjectExpressionType: NSExpressionType = 1; +pub const NSVariableExpressionType: NSExpressionType = 2; +pub const NSKeyPathExpressionType: NSExpressionType = 3; +pub const NSFunctionExpressionType: NSExpressionType = 4; +pub const NSUnionSetExpressionType: NSExpressionType = 5; +pub const NSIntersectSetExpressionType: NSExpressionType = 6; +pub const NSMinusSetExpressionType: NSExpressionType = 7; +pub const NSSubqueryExpressionType: NSExpressionType = 13; +pub const NSAggregateExpressionType: NSExpressionType = 14; +pub const NSAnyKeyExpressionType: NSExpressionType = 15; +pub const NSBlockExpressionType: NSExpressionType = 19; +pub const NSConditionalExpressionType: NSExpressionType = 20; + extern_class!( #[derive(Debug)] pub struct NSExpression; diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index ec3d1678d..7c1f30c8b 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -5,6 +5,21 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSFileCoordinatorReadingOptions = NSUInteger; +pub const NSFileCoordinatorReadingWithoutChanges: NSFileCoordinatorReadingOptions = 1; +pub const NSFileCoordinatorReadingResolvesSymbolicLink: NSFileCoordinatorReadingOptions = 2; +pub const NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly: + NSFileCoordinatorReadingOptions = 4; +pub const NSFileCoordinatorReadingForUploading: NSFileCoordinatorReadingOptions = 8; + +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 NSFileCoordinatorWritingContentIndependentMetadataOnly: NSFileCoordinatorWritingOptions = + 16; + extern_class!( #[derive(Debug)] pub struct NSFileAccessIntent; diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 42ea882cd..d749e16be 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -13,6 +13,31 @@ pub type NSFileProtectionType = NSString; pub type NSFileProviderServiceName = NSString; +pub type NSVolumeEnumerationOptions = NSUInteger; +pub const NSVolumeEnumerationSkipHiddenVolumes: NSVolumeEnumerationOptions = 2; +pub const NSVolumeEnumerationProduceFileReferenceURLs: NSVolumeEnumerationOptions = 4; + +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 type NSFileManagerItemReplacementOptions = NSUInteger; +pub const NSFileManagerItemReplacementUsingNewMetadataOnly: NSFileManagerItemReplacementOptions = 1; +pub const NSFileManagerItemReplacementWithoutDeletingBackupItem: + NSFileManagerItemReplacementOptions = 2; + +pub type NSURLRelationship = NSInteger; +pub const NSURLRelationshipContains: NSURLRelationship = 0; +pub const NSURLRelationshipSame: NSURLRelationship = 1; +pub const NSURLRelationshipOther: NSURLRelationship = 2; + +pub type NSFileManagerUnmountOptions = NSUInteger; +pub const NSFileManagerUnmountAllPartitionsAndEjectDisk: NSFileManagerUnmountOptions = 1; +pub const NSFileManagerUnmountWithoutUI: NSFileManagerUnmountOptions = 2; + extern_class!( #[derive(Debug)] pub struct NSFileManager; diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index 9d6c86bc7..ce9d1c065 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSFileVersionAddingOptions = NSUInteger; +pub const NSFileVersionAddingByMoving: NSFileVersionAddingOptions = 1; + +pub type NSFileVersionReplacingOptions = NSUInteger; +pub const NSFileVersionReplacingByMoving: NSFileVersionReplacingOptions = 1; + extern_class!( #[derive(Debug)] pub struct NSFileVersion; diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 90181cc51..529d2276c 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -5,6 +5,14 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSFileWrapperReadingOptions = NSUInteger; +pub const NSFileWrapperReadingImmediate: NSFileWrapperReadingOptions = 1; +pub const NSFileWrapperReadingWithoutMapping: NSFileWrapperReadingOptions = 2; + +pub type NSFileWrapperWritingOptions = NSUInteger; +pub const NSFileWrapperWritingAtomic: NSFileWrapperWritingOptions = 1; +pub const NSFileWrapperWritingWithNameUpdating: NSFileWrapperWritingOptions = 2; + extern_class!( #[derive(Debug)] pub struct NSFileWrapper; diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index 8f34b9d6e..c407dbab7 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -5,6 +5,19 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSFormattingContext = NSInteger; +pub const NSFormattingContextUnknown: NSFormattingContext = 0; +pub const NSFormattingContextDynamic: NSFormattingContext = 1; +pub const NSFormattingContextStandalone: NSFormattingContext = 2; +pub const NSFormattingContextListItem: NSFormattingContext = 3; +pub const NSFormattingContextBeginningOfSentence: NSFormattingContext = 4; +pub const NSFormattingContextMiddleOfSentence: NSFormattingContext = 5; + +pub type NSFormattingUnitStyle = NSInteger; +pub const NSFormattingUnitStyleShort: NSFormattingUnitStyle = 1; +pub const NSFormattingUnitStyleMedium: NSFormattingUnitStyle = 2; +pub const NSFormattingUnitStyleLong: NSFormattingUnitStyle = 3; + extern_class!( #[derive(Debug)] pub struct NSFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 12f1cf57d..19c575b7a 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -11,6 +11,40 @@ 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 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; + extern_methods!( /// NSValueGeometryExtensions unsafe impl NSValue { diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index 955e1d5b2..992bc9ad5 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSHTTPCookieAcceptPolicy = NSUInteger; +pub const NSHTTPCookieAcceptPolicyAlways: NSHTTPCookieAcceptPolicy = 0; +pub const NSHTTPCookieAcceptPolicyNever: NSHTTPCookieAcceptPolicy = 1; +pub const NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain: NSHTTPCookieAcceptPolicy = 2; + extern_class!( #[derive(Debug)] pub struct NSHTTPCookieStorage; diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 42e140c00..eb9cc506c 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -5,6 +5,22 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSISO8601DateFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 646e1b162..5bf6824d2 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSItemProviderRepresentationVisibility = NSInteger; +pub const NSItemProviderRepresentationVisibilityAll: NSItemProviderRepresentationVisibility = 0; +pub const NSItemProviderRepresentationVisibilityTeam: NSItemProviderRepresentationVisibility = 1; +pub const NSItemProviderRepresentationVisibilityGroup: NSItemProviderRepresentationVisibility = 2; +pub const NSItemProviderRepresentationVisibilityOwnProcess: NSItemProviderRepresentationVisibility = + 3; + +pub type NSItemProviderFileOptions = NSInteger; +pub const NSItemProviderFileOptionOpenInPlace: NSItemProviderFileOptions = 1; + pub type NSItemProviderWriting = NSObject; pub type NSItemProviderReading = NSObject; @@ -143,3 +153,9 @@ extern_methods!( ); } ); + +pub type NSItemProviderErrorCode = NSInteger; +pub const NSItemProviderUnknownError: NSItemProviderErrorCode = -1; +pub const NSItemProviderItemUnavailableError: NSItemProviderErrorCode = -1000; +pub const NSItemProviderUnexpectedValueClassError: NSItemProviderErrorCode = -1100; +pub const NSItemProviderUnavailableCoercionError: NSItemProviderErrorCode = -1200; diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index ae9122ca7..da6419f22 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -5,6 +5,20 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSJSONWritingOptions = NSUInteger; +pub const NSJSONWritingPrettyPrinted: NSJSONWritingOptions = 1; +pub const NSJSONWritingSortedKeys: NSJSONWritingOptions = 2; +pub const NSJSONWritingFragmentsAllowed: NSJSONWritingOptions = 4; +pub const NSJSONWritingWithoutEscapingSlashes: NSJSONWritingOptions = 8; + extern_class!( #[derive(Debug)] pub struct NSJSONSerialization; diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 0db933403..ef1d0740b 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -5,6 +5,24 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSKeyValueChange = NSUInteger; +pub const NSKeyValueChangeSetting: NSKeyValueChange = 1; +pub const NSKeyValueChangeInsertion: NSKeyValueChange = 2; +pub const NSKeyValueChangeRemoval: NSKeyValueChange = 3; +pub const NSKeyValueChangeReplacement: NSKeyValueChange = 4; + +pub type NSKeyValueSetMutationKind = NSUInteger; +pub const NSKeyValueUnionSetMutation: NSKeyValueSetMutationKind = 1; +pub const NSKeyValueMinusSetMutation: NSKeyValueSetMutationKind = 2; +pub const NSKeyValueIntersectSetMutation: NSKeyValueSetMutationKind = 3; +pub const NSKeyValueSetSetMutation: NSKeyValueSetMutationKind = 4; + pub type NSKeyValueChangeKey = NSString; extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index 668361076..fe6bcca8a 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSLengthFormatterUnit = NSInteger; +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; + extern_class!( #[derive(Debug)] pub struct NSLengthFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index bcdb3c4ca..244c7bad5 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -9,6 +9,19 @@ pub type NSLinguisticTagScheme = NSString; pub type NSLinguisticTag = NSString; +pub type NSLinguisticTaggerUnit = NSInteger; +pub const NSLinguisticTaggerUnitWord: NSLinguisticTaggerUnit = 0; +pub const NSLinguisticTaggerUnitSentence: NSLinguisticTaggerUnit = 1; +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; + extern_class!( #[derive(Debug)] pub struct NSLinguisticTagger; diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index c5d3bff7e..f7f1ba478 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -169,6 +169,13 @@ 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; + extern_methods!( /// NSLocaleGeneralInfo unsafe impl NSLocale { diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 53f3ddf1c..57863cd5b 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -5,6 +5,13 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSMassFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index ec0648043..634e11bfe 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSMeasurementFormatterUnitOptions = NSUInteger; +pub const NSMeasurementFormatterUnitOptionsProvidedUnit: NSMeasurementFormatterUnitOptions = 1; +pub const NSMeasurementFormatterUnitOptionsNaturalScale: NSMeasurementFormatterUnitOptions = 2; +pub const NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit: + NSMeasurementFormatterUnitOptions = 4; + extern_class!( #[derive(Debug)] pub struct NSMeasurementFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index aeed366bd..ad9ab5233 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -5,6 +5,38 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSGrammaticalGender = NSInteger; +pub const NSGrammaticalGenderNotSet: NSGrammaticalGender = 0; +pub const NSGrammaticalGenderFeminine: NSGrammaticalGender = 1; +pub const NSGrammaticalGenderMasculine: NSGrammaticalGender = 2; +pub const NSGrammaticalGenderNeuter: NSGrammaticalGender = 3; + +pub type NSGrammaticalPartOfSpeech = NSInteger; +pub const NSGrammaticalPartOfSpeechNotSet: NSGrammaticalPartOfSpeech = 0; +pub const NSGrammaticalPartOfSpeechDeterminer: NSGrammaticalPartOfSpeech = 1; +pub const NSGrammaticalPartOfSpeechPronoun: NSGrammaticalPartOfSpeech = 2; +pub const NSGrammaticalPartOfSpeechLetter: NSGrammaticalPartOfSpeech = 3; +pub const NSGrammaticalPartOfSpeechAdverb: NSGrammaticalPartOfSpeech = 4; +pub const NSGrammaticalPartOfSpeechParticle: NSGrammaticalPartOfSpeech = 5; +pub const NSGrammaticalPartOfSpeechAdjective: NSGrammaticalPartOfSpeech = 6; +pub const NSGrammaticalPartOfSpeechAdposition: NSGrammaticalPartOfSpeech = 7; +pub const NSGrammaticalPartOfSpeechVerb: NSGrammaticalPartOfSpeech = 8; +pub const NSGrammaticalPartOfSpeechNoun: NSGrammaticalPartOfSpeech = 9; +pub const NSGrammaticalPartOfSpeechConjunction: NSGrammaticalPartOfSpeech = 10; +pub const NSGrammaticalPartOfSpeechNumeral: NSGrammaticalPartOfSpeech = 11; +pub const NSGrammaticalPartOfSpeechInterjection: NSGrammaticalPartOfSpeech = 12; +pub const NSGrammaticalPartOfSpeechPreposition: NSGrammaticalPartOfSpeech = 13; +pub const NSGrammaticalPartOfSpeechAbbreviation: NSGrammaticalPartOfSpeech = 14; + +pub type NSGrammaticalNumber = NSInteger; +pub const NSGrammaticalNumberNotSet: NSGrammaticalNumber = 0; +pub const NSGrammaticalNumberSingular: NSGrammaticalNumber = 1; +pub const NSGrammaticalNumberZero: NSGrammaticalNumber = 2; +pub const NSGrammaticalNumberPlural: NSGrammaticalNumber = 3; +pub const NSGrammaticalNumberPluralTwo: NSGrammaticalNumber = 4; +pub const NSGrammaticalNumberPluralFew: NSGrammaticalNumber = 5; +pub const NSGrammaticalNumberPluralMany: NSGrammaticalNumber = 6; + extern_class!( #[derive(Debug)] pub struct NSMorphology; diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index c13b24edd..66b772714 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -5,6 +5,21 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSNetServicesError = NSInteger; +pub const NSNetServicesUnknownError: NSNetServicesError = -72000; +pub const NSNetServicesCollisionError: NSNetServicesError = -72001; +pub const NSNetServicesNotFoundError: NSNetServicesError = -72002; +pub const NSNetServicesActivityInProgress: NSNetServicesError = -72003; +pub const NSNetServicesBadArgumentError: NSNetServicesError = -72004; +pub const NSNetServicesCancelledError: NSNetServicesError = -72005; +pub const NSNetServicesInvalidError: NSNetServicesError = -72006; +pub const NSNetServicesTimeoutError: NSNetServicesError = -72007; +pub const NSNetServicesMissingRequiredConfigurationError: NSNetServicesError = -72008; + +pub type NSNetServiceOptions = NSUInteger; +pub const NSNetServiceNoAutoRename: NSNetServiceOptions = 1; +pub const NSNetServiceListenForConnections: NSNetServiceOptions = 2; + extern_class!( #[derive(Debug)] pub struct NSNetService; diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index 4a4f5db80..acf1b8212 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPostingStyle = NSUInteger; +pub const NSPostWhenIdle: NSPostingStyle = 1; +pub const NSPostASAP: NSPostingStyle = 2; +pub const NSPostNow: NSPostingStyle = 3; + +pub type NSNotificationCoalescing = NSUInteger; +pub const NSNotificationNoCoalescing: NSNotificationCoalescing = 0; +pub const NSNotificationCoalescingOnName: NSNotificationCoalescing = 1; +pub const NSNotificationCoalescingOnSender: NSNotificationCoalescing = 2; + extern_class!( #[derive(Debug)] pub struct NSNotificationQueue; diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 654e53cf3..762c04e19 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -5,6 +5,38 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSNumberFormatterBehavior = NSUInteger; +pub const NSNumberFormatterBehaviorDefault: NSNumberFormatterBehavior = 0; +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 type NSNumberFormatterPadPosition = NSUInteger; +pub const NSNumberFormatterPadBeforePrefix: NSNumberFormatterPadPosition = 0; +pub const NSNumberFormatterPadAfterPrefix: NSNumberFormatterPadPosition = 1; +pub const NSNumberFormatterPadBeforeSuffix: NSNumberFormatterPadPosition = 2; +pub const NSNumberFormatterPadAfterSuffix: NSNumberFormatterPadPosition = 3; + +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; + extern_class!( #[derive(Debug)] pub struct NSNumberFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index a392649a2..ecfc6856b 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -8,3 +8,23 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSExceptionName = NSString; pub type NSRunLoopMode = NSString; + +pub type NSComparisonResult = NSInteger; +pub const NSOrderedAscending: NSComparisonResult = -1; +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 type NSSortOptions = NSUInteger; +pub const NSSortConcurrent: NSSortOptions = 1; +pub const NSSortStable: NSSortOptions = 16; + +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 NSQualityOfServiceDefault: NSQualityOfService = -1; diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 624323711..86ff4bb50 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -5,6 +5,13 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSOperationQueuePriority = NSInteger; +pub const NSOperationQueuePriorityVeryLow: NSOperationQueuePriority = -8; +pub const NSOperationQueuePriorityLow: NSOperationQueuePriority = -4; +pub const NSOperationQueuePriorityNormal: NSOperationQueuePriority = 0; +pub const NSOperationQueuePriorityHigh: NSOperationQueuePriority = 4; +pub const NSOperationQueuePriorityVeryHigh: NSOperationQueuePriority = 8; + extern_class!( #[derive(Debug)] pub struct NSOperation; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index b914fa6d6..272d0499b 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSCollectionChangeType = NSInteger; +pub const NSCollectionChangeInsert: NSCollectionChangeType = 0; +pub const NSCollectionChangeRemove: NSCollectionChangeType = 1; + __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedCollectionChange; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 3d7caacc8..c4f341e55 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -5,6 +5,14 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSOrderedCollectionDifferenceCalculationOptions = NSUInteger; +pub const NSOrderedCollectionDifferenceCalculationOmitInsertedObjects: + NSOrderedCollectionDifferenceCalculationOptions = 1; +pub const NSOrderedCollectionDifferenceCalculationOmitRemovedObjects: + NSOrderedCollectionDifferenceCalculationOptions = 2; +pub const NSOrderedCollectionDifferenceCalculationInferMoves: + NSOrderedCollectionDifferenceCalculationOptions = 4; + __inner_extern_class!( #[derive(Debug)] pub struct NSOrderedCollectionDifference; diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index a87a614fe..f15938914 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -87,3 +87,39 @@ extern_methods!( ) -> Id, Shared>; } ); + +pub type NSSearchPathDirectory = NSUInteger; +pub const NSApplicationDirectory: NSSearchPathDirectory = 1; +pub const NSDemoApplicationDirectory: NSSearchPathDirectory = 2; +pub const NSDeveloperApplicationDirectory: NSSearchPathDirectory = 3; +pub const NSAdminApplicationDirectory: NSSearchPathDirectory = 4; +pub const NSLibraryDirectory: NSSearchPathDirectory = 5; +pub const NSDeveloperDirectory: NSSearchPathDirectory = 6; +pub const NSUserDirectory: NSSearchPathDirectory = 7; +pub const NSDocumentationDirectory: NSSearchPathDirectory = 8; +pub const NSDocumentDirectory: NSSearchPathDirectory = 9; +pub const NSCoreServiceDirectory: NSSearchPathDirectory = 10; +pub const NSAutosavedInformationDirectory: NSSearchPathDirectory = 11; +pub const NSDesktopDirectory: NSSearchPathDirectory = 12; +pub const NSCachesDirectory: NSSearchPathDirectory = 13; +pub const NSApplicationSupportDirectory: NSSearchPathDirectory = 14; +pub const NSDownloadsDirectory: NSSearchPathDirectory = 15; +pub const NSInputMethodsDirectory: NSSearchPathDirectory = 16; +pub const NSMoviesDirectory: NSSearchPathDirectory = 17; +pub const NSMusicDirectory: NSSearchPathDirectory = 18; +pub const NSPicturesDirectory: NSSearchPathDirectory = 19; +pub const NSPrinterDescriptionDirectory: NSSearchPathDirectory = 20; +pub const NSSharedPublicDirectory: NSSearchPathDirectory = 21; +pub const NSPreferencePanesDirectory: NSSearchPathDirectory = 22; +pub const NSApplicationScriptsDirectory: NSSearchPathDirectory = 23; +pub const NSItemReplacementDirectory: NSSearchPathDirectory = 99; +pub const NSAllApplicationsDirectory: NSSearchPathDirectory = 100; +pub const NSAllLibrariesDirectory: NSSearchPathDirectory = 101; +pub const NSTrashDirectory: NSSearchPathDirectory = 102; + +pub type NSSearchPathDomainMask = NSUInteger; +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; diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index 826c5536f..a49bc481e 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSPersonNameComponentsFormatterStyle = NSInteger; +pub const NSPersonNameComponentsFormatterStyleDefault: NSPersonNameComponentsFormatterStyle = 0; +pub const NSPersonNameComponentsFormatterStyleShort: NSPersonNameComponentsFormatterStyle = 1; +pub const NSPersonNameComponentsFormatterStyleMedium: NSPersonNameComponentsFormatterStyle = 2; +pub const NSPersonNameComponentsFormatterStyleLong: NSPersonNameComponentsFormatterStyle = 3; +pub const NSPersonNameComponentsFormatterStyleAbbreviated: NSPersonNameComponentsFormatterStyle = 4; + +pub type NSPersonNameComponentsFormatterOptions = NSUInteger; +pub const NSPersonNameComponentsFormatterPhonetic: NSPersonNameComponentsFormatterOptions = 2; + extern_class!( #[derive(Debug)] pub struct NSPersonNameComponentsFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 9ce1228d1..2a4fdcb97 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -5,6 +5,21 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSPointerFunctions; diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 900416cd7..5a2c1c93b 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -79,6 +79,11 @@ extern_methods!( pub type NSPortDelegate = NSObject; +pub type NSMachPortOptions = NSUInteger; +pub const NSMachPortDeallocateNone: NSMachPortOptions = 0; +pub const NSMachPortDeallocateSendRight: NSMachPortOptions = 1; +pub const NSMachPortDeallocateReceiveRight: NSMachPortOptions = 2; + extern_class!( #[derive(Debug)] pub struct NSMachPort; diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 9c1ba9915..173c1c058 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -5,6 +5,14 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub const NSWindowsNTOperatingSystem: i32 = 1; +pub const NSWindows95OperatingSystem: i32 = 2; +pub const NSSolarisOperatingSystem: i32 = 3; +pub const NSHPUXOperatingSystem: i32 = 4; +pub const NSMACHOperatingSystem: i32 = 5; +pub const NSSunOSOperatingSystem: i32 = 6; +pub const NSOSF1OperatingSystem: i32 = 7; + extern_class!( #[derive(Debug)] pub struct NSProcessInfo; @@ -93,6 +101,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; + extern_methods!( /// NSProcessInfoActivity unsafe impl NSProcessInfo { @@ -134,6 +152,12 @@ extern_methods!( } ); +pub type NSProcessInfoThermalState = NSInteger; +pub const NSProcessInfoThermalStateNominal: NSProcessInfoThermalState = 0; +pub const NSProcessInfoThermalStateFair: NSProcessInfoThermalState = 1; +pub const NSProcessInfoThermalStateSerious: NSProcessInfoThermalState = 2; +pub const NSProcessInfoThermalStateCritical: NSProcessInfoThermalState = 3; + extern_methods!( /// NSProcessInfoThermalState unsafe impl NSProcessInfo { diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 92a87e6db..ac4afe68d 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSPropertyListFormat = NSUInteger; +pub const NSPropertyListOpenStepFormat: NSPropertyListFormat = 1; +pub const NSPropertyListXMLFormat_v1_0: NSPropertyListFormat = 100; +pub const NSPropertyListBinaryFormat_v1_0: NSPropertyListFormat = 200; + pub type NSPropertyListReadOptions = NSPropertyListMutabilityOptions; pub type NSPropertyListWriteOptions = NSUInteger; diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 5d0b61c83..58f4a62dd 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -5,6 +5,15 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; + extern_class!( #[derive(Debug)] pub struct NSRegularExpression; @@ -43,6 +52,20 @@ 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 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; + extern_methods!( /// NSMatching unsafe impl NSRegularExpression { diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index 82f57fe4b..ed7ec7c5a 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -5,6 +5,17 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSRelativeDateTimeFormatterStyle = NSInteger; +pub const NSRelativeDateTimeFormatterStyleNumeric: NSRelativeDateTimeFormatterStyle = 0; +pub const NSRelativeDateTimeFormatterStyleNamed: NSRelativeDateTimeFormatterStyle = 1; + +pub type NSRelativeDateTimeFormatterUnitsStyle = NSInteger; +pub const NSRelativeDateTimeFormatterUnitsStyleFull: NSRelativeDateTimeFormatterUnitsStyle = 0; +pub const NSRelativeDateTimeFormatterUnitsStyleSpellOut: NSRelativeDateTimeFormatterUnitsStyle = 1; +pub const NSRelativeDateTimeFormatterUnitsStyleShort: NSRelativeDateTimeFormatterUnitsStyle = 2; +pub const NSRelativeDateTimeFormatterUnitsStyleAbbreviated: NSRelativeDateTimeFormatterUnitsStyle = + 3; + extern_class!( #[derive(Debug)] pub struct NSRelativeDateTimeFormatter; diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index f8fc15670..0e6fdba5f 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -5,6 +5,18 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub const NSNoScriptError: i32 = 0; +pub const NSReceiverEvaluationScriptError: i32 = 1; +pub const NSKeySpecifierEvaluationScriptError: i32 = 2; +pub const NSArgumentEvaluationScriptError: i32 = 3; +pub const NSReceiversCantHandleCommandScriptError: i32 = 4; +pub const NSRequiredArgumentsMissingScriptError: i32 = 5; +pub const NSArgumentsWrongScriptError: i32 = 6; +pub const NSUnknownKeyScriptError: i32 = 7; +pub const NSInternalScriptError: i32 = 8; +pub const NSOperationNotSupportedForKeyScriptError: i32 = 9; +pub const NSCannotCreateScriptCommandError: i32 = 10; + extern_class!( #[derive(Debug)] pub struct NSScriptCommand; diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index c3d7a3a58..b4462acad 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -5,6 +5,32 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub const NSNoSpecifierError: i32 = 0; +pub const NSNoTopLevelContainersSpecifierError: i32 = 1; +pub const NSContainerSpecifierError: i32 = 2; +pub const NSUnknownKeySpecifierError: i32 = 3; +pub const NSInvalidIndexSpecifierError: i32 = 4; +pub const NSInternalSpecifierError: i32 = 5; +pub const NSOperationNotSupportedForKeySpecifierError: i32 = 6; + +pub type NSInsertionPosition = NSUInteger; +pub const NSPositionAfter: NSInsertionPosition = 0; +pub const NSPositionBefore: NSInsertionPosition = 1; +pub const NSPositionBeginning: NSInsertionPosition = 2; +pub const NSPositionEnd: NSInsertionPosition = 3; +pub const NSPositionReplace: NSInsertionPosition = 4; + +pub type NSRelativePosition = NSUInteger; +pub const NSRelativeAfter: NSRelativePosition = 0; +pub const NSRelativeBefore: NSRelativePosition = 1; + +pub type NSWhoseSubelementIdentifier = NSUInteger; +pub const NSIndexSubelement: NSWhoseSubelementIdentifier = 0; +pub const NSEverySubelement: NSWhoseSubelementIdentifier = 1; +pub const NSMiddleSubelement: NSWhoseSubelementIdentifier = 2; +pub const NSRandomSubelement: NSWhoseSubelementIdentifier = 3; +pub const NSNoSubelement: NSWhoseSubelementIdentifier = 4; + extern_class!( #[derive(Debug)] pub struct NSScriptObjectSpecifier; diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index 3b679174f..5bda32887 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSSaveOptions = NSUInteger; +pub const NSSaveOptionsYes: NSSaveOptions = 0; +pub const NSSaveOptionsNo: NSSaveOptions = 1; +pub const NSSaveOptionsAsk: NSSaveOptions = 2; + extern_class!( #[derive(Debug)] pub struct NSCloneCommand; diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index b8805f72a..816626f6f 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -5,6 +5,16 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTestComparisonOperation = NSUInteger; +pub const NSEqualToComparison: NSTestComparisonOperation = 0; +pub const NSLessThanOrEqualToComparison: NSTestComparisonOperation = 1; +pub const NSLessThanComparison: NSTestComparisonOperation = 2; +pub const NSGreaterThanOrEqualToComparison: NSTestComparisonOperation = 3; +pub const NSGreaterThanComparison: NSTestComparisonOperation = 4; +pub const NSBeginsWithComparison: NSTestComparisonOperation = 5; +pub const NSEndsWithComparison: NSTestComparisonOperation = 6; +pub const NSContainsComparison: NSTestComparisonOperation = 7; + extern_class!( #[derive(Debug)] pub struct NSScriptWhoseTest; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index ae2876f85..fae9319e7 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -7,6 +7,24 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSStreamPropertyKey = NSString; +pub type NSStreamStatus = NSUInteger; +pub const NSStreamStatusNotOpen: NSStreamStatus = 0; +pub const NSStreamStatusOpening: NSStreamStatus = 1; +pub const NSStreamStatusOpen: NSStreamStatus = 2; +pub const NSStreamStatusReading: NSStreamStatus = 3; +pub const NSStreamStatusWriting: NSStreamStatus = 4; +pub const NSStreamStatusAtEnd: NSStreamStatus = 5; +pub const NSStreamStatusClosed: NSStreamStatus = 6; +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; + extern_class!( #[derive(Debug)] pub struct NSStream; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 34bac34d8..d8b9ee7fd 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -5,8 +5,47 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSStringCompareOptions = NSUInteger; +pub const NSCaseInsensitiveSearch: NSStringCompareOptions = 1; +pub const NSLiteralSearch: NSStringCompareOptions = 2; +pub const NSBackwardsSearch: NSStringCompareOptions = 4; +pub const NSAnchoredSearch: NSStringCompareOptions = 8; +pub const NSNumericSearch: NSStringCompareOptions = 64; +pub const NSDiacriticInsensitiveSearch: NSStringCompareOptions = 128; +pub const NSWidthInsensitiveSearch: NSStringCompareOptions = 256; +pub const NSForcedOrderingSearch: NSStringCompareOptions = 512; +pub const NSRegularExpressionSearch: NSStringCompareOptions = 1024; + pub type NSStringEncoding = NSUInteger; +pub const NSASCIIStringEncoding: i32 = 1; +pub const NSNEXTSTEPStringEncoding: i32 = 2; +pub const NSJapaneseEUCStringEncoding: i32 = 3; +pub const NSUTF8StringEncoding: i32 = 4; +pub const NSISOLatin1StringEncoding: i32 = 5; +pub const NSSymbolStringEncoding: i32 = 6; +pub const NSNonLossyASCIIStringEncoding: i32 = 7; +pub const NSShiftJISStringEncoding: i32 = 8; +pub const NSISOLatin2StringEncoding: i32 = 9; +pub const NSUnicodeStringEncoding: i32 = 10; +pub const NSWindowsCP1251StringEncoding: i32 = 11; +pub const NSWindowsCP1252StringEncoding: i32 = 12; +pub const NSWindowsCP1253StringEncoding: i32 = 13; +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 type NSStringEncodingConversionOptions = NSUInteger; +pub const NSStringEncodingConversionAllowLossy: NSStringEncodingConversionOptions = 1; +pub const NSStringEncodingConversionExternalRepresentation: NSStringEncodingConversionOptions = 2; + extern_class!( #[derive(Debug)] pub struct NSString; @@ -32,6 +71,18 @@ extern_methods!( } ); +pub type NSStringEnumerationOptions = NSUInteger; +pub const NSStringEnumerationByLines: NSStringEnumerationOptions = 0; +pub const NSStringEnumerationByParagraphs: NSStringEnumerationOptions = 1; +pub const NSStringEnumerationByComposedCharacterSequences: NSStringEnumerationOptions = 2; +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 type NSStringTransform = NSString; extern_methods!( @@ -762,6 +813,8 @@ extern_methods!( } ); +pub const NSProprietaryStringEncoding: i32 = 65536; + extern_class!( #[derive(Debug)] pub struct NSSimpleCString; diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 040ff4cf5..07117fe88 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSTaskTerminationReason = NSInteger; +pub const NSTaskTerminationReasonExit: NSTaskTerminationReason = 1; +pub const NSTaskTerminationReasonUncaughtSignal: NSTaskTerminationReason = 2; + extern_class!( #[derive(Debug)] pub struct NSTask; diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index b4059cca4..11bbdde83 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -5,8 +5,27 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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 type NSTextCheckingTypes = u64; +pub const NSTextCheckingAllSystemTypes: i32 = 4294967295; +pub const NSTextCheckingAllCustomTypes: i32 = -4294967296; +pub const NSTextCheckingAllTypes: i32 = -1; + pub type NSTextCheckingKey = NSString; extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 13c0e7c92..7f4b70e37 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -42,6 +42,14 @@ extern_methods!( } ); +pub type NSTimeZoneNameStyle = NSInteger; +pub const NSTimeZoneNameStyleStandard: NSTimeZoneNameStyle = 0; +pub const NSTimeZoneNameStyleShortStandard: NSTimeZoneNameStyle = 1; +pub const NSTimeZoneNameStyleDaylightSaving: NSTimeZoneNameStyle = 2; +pub const NSTimeZoneNameStyleShortDaylightSaving: NSTimeZoneNameStyle = 3; +pub const NSTimeZoneNameStyleGeneric: NSTimeZoneNameStyle = 4; +pub const NSTimeZoneNameStyleShortGeneric: NSTimeZoneNameStyle = 5; + extern_methods!( /// NSExtendedTimeZone unsafe impl NSTimeZone { diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index a71579ede..d081812d9 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -19,6 +19,23 @@ 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 NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess: NSURLBookmarkCreationOptions = + 4096; +pub const NSURLBookmarkCreationWithoutImplicitSecurityScope: NSURLBookmarkCreationOptions = + 536870912; + +pub type NSURLBookmarkResolutionOptions = NSUInteger; +pub const NSURLBookmarkResolutionWithoutUI: NSURLBookmarkResolutionOptions = 256; +pub const NSURLBookmarkResolutionWithoutMounting: NSURLBookmarkResolutionOptions = 512; +pub const NSURLBookmarkResolutionWithSecurityScope: NSURLBookmarkResolutionOptions = 1024; +pub const NSURLBookmarkResolutionWithoutImplicitStartAccessing: NSURLBookmarkResolutionOptions = + 32768; + pub type NSURLBookmarkFileCreationOptions = NSUInteger; extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 9c1e50178..aae1717cb 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -5,6 +5,11 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSURLCacheStoragePolicy = NSUInteger; +pub const NSURLCacheStorageAllowed: NSURLCacheStoragePolicy = 0; +pub const NSURLCacheStorageAllowedInMemoryOnly: NSURLCacheStoragePolicy = 1; +pub const NSURLCacheStorageNotAllowed: NSURLCacheStoragePolicy = 2; + extern_class!( #[derive(Debug)] pub struct NSCachedURLResponse; diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index b4e4360ea..a8ee52f8d 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSURLCredentialPersistence = NSUInteger; +pub const NSURLCredentialPersistenceNone: NSURLCredentialPersistence = 0; +pub const NSURLCredentialPersistenceForSession: NSURLCredentialPersistence = 1; +pub const NSURLCredentialPersistencePermanent: NSURLCredentialPersistence = 2; +pub const NSURLCredentialPersistenceSynchronizable: NSURLCredentialPersistence = 3; + extern_class!( #[derive(Debug)] pub struct NSURLCredential; diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index 9810872e4..cd1302a7a 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -4,3 +4,62 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + +pub const NSURLErrorCancelledReasonUserForceQuitApplication: i32 = 0; +pub const NSURLErrorCancelledReasonBackgroundUpdatesDisabled: i32 = 1; +pub const NSURLErrorCancelledReasonInsufficientSystemResources: i32 = 2; + +pub type NSURLErrorNetworkUnavailableReason = NSInteger; +pub const NSURLErrorNetworkUnavailableReasonCellular: NSURLErrorNetworkUnavailableReason = 0; +pub const NSURLErrorNetworkUnavailableReasonExpensive: NSURLErrorNetworkUnavailableReason = 1; +pub const NSURLErrorNetworkUnavailableReasonConstrained: NSURLErrorNetworkUnavailableReason = 2; + +pub const NSURLErrorUnknown: i32 = -1; +pub const NSURLErrorCancelled: i32 = -999; +pub const NSURLErrorBadURL: i32 = -1000; +pub const NSURLErrorTimedOut: i32 = -1001; +pub const NSURLErrorUnsupportedURL: i32 = -1002; +pub const NSURLErrorCannotFindHost: i32 = -1003; +pub const NSURLErrorCannotConnectToHost: i32 = -1004; +pub const NSURLErrorNetworkConnectionLost: i32 = -1005; +pub const NSURLErrorDNSLookupFailed: i32 = -1006; +pub const NSURLErrorHTTPTooManyRedirects: i32 = -1007; +pub const NSURLErrorResourceUnavailable: i32 = -1008; +pub const NSURLErrorNotConnectedToInternet: i32 = -1009; +pub const NSURLErrorRedirectToNonExistentLocation: i32 = -1010; +pub const NSURLErrorBadServerResponse: i32 = -1011; +pub const NSURLErrorUserCancelledAuthentication: i32 = -1012; +pub const NSURLErrorUserAuthenticationRequired: i32 = -1013; +pub const NSURLErrorZeroByteResource: i32 = -1014; +pub const NSURLErrorCannotDecodeRawData: i32 = -1015; +pub const NSURLErrorCannotDecodeContentData: i32 = -1016; +pub const NSURLErrorCannotParseResponse: i32 = -1017; +pub const NSURLErrorAppTransportSecurityRequiresSecureConnection: i32 = -1022; +pub const NSURLErrorFileDoesNotExist: i32 = -1100; +pub const NSURLErrorFileIsDirectory: i32 = -1101; +pub const NSURLErrorNoPermissionsToReadFile: i32 = -1102; +pub const NSURLErrorDataLengthExceedsMaximum: i32 = -1103; +pub const NSURLErrorFileOutsideSafeArea: i32 = -1104; +pub const NSURLErrorSecureConnectionFailed: i32 = -1200; +pub const NSURLErrorServerCertificateHasBadDate: i32 = -1201; +pub const NSURLErrorServerCertificateUntrusted: i32 = -1202; +pub const NSURLErrorServerCertificateHasUnknownRoot: i32 = -1203; +pub const NSURLErrorServerCertificateNotYetValid: i32 = -1204; +pub const NSURLErrorClientCertificateRejected: i32 = -1205; +pub const NSURLErrorClientCertificateRequired: i32 = -1206; +pub const NSURLErrorCannotLoadFromNetwork: i32 = -2000; +pub const NSURLErrorCannotCreateFile: i32 = -3000; +pub const NSURLErrorCannotOpenFile: i32 = -3001; +pub const NSURLErrorCannotCloseFile: i32 = -3002; +pub const NSURLErrorCannotWriteToFile: i32 = -3003; +pub const NSURLErrorCannotRemoveFile: i32 = -3004; +pub const NSURLErrorCannotMoveFile: i32 = -3005; +pub const NSURLErrorDownloadDecodingFailedMidStream: i32 = -3006; +pub const NSURLErrorDownloadDecodingFailedToComplete: i32 = -3007; +pub const NSURLErrorInternationalRoamingOff: i32 = -1018; +pub const NSURLErrorCallIsActive: i32 = -1019; +pub const NSURLErrorDataNotAllowed: i32 = -1020; +pub const NSURLErrorRequestBodyStreamExhausted: i32 = -1021; +pub const NSURLErrorBackgroundSessionRequiresSharedContainer: i32 = -995; +pub const NSURLErrorBackgroundSessionInUseByAnotherProcess: i32 = -996; +pub const NSURLErrorBackgroundSessionWasDisconnected: i32 = -997; diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 9d82691b4..8b1eb7bef 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSURLHandleStatus = NSUInteger; +pub const NSURLHandleNotLoaded: NSURLHandleStatus = 0; +pub const NSURLHandleLoadSucceeded: NSURLHandleStatus = 1; +pub const NSURLHandleLoadInProgress: NSURLHandleStatus = 2; +pub const NSURLHandleLoadFailed: NSURLHandleStatus = 3; + pub type NSURLHandleClient = NSObject; extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index c1fcdd247..418f26502 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -5,6 +5,30 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +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 NSURLRequestReturnCacheDataElseLoad: NSURLRequestCachePolicy = 2; +pub const NSURLRequestReturnCacheDataDontLoad: NSURLRequestCachePolicy = 3; +pub const NSURLRequestReloadRevalidatingCacheData: NSURLRequestCachePolicy = 5; + +pub type NSURLRequestNetworkServiceType = NSUInteger; +pub const NSURLNetworkServiceTypeDefault: NSURLRequestNetworkServiceType = 0; +pub const NSURLNetworkServiceTypeVoIP: NSURLRequestNetworkServiceType = 1; +pub const NSURLNetworkServiceTypeVideo: NSURLRequestNetworkServiceType = 2; +pub const NSURLNetworkServiceTypeBackground: NSURLRequestNetworkServiceType = 3; +pub const NSURLNetworkServiceTypeVoice: NSURLRequestNetworkServiceType = 4; +pub const NSURLNetworkServiceTypeResponsiveData: NSURLRequestNetworkServiceType = 6; +pub const NSURLNetworkServiceTypeAVStreaming: NSURLRequestNetworkServiceType = 8; +pub const NSURLNetworkServiceTypeResponsiveAV: NSURLRequestNetworkServiceType = 9; +pub const NSURLNetworkServiceTypeCallSignaling: NSURLRequestNetworkServiceType = 11; + +pub type NSURLRequestAttribution = NSUInteger; +pub const NSURLRequestAttributionDeveloper: NSURLRequestAttribution = 0; +pub const NSURLRequestAttributionUser: NSURLRequestAttribution = 1; + extern_class!( #[derive(Debug)] pub struct NSURLRequest; diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index c40cd9af7..7a598d43c 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -207,6 +207,12 @@ extern_methods!( } ); +pub type NSURLSessionTaskState = NSInteger; +pub const NSURLSessionTaskStateRunning: NSURLSessionTaskState = 0; +pub const NSURLSessionTaskStateSuspended: NSURLSessionTaskState = 1; +pub const NSURLSessionTaskStateCanceling: NSURLSessionTaskState = 2; +pub const NSURLSessionTaskStateCompleted: NSURLSessionTaskState = 3; + extern_class!( #[derive(Debug)] pub struct NSURLSessionTask; @@ -427,6 +433,10 @@ extern_methods!( } ); +pub type NSURLSessionWebSocketMessageType = NSInteger; +pub const NSURLSessionWebSocketMessageTypeData: NSURLSessionWebSocketMessageType = 0; +pub const NSURLSessionWebSocketMessageTypeString: NSURLSessionWebSocketMessageType = 1; + extern_class!( #[derive(Debug)] pub struct NSURLSessionWebSocketMessage; @@ -461,6 +471,23 @@ extern_methods!( } ); +pub type NSURLSessionWebSocketCloseCode = NSInteger; +pub const NSURLSessionWebSocketCloseCodeInvalid: NSURLSessionWebSocketCloseCode = 0; +pub const NSURLSessionWebSocketCloseCodeNormalClosure: NSURLSessionWebSocketCloseCode = 1000; +pub const NSURLSessionWebSocketCloseCodeGoingAway: NSURLSessionWebSocketCloseCode = 1001; +pub const NSURLSessionWebSocketCloseCodeProtocolError: NSURLSessionWebSocketCloseCode = 1002; +pub const NSURLSessionWebSocketCloseCodeUnsupportedData: NSURLSessionWebSocketCloseCode = 1003; +pub const NSURLSessionWebSocketCloseCodeNoStatusReceived: NSURLSessionWebSocketCloseCode = 1005; +pub const NSURLSessionWebSocketCloseCodeAbnormalClosure: NSURLSessionWebSocketCloseCode = 1006; +pub const NSURLSessionWebSocketCloseCodeInvalidFramePayloadData: NSURLSessionWebSocketCloseCode = + 1007; +pub const NSURLSessionWebSocketCloseCodePolicyViolation: NSURLSessionWebSocketCloseCode = 1008; +pub const NSURLSessionWebSocketCloseCodeMessageTooBig: NSURLSessionWebSocketCloseCode = 1009; +pub const NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing: NSURLSessionWebSocketCloseCode = + 1010; +pub const NSURLSessionWebSocketCloseCodeInternalServerError: NSURLSessionWebSocketCloseCode = 1011; +pub const NSURLSessionWebSocketCloseCodeTLSHandshakeFailure: NSURLSessionWebSocketCloseCode = 1015; + extern_class!( #[derive(Debug)] pub struct NSURLSessionWebSocketTask; @@ -512,6 +539,12 @@ extern_methods!( } ); +pub type NSURLSessionMultipathServiceType = NSInteger; +pub const NSURLSessionMultipathServiceTypeNone: NSURLSessionMultipathServiceType = 0; +pub const NSURLSessionMultipathServiceTypeHandover: NSURLSessionMultipathServiceType = 1; +pub const NSURLSessionMultipathServiceTypeInteractive: NSURLSessionMultipathServiceType = 2; +pub const NSURLSessionMultipathServiceTypeAggregate: NSURLSessionMultipathServiceType = 3; + extern_class!( #[derive(Debug)] pub struct NSURLSessionConfiguration; @@ -752,6 +785,24 @@ extern_methods!( } ); +pub type NSURLSessionDelayedRequestDisposition = NSInteger; +pub const NSURLSessionDelayedRequestContinueLoading: NSURLSessionDelayedRequestDisposition = 0; +pub const NSURLSessionDelayedRequestUseNewRequest: NSURLSessionDelayedRequestDisposition = 1; +pub const NSURLSessionDelayedRequestCancel: NSURLSessionDelayedRequestDisposition = 2; + +pub type NSURLSessionAuthChallengeDisposition = NSInteger; +pub const NSURLSessionAuthChallengeUseCredential: NSURLSessionAuthChallengeDisposition = 0; +pub const NSURLSessionAuthChallengePerformDefaultHandling: NSURLSessionAuthChallengeDisposition = 1; +pub const NSURLSessionAuthChallengeCancelAuthenticationChallenge: + NSURLSessionAuthChallengeDisposition = 2; +pub const NSURLSessionAuthChallengeRejectProtectionSpace: NSURLSessionAuthChallengeDisposition = 3; + +pub type NSURLSessionResponseDisposition = NSInteger; +pub const NSURLSessionResponseCancel: NSURLSessionResponseDisposition = 0; +pub const NSURLSessionResponseAllow: NSURLSessionResponseDisposition = 1; +pub const NSURLSessionResponseBecomeDownload: NSURLSessionResponseDisposition = 2; +pub const NSURLSessionResponseBecomeStream: NSURLSessionResponseDisposition = 3; + pub type NSURLSessionDelegate = NSObject; pub type NSURLSessionTaskDelegate = NSObject; @@ -774,6 +825,28 @@ extern_methods!( } ); +pub type NSURLSessionTaskMetricsResourceFetchType = NSInteger; +pub const NSURLSessionTaskMetricsResourceFetchTypeUnknown: + NSURLSessionTaskMetricsResourceFetchType = 0; +pub const NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad: + NSURLSessionTaskMetricsResourceFetchType = 1; +pub const NSURLSessionTaskMetricsResourceFetchTypeServerPush: + NSURLSessionTaskMetricsResourceFetchType = 2; +pub const NSURLSessionTaskMetricsResourceFetchTypeLocalCache: + NSURLSessionTaskMetricsResourceFetchType = 3; + +pub type NSURLSessionTaskMetricsDomainResolutionProtocol = NSInteger; +pub const NSURLSessionTaskMetricsDomainResolutionProtocolUnknown: + NSURLSessionTaskMetricsDomainResolutionProtocol = 0; +pub const NSURLSessionTaskMetricsDomainResolutionProtocolUDP: + NSURLSessionTaskMetricsDomainResolutionProtocol = 1; +pub const NSURLSessionTaskMetricsDomainResolutionProtocolTCP: + NSURLSessionTaskMetricsDomainResolutionProtocol = 2; +pub const NSURLSessionTaskMetricsDomainResolutionProtocolTLS: + NSURLSessionTaskMetricsDomainResolutionProtocol = 3; +pub const NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS: + NSURLSessionTaskMetricsDomainResolutionProtocol = 4; + extern_class!( #[derive(Debug)] pub struct NSURLSessionTaskTransactionMetrics; diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 6b9186744..8f9b298a0 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -85,3 +85,8 @@ extern_methods!( pub unsafe fn synchronize(&self) -> bool; } ); + +pub const NSUbiquitousKeyValueStoreServerChange: i32 = 0; +pub const NSUbiquitousKeyValueStoreInitialSyncChange: i32 = 1; +pub const NSUbiquitousKeyValueStoreQuotaViolationChange: i32 = 2; +pub const NSUbiquitousKeyValueStoreAccountChange: i32 = 3; diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 42e22cc73..8539f4ed9 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -5,6 +5,14 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSUserNotificationActivationType = NSInteger; +pub const NSUserNotificationActivationTypeNone: NSUserNotificationActivationType = 0; +pub const NSUserNotificationActivationTypeContentsClicked: NSUserNotificationActivationType = 1; +pub const NSUserNotificationActivationTypeActionButtonClicked: NSUserNotificationActivationType = 2; +pub const NSUserNotificationActivationTypeReplied: NSUserNotificationActivationType = 3; +pub const NSUserNotificationActivationTypeAdditionalActionClicked: + NSUserNotificationActivationType = 4; + extern_class!( #[derive(Debug)] pub struct NSUserNotification; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index 08596ed21..3e3d99877 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -5,6 +5,28 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSXMLDTDNodeKind = NSUInteger; +pub const NSXMLEntityGeneralKind: NSXMLDTDNodeKind = 1; +pub const NSXMLEntityParsedKind: NSXMLDTDNodeKind = 2; +pub const NSXMLEntityUnparsedKind: NSXMLDTDNodeKind = 3; +pub const NSXMLEntityParameterKind: NSXMLDTDNodeKind = 4; +pub const NSXMLEntityPredefined: NSXMLDTDNodeKind = 5; +pub const NSXMLAttributeCDATAKind: NSXMLDTDNodeKind = 6; +pub const NSXMLAttributeIDKind: NSXMLDTDNodeKind = 7; +pub const NSXMLAttributeIDRefKind: NSXMLDTDNodeKind = 8; +pub const NSXMLAttributeIDRefsKind: NSXMLDTDNodeKind = 9; +pub const NSXMLAttributeEntityKind: NSXMLDTDNodeKind = 10; +pub const NSXMLAttributeEntitiesKind: NSXMLDTDNodeKind = 11; +pub const NSXMLAttributeNMTokenKind: NSXMLDTDNodeKind = 12; +pub const NSXMLAttributeNMTokensKind: NSXMLDTDNodeKind = 13; +pub const NSXMLAttributeEnumerationKind: NSXMLDTDNodeKind = 14; +pub const NSXMLAttributeNotationKind: NSXMLDTDNodeKind = 15; +pub const NSXMLElementDeclarationUndefinedKind: NSXMLDTDNodeKind = 16; +pub const NSXMLElementDeclarationEmptyKind: NSXMLDTDNodeKind = 17; +pub const NSXMLElementDeclarationAnyKind: NSXMLDTDNodeKind = 18; +pub const NSXMLElementDeclarationMixedKind: NSXMLDTDNodeKind = 19; +pub const NSXMLElementDeclarationElementKind: NSXMLDTDNodeKind = 20; + extern_class!( #[derive(Debug)] pub struct NSXMLDTDNode; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index d8cf6b3cc..a484b888f 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSXMLDocumentContentKind = NSUInteger; +pub const NSXMLDocumentXMLKind: NSXMLDocumentContentKind = 0; +pub const NSXMLDocumentXHTMLKind: NSXMLDocumentContentKind = 1; +pub const NSXMLDocumentHTMLKind: NSXMLDocumentContentKind = 2; +pub const NSXMLDocumentTextKind: NSXMLDocumentContentKind = 3; + extern_class!( #[derive(Debug)] pub struct NSXMLDocument; diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 4dea914dd..21027bc70 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -5,6 +5,21 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSXMLNodeKind = NSUInteger; +pub const NSXMLInvalidKind: NSXMLNodeKind = 0; +pub const NSXMLDocumentKind: NSXMLNodeKind = 1; +pub const NSXMLElementKind: NSXMLNodeKind = 2; +pub const NSXMLAttributeKind: NSXMLNodeKind = 3; +pub const NSXMLNamespaceKind: NSXMLNodeKind = 4; +pub const NSXMLProcessingInstructionKind: NSXMLNodeKind = 5; +pub const NSXMLCommentKind: NSXMLNodeKind = 6; +pub const NSXMLTextKind: NSXMLNodeKind = 7; +pub const NSXMLDTDKind: NSXMLNodeKind = 8; +pub const NSXMLEntityDeclarationKind: NSXMLNodeKind = 9; +pub const NSXMLAttributeDeclarationKind: NSXMLNodeKind = 10; +pub const NSXMLElementDeclarationKind: NSXMLNodeKind = 11; +pub const NSXMLNotationDeclarationKind: NSXMLNodeKind = 12; + extern_class!( #[derive(Debug)] pub struct NSXMLNode; diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs index 9810872e4..e816324c9 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -4,3 +4,33 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] 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; diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index d2d122601..459988f52 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -5,6 +5,13 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +pub type NSXMLParserExternalEntityResolvingPolicy = NSUInteger; +pub const NSXMLParserResolveExternalEntitiesNever: NSXMLParserExternalEntityResolvingPolicy = 0; +pub const NSXMLParserResolveExternalEntitiesNoNetwork: NSXMLParserExternalEntityResolvingPolicy = 1; +pub const NSXMLParserResolveExternalEntitiesSameOriginOnly: + NSXMLParserExternalEntityResolvingPolicy = 2; +pub const NSXMLParserResolveExternalEntitiesAlways: NSXMLParserExternalEntityResolvingPolicy = 3; + extern_class!( #[derive(Debug)] pub struct NSXMLParser; @@ -98,3 +105,98 @@ extern_methods!( ); pub type NSXMLParserDelegate = NSObject; + +pub type NSXMLParserError = NSInteger; +pub const NSXMLParserInternalError: NSXMLParserError = 1; +pub const NSXMLParserOutOfMemoryError: NSXMLParserError = 2; +pub const NSXMLParserDocumentStartError: NSXMLParserError = 3; +pub const NSXMLParserEmptyDocumentError: NSXMLParserError = 4; +pub const NSXMLParserPrematureDocumentEndError: NSXMLParserError = 5; +pub const NSXMLParserInvalidHexCharacterRefError: NSXMLParserError = 6; +pub const NSXMLParserInvalidDecimalCharacterRefError: NSXMLParserError = 7; +pub const NSXMLParserInvalidCharacterRefError: NSXMLParserError = 8; +pub const NSXMLParserInvalidCharacterError: NSXMLParserError = 9; +pub const NSXMLParserCharacterRefAtEOFError: NSXMLParserError = 10; +pub const NSXMLParserCharacterRefInPrologError: NSXMLParserError = 11; +pub const NSXMLParserCharacterRefInEpilogError: NSXMLParserError = 12; +pub const NSXMLParserCharacterRefInDTDError: NSXMLParserError = 13; +pub const NSXMLParserEntityRefAtEOFError: NSXMLParserError = 14; +pub const NSXMLParserEntityRefInPrologError: NSXMLParserError = 15; +pub const NSXMLParserEntityRefInEpilogError: NSXMLParserError = 16; +pub const NSXMLParserEntityRefInDTDError: NSXMLParserError = 17; +pub const NSXMLParserParsedEntityRefAtEOFError: NSXMLParserError = 18; +pub const NSXMLParserParsedEntityRefInPrologError: NSXMLParserError = 19; +pub const NSXMLParserParsedEntityRefInEpilogError: NSXMLParserError = 20; +pub const NSXMLParserParsedEntityRefInInternalSubsetError: NSXMLParserError = 21; +pub const NSXMLParserEntityReferenceWithoutNameError: NSXMLParserError = 22; +pub const NSXMLParserEntityReferenceMissingSemiError: NSXMLParserError = 23; +pub const NSXMLParserParsedEntityRefNoNameError: NSXMLParserError = 24; +pub const NSXMLParserParsedEntityRefMissingSemiError: NSXMLParserError = 25; +pub const NSXMLParserUndeclaredEntityError: NSXMLParserError = 26; +pub const NSXMLParserUnparsedEntityError: NSXMLParserError = 28; +pub const NSXMLParserEntityIsExternalError: NSXMLParserError = 29; +pub const NSXMLParserEntityIsParameterError: NSXMLParserError = 30; +pub const NSXMLParserUnknownEncodingError: NSXMLParserError = 31; +pub const NSXMLParserEncodingNotSupportedError: NSXMLParserError = 32; +pub const NSXMLParserStringNotStartedError: NSXMLParserError = 33; +pub const NSXMLParserStringNotClosedError: NSXMLParserError = 34; +pub const NSXMLParserNamespaceDeclarationError: NSXMLParserError = 35; +pub const NSXMLParserEntityNotStartedError: NSXMLParserError = 36; +pub const NSXMLParserEntityNotFinishedError: NSXMLParserError = 37; +pub const NSXMLParserLessThanSymbolInAttributeError: NSXMLParserError = 38; +pub const NSXMLParserAttributeNotStartedError: NSXMLParserError = 39; +pub const NSXMLParserAttributeNotFinishedError: NSXMLParserError = 40; +pub const NSXMLParserAttributeHasNoValueError: NSXMLParserError = 41; +pub const NSXMLParserAttributeRedefinedError: NSXMLParserError = 42; +pub const NSXMLParserLiteralNotStartedError: NSXMLParserError = 43; +pub const NSXMLParserLiteralNotFinishedError: NSXMLParserError = 44; +pub const NSXMLParserCommentNotFinishedError: NSXMLParserError = 45; +pub const NSXMLParserProcessingInstructionNotStartedError: NSXMLParserError = 46; +pub const NSXMLParserProcessingInstructionNotFinishedError: NSXMLParserError = 47; +pub const NSXMLParserNotationNotStartedError: NSXMLParserError = 48; +pub const NSXMLParserNotationNotFinishedError: NSXMLParserError = 49; +pub const NSXMLParserAttributeListNotStartedError: NSXMLParserError = 50; +pub const NSXMLParserAttributeListNotFinishedError: NSXMLParserError = 51; +pub const NSXMLParserMixedContentDeclNotStartedError: NSXMLParserError = 52; +pub const NSXMLParserMixedContentDeclNotFinishedError: NSXMLParserError = 53; +pub const NSXMLParserElementContentDeclNotStartedError: NSXMLParserError = 54; +pub const NSXMLParserElementContentDeclNotFinishedError: NSXMLParserError = 55; +pub const NSXMLParserXMLDeclNotStartedError: NSXMLParserError = 56; +pub const NSXMLParserXMLDeclNotFinishedError: NSXMLParserError = 57; +pub const NSXMLParserConditionalSectionNotStartedError: NSXMLParserError = 58; +pub const NSXMLParserConditionalSectionNotFinishedError: NSXMLParserError = 59; +pub const NSXMLParserExternalSubsetNotFinishedError: NSXMLParserError = 60; +pub const NSXMLParserDOCTYPEDeclNotFinishedError: NSXMLParserError = 61; +pub const NSXMLParserMisplacedCDATAEndStringError: NSXMLParserError = 62; +pub const NSXMLParserCDATANotFinishedError: NSXMLParserError = 63; +pub const NSXMLParserMisplacedXMLDeclarationError: NSXMLParserError = 64; +pub const NSXMLParserSpaceRequiredError: NSXMLParserError = 65; +pub const NSXMLParserSeparatorRequiredError: NSXMLParserError = 66; +pub const NSXMLParserNMTOKENRequiredError: NSXMLParserError = 67; +pub const NSXMLParserNAMERequiredError: NSXMLParserError = 68; +pub const NSXMLParserPCDATARequiredError: NSXMLParserError = 69; +pub const NSXMLParserURIRequiredError: NSXMLParserError = 70; +pub const NSXMLParserPublicIdentifierRequiredError: NSXMLParserError = 71; +pub const NSXMLParserLTRequiredError: NSXMLParserError = 72; +pub const NSXMLParserGTRequiredError: NSXMLParserError = 73; +pub const NSXMLParserLTSlashRequiredError: NSXMLParserError = 74; +pub const NSXMLParserEqualExpectedError: NSXMLParserError = 75; +pub const NSXMLParserTagNameMismatchError: NSXMLParserError = 76; +pub const NSXMLParserUnfinishedTagError: NSXMLParserError = 77; +pub const NSXMLParserStandaloneValueError: NSXMLParserError = 78; +pub const NSXMLParserInvalidEncodingNameError: NSXMLParserError = 79; +pub const NSXMLParserCommentContainsDoubleHyphenError: NSXMLParserError = 80; +pub const NSXMLParserInvalidEncodingError: NSXMLParserError = 81; +pub const NSXMLParserExternalStandaloneEntityError: NSXMLParserError = 82; +pub const NSXMLParserInvalidConditionalSectionError: NSXMLParserError = 83; +pub const NSXMLParserEntityValueRequiredError: NSXMLParserError = 84; +pub const NSXMLParserNotWellBalancedError: NSXMLParserError = 85; +pub const NSXMLParserExtraContentError: NSXMLParserError = 86; +pub const NSXMLParserInvalidCharacterInEntityError: NSXMLParserError = 87; +pub const NSXMLParserParsedEntityRefInInternalError: NSXMLParserError = 88; +pub const NSXMLParserEntityRefLoopError: NSXMLParserError = 89; +pub const NSXMLParserEntityBoundaryError: NSXMLParserError = 90; +pub const NSXMLParserInvalidURIError: NSXMLParserError = 91; +pub const NSXMLParserURIFragmentError: NSXMLParserError = 92; +pub const NSXMLParserNoDTDError: NSXMLParserError = 94; +pub const NSXMLParserDelegateAbortedParseError: NSXMLParserError = 512; diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index a7521ef80..dac15bc87 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -7,6 +7,9 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSXPCProxyCreating = NSObject; +pub type NSXPCConnectionOptions = NSUInteger; +pub const NSXPCConnectionPrivileged: NSXPCConnectionOptions = 4096; + extern_class!( #[derive(Debug)] pub struct NSXPCConnection; diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index 9810872e4..4ef5d73fc 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -4,3 +4,6 @@ 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; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index e80e1df02..451864725 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -166,35 +166,200 @@ pub(crate) mod NSXPCConnection; pub(crate) mod NSZone; mod __exported { + pub use super::FoundationErrors::{ + NSBundleErrorMaximum, NSBundleErrorMinimum, + NSBundleOnDemandResourceExceededMaximumSizeError, NSBundleOnDemandResourceInvalidTagError, + NSBundleOnDemandResourceOutOfSpaceError, NSCloudSharingConflictError, + NSCloudSharingErrorMaximum, NSCloudSharingErrorMinimum, NSCloudSharingNetworkFailureError, + NSCloudSharingNoPermissionError, NSCloudSharingOtherError, + NSCloudSharingQuotaExceededError, NSCloudSharingTooManyParticipantsError, + NSCoderErrorMaximum, NSCoderErrorMinimum, NSCoderInvalidValueError, + NSCoderReadCorruptError, NSCoderValueNotFoundError, NSCompressionErrorMaximum, + NSCompressionErrorMinimum, NSCompressionFailedError, NSDecompressionFailedError, + NSExecutableArchitectureMismatchError, NSExecutableErrorMaximum, NSExecutableErrorMinimum, + NSExecutableLinkError, NSExecutableLoadError, NSExecutableNotLoadableError, + NSExecutableRuntimeMismatchError, NSFeatureUnsupportedError, NSFileErrorMaximum, + NSFileErrorMinimum, NSFileLockingError, NSFileManagerUnmountBusyError, + NSFileManagerUnmountUnknownError, NSFileNoSuchFileError, NSFileReadCorruptFileError, + NSFileReadInapplicableStringEncodingError, NSFileReadInvalidFileNameError, + NSFileReadNoPermissionError, NSFileReadNoSuchFileError, NSFileReadTooLargeError, + NSFileReadUnknownError, NSFileReadUnknownStringEncodingError, + NSFileReadUnsupportedSchemeError, NSFileWriteFileExistsError, + NSFileWriteInapplicableStringEncodingError, NSFileWriteInvalidFileNameError, + NSFileWriteNoPermissionError, NSFileWriteOutOfSpaceError, NSFileWriteUnknownError, + NSFileWriteUnsupportedSchemeError, NSFileWriteVolumeReadOnlyError, NSFormattingError, + NSFormattingErrorMaximum, NSFormattingErrorMinimum, NSKeyValueValidationError, + NSPropertyListErrorMaximum, NSPropertyListErrorMinimum, NSPropertyListReadCorruptError, + NSPropertyListReadStreamError, NSPropertyListReadUnknownVersionError, + NSPropertyListWriteInvalidError, NSPropertyListWriteStreamError, + NSUbiquitousFileErrorMaximum, NSUbiquitousFileErrorMinimum, + NSUbiquitousFileNotUploadedDueToQuotaError, NSUbiquitousFileUbiquityServerNotAvailable, + NSUbiquitousFileUnavailableError, NSUserActivityConnectionUnavailableError, + NSUserActivityErrorMaximum, NSUserActivityErrorMinimum, NSUserActivityHandoffFailedError, + NSUserActivityHandoffUserInfoTooLargeError, NSUserActivityRemoteApplicationTimedOutError, + NSUserCancelledError, NSValidationErrorMaximum, NSValidationErrorMinimum, + NSXPCConnectionErrorMaximum, NSXPCConnectionErrorMinimum, NSXPCConnectionInterrupted, + NSXPCConnectionInvalid, NSXPCConnectionReplyInvalid, + }; pub use super::NSAffineTransform::NSAffineTransform; - pub use super::NSAppleEventDescriptor::NSAppleEventDescriptor; + pub use super::NSAppleEventDescriptor::{ + NSAppleEventDescriptor, NSAppleEventSendAlwaysInteract, NSAppleEventSendCanInteract, + NSAppleEventSendCanSwitchLayer, NSAppleEventSendDefaultOptions, + NSAppleEventSendDontAnnotate, NSAppleEventSendDontExecute, NSAppleEventSendDontRecord, + NSAppleEventSendNeverInteract, NSAppleEventSendNoReply, NSAppleEventSendOptions, + NSAppleEventSendQueueReply, NSAppleEventSendWaitForReply, + }; pub use super::NSAppleEventManager::NSAppleEventManager; pub use super::NSAppleScript::NSAppleScript; pub use super::NSArchiver::{NSArchiver, NSUnarchiver}; - pub use super::NSArray::{NSArray, NSMutableArray}; + pub use super::NSArray::{ + NSArray, NSBinarySearchingFirstEqual, NSBinarySearchingInsertionIndex, + NSBinarySearchingLastEqual, NSBinarySearchingOptions, NSMutableArray, + }; pub use super::NSAttributedString::{ - NSAttributedString, NSAttributedStringKey, NSAttributedStringMarkdownParsingOptions, - NSMutableAttributedString, NSPresentationIntent, + NSAttributedString, NSAttributedStringEnumerationLongestEffectiveRangeNotRequired, + NSAttributedStringEnumerationOptions, NSAttributedStringEnumerationReverse, + NSAttributedStringFormattingApplyReplacementIndexAttribute, + NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging, + NSAttributedStringFormattingOptions, NSAttributedStringKey, + NSAttributedStringMarkdownInterpretedSyntax, + NSAttributedStringMarkdownInterpretedSyntaxFull, + NSAttributedStringMarkdownInterpretedSyntaxInlineOnly, + NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace, + NSAttributedStringMarkdownParsingFailurePolicy, + NSAttributedStringMarkdownParsingFailureReturnError, + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible, + NSAttributedStringMarkdownParsingOptions, NSInlinePresentationIntent, + NSInlinePresentationIntentBlockHTML, NSInlinePresentationIntentCode, + NSInlinePresentationIntentEmphasized, NSInlinePresentationIntentInlineHTML, + NSInlinePresentationIntentLineBreak, NSInlinePresentationIntentSoftBreak, + NSInlinePresentationIntentStrikethrough, NSInlinePresentationIntentStronglyEmphasized, + NSMutableAttributedString, NSPresentationIntent, NSPresentationIntentKind, + NSPresentationIntentKindBlockQuote, NSPresentationIntentKindCodeBlock, + NSPresentationIntentKindHeader, NSPresentationIntentKindListItem, + NSPresentationIntentKindOrderedList, NSPresentationIntentKindParagraph, + NSPresentationIntentKindTable, NSPresentationIntentKindTableCell, + NSPresentationIntentKindTableHeaderRow, NSPresentationIntentKindTableRow, + NSPresentationIntentKindThematicBreak, NSPresentationIntentKindUnorderedList, + NSPresentationIntentTableColumnAlignment, NSPresentationIntentTableColumnAlignmentCenter, + NSPresentationIntentTableColumnAlignmentLeft, + NSPresentationIntentTableColumnAlignmentRight, }; pub use super::NSAutoreleasePool::NSAutoreleasePool; - pub use super::NSBackgroundActivityScheduler::NSBackgroundActivityScheduler; - pub use super::NSBundle::{NSBundle, NSBundleResourceRequest}; - pub use super::NSByteCountFormatter::NSByteCountFormatter; + pub use super::NSBackgroundActivityScheduler::{ + NSBackgroundActivityResult, NSBackgroundActivityResultDeferred, + NSBackgroundActivityResultFinished, NSBackgroundActivityScheduler, + }; + pub use super::NSBundle::{ + NSBundle, NSBundleExecutableArchitectureARM64, NSBundleExecutableArchitectureI386, + NSBundleExecutableArchitecturePPC, NSBundleExecutableArchitecturePPC64, + NSBundleExecutableArchitectureX86_64, NSBundleResourceRequest, + }; + pub use super::NSByteCountFormatter::{ + NSByteCountFormatter, NSByteCountFormatterCountStyle, NSByteCountFormatterCountStyleBinary, + NSByteCountFormatterCountStyleDecimal, NSByteCountFormatterCountStyleFile, + NSByteCountFormatterCountStyleMemory, NSByteCountFormatterUnits, + NSByteCountFormatterUseAll, NSByteCountFormatterUseBytes, NSByteCountFormatterUseDefault, + NSByteCountFormatterUseEB, NSByteCountFormatterUseGB, NSByteCountFormatterUseKB, + NSByteCountFormatterUseMB, NSByteCountFormatterUsePB, NSByteCountFormatterUseTB, + NSByteCountFormatterUseYBOrHigher, NSByteCountFormatterUseZB, + }; + pub use super::NSByteOrder::{NS_BigEndian, NS_LittleEndian, NS_UnknownByteOrder}; pub use super::NSCache::{NSCache, NSCacheDelegate}; - pub use super::NSCalendar::{NSCalendar, NSCalendarIdentifier, NSDateComponents}; + pub use super::NSCalendar::{ + NSCalendar, NSCalendarCalendarUnit, NSCalendarIdentifier, NSCalendarMatchFirst, + NSCalendarMatchLast, NSCalendarMatchNextTime, + NSCalendarMatchNextTimePreservingSmallerUnits, + NSCalendarMatchPreviousTimePreservingSmallerUnits, NSCalendarMatchStrictly, + NSCalendarOptions, NSCalendarSearchBackwards, NSCalendarUnit, NSCalendarUnitCalendar, + NSCalendarUnitDay, NSCalendarUnitEra, NSCalendarUnitHour, NSCalendarUnitMinute, + NSCalendarUnitMonth, NSCalendarUnitNanosecond, NSCalendarUnitQuarter, NSCalendarUnitSecond, + NSCalendarUnitTimeZone, NSCalendarUnitWeekOfMonth, NSCalendarUnitWeekOfYear, + NSCalendarUnitWeekday, NSCalendarUnitWeekdayOrdinal, NSCalendarUnitYear, + NSCalendarUnitYearForWeekOfYear, NSCalendarWrapComponents, NSDateComponentUndefined, + NSDateComponents, NSDayCalendarUnit, NSEraCalendarUnit, NSHourCalendarUnit, + NSMinuteCalendarUnit, NSMonthCalendarUnit, NSQuarterCalendarUnit, NSSecondCalendarUnit, + NSTimeZoneCalendarUnit, NSUndefinedDateComponent, NSWeekCalendarUnit, + NSWeekOfMonthCalendarUnit, NSWeekOfYearCalendarUnit, NSWeekdayCalendarUnit, + NSWeekdayOrdinalCalendarUnit, NSWrapCalendarComponents, NSYearCalendarUnit, + NSYearForWeekOfYearCalendarUnit, + }; pub use super::NSCalendarDate::NSCalendarDate; - pub use super::NSCharacterSet::{NSCharacterSet, NSMutableCharacterSet}; + pub use super::NSCharacterSet::{ + NSCharacterSet, NSMutableCharacterSet, NSOpenStepUnicodeReservedBase, + }; pub use super::NSClassDescription::NSClassDescription; - pub use super::NSCoder::NSCoder; - pub use super::NSComparisonPredicate::NSComparisonPredicate; - pub use super::NSCompoundPredicate::NSCompoundPredicate; + pub use super::NSCoder::{ + NSCoder, NSDecodingFailurePolicy, NSDecodingFailurePolicyRaiseException, + NSDecodingFailurePolicySetErrorAndReturn, + }; + pub use super::NSComparisonPredicate::{ + NSAllPredicateModifier, NSAnyPredicateModifier, NSBeginsWithPredicateOperatorType, + NSBetweenPredicateOperatorType, NSCaseInsensitivePredicateOption, NSComparisonPredicate, + NSComparisonPredicateModifier, NSComparisonPredicateOptions, + NSContainsPredicateOperatorType, NSCustomSelectorPredicateOperatorType, + NSDiacriticInsensitivePredicateOption, NSDirectPredicateModifier, + NSEndsWithPredicateOperatorType, NSEqualToPredicateOperatorType, + NSGreaterThanOrEqualToPredicateOperatorType, NSGreaterThanPredicateOperatorType, + NSInPredicateOperatorType, NSLessThanOrEqualToPredicateOperatorType, + NSLessThanPredicateOperatorType, NSLikePredicateOperatorType, + NSMatchesPredicateOperatorType, NSNormalizedPredicateOption, + NSNotEqualToPredicateOperatorType, NSPredicateOperatorType, + }; + pub use super::NSCompoundPredicate::{ + NSAndPredicateType, NSCompoundPredicate, NSCompoundPredicateType, NSNotPredicateType, + NSOrPredicateType, + }; pub use super::NSConnection::{NSConnection, NSConnectionDelegate, NSDistantObjectRequest}; - pub use super::NSData::{NSData, NSMutableData, NSPurgeableData}; + pub use super::NSData::{ + NSAtomicWrite, NSData, NSDataBase64DecodingIgnoreUnknownCharacters, + NSDataBase64DecodingOptions, NSDataBase64Encoding64CharacterLineLength, + NSDataBase64Encoding76CharacterLineLength, NSDataBase64EncodingEndLineWithCarriageReturn, + NSDataBase64EncodingEndLineWithLineFeed, NSDataBase64EncodingOptions, + NSDataCompressionAlgorithm, NSDataCompressionAlgorithmLZ4, NSDataCompressionAlgorithmLZFSE, + NSDataCompressionAlgorithmLZMA, NSDataCompressionAlgorithmZlib, NSDataReadingMapped, + NSDataReadingMappedAlways, NSDataReadingMappedIfSafe, NSDataReadingOptions, + NSDataReadingUncached, NSDataSearchAnchored, NSDataSearchBackwards, NSDataSearchOptions, + NSDataWritingAtomic, NSDataWritingFileProtectionComplete, + NSDataWritingFileProtectionCompleteUnlessOpen, + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication, + NSDataWritingFileProtectionMask, NSDataWritingFileProtectionNone, NSDataWritingOptions, + NSDataWritingWithoutOverwriting, NSMappedRead, NSMutableData, NSPurgeableData, + NSUncachedRead, + }; pub use super::NSDate::NSDate; - pub use super::NSDateComponentsFormatter::NSDateComponentsFormatter; - pub use super::NSDateFormatter::NSDateFormatter; + pub use super::NSDateComponentsFormatter::{ + NSDateComponentsFormatter, NSDateComponentsFormatterUnitsStyle, + NSDateComponentsFormatterUnitsStyleAbbreviated, NSDateComponentsFormatterUnitsStyleBrief, + NSDateComponentsFormatterUnitsStyleFull, NSDateComponentsFormatterUnitsStylePositional, + NSDateComponentsFormatterUnitsStyleShort, NSDateComponentsFormatterUnitsStyleSpellOut, + NSDateComponentsFormatterZeroFormattingBehavior, + NSDateComponentsFormatterZeroFormattingBehaviorDefault, + NSDateComponentsFormatterZeroFormattingBehaviorDropAll, + NSDateComponentsFormatterZeroFormattingBehaviorDropLeading, + NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle, + NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing, + NSDateComponentsFormatterZeroFormattingBehaviorNone, + NSDateComponentsFormatterZeroFormattingBehaviorPad, + }; + pub use super::NSDateFormatter::{ + NSDateFormatter, NSDateFormatterBehavior, NSDateFormatterBehavior10_0, + NSDateFormatterBehavior10_4, NSDateFormatterBehaviorDefault, NSDateFormatterFullStyle, + NSDateFormatterLongStyle, NSDateFormatterMediumStyle, NSDateFormatterNoStyle, + NSDateFormatterShortStyle, NSDateFormatterStyle, + }; pub use super::NSDateInterval::NSDateInterval; - pub use super::NSDateIntervalFormatter::NSDateIntervalFormatter; + pub use super::NSDateIntervalFormatter::{ + NSDateIntervalFormatter, NSDateIntervalFormatterFullStyle, + NSDateIntervalFormatterLongStyle, NSDateIntervalFormatterMediumStyle, + NSDateIntervalFormatterNoStyle, NSDateIntervalFormatterShortStyle, + NSDateIntervalFormatterStyle, + }; + pub use super::NSDecimal::{ + NSCalculationDivideByZero, NSCalculationError, NSCalculationLossOfPrecision, + NSCalculationNoError, NSCalculationOverflow, NSCalculationUnderflow, NSRoundBankers, + NSRoundDown, NSRoundPlain, NSRoundUp, NSRoundingMode, + }; pub use super::NSDecimalNumber::{ NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberHandler, }; @@ -203,87 +368,276 @@ mod __exported { pub use super::NSDistributedLock::NSDistributedLock; pub use super::NSDistributedNotificationCenter::{ NSDistributedNotificationCenter, NSDistributedNotificationCenterType, + NSDistributedNotificationDeliverImmediately, NSDistributedNotificationOptions, + NSDistributedNotificationPostToAllSessions, NSNotificationSuspensionBehavior, + NSNotificationSuspensionBehaviorCoalesce, + NSNotificationSuspensionBehaviorDeliverImmediately, NSNotificationSuspensionBehaviorDrop, + NSNotificationSuspensionBehaviorHold, + }; + pub use super::NSEnergyFormatter::{ + NSEnergyFormatter, NSEnergyFormatterUnit, NSEnergyFormatterUnitCalorie, + NSEnergyFormatterUnitJoule, NSEnergyFormatterUnitKilocalorie, + NSEnergyFormatterUnitKilojoule, }; - pub use super::NSEnergyFormatter::NSEnergyFormatter; pub use super::NSEnumerator::{NSEnumerator, NSFastEnumeration}; pub use super::NSError::{NSError, NSErrorDomain, NSErrorUserInfoKey}; pub use super::NSException::{NSAssertionHandler, NSException}; - pub use super::NSExpression::NSExpression; + pub use super::NSExpression::{ + NSAggregateExpressionType, NSAnyKeyExpressionType, NSBlockExpressionType, + NSConditionalExpressionType, NSConstantValueExpressionType, + NSEvaluatedObjectExpressionType, NSExpression, NSExpressionType, NSFunctionExpressionType, + NSIntersectSetExpressionType, NSKeyPathExpressionType, NSMinusSetExpressionType, + NSSubqueryExpressionType, NSUnionSetExpressionType, NSVariableExpressionType, + }; pub use super::NSExtensionContext::NSExtensionContext; pub use super::NSExtensionItem::NSExtensionItem; pub use super::NSExtensionRequestHandling::NSExtensionRequestHandling; - pub use super::NSFileCoordinator::{NSFileAccessIntent, NSFileCoordinator}; + pub use super::NSFileCoordinator::{ + NSFileAccessIntent, NSFileCoordinator, NSFileCoordinatorReadingForUploading, + NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorReadingOptions, + NSFileCoordinatorReadingResolvesSymbolicLink, NSFileCoordinatorReadingWithoutChanges, + NSFileCoordinatorWritingContentIndependentMetadataOnly, + NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMerging, + NSFileCoordinatorWritingForMoving, NSFileCoordinatorWritingForReplacing, + NSFileCoordinatorWritingOptions, + }; pub use super::NSFileHandle::{NSFileHandle, NSPipe}; pub use super::NSFileManager::{ - NSDirectoryEnumerator, NSFileAttributeKey, NSFileAttributeType, NSFileManager, - NSFileManagerDelegate, NSFileProtectionType, NSFileProviderService, - NSFileProviderServiceName, + NSDirectoryEnumerationIncludesDirectoriesPostOrder, NSDirectoryEnumerationOptions, + NSDirectoryEnumerationProducesRelativePathURLs, NSDirectoryEnumerationSkipsHiddenFiles, + NSDirectoryEnumerationSkipsPackageDescendants, + NSDirectoryEnumerationSkipsSubdirectoryDescendants, NSDirectoryEnumerator, + NSFileAttributeKey, NSFileAttributeType, NSFileManager, NSFileManagerDelegate, + NSFileManagerItemReplacementOptions, NSFileManagerItemReplacementUsingNewMetadataOnly, + NSFileManagerItemReplacementWithoutDeletingBackupItem, + NSFileManagerUnmountAllPartitionsAndEjectDisk, NSFileManagerUnmountOptions, + NSFileManagerUnmountWithoutUI, NSFileProtectionType, NSFileProviderService, + NSFileProviderServiceName, NSURLRelationship, NSURLRelationshipContains, + NSURLRelationshipOther, NSURLRelationshipSame, NSVolumeEnumerationOptions, + NSVolumeEnumerationProduceFileReferenceURLs, NSVolumeEnumerationSkipHiddenVolumes, }; pub use super::NSFilePresenter::NSFilePresenter; - pub use super::NSFileVersion::NSFileVersion; - pub use super::NSFileWrapper::NSFileWrapper; - pub use super::NSFormatter::NSFormatter; + pub use super::NSFileVersion::{ + NSFileVersion, NSFileVersionAddingByMoving, NSFileVersionAddingOptions, + NSFileVersionReplacingByMoving, NSFileVersionReplacingOptions, + }; + pub use super::NSFileWrapper::{ + NSFileWrapper, NSFileWrapperReadingImmediate, NSFileWrapperReadingOptions, + NSFileWrapperReadingWithoutMapping, NSFileWrapperWritingAtomic, + NSFileWrapperWritingOptions, NSFileWrapperWritingWithNameUpdating, + }; + pub use super::NSFormatter::{ + NSFormatter, NSFormattingContext, NSFormattingContextBeginningOfSentence, + NSFormattingContextDynamic, NSFormattingContextListItem, + NSFormattingContextMiddleOfSentence, NSFormattingContextStandalone, + NSFormattingContextUnknown, NSFormattingUnitStyle, NSFormattingUnitStyleLong, + NSFormattingUnitStyleMedium, NSFormattingUnitStyleShort, + }; pub use super::NSGarbageCollector::NSGarbageCollector; - pub use super::NSGeometry::{NSPoint, NSRect, NSSize}; + pub use super::NSGeometry::{ + NSAlignAllEdgesInward, NSAlignAllEdgesNearest, NSAlignAllEdgesOutward, NSAlignHeightInward, + NSAlignHeightNearest, NSAlignHeightOutward, NSAlignMaxXInward, NSAlignMaxXNearest, + NSAlignMaxXOutward, NSAlignMaxYInward, NSAlignMaxYNearest, NSAlignMaxYOutward, + NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, + NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, + NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSMaxXEdge, NSMaxYEdge, + NSMinXEdge, NSMinYEdge, NSPoint, NSRect, NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, + NSRectEdgeMinX, NSRectEdgeMinY, NSSize, + }; pub use super::NSHTTPCookie::{ NSHTTPCookie, NSHTTPCookiePropertyKey, NSHTTPCookieStringPolicy, }; - pub use super::NSHTTPCookieStorage::NSHTTPCookieStorage; + pub use super::NSHTTPCookieStorage::{ + NSHTTPCookieAcceptPolicy, NSHTTPCookieAcceptPolicyAlways, NSHTTPCookieAcceptPolicyNever, + NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, NSHTTPCookieStorage, + }; pub use super::NSHashTable::{NSHashTable, NSHashTableOptions}; pub use super::NSHost::NSHost; - pub use super::NSISO8601DateFormatter::NSISO8601DateFormatter; + pub use super::NSISO8601DateFormatter::{ + NSISO8601DateFormatOptions, NSISO8601DateFormatWithColonSeparatorInTime, + NSISO8601DateFormatWithColonSeparatorInTimeZone, + NSISO8601DateFormatWithDashSeparatorInDate, NSISO8601DateFormatWithDay, + NSISO8601DateFormatWithFractionalSeconds, NSISO8601DateFormatWithFullDate, + NSISO8601DateFormatWithFullTime, NSISO8601DateFormatWithInternetDateTime, + NSISO8601DateFormatWithMonth, NSISO8601DateFormatWithSpaceBetweenDateAndTime, + NSISO8601DateFormatWithTime, NSISO8601DateFormatWithTimeZone, + NSISO8601DateFormatWithWeekOfYear, NSISO8601DateFormatWithYear, NSISO8601DateFormatter, + }; pub use super::NSIndexPath::NSIndexPath; pub use super::NSIndexSet::{NSIndexSet, NSMutableIndexSet}; pub use super::NSInflectionRule::{NSInflectionRule, NSInflectionRuleExplicit}; pub use super::NSInvocation::NSInvocation; - pub use super::NSItemProvider::{NSItemProvider, NSItemProviderReading, NSItemProviderWriting}; - pub use super::NSJSONSerialization::NSJSONSerialization; + pub use super::NSItemProvider::{ + NSItemProvider, NSItemProviderErrorCode, NSItemProviderFileOptionOpenInPlace, + NSItemProviderFileOptions, NSItemProviderItemUnavailableError, NSItemProviderReading, + NSItemProviderRepresentationVisibility, NSItemProviderRepresentationVisibilityAll, + NSItemProviderRepresentationVisibilityGroup, + NSItemProviderRepresentationVisibilityOwnProcess, + NSItemProviderRepresentationVisibilityTeam, NSItemProviderUnavailableCoercionError, + NSItemProviderUnexpectedValueClassError, NSItemProviderUnknownError, NSItemProviderWriting, + }; + pub use super::NSJSONSerialization::{ + NSJSONReadingAllowFragments, NSJSONReadingFragmentsAllowed, NSJSONReadingJSON5Allowed, + NSJSONReadingMutableContainers, NSJSONReadingMutableLeaves, NSJSONReadingOptions, + NSJSONReadingTopLevelDictionaryAssumed, NSJSONSerialization, NSJSONWritingFragmentsAllowed, + NSJSONWritingOptions, NSJSONWritingPrettyPrinted, NSJSONWritingSortedKeys, + NSJSONWritingWithoutEscapingSlashes, + }; pub use super::NSKeyValueCoding::NSKeyValueOperator; - pub use super::NSKeyValueObserving::NSKeyValueChangeKey; + pub use super::NSKeyValueObserving::{ + NSKeyValueChange, NSKeyValueChangeInsertion, NSKeyValueChangeKey, NSKeyValueChangeRemoval, + NSKeyValueChangeReplacement, NSKeyValueChangeSetting, NSKeyValueIntersectSetMutation, + NSKeyValueMinusSetMutation, NSKeyValueObservingOptionInitial, NSKeyValueObservingOptionNew, + NSKeyValueObservingOptionOld, NSKeyValueObservingOptionPrior, NSKeyValueObservingOptions, + NSKeyValueSetMutationKind, NSKeyValueSetSetMutation, NSKeyValueUnionSetMutation, + }; pub use super::NSKeyedArchiver::{ NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, NSKeyedUnarchiverDelegate, }; - pub use super::NSLengthFormatter::NSLengthFormatter; + pub use super::NSLengthFormatter::{ + NSLengthFormatter, NSLengthFormatterUnit, NSLengthFormatterUnitCentimeter, + NSLengthFormatterUnitFoot, NSLengthFormatterUnitInch, NSLengthFormatterUnitKilometer, + NSLengthFormatterUnitMeter, NSLengthFormatterUnitMile, NSLengthFormatterUnitMillimeter, + NSLengthFormatterUnitYard, + }; pub use super::NSLinguisticTagger::{ - NSLinguisticTag, NSLinguisticTagScheme, NSLinguisticTagger, + NSLinguisticTag, NSLinguisticTagScheme, NSLinguisticTagger, NSLinguisticTaggerJoinNames, + NSLinguisticTaggerOmitOther, NSLinguisticTaggerOmitPunctuation, + NSLinguisticTaggerOmitWhitespace, NSLinguisticTaggerOmitWords, NSLinguisticTaggerOptions, + NSLinguisticTaggerUnit, NSLinguisticTaggerUnitDocument, NSLinguisticTaggerUnitParagraph, + NSLinguisticTaggerUnitSentence, NSLinguisticTaggerUnitWord, }; pub use super::NSListFormatter::NSListFormatter; - pub use super::NSLocale::{NSLocale, NSLocaleKey}; + pub use super::NSLocale::{ + NSLocale, NSLocaleKey, NSLocaleLanguageDirection, NSLocaleLanguageDirectionBottomToTop, + NSLocaleLanguageDirectionLeftToRight, NSLocaleLanguageDirectionRightToLeft, + NSLocaleLanguageDirectionTopToBottom, NSLocaleLanguageDirectionUnknown, + }; pub use super::NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; pub use super::NSMapTable::{NSMapTable, NSMapTableOptions}; - pub use super::NSMassFormatter::NSMassFormatter; + pub use super::NSMassFormatter::{ + NSMassFormatter, NSMassFormatterUnit, NSMassFormatterUnitGram, NSMassFormatterUnitKilogram, + NSMassFormatterUnitOunce, NSMassFormatterUnitPound, NSMassFormatterUnitStone, + }; pub use super::NSMeasurement::NSMeasurement; - pub use super::NSMeasurementFormatter::NSMeasurementFormatter; + pub use super::NSMeasurementFormatter::{ + NSMeasurementFormatter, NSMeasurementFormatterUnitOptions, + NSMeasurementFormatterUnitOptionsNaturalScale, + NSMeasurementFormatterUnitOptionsProvidedUnit, + NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit, + }; pub use super::NSMetadata::{ NSMetadataItem, NSMetadataQuery, NSMetadataQueryAttributeValueTuple, NSMetadataQueryDelegate, NSMetadataQueryResultGroup, }; pub use super::NSMethodSignature::NSMethodSignature; - pub use super::NSMorphology::{NSMorphology, NSMorphologyCustomPronoun}; + pub use super::NSMorphology::{ + NSGrammaticalGender, NSGrammaticalGenderFeminine, NSGrammaticalGenderMasculine, + NSGrammaticalGenderNeuter, NSGrammaticalGenderNotSet, NSGrammaticalNumber, + NSGrammaticalNumberNotSet, NSGrammaticalNumberPlural, NSGrammaticalNumberPluralFew, + NSGrammaticalNumberPluralMany, NSGrammaticalNumberPluralTwo, NSGrammaticalNumberSingular, + NSGrammaticalNumberZero, NSGrammaticalPartOfSpeech, NSGrammaticalPartOfSpeechAbbreviation, + NSGrammaticalPartOfSpeechAdjective, NSGrammaticalPartOfSpeechAdposition, + NSGrammaticalPartOfSpeechAdverb, NSGrammaticalPartOfSpeechConjunction, + NSGrammaticalPartOfSpeechDeterminer, NSGrammaticalPartOfSpeechInterjection, + NSGrammaticalPartOfSpeechLetter, NSGrammaticalPartOfSpeechNotSet, + NSGrammaticalPartOfSpeechNoun, NSGrammaticalPartOfSpeechNumeral, + NSGrammaticalPartOfSpeechParticle, NSGrammaticalPartOfSpeechPreposition, + NSGrammaticalPartOfSpeechPronoun, NSGrammaticalPartOfSpeechVerb, NSMorphology, + NSMorphologyCustomPronoun, + }; pub use super::NSNetServices::{ NSNetService, NSNetServiceBrowser, NSNetServiceBrowserDelegate, NSNetServiceDelegate, + NSNetServiceListenForConnections, NSNetServiceNoAutoRename, NSNetServiceOptions, + NSNetServicesActivityInProgress, NSNetServicesBadArgumentError, + NSNetServicesCancelledError, NSNetServicesCollisionError, NSNetServicesError, + NSNetServicesInvalidError, NSNetServicesMissingRequiredConfigurationError, + NSNetServicesNotFoundError, NSNetServicesTimeoutError, NSNetServicesUnknownError, }; pub use super::NSNotification::{NSNotification, NSNotificationCenter, NSNotificationName}; - pub use super::NSNotificationQueue::NSNotificationQueue; + pub use super::NSNotificationQueue::{ + NSNotificationCoalescing, NSNotificationCoalescingOnName, NSNotificationCoalescingOnSender, + NSNotificationNoCoalescing, NSNotificationQueue, NSPostASAP, NSPostNow, NSPostWhenIdle, + NSPostingStyle, + }; pub use super::NSNull::NSNull; - pub use super::NSNumberFormatter::NSNumberFormatter; - pub use super::NSObjCRuntime::{NSExceptionName, NSRunLoopMode}; + pub use super::NSNumberFormatter::{ + NSNumberFormatter, NSNumberFormatterBehavior, NSNumberFormatterBehavior10_0, + NSNumberFormatterBehavior10_4, NSNumberFormatterBehaviorDefault, + NSNumberFormatterCurrencyAccountingStyle, NSNumberFormatterCurrencyISOCodeStyle, + NSNumberFormatterCurrencyPluralStyle, NSNumberFormatterCurrencyStyle, + NSNumberFormatterDecimalStyle, NSNumberFormatterNoStyle, NSNumberFormatterOrdinalStyle, + NSNumberFormatterPadAfterPrefix, NSNumberFormatterPadAfterSuffix, + NSNumberFormatterPadBeforePrefix, NSNumberFormatterPadBeforeSuffix, + NSNumberFormatterPadPosition, NSNumberFormatterPercentStyle, NSNumberFormatterRoundCeiling, + NSNumberFormatterRoundDown, NSNumberFormatterRoundFloor, NSNumberFormatterRoundHalfDown, + NSNumberFormatterRoundHalfEven, NSNumberFormatterRoundHalfUp, NSNumberFormatterRoundUp, + NSNumberFormatterRoundingMode, NSNumberFormatterScientificStyle, + NSNumberFormatterSpellOutStyle, NSNumberFormatterStyle, + }; + pub use super::NSObjCRuntime::{ + NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, NSEnumerationReverse, + NSExceptionName, NSOrderedAscending, NSOrderedDescending, NSOrderedSame, + NSQualityOfService, NSQualityOfServiceBackground, NSQualityOfServiceDefault, + NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, + NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, NSSortOptions, NSSortStable, + }; pub use super::NSObject::{ NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, }; pub use super::NSOperation::{ NSBlockOperation, NSInvocationOperation, NSOperation, NSOperationQueue, + NSOperationQueuePriority, NSOperationQueuePriorityHigh, NSOperationQueuePriorityLow, + NSOperationQueuePriorityNormal, NSOperationQueuePriorityVeryHigh, + NSOperationQueuePriorityVeryLow, + }; + pub use super::NSOrderedCollectionChange::{ + NSCollectionChangeInsert, NSCollectionChangeRemove, NSCollectionChangeType, + NSOrderedCollectionChange, + }; + pub use super::NSOrderedCollectionDifference::{ + NSOrderedCollectionDifference, NSOrderedCollectionDifferenceCalculationInferMoves, + NSOrderedCollectionDifferenceCalculationOmitInsertedObjects, + NSOrderedCollectionDifferenceCalculationOmitRemovedObjects, + NSOrderedCollectionDifferenceCalculationOptions, }; - pub use super::NSOrderedCollectionChange::NSOrderedCollectionChange; - pub use super::NSOrderedCollectionDifference::NSOrderedCollectionDifference; pub use super::NSOrderedSet::{NSMutableOrderedSet, NSOrderedSet}; pub use super::NSOrthography::NSOrthography; + pub use super::NSPathUtilities::{ + NSAdminApplicationDirectory, NSAllApplicationsDirectory, NSAllDomainsMask, + NSAllLibrariesDirectory, NSApplicationDirectory, NSApplicationScriptsDirectory, + NSApplicationSupportDirectory, NSAutosavedInformationDirectory, NSCachesDirectory, + NSCoreServiceDirectory, NSDemoApplicationDirectory, NSDesktopDirectory, + NSDeveloperApplicationDirectory, NSDeveloperDirectory, NSDocumentDirectory, + NSDocumentationDirectory, NSDownloadsDirectory, NSInputMethodsDirectory, + NSItemReplacementDirectory, NSLibraryDirectory, NSLocalDomainMask, NSMoviesDirectory, + NSMusicDirectory, NSNetworkDomainMask, NSPicturesDirectory, NSPreferencePanesDirectory, + NSPrinterDescriptionDirectory, NSSearchPathDirectory, NSSearchPathDomainMask, + NSSharedPublicDirectory, NSSystemDomainMask, NSTrashDirectory, NSUserDirectory, + NSUserDomainMask, + }; pub use super::NSPersonNameComponents::NSPersonNameComponents; - pub use super::NSPersonNameComponentsFormatter::NSPersonNameComponentsFormatter; + pub use super::NSPersonNameComponentsFormatter::{ + NSPersonNameComponentsFormatter, NSPersonNameComponentsFormatterOptions, + NSPersonNameComponentsFormatterPhonetic, NSPersonNameComponentsFormatterStyle, + NSPersonNameComponentsFormatterStyleAbbreviated, + NSPersonNameComponentsFormatterStyleDefault, NSPersonNameComponentsFormatterStyleLong, + NSPersonNameComponentsFormatterStyleMedium, NSPersonNameComponentsFormatterStyleShort, + }; pub use super::NSPointerArray::NSPointerArray; - pub use super::NSPointerFunctions::NSPointerFunctions; + pub use super::NSPointerFunctions::{ + NSPointerFunctions, NSPointerFunctionsCStringPersonality, NSPointerFunctionsCopyIn, + NSPointerFunctionsIntegerPersonality, NSPointerFunctionsMachVirtualMemory, + NSPointerFunctionsMallocMemory, NSPointerFunctionsObjectPersonality, + NSPointerFunctionsObjectPointerPersonality, NSPointerFunctionsOpaqueMemory, + NSPointerFunctionsOpaquePersonality, NSPointerFunctionsOptions, + NSPointerFunctionsStrongMemory, NSPointerFunctionsStructPersonality, + NSPointerFunctionsWeakMemory, NSPointerFunctionsZeroingWeakMemory, + }; pub use super::NSPort::{ - NSMachPort, NSMachPortDelegate, NSMessagePort, NSPort, NSPortDelegate, NSSocketPort, + NSMachPort, NSMachPortDeallocateNone, NSMachPortDeallocateReceiveRight, + NSMachPortDeallocateSendRight, NSMachPortDelegate, NSMachPortOptions, NSMessagePort, + NSPort, NSPortDelegate, NSSocketPort, }; pub use super::NSPortCoder::NSPortCoder; pub use super::NSPortMessage::NSPortMessage; @@ -291,80 +645,252 @@ mod __exported { NSMachBootstrapServer, NSMessagePortNameServer, NSPortNameServer, NSSocketPortNameServer, }; pub use super::NSPredicate::NSPredicate; - pub use super::NSProcessInfo::NSProcessInfo; + pub use super::NSProcessInfo::{ + NSActivityAutomaticTerminationDisabled, NSActivityBackground, + NSActivityIdleDisplaySleepDisabled, NSActivityIdleSystemSleepDisabled, + NSActivityLatencyCritical, NSActivityOptions, NSActivitySuddenTerminationDisabled, + NSActivityUserInitiated, NSActivityUserInitiatedAllowingIdleSystemSleep, + NSHPUXOperatingSystem, NSMACHOperatingSystem, NSOSF1OperatingSystem, NSProcessInfo, + NSProcessInfoThermalState, NSProcessInfoThermalStateCritical, + NSProcessInfoThermalStateFair, NSProcessInfoThermalStateNominal, + NSProcessInfoThermalStateSerious, NSSolarisOperatingSystem, NSSunOSOperatingSystem, + NSWindows95OperatingSystem, NSWindowsNTOperatingSystem, + }; pub use super::NSProgress::{ NSProgress, NSProgressFileOperationKind, NSProgressKind, NSProgressReporting, NSProgressUserInfoKey, }; pub use super::NSPropertyList::{ + NSPropertyListBinaryFormat_v1_0, NSPropertyListFormat, NSPropertyListImmutable, + NSPropertyListMutabilityOptions, NSPropertyListMutableContainers, + NSPropertyListMutableContainersAndLeaves, NSPropertyListOpenStepFormat, NSPropertyListReadOptions, NSPropertyListSerialization, NSPropertyListWriteOptions, + NSPropertyListXMLFormat_v1_0, }; pub use super::NSProtocolChecker::NSProtocolChecker; pub use super::NSProxy::NSProxy; - pub use super::NSRegularExpression::{NSDataDetector, NSRegularExpression}; - pub use super::NSRelativeDateTimeFormatter::NSRelativeDateTimeFormatter; + pub use super::NSRegularExpression::{ + NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, + NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, + NSMatchingReportProgress, NSMatchingRequiredEnd, NSMatchingWithTransparentBounds, + NSMatchingWithoutAnchoringBounds, NSRegularExpression, + NSRegularExpressionAllowCommentsAndWhitespace, NSRegularExpressionAnchorsMatchLines, + NSRegularExpressionCaseInsensitive, NSRegularExpressionDotMatchesLineSeparators, + NSRegularExpressionIgnoreMetacharacters, NSRegularExpressionOptions, + NSRegularExpressionUseUnicodeWordBoundaries, NSRegularExpressionUseUnixLineSeparators, + }; + pub use super::NSRelativeDateTimeFormatter::{ + NSRelativeDateTimeFormatter, NSRelativeDateTimeFormatterStyle, + NSRelativeDateTimeFormatterStyleNamed, NSRelativeDateTimeFormatterStyleNumeric, + NSRelativeDateTimeFormatterUnitsStyle, NSRelativeDateTimeFormatterUnitsStyleAbbreviated, + NSRelativeDateTimeFormatterUnitsStyleFull, NSRelativeDateTimeFormatterUnitsStyleShort, + NSRelativeDateTimeFormatterUnitsStyleSpellOut, + }; pub use super::NSRunLoop::NSRunLoop; pub use super::NSScanner::NSScanner; pub use super::NSScriptClassDescription::NSScriptClassDescription; pub use super::NSScriptCoercionHandler::NSScriptCoercionHandler; - pub use super::NSScriptCommand::NSScriptCommand; + pub use super::NSScriptCommand::{ + NSArgumentEvaluationScriptError, NSArgumentsWrongScriptError, + NSCannotCreateScriptCommandError, NSInternalScriptError, + NSKeySpecifierEvaluationScriptError, NSNoScriptError, + NSOperationNotSupportedForKeyScriptError, NSReceiverEvaluationScriptError, + NSReceiversCantHandleCommandScriptError, NSRequiredArgumentsMissingScriptError, + NSScriptCommand, NSUnknownKeyScriptError, + }; pub use super::NSScriptCommandDescription::NSScriptCommandDescription; pub use super::NSScriptExecutionContext::NSScriptExecutionContext; pub use super::NSScriptObjectSpecifiers::{ - NSIndexSpecifier, NSMiddleSpecifier, NSNameSpecifier, NSPositionalSpecifier, - NSPropertySpecifier, NSRandomSpecifier, NSRangeSpecifier, NSRelativeSpecifier, - NSScriptObjectSpecifier, NSUniqueIDSpecifier, NSWhoseSpecifier, + NSContainerSpecifierError, NSEverySubelement, NSIndexSpecifier, NSIndexSubelement, + NSInsertionPosition, NSInternalSpecifierError, NSInvalidIndexSpecifierError, + NSMiddleSpecifier, NSMiddleSubelement, NSNameSpecifier, NSNoSpecifierError, NSNoSubelement, + NSNoTopLevelContainersSpecifierError, NSOperationNotSupportedForKeySpecifierError, + NSPositionAfter, NSPositionBefore, NSPositionBeginning, NSPositionEnd, NSPositionReplace, + NSPositionalSpecifier, NSPropertySpecifier, NSRandomSpecifier, NSRandomSubelement, + NSRangeSpecifier, NSRelativeAfter, NSRelativeBefore, NSRelativePosition, + NSRelativeSpecifier, NSScriptObjectSpecifier, NSUniqueIDSpecifier, + NSUnknownKeySpecifierError, NSWhoseSpecifier, NSWhoseSubelementIdentifier, }; pub use super::NSScriptStandardSuiteCommands::{ NSCloneCommand, NSCloseCommand, NSCountCommand, NSCreateCommand, NSDeleteCommand, - NSExistsCommand, NSGetCommand, NSMoveCommand, NSQuitCommand, NSSetCommand, + NSExistsCommand, NSGetCommand, NSMoveCommand, NSQuitCommand, NSSaveOptions, + NSSaveOptionsAsk, NSSaveOptionsNo, NSSaveOptionsYes, NSSetCommand, }; pub use super::NSScriptSuiteRegistry::NSScriptSuiteRegistry; - pub use super::NSScriptWhoseTests::{NSLogicalTest, NSScriptWhoseTest, NSSpecifierTest}; + pub use super::NSScriptWhoseTests::{ + NSBeginsWithComparison, NSContainsComparison, NSEndsWithComparison, NSEqualToComparison, + NSGreaterThanComparison, NSGreaterThanOrEqualToComparison, NSLessThanComparison, + NSLessThanOrEqualToComparison, NSLogicalTest, NSScriptWhoseTest, NSSpecifierTest, + NSTestComparisonOperation, + }; pub use super::NSSet::{NSCountedSet, NSMutableSet, NSSet}; pub use super::NSSortDescriptor::NSSortDescriptor; pub use super::NSSpellServer::{NSSpellServer, NSSpellServerDelegate}; pub use super::NSStream::{ - NSInputStream, NSOutputStream, NSStream, NSStreamDelegate, NSStreamNetworkServiceTypeValue, - NSStreamPropertyKey, NSStreamSOCKSProxyConfiguration, NSStreamSOCKSProxyVersion, - NSStreamSocketSecurityLevel, + NSInputStream, NSOutputStream, NSStream, NSStreamDelegate, NSStreamEvent, + NSStreamEventEndEncountered, NSStreamEventErrorOccurred, NSStreamEventHasBytesAvailable, + NSStreamEventHasSpaceAvailable, NSStreamEventNone, NSStreamEventOpenCompleted, + NSStreamNetworkServiceTypeValue, NSStreamPropertyKey, NSStreamSOCKSProxyConfiguration, + NSStreamSOCKSProxyVersion, NSStreamSocketSecurityLevel, NSStreamStatus, + NSStreamStatusAtEnd, NSStreamStatusClosed, NSStreamStatusError, NSStreamStatusNotOpen, + NSStreamStatusOpen, NSStreamStatusOpening, NSStreamStatusReading, NSStreamStatusWriting, }; pub use super::NSString::{ - NSConstantString, NSMutableString, NSSimpleCString, NSString, NSStringEncoding, - NSStringEncodingDetectionOptionsKey, NSStringTransform, + NSASCIIStringEncoding, NSAnchoredSearch, NSBackwardsSearch, NSCaseInsensitiveSearch, + NSConstantString, NSDiacriticInsensitiveSearch, NSForcedOrderingSearch, + NSISO2022JPStringEncoding, NSISOLatin1StringEncoding, NSISOLatin2StringEncoding, + NSJapaneseEUCStringEncoding, NSLiteralSearch, NSMacOSRomanStringEncoding, NSMutableString, + NSNEXTSTEPStringEncoding, NSNonLossyASCIIStringEncoding, NSNumericSearch, + NSProprietaryStringEncoding, NSRegularExpressionSearch, NSShiftJISStringEncoding, + NSSimpleCString, NSString, NSStringCompareOptions, NSStringEncoding, + NSStringEncodingConversionAllowLossy, NSStringEncodingConversionExternalRepresentation, + NSStringEncodingConversionOptions, NSStringEncodingDetectionOptionsKey, + NSStringEnumerationByCaretPositions, NSStringEnumerationByComposedCharacterSequences, + NSStringEnumerationByDeletionClusters, NSStringEnumerationByLines, + NSStringEnumerationByParagraphs, NSStringEnumerationBySentences, + NSStringEnumerationByWords, NSStringEnumerationLocalized, NSStringEnumerationOptions, + NSStringEnumerationReverse, NSStringEnumerationSubstringNotRequired, NSStringTransform, + NSSymbolStringEncoding, NSUTF16BigEndianStringEncoding, NSUTF16LittleEndianStringEncoding, + NSUTF16StringEncoding, NSUTF32BigEndianStringEncoding, NSUTF32LittleEndianStringEncoding, + NSUTF32StringEncoding, NSUTF8StringEncoding, NSUnicodeStringEncoding, + NSWidthInsensitiveSearch, NSWindowsCP1250StringEncoding, NSWindowsCP1251StringEncoding, + NSWindowsCP1252StringEncoding, NSWindowsCP1253StringEncoding, + NSWindowsCP1254StringEncoding, + }; + pub use super::NSTask::{ + NSTask, NSTaskTerminationReason, NSTaskTerminationReasonExit, + NSTaskTerminationReasonUncaughtSignal, }; - pub use super::NSTask::NSTask; pub use super::NSTextCheckingResult::{ - NSTextCheckingKey, NSTextCheckingResult, NSTextCheckingTypes, + NSTextCheckingAllCustomTypes, NSTextCheckingAllSystemTypes, NSTextCheckingAllTypes, + NSTextCheckingKey, NSTextCheckingResult, NSTextCheckingType, NSTextCheckingTypeAddress, + NSTextCheckingTypeCorrection, NSTextCheckingTypeDash, NSTextCheckingTypeDate, + NSTextCheckingTypeGrammar, NSTextCheckingTypeLink, NSTextCheckingTypeOrthography, + NSTextCheckingTypePhoneNumber, NSTextCheckingTypeQuote, + NSTextCheckingTypeRegularExpression, NSTextCheckingTypeReplacement, + NSTextCheckingTypeSpelling, NSTextCheckingTypeTransitInformation, NSTextCheckingTypes, }; pub use super::NSThread::NSThread; - pub use super::NSTimeZone::NSTimeZone; + pub use super::NSTimeZone::{ + NSTimeZone, NSTimeZoneNameStyle, NSTimeZoneNameStyleDaylightSaving, + NSTimeZoneNameStyleGeneric, NSTimeZoneNameStyleShortDaylightSaving, + NSTimeZoneNameStyleShortGeneric, NSTimeZoneNameStyleShortStandard, + NSTimeZoneNameStyleStandard, + }; pub use super::NSTimer::NSTimer; pub use super::NSURLAuthenticationChallenge::{ NSURLAuthenticationChallenge, NSURLAuthenticationChallengeSender, }; - pub use super::NSURLCache::{NSCachedURLResponse, NSURLCache}; + pub use super::NSURLCache::{ + NSCachedURLResponse, NSURLCache, NSURLCacheStorageAllowed, + NSURLCacheStorageAllowedInMemoryOnly, NSURLCacheStorageNotAllowed, NSURLCacheStoragePolicy, + }; pub use super::NSURLConnection::{ NSURLConnection, NSURLConnectionDataDelegate, NSURLConnectionDelegate, NSURLConnectionDownloadDelegate, }; - pub use super::NSURLCredential::NSURLCredential; + pub use super::NSURLCredential::{ + NSURLCredential, NSURLCredentialPersistence, NSURLCredentialPersistenceForSession, + NSURLCredentialPersistenceNone, NSURLCredentialPersistencePermanent, + NSURLCredentialPersistenceSynchronizable, + }; pub use super::NSURLCredentialStorage::NSURLCredentialStorage; pub use super::NSURLDownload::{NSURLDownload, NSURLDownloadDelegate}; - pub use super::NSURLHandle::{NSURLHandle, NSURLHandleClient}; + pub use super::NSURLError::{ + NSURLErrorAppTransportSecurityRequiresSecureConnection, + NSURLErrorBackgroundSessionInUseByAnotherProcess, + NSURLErrorBackgroundSessionRequiresSharedContainer, + NSURLErrorBackgroundSessionWasDisconnected, NSURLErrorBadServerResponse, NSURLErrorBadURL, + NSURLErrorCallIsActive, NSURLErrorCancelled, + NSURLErrorCancelledReasonBackgroundUpdatesDisabled, + NSURLErrorCancelledReasonInsufficientSystemResources, + NSURLErrorCancelledReasonUserForceQuitApplication, NSURLErrorCannotCloseFile, + NSURLErrorCannotConnectToHost, NSURLErrorCannotCreateFile, + NSURLErrorCannotDecodeContentData, NSURLErrorCannotDecodeRawData, NSURLErrorCannotFindHost, + NSURLErrorCannotLoadFromNetwork, NSURLErrorCannotMoveFile, NSURLErrorCannotOpenFile, + NSURLErrorCannotParseResponse, NSURLErrorCannotRemoveFile, NSURLErrorCannotWriteToFile, + NSURLErrorClientCertificateRejected, NSURLErrorClientCertificateRequired, + NSURLErrorDNSLookupFailed, NSURLErrorDataLengthExceedsMaximum, NSURLErrorDataNotAllowed, + NSURLErrorDownloadDecodingFailedMidStream, NSURLErrorDownloadDecodingFailedToComplete, + NSURLErrorFileDoesNotExist, NSURLErrorFileIsDirectory, NSURLErrorFileOutsideSafeArea, + NSURLErrorHTTPTooManyRedirects, NSURLErrorInternationalRoamingOff, + NSURLErrorNetworkConnectionLost, NSURLErrorNetworkUnavailableReason, + NSURLErrorNetworkUnavailableReasonCellular, NSURLErrorNetworkUnavailableReasonConstrained, + NSURLErrorNetworkUnavailableReasonExpensive, NSURLErrorNoPermissionsToReadFile, + NSURLErrorNotConnectedToInternet, NSURLErrorRedirectToNonExistentLocation, + NSURLErrorRequestBodyStreamExhausted, NSURLErrorResourceUnavailable, + NSURLErrorSecureConnectionFailed, NSURLErrorServerCertificateHasBadDate, + NSURLErrorServerCertificateHasUnknownRoot, NSURLErrorServerCertificateNotYetValid, + NSURLErrorServerCertificateUntrusted, NSURLErrorTimedOut, NSURLErrorUnknown, + NSURLErrorUnsupportedURL, NSURLErrorUserAuthenticationRequired, + NSURLErrorUserCancelledAuthentication, NSURLErrorZeroByteResource, + }; + pub use super::NSURLHandle::{ + NSURLHandle, NSURLHandleClient, NSURLHandleLoadFailed, NSURLHandleLoadInProgress, + NSURLHandleLoadSucceeded, NSURLHandleNotLoaded, NSURLHandleStatus, + }; pub use super::NSURLProtectionSpace::NSURLProtectionSpace; pub use super::NSURLProtocol::{NSURLProtocol, NSURLProtocolClient}; - pub use super::NSURLRequest::{NSMutableURLRequest, NSURLRequest}; + pub use super::NSURLRequest::{ + NSMutableURLRequest, NSURLNetworkServiceTypeAVStreaming, NSURLNetworkServiceTypeBackground, + NSURLNetworkServiceTypeCallSignaling, NSURLNetworkServiceTypeDefault, + NSURLNetworkServiceTypeResponsiveAV, NSURLNetworkServiceTypeResponsiveData, + NSURLNetworkServiceTypeVideo, NSURLNetworkServiceTypeVoIP, NSURLNetworkServiceTypeVoice, + NSURLRequest, NSURLRequestAttribution, NSURLRequestAttributionDeveloper, + NSURLRequestAttributionUser, NSURLRequestCachePolicy, NSURLRequestNetworkServiceType, + NSURLRequestReloadIgnoringCacheData, NSURLRequestReloadIgnoringLocalAndRemoteCacheData, + NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestReloadRevalidatingCacheData, + NSURLRequestReturnCacheDataDontLoad, NSURLRequestReturnCacheDataElseLoad, + NSURLRequestUseProtocolCachePolicy, + }; pub use super::NSURLResponse::{NSHTTPURLResponse, NSURLResponse}; pub use super::NSURLSession::{ - NSURLSession, NSURLSessionConfiguration, NSURLSessionDataDelegate, NSURLSessionDataTask, + NSURLSession, NSURLSessionAuthChallengeCancelAuthenticationChallenge, + NSURLSessionAuthChallengeDisposition, NSURLSessionAuthChallengePerformDefaultHandling, + NSURLSessionAuthChallengeRejectProtectionSpace, NSURLSessionAuthChallengeUseCredential, + NSURLSessionConfiguration, NSURLSessionDataDelegate, NSURLSessionDataTask, + NSURLSessionDelayedRequestCancel, NSURLSessionDelayedRequestContinueLoading, + NSURLSessionDelayedRequestDisposition, NSURLSessionDelayedRequestUseNewRequest, NSURLSessionDelegate, NSURLSessionDownloadDelegate, NSURLSessionDownloadTask, - NSURLSessionStreamDelegate, NSURLSessionStreamTask, NSURLSessionTask, - NSURLSessionTaskDelegate, NSURLSessionTaskMetrics, NSURLSessionTaskTransactionMetrics, - NSURLSessionUploadTask, NSURLSessionWebSocketDelegate, NSURLSessionWebSocketMessage, + NSURLSessionMultipathServiceType, NSURLSessionMultipathServiceTypeAggregate, + NSURLSessionMultipathServiceTypeHandover, NSURLSessionMultipathServiceTypeInteractive, + NSURLSessionMultipathServiceTypeNone, NSURLSessionResponseAllow, + NSURLSessionResponseBecomeDownload, NSURLSessionResponseBecomeStream, + NSURLSessionResponseCancel, NSURLSessionResponseDisposition, NSURLSessionStreamDelegate, + NSURLSessionStreamTask, NSURLSessionTask, NSURLSessionTaskDelegate, + NSURLSessionTaskMetrics, NSURLSessionTaskMetricsDomainResolutionProtocol, + NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS, + NSURLSessionTaskMetricsDomainResolutionProtocolTCP, + NSURLSessionTaskMetricsDomainResolutionProtocolTLS, + NSURLSessionTaskMetricsDomainResolutionProtocolUDP, + NSURLSessionTaskMetricsDomainResolutionProtocolUnknown, + NSURLSessionTaskMetricsResourceFetchType, + NSURLSessionTaskMetricsResourceFetchTypeLocalCache, + NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad, + NSURLSessionTaskMetricsResourceFetchTypeServerPush, + NSURLSessionTaskMetricsResourceFetchTypeUnknown, NSURLSessionTaskState, + NSURLSessionTaskStateCanceling, NSURLSessionTaskStateCompleted, + NSURLSessionTaskStateRunning, NSURLSessionTaskStateSuspended, + NSURLSessionTaskTransactionMetrics, NSURLSessionUploadTask, NSURLSessionWebSocketCloseCode, + NSURLSessionWebSocketCloseCodeAbnormalClosure, NSURLSessionWebSocketCloseCodeGoingAway, + NSURLSessionWebSocketCloseCodeInternalServerError, NSURLSessionWebSocketCloseCodeInvalid, + NSURLSessionWebSocketCloseCodeInvalidFramePayloadData, + NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing, + NSURLSessionWebSocketCloseCodeMessageTooBig, + NSURLSessionWebSocketCloseCodeNoStatusReceived, + NSURLSessionWebSocketCloseCodeNormalClosure, NSURLSessionWebSocketCloseCodePolicyViolation, + NSURLSessionWebSocketCloseCodeProtocolError, + NSURLSessionWebSocketCloseCodeTLSHandshakeFailure, + NSURLSessionWebSocketCloseCodeUnsupportedData, NSURLSessionWebSocketDelegate, + NSURLSessionWebSocketMessage, NSURLSessionWebSocketMessageType, + NSURLSessionWebSocketMessageTypeData, NSURLSessionWebSocketMessageTypeString, NSURLSessionWebSocketTask, }; - pub use super::NSUbiquitousKeyValueStore::NSUbiquitousKeyValueStore; + pub use super::NSUbiquitousKeyValueStore::{ + NSUbiquitousKeyValueStore, NSUbiquitousKeyValueStoreAccountChange, + NSUbiquitousKeyValueStoreInitialSyncChange, NSUbiquitousKeyValueStoreQuotaViolationChange, + NSUbiquitousKeyValueStoreServerChange, + }; pub use super::NSUndoManager::NSUndoManager; pub use super::NSUnit::{ NSDimension, NSUnit, NSUnitAcceleration, NSUnitAngle, NSUnitArea, NSUnitConcentrationMass, @@ -379,7 +905,11 @@ mod __exported { }; pub use super::NSUserDefaults::NSUserDefaults; pub use super::NSUserNotification::{ - NSUserNotification, NSUserNotificationAction, NSUserNotificationCenter, + NSUserNotification, NSUserNotificationAction, NSUserNotificationActivationType, + NSUserNotificationActivationTypeActionButtonClicked, + NSUserNotificationActivationTypeAdditionalActionClicked, + NSUserNotificationActivationTypeContentsClicked, NSUserNotificationActivationTypeNone, + NSUserNotificationActivationTypeReplied, NSUserNotificationCenter, NSUserNotificationCenterDelegate, }; pub use super::NSUserScriptTask::{ @@ -389,20 +919,108 @@ mod __exported { pub use super::NSValueTransformer::{ NSSecureUnarchiveFromDataTransformer, NSValueTransformer, NSValueTransformerName, }; - pub use super::NSXMLDTDNode::NSXMLDTDNode; - pub use super::NSXMLDocument::NSXMLDocument; + pub use super::NSXMLDTDNode::{ + NSXMLAttributeCDATAKind, NSXMLAttributeEntitiesKind, NSXMLAttributeEntityKind, + NSXMLAttributeEnumerationKind, NSXMLAttributeIDKind, NSXMLAttributeIDRefKind, + NSXMLAttributeIDRefsKind, NSXMLAttributeNMTokenKind, NSXMLAttributeNMTokensKind, + NSXMLAttributeNotationKind, NSXMLDTDNode, NSXMLDTDNodeKind, NSXMLElementDeclarationAnyKind, + NSXMLElementDeclarationElementKind, NSXMLElementDeclarationEmptyKind, + NSXMLElementDeclarationMixedKind, NSXMLElementDeclarationUndefinedKind, + NSXMLEntityGeneralKind, NSXMLEntityParameterKind, NSXMLEntityParsedKind, + NSXMLEntityPredefined, NSXMLEntityUnparsedKind, + }; + pub use super::NSXMLDocument::{ + NSXMLDocument, NSXMLDocumentContentKind, NSXMLDocumentHTMLKind, NSXMLDocumentTextKind, + NSXMLDocumentXHTMLKind, NSXMLDocumentXMLKind, + }; pub use super::NSXMLElement::NSXMLElement; - pub use super::NSXMLNode::NSXMLNode; - pub use super::NSXMLParser::{NSXMLParser, NSXMLParserDelegate}; + pub use super::NSXMLNode::{ + NSXMLAttributeDeclarationKind, NSXMLAttributeKind, NSXMLCommentKind, NSXMLDTDKind, + NSXMLDocumentKind, NSXMLElementDeclarationKind, NSXMLElementKind, + NSXMLEntityDeclarationKind, NSXMLInvalidKind, NSXMLNamespaceKind, NSXMLNode, NSXMLNodeKind, + NSXMLNotationDeclarationKind, NSXMLProcessingInstructionKind, NSXMLTextKind, + }; + pub use super::NSXMLNodeOptions::{ + NSXMLDocumentIncludeContentTypeDeclaration, NSXMLDocumentTidyHTML, NSXMLDocumentTidyXML, + NSXMLDocumentValidate, NSXMLDocumentXInclude, NSXMLNodeCompactEmptyElement, + NSXMLNodeExpandEmptyElement, NSXMLNodeIsCDATA, NSXMLNodeLoadExternalEntitiesAlways, + NSXMLNodeLoadExternalEntitiesNever, NSXMLNodeLoadExternalEntitiesSameOriginOnly, + NSXMLNodeNeverEscapeContents, NSXMLNodeOptions, NSXMLNodeOptionsNone, NSXMLNodePreserveAll, + NSXMLNodePreserveAttributeOrder, NSXMLNodePreserveCDATA, + NSXMLNodePreserveCharacterReferences, NSXMLNodePreserveDTD, NSXMLNodePreserveEmptyElements, + NSXMLNodePreserveEntities, NSXMLNodePreserveNamespaceOrder, NSXMLNodePreservePrefixes, + NSXMLNodePreserveQuotes, NSXMLNodePreserveWhitespace, NSXMLNodePrettyPrint, + NSXMLNodePromoteSignificantWhitespace, NSXMLNodeUseDoubleQuotes, NSXMLNodeUseSingleQuotes, + }; + pub use super::NSXMLParser::{ + NSXMLParser, NSXMLParserAttributeHasNoValueError, NSXMLParserAttributeListNotFinishedError, + NSXMLParserAttributeListNotStartedError, NSXMLParserAttributeNotFinishedError, + NSXMLParserAttributeNotStartedError, NSXMLParserAttributeRedefinedError, + NSXMLParserCDATANotFinishedError, NSXMLParserCharacterRefAtEOFError, + NSXMLParserCharacterRefInDTDError, NSXMLParserCharacterRefInEpilogError, + NSXMLParserCharacterRefInPrologError, NSXMLParserCommentContainsDoubleHyphenError, + NSXMLParserCommentNotFinishedError, NSXMLParserConditionalSectionNotFinishedError, + NSXMLParserConditionalSectionNotStartedError, NSXMLParserDOCTYPEDeclNotFinishedError, + NSXMLParserDelegate, NSXMLParserDelegateAbortedParseError, NSXMLParserDocumentStartError, + NSXMLParserElementContentDeclNotFinishedError, + NSXMLParserElementContentDeclNotStartedError, NSXMLParserEmptyDocumentError, + NSXMLParserEncodingNotSupportedError, NSXMLParserEntityBoundaryError, + NSXMLParserEntityIsExternalError, NSXMLParserEntityIsParameterError, + NSXMLParserEntityNotFinishedError, NSXMLParserEntityNotStartedError, + NSXMLParserEntityRefAtEOFError, NSXMLParserEntityRefInDTDError, + NSXMLParserEntityRefInEpilogError, NSXMLParserEntityRefInPrologError, + NSXMLParserEntityRefLoopError, NSXMLParserEntityReferenceMissingSemiError, + NSXMLParserEntityReferenceWithoutNameError, NSXMLParserEntityValueRequiredError, + NSXMLParserEqualExpectedError, NSXMLParserError, NSXMLParserExternalEntityResolvingPolicy, + NSXMLParserExternalStandaloneEntityError, NSXMLParserExternalSubsetNotFinishedError, + NSXMLParserExtraContentError, NSXMLParserGTRequiredError, NSXMLParserInternalError, + NSXMLParserInvalidCharacterError, NSXMLParserInvalidCharacterInEntityError, + NSXMLParserInvalidCharacterRefError, NSXMLParserInvalidConditionalSectionError, + NSXMLParserInvalidDecimalCharacterRefError, NSXMLParserInvalidEncodingError, + NSXMLParserInvalidEncodingNameError, NSXMLParserInvalidHexCharacterRefError, + NSXMLParserInvalidURIError, NSXMLParserLTRequiredError, NSXMLParserLTSlashRequiredError, + NSXMLParserLessThanSymbolInAttributeError, NSXMLParserLiteralNotFinishedError, + NSXMLParserLiteralNotStartedError, NSXMLParserMisplacedCDATAEndStringError, + NSXMLParserMisplacedXMLDeclarationError, NSXMLParserMixedContentDeclNotFinishedError, + NSXMLParserMixedContentDeclNotStartedError, NSXMLParserNAMERequiredError, + NSXMLParserNMTOKENRequiredError, NSXMLParserNamespaceDeclarationError, + NSXMLParserNoDTDError, NSXMLParserNotWellBalancedError, + NSXMLParserNotationNotFinishedError, NSXMLParserNotationNotStartedError, + NSXMLParserOutOfMemoryError, NSXMLParserPCDATARequiredError, + NSXMLParserParsedEntityRefAtEOFError, NSXMLParserParsedEntityRefInEpilogError, + NSXMLParserParsedEntityRefInInternalError, NSXMLParserParsedEntityRefInInternalSubsetError, + NSXMLParserParsedEntityRefInPrologError, NSXMLParserParsedEntityRefMissingSemiError, + NSXMLParserParsedEntityRefNoNameError, NSXMLParserPrematureDocumentEndError, + NSXMLParserProcessingInstructionNotFinishedError, + NSXMLParserProcessingInstructionNotStartedError, NSXMLParserPublicIdentifierRequiredError, + NSXMLParserResolveExternalEntitiesAlways, NSXMLParserResolveExternalEntitiesNever, + NSXMLParserResolveExternalEntitiesNoNetwork, + NSXMLParserResolveExternalEntitiesSameOriginOnly, NSXMLParserSeparatorRequiredError, + NSXMLParserSpaceRequiredError, NSXMLParserStandaloneValueError, + NSXMLParserStringNotClosedError, NSXMLParserStringNotStartedError, + NSXMLParserTagNameMismatchError, NSXMLParserURIFragmentError, NSXMLParserURIRequiredError, + NSXMLParserUndeclaredEntityError, NSXMLParserUnfinishedTagError, + NSXMLParserUnknownEncodingError, NSXMLParserUnparsedEntityError, + NSXMLParserXMLDeclNotFinishedError, NSXMLParserXMLDeclNotStartedError, + }; pub use super::NSXPCConnection::{ - NSXPCCoder, NSXPCConnection, NSXPCInterface, NSXPCListener, NSXPCListenerDelegate, - NSXPCListenerEndpoint, NSXPCProxyCreating, + NSXPCCoder, NSXPCConnection, NSXPCConnectionOptions, NSXPCConnectionPrivileged, + NSXPCInterface, NSXPCListener, NSXPCListenerDelegate, NSXPCListenerEndpoint, + NSXPCProxyCreating, }; + pub use super::NSZone::{NSCollectorDisabledOption, NSScannedOption}; pub use super::NSURL::{ - NSFileSecurity, NSURLBookmarkFileCreationOptions, NSURLComponents, NSURLFileProtectionType, - NSURLFileResourceType, NSURLQueryItem, NSURLResourceKey, NSURLThumbnailDictionaryItem, - NSURLUbiquitousItemDownloadingStatus, NSURLUbiquitousSharedItemPermissions, - NSURLUbiquitousSharedItemRole, NSURL, + NSFileSecurity, NSURLBookmarkCreationMinimalBookmark, NSURLBookmarkCreationOptions, + NSURLBookmarkCreationPreferFileIDResolution, + NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess, + NSURLBookmarkCreationSuitableForBookmarkFile, NSURLBookmarkCreationWithSecurityScope, + NSURLBookmarkCreationWithoutImplicitSecurityScope, NSURLBookmarkFileCreationOptions, + NSURLBookmarkResolutionOptions, NSURLBookmarkResolutionWithSecurityScope, + NSURLBookmarkResolutionWithoutImplicitStartAccessing, + NSURLBookmarkResolutionWithoutMounting, NSURLBookmarkResolutionWithoutUI, NSURLComponents, + NSURLFileProtectionType, NSURLFileResourceType, NSURLQueryItem, NSURLResourceKey, + NSURLThumbnailDictionaryItem, NSURLUbiquitousItemDownloadingStatus, + NSURLUbiquitousSharedItemPermissions, NSURLUbiquitousSharedItemRole, NSURL, }; pub use super::NSUUID::NSUUID; pub use super::NSXMLDTD::NSXMLDTD; From 5233fe91aaa0b19940460fd2fb42e983f8c448dd Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Oct 2022 12:58:43 +0100 Subject: [PATCH 082/131] Fix duplicate enum check --- crates/header-translator/src/lib.rs | 10 ---------- crates/header-translator/src/stmt.rs | 6 ++++++ .../src/generated/AppKit/NSFontDescriptor.rs | 14 ++++++++++++++ crates/icrate/src/generated/AppKit/NSFontPanel.rs | 12 ++++++++++++ crates/icrate/src/generated/AppKit/NSPanel.rs | 5 +++++ 5 files changed, 37 insertions(+), 10 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 8afe4ce3a..3034c0427 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -48,16 +48,6 @@ impl RustFile { self.declared_types.insert(name.clone()); } Stmt::EnumDecl { name, variants, .. } => { - // Fix weirdness with enums, they're found twice for some reason - if let Some(Stmt::EnumDecl { - name: last_name, .. - }) = self.stmts.last() - { - if last_name == name { - self.stmts.pop(); - } - } - if let Some(name) = name { self.declared_types.insert(name.clone()); } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 569c7ac05..728943a4c 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -370,6 +370,12 @@ impl Stmt { None } EntityKind::EnumDecl => { + // Enum declarations show up twice for some reason, but + // luckily this flag is set on the least descriptive entity. + if !entity.is_definition() { + return None; + } + let name = entity.get_name(); let ty = RustType::parse_enum(entity.get_enum_underlying_type().expect("enum type")); diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 70f6661f8..e095a2272 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -165,6 +165,20 @@ 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; diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index 1d1032634..a9b321d09 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -75,6 +75,18 @@ 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 NSFPPreviewButton: i32 = 131; pub const NSFPRevertButton: i32 = 130; pub const NSFPSetButton: i32 = 132; diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index 1e4a1512d..28d008dfb 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -36,5 +36,10 @@ extern_methods!( } ); +pub const NSAlertDefaultReturn: i32 = 1; +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; From 44d568bc1464902d9c10ca74dfc2d890ee10e16e Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Oct 2022 14:39:09 +0100 Subject: [PATCH 083/131] Improve enum expr parsing This should make it easier for things to work on 32-bit platforms --- crates/header-translator/Cargo.toml | 1 - crates/header-translator/src/expr.rs | 145 ++++++----- crates/header-translator/src/stmt.rs | 20 +- .../src/generated/AppKit/NSApplication.rs | 44 ++-- .../generated/AppKit/NSAttributedString.rs | 28 +- .../src/generated/AppKit/NSBitmapImageRep.rs | 14 +- crates/icrate/src/generated/AppKit/NSCell.rs | 6 +- .../src/generated/AppKit/NSCollectionView.rs | 23 +- .../NSCollectionViewCompositionalLayout.rs | 13 +- .../src/generated/AppKit/NSColorPanel.rs | 18 +- .../src/generated/AppKit/NSDatePickerCell.rs | 12 +- .../icrate/src/generated/AppKit/NSDragging.rs | 15 +- crates/icrate/src/generated/AppKit/NSEvent.rs | 246 +++++++++--------- crates/icrate/src/generated/AppKit/NSFont.rs | 4 +- .../generated/AppKit/NSFontAssetRequest.rs | 2 +- .../src/generated/AppKit/NSFontCollection.rs | 6 +- .../src/generated/AppKit/NSFontDescriptor.rs | 87 ++++--- .../src/generated/AppKit/NSFontManager.rs | 26 +- .../src/generated/AppKit/NSFontPanel.rs | 44 ++-- .../generated/AppKit/NSGestureRecognizer.rs | 3 +- .../src/generated/AppKit/NSGlyphGenerator.rs | 6 +- .../icrate/src/generated/AppKit/NSGradient.rs | 4 +- .../icrate/src/generated/AppKit/NSGraphics.rs | 6 +- .../icrate/src/generated/AppKit/NSGridView.rs | 4 +- .../generated/AppKit/NSLayoutConstraint.rs | 37 +-- .../src/generated/AppKit/NSLayoutManager.rs | 20 +- .../AppKit/NSMediaLibraryBrowserController.rs | 6 +- crates/icrate/src/generated/AppKit/NSMenu.rs | 12 +- .../icrate/src/generated/AppKit/NSOpenGL.rs | 6 +- .../icrate/src/generated/AppKit/NSPDFPanel.rs | 6 +- crates/icrate/src/generated/AppKit/NSPanel.rs | 4 +- .../src/generated/AppKit/NSParagraphStyle.rs | 6 +- .../src/generated/AppKit/NSPasteboard.rs | 10 +- .../src/generated/AppKit/NSPrintPanel.rs | 16 +- .../generated/AppKit/NSRunningApplication.rs | 4 +- .../src/generated/AppKit/NSSavePanel.rs | 4 +- .../src/generated/AppKit/NSSharingService.rs | 8 +- .../src/generated/AppKit/NSSliderCell.rs | 4 +- .../src/generated/AppKit/NSStatusItem.rs | 4 +- .../src/generated/AppKit/NSStringDrawing.rs | 12 +- .../src/generated/AppKit/NSTableColumn.rs | 4 +- .../src/generated/AppKit/NSTableView.rs | 20 +- crates/icrate/src/generated/AppKit/NSText.rs | 56 ++-- .../src/generated/AppKit/NSTextAttachment.rs | 2 +- .../generated/AppKit/NSTextContentManager.rs | 3 +- .../generated/AppKit/NSTextLayoutFragment.rs | 9 +- .../generated/AppKit/NSTextLayoutManager.rs | 12 +- .../icrate/src/generated/AppKit/NSTextList.rs | 2 +- .../AppKit/NSTextSelectionNavigation.rs | 6 +- .../src/generated/AppKit/NSTextStorage.rs | 4 +- crates/icrate/src/generated/AppKit/NSTouch.rs | 19 +- .../src/generated/AppKit/NSTrackingArea.rs | 20 +- .../src/generated/AppKit/NSTypesetter.rs | 12 +- .../src/generated/AppKit/NSViewController.rs | 19 +- .../icrate/src/generated/AppKit/NSWindow.rs | 54 ++-- .../src/generated/AppKit/NSWorkspace.rs | 28 +- .../Foundation/NSAppleEventDescriptor.rs | 24 +- .../src/generated/Foundation/NSArray.rs | 6 +- .../Foundation/NSAttributedString.rs | 24 +- .../src/generated/Foundation/NSBundle.rs | 10 +- .../Foundation/NSByteCountFormatter.rs | 20 +- .../src/generated/Foundation/NSByteOrder.rs | 6 +- .../src/generated/Foundation/NSCalendar.rs | 84 +++--- .../generated/Foundation/NSCharacterSet.rs | 2 +- .../Foundation/NSComparisonPredicate.rs | 6 +- .../icrate/src/generated/Foundation/NSData.rs | 42 +-- .../Foundation/NSDateComponentsFormatter.rs | 17 +- .../generated/Foundation/NSDateFormatter.rs | 10 +- .../NSDistributedNotificationCenter.rs | 4 +- .../generated/Foundation/NSEnergyFormatter.rs | 4 +- .../generated/Foundation/NSFileCoordinator.rs | 18 +- .../src/generated/Foundation/NSFileManager.rs | 25 +- .../src/generated/Foundation/NSFileVersion.rs | 4 +- .../src/generated/Foundation/NSFileWrapper.rs | 8 +- .../src/generated/Foundation/NSGeometry.rs | 63 ++--- .../Foundation/NSISO8601DateFormatter.rs | 38 ++- .../Foundation/NSJSONSerialization.rs | 20 +- .../Foundation/NSKeyValueObserving.rs | 8 +- .../generated/Foundation/NSLengthFormatter.rs | 8 +- .../Foundation/NSLinguisticTagger.rs | 10 +- .../src/generated/Foundation/NSLocale.rs | 15 +- .../generated/Foundation/NSMassFormatter.rs | 6 +- .../Foundation/NSMeasurementFormatter.rs | 8 +- .../src/generated/Foundation/NSNetServices.rs | 4 +- .../generated/Foundation/NSNumberFormatter.rs | 54 ++-- .../src/generated/Foundation/NSObjCRuntime.rs | 16 +- .../NSOrderedCollectionDifference.rs | 6 +- .../generated/Foundation/NSPathUtilities.rs | 2 +- .../NSPersonNameComponentsFormatter.rs | 3 +- .../Foundation/NSPointerFunctions.rs | 26 +- .../icrate/src/generated/Foundation/NSPort.rs | 4 +- .../src/generated/Foundation/NSProcessInfo.rs | 18 +- .../generated/Foundation/NSPropertyList.rs | 14 +- .../Foundation/NSRegularExpression.rs | 34 +-- .../src/generated/Foundation/NSStream.rs | 10 +- .../src/generated/Foundation/NSString.rs | 18 +- .../Foundation/NSTextCheckingResult.rs | 33 +-- .../icrate/src/generated/Foundation/NSURL.rs | 20 +- .../src/generated/Foundation/NSURLRequest.rs | 3 +- .../generated/Foundation/NSXMLNodeOptions.rs | 66 +++-- .../generated/Foundation/NSXPCConnection.rs | 2 +- .../icrate/src/generated/Foundation/NSZone.rs | 4 +- 102 files changed, 1059 insertions(+), 974 deletions(-) diff --git a/crates/header-translator/Cargo.toml b/crates/header-translator/Cargo.toml index f8fcdd9fd..c34771e4c 100644 --- a/crates/header-translator/Cargo.toml +++ b/crates/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/crates/header-translator/src/expr.rs b/crates/header-translator/src/expr.rs index 9f4ed4497..c254cb526 100644 --- a/crates/header-translator/src/expr.rs +++ b/crates/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/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 728943a4c..16fe8f879 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/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/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 61587f528..2d8e55629 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index d1fe669e8..e907117f5 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index 82546b659..2b764101a 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index 5db28f75e..3176c2d28 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs index c34c57954..461cd945b 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionView.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 255dcba34..cb1ba4133 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index 57710de2e..a16873b76 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index 942309986..2519ce3e6 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs index 0355a29c7..536863885 100644 --- a/crates/icrate/src/generated/AppKit/NSDragging.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 940146ceb..03486a2e0 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 1aa65ab68..6cbca8306 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs index e426bc6b2..2c5800d39 100644 --- a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index 4ce306005..acedd0826 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index e095a2272..8c63ce0de 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSFontManager.rs b/crates/icrate/src/generated/AppKit/NSFontManager.rs index eb0440547..1627e6538 100644 --- a/crates/icrate/src/generated/AppKit/NSFontManager.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index a9b321d09..2c3636cfa 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index f911e6713..b15feafd6 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index 8fc07e065..9482e9695 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index 3814a7582..c439bd563 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs index ee5b56e65..0da298619 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphics.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index 76e8a14c6..75d8a6dd3 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index 7dbfef008..69f5706c9 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index 4358c3fe5..d39ea0113 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs index 908ddce8c..db7ff5af6 100644 --- a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 2c16b0ca5..1db1c3719 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index d0a5f93a1..5865f8900 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSPDFPanel.rs b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs index 2969675af..87a998c51 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index 28d008dfb..89e9a26d8 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index 95081220d..7ef516845 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index 3487f566c..72e31ea0f 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index 16b446cdc..17499ef2d 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSRunningApplication.rs b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs index db1c35972..5a751043f 100644 --- a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index cdcbf817f..678a85730 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index 9f52cf230..183d94eed 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index 0204440b1..66a9bec81 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs index 468a07859..a9322e544 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusItem.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSStringDrawing.rs b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs index 39a514d11..c0c59c902 100644 --- a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs index 2bb37791f..155d9d85b 100644 --- a/crates/icrate/src/generated/AppKit/NSTableColumn.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index 3ebb6aa98..5013502e0 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index 74b80e047..3ca2cad17 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index 3ed3d6dde..154016b2d 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index f6ca14643..074f84582 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index c7c8f0b3b..8cf2706cc 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index 16c513a5f..cad2da8fd 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index 1bf3ebe9b..4184d1427 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index f85cae0f3..a80b9e214 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index fb1935400..f31dc7436 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs index 7b548b17c..b08fe992b 100644 --- a/crates/icrate/src/generated/AppKit/NSTouch.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTrackingArea.rs b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs index e6d6791f5..d636a7223 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs index 06cd918ff..6d2616f51 100644 --- a/crates/icrate/src/generated/AppKit/NSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index d1358284b..4fceb42f5 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 87ef8cb42..8fd8b459b 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index db9f7a920..257ea4592 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/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/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index b13576d4e..f83f70d72 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index b20fd1765..d0450e2ec 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index ab95da0e3..a2a916c83 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 5d663d286..9c6643387 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 5fa652e45..3b49639c8 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index 01f0f4bb4..8d55ca424 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index eef303031..de0e90637 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 0ddf323ca..69a29ae9b 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index 38b1c0fe5..9fa1069f6 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 686971af9..d99c4808a 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index bfdec9fe9..23fd4c03e 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 29f275a26..d9ae8b693 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 00bf86b0e..fecf920c0 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index b4cda6e50..b4f5887f9 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 7c1f30c8b..3da86c699 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index d749e16be..75e01525c 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index ce9d1c065..d2f34a879 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 529d2276c..e656575ad 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 19c575b7a..664f471e7 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index eb9cc506c..f63a9e0df 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index da6419f22..0db3c7ab6 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index ef1d0740b..653017c30 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index fe6bcca8a..afa99901c 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 244c7bad5..a9caea7cb 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index f7f1ba478..da3a75793 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 57863cd5b..e5aff98cf 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 634e11bfe..661106ba4 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 66b772714..d899d55ac 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 762c04e19..088aa02b6 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index ecfc6856b..6c7f67725 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index c4f341e55..bd98935bd 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index f15938914..48406476f 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index a49bc481e..52d75bd48 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 2a4fdcb97..0214711c1 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 5a2c1c93b..641979936 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 173c1c058..8658ad868 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index ac4afe68d..f59278e78 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 58f4a62dd..9e30cc192 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index fae9319e7..05c2ae080 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index d8b9ee7fd..e6f07454b 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 11bbdde83..5ff7fda1e 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index d081812d9..cc4649c80 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 418f26502..59a3ed356 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs index e816324c9..d27e91bdf 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index dac15bc87..8abc51ae4 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/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/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index 4ef5d73fc..1945db01b 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/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); From 605a57ee926f4a3034f59362230ea32330b898c9 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Oct 2022 16:51:39 +0100 Subject: [PATCH 084/131] Add static variable parsing --- crates/header-translator/src/expr.rs | 13 +- crates/header-translator/src/lib.rs | 3 + crates/header-translator/src/rust_type.rs | 40 + crates/header-translator/src/stmt.rs | 71 +- .../src/generated/AppKit/NSAccessibility.rs | 4 + .../AppKit/NSAccessibilityConstants.rs | 1304 ++++++++++++++++ crates/icrate/src/generated/AppKit/NSAlert.rs | 12 + .../src/generated/AppKit/NSAnimation.rs | 40 + .../src/generated/AppKit/NSAppearance.rs | 36 + .../src/generated/AppKit/NSApplication.rs | 242 +++ .../generated/AppKit/NSAttributedString.rs | 393 +++++ .../src/generated/AppKit/NSBezierPath.rs | 24 + .../src/generated/AppKit/NSBitmapImageRep.rs | 86 ++ crates/icrate/src/generated/AppKit/NSBox.rs | 4 + .../icrate/src/generated/AppKit/NSBrowser.rs | 8 + .../src/generated/AppKit/NSButtonCell.rs | 56 + .../AppKit/NSCandidateListTouchBarItem.rs | 4 + crates/icrate/src/generated/AppKit/NSCell.rs | 26 + .../NSCollectionViewCompositionalLayout.rs | 4 + .../AppKit/NSCollectionViewFlowLayout.rs | 8 + .../AppKit/NSCollectionViewLayout.rs | 5 + crates/icrate/src/generated/AppKit/NSColor.rs | 6 + .../src/generated/AppKit/NSColorList.rs | 4 + .../src/generated/AppKit/NSColorPanel.rs | 22 + .../src/generated/AppKit/NSColorSpace.rs | 16 + .../icrate/src/generated/AppKit/NSComboBox.rs | 16 + .../icrate/src/generated/AppKit/NSControl.rs | 12 + .../icrate/src/generated/AppKit/NSCursor.rs | 2 + .../src/generated/AppKit/NSDatePickerCell.rs | 27 + .../icrate/src/generated/AppKit/NSDockTile.rs | 2 + .../src/generated/AppKit/NSDraggingItem.rs | 8 + .../icrate/src/generated/AppKit/NSDrawer.rs | 16 + .../icrate/src/generated/AppKit/NSErrors.rs | 144 ++ crates/icrate/src/generated/AppKit/NSEvent.rs | 149 ++ crates/icrate/src/generated/AppKit/NSFont.rs | 12 + .../src/generated/AppKit/NSFontCollection.rs | 60 + .../src/generated/AppKit/NSFontDescriptor.rs | 192 +++ .../icrate/src/generated/AppKit/NSGraphics.rs | 138 ++ .../src/generated/AppKit/NSGraphicsContext.rs | 17 + .../icrate/src/generated/AppKit/NSGridView.rs | 4 + .../src/generated/AppKit/NSHelpManager.rs | 8 + crates/icrate/src/generated/AppKit/NSImage.rs | 568 +++++++ .../icrate/src/generated/AppKit/NSImageRep.rs | 4 + .../src/generated/AppKit/NSInterfaceStyle.rs | 4 + .../src/generated/AppKit/NSItemProvider.rs | 16 + .../src/generated/AppKit/NSKeyValueBinding.rs | 444 ++++++ .../generated/AppKit/NSLayoutConstraint.rs | 22 + .../generated/AppKit/NSLevelIndicatorCell.rs | 10 + crates/icrate/src/generated/AppKit/NSMenu.rs | 28 + .../icrate/src/generated/AppKit/NSMenuItem.rs | 4 + crates/icrate/src/generated/AppKit/NSNib.rs | 8 + .../icrate/src/generated/AppKit/NSOpenGL.rs | 40 + .../src/generated/AppKit/NSOutlineView.rs | 40 + .../src/generated/AppKit/NSParagraphStyle.rs | 4 + .../src/generated/AppKit/NSPasteboard.rs | 192 +++ .../src/generated/AppKit/NSPopUpButton.rs | 4 + .../src/generated/AppKit/NSPopUpButtonCell.rs | 4 + .../icrate/src/generated/AppKit/NSPopover.rs | 28 + .../src/generated/AppKit/NSPrintInfo.rs | 166 ++ .../src/generated/AppKit/NSPrintOperation.rs | 4 + .../src/generated/AppKit/NSPrintPanel.rs | 20 + .../generated/AppKit/NSProgressIndicator.rs | 5 + .../src/generated/AppKit/NSRuleEditor.rs | 32 + .../src/generated/AppKit/NSRulerView.rs | 16 + .../icrate/src/generated/AppKit/NSScreen.rs | 4 + .../src/generated/AppKit/NSScrollView.rs | 20 + .../icrate/src/generated/AppKit/NSScroller.rs | 4 + .../src/generated/AppKit/NSSearchFieldCell.rs | 8 + .../src/generated/AppKit/NSSharingService.rs | 80 + .../src/generated/AppKit/NSSliderCell.rs | 12 + .../generated/AppKit/NSSliderTouchBarItem.rs | 8 + crates/icrate/src/generated/AppKit/NSSound.rs | 4 + .../generated/AppKit/NSSpeechSynthesizer.rs | 228 +++ .../src/generated/AppKit/NSSpellChecker.rs | 72 + .../src/generated/AppKit/NSSplitView.rs | 8 + .../generated/AppKit/NSSplitViewController.rs | 4 + .../src/generated/AppKit/NSSplitViewItem.rs | 4 + .../src/generated/AppKit/NSStackView.rs | 8 + .../src/generated/AppKit/NSStatusBar.rs | 4 + .../icrate/src/generated/AppKit/NSTabView.rs | 2 + .../src/generated/AppKit/NSTableView.rs | 20 + crates/icrate/src/generated/AppKit/NSText.rs | 26 + .../generated/AppKit/NSTextAlternatives.rs | 4 + .../src/generated/AppKit/NSTextContent.rs | 12 + .../generated/AppKit/NSTextContentManager.rs | 4 + .../src/generated/AppKit/NSTextFinder.rs | 8 + .../generated/AppKit/NSTextInputContext.rs | 4 + .../icrate/src/generated/AppKit/NSTextList.rs | 68 + .../src/generated/AppKit/NSTextStorage.rs | 8 + .../icrate/src/generated/AppKit/NSTextView.rs | 60 + .../src/generated/AppKit/NSTokenFieldCell.rs | 6 + .../icrate/src/generated/AppKit/NSToolbar.rs | 8 + .../src/generated/AppKit/NSToolbarItem.rs | 48 + .../src/generated/AppKit/NSTouchBarItem.rs | 22 + .../src/generated/AppKit/NSUserActivity.rs | 4 + crates/icrate/src/generated/AppKit/NSView.rs | 48 + .../icrate/src/generated/AppKit/NSWindow.rs | 185 +++ .../generated/AppKit/NSWindowRestoration.rs | 4 + .../src/generated/AppKit/NSWorkspace.rs | 192 +++ crates/icrate/src/generated/AppKit/mod.rs | 1341 +++++++++++++---- .../Foundation/NSAppleEventManager.rs | 12 + .../src/generated/Foundation/NSAppleScript.rs | 20 + .../Foundation/NSAttributedString.rs | 36 + .../src/generated/Foundation/NSBundle.rs | 16 + .../src/generated/Foundation/NSCalendar.rs | 68 + .../Foundation/NSClassDescription.rs | 4 + .../src/generated/Foundation/NSConnection.rs | 16 + .../icrate/src/generated/Foundation/NSDate.rs | 4 + .../generated/Foundation/NSDecimalNumber.rs | 16 + .../NSDistributedNotificationCenter.rs | 10 + .../src/generated/Foundation/NSError.rs | 68 + .../src/generated/Foundation/NSException.rs | 64 + .../Foundation/NSExtensionContext.rs | 20 + .../generated/Foundation/NSExtensionItem.rs | 12 + .../src/generated/Foundation/NSFileHandle.rs | 32 + .../src/generated/Foundation/NSFileManager.rs | 148 ++ .../src/generated/Foundation/NSGeometry.rs | 16 + .../src/generated/Foundation/NSHTTPCookie.rs | 64 + .../Foundation/NSHTTPCookieStorage.rs | 8 + .../src/generated/Foundation/NSHashTable.rs | 44 + .../generated/Foundation/NSItemProvider.rs | 16 + .../generated/Foundation/NSKeyValueCoding.rs | 48 + .../Foundation/NSKeyValueObserving.rs | 20 + .../generated/Foundation/NSKeyedArchiver.rs | 12 + .../Foundation/NSLinguisticTagger.rs | 152 ++ .../src/generated/Foundation/NSLocale.rs | 124 ++ .../src/generated/Foundation/NSMapTable.rs | 63 + .../src/generated/Foundation/NSMetadata.rs | 64 + .../Foundation/NSMetadataAttributes.rs | 724 +++++++++ .../src/generated/Foundation/NSNetServices.rs | 8 + .../src/generated/Foundation/NSObjCRuntime.rs | 6 + .../src/generated/Foundation/NSOperation.rs | 10 + .../NSPersonNameComponentsFormatter.rs | 32 + .../icrate/src/generated/Foundation/NSPort.rs | 4 + .../src/generated/Foundation/NSProcessInfo.rs | 8 + .../src/generated/Foundation/NSProgress.rs | 65 + .../src/generated/Foundation/NSRunLoop.rs | 8 + .../Foundation/NSScriptKeyValueCoding.rs | 4 + .../src/generated/Foundation/NSSpellServer.rs | 12 + .../src/generated/Foundation/NSStream.rs | 96 ++ .../src/generated/Foundation/NSString.rs | 104 ++ .../icrate/src/generated/Foundation/NSTask.rs | 4 + .../Foundation/NSTextCheckingResult.rs | 44 + .../src/generated/Foundation/NSThread.rs | 12 + .../src/generated/Foundation/NSTimeZone.rs | 4 + .../icrate/src/generated/Foundation/NSURL.rs | 570 +++++++ .../Foundation/NSURLCredentialStorage.rs | 8 + .../src/generated/Foundation/NSURLError.rs | 28 + .../src/generated/Foundation/NSURLHandle.rs | 44 + .../Foundation/NSURLProtectionSpace.rs | 60 + .../src/generated/Foundation/NSURLSession.rs | 20 + .../Foundation/NSUbiquitousKeyValueStore.rs | 12 + .../src/generated/Foundation/NSUndoManager.rs | 38 + .../generated/Foundation/NSUserActivity.rs | 4 + .../generated/Foundation/NSUserDefaults.rs | 136 ++ .../Foundation/NSUserNotification.rs | 4 + .../Foundation/NSValueTransformer.rs | 24 + .../src/generated/Foundation/NSXMLParser.rs | 4 + crates/icrate/src/generated/Foundation/mod.rs | 662 ++++++-- 159 files changed, 10908 insertions(+), 471 deletions(-) diff --git a/crates/header-translator/src/expr.rs b/crates/header-translator/src/expr.rs index c254cb526..d63fdb687 100644 --- a/crates/header-translator/src/expr.rs +++ b/crates/header-translator/src/expr.rs @@ -55,7 +55,11 @@ impl Expr { res } - pub fn parse(entity: &Entity<'_>, declaration_references: &[String]) -> Option { + pub fn parse_var(entity: &Entity<'_>) -> Option { + Self::parse(entity, &[]) + } + + fn parse(entity: &Entity<'_>, declaration_references: &[String]) -> Option { let range = entity.get_range().expect("expr range"); let tokens = range.tokenize(); @@ -98,6 +102,13 @@ impl Expr { } } + s = s + .trim_start_matches("(NSBoxType)") + .trim_start_matches("(NSBezelStyle)") + .trim_start_matches("(NSEventSubtype)") + .trim_start_matches("(NSWindowButton)") + .to_string(); + Some(Self { s }) } } diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 3034c0427..f7398e4cd 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -55,6 +55,9 @@ impl RustFile { self.declared_types.insert(name.clone()); } } + Stmt::VarDecl { name, .. } => { + self.declared_types.insert(name.clone()); + } Stmt::AliasDecl { name, .. } => { self.declared_types.insert(name.clone()); } diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index b8c9bfba9..298abcec8 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -751,3 +751,43 @@ impl fmt::Display for RustTypeReturn { } } } + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct RustTypeStatic { + inner: RustType, +} + +impl RustTypeStatic { + pub fn parse(ty: Type<'_>) -> Self { + let inner = RustType::parse(ty, false, Nullability::Unspecified); + + inner.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Strong && lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in var {inner:?}"); + } + }); + + Self { inner } + } +} + +impl fmt::Display for RustTypeStatic { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match &self.inner { + RustType::Id { + type_, + is_const: false, + lifetime: Lifetime::Strong | Lifetime::Unspecified, + nullability, + } => { + if *nullability == Nullability::NonNull { + write!(f, "&'static {type_}") + } else { + write!(f, "Option<&'static {type_}>") + } + } + ty @ RustType::Id { .. } => panic!("invalid static {ty:?}"), + ty => write!(f, "{ty}"), + } + } +} diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 16fe8f879..c43cd5d0b 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -8,7 +8,7 @@ use crate::config::{ClassData, Config}; use crate::expr::Expr; use crate::method::Method; use crate::property::Property; -use crate::rust_type::{GenericType, RustType}; +use crate::rust_type::{GenericType, RustType, RustTypeStatic}; use crate::unexposed_macro::UnexposedMacro; #[derive(Debug, Clone)] @@ -208,6 +208,13 @@ pub enum Stmt { kind: Option, variants: Vec<(String, Expr)>, }, + /// static const ty name = expr; + /// extern const ty name; + VarDecl { + name: String, + ty: RustTypeStatic, + value: Option>, + }, /// typedef Type TypedefName; AliasDecl { name: String, type_: RustType }, // /// typedef struct Name { fields } TypedefName; @@ -429,20 +436,41 @@ impl Stmt { }) } EntityKind::VarDecl => { - // println!( - // "var: {:?}, {:?}, {:#?}, {:#?}", - // entity.get_display_name(), - // entity.get_name(), - // entity.has_attributes(), - // entity.get_children(), - // ); - None + let name = entity.get_name().expect("var decl name"); + let ty = entity.get_type().expect("var type"); + let ty = RustTypeStatic::parse(ty); + let mut value = None; + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::UnexposedAttr => { + if let Some(macro_) = UnexposedMacro::parse(&entity) { + panic!("unexpected attribute: {macro_:?}"); + } + } + EntityKind::ObjCClassRef => {} + EntityKind::TypeRef => {} + _ if entity.is_expression() => { + if value.is_none() { + value = Some(Expr::parse_var(&entity)); + } else { + panic!("got variable value twice") + } + } + _ => panic!("unknown typedef child in {name}: {entity:?}"), + }; + EntityVisitResult::Continue + }); + + Some(Self::VarDecl { name, ty, value }) } EntityKind::FunctionDecl => { // println!( - // "function: {:?}, {:?}, {:#?}, {:#?}", + // "function: {:?}, {:?}, {:?}, {:?}, {:#?}, {:#?}", // entity.get_display_name(), // entity.get_name(), + // entity.is_static_method(), + // entity.is_inline_function(), // entity.has_attributes(), // entity.get_children(), // ); @@ -591,6 +619,29 @@ impl fmt::Display for Stmt { } } } + Self::VarDecl { + name, + ty, + value: None, + } => { + writeln!(f, r#"extern "C" {{"#)?; + writeln!(f, " static {name}: {ty};")?; + writeln!(f, "}}")?; + } + Self::VarDecl { + name, + ty, + value: Some(None), + } => { + writeln!(f, "static {name}: {ty} = todo;")?; + } + Self::VarDecl { + name, + ty, + value: Some(Some(expr)), + } => { + writeln!(f, "static {name}: {ty} = {expr};")?; + } Self::AliasDecl { name, type_ } => { writeln!(f, "pub type {name} = {type_};")?; } diff --git a/crates/icrate/src/generated/AppKit/NSAccessibility.rs b/crates/icrate/src/generated/AppKit/NSAccessibility.rs index fec43d310..2105d001b 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibility.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibility.rs @@ -120,6 +120,10 @@ extern_methods!( } ); +extern "C" { + static NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification: &'static NSNotificationName; +} + extern_methods!( /// NSAccessibilityAdditions unsafe impl NSObject { diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs index 1bd685326..8c3471a67 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs @@ -5,12 +5,402 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSAccessibilityErrorCodeExceptionInfo: &'static NSString; +} + pub type NSAccessibilityAttributeName = NSString; +extern "C" { + static NSAccessibilityRoleAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityRoleDescriptionAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySubroleAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityHelpAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityValueAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMinValueAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMaxValueAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityEnabledAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityFocusedAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityParentAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityChildrenAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityWindowAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityTopLevelUIElementAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySelectedChildrenAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityVisibleChildrenAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityPositionAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySizeAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityContentsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityTitleAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityDescriptionAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityShownMenuAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityValueDescriptionAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySharedFocusElementsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityPreviousContentsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityNextContentsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityHeaderAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityEditedAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityTabsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityHorizontalScrollBarAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityVerticalScrollBarAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityOverflowButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityIncrementButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityDecrementButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityFilenameAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityExpandedAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySelectedAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySplittersAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityDocumentAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityActivationPointAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityURLAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityIndexAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityRowCountAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityColumnCountAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityOrderedByRowAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityWarningValueAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityCriticalValueAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityPlaceholderValueAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityContainsProtectedContentAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityAlternateUIVisibleAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityRequiredAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityTitleUIElementAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityServesAsTitleForUIElementsAttribute: + &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityLinkedUIElementsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySelectedTextAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySelectedTextRangeAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityNumberOfCharactersAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityVisibleCharacterRangeAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySharedTextUIElementsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySharedCharacterRangeAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityInsertionPointLineNumberAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySelectedTextRangesAttribute: &'static NSAccessibilityAttributeName; +} + pub type NSAccessibilityParameterizedAttributeName = NSString; +extern "C" { + static NSAccessibilityLineForIndexParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityRangeForLineParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityStringForRangeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityRangeForPositionParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityRangeForIndexParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityBoundsForRangeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityRTFForRangeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityStyleRangeForIndexParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityAttributedStringForRangeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityFontTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityForegroundColorTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityBackgroundColorTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityUnderlineColorTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityStrikethroughColorTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityUnderlineTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilitySuperscriptTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityStrikethroughTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityShadowTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityAttachmentTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityLinkTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityAutocorrectedTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityTextAlignmentAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityListItemPrefixTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityListItemIndexTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityListItemLevelTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityMisspelledTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityMarkedMisspelledTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityLanguageTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityCustomTextAttribute: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAccessibilityAnnotationTextAttribute: &'static NSAttributedStringKey; +} + pub type NSAccessibilityAnnotationAttributeKey = NSString; +extern "C" { + static NSAccessibilityAnnotationLabel: &'static NSAccessibilityAnnotationAttributeKey; +} + +extern "C" { + static NSAccessibilityAnnotationElement: &'static NSAccessibilityAnnotationAttributeKey; +} + +extern "C" { + static NSAccessibilityAnnotationLocation: &'static NSAccessibilityAnnotationAttributeKey; +} + pub type NSAccessibilityAnnotationPosition = NSInteger; pub const NSAccessibilityAnnotationPositionFullRange: NSAccessibilityAnnotationPosition = 0; pub const NSAccessibilityAnnotationPositionStart: NSAccessibilityAnnotationPosition = 1; @@ -18,22 +408,362 @@ pub const NSAccessibilityAnnotationPositionEnd: NSAccessibilityAnnotationPositio pub type NSAccessibilityFontAttributeKey = NSString; +extern "C" { + static NSAccessibilityFontNameKey: &'static NSAccessibilityFontAttributeKey; +} + +extern "C" { + static NSAccessibilityFontFamilyKey: &'static NSAccessibilityFontAttributeKey; +} + +extern "C" { + static NSAccessibilityVisibleNameKey: &'static NSAccessibilityFontAttributeKey; +} + +extern "C" { + static NSAccessibilityFontSizeKey: &'static NSAccessibilityFontAttributeKey; +} + +extern "C" { + static NSAccessibilityMainAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMinimizedAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityCloseButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityZoomButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMinimizeButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityToolbarButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityProxyAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityGrowAreaAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityModalAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityDefaultButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityCancelButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityFullScreenButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMenuBarAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityWindowsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityFrontmostAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityHiddenAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMainWindowAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityFocusedWindowAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityFocusedUIElementAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityExtrasMenuBarAttribute: &'static NSAccessibilityAttributeName; +} + pub type NSAccessibilityOrientation = NSInteger; pub const NSAccessibilityOrientationUnknown: NSAccessibilityOrientation = 0; pub const NSAccessibilityOrientationVertical: NSAccessibilityOrientation = 1; pub const NSAccessibilityOrientationHorizontal: NSAccessibilityOrientation = 2; +extern "C" { + static NSAccessibilityOrientationAttribute: &'static NSAccessibilityAttributeName; +} + pub type NSAccessibilityOrientationValue = NSString; +extern "C" { + static NSAccessibilityVerticalOrientationValue: &'static NSAccessibilityOrientationValue; +} + +extern "C" { + static NSAccessibilityHorizontalOrientationValue: &'static NSAccessibilityOrientationValue; +} + +extern "C" { + static NSAccessibilityUnknownOrientationValue: &'static NSAccessibilityOrientationValue; +} + +extern "C" { + static NSAccessibilityColumnTitlesAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySearchButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySearchMenuAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityClearButtonAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityRowsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityVisibleRowsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySelectedRowsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityColumnsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityVisibleColumnsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySelectedColumnsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySortDirectionAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilitySelectedCellsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityVisibleCellsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityRowHeaderUIElementsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityColumnHeaderUIElementsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityCellForColumnAndRowParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityRowIndexRangeAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityColumnIndexRangeAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityHorizontalUnitsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityVerticalUnitsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityHorizontalUnitDescriptionAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityVerticalUnitDescriptionAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityLayoutPointForScreenPointParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityLayoutSizeForScreenSizeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityScreenPointForLayoutPointParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityScreenSizeForLayoutSizeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName; +} + +extern "C" { + static NSAccessibilityHandlesAttribute: &'static NSAccessibilityAttributeName; +} + pub type NSAccessibilitySortDirectionValue = NSString; +extern "C" { + static NSAccessibilityAscendingSortDirectionValue: &'static NSAccessibilitySortDirectionValue; +} + +extern "C" { + static NSAccessibilityDescendingSortDirectionValue: &'static NSAccessibilitySortDirectionValue; +} + +extern "C" { + static NSAccessibilityUnknownSortDirectionValue: &'static NSAccessibilitySortDirectionValue; +} + pub type NSAccessibilitySortDirection = NSInteger; pub const NSAccessibilitySortDirectionUnknown: NSAccessibilitySortDirection = 0; pub const NSAccessibilitySortDirectionAscending: NSAccessibilitySortDirection = 1; pub const NSAccessibilitySortDirectionDescending: NSAccessibilitySortDirection = 2; +extern "C" { + static NSAccessibilityDisclosingAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityDisclosedRowsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityDisclosedByRowAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityDisclosureLevelAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityAllowedValuesAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityLabelUIElementsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityLabelValueAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMatteHoleAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMatteContentUIElementAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMarkerUIElementsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMarkerValuesAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMarkerGroupUIElementAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityUnitsAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityUnitDescriptionAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMarkerTypeAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityMarkerTypeDescriptionAttribute: &'static NSAccessibilityAttributeName; +} + +extern "C" { + static NSAccessibilityIdentifierAttribute: &'static NSAccessibilityAttributeName; +} + pub type NSAccessibilityRulerMarkerTypeValue = NSString; +extern "C" { + static NSAccessibilityLeftTabStopMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; +} + +extern "C" { + static NSAccessibilityRightTabStopMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; +} + +extern "C" { + static NSAccessibilityCenterTabStopMarkerTypeValue: + &'static NSAccessibilityRulerMarkerTypeValue; +} + +extern "C" { + static NSAccessibilityDecimalTabStopMarkerTypeValue: + &'static NSAccessibilityRulerMarkerTypeValue; +} + +extern "C" { + static NSAccessibilityHeadIndentMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; +} + +extern "C" { + static NSAccessibilityTailIndentMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; +} + +extern "C" { + static NSAccessibilityFirstLineIndentMarkerTypeValue: + &'static NSAccessibilityRulerMarkerTypeValue; +} + +extern "C" { + static NSAccessibilityUnknownMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; +} + pub type NSAccessibilityRulerMarkerType = NSInteger; pub const NSAccessibilityRulerMarkerTypeUnknown: NSAccessibilityRulerMarkerType = 0; pub const NSAccessibilityRulerMarkerTypeTabStopLeft: NSAccessibilityRulerMarkerType = 1; @@ -46,6 +776,26 @@ pub const NSAccessibilityRulerMarkerTypeIndentFirstLine: NSAccessibilityRulerMar pub type NSAccessibilityRulerUnitValue = NSString; +extern "C" { + static NSAccessibilityInchesUnitValue: &'static NSAccessibilityRulerUnitValue; +} + +extern "C" { + static NSAccessibilityCentimetersUnitValue: &'static NSAccessibilityRulerUnitValue; +} + +extern "C" { + static NSAccessibilityPointsUnitValue: &'static NSAccessibilityRulerUnitValue; +} + +extern "C" { + static NSAccessibilityPicasUnitValue: &'static NSAccessibilityRulerUnitValue; +} + +extern "C" { + static NSAccessibilityUnknownUnitValue: &'static NSAccessibilityRulerUnitValue; +} + pub type NSAccessibilityUnits = NSInteger; pub const NSAccessibilityUnitsUnknown: NSAccessibilityUnits = 0; pub const NSAccessibilityUnitsInches: NSAccessibilityUnits = 1; @@ -55,17 +805,571 @@ pub const NSAccessibilityUnitsPicas: NSAccessibilityUnits = 4; pub type NSAccessibilityActionName = NSString; +extern "C" { + static NSAccessibilityPressAction: &'static NSAccessibilityActionName; +} + +extern "C" { + static NSAccessibilityIncrementAction: &'static NSAccessibilityActionName; +} + +extern "C" { + static NSAccessibilityDecrementAction: &'static NSAccessibilityActionName; +} + +extern "C" { + static NSAccessibilityConfirmAction: &'static NSAccessibilityActionName; +} + +extern "C" { + static NSAccessibilityPickAction: &'static NSAccessibilityActionName; +} + +extern "C" { + static NSAccessibilityCancelAction: &'static NSAccessibilityActionName; +} + +extern "C" { + static NSAccessibilityRaiseAction: &'static NSAccessibilityActionName; +} + +extern "C" { + static NSAccessibilityShowMenuAction: &'static NSAccessibilityActionName; +} + +extern "C" { + static NSAccessibilityDeleteAction: &'static NSAccessibilityActionName; +} + +extern "C" { + static NSAccessibilityShowAlternateUIAction: &'static NSAccessibilityActionName; +} + +extern "C" { + static NSAccessibilityShowDefaultUIAction: &'static NSAccessibilityActionName; +} + pub type NSAccessibilityNotificationName = NSString; +extern "C" { + static NSAccessibilityMainWindowChangedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityFocusedWindowChangedNotification: + &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityFocusedUIElementChangedNotification: + &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityApplicationActivatedNotification: + &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityApplicationDeactivatedNotification: + &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityApplicationHiddenNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityApplicationShownNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityWindowCreatedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityWindowMovedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityWindowResizedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityWindowMiniaturizedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityWindowDeminiaturizedNotification: + &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityDrawerCreatedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilitySheetCreatedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityUIElementDestroyedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityValueChangedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityTitleChangedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityResizedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityMovedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityCreatedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityLayoutChangedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityHelpTagCreatedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilitySelectedTextChangedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityRowCountChangedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilitySelectedChildrenChangedNotification: + &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilitySelectedRowsChangedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilitySelectedColumnsChangedNotification: + &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityRowExpandedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityRowCollapsedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilitySelectedCellsChangedNotification: + &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityUnitsChangedNotification: &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilitySelectedChildrenMovedNotification: + &'static NSAccessibilityNotificationName; +} + +extern "C" { + static NSAccessibilityAnnouncementRequestedNotification: + &'static NSAccessibilityNotificationName; +} + pub type NSAccessibilityRole = NSString; +extern "C" { + static NSAccessibilityUnknownRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityButtonRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityRadioButtonRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityCheckBoxRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilitySliderRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityTabGroupRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityTextFieldRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityStaticTextRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityTextAreaRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityScrollAreaRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityPopUpButtonRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityMenuButtonRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityTableRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityApplicationRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityGroupRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityRadioGroupRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityListRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityScrollBarRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityValueIndicatorRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityImageRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityMenuBarRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityMenuBarItemRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityMenuRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityMenuItemRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityColumnRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityRowRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityToolbarRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityBusyIndicatorRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityProgressIndicatorRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityWindowRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityDrawerRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilitySystemWideRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityOutlineRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityIncrementorRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityBrowserRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityComboBoxRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilitySplitGroupRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilitySplitterRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityColorWellRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityGrowAreaRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilitySheetRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityHelpTagRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityMatteRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityRulerRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityRulerMarkerRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityLinkRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityDisclosureTriangleRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityGridRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityRelevanceIndicatorRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityLevelIndicatorRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityCellRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityPopoverRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityPageRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityLayoutAreaRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityLayoutItemRole: &'static NSAccessibilityRole; +} + +extern "C" { + static NSAccessibilityHandleRole: &'static NSAccessibilityRole; +} + pub type NSAccessibilitySubrole = NSString; +extern "C" { + static NSAccessibilityUnknownSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityCloseButtonSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityZoomButtonSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityMinimizeButtonSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityToolbarButtonSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityTableRowSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityOutlineRowSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilitySecureTextFieldSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityStandardWindowSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityDialogSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilitySystemDialogSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityFloatingWindowSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilitySystemFloatingWindowSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityIncrementArrowSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityDecrementArrowSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityIncrementPageSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityDecrementPageSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilitySearchFieldSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityTextAttachmentSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityTextLinkSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityTimelineSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilitySortButtonSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityRatingIndicatorSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityContentListSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityDefinitionListSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityFullScreenButtonSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityToggleSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilitySwitchSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityDescriptionListSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityTabButtonSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilityCollectionListSubrole: &'static NSAccessibilitySubrole; +} + +extern "C" { + static NSAccessibilitySectionListSubrole: &'static NSAccessibilitySubrole; +} + pub type NSAccessibilityNotificationUserInfoKey = NSString; +extern "C" { + static NSAccessibilityUIElementsKey: &'static NSAccessibilityNotificationUserInfoKey; +} + +extern "C" { + static NSAccessibilityPriorityKey: &'static NSAccessibilityNotificationUserInfoKey; +} + +extern "C" { + static NSAccessibilityAnnouncementKey: &'static NSAccessibilityNotificationUserInfoKey; +} + pub type NSAccessibilityPriorityLevel = NSInteger; pub const NSAccessibilityPriorityLow: NSAccessibilityPriorityLevel = 10; pub const NSAccessibilityPriorityMedium: NSAccessibilityPriorityLevel = 50; pub const NSAccessibilityPriorityHigh: NSAccessibilityPriorityLevel = 90; pub type NSAccessibilityLoadingToken = TodoProtocols; + +extern "C" { + static NSAccessibilitySortButtonRole: &'static NSAccessibilityRole; +} diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index 7e24456f9..975a09010 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -10,6 +10,12 @@ pub const NSAlertStyleWarning: NSAlertStyle = 0; pub const NSAlertStyleInformational: NSAlertStyle = 1; pub const NSAlertStyleCritical: NSAlertStyle = 2; +static NSAlertFirstButtonReturn: NSModalResponse = 1000; + +static NSAlertSecondButtonReturn: NSModalResponse = 1001; + +static NSAlertThirdButtonReturn: NSModalResponse = 1002; + extern_class!( #[derive(Debug)] pub struct NSAlert; @@ -120,3 +126,9 @@ extern_methods!( ); } ); + +static NSWarningAlertStyle: NSAlertStyle = NSAlertStyleWarning; + +static NSInformationalAlertStyle: NSAlertStyle = NSAlertStyleInformational; + +static NSCriticalAlertStyle: NSAlertStyle = NSAlertStyleCritical; diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index 6a03dcc62..04c697e22 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -16,6 +16,14 @@ pub const NSAnimationBlocking: NSAnimationBlockingMode = 0; pub const NSAnimationNonblocking: NSAnimationBlockingMode = 1; pub const NSAnimationNonblockingThreaded: NSAnimationBlockingMode = 2; +extern "C" { + static NSAnimationProgressMarkNotification: &'static NSNotificationName; +} + +extern "C" { + static NSAnimationProgressMark: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSAnimation; @@ -130,8 +138,32 @@ pub type NSAnimationDelegate = NSObject; pub type NSViewAnimationKey = NSString; +extern "C" { + static NSViewAnimationTargetKey: &'static NSViewAnimationKey; +} + +extern "C" { + static NSViewAnimationStartFrameKey: &'static NSViewAnimationKey; +} + +extern "C" { + static NSViewAnimationEndFrameKey: &'static NSViewAnimationKey; +} + +extern "C" { + static NSViewAnimationEffectKey: &'static NSViewAnimationKey; +} + pub type NSViewAnimationEffectName = NSString; +extern "C" { + static NSViewAnimationFadeInEffect: &'static NSViewAnimationEffectName; +} + +extern "C" { + static NSViewAnimationFadeOutEffect: &'static NSViewAnimationEffectName; +} + extern_class!( #[derive(Debug)] pub struct NSViewAnimation; @@ -165,3 +197,11 @@ extern_methods!( pub type NSAnimatablePropertyKey = NSString; pub type NSAnimatablePropertyContainer = NSObject; + +extern "C" { + static NSAnimationTriggerOrderIn: &'static NSAnimatablePropertyKey; +} + +extern "C" { + static NSAnimationTriggerOrderOut: &'static NSAnimatablePropertyKey; +} diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index 878e5b430..c3804a355 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -57,4 +57,40 @@ extern_methods!( } ); +extern "C" { + static NSAppearanceNameAqua: &'static NSAppearanceName; +} + +extern "C" { + static NSAppearanceNameDarkAqua: &'static NSAppearanceName; +} + +extern "C" { + static NSAppearanceNameLightContent: &'static NSAppearanceName; +} + +extern "C" { + static NSAppearanceNameVibrantDark: &'static NSAppearanceName; +} + +extern "C" { + static NSAppearanceNameVibrantLight: &'static NSAppearanceName; +} + +extern "C" { + static NSAppearanceNameAccessibilityHighContrastAqua: &'static NSAppearanceName; +} + +extern "C" { + static NSAppearanceNameAccessibilityHighContrastDarkAqua: &'static NSAppearanceName; +} + +extern "C" { + static NSAppearanceNameAccessibilityHighContrastVibrantLight: &'static NSAppearanceName; +} + +extern "C" { + static NSAppearanceNameAccessibilityHighContrastVibrantDark: &'static NSAppearanceName; +} + pub type NSAppearanceCustomization = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 2d8e55629..76bba56c2 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -5,8 +5,146 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSAppKitVersionNumber: NSAppKitVersion; +} + +static NSAppKitVersionNumber10_0: NSAppKitVersion = 577; + +static NSAppKitVersionNumber10_1: NSAppKitVersion = 620; + +static NSAppKitVersionNumber10_2: NSAppKitVersion = 663; + +static NSAppKitVersionNumber10_2_3: NSAppKitVersion = 663.6; + +static NSAppKitVersionNumber10_3: NSAppKitVersion = 743; + +static NSAppKitVersionNumber10_3_2: NSAppKitVersion = 743.14; + +static NSAppKitVersionNumber10_3_3: NSAppKitVersion = 743.2; + +static NSAppKitVersionNumber10_3_5: NSAppKitVersion = 743.24; + +static NSAppKitVersionNumber10_3_7: NSAppKitVersion = 743.33; + +static NSAppKitVersionNumber10_3_9: NSAppKitVersion = 743.36; + +static NSAppKitVersionNumber10_4: NSAppKitVersion = 824; + +static NSAppKitVersionNumber10_4_1: NSAppKitVersion = 824.1; + +static NSAppKitVersionNumber10_4_3: NSAppKitVersion = 824.23; + +static NSAppKitVersionNumber10_4_4: NSAppKitVersion = 824.33; + +static NSAppKitVersionNumber10_4_7: NSAppKitVersion = 824.41; + +static NSAppKitVersionNumber10_5: NSAppKitVersion = 949; + +static NSAppKitVersionNumber10_5_2: NSAppKitVersion = 949.27; + +static NSAppKitVersionNumber10_5_3: NSAppKitVersion = 949.33; + +static NSAppKitVersionNumber10_6: NSAppKitVersion = 1038; + +static NSAppKitVersionNumber10_7: NSAppKitVersion = 1138; + +static NSAppKitVersionNumber10_7_2: NSAppKitVersion = 1138.23; + +static NSAppKitVersionNumber10_7_3: NSAppKitVersion = 1138.32; + +static NSAppKitVersionNumber10_7_4: NSAppKitVersion = 1138.47; + +static NSAppKitVersionNumber10_8: NSAppKitVersion = 1187; + +static NSAppKitVersionNumber10_9: NSAppKitVersion = 1265; + +static NSAppKitVersionNumber10_10: NSAppKitVersion = 1343; + +static NSAppKitVersionNumber10_10_2: NSAppKitVersion = 1344; + +static NSAppKitVersionNumber10_10_3: NSAppKitVersion = 1347; + +static NSAppKitVersionNumber10_10_4: NSAppKitVersion = 1348; + +static NSAppKitVersionNumber10_10_5: NSAppKitVersion = 1348; + +static NSAppKitVersionNumber10_10_Max: NSAppKitVersion = 1349; + +static NSAppKitVersionNumber10_11: NSAppKitVersion = 1404; + +static NSAppKitVersionNumber10_11_1: NSAppKitVersion = 1404.13; + +static NSAppKitVersionNumber10_11_2: NSAppKitVersion = 1404.34; + +static NSAppKitVersionNumber10_11_3: NSAppKitVersion = 1404.34; + +static NSAppKitVersionNumber10_12: NSAppKitVersion = 1504; + +static NSAppKitVersionNumber10_12_1: NSAppKitVersion = 1504.60; + +static NSAppKitVersionNumber10_12_2: NSAppKitVersion = 1504.76; + +static NSAppKitVersionNumber10_13: NSAppKitVersion = 1561; + +static NSAppKitVersionNumber10_13_1: NSAppKitVersion = 1561.1; + +static NSAppKitVersionNumber10_13_2: NSAppKitVersion = 1561.2; + +static NSAppKitVersionNumber10_13_4: NSAppKitVersion = 1561.4; + +static NSAppKitVersionNumber10_14: NSAppKitVersion = 1671; + +static NSAppKitVersionNumber10_14_1: NSAppKitVersion = 1671.1; + +static NSAppKitVersionNumber10_14_2: NSAppKitVersion = 1671.2; + +static NSAppKitVersionNumber10_14_3: NSAppKitVersion = 1671.3; + +static NSAppKitVersionNumber10_14_4: NSAppKitVersion = 1671.4; + +static NSAppKitVersionNumber10_14_5: NSAppKitVersion = 1671.5; + +static NSAppKitVersionNumber10_15: NSAppKitVersion = 1894; + +static NSAppKitVersionNumber10_15_1: NSAppKitVersion = 1894.1; + +static NSAppKitVersionNumber10_15_2: NSAppKitVersion = 1894.2; + +static NSAppKitVersionNumber10_15_3: NSAppKitVersion = 1894.3; + +static NSAppKitVersionNumber10_15_4: NSAppKitVersion = 1894.4; + +static NSAppKitVersionNumber10_15_5: NSAppKitVersion = 1894.5; + +static NSAppKitVersionNumber10_15_6: NSAppKitVersion = 1894.6; + +static NSAppKitVersionNumber11_0: NSAppKitVersion = 2022; + +static NSAppKitVersionNumber11_1: NSAppKitVersion = 2022.2; + +static NSAppKitVersionNumber11_2: NSAppKitVersion = 2022.3; + +static NSAppKitVersionNumber11_3: NSAppKitVersion = 2022.4; + +static NSAppKitVersionNumber11_4: NSAppKitVersion = 2022.5; + +extern "C" { + static NSModalPanelRunLoopMode: &'static NSRunLoopMode; +} + +extern "C" { + static NSEventTrackingRunLoopMode: &'static NSRunLoopMode; +} + pub type NSModalResponse = NSInteger; +static NSModalResponseStop: NSModalResponse = (-1000); + +static NSModalResponseAbort: NSModalResponse = (-1001); + +static NSModalResponseContinue: NSModalResponse = (-1002); + pub const NSUpdateWindowsRunLoopOrdering: i32 = 500000; pub type NSApplicationPresentationOptions = NSUInteger; @@ -36,6 +174,10 @@ pub const NSApplicationOcclusionStateVisible: NSApplicationOcclusionState = 1 << pub type NSWindowListOptions = NSInteger; pub const NSWindowListOrderedFrontToBack: NSWindowListOptions = (1 << 0); +extern "C" { + static NSApp: Option<&'static NSApplication>; +} + pub type NSRequestUserAttentionType = NSUInteger; pub const NSCriticalRequest: NSRequestUserAttentionType = 0; pub const NSInformationalRequest: NSRequestUserAttentionType = 10; @@ -411,6 +553,26 @@ extern_methods!( pub type NSAboutPanelOptionKey = NSString; +extern "C" { + static NSAboutPanelOptionCredits: &'static NSAboutPanelOptionKey; +} + +extern "C" { + static NSAboutPanelOptionApplicationName: &'static NSAboutPanelOptionKey; +} + +extern "C" { + static NSAboutPanelOptionApplicationIcon: &'static NSAboutPanelOptionKey; +} + +extern "C" { + static NSAboutPanelOptionVersion: &'static NSAboutPanelOptionKey; +} + +extern "C" { + static NSAboutPanelOptionApplicationVersion: &'static NSAboutPanelOptionKey; +} + extern_methods!( /// NSStandardAboutPanel unsafe impl NSApplication { @@ -472,6 +634,86 @@ extern_methods!( pub type NSServiceProviderName = NSString; +extern "C" { + static NSApplicationDidBecomeActiveNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationDidHideNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationDidFinishLaunchingNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationDidResignActiveNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationDidUnhideNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationDidUpdateNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationWillBecomeActiveNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationWillHideNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationWillFinishLaunchingNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationWillResignActiveNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationWillUnhideNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationWillUpdateNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationWillTerminateNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationDidChangeScreenParametersNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationProtectedDataWillBecomeUnavailableNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationProtectedDataDidBecomeAvailableNotification: &'static NSNotificationName; +} + +extern "C" { + static NSApplicationLaunchIsDefaultLaunchKey: &'static NSString; +} + +extern "C" { + static NSApplicationLaunchUserNotificationKey: &'static NSString; +} + +extern "C" { + static NSApplicationLaunchRemoteNotificationKey: &'static NSString; +} + +extern "C" { + static NSApplicationDidChangeOcclusionStateNotification: &'static NSNotificationName; +} + pub const NSRunStoppedResponse: i32 = (-1000); pub const NSRunAbortedResponse: i32 = (-1001); pub const NSRunContinuesResponse: i32 = (-1002); diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index e907117f5..ab26e3f75 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -5,6 +5,122 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSFontAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSParagraphStyleAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSForegroundColorAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSBackgroundColorAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSLigatureAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSKernAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSTrackingAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSStrikethroughStyleAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSUnderlineStyleAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSStrokeColorAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSStrokeWidthAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSShadowAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSTextEffectAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAttachmentAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSLinkAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSBaselineOffsetAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSUnderlineColorAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSStrikethroughColorAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSObliquenessAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSExpansionAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSWritingDirectionAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSVerticalGlyphFormAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSCursorAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSToolTipAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSMarkedClauseSegmentAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSTextAlternativesAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSSpellingStateAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSSuperscriptAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSGlyphInfoAttributeName: &'static NSAttributedStringKey; +} + pub type NSUnderlineStyle = NSInteger; pub const NSUnderlineStyleNone: NSUnderlineStyle = 0x00; pub const NSUnderlineStyleSingle: NSUnderlineStyle = 0x01; @@ -23,6 +139,10 @@ pub const NSWritingDirectionOverride: NSWritingDirectionFormatType = (1 << 1); pub type NSTextEffectStyle = NSString; +extern "C" { + static NSTextEffectLetterpressStyle: &'static NSTextEffectStyle; +} + pub type NSSpellingState = NSInteger; pub const NSSpellingStateSpellingFlag: NSSpellingState = (1 << 0); pub const NSSpellingStateGrammarFlag: NSSpellingState = (1 << 1); @@ -46,16 +166,261 @@ extern_methods!( pub type NSAttributedStringDocumentType = NSString; +extern "C" { + static NSPlainTextDocumentType: &'static NSAttributedStringDocumentType; +} + +extern "C" { + static NSRTFTextDocumentType: &'static NSAttributedStringDocumentType; +} + +extern "C" { + static NSRTFDTextDocumentType: &'static NSAttributedStringDocumentType; +} + +extern "C" { + static NSHTMLTextDocumentType: &'static NSAttributedStringDocumentType; +} + +extern "C" { + static NSMacSimpleTextDocumentType: &'static NSAttributedStringDocumentType; +} + +extern "C" { + static NSDocFormatTextDocumentType: &'static NSAttributedStringDocumentType; +} + +extern "C" { + static NSWordMLTextDocumentType: &'static NSAttributedStringDocumentType; +} + +extern "C" { + static NSWebArchiveTextDocumentType: &'static NSAttributedStringDocumentType; +} + +extern "C" { + static NSOfficeOpenXMLTextDocumentType: &'static NSAttributedStringDocumentType; +} + +extern "C" { + static NSOpenDocumentTextDocumentType: &'static NSAttributedStringDocumentType; +} + pub type NSTextLayoutSectionKey = NSString; +extern "C" { + static NSTextLayoutSectionOrientation: &'static NSTextLayoutSectionKey; +} + +extern "C" { + static NSTextLayoutSectionRange: &'static NSTextLayoutSectionKey; +} + pub type NSTextScalingType = NSInteger; pub const NSTextScalingStandard: NSTextScalingType = 0; pub const NSTextScalingiOS: NSTextScalingType = 1; pub type NSAttributedStringDocumentAttributeKey = NSString; +extern "C" { + static NSDocumentTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSConvertedDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSCocoaVersionDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSFileTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSTitleDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSCompanyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSCopyrightDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSSubjectDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSAuthorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSKeywordsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSCommentDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSEditorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSCreationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSModificationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSManagerDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSCategoryDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSAppearanceDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSCharacterEncodingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSDefaultAttributesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSPaperSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSLeftMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSRightMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSTopMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSBottomMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSViewSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSViewZoomDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSViewModeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSReadOnlyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSBackgroundColorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSHyphenationFactorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSDefaultTabIntervalDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSTextLayoutSectionsAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSExcludedElementsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSTextEncodingNameDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSPrefixSpacesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + +extern "C" { + static NSSourceTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; +} + pub type NSAttributedStringDocumentReadingOptionKey = NSString; +extern "C" { + static NSDocumentTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSDefaultAttributesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSCharacterEncodingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSTextEncodingNameDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSBaseURLDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSTimeoutDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSWebPreferencesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSWebResourceLoadDelegateDocumentOption: + &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSTextSizeMultiplierDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSFileTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSTargetTextScalingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + +extern "C" { + static NSSourceTextScalingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; +} + extern_methods!( /// NSAttributedStringDocumentFormats unsafe impl NSAttributedString { @@ -345,9 +710,37 @@ extern_methods!( } ); +static NSUnderlinePatternSolid: NSUnderlineStyle = NSUnderlineStylePatternSolid; + +static NSUnderlinePatternDot: NSUnderlineStyle = NSUnderlineStylePatternDot; + +static NSUnderlinePatternDash: NSUnderlineStyle = NSUnderlineStylePatternDash; + +static NSUnderlinePatternDashDot: NSUnderlineStyle = NSUnderlineStylePatternDashDot; + +static NSUnderlinePatternDashDotDot: NSUnderlineStyle = NSUnderlineStylePatternDashDotDot; + +static NSUnderlineByWord: NSUnderlineStyle = NSUnderlineStyleByWord; + +extern "C" { + static NSCharacterShapeAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSUsesScreenFontsDocumentAttribute: &'static NSAttributedStringKey; +} + pub const NSNoUnderlineStyle: i32 = 0; pub const NSSingleUnderlineStyle: i32 = 1; +extern "C" { + static NSUnderlineStrikethroughMask: NSUInteger; +} + +extern "C" { + static NSUnderlineByWordMask: NSUInteger; +} + extern_methods!( /// NSDeprecatedKitAdditions unsafe impl NSAttributedString { diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index 084c75d95..6f4444187 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -329,3 +329,27 @@ extern_methods!( pub unsafe fn appendBezierPathWithPackedGlyphs(&self, packedGlyphs: NonNull); } ); + +static NSButtLineCapStyle: NSLineCapStyle = NSLineCapStyleButt; + +static NSRoundLineCapStyle: NSLineCapStyle = NSLineCapStyleRound; + +static NSSquareLineCapStyle: NSLineCapStyle = NSLineCapStyleSquare; + +static NSMiterLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleMiter; + +static NSRoundLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleRound; + +static NSBevelLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleBevel; + +static NSNonZeroWindingRule: NSWindingRule = NSWindingRuleNonZero; + +static NSEvenOddWindingRule: NSWindingRule = NSWindingRuleEvenOdd; + +static NSMoveToBezierPathElement: NSBezierPathElement = NSBezierPathElementMoveTo; + +static NSLineToBezierPathElement: NSBezierPathElement = NSBezierPathElementLineTo; + +static NSCurveToBezierPathElement: NSBezierPathElement = NSBezierPathElementCurveTo; + +static NSClosePathBezierPathElement: NSBezierPathElement = NSBezierPathElementClosePath; diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index 2b764101a..8a41909bb 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -42,6 +42,66 @@ pub const NSBitmapFormatThirtyTwoBitBigEndian: NSBitmapFormat = (1 << 11); pub type NSBitmapImageRepPropertyKey = NSString; +extern "C" { + static NSImageCompressionMethod: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageCompressionFactor: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageDitherTransparency: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageRGBColorTable: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageInterlaced: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageColorSyncProfileData: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageFrameCount: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageCurrentFrame: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageCurrentFrameDuration: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageLoopCount: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageGamma: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageProgressive: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageEXIFData: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageIPTCData: &'static NSBitmapImageRepPropertyKey; +} + +extern "C" { + static NSImageFallbackBackgroundColor: &'static NSBitmapImageRepPropertyKey; +} + extern_class!( #[derive(Debug)] pub struct NSBitmapImageRep; @@ -258,3 +318,29 @@ extern_methods!( ) -> Option>; } ); + +static NSTIFFFileType: NSBitmapImageFileType = NSBitmapImageFileTypeTIFF; + +static NSBMPFileType: NSBitmapImageFileType = NSBitmapImageFileTypeBMP; + +static NSGIFFileType: NSBitmapImageFileType = NSBitmapImageFileTypeGIF; + +static NSJPEGFileType: NSBitmapImageFileType = NSBitmapImageFileTypeJPEG; + +static NSPNGFileType: NSBitmapImageFileType = NSBitmapImageFileTypePNG; + +static NSJPEG2000FileType: NSBitmapImageFileType = NSBitmapImageFileTypeJPEG2000; + +static NSAlphaFirstBitmapFormat: NSBitmapFormat = NSBitmapFormatAlphaFirst; + +static NSAlphaNonpremultipliedBitmapFormat: NSBitmapFormat = NSBitmapFormatAlphaNonpremultiplied; + +static NSFloatingPointSamplesBitmapFormat: NSBitmapFormat = NSBitmapFormatFloatingPointSamples; + +static NS16BitLittleEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatSixteenBitLittleEndian; + +static NS32BitLittleEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatThirtyTwoBitLittleEndian; + +static NS16BitBigEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatSixteenBitBigEndian; + +static NS32BitBigEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatThirtyTwoBitBigEndian; diff --git a/crates/icrate/src/generated/AppKit/NSBox.rs b/crates/icrate/src/generated/AppKit/NSBox.rs index 7c5472bb5..501f617d9 100644 --- a/crates/icrate/src/generated/AppKit/NSBox.rs +++ b/crates/icrate/src/generated/AppKit/NSBox.rs @@ -126,3 +126,7 @@ extern_methods!( pub unsafe fn setTitleWithMnemonic(&self, stringWithAmpersand: Option<&NSString>); } ); + +static NSBoxSecondary: NSBoxType = 1; + +static NSBoxOldStyle: NSBoxType = 3; diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index 5c5c1ef00..67c75676a 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSAppKitVersionNumberWithContinuousScrollingBrowser: NSAppKitVersion = 680.0; + +static NSAppKitVersionNumberWithColumnResizingBrowser: NSAppKitVersion = 685.0; + pub type NSBrowserColumnsAutosaveName = NSString; pub type NSBrowserColumnResizingType = NSUInteger; @@ -413,6 +417,10 @@ extern_methods!( } ); +extern "C" { + static NSBrowserColumnConfigurationDidChangeNotification: &'static NSNotificationName; +} + pub type NSBrowserDelegate = NSObject; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs index 4332d846d..67de1672f 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -216,6 +216,62 @@ pub const NSGradientConcaveStrong: NSGradientType = 2; pub const NSGradientConvexWeak: NSGradientType = 3; pub const NSGradientConvexStrong: NSGradientType = 4; +static NSMomentaryLightButton: NSButtonType = NSButtonTypeMomentaryLight; + +static NSPushOnPushOffButton: NSButtonType = NSButtonTypePushOnPushOff; + +static NSToggleButton: NSButtonType = NSButtonTypeToggle; + +static NSSwitchButton: NSButtonType = NSButtonTypeSwitch; + +static NSRadioButton: NSButtonType = NSButtonTypeRadio; + +static NSMomentaryChangeButton: NSButtonType = NSButtonTypeMomentaryChange; + +static NSOnOffButton: NSButtonType = NSButtonTypeOnOff; + +static NSMomentaryPushInButton: NSButtonType = NSButtonTypeMomentaryPushIn; + +static NSAcceleratorButton: NSButtonType = NSButtonTypeAccelerator; + +static NSMultiLevelAcceleratorButton: NSButtonType = NSButtonTypeMultiLevelAccelerator; + +static NSMomentaryPushButton: NSButtonType = NSButtonTypeMomentaryLight; + +static NSMomentaryLight: NSButtonType = NSButtonTypeMomentaryPushIn; + +static NSRoundedBezelStyle: NSBezelStyle = NSBezelStyleRounded; + +static NSRegularSquareBezelStyle: NSBezelStyle = NSBezelStyleRegularSquare; + +static NSDisclosureBezelStyle: NSBezelStyle = NSBezelStyleDisclosure; + +static NSShadowlessSquareBezelStyle: NSBezelStyle = NSBezelStyleShadowlessSquare; + +static NSCircularBezelStyle: NSBezelStyle = NSBezelStyleCircular; + +static NSTexturedSquareBezelStyle: NSBezelStyle = NSBezelStyleTexturedSquare; + +static NSHelpButtonBezelStyle: NSBezelStyle = NSBezelStyleHelpButton; + +static NSSmallSquareBezelStyle: NSBezelStyle = NSBezelStyleSmallSquare; + +static NSTexturedRoundedBezelStyle: NSBezelStyle = NSBezelStyleTexturedRounded; + +static NSRoundRectBezelStyle: NSBezelStyle = NSBezelStyleRoundRect; + +static NSRecessedBezelStyle: NSBezelStyle = NSBezelStyleRecessed; + +static NSRoundedDisclosureBezelStyle: NSBezelStyle = NSBezelStyleRoundedDisclosure; + +static NSInlineBezelStyle: NSBezelStyle = NSBezelStyleInline; + +static NSSmallIconButtonBezelStyle: NSBezelStyle = 2; + +static NSThickSquareBezelStyle: NSBezelStyle = 3; + +static NSThickerSquareBezelStyle: NSBezelStyle = 4; + extern_methods!( /// NSDeprecated unsafe impl NSButtonCell { diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index 2a70da17a..036323b83 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -94,3 +94,7 @@ extern_methods!( ) -> Option>; } ); + +extern "C" { + static NSTouchBarItemIdentifierCandidateList: &'static NSTouchBarItemIdentifier; +} diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index 3176c2d28..c9319155a 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -51,6 +51,12 @@ pub const NSScaleNone: NSImageScaling = 2; pub type NSControlStateValue = NSInteger; +static NSControlStateValueMixed: NSControlStateValue = -1; + +static NSControlStateValueOff: NSControlStateValue = 0; + +static NSControlStateValueOn: NSControlStateValue = 1; + pub type NSCellStyleMask = NSUInteger; pub const NSNoCellMask: NSCellStyleMask = 0; pub const NSContentsCellMask: NSCellStyleMask = 1; @@ -675,8 +681,28 @@ extern_methods!( } ); +static NSBackgroundStyleLight: NSBackgroundStyle = NSBackgroundStyleNormal; + +static NSBackgroundStyleDark: NSBackgroundStyle = NSBackgroundStyleEmphasized; + pub type NSCellStateValue = NSControlStateValue; +static NSMixedState: NSControlStateValue = NSControlStateValueMixed; + +static NSOffState: NSControlStateValue = NSControlStateValueOff; + +static NSOnState: NSControlStateValue = NSControlStateValueOn; + +static NSRegularControlSize: NSControlSize = NSControlSizeRegular; + +static NSSmallControlSize: NSControlSize = NSControlSizeSmall; + +static NSMiniControlSize: NSControlSize = NSControlSizeMini; + +extern "C" { + static NSControlTintDidChangeNotification: &'static NSNotificationName; +} + pub const NSAnyType: i32 = 0; pub const NSIntType: i32 = 1; pub const NSPositiveIntType: i32 = 2; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index cb1ba4133..035a05b9e 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -16,6 +16,10 @@ pub const NSDirectionalRectEdgeAll: NSDirectionalRectEdge = NSDirectionalRectEdg | NSDirectionalRectEdgeBottom | NSDirectionalRectEdgeTrailing; +extern "C" { + static NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets; +} + pub type NSRectAlignment = NSInteger; pub const NSRectAlignmentNone: NSRectAlignment = 0; pub const NSRectAlignmentTop: NSRectAlignment = 1; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs index 70eaa1522..ed19466c2 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs @@ -9,6 +9,14 @@ pub type NSCollectionViewScrollDirection = NSInteger; pub const NSCollectionViewScrollDirectionVertical: NSCollectionViewScrollDirection = 0; pub const NSCollectionViewScrollDirectionHorizontal: NSCollectionViewScrollDirection = 1; +extern "C" { + static NSCollectionElementKindSectionHeader: &'static NSCollectionViewSupplementaryElementKind; +} + +extern "C" { + static NSCollectionElementKindSectionFooter: &'static NSCollectionViewSupplementaryElementKind; +} + extern_class!( #[derive(Debug)] pub struct NSCollectionViewFlowLayoutInvalidationContext; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs index 5d9bf1ccc..5476e22b1 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -13,6 +13,11 @@ pub const NSCollectionElementCategoryInterItemGap: NSCollectionElementCategory = pub type NSCollectionViewDecorationElementKind = NSString; +extern "C" { + static NSCollectionElementKindInterItemGapIndicator: + &'static NSCollectionViewSupplementaryElementKind; +} + extern_class!( #[derive(Debug)] pub struct NSCollectionViewLayoutAttributes; diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index 0fb2e98b0..e4fe1e262 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -5,6 +5,8 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSAppKitVersionNumberWithPatternColorLeakFix: NSAppKitVersion = 641.0; + pub type NSColorType = NSInteger; pub const NSColorTypeComponentBased: NSColorType = 0; pub const NSColorTypePattern: NSColorType = 1; @@ -604,3 +606,7 @@ extern_methods!( pub unsafe fn decodeNXColor(&self) -> Option>; } ); + +extern "C" { + static NSSystemColorsDidChangeNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSColorList.rs b/crates/icrate/src/generated/AppKit/NSColorList.rs index 976c0c647..1e0c147a5 100644 --- a/crates/icrate/src/generated/AppKit/NSColorList.rs +++ b/crates/icrate/src/generated/AppKit/NSColorList.rs @@ -75,3 +75,7 @@ extern_methods!( pub unsafe fn removeFile(&self); } ); + +extern "C" { + static NSColorListDidChangeNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index a16873b76..31bd67b3f 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -121,3 +121,25 @@ extern_methods!( pub unsafe fn changeColor(&self, sender: Option<&Object>); } ); + +extern "C" { + static NSColorPanelColorDidChangeNotification: &'static NSNotificationName; +} + +static NSNoModeColorPanel: NSColorPanelMode = NSColorPanelModeNone; + +static NSGrayModeColorPanel: NSColorPanelMode = NSColorPanelModeGray; + +static NSRGBModeColorPanel: NSColorPanelMode = NSColorPanelModeRGB; + +static NSCMYKModeColorPanel: NSColorPanelMode = NSColorPanelModeCMYK; + +static NSHSBModeColorPanel: NSColorPanelMode = NSColorPanelModeHSB; + +static NSCustomPaletteModeColorPanel: NSColorPanelMode = NSColorPanelModeCustomPalette; + +static NSColorListModeColorPanel: NSColorPanelMode = NSColorPanelModeColorList; + +static NSWheelModeColorPanel: NSColorPanelMode = NSColorPanelModeWheel; + +static NSCrayonModeColorPanel: NSColorPanelMode = NSColorPanelModeCrayon; diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index 28da1da00..1d75343e9 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -101,3 +101,19 @@ extern_methods!( ) -> Id, Shared>; } ); + +static NSUnknownColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelUnknown; + +static NSGrayColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelGray; + +static NSRGBColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelRGB; + +static NSCMYKColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelCMYK; + +static NSLABColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelLAB; + +static NSDeviceNColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelDeviceN; + +static NSIndexedColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelIndexed; + +static NSPatternColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelPatterned; diff --git a/crates/icrate/src/generated/AppKit/NSComboBox.rs b/crates/icrate/src/generated/AppKit/NSComboBox.rs index f6832fbfd..88a601136 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBox.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBox.rs @@ -5,6 +5,22 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSComboBoxWillPopUpNotification: &'static NSNotificationName; +} + +extern "C" { + static NSComboBoxWillDismissNotification: &'static NSNotificationName; +} + +extern "C" { + static NSComboBoxSelectionDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSComboBoxSelectionIsChangingNotification: &'static NSNotificationName; +} + pub type NSComboBoxDataSource = NSObject; pub type NSComboBoxDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index 205b18f1e..f791abcfa 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -242,6 +242,18 @@ extern_methods!( pub type NSControlTextEditingDelegate = NSObject; +extern "C" { + static NSControlTextDidBeginEditingNotification: &'static NSNotificationName; +} + +extern "C" { + static NSControlTextDidEndEditingNotification: &'static NSNotificationName; +} + +extern "C" { + static NSControlTextDidChangeNotification: &'static NSNotificationName; +} + extern_methods!( /// NSDeprecated unsafe impl NSControl { diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs index 88d1c1267..d80729113 100644 --- a/crates/icrate/src/generated/AppKit/NSCursor.rs +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -115,6 +115,8 @@ extern_methods!( } ); +static NSAppKitVersionNumberWithCursorSizeSupport: NSAppKitVersion = 682.0; + extern_methods!( /// NSDeprecated unsafe impl NSCursor { diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index 2519ce3e6..ba90775a3 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -129,3 +129,30 @@ extern_methods!( ); pub type NSDatePickerCellDelegate = NSObject; + +static NSTextFieldAndStepperDatePickerStyle: NSDatePickerStyle = + NSDatePickerStyleTextFieldAndStepper; + +static NSClockAndCalendarDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleClockAndCalendar; + +static NSTextFieldDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleTextField; + +static NSSingleDateMode: NSDatePickerMode = NSDatePickerModeSingle; + +static NSRangeDateMode: NSDatePickerMode = NSDatePickerModeRange; + +static NSHourMinuteDatePickerElementFlag: NSDatePickerElementFlags = + NSDatePickerElementFlagHourMinute; + +static NSHourMinuteSecondDatePickerElementFlag: NSDatePickerElementFlags = + NSDatePickerElementFlagHourMinuteSecond; + +static NSTimeZoneDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagTimeZone; + +static NSYearMonthDatePickerElementFlag: NSDatePickerElementFlags = + NSDatePickerElementFlagYearMonth; + +static NSYearMonthDayDatePickerElementFlag: NSDatePickerElementFlags = + NSDatePickerElementFlagYearMonthDay; + +static NSEraDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagEra; diff --git a/crates/icrate/src/generated/AppKit/NSDockTile.rs b/crates/icrate/src/generated/AppKit/NSDockTile.rs index e77c023db..3b6384a07 100644 --- a/crates/icrate/src/generated/AppKit/NSDockTile.rs +++ b/crates/icrate/src/generated/AppKit/NSDockTile.rs @@ -5,6 +5,8 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = 1001.0; + extern_class!( #[derive(Debug)] pub struct NSDockTile; diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs index a5fa583cf..a717d5983 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -7,6 +7,14 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSDraggingImageComponentKey = NSString; +extern "C" { + static NSDraggingImageComponentIconKey: &'static NSDraggingImageComponentKey; +} + +extern "C" { + static NSDraggingImageComponentLabelKey: &'static NSDraggingImageComponentKey; +} + extern_class!( #[derive(Debug)] pub struct NSDraggingImageComponent; diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index 84e7f6e96..b37309393 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -118,3 +118,19 @@ extern_methods!( ); pub type NSDrawerDelegate = NSObject; + +extern "C" { + static NSDrawerWillOpenNotification: &'static NSNotificationName; +} + +extern "C" { + static NSDrawerDidOpenNotification: &'static NSNotificationName; +} + +extern "C" { + static NSDrawerWillCloseNotification: &'static NSNotificationName; +} + +extern "C" { + static NSDrawerDidCloseNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSErrors.rs b/crates/icrate/src/generated/AppKit/NSErrors.rs index 9810872e4..c6a954b5e 100644 --- a/crates/icrate/src/generated/AppKit/NSErrors.rs +++ b/crates/icrate/src/generated/AppKit/NSErrors.rs @@ -4,3 +4,147 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + +extern "C" { + static NSTextLineTooLongException: &'static NSExceptionName; +} + +extern "C" { + static NSTextNoSelectionException: &'static NSExceptionName; +} + +extern "C" { + static NSWordTablesWriteException: &'static NSExceptionName; +} + +extern "C" { + static NSWordTablesReadException: &'static NSExceptionName; +} + +extern "C" { + static NSTextReadException: &'static NSExceptionName; +} + +extern "C" { + static NSTextWriteException: &'static NSExceptionName; +} + +extern "C" { + static NSPasteboardCommunicationException: &'static NSExceptionName; +} + +extern "C" { + static NSPrintingCommunicationException: &'static NSExceptionName; +} + +extern "C" { + static NSAbortModalException: &'static NSExceptionName; +} + +extern "C" { + static NSAbortPrintingException: &'static NSExceptionName; +} + +extern "C" { + static NSIllegalSelectorException: &'static NSExceptionName; +} + +extern "C" { + static NSAppKitVirtualMemoryException: &'static NSExceptionName; +} + +extern "C" { + static NSBadRTFDirectiveException: &'static NSExceptionName; +} + +extern "C" { + static NSBadRTFFontTableException: &'static NSExceptionName; +} + +extern "C" { + static NSBadRTFStyleSheetException: &'static NSExceptionName; +} + +extern "C" { + static NSTypedStreamVersionException: &'static NSExceptionName; +} + +extern "C" { + static NSTIFFException: &'static NSExceptionName; +} + +extern "C" { + static NSPrintPackageException: &'static NSExceptionName; +} + +extern "C" { + static NSBadRTFColorTableException: &'static NSExceptionName; +} + +extern "C" { + static NSDraggingException: &'static NSExceptionName; +} + +extern "C" { + static NSColorListIOException: &'static NSExceptionName; +} + +extern "C" { + static NSColorListNotEditableException: &'static NSExceptionName; +} + +extern "C" { + static NSBadBitmapParametersException: &'static NSExceptionName; +} + +extern "C" { + static NSWindowServerCommunicationException: &'static NSExceptionName; +} + +extern "C" { + static NSFontUnavailableException: &'static NSExceptionName; +} + +extern "C" { + static NSPPDIncludeNotFoundException: &'static NSExceptionName; +} + +extern "C" { + static NSPPDParseException: &'static NSExceptionName; +} + +extern "C" { + static NSPPDIncludeStackOverflowException: &'static NSExceptionName; +} + +extern "C" { + static NSPPDIncludeStackUnderflowException: &'static NSExceptionName; +} + +extern "C" { + static NSRTFPropertyStackOverflowException: &'static NSExceptionName; +} + +extern "C" { + static NSAppKitIgnoredException: &'static NSExceptionName; +} + +extern "C" { + static NSBadComparisonException: &'static NSExceptionName; +} + +extern "C" { + static NSImageCacheException: &'static NSExceptionName; +} + +extern "C" { + static NSNibLoadingException: &'static NSExceptionName; +} + +extern "C" { + static NSBrowserIllegalDelegateException: &'static NSExceptionName; +} + +extern "C" { + static NSAccessibilityException: &'static NSExceptionName; +} diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 03486a2e0..8c73fda06 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -41,6 +41,52 @@ pub const NSEventTypePressure: NSEventType = 34; pub const NSEventTypeDirectTouch: NSEventType = 37; pub const NSEventTypeChangeMode: NSEventType = 38; +static NSLeftMouseDown: NSEventType = NSEventTypeLeftMouseDown; + +static NSLeftMouseUp: NSEventType = NSEventTypeLeftMouseUp; + +static NSRightMouseDown: NSEventType = NSEventTypeRightMouseDown; + +static NSRightMouseUp: NSEventType = NSEventTypeRightMouseUp; + +static NSMouseMoved: NSEventType = NSEventTypeMouseMoved; + +static NSLeftMouseDragged: NSEventType = NSEventTypeLeftMouseDragged; + +static NSRightMouseDragged: NSEventType = NSEventTypeRightMouseDragged; + +static NSMouseEntered: NSEventType = NSEventTypeMouseEntered; + +static NSMouseExited: NSEventType = NSEventTypeMouseExited; + +static NSKeyDown: NSEventType = NSEventTypeKeyDown; + +static NSKeyUp: NSEventType = NSEventTypeKeyUp; + +static NSFlagsChanged: NSEventType = NSEventTypeFlagsChanged; + +static NSAppKitDefined: NSEventType = NSEventTypeAppKitDefined; + +static NSSystemDefined: NSEventType = NSEventTypeSystemDefined; + +static NSApplicationDefined: NSEventType = NSEventTypeApplicationDefined; + +static NSPeriodic: NSEventType = NSEventTypePeriodic; + +static NSCursorUpdate: NSEventType = NSEventTypeCursorUpdate; + +static NSScrollWheel: NSEventType = NSEventTypeScrollWheel; + +static NSTabletPoint: NSEventType = NSEventTypeTabletPoint; + +static NSTabletProximity: NSEventType = NSEventTypeTabletProximity; + +static NSOtherMouseDown: NSEventType = NSEventTypeOtherMouseDown; + +static NSOtherMouseUp: NSEventType = NSEventTypeOtherMouseUp; + +static NSOtherMouseDragged: NSEventType = NSEventTypeOtherMouseDragged; + pub type NSEventMask = c_ulonglong; pub const NSEventMaskLeftMouseDown: NSEventMask = 1 << NSEventTypeLeftMouseDown; pub const NSEventMaskLeftMouseUp: NSEventMask = 1 << NSEventTypeLeftMouseUp; @@ -77,6 +123,54 @@ pub const NSEventMaskDirectTouch: NSEventMask = 1 << NSEventTypeDirectTouch; pub const NSEventMaskChangeMode: NSEventMask = 1 << NSEventTypeChangeMode; pub const NSEventMaskAny: NSEventMask = 18446744073709551615; +static NSLeftMouseDownMask: NSEventMask = NSEventMaskLeftMouseDown; + +static NSLeftMouseUpMask: NSEventMask = NSEventMaskLeftMouseUp; + +static NSRightMouseDownMask: NSEventMask = NSEventMaskRightMouseDown; + +static NSRightMouseUpMask: NSEventMask = NSEventMaskRightMouseUp; + +static NSMouseMovedMask: NSEventMask = NSEventMaskMouseMoved; + +static NSLeftMouseDraggedMask: NSEventMask = NSEventMaskLeftMouseDragged; + +static NSRightMouseDraggedMask: NSEventMask = NSEventMaskRightMouseDragged; + +static NSMouseEnteredMask: NSEventMask = NSEventMaskMouseEntered; + +static NSMouseExitedMask: NSEventMask = NSEventMaskMouseExited; + +static NSKeyDownMask: NSEventMask = NSEventMaskKeyDown; + +static NSKeyUpMask: NSEventMask = NSEventMaskKeyUp; + +static NSFlagsChangedMask: NSEventMask = NSEventMaskFlagsChanged; + +static NSAppKitDefinedMask: NSEventMask = NSEventMaskAppKitDefined; + +static NSSystemDefinedMask: NSEventMask = NSEventMaskSystemDefined; + +static NSApplicationDefinedMask: NSEventMask = NSEventMaskApplicationDefined; + +static NSPeriodicMask: NSEventMask = NSEventMaskPeriodic; + +static NSCursorUpdateMask: NSEventMask = NSEventMaskCursorUpdate; + +static NSScrollWheelMask: NSEventMask = NSEventMaskScrollWheel; + +static NSTabletPointMask: NSEventMask = NSEventMaskTabletPoint; + +static NSTabletProximityMask: NSEventMask = NSEventMaskTabletProximity; + +static NSOtherMouseDownMask: NSEventMask = NSEventMaskOtherMouseDown; + +static NSOtherMouseUpMask: NSEventMask = NSEventMaskOtherMouseUp; + +static NSOtherMouseDraggedMask: NSEventMask = NSEventMaskOtherMouseDragged; + +static NSAnyEventMask: NSEventMask = todo; + pub type NSEventModifierFlags = NSUInteger; pub const NSEventModifierFlagCapsLock: NSEventModifierFlags = 1 << 16; pub const NSEventModifierFlagShift: NSEventModifierFlags = 1 << 17; @@ -88,17 +182,50 @@ pub const NSEventModifierFlagHelp: NSEventModifierFlags = 1 << 22; pub const NSEventModifierFlagFunction: NSEventModifierFlags = 1 << 23; pub const NSEventModifierFlagDeviceIndependentFlagsMask: NSEventModifierFlags = 0xffff0000; +static NSAlphaShiftKeyMask: NSEventModifierFlags = NSEventModifierFlagCapsLock; + +static NSShiftKeyMask: NSEventModifierFlags = NSEventModifierFlagShift; + +static NSControlKeyMask: NSEventModifierFlags = NSEventModifierFlagControl; + +static NSAlternateKeyMask: NSEventModifierFlags = NSEventModifierFlagOption; + +static NSCommandKeyMask: NSEventModifierFlags = NSEventModifierFlagCommand; + +static NSNumericPadKeyMask: NSEventModifierFlags = NSEventModifierFlagNumericPad; + +static NSHelpKeyMask: NSEventModifierFlags = NSEventModifierFlagHelp; + +static NSFunctionKeyMask: NSEventModifierFlags = NSEventModifierFlagFunction; + +static NSDeviceIndependentModifierFlagsMask: NSEventModifierFlags = + NSEventModifierFlagDeviceIndependentFlagsMask; + pub type NSPointingDeviceType = NSUInteger; pub const NSPointingDeviceTypeUnknown: NSPointingDeviceType = 0; pub const NSPointingDeviceTypePen: NSPointingDeviceType = 1; pub const NSPointingDeviceTypeCursor: NSPointingDeviceType = 2; pub const NSPointingDeviceTypeEraser: NSPointingDeviceType = 3; +static NSUnknownPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeUnknown; + +static NSPenPointingDevice: NSPointingDeviceType = NSPointingDeviceTypePen; + +static NSCursorPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeCursor; + +static NSEraserPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeEraser; + pub type NSEventButtonMask = NSUInteger; pub const NSEventButtonMaskPenTip: NSEventButtonMask = 1; pub const NSEventButtonMaskPenLowerSide: NSEventButtonMask = 2; pub const NSEventButtonMaskPenUpperSide: NSEventButtonMask = 4; +static NSPenTipMask: NSEventButtonMask = NSEventButtonMaskPenTip; + +static NSPenLowerSideMask: NSEventButtonMask = NSEventButtonMaskPenLowerSide; + +static NSPenUpperSideMask: NSEventButtonMask = NSEventButtonMaskPenUpperSide; + pub type NSEventPhase = NSUInteger; pub const NSEventPhaseNone: NSEventPhase = 0; pub const NSEventPhaseBegan: NSEventPhase = 0x1 << 0; @@ -129,6 +256,28 @@ pub const NSEventSubtypeTabletPoint: NSEventSubtype = 1; pub const NSEventSubtypeTabletProximity: NSEventSubtype = 2; pub const NSEventSubtypeTouch: NSEventSubtype = 3; +static NSWindowExposedEventType: NSEventSubtype = NSEventSubtypeWindowExposed; + +static NSApplicationActivatedEventType: NSEventSubtype = NSEventSubtypeApplicationActivated; + +static NSApplicationDeactivatedEventType: NSEventSubtype = NSEventSubtypeApplicationDeactivated; + +static NSWindowMovedEventType: NSEventSubtype = NSEventSubtypeWindowMoved; + +static NSScreenChangedEventType: NSEventSubtype = NSEventSubtypeScreenChanged; + +static NSAWTEventType: NSEventSubtype = 16; + +static NSPowerOffEventType: NSEventSubtype = NSEventSubtypePowerOff; + +static NSMouseEventSubtype: NSEventSubtype = NSEventSubtypeMouseEvent; + +static NSTabletPointEventSubtype: NSEventSubtype = NSEventSubtypeTabletPoint; + +static NSTabletProximityEventSubtype: NSEventSubtype = NSEventSubtypeTabletProximity; + +static NSTouchEventSubtype: NSEventSubtype = NSEventSubtypeTouch; + pub type NSPressureBehavior = NSInteger; pub const NSPressureBehaviorUnknown: NSPressureBehavior = -1; pub const NSPressureBehaviorPrimaryDefault: NSPressureBehavior = 0; diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 6cbca8306..ec0d17567 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSFontIdentityMatrix: NonNull; +} + extern_class!( #[derive(Debug)] pub struct NSFont; @@ -214,6 +218,14 @@ extern_methods!( } ); +extern "C" { + static NSAntialiasThresholdChangedNotification: &'static NSNotificationName; +} + +extern "C" { + static NSFontSetChangedNotification: &'static NSNotificationName; +} + pub const NSControlGlyph: i32 = 0x00FFFFFF; pub const NSNullGlyph: i32 = 0x0; diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index acedd0826..946e845dc 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/NSFontCollection.rs @@ -12,6 +12,18 @@ pub const NSFontCollectionVisibilityComputer: NSFontCollectionVisibility = (1 << pub type NSFontCollectionMatchingOptionKey = NSString; +extern "C" { + static NSFontCollectionIncludeDisabledFontsOption: &'static NSFontCollectionMatchingOptionKey; +} + +extern "C" { + static NSFontCollectionRemoveDuplicatesOption: &'static NSFontCollectionMatchingOptionKey; +} + +extern "C" { + static NSFontCollectionDisallowAutoActivationOption: &'static NSFontCollectionMatchingOptionKey; +} + pub type NSFontCollectionName = NSString; extern_class!( @@ -164,6 +176,54 @@ extern_methods!( } ); +extern "C" { + static NSFontCollectionDidChangeNotification: &'static NSNotificationName; +} + pub type NSFontCollectionUserInfoKey = NSString; +extern "C" { + static NSFontCollectionActionKey: &'static NSFontCollectionUserInfoKey; +} + +extern "C" { + static NSFontCollectionNameKey: &'static NSFontCollectionUserInfoKey; +} + +extern "C" { + static NSFontCollectionOldNameKey: &'static NSFontCollectionUserInfoKey; +} + +extern "C" { + static NSFontCollectionVisibilityKey: &'static NSFontCollectionUserInfoKey; +} + pub type NSFontCollectionActionTypeKey = NSString; + +extern "C" { + static NSFontCollectionWasShown: &'static NSFontCollectionActionTypeKey; +} + +extern "C" { + static NSFontCollectionWasHidden: &'static NSFontCollectionActionTypeKey; +} + +extern "C" { + static NSFontCollectionWasRenamed: &'static NSFontCollectionActionTypeKey; +} + +extern "C" { + static NSFontCollectionAllFonts: &'static NSFontCollectionName; +} + +extern "C" { + static NSFontCollectionUser: &'static NSFontCollectionName; +} + +extern "C" { + static NSFontCollectionFavorites: &'static NSFontCollectionName; +} + +extern "C" { + static NSFontCollectionRecentlyUsed: &'static NSFontCollectionName; +} diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 8c63ce0de..79c817627 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -164,6 +164,194 @@ extern_methods!( } ); +extern "C" { + static NSFontFamilyAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontNameAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontFaceAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontSizeAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontVisibleNameAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontMatrixAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontVariationAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontCharacterSetAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontCascadeListAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontTraitsAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontFixedAdvanceAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontFeatureSettingsAttribute: &'static NSFontDescriptorAttributeName; +} + +extern "C" { + static NSFontSymbolicTrait: &'static NSFontDescriptorTraitKey; +} + +extern "C" { + static NSFontWeightTrait: &'static NSFontDescriptorTraitKey; +} + +extern "C" { + static NSFontWidthTrait: &'static NSFontDescriptorTraitKey; +} + +extern "C" { + static NSFontSlantTrait: &'static NSFontDescriptorTraitKey; +} + +extern "C" { + static NSFontVariationAxisIdentifierKey: &'static NSFontDescriptorVariationKey; +} + +extern "C" { + static NSFontVariationAxisMinimumValueKey: &'static NSFontDescriptorVariationKey; +} + +extern "C" { + static NSFontVariationAxisMaximumValueKey: &'static NSFontDescriptorVariationKey; +} + +extern "C" { + static NSFontVariationAxisDefaultValueKey: &'static NSFontDescriptorVariationKey; +} + +extern "C" { + static NSFontVariationAxisNameKey: &'static NSFontDescriptorVariationKey; +} + +extern "C" { + static NSFontFeatureTypeIdentifierKey: &'static NSFontDescriptorFeatureKey; +} + +extern "C" { + static NSFontFeatureSelectorIdentifierKey: &'static NSFontDescriptorFeatureKey; +} + +extern "C" { + static NSFontWeightUltraLight: NSFontWeight; +} + +extern "C" { + static NSFontWeightThin: NSFontWeight; +} + +extern "C" { + static NSFontWeightLight: NSFontWeight; +} + +extern "C" { + static NSFontWeightRegular: NSFontWeight; +} + +extern "C" { + static NSFontWeightMedium: NSFontWeight; +} + +extern "C" { + static NSFontWeightSemibold: NSFontWeight; +} + +extern "C" { + static NSFontWeightBold: NSFontWeight; +} + +extern "C" { + static NSFontWeightHeavy: NSFontWeight; +} + +extern "C" { + static NSFontWeightBlack: NSFontWeight; +} + +extern "C" { + static NSFontDescriptorSystemDesignDefault: &'static NSFontDescriptorSystemDesign; +} + +extern "C" { + static NSFontDescriptorSystemDesignSerif: &'static NSFontDescriptorSystemDesign; +} + +extern "C" { + static NSFontDescriptorSystemDesignMonospaced: &'static NSFontDescriptorSystemDesign; +} + +extern "C" { + static NSFontDescriptorSystemDesignRounded: &'static NSFontDescriptorSystemDesign; +} + +extern "C" { + static NSFontTextStyleLargeTitle: &'static NSFontTextStyle; +} + +extern "C" { + static NSFontTextStyleTitle1: &'static NSFontTextStyle; +} + +extern "C" { + static NSFontTextStyleTitle2: &'static NSFontTextStyle; +} + +extern "C" { + static NSFontTextStyleTitle3: &'static NSFontTextStyle; +} + +extern "C" { + static NSFontTextStyleHeadline: &'static NSFontTextStyle; +} + +extern "C" { + static NSFontTextStyleSubheadline: &'static NSFontTextStyle; +} + +extern "C" { + static NSFontTextStyleBody: &'static NSFontTextStyle; +} + +extern "C" { + static NSFontTextStyleCallout: &'static NSFontTextStyle; +} + +extern "C" { + static NSFontTextStyleFootnote: &'static NSFontTextStyle; +} + +extern "C" { + static NSFontTextStyleCaption1: &'static NSFontTextStyle; +} + +extern "C" { + static NSFontTextStyleCaption2: &'static NSFontTextStyle; +} + pub type NSFontFamilyClass = u32; pub const NSFontUnknownClass: i32 = 0 << 28; @@ -188,6 +376,10 @@ pub const NSFontMonoSpaceTrait: i32 = (1 << 10); pub const NSFontVerticalTrait: i32 = (1 << 11); pub const NSFontUIOptimizedTrait: i32 = (1 << 12); +extern "C" { + static NSFontColorAttribute: &'static NSString; +} + extern_methods!( /// NSFontDescriptor_TextStyles unsafe impl NSFontDescriptor { diff --git a/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs index 0da298619..51756f6fa 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphics.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphics.rs @@ -36,6 +36,64 @@ pub const NSCompositingOperationSaturation: NSCompositingOperation = 26; pub const NSCompositingOperationColor: NSCompositingOperation = 27; pub const NSCompositingOperationLuminosity: NSCompositingOperation = 28; +static NSCompositeClear: NSCompositingOperation = NSCompositingOperationClear; + +static NSCompositeCopy: NSCompositingOperation = NSCompositingOperationCopy; + +static NSCompositeSourceOver: NSCompositingOperation = NSCompositingOperationSourceOver; + +static NSCompositeSourceIn: NSCompositingOperation = NSCompositingOperationSourceIn; + +static NSCompositeSourceOut: NSCompositingOperation = NSCompositingOperationSourceOut; + +static NSCompositeSourceAtop: NSCompositingOperation = NSCompositingOperationSourceAtop; + +static NSCompositeDestinationOver: NSCompositingOperation = NSCompositingOperationDestinationOver; + +static NSCompositeDestinationIn: NSCompositingOperation = NSCompositingOperationDestinationIn; + +static NSCompositeDestinationOut: NSCompositingOperation = NSCompositingOperationDestinationOut; + +static NSCompositeDestinationAtop: NSCompositingOperation = NSCompositingOperationDestinationAtop; + +static NSCompositeXOR: NSCompositingOperation = NSCompositingOperationXOR; + +static NSCompositePlusDarker: NSCompositingOperation = NSCompositingOperationPlusDarker; + +static NSCompositeHighlight: NSCompositingOperation = NSCompositingOperationHighlight; + +static NSCompositePlusLighter: NSCompositingOperation = NSCompositingOperationPlusLighter; + +static NSCompositeMultiply: NSCompositingOperation = NSCompositingOperationMultiply; + +static NSCompositeScreen: NSCompositingOperation = NSCompositingOperationScreen; + +static NSCompositeOverlay: NSCompositingOperation = NSCompositingOperationOverlay; + +static NSCompositeDarken: NSCompositingOperation = NSCompositingOperationDarken; + +static NSCompositeLighten: NSCompositingOperation = NSCompositingOperationLighten; + +static NSCompositeColorDodge: NSCompositingOperation = NSCompositingOperationColorDodge; + +static NSCompositeColorBurn: NSCompositingOperation = NSCompositingOperationColorBurn; + +static NSCompositeSoftLight: NSCompositingOperation = NSCompositingOperationSoftLight; + +static NSCompositeHardLight: NSCompositingOperation = NSCompositingOperationHardLight; + +static NSCompositeDifference: NSCompositingOperation = NSCompositingOperationDifference; + +static NSCompositeExclusion: NSCompositingOperation = NSCompositingOperationExclusion; + +static NSCompositeHue: NSCompositingOperation = NSCompositingOperationHue; + +static NSCompositeSaturation: NSCompositingOperation = NSCompositingOperationSaturation; + +static NSCompositeColor: NSCompositingOperation = NSCompositingOperationColor; + +static NSCompositeLuminosity: NSCompositingOperation = NSCompositingOperationLuminosity; + pub type NSBackingStoreType = NSUInteger; pub const NSBackingStoreRetained: NSBackingStoreType = 0; pub const NSBackingStoreNonretained: NSBackingStoreType = 1; @@ -65,17 +123,97 @@ pub const NSColorRenderingIntentSaturation: NSColorRenderingIntent = 4; pub type NSColorSpaceName = NSString; +extern "C" { + static NSCalibratedWhiteColorSpace: &'static NSColorSpaceName; +} + +extern "C" { + static NSCalibratedRGBColorSpace: &'static NSColorSpaceName; +} + +extern "C" { + static NSDeviceWhiteColorSpace: &'static NSColorSpaceName; +} + +extern "C" { + static NSDeviceRGBColorSpace: &'static NSColorSpaceName; +} + +extern "C" { + static NSDeviceCMYKColorSpace: &'static NSColorSpaceName; +} + +extern "C" { + static NSNamedColorSpace: &'static NSColorSpaceName; +} + +extern "C" { + static NSPatternColorSpace: &'static NSColorSpaceName; +} + +extern "C" { + static NSCustomColorSpace: &'static NSColorSpaceName; +} + +extern "C" { + static NSCalibratedBlackColorSpace: &'static NSColorSpaceName; +} + +extern "C" { + static NSDeviceBlackColorSpace: &'static NSColorSpaceName; +} + pub type NSWindowDepth = i32; pub const NSWindowDepthTwentyfourBitRGB: NSWindowDepth = 0x208; pub const NSWindowDepthSixtyfourBitRGB: NSWindowDepth = 0x210; pub const NSWindowDepthOnehundredtwentyeightBitRGB: NSWindowDepth = 0x220; +extern "C" { + static NSWhite: CGFloat; +} + +extern "C" { + static NSLightGray: CGFloat; +} + +extern "C" { + static NSDarkGray: CGFloat; +} + +extern "C" { + static NSBlack: CGFloat; +} + pub type NSDisplayGamut = NSInteger; pub const NSDisplayGamutSRGB: NSDisplayGamut = 1; pub const NSDisplayGamutP3: NSDisplayGamut = 2; pub type NSDeviceDescriptionKey = NSString; +extern "C" { + static NSDeviceResolution: &'static NSDeviceDescriptionKey; +} + +extern "C" { + static NSDeviceColorSpaceName: &'static NSDeviceDescriptionKey; +} + +extern "C" { + static NSDeviceBitsPerSample: &'static NSDeviceDescriptionKey; +} + +extern "C" { + static NSDeviceIsScreen: &'static NSDeviceDescriptionKey; +} + +extern "C" { + static NSDeviceIsPrinter: &'static NSDeviceDescriptionKey; +} + +extern "C" { + static NSDeviceSize: &'static NSDeviceDescriptionKey; +} + pub type NSAnimationEffect = NSUInteger; pub const NSAnimationEffectDisappearingItemDefault: NSAnimationEffect = 0; pub const NSAnimationEffectPoof: NSAnimationEffect = 10; diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index e48d6e37a..313184a70 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -7,8 +7,25 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSGraphicsContextAttributeKey = NSString; +extern "C" { + static NSGraphicsContextDestinationAttributeName: &'static NSGraphicsContextAttributeKey; +} + +extern "C" { + static NSGraphicsContextRepresentationFormatAttributeName: + &'static NSGraphicsContextAttributeKey; +} + pub type NSGraphicsContextRepresentationFormatName = NSString; +extern "C" { + static NSGraphicsContextPSFormat: &'static NSGraphicsContextRepresentationFormatName; +} + +extern "C" { + static NSGraphicsContextPDFFormat: &'static NSGraphicsContextRepresentationFormatName; +} + pub type NSImageInterpolation = NSUInteger; pub const NSImageInterpolationDefault: NSImageInterpolation = 0; pub const NSImageInterpolationNone: NSImageInterpolation = 1; diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index 75d8a6dd3..8eca28713 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -21,6 +21,10 @@ pub const NSGridRowAlignmentNone: NSGridRowAlignment = 1; pub const NSGridRowAlignmentFirstBaseline: NSGridRowAlignment = 2; pub const NSGridRowAlignmentLastBaseline: NSGridRowAlignment = 3; +extern "C" { + static NSGridViewSizeForContent: CGFloat; +} + extern_class!( #[derive(Debug)] pub struct NSGridView; diff --git a/crates/icrate/src/generated/AppKit/NSHelpManager.rs b/crates/icrate/src/generated/AppKit/NSHelpManager.rs index 55ee6e43c..4ac8757d3 100644 --- a/crates/icrate/src/generated/AppKit/NSHelpManager.rs +++ b/crates/icrate/src/generated/AppKit/NSHelpManager.rs @@ -69,6 +69,14 @@ extern_methods!( } ); +extern "C" { + static NSContextHelpModeDidActivateNotification: &'static NSNotificationName; +} + +extern "C" { + static NSContextHelpModeDidDeactivateNotification: &'static NSNotificationName; +} + extern_methods!( /// NSBundleHelpExtension unsafe impl NSBundle { diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index 088a0bcb8..a5b541988 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -7,6 +7,18 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSImageName = NSString; +extern "C" { + static NSImageHintCTM: &'static NSImageHintKey; +} + +extern "C" { + static NSImageHintInterpolation: &'static NSImageHintKey; +} + +extern "C" { + static NSImageHintUserInterfaceLayoutDirection: &'static NSImageHintKey; +} + pub type NSImageLoadStatus = NSUInteger; pub const NSImageLoadStatusCompleted: NSImageLoadStatus = 0; pub const NSImageLoadStatusCancelled: NSImageLoadStatus = 1; @@ -436,6 +448,562 @@ extern_methods!( } ); +extern "C" { + static NSImageNameAddTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameBluetoothTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameBonjour: &'static NSImageName; +} + +extern "C" { + static NSImageNameBookmarksTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameCaution: &'static NSImageName; +} + +extern "C" { + static NSImageNameComputer: &'static NSImageName; +} + +extern "C" { + static NSImageNameEnterFullScreenTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameExitFullScreenTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameFolder: &'static NSImageName; +} + +extern "C" { + static NSImageNameFolderBurnable: &'static NSImageName; +} + +extern "C" { + static NSImageNameFolderSmart: &'static NSImageName; +} + +extern "C" { + static NSImageNameFollowLinkFreestandingTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameHomeTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameIChatTheaterTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameLockLockedTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameLockUnlockedTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameNetwork: &'static NSImageName; +} + +extern "C" { + static NSImageNamePathTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameQuickLookTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameRefreshFreestandingTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameRefreshTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameRemoveTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameRevealFreestandingTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameShareTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameSlideshowTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameStatusAvailable: &'static NSImageName; +} + +extern "C" { + static NSImageNameStatusNone: &'static NSImageName; +} + +extern "C" { + static NSImageNameStatusPartiallyAvailable: &'static NSImageName; +} + +extern "C" { + static NSImageNameStatusUnavailable: &'static NSImageName; +} + +extern "C" { + static NSImageNameStopProgressFreestandingTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameStopProgressTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTrashEmpty: &'static NSImageName; +} + +extern "C" { + static NSImageNameTrashFull: &'static NSImageName; +} + +extern "C" { + static NSImageNameActionTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameSmartBadgeTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameIconViewTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameListViewTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameColumnViewTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameFlowViewTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameInvalidDataFreestandingTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameGoForwardTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameGoBackTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameGoRightTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameGoLeftTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameRightFacingTriangleTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameLeftFacingTriangleTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameDotMac: &'static NSImageName; +} + +extern "C" { + static NSImageNameMobileMe: &'static NSImageName; +} + +extern "C" { + static NSImageNameMultipleDocuments: &'static NSImageName; +} + +extern "C" { + static NSImageNameUserAccounts: &'static NSImageName; +} + +extern "C" { + static NSImageNamePreferencesGeneral: &'static NSImageName; +} + +extern "C" { + static NSImageNameAdvanced: &'static NSImageName; +} + +extern "C" { + static NSImageNameInfo: &'static NSImageName; +} + +extern "C" { + static NSImageNameFontPanel: &'static NSImageName; +} + +extern "C" { + static NSImageNameColorPanel: &'static NSImageName; +} + +extern "C" { + static NSImageNameUser: &'static NSImageName; +} + +extern "C" { + static NSImageNameUserGroup: &'static NSImageName; +} + +extern "C" { + static NSImageNameEveryone: &'static NSImageName; +} + +extern "C" { + static NSImageNameUserGuest: &'static NSImageName; +} + +extern "C" { + static NSImageNameMenuOnStateTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameMenuMixedStateTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameApplicationIcon: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarAddDetailTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarAddTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarAlarmTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarAudioInputMuteTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarAudioInputTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarAudioOutputMuteTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarAudioOutputVolumeHighTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarAudioOutputVolumeLowTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarAudioOutputVolumeMediumTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarAudioOutputVolumeOffTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarBookmarksTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarColorPickerFill: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarColorPickerFont: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarColorPickerStroke: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarCommunicationAudioTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarCommunicationVideoTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarComposeTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarDeleteTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarDownloadTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarEnterFullScreenTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarExitFullScreenTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarFastForwardTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarFolderCopyToTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarFolderMoveToTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarFolderTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarGetInfoTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarGoBackTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarGoDownTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarGoForwardTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarGoUpTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarHistoryTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarIconViewTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarListViewTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarMailTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarNewFolderTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarNewMessageTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarOpenInBrowserTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarPauseTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarPlayPauseTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarPlayTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarQuickLookTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarRecordStartTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarRecordStopTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarRefreshTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarRemoveTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarRewindTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarRotateLeftTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarRotateRightTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSearchTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarShareTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSidebarTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSkipAhead15SecondsTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSkipAhead30SecondsTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSkipAheadTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSkipBack15SecondsTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSkipBack30SecondsTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSkipBackTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSkipToEndTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSkipToStartTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarSlideshowTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTagIconTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTextBoldTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTextBoxTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTextCenterAlignTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTextItalicTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTextJustifiedAlignTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTextLeftAlignTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTextListTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTextRightAlignTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTextStrikethroughTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarTextUnderlineTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarUserAddTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarUserGroupTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarUserTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarVolumeDownTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarVolumeUpTemplate: &'static NSImageName; +} + +extern "C" { + static NSImageNameTouchBarPlayheadTemplate: &'static NSImageName; +} + pub type NSImageSymbolScale = NSInteger; pub const NSImageSymbolScaleSmall: NSImageSymbolScale = 1; pub const NSImageSymbolScaleMedium: NSImageSymbolScale = 2; diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index 6af78cd63..451998a75 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -181,3 +181,7 @@ extern_methods!( ) -> CGImageRef; } ); + +extern "C" { + static NSImageRepRegistryDidChangeNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs index 804f4a3ae..7e8ba3361 100644 --- a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -22,3 +22,7 @@ extern_methods!( pub unsafe fn setInterfaceStyle(&self, interfaceStyle: NSInterfaceStyle); } ); + +extern "C" { + static NSInterfaceStyleDefault: Option<&'static NSString>; +} diff --git a/crates/icrate/src/generated/AppKit/NSItemProvider.rs b/crates/icrate/src/generated/AppKit/NSItemProvider.rs index 85621e0ec..cc651a191 100644 --- a/crates/icrate/src/generated/AppKit/NSItemProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSItemProvider.rs @@ -18,3 +18,19 @@ extern_methods!( pub unsafe fn preferredPresentationSize(&self) -> NSSize; } ); + +extern "C" { + static NSTypeIdentifierDateText: &'static NSString; +} + +extern "C" { + static NSTypeIdentifierAddressText: &'static NSString; +} + +extern "C" { + static NSTypeIdentifierPhoneNumberText: &'static NSString; +} + +extern "C" { + static NSTypeIdentifierTransitInformationText: &'static NSString; +} diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index 7ce11e789..36c7c637c 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -49,8 +49,32 @@ extern_methods!( } ); +extern "C" { + static NSMultipleValuesMarker: &'static Object; +} + +extern "C" { + static NSNoSelectionMarker: &'static Object; +} + +extern "C" { + static NSNotApplicableMarker: &'static Object; +} + pub type NSBindingInfoKey = NSString; +extern "C" { + static NSObservedObjectKey: &'static NSBindingInfoKey; +} + +extern "C" { + static NSObservedKeyPathKey: &'static NSBindingInfoKey; +} + +extern "C" { + static NSOptionsKey: &'static NSBindingInfoKey; +} + extern_methods!( /// NSKeyValueBindingCreation unsafe impl NSObject { @@ -144,6 +168,426 @@ extern_methods!( } ); +extern "C" { + static NSAlignmentBinding: &'static NSBindingName; +} + +extern "C" { + static NSAlternateImageBinding: &'static NSBindingName; +} + +extern "C" { + static NSAlternateTitleBinding: &'static NSBindingName; +} + +extern "C" { + static NSAnimateBinding: &'static NSBindingName; +} + +extern "C" { + static NSAnimationDelayBinding: &'static NSBindingName; +} + +extern "C" { + static NSArgumentBinding: &'static NSBindingName; +} + +extern "C" { + static NSAttributedStringBinding: &'static NSBindingName; +} + +extern "C" { + static NSContentArrayBinding: &'static NSBindingName; +} + +extern "C" { + static NSContentArrayForMultipleSelectionBinding: &'static NSBindingName; +} + +extern "C" { + static NSContentBinding: &'static NSBindingName; +} + +extern "C" { + static NSContentDictionaryBinding: &'static NSBindingName; +} + +extern "C" { + static NSContentHeightBinding: &'static NSBindingName; +} + +extern "C" { + static NSContentObjectBinding: &'static NSBindingName; +} + +extern "C" { + static NSContentObjectsBinding: &'static NSBindingName; +} + +extern "C" { + static NSContentSetBinding: &'static NSBindingName; +} + +extern "C" { + static NSContentValuesBinding: &'static NSBindingName; +} + +extern "C" { + static NSContentWidthBinding: &'static NSBindingName; +} + +extern "C" { + static NSCriticalValueBinding: &'static NSBindingName; +} + +extern "C" { + static NSDataBinding: &'static NSBindingName; +} + +extern "C" { + static NSDisplayPatternTitleBinding: &'static NSBindingName; +} + +extern "C" { + static NSDisplayPatternValueBinding: &'static NSBindingName; +} + +extern "C" { + static NSDocumentEditedBinding: &'static NSBindingName; +} + +extern "C" { + static NSDoubleClickArgumentBinding: &'static NSBindingName; +} + +extern "C" { + static NSDoubleClickTargetBinding: &'static NSBindingName; +} + +extern "C" { + static NSEditableBinding: &'static NSBindingName; +} + +extern "C" { + static NSEnabledBinding: &'static NSBindingName; +} + +extern "C" { + static NSExcludedKeysBinding: &'static NSBindingName; +} + +extern "C" { + static NSFilterPredicateBinding: &'static NSBindingName; +} + +extern "C" { + static NSFontBinding: &'static NSBindingName; +} + +extern "C" { + static NSFontBoldBinding: &'static NSBindingName; +} + +extern "C" { + static NSFontFamilyNameBinding: &'static NSBindingName; +} + +extern "C" { + static NSFontItalicBinding: &'static NSBindingName; +} + +extern "C" { + static NSFontNameBinding: &'static NSBindingName; +} + +extern "C" { + static NSFontSizeBinding: &'static NSBindingName; +} + +extern "C" { + static NSHeaderTitleBinding: &'static NSBindingName; +} + +extern "C" { + static NSHiddenBinding: &'static NSBindingName; +} + +extern "C" { + static NSImageBinding: &'static NSBindingName; +} + +extern "C" { + static NSIncludedKeysBinding: &'static NSBindingName; +} + +extern "C" { + static NSInitialKeyBinding: &'static NSBindingName; +} + +extern "C" { + static NSInitialValueBinding: &'static NSBindingName; +} + +extern "C" { + static NSIsIndeterminateBinding: &'static NSBindingName; +} + +extern "C" { + static NSLabelBinding: &'static NSBindingName; +} + +extern "C" { + static NSLocalizedKeyDictionaryBinding: &'static NSBindingName; +} + +extern "C" { + static NSManagedObjectContextBinding: &'static NSBindingName; +} + +extern "C" { + static NSMaximumRecentsBinding: &'static NSBindingName; +} + +extern "C" { + static NSMaxValueBinding: &'static NSBindingName; +} + +extern "C" { + static NSMaxWidthBinding: &'static NSBindingName; +} + +extern "C" { + static NSMinValueBinding: &'static NSBindingName; +} + +extern "C" { + static NSMinWidthBinding: &'static NSBindingName; +} + +extern "C" { + static NSMixedStateImageBinding: &'static NSBindingName; +} + +extern "C" { + static NSOffStateImageBinding: &'static NSBindingName; +} + +extern "C" { + static NSOnStateImageBinding: &'static NSBindingName; +} + +extern "C" { + static NSPositioningRectBinding: &'static NSBindingName; +} + +extern "C" { + static NSPredicateBinding: &'static NSBindingName; +} + +extern "C" { + static NSRecentSearchesBinding: &'static NSBindingName; +} + +extern "C" { + static NSRepresentedFilenameBinding: &'static NSBindingName; +} + +extern "C" { + static NSRowHeightBinding: &'static NSBindingName; +} + +extern "C" { + static NSSelectedIdentifierBinding: &'static NSBindingName; +} + +extern "C" { + static NSSelectedIndexBinding: &'static NSBindingName; +} + +extern "C" { + static NSSelectedLabelBinding: &'static NSBindingName; +} + +extern "C" { + static NSSelectedObjectBinding: &'static NSBindingName; +} + +extern "C" { + static NSSelectedObjectsBinding: &'static NSBindingName; +} + +extern "C" { + static NSSelectedTagBinding: &'static NSBindingName; +} + +extern "C" { + static NSSelectedValueBinding: &'static NSBindingName; +} + +extern "C" { + static NSSelectedValuesBinding: &'static NSBindingName; +} + +extern "C" { + static NSSelectionIndexesBinding: &'static NSBindingName; +} + +extern "C" { + static NSSelectionIndexPathsBinding: &'static NSBindingName; +} + +extern "C" { + static NSSortDescriptorsBinding: &'static NSBindingName; +} + +extern "C" { + static NSTargetBinding: &'static NSBindingName; +} + +extern "C" { + static NSTextColorBinding: &'static NSBindingName; +} + +extern "C" { + static NSTitleBinding: &'static NSBindingName; +} + +extern "C" { + static NSToolTipBinding: &'static NSBindingName; +} + +extern "C" { + static NSTransparentBinding: &'static NSBindingName; +} + +extern "C" { + static NSValueBinding: &'static NSBindingName; +} + +extern "C" { + static NSValuePathBinding: &'static NSBindingName; +} + +extern "C" { + static NSValueURLBinding: &'static NSBindingName; +} + +extern "C" { + static NSVisibleBinding: &'static NSBindingName; +} + +extern "C" { + static NSWarningValueBinding: &'static NSBindingName; +} + +extern "C" { + static NSWidthBinding: &'static NSBindingName; +} + +extern "C" { + static NSAllowsEditingMultipleValuesSelectionBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSAllowsNullArgumentBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSAlwaysPresentsApplicationModalAlertsBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSConditionallySetsEditableBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSConditionallySetsEnabledBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSConditionallySetsHiddenBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSContinuouslyUpdatesValueBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSCreatesSortDescriptorBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSDeletesObjectsOnRemoveBindingsOption: &'static NSBindingOption; +} + +extern "C" { + static NSDisplayNameBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSDisplayPatternBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSContentPlacementTagBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSHandlesContentAsCompoundValueBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSInsertsNullPlaceholderBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSInvokesSeparatelyWithArrayObjectsBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSMultipleValuesPlaceholderBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSNoSelectionPlaceholderBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSNotApplicablePlaceholderBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSNullPlaceholderBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSRaisesForNotApplicableKeysBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSPredicateFormatBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSSelectorNameBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSSelectsAllWhenSettingContentBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSValidatesImmediatelyBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSValueTransformerNameBindingOption: &'static NSBindingOption; +} + +extern "C" { + static NSValueTransformerBindingOption: &'static NSBindingOption; +} + extern_methods!( /// NSEditorAndEditorRegistrationConformance unsafe impl NSManagedObjectContext {} diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index 69f5706c9..7648e8d4b 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -5,6 +5,20 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSLayoutPriorityRequired: NSLayoutPriority = 1000; + +static NSLayoutPriorityDefaultHigh: NSLayoutPriority = 750; + +static NSLayoutPriorityDragThatCanResizeWindow: NSLayoutPriority = 510; + +static NSLayoutPriorityWindowSizeStayPut: NSLayoutPriority = 500; + +static NSLayoutPriorityDragThatCannotResizeWindow: NSLayoutPriority = 490; + +static NSLayoutPriorityDefaultLow: NSLayoutPriority = 250; + +static NSLayoutPriorityFittingSizeCompression: NSLayoutPriority = 50; + pub type NSLayoutConstraintOrientation = NSInteger; pub const NSLayoutConstraintOrientationHorizontal: NSLayoutConstraintOrientation = 0; pub const NSLayoutConstraintOrientationVertical: NSLayoutConstraintOrientation = 1; @@ -253,6 +267,14 @@ extern_methods!( } ); +extern "C" { + static NSViewNoInstrinsicMetric: CGFloat; +} + +extern "C" { + static NSViewNoIntrinsicMetric: CGFloat; +} + extern_methods!( /// NSConstraintBasedLayoutLayering unsafe impl NSView { diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs index 8c1f6b1d1..6b776b43d 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -83,3 +83,13 @@ extern_methods!( pub unsafe fn tickMarkValueAtIndex(&self, index: NSInteger) -> c_double; } ); + +static NSRelevancyLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleRelevancy; + +static NSContinuousCapacityLevelIndicatorStyle: NSLevelIndicatorStyle = + NSLevelIndicatorStyleContinuousCapacity; + +static NSDiscreteCapacityLevelIndicatorStyle: NSLevelIndicatorStyle = + NSLevelIndicatorStyleDiscreteCapacity; + +static NSRatingLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleRating; diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 1db1c3719..a12497e0e 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -249,6 +249,34 @@ extern_methods!( } ); +extern "C" { + static NSMenuWillSendActionNotification: &'static NSNotificationName; +} + +extern "C" { + static NSMenuDidSendActionNotification: &'static NSNotificationName; +} + +extern "C" { + static NSMenuDidAddItemNotification: &'static NSNotificationName; +} + +extern "C" { + static NSMenuDidRemoveItemNotification: &'static NSNotificationName; +} + +extern "C" { + static NSMenuDidChangeItemNotification: &'static NSNotificationName; +} + +extern "C" { + static NSMenuDidBeginTrackingNotification: &'static NSNotificationName; +} + +extern "C" { + static NSMenuDidEndTrackingNotification: &'static NSNotificationName; +} + extern_methods!( /// NSDeprecated unsafe impl NSMenu { diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs index 8c490548b..ad5533ff5 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -217,6 +217,10 @@ extern_methods!( } ); +extern "C" { + static NSMenuItemImportFromDeviceIdentifier: &'static NSUserInterfaceItemIdentifier; +} + extern_methods!( /// NSDeprecated unsafe impl NSMenuItem { diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index dc33a6df5..863458d5c 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -64,3 +64,11 @@ extern_methods!( ) -> bool; } ); + +extern "C" { + static NSNibOwner: &'static NSString; +} + +extern "C" { + static NSNibTopLevelObjects: &'static NSString; +} diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index 5865f8900..596f28d5e 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -302,3 +302,43 @@ extern_methods!( ); } ); + +static NSOpenGLCPSwapInterval: NSOpenGLContextParameter = NSOpenGLContextParameterSwapInterval; + +static NSOpenGLCPSurfaceOrder: NSOpenGLContextParameter = NSOpenGLContextParameterSurfaceOrder; + +static NSOpenGLCPSurfaceOpacity: NSOpenGLContextParameter = NSOpenGLContextParameterSurfaceOpacity; + +static NSOpenGLCPSurfaceBackingSize: NSOpenGLContextParameter = + NSOpenGLContextParameterSurfaceBackingSize; + +static NSOpenGLCPReclaimResources: NSOpenGLContextParameter = + NSOpenGLContextParameterReclaimResources; + +static NSOpenGLCPCurrentRendererID: NSOpenGLContextParameter = + NSOpenGLContextParameterCurrentRendererID; + +static NSOpenGLCPGPUVertexProcessing: NSOpenGLContextParameter = + NSOpenGLContextParameterGPUVertexProcessing; + +static NSOpenGLCPGPUFragmentProcessing: NSOpenGLContextParameter = + NSOpenGLContextParameterGPUFragmentProcessing; + +static NSOpenGLCPHasDrawable: NSOpenGLContextParameter = NSOpenGLContextParameterHasDrawable; + +static NSOpenGLCPMPSwapsInFlight: NSOpenGLContextParameter = + NSOpenGLContextParameterMPSwapsInFlight; + +static NSOpenGLCPSwapRectangle: NSOpenGLContextParameter = NSOpenGLContextParameterSwapRectangle; + +static NSOpenGLCPSwapRectangleEnable: NSOpenGLContextParameter = + NSOpenGLContextParameterSwapRectangleEnable; + +static NSOpenGLCPRasterizationEnable: NSOpenGLContextParameter = + NSOpenGLContextParameterRasterizationEnable; + +static NSOpenGLCPStateValidation: NSOpenGLContextParameter = + NSOpenGLContextParameterStateValidation; + +static NSOpenGLCPSurfaceSurfaceVolatile: NSOpenGLContextParameter = + NSOpenGLContextParameterSurfaceSurfaceVolatile; diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index 92a9f0ac3..289214fac 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -187,3 +187,43 @@ extern_methods!( pub type NSOutlineViewDataSource = NSObject; pub type NSOutlineViewDelegate = NSObject; + +extern "C" { + static NSOutlineViewDisclosureButtonKey: &'static NSUserInterfaceItemIdentifier; +} + +extern "C" { + static NSOutlineViewShowHideButtonKey: &'static NSUserInterfaceItemIdentifier; +} + +extern "C" { + static NSOutlineViewSelectionDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSOutlineViewColumnDidMoveNotification: &'static NSNotificationName; +} + +extern "C" { + static NSOutlineViewColumnDidResizeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSOutlineViewSelectionIsChangingNotification: &'static NSNotificationName; +} + +extern "C" { + static NSOutlineViewItemWillExpandNotification: &'static NSNotificationName; +} + +extern "C" { + static NSOutlineViewItemDidExpandNotification: &'static NSNotificationName; +} + +extern "C" { + static NSOutlineViewItemWillCollapseNotification: &'static NSNotificationName; +} + +extern "C" { + static NSOutlineViewItemDidCollapseNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index 7ef516845..b3f8e21a0 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -21,6 +21,10 @@ pub const NSLineBreakStrategyStandard: NSLineBreakStrategy = 0xFFFF; pub type NSTextTabOptionKey = NSString; +extern "C" { + static NSTabColumnTerminatorsAttributeName: &'static NSTextTabOptionKey; +} + extern_class!( #[derive(Debug)] pub struct NSTextTab; diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index 72e31ea0f..701068204 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -7,13 +7,105 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSPasteboardType = NSString; +extern "C" { + static NSPasteboardTypeString: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypePDF: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeTIFF: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypePNG: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeRTF: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeRTFD: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeHTML: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeTabularText: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeFont: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeRuler: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeColor: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeSound: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeMultipleTextSelection: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeTextFinderOptions: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeURL: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeFileURL: &'static NSPasteboardType; +} + pub type NSPasteboardName = NSString; +extern "C" { + static NSPasteboardNameGeneral: &'static NSPasteboardName; +} + +extern "C" { + static NSPasteboardNameFont: &'static NSPasteboardName; +} + +extern "C" { + static NSPasteboardNameRuler: &'static NSPasteboardName; +} + +extern "C" { + static NSPasteboardNameFind: &'static NSPasteboardName; +} + +extern "C" { + static NSPasteboardNameDrag: &'static NSPasteboardName; +} + pub type NSPasteboardContentsOptions = NSUInteger; pub const NSPasteboardContentsCurrentHostOnly: NSPasteboardContentsOptions = 1 << 0; pub type NSPasteboardReadingOptionKey = NSString; +extern "C" { + static NSPasteboardURLReadingFileURLsOnlyKey: &'static NSPasteboardReadingOptionKey; +} + +extern "C" { + static NSPasteboardURLReadingContentsConformToTypesKey: &'static NSPasteboardReadingOptionKey; +} + extern_class!( #[derive(Debug)] pub struct NSPasteboard; @@ -231,3 +323,103 @@ extern_methods!( pub unsafe fn readFileWrapper(&self) -> Option>; } ); + +extern "C" { + static NSFileContentsPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSStringPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSFilenamesPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSTIFFPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSRTFPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSTabularTextPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSFontPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSRulerPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSColorPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSRTFDPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSHTMLPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSURLPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSPDFPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSMultipleTextSelectionPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSPostScriptPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSVCardPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSInkTextPboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSFilesPromisePboardType: &'static NSPasteboardType; +} + +extern "C" { + static NSPasteboardTypeFindPanelSearchOptions: &'static NSPasteboardType; +} + +extern "C" { + static NSGeneralPboard: &'static NSPasteboardName; +} + +extern "C" { + static NSFontPboard: &'static NSPasteboardName; +} + +extern "C" { + static NSRulerPboard: &'static NSPasteboardName; +} + +extern "C" { + static NSFindPboard: &'static NSPasteboardName; +} + +extern "C" { + static NSDragPboard: &'static NSPasteboardName; +} + +extern "C" { + static NSPICTPboardType: &'static NSPasteboardType; +} diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs index 0740c2721..ea7a9b760 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -136,3 +136,7 @@ extern_methods!( pub unsafe fn titleOfSelectedItem(&self) -> Option>; } ); + +extern "C" { + static NSPopUpButtonWillPopUpNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index c1f5a4ee6..137ef97a9 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -168,3 +168,7 @@ extern_methods!( pub unsafe fn setArrowPosition(&self, arrowPosition: NSPopUpArrowPosition); } ); + +extern "C" { + static NSPopUpButtonCellWillPopUpNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index 15b0e8d51..32378c329 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -98,6 +98,34 @@ extern_methods!( } ); +extern "C" { + static NSPopoverCloseReasonKey: &'static NSString; +} + pub type NSPopoverCloseReasonValue = NSString; +extern "C" { + static NSPopoverCloseReasonStandard: &'static NSPopoverCloseReasonValue; +} + +extern "C" { + static NSPopoverCloseReasonDetachToWindow: &'static NSPopoverCloseReasonValue; +} + +extern "C" { + static NSPopoverWillShowNotification: &'static NSNotificationName; +} + +extern "C" { + static NSPopoverDidShowNotification: &'static NSNotificationName; +} + +extern "C" { + static NSPopoverWillCloseNotification: &'static NSNotificationName; +} + +extern "C" { + static NSPopoverDidCloseNotification: &'static NSNotificationName; +} + pub type NSPopoverDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs index 28555fc83..593cf78fc 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -16,8 +16,144 @@ pub const NSPrintingPaginationModeClip: NSPrintingPaginationMode = 2; pub type NSPrintInfoAttributeKey = NSString; +extern "C" { + static NSPrintPaperName: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintPaperSize: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintOrientation: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintScalingFactor: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintLeftMargin: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintRightMargin: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintTopMargin: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintBottomMargin: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintHorizontallyCentered: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintVerticallyCentered: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintHorizontalPagination: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintVerticalPagination: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintPrinter: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintCopies: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintAllPages: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintFirstPage: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintLastPage: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintMustCollate: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintReversePageOrder: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintJobDisposition: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintPagesAcross: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintPagesDown: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintTime: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintDetailedErrorReporting: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintFaxNumber: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintPrinterName: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintSelectionOnly: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintJobSavingURL: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintJobSavingFileNameExtensionHidden: &'static NSPrintInfoAttributeKey; +} + +extern "C" { + static NSPrintHeaderAndFooter: &'static NSPrintInfoAttributeKey; +} + pub type NSPrintJobDispositionValue = NSString; +extern "C" { + static NSPrintSpoolJob: &'static NSPrintJobDispositionValue; +} + +extern "C" { + static NSPrintPreviewJob: &'static NSPrintJobDispositionValue; +} + +extern "C" { + static NSPrintSaveJob: &'static NSPrintJobDispositionValue; +} + +extern "C" { + static NSPrintCancelJob: &'static NSPrintJobDispositionValue; +} + pub type NSPrintInfoSettingKey = NSString; extern_class!( @@ -195,6 +331,36 @@ extern_methods!( } ); +extern "C" { + static NSPrintFormName: &'static NSString; +} + +extern "C" { + static NSPrintJobFeatures: &'static NSString; +} + +extern "C" { + static NSPrintManualFeed: &'static NSString; +} + +extern "C" { + static NSPrintPagesPerSheet: &'static NSString; +} + +extern "C" { + static NSPrintPaperFeed: &'static NSString; +} + +extern "C" { + static NSPrintSavePath: &'static NSString; +} + pub type NSPrintingOrientation = NSUInteger; pub const NSPortraitOrientation: NSPrintingOrientation = 0; pub const NSLandscapeOrientation: NSPrintingOrientation = 1; + +static NSAutoPagination: NSPrintingPaginationMode = NSPrintingPaginationModeAutomatic; + +static NSFitPagination: NSPrintingPaginationMode = NSPrintingPaginationModeFit; + +static NSClipPagination: NSPrintingPaginationMode = NSPrintingPaginationModeClip; diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs index e27183c80..ca8eedc61 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -15,6 +15,10 @@ pub type NSPrintRenderingQuality = NSInteger; pub const NSPrintRenderingQualityBest: NSPrintRenderingQuality = 0; pub const NSPrintRenderingQualityResponsive: NSPrintRenderingQuality = 1; +extern "C" { + static NSPrintOperationExistsException: &'static NSExceptionName; +} + extern_class!( #[derive(Debug)] pub struct NSPrintOperation; diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index 17499ef2d..e30da3c10 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -17,8 +17,28 @@ pub const NSPrintPanelShowsPreview: NSPrintPanelOptions = 1 << 17; pub type NSPrintPanelJobStyleHint = NSString; +extern "C" { + static NSPrintPhotoJobStyleHint: &'static NSPrintPanelJobStyleHint; +} + +extern "C" { + static NSPrintAllPresetsJobStyleHint: &'static NSPrintPanelJobStyleHint; +} + +extern "C" { + static NSPrintNoPresetsJobStyleHint: &'static NSPrintPanelJobStyleHint; +} + pub type NSPrintPanelAccessorySummaryKey = NSString; +extern "C" { + static NSPrintPanelAccessorySummaryItemNameKey: &'static NSPrintPanelAccessorySummaryKey; +} + +extern "C" { + static NSPrintPanelAccessorySummaryItemDescriptionKey: &'static NSPrintPanelAccessorySummaryKey; +} + pub type NSPrintPanelAccessorizing = NSObject; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs index f7b99d107..4e28211c5 100644 --- a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs @@ -100,6 +100,11 @@ pub const NSProgressIndicatorPreferredSmallThickness: NSProgressIndicatorThickne pub const NSProgressIndicatorPreferredLargeThickness: NSProgressIndicatorThickness = 18; pub const NSProgressIndicatorPreferredAquaThickness: NSProgressIndicatorThickness = 12; +static NSProgressIndicatorBarStyle: NSProgressIndicatorStyle = NSProgressIndicatorStyleBar; + +static NSProgressIndicatorSpinningStyle: NSProgressIndicatorStyle = + NSProgressIndicatorStyleSpinning; + extern_methods!( /// NSProgressIndicatorDeprecated unsafe impl NSProgressIndicator { diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index 6302cedd3..3378747ff 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -7,6 +7,34 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSRuleEditorPredicatePartKey = NSString; +extern "C" { + static NSRuleEditorPredicateLeftExpression: &'static NSRuleEditorPredicatePartKey; +} + +extern "C" { + static NSRuleEditorPredicateRightExpression: &'static NSRuleEditorPredicatePartKey; +} + +extern "C" { + static NSRuleEditorPredicateComparisonModifier: &'static NSRuleEditorPredicatePartKey; +} + +extern "C" { + static NSRuleEditorPredicateOptions: &'static NSRuleEditorPredicatePartKey; +} + +extern "C" { + static NSRuleEditorPredicateOperatorType: &'static NSRuleEditorPredicatePartKey; +} + +extern "C" { + static NSRuleEditorPredicateCustomSelector: &'static NSRuleEditorPredicatePartKey; +} + +extern "C" { + static NSRuleEditorPredicateCompoundType: &'static NSRuleEditorPredicatePartKey; +} + pub type NSRuleEditorNestingMode = NSUInteger; pub const NSRuleEditorNestingModeSingle: NSRuleEditorNestingMode = 0; pub const NSRuleEditorNestingModeList: NSRuleEditorNestingMode = 1; @@ -184,3 +212,7 @@ extern_methods!( ); pub type NSRuleEditorDelegate = NSObject; + +extern "C" { + static NSRuleEditorRowsDidChangeNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs index f57472f9c..8f86d7d4f 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerView.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -11,6 +11,22 @@ pub const NSVerticalRuler: NSRulerOrientation = 1; pub type NSRulerViewUnitName = NSString; +extern "C" { + static NSRulerViewUnitInches: &'static NSRulerViewUnitName; +} + +extern "C" { + static NSRulerViewUnitCentimeters: &'static NSRulerViewUnitName; +} + +extern "C" { + static NSRulerViewUnitPoints: &'static NSRulerViewUnitName; +} + +extern "C" { + static NSRulerViewUnitPicas: &'static NSRulerViewUnitName; +} + extern_class!( #[derive(Debug)] pub struct NSRulerView; diff --git a/crates/icrate/src/generated/AppKit/NSScreen.rs b/crates/icrate/src/generated/AppKit/NSScreen.rs index 3acd3ce05..b2f1eca50 100644 --- a/crates/icrate/src/generated/AppKit/NSScreen.rs +++ b/crates/icrate/src/generated/AppKit/NSScreen.rs @@ -81,6 +81,10 @@ extern_methods!( } ); +extern "C" { + static NSScreenColorSpaceDidChangeNotification: &'static NSNotificationName; +} + extern_methods!( unsafe impl NSScreen { #[method(maximumExtendedDynamicRangeColorComponentValue)] diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index 2e3fe765e..31dae38e5 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -285,6 +285,26 @@ extern_methods!( } ); +extern "C" { + static NSScrollViewWillStartLiveMagnifyNotification: &'static NSNotificationName; +} + +extern "C" { + static NSScrollViewDidEndLiveMagnifyNotification: &'static NSNotificationName; +} + +extern "C" { + static NSScrollViewWillStartLiveScrollNotification: &'static NSNotificationName; +} + +extern "C" { + static NSScrollViewDidLiveScrollNotification: &'static NSNotificationName; +} + +extern "C" { + static NSScrollViewDidEndLiveScrollNotification: &'static NSNotificationName; +} + extern_methods!( /// NSRulerSupport unsafe impl NSScrollView { diff --git a/crates/icrate/src/generated/AppKit/NSScroller.rs b/crates/icrate/src/generated/AppKit/NSScroller.rs index a3410d018..21cacfd60 100644 --- a/crates/icrate/src/generated/AppKit/NSScroller.rs +++ b/crates/icrate/src/generated/AppKit/NSScroller.rs @@ -101,6 +101,10 @@ extern_methods!( } ); +extern "C" { + static NSPreferredScrollerStyleDidChangeNotification: &'static NSNotificationName; +} + pub type NSScrollArrowPosition = NSUInteger; pub const NSScrollerArrowsMaxEnd: NSScrollArrowPosition = 0; pub const NSScrollerArrowsMinEnd: NSScrollArrowPosition = 1; diff --git a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs index 5fb3a0753..6600bbeec 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs @@ -5,6 +5,14 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSSearchFieldRecentsTitleMenuItemTag: NSInteger = 1000; + +static NSSearchFieldRecentsMenuItemTag: NSInteger = 1001; + +static NSSearchFieldClearRecentsMenuItemTag: NSInteger = 1002; + +static NSSearchFieldNoRecentsMenuItemTag: NSInteger = 1003; + extern_class!( #[derive(Debug)] pub struct NSSearchFieldCell; diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index 183d94eed..a542c7e67 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -7,6 +7,86 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSSharingServiceName = NSString; +extern "C" { + static NSSharingServiceNameComposeEmail: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNameComposeMessage: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNameSendViaAirDrop: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNameAddToSafariReadingList: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNameAddToIPhoto: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNameAddToAperture: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNameUseAsDesktopPicture: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNamePostOnFacebook: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNamePostOnTwitter: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNamePostOnSinaWeibo: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNamePostOnTencentWeibo: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNamePostOnLinkedIn: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNameUseAsTwitterProfileImage: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNameUseAsFacebookProfileImage: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNameUseAsLinkedInProfileImage: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNamePostImageOnFlickr: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNamePostVideoOnVimeo: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNamePostVideoOnYouku: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNamePostVideoOnTudou: &'static NSSharingServiceName; +} + +extern "C" { + static NSSharingServiceNameCloudSharing: &'static NSSharingServiceName; +} + extern_class!( #[derive(Debug)] pub struct NSSharingService; diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index 66a9bec81..7e2d30e34 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -165,3 +165,15 @@ extern_methods!( pub unsafe fn image(&self) -> Option>; } ); + +static NSTickMarkBelow: NSTickMarkPosition = NSTickMarkPositionBelow; + +static NSTickMarkAbove: NSTickMarkPosition = NSTickMarkPositionAbove; + +static NSTickMarkLeft: NSTickMarkPosition = NSTickMarkPositionLeading; + +static NSTickMarkRight: NSTickMarkPosition = NSTickMarkPositionTrailing; + +static NSLinearSlider: NSSliderType = NSSliderTypeLinear; + +static NSCircularSlider: NSSliderType = NSSliderTypeCircular; diff --git a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs index 26aa44460..d92bc26e1 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs @@ -7,6 +7,14 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSSliderAccessoryWidth = CGFloat; +extern "C" { + static NSSliderAccessoryWidthDefault: NSSliderAccessoryWidth; +} + +extern "C" { + static NSSliderAccessoryWidthWide: NSSliderAccessoryWidth; +} + extern_class!( #[derive(Debug)] pub struct NSSliderTouchBarItem; diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs index 1783156a8..6d8cd449f 100644 --- a/crates/icrate/src/generated/AppKit/NSSound.rs +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSSoundPboardType: &'static NSPasteboardType; +} + pub type NSSoundName = NSString; pub type NSSoundPlaybackDeviceIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index 8c861ac41..bd63125dd 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -9,12 +9,152 @@ pub type NSSpeechSynthesizerVoiceName = NSString; pub type NSVoiceAttributeKey = NSString; +extern "C" { + static NSVoiceName: &'static NSVoiceAttributeKey; +} + +extern "C" { + static NSVoiceIdentifier: &'static NSVoiceAttributeKey; +} + +extern "C" { + static NSVoiceAge: &'static NSVoiceAttributeKey; +} + +extern "C" { + static NSVoiceGender: &'static NSVoiceAttributeKey; +} + +extern "C" { + static NSVoiceDemoText: &'static NSVoiceAttributeKey; +} + +extern "C" { + static NSVoiceLocaleIdentifier: &'static NSVoiceAttributeKey; +} + +extern "C" { + static NSVoiceSupportedCharacters: &'static NSVoiceAttributeKey; +} + +extern "C" { + static NSVoiceIndividuallySpokenCharacters: &'static NSVoiceAttributeKey; +} + pub type NSSpeechDictionaryKey = NSString; +extern "C" { + static NSSpeechDictionaryLocaleIdentifier: &'static NSSpeechDictionaryKey; +} + +extern "C" { + static NSSpeechDictionaryModificationDate: &'static NSSpeechDictionaryKey; +} + +extern "C" { + static NSSpeechDictionaryPronunciations: &'static NSSpeechDictionaryKey; +} + +extern "C" { + static NSSpeechDictionaryAbbreviations: &'static NSSpeechDictionaryKey; +} + +extern "C" { + static NSSpeechDictionaryEntrySpelling: &'static NSSpeechDictionaryKey; +} + +extern "C" { + static NSSpeechDictionaryEntryPhonemes: &'static NSSpeechDictionaryKey; +} + pub type NSVoiceGenderName = NSString; +extern "C" { + static NSVoiceGenderNeuter: &'static NSVoiceGenderName; +} + +extern "C" { + static NSVoiceGenderMale: &'static NSVoiceGenderName; +} + +extern "C" { + static NSVoiceGenderFemale: &'static NSVoiceGenderName; +} + +extern "C" { + static NSVoiceGenderNeutral: &'static NSVoiceGenderName; +} + pub type NSSpeechPropertyKey = NSString; +extern "C" { + static NSSpeechStatusProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechErrorsProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechInputModeProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechCharacterModeProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechNumberModeProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechRateProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechPitchBaseProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechPitchModProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechVolumeProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechSynthesizerInfoProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechRecentSyncProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechPhonemeSymbolsProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechCurrentVoiceProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechCommandDelimiterProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechResetProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSSpeechOutputToFileURLProperty: &'static NSSpeechPropertyKey; +} + +extern "C" { + static NSVoiceLanguage: &'static NSVoiceAttributeKey; +} + pub type NSSpeechBoundary = NSUInteger; pub const NSSpeechImmediateBoundary: NSSpeechBoundary = 0; pub const NSSpeechWordBoundary: NSSpeechBoundary = 1; @@ -130,12 +270,100 @@ pub type NSSpeechSynthesizerDelegate = NSObject; pub type NSSpeechMode = NSString; +extern "C" { + static NSSpeechModeText: &'static NSSpeechMode; +} + +extern "C" { + static NSSpeechModePhoneme: &'static NSSpeechMode; +} + +extern "C" { + static NSSpeechModeNormal: &'static NSSpeechMode; +} + +extern "C" { + static NSSpeechModeLiteral: &'static NSSpeechMode; +} + pub type NSSpeechStatusKey = NSString; +extern "C" { + static NSSpeechStatusOutputBusy: &'static NSSpeechStatusKey; +} + +extern "C" { + static NSSpeechStatusOutputPaused: &'static NSSpeechStatusKey; +} + +extern "C" { + static NSSpeechStatusNumberOfCharactersLeft: &'static NSSpeechStatusKey; +} + +extern "C" { + static NSSpeechStatusPhonemeCode: &'static NSSpeechStatusKey; +} + pub type NSSpeechErrorKey = NSString; +extern "C" { + static NSSpeechErrorCount: &'static NSSpeechErrorKey; +} + +extern "C" { + static NSSpeechErrorOldestCode: &'static NSSpeechErrorKey; +} + +extern "C" { + static NSSpeechErrorOldestCharacterOffset: &'static NSSpeechErrorKey; +} + +extern "C" { + static NSSpeechErrorNewestCode: &'static NSSpeechErrorKey; +} + +extern "C" { + static NSSpeechErrorNewestCharacterOffset: &'static NSSpeechErrorKey; +} + pub type NSSpeechSynthesizerInfoKey = NSString; +extern "C" { + static NSSpeechSynthesizerInfoIdentifier: &'static NSSpeechSynthesizerInfoKey; +} + +extern "C" { + static NSSpeechSynthesizerInfoVersion: &'static NSSpeechSynthesizerInfoKey; +} + pub type NSSpeechPhonemeInfoKey = NSString; +extern "C" { + static NSSpeechPhonemeInfoOpcode: &'static NSSpeechPhonemeInfoKey; +} + +extern "C" { + static NSSpeechPhonemeInfoSymbol: &'static NSSpeechPhonemeInfoKey; +} + +extern "C" { + static NSSpeechPhonemeInfoExample: &'static NSSpeechPhonemeInfoKey; +} + +extern "C" { + static NSSpeechPhonemeInfoHiliteStart: &'static NSSpeechPhonemeInfoKey; +} + +extern "C" { + static NSSpeechPhonemeInfoHiliteEnd: &'static NSSpeechPhonemeInfoKey; +} + pub type NSSpeechCommandDelimiterKey = NSString; + +extern "C" { + static NSSpeechCommandPrefix: &'static NSSpeechCommandDelimiterKey; +} + +extern "C" { + static NSSpeechCommandSuffix: &'static NSSpeechCommandDelimiterKey; +} diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index fb004a2c3..b6b2d33c9 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -7,6 +7,46 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextCheckingOptionKey = NSString; +extern "C" { + static NSTextCheckingOrthographyKey: &'static NSTextCheckingOptionKey; +} + +extern "C" { + static NSTextCheckingQuotesKey: &'static NSTextCheckingOptionKey; +} + +extern "C" { + static NSTextCheckingReplacementsKey: &'static NSTextCheckingOptionKey; +} + +extern "C" { + static NSTextCheckingReferenceDateKey: &'static NSTextCheckingOptionKey; +} + +extern "C" { + static NSTextCheckingReferenceTimeZoneKey: &'static NSTextCheckingOptionKey; +} + +extern "C" { + static NSTextCheckingDocumentURLKey: &'static NSTextCheckingOptionKey; +} + +extern "C" { + static NSTextCheckingDocumentTitleKey: &'static NSTextCheckingOptionKey; +} + +extern "C" { + static NSTextCheckingDocumentAuthorKey: &'static NSTextCheckingOptionKey; +} + +extern "C" { + static NSTextCheckingRegularExpressionsKey: &'static NSTextCheckingOptionKey; +} + +extern "C" { + static NSTextCheckingSelectedRangeKey: &'static NSTextCheckingOptionKey; +} + pub type NSCorrectionResponse = NSInteger; pub const NSCorrectionResponseNone: NSCorrectionResponse = 0; pub const NSCorrectionResponseAccepted: NSCorrectionResponse = 1; @@ -320,6 +360,38 @@ extern_methods!( } ); +extern "C" { + static NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification: + &'static NSNotificationName; +} + +extern "C" { + static NSSpellCheckerDidChangeAutomaticTextReplacementNotification: &'static NSNotificationName; +} + +extern "C" { + static NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification: + &'static NSNotificationName; +} + +extern "C" { + static NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification: + &'static NSNotificationName; +} + +extern "C" { + static NSSpellCheckerDidChangeAutomaticCapitalizationNotification: &'static NSNotificationName; +} + +extern "C" { + static NSSpellCheckerDidChangeAutomaticPeriodSubstitutionNotification: + &'static NSNotificationName; +} + +extern "C" { + static NSSpellCheckerDidChangeAutomaticTextCompletionNotification: &'static NSNotificationName; +} + extern_methods!( /// NSDeprecated unsafe impl NSSpellChecker { diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs index 73a6f1972..bb804f08b 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitView.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -121,6 +121,14 @@ extern_methods!( pub type NSSplitViewDelegate = NSObject; +extern "C" { + static NSSplitViewWillResizeSubviewsNotification: &'static NSNotificationName; +} + +extern "C" { + static NSSplitViewDidResizeSubviewsNotification: &'static NSNotificationName; +} + extern_methods!( /// NSDeprecated unsafe impl NSSplitView { diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs index a8a379f57..8f1a6f653 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSSplitViewControllerAutomaticDimension: CGFloat; +} + extern_class!( #[derive(Debug)] pub struct NSSplitViewController; diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs index 614ee63c6..5690dcd55 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs @@ -18,6 +18,10 @@ pub const NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitVie NSSplitViewItemCollapseBehavior = 2; pub const NSSplitViewItemCollapseBehaviorUseConstraints: NSSplitViewItemCollapseBehavior = 3; +extern "C" { + static NSSplitViewItemUnspecifiedDimension: CGFloat; +} + extern_class!( #[derive(Debug)] pub struct NSSplitViewItem; diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index 4cb714297..e47d30f1a 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -20,6 +20,14 @@ pub const NSStackViewDistributionFillProportionally: NSStackViewDistribution = 2 pub const NSStackViewDistributionEqualSpacing: NSStackViewDistribution = 3; pub const NSStackViewDistributionEqualCentering: NSStackViewDistribution = 4; +static NSStackViewVisibilityPriorityMustHold: NSStackViewVisibilityPriority = 1000; + +static NSStackViewVisibilityPriorityDetachOnlyIfNecessary: NSStackViewVisibilityPriority = 900; + +static NSStackViewVisibilityPriorityNotVisible: NSStackViewVisibilityPriority = 0; + +static NSStackViewSpacingUseDefault: CGFloat = todo; + extern_class!( #[derive(Debug)] pub struct NSStackView; diff --git a/crates/icrate/src/generated/AppKit/NSStatusBar.rs b/crates/icrate/src/generated/AppKit/NSStatusBar.rs index 02011f4a2..8faa80900 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBar.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBar.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSVariableStatusItemLength: CGFloat = -1.0; + +static NSSquareStatusItemLength: CGFloat = -2.0; + extern_class!( #[derive(Debug)] pub struct NSStatusBar; diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs index 24316e4c3..2904b8efe 100644 --- a/crates/icrate/src/generated/AppKit/NSTabView.rs +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -5,6 +5,8 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSAppKitVersionNumberWithDirectionalTabs: NSAppKitVersion = 631.0; + pub type NSTabViewType = NSUInteger; pub const NSTopTabsBezelBorder: NSTabViewType = 0; pub const NSLeftTabsBezelBorder: NSTabViewType = 1; diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index 5013502e0..64925a551 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -604,6 +604,26 @@ extern_methods!( pub type NSTableViewDelegate = NSObject; +extern "C" { + static NSTableViewSelectionDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTableViewColumnDidMoveNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTableViewColumnDidResizeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTableViewSelectionIsChangingNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTableViewRowViewKey: &'static NSUserInterfaceItemIdentifier; +} + pub type NSTableViewDataSource = NSObject; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index 3ca2cad17..41472c2f8 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -268,6 +268,22 @@ pub const NSTextMovementDown: NSTextMovement = 0x16; pub const NSTextMovementCancel: NSTextMovement = 0x17; pub const NSTextMovementOther: NSTextMovement = 0; +extern "C" { + static NSTextDidBeginEditingNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTextDidEndEditingNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTextDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTextMovementUserInfoKey: &'static NSString; +} + pub const NSIllegalTextMovement: i32 = 0; pub const NSReturnTextMovement: i32 = 0x10; pub const NSTabTextMovement: i32 = 0x11; @@ -283,3 +299,13 @@ pub type NSTextDelegate = NSObject; pub const NSTextWritingDirectionEmbedding: i32 = (0 << 1); pub const NSTextWritingDirectionOverride: i32 = (1 << 1); + +static NSLeftTextAlignment: NSTextAlignment = NSTextAlignmentLeft; + +static NSRightTextAlignment: NSTextAlignment = NSTextAlignmentRight; + +static NSCenterTextAlignment: NSTextAlignment = NSTextAlignmentCenter; + +static NSJustifiedTextAlignment: NSTextAlignment = NSTextAlignmentJustified; + +static NSNaturalTextAlignment: NSTextAlignment = NSTextAlignmentNatural; diff --git a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs index ada6b0094..69d5334a2 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs @@ -33,3 +33,7 @@ extern_methods!( pub unsafe fn noteSelectedAlternativeString(&self, alternativeString: &NSString); } ); + +extern "C" { + static NSTextAlternativesSelectedAlternativeStringNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSTextContent.rs b/crates/icrate/src/generated/AppKit/NSTextContent.rs index 0b9512d5d..81703a67e 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContent.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContent.rs @@ -7,4 +7,16 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextContentType = NSString; +extern "C" { + static NSTextContentTypeUsername: &'static NSTextContentType; +} + +extern "C" { + static NSTextContentTypePassword: &'static NSTextContentType; +} + +extern "C" { + static NSTextContentTypeOneTimeCode: &'static NSTextContentType; +} + pub type NSTextContent = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index 074f84582..b06ab58e8 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -156,3 +156,7 @@ extern_methods!( ) -> Option>; } ); + +extern "C" { + static NSTextContentStorageUnsupportedAttributeAddedNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index a23e569a1..bfb0f4c9c 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -22,6 +22,14 @@ pub const NSTextFinderActionHideReplaceInterface: NSTextFinderAction = 13; pub type NSPasteboardTypeTextFinderOptionKey = NSString; +extern "C" { + static NSTextFinderCaseInsensitiveKey: &'static NSPasteboardTypeTextFinderOptionKey; +} + +extern "C" { + static NSTextFinderMatchingTypeKey: &'static NSPasteboardTypeTextFinderOptionKey; +} + pub type NSTextFinderMatchingType = NSInteger; pub const NSTextFinderMatchingTypeContains: NSTextFinderMatchingType = 0; pub const NSTextFinderMatchingTypeStartsWith: NSTextFinderMatchingType = 1; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs index 56d06943c..8e02b3821 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs @@ -82,3 +82,7 @@ extern_methods!( ) -> Option>; } ); + +extern "C" { + static NSTextInputContextKeyboardSelectionDidChangeNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index 4184d1427..db035a667 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -7,6 +7,74 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextListMarkerFormat = NSString; +extern "C" { + static NSTextListMarkerBox: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerCheck: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerCircle: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerDiamond: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerDisc: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerHyphen: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerSquare: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerLowercaseHexadecimal: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerUppercaseHexadecimal: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerOctal: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerLowercaseAlpha: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerUppercaseAlpha: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerLowercaseLatin: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerUppercaseLatin: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerLowercaseRoman: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerUppercaseRoman: &'static NSTextListMarkerFormat; +} + +extern "C" { + static NSTextListMarkerDecimal: &'static NSTextListMarkerFormat; +} + pub type NSTextListOptions = NSUInteger; pub const NSTextListPrependEnclosingMarker: NSTextListOptions = (1 << 0); diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index f31dc7436..a14a49fd0 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -77,6 +77,14 @@ extern_methods!( pub type NSTextStorageDelegate = NSObject; +extern "C" { + static NSTextStorageWillProcessEditingNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTextStorageDidProcessEditingNotification: &'static NSNotificationName; +} + pub type NSTextStorageObserving = NSObject; pub type NSTextStorageEditedOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index 2cc242d90..e727b13f5 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -14,6 +14,10 @@ pub type NSSelectionAffinity = NSUInteger; pub const NSSelectionAffinityUpstream: NSSelectionAffinity = 0; pub const NSSelectionAffinityDownstream: NSSelectionAffinity = 1; +extern "C" { + static NSAllRomanInputSourcesLocaleIdentifier: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSTextView; @@ -941,6 +945,50 @@ extern_methods!( pub type NSTextViewDelegate = NSObject; +extern "C" { + static NSTouchBarItemIdentifierCharacterPicker: &'static NSTouchBarItemIdentifier; +} + +extern "C" { + static NSTouchBarItemIdentifierTextColorPicker: &'static NSTouchBarItemIdentifier; +} + +extern "C" { + static NSTouchBarItemIdentifierTextStyle: &'static NSTouchBarItemIdentifier; +} + +extern "C" { + static NSTouchBarItemIdentifierTextAlignment: &'static NSTouchBarItemIdentifier; +} + +extern "C" { + static NSTouchBarItemIdentifierTextList: &'static NSTouchBarItemIdentifier; +} + +extern "C" { + static NSTouchBarItemIdentifierTextFormat: &'static NSTouchBarItemIdentifier; +} + +extern "C" { + static NSTextViewWillChangeNotifyingTextViewNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTextViewDidChangeSelectionNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTextViewDidChangeTypingAttributesNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTextViewWillSwitchToNSLayoutManagerNotification: &'static NSNotificationName; +} + +extern "C" { + static NSTextViewDidSwitchToNSLayoutManagerNotification: &'static NSNotificationName; +} + pub type NSFindPanelAction = NSUInteger; pub const NSFindPanelActionShowFindPanel: NSFindPanelAction = 1; pub const NSFindPanelActionNext: NSFindPanelAction = 2; @@ -953,8 +1001,20 @@ pub const NSFindPanelActionReplaceAllInSelection: NSFindPanelAction = 8; pub const NSFindPanelActionSelectAll: NSFindPanelAction = 9; pub const NSFindPanelActionSelectAllInSelection: NSFindPanelAction = 10; +extern "C" { + static NSFindPanelSearchOptionsPboardType: &'static NSPasteboardType; +} + pub type NSPasteboardTypeFindPanelSearchOptionKey = NSString; +extern "C" { + static NSFindPanelCaseInsensitiveSearch: &'static NSPasteboardTypeFindPanelSearchOptionKey; +} + +extern "C" { + static NSFindPanelSubstringMatch: &'static NSPasteboardTypeFindPanelSearchOptionKey; +} + pub type NSFindPanelSubstringMatchType = NSUInteger; pub const NSFindPanelSubstringMatchTypeContains: NSFindPanelSubstringMatchType = 0; pub const NSFindPanelSubstringMatchTypeStartsWith: NSFindPanelSubstringMatchType = 1; diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs index f5b3553ee..43c3fd323 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -59,3 +59,9 @@ extern_methods!( ); pub type NSTokenFieldCellDelegate = NSObject; + +static NSDefaultTokenStyle: NSTokenStyle = NSTokenStyleDefault; + +static NSPlainTextTokenStyle: NSTokenStyle = NSTokenStyleNone; + +static NSRoundedTokenStyle: NSTokenStyle = NSTokenStyleRounded; diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index a535a8108..8e167dfe2 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -147,6 +147,14 @@ extern_methods!( pub type NSToolbarDelegate = NSObject; +extern "C" { + static NSToolbarWillAddItemNotification: &'static NSNotificationName; +} + +extern "C" { + static NSToolbarDidRemoveItemNotification: &'static NSNotificationName; +} + extern_methods!( /// NSDeprecated unsafe impl NSToolbar { diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index 981297780..2b9cb9268 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -7,6 +7,14 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSToolbarItemVisibilityPriority = NSInteger; +static NSToolbarItemVisibilityPriorityStandard: NSToolbarItemVisibilityPriority = 0; + +static NSToolbarItemVisibilityPriorityLow: NSToolbarItemVisibilityPriority = -1000; + +static NSToolbarItemVisibilityPriorityHigh: NSToolbarItemVisibilityPriority = 1000; + +static NSToolbarItemVisibilityPriorityUser: NSToolbarItemVisibilityPriority = 2000; + extern_class!( #[derive(Debug)] pub struct NSToolbarItem; @@ -158,3 +166,43 @@ extern_methods!( ); pub type NSCloudSharingValidation = NSObject; + +extern "C" { + static NSToolbarSeparatorItemIdentifier: &'static NSToolbarItemIdentifier; +} + +extern "C" { + static NSToolbarSpaceItemIdentifier: &'static NSToolbarItemIdentifier; +} + +extern "C" { + static NSToolbarFlexibleSpaceItemIdentifier: &'static NSToolbarItemIdentifier; +} + +extern "C" { + static NSToolbarShowColorsItemIdentifier: &'static NSToolbarItemIdentifier; +} + +extern "C" { + static NSToolbarShowFontsItemIdentifier: &'static NSToolbarItemIdentifier; +} + +extern "C" { + static NSToolbarCustomizeToolbarItemIdentifier: &'static NSToolbarItemIdentifier; +} + +extern "C" { + static NSToolbarPrintItemIdentifier: &'static NSToolbarItemIdentifier; +} + +extern "C" { + static NSToolbarToggleSidebarItemIdentifier: &'static NSToolbarItemIdentifier; +} + +extern "C" { + static NSToolbarCloudSharingItemIdentifier: &'static NSToolbarItemIdentifier; +} + +extern "C" { + static NSToolbarSidebarTrackingSeparatorItemIdentifier: &'static NSToolbarItemIdentifier; +} diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs index a2f052f80..06e31661a 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -7,6 +7,12 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTouchBarItemIdentifier = NSString; +static NSTouchBarItemPriorityHigh: NSTouchBarItemPriority = 1000; + +static NSTouchBarItemPriorityNormal: NSTouchBarItemPriority = 0; + +static NSTouchBarItemPriorityLow: NSTouchBarItemPriority = -1000; + extern_class!( #[derive(Debug)] pub struct NSTouchBarItem; @@ -52,3 +58,19 @@ extern_methods!( pub unsafe fn isVisible(&self) -> bool; } ); + +extern "C" { + static NSTouchBarItemIdentifierFixedSpaceSmall: &'static NSTouchBarItemIdentifier; +} + +extern "C" { + static NSTouchBarItemIdentifierFixedSpaceLarge: &'static NSTouchBarItemIdentifier; +} + +extern "C" { + static NSTouchBarItemIdentifierFlexibleSpace: &'static NSTouchBarItemIdentifier; +} + +extern "C" { + static NSTouchBarItemIdentifierOtherItemsProxy: &'static NSTouchBarItemIdentifier; +} diff --git a/crates/icrate/src/generated/AppKit/NSUserActivity.rs b/crates/icrate/src/generated/AppKit/NSUserActivity.rs index 33806a731..e96775a0a 100644 --- a/crates/icrate/src/generated/AppKit/NSUserActivity.rs +++ b/crates/icrate/src/generated/AppKit/NSUserActivity.rs @@ -34,3 +34,7 @@ extern_methods!( pub unsafe fn updateUserActivityState(&self, activity: &NSUserActivity); } ); + +extern "C" { + static NSUserActivityDocumentURLKey: &'static NSString; +} diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index f4ef944b2..74ce5518d 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -881,6 +881,22 @@ extern_methods!( pub type NSViewFullScreenModeOptionKey = NSString; +extern "C" { + static NSFullScreenModeAllScreens: &'static NSViewFullScreenModeOptionKey; +} + +extern "C" { + static NSFullScreenModeSetting: &'static NSViewFullScreenModeOptionKey; +} + +extern "C" { + static NSFullScreenModeWindowLevel: &'static NSViewFullScreenModeOptionKey; +} + +extern "C" { + static NSFullScreenModeApplicationPresentationOptions: &'static NSViewFullScreenModeOptionKey; +} + extern_methods!( /// NSFullScreenMode unsafe impl NSView { @@ -904,8 +920,20 @@ extern_methods!( pub type NSDefinitionOptionKey = NSString; +extern "C" { + static NSDefinitionPresentationTypeKey: &'static NSDefinitionOptionKey; +} + pub type NSDefinitionPresentationType = NSString; +extern "C" { + static NSDefinitionPresentationTypeOverlay: &'static NSDefinitionPresentationType; +} + +extern "C" { + static NSDefinitionPresentationTypeDictionaryApplication: &'static NSDefinitionPresentationType; +} + extern_methods!( /// NSDefinition unsafe impl NSView { @@ -1060,3 +1088,23 @@ extern_methods!( pub unsafe fn renewGState(&self); } ); + +extern "C" { + static NSViewFrameDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSViewFocusDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSViewBoundsDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSViewGlobalFrameDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSViewDidUpdateTrackingAreasNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 8fd8b459b..9b6b412cd 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSAppKitVersionNumberWithCustomSheetPosition: NSAppKitVersion = 686.0; + +static NSAppKitVersionNumberWithDeferredWindowDisplaySupport: NSAppKitVersion = 1019.0; + pub type NSWindowStyleMask = NSUInteger; pub const NSWindowStyleMaskBorderless: NSWindowStyleMask = 0; pub const NSWindowStyleMaskTitled: NSWindowStyleMask = 1 << 0; @@ -20,6 +24,10 @@ pub const NSWindowStyleMaskDocModalWindow: NSWindowStyleMask = 1 << 6; pub const NSWindowStyleMaskNonactivatingPanel: NSWindowStyleMask = 1 << 7; pub const NSWindowStyleMaskHUDWindow: NSWindowStyleMask = 1 << 13; +static NSModalResponseOK: NSModalResponse = 1; + +static NSModalResponseCancel: NSModalResponse = 0; + pub const NSDisplayWindowRunLoopOrdering: i32 = 600000; pub const NSResetCursorRectsRunLoopOrdering: i32 = 700000; @@ -59,6 +67,24 @@ pub const NSWindowOcclusionStateVisible: NSWindowOcclusionState = 1 << 1; pub type NSWindowLevel = NSInteger; +static NSNormalWindowLevel: NSWindowLevel = todo; + +static NSFloatingWindowLevel: NSWindowLevel = todo; + +static NSSubmenuWindowLevel: NSWindowLevel = todo; + +static NSTornOffMenuWindowLevel: NSWindowLevel = todo; + +static NSMainMenuWindowLevel: NSWindowLevel = todo; + +static NSStatusWindowLevel: NSWindowLevel = todo; + +static NSModalPanelWindowLevel: NSWindowLevel = todo; + +static NSPopUpMenuWindowLevel: NSWindowLevel = todo; + +static NSScreenSaverWindowLevel: NSWindowLevel = todo; + pub type NSSelectionDirection = NSUInteger; pub const NSDirectSelection: NSSelectionDirection = 0; pub const NSSelectingNext: NSSelectionDirection = 1; @@ -83,6 +109,8 @@ pub const NSWindowToolbarStylePreference: NSWindowToolbarStyle = 2; pub const NSWindowToolbarStyleUnified: NSWindowToolbarStyle = 3; pub const NSWindowToolbarStyleUnifiedCompact: NSWindowToolbarStyle = 4; +static NSEventDurationForever: NSTimeInterval = todo; + pub type NSWindowUserTabbingPreference = NSInteger; pub const NSWindowUserTabbingPreferenceManual: NSWindowUserTabbingPreference = 0; pub const NSWindowUserTabbingPreferenceAlways: NSWindowUserTabbingPreference = 1; @@ -1154,6 +1182,130 @@ extern_methods!( pub type NSWindowDelegate = NSObject; +extern "C" { + static NSWindowDidBecomeKeyNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidBecomeMainNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidChangeScreenNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidDeminiaturizeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidExposeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidMiniaturizeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidMoveNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidResignKeyNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidResignMainNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidResizeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidUpdateNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowWillCloseNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowWillMiniaturizeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowWillMoveNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowWillBeginSheetNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidEndSheetNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidChangeBackingPropertiesNotification: &'static NSNotificationName; +} + +extern "C" { + static NSBackingPropertyOldScaleFactorKey: &'static NSString; +} + +extern "C" { + static NSBackingPropertyOldColorSpaceKey: &'static NSString; +} + +extern "C" { + static NSWindowDidChangeScreenProfileNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowWillStartLiveResizeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidEndLiveResizeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowWillEnterFullScreenNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidEnterFullScreenNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowWillExitFullScreenNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidExitFullScreenNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowWillEnterVersionBrowserNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidEnterVersionBrowserNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowWillExitVersionBrowserNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidExitVersionBrowserNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWindowDidChangeOcclusionStateNotification: &'static NSNotificationName; +} + pub type NSWindowBackingLocation = NSUInteger; pub const NSWindowBackingLocationDefault: NSWindowBackingLocation = 0; pub const NSWindowBackingLocationVideoMemory: NSWindowBackingLocation = 1; @@ -1241,3 +1393,36 @@ extern_methods!( pub unsafe fn setShowsResizeIndicator(&self, showsResizeIndicator: bool); } ); + +static NSBorderlessWindowMask: NSWindowStyleMask = NSWindowStyleMaskBorderless; + +static NSTitledWindowMask: NSWindowStyleMask = NSWindowStyleMaskTitled; + +static NSClosableWindowMask: NSWindowStyleMask = NSWindowStyleMaskClosable; + +static NSMiniaturizableWindowMask: NSWindowStyleMask = NSWindowStyleMaskMiniaturizable; + +static NSResizableWindowMask: NSWindowStyleMask = NSWindowStyleMaskResizable; + +static NSTexturedBackgroundWindowMask: NSWindowStyleMask = NSWindowStyleMaskTexturedBackground; + +static NSUnifiedTitleAndToolbarWindowMask: NSWindowStyleMask = + NSWindowStyleMaskUnifiedTitleAndToolbar; + +static NSFullScreenWindowMask: NSWindowStyleMask = NSWindowStyleMaskFullScreen; + +static NSFullSizeContentViewWindowMask: NSWindowStyleMask = NSWindowStyleMaskFullSizeContentView; + +static NSUtilityWindowMask: NSWindowStyleMask = NSWindowStyleMaskUtilityWindow; + +static NSDocModalWindowMask: NSWindowStyleMask = NSWindowStyleMaskDocModalWindow; + +static NSNonactivatingPanelMask: NSWindowStyleMask = NSWindowStyleMaskNonactivatingPanel; + +static NSHUDWindowMask: NSWindowStyleMask = NSWindowStyleMaskHUDWindow; + +static NSUnscaledWindowMask: NSWindowStyleMask = 1 << 11; + +static NSWindowFullScreenButton: NSWindowButton = 7; + +static NSDockWindowLevel: NSWindowLevel = todo; diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs index 953f8fe0a..a73036b89 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -25,6 +25,10 @@ extern_methods!( } ); +extern "C" { + static NSApplicationDidFinishRestoringWindowsNotification: &'static NSNotificationName; +} + extern_methods!( /// NSUserInterfaceRestoration unsafe impl NSWindow { diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index 257ea4592..c344e4e72 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -311,6 +311,18 @@ extern_methods!( pub type NSWorkspaceDesktopImageOptionKey = NSString; +extern "C" { + static NSWorkspaceDesktopImageScalingKey: &'static NSWorkspaceDesktopImageOptionKey; +} + +extern "C" { + static NSWorkspaceDesktopImageAllowClippingKey: &'static NSWorkspaceDesktopImageOptionKey; +} + +extern "C" { + static NSWorkspaceDesktopImageFillColorKey: &'static NSWorkspaceDesktopImageOptionKey; +} + extern_methods!( /// NSDesktopImages unsafe impl NSWorkspace { @@ -376,6 +388,106 @@ extern_methods!( } ); +extern "C" { + static NSWorkspaceApplicationKey: &'static NSString; +} + +extern "C" { + static NSWorkspaceWillLaunchApplicationNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceDidLaunchApplicationNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceDidTerminateApplicationNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceDidHideApplicationNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceDidUnhideApplicationNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceDidActivateApplicationNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceDidDeactivateApplicationNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceVolumeLocalizedNameKey: &'static NSString; +} + +extern "C" { + static NSWorkspaceVolumeURLKey: &'static NSString; +} + +extern "C" { + static NSWorkspaceVolumeOldLocalizedNameKey: &'static NSString; +} + +extern "C" { + static NSWorkspaceVolumeOldURLKey: &'static NSString; +} + +extern "C" { + static NSWorkspaceDidMountNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceDidUnmountNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceWillUnmountNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceDidRenameVolumeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceWillPowerOffNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceWillSleepNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceDidWakeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceScreensDidSleepNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceScreensDidWakeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceSessionDidBecomeActiveNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceSessionDidResignActiveNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceDidChangeFileLabelsNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWorkspaceActiveSpaceDidChangeNotification: &'static NSNotificationName; +} + pub type NSWorkspaceFileOperationName = NSString; pub type NSWorkspaceLaunchOptions = NSUInteger; @@ -394,6 +506,22 @@ pub const NSWorkspaceLaunchPreferringClassic: NSWorkspaceLaunchOptions = 0x00040 pub type NSWorkspaceLaunchConfigurationKey = NSString; +extern "C" { + static NSWorkspaceLaunchConfigurationAppleEvent: &'static NSWorkspaceLaunchConfigurationKey; +} + +extern "C" { + static NSWorkspaceLaunchConfigurationArguments: &'static NSWorkspaceLaunchConfigurationKey; +} + +extern "C" { + static NSWorkspaceLaunchConfigurationEnvironment: &'static NSWorkspaceLaunchConfigurationKey; +} + +extern "C" { + static NSWorkspaceLaunchConfigurationArchitecture: &'static NSWorkspaceLaunchConfigurationKey; +} + extern_methods!( /// NSDeprecated unsafe impl NSWorkspace { @@ -589,3 +717,67 @@ extern_methods!( ) -> bool; } ); + +extern "C" { + static NSWorkspaceMoveOperation: &'static NSWorkspaceFileOperationName; +} + +extern "C" { + static NSWorkspaceCopyOperation: &'static NSWorkspaceFileOperationName; +} + +extern "C" { + static NSWorkspaceLinkOperation: &'static NSWorkspaceFileOperationName; +} + +extern "C" { + static NSWorkspaceCompressOperation: &'static NSWorkspaceFileOperationName; +} + +extern "C" { + static NSWorkspaceDecompressOperation: &'static NSWorkspaceFileOperationName; +} + +extern "C" { + static NSWorkspaceEncryptOperation: &'static NSWorkspaceFileOperationName; +} + +extern "C" { + static NSWorkspaceDecryptOperation: &'static NSWorkspaceFileOperationName; +} + +extern "C" { + static NSWorkspaceDestroyOperation: &'static NSWorkspaceFileOperationName; +} + +extern "C" { + static NSWorkspaceRecycleOperation: &'static NSWorkspaceFileOperationName; +} + +extern "C" { + static NSWorkspaceDuplicateOperation: &'static NSWorkspaceFileOperationName; +} + +extern "C" { + static NSWorkspaceDidPerformFileOperationNotification: &'static NSNotificationName; +} + +extern "C" { + static NSPlainFileType: &'static NSString; +} + +extern "C" { + static NSDirectoryFileType: &'static NSString; +} + +extern "C" { + static NSApplicationFileType: &'static NSString; +} + +extern "C" { + static NSFilesystemFileType: &'static NSString; +} + +extern "C" { + static NSShellCommandFileType: &'static NSString; +} diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index c932bc77d..3eb6dfe6f 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -284,27 +284,193 @@ mod __exported { NSWorkspaceErrorMaximum, NSWorkspaceErrorMinimum, }; pub use super::NSATSTypesetter::NSATSTypesetter; + pub use super::NSAccessibility::NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification; pub use super::NSAccessibilityConstants::{ - NSAccessibilityActionName, NSAccessibilityAnnotationAttributeKey, + NSAccessibilityActionName, NSAccessibilityActivationPointAttribute, + NSAccessibilityAllowedValuesAttribute, NSAccessibilityAlternateUIVisibleAttribute, + NSAccessibilityAnnotationAttributeKey, NSAccessibilityAnnotationElement, + NSAccessibilityAnnotationLabel, NSAccessibilityAnnotationLocation, NSAccessibilityAnnotationPosition, NSAccessibilityAnnotationPositionEnd, NSAccessibilityAnnotationPositionFullRange, NSAccessibilityAnnotationPositionStart, - NSAccessibilityAttributeName, NSAccessibilityFontAttributeKey, NSAccessibilityLoadingToken, - NSAccessibilityNotificationName, NSAccessibilityNotificationUserInfoKey, - NSAccessibilityOrientation, NSAccessibilityOrientationHorizontal, + NSAccessibilityAnnotationTextAttribute, NSAccessibilityAnnouncementKey, + NSAccessibilityAnnouncementRequestedNotification, + NSAccessibilityApplicationActivatedNotification, + NSAccessibilityApplicationDeactivatedNotification, + NSAccessibilityApplicationHiddenNotification, NSAccessibilityApplicationRole, + NSAccessibilityApplicationShownNotification, NSAccessibilityAscendingSortDirectionValue, + NSAccessibilityAttachmentTextAttribute, NSAccessibilityAttributeName, + NSAccessibilityAttributedStringForRangeParameterizedAttribute, + NSAccessibilityAutocorrectedTextAttribute, NSAccessibilityBackgroundColorTextAttribute, + NSAccessibilityBoundsForRangeParameterizedAttribute, NSAccessibilityBrowserRole, + NSAccessibilityBusyIndicatorRole, NSAccessibilityButtonRole, NSAccessibilityCancelAction, + NSAccessibilityCancelButtonAttribute, + NSAccessibilityCellForColumnAndRowParameterizedAttribute, NSAccessibilityCellRole, + NSAccessibilityCenterTabStopMarkerTypeValue, NSAccessibilityCentimetersUnitValue, + NSAccessibilityCheckBoxRole, NSAccessibilityChildrenAttribute, + NSAccessibilityClearButtonAttribute, NSAccessibilityCloseButtonAttribute, + NSAccessibilityCloseButtonSubrole, NSAccessibilityCollectionListSubrole, + NSAccessibilityColorWellRole, NSAccessibilityColumnCountAttribute, + NSAccessibilityColumnHeaderUIElementsAttribute, NSAccessibilityColumnIndexRangeAttribute, + NSAccessibilityColumnRole, NSAccessibilityColumnTitlesAttribute, + NSAccessibilityColumnsAttribute, NSAccessibilityComboBoxRole, NSAccessibilityConfirmAction, + NSAccessibilityContainsProtectedContentAttribute, NSAccessibilityContentListSubrole, + NSAccessibilityContentsAttribute, NSAccessibilityCreatedNotification, + NSAccessibilityCriticalValueAttribute, NSAccessibilityCustomTextAttribute, + NSAccessibilityDecimalTabStopMarkerTypeValue, NSAccessibilityDecrementAction, + NSAccessibilityDecrementArrowSubrole, NSAccessibilityDecrementButtonAttribute, + NSAccessibilityDecrementPageSubrole, NSAccessibilityDefaultButtonAttribute, + NSAccessibilityDefinitionListSubrole, NSAccessibilityDeleteAction, + NSAccessibilityDescendingSortDirectionValue, NSAccessibilityDescriptionAttribute, + NSAccessibilityDescriptionListSubrole, NSAccessibilityDialogSubrole, + NSAccessibilityDisclosedByRowAttribute, NSAccessibilityDisclosedRowsAttribute, + NSAccessibilityDisclosingAttribute, NSAccessibilityDisclosureLevelAttribute, + NSAccessibilityDisclosureTriangleRole, NSAccessibilityDocumentAttribute, + NSAccessibilityDrawerCreatedNotification, NSAccessibilityDrawerRole, + NSAccessibilityEditedAttribute, NSAccessibilityEnabledAttribute, + NSAccessibilityErrorCodeExceptionInfo, NSAccessibilityExpandedAttribute, + NSAccessibilityExtrasMenuBarAttribute, NSAccessibilityFilenameAttribute, + NSAccessibilityFirstLineIndentMarkerTypeValue, NSAccessibilityFloatingWindowSubrole, + NSAccessibilityFocusedAttribute, NSAccessibilityFocusedUIElementAttribute, + NSAccessibilityFocusedUIElementChangedNotification, NSAccessibilityFocusedWindowAttribute, + NSAccessibilityFocusedWindowChangedNotification, NSAccessibilityFontAttributeKey, + NSAccessibilityFontFamilyKey, NSAccessibilityFontNameKey, NSAccessibilityFontSizeKey, + NSAccessibilityFontTextAttribute, NSAccessibilityForegroundColorTextAttribute, + NSAccessibilityFrontmostAttribute, NSAccessibilityFullScreenButtonAttribute, + NSAccessibilityFullScreenButtonSubrole, NSAccessibilityGridRole, NSAccessibilityGroupRole, + NSAccessibilityGrowAreaAttribute, NSAccessibilityGrowAreaRole, NSAccessibilityHandleRole, + NSAccessibilityHandlesAttribute, NSAccessibilityHeadIndentMarkerTypeValue, + NSAccessibilityHeaderAttribute, NSAccessibilityHelpAttribute, + NSAccessibilityHelpTagCreatedNotification, NSAccessibilityHelpTagRole, + NSAccessibilityHiddenAttribute, NSAccessibilityHorizontalOrientationValue, + NSAccessibilityHorizontalScrollBarAttribute, + NSAccessibilityHorizontalUnitDescriptionAttribute, NSAccessibilityHorizontalUnitsAttribute, + NSAccessibilityIdentifierAttribute, NSAccessibilityImageRole, + NSAccessibilityInchesUnitValue, NSAccessibilityIncrementAction, + NSAccessibilityIncrementArrowSubrole, NSAccessibilityIncrementButtonAttribute, + NSAccessibilityIncrementPageSubrole, NSAccessibilityIncrementorRole, + NSAccessibilityIndexAttribute, NSAccessibilityInsertionPointLineNumberAttribute, + NSAccessibilityLabelUIElementsAttribute, NSAccessibilityLabelValueAttribute, + NSAccessibilityLanguageTextAttribute, NSAccessibilityLayoutAreaRole, + NSAccessibilityLayoutChangedNotification, NSAccessibilityLayoutItemRole, + NSAccessibilityLayoutPointForScreenPointParameterizedAttribute, + NSAccessibilityLayoutSizeForScreenSizeParameterizedAttribute, + NSAccessibilityLeftTabStopMarkerTypeValue, NSAccessibilityLevelIndicatorRole, + NSAccessibilityLineForIndexParameterizedAttribute, NSAccessibilityLinkRole, + NSAccessibilityLinkTextAttribute, NSAccessibilityLinkedUIElementsAttribute, + NSAccessibilityListItemIndexTextAttribute, NSAccessibilityListItemLevelTextAttribute, + NSAccessibilityListItemPrefixTextAttribute, NSAccessibilityListRole, + NSAccessibilityLoadingToken, NSAccessibilityMainAttribute, + NSAccessibilityMainWindowAttribute, NSAccessibilityMainWindowChangedNotification, + NSAccessibilityMarkedMisspelledTextAttribute, NSAccessibilityMarkerGroupUIElementAttribute, + NSAccessibilityMarkerTypeAttribute, NSAccessibilityMarkerTypeDescriptionAttribute, + NSAccessibilityMarkerUIElementsAttribute, NSAccessibilityMarkerValuesAttribute, + NSAccessibilityMatteContentUIElementAttribute, NSAccessibilityMatteHoleAttribute, + NSAccessibilityMatteRole, NSAccessibilityMaxValueAttribute, + NSAccessibilityMenuBarAttribute, NSAccessibilityMenuBarItemRole, + NSAccessibilityMenuBarRole, NSAccessibilityMenuButtonRole, NSAccessibilityMenuItemRole, + NSAccessibilityMenuRole, NSAccessibilityMinValueAttribute, + NSAccessibilityMinimizeButtonAttribute, NSAccessibilityMinimizeButtonSubrole, + NSAccessibilityMinimizedAttribute, NSAccessibilityMisspelledTextAttribute, + NSAccessibilityModalAttribute, NSAccessibilityMovedNotification, + NSAccessibilityNextContentsAttribute, NSAccessibilityNotificationName, + NSAccessibilityNotificationUserInfoKey, NSAccessibilityNumberOfCharactersAttribute, + NSAccessibilityOrderedByRowAttribute, NSAccessibilityOrientation, + NSAccessibilityOrientationAttribute, NSAccessibilityOrientationHorizontal, NSAccessibilityOrientationUnknown, NSAccessibilityOrientationValue, - NSAccessibilityOrientationVertical, NSAccessibilityParameterizedAttributeName, - NSAccessibilityPriorityHigh, NSAccessibilityPriorityLevel, NSAccessibilityPriorityLow, - NSAccessibilityPriorityMedium, NSAccessibilityRole, NSAccessibilityRulerMarkerType, - NSAccessibilityRulerMarkerTypeIndentFirstLine, NSAccessibilityRulerMarkerTypeIndentHead, - NSAccessibilityRulerMarkerTypeIndentTail, NSAccessibilityRulerMarkerTypeTabStopCenter, - NSAccessibilityRulerMarkerTypeTabStopDecimal, NSAccessibilityRulerMarkerTypeTabStopLeft, - NSAccessibilityRulerMarkerTypeTabStopRight, NSAccessibilityRulerMarkerTypeUnknown, - NSAccessibilityRulerMarkerTypeValue, NSAccessibilityRulerUnitValue, + NSAccessibilityOrientationVertical, NSAccessibilityOutlineRole, + NSAccessibilityOutlineRowSubrole, NSAccessibilityOverflowButtonAttribute, + NSAccessibilityPageRole, NSAccessibilityParameterizedAttributeName, + NSAccessibilityParentAttribute, NSAccessibilityPicasUnitValue, NSAccessibilityPickAction, + NSAccessibilityPlaceholderValueAttribute, NSAccessibilityPointsUnitValue, + NSAccessibilityPopUpButtonRole, NSAccessibilityPopoverRole, + NSAccessibilityPositionAttribute, NSAccessibilityPressAction, + NSAccessibilityPreviousContentsAttribute, NSAccessibilityPriorityHigh, + NSAccessibilityPriorityKey, NSAccessibilityPriorityLevel, NSAccessibilityPriorityLow, + NSAccessibilityPriorityMedium, NSAccessibilityProgressIndicatorRole, + NSAccessibilityProxyAttribute, NSAccessibilityRTFForRangeParameterizedAttribute, + NSAccessibilityRadioButtonRole, NSAccessibilityRadioGroupRole, NSAccessibilityRaiseAction, + NSAccessibilityRangeForIndexParameterizedAttribute, + NSAccessibilityRangeForLineParameterizedAttribute, + NSAccessibilityRangeForPositionParameterizedAttribute, + NSAccessibilityRatingIndicatorSubrole, NSAccessibilityRelevanceIndicatorRole, + NSAccessibilityRequiredAttribute, NSAccessibilityResizedNotification, + NSAccessibilityRightTabStopMarkerTypeValue, NSAccessibilityRole, + NSAccessibilityRoleAttribute, NSAccessibilityRoleDescriptionAttribute, + NSAccessibilityRowCollapsedNotification, NSAccessibilityRowCountAttribute, + NSAccessibilityRowCountChangedNotification, NSAccessibilityRowExpandedNotification, + NSAccessibilityRowHeaderUIElementsAttribute, NSAccessibilityRowIndexRangeAttribute, + NSAccessibilityRowRole, NSAccessibilityRowsAttribute, NSAccessibilityRulerMarkerRole, + NSAccessibilityRulerMarkerType, NSAccessibilityRulerMarkerTypeIndentFirstLine, + NSAccessibilityRulerMarkerTypeIndentHead, NSAccessibilityRulerMarkerTypeIndentTail, + NSAccessibilityRulerMarkerTypeTabStopCenter, NSAccessibilityRulerMarkerTypeTabStopDecimal, + NSAccessibilityRulerMarkerTypeTabStopLeft, NSAccessibilityRulerMarkerTypeTabStopRight, + NSAccessibilityRulerMarkerTypeUnknown, NSAccessibilityRulerMarkerTypeValue, + NSAccessibilityRulerRole, NSAccessibilityRulerUnitValue, + NSAccessibilityScreenPointForLayoutPointParameterizedAttribute, + NSAccessibilityScreenSizeForLayoutSizeParameterizedAttribute, + NSAccessibilityScrollAreaRole, NSAccessibilityScrollBarRole, + NSAccessibilitySearchButtonAttribute, NSAccessibilitySearchFieldSubrole, + NSAccessibilitySearchMenuAttribute, NSAccessibilitySectionListSubrole, + NSAccessibilitySecureTextFieldSubrole, NSAccessibilitySelectedAttribute, + NSAccessibilitySelectedCellsAttribute, NSAccessibilitySelectedCellsChangedNotification, + NSAccessibilitySelectedChildrenAttribute, + NSAccessibilitySelectedChildrenChangedNotification, + NSAccessibilitySelectedChildrenMovedNotification, NSAccessibilitySelectedColumnsAttribute, + NSAccessibilitySelectedColumnsChangedNotification, NSAccessibilitySelectedRowsAttribute, + NSAccessibilitySelectedRowsChangedNotification, NSAccessibilitySelectedTextAttribute, + NSAccessibilitySelectedTextChangedNotification, NSAccessibilitySelectedTextRangeAttribute, + NSAccessibilitySelectedTextRangesAttribute, + NSAccessibilityServesAsTitleForUIElementsAttribute, NSAccessibilityShadowTextAttribute, + NSAccessibilitySharedCharacterRangeAttribute, NSAccessibilitySharedFocusElementsAttribute, + NSAccessibilitySharedTextUIElementsAttribute, NSAccessibilitySheetCreatedNotification, + NSAccessibilitySheetRole, NSAccessibilityShowAlternateUIAction, + NSAccessibilityShowDefaultUIAction, NSAccessibilityShowMenuAction, + NSAccessibilityShownMenuAttribute, NSAccessibilitySizeAttribute, NSAccessibilitySliderRole, + NSAccessibilitySortButtonRole, NSAccessibilitySortButtonSubrole, NSAccessibilitySortDirection, NSAccessibilitySortDirectionAscending, - NSAccessibilitySortDirectionDescending, NSAccessibilitySortDirectionUnknown, - NSAccessibilitySortDirectionValue, NSAccessibilitySubrole, NSAccessibilityUnits, - NSAccessibilityUnitsCentimeters, NSAccessibilityUnitsInches, NSAccessibilityUnitsPicas, - NSAccessibilityUnitsPoints, NSAccessibilityUnitsUnknown, + NSAccessibilitySortDirectionAttribute, NSAccessibilitySortDirectionDescending, + NSAccessibilitySortDirectionUnknown, NSAccessibilitySortDirectionValue, + NSAccessibilitySplitGroupRole, NSAccessibilitySplitterRole, + NSAccessibilitySplittersAttribute, NSAccessibilityStandardWindowSubrole, + NSAccessibilityStaticTextRole, NSAccessibilityStrikethroughColorTextAttribute, + NSAccessibilityStrikethroughTextAttribute, + NSAccessibilityStringForRangeParameterizedAttribute, + NSAccessibilityStyleRangeForIndexParameterizedAttribute, NSAccessibilitySubrole, + NSAccessibilitySubroleAttribute, NSAccessibilitySuperscriptTextAttribute, + NSAccessibilitySwitchSubrole, NSAccessibilitySystemDialogSubrole, + NSAccessibilitySystemFloatingWindowSubrole, NSAccessibilitySystemWideRole, + NSAccessibilityTabButtonSubrole, NSAccessibilityTabGroupRole, NSAccessibilityTableRole, + NSAccessibilityTableRowSubrole, NSAccessibilityTabsAttribute, + NSAccessibilityTailIndentMarkerTypeValue, NSAccessibilityTextAlignmentAttribute, + NSAccessibilityTextAreaRole, NSAccessibilityTextAttachmentSubrole, + NSAccessibilityTextFieldRole, NSAccessibilityTextLinkSubrole, + NSAccessibilityTimelineSubrole, NSAccessibilityTitleAttribute, + NSAccessibilityTitleChangedNotification, NSAccessibilityTitleUIElementAttribute, + NSAccessibilityToggleSubrole, NSAccessibilityToolbarButtonAttribute, + NSAccessibilityToolbarButtonSubrole, NSAccessibilityToolbarRole, + NSAccessibilityTopLevelUIElementAttribute, NSAccessibilityUIElementDestroyedNotification, + NSAccessibilityUIElementsKey, NSAccessibilityURLAttribute, + NSAccessibilityUnderlineColorTextAttribute, NSAccessibilityUnderlineTextAttribute, + NSAccessibilityUnitDescriptionAttribute, NSAccessibilityUnits, + NSAccessibilityUnitsAttribute, NSAccessibilityUnitsCentimeters, + NSAccessibilityUnitsChangedNotification, NSAccessibilityUnitsInches, + NSAccessibilityUnitsPicas, NSAccessibilityUnitsPoints, NSAccessibilityUnitsUnknown, + NSAccessibilityUnknownMarkerTypeValue, NSAccessibilityUnknownOrientationValue, + NSAccessibilityUnknownRole, NSAccessibilityUnknownSortDirectionValue, + NSAccessibilityUnknownSubrole, NSAccessibilityUnknownUnitValue, + NSAccessibilityValueAttribute, NSAccessibilityValueChangedNotification, + NSAccessibilityValueDescriptionAttribute, NSAccessibilityValueIndicatorRole, + NSAccessibilityVerticalOrientationValue, NSAccessibilityVerticalScrollBarAttribute, + NSAccessibilityVerticalUnitDescriptionAttribute, NSAccessibilityVerticalUnitsAttribute, + NSAccessibilityVisibleCellsAttribute, NSAccessibilityVisibleCharacterRangeAttribute, + NSAccessibilityVisibleChildrenAttribute, NSAccessibilityVisibleColumnsAttribute, + NSAccessibilityVisibleNameKey, NSAccessibilityVisibleRowsAttribute, + NSAccessibilityWarningValueAttribute, NSAccessibilityWindowAttribute, + NSAccessibilityWindowCreatedNotification, NSAccessibilityWindowDeminiaturizedNotification, + NSAccessibilityWindowMiniaturizedNotification, NSAccessibilityWindowMovedNotification, + NSAccessibilityWindowResizedNotification, NSAccessibilityWindowRole, + NSAccessibilityWindowsAttribute, NSAccessibilityZoomButtonAttribute, + NSAccessibilityZoomButtonSubrole, }; pub use super::NSAccessibilityCustomAction::NSAccessibilityCustomAction; pub use super::NSAccessibilityCustomRotor::{ @@ -337,8 +503,10 @@ mod __exported { }; pub use super::NSActionCell::NSActionCell; pub use super::NSAlert::{ - NSAlert, NSAlertDelegate, NSAlertStyle, NSAlertStyleCritical, NSAlertStyleInformational, - NSAlertStyleWarning, + NSAlert, NSAlertDelegate, NSAlertFirstButtonReturn, NSAlertSecondButtonReturn, + NSAlertStyle, NSAlertStyleCritical, NSAlertStyleInformational, NSAlertStyleWarning, + NSAlertThirdButtonReturn, NSCriticalAlertStyle, NSInformationalAlertStyle, + NSWarningAlertStyle, }; pub use super::NSAlignmentFeedbackFilter::{ NSAlignmentFeedbackFilter, NSAlignmentFeedbackToken, @@ -347,27 +515,74 @@ mod __exported { NSAnimatablePropertyContainer, NSAnimatablePropertyKey, NSAnimation, NSAnimationBlocking, NSAnimationBlockingMode, NSAnimationCurve, NSAnimationDelegate, NSAnimationEaseIn, NSAnimationEaseInOut, NSAnimationEaseOut, NSAnimationLinear, NSAnimationNonblocking, - NSAnimationNonblockingThreaded, NSViewAnimation, NSViewAnimationEffectName, - NSViewAnimationKey, + NSAnimationNonblockingThreaded, NSAnimationProgressMark, + NSAnimationProgressMarkNotification, NSAnimationTriggerOrderIn, NSAnimationTriggerOrderOut, + NSViewAnimation, NSViewAnimationEffectKey, NSViewAnimationEffectName, + NSViewAnimationEndFrameKey, NSViewAnimationFadeInEffect, NSViewAnimationFadeOutEffect, + NSViewAnimationKey, NSViewAnimationStartFrameKey, NSViewAnimationTargetKey, }; pub use super::NSAnimationContext::NSAnimationContext; - pub use super::NSAppearance::{NSAppearance, NSAppearanceCustomization, NSAppearanceName}; + pub use super::NSAppearance::{ + NSAppearance, NSAppearanceCustomization, NSAppearanceName, + NSAppearanceNameAccessibilityHighContrastAqua, + NSAppearanceNameAccessibilityHighContrastDarkAqua, + NSAppearanceNameAccessibilityHighContrastVibrantDark, + NSAppearanceNameAccessibilityHighContrastVibrantLight, NSAppearanceNameAqua, + NSAppearanceNameDarkAqua, NSAppearanceNameLightContent, NSAppearanceNameVibrantDark, + NSAppearanceNameVibrantLight, + }; pub use super::NSApplication::{ - NSAboutPanelOptionKey, NSApplication, NSApplicationDelegate, NSApplicationDelegateReply, - NSApplicationDelegateReplyCancel, NSApplicationDelegateReplyFailure, - NSApplicationDelegateReplySuccess, NSApplicationOcclusionState, - NSApplicationOcclusionStateVisible, NSApplicationPresentationAutoHideDock, - NSApplicationPresentationAutoHideMenuBar, NSApplicationPresentationAutoHideToolbar, - NSApplicationPresentationDefault, NSApplicationPresentationDisableAppleMenu, + NSAboutPanelOptionApplicationIcon, NSAboutPanelOptionApplicationName, + NSAboutPanelOptionApplicationVersion, NSAboutPanelOptionCredits, NSAboutPanelOptionKey, + NSAboutPanelOptionVersion, NSApp, NSAppKitVersionNumber, NSAppKitVersionNumber10_0, + NSAppKitVersionNumber10_1, NSAppKitVersionNumber10_10, NSAppKitVersionNumber10_10_2, + NSAppKitVersionNumber10_10_3, NSAppKitVersionNumber10_10_4, NSAppKitVersionNumber10_10_5, + NSAppKitVersionNumber10_10_Max, NSAppKitVersionNumber10_11, NSAppKitVersionNumber10_11_1, + NSAppKitVersionNumber10_11_2, NSAppKitVersionNumber10_11_3, NSAppKitVersionNumber10_12, + NSAppKitVersionNumber10_12_1, NSAppKitVersionNumber10_12_2, NSAppKitVersionNumber10_13, + NSAppKitVersionNumber10_13_1, NSAppKitVersionNumber10_13_2, NSAppKitVersionNumber10_13_4, + NSAppKitVersionNumber10_14, NSAppKitVersionNumber10_14_1, NSAppKitVersionNumber10_14_2, + NSAppKitVersionNumber10_14_3, NSAppKitVersionNumber10_14_4, NSAppKitVersionNumber10_14_5, + NSAppKitVersionNumber10_15, NSAppKitVersionNumber10_15_1, NSAppKitVersionNumber10_15_2, + NSAppKitVersionNumber10_15_3, NSAppKitVersionNumber10_15_4, NSAppKitVersionNumber10_15_5, + NSAppKitVersionNumber10_15_6, NSAppKitVersionNumber10_2, NSAppKitVersionNumber10_2_3, + NSAppKitVersionNumber10_3, NSAppKitVersionNumber10_3_2, NSAppKitVersionNumber10_3_3, + NSAppKitVersionNumber10_3_5, NSAppKitVersionNumber10_3_7, NSAppKitVersionNumber10_3_9, + NSAppKitVersionNumber10_4, NSAppKitVersionNumber10_4_1, NSAppKitVersionNumber10_4_3, + NSAppKitVersionNumber10_4_4, NSAppKitVersionNumber10_4_7, NSAppKitVersionNumber10_5, + NSAppKitVersionNumber10_5_2, NSAppKitVersionNumber10_5_3, NSAppKitVersionNumber10_6, + NSAppKitVersionNumber10_7, NSAppKitVersionNumber10_7_2, NSAppKitVersionNumber10_7_3, + NSAppKitVersionNumber10_7_4, NSAppKitVersionNumber10_8, NSAppKitVersionNumber10_9, + NSAppKitVersionNumber11_0, NSAppKitVersionNumber11_1, NSAppKitVersionNumber11_2, + NSAppKitVersionNumber11_3, NSAppKitVersionNumber11_4, NSApplication, NSApplicationDelegate, + NSApplicationDelegateReply, NSApplicationDelegateReplyCancel, + NSApplicationDelegateReplyFailure, NSApplicationDelegateReplySuccess, + NSApplicationDidBecomeActiveNotification, NSApplicationDidChangeOcclusionStateNotification, + NSApplicationDidChangeScreenParametersNotification, + NSApplicationDidFinishLaunchingNotification, NSApplicationDidHideNotification, + NSApplicationDidResignActiveNotification, NSApplicationDidUnhideNotification, + NSApplicationDidUpdateNotification, NSApplicationLaunchIsDefaultLaunchKey, + NSApplicationLaunchRemoteNotificationKey, NSApplicationLaunchUserNotificationKey, + NSApplicationOcclusionState, NSApplicationOcclusionStateVisible, + NSApplicationPresentationAutoHideDock, NSApplicationPresentationAutoHideMenuBar, + NSApplicationPresentationAutoHideToolbar, NSApplicationPresentationDefault, + NSApplicationPresentationDisableAppleMenu, NSApplicationPresentationDisableCursorLocationAssistance, NSApplicationPresentationDisableForceQuit, NSApplicationPresentationDisableHideApplication, NSApplicationPresentationDisableMenuBarTransparency, NSApplicationPresentationDisableProcessSwitching, NSApplicationPresentationDisableSessionTermination, NSApplicationPresentationFullScreen, NSApplicationPresentationHideDock, NSApplicationPresentationHideMenuBar, - NSApplicationPresentationOptions, NSApplicationPrintReply, NSApplicationTerminateReply, - NSCriticalRequest, NSInformationalRequest, NSModalResponse, NSPrintingCancelled, - NSPrintingFailure, NSPrintingReplyLater, NSPrintingSuccess, NSRemoteNotificationType, + NSApplicationPresentationOptions, NSApplicationPrintReply, + NSApplicationProtectedDataDidBecomeAvailableNotification, + NSApplicationProtectedDataWillBecomeUnavailableNotification, NSApplicationTerminateReply, + NSApplicationWillBecomeActiveNotification, NSApplicationWillFinishLaunchingNotification, + NSApplicationWillHideNotification, NSApplicationWillResignActiveNotification, + NSApplicationWillTerminateNotification, NSApplicationWillUnhideNotification, + NSApplicationWillUpdateNotification, NSCriticalRequest, NSEventTrackingRunLoopMode, + NSInformationalRequest, NSModalPanelRunLoopMode, NSModalResponse, NSModalResponseAbort, + NSModalResponseContinue, NSModalResponseStop, NSPrintingCancelled, NSPrintingFailure, + NSPrintingReplyLater, NSPrintingSuccess, NSRemoteNotificationType, NSRemoteNotificationTypeAlert, NSRemoteNotificationTypeBadge, NSRemoteNotificationTypeNone, NSRemoteNotificationTypeSound, NSRequestUserAttentionType, NSRunAbortedResponse, NSRunContinuesResponse, NSRunStoppedResponse, NSServiceProviderName, @@ -376,85 +591,153 @@ mod __exported { }; pub use super::NSArrayController::NSArrayController; pub use super::NSAttributedString::{ + NSAppearanceDocumentAttribute, NSAttachmentAttributeName, NSAttributedStringDocumentAttributeKey, NSAttributedStringDocumentReadingOptionKey, - NSAttributedStringDocumentType, NSNoUnderlineStyle, NSSingleUnderlineStyle, - NSSpellingState, NSSpellingStateGrammarFlag, NSSpellingStateSpellingFlag, - NSTextEffectStyle, NSTextLayoutSectionKey, NSTextScalingStandard, NSTextScalingType, - NSTextScalingiOS, NSUnderlineStyle, NSUnderlineStyleByWord, NSUnderlineStyleDouble, + NSAttributedStringDocumentType, NSAuthorDocumentAttribute, NSBackgroundColorAttributeName, + NSBackgroundColorDocumentAttribute, NSBaseURLDocumentOption, NSBaselineOffsetAttributeName, + NSBottomMarginDocumentAttribute, NSCategoryDocumentAttribute, + NSCharacterEncodingDocumentAttribute, NSCharacterEncodingDocumentOption, + NSCharacterShapeAttributeName, NSCocoaVersionDocumentAttribute, NSCommentDocumentAttribute, + NSCompanyDocumentAttribute, NSConvertedDocumentAttribute, NSCopyrightDocumentAttribute, + NSCreationTimeDocumentAttribute, NSCursorAttributeName, + NSDefaultAttributesDocumentAttribute, NSDefaultAttributesDocumentOption, + NSDefaultTabIntervalDocumentAttribute, NSDocFormatTextDocumentType, + NSDocumentTypeDocumentAttribute, NSDocumentTypeDocumentOption, NSEditorDocumentAttribute, + NSExcludedElementsDocumentAttribute, NSExpansionAttributeName, NSFileTypeDocumentAttribute, + NSFileTypeDocumentOption, NSFontAttributeName, NSForegroundColorAttributeName, + NSGlyphInfoAttributeName, NSHTMLTextDocumentType, NSHyphenationFactorDocumentAttribute, + NSKernAttributeName, NSKeywordsDocumentAttribute, NSLeftMarginDocumentAttribute, + NSLigatureAttributeName, NSLinkAttributeName, NSMacSimpleTextDocumentType, + NSManagerDocumentAttribute, NSMarkedClauseSegmentAttributeName, + NSModificationTimeDocumentAttribute, NSNoUnderlineStyle, NSObliquenessAttributeName, + NSOfficeOpenXMLTextDocumentType, NSOpenDocumentTextDocumentType, + NSPaperSizeDocumentAttribute, NSParagraphStyleAttributeName, NSPlainTextDocumentType, + NSPrefixSpacesDocumentAttribute, NSRTFDTextDocumentType, NSRTFTextDocumentType, + NSReadOnlyDocumentAttribute, NSRightMarginDocumentAttribute, NSShadowAttributeName, + NSSingleUnderlineStyle, NSSourceTextScalingDocumentAttribute, + NSSourceTextScalingDocumentOption, NSSpellingState, NSSpellingStateAttributeName, + NSSpellingStateGrammarFlag, NSSpellingStateSpellingFlag, NSStrikethroughColorAttributeName, + NSStrikethroughStyleAttributeName, NSStrokeColorAttributeName, NSStrokeWidthAttributeName, + NSSubjectDocumentAttribute, NSSuperscriptAttributeName, NSTargetTextScalingDocumentOption, + NSTextAlternativesAttributeName, NSTextEffectAttributeName, NSTextEffectLetterpressStyle, + NSTextEffectStyle, NSTextEncodingNameDocumentAttribute, NSTextEncodingNameDocumentOption, + NSTextLayoutSectionKey, NSTextLayoutSectionOrientation, NSTextLayoutSectionRange, + NSTextLayoutSectionsAttribute, NSTextScalingDocumentAttribute, NSTextScalingStandard, + NSTextScalingType, NSTextScalingiOS, NSTextSizeMultiplierDocumentOption, + NSTimeoutDocumentOption, NSTitleDocumentAttribute, NSToolTipAttributeName, + NSTopMarginDocumentAttribute, NSTrackingAttributeName, NSUnderlineByWord, + NSUnderlineByWordMask, NSUnderlineColorAttributeName, NSUnderlinePatternDash, + NSUnderlinePatternDashDot, NSUnderlinePatternDashDotDot, NSUnderlinePatternDot, + NSUnderlinePatternSolid, NSUnderlineStrikethroughMask, NSUnderlineStyle, + NSUnderlineStyleAttributeName, NSUnderlineStyleByWord, NSUnderlineStyleDouble, NSUnderlineStyleNone, NSUnderlineStylePatternDash, NSUnderlineStylePatternDashDot, NSUnderlineStylePatternDashDotDot, NSUnderlineStylePatternDot, NSUnderlineStylePatternSolid, NSUnderlineStyleSingle, NSUnderlineStyleThick, - NSWritingDirectionEmbedding, NSWritingDirectionFormatType, NSWritingDirectionOverride, + NSUsesScreenFontsDocumentAttribute, NSVerticalGlyphFormAttributeName, + NSViewModeDocumentAttribute, NSViewSizeDocumentAttribute, NSViewZoomDocumentAttribute, + NSWebArchiveTextDocumentType, NSWebPreferencesDocumentOption, + NSWebResourceLoadDelegateDocumentOption, NSWordMLTextDocumentType, + NSWritingDirectionAttributeName, NSWritingDirectionEmbedding, NSWritingDirectionFormatType, + NSWritingDirectionOverride, }; pub use super::NSBezierPath::{ - NSBezierPath, NSBezierPathElement, NSBezierPathElementClosePath, + NSBevelLineJoinStyle, NSBezierPath, NSBezierPathElement, NSBezierPathElementClosePath, NSBezierPathElementCurveTo, NSBezierPathElementLineTo, NSBezierPathElementMoveTo, - NSLineCapStyle, NSLineCapStyleButt, NSLineCapStyleRound, NSLineCapStyleSquare, - NSLineJoinStyle, NSLineJoinStyleBevel, NSLineJoinStyleMiter, NSLineJoinStyleRound, - NSWindingRule, NSWindingRuleEvenOdd, NSWindingRuleNonZero, + NSButtLineCapStyle, NSClosePathBezierPathElement, NSCurveToBezierPathElement, + NSEvenOddWindingRule, NSLineCapStyle, NSLineCapStyleButt, NSLineCapStyleRound, + NSLineCapStyleSquare, NSLineJoinStyle, NSLineJoinStyleBevel, NSLineJoinStyleMiter, + NSLineJoinStyleRound, NSLineToBezierPathElement, NSMiterLineJoinStyle, + NSMoveToBezierPathElement, NSNonZeroWindingRule, NSRoundLineCapStyle, NSRoundLineJoinStyle, + NSSquareLineCapStyle, NSWindingRule, NSWindingRuleEvenOdd, NSWindingRuleNonZero, }; pub use super::NSBitmapImageRep::{ - NSBitmapFormat, NSBitmapFormatAlphaFirst, NSBitmapFormatAlphaNonpremultiplied, + NS16BitBigEndianBitmapFormat, NS16BitLittleEndianBitmapFormat, + NS32BitBigEndianBitmapFormat, NS32BitLittleEndianBitmapFormat, NSAlphaFirstBitmapFormat, + NSAlphaNonpremultipliedBitmapFormat, NSBMPFileType, NSBitmapFormat, + NSBitmapFormatAlphaFirst, NSBitmapFormatAlphaNonpremultiplied, NSBitmapFormatFloatingPointSamples, NSBitmapFormatSixteenBitBigEndian, NSBitmapFormatSixteenBitLittleEndian, NSBitmapFormatThirtyTwoBitBigEndian, NSBitmapFormatThirtyTwoBitLittleEndian, NSBitmapImageFileType, NSBitmapImageFileTypeBMP, NSBitmapImageFileTypeGIF, NSBitmapImageFileTypeJPEG, NSBitmapImageFileTypeJPEG2000, NSBitmapImageFileTypePNG, NSBitmapImageFileTypeTIFF, NSBitmapImageRep, - NSBitmapImageRepPropertyKey, NSImageRepLoadStatus, NSImageRepLoadStatusCompleted, + NSBitmapImageRepPropertyKey, NSFloatingPointSamplesBitmapFormat, NSGIFFileType, + NSImageColorSyncProfileData, NSImageCompressionFactor, NSImageCompressionMethod, + NSImageCurrentFrame, NSImageCurrentFrameDuration, NSImageDitherTransparency, + NSImageEXIFData, NSImageFallbackBackgroundColor, NSImageFrameCount, NSImageGamma, + NSImageIPTCData, NSImageInterlaced, NSImageLoopCount, NSImageProgressive, + NSImageRGBColorTable, NSImageRepLoadStatus, NSImageRepLoadStatusCompleted, NSImageRepLoadStatusInvalidData, NSImageRepLoadStatusReadingHeader, NSImageRepLoadStatusUnexpectedEOF, NSImageRepLoadStatusUnknownType, - NSImageRepLoadStatusWillNeedAllData, NSTIFFCompression, NSTIFFCompressionCCITTFAX3, - NSTIFFCompressionCCITTFAX4, NSTIFFCompressionJPEG, NSTIFFCompressionLZW, - NSTIFFCompressionNEXT, NSTIFFCompressionNone, NSTIFFCompressionOldJPEG, - NSTIFFCompressionPackBits, + NSImageRepLoadStatusWillNeedAllData, NSJPEG2000FileType, NSJPEGFileType, NSPNGFileType, + NSTIFFCompression, NSTIFFCompressionCCITTFAX3, NSTIFFCompressionCCITTFAX4, + NSTIFFCompressionJPEG, NSTIFFCompressionLZW, NSTIFFCompressionNEXT, NSTIFFCompressionNone, + NSTIFFCompressionOldJPEG, NSTIFFCompressionPackBits, NSTIFFFileType, }; pub use super::NSBox::{ NSAboveBottom, NSAboveTop, NSAtBottom, NSAtTop, NSBelowBottom, NSBelowTop, NSBox, - NSBoxCustom, NSBoxPrimary, NSBoxSeparator, NSBoxType, NSNoTitle, NSTitlePosition, + NSBoxCustom, NSBoxOldStyle, NSBoxPrimary, NSBoxSecondary, NSBoxSeparator, NSBoxType, + NSNoTitle, NSTitlePosition, }; pub use super::NSBrowser::{ - NSBrowser, NSBrowserAutoColumnResizing, NSBrowserColumnResizingType, - NSBrowserColumnsAutosaveName, NSBrowserDelegate, NSBrowserDropAbove, NSBrowserDropOn, - NSBrowserDropOperation, NSBrowserNoColumnResizing, NSBrowserUserColumnResizing, + NSAppKitVersionNumberWithColumnResizingBrowser, + NSAppKitVersionNumberWithContinuousScrollingBrowser, NSBrowser, + NSBrowserAutoColumnResizing, NSBrowserColumnConfigurationDidChangeNotification, + NSBrowserColumnResizingType, NSBrowserColumnsAutosaveName, NSBrowserDelegate, + NSBrowserDropAbove, NSBrowserDropOn, NSBrowserDropOperation, NSBrowserNoColumnResizing, + NSBrowserUserColumnResizing, }; pub use super::NSBrowserCell::NSBrowserCell; pub use super::NSButton::NSButton; pub use super::NSButtonCell::{ - NSBezelStyle, NSBezelStyleCircular, NSBezelStyleDisclosure, NSBezelStyleHelpButton, - NSBezelStyleInline, NSBezelStyleRecessed, NSBezelStyleRegularSquare, NSBezelStyleRoundRect, - NSBezelStyleRounded, NSBezelStyleRoundedDisclosure, NSBezelStyleShadowlessSquare, - NSBezelStyleSmallSquare, NSBezelStyleTexturedRounded, NSBezelStyleTexturedSquare, - NSButtonCell, NSButtonType, NSButtonTypeAccelerator, NSButtonTypeMomentaryChange, - NSButtonTypeMomentaryLight, NSButtonTypeMomentaryPushIn, NSButtonTypeMultiLevelAccelerator, - NSButtonTypeOnOff, NSButtonTypePushOnPushOff, NSButtonTypeRadio, NSButtonTypeSwitch, - NSButtonTypeToggle, NSGradientConcaveStrong, NSGradientConcaveWeak, NSGradientConvexStrong, - NSGradientConvexWeak, NSGradientNone, NSGradientType, + NSAcceleratorButton, NSBezelStyle, NSBezelStyleCircular, NSBezelStyleDisclosure, + NSBezelStyleHelpButton, NSBezelStyleInline, NSBezelStyleRecessed, + NSBezelStyleRegularSquare, NSBezelStyleRoundRect, NSBezelStyleRounded, + NSBezelStyleRoundedDisclosure, NSBezelStyleShadowlessSquare, NSBezelStyleSmallSquare, + NSBezelStyleTexturedRounded, NSBezelStyleTexturedSquare, NSButtonCell, NSButtonType, + NSButtonTypeAccelerator, NSButtonTypeMomentaryChange, NSButtonTypeMomentaryLight, + NSButtonTypeMomentaryPushIn, NSButtonTypeMultiLevelAccelerator, NSButtonTypeOnOff, + NSButtonTypePushOnPushOff, NSButtonTypeRadio, NSButtonTypeSwitch, NSButtonTypeToggle, + NSCircularBezelStyle, NSDisclosureBezelStyle, NSGradientConcaveStrong, + NSGradientConcaveWeak, NSGradientConvexStrong, NSGradientConvexWeak, NSGradientNone, + NSGradientType, NSHelpButtonBezelStyle, NSInlineBezelStyle, NSMomentaryChangeButton, + NSMomentaryLight, NSMomentaryLightButton, NSMomentaryPushButton, NSMomentaryPushInButton, + NSMultiLevelAcceleratorButton, NSOnOffButton, NSPushOnPushOffButton, NSRadioButton, + NSRecessedBezelStyle, NSRegularSquareBezelStyle, NSRoundRectBezelStyle, + NSRoundedBezelStyle, NSRoundedDisclosureBezelStyle, NSShadowlessSquareBezelStyle, + NSSmallIconButtonBezelStyle, NSSmallSquareBezelStyle, NSSwitchButton, + NSTexturedRoundedBezelStyle, NSTexturedSquareBezelStyle, NSThickSquareBezelStyle, + NSThickerSquareBezelStyle, NSToggleButton, }; pub use super::NSButtonTouchBarItem::NSButtonTouchBarItem; pub use super::NSCIImageRep::NSCIImageRep; pub use super::NSCachedImageRep::NSCachedImageRep; pub use super::NSCandidateListTouchBarItem::{ NSCandidateListTouchBarItem, NSCandidateListTouchBarItemDelegate, + NSTouchBarItemIdentifierCandidateList, }; pub use super::NSCell::{ - NSAnyType, NSBackgroundStyle, NSBackgroundStyleEmphasized, NSBackgroundStyleLowered, - NSBackgroundStyleNormal, NSBackgroundStyleRaised, NSBlueControlTint, NSCell, - NSCellAllowsMixedState, NSCellAttribute, NSCellChangesContents, NSCellDisabled, - NSCellEditable, NSCellHasImageHorizontal, NSCellHasImageOnLeftOrBottom, - NSCellHasOverlappingImage, NSCellHighlighted, NSCellHitContentArea, - NSCellHitEditableTextArea, NSCellHitNone, NSCellHitResult, NSCellHitTrackableArea, - NSCellImagePosition, NSCellIsBordered, NSCellIsInsetButton, NSCellLightsByBackground, - NSCellLightsByContents, NSCellLightsByGray, NSCellState, NSCellStateValue, NSCellStyleMask, - NSCellType, NSChangeBackgroundCell, NSChangeBackgroundCellMask, NSChangeGrayCell, - NSChangeGrayCellMask, NSClearControlTint, NSContentsCellMask, NSControlSize, - NSControlSizeLarge, NSControlSizeMini, NSControlSizeRegular, NSControlSizeSmall, - NSControlStateValue, NSControlTint, NSDefaultControlTint, NSDoubleType, NSFloatType, + NSAnyType, NSBackgroundStyle, NSBackgroundStyleDark, NSBackgroundStyleEmphasized, + NSBackgroundStyleLight, NSBackgroundStyleLowered, NSBackgroundStyleNormal, + NSBackgroundStyleRaised, NSBlueControlTint, NSCell, NSCellAllowsMixedState, + NSCellAttribute, NSCellChangesContents, NSCellDisabled, NSCellEditable, + NSCellHasImageHorizontal, NSCellHasImageOnLeftOrBottom, NSCellHasOverlappingImage, + NSCellHighlighted, NSCellHitContentArea, NSCellHitEditableTextArea, NSCellHitNone, + NSCellHitResult, NSCellHitTrackableArea, NSCellImagePosition, NSCellIsBordered, + NSCellIsInsetButton, NSCellLightsByBackground, NSCellLightsByContents, NSCellLightsByGray, + NSCellState, NSCellStateValue, NSCellStyleMask, NSCellType, NSChangeBackgroundCell, + NSChangeBackgroundCellMask, NSChangeGrayCell, NSChangeGrayCellMask, NSClearControlTint, + NSContentsCellMask, NSControlSize, NSControlSizeLarge, NSControlSizeMini, + NSControlSizeRegular, NSControlSizeSmall, NSControlStateValue, NSControlStateValueMixed, + NSControlStateValueOff, NSControlStateValueOn, NSControlTint, + NSControlTintDidChangeNotification, NSDefaultControlTint, NSDoubleType, NSFloatType, NSGraphiteControlTint, NSImageAbove, NSImageBelow, NSImageCellType, NSImageLeading, NSImageLeft, NSImageOnly, NSImageOverlaps, NSImageRight, NSImageScaleAxesIndependently, NSImageScaleNone, NSImageScaleProportionallyDown, NSImageScaleProportionallyUpOrDown, - NSImageScaling, NSImageTrailing, NSIntType, NSNoCellMask, NSNoImage, NSNullCellType, - NSPositiveDoubleType, NSPositiveFloatType, NSPositiveIntType, NSPushInCell, - NSPushInCellMask, NSScaleNone, NSScaleProportionally, NSScaleToFit, NSTextCellType, + NSImageScaling, NSImageTrailing, NSIntType, NSMiniControlSize, NSMixedState, NSNoCellMask, + NSNoImage, NSNullCellType, NSOffState, NSOnState, NSPositiveDoubleType, + NSPositiveFloatType, NSPositiveIntType, NSPushInCell, NSPushInCellMask, + NSRegularControlSize, NSScaleNone, NSScaleProportionally, NSScaleToFit, NSSmallControlSize, + NSTextCellType, }; pub use super::NSClickGestureRecognizer::NSClickGestureRecognizer; pub use super::NSClipView::NSClipView; @@ -488,15 +771,16 @@ mod __exported { NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging, NSCollectionLayoutSize, NSCollectionLayoutSpacing, NSCollectionLayoutSupplementaryItem, NSCollectionLayoutVisibleItem, NSCollectionViewCompositionalLayout, - NSCollectionViewCompositionalLayoutConfiguration, NSDirectionalRectEdge, - NSDirectionalRectEdgeAll, NSDirectionalRectEdgeBottom, NSDirectionalRectEdgeLeading, - NSDirectionalRectEdgeNone, NSDirectionalRectEdgeTop, NSDirectionalRectEdgeTrailing, - NSRectAlignment, NSRectAlignmentBottom, NSRectAlignmentBottomLeading, - NSRectAlignmentBottomTrailing, NSRectAlignmentLeading, NSRectAlignmentNone, - NSRectAlignmentTop, NSRectAlignmentTopLeading, NSRectAlignmentTopTrailing, - NSRectAlignmentTrailing, + NSCollectionViewCompositionalLayoutConfiguration, NSDirectionalEdgeInsetsZero, + NSDirectionalRectEdge, NSDirectionalRectEdgeAll, NSDirectionalRectEdgeBottom, + NSDirectionalRectEdgeLeading, NSDirectionalRectEdgeNone, NSDirectionalRectEdgeTop, + NSDirectionalRectEdgeTrailing, NSRectAlignment, NSRectAlignmentBottom, + NSRectAlignmentBottomLeading, NSRectAlignmentBottomTrailing, NSRectAlignmentLeading, + NSRectAlignmentNone, NSRectAlignmentTop, NSRectAlignmentTopLeading, + NSRectAlignmentTopTrailing, NSRectAlignmentTrailing, }; pub use super::NSCollectionViewFlowLayout::{ + NSCollectionElementKindSectionFooter, NSCollectionElementKindSectionHeader, NSCollectionViewDelegateFlowLayout, NSCollectionViewFlowLayout, NSCollectionViewFlowLayoutInvalidationContext, NSCollectionViewScrollDirection, NSCollectionViewScrollDirectionHorizontal, NSCollectionViewScrollDirectionVertical, @@ -505,8 +789,8 @@ mod __exported { pub use super::NSCollectionViewLayout::{ NSCollectionElementCategory, NSCollectionElementCategoryDecorationView, NSCollectionElementCategoryInterItemGap, NSCollectionElementCategoryItem, - NSCollectionElementCategorySupplementaryView, NSCollectionUpdateAction, - NSCollectionUpdateActionDelete, NSCollectionUpdateActionInsert, + NSCollectionElementCategorySupplementaryView, NSCollectionElementKindInterItemGapIndicator, + NSCollectionUpdateAction, NSCollectionUpdateActionDelete, NSCollectionUpdateActionInsert, NSCollectionUpdateActionMove, NSCollectionUpdateActionNone, NSCollectionUpdateActionReload, NSCollectionViewDecorationElementKind, NSCollectionViewLayout, NSCollectionViewLayoutAttributes, NSCollectionViewLayoutInvalidationContext, @@ -516,47 +800,67 @@ mod __exported { NSCollectionViewTransitionLayout, NSCollectionViewTransitionLayoutAnimatedKey, }; pub use super::NSColor::{ - NSColor, NSColorSystemEffect, NSColorSystemEffectDeepPressed, NSColorSystemEffectDisabled, - NSColorSystemEffectNone, NSColorSystemEffectPressed, NSColorSystemEffectRollover, - NSColorType, NSColorTypeCatalog, NSColorTypeComponentBased, NSColorTypePattern, + NSAppKitVersionNumberWithPatternColorLeakFix, NSColor, NSColorSystemEffect, + NSColorSystemEffectDeepPressed, NSColorSystemEffectDisabled, NSColorSystemEffectNone, + NSColorSystemEffectPressed, NSColorSystemEffectRollover, NSColorType, NSColorTypeCatalog, + NSColorTypeComponentBased, NSColorTypePattern, NSSystemColorsDidChangeNotification, + }; + pub use super::NSColorList::{ + NSColorList, NSColorListDidChangeNotification, NSColorListName, NSColorName, }; - pub use super::NSColorList::{NSColorList, NSColorListName, NSColorName}; pub use super::NSColorPanel::{ - NSColorChanging, NSColorPanel, NSColorPanelAllModesMask, NSColorPanelCMYKModeMask, + NSCMYKModeColorPanel, NSColorChanging, NSColorListModeColorPanel, NSColorPanel, + NSColorPanelAllModesMask, NSColorPanelCMYKModeMask, NSColorPanelColorDidChangeNotification, NSColorPanelColorListModeMask, NSColorPanelCrayonModeMask, NSColorPanelCustomPaletteModeMask, NSColorPanelGrayModeMask, NSColorPanelHSBModeMask, NSColorPanelMode, NSColorPanelModeCMYK, NSColorPanelModeColorList, NSColorPanelModeCrayon, NSColorPanelModeCustomPalette, NSColorPanelModeGray, NSColorPanelModeHSB, NSColorPanelModeNone, NSColorPanelModeRGB, NSColorPanelModeWheel, NSColorPanelOptions, - NSColorPanelRGBModeMask, NSColorPanelWheelModeMask, + NSColorPanelRGBModeMask, NSColorPanelWheelModeMask, NSCrayonModeColorPanel, + NSCustomPaletteModeColorPanel, NSGrayModeColorPanel, NSHSBModeColorPanel, + NSNoModeColorPanel, NSRGBModeColorPanel, NSWheelModeColorPanel, }; pub use super::NSColorPicker::NSColorPicker; pub use super::NSColorPickerTouchBarItem::NSColorPickerTouchBarItem; pub use super::NSColorPicking::{NSColorPickingCustom, NSColorPickingDefault}; pub use super::NSColorSampler::NSColorSampler; pub use super::NSColorSpace::{ - NSColorSpace, NSColorSpaceModel, NSColorSpaceModelCMYK, NSColorSpaceModelDeviceN, - NSColorSpaceModelGray, NSColorSpaceModelIndexed, NSColorSpaceModelLAB, - NSColorSpaceModelPatterned, NSColorSpaceModelRGB, NSColorSpaceModelUnknown, + NSCMYKColorSpaceModel, NSColorSpace, NSColorSpaceModel, NSColorSpaceModelCMYK, + NSColorSpaceModelDeviceN, NSColorSpaceModelGray, NSColorSpaceModelIndexed, + NSColorSpaceModelLAB, NSColorSpaceModelPatterned, NSColorSpaceModelRGB, + NSColorSpaceModelUnknown, NSDeviceNColorSpaceModel, NSGrayColorSpaceModel, + NSIndexedColorSpaceModel, NSLABColorSpaceModel, NSPatternColorSpaceModel, + NSRGBColorSpaceModel, NSUnknownColorSpaceModel, }; pub use super::NSColorWell::NSColorWell; - pub use super::NSComboBox::{NSComboBox, NSComboBoxDataSource, NSComboBoxDelegate}; + pub use super::NSComboBox::{ + NSComboBox, NSComboBoxDataSource, NSComboBoxDelegate, + NSComboBoxSelectionDidChangeNotification, NSComboBoxSelectionIsChangingNotification, + NSComboBoxWillDismissNotification, NSComboBoxWillPopUpNotification, + }; pub use super::NSComboBoxCell::{NSComboBoxCell, NSComboBoxCellDataSource}; - pub use super::NSControl::{NSControl, NSControlTextEditingDelegate}; + pub use super::NSControl::{ + NSControl, NSControlTextDidBeginEditingNotification, NSControlTextDidChangeNotification, + NSControlTextDidEndEditingNotification, NSControlTextEditingDelegate, + }; pub use super::NSController::NSController; - pub use super::NSCursor::NSCursor; + pub use super::NSCursor::{NSAppKitVersionNumberWithCursorSizeSupport, NSCursor}; pub use super::NSCustomImageRep::NSCustomImageRep; pub use super::NSCustomTouchBarItem::NSCustomTouchBarItem; pub use super::NSDataAsset::{NSDataAsset, NSDataAssetName}; pub use super::NSDatePicker::NSDatePicker; pub use super::NSDatePickerCell::{ - NSDatePickerCell, NSDatePickerCellDelegate, NSDatePickerElementFlagEra, - NSDatePickerElementFlagHourMinute, NSDatePickerElementFlagHourMinuteSecond, - NSDatePickerElementFlagTimeZone, NSDatePickerElementFlagYearMonth, - NSDatePickerElementFlagYearMonthDay, NSDatePickerElementFlags, NSDatePickerMode, - NSDatePickerModeRange, NSDatePickerModeSingle, NSDatePickerStyle, - NSDatePickerStyleClockAndCalendar, NSDatePickerStyleTextField, - NSDatePickerStyleTextFieldAndStepper, + NSClockAndCalendarDatePickerStyle, NSDatePickerCell, NSDatePickerCellDelegate, + NSDatePickerElementFlagEra, NSDatePickerElementFlagHourMinute, + NSDatePickerElementFlagHourMinuteSecond, NSDatePickerElementFlagTimeZone, + NSDatePickerElementFlagYearMonth, NSDatePickerElementFlagYearMonthDay, + NSDatePickerElementFlags, NSDatePickerMode, NSDatePickerModeRange, NSDatePickerModeSingle, + NSDatePickerStyle, NSDatePickerStyleClockAndCalendar, NSDatePickerStyleTextField, + NSDatePickerStyleTextFieldAndStepper, NSEraDatePickerElementFlag, + NSHourMinuteDatePickerElementFlag, NSHourMinuteSecondDatePickerElementFlag, + NSRangeDateMode, NSSingleDateMode, NSTextFieldAndStepperDatePickerStyle, + NSTextFieldDatePickerStyle, NSTimeZoneDatePickerElementFlag, + NSYearMonthDatePickerElementFlag, NSYearMonthDayDatePickerElementFlag, }; pub use super::NSDictionaryController::{ NSDictionaryController, NSDictionaryControllerKeyValuePair, @@ -564,7 +868,9 @@ mod __exported { pub use super::NSDiffableDataSource::{ NSCollectionViewDiffableDataSource, NSDiffableDataSourceSnapshot, }; - pub use super::NSDockTile::{NSDockTile, NSDockTilePlugIn}; + pub use super::NSDockTile::{ + NSAppKitVersionNumberWithDockTilePlugInSupport, NSDockTile, NSDockTilePlugIn, + }; pub use super::NSDocument::{ NSAutosaveAsOperation, NSAutosaveElsewhereOperation, NSAutosaveInPlaceOperation, NSAutosaveOperation, NSChangeAutosaved, NSChangeCleared, NSChangeDiscardable, NSChangeDone, @@ -588,32 +894,55 @@ mod __exported { NSSpringLoadingHighlightStandard, NSSpringLoadingNoHover, NSSpringLoadingOptions, }; pub use super::NSDraggingItem::{ - NSDraggingImageComponent, NSDraggingImageComponentKey, NSDraggingItem, + NSDraggingImageComponent, NSDraggingImageComponentIconKey, NSDraggingImageComponentKey, + NSDraggingImageComponentLabelKey, NSDraggingItem, }; pub use super::NSDraggingSession::NSDraggingSession; pub use super::NSDrawer::{ - NSDrawer, NSDrawerClosedState, NSDrawerClosingState, NSDrawerDelegate, NSDrawerOpenState, - NSDrawerOpeningState, NSDrawerState, + NSDrawer, NSDrawerClosedState, NSDrawerClosingState, NSDrawerDelegate, + NSDrawerDidCloseNotification, NSDrawerDidOpenNotification, NSDrawerOpenState, + NSDrawerOpeningState, NSDrawerState, NSDrawerWillCloseNotification, + NSDrawerWillOpenNotification, }; pub use super::NSEPSImageRep::NSEPSImageRep; + pub use super::NSErrors::{ + NSAbortModalException, NSAbortPrintingException, NSAccessibilityException, + NSAppKitIgnoredException, NSAppKitVirtualMemoryException, NSBadBitmapParametersException, + NSBadComparisonException, NSBadRTFColorTableException, NSBadRTFDirectiveException, + NSBadRTFFontTableException, NSBadRTFStyleSheetException, NSBrowserIllegalDelegateException, + NSColorListIOException, NSColorListNotEditableException, NSDraggingException, + NSFontUnavailableException, NSIllegalSelectorException, NSImageCacheException, + NSNibLoadingException, NSPPDIncludeNotFoundException, NSPPDIncludeStackOverflowException, + NSPPDIncludeStackUnderflowException, NSPPDParseException, + NSPasteboardCommunicationException, NSPrintPackageException, + NSPrintingCommunicationException, NSRTFPropertyStackOverflowException, NSTIFFException, + NSTextLineTooLongException, NSTextNoSelectionException, NSTextReadException, + NSTextWriteException, NSTypedStreamVersionException, NSWindowServerCommunicationException, + NSWordTablesReadException, NSWordTablesWriteException, + }; pub use super::NSEvent::{ - NSBeginFunctionKey, NSBreakFunctionKey, NSClearDisplayFunctionKey, NSClearLineFunctionKey, - NSDeleteCharFunctionKey, NSDeleteFunctionKey, NSDeleteLineFunctionKey, - NSDownArrowFunctionKey, NSEndFunctionKey, NSEvent, NSEventButtonMask, - NSEventButtonMaskPenLowerSide, NSEventButtonMaskPenTip, NSEventButtonMaskPenUpperSide, - NSEventGestureAxis, NSEventGestureAxisHorizontal, NSEventGestureAxisNone, - NSEventGestureAxisVertical, NSEventMask, NSEventMaskAny, NSEventMaskAppKitDefined, - NSEventMaskApplicationDefined, NSEventMaskBeginGesture, NSEventMaskChangeMode, - NSEventMaskCursorUpdate, NSEventMaskDirectTouch, NSEventMaskEndGesture, - NSEventMaskFlagsChanged, NSEventMaskGesture, NSEventMaskKeyDown, NSEventMaskKeyUp, - NSEventMaskLeftMouseDown, NSEventMaskLeftMouseDragged, NSEventMaskLeftMouseUp, - NSEventMaskMagnify, NSEventMaskMouseEntered, NSEventMaskMouseExited, NSEventMaskMouseMoved, - NSEventMaskOtherMouseDown, NSEventMaskOtherMouseDragged, NSEventMaskOtherMouseUp, - NSEventMaskPeriodic, NSEventMaskPressure, NSEventMaskRightMouseDown, - NSEventMaskRightMouseDragged, NSEventMaskRightMouseUp, NSEventMaskRotate, - NSEventMaskScrollWheel, NSEventMaskSmartMagnify, NSEventMaskSwipe, - NSEventMaskSystemDefined, NSEventMaskTabletPoint, NSEventMaskTabletProximity, - NSEventModifierFlagCapsLock, NSEventModifierFlagCommand, NSEventModifierFlagControl, + NSAWTEventType, NSAlphaShiftKeyMask, NSAlternateKeyMask, NSAnyEventMask, NSAppKitDefined, + NSAppKitDefinedMask, NSApplicationActivatedEventType, NSApplicationDeactivatedEventType, + NSApplicationDefined, NSApplicationDefinedMask, NSBeginFunctionKey, NSBreakFunctionKey, + NSClearDisplayFunctionKey, NSClearLineFunctionKey, NSCommandKeyMask, NSControlKeyMask, + NSCursorPointingDevice, NSCursorUpdate, NSCursorUpdateMask, NSDeleteCharFunctionKey, + NSDeleteFunctionKey, NSDeleteLineFunctionKey, NSDeviceIndependentModifierFlagsMask, + NSDownArrowFunctionKey, NSEndFunctionKey, NSEraserPointingDevice, NSEvent, + NSEventButtonMask, NSEventButtonMaskPenLowerSide, NSEventButtonMaskPenTip, + NSEventButtonMaskPenUpperSide, NSEventGestureAxis, NSEventGestureAxisHorizontal, + NSEventGestureAxisNone, NSEventGestureAxisVertical, NSEventMask, NSEventMaskAny, + NSEventMaskAppKitDefined, NSEventMaskApplicationDefined, NSEventMaskBeginGesture, + NSEventMaskChangeMode, NSEventMaskCursorUpdate, NSEventMaskDirectTouch, + NSEventMaskEndGesture, NSEventMaskFlagsChanged, NSEventMaskGesture, NSEventMaskKeyDown, + NSEventMaskKeyUp, NSEventMaskLeftMouseDown, NSEventMaskLeftMouseDragged, + NSEventMaskLeftMouseUp, NSEventMaskMagnify, NSEventMaskMouseEntered, + NSEventMaskMouseExited, NSEventMaskMouseMoved, NSEventMaskOtherMouseDown, + NSEventMaskOtherMouseDragged, NSEventMaskOtherMouseUp, NSEventMaskPeriodic, + NSEventMaskPressure, NSEventMaskRightMouseDown, NSEventMaskRightMouseDragged, + NSEventMaskRightMouseUp, NSEventMaskRotate, NSEventMaskScrollWheel, + NSEventMaskSmartMagnify, NSEventMaskSwipe, NSEventMaskSystemDefined, + NSEventMaskTabletPoint, NSEventMaskTabletProximity, NSEventModifierFlagCapsLock, + NSEventModifierFlagCommand, NSEventModifierFlagControl, NSEventModifierFlagDeviceIndependentFlagsMask, NSEventModifierFlagFunction, NSEventModifierFlagHelp, NSEventModifierFlagNumericPad, NSEventModifierFlagOption, NSEventModifierFlagShift, NSEventModifierFlags, NSEventPhase, NSEventPhaseBegan, @@ -642,39 +971,61 @@ mod __exported { NSF27FunctionKey, NSF28FunctionKey, NSF29FunctionKey, NSF2FunctionKey, NSF30FunctionKey, NSF31FunctionKey, NSF32FunctionKey, NSF33FunctionKey, NSF34FunctionKey, NSF35FunctionKey, NSF3FunctionKey, NSF4FunctionKey, NSF5FunctionKey, NSF6FunctionKey, NSF7FunctionKey, - NSF8FunctionKey, NSF9FunctionKey, NSFindFunctionKey, NSHelpFunctionKey, NSHomeFunctionKey, - NSInsertCharFunctionKey, NSInsertFunctionKey, NSInsertLineFunctionKey, - NSLeftArrowFunctionKey, NSMenuFunctionKey, NSModeSwitchFunctionKey, NSNextFunctionKey, - NSPageDownFunctionKey, NSPageUpFunctionKey, NSPauseFunctionKey, NSPointingDeviceType, - NSPointingDeviceTypeCursor, NSPointingDeviceTypeEraser, NSPointingDeviceTypePen, - NSPointingDeviceTypeUnknown, NSPressureBehavior, NSPressureBehaviorPrimaryAccelerator, + NSF8FunctionKey, NSF9FunctionKey, NSFindFunctionKey, NSFlagsChanged, NSFlagsChangedMask, + NSFunctionKeyMask, NSHelpFunctionKey, NSHelpKeyMask, NSHomeFunctionKey, + NSInsertCharFunctionKey, NSInsertFunctionKey, NSInsertLineFunctionKey, NSKeyDown, + NSKeyDownMask, NSKeyUp, NSKeyUpMask, NSLeftArrowFunctionKey, NSLeftMouseDown, + NSLeftMouseDownMask, NSLeftMouseDragged, NSLeftMouseDraggedMask, NSLeftMouseUp, + NSLeftMouseUpMask, NSMenuFunctionKey, NSModeSwitchFunctionKey, NSMouseEntered, + NSMouseEnteredMask, NSMouseEventSubtype, NSMouseExited, NSMouseExitedMask, NSMouseMoved, + NSMouseMovedMask, NSNextFunctionKey, NSNumericPadKeyMask, NSOtherMouseDown, + NSOtherMouseDownMask, NSOtherMouseDragged, NSOtherMouseDraggedMask, NSOtherMouseUp, + NSOtherMouseUpMask, NSPageDownFunctionKey, NSPageUpFunctionKey, NSPauseFunctionKey, + NSPenLowerSideMask, NSPenPointingDevice, NSPenTipMask, NSPenUpperSideMask, NSPeriodic, + NSPeriodicMask, NSPointingDeviceType, NSPointingDeviceTypeCursor, + NSPointingDeviceTypeEraser, NSPointingDeviceTypePen, NSPointingDeviceTypeUnknown, + NSPowerOffEventType, NSPressureBehavior, NSPressureBehaviorPrimaryAccelerator, NSPressureBehaviorPrimaryClick, NSPressureBehaviorPrimaryDeepClick, NSPressureBehaviorPrimaryDeepDrag, NSPressureBehaviorPrimaryDefault, NSPressureBehaviorPrimaryGeneric, NSPressureBehaviorUnknown, NSPrevFunctionKey, NSPrintFunctionKey, NSPrintScreenFunctionKey, NSRedoFunctionKey, NSResetFunctionKey, - NSRightArrowFunctionKey, NSScrollLockFunctionKey, NSSelectFunctionKey, NSStopFunctionKey, - NSSysReqFunctionKey, NSSystemFunctionKey, NSUndoFunctionKey, NSUpArrowFunctionKey, - NSUserFunctionKey, + NSRightArrowFunctionKey, NSRightMouseDown, NSRightMouseDownMask, NSRightMouseDragged, + NSRightMouseDraggedMask, NSRightMouseUp, NSRightMouseUpMask, NSScreenChangedEventType, + NSScrollLockFunctionKey, NSScrollWheel, NSScrollWheelMask, NSSelectFunctionKey, + NSShiftKeyMask, NSStopFunctionKey, NSSysReqFunctionKey, NSSystemDefined, + NSSystemDefinedMask, NSSystemFunctionKey, NSTabletPoint, NSTabletPointEventSubtype, + NSTabletPointMask, NSTabletProximity, NSTabletProximityEventSubtype, NSTabletProximityMask, + NSTouchEventSubtype, NSUndoFunctionKey, NSUnknownPointingDevice, NSUpArrowFunctionKey, + NSUserFunctionKey, NSWindowExposedEventType, NSWindowMovedEventType, }; pub use super::NSFilePromiseProvider::{NSFilePromiseProvider, NSFilePromiseProviderDelegate}; pub use super::NSFilePromiseReceiver::NSFilePromiseReceiver; pub use super::NSFont::{ - NSControlGlyph, NSFont, NSFontAntialiasedIntegerAdvancementsRenderingMode, - NSFontAntialiasedRenderingMode, NSFontDefaultRenderingMode, - NSFontIntegerAdvancementsRenderingMode, NSFontRenderingMode, NSMultibyteGlyphPacking, + NSAntialiasThresholdChangedNotification, NSControlGlyph, NSFont, + NSFontAntialiasedIntegerAdvancementsRenderingMode, NSFontAntialiasedRenderingMode, + NSFontDefaultRenderingMode, NSFontIdentityMatrix, NSFontIntegerAdvancementsRenderingMode, + NSFontRenderingMode, NSFontSetChangedNotification, NSMultibyteGlyphPacking, NSNativeShortGlyphPacking, NSNullGlyph, }; pub use super::NSFontAssetRequest::{ NSFontAssetRequest, NSFontAssetRequestOptionUsesStandardUI, NSFontAssetRequestOptions, }; pub use super::NSFontCollection::{ - NSFontCollection, NSFontCollectionActionTypeKey, NSFontCollectionMatchingOptionKey, - NSFontCollectionName, NSFontCollectionUserInfoKey, NSFontCollectionVisibility, - NSFontCollectionVisibilityComputer, NSFontCollectionVisibilityProcess, - NSFontCollectionVisibilityUser, NSMutableFontCollection, + NSFontCollection, NSFontCollectionActionKey, NSFontCollectionActionTypeKey, + NSFontCollectionAllFonts, NSFontCollectionDidChangeNotification, + NSFontCollectionDisallowAutoActivationOption, NSFontCollectionFavorites, + NSFontCollectionIncludeDisabledFontsOption, NSFontCollectionMatchingOptionKey, + NSFontCollectionName, NSFontCollectionNameKey, NSFontCollectionOldNameKey, + NSFontCollectionRecentlyUsed, NSFontCollectionRemoveDuplicatesOption, NSFontCollectionUser, + NSFontCollectionUserInfoKey, NSFontCollectionVisibility, + NSFontCollectionVisibilityComputer, NSFontCollectionVisibilityKey, + NSFontCollectionVisibilityProcess, NSFontCollectionVisibilityUser, + NSFontCollectionWasHidden, NSFontCollectionWasRenamed, NSFontCollectionWasShown, + NSMutableFontCollection, }; pub use super::NSFontDescriptor::{ - NSFontBoldTrait, NSFontClarendonSerifsClass, NSFontCondensedTrait, NSFontDescriptor, + NSFontBoldTrait, NSFontCascadeListAttribute, NSFontCharacterSetAttribute, + NSFontClarendonSerifsClass, NSFontColorAttribute, NSFontCondensedTrait, NSFontDescriptor, NSFontDescriptorAttributeName, NSFontDescriptorClassClarendonSerifs, NSFontDescriptorClassFreeformSerifs, NSFontDescriptorClassMask, NSFontDescriptorClassModernSerifs, NSFontDescriptorClassOldStyleSerifs, @@ -682,18 +1033,33 @@ mod __exported { NSFontDescriptorClassScripts, NSFontDescriptorClassSlabSerifs, NSFontDescriptorClassSymbolic, NSFontDescriptorClassTransitionalSerifs, NSFontDescriptorClassUnknown, NSFontDescriptorFeatureKey, NSFontDescriptorSymbolicTraits, - NSFontDescriptorSystemDesign, NSFontDescriptorTraitBold, NSFontDescriptorTraitCondensed, - NSFontDescriptorTraitEmphasized, NSFontDescriptorTraitExpanded, - NSFontDescriptorTraitItalic, NSFontDescriptorTraitKey, NSFontDescriptorTraitLooseLeading, - NSFontDescriptorTraitMonoSpace, NSFontDescriptorTraitTightLeading, - NSFontDescriptorTraitUIOptimized, NSFontDescriptorTraitVertical, - NSFontDescriptorVariationKey, NSFontExpandedTrait, NSFontFamilyClass, - NSFontFamilyClassMask, NSFontFreeformSerifsClass, NSFontItalicTrait, - NSFontModernSerifsClass, NSFontMonoSpaceTrait, NSFontOldStyleSerifsClass, - NSFontOrnamentalsClass, NSFontSansSerifClass, NSFontScriptsClass, NSFontSlabSerifsClass, - NSFontSymbolicClass, NSFontSymbolicTraits, NSFontTextStyle, NSFontTextStyleOptionKey, + NSFontDescriptorSystemDesign, NSFontDescriptorSystemDesignDefault, + NSFontDescriptorSystemDesignMonospaced, NSFontDescriptorSystemDesignRounded, + NSFontDescriptorSystemDesignSerif, NSFontDescriptorTraitBold, + NSFontDescriptorTraitCondensed, NSFontDescriptorTraitEmphasized, + NSFontDescriptorTraitExpanded, NSFontDescriptorTraitItalic, NSFontDescriptorTraitKey, + NSFontDescriptorTraitLooseLeading, NSFontDescriptorTraitMonoSpace, + NSFontDescriptorTraitTightLeading, NSFontDescriptorTraitUIOptimized, + NSFontDescriptorTraitVertical, NSFontDescriptorVariationKey, NSFontExpandedTrait, + NSFontFaceAttribute, NSFontFamilyAttribute, NSFontFamilyClass, NSFontFamilyClassMask, + NSFontFeatureSelectorIdentifierKey, NSFontFeatureSettingsAttribute, + NSFontFeatureTypeIdentifierKey, NSFontFixedAdvanceAttribute, NSFontFreeformSerifsClass, + NSFontItalicTrait, NSFontMatrixAttribute, NSFontModernSerifsClass, NSFontMonoSpaceTrait, + NSFontNameAttribute, NSFontOldStyleSerifsClass, NSFontOrnamentalsClass, + NSFontSansSerifClass, NSFontScriptsClass, NSFontSizeAttribute, NSFontSlabSerifsClass, + NSFontSlantTrait, NSFontSymbolicClass, NSFontSymbolicTrait, NSFontSymbolicTraits, + NSFontTextStyle, NSFontTextStyleBody, NSFontTextStyleCallout, NSFontTextStyleCaption1, + NSFontTextStyleCaption2, NSFontTextStyleFootnote, NSFontTextStyleHeadline, + NSFontTextStyleLargeTitle, NSFontTextStyleOptionKey, NSFontTextStyleSubheadline, + NSFontTextStyleTitle1, NSFontTextStyleTitle2, NSFontTextStyleTitle3, NSFontTraitsAttribute, NSFontTransitionalSerifsClass, NSFontUIOptimizedTrait, NSFontUnknownClass, - NSFontVerticalTrait, NSFontWeight, + NSFontVariationAttribute, NSFontVariationAxisDefaultValueKey, + NSFontVariationAxisIdentifierKey, NSFontVariationAxisMaximumValueKey, + NSFontVariationAxisMinimumValueKey, NSFontVariationAxisNameKey, NSFontVerticalTrait, + NSFontVisibleNameAttribute, NSFontWeight, NSFontWeightBlack, NSFontWeightBold, + NSFontWeightHeavy, NSFontWeightLight, NSFontWeightMedium, NSFontWeightRegular, + NSFontWeightSemibold, NSFontWeightThin, NSFontWeightTrait, NSFontWeightUltraLight, + NSFontWidthTrait, }; pub use super::NSFontManager::{ NSAddTraitFontAction, NSBoldFontMask, NSCompressedFontMask, NSCondensedFontMask, @@ -745,10 +1111,19 @@ mod __exported { pub use super::NSGraphics::{ NSAnimationEffect, NSAnimationEffectDisappearingItemDefault, NSAnimationEffectPoof, NSBackingStoreBuffered, NSBackingStoreNonretained, NSBackingStoreRetained, - NSBackingStoreType, NSColorRenderingIntent, NSColorRenderingIntentAbsoluteColorimetric, - NSColorRenderingIntentDefault, NSColorRenderingIntentPerceptual, - NSColorRenderingIntentRelativeColorimetric, NSColorRenderingIntentSaturation, - NSColorSpaceName, NSCompositingOperation, NSCompositingOperationClear, + NSBackingStoreType, NSBlack, NSCalibratedBlackColorSpace, NSCalibratedRGBColorSpace, + NSCalibratedWhiteColorSpace, NSColorRenderingIntent, + NSColorRenderingIntentAbsoluteColorimetric, NSColorRenderingIntentDefault, + NSColorRenderingIntentPerceptual, NSColorRenderingIntentRelativeColorimetric, + NSColorRenderingIntentSaturation, NSColorSpaceName, NSCompositeClear, NSCompositeColor, + NSCompositeColorBurn, NSCompositeColorDodge, NSCompositeCopy, NSCompositeDarken, + NSCompositeDestinationAtop, NSCompositeDestinationIn, NSCompositeDestinationOut, + NSCompositeDestinationOver, NSCompositeDifference, NSCompositeExclusion, + NSCompositeHardLight, NSCompositeHighlight, NSCompositeHue, NSCompositeLighten, + NSCompositeLuminosity, NSCompositeMultiply, NSCompositeOverlay, NSCompositePlusDarker, + NSCompositePlusLighter, NSCompositeSaturation, NSCompositeScreen, NSCompositeSoftLight, + NSCompositeSourceAtop, NSCompositeSourceIn, NSCompositeSourceOut, NSCompositeSourceOver, + NSCompositeXOR, NSCompositingOperation, NSCompositingOperationClear, NSCompositingOperationColor, NSCompositingOperationColorBurn, NSCompositingOperationColorDodge, NSCompositingOperationCopy, NSCompositingOperationDarken, NSCompositingOperationDestinationAtop, NSCompositingOperationDestinationIn, @@ -761,15 +1136,21 @@ mod __exported { NSCompositingOperationSaturation, NSCompositingOperationScreen, NSCompositingOperationSoftLight, NSCompositingOperationSourceAtop, NSCompositingOperationSourceIn, NSCompositingOperationSourceOut, - NSCompositingOperationSourceOver, NSCompositingOperationXOR, NSDeviceDescriptionKey, + NSCompositingOperationSourceOver, NSCompositingOperationXOR, NSCustomColorSpace, + NSDarkGray, NSDeviceBitsPerSample, NSDeviceBlackColorSpace, NSDeviceCMYKColorSpace, + NSDeviceColorSpaceName, NSDeviceDescriptionKey, NSDeviceIsPrinter, NSDeviceIsScreen, + NSDeviceRGBColorSpace, NSDeviceResolution, NSDeviceSize, NSDeviceWhiteColorSpace, NSDisplayGamut, NSDisplayGamutP3, NSDisplayGamutSRGB, NSFocusRingAbove, NSFocusRingBelow, NSFocusRingOnly, NSFocusRingPlacement, NSFocusRingType, NSFocusRingTypeDefault, - NSFocusRingTypeExterior, NSFocusRingTypeNone, NSWindowAbove, NSWindowBelow, NSWindowDepth, + NSFocusRingTypeExterior, NSFocusRingTypeNone, NSLightGray, NSNamedColorSpace, + NSPatternColorSpace, NSWhite, NSWindowAbove, NSWindowBelow, NSWindowDepth, NSWindowDepthOnehundredtwentyeightBitRGB, NSWindowDepthSixtyfourBitRGB, NSWindowDepthTwentyfourBitRGB, NSWindowOrderingMode, NSWindowOut, }; pub use super::NSGraphicsContext::{ NSGraphicsContext, NSGraphicsContextAttributeKey, + NSGraphicsContextDestinationAttributeName, NSGraphicsContextPDFFormat, + NSGraphicsContextPSFormat, NSGraphicsContextRepresentationFormatAttributeName, NSGraphicsContextRepresentationFormatName, NSImageInterpolation, NSImageInterpolationDefault, NSImageInterpolationHigh, NSImageInterpolationLow, NSImageInterpolationMedium, NSImageInterpolationNone, @@ -780,7 +1161,7 @@ mod __exported { NSGridCellPlacementNone, NSGridCellPlacementTop, NSGridCellPlacementTrailing, NSGridColumn, NSGridRow, NSGridRowAlignment, NSGridRowAlignmentFirstBaseline, NSGridRowAlignmentInherited, NSGridRowAlignmentLastBaseline, NSGridRowAlignmentNone, - NSGridView, + NSGridView, NSGridViewSizeForContent, }; pub use super::NSGroupTouchBarItem::NSGroupTouchBarItem; pub use super::NSHapticFeedback::{ @@ -791,13 +1172,78 @@ mod __exported { NSHapticFeedbackPerformer, }; pub use super::NSHelpManager::{ + NSContextHelpModeDidActivateNotification, NSContextHelpModeDidDeactivateNotification, NSHelpAnchorName, NSHelpBookName, NSHelpManager, NSHelpManagerContextHelpKey, }; pub use super::NSImage::{ NSImage, NSImageCacheAlways, NSImageCacheBySize, NSImageCacheDefault, NSImageCacheMode, - NSImageCacheNever, NSImageDelegate, NSImageLoadStatus, NSImageLoadStatusCancelled, + NSImageCacheNever, NSImageDelegate, NSImageHintCTM, NSImageHintInterpolation, + NSImageHintUserInterfaceLayoutDirection, NSImageLoadStatus, NSImageLoadStatusCancelled, NSImageLoadStatusCompleted, NSImageLoadStatusInvalidData, NSImageLoadStatusReadError, - NSImageLoadStatusUnexpectedEOF, NSImageName, NSImageResizingMode, + NSImageLoadStatusUnexpectedEOF, NSImageName, NSImageNameActionTemplate, + NSImageNameAddTemplate, NSImageNameAdvanced, NSImageNameApplicationIcon, + NSImageNameBluetoothTemplate, NSImageNameBonjour, NSImageNameBookmarksTemplate, + NSImageNameCaution, NSImageNameColorPanel, NSImageNameColumnViewTemplate, + NSImageNameComputer, NSImageNameDotMac, NSImageNameEnterFullScreenTemplate, + NSImageNameEveryone, NSImageNameExitFullScreenTemplate, NSImageNameFlowViewTemplate, + NSImageNameFolder, NSImageNameFolderBurnable, NSImageNameFolderSmart, + NSImageNameFollowLinkFreestandingTemplate, NSImageNameFontPanel, NSImageNameGoBackTemplate, + NSImageNameGoForwardTemplate, NSImageNameGoLeftTemplate, NSImageNameGoRightTemplate, + NSImageNameHomeTemplate, NSImageNameIChatTheaterTemplate, NSImageNameIconViewTemplate, + NSImageNameInfo, NSImageNameInvalidDataFreestandingTemplate, + NSImageNameLeftFacingTriangleTemplate, NSImageNameListViewTemplate, + NSImageNameLockLockedTemplate, NSImageNameLockUnlockedTemplate, + NSImageNameMenuMixedStateTemplate, NSImageNameMenuOnStateTemplate, NSImageNameMobileMe, + NSImageNameMultipleDocuments, NSImageNameNetwork, NSImageNamePathTemplate, + NSImageNamePreferencesGeneral, NSImageNameQuickLookTemplate, + NSImageNameRefreshFreestandingTemplate, NSImageNameRefreshTemplate, + NSImageNameRemoveTemplate, NSImageNameRevealFreestandingTemplate, + NSImageNameRightFacingTriangleTemplate, NSImageNameShareTemplate, + NSImageNameSlideshowTemplate, NSImageNameSmartBadgeTemplate, NSImageNameStatusAvailable, + NSImageNameStatusNone, NSImageNameStatusPartiallyAvailable, NSImageNameStatusUnavailable, + NSImageNameStopProgressFreestandingTemplate, NSImageNameStopProgressTemplate, + NSImageNameTouchBarAddDetailTemplate, NSImageNameTouchBarAddTemplate, + NSImageNameTouchBarAlarmTemplate, NSImageNameTouchBarAudioInputMuteTemplate, + NSImageNameTouchBarAudioInputTemplate, NSImageNameTouchBarAudioOutputMuteTemplate, + NSImageNameTouchBarAudioOutputVolumeHighTemplate, + NSImageNameTouchBarAudioOutputVolumeLowTemplate, + NSImageNameTouchBarAudioOutputVolumeMediumTemplate, + NSImageNameTouchBarAudioOutputVolumeOffTemplate, NSImageNameTouchBarBookmarksTemplate, + NSImageNameTouchBarColorPickerFill, NSImageNameTouchBarColorPickerFont, + NSImageNameTouchBarColorPickerStroke, NSImageNameTouchBarCommunicationAudioTemplate, + NSImageNameTouchBarCommunicationVideoTemplate, NSImageNameTouchBarComposeTemplate, + NSImageNameTouchBarDeleteTemplate, NSImageNameTouchBarDownloadTemplate, + NSImageNameTouchBarEnterFullScreenTemplate, NSImageNameTouchBarExitFullScreenTemplate, + NSImageNameTouchBarFastForwardTemplate, NSImageNameTouchBarFolderCopyToTemplate, + NSImageNameTouchBarFolderMoveToTemplate, NSImageNameTouchBarFolderTemplate, + NSImageNameTouchBarGetInfoTemplate, NSImageNameTouchBarGoBackTemplate, + NSImageNameTouchBarGoDownTemplate, NSImageNameTouchBarGoForwardTemplate, + NSImageNameTouchBarGoUpTemplate, NSImageNameTouchBarHistoryTemplate, + NSImageNameTouchBarIconViewTemplate, NSImageNameTouchBarListViewTemplate, + NSImageNameTouchBarMailTemplate, NSImageNameTouchBarNewFolderTemplate, + NSImageNameTouchBarNewMessageTemplate, NSImageNameTouchBarOpenInBrowserTemplate, + NSImageNameTouchBarPauseTemplate, NSImageNameTouchBarPlayPauseTemplate, + NSImageNameTouchBarPlayTemplate, NSImageNameTouchBarPlayheadTemplate, + NSImageNameTouchBarQuickLookTemplate, NSImageNameTouchBarRecordStartTemplate, + NSImageNameTouchBarRecordStopTemplate, NSImageNameTouchBarRefreshTemplate, + NSImageNameTouchBarRemoveTemplate, NSImageNameTouchBarRewindTemplate, + NSImageNameTouchBarRotateLeftTemplate, NSImageNameTouchBarRotateRightTemplate, + NSImageNameTouchBarSearchTemplate, NSImageNameTouchBarShareTemplate, + NSImageNameTouchBarSidebarTemplate, NSImageNameTouchBarSkipAhead15SecondsTemplate, + NSImageNameTouchBarSkipAhead30SecondsTemplate, NSImageNameTouchBarSkipAheadTemplate, + NSImageNameTouchBarSkipBack15SecondsTemplate, NSImageNameTouchBarSkipBack30SecondsTemplate, + NSImageNameTouchBarSkipBackTemplate, NSImageNameTouchBarSkipToEndTemplate, + NSImageNameTouchBarSkipToStartTemplate, NSImageNameTouchBarSlideshowTemplate, + NSImageNameTouchBarTagIconTemplate, NSImageNameTouchBarTextBoldTemplate, + NSImageNameTouchBarTextBoxTemplate, NSImageNameTouchBarTextCenterAlignTemplate, + NSImageNameTouchBarTextItalicTemplate, NSImageNameTouchBarTextJustifiedAlignTemplate, + NSImageNameTouchBarTextLeftAlignTemplate, NSImageNameTouchBarTextListTemplate, + NSImageNameTouchBarTextRightAlignTemplate, NSImageNameTouchBarTextStrikethroughTemplate, + NSImageNameTouchBarTextUnderlineTemplate, NSImageNameTouchBarUserAddTemplate, + NSImageNameTouchBarUserGroupTemplate, NSImageNameTouchBarUserTemplate, + NSImageNameTouchBarVolumeDownTemplate, NSImageNameTouchBarVolumeUpTemplate, + NSImageNameTrashEmpty, NSImageNameTrashFull, NSImageNameUser, NSImageNameUserAccounts, + NSImageNameUserGroup, NSImageNameUserGuest, NSImageResizingMode, NSImageResizingModeStretch, NSImageResizingModeTile, NSImageSymbolConfiguration, NSImageSymbolScale, NSImageSymbolScaleLarge, NSImageSymbolScaleMedium, NSImageSymbolScaleSmall, @@ -812,7 +1258,7 @@ mod __exported { pub use super::NSImageRep::{ NSImageHintKey, NSImageLayoutDirection, NSImageLayoutDirectionLeftToRight, NSImageLayoutDirectionRightToLeft, NSImageLayoutDirectionUnspecified, NSImageRep, - NSImageRepMatchesDevice, + NSImageRepMatchesDevice, NSImageRepRegistryDidChangeNotification, }; pub use super::NSImageView::NSImageView; pub use super::NSInputManager::{NSInputManager, NSTextInput}; @@ -820,12 +1266,54 @@ mod __exported { NSInputServer, NSInputServerMouseTracker, NSInputServiceProvider, }; pub use super::NSInterfaceStyle::{ - NSInterfaceStyle, NSMacintoshInterfaceStyle, NSNextStepInterfaceStyle, NSNoInterfaceStyle, - NSWindows95InterfaceStyle, + NSInterfaceStyle, NSInterfaceStyleDefault, NSMacintoshInterfaceStyle, + NSNextStepInterfaceStyle, NSNoInterfaceStyle, NSWindows95InterfaceStyle, + }; + pub use super::NSItemProvider::{ + NSTypeIdentifierAddressText, NSTypeIdentifierDateText, NSTypeIdentifierPhoneNumberText, + NSTypeIdentifierTransitInformationText, }; pub use super::NSKeyValueBinding::{ - NSBindingInfoKey, NSBindingName, NSBindingOption, NSBindingSelectionMarker, NSEditor, - NSEditorRegistration, + NSAlignmentBinding, NSAllowsEditingMultipleValuesSelectionBindingOption, + NSAllowsNullArgumentBindingOption, NSAlternateImageBinding, NSAlternateTitleBinding, + NSAlwaysPresentsApplicationModalAlertsBindingOption, NSAnimateBinding, + NSAnimationDelayBinding, NSArgumentBinding, NSAttributedStringBinding, NSBindingInfoKey, + NSBindingName, NSBindingOption, NSBindingSelectionMarker, + NSConditionallySetsEditableBindingOption, NSConditionallySetsEnabledBindingOption, + NSConditionallySetsHiddenBindingOption, NSContentArrayBinding, + NSContentArrayForMultipleSelectionBinding, NSContentBinding, NSContentDictionaryBinding, + NSContentHeightBinding, NSContentObjectBinding, NSContentObjectsBinding, + NSContentPlacementTagBindingOption, NSContentSetBinding, NSContentValuesBinding, + NSContentWidthBinding, NSContinuouslyUpdatesValueBindingOption, + NSCreatesSortDescriptorBindingOption, NSCriticalValueBinding, NSDataBinding, + NSDeletesObjectsOnRemoveBindingsOption, NSDisplayNameBindingOption, + NSDisplayPatternBindingOption, NSDisplayPatternTitleBinding, NSDisplayPatternValueBinding, + NSDocumentEditedBinding, NSDoubleClickArgumentBinding, NSDoubleClickTargetBinding, + NSEditableBinding, NSEditor, NSEditorRegistration, NSEnabledBinding, NSExcludedKeysBinding, + NSFilterPredicateBinding, NSFontBinding, NSFontBoldBinding, NSFontFamilyNameBinding, + NSFontItalicBinding, NSFontNameBinding, NSFontSizeBinding, + NSHandlesContentAsCompoundValueBindingOption, NSHeaderTitleBinding, NSHiddenBinding, + NSImageBinding, NSIncludedKeysBinding, NSInitialKeyBinding, NSInitialValueBinding, + NSInsertsNullPlaceholderBindingOption, NSInvokesSeparatelyWithArrayObjectsBindingOption, + NSIsIndeterminateBinding, NSLabelBinding, NSLocalizedKeyDictionaryBinding, + NSManagedObjectContextBinding, NSMaxValueBinding, NSMaxWidthBinding, + NSMaximumRecentsBinding, NSMinValueBinding, NSMinWidthBinding, NSMixedStateImageBinding, + NSMultipleValuesMarker, NSMultipleValuesPlaceholderBindingOption, NSNoSelectionMarker, + NSNoSelectionPlaceholderBindingOption, NSNotApplicableMarker, + NSNotApplicablePlaceholderBindingOption, NSNullPlaceholderBindingOption, + NSObservedKeyPathKey, NSObservedObjectKey, NSOffStateImageBinding, NSOnStateImageBinding, + NSOptionsKey, NSPositioningRectBinding, NSPredicateBinding, NSPredicateFormatBindingOption, + NSRaisesForNotApplicableKeysBindingOption, NSRecentSearchesBinding, + NSRepresentedFilenameBinding, NSRowHeightBinding, NSSelectedIdentifierBinding, + NSSelectedIndexBinding, NSSelectedLabelBinding, NSSelectedObjectBinding, + NSSelectedObjectsBinding, NSSelectedTagBinding, NSSelectedValueBinding, + NSSelectedValuesBinding, NSSelectionIndexPathsBinding, NSSelectionIndexesBinding, + NSSelectorNameBindingOption, NSSelectsAllWhenSettingContentBindingOption, + NSSortDescriptorsBinding, NSTargetBinding, NSTextColorBinding, NSTitleBinding, + NSToolTipBinding, NSTransparentBinding, NSValidatesImmediatelyBindingOption, + NSValueBinding, NSValuePathBinding, NSValueTransformerBindingOption, + NSValueTransformerNameBindingOption, NSValueURLBinding, NSVisibleBinding, + NSWarningValueBinding, NSWidthBinding, }; pub use super::NSLayoutAnchor::{ NSLayoutAnchor, NSLayoutDimension, NSLayoutXAxisAnchor, NSLayoutYAxisAnchor, @@ -844,8 +1332,12 @@ mod __exported { NSLayoutFormatAlignAllTop, NSLayoutFormatAlignAllTrailing, NSLayoutFormatAlignmentMask, NSLayoutFormatDirectionLeadingToTrailing, NSLayoutFormatDirectionLeftToRight, NSLayoutFormatDirectionMask, NSLayoutFormatDirectionRightToLeft, NSLayoutFormatOptions, - NSLayoutRelation, NSLayoutRelationEqual, NSLayoutRelationGreaterThanOrEqual, - NSLayoutRelationLessThanOrEqual, + NSLayoutPriorityDefaultHigh, NSLayoutPriorityDefaultLow, + NSLayoutPriorityDragThatCanResizeWindow, NSLayoutPriorityDragThatCannotResizeWindow, + NSLayoutPriorityFittingSizeCompression, NSLayoutPriorityRequired, + NSLayoutPriorityWindowSizeStayPut, NSLayoutRelation, NSLayoutRelationEqual, + NSLayoutRelationGreaterThanOrEqual, NSLayoutRelationLessThanOrEqual, + NSViewNoInstrinsicMetric, NSViewNoIntrinsicMetric, }; pub use super::NSLayoutGuide::NSLayoutGuide; pub use super::NSLayoutManager::{ @@ -870,9 +1362,11 @@ mod __exported { NSLevelIndicatorPlaceholderVisibilityWhileEditing, }; pub use super::NSLevelIndicatorCell::{ + NSContinuousCapacityLevelIndicatorStyle, NSDiscreteCapacityLevelIndicatorStyle, NSLevelIndicatorCell, NSLevelIndicatorStyle, NSLevelIndicatorStyleContinuousCapacity, NSLevelIndicatorStyleDiscreteCapacity, NSLevelIndicatorStyleRating, - NSLevelIndicatorStyleRelevancy, + NSLevelIndicatorStyleRelevancy, NSRatingLevelIndicatorStyle, + NSRelevancyLevelIndicatorStyle, }; pub use super::NSMagnificationGestureRecognizer::NSMagnificationGestureRecognizer; pub use super::NSMatrix::{ @@ -884,40 +1378,47 @@ mod __exported { NSMediaLibraryMovie, }; pub use super::NSMenu::{ - NSMenu, NSMenuDelegate, NSMenuItemValidation, NSMenuProperties, - NSMenuPropertyItemAccessibilityDescription, NSMenuPropertyItemAttributedTitle, - NSMenuPropertyItemEnabled, NSMenuPropertyItemImage, NSMenuPropertyItemKeyEquivalent, - NSMenuPropertyItemTitle, - }; - pub use super::NSMenuItem::NSMenuItem; + NSMenu, NSMenuDelegate, NSMenuDidAddItemNotification, NSMenuDidBeginTrackingNotification, + NSMenuDidChangeItemNotification, NSMenuDidEndTrackingNotification, + NSMenuDidRemoveItemNotification, NSMenuDidSendActionNotification, NSMenuItemValidation, + NSMenuProperties, NSMenuPropertyItemAccessibilityDescription, + NSMenuPropertyItemAttributedTitle, NSMenuPropertyItemEnabled, NSMenuPropertyItemImage, + NSMenuPropertyItemKeyEquivalent, NSMenuPropertyItemTitle, NSMenuWillSendActionNotification, + }; + pub use super::NSMenuItem::{NSMenuItem, NSMenuItemImportFromDeviceIdentifier}; pub use super::NSMenuItemCell::NSMenuItemCell; pub use super::NSMenuToolbarItem::NSMenuToolbarItem; pub use super::NSMovie::NSMovie; - pub use super::NSNib::{NSNib, NSNibName}; + pub use super::NSNib::{NSNib, NSNibName, NSNibOwner, NSNibTopLevelObjects}; pub use super::NSObjectController::NSObjectController; pub use super::NSOpenGL::{ - NSOpenGLContext, NSOpenGLContextParameter, NSOpenGLContextParameterCurrentRendererID, - NSOpenGLContextParameterGPUFragmentProcessing, NSOpenGLContextParameterGPUVertexProcessing, - NSOpenGLContextParameterHasDrawable, NSOpenGLContextParameterMPSwapsInFlight, - NSOpenGLContextParameterRasterizationEnable, NSOpenGLContextParameterReclaimResources, - NSOpenGLContextParameterStateValidation, NSOpenGLContextParameterSurfaceBackingSize, - NSOpenGLContextParameterSurfaceOpacity, NSOpenGLContextParameterSurfaceOrder, - NSOpenGLContextParameterSurfaceSurfaceVolatile, NSOpenGLContextParameterSwapInterval, - NSOpenGLContextParameterSwapRectangle, NSOpenGLContextParameterSwapRectangleEnable, - NSOpenGLGOClearFormatCache, NSOpenGLGOFormatCacheSize, NSOpenGLGOResetLibrary, - NSOpenGLGORetainRenderers, NSOpenGLGOUseBuildCache, NSOpenGLGlobalOption, - NSOpenGLPFAAccelerated, NSOpenGLPFAAcceleratedCompute, NSOpenGLPFAAccumSize, - NSOpenGLPFAAllRenderers, NSOpenGLPFAAllowOfflineRenderers, NSOpenGLPFAAlphaSize, - NSOpenGLPFAAuxBuffers, NSOpenGLPFAAuxDepthStencil, NSOpenGLPFABackingStore, - NSOpenGLPFAClosestPolicy, NSOpenGLPFAColorFloat, NSOpenGLPFAColorSize, - NSOpenGLPFACompliant, NSOpenGLPFADepthSize, NSOpenGLPFADoubleBuffer, NSOpenGLPFAFullScreen, - NSOpenGLPFAMPSafe, NSOpenGLPFAMaximumPolicy, NSOpenGLPFAMinimumPolicy, - NSOpenGLPFAMultiScreen, NSOpenGLPFAMultisample, NSOpenGLPFANoRecovery, - NSOpenGLPFAOffScreen, NSOpenGLPFAOpenGLProfile, NSOpenGLPFAPixelBuffer, - NSOpenGLPFARemotePixelBuffer, NSOpenGLPFARendererID, NSOpenGLPFARobust, - NSOpenGLPFASampleAlpha, NSOpenGLPFASampleBuffers, NSOpenGLPFASamples, - NSOpenGLPFAScreenMask, NSOpenGLPFASingleRenderer, NSOpenGLPFAStencilSize, - NSOpenGLPFAStereo, NSOpenGLPFASupersample, NSOpenGLPFATripleBuffer, + NSOpenGLCPCurrentRendererID, NSOpenGLCPGPUFragmentProcessing, + NSOpenGLCPGPUVertexProcessing, NSOpenGLCPHasDrawable, NSOpenGLCPMPSwapsInFlight, + NSOpenGLCPRasterizationEnable, NSOpenGLCPReclaimResources, NSOpenGLCPStateValidation, + NSOpenGLCPSurfaceBackingSize, NSOpenGLCPSurfaceOpacity, NSOpenGLCPSurfaceOrder, + NSOpenGLCPSurfaceSurfaceVolatile, NSOpenGLCPSwapInterval, NSOpenGLCPSwapRectangle, + NSOpenGLCPSwapRectangleEnable, NSOpenGLContext, NSOpenGLContextParameter, + NSOpenGLContextParameterCurrentRendererID, NSOpenGLContextParameterGPUFragmentProcessing, + NSOpenGLContextParameterGPUVertexProcessing, NSOpenGLContextParameterHasDrawable, + NSOpenGLContextParameterMPSwapsInFlight, NSOpenGLContextParameterRasterizationEnable, + NSOpenGLContextParameterReclaimResources, NSOpenGLContextParameterStateValidation, + NSOpenGLContextParameterSurfaceBackingSize, NSOpenGLContextParameterSurfaceOpacity, + NSOpenGLContextParameterSurfaceOrder, NSOpenGLContextParameterSurfaceSurfaceVolatile, + NSOpenGLContextParameterSwapInterval, NSOpenGLContextParameterSwapRectangle, + NSOpenGLContextParameterSwapRectangleEnable, NSOpenGLGOClearFormatCache, + NSOpenGLGOFormatCacheSize, NSOpenGLGOResetLibrary, NSOpenGLGORetainRenderers, + NSOpenGLGOUseBuildCache, NSOpenGLGlobalOption, NSOpenGLPFAAccelerated, + NSOpenGLPFAAcceleratedCompute, NSOpenGLPFAAccumSize, NSOpenGLPFAAllRenderers, + NSOpenGLPFAAllowOfflineRenderers, NSOpenGLPFAAlphaSize, NSOpenGLPFAAuxBuffers, + NSOpenGLPFAAuxDepthStencil, NSOpenGLPFABackingStore, NSOpenGLPFAClosestPolicy, + NSOpenGLPFAColorFloat, NSOpenGLPFAColorSize, NSOpenGLPFACompliant, NSOpenGLPFADepthSize, + NSOpenGLPFADoubleBuffer, NSOpenGLPFAFullScreen, NSOpenGLPFAMPSafe, + NSOpenGLPFAMaximumPolicy, NSOpenGLPFAMinimumPolicy, NSOpenGLPFAMultiScreen, + NSOpenGLPFAMultisample, NSOpenGLPFANoRecovery, NSOpenGLPFAOffScreen, + NSOpenGLPFAOpenGLProfile, NSOpenGLPFAPixelBuffer, NSOpenGLPFARemotePixelBuffer, + NSOpenGLPFARendererID, NSOpenGLPFARobust, NSOpenGLPFASampleAlpha, NSOpenGLPFASampleBuffers, + NSOpenGLPFASamples, NSOpenGLPFAScreenMask, NSOpenGLPFASingleRenderer, + NSOpenGLPFAStencilSize, NSOpenGLPFAStereo, NSOpenGLPFASupersample, NSOpenGLPFATripleBuffer, NSOpenGLPFAVirtualScreenCount, NSOpenGLPFAWindow, NSOpenGLPixelBuffer, NSOpenGLPixelFormat, NSOpenGLPixelFormatAttribute, NSOpenGLProfileVersion3_2Core, NSOpenGLProfileVersion4_1Core, NSOpenGLProfileVersionLegacy, @@ -926,7 +1427,13 @@ mod __exported { pub use super::NSOpenGLView::NSOpenGLView; pub use super::NSOpenPanel::NSOpenPanel; pub use super::NSOutlineView::{ - NSOutlineView, NSOutlineViewDataSource, NSOutlineViewDelegate, NSOutlineViewDropOnItemIndex, + NSOutlineView, NSOutlineViewColumnDidMoveNotification, + NSOutlineViewColumnDidResizeNotification, NSOutlineViewDataSource, NSOutlineViewDelegate, + NSOutlineViewDisclosureButtonKey, NSOutlineViewDropOnItemIndex, + NSOutlineViewItemDidCollapseNotification, NSOutlineViewItemDidExpandNotification, + NSOutlineViewItemWillCollapseNotification, NSOutlineViewItemWillExpandNotification, + NSOutlineViewSelectionDidChangeNotification, NSOutlineViewSelectionIsChangingNotification, + NSOutlineViewShowHideButtonKey, }; pub use super::NSPDFImageRep::NSPDFImageRep; pub use super::NSPDFInfo::NSPDFInfo; @@ -952,15 +1459,29 @@ mod __exported { NSLineBreakByTruncatingTail, NSLineBreakByWordWrapping, NSLineBreakMode, NSLineBreakStrategy, NSLineBreakStrategyHangulWordPriority, NSLineBreakStrategyNone, NSLineBreakStrategyPushOut, NSLineBreakStrategyStandard, NSMutableParagraphStyle, - NSParagraphStyle, NSRightTabStopType, NSTextTab, NSTextTabOptionKey, NSTextTabType, + NSParagraphStyle, NSRightTabStopType, NSTabColumnTerminatorsAttributeName, NSTextTab, + NSTextTabOptionKey, NSTextTabType, }; pub use super::NSPasteboard::{ - NSPasteboard, NSPasteboardContentsCurrentHostOnly, NSPasteboardContentsOptions, - NSPasteboardName, NSPasteboardReading, NSPasteboardReadingAsData, - NSPasteboardReadingAsKeyedArchive, NSPasteboardReadingAsPropertyList, - NSPasteboardReadingAsString, NSPasteboardReadingOptionKey, NSPasteboardReadingOptions, - NSPasteboardType, NSPasteboardTypeOwner, NSPasteboardWriting, NSPasteboardWritingOptions, - NSPasteboardWritingPromised, + NSColorPboardType, NSDragPboard, NSFileContentsPboardType, NSFilenamesPboardType, + NSFilesPromisePboardType, NSFindPboard, NSFontPboard, NSFontPboardType, NSGeneralPboard, + NSHTMLPboardType, NSInkTextPboardType, NSMultipleTextSelectionPboardType, NSPDFPboardType, + NSPICTPboardType, NSPasteboard, NSPasteboardContentsCurrentHostOnly, + NSPasteboardContentsOptions, NSPasteboardName, NSPasteboardNameDrag, NSPasteboardNameFind, + NSPasteboardNameFont, NSPasteboardNameGeneral, NSPasteboardNameRuler, NSPasteboardReading, + NSPasteboardReadingAsData, NSPasteboardReadingAsKeyedArchive, + NSPasteboardReadingAsPropertyList, NSPasteboardReadingAsString, + NSPasteboardReadingOptionKey, NSPasteboardReadingOptions, NSPasteboardType, + NSPasteboardTypeColor, NSPasteboardTypeFileURL, NSPasteboardTypeFindPanelSearchOptions, + NSPasteboardTypeFont, NSPasteboardTypeHTML, NSPasteboardTypeMultipleTextSelection, + NSPasteboardTypeOwner, NSPasteboardTypePDF, NSPasteboardTypePNG, NSPasteboardTypeRTF, + NSPasteboardTypeRTFD, NSPasteboardTypeRuler, NSPasteboardTypeSound, NSPasteboardTypeString, + NSPasteboardTypeTIFF, NSPasteboardTypeTabularText, NSPasteboardTypeTextFinderOptions, + NSPasteboardTypeURL, NSPasteboardURLReadingContentsConformToTypesKey, + NSPasteboardURLReadingFileURLsOnlyKey, NSPasteboardWriting, NSPasteboardWritingOptions, + NSPasteboardWritingPromised, NSPostScriptPboardType, NSRTFDPboardType, NSRTFPboardType, + NSRulerPboard, NSRulerPboardType, NSStringPboardType, NSTIFFPboardType, + NSTabularTextPboardType, NSURLPboardType, NSVCardPboardType, }; pub use super::NSPasteboardItem::{NSPasteboardItem, NSPasteboardItemDataProvider}; pub use super::NSPathCell::{ @@ -979,15 +1500,18 @@ mod __exported { NSPickerTouchBarItemSelectionModeMomentary, NSPickerTouchBarItemSelectionModeSelectAny, NSPickerTouchBarItemSelectionModeSelectOne, }; - pub use super::NSPopUpButton::NSPopUpButton; + pub use super::NSPopUpButton::{NSPopUpButton, NSPopUpButtonWillPopUpNotification}; pub use super::NSPopUpButtonCell::{ NSPopUpArrowAtBottom, NSPopUpArrowAtCenter, NSPopUpArrowPosition, NSPopUpButtonCell, - NSPopUpNoArrow, + NSPopUpButtonCellWillPopUpNotification, NSPopUpNoArrow, }; pub use super::NSPopover::{ NSPopover, NSPopoverAppearance, NSPopoverAppearanceHUD, NSPopoverAppearanceMinimal, NSPopoverBehavior, NSPopoverBehaviorApplicationDefined, NSPopoverBehaviorSemitransient, - NSPopoverBehaviorTransient, NSPopoverCloseReasonValue, NSPopoverDelegate, + NSPopoverBehaviorTransient, NSPopoverCloseReasonDetachToWindow, NSPopoverCloseReasonKey, + NSPopoverCloseReasonStandard, NSPopoverCloseReasonValue, NSPopoverDelegate, + NSPopoverDidCloseNotification, NSPopoverDidShowNotification, + NSPopoverWillCloseNotification, NSPopoverWillShowNotification, }; pub use super::NSPopoverTouchBarItem::NSPopoverTouchBarItem; pub use super::NSPredicateEditor::NSPredicateEditor; @@ -995,46 +1519,67 @@ mod __exported { pub use super::NSPressGestureRecognizer::NSPressGestureRecognizer; pub use super::NSPressureConfiguration::NSPressureConfiguration; pub use super::NSPrintInfo::{ - NSLandscapeOrientation, NSPaperOrientation, NSPaperOrientationLandscape, - NSPaperOrientationPortrait, NSPortraitOrientation, NSPrintInfo, NSPrintInfoAttributeKey, - NSPrintInfoSettingKey, NSPrintJobDispositionValue, NSPrintingOrientation, + NSAutoPagination, NSClipPagination, NSFitPagination, NSLandscapeOrientation, + NSPaperOrientation, NSPaperOrientationLandscape, NSPaperOrientationPortrait, + NSPortraitOrientation, NSPrintAllPages, NSPrintBottomMargin, NSPrintCancelJob, + NSPrintCopies, NSPrintDetailedErrorReporting, NSPrintFaxNumber, NSPrintFirstPage, + NSPrintFormName, NSPrintHeaderAndFooter, NSPrintHorizontalPagination, + NSPrintHorizontallyCentered, NSPrintInfo, NSPrintInfoAttributeKey, NSPrintInfoSettingKey, + NSPrintJobDisposition, NSPrintJobDispositionValue, NSPrintJobFeatures, + NSPrintJobSavingFileNameExtensionHidden, NSPrintJobSavingURL, NSPrintLastPage, + NSPrintLeftMargin, NSPrintManualFeed, NSPrintMustCollate, NSPrintOrientation, + NSPrintPagesAcross, NSPrintPagesDown, NSPrintPagesPerSheet, NSPrintPaperFeed, + NSPrintPaperName, NSPrintPaperSize, NSPrintPreviewJob, NSPrintPrinter, NSPrintPrinterName, + NSPrintReversePageOrder, NSPrintRightMargin, NSPrintSaveJob, NSPrintSavePath, + NSPrintScalingFactor, NSPrintSelectionOnly, NSPrintSpoolJob, NSPrintTime, NSPrintTopMargin, + NSPrintVerticalPagination, NSPrintVerticallyCentered, NSPrintingOrientation, NSPrintingPaginationMode, NSPrintingPaginationModeAutomatic, NSPrintingPaginationModeClip, NSPrintingPaginationModeFit, }; pub use super::NSPrintOperation::{ - NSAscendingPageOrder, NSDescendingPageOrder, NSPrintOperation, NSPrintRenderingQuality, - NSPrintRenderingQualityBest, NSPrintRenderingQualityResponsive, NSPrintingPageOrder, - NSSpecialPageOrder, NSUnknownPageOrder, + NSAscendingPageOrder, NSDescendingPageOrder, NSPrintOperation, + NSPrintOperationExistsException, NSPrintRenderingQuality, NSPrintRenderingQualityBest, + NSPrintRenderingQualityResponsive, NSPrintingPageOrder, NSSpecialPageOrder, + NSUnknownPageOrder, }; pub use super::NSPrintPanel::{ - NSPrintPanel, NSPrintPanelAccessorizing, NSPrintPanelAccessorySummaryKey, + NSPrintAllPresetsJobStyleHint, NSPrintNoPresetsJobStyleHint, NSPrintPanel, + NSPrintPanelAccessorizing, NSPrintPanelAccessorySummaryItemDescriptionKey, + NSPrintPanelAccessorySummaryItemNameKey, NSPrintPanelAccessorySummaryKey, NSPrintPanelJobStyleHint, NSPrintPanelOptions, NSPrintPanelShowsCopies, NSPrintPanelShowsOrientation, NSPrintPanelShowsPageRange, NSPrintPanelShowsPageSetupAccessory, NSPrintPanelShowsPaperSize, NSPrintPanelShowsPreview, - NSPrintPanelShowsPrintSelection, NSPrintPanelShowsScaling, + NSPrintPanelShowsPrintSelection, NSPrintPanelShowsScaling, NSPrintPhotoJobStyleHint, }; pub use super::NSPrinter::{ NSPrinter, NSPrinterPaperName, NSPrinterTableError, NSPrinterTableNotFound, NSPrinterTableOK, NSPrinterTableStatus, NSPrinterTypeName, }; pub use super::NSProgressIndicator::{ - NSProgressIndicator, NSProgressIndicatorPreferredAquaThickness, - NSProgressIndicatorPreferredLargeThickness, NSProgressIndicatorPreferredSmallThickness, - NSProgressIndicatorPreferredThickness, NSProgressIndicatorStyle, - NSProgressIndicatorStyleBar, NSProgressIndicatorStyleSpinning, - NSProgressIndicatorThickness, + NSProgressIndicator, NSProgressIndicatorBarStyle, + NSProgressIndicatorPreferredAquaThickness, NSProgressIndicatorPreferredLargeThickness, + NSProgressIndicatorPreferredSmallThickness, NSProgressIndicatorPreferredThickness, + NSProgressIndicatorSpinningStyle, NSProgressIndicatorStyle, NSProgressIndicatorStyleBar, + NSProgressIndicatorStyleSpinning, NSProgressIndicatorThickness, }; pub use super::NSResponder::{NSResponder, NSStandardKeyBindingResponding}; pub use super::NSRotationGestureRecognizer::NSRotationGestureRecognizer; pub use super::NSRuleEditor::{ NSRuleEditor, NSRuleEditorDelegate, NSRuleEditorNestingMode, NSRuleEditorNestingModeCompound, NSRuleEditorNestingModeList, - NSRuleEditorNestingModeSimple, NSRuleEditorNestingModeSingle, NSRuleEditorPredicatePartKey, - NSRuleEditorRowType, NSRuleEditorRowTypeCompound, NSRuleEditorRowTypeSimple, + NSRuleEditorNestingModeSimple, NSRuleEditorNestingModeSingle, + NSRuleEditorPredicateComparisonModifier, NSRuleEditorPredicateCompoundType, + NSRuleEditorPredicateCustomSelector, NSRuleEditorPredicateLeftExpression, + NSRuleEditorPredicateOperatorType, NSRuleEditorPredicateOptions, + NSRuleEditorPredicatePartKey, NSRuleEditorPredicateRightExpression, NSRuleEditorRowType, + NSRuleEditorRowTypeCompound, NSRuleEditorRowTypeSimple, + NSRuleEditorRowsDidChangeNotification, }; pub use super::NSRulerMarker::NSRulerMarker; pub use super::NSRulerView::{ - NSHorizontalRuler, NSRulerOrientation, NSRulerView, NSRulerViewUnitName, NSVerticalRuler, + NSHorizontalRuler, NSRulerOrientation, NSRulerView, NSRulerViewUnitCentimeters, + NSRulerViewUnitInches, NSRulerViewUnitName, NSRulerViewUnitPicas, NSRulerViewUnitPoints, + NSVerticalRuler, }; pub use super::NSRunningApplication::{ NSApplicationActivateAllWindows, NSApplicationActivateIgnoringOtherApps, @@ -1046,16 +1591,19 @@ mod __exported { NSFileHandlingPanelCancelButton, NSFileHandlingPanelOKButton, NSOpenSavePanelDelegate, NSSavePanel, }; - pub use super::NSScreen::NSScreen; + pub use super::NSScreen::{NSScreen, NSScreenColorSpaceDidChangeNotification}; pub use super::NSScrollView::{ NSScrollElasticity, NSScrollElasticityAllowed, NSScrollElasticityAutomatic, - NSScrollElasticityNone, NSScrollView, NSScrollViewFindBarPosition, - NSScrollViewFindBarPositionAboveContent, NSScrollViewFindBarPositionAboveHorizontalRuler, - NSScrollViewFindBarPositionBelowContent, + NSScrollElasticityNone, NSScrollView, NSScrollViewDidEndLiveMagnifyNotification, + NSScrollViewDidEndLiveScrollNotification, NSScrollViewDidLiveScrollNotification, + NSScrollViewFindBarPosition, NSScrollViewFindBarPositionAboveContent, + NSScrollViewFindBarPositionAboveHorizontalRuler, NSScrollViewFindBarPositionBelowContent, + NSScrollViewWillStartLiveMagnifyNotification, NSScrollViewWillStartLiveScrollNotification, }; pub use super::NSScroller::{ - NSAllScrollerParts, NSNoScrollerParts, NSOnlyScrollerArrows, NSScrollArrowPosition, - NSScroller, NSScrollerArrow, NSScrollerArrowsDefaultSetting, NSScrollerArrowsMaxEnd, + NSAllScrollerParts, NSNoScrollerParts, NSOnlyScrollerArrows, + NSPreferredScrollerStyleDidChangeNotification, NSScrollArrowPosition, NSScroller, + NSScrollerArrow, NSScrollerArrowsDefaultSetting, NSScrollerArrowsMaxEnd, NSScrollerArrowsMinEnd, NSScrollerArrowsNone, NSScrollerDecrementArrow, NSScrollerDecrementLine, NSScrollerDecrementPage, NSScrollerIncrementArrow, NSScrollerIncrementLine, NSScrollerIncrementPage, NSScrollerKnob, NSScrollerKnobSlot, @@ -1080,7 +1628,10 @@ mod __exported { pub use super::NSSearchField::{ NSSearchField, NSSearchFieldDelegate, NSSearchFieldRecentsAutosaveName, }; - pub use super::NSSearchFieldCell::NSSearchFieldCell; + pub use super::NSSearchFieldCell::{ + NSSearchFieldCell, NSSearchFieldClearRecentsMenuItemTag, NSSearchFieldNoRecentsMenuItemTag, + NSSearchFieldRecentsMenuItemTag, NSSearchFieldRecentsTitleMenuItemTag, + }; pub use super::NSSearchToolbarItem::NSSearchToolbarItem; pub use super::NSSecureTextField::{NSSecureTextField, NSSecureTextFieldCell}; pub use super::NSSegmentedCell::NSSegmentedCell; @@ -1100,7 +1651,18 @@ mod __exported { NSCloudKitSharingServiceOptions, NSCloudKitSharingServiceStandard, NSCloudSharingServiceDelegate, NSSharingContentScope, NSSharingContentScopeFull, NSSharingContentScopeItem, NSSharingContentScopePartial, NSSharingService, - NSSharingServiceDelegate, NSSharingServiceName, NSSharingServicePicker, + NSSharingServiceDelegate, NSSharingServiceName, NSSharingServiceNameAddToAperture, + NSSharingServiceNameAddToIPhoto, NSSharingServiceNameAddToSafariReadingList, + NSSharingServiceNameCloudSharing, NSSharingServiceNameComposeEmail, + NSSharingServiceNameComposeMessage, NSSharingServiceNamePostImageOnFlickr, + NSSharingServiceNamePostOnFacebook, NSSharingServiceNamePostOnLinkedIn, + NSSharingServiceNamePostOnSinaWeibo, NSSharingServiceNamePostOnTencentWeibo, + NSSharingServiceNamePostOnTwitter, NSSharingServiceNamePostVideoOnTudou, + NSSharingServiceNamePostVideoOnVimeo, NSSharingServiceNamePostVideoOnYouku, + NSSharingServiceNameSendViaAirDrop, NSSharingServiceNameUseAsDesktopPicture, + NSSharingServiceNameUseAsFacebookProfileImage, + NSSharingServiceNameUseAsLinkedInProfileImage, + NSSharingServiceNameUseAsTwitterProfileImage, NSSharingServicePicker, NSSharingServicePickerDelegate, }; pub use super::NSSharingServicePickerToolbarItem::{ @@ -1112,43 +1674,80 @@ mod __exported { pub use super::NSSlider::NSSlider; pub use super::NSSliderAccessory::{NSSliderAccessory, NSSliderAccessoryBehavior}; pub use super::NSSliderCell::{ - NSSliderCell, NSSliderType, NSSliderTypeCircular, NSSliderTypeLinear, NSTickMarkPosition, + NSCircularSlider, NSLinearSlider, NSSliderCell, NSSliderType, NSSliderTypeCircular, + NSSliderTypeLinear, NSTickMarkAbove, NSTickMarkBelow, NSTickMarkLeft, NSTickMarkPosition, NSTickMarkPositionAbove, NSTickMarkPositionBelow, NSTickMarkPositionLeading, - NSTickMarkPositionTrailing, + NSTickMarkPositionTrailing, NSTickMarkRight, + }; + pub use super::NSSliderTouchBarItem::{ + NSSliderAccessoryWidth, NSSliderAccessoryWidthDefault, NSSliderAccessoryWidthWide, + NSSliderTouchBarItem, }; - pub use super::NSSliderTouchBarItem::{NSSliderAccessoryWidth, NSSliderTouchBarItem}; pub use super::NSSound::{ - NSSound, NSSoundDelegate, NSSoundName, NSSoundPlaybackDeviceIdentifier, + NSSound, NSSoundDelegate, NSSoundName, NSSoundPboardType, NSSoundPlaybackDeviceIdentifier, }; pub use super::NSSpeechRecognizer::{NSSpeechRecognizer, NSSpeechRecognizerDelegate}; pub use super::NSSpeechSynthesizer::{ - NSSpeechBoundary, NSSpeechCommandDelimiterKey, NSSpeechDictionaryKey, NSSpeechErrorKey, - NSSpeechImmediateBoundary, NSSpeechMode, NSSpeechPhonemeInfoKey, NSSpeechPropertyKey, - NSSpeechSentenceBoundary, NSSpeechStatusKey, NSSpeechSynthesizer, - NSSpeechSynthesizerDelegate, NSSpeechSynthesizerInfoKey, NSSpeechSynthesizerVoiceName, - NSSpeechWordBoundary, NSVoiceAttributeKey, NSVoiceGenderName, + NSSpeechBoundary, NSSpeechCharacterModeProperty, NSSpeechCommandDelimiterKey, + NSSpeechCommandDelimiterProperty, NSSpeechCommandPrefix, NSSpeechCommandSuffix, + NSSpeechCurrentVoiceProperty, NSSpeechDictionaryAbbreviations, + NSSpeechDictionaryEntryPhonemes, NSSpeechDictionaryEntrySpelling, NSSpeechDictionaryKey, + NSSpeechDictionaryLocaleIdentifier, NSSpeechDictionaryModificationDate, + NSSpeechDictionaryPronunciations, NSSpeechErrorCount, NSSpeechErrorKey, + NSSpeechErrorNewestCharacterOffset, NSSpeechErrorNewestCode, + NSSpeechErrorOldestCharacterOffset, NSSpeechErrorOldestCode, NSSpeechErrorsProperty, + NSSpeechImmediateBoundary, NSSpeechInputModeProperty, NSSpeechMode, NSSpeechModeLiteral, + NSSpeechModeNormal, NSSpeechModePhoneme, NSSpeechModeText, NSSpeechNumberModeProperty, + NSSpeechOutputToFileURLProperty, NSSpeechPhonemeInfoExample, NSSpeechPhonemeInfoHiliteEnd, + NSSpeechPhonemeInfoHiliteStart, NSSpeechPhonemeInfoKey, NSSpeechPhonemeInfoOpcode, + NSSpeechPhonemeInfoSymbol, NSSpeechPhonemeSymbolsProperty, NSSpeechPitchBaseProperty, + NSSpeechPitchModProperty, NSSpeechPropertyKey, NSSpeechRateProperty, + NSSpeechRecentSyncProperty, NSSpeechResetProperty, NSSpeechSentenceBoundary, + NSSpeechStatusKey, NSSpeechStatusNumberOfCharactersLeft, NSSpeechStatusOutputBusy, + NSSpeechStatusOutputPaused, NSSpeechStatusPhonemeCode, NSSpeechStatusProperty, + NSSpeechSynthesizer, NSSpeechSynthesizerDelegate, NSSpeechSynthesizerInfoIdentifier, + NSSpeechSynthesizerInfoKey, NSSpeechSynthesizerInfoProperty, + NSSpeechSynthesizerInfoVersion, NSSpeechSynthesizerVoiceName, NSSpeechVolumeProperty, + NSSpeechWordBoundary, NSVoiceAge, NSVoiceAttributeKey, NSVoiceDemoText, NSVoiceGender, + NSVoiceGenderFemale, NSVoiceGenderMale, NSVoiceGenderName, NSVoiceGenderNeuter, + NSVoiceGenderNeutral, NSVoiceIdentifier, NSVoiceIndividuallySpokenCharacters, + NSVoiceLanguage, NSVoiceLocaleIdentifier, NSVoiceName, NSVoiceSupportedCharacters, }; pub use super::NSSpellChecker::{ NSCorrectionIndicatorType, NSCorrectionIndicatorTypeDefault, NSCorrectionIndicatorTypeGuesses, NSCorrectionIndicatorTypeReversion, NSCorrectionResponse, NSCorrectionResponseAccepted, NSCorrectionResponseEdited, NSCorrectionResponseIgnored, NSCorrectionResponseNone, NSCorrectionResponseRejected, NSCorrectionResponseReverted, - NSSpellChecker, NSTextCheckingOptionKey, + NSSpellChecker, NSSpellCheckerDidChangeAutomaticCapitalizationNotification, + NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification, + NSSpellCheckerDidChangeAutomaticPeriodSubstitutionNotification, + NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification, + NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification, + NSSpellCheckerDidChangeAutomaticTextCompletionNotification, + NSSpellCheckerDidChangeAutomaticTextReplacementNotification, + NSTextCheckingDocumentAuthorKey, NSTextCheckingDocumentTitleKey, + NSTextCheckingDocumentURLKey, NSTextCheckingOptionKey, NSTextCheckingOrthographyKey, + NSTextCheckingQuotesKey, NSTextCheckingReferenceDateKey, + NSTextCheckingReferenceTimeZoneKey, NSTextCheckingRegularExpressionsKey, + NSTextCheckingReplacementsKey, NSTextCheckingSelectedRangeKey, }; pub use super::NSSpellProtocol::{NSChangeSpelling, NSIgnoreMisspelledWords}; pub use super::NSSplitView::{ - NSSplitView, NSSplitViewAutosaveName, NSSplitViewDelegate, NSSplitViewDividerStyle, + NSSplitView, NSSplitViewAutosaveName, NSSplitViewDelegate, + NSSplitViewDidResizeSubviewsNotification, NSSplitViewDividerStyle, NSSplitViewDividerStylePaneSplitter, NSSplitViewDividerStyleThick, - NSSplitViewDividerStyleThin, + NSSplitViewDividerStyleThin, NSSplitViewWillResizeSubviewsNotification, + }; + pub use super::NSSplitViewController::{ + NSSplitViewController, NSSplitViewControllerAutomaticDimension, }; - pub use super::NSSplitViewController::NSSplitViewController; pub use super::NSSplitViewItem::{ NSSplitViewItem, NSSplitViewItemBehavior, NSSplitViewItemBehaviorContentList, NSSplitViewItemBehaviorDefault, NSSplitViewItemBehaviorSidebar, NSSplitViewItemCollapseBehavior, NSSplitViewItemCollapseBehaviorDefault, NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitView, NSSplitViewItemCollapseBehaviorPreferResizingSplitViewWithFixedSiblings, - NSSplitViewItemCollapseBehaviorUseConstraints, + NSSplitViewItemCollapseBehaviorUseConstraints, NSSplitViewItemUnspecifiedDimension, }; pub use super::NSStackView::{ NSStackView, NSStackViewDelegate, NSStackViewDistribution, @@ -1157,8 +1756,12 @@ mod __exported { NSStackViewDistributionFillProportionally, NSStackViewDistributionGravityAreas, NSStackViewGravity, NSStackViewGravityBottom, NSStackViewGravityCenter, NSStackViewGravityLeading, NSStackViewGravityTop, NSStackViewGravityTrailing, + NSStackViewSpacingUseDefault, NSStackViewVisibilityPriorityDetachOnlyIfNecessary, + NSStackViewVisibilityPriorityMustHold, NSStackViewVisibilityPriorityNotVisible, + }; + pub use super::NSStatusBar::{ + NSSquareStatusItemLength, NSStatusBar, NSVariableStatusItemLength, }; - pub use super::NSStatusBar::NSStatusBar; pub use super::NSStatusBarButton::NSStatusBarButton; pub use super::NSStatusItem::{ NSStatusItem, NSStatusItemAutosaveName, NSStatusItemBehavior, @@ -1179,11 +1782,12 @@ mod __exported { }; pub use super::NSSwitch::NSSwitch; pub use super::NSTabView::{ - NSBottomTabsBezelBorder, NSLeftTabsBezelBorder, NSNoTabsBezelBorder, NSNoTabsLineBorder, - NSNoTabsNoBorder, NSRightTabsBezelBorder, NSTabPosition, NSTabPositionBottom, - NSTabPositionLeft, NSTabPositionNone, NSTabPositionRight, NSTabPositionTop, NSTabView, - NSTabViewBorderType, NSTabViewBorderTypeBezel, NSTabViewBorderTypeLine, - NSTabViewBorderTypeNone, NSTabViewDelegate, NSTabViewType, NSTopTabsBezelBorder, + NSAppKitVersionNumberWithDirectionalTabs, NSBottomTabsBezelBorder, NSLeftTabsBezelBorder, + NSNoTabsBezelBorder, NSNoTabsLineBorder, NSNoTabsNoBorder, NSRightTabsBezelBorder, + NSTabPosition, NSTabPositionBottom, NSTabPositionLeft, NSTabPositionNone, + NSTabPositionRight, NSTabPositionTop, NSTabView, NSTabViewBorderType, + NSTabViewBorderTypeBezel, NSTabViewBorderTypeLine, NSTabViewBorderTypeNone, + NSTabViewDelegate, NSTabViewType, NSTopTabsBezelBorder, }; pub use super::NSTabViewController::{ NSTabViewController, NSTabViewControllerTabStyle, @@ -1208,6 +1812,7 @@ mod __exported { NSTableViewAnimationEffectNone, NSTableViewAnimationOptions, NSTableViewAnimationSlideDown, NSTableViewAnimationSlideLeft, NSTableViewAnimationSlideRight, NSTableViewAnimationSlideUp, NSTableViewAutosaveName, NSTableViewColumnAutoresizingStyle, + NSTableViewColumnDidMoveNotification, NSTableViewColumnDidResizeNotification, NSTableViewDashedHorizontalGridLineMask, NSTableViewDataSource, NSTableViewDelegate, NSTableViewDraggingDestinationFeedbackStyle, NSTableViewDraggingDestinationFeedbackStyleGap, @@ -1219,12 +1824,14 @@ mod __exported { NSTableViewNoColumnAutoresizing, NSTableViewReverseSequentialColumnAutoresizingStyle, NSTableViewRowSizeStyle, NSTableViewRowSizeStyleCustom, NSTableViewRowSizeStyleDefault, NSTableViewRowSizeStyleLarge, NSTableViewRowSizeStyleMedium, NSTableViewRowSizeStyleSmall, + NSTableViewRowViewKey, NSTableViewSelectionDidChangeNotification, NSTableViewSelectionHighlightStyle, NSTableViewSelectionHighlightStyleNone, NSTableViewSelectionHighlightStyleRegular, NSTableViewSelectionHighlightStyleSourceList, - NSTableViewSequentialColumnAutoresizingStyle, NSTableViewSolidHorizontalGridLineMask, - NSTableViewSolidVerticalGridLineMask, NSTableViewStyle, NSTableViewStyleAutomatic, - NSTableViewStyleFullWidth, NSTableViewStyleInset, NSTableViewStylePlain, - NSTableViewStyleSourceList, NSTableViewUniformColumnAutoresizingStyle, + NSTableViewSelectionIsChangingNotification, NSTableViewSequentialColumnAutoresizingStyle, + NSTableViewSolidHorizontalGridLineMask, NSTableViewSolidVerticalGridLineMask, + NSTableViewStyle, NSTableViewStyleAutomatic, NSTableViewStyleFullWidth, + NSTableViewStyleInset, NSTableViewStylePlain, NSTableViewStyleSourceList, + NSTableViewUniformColumnAutoresizingStyle, }; pub use super::NSTableViewDiffableDataSource::NSTableViewDiffableDataSource; pub use super::NSTableViewRowAction::{ @@ -1233,19 +1840,24 @@ mod __exported { }; pub use super::NSText::{ NSBackTabCharacter, NSBackspaceCharacter, NSBacktabTextMovement, NSCancelTextMovement, - NSCarriageReturnCharacter, NSDeleteCharacter, NSDownTextMovement, NSEnterCharacter, - NSFormFeedCharacter, NSIllegalTextMovement, NSLeftTextMovement, NSLineSeparatorCharacter, + NSCarriageReturnCharacter, NSCenterTextAlignment, NSDeleteCharacter, NSDownTextMovement, + NSEnterCharacter, NSFormFeedCharacter, NSIllegalTextMovement, NSJustifiedTextAlignment, + NSLeftTextAlignment, NSLeftTextMovement, NSLineSeparatorCharacter, NSNaturalTextAlignment, NSNewlineCharacter, NSOtherTextMovement, NSParagraphSeparatorCharacter, - NSReturnTextMovement, NSRightTextMovement, NSTabCharacter, NSTabTextMovement, NSText, - NSTextAlignment, NSTextAlignmentCenter, NSTextAlignmentJustified, NSTextAlignmentLeft, - NSTextAlignmentNatural, NSTextAlignmentRight, NSTextDelegate, NSTextMovement, + NSReturnTextMovement, NSRightTextAlignment, NSRightTextMovement, NSTabCharacter, + NSTabTextMovement, NSText, NSTextAlignment, NSTextAlignmentCenter, + NSTextAlignmentJustified, NSTextAlignmentLeft, NSTextAlignmentNatural, + NSTextAlignmentRight, NSTextDelegate, NSTextDidBeginEditingNotification, + NSTextDidChangeNotification, NSTextDidEndEditingNotification, NSTextMovement, NSTextMovementBacktab, NSTextMovementCancel, NSTextMovementDown, NSTextMovementLeft, NSTextMovementOther, NSTextMovementReturn, NSTextMovementRight, NSTextMovementTab, - NSTextMovementUp, NSTextWritingDirectionEmbedding, NSTextWritingDirectionOverride, - NSUpTextMovement, NSWritingDirection, NSWritingDirectionLeftToRight, - NSWritingDirectionNatural, NSWritingDirectionRightToLeft, + NSTextMovementUp, NSTextMovementUserInfoKey, NSTextWritingDirectionEmbedding, + NSTextWritingDirectionOverride, NSUpTextMovement, NSWritingDirection, + NSWritingDirectionLeftToRight, NSWritingDirectionNatural, NSWritingDirectionRightToLeft, + }; + pub use super::NSTextAlternatives::{ + NSTextAlternatives, NSTextAlternativesSelectedAlternativeStringNotification, }; - pub use super::NSTextAlternatives::NSTextAlternatives; pub use super::NSTextAttachment::{ NSAttachmentCharacter, NSTextAttachment, NSTextAttachmentContainer, NSTextAttachmentLayout, NSTextAttachmentViewProvider, @@ -1261,11 +1873,15 @@ mod __exported { NSLineMovesRight, NSLineMovesUp, NSLineSweepDirection, NSLineSweepDown, NSLineSweepLeft, NSLineSweepRight, NSLineSweepUp, NSTextContainer, }; - pub use super::NSTextContent::{NSTextContent, NSTextContentType}; + pub use super::NSTextContent::{ + NSTextContent, NSTextContentType, NSTextContentTypeOneTimeCode, NSTextContentTypePassword, + NSTextContentTypeUsername, + }; pub use super::NSTextContentManager::{ NSTextContentManager, NSTextContentManagerDelegate, NSTextContentManagerEnumerationOptions, NSTextContentManagerEnumerationOptionsNone, NSTextContentManagerEnumerationOptionsReverse, - NSTextContentStorage, NSTextContentStorageDelegate, NSTextElementProvider, + NSTextContentStorage, NSTextContentStorageDelegate, + NSTextContentStorageUnsupportedAttributeAddedNotification, NSTextElementProvider, }; pub use super::NSTextElement::{NSTextElement, NSTextParagraph}; pub use super::NSTextField::{NSTextField, NSTextFieldDelegate}; @@ -1280,12 +1896,16 @@ mod __exported { NSTextFinderActionReplaceAndFind, NSTextFinderActionSelectAll, NSTextFinderActionSelectAllInSelection, NSTextFinderActionSetSearchString, NSTextFinderActionShowFindInterface, NSTextFinderActionShowReplaceInterface, - NSTextFinderBarContainer, NSTextFinderClient, NSTextFinderMatchingType, - NSTextFinderMatchingTypeContains, NSTextFinderMatchingTypeEndsWith, - NSTextFinderMatchingTypeFullWord, NSTextFinderMatchingTypeStartsWith, + NSTextFinderBarContainer, NSTextFinderCaseInsensitiveKey, NSTextFinderClient, + NSTextFinderMatchingType, NSTextFinderMatchingTypeContains, + NSTextFinderMatchingTypeEndsWith, NSTextFinderMatchingTypeFullWord, + NSTextFinderMatchingTypeKey, NSTextFinderMatchingTypeStartsWith, }; pub use super::NSTextInputClient::NSTextInputClient; - pub use super::NSTextInputContext::{NSTextInputContext, NSTextInputSourceIdentifier}; + pub use super::NSTextInputContext::{ + NSTextInputContext, NSTextInputContextKeyboardSelectionDidChangeNotification, + NSTextInputSourceIdentifier, + }; pub use super::NSTextLayoutFragment::{ NSTextLayoutFragment, NSTextLayoutFragmentEnumerationOptions, NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment, @@ -1308,7 +1928,14 @@ mod __exported { }; pub use super::NSTextLineFragment::NSTextLineFragment; pub use super::NSTextList::{ - NSTextList, NSTextListMarkerFormat, NSTextListOptions, NSTextListPrependEnclosingMarker, + NSTextList, NSTextListMarkerBox, NSTextListMarkerCheck, NSTextListMarkerCircle, + NSTextListMarkerDecimal, NSTextListMarkerDiamond, NSTextListMarkerDisc, + NSTextListMarkerFormat, NSTextListMarkerHyphen, NSTextListMarkerLowercaseAlpha, + NSTextListMarkerLowercaseHexadecimal, NSTextListMarkerLowercaseLatin, + NSTextListMarkerLowercaseRoman, NSTextListMarkerOctal, NSTextListMarkerSquare, + NSTextListMarkerUppercaseAlpha, NSTextListMarkerUppercaseHexadecimal, + NSTextListMarkerUppercaseLatin, NSTextListMarkerUppercaseRoman, NSTextListOptions, + NSTextListPrependEnclosingMarker, }; pub use super::NSTextRange::{NSTextLocation, NSTextRange}; pub use super::NSTextSelection::{ @@ -1337,9 +1964,10 @@ mod __exported { NSTextSelectionNavigationWritingDirectionRightToLeft, }; pub use super::NSTextStorage::{ - NSTextStorage, NSTextStorageDelegate, NSTextStorageEditActions, - NSTextStorageEditedAttributes, NSTextStorageEditedCharacters, NSTextStorageEditedOptions, - NSTextStorageObserving, + NSTextStorage, NSTextStorageDelegate, NSTextStorageDidProcessEditingNotification, + NSTextStorageEditActions, NSTextStorageEditedAttributes, NSTextStorageEditedCharacters, + NSTextStorageEditedOptions, NSTextStorageObserving, + NSTextStorageWillProcessEditingNotification, }; pub use super::NSTextTable::{ NSTextBlock, NSTextBlockAbsoluteValueType, NSTextBlockBaselineAlignment, NSTextBlockBorder, @@ -1352,17 +1980,25 @@ mod __exported { NSTextTableLayoutAlgorithm, }; pub use super::NSTextView::{ - NSFindPanelAction, NSFindPanelActionNext, NSFindPanelActionPrevious, - NSFindPanelActionReplace, NSFindPanelActionReplaceAll, + NSAllRomanInputSourcesLocaleIdentifier, NSFindPanelAction, NSFindPanelActionNext, + NSFindPanelActionPrevious, NSFindPanelActionReplace, NSFindPanelActionReplaceAll, NSFindPanelActionReplaceAllInSelection, NSFindPanelActionReplaceAndFind, NSFindPanelActionSelectAll, NSFindPanelActionSelectAllInSelection, NSFindPanelActionSetFindString, NSFindPanelActionShowFindPanel, - NSFindPanelSubstringMatchType, NSFindPanelSubstringMatchTypeContains, - NSFindPanelSubstringMatchTypeEndsWith, NSFindPanelSubstringMatchTypeFullWord, - NSFindPanelSubstringMatchTypeStartsWith, NSPasteboardTypeFindPanelSearchOptionKey, - NSSelectByCharacter, NSSelectByParagraph, NSSelectByWord, NSSelectionAffinity, - NSSelectionAffinityDownstream, NSSelectionAffinityUpstream, NSSelectionGranularity, - NSTextView, NSTextViewDelegate, + NSFindPanelCaseInsensitiveSearch, NSFindPanelSearchOptionsPboardType, + NSFindPanelSubstringMatch, NSFindPanelSubstringMatchType, + NSFindPanelSubstringMatchTypeContains, NSFindPanelSubstringMatchTypeEndsWith, + NSFindPanelSubstringMatchTypeFullWord, NSFindPanelSubstringMatchTypeStartsWith, + NSPasteboardTypeFindPanelSearchOptionKey, NSSelectByCharacter, NSSelectByParagraph, + NSSelectByWord, NSSelectionAffinity, NSSelectionAffinityDownstream, + NSSelectionAffinityUpstream, NSSelectionGranularity, NSTextView, NSTextViewDelegate, + NSTextViewDidChangeSelectionNotification, NSTextViewDidChangeTypingAttributesNotification, + NSTextViewDidSwitchToNSLayoutManagerNotification, + NSTextViewWillChangeNotifyingTextViewNotification, + NSTextViewWillSwitchToNSLayoutManagerNotification, NSTouchBarItemIdentifierCharacterPicker, + NSTouchBarItemIdentifierTextAlignment, NSTouchBarItemIdentifierTextColorPicker, + NSTouchBarItemIdentifierTextFormat, NSTouchBarItemIdentifierTextList, + NSTouchBarItemIdentifierTextStyle, }; pub use super::NSTextViewportLayoutController::{ NSTextViewportLayoutController, NSTextViewportLayoutControllerDelegate, @@ -1371,19 +2007,27 @@ mod __exported { pub use super::NSTitlebarAccessoryViewController::NSTitlebarAccessoryViewController; pub use super::NSTokenField::{NSTokenField, NSTokenFieldDelegate}; pub use super::NSTokenFieldCell::{ - NSTokenFieldCell, NSTokenFieldCellDelegate, NSTokenStyle, NSTokenStyleDefault, - NSTokenStyleNone, NSTokenStylePlainSquared, NSTokenStyleRounded, NSTokenStyleSquared, + NSDefaultTokenStyle, NSPlainTextTokenStyle, NSRoundedTokenStyle, NSTokenFieldCell, + NSTokenFieldCellDelegate, NSTokenStyle, NSTokenStyleDefault, NSTokenStyleNone, + NSTokenStylePlainSquared, NSTokenStyleRounded, NSTokenStyleSquared, }; pub use super::NSToolbar::{ - NSToolbar, NSToolbarDelegate, NSToolbarDisplayMode, NSToolbarDisplayModeDefault, - NSToolbarDisplayModeIconAndLabel, NSToolbarDisplayModeIconOnly, - NSToolbarDisplayModeLabelOnly, NSToolbarIdentifier, NSToolbarItemIdentifier, - NSToolbarSizeMode, NSToolbarSizeModeDefault, NSToolbarSizeModeRegular, - NSToolbarSizeModeSmall, + NSToolbar, NSToolbarDelegate, NSToolbarDidRemoveItemNotification, NSToolbarDisplayMode, + NSToolbarDisplayModeDefault, NSToolbarDisplayModeIconAndLabel, + NSToolbarDisplayModeIconOnly, NSToolbarDisplayModeLabelOnly, NSToolbarIdentifier, + NSToolbarItemIdentifier, NSToolbarSizeMode, NSToolbarSizeModeDefault, + NSToolbarSizeModeRegular, NSToolbarSizeModeSmall, NSToolbarWillAddItemNotification, }; pub use super::NSToolbarItem::{ - NSCloudSharingValidation, NSToolbarItem, NSToolbarItemValidation, - NSToolbarItemVisibilityPriority, + NSCloudSharingValidation, NSToolbarCloudSharingItemIdentifier, + NSToolbarCustomizeToolbarItemIdentifier, NSToolbarFlexibleSpaceItemIdentifier, + NSToolbarItem, NSToolbarItemValidation, NSToolbarItemVisibilityPriority, + NSToolbarItemVisibilityPriorityHigh, NSToolbarItemVisibilityPriorityLow, + NSToolbarItemVisibilityPriorityStandard, NSToolbarItemVisibilityPriorityUser, + NSToolbarPrintItemIdentifier, NSToolbarSeparatorItemIdentifier, + NSToolbarShowColorsItemIdentifier, NSToolbarShowFontsItemIdentifier, + NSToolbarSidebarTrackingSeparatorItemIdentifier, NSToolbarSpaceItemIdentifier, + NSToolbarToggleSidebarItemIdentifier, }; pub use super::NSToolbarItemGroup::{ NSToolbarItemGroup, NSToolbarItemGroupControlRepresentation, @@ -1402,7 +2046,12 @@ mod __exported { pub use super::NSTouchBar::{ NSTouchBar, NSTouchBarCustomizationIdentifier, NSTouchBarDelegate, NSTouchBarProvider, }; - pub use super::NSTouchBarItem::{NSTouchBarItem, NSTouchBarItemIdentifier}; + pub use super::NSTouchBarItem::{ + NSTouchBarItem, NSTouchBarItemIdentifier, NSTouchBarItemIdentifierFixedSpaceLarge, + NSTouchBarItemIdentifierFixedSpaceSmall, NSTouchBarItemIdentifierFlexibleSpace, + NSTouchBarItemIdentifierOtherItemsProxy, NSTouchBarItemPriorityHigh, + NSTouchBarItemPriorityLow, NSTouchBarItemPriorityNormal, + }; pub use super::NSTrackingArea::{ NSTrackingActiveAlways, NSTrackingActiveInActiveApp, NSTrackingActiveInKeyWindow, NSTrackingActiveWhenFirstResponder, NSTrackingArea, NSTrackingAreaOptions, @@ -1418,7 +2067,7 @@ mod __exported { NSTypesetterParagraphBreakAction, NSTypesetterWhitespaceAction, NSTypesetterZeroAdvancementAction, }; - pub use super::NSUserActivity::NSUserActivityRestoring; + pub use super::NSUserActivity::{NSUserActivityDocumentURLKey, NSUserActivityRestoring}; pub use super::NSUserDefaultsController::NSUserDefaultsController; pub use super::NSUserInterfaceCompression::{ NSUserInterfaceCompression, NSUserInterfaceCompressionOptions, @@ -1437,8 +2086,14 @@ mod __exported { }; pub use super::NSView::{ NSAutoresizingMaskOptions, NSBezelBorder, NSBorderType, NSDefinitionOptionKey, - NSDefinitionPresentationType, NSGrooveBorder, NSLineBorder, NSNoBorder, NSToolTipTag, - NSTrackingRectTag, NSView, NSViewFullScreenModeOptionKey, NSViewHeightSizable, + NSDefinitionPresentationType, NSDefinitionPresentationTypeDictionaryApplication, + NSDefinitionPresentationTypeKey, NSDefinitionPresentationTypeOverlay, + NSFullScreenModeAllScreens, NSFullScreenModeApplicationPresentationOptions, + NSFullScreenModeSetting, NSFullScreenModeWindowLevel, NSGrooveBorder, NSLineBorder, + NSNoBorder, NSToolTipTag, NSTrackingRectTag, NSView, NSViewBoundsDidChangeNotification, + NSViewDidUpdateTrackingAreasNotification, NSViewFocusDidChangeNotification, + NSViewFrameDidChangeNotification, NSViewFullScreenModeOptionKey, + NSViewGlobalFrameDidChangeNotification, NSViewHeightSizable, NSViewLayerContentScaleDelegate, NSViewLayerContentsPlacement, NSViewLayerContentsPlacementBottom, NSViewLayerContentsPlacementBottomLeft, NSViewLayerContentsPlacementBottomRight, NSViewLayerContentsPlacementCenter, @@ -1477,14 +2132,25 @@ mod __exported { NSVisualEffectView, }; pub use super::NSWindow::{ - NSDirectSelection, NSDisplayWindowRunLoopOrdering, NSResetCursorRectsRunLoopOrdering, - NSSelectingNext, NSSelectingPrevious, NSSelectionDirection, NSTitlebarSeparatorStyle, + NSAppKitVersionNumberWithCustomSheetPosition, + NSAppKitVersionNumberWithDeferredWindowDisplaySupport, NSBackingPropertyOldColorSpaceKey, + NSBackingPropertyOldScaleFactorKey, NSBorderlessWindowMask, NSClosableWindowMask, + NSDirectSelection, NSDisplayWindowRunLoopOrdering, NSDocModalWindowMask, NSDockWindowLevel, + NSEventDurationForever, NSFloatingWindowLevel, NSFullScreenWindowMask, + NSFullSizeContentViewWindowMask, NSHUDWindowMask, NSMainMenuWindowLevel, + NSMiniaturizableWindowMask, NSModalPanelWindowLevel, NSModalResponseCancel, + NSModalResponseOK, NSNonactivatingPanelMask, NSNormalWindowLevel, NSPopUpMenuWindowLevel, + NSResetCursorRectsRunLoopOrdering, NSResizableWindowMask, NSScreenSaverWindowLevel, + NSSelectingNext, NSSelectingPrevious, NSSelectionDirection, NSStatusWindowLevel, + NSSubmenuWindowLevel, NSTexturedBackgroundWindowMask, NSTitlebarSeparatorStyle, NSTitlebarSeparatorStyleAutomatic, NSTitlebarSeparatorStyleLine, - NSTitlebarSeparatorStyleNone, NSTitlebarSeparatorStyleShadow, NSWindow, - NSWindowAnimationBehavior, NSWindowAnimationBehaviorAlertPanel, - NSWindowAnimationBehaviorDefault, NSWindowAnimationBehaviorDocumentWindow, - NSWindowAnimationBehaviorNone, NSWindowAnimationBehaviorUtilityWindow, - NSWindowBackingLocation, NSWindowBackingLocationDefault, NSWindowBackingLocationMainMemory, + NSTitlebarSeparatorStyleNone, NSTitlebarSeparatorStyleShadow, NSTitledWindowMask, + NSTornOffMenuWindowLevel, NSUnifiedTitleAndToolbarWindowMask, NSUnscaledWindowMask, + NSUtilityWindowMask, NSWindow, NSWindowAnimationBehavior, + NSWindowAnimationBehaviorAlertPanel, NSWindowAnimationBehaviorDefault, + NSWindowAnimationBehaviorDocumentWindow, NSWindowAnimationBehaviorNone, + NSWindowAnimationBehaviorUtilityWindow, NSWindowBackingLocation, + NSWindowBackingLocationDefault, NSWindowBackingLocationMainMemory, NSWindowBackingLocationVideoMemory, NSWindowButton, NSWindowCloseButton, NSWindowCollectionBehavior, NSWindowCollectionBehaviorCanJoinAllSpaces, NSWindowCollectionBehaviorDefault, NSWindowCollectionBehaviorFullScreenAllowsTiling, @@ -1494,16 +2160,27 @@ mod __exported { NSWindowCollectionBehaviorIgnoresCycle, NSWindowCollectionBehaviorManaged, NSWindowCollectionBehaviorMoveToActiveSpace, NSWindowCollectionBehaviorParticipatesInCycle, NSWindowCollectionBehaviorStationary, NSWindowCollectionBehaviorTransient, - NSWindowDelegate, NSWindowDocumentIconButton, NSWindowDocumentVersionsButton, - NSWindowFrameAutosaveName, NSWindowLevel, NSWindowMiniaturizeButton, - NSWindowNumberListAllApplications, NSWindowNumberListAllSpaces, NSWindowNumberListOptions, - NSWindowOcclusionState, NSWindowOcclusionStateVisible, NSWindowPersistableFrameDescriptor, - NSWindowSharingNone, NSWindowSharingReadOnly, NSWindowSharingReadWrite, - NSWindowSharingType, NSWindowStyleMask, NSWindowStyleMaskBorderless, - NSWindowStyleMaskClosable, NSWindowStyleMaskDocModalWindow, NSWindowStyleMaskFullScreen, - NSWindowStyleMaskFullSizeContentView, NSWindowStyleMaskHUDWindow, - NSWindowStyleMaskMiniaturizable, NSWindowStyleMaskNonactivatingPanel, - NSWindowStyleMaskResizable, NSWindowStyleMaskTexturedBackground, NSWindowStyleMaskTitled, + NSWindowDelegate, NSWindowDidBecomeKeyNotification, NSWindowDidBecomeMainNotification, + NSWindowDidChangeBackingPropertiesNotification, + NSWindowDidChangeOcclusionStateNotification, NSWindowDidChangeScreenNotification, + NSWindowDidChangeScreenProfileNotification, NSWindowDidDeminiaturizeNotification, + NSWindowDidEndLiveResizeNotification, NSWindowDidEndSheetNotification, + NSWindowDidEnterFullScreenNotification, NSWindowDidEnterVersionBrowserNotification, + NSWindowDidExitFullScreenNotification, NSWindowDidExitVersionBrowserNotification, + NSWindowDidExposeNotification, NSWindowDidMiniaturizeNotification, + NSWindowDidMoveNotification, NSWindowDidResignKeyNotification, + NSWindowDidResignMainNotification, NSWindowDidResizeNotification, + NSWindowDidUpdateNotification, NSWindowDocumentIconButton, NSWindowDocumentVersionsButton, + NSWindowFrameAutosaveName, NSWindowFullScreenButton, NSWindowLevel, + NSWindowMiniaturizeButton, NSWindowNumberListAllApplications, NSWindowNumberListAllSpaces, + NSWindowNumberListOptions, NSWindowOcclusionState, NSWindowOcclusionStateVisible, + NSWindowPersistableFrameDescriptor, NSWindowSharingNone, NSWindowSharingReadOnly, + NSWindowSharingReadWrite, NSWindowSharingType, NSWindowStyleMask, + NSWindowStyleMaskBorderless, NSWindowStyleMaskClosable, NSWindowStyleMaskDocModalWindow, + NSWindowStyleMaskFullScreen, NSWindowStyleMaskFullSizeContentView, + NSWindowStyleMaskHUDWindow, NSWindowStyleMaskMiniaturizable, + NSWindowStyleMaskNonactivatingPanel, NSWindowStyleMaskResizable, + NSWindowStyleMaskTexturedBackground, NSWindowStyleMaskTitled, NSWindowStyleMaskUnifiedTitleAndToolbar, NSWindowStyleMaskUtilityWindow, NSWindowTabbingIdentifier, NSWindowTabbingMode, NSWindowTabbingModeAutomatic, NSWindowTabbingModeDisallowed, NSWindowTabbingModePreferred, NSWindowTitleHidden, @@ -1512,24 +2189,52 @@ mod __exported { NSWindowToolbarStylePreference, NSWindowToolbarStyleUnified, NSWindowToolbarStyleUnifiedCompact, NSWindowUserTabbingPreference, NSWindowUserTabbingPreferenceAlways, NSWindowUserTabbingPreferenceInFullScreen, - NSWindowUserTabbingPreferenceManual, NSWindowZoomButton, + NSWindowUserTabbingPreferenceManual, NSWindowWillBeginSheetNotification, + NSWindowWillCloseNotification, NSWindowWillEnterFullScreenNotification, + NSWindowWillEnterVersionBrowserNotification, NSWindowWillExitFullScreenNotification, + NSWindowWillExitVersionBrowserNotification, NSWindowWillMiniaturizeNotification, + NSWindowWillMoveNotification, NSWindowWillStartLiveResizeNotification, NSWindowZoomButton, }; pub use super::NSWindowController::NSWindowController; - pub use super::NSWindowRestoration::NSWindowRestoration; + pub use super::NSWindowRestoration::{ + NSApplicationDidFinishRestoringWindowsNotification, NSWindowRestoration, + }; pub use super::NSWindowTab::NSWindowTab; pub use super::NSWindowTabGroup::NSWindowTabGroup; pub use super::NSWorkspace::{ - NSExclude10_4ElementsIconCreationOption, NSExcludeQuickDrawElementsIconCreationOption, - NSWorkspace, NSWorkspaceAuthorization, NSWorkspaceAuthorizationType, + NSApplicationFileType, NSDirectoryFileType, NSExclude10_4ElementsIconCreationOption, + NSExcludeQuickDrawElementsIconCreationOption, NSFilesystemFileType, NSPlainFileType, + NSShellCommandFileType, NSWorkspace, NSWorkspaceActiveSpaceDidChangeNotification, + NSWorkspaceApplicationKey, NSWorkspaceAuthorization, NSWorkspaceAuthorizationType, NSWorkspaceAuthorizationTypeCreateSymbolicLink, NSWorkspaceAuthorizationTypeReplaceFile, - NSWorkspaceAuthorizationTypeSetAttributes, NSWorkspaceDesktopImageOptionKey, + NSWorkspaceAuthorizationTypeSetAttributes, NSWorkspaceCompressOperation, + NSWorkspaceCopyOperation, NSWorkspaceDecompressOperation, NSWorkspaceDecryptOperation, + NSWorkspaceDesktopImageAllowClippingKey, NSWorkspaceDesktopImageFillColorKey, + NSWorkspaceDesktopImageOptionKey, NSWorkspaceDesktopImageScalingKey, + NSWorkspaceDestroyOperation, NSWorkspaceDidActivateApplicationNotification, + NSWorkspaceDidChangeFileLabelsNotification, + NSWorkspaceDidDeactivateApplicationNotification, NSWorkspaceDidHideApplicationNotification, + NSWorkspaceDidLaunchApplicationNotification, NSWorkspaceDidMountNotification, + NSWorkspaceDidPerformFileOperationNotification, NSWorkspaceDidRenameVolumeNotification, + NSWorkspaceDidTerminateApplicationNotification, + NSWorkspaceDidUnhideApplicationNotification, NSWorkspaceDidUnmountNotification, + NSWorkspaceDidWakeNotification, NSWorkspaceDuplicateOperation, NSWorkspaceEncryptOperation, NSWorkspaceFileOperationName, NSWorkspaceIconCreationOptions, NSWorkspaceLaunchAllowingClassicStartup, NSWorkspaceLaunchAndHide, NSWorkspaceLaunchAndHideOthers, NSWorkspaceLaunchAndPrint, NSWorkspaceLaunchAsync, + NSWorkspaceLaunchConfigurationAppleEvent, NSWorkspaceLaunchConfigurationArchitecture, + NSWorkspaceLaunchConfigurationArguments, NSWorkspaceLaunchConfigurationEnvironment, NSWorkspaceLaunchConfigurationKey, NSWorkspaceLaunchDefault, NSWorkspaceLaunchInhibitingBackgroundOnly, NSWorkspaceLaunchNewInstance, NSWorkspaceLaunchOptions, NSWorkspaceLaunchPreferringClassic, NSWorkspaceLaunchWithErrorPresentation, NSWorkspaceLaunchWithoutActivation, - NSWorkspaceLaunchWithoutAddingToRecents, NSWorkspaceOpenConfiguration, + NSWorkspaceLaunchWithoutAddingToRecents, NSWorkspaceLinkOperation, + NSWorkspaceMoveOperation, NSWorkspaceOpenConfiguration, NSWorkspaceRecycleOperation, + NSWorkspaceScreensDidSleepNotification, NSWorkspaceScreensDidWakeNotification, + NSWorkspaceSessionDidBecomeActiveNotification, + NSWorkspaceSessionDidResignActiveNotification, NSWorkspaceVolumeLocalizedNameKey, + NSWorkspaceVolumeOldLocalizedNameKey, NSWorkspaceVolumeOldURLKey, NSWorkspaceVolumeURLKey, + NSWorkspaceWillLaunchApplicationNotification, NSWorkspaceWillPowerOffNotification, + NSWorkspaceWillSleepNotification, NSWorkspaceWillUnmountNotification, }; } diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index b9ec49321..86936b90f 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -5,6 +5,18 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSAppleEventTimeOutDefault: c_double; +} + +extern "C" { + static NSAppleEventTimeOutNone: c_double; +} + +extern "C" { + static NSAppleEventManagerWillProcessFirstEventNotification: &'static NSNotificationName; +} + extern_class!( #[derive(Debug)] pub struct NSAppleEventManager; diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index a1e7cb134..146c4ed4b 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -5,6 +5,26 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSAppleScriptErrorMessage: &'static NSString; +} + +extern "C" { + static NSAppleScriptErrorNumber: &'static NSString; +} + +extern "C" { + static NSAppleScriptErrorAppName: &'static NSString; +} + +extern "C" { + static NSAppleScriptErrorBriefMessage: &'static NSString; +} + +extern "C" { + static NSAppleScriptErrorRange: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSAppleScript; diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index a2a916c83..e38098d06 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -198,6 +198,22 @@ pub const NSInlinePresentationIntentLineBreak: NSInlinePresentationIntent = 1 << pub const NSInlinePresentationIntentInlineHTML: NSInlinePresentationIntent = 1 << 8; pub const NSInlinePresentationIntentBlockHTML: NSInlinePresentationIntent = 1 << 9; +extern "C" { + static NSInlinePresentationIntentAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSAlternateDescriptionAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSImageURLAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSLanguageIdentifierAttributeName: &'static NSAttributedStringKey; +} + pub type NSAttributedStringMarkdownParsingFailurePolicy = NSInteger; pub const NSAttributedStringMarkdownParsingFailureReturnError: NSAttributedStringMarkdownParsingFailurePolicy = 0; @@ -312,6 +328,10 @@ extern_methods!( unsafe impl NSMutableAttributedString {} ); +extern "C" { + static NSReplacementIndexAttributeName: &'static NSAttributedStringKey; +} + extern_methods!( /// NSMorphology unsafe impl NSAttributedString { @@ -320,6 +340,22 @@ extern_methods!( } ); +extern "C" { + static NSMorphologyAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSInflectionRuleAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSInflectionAlternativeAttributeName: &'static NSAttributedStringKey; +} + +extern "C" { + static NSPresentationIntentAttributeName: &'static NSAttributedStringKey; +} + pub type NSPresentationIntentKind = NSInteger; pub const NSPresentationIntentKindParagraph: NSPresentationIntentKind = 0; pub const NSPresentationIntentKindHeader: NSPresentationIntentKind = 1; diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 9c6643387..14bcfbaef 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -294,6 +294,14 @@ extern_methods!( } ); +extern "C" { + static NSBundleDidLoadNotification: &'static NSNotificationName; +} + +extern "C" { + static NSLoadedClasses: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSBundleResourceRequest; @@ -364,3 +372,11 @@ extern_methods!( pub unsafe fn preservationPriorityForTag(&self, tag: &NSString) -> c_double; } ); + +extern "C" { + static NSBundleResourceRequestLowDiskSpaceNotification: &'static NSNotificationName; +} + +extern "C" { + static NSBundleResourceRequestLoadingPriorityUrgent: c_double; +} diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index de0e90637..be7a218b6 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -7,6 +7,70 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSCalendarIdentifier = NSString; +extern "C" { + static NSCalendarIdentifierGregorian: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierBuddhist: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierChinese: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierCoptic: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierEthiopicAmeteMihret: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierEthiopicAmeteAlem: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierHebrew: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierISO8601: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierIndian: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierIslamic: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierIslamicCivil: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierJapanese: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierPersian: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierRepublicOfChina: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierIslamicTabular: &'static NSCalendarIdentifier; +} + +extern "C" { + static NSCalendarIdentifierIslamicUmmAlQura: &'static NSCalendarIdentifier; +} + pub type NSCalendarUnit = NSUInteger; pub const NSCalendarUnitEra: NSCalendarUnit = kCFCalendarUnitEra; pub const NSCalendarUnitYear: NSCalendarUnit = kCFCalendarUnitYear; @@ -431,6 +495,10 @@ extern_methods!( } ); +extern "C" { + static NSCalendarDayChangedNotification: &'static NSNotificationName; +} + pub const NSDateComponentUndefined: i32 = 9223372036854775807; pub const NSUndefinedDateComponent: i32 = NSDateComponentUndefined; diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index 46cd51eed..00fda168f 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -69,3 +69,7 @@ extern_methods!( ) -> Option>; } ); + +extern "C" { + static NSClassDescriptionNeededForClassNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index ff3a22ba1..63fd4882e 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -173,8 +173,24 @@ extern_methods!( } ); +extern "C" { + static NSConnectionReplyMode: &'static NSString; +} + +extern "C" { + static NSConnectionDidDieNotification: &'static NSString; +} + pub type NSConnectionDelegate = NSObject; +extern "C" { + static NSFailedAuthenticationException: &'static NSString; +} + +extern "C" { + static NSConnectionDidInitializeNotification: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSDistantObjectRequest; diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 8d1d27d85..ca0728be4 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSSystemClockDidChangeNotification: &'static NSNotificationName; +} + extern_class!( #[derive(Debug)] pub struct NSDate; diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index 33ab91812..0ccbaf8bf 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -5,6 +5,22 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSDecimalNumberExactnessException: &'static NSExceptionName; +} + +extern "C" { + static NSDecimalNumberOverflowException: &'static NSExceptionName; +} + +extern "C" { + static NSDecimalNumberUnderflowException: &'static NSExceptionName; +} + +extern "C" { + static NSDecimalNumberDivideByZeroException: &'static NSExceptionName; +} + pub type NSDecimalNumberBehaviors = NSObject; extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index fecf920c0..a071efa85 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -7,6 +7,10 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSDistributedNotificationCenterType = NSString; +extern "C" { + static NSLocalNotificationCenterType: &'static NSDistributedNotificationCenterType; +} + pub type NSNotificationSuspensionBehavior = NSUInteger; pub const NSNotificationSuspensionBehaviorDrop: NSNotificationSuspensionBehavior = 1; pub const NSNotificationSuspensionBehaviorCoalesce: NSNotificationSuspensionBehavior = 2; @@ -17,6 +21,12 @@ pub type NSDistributedNotificationOptions = NSUInteger; pub const NSDistributedNotificationDeliverImmediately: NSDistributedNotificationOptions = (1 << 0); pub const NSDistributedNotificationPostToAllSessions: NSDistributedNotificationOptions = (1 << 1); +static NSNotificationDeliverImmediately: NSDistributedNotificationOptions = + NSDistributedNotificationDeliverImmediately; + +static NSNotificationPostToAllSessions: NSDistributedNotificationOptions = + NSDistributedNotificationPostToAllSessions; + extern_class!( #[derive(Debug)] pub struct NSDistributedNotificationCenter; diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 2d54bb686..202cbc502 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -7,8 +7,76 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSErrorDomain = NSString; +extern "C" { + static NSCocoaErrorDomain: &'static NSErrorDomain; +} + +extern "C" { + static NSPOSIXErrorDomain: &'static NSErrorDomain; +} + +extern "C" { + static NSOSStatusErrorDomain: &'static NSErrorDomain; +} + +extern "C" { + static NSMachErrorDomain: &'static NSErrorDomain; +} + pub type NSErrorUserInfoKey = NSString; +extern "C" { + static NSUnderlyingErrorKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSMultipleUnderlyingErrorsKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSLocalizedDescriptionKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSLocalizedFailureReasonErrorKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSLocalizedRecoverySuggestionErrorKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSLocalizedRecoveryOptionsErrorKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSRecoveryAttempterErrorKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSHelpAnchorErrorKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSDebugDescriptionErrorKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSLocalizedFailureErrorKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSStringEncodingErrorKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSURLErrorKey: &'static NSErrorUserInfoKey; +} + +extern "C" { + static NSFilePathErrorKey: &'static NSErrorUserInfoKey; +} + extern_class!( #[derive(Debug)] pub struct NSError; diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index c1eeda957..5697c7e28 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -5,6 +5,66 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSGenericException: &'static NSExceptionName; +} + +extern "C" { + static NSRangeException: &'static NSExceptionName; +} + +extern "C" { + static NSInvalidArgumentException: &'static NSExceptionName; +} + +extern "C" { + static NSInternalInconsistencyException: &'static NSExceptionName; +} + +extern "C" { + static NSMallocException: &'static NSExceptionName; +} + +extern "C" { + static NSObjectInaccessibleException: &'static NSExceptionName; +} + +extern "C" { + static NSObjectNotAvailableException: &'static NSExceptionName; +} + +extern "C" { + static NSDestinationInvalidException: &'static NSExceptionName; +} + +extern "C" { + static NSPortTimeoutException: &'static NSExceptionName; +} + +extern "C" { + static NSInvalidSendPortException: &'static NSExceptionName; +} + +extern "C" { + static NSInvalidReceivePortException: &'static NSExceptionName; +} + +extern "C" { + static NSPortSendException: &'static NSExceptionName; +} + +extern "C" { + static NSPortReceiveException: &'static NSExceptionName; +} + +extern "C" { + static NSOldStyleException: &'static NSExceptionName; +} + +extern "C" { + static NSInconsistentArchiveException: &'static NSExceptionName; +} + extern_class!( #[derive(Debug)] pub struct NSException; @@ -63,6 +123,10 @@ extern_methods!( } ); +extern "C" { + static NSAssertionHandlerKey: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSAssertionHandler; diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index 5d7cf4d07..dbbeaecd2 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -33,3 +33,23 @@ extern_methods!( pub unsafe fn openURL_completionHandler(&self, URL: &NSURL, completionHandler: TodoBlock); } ); + +extern "C" { + static NSExtensionItemsAndErrorsKey: Option<&'static NSString>; +} + +extern "C" { + static NSExtensionHostWillEnterForegroundNotification: Option<&'static NSString>; +} + +extern "C" { + static NSExtensionHostDidEnterBackgroundNotification: Option<&'static NSString>; +} + +extern "C" { + static NSExtensionHostWillResignActiveNotification: Option<&'static NSString>; +} + +extern "C" { + static NSExtensionHostDidBecomeActiveNotification: Option<&'static NSString>; +} diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index b6e5f4665..97f9eab7a 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -44,3 +44,15 @@ extern_methods!( pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); } ); + +extern "C" { + static NSExtensionItemAttributedTitleKey: Option<&'static NSString>; +} + +extern "C" { + static NSExtensionItemAttributedContentTextKey: Option<&'static NSString>; +} + +extern "C" { + static NSExtensionItemAttachmentsKey: Option<&'static NSString>; +} diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 71fc51d42..7b6851805 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -116,6 +116,38 @@ extern_methods!( } ); +extern "C" { + static NSFileHandleOperationException: &'static NSExceptionName; +} + +extern "C" { + static NSFileHandleReadCompletionNotification: &'static NSNotificationName; +} + +extern "C" { + static NSFileHandleReadToEndOfFileCompletionNotification: &'static NSNotificationName; +} + +extern "C" { + static NSFileHandleConnectionAcceptedNotification: &'static NSNotificationName; +} + +extern "C" { + static NSFileHandleDataAvailableNotification: &'static NSNotificationName; +} + +extern "C" { + static NSFileHandleNotificationDataItem: &'static NSString; +} + +extern "C" { + static NSFileHandleNotificationFileHandleItem: &'static NSString; +} + +extern "C" { + static NSFileHandleNotificationMonitorModes: &'static NSString; +} + extern_methods!( /// NSFileHandleAsynchronousAccess unsafe impl NSFileHandle { diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 75e01525c..b2fc2e052 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -41,6 +41,14 @@ pub type NSFileManagerUnmountOptions = NSUInteger; pub const NSFileManagerUnmountAllPartitionsAndEjectDisk: NSFileManagerUnmountOptions = 1 << 0; pub const NSFileManagerUnmountWithoutUI: NSFileManagerUnmountOptions = 1 << 1; +extern "C" { + static NSFileManagerUnmountDissentingProcessIdentifierErrorKey: &'static NSString; +} + +extern "C" { + static NSUbiquityIdentityDidChangeNotification: &'static NSNotificationName; +} + extern_class!( #[derive(Debug)] pub struct NSFileManager; @@ -558,6 +566,146 @@ extern_methods!( } ); +extern "C" { + static NSFileType: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileTypeDirectory: &'static NSFileAttributeType; +} + +extern "C" { + static NSFileTypeRegular: &'static NSFileAttributeType; +} + +extern "C" { + static NSFileTypeSymbolicLink: &'static NSFileAttributeType; +} + +extern "C" { + static NSFileTypeSocket: &'static NSFileAttributeType; +} + +extern "C" { + static NSFileTypeCharacterSpecial: &'static NSFileAttributeType; +} + +extern "C" { + static NSFileTypeBlockSpecial: &'static NSFileAttributeType; +} + +extern "C" { + static NSFileTypeUnknown: &'static NSFileAttributeType; +} + +extern "C" { + static NSFileSize: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileModificationDate: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileReferenceCount: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileDeviceIdentifier: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileOwnerAccountName: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileGroupOwnerAccountName: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFilePosixPermissions: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileSystemNumber: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileSystemFileNumber: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileExtensionHidden: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileHFSCreatorCode: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileHFSTypeCode: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileImmutable: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileAppendOnly: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileCreationDate: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileOwnerAccountID: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileGroupOwnerAccountID: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileBusy: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileProtectionKey: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileProtectionNone: &'static NSFileProtectionType; +} + +extern "C" { + static NSFileProtectionComplete: &'static NSFileProtectionType; +} + +extern "C" { + static NSFileProtectionCompleteUnlessOpen: &'static NSFileProtectionType; +} + +extern "C" { + static NSFileProtectionCompleteUntilFirstUserAuthentication: &'static NSFileProtectionType; +} + +extern "C" { + static NSFileSystemSize: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileSystemFreeSize: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileSystemNodes: &'static NSFileAttributeKey; +} + +extern "C" { + static NSFileSystemFreeNodes: &'static NSFileAttributeKey; +} + extern_methods!( /// NSFileAttributes unsafe impl NSDictionary { diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 664f471e7..7ef59e48f 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -48,6 +48,22 @@ pub const NSAlignAllEdgesOutward: NSAlignmentOptions = pub const NSAlignAllEdgesNearest: NSAlignmentOptions = NSAlignMinXNearest | NSAlignMaxXNearest | NSAlignMinYNearest | NSAlignMaxYNearest; +extern "C" { + static NSZeroPoint: NSPoint; +} + +extern "C" { + static NSZeroSize: NSSize; +} + +extern "C" { + static NSZeroRect: NSRect; +} + +extern "C" { + static NSEdgeInsetsZero: NSEdgeInsets; +} + extern_methods!( /// NSValueGeometryExtensions unsafe impl NSValue { diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index df6618c5e..85df2d315 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -9,6 +9,70 @@ pub type NSHTTPCookiePropertyKey = NSString; pub type NSHTTPCookieStringPolicy = NSString; +extern "C" { + static NSHTTPCookieName: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieValue: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieOriginURL: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieVersion: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieDomain: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookiePath: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieSecure: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieExpires: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieComment: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieCommentURL: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieDiscard: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieMaximumAge: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookiePort: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieSameSitePolicy: &'static NSHTTPCookiePropertyKey; +} + +extern "C" { + static NSHTTPCookieSameSiteLax: &'static NSHTTPCookieStringPolicy; +} + +extern "C" { + static NSHTTPCookieSameSiteStrict: &'static NSHTTPCookieStringPolicy; +} + extern_class!( #[derive(Debug)] pub struct NSHTTPCookie; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index 992bc9ad5..71e83dc5c 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -87,3 +87,11 @@ extern_methods!( ); } ); + +extern "C" { + static NSHTTPCookieManagerAcceptPolicyChangedNotification: &'static NSNotificationName; +} + +extern "C" { + static NSHTTPCookieManagerCookiesChangedNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index f6ac795c9..af7dcbcd6 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -5,6 +5,18 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSHashTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory; + +static NSHashTableZeroingWeakMemory: NSPointerFunctionsOptions = + NSPointerFunctionsZeroingWeakMemory; + +static NSHashTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn; + +static NSHashTableObjectPointerPersonality: NSPointerFunctionsOptions = + NSPointerFunctionsObjectPointerPersonality; + +static NSHashTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory; + pub type NSHashTableOptions = NSUInteger; __inner_extern_class!( @@ -95,3 +107,35 @@ extern_methods!( pub unsafe fn setRepresentation(&self) -> Id, Shared>; } ); + +extern "C" { + static NSIntegerHashCallBacks: NSHashTableCallBacks; +} + +extern "C" { + static NSNonOwnedPointerHashCallBacks: NSHashTableCallBacks; +} + +extern "C" { + static NSNonRetainedObjectHashCallBacks: NSHashTableCallBacks; +} + +extern "C" { + static NSObjectHashCallBacks: NSHashTableCallBacks; +} + +extern "C" { + static NSOwnedObjectIdentityHashCallBacks: NSHashTableCallBacks; +} + +extern "C" { + static NSOwnedPointerHashCallBacks: NSHashTableCallBacks; +} + +extern "C" { + static NSPointerToStructHashCallBacks: NSHashTableCallBacks; +} + +extern "C" { + static NSIntHashCallBacks: NSHashTableCallBacks; +} diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 5bf6824d2..a82043cd0 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -136,6 +136,10 @@ extern_methods!( } ); +extern "C" { + static NSItemProviderPreferredImageSizeKey: &'static NSString; +} + extern_methods!( /// NSPreviewSupport unsafe impl NSItemProvider { @@ -154,6 +158,18 @@ extern_methods!( } ); +extern "C" { + static NSExtensionJavaScriptPreprocessingResultsKey: Option<&'static NSString>; +} + +extern "C" { + static NSExtensionJavaScriptFinalizeArgumentKey: Option<&'static NSString>; +} + +extern "C" { + static NSItemProviderErrorDomain: &'static NSString; +} + pub type NSItemProviderErrorCode = NSInteger; pub const NSItemProviderUnknownError: NSItemProviderErrorCode = -1; pub const NSItemProviderItemUnavailableError: NSItemProviderErrorCode = -1000; diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index c988142a1..000ffe95d 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -5,8 +5,56 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSUndefinedKeyException: &'static NSExceptionName; +} + pub type NSKeyValueOperator = NSString; +extern "C" { + static NSAverageKeyValueOperator: &'static NSKeyValueOperator; +} + +extern "C" { + static NSCountKeyValueOperator: &'static NSKeyValueOperator; +} + +extern "C" { + static NSDistinctUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator; +} + +extern "C" { + static NSDistinctUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator; +} + +extern "C" { + static NSDistinctUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator; +} + +extern "C" { + static NSMaximumKeyValueOperator: &'static NSKeyValueOperator; +} + +extern "C" { + static NSMinimumKeyValueOperator: &'static NSKeyValueOperator; +} + +extern "C" { + static NSSumKeyValueOperator: &'static NSKeyValueOperator; +} + +extern "C" { + static NSUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator; +} + +extern "C" { + static NSUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator; +} + +extern "C" { + static NSUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator; +} + extern_methods!( /// NSKeyValueCoding unsafe impl NSObject { diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 653017c30..123a5a7e7 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -25,6 +25,26 @@ pub const NSKeyValueSetSetMutation: NSKeyValueSetMutationKind = 4; pub type NSKeyValueChangeKey = NSString; +extern "C" { + static NSKeyValueChangeKindKey: &'static NSKeyValueChangeKey; +} + +extern "C" { + static NSKeyValueChangeNewKey: &'static NSKeyValueChangeKey; +} + +extern "C" { + static NSKeyValueChangeOldKey: &'static NSKeyValueChangeKey; +} + +extern "C" { + static NSKeyValueChangeIndexesKey: &'static NSKeyValueChangeKey; +} + +extern "C" { + static NSKeyValueChangeNotificationIsPriorKey: &'static NSKeyValueChangeKey; +} + extern_methods!( /// NSKeyValueObserving unsafe impl NSObject { diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 7fb555545..6b8d2b1ad 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -5,6 +5,18 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSInvalidArchiveOperationException: &'static NSExceptionName; +} + +extern "C" { + static NSInvalidUnarchiveOperationException: &'static NSExceptionName; +} + +extern "C" { + static NSKeyedArchiveRootObjectKey: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSKeyedArchiver; diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index a9caea7cb..2eb0a88a3 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -7,8 +7,160 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSLinguisticTagScheme = NSString; +extern "C" { + static NSLinguisticTagSchemeTokenType: &'static NSLinguisticTagScheme; +} + +extern "C" { + static NSLinguisticTagSchemeLexicalClass: &'static NSLinguisticTagScheme; +} + +extern "C" { + static NSLinguisticTagSchemeNameType: &'static NSLinguisticTagScheme; +} + +extern "C" { + static NSLinguisticTagSchemeNameTypeOrLexicalClass: &'static NSLinguisticTagScheme; +} + +extern "C" { + static NSLinguisticTagSchemeLemma: &'static NSLinguisticTagScheme; +} + +extern "C" { + static NSLinguisticTagSchemeLanguage: &'static NSLinguisticTagScheme; +} + +extern "C" { + static NSLinguisticTagSchemeScript: &'static NSLinguisticTagScheme; +} + pub type NSLinguisticTag = NSString; +extern "C" { + static NSLinguisticTagWord: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagPunctuation: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagWhitespace: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagOther: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagNoun: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagVerb: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagAdjective: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagAdverb: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagPronoun: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagDeterminer: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagParticle: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagPreposition: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagNumber: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagConjunction: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagInterjection: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagClassifier: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagIdiom: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagOtherWord: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagSentenceTerminator: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagOpenQuote: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagCloseQuote: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagOpenParenthesis: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagCloseParenthesis: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagWordJoiner: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagDash: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagOtherPunctuation: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagParagraphBreak: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagOtherWhitespace: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagPersonalName: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagPlaceName: &'static NSLinguisticTag; +} + +extern "C" { + static NSLinguisticTagOrganizationName: &'static NSLinguisticTag; +} + pub type NSLinguisticTaggerUnit = NSInteger; pub const NSLinguisticTaggerUnitWord: NSLinguisticTaggerUnit = 0; pub const NSLinguisticTaggerUnitSentence: NSLinguisticTaggerUnit = 1; diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index da3a75793..b497d7a8e 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -240,3 +240,127 @@ extern_methods!( -> NSLocaleLanguageDirection; } ); + +extern "C" { + static NSCurrentLocaleDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSLocaleIdentifier: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleLanguageCode: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleCountryCode: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleScriptCode: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleVariantCode: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleExemplarCharacterSet: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleCalendar: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleCollationIdentifier: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleUsesMetricSystem: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleMeasurementSystem: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleDecimalSeparator: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleGroupingSeparator: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleCurrencySymbol: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleCurrencyCode: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleCollatorIdentifier: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleQuotationBeginDelimiterKey: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleQuotationEndDelimiterKey: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleAlternateQuotationBeginDelimiterKey: &'static NSLocaleKey; +} + +extern "C" { + static NSLocaleAlternateQuotationEndDelimiterKey: &'static NSLocaleKey; +} + +extern "C" { + static NSGregorianCalendar: &'static NSString; +} + +extern "C" { + static NSBuddhistCalendar: &'static NSString; +} + +extern "C" { + static NSChineseCalendar: &'static NSString; +} + +extern "C" { + static NSHebrewCalendar: &'static NSString; +} + +extern "C" { + static NSIslamicCalendar: &'static NSString; +} + +extern "C" { + static NSIslamicCivilCalendar: &'static NSString; +} + +extern "C" { + static NSJapaneseCalendar: &'static NSString; +} + +extern "C" { + static NSRepublicOfChinaCalendar: &'static NSString; +} + +extern "C" { + static NSPersianCalendar: &'static NSString; +} + +extern "C" { + static NSIndianCalendar: &'static NSString; +} + +extern "C" { + static NSISO8601Calendar: &'static NSString; +} diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 3d8033530..85d8bb577 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -5,6 +5,17 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSMapTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory; + +static NSMapTableZeroingWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsZeroingWeakMemory; + +static NSMapTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn; + +static NSMapTableObjectPointerPersonality: NSPointerFunctionsOptions = + NSPointerFunctionsObjectPointerPersonality; + +static NSMapTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory; + pub type NSMapTableOptions = NSUInteger; __inner_extern_class!( @@ -102,3 +113,55 @@ extern_methods!( ) -> Id, Shared>; } ); + +extern "C" { + static NSIntegerMapKeyCallBacks: NSMapTableKeyCallBacks; +} + +extern "C" { + static NSNonOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks; +} + +extern "C" { + static NSNonOwnedPointerOrNullMapKeyCallBacks: NSMapTableKeyCallBacks; +} + +extern "C" { + static NSNonRetainedObjectMapKeyCallBacks: NSMapTableKeyCallBacks; +} + +extern "C" { + static NSObjectMapKeyCallBacks: NSMapTableKeyCallBacks; +} + +extern "C" { + static NSOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks; +} + +extern "C" { + static NSIntMapKeyCallBacks: NSMapTableKeyCallBacks; +} + +extern "C" { + static NSIntegerMapValueCallBacks: NSMapTableValueCallBacks; +} + +extern "C" { + static NSNonOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks; +} + +extern "C" { + static NSObjectMapValueCallBacks: NSMapTableValueCallBacks; +} + +extern "C" { + static NSNonRetainedObjectMapValueCallBacks: NSMapTableValueCallBacks; +} + +extern "C" { + static NSOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks; +} + +extern "C" { + static NSIntMapValueCallBacks: NSMapTableValueCallBacks; +} diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 35f4bd84b..916a077bf 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -135,6 +135,70 @@ extern_methods!( pub type NSMetadataQueryDelegate = NSObject; +extern "C" { + static NSMetadataQueryDidStartGatheringNotification: &'static NSNotificationName; +} + +extern "C" { + static NSMetadataQueryGatheringProgressNotification: &'static NSNotificationName; +} + +extern "C" { + static NSMetadataQueryDidFinishGatheringNotification: &'static NSNotificationName; +} + +extern "C" { + static NSMetadataQueryDidUpdateNotification: &'static NSNotificationName; +} + +extern "C" { + static NSMetadataQueryUpdateAddedItemsKey: &'static NSString; +} + +extern "C" { + static NSMetadataQueryUpdateChangedItemsKey: &'static NSString; +} + +extern "C" { + static NSMetadataQueryUpdateRemovedItemsKey: &'static NSString; +} + +extern "C" { + static NSMetadataQueryResultContentRelevanceAttribute: &'static NSString; +} + +extern "C" { + static NSMetadataQueryUserHomeScope: &'static NSString; +} + +extern "C" { + static NSMetadataQueryLocalComputerScope: &'static NSString; +} + +extern "C" { + static NSMetadataQueryNetworkScope: &'static NSString; +} + +extern "C" { + static NSMetadataQueryIndexedLocalComputerScope: &'static NSString; +} + +extern "C" { + static NSMetadataQueryIndexedNetworkScope: &'static NSString; +} + +extern "C" { + static NSMetadataQueryUbiquitousDocumentsScope: &'static NSString; +} + +extern "C" { + static NSMetadataQueryUbiquitousDataScope: &'static NSString; +} + +extern "C" { + static NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSMetadataItem; diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs index 9810872e4..71c7db339 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -4,3 +4,727 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; + +extern "C" { + static NSMetadataItemFSNameKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemDisplayNameKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemURLKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemPathKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemFSSizeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemFSCreationDateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemFSContentChangeDateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemContentTypeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemContentTypeTreeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemIsUbiquitousKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemHasUnresolvedConflictsKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemIsDownloadedKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemDownloadingStatusKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemDownloadingStatusNotDownloaded: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemDownloadingStatusDownloaded: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemDownloadingStatusCurrent: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemIsDownloadingKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemIsUploadedKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemIsUploadingKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemPercentDownloadedKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemPercentUploadedKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemDownloadingErrorKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemUploadingErrorKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemDownloadRequestedKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemIsExternalDocumentKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemContainerDisplayNameKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemURLInLocalContainerKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousItemIsSharedKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousSharedItemCurrentUserRoleKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousSharedItemOwnerNameComponentsKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousSharedItemRoleOwner: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousSharedItemRoleParticipant: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousSharedItemPermissionsReadOnly: &'static NSString; +} + +extern "C" { + static NSMetadataUbiquitousSharedItemPermissionsReadWrite: &'static NSString; +} + +extern "C" { + static NSMetadataItemAttributeChangeDateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemKeywordsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemTitleKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAuthorsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemEditorsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemParticipantsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemProjectsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemDownloadedDateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemWhereFromsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemCommentKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemCopyrightKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemLastUsedDateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemContentCreationDateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemContentModificationDateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemDateAddedKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemDurationSecondsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemContactKeywordsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemVersionKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemPixelHeightKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemPixelWidthKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemPixelCountKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemColorSpaceKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemBitsPerSampleKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemFlashOnOffKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemFocalLengthKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAcquisitionMakeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAcquisitionModelKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemISOSpeedKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemOrientationKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemLayerNamesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemWhiteBalanceKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemApertureKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemProfileNameKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemResolutionWidthDPIKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemResolutionHeightDPIKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemExposureModeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemExposureTimeSecondsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemEXIFVersionKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemCameraOwnerKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemFocalLength35mmKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemLensModelKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemEXIFGPSVersionKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAltitudeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemLatitudeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemLongitudeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemSpeedKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemTimestampKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSTrackKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemImageDirectionKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemNamedLocationKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSStatusKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSMeasureModeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSDOPKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSMapDatumKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSDestLatitudeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSDestLongitudeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSDestBearingKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSDestDistanceKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSProcessingMethodKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSAreaInformationKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSDateStampKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGPSDifferentalKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemCodecsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemMediaTypesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemStreamableKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemTotalBitRateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemVideoBitRateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAudioBitRateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemDeliveryTypeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAlbumKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemHasAlphaChannelKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemRedEyeOnOffKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemMeteringModeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemMaxApertureKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemFNumberKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemExposureProgramKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemExposureTimeStringKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemHeadlineKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemInstructionsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemCityKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemStateOrProvinceKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemCountryKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemTextContentKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAudioSampleRateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAudioChannelCountKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemTempoKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemKeySignatureKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemTimeSignatureKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAudioEncodingApplicationKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemComposerKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemLyricistKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAudioTrackNumberKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemRecordingDateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemMusicalGenreKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemIsGeneralMIDISequenceKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemRecordingYearKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemOrganizationsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemLanguagesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemRightsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemPublishersKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemContributorsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemCoverageKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemSubjectKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemThemeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemDescriptionKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemIdentifierKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAudiencesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemNumberOfPagesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemPageWidthKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemPageHeightKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemSecurityMethodKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemCreatorKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemEncodingApplicationsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemDueDateKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemStarRatingKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemPhoneNumbersKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemEmailAddressesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemInstantMessageAddressesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemKindKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemRecipientsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemFinderCommentKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemFontsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAppleLoopsRootKeyKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAppleLoopsKeyFilterTypeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAppleLoopsLoopModeKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAppleLoopDescriptorsKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemMusicalInstrumentCategoryKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemMusicalInstrumentNameKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemCFBundleIdentifierKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemInformationKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemDirectorKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemProducerKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemGenreKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemPerformersKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemOriginalFormatKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemOriginalSourceKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAuthorEmailAddressesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemRecipientEmailAddressesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemAuthorAddressesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemRecipientAddressesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemIsLikelyJunkKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemExecutableArchitecturesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemExecutablePlatformKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemApplicationCategoriesKey: &'static NSString; +} + +extern "C" { + static NSMetadataItemIsApplicationManagedKey: &'static NSString; +} diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index d899d55ac..15b45c1ba 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -5,6 +5,14 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSNetServicesErrorCode: &'static NSString; +} + +extern "C" { + static NSNetServicesErrorDomain: &'static NSErrorDomain; +} + pub type NSNetServicesError = NSInteger; pub const NSNetServicesUnknownError: NSNetServicesError = -72000; pub const NSNetServicesCollisionError: NSNetServicesError = -72001; diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 6c7f67725..5594e34a2 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSFoundationVersionNumber: c_double; +} + pub type NSExceptionName = NSString; pub type NSRunLoopMode = NSString; @@ -28,3 +32,5 @@ pub const NSQualityOfServiceUserInitiated: NSQualityOfService = 0x19; pub const NSQualityOfServiceUtility: NSQualityOfService = 0x11; pub const NSQualityOfServiceBackground: NSQualityOfService = 0x09; pub const NSQualityOfServiceDefault: NSQualityOfService = -1; + +static NSNotFound: NSInteger = todo; diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 86ff4bb50..51e019263 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -143,6 +143,16 @@ extern_methods!( } ); +extern "C" { + static NSInvocationOperationVoidResultException: &'static NSExceptionName; +} + +extern "C" { + static NSInvocationOperationCancelledException: &'static NSExceptionName; +} + +static NSOperationQueueDefaultMaxConcurrentOperationCount: NSInteger = -1; + extern_class!( #[derive(Debug)] pub struct NSOperationQueue; diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index 52d75bd48..f9d1ffbcb 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -79,3 +79,35 @@ extern_methods!( ) -> bool; } ); + +extern "C" { + static NSPersonNameComponentKey: &'static NSString; +} + +extern "C" { + static NSPersonNameComponentGivenName: &'static NSString; +} + +extern "C" { + static NSPersonNameComponentFamilyName: &'static NSString; +} + +extern "C" { + static NSPersonNameComponentMiddleName: &'static NSString; +} + +extern "C" { + static NSPersonNameComponentPrefix: &'static NSString; +} + +extern "C" { + static NSPersonNameComponentSuffix: &'static NSString; +} + +extern "C" { + static NSPersonNameComponentNickname: &'static NSString; +} + +extern "C" { + static NSPersonNameComponentDelimiter: &'static NSString; +} diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 641979936..d4644ebf0 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSPortDidBecomeInvalidNotification: &'static NSNotificationName; +} + extern_class!( #[derive(Debug)] pub struct NSPort; diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 8658ad868..79e3df528 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -176,6 +176,14 @@ extern_methods!( } ); +extern "C" { + static NSProcessInfoThermalStateDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSProcessInfoPowerStateDidChangeNotification: &'static NSNotificationName; +} + extern_methods!( /// NSProcessInfoPlatform unsafe impl NSProcessInfo { diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 2670d02e5..4dadd911f 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -224,3 +224,68 @@ extern_methods!( ); pub type NSProgressReporting = NSObject; + +extern "C" { + static NSProgressEstimatedTimeRemainingKey: &'static NSProgressUserInfoKey; +} + +extern "C" { + static NSProgressThroughputKey: &'static NSProgressUserInfoKey; +} + +extern "C" { + static NSProgressKindFile: &'static NSProgressKind; +} + +extern "C" { + static NSProgressFileOperationKindKey: &'static NSProgressUserInfoKey; +} + +extern "C" { + static NSProgressFileOperationKindDownloading: &'static NSProgressFileOperationKind; +} + +extern "C" { + static NSProgressFileOperationKindDecompressingAfterDownloading: + &'static NSProgressFileOperationKind; +} + +extern "C" { + static NSProgressFileOperationKindReceiving: &'static NSProgressFileOperationKind; +} + +extern "C" { + static NSProgressFileOperationKindCopying: &'static NSProgressFileOperationKind; +} + +extern "C" { + static NSProgressFileOperationKindUploading: &'static NSProgressFileOperationKind; +} + +extern "C" { + static NSProgressFileOperationKindDuplicating: &'static NSProgressFileOperationKind; +} + +extern "C" { + static NSProgressFileURLKey: &'static NSProgressUserInfoKey; +} + +extern "C" { + static NSProgressFileTotalCountKey: &'static NSProgressUserInfoKey; +} + +extern "C" { + static NSProgressFileCompletedCountKey: &'static NSProgressUserInfoKey; +} + +extern "C" { + static NSProgressFileAnimationImageKey: &'static NSProgressUserInfoKey; +} + +extern "C" { + static NSProgressFileAnimationImageOriginalRectKey: &'static NSProgressUserInfoKey; +} + +extern "C" { + static NSProgressFileIconKey: &'static NSProgressUserInfoKey; +} diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 650d1aa60..291f6d8a3 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -5,6 +5,14 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSDefaultRunLoopMode: &'static NSRunLoopMode; +} + +extern "C" { + static NSRunLoopCommonModes: &'static NSRunLoopMode; +} + extern_class!( #[derive(Debug)] pub struct NSRunLoop; diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index 91abe6c14..fce3eca7a 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSOperationNotSupportedForKeyException: &'static NSString; +} + extern_methods!( /// NSScriptKeyValueCoding unsafe impl NSObject { diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 6644c828b..6c122601c 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -41,4 +41,16 @@ extern_methods!( } ); +extern "C" { + static NSGrammarRange: &'static NSString; +} + +extern "C" { + static NSGrammarUserDescription: &'static NSString; +} + +extern "C" { + static NSGrammarCorrections: &'static NSString; +} + pub type NSSpellServerDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 05c2ae080..14bfcab9a 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -228,10 +228,106 @@ extern_methods!( pub type NSStreamDelegate = NSObject; +extern "C" { + static NSStreamSocketSecurityLevelKey: &'static NSStreamPropertyKey; +} + pub type NSStreamSocketSecurityLevel = NSString; +extern "C" { + static NSStreamSocketSecurityLevelNone: &'static NSStreamSocketSecurityLevel; +} + +extern "C" { + static NSStreamSocketSecurityLevelSSLv2: &'static NSStreamSocketSecurityLevel; +} + +extern "C" { + static NSStreamSocketSecurityLevelSSLv3: &'static NSStreamSocketSecurityLevel; +} + +extern "C" { + static NSStreamSocketSecurityLevelTLSv1: &'static NSStreamSocketSecurityLevel; +} + +extern "C" { + static NSStreamSocketSecurityLevelNegotiatedSSL: &'static NSStreamSocketSecurityLevel; +} + +extern "C" { + static NSStreamSOCKSProxyConfigurationKey: &'static NSStreamPropertyKey; +} + pub type NSStreamSOCKSProxyConfiguration = NSString; +extern "C" { + static NSStreamSOCKSProxyHostKey: &'static NSStreamSOCKSProxyConfiguration; +} + +extern "C" { + static NSStreamSOCKSProxyPortKey: &'static NSStreamSOCKSProxyConfiguration; +} + +extern "C" { + static NSStreamSOCKSProxyVersionKey: &'static NSStreamSOCKSProxyConfiguration; +} + +extern "C" { + static NSStreamSOCKSProxyUserKey: &'static NSStreamSOCKSProxyConfiguration; +} + +extern "C" { + static NSStreamSOCKSProxyPasswordKey: &'static NSStreamSOCKSProxyConfiguration; +} + pub type NSStreamSOCKSProxyVersion = NSString; +extern "C" { + static NSStreamSOCKSProxyVersion4: &'static NSStreamSOCKSProxyVersion; +} + +extern "C" { + static NSStreamSOCKSProxyVersion5: &'static NSStreamSOCKSProxyVersion; +} + +extern "C" { + static NSStreamDataWrittenToMemoryStreamKey: &'static NSStreamPropertyKey; +} + +extern "C" { + static NSStreamFileCurrentOffsetKey: &'static NSStreamPropertyKey; +} + +extern "C" { + static NSStreamSocketSSLErrorDomain: &'static NSErrorDomain; +} + +extern "C" { + static NSStreamSOCKSErrorDomain: &'static NSErrorDomain; +} + +extern "C" { + static NSStreamNetworkServiceType: &'static NSStreamPropertyKey; +} + pub type NSStreamNetworkServiceTypeValue = NSString; + +extern "C" { + static NSStreamNetworkServiceTypeVoIP: &'static NSStreamNetworkServiceTypeValue; +} + +extern "C" { + static NSStreamNetworkServiceTypeVideo: &'static NSStreamNetworkServiceTypeValue; +} + +extern "C" { + static NSStreamNetworkServiceTypeBackground: &'static NSStreamNetworkServiceTypeValue; +} + +extern "C" { + static NSStreamNetworkServiceTypeVoice: &'static NSStreamNetworkServiceTypeValue; +} + +extern "C" { + static NSStreamNetworkServiceTypeCallSignaling: &'static NSStreamNetworkServiceTypeValue; +} diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index e6f07454b..58bd01d45 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -85,6 +85,70 @@ pub const NSStringEnumerationLocalized: NSStringEnumerationOptions = 1 << 10; pub type NSStringTransform = NSString; +extern "C" { + static NSStringTransformLatinToKatakana: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformLatinToHiragana: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformLatinToHangul: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformLatinToArabic: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformLatinToHebrew: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformLatinToThai: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformLatinToCyrillic: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformLatinToGreek: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformToLatin: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformMandarinToLatin: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformHiraganaToKatakana: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformFullwidthToHalfwidth: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformToXMLHex: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformToUnicodeName: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformStripCombiningMarks: &'static NSStringTransform; +} + +extern "C" { + static NSStringTransformStripDiacritics: &'static NSStringTransform; +} + extern_methods!( /// NSStringExtensionMethods unsafe impl NSString { @@ -642,6 +706,38 @@ extern_methods!( pub type NSStringEncodingDetectionOptionsKey = NSString; +extern "C" { + static NSStringEncodingDetectionSuggestedEncodingsKey: + &'static NSStringEncodingDetectionOptionsKey; +} + +extern "C" { + static NSStringEncodingDetectionDisallowedEncodingsKey: + &'static NSStringEncodingDetectionOptionsKey; +} + +extern "C" { + static NSStringEncodingDetectionUseOnlySuggestedEncodingsKey: + &'static NSStringEncodingDetectionOptionsKey; +} + +extern "C" { + static NSStringEncodingDetectionAllowLossyKey: &'static NSStringEncodingDetectionOptionsKey; +} + +extern "C" { + static NSStringEncodingDetectionFromWindowsKey: &'static NSStringEncodingDetectionOptionsKey; +} + +extern "C" { + static NSStringEncodingDetectionLossySubstitutionKey: + &'static NSStringEncodingDetectionOptionsKey; +} + +extern "C" { + static NSStringEncodingDetectionLikelyLanguageKey: &'static NSStringEncodingDetectionOptionsKey; +} + extern_methods!( /// NSStringEncodingDetection unsafe impl NSString { @@ -721,6 +817,14 @@ extern_methods!( } ); +extern "C" { + static NSCharacterConversionException: &'static NSExceptionName; +} + +extern "C" { + static NSParseErrorException: &'static NSExceptionName; +} + extern_methods!( /// NSExtendedStringPropertyListParsing unsafe impl NSString { diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 07117fe88..6abc65449 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -147,3 +147,7 @@ extern_methods!( ) -> Id; } ); + +extern "C" { + static NSTaskDidTerminateNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 5ff7fda1e..3e0c5c928 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -110,6 +110,50 @@ extern_methods!( } ); +extern "C" { + static NSTextCheckingNameKey: &'static NSTextCheckingKey; +} + +extern "C" { + static NSTextCheckingJobTitleKey: &'static NSTextCheckingKey; +} + +extern "C" { + static NSTextCheckingOrganizationKey: &'static NSTextCheckingKey; +} + +extern "C" { + static NSTextCheckingStreetKey: &'static NSTextCheckingKey; +} + +extern "C" { + static NSTextCheckingCityKey: &'static NSTextCheckingKey; +} + +extern "C" { + static NSTextCheckingStateKey: &'static NSTextCheckingKey; +} + +extern "C" { + static NSTextCheckingZIPKey: &'static NSTextCheckingKey; +} + +extern "C" { + static NSTextCheckingCountryKey: &'static NSTextCheckingKey; +} + +extern "C" { + static NSTextCheckingPhoneKey: &'static NSTextCheckingKey; +} + +extern "C" { + static NSTextCheckingAirlineKey: &'static NSTextCheckingKey; +} + +extern "C" { + static NSTextCheckingFlightKey: &'static NSTextCheckingKey; +} + extern_methods!( /// NSTextCheckingResultCreation unsafe impl NSTextCheckingResult { diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 55d4763a9..00b0b893d 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -123,6 +123,18 @@ extern_methods!( } ); +extern "C" { + static NSWillBecomeMultiThreadedNotification: &'static NSNotificationName; +} + +extern "C" { + static NSDidBecomeSingleThreadedNotification: &'static NSNotificationName; +} + +extern "C" { + static NSThreadWillExitNotification: &'static NSNotificationName; +} + extern_methods!( /// NSThreadPerformAdditions unsafe impl NSObject { diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 7f4b70e37..f02674bb0 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -142,3 +142,7 @@ extern_methods!( -> Option>; } ); + +extern "C" { + static NSSystemTimeZoneDidChangeNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index cc4649c80..d8900f1e0 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -7,18 +7,588 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSURLResourceKey = NSString; +extern "C" { + static NSURLFileScheme: &'static NSString; +} + +extern "C" { + static NSURLKeysOfUnsetValuesKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLNameKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLLocalizedNameKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsRegularFileKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsDirectoryKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsSymbolicLinkKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsVolumeKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsPackageKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsApplicationKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLApplicationIsScriptableKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsSystemImmutableKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsUserImmutableKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsHiddenKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLHasHiddenExtensionKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLCreationDateKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLContentAccessDateKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLContentModificationDateKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLAttributeModificationDateKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLLinkCountKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLParentDirectoryURLKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeURLKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLTypeIdentifierKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLContentTypeKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLLocalizedTypeDescriptionKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLLabelNumberKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLLabelColorKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLLocalizedLabelKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLEffectiveIconKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLCustomIconKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLFileResourceIdentifierKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIdentifierKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLPreferredIOBlockSizeKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsReadableKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsWritableKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsExecutableKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLFileSecurityKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsExcludedFromBackupKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLTagNamesKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLPathKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLCanonicalPathKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsMountTriggerKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLGenerationIdentifierKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLDocumentIdentifierKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLAddedToDirectoryDateKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLQuarantinePropertiesKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLFileResourceTypeKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLFileContentIdentifierKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLMayShareFileContentKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLMayHaveExtendedAttributesKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsPurgeableKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsSparseKey: &'static NSURLResourceKey; +} + pub type NSURLFileResourceType = NSString; +extern "C" { + static NSURLFileResourceTypeNamedPipe: &'static NSURLFileResourceType; +} + +extern "C" { + static NSURLFileResourceTypeCharacterSpecial: &'static NSURLFileResourceType; +} + +extern "C" { + static NSURLFileResourceTypeDirectory: &'static NSURLFileResourceType; +} + +extern "C" { + static NSURLFileResourceTypeBlockSpecial: &'static NSURLFileResourceType; +} + +extern "C" { + static NSURLFileResourceTypeRegular: &'static NSURLFileResourceType; +} + +extern "C" { + static NSURLFileResourceTypeSymbolicLink: &'static NSURLFileResourceType; +} + +extern "C" { + static NSURLFileResourceTypeSocket: &'static NSURLFileResourceType; +} + +extern "C" { + static NSURLFileResourceTypeUnknown: &'static NSURLFileResourceType; +} + +extern "C" { + static NSURLThumbnailDictionaryKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLThumbnailKey: &'static NSURLResourceKey; +} + pub type NSURLThumbnailDictionaryItem = NSString; +extern "C" { + static NSThumbnail1024x1024SizeKey: &'static NSURLThumbnailDictionaryItem; +} + +extern "C" { + static NSURLFileSizeKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLFileAllocatedSizeKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLTotalFileSizeKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLTotalFileAllocatedSizeKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsAliasFileKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLFileProtectionKey: &'static NSURLResourceKey; +} + pub type NSURLFileProtectionType = NSString; +extern "C" { + static NSURLFileProtectionNone: &'static NSURLFileProtectionType; +} + +extern "C" { + static NSURLFileProtectionComplete: &'static NSURLFileProtectionType; +} + +extern "C" { + static NSURLFileProtectionCompleteUnlessOpen: &'static NSURLFileProtectionType; +} + +extern "C" { + static NSURLFileProtectionCompleteUntilFirstUserAuthentication: + &'static NSURLFileProtectionType; +} + +extern "C" { + static NSURLVolumeLocalizedFormatDescriptionKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeTotalCapacityKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeAvailableCapacityKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeResourceCountKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsPersistentIDsKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsSymbolicLinksKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsHardLinksKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsJournalingKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIsJournalingKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsSparseFilesKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsZeroRunsKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsCaseSensitiveNamesKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsCasePreservedNamesKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsRootDirectoryDatesKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsVolumeSizesKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsRenamingKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsAdvisoryFileLockingKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsExtendedSecurityKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIsBrowsableKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeMaximumFileSizeKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIsEjectableKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIsRemovableKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIsInternalKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIsAutomountedKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIsLocalKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIsReadOnlyKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeCreationDateKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeURLForRemountingKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeUUIDStringKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeNameKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeLocalizedNameKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIsEncryptedKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeIsRootFileSystemKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsCompressionKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsFileCloningKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsSwapRenamingKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsExclusiveRenamingKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsImmutableFilesKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsAccessPermissionsKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeSupportsFileProtectionKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeAvailableCapacityForImportantUsageKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLVolumeAvailableCapacityForOpportunisticUsageKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLIsUbiquitousItemKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemHasUnresolvedConflictsKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemIsDownloadedKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemIsDownloadingKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemIsUploadedKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemIsUploadingKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemPercentDownloadedKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemPercentUploadedKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemDownloadingStatusKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemDownloadingErrorKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemUploadingErrorKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemDownloadRequestedKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemContainerDisplayNameKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemIsExcludedFromSyncKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousItemIsSharedKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousSharedItemCurrentUserRoleKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousSharedItemOwnerNameComponentsKey: &'static NSURLResourceKey; +} + +extern "C" { + static NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey: &'static NSURLResourceKey; +} + pub type NSURLUbiquitousItemDownloadingStatus = NSString; +extern "C" { + static NSURLUbiquitousItemDownloadingStatusNotDownloaded: + &'static NSURLUbiquitousItemDownloadingStatus; +} + +extern "C" { + static NSURLUbiquitousItemDownloadingStatusDownloaded: + &'static NSURLUbiquitousItemDownloadingStatus; +} + +extern "C" { + static NSURLUbiquitousItemDownloadingStatusCurrent: + &'static NSURLUbiquitousItemDownloadingStatus; +} + pub type NSURLUbiquitousSharedItemRole = NSString; +extern "C" { + static NSURLUbiquitousSharedItemRoleOwner: &'static NSURLUbiquitousSharedItemRole; +} + +extern "C" { + static NSURLUbiquitousSharedItemRoleParticipant: &'static NSURLUbiquitousSharedItemRole; +} + pub type NSURLUbiquitousSharedItemPermissions = NSString; +extern "C" { + static NSURLUbiquitousSharedItemPermissionsReadOnly: + &'static NSURLUbiquitousSharedItemPermissions; +} + +extern "C" { + static NSURLUbiquitousSharedItemPermissionsReadWrite: + &'static NSURLUbiquitousSharedItemPermissions; +} + pub type NSURLBookmarkCreationOptions = NSUInteger; pub const NSURLBookmarkCreationPreferFileIDResolution: NSURLBookmarkCreationOptions = (1 << 8); pub const NSURLBookmarkCreationMinimalBookmark: NSURLBookmarkCreationOptions = (1 << 9); diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 1613ce6f1..2baabeef8 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -112,3 +112,11 @@ extern_methods!( ); } ); + +extern "C" { + static NSURLCredentialStorageChangedNotification: &'static NSNotificationName; +} + +extern "C" { + static NSURLCredentialStorageRemoveSynchronizableCredentials: &'static NSString; +} diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index cd1302a7a..e904f452f 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -5,10 +5,38 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSURLErrorDomain: &'static NSErrorDomain; +} + +extern "C" { + static NSURLErrorFailingURLErrorKey: &'static NSString; +} + +extern "C" { + static NSURLErrorFailingURLStringErrorKey: &'static NSString; +} + +extern "C" { + static NSErrorFailingURLStringKey: &'static NSString; +} + +extern "C" { + static NSURLErrorFailingURLPeerTrustErrorKey: &'static NSString; +} + +extern "C" { + static NSURLErrorBackgroundTaskCancelledReasonKey: &'static NSString; +} + pub const NSURLErrorCancelledReasonUserForceQuitApplication: i32 = 0; pub const NSURLErrorCancelledReasonBackgroundUpdatesDisabled: i32 = 1; pub const NSURLErrorCancelledReasonInsufficientSystemResources: i32 = 2; +extern "C" { + static NSURLErrorNetworkUnavailableReasonKey: &'static NSErrorUserInfoKey; +} + pub type NSURLErrorNetworkUnavailableReason = NSInteger; pub const NSURLErrorNetworkUnavailableReasonCellular: NSURLErrorNetworkUnavailableReason = 0; pub const NSURLErrorNetworkUnavailableReasonExpensive: NSURLErrorNetworkUnavailableReason = 1; diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 8b1eb7bef..afad211d8 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -5,6 +5,50 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSHTTPPropertyStatusCodeKey: Option<&'static NSString>; +} + +extern "C" { + static NSHTTPPropertyStatusReasonKey: Option<&'static NSString>; +} + +extern "C" { + static NSHTTPPropertyServerHTTPVersionKey: Option<&'static NSString>; +} + +extern "C" { + static NSHTTPPropertyRedirectionHeadersKey: Option<&'static NSString>; +} + +extern "C" { + static NSHTTPPropertyErrorPageDataKey: Option<&'static NSString>; +} + +extern "C" { + static NSHTTPPropertyHTTPProxy: Option<&'static NSString>; +} + +extern "C" { + static NSFTPPropertyUserLoginKey: Option<&'static NSString>; +} + +extern "C" { + static NSFTPPropertyUserPasswordKey: Option<&'static NSString>; +} + +extern "C" { + static NSFTPPropertyActiveTransferModeKey: Option<&'static NSString>; +} + +extern "C" { + static NSFTPPropertyFileOffsetKey: Option<&'static NSString>; +} + +extern "C" { + static NSFTPPropertyFTPProxy: Option<&'static NSString>; +} + pub type NSURLHandleStatus = NSUInteger; pub const NSURLHandleNotLoaded: NSURLHandleStatus = 0; pub const NSURLHandleLoadSucceeded: NSURLHandleStatus = 1; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 04510d981..ec75a94a2 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -5,6 +5,66 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSURLProtectionSpaceHTTP: &'static NSString; +} + +extern "C" { + static NSURLProtectionSpaceHTTPS: &'static NSString; +} + +extern "C" { + static NSURLProtectionSpaceFTP: &'static NSString; +} + +extern "C" { + static NSURLProtectionSpaceHTTPProxy: &'static NSString; +} + +extern "C" { + static NSURLProtectionSpaceHTTPSProxy: &'static NSString; +} + +extern "C" { + static NSURLProtectionSpaceFTPProxy: &'static NSString; +} + +extern "C" { + static NSURLProtectionSpaceSOCKSProxy: &'static NSString; +} + +extern "C" { + static NSURLAuthenticationMethodDefault: &'static NSString; +} + +extern "C" { + static NSURLAuthenticationMethodHTTPBasic: &'static NSString; +} + +extern "C" { + static NSURLAuthenticationMethodHTTPDigest: &'static NSString; +} + +extern "C" { + static NSURLAuthenticationMethodHTMLForm: &'static NSString; +} + +extern "C" { + static NSURLAuthenticationMethodNTLM: &'static NSString; +} + +extern "C" { + static NSURLAuthenticationMethodNegotiate: &'static NSString; +} + +extern "C" { + static NSURLAuthenticationMethodClientCertificate: &'static NSString; +} + +extern "C" { + static NSURLAuthenticationMethodServerTrust: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSURLProtectionSpace; diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 7a598d43c..c6be0a54e 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -5,6 +5,10 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSURLSessionTransferSizeUnknown: int64_t; +} + extern_class!( #[derive(Debug)] pub struct NSURLSession; @@ -322,6 +326,18 @@ extern_methods!( } ); +extern "C" { + static NSURLSessionTaskPriorityDefault: c_float; +} + +extern "C" { + static NSURLSessionTaskPriorityLow: c_float; +} + +extern "C" { + static NSURLSessionTaskPriorityHigh: c_float; +} + extern_class!( #[derive(Debug)] pub struct NSURLSessionDataTask; @@ -815,6 +831,10 @@ pub type NSURLSessionStreamDelegate = NSObject; pub type NSURLSessionWebSocketDelegate = NSObject; +extern "C" { + static NSURLSessionDownloadTaskResumeData: &'static NSString; +} + extern_methods!( /// NSURLSessionDeprecated unsafe impl NSURLSessionConfiguration { diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 8f9b298a0..406fa2e44 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -86,6 +86,18 @@ extern_methods!( } ); +extern "C" { + static NSUbiquitousKeyValueStoreDidChangeExternallyNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUbiquitousKeyValueStoreChangeReasonKey: &'static NSString; +} + +extern "C" { + static NSUbiquitousKeyValueStoreChangedKeysKey: &'static NSString; +} + pub const NSUbiquitousKeyValueStoreServerChange: i32 = 0; pub const NSUbiquitousKeyValueStoreInitialSyncChange: i32 = 1; pub const NSUbiquitousKeyValueStoreQuotaViolationChange: i32 = 2; diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index a9fc3c433..c7027e3f1 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -5,6 +5,12 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +static NSUndoCloseGroupingRunLoopOrdering: NSUInteger = 350000; + +extern "C" { + static NSUndoManagerGroupIsDiscardableKey: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSUndoManager; @@ -134,3 +140,35 @@ extern_methods!( ) -> Id; } ); + +extern "C" { + static NSUndoManagerCheckpointNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUndoManagerWillUndoChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUndoManagerWillRedoChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUndoManagerDidUndoChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUndoManagerDidRedoChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUndoManagerDidOpenUndoGroupNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUndoManagerWillCloseUndoGroupNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUndoManagerDidCloseUndoGroupNotification: &'static NSNotificationName; +} diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index d980fd696..e3939956d 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -160,4 +160,8 @@ extern_methods!( } ); +extern "C" { + static NSUserActivityTypeBrowsingWeb: &'static NSString; +} + pub type NSUserActivityDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index f08a88f38..1f7b0e511 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -5,6 +5,18 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; +extern "C" { + static NSGlobalDomain: &'static NSString; +} + +extern "C" { + static NSArgumentDomain: &'static NSString; +} + +extern "C" { + static NSRegistrationDomain: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSUserDefaults; @@ -162,3 +174,127 @@ extern_methods!( ) -> bool; } ); + +extern "C" { + static NSUserDefaultsSizeLimitExceededNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUbiquitousUserDefaultsNoCloudAccountNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUbiquitousUserDefaultsDidChangeAccountsNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUbiquitousUserDefaultsCompletedInitialSyncNotification: &'static NSNotificationName; +} + +extern "C" { + static NSUserDefaultsDidChangeNotification: &'static NSNotificationName; +} + +extern "C" { + static NSWeekDayNameArray: &'static NSString; +} + +extern "C" { + static NSShortWeekDayNameArray: &'static NSString; +} + +extern "C" { + static NSMonthNameArray: &'static NSString; +} + +extern "C" { + static NSShortMonthNameArray: &'static NSString; +} + +extern "C" { + static NSTimeFormatString: &'static NSString; +} + +extern "C" { + static NSDateFormatString: &'static NSString; +} + +extern "C" { + static NSTimeDateFormatString: &'static NSString; +} + +extern "C" { + static NSShortTimeDateFormatString: &'static NSString; +} + +extern "C" { + static NSCurrencySymbol: &'static NSString; +} + +extern "C" { + static NSDecimalSeparator: &'static NSString; +} + +extern "C" { + static NSThousandsSeparator: &'static NSString; +} + +extern "C" { + static NSDecimalDigits: &'static NSString; +} + +extern "C" { + static NSAMPMDesignation: &'static NSString; +} + +extern "C" { + static NSHourNameDesignations: &'static NSString; +} + +extern "C" { + static NSYearMonthWeekDesignations: &'static NSString; +} + +extern "C" { + static NSEarlierTimeDesignations: &'static NSString; +} + +extern "C" { + static NSLaterTimeDesignations: &'static NSString; +} + +extern "C" { + static NSThisDayDesignations: &'static NSString; +} + +extern "C" { + static NSNextDayDesignations: &'static NSString; +} + +extern "C" { + static NSNextNextDayDesignations: &'static NSString; +} + +extern "C" { + static NSPriorDayDesignations: &'static NSString; +} + +extern "C" { + static NSDateTimeOrdering: &'static NSString; +} + +extern "C" { + static NSInternationalCurrencyString: &'static NSString; +} + +extern "C" { + static NSShortDateFormatString: &'static NSString; +} + +extern "C" { + static NSPositiveCurrencyFormatString: &'static NSString; +} + +extern "C" { + static NSNegativeCurrencyFormatString: &'static NSString; +} diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 8539f4ed9..579caba27 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -178,6 +178,10 @@ extern_methods!( } ); +extern "C" { + static NSUserNotificationDefaultSoundName: &'static NSString; +} + extern_class!( #[derive(Debug)] pub struct NSUserNotificationCenter; diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index f29c70080..cb186d03d 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -7,6 +7,30 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSValueTransformerName = NSString; +extern "C" { + static NSNegateBooleanTransformerName: &'static NSValueTransformerName; +} + +extern "C" { + static NSIsNilTransformerName: &'static NSValueTransformerName; +} + +extern "C" { + static NSIsNotNilTransformerName: &'static NSValueTransformerName; +} + +extern "C" { + static NSUnarchiveFromDataTransformerName: &'static NSValueTransformerName; +} + +extern "C" { + static NSKeyedUnarchiveFromDataTransformerName: &'static NSValueTransformerName; +} + +extern "C" { + static NSSecureUnarchiveFromDataTransformerName: &'static NSValueTransformerName; +} + extern_class!( #[derive(Debug)] pub struct NSValueTransformer; diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 459988f52..55a9af3b2 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -106,6 +106,10 @@ extern_methods!( pub type NSXMLParserDelegate = NSObject; +extern "C" { + static NSXMLParserErrorDomain: &'static NSErrorDomain; +} + pub type NSXMLParserError = NSInteger; pub const NSXMLParserInternalError: NSXMLParserError = 1; pub const NSXMLParserOutOfMemoryError: NSXMLParserError = 2; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 451864725..104ebc429 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -209,15 +209,22 @@ mod __exported { NSAppleEventSendNeverInteract, NSAppleEventSendNoReply, NSAppleEventSendOptions, NSAppleEventSendQueueReply, NSAppleEventSendWaitForReply, }; - pub use super::NSAppleEventManager::NSAppleEventManager; - pub use super::NSAppleScript::NSAppleScript; + pub use super::NSAppleEventManager::{ + NSAppleEventManager, NSAppleEventManagerWillProcessFirstEventNotification, + NSAppleEventTimeOutDefault, NSAppleEventTimeOutNone, + }; + pub use super::NSAppleScript::{ + NSAppleScript, NSAppleScriptErrorAppName, NSAppleScriptErrorBriefMessage, + NSAppleScriptErrorMessage, NSAppleScriptErrorNumber, NSAppleScriptErrorRange, + }; pub use super::NSArchiver::{NSArchiver, NSUnarchiver}; pub use super::NSArray::{ NSArray, NSBinarySearchingFirstEqual, NSBinarySearchingInsertionIndex, NSBinarySearchingLastEqual, NSBinarySearchingOptions, NSMutableArray, }; pub use super::NSAttributedString::{ - NSAttributedString, NSAttributedStringEnumerationLongestEffectiveRangeNotRequired, + NSAlternateDescriptionAttributeName, NSAttributedString, + NSAttributedStringEnumerationLongestEffectiveRangeNotRequired, NSAttributedStringEnumerationOptions, NSAttributedStringEnumerationReverse, NSAttributedStringFormattingApplyReplacementIndexAttribute, NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging, @@ -229,12 +236,15 @@ mod __exported { NSAttributedStringMarkdownParsingFailurePolicy, NSAttributedStringMarkdownParsingFailureReturnError, NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible, - NSAttributedStringMarkdownParsingOptions, NSInlinePresentationIntent, + NSAttributedStringMarkdownParsingOptions, NSImageURLAttributeName, + NSInflectionAlternativeAttributeName, NSInflectionRuleAttributeName, + NSInlinePresentationIntent, NSInlinePresentationIntentAttributeName, NSInlinePresentationIntentBlockHTML, NSInlinePresentationIntentCode, NSInlinePresentationIntentEmphasized, NSInlinePresentationIntentInlineHTML, NSInlinePresentationIntentLineBreak, NSInlinePresentationIntentSoftBreak, NSInlinePresentationIntentStrikethrough, NSInlinePresentationIntentStronglyEmphasized, - NSMutableAttributedString, NSPresentationIntent, NSPresentationIntentKind, + NSLanguageIdentifierAttributeName, NSMorphologyAttributeName, NSMutableAttributedString, + NSPresentationIntent, NSPresentationIntentAttributeName, NSPresentationIntentKind, NSPresentationIntentKindBlockQuote, NSPresentationIntentKindCodeBlock, NSPresentationIntentKindHeader, NSPresentationIntentKindListItem, NSPresentationIntentKindOrderedList, NSPresentationIntentKindParagraph, @@ -243,7 +253,7 @@ mod __exported { NSPresentationIntentKindThematicBreak, NSPresentationIntentKindUnorderedList, NSPresentationIntentTableColumnAlignment, NSPresentationIntentTableColumnAlignmentCenter, NSPresentationIntentTableColumnAlignmentLeft, - NSPresentationIntentTableColumnAlignmentRight, + NSPresentationIntentTableColumnAlignmentRight, NSReplacementIndexAttributeName, }; pub use super::NSAutoreleasePool::NSAutoreleasePool; pub use super::NSBackgroundActivityScheduler::{ @@ -251,9 +261,11 @@ mod __exported { NSBackgroundActivityResultFinished, NSBackgroundActivityScheduler, }; pub use super::NSBundle::{ - NSBundle, NSBundleExecutableArchitectureARM64, NSBundleExecutableArchitectureI386, - NSBundleExecutableArchitecturePPC, NSBundleExecutableArchitecturePPC64, - NSBundleExecutableArchitectureX86_64, NSBundleResourceRequest, + NSBundle, NSBundleDidLoadNotification, NSBundleExecutableArchitectureARM64, + NSBundleExecutableArchitectureI386, NSBundleExecutableArchitecturePPC, + NSBundleExecutableArchitecturePPC64, NSBundleExecutableArchitectureX86_64, + NSBundleResourceRequest, NSBundleResourceRequestLoadingPriorityUrgent, + NSBundleResourceRequestLowDiskSpaceNotification, NSLoadedClasses, }; pub use super::NSByteCountFormatter::{ NSByteCountFormatter, NSByteCountFormatterCountStyle, NSByteCountFormatterCountStyleBinary, @@ -267,9 +279,15 @@ mod __exported { pub use super::NSByteOrder::{NS_BigEndian, NS_LittleEndian, NS_UnknownByteOrder}; pub use super::NSCache::{NSCache, NSCacheDelegate}; pub use super::NSCalendar::{ - NSCalendar, NSCalendarCalendarUnit, NSCalendarIdentifier, NSCalendarMatchFirst, - NSCalendarMatchLast, NSCalendarMatchNextTime, - NSCalendarMatchNextTimePreservingSmallerUnits, + NSCalendar, NSCalendarCalendarUnit, NSCalendarDayChangedNotification, NSCalendarIdentifier, + NSCalendarIdentifierBuddhist, NSCalendarIdentifierChinese, NSCalendarIdentifierCoptic, + NSCalendarIdentifierEthiopicAmeteAlem, NSCalendarIdentifierEthiopicAmeteMihret, + NSCalendarIdentifierGregorian, NSCalendarIdentifierHebrew, NSCalendarIdentifierISO8601, + NSCalendarIdentifierIndian, NSCalendarIdentifierIslamic, NSCalendarIdentifierIslamicCivil, + NSCalendarIdentifierIslamicTabular, NSCalendarIdentifierIslamicUmmAlQura, + NSCalendarIdentifierJapanese, NSCalendarIdentifierPersian, + NSCalendarIdentifierRepublicOfChina, NSCalendarMatchFirst, NSCalendarMatchLast, + NSCalendarMatchNextTime, NSCalendarMatchNextTimePreservingSmallerUnits, NSCalendarMatchPreviousTimePreservingSmallerUnits, NSCalendarMatchStrictly, NSCalendarOptions, NSCalendarSearchBackwards, NSCalendarUnit, NSCalendarUnitCalendar, NSCalendarUnitDay, NSCalendarUnitEra, NSCalendarUnitHour, NSCalendarUnitMinute, @@ -288,7 +306,9 @@ mod __exported { pub use super::NSCharacterSet::{ NSCharacterSet, NSMutableCharacterSet, NSOpenStepUnicodeReservedBase, }; - pub use super::NSClassDescription::NSClassDescription; + pub use super::NSClassDescription::{ + NSClassDescription, NSClassDescriptionNeededForClassNotification, + }; pub use super::NSCoder::{ NSCoder, NSDecodingFailurePolicy, NSDecodingFailurePolicyRaiseException, NSDecodingFailurePolicySetErrorAndReturn, @@ -310,7 +330,11 @@ mod __exported { NSAndPredicateType, NSCompoundPredicate, NSCompoundPredicateType, NSNotPredicateType, NSOrPredicateType, }; - pub use super::NSConnection::{NSConnection, NSConnectionDelegate, NSDistantObjectRequest}; + pub use super::NSConnection::{ + NSConnection, NSConnectionDelegate, NSConnectionDidDieNotification, + NSConnectionDidInitializeNotification, NSConnectionReplyMode, NSDistantObjectRequest, + NSFailedAuthenticationException, + }; pub use super::NSData::{ NSAtomicWrite, NSData, NSDataBase64DecodingIgnoreUnknownCharacters, NSDataBase64DecodingOptions, NSDataBase64Encoding64CharacterLineLength, @@ -327,7 +351,7 @@ mod __exported { NSDataWritingWithoutOverwriting, NSMappedRead, NSMutableData, NSPurgeableData, NSUncachedRead, }; - pub use super::NSDate::NSDate; + pub use super::NSDate::{NSDate, NSSystemClockDidChangeNotification}; pub use super::NSDateComponentsFormatter::{ NSDateComponentsFormatter, NSDateComponentsFormatterUnitsStyle, NSDateComponentsFormatterUnitsStyleAbbreviated, NSDateComponentsFormatterUnitsStyleBrief, @@ -361,7 +385,9 @@ mod __exported { NSRoundDown, NSRoundPlain, NSRoundUp, NSRoundingMode, }; pub use super::NSDecimalNumber::{ - NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberHandler, + NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberDivideByZeroException, + NSDecimalNumberExactnessException, NSDecimalNumberHandler, + NSDecimalNumberOverflowException, NSDecimalNumberUnderflowException, }; pub use super::NSDictionary::{NSDictionary, NSMutableDictionary}; pub use super::NSDistantObject::NSDistantObject; @@ -369,8 +395,9 @@ mod __exported { pub use super::NSDistributedNotificationCenter::{ NSDistributedNotificationCenter, NSDistributedNotificationCenterType, NSDistributedNotificationDeliverImmediately, NSDistributedNotificationOptions, - NSDistributedNotificationPostToAllSessions, NSNotificationSuspensionBehavior, - NSNotificationSuspensionBehaviorCoalesce, + NSDistributedNotificationPostToAllSessions, NSLocalNotificationCenterType, + NSNotificationDeliverImmediately, NSNotificationPostToAllSessions, + NSNotificationSuspensionBehavior, NSNotificationSuspensionBehaviorCoalesce, NSNotificationSuspensionBehaviorDeliverImmediately, NSNotificationSuspensionBehaviorDrop, NSNotificationSuspensionBehaviorHold, }; @@ -380,8 +407,23 @@ mod __exported { NSEnergyFormatterUnitKilojoule, }; pub use super::NSEnumerator::{NSEnumerator, NSFastEnumeration}; - pub use super::NSError::{NSError, NSErrorDomain, NSErrorUserInfoKey}; - pub use super::NSException::{NSAssertionHandler, NSException}; + pub use super::NSError::{ + NSCocoaErrorDomain, NSDebugDescriptionErrorKey, NSError, NSErrorDomain, NSErrorUserInfoKey, + NSFilePathErrorKey, NSHelpAnchorErrorKey, NSLocalizedDescriptionKey, + NSLocalizedFailureErrorKey, NSLocalizedFailureReasonErrorKey, + NSLocalizedRecoveryOptionsErrorKey, NSLocalizedRecoverySuggestionErrorKey, + NSMachErrorDomain, NSMultipleUnderlyingErrorsKey, NSOSStatusErrorDomain, + NSPOSIXErrorDomain, NSRecoveryAttempterErrorKey, NSStringEncodingErrorKey, NSURLErrorKey, + NSUnderlyingErrorKey, + }; + pub use super::NSException::{ + NSAssertionHandler, NSAssertionHandlerKey, NSDestinationInvalidException, NSException, + NSGenericException, NSInconsistentArchiveException, NSInternalInconsistencyException, + NSInvalidArgumentException, NSInvalidReceivePortException, NSInvalidSendPortException, + NSMallocException, NSObjectInaccessibleException, NSObjectNotAvailableException, + NSOldStyleException, NSPortReceiveException, NSPortSendException, NSPortTimeoutException, + NSRangeException, + }; pub use super::NSExpression::{ NSAggregateExpressionType, NSAnyKeyExpressionType, NSBlockExpressionType, NSConditionalExpressionType, NSConstantValueExpressionType, @@ -389,8 +431,16 @@ mod __exported { NSIntersectSetExpressionType, NSKeyPathExpressionType, NSMinusSetExpressionType, NSSubqueryExpressionType, NSUnionSetExpressionType, NSVariableExpressionType, }; - pub use super::NSExtensionContext::NSExtensionContext; - pub use super::NSExtensionItem::NSExtensionItem; + pub use super::NSExtensionContext::{ + NSExtensionContext, NSExtensionHostDidBecomeActiveNotification, + NSExtensionHostDidEnterBackgroundNotification, + NSExtensionHostWillEnterForegroundNotification, + NSExtensionHostWillResignActiveNotification, NSExtensionItemsAndErrorsKey, + }; + pub use super::NSExtensionItem::{ + NSExtensionItem, NSExtensionItemAttachmentsKey, NSExtensionItemAttributedContentTextKey, + NSExtensionItemAttributedTitleKey, + }; pub use super::NSExtensionRequestHandling::NSExtensionRequestHandling; pub use super::NSFileCoordinator::{ NSFileAccessIntent, NSFileCoordinator, NSFileCoordinatorReadingForUploading, @@ -401,19 +451,36 @@ mod __exported { NSFileCoordinatorWritingForMoving, NSFileCoordinatorWritingForReplacing, NSFileCoordinatorWritingOptions, }; - pub use super::NSFileHandle::{NSFileHandle, NSPipe}; + pub use super::NSFileHandle::{ + NSFileHandle, NSFileHandleConnectionAcceptedNotification, + NSFileHandleDataAvailableNotification, NSFileHandleNotificationDataItem, + NSFileHandleNotificationFileHandleItem, NSFileHandleNotificationMonitorModes, + NSFileHandleOperationException, NSFileHandleReadCompletionNotification, + NSFileHandleReadToEndOfFileCompletionNotification, NSPipe, + }; pub use super::NSFileManager::{ NSDirectoryEnumerationIncludesDirectoriesPostOrder, NSDirectoryEnumerationOptions, NSDirectoryEnumerationProducesRelativePathURLs, NSDirectoryEnumerationSkipsHiddenFiles, NSDirectoryEnumerationSkipsPackageDescendants, NSDirectoryEnumerationSkipsSubdirectoryDescendants, NSDirectoryEnumerator, - NSFileAttributeKey, NSFileAttributeType, NSFileManager, NSFileManagerDelegate, - NSFileManagerItemReplacementOptions, NSFileManagerItemReplacementUsingNewMetadataOnly, + NSFileAppendOnly, NSFileAttributeKey, NSFileAttributeType, NSFileBusy, NSFileCreationDate, + NSFileDeviceIdentifier, NSFileExtensionHidden, NSFileGroupOwnerAccountID, + NSFileGroupOwnerAccountName, NSFileHFSCreatorCode, NSFileHFSTypeCode, NSFileImmutable, + NSFileManager, NSFileManagerDelegate, NSFileManagerItemReplacementOptions, + NSFileManagerItemReplacementUsingNewMetadataOnly, NSFileManagerItemReplacementWithoutDeletingBackupItem, - NSFileManagerUnmountAllPartitionsAndEjectDisk, NSFileManagerUnmountOptions, - NSFileManagerUnmountWithoutUI, NSFileProtectionType, NSFileProviderService, - NSFileProviderServiceName, NSURLRelationship, NSURLRelationshipContains, - NSURLRelationshipOther, NSURLRelationshipSame, NSVolumeEnumerationOptions, + NSFileManagerUnmountAllPartitionsAndEjectDisk, + NSFileManagerUnmountDissentingProcessIdentifierErrorKey, NSFileManagerUnmountOptions, + NSFileManagerUnmountWithoutUI, NSFileModificationDate, NSFileOwnerAccountID, + NSFileOwnerAccountName, NSFilePosixPermissions, NSFileProtectionComplete, + NSFileProtectionCompleteUnlessOpen, NSFileProtectionCompleteUntilFirstUserAuthentication, + NSFileProtectionKey, NSFileProtectionNone, NSFileProtectionType, NSFileProviderService, + NSFileProviderServiceName, NSFileReferenceCount, NSFileSize, NSFileSystemFileNumber, + NSFileSystemFreeNodes, NSFileSystemFreeSize, NSFileSystemNodes, NSFileSystemNumber, + NSFileSystemSize, NSFileType, NSFileTypeBlockSpecial, NSFileTypeCharacterSpecial, + NSFileTypeDirectory, NSFileTypeRegular, NSFileTypeSocket, NSFileTypeSymbolicLink, + NSFileTypeUnknown, NSURLRelationship, NSURLRelationshipContains, NSURLRelationshipOther, + NSURLRelationshipSame, NSUbiquityIdentityDidChangeNotification, NSVolumeEnumerationOptions, NSVolumeEnumerationProduceFileReferenceURLs, NSVolumeEnumerationSkipHiddenVolumes, }; pub use super::NSFilePresenter::NSFilePresenter; @@ -440,18 +507,32 @@ mod __exported { NSAlignMaxXOutward, NSAlignMaxYInward, NSAlignMaxYNearest, NSAlignMaxYOutward, NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, - NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSMaxXEdge, NSMaxYEdge, - NSMinXEdge, NSMinYEdge, NSPoint, NSRect, NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, - NSRectEdgeMinX, NSRectEdgeMinY, NSSize, + NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsetsZero, NSMaxXEdge, + NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSRect, NSRectEdge, NSRectEdgeMaxX, + NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, NSSize, NSZeroPoint, NSZeroRect, + NSZeroSize, }; pub use super::NSHTTPCookie::{ - NSHTTPCookie, NSHTTPCookiePropertyKey, NSHTTPCookieStringPolicy, + NSHTTPCookie, NSHTTPCookieComment, NSHTTPCookieCommentURL, NSHTTPCookieDiscard, + NSHTTPCookieDomain, NSHTTPCookieExpires, NSHTTPCookieMaximumAge, NSHTTPCookieName, + NSHTTPCookieOriginURL, NSHTTPCookiePath, NSHTTPCookiePort, NSHTTPCookiePropertyKey, + NSHTTPCookieSameSiteLax, NSHTTPCookieSameSitePolicy, NSHTTPCookieSameSiteStrict, + NSHTTPCookieSecure, NSHTTPCookieStringPolicy, NSHTTPCookieValue, NSHTTPCookieVersion, }; pub use super::NSHTTPCookieStorage::{ NSHTTPCookieAcceptPolicy, NSHTTPCookieAcceptPolicyAlways, NSHTTPCookieAcceptPolicyNever, - NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, NSHTTPCookieStorage, + NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, + NSHTTPCookieManagerAcceptPolicyChangedNotification, + NSHTTPCookieManagerCookiesChangedNotification, NSHTTPCookieStorage, + }; + pub use super::NSHashTable::{ + NSHashTable, NSHashTableCopyIn, NSHashTableObjectPointerPersonality, NSHashTableOptions, + NSHashTableStrongMemory, NSHashTableWeakMemory, NSHashTableZeroingWeakMemory, + NSIntHashCallBacks, NSIntegerHashCallBacks, NSNonOwnedPointerHashCallBacks, + NSNonRetainedObjectHashCallBacks, NSObjectHashCallBacks, + NSOwnedObjectIdentityHashCallBacks, NSOwnedPointerHashCallBacks, + NSPointerToStructHashCallBacks, }; - pub use super::NSHashTable::{NSHashTable, NSHashTableOptions}; pub use super::NSHost::NSHost; pub use super::NSISO8601DateFormatter::{ NSISO8601DateFormatOptions, NSISO8601DateFormatWithColonSeparatorInTime, @@ -468,10 +549,12 @@ mod __exported { pub use super::NSInflectionRule::{NSInflectionRule, NSInflectionRuleExplicit}; pub use super::NSInvocation::NSInvocation; pub use super::NSItemProvider::{ - NSItemProvider, NSItemProviderErrorCode, NSItemProviderFileOptionOpenInPlace, - NSItemProviderFileOptions, NSItemProviderItemUnavailableError, NSItemProviderReading, - NSItemProviderRepresentationVisibility, NSItemProviderRepresentationVisibilityAll, - NSItemProviderRepresentationVisibilityGroup, + NSExtensionJavaScriptFinalizeArgumentKey, NSExtensionJavaScriptPreprocessingResultsKey, + NSItemProvider, NSItemProviderErrorCode, NSItemProviderErrorDomain, + NSItemProviderFileOptionOpenInPlace, NSItemProviderFileOptions, + NSItemProviderItemUnavailableError, NSItemProviderPreferredImageSizeKey, + NSItemProviderReading, NSItemProviderRepresentationVisibility, + NSItemProviderRepresentationVisibilityAll, NSItemProviderRepresentationVisibilityGroup, NSItemProviderRepresentationVisibilityOwnProcess, NSItemProviderRepresentationVisibilityTeam, NSItemProviderUnavailableCoercionError, NSItemProviderUnexpectedValueClassError, NSItemProviderUnknownError, NSItemProviderWriting, @@ -483,16 +566,27 @@ mod __exported { NSJSONWritingOptions, NSJSONWritingPrettyPrinted, NSJSONWritingSortedKeys, NSJSONWritingWithoutEscapingSlashes, }; - pub use super::NSKeyValueCoding::NSKeyValueOperator; + pub use super::NSKeyValueCoding::{ + NSAverageKeyValueOperator, NSCountKeyValueOperator, + NSDistinctUnionOfArraysKeyValueOperator, NSDistinctUnionOfObjectsKeyValueOperator, + NSDistinctUnionOfSetsKeyValueOperator, NSKeyValueOperator, NSMaximumKeyValueOperator, + NSMinimumKeyValueOperator, NSSumKeyValueOperator, NSUndefinedKeyException, + NSUnionOfArraysKeyValueOperator, NSUnionOfObjectsKeyValueOperator, + NSUnionOfSetsKeyValueOperator, + }; pub use super::NSKeyValueObserving::{ - NSKeyValueChange, NSKeyValueChangeInsertion, NSKeyValueChangeKey, NSKeyValueChangeRemoval, + NSKeyValueChange, NSKeyValueChangeIndexesKey, NSKeyValueChangeInsertion, + NSKeyValueChangeKey, NSKeyValueChangeKindKey, NSKeyValueChangeNewKey, + NSKeyValueChangeNotificationIsPriorKey, NSKeyValueChangeOldKey, NSKeyValueChangeRemoval, NSKeyValueChangeReplacement, NSKeyValueChangeSetting, NSKeyValueIntersectSetMutation, NSKeyValueMinusSetMutation, NSKeyValueObservingOptionInitial, NSKeyValueObservingOptionNew, NSKeyValueObservingOptionOld, NSKeyValueObservingOptionPrior, NSKeyValueObservingOptions, NSKeyValueSetMutationKind, NSKeyValueSetSetMutation, NSKeyValueUnionSetMutation, }; pub use super::NSKeyedArchiver::{ - NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, NSKeyedUnarchiverDelegate, + NSInvalidArchiveOperationException, NSInvalidUnarchiveOperationException, + NSKeyedArchiveRootObjectKey, NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, + NSKeyedUnarchiverDelegate, }; pub use super::NSLengthFormatter::{ NSLengthFormatter, NSLengthFormatterUnit, NSLengthFormatterUnitCentimeter, @@ -501,20 +595,54 @@ mod __exported { NSLengthFormatterUnitYard, }; pub use super::NSLinguisticTagger::{ - NSLinguisticTag, NSLinguisticTagScheme, NSLinguisticTagger, NSLinguisticTaggerJoinNames, - NSLinguisticTaggerOmitOther, NSLinguisticTaggerOmitPunctuation, - NSLinguisticTaggerOmitWhitespace, NSLinguisticTaggerOmitWords, NSLinguisticTaggerOptions, - NSLinguisticTaggerUnit, NSLinguisticTaggerUnitDocument, NSLinguisticTaggerUnitParagraph, + NSLinguisticTag, NSLinguisticTagAdjective, NSLinguisticTagAdverb, + NSLinguisticTagClassifier, NSLinguisticTagCloseParenthesis, NSLinguisticTagCloseQuote, + NSLinguisticTagConjunction, NSLinguisticTagDash, NSLinguisticTagDeterminer, + NSLinguisticTagIdiom, NSLinguisticTagInterjection, NSLinguisticTagNoun, + NSLinguisticTagNumber, NSLinguisticTagOpenParenthesis, NSLinguisticTagOpenQuote, + NSLinguisticTagOrganizationName, NSLinguisticTagOther, NSLinguisticTagOtherPunctuation, + NSLinguisticTagOtherWhitespace, NSLinguisticTagOtherWord, NSLinguisticTagParagraphBreak, + NSLinguisticTagParticle, NSLinguisticTagPersonalName, NSLinguisticTagPlaceName, + NSLinguisticTagPreposition, NSLinguisticTagPronoun, NSLinguisticTagPunctuation, + NSLinguisticTagScheme, NSLinguisticTagSchemeLanguage, NSLinguisticTagSchemeLemma, + NSLinguisticTagSchemeLexicalClass, NSLinguisticTagSchemeNameType, + NSLinguisticTagSchemeNameTypeOrLexicalClass, NSLinguisticTagSchemeScript, + NSLinguisticTagSchemeTokenType, NSLinguisticTagSentenceTerminator, NSLinguisticTagVerb, + NSLinguisticTagWhitespace, NSLinguisticTagWord, NSLinguisticTagWordJoiner, + NSLinguisticTagger, NSLinguisticTaggerJoinNames, NSLinguisticTaggerOmitOther, + NSLinguisticTaggerOmitPunctuation, NSLinguisticTaggerOmitWhitespace, + NSLinguisticTaggerOmitWords, NSLinguisticTaggerOptions, NSLinguisticTaggerUnit, + NSLinguisticTaggerUnitDocument, NSLinguisticTaggerUnitParagraph, NSLinguisticTaggerUnitSentence, NSLinguisticTaggerUnitWord, }; pub use super::NSListFormatter::NSListFormatter; pub use super::NSLocale::{ - NSLocale, NSLocaleKey, NSLocaleLanguageDirection, NSLocaleLanguageDirectionBottomToTop, - NSLocaleLanguageDirectionLeftToRight, NSLocaleLanguageDirectionRightToLeft, - NSLocaleLanguageDirectionTopToBottom, NSLocaleLanguageDirectionUnknown, + NSBuddhistCalendar, NSChineseCalendar, NSCurrentLocaleDidChangeNotification, + NSGregorianCalendar, NSHebrewCalendar, NSISO8601Calendar, NSIndianCalendar, + NSIslamicCalendar, NSIslamicCivilCalendar, NSJapaneseCalendar, NSLocale, + NSLocaleAlternateQuotationBeginDelimiterKey, NSLocaleAlternateQuotationEndDelimiterKey, + NSLocaleCalendar, NSLocaleCollationIdentifier, NSLocaleCollatorIdentifier, + NSLocaleCountryCode, NSLocaleCurrencyCode, NSLocaleCurrencySymbol, + NSLocaleDecimalSeparator, NSLocaleExemplarCharacterSet, NSLocaleGroupingSeparator, + NSLocaleIdentifier, NSLocaleKey, NSLocaleLanguageCode, NSLocaleLanguageDirection, + NSLocaleLanguageDirectionBottomToTop, NSLocaleLanguageDirectionLeftToRight, + NSLocaleLanguageDirectionRightToLeft, NSLocaleLanguageDirectionTopToBottom, + NSLocaleLanguageDirectionUnknown, NSLocaleMeasurementSystem, + NSLocaleQuotationBeginDelimiterKey, NSLocaleQuotationEndDelimiterKey, NSLocaleScriptCode, + NSLocaleUsesMetricSystem, NSLocaleVariantCode, NSPersianCalendar, + NSRepublicOfChinaCalendar, }; pub use super::NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; - pub use super::NSMapTable::{NSMapTable, NSMapTableOptions}; + pub use super::NSMapTable::{ + NSIntMapKeyCallBacks, NSIntMapValueCallBacks, NSIntegerMapKeyCallBacks, + NSIntegerMapValueCallBacks, NSMapTable, NSMapTableCopyIn, + NSMapTableObjectPointerPersonality, NSMapTableOptions, NSMapTableStrongMemory, + NSMapTableWeakMemory, NSMapTableZeroingWeakMemory, NSNonOwnedPointerMapKeyCallBacks, + NSNonOwnedPointerMapValueCallBacks, NSNonOwnedPointerOrNullMapKeyCallBacks, + NSNonRetainedObjectMapKeyCallBacks, NSNonRetainedObjectMapValueCallBacks, + NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, NSOwnedPointerMapKeyCallBacks, + NSOwnedPointerMapValueCallBacks, + }; pub use super::NSMassFormatter::{ NSMassFormatter, NSMassFormatterUnit, NSMassFormatterUnitGram, NSMassFormatterUnitKilogram, NSMassFormatterUnitOunce, NSMassFormatterUnitPound, NSMassFormatterUnitStone, @@ -527,8 +655,102 @@ mod __exported { NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit, }; pub use super::NSMetadata::{ - NSMetadataItem, NSMetadataQuery, NSMetadataQueryAttributeValueTuple, - NSMetadataQueryDelegate, NSMetadataQueryResultGroup, + NSMetadataItem, NSMetadataQuery, NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope, + NSMetadataQueryAttributeValueTuple, NSMetadataQueryDelegate, + NSMetadataQueryDidFinishGatheringNotification, + NSMetadataQueryDidStartGatheringNotification, NSMetadataQueryDidUpdateNotification, + NSMetadataQueryGatheringProgressNotification, NSMetadataQueryIndexedLocalComputerScope, + NSMetadataQueryIndexedNetworkScope, NSMetadataQueryLocalComputerScope, + NSMetadataQueryNetworkScope, NSMetadataQueryResultContentRelevanceAttribute, + NSMetadataQueryResultGroup, NSMetadataQueryUbiquitousDataScope, + NSMetadataQueryUbiquitousDocumentsScope, NSMetadataQueryUpdateAddedItemsKey, + NSMetadataQueryUpdateChangedItemsKey, NSMetadataQueryUpdateRemovedItemsKey, + NSMetadataQueryUserHomeScope, + }; + pub use super::NSMetadataAttributes::{ + NSMetadataItemAcquisitionMakeKey, NSMetadataItemAcquisitionModelKey, + NSMetadataItemAlbumKey, NSMetadataItemAltitudeKey, NSMetadataItemApertureKey, + NSMetadataItemAppleLoopDescriptorsKey, NSMetadataItemAppleLoopsKeyFilterTypeKey, + NSMetadataItemAppleLoopsLoopModeKey, NSMetadataItemAppleLoopsRootKeyKey, + NSMetadataItemApplicationCategoriesKey, NSMetadataItemAttributeChangeDateKey, + NSMetadataItemAudiencesKey, NSMetadataItemAudioBitRateKey, + NSMetadataItemAudioChannelCountKey, NSMetadataItemAudioEncodingApplicationKey, + NSMetadataItemAudioSampleRateKey, NSMetadataItemAudioTrackNumberKey, + NSMetadataItemAuthorAddressesKey, NSMetadataItemAuthorEmailAddressesKey, + NSMetadataItemAuthorsKey, NSMetadataItemBitsPerSampleKey, + NSMetadataItemCFBundleIdentifierKey, NSMetadataItemCameraOwnerKey, NSMetadataItemCityKey, + NSMetadataItemCodecsKey, NSMetadataItemColorSpaceKey, NSMetadataItemCommentKey, + NSMetadataItemComposerKey, NSMetadataItemContactKeywordsKey, + NSMetadataItemContentCreationDateKey, NSMetadataItemContentModificationDateKey, + NSMetadataItemContentTypeKey, NSMetadataItemContentTypeTreeKey, + NSMetadataItemContributorsKey, NSMetadataItemCopyrightKey, NSMetadataItemCountryKey, + NSMetadataItemCoverageKey, NSMetadataItemCreatorKey, NSMetadataItemDateAddedKey, + NSMetadataItemDeliveryTypeKey, NSMetadataItemDescriptionKey, NSMetadataItemDirectorKey, + NSMetadataItemDisplayNameKey, NSMetadataItemDownloadedDateKey, NSMetadataItemDueDateKey, + NSMetadataItemDurationSecondsKey, NSMetadataItemEXIFGPSVersionKey, + NSMetadataItemEXIFVersionKey, NSMetadataItemEditorsKey, NSMetadataItemEmailAddressesKey, + NSMetadataItemEncodingApplicationsKey, NSMetadataItemExecutableArchitecturesKey, + NSMetadataItemExecutablePlatformKey, NSMetadataItemExposureModeKey, + NSMetadataItemExposureProgramKey, NSMetadataItemExposureTimeSecondsKey, + NSMetadataItemExposureTimeStringKey, NSMetadataItemFNumberKey, + NSMetadataItemFSContentChangeDateKey, NSMetadataItemFSCreationDateKey, + NSMetadataItemFSNameKey, NSMetadataItemFSSizeKey, NSMetadataItemFinderCommentKey, + NSMetadataItemFlashOnOffKey, NSMetadataItemFocalLength35mmKey, + NSMetadataItemFocalLengthKey, NSMetadataItemFontsKey, NSMetadataItemGPSAreaInformationKey, + NSMetadataItemGPSDOPKey, NSMetadataItemGPSDateStampKey, NSMetadataItemGPSDestBearingKey, + NSMetadataItemGPSDestDistanceKey, NSMetadataItemGPSDestLatitudeKey, + NSMetadataItemGPSDestLongitudeKey, NSMetadataItemGPSDifferentalKey, + NSMetadataItemGPSMapDatumKey, NSMetadataItemGPSMeasureModeKey, + NSMetadataItemGPSProcessingMethodKey, NSMetadataItemGPSStatusKey, + NSMetadataItemGPSTrackKey, NSMetadataItemGenreKey, NSMetadataItemHasAlphaChannelKey, + NSMetadataItemHeadlineKey, NSMetadataItemISOSpeedKey, NSMetadataItemIdentifierKey, + NSMetadataItemImageDirectionKey, NSMetadataItemInformationKey, + NSMetadataItemInstantMessageAddressesKey, NSMetadataItemInstructionsKey, + NSMetadataItemIsApplicationManagedKey, NSMetadataItemIsGeneralMIDISequenceKey, + NSMetadataItemIsLikelyJunkKey, NSMetadataItemIsUbiquitousKey, + NSMetadataItemKeySignatureKey, NSMetadataItemKeywordsKey, NSMetadataItemKindKey, + NSMetadataItemLanguagesKey, NSMetadataItemLastUsedDateKey, NSMetadataItemLatitudeKey, + NSMetadataItemLayerNamesKey, NSMetadataItemLensModelKey, NSMetadataItemLongitudeKey, + NSMetadataItemLyricistKey, NSMetadataItemMaxApertureKey, NSMetadataItemMediaTypesKey, + NSMetadataItemMeteringModeKey, NSMetadataItemMusicalGenreKey, + NSMetadataItemMusicalInstrumentCategoryKey, NSMetadataItemMusicalInstrumentNameKey, + NSMetadataItemNamedLocationKey, NSMetadataItemNumberOfPagesKey, + NSMetadataItemOrganizationsKey, NSMetadataItemOrientationKey, + NSMetadataItemOriginalFormatKey, NSMetadataItemOriginalSourceKey, + NSMetadataItemPageHeightKey, NSMetadataItemPageWidthKey, NSMetadataItemParticipantsKey, + NSMetadataItemPathKey, NSMetadataItemPerformersKey, NSMetadataItemPhoneNumbersKey, + NSMetadataItemPixelCountKey, NSMetadataItemPixelHeightKey, NSMetadataItemPixelWidthKey, + NSMetadataItemProducerKey, NSMetadataItemProfileNameKey, NSMetadataItemProjectsKey, + NSMetadataItemPublishersKey, NSMetadataItemRecipientAddressesKey, + NSMetadataItemRecipientEmailAddressesKey, NSMetadataItemRecipientsKey, + NSMetadataItemRecordingDateKey, NSMetadataItemRecordingYearKey, + NSMetadataItemRedEyeOnOffKey, NSMetadataItemResolutionHeightDPIKey, + NSMetadataItemResolutionWidthDPIKey, NSMetadataItemRightsKey, + NSMetadataItemSecurityMethodKey, NSMetadataItemSpeedKey, NSMetadataItemStarRatingKey, + NSMetadataItemStateOrProvinceKey, NSMetadataItemStreamableKey, NSMetadataItemSubjectKey, + NSMetadataItemTempoKey, NSMetadataItemTextContentKey, NSMetadataItemThemeKey, + NSMetadataItemTimeSignatureKey, NSMetadataItemTimestampKey, NSMetadataItemTitleKey, + NSMetadataItemTotalBitRateKey, NSMetadataItemURLKey, NSMetadataItemVersionKey, + NSMetadataItemVideoBitRateKey, NSMetadataItemWhereFromsKey, NSMetadataItemWhiteBalanceKey, + NSMetadataUbiquitousItemContainerDisplayNameKey, + NSMetadataUbiquitousItemDownloadRequestedKey, NSMetadataUbiquitousItemDownloadingErrorKey, + NSMetadataUbiquitousItemDownloadingStatusCurrent, + NSMetadataUbiquitousItemDownloadingStatusDownloaded, + NSMetadataUbiquitousItemDownloadingStatusKey, + NSMetadataUbiquitousItemDownloadingStatusNotDownloaded, + NSMetadataUbiquitousItemHasUnresolvedConflictsKey, NSMetadataUbiquitousItemIsDownloadedKey, + NSMetadataUbiquitousItemIsDownloadingKey, NSMetadataUbiquitousItemIsExternalDocumentKey, + NSMetadataUbiquitousItemIsSharedKey, NSMetadataUbiquitousItemIsUploadedKey, + NSMetadataUbiquitousItemIsUploadingKey, NSMetadataUbiquitousItemPercentDownloadedKey, + NSMetadataUbiquitousItemPercentUploadedKey, NSMetadataUbiquitousItemURLInLocalContainerKey, + NSMetadataUbiquitousItemUploadingErrorKey, + NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey, + NSMetadataUbiquitousSharedItemCurrentUserRoleKey, + NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey, + NSMetadataUbiquitousSharedItemOwnerNameComponentsKey, + NSMetadataUbiquitousSharedItemPermissionsReadOnly, + NSMetadataUbiquitousSharedItemPermissionsReadWrite, + NSMetadataUbiquitousSharedItemRoleOwner, NSMetadataUbiquitousSharedItemRoleParticipant, }; pub use super::NSMethodSignature::NSMethodSignature; pub use super::NSMorphology::{ @@ -551,8 +773,9 @@ mod __exported { NSNetServiceListenForConnections, NSNetServiceNoAutoRename, NSNetServiceOptions, NSNetServicesActivityInProgress, NSNetServicesBadArgumentError, NSNetServicesCancelledError, NSNetServicesCollisionError, NSNetServicesError, - NSNetServicesInvalidError, NSNetServicesMissingRequiredConfigurationError, - NSNetServicesNotFoundError, NSNetServicesTimeoutError, NSNetServicesUnknownError, + NSNetServicesErrorCode, NSNetServicesErrorDomain, NSNetServicesInvalidError, + NSNetServicesMissingRequiredConfigurationError, NSNetServicesNotFoundError, + NSNetServicesTimeoutError, NSNetServicesUnknownError, }; pub use super::NSNotification::{NSNotification, NSNotificationCenter, NSNotificationName}; pub use super::NSNotificationQueue::{ @@ -577,19 +800,21 @@ mod __exported { }; pub use super::NSObjCRuntime::{ NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, NSEnumerationReverse, - NSExceptionName, NSOrderedAscending, NSOrderedDescending, NSOrderedSame, - NSQualityOfService, NSQualityOfServiceBackground, NSQualityOfServiceDefault, - NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, - NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, NSSortOptions, NSSortStable, + NSExceptionName, NSFoundationVersionNumber, NSNotFound, NSOrderedAscending, + NSOrderedDescending, NSOrderedSame, NSQualityOfService, NSQualityOfServiceBackground, + NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, + NSQualityOfServiceUserInteractive, NSQualityOfServiceUtility, NSRunLoopMode, + NSSortConcurrent, NSSortOptions, NSSortStable, }; pub use super::NSObject::{ NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, }; pub use super::NSOperation::{ - NSBlockOperation, NSInvocationOperation, NSOperation, NSOperationQueue, - NSOperationQueuePriority, NSOperationQueuePriorityHigh, NSOperationQueuePriorityLow, - NSOperationQueuePriorityNormal, NSOperationQueuePriorityVeryHigh, - NSOperationQueuePriorityVeryLow, + NSBlockOperation, NSInvocationOperation, NSInvocationOperationCancelledException, + NSInvocationOperationVoidResultException, NSOperation, NSOperationQueue, + NSOperationQueueDefaultMaxConcurrentOperationCount, NSOperationQueuePriority, + NSOperationQueuePriorityHigh, NSOperationQueuePriorityLow, NSOperationQueuePriorityNormal, + NSOperationQueuePriorityVeryHigh, NSOperationQueuePriorityVeryLow, }; pub use super::NSOrderedCollectionChange::{ NSCollectionChangeInsert, NSCollectionChangeRemove, NSCollectionChangeType, @@ -618,6 +843,9 @@ mod __exported { }; pub use super::NSPersonNameComponents::NSPersonNameComponents; pub use super::NSPersonNameComponentsFormatter::{ + NSPersonNameComponentDelimiter, NSPersonNameComponentFamilyName, + NSPersonNameComponentGivenName, NSPersonNameComponentKey, NSPersonNameComponentMiddleName, + NSPersonNameComponentNickname, NSPersonNameComponentPrefix, NSPersonNameComponentSuffix, NSPersonNameComponentsFormatter, NSPersonNameComponentsFormatterOptions, NSPersonNameComponentsFormatterPhonetic, NSPersonNameComponentsFormatterStyle, NSPersonNameComponentsFormatterStyleAbbreviated, @@ -637,7 +865,7 @@ mod __exported { pub use super::NSPort::{ NSMachPort, NSMachPortDeallocateNone, NSMachPortDeallocateReceiveRight, NSMachPortDeallocateSendRight, NSMachPortDelegate, NSMachPortOptions, NSMessagePort, - NSPort, NSPortDelegate, NSSocketPort, + NSPort, NSPortDelegate, NSPortDidBecomeInvalidNotification, NSSocketPort, }; pub use super::NSPortCoder::NSPortCoder; pub use super::NSPortMessage::NSPortMessage; @@ -651,13 +879,21 @@ mod __exported { NSActivityLatencyCritical, NSActivityOptions, NSActivitySuddenTerminationDisabled, NSActivityUserInitiated, NSActivityUserInitiatedAllowingIdleSystemSleep, NSHPUXOperatingSystem, NSMACHOperatingSystem, NSOSF1OperatingSystem, NSProcessInfo, - NSProcessInfoThermalState, NSProcessInfoThermalStateCritical, + NSProcessInfoPowerStateDidChangeNotification, NSProcessInfoThermalState, + NSProcessInfoThermalStateCritical, NSProcessInfoThermalStateDidChangeNotification, NSProcessInfoThermalStateFair, NSProcessInfoThermalStateNominal, NSProcessInfoThermalStateSerious, NSSolarisOperatingSystem, NSSunOSOperatingSystem, NSWindows95OperatingSystem, NSWindowsNTOperatingSystem, }; pub use super::NSProgress::{ - NSProgress, NSProgressFileOperationKind, NSProgressKind, NSProgressReporting, + NSProgress, NSProgressEstimatedTimeRemainingKey, NSProgressFileAnimationImageKey, + NSProgressFileAnimationImageOriginalRectKey, NSProgressFileCompletedCountKey, + NSProgressFileIconKey, NSProgressFileOperationKind, NSProgressFileOperationKindCopying, + NSProgressFileOperationKindDecompressingAfterDownloading, + NSProgressFileOperationKindDownloading, NSProgressFileOperationKindDuplicating, + NSProgressFileOperationKindKey, NSProgressFileOperationKindReceiving, + NSProgressFileOperationKindUploading, NSProgressFileTotalCountKey, NSProgressFileURLKey, + NSProgressKind, NSProgressKindFile, NSProgressReporting, NSProgressThroughputKey, NSProgressUserInfoKey, }; pub use super::NSPropertyList::{ @@ -686,7 +922,7 @@ mod __exported { NSRelativeDateTimeFormatterUnitsStyleFull, NSRelativeDateTimeFormatterUnitsStyleShort, NSRelativeDateTimeFormatterUnitsStyleSpellOut, }; - pub use super::NSRunLoop::NSRunLoop; + pub use super::NSRunLoop::{NSDefaultRunLoopMode, NSRunLoop, NSRunLoopCommonModes}; pub use super::NSScanner::NSScanner; pub use super::NSScriptClassDescription::NSScriptClassDescription; pub use super::NSScriptCoercionHandler::NSScriptCoercionHandler; @@ -700,6 +936,7 @@ mod __exported { }; pub use super::NSScriptCommandDescription::NSScriptCommandDescription; pub use super::NSScriptExecutionContext::NSScriptExecutionContext; + pub use super::NSScriptKeyValueCoding::NSOperationNotSupportedForKeyException; pub use super::NSScriptObjectSpecifiers::{ NSContainerSpecifierError, NSEverySubelement, NSIndexSpecifier, NSIndexSubelement, NSInsertionPosition, NSInternalSpecifierError, NSInvalidIndexSpecifierError, @@ -725,57 +962,89 @@ mod __exported { }; pub use super::NSSet::{NSCountedSet, NSMutableSet, NSSet}; pub use super::NSSortDescriptor::NSSortDescriptor; - pub use super::NSSpellServer::{NSSpellServer, NSSpellServerDelegate}; + pub use super::NSSpellServer::{ + NSGrammarCorrections, NSGrammarRange, NSGrammarUserDescription, NSSpellServer, + NSSpellServerDelegate, + }; pub use super::NSStream::{ - NSInputStream, NSOutputStream, NSStream, NSStreamDelegate, NSStreamEvent, - NSStreamEventEndEncountered, NSStreamEventErrorOccurred, NSStreamEventHasBytesAvailable, - NSStreamEventHasSpaceAvailable, NSStreamEventNone, NSStreamEventOpenCompleted, - NSStreamNetworkServiceTypeValue, NSStreamPropertyKey, NSStreamSOCKSProxyConfiguration, - NSStreamSOCKSProxyVersion, NSStreamSocketSecurityLevel, NSStreamStatus, + NSInputStream, NSOutputStream, NSStream, NSStreamDataWrittenToMemoryStreamKey, + NSStreamDelegate, NSStreamEvent, NSStreamEventEndEncountered, NSStreamEventErrorOccurred, + NSStreamEventHasBytesAvailable, NSStreamEventHasSpaceAvailable, NSStreamEventNone, + NSStreamEventOpenCompleted, NSStreamFileCurrentOffsetKey, NSStreamNetworkServiceType, + NSStreamNetworkServiceTypeBackground, NSStreamNetworkServiceTypeCallSignaling, + NSStreamNetworkServiceTypeValue, NSStreamNetworkServiceTypeVideo, + NSStreamNetworkServiceTypeVoIP, NSStreamNetworkServiceTypeVoice, NSStreamPropertyKey, + NSStreamSOCKSErrorDomain, NSStreamSOCKSProxyConfiguration, + NSStreamSOCKSProxyConfigurationKey, NSStreamSOCKSProxyHostKey, + NSStreamSOCKSProxyPasswordKey, NSStreamSOCKSProxyPortKey, NSStreamSOCKSProxyUserKey, + NSStreamSOCKSProxyVersion, NSStreamSOCKSProxyVersion4, NSStreamSOCKSProxyVersion5, + NSStreamSOCKSProxyVersionKey, NSStreamSocketSSLErrorDomain, NSStreamSocketSecurityLevel, + NSStreamSocketSecurityLevelKey, NSStreamSocketSecurityLevelNegotiatedSSL, + NSStreamSocketSecurityLevelNone, NSStreamSocketSecurityLevelSSLv2, + NSStreamSocketSecurityLevelSSLv3, NSStreamSocketSecurityLevelTLSv1, NSStreamStatus, NSStreamStatusAtEnd, NSStreamStatusClosed, NSStreamStatusError, NSStreamStatusNotOpen, NSStreamStatusOpen, NSStreamStatusOpening, NSStreamStatusReading, NSStreamStatusWriting, }; pub use super::NSString::{ NSASCIIStringEncoding, NSAnchoredSearch, NSBackwardsSearch, NSCaseInsensitiveSearch, - NSConstantString, NSDiacriticInsensitiveSearch, NSForcedOrderingSearch, - NSISO2022JPStringEncoding, NSISOLatin1StringEncoding, NSISOLatin2StringEncoding, - NSJapaneseEUCStringEncoding, NSLiteralSearch, NSMacOSRomanStringEncoding, NSMutableString, - NSNEXTSTEPStringEncoding, NSNonLossyASCIIStringEncoding, NSNumericSearch, + NSCharacterConversionException, NSConstantString, NSDiacriticInsensitiveSearch, + NSForcedOrderingSearch, NSISO2022JPStringEncoding, NSISOLatin1StringEncoding, + NSISOLatin2StringEncoding, NSJapaneseEUCStringEncoding, NSLiteralSearch, + NSMacOSRomanStringEncoding, NSMutableString, NSNEXTSTEPStringEncoding, + NSNonLossyASCIIStringEncoding, NSNumericSearch, NSParseErrorException, NSProprietaryStringEncoding, NSRegularExpressionSearch, NSShiftJISStringEncoding, NSSimpleCString, NSString, NSStringCompareOptions, NSStringEncoding, NSStringEncodingConversionAllowLossy, NSStringEncodingConversionExternalRepresentation, - NSStringEncodingConversionOptions, NSStringEncodingDetectionOptionsKey, - NSStringEnumerationByCaretPositions, NSStringEnumerationByComposedCharacterSequences, - NSStringEnumerationByDeletionClusters, NSStringEnumerationByLines, - NSStringEnumerationByParagraphs, NSStringEnumerationBySentences, - NSStringEnumerationByWords, NSStringEnumerationLocalized, NSStringEnumerationOptions, - NSStringEnumerationReverse, NSStringEnumerationSubstringNotRequired, NSStringTransform, - NSSymbolStringEncoding, NSUTF16BigEndianStringEncoding, NSUTF16LittleEndianStringEncoding, - NSUTF16StringEncoding, NSUTF32BigEndianStringEncoding, NSUTF32LittleEndianStringEncoding, - NSUTF32StringEncoding, NSUTF8StringEncoding, NSUnicodeStringEncoding, - NSWidthInsensitiveSearch, NSWindowsCP1250StringEncoding, NSWindowsCP1251StringEncoding, - NSWindowsCP1252StringEncoding, NSWindowsCP1253StringEncoding, - NSWindowsCP1254StringEncoding, + NSStringEncodingConversionOptions, NSStringEncodingDetectionAllowLossyKey, + NSStringEncodingDetectionDisallowedEncodingsKey, NSStringEncodingDetectionFromWindowsKey, + NSStringEncodingDetectionLikelyLanguageKey, NSStringEncodingDetectionLossySubstitutionKey, + NSStringEncodingDetectionOptionsKey, NSStringEncodingDetectionSuggestedEncodingsKey, + NSStringEncodingDetectionUseOnlySuggestedEncodingsKey, NSStringEnumerationByCaretPositions, + NSStringEnumerationByComposedCharacterSequences, NSStringEnumerationByDeletionClusters, + NSStringEnumerationByLines, NSStringEnumerationByParagraphs, + NSStringEnumerationBySentences, NSStringEnumerationByWords, NSStringEnumerationLocalized, + NSStringEnumerationOptions, NSStringEnumerationReverse, + NSStringEnumerationSubstringNotRequired, NSStringTransform, + NSStringTransformFullwidthToHalfwidth, NSStringTransformHiraganaToKatakana, + NSStringTransformLatinToArabic, NSStringTransformLatinToCyrillic, + NSStringTransformLatinToGreek, NSStringTransformLatinToHangul, + NSStringTransformLatinToHebrew, NSStringTransformLatinToHiragana, + NSStringTransformLatinToKatakana, NSStringTransformLatinToThai, + NSStringTransformMandarinToLatin, NSStringTransformStripCombiningMarks, + NSStringTransformStripDiacritics, NSStringTransformToLatin, NSStringTransformToUnicodeName, + NSStringTransformToXMLHex, NSSymbolStringEncoding, NSUTF16BigEndianStringEncoding, + NSUTF16LittleEndianStringEncoding, NSUTF16StringEncoding, NSUTF32BigEndianStringEncoding, + NSUTF32LittleEndianStringEncoding, NSUTF32StringEncoding, NSUTF8StringEncoding, + NSUnicodeStringEncoding, NSWidthInsensitiveSearch, NSWindowsCP1250StringEncoding, + NSWindowsCP1251StringEncoding, NSWindowsCP1252StringEncoding, + NSWindowsCP1253StringEncoding, NSWindowsCP1254StringEncoding, }; pub use super::NSTask::{ - NSTask, NSTaskTerminationReason, NSTaskTerminationReasonExit, - NSTaskTerminationReasonUncaughtSignal, + NSTask, NSTaskDidTerminateNotification, NSTaskTerminationReason, + NSTaskTerminationReasonExit, NSTaskTerminationReasonUncaughtSignal, }; pub use super::NSTextCheckingResult::{ - NSTextCheckingAllCustomTypes, NSTextCheckingAllSystemTypes, NSTextCheckingAllTypes, - NSTextCheckingKey, NSTextCheckingResult, NSTextCheckingType, NSTextCheckingTypeAddress, - NSTextCheckingTypeCorrection, NSTextCheckingTypeDash, NSTextCheckingTypeDate, - NSTextCheckingTypeGrammar, NSTextCheckingTypeLink, NSTextCheckingTypeOrthography, - NSTextCheckingTypePhoneNumber, NSTextCheckingTypeQuote, + NSTextCheckingAirlineKey, NSTextCheckingAllCustomTypes, NSTextCheckingAllSystemTypes, + NSTextCheckingAllTypes, NSTextCheckingCityKey, NSTextCheckingCountryKey, + NSTextCheckingFlightKey, NSTextCheckingJobTitleKey, NSTextCheckingKey, + NSTextCheckingNameKey, NSTextCheckingOrganizationKey, NSTextCheckingPhoneKey, + NSTextCheckingResult, NSTextCheckingStateKey, NSTextCheckingStreetKey, NSTextCheckingType, + NSTextCheckingTypeAddress, NSTextCheckingTypeCorrection, NSTextCheckingTypeDash, + NSTextCheckingTypeDate, NSTextCheckingTypeGrammar, NSTextCheckingTypeLink, + NSTextCheckingTypeOrthography, NSTextCheckingTypePhoneNumber, NSTextCheckingTypeQuote, NSTextCheckingTypeRegularExpression, NSTextCheckingTypeReplacement, NSTextCheckingTypeSpelling, NSTextCheckingTypeTransitInformation, NSTextCheckingTypes, + NSTextCheckingZIPKey, + }; + pub use super::NSThread::{ + NSDidBecomeSingleThreadedNotification, NSThread, NSThreadWillExitNotification, + NSWillBecomeMultiThreadedNotification, }; - pub use super::NSThread::NSThread; pub use super::NSTimeZone::{ - NSTimeZone, NSTimeZoneNameStyle, NSTimeZoneNameStyleDaylightSaving, - NSTimeZoneNameStyleGeneric, NSTimeZoneNameStyleShortDaylightSaving, - NSTimeZoneNameStyleShortGeneric, NSTimeZoneNameStyleShortStandard, - NSTimeZoneNameStyleStandard, + NSSystemTimeZoneDidChangeNotification, NSTimeZone, NSTimeZoneNameStyle, + NSTimeZoneNameStyleDaylightSaving, NSTimeZoneNameStyleGeneric, + NSTimeZoneNameStyleShortDaylightSaving, NSTimeZoneNameStyleShortGeneric, + NSTimeZoneNameStyleShortStandard, NSTimeZoneNameStyleStandard, }; pub use super::NSTimer::NSTimer; pub use super::NSURLAuthenticationChallenge::{ @@ -794,14 +1063,17 @@ mod __exported { NSURLCredentialPersistenceNone, NSURLCredentialPersistencePermanent, NSURLCredentialPersistenceSynchronizable, }; - pub use super::NSURLCredentialStorage::NSURLCredentialStorage; + pub use super::NSURLCredentialStorage::{ + NSURLCredentialStorage, NSURLCredentialStorageChangedNotification, + NSURLCredentialStorageRemoveSynchronizableCredentials, + }; pub use super::NSURLDownload::{NSURLDownload, NSURLDownloadDelegate}; pub use super::NSURLError::{ - NSURLErrorAppTransportSecurityRequiresSecureConnection, + NSErrorFailingURLStringKey, NSURLErrorAppTransportSecurityRequiresSecureConnection, NSURLErrorBackgroundSessionInUseByAnotherProcess, NSURLErrorBackgroundSessionRequiresSharedContainer, - NSURLErrorBackgroundSessionWasDisconnected, NSURLErrorBadServerResponse, NSURLErrorBadURL, - NSURLErrorCallIsActive, NSURLErrorCancelled, + NSURLErrorBackgroundSessionWasDisconnected, NSURLErrorBackgroundTaskCancelledReasonKey, + NSURLErrorBadServerResponse, NSURLErrorBadURL, NSURLErrorCallIsActive, NSURLErrorCancelled, NSURLErrorCancelledReasonBackgroundUpdatesDisabled, NSURLErrorCancelledReasonInsufficientSystemResources, NSURLErrorCancelledReasonUserForceQuitApplication, NSURLErrorCannotCloseFile, @@ -811,25 +1083,41 @@ mod __exported { NSURLErrorCannotParseResponse, NSURLErrorCannotRemoveFile, NSURLErrorCannotWriteToFile, NSURLErrorClientCertificateRejected, NSURLErrorClientCertificateRequired, NSURLErrorDNSLookupFailed, NSURLErrorDataLengthExceedsMaximum, NSURLErrorDataNotAllowed, - NSURLErrorDownloadDecodingFailedMidStream, NSURLErrorDownloadDecodingFailedToComplete, + NSURLErrorDomain, NSURLErrorDownloadDecodingFailedMidStream, + NSURLErrorDownloadDecodingFailedToComplete, NSURLErrorFailingURLErrorKey, + NSURLErrorFailingURLPeerTrustErrorKey, NSURLErrorFailingURLStringErrorKey, NSURLErrorFileDoesNotExist, NSURLErrorFileIsDirectory, NSURLErrorFileOutsideSafeArea, NSURLErrorHTTPTooManyRedirects, NSURLErrorInternationalRoamingOff, NSURLErrorNetworkConnectionLost, NSURLErrorNetworkUnavailableReason, NSURLErrorNetworkUnavailableReasonCellular, NSURLErrorNetworkUnavailableReasonConstrained, - NSURLErrorNetworkUnavailableReasonExpensive, NSURLErrorNoPermissionsToReadFile, - NSURLErrorNotConnectedToInternet, NSURLErrorRedirectToNonExistentLocation, - NSURLErrorRequestBodyStreamExhausted, NSURLErrorResourceUnavailable, - NSURLErrorSecureConnectionFailed, NSURLErrorServerCertificateHasBadDate, - NSURLErrorServerCertificateHasUnknownRoot, NSURLErrorServerCertificateNotYetValid, - NSURLErrorServerCertificateUntrusted, NSURLErrorTimedOut, NSURLErrorUnknown, - NSURLErrorUnsupportedURL, NSURLErrorUserAuthenticationRequired, - NSURLErrorUserCancelledAuthentication, NSURLErrorZeroByteResource, + NSURLErrorNetworkUnavailableReasonExpensive, NSURLErrorNetworkUnavailableReasonKey, + NSURLErrorNoPermissionsToReadFile, NSURLErrorNotConnectedToInternet, + NSURLErrorRedirectToNonExistentLocation, NSURLErrorRequestBodyStreamExhausted, + NSURLErrorResourceUnavailable, NSURLErrorSecureConnectionFailed, + NSURLErrorServerCertificateHasBadDate, NSURLErrorServerCertificateHasUnknownRoot, + NSURLErrorServerCertificateNotYetValid, NSURLErrorServerCertificateUntrusted, + NSURLErrorTimedOut, NSURLErrorUnknown, NSURLErrorUnsupportedURL, + NSURLErrorUserAuthenticationRequired, NSURLErrorUserCancelledAuthentication, + NSURLErrorZeroByteResource, }; pub use super::NSURLHandle::{ - NSURLHandle, NSURLHandleClient, NSURLHandleLoadFailed, NSURLHandleLoadInProgress, - NSURLHandleLoadSucceeded, NSURLHandleNotLoaded, NSURLHandleStatus, + NSFTPPropertyActiveTransferModeKey, NSFTPPropertyFTPProxy, NSFTPPropertyFileOffsetKey, + NSFTPPropertyUserLoginKey, NSFTPPropertyUserPasswordKey, NSHTTPPropertyErrorPageDataKey, + NSHTTPPropertyHTTPProxy, NSHTTPPropertyRedirectionHeadersKey, + NSHTTPPropertyServerHTTPVersionKey, NSHTTPPropertyStatusCodeKey, + NSHTTPPropertyStatusReasonKey, NSURLHandle, NSURLHandleClient, NSURLHandleLoadFailed, + NSURLHandleLoadInProgress, NSURLHandleLoadSucceeded, NSURLHandleNotLoaded, + NSURLHandleStatus, + }; + pub use super::NSURLProtectionSpace::{ + NSURLAuthenticationMethodClientCertificate, NSURLAuthenticationMethodDefault, + NSURLAuthenticationMethodHTMLForm, NSURLAuthenticationMethodHTTPBasic, + NSURLAuthenticationMethodHTTPDigest, NSURLAuthenticationMethodNTLM, + NSURLAuthenticationMethodNegotiate, NSURLAuthenticationMethodServerTrust, + NSURLProtectionSpace, NSURLProtectionSpaceFTP, NSURLProtectionSpaceFTPProxy, + NSURLProtectionSpaceHTTP, NSURLProtectionSpaceHTTPProxy, NSURLProtectionSpaceHTTPS, + NSURLProtectionSpaceHTTPSProxy, NSURLProtectionSpaceSOCKSProxy, }; - pub use super::NSURLProtectionSpace::NSURLProtectionSpace; pub use super::NSURLProtocol::{NSURLProtocol, NSURLProtocolClient}; pub use super::NSURLRequest::{ NSMutableURLRequest, NSURLNetworkServiceTypeAVStreaming, NSURLNetworkServiceTypeBackground, @@ -852,13 +1140,14 @@ mod __exported { NSURLSessionDelayedRequestCancel, NSURLSessionDelayedRequestContinueLoading, NSURLSessionDelayedRequestDisposition, NSURLSessionDelayedRequestUseNewRequest, NSURLSessionDelegate, NSURLSessionDownloadDelegate, NSURLSessionDownloadTask, - NSURLSessionMultipathServiceType, NSURLSessionMultipathServiceTypeAggregate, - NSURLSessionMultipathServiceTypeHandover, NSURLSessionMultipathServiceTypeInteractive, - NSURLSessionMultipathServiceTypeNone, NSURLSessionResponseAllow, - NSURLSessionResponseBecomeDownload, NSURLSessionResponseBecomeStream, - NSURLSessionResponseCancel, NSURLSessionResponseDisposition, NSURLSessionStreamDelegate, - NSURLSessionStreamTask, NSURLSessionTask, NSURLSessionTaskDelegate, - NSURLSessionTaskMetrics, NSURLSessionTaskMetricsDomainResolutionProtocol, + NSURLSessionDownloadTaskResumeData, NSURLSessionMultipathServiceType, + NSURLSessionMultipathServiceTypeAggregate, NSURLSessionMultipathServiceTypeHandover, + NSURLSessionMultipathServiceTypeInteractive, NSURLSessionMultipathServiceTypeNone, + NSURLSessionResponseAllow, NSURLSessionResponseBecomeDownload, + NSURLSessionResponseBecomeStream, NSURLSessionResponseCancel, + NSURLSessionResponseDisposition, NSURLSessionStreamDelegate, NSURLSessionStreamTask, + NSURLSessionTask, NSURLSessionTaskDelegate, NSURLSessionTaskMetrics, + NSURLSessionTaskMetricsDomainResolutionProtocol, NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS, NSURLSessionTaskMetricsDomainResolutionProtocolTCP, NSURLSessionTaskMetricsDomainResolutionProtocolTLS, @@ -868,10 +1157,12 @@ mod __exported { NSURLSessionTaskMetricsResourceFetchTypeLocalCache, NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad, NSURLSessionTaskMetricsResourceFetchTypeServerPush, - NSURLSessionTaskMetricsResourceFetchTypeUnknown, NSURLSessionTaskState, + NSURLSessionTaskMetricsResourceFetchTypeUnknown, NSURLSessionTaskPriorityDefault, + NSURLSessionTaskPriorityHigh, NSURLSessionTaskPriorityLow, NSURLSessionTaskState, NSURLSessionTaskStateCanceling, NSURLSessionTaskStateCompleted, NSURLSessionTaskStateRunning, NSURLSessionTaskStateSuspended, - NSURLSessionTaskTransactionMetrics, NSURLSessionUploadTask, NSURLSessionWebSocketCloseCode, + NSURLSessionTaskTransactionMetrics, NSURLSessionTransferSizeUnknown, + NSURLSessionUploadTask, NSURLSessionWebSocketCloseCode, NSURLSessionWebSocketCloseCodeAbnormalClosure, NSURLSessionWebSocketCloseCodeGoingAway, NSURLSessionWebSocketCloseCodeInternalServerError, NSURLSessionWebSocketCloseCodeInvalid, NSURLSessionWebSocketCloseCodeInvalidFramePayloadData, @@ -888,10 +1179,18 @@ mod __exported { }; pub use super::NSUbiquitousKeyValueStore::{ NSUbiquitousKeyValueStore, NSUbiquitousKeyValueStoreAccountChange, + NSUbiquitousKeyValueStoreChangeReasonKey, NSUbiquitousKeyValueStoreChangedKeysKey, + NSUbiquitousKeyValueStoreDidChangeExternallyNotification, NSUbiquitousKeyValueStoreInitialSyncChange, NSUbiquitousKeyValueStoreQuotaViolationChange, NSUbiquitousKeyValueStoreServerChange, }; - pub use super::NSUndoManager::NSUndoManager; + pub use super::NSUndoManager::{ + NSUndoCloseGroupingRunLoopOrdering, NSUndoManager, NSUndoManagerCheckpointNotification, + NSUndoManagerDidCloseUndoGroupNotification, NSUndoManagerDidOpenUndoGroupNotification, + NSUndoManagerDidRedoChangeNotification, NSUndoManagerDidUndoChangeNotification, + NSUndoManagerGroupIsDiscardableKey, NSUndoManagerWillCloseUndoGroupNotification, + NSUndoManagerWillRedoChangeNotification, NSUndoManagerWillUndoChangeNotification, + }; pub use super::NSUnit::{ NSDimension, NSUnit, NSUnitAcceleration, NSUnitAngle, NSUnitArea, NSUnitConcentrationMass, NSUnitConverter, NSUnitConverterLinear, NSUnitDispersion, NSUnitDuration, @@ -902,22 +1201,40 @@ mod __exported { }; pub use super::NSUserActivity::{ NSUserActivity, NSUserActivityDelegate, NSUserActivityPersistentIdentifier, + NSUserActivityTypeBrowsingWeb, + }; + pub use super::NSUserDefaults::{ + NSAMPMDesignation, NSArgumentDomain, NSCurrencySymbol, NSDateFormatString, + NSDateTimeOrdering, NSDecimalDigits, NSDecimalSeparator, NSEarlierTimeDesignations, + NSGlobalDomain, NSHourNameDesignations, NSInternationalCurrencyString, + NSLaterTimeDesignations, NSMonthNameArray, NSNegativeCurrencyFormatString, + NSNextDayDesignations, NSNextNextDayDesignations, NSPositiveCurrencyFormatString, + NSPriorDayDesignations, NSRegistrationDomain, NSShortDateFormatString, + NSShortMonthNameArray, NSShortTimeDateFormatString, NSShortWeekDayNameArray, + NSThisDayDesignations, NSThousandsSeparator, NSTimeDateFormatString, NSTimeFormatString, + NSUbiquitousUserDefaultsCompletedInitialSyncNotification, + NSUbiquitousUserDefaultsDidChangeAccountsNotification, + NSUbiquitousUserDefaultsNoCloudAccountNotification, NSUserDefaults, + NSUserDefaultsDidChangeNotification, NSUserDefaultsSizeLimitExceededNotification, + NSWeekDayNameArray, NSYearMonthWeekDesignations, }; - pub use super::NSUserDefaults::NSUserDefaults; pub use super::NSUserNotification::{ NSUserNotification, NSUserNotificationAction, NSUserNotificationActivationType, NSUserNotificationActivationTypeActionButtonClicked, NSUserNotificationActivationTypeAdditionalActionClicked, NSUserNotificationActivationTypeContentsClicked, NSUserNotificationActivationTypeNone, NSUserNotificationActivationTypeReplied, NSUserNotificationCenter, - NSUserNotificationCenterDelegate, + NSUserNotificationCenterDelegate, NSUserNotificationDefaultSoundName, }; pub use super::NSUserScriptTask::{ NSUserAppleScriptTask, NSUserAutomatorTask, NSUserScriptTask, NSUserUnixTask, }; pub use super::NSValue::{NSNumber, NSValue}; pub use super::NSValueTransformer::{ - NSSecureUnarchiveFromDataTransformer, NSValueTransformer, NSValueTransformerName, + NSIsNilTransformerName, NSIsNotNilTransformerName, NSKeyedUnarchiveFromDataTransformerName, + NSNegateBooleanTransformerName, NSSecureUnarchiveFromDataTransformer, + NSSecureUnarchiveFromDataTransformerName, NSUnarchiveFromDataTransformerName, + NSValueTransformer, NSValueTransformerName, }; pub use super::NSXMLDTDNode::{ NSXMLAttributeCDATAKind, NSXMLAttributeEntitiesKind, NSXMLAttributeEntityKind, @@ -971,14 +1288,15 @@ mod __exported { NSXMLParserEntityRefInEpilogError, NSXMLParserEntityRefInPrologError, NSXMLParserEntityRefLoopError, NSXMLParserEntityReferenceMissingSemiError, NSXMLParserEntityReferenceWithoutNameError, NSXMLParserEntityValueRequiredError, - NSXMLParserEqualExpectedError, NSXMLParserError, NSXMLParserExternalEntityResolvingPolicy, - NSXMLParserExternalStandaloneEntityError, NSXMLParserExternalSubsetNotFinishedError, - NSXMLParserExtraContentError, NSXMLParserGTRequiredError, NSXMLParserInternalError, - NSXMLParserInvalidCharacterError, NSXMLParserInvalidCharacterInEntityError, - NSXMLParserInvalidCharacterRefError, NSXMLParserInvalidConditionalSectionError, - NSXMLParserInvalidDecimalCharacterRefError, NSXMLParserInvalidEncodingError, - NSXMLParserInvalidEncodingNameError, NSXMLParserInvalidHexCharacterRefError, - NSXMLParserInvalidURIError, NSXMLParserLTRequiredError, NSXMLParserLTSlashRequiredError, + NSXMLParserEqualExpectedError, NSXMLParserError, NSXMLParserErrorDomain, + NSXMLParserExternalEntityResolvingPolicy, NSXMLParserExternalStandaloneEntityError, + NSXMLParserExternalSubsetNotFinishedError, NSXMLParserExtraContentError, + NSXMLParserGTRequiredError, NSXMLParserInternalError, NSXMLParserInvalidCharacterError, + NSXMLParserInvalidCharacterInEntityError, NSXMLParserInvalidCharacterRefError, + NSXMLParserInvalidConditionalSectionError, NSXMLParserInvalidDecimalCharacterRefError, + NSXMLParserInvalidEncodingError, NSXMLParserInvalidEncodingNameError, + NSXMLParserInvalidHexCharacterRefError, NSXMLParserInvalidURIError, + NSXMLParserLTRequiredError, NSXMLParserLTSlashRequiredError, NSXMLParserLessThanSymbolInAttributeError, NSXMLParserLiteralNotFinishedError, NSXMLParserLiteralNotStartedError, NSXMLParserMisplacedCDATAEndStringError, NSXMLParserMisplacedXMLDeclarationError, NSXMLParserMixedContentDeclNotFinishedError, @@ -1010,17 +1328,77 @@ mod __exported { }; pub use super::NSZone::{NSCollectorDisabledOption, NSScannedOption}; pub use super::NSURL::{ - NSFileSecurity, NSURLBookmarkCreationMinimalBookmark, NSURLBookmarkCreationOptions, + NSFileSecurity, NSThumbnail1024x1024SizeKey, NSURLAddedToDirectoryDateKey, + NSURLApplicationIsScriptableKey, NSURLAttributeModificationDateKey, + NSURLBookmarkCreationMinimalBookmark, NSURLBookmarkCreationOptions, NSURLBookmarkCreationPreferFileIDResolution, NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess, NSURLBookmarkCreationSuitableForBookmarkFile, NSURLBookmarkCreationWithSecurityScope, NSURLBookmarkCreationWithoutImplicitSecurityScope, NSURLBookmarkFileCreationOptions, NSURLBookmarkResolutionOptions, NSURLBookmarkResolutionWithSecurityScope, NSURLBookmarkResolutionWithoutImplicitStartAccessing, - NSURLBookmarkResolutionWithoutMounting, NSURLBookmarkResolutionWithoutUI, NSURLComponents, - NSURLFileProtectionType, NSURLFileResourceType, NSURLQueryItem, NSURLResourceKey, - NSURLThumbnailDictionaryItem, NSURLUbiquitousItemDownloadingStatus, - NSURLUbiquitousSharedItemPermissions, NSURLUbiquitousSharedItemRole, NSURL, + NSURLBookmarkResolutionWithoutMounting, NSURLBookmarkResolutionWithoutUI, + NSURLCanonicalPathKey, NSURLComponents, NSURLContentAccessDateKey, + NSURLContentModificationDateKey, NSURLContentTypeKey, NSURLCreationDateKey, + NSURLCustomIconKey, NSURLDocumentIdentifierKey, NSURLEffectiveIconKey, + NSURLFileAllocatedSizeKey, NSURLFileContentIdentifierKey, NSURLFileProtectionComplete, + NSURLFileProtectionCompleteUnlessOpen, + NSURLFileProtectionCompleteUntilFirstUserAuthentication, NSURLFileProtectionKey, + NSURLFileProtectionNone, NSURLFileProtectionType, NSURLFileResourceIdentifierKey, + NSURLFileResourceType, NSURLFileResourceTypeBlockSpecial, + NSURLFileResourceTypeCharacterSpecial, NSURLFileResourceTypeDirectory, + NSURLFileResourceTypeKey, NSURLFileResourceTypeNamedPipe, NSURLFileResourceTypeRegular, + NSURLFileResourceTypeSocket, NSURLFileResourceTypeSymbolicLink, + NSURLFileResourceTypeUnknown, NSURLFileScheme, NSURLFileSecurityKey, NSURLFileSizeKey, + NSURLGenerationIdentifierKey, NSURLHasHiddenExtensionKey, NSURLIsAliasFileKey, + NSURLIsApplicationKey, NSURLIsDirectoryKey, NSURLIsExcludedFromBackupKey, + NSURLIsExecutableKey, NSURLIsHiddenKey, NSURLIsMountTriggerKey, NSURLIsPackageKey, + NSURLIsPurgeableKey, NSURLIsReadableKey, NSURLIsRegularFileKey, NSURLIsSparseKey, + NSURLIsSymbolicLinkKey, NSURLIsSystemImmutableKey, NSURLIsUbiquitousItemKey, + NSURLIsUserImmutableKey, NSURLIsVolumeKey, NSURLIsWritableKey, NSURLKeysOfUnsetValuesKey, + NSURLLabelColorKey, NSURLLabelNumberKey, NSURLLinkCountKey, NSURLLocalizedLabelKey, + NSURLLocalizedNameKey, NSURLLocalizedTypeDescriptionKey, NSURLMayHaveExtendedAttributesKey, + NSURLMayShareFileContentKey, NSURLNameKey, NSURLParentDirectoryURLKey, NSURLPathKey, + NSURLPreferredIOBlockSizeKey, NSURLQuarantinePropertiesKey, NSURLQueryItem, + NSURLResourceKey, NSURLTagNamesKey, NSURLThumbnailDictionaryItem, + NSURLThumbnailDictionaryKey, NSURLThumbnailKey, NSURLTotalFileAllocatedSizeKey, + NSURLTotalFileSizeKey, NSURLTypeIdentifierKey, NSURLUbiquitousItemContainerDisplayNameKey, + NSURLUbiquitousItemDownloadRequestedKey, NSURLUbiquitousItemDownloadingErrorKey, + NSURLUbiquitousItemDownloadingStatus, NSURLUbiquitousItemDownloadingStatusCurrent, + NSURLUbiquitousItemDownloadingStatusDownloaded, NSURLUbiquitousItemDownloadingStatusKey, + NSURLUbiquitousItemDownloadingStatusNotDownloaded, + NSURLUbiquitousItemHasUnresolvedConflictsKey, NSURLUbiquitousItemIsDownloadedKey, + NSURLUbiquitousItemIsDownloadingKey, NSURLUbiquitousItemIsExcludedFromSyncKey, + NSURLUbiquitousItemIsSharedKey, NSURLUbiquitousItemIsUploadedKey, + NSURLUbiquitousItemIsUploadingKey, NSURLUbiquitousItemPercentDownloadedKey, + NSURLUbiquitousItemPercentUploadedKey, NSURLUbiquitousItemUploadingErrorKey, + NSURLUbiquitousSharedItemCurrentUserPermissionsKey, + NSURLUbiquitousSharedItemCurrentUserRoleKey, + NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey, + NSURLUbiquitousSharedItemOwnerNameComponentsKey, NSURLUbiquitousSharedItemPermissions, + NSURLUbiquitousSharedItemPermissionsReadOnly, + NSURLUbiquitousSharedItemPermissionsReadWrite, NSURLUbiquitousSharedItemRole, + NSURLUbiquitousSharedItemRoleOwner, NSURLUbiquitousSharedItemRoleParticipant, + NSURLVolumeAvailableCapacityForImportantUsageKey, + NSURLVolumeAvailableCapacityForOpportunisticUsageKey, NSURLVolumeAvailableCapacityKey, + NSURLVolumeCreationDateKey, NSURLVolumeIdentifierKey, NSURLVolumeIsAutomountedKey, + NSURLVolumeIsBrowsableKey, NSURLVolumeIsEjectableKey, NSURLVolumeIsEncryptedKey, + NSURLVolumeIsInternalKey, NSURLVolumeIsJournalingKey, NSURLVolumeIsLocalKey, + NSURLVolumeIsReadOnlyKey, NSURLVolumeIsRemovableKey, NSURLVolumeIsRootFileSystemKey, + NSURLVolumeLocalizedFormatDescriptionKey, NSURLVolumeLocalizedNameKey, + NSURLVolumeMaximumFileSizeKey, NSURLVolumeNameKey, NSURLVolumeResourceCountKey, + NSURLVolumeSupportsAccessPermissionsKey, NSURLVolumeSupportsAdvisoryFileLockingKey, + NSURLVolumeSupportsCasePreservedNamesKey, NSURLVolumeSupportsCaseSensitiveNamesKey, + NSURLVolumeSupportsCompressionKey, NSURLVolumeSupportsExclusiveRenamingKey, + NSURLVolumeSupportsExtendedSecurityKey, NSURLVolumeSupportsFileCloningKey, + NSURLVolumeSupportsFileProtectionKey, NSURLVolumeSupportsHardLinksKey, + NSURLVolumeSupportsImmutableFilesKey, NSURLVolumeSupportsJournalingKey, + NSURLVolumeSupportsPersistentIDsKey, NSURLVolumeSupportsRenamingKey, + NSURLVolumeSupportsRootDirectoryDatesKey, NSURLVolumeSupportsSparseFilesKey, + NSURLVolumeSupportsSwapRenamingKey, NSURLVolumeSupportsSymbolicLinksKey, + NSURLVolumeSupportsVolumeSizesKey, NSURLVolumeSupportsZeroRunsKey, + NSURLVolumeTotalCapacityKey, NSURLVolumeURLForRemountingKey, NSURLVolumeURLKey, + NSURLVolumeUUIDStringKey, NSURL, }; pub use super::NSUUID::NSUUID; pub use super::NSXMLDTD::NSXMLDTD; From 83a5edd34b1df9f5c658e66fd085e117afc54818 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Oct 2022 16:29:27 +0100 Subject: [PATCH 085/131] Add a bit of WIP code --- crates/header-translator/src/main.rs | 6 ++- crates/header-translator/src/stmt.rs | 56 +++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 1c42cdf7a..b00b07a72 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -90,7 +90,11 @@ fn main() { } } EntityKind::MacroExpansion if preprocessing => {} - EntityKind::MacroDefinition if preprocessing => {} + EntityKind::MacroDefinition if preprocessing => { + // let name = entity.get_name().expect("macro def name"); + // entity.is_function_like_macro(); + // println!("macrodef in {library}/{file_name}.h: {}", name); + } _ => { if preprocessing { println!("status: preprocessed {:?}...", sdk.platform); diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index c43cd5d0b..97a5e8b29 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -314,6 +314,27 @@ impl Stmt { } EntityKind::TypedefDecl => { let name = entity.get_name().expect("typedef name"); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + // TODO: Parse NS_TYPED_EXTENSIBLE_ENUM vs. NS_TYPED_ENUM + EntityKind::UnexposedAttr => { + if let Some(macro_) = UnexposedMacro::parse(&entity) { + panic!("unexpected attribute: {macro_:?}"); + } + } + EntityKind::StructDecl => { + // TODO? + } + EntityKind::ObjCClassRef + | EntityKind::ObjCProtocolRef + | EntityKind::TypeRef + | EntityKind::ParmDecl => {} + _ => panic!("unknown typedef child in {name}: {entity:?}"), + }; + EntityVisitResult::Continue + }); + let ty = entity .get_typedef_underlying_type() .expect("typedef underlying type"); @@ -350,15 +371,48 @@ impl Stmt { }) } TypeKind::Typedef => { + // println!( + // "typedef: {:?}, {:?}, {:#?}, {:#?}, {:#?}", + // entity.get_display_name(), + // entity.get_name(), + // entity.has_attributes(), + // entity.get_children(), + // ty, + // ); let type_ = RustType::parse_typedef(ty); Some(Self::AliasDecl { name, type_ }) } + TypeKind::Elaborated => { + let ty = ty.get_elaborated_type().expect("elaborated"); + match ty.get_kind() { + TypeKind::Enum => { + // Handled below + None + } + _ => { + // println!( + // "elaborated: {:?}, {:?}, {:?}, {:#?}, {:#?}, {:?}, {:#?}", + // entity.get_kind(), + // entity.get_display_name(), + // entity.get_name(), + // entity.has_attributes(), + // entity.get_children(), + // ty.get_kind(), + // ty, + // ); + None + } + } + } _ => { // println!( - // "typedef: {:#?}, {:#?}, {:#?}, {:#?}", + // "typedef2: {:?}, {:?}, {:?}, {:#?}, {:#?}, {:?}, {:#?}", + // entity.get_kind(), // entity.get_display_name(), + // entity.get_name(), // entity.has_attributes(), // entity.get_children(), + // ty.get_kind(), // ty, // ); None From b79667a54892d24a3f5dd8d66028964c52bee669 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 31 Oct 2022 17:09:43 +0100 Subject: [PATCH 086/131] Add function parsing --- crates/header-translator/src/lib.rs | 4 ++ crates/header-translator/src/stmt.rs | 102 ++++++++++++++++++++++++--- 2 files changed, 95 insertions(+), 11 deletions(-) diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index f7398e4cd..8c74be960 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -58,6 +58,10 @@ impl RustFile { Stmt::VarDecl { name, .. } => { self.declared_types.insert(name.clone()); } + Stmt::FnDecl { .. } => { + // TODO + // self.declared_types.insert(name.clone()); + } Stmt::AliasDecl { name, .. } => { self.declared_types.insert(name.clone()); } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 97a5e8b29..7bf720c3b 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -8,7 +8,7 @@ use crate::config::{ClassData, Config}; use crate::expr::Expr; use crate::method::Method; use crate::property::Property; -use crate::rust_type::{GenericType, RustType, RustTypeStatic}; +use crate::rust_type::{GenericType, RustType, RustTypeReturn, RustTypeStatic}; use crate::unexposed_macro::UnexposedMacro; #[derive(Debug, Clone)] @@ -215,6 +215,18 @@ pub enum Stmt { ty: RustTypeStatic, value: Option>, }, + /// extern ret name(args*); + /// + /// static inline ret name(args*) { + /// body + /// } + FnDecl { + name: String, + arguments: Vec<(String, RustType)>, + result_type: RustTypeReturn, + // Some -> inline function. + body: Option<()>, + }, /// typedef Type TypedefName; AliasDecl { name: String, type_: RustType }, // /// typedef struct Name { fields } TypedefName; @@ -519,16 +531,54 @@ impl Stmt { Some(Self::VarDecl { name, ty, value }) } EntityKind::FunctionDecl => { - // println!( - // "function: {:?}, {:?}, {:?}, {:?}, {:#?}, {:#?}", - // entity.get_display_name(), - // entity.get_name(), - // entity.is_static_method(), - // entity.is_inline_function(), - // entity.has_attributes(), - // entity.get_children(), - // ); - None + let name = entity.get_name().expect("function name"); + + if entity.is_variadic() { + println!("can't handle variadic function {name}"); + return None; + } + + let result_type = entity.get_result_type().expect("function result type"); + let result_type = RustTypeReturn::parse(result_type); + let mut arguments = Vec::new(); + + assert!( + !entity.is_static_method(), + "unexpected static method {name}" + ); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::UnexposedAttr => { + if let Some(macro_) = UnexposedMacro::parse(&entity) { + panic!("unexpected function attribute: {macro_:?}"); + } + } + EntityKind::ObjCClassRef | EntityKind::TypeRef => {} + EntityKind::ParmDecl => { + // Could also be retrieved via. `get_arguments` + let name = entity.get_name().unwrap_or_else(|| "_".into()); + let ty = entity.get_type().expect("function argument type"); + let ty = RustType::parse_argument(ty, false); + arguments.push((name, ty)) + } + _ => panic!("unknown function child in {name}: {entity:?}"), + }; + EntityVisitResult::Continue + }); + + let body = if entity.is_inline_function() { + Some(()) + } else { + None + }; + + Some(Self::FnDecl { + name, + arguments, + result_type, + body, + }) } EntityKind::UnionDecl => { // println!( @@ -696,6 +746,36 @@ impl fmt::Display for Stmt { } => { writeln!(f, "static {name}: {ty} = {expr};")?; } + Self::FnDecl { + name: _, + arguments: _, + result_type: _, + body: None, + } => { + // TODO + // writeln!(f, r#"extern "C" {{"#)?; + // write!(f, " fn {name}(")?; + // for (param, arg_ty) in arguments { + // write!(f, "{}: {arg_ty},", handle_reserved(¶m))?; + // } + // writeln!(f, "){result_type};")?; + // writeln!(f, "}}")?; + } + Self::FnDecl { + name: _, + arguments: _, + result_type: _, + body: Some(_body), + } => { + // TODO + // write!(f, "unsafe fn {name}(")?; + // for (param, arg_ty) in arguments { + // write!(f, "{}: {arg_ty},", handle_reserved(¶m))?; + // } + // writeln!(f, "){result_type} {{")?; + // writeln!(f, " todo!()")?; + // writeln!(f, "}}")?; + } Self::AliasDecl { name, type_ } => { writeln!(f, "pub type {name} = {type_};")?; } From 533ae2486ad3b79759885ccd872bfa7ca0a19f0b Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 16:22:17 +0100 Subject: [PATCH 087/131] Fix generic struct generation --- crates/header-translator/src/stmt.rs | 12 +++++++++++- .../generated/AppKit/NSCandidateListTouchBarItem.rs | 4 +++- .../src/generated/AppKit/NSDiffableDataSource.rs | 10 ++++++++-- crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs | 4 +++- .../AppKit/NSTableViewDiffableDataSource.rs | 5 ++++- crates/icrate/src/generated/Foundation/NSArray.rs | 8 ++++++-- crates/icrate/src/generated/Foundation/NSCache.rs | 5 ++++- .../icrate/src/generated/Foundation/NSDictionary.rs | 10 ++++++++-- .../icrate/src/generated/Foundation/NSEnumerator.rs | 4 +++- .../icrate/src/generated/Foundation/NSFileManager.rs | 4 +++- .../icrate/src/generated/Foundation/NSHashTable.rs | 4 +++- crates/icrate/src/generated/Foundation/NSMapTable.rs | 5 ++++- .../icrate/src/generated/Foundation/NSMeasurement.rs | 4 +++- .../Foundation/NSOrderedCollectionChange.rs | 4 +++- .../Foundation/NSOrderedCollectionDifference.rs | 4 +++- .../icrate/src/generated/Foundation/NSOrderedSet.rs | 8 ++++++-- crates/icrate/src/generated/Foundation/NSSet.rs | 12 +++++++++--- 17 files changed, 84 insertions(+), 23 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 7bf720c3b..3f929a2b4 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -632,7 +632,17 @@ impl fmt::Display for Stmt { writeln!(f, "{macro_name}!(")?; writeln!(f, " #[derive(Debug)]")?; - writeln!(f, " pub struct {name}{generic_params};")?; + write!(f, " pub struct {name}{generic_params}")?; + if generics.is_empty() { + writeln!(f, ";")?; + } else { + writeln!(f, " {{")?; + for (i, generic) in generics.iter().enumerate() { + // Invariant over the generic (for now) + writeln!(f, "_inner{i}: PhantomData<*mut {generic}>,")?; + } + writeln!(f, "}}")?; + } writeln!(f, "")?; writeln!( f, diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index 036323b83..e2d7ff8dc 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -7,7 +7,9 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSCandidateListTouchBarItem; + pub struct NSCandidateListTouchBarItem { + _inner0: PhantomData<*mut CandidateType>, + } unsafe impl ClassType for NSCandidateListTouchBarItem { type Super = NSTouchBarItem; diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index d012a3c4e..c9a4e8f8e 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -10,7 +10,10 @@ __inner_extern_class!( pub struct NSDiffableDataSourceSnapshot< SectionIdentifierType: Message, ItemIdentifierType: Message, - >; + > { + _inner0: PhantomData<*mut SectionIdentifierType>, + _inner1: PhantomData<*mut ItemIdentifierType>, + } unsafe impl ClassType for NSDiffableDataSourceSnapshot @@ -162,7 +165,10 @@ __inner_extern_class!( pub struct NSCollectionViewDiffableDataSource< SectionIdentifierType: Message, ItemIdentifierType: Message, - >; + > { + _inner0: PhantomData<*mut SectionIdentifierType>, + _inner1: PhantomData<*mut ItemIdentifierType>, + } unsafe impl ClassType for NSCollectionViewDiffableDataSource diff --git a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs index c1d387ea1..21bfc6dca 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs @@ -7,7 +7,9 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSLayoutAnchor; + pub struct NSLayoutAnchor { + _inner0: PhantomData<*mut AnchorType>, + } unsafe impl ClassType for NSLayoutAnchor { type Super = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs index 0378909f2..5b0bf7e60 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -10,7 +10,10 @@ __inner_extern_class!( pub struct NSTableViewDiffableDataSource< SectionIdentifierType: Message, ItemIdentifierType: Message, - >; + > { + _inner0: PhantomData<*mut SectionIdentifierType>, + _inner1: PhantomData<*mut ItemIdentifierType>, + } unsafe impl ClassType for NSTableViewDiffableDataSource diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index d0450e2ec..f3f0c4418 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -7,7 +7,9 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSArray; + pub struct NSArray { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSArray { type Super = NSObject; @@ -367,7 +369,9 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] - pub struct NSMutableArray; + pub struct NSMutableArray { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSMutableArray { type Super = NSArray; diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index b01b9fc0a..7e77df21f 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -7,7 +7,10 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSCache; + pub struct NSCache { + _inner0: PhantomData<*mut KeyType>, + _inner1: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSCache { type Super = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index e507d1cac..104602862 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -7,7 +7,10 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSDictionary; + pub struct NSDictionary { + _inner0: PhantomData<*mut KeyType>, + _inner1: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSDictionary { type Super = NSObject; @@ -255,7 +258,10 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] - pub struct NSMutableDictionary; + pub struct NSMutableDictionary { + _inner0: PhantomData<*mut KeyType>, + _inner1: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSMutableDictionary diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 9a8318f13..c750b4cf8 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -9,7 +9,9 @@ pub type NSFastEnumeration = NSObject; __inner_extern_class!( #[derive(Debug)] - pub struct NSEnumerator; + pub struct NSEnumerator { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSEnumerator { type Super = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index b2fc2e052..a14455bb4 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -511,7 +511,9 @@ pub type NSFileManagerDelegate = NSObject; __inner_extern_class!( #[derive(Debug)] - pub struct NSDirectoryEnumerator; + pub struct NSDirectoryEnumerator { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSDirectoryEnumerator { type Super = NSEnumerator; diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index af7dcbcd6..d0f6f7769 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -21,7 +21,9 @@ pub type NSHashTableOptions = NSUInteger; __inner_extern_class!( #[derive(Debug)] - pub struct NSHashTable; + pub struct NSHashTable { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSHashTable { type Super = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 85d8bb577..f563fdc4e 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -20,7 +20,10 @@ pub type NSMapTableOptions = NSUInteger; __inner_extern_class!( #[derive(Debug)] - pub struct NSMapTable; + pub struct NSMapTable { + _inner0: PhantomData<*mut KeyType>, + _inner1: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSMapTable { type Super = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index 1fe9bf72b..8bb584bf9 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -7,7 +7,9 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSMeasurement; + pub struct NSMeasurement { + _inner0: PhantomData<*mut UnitType>, + } unsafe impl ClassType for NSMeasurement { type Super = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 272d0499b..a5bb8570d 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -11,7 +11,9 @@ pub const NSCollectionChangeRemove: NSCollectionChangeType = 1; __inner_extern_class!( #[derive(Debug)] - pub struct NSOrderedCollectionChange; + pub struct NSOrderedCollectionChange { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSOrderedCollectionChange { type Super = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index bd98935bd..a9b5e2fbc 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -15,7 +15,9 @@ pub const NSOrderedCollectionDifferenceCalculationInferMoves: __inner_extern_class!( #[derive(Debug)] - pub struct NSOrderedCollectionDifference; + pub struct NSOrderedCollectionDifference { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSOrderedCollectionDifference { type Super = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 195fda30c..be07db85e 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -7,7 +7,9 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSOrderedSet; + pub struct NSOrderedSet { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSOrderedSet { type Super = NSObject; @@ -319,7 +321,9 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] - pub struct NSMutableOrderedSet; + pub struct NSMutableOrderedSet { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSMutableOrderedSet { type Super = NSOrderedSet; diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index 33caf22ea..ced9a70a7 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -7,7 +7,9 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSSet; + pub struct NSSet { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSSet { type Super = NSObject; @@ -157,7 +159,9 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] - pub struct NSMutableSet; + pub struct NSMutableSet { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSMutableSet { type Super = NSSet; @@ -216,7 +220,9 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] - pub struct NSCountedSet; + pub struct NSCountedSet { + _inner0: PhantomData<*mut ObjectType>, + } unsafe impl ClassType for NSCountedSet { type Super = NSMutableSet; From 75e30824f4b02421bb9afd4fb0dd16d5439193bf Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 16:32:10 +0100 Subject: [PATCH 088/131] Make &Class as return type static --- crates/header-translator/src/rust_type.rs | 8 ++++++++ crates/icrate/src/generated/AppKit/NSBrowser.rs | 4 ++-- .../src/generated/AppKit/NSCollectionViewLayout.rs | 4 ++-- crates/icrate/src/generated/AppKit/NSControl.rs | 2 +- .../src/generated/AppKit/NSDocumentController.rs | 2 +- crates/icrate/src/generated/AppKit/NSImageRep.rs | 10 ++++++---- .../icrate/src/generated/AppKit/NSKeyValueBinding.rs | 5 ++++- crates/icrate/src/generated/AppKit/NSMatrix.rs | 2 +- .../icrate/src/generated/AppKit/NSObjectController.rs | 2 +- crates/icrate/src/generated/AppKit/NSPathCell.rs | 2 +- crates/icrate/src/generated/AppKit/NSRuleEditor.rs | 2 +- crates/icrate/src/generated/AppKit/NSScrollView.rs | 2 +- crates/icrate/src/generated/AppKit/NSScrubberLayout.rs | 2 +- crates/icrate/src/generated/AppKit/NSTextAttachment.rs | 2 +- crates/icrate/src/generated/Foundation/NSArchiver.rs | 2 +- crates/icrate/src/generated/Foundation/NSBundle.rs | 4 ++-- .../icrate/src/generated/Foundation/NSKeyedArchiver.rs | 8 ++++---- crates/icrate/src/generated/Foundation/NSObject.rs | 2 +- crates/icrate/src/generated/Foundation/NSPortCoder.rs | 2 +- crates/icrate/src/generated/Foundation/NSProxy.rs | 2 +- crates/icrate/src/generated/Foundation/NSURLHandle.rs | 2 +- .../src/generated/Foundation/NSValueTransformer.rs | 2 +- .../icrate/src/generated/Foundation/NSXMLDocument.rs | 2 +- 23 files changed, 44 insertions(+), 31 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 298abcec8..d6f0ef5be 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -747,6 +747,14 @@ impl fmt::Display for RustTypeReturn { write!(f, " -> Option>") } } + RustType::Class { nullability } => { + // SAFETY: TODO + if *nullability == Nullability::NonNull { + write!(f, "-> &'static Class") + } else { + write!(f, "-> Option<&'static Class>") + } + } type_ => write!(f, " -> {type_}"), } } diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index 67c75676a..522bc875a 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -32,7 +32,7 @@ extern_class!( extern_methods!( unsafe impl NSBrowser { #[method(cellClass)] - pub unsafe fn cellClass() -> &Class; + pub unsafe fn cellClass() -> &'static Class; #[method(loadColumnZero)] pub unsafe fn loadColumnZero(&self); @@ -448,7 +448,7 @@ extern_methods!( pub unsafe fn setMatrixClass(&self, factoryId: &Class); #[method(matrixClass)] - pub unsafe fn matrixClass(&self) -> &Class; + pub unsafe fn matrixClass(&self) -> &'static Class; #[method(columnOfMatrix:)] pub unsafe fn columnOfMatrix(&self, matrix: &NSMatrix) -> NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs index 5476e22b1..653bee041 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -232,10 +232,10 @@ extern_methods!( /// NSSubclassingHooks unsafe impl NSCollectionViewLayout { #[method(layoutAttributesClass)] - pub unsafe fn layoutAttributesClass() -> &Class; + pub unsafe fn layoutAttributesClass() -> &'static Class; #[method(invalidationContextClass)] - pub unsafe fn invalidationContextClass() -> &Class; + pub unsafe fn invalidationContextClass() -> &'static Class; #[method(prepareLayout)] pub unsafe fn prepareLayout(&self); diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index f791abcfa..845138c19 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -266,7 +266,7 @@ extern_methods!( ); #[method(cellClass)] - pub unsafe fn cellClass() -> Option<&Class>; + pub unsafe fn cellClass() -> Option<&'static Class>; #[method(setCellClass:)] pub unsafe fn setCellClass(cellClass: Option<&Class>); diff --git a/crates/icrate/src/generated/AppKit/NSDocumentController.rs b/crates/icrate/src/generated/AppKit/NSDocumentController.rs index c55d2e609..0058053aa 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentController.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentController.rs @@ -206,7 +206,7 @@ extern_methods!( pub unsafe fn documentClassNames(&self) -> Id, Shared>; #[method(documentClassForType:)] - pub unsafe fn documentClassForType(&self, typeName: &NSString) -> Option<&Class>; + pub unsafe fn documentClassForType(&self, typeName: &NSString) -> Option<&'static Class>; #[method_id(displayNameForType:)] pub unsafe fn displayNameForType( diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index 451998a75..c6094b3da 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -109,16 +109,18 @@ extern_methods!( pub unsafe fn registeredImageRepClasses() -> Id, Shared>; #[method(imageRepClassForFileType:)] - pub unsafe fn imageRepClassForFileType(type_: &NSString) -> Option<&Class>; + pub unsafe fn imageRepClassForFileType(type_: &NSString) -> Option<&'static Class>; #[method(imageRepClassForPasteboardType:)] - pub unsafe fn imageRepClassForPasteboardType(type_: &NSPasteboardType) -> Option<&Class>; + pub unsafe fn imageRepClassForPasteboardType( + type_: &NSPasteboardType, + ) -> Option<&'static Class>; #[method(imageRepClassForType:)] - pub unsafe fn imageRepClassForType(type_: &NSString) -> Option<&Class>; + pub unsafe fn imageRepClassForType(type_: &NSString) -> Option<&'static Class>; #[method(imageRepClassForData:)] - pub unsafe fn imageRepClassForData(data: &NSData) -> Option<&Class>; + pub unsafe fn imageRepClassForData(data: &NSData) -> Option<&'static Class>; #[method(canInitWithData:)] pub unsafe fn canInitWithData(data: &NSData) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index 36c7c637c..fe4da88ef 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -85,7 +85,10 @@ extern_methods!( pub unsafe fn exposedBindings(&self) -> Id, Shared>; #[method(valueClassForBinding:)] - pub unsafe fn valueClassForBinding(&self, binding: &NSBindingName) -> Option<&Class>; + pub unsafe fn valueClassForBinding( + &self, + binding: &NSBindingName, + ) -> Option<&'static Class>; #[method(bind:toObject:withKeyPath:options:)] pub unsafe fn bind_toObject_withKeyPath_options( diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index 58dda0431..639a7b179 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -46,7 +46,7 @@ extern_methods!( ) -> Id; #[method(cellClass)] - pub unsafe fn cellClass(&self) -> &Class; + pub unsafe fn cellClass(&self) -> &'static Class; #[method(setCellClass:)] pub unsafe fn setCellClass(&self, cellClass: &Class); diff --git a/crates/icrate/src/generated/AppKit/NSObjectController.rs b/crates/icrate/src/generated/AppKit/NSObjectController.rs index daab6325e..cacf4b23f 100644 --- a/crates/icrate/src/generated/AppKit/NSObjectController.rs +++ b/crates/icrate/src/generated/AppKit/NSObjectController.rs @@ -44,7 +44,7 @@ extern_methods!( pub unsafe fn prepareContent(&self); #[method(objectClass)] - pub unsafe fn objectClass(&self) -> Option<&Class>; + pub unsafe fn objectClass(&self) -> Option<&'static Class>; #[method(setObjectClass:)] pub unsafe fn setObjectClass(&self, objectClass: Option<&Class>); diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs index d77f4540d..58234c60b 100644 --- a/crates/icrate/src/generated/AppKit/NSPathCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -49,7 +49,7 @@ extern_methods!( pub unsafe fn setDelegate(&self, delegate: Option<&NSPathCellDelegate>); #[method(pathComponentCellClass)] - pub unsafe fn pathComponentCellClass() -> &Class; + pub unsafe fn pathComponentCellClass() -> &'static Class; #[method_id(pathComponentCells)] pub unsafe fn pathComponentCells(&self) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index 3378747ff..3647af132 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -180,7 +180,7 @@ extern_methods!( ); #[method(rowClass)] - pub unsafe fn rowClass(&self) -> &Class; + pub unsafe fn rowClass(&self) -> &'static Class; #[method(setRowClass:)] pub unsafe fn setRowClass(&self, rowClass: &Class); diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index 31dae38e5..1c05e11ce 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -309,7 +309,7 @@ extern_methods!( /// NSRulerSupport unsafe impl NSScrollView { #[method(rulerViewClass)] - pub unsafe fn rulerViewClass() -> Option<&Class>; + pub unsafe fn rulerViewClass() -> Option<&'static Class>; #[method(setRulerViewClass:)] pub unsafe fn setRulerViewClass(rulerViewClass: Option<&Class>); diff --git a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs index a9a84a5ff..ea994c17a 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs @@ -51,7 +51,7 @@ extern_class!( extern_methods!( unsafe impl NSScrubberLayout { #[method(layoutAttributesClass)] - pub unsafe fn layoutAttributesClass() -> &Class; + pub unsafe fn layoutAttributesClass() -> &'static Class; #[method_id(scrubber)] pub unsafe fn scrubber(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index 154016b2d..a41f6f29a 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -80,7 +80,7 @@ extern_methods!( #[method(textAttachmentViewProviderClassForFileType:)] pub unsafe fn textAttachmentViewProviderClassForFileType( fileType: &NSString, - ) -> Option<&Class>; + ) -> Option<&'static Class>; #[method(registerTextAttachmentViewProviderClass:forFileType:)] pub unsafe fn registerTextAttachmentViewProviderClass_forFileType( diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index aa7362689..1a64fe5d5 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -117,7 +117,7 @@ extern_methods!( /// NSArchiverCallback unsafe impl NSObject { #[method(classForArchiver)] - pub unsafe fn classForArchiver(&self) -> Option<&Class>; + pub unsafe fn classForArchiver(&self) -> Option<&'static Class>; #[method_id(replacementObjectForArchiver:)] pub unsafe fn replacementObjectForArchiver( diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 14bcfbaef..47257f360 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -253,10 +253,10 @@ extern_methods!( ) -> Option>; #[method(classNamed:)] - pub unsafe fn classNamed(&self, className: &NSString) -> Option<&Class>; + pub unsafe fn classNamed(&self, className: &NSString) -> Option<&'static Class>; #[method(principalClass)] - pub unsafe fn principalClass(&self) -> Option<&Class>; + pub unsafe fn principalClass(&self) -> Option<&'static Class>; #[method_id(preferredLocalizations)] pub unsafe fn preferredLocalizations(&self) -> Id, Shared>; diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 6b8d2b1ad..769c728cb 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -217,10 +217,10 @@ extern_methods!( pub unsafe fn setClass_forClassName(&self, cls: Option<&Class>, codedName: &NSString); #[method(classForClassName:)] - pub unsafe fn classForClassName(codedName: &NSString) -> Option<&Class>; + pub unsafe fn classForClassName(codedName: &NSString) -> Option<&'static Class>; #[method(classForClassName:)] - pub unsafe fn classForClassName(&self, codedName: &NSString) -> Option<&Class>; + pub unsafe fn classForClassName(&self, codedName: &NSString) -> Option<&'static Class>; #[method(containsValueForKey:)] pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; @@ -278,7 +278,7 @@ extern_methods!( /// NSKeyedArchiverObjectSubstitution unsafe impl NSObject { #[method(classForKeyedArchiver)] - pub unsafe fn classForKeyedArchiver(&self) -> Option<&Class>; + pub unsafe fn classForKeyedArchiver(&self) -> Option<&'static Class>; #[method_id(replacementObjectForKeyedArchiver:)] pub unsafe fn replacementObjectForKeyedArchiver( @@ -295,6 +295,6 @@ extern_methods!( /// NSKeyedUnarchiverObjectSubstitution unsafe impl NSObject { #[method(classForKeyedUnarchiver)] - pub unsafe fn classForKeyedUnarchiver() -> &Class; + pub unsafe fn classForKeyedUnarchiver() -> &'static Class; } ); diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index f48e020f7..0c0278fce 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -23,7 +23,7 @@ extern_methods!( pub unsafe fn setVersion(aVersion: NSInteger); #[method(classForCoder)] - pub unsafe fn classForCoder(&self) -> &Class; + pub unsafe fn classForCoder(&self) -> &'static Class; #[method_id(replacementObjectForCoder:)] pub unsafe fn replacementObjectForCoder( diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index 539c65720..37c2360f2 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -55,7 +55,7 @@ extern_methods!( /// NSDistributedObjects unsafe impl NSObject { #[method(classForPortCoder)] - pub unsafe fn classForPortCoder(&self) -> &Class; + pub unsafe fn classForPortCoder(&self) -> &'static Class; #[method_id(replacementObjectForPortCoder:)] pub unsafe fn replacementObjectForPortCoder( diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 185181637..498d622d1 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -23,7 +23,7 @@ extern_methods!( pub unsafe fn allocWithZone(zone: *mut NSZone) -> Id; #[method(class)] - pub unsafe fn class() -> &Class; + pub unsafe fn class() -> &'static Class; #[method(forwardInvocation:)] pub unsafe fn forwardInvocation(&self, invocation: &NSInvocation); diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index afad211d8..142dbb030 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -72,7 +72,7 @@ extern_methods!( pub unsafe fn registerURLHandleClass(anURLHandleSubclass: Option<&Class>); #[method(URLHandleClassForURL:)] - pub unsafe fn URLHandleClassForURL(anURL: Option<&NSURL>) -> Option<&Class>; + pub unsafe fn URLHandleClassForURL(anURL: Option<&NSURL>) -> Option<&'static Class>; #[method(status)] pub unsafe fn status(&self) -> NSURLHandleStatus; diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index cb186d03d..b2fa3fbe6 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -57,7 +57,7 @@ extern_methods!( pub unsafe fn valueTransformerNames() -> Id, Shared>; #[method(transformedValueClass)] - pub unsafe fn transformedValueClass() -> &Class; + pub unsafe fn transformedValueClass() -> &'static Class; #[method(allowsReverseTransformation)] pub unsafe fn allowsReverseTransformation() -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index a484b888f..0dc899d37 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -53,7 +53,7 @@ extern_methods!( ) -> Id; #[method(replacementClassForClass:)] - pub unsafe fn replacementClassForClass(cls: &Class) -> &Class; + pub unsafe fn replacementClassForClass(cls: &Class) -> &'static Class; #[method_id(characterEncoding)] pub unsafe fn characterEncoding(&self) -> Option>; From 13d6f1c667b8f8696b00152705e857f0e02d818a Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 18:27:52 +0100 Subject: [PATCH 089/131] Trim unnecessary parentheses --- crates/header-translator/src/expr.rs | 9 +++++ .../src/generated/AppKit/NSApplication.rs | 40 +++++++++---------- .../generated/AppKit/NSAttributedString.rs | 8 ++-- .../src/generated/AppKit/NSBitmapImageRep.rs | 8 ++-- .../icrate/src/generated/AppKit/NSDragging.rs | 2 +- .../src/generated/AppKit/NSFontCollection.rs | 6 +-- .../src/generated/AppKit/NSFontDescriptor.rs | 14 +++---- .../src/generated/AppKit/NSGlyphGenerator.rs | 6 +-- .../icrate/src/generated/AppKit/NSGradient.rs | 4 +- .../generated/AppKit/NSLayoutConstraint.rs | 20 +++++----- .../src/generated/AppKit/NSLayoutManager.rs | 20 +++++----- .../src/generated/AppKit/NSStatusItem.rs | 4 +- .../src/generated/AppKit/NSStringDrawing.rs | 4 +- .../src/generated/AppKit/NSTableColumn.rs | 4 +- crates/icrate/src/generated/AppKit/NSText.rs | 4 +- .../generated/AppKit/NSTextContentManager.rs | 2 +- .../generated/AppKit/NSTextLayoutFragment.rs | 8 ++-- .../generated/AppKit/NSTextLayoutManager.rs | 10 ++--- .../icrate/src/generated/AppKit/NSTextList.rs | 2 +- .../AppKit/NSTextSelectionNavigation.rs | 6 +-- .../src/generated/AppKit/NSTextStorage.rs | 4 +- crates/icrate/src/generated/AppKit/NSTouch.rs | 4 +- .../src/generated/AppKit/NSTypesetter.rs | 12 +++--- .../src/generated/Foundation/NSArray.rs | 6 +-- .../Foundation/NSAttributedString.rs | 4 +- .../src/generated/Foundation/NSCalendar.rs | 22 +++++----- .../Foundation/NSDateComponentsFormatter.rs | 16 ++++---- .../NSDistributedNotificationCenter.rs | 4 +- .../Foundation/NSJSONSerialization.rs | 18 ++++----- .../Foundation/NSMeasurementFormatter.rs | 8 ++-- .../src/generated/Foundation/NSObjCRuntime.rs | 8 ++-- .../NSOrderedCollectionDifference.rs | 6 +-- .../NSPersonNameComponentsFormatter.rs | 3 +- .../Foundation/NSPointerFunctions.rs | 26 ++++++------ .../icrate/src/generated/Foundation/NSPort.rs | 4 +- .../src/generated/Foundation/NSProcessInfo.rs | 12 +++--- .../Foundation/NSTextCheckingResult.rs | 3 +- .../icrate/src/generated/Foundation/NSURL.rs | 21 +++++----- .../generated/Foundation/NSXMLNodeOptions.rs | 8 ++-- .../generated/Foundation/NSXPCConnection.rs | 2 +- .../icrate/src/generated/Foundation/NSZone.rs | 4 +- 41 files changed, 190 insertions(+), 186 deletions(-) diff --git a/crates/header-translator/src/expr.rs b/crates/header-translator/src/expr.rs index d63fdb687..6fd56f44f 100644 --- a/crates/header-translator/src/expr.rs +++ b/crates/header-translator/src/expr.rs @@ -102,6 +102,7 @@ impl Expr { } } + // Trim casts s = s .trim_start_matches("(NSBoxType)") .trim_start_matches("(NSBezelStyle)") @@ -109,6 +110,14 @@ impl Expr { .trim_start_matches("(NSWindowButton)") .to_string(); + // Trim unnecessary parentheses + if s.starts_with('(') + && s.ends_with(')') + && s.chars().filter(|&c| c == '(' || c == ')').count() == 2 + { + s = s.trim_start_matches("(").trim_end_matches(")").to_string(); + } + Some(Self { s }) } } diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 76bba56c2..517243399 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -139,40 +139,40 @@ extern "C" { pub type NSModalResponse = NSInteger; -static NSModalResponseStop: NSModalResponse = (-1000); +static NSModalResponseStop: NSModalResponse = -1000; -static NSModalResponseAbort: NSModalResponse = (-1001); +static NSModalResponseAbort: NSModalResponse = -1001; -static NSModalResponseContinue: NSModalResponse = (-1002); +static NSModalResponseContinue: NSModalResponse = -1002; pub const NSUpdateWindowsRunLoopOrdering: i32 = 500000; pub type NSApplicationPresentationOptions = NSUInteger; pub const NSApplicationPresentationDefault: NSApplicationPresentationOptions = 0; -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 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); + 1 << 5; +pub const NSApplicationPresentationDisableForceQuit: NSApplicationPresentationOptions = 1 << 6; pub const NSApplicationPresentationDisableSessionTermination: NSApplicationPresentationOptions = - (1 << 7); + 1 << 7; pub const NSApplicationPresentationDisableHideApplication: NSApplicationPresentationOptions = - (1 << 8); + 1 << 8; pub const NSApplicationPresentationDisableMenuBarTransparency: NSApplicationPresentationOptions = - (1 << 9); -pub const NSApplicationPresentationFullScreen: NSApplicationPresentationOptions = (1 << 10); -pub const NSApplicationPresentationAutoHideToolbar: NSApplicationPresentationOptions = (1 << 11); + 1 << 9; +pub const NSApplicationPresentationFullScreen: NSApplicationPresentationOptions = 1 << 10; +pub const NSApplicationPresentationAutoHideToolbar: NSApplicationPresentationOptions = 1 << 11; pub const NSApplicationPresentationDisableCursorLocationAssistance: - NSApplicationPresentationOptions = (1 << 12); + NSApplicationPresentationOptions = 1 << 12; pub type NSApplicationOcclusionState = NSUInteger; pub const NSApplicationOcclusionStateVisible: NSApplicationOcclusionState = 1 << 1; pub type NSWindowListOptions = NSInteger; -pub const NSWindowListOrderedFrontToBack: NSWindowListOptions = (1 << 0); +pub const NSWindowListOrderedFrontToBack: NSWindowListOptions = 1 << 0; extern "C" { static NSApp: Option<&'static NSApplication>; @@ -714,9 +714,9 @@ extern "C" { static NSApplicationDidChangeOcclusionStateNotification: &'static NSNotificationName; } -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/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index ab26e3f75..6e592ee77 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -134,8 +134,8 @@ pub const NSUnderlineStylePatternDashDotDot: NSUnderlineStyle = 0x0400; pub const NSUnderlineStyleByWord: NSUnderlineStyle = 0x8000; pub type NSWritingDirectionFormatType = NSInteger; -pub const NSWritingDirectionEmbedding: NSWritingDirectionFormatType = (0 << 1); -pub const NSWritingDirectionOverride: NSWritingDirectionFormatType = (1 << 1); +pub const NSWritingDirectionEmbedding: NSWritingDirectionFormatType = 0 << 1; +pub const NSWritingDirectionOverride: NSWritingDirectionFormatType = 1 << 1; pub type NSTextEffectStyle = NSString; @@ -144,8 +144,8 @@ extern "C" { } pub type NSSpellingState = NSInteger; -pub const NSSpellingStateSpellingFlag: NSSpellingState = (1 << 0); -pub const NSSpellingStateGrammarFlag: NSSpellingState = (1 << 1); +pub const NSSpellingStateSpellingFlag: NSSpellingState = 1 << 0; +pub const NSSpellingStateGrammarFlag: NSSpellingState = 1 << 1; extern_methods!( /// NSAttributedStringAttributeFixing diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index 8a41909bb..e4d0c279a 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -35,10 +35,10 @@ pub type NSBitmapFormat = NSUInteger; 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 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/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs index 536863885..eed800538 100644 --- a/crates/icrate/src/generated/AppKit/NSDragging.rs +++ b/crates/icrate/src/generated/AppKit/NSDragging.rs @@ -32,7 +32,7 @@ pub type NSDraggingItemEnumerationOptions = NSUInteger; pub const NSDraggingItemEnumerationConcurrent: NSDraggingItemEnumerationOptions = NSEnumerationConcurrent; pub const NSDraggingItemEnumerationClearNonenumeratedImages: NSDraggingItemEnumerationOptions = - (1 << 16); + 1 << 16; pub type NSSpringLoadingHighlight = NSInteger; pub const NSSpringLoadingHighlightNone: NSSpringLoadingHighlight = 0; diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index 946e845dc..0c8b4a499 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/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 << 0); -pub const NSFontCollectionVisibilityUser: NSFontCollectionVisibility = (1 << 1); -pub const NSFontCollectionVisibilityComputer: NSFontCollectionVisibility = (1 << 2); +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/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 79c817627..948c29718 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -368,13 +368,13 @@ 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); +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 "C" { static NSFontColorAttribute: &'static NSString; diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index 9482e9695..33143385f 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/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 << 0); -pub const NSShowInvisibleGlyphs: i32 = (1 << 1); -pub const NSWantsBidiLevels: i32 = (1 << 2); +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/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index c439bd563..3e20f3d4e 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/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 << 0); -pub const NSGradientDrawsAfterEndingLocation: NSGradientDrawingOptions = (1 << 1); +pub const NSGradientDrawsBeforeStartingLocation: NSGradientDrawingOptions = 1 << 0; +pub const NSGradientDrawsAfterEndingLocation: NSGradientDrawingOptions = 1 << 1; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index 7648e8d4b..d05dec7bc 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -45,18 +45,18 @@ pub const NSLayoutAttributeFirstBaseline: NSLayoutAttribute = 12; pub const NSLayoutAttributeNotAnAttribute: NSLayoutAttribute = 0; pub type NSLayoutFormatOptions = NSUInteger; -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 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); + 1 << NSLayoutAttributeLastBaseline; pub const NSLayoutFormatAlignAllFirstBaseline: NSLayoutFormatOptions = - (1 << NSLayoutAttributeFirstBaseline); + 1 << NSLayoutAttributeFirstBaseline; pub const NSLayoutFormatAlignAllBaseline: NSLayoutFormatOptions = NSLayoutFormatAlignAllLastBaseline; pub const NSLayoutFormatAlignmentMask: NSLayoutFormatOptions = 0xFFFF; diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index d39ea0113..f422e5450 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/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 << 0); -pub const NSGlyphPropertyControlCharacter: NSGlyphProperty = (1 << 1); -pub const NSGlyphPropertyElastic: NSGlyphProperty = (1 << 2); -pub const NSGlyphPropertyNonBaseCharacter: NSGlyphProperty = (1 << 3); +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 << 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 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/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs index a9322e544..1da6c722d 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusItem.rs +++ b/crates/icrate/src/generated/AppKit/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 = (1 << 1); -pub const NSStatusItemBehaviorTerminationOnRemoval: NSStatusItemBehavior = (1 << 2); +pub const NSStatusItemBehaviorRemovalAllowed: NSStatusItemBehavior = 1 << 1; +pub const NSStatusItemBehaviorTerminationOnRemoval: NSStatusItemBehavior = 1 << 2; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs index c0c59c902..f09b7bf2f 100644 --- a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs +++ b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs @@ -74,8 +74,8 @@ 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); +pub const NSStringDrawingDisableScreenFontSubstitution: NSStringDrawingOptions = 1 << 2; +pub const NSStringDrawingOneShot: NSStringDrawingOptions = 1 << 4; extern_methods!( /// NSExtendedStringDrawing diff --git a/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs index 155d9d85b..33b78cea7 100644 --- a/crates/icrate/src/generated/AppKit/NSTableColumn.rs +++ b/crates/icrate/src/generated/AppKit/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 << 0); -pub const NSTableColumnUserResizingMask: NSTableColumnResizingOptions = (1 << 1); +pub const NSTableColumnAutoresizingMask: NSTableColumnResizingOptions = 1 << 0; +pub const NSTableColumnUserResizingMask: NSTableColumnResizingOptions = 1 << 1; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index 41472c2f8..daa6e4310 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -297,8 +297,8 @@ pub const NSOtherTextMovement: i32 = 0; pub type NSTextDelegate = NSObject; -pub const NSTextWritingDirectionEmbedding: i32 = (0 << 1); -pub const NSTextWritingDirectionOverride: i32 = (1 << 1); +pub const NSTextWritingDirectionEmbedding: i32 = 0 << 1; +pub const NSTextWritingDirectionOverride: i32 = 1 << 1; static NSLeftTextAlignment: NSTextAlignment = NSTextAlignmentLeft; diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index b06ab58e8..be4d92fd6 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -8,7 +8,7 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextContentManagerEnumerationOptions = NSUInteger; pub const NSTextContentManagerEnumerationOptionsNone: NSTextContentManagerEnumerationOptions = 0; pub const NSTextContentManagerEnumerationOptionsReverse: NSTextContentManagerEnumerationOptions = - (1 << 0); + 1 << 0; pub type NSTextElementProvider = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index 8cf2706cc..1d01b9c06 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -8,13 +8,13 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSTextLayoutFragmentEnumerationOptions = NSUInteger; pub const NSTextLayoutFragmentEnumerationOptionsNone: NSTextLayoutFragmentEnumerationOptions = 0; pub const NSTextLayoutFragmentEnumerationOptionsReverse: NSTextLayoutFragmentEnumerationOptions = - (1 << 0); + 1 << 0; pub const NSTextLayoutFragmentEnumerationOptionsEstimatesSize: - NSTextLayoutFragmentEnumerationOptions = (1 << 1); + NSTextLayoutFragmentEnumerationOptions = 1 << 1; pub const NSTextLayoutFragmentEnumerationOptionsEnsuresLayout: - NSTextLayoutFragmentEnumerationOptions = (1 << 2); + NSTextLayoutFragmentEnumerationOptions = 1 << 2; pub const NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment: - NSTextLayoutFragmentEnumerationOptions = (1 << 3); + NSTextLayoutFragmentEnumerationOptions = 1 << 3; pub type NSTextLayoutFragmentState = NSUInteger; pub const NSTextLayoutFragmentStateNone: NSTextLayoutFragmentState = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index cad2da8fd..8f0409193 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -13,15 +13,15 @@ pub const NSTextLayoutManagerSegmentTypeHighlight: NSTextLayoutManagerSegmentTyp pub type NSTextLayoutManagerSegmentOptions = NSUInteger; pub const NSTextLayoutManagerSegmentOptionsNone: NSTextLayoutManagerSegmentOptions = 0; pub const NSTextLayoutManagerSegmentOptionsRangeNotRequired: NSTextLayoutManagerSegmentOptions = - (1 << 0); + 1 << 0; pub const NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded: - NSTextLayoutManagerSegmentOptions = (1 << 1); + NSTextLayoutManagerSegmentOptions = 1 << 1; pub const NSTextLayoutManagerSegmentOptionsHeadSegmentExtended: NSTextLayoutManagerSegmentOptions = - (1 << 2); + 1 << 2; pub const NSTextLayoutManagerSegmentOptionsTailSegmentExtended: NSTextLayoutManagerSegmentOptions = - (1 << 3); + 1 << 3; pub const NSTextLayoutManagerSegmentOptionsUpstreamAffinity: NSTextLayoutManagerSegmentOptions = - (1 << 4); + 1 << 4; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index db035a667..a4917035b 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -76,7 +76,7 @@ extern "C" { } pub type NSTextListOptions = NSUInteger; -pub const NSTextListPrependEnclosingMarker: NSTextListOptions = (1 << 0); +pub const NSTextListPrependEnclosingMarker: NSTextListOptions = 1 << 0; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index a80b9e214..bc5d9a6ac 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -23,9 +23,9 @@ pub const NSTextSelectionNavigationDestinationContainer: NSTextSelectionNavigati pub const NSTextSelectionNavigationDestinationDocument: NSTextSelectionNavigationDestination = 6; pub type NSTextSelectionNavigationModifier = NSUInteger; -pub const NSTextSelectionNavigationModifierExtend: NSTextSelectionNavigationModifier = (1 << 0); -pub const NSTextSelectionNavigationModifierVisual: NSTextSelectionNavigationModifier = (1 << 1); -pub const NSTextSelectionNavigationModifierMultiple: NSTextSelectionNavigationModifier = (1 << 2); +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/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index a14a49fd0..171f64f11 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/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 << 0); -pub const NSTextStorageEditedCharacters: NSTextStorageEditActions = (1 << 1); +pub const NSTextStorageEditedAttributes: NSTextStorageEditActions = 1 << 0; +pub const NSTextStorageEditedCharacters: NSTextStorageEditActions = 1 << 1; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs index b08fe992b..26252b79c 100644 --- a/crates/icrate/src/generated/AppKit/NSTouch.rs +++ b/crates/icrate/src/generated/AppKit/NSTouch.rs @@ -20,8 +20,8 @@ pub const NSTouchTypeDirect: NSTouchType = 0; pub const NSTouchTypeIndirect: NSTouchType = 1; pub type NSTouchTypeMask = NSUInteger; -pub const NSTouchTypeMaskDirect: NSTouchTypeMask = (1 << NSTouchTypeDirect); -pub const NSTouchTypeMaskIndirect: NSTouchTypeMask = (1 << NSTouchTypeIndirect); +pub const NSTouchTypeMaskDirect: NSTouchTypeMask = 1 << NSTouchTypeDirect; +pub const NSTouchTypeMaskIndirect: NSTouchTypeMask = 1 << NSTouchTypeIndirect; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs index 6d2616f51..b567906c8 100644 --- a/crates/icrate/src/generated/AppKit/NSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSTypesetter.rs @@ -307,12 +307,12 @@ extern_methods!( ); pub type NSTypesetterControlCharacterAction = NSUInteger; -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); +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/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index f3f0c4418..905a838b9 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -40,9 +40,9 @@ extern_methods!( ); pub type NSBinarySearchingOptions = NSUInteger; -pub const NSBinarySearchingFirstEqual: NSBinarySearchingOptions = (1 << 8); -pub const NSBinarySearchingLastEqual: NSBinarySearchingOptions = (1 << 9); -pub const NSBinarySearchingInsertionIndex: NSBinarySearchingOptions = (1 << 10); +pub const NSBinarySearchingFirstEqual: NSBinarySearchingOptions = 1 << 8; +pub const NSBinarySearchingLastEqual: NSBinarySearchingOptions = 1 << 9; +pub const NSBinarySearchingInsertionIndex: NSBinarySearchingOptions = 1 << 10; extern_methods!( /// NSExtendedArray diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index e38098d06..d0a0ef69c 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -31,9 +31,9 @@ extern_methods!( ); pub type NSAttributedStringEnumerationOptions = NSUInteger; -pub const NSAttributedStringEnumerationReverse: NSAttributedStringEnumerationOptions = (1 << 1); +pub const NSAttributedStringEnumerationReverse: NSAttributedStringEnumerationOptions = 1 << 1; pub const NSAttributedStringEnumerationLongestEffectiveRangeNotRequired: - NSAttributedStringEnumerationOptions = (1 << 20); + NSAttributedStringEnumerationOptions = 1 << 20; extern_methods!( /// NSExtendedAttributedString diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index be7a218b6..26434c0ed 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -85,9 +85,9 @@ 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 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; @@ -106,14 +106,14 @@ pub const NSCalendarCalendarUnit: NSCalendarUnit = NSCalendarUnitCalendar; pub const NSTimeZoneCalendarUnit: NSCalendarUnit = NSCalendarUnitTimeZone; pub type NSCalendarOptions = NSUInteger; -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 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 = NSCalendarWrapComponents; diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 23fd4c03e..875b407af 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -15,22 +15,22 @@ pub const NSDateComponentsFormatterUnitsStyleBrief: NSDateComponentsFormatterUni pub type NSDateComponentsFormatterZeroFormattingBehavior = NSUInteger; pub const NSDateComponentsFormatterZeroFormattingBehaviorNone: - NSDateComponentsFormatterZeroFormattingBehavior = (0); + NSDateComponentsFormatterZeroFormattingBehavior = 0; pub const NSDateComponentsFormatterZeroFormattingBehaviorDefault: - NSDateComponentsFormatterZeroFormattingBehavior = (1 << 0); + NSDateComponentsFormatterZeroFormattingBehavior = 1 << 0; pub const NSDateComponentsFormatterZeroFormattingBehaviorDropLeading: - NSDateComponentsFormatterZeroFormattingBehavior = (1 << 1); + NSDateComponentsFormatterZeroFormattingBehavior = 1 << 1; pub const NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle: - NSDateComponentsFormatterZeroFormattingBehavior = (1 << 2); + NSDateComponentsFormatterZeroFormattingBehavior = 1 << 2; pub const NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing: - NSDateComponentsFormatterZeroFormattingBehavior = (1 << 3); + NSDateComponentsFormatterZeroFormattingBehavior = 1 << 3; pub const NSDateComponentsFormatterZeroFormattingBehaviorDropAll: NSDateComponentsFormatterZeroFormattingBehavior = - (NSDateComponentsFormatterZeroFormattingBehaviorDropLeading + NSDateComponentsFormatterZeroFormattingBehaviorDropLeading | NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle - | NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing); + | NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing; pub const NSDateComponentsFormatterZeroFormattingBehaviorPad: - NSDateComponentsFormatterZeroFormattingBehavior = (1 << 16); + NSDateComponentsFormatterZeroFormattingBehavior = 1 << 16; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index a071efa85..c7bbce202 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -18,8 +18,8 @@ pub const NSNotificationSuspensionBehaviorHold: NSNotificationSuspensionBehavior pub const NSNotificationSuspensionBehaviorDeliverImmediately: NSNotificationSuspensionBehavior = 4; pub type NSDistributedNotificationOptions = NSUInteger; -pub const NSDistributedNotificationDeliverImmediately: NSDistributedNotificationOptions = (1 << 0); -pub const NSDistributedNotificationPostToAllSessions: NSDistributedNotificationOptions = (1 << 1); +pub const NSDistributedNotificationDeliverImmediately: NSDistributedNotificationOptions = 1 << 0; +pub const NSDistributedNotificationPostToAllSessions: NSDistributedNotificationOptions = 1 << 1; static NSNotificationDeliverImmediately: NSDistributedNotificationOptions = NSDistributedNotificationDeliverImmediately; diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 0db3c7ab6..573c87a3e 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/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 << 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 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 << 0); -pub const NSJSONWritingSortedKeys: NSJSONWritingOptions = (1 << 1); -pub const NSJSONWritingFragmentsAllowed: NSJSONWritingOptions = (1 << 2); -pub const NSJSONWritingWithoutEscapingSlashes: NSJSONWritingOptions = (1 << 3); +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/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 661106ba4..098fb6299 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -6,12 +6,10 @@ use objc2::rc::{Id, Shared}; use objc2::{extern_class, extern_methods, ClassType}; pub type NSMeasurementFormatterUnitOptions = NSUInteger; -pub const NSMeasurementFormatterUnitOptionsProvidedUnit: NSMeasurementFormatterUnitOptions = - (1 << 0); -pub const NSMeasurementFormatterUnitOptionsNaturalScale: NSMeasurementFormatterUnitOptions = - (1 << 1); +pub const NSMeasurementFormatterUnitOptionsProvidedUnit: NSMeasurementFormatterUnitOptions = 1 << 0; +pub const NSMeasurementFormatterUnitOptionsNaturalScale: NSMeasurementFormatterUnitOptions = 1 << 1; pub const NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit: - NSMeasurementFormatterUnitOptions = (1 << 2); + NSMeasurementFormatterUnitOptions = 1 << 2; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 5594e34a2..0c262e0b5 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -19,12 +19,12 @@ pub const NSOrderedSame: NSComparisonResult = 0; pub const NSOrderedDescending: NSComparisonResult = 1; pub type NSEnumerationOptions = NSUInteger; -pub const NSEnumerationConcurrent: NSEnumerationOptions = (1 << 0); -pub const NSEnumerationReverse: NSEnumerationOptions = (1 << 1); +pub const NSEnumerationConcurrent: NSEnumerationOptions = 1 << 0; +pub const NSEnumerationReverse: NSEnumerationOptions = 1 << 1; pub type NSSortOptions = NSUInteger; -pub const NSSortConcurrent: NSSortOptions = (1 << 0); -pub const NSSortStable: NSSortOptions = (1 << 4); +pub const NSSortConcurrent: NSSortOptions = 1 << 0; +pub const NSSortStable: NSSortOptions = 1 << 4; pub type NSQualityOfService = NSInteger; pub const NSQualityOfServiceUserInteractive: NSQualityOfService = 0x21; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index a9b5e2fbc..09e3d9561 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -7,11 +7,11 @@ use objc2::{extern_class, extern_methods, ClassType}; pub type NSOrderedCollectionDifferenceCalculationOptions = NSUInteger; pub const NSOrderedCollectionDifferenceCalculationOmitInsertedObjects: - NSOrderedCollectionDifferenceCalculationOptions = (1 << 0); + NSOrderedCollectionDifferenceCalculationOptions = 1 << 0; pub const NSOrderedCollectionDifferenceCalculationOmitRemovedObjects: - NSOrderedCollectionDifferenceCalculationOptions = (1 << 1); + NSOrderedCollectionDifferenceCalculationOptions = 1 << 1; pub const NSOrderedCollectionDifferenceCalculationInferMoves: - NSOrderedCollectionDifferenceCalculationOptions = (1 << 2); + NSOrderedCollectionDifferenceCalculationOptions = 1 << 2; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index f9d1ffbcb..eb2ec5bc6 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -13,8 +13,7 @@ pub const NSPersonNameComponentsFormatterStyleLong: NSPersonNameComponentsFormat pub const NSPersonNameComponentsFormatterStyleAbbreviated: NSPersonNameComponentsFormatterStyle = 4; pub type NSPersonNameComponentsFormatterOptions = NSUInteger; -pub const NSPersonNameComponentsFormatterPhonetic: NSPersonNameComponentsFormatterOptions = - (1 << 1); +pub const NSPersonNameComponentsFormatterPhonetic: NSPersonNameComponentsFormatterOptions = 1 << 1; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 0214711c1..b0285a510 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/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 << 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); +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/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index d4644ebf0..b8b991f7c 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -85,8 +85,8 @@ pub type NSPortDelegate = NSObject; pub type NSMachPortOptions = NSUInteger; pub const NSMachPortDeallocateNone: NSMachPortOptions = 0; -pub const NSMachPortDeallocateSendRight: NSMachPortOptions = (1 << 0); -pub const NSMachPortDeallocateReceiveRight: NSMachPortOptions = (1 << 1); +pub const NSMachPortDeallocateSendRight: NSMachPortOptions = 1 << 0; +pub const NSMachPortDeallocateReceiveRight: NSMachPortOptions = 1 << 1; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 79e3df528..bae4c7a8d 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -102,14 +102,14 @@ extern_methods!( ); pub type NSActivityOptions = u64; -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 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); + 0x00FFFFFF | NSActivityIdleSystemSleepDisabled; pub const NSActivityUserInitiatedAllowingIdleSystemSleep: NSActivityOptions = - (NSActivityUserInitiated & !NSActivityIdleSystemSleepDisabled); + NSActivityUserInitiated & !NSActivityIdleSystemSleepDisabled; pub const NSActivityBackground: NSActivityOptions = 0x000000FF; pub const NSActivityLatencyCritical: NSActivityOptions = 0xFF00000000; diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 3e0c5c928..80ac81610 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -24,8 +24,7 @@ pub type NSTextCheckingTypes = u64; pub const NSTextCheckingAllSystemTypes: i32 = 0xffffffff; pub const NSTextCheckingAllCustomTypes: i32 = 0xffffffff << 32; -pub const NSTextCheckingAllTypes: i32 = - (NSTextCheckingAllSystemTypes | NSTextCheckingAllCustomTypes); +pub const NSTextCheckingAllTypes: i32 = NSTextCheckingAllSystemTypes | NSTextCheckingAllCustomTypes; pub type NSTextCheckingKey = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index d8900f1e0..a90420b7a 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -590,21 +590,20 @@ extern "C" { } pub type NSURLBookmarkCreationOptions = NSUInteger; -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 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 = - (1 << 12); -pub const NSURLBookmarkCreationWithoutImplicitSecurityScope: NSURLBookmarkCreationOptions = - (1 << 29); + 1 << 12; +pub const NSURLBookmarkCreationWithoutImplicitSecurityScope: NSURLBookmarkCreationOptions = 1 << 29; pub type NSURLBookmarkResolutionOptions = NSUInteger; -pub const NSURLBookmarkResolutionWithoutUI: NSURLBookmarkResolutionOptions = (1 << 8); -pub const NSURLBookmarkResolutionWithoutMounting: NSURLBookmarkResolutionOptions = (1 << 9); -pub const NSURLBookmarkResolutionWithSecurityScope: NSURLBookmarkResolutionOptions = (1 << 10); +pub const NSURLBookmarkResolutionWithoutUI: NSURLBookmarkResolutionOptions = 1 << 8; +pub const NSURLBookmarkResolutionWithoutMounting: NSURLBookmarkResolutionOptions = 1 << 9; +pub const NSURLBookmarkResolutionWithSecurityScope: NSURLBookmarkResolutionOptions = 1 << 10; pub const NSURLBookmarkResolutionWithoutImplicitStartAccessing: NSURLBookmarkResolutionOptions = - (1 << 15); + 1 << 15; pub type NSURLBookmarkFileCreationOptions = NSUInteger; diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs index d27e91bdf..4498008b0 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -32,10 +32,10 @@ pub const NSXMLNodePreserveDTD: NSXMLNodeOptions = 1 << 26; pub const NSXMLNodePreserveCharacterReferences: NSXMLNodeOptions = 1 << 27; pub const NSXMLNodePromoteSignificantWhitespace: NSXMLNodeOptions = 1 << 28; pub const NSXMLNodePreserveEmptyElements: NSXMLNodeOptions = - (NSXMLNodeExpandEmptyElement | NSXMLNodeCompactEmptyElement); + NSXMLNodeExpandEmptyElement | NSXMLNodeCompactEmptyElement; pub const NSXMLNodePreserveQuotes: NSXMLNodeOptions = - (NSXMLNodeUseSingleQuotes | NSXMLNodeUseDoubleQuotes); -pub const NSXMLNodePreserveAll: NSXMLNodeOptions = (NSXMLNodePreserveNamespaceOrder + NSXMLNodeUseSingleQuotes | NSXMLNodeUseDoubleQuotes; +pub const NSXMLNodePreserveAll: NSXMLNodeOptions = NSXMLNodePreserveNamespaceOrder | NSXMLNodePreserveAttributeOrder | NSXMLNodePreserveEntities | NSXMLNodePreservePrefixes @@ -45,4 +45,4 @@ pub const NSXMLNodePreserveAll: NSXMLNodeOptions = (NSXMLNodePreserveNamespaceOr | NSXMLNodePreserveWhitespace | NSXMLNodePreserveDTD | NSXMLNodePreserveCharacterReferences - | 0xFFF00000); + | 0xFFF00000; diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 8abc51ae4..149e91215 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/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 = (1 << 12); +pub const NSXPCConnectionPrivileged: NSXPCConnectionOptions = 1 << 12; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index 1945db01b..f60213525 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/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 << 0); -pub const NSCollectorDisabledOption: i32 = (1 << 1); +pub const NSScannedOption: i32 = 1 << 0; +pub const NSCollectorDisabledOption: i32 = 1 << 1; From 615c5b289a63b85af7c5f4d8c6bc485ddedb401c Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 20:11:00 +0100 Subject: [PATCH 090/131] Fix generics default parameter --- crates/header-translator/src/stmt.rs | 11 ++++++++++- .../generated/AppKit/NSCandidateListTouchBarItem.rs | 2 +- .../src/generated/AppKit/NSDiffableDataSource.rs | 8 ++++---- crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs | 2 +- .../generated/AppKit/NSTableViewDiffableDataSource.rs | 4 ++-- crates/icrate/src/generated/Foundation/NSArray.rs | 4 ++-- crates/icrate/src/generated/Foundation/NSCache.rs | 2 +- .../icrate/src/generated/Foundation/NSDictionary.rs | 4 ++-- .../icrate/src/generated/Foundation/NSEnumerator.rs | 2 +- .../icrate/src/generated/Foundation/NSFileManager.rs | 2 +- crates/icrate/src/generated/Foundation/NSHashTable.rs | 2 +- crates/icrate/src/generated/Foundation/NSMapTable.rs | 2 +- .../icrate/src/generated/Foundation/NSMeasurement.rs | 2 +- .../generated/Foundation/NSOrderedCollectionChange.rs | 2 +- .../Foundation/NSOrderedCollectionDifference.rs | 2 +- .../icrate/src/generated/Foundation/NSOrderedSet.rs | 4 ++-- crates/icrate/src/generated/Foundation/NSSet.rs | 6 +++--- 17 files changed, 35 insertions(+), 26 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 3f929a2b4..cb3cd77db 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -608,6 +608,15 @@ impl fmt::Display for Stmt { protocols: _, methods, } => { + let struct_generic = if generics.is_empty() { + name.clone() + } else { + format!( + "{name}<{}: Message = Object>", + generics.join(": Message = Object,") + ) + }; + let generic_params = if generics.is_empty() { String::new() } else { @@ -632,7 +641,7 @@ impl fmt::Display for Stmt { writeln!(f, "{macro_name}!(")?; writeln!(f, " #[derive(Debug)]")?; - write!(f, " pub struct {name}{generic_params}")?; + write!(f, " pub struct {struct_generic}")?; if generics.is_empty() { writeln!(f, ";")?; } else { diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index e2d7ff8dc..7fadde0e3 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -7,7 +7,7 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSCandidateListTouchBarItem { + pub struct NSCandidateListTouchBarItem { _inner0: PhantomData<*mut CandidateType>, } diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index c9a4e8f8e..948ddebb5 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -8,8 +8,8 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSDiffableDataSourceSnapshot< - SectionIdentifierType: Message, - ItemIdentifierType: Message, + SectionIdentifierType: Message = Object, + ItemIdentifierType: Message = Object, > { _inner0: PhantomData<*mut SectionIdentifierType>, _inner1: PhantomData<*mut ItemIdentifierType>, @@ -163,8 +163,8 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] pub struct NSCollectionViewDiffableDataSource< - SectionIdentifierType: Message, - ItemIdentifierType: Message, + SectionIdentifierType: Message = Object, + ItemIdentifierType: Message = Object, > { _inner0: PhantomData<*mut SectionIdentifierType>, _inner1: PhantomData<*mut ItemIdentifierType>, diff --git a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs index 21bfc6dca..c651460ff 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs @@ -7,7 +7,7 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSLayoutAnchor { + pub struct NSLayoutAnchor { _inner0: PhantomData<*mut AnchorType>, } diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs index 5b0bf7e60..6f7f6fe4d 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -8,8 +8,8 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] pub struct NSTableViewDiffableDataSource< - SectionIdentifierType: Message, - ItemIdentifierType: Message, + SectionIdentifierType: Message = Object, + ItemIdentifierType: Message = Object, > { _inner0: PhantomData<*mut SectionIdentifierType>, _inner1: PhantomData<*mut ItemIdentifierType>, diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 905a838b9..cf112bc6c 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -7,7 +7,7 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSArray { + pub struct NSArray { _inner0: PhantomData<*mut ObjectType>, } @@ -369,7 +369,7 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] - pub struct NSMutableArray { + pub struct NSMutableArray { _inner0: PhantomData<*mut ObjectType>, } diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 7e77df21f..a2e6605f4 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -7,7 +7,7 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSCache { + pub struct NSCache { _inner0: PhantomData<*mut KeyType>, _inner1: PhantomData<*mut ObjectType>, } diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 104602862..c6fe08ee9 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -7,7 +7,7 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSDictionary { + pub struct NSDictionary { _inner0: PhantomData<*mut KeyType>, _inner1: PhantomData<*mut ObjectType>, } @@ -258,7 +258,7 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] - pub struct NSMutableDictionary { + pub struct NSMutableDictionary { _inner0: PhantomData<*mut KeyType>, _inner1: PhantomData<*mut ObjectType>, } diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index c750b4cf8..0a8c03db9 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -9,7 +9,7 @@ pub type NSFastEnumeration = NSObject; __inner_extern_class!( #[derive(Debug)] - pub struct NSEnumerator { + pub struct NSEnumerator { _inner0: PhantomData<*mut ObjectType>, } diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index a14455bb4..e9c5ee980 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -511,7 +511,7 @@ pub type NSFileManagerDelegate = NSObject; __inner_extern_class!( #[derive(Debug)] - pub struct NSDirectoryEnumerator { + pub struct NSDirectoryEnumerator { _inner0: PhantomData<*mut ObjectType>, } diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index d0f6f7769..dc69b0710 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -21,7 +21,7 @@ pub type NSHashTableOptions = NSUInteger; __inner_extern_class!( #[derive(Debug)] - pub struct NSHashTable { + pub struct NSHashTable { _inner0: PhantomData<*mut ObjectType>, } diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index f563fdc4e..849d19c27 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -20,7 +20,7 @@ pub type NSMapTableOptions = NSUInteger; __inner_extern_class!( #[derive(Debug)] - pub struct NSMapTable { + pub struct NSMapTable { _inner0: PhantomData<*mut KeyType>, _inner1: PhantomData<*mut ObjectType>, } diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index 8bb584bf9..b67d70324 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -7,7 +7,7 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSMeasurement { + pub struct NSMeasurement { _inner0: PhantomData<*mut UnitType>, } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index a5bb8570d..033f1d175 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -11,7 +11,7 @@ pub const NSCollectionChangeRemove: NSCollectionChangeType = 1; __inner_extern_class!( #[derive(Debug)] - pub struct NSOrderedCollectionChange { + pub struct NSOrderedCollectionChange { _inner0: PhantomData<*mut ObjectType>, } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 09e3d9561..14737ea78 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -15,7 +15,7 @@ pub const NSOrderedCollectionDifferenceCalculationInferMoves: __inner_extern_class!( #[derive(Debug)] - pub struct NSOrderedCollectionDifference { + pub struct NSOrderedCollectionDifference { _inner0: PhantomData<*mut ObjectType>, } diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index be07db85e..a78680156 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -7,7 +7,7 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSOrderedSet { + pub struct NSOrderedSet { _inner0: PhantomData<*mut ObjectType>, } @@ -321,7 +321,7 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] - pub struct NSMutableOrderedSet { + pub struct NSMutableOrderedSet { _inner0: PhantomData<*mut ObjectType>, } diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index ced9a70a7..fedcff7a8 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -7,7 +7,7 @@ use objc2::{extern_class, extern_methods, ClassType}; __inner_extern_class!( #[derive(Debug)] - pub struct NSSet { + pub struct NSSet { _inner0: PhantomData<*mut ObjectType>, } @@ -159,7 +159,7 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] - pub struct NSMutableSet { + pub struct NSMutableSet { _inner0: PhantomData<*mut ObjectType>, } @@ -220,7 +220,7 @@ extern_methods!( __inner_extern_class!( #[derive(Debug)] - pub struct NSCountedSet { + pub struct NSCountedSet { _inner0: PhantomData<*mut ObjectType>, } From a013cd840d3d070f6390ba60c6b871d8cba91357 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 20:51:17 +0100 Subject: [PATCH 091/131] Remove methods that are both instance and class methods For now, until we can solve this more generally --- .../src/Foundation/translation-config.toml | 26 +++++++++++++++++ .../src/generated/Foundation/NSArchiver.rs | 21 -------------- .../generated/Foundation/NSAutoreleasePool.rs | 6 ---- .../src/generated/Foundation/NSBundle.rs | 28 ------------------- .../generated/Foundation/NSKeyedArchiver.rs | 24 ---------------- .../src/generated/Foundation/NSThread.rs | 12 -------- 6 files changed, 26 insertions(+), 91 deletions(-) diff --git a/crates/icrate/src/Foundation/translation-config.toml b/crates/icrate/src/Foundation/translation-config.toml index b79976127..2b9413d06 100644 --- a/crates/icrate/src/Foundation/translation-config.toml +++ b/crates/icrate/src/Foundation/translation-config.toml @@ -51,3 +51,29 @@ skipped = true # Not supported on clang 11.0.0 [class.NSBundle.methods.localizedAttributedStringForKey_value_table] skipped = true + +# Both instance and class methods +[class.NSUnarchiver.methods.decodeClassName_asClassName] +skipped = true +[class.NSUnarchiver.methods.classNameDecodedForArchiveClassName] +skipped = true +[class.NSAutoreleasePool.methods.addObject] +skipped = true +[class.NSBundle.methods.pathForResource_ofType_inDirectory] +skipped = true +[class.NSBundle.methods.pathsForResourcesOfType_inDirectory] +skipped = true +[class.NSKeyedArchiver.methods.setClassName_forClass] +skipped = true +[class.NSKeyedArchiver.methods.classNameForClass] +skipped = true +[class.NSKeyedUnarchiver.methods.setClass_forClassName] +skipped = true +[class.NSKeyedUnarchiver.methods.classForClassName] +skipped = true +[class.NSThread.properties.threadPriority] +skipped = true +[class.NSThread.properties.isMainThread] +skipped = true +[class.NSDate.methods.timeIntervalSinceReferenceDate] +skipped = true diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 1a64fe5d5..07c3bc9e7 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -87,27 +87,6 @@ extern_methods!( #[method_id(unarchiveObjectWithFile:)] pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option>; - #[method(decodeClassName:asClassName:)] - pub unsafe fn decodeClassName_asClassName(inArchiveName: &NSString, trueName: &NSString); - - #[method(decodeClassName:asClassName:)] - pub unsafe fn decodeClassName_asClassName( - &self, - inArchiveName: &NSString, - trueName: &NSString, - ); - - #[method_id(classNameDecodedForArchiveClassName:)] - pub unsafe fn classNameDecodedForArchiveClassName( - inArchiveName: &NSString, - ) -> Id; - - #[method_id(classNameDecodedForArchiveClassName:)] - pub unsafe fn classNameDecodedForArchiveClassName( - &self, - inArchiveName: &NSString, - ) -> Id; - #[method(replaceObject:withObject:)] pub unsafe fn replaceObject_withObject(&self, object: &Object, newObject: &Object); } diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs index 9647baaa8..88b8baf09 100644 --- a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -16,12 +16,6 @@ extern_class!( extern_methods!( unsafe impl NSAutoreleasePool { - #[method(addObject:)] - pub unsafe fn addObject(anObject: &Object); - - #[method(addObject:)] - pub unsafe fn addObject(&self, anObject: &Object); - #[method(drain)] pub unsafe fn drain(&self); } diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 47257f360..cecb4c9c7 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -175,19 +175,6 @@ extern_methods!( localizationName: Option<&NSString>, ) -> Option, Shared>>; - #[method_id(pathForResource:ofType:inDirectory:)] - pub unsafe fn pathForResource_ofType_inDirectory( - name: Option<&NSString>, - ext: Option<&NSString>, - bundlePath: &NSString, - ) -> Option>; - - #[method_id(pathsForResourcesOfType:inDirectory:)] - pub unsafe fn pathsForResourcesOfType_inDirectory( - ext: Option<&NSString>, - bundlePath: &NSString, - ) -> Id, Shared>; - #[method_id(pathForResource:ofType:)] pub unsafe fn pathForResource_ofType( &self, @@ -195,14 +182,6 @@ extern_methods!( ext: Option<&NSString>, ) -> Option>; - #[method_id(pathForResource:ofType:inDirectory:)] - pub unsafe fn pathForResource_ofType_inDirectory( - &self, - name: Option<&NSString>, - ext: Option<&NSString>, - subpath: Option<&NSString>, - ) -> Option>; - #[method_id(pathForResource:ofType:inDirectory:forLocalization:)] pub unsafe fn pathForResource_ofType_inDirectory_forLocalization( &self, @@ -212,13 +191,6 @@ extern_methods!( localizationName: Option<&NSString>, ) -> Option>; - #[method_id(pathsForResourcesOfType:inDirectory:)] - pub unsafe fn pathsForResourcesOfType_inDirectory( - &self, - ext: Option<&NSString>, - subpath: Option<&NSString>, - ) -> Id, Shared>; - #[method_id(pathsForResourcesOfType:inDirectory:forLocalization:)] pub unsafe fn pathsForResourcesOfType_inDirectory_forLocalization( &self, diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 769c728cb..d71ec0b75 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -73,18 +73,6 @@ extern_methods!( #[method(finishEncoding)] pub unsafe fn finishEncoding(&self); - #[method(setClassName:forClass:)] - pub unsafe fn setClassName_forClass(codedName: Option<&NSString>, cls: &Class); - - #[method(setClassName:forClass:)] - pub unsafe fn setClassName_forClass(&self, codedName: Option<&NSString>, cls: &Class); - - #[method_id(classNameForClass:)] - pub unsafe fn classNameForClass(cls: &Class) -> Option>; - - #[method_id(classNameForClass:)] - pub unsafe fn classNameForClass(&self, cls: &Class) -> Option>; - #[method(encodeObject:forKey:)] pub unsafe fn encodeObject_forKey(&self, object: Option<&Object>, key: &NSString); @@ -210,18 +198,6 @@ extern_methods!( #[method(finishDecoding)] pub unsafe fn finishDecoding(&self); - #[method(setClass:forClassName:)] - pub unsafe fn setClass_forClassName(cls: Option<&Class>, codedName: &NSString); - - #[method(setClass:forClassName:)] - pub unsafe fn setClass_forClassName(&self, cls: Option<&Class>, codedName: &NSString); - - #[method(classForClassName:)] - pub unsafe fn classForClassName(codedName: &NSString) -> Option<&'static Class>; - - #[method(classForClassName:)] - pub unsafe fn classForClassName(&self, codedName: &NSString) -> Option<&'static Class>; - #[method(containsValueForKey:)] pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 00b0b893d..79cc6e8b3 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -50,12 +50,6 @@ extern_methods!( #[method(setThreadPriority:)] pub unsafe fn setThreadPriority(p: c_double) -> bool; - #[method(threadPriority)] - pub unsafe fn threadPriority(&self) -> c_double; - - #[method(setThreadPriority:)] - pub unsafe fn setThreadPriority(&self, threadPriority: c_double); - #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; @@ -80,12 +74,6 @@ extern_methods!( #[method(setStackSize:)] pub unsafe fn setStackSize(&self, stackSize: NSUInteger); - #[method(isMainThread)] - pub unsafe fn isMainThread(&self) -> bool; - - #[method(isMainThread)] - pub unsafe fn isMainThread() -> bool; - #[method_id(mainThread)] pub unsafe fn mainThread() -> Id; From f877cf78ac213d56c36c61e7c00c51445cde14e5 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 20:36:29 +0100 Subject: [PATCH 092/131] Skip protocols that are also classes --- crates/header-translator/src/config.rs | 5 +++ crates/header-translator/src/stmt.rs | 34 +++++++++++++------ .../icrate/src/AppKit/translation-config.toml | 6 ++++ .../src/Foundation/translation-config.toml | 2 +- .../AppKit/NSAccessibilityProtocols.rs | 2 -- .../generated/AppKit/NSTextAttachmentCell.rs | 2 -- crates/icrate/src/generated/AppKit/mod.rs | 12 +++---- 7 files changed, 41 insertions(+), 22 deletions(-) diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index d776088f7..88c52762f 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -11,11 +11,16 @@ pub struct Config { #[serde(rename = "class")] #[serde(default)] pub class_data: HashMap, + #[serde(rename = "protocol")] + #[serde(default)] + pub protocol_data: HashMap, } #[derive(Deserialize, Debug, Default, Clone, PartialEq, Eq)] #[serde(deny_unknown_fields)] pub struct ClassData { + #[serde(default)] + pub skipped: bool, #[serde(default)] pub methods: HashMap, #[serde(default)] diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index cb3cd77db..9672b11cf 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -34,7 +34,7 @@ fn parse_objc_decl( entity: &Entity<'_>, mut superclass: Option<&mut Option>>, mut generics: Option<&mut Vec>, - class_data: Option<&ClassData>, + data: Option<&ClassData>, ) -> (Vec, Vec) { let mut protocols = Vec::new(); let mut methods = Vec::new(); @@ -86,10 +86,9 @@ fn parse_objc_decl( let partial = Method::partial(entity); if !properties.remove(&(partial.is_class, partial.fn_name.clone())) { - let data = class_data - .map(|class_data| { - class_data - .methods + let data = data + .map(|data| { + data.methods .get(&partial.fn_name) .copied() .unwrap_or_default() @@ -102,10 +101,9 @@ fn parse_objc_decl( } EntityKind::ObjCPropertyDecl => { let partial = Property::partial(entity); - let data = class_data - .map(|class_data| { - class_data - .properties + let data = data + .map(|data| { + data.properties .get(&partial.name) .copied() .unwrap_or_default() @@ -242,6 +240,11 @@ impl Stmt { // entity.get_mangled_objc_names() let name = entity.get_name().expect("class name"); let class_data = config.class_data.get(&name); + + if class_data.map(|data| data.skipped).unwrap_or_default() { + return None; + } + let availability = Availability::parse( entity .get_platform_availability() @@ -292,6 +295,10 @@ impl Stmt { let class_name = class_name.expect("could not find category class"); let class_data = config.class_data.get(&class_name); + if class_data.map(|data| data.skipped).unwrap_or_default() { + return None; + } + let mut generics = Vec::new(); let (protocols, methods) = @@ -308,14 +315,19 @@ impl Stmt { } EntityKind::ObjCProtocolDecl => { let name = entity.get_name().expect("protocol name"); - let class_data = config.class_data.get(&name); + let protocol_data = config.protocol_data.get(&name); + + if protocol_data.map(|data| data.skipped).unwrap_or_default() { + return None; + } + let availability = Availability::parse( entity .get_platform_availability() .expect("protocol availability"), ); - let (protocols, methods) = parse_objc_decl(&entity, None, None, class_data); + let (protocols, methods) = parse_objc_decl(&entity, None, None, protocol_data); Some(Self::ProtocolDecl { name, diff --git a/crates/icrate/src/AppKit/translation-config.toml b/crates/icrate/src/AppKit/translation-config.toml index da4a9a57a..4dd7c2198 100644 --- a/crates/icrate/src/AppKit/translation-config.toml +++ b/crates/icrate/src/AppKit/translation-config.toml @@ -7,3 +7,9 @@ skipped = true # Works weirdly since it's defined both as a property, and as a method. [class.NSDocument.methods.setDisplayName] skipped = true + +# Both protocols and classes +[protocol.NSTextAttachmentCell] +skipped = true +[protocol.NSAccessibilityElement] +skipped = true diff --git a/crates/icrate/src/Foundation/translation-config.toml b/crates/icrate/src/Foundation/translation-config.toml index 2b9413d06..16d48a974 100644 --- a/crates/icrate/src/Foundation/translation-config.toml +++ b/crates/icrate/src/Foundation/translation-config.toml @@ -2,7 +2,7 @@ # Uses NS_REPLACES_RECEIVER awakeAfterUsingCoder = { skipped = true } -[class.NSKeyedUnarchiverDelegate.methods] +[protocol.NSKeyedUnarchiverDelegate.methods] # Uses NS_RELEASES_ARGUMENT and NS_RETURNS_RETAINED unarchiver_didDecodeObject = { skipped = true } diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs index 861917631..8ff0e13e5 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs @@ -5,8 +5,6 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; -pub type NSAccessibilityElement = NSObject; - pub type NSAccessibilityGroup = NSObject; pub type NSAccessibilityButton = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs index b78857c59..2fd78f5e1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs @@ -5,8 +5,6 @@ use objc2::rc::{Id, Shared}; #[allow(unused_imports)] use objc2::{extern_class, extern_methods, ClassType}; -pub type NSTextAttachmentCell = NSObject; - extern_class!( #[derive(Debug)] pub struct NSTextAttachmentCell; diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index 3eb6dfe6f..79a1b703e 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -494,12 +494,12 @@ mod __exported { pub use super::NSAccessibilityElement::NSAccessibilityElement; pub use super::NSAccessibilityProtocols::{ NSAccessibility, NSAccessibilityButton, NSAccessibilityCheckBox, - NSAccessibilityContainsTransientUI, NSAccessibilityElement, NSAccessibilityElementLoading, - NSAccessibilityGroup, NSAccessibilityImage, NSAccessibilityLayoutArea, - NSAccessibilityLayoutItem, NSAccessibilityList, NSAccessibilityNavigableStaticText, - NSAccessibilityOutline, NSAccessibilityProgressIndicator, NSAccessibilityRadioButton, - NSAccessibilityRow, NSAccessibilitySlider, NSAccessibilityStaticText, - NSAccessibilityStepper, NSAccessibilitySwitch, NSAccessibilityTable, + NSAccessibilityContainsTransientUI, NSAccessibilityElementLoading, NSAccessibilityGroup, + NSAccessibilityImage, NSAccessibilityLayoutArea, NSAccessibilityLayoutItem, + NSAccessibilityList, NSAccessibilityNavigableStaticText, NSAccessibilityOutline, + NSAccessibilityProgressIndicator, NSAccessibilityRadioButton, NSAccessibilityRow, + NSAccessibilitySlider, NSAccessibilityStaticText, NSAccessibilityStepper, + NSAccessibilitySwitch, NSAccessibilityTable, }; pub use super::NSActionCell::NSActionCell; pub use super::NSAlert::{ From c3e10d0b7bfb33253ca068ce8e809927616dc4a6 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 21:11:46 +0100 Subject: [PATCH 093/131] Improve imports setups --- crates/header-translator/src/config.rs | 2 ++ crates/header-translator/src/lib.rs | 15 ++++++---- crates/header-translator/src/main.rs | 6 ++-- .../icrate/src/AppKit/translation-config.toml | 2 ++ crates/icrate/src/Foundation/mod.rs | 9 ++++-- .../src/Foundation/translation-config.toml | 2 ++ .../src/generated/AppKit/AppKitDefines.rs | 7 ++--- .../src/generated/AppKit/AppKitErrors.rs | 7 ++--- .../src/generated/AppKit/NSATSTypesetter.rs | 7 ++--- .../src/generated/AppKit/NSAccessibility.rs | 7 ++--- .../AppKit/NSAccessibilityConstants.rs | 7 ++--- .../AppKit/NSAccessibilityCustomAction.rs | 7 ++--- .../AppKit/NSAccessibilityCustomRotor.rs | 7 ++--- .../AppKit/NSAccessibilityElement.rs | 7 ++--- .../AppKit/NSAccessibilityProtocols.rs | 7 ++--- .../src/generated/AppKit/NSActionCell.rs | 7 ++--- .../src/generated/AppKit/NSAffineTransform.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSAlert.rs | 7 ++--- .../AppKit/NSAlignmentFeedbackFilter.rs | 7 ++--- .../src/generated/AppKit/NSAnimation.rs | 7 ++--- .../generated/AppKit/NSAnimationContext.rs | 7 ++--- .../src/generated/AppKit/NSAppearance.rs | 7 ++--- .../AppKit/NSAppleScriptExtensions.rs | 7 ++--- .../src/generated/AppKit/NSApplication.rs | 7 ++--- .../AppKit/NSApplicationScripting.rs | 7 ++--- .../src/generated/AppKit/NSArrayController.rs | 7 ++--- .../generated/AppKit/NSAttributedString.rs | 7 ++--- .../src/generated/AppKit/NSBezierPath.rs | 7 ++--- .../src/generated/AppKit/NSBitmapImageRep.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSBox.rs | 7 ++--- .../icrate/src/generated/AppKit/NSBrowser.rs | 7 ++--- .../src/generated/AppKit/NSBrowserCell.rs | 7 ++--- .../icrate/src/generated/AppKit/NSButton.rs | 7 ++--- .../src/generated/AppKit/NSButtonCell.rs | 7 ++--- .../generated/AppKit/NSButtonTouchBarItem.rs | 7 ++--- .../src/generated/AppKit/NSCIImageRep.rs | 7 ++--- .../src/generated/AppKit/NSCachedImageRep.rs | 7 ++--- .../AppKit/NSCandidateListTouchBarItem.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSCell.rs | 7 ++--- .../AppKit/NSClickGestureRecognizer.rs | 7 ++--- .../icrate/src/generated/AppKit/NSClipView.rs | 7 ++--- .../src/generated/AppKit/NSCollectionView.rs | 7 ++--- .../NSCollectionViewCompositionalLayout.rs | 7 ++--- .../AppKit/NSCollectionViewFlowLayout.rs | 7 ++--- .../AppKit/NSCollectionViewGridLayout.rs | 7 ++--- .../AppKit/NSCollectionViewLayout.rs | 7 ++--- .../NSCollectionViewTransitionLayout.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSColor.rs | 7 ++--- .../src/generated/AppKit/NSColorList.rs | 7 ++--- .../src/generated/AppKit/NSColorPanel.rs | 7 ++--- .../src/generated/AppKit/NSColorPicker.rs | 7 ++--- .../AppKit/NSColorPickerTouchBarItem.rs | 7 ++--- .../src/generated/AppKit/NSColorPicking.rs | 7 ++--- .../src/generated/AppKit/NSColorSampler.rs | 7 ++--- .../src/generated/AppKit/NSColorSpace.rs | 7 ++--- .../src/generated/AppKit/NSColorWell.rs | 7 ++--- .../icrate/src/generated/AppKit/NSComboBox.rs | 7 ++--- .../src/generated/AppKit/NSComboBoxCell.rs | 7 ++--- .../icrate/src/generated/AppKit/NSControl.rs | 7 ++--- .../src/generated/AppKit/NSController.rs | 7 ++--- .../icrate/src/generated/AppKit/NSCursor.rs | 7 ++--- .../src/generated/AppKit/NSCustomImageRep.rs | 7 ++--- .../generated/AppKit/NSCustomTouchBarItem.rs | 7 ++--- .../src/generated/AppKit/NSDataAsset.rs | 7 ++--- .../src/generated/AppKit/NSDatePicker.rs | 7 ++--- .../src/generated/AppKit/NSDatePickerCell.rs | 7 ++--- .../AppKit/NSDictionaryController.rs | 7 ++--- .../generated/AppKit/NSDiffableDataSource.rs | 7 ++--- .../icrate/src/generated/AppKit/NSDockTile.rs | 7 ++--- .../icrate/src/generated/AppKit/NSDocument.rs | 7 ++--- .../generated/AppKit/NSDocumentController.rs | 7 ++--- .../generated/AppKit/NSDocumentScripting.rs | 7 ++--- .../icrate/src/generated/AppKit/NSDragging.rs | 7 ++--- .../src/generated/AppKit/NSDraggingItem.rs | 7 ++--- .../src/generated/AppKit/NSDraggingSession.rs | 7 ++--- .../icrate/src/generated/AppKit/NSDrawer.rs | 7 ++--- .../src/generated/AppKit/NSEPSImageRep.rs | 7 ++--- .../icrate/src/generated/AppKit/NSErrors.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSEvent.rs | 7 ++--- .../generated/AppKit/NSFilePromiseProvider.rs | 7 ++--- .../generated/AppKit/NSFilePromiseReceiver.rs | 7 ++--- .../AppKit/NSFileWrapperExtensions.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSFont.rs | 7 ++--- .../generated/AppKit/NSFontAssetRequest.rs | 7 ++--- .../src/generated/AppKit/NSFontCollection.rs | 7 ++--- .../src/generated/AppKit/NSFontDescriptor.rs | 7 ++--- .../src/generated/AppKit/NSFontManager.rs | 7 ++--- .../src/generated/AppKit/NSFontPanel.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSForm.rs | 7 ++--- .../icrate/src/generated/AppKit/NSFormCell.rs | 7 ++--- .../generated/AppKit/NSGestureRecognizer.rs | 7 ++--- .../src/generated/AppKit/NSGlyphGenerator.rs | 7 ++--- .../src/generated/AppKit/NSGlyphInfo.rs | 7 ++--- .../icrate/src/generated/AppKit/NSGradient.rs | 7 ++--- .../icrate/src/generated/AppKit/NSGraphics.rs | 7 ++--- .../src/generated/AppKit/NSGraphicsContext.rs | 7 ++--- .../icrate/src/generated/AppKit/NSGridView.rs | 7 ++--- .../generated/AppKit/NSGroupTouchBarItem.rs | 7 ++--- .../src/generated/AppKit/NSHapticFeedback.rs | 7 ++--- .../src/generated/AppKit/NSHelpManager.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSImage.rs | 7 ++--- .../src/generated/AppKit/NSImageCell.rs | 7 ++--- .../icrate/src/generated/AppKit/NSImageRep.rs | 7 ++--- .../src/generated/AppKit/NSImageView.rs | 7 ++--- .../src/generated/AppKit/NSInputManager.rs | 7 ++--- .../src/generated/AppKit/NSInputServer.rs | 7 ++--- .../src/generated/AppKit/NSInterfaceStyle.rs | 7 ++--- .../src/generated/AppKit/NSItemProvider.rs | 7 ++--- .../src/generated/AppKit/NSKeyValueBinding.rs | 7 ++--- .../src/generated/AppKit/NSLayoutAnchor.rs | 7 ++--- .../generated/AppKit/NSLayoutConstraint.rs | 7 ++--- .../src/generated/AppKit/NSLayoutGuide.rs | 7 ++--- .../src/generated/AppKit/NSLayoutManager.rs | 7 ++--- .../src/generated/AppKit/NSLevelIndicator.rs | 7 ++--- .../generated/AppKit/NSLevelIndicatorCell.rs | 7 ++--- .../NSMagnificationGestureRecognizer.rs | 7 ++--- .../icrate/src/generated/AppKit/NSMatrix.rs | 7 ++--- .../AppKit/NSMediaLibraryBrowserController.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSMenu.rs | 7 ++--- .../icrate/src/generated/AppKit/NSMenuItem.rs | 7 ++--- .../src/generated/AppKit/NSMenuItemCell.rs | 7 ++--- .../src/generated/AppKit/NSMenuToolbarItem.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSMovie.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSNib.rs | 7 ++--- .../src/generated/AppKit/NSNibDeclarations.rs | 7 ++--- .../src/generated/AppKit/NSNibLoading.rs | 7 ++--- .../generated/AppKit/NSObjectController.rs | 7 ++--- .../icrate/src/generated/AppKit/NSOpenGL.rs | 7 ++--- .../src/generated/AppKit/NSOpenGLLayer.rs | 7 ++--- .../src/generated/AppKit/NSOpenGLView.rs | 7 ++--- .../src/generated/AppKit/NSOpenPanel.rs | 7 ++--- .../src/generated/AppKit/NSOutlineView.rs | 7 ++--- .../src/generated/AppKit/NSPDFImageRep.rs | 7 ++--- .../icrate/src/generated/AppKit/NSPDFInfo.rs | 7 ++--- .../icrate/src/generated/AppKit/NSPDFPanel.rs | 7 ++--- .../src/generated/AppKit/NSPICTImageRep.rs | 7 ++--- .../src/generated/AppKit/NSPageController.rs | 7 ++--- .../src/generated/AppKit/NSPageLayout.rs | 7 ++--- .../AppKit/NSPanGestureRecognizer.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSPanel.rs | 7 ++--- .../src/generated/AppKit/NSParagraphStyle.rs | 7 ++--- .../src/generated/AppKit/NSPasteboard.rs | 7 ++--- .../src/generated/AppKit/NSPasteboardItem.rs | 7 ++--- .../icrate/src/generated/AppKit/NSPathCell.rs | 7 ++--- .../generated/AppKit/NSPathComponentCell.rs | 7 ++--- .../src/generated/AppKit/NSPathControl.rs | 7 ++--- .../src/generated/AppKit/NSPathControlItem.rs | 7 ++--- .../generated/AppKit/NSPersistentDocument.rs | 7 ++--- .../generated/AppKit/NSPickerTouchBarItem.rs | 7 ++--- .../src/generated/AppKit/NSPopUpButton.rs | 7 ++--- .../src/generated/AppKit/NSPopUpButtonCell.rs | 7 ++--- .../icrate/src/generated/AppKit/NSPopover.rs | 7 ++--- .../generated/AppKit/NSPopoverTouchBarItem.rs | 7 ++--- .../src/generated/AppKit/NSPredicateEditor.rs | 7 ++--- .../AppKit/NSPredicateEditorRowTemplate.rs | 7 ++--- .../AppKit/NSPressGestureRecognizer.rs | 7 ++--- .../AppKit/NSPressureConfiguration.rs | 7 ++--- .../src/generated/AppKit/NSPrintInfo.rs | 7 ++--- .../src/generated/AppKit/NSPrintOperation.rs | 7 ++--- .../src/generated/AppKit/NSPrintPanel.rs | 7 ++--- .../icrate/src/generated/AppKit/NSPrinter.rs | 7 ++--- .../generated/AppKit/NSProgressIndicator.rs | 7 ++--- .../src/generated/AppKit/NSResponder.rs | 7 ++--- .../AppKit/NSRotationGestureRecognizer.rs | 7 ++--- .../src/generated/AppKit/NSRuleEditor.rs | 7 ++--- .../src/generated/AppKit/NSRulerMarker.rs | 7 ++--- .../src/generated/AppKit/NSRulerView.rs | 7 ++--- .../generated/AppKit/NSRunningApplication.rs | 7 ++--- .../src/generated/AppKit/NSSavePanel.rs | 7 ++--- .../icrate/src/generated/AppKit/NSScreen.rs | 7 ++--- .../src/generated/AppKit/NSScrollView.rs | 7 ++--- .../icrate/src/generated/AppKit/NSScroller.rs | 7 ++--- .../icrate/src/generated/AppKit/NSScrubber.rs | 7 ++--- .../generated/AppKit/NSScrubberItemView.rs | 7 ++--- .../src/generated/AppKit/NSScrubberLayout.rs | 7 ++--- .../src/generated/AppKit/NSSearchField.rs | 7 ++--- .../src/generated/AppKit/NSSearchFieldCell.rs | 7 ++--- .../generated/AppKit/NSSearchToolbarItem.rs | 7 ++--- .../src/generated/AppKit/NSSecureTextField.rs | 7 ++--- .../src/generated/AppKit/NSSegmentedCell.rs | 7 ++--- .../generated/AppKit/NSSegmentedControl.rs | 7 ++--- .../icrate/src/generated/AppKit/NSShadow.rs | 7 ++--- .../src/generated/AppKit/NSSharingService.rs | 7 ++--- .../NSSharingServicePickerToolbarItem.rs | 7 ++--- .../NSSharingServicePickerTouchBarItem.rs | 7 ++--- .../icrate/src/generated/AppKit/NSSlider.rs | 7 ++--- .../src/generated/AppKit/NSSliderAccessory.rs | 7 ++--- .../src/generated/AppKit/NSSliderCell.rs | 7 ++--- .../generated/AppKit/NSSliderTouchBarItem.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSSound.rs | 7 ++--- .../generated/AppKit/NSSpeechRecognizer.rs | 7 ++--- .../generated/AppKit/NSSpeechSynthesizer.rs | 7 ++--- .../src/generated/AppKit/NSSpellChecker.rs | 7 ++--- .../src/generated/AppKit/NSSpellProtocol.rs | 7 ++--- .../src/generated/AppKit/NSSplitView.rs | 7 ++--- .../generated/AppKit/NSSplitViewController.rs | 7 ++--- .../src/generated/AppKit/NSSplitViewItem.rs | 7 ++--- .../src/generated/AppKit/NSStackView.rs | 7 ++--- .../src/generated/AppKit/NSStatusBar.rs | 7 ++--- .../src/generated/AppKit/NSStatusBarButton.rs | 7 ++--- .../src/generated/AppKit/NSStatusItem.rs | 7 ++--- .../icrate/src/generated/AppKit/NSStepper.rs | 7 ++--- .../src/generated/AppKit/NSStepperCell.rs | 7 ++--- .../generated/AppKit/NSStepperTouchBarItem.rs | 7 ++--- .../src/generated/AppKit/NSStoryboard.rs | 7 ++--- .../src/generated/AppKit/NSStoryboardSegue.rs | 7 ++--- .../src/generated/AppKit/NSStringDrawing.rs | 7 ++--- .../icrate/src/generated/AppKit/NSSwitch.rs | 7 ++--- .../icrate/src/generated/AppKit/NSTabView.rs | 7 ++--- .../generated/AppKit/NSTabViewController.rs | 7 ++--- .../src/generated/AppKit/NSTabViewItem.rs | 7 ++--- .../src/generated/AppKit/NSTableCellView.rs | 7 ++--- .../src/generated/AppKit/NSTableColumn.rs | 7 ++--- .../src/generated/AppKit/NSTableHeaderCell.rs | 7 ++--- .../src/generated/AppKit/NSTableHeaderView.rs | 7 ++--- .../src/generated/AppKit/NSTableRowView.rs | 7 ++--- .../src/generated/AppKit/NSTableView.rs | 7 ++--- .../AppKit/NSTableViewDiffableDataSource.rs | 7 ++--- .../generated/AppKit/NSTableViewRowAction.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSText.rs | 7 ++--- .../generated/AppKit/NSTextAlternatives.rs | 7 ++--- .../src/generated/AppKit/NSTextAttachment.rs | 7 ++--- .../generated/AppKit/NSTextAttachmentCell.rs | 7 ++--- .../generated/AppKit/NSTextCheckingClient.rs | 7 ++--- .../AppKit/NSTextCheckingController.rs | 7 ++--- .../src/generated/AppKit/NSTextContainer.rs | 7 ++--- .../src/generated/AppKit/NSTextContent.rs | 7 ++--- .../generated/AppKit/NSTextContentManager.rs | 7 ++--- .../src/generated/AppKit/NSTextElement.rs | 7 ++--- .../src/generated/AppKit/NSTextField.rs | 7 ++--- .../src/generated/AppKit/NSTextFieldCell.rs | 7 ++--- .../src/generated/AppKit/NSTextFinder.rs | 7 ++--- .../src/generated/AppKit/NSTextInputClient.rs | 7 ++--- .../generated/AppKit/NSTextInputContext.rs | 7 ++--- .../generated/AppKit/NSTextLayoutFragment.rs | 7 ++--- .../generated/AppKit/NSTextLayoutManager.rs | 7 ++--- .../generated/AppKit/NSTextLineFragment.rs | 7 ++--- .../icrate/src/generated/AppKit/NSTextList.rs | 7 ++--- .../src/generated/AppKit/NSTextRange.rs | 7 ++--- .../src/generated/AppKit/NSTextSelection.rs | 7 ++--- .../AppKit/NSTextSelectionNavigation.rs | 7 ++--- .../src/generated/AppKit/NSTextStorage.rs | 7 ++--- .../AppKit/NSTextStorageScripting.rs | 7 ++--- .../src/generated/AppKit/NSTextTable.rs | 7 ++--- .../icrate/src/generated/AppKit/NSTextView.rs | 7 ++--- .../AppKit/NSTextViewportLayoutController.rs | 7 ++--- .../generated/AppKit/NSTintConfiguration.rs | 7 ++--- .../NSTitlebarAccessoryViewController.rs | 7 ++--- .../src/generated/AppKit/NSTokenField.rs | 7 ++--- .../src/generated/AppKit/NSTokenFieldCell.rs | 7 ++--- .../icrate/src/generated/AppKit/NSToolbar.rs | 7 ++--- .../src/generated/AppKit/NSToolbarItem.rs | 7 ++--- .../generated/AppKit/NSToolbarItemGroup.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSTouch.rs | 7 ++--- .../icrate/src/generated/AppKit/NSTouchBar.rs | 7 ++--- .../src/generated/AppKit/NSTouchBarItem.rs | 7 ++--- .../src/generated/AppKit/NSTrackingArea.rs | 7 ++--- .../AppKit/NSTrackingSeparatorToolbarItem.rs | 7 ++--- .../src/generated/AppKit/NSTreeController.rs | 7 ++--- .../icrate/src/generated/AppKit/NSTreeNode.rs | 7 ++--- .../src/generated/AppKit/NSTypesetter.rs | 7 ++--- .../src/generated/AppKit/NSUserActivity.rs | 7 ++--- .../AppKit/NSUserDefaultsController.rs | 7 ++--- .../AppKit/NSUserInterfaceCompression.rs | 7 ++--- .../NSUserInterfaceItemIdentification.rs | 7 ++--- .../AppKit/NSUserInterfaceItemSearching.rs | 7 ++--- .../generated/AppKit/NSUserInterfaceLayout.rs | 7 ++--- .../AppKit/NSUserInterfaceValidation.rs | 7 ++--- crates/icrate/src/generated/AppKit/NSView.rs | 7 ++--- .../src/generated/AppKit/NSViewController.rs | 7 ++--- .../generated/AppKit/NSVisualEffectView.rs | 7 ++--- .../icrate/src/generated/AppKit/NSWindow.rs | 7 ++--- .../generated/AppKit/NSWindowController.rs | 7 ++--- .../generated/AppKit/NSWindowRestoration.rs | 7 ++--- .../src/generated/AppKit/NSWindowScripting.rs | 7 ++--- .../src/generated/AppKit/NSWindowTab.rs | 7 ++--- .../src/generated/AppKit/NSWindowTabGroup.rs | 7 ++--- .../src/generated/AppKit/NSWorkspace.rs | 7 ++--- .../generated/Foundation/FoundationErrors.rs | 6 ++-- .../FoundationLegacySwiftCompatibility.rs | 6 ++-- .../generated/Foundation/NSAffineTransform.rs | 6 ++-- .../Foundation/NSAppleEventDescriptor.rs | 6 ++-- .../Foundation/NSAppleEventManager.rs | 6 ++-- .../src/generated/Foundation/NSAppleScript.rs | 6 ++-- .../src/generated/Foundation/NSArchiver.rs | 6 ++-- .../src/generated/Foundation/NSArray.rs | 6 ++-- .../Foundation/NSAttributedString.rs | 6 ++-- .../generated/Foundation/NSAutoreleasePool.rs | 6 ++-- .../NSBackgroundActivityScheduler.rs | 6 ++-- .../src/generated/Foundation/NSBundle.rs | 6 ++-- .../Foundation/NSByteCountFormatter.rs | 6 ++-- .../src/generated/Foundation/NSByteOrder.rs | 6 ++-- .../src/generated/Foundation/NSCache.rs | 6 ++-- .../src/generated/Foundation/NSCalendar.rs | 6 ++-- .../generated/Foundation/NSCalendarDate.rs | 6 ++-- .../generated/Foundation/NSCharacterSet.rs | 6 ++-- .../Foundation/NSClassDescription.rs | 6 ++-- .../src/generated/Foundation/NSCoder.rs | 6 ++-- .../Foundation/NSComparisonPredicate.rs | 6 ++-- .../Foundation/NSCompoundPredicate.rs | 6 ++-- .../src/generated/Foundation/NSConnection.rs | 6 ++-- .../icrate/src/generated/Foundation/NSData.rs | 6 ++-- .../icrate/src/generated/Foundation/NSDate.rs | 6 ++-- .../Foundation/NSDateComponentsFormatter.rs | 6 ++-- .../generated/Foundation/NSDateFormatter.rs | 6 ++-- .../generated/Foundation/NSDateInterval.rs | 6 ++-- .../Foundation/NSDateIntervalFormatter.rs | 6 ++-- .../src/generated/Foundation/NSDecimal.rs | 6 ++-- .../generated/Foundation/NSDecimalNumber.rs | 6 ++-- .../src/generated/Foundation/NSDictionary.rs | 6 ++-- .../generated/Foundation/NSDistantObject.rs | 6 ++-- .../generated/Foundation/NSDistributedLock.rs | 6 ++-- .../NSDistributedNotificationCenter.rs | 6 ++-- .../generated/Foundation/NSEnergyFormatter.rs | 6 ++-- .../src/generated/Foundation/NSEnumerator.rs | 6 ++-- .../src/generated/Foundation/NSError.rs | 6 ++-- .../src/generated/Foundation/NSException.rs | 6 ++-- .../src/generated/Foundation/NSExpression.rs | 6 ++-- .../Foundation/NSExtensionContext.rs | 6 ++-- .../generated/Foundation/NSExtensionItem.rs | 6 ++-- .../Foundation/NSExtensionRequestHandling.rs | 6 ++-- .../generated/Foundation/NSFileCoordinator.rs | 6 ++-- .../src/generated/Foundation/NSFileHandle.rs | 6 ++-- .../src/generated/Foundation/NSFileManager.rs | 6 ++-- .../generated/Foundation/NSFilePresenter.rs | 6 ++-- .../src/generated/Foundation/NSFileVersion.rs | 6 ++-- .../src/generated/Foundation/NSFileWrapper.rs | 6 ++-- .../src/generated/Foundation/NSFormatter.rs | 6 ++-- .../Foundation/NSGarbageCollector.rs | 6 ++-- .../src/generated/Foundation/NSGeometry.rs | 6 ++-- .../generated/Foundation/NSHFSFileTypes.rs | 6 ++-- .../src/generated/Foundation/NSHTTPCookie.rs | 6 ++-- .../Foundation/NSHTTPCookieStorage.rs | 6 ++-- .../src/generated/Foundation/NSHashTable.rs | 6 ++-- .../icrate/src/generated/Foundation/NSHost.rs | 6 ++-- .../Foundation/NSISO8601DateFormatter.rs | 6 ++-- .../src/generated/Foundation/NSIndexPath.rs | 6 ++-- .../src/generated/Foundation/NSIndexSet.rs | 6 ++-- .../generated/Foundation/NSInflectionRule.rs | 6 ++-- .../src/generated/Foundation/NSInvocation.rs | 6 ++-- .../generated/Foundation/NSItemProvider.rs | 6 ++-- .../Foundation/NSJSONSerialization.rs | 6 ++-- .../generated/Foundation/NSKeyValueCoding.rs | 6 ++-- .../Foundation/NSKeyValueObserving.rs | 6 ++-- .../generated/Foundation/NSKeyedArchiver.rs | 6 ++-- .../generated/Foundation/NSLengthFormatter.rs | 6 ++-- .../Foundation/NSLinguisticTagger.rs | 6 ++-- .../generated/Foundation/NSListFormatter.rs | 6 ++-- .../src/generated/Foundation/NSLocale.rs | 6 ++-- .../icrate/src/generated/Foundation/NSLock.rs | 6 ++-- .../src/generated/Foundation/NSMapTable.rs | 6 ++-- .../generated/Foundation/NSMassFormatter.rs | 6 ++-- .../src/generated/Foundation/NSMeasurement.rs | 6 ++-- .../Foundation/NSMeasurementFormatter.rs | 6 ++-- .../src/generated/Foundation/NSMetadata.rs | 6 ++-- .../Foundation/NSMetadataAttributes.rs | 6 ++-- .../generated/Foundation/NSMethodSignature.rs | 6 ++-- .../src/generated/Foundation/NSMorphology.rs | 6 ++-- .../src/generated/Foundation/NSNetServices.rs | 6 ++-- .../generated/Foundation/NSNotification.rs | 6 ++-- .../Foundation/NSNotificationQueue.rs | 6 ++-- .../icrate/src/generated/Foundation/NSNull.rs | 6 ++-- .../generated/Foundation/NSNumberFormatter.rs | 6 ++-- .../src/generated/Foundation/NSObjCRuntime.rs | 6 ++-- .../src/generated/Foundation/NSObject.rs | 6 ++-- .../generated/Foundation/NSObjectScripting.rs | 6 ++-- .../src/generated/Foundation/NSOperation.rs | 6 ++-- .../Foundation/NSOrderedCollectionChange.rs | 6 ++-- .../NSOrderedCollectionDifference.rs | 6 ++-- .../src/generated/Foundation/NSOrderedSet.rs | 6 ++-- .../src/generated/Foundation/NSOrthography.rs | 6 ++-- .../generated/Foundation/NSPathUtilities.rs | 6 ++-- .../Foundation/NSPersonNameComponents.rs | 6 ++-- .../NSPersonNameComponentsFormatter.rs | 6 ++-- .../generated/Foundation/NSPointerArray.rs | 6 ++-- .../Foundation/NSPointerFunctions.rs | 6 ++-- .../icrate/src/generated/Foundation/NSPort.rs | 6 ++-- .../src/generated/Foundation/NSPortCoder.rs | 6 ++-- .../src/generated/Foundation/NSPortMessage.rs | 6 ++-- .../generated/Foundation/NSPortNameServer.rs | 6 ++-- .../src/generated/Foundation/NSPredicate.rs | 6 ++-- .../src/generated/Foundation/NSProcessInfo.rs | 6 ++-- .../src/generated/Foundation/NSProgress.rs | 6 ++-- .../generated/Foundation/NSPropertyList.rs | 6 ++-- .../generated/Foundation/NSProtocolChecker.rs | 6 ++-- .../src/generated/Foundation/NSProxy.rs | 6 ++-- .../src/generated/Foundation/NSRange.rs | 6 ++-- .../Foundation/NSRegularExpression.rs | 6 ++-- .../Foundation/NSRelativeDateTimeFormatter.rs | 6 ++-- .../src/generated/Foundation/NSRunLoop.rs | 6 ++-- .../src/generated/Foundation/NSScanner.rs | 6 ++-- .../Foundation/NSScriptClassDescription.rs | 6 ++-- .../Foundation/NSScriptCoercionHandler.rs | 6 ++-- .../generated/Foundation/NSScriptCommand.rs | 6 ++-- .../Foundation/NSScriptCommandDescription.rs | 6 ++-- .../Foundation/NSScriptExecutionContext.rs | 6 ++-- .../Foundation/NSScriptKeyValueCoding.rs | 6 ++-- .../Foundation/NSScriptObjectSpecifiers.rs | 6 ++-- .../NSScriptStandardSuiteCommands.rs | 6 ++-- .../Foundation/NSScriptSuiteRegistry.rs | 6 ++-- .../Foundation/NSScriptWhoseTests.rs | 6 ++-- .../icrate/src/generated/Foundation/NSSet.rs | 6 ++-- .../generated/Foundation/NSSortDescriptor.rs | 6 ++-- .../src/generated/Foundation/NSSpellServer.rs | 6 ++-- .../src/generated/Foundation/NSStream.rs | 6 ++-- .../src/generated/Foundation/NSString.rs | 6 ++-- .../icrate/src/generated/Foundation/NSTask.rs | 6 ++-- .../Foundation/NSTextCheckingResult.rs | 6 ++-- .../src/generated/Foundation/NSThread.rs | 6 ++-- .../src/generated/Foundation/NSTimeZone.rs | 6 ++-- .../src/generated/Foundation/NSTimer.rs | 6 ++-- .../icrate/src/generated/Foundation/NSURL.rs | 6 ++-- .../NSURLAuthenticationChallenge.rs | 6 ++-- .../src/generated/Foundation/NSURLCache.rs | 6 ++-- .../generated/Foundation/NSURLConnection.rs | 6 ++-- .../generated/Foundation/NSURLCredential.rs | 6 ++-- .../Foundation/NSURLCredentialStorage.rs | 6 ++-- .../src/generated/Foundation/NSURLDownload.rs | 6 ++-- .../src/generated/Foundation/NSURLError.rs | 6 ++-- .../src/generated/Foundation/NSURLHandle.rs | 6 ++-- .../Foundation/NSURLProtectionSpace.rs | 6 ++-- .../src/generated/Foundation/NSURLProtocol.rs | 6 ++-- .../src/generated/Foundation/NSURLRequest.rs | 6 ++-- .../src/generated/Foundation/NSURLResponse.rs | 6 ++-- .../src/generated/Foundation/NSURLSession.rs | 6 ++-- .../icrate/src/generated/Foundation/NSUUID.rs | 6 ++-- .../Foundation/NSUbiquitousKeyValueStore.rs | 6 ++-- .../src/generated/Foundation/NSUndoManager.rs | 6 ++-- .../icrate/src/generated/Foundation/NSUnit.rs | 6 ++-- .../generated/Foundation/NSUserActivity.rs | 6 ++-- .../generated/Foundation/NSUserDefaults.rs | 6 ++-- .../Foundation/NSUserNotification.rs | 6 ++-- .../generated/Foundation/NSUserScriptTask.rs | 6 ++-- .../src/generated/Foundation/NSValue.rs | 6 ++-- .../Foundation/NSValueTransformer.rs | 6 ++-- .../src/generated/Foundation/NSXMLDTD.rs | 6 ++-- .../src/generated/Foundation/NSXMLDTDNode.rs | 6 ++-- .../src/generated/Foundation/NSXMLDocument.rs | 6 ++-- .../src/generated/Foundation/NSXMLElement.rs | 6 ++-- .../src/generated/Foundation/NSXMLNode.rs | 6 ++-- .../generated/Foundation/NSXMLNodeOptions.rs | 6 ++-- .../src/generated/Foundation/NSXMLParser.rs | 6 ++-- .../generated/Foundation/NSXPCConnection.rs | 6 ++-- .../icrate/src/generated/Foundation/NSZone.rs | 6 ++-- crates/icrate/src/lib.rs | 29 +++++++++++++++++++ 445 files changed, 1203 insertions(+), 1762 deletions(-) diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index 88c52762f..918617b7d 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -14,6 +14,8 @@ pub struct Config { #[serde(rename = "protocol")] #[serde(default)] pub protocol_data: HashMap, + #[serde(default)] + pub imports: Vec, } #[derive(Deserialize, Debug, Default, Clone, PartialEq, Eq)] diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 8c74be960..d5b9a6353 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -24,11 +24,7 @@ pub struct RustFile { const INITIAL_IMPORTS: &str = r#"//! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; -"#; +use crate::common::*;"#; impl RustFile { pub fn new() -> Self { @@ -69,9 +65,16 @@ impl RustFile { self.stmts.push(stmt); } - pub fn finish(self) -> (HashSet, String) { + pub fn finish(self, config: &Config) -> (HashSet, String) { let mut tokens = String::new(); writeln!(tokens, "{}", INITIAL_IMPORTS).unwrap(); + + for import in &config.imports { + writeln!(tokens, "use crate::{import}::*;").unwrap(); + } + + writeln!(tokens, "").unwrap(); + for stmt in self.stmts { writeln!(tokens, "{}", stmt).unwrap(); } diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index b00b07a72..751a2d730 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -119,7 +119,8 @@ fn main() { for (library, files) in result { println!("status: writing framework {library}..."); let output_path = crate_src.join("generated").join(&library); - output_files(&output_path, files, FORMAT_INCREMENTALLY).unwrap(); + let config = configs.get(&library).expect("configs get library"); + output_files(&output_path, files, FORMAT_INCREMENTALLY, config).unwrap(); println!("status: written framework {library}"); } @@ -258,11 +259,12 @@ fn output_files( output_path: &Path, files: impl IntoIterator, format_incrementally: bool, + config: &Config, ) -> fmt::Result { let declared: Vec<_> = files .into_iter() .map(|(name, file)| { - let (declared_types, tokens) = file.finish(); + let (declared_types, tokens) = file.finish(config); let mut path = output_path.join(&name); path.set_extension("rs"); diff --git a/crates/icrate/src/AppKit/translation-config.toml b/crates/icrate/src/AppKit/translation-config.toml index 4dd7c2198..5ee1d0b36 100644 --- a/crates/icrate/src/AppKit/translation-config.toml +++ b/crates/icrate/src/AppKit/translation-config.toml @@ -1,3 +1,5 @@ +imports = ["Foundation", "AppKit"] + # These return `oneway void`, which is a bit tricky to handle. [class.NSPasteboard.methods.releaseGlobally] skipped = true diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index efafbc8da..d08808170 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -1,8 +1,13 @@ #[path = "../generated/Foundation/mod.rs"] pub(crate) mod generated; -// TODO -pub use objc2::foundation::*; +pub use objc2::ffi::NSIntegerMax; +pub use objc2::foundation::{ + CGFloat, CGPoint, CGRect, CGSize, NSObject, NSRange, NSTimeInterval, NSZone, +}; pub use objc2::ns_string; +// TODO +pub type NSRangePointer = *const NSRange; + pub use self::generated::__exported::*; diff --git a/crates/icrate/src/Foundation/translation-config.toml b/crates/icrate/src/Foundation/translation-config.toml index 16d48a974..dd4c6ed96 100644 --- a/crates/icrate/src/Foundation/translation-config.toml +++ b/crates/icrate/src/Foundation/translation-config.toml @@ -1,3 +1,5 @@ +imports = ["Foundation"] + [class.NSObject.methods] # Uses NS_REPLACES_RECEIVER awakeAfterUsingCoder = { skipped = true } diff --git a/crates/icrate/src/generated/AppKit/AppKitDefines.rs b/crates/icrate/src/generated/AppKit/AppKitDefines.rs index 9810872e4..9e6a32e39 100644 --- a/crates/icrate/src/generated/AppKit/AppKitDefines.rs +++ b/crates/icrate/src/generated/AppKit/AppKitDefines.rs @@ -1,6 +1,5 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; diff --git a/crates/icrate/src/generated/AppKit/AppKitErrors.rs b/crates/icrate/src/generated/AppKit/AppKitErrors.rs index 669f90eb6..2c351560e 100644 --- a/crates/icrate/src/generated/AppKit/AppKitErrors.rs +++ b/crates/icrate/src/generated/AppKit/AppKitErrors.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub const NSTextReadInapplicableDocumentTypeError: i32 = 65806; pub const NSTextWriteInapplicableDocumentTypeError: i32 = 66062; diff --git a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs index fa0ec0145..a8aca7804 100644 --- a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibility.rs b/crates/icrate/src/generated/AppKit/NSAccessibility.rs index 2105d001b..6ed5d2349 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibility.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibility.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_methods!( /// NSAccessibility diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs index 8c3471a67..057d5d0de 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern "C" { static NSAccessibilityErrorCodeExceptionInfo: &'static NSString; diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs index e4fdcc202..73c84d980 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs index 4b3a0bc16..da7c19ca2 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSAccessibilityCustomRotorSearchDirection = NSInteger; pub const NSAccessibilityCustomRotorSearchDirectionPrevious: diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs index f409f4cb8..efd7c2c96 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs index 8ff0e13e5..4d657c94a 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSAccessibilityGroup = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSActionCell.rs b/crates/icrate/src/generated/AppKit/NSActionCell.rs index fc50f4f27..615b90067 100644 --- a/crates/icrate/src/generated/AppKit/NSActionCell.rs +++ b/crates/icrate/src/generated/AppKit/NSActionCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs index 7cb420fe2..8b098f0c0 100644 --- a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs +++ b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_methods!( /// NSAppKitAdditions diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index 975a09010..2fb566ae4 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSAlertStyle = NSUInteger; pub const NSAlertStyleWarning: NSAlertStyle = 0; diff --git a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs index 817d03620..fa4d524ec 100644 --- a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs +++ b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSAlignmentFeedbackToken = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index 04c697e22..2d1ed3758 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSAnimationCurve = NSUInteger; pub const NSAnimationEaseInOut: NSAnimationCurve = 0; diff --git a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs index dce43934c..681b35864 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index c3804a355..ff79a7a17 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSAppearanceName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs index 13fcbd573..7f3195c31 100644 --- a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs +++ b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_methods!( /// NSExtensions diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 517243399..5bd08d062 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern "C" { static NSAppKitVersionNumber: NSAppKitVersion; diff --git a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs index 77d88117b..e825666aa 100644 --- a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_methods!( /// NSScripting diff --git a/crates/icrate/src/generated/AppKit/NSArrayController.rs b/crates/icrate/src/generated/AppKit/NSArrayController.rs index e83ae43b3..6eebb6a49 100644 --- a/crates/icrate/src/generated/AppKit/NSArrayController.rs +++ b/crates/icrate/src/generated/AppKit/NSArrayController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index 6e592ee77..d3637792e 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern "C" { static NSFontAttributeName: &'static NSAttributedStringKey; diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index 6f4444187..868652853 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSLineCapStyle = NSUInteger; pub const NSLineCapStyleButt: NSLineCapStyle = 0; diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index e4d0c279a..83297410d 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTIFFCompression = NSUInteger; pub const NSTIFFCompressionNone: NSTIFFCompression = 1; diff --git a/crates/icrate/src/generated/AppKit/NSBox.rs b/crates/icrate/src/generated/AppKit/NSBox.rs index 501f617d9..a64458469 100644 --- a/crates/icrate/src/generated/AppKit/NSBox.rs +++ b/crates/icrate/src/generated/AppKit/NSBox.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTitlePosition = NSUInteger; pub const NSNoTitle: NSTitlePosition = 0; diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index 522bc875a..654cb0df6 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; static NSAppKitVersionNumberWithContinuousScrollingBrowser: NSAppKitVersion = 680.0; diff --git a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs index 72e9e5b7a..6a61b042e 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSButton.rs b/crates/icrate/src/generated/AppKit/NSButton.rs index 3178df7d9..4f292a14c 100644 --- a/crates/icrate/src/generated/AppKit/NSButton.rs +++ b/crates/icrate/src/generated/AppKit/NSButton.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs index 67de1672f..46a5d522d 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSButtonType = NSUInteger; pub const NSButtonTypeMomentaryLight: NSButtonType = 0; diff --git a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs index 2631f9e81..4293e21a7 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs index 9b1039042..63eaffff3 100644 --- a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs index 96703e6a5..1642458ad 100644 --- a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index 7fadde0e3..9697f1657 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index c9319155a..025066de7 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSCellType = NSUInteger; pub const NSNullCellType: NSCellType = 0; diff --git a/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs index 9a586d3ca..3c05eee03 100644 --- a/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSClipView.rs b/crates/icrate/src/generated/AppKit/NSClipView.rs index c635d2a2c..a34cc7127 100644 --- a/crates/icrate/src/generated/AppKit/NSClipView.rs +++ b/crates/icrate/src/generated/AppKit/NSClipView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs index 461cd945b..4e19dcea9 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionView.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSCollectionViewDropOperation = NSInteger; pub const NSCollectionViewDropOn: NSCollectionViewDropOperation = 0; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 035a05b9e..9b1577536 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSDirectionalRectEdge = NSUInteger; pub const NSDirectionalRectEdgeNone: NSDirectionalRectEdge = 0; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs index ed19466c2..6bc7edef3 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSCollectionViewScrollDirection = NSInteger; pub const NSCollectionViewScrollDirectionVertical: NSCollectionViewScrollDirection = 0; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs index 45255eee7..8c189ff4a 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs index 653bee041..0d748ec26 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSCollectionElementCategory = NSInteger; pub const NSCollectionElementCategoryItem: NSCollectionElementCategory = 0; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs index 5633b0dd6..7f5722a8f 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSCollectionViewTransitionLayoutAnimatedKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index e4fe1e262..e6ae3458b 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; static NSAppKitVersionNumberWithPatternColorLeakFix: NSAppKitVersion = 641.0; diff --git a/crates/icrate/src/generated/AppKit/NSColorList.rs b/crates/icrate/src/generated/AppKit/NSColorList.rs index 1e0c147a5..b7b843380 100644 --- a/crates/icrate/src/generated/AppKit/NSColorList.rs +++ b/crates/icrate/src/generated/AppKit/NSColorList.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSColorListName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index 31bd67b3f..cf5e4fa91 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSColorPanelMode = NSInteger; pub const NSColorPanelModeNone: NSColorPanelMode = -1; diff --git a/crates/icrate/src/generated/AppKit/NSColorPicker.rs b/crates/icrate/src/generated/AppKit/NSColorPicker.rs index b6776cd6a..9e779141d 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicker.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicker.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs index 1c6e3e300..5aca76f42 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSColorPicking.rs b/crates/icrate/src/generated/AppKit/NSColorPicking.rs index 221cf7279..2a872473a 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicking.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicking.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSColorPickingDefault = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSColorSampler.rs b/crates/icrate/src/generated/AppKit/NSColorSampler.rs index 882daacb7..8c2fea053 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSampler.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSampler.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index 1d75343e9..b840e8506 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSColorSpaceModel = NSInteger; pub const NSColorSpaceModelUnknown: NSColorSpaceModel = -1; diff --git a/crates/icrate/src/generated/AppKit/NSColorWell.rs b/crates/icrate/src/generated/AppKit/NSColorWell.rs index 86ae4d99e..36e1e81ab 100644 --- a/crates/icrate/src/generated/AppKit/NSColorWell.rs +++ b/crates/icrate/src/generated/AppKit/NSColorWell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSComboBox.rs b/crates/icrate/src/generated/AppKit/NSComboBox.rs index 88a601136..43b82418c 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBox.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBox.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern "C" { static NSComboBoxWillPopUpNotification: &'static NSNotificationName; diff --git a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs index 31f33c223..670c186e5 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index 845138c19..0c27e3c8c 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSController.rs b/crates/icrate/src/generated/AppKit/NSController.rs index 0d2e81ad5..a4e42d8d4 100644 --- a/crates/icrate/src/generated/AppKit/NSController.rs +++ b/crates/icrate/src/generated/AppKit/NSController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs index d80729113..2ad4634ec 100644 --- a/crates/icrate/src/generated/AppKit/NSCursor.rs +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs index 18d9be5eb..f33269671 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs index e987ded61..507f52be0 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDataAsset.rs b/crates/icrate/src/generated/AppKit/NSDataAsset.rs index c5823eff4..6dbd857c0 100644 --- a/crates/icrate/src/generated/AppKit/NSDataAsset.rs +++ b/crates/icrate/src/generated/AppKit/NSDataAsset.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSDataAssetName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSDatePicker.rs b/crates/icrate/src/generated/AppKit/NSDatePicker.rs index d1222afea..8d175fab0 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePicker.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePicker.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index ba90775a3..a7619b453 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSDatePickerStyle = NSUInteger; pub const NSDatePickerStyleTextFieldAndStepper: NSDatePickerStyle = 0; diff --git a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs index a5a7a5c61..5bfd1dcb6 100644 --- a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs +++ b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index 948ddebb5..a5fcd33cc 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDockTile.rs b/crates/icrate/src/generated/AppKit/NSDockTile.rs index 3b6384a07..1206e8020 100644 --- a/crates/icrate/src/generated/AppKit/NSDockTile.rs +++ b/crates/icrate/src/generated/AppKit/NSDockTile.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; static NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = 1001.0; diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index b89a10aca..14e2dbbe6 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSDocumentChangeType = NSUInteger; pub const NSChangeDone: NSDocumentChangeType = 0; diff --git a/crates/icrate/src/generated/AppKit/NSDocumentController.rs b/crates/icrate/src/generated/AppKit/NSDocumentController.rs index 0058053aa..86785fc51 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentController.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs index f25437e10..5861dce7b 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_methods!( /// NSScripting diff --git a/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs index eed800538..0c3e02479 100644 --- a/crates/icrate/src/generated/AppKit/NSDragging.rs +++ b/crates/icrate/src/generated/AppKit/NSDragging.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSDragOperation = NSUInteger; pub const NSDragOperationNone: NSDragOperation = 0; diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs index a717d5983..bf1743156 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSDraggingImageComponentKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs index a7ac4cd36..cf84fd82b 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index b37309393..1ac6985f5 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSDrawerState = NSUInteger; pub const NSDrawerClosedState: NSDrawerState = 0; diff --git a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs index a0622a919..bcf0d49d0 100644 --- a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSErrors.rs b/crates/icrate/src/generated/AppKit/NSErrors.rs index c6a954b5e..0feab0193 100644 --- a/crates/icrate/src/generated/AppKit/NSErrors.rs +++ b/crates/icrate/src/generated/AppKit/NSErrors.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern "C" { static NSTextLineTooLongException: &'static NSExceptionName; diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 8c73fda06..3a0251ff3 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSEventType = NSUInteger; pub const NSEventTypeLeftMouseDown: NSEventType = 1; diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs index 546d8d10b..3f9ef12c9 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs index 5f5889e02..1be3d2b6a 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs index 3a28f4f70..f85c30fc4 100644 --- a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs +++ b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_methods!( /// NSExtensions diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index ec0d17567..8c4472ae4 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern "C" { static NSFontIdentityMatrix: NonNull; diff --git a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs index 2c5800d39..5d90cbdfa 100644 --- a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs +++ b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSFontAssetRequestOptions = NSUInteger; pub const NSFontAssetRequestOptionUsesStandardUI: NSFontAssetRequestOptions = 1 << 0; diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index 0c8b4a499..9b71ab8fc 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/NSFontCollection.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSFontCollectionVisibility = NSUInteger; pub const NSFontCollectionVisibilityProcess: NSFontCollectionVisibility = 1 << 0; diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 948c29718..502d3b74c 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSFontSymbolicTraits = u32; diff --git a/crates/icrate/src/generated/AppKit/NSFontManager.rs b/crates/icrate/src/generated/AppKit/NSFontManager.rs index 1627e6538..acd4cc743 100644 --- a/crates/icrate/src/generated/AppKit/NSFontManager.rs +++ b/crates/icrate/src/generated/AppKit/NSFontManager.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSFontTraitMask = NSUInteger; pub const NSItalicFontMask: NSFontTraitMask = 0x00000001; diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index 2c3636cfa..95b2bfad5 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSFontPanelModeMask = NSUInteger; pub const NSFontPanelModeMaskFace: NSFontPanelModeMask = 1 << 0; diff --git a/crates/icrate/src/generated/AppKit/NSForm.rs b/crates/icrate/src/generated/AppKit/NSForm.rs index bbdb53aa4..b33fdfe1a 100644 --- a/crates/icrate/src/generated/AppKit/NSForm.rs +++ b/crates/icrate/src/generated/AppKit/NSForm.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSFormCell.rs b/crates/icrate/src/generated/AppKit/NSFormCell.rs index 9c9aaddb2..bd5b182e1 100644 --- a/crates/icrate/src/generated/AppKit/NSFormCell.rs +++ b/crates/icrate/src/generated/AppKit/NSFormCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index b15feafd6..e314d93f3 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSGestureRecognizerState = NSInteger; pub const NSGestureRecognizerStatePossible: NSGestureRecognizerState = 0; diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index 33143385f..5adba94be 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub const NSShowControlGlyphs: i32 = 1 << 0; pub const NSShowInvisibleGlyphs: i32 = 1 << 1; diff --git a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs index 238ea057f..711d7e5ad 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index 3e20f3d4e..aa953f09f 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/NSGradient.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSGradientDrawingOptions = NSUInteger; pub const NSGradientDrawsBeforeStartingLocation: NSGradientDrawingOptions = 1 << 0; diff --git a/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs index 51756f6fa..08cce65de 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphics.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphics.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSCompositingOperation = NSUInteger; pub const NSCompositingOperationClear: NSCompositingOperation = 0; diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index 313184a70..30bf6df2f 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSGraphicsContextAttributeKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index 8eca28713..70e7e29fa 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSGridCellPlacement = NSInteger; pub const NSGridCellPlacementInherited: NSGridCellPlacement = 0; diff --git a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs index 88bfa48ed..991a9afc2 100644 --- a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs index e0dd8a2d1..14b4ecd84 100644 --- a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs +++ b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSHapticFeedbackPattern = NSInteger; pub const NSHapticFeedbackPatternGeneric: NSHapticFeedbackPattern = 0; diff --git a/crates/icrate/src/generated/AppKit/NSHelpManager.rs b/crates/icrate/src/generated/AppKit/NSHelpManager.rs index 4ac8757d3..c9d4f6541 100644 --- a/crates/icrate/src/generated/AppKit/NSHelpManager.rs +++ b/crates/icrate/src/generated/AppKit/NSHelpManager.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSHelpBookName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index a5b541988..7ebd3b659 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSImageName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSImageCell.rs b/crates/icrate/src/generated/AppKit/NSImageCell.rs index 73f553b77..db455c4b2 100644 --- a/crates/icrate/src/generated/AppKit/NSImageCell.rs +++ b/crates/icrate/src/generated/AppKit/NSImageCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSImageAlignment = NSUInteger; pub const NSImageAlignCenter: NSImageAlignment = 0; diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index c6094b3da..c37d475b3 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSImageHintKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSImageView.rs b/crates/icrate/src/generated/AppKit/NSImageView.rs index c4f53307d..a1fcc3428 100644 --- a/crates/icrate/src/generated/AppKit/NSImageView.rs +++ b/crates/icrate/src/generated/AppKit/NSImageView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSInputManager.rs b/crates/icrate/src/generated/AppKit/NSInputManager.rs index 34998d7bf..3d23dd39e 100644 --- a/crates/icrate/src/generated/AppKit/NSInputManager.rs +++ b/crates/icrate/src/generated/AppKit/NSInputManager.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextInput = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSInputServer.rs b/crates/icrate/src/generated/AppKit/NSInputServer.rs index 9eddef952..422516a53 100644 --- a/crates/icrate/src/generated/AppKit/NSInputServer.rs +++ b/crates/icrate/src/generated/AppKit/NSInputServer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSInputServiceProvider = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs index 7e8ba3361..8cf3530e4 100644 --- a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub const NSNoInterfaceStyle: i32 = 0; pub const NSNextStepInterfaceStyle: i32 = 1; diff --git a/crates/icrate/src/generated/AppKit/NSItemProvider.rs b/crates/icrate/src/generated/AppKit/NSItemProvider.rs index cc651a191..cc20fde0f 100644 --- a/crates/icrate/src/generated/AppKit/NSItemProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSItemProvider.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_methods!( /// NSItemSourceInfo diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index fe4da88ef..4fd785a83 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSBindingName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs index c651460ff..b972259f7 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index d05dec7bc..20c71307d 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; static NSLayoutPriorityRequired: NSLayoutPriority = 1000; diff --git a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs index be2e63a50..e2f65b8b1 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index f422e5450..97e2b0e4d 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextLayoutOrientation = NSInteger; pub const NSTextLayoutOrientationHorizontal: NSTextLayoutOrientation = 0; diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs index 24d306e65..6d7845ec0 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSLevelIndicatorPlaceholderVisibility = NSInteger; pub const NSLevelIndicatorPlaceholderVisibilityAutomatic: NSLevelIndicatorPlaceholderVisibility = 0; diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs index 6b776b43d..e4fc91f14 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSLevelIndicatorStyle = NSUInteger; pub const NSLevelIndicatorStyleRelevancy: NSLevelIndicatorStyle = 0; diff --git a/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs index 8b822d44d..0c47bc896 100644 --- a/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index 639a7b179..0780fb65f 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSMatrixMode = NSUInteger; pub const NSRadioModeMatrix: NSMatrixMode = 0; diff --git a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs index db7ff5af6..1632fc9ce 100644 --- a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs +++ b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSMediaLibrary = NSUInteger; pub const NSMediaLibraryAudio: NSMediaLibrary = 1 << 0; diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index a12497e0e..21d246626 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs index ad5533ff5..1dc6c0eaf 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs index ada3f0d5c..55727a8bc 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs index dce08c647..d26aa36c3 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSMovie.rs b/crates/icrate/src/generated/AppKit/NSMovie.rs index c5ff54b86..85302451b 100644 --- a/crates/icrate/src/generated/AppKit/NSMovie.rs +++ b/crates/icrate/src/generated/AppKit/NSMovie.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index 863458d5c..446fc3f60 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSNibName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs b/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs index 9810872e4..9e6a32e39 100644 --- a/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs +++ b/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs @@ -1,6 +1,5 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; diff --git a/crates/icrate/src/generated/AppKit/NSNibLoading.rs b/crates/icrate/src/generated/AppKit/NSNibLoading.rs index 868382e28..dab1fa31d 100644 --- a/crates/icrate/src/generated/AppKit/NSNibLoading.rs +++ b/crates/icrate/src/generated/AppKit/NSNibLoading.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_methods!( /// NSNibLoading diff --git a/crates/icrate/src/generated/AppKit/NSObjectController.rs b/crates/icrate/src/generated/AppKit/NSObjectController.rs index cacf4b23f..a69920394 100644 --- a/crates/icrate/src/generated/AppKit/NSObjectController.rs +++ b/crates/icrate/src/generated/AppKit/NSObjectController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index 596f28d5e..ac8d1db4f 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSOpenGLGlobalOption = u32; pub const NSOpenGLGOFormatCacheSize: NSOpenGLGlobalOption = 501; diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs index 3879b04a8..6e81bb3cd 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs index 6c8be517d..29e83261c 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs index 801869839..706c953ba 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index 289214fac..b5e45eaa8 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub const NSOutlineViewDropOnItemIndex: i32 = -1; diff --git a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs index ab942ad4f..b27b0243e 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs index 6eaec1d57..a96509933 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs index 87a998c51..48f881031 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPDFPanelOptions = NSInteger; pub const NSPDFPanelShowsPaperSize: NSPDFPanelOptions = 1 << 2; diff --git a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs index 74c8e1ce6..9ba1f9daf 100644 --- a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPageController.rs b/crates/icrate/src/generated/AppKit/NSPageController.rs index 57e3e173c..7dc099f64 100644 --- a/crates/icrate/src/generated/AppKit/NSPageController.rs +++ b/crates/icrate/src/generated/AppKit/NSPageController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPageControllerObjectIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSPageLayout.rs b/crates/icrate/src/generated/AppKit/NSPageLayout.rs index 65129ff68..45af8c859 100644 --- a/crates/icrate/src/generated/AppKit/NSPageLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSPageLayout.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs index 33ebc4421..51ff608e8 100644 --- a/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index 89e9a26d8..d324ccb85 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index b3f8e21a0..1b8c6130d 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSLineBreakMode = NSUInteger; pub const NSLineBreakByWordWrapping: NSLineBreakMode = 0; diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index 701068204..86ea0622a 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPasteboardType = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs index 9a3e5703f..0ae639b5a 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs index 58234c60b..ca2466375 100644 --- a/crates/icrate/src/generated/AppKit/NSPathCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPathStyle = NSInteger; pub const NSPathStyleStandard: NSPathStyle = 0; diff --git a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs index 72fc29e23..7a4811d1c 100644 --- a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPathControl.rs b/crates/icrate/src/generated/AppKit/NSPathControl.rs index 6e394e80f..ac0572a6d 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControl.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControl.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs index 8356d4c0e..f99570245 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs index 9ed6de977..10271a5c3 100644 --- a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs index 8b9655c79..707faf56b 100644 --- a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPickerTouchBarItemSelectionMode = NSInteger; pub const NSPickerTouchBarItemSelectionModeSelectOne: NSPickerTouchBarItemSelectionMode = 0; diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs index ea7a9b760..dbb80890d 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index 137ef97a9..f6f9e4307 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPopUpArrowPosition = NSUInteger; pub const NSPopUpNoArrow: NSPopUpArrowPosition = 0; diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index 32378c329..2772f602e 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPopoverAppearance = NSInteger; pub const NSPopoverAppearanceMinimal: NSPopoverAppearance = 0; diff --git a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs index 13f1c612b..d0a05b882 100644 --- a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs index 26db0adcb..93c9969d4 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs index 6a8bb2ba3..01048de2f 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs index b80502be1..4b2e9d10c 100644 --- a/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs index 25304f887..4611d0bd3 100644 --- a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs index 593cf78fc..baa75e5d9 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPaperOrientation = NSInteger; pub const NSPaperOrientationPortrait: NSPaperOrientation = 0; diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs index ca8eedc61..cc3f1d6b7 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPrintingPageOrder = NSInteger; pub const NSDescendingPageOrder: NSPrintingPageOrder = -1; diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index e30da3c10..464fe713a 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPrintPanelOptions = NSUInteger; pub const NSPrintPanelShowsCopies: NSPrintPanelOptions = 1 << 0; diff --git a/crates/icrate/src/generated/AppKit/NSPrinter.rs b/crates/icrate/src/generated/AppKit/NSPrinter.rs index a9a4cb34e..8244246cb 100644 --- a/crates/icrate/src/generated/AppKit/NSPrinter.rs +++ b/crates/icrate/src/generated/AppKit/NSPrinter.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSPrinterTableStatus = NSUInteger; pub const NSPrinterTableOK: NSPrinterTableStatus = 0; diff --git a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs index 4e28211c5..1883e4625 100644 --- a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSProgressIndicatorStyle = NSUInteger; pub const NSProgressIndicatorStyleBar: NSProgressIndicatorStyle = 0; diff --git a/crates/icrate/src/generated/AppKit/NSResponder.rs b/crates/icrate/src/generated/AppKit/NSResponder.rs index c6499846d..890160e61 100644 --- a/crates/icrate/src/generated/AppKit/NSResponder.rs +++ b/crates/icrate/src/generated/AppKit/NSResponder.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs index 1186a7e75..27542051f 100644 --- a/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index 3647af132..18a8d35bc 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSRuleEditorPredicatePartKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs index 1cbff46e0..9ca6c25fc 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs index 8f86d7d4f..b0270daac 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerView.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSRulerOrientation = NSUInteger; pub const NSHorizontalRuler: NSRulerOrientation = 0; diff --git a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs index 5a751043f..1f715fa11 100644 --- a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSApplicationActivationOptions = NSUInteger; pub const NSApplicationActivateAllWindows: NSApplicationActivationOptions = 1 << 0; diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index 678a85730..b7de0ecfd 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub const NSFileHandlingPanelCancelButton: i32 = NSModalResponseCancel; pub const NSFileHandlingPanelOKButton: i32 = NSModalResponseOK; diff --git a/crates/icrate/src/generated/AppKit/NSScreen.rs b/crates/icrate/src/generated/AppKit/NSScreen.rs index b2f1eca50..d319d4369 100644 --- a/crates/icrate/src/generated/AppKit/NSScreen.rs +++ b/crates/icrate/src/generated/AppKit/NSScreen.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index 1c05e11ce..b3de59322 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSScrollElasticity = NSInteger; pub const NSScrollElasticityAutomatic: NSScrollElasticity = 0; diff --git a/crates/icrate/src/generated/AppKit/NSScroller.rs b/crates/icrate/src/generated/AppKit/NSScroller.rs index 21cacfd60..a4ffc2d8b 100644 --- a/crates/icrate/src/generated/AppKit/NSScroller.rs +++ b/crates/icrate/src/generated/AppKit/NSScroller.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSUsableScrollerParts = NSUInteger; pub const NSNoScrollerParts: NSUsableScrollerParts = 0; diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs index 121957881..418483045 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubber.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSScrubberDataSource = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs index c044da4f6..6e3052c6d 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs index ea994c17a..dcd7c2d82 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSearchField.rs b/crates/icrate/src/generated/AppKit/NSSearchField.rs index 14943f6df..0201d8829 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchField.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchField.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSSearchFieldRecentsAutosaveName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs index 6600bbeec..73b817968 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; static NSSearchFieldRecentsTitleMenuItemTag: NSInteger = 1000; diff --git a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs index bfa33ba16..d43d5dc87 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSecureTextField.rs b/crates/icrate/src/generated/AppKit/NSSecureTextField.rs index 5eb11b434..e98587bf0 100644 --- a/crates/icrate/src/generated/AppKit/NSSecureTextField.rs +++ b/crates/icrate/src/generated/AppKit/NSSecureTextField.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs index 4103f354e..f07044c4a 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs index 68023fc94..510a4bd98 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSSegmentSwitchTracking = NSUInteger; pub const NSSegmentSwitchTrackingSelectOne: NSSegmentSwitchTracking = 0; diff --git a/crates/icrate/src/generated/AppKit/NSShadow.rs b/crates/icrate/src/generated/AppKit/NSShadow.rs index b81e9da9a..14a52f1ea 100644 --- a/crates/icrate/src/generated/AppKit/NSShadow.rs +++ b/crates/icrate/src/generated/AppKit/NSShadow.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index a542c7e67..d6f8517e3 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSSharingServiceName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs index 9ea572b95..905d74b03 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs index 4f3da3b77..f04e07f28 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSlider.rs b/crates/icrate/src/generated/AppKit/NSSlider.rs index 56032ae9e..fa907b647 100644 --- a/crates/icrate/src/generated/AppKit/NSSlider.rs +++ b/crates/icrate/src/generated/AppKit/NSSlider.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs index adf27710f..8bf9e55f8 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index 7e2d30e34..a1a4227e0 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTickMarkPosition = NSUInteger; pub const NSTickMarkPositionBelow: NSTickMarkPosition = 0; diff --git a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs index d92bc26e1..95f8f57ef 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSSliderAccessoryWidth = CGFloat; diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs index 6d8cd449f..c270bbb8b 100644 --- a/crates/icrate/src/generated/AppKit/NSSound.rs +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern "C" { static NSSoundPboardType: &'static NSPasteboardType; diff --git a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs index 01238c1d2..375f54521 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index bd63125dd..1f9ed2664 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSSpeechSynthesizerVoiceName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index b6b2d33c9..1cafd8950 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextCheckingOptionKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs index d5df86943..3bbcf4862 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSChangeSpelling = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs index bb804f08b..dd81b7c06 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitView.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSSplitViewAutosaveName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs index 8f1a6f653..8908041b8 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern "C" { static NSSplitViewControllerAutomaticDimension: CGFloat; diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs index 5690dcd55..c0f4c01ea 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSSplitViewItemBehavior = NSInteger; pub const NSSplitViewItemBehaviorDefault: NSSplitViewItemBehavior = 0; diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index e47d30f1a..77611c1e7 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSStackViewGravity = NSInteger; pub const NSStackViewGravityTop: NSStackViewGravity = 1; diff --git a/crates/icrate/src/generated/AppKit/NSStatusBar.rs b/crates/icrate/src/generated/AppKit/NSStatusBar.rs index 8faa80900..d73197a86 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBar.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBar.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; static NSVariableStatusItemLength: CGFloat = -1.0; diff --git a/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs b/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs index 5b557cc9e..e6a3a5c0f 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs index 1da6c722d..3f2870f9d 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSStatusItemAutosaveName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSStepper.rs b/crates/icrate/src/generated/AppKit/NSStepper.rs index 6231b37d0..669a5fcef 100644 --- a/crates/icrate/src/generated/AppKit/NSStepper.rs +++ b/crates/icrate/src/generated/AppKit/NSStepper.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStepperCell.rs b/crates/icrate/src/generated/AppKit/NSStepperCell.rs index 0b16fe6a6..9844aff3b 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperCell.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs index c4c5a83eb..db530019e 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStoryboard.rs b/crates/icrate/src/generated/AppKit/NSStoryboard.rs index 452475d0d..99b1a8435 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboard.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboard.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSStoryboardName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs index 373812ff5..38334eaf8 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSStoryboardSegueIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs index f09b7bf2f..ec76cb3fc 100644 --- a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs +++ b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSwitch.rs b/crates/icrate/src/generated/AppKit/NSSwitch.rs index 75cdf4ce3..40172550f 100644 --- a/crates/icrate/src/generated/AppKit/NSSwitch.rs +++ b/crates/icrate/src/generated/AppKit/NSSwitch.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs index 2904b8efe..f2c7433bb 100644 --- a/crates/icrate/src/generated/AppKit/NSTabView.rs +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; static NSAppKitVersionNumberWithDirectionalTabs: NSAppKitVersion = 631.0; diff --git a/crates/icrate/src/generated/AppKit/NSTabViewController.rs b/crates/icrate/src/generated/AppKit/NSTabViewController.rs index 56403cda8..8df0234bb 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTabViewControllerTabStyle = NSInteger; pub const NSTabViewControllerTabStyleSegmentedControlOnTop: NSTabViewControllerTabStyle = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs index d632cd690..cb4aae9bc 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTabState = NSUInteger; pub const NSSelectedTab: NSTabState = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTableCellView.rs b/crates/icrate/src/generated/AppKit/NSTableCellView.rs index 187202e12..2413944da 100644 --- a/crates/icrate/src/generated/AppKit/NSTableCellView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableCellView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs index 33b78cea7..c106f18b8 100644 --- a/crates/icrate/src/generated/AppKit/NSTableColumn.rs +++ b/crates/icrate/src/generated/AppKit/NSTableColumn.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTableColumnResizingOptions = NSUInteger; pub const NSTableColumnNoResizing: NSTableColumnResizingOptions = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs index 4d83a6cb8..3c4909b0a 100644 --- a/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs index 0a7728b6c..aa75825ed 100644 --- a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTableRowView.rs b/crates/icrate/src/generated/AppKit/NSTableRowView.rs index 178ad7f51..454e19e29 100644 --- a/crates/icrate/src/generated/AppKit/NSTableRowView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableRowView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index 64925a551..30c1e4b0b 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTableViewDropOperation = NSUInteger; pub const NSTableViewDropOn: NSTableViewDropOperation = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs index 6f7f6fe4d..65f4c4d61 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs index 23bcd3187..6a14eaf7a 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTableViewRowActionStyle = NSInteger; pub const NSTableViewRowActionStyleRegular: NSTableViewRowActionStyle = 0; diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index daa6e4310..9d96ebec0 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextAlignment = NSInteger; pub const NSTextAlignmentLeft: NSTextAlignment = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs index 69d5334a2..ec5942dd3 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index a41f6f29a..1b36063a6 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub const NSAttachmentCharacter: i32 = 0xFFFC; diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs index 2fd78f5e1..5e4bc6859 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs index a05fc542b..a198b2f81 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextInputTraitType = NSInteger; pub const NSTextInputTraitTypeDefault: NSTextInputTraitType = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs index 1b6552183..6dbfb8107 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextContainer.rs b/crates/icrate/src/generated/AppKit/NSTextContainer.rs index 00076adea..3688fac22 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContainer.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContainer.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextContent.rs b/crates/icrate/src/generated/AppKit/NSTextContent.rs index 81703a67e..267768ca8 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContent.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContent.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextContentType = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index be4d92fd6..d722d650a 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextContentManagerEnumerationOptions = NSUInteger; pub const NSTextContentManagerEnumerationOptionsNone: NSTextContentManagerEnumerationOptions = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextElement.rs b/crates/icrate/src/generated/AppKit/NSTextElement.rs index 45d848896..bd7fe2d21 100644 --- a/crates/icrate/src/generated/AppKit/NSTextElement.rs +++ b/crates/icrate/src/generated/AppKit/NSTextElement.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextField.rs b/crates/icrate/src/generated/AppKit/NSTextField.rs index c4b8fd95c..3bc00bfcb 100644 --- a/crates/icrate/src/generated/AppKit/NSTextField.rs +++ b/crates/icrate/src/generated/AppKit/NSTextField.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs index d8a66e217..e583b0803 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextFieldBezelStyle = NSUInteger; pub const NSTextFieldSquareBezel: NSTextFieldBezelStyle = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index bfb0f4c9c..9dbafe30c 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextFinderAction = NSInteger; pub const NSTextFinderActionShowFindInterface: NSTextFinderAction = 1; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs index a0708d972..face0d45d 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs @@ -1,8 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextInputClient = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs index 8e02b3821..3e63482de 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextInputSourceIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index 1d01b9c06..c11e25c8f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextLayoutFragmentEnumerationOptions = NSUInteger; pub const NSTextLayoutFragmentEnumerationOptionsNone: NSTextLayoutFragmentEnumerationOptions = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index 8f0409193..73df49414 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextLayoutManagerSegmentType = NSInteger; pub const NSTextLayoutManagerSegmentTypeStandard: NSTextLayoutManagerSegmentType = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs index 0485decf4..fddcfc0cb 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index a4917035b..b02640dbe 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextListMarkerFormat = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTextRange.rs b/crates/icrate/src/generated/AppKit/NSTextRange.rs index 1f365dad1..5574765e4 100644 --- a/crates/icrate/src/generated/AppKit/NSTextRange.rs +++ b/crates/icrate/src/generated/AppKit/NSTextRange.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextLocation = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextSelection.rs b/crates/icrate/src/generated/AppKit/NSTextSelection.rs index fb72d2335..7c332aeb7 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelection.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelection.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextSelectionGranularity = NSInteger; pub const NSTextSelectionGranularityCharacter: NSTextSelectionGranularity = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index bc5d9a6ac..761b8c674 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextSelectionNavigationDirection = NSInteger; pub const NSTextSelectionNavigationDirectionForward: NSTextSelectionNavigationDirection = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index 171f64f11..4036bcde3 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextStorageEditActions = NSUInteger; pub const NSTextStorageEditedAttributes: NSTextStorageEditActions = 1 << 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs index 8819df641..e1353b1b1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_methods!( /// Scripting diff --git a/crates/icrate/src/generated/AppKit/NSTextTable.rs b/crates/icrate/src/generated/AppKit/NSTextTable.rs index 9c960259e..7982ad131 100644 --- a/crates/icrate/src/generated/AppKit/NSTextTable.rs +++ b/crates/icrate/src/generated/AppKit/NSTextTable.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextBlockValueType = NSUInteger; pub const NSTextBlockAbsoluteValueType: NSTextBlockValueType = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index e727b13f5..50d591b7a 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSSelectionGranularity = NSUInteger; pub const NSSelectByCharacter: NSSelectionGranularity = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs index 74c2e075f..7a84ab099 100644 --- a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTextViewportLayoutControllerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs index 85277b93d..0317b286a 100644 --- a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs b/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs index 1d53451aa..bdef8242b 100644 --- a/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTokenField.rs b/crates/icrate/src/generated/AppKit/NSTokenField.rs index 3a3a3bcce..c6644673c 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenField.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenField.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTokenFieldDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs index 43c3fd323..3cf468a9a 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTokenStyle = NSUInteger; pub const NSTokenStyleDefault: NSTokenStyle = 0; diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index 8e167dfe2..b12a81b10 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSToolbarIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index 2b9cb9268..a536bf5ed 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSToolbarItemVisibilityPriority = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs index 52bf4d763..d50ab0a5f 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSToolbarItemGroupSelectionMode = NSInteger; pub const NSToolbarItemGroupSelectionModeSelectOne: NSToolbarItemGroupSelectionMode = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs index 26252b79c..cf295066c 100644 --- a/crates/icrate/src/generated/AppKit/NSTouch.rs +++ b/crates/icrate/src/generated/AppKit/NSTouch.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTouchPhase = NSUInteger; pub const NSTouchPhaseBegan: NSTouchPhase = 1 << 0; diff --git a/crates/icrate/src/generated/AppKit/NSTouchBar.rs b/crates/icrate/src/generated/AppKit/NSTouchBar.rs index f4c06d7f9..4f1273886 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBar.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBar.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTouchBarCustomizationIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs index 06e31661a..3902c8e9e 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTouchBarItemIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs index d636a7223..30b712a0f 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSTrackingAreaOptions = NSUInteger; pub const NSTrackingMouseEnteredAndExited: NSTrackingAreaOptions = 0x01; diff --git a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs index 560ff7bfa..2d1a38150 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTreeController.rs b/crates/icrate/src/generated/AppKit/NSTreeController.rs index d20acae2f..45ed88a97 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeController.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTreeNode.rs b/crates/icrate/src/generated/AppKit/NSTreeNode.rs index a2d5da0e7..100bb185a 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeNode.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeNode.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs index b567906c8..1c13c6924 100644 --- a/crates/icrate/src/generated/AppKit/NSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSTypesetter.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSUserActivity.rs b/crates/icrate/src/generated/AppKit/NSUserActivity.rs index e96775a0a..48593a98a 100644 --- a/crates/icrate/src/generated/AppKit/NSUserActivity.rs +++ b/crates/icrate/src/generated/AppKit/NSUserActivity.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSUserActivityRestoring = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs index 833634e07..b5b7260f0 100644 --- a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs +++ b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs index aaae6a7df..772ce16b0 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs index bb6f99151..8b0f5eddc 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSUserInterfaceItemIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs index b00dd80d7..9f907deb5 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSUserInterfaceItemSearching = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs index 21b07f7e6..a512432fb 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSUserInterfaceLayoutDirection = NSInteger; pub const NSUserInterfaceLayoutDirectionLeftToRight: NSUserInterfaceLayoutDirection = 0; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs index f84e1d7ae..cb621e7f3 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSValidatedUserInterfaceItem = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 74ce5518d..31e63152f 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSAutoresizingMaskOptions = NSUInteger; pub const NSViewNotSizable: NSAutoresizingMaskOptions = 0; diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index 4fceb42f5..921fd228a 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSViewControllerTransitionOptions = NSUInteger; pub const NSViewControllerTransitionNone: NSViewControllerTransitionOptions = 0x0; diff --git a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs index e540e7acc..d3a239e85 100644 --- a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs +++ b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSVisualEffectMaterial = NSInteger; pub const NSVisualEffectMaterialTitlebar: NSVisualEffectMaterial = 3; diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 9b6b412cd..4ac4f5d9f 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; static NSAppKitVersionNumberWithCustomSheetPosition: NSAppKitVersion = 686.0; diff --git a/crates/icrate/src/generated/AppKit/NSWindowController.rs b/crates/icrate/src/generated/AppKit/NSWindowController.rs index d34d7d299..65444b3e2 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowController.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowController.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs index a73036b89..e838b9c9e 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSWindowRestoration = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs index 2c98ec8ed..8bfa52f65 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_methods!( /// NSScripting diff --git a/crates/icrate/src/generated/AppKit/NSWindowTab.rs b/crates/icrate/src/generated/AppKit/NSWindowTab.rs index 9df096250..75b92686e 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowTab.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowTab.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs index 4dc80a3e7..fde64ec98 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index c344e4e72..989907912 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -1,9 +1,8 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::AppKit::*; +use crate::Foundation::*; pub type NSWorkspaceIconCreationOptions = NSUInteger; pub const NSExcludeQuickDrawElementsIconCreationOption: NSWorkspaceIconCreationOptions = 1 << 1; diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs index 089fce670..8ce4150ac 100644 --- a/crates/icrate/src/generated/Foundation/FoundationErrors.rs +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub const NSFileNoSuchFileError: i32 = 4; pub const NSFileLockingError: i32 = 255; diff --git a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs index 9810872e4..bbc1e79ac 100644 --- a/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs +++ b/crates/icrate/src/generated/Foundation/FoundationLegacySwiftCompatibility.rs @@ -1,6 +1,4 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index 30cbaff47..49782a208 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index f83f70d72..f86b53928 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSAppleEventSendOptions = NSUInteger; pub const NSAppleEventSendNoReply: NSAppleEventSendOptions = kAENoReply; diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index 86936b90f..e6cad4cb1 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSAppleEventTimeOutDefault: c_double; diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index 146c4ed4b..67682ffca 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSAppleScriptErrorMessage: &'static NSString; diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 07c3bc9e7..9e532195e 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index cf112bc6c..121a9eaed 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index d0a0ef69c..940f05156 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSAttributedStringKey = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs index 88b8baf09..f6a8ec6aa 100644 --- a/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs +++ b/crates/icrate/src/generated/Foundation/NSAutoreleasePool.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 1dd2f4016..6d03a0c74 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSBackgroundActivityResult = NSInteger; pub const NSBackgroundActivityResultFinished: NSBackgroundActivityResult = 1; diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index cecb4c9c7..43228ea7b 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub const NSBundleExecutableArchitectureI386: i32 = 0x00000007; pub const NSBundleExecutableArchitecturePPC: i32 = 0x00000012; diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 3b49639c8..2d7e85371 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSByteCountFormatterUnits = NSUInteger; pub const NSByteCountFormatterUseDefault: NSByteCountFormatterUnits = 0; diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index 8d55ca424..8d3c1cf8d 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub const NS_UnknownByteOrder: i32 = CFByteOrderUnknown; pub const NS_LittleEndian: i32 = CFByteOrderLittleEndian; diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index a2e6605f4..b0ca33cfa 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 26434c0ed..2c6757782 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSCalendarIdentifier = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index 87b1dcef0..93b0d6057 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 69a29ae9b..19127cc01 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub const NSOpenStepUnicodeReservedBase: i32 = 0xF400; diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index 00fda168f..bde823677 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index e7837480d..3f1c3dbe4 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSDecodingFailurePolicy = NSInteger; pub const NSDecodingFailurePolicyRaiseException: NSDecodingFailurePolicy = 0; diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index 9fa1069f6..a4ff1b89d 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSComparisonPredicateOptions = NSUInteger; pub const NSCaseInsensitivePredicateOption: NSComparisonPredicateOptions = 0x01; diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 6a299a203..f565782c7 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSCompoundPredicateType = NSUInteger; pub const NSNotPredicateType: NSCompoundPredicateType = 0; diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 63fd4882e..8add11cab 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index d99c4808a..dba9071ac 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSDataReadingOptions = NSUInteger; pub const NSDataReadingMappedIfSafe: NSDataReadingOptions = 1 << 0; diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index ca0728be4..9b43a6ae1 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSSystemClockDidChangeNotification: &'static NSNotificationName; diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 875b407af..109e9aa42 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSDateComponentsFormatterUnitsStyle = NSInteger; pub const NSDateComponentsFormatterUnitsStylePositional: NSDateComponentsFormatterUnitsStyle = 0; diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index d9ae8b693..68411d3ea 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSDateFormatterStyle = NSUInteger; pub const NSDateFormatterNoStyle: NSDateFormatterStyle = kCFDateFormatterNoStyle; diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index a98fa1daa..97f1605ac 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index 726d74190..5c9195e97 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSDateIntervalFormatterStyle = NSUInteger; pub const NSDateIntervalFormatterNoStyle: NSDateIntervalFormatterStyle = 0; diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs index 3f69cc1ed..e005f7e1a 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimal.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSRoundingMode = NSUInteger; pub const NSRoundPlain: NSRoundingMode = 0; diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index 0ccbaf8bf..902318175 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSDecimalNumberExactnessException: &'static NSExceptionName; diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index c6fe08ee9..7cb4b31b9 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index 11dff0515..14a3ba1ce 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index 78a12a12d..da7e6f1a9 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index c7bbce202..93ac76cea 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSDistributedNotificationCenterType = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index b4f5887f9..7f3c4b95c 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSEnergyFormatterUnit = NSInteger; pub const NSEnergyFormatterUnitJoule: NSEnergyFormatterUnit = 11; diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 0a8c03db9..2b1adcb3c 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSFastEnumeration = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 202cbc502..9c8ebeb81 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSErrorDomain = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 5697c7e28..54df2f4b8 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSGenericException: &'static NSExceptionName; diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index e4fe3fee4..956bebf82 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSExpressionType = NSUInteger; pub const NSConstantValueExpressionType: NSExpressionType = 0; diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index dbbeaecd2..9b0fd9c0a 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index 97f9eab7a..7d51ffecc 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs index 81e62de5a..7ad2c8793 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs @@ -1,8 +1,6 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSExtensionRequestHandling = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 3da86c699..62900cafe 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSFileCoordinatorReadingOptions = NSUInteger; pub const NSFileCoordinatorReadingWithoutChanges: NSFileCoordinatorReadingOptions = 1 << 0; diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 7b6851805..34cfec64e 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index e9c5ee980..329951d10 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSFileAttributeKey = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs index 173b3c70a..925fe94ec 100644 --- a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs +++ b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs @@ -1,8 +1,6 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSFilePresenter = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index d2f34a879..0490e376c 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSFileVersionAddingOptions = NSUInteger; pub const NSFileVersionAddingByMoving: NSFileVersionAddingOptions = 1 << 0; diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index e656575ad..847c64434 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSFileWrapperReadingOptions = NSUInteger; pub const NSFileWrapperReadingImmediate: NSFileWrapperReadingOptions = 1 << 0; diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index c407dbab7..5b51a3068 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSFormattingContext = NSInteger; pub const NSFormattingContextUnknown: NSFormattingContext = 0; diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs index be712e173..b059265cd 100644 --- a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 7ef59e48f..e10cd8602 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSPoint = CGPoint; diff --git a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs index 9810872e4..bbc1e79ac 100644 --- a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs +++ b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs @@ -1,6 +1,4 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index 85df2d315..d74ae4494 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSHTTPCookiePropertyKey = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index 71e83dc5c..6ee2a3f45 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSHTTPCookieAcceptPolicy = NSUInteger; pub const NSHTTPCookieAcceptPolicyAlways: NSHTTPCookieAcceptPolicy = 0; diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index dc69b0710..59bbd0589 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; static NSHashTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory; diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index a2b8e3b02..eac7d0b52 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index f63a9e0df..73bbd5a23 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSISO8601DateFormatOptions = NSUInteger; pub const NSISO8601DateFormatWithYear: NSISO8601DateFormatOptions = kCFISO8601DateFormatWithYear; diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index fbed52ab1..4480949af 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index 5dca81c9f..a9a2a55e4 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index f822fbcc1..bb92df980 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index 99bd1ba30..bd0bf8089 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index a82043cd0..3f3a29d68 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSItemProviderRepresentationVisibility = NSInteger; pub const NSItemProviderRepresentationVisibilityAll: NSItemProviderRepresentationVisibility = 0; diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 573c87a3e..e20b68e09 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSJSONReadingOptions = NSUInteger; pub const NSJSONReadingMutableContainers: NSJSONReadingOptions = 1 << 0; diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index 000ffe95d..678d453ed 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSUndefinedKeyException: &'static NSExceptionName; diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 123a5a7e7..ba8859d28 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSKeyValueObservingOptions = NSUInteger; pub const NSKeyValueObservingOptionNew: NSKeyValueObservingOptions = 0x01; diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index d71ec0b75..ab73a53d8 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSInvalidArchiveOperationException: &'static NSExceptionName; diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index afa99901c..9d5c3cac3 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSLengthFormatterUnit = NSInteger; pub const NSLengthFormatterUnitMillimeter: NSLengthFormatterUnit = 8; diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 2eb0a88a3..1b0027d77 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSLinguisticTagScheme = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index 67ec82bac..243f05060 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index b497d7a8e..0e72d21ea 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSLocaleKey = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index 596905456..14f571ca1 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSLocking = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 849d19c27..d0636e067 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; static NSMapTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory; diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index e5aff98cf..3d9c924d4 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSMassFormatterUnit = NSInteger; pub const NSMassFormatterUnitGram: NSMassFormatterUnit = 11; diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index b67d70324..6f3d9a89e 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 098fb6299..330bc363f 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSMeasurementFormatterUnitOptions = NSUInteger; pub const NSMeasurementFormatterUnitOptionsProvidedUnit: NSMeasurementFormatterUnitOptions = 1 << 0; diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 916a077bf..5ae112b49 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs index 71c7db339..5c53b21a6 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSMetadataItemFSNameKey: &'static NSString; diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index 63da8dfd3..5c9a38d05 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index ad9ab5233..769bef83a 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSGrammaticalGender = NSInteger; pub const NSGrammaticalGenderNotSet: NSGrammaticalGender = 0; diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 15b45c1ba..57b62ef16 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSNetServicesErrorCode: &'static NSString; diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index d7ba5715b..0ce627bdc 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSNotificationName = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index acf1b8212..ba74094d2 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSPostingStyle = NSUInteger; pub const NSPostWhenIdle: NSPostingStyle = 1; diff --git a/crates/icrate/src/generated/Foundation/NSNull.rs b/crates/icrate/src/generated/Foundation/NSNull.rs index 3e59f4da6..ba96fd314 100644 --- a/crates/icrate/src/generated/Foundation/NSNull.rs +++ b/crates/icrate/src/generated/Foundation/NSNull.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 088aa02b6..229fe7159 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSNumberFormatterBehavior = NSUInteger; pub const NSNumberFormatterBehaviorDefault: NSNumberFormatterBehavior = 0; diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 0c262e0b5..8e6636478 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSFoundationVersionNumber: c_double; diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index 0c0278fce..e01c5f77c 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSCopying = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs index 96de7a7ad..c0455ada7 100644 --- a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_methods!( /// NSScripting diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 51e019263..15b021855 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSOperationQueuePriority = NSInteger; pub const NSOperationQueuePriorityVeryLow: NSOperationQueuePriority = -8; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 033f1d175..779e29950 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSCollectionChangeType = NSInteger; pub const NSCollectionChangeInsert: NSCollectionChangeType = 0; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 14737ea78..d4ca53a91 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSOrderedCollectionDifferenceCalculationOptions = NSUInteger; pub const NSOrderedCollectionDifferenceCalculationOmitInsertedObjects: diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index a78680156..732ae035d 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index a38fecc95..2d1ff8200 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index 48406476f..266c8e320 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_methods!( /// NSStringPathExtensions diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs index 68f620b3e..66acc2260 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index eb2ec5bc6..e02b23bf8 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSPersonNameComponentsFormatterStyle = NSInteger; pub const NSPersonNameComponentsFormatterStyleDefault: NSPersonNameComponentsFormatterStyle = 0; diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index e3b5281fb..4089b9239 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index b0285a510..af11b2db1 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSPointerFunctionsOptions = NSUInteger; pub const NSPointerFunctionsStrongMemory: NSPointerFunctionsOptions = 0 << 0; diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index b8b991f7c..db8f8e85e 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSPortDidBecomeInvalidNotification: &'static NSNotificationName; diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index 37c2360f2..977b879db 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index e912d8fef..86cdd297b 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index 6c5d36372..153daf3a8 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index f7967aa99..7b8467349 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index bae4c7a8d..eccfe0fde 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub const NSWindowsNTOperatingSystem: i32 = 1; pub const NSWindows95OperatingSystem: i32 = 2; diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 4dadd911f..67fe4bd5c 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSProgressKind = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index f59278e78..58a38e591 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSPropertyListMutabilityOptions = NSUInteger; pub const NSPropertyListImmutable: NSPropertyListMutabilityOptions = kCFPropertyListImmutable; diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index 1275f9bfa..364060a39 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 498d622d1..08dc10191 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index 723f41bb0..f285d0c8e 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_methods!( /// NSValueRangeExtensions diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 9e30cc192..6544b6cf6 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSRegularExpressionOptions = NSUInteger; pub const NSRegularExpressionCaseInsensitive: NSRegularExpressionOptions = 1 << 0; diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index ed7ec7c5a..b2106bd06 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSRelativeDateTimeFormatterStyle = NSInteger; pub const NSRelativeDateTimeFormatterStyleNumeric: NSRelativeDateTimeFormatterStyle = 0; diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 291f6d8a3..f191f6a78 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSDefaultRunLoopMode: &'static NSRunLoopMode; diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 93091bca3..8af3260fb 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index 0c22917ac..5fe39039a 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs index 251b103f0..b6de7b239 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 0e6fdba5f..4c99ba9c7 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub const NSNoScriptError: i32 = 0; pub const NSReceiverEvaluationScriptError: i32 = 1; diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index da4236dc4..b86770295 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index f14a2a0a8..fe83c31ec 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index fce3eca7a..094dc08fd 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSOperationNotSupportedForKeyException: &'static NSString; diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index b4462acad..0408ac53e 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub const NSNoSpecifierError: i32 = 0; pub const NSNoTopLevelContainersSpecifierError: i32 = 1; diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index 5bda32887..0c1448a73 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSSaveOptions = NSUInteger; pub const NSSaveOptionsYes: NSSaveOptions = 0; diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 86d081a87..6547435ee 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index 816626f6f..90df88323 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSTestComparisonOperation = NSUInteger; pub const NSEqualToComparison: NSTestComparisonOperation = 0; diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index fedcff7a8..8796c6ec8 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index 02bf51098..ba70b8145 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 6c122601c..c716341db 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 14bfcab9a..81b7392e4 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSStreamPropertyKey = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 58bd01d45..c9d5c6f03 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSStringCompareOptions = NSUInteger; pub const NSCaseInsensitiveSearch: NSStringCompareOptions = 1; diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 6abc65449..f32494ac6 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSTaskTerminationReason = NSInteger; pub const NSTaskTerminationReasonExit: NSTaskTerminationReason = 1; diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 80ac81610..af70b339e 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSTextCheckingType = u64; pub const NSTextCheckingTypeOrthography: NSTextCheckingType = 1 << 0; diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 79cc6e8b3..707146bf8 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index f02674bb0..165175db2 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 1e1754dbe..11a9e17f8 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index a90420b7a..f8313caf8 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSURLResourceKey = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index 542b6e3ee..a36181a42 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSURLAuthenticationChallengeSender = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index aae1717cb..20af20aea 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSURLCacheStoragePolicy = NSUInteger; pub const NSURLCacheStorageAllowed: NSURLCacheStoragePolicy = 0; diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index f78dd9a47..19b2160ef 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index a8ee52f8d..1c382f9ff 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSURLCredentialPersistence = NSUInteger; pub const NSURLCredentialPersistenceNone: NSURLCredentialPersistence = 0; diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 2baabeef8..b16a5a1bc 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index da37f6efb..fb86809a6 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index e904f452f..eed9761ee 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSURLErrorDomain: &'static NSErrorDomain; diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 142dbb030..59b3d3d01 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSHTTPPropertyStatusCodeKey: Option<&'static NSString>; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index ec75a94a2..52134b661 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSURLProtectionSpaceHTTP: &'static NSString; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index c845acf9b..1c4fbbbb7 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSURLProtocolClient = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 59a3ed356..f3e1be285 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSURLRequestCachePolicy = NSUInteger; pub const NSURLRequestUseProtocolCachePolicy: NSURLRequestCachePolicy = 0; diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index 96a8e0ed1..0932903c0 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index c6be0a54e..c1b2a704f 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSURLSessionTransferSizeUnknown: int64_t; diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index 3fe584660..b04f4f0c8 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 406fa2e44..255a38175 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index c7027e3f1..2c74a446e 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; static NSUndoCloseGroupingRunLoopOrdering: NSUInteger = 350000; diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index 8ed516e20..7422fb1e9 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index e3939956d..3fd5b3561 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSUserActivityPersistentIdentifier = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index 1f7b0e511..f5eb7bef9 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern "C" { static NSGlobalDomain: &'static NSString; diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 579caba27..eccb5e5e4 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSUserNotificationActivationType = NSInteger; pub const NSUserNotificationActivationTypeNone: NSUserNotificationActivationType = 0; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index 083613b13..4f7e6e8e8 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index e9cfb658e..b5aa6a277 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index b2fa3fbe6..42e16a31c 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSValueTransformerName = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index 9f3ead7b7..dce20b599 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index 3e3d99877..8d87e5213 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSXMLDTDNodeKind = NSUInteger; pub const NSXMLEntityGeneralKind: NSXMLDTDNodeKind = 1; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index 0dc899d37..2d9aad69b 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSXMLDocumentContentKind = NSUInteger; pub const NSXMLDocumentXMLKind: NSXMLDocumentContentKind = 0; diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index 60a7abe10..b8d4479ce 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 21027bc70..87e0bbda1 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSXMLNodeKind = NSUInteger; pub const NSXMLInvalidKind: NSXMLNodeKind = 0; diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs index 4498008b0..d348b45f1 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSXMLNodeOptions = NSUInteger; pub const NSXMLNodeOptionsNone: NSXMLNodeOptions = 0; diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 55a9af3b2..899db060d 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSXMLParserExternalEntityResolvingPolicy = NSUInteger; pub const NSXMLParserResolveExternalEntitiesNever: NSXMLParserExternalEntityResolvingPolicy = 0; diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 149e91215..1f6be3e50 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub type NSXPCProxyCreating = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index f60213525..e66818c21 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -1,9 +1,7 @@ //! This file has been automatically generated by `objc2`'s `header-translator`. //! DO NOT EDIT -#[allow(unused_imports)] -use objc2::rc::{Id, Shared}; -#[allow(unused_imports)] -use objc2::{extern_class, extern_methods, ClassType}; +use crate::common::*; +use crate::Foundation::*; pub const NSScannedOption: i32 = 1 << 0; pub const NSCollectorDisabledOption: i32 = 1 << 1; diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index ef250573c..391066d84 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -12,6 +12,9 @@ // Update in Cargo.toml as well. #![doc(html_root_url = "https://docs.rs/icrate/0.0.1")] +#[cfg(feature = "std")] +extern crate std; + #[cfg(feature = "objective-c")] pub use objc2; @@ -20,3 +23,29 @@ pub use objc2; pub mod AppKit; #[cfg(feature = "Foundation")] pub mod Foundation; + +#[allow(unused_imports)] +mod common { + pub(crate) use std::ffi::{ + c_char, c_double, c_float, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint, + c_ulong, c_ulonglong, c_ushort, c_void, + }; + pub(crate) use std::marker::PhantomData; + pub(crate) use std::ptr::NonNull; + + pub(crate) use objc2::ffi::{NSInteger, NSUInteger}; + pub(crate) use objc2::rc::{Id, Shared}; + pub(crate) use objc2::runtime::{Class, Object, Sel}; + pub(crate) use objc2::{ + __inner_extern_class, extern_class, extern_methods, ClassType, Message, + }; + + // TODO + pub(crate) type Protocol = Object; + pub(crate) type TodoBlock = *const c_void; + pub(crate) type TodoFunction = *const c_void; + pub(crate) type TodoArray = *const c_void; + pub(crate) type TodoClass = Object; + + pub(crate) type Boolean = u8; // unsigned char +} From 10c863ba8c21c9fb22a9197a081b671161433378 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 21:12:00 +0100 Subject: [PATCH 094/131] Bump recursion limit --- crates/icrate/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 391066d84..5a8e41026 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -11,6 +11,7 @@ #![allow(non_snake_case)] // Update in Cargo.toml as well. #![doc(html_root_url = "https://docs.rs/icrate/0.0.1")] +#![recursion_limit = "512"] #[cfg(feature = "std")] extern crate std; From fb6538099e78754f45c4d60c73fa931eab8df094 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 17:24:05 +0100 Subject: [PATCH 095/131] Add MacTypes.h type translation --- crates/header-translator/src/rust_type.rs | 20 +++++++++++++++++++ .../Foundation/NSAppleEventDescriptor.rs | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index d6f0ef5be..9d3e3b7ee 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -260,6 +260,8 @@ pub enum RustType { ULongLong, Float, Double, + F32, + F64, I8, U8, I16, @@ -414,6 +416,7 @@ impl RustType { let typedef_name = ty.get_typedef_name().expect("typedef has name"); match &*typedef_name { "BOOL" => Self::ObjcBool, + "int8_t" => Self::I8, "uint8_t" => Self::U8, "int16_t" => Self::I16, @@ -422,6 +425,21 @@ impl RustType { "uint32_t" => Self::U32, "int164_t" => Self::I64, "uint64_t" => Self::U64, + + // MacTypes.h + "UInt8" => Self::U8, + "UInt16" => Self::U16, + "UInt32" => Self::U32, + "UInt64" => Self::U64, + "SInt8" => Self::I8, + "SInt16" => Self::I16, + "SInt32" => Self::I32, + "SInt64" => Self::I64, + "Float32" => Self::F32, + "Float64" => Self::F64, + "Float80" => panic!("can't handle 80 bit MacOS float"), + "Float96" => panic!("can't handle 96 bit 68881 float"), + "instancetype" => Self::Id { type_: GenericType { name: "Self".to_string(), @@ -571,6 +589,8 @@ impl fmt::Display for RustType { ULongLong => write!(f, "c_ulonglong"), Float => write!(f, "c_float"), Double => write!(f, "c_double"), + F32 => write!(f, "f32"), + F64 => write!(f, "f64"), I8 => write!(f, "i8"), U8 => write!(f, "u8"), I16 => write!(f, "i16"), diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index f86b53928..81e4d2ca0 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -55,7 +55,7 @@ extern_methods!( ) -> Id; #[method_id(descriptorWithInt32:)] - pub unsafe fn descriptorWithInt32(signedInt: SInt32) -> Id; + pub unsafe fn descriptorWithInt32(signedInt: i32) -> Id; #[method_id(descriptorWithDouble:)] pub unsafe fn descriptorWithDouble( @@ -160,7 +160,7 @@ extern_methods!( pub unsafe fn enumCodeValue(&self) -> OSType; #[method(int32Value)] - pub unsafe fn int32Value(&self) -> SInt32; + pub unsafe fn int32Value(&self) -> i32; #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; From b95b35708ce829c73a6c78de7832bc611dbbbb05 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 21:14:11 +0100 Subject: [PATCH 096/131] Fix int64_t type translation --- crates/header-translator/src/rust_type.rs | 2 +- .../src/generated/Foundation/NSCoder.rs | 4 +-- .../generated/Foundation/NSKeyedArchiver.rs | 4 +-- .../src/generated/Foundation/NSProgress.rs | 28 +++++++---------- .../src/generated/Foundation/NSURLSession.rs | 30 +++++++++---------- 5 files changed, 31 insertions(+), 37 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 9d3e3b7ee..463715354 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -423,7 +423,7 @@ impl RustType { "uint16_t" => Self::U16, "int32_t" => Self::I32, "uint32_t" => Self::U32, - "int164_t" => Self::I64, + "int64_t" => Self::I64, "uint64_t" => Self::U64, // MacTypes.h diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 3f1c3dbe4..a55e88dc9 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -133,7 +133,7 @@ extern_methods!( pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString); #[method(encodeInt64:forKey:)] - pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString); + pub unsafe fn encodeInt64_forKey(&self, value: i64, key: &NSString); #[method(encodeFloat:forKey:)] pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString); @@ -171,7 +171,7 @@ extern_methods!( pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32; #[method(decodeInt64ForKey:)] - pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t; + pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> i64; #[method(decodeFloatForKey:)] pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float; diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index ab73a53d8..b3904f914 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -91,7 +91,7 @@ extern_methods!( pub unsafe fn encodeInt32_forKey(&self, value: i32, key: &NSString); #[method(encodeInt64:forKey:)] - pub unsafe fn encodeInt64_forKey(&self, value: int64_t, key: &NSString); + pub unsafe fn encodeInt64_forKey(&self, value: i64, key: &NSString); #[method(encodeFloat:forKey:)] pub unsafe fn encodeFloat_forKey(&self, value: c_float, key: &NSString); @@ -212,7 +212,7 @@ extern_methods!( pub unsafe fn decodeInt32ForKey(&self, key: &NSString) -> i32; #[method(decodeInt64ForKey:)] - pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> int64_t; + pub unsafe fn decodeInt64ForKey(&self, key: &NSString) -> i64; #[method(decodeFloatForKey:)] pub unsafe fn decodeFloatForKey(&self, key: &NSString) -> c_float; diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 67fe4bd5c..8e3555bfb 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -24,18 +24,16 @@ extern_methods!( pub unsafe fn currentProgress() -> Option>; #[method_id(progressWithTotalUnitCount:)] - pub unsafe fn progressWithTotalUnitCount(unitCount: int64_t) -> Id; + pub unsafe fn progressWithTotalUnitCount(unitCount: i64) -> Id; #[method_id(discreteProgressWithTotalUnitCount:)] - pub unsafe fn discreteProgressWithTotalUnitCount( - unitCount: int64_t, - ) -> Id; + pub unsafe fn discreteProgressWithTotalUnitCount(unitCount: i64) -> Id; #[method_id(progressWithTotalUnitCount:parent:pendingUnitCount:)] pub unsafe fn progressWithTotalUnitCount_parent_pendingUnitCount( - unitCount: int64_t, + unitCount: i64, parent: &NSProgress, - portionOfParentTotalUnitCount: int64_t, + portionOfParentTotalUnitCount: i64, ) -> Id; #[method_id(initWithParent:userInfo:)] @@ -46,12 +44,12 @@ extern_methods!( ) -> Id; #[method(becomeCurrentWithPendingUnitCount:)] - pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unitCount: int64_t); + pub unsafe fn becomeCurrentWithPendingUnitCount(&self, unitCount: i64); #[method(performAsCurrentWithPendingUnitCount:usingBlock:)] pub unsafe fn performAsCurrentWithPendingUnitCount_usingBlock( &self, - unitCount: int64_t, + unitCount: i64, work: TodoBlock, ); @@ -59,23 +57,19 @@ extern_methods!( pub unsafe fn resignCurrent(&self); #[method(addChild:withPendingUnitCount:)] - pub unsafe fn addChild_withPendingUnitCount( - &self, - child: &NSProgress, - inUnitCount: int64_t, - ); + pub unsafe fn addChild_withPendingUnitCount(&self, child: &NSProgress, inUnitCount: i64); #[method(totalUnitCount)] - pub unsafe fn totalUnitCount(&self) -> int64_t; + pub unsafe fn totalUnitCount(&self) -> i64; #[method(setTotalUnitCount:)] - pub unsafe fn setTotalUnitCount(&self, totalUnitCount: int64_t); + pub unsafe fn setTotalUnitCount(&self, totalUnitCount: i64); #[method(completedUnitCount)] - pub unsafe fn completedUnitCount(&self) -> int64_t; + pub unsafe fn completedUnitCount(&self) -> i64; #[method(setCompletedUnitCount:)] - pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: int64_t); + pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: i64); #[method_id(localizedDescription)] pub unsafe fn localizedDescription(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index c1b2a704f..78368cbc4 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSURLSessionTransferSizeUnknown: int64_t; + static NSURLSessionTransferSizeUnknown: i64; } extern_class!( @@ -254,34 +254,34 @@ extern_methods!( pub unsafe fn setEarliestBeginDate(&self, earliestBeginDate: Option<&NSDate>); #[method(countOfBytesClientExpectsToSend)] - pub unsafe fn countOfBytesClientExpectsToSend(&self) -> int64_t; + pub unsafe fn countOfBytesClientExpectsToSend(&self) -> i64; #[method(setCountOfBytesClientExpectsToSend:)] pub unsafe fn setCountOfBytesClientExpectsToSend( &self, - countOfBytesClientExpectsToSend: int64_t, + countOfBytesClientExpectsToSend: i64, ); #[method(countOfBytesClientExpectsToReceive)] - pub unsafe fn countOfBytesClientExpectsToReceive(&self) -> int64_t; + pub unsafe fn countOfBytesClientExpectsToReceive(&self) -> i64; #[method(setCountOfBytesClientExpectsToReceive:)] pub unsafe fn setCountOfBytesClientExpectsToReceive( &self, - countOfBytesClientExpectsToReceive: int64_t, + countOfBytesClientExpectsToReceive: i64, ); #[method(countOfBytesSent)] - pub unsafe fn countOfBytesSent(&self) -> int64_t; + pub unsafe fn countOfBytesSent(&self) -> i64; #[method(countOfBytesReceived)] - pub unsafe fn countOfBytesReceived(&self) -> int64_t; + pub unsafe fn countOfBytesReceived(&self) -> i64; #[method(countOfBytesExpectedToSend)] - pub unsafe fn countOfBytesExpectedToSend(&self) -> int64_t; + pub unsafe fn countOfBytesExpectedToSend(&self) -> i64; #[method(countOfBytesExpectedToReceive)] - pub unsafe fn countOfBytesExpectedToReceive(&self) -> int64_t; + pub unsafe fn countOfBytesExpectedToReceive(&self) -> i64; #[method_id(taskDescription)] pub unsafe fn taskDescription(&self) -> Option>; @@ -928,22 +928,22 @@ extern_methods!( pub unsafe fn resourceFetchType(&self) -> NSURLSessionTaskMetricsResourceFetchType; #[method(countOfRequestHeaderBytesSent)] - pub unsafe fn countOfRequestHeaderBytesSent(&self) -> int64_t; + pub unsafe fn countOfRequestHeaderBytesSent(&self) -> i64; #[method(countOfRequestBodyBytesSent)] - pub unsafe fn countOfRequestBodyBytesSent(&self) -> int64_t; + pub unsafe fn countOfRequestBodyBytesSent(&self) -> i64; #[method(countOfRequestBodyBytesBeforeEncoding)] - pub unsafe fn countOfRequestBodyBytesBeforeEncoding(&self) -> int64_t; + pub unsafe fn countOfRequestBodyBytesBeforeEncoding(&self) -> i64; #[method(countOfResponseHeaderBytesReceived)] - pub unsafe fn countOfResponseHeaderBytesReceived(&self) -> int64_t; + pub unsafe fn countOfResponseHeaderBytesReceived(&self) -> i64; #[method(countOfResponseBodyBytesReceived)] - pub unsafe fn countOfResponseBodyBytesReceived(&self) -> int64_t; + pub unsafe fn countOfResponseBodyBytesReceived(&self) -> i64; #[method(countOfResponseBodyBytesAfterDecoding)] - pub unsafe fn countOfResponseBodyBytesAfterDecoding(&self) -> int64_t; + pub unsafe fn countOfResponseBodyBytesAfterDecoding(&self) -> i64; #[method_id(localAddress)] pub unsafe fn localAddress(&self) -> Option>; From 4afcce123aebbe63970d4fffcf5d5f0fb1821eab Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 21:14:56 +0100 Subject: [PATCH 097/131] Make statics public --- crates/header-translator/src/stmt.rs | 6 +- .../src/generated/AppKit/NSAccessibility.rs | 3 +- .../AppKit/NSAccessibilityConstants.rs | 656 +++++++++--------- crates/icrate/src/generated/AppKit/NSAlert.rs | 12 +- .../src/generated/AppKit/NSAnimation.rs | 20 +- .../src/generated/AppKit/NSAppearance.rs | 18 +- .../src/generated/AppKit/NSApplication.rs | 186 ++--- .../generated/AppKit/NSAttributedString.rs | 213 +++--- .../src/generated/AppKit/NSBezierPath.rs | 24 +- .../src/generated/AppKit/NSBitmapImageRep.rs | 57 +- crates/icrate/src/generated/AppKit/NSBox.rs | 4 +- .../icrate/src/generated/AppKit/NSBrowser.rs | 6 +- .../src/generated/AppKit/NSButtonCell.rs | 56 +- .../AppKit/NSCandidateListTouchBarItem.rs | 2 +- crates/icrate/src/generated/AppKit/NSCell.rs | 24 +- .../NSCollectionViewCompositionalLayout.rs | 2 +- .../AppKit/NSCollectionViewFlowLayout.rs | 6 +- .../AppKit/NSCollectionViewLayout.rs | 2 +- crates/icrate/src/generated/AppKit/NSColor.rs | 4 +- .../src/generated/AppKit/NSColorList.rs | 2 +- .../src/generated/AppKit/NSColorPanel.rs | 20 +- .../src/generated/AppKit/NSColorSpace.rs | 16 +- .../icrate/src/generated/AppKit/NSComboBox.rs | 8 +- .../icrate/src/generated/AppKit/NSControl.rs | 6 +- .../icrate/src/generated/AppKit/NSCursor.rs | 2 +- .../src/generated/AppKit/NSDatePickerCell.rs | 23 +- .../icrate/src/generated/AppKit/NSDockTile.rs | 2 +- .../src/generated/AppKit/NSDraggingItem.rs | 4 +- .../icrate/src/generated/AppKit/NSDrawer.rs | 8 +- .../icrate/src/generated/AppKit/NSErrors.rs | 72 +- crates/icrate/src/generated/AppKit/NSEvent.rs | 148 ++-- crates/icrate/src/generated/AppKit/NSFont.rs | 6 +- .../src/generated/AppKit/NSFontCollection.rs | 32 +- .../src/generated/AppKit/NSFontDescriptor.rs | 96 +-- .../icrate/src/generated/AppKit/NSGraphics.rs | 100 +-- .../src/generated/AppKit/NSGraphicsContext.rs | 8 +- .../icrate/src/generated/AppKit/NSGridView.rs | 2 +- .../src/generated/AppKit/NSHelpManager.rs | 4 +- crates/icrate/src/generated/AppKit/NSImage.rs | 284 ++++---- .../icrate/src/generated/AppKit/NSImageRep.rs | 2 +- .../src/generated/AppKit/NSInterfaceStyle.rs | 2 +- .../src/generated/AppKit/NSItemProvider.rs | 8 +- .../src/generated/AppKit/NSKeyValueBinding.rs | 222 +++--- .../generated/AppKit/NSLayoutConstraint.rs | 18 +- .../generated/AppKit/NSLevelIndicatorCell.rs | 8 +- crates/icrate/src/generated/AppKit/NSMenu.rs | 14 +- .../icrate/src/generated/AppKit/NSMenuItem.rs | 2 +- crates/icrate/src/generated/AppKit/NSNib.rs | 4 +- .../icrate/src/generated/AppKit/NSOpenGL.rs | 32 +- .../src/generated/AppKit/NSOutlineView.rs | 20 +- .../src/generated/AppKit/NSParagraphStyle.rs | 2 +- .../src/generated/AppKit/NSPasteboard.rs | 97 +-- .../src/generated/AppKit/NSPopUpButton.rs | 2 +- .../src/generated/AppKit/NSPopUpButtonCell.rs | 2 +- .../icrate/src/generated/AppKit/NSPopover.rs | 14 +- .../src/generated/AppKit/NSPrintInfo.rs | 86 +-- .../src/generated/AppKit/NSPrintOperation.rs | 2 +- .../src/generated/AppKit/NSPrintPanel.rs | 11 +- .../generated/AppKit/NSProgressIndicator.rs | 4 +- .../src/generated/AppKit/NSRuleEditor.rs | 16 +- .../src/generated/AppKit/NSRulerView.rs | 8 +- .../icrate/src/generated/AppKit/NSScreen.rs | 2 +- .../src/generated/AppKit/NSScrollView.rs | 10 +- .../icrate/src/generated/AppKit/NSScroller.rs | 2 +- .../src/generated/AppKit/NSSearchFieldCell.rs | 8 +- .../src/generated/AppKit/NSSharingService.rs | 40 +- .../src/generated/AppKit/NSSliderCell.rs | 12 +- .../generated/AppKit/NSSliderTouchBarItem.rs | 4 +- crates/icrate/src/generated/AppKit/NSSound.rs | 2 +- .../generated/AppKit/NSSpeechSynthesizer.rs | 114 +-- .../src/generated/AppKit/NSSpellChecker.rs | 37 +- .../src/generated/AppKit/NSSplitView.rs | 4 +- .../generated/AppKit/NSSplitViewController.rs | 2 +- .../src/generated/AppKit/NSSplitViewItem.rs | 2 +- .../src/generated/AppKit/NSStackView.rs | 8 +- .../src/generated/AppKit/NSStatusBar.rs | 4 +- .../icrate/src/generated/AppKit/NSTabView.rs | 2 +- .../src/generated/AppKit/NSTableView.rs | 10 +- crates/icrate/src/generated/AppKit/NSText.rs | 18 +- .../generated/AppKit/NSTextAlternatives.rs | 2 +- .../src/generated/AppKit/NSTextContent.rs | 6 +- .../generated/AppKit/NSTextContentManager.rs | 3 +- .../src/generated/AppKit/NSTextFinder.rs | 4 +- .../generated/AppKit/NSTextInputContext.rs | 3 +- .../icrate/src/generated/AppKit/NSTextList.rs | 34 +- .../src/generated/AppKit/NSTextStorage.rs | 4 +- .../icrate/src/generated/AppKit/NSTextView.rs | 30 +- .../src/generated/AppKit/NSTokenFieldCell.rs | 6 +- .../icrate/src/generated/AppKit/NSToolbar.rs | 4 +- .../src/generated/AppKit/NSToolbarItem.rs | 28 +- .../src/generated/AppKit/NSTouchBarItem.rs | 14 +- .../src/generated/AppKit/NSUserActivity.rs | 2 +- crates/icrate/src/generated/AppKit/NSView.rs | 26 +- .../icrate/src/generated/AppKit/NSWindow.rs | 123 ++-- .../generated/AppKit/NSWindowRestoration.rs | 2 +- .../src/generated/AppKit/NSWorkspace.rs | 98 +-- .../Foundation/NSAppleEventManager.rs | 6 +- .../src/generated/Foundation/NSAppleScript.rs | 10 +- .../Foundation/NSAttributedString.rs | 18 +- .../src/generated/Foundation/NSBundle.rs | 8 +- .../src/generated/Foundation/NSCalendar.rs | 34 +- .../Foundation/NSClassDescription.rs | 2 +- .../src/generated/Foundation/NSConnection.rs | 8 +- .../icrate/src/generated/Foundation/NSDate.rs | 2 +- .../generated/Foundation/NSDecimalNumber.rs | 8 +- .../NSDistributedNotificationCenter.rs | 6 +- .../src/generated/Foundation/NSError.rs | 34 +- .../src/generated/Foundation/NSException.rs | 32 +- .../Foundation/NSExtensionContext.rs | 10 +- .../generated/Foundation/NSExtensionItem.rs | 6 +- .../src/generated/Foundation/NSFileHandle.rs | 16 +- .../src/generated/Foundation/NSFileManager.rs | 74 +- .../src/generated/Foundation/NSGeometry.rs | 8 +- .../src/generated/Foundation/NSHTTPCookie.rs | 32 +- .../Foundation/NSHTTPCookieStorage.rs | 4 +- .../src/generated/Foundation/NSHashTable.rs | 26 +- .../generated/Foundation/NSItemProvider.rs | 8 +- .../generated/Foundation/NSKeyValueCoding.rs | 24 +- .../Foundation/NSKeyValueObserving.rs | 10 +- .../generated/Foundation/NSKeyedArchiver.rs | 6 +- .../Foundation/NSLinguisticTagger.rs | 76 +- .../src/generated/Foundation/NSLocale.rs | 62 +- .../src/generated/Foundation/NSMapTable.rs | 37 +- .../src/generated/Foundation/NSMetadata.rs | 32 +- .../Foundation/NSMetadataAttributes.rs | 362 +++++----- .../src/generated/Foundation/NSNetServices.rs | 4 +- .../src/generated/Foundation/NSObjCRuntime.rs | 4 +- .../src/generated/Foundation/NSOperation.rs | 6 +- .../NSPersonNameComponentsFormatter.rs | 16 +- .../icrate/src/generated/Foundation/NSPort.rs | 2 +- .../src/generated/Foundation/NSProcessInfo.rs | 4 +- .../src/generated/Foundation/NSProgress.rs | 32 +- .../src/generated/Foundation/NSRunLoop.rs | 4 +- .../Foundation/NSScriptKeyValueCoding.rs | 2 +- .../src/generated/Foundation/NSSpellServer.rs | 6 +- .../src/generated/Foundation/NSStream.rs | 48 +- .../src/generated/Foundation/NSString.rs | 52 +- .../icrate/src/generated/Foundation/NSTask.rs | 2 +- .../Foundation/NSTextCheckingResult.rs | 22 +- .../src/generated/Foundation/NSThread.rs | 6 +- .../src/generated/Foundation/NSTimeZone.rs | 2 +- .../icrate/src/generated/Foundation/NSURL.rs | 283 ++++---- .../Foundation/NSURLCredentialStorage.rs | 4 +- .../src/generated/Foundation/NSURLError.rs | 14 +- .../src/generated/Foundation/NSURLHandle.rs | 22 +- .../Foundation/NSURLProtectionSpace.rs | 30 +- .../src/generated/Foundation/NSURLSession.rs | 10 +- .../Foundation/NSUbiquitousKeyValueStore.rs | 7 +- .../src/generated/Foundation/NSUndoManager.rs | 20 +- .../generated/Foundation/NSUserActivity.rs | 2 +- .../generated/Foundation/NSUserDefaults.rs | 69 +- .../Foundation/NSUserNotification.rs | 2 +- .../Foundation/NSValueTransformer.rs | 12 +- .../src/generated/Foundation/NSXMLParser.rs | 2 +- 154 files changed, 2550 insertions(+), 2490 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 9672b11cf..4242a3472 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -760,7 +760,7 @@ impl fmt::Display for Stmt { value: None, } => { writeln!(f, r#"extern "C" {{"#)?; - writeln!(f, " static {name}: {ty};")?; + writeln!(f, " pub static {name}: {ty};")?; writeln!(f, "}}")?; } Self::VarDecl { @@ -768,14 +768,14 @@ impl fmt::Display for Stmt { ty, value: Some(None), } => { - writeln!(f, "static {name}: {ty} = todo;")?; + writeln!(f, "pub static {name}: {ty} = todo;")?; } Self::VarDecl { name, ty, value: Some(Some(expr)), } => { - writeln!(f, "static {name}: {ty} = {expr};")?; + writeln!(f, "pub static {name}: {ty} = {expr};")?; } Self::FnDecl { name: _, diff --git a/crates/icrate/src/generated/AppKit/NSAccessibility.rs b/crates/icrate/src/generated/AppKit/NSAccessibility.rs index 6ed5d2349..2905a50cd 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibility.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibility.rs @@ -120,7 +120,8 @@ extern_methods!( ); extern "C" { - static NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification: &'static NSNotificationName; + pub static NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification: + &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs index 057d5d0de..d19a88de9 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs @@ -5,399 +5,401 @@ use crate::AppKit::*; use crate::Foundation::*; extern "C" { - static NSAccessibilityErrorCodeExceptionInfo: &'static NSString; + pub static NSAccessibilityErrorCodeExceptionInfo: &'static NSString; } pub type NSAccessibilityAttributeName = NSString; extern "C" { - static NSAccessibilityRoleAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityRoleAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityRoleDescriptionAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityRoleDescriptionAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySubroleAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySubroleAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityHelpAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityHelpAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityValueAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityValueAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMinValueAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMinValueAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMaxValueAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMaxValueAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityEnabledAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityEnabledAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityFocusedAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityFocusedAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityParentAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityParentAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityChildrenAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityChildrenAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityWindowAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityWindowAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityTopLevelUIElementAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityTopLevelUIElementAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySelectedChildrenAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySelectedChildrenAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityVisibleChildrenAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityVisibleChildrenAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityPositionAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityPositionAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySizeAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySizeAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityContentsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityContentsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityTitleAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityTitleAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityDescriptionAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityDescriptionAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityShownMenuAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityShownMenuAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityValueDescriptionAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityValueDescriptionAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySharedFocusElementsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySharedFocusElementsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityPreviousContentsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityPreviousContentsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityNextContentsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityNextContentsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityHeaderAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityHeaderAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityEditedAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityEditedAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityTabsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityTabsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityHorizontalScrollBarAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityHorizontalScrollBarAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityVerticalScrollBarAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityVerticalScrollBarAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityOverflowButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityOverflowButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityIncrementButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityIncrementButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityDecrementButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityDecrementButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityFilenameAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityFilenameAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityExpandedAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityExpandedAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySelectedAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySelectedAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySplittersAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySplittersAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityDocumentAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityDocumentAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityActivationPointAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityActivationPointAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityURLAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityURLAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityIndexAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityIndexAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityRowCountAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityRowCountAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityColumnCountAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityColumnCountAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityOrderedByRowAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityOrderedByRowAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityWarningValueAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityWarningValueAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityCriticalValueAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityCriticalValueAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityPlaceholderValueAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityPlaceholderValueAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityContainsProtectedContentAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityContainsProtectedContentAttribute: + &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityAlternateUIVisibleAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityAlternateUIVisibleAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityRequiredAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityRequiredAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityTitleUIElementAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityTitleUIElementAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityServesAsTitleForUIElementsAttribute: + pub static NSAccessibilityServesAsTitleForUIElementsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityLinkedUIElementsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityLinkedUIElementsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySelectedTextAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySelectedTextAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySelectedTextRangeAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySelectedTextRangeAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityNumberOfCharactersAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityNumberOfCharactersAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityVisibleCharacterRangeAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityVisibleCharacterRangeAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySharedTextUIElementsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySharedTextUIElementsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySharedCharacterRangeAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySharedCharacterRangeAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityInsertionPointLineNumberAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityInsertionPointLineNumberAttribute: + &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySelectedTextRangesAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySelectedTextRangesAttribute: &'static NSAccessibilityAttributeName; } pub type NSAccessibilityParameterizedAttributeName = NSString; extern "C" { - static NSAccessibilityLineForIndexParameterizedAttribute: + pub static NSAccessibilityLineForIndexParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityRangeForLineParameterizedAttribute: + pub static NSAccessibilityRangeForLineParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityStringForRangeParameterizedAttribute: + pub static NSAccessibilityStringForRangeParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityRangeForPositionParameterizedAttribute: + pub static NSAccessibilityRangeForPositionParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityRangeForIndexParameterizedAttribute: + pub static NSAccessibilityRangeForIndexParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityBoundsForRangeParameterizedAttribute: + pub static NSAccessibilityBoundsForRangeParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityRTFForRangeParameterizedAttribute: + pub static NSAccessibilityRTFForRangeParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityStyleRangeForIndexParameterizedAttribute: + pub static NSAccessibilityStyleRangeForIndexParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityAttributedStringForRangeParameterizedAttribute: + pub static NSAccessibilityAttributedStringForRangeParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityFontTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityFontTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityForegroundColorTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityForegroundColorTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityBackgroundColorTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityBackgroundColorTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityUnderlineColorTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityUnderlineColorTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityStrikethroughColorTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityStrikethroughColorTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityUnderlineTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityUnderlineTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilitySuperscriptTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilitySuperscriptTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityStrikethroughTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityStrikethroughTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityShadowTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityShadowTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityAttachmentTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityAttachmentTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityLinkTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityLinkTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityAutocorrectedTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityAutocorrectedTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityTextAlignmentAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityTextAlignmentAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityListItemPrefixTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityListItemPrefixTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityListItemIndexTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityListItemIndexTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityListItemLevelTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityListItemLevelTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityMisspelledTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityMisspelledTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityMarkedMisspelledTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityMarkedMisspelledTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityLanguageTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityLanguageTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityCustomTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityCustomTextAttribute: &'static NSAttributedStringKey; } extern "C" { - static NSAccessibilityAnnotationTextAttribute: &'static NSAttributedStringKey; + pub static NSAccessibilityAnnotationTextAttribute: &'static NSAttributedStringKey; } pub type NSAccessibilityAnnotationAttributeKey = NSString; extern "C" { - static NSAccessibilityAnnotationLabel: &'static NSAccessibilityAnnotationAttributeKey; + pub static NSAccessibilityAnnotationLabel: &'static NSAccessibilityAnnotationAttributeKey; } extern "C" { - static NSAccessibilityAnnotationElement: &'static NSAccessibilityAnnotationAttributeKey; + pub static NSAccessibilityAnnotationElement: &'static NSAccessibilityAnnotationAttributeKey; } extern "C" { - static NSAccessibilityAnnotationLocation: &'static NSAccessibilityAnnotationAttributeKey; + pub static NSAccessibilityAnnotationLocation: &'static NSAccessibilityAnnotationAttributeKey; } pub type NSAccessibilityAnnotationPosition = NSInteger; @@ -408,99 +410,99 @@ pub const NSAccessibilityAnnotationPositionEnd: NSAccessibilityAnnotationPositio pub type NSAccessibilityFontAttributeKey = NSString; extern "C" { - static NSAccessibilityFontNameKey: &'static NSAccessibilityFontAttributeKey; + pub static NSAccessibilityFontNameKey: &'static NSAccessibilityFontAttributeKey; } extern "C" { - static NSAccessibilityFontFamilyKey: &'static NSAccessibilityFontAttributeKey; + pub static NSAccessibilityFontFamilyKey: &'static NSAccessibilityFontAttributeKey; } extern "C" { - static NSAccessibilityVisibleNameKey: &'static NSAccessibilityFontAttributeKey; + pub static NSAccessibilityVisibleNameKey: &'static NSAccessibilityFontAttributeKey; } extern "C" { - static NSAccessibilityFontSizeKey: &'static NSAccessibilityFontAttributeKey; + pub static NSAccessibilityFontSizeKey: &'static NSAccessibilityFontAttributeKey; } extern "C" { - static NSAccessibilityMainAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMainAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMinimizedAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMinimizedAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityCloseButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityCloseButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityZoomButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityZoomButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMinimizeButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMinimizeButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityToolbarButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityToolbarButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityProxyAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityProxyAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityGrowAreaAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityGrowAreaAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityModalAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityModalAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityDefaultButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityDefaultButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityCancelButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityCancelButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityFullScreenButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityFullScreenButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMenuBarAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMenuBarAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityWindowsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityWindowsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityFrontmostAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityFrontmostAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityHiddenAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityHiddenAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMainWindowAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMainWindowAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityFocusedWindowAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityFocusedWindowAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityFocusedUIElementAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityFocusedUIElementAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityExtrasMenuBarAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityExtrasMenuBarAttribute: &'static NSAccessibilityAttributeName; } pub type NSAccessibilityOrientation = NSInteger; @@ -509,148 +511,153 @@ pub const NSAccessibilityOrientationVertical: NSAccessibilityOrientation = 1; pub const NSAccessibilityOrientationHorizontal: NSAccessibilityOrientation = 2; extern "C" { - static NSAccessibilityOrientationAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityOrientationAttribute: &'static NSAccessibilityAttributeName; } pub type NSAccessibilityOrientationValue = NSString; extern "C" { - static NSAccessibilityVerticalOrientationValue: &'static NSAccessibilityOrientationValue; + pub static NSAccessibilityVerticalOrientationValue: &'static NSAccessibilityOrientationValue; } extern "C" { - static NSAccessibilityHorizontalOrientationValue: &'static NSAccessibilityOrientationValue; + pub static NSAccessibilityHorizontalOrientationValue: &'static NSAccessibilityOrientationValue; } extern "C" { - static NSAccessibilityUnknownOrientationValue: &'static NSAccessibilityOrientationValue; + pub static NSAccessibilityUnknownOrientationValue: &'static NSAccessibilityOrientationValue; } extern "C" { - static NSAccessibilityColumnTitlesAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityColumnTitlesAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySearchButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySearchButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySearchMenuAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySearchMenuAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityClearButtonAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityClearButtonAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityRowsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityRowsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityVisibleRowsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityVisibleRowsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySelectedRowsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySelectedRowsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityColumnsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityColumnsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityVisibleColumnsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityVisibleColumnsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySelectedColumnsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySelectedColumnsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySortDirectionAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySortDirectionAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilitySelectedCellsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilitySelectedCellsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityVisibleCellsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityVisibleCellsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityRowHeaderUIElementsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityRowHeaderUIElementsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityColumnHeaderUIElementsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityColumnHeaderUIElementsAttribute: + &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityCellForColumnAndRowParameterizedAttribute: + pub static NSAccessibilityCellForColumnAndRowParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityRowIndexRangeAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityRowIndexRangeAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityColumnIndexRangeAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityColumnIndexRangeAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityHorizontalUnitsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityHorizontalUnitsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityVerticalUnitsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityVerticalUnitsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityHorizontalUnitDescriptionAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityHorizontalUnitDescriptionAttribute: + &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityVerticalUnitDescriptionAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityVerticalUnitDescriptionAttribute: + &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityLayoutPointForScreenPointParameterizedAttribute: + pub static NSAccessibilityLayoutPointForScreenPointParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityLayoutSizeForScreenSizeParameterizedAttribute: + pub static NSAccessibilityLayoutSizeForScreenSizeParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityScreenPointForLayoutPointParameterizedAttribute: + pub static NSAccessibilityScreenPointForLayoutPointParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityScreenSizeForLayoutSizeParameterizedAttribute: + pub static NSAccessibilityScreenSizeForLayoutSizeParameterizedAttribute: &'static NSAccessibilityParameterizedAttributeName; } extern "C" { - static NSAccessibilityHandlesAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityHandlesAttribute: &'static NSAccessibilityAttributeName; } pub type NSAccessibilitySortDirectionValue = NSString; extern "C" { - static NSAccessibilityAscendingSortDirectionValue: &'static NSAccessibilitySortDirectionValue; + pub static NSAccessibilityAscendingSortDirectionValue: + &'static NSAccessibilitySortDirectionValue; } extern "C" { - static NSAccessibilityDescendingSortDirectionValue: &'static NSAccessibilitySortDirectionValue; + pub static NSAccessibilityDescendingSortDirectionValue: + &'static NSAccessibilitySortDirectionValue; } extern "C" { - static NSAccessibilityUnknownSortDirectionValue: &'static NSAccessibilitySortDirectionValue; + pub static NSAccessibilityUnknownSortDirectionValue: &'static NSAccessibilitySortDirectionValue; } pub type NSAccessibilitySortDirection = NSInteger; @@ -659,108 +666,112 @@ pub const NSAccessibilitySortDirectionAscending: NSAccessibilitySortDirection = pub const NSAccessibilitySortDirectionDescending: NSAccessibilitySortDirection = 2; extern "C" { - static NSAccessibilityDisclosingAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityDisclosingAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityDisclosedRowsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityDisclosedRowsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityDisclosedByRowAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityDisclosedByRowAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityDisclosureLevelAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityDisclosureLevelAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityAllowedValuesAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityAllowedValuesAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityLabelUIElementsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityLabelUIElementsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityLabelValueAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityLabelValueAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMatteHoleAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMatteHoleAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMatteContentUIElementAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMatteContentUIElementAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMarkerUIElementsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMarkerUIElementsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMarkerValuesAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMarkerValuesAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMarkerGroupUIElementAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMarkerGroupUIElementAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityUnitsAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityUnitsAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityUnitDescriptionAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityUnitDescriptionAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMarkerTypeAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMarkerTypeAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityMarkerTypeDescriptionAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityMarkerTypeDescriptionAttribute: &'static NSAccessibilityAttributeName; } extern "C" { - static NSAccessibilityIdentifierAttribute: &'static NSAccessibilityAttributeName; + pub static NSAccessibilityIdentifierAttribute: &'static NSAccessibilityAttributeName; } pub type NSAccessibilityRulerMarkerTypeValue = NSString; extern "C" { - static NSAccessibilityLeftTabStopMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; + pub static NSAccessibilityLeftTabStopMarkerTypeValue: + &'static NSAccessibilityRulerMarkerTypeValue; } extern "C" { - static NSAccessibilityRightTabStopMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; + pub static NSAccessibilityRightTabStopMarkerTypeValue: + &'static NSAccessibilityRulerMarkerTypeValue; } extern "C" { - static NSAccessibilityCenterTabStopMarkerTypeValue: + pub static NSAccessibilityCenterTabStopMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; } extern "C" { - static NSAccessibilityDecimalTabStopMarkerTypeValue: + pub static NSAccessibilityDecimalTabStopMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; } extern "C" { - static NSAccessibilityHeadIndentMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; + pub static NSAccessibilityHeadIndentMarkerTypeValue: + &'static NSAccessibilityRulerMarkerTypeValue; } extern "C" { - static NSAccessibilityTailIndentMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; + pub static NSAccessibilityTailIndentMarkerTypeValue: + &'static NSAccessibilityRulerMarkerTypeValue; } extern "C" { - static NSAccessibilityFirstLineIndentMarkerTypeValue: + pub static NSAccessibilityFirstLineIndentMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; } extern "C" { - static NSAccessibilityUnknownMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; + pub static NSAccessibilityUnknownMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; } pub type NSAccessibilityRulerMarkerType = NSInteger; @@ -776,23 +787,23 @@ pub const NSAccessibilityRulerMarkerTypeIndentFirstLine: NSAccessibilityRulerMar pub type NSAccessibilityRulerUnitValue = NSString; extern "C" { - static NSAccessibilityInchesUnitValue: &'static NSAccessibilityRulerUnitValue; + pub static NSAccessibilityInchesUnitValue: &'static NSAccessibilityRulerUnitValue; } extern "C" { - static NSAccessibilityCentimetersUnitValue: &'static NSAccessibilityRulerUnitValue; + pub static NSAccessibilityCentimetersUnitValue: &'static NSAccessibilityRulerUnitValue; } extern "C" { - static NSAccessibilityPointsUnitValue: &'static NSAccessibilityRulerUnitValue; + pub static NSAccessibilityPointsUnitValue: &'static NSAccessibilityRulerUnitValue; } extern "C" { - static NSAccessibilityPicasUnitValue: &'static NSAccessibilityRulerUnitValue; + pub static NSAccessibilityPicasUnitValue: &'static NSAccessibilityRulerUnitValue; } extern "C" { - static NSAccessibilityUnknownUnitValue: &'static NSAccessibilityRulerUnitValue; + pub static NSAccessibilityUnknownUnitValue: &'static NSAccessibilityRulerUnitValue; } pub type NSAccessibilityUnits = NSInteger; @@ -805,561 +816,568 @@ pub const NSAccessibilityUnitsPicas: NSAccessibilityUnits = 4; pub type NSAccessibilityActionName = NSString; extern "C" { - static NSAccessibilityPressAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityPressAction: &'static NSAccessibilityActionName; } extern "C" { - static NSAccessibilityIncrementAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityIncrementAction: &'static NSAccessibilityActionName; } extern "C" { - static NSAccessibilityDecrementAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityDecrementAction: &'static NSAccessibilityActionName; } extern "C" { - static NSAccessibilityConfirmAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityConfirmAction: &'static NSAccessibilityActionName; } extern "C" { - static NSAccessibilityPickAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityPickAction: &'static NSAccessibilityActionName; } extern "C" { - static NSAccessibilityCancelAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityCancelAction: &'static NSAccessibilityActionName; } extern "C" { - static NSAccessibilityRaiseAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityRaiseAction: &'static NSAccessibilityActionName; } extern "C" { - static NSAccessibilityShowMenuAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityShowMenuAction: &'static NSAccessibilityActionName; } extern "C" { - static NSAccessibilityDeleteAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityDeleteAction: &'static NSAccessibilityActionName; } extern "C" { - static NSAccessibilityShowAlternateUIAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityShowAlternateUIAction: &'static NSAccessibilityActionName; } extern "C" { - static NSAccessibilityShowDefaultUIAction: &'static NSAccessibilityActionName; + pub static NSAccessibilityShowDefaultUIAction: &'static NSAccessibilityActionName; } pub type NSAccessibilityNotificationName = NSString; extern "C" { - static NSAccessibilityMainWindowChangedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityMainWindowChangedNotification: + &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityFocusedWindowChangedNotification: + pub static NSAccessibilityFocusedWindowChangedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityFocusedUIElementChangedNotification: + pub static NSAccessibilityFocusedUIElementChangedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityApplicationActivatedNotification: + pub static NSAccessibilityApplicationActivatedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityApplicationDeactivatedNotification: + pub static NSAccessibilityApplicationDeactivatedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityApplicationHiddenNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityApplicationHiddenNotification: + &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityApplicationShownNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityApplicationShownNotification: + &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityWindowCreatedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityWindowCreatedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityWindowMovedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityWindowMovedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityWindowResizedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityWindowResizedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityWindowMiniaturizedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityWindowMiniaturizedNotification: + &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityWindowDeminiaturizedNotification: + pub static NSAccessibilityWindowDeminiaturizedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityDrawerCreatedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityDrawerCreatedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilitySheetCreatedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilitySheetCreatedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityUIElementDestroyedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityUIElementDestroyedNotification: + &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityValueChangedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityValueChangedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityTitleChangedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityTitleChangedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityResizedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityResizedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityMovedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityMovedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityCreatedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityCreatedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityLayoutChangedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityLayoutChangedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityHelpTagCreatedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityHelpTagCreatedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilitySelectedTextChangedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilitySelectedTextChangedNotification: + &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityRowCountChangedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityRowCountChangedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilitySelectedChildrenChangedNotification: + pub static NSAccessibilitySelectedChildrenChangedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilitySelectedRowsChangedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilitySelectedRowsChangedNotification: + &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilitySelectedColumnsChangedNotification: + pub static NSAccessibilitySelectedColumnsChangedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityRowExpandedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityRowExpandedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityRowCollapsedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityRowCollapsedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilitySelectedCellsChangedNotification: + pub static NSAccessibilitySelectedCellsChangedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityUnitsChangedNotification: &'static NSAccessibilityNotificationName; + pub static NSAccessibilityUnitsChangedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilitySelectedChildrenMovedNotification: + pub static NSAccessibilitySelectedChildrenMovedNotification: &'static NSAccessibilityNotificationName; } extern "C" { - static NSAccessibilityAnnouncementRequestedNotification: + pub static NSAccessibilityAnnouncementRequestedNotification: &'static NSAccessibilityNotificationName; } pub type NSAccessibilityRole = NSString; extern "C" { - static NSAccessibilityUnknownRole: &'static NSAccessibilityRole; + pub static NSAccessibilityUnknownRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityButtonRole: &'static NSAccessibilityRole; + pub static NSAccessibilityButtonRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityRadioButtonRole: &'static NSAccessibilityRole; + pub static NSAccessibilityRadioButtonRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityCheckBoxRole: &'static NSAccessibilityRole; + pub static NSAccessibilityCheckBoxRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilitySliderRole: &'static NSAccessibilityRole; + pub static NSAccessibilitySliderRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityTabGroupRole: &'static NSAccessibilityRole; + pub static NSAccessibilityTabGroupRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityTextFieldRole: &'static NSAccessibilityRole; + pub static NSAccessibilityTextFieldRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityStaticTextRole: &'static NSAccessibilityRole; + pub static NSAccessibilityStaticTextRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityTextAreaRole: &'static NSAccessibilityRole; + pub static NSAccessibilityTextAreaRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityScrollAreaRole: &'static NSAccessibilityRole; + pub static NSAccessibilityScrollAreaRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityPopUpButtonRole: &'static NSAccessibilityRole; + pub static NSAccessibilityPopUpButtonRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityMenuButtonRole: &'static NSAccessibilityRole; + pub static NSAccessibilityMenuButtonRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityTableRole: &'static NSAccessibilityRole; + pub static NSAccessibilityTableRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityApplicationRole: &'static NSAccessibilityRole; + pub static NSAccessibilityApplicationRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityGroupRole: &'static NSAccessibilityRole; + pub static NSAccessibilityGroupRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityRadioGroupRole: &'static NSAccessibilityRole; + pub static NSAccessibilityRadioGroupRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityListRole: &'static NSAccessibilityRole; + pub static NSAccessibilityListRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityScrollBarRole: &'static NSAccessibilityRole; + pub static NSAccessibilityScrollBarRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityValueIndicatorRole: &'static NSAccessibilityRole; + pub static NSAccessibilityValueIndicatorRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityImageRole: &'static NSAccessibilityRole; + pub static NSAccessibilityImageRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityMenuBarRole: &'static NSAccessibilityRole; + pub static NSAccessibilityMenuBarRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityMenuBarItemRole: &'static NSAccessibilityRole; + pub static NSAccessibilityMenuBarItemRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityMenuRole: &'static NSAccessibilityRole; + pub static NSAccessibilityMenuRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityMenuItemRole: &'static NSAccessibilityRole; + pub static NSAccessibilityMenuItemRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityColumnRole: &'static NSAccessibilityRole; + pub static NSAccessibilityColumnRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityRowRole: &'static NSAccessibilityRole; + pub static NSAccessibilityRowRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityToolbarRole: &'static NSAccessibilityRole; + pub static NSAccessibilityToolbarRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityBusyIndicatorRole: &'static NSAccessibilityRole; + pub static NSAccessibilityBusyIndicatorRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityProgressIndicatorRole: &'static NSAccessibilityRole; + pub static NSAccessibilityProgressIndicatorRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityWindowRole: &'static NSAccessibilityRole; + pub static NSAccessibilityWindowRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityDrawerRole: &'static NSAccessibilityRole; + pub static NSAccessibilityDrawerRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilitySystemWideRole: &'static NSAccessibilityRole; + pub static NSAccessibilitySystemWideRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityOutlineRole: &'static NSAccessibilityRole; + pub static NSAccessibilityOutlineRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityIncrementorRole: &'static NSAccessibilityRole; + pub static NSAccessibilityIncrementorRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityBrowserRole: &'static NSAccessibilityRole; + pub static NSAccessibilityBrowserRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityComboBoxRole: &'static NSAccessibilityRole; + pub static NSAccessibilityComboBoxRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilitySplitGroupRole: &'static NSAccessibilityRole; + pub static NSAccessibilitySplitGroupRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilitySplitterRole: &'static NSAccessibilityRole; + pub static NSAccessibilitySplitterRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityColorWellRole: &'static NSAccessibilityRole; + pub static NSAccessibilityColorWellRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityGrowAreaRole: &'static NSAccessibilityRole; + pub static NSAccessibilityGrowAreaRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilitySheetRole: &'static NSAccessibilityRole; + pub static NSAccessibilitySheetRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityHelpTagRole: &'static NSAccessibilityRole; + pub static NSAccessibilityHelpTagRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityMatteRole: &'static NSAccessibilityRole; + pub static NSAccessibilityMatteRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityRulerRole: &'static NSAccessibilityRole; + pub static NSAccessibilityRulerRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityRulerMarkerRole: &'static NSAccessibilityRole; + pub static NSAccessibilityRulerMarkerRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityLinkRole: &'static NSAccessibilityRole; + pub static NSAccessibilityLinkRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityDisclosureTriangleRole: &'static NSAccessibilityRole; + pub static NSAccessibilityDisclosureTriangleRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityGridRole: &'static NSAccessibilityRole; + pub static NSAccessibilityGridRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityRelevanceIndicatorRole: &'static NSAccessibilityRole; + pub static NSAccessibilityRelevanceIndicatorRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityLevelIndicatorRole: &'static NSAccessibilityRole; + pub static NSAccessibilityLevelIndicatorRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityCellRole: &'static NSAccessibilityRole; + pub static NSAccessibilityCellRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityPopoverRole: &'static NSAccessibilityRole; + pub static NSAccessibilityPopoverRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityPageRole: &'static NSAccessibilityRole; + pub static NSAccessibilityPageRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityLayoutAreaRole: &'static NSAccessibilityRole; + pub static NSAccessibilityLayoutAreaRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityLayoutItemRole: &'static NSAccessibilityRole; + pub static NSAccessibilityLayoutItemRole: &'static NSAccessibilityRole; } extern "C" { - static NSAccessibilityHandleRole: &'static NSAccessibilityRole; + pub static NSAccessibilityHandleRole: &'static NSAccessibilityRole; } pub type NSAccessibilitySubrole = NSString; extern "C" { - static NSAccessibilityUnknownSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityUnknownSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityCloseButtonSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityCloseButtonSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityZoomButtonSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityZoomButtonSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityMinimizeButtonSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityMinimizeButtonSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityToolbarButtonSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityToolbarButtonSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityTableRowSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityTableRowSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityOutlineRowSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityOutlineRowSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilitySecureTextFieldSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilitySecureTextFieldSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityStandardWindowSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityStandardWindowSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityDialogSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityDialogSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilitySystemDialogSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilitySystemDialogSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityFloatingWindowSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityFloatingWindowSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilitySystemFloatingWindowSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilitySystemFloatingWindowSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityIncrementArrowSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityIncrementArrowSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityDecrementArrowSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityDecrementArrowSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityIncrementPageSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityIncrementPageSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityDecrementPageSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityDecrementPageSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilitySearchFieldSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilitySearchFieldSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityTextAttachmentSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityTextAttachmentSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityTextLinkSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityTextLinkSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityTimelineSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityTimelineSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilitySortButtonSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilitySortButtonSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityRatingIndicatorSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityRatingIndicatorSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityContentListSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityContentListSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityDefinitionListSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityDefinitionListSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityFullScreenButtonSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityFullScreenButtonSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityToggleSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityToggleSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilitySwitchSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilitySwitchSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityDescriptionListSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityDescriptionListSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityTabButtonSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityTabButtonSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilityCollectionListSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilityCollectionListSubrole: &'static NSAccessibilitySubrole; } extern "C" { - static NSAccessibilitySectionListSubrole: &'static NSAccessibilitySubrole; + pub static NSAccessibilitySectionListSubrole: &'static NSAccessibilitySubrole; } pub type NSAccessibilityNotificationUserInfoKey = NSString; extern "C" { - static NSAccessibilityUIElementsKey: &'static NSAccessibilityNotificationUserInfoKey; + pub static NSAccessibilityUIElementsKey: &'static NSAccessibilityNotificationUserInfoKey; } extern "C" { - static NSAccessibilityPriorityKey: &'static NSAccessibilityNotificationUserInfoKey; + pub static NSAccessibilityPriorityKey: &'static NSAccessibilityNotificationUserInfoKey; } extern "C" { - static NSAccessibilityAnnouncementKey: &'static NSAccessibilityNotificationUserInfoKey; + pub static NSAccessibilityAnnouncementKey: &'static NSAccessibilityNotificationUserInfoKey; } pub type NSAccessibilityPriorityLevel = NSInteger; @@ -1370,5 +1388,5 @@ pub const NSAccessibilityPriorityHigh: NSAccessibilityPriorityLevel = 90; pub type NSAccessibilityLoadingToken = TodoProtocols; extern "C" { - static NSAccessibilitySortButtonRole: &'static NSAccessibilityRole; + pub static NSAccessibilitySortButtonRole: &'static NSAccessibilityRole; } diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index 2fb566ae4..f267a1cba 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -9,11 +9,11 @@ pub const NSAlertStyleWarning: NSAlertStyle = 0; pub const NSAlertStyleInformational: NSAlertStyle = 1; pub const NSAlertStyleCritical: NSAlertStyle = 2; -static NSAlertFirstButtonReturn: NSModalResponse = 1000; +pub static NSAlertFirstButtonReturn: NSModalResponse = 1000; -static NSAlertSecondButtonReturn: NSModalResponse = 1001; +pub static NSAlertSecondButtonReturn: NSModalResponse = 1001; -static NSAlertThirdButtonReturn: NSModalResponse = 1002; +pub static NSAlertThirdButtonReturn: NSModalResponse = 1002; extern_class!( #[derive(Debug)] @@ -126,8 +126,8 @@ extern_methods!( } ); -static NSWarningAlertStyle: NSAlertStyle = NSAlertStyleWarning; +pub static NSWarningAlertStyle: NSAlertStyle = NSAlertStyleWarning; -static NSInformationalAlertStyle: NSAlertStyle = NSAlertStyleInformational; +pub static NSInformationalAlertStyle: NSAlertStyle = NSAlertStyleInformational; -static NSCriticalAlertStyle: NSAlertStyle = NSAlertStyleCritical; +pub static NSCriticalAlertStyle: NSAlertStyle = NSAlertStyleCritical; diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index 2d1ed3758..ae1925306 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -16,11 +16,11 @@ pub const NSAnimationNonblocking: NSAnimationBlockingMode = 1; pub const NSAnimationNonblockingThreaded: NSAnimationBlockingMode = 2; extern "C" { - static NSAnimationProgressMarkNotification: &'static NSNotificationName; + pub static NSAnimationProgressMarkNotification: &'static NSNotificationName; } extern "C" { - static NSAnimationProgressMark: &'static NSString; + pub static NSAnimationProgressMark: &'static NSString; } extern_class!( @@ -138,29 +138,29 @@ pub type NSAnimationDelegate = NSObject; pub type NSViewAnimationKey = NSString; extern "C" { - static NSViewAnimationTargetKey: &'static NSViewAnimationKey; + pub static NSViewAnimationTargetKey: &'static NSViewAnimationKey; } extern "C" { - static NSViewAnimationStartFrameKey: &'static NSViewAnimationKey; + pub static NSViewAnimationStartFrameKey: &'static NSViewAnimationKey; } extern "C" { - static NSViewAnimationEndFrameKey: &'static NSViewAnimationKey; + pub static NSViewAnimationEndFrameKey: &'static NSViewAnimationKey; } extern "C" { - static NSViewAnimationEffectKey: &'static NSViewAnimationKey; + pub static NSViewAnimationEffectKey: &'static NSViewAnimationKey; } pub type NSViewAnimationEffectName = NSString; extern "C" { - static NSViewAnimationFadeInEffect: &'static NSViewAnimationEffectName; + pub static NSViewAnimationFadeInEffect: &'static NSViewAnimationEffectName; } extern "C" { - static NSViewAnimationFadeOutEffect: &'static NSViewAnimationEffectName; + pub static NSViewAnimationFadeOutEffect: &'static NSViewAnimationEffectName; } extern_class!( @@ -198,9 +198,9 @@ pub type NSAnimatablePropertyKey = NSString; pub type NSAnimatablePropertyContainer = NSObject; extern "C" { - static NSAnimationTriggerOrderIn: &'static NSAnimatablePropertyKey; + pub static NSAnimationTriggerOrderIn: &'static NSAnimatablePropertyKey; } extern "C" { - static NSAnimationTriggerOrderOut: &'static NSAnimatablePropertyKey; + pub static NSAnimationTriggerOrderOut: &'static NSAnimatablePropertyKey; } diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index ff79a7a17..e57887513 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -57,39 +57,39 @@ extern_methods!( ); extern "C" { - static NSAppearanceNameAqua: &'static NSAppearanceName; + pub static NSAppearanceNameAqua: &'static NSAppearanceName; } extern "C" { - static NSAppearanceNameDarkAqua: &'static NSAppearanceName; + pub static NSAppearanceNameDarkAqua: &'static NSAppearanceName; } extern "C" { - static NSAppearanceNameLightContent: &'static NSAppearanceName; + pub static NSAppearanceNameLightContent: &'static NSAppearanceName; } extern "C" { - static NSAppearanceNameVibrantDark: &'static NSAppearanceName; + pub static NSAppearanceNameVibrantDark: &'static NSAppearanceName; } extern "C" { - static NSAppearanceNameVibrantLight: &'static NSAppearanceName; + pub static NSAppearanceNameVibrantLight: &'static NSAppearanceName; } extern "C" { - static NSAppearanceNameAccessibilityHighContrastAqua: &'static NSAppearanceName; + pub static NSAppearanceNameAccessibilityHighContrastAqua: &'static NSAppearanceName; } extern "C" { - static NSAppearanceNameAccessibilityHighContrastDarkAqua: &'static NSAppearanceName; + pub static NSAppearanceNameAccessibilityHighContrastDarkAqua: &'static NSAppearanceName; } extern "C" { - static NSAppearanceNameAccessibilityHighContrastVibrantLight: &'static NSAppearanceName; + pub static NSAppearanceNameAccessibilityHighContrastVibrantLight: &'static NSAppearanceName; } extern "C" { - static NSAppearanceNameAccessibilityHighContrastVibrantDark: &'static NSAppearanceName; + pub static NSAppearanceNameAccessibilityHighContrastVibrantDark: &'static NSAppearanceName; } pub type NSAppearanceCustomization = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 5bd08d062..78981e8e5 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -5,144 +5,144 @@ use crate::AppKit::*; use crate::Foundation::*; extern "C" { - static NSAppKitVersionNumber: NSAppKitVersion; + pub static NSAppKitVersionNumber: NSAppKitVersion; } -static NSAppKitVersionNumber10_0: NSAppKitVersion = 577; +pub static NSAppKitVersionNumber10_0: NSAppKitVersion = 577; -static NSAppKitVersionNumber10_1: NSAppKitVersion = 620; +pub static NSAppKitVersionNumber10_1: NSAppKitVersion = 620; -static NSAppKitVersionNumber10_2: NSAppKitVersion = 663; +pub static NSAppKitVersionNumber10_2: NSAppKitVersion = 663; -static NSAppKitVersionNumber10_2_3: NSAppKitVersion = 663.6; +pub static NSAppKitVersionNumber10_2_3: NSAppKitVersion = 663.6; -static NSAppKitVersionNumber10_3: NSAppKitVersion = 743; +pub static NSAppKitVersionNumber10_3: NSAppKitVersion = 743; -static NSAppKitVersionNumber10_3_2: NSAppKitVersion = 743.14; +pub static NSAppKitVersionNumber10_3_2: NSAppKitVersion = 743.14; -static NSAppKitVersionNumber10_3_3: NSAppKitVersion = 743.2; +pub static NSAppKitVersionNumber10_3_3: NSAppKitVersion = 743.2; -static NSAppKitVersionNumber10_3_5: NSAppKitVersion = 743.24; +pub static NSAppKitVersionNumber10_3_5: NSAppKitVersion = 743.24; -static NSAppKitVersionNumber10_3_7: NSAppKitVersion = 743.33; +pub static NSAppKitVersionNumber10_3_7: NSAppKitVersion = 743.33; -static NSAppKitVersionNumber10_3_9: NSAppKitVersion = 743.36; +pub static NSAppKitVersionNumber10_3_9: NSAppKitVersion = 743.36; -static NSAppKitVersionNumber10_4: NSAppKitVersion = 824; +pub static NSAppKitVersionNumber10_4: NSAppKitVersion = 824; -static NSAppKitVersionNumber10_4_1: NSAppKitVersion = 824.1; +pub static NSAppKitVersionNumber10_4_1: NSAppKitVersion = 824.1; -static NSAppKitVersionNumber10_4_3: NSAppKitVersion = 824.23; +pub static NSAppKitVersionNumber10_4_3: NSAppKitVersion = 824.23; -static NSAppKitVersionNumber10_4_4: NSAppKitVersion = 824.33; +pub static NSAppKitVersionNumber10_4_4: NSAppKitVersion = 824.33; -static NSAppKitVersionNumber10_4_7: NSAppKitVersion = 824.41; +pub static NSAppKitVersionNumber10_4_7: NSAppKitVersion = 824.41; -static NSAppKitVersionNumber10_5: NSAppKitVersion = 949; +pub static NSAppKitVersionNumber10_5: NSAppKitVersion = 949; -static NSAppKitVersionNumber10_5_2: NSAppKitVersion = 949.27; +pub static NSAppKitVersionNumber10_5_2: NSAppKitVersion = 949.27; -static NSAppKitVersionNumber10_5_3: NSAppKitVersion = 949.33; +pub static NSAppKitVersionNumber10_5_3: NSAppKitVersion = 949.33; -static NSAppKitVersionNumber10_6: NSAppKitVersion = 1038; +pub static NSAppKitVersionNumber10_6: NSAppKitVersion = 1038; -static NSAppKitVersionNumber10_7: NSAppKitVersion = 1138; +pub static NSAppKitVersionNumber10_7: NSAppKitVersion = 1138; -static NSAppKitVersionNumber10_7_2: NSAppKitVersion = 1138.23; +pub static NSAppKitVersionNumber10_7_2: NSAppKitVersion = 1138.23; -static NSAppKitVersionNumber10_7_3: NSAppKitVersion = 1138.32; +pub static NSAppKitVersionNumber10_7_3: NSAppKitVersion = 1138.32; -static NSAppKitVersionNumber10_7_4: NSAppKitVersion = 1138.47; +pub static NSAppKitVersionNumber10_7_4: NSAppKitVersion = 1138.47; -static NSAppKitVersionNumber10_8: NSAppKitVersion = 1187; +pub static NSAppKitVersionNumber10_8: NSAppKitVersion = 1187; -static NSAppKitVersionNumber10_9: NSAppKitVersion = 1265; +pub static NSAppKitVersionNumber10_9: NSAppKitVersion = 1265; -static NSAppKitVersionNumber10_10: NSAppKitVersion = 1343; +pub static NSAppKitVersionNumber10_10: NSAppKitVersion = 1343; -static NSAppKitVersionNumber10_10_2: NSAppKitVersion = 1344; +pub static NSAppKitVersionNumber10_10_2: NSAppKitVersion = 1344; -static NSAppKitVersionNumber10_10_3: NSAppKitVersion = 1347; +pub static NSAppKitVersionNumber10_10_3: NSAppKitVersion = 1347; -static NSAppKitVersionNumber10_10_4: NSAppKitVersion = 1348; +pub static NSAppKitVersionNumber10_10_4: NSAppKitVersion = 1348; -static NSAppKitVersionNumber10_10_5: NSAppKitVersion = 1348; +pub static NSAppKitVersionNumber10_10_5: NSAppKitVersion = 1348; -static NSAppKitVersionNumber10_10_Max: NSAppKitVersion = 1349; +pub static NSAppKitVersionNumber10_10_Max: NSAppKitVersion = 1349; -static NSAppKitVersionNumber10_11: NSAppKitVersion = 1404; +pub static NSAppKitVersionNumber10_11: NSAppKitVersion = 1404; -static NSAppKitVersionNumber10_11_1: NSAppKitVersion = 1404.13; +pub static NSAppKitVersionNumber10_11_1: NSAppKitVersion = 1404.13; -static NSAppKitVersionNumber10_11_2: NSAppKitVersion = 1404.34; +pub static NSAppKitVersionNumber10_11_2: NSAppKitVersion = 1404.34; -static NSAppKitVersionNumber10_11_3: NSAppKitVersion = 1404.34; +pub static NSAppKitVersionNumber10_11_3: NSAppKitVersion = 1404.34; -static NSAppKitVersionNumber10_12: NSAppKitVersion = 1504; +pub static NSAppKitVersionNumber10_12: NSAppKitVersion = 1504; -static NSAppKitVersionNumber10_12_1: NSAppKitVersion = 1504.60; +pub static NSAppKitVersionNumber10_12_1: NSAppKitVersion = 1504.60; -static NSAppKitVersionNumber10_12_2: NSAppKitVersion = 1504.76; +pub static NSAppKitVersionNumber10_12_2: NSAppKitVersion = 1504.76; -static NSAppKitVersionNumber10_13: NSAppKitVersion = 1561; +pub static NSAppKitVersionNumber10_13: NSAppKitVersion = 1561; -static NSAppKitVersionNumber10_13_1: NSAppKitVersion = 1561.1; +pub static NSAppKitVersionNumber10_13_1: NSAppKitVersion = 1561.1; -static NSAppKitVersionNumber10_13_2: NSAppKitVersion = 1561.2; +pub static NSAppKitVersionNumber10_13_2: NSAppKitVersion = 1561.2; -static NSAppKitVersionNumber10_13_4: NSAppKitVersion = 1561.4; +pub static NSAppKitVersionNumber10_13_4: NSAppKitVersion = 1561.4; -static NSAppKitVersionNumber10_14: NSAppKitVersion = 1671; +pub static NSAppKitVersionNumber10_14: NSAppKitVersion = 1671; -static NSAppKitVersionNumber10_14_1: NSAppKitVersion = 1671.1; +pub static NSAppKitVersionNumber10_14_1: NSAppKitVersion = 1671.1; -static NSAppKitVersionNumber10_14_2: NSAppKitVersion = 1671.2; +pub static NSAppKitVersionNumber10_14_2: NSAppKitVersion = 1671.2; -static NSAppKitVersionNumber10_14_3: NSAppKitVersion = 1671.3; +pub static NSAppKitVersionNumber10_14_3: NSAppKitVersion = 1671.3; -static NSAppKitVersionNumber10_14_4: NSAppKitVersion = 1671.4; +pub static NSAppKitVersionNumber10_14_4: NSAppKitVersion = 1671.4; -static NSAppKitVersionNumber10_14_5: NSAppKitVersion = 1671.5; +pub static NSAppKitVersionNumber10_14_5: NSAppKitVersion = 1671.5; -static NSAppKitVersionNumber10_15: NSAppKitVersion = 1894; +pub static NSAppKitVersionNumber10_15: NSAppKitVersion = 1894; -static NSAppKitVersionNumber10_15_1: NSAppKitVersion = 1894.1; +pub static NSAppKitVersionNumber10_15_1: NSAppKitVersion = 1894.1; -static NSAppKitVersionNumber10_15_2: NSAppKitVersion = 1894.2; +pub static NSAppKitVersionNumber10_15_2: NSAppKitVersion = 1894.2; -static NSAppKitVersionNumber10_15_3: NSAppKitVersion = 1894.3; +pub static NSAppKitVersionNumber10_15_3: NSAppKitVersion = 1894.3; -static NSAppKitVersionNumber10_15_4: NSAppKitVersion = 1894.4; +pub static NSAppKitVersionNumber10_15_4: NSAppKitVersion = 1894.4; -static NSAppKitVersionNumber10_15_5: NSAppKitVersion = 1894.5; +pub static NSAppKitVersionNumber10_15_5: NSAppKitVersion = 1894.5; -static NSAppKitVersionNumber10_15_6: NSAppKitVersion = 1894.6; +pub static NSAppKitVersionNumber10_15_6: NSAppKitVersion = 1894.6; -static NSAppKitVersionNumber11_0: NSAppKitVersion = 2022; +pub static NSAppKitVersionNumber11_0: NSAppKitVersion = 2022; -static NSAppKitVersionNumber11_1: NSAppKitVersion = 2022.2; +pub static NSAppKitVersionNumber11_1: NSAppKitVersion = 2022.2; -static NSAppKitVersionNumber11_2: NSAppKitVersion = 2022.3; +pub static NSAppKitVersionNumber11_2: NSAppKitVersion = 2022.3; -static NSAppKitVersionNumber11_3: NSAppKitVersion = 2022.4; +pub static NSAppKitVersionNumber11_3: NSAppKitVersion = 2022.4; -static NSAppKitVersionNumber11_4: NSAppKitVersion = 2022.5; +pub static NSAppKitVersionNumber11_4: NSAppKitVersion = 2022.5; extern "C" { - static NSModalPanelRunLoopMode: &'static NSRunLoopMode; + pub static NSModalPanelRunLoopMode: &'static NSRunLoopMode; } extern "C" { - static NSEventTrackingRunLoopMode: &'static NSRunLoopMode; + pub static NSEventTrackingRunLoopMode: &'static NSRunLoopMode; } pub type NSModalResponse = NSInteger; -static NSModalResponseStop: NSModalResponse = -1000; +pub static NSModalResponseStop: NSModalResponse = -1000; -static NSModalResponseAbort: NSModalResponse = -1001; +pub static NSModalResponseAbort: NSModalResponse = -1001; -static NSModalResponseContinue: NSModalResponse = -1002; +pub static NSModalResponseContinue: NSModalResponse = -1002; pub const NSUpdateWindowsRunLoopOrdering: i32 = 500000; @@ -174,7 +174,7 @@ pub type NSWindowListOptions = NSInteger; pub const NSWindowListOrderedFrontToBack: NSWindowListOptions = 1 << 0; extern "C" { - static NSApp: Option<&'static NSApplication>; + pub static NSApp: Option<&'static NSApplication>; } pub type NSRequestUserAttentionType = NSUInteger; @@ -553,23 +553,23 @@ extern_methods!( pub type NSAboutPanelOptionKey = NSString; extern "C" { - static NSAboutPanelOptionCredits: &'static NSAboutPanelOptionKey; + pub static NSAboutPanelOptionCredits: &'static NSAboutPanelOptionKey; } extern "C" { - static NSAboutPanelOptionApplicationName: &'static NSAboutPanelOptionKey; + pub static NSAboutPanelOptionApplicationName: &'static NSAboutPanelOptionKey; } extern "C" { - static NSAboutPanelOptionApplicationIcon: &'static NSAboutPanelOptionKey; + pub static NSAboutPanelOptionApplicationIcon: &'static NSAboutPanelOptionKey; } extern "C" { - static NSAboutPanelOptionVersion: &'static NSAboutPanelOptionKey; + pub static NSAboutPanelOptionVersion: &'static NSAboutPanelOptionKey; } extern "C" { - static NSAboutPanelOptionApplicationVersion: &'static NSAboutPanelOptionKey; + pub static NSAboutPanelOptionApplicationVersion: &'static NSAboutPanelOptionKey; } extern_methods!( @@ -634,83 +634,85 @@ extern_methods!( pub type NSServiceProviderName = NSString; extern "C" { - static NSApplicationDidBecomeActiveNotification: &'static NSNotificationName; + pub static NSApplicationDidBecomeActiveNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationDidHideNotification: &'static NSNotificationName; + pub static NSApplicationDidHideNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationDidFinishLaunchingNotification: &'static NSNotificationName; + pub static NSApplicationDidFinishLaunchingNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationDidResignActiveNotification: &'static NSNotificationName; + pub static NSApplicationDidResignActiveNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationDidUnhideNotification: &'static NSNotificationName; + pub static NSApplicationDidUnhideNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationDidUpdateNotification: &'static NSNotificationName; + pub static NSApplicationDidUpdateNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationWillBecomeActiveNotification: &'static NSNotificationName; + pub static NSApplicationWillBecomeActiveNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationWillHideNotification: &'static NSNotificationName; + pub static NSApplicationWillHideNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationWillFinishLaunchingNotification: &'static NSNotificationName; + pub static NSApplicationWillFinishLaunchingNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationWillResignActiveNotification: &'static NSNotificationName; + pub static NSApplicationWillResignActiveNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationWillUnhideNotification: &'static NSNotificationName; + pub static NSApplicationWillUnhideNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationWillUpdateNotification: &'static NSNotificationName; + pub static NSApplicationWillUpdateNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationWillTerminateNotification: &'static NSNotificationName; + pub static NSApplicationWillTerminateNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationDidChangeScreenParametersNotification: &'static NSNotificationName; + pub static NSApplicationDidChangeScreenParametersNotification: &'static NSNotificationName; } extern "C" { - static NSApplicationProtectedDataWillBecomeUnavailableNotification: &'static NSNotificationName; + pub static NSApplicationProtectedDataWillBecomeUnavailableNotification: + &'static NSNotificationName; } extern "C" { - static NSApplicationProtectedDataDidBecomeAvailableNotification: &'static NSNotificationName; + pub static NSApplicationProtectedDataDidBecomeAvailableNotification: + &'static NSNotificationName; } extern "C" { - static NSApplicationLaunchIsDefaultLaunchKey: &'static NSString; + pub static NSApplicationLaunchIsDefaultLaunchKey: &'static NSString; } extern "C" { - static NSApplicationLaunchUserNotificationKey: &'static NSString; + pub static NSApplicationLaunchUserNotificationKey: &'static NSString; } extern "C" { - static NSApplicationLaunchRemoteNotificationKey: &'static NSString; + pub static NSApplicationLaunchRemoteNotificationKey: &'static NSString; } extern "C" { - static NSApplicationDidChangeOcclusionStateNotification: &'static NSNotificationName; + pub static NSApplicationDidChangeOcclusionStateNotification: &'static NSNotificationName; } pub const NSRunStoppedResponse: i32 = -1000; diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index d3637792e..09525290c 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -5,119 +5,119 @@ use crate::AppKit::*; use crate::Foundation::*; extern "C" { - static NSFontAttributeName: &'static NSAttributedStringKey; + pub static NSFontAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSParagraphStyleAttributeName: &'static NSAttributedStringKey; + pub static NSParagraphStyleAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSForegroundColorAttributeName: &'static NSAttributedStringKey; + pub static NSForegroundColorAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSBackgroundColorAttributeName: &'static NSAttributedStringKey; + pub static NSBackgroundColorAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSLigatureAttributeName: &'static NSAttributedStringKey; + pub static NSLigatureAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSKernAttributeName: &'static NSAttributedStringKey; + pub static NSKernAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSTrackingAttributeName: &'static NSAttributedStringKey; + pub static NSTrackingAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSStrikethroughStyleAttributeName: &'static NSAttributedStringKey; + pub static NSStrikethroughStyleAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSUnderlineStyleAttributeName: &'static NSAttributedStringKey; + pub static NSUnderlineStyleAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSStrokeColorAttributeName: &'static NSAttributedStringKey; + pub static NSStrokeColorAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSStrokeWidthAttributeName: &'static NSAttributedStringKey; + pub static NSStrokeWidthAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSShadowAttributeName: &'static NSAttributedStringKey; + pub static NSShadowAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSTextEffectAttributeName: &'static NSAttributedStringKey; + pub static NSTextEffectAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSAttachmentAttributeName: &'static NSAttributedStringKey; + pub static NSAttachmentAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSLinkAttributeName: &'static NSAttributedStringKey; + pub static NSLinkAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSBaselineOffsetAttributeName: &'static NSAttributedStringKey; + pub static NSBaselineOffsetAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSUnderlineColorAttributeName: &'static NSAttributedStringKey; + pub static NSUnderlineColorAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSStrikethroughColorAttributeName: &'static NSAttributedStringKey; + pub static NSStrikethroughColorAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSObliquenessAttributeName: &'static NSAttributedStringKey; + pub static NSObliquenessAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSExpansionAttributeName: &'static NSAttributedStringKey; + pub static NSExpansionAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSWritingDirectionAttributeName: &'static NSAttributedStringKey; + pub static NSWritingDirectionAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSVerticalGlyphFormAttributeName: &'static NSAttributedStringKey; + pub static NSVerticalGlyphFormAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSCursorAttributeName: &'static NSAttributedStringKey; + pub static NSCursorAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSToolTipAttributeName: &'static NSAttributedStringKey; + pub static NSToolTipAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSMarkedClauseSegmentAttributeName: &'static NSAttributedStringKey; + pub static NSMarkedClauseSegmentAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSTextAlternativesAttributeName: &'static NSAttributedStringKey; + pub static NSTextAlternativesAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSSpellingStateAttributeName: &'static NSAttributedStringKey; + pub static NSSpellingStateAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSSuperscriptAttributeName: &'static NSAttributedStringKey; + pub static NSSuperscriptAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSGlyphInfoAttributeName: &'static NSAttributedStringKey; + pub static NSGlyphInfoAttributeName: &'static NSAttributedStringKey; } pub type NSUnderlineStyle = NSInteger; @@ -139,7 +139,7 @@ pub const NSWritingDirectionOverride: NSWritingDirectionFormatType = 1 << 1; pub type NSTextEffectStyle = NSString; extern "C" { - static NSTextEffectLetterpressStyle: &'static NSTextEffectStyle; + pub static NSTextEffectLetterpressStyle: &'static NSTextEffectStyle; } pub type NSSpellingState = NSInteger; @@ -166,53 +166,53 @@ extern_methods!( pub type NSAttributedStringDocumentType = NSString; extern "C" { - static NSPlainTextDocumentType: &'static NSAttributedStringDocumentType; + pub static NSPlainTextDocumentType: &'static NSAttributedStringDocumentType; } extern "C" { - static NSRTFTextDocumentType: &'static NSAttributedStringDocumentType; + pub static NSRTFTextDocumentType: &'static NSAttributedStringDocumentType; } extern "C" { - static NSRTFDTextDocumentType: &'static NSAttributedStringDocumentType; + pub static NSRTFDTextDocumentType: &'static NSAttributedStringDocumentType; } extern "C" { - static NSHTMLTextDocumentType: &'static NSAttributedStringDocumentType; + pub static NSHTMLTextDocumentType: &'static NSAttributedStringDocumentType; } extern "C" { - static NSMacSimpleTextDocumentType: &'static NSAttributedStringDocumentType; + pub static NSMacSimpleTextDocumentType: &'static NSAttributedStringDocumentType; } extern "C" { - static NSDocFormatTextDocumentType: &'static NSAttributedStringDocumentType; + pub static NSDocFormatTextDocumentType: &'static NSAttributedStringDocumentType; } extern "C" { - static NSWordMLTextDocumentType: &'static NSAttributedStringDocumentType; + pub static NSWordMLTextDocumentType: &'static NSAttributedStringDocumentType; } extern "C" { - static NSWebArchiveTextDocumentType: &'static NSAttributedStringDocumentType; + pub static NSWebArchiveTextDocumentType: &'static NSAttributedStringDocumentType; } extern "C" { - static NSOfficeOpenXMLTextDocumentType: &'static NSAttributedStringDocumentType; + pub static NSOfficeOpenXMLTextDocumentType: &'static NSAttributedStringDocumentType; } extern "C" { - static NSOpenDocumentTextDocumentType: &'static NSAttributedStringDocumentType; + pub static NSOpenDocumentTextDocumentType: &'static NSAttributedStringDocumentType; } pub type NSTextLayoutSectionKey = NSString; extern "C" { - static NSTextLayoutSectionOrientation: &'static NSTextLayoutSectionKey; + pub static NSTextLayoutSectionOrientation: &'static NSTextLayoutSectionKey; } extern "C" { - static NSTextLayoutSectionRange: &'static NSTextLayoutSectionKey; + pub static NSTextLayoutSectionRange: &'static NSTextLayoutSectionKey; } pub type NSTextScalingType = NSInteger; @@ -222,202 +222,213 @@ pub const NSTextScalingiOS: NSTextScalingType = 1; pub type NSAttributedStringDocumentAttributeKey = NSString; extern "C" { - static NSDocumentTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSDocumentTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSConvertedDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSConvertedDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSCocoaVersionDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSCocoaVersionDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSFileTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSFileTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSTitleDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSTitleDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSCompanyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSCompanyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSCopyrightDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSCopyrightDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSSubjectDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSSubjectDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSAuthorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSAuthorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSKeywordsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSKeywordsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSCommentDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSCommentDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSEditorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSEditorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSCreationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSCreationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSModificationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSModificationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSManagerDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSManagerDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSCategoryDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSCategoryDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSAppearanceDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSAppearanceDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSCharacterEncodingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSCharacterEncodingDocumentAttribute: + &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSDefaultAttributesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSDefaultAttributesDocumentAttribute: + &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSPaperSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSPaperSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSLeftMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSLeftMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSRightMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSRightMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSTopMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSTopMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSBottomMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSBottomMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSViewSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSViewSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSViewZoomDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSViewZoomDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSViewModeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSViewModeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSReadOnlyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSReadOnlyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSBackgroundColorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSBackgroundColorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSHyphenationFactorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSHyphenationFactorDocumentAttribute: + &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSDefaultTabIntervalDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSDefaultTabIntervalDocumentAttribute: + &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSTextLayoutSectionsAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSTextLayoutSectionsAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSExcludedElementsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSExcludedElementsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSTextEncodingNameDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSTextEncodingNameDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSPrefixSpacesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSPrefixSpacesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; } extern "C" { - static NSSourceTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; + pub static NSSourceTextScalingDocumentAttribute: + &'static NSAttributedStringDocumentAttributeKey; } pub type NSAttributedStringDocumentReadingOptionKey = NSString; extern "C" { - static NSDocumentTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSDocumentTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSDefaultAttributesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSDefaultAttributesDocumentOption: + &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSCharacterEncodingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSCharacterEncodingDocumentOption: + &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSTextEncodingNameDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSTextEncodingNameDocumentOption: + &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSBaseURLDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSBaseURLDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSTimeoutDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSTimeoutDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSWebPreferencesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSWebPreferencesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSWebResourceLoadDelegateDocumentOption: + pub static NSWebResourceLoadDelegateDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSTextSizeMultiplierDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSTextSizeMultiplierDocumentOption: + &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSFileTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSFileTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSTargetTextScalingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSTargetTextScalingDocumentOption: + &'static NSAttributedStringDocumentReadingOptionKey; } extern "C" { - static NSSourceTextScalingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; + pub static NSSourceTextScalingDocumentOption: + &'static NSAttributedStringDocumentReadingOptionKey; } extern_methods!( @@ -709,35 +720,35 @@ extern_methods!( } ); -static NSUnderlinePatternSolid: NSUnderlineStyle = NSUnderlineStylePatternSolid; +pub static NSUnderlinePatternSolid: NSUnderlineStyle = NSUnderlineStylePatternSolid; -static NSUnderlinePatternDot: NSUnderlineStyle = NSUnderlineStylePatternDot; +pub static NSUnderlinePatternDot: NSUnderlineStyle = NSUnderlineStylePatternDot; -static NSUnderlinePatternDash: NSUnderlineStyle = NSUnderlineStylePatternDash; +pub static NSUnderlinePatternDash: NSUnderlineStyle = NSUnderlineStylePatternDash; -static NSUnderlinePatternDashDot: NSUnderlineStyle = NSUnderlineStylePatternDashDot; +pub static NSUnderlinePatternDashDot: NSUnderlineStyle = NSUnderlineStylePatternDashDot; -static NSUnderlinePatternDashDotDot: NSUnderlineStyle = NSUnderlineStylePatternDashDotDot; +pub static NSUnderlinePatternDashDotDot: NSUnderlineStyle = NSUnderlineStylePatternDashDotDot; -static NSUnderlineByWord: NSUnderlineStyle = NSUnderlineStyleByWord; +pub static NSUnderlineByWord: NSUnderlineStyle = NSUnderlineStyleByWord; extern "C" { - static NSCharacterShapeAttributeName: &'static NSAttributedStringKey; + pub static NSCharacterShapeAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSUsesScreenFontsDocumentAttribute: &'static NSAttributedStringKey; + pub static NSUsesScreenFontsDocumentAttribute: &'static NSAttributedStringKey; } pub const NSNoUnderlineStyle: i32 = 0; pub const NSSingleUnderlineStyle: i32 = 1; extern "C" { - static NSUnderlineStrikethroughMask: NSUInteger; + pub static NSUnderlineStrikethroughMask: NSUInteger; } extern "C" { - static NSUnderlineByWordMask: NSUInteger; + pub static NSUnderlineByWordMask: NSUInteger; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index 868652853..28c4c93b6 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -329,26 +329,26 @@ extern_methods!( } ); -static NSButtLineCapStyle: NSLineCapStyle = NSLineCapStyleButt; +pub static NSButtLineCapStyle: NSLineCapStyle = NSLineCapStyleButt; -static NSRoundLineCapStyle: NSLineCapStyle = NSLineCapStyleRound; +pub static NSRoundLineCapStyle: NSLineCapStyle = NSLineCapStyleRound; -static NSSquareLineCapStyle: NSLineCapStyle = NSLineCapStyleSquare; +pub static NSSquareLineCapStyle: NSLineCapStyle = NSLineCapStyleSquare; -static NSMiterLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleMiter; +pub static NSMiterLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleMiter; -static NSRoundLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleRound; +pub static NSRoundLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleRound; -static NSBevelLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleBevel; +pub static NSBevelLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleBevel; -static NSNonZeroWindingRule: NSWindingRule = NSWindingRuleNonZero; +pub static NSNonZeroWindingRule: NSWindingRule = NSWindingRuleNonZero; -static NSEvenOddWindingRule: NSWindingRule = NSWindingRuleEvenOdd; +pub static NSEvenOddWindingRule: NSWindingRule = NSWindingRuleEvenOdd; -static NSMoveToBezierPathElement: NSBezierPathElement = NSBezierPathElementMoveTo; +pub static NSMoveToBezierPathElement: NSBezierPathElement = NSBezierPathElementMoveTo; -static NSLineToBezierPathElement: NSBezierPathElement = NSBezierPathElementLineTo; +pub static NSLineToBezierPathElement: NSBezierPathElement = NSBezierPathElementLineTo; -static NSCurveToBezierPathElement: NSBezierPathElement = NSBezierPathElementCurveTo; +pub static NSCurveToBezierPathElement: NSBezierPathElement = NSBezierPathElementCurveTo; -static NSClosePathBezierPathElement: NSBezierPathElement = NSBezierPathElementClosePath; +pub static NSClosePathBezierPathElement: NSBezierPathElement = NSBezierPathElementClosePath; diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index 83297410d..eaf3b74e6 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -42,63 +42,63 @@ pub const NSBitmapFormatThirtyTwoBitBigEndian: NSBitmapFormat = 1 << 11; pub type NSBitmapImageRepPropertyKey = NSString; extern "C" { - static NSImageCompressionMethod: &'static NSBitmapImageRepPropertyKey; + pub static NSImageCompressionMethod: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageCompressionFactor: &'static NSBitmapImageRepPropertyKey; + pub static NSImageCompressionFactor: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageDitherTransparency: &'static NSBitmapImageRepPropertyKey; + pub static NSImageDitherTransparency: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageRGBColorTable: &'static NSBitmapImageRepPropertyKey; + pub static NSImageRGBColorTable: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageInterlaced: &'static NSBitmapImageRepPropertyKey; + pub static NSImageInterlaced: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageColorSyncProfileData: &'static NSBitmapImageRepPropertyKey; + pub static NSImageColorSyncProfileData: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageFrameCount: &'static NSBitmapImageRepPropertyKey; + pub static NSImageFrameCount: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageCurrentFrame: &'static NSBitmapImageRepPropertyKey; + pub static NSImageCurrentFrame: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageCurrentFrameDuration: &'static NSBitmapImageRepPropertyKey; + pub static NSImageCurrentFrameDuration: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageLoopCount: &'static NSBitmapImageRepPropertyKey; + pub static NSImageLoopCount: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageGamma: &'static NSBitmapImageRepPropertyKey; + pub static NSImageGamma: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageProgressive: &'static NSBitmapImageRepPropertyKey; + pub static NSImageProgressive: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageEXIFData: &'static NSBitmapImageRepPropertyKey; + pub static NSImageEXIFData: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageIPTCData: &'static NSBitmapImageRepPropertyKey; + pub static NSImageIPTCData: &'static NSBitmapImageRepPropertyKey; } extern "C" { - static NSImageFallbackBackgroundColor: &'static NSBitmapImageRepPropertyKey; + pub static NSImageFallbackBackgroundColor: &'static NSBitmapImageRepPropertyKey; } extern_class!( @@ -318,28 +318,29 @@ extern_methods!( } ); -static NSTIFFFileType: NSBitmapImageFileType = NSBitmapImageFileTypeTIFF; +pub static NSTIFFFileType: NSBitmapImageFileType = NSBitmapImageFileTypeTIFF; -static NSBMPFileType: NSBitmapImageFileType = NSBitmapImageFileTypeBMP; +pub static NSBMPFileType: NSBitmapImageFileType = NSBitmapImageFileTypeBMP; -static NSGIFFileType: NSBitmapImageFileType = NSBitmapImageFileTypeGIF; +pub static NSGIFFileType: NSBitmapImageFileType = NSBitmapImageFileTypeGIF; -static NSJPEGFileType: NSBitmapImageFileType = NSBitmapImageFileTypeJPEG; +pub static NSJPEGFileType: NSBitmapImageFileType = NSBitmapImageFileTypeJPEG; -static NSPNGFileType: NSBitmapImageFileType = NSBitmapImageFileTypePNG; +pub static NSPNGFileType: NSBitmapImageFileType = NSBitmapImageFileTypePNG; -static NSJPEG2000FileType: NSBitmapImageFileType = NSBitmapImageFileTypeJPEG2000; +pub static NSJPEG2000FileType: NSBitmapImageFileType = NSBitmapImageFileTypeJPEG2000; -static NSAlphaFirstBitmapFormat: NSBitmapFormat = NSBitmapFormatAlphaFirst; +pub static NSAlphaFirstBitmapFormat: NSBitmapFormat = NSBitmapFormatAlphaFirst; -static NSAlphaNonpremultipliedBitmapFormat: NSBitmapFormat = NSBitmapFormatAlphaNonpremultiplied; +pub static NSAlphaNonpremultipliedBitmapFormat: NSBitmapFormat = + NSBitmapFormatAlphaNonpremultiplied; -static NSFloatingPointSamplesBitmapFormat: NSBitmapFormat = NSBitmapFormatFloatingPointSamples; +pub static NSFloatingPointSamplesBitmapFormat: NSBitmapFormat = NSBitmapFormatFloatingPointSamples; -static NS16BitLittleEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatSixteenBitLittleEndian; +pub static NS16BitLittleEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatSixteenBitLittleEndian; -static NS32BitLittleEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatThirtyTwoBitLittleEndian; +pub static NS32BitLittleEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatThirtyTwoBitLittleEndian; -static NS16BitBigEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatSixteenBitBigEndian; +pub static NS16BitBigEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatSixteenBitBigEndian; -static NS32BitBigEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatThirtyTwoBitBigEndian; +pub static NS32BitBigEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatThirtyTwoBitBigEndian; diff --git a/crates/icrate/src/generated/AppKit/NSBox.rs b/crates/icrate/src/generated/AppKit/NSBox.rs index a64458469..7dd16987e 100644 --- a/crates/icrate/src/generated/AppKit/NSBox.rs +++ b/crates/icrate/src/generated/AppKit/NSBox.rs @@ -126,6 +126,6 @@ extern_methods!( } ); -static NSBoxSecondary: NSBoxType = 1; +pub static NSBoxSecondary: NSBoxType = 1; -static NSBoxOldStyle: NSBoxType = 3; +pub static NSBoxOldStyle: NSBoxType = 3; diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index 654cb0df6..676189691 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -4,9 +4,9 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -static NSAppKitVersionNumberWithContinuousScrollingBrowser: NSAppKitVersion = 680.0; +pub static NSAppKitVersionNumberWithContinuousScrollingBrowser: NSAppKitVersion = 680.0; -static NSAppKitVersionNumberWithColumnResizingBrowser: NSAppKitVersion = 685.0; +pub static NSAppKitVersionNumberWithColumnResizingBrowser: NSAppKitVersion = 685.0; pub type NSBrowserColumnsAutosaveName = NSString; @@ -417,7 +417,7 @@ extern_methods!( ); extern "C" { - static NSBrowserColumnConfigurationDidChangeNotification: &'static NSNotificationName; + pub static NSBrowserColumnConfigurationDidChangeNotification: &'static NSNotificationName; } pub type NSBrowserDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs index 46a5d522d..25b23676e 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -215,61 +215,61 @@ pub const NSGradientConcaveStrong: NSGradientType = 2; pub const NSGradientConvexWeak: NSGradientType = 3; pub const NSGradientConvexStrong: NSGradientType = 4; -static NSMomentaryLightButton: NSButtonType = NSButtonTypeMomentaryLight; +pub static NSMomentaryLightButton: NSButtonType = NSButtonTypeMomentaryLight; -static NSPushOnPushOffButton: NSButtonType = NSButtonTypePushOnPushOff; +pub static NSPushOnPushOffButton: NSButtonType = NSButtonTypePushOnPushOff; -static NSToggleButton: NSButtonType = NSButtonTypeToggle; +pub static NSToggleButton: NSButtonType = NSButtonTypeToggle; -static NSSwitchButton: NSButtonType = NSButtonTypeSwitch; +pub static NSSwitchButton: NSButtonType = NSButtonTypeSwitch; -static NSRadioButton: NSButtonType = NSButtonTypeRadio; +pub static NSRadioButton: NSButtonType = NSButtonTypeRadio; -static NSMomentaryChangeButton: NSButtonType = NSButtonTypeMomentaryChange; +pub static NSMomentaryChangeButton: NSButtonType = NSButtonTypeMomentaryChange; -static NSOnOffButton: NSButtonType = NSButtonTypeOnOff; +pub static NSOnOffButton: NSButtonType = NSButtonTypeOnOff; -static NSMomentaryPushInButton: NSButtonType = NSButtonTypeMomentaryPushIn; +pub static NSMomentaryPushInButton: NSButtonType = NSButtonTypeMomentaryPushIn; -static NSAcceleratorButton: NSButtonType = NSButtonTypeAccelerator; +pub static NSAcceleratorButton: NSButtonType = NSButtonTypeAccelerator; -static NSMultiLevelAcceleratorButton: NSButtonType = NSButtonTypeMultiLevelAccelerator; +pub static NSMultiLevelAcceleratorButton: NSButtonType = NSButtonTypeMultiLevelAccelerator; -static NSMomentaryPushButton: NSButtonType = NSButtonTypeMomentaryLight; +pub static NSMomentaryPushButton: NSButtonType = NSButtonTypeMomentaryLight; -static NSMomentaryLight: NSButtonType = NSButtonTypeMomentaryPushIn; +pub static NSMomentaryLight: NSButtonType = NSButtonTypeMomentaryPushIn; -static NSRoundedBezelStyle: NSBezelStyle = NSBezelStyleRounded; +pub static NSRoundedBezelStyle: NSBezelStyle = NSBezelStyleRounded; -static NSRegularSquareBezelStyle: NSBezelStyle = NSBezelStyleRegularSquare; +pub static NSRegularSquareBezelStyle: NSBezelStyle = NSBezelStyleRegularSquare; -static NSDisclosureBezelStyle: NSBezelStyle = NSBezelStyleDisclosure; +pub static NSDisclosureBezelStyle: NSBezelStyle = NSBezelStyleDisclosure; -static NSShadowlessSquareBezelStyle: NSBezelStyle = NSBezelStyleShadowlessSquare; +pub static NSShadowlessSquareBezelStyle: NSBezelStyle = NSBezelStyleShadowlessSquare; -static NSCircularBezelStyle: NSBezelStyle = NSBezelStyleCircular; +pub static NSCircularBezelStyle: NSBezelStyle = NSBezelStyleCircular; -static NSTexturedSquareBezelStyle: NSBezelStyle = NSBezelStyleTexturedSquare; +pub static NSTexturedSquareBezelStyle: NSBezelStyle = NSBezelStyleTexturedSquare; -static NSHelpButtonBezelStyle: NSBezelStyle = NSBezelStyleHelpButton; +pub static NSHelpButtonBezelStyle: NSBezelStyle = NSBezelStyleHelpButton; -static NSSmallSquareBezelStyle: NSBezelStyle = NSBezelStyleSmallSquare; +pub static NSSmallSquareBezelStyle: NSBezelStyle = NSBezelStyleSmallSquare; -static NSTexturedRoundedBezelStyle: NSBezelStyle = NSBezelStyleTexturedRounded; +pub static NSTexturedRoundedBezelStyle: NSBezelStyle = NSBezelStyleTexturedRounded; -static NSRoundRectBezelStyle: NSBezelStyle = NSBezelStyleRoundRect; +pub static NSRoundRectBezelStyle: NSBezelStyle = NSBezelStyleRoundRect; -static NSRecessedBezelStyle: NSBezelStyle = NSBezelStyleRecessed; +pub static NSRecessedBezelStyle: NSBezelStyle = NSBezelStyleRecessed; -static NSRoundedDisclosureBezelStyle: NSBezelStyle = NSBezelStyleRoundedDisclosure; +pub static NSRoundedDisclosureBezelStyle: NSBezelStyle = NSBezelStyleRoundedDisclosure; -static NSInlineBezelStyle: NSBezelStyle = NSBezelStyleInline; +pub static NSInlineBezelStyle: NSBezelStyle = NSBezelStyleInline; -static NSSmallIconButtonBezelStyle: NSBezelStyle = 2; +pub static NSSmallIconButtonBezelStyle: NSBezelStyle = 2; -static NSThickSquareBezelStyle: NSBezelStyle = 3; +pub static NSThickSquareBezelStyle: NSBezelStyle = 3; -static NSThickerSquareBezelStyle: NSBezelStyle = 4; +pub static NSThickerSquareBezelStyle: NSBezelStyle = 4; extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index 9697f1657..2108ad378 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -97,5 +97,5 @@ extern_methods!( ); extern "C" { - static NSTouchBarItemIdentifierCandidateList: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierCandidateList: &'static NSTouchBarItemIdentifier; } diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index 025066de7..f35e49310 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -50,11 +50,11 @@ pub const NSScaleNone: NSImageScaling = 2; pub type NSControlStateValue = NSInteger; -static NSControlStateValueMixed: NSControlStateValue = -1; +pub static NSControlStateValueMixed: NSControlStateValue = -1; -static NSControlStateValueOff: NSControlStateValue = 0; +pub static NSControlStateValueOff: NSControlStateValue = 0; -static NSControlStateValueOn: NSControlStateValue = 1; +pub static NSControlStateValueOn: NSControlStateValue = 1; pub type NSCellStyleMask = NSUInteger; pub const NSNoCellMask: NSCellStyleMask = 0; @@ -680,26 +680,26 @@ extern_methods!( } ); -static NSBackgroundStyleLight: NSBackgroundStyle = NSBackgroundStyleNormal; +pub static NSBackgroundStyleLight: NSBackgroundStyle = NSBackgroundStyleNormal; -static NSBackgroundStyleDark: NSBackgroundStyle = NSBackgroundStyleEmphasized; +pub static NSBackgroundStyleDark: NSBackgroundStyle = NSBackgroundStyleEmphasized; pub type NSCellStateValue = NSControlStateValue; -static NSMixedState: NSControlStateValue = NSControlStateValueMixed; +pub static NSMixedState: NSControlStateValue = NSControlStateValueMixed; -static NSOffState: NSControlStateValue = NSControlStateValueOff; +pub static NSOffState: NSControlStateValue = NSControlStateValueOff; -static NSOnState: NSControlStateValue = NSControlStateValueOn; +pub static NSOnState: NSControlStateValue = NSControlStateValueOn; -static NSRegularControlSize: NSControlSize = NSControlSizeRegular; +pub static NSRegularControlSize: NSControlSize = NSControlSizeRegular; -static NSSmallControlSize: NSControlSize = NSControlSizeSmall; +pub static NSSmallControlSize: NSControlSize = NSControlSizeSmall; -static NSMiniControlSize: NSControlSize = NSControlSizeMini; +pub static NSMiniControlSize: NSControlSize = NSControlSizeMini; extern "C" { - static NSControlTintDidChangeNotification: &'static NSNotificationName; + pub static NSControlTintDidChangeNotification: &'static NSNotificationName; } pub const NSAnyType: i32 = 0; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 9b1577536..639b58def 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -16,7 +16,7 @@ pub const NSDirectionalRectEdgeAll: NSDirectionalRectEdge = NSDirectionalRectEdg | NSDirectionalRectEdgeTrailing; extern "C" { - static NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets; + pub static NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets; } pub type NSRectAlignment = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs index 6bc7edef3..35cd5c065 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs @@ -9,11 +9,13 @@ pub const NSCollectionViewScrollDirectionVertical: NSCollectionViewScrollDirecti pub const NSCollectionViewScrollDirectionHorizontal: NSCollectionViewScrollDirection = 1; extern "C" { - static NSCollectionElementKindSectionHeader: &'static NSCollectionViewSupplementaryElementKind; + pub static NSCollectionElementKindSectionHeader: + &'static NSCollectionViewSupplementaryElementKind; } extern "C" { - static NSCollectionElementKindSectionFooter: &'static NSCollectionViewSupplementaryElementKind; + pub static NSCollectionElementKindSectionFooter: + &'static NSCollectionViewSupplementaryElementKind; } extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs index 0d748ec26..f57517c76 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -13,7 +13,7 @@ pub const NSCollectionElementCategoryInterItemGap: NSCollectionElementCategory = pub type NSCollectionViewDecorationElementKind = NSString; extern "C" { - static NSCollectionElementKindInterItemGapIndicator: + pub static NSCollectionElementKindInterItemGapIndicator: &'static NSCollectionViewSupplementaryElementKind; } diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index e6ae3458b..5588df723 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -static NSAppKitVersionNumberWithPatternColorLeakFix: NSAppKitVersion = 641.0; +pub static NSAppKitVersionNumberWithPatternColorLeakFix: NSAppKitVersion = 641.0; pub type NSColorType = NSInteger; pub const NSColorTypeComponentBased: NSColorType = 0; @@ -607,5 +607,5 @@ extern_methods!( ); extern "C" { - static NSSystemColorsDidChangeNotification: &'static NSNotificationName; + pub static NSSystemColorsDidChangeNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSColorList.rs b/crates/icrate/src/generated/AppKit/NSColorList.rs index b7b843380..04d18e22c 100644 --- a/crates/icrate/src/generated/AppKit/NSColorList.rs +++ b/crates/icrate/src/generated/AppKit/NSColorList.rs @@ -76,5 +76,5 @@ extern_methods!( ); extern "C" { - static NSColorListDidChangeNotification: &'static NSNotificationName; + pub static NSColorListDidChangeNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index cf5e4fa91..de2db8f7e 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -122,23 +122,23 @@ extern_methods!( ); extern "C" { - static NSColorPanelColorDidChangeNotification: &'static NSNotificationName; + pub static NSColorPanelColorDidChangeNotification: &'static NSNotificationName; } -static NSNoModeColorPanel: NSColorPanelMode = NSColorPanelModeNone; +pub static NSNoModeColorPanel: NSColorPanelMode = NSColorPanelModeNone; -static NSGrayModeColorPanel: NSColorPanelMode = NSColorPanelModeGray; +pub static NSGrayModeColorPanel: NSColorPanelMode = NSColorPanelModeGray; -static NSRGBModeColorPanel: NSColorPanelMode = NSColorPanelModeRGB; +pub static NSRGBModeColorPanel: NSColorPanelMode = NSColorPanelModeRGB; -static NSCMYKModeColorPanel: NSColorPanelMode = NSColorPanelModeCMYK; +pub static NSCMYKModeColorPanel: NSColorPanelMode = NSColorPanelModeCMYK; -static NSHSBModeColorPanel: NSColorPanelMode = NSColorPanelModeHSB; +pub static NSHSBModeColorPanel: NSColorPanelMode = NSColorPanelModeHSB; -static NSCustomPaletteModeColorPanel: NSColorPanelMode = NSColorPanelModeCustomPalette; +pub static NSCustomPaletteModeColorPanel: NSColorPanelMode = NSColorPanelModeCustomPalette; -static NSColorListModeColorPanel: NSColorPanelMode = NSColorPanelModeColorList; +pub static NSColorListModeColorPanel: NSColorPanelMode = NSColorPanelModeColorList; -static NSWheelModeColorPanel: NSColorPanelMode = NSColorPanelModeWheel; +pub static NSWheelModeColorPanel: NSColorPanelMode = NSColorPanelModeWheel; -static NSCrayonModeColorPanel: NSColorPanelMode = NSColorPanelModeCrayon; +pub static NSCrayonModeColorPanel: NSColorPanelMode = NSColorPanelModeCrayon; diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index b840e8506..d91a42aec 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -101,18 +101,18 @@ extern_methods!( } ); -static NSUnknownColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelUnknown; +pub static NSUnknownColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelUnknown; -static NSGrayColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelGray; +pub static NSGrayColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelGray; -static NSRGBColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelRGB; +pub static NSRGBColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelRGB; -static NSCMYKColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelCMYK; +pub static NSCMYKColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelCMYK; -static NSLABColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelLAB; +pub static NSLABColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelLAB; -static NSDeviceNColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelDeviceN; +pub static NSDeviceNColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelDeviceN; -static NSIndexedColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelIndexed; +pub static NSIndexedColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelIndexed; -static NSPatternColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelPatterned; +pub static NSPatternColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelPatterned; diff --git a/crates/icrate/src/generated/AppKit/NSComboBox.rs b/crates/icrate/src/generated/AppKit/NSComboBox.rs index 43b82418c..16bd2f89b 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBox.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBox.rs @@ -5,19 +5,19 @@ use crate::AppKit::*; use crate::Foundation::*; extern "C" { - static NSComboBoxWillPopUpNotification: &'static NSNotificationName; + pub static NSComboBoxWillPopUpNotification: &'static NSNotificationName; } extern "C" { - static NSComboBoxWillDismissNotification: &'static NSNotificationName; + pub static NSComboBoxWillDismissNotification: &'static NSNotificationName; } extern "C" { - static NSComboBoxSelectionDidChangeNotification: &'static NSNotificationName; + pub static NSComboBoxSelectionDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSComboBoxSelectionIsChangingNotification: &'static NSNotificationName; + pub static NSComboBoxSelectionIsChangingNotification: &'static NSNotificationName; } pub type NSComboBoxDataSource = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index 0c27e3c8c..1772610a9 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -242,15 +242,15 @@ extern_methods!( pub type NSControlTextEditingDelegate = NSObject; extern "C" { - static NSControlTextDidBeginEditingNotification: &'static NSNotificationName; + pub static NSControlTextDidBeginEditingNotification: &'static NSNotificationName; } extern "C" { - static NSControlTextDidEndEditingNotification: &'static NSNotificationName; + pub static NSControlTextDidEndEditingNotification: &'static NSNotificationName; } extern "C" { - static NSControlTextDidChangeNotification: &'static NSNotificationName; + pub static NSControlTextDidChangeNotification: &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs index 2ad4634ec..e39fa0c3f 100644 --- a/crates/icrate/src/generated/AppKit/NSCursor.rs +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -114,7 +114,7 @@ extern_methods!( } ); -static NSAppKitVersionNumberWithCursorSizeSupport: NSAppKitVersion = 682.0; +pub static NSAppKitVersionNumberWithCursorSizeSupport: NSAppKitVersion = 682.0; extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index a7619b453..0bf1788b5 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -129,29 +129,30 @@ extern_methods!( pub type NSDatePickerCellDelegate = NSObject; -static NSTextFieldAndStepperDatePickerStyle: NSDatePickerStyle = +pub static NSTextFieldAndStepperDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleTextFieldAndStepper; -static NSClockAndCalendarDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleClockAndCalendar; +pub static NSClockAndCalendarDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleClockAndCalendar; -static NSTextFieldDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleTextField; +pub static NSTextFieldDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleTextField; -static NSSingleDateMode: NSDatePickerMode = NSDatePickerModeSingle; +pub static NSSingleDateMode: NSDatePickerMode = NSDatePickerModeSingle; -static NSRangeDateMode: NSDatePickerMode = NSDatePickerModeRange; +pub static NSRangeDateMode: NSDatePickerMode = NSDatePickerModeRange; -static NSHourMinuteDatePickerElementFlag: NSDatePickerElementFlags = +pub static NSHourMinuteDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagHourMinute; -static NSHourMinuteSecondDatePickerElementFlag: NSDatePickerElementFlags = +pub static NSHourMinuteSecondDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagHourMinuteSecond; -static NSTimeZoneDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagTimeZone; +pub static NSTimeZoneDatePickerElementFlag: NSDatePickerElementFlags = + NSDatePickerElementFlagTimeZone; -static NSYearMonthDatePickerElementFlag: NSDatePickerElementFlags = +pub static NSYearMonthDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagYearMonth; -static NSYearMonthDayDatePickerElementFlag: NSDatePickerElementFlags = +pub static NSYearMonthDayDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagYearMonthDay; -static NSEraDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagEra; +pub static NSEraDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagEra; diff --git a/crates/icrate/src/generated/AppKit/NSDockTile.rs b/crates/icrate/src/generated/AppKit/NSDockTile.rs index 1206e8020..8c430f5f8 100644 --- a/crates/icrate/src/generated/AppKit/NSDockTile.rs +++ b/crates/icrate/src/generated/AppKit/NSDockTile.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -static NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = 1001.0; +pub static NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = 1001.0; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs index bf1743156..2efad0117 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -7,11 +7,11 @@ use crate::Foundation::*; pub type NSDraggingImageComponentKey = NSString; extern "C" { - static NSDraggingImageComponentIconKey: &'static NSDraggingImageComponentKey; + pub static NSDraggingImageComponentIconKey: &'static NSDraggingImageComponentKey; } extern "C" { - static NSDraggingImageComponentLabelKey: &'static NSDraggingImageComponentKey; + pub static NSDraggingImageComponentLabelKey: &'static NSDraggingImageComponentKey; } extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index 1ac6985f5..ea3c27142 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -119,17 +119,17 @@ extern_methods!( pub type NSDrawerDelegate = NSObject; extern "C" { - static NSDrawerWillOpenNotification: &'static NSNotificationName; + pub static NSDrawerWillOpenNotification: &'static NSNotificationName; } extern "C" { - static NSDrawerDidOpenNotification: &'static NSNotificationName; + pub static NSDrawerDidOpenNotification: &'static NSNotificationName; } extern "C" { - static NSDrawerWillCloseNotification: &'static NSNotificationName; + pub static NSDrawerWillCloseNotification: &'static NSNotificationName; } extern "C" { - static NSDrawerDidCloseNotification: &'static NSNotificationName; + pub static NSDrawerDidCloseNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSErrors.rs b/crates/icrate/src/generated/AppKit/NSErrors.rs index 0feab0193..96820b869 100644 --- a/crates/icrate/src/generated/AppKit/NSErrors.rs +++ b/crates/icrate/src/generated/AppKit/NSErrors.rs @@ -5,145 +5,145 @@ use crate::AppKit::*; use crate::Foundation::*; extern "C" { - static NSTextLineTooLongException: &'static NSExceptionName; + pub static NSTextLineTooLongException: &'static NSExceptionName; } extern "C" { - static NSTextNoSelectionException: &'static NSExceptionName; + pub static NSTextNoSelectionException: &'static NSExceptionName; } extern "C" { - static NSWordTablesWriteException: &'static NSExceptionName; + pub static NSWordTablesWriteException: &'static NSExceptionName; } extern "C" { - static NSWordTablesReadException: &'static NSExceptionName; + pub static NSWordTablesReadException: &'static NSExceptionName; } extern "C" { - static NSTextReadException: &'static NSExceptionName; + pub static NSTextReadException: &'static NSExceptionName; } extern "C" { - static NSTextWriteException: &'static NSExceptionName; + pub static NSTextWriteException: &'static NSExceptionName; } extern "C" { - static NSPasteboardCommunicationException: &'static NSExceptionName; + pub static NSPasteboardCommunicationException: &'static NSExceptionName; } extern "C" { - static NSPrintingCommunicationException: &'static NSExceptionName; + pub static NSPrintingCommunicationException: &'static NSExceptionName; } extern "C" { - static NSAbortModalException: &'static NSExceptionName; + pub static NSAbortModalException: &'static NSExceptionName; } extern "C" { - static NSAbortPrintingException: &'static NSExceptionName; + pub static NSAbortPrintingException: &'static NSExceptionName; } extern "C" { - static NSIllegalSelectorException: &'static NSExceptionName; + pub static NSIllegalSelectorException: &'static NSExceptionName; } extern "C" { - static NSAppKitVirtualMemoryException: &'static NSExceptionName; + pub static NSAppKitVirtualMemoryException: &'static NSExceptionName; } extern "C" { - static NSBadRTFDirectiveException: &'static NSExceptionName; + pub static NSBadRTFDirectiveException: &'static NSExceptionName; } extern "C" { - static NSBadRTFFontTableException: &'static NSExceptionName; + pub static NSBadRTFFontTableException: &'static NSExceptionName; } extern "C" { - static NSBadRTFStyleSheetException: &'static NSExceptionName; + pub static NSBadRTFStyleSheetException: &'static NSExceptionName; } extern "C" { - static NSTypedStreamVersionException: &'static NSExceptionName; + pub static NSTypedStreamVersionException: &'static NSExceptionName; } extern "C" { - static NSTIFFException: &'static NSExceptionName; + pub static NSTIFFException: &'static NSExceptionName; } extern "C" { - static NSPrintPackageException: &'static NSExceptionName; + pub static NSPrintPackageException: &'static NSExceptionName; } extern "C" { - static NSBadRTFColorTableException: &'static NSExceptionName; + pub static NSBadRTFColorTableException: &'static NSExceptionName; } extern "C" { - static NSDraggingException: &'static NSExceptionName; + pub static NSDraggingException: &'static NSExceptionName; } extern "C" { - static NSColorListIOException: &'static NSExceptionName; + pub static NSColorListIOException: &'static NSExceptionName; } extern "C" { - static NSColorListNotEditableException: &'static NSExceptionName; + pub static NSColorListNotEditableException: &'static NSExceptionName; } extern "C" { - static NSBadBitmapParametersException: &'static NSExceptionName; + pub static NSBadBitmapParametersException: &'static NSExceptionName; } extern "C" { - static NSWindowServerCommunicationException: &'static NSExceptionName; + pub static NSWindowServerCommunicationException: &'static NSExceptionName; } extern "C" { - static NSFontUnavailableException: &'static NSExceptionName; + pub static NSFontUnavailableException: &'static NSExceptionName; } extern "C" { - static NSPPDIncludeNotFoundException: &'static NSExceptionName; + pub static NSPPDIncludeNotFoundException: &'static NSExceptionName; } extern "C" { - static NSPPDParseException: &'static NSExceptionName; + pub static NSPPDParseException: &'static NSExceptionName; } extern "C" { - static NSPPDIncludeStackOverflowException: &'static NSExceptionName; + pub static NSPPDIncludeStackOverflowException: &'static NSExceptionName; } extern "C" { - static NSPPDIncludeStackUnderflowException: &'static NSExceptionName; + pub static NSPPDIncludeStackUnderflowException: &'static NSExceptionName; } extern "C" { - static NSRTFPropertyStackOverflowException: &'static NSExceptionName; + pub static NSRTFPropertyStackOverflowException: &'static NSExceptionName; } extern "C" { - static NSAppKitIgnoredException: &'static NSExceptionName; + pub static NSAppKitIgnoredException: &'static NSExceptionName; } extern "C" { - static NSBadComparisonException: &'static NSExceptionName; + pub static NSBadComparisonException: &'static NSExceptionName; } extern "C" { - static NSImageCacheException: &'static NSExceptionName; + pub static NSImageCacheException: &'static NSExceptionName; } extern "C" { - static NSNibLoadingException: &'static NSExceptionName; + pub static NSNibLoadingException: &'static NSExceptionName; } extern "C" { - static NSBrowserIllegalDelegateException: &'static NSExceptionName; + pub static NSBrowserIllegalDelegateException: &'static NSExceptionName; } extern "C" { - static NSAccessibilityException: &'static NSExceptionName; + pub static NSAccessibilityException: &'static NSExceptionName; } diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 3a0251ff3..393b05857 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -40,51 +40,51 @@ pub const NSEventTypePressure: NSEventType = 34; pub const NSEventTypeDirectTouch: NSEventType = 37; pub const NSEventTypeChangeMode: NSEventType = 38; -static NSLeftMouseDown: NSEventType = NSEventTypeLeftMouseDown; +pub static NSLeftMouseDown: NSEventType = NSEventTypeLeftMouseDown; -static NSLeftMouseUp: NSEventType = NSEventTypeLeftMouseUp; +pub static NSLeftMouseUp: NSEventType = NSEventTypeLeftMouseUp; -static NSRightMouseDown: NSEventType = NSEventTypeRightMouseDown; +pub static NSRightMouseDown: NSEventType = NSEventTypeRightMouseDown; -static NSRightMouseUp: NSEventType = NSEventTypeRightMouseUp; +pub static NSRightMouseUp: NSEventType = NSEventTypeRightMouseUp; -static NSMouseMoved: NSEventType = NSEventTypeMouseMoved; +pub static NSMouseMoved: NSEventType = NSEventTypeMouseMoved; -static NSLeftMouseDragged: NSEventType = NSEventTypeLeftMouseDragged; +pub static NSLeftMouseDragged: NSEventType = NSEventTypeLeftMouseDragged; -static NSRightMouseDragged: NSEventType = NSEventTypeRightMouseDragged; +pub static NSRightMouseDragged: NSEventType = NSEventTypeRightMouseDragged; -static NSMouseEntered: NSEventType = NSEventTypeMouseEntered; +pub static NSMouseEntered: NSEventType = NSEventTypeMouseEntered; -static NSMouseExited: NSEventType = NSEventTypeMouseExited; +pub static NSMouseExited: NSEventType = NSEventTypeMouseExited; -static NSKeyDown: NSEventType = NSEventTypeKeyDown; +pub static NSKeyDown: NSEventType = NSEventTypeKeyDown; -static NSKeyUp: NSEventType = NSEventTypeKeyUp; +pub static NSKeyUp: NSEventType = NSEventTypeKeyUp; -static NSFlagsChanged: NSEventType = NSEventTypeFlagsChanged; +pub static NSFlagsChanged: NSEventType = NSEventTypeFlagsChanged; -static NSAppKitDefined: NSEventType = NSEventTypeAppKitDefined; +pub static NSAppKitDefined: NSEventType = NSEventTypeAppKitDefined; -static NSSystemDefined: NSEventType = NSEventTypeSystemDefined; +pub static NSSystemDefined: NSEventType = NSEventTypeSystemDefined; -static NSApplicationDefined: NSEventType = NSEventTypeApplicationDefined; +pub static NSApplicationDefined: NSEventType = NSEventTypeApplicationDefined; -static NSPeriodic: NSEventType = NSEventTypePeriodic; +pub static NSPeriodic: NSEventType = NSEventTypePeriodic; -static NSCursorUpdate: NSEventType = NSEventTypeCursorUpdate; +pub static NSCursorUpdate: NSEventType = NSEventTypeCursorUpdate; -static NSScrollWheel: NSEventType = NSEventTypeScrollWheel; +pub static NSScrollWheel: NSEventType = NSEventTypeScrollWheel; -static NSTabletPoint: NSEventType = NSEventTypeTabletPoint; +pub static NSTabletPoint: NSEventType = NSEventTypeTabletPoint; -static NSTabletProximity: NSEventType = NSEventTypeTabletProximity; +pub static NSTabletProximity: NSEventType = NSEventTypeTabletProximity; -static NSOtherMouseDown: NSEventType = NSEventTypeOtherMouseDown; +pub static NSOtherMouseDown: NSEventType = NSEventTypeOtherMouseDown; -static NSOtherMouseUp: NSEventType = NSEventTypeOtherMouseUp; +pub static NSOtherMouseUp: NSEventType = NSEventTypeOtherMouseUp; -static NSOtherMouseDragged: NSEventType = NSEventTypeOtherMouseDragged; +pub static NSOtherMouseDragged: NSEventType = NSEventTypeOtherMouseDragged; pub type NSEventMask = c_ulonglong; pub const NSEventMaskLeftMouseDown: NSEventMask = 1 << NSEventTypeLeftMouseDown; @@ -122,53 +122,53 @@ pub const NSEventMaskDirectTouch: NSEventMask = 1 << NSEventTypeDirectTouch; pub const NSEventMaskChangeMode: NSEventMask = 1 << NSEventTypeChangeMode; pub const NSEventMaskAny: NSEventMask = 18446744073709551615; -static NSLeftMouseDownMask: NSEventMask = NSEventMaskLeftMouseDown; +pub static NSLeftMouseDownMask: NSEventMask = NSEventMaskLeftMouseDown; -static NSLeftMouseUpMask: NSEventMask = NSEventMaskLeftMouseUp; +pub static NSLeftMouseUpMask: NSEventMask = NSEventMaskLeftMouseUp; -static NSRightMouseDownMask: NSEventMask = NSEventMaskRightMouseDown; +pub static NSRightMouseDownMask: NSEventMask = NSEventMaskRightMouseDown; -static NSRightMouseUpMask: NSEventMask = NSEventMaskRightMouseUp; +pub static NSRightMouseUpMask: NSEventMask = NSEventMaskRightMouseUp; -static NSMouseMovedMask: NSEventMask = NSEventMaskMouseMoved; +pub static NSMouseMovedMask: NSEventMask = NSEventMaskMouseMoved; -static NSLeftMouseDraggedMask: NSEventMask = NSEventMaskLeftMouseDragged; +pub static NSLeftMouseDraggedMask: NSEventMask = NSEventMaskLeftMouseDragged; -static NSRightMouseDraggedMask: NSEventMask = NSEventMaskRightMouseDragged; +pub static NSRightMouseDraggedMask: NSEventMask = NSEventMaskRightMouseDragged; -static NSMouseEnteredMask: NSEventMask = NSEventMaskMouseEntered; +pub static NSMouseEnteredMask: NSEventMask = NSEventMaskMouseEntered; -static NSMouseExitedMask: NSEventMask = NSEventMaskMouseExited; +pub static NSMouseExitedMask: NSEventMask = NSEventMaskMouseExited; -static NSKeyDownMask: NSEventMask = NSEventMaskKeyDown; +pub static NSKeyDownMask: NSEventMask = NSEventMaskKeyDown; -static NSKeyUpMask: NSEventMask = NSEventMaskKeyUp; +pub static NSKeyUpMask: NSEventMask = NSEventMaskKeyUp; -static NSFlagsChangedMask: NSEventMask = NSEventMaskFlagsChanged; +pub static NSFlagsChangedMask: NSEventMask = NSEventMaskFlagsChanged; -static NSAppKitDefinedMask: NSEventMask = NSEventMaskAppKitDefined; +pub static NSAppKitDefinedMask: NSEventMask = NSEventMaskAppKitDefined; -static NSSystemDefinedMask: NSEventMask = NSEventMaskSystemDefined; +pub static NSSystemDefinedMask: NSEventMask = NSEventMaskSystemDefined; -static NSApplicationDefinedMask: NSEventMask = NSEventMaskApplicationDefined; +pub static NSApplicationDefinedMask: NSEventMask = NSEventMaskApplicationDefined; -static NSPeriodicMask: NSEventMask = NSEventMaskPeriodic; +pub static NSPeriodicMask: NSEventMask = NSEventMaskPeriodic; -static NSCursorUpdateMask: NSEventMask = NSEventMaskCursorUpdate; +pub static NSCursorUpdateMask: NSEventMask = NSEventMaskCursorUpdate; -static NSScrollWheelMask: NSEventMask = NSEventMaskScrollWheel; +pub static NSScrollWheelMask: NSEventMask = NSEventMaskScrollWheel; -static NSTabletPointMask: NSEventMask = NSEventMaskTabletPoint; +pub static NSTabletPointMask: NSEventMask = NSEventMaskTabletPoint; -static NSTabletProximityMask: NSEventMask = NSEventMaskTabletProximity; +pub static NSTabletProximityMask: NSEventMask = NSEventMaskTabletProximity; -static NSOtherMouseDownMask: NSEventMask = NSEventMaskOtherMouseDown; +pub static NSOtherMouseDownMask: NSEventMask = NSEventMaskOtherMouseDown; -static NSOtherMouseUpMask: NSEventMask = NSEventMaskOtherMouseUp; +pub static NSOtherMouseUpMask: NSEventMask = NSEventMaskOtherMouseUp; -static NSOtherMouseDraggedMask: NSEventMask = NSEventMaskOtherMouseDragged; +pub static NSOtherMouseDraggedMask: NSEventMask = NSEventMaskOtherMouseDragged; -static NSAnyEventMask: NSEventMask = todo; +pub static NSAnyEventMask: NSEventMask = todo; pub type NSEventModifierFlags = NSUInteger; pub const NSEventModifierFlagCapsLock: NSEventModifierFlags = 1 << 16; @@ -181,23 +181,23 @@ pub const NSEventModifierFlagHelp: NSEventModifierFlags = 1 << 22; pub const NSEventModifierFlagFunction: NSEventModifierFlags = 1 << 23; pub const NSEventModifierFlagDeviceIndependentFlagsMask: NSEventModifierFlags = 0xffff0000; -static NSAlphaShiftKeyMask: NSEventModifierFlags = NSEventModifierFlagCapsLock; +pub static NSAlphaShiftKeyMask: NSEventModifierFlags = NSEventModifierFlagCapsLock; -static NSShiftKeyMask: NSEventModifierFlags = NSEventModifierFlagShift; +pub static NSShiftKeyMask: NSEventModifierFlags = NSEventModifierFlagShift; -static NSControlKeyMask: NSEventModifierFlags = NSEventModifierFlagControl; +pub static NSControlKeyMask: NSEventModifierFlags = NSEventModifierFlagControl; -static NSAlternateKeyMask: NSEventModifierFlags = NSEventModifierFlagOption; +pub static NSAlternateKeyMask: NSEventModifierFlags = NSEventModifierFlagOption; -static NSCommandKeyMask: NSEventModifierFlags = NSEventModifierFlagCommand; +pub static NSCommandKeyMask: NSEventModifierFlags = NSEventModifierFlagCommand; -static NSNumericPadKeyMask: NSEventModifierFlags = NSEventModifierFlagNumericPad; +pub static NSNumericPadKeyMask: NSEventModifierFlags = NSEventModifierFlagNumericPad; -static NSHelpKeyMask: NSEventModifierFlags = NSEventModifierFlagHelp; +pub static NSHelpKeyMask: NSEventModifierFlags = NSEventModifierFlagHelp; -static NSFunctionKeyMask: NSEventModifierFlags = NSEventModifierFlagFunction; +pub static NSFunctionKeyMask: NSEventModifierFlags = NSEventModifierFlagFunction; -static NSDeviceIndependentModifierFlagsMask: NSEventModifierFlags = +pub static NSDeviceIndependentModifierFlagsMask: NSEventModifierFlags = NSEventModifierFlagDeviceIndependentFlagsMask; pub type NSPointingDeviceType = NSUInteger; @@ -206,24 +206,24 @@ pub const NSPointingDeviceTypePen: NSPointingDeviceType = 1; pub const NSPointingDeviceTypeCursor: NSPointingDeviceType = 2; pub const NSPointingDeviceTypeEraser: NSPointingDeviceType = 3; -static NSUnknownPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeUnknown; +pub static NSUnknownPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeUnknown; -static NSPenPointingDevice: NSPointingDeviceType = NSPointingDeviceTypePen; +pub static NSPenPointingDevice: NSPointingDeviceType = NSPointingDeviceTypePen; -static NSCursorPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeCursor; +pub static NSCursorPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeCursor; -static NSEraserPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeEraser; +pub static NSEraserPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeEraser; pub type NSEventButtonMask = NSUInteger; pub const NSEventButtonMaskPenTip: NSEventButtonMask = 1; pub const NSEventButtonMaskPenLowerSide: NSEventButtonMask = 2; pub const NSEventButtonMaskPenUpperSide: NSEventButtonMask = 4; -static NSPenTipMask: NSEventButtonMask = NSEventButtonMaskPenTip; +pub static NSPenTipMask: NSEventButtonMask = NSEventButtonMaskPenTip; -static NSPenLowerSideMask: NSEventButtonMask = NSEventButtonMaskPenLowerSide; +pub static NSPenLowerSideMask: NSEventButtonMask = NSEventButtonMaskPenLowerSide; -static NSPenUpperSideMask: NSEventButtonMask = NSEventButtonMaskPenUpperSide; +pub static NSPenUpperSideMask: NSEventButtonMask = NSEventButtonMaskPenUpperSide; pub type NSEventPhase = NSUInteger; pub const NSEventPhaseNone: NSEventPhase = 0; @@ -255,27 +255,27 @@ pub const NSEventSubtypeTabletPoint: NSEventSubtype = 1; pub const NSEventSubtypeTabletProximity: NSEventSubtype = 2; pub const NSEventSubtypeTouch: NSEventSubtype = 3; -static NSWindowExposedEventType: NSEventSubtype = NSEventSubtypeWindowExposed; +pub static NSWindowExposedEventType: NSEventSubtype = NSEventSubtypeWindowExposed; -static NSApplicationActivatedEventType: NSEventSubtype = NSEventSubtypeApplicationActivated; +pub static NSApplicationActivatedEventType: NSEventSubtype = NSEventSubtypeApplicationActivated; -static NSApplicationDeactivatedEventType: NSEventSubtype = NSEventSubtypeApplicationDeactivated; +pub static NSApplicationDeactivatedEventType: NSEventSubtype = NSEventSubtypeApplicationDeactivated; -static NSWindowMovedEventType: NSEventSubtype = NSEventSubtypeWindowMoved; +pub static NSWindowMovedEventType: NSEventSubtype = NSEventSubtypeWindowMoved; -static NSScreenChangedEventType: NSEventSubtype = NSEventSubtypeScreenChanged; +pub static NSScreenChangedEventType: NSEventSubtype = NSEventSubtypeScreenChanged; -static NSAWTEventType: NSEventSubtype = 16; +pub static NSAWTEventType: NSEventSubtype = 16; -static NSPowerOffEventType: NSEventSubtype = NSEventSubtypePowerOff; +pub static NSPowerOffEventType: NSEventSubtype = NSEventSubtypePowerOff; -static NSMouseEventSubtype: NSEventSubtype = NSEventSubtypeMouseEvent; +pub static NSMouseEventSubtype: NSEventSubtype = NSEventSubtypeMouseEvent; -static NSTabletPointEventSubtype: NSEventSubtype = NSEventSubtypeTabletPoint; +pub static NSTabletPointEventSubtype: NSEventSubtype = NSEventSubtypeTabletPoint; -static NSTabletProximityEventSubtype: NSEventSubtype = NSEventSubtypeTabletProximity; +pub static NSTabletProximityEventSubtype: NSEventSubtype = NSEventSubtypeTabletProximity; -static NSTouchEventSubtype: NSEventSubtype = NSEventSubtypeTouch; +pub static NSTouchEventSubtype: NSEventSubtype = NSEventSubtypeTouch; pub type NSPressureBehavior = NSInteger; pub const NSPressureBehaviorUnknown: NSPressureBehavior = -1; diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 8c4472ae4..040c1744e 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -5,7 +5,7 @@ use crate::AppKit::*; use crate::Foundation::*; extern "C" { - static NSFontIdentityMatrix: NonNull; + pub static NSFontIdentityMatrix: NonNull; } extern_class!( @@ -218,11 +218,11 @@ extern_methods!( ); extern "C" { - static NSAntialiasThresholdChangedNotification: &'static NSNotificationName; + pub static NSAntialiasThresholdChangedNotification: &'static NSNotificationName; } extern "C" { - static NSFontSetChangedNotification: &'static NSNotificationName; + pub static NSFontSetChangedNotification: &'static NSNotificationName; } pub const NSControlGlyph: i32 = 0x00FFFFFF; diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index 9b71ab8fc..32f93668f 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/NSFontCollection.rs @@ -12,15 +12,17 @@ pub const NSFontCollectionVisibilityComputer: NSFontCollectionVisibility = 1 << pub type NSFontCollectionMatchingOptionKey = NSString; extern "C" { - static NSFontCollectionIncludeDisabledFontsOption: &'static NSFontCollectionMatchingOptionKey; + pub static NSFontCollectionIncludeDisabledFontsOption: + &'static NSFontCollectionMatchingOptionKey; } extern "C" { - static NSFontCollectionRemoveDuplicatesOption: &'static NSFontCollectionMatchingOptionKey; + pub static NSFontCollectionRemoveDuplicatesOption: &'static NSFontCollectionMatchingOptionKey; } extern "C" { - static NSFontCollectionDisallowAutoActivationOption: &'static NSFontCollectionMatchingOptionKey; + pub static NSFontCollectionDisallowAutoActivationOption: + &'static NSFontCollectionMatchingOptionKey; } pub type NSFontCollectionName = NSString; @@ -176,53 +178,53 @@ extern_methods!( ); extern "C" { - static NSFontCollectionDidChangeNotification: &'static NSNotificationName; + pub static NSFontCollectionDidChangeNotification: &'static NSNotificationName; } pub type NSFontCollectionUserInfoKey = NSString; extern "C" { - static NSFontCollectionActionKey: &'static NSFontCollectionUserInfoKey; + pub static NSFontCollectionActionKey: &'static NSFontCollectionUserInfoKey; } extern "C" { - static NSFontCollectionNameKey: &'static NSFontCollectionUserInfoKey; + pub static NSFontCollectionNameKey: &'static NSFontCollectionUserInfoKey; } extern "C" { - static NSFontCollectionOldNameKey: &'static NSFontCollectionUserInfoKey; + pub static NSFontCollectionOldNameKey: &'static NSFontCollectionUserInfoKey; } extern "C" { - static NSFontCollectionVisibilityKey: &'static NSFontCollectionUserInfoKey; + pub static NSFontCollectionVisibilityKey: &'static NSFontCollectionUserInfoKey; } pub type NSFontCollectionActionTypeKey = NSString; extern "C" { - static NSFontCollectionWasShown: &'static NSFontCollectionActionTypeKey; + pub static NSFontCollectionWasShown: &'static NSFontCollectionActionTypeKey; } extern "C" { - static NSFontCollectionWasHidden: &'static NSFontCollectionActionTypeKey; + pub static NSFontCollectionWasHidden: &'static NSFontCollectionActionTypeKey; } extern "C" { - static NSFontCollectionWasRenamed: &'static NSFontCollectionActionTypeKey; + pub static NSFontCollectionWasRenamed: &'static NSFontCollectionActionTypeKey; } extern "C" { - static NSFontCollectionAllFonts: &'static NSFontCollectionName; + pub static NSFontCollectionAllFonts: &'static NSFontCollectionName; } extern "C" { - static NSFontCollectionUser: &'static NSFontCollectionName; + pub static NSFontCollectionUser: &'static NSFontCollectionName; } extern "C" { - static NSFontCollectionFavorites: &'static NSFontCollectionName; + pub static NSFontCollectionFavorites: &'static NSFontCollectionName; } extern "C" { - static NSFontCollectionRecentlyUsed: &'static NSFontCollectionName; + pub static NSFontCollectionRecentlyUsed: &'static NSFontCollectionName; } diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 502d3b74c..054e21379 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -164,191 +164,191 @@ extern_methods!( ); extern "C" { - static NSFontFamilyAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontFamilyAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontNameAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontNameAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontFaceAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontFaceAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontSizeAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontSizeAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontVisibleNameAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontVisibleNameAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontMatrixAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontMatrixAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontVariationAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontVariationAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontCharacterSetAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontCharacterSetAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontCascadeListAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontCascadeListAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontTraitsAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontTraitsAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontFixedAdvanceAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontFixedAdvanceAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontFeatureSettingsAttribute: &'static NSFontDescriptorAttributeName; + pub static NSFontFeatureSettingsAttribute: &'static NSFontDescriptorAttributeName; } extern "C" { - static NSFontSymbolicTrait: &'static NSFontDescriptorTraitKey; + pub static NSFontSymbolicTrait: &'static NSFontDescriptorTraitKey; } extern "C" { - static NSFontWeightTrait: &'static NSFontDescriptorTraitKey; + pub static NSFontWeightTrait: &'static NSFontDescriptorTraitKey; } extern "C" { - static NSFontWidthTrait: &'static NSFontDescriptorTraitKey; + pub static NSFontWidthTrait: &'static NSFontDescriptorTraitKey; } extern "C" { - static NSFontSlantTrait: &'static NSFontDescriptorTraitKey; + pub static NSFontSlantTrait: &'static NSFontDescriptorTraitKey; } extern "C" { - static NSFontVariationAxisIdentifierKey: &'static NSFontDescriptorVariationKey; + pub static NSFontVariationAxisIdentifierKey: &'static NSFontDescriptorVariationKey; } extern "C" { - static NSFontVariationAxisMinimumValueKey: &'static NSFontDescriptorVariationKey; + pub static NSFontVariationAxisMinimumValueKey: &'static NSFontDescriptorVariationKey; } extern "C" { - static NSFontVariationAxisMaximumValueKey: &'static NSFontDescriptorVariationKey; + pub static NSFontVariationAxisMaximumValueKey: &'static NSFontDescriptorVariationKey; } extern "C" { - static NSFontVariationAxisDefaultValueKey: &'static NSFontDescriptorVariationKey; + pub static NSFontVariationAxisDefaultValueKey: &'static NSFontDescriptorVariationKey; } extern "C" { - static NSFontVariationAxisNameKey: &'static NSFontDescriptorVariationKey; + pub static NSFontVariationAxisNameKey: &'static NSFontDescriptorVariationKey; } extern "C" { - static NSFontFeatureTypeIdentifierKey: &'static NSFontDescriptorFeatureKey; + pub static NSFontFeatureTypeIdentifierKey: &'static NSFontDescriptorFeatureKey; } extern "C" { - static NSFontFeatureSelectorIdentifierKey: &'static NSFontDescriptorFeatureKey; + pub static NSFontFeatureSelectorIdentifierKey: &'static NSFontDescriptorFeatureKey; } extern "C" { - static NSFontWeightUltraLight: NSFontWeight; + pub static NSFontWeightUltraLight: NSFontWeight; } extern "C" { - static NSFontWeightThin: NSFontWeight; + pub static NSFontWeightThin: NSFontWeight; } extern "C" { - static NSFontWeightLight: NSFontWeight; + pub static NSFontWeightLight: NSFontWeight; } extern "C" { - static NSFontWeightRegular: NSFontWeight; + pub static NSFontWeightRegular: NSFontWeight; } extern "C" { - static NSFontWeightMedium: NSFontWeight; + pub static NSFontWeightMedium: NSFontWeight; } extern "C" { - static NSFontWeightSemibold: NSFontWeight; + pub static NSFontWeightSemibold: NSFontWeight; } extern "C" { - static NSFontWeightBold: NSFontWeight; + pub static NSFontWeightBold: NSFontWeight; } extern "C" { - static NSFontWeightHeavy: NSFontWeight; + pub static NSFontWeightHeavy: NSFontWeight; } extern "C" { - static NSFontWeightBlack: NSFontWeight; + pub static NSFontWeightBlack: NSFontWeight; } extern "C" { - static NSFontDescriptorSystemDesignDefault: &'static NSFontDescriptorSystemDesign; + pub static NSFontDescriptorSystemDesignDefault: &'static NSFontDescriptorSystemDesign; } extern "C" { - static NSFontDescriptorSystemDesignSerif: &'static NSFontDescriptorSystemDesign; + pub static NSFontDescriptorSystemDesignSerif: &'static NSFontDescriptorSystemDesign; } extern "C" { - static NSFontDescriptorSystemDesignMonospaced: &'static NSFontDescriptorSystemDesign; + pub static NSFontDescriptorSystemDesignMonospaced: &'static NSFontDescriptorSystemDesign; } extern "C" { - static NSFontDescriptorSystemDesignRounded: &'static NSFontDescriptorSystemDesign; + pub static NSFontDescriptorSystemDesignRounded: &'static NSFontDescriptorSystemDesign; } extern "C" { - static NSFontTextStyleLargeTitle: &'static NSFontTextStyle; + pub static NSFontTextStyleLargeTitle: &'static NSFontTextStyle; } extern "C" { - static NSFontTextStyleTitle1: &'static NSFontTextStyle; + pub static NSFontTextStyleTitle1: &'static NSFontTextStyle; } extern "C" { - static NSFontTextStyleTitle2: &'static NSFontTextStyle; + pub static NSFontTextStyleTitle2: &'static NSFontTextStyle; } extern "C" { - static NSFontTextStyleTitle3: &'static NSFontTextStyle; + pub static NSFontTextStyleTitle3: &'static NSFontTextStyle; } extern "C" { - static NSFontTextStyleHeadline: &'static NSFontTextStyle; + pub static NSFontTextStyleHeadline: &'static NSFontTextStyle; } extern "C" { - static NSFontTextStyleSubheadline: &'static NSFontTextStyle; + pub static NSFontTextStyleSubheadline: &'static NSFontTextStyle; } extern "C" { - static NSFontTextStyleBody: &'static NSFontTextStyle; + pub static NSFontTextStyleBody: &'static NSFontTextStyle; } extern "C" { - static NSFontTextStyleCallout: &'static NSFontTextStyle; + pub static NSFontTextStyleCallout: &'static NSFontTextStyle; } extern "C" { - static NSFontTextStyleFootnote: &'static NSFontTextStyle; + pub static NSFontTextStyleFootnote: &'static NSFontTextStyle; } extern "C" { - static NSFontTextStyleCaption1: &'static NSFontTextStyle; + pub static NSFontTextStyleCaption1: &'static NSFontTextStyle; } extern "C" { - static NSFontTextStyleCaption2: &'static NSFontTextStyle; + pub static NSFontTextStyleCaption2: &'static NSFontTextStyle; } pub type NSFontFamilyClass = u32; @@ -376,7 +376,7 @@ pub const NSFontVerticalTrait: i32 = 1 << 11; pub const NSFontUIOptimizedTrait: i32 = 1 << 12; extern "C" { - static NSFontColorAttribute: &'static NSString; + pub static NSFontColorAttribute: &'static NSString; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs index 08cce65de..274cb3b4b 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphics.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphics.rs @@ -35,63 +35,65 @@ pub const NSCompositingOperationSaturation: NSCompositingOperation = 26; pub const NSCompositingOperationColor: NSCompositingOperation = 27; pub const NSCompositingOperationLuminosity: NSCompositingOperation = 28; -static NSCompositeClear: NSCompositingOperation = NSCompositingOperationClear; +pub static NSCompositeClear: NSCompositingOperation = NSCompositingOperationClear; -static NSCompositeCopy: NSCompositingOperation = NSCompositingOperationCopy; +pub static NSCompositeCopy: NSCompositingOperation = NSCompositingOperationCopy; -static NSCompositeSourceOver: NSCompositingOperation = NSCompositingOperationSourceOver; +pub static NSCompositeSourceOver: NSCompositingOperation = NSCompositingOperationSourceOver; -static NSCompositeSourceIn: NSCompositingOperation = NSCompositingOperationSourceIn; +pub static NSCompositeSourceIn: NSCompositingOperation = NSCompositingOperationSourceIn; -static NSCompositeSourceOut: NSCompositingOperation = NSCompositingOperationSourceOut; +pub static NSCompositeSourceOut: NSCompositingOperation = NSCompositingOperationSourceOut; -static NSCompositeSourceAtop: NSCompositingOperation = NSCompositingOperationSourceAtop; +pub static NSCompositeSourceAtop: NSCompositingOperation = NSCompositingOperationSourceAtop; -static NSCompositeDestinationOver: NSCompositingOperation = NSCompositingOperationDestinationOver; +pub static NSCompositeDestinationOver: NSCompositingOperation = + NSCompositingOperationDestinationOver; -static NSCompositeDestinationIn: NSCompositingOperation = NSCompositingOperationDestinationIn; +pub static NSCompositeDestinationIn: NSCompositingOperation = NSCompositingOperationDestinationIn; -static NSCompositeDestinationOut: NSCompositingOperation = NSCompositingOperationDestinationOut; +pub static NSCompositeDestinationOut: NSCompositingOperation = NSCompositingOperationDestinationOut; -static NSCompositeDestinationAtop: NSCompositingOperation = NSCompositingOperationDestinationAtop; +pub static NSCompositeDestinationAtop: NSCompositingOperation = + NSCompositingOperationDestinationAtop; -static NSCompositeXOR: NSCompositingOperation = NSCompositingOperationXOR; +pub static NSCompositeXOR: NSCompositingOperation = NSCompositingOperationXOR; -static NSCompositePlusDarker: NSCompositingOperation = NSCompositingOperationPlusDarker; +pub static NSCompositePlusDarker: NSCompositingOperation = NSCompositingOperationPlusDarker; -static NSCompositeHighlight: NSCompositingOperation = NSCompositingOperationHighlight; +pub static NSCompositeHighlight: NSCompositingOperation = NSCompositingOperationHighlight; -static NSCompositePlusLighter: NSCompositingOperation = NSCompositingOperationPlusLighter; +pub static NSCompositePlusLighter: NSCompositingOperation = NSCompositingOperationPlusLighter; -static NSCompositeMultiply: NSCompositingOperation = NSCompositingOperationMultiply; +pub static NSCompositeMultiply: NSCompositingOperation = NSCompositingOperationMultiply; -static NSCompositeScreen: NSCompositingOperation = NSCompositingOperationScreen; +pub static NSCompositeScreen: NSCompositingOperation = NSCompositingOperationScreen; -static NSCompositeOverlay: NSCompositingOperation = NSCompositingOperationOverlay; +pub static NSCompositeOverlay: NSCompositingOperation = NSCompositingOperationOverlay; -static NSCompositeDarken: NSCompositingOperation = NSCompositingOperationDarken; +pub static NSCompositeDarken: NSCompositingOperation = NSCompositingOperationDarken; -static NSCompositeLighten: NSCompositingOperation = NSCompositingOperationLighten; +pub static NSCompositeLighten: NSCompositingOperation = NSCompositingOperationLighten; -static NSCompositeColorDodge: NSCompositingOperation = NSCompositingOperationColorDodge; +pub static NSCompositeColorDodge: NSCompositingOperation = NSCompositingOperationColorDodge; -static NSCompositeColorBurn: NSCompositingOperation = NSCompositingOperationColorBurn; +pub static NSCompositeColorBurn: NSCompositingOperation = NSCompositingOperationColorBurn; -static NSCompositeSoftLight: NSCompositingOperation = NSCompositingOperationSoftLight; +pub static NSCompositeSoftLight: NSCompositingOperation = NSCompositingOperationSoftLight; -static NSCompositeHardLight: NSCompositingOperation = NSCompositingOperationHardLight; +pub static NSCompositeHardLight: NSCompositingOperation = NSCompositingOperationHardLight; -static NSCompositeDifference: NSCompositingOperation = NSCompositingOperationDifference; +pub static NSCompositeDifference: NSCompositingOperation = NSCompositingOperationDifference; -static NSCompositeExclusion: NSCompositingOperation = NSCompositingOperationExclusion; +pub static NSCompositeExclusion: NSCompositingOperation = NSCompositingOperationExclusion; -static NSCompositeHue: NSCompositingOperation = NSCompositingOperationHue; +pub static NSCompositeHue: NSCompositingOperation = NSCompositingOperationHue; -static NSCompositeSaturation: NSCompositingOperation = NSCompositingOperationSaturation; +pub static NSCompositeSaturation: NSCompositingOperation = NSCompositingOperationSaturation; -static NSCompositeColor: NSCompositingOperation = NSCompositingOperationColor; +pub static NSCompositeColor: NSCompositingOperation = NSCompositingOperationColor; -static NSCompositeLuminosity: NSCompositingOperation = NSCompositingOperationLuminosity; +pub static NSCompositeLuminosity: NSCompositingOperation = NSCompositingOperationLuminosity; pub type NSBackingStoreType = NSUInteger; pub const NSBackingStoreRetained: NSBackingStoreType = 0; @@ -123,43 +125,43 @@ pub const NSColorRenderingIntentSaturation: NSColorRenderingIntent = 4; pub type NSColorSpaceName = NSString; extern "C" { - static NSCalibratedWhiteColorSpace: &'static NSColorSpaceName; + pub static NSCalibratedWhiteColorSpace: &'static NSColorSpaceName; } extern "C" { - static NSCalibratedRGBColorSpace: &'static NSColorSpaceName; + pub static NSCalibratedRGBColorSpace: &'static NSColorSpaceName; } extern "C" { - static NSDeviceWhiteColorSpace: &'static NSColorSpaceName; + pub static NSDeviceWhiteColorSpace: &'static NSColorSpaceName; } extern "C" { - static NSDeviceRGBColorSpace: &'static NSColorSpaceName; + pub static NSDeviceRGBColorSpace: &'static NSColorSpaceName; } extern "C" { - static NSDeviceCMYKColorSpace: &'static NSColorSpaceName; + pub static NSDeviceCMYKColorSpace: &'static NSColorSpaceName; } extern "C" { - static NSNamedColorSpace: &'static NSColorSpaceName; + pub static NSNamedColorSpace: &'static NSColorSpaceName; } extern "C" { - static NSPatternColorSpace: &'static NSColorSpaceName; + pub static NSPatternColorSpace: &'static NSColorSpaceName; } extern "C" { - static NSCustomColorSpace: &'static NSColorSpaceName; + pub static NSCustomColorSpace: &'static NSColorSpaceName; } extern "C" { - static NSCalibratedBlackColorSpace: &'static NSColorSpaceName; + pub static NSCalibratedBlackColorSpace: &'static NSColorSpaceName; } extern "C" { - static NSDeviceBlackColorSpace: &'static NSColorSpaceName; + pub static NSDeviceBlackColorSpace: &'static NSColorSpaceName; } pub type NSWindowDepth = i32; @@ -168,19 +170,19 @@ pub const NSWindowDepthSixtyfourBitRGB: NSWindowDepth = 0x210; pub const NSWindowDepthOnehundredtwentyeightBitRGB: NSWindowDepth = 0x220; extern "C" { - static NSWhite: CGFloat; + pub static NSWhite: CGFloat; } extern "C" { - static NSLightGray: CGFloat; + pub static NSLightGray: CGFloat; } extern "C" { - static NSDarkGray: CGFloat; + pub static NSDarkGray: CGFloat; } extern "C" { - static NSBlack: CGFloat; + pub static NSBlack: CGFloat; } pub type NSDisplayGamut = NSInteger; @@ -190,27 +192,27 @@ pub const NSDisplayGamutP3: NSDisplayGamut = 2; pub type NSDeviceDescriptionKey = NSString; extern "C" { - static NSDeviceResolution: &'static NSDeviceDescriptionKey; + pub static NSDeviceResolution: &'static NSDeviceDescriptionKey; } extern "C" { - static NSDeviceColorSpaceName: &'static NSDeviceDescriptionKey; + pub static NSDeviceColorSpaceName: &'static NSDeviceDescriptionKey; } extern "C" { - static NSDeviceBitsPerSample: &'static NSDeviceDescriptionKey; + pub static NSDeviceBitsPerSample: &'static NSDeviceDescriptionKey; } extern "C" { - static NSDeviceIsScreen: &'static NSDeviceDescriptionKey; + pub static NSDeviceIsScreen: &'static NSDeviceDescriptionKey; } extern "C" { - static NSDeviceIsPrinter: &'static NSDeviceDescriptionKey; + pub static NSDeviceIsPrinter: &'static NSDeviceDescriptionKey; } extern "C" { - static NSDeviceSize: &'static NSDeviceDescriptionKey; + pub static NSDeviceSize: &'static NSDeviceDescriptionKey; } pub type NSAnimationEffect = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index 30bf6df2f..2746fbb64 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -7,22 +7,22 @@ use crate::Foundation::*; pub type NSGraphicsContextAttributeKey = NSString; extern "C" { - static NSGraphicsContextDestinationAttributeName: &'static NSGraphicsContextAttributeKey; + pub static NSGraphicsContextDestinationAttributeName: &'static NSGraphicsContextAttributeKey; } extern "C" { - static NSGraphicsContextRepresentationFormatAttributeName: + pub static NSGraphicsContextRepresentationFormatAttributeName: &'static NSGraphicsContextAttributeKey; } pub type NSGraphicsContextRepresentationFormatName = NSString; extern "C" { - static NSGraphicsContextPSFormat: &'static NSGraphicsContextRepresentationFormatName; + pub static NSGraphicsContextPSFormat: &'static NSGraphicsContextRepresentationFormatName; } extern "C" { - static NSGraphicsContextPDFFormat: &'static NSGraphicsContextRepresentationFormatName; + pub static NSGraphicsContextPDFFormat: &'static NSGraphicsContextRepresentationFormatName; } pub type NSImageInterpolation = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index 70e7e29fa..652d34bc7 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -21,7 +21,7 @@ pub const NSGridRowAlignmentFirstBaseline: NSGridRowAlignment = 2; pub const NSGridRowAlignmentLastBaseline: NSGridRowAlignment = 3; extern "C" { - static NSGridViewSizeForContent: CGFloat; + pub static NSGridViewSizeForContent: CGFloat; } extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSHelpManager.rs b/crates/icrate/src/generated/AppKit/NSHelpManager.rs index c9d4f6541..e5fb0f708 100644 --- a/crates/icrate/src/generated/AppKit/NSHelpManager.rs +++ b/crates/icrate/src/generated/AppKit/NSHelpManager.rs @@ -69,11 +69,11 @@ extern_methods!( ); extern "C" { - static NSContextHelpModeDidActivateNotification: &'static NSNotificationName; + pub static NSContextHelpModeDidActivateNotification: &'static NSNotificationName; } extern "C" { - static NSContextHelpModeDidDeactivateNotification: &'static NSNotificationName; + pub static NSContextHelpModeDidDeactivateNotification: &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index 7ebd3b659..ddd251bec 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -7,15 +7,15 @@ use crate::Foundation::*; pub type NSImageName = NSString; extern "C" { - static NSImageHintCTM: &'static NSImageHintKey; + pub static NSImageHintCTM: &'static NSImageHintKey; } extern "C" { - static NSImageHintInterpolation: &'static NSImageHintKey; + pub static NSImageHintInterpolation: &'static NSImageHintKey; } extern "C" { - static NSImageHintUserInterfaceLayoutDirection: &'static NSImageHintKey; + pub static NSImageHintUserInterfaceLayoutDirection: &'static NSImageHintKey; } pub type NSImageLoadStatus = NSUInteger; @@ -448,559 +448,559 @@ extern_methods!( ); extern "C" { - static NSImageNameAddTemplate: &'static NSImageName; + pub static NSImageNameAddTemplate: &'static NSImageName; } extern "C" { - static NSImageNameBluetoothTemplate: &'static NSImageName; + pub static NSImageNameBluetoothTemplate: &'static NSImageName; } extern "C" { - static NSImageNameBonjour: &'static NSImageName; + pub static NSImageNameBonjour: &'static NSImageName; } extern "C" { - static NSImageNameBookmarksTemplate: &'static NSImageName; + pub static NSImageNameBookmarksTemplate: &'static NSImageName; } extern "C" { - static NSImageNameCaution: &'static NSImageName; + pub static NSImageNameCaution: &'static NSImageName; } extern "C" { - static NSImageNameComputer: &'static NSImageName; + pub static NSImageNameComputer: &'static NSImageName; } extern "C" { - static NSImageNameEnterFullScreenTemplate: &'static NSImageName; + pub static NSImageNameEnterFullScreenTemplate: &'static NSImageName; } extern "C" { - static NSImageNameExitFullScreenTemplate: &'static NSImageName; + pub static NSImageNameExitFullScreenTemplate: &'static NSImageName; } extern "C" { - static NSImageNameFolder: &'static NSImageName; + pub static NSImageNameFolder: &'static NSImageName; } extern "C" { - static NSImageNameFolderBurnable: &'static NSImageName; + pub static NSImageNameFolderBurnable: &'static NSImageName; } extern "C" { - static NSImageNameFolderSmart: &'static NSImageName; + pub static NSImageNameFolderSmart: &'static NSImageName; } extern "C" { - static NSImageNameFollowLinkFreestandingTemplate: &'static NSImageName; + pub static NSImageNameFollowLinkFreestandingTemplate: &'static NSImageName; } extern "C" { - static NSImageNameHomeTemplate: &'static NSImageName; + pub static NSImageNameHomeTemplate: &'static NSImageName; } extern "C" { - static NSImageNameIChatTheaterTemplate: &'static NSImageName; + pub static NSImageNameIChatTheaterTemplate: &'static NSImageName; } extern "C" { - static NSImageNameLockLockedTemplate: &'static NSImageName; + pub static NSImageNameLockLockedTemplate: &'static NSImageName; } extern "C" { - static NSImageNameLockUnlockedTemplate: &'static NSImageName; + pub static NSImageNameLockUnlockedTemplate: &'static NSImageName; } extern "C" { - static NSImageNameNetwork: &'static NSImageName; + pub static NSImageNameNetwork: &'static NSImageName; } extern "C" { - static NSImageNamePathTemplate: &'static NSImageName; + pub static NSImageNamePathTemplate: &'static NSImageName; } extern "C" { - static NSImageNameQuickLookTemplate: &'static NSImageName; + pub static NSImageNameQuickLookTemplate: &'static NSImageName; } extern "C" { - static NSImageNameRefreshFreestandingTemplate: &'static NSImageName; + pub static NSImageNameRefreshFreestandingTemplate: &'static NSImageName; } extern "C" { - static NSImageNameRefreshTemplate: &'static NSImageName; + pub static NSImageNameRefreshTemplate: &'static NSImageName; } extern "C" { - static NSImageNameRemoveTemplate: &'static NSImageName; + pub static NSImageNameRemoveTemplate: &'static NSImageName; } extern "C" { - static NSImageNameRevealFreestandingTemplate: &'static NSImageName; + pub static NSImageNameRevealFreestandingTemplate: &'static NSImageName; } extern "C" { - static NSImageNameShareTemplate: &'static NSImageName; + pub static NSImageNameShareTemplate: &'static NSImageName; } extern "C" { - static NSImageNameSlideshowTemplate: &'static NSImageName; + pub static NSImageNameSlideshowTemplate: &'static NSImageName; } extern "C" { - static NSImageNameStatusAvailable: &'static NSImageName; + pub static NSImageNameStatusAvailable: &'static NSImageName; } extern "C" { - static NSImageNameStatusNone: &'static NSImageName; + pub static NSImageNameStatusNone: &'static NSImageName; } extern "C" { - static NSImageNameStatusPartiallyAvailable: &'static NSImageName; + pub static NSImageNameStatusPartiallyAvailable: &'static NSImageName; } extern "C" { - static NSImageNameStatusUnavailable: &'static NSImageName; + pub static NSImageNameStatusUnavailable: &'static NSImageName; } extern "C" { - static NSImageNameStopProgressFreestandingTemplate: &'static NSImageName; + pub static NSImageNameStopProgressFreestandingTemplate: &'static NSImageName; } extern "C" { - static NSImageNameStopProgressTemplate: &'static NSImageName; + pub static NSImageNameStopProgressTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTrashEmpty: &'static NSImageName; + pub static NSImageNameTrashEmpty: &'static NSImageName; } extern "C" { - static NSImageNameTrashFull: &'static NSImageName; + pub static NSImageNameTrashFull: &'static NSImageName; } extern "C" { - static NSImageNameActionTemplate: &'static NSImageName; + pub static NSImageNameActionTemplate: &'static NSImageName; } extern "C" { - static NSImageNameSmartBadgeTemplate: &'static NSImageName; + pub static NSImageNameSmartBadgeTemplate: &'static NSImageName; } extern "C" { - static NSImageNameIconViewTemplate: &'static NSImageName; + pub static NSImageNameIconViewTemplate: &'static NSImageName; } extern "C" { - static NSImageNameListViewTemplate: &'static NSImageName; + pub static NSImageNameListViewTemplate: &'static NSImageName; } extern "C" { - static NSImageNameColumnViewTemplate: &'static NSImageName; + pub static NSImageNameColumnViewTemplate: &'static NSImageName; } extern "C" { - static NSImageNameFlowViewTemplate: &'static NSImageName; + pub static NSImageNameFlowViewTemplate: &'static NSImageName; } extern "C" { - static NSImageNameInvalidDataFreestandingTemplate: &'static NSImageName; + pub static NSImageNameInvalidDataFreestandingTemplate: &'static NSImageName; } extern "C" { - static NSImageNameGoForwardTemplate: &'static NSImageName; + pub static NSImageNameGoForwardTemplate: &'static NSImageName; } extern "C" { - static NSImageNameGoBackTemplate: &'static NSImageName; + pub static NSImageNameGoBackTemplate: &'static NSImageName; } extern "C" { - static NSImageNameGoRightTemplate: &'static NSImageName; + pub static NSImageNameGoRightTemplate: &'static NSImageName; } extern "C" { - static NSImageNameGoLeftTemplate: &'static NSImageName; + pub static NSImageNameGoLeftTemplate: &'static NSImageName; } extern "C" { - static NSImageNameRightFacingTriangleTemplate: &'static NSImageName; + pub static NSImageNameRightFacingTriangleTemplate: &'static NSImageName; } extern "C" { - static NSImageNameLeftFacingTriangleTemplate: &'static NSImageName; + pub static NSImageNameLeftFacingTriangleTemplate: &'static NSImageName; } extern "C" { - static NSImageNameDotMac: &'static NSImageName; + pub static NSImageNameDotMac: &'static NSImageName; } extern "C" { - static NSImageNameMobileMe: &'static NSImageName; + pub static NSImageNameMobileMe: &'static NSImageName; } extern "C" { - static NSImageNameMultipleDocuments: &'static NSImageName; + pub static NSImageNameMultipleDocuments: &'static NSImageName; } extern "C" { - static NSImageNameUserAccounts: &'static NSImageName; + pub static NSImageNameUserAccounts: &'static NSImageName; } extern "C" { - static NSImageNamePreferencesGeneral: &'static NSImageName; + pub static NSImageNamePreferencesGeneral: &'static NSImageName; } extern "C" { - static NSImageNameAdvanced: &'static NSImageName; + pub static NSImageNameAdvanced: &'static NSImageName; } extern "C" { - static NSImageNameInfo: &'static NSImageName; + pub static NSImageNameInfo: &'static NSImageName; } extern "C" { - static NSImageNameFontPanel: &'static NSImageName; + pub static NSImageNameFontPanel: &'static NSImageName; } extern "C" { - static NSImageNameColorPanel: &'static NSImageName; + pub static NSImageNameColorPanel: &'static NSImageName; } extern "C" { - static NSImageNameUser: &'static NSImageName; + pub static NSImageNameUser: &'static NSImageName; } extern "C" { - static NSImageNameUserGroup: &'static NSImageName; + pub static NSImageNameUserGroup: &'static NSImageName; } extern "C" { - static NSImageNameEveryone: &'static NSImageName; + pub static NSImageNameEveryone: &'static NSImageName; } extern "C" { - static NSImageNameUserGuest: &'static NSImageName; + pub static NSImageNameUserGuest: &'static NSImageName; } extern "C" { - static NSImageNameMenuOnStateTemplate: &'static NSImageName; + pub static NSImageNameMenuOnStateTemplate: &'static NSImageName; } extern "C" { - static NSImageNameMenuMixedStateTemplate: &'static NSImageName; + pub static NSImageNameMenuMixedStateTemplate: &'static NSImageName; } extern "C" { - static NSImageNameApplicationIcon: &'static NSImageName; + pub static NSImageNameApplicationIcon: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarAddDetailTemplate: &'static NSImageName; + pub static NSImageNameTouchBarAddDetailTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarAddTemplate: &'static NSImageName; + pub static NSImageNameTouchBarAddTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarAlarmTemplate: &'static NSImageName; + pub static NSImageNameTouchBarAlarmTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarAudioInputMuteTemplate: &'static NSImageName; + pub static NSImageNameTouchBarAudioInputMuteTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarAudioInputTemplate: &'static NSImageName; + pub static NSImageNameTouchBarAudioInputTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarAudioOutputMuteTemplate: &'static NSImageName; + pub static NSImageNameTouchBarAudioOutputMuteTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarAudioOutputVolumeHighTemplate: &'static NSImageName; + pub static NSImageNameTouchBarAudioOutputVolumeHighTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarAudioOutputVolumeLowTemplate: &'static NSImageName; + pub static NSImageNameTouchBarAudioOutputVolumeLowTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarAudioOutputVolumeMediumTemplate: &'static NSImageName; + pub static NSImageNameTouchBarAudioOutputVolumeMediumTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarAudioOutputVolumeOffTemplate: &'static NSImageName; + pub static NSImageNameTouchBarAudioOutputVolumeOffTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarBookmarksTemplate: &'static NSImageName; + pub static NSImageNameTouchBarBookmarksTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarColorPickerFill: &'static NSImageName; + pub static NSImageNameTouchBarColorPickerFill: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarColorPickerFont: &'static NSImageName; + pub static NSImageNameTouchBarColorPickerFont: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarColorPickerStroke: &'static NSImageName; + pub static NSImageNameTouchBarColorPickerStroke: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarCommunicationAudioTemplate: &'static NSImageName; + pub static NSImageNameTouchBarCommunicationAudioTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarCommunicationVideoTemplate: &'static NSImageName; + pub static NSImageNameTouchBarCommunicationVideoTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarComposeTemplate: &'static NSImageName; + pub static NSImageNameTouchBarComposeTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarDeleteTemplate: &'static NSImageName; + pub static NSImageNameTouchBarDeleteTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarDownloadTemplate: &'static NSImageName; + pub static NSImageNameTouchBarDownloadTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarEnterFullScreenTemplate: &'static NSImageName; + pub static NSImageNameTouchBarEnterFullScreenTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarExitFullScreenTemplate: &'static NSImageName; + pub static NSImageNameTouchBarExitFullScreenTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarFastForwardTemplate: &'static NSImageName; + pub static NSImageNameTouchBarFastForwardTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarFolderCopyToTemplate: &'static NSImageName; + pub static NSImageNameTouchBarFolderCopyToTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarFolderMoveToTemplate: &'static NSImageName; + pub static NSImageNameTouchBarFolderMoveToTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarFolderTemplate: &'static NSImageName; + pub static NSImageNameTouchBarFolderTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarGetInfoTemplate: &'static NSImageName; + pub static NSImageNameTouchBarGetInfoTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarGoBackTemplate: &'static NSImageName; + pub static NSImageNameTouchBarGoBackTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarGoDownTemplate: &'static NSImageName; + pub static NSImageNameTouchBarGoDownTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarGoForwardTemplate: &'static NSImageName; + pub static NSImageNameTouchBarGoForwardTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarGoUpTemplate: &'static NSImageName; + pub static NSImageNameTouchBarGoUpTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarHistoryTemplate: &'static NSImageName; + pub static NSImageNameTouchBarHistoryTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarIconViewTemplate: &'static NSImageName; + pub static NSImageNameTouchBarIconViewTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarListViewTemplate: &'static NSImageName; + pub static NSImageNameTouchBarListViewTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarMailTemplate: &'static NSImageName; + pub static NSImageNameTouchBarMailTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarNewFolderTemplate: &'static NSImageName; + pub static NSImageNameTouchBarNewFolderTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarNewMessageTemplate: &'static NSImageName; + pub static NSImageNameTouchBarNewMessageTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarOpenInBrowserTemplate: &'static NSImageName; + pub static NSImageNameTouchBarOpenInBrowserTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarPauseTemplate: &'static NSImageName; + pub static NSImageNameTouchBarPauseTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarPlayPauseTemplate: &'static NSImageName; + pub static NSImageNameTouchBarPlayPauseTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarPlayTemplate: &'static NSImageName; + pub static NSImageNameTouchBarPlayTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarQuickLookTemplate: &'static NSImageName; + pub static NSImageNameTouchBarQuickLookTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarRecordStartTemplate: &'static NSImageName; + pub static NSImageNameTouchBarRecordStartTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarRecordStopTemplate: &'static NSImageName; + pub static NSImageNameTouchBarRecordStopTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarRefreshTemplate: &'static NSImageName; + pub static NSImageNameTouchBarRefreshTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarRemoveTemplate: &'static NSImageName; + pub static NSImageNameTouchBarRemoveTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarRewindTemplate: &'static NSImageName; + pub static NSImageNameTouchBarRewindTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarRotateLeftTemplate: &'static NSImageName; + pub static NSImageNameTouchBarRotateLeftTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarRotateRightTemplate: &'static NSImageName; + pub static NSImageNameTouchBarRotateRightTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSearchTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSearchTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarShareTemplate: &'static NSImageName; + pub static NSImageNameTouchBarShareTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSidebarTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSidebarTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSkipAhead15SecondsTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSkipAhead15SecondsTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSkipAhead30SecondsTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSkipAhead30SecondsTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSkipAheadTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSkipAheadTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSkipBack15SecondsTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSkipBack15SecondsTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSkipBack30SecondsTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSkipBack30SecondsTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSkipBackTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSkipBackTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSkipToEndTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSkipToEndTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSkipToStartTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSkipToStartTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarSlideshowTemplate: &'static NSImageName; + pub static NSImageNameTouchBarSlideshowTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTagIconTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTagIconTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTextBoldTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTextBoldTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTextBoxTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTextBoxTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTextCenterAlignTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTextCenterAlignTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTextItalicTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTextItalicTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTextJustifiedAlignTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTextJustifiedAlignTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTextLeftAlignTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTextLeftAlignTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTextListTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTextListTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTextRightAlignTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTextRightAlignTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTextStrikethroughTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTextStrikethroughTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarTextUnderlineTemplate: &'static NSImageName; + pub static NSImageNameTouchBarTextUnderlineTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarUserAddTemplate: &'static NSImageName; + pub static NSImageNameTouchBarUserAddTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarUserGroupTemplate: &'static NSImageName; + pub static NSImageNameTouchBarUserGroupTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarUserTemplate: &'static NSImageName; + pub static NSImageNameTouchBarUserTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarVolumeDownTemplate: &'static NSImageName; + pub static NSImageNameTouchBarVolumeDownTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarVolumeUpTemplate: &'static NSImageName; + pub static NSImageNameTouchBarVolumeUpTemplate: &'static NSImageName; } extern "C" { - static NSImageNameTouchBarPlayheadTemplate: &'static NSImageName; + pub static NSImageNameTouchBarPlayheadTemplate: &'static NSImageName; } pub type NSImageSymbolScale = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index c37d475b3..498e54572 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -184,5 +184,5 @@ extern_methods!( ); extern "C" { - static NSImageRepRegistryDidChangeNotification: &'static NSNotificationName; + pub static NSImageRepRegistryDidChangeNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs index 8cf3530e4..c2a3e0c08 100644 --- a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -23,5 +23,5 @@ extern_methods!( ); extern "C" { - static NSInterfaceStyleDefault: Option<&'static NSString>; + pub static NSInterfaceStyleDefault: Option<&'static NSString>; } diff --git a/crates/icrate/src/generated/AppKit/NSItemProvider.rs b/crates/icrate/src/generated/AppKit/NSItemProvider.rs index cc20fde0f..95ee1584b 100644 --- a/crates/icrate/src/generated/AppKit/NSItemProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSItemProvider.rs @@ -19,17 +19,17 @@ extern_methods!( ); extern "C" { - static NSTypeIdentifierDateText: &'static NSString; + pub static NSTypeIdentifierDateText: &'static NSString; } extern "C" { - static NSTypeIdentifierAddressText: &'static NSString; + pub static NSTypeIdentifierAddressText: &'static NSString; } extern "C" { - static NSTypeIdentifierPhoneNumberText: &'static NSString; + pub static NSTypeIdentifierPhoneNumberText: &'static NSString; } extern "C" { - static NSTypeIdentifierTransitInformationText: &'static NSString; + pub static NSTypeIdentifierTransitInformationText: &'static NSString; } diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index 4fd785a83..aab53cacd 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -49,29 +49,29 @@ extern_methods!( ); extern "C" { - static NSMultipleValuesMarker: &'static Object; + pub static NSMultipleValuesMarker: &'static Object; } extern "C" { - static NSNoSelectionMarker: &'static Object; + pub static NSNoSelectionMarker: &'static Object; } extern "C" { - static NSNotApplicableMarker: &'static Object; + pub static NSNotApplicableMarker: &'static Object; } pub type NSBindingInfoKey = NSString; extern "C" { - static NSObservedObjectKey: &'static NSBindingInfoKey; + pub static NSObservedObjectKey: &'static NSBindingInfoKey; } extern "C" { - static NSObservedKeyPathKey: &'static NSBindingInfoKey; + pub static NSObservedKeyPathKey: &'static NSBindingInfoKey; } extern "C" { - static NSOptionsKey: &'static NSBindingInfoKey; + pub static NSOptionsKey: &'static NSBindingInfoKey; } extern_methods!( @@ -171,423 +171,423 @@ extern_methods!( ); extern "C" { - static NSAlignmentBinding: &'static NSBindingName; + pub static NSAlignmentBinding: &'static NSBindingName; } extern "C" { - static NSAlternateImageBinding: &'static NSBindingName; + pub static NSAlternateImageBinding: &'static NSBindingName; } extern "C" { - static NSAlternateTitleBinding: &'static NSBindingName; + pub static NSAlternateTitleBinding: &'static NSBindingName; } extern "C" { - static NSAnimateBinding: &'static NSBindingName; + pub static NSAnimateBinding: &'static NSBindingName; } extern "C" { - static NSAnimationDelayBinding: &'static NSBindingName; + pub static NSAnimationDelayBinding: &'static NSBindingName; } extern "C" { - static NSArgumentBinding: &'static NSBindingName; + pub static NSArgumentBinding: &'static NSBindingName; } extern "C" { - static NSAttributedStringBinding: &'static NSBindingName; + pub static NSAttributedStringBinding: &'static NSBindingName; } extern "C" { - static NSContentArrayBinding: &'static NSBindingName; + pub static NSContentArrayBinding: &'static NSBindingName; } extern "C" { - static NSContentArrayForMultipleSelectionBinding: &'static NSBindingName; + pub static NSContentArrayForMultipleSelectionBinding: &'static NSBindingName; } extern "C" { - static NSContentBinding: &'static NSBindingName; + pub static NSContentBinding: &'static NSBindingName; } extern "C" { - static NSContentDictionaryBinding: &'static NSBindingName; + pub static NSContentDictionaryBinding: &'static NSBindingName; } extern "C" { - static NSContentHeightBinding: &'static NSBindingName; + pub static NSContentHeightBinding: &'static NSBindingName; } extern "C" { - static NSContentObjectBinding: &'static NSBindingName; + pub static NSContentObjectBinding: &'static NSBindingName; } extern "C" { - static NSContentObjectsBinding: &'static NSBindingName; + pub static NSContentObjectsBinding: &'static NSBindingName; } extern "C" { - static NSContentSetBinding: &'static NSBindingName; + pub static NSContentSetBinding: &'static NSBindingName; } extern "C" { - static NSContentValuesBinding: &'static NSBindingName; + pub static NSContentValuesBinding: &'static NSBindingName; } extern "C" { - static NSContentWidthBinding: &'static NSBindingName; + pub static NSContentWidthBinding: &'static NSBindingName; } extern "C" { - static NSCriticalValueBinding: &'static NSBindingName; + pub static NSCriticalValueBinding: &'static NSBindingName; } extern "C" { - static NSDataBinding: &'static NSBindingName; + pub static NSDataBinding: &'static NSBindingName; } extern "C" { - static NSDisplayPatternTitleBinding: &'static NSBindingName; + pub static NSDisplayPatternTitleBinding: &'static NSBindingName; } extern "C" { - static NSDisplayPatternValueBinding: &'static NSBindingName; + pub static NSDisplayPatternValueBinding: &'static NSBindingName; } extern "C" { - static NSDocumentEditedBinding: &'static NSBindingName; + pub static NSDocumentEditedBinding: &'static NSBindingName; } extern "C" { - static NSDoubleClickArgumentBinding: &'static NSBindingName; + pub static NSDoubleClickArgumentBinding: &'static NSBindingName; } extern "C" { - static NSDoubleClickTargetBinding: &'static NSBindingName; + pub static NSDoubleClickTargetBinding: &'static NSBindingName; } extern "C" { - static NSEditableBinding: &'static NSBindingName; + pub static NSEditableBinding: &'static NSBindingName; } extern "C" { - static NSEnabledBinding: &'static NSBindingName; + pub static NSEnabledBinding: &'static NSBindingName; } extern "C" { - static NSExcludedKeysBinding: &'static NSBindingName; + pub static NSExcludedKeysBinding: &'static NSBindingName; } extern "C" { - static NSFilterPredicateBinding: &'static NSBindingName; + pub static NSFilterPredicateBinding: &'static NSBindingName; } extern "C" { - static NSFontBinding: &'static NSBindingName; + pub static NSFontBinding: &'static NSBindingName; } extern "C" { - static NSFontBoldBinding: &'static NSBindingName; + pub static NSFontBoldBinding: &'static NSBindingName; } extern "C" { - static NSFontFamilyNameBinding: &'static NSBindingName; + pub static NSFontFamilyNameBinding: &'static NSBindingName; } extern "C" { - static NSFontItalicBinding: &'static NSBindingName; + pub static NSFontItalicBinding: &'static NSBindingName; } extern "C" { - static NSFontNameBinding: &'static NSBindingName; + pub static NSFontNameBinding: &'static NSBindingName; } extern "C" { - static NSFontSizeBinding: &'static NSBindingName; + pub static NSFontSizeBinding: &'static NSBindingName; } extern "C" { - static NSHeaderTitleBinding: &'static NSBindingName; + pub static NSHeaderTitleBinding: &'static NSBindingName; } extern "C" { - static NSHiddenBinding: &'static NSBindingName; + pub static NSHiddenBinding: &'static NSBindingName; } extern "C" { - static NSImageBinding: &'static NSBindingName; + pub static NSImageBinding: &'static NSBindingName; } extern "C" { - static NSIncludedKeysBinding: &'static NSBindingName; + pub static NSIncludedKeysBinding: &'static NSBindingName; } extern "C" { - static NSInitialKeyBinding: &'static NSBindingName; + pub static NSInitialKeyBinding: &'static NSBindingName; } extern "C" { - static NSInitialValueBinding: &'static NSBindingName; + pub static NSInitialValueBinding: &'static NSBindingName; } extern "C" { - static NSIsIndeterminateBinding: &'static NSBindingName; + pub static NSIsIndeterminateBinding: &'static NSBindingName; } extern "C" { - static NSLabelBinding: &'static NSBindingName; + pub static NSLabelBinding: &'static NSBindingName; } extern "C" { - static NSLocalizedKeyDictionaryBinding: &'static NSBindingName; + pub static NSLocalizedKeyDictionaryBinding: &'static NSBindingName; } extern "C" { - static NSManagedObjectContextBinding: &'static NSBindingName; + pub static NSManagedObjectContextBinding: &'static NSBindingName; } extern "C" { - static NSMaximumRecentsBinding: &'static NSBindingName; + pub static NSMaximumRecentsBinding: &'static NSBindingName; } extern "C" { - static NSMaxValueBinding: &'static NSBindingName; + pub static NSMaxValueBinding: &'static NSBindingName; } extern "C" { - static NSMaxWidthBinding: &'static NSBindingName; + pub static NSMaxWidthBinding: &'static NSBindingName; } extern "C" { - static NSMinValueBinding: &'static NSBindingName; + pub static NSMinValueBinding: &'static NSBindingName; } extern "C" { - static NSMinWidthBinding: &'static NSBindingName; + pub static NSMinWidthBinding: &'static NSBindingName; } extern "C" { - static NSMixedStateImageBinding: &'static NSBindingName; + pub static NSMixedStateImageBinding: &'static NSBindingName; } extern "C" { - static NSOffStateImageBinding: &'static NSBindingName; + pub static NSOffStateImageBinding: &'static NSBindingName; } extern "C" { - static NSOnStateImageBinding: &'static NSBindingName; + pub static NSOnStateImageBinding: &'static NSBindingName; } extern "C" { - static NSPositioningRectBinding: &'static NSBindingName; + pub static NSPositioningRectBinding: &'static NSBindingName; } extern "C" { - static NSPredicateBinding: &'static NSBindingName; + pub static NSPredicateBinding: &'static NSBindingName; } extern "C" { - static NSRecentSearchesBinding: &'static NSBindingName; + pub static NSRecentSearchesBinding: &'static NSBindingName; } extern "C" { - static NSRepresentedFilenameBinding: &'static NSBindingName; + pub static NSRepresentedFilenameBinding: &'static NSBindingName; } extern "C" { - static NSRowHeightBinding: &'static NSBindingName; + pub static NSRowHeightBinding: &'static NSBindingName; } extern "C" { - static NSSelectedIdentifierBinding: &'static NSBindingName; + pub static NSSelectedIdentifierBinding: &'static NSBindingName; } extern "C" { - static NSSelectedIndexBinding: &'static NSBindingName; + pub static NSSelectedIndexBinding: &'static NSBindingName; } extern "C" { - static NSSelectedLabelBinding: &'static NSBindingName; + pub static NSSelectedLabelBinding: &'static NSBindingName; } extern "C" { - static NSSelectedObjectBinding: &'static NSBindingName; + pub static NSSelectedObjectBinding: &'static NSBindingName; } extern "C" { - static NSSelectedObjectsBinding: &'static NSBindingName; + pub static NSSelectedObjectsBinding: &'static NSBindingName; } extern "C" { - static NSSelectedTagBinding: &'static NSBindingName; + pub static NSSelectedTagBinding: &'static NSBindingName; } extern "C" { - static NSSelectedValueBinding: &'static NSBindingName; + pub static NSSelectedValueBinding: &'static NSBindingName; } extern "C" { - static NSSelectedValuesBinding: &'static NSBindingName; + pub static NSSelectedValuesBinding: &'static NSBindingName; } extern "C" { - static NSSelectionIndexesBinding: &'static NSBindingName; + pub static NSSelectionIndexesBinding: &'static NSBindingName; } extern "C" { - static NSSelectionIndexPathsBinding: &'static NSBindingName; + pub static NSSelectionIndexPathsBinding: &'static NSBindingName; } extern "C" { - static NSSortDescriptorsBinding: &'static NSBindingName; + pub static NSSortDescriptorsBinding: &'static NSBindingName; } extern "C" { - static NSTargetBinding: &'static NSBindingName; + pub static NSTargetBinding: &'static NSBindingName; } extern "C" { - static NSTextColorBinding: &'static NSBindingName; + pub static NSTextColorBinding: &'static NSBindingName; } extern "C" { - static NSTitleBinding: &'static NSBindingName; + pub static NSTitleBinding: &'static NSBindingName; } extern "C" { - static NSToolTipBinding: &'static NSBindingName; + pub static NSToolTipBinding: &'static NSBindingName; } extern "C" { - static NSTransparentBinding: &'static NSBindingName; + pub static NSTransparentBinding: &'static NSBindingName; } extern "C" { - static NSValueBinding: &'static NSBindingName; + pub static NSValueBinding: &'static NSBindingName; } extern "C" { - static NSValuePathBinding: &'static NSBindingName; + pub static NSValuePathBinding: &'static NSBindingName; } extern "C" { - static NSValueURLBinding: &'static NSBindingName; + pub static NSValueURLBinding: &'static NSBindingName; } extern "C" { - static NSVisibleBinding: &'static NSBindingName; + pub static NSVisibleBinding: &'static NSBindingName; } extern "C" { - static NSWarningValueBinding: &'static NSBindingName; + pub static NSWarningValueBinding: &'static NSBindingName; } extern "C" { - static NSWidthBinding: &'static NSBindingName; + pub static NSWidthBinding: &'static NSBindingName; } extern "C" { - static NSAllowsEditingMultipleValuesSelectionBindingOption: &'static NSBindingOption; + pub static NSAllowsEditingMultipleValuesSelectionBindingOption: &'static NSBindingOption; } extern "C" { - static NSAllowsNullArgumentBindingOption: &'static NSBindingOption; + pub static NSAllowsNullArgumentBindingOption: &'static NSBindingOption; } extern "C" { - static NSAlwaysPresentsApplicationModalAlertsBindingOption: &'static NSBindingOption; + pub static NSAlwaysPresentsApplicationModalAlertsBindingOption: &'static NSBindingOption; } extern "C" { - static NSConditionallySetsEditableBindingOption: &'static NSBindingOption; + pub static NSConditionallySetsEditableBindingOption: &'static NSBindingOption; } extern "C" { - static NSConditionallySetsEnabledBindingOption: &'static NSBindingOption; + pub static NSConditionallySetsEnabledBindingOption: &'static NSBindingOption; } extern "C" { - static NSConditionallySetsHiddenBindingOption: &'static NSBindingOption; + pub static NSConditionallySetsHiddenBindingOption: &'static NSBindingOption; } extern "C" { - static NSContinuouslyUpdatesValueBindingOption: &'static NSBindingOption; + pub static NSContinuouslyUpdatesValueBindingOption: &'static NSBindingOption; } extern "C" { - static NSCreatesSortDescriptorBindingOption: &'static NSBindingOption; + pub static NSCreatesSortDescriptorBindingOption: &'static NSBindingOption; } extern "C" { - static NSDeletesObjectsOnRemoveBindingsOption: &'static NSBindingOption; + pub static NSDeletesObjectsOnRemoveBindingsOption: &'static NSBindingOption; } extern "C" { - static NSDisplayNameBindingOption: &'static NSBindingOption; + pub static NSDisplayNameBindingOption: &'static NSBindingOption; } extern "C" { - static NSDisplayPatternBindingOption: &'static NSBindingOption; + pub static NSDisplayPatternBindingOption: &'static NSBindingOption; } extern "C" { - static NSContentPlacementTagBindingOption: &'static NSBindingOption; + pub static NSContentPlacementTagBindingOption: &'static NSBindingOption; } extern "C" { - static NSHandlesContentAsCompoundValueBindingOption: &'static NSBindingOption; + pub static NSHandlesContentAsCompoundValueBindingOption: &'static NSBindingOption; } extern "C" { - static NSInsertsNullPlaceholderBindingOption: &'static NSBindingOption; + pub static NSInsertsNullPlaceholderBindingOption: &'static NSBindingOption; } extern "C" { - static NSInvokesSeparatelyWithArrayObjectsBindingOption: &'static NSBindingOption; + pub static NSInvokesSeparatelyWithArrayObjectsBindingOption: &'static NSBindingOption; } extern "C" { - static NSMultipleValuesPlaceholderBindingOption: &'static NSBindingOption; + pub static NSMultipleValuesPlaceholderBindingOption: &'static NSBindingOption; } extern "C" { - static NSNoSelectionPlaceholderBindingOption: &'static NSBindingOption; + pub static NSNoSelectionPlaceholderBindingOption: &'static NSBindingOption; } extern "C" { - static NSNotApplicablePlaceholderBindingOption: &'static NSBindingOption; + pub static NSNotApplicablePlaceholderBindingOption: &'static NSBindingOption; } extern "C" { - static NSNullPlaceholderBindingOption: &'static NSBindingOption; + pub static NSNullPlaceholderBindingOption: &'static NSBindingOption; } extern "C" { - static NSRaisesForNotApplicableKeysBindingOption: &'static NSBindingOption; + pub static NSRaisesForNotApplicableKeysBindingOption: &'static NSBindingOption; } extern "C" { - static NSPredicateFormatBindingOption: &'static NSBindingOption; + pub static NSPredicateFormatBindingOption: &'static NSBindingOption; } extern "C" { - static NSSelectorNameBindingOption: &'static NSBindingOption; + pub static NSSelectorNameBindingOption: &'static NSBindingOption; } extern "C" { - static NSSelectsAllWhenSettingContentBindingOption: &'static NSBindingOption; + pub static NSSelectsAllWhenSettingContentBindingOption: &'static NSBindingOption; } extern "C" { - static NSValidatesImmediatelyBindingOption: &'static NSBindingOption; + pub static NSValidatesImmediatelyBindingOption: &'static NSBindingOption; } extern "C" { - static NSValueTransformerNameBindingOption: &'static NSBindingOption; + pub static NSValueTransformerNameBindingOption: &'static NSBindingOption; } extern "C" { - static NSValueTransformerBindingOption: &'static NSBindingOption; + pub static NSValueTransformerBindingOption: &'static NSBindingOption; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index 20c71307d..88b3b49ee 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -4,19 +4,19 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -static NSLayoutPriorityRequired: NSLayoutPriority = 1000; +pub static NSLayoutPriorityRequired: NSLayoutPriority = 1000; -static NSLayoutPriorityDefaultHigh: NSLayoutPriority = 750; +pub static NSLayoutPriorityDefaultHigh: NSLayoutPriority = 750; -static NSLayoutPriorityDragThatCanResizeWindow: NSLayoutPriority = 510; +pub static NSLayoutPriorityDragThatCanResizeWindow: NSLayoutPriority = 510; -static NSLayoutPriorityWindowSizeStayPut: NSLayoutPriority = 500; +pub static NSLayoutPriorityWindowSizeStayPut: NSLayoutPriority = 500; -static NSLayoutPriorityDragThatCannotResizeWindow: NSLayoutPriority = 490; +pub static NSLayoutPriorityDragThatCannotResizeWindow: NSLayoutPriority = 490; -static NSLayoutPriorityDefaultLow: NSLayoutPriority = 250; +pub static NSLayoutPriorityDefaultLow: NSLayoutPriority = 250; -static NSLayoutPriorityFittingSizeCompression: NSLayoutPriority = 50; +pub static NSLayoutPriorityFittingSizeCompression: NSLayoutPriority = 50; pub type NSLayoutConstraintOrientation = NSInteger; pub const NSLayoutConstraintOrientationHorizontal: NSLayoutConstraintOrientation = 0; @@ -267,11 +267,11 @@ extern_methods!( ); extern "C" { - static NSViewNoInstrinsicMetric: CGFloat; + pub static NSViewNoInstrinsicMetric: CGFloat; } extern "C" { - static NSViewNoIntrinsicMetric: CGFloat; + pub static NSViewNoIntrinsicMetric: CGFloat; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs index e4fc91f14..fc1b63a13 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -83,12 +83,12 @@ extern_methods!( } ); -static NSRelevancyLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleRelevancy; +pub static NSRelevancyLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleRelevancy; -static NSContinuousCapacityLevelIndicatorStyle: NSLevelIndicatorStyle = +pub static NSContinuousCapacityLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleContinuousCapacity; -static NSDiscreteCapacityLevelIndicatorStyle: NSLevelIndicatorStyle = +pub static NSDiscreteCapacityLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleDiscreteCapacity; -static NSRatingLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleRating; +pub static NSRatingLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleRating; diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 21d246626..1cda57768 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -249,31 +249,31 @@ extern_methods!( ); extern "C" { - static NSMenuWillSendActionNotification: &'static NSNotificationName; + pub static NSMenuWillSendActionNotification: &'static NSNotificationName; } extern "C" { - static NSMenuDidSendActionNotification: &'static NSNotificationName; + pub static NSMenuDidSendActionNotification: &'static NSNotificationName; } extern "C" { - static NSMenuDidAddItemNotification: &'static NSNotificationName; + pub static NSMenuDidAddItemNotification: &'static NSNotificationName; } extern "C" { - static NSMenuDidRemoveItemNotification: &'static NSNotificationName; + pub static NSMenuDidRemoveItemNotification: &'static NSNotificationName; } extern "C" { - static NSMenuDidChangeItemNotification: &'static NSNotificationName; + pub static NSMenuDidChangeItemNotification: &'static NSNotificationName; } extern "C" { - static NSMenuDidBeginTrackingNotification: &'static NSNotificationName; + pub static NSMenuDidBeginTrackingNotification: &'static NSNotificationName; } extern "C" { - static NSMenuDidEndTrackingNotification: &'static NSNotificationName; + pub static NSMenuDidEndTrackingNotification: &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs index 1dc6c0eaf..6d1b45c15 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -217,7 +217,7 @@ extern_methods!( ); extern "C" { - static NSMenuItemImportFromDeviceIdentifier: &'static NSUserInterfaceItemIdentifier; + pub static NSMenuItemImportFromDeviceIdentifier: &'static NSUserInterfaceItemIdentifier; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index 446fc3f60..2861d1e22 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -65,9 +65,9 @@ extern_methods!( ); extern "C" { - static NSNibOwner: &'static NSString; + pub static NSNibOwner: &'static NSString; } extern "C" { - static NSNibTopLevelObjects: &'static NSString; + pub static NSNibTopLevelObjects: &'static NSString; } diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index ac8d1db4f..eaf416b17 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -302,42 +302,44 @@ extern_methods!( } ); -static NSOpenGLCPSwapInterval: NSOpenGLContextParameter = NSOpenGLContextParameterSwapInterval; +pub static NSOpenGLCPSwapInterval: NSOpenGLContextParameter = NSOpenGLContextParameterSwapInterval; -static NSOpenGLCPSurfaceOrder: NSOpenGLContextParameter = NSOpenGLContextParameterSurfaceOrder; +pub static NSOpenGLCPSurfaceOrder: NSOpenGLContextParameter = NSOpenGLContextParameterSurfaceOrder; -static NSOpenGLCPSurfaceOpacity: NSOpenGLContextParameter = NSOpenGLContextParameterSurfaceOpacity; +pub static NSOpenGLCPSurfaceOpacity: NSOpenGLContextParameter = + NSOpenGLContextParameterSurfaceOpacity; -static NSOpenGLCPSurfaceBackingSize: NSOpenGLContextParameter = +pub static NSOpenGLCPSurfaceBackingSize: NSOpenGLContextParameter = NSOpenGLContextParameterSurfaceBackingSize; -static NSOpenGLCPReclaimResources: NSOpenGLContextParameter = +pub static NSOpenGLCPReclaimResources: NSOpenGLContextParameter = NSOpenGLContextParameterReclaimResources; -static NSOpenGLCPCurrentRendererID: NSOpenGLContextParameter = +pub static NSOpenGLCPCurrentRendererID: NSOpenGLContextParameter = NSOpenGLContextParameterCurrentRendererID; -static NSOpenGLCPGPUVertexProcessing: NSOpenGLContextParameter = +pub static NSOpenGLCPGPUVertexProcessing: NSOpenGLContextParameter = NSOpenGLContextParameterGPUVertexProcessing; -static NSOpenGLCPGPUFragmentProcessing: NSOpenGLContextParameter = +pub static NSOpenGLCPGPUFragmentProcessing: NSOpenGLContextParameter = NSOpenGLContextParameterGPUFragmentProcessing; -static NSOpenGLCPHasDrawable: NSOpenGLContextParameter = NSOpenGLContextParameterHasDrawable; +pub static NSOpenGLCPHasDrawable: NSOpenGLContextParameter = NSOpenGLContextParameterHasDrawable; -static NSOpenGLCPMPSwapsInFlight: NSOpenGLContextParameter = +pub static NSOpenGLCPMPSwapsInFlight: NSOpenGLContextParameter = NSOpenGLContextParameterMPSwapsInFlight; -static NSOpenGLCPSwapRectangle: NSOpenGLContextParameter = NSOpenGLContextParameterSwapRectangle; +pub static NSOpenGLCPSwapRectangle: NSOpenGLContextParameter = + NSOpenGLContextParameterSwapRectangle; -static NSOpenGLCPSwapRectangleEnable: NSOpenGLContextParameter = +pub static NSOpenGLCPSwapRectangleEnable: NSOpenGLContextParameter = NSOpenGLContextParameterSwapRectangleEnable; -static NSOpenGLCPRasterizationEnable: NSOpenGLContextParameter = +pub static NSOpenGLCPRasterizationEnable: NSOpenGLContextParameter = NSOpenGLContextParameterRasterizationEnable; -static NSOpenGLCPStateValidation: NSOpenGLContextParameter = +pub static NSOpenGLCPStateValidation: NSOpenGLContextParameter = NSOpenGLContextParameterStateValidation; -static NSOpenGLCPSurfaceSurfaceVolatile: NSOpenGLContextParameter = +pub static NSOpenGLCPSurfaceSurfaceVolatile: NSOpenGLContextParameter = NSOpenGLContextParameterSurfaceSurfaceVolatile; diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index b5e45eaa8..f51d870c7 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -188,41 +188,41 @@ pub type NSOutlineViewDataSource = NSObject; pub type NSOutlineViewDelegate = NSObject; extern "C" { - static NSOutlineViewDisclosureButtonKey: &'static NSUserInterfaceItemIdentifier; + pub static NSOutlineViewDisclosureButtonKey: &'static NSUserInterfaceItemIdentifier; } extern "C" { - static NSOutlineViewShowHideButtonKey: &'static NSUserInterfaceItemIdentifier; + pub static NSOutlineViewShowHideButtonKey: &'static NSUserInterfaceItemIdentifier; } extern "C" { - static NSOutlineViewSelectionDidChangeNotification: &'static NSNotificationName; + pub static NSOutlineViewSelectionDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSOutlineViewColumnDidMoveNotification: &'static NSNotificationName; + pub static NSOutlineViewColumnDidMoveNotification: &'static NSNotificationName; } extern "C" { - static NSOutlineViewColumnDidResizeNotification: &'static NSNotificationName; + pub static NSOutlineViewColumnDidResizeNotification: &'static NSNotificationName; } extern "C" { - static NSOutlineViewSelectionIsChangingNotification: &'static NSNotificationName; + pub static NSOutlineViewSelectionIsChangingNotification: &'static NSNotificationName; } extern "C" { - static NSOutlineViewItemWillExpandNotification: &'static NSNotificationName; + pub static NSOutlineViewItemWillExpandNotification: &'static NSNotificationName; } extern "C" { - static NSOutlineViewItemDidExpandNotification: &'static NSNotificationName; + pub static NSOutlineViewItemDidExpandNotification: &'static NSNotificationName; } extern "C" { - static NSOutlineViewItemWillCollapseNotification: &'static NSNotificationName; + pub static NSOutlineViewItemWillCollapseNotification: &'static NSNotificationName; } extern "C" { - static NSOutlineViewItemDidCollapseNotification: &'static NSNotificationName; + pub static NSOutlineViewItemDidCollapseNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index 1b8c6130d..bc30683ed 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -21,7 +21,7 @@ pub const NSLineBreakStrategyStandard: NSLineBreakStrategy = 0xFFFF; pub type NSTextTabOptionKey = NSString; extern "C" { - static NSTabColumnTerminatorsAttributeName: &'static NSTextTabOptionKey; + pub static NSTabColumnTerminatorsAttributeName: &'static NSTextTabOptionKey; } extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index 86ea0622a..6e0985e2f 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -7,89 +7,89 @@ use crate::Foundation::*; pub type NSPasteboardType = NSString; extern "C" { - static NSPasteboardTypeString: &'static NSPasteboardType; + pub static NSPasteboardTypeString: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypePDF: &'static NSPasteboardType; + pub static NSPasteboardTypePDF: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeTIFF: &'static NSPasteboardType; + pub static NSPasteboardTypeTIFF: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypePNG: &'static NSPasteboardType; + pub static NSPasteboardTypePNG: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeRTF: &'static NSPasteboardType; + pub static NSPasteboardTypeRTF: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeRTFD: &'static NSPasteboardType; + pub static NSPasteboardTypeRTFD: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeHTML: &'static NSPasteboardType; + pub static NSPasteboardTypeHTML: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeTabularText: &'static NSPasteboardType; + pub static NSPasteboardTypeTabularText: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeFont: &'static NSPasteboardType; + pub static NSPasteboardTypeFont: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeRuler: &'static NSPasteboardType; + pub static NSPasteboardTypeRuler: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeColor: &'static NSPasteboardType; + pub static NSPasteboardTypeColor: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeSound: &'static NSPasteboardType; + pub static NSPasteboardTypeSound: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeMultipleTextSelection: &'static NSPasteboardType; + pub static NSPasteboardTypeMultipleTextSelection: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeTextFinderOptions: &'static NSPasteboardType; + pub static NSPasteboardTypeTextFinderOptions: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeURL: &'static NSPasteboardType; + pub static NSPasteboardTypeURL: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeFileURL: &'static NSPasteboardType; + pub static NSPasteboardTypeFileURL: &'static NSPasteboardType; } pub type NSPasteboardName = NSString; extern "C" { - static NSPasteboardNameGeneral: &'static NSPasteboardName; + pub static NSPasteboardNameGeneral: &'static NSPasteboardName; } extern "C" { - static NSPasteboardNameFont: &'static NSPasteboardName; + pub static NSPasteboardNameFont: &'static NSPasteboardName; } extern "C" { - static NSPasteboardNameRuler: &'static NSPasteboardName; + pub static NSPasteboardNameRuler: &'static NSPasteboardName; } extern "C" { - static NSPasteboardNameFind: &'static NSPasteboardName; + pub static NSPasteboardNameFind: &'static NSPasteboardName; } extern "C" { - static NSPasteboardNameDrag: &'static NSPasteboardName; + pub static NSPasteboardNameDrag: &'static NSPasteboardName; } pub type NSPasteboardContentsOptions = NSUInteger; @@ -98,11 +98,12 @@ pub const NSPasteboardContentsCurrentHostOnly: NSPasteboardContentsOptions = 1 < pub type NSPasteboardReadingOptionKey = NSString; extern "C" { - static NSPasteboardURLReadingFileURLsOnlyKey: &'static NSPasteboardReadingOptionKey; + pub static NSPasteboardURLReadingFileURLsOnlyKey: &'static NSPasteboardReadingOptionKey; } extern "C" { - static NSPasteboardURLReadingContentsConformToTypesKey: &'static NSPasteboardReadingOptionKey; + pub static NSPasteboardURLReadingContentsConformToTypesKey: + &'static NSPasteboardReadingOptionKey; } extern_class!( @@ -324,101 +325,101 @@ extern_methods!( ); extern "C" { - static NSFileContentsPboardType: &'static NSPasteboardType; + pub static NSFileContentsPboardType: &'static NSPasteboardType; } extern "C" { - static NSStringPboardType: &'static NSPasteboardType; + pub static NSStringPboardType: &'static NSPasteboardType; } extern "C" { - static NSFilenamesPboardType: &'static NSPasteboardType; + pub static NSFilenamesPboardType: &'static NSPasteboardType; } extern "C" { - static NSTIFFPboardType: &'static NSPasteboardType; + pub static NSTIFFPboardType: &'static NSPasteboardType; } extern "C" { - static NSRTFPboardType: &'static NSPasteboardType; + pub static NSRTFPboardType: &'static NSPasteboardType; } extern "C" { - static NSTabularTextPboardType: &'static NSPasteboardType; + pub static NSTabularTextPboardType: &'static NSPasteboardType; } extern "C" { - static NSFontPboardType: &'static NSPasteboardType; + pub static NSFontPboardType: &'static NSPasteboardType; } extern "C" { - static NSRulerPboardType: &'static NSPasteboardType; + pub static NSRulerPboardType: &'static NSPasteboardType; } extern "C" { - static NSColorPboardType: &'static NSPasteboardType; + pub static NSColorPboardType: &'static NSPasteboardType; } extern "C" { - static NSRTFDPboardType: &'static NSPasteboardType; + pub static NSRTFDPboardType: &'static NSPasteboardType; } extern "C" { - static NSHTMLPboardType: &'static NSPasteboardType; + pub static NSHTMLPboardType: &'static NSPasteboardType; } extern "C" { - static NSURLPboardType: &'static NSPasteboardType; + pub static NSURLPboardType: &'static NSPasteboardType; } extern "C" { - static NSPDFPboardType: &'static NSPasteboardType; + pub static NSPDFPboardType: &'static NSPasteboardType; } extern "C" { - static NSMultipleTextSelectionPboardType: &'static NSPasteboardType; + pub static NSMultipleTextSelectionPboardType: &'static NSPasteboardType; } extern "C" { - static NSPostScriptPboardType: &'static NSPasteboardType; + pub static NSPostScriptPboardType: &'static NSPasteboardType; } extern "C" { - static NSVCardPboardType: &'static NSPasteboardType; + pub static NSVCardPboardType: &'static NSPasteboardType; } extern "C" { - static NSInkTextPboardType: &'static NSPasteboardType; + pub static NSInkTextPboardType: &'static NSPasteboardType; } extern "C" { - static NSFilesPromisePboardType: &'static NSPasteboardType; + pub static NSFilesPromisePboardType: &'static NSPasteboardType; } extern "C" { - static NSPasteboardTypeFindPanelSearchOptions: &'static NSPasteboardType; + pub static NSPasteboardTypeFindPanelSearchOptions: &'static NSPasteboardType; } extern "C" { - static NSGeneralPboard: &'static NSPasteboardName; + pub static NSGeneralPboard: &'static NSPasteboardName; } extern "C" { - static NSFontPboard: &'static NSPasteboardName; + pub static NSFontPboard: &'static NSPasteboardName; } extern "C" { - static NSRulerPboard: &'static NSPasteboardName; + pub static NSRulerPboard: &'static NSPasteboardName; } extern "C" { - static NSFindPboard: &'static NSPasteboardName; + pub static NSFindPboard: &'static NSPasteboardName; } extern "C" { - static NSDragPboard: &'static NSPasteboardName; + pub static NSDragPboard: &'static NSPasteboardName; } extern "C" { - static NSPICTPboardType: &'static NSPasteboardType; + pub static NSPICTPboardType: &'static NSPasteboardType; } diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs index dbb80890d..f3aab1a22 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -137,5 +137,5 @@ extern_methods!( ); extern "C" { - static NSPopUpButtonWillPopUpNotification: &'static NSNotificationName; + pub static NSPopUpButtonWillPopUpNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index f6f9e4307..032a92a44 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -169,5 +169,5 @@ extern_methods!( ); extern "C" { - static NSPopUpButtonCellWillPopUpNotification: &'static NSNotificationName; + pub static NSPopUpButtonCellWillPopUpNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index 2772f602e..e93170093 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -98,33 +98,33 @@ extern_methods!( ); extern "C" { - static NSPopoverCloseReasonKey: &'static NSString; + pub static NSPopoverCloseReasonKey: &'static NSString; } pub type NSPopoverCloseReasonValue = NSString; extern "C" { - static NSPopoverCloseReasonStandard: &'static NSPopoverCloseReasonValue; + pub static NSPopoverCloseReasonStandard: &'static NSPopoverCloseReasonValue; } extern "C" { - static NSPopoverCloseReasonDetachToWindow: &'static NSPopoverCloseReasonValue; + pub static NSPopoverCloseReasonDetachToWindow: &'static NSPopoverCloseReasonValue; } extern "C" { - static NSPopoverWillShowNotification: &'static NSNotificationName; + pub static NSPopoverWillShowNotification: &'static NSNotificationName; } extern "C" { - static NSPopoverDidShowNotification: &'static NSNotificationName; + pub static NSPopoverDidShowNotification: &'static NSNotificationName; } extern "C" { - static NSPopoverWillCloseNotification: &'static NSNotificationName; + pub static NSPopoverWillCloseNotification: &'static NSNotificationName; } extern "C" { - static NSPopoverDidCloseNotification: &'static NSNotificationName; + pub static NSPopoverDidCloseNotification: &'static NSNotificationName; } pub type NSPopoverDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs index baa75e5d9..bd43dada3 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -16,141 +16,141 @@ pub const NSPrintingPaginationModeClip: NSPrintingPaginationMode = 2; pub type NSPrintInfoAttributeKey = NSString; extern "C" { - static NSPrintPaperName: &'static NSPrintInfoAttributeKey; + pub static NSPrintPaperName: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintPaperSize: &'static NSPrintInfoAttributeKey; + pub static NSPrintPaperSize: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintOrientation: &'static NSPrintInfoAttributeKey; + pub static NSPrintOrientation: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintScalingFactor: &'static NSPrintInfoAttributeKey; + pub static NSPrintScalingFactor: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintLeftMargin: &'static NSPrintInfoAttributeKey; + pub static NSPrintLeftMargin: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintRightMargin: &'static NSPrintInfoAttributeKey; + pub static NSPrintRightMargin: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintTopMargin: &'static NSPrintInfoAttributeKey; + pub static NSPrintTopMargin: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintBottomMargin: &'static NSPrintInfoAttributeKey; + pub static NSPrintBottomMargin: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintHorizontallyCentered: &'static NSPrintInfoAttributeKey; + pub static NSPrintHorizontallyCentered: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintVerticallyCentered: &'static NSPrintInfoAttributeKey; + pub static NSPrintVerticallyCentered: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintHorizontalPagination: &'static NSPrintInfoAttributeKey; + pub static NSPrintHorizontalPagination: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintVerticalPagination: &'static NSPrintInfoAttributeKey; + pub static NSPrintVerticalPagination: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintPrinter: &'static NSPrintInfoAttributeKey; + pub static NSPrintPrinter: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintCopies: &'static NSPrintInfoAttributeKey; + pub static NSPrintCopies: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintAllPages: &'static NSPrintInfoAttributeKey; + pub static NSPrintAllPages: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintFirstPage: &'static NSPrintInfoAttributeKey; + pub static NSPrintFirstPage: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintLastPage: &'static NSPrintInfoAttributeKey; + pub static NSPrintLastPage: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintMustCollate: &'static NSPrintInfoAttributeKey; + pub static NSPrintMustCollate: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintReversePageOrder: &'static NSPrintInfoAttributeKey; + pub static NSPrintReversePageOrder: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintJobDisposition: &'static NSPrintInfoAttributeKey; + pub static NSPrintJobDisposition: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintPagesAcross: &'static NSPrintInfoAttributeKey; + pub static NSPrintPagesAcross: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintPagesDown: &'static NSPrintInfoAttributeKey; + pub static NSPrintPagesDown: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintTime: &'static NSPrintInfoAttributeKey; + pub static NSPrintTime: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintDetailedErrorReporting: &'static NSPrintInfoAttributeKey; + pub static NSPrintDetailedErrorReporting: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintFaxNumber: &'static NSPrintInfoAttributeKey; + pub static NSPrintFaxNumber: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintPrinterName: &'static NSPrintInfoAttributeKey; + pub static NSPrintPrinterName: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintSelectionOnly: &'static NSPrintInfoAttributeKey; + pub static NSPrintSelectionOnly: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintJobSavingURL: &'static NSPrintInfoAttributeKey; + pub static NSPrintJobSavingURL: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintJobSavingFileNameExtensionHidden: &'static NSPrintInfoAttributeKey; + pub static NSPrintJobSavingFileNameExtensionHidden: &'static NSPrintInfoAttributeKey; } extern "C" { - static NSPrintHeaderAndFooter: &'static NSPrintInfoAttributeKey; + pub static NSPrintHeaderAndFooter: &'static NSPrintInfoAttributeKey; } pub type NSPrintJobDispositionValue = NSString; extern "C" { - static NSPrintSpoolJob: &'static NSPrintJobDispositionValue; + pub static NSPrintSpoolJob: &'static NSPrintJobDispositionValue; } extern "C" { - static NSPrintPreviewJob: &'static NSPrintJobDispositionValue; + pub static NSPrintPreviewJob: &'static NSPrintJobDispositionValue; } extern "C" { - static NSPrintSaveJob: &'static NSPrintJobDispositionValue; + pub static NSPrintSaveJob: &'static NSPrintJobDispositionValue; } extern "C" { - static NSPrintCancelJob: &'static NSPrintJobDispositionValue; + pub static NSPrintCancelJob: &'static NSPrintJobDispositionValue; } pub type NSPrintInfoSettingKey = NSString; @@ -331,35 +331,35 @@ extern_methods!( ); extern "C" { - static NSPrintFormName: &'static NSString; + pub static NSPrintFormName: &'static NSString; } extern "C" { - static NSPrintJobFeatures: &'static NSString; + pub static NSPrintJobFeatures: &'static NSString; } extern "C" { - static NSPrintManualFeed: &'static NSString; + pub static NSPrintManualFeed: &'static NSString; } extern "C" { - static NSPrintPagesPerSheet: &'static NSString; + pub static NSPrintPagesPerSheet: &'static NSString; } extern "C" { - static NSPrintPaperFeed: &'static NSString; + pub static NSPrintPaperFeed: &'static NSString; } extern "C" { - static NSPrintSavePath: &'static NSString; + pub static NSPrintSavePath: &'static NSString; } pub type NSPrintingOrientation = NSUInteger; pub const NSPortraitOrientation: NSPrintingOrientation = 0; pub const NSLandscapeOrientation: NSPrintingOrientation = 1; -static NSAutoPagination: NSPrintingPaginationMode = NSPrintingPaginationModeAutomatic; +pub static NSAutoPagination: NSPrintingPaginationMode = NSPrintingPaginationModeAutomatic; -static NSFitPagination: NSPrintingPaginationMode = NSPrintingPaginationModeFit; +pub static NSFitPagination: NSPrintingPaginationMode = NSPrintingPaginationModeFit; -static NSClipPagination: NSPrintingPaginationMode = NSPrintingPaginationModeClip; +pub static NSClipPagination: NSPrintingPaginationMode = NSPrintingPaginationModeClip; diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs index cc3f1d6b7..672b35a91 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -15,7 +15,7 @@ pub const NSPrintRenderingQualityBest: NSPrintRenderingQuality = 0; pub const NSPrintRenderingQualityResponsive: NSPrintRenderingQuality = 1; extern "C" { - static NSPrintOperationExistsException: &'static NSExceptionName; + pub static NSPrintOperationExistsException: &'static NSExceptionName; } extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index 464fe713a..33a707701 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -17,25 +17,26 @@ pub const NSPrintPanelShowsPreview: NSPrintPanelOptions = 1 << 17; pub type NSPrintPanelJobStyleHint = NSString; extern "C" { - static NSPrintPhotoJobStyleHint: &'static NSPrintPanelJobStyleHint; + pub static NSPrintPhotoJobStyleHint: &'static NSPrintPanelJobStyleHint; } extern "C" { - static NSPrintAllPresetsJobStyleHint: &'static NSPrintPanelJobStyleHint; + pub static NSPrintAllPresetsJobStyleHint: &'static NSPrintPanelJobStyleHint; } extern "C" { - static NSPrintNoPresetsJobStyleHint: &'static NSPrintPanelJobStyleHint; + pub static NSPrintNoPresetsJobStyleHint: &'static NSPrintPanelJobStyleHint; } pub type NSPrintPanelAccessorySummaryKey = NSString; extern "C" { - static NSPrintPanelAccessorySummaryItemNameKey: &'static NSPrintPanelAccessorySummaryKey; + pub static NSPrintPanelAccessorySummaryItemNameKey: &'static NSPrintPanelAccessorySummaryKey; } extern "C" { - static NSPrintPanelAccessorySummaryItemDescriptionKey: &'static NSPrintPanelAccessorySummaryKey; + pub static NSPrintPanelAccessorySummaryItemDescriptionKey: + &'static NSPrintPanelAccessorySummaryKey; } pub type NSPrintPanelAccessorizing = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs index 1883e4625..332f33c28 100644 --- a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs @@ -99,9 +99,9 @@ pub const NSProgressIndicatorPreferredSmallThickness: NSProgressIndicatorThickne pub const NSProgressIndicatorPreferredLargeThickness: NSProgressIndicatorThickness = 18; pub const NSProgressIndicatorPreferredAquaThickness: NSProgressIndicatorThickness = 12; -static NSProgressIndicatorBarStyle: NSProgressIndicatorStyle = NSProgressIndicatorStyleBar; +pub static NSProgressIndicatorBarStyle: NSProgressIndicatorStyle = NSProgressIndicatorStyleBar; -static NSProgressIndicatorSpinningStyle: NSProgressIndicatorStyle = +pub static NSProgressIndicatorSpinningStyle: NSProgressIndicatorStyle = NSProgressIndicatorStyleSpinning; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index 18a8d35bc..48d4c7b7c 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -7,31 +7,31 @@ use crate::Foundation::*; pub type NSRuleEditorPredicatePartKey = NSString; extern "C" { - static NSRuleEditorPredicateLeftExpression: &'static NSRuleEditorPredicatePartKey; + pub static NSRuleEditorPredicateLeftExpression: &'static NSRuleEditorPredicatePartKey; } extern "C" { - static NSRuleEditorPredicateRightExpression: &'static NSRuleEditorPredicatePartKey; + pub static NSRuleEditorPredicateRightExpression: &'static NSRuleEditorPredicatePartKey; } extern "C" { - static NSRuleEditorPredicateComparisonModifier: &'static NSRuleEditorPredicatePartKey; + pub static NSRuleEditorPredicateComparisonModifier: &'static NSRuleEditorPredicatePartKey; } extern "C" { - static NSRuleEditorPredicateOptions: &'static NSRuleEditorPredicatePartKey; + pub static NSRuleEditorPredicateOptions: &'static NSRuleEditorPredicatePartKey; } extern "C" { - static NSRuleEditorPredicateOperatorType: &'static NSRuleEditorPredicatePartKey; + pub static NSRuleEditorPredicateOperatorType: &'static NSRuleEditorPredicatePartKey; } extern "C" { - static NSRuleEditorPredicateCustomSelector: &'static NSRuleEditorPredicatePartKey; + pub static NSRuleEditorPredicateCustomSelector: &'static NSRuleEditorPredicatePartKey; } extern "C" { - static NSRuleEditorPredicateCompoundType: &'static NSRuleEditorPredicatePartKey; + pub static NSRuleEditorPredicateCompoundType: &'static NSRuleEditorPredicatePartKey; } pub type NSRuleEditorNestingMode = NSUInteger; @@ -213,5 +213,5 @@ extern_methods!( pub type NSRuleEditorDelegate = NSObject; extern "C" { - static NSRuleEditorRowsDidChangeNotification: &'static NSNotificationName; + pub static NSRuleEditorRowsDidChangeNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs index b0270daac..40cf882f9 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerView.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -11,19 +11,19 @@ pub const NSVerticalRuler: NSRulerOrientation = 1; pub type NSRulerViewUnitName = NSString; extern "C" { - static NSRulerViewUnitInches: &'static NSRulerViewUnitName; + pub static NSRulerViewUnitInches: &'static NSRulerViewUnitName; } extern "C" { - static NSRulerViewUnitCentimeters: &'static NSRulerViewUnitName; + pub static NSRulerViewUnitCentimeters: &'static NSRulerViewUnitName; } extern "C" { - static NSRulerViewUnitPoints: &'static NSRulerViewUnitName; + pub static NSRulerViewUnitPoints: &'static NSRulerViewUnitName; } extern "C" { - static NSRulerViewUnitPicas: &'static NSRulerViewUnitName; + pub static NSRulerViewUnitPicas: &'static NSRulerViewUnitName; } extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSScreen.rs b/crates/icrate/src/generated/AppKit/NSScreen.rs index d319d4369..3326d4227 100644 --- a/crates/icrate/src/generated/AppKit/NSScreen.rs +++ b/crates/icrate/src/generated/AppKit/NSScreen.rs @@ -81,7 +81,7 @@ extern_methods!( ); extern "C" { - static NSScreenColorSpaceDidChangeNotification: &'static NSNotificationName; + pub static NSScreenColorSpaceDidChangeNotification: &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index b3de59322..e889dc77f 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -285,23 +285,23 @@ extern_methods!( ); extern "C" { - static NSScrollViewWillStartLiveMagnifyNotification: &'static NSNotificationName; + pub static NSScrollViewWillStartLiveMagnifyNotification: &'static NSNotificationName; } extern "C" { - static NSScrollViewDidEndLiveMagnifyNotification: &'static NSNotificationName; + pub static NSScrollViewDidEndLiveMagnifyNotification: &'static NSNotificationName; } extern "C" { - static NSScrollViewWillStartLiveScrollNotification: &'static NSNotificationName; + pub static NSScrollViewWillStartLiveScrollNotification: &'static NSNotificationName; } extern "C" { - static NSScrollViewDidLiveScrollNotification: &'static NSNotificationName; + pub static NSScrollViewDidLiveScrollNotification: &'static NSNotificationName; } extern "C" { - static NSScrollViewDidEndLiveScrollNotification: &'static NSNotificationName; + pub static NSScrollViewDidEndLiveScrollNotification: &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSScroller.rs b/crates/icrate/src/generated/AppKit/NSScroller.rs index a4ffc2d8b..7d024890e 100644 --- a/crates/icrate/src/generated/AppKit/NSScroller.rs +++ b/crates/icrate/src/generated/AppKit/NSScroller.rs @@ -101,7 +101,7 @@ extern_methods!( ); extern "C" { - static NSPreferredScrollerStyleDidChangeNotification: &'static NSNotificationName; + pub static NSPreferredScrollerStyleDidChangeNotification: &'static NSNotificationName; } pub type NSScrollArrowPosition = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs index 73b817968..268cc9dcb 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs @@ -4,13 +4,13 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -static NSSearchFieldRecentsTitleMenuItemTag: NSInteger = 1000; +pub static NSSearchFieldRecentsTitleMenuItemTag: NSInteger = 1000; -static NSSearchFieldRecentsMenuItemTag: NSInteger = 1001; +pub static NSSearchFieldRecentsMenuItemTag: NSInteger = 1001; -static NSSearchFieldClearRecentsMenuItemTag: NSInteger = 1002; +pub static NSSearchFieldClearRecentsMenuItemTag: NSInteger = 1002; -static NSSearchFieldNoRecentsMenuItemTag: NSInteger = 1003; +pub static NSSearchFieldNoRecentsMenuItemTag: NSInteger = 1003; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index d6f8517e3..9bf6bc615 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -7,83 +7,83 @@ use crate::Foundation::*; pub type NSSharingServiceName = NSString; extern "C" { - static NSSharingServiceNameComposeEmail: &'static NSSharingServiceName; + pub static NSSharingServiceNameComposeEmail: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNameComposeMessage: &'static NSSharingServiceName; + pub static NSSharingServiceNameComposeMessage: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNameSendViaAirDrop: &'static NSSharingServiceName; + pub static NSSharingServiceNameSendViaAirDrop: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNameAddToSafariReadingList: &'static NSSharingServiceName; + pub static NSSharingServiceNameAddToSafariReadingList: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNameAddToIPhoto: &'static NSSharingServiceName; + pub static NSSharingServiceNameAddToIPhoto: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNameAddToAperture: &'static NSSharingServiceName; + pub static NSSharingServiceNameAddToAperture: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNameUseAsDesktopPicture: &'static NSSharingServiceName; + pub static NSSharingServiceNameUseAsDesktopPicture: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNamePostOnFacebook: &'static NSSharingServiceName; + pub static NSSharingServiceNamePostOnFacebook: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNamePostOnTwitter: &'static NSSharingServiceName; + pub static NSSharingServiceNamePostOnTwitter: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNamePostOnSinaWeibo: &'static NSSharingServiceName; + pub static NSSharingServiceNamePostOnSinaWeibo: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNamePostOnTencentWeibo: &'static NSSharingServiceName; + pub static NSSharingServiceNamePostOnTencentWeibo: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNamePostOnLinkedIn: &'static NSSharingServiceName; + pub static NSSharingServiceNamePostOnLinkedIn: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNameUseAsTwitterProfileImage: &'static NSSharingServiceName; + pub static NSSharingServiceNameUseAsTwitterProfileImage: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNameUseAsFacebookProfileImage: &'static NSSharingServiceName; + pub static NSSharingServiceNameUseAsFacebookProfileImage: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNameUseAsLinkedInProfileImage: &'static NSSharingServiceName; + pub static NSSharingServiceNameUseAsLinkedInProfileImage: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNamePostImageOnFlickr: &'static NSSharingServiceName; + pub static NSSharingServiceNamePostImageOnFlickr: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNamePostVideoOnVimeo: &'static NSSharingServiceName; + pub static NSSharingServiceNamePostVideoOnVimeo: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNamePostVideoOnYouku: &'static NSSharingServiceName; + pub static NSSharingServiceNamePostVideoOnYouku: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNamePostVideoOnTudou: &'static NSSharingServiceName; + pub static NSSharingServiceNamePostVideoOnTudou: &'static NSSharingServiceName; } extern "C" { - static NSSharingServiceNameCloudSharing: &'static NSSharingServiceName; + pub static NSSharingServiceNameCloudSharing: &'static NSSharingServiceName; } extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index a1a4227e0..2cc87c320 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -165,14 +165,14 @@ extern_methods!( } ); -static NSTickMarkBelow: NSTickMarkPosition = NSTickMarkPositionBelow; +pub static NSTickMarkBelow: NSTickMarkPosition = NSTickMarkPositionBelow; -static NSTickMarkAbove: NSTickMarkPosition = NSTickMarkPositionAbove; +pub static NSTickMarkAbove: NSTickMarkPosition = NSTickMarkPositionAbove; -static NSTickMarkLeft: NSTickMarkPosition = NSTickMarkPositionLeading; +pub static NSTickMarkLeft: NSTickMarkPosition = NSTickMarkPositionLeading; -static NSTickMarkRight: NSTickMarkPosition = NSTickMarkPositionTrailing; +pub static NSTickMarkRight: NSTickMarkPosition = NSTickMarkPositionTrailing; -static NSLinearSlider: NSSliderType = NSSliderTypeLinear; +pub static NSLinearSlider: NSSliderType = NSSliderTypeLinear; -static NSCircularSlider: NSSliderType = NSSliderTypeCircular; +pub static NSCircularSlider: NSSliderType = NSSliderTypeCircular; diff --git a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs index 95f8f57ef..8ed149b11 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs @@ -7,11 +7,11 @@ use crate::Foundation::*; pub type NSSliderAccessoryWidth = CGFloat; extern "C" { - static NSSliderAccessoryWidthDefault: NSSliderAccessoryWidth; + pub static NSSliderAccessoryWidthDefault: NSSliderAccessoryWidth; } extern "C" { - static NSSliderAccessoryWidthWide: NSSliderAccessoryWidth; + pub static NSSliderAccessoryWidthWide: NSSliderAccessoryWidth; } extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs index c270bbb8b..13292f63a 100644 --- a/crates/icrate/src/generated/AppKit/NSSound.rs +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -5,7 +5,7 @@ use crate::AppKit::*; use crate::Foundation::*; extern "C" { - static NSSoundPboardType: &'static NSPasteboardType; + pub static NSSoundPboardType: &'static NSPasteboardType; } pub type NSSoundName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index 1f9ed2664..7c65f83f0 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -9,149 +9,149 @@ pub type NSSpeechSynthesizerVoiceName = NSString; pub type NSVoiceAttributeKey = NSString; extern "C" { - static NSVoiceName: &'static NSVoiceAttributeKey; + pub static NSVoiceName: &'static NSVoiceAttributeKey; } extern "C" { - static NSVoiceIdentifier: &'static NSVoiceAttributeKey; + pub static NSVoiceIdentifier: &'static NSVoiceAttributeKey; } extern "C" { - static NSVoiceAge: &'static NSVoiceAttributeKey; + pub static NSVoiceAge: &'static NSVoiceAttributeKey; } extern "C" { - static NSVoiceGender: &'static NSVoiceAttributeKey; + pub static NSVoiceGender: &'static NSVoiceAttributeKey; } extern "C" { - static NSVoiceDemoText: &'static NSVoiceAttributeKey; + pub static NSVoiceDemoText: &'static NSVoiceAttributeKey; } extern "C" { - static NSVoiceLocaleIdentifier: &'static NSVoiceAttributeKey; + pub static NSVoiceLocaleIdentifier: &'static NSVoiceAttributeKey; } extern "C" { - static NSVoiceSupportedCharacters: &'static NSVoiceAttributeKey; + pub static NSVoiceSupportedCharacters: &'static NSVoiceAttributeKey; } extern "C" { - static NSVoiceIndividuallySpokenCharacters: &'static NSVoiceAttributeKey; + pub static NSVoiceIndividuallySpokenCharacters: &'static NSVoiceAttributeKey; } pub type NSSpeechDictionaryKey = NSString; extern "C" { - static NSSpeechDictionaryLocaleIdentifier: &'static NSSpeechDictionaryKey; + pub static NSSpeechDictionaryLocaleIdentifier: &'static NSSpeechDictionaryKey; } extern "C" { - static NSSpeechDictionaryModificationDate: &'static NSSpeechDictionaryKey; + pub static NSSpeechDictionaryModificationDate: &'static NSSpeechDictionaryKey; } extern "C" { - static NSSpeechDictionaryPronunciations: &'static NSSpeechDictionaryKey; + pub static NSSpeechDictionaryPronunciations: &'static NSSpeechDictionaryKey; } extern "C" { - static NSSpeechDictionaryAbbreviations: &'static NSSpeechDictionaryKey; + pub static NSSpeechDictionaryAbbreviations: &'static NSSpeechDictionaryKey; } extern "C" { - static NSSpeechDictionaryEntrySpelling: &'static NSSpeechDictionaryKey; + pub static NSSpeechDictionaryEntrySpelling: &'static NSSpeechDictionaryKey; } extern "C" { - static NSSpeechDictionaryEntryPhonemes: &'static NSSpeechDictionaryKey; + pub static NSSpeechDictionaryEntryPhonemes: &'static NSSpeechDictionaryKey; } pub type NSVoiceGenderName = NSString; extern "C" { - static NSVoiceGenderNeuter: &'static NSVoiceGenderName; + pub static NSVoiceGenderNeuter: &'static NSVoiceGenderName; } extern "C" { - static NSVoiceGenderMale: &'static NSVoiceGenderName; + pub static NSVoiceGenderMale: &'static NSVoiceGenderName; } extern "C" { - static NSVoiceGenderFemale: &'static NSVoiceGenderName; + pub static NSVoiceGenderFemale: &'static NSVoiceGenderName; } extern "C" { - static NSVoiceGenderNeutral: &'static NSVoiceGenderName; + pub static NSVoiceGenderNeutral: &'static NSVoiceGenderName; } pub type NSSpeechPropertyKey = NSString; extern "C" { - static NSSpeechStatusProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechStatusProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechErrorsProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechErrorsProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechInputModeProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechInputModeProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechCharacterModeProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechCharacterModeProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechNumberModeProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechNumberModeProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechRateProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechRateProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechPitchBaseProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechPitchBaseProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechPitchModProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechPitchModProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechVolumeProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechVolumeProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechSynthesizerInfoProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechSynthesizerInfoProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechRecentSyncProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechRecentSyncProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechPhonemeSymbolsProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechPhonemeSymbolsProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechCurrentVoiceProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechCurrentVoiceProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechCommandDelimiterProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechCommandDelimiterProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechResetProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechResetProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSSpeechOutputToFileURLProperty: &'static NSSpeechPropertyKey; + pub static NSSpeechOutputToFileURLProperty: &'static NSSpeechPropertyKey; } extern "C" { - static NSVoiceLanguage: &'static NSVoiceAttributeKey; + pub static NSVoiceLanguage: &'static NSVoiceAttributeKey; } pub type NSSpeechBoundary = NSUInteger; @@ -270,99 +270,99 @@ pub type NSSpeechSynthesizerDelegate = NSObject; pub type NSSpeechMode = NSString; extern "C" { - static NSSpeechModeText: &'static NSSpeechMode; + pub static NSSpeechModeText: &'static NSSpeechMode; } extern "C" { - static NSSpeechModePhoneme: &'static NSSpeechMode; + pub static NSSpeechModePhoneme: &'static NSSpeechMode; } extern "C" { - static NSSpeechModeNormal: &'static NSSpeechMode; + pub static NSSpeechModeNormal: &'static NSSpeechMode; } extern "C" { - static NSSpeechModeLiteral: &'static NSSpeechMode; + pub static NSSpeechModeLiteral: &'static NSSpeechMode; } pub type NSSpeechStatusKey = NSString; extern "C" { - static NSSpeechStatusOutputBusy: &'static NSSpeechStatusKey; + pub static NSSpeechStatusOutputBusy: &'static NSSpeechStatusKey; } extern "C" { - static NSSpeechStatusOutputPaused: &'static NSSpeechStatusKey; + pub static NSSpeechStatusOutputPaused: &'static NSSpeechStatusKey; } extern "C" { - static NSSpeechStatusNumberOfCharactersLeft: &'static NSSpeechStatusKey; + pub static NSSpeechStatusNumberOfCharactersLeft: &'static NSSpeechStatusKey; } extern "C" { - static NSSpeechStatusPhonemeCode: &'static NSSpeechStatusKey; + pub static NSSpeechStatusPhonemeCode: &'static NSSpeechStatusKey; } pub type NSSpeechErrorKey = NSString; extern "C" { - static NSSpeechErrorCount: &'static NSSpeechErrorKey; + pub static NSSpeechErrorCount: &'static NSSpeechErrorKey; } extern "C" { - static NSSpeechErrorOldestCode: &'static NSSpeechErrorKey; + pub static NSSpeechErrorOldestCode: &'static NSSpeechErrorKey; } extern "C" { - static NSSpeechErrorOldestCharacterOffset: &'static NSSpeechErrorKey; + pub static NSSpeechErrorOldestCharacterOffset: &'static NSSpeechErrorKey; } extern "C" { - static NSSpeechErrorNewestCode: &'static NSSpeechErrorKey; + pub static NSSpeechErrorNewestCode: &'static NSSpeechErrorKey; } extern "C" { - static NSSpeechErrorNewestCharacterOffset: &'static NSSpeechErrorKey; + pub static NSSpeechErrorNewestCharacterOffset: &'static NSSpeechErrorKey; } pub type NSSpeechSynthesizerInfoKey = NSString; extern "C" { - static NSSpeechSynthesizerInfoIdentifier: &'static NSSpeechSynthesizerInfoKey; + pub static NSSpeechSynthesizerInfoIdentifier: &'static NSSpeechSynthesizerInfoKey; } extern "C" { - static NSSpeechSynthesizerInfoVersion: &'static NSSpeechSynthesizerInfoKey; + pub static NSSpeechSynthesizerInfoVersion: &'static NSSpeechSynthesizerInfoKey; } pub type NSSpeechPhonemeInfoKey = NSString; extern "C" { - static NSSpeechPhonemeInfoOpcode: &'static NSSpeechPhonemeInfoKey; + pub static NSSpeechPhonemeInfoOpcode: &'static NSSpeechPhonemeInfoKey; } extern "C" { - static NSSpeechPhonemeInfoSymbol: &'static NSSpeechPhonemeInfoKey; + pub static NSSpeechPhonemeInfoSymbol: &'static NSSpeechPhonemeInfoKey; } extern "C" { - static NSSpeechPhonemeInfoExample: &'static NSSpeechPhonemeInfoKey; + pub static NSSpeechPhonemeInfoExample: &'static NSSpeechPhonemeInfoKey; } extern "C" { - static NSSpeechPhonemeInfoHiliteStart: &'static NSSpeechPhonemeInfoKey; + pub static NSSpeechPhonemeInfoHiliteStart: &'static NSSpeechPhonemeInfoKey; } extern "C" { - static NSSpeechPhonemeInfoHiliteEnd: &'static NSSpeechPhonemeInfoKey; + pub static NSSpeechPhonemeInfoHiliteEnd: &'static NSSpeechPhonemeInfoKey; } pub type NSSpeechCommandDelimiterKey = NSString; extern "C" { - static NSSpeechCommandPrefix: &'static NSSpeechCommandDelimiterKey; + pub static NSSpeechCommandPrefix: &'static NSSpeechCommandDelimiterKey; } extern "C" { - static NSSpeechCommandSuffix: &'static NSSpeechCommandDelimiterKey; + pub static NSSpeechCommandSuffix: &'static NSSpeechCommandDelimiterKey; } diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index 1cafd8950..f68a30b89 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -7,43 +7,43 @@ use crate::Foundation::*; pub type NSTextCheckingOptionKey = NSString; extern "C" { - static NSTextCheckingOrthographyKey: &'static NSTextCheckingOptionKey; + pub static NSTextCheckingOrthographyKey: &'static NSTextCheckingOptionKey; } extern "C" { - static NSTextCheckingQuotesKey: &'static NSTextCheckingOptionKey; + pub static NSTextCheckingQuotesKey: &'static NSTextCheckingOptionKey; } extern "C" { - static NSTextCheckingReplacementsKey: &'static NSTextCheckingOptionKey; + pub static NSTextCheckingReplacementsKey: &'static NSTextCheckingOptionKey; } extern "C" { - static NSTextCheckingReferenceDateKey: &'static NSTextCheckingOptionKey; + pub static NSTextCheckingReferenceDateKey: &'static NSTextCheckingOptionKey; } extern "C" { - static NSTextCheckingReferenceTimeZoneKey: &'static NSTextCheckingOptionKey; + pub static NSTextCheckingReferenceTimeZoneKey: &'static NSTextCheckingOptionKey; } extern "C" { - static NSTextCheckingDocumentURLKey: &'static NSTextCheckingOptionKey; + pub static NSTextCheckingDocumentURLKey: &'static NSTextCheckingOptionKey; } extern "C" { - static NSTextCheckingDocumentTitleKey: &'static NSTextCheckingOptionKey; + pub static NSTextCheckingDocumentTitleKey: &'static NSTextCheckingOptionKey; } extern "C" { - static NSTextCheckingDocumentAuthorKey: &'static NSTextCheckingOptionKey; + pub static NSTextCheckingDocumentAuthorKey: &'static NSTextCheckingOptionKey; } extern "C" { - static NSTextCheckingRegularExpressionsKey: &'static NSTextCheckingOptionKey; + pub static NSTextCheckingRegularExpressionsKey: &'static NSTextCheckingOptionKey; } extern "C" { - static NSTextCheckingSelectedRangeKey: &'static NSTextCheckingOptionKey; + pub static NSTextCheckingSelectedRangeKey: &'static NSTextCheckingOptionKey; } pub type NSCorrectionResponse = NSInteger; @@ -360,35 +360,38 @@ extern_methods!( ); extern "C" { - static NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification: + pub static NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification: &'static NSNotificationName; } extern "C" { - static NSSpellCheckerDidChangeAutomaticTextReplacementNotification: &'static NSNotificationName; + pub static NSSpellCheckerDidChangeAutomaticTextReplacementNotification: + &'static NSNotificationName; } extern "C" { - static NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification: + pub static NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification: &'static NSNotificationName; } extern "C" { - static NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification: + pub static NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification: &'static NSNotificationName; } extern "C" { - static NSSpellCheckerDidChangeAutomaticCapitalizationNotification: &'static NSNotificationName; + pub static NSSpellCheckerDidChangeAutomaticCapitalizationNotification: + &'static NSNotificationName; } extern "C" { - static NSSpellCheckerDidChangeAutomaticPeriodSubstitutionNotification: + pub static NSSpellCheckerDidChangeAutomaticPeriodSubstitutionNotification: &'static NSNotificationName; } extern "C" { - static NSSpellCheckerDidChangeAutomaticTextCompletionNotification: &'static NSNotificationName; + pub static NSSpellCheckerDidChangeAutomaticTextCompletionNotification: + &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs index dd81b7c06..05f87e8a8 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitView.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -121,11 +121,11 @@ extern_methods!( pub type NSSplitViewDelegate = NSObject; extern "C" { - static NSSplitViewWillResizeSubviewsNotification: &'static NSNotificationName; + pub static NSSplitViewWillResizeSubviewsNotification: &'static NSNotificationName; } extern "C" { - static NSSplitViewDidResizeSubviewsNotification: &'static NSNotificationName; + pub static NSSplitViewDidResizeSubviewsNotification: &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs index 8908041b8..a6611cfa7 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs @@ -5,7 +5,7 @@ use crate::AppKit::*; use crate::Foundation::*; extern "C" { - static NSSplitViewControllerAutomaticDimension: CGFloat; + pub static NSSplitViewControllerAutomaticDimension: CGFloat; } extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs index c0f4c01ea..5e44fcecc 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs @@ -18,7 +18,7 @@ pub const NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitVie pub const NSSplitViewItemCollapseBehaviorUseConstraints: NSSplitViewItemCollapseBehavior = 3; extern "C" { - static NSSplitViewItemUnspecifiedDimension: CGFloat; + pub static NSSplitViewItemUnspecifiedDimension: CGFloat; } extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index 77611c1e7..0cb8b4ae4 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -19,13 +19,13 @@ pub const NSStackViewDistributionFillProportionally: NSStackViewDistribution = 2 pub const NSStackViewDistributionEqualSpacing: NSStackViewDistribution = 3; pub const NSStackViewDistributionEqualCentering: NSStackViewDistribution = 4; -static NSStackViewVisibilityPriorityMustHold: NSStackViewVisibilityPriority = 1000; +pub static NSStackViewVisibilityPriorityMustHold: NSStackViewVisibilityPriority = 1000; -static NSStackViewVisibilityPriorityDetachOnlyIfNecessary: NSStackViewVisibilityPriority = 900; +pub static NSStackViewVisibilityPriorityDetachOnlyIfNecessary: NSStackViewVisibilityPriority = 900; -static NSStackViewVisibilityPriorityNotVisible: NSStackViewVisibilityPriority = 0; +pub static NSStackViewVisibilityPriorityNotVisible: NSStackViewVisibilityPriority = 0; -static NSStackViewSpacingUseDefault: CGFloat = todo; +pub static NSStackViewSpacingUseDefault: CGFloat = todo; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStatusBar.rs b/crates/icrate/src/generated/AppKit/NSStatusBar.rs index d73197a86..bc0c339b7 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBar.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBar.rs @@ -4,9 +4,9 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -static NSVariableStatusItemLength: CGFloat = -1.0; +pub static NSVariableStatusItemLength: CGFloat = -1.0; -static NSSquareStatusItemLength: CGFloat = -2.0; +pub static NSSquareStatusItemLength: CGFloat = -2.0; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs index f2c7433bb..746824ae0 100644 --- a/crates/icrate/src/generated/AppKit/NSTabView.rs +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -static NSAppKitVersionNumberWithDirectionalTabs: NSAppKitVersion = 631.0; +pub static NSAppKitVersionNumberWithDirectionalTabs: NSAppKitVersion = 631.0; pub type NSTabViewType = NSUInteger; pub const NSTopTabsBezelBorder: NSTabViewType = 0; diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index 30c1e4b0b..c24873c5d 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -604,23 +604,23 @@ extern_methods!( pub type NSTableViewDelegate = NSObject; extern "C" { - static NSTableViewSelectionDidChangeNotification: &'static NSNotificationName; + pub static NSTableViewSelectionDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSTableViewColumnDidMoveNotification: &'static NSNotificationName; + pub static NSTableViewColumnDidMoveNotification: &'static NSNotificationName; } extern "C" { - static NSTableViewColumnDidResizeNotification: &'static NSNotificationName; + pub static NSTableViewColumnDidResizeNotification: &'static NSNotificationName; } extern "C" { - static NSTableViewSelectionIsChangingNotification: &'static NSNotificationName; + pub static NSTableViewSelectionIsChangingNotification: &'static NSNotificationName; } extern "C" { - static NSTableViewRowViewKey: &'static NSUserInterfaceItemIdentifier; + pub static NSTableViewRowViewKey: &'static NSUserInterfaceItemIdentifier; } pub type NSTableViewDataSource = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index 9d96ebec0..ac13bec0d 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -268,19 +268,19 @@ pub const NSTextMovementCancel: NSTextMovement = 0x17; pub const NSTextMovementOther: NSTextMovement = 0; extern "C" { - static NSTextDidBeginEditingNotification: &'static NSNotificationName; + pub static NSTextDidBeginEditingNotification: &'static NSNotificationName; } extern "C" { - static NSTextDidEndEditingNotification: &'static NSNotificationName; + pub static NSTextDidEndEditingNotification: &'static NSNotificationName; } extern "C" { - static NSTextDidChangeNotification: &'static NSNotificationName; + pub static NSTextDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSTextMovementUserInfoKey: &'static NSString; + pub static NSTextMovementUserInfoKey: &'static NSString; } pub const NSIllegalTextMovement: i32 = 0; @@ -299,12 +299,12 @@ pub type NSTextDelegate = NSObject; pub const NSTextWritingDirectionEmbedding: i32 = 0 << 1; pub const NSTextWritingDirectionOverride: i32 = 1 << 1; -static NSLeftTextAlignment: NSTextAlignment = NSTextAlignmentLeft; +pub static NSLeftTextAlignment: NSTextAlignment = NSTextAlignmentLeft; -static NSRightTextAlignment: NSTextAlignment = NSTextAlignmentRight; +pub static NSRightTextAlignment: NSTextAlignment = NSTextAlignmentRight; -static NSCenterTextAlignment: NSTextAlignment = NSTextAlignmentCenter; +pub static NSCenterTextAlignment: NSTextAlignment = NSTextAlignmentCenter; -static NSJustifiedTextAlignment: NSTextAlignment = NSTextAlignmentJustified; +pub static NSJustifiedTextAlignment: NSTextAlignment = NSTextAlignmentJustified; -static NSNaturalTextAlignment: NSTextAlignment = NSTextAlignmentNatural; +pub static NSNaturalTextAlignment: NSTextAlignment = NSTextAlignmentNatural; diff --git a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs index ec5942dd3..269d50af8 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs @@ -34,5 +34,5 @@ extern_methods!( ); extern "C" { - static NSTextAlternativesSelectedAlternativeStringNotification: &'static NSNotificationName; + pub static NSTextAlternativesSelectedAlternativeStringNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSTextContent.rs b/crates/icrate/src/generated/AppKit/NSTextContent.rs index 267768ca8..372df8a0f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContent.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContent.rs @@ -7,15 +7,15 @@ use crate::Foundation::*; pub type NSTextContentType = NSString; extern "C" { - static NSTextContentTypeUsername: &'static NSTextContentType; + pub static NSTextContentTypeUsername: &'static NSTextContentType; } extern "C" { - static NSTextContentTypePassword: &'static NSTextContentType; + pub static NSTextContentTypePassword: &'static NSTextContentType; } extern "C" { - static NSTextContentTypeOneTimeCode: &'static NSTextContentType; + pub static NSTextContentTypeOneTimeCode: &'static NSTextContentType; } pub type NSTextContent = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index d722d650a..d4aa32509 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -157,5 +157,6 @@ extern_methods!( ); extern "C" { - static NSTextContentStorageUnsupportedAttributeAddedNotification: &'static NSNotificationName; + pub static NSTextContentStorageUnsupportedAttributeAddedNotification: + &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index 9dbafe30c..d2e08590c 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -22,11 +22,11 @@ pub const NSTextFinderActionHideReplaceInterface: NSTextFinderAction = 13; pub type NSPasteboardTypeTextFinderOptionKey = NSString; extern "C" { - static NSTextFinderCaseInsensitiveKey: &'static NSPasteboardTypeTextFinderOptionKey; + pub static NSTextFinderCaseInsensitiveKey: &'static NSPasteboardTypeTextFinderOptionKey; } extern "C" { - static NSTextFinderMatchingTypeKey: &'static NSPasteboardTypeTextFinderOptionKey; + pub static NSTextFinderMatchingTypeKey: &'static NSPasteboardTypeTextFinderOptionKey; } pub type NSTextFinderMatchingType = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs index 3e63482de..c0bad98ca 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs @@ -83,5 +83,6 @@ extern_methods!( ); extern "C" { - static NSTextInputContextKeyboardSelectionDidChangeNotification: &'static NSNotificationName; + pub static NSTextInputContextKeyboardSelectionDidChangeNotification: + &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index b02640dbe..0f8e5ed8c 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -7,71 +7,71 @@ use crate::Foundation::*; pub type NSTextListMarkerFormat = NSString; extern "C" { - static NSTextListMarkerBox: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerBox: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerCheck: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerCheck: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerCircle: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerCircle: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerDiamond: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerDiamond: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerDisc: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerDisc: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerHyphen: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerHyphen: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerSquare: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerSquare: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerLowercaseHexadecimal: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerLowercaseHexadecimal: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerUppercaseHexadecimal: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerUppercaseHexadecimal: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerOctal: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerOctal: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerLowercaseAlpha: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerLowercaseAlpha: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerUppercaseAlpha: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerUppercaseAlpha: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerLowercaseLatin: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerLowercaseLatin: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerUppercaseLatin: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerUppercaseLatin: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerLowercaseRoman: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerLowercaseRoman: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerUppercaseRoman: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerUppercaseRoman: &'static NSTextListMarkerFormat; } extern "C" { - static NSTextListMarkerDecimal: &'static NSTextListMarkerFormat; + pub static NSTextListMarkerDecimal: &'static NSTextListMarkerFormat; } pub type NSTextListOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index 4036bcde3..88e254c4b 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -77,11 +77,11 @@ extern_methods!( pub type NSTextStorageDelegate = NSObject; extern "C" { - static NSTextStorageWillProcessEditingNotification: &'static NSNotificationName; + pub static NSTextStorageWillProcessEditingNotification: &'static NSNotificationName; } extern "C" { - static NSTextStorageDidProcessEditingNotification: &'static NSNotificationName; + pub static NSTextStorageDidProcessEditingNotification: &'static NSNotificationName; } pub type NSTextStorageObserving = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index 50d591b7a..e2c614714 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -14,7 +14,7 @@ pub const NSSelectionAffinityUpstream: NSSelectionAffinity = 0; pub const NSSelectionAffinityDownstream: NSSelectionAffinity = 1; extern "C" { - static NSAllRomanInputSourcesLocaleIdentifier: &'static NSString; + pub static NSAllRomanInputSourcesLocaleIdentifier: &'static NSString; } extern_class!( @@ -945,47 +945,47 @@ extern_methods!( pub type NSTextViewDelegate = NSObject; extern "C" { - static NSTouchBarItemIdentifierCharacterPicker: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierCharacterPicker: &'static NSTouchBarItemIdentifier; } extern "C" { - static NSTouchBarItemIdentifierTextColorPicker: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierTextColorPicker: &'static NSTouchBarItemIdentifier; } extern "C" { - static NSTouchBarItemIdentifierTextStyle: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierTextStyle: &'static NSTouchBarItemIdentifier; } extern "C" { - static NSTouchBarItemIdentifierTextAlignment: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierTextAlignment: &'static NSTouchBarItemIdentifier; } extern "C" { - static NSTouchBarItemIdentifierTextList: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierTextList: &'static NSTouchBarItemIdentifier; } extern "C" { - static NSTouchBarItemIdentifierTextFormat: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierTextFormat: &'static NSTouchBarItemIdentifier; } extern "C" { - static NSTextViewWillChangeNotifyingTextViewNotification: &'static NSNotificationName; + pub static NSTextViewWillChangeNotifyingTextViewNotification: &'static NSNotificationName; } extern "C" { - static NSTextViewDidChangeSelectionNotification: &'static NSNotificationName; + pub static NSTextViewDidChangeSelectionNotification: &'static NSNotificationName; } extern "C" { - static NSTextViewDidChangeTypingAttributesNotification: &'static NSNotificationName; + pub static NSTextViewDidChangeTypingAttributesNotification: &'static NSNotificationName; } extern "C" { - static NSTextViewWillSwitchToNSLayoutManagerNotification: &'static NSNotificationName; + pub static NSTextViewWillSwitchToNSLayoutManagerNotification: &'static NSNotificationName; } extern "C" { - static NSTextViewDidSwitchToNSLayoutManagerNotification: &'static NSNotificationName; + pub static NSTextViewDidSwitchToNSLayoutManagerNotification: &'static NSNotificationName; } pub type NSFindPanelAction = NSUInteger; @@ -1001,17 +1001,17 @@ pub const NSFindPanelActionSelectAll: NSFindPanelAction = 9; pub const NSFindPanelActionSelectAllInSelection: NSFindPanelAction = 10; extern "C" { - static NSFindPanelSearchOptionsPboardType: &'static NSPasteboardType; + pub static NSFindPanelSearchOptionsPboardType: &'static NSPasteboardType; } pub type NSPasteboardTypeFindPanelSearchOptionKey = NSString; extern "C" { - static NSFindPanelCaseInsensitiveSearch: &'static NSPasteboardTypeFindPanelSearchOptionKey; + pub static NSFindPanelCaseInsensitiveSearch: &'static NSPasteboardTypeFindPanelSearchOptionKey; } extern "C" { - static NSFindPanelSubstringMatch: &'static NSPasteboardTypeFindPanelSearchOptionKey; + pub static NSFindPanelSubstringMatch: &'static NSPasteboardTypeFindPanelSearchOptionKey; } pub type NSFindPanelSubstringMatchType = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs index 3cf468a9a..3433ccaa6 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -59,8 +59,8 @@ extern_methods!( pub type NSTokenFieldCellDelegate = NSObject; -static NSDefaultTokenStyle: NSTokenStyle = NSTokenStyleDefault; +pub static NSDefaultTokenStyle: NSTokenStyle = NSTokenStyleDefault; -static NSPlainTextTokenStyle: NSTokenStyle = NSTokenStyleNone; +pub static NSPlainTextTokenStyle: NSTokenStyle = NSTokenStyleNone; -static NSRoundedTokenStyle: NSTokenStyle = NSTokenStyleRounded; +pub static NSRoundedTokenStyle: NSTokenStyle = NSTokenStyleRounded; diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index b12a81b10..e224886d3 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -147,11 +147,11 @@ extern_methods!( pub type NSToolbarDelegate = NSObject; extern "C" { - static NSToolbarWillAddItemNotification: &'static NSNotificationName; + pub static NSToolbarWillAddItemNotification: &'static NSNotificationName; } extern "C" { - static NSToolbarDidRemoveItemNotification: &'static NSNotificationName; + pub static NSToolbarDidRemoveItemNotification: &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index a536bf5ed..5a3623719 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -6,13 +6,13 @@ use crate::Foundation::*; pub type NSToolbarItemVisibilityPriority = NSInteger; -static NSToolbarItemVisibilityPriorityStandard: NSToolbarItemVisibilityPriority = 0; +pub static NSToolbarItemVisibilityPriorityStandard: NSToolbarItemVisibilityPriority = 0; -static NSToolbarItemVisibilityPriorityLow: NSToolbarItemVisibilityPriority = -1000; +pub static NSToolbarItemVisibilityPriorityLow: NSToolbarItemVisibilityPriority = -1000; -static NSToolbarItemVisibilityPriorityHigh: NSToolbarItemVisibilityPriority = 1000; +pub static NSToolbarItemVisibilityPriorityHigh: NSToolbarItemVisibilityPriority = 1000; -static NSToolbarItemVisibilityPriorityUser: NSToolbarItemVisibilityPriority = 2000; +pub static NSToolbarItemVisibilityPriorityUser: NSToolbarItemVisibilityPriority = 2000; extern_class!( #[derive(Debug)] @@ -167,41 +167,41 @@ extern_methods!( pub type NSCloudSharingValidation = NSObject; extern "C" { - static NSToolbarSeparatorItemIdentifier: &'static NSToolbarItemIdentifier; + pub static NSToolbarSeparatorItemIdentifier: &'static NSToolbarItemIdentifier; } extern "C" { - static NSToolbarSpaceItemIdentifier: &'static NSToolbarItemIdentifier; + pub static NSToolbarSpaceItemIdentifier: &'static NSToolbarItemIdentifier; } extern "C" { - static NSToolbarFlexibleSpaceItemIdentifier: &'static NSToolbarItemIdentifier; + pub static NSToolbarFlexibleSpaceItemIdentifier: &'static NSToolbarItemIdentifier; } extern "C" { - static NSToolbarShowColorsItemIdentifier: &'static NSToolbarItemIdentifier; + pub static NSToolbarShowColorsItemIdentifier: &'static NSToolbarItemIdentifier; } extern "C" { - static NSToolbarShowFontsItemIdentifier: &'static NSToolbarItemIdentifier; + pub static NSToolbarShowFontsItemIdentifier: &'static NSToolbarItemIdentifier; } extern "C" { - static NSToolbarCustomizeToolbarItemIdentifier: &'static NSToolbarItemIdentifier; + pub static NSToolbarCustomizeToolbarItemIdentifier: &'static NSToolbarItemIdentifier; } extern "C" { - static NSToolbarPrintItemIdentifier: &'static NSToolbarItemIdentifier; + pub static NSToolbarPrintItemIdentifier: &'static NSToolbarItemIdentifier; } extern "C" { - static NSToolbarToggleSidebarItemIdentifier: &'static NSToolbarItemIdentifier; + pub static NSToolbarToggleSidebarItemIdentifier: &'static NSToolbarItemIdentifier; } extern "C" { - static NSToolbarCloudSharingItemIdentifier: &'static NSToolbarItemIdentifier; + pub static NSToolbarCloudSharingItemIdentifier: &'static NSToolbarItemIdentifier; } extern "C" { - static NSToolbarSidebarTrackingSeparatorItemIdentifier: &'static NSToolbarItemIdentifier; + pub static NSToolbarSidebarTrackingSeparatorItemIdentifier: &'static NSToolbarItemIdentifier; } diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs index 3902c8e9e..1908f9dc5 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -6,11 +6,11 @@ use crate::Foundation::*; pub type NSTouchBarItemIdentifier = NSString; -static NSTouchBarItemPriorityHigh: NSTouchBarItemPriority = 1000; +pub static NSTouchBarItemPriorityHigh: NSTouchBarItemPriority = 1000; -static NSTouchBarItemPriorityNormal: NSTouchBarItemPriority = 0; +pub static NSTouchBarItemPriorityNormal: NSTouchBarItemPriority = 0; -static NSTouchBarItemPriorityLow: NSTouchBarItemPriority = -1000; +pub static NSTouchBarItemPriorityLow: NSTouchBarItemPriority = -1000; extern_class!( #[derive(Debug)] @@ -59,17 +59,17 @@ extern_methods!( ); extern "C" { - static NSTouchBarItemIdentifierFixedSpaceSmall: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierFixedSpaceSmall: &'static NSTouchBarItemIdentifier; } extern "C" { - static NSTouchBarItemIdentifierFixedSpaceLarge: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierFixedSpaceLarge: &'static NSTouchBarItemIdentifier; } extern "C" { - static NSTouchBarItemIdentifierFlexibleSpace: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierFlexibleSpace: &'static NSTouchBarItemIdentifier; } extern "C" { - static NSTouchBarItemIdentifierOtherItemsProxy: &'static NSTouchBarItemIdentifier; + pub static NSTouchBarItemIdentifierOtherItemsProxy: &'static NSTouchBarItemIdentifier; } diff --git a/crates/icrate/src/generated/AppKit/NSUserActivity.rs b/crates/icrate/src/generated/AppKit/NSUserActivity.rs index 48593a98a..2ba45ebcc 100644 --- a/crates/icrate/src/generated/AppKit/NSUserActivity.rs +++ b/crates/icrate/src/generated/AppKit/NSUserActivity.rs @@ -35,5 +35,5 @@ extern_methods!( ); extern "C" { - static NSUserActivityDocumentURLKey: &'static NSString; + pub static NSUserActivityDocumentURLKey: &'static NSString; } diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 31e63152f..7def24b6e 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -881,19 +881,20 @@ extern_methods!( pub type NSViewFullScreenModeOptionKey = NSString; extern "C" { - static NSFullScreenModeAllScreens: &'static NSViewFullScreenModeOptionKey; + pub static NSFullScreenModeAllScreens: &'static NSViewFullScreenModeOptionKey; } extern "C" { - static NSFullScreenModeSetting: &'static NSViewFullScreenModeOptionKey; + pub static NSFullScreenModeSetting: &'static NSViewFullScreenModeOptionKey; } extern "C" { - static NSFullScreenModeWindowLevel: &'static NSViewFullScreenModeOptionKey; + pub static NSFullScreenModeWindowLevel: &'static NSViewFullScreenModeOptionKey; } extern "C" { - static NSFullScreenModeApplicationPresentationOptions: &'static NSViewFullScreenModeOptionKey; + pub static NSFullScreenModeApplicationPresentationOptions: + &'static NSViewFullScreenModeOptionKey; } extern_methods!( @@ -920,17 +921,18 @@ extern_methods!( pub type NSDefinitionOptionKey = NSString; extern "C" { - static NSDefinitionPresentationTypeKey: &'static NSDefinitionOptionKey; + pub static NSDefinitionPresentationTypeKey: &'static NSDefinitionOptionKey; } pub type NSDefinitionPresentationType = NSString; extern "C" { - static NSDefinitionPresentationTypeOverlay: &'static NSDefinitionPresentationType; + pub static NSDefinitionPresentationTypeOverlay: &'static NSDefinitionPresentationType; } extern "C" { - static NSDefinitionPresentationTypeDictionaryApplication: &'static NSDefinitionPresentationType; + pub static NSDefinitionPresentationTypeDictionaryApplication: + &'static NSDefinitionPresentationType; } extern_methods!( @@ -1089,21 +1091,21 @@ extern_methods!( ); extern "C" { - static NSViewFrameDidChangeNotification: &'static NSNotificationName; + pub static NSViewFrameDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSViewFocusDidChangeNotification: &'static NSNotificationName; + pub static NSViewFocusDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSViewBoundsDidChangeNotification: &'static NSNotificationName; + pub static NSViewBoundsDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSViewGlobalFrameDidChangeNotification: &'static NSNotificationName; + pub static NSViewGlobalFrameDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSViewDidUpdateTrackingAreasNotification: &'static NSNotificationName; + pub static NSViewDidUpdateTrackingAreasNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 4ac4f5d9f..343a5f914 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -4,9 +4,9 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -static NSAppKitVersionNumberWithCustomSheetPosition: NSAppKitVersion = 686.0; +pub static NSAppKitVersionNumberWithCustomSheetPosition: NSAppKitVersion = 686.0; -static NSAppKitVersionNumberWithDeferredWindowDisplaySupport: NSAppKitVersion = 1019.0; +pub static NSAppKitVersionNumberWithDeferredWindowDisplaySupport: NSAppKitVersion = 1019.0; pub type NSWindowStyleMask = NSUInteger; pub const NSWindowStyleMaskBorderless: NSWindowStyleMask = 0; @@ -23,9 +23,9 @@ pub const NSWindowStyleMaskDocModalWindow: NSWindowStyleMask = 1 << 6; pub const NSWindowStyleMaskNonactivatingPanel: NSWindowStyleMask = 1 << 7; pub const NSWindowStyleMaskHUDWindow: NSWindowStyleMask = 1 << 13; -static NSModalResponseOK: NSModalResponse = 1; +pub static NSModalResponseOK: NSModalResponse = 1; -static NSModalResponseCancel: NSModalResponse = 0; +pub static NSModalResponseCancel: NSModalResponse = 0; pub const NSDisplayWindowRunLoopOrdering: i32 = 600000; pub const NSResetCursorRectsRunLoopOrdering: i32 = 700000; @@ -66,23 +66,23 @@ pub const NSWindowOcclusionStateVisible: NSWindowOcclusionState = 1 << 1; pub type NSWindowLevel = NSInteger; -static NSNormalWindowLevel: NSWindowLevel = todo; +pub static NSNormalWindowLevel: NSWindowLevel = todo; -static NSFloatingWindowLevel: NSWindowLevel = todo; +pub static NSFloatingWindowLevel: NSWindowLevel = todo; -static NSSubmenuWindowLevel: NSWindowLevel = todo; +pub static NSSubmenuWindowLevel: NSWindowLevel = todo; -static NSTornOffMenuWindowLevel: NSWindowLevel = todo; +pub static NSTornOffMenuWindowLevel: NSWindowLevel = todo; -static NSMainMenuWindowLevel: NSWindowLevel = todo; +pub static NSMainMenuWindowLevel: NSWindowLevel = todo; -static NSStatusWindowLevel: NSWindowLevel = todo; +pub static NSStatusWindowLevel: NSWindowLevel = todo; -static NSModalPanelWindowLevel: NSWindowLevel = todo; +pub static NSModalPanelWindowLevel: NSWindowLevel = todo; -static NSPopUpMenuWindowLevel: NSWindowLevel = todo; +pub static NSPopUpMenuWindowLevel: NSWindowLevel = todo; -static NSScreenSaverWindowLevel: NSWindowLevel = todo; +pub static NSScreenSaverWindowLevel: NSWindowLevel = todo; pub type NSSelectionDirection = NSUInteger; pub const NSDirectSelection: NSSelectionDirection = 0; @@ -108,7 +108,7 @@ pub const NSWindowToolbarStylePreference: NSWindowToolbarStyle = 2; pub const NSWindowToolbarStyleUnified: NSWindowToolbarStyle = 3; pub const NSWindowToolbarStyleUnifiedCompact: NSWindowToolbarStyle = 4; -static NSEventDurationForever: NSTimeInterval = todo; +pub static NSEventDurationForever: NSTimeInterval = todo; pub type NSWindowUserTabbingPreference = NSInteger; pub const NSWindowUserTabbingPreferenceManual: NSWindowUserTabbingPreference = 0; @@ -1182,127 +1182,127 @@ extern_methods!( pub type NSWindowDelegate = NSObject; extern "C" { - static NSWindowDidBecomeKeyNotification: &'static NSNotificationName; + pub static NSWindowDidBecomeKeyNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidBecomeMainNotification: &'static NSNotificationName; + pub static NSWindowDidBecomeMainNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidChangeScreenNotification: &'static NSNotificationName; + pub static NSWindowDidChangeScreenNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidDeminiaturizeNotification: &'static NSNotificationName; + pub static NSWindowDidDeminiaturizeNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidExposeNotification: &'static NSNotificationName; + pub static NSWindowDidExposeNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidMiniaturizeNotification: &'static NSNotificationName; + pub static NSWindowDidMiniaturizeNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidMoveNotification: &'static NSNotificationName; + pub static NSWindowDidMoveNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidResignKeyNotification: &'static NSNotificationName; + pub static NSWindowDidResignKeyNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidResignMainNotification: &'static NSNotificationName; + pub static NSWindowDidResignMainNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidResizeNotification: &'static NSNotificationName; + pub static NSWindowDidResizeNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidUpdateNotification: &'static NSNotificationName; + pub static NSWindowDidUpdateNotification: &'static NSNotificationName; } extern "C" { - static NSWindowWillCloseNotification: &'static NSNotificationName; + pub static NSWindowWillCloseNotification: &'static NSNotificationName; } extern "C" { - static NSWindowWillMiniaturizeNotification: &'static NSNotificationName; + pub static NSWindowWillMiniaturizeNotification: &'static NSNotificationName; } extern "C" { - static NSWindowWillMoveNotification: &'static NSNotificationName; + pub static NSWindowWillMoveNotification: &'static NSNotificationName; } extern "C" { - static NSWindowWillBeginSheetNotification: &'static NSNotificationName; + pub static NSWindowWillBeginSheetNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidEndSheetNotification: &'static NSNotificationName; + pub static NSWindowDidEndSheetNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidChangeBackingPropertiesNotification: &'static NSNotificationName; + pub static NSWindowDidChangeBackingPropertiesNotification: &'static NSNotificationName; } extern "C" { - static NSBackingPropertyOldScaleFactorKey: &'static NSString; + pub static NSBackingPropertyOldScaleFactorKey: &'static NSString; } extern "C" { - static NSBackingPropertyOldColorSpaceKey: &'static NSString; + pub static NSBackingPropertyOldColorSpaceKey: &'static NSString; } extern "C" { - static NSWindowDidChangeScreenProfileNotification: &'static NSNotificationName; + pub static NSWindowDidChangeScreenProfileNotification: &'static NSNotificationName; } extern "C" { - static NSWindowWillStartLiveResizeNotification: &'static NSNotificationName; + pub static NSWindowWillStartLiveResizeNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidEndLiveResizeNotification: &'static NSNotificationName; + pub static NSWindowDidEndLiveResizeNotification: &'static NSNotificationName; } extern "C" { - static NSWindowWillEnterFullScreenNotification: &'static NSNotificationName; + pub static NSWindowWillEnterFullScreenNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidEnterFullScreenNotification: &'static NSNotificationName; + pub static NSWindowDidEnterFullScreenNotification: &'static NSNotificationName; } extern "C" { - static NSWindowWillExitFullScreenNotification: &'static NSNotificationName; + pub static NSWindowWillExitFullScreenNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidExitFullScreenNotification: &'static NSNotificationName; + pub static NSWindowDidExitFullScreenNotification: &'static NSNotificationName; } extern "C" { - static NSWindowWillEnterVersionBrowserNotification: &'static NSNotificationName; + pub static NSWindowWillEnterVersionBrowserNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidEnterVersionBrowserNotification: &'static NSNotificationName; + pub static NSWindowDidEnterVersionBrowserNotification: &'static NSNotificationName; } extern "C" { - static NSWindowWillExitVersionBrowserNotification: &'static NSNotificationName; + pub static NSWindowWillExitVersionBrowserNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidExitVersionBrowserNotification: &'static NSNotificationName; + pub static NSWindowDidExitVersionBrowserNotification: &'static NSNotificationName; } extern "C" { - static NSWindowDidChangeOcclusionStateNotification: &'static NSNotificationName; + pub static NSWindowDidChangeOcclusionStateNotification: &'static NSNotificationName; } pub type NSWindowBackingLocation = NSUInteger; @@ -1393,35 +1393,36 @@ extern_methods!( } ); -static NSBorderlessWindowMask: NSWindowStyleMask = NSWindowStyleMaskBorderless; +pub static NSBorderlessWindowMask: NSWindowStyleMask = NSWindowStyleMaskBorderless; -static NSTitledWindowMask: NSWindowStyleMask = NSWindowStyleMaskTitled; +pub static NSTitledWindowMask: NSWindowStyleMask = NSWindowStyleMaskTitled; -static NSClosableWindowMask: NSWindowStyleMask = NSWindowStyleMaskClosable; +pub static NSClosableWindowMask: NSWindowStyleMask = NSWindowStyleMaskClosable; -static NSMiniaturizableWindowMask: NSWindowStyleMask = NSWindowStyleMaskMiniaturizable; +pub static NSMiniaturizableWindowMask: NSWindowStyleMask = NSWindowStyleMaskMiniaturizable; -static NSResizableWindowMask: NSWindowStyleMask = NSWindowStyleMaskResizable; +pub static NSResizableWindowMask: NSWindowStyleMask = NSWindowStyleMaskResizable; -static NSTexturedBackgroundWindowMask: NSWindowStyleMask = NSWindowStyleMaskTexturedBackground; +pub static NSTexturedBackgroundWindowMask: NSWindowStyleMask = NSWindowStyleMaskTexturedBackground; -static NSUnifiedTitleAndToolbarWindowMask: NSWindowStyleMask = +pub static NSUnifiedTitleAndToolbarWindowMask: NSWindowStyleMask = NSWindowStyleMaskUnifiedTitleAndToolbar; -static NSFullScreenWindowMask: NSWindowStyleMask = NSWindowStyleMaskFullScreen; +pub static NSFullScreenWindowMask: NSWindowStyleMask = NSWindowStyleMaskFullScreen; -static NSFullSizeContentViewWindowMask: NSWindowStyleMask = NSWindowStyleMaskFullSizeContentView; +pub static NSFullSizeContentViewWindowMask: NSWindowStyleMask = + NSWindowStyleMaskFullSizeContentView; -static NSUtilityWindowMask: NSWindowStyleMask = NSWindowStyleMaskUtilityWindow; +pub static NSUtilityWindowMask: NSWindowStyleMask = NSWindowStyleMaskUtilityWindow; -static NSDocModalWindowMask: NSWindowStyleMask = NSWindowStyleMaskDocModalWindow; +pub static NSDocModalWindowMask: NSWindowStyleMask = NSWindowStyleMaskDocModalWindow; -static NSNonactivatingPanelMask: NSWindowStyleMask = NSWindowStyleMaskNonactivatingPanel; +pub static NSNonactivatingPanelMask: NSWindowStyleMask = NSWindowStyleMaskNonactivatingPanel; -static NSHUDWindowMask: NSWindowStyleMask = NSWindowStyleMaskHUDWindow; +pub static NSHUDWindowMask: NSWindowStyleMask = NSWindowStyleMaskHUDWindow; -static NSUnscaledWindowMask: NSWindowStyleMask = 1 << 11; +pub static NSUnscaledWindowMask: NSWindowStyleMask = 1 << 11; -static NSWindowFullScreenButton: NSWindowButton = 7; +pub static NSWindowFullScreenButton: NSWindowButton = 7; -static NSDockWindowLevel: NSWindowLevel = todo; +pub static NSDockWindowLevel: NSWindowLevel = todo; diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs index e838b9c9e..74822fe08 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -25,7 +25,7 @@ extern_methods!( ); extern "C" { - static NSApplicationDidFinishRestoringWindowsNotification: &'static NSNotificationName; + pub static NSApplicationDidFinishRestoringWindowsNotification: &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index 989907912..c9e8df66a 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -311,15 +311,15 @@ extern_methods!( pub type NSWorkspaceDesktopImageOptionKey = NSString; extern "C" { - static NSWorkspaceDesktopImageScalingKey: &'static NSWorkspaceDesktopImageOptionKey; + pub static NSWorkspaceDesktopImageScalingKey: &'static NSWorkspaceDesktopImageOptionKey; } extern "C" { - static NSWorkspaceDesktopImageAllowClippingKey: &'static NSWorkspaceDesktopImageOptionKey; + pub static NSWorkspaceDesktopImageAllowClippingKey: &'static NSWorkspaceDesktopImageOptionKey; } extern "C" { - static NSWorkspaceDesktopImageFillColorKey: &'static NSWorkspaceDesktopImageOptionKey; + pub static NSWorkspaceDesktopImageFillColorKey: &'static NSWorkspaceDesktopImageOptionKey; } extern_methods!( @@ -388,103 +388,103 @@ extern_methods!( ); extern "C" { - static NSWorkspaceApplicationKey: &'static NSString; + pub static NSWorkspaceApplicationKey: &'static NSString; } extern "C" { - static NSWorkspaceWillLaunchApplicationNotification: &'static NSNotificationName; + pub static NSWorkspaceWillLaunchApplicationNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceDidLaunchApplicationNotification: &'static NSNotificationName; + pub static NSWorkspaceDidLaunchApplicationNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceDidTerminateApplicationNotification: &'static NSNotificationName; + pub static NSWorkspaceDidTerminateApplicationNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceDidHideApplicationNotification: &'static NSNotificationName; + pub static NSWorkspaceDidHideApplicationNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceDidUnhideApplicationNotification: &'static NSNotificationName; + pub static NSWorkspaceDidUnhideApplicationNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceDidActivateApplicationNotification: &'static NSNotificationName; + pub static NSWorkspaceDidActivateApplicationNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceDidDeactivateApplicationNotification: &'static NSNotificationName; + pub static NSWorkspaceDidDeactivateApplicationNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceVolumeLocalizedNameKey: &'static NSString; + pub static NSWorkspaceVolumeLocalizedNameKey: &'static NSString; } extern "C" { - static NSWorkspaceVolumeURLKey: &'static NSString; + pub static NSWorkspaceVolumeURLKey: &'static NSString; } extern "C" { - static NSWorkspaceVolumeOldLocalizedNameKey: &'static NSString; + pub static NSWorkspaceVolumeOldLocalizedNameKey: &'static NSString; } extern "C" { - static NSWorkspaceVolumeOldURLKey: &'static NSString; + pub static NSWorkspaceVolumeOldURLKey: &'static NSString; } extern "C" { - static NSWorkspaceDidMountNotification: &'static NSNotificationName; + pub static NSWorkspaceDidMountNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceDidUnmountNotification: &'static NSNotificationName; + pub static NSWorkspaceDidUnmountNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceWillUnmountNotification: &'static NSNotificationName; + pub static NSWorkspaceWillUnmountNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceDidRenameVolumeNotification: &'static NSNotificationName; + pub static NSWorkspaceDidRenameVolumeNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceWillPowerOffNotification: &'static NSNotificationName; + pub static NSWorkspaceWillPowerOffNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceWillSleepNotification: &'static NSNotificationName; + pub static NSWorkspaceWillSleepNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceDidWakeNotification: &'static NSNotificationName; + pub static NSWorkspaceDidWakeNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceScreensDidSleepNotification: &'static NSNotificationName; + pub static NSWorkspaceScreensDidSleepNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceScreensDidWakeNotification: &'static NSNotificationName; + pub static NSWorkspaceScreensDidWakeNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceSessionDidBecomeActiveNotification: &'static NSNotificationName; + pub static NSWorkspaceSessionDidBecomeActiveNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceSessionDidResignActiveNotification: &'static NSNotificationName; + pub static NSWorkspaceSessionDidResignActiveNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceDidChangeFileLabelsNotification: &'static NSNotificationName; + pub static NSWorkspaceDidChangeFileLabelsNotification: &'static NSNotificationName; } extern "C" { - static NSWorkspaceActiveSpaceDidChangeNotification: &'static NSNotificationName; + pub static NSWorkspaceActiveSpaceDidChangeNotification: &'static NSNotificationName; } pub type NSWorkspaceFileOperationName = NSString; @@ -506,19 +506,21 @@ pub const NSWorkspaceLaunchPreferringClassic: NSWorkspaceLaunchOptions = 0x00040 pub type NSWorkspaceLaunchConfigurationKey = NSString; extern "C" { - static NSWorkspaceLaunchConfigurationAppleEvent: &'static NSWorkspaceLaunchConfigurationKey; + pub static NSWorkspaceLaunchConfigurationAppleEvent: &'static NSWorkspaceLaunchConfigurationKey; } extern "C" { - static NSWorkspaceLaunchConfigurationArguments: &'static NSWorkspaceLaunchConfigurationKey; + pub static NSWorkspaceLaunchConfigurationArguments: &'static NSWorkspaceLaunchConfigurationKey; } extern "C" { - static NSWorkspaceLaunchConfigurationEnvironment: &'static NSWorkspaceLaunchConfigurationKey; + pub static NSWorkspaceLaunchConfigurationEnvironment: + &'static NSWorkspaceLaunchConfigurationKey; } extern "C" { - static NSWorkspaceLaunchConfigurationArchitecture: &'static NSWorkspaceLaunchConfigurationKey; + pub static NSWorkspaceLaunchConfigurationArchitecture: + &'static NSWorkspaceLaunchConfigurationKey; } extern_methods!( @@ -718,65 +720,65 @@ extern_methods!( ); extern "C" { - static NSWorkspaceMoveOperation: &'static NSWorkspaceFileOperationName; + pub static NSWorkspaceMoveOperation: &'static NSWorkspaceFileOperationName; } extern "C" { - static NSWorkspaceCopyOperation: &'static NSWorkspaceFileOperationName; + pub static NSWorkspaceCopyOperation: &'static NSWorkspaceFileOperationName; } extern "C" { - static NSWorkspaceLinkOperation: &'static NSWorkspaceFileOperationName; + pub static NSWorkspaceLinkOperation: &'static NSWorkspaceFileOperationName; } extern "C" { - static NSWorkspaceCompressOperation: &'static NSWorkspaceFileOperationName; + pub static NSWorkspaceCompressOperation: &'static NSWorkspaceFileOperationName; } extern "C" { - static NSWorkspaceDecompressOperation: &'static NSWorkspaceFileOperationName; + pub static NSWorkspaceDecompressOperation: &'static NSWorkspaceFileOperationName; } extern "C" { - static NSWorkspaceEncryptOperation: &'static NSWorkspaceFileOperationName; + pub static NSWorkspaceEncryptOperation: &'static NSWorkspaceFileOperationName; } extern "C" { - static NSWorkspaceDecryptOperation: &'static NSWorkspaceFileOperationName; + pub static NSWorkspaceDecryptOperation: &'static NSWorkspaceFileOperationName; } extern "C" { - static NSWorkspaceDestroyOperation: &'static NSWorkspaceFileOperationName; + pub static NSWorkspaceDestroyOperation: &'static NSWorkspaceFileOperationName; } extern "C" { - static NSWorkspaceRecycleOperation: &'static NSWorkspaceFileOperationName; + pub static NSWorkspaceRecycleOperation: &'static NSWorkspaceFileOperationName; } extern "C" { - static NSWorkspaceDuplicateOperation: &'static NSWorkspaceFileOperationName; + pub static NSWorkspaceDuplicateOperation: &'static NSWorkspaceFileOperationName; } extern "C" { - static NSWorkspaceDidPerformFileOperationNotification: &'static NSNotificationName; + pub static NSWorkspaceDidPerformFileOperationNotification: &'static NSNotificationName; } extern "C" { - static NSPlainFileType: &'static NSString; + pub static NSPlainFileType: &'static NSString; } extern "C" { - static NSDirectoryFileType: &'static NSString; + pub static NSDirectoryFileType: &'static NSString; } extern "C" { - static NSApplicationFileType: &'static NSString; + pub static NSApplicationFileType: &'static NSString; } extern "C" { - static NSFilesystemFileType: &'static NSString; + pub static NSFilesystemFileType: &'static NSString; } extern "C" { - static NSShellCommandFileType: &'static NSString; + pub static NSShellCommandFileType: &'static NSString; } diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index e6cad4cb1..e857ca08a 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -4,15 +4,15 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSAppleEventTimeOutDefault: c_double; + pub static NSAppleEventTimeOutDefault: c_double; } extern "C" { - static NSAppleEventTimeOutNone: c_double; + pub static NSAppleEventTimeOutNone: c_double; } extern "C" { - static NSAppleEventManagerWillProcessFirstEventNotification: &'static NSNotificationName; + pub static NSAppleEventManagerWillProcessFirstEventNotification: &'static NSNotificationName; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index 67682ffca..cc182848f 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -4,23 +4,23 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSAppleScriptErrorMessage: &'static NSString; + pub static NSAppleScriptErrorMessage: &'static NSString; } extern "C" { - static NSAppleScriptErrorNumber: &'static NSString; + pub static NSAppleScriptErrorNumber: &'static NSString; } extern "C" { - static NSAppleScriptErrorAppName: &'static NSString; + pub static NSAppleScriptErrorAppName: &'static NSString; } extern "C" { - static NSAppleScriptErrorBriefMessage: &'static NSString; + pub static NSAppleScriptErrorBriefMessage: &'static NSString; } extern "C" { - static NSAppleScriptErrorRange: &'static NSString; + pub static NSAppleScriptErrorRange: &'static NSString; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index 940f05156..f6b4fb559 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -197,19 +197,19 @@ pub const NSInlinePresentationIntentInlineHTML: NSInlinePresentationIntent = 1 < pub const NSInlinePresentationIntentBlockHTML: NSInlinePresentationIntent = 1 << 9; extern "C" { - static NSInlinePresentationIntentAttributeName: &'static NSAttributedStringKey; + pub static NSInlinePresentationIntentAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSAlternateDescriptionAttributeName: &'static NSAttributedStringKey; + pub static NSAlternateDescriptionAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSImageURLAttributeName: &'static NSAttributedStringKey; + pub static NSImageURLAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSLanguageIdentifierAttributeName: &'static NSAttributedStringKey; + pub static NSLanguageIdentifierAttributeName: &'static NSAttributedStringKey; } pub type NSAttributedStringMarkdownParsingFailurePolicy = NSInteger; @@ -327,7 +327,7 @@ extern_methods!( ); extern "C" { - static NSReplacementIndexAttributeName: &'static NSAttributedStringKey; + pub static NSReplacementIndexAttributeName: &'static NSAttributedStringKey; } extern_methods!( @@ -339,19 +339,19 @@ extern_methods!( ); extern "C" { - static NSMorphologyAttributeName: &'static NSAttributedStringKey; + pub static NSMorphologyAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSInflectionRuleAttributeName: &'static NSAttributedStringKey; + pub static NSInflectionRuleAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSInflectionAlternativeAttributeName: &'static NSAttributedStringKey; + pub static NSInflectionAlternativeAttributeName: &'static NSAttributedStringKey; } extern "C" { - static NSPresentationIntentAttributeName: &'static NSAttributedStringKey; + pub static NSPresentationIntentAttributeName: &'static NSAttributedStringKey; } pub type NSPresentationIntentKind = NSInteger; diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 43228ea7b..1c0c4f91a 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -265,11 +265,11 @@ extern_methods!( ); extern "C" { - static NSBundleDidLoadNotification: &'static NSNotificationName; + pub static NSBundleDidLoadNotification: &'static NSNotificationName; } extern "C" { - static NSLoadedClasses: &'static NSString; + pub static NSLoadedClasses: &'static NSString; } extern_class!( @@ -344,9 +344,9 @@ extern_methods!( ); extern "C" { - static NSBundleResourceRequestLowDiskSpaceNotification: &'static NSNotificationName; + pub static NSBundleResourceRequestLowDiskSpaceNotification: &'static NSNotificationName; } extern "C" { - static NSBundleResourceRequestLoadingPriorityUrgent: c_double; + pub static NSBundleResourceRequestLoadingPriorityUrgent: c_double; } diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 2c6757782..70b139c07 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -6,67 +6,67 @@ use crate::Foundation::*; pub type NSCalendarIdentifier = NSString; extern "C" { - static NSCalendarIdentifierGregorian: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierGregorian: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierBuddhist: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierBuddhist: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierChinese: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierChinese: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierCoptic: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierCoptic: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierEthiopicAmeteMihret: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierEthiopicAmeteMihret: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierEthiopicAmeteAlem: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierEthiopicAmeteAlem: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierHebrew: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierHebrew: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierISO8601: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierISO8601: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierIndian: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierIndian: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierIslamic: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierIslamic: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierIslamicCivil: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierIslamicCivil: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierJapanese: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierJapanese: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierPersian: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierPersian: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierRepublicOfChina: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierRepublicOfChina: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierIslamicTabular: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierIslamicTabular: &'static NSCalendarIdentifier; } extern "C" { - static NSCalendarIdentifierIslamicUmmAlQura: &'static NSCalendarIdentifier; + pub static NSCalendarIdentifierIslamicUmmAlQura: &'static NSCalendarIdentifier; } pub type NSCalendarUnit = NSUInteger; @@ -494,7 +494,7 @@ extern_methods!( ); extern "C" { - static NSCalendarDayChangedNotification: &'static NSNotificationName; + pub static NSCalendarDayChangedNotification: &'static NSNotificationName; } pub const NSDateComponentUndefined: i32 = 9223372036854775807; diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index bde823677..5268a420e 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -69,5 +69,5 @@ extern_methods!( ); extern "C" { - static NSClassDescriptionNeededForClassNotification: &'static NSNotificationName; + pub static NSClassDescriptionNeededForClassNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 8add11cab..2cfa07d85 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -172,21 +172,21 @@ extern_methods!( ); extern "C" { - static NSConnectionReplyMode: &'static NSString; + pub static NSConnectionReplyMode: &'static NSString; } extern "C" { - static NSConnectionDidDieNotification: &'static NSString; + pub static NSConnectionDidDieNotification: &'static NSString; } pub type NSConnectionDelegate = NSObject; extern "C" { - static NSFailedAuthenticationException: &'static NSString; + pub static NSFailedAuthenticationException: &'static NSString; } extern "C" { - static NSConnectionDidInitializeNotification: &'static NSString; + pub static NSConnectionDidInitializeNotification: &'static NSString; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 9b43a6ae1..b6dd90c5a 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSSystemClockDidChangeNotification: &'static NSNotificationName; + pub static NSSystemClockDidChangeNotification: &'static NSNotificationName; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index 902318175..b0175a18e 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -4,19 +4,19 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSDecimalNumberExactnessException: &'static NSExceptionName; + pub static NSDecimalNumberExactnessException: &'static NSExceptionName; } extern "C" { - static NSDecimalNumberOverflowException: &'static NSExceptionName; + pub static NSDecimalNumberOverflowException: &'static NSExceptionName; } extern "C" { - static NSDecimalNumberUnderflowException: &'static NSExceptionName; + pub static NSDecimalNumberUnderflowException: &'static NSExceptionName; } extern "C" { - static NSDecimalNumberDivideByZeroException: &'static NSExceptionName; + pub static NSDecimalNumberDivideByZeroException: &'static NSExceptionName; } pub type NSDecimalNumberBehaviors = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 93ac76cea..4c98865af 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -6,7 +6,7 @@ use crate::Foundation::*; pub type NSDistributedNotificationCenterType = NSString; extern "C" { - static NSLocalNotificationCenterType: &'static NSDistributedNotificationCenterType; + pub static NSLocalNotificationCenterType: &'static NSDistributedNotificationCenterType; } pub type NSNotificationSuspensionBehavior = NSUInteger; @@ -19,10 +19,10 @@ pub type NSDistributedNotificationOptions = NSUInteger; pub const NSDistributedNotificationDeliverImmediately: NSDistributedNotificationOptions = 1 << 0; pub const NSDistributedNotificationPostToAllSessions: NSDistributedNotificationOptions = 1 << 1; -static NSNotificationDeliverImmediately: NSDistributedNotificationOptions = +pub static NSNotificationDeliverImmediately: NSDistributedNotificationOptions = NSDistributedNotificationDeliverImmediately; -static NSNotificationPostToAllSessions: NSDistributedNotificationOptions = +pub static NSNotificationPostToAllSessions: NSDistributedNotificationOptions = NSDistributedNotificationPostToAllSessions; extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 9c8ebeb81..08f091433 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -6,73 +6,73 @@ use crate::Foundation::*; pub type NSErrorDomain = NSString; extern "C" { - static NSCocoaErrorDomain: &'static NSErrorDomain; + pub static NSCocoaErrorDomain: &'static NSErrorDomain; } extern "C" { - static NSPOSIXErrorDomain: &'static NSErrorDomain; + pub static NSPOSIXErrorDomain: &'static NSErrorDomain; } extern "C" { - static NSOSStatusErrorDomain: &'static NSErrorDomain; + pub static NSOSStatusErrorDomain: &'static NSErrorDomain; } extern "C" { - static NSMachErrorDomain: &'static NSErrorDomain; + pub static NSMachErrorDomain: &'static NSErrorDomain; } pub type NSErrorUserInfoKey = NSString; extern "C" { - static NSUnderlyingErrorKey: &'static NSErrorUserInfoKey; + pub static NSUnderlyingErrorKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSMultipleUnderlyingErrorsKey: &'static NSErrorUserInfoKey; + pub static NSMultipleUnderlyingErrorsKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSLocalizedDescriptionKey: &'static NSErrorUserInfoKey; + pub static NSLocalizedDescriptionKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSLocalizedFailureReasonErrorKey: &'static NSErrorUserInfoKey; + pub static NSLocalizedFailureReasonErrorKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSLocalizedRecoverySuggestionErrorKey: &'static NSErrorUserInfoKey; + pub static NSLocalizedRecoverySuggestionErrorKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSLocalizedRecoveryOptionsErrorKey: &'static NSErrorUserInfoKey; + pub static NSLocalizedRecoveryOptionsErrorKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSRecoveryAttempterErrorKey: &'static NSErrorUserInfoKey; + pub static NSRecoveryAttempterErrorKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSHelpAnchorErrorKey: &'static NSErrorUserInfoKey; + pub static NSHelpAnchorErrorKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSDebugDescriptionErrorKey: &'static NSErrorUserInfoKey; + pub static NSDebugDescriptionErrorKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSLocalizedFailureErrorKey: &'static NSErrorUserInfoKey; + pub static NSLocalizedFailureErrorKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSStringEncodingErrorKey: &'static NSErrorUserInfoKey; + pub static NSStringEncodingErrorKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSURLErrorKey: &'static NSErrorUserInfoKey; + pub static NSURLErrorKey: &'static NSErrorUserInfoKey; } extern "C" { - static NSFilePathErrorKey: &'static NSErrorUserInfoKey; + pub static NSFilePathErrorKey: &'static NSErrorUserInfoKey; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 54df2f4b8..b262f3d5e 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -4,63 +4,63 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSGenericException: &'static NSExceptionName; + pub static NSGenericException: &'static NSExceptionName; } extern "C" { - static NSRangeException: &'static NSExceptionName; + pub static NSRangeException: &'static NSExceptionName; } extern "C" { - static NSInvalidArgumentException: &'static NSExceptionName; + pub static NSInvalidArgumentException: &'static NSExceptionName; } extern "C" { - static NSInternalInconsistencyException: &'static NSExceptionName; + pub static NSInternalInconsistencyException: &'static NSExceptionName; } extern "C" { - static NSMallocException: &'static NSExceptionName; + pub static NSMallocException: &'static NSExceptionName; } extern "C" { - static NSObjectInaccessibleException: &'static NSExceptionName; + pub static NSObjectInaccessibleException: &'static NSExceptionName; } extern "C" { - static NSObjectNotAvailableException: &'static NSExceptionName; + pub static NSObjectNotAvailableException: &'static NSExceptionName; } extern "C" { - static NSDestinationInvalidException: &'static NSExceptionName; + pub static NSDestinationInvalidException: &'static NSExceptionName; } extern "C" { - static NSPortTimeoutException: &'static NSExceptionName; + pub static NSPortTimeoutException: &'static NSExceptionName; } extern "C" { - static NSInvalidSendPortException: &'static NSExceptionName; + pub static NSInvalidSendPortException: &'static NSExceptionName; } extern "C" { - static NSInvalidReceivePortException: &'static NSExceptionName; + pub static NSInvalidReceivePortException: &'static NSExceptionName; } extern "C" { - static NSPortSendException: &'static NSExceptionName; + pub static NSPortSendException: &'static NSExceptionName; } extern "C" { - static NSPortReceiveException: &'static NSExceptionName; + pub static NSPortReceiveException: &'static NSExceptionName; } extern "C" { - static NSOldStyleException: &'static NSExceptionName; + pub static NSOldStyleException: &'static NSExceptionName; } extern "C" { - static NSInconsistentArchiveException: &'static NSExceptionName; + pub static NSInconsistentArchiveException: &'static NSExceptionName; } extern_class!( @@ -122,7 +122,7 @@ extern_methods!( ); extern "C" { - static NSAssertionHandlerKey: &'static NSString; + pub static NSAssertionHandlerKey: &'static NSString; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index 9b0fd9c0a..febdcbc03 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -33,21 +33,21 @@ extern_methods!( ); extern "C" { - static NSExtensionItemsAndErrorsKey: Option<&'static NSString>; + pub static NSExtensionItemsAndErrorsKey: Option<&'static NSString>; } extern "C" { - static NSExtensionHostWillEnterForegroundNotification: Option<&'static NSString>; + pub static NSExtensionHostWillEnterForegroundNotification: Option<&'static NSString>; } extern "C" { - static NSExtensionHostDidEnterBackgroundNotification: Option<&'static NSString>; + pub static NSExtensionHostDidEnterBackgroundNotification: Option<&'static NSString>; } extern "C" { - static NSExtensionHostWillResignActiveNotification: Option<&'static NSString>; + pub static NSExtensionHostWillResignActiveNotification: Option<&'static NSString>; } extern "C" { - static NSExtensionHostDidBecomeActiveNotification: Option<&'static NSString>; + pub static NSExtensionHostDidBecomeActiveNotification: Option<&'static NSString>; } diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index 7d51ffecc..b065d144e 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -44,13 +44,13 @@ extern_methods!( ); extern "C" { - static NSExtensionItemAttributedTitleKey: Option<&'static NSString>; + pub static NSExtensionItemAttributedTitleKey: Option<&'static NSString>; } extern "C" { - static NSExtensionItemAttributedContentTextKey: Option<&'static NSString>; + pub static NSExtensionItemAttributedContentTextKey: Option<&'static NSString>; } extern "C" { - static NSExtensionItemAttachmentsKey: Option<&'static NSString>; + pub static NSExtensionItemAttachmentsKey: Option<&'static NSString>; } diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 34cfec64e..e3918794c 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -115,35 +115,35 @@ extern_methods!( ); extern "C" { - static NSFileHandleOperationException: &'static NSExceptionName; + pub static NSFileHandleOperationException: &'static NSExceptionName; } extern "C" { - static NSFileHandleReadCompletionNotification: &'static NSNotificationName; + pub static NSFileHandleReadCompletionNotification: &'static NSNotificationName; } extern "C" { - static NSFileHandleReadToEndOfFileCompletionNotification: &'static NSNotificationName; + pub static NSFileHandleReadToEndOfFileCompletionNotification: &'static NSNotificationName; } extern "C" { - static NSFileHandleConnectionAcceptedNotification: &'static NSNotificationName; + pub static NSFileHandleConnectionAcceptedNotification: &'static NSNotificationName; } extern "C" { - static NSFileHandleDataAvailableNotification: &'static NSNotificationName; + pub static NSFileHandleDataAvailableNotification: &'static NSNotificationName; } extern "C" { - static NSFileHandleNotificationDataItem: &'static NSString; + pub static NSFileHandleNotificationDataItem: &'static NSString; } extern "C" { - static NSFileHandleNotificationFileHandleItem: &'static NSString; + pub static NSFileHandleNotificationFileHandleItem: &'static NSString; } extern "C" { - static NSFileHandleNotificationMonitorModes: &'static NSString; + pub static NSFileHandleNotificationMonitorModes: &'static NSString; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 329951d10..0faa0278d 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -40,11 +40,11 @@ pub const NSFileManagerUnmountAllPartitionsAndEjectDisk: NSFileManagerUnmountOpt pub const NSFileManagerUnmountWithoutUI: NSFileManagerUnmountOptions = 1 << 1; extern "C" { - static NSFileManagerUnmountDissentingProcessIdentifierErrorKey: &'static NSString; + pub static NSFileManagerUnmountDissentingProcessIdentifierErrorKey: &'static NSString; } extern "C" { - static NSUbiquityIdentityDidChangeNotification: &'static NSNotificationName; + pub static NSUbiquityIdentityDidChangeNotification: &'static NSNotificationName; } extern_class!( @@ -567,143 +567,143 @@ extern_methods!( ); extern "C" { - static NSFileType: &'static NSFileAttributeKey; + pub static NSFileType: &'static NSFileAttributeKey; } extern "C" { - static NSFileTypeDirectory: &'static NSFileAttributeType; + pub static NSFileTypeDirectory: &'static NSFileAttributeType; } extern "C" { - static NSFileTypeRegular: &'static NSFileAttributeType; + pub static NSFileTypeRegular: &'static NSFileAttributeType; } extern "C" { - static NSFileTypeSymbolicLink: &'static NSFileAttributeType; + pub static NSFileTypeSymbolicLink: &'static NSFileAttributeType; } extern "C" { - static NSFileTypeSocket: &'static NSFileAttributeType; + pub static NSFileTypeSocket: &'static NSFileAttributeType; } extern "C" { - static NSFileTypeCharacterSpecial: &'static NSFileAttributeType; + pub static NSFileTypeCharacterSpecial: &'static NSFileAttributeType; } extern "C" { - static NSFileTypeBlockSpecial: &'static NSFileAttributeType; + pub static NSFileTypeBlockSpecial: &'static NSFileAttributeType; } extern "C" { - static NSFileTypeUnknown: &'static NSFileAttributeType; + pub static NSFileTypeUnknown: &'static NSFileAttributeType; } extern "C" { - static NSFileSize: &'static NSFileAttributeKey; + pub static NSFileSize: &'static NSFileAttributeKey; } extern "C" { - static NSFileModificationDate: &'static NSFileAttributeKey; + pub static NSFileModificationDate: &'static NSFileAttributeKey; } extern "C" { - static NSFileReferenceCount: &'static NSFileAttributeKey; + pub static NSFileReferenceCount: &'static NSFileAttributeKey; } extern "C" { - static NSFileDeviceIdentifier: &'static NSFileAttributeKey; + pub static NSFileDeviceIdentifier: &'static NSFileAttributeKey; } extern "C" { - static NSFileOwnerAccountName: &'static NSFileAttributeKey; + pub static NSFileOwnerAccountName: &'static NSFileAttributeKey; } extern "C" { - static NSFileGroupOwnerAccountName: &'static NSFileAttributeKey; + pub static NSFileGroupOwnerAccountName: &'static NSFileAttributeKey; } extern "C" { - static NSFilePosixPermissions: &'static NSFileAttributeKey; + pub static NSFilePosixPermissions: &'static NSFileAttributeKey; } extern "C" { - static NSFileSystemNumber: &'static NSFileAttributeKey; + pub static NSFileSystemNumber: &'static NSFileAttributeKey; } extern "C" { - static NSFileSystemFileNumber: &'static NSFileAttributeKey; + pub static NSFileSystemFileNumber: &'static NSFileAttributeKey; } extern "C" { - static NSFileExtensionHidden: &'static NSFileAttributeKey; + pub static NSFileExtensionHidden: &'static NSFileAttributeKey; } extern "C" { - static NSFileHFSCreatorCode: &'static NSFileAttributeKey; + pub static NSFileHFSCreatorCode: &'static NSFileAttributeKey; } extern "C" { - static NSFileHFSTypeCode: &'static NSFileAttributeKey; + pub static NSFileHFSTypeCode: &'static NSFileAttributeKey; } extern "C" { - static NSFileImmutable: &'static NSFileAttributeKey; + pub static NSFileImmutable: &'static NSFileAttributeKey; } extern "C" { - static NSFileAppendOnly: &'static NSFileAttributeKey; + pub static NSFileAppendOnly: &'static NSFileAttributeKey; } extern "C" { - static NSFileCreationDate: &'static NSFileAttributeKey; + pub static NSFileCreationDate: &'static NSFileAttributeKey; } extern "C" { - static NSFileOwnerAccountID: &'static NSFileAttributeKey; + pub static NSFileOwnerAccountID: &'static NSFileAttributeKey; } extern "C" { - static NSFileGroupOwnerAccountID: &'static NSFileAttributeKey; + pub static NSFileGroupOwnerAccountID: &'static NSFileAttributeKey; } extern "C" { - static NSFileBusy: &'static NSFileAttributeKey; + pub static NSFileBusy: &'static NSFileAttributeKey; } extern "C" { - static NSFileProtectionKey: &'static NSFileAttributeKey; + pub static NSFileProtectionKey: &'static NSFileAttributeKey; } extern "C" { - static NSFileProtectionNone: &'static NSFileProtectionType; + pub static NSFileProtectionNone: &'static NSFileProtectionType; } extern "C" { - static NSFileProtectionComplete: &'static NSFileProtectionType; + pub static NSFileProtectionComplete: &'static NSFileProtectionType; } extern "C" { - static NSFileProtectionCompleteUnlessOpen: &'static NSFileProtectionType; + pub static NSFileProtectionCompleteUnlessOpen: &'static NSFileProtectionType; } extern "C" { - static NSFileProtectionCompleteUntilFirstUserAuthentication: &'static NSFileProtectionType; + pub static NSFileProtectionCompleteUntilFirstUserAuthentication: &'static NSFileProtectionType; } extern "C" { - static NSFileSystemSize: &'static NSFileAttributeKey; + pub static NSFileSystemSize: &'static NSFileAttributeKey; } extern "C" { - static NSFileSystemFreeSize: &'static NSFileAttributeKey; + pub static NSFileSystemFreeSize: &'static NSFileAttributeKey; } extern "C" { - static NSFileSystemNodes: &'static NSFileAttributeKey; + pub static NSFileSystemNodes: &'static NSFileAttributeKey; } extern "C" { - static NSFileSystemFreeNodes: &'static NSFileAttributeKey; + pub static NSFileSystemFreeNodes: &'static NSFileAttributeKey; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index e10cd8602..71753cb30 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -47,19 +47,19 @@ pub const NSAlignAllEdgesNearest: NSAlignmentOptions = NSAlignMinXNearest | NSAlignMaxXNearest | NSAlignMinYNearest | NSAlignMaxYNearest; extern "C" { - static NSZeroPoint: NSPoint; + pub static NSZeroPoint: NSPoint; } extern "C" { - static NSZeroSize: NSSize; + pub static NSZeroSize: NSSize; } extern "C" { - static NSZeroRect: NSRect; + pub static NSZeroRect: NSRect; } extern "C" { - static NSEdgeInsetsZero: NSEdgeInsets; + pub static NSEdgeInsetsZero: NSEdgeInsets; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index d74ae4494..d3347138c 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -8,67 +8,67 @@ pub type NSHTTPCookiePropertyKey = NSString; pub type NSHTTPCookieStringPolicy = NSString; extern "C" { - static NSHTTPCookieName: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieName: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieValue: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieValue: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieOriginURL: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieOriginURL: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieVersion: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieVersion: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieDomain: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieDomain: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookiePath: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookiePath: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieSecure: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieSecure: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieExpires: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieExpires: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieComment: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieComment: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieCommentURL: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieCommentURL: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieDiscard: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieDiscard: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieMaximumAge: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieMaximumAge: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookiePort: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookiePort: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieSameSitePolicy: &'static NSHTTPCookiePropertyKey; + pub static NSHTTPCookieSameSitePolicy: &'static NSHTTPCookiePropertyKey; } extern "C" { - static NSHTTPCookieSameSiteLax: &'static NSHTTPCookieStringPolicy; + pub static NSHTTPCookieSameSiteLax: &'static NSHTTPCookieStringPolicy; } extern "C" { - static NSHTTPCookieSameSiteStrict: &'static NSHTTPCookieStringPolicy; + pub static NSHTTPCookieSameSiteStrict: &'static NSHTTPCookieStringPolicy; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index 6ee2a3f45..38ec76a51 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -87,9 +87,9 @@ extern_methods!( ); extern "C" { - static NSHTTPCookieManagerAcceptPolicyChangedNotification: &'static NSNotificationName; + pub static NSHTTPCookieManagerAcceptPolicyChangedNotification: &'static NSNotificationName; } extern "C" { - static NSHTTPCookieManagerCookiesChangedNotification: &'static NSNotificationName; + pub static NSHTTPCookieManagerCookiesChangedNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 59bbd0589..cd075c34f 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -3,17 +3,17 @@ use crate::common::*; use crate::Foundation::*; -static NSHashTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory; +pub static NSHashTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory; -static NSHashTableZeroingWeakMemory: NSPointerFunctionsOptions = +pub static NSHashTableZeroingWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsZeroingWeakMemory; -static NSHashTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn; +pub static NSHashTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn; -static NSHashTableObjectPointerPersonality: NSPointerFunctionsOptions = +pub static NSHashTableObjectPointerPersonality: NSPointerFunctionsOptions = NSPointerFunctionsObjectPointerPersonality; -static NSHashTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory; +pub static NSHashTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory; pub type NSHashTableOptions = NSUInteger; @@ -109,33 +109,33 @@ extern_methods!( ); extern "C" { - static NSIntegerHashCallBacks: NSHashTableCallBacks; + pub static NSIntegerHashCallBacks: NSHashTableCallBacks; } extern "C" { - static NSNonOwnedPointerHashCallBacks: NSHashTableCallBacks; + pub static NSNonOwnedPointerHashCallBacks: NSHashTableCallBacks; } extern "C" { - static NSNonRetainedObjectHashCallBacks: NSHashTableCallBacks; + pub static NSNonRetainedObjectHashCallBacks: NSHashTableCallBacks; } extern "C" { - static NSObjectHashCallBacks: NSHashTableCallBacks; + pub static NSObjectHashCallBacks: NSHashTableCallBacks; } extern "C" { - static NSOwnedObjectIdentityHashCallBacks: NSHashTableCallBacks; + pub static NSOwnedObjectIdentityHashCallBacks: NSHashTableCallBacks; } extern "C" { - static NSOwnedPointerHashCallBacks: NSHashTableCallBacks; + pub static NSOwnedPointerHashCallBacks: NSHashTableCallBacks; } extern "C" { - static NSPointerToStructHashCallBacks: NSHashTableCallBacks; + pub static NSPointerToStructHashCallBacks: NSHashTableCallBacks; } extern "C" { - static NSIntHashCallBacks: NSHashTableCallBacks; + pub static NSIntHashCallBacks: NSHashTableCallBacks; } diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 3f3a29d68..f503df79e 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -135,7 +135,7 @@ extern_methods!( ); extern "C" { - static NSItemProviderPreferredImageSizeKey: &'static NSString; + pub static NSItemProviderPreferredImageSizeKey: &'static NSString; } extern_methods!( @@ -157,15 +157,15 @@ extern_methods!( ); extern "C" { - static NSExtensionJavaScriptPreprocessingResultsKey: Option<&'static NSString>; + pub static NSExtensionJavaScriptPreprocessingResultsKey: Option<&'static NSString>; } extern "C" { - static NSExtensionJavaScriptFinalizeArgumentKey: Option<&'static NSString>; + pub static NSExtensionJavaScriptFinalizeArgumentKey: Option<&'static NSString>; } extern "C" { - static NSItemProviderErrorDomain: &'static NSString; + pub static NSItemProviderErrorDomain: &'static NSString; } pub type NSItemProviderErrorCode = NSInteger; diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index 678d453ed..f7afc9395 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -4,53 +4,53 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSUndefinedKeyException: &'static NSExceptionName; + pub static NSUndefinedKeyException: &'static NSExceptionName; } pub type NSKeyValueOperator = NSString; extern "C" { - static NSAverageKeyValueOperator: &'static NSKeyValueOperator; + pub static NSAverageKeyValueOperator: &'static NSKeyValueOperator; } extern "C" { - static NSCountKeyValueOperator: &'static NSKeyValueOperator; + pub static NSCountKeyValueOperator: &'static NSKeyValueOperator; } extern "C" { - static NSDistinctUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator; + pub static NSDistinctUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator; } extern "C" { - static NSDistinctUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator; + pub static NSDistinctUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator; } extern "C" { - static NSDistinctUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator; + pub static NSDistinctUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator; } extern "C" { - static NSMaximumKeyValueOperator: &'static NSKeyValueOperator; + pub static NSMaximumKeyValueOperator: &'static NSKeyValueOperator; } extern "C" { - static NSMinimumKeyValueOperator: &'static NSKeyValueOperator; + pub static NSMinimumKeyValueOperator: &'static NSKeyValueOperator; } extern "C" { - static NSSumKeyValueOperator: &'static NSKeyValueOperator; + pub static NSSumKeyValueOperator: &'static NSKeyValueOperator; } extern "C" { - static NSUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator; + pub static NSUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator; } extern "C" { - static NSUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator; + pub static NSUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator; } extern "C" { - static NSUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator; + pub static NSUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index ba8859d28..ef81d93b4 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -24,23 +24,23 @@ pub const NSKeyValueSetSetMutation: NSKeyValueSetMutationKind = 4; pub type NSKeyValueChangeKey = NSString; extern "C" { - static NSKeyValueChangeKindKey: &'static NSKeyValueChangeKey; + pub static NSKeyValueChangeKindKey: &'static NSKeyValueChangeKey; } extern "C" { - static NSKeyValueChangeNewKey: &'static NSKeyValueChangeKey; + pub static NSKeyValueChangeNewKey: &'static NSKeyValueChangeKey; } extern "C" { - static NSKeyValueChangeOldKey: &'static NSKeyValueChangeKey; + pub static NSKeyValueChangeOldKey: &'static NSKeyValueChangeKey; } extern "C" { - static NSKeyValueChangeIndexesKey: &'static NSKeyValueChangeKey; + pub static NSKeyValueChangeIndexesKey: &'static NSKeyValueChangeKey; } extern "C" { - static NSKeyValueChangeNotificationIsPriorKey: &'static NSKeyValueChangeKey; + pub static NSKeyValueChangeNotificationIsPriorKey: &'static NSKeyValueChangeKey; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index b3904f914..d8c516e17 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -4,15 +4,15 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSInvalidArchiveOperationException: &'static NSExceptionName; + pub static NSInvalidArchiveOperationException: &'static NSExceptionName; } extern "C" { - static NSInvalidUnarchiveOperationException: &'static NSExceptionName; + pub static NSInvalidUnarchiveOperationException: &'static NSExceptionName; } extern "C" { - static NSKeyedArchiveRootObjectKey: &'static NSString; + pub static NSKeyedArchiveRootObjectKey: &'static NSString; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 1b0027d77..c1f27da26 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -6,157 +6,157 @@ use crate::Foundation::*; pub type NSLinguisticTagScheme = NSString; extern "C" { - static NSLinguisticTagSchemeTokenType: &'static NSLinguisticTagScheme; + pub static NSLinguisticTagSchemeTokenType: &'static NSLinguisticTagScheme; } extern "C" { - static NSLinguisticTagSchemeLexicalClass: &'static NSLinguisticTagScheme; + pub static NSLinguisticTagSchemeLexicalClass: &'static NSLinguisticTagScheme; } extern "C" { - static NSLinguisticTagSchemeNameType: &'static NSLinguisticTagScheme; + pub static NSLinguisticTagSchemeNameType: &'static NSLinguisticTagScheme; } extern "C" { - static NSLinguisticTagSchemeNameTypeOrLexicalClass: &'static NSLinguisticTagScheme; + pub static NSLinguisticTagSchemeNameTypeOrLexicalClass: &'static NSLinguisticTagScheme; } extern "C" { - static NSLinguisticTagSchemeLemma: &'static NSLinguisticTagScheme; + pub static NSLinguisticTagSchemeLemma: &'static NSLinguisticTagScheme; } extern "C" { - static NSLinguisticTagSchemeLanguage: &'static NSLinguisticTagScheme; + pub static NSLinguisticTagSchemeLanguage: &'static NSLinguisticTagScheme; } extern "C" { - static NSLinguisticTagSchemeScript: &'static NSLinguisticTagScheme; + pub static NSLinguisticTagSchemeScript: &'static NSLinguisticTagScheme; } pub type NSLinguisticTag = NSString; extern "C" { - static NSLinguisticTagWord: &'static NSLinguisticTag; + pub static NSLinguisticTagWord: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagPunctuation: &'static NSLinguisticTag; + pub static NSLinguisticTagPunctuation: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagWhitespace: &'static NSLinguisticTag; + pub static NSLinguisticTagWhitespace: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagOther: &'static NSLinguisticTag; + pub static NSLinguisticTagOther: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagNoun: &'static NSLinguisticTag; + pub static NSLinguisticTagNoun: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagVerb: &'static NSLinguisticTag; + pub static NSLinguisticTagVerb: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagAdjective: &'static NSLinguisticTag; + pub static NSLinguisticTagAdjective: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagAdverb: &'static NSLinguisticTag; + pub static NSLinguisticTagAdverb: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagPronoun: &'static NSLinguisticTag; + pub static NSLinguisticTagPronoun: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagDeterminer: &'static NSLinguisticTag; + pub static NSLinguisticTagDeterminer: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagParticle: &'static NSLinguisticTag; + pub static NSLinguisticTagParticle: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagPreposition: &'static NSLinguisticTag; + pub static NSLinguisticTagPreposition: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagNumber: &'static NSLinguisticTag; + pub static NSLinguisticTagNumber: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagConjunction: &'static NSLinguisticTag; + pub static NSLinguisticTagConjunction: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagInterjection: &'static NSLinguisticTag; + pub static NSLinguisticTagInterjection: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagClassifier: &'static NSLinguisticTag; + pub static NSLinguisticTagClassifier: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagIdiom: &'static NSLinguisticTag; + pub static NSLinguisticTagIdiom: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagOtherWord: &'static NSLinguisticTag; + pub static NSLinguisticTagOtherWord: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagSentenceTerminator: &'static NSLinguisticTag; + pub static NSLinguisticTagSentenceTerminator: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagOpenQuote: &'static NSLinguisticTag; + pub static NSLinguisticTagOpenQuote: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagCloseQuote: &'static NSLinguisticTag; + pub static NSLinguisticTagCloseQuote: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagOpenParenthesis: &'static NSLinguisticTag; + pub static NSLinguisticTagOpenParenthesis: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagCloseParenthesis: &'static NSLinguisticTag; + pub static NSLinguisticTagCloseParenthesis: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagWordJoiner: &'static NSLinguisticTag; + pub static NSLinguisticTagWordJoiner: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagDash: &'static NSLinguisticTag; + pub static NSLinguisticTagDash: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagOtherPunctuation: &'static NSLinguisticTag; + pub static NSLinguisticTagOtherPunctuation: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagParagraphBreak: &'static NSLinguisticTag; + pub static NSLinguisticTagParagraphBreak: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagOtherWhitespace: &'static NSLinguisticTag; + pub static NSLinguisticTagOtherWhitespace: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagPersonalName: &'static NSLinguisticTag; + pub static NSLinguisticTagPersonalName: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagPlaceName: &'static NSLinguisticTag; + pub static NSLinguisticTagPlaceName: &'static NSLinguisticTag; } extern "C" { - static NSLinguisticTagOrganizationName: &'static NSLinguisticTag; + pub static NSLinguisticTagOrganizationName: &'static NSLinguisticTag; } pub type NSLinguisticTaggerUnit = NSInteger; diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 0e72d21ea..f601221e7 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -240,125 +240,125 @@ extern_methods!( ); extern "C" { - static NSCurrentLocaleDidChangeNotification: &'static NSNotificationName; + pub static NSCurrentLocaleDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSLocaleIdentifier: &'static NSLocaleKey; + pub static NSLocaleIdentifier: &'static NSLocaleKey; } extern "C" { - static NSLocaleLanguageCode: &'static NSLocaleKey; + pub static NSLocaleLanguageCode: &'static NSLocaleKey; } extern "C" { - static NSLocaleCountryCode: &'static NSLocaleKey; + pub static NSLocaleCountryCode: &'static NSLocaleKey; } extern "C" { - static NSLocaleScriptCode: &'static NSLocaleKey; + pub static NSLocaleScriptCode: &'static NSLocaleKey; } extern "C" { - static NSLocaleVariantCode: &'static NSLocaleKey; + pub static NSLocaleVariantCode: &'static NSLocaleKey; } extern "C" { - static NSLocaleExemplarCharacterSet: &'static NSLocaleKey; + pub static NSLocaleExemplarCharacterSet: &'static NSLocaleKey; } extern "C" { - static NSLocaleCalendar: &'static NSLocaleKey; + pub static NSLocaleCalendar: &'static NSLocaleKey; } extern "C" { - static NSLocaleCollationIdentifier: &'static NSLocaleKey; + pub static NSLocaleCollationIdentifier: &'static NSLocaleKey; } extern "C" { - static NSLocaleUsesMetricSystem: &'static NSLocaleKey; + pub static NSLocaleUsesMetricSystem: &'static NSLocaleKey; } extern "C" { - static NSLocaleMeasurementSystem: &'static NSLocaleKey; + pub static NSLocaleMeasurementSystem: &'static NSLocaleKey; } extern "C" { - static NSLocaleDecimalSeparator: &'static NSLocaleKey; + pub static NSLocaleDecimalSeparator: &'static NSLocaleKey; } extern "C" { - static NSLocaleGroupingSeparator: &'static NSLocaleKey; + pub static NSLocaleGroupingSeparator: &'static NSLocaleKey; } extern "C" { - static NSLocaleCurrencySymbol: &'static NSLocaleKey; + pub static NSLocaleCurrencySymbol: &'static NSLocaleKey; } extern "C" { - static NSLocaleCurrencyCode: &'static NSLocaleKey; + pub static NSLocaleCurrencyCode: &'static NSLocaleKey; } extern "C" { - static NSLocaleCollatorIdentifier: &'static NSLocaleKey; + pub static NSLocaleCollatorIdentifier: &'static NSLocaleKey; } extern "C" { - static NSLocaleQuotationBeginDelimiterKey: &'static NSLocaleKey; + pub static NSLocaleQuotationBeginDelimiterKey: &'static NSLocaleKey; } extern "C" { - static NSLocaleQuotationEndDelimiterKey: &'static NSLocaleKey; + pub static NSLocaleQuotationEndDelimiterKey: &'static NSLocaleKey; } extern "C" { - static NSLocaleAlternateQuotationBeginDelimiterKey: &'static NSLocaleKey; + pub static NSLocaleAlternateQuotationBeginDelimiterKey: &'static NSLocaleKey; } extern "C" { - static NSLocaleAlternateQuotationEndDelimiterKey: &'static NSLocaleKey; + pub static NSLocaleAlternateQuotationEndDelimiterKey: &'static NSLocaleKey; } extern "C" { - static NSGregorianCalendar: &'static NSString; + pub static NSGregorianCalendar: &'static NSString; } extern "C" { - static NSBuddhistCalendar: &'static NSString; + pub static NSBuddhistCalendar: &'static NSString; } extern "C" { - static NSChineseCalendar: &'static NSString; + pub static NSChineseCalendar: &'static NSString; } extern "C" { - static NSHebrewCalendar: &'static NSString; + pub static NSHebrewCalendar: &'static NSString; } extern "C" { - static NSIslamicCalendar: &'static NSString; + pub static NSIslamicCalendar: &'static NSString; } extern "C" { - static NSIslamicCivilCalendar: &'static NSString; + pub static NSIslamicCivilCalendar: &'static NSString; } extern "C" { - static NSJapaneseCalendar: &'static NSString; + pub static NSJapaneseCalendar: &'static NSString; } extern "C" { - static NSRepublicOfChinaCalendar: &'static NSString; + pub static NSRepublicOfChinaCalendar: &'static NSString; } extern "C" { - static NSPersianCalendar: &'static NSString; + pub static NSPersianCalendar: &'static NSString; } extern "C" { - static NSIndianCalendar: &'static NSString; + pub static NSIndianCalendar: &'static NSString; } extern "C" { - static NSISO8601Calendar: &'static NSString; + pub static NSISO8601Calendar: &'static NSString; } diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index d0636e067..4b205ce82 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -3,16 +3,17 @@ use crate::common::*; use crate::Foundation::*; -static NSMapTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory; +pub static NSMapTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory; -static NSMapTableZeroingWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsZeroingWeakMemory; +pub static NSMapTableZeroingWeakMemory: NSPointerFunctionsOptions = + NSPointerFunctionsZeroingWeakMemory; -static NSMapTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn; +pub static NSMapTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn; -static NSMapTableObjectPointerPersonality: NSPointerFunctionsOptions = +pub static NSMapTableObjectPointerPersonality: NSPointerFunctionsOptions = NSPointerFunctionsObjectPointerPersonality; -static NSMapTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory; +pub static NSMapTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory; pub type NSMapTableOptions = NSUInteger; @@ -116,53 +117,53 @@ extern_methods!( ); extern "C" { - static NSIntegerMapKeyCallBacks: NSMapTableKeyCallBacks; + pub static NSIntegerMapKeyCallBacks: NSMapTableKeyCallBacks; } extern "C" { - static NSNonOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks; + pub static NSNonOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks; } extern "C" { - static NSNonOwnedPointerOrNullMapKeyCallBacks: NSMapTableKeyCallBacks; + pub static NSNonOwnedPointerOrNullMapKeyCallBacks: NSMapTableKeyCallBacks; } extern "C" { - static NSNonRetainedObjectMapKeyCallBacks: NSMapTableKeyCallBacks; + pub static NSNonRetainedObjectMapKeyCallBacks: NSMapTableKeyCallBacks; } extern "C" { - static NSObjectMapKeyCallBacks: NSMapTableKeyCallBacks; + pub static NSObjectMapKeyCallBacks: NSMapTableKeyCallBacks; } extern "C" { - static NSOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks; + pub static NSOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks; } extern "C" { - static NSIntMapKeyCallBacks: NSMapTableKeyCallBacks; + pub static NSIntMapKeyCallBacks: NSMapTableKeyCallBacks; } extern "C" { - static NSIntegerMapValueCallBacks: NSMapTableValueCallBacks; + pub static NSIntegerMapValueCallBacks: NSMapTableValueCallBacks; } extern "C" { - static NSNonOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks; + pub static NSNonOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks; } extern "C" { - static NSObjectMapValueCallBacks: NSMapTableValueCallBacks; + pub static NSObjectMapValueCallBacks: NSMapTableValueCallBacks; } extern "C" { - static NSNonRetainedObjectMapValueCallBacks: NSMapTableValueCallBacks; + pub static NSNonRetainedObjectMapValueCallBacks: NSMapTableValueCallBacks; } extern "C" { - static NSOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks; + pub static NSOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks; } extern "C" { - static NSIntMapValueCallBacks: NSMapTableValueCallBacks; + pub static NSIntMapValueCallBacks: NSMapTableValueCallBacks; } diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 5ae112b49..f589fbdb7 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -134,67 +134,67 @@ extern_methods!( pub type NSMetadataQueryDelegate = NSObject; extern "C" { - static NSMetadataQueryDidStartGatheringNotification: &'static NSNotificationName; + pub static NSMetadataQueryDidStartGatheringNotification: &'static NSNotificationName; } extern "C" { - static NSMetadataQueryGatheringProgressNotification: &'static NSNotificationName; + pub static NSMetadataQueryGatheringProgressNotification: &'static NSNotificationName; } extern "C" { - static NSMetadataQueryDidFinishGatheringNotification: &'static NSNotificationName; + pub static NSMetadataQueryDidFinishGatheringNotification: &'static NSNotificationName; } extern "C" { - static NSMetadataQueryDidUpdateNotification: &'static NSNotificationName; + pub static NSMetadataQueryDidUpdateNotification: &'static NSNotificationName; } extern "C" { - static NSMetadataQueryUpdateAddedItemsKey: &'static NSString; + pub static NSMetadataQueryUpdateAddedItemsKey: &'static NSString; } extern "C" { - static NSMetadataQueryUpdateChangedItemsKey: &'static NSString; + pub static NSMetadataQueryUpdateChangedItemsKey: &'static NSString; } extern "C" { - static NSMetadataQueryUpdateRemovedItemsKey: &'static NSString; + pub static NSMetadataQueryUpdateRemovedItemsKey: &'static NSString; } extern "C" { - static NSMetadataQueryResultContentRelevanceAttribute: &'static NSString; + pub static NSMetadataQueryResultContentRelevanceAttribute: &'static NSString; } extern "C" { - static NSMetadataQueryUserHomeScope: &'static NSString; + pub static NSMetadataQueryUserHomeScope: &'static NSString; } extern "C" { - static NSMetadataQueryLocalComputerScope: &'static NSString; + pub static NSMetadataQueryLocalComputerScope: &'static NSString; } extern "C" { - static NSMetadataQueryNetworkScope: &'static NSString; + pub static NSMetadataQueryNetworkScope: &'static NSString; } extern "C" { - static NSMetadataQueryIndexedLocalComputerScope: &'static NSString; + pub static NSMetadataQueryIndexedLocalComputerScope: &'static NSString; } extern "C" { - static NSMetadataQueryIndexedNetworkScope: &'static NSString; + pub static NSMetadataQueryIndexedNetworkScope: &'static NSString; } extern "C" { - static NSMetadataQueryUbiquitousDocumentsScope: &'static NSString; + pub static NSMetadataQueryUbiquitousDocumentsScope: &'static NSString; } extern "C" { - static NSMetadataQueryUbiquitousDataScope: &'static NSString; + pub static NSMetadataQueryUbiquitousDataScope: &'static NSString; } extern "C" { - static NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope: &'static NSString; + pub static NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope: &'static NSString; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs index 5c53b21a6..8d334817a 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -4,725 +4,725 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSMetadataItemFSNameKey: &'static NSString; + pub static NSMetadataItemFSNameKey: &'static NSString; } extern "C" { - static NSMetadataItemDisplayNameKey: &'static NSString; + pub static NSMetadataItemDisplayNameKey: &'static NSString; } extern "C" { - static NSMetadataItemURLKey: &'static NSString; + pub static NSMetadataItemURLKey: &'static NSString; } extern "C" { - static NSMetadataItemPathKey: &'static NSString; + pub static NSMetadataItemPathKey: &'static NSString; } extern "C" { - static NSMetadataItemFSSizeKey: &'static NSString; + pub static NSMetadataItemFSSizeKey: &'static NSString; } extern "C" { - static NSMetadataItemFSCreationDateKey: &'static NSString; + pub static NSMetadataItemFSCreationDateKey: &'static NSString; } extern "C" { - static NSMetadataItemFSContentChangeDateKey: &'static NSString; + pub static NSMetadataItemFSContentChangeDateKey: &'static NSString; } extern "C" { - static NSMetadataItemContentTypeKey: &'static NSString; + pub static NSMetadataItemContentTypeKey: &'static NSString; } extern "C" { - static NSMetadataItemContentTypeTreeKey: &'static NSString; + pub static NSMetadataItemContentTypeTreeKey: &'static NSString; } extern "C" { - static NSMetadataItemIsUbiquitousKey: &'static NSString; + pub static NSMetadataItemIsUbiquitousKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemHasUnresolvedConflictsKey: &'static NSString; + pub static NSMetadataUbiquitousItemHasUnresolvedConflictsKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemIsDownloadedKey: &'static NSString; + pub static NSMetadataUbiquitousItemIsDownloadedKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemDownloadingStatusKey: &'static NSString; + pub static NSMetadataUbiquitousItemDownloadingStatusKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemDownloadingStatusNotDownloaded: &'static NSString; + pub static NSMetadataUbiquitousItemDownloadingStatusNotDownloaded: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemDownloadingStatusDownloaded: &'static NSString; + pub static NSMetadataUbiquitousItemDownloadingStatusDownloaded: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemDownloadingStatusCurrent: &'static NSString; + pub static NSMetadataUbiquitousItemDownloadingStatusCurrent: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemIsDownloadingKey: &'static NSString; + pub static NSMetadataUbiquitousItemIsDownloadingKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemIsUploadedKey: &'static NSString; + pub static NSMetadataUbiquitousItemIsUploadedKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemIsUploadingKey: &'static NSString; + pub static NSMetadataUbiquitousItemIsUploadingKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemPercentDownloadedKey: &'static NSString; + pub static NSMetadataUbiquitousItemPercentDownloadedKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemPercentUploadedKey: &'static NSString; + pub static NSMetadataUbiquitousItemPercentUploadedKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemDownloadingErrorKey: &'static NSString; + pub static NSMetadataUbiquitousItemDownloadingErrorKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemUploadingErrorKey: &'static NSString; + pub static NSMetadataUbiquitousItemUploadingErrorKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemDownloadRequestedKey: &'static NSString; + pub static NSMetadataUbiquitousItemDownloadRequestedKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemIsExternalDocumentKey: &'static NSString; + pub static NSMetadataUbiquitousItemIsExternalDocumentKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemContainerDisplayNameKey: &'static NSString; + pub static NSMetadataUbiquitousItemContainerDisplayNameKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemURLInLocalContainerKey: &'static NSString; + pub static NSMetadataUbiquitousItemURLInLocalContainerKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousItemIsSharedKey: &'static NSString; + pub static NSMetadataUbiquitousItemIsSharedKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousSharedItemCurrentUserRoleKey: &'static NSString; + pub static NSMetadataUbiquitousSharedItemCurrentUserRoleKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSString; + pub static NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousSharedItemOwnerNameComponentsKey: &'static NSString; + pub static NSMetadataUbiquitousSharedItemOwnerNameComponentsKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey: &'static NSString; + pub static NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey: &'static NSString; } extern "C" { - static NSMetadataUbiquitousSharedItemRoleOwner: &'static NSString; + pub static NSMetadataUbiquitousSharedItemRoleOwner: &'static NSString; } extern "C" { - static NSMetadataUbiquitousSharedItemRoleParticipant: &'static NSString; + pub static NSMetadataUbiquitousSharedItemRoleParticipant: &'static NSString; } extern "C" { - static NSMetadataUbiquitousSharedItemPermissionsReadOnly: &'static NSString; + pub static NSMetadataUbiquitousSharedItemPermissionsReadOnly: &'static NSString; } extern "C" { - static NSMetadataUbiquitousSharedItemPermissionsReadWrite: &'static NSString; + pub static NSMetadataUbiquitousSharedItemPermissionsReadWrite: &'static NSString; } extern "C" { - static NSMetadataItemAttributeChangeDateKey: &'static NSString; + pub static NSMetadataItemAttributeChangeDateKey: &'static NSString; } extern "C" { - static NSMetadataItemKeywordsKey: &'static NSString; + pub static NSMetadataItemKeywordsKey: &'static NSString; } extern "C" { - static NSMetadataItemTitleKey: &'static NSString; + pub static NSMetadataItemTitleKey: &'static NSString; } extern "C" { - static NSMetadataItemAuthorsKey: &'static NSString; + pub static NSMetadataItemAuthorsKey: &'static NSString; } extern "C" { - static NSMetadataItemEditorsKey: &'static NSString; + pub static NSMetadataItemEditorsKey: &'static NSString; } extern "C" { - static NSMetadataItemParticipantsKey: &'static NSString; + pub static NSMetadataItemParticipantsKey: &'static NSString; } extern "C" { - static NSMetadataItemProjectsKey: &'static NSString; + pub static NSMetadataItemProjectsKey: &'static NSString; } extern "C" { - static NSMetadataItemDownloadedDateKey: &'static NSString; + pub static NSMetadataItemDownloadedDateKey: &'static NSString; } extern "C" { - static NSMetadataItemWhereFromsKey: &'static NSString; + pub static NSMetadataItemWhereFromsKey: &'static NSString; } extern "C" { - static NSMetadataItemCommentKey: &'static NSString; + pub static NSMetadataItemCommentKey: &'static NSString; } extern "C" { - static NSMetadataItemCopyrightKey: &'static NSString; + pub static NSMetadataItemCopyrightKey: &'static NSString; } extern "C" { - static NSMetadataItemLastUsedDateKey: &'static NSString; + pub static NSMetadataItemLastUsedDateKey: &'static NSString; } extern "C" { - static NSMetadataItemContentCreationDateKey: &'static NSString; + pub static NSMetadataItemContentCreationDateKey: &'static NSString; } extern "C" { - static NSMetadataItemContentModificationDateKey: &'static NSString; + pub static NSMetadataItemContentModificationDateKey: &'static NSString; } extern "C" { - static NSMetadataItemDateAddedKey: &'static NSString; + pub static NSMetadataItemDateAddedKey: &'static NSString; } extern "C" { - static NSMetadataItemDurationSecondsKey: &'static NSString; + pub static NSMetadataItemDurationSecondsKey: &'static NSString; } extern "C" { - static NSMetadataItemContactKeywordsKey: &'static NSString; + pub static NSMetadataItemContactKeywordsKey: &'static NSString; } extern "C" { - static NSMetadataItemVersionKey: &'static NSString; + pub static NSMetadataItemVersionKey: &'static NSString; } extern "C" { - static NSMetadataItemPixelHeightKey: &'static NSString; + pub static NSMetadataItemPixelHeightKey: &'static NSString; } extern "C" { - static NSMetadataItemPixelWidthKey: &'static NSString; + pub static NSMetadataItemPixelWidthKey: &'static NSString; } extern "C" { - static NSMetadataItemPixelCountKey: &'static NSString; + pub static NSMetadataItemPixelCountKey: &'static NSString; } extern "C" { - static NSMetadataItemColorSpaceKey: &'static NSString; + pub static NSMetadataItemColorSpaceKey: &'static NSString; } extern "C" { - static NSMetadataItemBitsPerSampleKey: &'static NSString; + pub static NSMetadataItemBitsPerSampleKey: &'static NSString; } extern "C" { - static NSMetadataItemFlashOnOffKey: &'static NSString; + pub static NSMetadataItemFlashOnOffKey: &'static NSString; } extern "C" { - static NSMetadataItemFocalLengthKey: &'static NSString; + pub static NSMetadataItemFocalLengthKey: &'static NSString; } extern "C" { - static NSMetadataItemAcquisitionMakeKey: &'static NSString; + pub static NSMetadataItemAcquisitionMakeKey: &'static NSString; } extern "C" { - static NSMetadataItemAcquisitionModelKey: &'static NSString; + pub static NSMetadataItemAcquisitionModelKey: &'static NSString; } extern "C" { - static NSMetadataItemISOSpeedKey: &'static NSString; + pub static NSMetadataItemISOSpeedKey: &'static NSString; } extern "C" { - static NSMetadataItemOrientationKey: &'static NSString; + pub static NSMetadataItemOrientationKey: &'static NSString; } extern "C" { - static NSMetadataItemLayerNamesKey: &'static NSString; + pub static NSMetadataItemLayerNamesKey: &'static NSString; } extern "C" { - static NSMetadataItemWhiteBalanceKey: &'static NSString; + pub static NSMetadataItemWhiteBalanceKey: &'static NSString; } extern "C" { - static NSMetadataItemApertureKey: &'static NSString; + pub static NSMetadataItemApertureKey: &'static NSString; } extern "C" { - static NSMetadataItemProfileNameKey: &'static NSString; + pub static NSMetadataItemProfileNameKey: &'static NSString; } extern "C" { - static NSMetadataItemResolutionWidthDPIKey: &'static NSString; + pub static NSMetadataItemResolutionWidthDPIKey: &'static NSString; } extern "C" { - static NSMetadataItemResolutionHeightDPIKey: &'static NSString; + pub static NSMetadataItemResolutionHeightDPIKey: &'static NSString; } extern "C" { - static NSMetadataItemExposureModeKey: &'static NSString; + pub static NSMetadataItemExposureModeKey: &'static NSString; } extern "C" { - static NSMetadataItemExposureTimeSecondsKey: &'static NSString; + pub static NSMetadataItemExposureTimeSecondsKey: &'static NSString; } extern "C" { - static NSMetadataItemEXIFVersionKey: &'static NSString; + pub static NSMetadataItemEXIFVersionKey: &'static NSString; } extern "C" { - static NSMetadataItemCameraOwnerKey: &'static NSString; + pub static NSMetadataItemCameraOwnerKey: &'static NSString; } extern "C" { - static NSMetadataItemFocalLength35mmKey: &'static NSString; + pub static NSMetadataItemFocalLength35mmKey: &'static NSString; } extern "C" { - static NSMetadataItemLensModelKey: &'static NSString; + pub static NSMetadataItemLensModelKey: &'static NSString; } extern "C" { - static NSMetadataItemEXIFGPSVersionKey: &'static NSString; + pub static NSMetadataItemEXIFGPSVersionKey: &'static NSString; } extern "C" { - static NSMetadataItemAltitudeKey: &'static NSString; + pub static NSMetadataItemAltitudeKey: &'static NSString; } extern "C" { - static NSMetadataItemLatitudeKey: &'static NSString; + pub static NSMetadataItemLatitudeKey: &'static NSString; } extern "C" { - static NSMetadataItemLongitudeKey: &'static NSString; + pub static NSMetadataItemLongitudeKey: &'static NSString; } extern "C" { - static NSMetadataItemSpeedKey: &'static NSString; + pub static NSMetadataItemSpeedKey: &'static NSString; } extern "C" { - static NSMetadataItemTimestampKey: &'static NSString; + pub static NSMetadataItemTimestampKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSTrackKey: &'static NSString; + pub static NSMetadataItemGPSTrackKey: &'static NSString; } extern "C" { - static NSMetadataItemImageDirectionKey: &'static NSString; + pub static NSMetadataItemImageDirectionKey: &'static NSString; } extern "C" { - static NSMetadataItemNamedLocationKey: &'static NSString; + pub static NSMetadataItemNamedLocationKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSStatusKey: &'static NSString; + pub static NSMetadataItemGPSStatusKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSMeasureModeKey: &'static NSString; + pub static NSMetadataItemGPSMeasureModeKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSDOPKey: &'static NSString; + pub static NSMetadataItemGPSDOPKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSMapDatumKey: &'static NSString; + pub static NSMetadataItemGPSMapDatumKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSDestLatitudeKey: &'static NSString; + pub static NSMetadataItemGPSDestLatitudeKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSDestLongitudeKey: &'static NSString; + pub static NSMetadataItemGPSDestLongitudeKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSDestBearingKey: &'static NSString; + pub static NSMetadataItemGPSDestBearingKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSDestDistanceKey: &'static NSString; + pub static NSMetadataItemGPSDestDistanceKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSProcessingMethodKey: &'static NSString; + pub static NSMetadataItemGPSProcessingMethodKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSAreaInformationKey: &'static NSString; + pub static NSMetadataItemGPSAreaInformationKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSDateStampKey: &'static NSString; + pub static NSMetadataItemGPSDateStampKey: &'static NSString; } extern "C" { - static NSMetadataItemGPSDifferentalKey: &'static NSString; + pub static NSMetadataItemGPSDifferentalKey: &'static NSString; } extern "C" { - static NSMetadataItemCodecsKey: &'static NSString; + pub static NSMetadataItemCodecsKey: &'static NSString; } extern "C" { - static NSMetadataItemMediaTypesKey: &'static NSString; + pub static NSMetadataItemMediaTypesKey: &'static NSString; } extern "C" { - static NSMetadataItemStreamableKey: &'static NSString; + pub static NSMetadataItemStreamableKey: &'static NSString; } extern "C" { - static NSMetadataItemTotalBitRateKey: &'static NSString; + pub static NSMetadataItemTotalBitRateKey: &'static NSString; } extern "C" { - static NSMetadataItemVideoBitRateKey: &'static NSString; + pub static NSMetadataItemVideoBitRateKey: &'static NSString; } extern "C" { - static NSMetadataItemAudioBitRateKey: &'static NSString; + pub static NSMetadataItemAudioBitRateKey: &'static NSString; } extern "C" { - static NSMetadataItemDeliveryTypeKey: &'static NSString; + pub static NSMetadataItemDeliveryTypeKey: &'static NSString; } extern "C" { - static NSMetadataItemAlbumKey: &'static NSString; + pub static NSMetadataItemAlbumKey: &'static NSString; } extern "C" { - static NSMetadataItemHasAlphaChannelKey: &'static NSString; + pub static NSMetadataItemHasAlphaChannelKey: &'static NSString; } extern "C" { - static NSMetadataItemRedEyeOnOffKey: &'static NSString; + pub static NSMetadataItemRedEyeOnOffKey: &'static NSString; } extern "C" { - static NSMetadataItemMeteringModeKey: &'static NSString; + pub static NSMetadataItemMeteringModeKey: &'static NSString; } extern "C" { - static NSMetadataItemMaxApertureKey: &'static NSString; + pub static NSMetadataItemMaxApertureKey: &'static NSString; } extern "C" { - static NSMetadataItemFNumberKey: &'static NSString; + pub static NSMetadataItemFNumberKey: &'static NSString; } extern "C" { - static NSMetadataItemExposureProgramKey: &'static NSString; + pub static NSMetadataItemExposureProgramKey: &'static NSString; } extern "C" { - static NSMetadataItemExposureTimeStringKey: &'static NSString; + pub static NSMetadataItemExposureTimeStringKey: &'static NSString; } extern "C" { - static NSMetadataItemHeadlineKey: &'static NSString; + pub static NSMetadataItemHeadlineKey: &'static NSString; } extern "C" { - static NSMetadataItemInstructionsKey: &'static NSString; + pub static NSMetadataItemInstructionsKey: &'static NSString; } extern "C" { - static NSMetadataItemCityKey: &'static NSString; + pub static NSMetadataItemCityKey: &'static NSString; } extern "C" { - static NSMetadataItemStateOrProvinceKey: &'static NSString; + pub static NSMetadataItemStateOrProvinceKey: &'static NSString; } extern "C" { - static NSMetadataItemCountryKey: &'static NSString; + pub static NSMetadataItemCountryKey: &'static NSString; } extern "C" { - static NSMetadataItemTextContentKey: &'static NSString; + pub static NSMetadataItemTextContentKey: &'static NSString; } extern "C" { - static NSMetadataItemAudioSampleRateKey: &'static NSString; + pub static NSMetadataItemAudioSampleRateKey: &'static NSString; } extern "C" { - static NSMetadataItemAudioChannelCountKey: &'static NSString; + pub static NSMetadataItemAudioChannelCountKey: &'static NSString; } extern "C" { - static NSMetadataItemTempoKey: &'static NSString; + pub static NSMetadataItemTempoKey: &'static NSString; } extern "C" { - static NSMetadataItemKeySignatureKey: &'static NSString; + pub static NSMetadataItemKeySignatureKey: &'static NSString; } extern "C" { - static NSMetadataItemTimeSignatureKey: &'static NSString; + pub static NSMetadataItemTimeSignatureKey: &'static NSString; } extern "C" { - static NSMetadataItemAudioEncodingApplicationKey: &'static NSString; + pub static NSMetadataItemAudioEncodingApplicationKey: &'static NSString; } extern "C" { - static NSMetadataItemComposerKey: &'static NSString; + pub static NSMetadataItemComposerKey: &'static NSString; } extern "C" { - static NSMetadataItemLyricistKey: &'static NSString; + pub static NSMetadataItemLyricistKey: &'static NSString; } extern "C" { - static NSMetadataItemAudioTrackNumberKey: &'static NSString; + pub static NSMetadataItemAudioTrackNumberKey: &'static NSString; } extern "C" { - static NSMetadataItemRecordingDateKey: &'static NSString; + pub static NSMetadataItemRecordingDateKey: &'static NSString; } extern "C" { - static NSMetadataItemMusicalGenreKey: &'static NSString; + pub static NSMetadataItemMusicalGenreKey: &'static NSString; } extern "C" { - static NSMetadataItemIsGeneralMIDISequenceKey: &'static NSString; + pub static NSMetadataItemIsGeneralMIDISequenceKey: &'static NSString; } extern "C" { - static NSMetadataItemRecordingYearKey: &'static NSString; + pub static NSMetadataItemRecordingYearKey: &'static NSString; } extern "C" { - static NSMetadataItemOrganizationsKey: &'static NSString; + pub static NSMetadataItemOrganizationsKey: &'static NSString; } extern "C" { - static NSMetadataItemLanguagesKey: &'static NSString; + pub static NSMetadataItemLanguagesKey: &'static NSString; } extern "C" { - static NSMetadataItemRightsKey: &'static NSString; + pub static NSMetadataItemRightsKey: &'static NSString; } extern "C" { - static NSMetadataItemPublishersKey: &'static NSString; + pub static NSMetadataItemPublishersKey: &'static NSString; } extern "C" { - static NSMetadataItemContributorsKey: &'static NSString; + pub static NSMetadataItemContributorsKey: &'static NSString; } extern "C" { - static NSMetadataItemCoverageKey: &'static NSString; + pub static NSMetadataItemCoverageKey: &'static NSString; } extern "C" { - static NSMetadataItemSubjectKey: &'static NSString; + pub static NSMetadataItemSubjectKey: &'static NSString; } extern "C" { - static NSMetadataItemThemeKey: &'static NSString; + pub static NSMetadataItemThemeKey: &'static NSString; } extern "C" { - static NSMetadataItemDescriptionKey: &'static NSString; + pub static NSMetadataItemDescriptionKey: &'static NSString; } extern "C" { - static NSMetadataItemIdentifierKey: &'static NSString; + pub static NSMetadataItemIdentifierKey: &'static NSString; } extern "C" { - static NSMetadataItemAudiencesKey: &'static NSString; + pub static NSMetadataItemAudiencesKey: &'static NSString; } extern "C" { - static NSMetadataItemNumberOfPagesKey: &'static NSString; + pub static NSMetadataItemNumberOfPagesKey: &'static NSString; } extern "C" { - static NSMetadataItemPageWidthKey: &'static NSString; + pub static NSMetadataItemPageWidthKey: &'static NSString; } extern "C" { - static NSMetadataItemPageHeightKey: &'static NSString; + pub static NSMetadataItemPageHeightKey: &'static NSString; } extern "C" { - static NSMetadataItemSecurityMethodKey: &'static NSString; + pub static NSMetadataItemSecurityMethodKey: &'static NSString; } extern "C" { - static NSMetadataItemCreatorKey: &'static NSString; + pub static NSMetadataItemCreatorKey: &'static NSString; } extern "C" { - static NSMetadataItemEncodingApplicationsKey: &'static NSString; + pub static NSMetadataItemEncodingApplicationsKey: &'static NSString; } extern "C" { - static NSMetadataItemDueDateKey: &'static NSString; + pub static NSMetadataItemDueDateKey: &'static NSString; } extern "C" { - static NSMetadataItemStarRatingKey: &'static NSString; + pub static NSMetadataItemStarRatingKey: &'static NSString; } extern "C" { - static NSMetadataItemPhoneNumbersKey: &'static NSString; + pub static NSMetadataItemPhoneNumbersKey: &'static NSString; } extern "C" { - static NSMetadataItemEmailAddressesKey: &'static NSString; + pub static NSMetadataItemEmailAddressesKey: &'static NSString; } extern "C" { - static NSMetadataItemInstantMessageAddressesKey: &'static NSString; + pub static NSMetadataItemInstantMessageAddressesKey: &'static NSString; } extern "C" { - static NSMetadataItemKindKey: &'static NSString; + pub static NSMetadataItemKindKey: &'static NSString; } extern "C" { - static NSMetadataItemRecipientsKey: &'static NSString; + pub static NSMetadataItemRecipientsKey: &'static NSString; } extern "C" { - static NSMetadataItemFinderCommentKey: &'static NSString; + pub static NSMetadataItemFinderCommentKey: &'static NSString; } extern "C" { - static NSMetadataItemFontsKey: &'static NSString; + pub static NSMetadataItemFontsKey: &'static NSString; } extern "C" { - static NSMetadataItemAppleLoopsRootKeyKey: &'static NSString; + pub static NSMetadataItemAppleLoopsRootKeyKey: &'static NSString; } extern "C" { - static NSMetadataItemAppleLoopsKeyFilterTypeKey: &'static NSString; + pub static NSMetadataItemAppleLoopsKeyFilterTypeKey: &'static NSString; } extern "C" { - static NSMetadataItemAppleLoopsLoopModeKey: &'static NSString; + pub static NSMetadataItemAppleLoopsLoopModeKey: &'static NSString; } extern "C" { - static NSMetadataItemAppleLoopDescriptorsKey: &'static NSString; + pub static NSMetadataItemAppleLoopDescriptorsKey: &'static NSString; } extern "C" { - static NSMetadataItemMusicalInstrumentCategoryKey: &'static NSString; + pub static NSMetadataItemMusicalInstrumentCategoryKey: &'static NSString; } extern "C" { - static NSMetadataItemMusicalInstrumentNameKey: &'static NSString; + pub static NSMetadataItemMusicalInstrumentNameKey: &'static NSString; } extern "C" { - static NSMetadataItemCFBundleIdentifierKey: &'static NSString; + pub static NSMetadataItemCFBundleIdentifierKey: &'static NSString; } extern "C" { - static NSMetadataItemInformationKey: &'static NSString; + pub static NSMetadataItemInformationKey: &'static NSString; } extern "C" { - static NSMetadataItemDirectorKey: &'static NSString; + pub static NSMetadataItemDirectorKey: &'static NSString; } extern "C" { - static NSMetadataItemProducerKey: &'static NSString; + pub static NSMetadataItemProducerKey: &'static NSString; } extern "C" { - static NSMetadataItemGenreKey: &'static NSString; + pub static NSMetadataItemGenreKey: &'static NSString; } extern "C" { - static NSMetadataItemPerformersKey: &'static NSString; + pub static NSMetadataItemPerformersKey: &'static NSString; } extern "C" { - static NSMetadataItemOriginalFormatKey: &'static NSString; + pub static NSMetadataItemOriginalFormatKey: &'static NSString; } extern "C" { - static NSMetadataItemOriginalSourceKey: &'static NSString; + pub static NSMetadataItemOriginalSourceKey: &'static NSString; } extern "C" { - static NSMetadataItemAuthorEmailAddressesKey: &'static NSString; + pub static NSMetadataItemAuthorEmailAddressesKey: &'static NSString; } extern "C" { - static NSMetadataItemRecipientEmailAddressesKey: &'static NSString; + pub static NSMetadataItemRecipientEmailAddressesKey: &'static NSString; } extern "C" { - static NSMetadataItemAuthorAddressesKey: &'static NSString; + pub static NSMetadataItemAuthorAddressesKey: &'static NSString; } extern "C" { - static NSMetadataItemRecipientAddressesKey: &'static NSString; + pub static NSMetadataItemRecipientAddressesKey: &'static NSString; } extern "C" { - static NSMetadataItemIsLikelyJunkKey: &'static NSString; + pub static NSMetadataItemIsLikelyJunkKey: &'static NSString; } extern "C" { - static NSMetadataItemExecutableArchitecturesKey: &'static NSString; + pub static NSMetadataItemExecutableArchitecturesKey: &'static NSString; } extern "C" { - static NSMetadataItemExecutablePlatformKey: &'static NSString; + pub static NSMetadataItemExecutablePlatformKey: &'static NSString; } extern "C" { - static NSMetadataItemApplicationCategoriesKey: &'static NSString; + pub static NSMetadataItemApplicationCategoriesKey: &'static NSString; } extern "C" { - static NSMetadataItemIsApplicationManagedKey: &'static NSString; + pub static NSMetadataItemIsApplicationManagedKey: &'static NSString; } diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 57b62ef16..745929a53 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -4,11 +4,11 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSNetServicesErrorCode: &'static NSString; + pub static NSNetServicesErrorCode: &'static NSString; } extern "C" { - static NSNetServicesErrorDomain: &'static NSErrorDomain; + pub static NSNetServicesErrorDomain: &'static NSErrorDomain; } pub type NSNetServicesError = NSInteger; diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 8e6636478..5222caad3 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSFoundationVersionNumber: c_double; + pub static NSFoundationVersionNumber: c_double; } pub type NSExceptionName = NSString; @@ -31,4 +31,4 @@ pub const NSQualityOfServiceUtility: NSQualityOfService = 0x11; pub const NSQualityOfServiceBackground: NSQualityOfService = 0x09; pub const NSQualityOfServiceDefault: NSQualityOfService = -1; -static NSNotFound: NSInteger = todo; +pub static NSNotFound: NSInteger = todo; diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 15b021855..0260e8def 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -142,14 +142,14 @@ extern_methods!( ); extern "C" { - static NSInvocationOperationVoidResultException: &'static NSExceptionName; + pub static NSInvocationOperationVoidResultException: &'static NSExceptionName; } extern "C" { - static NSInvocationOperationCancelledException: &'static NSExceptionName; + pub static NSInvocationOperationCancelledException: &'static NSExceptionName; } -static NSOperationQueueDefaultMaxConcurrentOperationCount: NSInteger = -1; +pub static NSOperationQueueDefaultMaxConcurrentOperationCount: NSInteger = -1; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index e02b23bf8..b9dfcd0b7 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -78,33 +78,33 @@ extern_methods!( ); extern "C" { - static NSPersonNameComponentKey: &'static NSString; + pub static NSPersonNameComponentKey: &'static NSString; } extern "C" { - static NSPersonNameComponentGivenName: &'static NSString; + pub static NSPersonNameComponentGivenName: &'static NSString; } extern "C" { - static NSPersonNameComponentFamilyName: &'static NSString; + pub static NSPersonNameComponentFamilyName: &'static NSString; } extern "C" { - static NSPersonNameComponentMiddleName: &'static NSString; + pub static NSPersonNameComponentMiddleName: &'static NSString; } extern "C" { - static NSPersonNameComponentPrefix: &'static NSString; + pub static NSPersonNameComponentPrefix: &'static NSString; } extern "C" { - static NSPersonNameComponentSuffix: &'static NSString; + pub static NSPersonNameComponentSuffix: &'static NSString; } extern "C" { - static NSPersonNameComponentNickname: &'static NSString; + pub static NSPersonNameComponentNickname: &'static NSString; } extern "C" { - static NSPersonNameComponentDelimiter: &'static NSString; + pub static NSPersonNameComponentDelimiter: &'static NSString; } diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index db8f8e85e..966f0ab0a 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSPortDidBecomeInvalidNotification: &'static NSNotificationName; + pub static NSPortDidBecomeInvalidNotification: &'static NSNotificationName; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index eccfe0fde..1cddac14d 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -175,11 +175,11 @@ extern_methods!( ); extern "C" { - static NSProcessInfoThermalStateDidChangeNotification: &'static NSNotificationName; + pub static NSProcessInfoThermalStateDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSProcessInfoPowerStateDidChangeNotification: &'static NSNotificationName; + pub static NSProcessInfoPowerStateDidChangeNotification: &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 8e3555bfb..a3a20b9fe 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -218,66 +218,66 @@ extern_methods!( pub type NSProgressReporting = NSObject; extern "C" { - static NSProgressEstimatedTimeRemainingKey: &'static NSProgressUserInfoKey; + pub static NSProgressEstimatedTimeRemainingKey: &'static NSProgressUserInfoKey; } extern "C" { - static NSProgressThroughputKey: &'static NSProgressUserInfoKey; + pub static NSProgressThroughputKey: &'static NSProgressUserInfoKey; } extern "C" { - static NSProgressKindFile: &'static NSProgressKind; + pub static NSProgressKindFile: &'static NSProgressKind; } extern "C" { - static NSProgressFileOperationKindKey: &'static NSProgressUserInfoKey; + pub static NSProgressFileOperationKindKey: &'static NSProgressUserInfoKey; } extern "C" { - static NSProgressFileOperationKindDownloading: &'static NSProgressFileOperationKind; + pub static NSProgressFileOperationKindDownloading: &'static NSProgressFileOperationKind; } extern "C" { - static NSProgressFileOperationKindDecompressingAfterDownloading: + pub static NSProgressFileOperationKindDecompressingAfterDownloading: &'static NSProgressFileOperationKind; } extern "C" { - static NSProgressFileOperationKindReceiving: &'static NSProgressFileOperationKind; + pub static NSProgressFileOperationKindReceiving: &'static NSProgressFileOperationKind; } extern "C" { - static NSProgressFileOperationKindCopying: &'static NSProgressFileOperationKind; + pub static NSProgressFileOperationKindCopying: &'static NSProgressFileOperationKind; } extern "C" { - static NSProgressFileOperationKindUploading: &'static NSProgressFileOperationKind; + pub static NSProgressFileOperationKindUploading: &'static NSProgressFileOperationKind; } extern "C" { - static NSProgressFileOperationKindDuplicating: &'static NSProgressFileOperationKind; + pub static NSProgressFileOperationKindDuplicating: &'static NSProgressFileOperationKind; } extern "C" { - static NSProgressFileURLKey: &'static NSProgressUserInfoKey; + pub static NSProgressFileURLKey: &'static NSProgressUserInfoKey; } extern "C" { - static NSProgressFileTotalCountKey: &'static NSProgressUserInfoKey; + pub static NSProgressFileTotalCountKey: &'static NSProgressUserInfoKey; } extern "C" { - static NSProgressFileCompletedCountKey: &'static NSProgressUserInfoKey; + pub static NSProgressFileCompletedCountKey: &'static NSProgressUserInfoKey; } extern "C" { - static NSProgressFileAnimationImageKey: &'static NSProgressUserInfoKey; + pub static NSProgressFileAnimationImageKey: &'static NSProgressUserInfoKey; } extern "C" { - static NSProgressFileAnimationImageOriginalRectKey: &'static NSProgressUserInfoKey; + pub static NSProgressFileAnimationImageOriginalRectKey: &'static NSProgressUserInfoKey; } extern "C" { - static NSProgressFileIconKey: &'static NSProgressUserInfoKey; + pub static NSProgressFileIconKey: &'static NSProgressUserInfoKey; } diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index f191f6a78..f6b3d797f 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -4,11 +4,11 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSDefaultRunLoopMode: &'static NSRunLoopMode; + pub static NSDefaultRunLoopMode: &'static NSRunLoopMode; } extern "C" { - static NSRunLoopCommonModes: &'static NSRunLoopMode; + pub static NSRunLoopCommonModes: &'static NSRunLoopMode; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index 094dc08fd..e965234c3 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSOperationNotSupportedForKeyException: &'static NSString; + pub static NSOperationNotSupportedForKeyException: &'static NSString; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index c716341db..187da21cb 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -40,15 +40,15 @@ extern_methods!( ); extern "C" { - static NSGrammarRange: &'static NSString; + pub static NSGrammarRange: &'static NSString; } extern "C" { - static NSGrammarUserDescription: &'static NSString; + pub static NSGrammarUserDescription: &'static NSString; } extern "C" { - static NSGrammarCorrections: &'static NSString; + pub static NSGrammarCorrections: &'static NSString; } pub type NSSpellServerDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 81b7392e4..49515cebf 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -227,105 +227,105 @@ extern_methods!( pub type NSStreamDelegate = NSObject; extern "C" { - static NSStreamSocketSecurityLevelKey: &'static NSStreamPropertyKey; + pub static NSStreamSocketSecurityLevelKey: &'static NSStreamPropertyKey; } pub type NSStreamSocketSecurityLevel = NSString; extern "C" { - static NSStreamSocketSecurityLevelNone: &'static NSStreamSocketSecurityLevel; + pub static NSStreamSocketSecurityLevelNone: &'static NSStreamSocketSecurityLevel; } extern "C" { - static NSStreamSocketSecurityLevelSSLv2: &'static NSStreamSocketSecurityLevel; + pub static NSStreamSocketSecurityLevelSSLv2: &'static NSStreamSocketSecurityLevel; } extern "C" { - static NSStreamSocketSecurityLevelSSLv3: &'static NSStreamSocketSecurityLevel; + pub static NSStreamSocketSecurityLevelSSLv3: &'static NSStreamSocketSecurityLevel; } extern "C" { - static NSStreamSocketSecurityLevelTLSv1: &'static NSStreamSocketSecurityLevel; + pub static NSStreamSocketSecurityLevelTLSv1: &'static NSStreamSocketSecurityLevel; } extern "C" { - static NSStreamSocketSecurityLevelNegotiatedSSL: &'static NSStreamSocketSecurityLevel; + pub static NSStreamSocketSecurityLevelNegotiatedSSL: &'static NSStreamSocketSecurityLevel; } extern "C" { - static NSStreamSOCKSProxyConfigurationKey: &'static NSStreamPropertyKey; + pub static NSStreamSOCKSProxyConfigurationKey: &'static NSStreamPropertyKey; } pub type NSStreamSOCKSProxyConfiguration = NSString; extern "C" { - static NSStreamSOCKSProxyHostKey: &'static NSStreamSOCKSProxyConfiguration; + pub static NSStreamSOCKSProxyHostKey: &'static NSStreamSOCKSProxyConfiguration; } extern "C" { - static NSStreamSOCKSProxyPortKey: &'static NSStreamSOCKSProxyConfiguration; + pub static NSStreamSOCKSProxyPortKey: &'static NSStreamSOCKSProxyConfiguration; } extern "C" { - static NSStreamSOCKSProxyVersionKey: &'static NSStreamSOCKSProxyConfiguration; + pub static NSStreamSOCKSProxyVersionKey: &'static NSStreamSOCKSProxyConfiguration; } extern "C" { - static NSStreamSOCKSProxyUserKey: &'static NSStreamSOCKSProxyConfiguration; + pub static NSStreamSOCKSProxyUserKey: &'static NSStreamSOCKSProxyConfiguration; } extern "C" { - static NSStreamSOCKSProxyPasswordKey: &'static NSStreamSOCKSProxyConfiguration; + pub static NSStreamSOCKSProxyPasswordKey: &'static NSStreamSOCKSProxyConfiguration; } pub type NSStreamSOCKSProxyVersion = NSString; extern "C" { - static NSStreamSOCKSProxyVersion4: &'static NSStreamSOCKSProxyVersion; + pub static NSStreamSOCKSProxyVersion4: &'static NSStreamSOCKSProxyVersion; } extern "C" { - static NSStreamSOCKSProxyVersion5: &'static NSStreamSOCKSProxyVersion; + pub static NSStreamSOCKSProxyVersion5: &'static NSStreamSOCKSProxyVersion; } extern "C" { - static NSStreamDataWrittenToMemoryStreamKey: &'static NSStreamPropertyKey; + pub static NSStreamDataWrittenToMemoryStreamKey: &'static NSStreamPropertyKey; } extern "C" { - static NSStreamFileCurrentOffsetKey: &'static NSStreamPropertyKey; + pub static NSStreamFileCurrentOffsetKey: &'static NSStreamPropertyKey; } extern "C" { - static NSStreamSocketSSLErrorDomain: &'static NSErrorDomain; + pub static NSStreamSocketSSLErrorDomain: &'static NSErrorDomain; } extern "C" { - static NSStreamSOCKSErrorDomain: &'static NSErrorDomain; + pub static NSStreamSOCKSErrorDomain: &'static NSErrorDomain; } extern "C" { - static NSStreamNetworkServiceType: &'static NSStreamPropertyKey; + pub static NSStreamNetworkServiceType: &'static NSStreamPropertyKey; } pub type NSStreamNetworkServiceTypeValue = NSString; extern "C" { - static NSStreamNetworkServiceTypeVoIP: &'static NSStreamNetworkServiceTypeValue; + pub static NSStreamNetworkServiceTypeVoIP: &'static NSStreamNetworkServiceTypeValue; } extern "C" { - static NSStreamNetworkServiceTypeVideo: &'static NSStreamNetworkServiceTypeValue; + pub static NSStreamNetworkServiceTypeVideo: &'static NSStreamNetworkServiceTypeValue; } extern "C" { - static NSStreamNetworkServiceTypeBackground: &'static NSStreamNetworkServiceTypeValue; + pub static NSStreamNetworkServiceTypeBackground: &'static NSStreamNetworkServiceTypeValue; } extern "C" { - static NSStreamNetworkServiceTypeVoice: &'static NSStreamNetworkServiceTypeValue; + pub static NSStreamNetworkServiceTypeVoice: &'static NSStreamNetworkServiceTypeValue; } extern "C" { - static NSStreamNetworkServiceTypeCallSignaling: &'static NSStreamNetworkServiceTypeValue; + pub static NSStreamNetworkServiceTypeCallSignaling: &'static NSStreamNetworkServiceTypeValue; } diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index c9d5c6f03..2b14e5a42 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -84,67 +84,67 @@ pub const NSStringEnumerationLocalized: NSStringEnumerationOptions = 1 << 10; pub type NSStringTransform = NSString; extern "C" { - static NSStringTransformLatinToKatakana: &'static NSStringTransform; + pub static NSStringTransformLatinToKatakana: &'static NSStringTransform; } extern "C" { - static NSStringTransformLatinToHiragana: &'static NSStringTransform; + pub static NSStringTransformLatinToHiragana: &'static NSStringTransform; } extern "C" { - static NSStringTransformLatinToHangul: &'static NSStringTransform; + pub static NSStringTransformLatinToHangul: &'static NSStringTransform; } extern "C" { - static NSStringTransformLatinToArabic: &'static NSStringTransform; + pub static NSStringTransformLatinToArabic: &'static NSStringTransform; } extern "C" { - static NSStringTransformLatinToHebrew: &'static NSStringTransform; + pub static NSStringTransformLatinToHebrew: &'static NSStringTransform; } extern "C" { - static NSStringTransformLatinToThai: &'static NSStringTransform; + pub static NSStringTransformLatinToThai: &'static NSStringTransform; } extern "C" { - static NSStringTransformLatinToCyrillic: &'static NSStringTransform; + pub static NSStringTransformLatinToCyrillic: &'static NSStringTransform; } extern "C" { - static NSStringTransformLatinToGreek: &'static NSStringTransform; + pub static NSStringTransformLatinToGreek: &'static NSStringTransform; } extern "C" { - static NSStringTransformToLatin: &'static NSStringTransform; + pub static NSStringTransformToLatin: &'static NSStringTransform; } extern "C" { - static NSStringTransformMandarinToLatin: &'static NSStringTransform; + pub static NSStringTransformMandarinToLatin: &'static NSStringTransform; } extern "C" { - static NSStringTransformHiraganaToKatakana: &'static NSStringTransform; + pub static NSStringTransformHiraganaToKatakana: &'static NSStringTransform; } extern "C" { - static NSStringTransformFullwidthToHalfwidth: &'static NSStringTransform; + pub static NSStringTransformFullwidthToHalfwidth: &'static NSStringTransform; } extern "C" { - static NSStringTransformToXMLHex: &'static NSStringTransform; + pub static NSStringTransformToXMLHex: &'static NSStringTransform; } extern "C" { - static NSStringTransformToUnicodeName: &'static NSStringTransform; + pub static NSStringTransformToUnicodeName: &'static NSStringTransform; } extern "C" { - static NSStringTransformStripCombiningMarks: &'static NSStringTransform; + pub static NSStringTransformStripCombiningMarks: &'static NSStringTransform; } extern "C" { - static NSStringTransformStripDiacritics: &'static NSStringTransform; + pub static NSStringTransformStripDiacritics: &'static NSStringTransform; } extern_methods!( @@ -705,35 +705,37 @@ extern_methods!( pub type NSStringEncodingDetectionOptionsKey = NSString; extern "C" { - static NSStringEncodingDetectionSuggestedEncodingsKey: + pub static NSStringEncodingDetectionSuggestedEncodingsKey: &'static NSStringEncodingDetectionOptionsKey; } extern "C" { - static NSStringEncodingDetectionDisallowedEncodingsKey: + pub static NSStringEncodingDetectionDisallowedEncodingsKey: &'static NSStringEncodingDetectionOptionsKey; } extern "C" { - static NSStringEncodingDetectionUseOnlySuggestedEncodingsKey: + pub static NSStringEncodingDetectionUseOnlySuggestedEncodingsKey: &'static NSStringEncodingDetectionOptionsKey; } extern "C" { - static NSStringEncodingDetectionAllowLossyKey: &'static NSStringEncodingDetectionOptionsKey; + pub static NSStringEncodingDetectionAllowLossyKey: &'static NSStringEncodingDetectionOptionsKey; } extern "C" { - static NSStringEncodingDetectionFromWindowsKey: &'static NSStringEncodingDetectionOptionsKey; + pub static NSStringEncodingDetectionFromWindowsKey: + &'static NSStringEncodingDetectionOptionsKey; } extern "C" { - static NSStringEncodingDetectionLossySubstitutionKey: + pub static NSStringEncodingDetectionLossySubstitutionKey: &'static NSStringEncodingDetectionOptionsKey; } extern "C" { - static NSStringEncodingDetectionLikelyLanguageKey: &'static NSStringEncodingDetectionOptionsKey; + pub static NSStringEncodingDetectionLikelyLanguageKey: + &'static NSStringEncodingDetectionOptionsKey; } extern_methods!( @@ -816,11 +818,11 @@ extern_methods!( ); extern "C" { - static NSCharacterConversionException: &'static NSExceptionName; + pub static NSCharacterConversionException: &'static NSExceptionName; } extern "C" { - static NSParseErrorException: &'static NSExceptionName; + pub static NSParseErrorException: &'static NSExceptionName; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index f32494ac6..07391bcb4 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -147,5 +147,5 @@ extern_methods!( ); extern "C" { - static NSTaskDidTerminateNotification: &'static NSNotificationName; + pub static NSTaskDidTerminateNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index af70b339e..79baf5347 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -108,47 +108,47 @@ extern_methods!( ); extern "C" { - static NSTextCheckingNameKey: &'static NSTextCheckingKey; + pub static NSTextCheckingNameKey: &'static NSTextCheckingKey; } extern "C" { - static NSTextCheckingJobTitleKey: &'static NSTextCheckingKey; + pub static NSTextCheckingJobTitleKey: &'static NSTextCheckingKey; } extern "C" { - static NSTextCheckingOrganizationKey: &'static NSTextCheckingKey; + pub static NSTextCheckingOrganizationKey: &'static NSTextCheckingKey; } extern "C" { - static NSTextCheckingStreetKey: &'static NSTextCheckingKey; + pub static NSTextCheckingStreetKey: &'static NSTextCheckingKey; } extern "C" { - static NSTextCheckingCityKey: &'static NSTextCheckingKey; + pub static NSTextCheckingCityKey: &'static NSTextCheckingKey; } extern "C" { - static NSTextCheckingStateKey: &'static NSTextCheckingKey; + pub static NSTextCheckingStateKey: &'static NSTextCheckingKey; } extern "C" { - static NSTextCheckingZIPKey: &'static NSTextCheckingKey; + pub static NSTextCheckingZIPKey: &'static NSTextCheckingKey; } extern "C" { - static NSTextCheckingCountryKey: &'static NSTextCheckingKey; + pub static NSTextCheckingCountryKey: &'static NSTextCheckingKey; } extern "C" { - static NSTextCheckingPhoneKey: &'static NSTextCheckingKey; + pub static NSTextCheckingPhoneKey: &'static NSTextCheckingKey; } extern "C" { - static NSTextCheckingAirlineKey: &'static NSTextCheckingKey; + pub static NSTextCheckingAirlineKey: &'static NSTextCheckingKey; } extern "C" { - static NSTextCheckingFlightKey: &'static NSTextCheckingKey; + pub static NSTextCheckingFlightKey: &'static NSTextCheckingKey; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 707146bf8..bff1bea3e 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -110,15 +110,15 @@ extern_methods!( ); extern "C" { - static NSWillBecomeMultiThreadedNotification: &'static NSNotificationName; + pub static NSWillBecomeMultiThreadedNotification: &'static NSNotificationName; } extern "C" { - static NSDidBecomeSingleThreadedNotification: &'static NSNotificationName; + pub static NSDidBecomeSingleThreadedNotification: &'static NSNotificationName; } extern "C" { - static NSThreadWillExitNotification: &'static NSNotificationName; + pub static NSThreadWillExitNotification: &'static NSNotificationName; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 165175db2..b1b2d93ee 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -142,5 +142,5 @@ extern_methods!( ); extern "C" { - static NSSystemTimeZoneDidChangeNotification: &'static NSNotificationName; + pub static NSSystemTimeZoneDidChangeNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index f8313caf8..4fd23405b 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -6,584 +6,585 @@ use crate::Foundation::*; pub type NSURLResourceKey = NSString; extern "C" { - static NSURLFileScheme: &'static NSString; + pub static NSURLFileScheme: &'static NSString; } extern "C" { - static NSURLKeysOfUnsetValuesKey: &'static NSURLResourceKey; + pub static NSURLKeysOfUnsetValuesKey: &'static NSURLResourceKey; } extern "C" { - static NSURLNameKey: &'static NSURLResourceKey; + pub static NSURLNameKey: &'static NSURLResourceKey; } extern "C" { - static NSURLLocalizedNameKey: &'static NSURLResourceKey; + pub static NSURLLocalizedNameKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsRegularFileKey: &'static NSURLResourceKey; + pub static NSURLIsRegularFileKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsDirectoryKey: &'static NSURLResourceKey; + pub static NSURLIsDirectoryKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsSymbolicLinkKey: &'static NSURLResourceKey; + pub static NSURLIsSymbolicLinkKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsVolumeKey: &'static NSURLResourceKey; + pub static NSURLIsVolumeKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsPackageKey: &'static NSURLResourceKey; + pub static NSURLIsPackageKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsApplicationKey: &'static NSURLResourceKey; + pub static NSURLIsApplicationKey: &'static NSURLResourceKey; } extern "C" { - static NSURLApplicationIsScriptableKey: &'static NSURLResourceKey; + pub static NSURLApplicationIsScriptableKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsSystemImmutableKey: &'static NSURLResourceKey; + pub static NSURLIsSystemImmutableKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsUserImmutableKey: &'static NSURLResourceKey; + pub static NSURLIsUserImmutableKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsHiddenKey: &'static NSURLResourceKey; + pub static NSURLIsHiddenKey: &'static NSURLResourceKey; } extern "C" { - static NSURLHasHiddenExtensionKey: &'static NSURLResourceKey; + pub static NSURLHasHiddenExtensionKey: &'static NSURLResourceKey; } extern "C" { - static NSURLCreationDateKey: &'static NSURLResourceKey; + pub static NSURLCreationDateKey: &'static NSURLResourceKey; } extern "C" { - static NSURLContentAccessDateKey: &'static NSURLResourceKey; + pub static NSURLContentAccessDateKey: &'static NSURLResourceKey; } extern "C" { - static NSURLContentModificationDateKey: &'static NSURLResourceKey; + pub static NSURLContentModificationDateKey: &'static NSURLResourceKey; } extern "C" { - static NSURLAttributeModificationDateKey: &'static NSURLResourceKey; + pub static NSURLAttributeModificationDateKey: &'static NSURLResourceKey; } extern "C" { - static NSURLLinkCountKey: &'static NSURLResourceKey; + pub static NSURLLinkCountKey: &'static NSURLResourceKey; } extern "C" { - static NSURLParentDirectoryURLKey: &'static NSURLResourceKey; + pub static NSURLParentDirectoryURLKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeURLKey: &'static NSURLResourceKey; + pub static NSURLVolumeURLKey: &'static NSURLResourceKey; } extern "C" { - static NSURLTypeIdentifierKey: &'static NSURLResourceKey; + pub static NSURLTypeIdentifierKey: &'static NSURLResourceKey; } extern "C" { - static NSURLContentTypeKey: &'static NSURLResourceKey; + pub static NSURLContentTypeKey: &'static NSURLResourceKey; } extern "C" { - static NSURLLocalizedTypeDescriptionKey: &'static NSURLResourceKey; + pub static NSURLLocalizedTypeDescriptionKey: &'static NSURLResourceKey; } extern "C" { - static NSURLLabelNumberKey: &'static NSURLResourceKey; + pub static NSURLLabelNumberKey: &'static NSURLResourceKey; } extern "C" { - static NSURLLabelColorKey: &'static NSURLResourceKey; + pub static NSURLLabelColorKey: &'static NSURLResourceKey; } extern "C" { - static NSURLLocalizedLabelKey: &'static NSURLResourceKey; + pub static NSURLLocalizedLabelKey: &'static NSURLResourceKey; } extern "C" { - static NSURLEffectiveIconKey: &'static NSURLResourceKey; + pub static NSURLEffectiveIconKey: &'static NSURLResourceKey; } extern "C" { - static NSURLCustomIconKey: &'static NSURLResourceKey; + pub static NSURLCustomIconKey: &'static NSURLResourceKey; } extern "C" { - static NSURLFileResourceIdentifierKey: &'static NSURLResourceKey; + pub static NSURLFileResourceIdentifierKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIdentifierKey: &'static NSURLResourceKey; + pub static NSURLVolumeIdentifierKey: &'static NSURLResourceKey; } extern "C" { - static NSURLPreferredIOBlockSizeKey: &'static NSURLResourceKey; + pub static NSURLPreferredIOBlockSizeKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsReadableKey: &'static NSURLResourceKey; + pub static NSURLIsReadableKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsWritableKey: &'static NSURLResourceKey; + pub static NSURLIsWritableKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsExecutableKey: &'static NSURLResourceKey; + pub static NSURLIsExecutableKey: &'static NSURLResourceKey; } extern "C" { - static NSURLFileSecurityKey: &'static NSURLResourceKey; + pub static NSURLFileSecurityKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsExcludedFromBackupKey: &'static NSURLResourceKey; + pub static NSURLIsExcludedFromBackupKey: &'static NSURLResourceKey; } extern "C" { - static NSURLTagNamesKey: &'static NSURLResourceKey; + pub static NSURLTagNamesKey: &'static NSURLResourceKey; } extern "C" { - static NSURLPathKey: &'static NSURLResourceKey; + pub static NSURLPathKey: &'static NSURLResourceKey; } extern "C" { - static NSURLCanonicalPathKey: &'static NSURLResourceKey; + pub static NSURLCanonicalPathKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsMountTriggerKey: &'static NSURLResourceKey; + pub static NSURLIsMountTriggerKey: &'static NSURLResourceKey; } extern "C" { - static NSURLGenerationIdentifierKey: &'static NSURLResourceKey; + pub static NSURLGenerationIdentifierKey: &'static NSURLResourceKey; } extern "C" { - static NSURLDocumentIdentifierKey: &'static NSURLResourceKey; + pub static NSURLDocumentIdentifierKey: &'static NSURLResourceKey; } extern "C" { - static NSURLAddedToDirectoryDateKey: &'static NSURLResourceKey; + pub static NSURLAddedToDirectoryDateKey: &'static NSURLResourceKey; } extern "C" { - static NSURLQuarantinePropertiesKey: &'static NSURLResourceKey; + pub static NSURLQuarantinePropertiesKey: &'static NSURLResourceKey; } extern "C" { - static NSURLFileResourceTypeKey: &'static NSURLResourceKey; + pub static NSURLFileResourceTypeKey: &'static NSURLResourceKey; } extern "C" { - static NSURLFileContentIdentifierKey: &'static NSURLResourceKey; + pub static NSURLFileContentIdentifierKey: &'static NSURLResourceKey; } extern "C" { - static NSURLMayShareFileContentKey: &'static NSURLResourceKey; + pub static NSURLMayShareFileContentKey: &'static NSURLResourceKey; } extern "C" { - static NSURLMayHaveExtendedAttributesKey: &'static NSURLResourceKey; + pub static NSURLMayHaveExtendedAttributesKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsPurgeableKey: &'static NSURLResourceKey; + pub static NSURLIsPurgeableKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsSparseKey: &'static NSURLResourceKey; + pub static NSURLIsSparseKey: &'static NSURLResourceKey; } pub type NSURLFileResourceType = NSString; extern "C" { - static NSURLFileResourceTypeNamedPipe: &'static NSURLFileResourceType; + pub static NSURLFileResourceTypeNamedPipe: &'static NSURLFileResourceType; } extern "C" { - static NSURLFileResourceTypeCharacterSpecial: &'static NSURLFileResourceType; + pub static NSURLFileResourceTypeCharacterSpecial: &'static NSURLFileResourceType; } extern "C" { - static NSURLFileResourceTypeDirectory: &'static NSURLFileResourceType; + pub static NSURLFileResourceTypeDirectory: &'static NSURLFileResourceType; } extern "C" { - static NSURLFileResourceTypeBlockSpecial: &'static NSURLFileResourceType; + pub static NSURLFileResourceTypeBlockSpecial: &'static NSURLFileResourceType; } extern "C" { - static NSURLFileResourceTypeRegular: &'static NSURLFileResourceType; + pub static NSURLFileResourceTypeRegular: &'static NSURLFileResourceType; } extern "C" { - static NSURLFileResourceTypeSymbolicLink: &'static NSURLFileResourceType; + pub static NSURLFileResourceTypeSymbolicLink: &'static NSURLFileResourceType; } extern "C" { - static NSURLFileResourceTypeSocket: &'static NSURLFileResourceType; + pub static NSURLFileResourceTypeSocket: &'static NSURLFileResourceType; } extern "C" { - static NSURLFileResourceTypeUnknown: &'static NSURLFileResourceType; + pub static NSURLFileResourceTypeUnknown: &'static NSURLFileResourceType; } extern "C" { - static NSURLThumbnailDictionaryKey: &'static NSURLResourceKey; + pub static NSURLThumbnailDictionaryKey: &'static NSURLResourceKey; } extern "C" { - static NSURLThumbnailKey: &'static NSURLResourceKey; + pub static NSURLThumbnailKey: &'static NSURLResourceKey; } pub type NSURLThumbnailDictionaryItem = NSString; extern "C" { - static NSThumbnail1024x1024SizeKey: &'static NSURLThumbnailDictionaryItem; + pub static NSThumbnail1024x1024SizeKey: &'static NSURLThumbnailDictionaryItem; } extern "C" { - static NSURLFileSizeKey: &'static NSURLResourceKey; + pub static NSURLFileSizeKey: &'static NSURLResourceKey; } extern "C" { - static NSURLFileAllocatedSizeKey: &'static NSURLResourceKey; + pub static NSURLFileAllocatedSizeKey: &'static NSURLResourceKey; } extern "C" { - static NSURLTotalFileSizeKey: &'static NSURLResourceKey; + pub static NSURLTotalFileSizeKey: &'static NSURLResourceKey; } extern "C" { - static NSURLTotalFileAllocatedSizeKey: &'static NSURLResourceKey; + pub static NSURLTotalFileAllocatedSizeKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsAliasFileKey: &'static NSURLResourceKey; + pub static NSURLIsAliasFileKey: &'static NSURLResourceKey; } extern "C" { - static NSURLFileProtectionKey: &'static NSURLResourceKey; + pub static NSURLFileProtectionKey: &'static NSURLResourceKey; } pub type NSURLFileProtectionType = NSString; extern "C" { - static NSURLFileProtectionNone: &'static NSURLFileProtectionType; + pub static NSURLFileProtectionNone: &'static NSURLFileProtectionType; } extern "C" { - static NSURLFileProtectionComplete: &'static NSURLFileProtectionType; + pub static NSURLFileProtectionComplete: &'static NSURLFileProtectionType; } extern "C" { - static NSURLFileProtectionCompleteUnlessOpen: &'static NSURLFileProtectionType; + pub static NSURLFileProtectionCompleteUnlessOpen: &'static NSURLFileProtectionType; } extern "C" { - static NSURLFileProtectionCompleteUntilFirstUserAuthentication: + pub static NSURLFileProtectionCompleteUntilFirstUserAuthentication: &'static NSURLFileProtectionType; } extern "C" { - static NSURLVolumeLocalizedFormatDescriptionKey: &'static NSURLResourceKey; + pub static NSURLVolumeLocalizedFormatDescriptionKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeTotalCapacityKey: &'static NSURLResourceKey; + pub static NSURLVolumeTotalCapacityKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeAvailableCapacityKey: &'static NSURLResourceKey; + pub static NSURLVolumeAvailableCapacityKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeResourceCountKey: &'static NSURLResourceKey; + pub static NSURLVolumeResourceCountKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsPersistentIDsKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsPersistentIDsKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsSymbolicLinksKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsSymbolicLinksKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsHardLinksKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsHardLinksKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsJournalingKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsJournalingKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIsJournalingKey: &'static NSURLResourceKey; + pub static NSURLVolumeIsJournalingKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsSparseFilesKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsSparseFilesKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsZeroRunsKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsZeroRunsKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsCaseSensitiveNamesKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsCaseSensitiveNamesKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsCasePreservedNamesKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsCasePreservedNamesKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsRootDirectoryDatesKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsRootDirectoryDatesKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsVolumeSizesKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsVolumeSizesKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsRenamingKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsRenamingKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsAdvisoryFileLockingKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsAdvisoryFileLockingKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsExtendedSecurityKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsExtendedSecurityKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIsBrowsableKey: &'static NSURLResourceKey; + pub static NSURLVolumeIsBrowsableKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeMaximumFileSizeKey: &'static NSURLResourceKey; + pub static NSURLVolumeMaximumFileSizeKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIsEjectableKey: &'static NSURLResourceKey; + pub static NSURLVolumeIsEjectableKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIsRemovableKey: &'static NSURLResourceKey; + pub static NSURLVolumeIsRemovableKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIsInternalKey: &'static NSURLResourceKey; + pub static NSURLVolumeIsInternalKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIsAutomountedKey: &'static NSURLResourceKey; + pub static NSURLVolumeIsAutomountedKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIsLocalKey: &'static NSURLResourceKey; + pub static NSURLVolumeIsLocalKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIsReadOnlyKey: &'static NSURLResourceKey; + pub static NSURLVolumeIsReadOnlyKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeCreationDateKey: &'static NSURLResourceKey; + pub static NSURLVolumeCreationDateKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeURLForRemountingKey: &'static NSURLResourceKey; + pub static NSURLVolumeURLForRemountingKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeUUIDStringKey: &'static NSURLResourceKey; + pub static NSURLVolumeUUIDStringKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeNameKey: &'static NSURLResourceKey; + pub static NSURLVolumeNameKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeLocalizedNameKey: &'static NSURLResourceKey; + pub static NSURLVolumeLocalizedNameKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIsEncryptedKey: &'static NSURLResourceKey; + pub static NSURLVolumeIsEncryptedKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeIsRootFileSystemKey: &'static NSURLResourceKey; + pub static NSURLVolumeIsRootFileSystemKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsCompressionKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsCompressionKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsFileCloningKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsFileCloningKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsSwapRenamingKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsSwapRenamingKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsExclusiveRenamingKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsExclusiveRenamingKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsImmutableFilesKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsImmutableFilesKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsAccessPermissionsKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsAccessPermissionsKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeSupportsFileProtectionKey: &'static NSURLResourceKey; + pub static NSURLVolumeSupportsFileProtectionKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeAvailableCapacityForImportantUsageKey: &'static NSURLResourceKey; + pub static NSURLVolumeAvailableCapacityForImportantUsageKey: &'static NSURLResourceKey; } extern "C" { - static NSURLVolumeAvailableCapacityForOpportunisticUsageKey: &'static NSURLResourceKey; + pub static NSURLVolumeAvailableCapacityForOpportunisticUsageKey: &'static NSURLResourceKey; } extern "C" { - static NSURLIsUbiquitousItemKey: &'static NSURLResourceKey; + pub static NSURLIsUbiquitousItemKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemHasUnresolvedConflictsKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemHasUnresolvedConflictsKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemIsDownloadedKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemIsDownloadedKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemIsDownloadingKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemIsDownloadingKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemIsUploadedKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemIsUploadedKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemIsUploadingKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemIsUploadingKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemPercentDownloadedKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemPercentDownloadedKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemPercentUploadedKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemPercentUploadedKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemDownloadingStatusKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemDownloadingStatusKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemDownloadingErrorKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemDownloadingErrorKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemUploadingErrorKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemUploadingErrorKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemDownloadRequestedKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemDownloadRequestedKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemContainerDisplayNameKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemContainerDisplayNameKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemIsExcludedFromSyncKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemIsExcludedFromSyncKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousItemIsSharedKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousItemIsSharedKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousSharedItemCurrentUserRoleKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousSharedItemCurrentUserRoleKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousSharedItemOwnerNameComponentsKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousSharedItemOwnerNameComponentsKey: &'static NSURLResourceKey; } extern "C" { - static NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey: &'static NSURLResourceKey; + pub static NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey: + &'static NSURLResourceKey; } pub type NSURLUbiquitousItemDownloadingStatus = NSString; extern "C" { - static NSURLUbiquitousItemDownloadingStatusNotDownloaded: + pub static NSURLUbiquitousItemDownloadingStatusNotDownloaded: &'static NSURLUbiquitousItemDownloadingStatus; } extern "C" { - static NSURLUbiquitousItemDownloadingStatusDownloaded: + pub static NSURLUbiquitousItemDownloadingStatusDownloaded: &'static NSURLUbiquitousItemDownloadingStatus; } extern "C" { - static NSURLUbiquitousItemDownloadingStatusCurrent: + pub static NSURLUbiquitousItemDownloadingStatusCurrent: &'static NSURLUbiquitousItemDownloadingStatus; } pub type NSURLUbiquitousSharedItemRole = NSString; extern "C" { - static NSURLUbiquitousSharedItemRoleOwner: &'static NSURLUbiquitousSharedItemRole; + pub static NSURLUbiquitousSharedItemRoleOwner: &'static NSURLUbiquitousSharedItemRole; } extern "C" { - static NSURLUbiquitousSharedItemRoleParticipant: &'static NSURLUbiquitousSharedItemRole; + pub static NSURLUbiquitousSharedItemRoleParticipant: &'static NSURLUbiquitousSharedItemRole; } pub type NSURLUbiquitousSharedItemPermissions = NSString; extern "C" { - static NSURLUbiquitousSharedItemPermissionsReadOnly: + pub static NSURLUbiquitousSharedItemPermissionsReadOnly: &'static NSURLUbiquitousSharedItemPermissions; } extern "C" { - static NSURLUbiquitousSharedItemPermissionsReadWrite: + pub static NSURLUbiquitousSharedItemPermissionsReadWrite: &'static NSURLUbiquitousSharedItemPermissions; } diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index b16a5a1bc..c43f6cf7b 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -112,9 +112,9 @@ extern_methods!( ); extern "C" { - static NSURLCredentialStorageChangedNotification: &'static NSNotificationName; + pub static NSURLCredentialStorageChangedNotification: &'static NSNotificationName; } extern "C" { - static NSURLCredentialStorageRemoveSynchronizableCredentials: &'static NSString; + pub static NSURLCredentialStorageRemoveSynchronizableCredentials: &'static NSString; } diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index eed9761ee..f3c4dd4b1 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -4,27 +4,27 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSURLErrorDomain: &'static NSErrorDomain; + pub static NSURLErrorDomain: &'static NSErrorDomain; } extern "C" { - static NSURLErrorFailingURLErrorKey: &'static NSString; + pub static NSURLErrorFailingURLErrorKey: &'static NSString; } extern "C" { - static NSURLErrorFailingURLStringErrorKey: &'static NSString; + pub static NSURLErrorFailingURLStringErrorKey: &'static NSString; } extern "C" { - static NSErrorFailingURLStringKey: &'static NSString; + pub static NSErrorFailingURLStringKey: &'static NSString; } extern "C" { - static NSURLErrorFailingURLPeerTrustErrorKey: &'static NSString; + pub static NSURLErrorFailingURLPeerTrustErrorKey: &'static NSString; } extern "C" { - static NSURLErrorBackgroundTaskCancelledReasonKey: &'static NSString; + pub static NSURLErrorBackgroundTaskCancelledReasonKey: &'static NSString; } pub const NSURLErrorCancelledReasonUserForceQuitApplication: i32 = 0; @@ -32,7 +32,7 @@ pub const NSURLErrorCancelledReasonBackgroundUpdatesDisabled: i32 = 1; pub const NSURLErrorCancelledReasonInsufficientSystemResources: i32 = 2; extern "C" { - static NSURLErrorNetworkUnavailableReasonKey: &'static NSErrorUserInfoKey; + pub static NSURLErrorNetworkUnavailableReasonKey: &'static NSErrorUserInfoKey; } pub type NSURLErrorNetworkUnavailableReason = NSInteger; diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 59b3d3d01..6dc157a2a 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -4,47 +4,47 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSHTTPPropertyStatusCodeKey: Option<&'static NSString>; + pub static NSHTTPPropertyStatusCodeKey: Option<&'static NSString>; } extern "C" { - static NSHTTPPropertyStatusReasonKey: Option<&'static NSString>; + pub static NSHTTPPropertyStatusReasonKey: Option<&'static NSString>; } extern "C" { - static NSHTTPPropertyServerHTTPVersionKey: Option<&'static NSString>; + pub static NSHTTPPropertyServerHTTPVersionKey: Option<&'static NSString>; } extern "C" { - static NSHTTPPropertyRedirectionHeadersKey: Option<&'static NSString>; + pub static NSHTTPPropertyRedirectionHeadersKey: Option<&'static NSString>; } extern "C" { - static NSHTTPPropertyErrorPageDataKey: Option<&'static NSString>; + pub static NSHTTPPropertyErrorPageDataKey: Option<&'static NSString>; } extern "C" { - static NSHTTPPropertyHTTPProxy: Option<&'static NSString>; + pub static NSHTTPPropertyHTTPProxy: Option<&'static NSString>; } extern "C" { - static NSFTPPropertyUserLoginKey: Option<&'static NSString>; + pub static NSFTPPropertyUserLoginKey: Option<&'static NSString>; } extern "C" { - static NSFTPPropertyUserPasswordKey: Option<&'static NSString>; + pub static NSFTPPropertyUserPasswordKey: Option<&'static NSString>; } extern "C" { - static NSFTPPropertyActiveTransferModeKey: Option<&'static NSString>; + pub static NSFTPPropertyActiveTransferModeKey: Option<&'static NSString>; } extern "C" { - static NSFTPPropertyFileOffsetKey: Option<&'static NSString>; + pub static NSFTPPropertyFileOffsetKey: Option<&'static NSString>; } extern "C" { - static NSFTPPropertyFTPProxy: Option<&'static NSString>; + pub static NSFTPPropertyFTPProxy: Option<&'static NSString>; } pub type NSURLHandleStatus = NSUInteger; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 52134b661..c52c03b80 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -4,63 +4,63 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSURLProtectionSpaceHTTP: &'static NSString; + pub static NSURLProtectionSpaceHTTP: &'static NSString; } extern "C" { - static NSURLProtectionSpaceHTTPS: &'static NSString; + pub static NSURLProtectionSpaceHTTPS: &'static NSString; } extern "C" { - static NSURLProtectionSpaceFTP: &'static NSString; + pub static NSURLProtectionSpaceFTP: &'static NSString; } extern "C" { - static NSURLProtectionSpaceHTTPProxy: &'static NSString; + pub static NSURLProtectionSpaceHTTPProxy: &'static NSString; } extern "C" { - static NSURLProtectionSpaceHTTPSProxy: &'static NSString; + pub static NSURLProtectionSpaceHTTPSProxy: &'static NSString; } extern "C" { - static NSURLProtectionSpaceFTPProxy: &'static NSString; + pub static NSURLProtectionSpaceFTPProxy: &'static NSString; } extern "C" { - static NSURLProtectionSpaceSOCKSProxy: &'static NSString; + pub static NSURLProtectionSpaceSOCKSProxy: &'static NSString; } extern "C" { - static NSURLAuthenticationMethodDefault: &'static NSString; + pub static NSURLAuthenticationMethodDefault: &'static NSString; } extern "C" { - static NSURLAuthenticationMethodHTTPBasic: &'static NSString; + pub static NSURLAuthenticationMethodHTTPBasic: &'static NSString; } extern "C" { - static NSURLAuthenticationMethodHTTPDigest: &'static NSString; + pub static NSURLAuthenticationMethodHTTPDigest: &'static NSString; } extern "C" { - static NSURLAuthenticationMethodHTMLForm: &'static NSString; + pub static NSURLAuthenticationMethodHTMLForm: &'static NSString; } extern "C" { - static NSURLAuthenticationMethodNTLM: &'static NSString; + pub static NSURLAuthenticationMethodNTLM: &'static NSString; } extern "C" { - static NSURLAuthenticationMethodNegotiate: &'static NSString; + pub static NSURLAuthenticationMethodNegotiate: &'static NSString; } extern "C" { - static NSURLAuthenticationMethodClientCertificate: &'static NSString; + pub static NSURLAuthenticationMethodClientCertificate: &'static NSString; } extern "C" { - static NSURLAuthenticationMethodServerTrust: &'static NSString; + pub static NSURLAuthenticationMethodServerTrust: &'static NSString; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 78368cbc4..84e4b497e 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSURLSessionTransferSizeUnknown: i64; + pub static NSURLSessionTransferSizeUnknown: i64; } extern_class!( @@ -325,15 +325,15 @@ extern_methods!( ); extern "C" { - static NSURLSessionTaskPriorityDefault: c_float; + pub static NSURLSessionTaskPriorityDefault: c_float; } extern "C" { - static NSURLSessionTaskPriorityLow: c_float; + pub static NSURLSessionTaskPriorityLow: c_float; } extern "C" { - static NSURLSessionTaskPriorityHigh: c_float; + pub static NSURLSessionTaskPriorityHigh: c_float; } extern_class!( @@ -830,7 +830,7 @@ pub type NSURLSessionStreamDelegate = NSObject; pub type NSURLSessionWebSocketDelegate = NSObject; extern "C" { - static NSURLSessionDownloadTaskResumeData: &'static NSString; + pub static NSURLSessionDownloadTaskResumeData: &'static NSString; } extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 255a38175..75c57d105 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -85,15 +85,16 @@ extern_methods!( ); extern "C" { - static NSUbiquitousKeyValueStoreDidChangeExternallyNotification: &'static NSNotificationName; + pub static NSUbiquitousKeyValueStoreDidChangeExternallyNotification: + &'static NSNotificationName; } extern "C" { - static NSUbiquitousKeyValueStoreChangeReasonKey: &'static NSString; + pub static NSUbiquitousKeyValueStoreChangeReasonKey: &'static NSString; } extern "C" { - static NSUbiquitousKeyValueStoreChangedKeysKey: &'static NSString; + pub static NSUbiquitousKeyValueStoreChangedKeysKey: &'static NSString; } pub const NSUbiquitousKeyValueStoreServerChange: i32 = 0; diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index 2c74a446e..68a59aba4 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -3,10 +3,10 @@ use crate::common::*; use crate::Foundation::*; -static NSUndoCloseGroupingRunLoopOrdering: NSUInteger = 350000; +pub static NSUndoCloseGroupingRunLoopOrdering: NSUInteger = 350000; extern "C" { - static NSUndoManagerGroupIsDiscardableKey: &'static NSString; + pub static NSUndoManagerGroupIsDiscardableKey: &'static NSString; } extern_class!( @@ -140,33 +140,33 @@ extern_methods!( ); extern "C" { - static NSUndoManagerCheckpointNotification: &'static NSNotificationName; + pub static NSUndoManagerCheckpointNotification: &'static NSNotificationName; } extern "C" { - static NSUndoManagerWillUndoChangeNotification: &'static NSNotificationName; + pub static NSUndoManagerWillUndoChangeNotification: &'static NSNotificationName; } extern "C" { - static NSUndoManagerWillRedoChangeNotification: &'static NSNotificationName; + pub static NSUndoManagerWillRedoChangeNotification: &'static NSNotificationName; } extern "C" { - static NSUndoManagerDidUndoChangeNotification: &'static NSNotificationName; + pub static NSUndoManagerDidUndoChangeNotification: &'static NSNotificationName; } extern "C" { - static NSUndoManagerDidRedoChangeNotification: &'static NSNotificationName; + pub static NSUndoManagerDidRedoChangeNotification: &'static NSNotificationName; } extern "C" { - static NSUndoManagerDidOpenUndoGroupNotification: &'static NSNotificationName; + pub static NSUndoManagerDidOpenUndoGroupNotification: &'static NSNotificationName; } extern "C" { - static NSUndoManagerWillCloseUndoGroupNotification: &'static NSNotificationName; + pub static NSUndoManagerWillCloseUndoGroupNotification: &'static NSNotificationName; } extern "C" { - static NSUndoManagerDidCloseUndoGroupNotification: &'static NSNotificationName; + pub static NSUndoManagerDidCloseUndoGroupNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 3fd5b3561..1e286821f 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -159,7 +159,7 @@ extern_methods!( ); extern "C" { - static NSUserActivityTypeBrowsingWeb: &'static NSString; + pub static NSUserActivityTypeBrowsingWeb: &'static NSString; } pub type NSUserActivityDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index f5eb7bef9..c212882db 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -4,15 +4,15 @@ use crate::common::*; use crate::Foundation::*; extern "C" { - static NSGlobalDomain: &'static NSString; + pub static NSGlobalDomain: &'static NSString; } extern "C" { - static NSArgumentDomain: &'static NSString; + pub static NSArgumentDomain: &'static NSString; } extern "C" { - static NSRegistrationDomain: &'static NSString; + pub static NSRegistrationDomain: &'static NSString; } extern_class!( @@ -174,125 +174,126 @@ extern_methods!( ); extern "C" { - static NSUserDefaultsSizeLimitExceededNotification: &'static NSNotificationName; + pub static NSUserDefaultsSizeLimitExceededNotification: &'static NSNotificationName; } extern "C" { - static NSUbiquitousUserDefaultsNoCloudAccountNotification: &'static NSNotificationName; + pub static NSUbiquitousUserDefaultsNoCloudAccountNotification: &'static NSNotificationName; } extern "C" { - static NSUbiquitousUserDefaultsDidChangeAccountsNotification: &'static NSNotificationName; + pub static NSUbiquitousUserDefaultsDidChangeAccountsNotification: &'static NSNotificationName; } extern "C" { - static NSUbiquitousUserDefaultsCompletedInitialSyncNotification: &'static NSNotificationName; + pub static NSUbiquitousUserDefaultsCompletedInitialSyncNotification: + &'static NSNotificationName; } extern "C" { - static NSUserDefaultsDidChangeNotification: &'static NSNotificationName; + pub static NSUserDefaultsDidChangeNotification: &'static NSNotificationName; } extern "C" { - static NSWeekDayNameArray: &'static NSString; + pub static NSWeekDayNameArray: &'static NSString; } extern "C" { - static NSShortWeekDayNameArray: &'static NSString; + pub static NSShortWeekDayNameArray: &'static NSString; } extern "C" { - static NSMonthNameArray: &'static NSString; + pub static NSMonthNameArray: &'static NSString; } extern "C" { - static NSShortMonthNameArray: &'static NSString; + pub static NSShortMonthNameArray: &'static NSString; } extern "C" { - static NSTimeFormatString: &'static NSString; + pub static NSTimeFormatString: &'static NSString; } extern "C" { - static NSDateFormatString: &'static NSString; + pub static NSDateFormatString: &'static NSString; } extern "C" { - static NSTimeDateFormatString: &'static NSString; + pub static NSTimeDateFormatString: &'static NSString; } extern "C" { - static NSShortTimeDateFormatString: &'static NSString; + pub static NSShortTimeDateFormatString: &'static NSString; } extern "C" { - static NSCurrencySymbol: &'static NSString; + pub static NSCurrencySymbol: &'static NSString; } extern "C" { - static NSDecimalSeparator: &'static NSString; + pub static NSDecimalSeparator: &'static NSString; } extern "C" { - static NSThousandsSeparator: &'static NSString; + pub static NSThousandsSeparator: &'static NSString; } extern "C" { - static NSDecimalDigits: &'static NSString; + pub static NSDecimalDigits: &'static NSString; } extern "C" { - static NSAMPMDesignation: &'static NSString; + pub static NSAMPMDesignation: &'static NSString; } extern "C" { - static NSHourNameDesignations: &'static NSString; + pub static NSHourNameDesignations: &'static NSString; } extern "C" { - static NSYearMonthWeekDesignations: &'static NSString; + pub static NSYearMonthWeekDesignations: &'static NSString; } extern "C" { - static NSEarlierTimeDesignations: &'static NSString; + pub static NSEarlierTimeDesignations: &'static NSString; } extern "C" { - static NSLaterTimeDesignations: &'static NSString; + pub static NSLaterTimeDesignations: &'static NSString; } extern "C" { - static NSThisDayDesignations: &'static NSString; + pub static NSThisDayDesignations: &'static NSString; } extern "C" { - static NSNextDayDesignations: &'static NSString; + pub static NSNextDayDesignations: &'static NSString; } extern "C" { - static NSNextNextDayDesignations: &'static NSString; + pub static NSNextNextDayDesignations: &'static NSString; } extern "C" { - static NSPriorDayDesignations: &'static NSString; + pub static NSPriorDayDesignations: &'static NSString; } extern "C" { - static NSDateTimeOrdering: &'static NSString; + pub static NSDateTimeOrdering: &'static NSString; } extern "C" { - static NSInternationalCurrencyString: &'static NSString; + pub static NSInternationalCurrencyString: &'static NSString; } extern "C" { - static NSShortDateFormatString: &'static NSString; + pub static NSShortDateFormatString: &'static NSString; } extern "C" { - static NSPositiveCurrencyFormatString: &'static NSString; + pub static NSPositiveCurrencyFormatString: &'static NSString; } extern "C" { - static NSNegativeCurrencyFormatString: &'static NSString; + pub static NSNegativeCurrencyFormatString: &'static NSString; } diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index eccb5e5e4..2a4d7c0b2 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -177,7 +177,7 @@ extern_methods!( ); extern "C" { - static NSUserNotificationDefaultSoundName: &'static NSString; + pub static NSUserNotificationDefaultSoundName: &'static NSString; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index 42e16a31c..421a9a87c 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -6,27 +6,27 @@ use crate::Foundation::*; pub type NSValueTransformerName = NSString; extern "C" { - static NSNegateBooleanTransformerName: &'static NSValueTransformerName; + pub static NSNegateBooleanTransformerName: &'static NSValueTransformerName; } extern "C" { - static NSIsNilTransformerName: &'static NSValueTransformerName; + pub static NSIsNilTransformerName: &'static NSValueTransformerName; } extern "C" { - static NSIsNotNilTransformerName: &'static NSValueTransformerName; + pub static NSIsNotNilTransformerName: &'static NSValueTransformerName; } extern "C" { - static NSUnarchiveFromDataTransformerName: &'static NSValueTransformerName; + pub static NSUnarchiveFromDataTransformerName: &'static NSValueTransformerName; } extern "C" { - static NSKeyedUnarchiveFromDataTransformerName: &'static NSValueTransformerName; + pub static NSKeyedUnarchiveFromDataTransformerName: &'static NSValueTransformerName; } extern "C" { - static NSSecureUnarchiveFromDataTransformerName: &'static NSValueTransformerName; + pub static NSSecureUnarchiveFromDataTransformerName: &'static NSValueTransformerName; } extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 899db060d..7d3bd64e6 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -105,7 +105,7 @@ extern_methods!( pub type NSXMLParserDelegate = NSObject; extern "C" { - static NSXMLParserErrorDomain: &'static NSErrorDomain; + pub static NSXMLParserErrorDomain: &'static NSErrorDomain; } pub type NSXMLParserError = NSInteger; From 639ebdc9dc169924d7435104926b629a1df9aaff Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 21:45:47 +0100 Subject: [PATCH 098/131] Fix init methods --- crates/header-translator/src/method.rs | 26 +++++- crates/header-translator/src/rust_type.rs | 12 +++ .../AppKit/NSAccessibilityCustomAction.rs | 4 +- .../AppKit/NSAccessibilityCustomRotor.rs | 10 +-- .../src/generated/AppKit/NSAnimation.rs | 9 +- .../src/generated/AppKit/NSAppearance.rs | 7 +- .../generated/AppKit/NSAttributedString.rs | 22 ++--- .../src/generated/AppKit/NSBitmapImageRep.rs | 26 ++++-- .../src/generated/AppKit/NSBrowserCell.rs | 15 +++- .../src/generated/AppKit/NSButtonCell.rs | 15 +++- .../src/generated/AppKit/NSCIImageRep.rs | 7 +- .../src/generated/AppKit/NSCachedImageRep.rs | 4 +- crates/icrate/src/generated/AppKit/NSCell.rs | 17 +++- .../NSCollectionViewCompositionalLayout.rs | 34 ++++---- .../NSCollectionViewTransitionLayout.rs | 2 +- crates/icrate/src/generated/AppKit/NSColor.rs | 12 ++- .../src/generated/AppKit/NSColorList.rs | 7 +- .../src/generated/AppKit/NSColorPicker.rs | 2 +- .../src/generated/AppKit/NSColorSpace.rs | 9 +- .../icrate/src/generated/AppKit/NSControl.rs | 10 ++- .../src/generated/AppKit/NSController.rs | 7 +- .../icrate/src/generated/AppKit/NSCursor.rs | 9 +- .../src/generated/AppKit/NSCustomImageRep.rs | 4 +- .../src/generated/AppKit/NSDataAsset.rs | 9 +- .../src/generated/AppKit/NSDatePickerCell.rs | 15 +++- .../AppKit/NSDictionaryController.rs | 2 +- .../generated/AppKit/NSDiffableDataSource.rs | 4 +- .../icrate/src/generated/AppKit/NSDocument.rs | 12 +-- .../generated/AppKit/NSDocumentController.rs | 7 +- .../src/generated/AppKit/NSDraggingItem.rs | 11 ++- .../icrate/src/generated/AppKit/NSDrawer.rs | 2 +- .../src/generated/AppKit/NSEPSImageRep.rs | 5 +- .../generated/AppKit/NSFilePromiseProvider.rs | 4 +- .../generated/AppKit/NSFontAssetRequest.rs | 4 +- .../src/generated/AppKit/NSFontDescriptor.rs | 2 +- .../icrate/src/generated/AppKit/NSFormCell.rs | 15 +++- .../generated/AppKit/NSGestureRecognizer.rs | 7 +- .../icrate/src/generated/AppKit/NSGradient.rs | 11 ++- .../icrate/src/generated/AppKit/NSGridView.rs | 10 ++- crates/icrate/src/generated/AppKit/NSImage.rs | 42 ++++++--- .../icrate/src/generated/AppKit/NSImageRep.rs | 7 +- .../src/generated/AppKit/NSInputManager.rs | 2 +- .../src/generated/AppKit/NSInputServer.rs | 2 +- .../src/generated/AppKit/NSKeyValueBinding.rs | 2 +- .../src/generated/AppKit/NSLayoutManager.rs | 7 +- .../generated/AppKit/NSLevelIndicatorCell.rs | 2 +- .../icrate/src/generated/AppKit/NSMatrix.rs | 9 +- crates/icrate/src/generated/AppKit/NSMenu.rs | 10 ++- .../icrate/src/generated/AppKit/NSMenuItem.rs | 7 +- .../src/generated/AppKit/NSMenuItemCell.rs | 10 ++- crates/icrate/src/generated/AppKit/NSMovie.rs | 12 ++- crates/icrate/src/generated/AppKit/NSNib.rs | 6 +- .../generated/AppKit/NSObjectController.rs | 10 ++- .../icrate/src/generated/AppKit/NSOpenGL.rs | 17 ++-- .../src/generated/AppKit/NSOpenGLView.rs | 2 +- .../src/generated/AppKit/NSPDFImageRep.rs | 5 +- .../src/generated/AppKit/NSPICTImageRep.rs | 5 +- .../src/generated/AppKit/NSParagraphStyle.rs | 4 +- .../src/generated/AppKit/NSPopUpButton.rs | 2 +- .../src/generated/AppKit/NSPopUpButtonCell.rs | 7 +- .../icrate/src/generated/AppKit/NSPopover.rs | 7 +- .../AppKit/NSPredicateEditorRowTemplate.rs | 6 +- .../AppKit/NSPressureConfiguration.rs | 2 +- .../src/generated/AppKit/NSPrintInfo.rs | 9 +- .../src/generated/AppKit/NSResponder.rs | 7 +- .../src/generated/AppKit/NSRulerMarker.rs | 9 +- .../src/generated/AppKit/NSRulerView.rs | 7 +- .../src/generated/AppKit/NSScrollView.rs | 10 ++- .../icrate/src/generated/AppKit/NSScrubber.rs | 17 +++- .../src/generated/AppKit/NSScrubberLayout.rs | 14 ++- .../src/generated/AppKit/NSSearchFieldCell.rs | 15 +++- .../icrate/src/generated/AppKit/NSShadow.rs | 2 +- .../src/generated/AppKit/NSSharingService.rs | 11 ++- crates/icrate/src/generated/AppKit/NSSound.rs | 11 ++- .../generated/AppKit/NSSpeechRecognizer.rs | 2 +- .../generated/AppKit/NSSpeechSynthesizer.rs | 2 +- .../src/generated/AppKit/NSStoryboardSegue.rs | 2 +- .../src/generated/AppKit/NSTabViewItem.rs | 5 +- .../src/generated/AppKit/NSTableColumn.rs | 7 +- .../src/generated/AppKit/NSTableView.rs | 10 ++- .../AppKit/NSTableViewDiffableDataSource.rs | 4 +- crates/icrate/src/generated/AppKit/NSText.rs | 10 ++- .../generated/AppKit/NSTextAlternatives.rs | 2 +- .../src/generated/AppKit/NSTextAttachment.rs | 8 +- .../AppKit/NSTextCheckingController.rs | 7 +- .../src/generated/AppKit/NSTextContainer.rs | 13 ++- .../generated/AppKit/NSTextContentManager.rs | 7 +- .../src/generated/AppKit/NSTextElement.rs | 4 +- .../src/generated/AppKit/NSTextFieldCell.rs | 15 +++- .../src/generated/AppKit/NSTextFinder.rs | 7 +- .../generated/AppKit/NSTextInputContext.rs | 7 +- .../generated/AppKit/NSTextLayoutFragment.rs | 9 +- .../generated/AppKit/NSTextLayoutManager.rs | 7 +- .../generated/AppKit/NSTextLineFragment.rs | 11 ++- .../icrate/src/generated/AppKit/NSTextList.rs | 2 +- .../src/generated/AppKit/NSTextRange.rs | 9 +- .../src/generated/AppKit/NSTextSelection.rs | 13 +-- .../AppKit/NSTextSelectionNavigation.rs | 4 +- .../src/generated/AppKit/NSTextTable.rs | 4 +- .../icrate/src/generated/AppKit/NSTextView.rs | 12 ++- .../AppKit/NSTextViewportLayoutController.rs | 4 +- .../icrate/src/generated/AppKit/NSToolbar.rs | 4 +- .../src/generated/AppKit/NSToolbarItem.rs | 2 +- .../icrate/src/generated/AppKit/NSTouchBar.rs | 7 +- .../src/generated/AppKit/NSTouchBarItem.rs | 9 +- .../src/generated/AppKit/NSTrackingArea.rs | 2 +- .../icrate/src/generated/AppKit/NSTreeNode.rs | 2 +- .../AppKit/NSUserDefaultsController.rs | 7 +- .../AppKit/NSUserInterfaceCompression.rs | 14 ++- crates/icrate/src/generated/AppKit/NSView.rs | 10 ++- .../src/generated/AppKit/NSViewController.rs | 7 +- .../icrate/src/generated/AppKit/NSWindow.rs | 11 ++- .../generated/AppKit/NSWindowController.rs | 19 ++-- .../generated/Foundation/NSAffineTransform.rs | 7 +- .../Foundation/NSAppleEventDescriptor.rs | 15 ++-- .../src/generated/Foundation/NSAppleScript.rs | 7 +- .../src/generated/Foundation/NSArchiver.rs | 7 +- .../src/generated/Foundation/NSArray.rs | 38 +++++--- .../Foundation/NSAttributedString.rs | 21 +++-- .../NSBackgroundActivityScheduler.rs | 5 +- .../src/generated/Foundation/NSBundle.rs | 19 ++-- .../src/generated/Foundation/NSCalendar.rs | 4 +- .../generated/Foundation/NSCalendarDate.rs | 16 ++-- .../generated/Foundation/NSCharacterSet.rs | 5 +- .../Foundation/NSComparisonPredicate.rs | 9 +- .../Foundation/NSCompoundPredicate.rs | 7 +- .../src/generated/Foundation/NSConnection.rs | 2 +- .../icrate/src/generated/Foundation/NSData.rs | 45 ++++++---- .../icrate/src/generated/Foundation/NSDate.rs | 19 ++-- .../generated/Foundation/NSDateFormatter.rs | 2 +- .../generated/Foundation/NSDateInterval.rs | 11 ++- .../generated/Foundation/NSDecimalNumber.rs | 16 ++-- .../src/generated/Foundation/NSDictionary.rs | 37 +++++--- .../generated/Foundation/NSDistantObject.rs | 9 +- .../generated/Foundation/NSDistributedLock.rs | 7 +- .../src/generated/Foundation/NSError.rs | 2 +- .../src/generated/Foundation/NSException.rs | 2 +- .../src/generated/Foundation/NSExpression.rs | 10 ++- .../generated/Foundation/NSFileCoordinator.rs | 2 +- .../src/generated/Foundation/NSFileHandle.rs | 12 ++- .../src/generated/Foundation/NSFileWrapper.rs | 32 +++++-- .../src/generated/Foundation/NSHTTPCookie.rs | 2 +- .../src/generated/Foundation/NSHashTable.rs | 4 +- .../Foundation/NSISO8601DateFormatter.rs | 2 +- .../src/generated/Foundation/NSIndexPath.rs | 7 +- .../src/generated/Foundation/NSIndexSet.rs | 15 +++- .../generated/Foundation/NSInflectionRule.rs | 7 +- .../generated/Foundation/NSItemProvider.rs | 11 ++- .../generated/Foundation/NSKeyedArchiver.rs | 15 ++-- .../Foundation/NSLinguisticTagger.rs | 2 +- .../src/generated/Foundation/NSLocale.rs | 12 ++- .../icrate/src/generated/Foundation/NSLock.rs | 5 +- .../src/generated/Foundation/NSMapTable.rs | 4 +- .../src/generated/Foundation/NSMeasurement.rs | 4 +- .../src/generated/Foundation/NSMetadata.rs | 5 +- .../src/generated/Foundation/NSNetServices.rs | 6 +- .../generated/Foundation/NSNotification.rs | 9 +- .../Foundation/NSNotificationQueue.rs | 2 +- .../src/generated/Foundation/NSOperation.rs | 7 +- .../Foundation/NSOrderedCollectionChange.rs | 6 +- .../NSOrderedCollectionDifference.rs | 6 +- .../src/generated/Foundation/NSOrderedSet.rs | 52 +++++++---- .../src/generated/Foundation/NSOrthography.rs | 7 +- .../generated/Foundation/NSPointerArray.rs | 4 +- .../Foundation/NSPointerFunctions.rs | 2 +- .../icrate/src/generated/Foundation/NSPort.rs | 22 +++-- .../src/generated/Foundation/NSPortCoder.rs | 2 +- .../src/generated/Foundation/NSPortMessage.rs | 2 +- .../src/generated/Foundation/NSProgress.rs | 2 +- .../generated/Foundation/NSProtocolChecker.rs | 2 +- .../src/generated/Foundation/NSProxy.rs | 4 +- .../Foundation/NSRegularExpression.rs | 4 +- .../src/generated/Foundation/NSScanner.rs | 5 +- .../Foundation/NSScriptClassDescription.rs | 2 +- .../generated/Foundation/NSScriptCommand.rs | 7 +- .../Foundation/NSScriptCommandDescription.rs | 9 +- .../Foundation/NSScriptObjectSpecifiers.rs | 48 ++++++---- .../Foundation/NSScriptWhoseTests.rs | 25 ++++-- .../icrate/src/generated/Foundation/NSSet.rs | 48 +++++++--- .../generated/Foundation/NSSortDescriptor.rs | 11 ++- .../src/generated/Foundation/NSStream.rs | 23 +++-- .../src/generated/Foundation/NSString.rs | 66 +++++++++----- .../icrate/src/generated/Foundation/NSTask.rs | 2 +- .../src/generated/Foundation/NSThread.rs | 9 +- .../src/generated/Foundation/NSTimeZone.rs | 7 +- .../src/generated/Foundation/NSTimer.rs | 4 +- .../icrate/src/generated/Foundation/NSURL.rs | 44 ++++++---- .../NSURLAuthenticationChallenge.rs | 4 +- .../src/generated/Foundation/NSURLCache.rs | 8 +- .../generated/Foundation/NSURLConnection.rs | 4 +- .../generated/Foundation/NSURLCredential.rs | 9 +- .../src/generated/Foundation/NSURLDownload.rs | 4 +- .../src/generated/Foundation/NSURLHandle.rs | 2 +- .../Foundation/NSURLProtectionSpace.rs | 4 +- .../src/generated/Foundation/NSURLProtocol.rs | 4 +- .../src/generated/Foundation/NSURLRequest.rs | 4 +- .../src/generated/Foundation/NSURLResponse.rs | 4 +- .../src/generated/Foundation/NSURLSession.rs | 32 ++++--- .../icrate/src/generated/Foundation/NSUUID.rs | 12 ++- .../icrate/src/generated/Foundation/NSUnit.rs | 16 ++-- .../generated/Foundation/NSUserActivity.rs | 7 +- .../generated/Foundation/NSUserDefaults.rs | 9 +- .../Foundation/NSUserNotification.rs | 2 +- .../generated/Foundation/NSUserScriptTask.rs | 2 +- .../src/generated/Foundation/NSValue.rs | 87 +++++++++++++++---- .../src/generated/Foundation/NSXMLDTD.rs | 8 +- .../src/generated/Foundation/NSXMLDTDNode.rs | 9 +- .../src/generated/Foundation/NSXMLDocument.rs | 10 +-- .../src/generated/Foundation/NSXMLElement.rs | 13 +-- .../src/generated/Foundation/NSXMLNode.rs | 9 +- .../src/generated/Foundation/NSXMLParser.rs | 15 +++- .../generated/Foundation/NSXPCConnection.rs | 14 ++- crates/icrate/src/lib.rs | 2 +- 213 files changed, 1472 insertions(+), 702 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index ab35f012b..43b1d54cd 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -108,6 +108,14 @@ impl MemoryManagement { assert!(self == Self::Normal, "{:?} did not match {}", self, sel); } } + + fn is_init(sel: &str) -> bool { + in_selector_family(sel.as_bytes(), b"init") + } + + fn is_alloc(sel: &str) -> bool { + in_selector_family(sel.as_bytes(), b"alloc") + } } #[allow(dead_code)] @@ -342,7 +350,11 @@ impl fmt::Display for Method { } write!(f, "fn {}(", handle_reserved(&self.fn_name))?; if !self.is_class { - write!(f, "&self, ")?; + if MemoryManagement::is_init(&self.selector) { + write!(f, "this: Option>, ")?; + } else { + write!(f, "&self, ")?; + } } for (param, _qualifier, arg_ty) in arguments { write!(f, "{}: {arg_ty},", handle_reserved(¶m))?; @@ -352,7 +364,17 @@ impl fmt::Display for Method { if is_error { writeln!(f, "{};", self.result_type.as_error())?; } else { - writeln!(f, "{};", self.result_type)?; + if MemoryManagement::is_alloc(&self.selector) { + assert!( + self.result_type.is_alloc(), + "{:?}, {:?}", + self.result_type, + self.fn_name + ); + writeln!(f, "-> Option>;")?; + } else { + writeln!(f, "{};", self.result_type)?; + } }; Ok(()) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 463715354..760a18ebe 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -747,6 +747,18 @@ impl RustTypeReturn { _ => panic!("unknown error result type {self:?}"), } } + + pub fn is_alloc(&self) -> bool { + match &self.inner { + RustType::Id { + type_, + lifetime: Lifetime::Unspecified, + is_const: false, + nullability: Nullability::NonNull, + } => type_.name == "Object" && type_.generics.is_empty(), + _ => false, + } + } } impl fmt::Display for RustTypeReturn { diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs index 73c84d980..0a083dc64 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs @@ -17,14 +17,14 @@ extern_methods!( unsafe impl NSAccessibilityCustomAction { #[method_id(initWithName:handler:)] pub unsafe fn initWithName_handler( - &self, + this: Option>, name: &NSString, handler: TodoBlock, ) -> Id; #[method_id(initWithName:target:selector:)] pub unsafe fn initWithName_target_selector( - &self, + this: Option>, name: &NSString, target: &NSObject, selector: Sel, diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs index da7c19ca2..236d160f1 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs @@ -47,14 +47,14 @@ extern_methods!( unsafe impl NSAccessibilityCustomRotor { #[method_id(initWithLabel:itemSearchDelegate:)] pub unsafe fn initWithLabel_itemSearchDelegate( - &self, + this: Option>, label: &NSString, itemSearchDelegate: &NSAccessibilityCustomRotorItemSearchDelegate, ) -> Id; #[method_id(initWithRotorType:itemSearchDelegate:)] pub unsafe fn initWithRotorType_itemSearchDelegate( - &self, + this: Option>, rotorType: NSAccessibilityCustomRotorType, itemSearchDelegate: &NSAccessibilityCustomRotorItemSearchDelegate, ) -> Id; @@ -149,17 +149,17 @@ extern_methods!( pub unsafe fn new() -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithTargetElement:)] pub unsafe fn initWithTargetElement( - &self, + this: Option>, targetElement: &NSAccessibilityElement, ) -> Id; #[method_id(initWithItemLoadingToken:customLabel:)] pub unsafe fn initWithItemLoadingToken_customLabel( - &self, + this: Option>, itemLoadingToken: &NSAccessibilityLoadingToken, customLabel: &NSString, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index ae1925306..06d7c7b6d 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -36,13 +36,16 @@ extern_methods!( unsafe impl NSAnimation { #[method_id(initWithDuration:animationCurve:)] pub unsafe fn initWithDuration_animationCurve( - &self, + this: Option>, duration: NSTimeInterval, animationCurve: NSAnimationCurve, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method(startAnimation)] pub unsafe fn startAnimation(&self); @@ -176,7 +179,7 @@ extern_methods!( unsafe impl NSViewAnimation { #[method_id(initWithViewAnimations:)] pub unsafe fn initWithViewAnimations( - &self, + this: Option>, viewAnimations: &NSArray>, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index e57887513..62c59f70a 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -37,13 +37,16 @@ extern_methods!( #[method_id(initWithAppearanceNamed:bundle:)] pub unsafe fn initWithAppearanceNamed_bundle( - &self, + this: Option>, name: &NSAppearanceName, bundle: Option<&NSBundle>, ) -> Option>; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method(allowsVibrancy)] pub unsafe fn allowsVibrancy(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index 09525290c..a4f27866e 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -436,7 +436,7 @@ extern_methods!( unsafe impl NSAttributedString { #[method_id(initWithURL:options:documentAttributes:error:)] pub unsafe fn initWithURL_options_documentAttributes_error( - &self, + this: Option>, url: &NSURL, options: &NSDictionary, dict: Option< @@ -448,7 +448,7 @@ extern_methods!( #[method_id(initWithData:options:documentAttributes:error:)] pub unsafe fn initWithData_options_documentAttributes_error( - &self, + this: Option>, data: &NSData, options: &NSDictionary, dict: Option< @@ -474,7 +474,7 @@ extern_methods!( #[method_id(initWithRTF:documentAttributes:)] pub unsafe fn initWithRTF_documentAttributes( - &self, + this: Option>, data: &NSData, dict: Option< &mut Option< @@ -485,7 +485,7 @@ extern_methods!( #[method_id(initWithRTFD:documentAttributes:)] pub unsafe fn initWithRTFD_documentAttributes( - &self, + this: Option>, data: &NSData, dict: Option< &mut Option< @@ -496,7 +496,7 @@ extern_methods!( #[method_id(initWithHTML:documentAttributes:)] pub unsafe fn initWithHTML_documentAttributes( - &self, + this: Option>, data: &NSData, dict: Option< &mut Option< @@ -507,7 +507,7 @@ extern_methods!( #[method_id(initWithHTML:baseURL:documentAttributes:)] pub unsafe fn initWithHTML_baseURL_documentAttributes( - &self, + this: Option>, data: &NSData, base: &NSURL, dict: Option< @@ -519,7 +519,7 @@ extern_methods!( #[method_id(initWithDocFormat:documentAttributes:)] pub unsafe fn initWithDocFormat_documentAttributes( - &self, + this: Option>, data: &NSData, dict: Option< &mut Option< @@ -530,7 +530,7 @@ extern_methods!( #[method_id(initWithHTML:options:documentAttributes:)] pub unsafe fn initWithHTML_options_documentAttributes( - &self, + this: Option>, data: &NSData, options: &NSDictionary, dict: Option< @@ -542,7 +542,7 @@ extern_methods!( #[method_id(initWithRTFDFileWrapper:documentAttributes:)] pub unsafe fn initWithRTFDFileWrapper_documentAttributes( - &self, + this: Option>, wrapper: &NSFileWrapper, dict: Option< &mut Option< @@ -771,14 +771,14 @@ extern_methods!( #[method_id(initWithURL:documentAttributes:)] pub unsafe fn initWithURL_documentAttributes( - &self, + this: Option>, url: &NSURL, dict: Option<&mut Option>>, ) -> Option>; #[method_id(initWithPath:documentAttributes:)] pub unsafe fn initWithPath_documentAttributes( - &self, + this: Option>, path: &NSString, dict: Option<&mut Option>>, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index eaf3b74e6..d63e4cb55 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -113,11 +113,14 @@ extern_class!( extern_methods!( unsafe impl NSBitmapImageRep { #[method_id(initWithFocusedViewRect:)] - pub unsafe fn initWithFocusedViewRect(&self, rect: NSRect) -> Option>; + pub unsafe fn initWithFocusedViewRect( + this: Option>, + rect: NSRect, + ) -> Option>; #[method_id(initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:)] pub unsafe fn initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel( - &self, + this: Option>, planes: *mut *mut c_uchar, width: NSInteger, height: NSInteger, @@ -132,7 +135,7 @@ extern_methods!( #[method_id(initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:)] pub unsafe fn initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel( - &self, + this: Option>, planes: *mut *mut c_uchar, width: NSInteger, height: NSInteger, @@ -147,10 +150,16 @@ extern_methods!( ) -> Option>; #[method_id(initWithCGImage:)] - pub unsafe fn initWithCGImage(&self, cgImage: CGImageRef) -> Id; + pub unsafe fn initWithCGImage( + this: Option>, + cgImage: CGImageRef, + ) -> Id; #[method_id(initWithCIImage:)] - pub unsafe fn initWithCIImage(&self, ciImage: &CIImage) -> Id; + pub unsafe fn initWithCIImage( + this: Option>, + ciImage: &CIImage, + ) -> Id; #[method_id(imageRepsWithData:)] pub unsafe fn imageRepsWithData(data: &NSData) -> Id, Shared>; @@ -159,7 +168,10 @@ extern_methods!( pub unsafe fn imageRepWithData(data: &NSData) -> Option>; #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, data: &NSData) -> Option>; + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Option>; #[method(bitmapData)] pub unsafe fn bitmapData(&self) -> *mut c_uchar; @@ -244,7 +256,7 @@ extern_methods!( ); #[method_id(initForIncrementalLoad)] - pub unsafe fn initForIncrementalLoad(&self) -> Id; + pub unsafe fn initForIncrementalLoad(this: Option>) -> Id; #[method(incrementalLoadFromData:complete:)] pub unsafe fn incrementalLoadFromData_complete( diff --git a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs index 6a61b042e..cb5304f76 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs @@ -16,13 +16,22 @@ extern_class!( extern_methods!( unsafe impl NSBrowserCell { #[method_id(initTextCell:)] - pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + pub unsafe fn initTextCell( + this: Option>, + string: &NSString, + ) -> Id; #[method_id(initImageCell:)] - pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + pub unsafe fn initImageCell( + this: Option>, + image: Option<&NSImage>, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(branchImage)] pub unsafe fn branchImage() -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs index 25b23676e..69a995f99 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -43,13 +43,22 @@ extern_class!( extern_methods!( unsafe impl NSButtonCell { #[method_id(initTextCell:)] - pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + pub unsafe fn initTextCell( + this: Option>, + string: &NSString, + ) -> Id; #[method_id(initImageCell:)] - pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + pub unsafe fn initImageCell( + this: Option>, + image: Option<&NSImage>, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method(bezelStyle)] pub unsafe fn bezelStyle(&self) -> NSBezelStyle; diff --git a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs index 63eaffff3..389604de6 100644 --- a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs @@ -19,7 +19,10 @@ extern_methods!( pub unsafe fn imageRepWithCIImage(image: &CIImage) -> Id; #[method_id(initWithCIImage:)] - pub unsafe fn initWithCIImage(&self, image: &CIImage) -> Id; + pub unsafe fn initWithCIImage( + this: Option>, + image: &CIImage, + ) -> Id; #[method_id(CIImage)] pub unsafe fn CIImage(&self) -> Id; @@ -31,7 +34,7 @@ extern_methods!( unsafe impl CIImage { #[method_id(initWithBitmapImageRep:)] pub unsafe fn initWithBitmapImageRep( - &self, + this: Option>, bitmapImageRep: &NSBitmapImageRep, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs index 1642458ad..151f7c5ed 100644 --- a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs @@ -17,14 +17,14 @@ extern_methods!( unsafe impl NSCachedImageRep { #[method_id(initWithWindow:rect:)] pub unsafe fn initWithWindow_rect( - &self, + this: Option>, win: Option<&NSWindow>, rect: NSRect, ) -> Option>; #[method_id(initWithSize:depth:separate:alpha:)] pub unsafe fn initWithSize_depth_separate_alpha( - &self, + this: Option>, size: NSSize, depth: NSWindowDepth, flag: bool, diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index f35e49310..8839a2d5b 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -87,16 +87,25 @@ extern_class!( extern_methods!( unsafe impl NSCell { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initTextCell:)] - pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + pub unsafe fn initTextCell( + this: Option>, + string: &NSString, + ) -> Id; #[method_id(initImageCell:)] - pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + pub unsafe fn initImageCell( + this: Option>, + image: Option<&NSImage>, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method(prefersTrackingUntilMouseUp)] pub unsafe fn prefersTrackingUntilMouseUp() -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 639b58def..411a27c16 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -79,32 +79,32 @@ extern_methods!( unsafe impl NSCollectionViewCompositionalLayout { #[method_id(initWithSection:)] pub unsafe fn initWithSection( - &self, + this: Option>, section: &NSCollectionLayoutSection, ) -> Id; #[method_id(initWithSection:configuration:)] pub unsafe fn initWithSection_configuration( - &self, + this: Option>, section: &NSCollectionLayoutSection, configuration: &NSCollectionViewCompositionalLayoutConfiguration, ) -> Id; #[method_id(initWithSectionProvider:)] pub unsafe fn initWithSectionProvider( - &self, + this: Option>, sectionProvider: NSCollectionViewCompositionalLayoutSectionProvider, ) -> Id; #[method_id(initWithSectionProvider:configuration:)] pub unsafe fn initWithSectionProvider_configuration( - &self, + this: Option>, sectionProvider: NSCollectionViewCompositionalLayoutSectionProvider, configuration: &NSCollectionViewCompositionalLayoutConfiguration, ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -151,7 +151,7 @@ extern_methods!( pub unsafe fn sectionWithGroup(group: &NSCollectionLayoutGroup) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -244,7 +244,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -292,7 +292,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -349,7 +349,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -406,7 +406,7 @@ extern_methods!( pub unsafe fn estimatedDimension(estimatedDimension: CGFloat) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -446,7 +446,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -477,7 +477,7 @@ extern_methods!( pub unsafe fn fixedSpacing(fixedSpacing: CGFloat) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -513,7 +513,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -559,7 +559,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -608,7 +608,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -650,7 +650,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -693,7 +693,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs index 7f5722a8f..177c4e172 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs @@ -31,7 +31,7 @@ extern_methods!( #[method_id(initWithCurrentLayout:nextLayout:)] pub unsafe fn initWithCurrentLayout_nextLayout( - &self, + this: Option>, currentLayout: &NSCollectionViewLayout, newLayout: &NSCollectionViewLayout, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index 5588df723..d056d9776 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -30,10 +30,13 @@ extern_class!( extern_methods!( unsafe impl NSColor { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(colorWithColorSpace:components:count:)] pub unsafe fn colorWithColorSpace_components_count( @@ -594,7 +597,10 @@ extern_methods!( /// NSAppKitAdditions unsafe impl CIColor { #[method_id(initWithColor:)] - pub unsafe fn initWithColor(&self, color: &NSColor) -> Option>; + pub unsafe fn initWithColor( + this: Option>, + color: &NSColor, + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSColorList.rs b/crates/icrate/src/generated/AppKit/NSColorList.rs index 04d18e22c..4864bb645 100644 --- a/crates/icrate/src/generated/AppKit/NSColorList.rs +++ b/crates/icrate/src/generated/AppKit/NSColorList.rs @@ -26,11 +26,14 @@ extern_methods!( pub unsafe fn colorListNamed(name: &NSColorListName) -> Option>; #[method_id(initWithName:)] - pub unsafe fn initWithName(&self, name: &NSColorListName) -> Id; + pub unsafe fn initWithName( + this: Option>, + name: &NSColorListName, + ) -> Id; #[method_id(initWithName:fromFile:)] pub unsafe fn initWithName_fromFile( - &self, + this: Option>, name: &NSColorListName, path: Option<&NSString>, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSColorPicker.rs b/crates/icrate/src/generated/AppKit/NSColorPicker.rs index 9e779141d..ae6f90d55 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicker.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicker.rs @@ -17,7 +17,7 @@ extern_methods!( unsafe impl NSColorPicker { #[method_id(initWithPickerMask:colorPanel:)] pub unsafe fn initWithPickerMask_colorPanel( - &self, + this: Option>, mask: NSUInteger, owningColorPanel: &NSColorPanel, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index d91a42aec..ccb87b667 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -26,14 +26,17 @@ extern_class!( extern_methods!( unsafe impl NSColorSpace { #[method_id(initWithICCProfileData:)] - pub unsafe fn initWithICCProfileData(&self, iccData: &NSData) -> Option>; + pub unsafe fn initWithICCProfileData( + this: Option>, + iccData: &NSData, + ) -> Option>; #[method_id(ICCProfileData)] pub unsafe fn ICCProfileData(&self) -> Option>; #[method_id(initWithColorSyncProfile:)] pub unsafe fn initWithColorSyncProfile( - &self, + this: Option>, prof: NonNull, ) -> Option>; @@ -42,7 +45,7 @@ extern_methods!( #[method_id(initWithCGColorSpace:)] pub unsafe fn initWithCGColorSpace( - &self, + this: Option>, cgColorSpace: CGColorSpaceRef, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index 1772610a9..2ba82c840 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -16,10 +16,16 @@ extern_class!( extern_methods!( unsafe impl NSControl { #[method_id(initWithFrame:)] - pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + pub unsafe fn initWithFrame( + this: Option>, + frameRect: NSRect, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(target)] pub unsafe fn target(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSController.rs b/crates/icrate/src/generated/AppKit/NSController.rs index a4e42d8d4..6ec57085a 100644 --- a/crates/icrate/src/generated/AppKit/NSController.rs +++ b/crates/icrate/src/generated/AppKit/NSController.rs @@ -16,10 +16,13 @@ extern_class!( extern_methods!( unsafe impl NSController { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method(objectDidBeginEditing:)] pub unsafe fn objectDidBeginEditing(&self, editor: &NSEditor); diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs index e39fa0c3f..575e4388f 100644 --- a/crates/icrate/src/generated/AppKit/NSCursor.rs +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -77,13 +77,16 @@ extern_methods!( #[method_id(initWithImage:hotSpot:)] pub unsafe fn initWithImage_hotSpot( - &self, + this: Option>, newImage: &NSImage, point: NSPoint, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method(hide)] pub unsafe fn hide(); @@ -121,7 +124,7 @@ extern_methods!( unsafe impl NSCursor { #[method_id(initWithImage:foregroundColorHint:backgroundColorHint:hotSpot:)] pub unsafe fn initWithImage_foregroundColorHint_backgroundColorHint_hotSpot( - &self, + this: Option>, newImage: &NSImage, fg: Option<&NSColor>, bg: Option<&NSColor>, diff --git a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs index f33269671..63f4dae3d 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs @@ -17,7 +17,7 @@ extern_methods!( unsafe impl NSCustomImageRep { #[method_id(initWithSize:flipped:drawingHandler:)] pub unsafe fn initWithSize_flipped_drawingHandler( - &self, + this: Option>, size: NSSize, drawingHandlerShouldBeCalledWithFlippedContext: bool, drawingHandler: TodoBlock, @@ -28,7 +28,7 @@ extern_methods!( #[method_id(initWithDrawSelector:delegate:)] pub unsafe fn initWithDrawSelector_delegate( - &self, + this: Option>, selector: Sel, delegate: &Object, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSDataAsset.rs b/crates/icrate/src/generated/AppKit/NSDataAsset.rs index 6dbd857c0..f1258e932 100644 --- a/crates/icrate/src/generated/AppKit/NSDataAsset.rs +++ b/crates/icrate/src/generated/AppKit/NSDataAsset.rs @@ -18,14 +18,17 @@ extern_class!( extern_methods!( unsafe impl NSDataAsset { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithName:)] - pub unsafe fn initWithName(&self, name: &NSDataAssetName) -> Option>; + pub unsafe fn initWithName( + this: Option>, + name: &NSDataAssetName, + ) -> Option>; #[method_id(initWithName:bundle:)] pub unsafe fn initWithName_bundle( - &self, + this: Option>, name: &NSDataAssetName, bundle: &NSBundle, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index 0bf1788b5..f1f4a2690 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -33,13 +33,22 @@ extern_class!( extern_methods!( unsafe impl NSDatePickerCell { #[method_id(initTextCell:)] - pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + pub unsafe fn initTextCell( + this: Option>, + string: &NSString, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(initImageCell:)] - pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + pub unsafe fn initImageCell( + this: Option>, + image: Option<&NSImage>, + ) -> Id; #[method(datePickerStyle)] pub unsafe fn datePickerStyle(&self) -> NSDatePickerStyle; diff --git a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs index 5bfd1dcb6..25a3984b7 100644 --- a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs +++ b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs @@ -16,7 +16,7 @@ extern_class!( extern_methods!( unsafe impl NSDictionaryControllerKeyValuePair { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(key)] pub unsafe fn key(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index a5fcd33cc..d08705b40 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -182,13 +182,13 @@ extern_methods!( { #[method_id(initWithCollectionView:itemProvider:)] pub unsafe fn initWithCollectionView_itemProvider( - &self, + this: Option>, collectionView: &NSCollectionView, itemProvider: NSCollectionViewDiffableDataSourceItemProvider, ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index 14e2dbbe6..ac4a87ae9 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -34,11 +34,11 @@ extern_class!( extern_methods!( unsafe impl NSDocument { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithType:error:)] pub unsafe fn initWithType_error( - &self, + this: Option>, typeName: &NSString, ) -> Result, Id>; @@ -47,14 +47,14 @@ extern_methods!( #[method_id(initWithContentsOfURL:ofType:error:)] pub unsafe fn initWithContentsOfURL_ofType_error( - &self, + this: Option>, url: &NSURL, typeName: &NSString, ) -> Result, Id>; #[method_id(initForURL:withContentsOfURL:ofType:error:)] pub unsafe fn initForURL_withContentsOfURL_ofType_error( - &self, + this: Option>, urlOrNil: Option<&NSURL>, contentsURL: &NSURL, typeName: &NSString, @@ -620,14 +620,14 @@ extern_methods!( #[method_id(initWithContentsOfFile:ofType:)] pub unsafe fn initWithContentsOfFile_ofType( - &self, + this: Option>, absolutePath: &NSString, typeName: &NSString, ) -> Option>; #[method_id(initWithContentsOfURL:ofType:)] pub unsafe fn initWithContentsOfURL_ofType( - &self, + this: Option>, url: &NSURL, typeName: &NSString, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSDocumentController.rs b/crates/icrate/src/generated/AppKit/NSDocumentController.rs index 86785fc51..d1cc5735e 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentController.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentController.rs @@ -19,10 +19,13 @@ extern_methods!( pub unsafe fn sharedDocumentController() -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(documents)] pub unsafe fn documents(&self) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs index 2efad0117..896b9ec1c 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -31,10 +31,13 @@ extern_methods!( ) -> Id; #[method_id(initWithKey:)] - pub unsafe fn initWithKey(&self, key: &NSDraggingImageComponentKey) -> Id; + pub unsafe fn initWithKey( + this: Option>, + key: &NSDraggingImageComponentKey, + ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(key)] pub unsafe fn key(&self) -> Id; @@ -69,12 +72,12 @@ extern_methods!( unsafe impl NSDraggingItem { #[method_id(initWithPasteboardWriter:)] pub unsafe fn initWithPasteboardWriter( - &self, + this: Option>, pasteboardWriter: &NSPasteboardWriting, ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(item)] pub unsafe fn item(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index ea3c27142..81991061d 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -23,7 +23,7 @@ extern_methods!( unsafe impl NSDrawer { #[method_id(initWithContentSize:preferredEdge:)] pub unsafe fn initWithContentSize_preferredEdge( - &self, + this: Option>, contentSize: NSSize, edge: NSRectEdge, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs index bcf0d49d0..55e6f9034 100644 --- a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs @@ -19,7 +19,10 @@ extern_methods!( pub unsafe fn imageRepWithData(epsData: &NSData) -> Option>; #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, epsData: &NSData) -> Option>; + pub unsafe fn initWithData( + this: Option>, + epsData: &NSData, + ) -> Option>; #[method(prepareGState)] pub unsafe fn prepareGState(&self); diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs index 3f9ef12c9..4addabaa2 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs @@ -35,13 +35,13 @@ extern_methods!( #[method_id(initWithFileType:delegate:)] pub unsafe fn initWithFileType_delegate( - &self, + this: Option>, fileType: &NSString, delegate: &NSFilePromiseProviderDelegate, ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs index 5d90cbdfa..49dfdacfb 100644 --- a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs +++ b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs @@ -19,11 +19,11 @@ extern_class!( extern_methods!( unsafe impl NSFontAssetRequest { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithFontDescriptors:options:)] pub unsafe fn initWithFontDescriptors_options( - &self, + this: Option>, fontDescriptors: &NSArray, options: NSFontAssetRequestOptions, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 054e21379..3293a5db3 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -103,7 +103,7 @@ extern_methods!( #[method_id(initWithFontAttributes:)] pub unsafe fn initWithFontAttributes( - &self, + this: Option>, attributes: Option<&NSDictionary>, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSFormCell.rs b/crates/icrate/src/generated/AppKit/NSFormCell.rs index bd5b182e1..f392e289c 100644 --- a/crates/icrate/src/generated/AppKit/NSFormCell.rs +++ b/crates/icrate/src/generated/AppKit/NSFormCell.rs @@ -16,13 +16,22 @@ extern_class!( extern_methods!( unsafe impl NSFormCell { #[method_id(initTextCell:)] - pub unsafe fn initTextCell(&self, string: Option<&NSString>) -> Id; + pub unsafe fn initTextCell( + this: Option>, + string: Option<&NSString>, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(initImageCell:)] - pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + pub unsafe fn initImageCell( + this: Option>, + image: Option<&NSImage>, + ) -> Id; #[method(titleWidth:)] pub unsafe fn titleWidth(&self, size: NSSize) -> CGFloat; diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index e314d93f3..0dec1e961 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -27,13 +27,16 @@ extern_methods!( unsafe impl NSGestureRecognizer { #[method_id(initWithTarget:action:)] pub unsafe fn initWithTarget_action( - &self, + this: Option>, target: Option<&Object>, action: Option, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(target)] pub unsafe fn target(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index aa953f09f..1df4bcffd 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/NSGradient.rs @@ -21,27 +21,30 @@ extern_methods!( unsafe impl NSGradient { #[method_id(initWithStartingColor:endingColor:)] pub unsafe fn initWithStartingColor_endingColor( - &self, + this: Option>, startingColor: &NSColor, endingColor: &NSColor, ) -> Option>; #[method_id(initWithColors:)] pub unsafe fn initWithColors( - &self, + this: Option>, colorArray: &NSArray, ) -> Option>; #[method_id(initWithColors:atLocations:colorSpace:)] pub unsafe fn initWithColors_atLocations_colorSpace( - &self, + this: Option>, colorArray: &NSArray, locations: *mut CGFloat, colorSpace: &NSColorSpace, ) -> Option>; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method(drawFromPoint:toPoint:options:)] pub unsafe fn drawFromPoint_toPoint_options( diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index 652d34bc7..140d26d87 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -36,10 +36,16 @@ extern_class!( extern_methods!( unsafe impl NSGridView { #[method_id(initWithFrame:)] - pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + pub unsafe fn initWithFrame( + this: Option>, + frameRect: NSRect, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(gridViewWithNumberOfColumns:rows:)] pub unsafe fn gridViewWithNumberOfColumns_rows( diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index ddd251bec..06d6a47af 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -56,39 +56,54 @@ extern_methods!( ) -> Option>; #[method_id(initWithSize:)] - pub unsafe fn initWithSize(&self, size: NSSize) -> Id; + pub unsafe fn initWithSize(this: Option>, size: NSSize) + -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, data: &NSData) -> Option>; + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Option>; #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( - &self, + this: Option>, fileName: &NSString, ) -> Option>; #[method_id(initWithContentsOfURL:)] - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: &NSURL, + ) -> Option>; #[method_id(initByReferencingFile:)] - pub unsafe fn initByReferencingFile(&self, fileName: &NSString) - -> Option>; + pub unsafe fn initByReferencingFile( + this: Option>, + fileName: &NSString, + ) -> Option>; #[method_id(initByReferencingURL:)] - pub unsafe fn initByReferencingURL(&self, url: &NSURL) -> Id; + pub unsafe fn initByReferencingURL( + this: Option>, + url: &NSURL, + ) -> Id; #[method_id(initWithPasteboard:)] pub unsafe fn initWithPasteboard( - &self, + this: Option>, pasteboard: &NSPasteboard, ) -> Option>; #[method_id(initWithDataIgnoringOrientation:)] pub unsafe fn initWithDataIgnoringOrientation( - &self, + this: Option>, data: &NSData, ) -> Option>; @@ -261,7 +276,7 @@ extern_methods!( #[method_id(initWithCGImage:size:)] pub unsafe fn initWithCGImage_size( - &self, + this: Option>, cgImage: CGImageRef, size: NSSize, ) -> Id; @@ -371,7 +386,10 @@ extern_methods!( pub unsafe fn imagePasteboardTypes() -> Id, Shared>; #[method_id(initWithIconRef:)] - pub unsafe fn initWithIconRef(&self, iconRef: IconRef) -> Id; + pub unsafe fn initWithIconRef( + this: Option>, + iconRef: IconRef, + ) -> Id; #[method(setFlipped:)] pub unsafe fn setFlipped(&self, flag: bool); diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index 498e54572..af0b00a68 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -25,10 +25,13 @@ extern_class!( extern_methods!( unsafe impl NSImageRep { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method(draw)] pub unsafe fn draw(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSInputManager.rs b/crates/icrate/src/generated/AppKit/NSInputManager.rs index 3d23dd39e..40197ff4f 100644 --- a/crates/icrate/src/generated/AppKit/NSInputManager.rs +++ b/crates/icrate/src/generated/AppKit/NSInputManager.rs @@ -28,7 +28,7 @@ extern_methods!( #[method_id(initWithName:host:)] pub unsafe fn initWithName_host( - &self, + this: Option>, inputServerName: Option<&NSString>, hostName: Option<&NSString>, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSInputServer.rs b/crates/icrate/src/generated/AppKit/NSInputServer.rs index 422516a53..eca62cb12 100644 --- a/crates/icrate/src/generated/AppKit/NSInputServer.rs +++ b/crates/icrate/src/generated/AppKit/NSInputServer.rs @@ -21,7 +21,7 @@ extern_methods!( unsafe impl NSInputServer { #[method_id(initWithDelegate:name:)] pub unsafe fn initWithDelegate_name( - &self, + this: Option>, delegate: Option<&Object>, name: Option<&NSString>, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index aab53cacd..f5d6a9434 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -20,7 +20,7 @@ extern_class!( extern_methods!( unsafe impl NSBindingSelectionMarker { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(multipleValuesSelectionMarker)] pub unsafe fn multipleValuesSelectionMarker() -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index 97e2b0e4d..63a70ce21 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -44,10 +44,13 @@ extern_class!( extern_methods!( unsafe impl NSLayoutManager { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(textStorage)] pub unsafe fn textStorage(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs index fc1b63a13..cd259d025 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -23,7 +23,7 @@ extern_methods!( unsafe impl NSLevelIndicatorCell { #[method_id(initWithLevelIndicatorStyle:)] pub unsafe fn initWithLevelIndicatorStyle( - &self, + this: Option>, levelIndicatorStyle: NSLevelIndicatorStyle, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index 0780fb65f..9df0db32d 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -22,11 +22,14 @@ extern_class!( extern_methods!( unsafe impl NSMatrix { #[method_id(initWithFrame:)] - pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + pub unsafe fn initWithFrame( + this: Option>, + frameRect: NSRect, + ) -> Id; #[method_id(initWithFrame:mode:prototype:numberOfRows:numberOfColumns:)] pub unsafe fn initWithFrame_mode_prototype_numberOfRows_numberOfColumns( - &self, + this: Option>, frameRect: NSRect, mode: NSMatrixMode, cell: &NSCell, @@ -36,7 +39,7 @@ extern_methods!( #[method_id(initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:)] pub unsafe fn initWithFrame_mode_cellClass_numberOfRows_numberOfColumns( - &self, + this: Option>, frameRect: NSRect, mode: NSMatrixMode, factoryId: Option<&Class>, diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 1cda57768..d1ab1e4ff 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -16,10 +16,16 @@ extern_class!( extern_methods!( unsafe impl NSMenu { #[method_id(initWithTitle:)] - pub unsafe fn initWithTitle(&self, title: &NSString) -> Id; + pub unsafe fn initWithTitle( + this: Option>, + title: &NSString, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(title)] pub unsafe fn title(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs index 6d1b45c15..a34ee6331 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -26,14 +26,17 @@ extern_methods!( #[method_id(initWithTitle:action:keyEquivalent:)] pub unsafe fn initWithTitle_action_keyEquivalent( - &self, + this: Option>, string: &NSString, selector: Option, charCode: &NSString, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(menu)] pub unsafe fn menu(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs index 55727a8bc..7a4868298 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs @@ -16,10 +16,16 @@ extern_class!( extern_methods!( unsafe impl NSMenuItemCell { #[method_id(initTextCell:)] - pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + pub unsafe fn initTextCell( + this: Option>, + string: &NSString, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(menuItem)] pub unsafe fn menuItem(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSMovie.rs b/crates/icrate/src/generated/AppKit/NSMovie.rs index 85302451b..00294bbec 100644 --- a/crates/icrate/src/generated/AppKit/NSMovie.rs +++ b/crates/icrate/src/generated/AppKit/NSMovie.rs @@ -16,13 +16,19 @@ extern_class!( extern_methods!( unsafe impl NSMovie { #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(init)] - pub unsafe fn init(&self) -> Option>; + pub unsafe fn init(this: Option>) -> Option>; #[method_id(initWithMovie:)] - pub unsafe fn initWithMovie(&self, movie: &QTMovie) -> Option>; + pub unsafe fn initWithMovie( + this: Option>, + movie: &QTMovie, + ) -> Option>; #[method_id(QTMovie)] pub unsafe fn QTMovie(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index 2861d1e22..6d502eda4 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -19,14 +19,14 @@ extern_methods!( unsafe impl NSNib { #[method_id(initWithNibNamed:bundle:)] pub unsafe fn initWithNibNamed_bundle( - &self, + this: Option>, nibName: &NSNibName, bundle: Option<&NSBundle>, ) -> Option>; #[method_id(initWithNibData:bundle:)] pub unsafe fn initWithNibData_bundle( - &self, + this: Option>, nibData: &NSData, bundle: Option<&NSBundle>, ) -> Id; @@ -45,7 +45,7 @@ extern_methods!( unsafe impl NSNib { #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( - &self, + this: Option>, nibFileURL: Option<&NSURL>, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSObjectController.rs b/crates/icrate/src/generated/AppKit/NSObjectController.rs index a69920394..c97de851c 100644 --- a/crates/icrate/src/generated/AppKit/NSObjectController.rs +++ b/crates/icrate/src/generated/AppKit/NSObjectController.rs @@ -16,10 +16,16 @@ extern_class!( extern_methods!( unsafe impl NSObjectController { #[method_id(initWithContent:)] - pub unsafe fn initWithContent(&self, content: Option<&Object>) -> Id; + pub unsafe fn initWithContent( + this: Option>, + content: Option<&Object>, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(content)] pub unsafe fn content(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index eaf416b17..74231de4a 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -70,18 +70,21 @@ extern_methods!( unsafe impl NSOpenGLPixelFormat { #[method_id(initWithCGLPixelFormatObj:)] pub unsafe fn initWithCGLPixelFormatObj( - &self, + this: Option>, format: CGLPixelFormatObj, ) -> Option>; #[method_id(initWithAttributes:)] pub unsafe fn initWithAttributes( - &self, + this: Option>, attribs: NonNull, ) -> Option>; #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, attribs: Option<&NSData>) -> Option>; + pub unsafe fn initWithData( + this: Option>, + attribs: Option<&NSData>, + ) -> Option>; #[method_id(attributes)] pub unsafe fn attributes(&self) -> Option>; @@ -118,7 +121,7 @@ extern_methods!( unsafe impl NSOpenGLPixelBuffer { #[method_id(initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh:)] pub unsafe fn initWithTextureTarget_textureInternalFormat_textureMaxMipMapLevel_pixelsWide_pixelsHigh( - &self, + this: Option>, target: GLenum, format: GLenum, maxLevel: GLint, @@ -128,7 +131,7 @@ extern_methods!( #[method_id(initWithCGLPBufferObj:)] pub unsafe fn initWithCGLPBufferObj( - &self, + this: Option>, pbuffer: CGLPBufferObj, ) -> Option>; @@ -182,14 +185,14 @@ extern_methods!( unsafe impl NSOpenGLContext { #[method_id(initWithFormat:shareContext:)] pub unsafe fn initWithFormat_shareContext( - &self, + this: Option>, format: &NSOpenGLPixelFormat, share: Option<&NSOpenGLContext>, ) -> Option>; #[method_id(initWithCGLContextObj:)] pub unsafe fn initWithCGLContextObj( - &self, + this: Option>, context: CGLContextObj, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs index 29e83261c..7fccacd2f 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs @@ -20,7 +20,7 @@ extern_methods!( #[method_id(initWithFrame:pixelFormat:)] pub unsafe fn initWithFrame_pixelFormat( - &self, + this: Option>, frameRect: NSRect, format: Option<&NSOpenGLPixelFormat>, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs index b27b0243e..bb02451cb 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs @@ -19,7 +19,10 @@ extern_methods!( pub unsafe fn imageRepWithData(pdfData: &NSData) -> Option>; #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, pdfData: &NSData) -> Option>; + pub unsafe fn initWithData( + this: Option>, + pdfData: &NSData, + ) -> Option>; #[method_id(PDFRepresentation)] pub unsafe fn PDFRepresentation(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs index 9ba1f9daf..d28d2859e 100644 --- a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs @@ -19,7 +19,10 @@ extern_methods!( pub unsafe fn imageRepWithData(pictData: &NSData) -> Option>; #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, pictData: &NSData) -> Option>; + pub unsafe fn initWithData( + this: Option>, + pictData: &NSData, + ) -> Option>; #[method_id(PICTRepresentation)] pub unsafe fn PICTRepresentation(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index bc30683ed..6a238b8d2 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -42,7 +42,7 @@ extern_methods!( #[method_id(initWithTextAlignment:location:options:)] pub unsafe fn initWithTextAlignment_location_options( - &self, + this: Option>, alignment: NSTextAlignment, loc: CGFloat, options: &NSDictionary, @@ -317,7 +317,7 @@ extern_methods!( unsafe impl NSTextTab { #[method_id(initWithType:location:)] pub unsafe fn initWithType_location( - &self, + this: Option>, type_: NSTextTabType, loc: CGFloat, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs index f3aab1a22..0d505e4ba 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -17,7 +17,7 @@ extern_methods!( unsafe impl NSPopUpButton { #[method_id(initWithFrame:pullsDown:)] pub unsafe fn initWithFrame_pullsDown( - &self, + this: Option>, buttonFrame: NSRect, flag: bool, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index 032a92a44..417022651 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -22,13 +22,16 @@ extern_methods!( unsafe impl NSPopUpButtonCell { #[method_id(initTextCell:pullsDown:)] pub unsafe fn initTextCell_pullsDown( - &self, + this: Option>, stringValue: &NSString, pullDown: bool, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(menu)] pub unsafe fn menu(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index e93170093..e79697677 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -25,10 +25,13 @@ extern_class!( extern_methods!( unsafe impl NSPopover { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs index 01048de2f..675357e1d 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs @@ -38,7 +38,7 @@ extern_methods!( #[method_id(initWithLeftExpressions:rightExpressions:modifier:operators:options:)] pub unsafe fn initWithLeftExpressions_rightExpressions_modifier_operators_options( - &self, + this: Option>, leftExpressions: &NSArray, rightExpressions: &NSArray, modifier: NSComparisonPredicateModifier, @@ -48,7 +48,7 @@ extern_methods!( #[method_id(initWithLeftExpressions:rightExpressionAttributeType:modifier:operators:options:)] pub unsafe fn initWithLeftExpressions_rightExpressionAttributeType_modifier_operators_options( - &self, + this: Option>, leftExpressions: &NSArray, attributeType: NSAttributeType, modifier: NSComparisonPredicateModifier, @@ -58,7 +58,7 @@ extern_methods!( #[method_id(initWithCompoundTypes:)] pub unsafe fn initWithCompoundTypes( - &self, + this: Option>, compoundTypes: &NSArray, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs index 4611d0bd3..5f75d4727 100644 --- a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs @@ -20,7 +20,7 @@ extern_methods!( #[method_id(initWithPressureBehavior:)] pub unsafe fn initWithPressureBehavior( - &self, + this: Option>, pressureBehavior: NSPressureBehavior, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs index bd43dada3..90c9a71fb 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -174,15 +174,18 @@ extern_methods!( #[method_id(initWithDictionary:)] pub unsafe fn initWithDictionary( - &self, + this: Option>, attributes: &NSDictionary, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(dictionary)] pub unsafe fn dictionary( diff --git a/crates/icrate/src/generated/AppKit/NSResponder.rs b/crates/icrate/src/generated/AppKit/NSResponder.rs index 890160e61..caca0958d 100644 --- a/crates/icrate/src/generated/AppKit/NSResponder.rs +++ b/crates/icrate/src/generated/AppKit/NSResponder.rs @@ -16,10 +16,13 @@ extern_class!( extern_methods!( unsafe impl NSResponder { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(nextResponder)] pub unsafe fn nextResponder(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs index 9ca6c25fc..e1125c765 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs @@ -17,7 +17,7 @@ extern_methods!( unsafe impl NSRulerMarker { #[method_id(initWithRulerView:markerLocation:image:imageOrigin:)] pub unsafe fn initWithRulerView_markerLocation_image_imageOrigin( - &self, + this: Option>, ruler: &NSRulerView, location: CGFloat, image: &NSImage, @@ -25,10 +25,13 @@ extern_methods!( ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(ruler)] pub unsafe fn ruler(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs index 40cf882f9..471b214d7 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerView.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -47,11 +47,14 @@ extern_methods!( ); #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(initWithScrollView:orientation:)] pub unsafe fn initWithScrollView_orientation( - &self, + this: Option>, scrollView: Option<&NSScrollView>, orientation: NSRulerOrientation, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index e889dc77f..081d5b82a 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -21,10 +21,16 @@ extern_class!( extern_methods!( unsafe impl NSScrollView { #[method_id(initWithFrame:)] - pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + pub unsafe fn initWithFrame( + this: Option>, + frameRect: NSRect, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method(frameSizeForContentSize:horizontalScrollerClass:verticalScrollerClass:borderType:controlSize:scrollerStyle:)] pub unsafe fn frameSizeForContentSize_horizontalScrollerClass_verticalScrollerClass_borderType_controlSize_scrollerStyle( diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs index 418483045..8c48bc38c 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubber.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -36,10 +36,13 @@ extern_methods!( pub unsafe fn roundedBackgroundStyle() -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(makeSelectionView)] pub unsafe fn makeSelectionView(&self) -> Option>; @@ -159,10 +162,16 @@ extern_methods!( pub unsafe fn setBackgroundView(&self, backgroundView: Option<&NSView>); #[method_id(initWithFrame:)] - pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + pub unsafe fn initWithFrame( + this: Option>, + frameRect: NSRect, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method(reloadData)] pub unsafe fn reloadData(&self); diff --git a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs index dcd7c2d82..2d3805514 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs @@ -59,10 +59,13 @@ extern_methods!( pub unsafe fn visibleRect(&self) -> NSRect; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method(invalidateLayout)] pub unsafe fn invalidateLayout(&self); @@ -152,11 +155,14 @@ extern_methods!( #[method_id(initWithNumberOfVisibleItems:)] pub unsafe fn initWithNumberOfVisibleItems( - &self, + this: Option>, numberOfVisibleItems: NSInteger, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs index 268cc9dcb..091d5fdff 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs @@ -24,13 +24,22 @@ extern_class!( extern_methods!( unsafe impl NSSearchFieldCell { #[method_id(initTextCell:)] - pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + pub unsafe fn initTextCell( + this: Option>, + string: &NSString, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(initImageCell:)] - pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + pub unsafe fn initImageCell( + this: Option>, + image: Option<&NSImage>, + ) -> Id; #[method_id(searchButtonCell)] pub unsafe fn searchButtonCell(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSShadow.rs b/crates/icrate/src/generated/AppKit/NSShadow.rs index 14a52f1ea..be2d62415 100644 --- a/crates/icrate/src/generated/AppKit/NSShadow.rs +++ b/crates/icrate/src/generated/AppKit/NSShadow.rs @@ -16,7 +16,7 @@ extern_class!( extern_methods!( unsafe impl NSShadow { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method(shadowOffset)] pub unsafe fn shadowOffset(&self) -> NSSize; diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index 9bf6bc615..33802f0d0 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -154,7 +154,7 @@ extern_methods!( #[method_id(initWithTitle:image:alternateImage:handler:)] pub unsafe fn initWithTitle_image_alternateImage_handler( - &self, + this: Option>, title: &NSString, image: &NSImage, alternateImage: Option<&NSImage>, @@ -162,7 +162,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method(canPerformWithItems:)] pub unsafe fn canPerformWithItems(&self, items: Option<&NSArray>) -> bool; @@ -224,10 +224,13 @@ extern_methods!( pub unsafe fn setDelegate(&self, delegate: Option<&NSSharingServicePickerDelegate>); #[method_id(initWithItems:)] - pub unsafe fn initWithItems(&self, items: &NSArray) -> Id; + pub unsafe fn initWithItems( + this: Option>, + items: &NSArray, + ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method(showRelativeToRect:ofView:preferredEdge:)] pub unsafe fn showRelativeToRect_ofView_preferredEdge( diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs index 13292f63a..3b22acc37 100644 --- a/crates/icrate/src/generated/AppKit/NSSound.rs +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -28,20 +28,23 @@ extern_methods!( #[method_id(initWithContentsOfURL:byReference:)] pub unsafe fn initWithContentsOfURL_byReference( - &self, + this: Option>, url: &NSURL, byRef: bool, ) -> Option>; #[method_id(initWithContentsOfFile:byReference:)] pub unsafe fn initWithContentsOfFile_byReference( - &self, + this: Option>, path: &NSString, byRef: bool, ) -> Option>; #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, data: &NSData) -> Option>; + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Option>; #[method(setName:)] pub unsafe fn setName(&self, string: Option<&NSSoundName>) -> bool; @@ -57,7 +60,7 @@ extern_methods!( #[method_id(initWithPasteboard:)] pub unsafe fn initWithPasteboard( - &self, + this: Option>, pasteboard: &NSPasteboard, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs index 375f54521..75a60b8b2 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs @@ -16,7 +16,7 @@ extern_class!( extern_methods!( unsafe impl NSSpeechRecognizer { #[method_id(init)] - pub unsafe fn init(&self) -> Option>; + pub unsafe fn init(this: Option>) -> Option>; #[method(startListening)] pub unsafe fn startListening(&self); diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index 7c65f83f0..fd0193f15 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -172,7 +172,7 @@ extern_methods!( unsafe impl NSSpeechSynthesizer { #[method_id(initWithVoice:)] pub unsafe fn initWithVoice( - &self, + this: Option>, voice: Option<&NSSpeechSynthesizerVoiceName>, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs index 38334eaf8..7a5c0b74b 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs @@ -27,7 +27,7 @@ extern_methods!( #[method_id(initWithIdentifier:source:destination:)] pub unsafe fn initWithIdentifier_source_destination( - &self, + this: Option>, identifier: &NSStoryboardSegueIdentifier, sourceController: &Object, destinationController: &Object, diff --git a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs index cb4aae9bc..2b8fa6f9e 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs @@ -26,7 +26,10 @@ extern_methods!( ) -> Id; #[method_id(initWithIdentifier:)] - pub unsafe fn initWithIdentifier(&self, identifier: Option<&Object>) -> Id; + pub unsafe fn initWithIdentifier( + this: Option>, + identifier: Option<&Object>, + ) -> Id; #[method_id(identifier)] pub unsafe fn identifier(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs index c106f18b8..c7d31f9f0 100644 --- a/crates/icrate/src/generated/AppKit/NSTableColumn.rs +++ b/crates/icrate/src/generated/AppKit/NSTableColumn.rs @@ -22,12 +22,15 @@ extern_methods!( unsafe impl NSTableColumn { #[method_id(initWithIdentifier:)] pub unsafe fn initWithIdentifier( - &self, + this: Option>, identifier: &NSUserInterfaceItemIdentifier, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(identifier)] pub unsafe fn identifier(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index c24873c5d..f888dac96 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -79,10 +79,16 @@ extern_class!( extern_methods!( unsafe impl NSTableView { #[method_id(initWithFrame:)] - pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + pub unsafe fn initWithFrame( + this: Option>, + frameRect: NSRect, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(dataSource)] pub unsafe fn dataSource(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs index 65f4c4d61..03347227b 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -27,13 +27,13 @@ extern_methods!( { #[method_id(initWithTableView:cellProvider:)] pub unsafe fn initWithTableView_cellProvider( - &self, + this: Option>, tableView: &NSTableView, cellProvider: NSTableViewDiffableDataSourceCellProvider, ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index ac13bec0d..43f9ce4bc 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -28,10 +28,16 @@ extern_class!( extern_methods!( unsafe impl NSText { #[method_id(initWithFrame:)] - pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + pub unsafe fn initWithFrame( + this: Option>, + frameRect: NSRect, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(string)] pub unsafe fn string(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs index 269d50af8..6aeca5fb1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs @@ -17,7 +17,7 @@ extern_methods!( unsafe impl NSTextAlternatives { #[method_id(initWithPrimaryString:alternativeStrings:)] pub unsafe fn initWithPrimaryString_alternativeStrings( - &self, + this: Option>, primaryString: &NSString, alternativeStrings: &NSArray, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index 1b36063a6..a810237d0 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -23,14 +23,14 @@ extern_methods!( unsafe impl NSTextAttachment { #[method_id(initWithData:ofType:)] pub unsafe fn initWithData_ofType( - &self, + this: Option>, contentData: Option<&NSData>, uti: Option<&NSString>, ) -> Id; #[method_id(initWithFileWrapper:)] pub unsafe fn initWithFileWrapper( - &self, + this: Option>, fileWrapper: Option<&NSFileWrapper>, ) -> Id; @@ -121,7 +121,7 @@ extern_methods!( unsafe impl NSTextAttachmentViewProvider { #[method_id(initWithTextAttachment:parentView:textLayoutManager:location:)] pub unsafe fn initWithTextAttachment_parentView_textLayoutManager_location( - &self, + this: Option>, textAttachment: &NSTextAttachment, parentView: Option<&NSView>, textLayoutManager: Option<&NSTextLayoutManager>, @@ -129,7 +129,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs index 6dbfb8107..57ca15da9 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs @@ -16,10 +16,13 @@ extern_class!( extern_methods!( unsafe impl NSTextCheckingController { #[method_id(initWithClient:)] - pub unsafe fn initWithClient(&self, client: &NSTextCheckingClient) -> Id; + pub unsafe fn initWithClient( + this: Option>, + client: &NSTextCheckingClient, + ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(client)] pub unsafe fn client(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTextContainer.rs b/crates/icrate/src/generated/AppKit/NSTextContainer.rs index 3688fac22..ec06d2c61 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContainer.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContainer.rs @@ -16,10 +16,14 @@ extern_class!( extern_methods!( unsafe impl NSTextContainer { #[method_id(initWithSize:)] - pub unsafe fn initWithSize(&self, size: NSSize) -> Id; + pub unsafe fn initWithSize(this: Option>, size: NSSize) + -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(layoutManager)] pub unsafe fn layoutManager(&self) -> Option>; @@ -112,7 +116,10 @@ extern_methods!( /// NSTextContainerDeprecated unsafe impl NSTextContainer { #[method_id(initWithContainerSize:)] - pub unsafe fn initWithContainerSize(&self, aContainerSize: NSSize) -> Id; + pub unsafe fn initWithContainerSize( + this: Option>, + aContainerSize: NSSize, + ) -> Id; #[method(containerSize)] pub unsafe fn containerSize(&self) -> NSSize; diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index d4aa32509..385fd6183 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -23,10 +23,13 @@ extern_class!( extern_methods!( unsafe impl NSTextContentManager { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSTextElement.rs b/crates/icrate/src/generated/AppKit/NSTextElement.rs index bd7fe2d21..9ccbb2f77 100644 --- a/crates/icrate/src/generated/AppKit/NSTextElement.rs +++ b/crates/icrate/src/generated/AppKit/NSTextElement.rs @@ -17,7 +17,7 @@ extern_methods!( unsafe impl NSTextElement { #[method_id(initWithTextContentManager:)] pub unsafe fn initWithTextContentManager( - &self, + this: Option>, textContentManager: Option<&NSTextContentManager>, ) -> Id; @@ -51,7 +51,7 @@ extern_methods!( unsafe impl NSTextParagraph { #[method_id(initWithAttributedString:)] pub unsafe fn initWithAttributedString( - &self, + this: Option>, attributedString: Option<&NSAttributedString>, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs index e583b0803..4aa890fb4 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs @@ -20,13 +20,22 @@ extern_class!( extern_methods!( unsafe impl NSTextFieldCell { #[method_id(initTextCell:)] - pub unsafe fn initTextCell(&self, string: &NSString) -> Id; + pub unsafe fn initTextCell( + this: Option>, + string: &NSString, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(initImageCell:)] - pub unsafe fn initImageCell(&self, image: Option<&NSImage>) -> Id; + pub unsafe fn initImageCell( + this: Option>, + image: Option<&NSImage>, + ) -> Id; #[method_id(backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index d2e08590c..ec3cabbba 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -47,10 +47,13 @@ extern_class!( extern_methods!( unsafe impl NSTextFinder { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(client)] pub unsafe fn client(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs index c0bad98ca..b354e9ddf 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs @@ -21,10 +21,13 @@ extern_methods!( pub unsafe fn currentInputContext() -> Option>; #[method_id(initWithClient:)] - pub unsafe fn initWithClient(&self, client: &NSTextInputClient) -> Id; + pub unsafe fn initWithClient( + this: Option>, + client: &NSTextInputClient, + ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(client)] pub unsafe fn client(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index c11e25c8f..70741525e 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -34,16 +34,19 @@ extern_methods!( unsafe impl NSTextLayoutFragment { #[method_id(initWithTextElement:range:)] pub unsafe fn initWithTextElement_range( - &self, + this: Option>, textElement: &NSTextElement, rangeInElement: Option<&NSTextRange>, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index 73df49414..471244310 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -34,10 +34,13 @@ extern_class!( extern_methods!( unsafe impl NSTextLayoutManager { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs index fddcfc0cb..5b44397ae 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs @@ -17,24 +17,27 @@ extern_methods!( unsafe impl NSTextLineFragment { #[method_id(initWithAttributedString:range:)] pub unsafe fn initWithAttributedString_range( - &self, + this: Option>, attributedString: &NSAttributedString, range: NSRange, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, aDecoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + aDecoder: &NSCoder, + ) -> Option>; #[method_id(initWithString:attributes:range:)] pub unsafe fn initWithString_attributes_range( - &self, + this: Option>, string: &NSString, attributes: &NSDictionary, range: NSRange, ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(attributedString)] pub unsafe fn attributedString(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index 0f8e5ed8c..57ce85f6f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -90,7 +90,7 @@ extern_methods!( unsafe impl NSTextList { #[method_id(initWithMarkerFormat:options:)] pub unsafe fn initWithMarkerFormat_options( - &self, + this: Option>, format: &NSTextListMarkerFormat, mask: NSUInteger, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTextRange.rs b/crates/icrate/src/generated/AppKit/NSTextRange.rs index 5574765e4..c4fa062d0 100644 --- a/crates/icrate/src/generated/AppKit/NSTextRange.rs +++ b/crates/icrate/src/generated/AppKit/NSTextRange.rs @@ -19,16 +19,19 @@ extern_methods!( unsafe impl NSTextRange { #[method_id(initWithLocation:endLocation:)] pub unsafe fn initWithLocation_endLocation( - &self, + this: Option>, location: &NSTextLocation, endLocation: Option<&NSTextLocation>, ) -> Option>; #[method_id(initWithLocation:)] - pub unsafe fn initWithLocation(&self, location: &NSTextLocation) -> Id; + pub unsafe fn initWithLocation( + this: Option>, + location: &NSTextLocation, + ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTextSelection.rs b/crates/icrate/src/generated/AppKit/NSTextSelection.rs index 7c332aeb7..88def90d3 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelection.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelection.rs @@ -28,18 +28,21 @@ extern_methods!( unsafe impl NSTextSelection { #[method_id(initWithRanges:affinity:granularity:)] pub unsafe fn initWithRanges_affinity_granularity( - &self, + this: Option>, textRanges: &NSArray, affinity: NSTextSelectionAffinity, granularity: NSTextSelectionGranularity, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(initWithRange:affinity:granularity:)] pub unsafe fn initWithRange_affinity_granularity( - &self, + this: Option>, range: &NSTextRange, affinity: NSTextSelectionAffinity, granularity: NSTextSelectionGranularity, @@ -47,13 +50,13 @@ extern_methods!( #[method_id(initWithLocation:affinity:)] pub unsafe fn initWithLocation_affinity( - &self, + this: Option>, location: &NSTextLocation, affinity: NSTextSelectionAffinity, ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(textRanges)] pub unsafe fn textRanges(&self) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index 761b8c674..096a89e88 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -51,7 +51,7 @@ extern_methods!( unsafe impl NSTextSelectionNavigation { #[method_id(initWithDataSource:)] pub unsafe fn initWithDataSource( - &self, + this: Option>, dataSource: &NSTextSelectionDataSource, ) -> Id; @@ -59,7 +59,7 @@ extern_methods!( pub unsafe fn new() -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(textSelectionDataSource)] pub unsafe fn textSelectionDataSource( diff --git a/crates/icrate/src/generated/AppKit/NSTextTable.rs b/crates/icrate/src/generated/AppKit/NSTextTable.rs index 7982ad131..c7f1b113e 100644 --- a/crates/icrate/src/generated/AppKit/NSTextTable.rs +++ b/crates/icrate/src/generated/AppKit/NSTextTable.rs @@ -43,7 +43,7 @@ extern_class!( extern_methods!( unsafe impl NSTextBlock { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method(setValue:type:forDimension:)] pub unsafe fn setValue_type_forDimension( @@ -165,7 +165,7 @@ extern_methods!( unsafe impl NSTextTableBlock { #[method_id(initWithTable:startingRow:rowSpan:startingColumn:columnSpan:)] pub unsafe fn initWithTable_startingRow_rowSpan_startingColumn_columnSpan( - &self, + this: Option>, table: &NSTextTable, row: NSInteger, rowSpan: NSInteger, diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index e2c614714..a15ded230 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -30,16 +30,22 @@ extern_methods!( unsafe impl NSTextView { #[method_id(initWithFrame:textContainer:)] pub unsafe fn initWithFrame_textContainer( - &self, + this: Option>, frameRect: NSRect, container: Option<&NSTextContainer>, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(initWithFrame:)] - pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + pub unsafe fn initWithFrame( + this: Option>, + frameRect: NSRect, + ) -> Id; #[method_id(textContainer)] pub unsafe fn textContainer(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs index 7a84ab099..f143813b1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs @@ -19,7 +19,7 @@ extern_methods!( unsafe impl NSTextViewportLayoutController { #[method_id(initWithTextLayoutManager:)] pub unsafe fn initWithTextLayoutManager( - &self, + this: Option>, textLayoutManager: &NSTextLayoutManager, ) -> Id; @@ -27,7 +27,7 @@ extern_methods!( pub unsafe fn new() -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(delegate)] pub unsafe fn delegate(&self) diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index e224886d3..077d5cfa8 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -32,12 +32,12 @@ extern_methods!( unsafe impl NSToolbar { #[method_id(initWithIdentifier:)] pub unsafe fn initWithIdentifier( - &self, + this: Option>, identifier: &NSToolbarIdentifier, ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method(insertItemWithItemIdentifier:atIndex:)] pub unsafe fn insertItemWithItemIdentifier_atIndex( diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index 5a3623719..5191ef4b9 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -27,7 +27,7 @@ extern_methods!( unsafe impl NSToolbarItem { #[method_id(initWithItemIdentifier:)] pub unsafe fn initWithItemIdentifier( - &self, + this: Option>, itemIdentifier: &NSToolbarItemIdentifier, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTouchBar.rs b/crates/icrate/src/generated/AppKit/NSTouchBar.rs index 4f1273886..077d4dc88 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBar.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBar.rs @@ -18,10 +18,13 @@ extern_class!( extern_methods!( unsafe impl NSTouchBar { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(customizationIdentifier)] pub unsafe fn customizationIdentifier( diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs index 1908f9dc5..a75b734c1 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -25,15 +25,18 @@ extern_methods!( unsafe impl NSTouchBarItem { #[method_id(initWithIdentifier:)] pub unsafe fn initWithIdentifier( - &self, + this: Option>, identifier: &NSTouchBarItemIdentifier, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(identifier)] pub unsafe fn identifier(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs index 30b712a0f..a418240a9 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs @@ -29,7 +29,7 @@ extern_methods!( unsafe impl NSTrackingArea { #[method_id(initWithRect:options:owner:userInfo:)] pub unsafe fn initWithRect_options_owner_userInfo( - &self, + this: Option>, rect: NSRect, options: NSTrackingAreaOptions, owner: Option<&Object>, diff --git a/crates/icrate/src/generated/AppKit/NSTreeNode.rs b/crates/icrate/src/generated/AppKit/NSTreeNode.rs index 100bb185a..e8caa99f6 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeNode.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeNode.rs @@ -22,7 +22,7 @@ extern_methods!( #[method_id(initWithRepresentedObject:)] pub unsafe fn initWithRepresentedObject( - &self, + this: Option>, modelObject: Option<&Object>, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs index b5b7260f0..cbe6ca328 100644 --- a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs +++ b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs @@ -20,13 +20,16 @@ extern_methods!( #[method_id(initWithDefaults:initialValues:)] pub unsafe fn initWithDefaults_initialValues( - &self, + this: Option>, defaults: Option<&NSUserDefaults>, initialValues: Option<&NSDictionary>, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(defaults)] pub unsafe fn defaults(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs index 772ce16b0..dcd95ce09 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs @@ -16,17 +16,23 @@ extern_class!( extern_methods!( unsafe impl NSUserInterfaceCompressionOptions { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(initWithIdentifier:)] - pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id; + pub unsafe fn initWithIdentifier( + this: Option>, + identifier: &NSString, + ) -> Id; #[method_id(initWithCompressionOptions:)] pub unsafe fn initWithCompressionOptions( - &self, + this: Option>, options: &NSSet, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 7def24b6e..da1963c1b 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -56,10 +56,16 @@ extern_class!( extern_methods!( unsafe impl NSView { #[method_id(initWithFrame:)] - pub unsafe fn initWithFrame(&self, frameRect: NSRect) -> Id; + pub unsafe fn initWithFrame( + this: Option>, + frameRect: NSRect, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(window)] pub unsafe fn window(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index 921fd228a..1c2fc13a9 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -29,13 +29,16 @@ extern_methods!( unsafe impl NSViewController { #[method_id(initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( - &self, + this: Option>, nibNameOrNil: Option<&NSNibName>, nibBundleOrNil: Option<&NSBundle>, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(nibName)] pub unsafe fn nibName(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 343a5f914..f585269ce 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -172,7 +172,7 @@ extern_methods!( #[method_id(initWithContentRect:styleMask:backing:defer:)] pub unsafe fn initWithContentRect_styleMask_backing_defer( - &self, + this: Option>, contentRect: NSRect, style: NSWindowStyleMask, backingStoreType: NSBackingStoreType, @@ -181,7 +181,7 @@ extern_methods!( #[method_id(initWithContentRect:styleMask:backing:defer:screen:)] pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( - &self, + this: Option>, contentRect: NSRect, style: NSWindowStyleMask, backingStoreType: NSBackingStoreType, @@ -190,7 +190,10 @@ extern_methods!( ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(title)] pub unsafe fn title(&self) -> Id; @@ -1170,7 +1173,7 @@ extern_methods!( unsafe impl NSWindow { #[method_id(initWithWindowRef:)] pub unsafe fn initWithWindowRef( - &self, + this: Option>, windowRef: NonNull, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSWindowController.rs b/crates/icrate/src/generated/AppKit/NSWindowController.rs index 65444b3e2..1ef507cb9 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowController.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowController.rs @@ -16,24 +16,33 @@ extern_class!( extern_methods!( unsafe impl NSWindowController { #[method_id(initWithWindow:)] - pub unsafe fn initWithWindow(&self, window: Option<&NSWindow>) -> Id; + pub unsafe fn initWithWindow( + this: Option>, + window: Option<&NSWindow>, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(initWithWindowNibName:)] - pub unsafe fn initWithWindowNibName(&self, windowNibName: &NSNibName) -> Id; + pub unsafe fn initWithWindowNibName( + this: Option>, + windowNibName: &NSNibName, + ) -> Id; #[method_id(initWithWindowNibName:owner:)] pub unsafe fn initWithWindowNibName_owner( - &self, + this: Option>, windowNibName: &NSNibName, owner: &Object, ) -> Id; #[method_id(initWithWindowNibPath:owner:)] pub unsafe fn initWithWindowNibPath_owner( - &self, + this: Option>, windowNibPath: &NSString, owner: &Object, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index 49782a208..c7239a3b1 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -18,10 +18,13 @@ extern_methods!( pub unsafe fn transform() -> Id; #[method_id(initWithTransform:)] - pub unsafe fn initWithTransform(&self, transform: &NSAffineTransform) -> Id; + pub unsafe fn initWithTransform( + this: Option>, + transform: &NSAffineTransform, + ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method(translateXBy:yBy:)] pub unsafe fn translateXBy_yBy(&self, deltaX: CGFloat, deltaY: CGFloat); diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 81e4d2ca0..f7e09fe7d 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -111,11 +111,14 @@ extern_methods!( ) -> Id; #[method_id(initWithAEDescNoCopy:)] - pub unsafe fn initWithAEDescNoCopy(&self, aeDesc: NonNull) -> Id; + pub unsafe fn initWithAEDescNoCopy( + this: Option>, + aeDesc: NonNull, + ) -> Id; #[method_id(initWithDescriptorType:bytes:length:)] pub unsafe fn initWithDescriptorType_bytes_length( - &self, + this: Option>, descriptorType: DescType, bytes: *mut c_void, byteCount: NSUInteger, @@ -123,14 +126,14 @@ extern_methods!( #[method_id(initWithDescriptorType:data:)] pub unsafe fn initWithDescriptorType_data( - &self, + this: Option>, descriptorType: DescType, data: Option<&NSData>, ) -> Option>; #[method_id(initWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] pub unsafe fn initWithEventClass_eventID_targetDescriptor_returnID_transactionID( - &self, + this: Option>, eventClass: AEEventClass, eventID: AEEventID, targetDescriptor: Option<&NSAppleEventDescriptor>, @@ -139,10 +142,10 @@ extern_methods!( ) -> Id; #[method_id(initListDescriptor)] - pub unsafe fn initListDescriptor(&self) -> Id; + pub unsafe fn initListDescriptor(this: Option>) -> Id; #[method_id(initRecordDescriptor)] - pub unsafe fn initRecordDescriptor(&self) -> Id; + pub unsafe fn initRecordDescriptor(this: Option>) -> Id; #[method(aeDesc)] pub unsafe fn aeDesc(&self) -> *mut AEDesc; diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index cc182848f..e6e189058 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -36,13 +36,16 @@ extern_methods!( unsafe impl NSAppleScript { #[method_id(initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( - &self, + this: Option>, url: &NSURL, errorInfo: Option<&mut Option, Shared>>>, ) -> Option>; #[method_id(initWithSource:)] - pub unsafe fn initWithSource(&self, source: &NSString) -> Option>; + pub unsafe fn initWithSource( + this: Option>, + source: &NSString, + ) -> Option>; #[method_id(source)] pub unsafe fn source(&self) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 9e532195e..3a2b3a122 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -16,7 +16,7 @@ extern_methods!( unsafe impl NSArchiver { #[method_id(initForWritingWithMutableData:)] pub unsafe fn initForWritingWithMutableData( - &self, + this: Option>, mdata: &NSMutableData, ) -> Id; @@ -65,7 +65,10 @@ extern_class!( extern_methods!( unsafe impl NSUnarchiver { #[method_id(initForReadingWithData:)] - pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Option>; + pub unsafe fn initForReadingWithData( + this: Option>, + data: &NSData, + ) -> Option>; #[method(setObjectZone:)] pub unsafe fn setObjectZone(&self, zone: *mut NSZone); diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 121a9eaed..5a00f9833 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -23,17 +23,20 @@ extern_methods!( pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithObjects:count:)] pub unsafe fn initWithObjects_count( - &self, + this: Option>, objects: TodoArray, cnt: NSUInteger, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -271,18 +274,21 @@ extern_methods!( pub unsafe fn arrayWithArray(array: &NSArray) -> Id; #[method_id(initWithArray:)] - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; + pub unsafe fn initWithArray( + this: Option>, + array: &NSArray, + ) -> Id; #[method_id(initWithArray:copyItems:)] pub unsafe fn initWithArray_copyItems( - &self, + this: Option>, array: &NSArray, flag: bool, ) -> Id; #[method_id(initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( - &self, + this: Option>, url: &NSURL, ) -> Result, Shared>, Id>; @@ -343,13 +349,13 @@ extern_methods!( #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( - &self, + this: Option>, path: &NSString, ) -> Option, Shared>>; #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( - &self, + this: Option>, url: &NSURL, ) -> Option, Shared>>; @@ -398,13 +404,19 @@ extern_methods!( ); #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCapacity:)] - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + pub unsafe fn initWithCapacity( + this: Option>, + numItems: NSUInteger, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -527,13 +539,13 @@ extern_methods!( #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( - &self, + this: Option>, path: &NSString, ) -> Option, Shared>>; #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( - &self, + this: Option>, url: &NSURL, ) -> Option, Shared>>; } diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index f6b4fb559..3b4c5b35c 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -74,18 +74,21 @@ extern_methods!( pub unsafe fn isEqualToAttributedString(&self, other: &NSAttributedString) -> bool; #[method_id(initWithString:)] - pub unsafe fn initWithString(&self, str: &NSString) -> Id; + pub unsafe fn initWithString( + this: Option>, + str: &NSString, + ) -> Id; #[method_id(initWithString:attributes:)] pub unsafe fn initWithString_attributes( - &self, + this: Option>, str: &NSString, attrs: Option<&NSDictionary>, ) -> Id; #[method_id(initWithAttributedString:)] pub unsafe fn initWithAttributedString( - &self, + this: Option>, attrStr: &NSAttributedString, ) -> Id; @@ -238,7 +241,7 @@ extern_class!( extern_methods!( unsafe impl NSAttributedStringMarkdownParsingOptions { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method(allowsExtendedAttributes)] pub unsafe fn allowsExtendedAttributes(&self) -> bool; @@ -277,7 +280,7 @@ extern_methods!( unsafe impl NSAttributedString { #[method_id(initWithContentsOfMarkdownFileAtURL:options:baseURL:error:)] pub unsafe fn initWithContentsOfMarkdownFileAtURL_options_baseURL_error( - &self, + this: Option>, markdownFile: &NSURL, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, @@ -285,7 +288,7 @@ extern_methods!( #[method_id(initWithMarkdown:options:baseURL:error:)] pub unsafe fn initWithMarkdown_options_baseURL_error( - &self, + this: Option>, markdown: &NSData, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, @@ -293,7 +296,7 @@ extern_methods!( #[method_id(initWithMarkdownString:options:baseURL:error:)] pub unsafe fn initWithMarkdownString_options_baseURL_error( - &self, + this: Option>, markdownString: &NSString, options: Option<&NSAttributedStringMarkdownParsingOptions>, baseURL: Option<&NSURL>, @@ -312,7 +315,7 @@ extern_methods!( unsafe impl NSAttributedString { #[method_id(initWithFormat:options:locale:arguments:)] pub unsafe fn initWithFormat_options_locale_arguments( - &self, + this: Option>, format: &NSAttributedString, options: NSAttributedStringFormattingOptions, locale: Option<&NSLocale>, @@ -391,7 +394,7 @@ extern_methods!( pub unsafe fn intentKind(&self) -> NSPresentationIntentKind; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(parentIntent)] pub unsafe fn parentIntent(&self) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 6d03a0c74..15b210729 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -19,7 +19,10 @@ extern_class!( extern_methods!( unsafe impl NSBackgroundActivityScheduler { #[method_id(initWithIdentifier:)] - pub unsafe fn initWithIdentifier(&self, identifier: &NSString) -> Id; + pub unsafe fn initWithIdentifier( + this: Option>, + identifier: &NSString, + ) -> Id; #[method_id(identifier)] pub unsafe fn identifier(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 1c0c4f91a..7a29ad820 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -27,13 +27,19 @@ extern_methods!( pub unsafe fn bundleWithPath(path: &NSString) -> Option>; #[method_id(initWithPath:)] - pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; + pub unsafe fn initWithPath( + this: Option>, + path: &NSString, + ) -> Option>; #[method_id(bundleWithURL:)] pub unsafe fn bundleWithURL(url: &NSURL) -> Option>; #[method_id(initWithURL:)] - pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; + pub unsafe fn initWithURL( + this: Option>, + url: &NSURL, + ) -> Option>; #[method_id(bundleForClass:)] pub unsafe fn bundleForClass(aClass: &Class) -> Id; @@ -284,14 +290,17 @@ extern_class!( extern_methods!( unsafe impl NSBundleResourceRequest { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithTags:)] - pub unsafe fn initWithTags(&self, tags: &NSSet) -> Id; + pub unsafe fn initWithTags( + this: Option>, + tags: &NSSet, + ) -> Id; #[method_id(initWithTags:bundle:)] pub unsafe fn initWithTags_bundle( - &self, + this: Option>, tags: &NSSet, bundle: &NSBundle, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 70b139c07..62191f888 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -138,11 +138,11 @@ extern_methods!( ) -> Option>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCalendarIdentifier:)] pub unsafe fn initWithCalendarIdentifier( - &self, + this: Option>, ident: &NSCalendarIdentifier, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index 93b0d6057..0b7a8a409 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -104,7 +104,7 @@ extern_methods!( #[method_id(initWithString:calendarFormat:locale:)] pub unsafe fn initWithString_calendarFormat_locale( - &self, + this: Option>, description: &NSString, format: &NSString, locale: Option<&Object>, @@ -112,17 +112,20 @@ extern_methods!( #[method_id(initWithString:calendarFormat:)] pub unsafe fn initWithString_calendarFormat( - &self, + this: Option>, description: &NSString, format: &NSString, ) -> Option>; #[method_id(initWithString:)] - pub unsafe fn initWithString(&self, description: &NSString) -> Option>; + pub unsafe fn initWithString( + this: Option>, + description: &NSString, + ) -> Option>; #[method_id(initWithYear:month:day:hour:minute:second:timeZone:)] pub unsafe fn initWithYear_month_day_hour_minute_second_timeZone( - &self, + this: Option>, year: NSInteger, month: NSUInteger, day: NSUInteger, @@ -191,6 +194,9 @@ extern_methods!( ) -> Option>; #[method_id(initWithString:)] - pub unsafe fn initWithString(&self, description: &NSString) -> Option>; + pub unsafe fn initWithString( + this: Option>, + description: &NSString, + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 19127cc01..feec50d93 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -80,7 +80,10 @@ extern_methods!( ) -> Option>; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method(characterIsMember:)] pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index a4ff1b89d..35fc09dbf 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -58,7 +58,7 @@ extern_methods!( #[method_id(initWithLeftExpression:rightExpression:modifier:type:options:)] pub unsafe fn initWithLeftExpression_rightExpression_modifier_type_options( - &self, + this: Option>, lhs: &NSExpression, rhs: &NSExpression, modifier: NSComparisonPredicateModifier, @@ -68,14 +68,17 @@ extern_methods!( #[method_id(initWithLeftExpression:rightExpression:customSelector:)] pub unsafe fn initWithLeftExpression_rightExpression_customSelector( - &self, + this: Option>, lhs: &NSExpression, rhs: &NSExpression, selector: Sel, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method(predicateOperatorType)] pub unsafe fn predicateOperatorType(&self) -> NSPredicateOperatorType; diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index f565782c7..ed3054b9f 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -21,13 +21,16 @@ extern_methods!( unsafe impl NSCompoundPredicate { #[method_id(initWithType:subpredicates:)] pub unsafe fn initWithType_subpredicates( - &self, + this: Option>, type_: NSCompoundPredicateType, subpredicates: &NSArray, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method(compoundPredicateType)] pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType; diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 2cfa07d85..2b751a7e4 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -134,7 +134,7 @@ extern_methods!( #[method_id(initWithReceivePort:sendPort:)] pub unsafe fn initWithReceivePort_sendPort( - &self, + this: Option>, receivePort: Option<&NSPort>, sendPort: Option<&NSPort>, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index dba9071ac..d2d141ea0 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -154,21 +154,21 @@ extern_methods!( #[method_id(initWithBytes:length:)] pub unsafe fn initWithBytes_length( - &self, + this: Option>, bytes: *mut c_void, length: NSUInteger, ) -> Id; #[method_id(initWithBytesNoCopy:length:)] pub unsafe fn initWithBytesNoCopy_length( - &self, + this: Option>, bytes: NonNull, length: NSUInteger, ) -> Id; #[method_id(initWithBytesNoCopy:length:freeWhenDone:)] pub unsafe fn initWithBytesNoCopy_length_freeWhenDone( - &self, + this: Option>, bytes: NonNull, length: NSUInteger, b: bool, @@ -176,7 +176,7 @@ extern_methods!( #[method_id(initWithBytesNoCopy:length:deallocator:)] pub unsafe fn initWithBytesNoCopy_length_deallocator( - &self, + this: Option>, bytes: NonNull, length: NSUInteger, deallocator: TodoBlock, @@ -184,26 +184,35 @@ extern_methods!( #[method_id(initWithContentsOfFile:options:error:)] pub unsafe fn initWithContentsOfFile_options_error( - &self, + this: Option>, path: &NSString, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; #[method_id(initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( - &self, + this: Option>, url: &NSURL, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; #[method_id(initWithContentsOfFile:)] - pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option>; + pub unsafe fn initWithContentsOfFile( + this: Option>, + path: &NSString, + ) -> Option>; #[method_id(initWithContentsOfURL:)] - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: &NSURL, + ) -> Option>; #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, data: &NSData) -> Id; + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Id; #[method_id(dataWithData:)] pub unsafe fn dataWithData(data: &NSData) -> Id; @@ -215,7 +224,7 @@ extern_methods!( unsafe impl NSData { #[method_id(initWithBase64EncodedString:options:)] pub unsafe fn initWithBase64EncodedString_options( - &self, + this: Option>, base64String: &NSString, options: NSDataBase64DecodingOptions, ) -> Option>; @@ -228,7 +237,7 @@ extern_methods!( #[method_id(initWithBase64EncodedData:options:)] pub unsafe fn initWithBase64EncodedData_options( - &self, + this: Option>, base64Data: &NSData, options: NSDataBase64DecodingOptions, ) -> Option>; @@ -275,13 +284,13 @@ extern_methods!( #[method_id(initWithContentsOfMappedFile:)] pub unsafe fn initWithContentsOfMappedFile( - &self, + this: Option>, path: &NSString, ) -> Option>; #[method_id(initWithBase64Encoding:)] pub unsafe fn initWithBase64Encoding( - &self, + this: Option>, base64String: &NSString, ) -> Option>; @@ -353,10 +362,16 @@ extern_methods!( pub unsafe fn dataWithLength(length: NSUInteger) -> Option>; #[method_id(initWithCapacity:)] - pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Option>; + pub unsafe fn initWithCapacity( + this: Option>, + capacity: NSUInteger, + ) -> Option>; #[method_id(initWithLength:)] - pub unsafe fn initWithLength(&self, length: NSUInteger) -> Option>; + pub unsafe fn initWithLength( + this: Option>, + length: NSUInteger, + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index b6dd90c5a..bc1c5786c 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -22,16 +22,19 @@ extern_methods!( pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithTimeIntervalSinceReferenceDate:)] pub unsafe fn initWithTimeIntervalSinceReferenceDate( - &self, + this: Option>, ti: NSTimeInterval, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -110,18 +113,20 @@ extern_methods!( pub unsafe fn now() -> Id; #[method_id(initWithTimeIntervalSinceNow:)] - pub unsafe fn initWithTimeIntervalSinceNow(&self, secs: NSTimeInterval) - -> Id; + pub unsafe fn initWithTimeIntervalSinceNow( + this: Option>, + secs: NSTimeInterval, + ) -> Id; #[method_id(initWithTimeIntervalSince1970:)] pub unsafe fn initWithTimeIntervalSince1970( - &self, + this: Option>, secs: NSTimeInterval, ) -> Id; #[method_id(initWithTimeInterval:sinceDate:)] pub unsafe fn initWithTimeInterval_sinceDate( - &self, + this: Option>, secsToBeAdded: NSTimeInterval, date: &NSDate, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 68411d3ea..0f89e4188 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -312,7 +312,7 @@ extern_methods!( unsafe impl NSDateFormatter { #[method_id(initWithDateFormat:allowNaturalLanguage:)] pub unsafe fn initWithDateFormat_allowNaturalLanguage( - &self, + this: Option>, format: &NSString, flag: bool, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index 97f1605ac..83ce9cffa 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -24,21 +24,24 @@ extern_methods!( pub unsafe fn duration(&self) -> NSTimeInterval; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Id; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Id; #[method_id(initWithStartDate:duration:)] pub unsafe fn initWithStartDate_duration( - &self, + this: Option>, startDate: &NSDate, duration: NSTimeInterval, ) -> Id; #[method_id(initWithStartDate:endDate:)] pub unsafe fn initWithStartDate_endDate( - &self, + this: Option>, startDate: &NSDate, endDate: &NSDate, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index b0175a18e..a7f1f8be7 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -34,21 +34,27 @@ extern_methods!( unsafe impl NSDecimalNumber { #[method_id(initWithMantissa:exponent:isNegative:)] pub unsafe fn initWithMantissa_exponent_isNegative( - &self, + this: Option>, mantissa: c_ulonglong, exponent: c_short, flag: bool, ) -> Id; #[method_id(initWithDecimal:)] - pub unsafe fn initWithDecimal(&self, dcm: NSDecimal) -> Id; + pub unsafe fn initWithDecimal( + this: Option>, + dcm: NSDecimal, + ) -> Id; #[method_id(initWithString:)] - pub unsafe fn initWithString(&self, numberValue: Option<&NSString>) -> Id; + pub unsafe fn initWithString( + this: Option>, + numberValue: Option<&NSString>, + ) -> Id; #[method_id(initWithString:locale:)] pub unsafe fn initWithString_locale( - &self, + this: Option>, numberValue: Option<&NSString>, locale: Option<&Object>, ) -> Id; @@ -213,7 +219,7 @@ extern_methods!( #[method_id(initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:)] pub unsafe fn initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( - &self, + this: Option>, roundingMode: NSRoundingMode, scale: c_short, exact: bool, diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 7cb4b31b9..7243ef886 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -27,18 +27,21 @@ extern_methods!( pub unsafe fn keyEnumerator(&self) -> Id, Shared>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithObjects:forKeys:count:)] pub unsafe fn initWithObjects_forKeys_count( - &self, + this: Option>, objects: TodoArray, keys: TodoArray, cnt: NSUInteger, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -169,13 +172,13 @@ extern_methods!( #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( - &self, + this: Option>, path: &NSString, ) -> Option, Shared>>; #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( - &self, + this: Option>, url: &NSURL, ) -> Option, Shared>>; @@ -223,27 +226,27 @@ extern_methods!( #[method_id(initWithDictionary:)] pub unsafe fn initWithDictionary( - &self, + this: Option>, otherDictionary: &NSDictionary, ) -> Id; #[method_id(initWithDictionary:copyItems:)] pub unsafe fn initWithDictionary_copyItems( - &self, + this: Option>, otherDictionary: &NSDictionary, flag: bool, ) -> Id; #[method_id(initWithObjects:forKeys:)] pub unsafe fn initWithObjects_forKeys( - &self, + this: Option>, objects: &NSArray, keys: &NSArray, ) -> Id; #[method_id(initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( - &self, + this: Option>, url: &NSURL, ) -> Result, Shared>, Id>; @@ -277,13 +280,19 @@ extern_methods!( pub unsafe fn setObject_forKey(&self, anObject: &ObjectType, aKey: &NSCopying); #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCapacity:)] - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + pub unsafe fn initWithCapacity( + this: Option>, + numItems: NSUInteger, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -328,13 +337,13 @@ extern_methods!( #[method_id(initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( - &self, + this: Option>, path: &NSString, ) -> Option, Shared>>; #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( - &self, + this: Option>, url: &NSURL, ) -> Option, Shared>>; } diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index 14a3ba1ce..7c1059c2c 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -22,7 +22,7 @@ extern_methods!( #[method_id(initWithTarget:connection:)] pub unsafe fn initWithTarget_connection( - &self, + this: Option>, target: &Object, connection: &NSConnection, ) -> Option>; @@ -35,13 +35,16 @@ extern_methods!( #[method_id(initWithLocal:connection:)] pub unsafe fn initWithLocal_connection( - &self, + this: Option>, target: &Object, connection: &NSConnection, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method(setProtocolForProxy:)] pub unsafe fn setProtocolForProxy(&self, proto: Option<&Protocol>); diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index da7e6f1a9..859a0993a 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -18,10 +18,13 @@ extern_methods!( pub unsafe fn lockWithPath(path: &NSString) -> Option>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithPath:)] - pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; + pub unsafe fn initWithPath( + this: Option>, + path: &NSString, + ) -> Option>; #[method(tryLock)] pub unsafe fn tryLock(&self) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 08f091433..623378b4a 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -88,7 +88,7 @@ extern_methods!( unsafe impl NSError { #[method_id(initWithDomain:code:userInfo:)] pub unsafe fn initWithDomain_code_userInfo( - &self, + this: Option>, domain: &NSErrorDomain, code: NSInteger, dict: Option<&NSDictionary>, diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index b262f3d5e..b23da2e75 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -83,7 +83,7 @@ extern_methods!( #[method_id(initWithName:reason:userInfo:)] pub unsafe fn initWithName_reason_userInfo( - &self, + this: Option>, aName: &NSExceptionName, aReason: Option<&NSString>, aUserInfo: Option<&NSDictionary>, diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index 956bebf82..a637ac48e 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -113,10 +113,16 @@ extern_methods!( ) -> Id; #[method_id(initWithExpressionType:)] - pub unsafe fn initWithExpressionType(&self, type_: NSExpressionType) -> Id; + pub unsafe fn initWithExpressionType( + this: Option>, + type_: NSExpressionType, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method(expressionType)] pub unsafe fn expressionType(&self) -> NSExpressionType; diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 62900cafe..91164b9e2 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -68,7 +68,7 @@ extern_methods!( #[method_id(initWithFilePresenter:)] pub unsafe fn initWithFilePresenter( - &self, + this: Option>, filePresenterOrNil: Option<&NSFilePresenter>, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index e3918794c..2f56e9375 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -19,13 +19,16 @@ extern_methods!( #[method_id(initWithFileDescriptor:closeOnDealloc:)] pub unsafe fn initWithFileDescriptor_closeOnDealloc( - &self, + this: Option>, fd: c_int, closeopt: bool, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(readDataToEndOfFileAndReturnError:)] pub unsafe fn readDataToEndOfFileAndReturnError( @@ -203,7 +206,10 @@ extern_methods!( /// NSFileHandlePlatformSpecific unsafe impl NSFileHandle { #[method_id(initWithFileDescriptor:)] - pub unsafe fn initWithFileDescriptor(&self, fd: c_int) -> Id; + pub unsafe fn initWithFileDescriptor( + this: Option>, + fd: c_int, + ) -> Id; #[method(fileDescriptor)] pub unsafe fn fileDescriptor(&self) -> c_int; diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 847c64434..6e0408584 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -24,31 +24,40 @@ extern_methods!( unsafe impl NSFileWrapper { #[method_id(initWithURL:options:error:)] pub unsafe fn initWithURL_options_error( - &self, + this: Option>, url: &NSURL, options: NSFileWrapperReadingOptions, ) -> Result, Id>; #[method_id(initDirectoryWithFileWrappers:)] pub unsafe fn initDirectoryWithFileWrappers( - &self, + this: Option>, childrenByPreferredName: &NSDictionary, ) -> Id; #[method_id(initRegularFileWithContents:)] - pub unsafe fn initRegularFileWithContents(&self, contents: &NSData) -> Id; + pub unsafe fn initRegularFileWithContents( + this: Option>, + contents: &NSData, + ) -> Id; #[method_id(initSymbolicLinkWithDestinationURL:)] - pub unsafe fn initSymbolicLinkWithDestinationURL(&self, url: &NSURL) -> Id; + pub unsafe fn initSymbolicLinkWithDestinationURL( + this: Option>, + url: &NSURL, + ) -> Id; #[method_id(initWithSerializedRepresentation:)] pub unsafe fn initWithSerializedRepresentation( - &self, + this: Option>, serializeRepresentation: &NSData, ) -> Option>; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method(isDirectory)] pub unsafe fn isDirectory(&self) -> bool; @@ -134,11 +143,16 @@ extern_methods!( /// NSDeprecated unsafe impl NSFileWrapper { #[method_id(initWithPath:)] - pub unsafe fn initWithPath(&self, path: &NSString) -> Option>; + pub unsafe fn initWithPath( + this: Option>, + path: &NSString, + ) -> Option>; #[method_id(initSymbolicLinkWithDestination:)] - pub unsafe fn initSymbolicLinkWithDestination(&self, path: &NSString) - -> Id; + pub unsafe fn initSymbolicLinkWithDestination( + this: Option>, + path: &NSString, + ) -> Id; #[method(needsToBeUpdatedFromPath:)] pub unsafe fn needsToBeUpdatedFromPath(&self, path: &NSString) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index d3347138c..cf243c343 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -84,7 +84,7 @@ extern_methods!( unsafe impl NSHTTPCookie { #[method_id(initWithProperties:)] pub unsafe fn initWithProperties( - &self, + this: Option>, properties: &NSDictionary, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index cd075c34f..e43a30dd7 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -32,14 +32,14 @@ extern_methods!( unsafe impl NSHashTable { #[method_id(initWithOptions:capacity:)] pub unsafe fn initWithOptions_capacity( - &self, + this: Option>, options: NSPointerFunctionsOptions, initialCapacity: NSUInteger, ) -> Id; #[method_id(initWithPointerFunctions:capacity:)] pub unsafe fn initWithPointerFunctions_capacity( - &self, + this: Option>, functions: &NSPointerFunctions, initialCapacity: NSUInteger, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 73bbd5a23..d1e517c5b 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -53,7 +53,7 @@ extern_methods!( pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions); #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(stringFromDate:)] pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index 4480949af..e2153fdd8 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -25,13 +25,16 @@ extern_methods!( #[method_id(initWithIndexes:length:)] pub unsafe fn initWithIndexes_length( - &self, + this: Option>, indexes: TodoArray, length: NSUInteger, ) -> Id; #[method_id(initWithIndex:)] - pub unsafe fn initWithIndex(&self, index: NSUInteger) -> Id; + pub unsafe fn initWithIndex( + this: Option>, + index: NSUInteger, + ) -> Id; #[method_id(indexPathByAddingIndex:)] pub unsafe fn indexPathByAddingIndex(&self, index: NSUInteger) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index a9a2a55e4..4ec9188b4 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -24,13 +24,22 @@ extern_methods!( pub unsafe fn indexSetWithIndexesInRange(range: NSRange) -> Id; #[method_id(initWithIndexesInRange:)] - pub unsafe fn initWithIndexesInRange(&self, range: NSRange) -> Id; + pub unsafe fn initWithIndexesInRange( + this: Option>, + range: NSRange, + ) -> Id; #[method_id(initWithIndexSet:)] - pub unsafe fn initWithIndexSet(&self, indexSet: &NSIndexSet) -> Id; + pub unsafe fn initWithIndexSet( + this: Option>, + indexSet: &NSIndexSet, + ) -> Id; #[method_id(initWithIndex:)] - pub unsafe fn initWithIndex(&self, value: NSUInteger) -> Id; + pub unsafe fn initWithIndex( + this: Option>, + value: NSUInteger, + ) -> Id; #[method(isEqualToIndexSet:)] pub unsafe fn isEqualToIndexSet(&self, indexSet: &NSIndexSet) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index bb92df980..0aa84dc41 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSInflectionRule { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(automaticRule)] pub unsafe fn automaticRule() -> Id; @@ -34,7 +34,10 @@ extern_class!( extern_methods!( unsafe impl NSInflectionRuleExplicit { #[method_id(initWithMorphology:)] - pub unsafe fn initWithMorphology(&self, morphology: &NSMorphology) -> Id; + pub unsafe fn initWithMorphology( + this: Option>, + morphology: &NSMorphology, + ) -> Id; #[method_id(morphology)] pub unsafe fn morphology(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index f503df79e..8d11f5ecb 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -29,7 +29,7 @@ extern_class!( extern_methods!( unsafe impl NSItemProvider { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method(registerDataRepresentationForTypeIdentifier:visibility:loadHandler:)] pub unsafe fn registerDataRepresentationForTypeIdentifier_visibility_loadHandler( @@ -95,7 +95,10 @@ extern_methods!( pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>); #[method_id(initWithObject:)] - pub unsafe fn initWithObject(&self, object: &NSItemProviderWriting) -> Id; + pub unsafe fn initWithObject( + this: Option>, + object: &NSItemProviderWriting, + ) -> Id; #[method(registerObject:visibility:)] pub unsafe fn registerObject_visibility( @@ -106,14 +109,14 @@ extern_methods!( #[method_id(initWithItem:typeIdentifier:)] pub unsafe fn initWithItem_typeIdentifier( - &self, + this: Option>, item: Option<&NSSecureCoding>, typeIdentifier: Option<&NSString>, ) -> Id; #[method_id(initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( - &self, + this: Option>, fileURL: Option<&NSURL>, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index d8c516e17..39394df63 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -28,7 +28,7 @@ extern_methods!( unsafe impl NSKeyedArchiver { #[method_id(initRequiringSecureCoding:)] pub unsafe fn initRequiringSecureCoding( - &self, + this: Option>, requiresSecureCoding: bool, ) -> Id; @@ -39,11 +39,11 @@ extern_methods!( ) -> Result, Id>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initForWritingWithMutableData:)] pub unsafe fn initForWritingWithMutableData( - &self, + this: Option>, data: &NSMutableData, ) -> Id; @@ -128,7 +128,7 @@ extern_methods!( unsafe impl NSKeyedUnarchiver { #[method_id(initForReadingFromData:error:)] pub unsafe fn initForReadingFromData_error( - &self, + this: Option>, data: &NSData, ) -> Result, Id>; @@ -171,10 +171,13 @@ extern_methods!( ) -> Result, Id>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initForReadingWithData:)] - pub unsafe fn initForReadingWithData(&self, data: &NSData) -> Id; + pub unsafe fn initForReadingWithData( + this: Option>, + data: &NSData, + ) -> Id; #[method_id(unarchiveObjectWithData:)] pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index c1f27da26..313cadb0a 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -185,7 +185,7 @@ extern_methods!( unsafe impl NSLinguisticTagger { #[method_id(initWithTagSchemes:options:)] pub unsafe fn initWithTagSchemes_options( - &self, + this: Option>, tagSchemes: &NSArray, opts: NSUInteger, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index f601221e7..46f3c5658 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -27,10 +27,16 @@ extern_methods!( ) -> Option>; #[method_id(initWithLocaleIdentifier:)] - pub unsafe fn initWithLocaleIdentifier(&self, string: &NSString) -> Id; + pub unsafe fn initWithLocaleIdentifier( + this: Option>, + string: &NSString, + ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -163,7 +169,7 @@ extern_methods!( pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index 14f571ca1..d8ceda918 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -42,7 +42,10 @@ extern_class!( extern_methods!( unsafe impl NSConditionLock { #[method_id(initWithCondition:)] - pub unsafe fn initWithCondition(&self, condition: NSInteger) -> Id; + pub unsafe fn initWithCondition( + this: Option>, + condition: NSInteger, + ) -> Id; #[method(condition)] pub unsafe fn condition(&self) -> NSInteger; diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 4b205ce82..161887f87 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -33,7 +33,7 @@ extern_methods!( unsafe impl NSMapTable { #[method_id(initWithKeyOptions:valueOptions:capacity:)] pub unsafe fn initWithKeyOptions_valueOptions_capacity( - &self, + this: Option>, keyOptions: NSPointerFunctionsOptions, valueOptions: NSPointerFunctionsOptions, initialCapacity: NSUInteger, @@ -41,7 +41,7 @@ extern_methods!( #[method_id(initWithKeyPointerFunctions:valuePointerFunctions:capacity:)] pub unsafe fn initWithKeyPointerFunctions_valuePointerFunctions_capacity( - &self, + this: Option>, keyFunctions: &NSPointerFunctions, valueFunctions: &NSPointerFunctions, initialCapacity: NSUInteger, diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index 6f3d9a89e..20db01e58 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -23,11 +23,11 @@ extern_methods!( pub unsafe fn doubleValue(&self) -> c_double; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithDoubleValue:unit:)] pub unsafe fn initWithDoubleValue_unit( - &self, + this: Option>, doubleValue: c_double, unit: &UnitType, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index f589fbdb7..48dc099dc 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -209,7 +209,10 @@ extern_class!( extern_methods!( unsafe impl NSMetadataItem { #[method_id(initWithURL:)] - pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; + pub unsafe fn initWithURL( + this: Option>, + url: &NSURL, + ) -> Option>; #[method_id(valueForAttribute:)] pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 745929a53..57c66781c 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -39,7 +39,7 @@ extern_methods!( unsafe impl NSNetService { #[method_id(initWithDomain:type:name:port:)] pub unsafe fn initWithDomain_type_name_port( - &self, + this: Option>, domain: &NSString, type_: &NSString, name: &NSString, @@ -48,7 +48,7 @@ extern_methods!( #[method_id(initWithDomain:type:name:)] pub unsafe fn initWithDomain_type_name( - &self, + this: Option>, domain: &NSString, type_: &NSString, name: &NSString, @@ -141,7 +141,7 @@ extern_class!( extern_methods!( unsafe impl NSNetServiceBrowser { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 0ce627bdc..cefd4a46a 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -27,14 +27,17 @@ extern_methods!( #[method_id(initWithName:object:userInfo:)] pub unsafe fn initWithName_object_userInfo( - &self, + this: Option>, name: &NSNotificationName, object: Option<&Object>, userInfo: Option<&NSDictionary>, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -55,7 +58,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index ba74094d2..6d9c1c51f 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -29,7 +29,7 @@ extern_methods!( #[method_id(initWithNotificationCenter:)] pub unsafe fn initWithNotificationCenter( - &self, + this: Option>, notificationCenter: &NSNotificationCenter, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 0260e8def..9f568a508 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -124,14 +124,17 @@ extern_methods!( unsafe impl NSInvocationOperation { #[method_id(initWithTarget:selector:object:)] pub unsafe fn initWithTarget_selector_object( - &self, + this: Option>, target: &Object, sel: Sel, arg: Option<&Object>, ) -> Option>; #[method_id(initWithInvocation:)] - pub unsafe fn initWithInvocation(&self, inv: &NSInvocation) -> Id; + pub unsafe fn initWithInvocation( + this: Option>, + inv: &NSInvocation, + ) -> Id; #[method_id(invocation)] pub unsafe fn invocation(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 779e29950..7556e0315 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -48,11 +48,11 @@ extern_methods!( pub unsafe fn associatedIndex(&self) -> NSUInteger; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithObject:type:index:)] pub unsafe fn initWithObject_type_index( - &self, + this: Option>, anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, @@ -60,7 +60,7 @@ extern_methods!( #[method_id(initWithObject:type:index:associatedIndex:)] pub unsafe fn initWithObject_type_index_associatedIndex( - &self, + this: Option>, anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index d4ca53a91..6360329b8 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -26,13 +26,13 @@ extern_methods!( unsafe impl NSOrderedCollectionDifference { #[method_id(initWithChanges:)] pub unsafe fn initWithChanges( - &self, + this: Option>, changes: &NSArray>, ) -> Id; #[method_id(initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:)] pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges( - &self, + this: Option>, inserts: &NSIndexSet, insertedObjects: Option<&NSArray>, removes: &NSIndexSet, @@ -42,7 +42,7 @@ extern_methods!( #[method_id(initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:)] pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects( - &self, + this: Option>, inserts: &NSIndexSet, insertedObjects: Option<&NSArray>, removes: &NSIndexSet, diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 732ae035d..37fbb988e 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -26,17 +26,20 @@ extern_methods!( pub unsafe fn indexOfObject(&self, object: &ObjectType) -> NSUInteger; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithObjects:count:)] pub unsafe fn initWithObjects_count( - &self, + this: Option>, objects: TodoArray, cnt: NSUInteger, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -234,51 +237,62 @@ extern_methods!( ) -> Id; #[method_id(initWithObject:)] - pub unsafe fn initWithObject(&self, object: &ObjectType) -> Id; + pub unsafe fn initWithObject( + this: Option>, + object: &ObjectType, + ) -> Id; #[method_id(initWithOrderedSet:)] - pub unsafe fn initWithOrderedSet(&self, set: &NSOrderedSet) - -> Id; + pub unsafe fn initWithOrderedSet( + this: Option>, + set: &NSOrderedSet, + ) -> Id; #[method_id(initWithOrderedSet:copyItems:)] pub unsafe fn initWithOrderedSet_copyItems( - &self, + this: Option>, set: &NSOrderedSet, flag: bool, ) -> Id; #[method_id(initWithOrderedSet:range:copyItems:)] pub unsafe fn initWithOrderedSet_range_copyItems( - &self, + this: Option>, set: &NSOrderedSet, range: NSRange, flag: bool, ) -> Id; #[method_id(initWithArray:)] - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; + pub unsafe fn initWithArray( + this: Option>, + array: &NSArray, + ) -> Id; #[method_id(initWithArray:copyItems:)] pub unsafe fn initWithArray_copyItems( - &self, + this: Option>, set: &NSArray, flag: bool, ) -> Id; #[method_id(initWithArray:range:copyItems:)] pub unsafe fn initWithArray_range_copyItems( - &self, + this: Option>, set: &NSArray, range: NSRange, flag: bool, ) -> Id; #[method_id(initWithSet:)] - pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; + pub unsafe fn initWithSet( + this: Option>, + set: &NSSet, + ) -> Id; #[method_id(initWithSet:copyItems:)] pub unsafe fn initWithSet_copyItems( - &self, + this: Option>, set: &NSSet, flag: bool, ) -> Id; @@ -340,13 +354,19 @@ extern_methods!( pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: &ObjectType); #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCapacity:)] - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + pub unsafe fn initWithCapacity( + this: Option>, + numItems: NSUInteger, + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index 2d1ff8200..b116e7774 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -22,13 +22,16 @@ extern_methods!( #[method_id(initWithDominantScript:languageMap:)] pub unsafe fn initWithDominantScript_languageMap( - &self, + this: Option>, script: &NSString, map: &NSDictionary>, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index 4089b9239..b3b35acb2 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -16,13 +16,13 @@ extern_methods!( unsafe impl NSPointerArray { #[method_id(initWithOptions:)] pub unsafe fn initWithOptions( - &self, + this: Option>, options: NSPointerFunctionsOptions, ) -> Id; #[method_id(initWithPointerFunctions:)] pub unsafe fn initWithPointerFunctions( - &self, + this: Option>, functions: &NSPointerFunctions, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index af11b2db1..b3417b348 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -31,7 +31,7 @@ extern_methods!( unsafe impl NSPointerFunctions { #[method_id(initWithOptions:)] pub unsafe fn initWithOptions( - &self, + this: Option>, options: NSPointerFunctionsOptions, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 966f0ab0a..8aec1f1de 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -101,7 +101,10 @@ extern_methods!( pub unsafe fn portWithMachPort(machPort: u32) -> Id; #[method_id(initWithMachPort:)] - pub unsafe fn initWithMachPort(&self, machPort: u32) -> Id; + pub unsafe fn initWithMachPort( + this: Option>, + machPort: u32, + ) -> Id; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, anObject: Option<&NSMachPortDelegate>); @@ -117,7 +120,7 @@ extern_methods!( #[method_id(initWithMachPort:options:)] pub unsafe fn initWithMachPort_options( - &self, + this: Option>, machPort: u32, f: NSMachPortOptions, ) -> Id; @@ -160,14 +163,17 @@ extern_class!( extern_methods!( unsafe impl NSSocketPort { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithTCPPort:)] - pub unsafe fn initWithTCPPort(&self, port: c_ushort) -> Option>; + pub unsafe fn initWithTCPPort( + this: Option>, + port: c_ushort, + ) -> Option>; #[method_id(initWithProtocolFamily:socketType:protocol:address:)] pub unsafe fn initWithProtocolFamily_socketType_protocol_address( - &self, + this: Option>, family: c_int, type_: c_int, protocol: c_int, @@ -176,7 +182,7 @@ extern_methods!( #[method_id(initWithProtocolFamily:socketType:protocol:socket:)] pub unsafe fn initWithProtocolFamily_socketType_protocol_socket( - &self, + this: Option>, family: c_int, type_: c_int, protocol: c_int, @@ -185,14 +191,14 @@ extern_methods!( #[method_id(initRemoteWithTCPPort:host:)] pub unsafe fn initRemoteWithTCPPort_host( - &self, + this: Option>, port: c_ushort, hostName: Option<&NSString>, ) -> Option>; #[method_id(initRemoteWithProtocolFamily:socketType:protocol:address:)] pub unsafe fn initRemoteWithProtocolFamily_socketType_protocol_address( - &self, + this: Option>, family: c_int, type_: c_int, protocol: c_int, diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index 977b879db..bf536ec6e 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -38,7 +38,7 @@ extern_methods!( #[method_id(initWithReceivePort:sendPort:components:)] pub unsafe fn initWithReceivePort_sendPort_components( - &self, + this: Option>, rcvPort: Option<&NSPort>, sndPort: Option<&NSPort>, comps: Option<&NSArray>, diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index 86cdd297b..39036680e 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -16,7 +16,7 @@ extern_methods!( unsafe impl NSPortMessage { #[method_id(initWithSendPort:receivePort:components:)] pub unsafe fn initWithSendPort_receivePort_components( - &self, + this: Option>, sendPort: Option<&NSPort>, replyPort: Option<&NSPort>, components: Option<&NSArray>, diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index a3a20b9fe..d04327526 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -38,7 +38,7 @@ extern_methods!( #[method_id(initWithParent:userInfo:)] pub unsafe fn initWithParent_userInfo( - &self, + this: Option>, parentProgressOrNil: Option<&NSProgress>, userInfoOrNil: Option<&NSDictionary>, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index 364060a39..10b37b516 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -33,7 +33,7 @@ extern_methods!( #[method_id(initWithTarget:protocol:)] pub unsafe fn initWithTarget_protocol( - &self, + this: Option>, anObject: &NSObject, aProtocol: &Protocol, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 08dc10191..a3ed028fb 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -15,10 +15,10 @@ extern_class!( extern_methods!( unsafe impl NSProxy { #[method_id(alloc)] - pub unsafe fn alloc() -> Id; + pub unsafe fn alloc() -> Option>; #[method_id(allocWithZone:)] - pub unsafe fn allocWithZone(zone: *mut NSZone) -> Id; + pub unsafe fn allocWithZone(zone: *mut NSZone) -> Option>; #[method(class)] pub unsafe fn class() -> &'static Class; diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 6544b6cf6..d0ab5874d 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -31,7 +31,7 @@ extern_methods!( #[method_id(initWithPattern:options:error:)] pub unsafe fn initWithPattern_options_error( - &self, + this: Option>, pattern: &NSString, options: NSRegularExpressionOptions, ) -> Result, Id>; @@ -163,7 +163,7 @@ extern_methods!( #[method_id(initWithTypes:error:)] pub unsafe fn initWithTypes_error( - &self, + this: Option>, checkingTypes: NSTextCheckingTypes, ) -> Result, Id>; diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 8af3260fb..1bbfec828 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -45,7 +45,10 @@ extern_methods!( pub unsafe fn setLocale(&self, locale: Option<&Object>); #[method_id(initWithString:)] - pub unsafe fn initWithString(&self, string: &NSString) -> Id; + pub unsafe fn initWithString( + this: Option>, + string: &NSString, + ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index 5fe39039a..cc567f044 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -21,7 +21,7 @@ extern_methods!( #[method_id(initWithSuiteName:className:dictionary:)] pub unsafe fn initWithSuiteName_className_dictionary( - &self, + this: Option>, suiteName: &NSString, className: &NSString, classDeclaration: Option<&NSDictionary>, diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 4c99ba9c7..25a678c95 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -28,12 +28,15 @@ extern_methods!( unsafe impl NSScriptCommand { #[method_id(initWithCommandDescription:)] pub unsafe fn initWithCommandDescription( - &self, + this: Option>, commandDef: &NSScriptCommandDescription, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method_id(commandDescription)] pub unsafe fn commandDescription(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index b86770295..0a4efb610 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -15,18 +15,21 @@ extern_class!( extern_methods!( unsafe impl NSScriptCommandDescription { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithSuiteName:commandName:dictionary:)] pub unsafe fn initWithSuiteName_commandName_dictionary( - &self, + this: Option>, suiteName: &NSString, commandName: &NSString, commandDeclaration: Option<&NSDictionary>, ) -> Option>; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method_id(suiteName)] pub unsafe fn suiteName(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index 0408ac53e..bc50f86e7 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -47,21 +47,24 @@ extern_methods!( #[method_id(initWithContainerSpecifier:key:)] pub unsafe fn initWithContainerSpecifier_key( - &self, + this: Option>, container: &NSScriptObjectSpecifier, property: &NSString, ) -> Id; #[method_id(initWithContainerClassDescription:containerSpecifier:key:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key( - &self, + this: Option>, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method_id(childSpecifier)] pub unsafe fn childSpecifier(&self) -> Option>; @@ -172,7 +175,7 @@ extern_methods!( unsafe impl NSIndexSpecifier { #[method_id(initWithContainerClassDescription:containerSpecifier:key:index:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_index( - &self, + this: Option>, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, @@ -212,11 +215,14 @@ extern_class!( extern_methods!( unsafe impl NSNameSpecifier { #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method_id(initWithContainerClassDescription:containerSpecifier:key:name:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_name( - &self, + this: Option>, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, @@ -244,7 +250,7 @@ extern_methods!( unsafe impl NSPositionalSpecifier { #[method_id(initWithPosition:objectSpecifier:)] pub unsafe fn initWithPosition_objectSpecifier( - &self, + this: Option>, position: NSInsertionPosition, specifier: &NSScriptObjectSpecifier, ) -> Id; @@ -316,11 +322,14 @@ extern_class!( extern_methods!( unsafe impl NSRangeSpecifier { #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method_id(initWithContainerClassDescription:containerSpecifier:key:startSpecifier:endSpecifier:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_startSpecifier_endSpecifier( - &self, + this: Option>, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, @@ -354,11 +363,14 @@ extern_class!( extern_methods!( unsafe impl NSRelativeSpecifier { #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method_id(initWithContainerClassDescription:containerSpecifier:key:relativePosition:baseSpecifier:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_relativePosition_baseSpecifier( - &self, + this: Option>, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, @@ -392,11 +404,14 @@ extern_class!( extern_methods!( unsafe impl NSUniqueIDSpecifier { #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method_id(initWithContainerClassDescription:containerSpecifier:key:uniqueID:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_uniqueID( - &self, + this: Option>, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, @@ -423,11 +438,14 @@ extern_class!( extern_methods!( unsafe impl NSWhoseSpecifier { #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method_id(initWithContainerClassDescription:containerSpecifier:key:test:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_test( - &self, + this: Option>, classDesc: &NSScriptClassDescription, container: Option<&NSScriptObjectSpecifier>, property: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index 90df88323..1ee995e4d 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -28,10 +28,13 @@ extern_methods!( pub unsafe fn isTrue(&self) -> bool; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; } ); @@ -48,18 +51,21 @@ extern_methods!( unsafe impl NSLogicalTest { #[method_id(initAndTestWithTests:)] pub unsafe fn initAndTestWithTests( - &self, + this: Option>, subTests: &NSArray, ) -> Id; #[method_id(initOrTestWithTests:)] pub unsafe fn initOrTestWithTests( - &self, + this: Option>, subTests: &NSArray, ) -> Id; #[method_id(initNotTestWithTest:)] - pub unsafe fn initNotTestWithTest(&self, subTest: &NSScriptWhoseTest) -> Id; + pub unsafe fn initNotTestWithTest( + this: Option>, + subTest: &NSScriptWhoseTest, + ) -> Id; } ); @@ -75,14 +81,17 @@ extern_class!( extern_methods!( unsafe impl NSSpecifierTest { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, inCoder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + inCoder: &NSCoder, + ) -> Option>; #[method_id(initWithObjectSpecifier:comparisonOperator:testObject:)] pub unsafe fn initWithObjectSpecifier_comparisonOperator_testObject( - &self, + this: Option>, obj1: Option<&NSScriptObjectSpecifier>, compOp: NSTestComparisonOperation, obj2: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index 8796c6ec8..e1db699fc 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -26,17 +26,20 @@ extern_methods!( pub unsafe fn objectEnumerator(&self) -> Id, Shared>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithObjects:count:)] pub unsafe fn initWithObjects_count( - &self, + this: Option>, objects: TodoArray, cnt: NSUInteger, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -141,17 +144,23 @@ extern_methods!( pub unsafe fn setWithArray(array: &NSArray) -> Id; #[method_id(initWithSet:)] - pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; + pub unsafe fn initWithSet( + this: Option>, + set: &NSSet, + ) -> Id; #[method_id(initWithSet:copyItems:)] pub unsafe fn initWithSet_copyItems( - &self, + this: Option>, set: &NSSet, flag: bool, ) -> Id; #[method_id(initWithArray:)] - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; + pub unsafe fn initWithArray( + this: Option>, + array: &NSArray, + ) -> Id; } ); @@ -175,13 +184,19 @@ extern_methods!( pub unsafe fn removeObject(&self, object: &ObjectType); #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCapacity:)] - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + pub unsafe fn initWithCapacity( + this: Option>, + numItems: NSUInteger, + ) -> Id; } ); @@ -230,13 +245,22 @@ __inner_extern_class!( extern_methods!( unsafe impl NSCountedSet { #[method_id(initWithCapacity:)] - pub unsafe fn initWithCapacity(&self, numItems: NSUInteger) -> Id; + pub unsafe fn initWithCapacity( + this: Option>, + numItems: NSUInteger, + ) -> Id; #[method_id(initWithArray:)] - pub unsafe fn initWithArray(&self, array: &NSArray) -> Id; + pub unsafe fn initWithArray( + this: Option>, + array: &NSArray, + ) -> Id; #[method_id(initWithSet:)] - pub unsafe fn initWithSet(&self, set: &NSSet) -> Id; + pub unsafe fn initWithSet( + this: Option>, + set: &NSSet, + ) -> Id; #[method(countForObject:)] pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger; diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index ba70b8145..26c897d82 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -29,21 +29,24 @@ extern_methods!( #[method_id(initWithKey:ascending:)] pub unsafe fn initWithKey_ascending( - &self, + this: Option>, key: Option<&NSString>, ascending: bool, ) -> Id; #[method_id(initWithKey:ascending:selector:)] pub unsafe fn initWithKey_ascending_selector( - &self, + this: Option>, key: Option<&NSString>, ascending: bool, selector: Option, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(key)] pub unsafe fn key(&self) -> Option>; @@ -66,7 +69,7 @@ extern_methods!( #[method_id(initWithKey:ascending:comparator:)] pub unsafe fn initWithKey_ascending_comparator( - &self, + this: Option>, key: Option<&NSString>, ascending: bool, cmptr: NSComparator, diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 49515cebf..8fecb1ea3 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -98,10 +98,16 @@ extern_methods!( pub unsafe fn hasBytesAvailable(&self) -> bool; #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, data: &NSData) -> Id; + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Id; #[method_id(initWithURL:)] - pub unsafe fn initWithURL(&self, url: &NSURL) -> Option>; + pub unsafe fn initWithURL( + this: Option>, + url: &NSURL, + ) -> Option>; } ); @@ -123,18 +129,18 @@ extern_methods!( pub unsafe fn hasSpaceAvailable(&self) -> bool; #[method_id(initToMemory)] - pub unsafe fn initToMemory(&self) -> Id; + pub unsafe fn initToMemory(this: Option>) -> Id; #[method_id(initToBuffer:capacity:)] pub unsafe fn initToBuffer_capacity( - &self, + this: Option>, buffer: NonNull, capacity: NSUInteger, ) -> Id; #[method_id(initWithURL:append:)] pub unsafe fn initWithURL_append( - &self, + this: Option>, url: &NSURL, shouldAppend: bool, ) -> Option>; @@ -178,7 +184,10 @@ extern_methods!( /// NSInputStreamExtensions unsafe impl NSInputStream { #[method_id(initWithFileAtPath:)] - pub unsafe fn initWithFileAtPath(&self, path: &NSString) -> Option>; + pub unsafe fn initWithFileAtPath( + this: Option>, + path: &NSString, + ) -> Option>; #[method_id(inputStreamWithData:)] pub unsafe fn inputStreamWithData(data: &NSData) -> Option>; @@ -196,7 +205,7 @@ extern_methods!( unsafe impl NSOutputStream { #[method_id(initToFileAtPath:append:)] pub unsafe fn initToFileAtPath_append( - &self, + this: Option>, path: &NSString, shouldAppend: bool, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 2b14e5a42..24af6d3f4 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -62,10 +62,13 @@ extern_methods!( pub unsafe fn characterAtIndex(&self, index: NSUInteger) -> unichar; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -540,7 +543,7 @@ extern_methods!( #[method_id(initWithCharactersNoCopy:length:freeWhenDone:)] pub unsafe fn initWithCharactersNoCopy_length_freeWhenDone( - &self, + this: Option>, characters: NonNull, length: NSUInteger, freeBuffer: bool, @@ -548,7 +551,7 @@ extern_methods!( #[method_id(initWithCharactersNoCopy:length:deallocator:)] pub unsafe fn initWithCharactersNoCopy_length_deallocator( - &self, + this: Option>, chars: NonNull, len: NSUInteger, deallocator: TodoBlock, @@ -556,30 +559,33 @@ extern_methods!( #[method_id(initWithCharacters:length:)] pub unsafe fn initWithCharacters_length( - &self, + this: Option>, characters: NonNull, length: NSUInteger, ) -> Id; #[method_id(initWithUTF8String:)] pub unsafe fn initWithUTF8String( - &self, + this: Option>, nullTerminatedCString: NonNull, ) -> Option>; #[method_id(initWithString:)] - pub unsafe fn initWithString(&self, aString: &NSString) -> Id; + pub unsafe fn initWithString( + this: Option>, + aString: &NSString, + ) -> Id; #[method_id(initWithFormat:arguments:)] pub unsafe fn initWithFormat_arguments( - &self, + this: Option>, format: &NSString, argList: va_list, ) -> Id; #[method_id(initWithFormat:locale:arguments:)] pub unsafe fn initWithFormat_locale_arguments( - &self, + this: Option>, format: &NSString, locale: Option<&Object>, argList: va_list, @@ -587,14 +593,14 @@ extern_methods!( #[method_id(initWithData:encoding:)] pub unsafe fn initWithData_encoding( - &self, + this: Option>, data: &NSData, encoding: NSStringEncoding, ) -> Option>; #[method_id(initWithBytes:length:encoding:)] pub unsafe fn initWithBytes_length_encoding( - &self, + this: Option>, bytes: NonNull, len: NSUInteger, encoding: NSStringEncoding, @@ -602,7 +608,7 @@ extern_methods!( #[method_id(initWithBytesNoCopy:length:encoding:freeWhenDone:)] pub unsafe fn initWithBytesNoCopy_length_encoding_freeWhenDone( - &self, + this: Option>, bytes: NonNull, len: NSUInteger, encoding: NSStringEncoding, @@ -611,7 +617,7 @@ extern_methods!( #[method_id(initWithBytesNoCopy:length:encoding:deallocator:)] pub unsafe fn initWithBytesNoCopy_length_encoding_deallocator( - &self, + this: Option>, bytes: NonNull, len: NSUInteger, encoding: NSStringEncoding, @@ -637,7 +643,7 @@ extern_methods!( #[method_id(initWithCString:encoding:)] pub unsafe fn initWithCString_encoding( - &self, + this: Option>, nullTerminatedCString: NonNull, encoding: NSStringEncoding, ) -> Option>; @@ -650,14 +656,14 @@ extern_methods!( #[method_id(initWithContentsOfURL:encoding:error:)] pub unsafe fn initWithContentsOfURL_encoding_error( - &self, + this: Option>, url: &NSURL, enc: NSStringEncoding, ) -> Result, Id>; #[method_id(initWithContentsOfFile:encoding:error:)] pub unsafe fn initWithContentsOfFile_encoding_error( - &self, + this: Option>, path: &NSString, enc: NSStringEncoding, ) -> Result, Id>; @@ -676,14 +682,14 @@ extern_methods!( #[method_id(initWithContentsOfURL:usedEncoding:error:)] pub unsafe fn initWithContentsOfURL_usedEncoding_error( - &self, + this: Option>, url: &NSURL, enc: *mut NSStringEncoding, ) -> Result, Id>; #[method_id(initWithContentsOfFile:usedEncoding:error:)] pub unsafe fn initWithContentsOfFile_usedEncoding_error( - &self, + this: Option>, path: &NSString, enc: *mut NSStringEncoding, ) -> Result, Id>; @@ -810,7 +816,10 @@ extern_methods!( ) -> bool; #[method_id(initWithCapacity:)] - pub unsafe fn initWithCapacity(&self, capacity: NSUInteger) -> Id; + pub unsafe fn initWithCapacity( + this: Option>, + capacity: NSUInteger, + ) -> Id; #[method_id(stringWithCapacity:)] pub unsafe fn stringWithCapacity(capacity: NSUInteger) -> Id; @@ -874,10 +883,16 @@ extern_methods!( pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; #[method_id(initWithContentsOfFile:)] - pub unsafe fn initWithContentsOfFile(&self, path: &NSString) -> Option>; + pub unsafe fn initWithContentsOfFile( + this: Option>, + path: &NSString, + ) -> Option>; #[method_id(initWithContentsOfURL:)] - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: &NSURL, + ) -> Option>; #[method_id(stringWithContentsOfFile:)] pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option>; @@ -887,7 +902,7 @@ extern_methods!( #[method_id(initWithCStringNoCopy:length:freeWhenDone:)] pub unsafe fn initWithCStringNoCopy_length_freeWhenDone( - &self, + this: Option>, bytes: NonNull, length: NSUInteger, freeBuffer: bool, @@ -895,13 +910,16 @@ extern_methods!( #[method_id(initWithCString:length:)] pub unsafe fn initWithCString_length( - &self, + this: Option>, bytes: NonNull, length: NSUInteger, ) -> Option>; #[method_id(initWithCString:)] - pub unsafe fn initWithCString(&self, bytes: NonNull) -> Option>; + pub unsafe fn initWithCString( + this: Option>, + bytes: NonNull, + ) -> Option>; #[method_id(stringWithCString:length:)] pub unsafe fn stringWithCString_length( diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 07391bcb4..16dd41991 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -19,7 +19,7 @@ extern_class!( extern_methods!( unsafe impl NSTask { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(executableURL)] pub unsafe fn executableURL(&self) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index bff1bea3e..dfa47f5f3 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -76,18 +76,21 @@ extern_methods!( pub unsafe fn mainThread() -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithTarget:selector:object:)] pub unsafe fn initWithTarget_selector_object( - &self, + this: Option>, target: &Object, selector: Sel, argument: Option<&Object>, ) -> Id; #[method_id(initWithBlock:)] - pub unsafe fn initWithBlock(&self, block: TodoBlock) -> Id; + pub unsafe fn initWithBlock( + this: Option>, + block: TodoBlock, + ) -> Id; #[method(isExecuting)] pub unsafe fn isExecuting(&self) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index b1b2d93ee..831a6e67f 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -123,11 +123,14 @@ extern_methods!( ) -> Option>; #[method_id(initWithName:)] - pub unsafe fn initWithName(&self, tzName: &NSString) -> Option>; + pub unsafe fn initWithName( + this: Option>, + tzName: &NSString, + ) -> Option>; #[method_id(initWithName:data:)] pub unsafe fn initWithName_data( - &self, + this: Option>, tzName: &NSString, aData: Option<&NSData>, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 11a9e17f8..b70c90ba5 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -62,7 +62,7 @@ extern_methods!( #[method_id(initWithFireDate:interval:repeats:block:)] pub unsafe fn initWithFireDate_interval_repeats_block( - &self, + this: Option>, date: &NSDate, interval: NSTimeInterval, repeats: bool, @@ -71,7 +71,7 @@ extern_methods!( #[method_id(initWithFireDate:interval:target:selector:userInfo:repeats:)] pub unsafe fn initWithFireDate_interval_target_selector_userInfo_repeats( - &self, + this: Option>, date: &NSDate, ti: NSTimeInterval, t: &Object, diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index 4fd23405b..92dcdacd1 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -619,7 +619,7 @@ extern_methods!( unsafe impl NSURL { #[method_id(initWithScheme:host:path:)] pub unsafe fn initWithScheme_host_path( - &self, + this: Option>, scheme: &NSString, host: Option<&NSString>, path: &NSString, @@ -627,7 +627,7 @@ extern_methods!( #[method_id(initFileURLWithPath:isDirectory:relativeToURL:)] pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL( - &self, + this: Option>, path: &NSString, isDir: bool, baseURL: Option<&NSURL>, @@ -635,20 +635,23 @@ extern_methods!( #[method_id(initFileURLWithPath:relativeToURL:)] pub unsafe fn initFileURLWithPath_relativeToURL( - &self, + this: Option>, path: &NSString, baseURL: Option<&NSURL>, ) -> Id; #[method_id(initFileURLWithPath:isDirectory:)] pub unsafe fn initFileURLWithPath_isDirectory( - &self, + this: Option>, path: &NSString, isDir: bool, ) -> Id; #[method_id(initFileURLWithPath:)] - pub unsafe fn initFileURLWithPath(&self, path: &NSString) -> Id; + pub unsafe fn initFileURLWithPath( + this: Option>, + path: &NSString, + ) -> Id; #[method_id(fileURLWithPath:isDirectory:relativeToURL:)] pub unsafe fn fileURLWithPath_isDirectory_relativeToURL( @@ -674,7 +677,7 @@ extern_methods!( #[method_id(initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL( - &self, + this: Option>, path: NonNull, isDir: bool, baseURL: Option<&NSURL>, @@ -688,11 +691,14 @@ extern_methods!( ) -> Id; #[method_id(initWithString:)] - pub unsafe fn initWithString(&self, URLString: &NSString) -> Option>; + pub unsafe fn initWithString( + this: Option>, + URLString: &NSString, + ) -> Option>; #[method_id(initWithString:relativeToURL:)] pub unsafe fn initWithString_relativeToURL( - &self, + this: Option>, URLString: &NSString, baseURL: Option<&NSURL>, ) -> Option>; @@ -708,7 +714,7 @@ extern_methods!( #[method_id(initWithDataRepresentation:relativeToURL:)] pub unsafe fn initWithDataRepresentation_relativeToURL( - &self, + this: Option>, data: &NSData, baseURL: Option<&NSURL>, ) -> Id; @@ -721,7 +727,7 @@ extern_methods!( #[method_id(initAbsoluteURLWithDataRepresentation:relativeToURL:)] pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL( - &self, + this: Option>, data: &NSData, baseURL: Option<&NSURL>, ) -> Id; @@ -862,7 +868,7 @@ extern_methods!( #[method_id(initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( - &self, + this: Option>, bookmarkData: &NSData, options: NSURLBookmarkResolutionOptions, relativeURL: Option<&NSURL>, @@ -950,7 +956,7 @@ extern_methods!( unsafe impl NSURLQueryItem { #[method_id(initWithName:value:)] pub unsafe fn initWithName_value( - &self, + this: Option>, name: &NSString, value: Option<&NSString>, ) -> Id; @@ -981,11 +987,11 @@ extern_class!( extern_methods!( unsafe impl NSURLComponents { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithURL:resolvingAgainstBaseURL:)] pub unsafe fn initWithURL_resolvingAgainstBaseURL( - &self, + this: Option>, url: &NSURL, resolve: bool, ) -> Option>; @@ -997,7 +1003,10 @@ extern_methods!( ) -> Option>; #[method_id(initWithString:)] - pub unsafe fn initWithString(&self, URLString: &NSString) -> Option>; + pub unsafe fn initWithString( + this: Option>, + URLString: &NSString, + ) -> Option>; #[method_id(componentsWithString:)] pub unsafe fn componentsWithString(URLString: &NSString) -> Option>; @@ -1250,7 +1259,10 @@ extern_class!( extern_methods!( unsafe impl NSFileSecurity { #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index a36181a42..25d30c7d7 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -18,7 +18,7 @@ extern_methods!( unsafe impl NSURLAuthenticationChallenge { #[method_id(initWithProtectionSpace:proposedCredential:previousFailureCount:failureResponse:error:sender:)] pub unsafe fn initWithProtectionSpace_proposedCredential_previousFailureCount_failureResponse_error_sender( - &self, + this: Option>, space: &NSURLProtectionSpace, credential: Option<&NSURLCredential>, previousFailureCount: NSInteger, @@ -29,7 +29,7 @@ extern_methods!( #[method_id(initWithAuthenticationChallenge:sender:)] pub unsafe fn initWithAuthenticationChallenge_sender( - &self, + this: Option>, challenge: &NSURLAuthenticationChallenge, sender: &NSURLAuthenticationChallengeSender, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 20af20aea..18a3292fa 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -21,14 +21,14 @@ extern_methods!( unsafe impl NSCachedURLResponse { #[method_id(initWithResponse:data:)] pub unsafe fn initWithResponse_data( - &self, + this: Option>, response: &NSURLResponse, data: &NSData, ) -> Id; #[method_id(initWithResponse:data:userInfo:storagePolicy:)] pub unsafe fn initWithResponse_data_userInfo_storagePolicy( - &self, + this: Option>, response: &NSURLResponse, data: &NSData, userInfo: Option<&NSDictionary>, @@ -68,7 +68,7 @@ extern_methods!( #[method_id(initWithMemoryCapacity:diskCapacity:diskPath:)] pub unsafe fn initWithMemoryCapacity_diskCapacity_diskPath( - &self, + this: Option>, memoryCapacity: NSUInteger, diskCapacity: NSUInteger, path: Option<&NSString>, @@ -76,7 +76,7 @@ extern_methods!( #[method_id(initWithMemoryCapacity:diskCapacity:directoryURL:)] pub unsafe fn initWithMemoryCapacity_diskCapacity_directoryURL( - &self, + this: Option>, memoryCapacity: NSUInteger, diskCapacity: NSUInteger, directoryURL: Option<&NSURL>, diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 19b2160ef..36faddaf3 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -16,7 +16,7 @@ extern_methods!( unsafe impl NSURLConnection { #[method_id(initWithRequest:delegate:startImmediately:)] pub unsafe fn initWithRequest_delegate_startImmediately( - &self, + this: Option>, request: &NSURLRequest, delegate: Option<&Object>, startImmediately: bool, @@ -24,7 +24,7 @@ extern_methods!( #[method_id(initWithRequest:delegate:)] pub unsafe fn initWithRequest_delegate( - &self, + this: Option>, request: &NSURLRequest, delegate: Option<&Object>, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index 1c382f9ff..93e871527 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -30,7 +30,7 @@ extern_methods!( unsafe impl NSURLCredential { #[method_id(initWithUser:password:persistence:)] pub unsafe fn initWithUser_password_persistence( - &self, + this: Option>, user: &NSString, password: &NSString, persistence: NSURLCredentialPersistence, @@ -59,7 +59,7 @@ extern_methods!( unsafe impl NSURLCredential { #[method_id(initWithIdentity:certificates:persistence:)] pub unsafe fn initWithIdentity_certificates_persistence( - &self, + this: Option>, identity: SecIdentityRef, certArray: Option<&NSArray>, persistence: NSURLCredentialPersistence, @@ -84,7 +84,10 @@ extern_methods!( /// NSServerTrust unsafe impl NSURLCredential { #[method_id(initWithTrust:)] - pub unsafe fn initWithTrust(&self, trust: SecTrustRef) -> Id; + pub unsafe fn initWithTrust( + this: Option>, + trust: SecTrustRef, + ) -> Id; #[method_id(credentialForTrust:)] pub unsafe fn credentialForTrust(trust: SecTrustRef) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index fb86809a6..2f8eee492 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -19,14 +19,14 @@ extern_methods!( #[method_id(initWithRequest:delegate:)] pub unsafe fn initWithRequest_delegate( - &self, + this: Option>, request: &NSURLRequest, delegate: Option<&NSURLDownloadDelegate>, ) -> Id; #[method_id(initWithResumeData:delegate:path:)] pub unsafe fn initWithResumeData_delegate_path( - &self, + this: Option>, resumeData: &NSData, delegate: Option<&NSURLDownloadDelegate>, path: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 6dc157a2a..e1d8c872c 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -116,7 +116,7 @@ extern_methods!( #[method_id(initWithURL:cached:)] pub unsafe fn initWithURL_cached( - &self, + this: Option>, anURL: Option<&NSURL>, willCache: bool, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index c52c03b80..cd571f84b 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -76,7 +76,7 @@ extern_methods!( unsafe impl NSURLProtectionSpace { #[method_id(initWithHost:port:protocol:realm:authenticationMethod:)] pub unsafe fn initWithHost_port_protocol_realm_authenticationMethod( - &self, + this: Option>, host: &NSString, port: NSInteger, protocol: Option<&NSString>, @@ -86,7 +86,7 @@ extern_methods!( #[method_id(initWithProxyHost:port:type:realm:authenticationMethod:)] pub unsafe fn initWithProxyHost_port_type_realm_authenticationMethod( - &self, + this: Option>, host: &NSString, port: NSInteger, type_: Option<&NSString>, diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index 1c4fbbbb7..ceef72be0 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -18,7 +18,7 @@ extern_methods!( unsafe impl NSURLProtocol { #[method_id(initWithRequest:cachedResponse:client:)] pub unsafe fn initWithRequest_cachedResponse_client( - &self, + this: Option>, request: &NSURLRequest, cachedResponse: Option<&NSCachedURLResponse>, client: Option<&NSURLProtocolClient>, @@ -85,7 +85,7 @@ extern_methods!( #[method_id(initWithTask:cachedResponse:client:)] pub unsafe fn initWithTask_cachedResponse_client( - &self, + this: Option>, task: &NSURLSessionTask, cachedResponse: Option<&NSCachedURLResponse>, client: Option<&NSURLProtocolClient>, diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index f3e1be285..4e9d80e1c 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -53,11 +53,11 @@ extern_methods!( ) -> Id; #[method_id(initWithURL:)] - pub unsafe fn initWithURL(&self, URL: &NSURL) -> Id; + pub unsafe fn initWithURL(this: Option>, URL: &NSURL) -> Id; #[method_id(initWithURL:cachePolicy:timeoutInterval:)] pub unsafe fn initWithURL_cachePolicy_timeoutInterval( - &self, + this: Option>, URL: &NSURL, cachePolicy: NSURLRequestCachePolicy, timeoutInterval: NSTimeInterval, diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index 0932903c0..921e7846f 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -16,7 +16,7 @@ extern_methods!( unsafe impl NSURLResponse { #[method_id(initWithURL:MIMEType:expectedContentLength:textEncodingName:)] pub unsafe fn initWithURL_MIMEType_expectedContentLength_textEncodingName( - &self, + this: Option>, URL: &NSURL, MIMEType: Option<&NSString>, length: NSInteger, @@ -53,7 +53,7 @@ extern_methods!( unsafe impl NSHTTPURLResponse { #[method_id(initWithURL:statusCode:HTTPVersion:headerFields:)] pub unsafe fn initWithURL_statusCode_HTTPVersion_headerFields( - &self, + this: Option>, url: &NSURL, statusCode: NSInteger, HTTPVersion: Option<&NSString>, diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 84e4b497e..2857f216f 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -146,7 +146,7 @@ extern_methods!( ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -317,7 +317,7 @@ extern_methods!( pub unsafe fn setPrefersIncrementalDelivery(&self, prefersIncrementalDelivery: bool); #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -348,7 +348,7 @@ extern_class!( extern_methods!( unsafe impl NSURLSessionDataTask { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -367,7 +367,7 @@ extern_class!( extern_methods!( unsafe impl NSURLSessionUploadTask { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -389,7 +389,7 @@ extern_methods!( pub unsafe fn cancelByProducingResumeData(&self, completionHandler: TodoBlock); #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -440,7 +440,7 @@ extern_methods!( pub unsafe fn stopSecureConnection(&self); #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -463,10 +463,16 @@ extern_class!( extern_methods!( unsafe impl NSURLSessionWebSocketMessage { #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, data: &NSData) -> Id; + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Id; #[method_id(initWithString:)] - pub unsafe fn initWithString(&self, string: &NSString) -> Id; + pub unsafe fn initWithString( + this: Option>, + string: &NSString, + ) -> Id; #[method(type)] pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType; @@ -478,7 +484,7 @@ extern_methods!( pub unsafe fn string(&self) -> Option>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -546,7 +552,7 @@ extern_methods!( pub unsafe fn closeReason(&self) -> Option>; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -792,7 +798,7 @@ extern_methods!( ); #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -981,7 +987,7 @@ extern_methods!( ) -> NSURLSessionTaskMetricsDomainResolutionProtocol; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; @@ -1011,7 +1017,7 @@ extern_methods!( pub unsafe fn redirectCount(&self) -> NSUInteger; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index b04f4f0c8..f30c13a4f 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -18,13 +18,19 @@ extern_methods!( pub unsafe fn UUID() -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithUUIDString:)] - pub unsafe fn initWithUUIDString(&self, string: &NSString) -> Option>; + pub unsafe fn initWithUUIDString( + this: Option>, + string: &NSString, + ) -> Option>; #[method_id(initWithUUIDBytes:)] - pub unsafe fn initWithUUIDBytes(&self, bytes: uuid_t) -> Id; + pub unsafe fn initWithUUIDBytes( + this: Option>, + bytes: uuid_t, + ) -> Id; #[method(getUUIDBytes:)] pub unsafe fn getUUIDBytes(&self, uuid: uuid_t); diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index 7422fb1e9..62921819e 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -40,11 +40,14 @@ extern_methods!( pub unsafe fn constant(&self) -> c_double; #[method_id(initWithCoefficient:)] - pub unsafe fn initWithCoefficient(&self, coefficient: c_double) -> Id; + pub unsafe fn initWithCoefficient( + this: Option>, + coefficient: c_double, + ) -> Id; #[method_id(initWithCoefficient:constant:)] pub unsafe fn initWithCoefficient_constant( - &self, + this: Option>, coefficient: c_double, constant: c_double, ) -> Id; @@ -66,13 +69,16 @@ extern_methods!( pub unsafe fn symbol(&self) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(new)] pub unsafe fn new() -> Id; #[method_id(initWithSymbol:)] - pub unsafe fn initWithSymbol(&self, symbol: &NSString) -> Id; + pub unsafe fn initWithSymbol( + this: Option>, + symbol: &NSString, + ) -> Id; } ); @@ -92,7 +98,7 @@ extern_methods!( #[method_id(initWithSymbol:converter:)] pub unsafe fn initWithSymbol_converter( - &self, + this: Option>, symbol: &NSString, converter: &NSUnitConverter, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 1e286821f..fa39f10b5 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -17,10 +17,13 @@ extern_class!( extern_methods!( unsafe impl NSUserActivity { #[method_id(initWithActivityType:)] - pub unsafe fn initWithActivityType(&self, activityType: &NSString) -> Id; + pub unsafe fn initWithActivityType( + this: Option>, + activityType: &NSString, + ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(activityType)] pub unsafe fn activityType(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index c212882db..e95335552 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -33,16 +33,19 @@ extern_methods!( pub unsafe fn resetStandardUserDefaults(); #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithSuiteName:)] pub unsafe fn initWithSuiteName( - &self, + this: Option>, suitename: Option<&NSString>, ) -> Option>; #[method_id(initWithUser:)] - pub unsafe fn initWithUser(&self, username: &NSString) -> Option>; + pub unsafe fn initWithUser( + this: Option>, + username: &NSString, + ) -> Option>; #[method_id(objectForKey:)] pub unsafe fn objectForKey(&self, defaultName: &NSString) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 2a4d7c0b2..96ab44f27 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -23,7 +23,7 @@ extern_class!( extern_methods!( unsafe impl NSUserNotification { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(title)] pub unsafe fn title(&self) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index 4f7e6e8e8..894995fd3 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -16,7 +16,7 @@ extern_methods!( unsafe impl NSUserScriptTask { #[method_id(initWithURL:error:)] pub unsafe fn initWithURL_error( - &self, + this: Option>, url: &NSURL, ) -> Result, Id>; diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index b5aa6a277..f7a016e0b 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -22,13 +22,16 @@ extern_methods!( #[method_id(initWithBytes:objCType:)] pub unsafe fn initWithBytes_objCType( - &self, + this: Option>, value: NonNull, type_: NonNull, ) -> Id; #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; } ); @@ -81,52 +84,100 @@ extern_class!( extern_methods!( unsafe impl NSNumber { #[method_id(initWithCoder:)] - pub unsafe fn initWithCoder(&self, coder: &NSCoder) -> Option>; + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; #[method_id(initWithChar:)] - pub unsafe fn initWithChar(&self, value: c_char) -> Id; + pub unsafe fn initWithChar( + this: Option>, + value: c_char, + ) -> Id; #[method_id(initWithUnsignedChar:)] - pub unsafe fn initWithUnsignedChar(&self, value: c_uchar) -> Id; + pub unsafe fn initWithUnsignedChar( + this: Option>, + value: c_uchar, + ) -> Id; #[method_id(initWithShort:)] - pub unsafe fn initWithShort(&self, value: c_short) -> Id; + pub unsafe fn initWithShort( + this: Option>, + value: c_short, + ) -> Id; #[method_id(initWithUnsignedShort:)] - pub unsafe fn initWithUnsignedShort(&self, value: c_ushort) -> Id; + pub unsafe fn initWithUnsignedShort( + this: Option>, + value: c_ushort, + ) -> Id; #[method_id(initWithInt:)] - pub unsafe fn initWithInt(&self, value: c_int) -> Id; + pub unsafe fn initWithInt( + this: Option>, + value: c_int, + ) -> Id; #[method_id(initWithUnsignedInt:)] - pub unsafe fn initWithUnsignedInt(&self, value: c_uint) -> Id; + pub unsafe fn initWithUnsignedInt( + this: Option>, + value: c_uint, + ) -> Id; #[method_id(initWithLong:)] - pub unsafe fn initWithLong(&self, value: c_long) -> Id; + pub unsafe fn initWithLong( + this: Option>, + value: c_long, + ) -> Id; #[method_id(initWithUnsignedLong:)] - pub unsafe fn initWithUnsignedLong(&self, value: c_ulong) -> Id; + pub unsafe fn initWithUnsignedLong( + this: Option>, + value: c_ulong, + ) -> Id; #[method_id(initWithLongLong:)] - pub unsafe fn initWithLongLong(&self, value: c_longlong) -> Id; + pub unsafe fn initWithLongLong( + this: Option>, + value: c_longlong, + ) -> Id; #[method_id(initWithUnsignedLongLong:)] - pub unsafe fn initWithUnsignedLongLong(&self, value: c_ulonglong) -> Id; + pub unsafe fn initWithUnsignedLongLong( + this: Option>, + value: c_ulonglong, + ) -> Id; #[method_id(initWithFloat:)] - pub unsafe fn initWithFloat(&self, value: c_float) -> Id; + pub unsafe fn initWithFloat( + this: Option>, + value: c_float, + ) -> Id; #[method_id(initWithDouble:)] - pub unsafe fn initWithDouble(&self, value: c_double) -> Id; + pub unsafe fn initWithDouble( + this: Option>, + value: c_double, + ) -> Id; #[method_id(initWithBool:)] - pub unsafe fn initWithBool(&self, value: bool) -> Id; + pub unsafe fn initWithBool( + this: Option>, + value: bool, + ) -> Id; #[method_id(initWithInteger:)] - pub unsafe fn initWithInteger(&self, value: NSInteger) -> Id; + pub unsafe fn initWithInteger( + this: Option>, + value: NSInteger, + ) -> Id; #[method_id(initWithUnsignedInteger:)] - pub unsafe fn initWithUnsignedInteger(&self, value: NSUInteger) -> Id; + pub unsafe fn initWithUnsignedInteger( + this: Option>, + value: NSUInteger, + ) -> Id; #[method(charValue)] pub unsafe fn charValue(&self) -> c_char; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index dce20b599..27ea835b2 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -15,25 +15,25 @@ extern_class!( extern_methods!( unsafe impl NSXMLDTD { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( - &self, + this: Option>, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; #[method_id(initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( - &self, + this: Option>, url: &NSURL, mask: NSXMLNodeOptions, ) -> Result, Id>; #[method_id(initWithData:options:error:)] pub unsafe fn initWithData_options_error( - &self, + this: Option>, data: &NSData, mask: NSXMLNodeOptions, ) -> Result, Id>; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index 8d87e5213..61f4da64f 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -37,17 +37,20 @@ extern_class!( extern_methods!( unsafe impl NSXMLDTDNode { #[method_id(initWithXMLString:)] - pub unsafe fn initWithXMLString(&self, string: &NSString) -> Option>; + pub unsafe fn initWithXMLString( + this: Option>, + string: &NSString, + ) -> Option>; #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( - &self, + this: Option>, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method(DTDKind)] pub unsafe fn DTDKind(&self) -> NSXMLDTDNodeKind; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index 2d9aad69b..4736927a9 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -21,32 +21,32 @@ extern_class!( extern_methods!( unsafe impl NSXMLDocument { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithXMLString:options:error:)] pub unsafe fn initWithXMLString_options_error( - &self, + this: Option>, string: &NSString, mask: NSXMLNodeOptions, ) -> Result, Id>; #[method_id(initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( - &self, + this: Option>, url: &NSURL, mask: NSXMLNodeOptions, ) -> Result, Id>; #[method_id(initWithData:options:error:)] pub unsafe fn initWithData_options_error( - &self, + this: Option>, data: &NSData, mask: NSXMLNodeOptions, ) -> Result, Id>; #[method_id(initWithRootElement:)] pub unsafe fn initWithRootElement( - &self, + this: Option>, element: Option<&NSXMLElement>, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index b8d4479ce..cdff75745 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -15,31 +15,34 @@ extern_class!( extern_methods!( unsafe impl NSXMLElement { #[method_id(initWithName:)] - pub unsafe fn initWithName(&self, name: &NSString) -> Id; + pub unsafe fn initWithName( + this: Option>, + name: &NSString, + ) -> Id; #[method_id(initWithName:URI:)] pub unsafe fn initWithName_URI( - &self, + this: Option>, name: &NSString, URI: Option<&NSString>, ) -> Id; #[method_id(initWithName:stringValue:)] pub unsafe fn initWithName_stringValue( - &self, + this: Option>, name: &NSString, string: Option<&NSString>, ) -> Id; #[method_id(initWithXMLString:error:)] pub unsafe fn initWithXMLString_error( - &self, + this: Option>, string: &NSString, ) -> Result, Id>; #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( - &self, + this: Option>, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 87e0bbda1..c3139b9c0 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -30,14 +30,17 @@ extern_class!( extern_methods!( unsafe impl NSXMLNode { #[method_id(init)] - pub unsafe fn init(&self) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(initWithKind:)] - pub unsafe fn initWithKind(&self, kind: NSXMLNodeKind) -> Id; + pub unsafe fn initWithKind( + this: Option>, + kind: NSXMLNodeKind, + ) -> Id; #[method_id(initWithKind:options:)] pub unsafe fn initWithKind_options( - &self, + this: Option>, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 7d3bd64e6..b3111fbf0 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -22,13 +22,22 @@ extern_class!( extern_methods!( unsafe impl NSXMLParser { #[method_id(initWithContentsOfURL:)] - pub unsafe fn initWithContentsOfURL(&self, url: &NSURL) -> Option>; + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: &NSURL, + ) -> Option>; #[method_id(initWithData:)] - pub unsafe fn initWithData(&self, data: &NSData) -> Id; + pub unsafe fn initWithData( + this: Option>, + data: &NSData, + ) -> Id; #[method_id(initWithStream:)] - pub unsafe fn initWithStream(&self, stream: &NSInputStream) -> Id; + pub unsafe fn initWithStream( + this: Option>, + stream: &NSInputStream, + ) -> Id; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 1f6be3e50..010f96854 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -20,21 +20,24 @@ extern_class!( extern_methods!( unsafe impl NSXPCConnection { #[method_id(initWithServiceName:)] - pub unsafe fn initWithServiceName(&self, serviceName: &NSString) -> Id; + pub unsafe fn initWithServiceName( + this: Option>, + serviceName: &NSString, + ) -> Id; #[method_id(serviceName)] pub unsafe fn serviceName(&self) -> Option>; #[method_id(initWithMachServiceName:options:)] pub unsafe fn initWithMachServiceName_options( - &self, + this: Option>, name: &NSString, options: NSXPCConnectionOptions, ) -> Id; #[method_id(initWithListenerEndpoint:)] pub unsafe fn initWithListenerEndpoint( - &self, + this: Option>, endpoint: &NSXPCListenerEndpoint, ) -> Id; @@ -136,7 +139,10 @@ extern_methods!( pub unsafe fn anonymousListener() -> Id; #[method_id(initWithMachServiceName:)] - pub unsafe fn initWithMachServiceName(&self, name: &NSString) -> Id; + pub unsafe fn initWithMachServiceName( + this: Option>, + name: &NSString, + ) -> Id; #[method_id(delegate)] pub unsafe fn delegate(&self) -> Option>; diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 5a8e41026..b9bbc19d6 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -35,7 +35,7 @@ mod common { pub(crate) use std::ptr::NonNull; pub(crate) use objc2::ffi::{NSInteger, NSUInteger}; - pub(crate) use objc2::rc::{Id, Shared}; + pub(crate) use objc2::rc::{Allocated, Id, Shared}; pub(crate) use objc2::runtime::{Class, Object, Sel}; pub(crate) use objc2::{ __inner_extern_class, extern_class, extern_methods, ClassType, Message, From c44ebeefdaaa543da5f94a9108f3df807850a0de Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 20:36:49 +0100 Subject: [PATCH 099/131] Make __inner_extern_class allowing trailing comma in generics --- crates/objc2/src/macros/extern_class.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/objc2/src/macros/extern_class.rs b/crates/objc2/src/macros/extern_class.rs index 3164c802e..1876a99d9 100644 --- a/crates/objc2/src/macros/extern_class.rs +++ b/crates/objc2/src/macros/extern_class.rs @@ -245,7 +245,7 @@ macro_rules! __inner_extern_class { // TODO: Expose this variant of the macro. ( $(#[$m:meta])* - $v:vis struct $name:ident<$($t_struct:ident $(: $b_struct:ident $(= $default:ty)?)?),*> { + $v:vis struct $name:ident<$($t_struct:ident $(: $b_struct:ident $(= $default:ty)?)?),* $(,)?> { $($field_vis:vis $field:ident: $field_ty:ty,)* } From ecb690f6f4a321383c8707b5c2b1974b3fee4d07 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 16:59:24 +0100 Subject: [PATCH 100/131] Attempt to improve Rust's parsing speed of icrate --- crates/header-translator/src/method.rs | 27 +- .../src/generated/AppKit/NSATSTypesetter.rs | 12 +- .../src/generated/AppKit/NSAccessibility.rs | 18 +- .../AppKit/NSAccessibilityCustomAction.rs | 8 +- .../AppKit/NSAccessibilityCustomRotor.rs | 28 +- .../AppKit/NSAccessibilityElement.rs | 2 +- .../src/generated/AppKit/NSActionCell.rs | 2 +- .../src/generated/AppKit/NSAffineTransform.rs | 2 +- crates/icrate/src/generated/AppKit/NSAlert.rs | 22 +- .../AppKit/NSAlignmentFeedbackFilter.rs | 6 +- .../src/generated/AppKit/NSAnimation.rs | 14 +- .../generated/AppKit/NSAnimationContext.rs | 4 +- .../src/generated/AppKit/NSAppearance.rs | 14 +- .../AppKit/NSAppleScriptExtensions.rs | 2 +- .../src/generated/AppKit/NSApplication.rs | 46 +- .../AppKit/NSApplicationScripting.rs | 4 +- .../src/generated/AppKit/NSArrayController.rs | 14 +- .../generated/AppKit/NSAttributedString.rs | 52 +-- .../src/generated/AppKit/NSBezierPath.rs | 12 +- .../src/generated/AppKit/NSBitmapImageRep.rs | 42 +- crates/icrate/src/generated/AppKit/NSBox.rs | 12 +- .../icrate/src/generated/AppKit/NSBrowser.rs | 42 +- .../src/generated/AppKit/NSBrowserCell.rs | 16 +- .../icrate/src/generated/AppKit/NSButton.rs | 34 +- .../src/generated/AppKit/NSButtonCell.rs | 26 +- .../generated/AppKit/NSButtonTouchBarItem.rs | 16 +- .../src/generated/AppKit/NSCIImageRep.rs | 8 +- .../src/generated/AppKit/NSCachedImageRep.rs | 6 +- .../AppKit/NSCandidateListTouchBarItem.rs | 10 +- crates/icrate/src/generated/AppKit/NSCell.rs | 46 +- .../icrate/src/generated/AppKit/NSClipView.rs | 6 +- .../src/generated/AppKit/NSCollectionView.rs | 66 +-- .../NSCollectionViewCompositionalLayout.rs | 154 +++---- .../AppKit/NSCollectionViewGridLayout.rs | 2 +- .../AppKit/NSCollectionViewLayout.rs | 60 +-- .../NSCollectionViewTransitionLayout.rs | 6 +- crates/icrate/src/generated/AppKit/NSColor.rs | 240 +++++----- .../src/generated/AppKit/NSColorList.rs | 14 +- .../src/generated/AppKit/NSColorPanel.rs | 6 +- .../src/generated/AppKit/NSColorPicker.rs | 8 +- .../AppKit/NSColorPickerTouchBarItem.rs | 18 +- .../src/generated/AppKit/NSColorSpace.rs | 36 +- .../src/generated/AppKit/NSColorWell.rs | 2 +- .../icrate/src/generated/AppKit/NSComboBox.rs | 10 +- .../src/generated/AppKit/NSComboBoxCell.rs | 10 +- .../icrate/src/generated/AppKit/NSControl.rs | 22 +- .../src/generated/AppKit/NSController.rs | 4 +- .../icrate/src/generated/AppKit/NSCursor.rs | 48 +- .../src/generated/AppKit/NSCustomImageRep.rs | 6 +- .../generated/AppKit/NSCustomTouchBarItem.rs | 6 +- .../src/generated/AppKit/NSDataAsset.rs | 12 +- .../src/generated/AppKit/NSDatePicker.rs | 18 +- .../src/generated/AppKit/NSDatePickerCell.rs | 24 +- .../AppKit/NSDictionaryController.rs | 22 +- .../generated/AppKit/NSDiffableDataSource.rs | 20 +- .../icrate/src/generated/AppKit/NSDockTile.rs | 6 +- .../icrate/src/generated/AppKit/NSDocument.rs | 72 +-- .../generated/AppKit/NSDocumentController.rs | 64 +-- .../generated/AppKit/NSDocumentScripting.rs | 10 +- .../icrate/src/generated/AppKit/NSDragging.rs | 2 +- .../src/generated/AppKit/NSDraggingItem.rs | 18 +- .../src/generated/AppKit/NSDraggingSession.rs | 2 +- .../icrate/src/generated/AppKit/NSDrawer.rs | 10 +- .../src/generated/AppKit/NSEPSImageRep.rs | 6 +- crates/icrate/src/generated/AppKit/NSEvent.rs | 38 +- .../generated/AppKit/NSFilePromiseProvider.rs | 10 +- .../generated/AppKit/NSFilePromiseReceiver.rs | 6 +- .../AppKit/NSFileWrapperExtensions.rs | 2 +- crates/icrate/src/generated/AppKit/NSFont.rs | 62 +-- .../generated/AppKit/NSFontAssetRequest.rs | 8 +- .../src/generated/AppKit/NSFontCollection.rs | 38 +- .../src/generated/AppKit/NSFontDescriptor.rs | 36 +- .../src/generated/AppKit/NSFontManager.rs | 46 +- .../src/generated/AppKit/NSFontPanel.rs | 6 +- crates/icrate/src/generated/AppKit/NSForm.rs | 6 +- .../icrate/src/generated/AppKit/NSFormCell.rs | 16 +- .../generated/AppKit/NSGestureRecognizer.rs | 12 +- .../src/generated/AppKit/NSGlyphGenerator.rs | 2 +- .../src/generated/AppKit/NSGlyphInfo.rs | 12 +- .../icrate/src/generated/AppKit/NSGradient.rs | 12 +- .../src/generated/AppKit/NSGraphicsContext.rs | 18 +- .../icrate/src/generated/AppKit/NSGridView.rs | 42 +- .../generated/AppKit/NSGroupTouchBarItem.rs | 14 +- .../src/generated/AppKit/NSHapticFeedback.rs | 2 +- .../src/generated/AppKit/NSHelpManager.rs | 6 +- crates/icrate/src/generated/AppKit/NSImage.rs | 88 ++-- .../icrate/src/generated/AppKit/NSImageRep.rs | 32 +- .../src/generated/AppKit/NSImageView.rs | 8 +- .../src/generated/AppKit/NSInputManager.rs | 12 +- .../src/generated/AppKit/NSInputServer.rs | 2 +- .../src/generated/AppKit/NSKeyValueBinding.rs | 18 +- .../src/generated/AppKit/NSLayoutAnchor.rs | 52 +-- .../generated/AppKit/NSLayoutConstraint.rs | 42 +- .../src/generated/AppKit/NSLayoutGuide.rs | 28 +- .../src/generated/AppKit/NSLayoutManager.rs | 38 +- .../src/generated/AppKit/NSLevelIndicator.rs | 10 +- .../generated/AppKit/NSLevelIndicatorCell.rs | 2 +- .../icrate/src/generated/AppKit/NSMatrix.rs | 32 +- .../AppKit/NSMediaLibraryBrowserController.rs | 2 +- crates/icrate/src/generated/AppKit/NSMenu.rs | 34 +- .../icrate/src/generated/AppKit/NSMenuItem.rs | 40 +- .../src/generated/AppKit/NSMenuItemCell.rs | 6 +- .../src/generated/AppKit/NSMenuToolbarItem.rs | 2 +- crates/icrate/src/generated/AppKit/NSMovie.rs | 8 +- crates/icrate/src/generated/AppKit/NSNib.rs | 6 +- .../generated/AppKit/NSObjectController.rs | 20 +- .../icrate/src/generated/AppKit/NSOpenGL.rs | 24 +- .../src/generated/AppKit/NSOpenGLLayer.rs | 10 +- .../src/generated/AppKit/NSOpenGLView.rs | 8 +- .../src/generated/AppKit/NSOpenPanel.rs | 6 +- .../src/generated/AppKit/NSOutlineView.rs | 12 +- .../src/generated/AppKit/NSPDFImageRep.rs | 6 +- .../icrate/src/generated/AppKit/NSPDFInfo.rs | 6 +- .../icrate/src/generated/AppKit/NSPDFPanel.rs | 6 +- .../src/generated/AppKit/NSPICTImageRep.rs | 6 +- .../src/generated/AppKit/NSPageController.rs | 6 +- .../src/generated/AppKit/NSPageLayout.rs | 8 +- .../src/generated/AppKit/NSParagraphStyle.rs | 22 +- .../src/generated/AppKit/NSPasteboard.rs | 36 +- .../src/generated/AppKit/NSPasteboardItem.rs | 10 +- .../icrate/src/generated/AppKit/NSPathCell.rs | 18 +- .../generated/AppKit/NSPathComponentCell.rs | 4 +- .../src/generated/AppKit/NSPathControl.rs | 22 +- .../src/generated/AppKit/NSPathControlItem.rs | 8 +- .../generated/AppKit/NSPersistentDocument.rs | 6 +- .../generated/AppKit/NSPickerTouchBarItem.rs | 18 +- .../src/generated/AppKit/NSPopUpButton.rs | 20 +- .../src/generated/AppKit/NSPopUpButtonCell.rs | 22 +- .../icrate/src/generated/AppKit/NSPopover.rs | 8 +- .../generated/AppKit/NSPopoverTouchBarItem.rs | 14 +- .../src/generated/AppKit/NSPredicateEditor.rs | 2 +- .../AppKit/NSPredicateEditorRowTemplate.rs | 22 +- .../AppKit/NSPressureConfiguration.rs | 4 +- .../src/generated/AppKit/NSPrintInfo.rs | 22 +- .../src/generated/AppKit/NSPrintOperation.rs | 36 +- .../src/generated/AppKit/NSPrintPanel.rs | 14 +- .../icrate/src/generated/AppKit/NSPrinter.rs | 26 +- .../src/generated/AppKit/NSResponder.rs | 16 +- .../src/generated/AppKit/NSRuleEditor.rs | 26 +- .../src/generated/AppKit/NSRulerMarker.rs | 12 +- .../src/generated/AppKit/NSRulerView.rs | 14 +- .../generated/AppKit/NSRunningApplication.rs | 20 +- .../src/generated/AppKit/NSSavePanel.rs | 32 +- .../icrate/src/generated/AppKit/NSScreen.rs | 12 +- .../src/generated/AppKit/NSScrollView.rs | 20 +- .../icrate/src/generated/AppKit/NSScrubber.rs | 32 +- .../generated/AppKit/NSScrubberItemView.rs | 8 +- .../src/generated/AppKit/NSScrubberLayout.rs | 16 +- .../src/generated/AppKit/NSSearchField.rs | 8 +- .../src/generated/AppKit/NSSearchFieldCell.rs | 16 +- .../generated/AppKit/NSSearchToolbarItem.rs | 4 +- .../src/generated/AppKit/NSSegmentedCell.rs | 8 +- .../generated/AppKit/NSSegmentedControl.rs | 16 +- .../icrate/src/generated/AppKit/NSShadow.rs | 4 +- .../src/generated/AppKit/NSSharingService.rs | 36 +- .../NSSharingServicePickerToolbarItem.rs | 2 +- .../NSSharingServicePickerTouchBarItem.rs | 6 +- .../icrate/src/generated/AppKit/NSSlider.rs | 16 +- .../src/generated/AppKit/NSSliderAccessory.rs | 14 +- .../src/generated/AppKit/NSSliderCell.rs | 10 +- .../generated/AppKit/NSSliderTouchBarItem.rs | 14 +- crates/icrate/src/generated/AppKit/NSSound.rs | 26 +- .../generated/AppKit/NSSpeechRecognizer.rs | 8 +- .../generated/AppKit/NSSpeechSynthesizer.rs | 16 +- .../src/generated/AppKit/NSSpellChecker.rs | 36 +- .../src/generated/AppKit/NSSplitView.rs | 8 +- .../generated/AppKit/NSSplitViewController.rs | 6 +- .../src/generated/AppKit/NSSplitViewItem.rs | 8 +- .../src/generated/AppKit/NSStackView.rs | 12 +- .../src/generated/AppKit/NSStatusBar.rs | 4 +- .../src/generated/AppKit/NSStatusItem.rs | 22 +- .../generated/AppKit/NSStepperTouchBarItem.rs | 8 +- .../src/generated/AppKit/NSStoryboard.rs | 12 +- .../src/generated/AppKit/NSStoryboardSegue.rs | 10 +- .../icrate/src/generated/AppKit/NSTabView.rs | 12 +- .../generated/AppKit/NSTabViewController.rs | 14 +- .../src/generated/AppKit/NSTabViewItem.rs | 22 +- .../src/generated/AppKit/NSTableCellView.rs | 8 +- .../src/generated/AppKit/NSTableColumn.rs | 20 +- .../src/generated/AppKit/NSTableHeaderView.rs | 2 +- .../src/generated/AppKit/NSTableRowView.rs | 4 +- .../src/generated/AppKit/NSTableView.rs | 54 +-- .../AppKit/NSTableViewDiffableDataSource.rs | 12 +- .../generated/AppKit/NSTableViewRowAction.rs | 8 +- crates/icrate/src/generated/AppKit/NSText.rs | 18 +- .../generated/AppKit/NSTextAlternatives.rs | 6 +- .../src/generated/AppKit/NSTextAttachment.rs | 30 +- .../AppKit/NSTextCheckingController.rs | 10 +- .../src/generated/AppKit/NSTextContainer.rs | 14 +- .../generated/AppKit/NSTextContentManager.rs | 24 +- .../src/generated/AppKit/NSTextElement.rs | 14 +- .../src/generated/AppKit/NSTextField.rs | 18 +- .../src/generated/AppKit/NSTextFieldCell.rs | 18 +- .../src/generated/AppKit/NSTextFinder.rs | 10 +- .../generated/AppKit/NSTextInputContext.rs | 16 +- .../generated/AppKit/NSTextLayoutFragment.rs | 18 +- .../generated/AppKit/NSTextLayoutManager.rs | 28 +- .../generated/AppKit/NSTextLineFragment.rs | 10 +- .../icrate/src/generated/AppKit/NSTextList.rs | 6 +- .../src/generated/AppKit/NSTextRange.rs | 16 +- .../src/generated/AppKit/NSTextSelection.rs | 18 +- .../AppKit/NSTextSelectionNavigation.rs | 20 +- .../src/generated/AppKit/NSTextStorage.rs | 6 +- .../AppKit/NSTextStorageScripting.rs | 12 +- .../src/generated/AppKit/NSTextTable.rs | 10 +- .../icrate/src/generated/AppKit/NSTextView.rs | 72 +-- .../AppKit/NSTextViewportLayoutController.rs | 12 +- .../generated/AppKit/NSTintConfiguration.rs | 12 +- .../src/generated/AppKit/NSTokenField.rs | 6 +- .../src/generated/AppKit/NSTokenFieldCell.rs | 6 +- .../icrate/src/generated/AppKit/NSToolbar.rs | 20 +- .../src/generated/AppKit/NSToolbarItem.rs | 22 +- .../generated/AppKit/NSToolbarItemGroup.rs | 6 +- crates/icrate/src/generated/AppKit/NSTouch.rs | 4 +- .../icrate/src/generated/AppKit/NSTouchBar.rs | 28 +- .../src/generated/AppKit/NSTouchBarItem.rs | 14 +- .../src/generated/AppKit/NSTrackingArea.rs | 6 +- .../AppKit/NSTrackingSeparatorToolbarItem.rs | 4 +- .../src/generated/AppKit/NSTreeController.rs | 26 +- .../icrate/src/generated/AppKit/NSTreeNode.rs | 16 +- .../src/generated/AppKit/NSTypesetter.rs | 20 +- .../src/generated/AppKit/NSUserActivity.rs | 4 +- .../AppKit/NSUserDefaultsController.rs | 12 +- .../AppKit/NSUserInterfaceCompression.rs | 22 +- crates/icrate/src/generated/AppKit/NSView.rs | 76 ++-- .../src/generated/AppKit/NSViewController.rs | 28 +- .../generated/AppKit/NSVisualEffectView.rs | 2 +- .../icrate/src/generated/AppKit/NSWindow.rs | 100 ++-- .../generated/AppKit/NSWindowController.rs | 28 +- .../generated/AppKit/NSWindowRestoration.rs | 10 +- .../src/generated/AppKit/NSWindowScripting.rs | 6 +- .../src/generated/AppKit/NSWindowTab.rs | 8 +- .../src/generated/AppKit/NSWindowTabGroup.rs | 6 +- .../src/generated/AppKit/NSWorkspace.rs | 72 +-- .../generated/Foundation/NSAffineTransform.rs | 6 +- .../Foundation/NSAppleEventDescriptor.rs | 68 +-- .../Foundation/NSAppleEventManager.rs | 10 +- .../src/generated/Foundation/NSAppleScript.rs | 10 +- .../src/generated/Foundation/NSArchiver.rs | 16 +- .../src/generated/Foundation/NSArray.rs | 102 ++--- .../Foundation/NSAttributedString.rs | 66 +-- .../NSBackgroundActivityScheduler.rs | 4 +- .../src/generated/Foundation/NSBundle.rs | 108 ++--- .../Foundation/NSByteCountFormatter.rs | 10 +- .../src/generated/Foundation/NSCache.rs | 6 +- .../src/generated/Foundation/NSCalendar.rs | 92 ++-- .../generated/Foundation/NSCalendarDate.rs | 44 +- .../generated/Foundation/NSCharacterSet.rs | 82 ++-- .../Foundation/NSClassDescription.rs | 20 +- .../src/generated/Foundation/NSCoder.rs | 36 +- .../Foundation/NSComparisonPredicate.rs | 14 +- .../Foundation/NSCompoundPredicate.rs | 12 +- .../src/generated/Foundation/NSConnection.rs | 46 +- .../icrate/src/generated/Foundation/NSData.rs | 68 +-- .../icrate/src/generated/Foundation/NSDate.rs | 40 +- .../Foundation/NSDateComponentsFormatter.rs | 14 +- .../generated/Foundation/NSDateFormatter.rs | 64 +-- .../generated/Foundation/NSDateInterval.rs | 14 +- .../Foundation/NSDateIntervalFormatter.rs | 12 +- .../generated/Foundation/NSDecimalNumber.rs | 62 +-- .../src/generated/Foundation/NSDictionary.rs | 88 ++-- .../generated/Foundation/NSDistantObject.rs | 12 +- .../generated/Foundation/NSDistributedLock.rs | 8 +- .../NSDistributedNotificationCenter.rs | 4 +- .../generated/Foundation/NSEnergyFormatter.rs | 10 +- .../src/generated/Foundation/NSEnumerator.rs | 4 +- .../src/generated/Foundation/NSError.rs | 22 +- .../src/generated/Foundation/NSException.rs | 16 +- .../src/generated/Foundation/NSExpression.rs | 62 +-- .../Foundation/NSExtensionContext.rs | 2 +- .../generated/Foundation/NSExtensionItem.rs | 8 +- .../generated/Foundation/NSFileCoordinator.rs | 12 +- .../src/generated/Foundation/NSFileHandle.rs | 42 +- .../src/generated/Foundation/NSFileManager.rs | 80 ++-- .../src/generated/Foundation/NSFileVersion.rs | 26 +- .../src/generated/Foundation/NSFileWrapper.rs | 42 +- .../src/generated/Foundation/NSFormatter.rs | 6 +- .../Foundation/NSGarbageCollector.rs | 2 +- .../src/generated/Foundation/NSGeometry.rs | 8 +- .../src/generated/Foundation/NSHTTPCookie.rs | 28 +- .../Foundation/NSHTTPCookieStorage.rs | 10 +- .../src/generated/Foundation/NSHashTable.rs | 22 +- .../icrate/src/generated/Foundation/NSHost.rs | 16 +- .../Foundation/NSISO8601DateFormatter.rs | 10 +- .../src/generated/Foundation/NSIndexPath.rs | 12 +- .../src/generated/Foundation/NSIndexSet.rs | 18 +- .../generated/Foundation/NSInflectionRule.rs | 8 +- .../src/generated/Foundation/NSInvocation.rs | 6 +- .../generated/Foundation/NSItemProvider.rs | 20 +- .../Foundation/NSJSONSerialization.rs | 6 +- .../generated/Foundation/NSKeyValueCoding.rs | 34 +- .../Foundation/NSKeyValueObserving.rs | 2 +- .../generated/Foundation/NSKeyedArchiver.rs | 46 +- .../generated/Foundation/NSLengthFormatter.rs | 10 +- .../Foundation/NSLinguisticTagger.rs | 32 +- .../generated/Foundation/NSListFormatter.rs | 10 +- .../src/generated/Foundation/NSLocale.rs | 92 ++-- .../icrate/src/generated/Foundation/NSLock.rs | 10 +- .../src/generated/Foundation/NSMapTable.rs | 34 +- .../generated/Foundation/NSMassFormatter.rs | 10 +- .../src/generated/Foundation/NSMeasurement.rs | 12 +- .../Foundation/NSMeasurementFormatter.rs | 8 +- .../src/generated/Foundation/NSMetadata.rs | 48 +- .../generated/Foundation/NSMethodSignature.rs | 2 +- .../src/generated/Foundation/NSMorphology.rs | 16 +- .../src/generated/Foundation/NSNetServices.rs | 26 +- .../generated/Foundation/NSNotification.rs | 20 +- .../Foundation/NSNotificationQueue.rs | 4 +- .../icrate/src/generated/Foundation/NSNull.rs | 2 +- .../generated/Foundation/NSNumberFormatter.rs | 90 ++-- .../src/generated/Foundation/NSObject.rs | 4 +- .../generated/Foundation/NSObjectScripting.rs | 8 +- .../src/generated/Foundation/NSOperation.rs | 24 +- .../Foundation/NSOrderedCollectionChange.rs | 12 +- .../NSOrderedCollectionDifference.rs | 14 +- .../src/generated/Foundation/NSOrderedSet.rs | 94 ++-- .../src/generated/Foundation/NSOrthography.rs | 22 +- .../generated/Foundation/NSPathUtilities.rs | 28 +- .../Foundation/NSPersonNameComponents.rs | 14 +- .../NSPersonNameComponentsFormatter.rs | 10 +- .../generated/Foundation/NSPointerArray.rs | 20 +- .../Foundation/NSPointerFunctions.rs | 4 +- .../icrate/src/generated/Foundation/NSPort.rs | 28 +- .../src/generated/Foundation/NSPortCoder.rs | 10 +- .../src/generated/Foundation/NSPortMessage.rs | 8 +- .../generated/Foundation/NSPortNameServer.rs | 28 +- .../src/generated/Foundation/NSPredicate.rs | 20 +- .../src/generated/Foundation/NSProcessInfo.rs | 22 +- .../src/generated/Foundation/NSProgress.rs | 32 +- .../generated/Foundation/NSPropertyList.rs | 6 +- .../generated/Foundation/NSProtocolChecker.rs | 8 +- .../src/generated/Foundation/NSProxy.rs | 10 +- .../src/generated/Foundation/NSRange.rs | 2 +- .../Foundation/NSRegularExpression.rs | 22 +- .../Foundation/NSRelativeDateTimeFormatter.rs | 12 +- .../src/generated/Foundation/NSRunLoop.rs | 8 +- .../src/generated/Foundation/NSScanner.rs | 12 +- .../Foundation/NSScriptClassDescription.rs | 22 +- .../Foundation/NSScriptCoercionHandler.rs | 4 +- .../generated/Foundation/NSScriptCommand.rs | 30 +- .../Foundation/NSScriptCommandDescription.rs | 22 +- .../Foundation/NSScriptExecutionContext.rs | 8 +- .../Foundation/NSScriptKeyValueCoding.rs | 8 +- .../Foundation/NSScriptObjectSpecifiers.rs | 72 +-- .../NSScriptStandardSuiteCommands.rs | 12 +- .../Foundation/NSScriptSuiteRegistry.rs | 18 +- .../Foundation/NSScriptWhoseTests.rs | 16 +- .../icrate/src/generated/Foundation/NSSet.rs | 60 +-- .../generated/Foundation/NSSortDescriptor.rs | 24 +- .../src/generated/Foundation/NSSpellServer.rs | 2 +- .../src/generated/Foundation/NSStream.rs | 34 +- .../src/generated/Foundation/NSString.rs | 142 +++--- .../icrate/src/generated/Foundation/NSTask.rs | 24 +- .../Foundation/NSTextCheckingResult.rs | 54 +-- .../src/generated/Foundation/NSThread.rs | 18 +- .../src/generated/Foundation/NSTimeZone.rs | 40 +- .../src/generated/Foundation/NSTimer.rs | 20 +- .../icrate/src/generated/Foundation/NSURL.rs | 198 ++++---- .../NSURLAuthenticationChallenge.rs | 14 +- .../src/generated/Foundation/NSURLCache.rs | 18 +- .../generated/Foundation/NSURLConnection.rs | 12 +- .../generated/Foundation/NSURLCredential.rs | 18 +- .../Foundation/NSURLCredentialStorage.rs | 8 +- .../src/generated/Foundation/NSURLDownload.rs | 8 +- .../src/generated/Foundation/NSURLHandle.rs | 16 +- .../Foundation/NSURLProtectionSpace.rs | 16 +- .../src/generated/Foundation/NSURLProtocol.rs | 16 +- .../src/generated/Foundation/NSURLRequest.rs | 34 +- .../src/generated/Foundation/NSURLResponse.rs | 18 +- .../src/generated/Foundation/NSURLSession.rs | 192 ++++---- .../icrate/src/generated/Foundation/NSUUID.rs | 10 +- .../Foundation/NSUbiquitousKeyValueStore.rs | 14 +- .../src/generated/Foundation/NSUndoManager.rs | 16 +- .../icrate/src/generated/Foundation/NSUnit.rs | 426 +++++++++--------- .../generated/Foundation/NSUserActivity.rs | 26 +- .../generated/Foundation/NSUserDefaults.rs | 32 +- .../Foundation/NSUserNotification.rs | 50 +- .../generated/Foundation/NSUserScriptTask.rs | 12 +- .../src/generated/Foundation/NSValue.rs | 80 ++-- .../Foundation/NSValueTransformer.rs | 10 +- .../src/generated/Foundation/NSXMLDTD.rs | 22 +- .../src/generated/Foundation/NSXMLDTDNode.rs | 12 +- .../src/generated/Foundation/NSXMLDocument.rs | 30 +- .../src/generated/Foundation/NSXMLElement.rs | 28 +- .../src/generated/Foundation/NSXMLNode.rs | 82 ++-- .../src/generated/Foundation/NSXMLParser.rs | 16 +- .../generated/Foundation/NSXPCConnection.rs | 46 +- crates/objc2/src/macros.rs | 33 ++ crates/objc2/src/macros/extern_methods.rs | 12 +- 389 files changed, 4684 insertions(+), 4626 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 43b1d54cd..4eec78007 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -109,6 +109,26 @@ impl MemoryManagement { } } + /// Matches `objc2::__macro_helpers::retain_semantics`. + fn get_memory_management_name(sel: &str) -> &'static str { + let bytes = sel.as_bytes(); + match ( + in_selector_family(bytes, b"new"), + in_selector_family(bytes, b"alloc"), + in_selector_family(bytes, b"init"), + in_selector_family(bytes, b"copy"), + in_selector_family(bytes, b"mutableCopy"), + ) { + (true, false, false, false, false) => "New", + (false, true, false, false, false) => "Alloc", + (false, false, true, false, false) => "Init", + (false, false, false, true, false) => "CopyOrMutCopy", + (false, false, false, false, true) => "CopyOrMutCopy", + (false, false, false, false, false) => "Other", + _ => unreachable!(), + } + } + fn is_init(sel: &str) -> bool { in_selector_family(sel.as_bytes(), b"init") } @@ -339,7 +359,12 @@ impl fmt::Display for Method { } if self.result_type.is_id() { - writeln!(f, " #[method_id({})]", self.selector)?; + writeln!( + f, + " #[method_id(@__retain_semantics {} {})]", + MemoryManagement::get_memory_management_name(&self.selector), + self.selector + )?; } else { writeln!(f, " #[method({})]", self.selector)?; }; diff --git a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs index a8aca7804..e3e93211d 100644 --- a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSATSTypesetter { - #[method_id(sharedTypesetter)] + #[method_id(@__retain_semantics Other sharedTypesetter)] pub unsafe fn sharedTypesetter() -> Id; } ); @@ -59,10 +59,10 @@ extern_methods!( #[method(setLineFragmentPadding:)] pub unsafe fn setLineFragmentPadding(&self, lineFragmentPadding: CGFloat); - #[method_id(substituteFontForFont:)] + #[method_id(@__retain_semantics Other substituteFontForFont:)] pub unsafe fn substituteFontForFont(&self, originalFont: &NSFont) -> Id; - #[method_id(textTabForGlyphLocation:writingDirection:maxLocation:)] + #[method_id(@__retain_semantics Other textTabForGlyphLocation:writingDirection:maxLocation:)] pub unsafe fn textTabForGlyphLocation_writingDirection_maxLocation( &self, glyphLocation: CGFloat, @@ -76,7 +76,7 @@ extern_methods!( #[method(setBidiProcessingEnabled:)] pub unsafe fn setBidiProcessingEnabled(&self, bidiProcessingEnabled: bool); - #[method_id(attributedString)] + #[method_id(@__retain_semantics Other attributedString)] pub unsafe fn attributedString(&self) -> Option>; #[method(setAttributedString:)] @@ -122,10 +122,10 @@ extern_methods!( rect: NSRect, ) -> CGFloat; - #[method_id(layoutManager)] + #[method_id(@__retain_semantics Other layoutManager)] pub unsafe fn layoutManager(&self) -> Option>; - #[method_id(currentTextContainer)] + #[method_id(@__retain_semantics Other currentTextContainer)] pub unsafe fn currentTextContainer(&self) -> Option>; #[method(setHardInvalidation:forGlyphRange:)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibility.rs b/crates/icrate/src/generated/AppKit/NSAccessibility.rs index 2905a50cd..776e9638a 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibility.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibility.rs @@ -7,12 +7,12 @@ use crate::Foundation::*; extern_methods!( /// NSAccessibility unsafe impl NSObject { - #[method_id(accessibilityAttributeNames)] + #[method_id(@__retain_semantics Other accessibilityAttributeNames)] pub unsafe fn accessibilityAttributeNames( &self, ) -> Id, Shared>; - #[method_id(accessibilityAttributeValue:)] + #[method_id(@__retain_semantics Other accessibilityAttributeValue:)] pub unsafe fn accessibilityAttributeValue( &self, attribute: &NSAccessibilityAttributeName, @@ -31,24 +31,24 @@ extern_methods!( attribute: &NSAccessibilityAttributeName, ); - #[method_id(accessibilityParameterizedAttributeNames)] + #[method_id(@__retain_semantics Other accessibilityParameterizedAttributeNames)] pub unsafe fn accessibilityParameterizedAttributeNames( &self, ) -> Id, Shared>; - #[method_id(accessibilityAttributeValue:forParameter:)] + #[method_id(@__retain_semantics Other accessibilityAttributeValue:forParameter:)] pub unsafe fn accessibilityAttributeValue_forParameter( &self, attribute: &NSAccessibilityParameterizedAttributeName, parameter: Option<&Object>, ) -> Option>; - #[method_id(accessibilityActionNames)] + #[method_id(@__retain_semantics Other accessibilityActionNames)] pub unsafe fn accessibilityActionNames( &self, ) -> Id, Shared>; - #[method_id(accessibilityActionDescription:)] + #[method_id(@__retain_semantics Other accessibilityActionDescription:)] pub unsafe fn accessibilityActionDescription( &self, action: &NSAccessibilityActionName, @@ -60,10 +60,10 @@ extern_methods!( #[method(accessibilityIsIgnored)] pub unsafe fn accessibilityIsIgnored(&self) -> bool; - #[method_id(accessibilityHitTest:)] + #[method_id(@__retain_semantics Other accessibilityHitTest:)] pub unsafe fn accessibilityHitTest(&self, point: NSPoint) -> Option>; - #[method_id(accessibilityFocusedUIElement)] + #[method_id(@__retain_semantics Other accessibilityFocusedUIElement)] pub unsafe fn accessibilityFocusedUIElement(&self) -> Option>; #[method(accessibilityIndexOfChild:)] @@ -75,7 +75,7 @@ extern_methods!( attribute: &NSAccessibilityAttributeName, ) -> NSUInteger; - #[method_id(accessibilityArrayAttributeValues:index:maxCount:)] + #[method_id(@__retain_semantics Other accessibilityArrayAttributeValues:index:maxCount:)] pub unsafe fn accessibilityArrayAttributeValues_index_maxCount( &self, attribute: &NSAccessibilityAttributeName, diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs index 0a083dc64..2b536b11f 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs @@ -15,14 +15,14 @@ extern_class!( extern_methods!( unsafe impl NSAccessibilityCustomAction { - #[method_id(initWithName:handler:)] + #[method_id(@__retain_semantics Init initWithName:handler:)] pub unsafe fn initWithName_handler( this: Option>, name: &NSString, handler: TodoBlock, ) -> Id; - #[method_id(initWithName:target:selector:)] + #[method_id(@__retain_semantics Init initWithName:target:selector:)] pub unsafe fn initWithName_target_selector( this: Option>, name: &NSString, @@ -30,7 +30,7 @@ extern_methods!( selector: Sel, ) -> Id; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; #[method(setName:)] @@ -42,7 +42,7 @@ extern_methods!( #[method(setHandler:)] pub unsafe fn setHandler(&self, handler: TodoBlock); - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs index 236d160f1..76985a7fb 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs @@ -45,14 +45,14 @@ extern_class!( extern_methods!( unsafe impl NSAccessibilityCustomRotor { - #[method_id(initWithLabel:itemSearchDelegate:)] + #[method_id(@__retain_semantics Init initWithLabel:itemSearchDelegate:)] pub unsafe fn initWithLabel_itemSearchDelegate( this: Option>, label: &NSString, itemSearchDelegate: &NSAccessibilityCustomRotorItemSearchDelegate, ) -> Id; - #[method_id(initWithRotorType:itemSearchDelegate:)] + #[method_id(@__retain_semantics Init initWithRotorType:itemSearchDelegate:)] pub unsafe fn initWithRotorType_itemSearchDelegate( this: Option>, rotorType: NSAccessibilityCustomRotorType, @@ -65,13 +65,13 @@ extern_methods!( #[method(setType:)] pub unsafe fn setType(&self, type_: NSAccessibilityCustomRotorType); - #[method_id(label)] + #[method_id(@__retain_semantics Other label)] pub unsafe fn label(&self) -> Id; #[method(setLabel:)] pub unsafe fn setLabel(&self, label: &NSString); - #[method_id(itemSearchDelegate)] + #[method_id(@__retain_semantics Other itemSearchDelegate)] pub unsafe fn itemSearchDelegate( &self, ) -> Option>; @@ -82,7 +82,7 @@ extern_methods!( itemSearchDelegate: Option<&NSAccessibilityCustomRotorItemSearchDelegate>, ); - #[method_id(itemLoadingDelegate)] + #[method_id(@__retain_semantics Other itemLoadingDelegate)] pub unsafe fn itemLoadingDelegate( &self, ) -> Option>; @@ -106,7 +106,7 @@ extern_class!( extern_methods!( unsafe impl NSAccessibilityCustomRotorSearchParameters { - #[method_id(currentItem)] + #[method_id(@__retain_semantics Other currentItem)] pub unsafe fn currentItem( &self, ) -> Option>; @@ -126,7 +126,7 @@ extern_methods!( searchDirection: NSAccessibilityCustomRotorSearchDirection, ); - #[method_id(filterString)] + #[method_id(@__retain_semantics Other filterString)] pub unsafe fn filterString(&self) -> Id; #[method(setFilterString:)] @@ -145,29 +145,29 @@ extern_class!( extern_methods!( unsafe impl NSAccessibilityCustomRotorItemResult { - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithTargetElement:)] + #[method_id(@__retain_semantics Init initWithTargetElement:)] pub unsafe fn initWithTargetElement( this: Option>, targetElement: &NSAccessibilityElement, ) -> Id; - #[method_id(initWithItemLoadingToken:customLabel:)] + #[method_id(@__retain_semantics Init initWithItemLoadingToken:customLabel:)] pub unsafe fn initWithItemLoadingToken_customLabel( this: Option>, itemLoadingToken: &NSAccessibilityLoadingToken, customLabel: &NSString, ) -> Id; - #[method_id(targetElement)] + #[method_id(@__retain_semantics Other targetElement)] pub unsafe fn targetElement(&self) -> Option>; - #[method_id(itemLoadingToken)] + #[method_id(@__retain_semantics Other itemLoadingToken)] pub unsafe fn itemLoadingToken(&self) -> Option>; #[method(targetRange)] @@ -176,7 +176,7 @@ extern_methods!( #[method(setTargetRange:)] pub unsafe fn setTargetRange(&self, targetRange: NSRange); - #[method_id(customLabel)] + #[method_id(@__retain_semantics Other customLabel)] pub unsafe fn customLabel(&self) -> Option>; #[method(setCustomLabel:)] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs index efd7c2c96..294517504 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSAccessibilityElement { - #[method_id(accessibilityElementWithRole:frame:label:parent:)] + #[method_id(@__retain_semantics Other accessibilityElementWithRole:frame:label:parent:)] pub unsafe fn accessibilityElementWithRole_frame_label_parent( role: &NSAccessibilityRole, frame: NSRect, diff --git a/crates/icrate/src/generated/AppKit/NSActionCell.rs b/crates/icrate/src/generated/AppKit/NSActionCell.rs index 615b90067..15c0116eb 100644 --- a/crates/icrate/src/generated/AppKit/NSActionCell.rs +++ b/crates/icrate/src/generated/AppKit/NSActionCell.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSActionCell { - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] diff --git a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs index 8b098f0c0..f8ee5dea4 100644 --- a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs +++ b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs @@ -7,7 +7,7 @@ use crate::Foundation::*; extern_methods!( /// NSAppKitAdditions unsafe impl NSAffineTransform { - #[method_id(transformBezierPath:)] + #[method_id(@__retain_semantics Other transformBezierPath:)] pub unsafe fn transformBezierPath(&self, path: &NSBezierPath) -> Id; #[method(set)] diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index f267a1cba..6f586d61e 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -26,31 +26,31 @@ extern_class!( extern_methods!( unsafe impl NSAlert { - #[method_id(alertWithError:)] + #[method_id(@__retain_semantics Other alertWithError:)] pub unsafe fn alertWithError(error: &NSError) -> Id; - #[method_id(messageText)] + #[method_id(@__retain_semantics Other messageText)] pub unsafe fn messageText(&self) -> Id; #[method(setMessageText:)] pub unsafe fn setMessageText(&self, messageText: &NSString); - #[method_id(informativeText)] + #[method_id(@__retain_semantics Other informativeText)] pub unsafe fn informativeText(&self) -> Id; #[method(setInformativeText:)] pub unsafe fn setInformativeText(&self, informativeText: &NSString); - #[method_id(icon)] + #[method_id(@__retain_semantics Other icon)] pub unsafe fn icon(&self) -> Option>; #[method(setIcon:)] pub unsafe fn setIcon(&self, icon: Option<&NSImage>); - #[method_id(addButtonWithTitle:)] + #[method_id(@__retain_semantics Other addButtonWithTitle:)] pub unsafe fn addButtonWithTitle(&self, title: &NSString) -> Id; - #[method_id(buttons)] + #[method_id(@__retain_semantics Other buttons)] pub unsafe fn buttons(&self) -> Id, Shared>; #[method(showsHelp)] @@ -59,7 +59,7 @@ extern_methods!( #[method(setShowsHelp:)] pub unsafe fn setShowsHelp(&self, showsHelp: bool); - #[method_id(helpAnchor)] + #[method_id(@__retain_semantics Other helpAnchor)] pub unsafe fn helpAnchor(&self) -> Option>; #[method(setHelpAnchor:)] @@ -71,7 +71,7 @@ extern_methods!( #[method(setAlertStyle:)] pub unsafe fn setAlertStyle(&self, alertStyle: NSAlertStyle); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -83,10 +83,10 @@ extern_methods!( #[method(setShowsSuppressionButton:)] pub unsafe fn setShowsSuppressionButton(&self, showsSuppressionButton: bool); - #[method_id(suppressionButton)] + #[method_id(@__retain_semantics Other suppressionButton)] pub unsafe fn suppressionButton(&self) -> Option>; - #[method_id(accessoryView)] + #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[method(setAccessoryView:)] @@ -105,7 +105,7 @@ extern_methods!( handler: TodoBlock, ); - #[method_id(window)] + #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs index fa4d524ec..334c0c764 100644 --- a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs +++ b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs @@ -26,7 +26,7 @@ extern_methods!( #[method(updateWithPanRecognizer:)] pub unsafe fn updateWithPanRecognizer(&self, panRecognizer: &NSPanGestureRecognizer); - #[method_id(alignmentFeedbackTokenForMovementInView:previousPoint:alignedPoint:defaultPoint:)] + #[method_id(@__retain_semantics Other alignmentFeedbackTokenForMovementInView:previousPoint:alignedPoint:defaultPoint:)] pub unsafe fn alignmentFeedbackTokenForMovementInView_previousPoint_alignedPoint_defaultPoint( &self, view: Option<&NSView>, @@ -35,7 +35,7 @@ extern_methods!( defaultPoint: NSPoint, ) -> Option>; - #[method_id(alignmentFeedbackTokenForHorizontalMovementInView:previousX:alignedX:defaultX:)] + #[method_id(@__retain_semantics Other alignmentFeedbackTokenForHorizontalMovementInView:previousX:alignedX:defaultX:)] pub unsafe fn alignmentFeedbackTokenForHorizontalMovementInView_previousX_alignedX_defaultX( &self, view: Option<&NSView>, @@ -44,7 +44,7 @@ extern_methods!( defaultX: CGFloat, ) -> Option>; - #[method_id(alignmentFeedbackTokenForVerticalMovementInView:previousY:alignedY:defaultY:)] + #[method_id(@__retain_semantics Other alignmentFeedbackTokenForVerticalMovementInView:previousY:alignedY:defaultY:)] pub unsafe fn alignmentFeedbackTokenForVerticalMovementInView_previousY_alignedY_defaultY( &self, view: Option<&NSView>, diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index 06d7c7b6d..040d0a03a 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -34,14 +34,14 @@ extern_class!( extern_methods!( unsafe impl NSAnimation { - #[method_id(initWithDuration:animationCurve:)] + #[method_id(@__retain_semantics Init initWithDuration:animationCurve:)] pub unsafe fn initWithDuration_animationCurve( this: Option>, duration: NSTimeInterval, animationCurve: NSAnimationCurve, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -92,13 +92,13 @@ extern_methods!( #[method(currentValue)] pub unsafe fn currentValue(&self) -> c_float; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSAnimationDelegate>); - #[method_id(progressMarks)] + #[method_id(@__retain_semantics Other progressMarks)] pub unsafe fn progressMarks(&self) -> Id, Shared>; #[method(setProgressMarks:)] @@ -130,7 +130,7 @@ extern_methods!( #[method(clearStopAnimation)] pub unsafe fn clearStopAnimation(&self); - #[method_id(runLoopModesForAnimating)] + #[method_id(@__retain_semantics Other runLoopModesForAnimating)] pub unsafe fn runLoopModesForAnimating(&self) -> Option, Shared>>; } @@ -177,13 +177,13 @@ extern_class!( extern_methods!( unsafe impl NSViewAnimation { - #[method_id(initWithViewAnimations:)] + #[method_id(@__retain_semantics Init initWithViewAnimations:)] pub unsafe fn initWithViewAnimations( this: Option>, viewAnimations: &NSArray>, ) -> Id; - #[method_id(viewAnimations)] + #[method_id(@__retain_semantics Other viewAnimations)] pub unsafe fn viewAnimations( &self, ) -> Id>, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs index 681b35864..3f882a653 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs @@ -30,7 +30,7 @@ extern_methods!( #[method(endGrouping)] pub unsafe fn endGrouping(); - #[method_id(currentContext)] + #[method_id(@__retain_semantics Other currentContext)] pub unsafe fn currentContext() -> Id; #[method(duration)] @@ -39,7 +39,7 @@ extern_methods!( #[method(setDuration:)] pub unsafe fn setDuration(&self, duration: NSTimeInterval); - #[method_id(timingFunction)] + #[method_id(@__retain_semantics Other timingFunction)] pub unsafe fn timingFunction(&self) -> Option>; #[method(setTimingFunction:)] diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index 62c59f70a..6a768b9b0 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -17,32 +17,32 @@ extern_class!( extern_methods!( unsafe impl NSAppearance { - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; - #[method_id(currentAppearance)] + #[method_id(@__retain_semantics Other currentAppearance)] pub unsafe fn currentAppearance() -> Option>; #[method(setCurrentAppearance:)] pub unsafe fn setCurrentAppearance(currentAppearance: Option<&NSAppearance>); - #[method_id(currentDrawingAppearance)] + #[method_id(@__retain_semantics Other currentDrawingAppearance)] pub unsafe fn currentDrawingAppearance() -> Id; #[method(performAsCurrentDrawingAppearance:)] pub unsafe fn performAsCurrentDrawingAppearance(&self, block: TodoBlock); - #[method_id(appearanceNamed:)] + #[method_id(@__retain_semantics Other appearanceNamed:)] pub unsafe fn appearanceNamed(name: &NSAppearanceName) -> Option>; - #[method_id(initWithAppearanceNamed:bundle:)] + #[method_id(@__retain_semantics Init initWithAppearanceNamed:bundle:)] pub unsafe fn initWithAppearanceNamed_bundle( this: Option>, name: &NSAppearanceName, bundle: Option<&NSBundle>, ) -> Option>; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -51,7 +51,7 @@ extern_methods!( #[method(allowsVibrancy)] pub unsafe fn allowsVibrancy(&self) -> bool; - #[method_id(bestMatchFromAppearancesWithNames:)] + #[method_id(@__retain_semantics Other bestMatchFromAppearancesWithNames:)] pub unsafe fn bestMatchFromAppearancesWithNames( &self, appearances: &NSArray, diff --git a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs index 7f3195c31..84ae853dd 100644 --- a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs +++ b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs @@ -7,7 +7,7 @@ use crate::Foundation::*; extern_methods!( /// NSExtensions unsafe impl NSAppleScript { - #[method_id(richTextSource)] + #[method_id(@__retain_semantics Other richTextSource)] pub unsafe fn richTextSource(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 78981e8e5..475b0dc5c 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -197,10 +197,10 @@ extern_class!( extern_methods!( unsafe impl NSApplication { - #[method_id(sharedApplication)] + #[method_id(@__retain_semantics Other sharedApplication)] pub unsafe fn sharedApplication() -> Id; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -215,16 +215,16 @@ extern_methods!( #[method(unhideWithoutActivation)] pub unsafe fn unhideWithoutActivation(&self); - #[method_id(windowWithWindowNumber:)] + #[method_id(@__retain_semantics Other windowWithWindowNumber:)] pub unsafe fn windowWithWindowNumber( &self, windowNum: NSInteger, ) -> Option>; - #[method_id(mainWindow)] + #[method_id(@__retain_semantics Other mainWindow)] pub unsafe fn mainWindow(&self) -> Option>; - #[method_id(keyWindow)] + #[method_id(@__retain_semantics Other keyWindow)] pub unsafe fn keyWindow(&self) -> Option>; #[method(isActive)] @@ -269,7 +269,7 @@ extern_methods!( #[method(abortModal)] pub unsafe fn abortModal(&self); - #[method_id(modalWindow)] + #[method_id(@__retain_semantics Other modalWindow)] pub unsafe fn modalWindow(&self) -> Option>; #[method(beginModalSessionForWindow:)] @@ -303,7 +303,7 @@ extern_methods!( #[method(preventWindowOrdering)] pub unsafe fn preventWindowOrdering(&self); - #[method_id(windows)] + #[method_id(@__retain_semantics Other windows)] pub unsafe fn windows(&self) -> Id, Shared>; #[method(setWindowsNeedUpdate:)] @@ -312,19 +312,19 @@ extern_methods!( #[method(updateWindows)] pub unsafe fn updateWindows(&self); - #[method_id(mainMenu)] + #[method_id(@__retain_semantics Other mainMenu)] pub unsafe fn mainMenu(&self) -> Option>; #[method(setMainMenu:)] pub unsafe fn setMainMenu(&self, mainMenu: Option<&NSMenu>); - #[method_id(helpMenu)] + #[method_id(@__retain_semantics Other helpMenu)] pub unsafe fn helpMenu(&self) -> Option>; #[method(setHelpMenu:)] pub unsafe fn setHelpMenu(&self, helpMenu: Option<&NSMenu>); - #[method_id(applicationIconImage)] + #[method_id(@__retain_semantics Other applicationIconImage)] pub unsafe fn applicationIconImage(&self) -> Option>; #[method(setApplicationIconImage:)] @@ -339,7 +339,7 @@ extern_methods!( activationPolicy: NSApplicationActivationPolicy, ) -> bool; - #[method_id(dockTile)] + #[method_id(@__retain_semantics Other dockTile)] pub unsafe fn dockTile(&self) -> Id; #[method(reportException:)] @@ -384,13 +384,13 @@ extern_methods!( extern_methods!( /// NSAppearanceCustomization unsafe impl NSApplication { - #[method_id(appearance)] + #[method_id(@__retain_semantics Other appearance)] pub unsafe fn appearance(&self) -> Option>; #[method(setAppearance:)] pub unsafe fn setAppearance(&self, appearance: Option<&NSAppearance>); - #[method_id(effectiveAppearance)] + #[method_id(@__retain_semantics Other effectiveAppearance)] pub unsafe fn effectiveAppearance(&self) -> Id; } ); @@ -404,10 +404,10 @@ extern_methods!( #[method(postEvent:atStart:)] pub unsafe fn postEvent_atStart(&self, event: &NSEvent, flag: bool); - #[method_id(currentEvent)] + #[method_id(@__retain_semantics Other currentEvent)] pub unsafe fn currentEvent(&self) -> Option>; - #[method_id(nextEventMatchingMask:untilDate:inMode:dequeue:)] + #[method_id(@__retain_semantics Other nextEventMatchingMask:untilDate:inMode:dequeue:)] pub unsafe fn nextEventMatchingMask_untilDate_inMode_dequeue( &self, mask: NSEventMask, @@ -436,10 +436,10 @@ extern_methods!( sender: Option<&Object>, ) -> bool; - #[method_id(targetForAction:)] + #[method_id(@__retain_semantics Other targetForAction:)] pub unsafe fn targetForAction(&self, action: Sel) -> Option>; - #[method_id(targetForAction:to:from:)] + #[method_id(@__retain_semantics Other targetForAction:to:from:)] pub unsafe fn targetForAction_to_from( &self, action: Sel, @@ -450,7 +450,7 @@ extern_methods!( #[method(tryToPerform:with:)] pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; - #[method_id(validRequestorForSendType:returnType:)] + #[method_id(@__retain_semantics Other validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, sendType: Option<&NSPasteboardType>, @@ -462,7 +462,7 @@ extern_methods!( extern_methods!( /// NSWindowsMenu unsafe impl NSApplication { - #[method_id(windowsMenu)] + #[method_id(@__retain_semantics Other windowsMenu)] pub unsafe fn windowsMenu(&self) -> Option>; #[method(setWindowsMenu:)] @@ -522,7 +522,7 @@ pub type NSApplicationDelegate = NSObject; extern_methods!( /// NSServicesMenu unsafe impl NSApplication { - #[method_id(servicesMenu)] + #[method_id(@__retain_semantics Other servicesMenu)] pub unsafe fn servicesMenu(&self) -> Option>; #[method(setServicesMenu:)] @@ -542,7 +542,7 @@ pub type NSServicesMenuRequestor = NSObject; extern_methods!( /// NSServicesHandling unsafe impl NSApplication { - #[method_id(servicesProvider)] + #[method_id(@__retain_semantics Other servicesProvider)] pub unsafe fn servicesProvider(&self) -> Option>; #[method(setServicesProvider:)] @@ -759,14 +759,14 @@ extern_methods!( #[method(endSheet:returnCode:)] pub unsafe fn endSheet_returnCode(&self, sheet: &NSWindow, returnCode: NSInteger); - #[method_id(makeWindowsPerform:inOrder:)] + #[method_id(@__retain_semantics Other makeWindowsPerform:inOrder:)] pub unsafe fn makeWindowsPerform_inOrder( &self, selector: Sel, flag: bool, ) -> Option>; - #[method_id(context)] + #[method_id(@__retain_semantics Other context)] pub unsafe fn context(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs index e825666aa..ea26cbe66 100644 --- a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs @@ -7,10 +7,10 @@ use crate::Foundation::*; extern_methods!( /// NSScripting unsafe impl NSApplication { - #[method_id(orderedDocuments)] + #[method_id(@__retain_semantics Other orderedDocuments)] pub unsafe fn orderedDocuments(&self) -> Id, Shared>; - #[method_id(orderedWindows)] + #[method_id(@__retain_semantics Other orderedWindows)] pub unsafe fn orderedWindows(&self) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSArrayController.rs b/crates/icrate/src/generated/AppKit/NSArrayController.rs index 6eebb6a49..e7067b24f 100644 --- a/crates/icrate/src/generated/AppKit/NSArrayController.rs +++ b/crates/icrate/src/generated/AppKit/NSArrayController.rs @@ -27,7 +27,7 @@ extern_methods!( automaticallyRearrangesObjects: bool, ); - #[method_id(automaticRearrangementKeyPaths)] + #[method_id(@__retain_semantics Other automaticRearrangementKeyPaths)] pub unsafe fn automaticRearrangementKeyPaths( &self, ) -> Option, Shared>>; @@ -35,13 +35,13 @@ extern_methods!( #[method(didChangeArrangementCriteria)] pub unsafe fn didChangeArrangementCriteria(&self); - #[method_id(sortDescriptors)] + #[method_id(@__retain_semantics Other sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id, Shared>; #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); - #[method_id(filterPredicate)] + #[method_id(@__retain_semantics Other filterPredicate)] pub unsafe fn filterPredicate(&self) -> Option>; #[method(setFilterPredicate:)] @@ -56,10 +56,10 @@ extern_methods!( clearsFilterPredicateOnInsertion: bool, ); - #[method_id(arrangeObjects:)] + #[method_id(@__retain_semantics Other arrangeObjects:)] pub unsafe fn arrangeObjects(&self, objects: &NSArray) -> Id; - #[method_id(arrangedObjects)] + #[method_id(@__retain_semantics Other arrangedObjects)] pub unsafe fn arrangedObjects(&self) -> Id; #[method(avoidsEmptySelection)] @@ -92,7 +92,7 @@ extern_methods!( #[method(setSelectionIndexes:)] pub unsafe fn setSelectionIndexes(&self, indexes: &NSIndexSet) -> bool; - #[method_id(selectionIndexes)] + #[method_id(@__retain_semantics Other selectionIndexes)] pub unsafe fn selectionIndexes(&self) -> Id; #[method(setSelectionIndex:)] @@ -110,7 +110,7 @@ extern_methods!( #[method(setSelectedObjects:)] pub unsafe fn setSelectedObjects(&self, objects: &NSArray) -> bool; - #[method_id(selectedObjects)] + #[method_id(@__retain_semantics Other selectedObjects)] pub unsafe fn selectedObjects(&self) -> Id; #[method(addSelectedObjects:)] diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index a4f27866e..a9edac874 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -434,7 +434,7 @@ extern "C" { extern_methods!( /// NSAttributedStringDocumentFormats unsafe impl NSAttributedString { - #[method_id(initWithURL:options:documentAttributes:error:)] + #[method_id(@__retain_semantics Init initWithURL:options:documentAttributes:error:)] pub unsafe fn initWithURL_options_documentAttributes_error( this: Option>, url: &NSURL, @@ -446,7 +446,7 @@ extern_methods!( >, ) -> Result, Id>; - #[method_id(initWithData:options:documentAttributes:error:)] + #[method_id(@__retain_semantics Init initWithData:options:documentAttributes:error:)] pub unsafe fn initWithData_options_documentAttributes_error( this: Option>, data: &NSData, @@ -458,21 +458,21 @@ extern_methods!( >, ) -> Result, Id>; - #[method_id(dataFromRange:documentAttributes:error:)] + #[method_id(@__retain_semantics Other dataFromRange:documentAttributes:error:)] pub unsafe fn dataFromRange_documentAttributes_error( &self, range: NSRange, dict: &NSDictionary, ) -> Result, Id>; - #[method_id(fileWrapperFromRange:documentAttributes:error:)] + #[method_id(@__retain_semantics Other fileWrapperFromRange:documentAttributes:error:)] pub unsafe fn fileWrapperFromRange_documentAttributes_error( &self, range: NSRange, dict: &NSDictionary, ) -> Result, Id>; - #[method_id(initWithRTF:documentAttributes:)] + #[method_id(@__retain_semantics Init initWithRTF:documentAttributes:)] pub unsafe fn initWithRTF_documentAttributes( this: Option>, data: &NSData, @@ -483,7 +483,7 @@ extern_methods!( >, ) -> Option>; - #[method_id(initWithRTFD:documentAttributes:)] + #[method_id(@__retain_semantics Init initWithRTFD:documentAttributes:)] pub unsafe fn initWithRTFD_documentAttributes( this: Option>, data: &NSData, @@ -494,7 +494,7 @@ extern_methods!( >, ) -> Option>; - #[method_id(initWithHTML:documentAttributes:)] + #[method_id(@__retain_semantics Init initWithHTML:documentAttributes:)] pub unsafe fn initWithHTML_documentAttributes( this: Option>, data: &NSData, @@ -505,7 +505,7 @@ extern_methods!( >, ) -> Option>; - #[method_id(initWithHTML:baseURL:documentAttributes:)] + #[method_id(@__retain_semantics Init initWithHTML:baseURL:documentAttributes:)] pub unsafe fn initWithHTML_baseURL_documentAttributes( this: Option>, data: &NSData, @@ -517,7 +517,7 @@ extern_methods!( >, ) -> Option>; - #[method_id(initWithDocFormat:documentAttributes:)] + #[method_id(@__retain_semantics Init initWithDocFormat:documentAttributes:)] pub unsafe fn initWithDocFormat_documentAttributes( this: Option>, data: &NSData, @@ -528,7 +528,7 @@ extern_methods!( >, ) -> Option>; - #[method_id(initWithHTML:options:documentAttributes:)] + #[method_id(@__retain_semantics Init initWithHTML:options:documentAttributes:)] pub unsafe fn initWithHTML_options_documentAttributes( this: Option>, data: &NSData, @@ -540,7 +540,7 @@ extern_methods!( >, ) -> Option>; - #[method_id(initWithRTFDFileWrapper:documentAttributes:)] + #[method_id(@__retain_semantics Init initWithRTFDFileWrapper:documentAttributes:)] pub unsafe fn initWithRTFDFileWrapper_documentAttributes( this: Option>, wrapper: &NSFileWrapper, @@ -551,28 +551,28 @@ extern_methods!( >, ) -> Option>; - #[method_id(RTFFromRange:documentAttributes:)] + #[method_id(@__retain_semantics Other RTFFromRange:documentAttributes:)] pub unsafe fn RTFFromRange_documentAttributes( &self, range: NSRange, dict: &NSDictionary, ) -> Option>; - #[method_id(RTFDFromRange:documentAttributes:)] + #[method_id(@__retain_semantics Other RTFDFromRange:documentAttributes:)] pub unsafe fn RTFDFromRange_documentAttributes( &self, range: NSRange, dict: &NSDictionary, ) -> Option>; - #[method_id(RTFDFileWrapperFromRange:documentAttributes:)] + #[method_id(@__retain_semantics Other RTFDFileWrapperFromRange:documentAttributes:)] pub unsafe fn RTFDFileWrapperFromRange_documentAttributes( &self, range: NSRange, dict: &NSDictionary, ) -> Option>; - #[method_id(docFormatFromRange:documentAttributes:)] + #[method_id(@__retain_semantics Other docFormatFromRange:documentAttributes:)] pub unsafe fn docFormatFromRange_documentAttributes( &self, range: NSRange, @@ -613,13 +613,13 @@ extern_methods!( extern_methods!( /// NSAttributedStringKitAdditions unsafe impl NSAttributedString { - #[method_id(fontAttributesInRange:)] + #[method_id(@__retain_semantics Other fontAttributesInRange:)] pub unsafe fn fontAttributesInRange( &self, range: NSRange, ) -> Id, Shared>; - #[method_id(rulerAttributesInRange:)] + #[method_id(@__retain_semantics Other rulerAttributesInRange:)] pub unsafe fn rulerAttributesInRange( &self, range: NSRange, @@ -685,10 +685,10 @@ extern_methods!( extern_methods!( /// NSAttributedStringPasteboardAdditions unsafe impl NSAttributedString { - #[method_id(textTypes)] + #[method_id(@__retain_semantics Other textTypes)] pub unsafe fn textTypes() -> Id, Shared>; - #[method_id(textUnfilteredTypes)] + #[method_id(@__retain_semantics Other textUnfilteredTypes)] pub unsafe fn textUnfilteredTypes() -> Id, Shared>; } ); @@ -757,33 +757,33 @@ extern_methods!( #[method(containsAttachments)] pub unsafe fn containsAttachments(&self) -> bool; - #[method_id(textFileTypes)] + #[method_id(@__retain_semantics Other textFileTypes)] pub unsafe fn textFileTypes() -> Id; - #[method_id(textPasteboardTypes)] + #[method_id(@__retain_semantics Other textPasteboardTypes)] pub unsafe fn textPasteboardTypes() -> Id; - #[method_id(textUnfilteredFileTypes)] + #[method_id(@__retain_semantics Other textUnfilteredFileTypes)] pub unsafe fn textUnfilteredFileTypes() -> Id; - #[method_id(textUnfilteredPasteboardTypes)] + #[method_id(@__retain_semantics Other textUnfilteredPasteboardTypes)] pub unsafe fn textUnfilteredPasteboardTypes() -> Id; - #[method_id(initWithURL:documentAttributes:)] + #[method_id(@__retain_semantics Init initWithURL:documentAttributes:)] pub unsafe fn initWithURL_documentAttributes( this: Option>, url: &NSURL, dict: Option<&mut Option>>, ) -> Option>; - #[method_id(initWithPath:documentAttributes:)] + #[method_id(@__retain_semantics Init initWithPath:documentAttributes:)] pub unsafe fn initWithPath_documentAttributes( this: Option>, path: &NSString, dict: Option<&mut Option>>, ) -> Option>; - #[method_id(URLAtIndex:effectiveRange:)] + #[method_id(@__retain_semantics Other URLAtIndex:effectiveRange:)] pub unsafe fn URLAtIndex_effectiveRange( &self, location: NSUInteger, diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index 28c4c93b6..808b0face 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -35,16 +35,16 @@ extern_class!( extern_methods!( unsafe impl NSBezierPath { - #[method_id(bezierPath)] + #[method_id(@__retain_semantics Other bezierPath)] pub unsafe fn bezierPath() -> Id; - #[method_id(bezierPathWithRect:)] + #[method_id(@__retain_semantics Other bezierPathWithRect:)] pub unsafe fn bezierPathWithRect(rect: NSRect) -> Id; - #[method_id(bezierPathWithOvalInRect:)] + #[method_id(@__retain_semantics Other bezierPathWithOvalInRect:)] pub unsafe fn bezierPathWithOvalInRect(rect: NSRect) -> Id; - #[method_id(bezierPathWithRoundedRect:xRadius:yRadius:)] + #[method_id(@__retain_semantics Other bezierPathWithRoundedRect:xRadius:yRadius:)] pub unsafe fn bezierPathWithRoundedRect_xRadius_yRadius( rect: NSRect, xRadius: CGFloat, @@ -200,10 +200,10 @@ extern_methods!( #[method(setClip)] pub unsafe fn setClip(&self); - #[method_id(bezierPathByFlatteningPath)] + #[method_id(@__retain_semantics Other bezierPathByFlatteningPath)] pub unsafe fn bezierPathByFlatteningPath(&self) -> Id; - #[method_id(bezierPathByReversingPath)] + #[method_id(@__retain_semantics Other bezierPathByReversingPath)] pub unsafe fn bezierPathByReversingPath(&self) -> Id; #[method(transformUsingAffineTransform:)] diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index d63e4cb55..36e187c3e 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -112,13 +112,13 @@ extern_class!( extern_methods!( unsafe impl NSBitmapImageRep { - #[method_id(initWithFocusedViewRect:)] + #[method_id(@__retain_semantics Init initWithFocusedViewRect:)] pub unsafe fn initWithFocusedViewRect( this: Option>, rect: NSRect, ) -> Option>; - #[method_id(initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:)] + #[method_id(@__retain_semantics Init initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:)] pub unsafe fn initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel( this: Option>, planes: *mut *mut c_uchar, @@ -133,7 +133,7 @@ extern_methods!( pBits: NSInteger, ) -> Option>; - #[method_id(initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:)] + #[method_id(@__retain_semantics Init initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel:)] pub unsafe fn initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel( this: Option>, planes: *mut *mut c_uchar, @@ -149,25 +149,25 @@ extern_methods!( pBits: NSInteger, ) -> Option>; - #[method_id(initWithCGImage:)] + #[method_id(@__retain_semantics Init initWithCGImage:)] pub unsafe fn initWithCGImage( this: Option>, cgImage: CGImageRef, ) -> Id; - #[method_id(initWithCIImage:)] + #[method_id(@__retain_semantics Init initWithCIImage:)] pub unsafe fn initWithCIImage( this: Option>, ciImage: &CIImage, ) -> Id; - #[method_id(imageRepsWithData:)] + #[method_id(@__retain_semantics Other imageRepsWithData:)] pub unsafe fn imageRepsWithData(data: &NSData) -> Id, Shared>; - #[method_id(imageRepWithData:)] + #[method_id(@__retain_semantics Other imageRepWithData:)] pub unsafe fn imageRepWithData(data: &NSData) -> Option>; - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, data: &NSData, @@ -210,22 +210,22 @@ extern_methods!( #[method(setCompression:factor:)] pub unsafe fn setCompression_factor(&self, compression: NSTIFFCompression, factor: c_float); - #[method_id(TIFFRepresentation)] + #[method_id(@__retain_semantics Other TIFFRepresentation)] pub unsafe fn TIFFRepresentation(&self) -> Option>; - #[method_id(TIFFRepresentationUsingCompression:factor:)] + #[method_id(@__retain_semantics Other TIFFRepresentationUsingCompression:factor:)] pub unsafe fn TIFFRepresentationUsingCompression_factor( &self, comp: NSTIFFCompression, factor: c_float, ) -> Option>; - #[method_id(TIFFRepresentationOfImageRepsInArray:)] + #[method_id(@__retain_semantics Other TIFFRepresentationOfImageRepsInArray:)] pub unsafe fn TIFFRepresentationOfImageRepsInArray( array: &NSArray, ) -> Option>; - #[method_id(TIFFRepresentationOfImageRepsInArray:usingCompression:factor:)] + #[method_id(@__retain_semantics Other TIFFRepresentationOfImageRepsInArray:usingCompression:factor:)] pub unsafe fn TIFFRepresentationOfImageRepsInArray_usingCompression_factor( array: &NSArray, comp: NSTIFFCompression, @@ -238,7 +238,7 @@ extern_methods!( numTypes: NonNull, ); - #[method_id(localizedNameForTIFFCompressionType:)] + #[method_id(@__retain_semantics Other localizedNameForTIFFCompressionType:)] pub unsafe fn localizedNameForTIFFCompressionType( compression: NSTIFFCompression, ) -> Option>; @@ -255,7 +255,7 @@ extern_methods!( lightColor: Option<&NSColor>, ); - #[method_id(initForIncrementalLoad)] + #[method_id(@__retain_semantics Init initForIncrementalLoad)] pub unsafe fn initForIncrementalLoad(this: Option>) -> Id; #[method(incrementalLoadFromData:complete:)] @@ -268,7 +268,7 @@ extern_methods!( #[method(setColor:atX:y:)] pub unsafe fn setColor_atX_y(&self, color: &NSColor, x: NSInteger, y: NSInteger); - #[method_id(colorAtX:y:)] + #[method_id(@__retain_semantics Other colorAtX:y:)] pub unsafe fn colorAtX_y(&self, x: NSInteger, y: NSInteger) -> Option>; #[method(getPixel:atX:y:)] @@ -280,17 +280,17 @@ extern_methods!( #[method(CGImage)] pub unsafe fn CGImage(&self) -> CGImageRef; - #[method_id(colorSpace)] + #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Id; - #[method_id(bitmapImageRepByConvertingToColorSpace:renderingIntent:)] + #[method_id(@__retain_semantics Other bitmapImageRepByConvertingToColorSpace:renderingIntent:)] pub unsafe fn bitmapImageRepByConvertingToColorSpace_renderingIntent( &self, targetSpace: &NSColorSpace, renderingIntent: NSColorRenderingIntent, ) -> Option>; - #[method_id(bitmapImageRepByRetaggingWithColorSpace:)] + #[method_id(@__retain_semantics Other bitmapImageRepByRetaggingWithColorSpace:)] pub unsafe fn bitmapImageRepByRetaggingWithColorSpace( &self, newSpace: &NSColorSpace, @@ -301,14 +301,14 @@ extern_methods!( extern_methods!( /// NSBitmapImageFileTypeExtensions unsafe impl NSBitmapImageRep { - #[method_id(representationOfImageRepsInArray:usingType:properties:)] + #[method_id(@__retain_semantics Other representationOfImageRepsInArray:usingType:properties:)] pub unsafe fn representationOfImageRepsInArray_usingType_properties( imageReps: &NSArray, storageType: NSBitmapImageFileType, properties: &NSDictionary, ) -> Option>; - #[method_id(representationUsingType:properties:)] + #[method_id(@__retain_semantics Other representationUsingType:properties:)] pub unsafe fn representationUsingType_properties( &self, storageType: NSBitmapImageFileType, @@ -322,7 +322,7 @@ extern_methods!( value: Option<&Object>, ); - #[method_id(valueForProperty:)] + #[method_id(@__retain_semantics Other valueForProperty:)] pub unsafe fn valueForProperty( &self, property: &NSBitmapImageRepPropertyKey, diff --git a/crates/icrate/src/generated/AppKit/NSBox.rs b/crates/icrate/src/generated/AppKit/NSBox.rs index 7dd16987e..9c161c669 100644 --- a/crates/icrate/src/generated/AppKit/NSBox.rs +++ b/crates/icrate/src/generated/AppKit/NSBox.rs @@ -41,13 +41,13 @@ extern_methods!( #[method(setTitlePosition:)] pub unsafe fn setTitlePosition(&self, titlePosition: NSTitlePosition); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); - #[method_id(titleFont)] + #[method_id(@__retain_semantics Other titleFont)] pub unsafe fn titleFont(&self) -> Id; #[method(setTitleFont:)] @@ -59,7 +59,7 @@ extern_methods!( #[method(titleRect)] pub unsafe fn titleRect(&self) -> NSRect; - #[method_id(titleCell)] + #[method_id(@__retain_semantics Other titleCell)] pub unsafe fn titleCell(&self) -> Id; #[method(contentViewMargins)] @@ -74,7 +74,7 @@ extern_methods!( #[method(setFrameFromContentFrame:)] pub unsafe fn setFrameFromContentFrame(&self, contentFrame: NSRect); - #[method_id(contentView)] + #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Option>; #[method(setContentView:)] @@ -98,13 +98,13 @@ extern_methods!( #[method(setCornerRadius:)] pub unsafe fn setCornerRadius(&self, cornerRadius: CGFloat); - #[method_id(borderColor)] + #[method_id(@__retain_semantics Other borderColor)] pub unsafe fn borderColor(&self) -> Id; #[method(setBorderColor:)] pub unsafe fn setBorderColor(&self, borderColor: &NSColor); - #[method_id(fillColor)] + #[method_id(@__retain_semantics Other fillColor)] pub unsafe fn fillColor(&self) -> Id; #[method(setFillColor:)] diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index 676189691..8a9aacf8b 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -48,13 +48,13 @@ extern_methods!( #[method(setCellClass:)] pub unsafe fn setCellClass(&self, factoryId: &Class); - #[method_id(cellPrototype)] + #[method_id(@__retain_semantics Other cellPrototype)] pub unsafe fn cellPrototype(&self) -> Option>; #[method(setCellPrototype:)] pub unsafe fn setCellPrototype(&self, cellPrototype: Option<&Object>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -132,18 +132,18 @@ extern_methods!( #[method(setSendsActionOnArrowKeys:)] pub unsafe fn setSendsActionOnArrowKeys(&self, sendsActionOnArrowKeys: bool); - #[method_id(itemAtIndexPath:)] + #[method_id(@__retain_semantics Other itemAtIndexPath:)] pub unsafe fn itemAtIndexPath(&self, indexPath: &NSIndexPath) -> Option>; - #[method_id(itemAtRow:inColumn:)] + #[method_id(@__retain_semantics Other itemAtRow:inColumn:)] pub unsafe fn itemAtRow_inColumn( &self, row: NSInteger, column: NSInteger, ) -> Option>; - #[method_id(indexPathForColumn:)] + #[method_id(@__retain_semantics Other indexPathForColumn:)] pub unsafe fn indexPathForColumn(&self, column: NSInteger) -> Id; #[method(isLeafItem:)] @@ -156,7 +156,7 @@ extern_methods!( column: NSInteger, ); - #[method_id(parentForItemsInColumn:)] + #[method_id(@__retain_semantics Other parentForItemsInColumn:)] pub unsafe fn parentForItemsInColumn( &self, column: NSInteger, @@ -168,10 +168,10 @@ extern_methods!( #[method(setTitle:ofColumn:)] pub unsafe fn setTitle_ofColumn(&self, string: &NSString, column: NSInteger); - #[method_id(titleOfColumn:)] + #[method_id(@__retain_semantics Other titleOfColumn:)] pub unsafe fn titleOfColumn(&self, column: NSInteger) -> Option>; - #[method_id(pathSeparator)] + #[method_id(@__retain_semantics Other pathSeparator)] pub unsafe fn pathSeparator(&self) -> Id; #[method(setPathSeparator:)] @@ -180,10 +180,10 @@ extern_methods!( #[method(setPath:)] pub unsafe fn setPath(&self, path: &NSString) -> bool; - #[method_id(path)] + #[method_id(@__retain_semantics Other path)] pub unsafe fn path(&self) -> Id; - #[method_id(pathToColumn:)] + #[method_id(@__retain_semantics Other pathToColumn:)] pub unsafe fn pathToColumn(&self, column: NSInteger) -> Id; #[method(clickedColumn)] @@ -195,13 +195,13 @@ extern_methods!( #[method(selectedColumn)] pub unsafe fn selectedColumn(&self) -> NSInteger; - #[method_id(selectedCell)] + #[method_id(@__retain_semantics Other selectedCell)] pub unsafe fn selectedCell(&self) -> Option>; - #[method_id(selectedCellInColumn:)] + #[method_id(@__retain_semantics Other selectedCellInColumn:)] pub unsafe fn selectedCellInColumn(&self, column: NSInteger) -> Option>; - #[method_id(selectedCells)] + #[method_id(@__retain_semantics Other selectedCells)] pub unsafe fn selectedCells(&self) -> Option, Shared>>; #[method(selectRow:inColumn:)] @@ -210,13 +210,13 @@ extern_methods!( #[method(selectedRowInColumn:)] pub unsafe fn selectedRowInColumn(&self, column: NSInteger) -> NSInteger; - #[method_id(selectionIndexPath)] + #[method_id(@__retain_semantics Other selectionIndexPath)] pub unsafe fn selectionIndexPath(&self) -> Option>; #[method(setSelectionIndexPath:)] pub unsafe fn setSelectionIndexPath(&self, selectionIndexPath: Option<&NSIndexPath>); - #[method_id(selectionIndexPaths)] + #[method_id(@__retain_semantics Other selectionIndexPaths)] pub unsafe fn selectionIndexPaths(&self) -> Id, Shared>; #[method(setSelectionIndexPaths:)] @@ -225,7 +225,7 @@ extern_methods!( #[method(selectRowIndexes:inColumn:)] pub unsafe fn selectRowIndexes_inColumn(&self, indexes: &NSIndexSet, column: NSInteger); - #[method_id(selectedRowIndexesInColumn:)] + #[method_id(@__retain_semantics Other selectedRowIndexesInColumn:)] pub unsafe fn selectedRowIndexesInColumn( &self, column: NSInteger, @@ -264,7 +264,7 @@ extern_methods!( #[method(lastVisibleColumn)] pub unsafe fn lastVisibleColumn(&self) -> NSInteger; - #[method_id(loadedCellAtRow:column:)] + #[method_id(@__retain_semantics Other loadedCellAtRow:column:)] pub unsafe fn loadedCellAtRow_column( &self, row: NSInteger, @@ -358,7 +358,7 @@ extern_methods!( #[method(defaultColumnWidth)] pub unsafe fn defaultColumnWidth(&self) -> CGFloat; - #[method_id(columnsAutosaveName)] + #[method_id(@__retain_semantics Other columnsAutosaveName)] pub unsafe fn columnsAutosaveName(&self) -> Id; #[method(setColumnsAutosaveName:)] @@ -378,7 +378,7 @@ extern_methods!( event: &NSEvent, ) -> bool; - #[method_id(draggingImageForRowsWithIndexes:inColumn:withEvent:offset:)] + #[method_id(@__retain_semantics Other draggingImageForRowsWithIndexes:inColumn:withEvent:offset:)] pub unsafe fn draggingImageForRowsWithIndexes_inColumn_withEvent_offset( &self, rowIndexes: &NSIndexSet, @@ -400,7 +400,7 @@ extern_methods!( #[method(setAllowsTypeSelect:)] pub unsafe fn setAllowsTypeSelect(&self, allowsTypeSelect: bool); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] @@ -452,7 +452,7 @@ extern_methods!( #[method(columnOfMatrix:)] pub unsafe fn columnOfMatrix(&self, matrix: &NSMatrix) -> NSInteger; - #[method_id(matrixInColumn:)] + #[method_id(@__retain_semantics Other matrixInColumn:)] pub unsafe fn matrixInColumn(&self, column: NSInteger) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs index cb5304f76..3c77f7815 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs @@ -15,31 +15,31 @@ extern_class!( extern_methods!( unsafe impl NSBrowserCell { - #[method_id(initTextCell:)] + #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell( this: Option>, string: &NSString, ) -> Id; - #[method_id(initImageCell:)] + #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, image: Option<&NSImage>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(branchImage)] + #[method_id(@__retain_semantics Other branchImage)] pub unsafe fn branchImage() -> Option>; - #[method_id(highlightedBranchImage)] + #[method_id(@__retain_semantics Other highlightedBranchImage)] pub unsafe fn highlightedBranchImage() -> Option>; - #[method_id(highlightColorInView:)] + #[method_id(@__retain_semantics Other highlightColorInView:)] pub unsafe fn highlightColorInView( &self, controlView: &NSView, @@ -63,13 +63,13 @@ extern_methods!( #[method(set)] pub unsafe fn set(&self); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); - #[method_id(alternateImage)] + #[method_id(@__retain_semantics Other alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; #[method(setAlternateImage:)] diff --git a/crates/icrate/src/generated/AppKit/NSButton.rs b/crates/icrate/src/generated/AppKit/NSButton.rs index 4f292a14c..47aac06b9 100644 --- a/crates/icrate/src/generated/AppKit/NSButton.rs +++ b/crates/icrate/src/generated/AppKit/NSButton.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSButton { - #[method_id(buttonWithTitle:image:target:action:)] + #[method_id(@__retain_semantics Other buttonWithTitle:image:target:action:)] pub unsafe fn buttonWithTitle_image_target_action( title: &NSString, image: &NSImage, @@ -23,28 +23,28 @@ extern_methods!( action: Option, ) -> Id; - #[method_id(buttonWithTitle:target:action:)] + #[method_id(@__retain_semantics Other buttonWithTitle:target:action:)] pub unsafe fn buttonWithTitle_target_action( title: &NSString, target: Option<&Object>, action: Option, ) -> Id; - #[method_id(buttonWithImage:target:action:)] + #[method_id(@__retain_semantics Other buttonWithImage:target:action:)] pub unsafe fn buttonWithImage_target_action( image: &NSImage, target: Option<&Object>, action: Option, ) -> Id; - #[method_id(checkboxWithTitle:target:action:)] + #[method_id(@__retain_semantics Other checkboxWithTitle:target:action:)] pub unsafe fn checkboxWithTitle_target_action( title: &NSString, target: Option<&Object>, action: Option, ) -> Id; - #[method_id(radioButtonWithTitle:target:action:)] + #[method_id(@__retain_semantics Other radioButtonWithTitle:target:action:)] pub unsafe fn radioButtonWithTitle_target_action( title: &NSString, target: Option<&Object>, @@ -54,25 +54,25 @@ extern_methods!( #[method(setButtonType:)] pub unsafe fn setButtonType(&self, type_: NSButtonType); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); - #[method_id(attributedTitle)] + #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); - #[method_id(alternateTitle)] + #[method_id(@__retain_semantics Other alternateTitle)] pub unsafe fn alternateTitle(&self) -> Id; #[method(setAlternateTitle:)] pub unsafe fn setAlternateTitle(&self, alternateTitle: &NSString); - #[method_id(attributedAlternateTitle)] + #[method_id(@__retain_semantics Other attributedAlternateTitle)] pub unsafe fn attributedAlternateTitle(&self) -> Id; #[method(setAttributedAlternateTitle:)] @@ -87,7 +87,7 @@ extern_methods!( #[method(setHasDestructiveAction:)] pub unsafe fn setHasDestructiveAction(&self, hasDestructiveAction: bool); - #[method_id(sound)] + #[method_id(@__retain_semantics Other sound)] pub unsafe fn sound(&self) -> Option>; #[method(setSound:)] @@ -142,13 +142,13 @@ extern_methods!( showsBorderOnlyWhileMouseInside: bool, ); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); - #[method_id(alternateImage)] + #[method_id(@__retain_semantics Other alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; #[method(setAlternateImage:)] @@ -172,7 +172,7 @@ extern_methods!( #[method(setImageHugsTitle:)] pub unsafe fn setImageHugsTitle(&self, imageHugsTitle: bool); - #[method_id(symbolConfiguration)] + #[method_id(@__retain_semantics Other symbolConfiguration)] pub unsafe fn symbolConfiguration(&self) -> Option>; #[method(setSymbolConfiguration:)] @@ -181,13 +181,13 @@ extern_methods!( symbolConfiguration: Option<&NSImageSymbolConfiguration>, ); - #[method_id(bezelColor)] + #[method_id(@__retain_semantics Other bezelColor)] pub unsafe fn bezelColor(&self) -> Option>; #[method(setBezelColor:)] pub unsafe fn setBezelColor(&self, bezelColor: Option<&NSColor>); - #[method_id(contentTintColor)] + #[method_id(@__retain_semantics Other contentTintColor)] pub unsafe fn contentTintColor(&self) -> Option>; #[method(setContentTintColor:)] @@ -211,7 +211,7 @@ extern_methods!( #[method(highlight:)] pub unsafe fn highlight(&self, flag: bool); - #[method_id(keyEquivalent)] + #[method_id(@__retain_semantics Other keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; #[method(setKeyEquivalent:)] @@ -241,7 +241,7 @@ extern_methods!( prioritizedOptions: &NSArray, ) -> NSSize; - #[method_id(activeCompressionOptions)] + #[method_id(@__retain_semantics Other activeCompressionOptions)] pub unsafe fn activeCompressionOptions( &self, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs index 69a995f99..89e5be2dc 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -42,19 +42,19 @@ extern_class!( extern_methods!( unsafe impl NSButtonCell { - #[method_id(initTextCell:)] + #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell( this: Option>, string: &NSString, ) -> Id; - #[method_id(initImageCell:)] + #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, image: Option<&NSImage>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -81,25 +81,25 @@ extern_methods!( #[method(setShowsStateBy:)] pub unsafe fn setShowsStateBy(&self, showsStateBy: NSCellStyleMask); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); - #[method_id(attributedTitle)] + #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); - #[method_id(alternateTitle)] + #[method_id(@__retain_semantics Other alternateTitle)] pub unsafe fn alternateTitle(&self) -> Id; #[method(setAlternateTitle:)] pub unsafe fn setAlternateTitle(&self, alternateTitle: &NSString); - #[method_id(attributedAlternateTitle)] + #[method_id(@__retain_semantics Other attributedAlternateTitle)] pub unsafe fn attributedAlternateTitle(&self) -> Id; #[method(setAttributedAlternateTitle:)] @@ -108,7 +108,7 @@ extern_methods!( attributedAlternateTitle: &NSAttributedString, ); - #[method_id(alternateImage)] + #[method_id(@__retain_semantics Other alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; #[method(setAlternateImage:)] @@ -126,7 +126,7 @@ extern_methods!( #[method(setImageScaling:)] pub unsafe fn setImageScaling(&self, imageScaling: NSImageScaling); - #[method_id(keyEquivalent)] + #[method_id(@__retain_semantics Other keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; #[method(setKeyEquivalent:)] @@ -165,13 +165,13 @@ extern_methods!( showsBorderOnlyWhileMouseInside: bool, ); - #[method_id(sound)] + #[method_id(@__retain_semantics Other sound)] pub unsafe fn sound(&self) -> Option>; #[method(setSound:)] pub unsafe fn setSound(&self, sound: Option<&NSSound>); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[method(setBackgroundColor:)] @@ -301,10 +301,10 @@ extern_methods!( #[method(alternateMnemonicLocation)] pub unsafe fn alternateMnemonicLocation(&self) -> NSUInteger; - #[method_id(alternateMnemonic)] + #[method_id(@__retain_semantics Other alternateMnemonic)] pub unsafe fn alternateMnemonic(&self) -> Option>; - #[method_id(keyEquivalentFont)] + #[method_id(@__retain_semantics Other keyEquivalentFont)] pub unsafe fn keyEquivalentFont(&self) -> Option>; #[method(setKeyEquivalentFont:)] diff --git a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs index 4293e21a7..5eaf2732a 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSButtonTouchBarItem { - #[method_id(buttonTouchBarItemWithIdentifier:title:target:action:)] + #[method_id(@__retain_semantics Other buttonTouchBarItemWithIdentifier:title:target:action:)] pub unsafe fn buttonTouchBarItemWithIdentifier_title_target_action( identifier: &NSTouchBarItemIdentifier, title: &NSString, @@ -23,7 +23,7 @@ extern_methods!( action: Option, ) -> Id; - #[method_id(buttonTouchBarItemWithIdentifier:image:target:action:)] + #[method_id(@__retain_semantics Other buttonTouchBarItemWithIdentifier:image:target:action:)] pub unsafe fn buttonTouchBarItemWithIdentifier_image_target_action( identifier: &NSTouchBarItemIdentifier, image: &NSImage, @@ -31,7 +31,7 @@ extern_methods!( action: Option, ) -> Id; - #[method_id(buttonTouchBarItemWithIdentifier:title:image:target:action:)] + #[method_id(@__retain_semantics Other buttonTouchBarItemWithIdentifier:title:image:target:action:)] pub unsafe fn buttonTouchBarItemWithIdentifier_title_image_target_action( identifier: &NSTouchBarItemIdentifier, title: &NSString, @@ -40,25 +40,25 @@ extern_methods!( action: Option, ) -> Id; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); - #[method_id(bezelColor)] + #[method_id(@__retain_semantics Other bezelColor)] pub unsafe fn bezelColor(&self) -> Option>; #[method(setBezelColor:)] pub unsafe fn setBezelColor(&self, bezelColor: Option<&NSColor>); - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] @@ -76,7 +76,7 @@ extern_methods!( #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); - #[method_id(customizationLabel)] + #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[method(setCustomizationLabel:)] diff --git a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs index 389604de6..682bd62dc 100644 --- a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs @@ -15,16 +15,16 @@ extern_class!( extern_methods!( unsafe impl NSCIImageRep { - #[method_id(imageRepWithCIImage:)] + #[method_id(@__retain_semantics Other imageRepWithCIImage:)] pub unsafe fn imageRepWithCIImage(image: &CIImage) -> Id; - #[method_id(initWithCIImage:)] + #[method_id(@__retain_semantics Init initWithCIImage:)] pub unsafe fn initWithCIImage( this: Option>, image: &CIImage, ) -> Id; - #[method_id(CIImage)] + #[method_id(@__retain_semantics Other CIImage)] pub unsafe fn CIImage(&self) -> Id; } ); @@ -32,7 +32,7 @@ extern_methods!( extern_methods!( /// NSAppKitAdditions unsafe impl CIImage { - #[method_id(initWithBitmapImageRep:)] + #[method_id(@__retain_semantics Init initWithBitmapImageRep:)] pub unsafe fn initWithBitmapImageRep( this: Option>, bitmapImageRep: &NSBitmapImageRep, diff --git a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs index 151f7c5ed..d52fc209c 100644 --- a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs @@ -15,14 +15,14 @@ extern_class!( extern_methods!( unsafe impl NSCachedImageRep { - #[method_id(initWithWindow:rect:)] + #[method_id(@__retain_semantics Init initWithWindow:rect:)] pub unsafe fn initWithWindow_rect( this: Option>, win: Option<&NSWindow>, rect: NSRect, ) -> Option>; - #[method_id(initWithSize:depth:separate:alpha:)] + #[method_id(@__retain_semantics Init initWithSize:depth:separate:alpha:)] pub unsafe fn initWithSize_depth_separate_alpha( this: Option>, size: NSSize, @@ -31,7 +31,7 @@ extern_methods!( alpha: bool, ) -> Option>; - #[method_id(window)] + #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Option>; #[method(rect)] diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index 2108ad378..d5edcfadd 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -17,13 +17,13 @@ __inner_extern_class!( extern_methods!( unsafe impl NSCandidateListTouchBarItem { - #[method_id(client)] + #[method_id(@__retain_semantics Other client)] pub unsafe fn client(&self) -> Option>; #[method(setClient:)] pub unsafe fn setClient(&self, client: Option<&TodoProtocols>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -65,7 +65,7 @@ extern_methods!( attributedStringForCandidate: TodoBlock, ); - #[method_id(candidates)] + #[method_id(@__retain_semantics Other candidates)] pub unsafe fn candidates(&self) -> Id, Shared>; #[method(setCandidates:forSelectedRange:inString:)] @@ -76,7 +76,7 @@ extern_methods!( originalString: Option<&NSString>, ); - #[method_id(customizationLabel)] + #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[method(setCustomizationLabel:)] @@ -89,7 +89,7 @@ pub type NSCandidateListTouchBarItemDelegate = NSObject; extern_methods!( /// NSCandidateListTouchBarItem unsafe impl NSView { - #[method_id(candidateListTouchBarItem)] + #[method_id(@__retain_semantics Other candidateListTouchBarItem)] pub unsafe fn candidateListTouchBarItem( &self, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index 8839a2d5b..5a54f3d0e 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -86,22 +86,22 @@ extern_class!( extern_methods!( unsafe impl NSCell { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initTextCell:)] + #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell( this: Option>, string: &NSString, ) -> Id; - #[method_id(initImageCell:)] + #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, image: Option<&NSImage>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -110,7 +110,7 @@ extern_methods!( #[method(prefersTrackingUntilMouseUp)] pub unsafe fn prefersTrackingUntilMouseUp() -> bool; - #[method_id(controlView)] + #[method_id(@__retain_semantics Other controlView)] pub unsafe fn controlView(&self) -> Option>; #[method(setControlView:)] @@ -128,7 +128,7 @@ extern_methods!( #[method(setState:)] pub unsafe fn setState(&self, state: NSControlStateValue); - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] @@ -146,7 +146,7 @@ extern_methods!( #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] @@ -218,22 +218,22 @@ extern_methods!( #[method(setWraps:)] pub unsafe fn setWraps(&self, wraps: bool); - #[method_id(font)] + #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Option>; #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); - #[method_id(keyEquivalent)] + #[method_id(@__retain_semantics Other keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; - #[method_id(formatter)] + #[method_id(@__retain_semantics Other formatter)] pub unsafe fn formatter(&self) -> Option>; #[method(setFormatter:)] pub unsafe fn setFormatter(&self, formatter: Option<&NSFormatter>); - #[method_id(objectValue)] + #[method_id(@__retain_semantics Other objectValue)] pub unsafe fn objectValue(&self) -> Option>; #[method(setObjectValue:)] @@ -242,7 +242,7 @@ extern_methods!( #[method(hasValidObjectValue)] pub unsafe fn hasValidObjectValue(&self) -> bool; - #[method_id(stringValue)] + #[method_id(@__retain_semantics Other stringValue)] pub unsafe fn stringValue(&self) -> Id; #[method(setStringValue:)] @@ -293,7 +293,7 @@ extern_methods!( #[method(takeIntegerValueFrom:)] pub unsafe fn takeIntegerValueFrom(&self, sender: Option<&Object>); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] @@ -305,7 +305,7 @@ extern_methods!( #[method(setControlSize:)] pub unsafe fn setControlSize(&self, controlSize: NSControlSize); - #[method_id(representedObject)] + #[method_id(@__retain_semantics Other representedObject)] pub unsafe fn representedObject(&self) -> Option>; #[method(setRepresentedObject:)] @@ -332,7 +332,7 @@ extern_methods!( #[method(cellSizeForBounds:)] pub unsafe fn cellSizeForBounds(&self, rect: NSRect) -> NSSize; - #[method_id(highlightColorWithFrame:inView:)] + #[method_id(@__retain_semantics Other highlightColorWithFrame:inView:)] pub unsafe fn highlightColorWithFrame_inView( &self, cellFrame: NSRect, @@ -342,7 +342,7 @@ extern_methods!( #[method(calcDrawInfo:)] pub unsafe fn calcDrawInfo(&self, rect: NSRect); - #[method_id(setUpFieldEditorAttributes:)] + #[method_id(@__retain_semantics Other setUpFieldEditorAttributes:)] pub unsafe fn setUpFieldEditorAttributes(&self, textObj: &NSText) -> Id; #[method(drawInteriorWithFrame:inView:)] @@ -429,13 +429,13 @@ extern_methods!( #[method(resetCursorRect:inView:)] pub unsafe fn resetCursorRect_inView(&self, cellFrame: NSRect, controlView: &NSView); - #[method_id(menu)] + #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); - #[method_id(menuForEvent:inRect:ofView:)] + #[method_id(@__retain_semantics Other menuForEvent:inRect:ofView:)] pub unsafe fn menuForEvent_inRect_ofView( &self, event: &NSEvent, @@ -443,7 +443,7 @@ extern_methods!( view: &NSView, ) -> Option>; - #[method_id(defaultMenu)] + #[method_id(@__retain_semantics Other defaultMenu)] pub unsafe fn defaultMenu() -> Option>; #[method(sendsActionOnEndEditing)] @@ -485,7 +485,7 @@ extern_methods!( userInterfaceLayoutDirection: NSUserInterfaceLayoutDirection, ); - #[method_id(fieldEditorForView:)] + #[method_id(@__retain_semantics Other fieldEditorForView:)] pub unsafe fn fieldEditorForView( &self, controlView: &NSView, @@ -497,7 +497,7 @@ extern_methods!( #[method(setUsesSingleLineMode:)] pub unsafe fn setUsesSingleLineMode(&self, usesSingleLineMode: bool); - #[method_id(draggingImageComponentsWithFrame:inView:)] + #[method_id(@__retain_semantics Other draggingImageComponentsWithFrame:inView:)] pub unsafe fn draggingImageComponentsWithFrame_inView( &self, frame: NSRect, @@ -558,7 +558,7 @@ extern_methods!( extern_methods!( /// NSCellAttributedStringMethods unsafe impl NSCell { - #[method_id(attributedStringValue)] + #[method_id(@__retain_semantics Other attributedStringValue)] pub unsafe fn attributedStringValue(&self) -> Id; #[method(setAttributedStringValue:)] @@ -681,7 +681,7 @@ extern_methods!( #[method(mnemonicLocation)] pub unsafe fn mnemonicLocation(&self) -> NSUInteger; - #[method_id(mnemonic)] + #[method_id(@__retain_semantics Other mnemonic)] pub unsafe fn mnemonic(&self) -> Id; #[method(setTitleWithMnemonic:)] diff --git a/crates/icrate/src/generated/AppKit/NSClipView.rs b/crates/icrate/src/generated/AppKit/NSClipView.rs index a34cc7127..e434e221e 100644 --- a/crates/icrate/src/generated/AppKit/NSClipView.rs +++ b/crates/icrate/src/generated/AppKit/NSClipView.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSClipView { - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] @@ -27,7 +27,7 @@ extern_methods!( #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); - #[method_id(documentView)] + #[method_id(@__retain_semantics Other documentView)] pub unsafe fn documentView(&self) -> Option>; #[method(setDocumentView:)] @@ -36,7 +36,7 @@ extern_methods!( #[method(documentRect)] pub unsafe fn documentRect(&self) -> NSRect; - #[method_id(documentCursor)] + #[method_id(@__retain_semantics Other documentCursor)] pub unsafe fn documentCursor(&self) -> Option>; #[method(setDocumentCursor:)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs index 4e19dcea9..aaeb28f94 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionView.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionView.rs @@ -47,7 +47,7 @@ extern_class!( extern_methods!( unsafe impl NSCollectionViewItem { - #[method_id(collectionView)] + #[method_id(@__retain_semantics Other collectionView)] pub unsafe fn collectionView(&self) -> Option>; #[method(isSelected)] @@ -62,19 +62,19 @@ extern_methods!( #[method(setHighlightState:)] pub unsafe fn setHighlightState(&self, highlightState: NSCollectionViewItemHighlightState); - #[method_id(imageView)] + #[method_id(@__retain_semantics Other imageView)] pub unsafe fn imageView(&self) -> Option>; #[method(setImageView:)] pub unsafe fn setImageView(&self, imageView: Option<&NSImageView>); - #[method_id(textField)] + #[method_id(@__retain_semantics Other textField)] pub unsafe fn textField(&self) -> Option>; #[method(setTextField:)] pub unsafe fn setTextField(&self, textField: Option<&NSTextField>); - #[method_id(draggingImageComponents)] + #[method_id(@__retain_semantics Other draggingImageComponents)] pub unsafe fn draggingImageComponents( &self, ) -> Id, Shared>; @@ -92,13 +92,13 @@ extern_class!( extern_methods!( unsafe impl NSCollectionView { - #[method_id(dataSource)] + #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>; #[method(setDataSource:)] pub unsafe fn setDataSource(&self, dataSource: Option<&NSCollectionViewDataSource>); - #[method_id(prefetchDataSource)] + #[method_id(@__retain_semantics Other prefetchDataSource)] pub unsafe fn prefetchDataSource(&self) -> Option>; #[method(setPrefetchDataSource:)] @@ -107,7 +107,7 @@ extern_methods!( prefetchDataSource: Option<&NSCollectionViewPrefetching>, ); - #[method_id(content)] + #[method_id(@__retain_semantics Other content)] pub unsafe fn content(&self) -> Id, Shared>; #[method(setContent:)] @@ -116,13 +116,13 @@ extern_methods!( #[method(reloadData)] pub unsafe fn reloadData(&self); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSCollectionViewDelegate>); - #[method_id(backgroundView)] + #[method_id(@__retain_semantics Other backgroundView)] pub unsafe fn backgroundView(&self) -> Option>; #[method(setBackgroundView:)] @@ -137,7 +137,7 @@ extern_methods!( backgroundViewScrollsWithContent: bool, ); - #[method_id(collectionViewLayout)] + #[method_id(@__retain_semantics Other collectionViewLayout)] pub unsafe fn collectionViewLayout(&self) -> Option>; #[method(setCollectionViewLayout:)] @@ -146,13 +146,13 @@ extern_methods!( collectionViewLayout: Option<&NSCollectionViewLayout>, ); - #[method_id(layoutAttributesForItemAtIndexPath:)] + #[method_id(@__retain_semantics Other layoutAttributesForItemAtIndexPath:)] pub unsafe fn layoutAttributesForItemAtIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; - #[method_id(layoutAttributesForSupplementaryElementOfKind:atIndexPath:)] + #[method_id(@__retain_semantics Other layoutAttributesForSupplementaryElementOfKind:atIndexPath:)] pub unsafe fn layoutAttributesForSupplementaryElementOfKind_atIndexPath( &self, kind: &NSCollectionViewSupplementaryElementKind, @@ -169,7 +169,7 @@ extern_methods!( numberOfItems: NSUInteger, ) -> NSRect; - #[method_id(backgroundColors)] + #[method_id(@__retain_semantics Other backgroundColors)] pub unsafe fn backgroundColors(&self) -> Id, Shared>; #[method(setBackgroundColors:)] @@ -202,13 +202,13 @@ extern_methods!( #[method(setAllowsMultipleSelection:)] pub unsafe fn setAllowsMultipleSelection(&self, allowsMultipleSelection: bool); - #[method_id(selectionIndexes)] + #[method_id(@__retain_semantics Other selectionIndexes)] pub unsafe fn selectionIndexes(&self) -> Id; #[method(setSelectionIndexes:)] pub unsafe fn setSelectionIndexes(&self, selectionIndexes: &NSIndexSet); - #[method_id(selectionIndexPaths)] + #[method_id(@__retain_semantics Other selectionIndexPaths)] pub unsafe fn selectionIndexPaths(&self) -> Id, Shared>; #[method(setSelectionIndexPaths:)] @@ -260,14 +260,14 @@ extern_methods!( identifier: &NSUserInterfaceItemIdentifier, ); - #[method_id(makeItemWithIdentifier:forIndexPath:)] + #[method_id(@__retain_semantics Other makeItemWithIdentifier:forIndexPath:)] pub unsafe fn makeItemWithIdentifier_forIndexPath( &self, identifier: &NSUserInterfaceItemIdentifier, indexPath: &NSIndexPath, ) -> Id; - #[method_id(makeSupplementaryViewOfKind:withIdentifier:forIndexPath:)] + #[method_id(@__retain_semantics Other makeSupplementaryViewOfKind:withIdentifier:forIndexPath:)] pub unsafe fn makeSupplementaryViewOfKind_withIdentifier_forIndexPath( &self, elementKind: &NSCollectionViewSupplementaryElementKind, @@ -275,50 +275,50 @@ extern_methods!( indexPath: &NSIndexPath, ) -> Id; - #[method_id(itemAtIndex:)] + #[method_id(@__retain_semantics Other itemAtIndex:)] pub unsafe fn itemAtIndex( &self, index: NSUInteger, ) -> Option>; - #[method_id(itemAtIndexPath:)] + #[method_id(@__retain_semantics Other itemAtIndexPath:)] pub unsafe fn itemAtIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; - #[method_id(visibleItems)] + #[method_id(@__retain_semantics Other visibleItems)] pub unsafe fn visibleItems(&self) -> Id, Shared>; - #[method_id(indexPathsForVisibleItems)] + #[method_id(@__retain_semantics Other indexPathsForVisibleItems)] pub unsafe fn indexPathsForVisibleItems(&self) -> Id, Shared>; - #[method_id(indexPathForItem:)] + #[method_id(@__retain_semantics Other indexPathForItem:)] pub unsafe fn indexPathForItem( &self, item: &NSCollectionViewItem, ) -> Option>; - #[method_id(indexPathForItemAtPoint:)] + #[method_id(@__retain_semantics Other indexPathForItemAtPoint:)] pub unsafe fn indexPathForItemAtPoint( &self, point: NSPoint, ) -> Option>; - #[method_id(supplementaryViewForElementKind:atIndexPath:)] + #[method_id(@__retain_semantics Other supplementaryViewForElementKind:atIndexPath:)] pub unsafe fn supplementaryViewForElementKind_atIndexPath( &self, elementKind: &NSCollectionViewSupplementaryElementKind, indexPath: &NSIndexPath, ) -> Option>; - #[method_id(visibleSupplementaryViewsOfKind:)] + #[method_id(@__retain_semantics Other visibleSupplementaryViewsOfKind:)] pub unsafe fn visibleSupplementaryViewsOfKind( &self, elementKind: &NSCollectionViewSupplementaryElementKind, ) -> Id, Shared>; - #[method_id(indexPathsForVisibleSupplementaryElementsOfKind:)] + #[method_id(@__retain_semantics Other indexPathsForVisibleSupplementaryElementsOfKind:)] pub unsafe fn indexPathsForVisibleSupplementaryElementsOfKind( &self, elementKind: &NSCollectionViewSupplementaryElementKind, @@ -376,7 +376,7 @@ extern_methods!( localDestination: bool, ); - #[method_id(draggingImageForItemsAtIndexPaths:withEvent:offset:)] + #[method_id(@__retain_semantics Other draggingImageForItemsAtIndexPaths:withEvent:offset:)] pub unsafe fn draggingImageForItemsAtIndexPaths_withEvent_offset( &self, indexPaths: &NSSet, @@ -384,7 +384,7 @@ extern_methods!( dragImageOffset: NSPointPointer, ) -> Id; - #[method_id(draggingImageForItemsAtIndexes:withEvent:offset:)] + #[method_id(@__retain_semantics Other draggingImageForItemsAtIndexes:withEvent:offset:)] pub unsafe fn draggingImageForItemsAtIndexes_withEvent_offset( &self, indexes: &NSIndexSet, @@ -403,7 +403,7 @@ pub type NSCollectionViewDelegate = NSObject; extern_methods!( /// NSCollectionViewAdditions unsafe impl NSIndexPath { - #[method_id(indexPathForItem:inSection:)] + #[method_id(@__retain_semantics Other indexPathForItem:inSection:)] pub unsafe fn indexPathForItem_inSection( item: NSInteger, section: NSInteger, @@ -420,10 +420,10 @@ extern_methods!( extern_methods!( /// NSCollectionViewAdditions unsafe impl NSSet { - #[method_id(setWithCollectionViewIndexPath:)] + #[method_id(@__retain_semantics Other setWithCollectionViewIndexPath:)] pub unsafe fn setWithCollectionViewIndexPath(indexPath: &NSIndexPath) -> Id; - #[method_id(setWithCollectionViewIndexPaths:)] + #[method_id(@__retain_semantics Other setWithCollectionViewIndexPaths:)] pub unsafe fn setWithCollectionViewIndexPaths( indexPaths: &NSArray, ) -> Id; @@ -440,13 +440,13 @@ extern_methods!( extern_methods!( /// NSDeprecated unsafe impl NSCollectionView { - #[method_id(newItemForRepresentedObject:)] + #[method_id(@__retain_semantics New newItemForRepresentedObject:)] pub unsafe fn newItemForRepresentedObject( &self, object: &Object, ) -> Id; - #[method_id(itemPrototype)] + #[method_id(@__retain_semantics Other itemPrototype)] pub unsafe fn itemPrototype(&self) -> Option>; #[method(setItemPrototype:)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 411a27c16..b5969bd3e 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -53,7 +53,7 @@ extern_methods!( #[method(setInterSectionSpacing:)] pub unsafe fn setInterSectionSpacing(&self, interSectionSpacing: CGFloat); - #[method_id(boundarySupplementaryItems)] + #[method_id(@__retain_semantics Other boundarySupplementaryItems)] pub unsafe fn boundarySupplementaryItems( &self, ) -> Id, Shared>; @@ -77,39 +77,39 @@ extern_class!( extern_methods!( unsafe impl NSCollectionViewCompositionalLayout { - #[method_id(initWithSection:)] + #[method_id(@__retain_semantics Init initWithSection:)] pub unsafe fn initWithSection( this: Option>, section: &NSCollectionLayoutSection, ) -> Id; - #[method_id(initWithSection:configuration:)] + #[method_id(@__retain_semantics Init initWithSection:configuration:)] pub unsafe fn initWithSection_configuration( this: Option>, section: &NSCollectionLayoutSection, configuration: &NSCollectionViewCompositionalLayoutConfiguration, ) -> Id; - #[method_id(initWithSectionProvider:)] + #[method_id(@__retain_semantics Init initWithSectionProvider:)] pub unsafe fn initWithSectionProvider( this: Option>, sectionProvider: NSCollectionViewCompositionalLayoutSectionProvider, ) -> Id; - #[method_id(initWithSectionProvider:configuration:)] + #[method_id(@__retain_semantics Init initWithSectionProvider:configuration:)] pub unsafe fn initWithSectionProvider_configuration( this: Option>, sectionProvider: NSCollectionViewCompositionalLayoutSectionProvider, configuration: &NSCollectionViewCompositionalLayoutConfiguration, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(configuration)] + #[method_id(@__retain_semantics Other configuration)] pub unsafe fn configuration( &self, ) -> Id; @@ -147,13 +147,13 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutSection { - #[method_id(sectionWithGroup:)] + #[method_id(@__retain_semantics Other sectionWithGroup:)] pub unsafe fn sectionWithGroup(group: &NSCollectionLayoutGroup) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[method(contentInsets)] @@ -179,7 +179,7 @@ extern_methods!( orthogonalScrollingBehavior: NSCollectionLayoutSectionOrthogonalScrollingBehavior, ); - #[method_id(boundarySupplementaryItems)] + #[method_id(@__retain_semantics Other boundarySupplementaryItems)] pub unsafe fn boundarySupplementaryItems( &self, ) -> Id, Shared>; @@ -210,7 +210,7 @@ extern_methods!( visibleItemsInvalidationHandler: NSCollectionLayoutSectionVisibleItemsInvalidationHandler, ); - #[method_id(decorationItems)] + #[method_id(@__retain_semantics Other decorationItems)] pub unsafe fn decorationItems( &self, ) -> Id, Shared>; @@ -234,19 +234,19 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutItem { - #[method_id(itemWithLayoutSize:)] + #[method_id(@__retain_semantics Other itemWithLayoutSize:)] pub unsafe fn itemWithLayoutSize(layoutSize: &NSCollectionLayoutSize) -> Id; - #[method_id(itemWithLayoutSize:supplementaryItems:)] + #[method_id(@__retain_semantics Other itemWithLayoutSize:supplementaryItems:)] pub unsafe fn itemWithLayoutSize_supplementaryItems( layoutSize: &NSCollectionLayoutSize, supplementaryItems: &NSArray, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[method(contentInsets)] @@ -255,16 +255,16 @@ extern_methods!( #[method(setContentInsets:)] pub unsafe fn setContentInsets(&self, contentInsets: NSDirectionalEdgeInsets); - #[method_id(edgeSpacing)] + #[method_id(@__retain_semantics Other edgeSpacing)] pub unsafe fn edgeSpacing(&self) -> Option>; #[method(setEdgeSpacing:)] pub unsafe fn setEdgeSpacing(&self, edgeSpacing: Option<&NSCollectionLayoutEdgeSpacing>); - #[method_id(layoutSize)] + #[method_id(@__retain_semantics Other layoutSize)] pub unsafe fn layoutSize(&self) -> Id; - #[method_id(supplementaryItems)] + #[method_id(@__retain_semantics Other supplementaryItems)] pub unsafe fn supplementaryItems( &self, ) -> Id, Shared>; @@ -282,19 +282,19 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutGroupCustomItem { - #[method_id(customItemWithFrame:)] + #[method_id(@__retain_semantics Other customItemWithFrame:)] pub unsafe fn customItemWithFrame(frame: NSRect) -> Id; - #[method_id(customItemWithFrame:zIndex:)] + #[method_id(@__retain_semantics Other customItemWithFrame:zIndex:)] pub unsafe fn customItemWithFrame_zIndex( frame: NSRect, zIndex: NSInteger, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[method(frame)] @@ -316,45 +316,45 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutGroup { - #[method_id(horizontalGroupWithLayoutSize:subitem:count:)] + #[method_id(@__retain_semantics Other horizontalGroupWithLayoutSize:subitem:count:)] pub unsafe fn horizontalGroupWithLayoutSize_subitem_count( layoutSize: &NSCollectionLayoutSize, subitem: &NSCollectionLayoutItem, count: NSInteger, ) -> Id; - #[method_id(horizontalGroupWithLayoutSize:subitems:)] + #[method_id(@__retain_semantics Other horizontalGroupWithLayoutSize:subitems:)] pub unsafe fn horizontalGroupWithLayoutSize_subitems( layoutSize: &NSCollectionLayoutSize, subitems: &NSArray, ) -> Id; - #[method_id(verticalGroupWithLayoutSize:subitem:count:)] + #[method_id(@__retain_semantics Other verticalGroupWithLayoutSize:subitem:count:)] pub unsafe fn verticalGroupWithLayoutSize_subitem_count( layoutSize: &NSCollectionLayoutSize, subitem: &NSCollectionLayoutItem, count: NSInteger, ) -> Id; - #[method_id(verticalGroupWithLayoutSize:subitems:)] + #[method_id(@__retain_semantics Other verticalGroupWithLayoutSize:subitems:)] pub unsafe fn verticalGroupWithLayoutSize_subitems( layoutSize: &NSCollectionLayoutSize, subitems: &NSArray, ) -> Id; - #[method_id(customGroupWithLayoutSize:itemProvider:)] + #[method_id(@__retain_semantics Other customGroupWithLayoutSize:itemProvider:)] pub unsafe fn customGroupWithLayoutSize_itemProvider( layoutSize: &NSCollectionLayoutSize, itemProvider: NSCollectionLayoutGroupCustomItemProvider, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(supplementaryItems)] + #[method_id(@__retain_semantics Other supplementaryItems)] pub unsafe fn supplementaryItems( &self, ) -> Id, Shared>; @@ -365,7 +365,7 @@ extern_methods!( supplementaryItems: &NSArray, ); - #[method_id(interItemSpacing)] + #[method_id(@__retain_semantics Other interItemSpacing)] pub unsafe fn interItemSpacing(&self) -> Option>; #[method(setInterItemSpacing:)] @@ -374,10 +374,10 @@ extern_methods!( interItemSpacing: Option<&NSCollectionLayoutSpacing>, ); - #[method_id(subitems)] + #[method_id(@__retain_semantics Other subitems)] pub unsafe fn subitems(&self) -> Id, Shared>; - #[method_id(visualDescription)] + #[method_id(@__retain_semantics Other visualDescription)] pub unsafe fn visualDescription(&self) -> Id; } ); @@ -393,22 +393,22 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutDimension { - #[method_id(fractionalWidthDimension:)] + #[method_id(@__retain_semantics Other fractionalWidthDimension:)] pub unsafe fn fractionalWidthDimension(fractionalWidth: CGFloat) -> Id; - #[method_id(fractionalHeightDimension:)] + #[method_id(@__retain_semantics Other fractionalHeightDimension:)] pub unsafe fn fractionalHeightDimension(fractionalHeight: CGFloat) -> Id; - #[method_id(absoluteDimension:)] + #[method_id(@__retain_semantics Other absoluteDimension:)] pub unsafe fn absoluteDimension(absoluteDimension: CGFloat) -> Id; - #[method_id(estimatedDimension:)] + #[method_id(@__retain_semantics Other estimatedDimension:)] pub unsafe fn estimatedDimension(estimatedDimension: CGFloat) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[method(isFractionalWidth)] @@ -439,22 +439,22 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutSize { - #[method_id(sizeWithWidthDimension:heightDimension:)] + #[method_id(@__retain_semantics Other sizeWithWidthDimension:heightDimension:)] pub unsafe fn sizeWithWidthDimension_heightDimension( width: &NSCollectionLayoutDimension, height: &NSCollectionLayoutDimension, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(widthDimension)] + #[method_id(@__retain_semantics Other widthDimension)] pub unsafe fn widthDimension(&self) -> Id; - #[method_id(heightDimension)] + #[method_id(@__retain_semantics Other heightDimension)] pub unsafe fn heightDimension(&self) -> Id; } ); @@ -470,16 +470,16 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutSpacing { - #[method_id(flexibleSpacing:)] + #[method_id(@__retain_semantics Other flexibleSpacing:)] pub unsafe fn flexibleSpacing(flexibleSpacing: CGFloat) -> Id; - #[method_id(fixedSpacing:)] + #[method_id(@__retain_semantics Other fixedSpacing:)] pub unsafe fn fixedSpacing(fixedSpacing: CGFloat) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[method(spacing)] @@ -504,7 +504,7 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutEdgeSpacing { - #[method_id(spacingForLeading:top:trailing:bottom:)] + #[method_id(@__retain_semantics Other spacingForLeading:top:trailing:bottom:)] pub unsafe fn spacingForLeading_top_trailing_bottom( leading: Option<&NSCollectionLayoutSpacing>, top: Option<&NSCollectionLayoutSpacing>, @@ -512,22 +512,22 @@ extern_methods!( bottom: Option<&NSCollectionLayoutSpacing>, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(leading)] + #[method_id(@__retain_semantics Other leading)] pub unsafe fn leading(&self) -> Option>; - #[method_id(top)] + #[method_id(@__retain_semantics Other top)] pub unsafe fn top(&self) -> Option>; - #[method_id(trailing)] + #[method_id(@__retain_semantics Other trailing)] pub unsafe fn trailing(&self) -> Option>; - #[method_id(bottom)] + #[method_id(@__retain_semantics Other bottom)] pub unsafe fn bottom(&self) -> Option>; } ); @@ -543,14 +543,14 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutSupplementaryItem { - #[method_id(supplementaryItemWithLayoutSize:elementKind:containerAnchor:)] + #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:)] pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor( layoutSize: &NSCollectionLayoutSize, elementKind: &NSString, containerAnchor: &NSCollectionLayoutAnchor, ) -> Id; - #[method_id(supplementaryItemWithLayoutSize:elementKind:containerAnchor:itemAnchor:)] + #[method_id(@__retain_semantics Other supplementaryItemWithLayoutSize:elementKind:containerAnchor:itemAnchor:)] pub unsafe fn supplementaryItemWithLayoutSize_elementKind_containerAnchor_itemAnchor( layoutSize: &NSCollectionLayoutSize, elementKind: &NSString, @@ -558,10 +558,10 @@ extern_methods!( itemAnchor: &NSCollectionLayoutAnchor, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[method(zIndex)] @@ -570,13 +570,13 @@ extern_methods!( #[method(setZIndex:)] pub unsafe fn setZIndex(&self, zIndex: NSInteger); - #[method_id(elementKind)] + #[method_id(@__retain_semantics Other elementKind)] pub unsafe fn elementKind(&self) -> Id; - #[method_id(containerAnchor)] + #[method_id(@__retain_semantics Other containerAnchor)] pub unsafe fn containerAnchor(&self) -> Id; - #[method_id(itemAnchor)] + #[method_id(@__retain_semantics Other itemAnchor)] pub unsafe fn itemAnchor(&self) -> Option>; } ); @@ -592,14 +592,14 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutBoundarySupplementaryItem { - #[method_id(boundarySupplementaryItemWithLayoutSize:elementKind:alignment:)] + #[method_id(@__retain_semantics Other boundarySupplementaryItemWithLayoutSize:elementKind:alignment:)] pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment( layoutSize: &NSCollectionLayoutSize, elementKind: &NSString, alignment: NSRectAlignment, ) -> Id; - #[method_id(boundarySupplementaryItemWithLayoutSize:elementKind:alignment:absoluteOffset:)] + #[method_id(@__retain_semantics Other boundarySupplementaryItemWithLayoutSize:elementKind:alignment:absoluteOffset:)] pub unsafe fn boundarySupplementaryItemWithLayoutSize_elementKind_alignment_absoluteOffset( layoutSize: &NSCollectionLayoutSize, elementKind: &NSString, @@ -607,10 +607,10 @@ extern_methods!( absoluteOffset: NSPoint, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[method(extendsBoundary)] @@ -644,15 +644,15 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutDecorationItem { - #[method_id(backgroundDecorationItemWithElementKind:)] + #[method_id(@__retain_semantics Other backgroundDecorationItemWithElementKind:)] pub unsafe fn backgroundDecorationItemWithElementKind( elementKind: &NSString, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[method(zIndex)] @@ -661,7 +661,7 @@ extern_methods!( #[method(setZIndex:)] pub unsafe fn setZIndex(&self, zIndex: NSInteger); - #[method_id(elementKind)] + #[method_id(@__retain_semantics Other elementKind)] pub unsafe fn elementKind(&self) -> Id; } ); @@ -677,25 +677,25 @@ extern_class!( extern_methods!( unsafe impl NSCollectionLayoutAnchor { - #[method_id(layoutAnchorWithEdges:)] + #[method_id(@__retain_semantics Other layoutAnchorWithEdges:)] pub unsafe fn layoutAnchorWithEdges(edges: NSDirectionalRectEdge) -> Id; - #[method_id(layoutAnchorWithEdges:absoluteOffset:)] + #[method_id(@__retain_semantics Other layoutAnchorWithEdges:absoluteOffset:)] pub unsafe fn layoutAnchorWithEdges_absoluteOffset( edges: NSDirectionalRectEdge, absoluteOffset: NSPoint, ) -> Id; - #[method_id(layoutAnchorWithEdges:fractionalOffset:)] + #[method_id(@__retain_semantics Other layoutAnchorWithEdges:fractionalOffset:)] pub unsafe fn layoutAnchorWithEdges_fractionalOffset( edges: NSDirectionalRectEdge, fractionalOffset: NSPoint, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[method(edges)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs index 8c189ff4a..a810b85c3 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs @@ -57,7 +57,7 @@ extern_methods!( #[method(setMaximumItemSize:)] pub unsafe fn setMaximumItemSize(&self, maximumItemSize: NSSize); - #[method_id(backgroundColors)] + #[method_id(@__retain_semantics Other backgroundColors)] pub unsafe fn backgroundColors(&self) -> Id, Shared>; #[method(setBackgroundColors:)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs index f57517c76..50e39fb01 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -58,7 +58,7 @@ extern_methods!( #[method(setHidden:)] pub unsafe fn setHidden(&self, hidden: bool); - #[method_id(indexPath)] + #[method_id(@__retain_semantics Other indexPath)] pub unsafe fn indexPath(&self) -> Option>; #[method(setIndexPath:)] @@ -67,26 +67,26 @@ extern_methods!( #[method(representedElementCategory)] pub unsafe fn representedElementCategory(&self) -> NSCollectionElementCategory; - #[method_id(representedElementKind)] + #[method_id(@__retain_semantics Other representedElementKind)] pub unsafe fn representedElementKind(&self) -> Option>; - #[method_id(layoutAttributesForItemWithIndexPath:)] + #[method_id(@__retain_semantics Other layoutAttributesForItemWithIndexPath:)] pub unsafe fn layoutAttributesForItemWithIndexPath( indexPath: &NSIndexPath, ) -> Id; - #[method_id(layoutAttributesForInterItemGapBeforeIndexPath:)] + #[method_id(@__retain_semantics Other layoutAttributesForInterItemGapBeforeIndexPath:)] pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath( indexPath: &NSIndexPath, ) -> Id; - #[method_id(layoutAttributesForSupplementaryViewOfKind:withIndexPath:)] + #[method_id(@__retain_semantics Other layoutAttributesForSupplementaryViewOfKind:withIndexPath:)] pub unsafe fn layoutAttributesForSupplementaryViewOfKind_withIndexPath( elementKind: &NSCollectionViewSupplementaryElementKind, indexPath: &NSIndexPath, ) -> Id; - #[method_id(layoutAttributesForDecorationViewOfKind:withIndexPath:)] + #[method_id(@__retain_semantics Other layoutAttributesForDecorationViewOfKind:withIndexPath:)] pub unsafe fn layoutAttributesForDecorationViewOfKind_withIndexPath( decorationViewKind: &NSCollectionViewDecorationElementKind, indexPath: &NSIndexPath, @@ -112,10 +112,10 @@ extern_class!( extern_methods!( unsafe impl NSCollectionViewUpdateItem { - #[method_id(indexPathBeforeUpdate)] + #[method_id(@__retain_semantics Other indexPathBeforeUpdate)] pub unsafe fn indexPathBeforeUpdate(&self) -> Option>; - #[method_id(indexPathAfterUpdate)] + #[method_id(@__retain_semantics Other indexPathAfterUpdate)] pub unsafe fn indexPathAfterUpdate(&self) -> Option>; #[method(updateAction)] @@ -157,17 +157,17 @@ extern_methods!( indexPaths: &NSSet, ); - #[method_id(invalidatedItemIndexPaths)] + #[method_id(@__retain_semantics Other invalidatedItemIndexPaths)] pub unsafe fn invalidatedItemIndexPaths(&self) -> Option, Shared>>; - #[method_id(invalidatedSupplementaryIndexPaths)] + #[method_id(@__retain_semantics Other invalidatedSupplementaryIndexPaths)] pub unsafe fn invalidatedSupplementaryIndexPaths( &self, ) -> Option< Id>, Shared>, >; - #[method_id(invalidatedDecorationIndexPaths)] + #[method_id(@__retain_semantics Other invalidatedDecorationIndexPaths)] pub unsafe fn invalidatedDecorationIndexPaths( &self, ) -> Option< @@ -199,7 +199,7 @@ extern_class!( extern_methods!( unsafe impl NSCollectionViewLayout { - #[method_id(collectionView)] + #[method_id(@__retain_semantics Other collectionView)] pub unsafe fn collectionView(&self) -> Option>; #[method(invalidateLayout)] @@ -239,39 +239,39 @@ extern_methods!( #[method(prepareLayout)] pub unsafe fn prepareLayout(&self); - #[method_id(layoutAttributesForElementsInRect:)] + #[method_id(@__retain_semantics Other layoutAttributesForElementsInRect:)] pub unsafe fn layoutAttributesForElementsInRect( &self, rect: NSRect, ) -> Id, Shared>; - #[method_id(layoutAttributesForItemAtIndexPath:)] + #[method_id(@__retain_semantics Other layoutAttributesForItemAtIndexPath:)] pub unsafe fn layoutAttributesForItemAtIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; - #[method_id(layoutAttributesForSupplementaryViewOfKind:atIndexPath:)] + #[method_id(@__retain_semantics Other layoutAttributesForSupplementaryViewOfKind:atIndexPath:)] pub unsafe fn layoutAttributesForSupplementaryViewOfKind_atIndexPath( &self, elementKind: &NSCollectionViewSupplementaryElementKind, indexPath: &NSIndexPath, ) -> Option>; - #[method_id(layoutAttributesForDecorationViewOfKind:atIndexPath:)] + #[method_id(@__retain_semantics Other layoutAttributesForDecorationViewOfKind:atIndexPath:)] pub unsafe fn layoutAttributesForDecorationViewOfKind_atIndexPath( &self, elementKind: &NSCollectionViewDecorationElementKind, indexPath: &NSIndexPath, ) -> Option>; - #[method_id(layoutAttributesForDropTargetAtPoint:)] + #[method_id(@__retain_semantics Other layoutAttributesForDropTargetAtPoint:)] pub unsafe fn layoutAttributesForDropTargetAtPoint( &self, pointInCollectionView: NSPoint, ) -> Option>; - #[method_id(layoutAttributesForInterItemGapBeforeIndexPath:)] + #[method_id(@__retain_semantics Other layoutAttributesForInterItemGapBeforeIndexPath:)] pub unsafe fn layoutAttributesForInterItemGapBeforeIndexPath( &self, indexPath: &NSIndexPath, @@ -280,7 +280,7 @@ extern_methods!( #[method(shouldInvalidateLayoutForBoundsChange:)] pub unsafe fn shouldInvalidateLayoutForBoundsChange(&self, newBounds: NSRect) -> bool; - #[method_id(invalidationContextForBoundsChange:)] + #[method_id(@__retain_semantics Other invalidationContextForBoundsChange:)] pub unsafe fn invalidationContextForBoundsChange( &self, newBounds: NSRect, @@ -293,7 +293,7 @@ extern_methods!( originalAttributes: &NSCollectionViewLayoutAttributes, ) -> bool; - #[method_id(invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:)] + #[method_id(@__retain_semantics Other invalidationContextForPreferredLayoutAttributes:withOriginalAttributes:)] pub unsafe fn invalidationContextForPreferredLayoutAttributes_withOriginalAttributes( &self, preferredAttributes: &NSCollectionViewLayoutAttributes, @@ -345,65 +345,65 @@ extern_methods!( #[method(finalizeLayoutTransition)] pub unsafe fn finalizeLayoutTransition(&self); - #[method_id(initialLayoutAttributesForAppearingItemAtIndexPath:)] + #[method_id(@__retain_semantics Other initialLayoutAttributesForAppearingItemAtIndexPath:)] pub unsafe fn initialLayoutAttributesForAppearingItemAtIndexPath( &self, itemIndexPath: &NSIndexPath, ) -> Option>; - #[method_id(finalLayoutAttributesForDisappearingItemAtIndexPath:)] + #[method_id(@__retain_semantics Other finalLayoutAttributesForDisappearingItemAtIndexPath:)] pub unsafe fn finalLayoutAttributesForDisappearingItemAtIndexPath( &self, itemIndexPath: &NSIndexPath, ) -> Option>; - #[method_id(initialLayoutAttributesForAppearingSupplementaryElementOfKind:atIndexPath:)] + #[method_id(@__retain_semantics Other initialLayoutAttributesForAppearingSupplementaryElementOfKind:atIndexPath:)] pub unsafe fn initialLayoutAttributesForAppearingSupplementaryElementOfKind_atIndexPath( &self, elementKind: &NSCollectionViewSupplementaryElementKind, elementIndexPath: &NSIndexPath, ) -> Option>; - #[method_id(finalLayoutAttributesForDisappearingSupplementaryElementOfKind:atIndexPath:)] + #[method_id(@__retain_semantics Other finalLayoutAttributesForDisappearingSupplementaryElementOfKind:atIndexPath:)] pub unsafe fn finalLayoutAttributesForDisappearingSupplementaryElementOfKind_atIndexPath( &self, elementKind: &NSCollectionViewSupplementaryElementKind, elementIndexPath: &NSIndexPath, ) -> Option>; - #[method_id(initialLayoutAttributesForAppearingDecorationElementOfKind:atIndexPath:)] + #[method_id(@__retain_semantics Other initialLayoutAttributesForAppearingDecorationElementOfKind:atIndexPath:)] pub unsafe fn initialLayoutAttributesForAppearingDecorationElementOfKind_atIndexPath( &self, elementKind: &NSCollectionViewDecorationElementKind, decorationIndexPath: &NSIndexPath, ) -> Option>; - #[method_id(finalLayoutAttributesForDisappearingDecorationElementOfKind:atIndexPath:)] + #[method_id(@__retain_semantics Other finalLayoutAttributesForDisappearingDecorationElementOfKind:atIndexPath:)] pub unsafe fn finalLayoutAttributesForDisappearingDecorationElementOfKind_atIndexPath( &self, elementKind: &NSCollectionViewDecorationElementKind, decorationIndexPath: &NSIndexPath, ) -> Option>; - #[method_id(indexPathsToDeleteForSupplementaryViewOfKind:)] + #[method_id(@__retain_semantics Other indexPathsToDeleteForSupplementaryViewOfKind:)] pub unsafe fn indexPathsToDeleteForSupplementaryViewOfKind( &self, elementKind: &NSCollectionViewSupplementaryElementKind, ) -> Id, Shared>; - #[method_id(indexPathsToDeleteForDecorationViewOfKind:)] + #[method_id(@__retain_semantics Other indexPathsToDeleteForDecorationViewOfKind:)] pub unsafe fn indexPathsToDeleteForDecorationViewOfKind( &self, elementKind: &NSCollectionViewDecorationElementKind, ) -> Id, Shared>; - #[method_id(indexPathsToInsertForSupplementaryViewOfKind:)] + #[method_id(@__retain_semantics Other indexPathsToInsertForSupplementaryViewOfKind:)] pub unsafe fn indexPathsToInsertForSupplementaryViewOfKind( &self, elementKind: &NSCollectionViewSupplementaryElementKind, ) -> Id, Shared>; - #[method_id(indexPathsToInsertForDecorationViewOfKind:)] + #[method_id(@__retain_semantics Other indexPathsToInsertForDecorationViewOfKind:)] pub unsafe fn indexPathsToInsertForDecorationViewOfKind( &self, elementKind: &NSCollectionViewDecorationElementKind, diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs index 177c4e172..98a4f49b2 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs @@ -23,13 +23,13 @@ extern_methods!( #[method(setTransitionProgress:)] pub unsafe fn setTransitionProgress(&self, transitionProgress: CGFloat); - #[method_id(currentLayout)] + #[method_id(@__retain_semantics Other currentLayout)] pub unsafe fn currentLayout(&self) -> Id; - #[method_id(nextLayout)] + #[method_id(@__retain_semantics Other nextLayout)] pub unsafe fn nextLayout(&self) -> Id; - #[method_id(initWithCurrentLayout:nextLayout:)] + #[method_id(@__retain_semantics Init initWithCurrentLayout:nextLayout:)] pub unsafe fn initWithCurrentLayout_nextLayout( this: Option>, currentLayout: &NSCollectionViewLayout, diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index d056d9776..99cec0025 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -29,23 +29,23 @@ extern_class!( extern_methods!( unsafe impl NSColor { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(colorWithColorSpace:components:count:)] + #[method_id(@__retain_semantics Other colorWithColorSpace:components:count:)] pub unsafe fn colorWithColorSpace_components_count( space: &NSColorSpace, components: NonNull, numberOfComponents: NSInteger, ) -> Id; - #[method_id(colorWithSRGBRed:green:blue:alpha:)] + #[method_id(@__retain_semantics Other colorWithSRGBRed:green:blue:alpha:)] pub unsafe fn colorWithSRGBRed_green_blue_alpha( red: CGFloat, green: CGFloat, @@ -53,13 +53,13 @@ extern_methods!( alpha: CGFloat, ) -> Id; - #[method_id(colorWithGenericGamma22White:alpha:)] + #[method_id(@__retain_semantics Other colorWithGenericGamma22White:alpha:)] pub unsafe fn colorWithGenericGamma22White_alpha( white: CGFloat, alpha: CGFloat, ) -> Id; - #[method_id(colorWithDisplayP3Red:green:blue:alpha:)] + #[method_id(@__retain_semantics Other colorWithDisplayP3Red:green:blue:alpha:)] pub unsafe fn colorWithDisplayP3Red_green_blue_alpha( red: CGFloat, green: CGFloat, @@ -67,10 +67,10 @@ extern_methods!( alpha: CGFloat, ) -> Id; - #[method_id(colorWithWhite:alpha:)] + #[method_id(@__retain_semantics Other colorWithWhite:alpha:)] pub unsafe fn colorWithWhite_alpha(white: CGFloat, alpha: CGFloat) -> Id; - #[method_id(colorWithRed:green:blue:alpha:)] + #[method_id(@__retain_semantics Other colorWithRed:green:blue:alpha:)] pub unsafe fn colorWithRed_green_blue_alpha( red: CGFloat, green: CGFloat, @@ -78,7 +78,7 @@ extern_methods!( alpha: CGFloat, ) -> Id; - #[method_id(colorWithHue:saturation:brightness:alpha:)] + #[method_id(@__retain_semantics Other colorWithHue:saturation:brightness:alpha:)] pub unsafe fn colorWithHue_saturation_brightness_alpha( hue: CGFloat, saturation: CGFloat, @@ -86,7 +86,7 @@ extern_methods!( alpha: CGFloat, ) -> Id; - #[method_id(colorWithColorSpace:hue:saturation:brightness:alpha:)] + #[method_id(@__retain_semantics Other colorWithColorSpace:hue:saturation:brightness:alpha:)] pub unsafe fn colorWithColorSpace_hue_saturation_brightness_alpha( space: &NSColorSpace, hue: CGFloat, @@ -95,34 +95,34 @@ extern_methods!( alpha: CGFloat, ) -> Id; - #[method_id(colorWithCatalogName:colorName:)] + #[method_id(@__retain_semantics Other colorWithCatalogName:colorName:)] pub unsafe fn colorWithCatalogName_colorName( listName: &NSColorListName, colorName: &NSColorName, ) -> Option>; - #[method_id(colorNamed:bundle:)] + #[method_id(@__retain_semantics Other colorNamed:bundle:)] pub unsafe fn colorNamed_bundle( name: &NSColorName, bundle: Option<&NSBundle>, ) -> Option>; - #[method_id(colorNamed:)] + #[method_id(@__retain_semantics Other colorNamed:)] pub unsafe fn colorNamed(name: &NSColorName) -> Option>; - #[method_id(colorWithName:dynamicProvider:)] + #[method_id(@__retain_semantics Other colorWithName:dynamicProvider:)] pub unsafe fn colorWithName_dynamicProvider( colorName: Option<&NSColorName>, dynamicProvider: TodoBlock, ) -> Id; - #[method_id(colorWithDeviceWhite:alpha:)] + #[method_id(@__retain_semantics Other colorWithDeviceWhite:alpha:)] pub unsafe fn colorWithDeviceWhite_alpha( white: CGFloat, alpha: CGFloat, ) -> Id; - #[method_id(colorWithDeviceRed:green:blue:alpha:)] + #[method_id(@__retain_semantics Other colorWithDeviceRed:green:blue:alpha:)] pub unsafe fn colorWithDeviceRed_green_blue_alpha( red: CGFloat, green: CGFloat, @@ -130,7 +130,7 @@ extern_methods!( alpha: CGFloat, ) -> Id; - #[method_id(colorWithDeviceHue:saturation:brightness:alpha:)] + #[method_id(@__retain_semantics Other colorWithDeviceHue:saturation:brightness:alpha:)] pub unsafe fn colorWithDeviceHue_saturation_brightness_alpha( hue: CGFloat, saturation: CGFloat, @@ -138,7 +138,7 @@ extern_methods!( alpha: CGFloat, ) -> Id; - #[method_id(colorWithDeviceCyan:magenta:yellow:black:alpha:)] + #[method_id(@__retain_semantics Other colorWithDeviceCyan:magenta:yellow:black:alpha:)] pub unsafe fn colorWithDeviceCyan_magenta_yellow_black_alpha( cyan: CGFloat, magenta: CGFloat, @@ -147,13 +147,13 @@ extern_methods!( alpha: CGFloat, ) -> Id; - #[method_id(colorWithCalibratedWhite:alpha:)] + #[method_id(@__retain_semantics Other colorWithCalibratedWhite:alpha:)] pub unsafe fn colorWithCalibratedWhite_alpha( white: CGFloat, alpha: CGFloat, ) -> Id; - #[method_id(colorWithCalibratedRed:green:blue:alpha:)] + #[method_id(@__retain_semantics Other colorWithCalibratedRed:green:blue:alpha:)] pub unsafe fn colorWithCalibratedRed_green_blue_alpha( red: CGFloat, green: CGFloat, @@ -161,7 +161,7 @@ extern_methods!( alpha: CGFloat, ) -> Id; - #[method_id(colorWithCalibratedHue:saturation:brightness:alpha:)] + #[method_id(@__retain_semantics Other colorWithCalibratedHue:saturation:brightness:alpha:)] pub unsafe fn colorWithCalibratedHue_saturation_brightness_alpha( hue: CGFloat, saturation: CGFloat, @@ -169,223 +169,223 @@ extern_methods!( alpha: CGFloat, ) -> Id; - #[method_id(colorWithPatternImage:)] + #[method_id(@__retain_semantics Other colorWithPatternImage:)] pub unsafe fn colorWithPatternImage(image: &NSImage) -> Id; #[method(type)] pub unsafe fn type_(&self) -> NSColorType; - #[method_id(colorUsingType:)] + #[method_id(@__retain_semantics Other colorUsingType:)] pub unsafe fn colorUsingType(&self, type_: NSColorType) -> Option>; - #[method_id(colorUsingColorSpace:)] + #[method_id(@__retain_semantics Other colorUsingColorSpace:)] pub unsafe fn colorUsingColorSpace( &self, space: &NSColorSpace, ) -> Option>; - #[method_id(blackColor)] + #[method_id(@__retain_semantics Other blackColor)] pub unsafe fn blackColor() -> Id; - #[method_id(darkGrayColor)] + #[method_id(@__retain_semantics Other darkGrayColor)] pub unsafe fn darkGrayColor() -> Id; - #[method_id(lightGrayColor)] + #[method_id(@__retain_semantics Other lightGrayColor)] pub unsafe fn lightGrayColor() -> Id; - #[method_id(whiteColor)] + #[method_id(@__retain_semantics Other whiteColor)] pub unsafe fn whiteColor() -> Id; - #[method_id(grayColor)] + #[method_id(@__retain_semantics Other grayColor)] pub unsafe fn grayColor() -> Id; - #[method_id(redColor)] + #[method_id(@__retain_semantics Other redColor)] pub unsafe fn redColor() -> Id; - #[method_id(greenColor)] + #[method_id(@__retain_semantics Other greenColor)] pub unsafe fn greenColor() -> Id; - #[method_id(blueColor)] + #[method_id(@__retain_semantics Other blueColor)] pub unsafe fn blueColor() -> Id; - #[method_id(cyanColor)] + #[method_id(@__retain_semantics Other cyanColor)] pub unsafe fn cyanColor() -> Id; - #[method_id(yellowColor)] + #[method_id(@__retain_semantics Other yellowColor)] pub unsafe fn yellowColor() -> Id; - #[method_id(magentaColor)] + #[method_id(@__retain_semantics Other magentaColor)] pub unsafe fn magentaColor() -> Id; - #[method_id(orangeColor)] + #[method_id(@__retain_semantics Other orangeColor)] pub unsafe fn orangeColor() -> Id; - #[method_id(purpleColor)] + #[method_id(@__retain_semantics Other purpleColor)] pub unsafe fn purpleColor() -> Id; - #[method_id(brownColor)] + #[method_id(@__retain_semantics Other brownColor)] pub unsafe fn brownColor() -> Id; - #[method_id(clearColor)] + #[method_id(@__retain_semantics Other clearColor)] pub unsafe fn clearColor() -> Id; - #[method_id(labelColor)] + #[method_id(@__retain_semantics Other labelColor)] pub unsafe fn labelColor() -> Id; - #[method_id(secondaryLabelColor)] + #[method_id(@__retain_semantics Other secondaryLabelColor)] pub unsafe fn secondaryLabelColor() -> Id; - #[method_id(tertiaryLabelColor)] + #[method_id(@__retain_semantics Other tertiaryLabelColor)] pub unsafe fn tertiaryLabelColor() -> Id; - #[method_id(quaternaryLabelColor)] + #[method_id(@__retain_semantics Other quaternaryLabelColor)] pub unsafe fn quaternaryLabelColor() -> Id; - #[method_id(linkColor)] + #[method_id(@__retain_semantics Other linkColor)] pub unsafe fn linkColor() -> Id; - #[method_id(placeholderTextColor)] + #[method_id(@__retain_semantics Other placeholderTextColor)] pub unsafe fn placeholderTextColor() -> Id; - #[method_id(windowFrameTextColor)] + #[method_id(@__retain_semantics Other windowFrameTextColor)] pub unsafe fn windowFrameTextColor() -> Id; - #[method_id(selectedMenuItemTextColor)] + #[method_id(@__retain_semantics Other selectedMenuItemTextColor)] pub unsafe fn selectedMenuItemTextColor() -> Id; - #[method_id(alternateSelectedControlTextColor)] + #[method_id(@__retain_semantics Other alternateSelectedControlTextColor)] pub unsafe fn alternateSelectedControlTextColor() -> Id; - #[method_id(headerTextColor)] + #[method_id(@__retain_semantics Other headerTextColor)] pub unsafe fn headerTextColor() -> Id; - #[method_id(separatorColor)] + #[method_id(@__retain_semantics Other separatorColor)] pub unsafe fn separatorColor() -> Id; - #[method_id(gridColor)] + #[method_id(@__retain_semantics Other gridColor)] pub unsafe fn gridColor() -> Id; - #[method_id(windowBackgroundColor)] + #[method_id(@__retain_semantics Other windowBackgroundColor)] pub unsafe fn windowBackgroundColor() -> Id; - #[method_id(underPageBackgroundColor)] + #[method_id(@__retain_semantics Other underPageBackgroundColor)] pub unsafe fn underPageBackgroundColor() -> Id; - #[method_id(controlBackgroundColor)] + #[method_id(@__retain_semantics Other controlBackgroundColor)] pub unsafe fn controlBackgroundColor() -> Id; - #[method_id(selectedContentBackgroundColor)] + #[method_id(@__retain_semantics Other selectedContentBackgroundColor)] pub unsafe fn selectedContentBackgroundColor() -> Id; - #[method_id(unemphasizedSelectedContentBackgroundColor)] + #[method_id(@__retain_semantics Other unemphasizedSelectedContentBackgroundColor)] pub unsafe fn unemphasizedSelectedContentBackgroundColor() -> Id; - #[method_id(alternatingContentBackgroundColors)] + #[method_id(@__retain_semantics Other alternatingContentBackgroundColors)] pub unsafe fn alternatingContentBackgroundColors() -> Id, Shared>; - #[method_id(findHighlightColor)] + #[method_id(@__retain_semantics Other findHighlightColor)] pub unsafe fn findHighlightColor() -> Id; - #[method_id(textColor)] + #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor() -> Id; - #[method_id(textBackgroundColor)] + #[method_id(@__retain_semantics Other textBackgroundColor)] pub unsafe fn textBackgroundColor() -> Id; - #[method_id(selectedTextColor)] + #[method_id(@__retain_semantics Other selectedTextColor)] pub unsafe fn selectedTextColor() -> Id; - #[method_id(selectedTextBackgroundColor)] + #[method_id(@__retain_semantics Other selectedTextBackgroundColor)] pub unsafe fn selectedTextBackgroundColor() -> Id; - #[method_id(unemphasizedSelectedTextBackgroundColor)] + #[method_id(@__retain_semantics Other unemphasizedSelectedTextBackgroundColor)] pub unsafe fn unemphasizedSelectedTextBackgroundColor() -> Id; - #[method_id(unemphasizedSelectedTextColor)] + #[method_id(@__retain_semantics Other unemphasizedSelectedTextColor)] pub unsafe fn unemphasizedSelectedTextColor() -> Id; - #[method_id(controlColor)] + #[method_id(@__retain_semantics Other controlColor)] pub unsafe fn controlColor() -> Id; - #[method_id(controlTextColor)] + #[method_id(@__retain_semantics Other controlTextColor)] pub unsafe fn controlTextColor() -> Id; - #[method_id(selectedControlColor)] + #[method_id(@__retain_semantics Other selectedControlColor)] pub unsafe fn selectedControlColor() -> Id; - #[method_id(selectedControlTextColor)] + #[method_id(@__retain_semantics Other selectedControlTextColor)] pub unsafe fn selectedControlTextColor() -> Id; - #[method_id(disabledControlTextColor)] + #[method_id(@__retain_semantics Other disabledControlTextColor)] pub unsafe fn disabledControlTextColor() -> Id; - #[method_id(keyboardFocusIndicatorColor)] + #[method_id(@__retain_semantics Other keyboardFocusIndicatorColor)] pub unsafe fn keyboardFocusIndicatorColor() -> Id; - #[method_id(scrubberTexturedBackgroundColor)] + #[method_id(@__retain_semantics Other scrubberTexturedBackgroundColor)] pub unsafe fn scrubberTexturedBackgroundColor() -> Id; - #[method_id(systemRedColor)] + #[method_id(@__retain_semantics Other systemRedColor)] pub unsafe fn systemRedColor() -> Id; - #[method_id(systemGreenColor)] + #[method_id(@__retain_semantics Other systemGreenColor)] pub unsafe fn systemGreenColor() -> Id; - #[method_id(systemBlueColor)] + #[method_id(@__retain_semantics Other systemBlueColor)] pub unsafe fn systemBlueColor() -> Id; - #[method_id(systemOrangeColor)] + #[method_id(@__retain_semantics Other systemOrangeColor)] pub unsafe fn systemOrangeColor() -> Id; - #[method_id(systemYellowColor)] + #[method_id(@__retain_semantics Other systemYellowColor)] pub unsafe fn systemYellowColor() -> Id; - #[method_id(systemBrownColor)] + #[method_id(@__retain_semantics Other systemBrownColor)] pub unsafe fn systemBrownColor() -> Id; - #[method_id(systemPinkColor)] + #[method_id(@__retain_semantics Other systemPinkColor)] pub unsafe fn systemPinkColor() -> Id; - #[method_id(systemPurpleColor)] + #[method_id(@__retain_semantics Other systemPurpleColor)] pub unsafe fn systemPurpleColor() -> Id; - #[method_id(systemGrayColor)] + #[method_id(@__retain_semantics Other systemGrayColor)] pub unsafe fn systemGrayColor() -> Id; - #[method_id(systemTealColor)] + #[method_id(@__retain_semantics Other systemTealColor)] pub unsafe fn systemTealColor() -> Id; - #[method_id(systemIndigoColor)] + #[method_id(@__retain_semantics Other systemIndigoColor)] pub unsafe fn systemIndigoColor() -> Id; - #[method_id(systemMintColor)] + #[method_id(@__retain_semantics Other systemMintColor)] pub unsafe fn systemMintColor() -> Id; - #[method_id(systemCyanColor)] + #[method_id(@__retain_semantics Other systemCyanColor)] pub unsafe fn systemCyanColor() -> Id; - #[method_id(controlAccentColor)] + #[method_id(@__retain_semantics Other controlAccentColor)] pub unsafe fn controlAccentColor() -> Id; #[method(currentControlTint)] pub unsafe fn currentControlTint() -> NSControlTint; - #[method_id(colorForControlTint:)] + #[method_id(@__retain_semantics Other colorForControlTint:)] pub unsafe fn colorForControlTint(controlTint: NSControlTint) -> Id; - #[method_id(highlightColor)] + #[method_id(@__retain_semantics Other highlightColor)] pub unsafe fn highlightColor() -> Id; - #[method_id(shadowColor)] + #[method_id(@__retain_semantics Other shadowColor)] pub unsafe fn shadowColor() -> Id; - #[method_id(highlightWithLevel:)] + #[method_id(@__retain_semantics Other highlightWithLevel:)] pub unsafe fn highlightWithLevel(&self, val: CGFloat) -> Option>; - #[method_id(shadowWithLevel:)] + #[method_id(@__retain_semantics Other shadowWithLevel:)] pub unsafe fn shadowWithLevel(&self, val: CGFloat) -> Option>; - #[method_id(colorWithSystemEffect:)] + #[method_id(@__retain_semantics Other colorWithSystemEffect:)] pub unsafe fn colorWithSystemEffect( &self, systemEffect: NSColorSystemEffect, @@ -400,26 +400,26 @@ extern_methods!( #[method(setStroke)] pub unsafe fn setStroke(&self); - #[method_id(blendedColorWithFraction:ofColor:)] + #[method_id(@__retain_semantics Other blendedColorWithFraction:ofColor:)] pub unsafe fn blendedColorWithFraction_ofColor( &self, fraction: CGFloat, color: &NSColor, ) -> Option>; - #[method_id(colorWithAlphaComponent:)] + #[method_id(@__retain_semantics Other colorWithAlphaComponent:)] pub unsafe fn colorWithAlphaComponent(&self, alpha: CGFloat) -> Id; - #[method_id(catalogNameComponent)] + #[method_id(@__retain_semantics Other catalogNameComponent)] pub unsafe fn catalogNameComponent(&self) -> Id; - #[method_id(colorNameComponent)] + #[method_id(@__retain_semantics Other colorNameComponent)] pub unsafe fn colorNameComponent(&self) -> Id; - #[method_id(localizedCatalogNameComponent)] + #[method_id(@__retain_semantics Other localizedCatalogNameComponent)] pub unsafe fn localizedCatalogNameComponent(&self) -> Id; - #[method_id(localizedColorNameComponent)] + #[method_id(@__retain_semantics Other localizedColorNameComponent)] pub unsafe fn localizedColorNameComponent(&self) -> Id; #[method(redComponent)] @@ -486,7 +486,7 @@ extern_methods!( alpha: *mut CGFloat, ); - #[method_id(colorSpace)] + #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Id; #[method(numberOfComponents)] @@ -495,13 +495,13 @@ extern_methods!( #[method(getComponents:)] pub unsafe fn getComponents(&self, components: NonNull); - #[method_id(patternImage)] + #[method_id(@__retain_semantics Other patternImage)] pub unsafe fn patternImage(&self) -> Id; #[method(alphaComponent)] pub unsafe fn alphaComponent(&self) -> CGFloat; - #[method_id(colorFromPasteboard:)] + #[method_id(@__retain_semantics Other colorFromPasteboard:)] pub unsafe fn colorFromPasteboard(pasteBoard: &NSPasteboard) -> Option>; @@ -511,7 +511,7 @@ extern_methods!( #[method(drawSwatchInRect:)] pub unsafe fn drawSwatchInRect(&self, rect: NSRect); - #[method_id(colorWithCGColor:)] + #[method_id(@__retain_semantics Other colorWithCGColor:)] pub unsafe fn colorWithCGColor(cgColor: CGColorRef) -> Option>; #[method(CGColor)] @@ -528,56 +528,56 @@ extern_methods!( extern_methods!( /// NSDeprecated unsafe impl NSColor { - #[method_id(controlHighlightColor)] + #[method_id(@__retain_semantics Other controlHighlightColor)] pub unsafe fn controlHighlightColor() -> Id; - #[method_id(controlLightHighlightColor)] + #[method_id(@__retain_semantics Other controlLightHighlightColor)] pub unsafe fn controlLightHighlightColor() -> Id; - #[method_id(controlShadowColor)] + #[method_id(@__retain_semantics Other controlShadowColor)] pub unsafe fn controlShadowColor() -> Id; - #[method_id(controlDarkShadowColor)] + #[method_id(@__retain_semantics Other controlDarkShadowColor)] pub unsafe fn controlDarkShadowColor() -> Id; - #[method_id(scrollBarColor)] + #[method_id(@__retain_semantics Other scrollBarColor)] pub unsafe fn scrollBarColor() -> Id; - #[method_id(knobColor)] + #[method_id(@__retain_semantics Other knobColor)] pub unsafe fn knobColor() -> Id; - #[method_id(selectedKnobColor)] + #[method_id(@__retain_semantics Other selectedKnobColor)] pub unsafe fn selectedKnobColor() -> Id; - #[method_id(windowFrameColor)] + #[method_id(@__retain_semantics Other windowFrameColor)] pub unsafe fn windowFrameColor() -> Id; - #[method_id(selectedMenuItemColor)] + #[method_id(@__retain_semantics Other selectedMenuItemColor)] pub unsafe fn selectedMenuItemColor() -> Id; - #[method_id(headerColor)] + #[method_id(@__retain_semantics Other headerColor)] pub unsafe fn headerColor() -> Id; - #[method_id(secondarySelectedControlColor)] + #[method_id(@__retain_semantics Other secondarySelectedControlColor)] pub unsafe fn secondarySelectedControlColor() -> Id; - #[method_id(alternateSelectedControlColor)] + #[method_id(@__retain_semantics Other alternateSelectedControlColor)] pub unsafe fn alternateSelectedControlColor() -> Id; - #[method_id(controlAlternatingRowBackgroundColors)] + #[method_id(@__retain_semantics Other controlAlternatingRowBackgroundColors)] pub unsafe fn controlAlternatingRowBackgroundColors() -> Id, Shared>; - #[method_id(colorSpaceName)] + #[method_id(@__retain_semantics Other colorSpaceName)] pub unsafe fn colorSpaceName(&self) -> Id; - #[method_id(colorUsingColorSpaceName:device:)] + #[method_id(@__retain_semantics Other colorUsingColorSpaceName:device:)] pub unsafe fn colorUsingColorSpaceName_device( &self, name: Option<&NSColorSpaceName>, deviceDescription: Option<&NSDictionary>, ) -> Option>; - #[method_id(colorUsingColorSpaceName:)] + #[method_id(@__retain_semantics Other colorUsingColorSpaceName:)] pub unsafe fn colorUsingColorSpaceName( &self, name: &NSColorSpaceName, @@ -588,7 +588,7 @@ extern_methods!( extern_methods!( /// NSQuartzCoreAdditions unsafe impl NSColor { - #[method_id(colorWithCIColor:)] + #[method_id(@__retain_semantics Other colorWithCIColor:)] pub unsafe fn colorWithCIColor(color: &CIColor) -> Id; } ); @@ -596,7 +596,7 @@ extern_methods!( extern_methods!( /// NSAppKitAdditions unsafe impl CIColor { - #[method_id(initWithColor:)] + #[method_id(@__retain_semantics Init initWithColor:)] pub unsafe fn initWithColor( this: Option>, color: &NSColor, @@ -607,7 +607,7 @@ extern_methods!( extern_methods!( /// NSAppKitColorExtensions unsafe impl NSCoder { - #[method_id(decodeNXColor)] + #[method_id(@__retain_semantics Other decodeNXColor)] pub unsafe fn decodeNXColor(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSColorList.rs b/crates/icrate/src/generated/AppKit/NSColorList.rs index 4864bb645..6a9b5bff4 100644 --- a/crates/icrate/src/generated/AppKit/NSColorList.rs +++ b/crates/icrate/src/generated/AppKit/NSColorList.rs @@ -19,26 +19,26 @@ extern_class!( extern_methods!( unsafe impl NSColorList { - #[method_id(availableColorLists)] + #[method_id(@__retain_semantics Other availableColorLists)] pub unsafe fn availableColorLists() -> Id, Shared>; - #[method_id(colorListNamed:)] + #[method_id(@__retain_semantics Other colorListNamed:)] pub unsafe fn colorListNamed(name: &NSColorListName) -> Option>; - #[method_id(initWithName:)] + #[method_id(@__retain_semantics Init initWithName:)] pub unsafe fn initWithName( this: Option>, name: &NSColorListName, ) -> Id; - #[method_id(initWithName:fromFile:)] + #[method_id(@__retain_semantics Init initWithName:fromFile:)] pub unsafe fn initWithName_fromFile( this: Option>, name: &NSColorListName, path: Option<&NSString>, ) -> Option>; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[method(setColor:forKey:)] @@ -55,10 +55,10 @@ extern_methods!( #[method(removeColorWithKey:)] pub unsafe fn removeColorWithKey(&self, key: &NSColorName); - #[method_id(colorWithKey:)] + #[method_id(@__retain_semantics Other colorWithKey:)] pub unsafe fn colorWithKey(&self, key: &NSColorName) -> Option>; - #[method_id(allKeys)] + #[method_id(@__retain_semantics Other allKeys)] pub unsafe fn allKeys(&self) -> Id, Shared>; #[method(isEditable)] diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index de2db8f7e..620d8c27f 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -37,7 +37,7 @@ extern_class!( extern_methods!( unsafe impl NSColorPanel { - #[method_id(sharedColorPanel)] + #[method_id(@__retain_semantics Other sharedColorPanel)] pub unsafe fn sharedColorPanel() -> Id; #[method(sharedColorPanelExists)] @@ -56,7 +56,7 @@ extern_methods!( #[method(setPickerMode:)] pub unsafe fn setPickerMode(mode: NSColorPanelMode); - #[method_id(accessoryView)] + #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[method(setAccessoryView:)] @@ -80,7 +80,7 @@ extern_methods!( #[method(setMode:)] pub unsafe fn setMode(&self, mode: NSColorPanelMode); - #[method_id(color)] + #[method_id(@__retain_semantics Other color)] pub unsafe fn color(&self) -> Id; #[method(setColor:)] diff --git a/crates/icrate/src/generated/AppKit/NSColorPicker.rs b/crates/icrate/src/generated/AppKit/NSColorPicker.rs index ae6f90d55..d4a23f982 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicker.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicker.rs @@ -15,17 +15,17 @@ extern_class!( extern_methods!( unsafe impl NSColorPicker { - #[method_id(initWithPickerMask:colorPanel:)] + #[method_id(@__retain_semantics Init initWithPickerMask:colorPanel:)] pub unsafe fn initWithPickerMask_colorPanel( this: Option>, mask: NSUInteger, owningColorPanel: &NSColorPanel, ) -> Option>; - #[method_id(colorPanel)] + #[method_id(@__retain_semantics Other colorPanel)] pub unsafe fn colorPanel(&self) -> Id; - #[method_id(provideNewButtonImage)] + #[method_id(@__retain_semantics Other provideNewButtonImage)] pub unsafe fn provideNewButtonImage(&self) -> Id; #[method(insertNewButtonImage:in:)] @@ -47,7 +47,7 @@ extern_methods!( #[method(setMode:)] pub unsafe fn setMode(&self, mode: NSColorPanelMode); - #[method_id(buttonToolTip)] + #[method_id(@__retain_semantics Other buttonToolTip)] pub unsafe fn buttonToolTip(&self) -> Id; #[method(minContentSize)] diff --git a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs index 5aca76f42..9f97c39b3 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs @@ -15,28 +15,28 @@ extern_class!( extern_methods!( unsafe impl NSColorPickerTouchBarItem { - #[method_id(colorPickerWithIdentifier:)] + #[method_id(@__retain_semantics Other colorPickerWithIdentifier:)] pub unsafe fn colorPickerWithIdentifier( identifier: &NSTouchBarItemIdentifier, ) -> Id; - #[method_id(textColorPickerWithIdentifier:)] + #[method_id(@__retain_semantics Other textColorPickerWithIdentifier:)] pub unsafe fn textColorPickerWithIdentifier( identifier: &NSTouchBarItemIdentifier, ) -> Id; - #[method_id(strokeColorPickerWithIdentifier:)] + #[method_id(@__retain_semantics Other strokeColorPickerWithIdentifier:)] pub unsafe fn strokeColorPickerWithIdentifier( identifier: &NSTouchBarItemIdentifier, ) -> Id; - #[method_id(colorPickerWithIdentifier:buttonImage:)] + #[method_id(@__retain_semantics Other colorPickerWithIdentifier:buttonImage:)] pub unsafe fn colorPickerWithIdentifier_buttonImage( identifier: &NSTouchBarItemIdentifier, image: &NSImage, ) -> Id; - #[method_id(color)] + #[method_id(@__retain_semantics Other color)] pub unsafe fn color(&self) -> Id; #[method(setColor:)] @@ -48,7 +48,7 @@ extern_methods!( #[method(setShowsAlpha:)] pub unsafe fn setShowsAlpha(&self, showsAlpha: bool); - #[method_id(allowedColorSpaces)] + #[method_id(@__retain_semantics Other allowedColorSpaces)] pub unsafe fn allowedColorSpaces(&self) -> Option, Shared>>; #[method(setAllowedColorSpaces:)] @@ -57,19 +57,19 @@ extern_methods!( allowedColorSpaces: Option<&NSArray>, ); - #[method_id(colorList)] + #[method_id(@__retain_semantics Other colorList)] pub unsafe fn colorList(&self) -> Option>; #[method(setColorList:)] pub unsafe fn setColorList(&self, colorList: Option<&NSColorList>); - #[method_id(customizationLabel)] + #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index ccb87b667..029060b40 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -25,16 +25,16 @@ extern_class!( extern_methods!( unsafe impl NSColorSpace { - #[method_id(initWithICCProfileData:)] + #[method_id(@__retain_semantics Init initWithICCProfileData:)] pub unsafe fn initWithICCProfileData( this: Option>, iccData: &NSData, ) -> Option>; - #[method_id(ICCProfileData)] + #[method_id(@__retain_semantics Other ICCProfileData)] pub unsafe fn ICCProfileData(&self) -> Option>; - #[method_id(initWithColorSyncProfile:)] + #[method_id(@__retain_semantics Init initWithColorSyncProfile:)] pub unsafe fn initWithColorSyncProfile( this: Option>, prof: NonNull, @@ -43,7 +43,7 @@ extern_methods!( #[method(colorSyncProfile)] pub unsafe fn colorSyncProfile(&self) -> *mut c_void; - #[method_id(initWithCGColorSpace:)] + #[method_id(@__retain_semantics Init initWithCGColorSpace:)] pub unsafe fn initWithCGColorSpace( this: Option>, cgColorSpace: CGColorSpaceRef, @@ -58,46 +58,46 @@ extern_methods!( #[method(colorSpaceModel)] pub unsafe fn colorSpaceModel(&self) -> NSColorSpaceModel; - #[method_id(localizedName)] + #[method_id(@__retain_semantics Other localizedName)] pub unsafe fn localizedName(&self) -> Option>; - #[method_id(sRGBColorSpace)] + #[method_id(@__retain_semantics Other sRGBColorSpace)] pub unsafe fn sRGBColorSpace() -> Id; - #[method_id(genericGamma22GrayColorSpace)] + #[method_id(@__retain_semantics Other genericGamma22GrayColorSpace)] pub unsafe fn genericGamma22GrayColorSpace() -> Id; - #[method_id(extendedSRGBColorSpace)] + #[method_id(@__retain_semantics Other extendedSRGBColorSpace)] pub unsafe fn extendedSRGBColorSpace() -> Id; - #[method_id(extendedGenericGamma22GrayColorSpace)] + #[method_id(@__retain_semantics Other extendedGenericGamma22GrayColorSpace)] pub unsafe fn extendedGenericGamma22GrayColorSpace() -> Id; - #[method_id(displayP3ColorSpace)] + #[method_id(@__retain_semantics Other displayP3ColorSpace)] pub unsafe fn displayP3ColorSpace() -> Id; - #[method_id(adobeRGB1998ColorSpace)] + #[method_id(@__retain_semantics Other adobeRGB1998ColorSpace)] pub unsafe fn adobeRGB1998ColorSpace() -> Id; - #[method_id(genericRGBColorSpace)] + #[method_id(@__retain_semantics Other genericRGBColorSpace)] pub unsafe fn genericRGBColorSpace() -> Id; - #[method_id(genericGrayColorSpace)] + #[method_id(@__retain_semantics Other genericGrayColorSpace)] pub unsafe fn genericGrayColorSpace() -> Id; - #[method_id(genericCMYKColorSpace)] + #[method_id(@__retain_semantics Other genericCMYKColorSpace)] pub unsafe fn genericCMYKColorSpace() -> Id; - #[method_id(deviceRGBColorSpace)] + #[method_id(@__retain_semantics Other deviceRGBColorSpace)] pub unsafe fn deviceRGBColorSpace() -> Id; - #[method_id(deviceGrayColorSpace)] + #[method_id(@__retain_semantics Other deviceGrayColorSpace)] pub unsafe fn deviceGrayColorSpace() -> Id; - #[method_id(deviceCMYKColorSpace)] + #[method_id(@__retain_semantics Other deviceCMYKColorSpace)] pub unsafe fn deviceCMYKColorSpace() -> Id; - #[method_id(availableColorSpacesWithModel:)] + #[method_id(@__retain_semantics Other availableColorSpacesWithModel:)] pub unsafe fn availableColorSpacesWithModel( model: NSColorSpaceModel, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSColorWell.rs b/crates/icrate/src/generated/AppKit/NSColorWell.rs index 36e1e81ab..5be8a6012 100644 --- a/crates/icrate/src/generated/AppKit/NSColorWell.rs +++ b/crates/icrate/src/generated/AppKit/NSColorWell.rs @@ -36,7 +36,7 @@ extern_methods!( #[method(takeColorFrom:)] pub unsafe fn takeColorFrom(&self, sender: Option<&Object>); - #[method_id(color)] + #[method_id(@__retain_semantics Other color)] pub unsafe fn color(&self) -> Id; #[method(setColor:)] diff --git a/crates/icrate/src/generated/AppKit/NSComboBox.rs b/crates/icrate/src/generated/AppKit/NSComboBox.rs index 16bd2f89b..03162ce43 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBox.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBox.rs @@ -101,13 +101,13 @@ extern_methods!( #[method(setCompletes:)] pub unsafe fn setCompletes(&self, completes: bool); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSComboBoxDelegate>); - #[method_id(dataSource)] + #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>; #[method(setDataSource:)] @@ -134,16 +134,16 @@ extern_methods!( #[method(selectItemWithObjectValue:)] pub unsafe fn selectItemWithObjectValue(&self, object: Option<&Object>); - #[method_id(itemObjectValueAtIndex:)] + #[method_id(@__retain_semantics Other itemObjectValueAtIndex:)] pub unsafe fn itemObjectValueAtIndex(&self, index: NSInteger) -> Id; - #[method_id(objectValueOfSelectedItem)] + #[method_id(@__retain_semantics Other objectValueOfSelectedItem)] pub unsafe fn objectValueOfSelectedItem(&self) -> Option>; #[method(indexOfItemWithObjectValue:)] pub unsafe fn indexOfItemWithObjectValue(&self, object: &Object) -> NSInteger; - #[method_id(objectValues)] + #[method_id(@__retain_semantics Other objectValues)] pub unsafe fn objectValues(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs index 670c186e5..b2b131a8e 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs @@ -81,10 +81,10 @@ extern_methods!( #[method(setCompletes:)] pub unsafe fn setCompletes(&self, completes: bool); - #[method_id(completedString:)] + #[method_id(@__retain_semantics Other completedString:)] pub unsafe fn completedString(&self, string: &NSString) -> Option>; - #[method_id(dataSource)] + #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>; #[method(setDataSource:)] @@ -111,16 +111,16 @@ extern_methods!( #[method(selectItemWithObjectValue:)] pub unsafe fn selectItemWithObjectValue(&self, object: Option<&Object>); - #[method_id(itemObjectValueAtIndex:)] + #[method_id(@__retain_semantics Other itemObjectValueAtIndex:)] pub unsafe fn itemObjectValueAtIndex(&self, index: NSInteger) -> Id; - #[method_id(objectValueOfSelectedItem)] + #[method_id(@__retain_semantics Other objectValueOfSelectedItem)] pub unsafe fn objectValueOfSelectedItem(&self) -> Option>; #[method(indexOfItemWithObjectValue:)] pub unsafe fn indexOfItemWithObjectValue(&self, object: &Object) -> NSInteger; - #[method_id(objectValues)] + #[method_id(@__retain_semantics Other objectValues)] pub unsafe fn objectValues(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index 2ba82c840..30d1bbca4 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -15,19 +15,19 @@ extern_class!( extern_methods!( unsafe impl NSControl { - #[method_id(initWithFrame:)] + #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame( this: Option>, frameRect: NSRect, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] @@ -81,25 +81,25 @@ extern_methods!( #[method(setControlSize:)] pub unsafe fn setControlSize(&self, controlSize: NSControlSize); - #[method_id(formatter)] + #[method_id(@__retain_semantics Other formatter)] pub unsafe fn formatter(&self) -> Option>; #[method(setFormatter:)] pub unsafe fn setFormatter(&self, formatter: Option<&NSFormatter>); - #[method_id(objectValue)] + #[method_id(@__retain_semantics Other objectValue)] pub unsafe fn objectValue(&self) -> Option>; #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); - #[method_id(stringValue)] + #[method_id(@__retain_semantics Other stringValue)] pub unsafe fn stringValue(&self) -> Id; #[method(setStringValue:)] pub unsafe fn setStringValue(&self, stringValue: &NSString); - #[method_id(attributedStringValue)] + #[method_id(@__retain_semantics Other attributedStringValue)] pub unsafe fn attributedStringValue(&self) -> Id; #[method(setAttributedStringValue:)] @@ -165,7 +165,7 @@ extern_methods!( #[method(performClick:)] pub unsafe fn performClick(&self, sender: Option<&Object>); - #[method_id(font)] + #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Option>; #[method(setFont:)] @@ -212,7 +212,7 @@ extern_methods!( extern_methods!( /// NSControlEditableTextMethods unsafe impl NSControl { - #[method_id(currentEditor)] + #[method_id(@__retain_semantics Other currentEditor)] pub unsafe fn currentEditor(&self) -> Option>; #[method(abortEditing)] @@ -276,13 +276,13 @@ extern_methods!( #[method(setCellClass:)] pub unsafe fn setCellClass(cellClass: Option<&Class>); - #[method_id(cell)] + #[method_id(@__retain_semantics Other cell)] pub unsafe fn cell(&self) -> Option>; #[method(setCell:)] pub unsafe fn setCell(&self, cell: Option<&NSCell>); - #[method_id(selectedCell)] + #[method_id(@__retain_semantics Other selectedCell)] pub unsafe fn selectedCell(&self) -> Option>; #[method(selectedTag)] diff --git a/crates/icrate/src/generated/AppKit/NSController.rs b/crates/icrate/src/generated/AppKit/NSController.rs index 6ec57085a..4eb29a662 100644 --- a/crates/icrate/src/generated/AppKit/NSController.rs +++ b/crates/icrate/src/generated/AppKit/NSController.rs @@ -15,10 +15,10 @@ extern_class!( extern_methods!( unsafe impl NSController { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs index 575e4388f..68f81aa66 100644 --- a/crates/icrate/src/generated/AppKit/NSCursor.rs +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -15,74 +15,74 @@ extern_class!( extern_methods!( unsafe impl NSCursor { - #[method_id(currentCursor)] + #[method_id(@__retain_semantics Other currentCursor)] pub unsafe fn currentCursor() -> Id; - #[method_id(currentSystemCursor)] + #[method_id(@__retain_semantics Other currentSystemCursor)] pub unsafe fn currentSystemCursor() -> Option>; - #[method_id(arrowCursor)] + #[method_id(@__retain_semantics Other arrowCursor)] pub unsafe fn arrowCursor() -> Id; - #[method_id(IBeamCursor)] + #[method_id(@__retain_semantics Other IBeamCursor)] pub unsafe fn IBeamCursor() -> Id; - #[method_id(pointingHandCursor)] + #[method_id(@__retain_semantics Other pointingHandCursor)] pub unsafe fn pointingHandCursor() -> Id; - #[method_id(closedHandCursor)] + #[method_id(@__retain_semantics Other closedHandCursor)] pub unsafe fn closedHandCursor() -> Id; - #[method_id(openHandCursor)] + #[method_id(@__retain_semantics Other openHandCursor)] pub unsafe fn openHandCursor() -> Id; - #[method_id(resizeLeftCursor)] + #[method_id(@__retain_semantics Other resizeLeftCursor)] pub unsafe fn resizeLeftCursor() -> Id; - #[method_id(resizeRightCursor)] + #[method_id(@__retain_semantics Other resizeRightCursor)] pub unsafe fn resizeRightCursor() -> Id; - #[method_id(resizeLeftRightCursor)] + #[method_id(@__retain_semantics Other resizeLeftRightCursor)] pub unsafe fn resizeLeftRightCursor() -> Id; - #[method_id(resizeUpCursor)] + #[method_id(@__retain_semantics Other resizeUpCursor)] pub unsafe fn resizeUpCursor() -> Id; - #[method_id(resizeDownCursor)] + #[method_id(@__retain_semantics Other resizeDownCursor)] pub unsafe fn resizeDownCursor() -> Id; - #[method_id(resizeUpDownCursor)] + #[method_id(@__retain_semantics Other resizeUpDownCursor)] pub unsafe fn resizeUpDownCursor() -> Id; - #[method_id(crosshairCursor)] + #[method_id(@__retain_semantics Other crosshairCursor)] pub unsafe fn crosshairCursor() -> Id; - #[method_id(disappearingItemCursor)] + #[method_id(@__retain_semantics Other disappearingItemCursor)] pub unsafe fn disappearingItemCursor() -> Id; - #[method_id(operationNotAllowedCursor)] + #[method_id(@__retain_semantics Other operationNotAllowedCursor)] pub unsafe fn operationNotAllowedCursor() -> Id; - #[method_id(dragLinkCursor)] + #[method_id(@__retain_semantics Other dragLinkCursor)] pub unsafe fn dragLinkCursor() -> Id; - #[method_id(dragCopyCursor)] + #[method_id(@__retain_semantics Other dragCopyCursor)] pub unsafe fn dragCopyCursor() -> Id; - #[method_id(contextualMenuCursor)] + #[method_id(@__retain_semantics Other contextualMenuCursor)] pub unsafe fn contextualMenuCursor() -> Id; - #[method_id(IBeamCursorForVerticalLayout)] + #[method_id(@__retain_semantics Other IBeamCursorForVerticalLayout)] pub unsafe fn IBeamCursorForVerticalLayout() -> Id; - #[method_id(initWithImage:hotSpot:)] + #[method_id(@__retain_semantics Init initWithImage:hotSpot:)] pub unsafe fn initWithImage_hotSpot( this: Option>, newImage: &NSImage, point: NSPoint, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -100,7 +100,7 @@ extern_methods!( #[method(pop)] pub unsafe fn pop(); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Id; #[method(hotSpot)] @@ -122,7 +122,7 @@ pub static NSAppKitVersionNumberWithCursorSizeSupport: NSAppKitVersion = 682.0; extern_methods!( /// NSDeprecated unsafe impl NSCursor { - #[method_id(initWithImage:foregroundColorHint:backgroundColorHint:hotSpot:)] + #[method_id(@__retain_semantics Init initWithImage:foregroundColorHint:backgroundColorHint:hotSpot:)] pub unsafe fn initWithImage_foregroundColorHint_backgroundColorHint_hotSpot( this: Option>, newImage: &NSImage, diff --git a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs index 63f4dae3d..c6d972325 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSCustomImageRep { - #[method_id(initWithSize:flipped:drawingHandler:)] + #[method_id(@__retain_semantics Init initWithSize:flipped:drawingHandler:)] pub unsafe fn initWithSize_flipped_drawingHandler( this: Option>, size: NSSize, @@ -26,7 +26,7 @@ extern_methods!( #[method(drawingHandler)] pub unsafe fn drawingHandler(&self) -> TodoBlock; - #[method_id(initWithDrawSelector:delegate:)] + #[method_id(@__retain_semantics Init initWithDrawSelector:delegate:)] pub unsafe fn initWithDrawSelector_delegate( this: Option>, selector: Sel, @@ -36,7 +36,7 @@ extern_methods!( #[method(drawSelector)] pub unsafe fn drawSelector(&self) -> Option; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs index 507f52be0..ff26ed4a1 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs @@ -15,19 +15,19 @@ extern_class!( extern_methods!( unsafe impl NSCustomTouchBarItem { - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Id; #[method(setView:)] pub unsafe fn setView(&self, view: &NSView); - #[method_id(viewController)] + #[method_id(@__retain_semantics Other viewController)] pub unsafe fn viewController(&self) -> Option>; #[method(setViewController:)] pub unsafe fn setViewController(&self, viewController: Option<&NSViewController>); - #[method_id(customizationLabel)] + #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[method(setCustomizationLabel:)] diff --git a/crates/icrate/src/generated/AppKit/NSDataAsset.rs b/crates/icrate/src/generated/AppKit/NSDataAsset.rs index f1258e932..c1aca393c 100644 --- a/crates/icrate/src/generated/AppKit/NSDataAsset.rs +++ b/crates/icrate/src/generated/AppKit/NSDataAsset.rs @@ -17,29 +17,29 @@ extern_class!( extern_methods!( unsafe impl NSDataAsset { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithName:)] + #[method_id(@__retain_semantics Init initWithName:)] pub unsafe fn initWithName( this: Option>, name: &NSDataAssetName, ) -> Option>; - #[method_id(initWithName:bundle:)] + #[method_id(@__retain_semantics Init initWithName:bundle:)] pub unsafe fn initWithName_bundle( this: Option>, name: &NSDataAssetName, bundle: &NSBundle, ) -> Option>; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; - #[method_id(data)] + #[method_id(@__retain_semantics Other data)] pub unsafe fn data(&self) -> Id; - #[method_id(typeIdentifier)] + #[method_id(@__retain_semantics Other typeIdentifier)] pub unsafe fn typeIdentifier(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSDatePicker.rs b/crates/icrate/src/generated/AppKit/NSDatePicker.rs index 8d175fab0..9c392112b 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePicker.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePicker.rs @@ -39,13 +39,13 @@ extern_methods!( #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); - #[method_id(textColor)] + #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor(&self) -> Id; #[method(setTextColor:)] @@ -63,25 +63,25 @@ extern_methods!( #[method(setDatePickerElements:)] pub unsafe fn setDatePickerElements(&self, datePickerElements: NSDatePickerElementFlags); - #[method_id(calendar)] + #[method_id(@__retain_semantics Other calendar)] pub unsafe fn calendar(&self) -> Option>; #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Option>; #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); - #[method_id(timeZone)] + #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Option>; #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); - #[method_id(dateValue)] + #[method_id(@__retain_semantics Other dateValue)] pub unsafe fn dateValue(&self) -> Id; #[method(setDateValue:)] @@ -93,13 +93,13 @@ extern_methods!( #[method(setTimeInterval:)] pub unsafe fn setTimeInterval(&self, timeInterval: NSTimeInterval); - #[method_id(minDate)] + #[method_id(@__retain_semantics Other minDate)] pub unsafe fn minDate(&self) -> Option>; #[method(setMinDate:)] pub unsafe fn setMinDate(&self, minDate: Option<&NSDate>); - #[method_id(maxDate)] + #[method_id(@__retain_semantics Other maxDate)] pub unsafe fn maxDate(&self) -> Option>; #[method(setMaxDate:)] @@ -111,7 +111,7 @@ extern_methods!( #[method(setPresentsCalendarOverlay:)] pub unsafe fn setPresentsCalendarOverlay(&self, presentsCalendarOverlay: bool); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index f1f4a2690..682d609ad 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -32,19 +32,19 @@ extern_class!( extern_methods!( unsafe impl NSDatePickerCell { - #[method_id(initTextCell:)] + #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell( this: Option>, string: &NSString, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(initImageCell:)] + #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, image: Option<&NSImage>, @@ -62,13 +62,13 @@ extern_methods!( #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); - #[method_id(textColor)] + #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor(&self) -> Id; #[method(setTextColor:)] @@ -86,25 +86,25 @@ extern_methods!( #[method(setDatePickerElements:)] pub unsafe fn setDatePickerElements(&self, datePickerElements: NSDatePickerElementFlags); - #[method_id(calendar)] + #[method_id(@__retain_semantics Other calendar)] pub unsafe fn calendar(&self) -> Option>; #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Option>; #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); - #[method_id(timeZone)] + #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Option>; #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); - #[method_id(dateValue)] + #[method_id(@__retain_semantics Other dateValue)] pub unsafe fn dateValue(&self) -> Id; #[method(setDateValue:)] @@ -116,19 +116,19 @@ extern_methods!( #[method(setTimeInterval:)] pub unsafe fn setTimeInterval(&self, timeInterval: NSTimeInterval); - #[method_id(minDate)] + #[method_id(@__retain_semantics Other minDate)] pub unsafe fn minDate(&self) -> Option>; #[method(setMinDate:)] pub unsafe fn setMinDate(&self, minDate: Option<&NSDate>); - #[method_id(maxDate)] + #[method_id(@__retain_semantics Other maxDate)] pub unsafe fn maxDate(&self) -> Option>; #[method(setMaxDate:)] pub unsafe fn setMaxDate(&self, maxDate: Option<&NSDate>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] diff --git a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs index 25a3984b7..afdde83e9 100644 --- a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs +++ b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs @@ -15,22 +15,22 @@ extern_class!( extern_methods!( unsafe impl NSDictionaryControllerKeyValuePair { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(key)] + #[method_id(@__retain_semantics Other key)] pub unsafe fn key(&self) -> Option>; #[method(setKey:)] pub unsafe fn setKey(&self, key: Option<&NSString>); - #[method_id(value)] + #[method_id(@__retain_semantics Other value)] pub unsafe fn value(&self) -> Option>; #[method(setValue:)] pub unsafe fn setValue(&self, value: Option<&Object>); - #[method_id(localizedKey)] + #[method_id(@__retain_semantics Other localizedKey)] pub unsafe fn localizedKey(&self) -> Option>; #[method(setLocalizedKey:)] @@ -52,34 +52,34 @@ extern_class!( extern_methods!( unsafe impl NSDictionaryController { - #[method_id(newObject)] + #[method_id(@__retain_semantics New newObject)] pub unsafe fn newObject(&self) -> Id; - #[method_id(initialKey)] + #[method_id(@__retain_semantics Other initialKey)] pub unsafe fn initialKey(&self) -> Id; #[method(setInitialKey:)] pub unsafe fn setInitialKey(&self, initialKey: &NSString); - #[method_id(initialValue)] + #[method_id(@__retain_semantics Other initialValue)] pub unsafe fn initialValue(&self) -> Id; #[method(setInitialValue:)] pub unsafe fn setInitialValue(&self, initialValue: &Object); - #[method_id(includedKeys)] + #[method_id(@__retain_semantics Other includedKeys)] pub unsafe fn includedKeys(&self) -> Id, Shared>; #[method(setIncludedKeys:)] pub unsafe fn setIncludedKeys(&self, includedKeys: &NSArray); - #[method_id(excludedKeys)] + #[method_id(@__retain_semantics Other excludedKeys)] pub unsafe fn excludedKeys(&self) -> Id, Shared>; #[method(setExcludedKeys:)] pub unsafe fn setExcludedKeys(&self, excludedKeys: &NSArray); - #[method_id(localizedKeyDictionary)] + #[method_id(@__retain_semantics Other localizedKeyDictionary)] pub unsafe fn localizedKeyDictionary(&self) -> Id, Shared>; @@ -89,7 +89,7 @@ extern_methods!( localizedKeyDictionary: &NSDictionary, ); - #[method_id(localizedKeyTable)] + #[method_id(@__retain_semantics Other localizedKeyTable)] pub unsafe fn localizedKeyTable(&self) -> Option>; #[method(setLocalizedKeyTable:)] diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index d08705b40..6575f5f1a 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -31,10 +31,10 @@ extern_methods!( #[method(numberOfSections)] pub unsafe fn numberOfSections(&self) -> NSInteger; - #[method_id(sectionIdentifiers)] + #[method_id(@__retain_semantics Other sectionIdentifiers)] pub unsafe fn sectionIdentifiers(&self) -> Id, Shared>; - #[method_id(itemIdentifiers)] + #[method_id(@__retain_semantics Other itemIdentifiers)] pub unsafe fn itemIdentifiers(&self) -> Id, Shared>; #[method(numberOfItemsInSection:)] @@ -43,13 +43,13 @@ extern_methods!( sectionIdentifier: &SectionIdentifierType, ) -> NSInteger; - #[method_id(itemIdentifiersInSectionWithIdentifier:)] + #[method_id(@__retain_semantics Other itemIdentifiersInSectionWithIdentifier:)] pub unsafe fn itemIdentifiersInSectionWithIdentifier( &self, sectionIdentifier: &SectionIdentifierType, ) -> Id, Shared>; - #[method_id(sectionIdentifierForSectionContainingItemIdentifier:)] + #[method_id(@__retain_semantics Other sectionIdentifierForSectionContainingItemIdentifier:)] pub unsafe fn sectionIdentifierForSectionContainingItemIdentifier( &self, itemIdentifier: &ItemIdentifierType, @@ -180,20 +180,20 @@ extern_methods!( unsafe impl NSCollectionViewDiffableDataSource { - #[method_id(initWithCollectionView:itemProvider:)] + #[method_id(@__retain_semantics Init initWithCollectionView:itemProvider:)] pub unsafe fn initWithCollectionView_itemProvider( this: Option>, collectionView: &NSCollectionView, itemProvider: NSCollectionViewDiffableDataSourceItemProvider, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(snapshot)] + #[method_id(@__retain_semantics Other snapshot)] pub unsafe fn snapshot( &self, ) -> Id, Shared>; @@ -205,13 +205,13 @@ extern_methods!( animatingDifferences: bool, ); - #[method_id(itemIdentifierForIndexPath:)] + #[method_id(@__retain_semantics Other itemIdentifierForIndexPath:)] pub unsafe fn itemIdentifierForIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; - #[method_id(indexPathForItemIdentifier:)] + #[method_id(@__retain_semantics Other indexPathForItemIdentifier:)] pub unsafe fn indexPathForItemIdentifier( &self, identifier: &ItemIdentifierType, diff --git a/crates/icrate/src/generated/AppKit/NSDockTile.rs b/crates/icrate/src/generated/AppKit/NSDockTile.rs index 8c430f5f8..f0f3d0f36 100644 --- a/crates/icrate/src/generated/AppKit/NSDockTile.rs +++ b/crates/icrate/src/generated/AppKit/NSDockTile.rs @@ -20,7 +20,7 @@ extern_methods!( #[method(size)] pub unsafe fn size(&self) -> NSSize; - #[method_id(contentView)] + #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Option>; #[method(setContentView:)] @@ -35,13 +35,13 @@ extern_methods!( #[method(setShowsApplicationBadge:)] pub unsafe fn setShowsApplicationBadge(&self, showsApplicationBadge: bool); - #[method_id(badgeLabel)] + #[method_id(@__retain_semantics Other badgeLabel)] pub unsafe fn badgeLabel(&self) -> Option>; #[method(setBadgeLabel:)] pub unsafe fn setBadgeLabel(&self, badgeLabel: Option<&NSString>); - #[method_id(owner)] + #[method_id(@__retain_semantics Other owner)] pub unsafe fn owner(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index ac4a87ae9..0e87fcfda 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -33,10 +33,10 @@ extern_class!( extern_methods!( unsafe impl NSDocument { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithType:error:)] + #[method_id(@__retain_semantics Init initWithType:error:)] pub unsafe fn initWithType_error( this: Option>, typeName: &NSString, @@ -45,14 +45,14 @@ extern_methods!( #[method(canConcurrentlyReadDocumentsOfType:)] pub unsafe fn canConcurrentlyReadDocumentsOfType(typeName: &NSString) -> bool; - #[method_id(initWithContentsOfURL:ofType:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:ofType:error:)] pub unsafe fn initWithContentsOfURL_ofType_error( this: Option>, url: &NSURL, typeName: &NSString, ) -> Result, Id>; - #[method_id(initForURL:withContentsOfURL:ofType:error:)] + #[method_id(@__retain_semantics Init initForURL:withContentsOfURL:ofType:error:)] pub unsafe fn initForURL_withContentsOfURL_ofType_error( this: Option>, urlOrNil: Option<&NSURL>, @@ -60,19 +60,19 @@ extern_methods!( typeName: &NSString, ) -> Result, Id>; - #[method_id(fileType)] + #[method_id(@__retain_semantics Other fileType)] pub unsafe fn fileType(&self) -> Option>; #[method(setFileType:)] pub unsafe fn setFileType(&self, fileType: Option<&NSString>); - #[method_id(fileURL)] + #[method_id(@__retain_semantics Other fileURL)] pub unsafe fn fileURL(&self) -> Option>; #[method(setFileURL:)] pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>); - #[method_id(fileModificationDate)] + #[method_id(@__retain_semantics Other fileModificationDate)] pub unsafe fn fileModificationDate(&self) -> Option>; #[method(setFileModificationDate:)] @@ -144,13 +144,13 @@ extern_methods!( typeName: &NSString, ) -> Result<(), Id>; - #[method_id(fileWrapperOfType:error:)] + #[method_id(@__retain_semantics Other fileWrapperOfType:error:)] pub unsafe fn fileWrapperOfType_error( &self, typeName: &NSString, ) -> Result, Id>; - #[method_id(dataOfType:error:)] + #[method_id(@__retain_semantics Other dataOfType:error:)] pub unsafe fn dataOfType_error( &self, typeName: &NSString, @@ -179,7 +179,7 @@ extern_methods!( absoluteOriginalContentsURL: Option<&NSURL>, ) -> Result<(), Id>; - #[method_id(fileAttributesToWriteToURL:ofType:forSaveOperation:originalContentsURL:error:)] + #[method_id(@__retain_semantics Other fileAttributesToWriteToURL:ofType:forSaveOperation:originalContentsURL:error:)] pub unsafe fn fileAttributesToWriteToURL_ofType_forSaveOperation_originalContentsURL_error( &self, url: &NSURL, @@ -191,7 +191,7 @@ extern_methods!( #[method(keepBackupFile)] pub unsafe fn keepBackupFile(&self) -> bool; - #[method_id(backupFileURL)] + #[method_id(@__retain_semantics Other backupFileURL)] pub unsafe fn backupFileURL(&self) -> Option>; #[method(saveDocument:)] @@ -229,7 +229,7 @@ extern_methods!( #[method(fileNameExtensionWasHiddenInLastRunSavePanel)] pub unsafe fn fileNameExtensionWasHiddenInLastRunSavePanel(&self) -> bool; - #[method_id(fileTypeFromLastRunSavePanel)] + #[method_id(@__retain_semantics Other fileTypeFromLastRunSavePanel)] pub unsafe fn fileTypeFromLastRunSavePanel(&self) -> Option>; #[method(saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:)] @@ -306,10 +306,10 @@ extern_methods!( #[method(autosavesDrafts)] pub unsafe fn autosavesDrafts() -> bool; - #[method_id(autosavingFileType)] + #[method_id(@__retain_semantics Other autosavingFileType)] pub unsafe fn autosavingFileType(&self) -> Option>; - #[method_id(autosavedContentsFileURL)] + #[method_id(@__retain_semantics Other autosavedContentsFileURL)] pub unsafe fn autosavedContentsFileURL(&self) -> Option>; #[method(setAutosavedContentsFileURL:)] @@ -337,7 +337,7 @@ extern_methods!( contextInfo: *mut c_void, ); - #[method_id(duplicateAndReturnError:)] + #[method_id(@__retain_semantics Other duplicateAndReturnError:)] pub unsafe fn duplicateAndReturnError( &self, ) -> Result, Id>; @@ -396,7 +396,7 @@ extern_methods!( #[method(shouldChangePrintInfo:)] pub unsafe fn shouldChangePrintInfo(&self, newPrintInfo: &NSPrintInfo) -> bool; - #[method_id(printInfo)] + #[method_id(@__retain_semantics Other printInfo)] pub unsafe fn printInfo(&self) -> Id; #[method(setPrintInfo:)] @@ -415,7 +415,7 @@ extern_methods!( contextInfo: *mut c_void, ); - #[method_id(printOperationWithSettings:error:)] + #[method_id(@__retain_semantics Other printOperationWithSettings:error:)] pub unsafe fn printOperationWithSettings_error( &self, printSettings: &NSDictionary, @@ -433,7 +433,7 @@ extern_methods!( #[method(saveDocumentToPDF:)] pub unsafe fn saveDocumentToPDF(&self, sender: Option<&Object>); - #[method_id(PDFPrintOperation)] + #[method_id(@__retain_semantics Other PDFPrintOperation)] pub unsafe fn PDFPrintOperation(&self) -> Id; #[method(allowsDocumentSharing)] @@ -461,7 +461,7 @@ extern_methods!( #[method(updateChangeCount:)] pub unsafe fn updateChangeCount(&self, change: NSDocumentChangeType); - #[method_id(changeCountTokenForSaveOperation:)] + #[method_id(@__retain_semantics Other changeCountTokenForSaveOperation:)] pub unsafe fn changeCountTokenForSaveOperation( &self, saveOperation: NSSaveOperationType, @@ -474,7 +474,7 @@ extern_methods!( saveOperation: NSSaveOperationType, ); - #[method_id(undoManager)] + #[method_id(@__retain_semantics Other undoManager)] pub unsafe fn undoManager(&self) -> Option>; #[method(setUndoManager:)] @@ -499,7 +499,7 @@ extern_methods!( #[method(presentError:)] pub unsafe fn presentError(&self, error: &NSError) -> bool; - #[method_id(willPresentError:)] + #[method_id(@__retain_semantics Other willPresentError:)] pub unsafe fn willPresentError(&self, error: &NSError) -> Id; #[method(willNotPresentError:)] @@ -508,7 +508,7 @@ extern_methods!( #[method(makeWindowControllers)] pub unsafe fn makeWindowControllers(&self); - #[method_id(windowNibName)] + #[method_id(@__retain_semantics Other windowNibName)] pub unsafe fn windowNibName(&self) -> Option>; #[method(windowControllerWillLoadNib:)] @@ -529,7 +529,7 @@ extern_methods!( #[method(showWindows)] pub unsafe fn showWindows(&self); - #[method_id(windowControllers)] + #[method_id(@__retain_semantics Other windowControllers)] pub unsafe fn windowControllers(&self) -> Id, Shared>; #[method(shouldCloseWindowController:delegate:shouldCloseSelector:contextInfo:)] @@ -541,34 +541,34 @@ extern_methods!( contextInfo: *mut c_void, ); - #[method_id(displayName)] + #[method_id(@__retain_semantics Other displayName)] pub unsafe fn displayName(&self) -> Id; #[method(setDisplayName:)] pub unsafe fn setDisplayName(&self, displayName: Option<&NSString>); - #[method_id(defaultDraftName)] + #[method_id(@__retain_semantics Other defaultDraftName)] pub unsafe fn defaultDraftName(&self) -> Id; - #[method_id(windowForSheet)] + #[method_id(@__retain_semantics Other windowForSheet)] pub unsafe fn windowForSheet(&self) -> Option>; - #[method_id(readableTypes)] + #[method_id(@__retain_semantics Other readableTypes)] pub unsafe fn readableTypes() -> Id, Shared>; - #[method_id(writableTypes)] + #[method_id(@__retain_semantics Other writableTypes)] pub unsafe fn writableTypes() -> Id, Shared>; #[method(isNativeType:)] pub unsafe fn isNativeType(type_: &NSString) -> bool; - #[method_id(writableTypesForSaveOperation:)] + #[method_id(@__retain_semantics Other writableTypesForSaveOperation:)] pub unsafe fn writableTypesForSaveOperation( &self, saveOperation: NSSaveOperationType, ) -> Id, Shared>; - #[method_id(fileNameExtensionForType:saveOperation:)] + #[method_id(@__retain_semantics Other fileNameExtensionForType:saveOperation:)] pub unsafe fn fileNameExtensionForType_saveOperation( &self, typeName: &NSString, @@ -595,13 +595,13 @@ extern_methods!( saveOperation: NSSaveOperationType, ) -> Result<(), Id>; - #[method_id(dataRepresentationOfType:)] + #[method_id(@__retain_semantics Other dataRepresentationOfType:)] pub unsafe fn dataRepresentationOfType( &self, type_: &NSString, ) -> Option>; - #[method_id(fileAttributesToWriteToFile:ofType:saveOperation:)] + #[method_id(@__retain_semantics Other fileAttributesToWriteToFile:ofType:saveOperation:)] pub unsafe fn fileAttributesToWriteToFile_ofType_saveOperation( &self, fullDocumentPath: &NSString, @@ -609,23 +609,23 @@ extern_methods!( saveOperationType: NSSaveOperationType, ) -> Option>; - #[method_id(fileName)] + #[method_id(@__retain_semantics Other fileName)] pub unsafe fn fileName(&self) -> Option>; - #[method_id(fileWrapperRepresentationOfType:)] + #[method_id(@__retain_semantics Other fileWrapperRepresentationOfType:)] pub unsafe fn fileWrapperRepresentationOfType( &self, type_: &NSString, ) -> Option>; - #[method_id(initWithContentsOfFile:ofType:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:ofType:)] pub unsafe fn initWithContentsOfFile_ofType( this: Option>, absolutePath: &NSString, typeName: &NSString, ) -> Option>; - #[method_id(initWithContentsOfURL:ofType:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:ofType:)] pub unsafe fn initWithContentsOfURL_ofType( this: Option>, url: &NSURL, diff --git a/crates/icrate/src/generated/AppKit/NSDocumentController.rs b/crates/icrate/src/generated/AppKit/NSDocumentController.rs index d1cc5735e..acf0b9ae1 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentController.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentController.rs @@ -15,31 +15,31 @@ extern_class!( extern_methods!( unsafe impl NSDocumentController { - #[method_id(sharedDocumentController)] + #[method_id(@__retain_semantics Other sharedDocumentController)] pub unsafe fn sharedDocumentController() -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(documents)] + #[method_id(@__retain_semantics Other documents)] pub unsafe fn documents(&self) -> Id, Shared>; - #[method_id(currentDocument)] + #[method_id(@__retain_semantics Other currentDocument)] pub unsafe fn currentDocument(&self) -> Option>; - #[method_id(currentDirectory)] + #[method_id(@__retain_semantics Other currentDirectory)] pub unsafe fn currentDirectory(&self) -> Option>; - #[method_id(documentForURL:)] + #[method_id(@__retain_semantics Other documentForURL:)] pub unsafe fn documentForURL(&self, url: &NSURL) -> Option>; - #[method_id(documentForWindow:)] + #[method_id(@__retain_semantics Other documentForWindow:)] pub unsafe fn documentForWindow(&self, window: &NSWindow) -> Option>; @@ -52,13 +52,13 @@ extern_methods!( #[method(newDocument:)] pub unsafe fn newDocument(&self, sender: Option<&Object>); - #[method_id(openUntitledDocumentAndDisplay:error:)] + #[method_id(@__retain_semantics Other openUntitledDocumentAndDisplay:error:)] pub unsafe fn openUntitledDocumentAndDisplay_error( &self, displayDocument: bool, ) -> Result, Id>; - #[method_id(makeUntitledDocumentOfType:error:)] + #[method_id(@__retain_semantics Other makeUntitledDocumentOfType:error:)] pub unsafe fn makeUntitledDocumentOfType_error( &self, typeName: &NSString, @@ -67,7 +67,7 @@ extern_methods!( #[method(openDocument:)] pub unsafe fn openDocument(&self, sender: Option<&Object>); - #[method_id(URLsFromRunningOpenPanel)] + #[method_id(@__retain_semantics Other URLsFromRunningOpenPanel)] pub unsafe fn URLsFromRunningOpenPanel(&self) -> Option, Shared>>; #[method(runModalOpenPanel:forTypes:)] @@ -96,7 +96,7 @@ extern_methods!( completionHandler: TodoBlock, ); - #[method_id(makeDocumentWithContentsOfURL:ofType:error:)] + #[method_id(@__retain_semantics Other makeDocumentWithContentsOfURL:ofType:error:)] pub unsafe fn makeDocumentWithContentsOfURL_ofType_error( &self, url: &NSURL, @@ -112,7 +112,7 @@ extern_methods!( completionHandler: TodoBlock, ); - #[method_id(makeDocumentForURL:withContentsOfURL:ofType:error:)] + #[method_id(@__retain_semantics Other makeDocumentForURL:withContentsOfURL:ofType:error:)] pub unsafe fn makeDocumentForURL_withContentsOfURL_ofType_error( &self, urlOrNil: Option<&NSURL>, @@ -150,7 +150,7 @@ extern_methods!( contextInfo: *mut c_void, ); - #[method_id(duplicateDocumentWithContentsOfURL:copying:displayName:error:)] + #[method_id(@__retain_semantics Other duplicateDocumentWithContentsOfURL:copying:displayName:error:)] pub unsafe fn duplicateDocumentWithContentsOfURL_copying_displayName_error( &self, url: &NSURL, @@ -161,7 +161,7 @@ extern_methods!( #[method(allowsAutomaticShareMenu)] pub unsafe fn allowsAutomaticShareMenu(&self) -> bool; - #[method_id(standardShareMenuItem)] + #[method_id(@__retain_semantics Other standardShareMenuItem)] pub unsafe fn standardShareMenuItem(&self) -> Id; #[method(presentError:modalForWindow:delegate:didPresentSelector:contextInfo:)] @@ -177,7 +177,7 @@ extern_methods!( #[method(presentError:)] pub unsafe fn presentError(&self, error: &NSError) -> bool; - #[method_id(willPresentError:)] + #[method_id(@__retain_semantics Other willPresentError:)] pub unsafe fn willPresentError(&self, error: &NSError) -> Id; #[method(maximumRecentDocumentCount)] @@ -192,25 +192,25 @@ extern_methods!( #[method(noteNewRecentDocumentURL:)] pub unsafe fn noteNewRecentDocumentURL(&self, url: &NSURL); - #[method_id(recentDocumentURLs)] + #[method_id(@__retain_semantics Other recentDocumentURLs)] pub unsafe fn recentDocumentURLs(&self) -> Id, Shared>; - #[method_id(defaultType)] + #[method_id(@__retain_semantics Other defaultType)] pub unsafe fn defaultType(&self) -> Option>; - #[method_id(typeForContentsOfURL:error:)] + #[method_id(@__retain_semantics Other typeForContentsOfURL:error:)] pub unsafe fn typeForContentsOfURL_error( &self, url: &NSURL, ) -> Result, Id>; - #[method_id(documentClassNames)] + #[method_id(@__retain_semantics Other documentClassNames)] pub unsafe fn documentClassNames(&self) -> Id, Shared>; #[method(documentClassForType:)] pub unsafe fn documentClassForType(&self, typeName: &NSString) -> Option<&'static Class>; - #[method_id(displayNameForType:)] + #[method_id(@__retain_semantics Other displayNameForType:)] pub unsafe fn displayNameForType( &self, typeName: &NSString, @@ -225,7 +225,7 @@ extern_methods!( extern_methods!( /// NSDeprecated unsafe impl NSDocumentController { - #[method_id(openDocumentWithContentsOfURL:display:error:)] + #[method_id(@__retain_semantics Other openDocumentWithContentsOfURL:display:error:)] pub unsafe fn openDocumentWithContentsOfURL_display_error( &self, url: &NSURL, @@ -239,60 +239,60 @@ extern_methods!( contentsURL: &NSURL, ) -> Result<(), Id>; - #[method_id(fileExtensionsFromType:)] + #[method_id(@__retain_semantics Other fileExtensionsFromType:)] pub unsafe fn fileExtensionsFromType( &self, typeName: &NSString, ) -> Option>; - #[method_id(typeFromFileExtension:)] + #[method_id(@__retain_semantics Other typeFromFileExtension:)] pub unsafe fn typeFromFileExtension( &self, fileNameExtensionOrHFSFileType: &NSString, ) -> Option>; - #[method_id(documentForFileName:)] + #[method_id(@__retain_semantics Other documentForFileName:)] pub unsafe fn documentForFileName(&self, fileName: &NSString) -> Option>; - #[method_id(fileNamesFromRunningOpenPanel)] + #[method_id(@__retain_semantics Other fileNamesFromRunningOpenPanel)] pub unsafe fn fileNamesFromRunningOpenPanel(&self) -> Option>; - #[method_id(makeDocumentWithContentsOfFile:ofType:)] + #[method_id(@__retain_semantics Other makeDocumentWithContentsOfFile:ofType:)] pub unsafe fn makeDocumentWithContentsOfFile_ofType( &self, fileName: &NSString, type_: &NSString, ) -> Option>; - #[method_id(makeDocumentWithContentsOfURL:ofType:)] + #[method_id(@__retain_semantics Other makeDocumentWithContentsOfURL:ofType:)] pub unsafe fn makeDocumentWithContentsOfURL_ofType( &self, url: &NSURL, type_: Option<&NSString>, ) -> Option>; - #[method_id(makeUntitledDocumentOfType:)] + #[method_id(@__retain_semantics Other makeUntitledDocumentOfType:)] pub unsafe fn makeUntitledDocumentOfType( &self, type_: &NSString, ) -> Option>; - #[method_id(openDocumentWithContentsOfFile:display:)] + #[method_id(@__retain_semantics Other openDocumentWithContentsOfFile:display:)] pub unsafe fn openDocumentWithContentsOfFile_display( &self, fileName: &NSString, display: bool, ) -> Option>; - #[method_id(openDocumentWithContentsOfURL:display:)] + #[method_id(@__retain_semantics Other openDocumentWithContentsOfURL:display:)] pub unsafe fn openDocumentWithContentsOfURL_display( &self, url: &NSURL, display: bool, ) -> Option>; - #[method_id(openUntitledDocumentOfType:display:)] + #[method_id(@__retain_semantics Other openUntitledDocumentOfType:display:)] pub unsafe fn openUntitledDocumentOfType_display( &self, type_: &NSString, diff --git a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs index 5861dce7b..20c8d60d1 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs @@ -7,31 +7,31 @@ use crate::Foundation::*; extern_methods!( /// NSScripting unsafe impl NSDocument { - #[method_id(lastComponentOfFileName)] + #[method_id(@__retain_semantics Other lastComponentOfFileName)] pub unsafe fn lastComponentOfFileName(&self) -> Id; #[method(setLastComponentOfFileName:)] pub unsafe fn setLastComponentOfFileName(&self, lastComponentOfFileName: &NSString); - #[method_id(handleSaveScriptCommand:)] + #[method_id(@__retain_semantics Other handleSaveScriptCommand:)] pub unsafe fn handleSaveScriptCommand( &self, command: &NSScriptCommand, ) -> Option>; - #[method_id(handleCloseScriptCommand:)] + #[method_id(@__retain_semantics Other handleCloseScriptCommand:)] pub unsafe fn handleCloseScriptCommand( &self, command: &NSCloseCommand, ) -> Option>; - #[method_id(handlePrintScriptCommand:)] + #[method_id(@__retain_semantics Other handlePrintScriptCommand:)] pub unsafe fn handlePrintScriptCommand( &self, command: &NSScriptCommand, ) -> Option>; - #[method_id(objectSpecifier)] + #[method_id(@__retain_semantics Other objectSpecifier)] pub unsafe fn objectSpecifier(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs index 0c3e02479..a7cdd138a 100644 --- a/crates/icrate/src/generated/AppKit/NSDragging.rs +++ b/crates/icrate/src/generated/AppKit/NSDragging.rs @@ -55,7 +55,7 @@ pub type NSSpringLoadingDestination = NSObject; extern_methods!( /// NSDraggingSourceDeprecated unsafe impl NSObject { - #[method_id(namesOfPromisedFilesDroppedAtDestination:)] + #[method_id(@__retain_semantics Other namesOfPromisedFilesDroppedAtDestination:)] pub unsafe fn namesOfPromisedFilesDroppedAtDestination( &self, dropDestination: &NSURL, diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs index 896b9ec1c..1c666bb3e 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -25,27 +25,27 @@ extern_class!( extern_methods!( unsafe impl NSDraggingImageComponent { - #[method_id(draggingImageComponentWithKey:)] + #[method_id(@__retain_semantics Other draggingImageComponentWithKey:)] pub unsafe fn draggingImageComponentWithKey( key: &NSDraggingImageComponentKey, ) -> Id; - #[method_id(initWithKey:)] + #[method_id(@__retain_semantics Init initWithKey:)] pub unsafe fn initWithKey( this: Option>, key: &NSDraggingImageComponentKey, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(key)] + #[method_id(@__retain_semantics Other key)] pub unsafe fn key(&self) -> Id; #[method(setKey:)] pub unsafe fn setKey(&self, key: &NSDraggingImageComponentKey); - #[method_id(contents)] + #[method_id(@__retain_semantics Other contents)] pub unsafe fn contents(&self) -> Option>; #[method(setContents:)] @@ -70,16 +70,16 @@ extern_class!( extern_methods!( unsafe impl NSDraggingItem { - #[method_id(initWithPasteboardWriter:)] + #[method_id(@__retain_semantics Init initWithPasteboardWriter:)] pub unsafe fn initWithPasteboardWriter( this: Option>, pasteboardWriter: &NSPasteboardWriting, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(item)] + #[method_id(@__retain_semantics Other item)] pub unsafe fn item(&self) -> Id; #[method(draggingFrame)] @@ -97,7 +97,7 @@ extern_methods!( #[method(setDraggingFrame:contents:)] pub unsafe fn setDraggingFrame_contents(&self, frame: NSRect, contents: Option<&Object>); - #[method_id(imageComponents)] + #[method_id(@__retain_semantics Other imageComponents)] pub unsafe fn imageComponents( &self, ) -> Option, Shared>>; diff --git a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs index cf84fd82b..ee9a4fad4 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs @@ -36,7 +36,7 @@ extern_methods!( #[method(setDraggingLeaderIndex:)] pub unsafe fn setDraggingLeaderIndex(&self, draggingLeaderIndex: NSInteger); - #[method_id(draggingPasteboard)] + #[method_id(@__retain_semantics Other draggingPasteboard)] pub unsafe fn draggingPasteboard(&self) -> Id; #[method(draggingSequenceNumber)] diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index 81991061d..c54cac0cc 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -21,20 +21,20 @@ extern_class!( extern_methods!( unsafe impl NSDrawer { - #[method_id(initWithContentSize:preferredEdge:)] + #[method_id(@__retain_semantics Init initWithContentSize:preferredEdge:)] pub unsafe fn initWithContentSize_preferredEdge( this: Option>, contentSize: NSSize, edge: NSRectEdge, ) -> Id; - #[method_id(parentWindow)] + #[method_id(@__retain_semantics Other parentWindow)] pub unsafe fn parentWindow(&self) -> Option>; #[method(setParentWindow:)] pub unsafe fn setParentWindow(&self, parentWindow: Option<&NSWindow>); - #[method_id(contentView)] + #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Option>; #[method(setContentView:)] @@ -46,7 +46,7 @@ extern_methods!( #[method(setPreferredEdge:)] pub unsafe fn setPreferredEdge(&self, preferredEdge: NSRectEdge); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -111,7 +111,7 @@ extern_methods!( extern_methods!( /// NSDrawers unsafe impl NSWindow { - #[method_id(drawers)] + #[method_id(@__retain_semantics Other drawers)] pub unsafe fn drawers(&self) -> Option, Shared>>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs index 55e6f9034..08173dcff 100644 --- a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs @@ -15,10 +15,10 @@ extern_class!( extern_methods!( unsafe impl NSEPSImageRep { - #[method_id(imageRepWithData:)] + #[method_id(@__retain_semantics Other imageRepWithData:)] pub unsafe fn imageRepWithData(epsData: &NSData) -> Option>; - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, epsData: &NSData, @@ -27,7 +27,7 @@ extern_methods!( #[method(prepareGState)] pub unsafe fn prepareGState(&self); - #[method_id(EPSRepresentation)] + #[method_id(@__retain_semantics Other EPSRepresentation)] pub unsafe fn EPSRepresentation(&self) -> Id; #[method(boundingBox)] diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 393b05857..4eecafb93 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -306,13 +306,13 @@ extern_methods!( #[method(timestamp)] pub unsafe fn timestamp(&self) -> NSTimeInterval; - #[method_id(window)] + #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Option>; #[method(windowNumber)] pub unsafe fn windowNumber(&self) -> NSInteger; - #[method_id(context)] + #[method_id(@__retain_semantics Other context)] pub unsafe fn context(&self) -> Option>; #[method(clickCount)] @@ -354,13 +354,13 @@ extern_methods!( #[method(isDirectionInvertedFromDevice)] pub unsafe fn isDirectionInvertedFromDevice(&self) -> bool; - #[method_id(characters)] + #[method_id(@__retain_semantics Other characters)] pub unsafe fn characters(&self) -> Option>; - #[method_id(charactersIgnoringModifiers)] + #[method_id(@__retain_semantics Other charactersIgnoringModifiers)] pub unsafe fn charactersIgnoringModifiers(&self) -> Option>; - #[method_id(charactersByApplyingModifiers:)] + #[method_id(@__retain_semantics Other charactersByApplyingModifiers:)] pub unsafe fn charactersByApplyingModifiers( &self, modifiers: NSEventModifierFlags, @@ -378,7 +378,7 @@ extern_methods!( #[method(userData)] pub unsafe fn userData(&self) -> *mut c_void; - #[method_id(trackingArea)] + #[method_id(@__retain_semantics Other trackingArea)] pub unsafe fn trackingArea(&self) -> Option>; #[method(subtype)] @@ -393,13 +393,13 @@ extern_methods!( #[method(eventRef)] pub unsafe fn eventRef(&self) -> *mut c_void; - #[method_id(eventWithEventRef:)] + #[method_id(@__retain_semantics Other eventWithEventRef:)] pub unsafe fn eventWithEventRef(eventRef: NonNull) -> Option>; #[method(CGEvent)] pub unsafe fn CGEvent(&self) -> CGEventRef; - #[method_id(eventWithCGEvent:)] + #[method_id(@__retain_semantics Other eventWithCGEvent:)] pub unsafe fn eventWithCGEvent(cgEvent: CGEventRef) -> Option>; #[method(isMouseCoalescingEnabled)] @@ -435,7 +435,7 @@ extern_methods!( #[method(tangentialPressure)] pub unsafe fn tangentialPressure(&self) -> c_float; - #[method_id(vendorDefined)] + #[method_id(@__retain_semantics Other vendorDefined)] pub unsafe fn vendorDefined(&self) -> Id; #[method(vendorID)] @@ -468,20 +468,20 @@ extern_methods!( #[method(isEnteringProximity)] pub unsafe fn isEnteringProximity(&self) -> bool; - #[method_id(touchesMatchingPhase:inView:)] + #[method_id(@__retain_semantics Other touchesMatchingPhase:inView:)] pub unsafe fn touchesMatchingPhase_inView( &self, phase: NSTouchPhase, view: Option<&NSView>, ) -> Id, Shared>; - #[method_id(allTouches)] + #[method_id(@__retain_semantics Other allTouches)] pub unsafe fn allTouches(&self) -> Id, Shared>; - #[method_id(touchesForView:)] + #[method_id(@__retain_semantics Other touchesForView:)] pub unsafe fn touchesForView(&self, view: &NSView) -> Id, Shared>; - #[method_id(coalescedTouchesForTouch:)] + #[method_id(@__retain_semantics Other coalescedTouchesForTouch:)] pub unsafe fn coalescedTouchesForTouch( &self, touch: &NSTouch, @@ -523,7 +523,7 @@ extern_methods!( #[method(stopPeriodicEvents)] pub unsafe fn stopPeriodicEvents(); - #[method_id(mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:)] + #[method_id(@__retain_semantics Other mouseEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:)] pub unsafe fn mouseEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_clickCount_pressure( type_: NSEventType, location: NSPoint, @@ -536,7 +536,7 @@ extern_methods!( pressure: c_float, ) -> Option>; - #[method_id(keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:)] + #[method_id(@__retain_semantics Other keyEventWithType:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:)] pub unsafe fn keyEventWithType_location_modifierFlags_timestamp_windowNumber_context_characters_charactersIgnoringModifiers_isARepeat_keyCode( type_: NSEventType, location: NSPoint, @@ -550,7 +550,7 @@ extern_methods!( code: c_ushort, ) -> Option>; - #[method_id(enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:)] + #[method_id(@__retain_semantics Other enterExitEventWithType:location:modifierFlags:timestamp:windowNumber:context:eventNumber:trackingNumber:userData:)] pub unsafe fn enterExitEventWithType_location_modifierFlags_timestamp_windowNumber_context_eventNumber_trackingNumber_userData( type_: NSEventType, location: NSPoint, @@ -563,7 +563,7 @@ extern_methods!( data: *mut c_void, ) -> Option>; - #[method_id(otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:)] + #[method_id(@__retain_semantics Other otherEventWithType:location:modifierFlags:timestamp:windowNumber:context:subtype:data1:data2:)] pub unsafe fn otherEventWithType_location_modifierFlags_timestamp_windowNumber_context_subtype_data1_data2( type_: NSEventType, location: NSPoint, @@ -594,13 +594,13 @@ extern_methods!( #[method(keyRepeatInterval)] pub unsafe fn keyRepeatInterval() -> NSTimeInterval; - #[method_id(addGlobalMonitorForEventsMatchingMask:handler:)] + #[method_id(@__retain_semantics Other addGlobalMonitorForEventsMatchingMask:handler:)] pub unsafe fn addGlobalMonitorForEventsMatchingMask_handler( mask: NSEventMask, block: TodoBlock, ) -> Option>; - #[method_id(addLocalMonitorForEventsMatchingMask:handler:)] + #[method_id(@__retain_semantics Other addLocalMonitorForEventsMatchingMask:handler:)] pub unsafe fn addLocalMonitorForEventsMatchingMask_handler( mask: NSEventMask, block: TodoBlock, diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs index 4addabaa2..62300a38e 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs @@ -15,32 +15,32 @@ extern_class!( extern_methods!( unsafe impl NSFilePromiseProvider { - #[method_id(fileType)] + #[method_id(@__retain_semantics Other fileType)] pub unsafe fn fileType(&self) -> Id; #[method(setFileType:)] pub unsafe fn setFileType(&self, fileType: &NSString); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSFilePromiseProviderDelegate>); - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>; #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&Object>); - #[method_id(initWithFileType:delegate:)] + #[method_id(@__retain_semantics Init initWithFileType:delegate:)] pub unsafe fn initWithFileType_delegate( this: Option>, fileType: &NSString, delegate: &NSFilePromiseProviderDelegate, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs index 1be3d2b6a..ea640c877 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs @@ -15,13 +15,13 @@ extern_class!( extern_methods!( unsafe impl NSFilePromiseReceiver { - #[method_id(readableDraggedTypes)] + #[method_id(@__retain_semantics Other readableDraggedTypes)] pub unsafe fn readableDraggedTypes() -> Id, Shared>; - #[method_id(fileTypes)] + #[method_id(@__retain_semantics Other fileTypes)] pub unsafe fn fileTypes(&self) -> Id, Shared>; - #[method_id(fileNames)] + #[method_id(@__retain_semantics Other fileNames)] pub unsafe fn fileNames(&self) -> Id, Shared>; #[method(receivePromisedFilesAtDestination:options:operationQueue:reader:)] diff --git a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs index f85c30fc4..0dfcd3a51 100644 --- a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs +++ b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs @@ -7,7 +7,7 @@ use crate::Foundation::*; extern_methods!( /// NSExtensions unsafe impl NSFileWrapper { - #[method_id(icon)] + #[method_id(@__retain_semantics Other icon)] pub unsafe fn icon(&self) -> Option>; #[method(setIcon:)] diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 040c1744e..d213d5aa4 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -19,34 +19,34 @@ extern_class!( extern_methods!( unsafe impl NSFont { - #[method_id(fontWithName:size:)] + #[method_id(@__retain_semantics Other fontWithName:size:)] pub unsafe fn fontWithName_size( fontName: &NSString, fontSize: CGFloat, ) -> Option>; - #[method_id(fontWithName:matrix:)] + #[method_id(@__retain_semantics Other fontWithName:matrix:)] pub unsafe fn fontWithName_matrix( fontName: &NSString, fontMatrix: NonNull, ) -> Option>; - #[method_id(fontWithDescriptor:size:)] + #[method_id(@__retain_semantics Other fontWithDescriptor:size:)] pub unsafe fn fontWithDescriptor_size( fontDescriptor: &NSFontDescriptor, fontSize: CGFloat, ) -> Option>; - #[method_id(fontWithDescriptor:textTransform:)] + #[method_id(@__retain_semantics Other fontWithDescriptor:textTransform:)] pub unsafe fn fontWithDescriptor_textTransform( fontDescriptor: &NSFontDescriptor, textTransform: Option<&NSAffineTransform>, ) -> Option>; - #[method_id(userFontOfSize:)] + #[method_id(@__retain_semantics Other userFontOfSize:)] pub unsafe fn userFontOfSize(fontSize: CGFloat) -> Option>; - #[method_id(userFixedPitchFontOfSize:)] + #[method_id(@__retain_semantics Other userFixedPitchFontOfSize:)] pub unsafe fn userFixedPitchFontOfSize(fontSize: CGFloat) -> Option>; #[method(setUserFont:)] @@ -55,55 +55,55 @@ extern_methods!( #[method(setUserFixedPitchFont:)] pub unsafe fn setUserFixedPitchFont(font: Option<&NSFont>); - #[method_id(systemFontOfSize:)] + #[method_id(@__retain_semantics Other systemFontOfSize:)] pub unsafe fn systemFontOfSize(fontSize: CGFloat) -> Id; - #[method_id(boldSystemFontOfSize:)] + #[method_id(@__retain_semantics Other boldSystemFontOfSize:)] pub unsafe fn boldSystemFontOfSize(fontSize: CGFloat) -> Id; - #[method_id(labelFontOfSize:)] + #[method_id(@__retain_semantics Other labelFontOfSize:)] pub unsafe fn labelFontOfSize(fontSize: CGFloat) -> Id; - #[method_id(titleBarFontOfSize:)] + #[method_id(@__retain_semantics Other titleBarFontOfSize:)] pub unsafe fn titleBarFontOfSize(fontSize: CGFloat) -> Id; - #[method_id(menuFontOfSize:)] + #[method_id(@__retain_semantics Other menuFontOfSize:)] pub unsafe fn menuFontOfSize(fontSize: CGFloat) -> Id; - #[method_id(menuBarFontOfSize:)] + #[method_id(@__retain_semantics Other menuBarFontOfSize:)] pub unsafe fn menuBarFontOfSize(fontSize: CGFloat) -> Id; - #[method_id(messageFontOfSize:)] + #[method_id(@__retain_semantics Other messageFontOfSize:)] pub unsafe fn messageFontOfSize(fontSize: CGFloat) -> Id; - #[method_id(paletteFontOfSize:)] + #[method_id(@__retain_semantics Other paletteFontOfSize:)] pub unsafe fn paletteFontOfSize(fontSize: CGFloat) -> Id; - #[method_id(toolTipsFontOfSize:)] + #[method_id(@__retain_semantics Other toolTipsFontOfSize:)] pub unsafe fn toolTipsFontOfSize(fontSize: CGFloat) -> Id; - #[method_id(controlContentFontOfSize:)] + #[method_id(@__retain_semantics Other controlContentFontOfSize:)] pub unsafe fn controlContentFontOfSize(fontSize: CGFloat) -> Id; - #[method_id(systemFontOfSize:weight:)] + #[method_id(@__retain_semantics Other systemFontOfSize:weight:)] pub unsafe fn systemFontOfSize_weight( fontSize: CGFloat, weight: NSFontWeight, ) -> Id; - #[method_id(monospacedDigitSystemFontOfSize:weight:)] + #[method_id(@__retain_semantics Other monospacedDigitSystemFontOfSize:weight:)] pub unsafe fn monospacedDigitSystemFontOfSize_weight( fontSize: CGFloat, weight: NSFontWeight, ) -> Id; - #[method_id(monospacedSystemFontOfSize:weight:)] + #[method_id(@__retain_semantics Other monospacedSystemFontOfSize:weight:)] pub unsafe fn monospacedSystemFontOfSize_weight( fontSize: CGFloat, weight: NSFontWeight, ) -> Id; - #[method_id(fontWithSize:)] + #[method_id(@__retain_semantics Other fontWithSize:)] pub unsafe fn fontWithSize(&self, fontSize: CGFloat) -> Id; #[method(systemFontSize)] @@ -118,7 +118,7 @@ extern_methods!( #[method(systemFontSizeForControlSize:)] pub unsafe fn systemFontSizeForControlSize(controlSize: NSControlSize) -> CGFloat; - #[method_id(fontName)] + #[method_id(@__retain_semantics Other fontName)] pub unsafe fn fontName(&self) -> Id; #[method(pointSize)] @@ -127,16 +127,16 @@ extern_methods!( #[method(matrix)] pub unsafe fn matrix(&self) -> NonNull; - #[method_id(familyName)] + #[method_id(@__retain_semantics Other familyName)] pub unsafe fn familyName(&self) -> Option>; - #[method_id(displayName)] + #[method_id(@__retain_semantics Other displayName)] pub unsafe fn displayName(&self) -> Option>; - #[method_id(fontDescriptor)] + #[method_id(@__retain_semantics Other fontDescriptor)] pub unsafe fn fontDescriptor(&self) -> Id; - #[method_id(textTransform)] + #[method_id(@__retain_semantics Other textTransform)] pub unsafe fn textTransform(&self) -> Id; #[method(numberOfGlyphs)] @@ -145,7 +145,7 @@ extern_methods!( #[method(mostCompatibleStringEncoding)] pub unsafe fn mostCompatibleStringEncoding(&self) -> NSStringEncoding; - #[method_id(coveredCharacterSet)] + #[method_id(@__retain_semantics Other coveredCharacterSet)] pub unsafe fn coveredCharacterSet(&self) -> Id; #[method(boundingRectForFont)] @@ -209,7 +209,7 @@ extern_methods!( #[method(setInContext:)] pub unsafe fn setInContext(&self, graphicsContext: &NSGraphicsContext); - #[method_id(verticalFont)] + #[method_id(@__retain_semantics Other verticalFont)] pub unsafe fn verticalFont(&self) -> Id; #[method(isVertical)] @@ -273,13 +273,13 @@ extern_methods!( length: NSUInteger, ); - #[method_id(printerFont)] + #[method_id(@__retain_semantics Other printerFont)] pub unsafe fn printerFont(&self) -> Id; - #[method_id(screenFont)] + #[method_id(@__retain_semantics Other screenFont)] pub unsafe fn screenFont(&self) -> Id; - #[method_id(screenFontWithRenderingMode:)] + #[method_id(@__retain_semantics Other screenFontWithRenderingMode:)] pub unsafe fn screenFontWithRenderingMode( &self, renderingMode: NSFontRenderingMode, @@ -293,7 +293,7 @@ extern_methods!( extern_methods!( /// NSFont_TextStyles unsafe impl NSFont { - #[method_id(preferredFontForTextStyle:options:)] + #[method_id(@__retain_semantics Other preferredFontForTextStyle:options:)] pub unsafe fn preferredFontForTextStyle_options( style: &NSFontTextStyle, options: &NSDictionary, diff --git a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs index 49dfdacfb..bafc35a00 100644 --- a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs +++ b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs @@ -18,20 +18,20 @@ extern_class!( extern_methods!( unsafe impl NSFontAssetRequest { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithFontDescriptors:options:)] + #[method_id(@__retain_semantics Init initWithFontDescriptors:options:)] pub unsafe fn initWithFontDescriptors_options( this: Option>, fontDescriptors: &NSArray, options: NSFontAssetRequestOptions, ) -> Id; - #[method_id(downloadedFontDescriptors)] + #[method_id(@__retain_semantics Other downloadedFontDescriptors)] pub unsafe fn downloadedFontDescriptors(&self) -> Id, Shared>; - #[method_id(progress)] + #[method_id(@__retain_semantics Other progress)] pub unsafe fn progress(&self) -> Id; #[method(downloadFontAssetsWithCompletionHandler:)] diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index 32f93668f..a0c949340 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/NSFontCollection.rs @@ -38,15 +38,15 @@ extern_class!( extern_methods!( unsafe impl NSFontCollection { - #[method_id(fontCollectionWithDescriptors:)] + #[method_id(@__retain_semantics Other fontCollectionWithDescriptors:)] pub unsafe fn fontCollectionWithDescriptors( queryDescriptors: &NSArray, ) -> Id; - #[method_id(fontCollectionWithAllAvailableDescriptors)] + #[method_id(@__retain_semantics Other fontCollectionWithAllAvailableDescriptors)] pub unsafe fn fontCollectionWithAllAvailableDescriptors() -> Id; - #[method_id(fontCollectionWithLocale:)] + #[method_id(@__retain_semantics Other fontCollectionWithLocale:)] pub unsafe fn fontCollectionWithLocale( locale: &NSLocale, ) -> Option>; @@ -71,42 +71,42 @@ extern_methods!( newName: &NSFontCollectionName, ) -> Result<(), Id>; - #[method_id(allFontCollectionNames)] + #[method_id(@__retain_semantics Other allFontCollectionNames)] pub unsafe fn allFontCollectionNames() -> Id, Shared>; - #[method_id(fontCollectionWithName:)] + #[method_id(@__retain_semantics Other fontCollectionWithName:)] pub unsafe fn fontCollectionWithName( name: &NSFontCollectionName, ) -> Option>; - #[method_id(fontCollectionWithName:visibility:)] + #[method_id(@__retain_semantics Other fontCollectionWithName:visibility:)] pub unsafe fn fontCollectionWithName_visibility( name: &NSFontCollectionName, visibility: NSFontCollectionVisibility, ) -> Option>; - #[method_id(queryDescriptors)] + #[method_id(@__retain_semantics Other queryDescriptors)] pub unsafe fn queryDescriptors(&self) -> Option, Shared>>; - #[method_id(exclusionDescriptors)] + #[method_id(@__retain_semantics Other exclusionDescriptors)] pub unsafe fn exclusionDescriptors(&self) -> Option, Shared>>; - #[method_id(matchingDescriptors)] + #[method_id(@__retain_semantics Other matchingDescriptors)] pub unsafe fn matchingDescriptors(&self) -> Option, Shared>>; - #[method_id(matchingDescriptorsWithOptions:)] + #[method_id(@__retain_semantics Other matchingDescriptorsWithOptions:)] pub unsafe fn matchingDescriptorsWithOptions( &self, options: Option<&NSDictionary>, ) -> Option, Shared>>; - #[method_id(matchingDescriptorsForFamily:)] + #[method_id(@__retain_semantics Other matchingDescriptorsForFamily:)] pub unsafe fn matchingDescriptorsForFamily( &self, family: &NSString, ) -> Option, Shared>>; - #[method_id(matchingDescriptorsForFamily:options:)] + #[method_id(@__retain_semantics Other matchingDescriptorsForFamily:options:)] pub unsafe fn matchingDescriptorsForFamily_options( &self, family: &NSString, @@ -126,32 +126,32 @@ extern_class!( extern_methods!( unsafe impl NSMutableFontCollection { - #[method_id(fontCollectionWithDescriptors:)] + #[method_id(@__retain_semantics Other fontCollectionWithDescriptors:)] pub unsafe fn fontCollectionWithDescriptors( queryDescriptors: &NSArray, ) -> Id; - #[method_id(fontCollectionWithAllAvailableDescriptors)] + #[method_id(@__retain_semantics Other fontCollectionWithAllAvailableDescriptors)] pub unsafe fn fontCollectionWithAllAvailableDescriptors( ) -> Id; - #[method_id(fontCollectionWithLocale:)] + #[method_id(@__retain_semantics Other fontCollectionWithLocale:)] pub unsafe fn fontCollectionWithLocale( locale: &NSLocale, ) -> Id; - #[method_id(fontCollectionWithName:)] + #[method_id(@__retain_semantics Other fontCollectionWithName:)] pub unsafe fn fontCollectionWithName( name: &NSFontCollectionName, ) -> Option>; - #[method_id(fontCollectionWithName:visibility:)] + #[method_id(@__retain_semantics Other fontCollectionWithName:visibility:)] pub unsafe fn fontCollectionWithName_visibility( name: &NSFontCollectionName, visibility: NSFontCollectionVisibility, ) -> Option>; - #[method_id(queryDescriptors)] + #[method_id(@__retain_semantics Other queryDescriptors)] pub unsafe fn queryDescriptors(&self) -> Option, Shared>>; #[method(setQueryDescriptors:)] @@ -160,7 +160,7 @@ extern_methods!( queryDescriptors: Option<&NSArray>, ); - #[method_id(exclusionDescriptors)] + #[method_id(@__retain_semantics Other exclusionDescriptors)] pub unsafe fn exclusionDescriptors(&self) -> Option, Shared>>; #[method(setExclusionDescriptors:)] diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 3293a5db3..fe66bd0d7 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -58,13 +58,13 @@ extern_class!( extern_methods!( unsafe impl NSFontDescriptor { - #[method_id(postscriptName)] + #[method_id(@__retain_semantics Other postscriptName)] pub unsafe fn postscriptName(&self) -> Option>; #[method(pointSize)] pub unsafe fn pointSize(&self) -> CGFloat; - #[method_id(matrix)] + #[method_id(@__retain_semantics Other matrix)] pub unsafe fn matrix(&self) -> Option>; #[method(symbolicTraits)] @@ -73,89 +73,89 @@ extern_methods!( #[method(requiresFontAssetRequest)] pub unsafe fn requiresFontAssetRequest(&self) -> bool; - #[method_id(objectForKey:)] + #[method_id(@__retain_semantics Other objectForKey:)] pub unsafe fn objectForKey( &self, attribute: &NSFontDescriptorAttributeName, ) -> Option>; - #[method_id(fontAttributes)] + #[method_id(@__retain_semantics Other fontAttributes)] pub unsafe fn fontAttributes( &self, ) -> Id, Shared>; - #[method_id(fontDescriptorWithFontAttributes:)] + #[method_id(@__retain_semantics Other fontDescriptorWithFontAttributes:)] pub unsafe fn fontDescriptorWithFontAttributes( attributes: Option<&NSDictionary>, ) -> Id; - #[method_id(fontDescriptorWithName:size:)] + #[method_id(@__retain_semantics Other fontDescriptorWithName:size:)] pub unsafe fn fontDescriptorWithName_size( fontName: &NSString, size: CGFloat, ) -> Id; - #[method_id(fontDescriptorWithName:matrix:)] + #[method_id(@__retain_semantics Other fontDescriptorWithName:matrix:)] pub unsafe fn fontDescriptorWithName_matrix( fontName: &NSString, matrix: &NSAffineTransform, ) -> Id; - #[method_id(initWithFontAttributes:)] + #[method_id(@__retain_semantics Init initWithFontAttributes:)] pub unsafe fn initWithFontAttributes( this: Option>, attributes: Option<&NSDictionary>, ) -> Id; - #[method_id(matchingFontDescriptorsWithMandatoryKeys:)] + #[method_id(@__retain_semantics Other matchingFontDescriptorsWithMandatoryKeys:)] pub unsafe fn matchingFontDescriptorsWithMandatoryKeys( &self, mandatoryKeys: Option<&NSSet>, ) -> Id, Shared>; - #[method_id(matchingFontDescriptorWithMandatoryKeys:)] + #[method_id(@__retain_semantics Other matchingFontDescriptorWithMandatoryKeys:)] pub unsafe fn matchingFontDescriptorWithMandatoryKeys( &self, mandatoryKeys: Option<&NSSet>, ) -> Option>; - #[method_id(fontDescriptorByAddingAttributes:)] + #[method_id(@__retain_semantics Other fontDescriptorByAddingAttributes:)] pub unsafe fn fontDescriptorByAddingAttributes( &self, attributes: &NSDictionary, ) -> Id; - #[method_id(fontDescriptorWithSymbolicTraits:)] + #[method_id(@__retain_semantics Other fontDescriptorWithSymbolicTraits:)] pub unsafe fn fontDescriptorWithSymbolicTraits( &self, symbolicTraits: NSFontDescriptorSymbolicTraits, ) -> Id; - #[method_id(fontDescriptorWithSize:)] + #[method_id(@__retain_semantics Other fontDescriptorWithSize:)] pub unsafe fn fontDescriptorWithSize( &self, newPointSize: CGFloat, ) -> Id; - #[method_id(fontDescriptorWithMatrix:)] + #[method_id(@__retain_semantics Other fontDescriptorWithMatrix:)] pub unsafe fn fontDescriptorWithMatrix( &self, matrix: &NSAffineTransform, ) -> Id; - #[method_id(fontDescriptorWithFace:)] + #[method_id(@__retain_semantics Other fontDescriptorWithFace:)] pub unsafe fn fontDescriptorWithFace( &self, newFace: &NSString, ) -> Id; - #[method_id(fontDescriptorWithFamily:)] + #[method_id(@__retain_semantics Other fontDescriptorWithFamily:)] pub unsafe fn fontDescriptorWithFamily( &self, newFamily: &NSString, ) -> Id; - #[method_id(fontDescriptorWithDesign:)] + #[method_id(@__retain_semantics Other fontDescriptorWithDesign:)] pub unsafe fn fontDescriptorWithDesign( &self, design: &NSFontDescriptorSystemDesign, @@ -382,7 +382,7 @@ extern "C" { extern_methods!( /// NSFontDescriptor_TextStyles unsafe impl NSFontDescriptor { - #[method_id(preferredFontDescriptorForTextStyle:options:)] + #[method_id(@__retain_semantics Other preferredFontDescriptorForTextStyle:options:)] pub unsafe fn preferredFontDescriptorForTextStyle_options( style: &NSFontTextStyle, options: &NSDictionary, diff --git a/crates/icrate/src/generated/AppKit/NSFontManager.rs b/crates/icrate/src/generated/AppKit/NSFontManager.rs index acd4cc743..e04d746d8 100644 --- a/crates/icrate/src/generated/AppKit/NSFontManager.rs +++ b/crates/icrate/src/generated/AppKit/NSFontManager.rs @@ -48,13 +48,13 @@ extern_methods!( #[method(setFontManagerFactory:)] pub unsafe fn setFontManagerFactory(factoryId: Option<&Class>); - #[method_id(sharedFontManager)] + #[method_id(@__retain_semantics Other sharedFontManager)] pub unsafe fn sharedFontManager() -> Id; #[method(isMultiple)] pub unsafe fn isMultiple(&self) -> bool; - #[method_id(selectedFont)] + #[method_id(@__retain_semantics Other selectedFont)] pub unsafe fn selectedFont(&self) -> Option>; #[method(setSelectedFont:isMultiple:)] @@ -63,13 +63,13 @@ extern_methods!( #[method(setFontMenu:)] pub unsafe fn setFontMenu(&self, newMenu: &NSMenu); - #[method_id(fontMenu:)] + #[method_id(@__retain_semantics Other fontMenu:)] pub unsafe fn fontMenu(&self, create: bool) -> Option>; - #[method_id(fontPanel:)] + #[method_id(@__retain_semantics Other fontPanel:)] pub unsafe fn fontPanel(&self, create: bool) -> Option>; - #[method_id(fontWithFamily:traits:weight:size:)] + #[method_id(@__retain_semantics Other fontWithFamily:traits:weight:size:)] pub unsafe fn fontWithFamily_traits_weight_size( &self, family: &NSString, @@ -84,57 +84,57 @@ extern_methods!( #[method(weightOfFont:)] pub unsafe fn weightOfFont(&self, fontObj: &NSFont) -> NSInteger; - #[method_id(availableFonts)] + #[method_id(@__retain_semantics Other availableFonts)] pub unsafe fn availableFonts(&self) -> Id, Shared>; - #[method_id(availableFontFamilies)] + #[method_id(@__retain_semantics Other availableFontFamilies)] pub unsafe fn availableFontFamilies(&self) -> Id, Shared>; - #[method_id(availableMembersOfFontFamily:)] + #[method_id(@__retain_semantics Other availableMembersOfFontFamily:)] pub unsafe fn availableMembersOfFontFamily( &self, fam: &NSString, ) -> Option, Shared>>; - #[method_id(convertFont:)] + #[method_id(@__retain_semantics Other convertFont:)] pub unsafe fn convertFont(&self, fontObj: &NSFont) -> Id; - #[method_id(convertFont:toSize:)] + #[method_id(@__retain_semantics Other convertFont:toSize:)] pub unsafe fn convertFont_toSize( &self, fontObj: &NSFont, size: CGFloat, ) -> Id; - #[method_id(convertFont:toFace:)] + #[method_id(@__retain_semantics Other convertFont:toFace:)] pub unsafe fn convertFont_toFace( &self, fontObj: &NSFont, typeface: &NSString, ) -> Option>; - #[method_id(convertFont:toFamily:)] + #[method_id(@__retain_semantics Other convertFont:toFamily:)] pub unsafe fn convertFont_toFamily( &self, fontObj: &NSFont, family: &NSString, ) -> Id; - #[method_id(convertFont:toHaveTrait:)] + #[method_id(@__retain_semantics Other convertFont:toHaveTrait:)] pub unsafe fn convertFont_toHaveTrait( &self, fontObj: &NSFont, trait_: NSFontTraitMask, ) -> Id; - #[method_id(convertFont:toNotHaveTrait:)] + #[method_id(@__retain_semantics Other convertFont:toNotHaveTrait:)] pub unsafe fn convertFont_toNotHaveTrait( &self, fontObj: &NSFont, trait_: NSFontTraitMask, ) -> Id; - #[method_id(convertWeight:ofFont:)] + #[method_id(@__retain_semantics Other convertWeight:ofFont:)] pub unsafe fn convertWeight_ofFont( &self, upFlag: bool, @@ -153,7 +153,7 @@ extern_methods!( #[method(setAction:)] pub unsafe fn setAction(&self, action: Sel); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -162,7 +162,7 @@ extern_methods!( #[method(sendAction)] pub unsafe fn sendAction(&self) -> bool; - #[method_id(localizedNameForFamily:face:)] + #[method_id(@__retain_semantics Other localizedNameForFamily:face:)] pub unsafe fn localizedNameForFamily_face( &self, family: &NSString, @@ -176,22 +176,22 @@ extern_methods!( flag: bool, ); - #[method_id(convertAttributes:)] + #[method_id(@__retain_semantics Other convertAttributes:)] pub unsafe fn convertAttributes( &self, attributes: &NSDictionary, ) -> Id, Shared>; - #[method_id(availableFontNamesMatchingFontDescriptor:)] + #[method_id(@__retain_semantics Other availableFontNamesMatchingFontDescriptor:)] pub unsafe fn availableFontNamesMatchingFontDescriptor( &self, descriptor: &NSFontDescriptor, ) -> Option>; - #[method_id(collectionNames)] + #[method_id(@__retain_semantics Other collectionNames)] pub unsafe fn collectionNames(&self) -> Id; - #[method_id(fontDescriptorsInCollection:)] + #[method_id(@__retain_semantics Other fontDescriptorsInCollection:)] pub unsafe fn fontDescriptorsInCollection( &self, collectionNames: &NSString, @@ -227,7 +227,7 @@ extern_methods!( #[method(convertFontTraits:)] pub unsafe fn convertFontTraits(&self, traits: NSFontTraitMask) -> NSFontTraitMask; - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] @@ -245,7 +245,7 @@ extern_methods!( someTraits: NSFontTraitMask, ) -> bool; - #[method_id(availableFontNamesWithTraits:)] + #[method_id(@__retain_semantics Other availableFontNamesWithTraits:)] pub unsafe fn availableFontNamesWithTraits( &self, someTraits: NSFontTraitMask, diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index 95b2bfad5..d9430d9de 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -39,13 +39,13 @@ extern_class!( extern_methods!( unsafe impl NSFontPanel { - #[method_id(sharedFontPanel)] + #[method_id(@__retain_semantics Other sharedFontPanel)] pub unsafe fn sharedFontPanel() -> Id; #[method(sharedFontPanelExists)] pub unsafe fn sharedFontPanelExists() -> bool; - #[method_id(accessoryView)] + #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[method(setAccessoryView:)] @@ -54,7 +54,7 @@ extern_methods!( #[method(setPanelFont:isMultiple:)] pub unsafe fn setPanelFont_isMultiple(&self, fontObj: &NSFont, flag: bool); - #[method_id(panelConvertFont:)] + #[method_id(@__retain_semantics Other panelConvertFont:)] pub unsafe fn panelConvertFont(&self, fontObj: &NSFont) -> Id; #[method(worksWhenModal)] diff --git a/crates/icrate/src/generated/AppKit/NSForm.rs b/crates/icrate/src/generated/AppKit/NSForm.rs index b33fdfe1a..a4ba725a5 100644 --- a/crates/icrate/src/generated/AppKit/NSForm.rs +++ b/crates/icrate/src/generated/AppKit/NSForm.rs @@ -42,16 +42,16 @@ extern_methods!( #[method(setTextFont:)] pub unsafe fn setTextFont(&self, fontObj: &NSFont); - #[method_id(cellAtIndex:)] + #[method_id(@__retain_semantics Other cellAtIndex:)] pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Option>; #[method(drawCellAtIndex:)] pub unsafe fn drawCellAtIndex(&self, index: NSInteger); - #[method_id(addEntry:)] + #[method_id(@__retain_semantics Other addEntry:)] pub unsafe fn addEntry(&self, title: &NSString) -> Id; - #[method_id(insertEntry:atIndex:)] + #[method_id(@__retain_semantics Other insertEntry:atIndex:)] pub unsafe fn insertEntry_atIndex( &self, title: &NSString, diff --git a/crates/icrate/src/generated/AppKit/NSFormCell.rs b/crates/icrate/src/generated/AppKit/NSFormCell.rs index f392e289c..927501103 100644 --- a/crates/icrate/src/generated/AppKit/NSFormCell.rs +++ b/crates/icrate/src/generated/AppKit/NSFormCell.rs @@ -15,19 +15,19 @@ extern_class!( extern_methods!( unsafe impl NSFormCell { - #[method_id(initTextCell:)] + #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell( this: Option>, string: Option<&NSString>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(initImageCell:)] + #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, image: Option<&NSImage>, @@ -42,13 +42,13 @@ extern_methods!( #[method(setTitleWidth:)] pub unsafe fn setTitleWidth(&self, titleWidth: CGFloat); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); - #[method_id(titleFont)] + #[method_id(@__retain_semantics Other titleFont)] pub unsafe fn titleFont(&self) -> Id; #[method(setTitleFont:)] @@ -57,13 +57,13 @@ extern_methods!( #[method(isOpaque)] pub unsafe fn isOpaque(&self) -> bool; - #[method_id(placeholderString)] + #[method_id(@__retain_semantics Other placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); - #[method_id(placeholderAttributedString)] + #[method_id(@__retain_semantics Other placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; #[method(setPlaceholderAttributedString:)] @@ -106,7 +106,7 @@ extern_methods!( extern_methods!( /// NSFormCellAttributedStringMethods unsafe impl NSFormCell { - #[method_id(attributedTitle)] + #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; #[method(setAttributedTitle:)] diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index 0dec1e961..496e673eb 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -25,20 +25,20 @@ extern_class!( extern_methods!( unsafe impl NSGestureRecognizer { - #[method_id(initWithTarget:action:)] + #[method_id(@__retain_semantics Init initWithTarget:action:)] pub unsafe fn initWithTarget_action( this: Option>, target: Option<&Object>, action: Option, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] @@ -53,7 +53,7 @@ extern_methods!( #[method(state)] pub unsafe fn state(&self) -> NSGestureRecognizerState; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -65,10 +65,10 @@ extern_methods!( #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; - #[method_id(pressureConfiguration)] + #[method_id(@__retain_semantics Other pressureConfiguration)] pub unsafe fn pressureConfiguration(&self) -> Id; #[method(setPressureConfiguration:)] diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index 5adba94be..daea4f455 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs @@ -30,7 +30,7 @@ extern_methods!( charIndex: *mut NSUInteger, ); - #[method_id(sharedGlyphGenerator)] + #[method_id(@__retain_semantics Other sharedGlyphGenerator)] pub unsafe fn sharedGlyphGenerator() -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs index 711d7e5ad..e65204d89 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSGlyphInfo { - #[method_id(glyphInfoWithCGGlyph:forFont:baseString:)] + #[method_id(@__retain_semantics Other glyphInfoWithCGGlyph:forFont:baseString:)] pub unsafe fn glyphInfoWithCGGlyph_forFont_baseString( glyph: CGGlyph, font: &NSFont, @@ -25,7 +25,7 @@ extern_methods!( #[method(glyphID)] pub unsafe fn glyphID(&self) -> CGGlyph; - #[method_id(baseString)] + #[method_id(@__retain_semantics Other baseString)] pub unsafe fn baseString(&self) -> Id; } ); @@ -41,28 +41,28 @@ pub const NSAdobeKorea1CharacterCollection: NSCharacterCollection = 5; extern_methods!( /// NSGlyphInfo_Deprecated unsafe impl NSGlyphInfo { - #[method_id(glyphInfoWithGlyphName:forFont:baseString:)] + #[method_id(@__retain_semantics Other glyphInfoWithGlyphName:forFont:baseString:)] pub unsafe fn glyphInfoWithGlyphName_forFont_baseString( glyphName: &NSString, font: &NSFont, string: &NSString, ) -> Option>; - #[method_id(glyphInfoWithGlyph:forFont:baseString:)] + #[method_id(@__retain_semantics Other glyphInfoWithGlyph:forFont:baseString:)] pub unsafe fn glyphInfoWithGlyph_forFont_baseString( glyph: NSGlyph, font: &NSFont, string: &NSString, ) -> Option>; - #[method_id(glyphInfoWithCharacterIdentifier:collection:baseString:)] + #[method_id(@__retain_semantics Other glyphInfoWithCharacterIdentifier:collection:baseString:)] pub unsafe fn glyphInfoWithCharacterIdentifier_collection_baseString( cid: NSUInteger, characterCollection: NSCharacterCollection, string: &NSString, ) -> Option>; - #[method_id(glyphName)] + #[method_id(@__retain_semantics Other glyphName)] pub unsafe fn glyphName(&self) -> Option>; #[method(characterIdentifier)] diff --git a/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index 1df4bcffd..0469fec76 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/NSGradient.rs @@ -19,20 +19,20 @@ extern_class!( extern_methods!( unsafe impl NSGradient { - #[method_id(initWithStartingColor:endingColor:)] + #[method_id(@__retain_semantics Init initWithStartingColor:endingColor:)] pub unsafe fn initWithStartingColor_endingColor( this: Option>, startingColor: &NSColor, endingColor: &NSColor, ) -> Option>; - #[method_id(initWithColors:)] + #[method_id(@__retain_semantics Init initWithColors:)] pub unsafe fn initWithColors( this: Option>, colorArray: &NSArray, ) -> Option>; - #[method_id(initWithColors:atLocations:colorSpace:)] + #[method_id(@__retain_semantics Init initWithColors:atLocations:colorSpace:)] pub unsafe fn initWithColors_atLocations_colorSpace( this: Option>, colorArray: &NSArray, @@ -40,7 +40,7 @@ extern_methods!( colorSpace: &NSColorSpace, ) -> Option>; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -84,7 +84,7 @@ extern_methods!( relativeCenterPosition: NSPoint, ); - #[method_id(colorSpace)] + #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Id; #[method(numberOfColorStops)] @@ -98,7 +98,7 @@ extern_methods!( index: NSInteger, ); - #[method_id(interpolatedColorAtLocation:)] + #[method_id(@__retain_semantics Other interpolatedColorAtLocation:)] pub unsafe fn interpolatedColorAtLocation(&self, location: CGFloat) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index 2746fbb64..4e01975e5 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -43,27 +43,27 @@ extern_class!( extern_methods!( unsafe impl NSGraphicsContext { - #[method_id(graphicsContextWithAttributes:)] + #[method_id(@__retain_semantics Other graphicsContextWithAttributes:)] pub unsafe fn graphicsContextWithAttributes( attributes: &NSDictionary, ) -> Option>; - #[method_id(graphicsContextWithWindow:)] + #[method_id(@__retain_semantics Other graphicsContextWithWindow:)] pub unsafe fn graphicsContextWithWindow(window: &NSWindow) -> Id; - #[method_id(graphicsContextWithBitmapImageRep:)] + #[method_id(@__retain_semantics Other graphicsContextWithBitmapImageRep:)] pub unsafe fn graphicsContextWithBitmapImageRep( bitmapRep: &NSBitmapImageRep, ) -> Option>; - #[method_id(graphicsContextWithCGContext:flipped:)] + #[method_id(@__retain_semantics Other graphicsContextWithCGContext:flipped:)] pub unsafe fn graphicsContextWithCGContext_flipped( graphicsPort: CGContextRef, initialFlippedState: bool, ) -> Id; - #[method_id(currentContext)] + #[method_id(@__retain_semantics Other currentContext)] pub unsafe fn currentContext() -> Option>; #[method(setCurrentContext:)] @@ -78,7 +78,7 @@ extern_methods!( #[method(restoreGraphicsState)] pub unsafe fn restoreGraphicsState(); - #[method_id(attributes)] + #[method_id(@__retain_semantics Other attributes)] pub unsafe fn attributes( &self, ) -> Option, Shared>>; @@ -141,7 +141,7 @@ extern_methods!( extern_methods!( /// NSQuartzCoreAdditions unsafe impl NSGraphicsContext { - #[method_id(CIContext)] + #[method_id(@__retain_semantics Other CIContext)] pub unsafe fn CIContext(&self) -> Option>; } ); @@ -152,13 +152,13 @@ extern_methods!( #[method(setGraphicsState:)] pub unsafe fn setGraphicsState(gState: NSInteger); - #[method_id(focusStack)] + #[method_id(@__retain_semantics Other focusStack)] pub unsafe fn focusStack(&self) -> Option>; #[method(setFocusStack:)] pub unsafe fn setFocusStack(&self, stack: Option<&Object>); - #[method_id(graphicsContextWithGraphicsPort:flipped:)] + #[method_id(@__retain_semantics Other graphicsContextWithGraphicsPort:flipped:)] pub unsafe fn graphicsContextWithGraphicsPort_flipped( graphicsPort: NonNull, initialFlippedState: bool, diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index 140d26d87..66c38069a 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -35,25 +35,25 @@ extern_class!( extern_methods!( unsafe impl NSGridView { - #[method_id(initWithFrame:)] + #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame( this: Option>, frameRect: NSRect, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(gridViewWithNumberOfColumns:rows:)] + #[method_id(@__retain_semantics Other gridViewWithNumberOfColumns:rows:)] pub unsafe fn gridViewWithNumberOfColumns_rows( columnCount: NSInteger, rowCount: NSInteger, ) -> Id; - #[method_id(gridViewWithViews:)] + #[method_id(@__retain_semantics Other gridViewWithViews:)] pub unsafe fn gridViewWithViews(rows: &NSArray>) -> Id; #[method(numberOfRows)] @@ -62,32 +62,32 @@ extern_methods!( #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSInteger; - #[method_id(rowAtIndex:)] + #[method_id(@__retain_semantics Other rowAtIndex:)] pub unsafe fn rowAtIndex(&self, index: NSInteger) -> Id; #[method(indexOfRow:)] pub unsafe fn indexOfRow(&self, row: &NSGridRow) -> NSInteger; - #[method_id(columnAtIndex:)] + #[method_id(@__retain_semantics Other columnAtIndex:)] pub unsafe fn columnAtIndex(&self, index: NSInteger) -> Id; #[method(indexOfColumn:)] pub unsafe fn indexOfColumn(&self, column: &NSGridColumn) -> NSInteger; - #[method_id(cellAtColumnIndex:rowIndex:)] + #[method_id(@__retain_semantics Other cellAtColumnIndex:rowIndex:)] pub unsafe fn cellAtColumnIndex_rowIndex( &self, columnIndex: NSInteger, rowIndex: NSInteger, ) -> Id; - #[method_id(cellForView:)] + #[method_id(@__retain_semantics Other cellForView:)] pub unsafe fn cellForView(&self, view: &NSView) -> Option>; - #[method_id(addRowWithViews:)] + #[method_id(@__retain_semantics Other addRowWithViews:)] pub unsafe fn addRowWithViews(&self, views: &NSArray) -> Id; - #[method_id(insertRowAtIndex:withViews:)] + #[method_id(@__retain_semantics Other insertRowAtIndex:withViews:)] pub unsafe fn insertRowAtIndex_withViews( &self, index: NSInteger, @@ -100,13 +100,13 @@ extern_methods!( #[method(removeRowAtIndex:)] pub unsafe fn removeRowAtIndex(&self, index: NSInteger); - #[method_id(addColumnWithViews:)] + #[method_id(@__retain_semantics Other addColumnWithViews:)] pub unsafe fn addColumnWithViews( &self, views: &NSArray, ) -> Id; - #[method_id(insertColumnAtIndex:withViews:)] + #[method_id(@__retain_semantics Other insertColumnAtIndex:withViews:)] pub unsafe fn insertColumnAtIndex_withViews( &self, index: NSInteger, @@ -169,13 +169,13 @@ extern_class!( extern_methods!( unsafe impl NSGridRow { - #[method_id(gridView)] + #[method_id(@__retain_semantics Other gridView)] pub unsafe fn gridView(&self) -> Option>; #[method(numberOfCells)] pub unsafe fn numberOfCells(&self) -> NSInteger; - #[method_id(cellAtIndex:)] + #[method_id(@__retain_semantics Other cellAtIndex:)] pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Id; #[method(yPlacement)] @@ -230,13 +230,13 @@ extern_class!( extern_methods!( unsafe impl NSGridColumn { - #[method_id(gridView)] + #[method_id(@__retain_semantics Other gridView)] pub unsafe fn gridView(&self) -> Option>; #[method(numberOfCells)] pub unsafe fn numberOfCells(&self) -> NSInteger; - #[method_id(cellAtIndex:)] + #[method_id(@__retain_semantics Other cellAtIndex:)] pub unsafe fn cellAtIndex(&self, index: NSInteger) -> Id; #[method(xPlacement)] @@ -285,19 +285,19 @@ extern_class!( extern_methods!( unsafe impl NSGridCell { - #[method_id(contentView)] + #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Option>; #[method(setContentView:)] pub unsafe fn setContentView(&self, contentView: Option<&NSView>); - #[method_id(emptyContentView)] + #[method_id(@__retain_semantics Other emptyContentView)] pub unsafe fn emptyContentView() -> Id; - #[method_id(row)] + #[method_id(@__retain_semantics Other row)] pub unsafe fn row(&self) -> Option>; - #[method_id(column)] + #[method_id(@__retain_semantics Other column)] pub unsafe fn column(&self) -> Option>; #[method(xPlacement)] @@ -318,7 +318,7 @@ extern_methods!( #[method(setRowAlignment:)] pub unsafe fn setRowAlignment(&self, rowAlignment: NSGridRowAlignment); - #[method_id(customPlacementConstraints)] + #[method_id(@__retain_semantics Other customPlacementConstraints)] pub unsafe fn customPlacementConstraints(&self) -> Id, Shared>; #[method(setCustomPlacementConstraints:)] diff --git a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs index 991a9afc2..c666ea5bf 100644 --- a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs @@ -15,31 +15,31 @@ extern_class!( extern_methods!( unsafe impl NSGroupTouchBarItem { - #[method_id(groupItemWithIdentifier:items:)] + #[method_id(@__retain_semantics Other groupItemWithIdentifier:items:)] pub unsafe fn groupItemWithIdentifier_items( identifier: &NSTouchBarItemIdentifier, items: &NSArray, ) -> Id; - #[method_id(groupItemWithIdentifier:items:allowedCompressionOptions:)] + #[method_id(@__retain_semantics Other groupItemWithIdentifier:items:allowedCompressionOptions:)] pub unsafe fn groupItemWithIdentifier_items_allowedCompressionOptions( identifier: &NSTouchBarItemIdentifier, items: &NSArray, allowedCompressionOptions: &NSUserInterfaceCompressionOptions, ) -> Id; - #[method_id(alertStyleGroupItemWithIdentifier:)] + #[method_id(@__retain_semantics Other alertStyleGroupItemWithIdentifier:)] pub unsafe fn alertStyleGroupItemWithIdentifier( identifier: &NSTouchBarItemIdentifier, ) -> Id; - #[method_id(groupTouchBar)] + #[method_id(@__retain_semantics Other groupTouchBar)] pub unsafe fn groupTouchBar(&self) -> Id; #[method(setGroupTouchBar:)] pub unsafe fn setGroupTouchBar(&self, groupTouchBar: &NSTouchBar); - #[method_id(customizationLabel)] + #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[method(setCustomizationLabel:)] @@ -66,12 +66,12 @@ extern_methods!( #[method(setPreferredItemWidth:)] pub unsafe fn setPreferredItemWidth(&self, preferredItemWidth: CGFloat); - #[method_id(effectiveCompressionOptions)] + #[method_id(@__retain_semantics Other effectiveCompressionOptions)] pub unsafe fn effectiveCompressionOptions( &self, ) -> Id; - #[method_id(prioritizedCompressionOptions)] + #[method_id(@__retain_semantics Other prioritizedCompressionOptions)] pub unsafe fn prioritizedCompressionOptions( &self, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs index 14b4ecd84..cae411906 100644 --- a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs +++ b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs @@ -27,7 +27,7 @@ extern_class!( extern_methods!( unsafe impl NSHapticFeedbackManager { - #[method_id(defaultPerformer)] + #[method_id(@__retain_semantics Other defaultPerformer)] pub unsafe fn defaultPerformer() -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSHelpManager.rs b/crates/icrate/src/generated/AppKit/NSHelpManager.rs index e5fb0f708..095b08811 100644 --- a/crates/icrate/src/generated/AppKit/NSHelpManager.rs +++ b/crates/icrate/src/generated/AppKit/NSHelpManager.rs @@ -21,7 +21,7 @@ extern_class!( extern_methods!( unsafe impl NSHelpManager { - #[method_id(sharedHelpManager)] + #[method_id(@__retain_semantics Other sharedHelpManager)] pub unsafe fn sharedHelpManager() -> Id; #[method(isContextHelpModeActive)] @@ -40,7 +40,7 @@ extern_methods!( #[method(removeContextHelpForObject:)] pub unsafe fn removeContextHelpForObject(&self, object: &Object); - #[method_id(contextHelpForObject:)] + #[method_id(@__retain_semantics Other contextHelpForObject:)] pub unsafe fn contextHelpForObject( &self, object: &Object, @@ -79,7 +79,7 @@ extern "C" { extern_methods!( /// NSBundleHelpExtension unsafe impl NSBundle { - #[method_id(contextHelpForKey:)] + #[method_id(@__retain_semantics Other contextHelpForKey:)] pub unsafe fn contextHelpForKey( &self, key: &NSHelpManagerContextHelpKey, diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index 06d6a47af..c8ea4b350 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -46,68 +46,68 @@ extern_class!( extern_methods!( unsafe impl NSImage { - #[method_id(imageNamed:)] + #[method_id(@__retain_semantics Other imageNamed:)] pub unsafe fn imageNamed(name: &NSImageName) -> Option>; - #[method_id(imageWithSystemSymbolName:accessibilityDescription:)] + #[method_id(@__retain_semantics Other imageWithSystemSymbolName:accessibilityDescription:)] pub unsafe fn imageWithSystemSymbolName_accessibilityDescription( symbolName: &NSString, description: Option<&NSString>, ) -> Option>; - #[method_id(initWithSize:)] + #[method_id(@__retain_semantics Init initWithSize:)] pub unsafe fn initWithSize(this: Option>, size: NSSize) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, data: &NSData, ) -> Option>; - #[method_id(initWithContentsOfFile:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( this: Option>, fileName: &NSString, ) -> Option>; - #[method_id(initWithContentsOfURL:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, url: &NSURL, ) -> Option>; - #[method_id(initByReferencingFile:)] + #[method_id(@__retain_semantics Init initByReferencingFile:)] pub unsafe fn initByReferencingFile( this: Option>, fileName: &NSString, ) -> Option>; - #[method_id(initByReferencingURL:)] + #[method_id(@__retain_semantics Init initByReferencingURL:)] pub unsafe fn initByReferencingURL( this: Option>, url: &NSURL, ) -> Id; - #[method_id(initWithPasteboard:)] + #[method_id(@__retain_semantics Init initWithPasteboard:)] pub unsafe fn initWithPasteboard( this: Option>, pasteboard: &NSPasteboard, ) -> Option>; - #[method_id(initWithDataIgnoringOrientation:)] + #[method_id(@__retain_semantics Init initWithDataIgnoringOrientation:)] pub unsafe fn initWithDataIgnoringOrientation( this: Option>, data: &NSData, ) -> Option>; - #[method_id(imageWithSize:flipped:drawingHandler:)] + #[method_id(@__retain_semantics Other imageWithSize:flipped:drawingHandler:)] pub unsafe fn imageWithSize_flipped_drawingHandler( size: NSSize, drawingHandlerShouldBeCalledWithFlippedContext: bool, @@ -123,10 +123,10 @@ extern_methods!( #[method(setName:)] pub unsafe fn setName(&self, string: Option<&NSImageName>) -> bool; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] @@ -195,17 +195,17 @@ extern_methods!( #[method(recache)] pub unsafe fn recache(&self); - #[method_id(TIFFRepresentation)] + #[method_id(@__retain_semantics Other TIFFRepresentation)] pub unsafe fn TIFFRepresentation(&self) -> Option>; - #[method_id(TIFFRepresentationUsingCompression:factor:)] + #[method_id(@__retain_semantics Other TIFFRepresentationUsingCompression:factor:)] pub unsafe fn TIFFRepresentationUsingCompression_factor( &self, comp: NSTIFFCompression, factor: c_float, ) -> Option>; - #[method_id(representations)] + #[method_id(@__retain_semantics Other representations)] pub unsafe fn representations(&self) -> Id, Shared>; #[method(addRepresentations:)] @@ -229,16 +229,16 @@ extern_methods!( #[method(unlockFocus)] pub unsafe fn unlockFocus(&self); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSImageDelegate>); - #[method_id(imageTypes)] + #[method_id(@__retain_semantics Other imageTypes)] pub unsafe fn imageTypes() -> Id, Shared>; - #[method_id(imageUnfilteredTypes)] + #[method_id(@__retain_semantics Other imageUnfilteredTypes)] pub unsafe fn imageUnfilteredTypes() -> Id, Shared>; #[method(canInitWithPasteboard:)] @@ -265,7 +265,7 @@ extern_methods!( #[method(setTemplate:)] pub unsafe fn setTemplate(&self, template: bool); - #[method_id(accessibilityDescription)] + #[method_id(@__retain_semantics Other accessibilityDescription)] pub unsafe fn accessibilityDescription(&self) -> Option>; #[method(setAccessibilityDescription:)] @@ -274,7 +274,7 @@ extern_methods!( accessibilityDescription: Option<&NSString>, ); - #[method_id(initWithCGImage:size:)] + #[method_id(@__retain_semantics Init initWithCGImage:size:)] pub unsafe fn initWithCGImage_size( this: Option>, cgImage: CGImageRef, @@ -289,7 +289,7 @@ extern_methods!( hints: Option<&NSDictionary>, ) -> CGImageRef; - #[method_id(bestRepresentationForRect:context:hints:)] + #[method_id(@__retain_semantics Other bestRepresentationForRect:context:hints:)] pub unsafe fn bestRepresentationForRect_context_hints( &self, rect: NSRect, @@ -313,7 +313,7 @@ extern_methods!( preferredContentsScale: CGFloat, ) -> CGFloat; - #[method_id(layerContentsForContentsScale:)] + #[method_id(@__retain_semantics Other layerContentsForContentsScale:)] pub unsafe fn layerContentsForContentsScale( &self, layerContentsScale: CGFloat, @@ -331,13 +331,13 @@ extern_methods!( #[method(setResizingMode:)] pub unsafe fn setResizingMode(&self, resizingMode: NSImageResizingMode); - #[method_id(imageWithSymbolConfiguration:)] + #[method_id(@__retain_semantics Other imageWithSymbolConfiguration:)] pub unsafe fn imageWithSymbolConfiguration( &self, configuration: &NSImageSymbolConfiguration, ) -> Option>; - #[method_id(symbolConfiguration)] + #[method_id(@__retain_semantics Other symbolConfiguration)] pub unsafe fn symbolConfiguration(&self) -> Id; } ); @@ -351,41 +351,41 @@ pub type NSImageDelegate = NSObject; extern_methods!( /// NSBundleImageExtension unsafe impl NSBundle { - #[method_id(imageForResource:)] + #[method_id(@__retain_semantics Other imageForResource:)] pub unsafe fn imageForResource(&self, name: &NSImageName) -> Option>; - #[method_id(pathForImageResource:)] + #[method_id(@__retain_semantics Other pathForImageResource:)] pub unsafe fn pathForImageResource( &self, name: &NSImageName, ) -> Option>; - #[method_id(URLForImageResource:)] + #[method_id(@__retain_semantics Other URLForImageResource:)] pub unsafe fn URLForImageResource(&self, name: &NSImageName) -> Option>; } ); extern_methods!( unsafe impl NSImage { - #[method_id(bestRepresentationForDevice:)] + #[method_id(@__retain_semantics Other bestRepresentationForDevice:)] pub unsafe fn bestRepresentationForDevice( &self, deviceDescription: Option<&NSDictionary>, ) -> Option>; - #[method_id(imageUnfilteredFileTypes)] + #[method_id(@__retain_semantics Other imageUnfilteredFileTypes)] pub unsafe fn imageUnfilteredFileTypes() -> Id, Shared>; - #[method_id(imageUnfilteredPasteboardTypes)] + #[method_id(@__retain_semantics Other imageUnfilteredPasteboardTypes)] pub unsafe fn imageUnfilteredPasteboardTypes() -> Id, Shared>; - #[method_id(imageFileTypes)] + #[method_id(@__retain_semantics Other imageFileTypes)] pub unsafe fn imageFileTypes() -> Id, Shared>; - #[method_id(imagePasteboardTypes)] + #[method_id(@__retain_semantics Other imagePasteboardTypes)] pub unsafe fn imagePasteboardTypes() -> Id, Shared>; - #[method_id(initWithIconRef:)] + #[method_id(@__retain_semantics Init initWithIconRef:)] pub unsafe fn initWithIconRef( this: Option>, iconRef: IconRef, @@ -1037,45 +1037,45 @@ extern_class!( extern_methods!( unsafe impl NSImageSymbolConfiguration { - #[method_id(configurationWithPointSize:weight:scale:)] + #[method_id(@__retain_semantics Other configurationWithPointSize:weight:scale:)] pub unsafe fn configurationWithPointSize_weight_scale( pointSize: CGFloat, weight: NSFontWeight, scale: NSImageSymbolScale, ) -> Id; - #[method_id(configurationWithPointSize:weight:)] + #[method_id(@__retain_semantics Other configurationWithPointSize:weight:)] pub unsafe fn configurationWithPointSize_weight( pointSize: CGFloat, weight: NSFontWeight, ) -> Id; - #[method_id(configurationWithTextStyle:scale:)] + #[method_id(@__retain_semantics Other configurationWithTextStyle:scale:)] pub unsafe fn configurationWithTextStyle_scale( style: &NSFontTextStyle, scale: NSImageSymbolScale, ) -> Id; - #[method_id(configurationWithTextStyle:)] + #[method_id(@__retain_semantics Other configurationWithTextStyle:)] pub unsafe fn configurationWithTextStyle(style: &NSFontTextStyle) -> Id; - #[method_id(configurationWithScale:)] + #[method_id(@__retain_semantics Other configurationWithScale:)] pub unsafe fn configurationWithScale(scale: NSImageSymbolScale) -> Id; - #[method_id(configurationWithHierarchicalColor:)] + #[method_id(@__retain_semantics Other configurationWithHierarchicalColor:)] pub unsafe fn configurationWithHierarchicalColor( hierarchicalColor: &NSColor, ) -> Id; - #[method_id(configurationWithPaletteColors:)] + #[method_id(@__retain_semantics Other configurationWithPaletteColors:)] pub unsafe fn configurationWithPaletteColors( paletteColors: &NSArray, ) -> Id; - #[method_id(configurationPreferringMulticolor)] + #[method_id(@__retain_semantics Other configurationPreferringMulticolor)] pub unsafe fn configurationPreferringMulticolor() -> Id; - #[method_id(configurationByApplyingConfiguration:)] + #[method_id(@__retain_semantics Other configurationByApplyingConfiguration:)] pub unsafe fn configurationByApplyingConfiguration( &self, configuration: &NSImageSymbolConfiguration, diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index af0b00a68..a833cb150 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -24,10 +24,10 @@ extern_class!( extern_methods!( unsafe impl NSImageRep { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -71,7 +71,7 @@ extern_methods!( #[method(setOpaque:)] pub unsafe fn setOpaque(&self, opaque: bool); - #[method_id(colorSpaceName)] + #[method_id(@__retain_semantics Other colorSpaceName)] pub unsafe fn colorSpaceName(&self) -> Id; #[method(setColorSpaceName:)] @@ -107,7 +107,7 @@ extern_methods!( #[method(unregisterImageRepClass:)] pub unsafe fn unregisterImageRepClass(imageRepClass: &Class); - #[method_id(registeredImageRepClasses)] + #[method_id(@__retain_semantics Other registeredImageRepClasses)] pub unsafe fn registeredImageRepClasses() -> Id, Shared>; #[method(imageRepClassForFileType:)] @@ -127,51 +127,51 @@ extern_methods!( #[method(canInitWithData:)] pub unsafe fn canInitWithData(data: &NSData) -> bool; - #[method_id(imageUnfilteredFileTypes)] + #[method_id(@__retain_semantics Other imageUnfilteredFileTypes)] pub unsafe fn imageUnfilteredFileTypes() -> Id, Shared>; - #[method_id(imageUnfilteredPasteboardTypes)] + #[method_id(@__retain_semantics Other imageUnfilteredPasteboardTypes)] pub unsafe fn imageUnfilteredPasteboardTypes() -> Id, Shared>; - #[method_id(imageFileTypes)] + #[method_id(@__retain_semantics Other imageFileTypes)] pub unsafe fn imageFileTypes() -> Id, Shared>; - #[method_id(imagePasteboardTypes)] + #[method_id(@__retain_semantics Other imagePasteboardTypes)] pub unsafe fn imagePasteboardTypes() -> Id, Shared>; - #[method_id(imageUnfilteredTypes)] + #[method_id(@__retain_semantics Other imageUnfilteredTypes)] pub unsafe fn imageUnfilteredTypes() -> Id, Shared>; - #[method_id(imageTypes)] + #[method_id(@__retain_semantics Other imageTypes)] pub unsafe fn imageTypes() -> Id, Shared>; #[method(canInitWithPasteboard:)] pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; - #[method_id(imageRepsWithContentsOfFile:)] + #[method_id(@__retain_semantics Other imageRepsWithContentsOfFile:)] pub unsafe fn imageRepsWithContentsOfFile( filename: &NSString, ) -> Option, Shared>>; - #[method_id(imageRepWithContentsOfFile:)] + #[method_id(@__retain_semantics Other imageRepWithContentsOfFile:)] pub unsafe fn imageRepWithContentsOfFile( filename: &NSString, ) -> Option>; - #[method_id(imageRepsWithContentsOfURL:)] + #[method_id(@__retain_semantics Other imageRepsWithContentsOfURL:)] pub unsafe fn imageRepsWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; - #[method_id(imageRepWithContentsOfURL:)] + #[method_id(@__retain_semantics Other imageRepWithContentsOfURL:)] pub unsafe fn imageRepWithContentsOfURL(url: &NSURL) -> Option>; - #[method_id(imageRepsWithPasteboard:)] + #[method_id(@__retain_semantics Other imageRepsWithPasteboard:)] pub unsafe fn imageRepsWithPasteboard( pasteboard: &NSPasteboard, ) -> Option, Shared>>; - #[method_id(imageRepWithPasteboard:)] + #[method_id(@__retain_semantics Other imageRepWithPasteboard:)] pub unsafe fn imageRepWithPasteboard( pasteboard: &NSPasteboard, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSImageView.rs b/crates/icrate/src/generated/AppKit/NSImageView.rs index a1fcc3428..74d8dce57 100644 --- a/crates/icrate/src/generated/AppKit/NSImageView.rs +++ b/crates/icrate/src/generated/AppKit/NSImageView.rs @@ -15,10 +15,10 @@ extern_class!( extern_methods!( unsafe impl NSImageView { - #[method_id(imageViewWithImage:)] + #[method_id(@__retain_semantics Other imageViewWithImage:)] pub unsafe fn imageViewWithImage(image: &NSImage) -> Id; - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] @@ -48,7 +48,7 @@ extern_methods!( #[method(setImageFrameStyle:)] pub unsafe fn setImageFrameStyle(&self, imageFrameStyle: NSImageFrameStyle); - #[method_id(symbolConfiguration)] + #[method_id(@__retain_semantics Other symbolConfiguration)] pub unsafe fn symbolConfiguration(&self) -> Option>; #[method(setSymbolConfiguration:)] @@ -57,7 +57,7 @@ extern_methods!( symbolConfiguration: Option<&NSImageSymbolConfiguration>, ); - #[method_id(contentTintColor)] + #[method_id(@__retain_semantics Other contentTintColor)] pub unsafe fn contentTintColor(&self) -> Option>; #[method(setContentTintColor:)] diff --git a/crates/icrate/src/generated/AppKit/NSInputManager.rs b/crates/icrate/src/generated/AppKit/NSInputManager.rs index 40197ff4f..49d02cd89 100644 --- a/crates/icrate/src/generated/AppKit/NSInputManager.rs +++ b/crates/icrate/src/generated/AppKit/NSInputManager.rs @@ -17,7 +17,7 @@ extern_class!( extern_methods!( unsafe impl NSInputManager { - #[method_id(currentInputManager)] + #[method_id(@__retain_semantics Other currentInputManager)] pub unsafe fn currentInputManager() -> Option>; #[method(cycleToNextInputLanguage:)] @@ -26,14 +26,14 @@ extern_methods!( #[method(cycleToNextInputServerInLanguage:)] pub unsafe fn cycleToNextInputServerInLanguage(sender: Option<&Object>); - #[method_id(initWithName:host:)] + #[method_id(@__retain_semantics Init initWithName:host:)] pub unsafe fn initWithName_host( this: Option>, inputServerName: Option<&NSString>, hostName: Option<&NSString>, ) -> Option>; - #[method_id(localizedInputManagerName)] + #[method_id(@__retain_semantics Other localizedInputManagerName)] pub unsafe fn localizedInputManagerName(&self) -> Option>; #[method(markedTextAbandoned:)] @@ -49,13 +49,13 @@ extern_methods!( #[method(wantsToInterpretAllKeystrokes)] pub unsafe fn wantsToInterpretAllKeystrokes(&self) -> bool; - #[method_id(language)] + #[method_id(@__retain_semantics Other language)] pub unsafe fn language(&self) -> Option>; - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; - #[method_id(server)] + #[method_id(@__retain_semantics Other server)] pub unsafe fn server(&self) -> Option>; #[method(wantsToHandleMouseEvents)] diff --git a/crates/icrate/src/generated/AppKit/NSInputServer.rs b/crates/icrate/src/generated/AppKit/NSInputServer.rs index eca62cb12..f71208a44 100644 --- a/crates/icrate/src/generated/AppKit/NSInputServer.rs +++ b/crates/icrate/src/generated/AppKit/NSInputServer.rs @@ -19,7 +19,7 @@ extern_class!( extern_methods!( unsafe impl NSInputServer { - #[method_id(initWithDelegate:name:)] + #[method_id(@__retain_semantics Init initWithDelegate:name:)] pub unsafe fn initWithDelegate_name( this: Option>, delegate: Option<&Object>, diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index f5d6a9434..639c3c182 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -19,16 +19,16 @@ extern_class!( extern_methods!( unsafe impl NSBindingSelectionMarker { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(multipleValuesSelectionMarker)] + #[method_id(@__retain_semantics Other multipleValuesSelectionMarker)] pub unsafe fn multipleValuesSelectionMarker() -> Id; - #[method_id(noSelectionMarker)] + #[method_id(@__retain_semantics Other noSelectionMarker)] pub unsafe fn noSelectionMarker() -> Id; - #[method_id(notApplicableSelectionMarker)] + #[method_id(@__retain_semantics Other notApplicableSelectionMarker)] pub unsafe fn notApplicableSelectionMarker() -> Id; #[method(setDefaultPlaceholder:forMarker:onClass:withBinding:)] @@ -39,7 +39,7 @@ extern_methods!( binding: &NSBindingName, ); - #[method_id(defaultPlaceholderForMarker:onClass:withBinding:)] + #[method_id(@__retain_semantics Other defaultPlaceholderForMarker:onClass:withBinding:)] pub unsafe fn defaultPlaceholderForMarker_onClass_withBinding( marker: Option<&NSBindingSelectionMarker>, objectClass: &Class, @@ -80,7 +80,7 @@ extern_methods!( #[method(exposeBinding:)] pub unsafe fn exposeBinding(binding: &NSBindingName); - #[method_id(exposedBindings)] + #[method_id(@__retain_semantics Other exposedBindings)] pub unsafe fn exposedBindings(&self) -> Id, Shared>; #[method(valueClassForBinding:)] @@ -101,13 +101,13 @@ extern_methods!( #[method(unbind:)] pub unsafe fn unbind(&self, binding: &NSBindingName); - #[method_id(infoForBinding:)] + #[method_id(@__retain_semantics Other infoForBinding:)] pub unsafe fn infoForBinding( &self, binding: &NSBindingName, ) -> Option, Shared>>; - #[method_id(optionDescriptionsForBinding:)] + #[method_id(@__retain_semantics Other optionDescriptionsForBinding:)] pub unsafe fn optionDescriptionsForBinding( &self, binding: &NSBindingName, @@ -125,7 +125,7 @@ extern_methods!( binding: &NSBindingName, ); - #[method_id(defaultPlaceholderForMarker:withBinding:)] + #[method_id(@__retain_semantics Other defaultPlaceholderForMarker:withBinding:)] pub unsafe fn defaultPlaceholderForMarker_withBinding( marker: Option<&Object>, binding: &NSBindingName, diff --git a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs index b972259f7..63c9867ad 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs @@ -17,55 +17,55 @@ __inner_extern_class!( extern_methods!( unsafe impl NSLayoutAnchor { - #[method_id(constraintEqualToAnchor:)] + #[method_id(@__retain_semantics Other constraintEqualToAnchor:)] pub unsafe fn constraintEqualToAnchor( &self, anchor: &NSLayoutAnchor, ) -> Id; - #[method_id(constraintGreaterThanOrEqualToAnchor:)] + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToAnchor:)] pub unsafe fn constraintGreaterThanOrEqualToAnchor( &self, anchor: &NSLayoutAnchor, ) -> Id; - #[method_id(constraintLessThanOrEqualToAnchor:)] + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToAnchor:)] pub unsafe fn constraintLessThanOrEqualToAnchor( &self, anchor: &NSLayoutAnchor, ) -> Id; - #[method_id(constraintEqualToAnchor:constant:)] + #[method_id(@__retain_semantics Other constraintEqualToAnchor:constant:)] pub unsafe fn constraintEqualToAnchor_constant( &self, anchor: &NSLayoutAnchor, c: CGFloat, ) -> Id; - #[method_id(constraintGreaterThanOrEqualToAnchor:constant:)] + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToAnchor:constant:)] pub unsafe fn constraintGreaterThanOrEqualToAnchor_constant( &self, anchor: &NSLayoutAnchor, c: CGFloat, ) -> Id; - #[method_id(constraintLessThanOrEqualToAnchor:constant:)] + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToAnchor:constant:)] pub unsafe fn constraintLessThanOrEqualToAnchor_constant( &self, anchor: &NSLayoutAnchor, c: CGFloat, ) -> Id; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; - #[method_id(item)] + #[method_id(@__retain_semantics Other item)] pub unsafe fn item(&self) -> Option>; #[method(hasAmbiguousLayout)] pub unsafe fn hasAmbiguousLayout(&self) -> bool; - #[method_id(constraintsAffectingLayout)] + #[method_id(@__retain_semantics Other constraintsAffectingLayout)] pub unsafe fn constraintsAffectingLayout(&self) -> Id, Shared>; } ); @@ -81,27 +81,27 @@ extern_class!( extern_methods!( unsafe impl NSLayoutXAxisAnchor { - #[method_id(anchorWithOffsetToAnchor:)] + #[method_id(@__retain_semantics Other anchorWithOffsetToAnchor:)] pub unsafe fn anchorWithOffsetToAnchor( &self, otherAnchor: &NSLayoutXAxisAnchor, ) -> Id; - #[method_id(constraintEqualToSystemSpacingAfterAnchor:multiplier:)] + #[method_id(@__retain_semantics Other constraintEqualToSystemSpacingAfterAnchor:multiplier:)] pub unsafe fn constraintEqualToSystemSpacingAfterAnchor_multiplier( &self, anchor: &NSLayoutXAxisAnchor, multiplier: CGFloat, ) -> Id; - #[method_id(constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:)] + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:)] pub unsafe fn constraintGreaterThanOrEqualToSystemSpacingAfterAnchor_multiplier( &self, anchor: &NSLayoutXAxisAnchor, multiplier: CGFloat, ) -> Id; - #[method_id(constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:)] + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:)] pub unsafe fn constraintLessThanOrEqualToSystemSpacingAfterAnchor_multiplier( &self, anchor: &NSLayoutXAxisAnchor, @@ -121,27 +121,27 @@ extern_class!( extern_methods!( unsafe impl NSLayoutYAxisAnchor { - #[method_id(anchorWithOffsetToAnchor:)] + #[method_id(@__retain_semantics Other anchorWithOffsetToAnchor:)] pub unsafe fn anchorWithOffsetToAnchor( &self, otherAnchor: &NSLayoutYAxisAnchor, ) -> Id; - #[method_id(constraintEqualToSystemSpacingBelowAnchor:multiplier:)] + #[method_id(@__retain_semantics Other constraintEqualToSystemSpacingBelowAnchor:multiplier:)] pub unsafe fn constraintEqualToSystemSpacingBelowAnchor_multiplier( &self, anchor: &NSLayoutYAxisAnchor, multiplier: CGFloat, ) -> Id; - #[method_id(constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:)] + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:)] pub unsafe fn constraintGreaterThanOrEqualToSystemSpacingBelowAnchor_multiplier( &self, anchor: &NSLayoutYAxisAnchor, multiplier: CGFloat, ) -> Id; - #[method_id(constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:)] + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:)] pub unsafe fn constraintLessThanOrEqualToSystemSpacingBelowAnchor_multiplier( &self, anchor: &NSLayoutYAxisAnchor, @@ -161,46 +161,46 @@ extern_class!( extern_methods!( unsafe impl NSLayoutDimension { - #[method_id(constraintEqualToConstant:)] + #[method_id(@__retain_semantics Other constraintEqualToConstant:)] pub unsafe fn constraintEqualToConstant( &self, c: CGFloat, ) -> Id; - #[method_id(constraintGreaterThanOrEqualToConstant:)] + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToConstant:)] pub unsafe fn constraintGreaterThanOrEqualToConstant( &self, c: CGFloat, ) -> Id; - #[method_id(constraintLessThanOrEqualToConstant:)] + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToConstant:)] pub unsafe fn constraintLessThanOrEqualToConstant( &self, c: CGFloat, ) -> Id; - #[method_id(constraintEqualToAnchor:multiplier:)] + #[method_id(@__retain_semantics Other constraintEqualToAnchor:multiplier:)] pub unsafe fn constraintEqualToAnchor_multiplier( &self, anchor: &NSLayoutDimension, m: CGFloat, ) -> Id; - #[method_id(constraintGreaterThanOrEqualToAnchor:multiplier:)] + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToAnchor:multiplier:)] pub unsafe fn constraintGreaterThanOrEqualToAnchor_multiplier( &self, anchor: &NSLayoutDimension, m: CGFloat, ) -> Id; - #[method_id(constraintLessThanOrEqualToAnchor:multiplier:)] + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToAnchor:multiplier:)] pub unsafe fn constraintLessThanOrEqualToAnchor_multiplier( &self, anchor: &NSLayoutDimension, m: CGFloat, ) -> Id; - #[method_id(constraintEqualToAnchor:multiplier:constant:)] + #[method_id(@__retain_semantics Other constraintEqualToAnchor:multiplier:constant:)] pub unsafe fn constraintEqualToAnchor_multiplier_constant( &self, anchor: &NSLayoutDimension, @@ -208,7 +208,7 @@ extern_methods!( c: CGFloat, ) -> Id; - #[method_id(constraintGreaterThanOrEqualToAnchor:multiplier:constant:)] + #[method_id(@__retain_semantics Other constraintGreaterThanOrEqualToAnchor:multiplier:constant:)] pub unsafe fn constraintGreaterThanOrEqualToAnchor_multiplier_constant( &self, anchor: &NSLayoutDimension, @@ -216,7 +216,7 @@ extern_methods!( c: CGFloat, ) -> Id; - #[method_id(constraintLessThanOrEqualToAnchor:multiplier:constant:)] + #[method_id(@__retain_semantics Other constraintLessThanOrEqualToAnchor:multiplier:constant:)] pub unsafe fn constraintLessThanOrEqualToAnchor_multiplier_constant( &self, anchor: &NSLayoutDimension, diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index 88b3b49ee..56442c7df 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -75,7 +75,7 @@ extern_class!( extern_methods!( unsafe impl NSLayoutConstraint { - #[method_id(constraintsWithVisualFormat:options:metrics:views:)] + #[method_id(@__retain_semantics Other constraintsWithVisualFormat:options:metrics:views:)] pub unsafe fn constraintsWithVisualFormat_options_metrics_views( format: &NSString, opts: NSLayoutFormatOptions, @@ -83,7 +83,7 @@ extern_methods!( views: &NSDictionary, ) -> Id, Shared>; - #[method_id(constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:)] + #[method_id(@__retain_semantics Other constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:)] pub unsafe fn constraintWithItem_attribute_relatedBy_toItem_attribute_multiplier_constant( view1: &Object, attr1: NSLayoutAttribute, @@ -106,10 +106,10 @@ extern_methods!( #[method(setShouldBeArchived:)] pub unsafe fn setShouldBeArchived(&self, shouldBeArchived: bool); - #[method_id(firstItem)] + #[method_id(@__retain_semantics Other firstItem)] pub unsafe fn firstItem(&self) -> Option>; - #[method_id(secondItem)] + #[method_id(@__retain_semantics Other secondItem)] pub unsafe fn secondItem(&self) -> Option>; #[method(firstAttribute)] @@ -118,10 +118,10 @@ extern_methods!( #[method(secondAttribute)] pub unsafe fn secondAttribute(&self) -> NSLayoutAttribute; - #[method_id(firstAnchor)] + #[method_id(@__retain_semantics Other firstAnchor)] pub unsafe fn firstAnchor(&self) -> Id; - #[method_id(secondAnchor)] + #[method_id(@__retain_semantics Other secondAnchor)] pub unsafe fn secondAnchor(&self) -> Option>; #[method(relation)] @@ -153,7 +153,7 @@ extern_methods!( extern_methods!( /// NSIdentifier unsafe impl NSLayoutConstraint { - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Option>; #[method(setIdentifier:)] @@ -168,43 +168,43 @@ extern_methods!( extern_methods!( /// NSConstraintBasedLayoutInstallingConstraints unsafe impl NSView { - #[method_id(leadingAnchor)] + #[method_id(@__retain_semantics Other leadingAnchor)] pub unsafe fn leadingAnchor(&self) -> Id; - #[method_id(trailingAnchor)] + #[method_id(@__retain_semantics Other trailingAnchor)] pub unsafe fn trailingAnchor(&self) -> Id; - #[method_id(leftAnchor)] + #[method_id(@__retain_semantics Other leftAnchor)] pub unsafe fn leftAnchor(&self) -> Id; - #[method_id(rightAnchor)] + #[method_id(@__retain_semantics Other rightAnchor)] pub unsafe fn rightAnchor(&self) -> Id; - #[method_id(topAnchor)] + #[method_id(@__retain_semantics Other topAnchor)] pub unsafe fn topAnchor(&self) -> Id; - #[method_id(bottomAnchor)] + #[method_id(@__retain_semantics Other bottomAnchor)] pub unsafe fn bottomAnchor(&self) -> Id; - #[method_id(widthAnchor)] + #[method_id(@__retain_semantics Other widthAnchor)] pub unsafe fn widthAnchor(&self) -> Id; - #[method_id(heightAnchor)] + #[method_id(@__retain_semantics Other heightAnchor)] pub unsafe fn heightAnchor(&self) -> Id; - #[method_id(centerXAnchor)] + #[method_id(@__retain_semantics Other centerXAnchor)] pub unsafe fn centerXAnchor(&self) -> Id; - #[method_id(centerYAnchor)] + #[method_id(@__retain_semantics Other centerYAnchor)] pub unsafe fn centerYAnchor(&self) -> Id; - #[method_id(firstBaselineAnchor)] + #[method_id(@__retain_semantics Other firstBaselineAnchor)] pub unsafe fn firstBaselineAnchor(&self) -> Id; - #[method_id(lastBaselineAnchor)] + #[method_id(@__retain_semantics Other lastBaselineAnchor)] pub unsafe fn lastBaselineAnchor(&self) -> Id; - #[method_id(constraints)] + #[method_id(@__retain_semantics Other constraints)] pub unsafe fn constraints(&self) -> Id, Shared>; #[method(addConstraint:)] @@ -384,7 +384,7 @@ extern_methods!( extern_methods!( /// NSConstraintBasedLayoutDebugging unsafe impl NSView { - #[method_id(constraintsAffectingLayoutForOrientation:)] + #[method_id(@__retain_semantics Other constraintsAffectingLayoutForOrientation:)] pub unsafe fn constraintsAffectingLayoutForOrientation( &self, orientation: NSLayoutConstraintOrientation, diff --git a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs index e2f65b8b1..93e34e82d 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs @@ -18,52 +18,52 @@ extern_methods!( #[method(frame)] pub unsafe fn frame(&self) -> NSRect; - #[method_id(owningView)] + #[method_id(@__retain_semantics Other owningView)] pub unsafe fn owningView(&self) -> Option>; #[method(setOwningView:)] pub unsafe fn setOwningView(&self, owningView: Option<&NSView>); - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Id; #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: &NSUserInterfaceItemIdentifier); - #[method_id(leadingAnchor)] + #[method_id(@__retain_semantics Other leadingAnchor)] pub unsafe fn leadingAnchor(&self) -> Id; - #[method_id(trailingAnchor)] + #[method_id(@__retain_semantics Other trailingAnchor)] pub unsafe fn trailingAnchor(&self) -> Id; - #[method_id(leftAnchor)] + #[method_id(@__retain_semantics Other leftAnchor)] pub unsafe fn leftAnchor(&self) -> Id; - #[method_id(rightAnchor)] + #[method_id(@__retain_semantics Other rightAnchor)] pub unsafe fn rightAnchor(&self) -> Id; - #[method_id(topAnchor)] + #[method_id(@__retain_semantics Other topAnchor)] pub unsafe fn topAnchor(&self) -> Id; - #[method_id(bottomAnchor)] + #[method_id(@__retain_semantics Other bottomAnchor)] pub unsafe fn bottomAnchor(&self) -> Id; - #[method_id(widthAnchor)] + #[method_id(@__retain_semantics Other widthAnchor)] pub unsafe fn widthAnchor(&self) -> Id; - #[method_id(heightAnchor)] + #[method_id(@__retain_semantics Other heightAnchor)] pub unsafe fn heightAnchor(&self) -> Id; - #[method_id(centerXAnchor)] + #[method_id(@__retain_semantics Other centerXAnchor)] pub unsafe fn centerXAnchor(&self) -> Id; - #[method_id(centerYAnchor)] + #[method_id(@__retain_semantics Other centerYAnchor)] pub unsafe fn centerYAnchor(&self) -> Id; #[method(hasAmbiguousLayout)] pub unsafe fn hasAmbiguousLayout(&self) -> bool; - #[method_id(constraintsAffectingLayoutForOrientation:)] + #[method_id(@__retain_semantics Other constraintsAffectingLayoutForOrientation:)] pub unsafe fn constraintsAffectingLayoutForOrientation( &self, orientation: NSLayoutConstraintOrientation, @@ -80,7 +80,7 @@ extern_methods!( #[method(removeLayoutGuide:)] pub unsafe fn removeLayoutGuide(&self, guide: &NSLayoutGuide); - #[method_id(layoutGuides)] + #[method_id(@__retain_semantics Other layoutGuides)] pub unsafe fn layoutGuides(&self) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index 63a70ce21..1bdab2953 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -43,16 +43,16 @@ extern_class!( extern_methods!( unsafe impl NSLayoutManager { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(textStorage)] + #[method_id(@__retain_semantics Other textStorage)] pub unsafe fn textStorage(&self) -> Option>; #[method(setTextStorage:)] @@ -61,7 +61,7 @@ extern_methods!( #[method(replaceTextStorage:)] pub unsafe fn replaceTextStorage(&self, newTextStorage: &NSTextStorage); - #[method_id(textContainers)] + #[method_id(@__retain_semantics Other textContainers)] pub unsafe fn textContainers(&self) -> Id, Shared>; #[method(addTextContainer:)] @@ -83,7 +83,7 @@ extern_methods!( #[method(textContainerChangedTextView:)] pub unsafe fn textContainerChangedTextView(&self, container: &NSTextContainer); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -143,7 +143,7 @@ extern_methods!( #[method(setDefaultAttachmentScaling:)] pub unsafe fn setDefaultAttachmentScaling(&self, defaultAttachmentScaling: NSImageScaling); - #[method_id(typesetter)] + #[method_id(@__retain_semantics Other typesetter)] pub unsafe fn typesetter(&self) -> Id; #[method(setTypesetter:)] @@ -317,14 +317,14 @@ extern_methods!( #[method(firstUnlaidGlyphIndex)] pub unsafe fn firstUnlaidGlyphIndex(&self) -> NSUInteger; - #[method_id(textContainerForGlyphAtIndex:effectiveRange:)] + #[method_id(@__retain_semantics Other textContainerForGlyphAtIndex:effectiveRange:)] pub unsafe fn textContainerForGlyphAtIndex_effectiveRange( &self, glyphIndex: NSUInteger, effectiveGlyphRange: NSRangePointer, ) -> Option>; - #[method_id(textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:)] + #[method_id(@__retain_semantics Other textContainerForGlyphAtIndex:effectiveRange:withoutAdditionalLayout:)] pub unsafe fn textContainerForGlyphAtIndex_effectiveRange_withoutAdditionalLayout( &self, glyphIndex: NSUInteger, @@ -371,7 +371,7 @@ extern_methods!( #[method(extraLineFragmentUsedRect)] pub unsafe fn extraLineFragmentUsedRect(&self) -> NSRect; - #[method_id(extraLineFragmentTextContainer)] + #[method_id(@__retain_semantics Other extraLineFragmentTextContainer)] pub unsafe fn extraLineFragmentTextContainer(&self) -> Option>; #[method(locationForGlyphAtIndex:)] @@ -626,7 +626,7 @@ extern_methods!( effectiveGlyphRange: NSRangePointer, ) -> NSRect; - #[method_id(temporaryAttributesAtCharacterIndex:effectiveRange:)] + #[method_id(@__retain_semantics Other temporaryAttributesAtCharacterIndex:effectiveRange:)] pub unsafe fn temporaryAttributesAtCharacterIndex_effectiveRange( &self, charIndex: NSUInteger, @@ -654,7 +654,7 @@ extern_methods!( charRange: NSRange, ); - #[method_id(temporaryAttribute:atCharacterIndex:effectiveRange:)] + #[method_id(@__retain_semantics Other temporaryAttribute:atCharacterIndex:effectiveRange:)] pub unsafe fn temporaryAttribute_atCharacterIndex_effectiveRange( &self, attrName: &NSAttributedStringKey, @@ -662,7 +662,7 @@ extern_methods!( range: NSRangePointer, ) -> Option>; - #[method_id(temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:)] + #[method_id(@__retain_semantics Other temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:)] pub unsafe fn temporaryAttribute_atCharacterIndex_longestEffectiveRange_inRange( &self, attrName: &NSAttributedStringKey, @@ -671,7 +671,7 @@ extern_methods!( rangeLimit: NSRange, ) -> Option>; - #[method_id(temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:)] + #[method_id(@__retain_semantics Other temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:)] pub unsafe fn temporaryAttributesAtCharacterIndex_longestEffectiveRange_inRange( &self, location: NSUInteger, @@ -698,7 +698,7 @@ extern_methods!( extern_methods!( /// NSTextViewSupport unsafe impl NSLayoutManager { - #[method_id(rulerMarkersForTextView:paragraphStyle:ruler:)] + #[method_id(@__retain_semantics Other rulerMarkersForTextView:paragraphStyle:ruler:)] pub unsafe fn rulerMarkersForTextView_paragraphStyle_ruler( &self, view: &NSTextView, @@ -706,7 +706,7 @@ extern_methods!( ruler: &NSRulerView, ) -> Id, Shared>; - #[method_id(rulerAccessoryViewForTextView:paragraphStyle:ruler:enabled:)] + #[method_id(@__retain_semantics Other rulerAccessoryViewForTextView:paragraphStyle:ruler:enabled:)] pub unsafe fn rulerAccessoryViewForTextView_paragraphStyle_ruler_enabled( &self, view: &NSTextView, @@ -718,10 +718,10 @@ extern_methods!( #[method(layoutManagerOwnsFirstResponderInWindow:)] pub unsafe fn layoutManagerOwnsFirstResponderInWindow(&self, window: &NSWindow) -> bool; - #[method_id(firstTextView)] + #[method_id(@__retain_semantics Other firstTextView)] pub unsafe fn firstTextView(&self) -> Option>; - #[method_id(textViewForBeginningOfSelection)] + #[method_id(@__retain_semantics Other textViewForBeginningOfSelection)] pub unsafe fn textViewForBeginningOfSelection(&self) -> Option>; } ); @@ -777,7 +777,7 @@ extern_methods!( #[method(setUsesScreenFonts:)] pub unsafe fn setUsesScreenFonts(&self, usesScreenFonts: bool); - #[method_id(substituteFontForFont:)] + #[method_id(@__retain_semantics Other substituteFontForFont:)] pub unsafe fn substituteFontForFont(&self, originalFont: &NSFont) -> Id; #[method(insertGlyphs:length:forStartingGlyphAtIndex:characterIndex:)] @@ -922,7 +922,7 @@ extern_methods!( extern_methods!( /// NSGlyphGeneration unsafe impl NSLayoutManager { - #[method_id(glyphGenerator)] + #[method_id(@__retain_semantics Other glyphGenerator)] pub unsafe fn glyphGenerator(&self) -> Id; #[method(setGlyphGenerator:)] diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs index 6d7845ec0..e37c53701 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs @@ -81,19 +81,19 @@ extern_methods!( #[method(rectOfTickMarkAtIndex:)] pub unsafe fn rectOfTickMarkAtIndex(&self, index: NSInteger) -> NSRect; - #[method_id(fillColor)] + #[method_id(@__retain_semantics Other fillColor)] pub unsafe fn fillColor(&self) -> Id; #[method(setFillColor:)] pub unsafe fn setFillColor(&self, fillColor: Option<&NSColor>); - #[method_id(warningFillColor)] + #[method_id(@__retain_semantics Other warningFillColor)] pub unsafe fn warningFillColor(&self) -> Id; #[method(setWarningFillColor:)] pub unsafe fn setWarningFillColor(&self, warningFillColor: Option<&NSColor>); - #[method_id(criticalFillColor)] + #[method_id(@__retain_semantics Other criticalFillColor)] pub unsafe fn criticalFillColor(&self) -> Id; #[method(setCriticalFillColor:)] @@ -114,13 +114,13 @@ extern_methods!( placeholderVisibility: NSLevelIndicatorPlaceholderVisibility, ); - #[method_id(ratingImage)] + #[method_id(@__retain_semantics Other ratingImage)] pub unsafe fn ratingImage(&self) -> Option>; #[method(setRatingImage:)] pub unsafe fn setRatingImage(&self, ratingImage: Option<&NSImage>); - #[method_id(ratingPlaceholderImage)] + #[method_id(@__retain_semantics Other ratingPlaceholderImage)] pub unsafe fn ratingPlaceholderImage(&self) -> Option>; #[method(setRatingPlaceholderImage:)] diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs index cd259d025..677369a61 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -21,7 +21,7 @@ extern_class!( extern_methods!( unsafe impl NSLevelIndicatorCell { - #[method_id(initWithLevelIndicatorStyle:)] + #[method_id(@__retain_semantics Init initWithLevelIndicatorStyle:)] pub unsafe fn initWithLevelIndicatorStyle( this: Option>, levelIndicatorStyle: NSLevelIndicatorStyle, diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index 9df0db32d..4141ec88c 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -21,13 +21,13 @@ extern_class!( extern_methods!( unsafe impl NSMatrix { - #[method_id(initWithFrame:)] + #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame( this: Option>, frameRect: NSRect, ) -> Id; - #[method_id(initWithFrame:mode:prototype:numberOfRows:numberOfColumns:)] + #[method_id(@__retain_semantics Init initWithFrame:mode:prototype:numberOfRows:numberOfColumns:)] pub unsafe fn initWithFrame_mode_prototype_numberOfRows_numberOfColumns( this: Option>, frameRect: NSRect, @@ -37,7 +37,7 @@ extern_methods!( colsWide: NSInteger, ) -> Id; - #[method_id(initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:)] + #[method_id(@__retain_semantics Init initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:)] pub unsafe fn initWithFrame_mode_cellClass_numberOfRows_numberOfColumns( this: Option>, frameRect: NSRect, @@ -53,13 +53,13 @@ extern_methods!( #[method(setCellClass:)] pub unsafe fn setCellClass(&self, cellClass: &Class); - #[method_id(prototype)] + #[method_id(@__retain_semantics Other prototype)] pub unsafe fn prototype(&self) -> Option>; #[method(setPrototype:)] pub unsafe fn setPrototype(&self, prototype: Option<&NSCell>); - #[method_id(makeCellAtRow:column:)] + #[method_id(@__retain_semantics Other makeCellAtRow:column:)] pub unsafe fn makeCellAtRow_column( &self, row: NSInteger, @@ -81,7 +81,7 @@ extern_methods!( #[method(sendAction:to:forAllCells:)] pub unsafe fn sendAction_to_forAllCells(&self, selector: Sel, object: &Object, flag: bool); - #[method_id(cells)] + #[method_id(@__retain_semantics Other cells)] pub unsafe fn cells(&self) -> Id, Shared>; #[method(sortUsingSelector:)] @@ -94,10 +94,10 @@ extern_methods!( context: *mut c_void, ); - #[method_id(selectedCell)] + #[method_id(@__retain_semantics Other selectedCell)] pub unsafe fn selectedCell(&self) -> Option>; - #[method_id(selectedCells)] + #[method_id(@__retain_semantics Other selectedCells)] pub unsafe fn selectedCells(&self) -> Id, Shared>; #[method(selectedRow)] @@ -151,13 +151,13 @@ extern_methods!( #[method(setScrollable:)] pub unsafe fn setScrollable(&self, flag: bool); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); - #[method_id(cellBackgroundColor)] + #[method_id(@__retain_semantics Other cellBackgroundColor)] pub unsafe fn cellBackgroundColor(&self) -> Option>; #[method(setCellBackgroundColor:)] @@ -196,7 +196,7 @@ extern_methods!( #[method(numberOfColumns)] pub unsafe fn numberOfColumns(&self) -> NSInteger; - #[method_id(cellAtRow:column:)] + #[method_id(@__retain_semantics Other cellAtRow:column:)] pub unsafe fn cellAtRow_column( &self, row: NSInteger, @@ -266,7 +266,7 @@ extern_methods!( #[method(removeColumn:)] pub unsafe fn removeColumn(&self, col: NSInteger); - #[method_id(cellWithTag:)] + #[method_id(@__retain_semantics Other cellWithTag:)] pub unsafe fn cellWithTag(&self, tag: NSInteger) -> Option>; #[method(doubleAction)] @@ -317,7 +317,7 @@ extern_methods!( #[method(sendDoubleAction)] pub unsafe fn sendDoubleAction(&self); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -341,7 +341,7 @@ extern_methods!( #[method(selectText:)] pub unsafe fn selectText(&self, sender: Option<&Object>); - #[method_id(selectTextAtRow:column:)] + #[method_id(@__retain_semantics Other selectTextAtRow:column:)] pub unsafe fn selectTextAtRow_column( &self, row: NSInteger, @@ -357,7 +357,7 @@ extern_methods!( #[method(setToolTip:forCell:)] pub unsafe fn setToolTip_forCell(&self, toolTipString: Option<&NSString>, cell: &NSCell); - #[method_id(toolTipForCell:)] + #[method_id(@__retain_semantics Other toolTipForCell:)] pub unsafe fn toolTipForCell(&self, cell: &NSCell) -> Option>; #[method(autorecalculatesCellSize)] @@ -377,7 +377,7 @@ extern_methods!( #[method(setTabKeyTraversesCells:)] pub unsafe fn setTabKeyTraversesCells(&self, tabKeyTraversesCells: bool); - #[method_id(keyCell)] + #[method_id(@__retain_semantics Other keyCell)] pub unsafe fn keyCell(&self) -> Option>; #[method(setKeyCell:)] diff --git a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs index 1632fc9ce..e5bd81383 100644 --- a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs +++ b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs @@ -38,7 +38,7 @@ extern_methods!( #[method(setMediaLibraries:)] pub unsafe fn setMediaLibraries(&self, mediaLibraries: NSMediaLibrary); - #[method_id(sharedMediaLibraryBrowserController)] + #[method_id(@__retain_semantics Other sharedMediaLibraryBrowserController)] pub unsafe fn sharedMediaLibraryBrowserController( ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index d1ab1e4ff..81aa4b660 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -15,19 +15,19 @@ extern_class!( extern_methods!( unsafe impl NSMenu { - #[method_id(initWithTitle:)] + #[method_id(@__retain_semantics Init initWithTitle:)] pub unsafe fn initWithTitle( this: Option>, title: &NSString, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] @@ -62,7 +62,7 @@ extern_methods!( #[method(menuBarVisible)] pub unsafe fn menuBarVisible() -> bool; - #[method_id(supermenu)] + #[method_id(@__retain_semantics Other supermenu)] pub unsafe fn supermenu(&self) -> Option>; #[method(setSupermenu:)] @@ -74,7 +74,7 @@ extern_methods!( #[method(addItem:)] pub unsafe fn addItem(&self, newItem: &NSMenuItem); - #[method_id(insertItemWithTitle:action:keyEquivalent:atIndex:)] + #[method_id(@__retain_semantics Other insertItemWithTitle:action:keyEquivalent:atIndex:)] pub unsafe fn insertItemWithTitle_action_keyEquivalent_atIndex( &self, string: &NSString, @@ -83,7 +83,7 @@ extern_methods!( index: NSInteger, ) -> Id; - #[method_id(addItemWithTitle:action:keyEquivalent:)] + #[method_id(@__retain_semantics Other addItemWithTitle:action:keyEquivalent:)] pub unsafe fn addItemWithTitle_action_keyEquivalent( &self, string: &NSString, @@ -103,7 +103,7 @@ extern_methods!( #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); - #[method_id(itemArray)] + #[method_id(@__retain_semantics Other itemArray)] pub unsafe fn itemArray(&self) -> Id, Shared>; #[method(setItemArray:)] @@ -112,7 +112,7 @@ extern_methods!( #[method(numberOfItems)] pub unsafe fn numberOfItems(&self) -> NSInteger; - #[method_id(itemAtIndex:)] + #[method_id(@__retain_semantics Other itemAtIndex:)] pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; #[method(indexOfItem:)] @@ -138,10 +138,10 @@ extern_methods!( actionSelector: Option, ) -> NSInteger; - #[method_id(itemWithTitle:)] + #[method_id(@__retain_semantics Other itemWithTitle:)] pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; - #[method_id(itemWithTag:)] + #[method_id(@__retain_semantics Other itemWithTag:)] pub unsafe fn itemWithTag(&self, tag: NSInteger) -> Option>; #[method(autoenablesItems)] @@ -162,7 +162,7 @@ extern_methods!( #[method(performActionForItemAtIndex:)] pub unsafe fn performActionForItemAtIndex(&self, index: NSInteger); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -177,7 +177,7 @@ extern_methods!( #[method(cancelTrackingWithoutAnimation)] pub unsafe fn cancelTrackingWithoutAnimation(&self); - #[method_id(highlightedItem)] + #[method_id(@__retain_semantics Other highlightedItem)] pub unsafe fn highlightedItem(&self) -> Option>; #[method(minimumWidth)] @@ -189,7 +189,7 @@ extern_methods!( #[method(size)] pub unsafe fn size(&self) -> NSSize; - #[method_id(font)] + #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Option>; #[method(setFont:)] @@ -288,19 +288,19 @@ extern_methods!( #[method(setMenuRepresentation:)] pub unsafe fn setMenuRepresentation(&self, menuRep: Option<&Object>); - #[method_id(menuRepresentation)] + #[method_id(@__retain_semantics Other menuRepresentation)] pub unsafe fn menuRepresentation(&self) -> Option>; #[method(setContextMenuRepresentation:)] pub unsafe fn setContextMenuRepresentation(&self, menuRep: Option<&Object>); - #[method_id(contextMenuRepresentation)] + #[method_id(@__retain_semantics Other contextMenuRepresentation)] pub unsafe fn contextMenuRepresentation(&self) -> Option>; #[method(setTearOffMenuRepresentation:)] pub unsafe fn setTearOffMenuRepresentation(&self, menuRep: Option<&Object>); - #[method_id(tearOffMenuRepresentation)] + #[method_id(@__retain_semantics Other tearOffMenuRepresentation)] pub unsafe fn tearOffMenuRepresentation(&self) -> Option>; #[method(menuZone)] @@ -309,7 +309,7 @@ extern_methods!( #[method(setMenuZone:)] pub unsafe fn setMenuZone(zone: *mut NSZone); - #[method_id(attachedMenu)] + #[method_id(@__retain_semantics Other attachedMenu)] pub unsafe fn attachedMenu(&self) -> Option>; #[method(isAttached)] diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs index a34ee6331..ed14cd43b 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -21,10 +21,10 @@ extern_methods!( #[method(setUsesUserKeyEquivalents:)] pub unsafe fn setUsesUserKeyEquivalents(usesUserKeyEquivalents: bool); - #[method_id(separatorItem)] + #[method_id(@__retain_semantics Other separatorItem)] pub unsafe fn separatorItem() -> Id; - #[method_id(initWithTitle:action:keyEquivalent:)] + #[method_id(@__retain_semantics Init initWithTitle:action:keyEquivalent:)] pub unsafe fn initWithTitle_action_keyEquivalent( this: Option>, string: &NSString, @@ -32,13 +32,13 @@ extern_methods!( charCode: &NSString, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(menu)] + #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[method(setMenu:)] @@ -47,22 +47,22 @@ extern_methods!( #[method(hasSubmenu)] pub unsafe fn hasSubmenu(&self) -> bool; - #[method_id(submenu)] + #[method_id(@__retain_semantics Other submenu)] pub unsafe fn submenu(&self) -> Option>; #[method(setSubmenu:)] pub unsafe fn setSubmenu(&self, submenu: Option<&NSMenu>); - #[method_id(parentItem)] + #[method_id(@__retain_semantics Other parentItem)] pub unsafe fn parentItem(&self) -> Option>; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); - #[method_id(attributedTitle)] + #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; #[method(setAttributedTitle:)] @@ -71,7 +71,7 @@ extern_methods!( #[method(isSeparatorItem)] pub unsafe fn isSeparatorItem(&self) -> bool; - #[method_id(keyEquivalent)] + #[method_id(@__retain_semantics Other keyEquivalent)] pub unsafe fn keyEquivalent(&self) -> Id; #[method(setKeyEquivalent:)] @@ -86,7 +86,7 @@ extern_methods!( keyEquivalentModifierMask: NSEventModifierFlags, ); - #[method_id(userKeyEquivalent)] + #[method_id(@__retain_semantics Other userKeyEquivalent)] pub unsafe fn userKeyEquivalent(&self) -> Id; #[method(allowsKeyEquivalentWhenHidden)] @@ -113,7 +113,7 @@ extern_methods!( allowsAutomaticKeyEquivalentMirroring: bool, ); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] @@ -125,19 +125,19 @@ extern_methods!( #[method(setState:)] pub unsafe fn setState(&self, state: NSControlStateValue); - #[method_id(onStateImage)] + #[method_id(@__retain_semantics Other onStateImage)] pub unsafe fn onStateImage(&self) -> Option>; #[method(setOnStateImage:)] pub unsafe fn setOnStateImage(&self, onStateImage: Option<&NSImage>); - #[method_id(offStateImage)] + #[method_id(@__retain_semantics Other offStateImage)] pub unsafe fn offStateImage(&self) -> Option>; #[method(setOffStateImage:)] pub unsafe fn setOffStateImage(&self, offStateImage: Option<&NSImage>); - #[method_id(mixedStateImage)] + #[method_id(@__retain_semantics Other mixedStateImage)] pub unsafe fn mixedStateImage(&self) -> Option>; #[method(setMixedStateImage:)] @@ -161,7 +161,7 @@ extern_methods!( #[method(setIndentationLevel:)] pub unsafe fn setIndentationLevel(&self, indentationLevel: NSInteger); - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] @@ -179,13 +179,13 @@ extern_methods!( #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); - #[method_id(representedObject)] + #[method_id(@__retain_semantics Other representedObject)] pub unsafe fn representedObject(&self) -> Option>; #[method(setRepresentedObject:)] pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>); - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[method(setView:)] @@ -203,7 +203,7 @@ extern_methods!( #[method(isHiddenOrHasHiddenAncestor)] pub unsafe fn isHiddenOrHasHiddenAncestor(&self) -> bool; - #[method_id(toolTip)] + #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Option>; #[method(setToolTip:)] @@ -214,7 +214,7 @@ extern_methods!( extern_methods!( /// NSViewEnclosingMenuItem unsafe impl NSView { - #[method_id(enclosingMenuItem)] + #[method_id(@__retain_semantics Other enclosingMenuItem)] pub unsafe fn enclosingMenuItem(&self) -> Option>; } ); @@ -232,7 +232,7 @@ extern_methods!( #[method(mnemonicLocation)] pub unsafe fn mnemonicLocation(&self) -> NSUInteger; - #[method_id(mnemonic)] + #[method_id(@__retain_semantics Other mnemonic)] pub unsafe fn mnemonic(&self) -> Option>; #[method(setTitleWithMnemonic:)] diff --git a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs index 7a4868298..880ef4863 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs @@ -15,19 +15,19 @@ extern_class!( extern_methods!( unsafe impl NSMenuItemCell { - #[method_id(initTextCell:)] + #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell( this: Option>, string: &NSString, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(menuItem)] + #[method_id(@__retain_semantics Other menuItem)] pub unsafe fn menuItem(&self) -> Option>; #[method(setMenuItem:)] diff --git a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs index d26aa36c3..79fc783d1 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSMenuToolbarItem { - #[method_id(menu)] + #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Id; #[method(setMenu:)] diff --git a/crates/icrate/src/generated/AppKit/NSMovie.rs b/crates/icrate/src/generated/AppKit/NSMovie.rs index 00294bbec..40f89a63c 100644 --- a/crates/icrate/src/generated/AppKit/NSMovie.rs +++ b/crates/icrate/src/generated/AppKit/NSMovie.rs @@ -15,22 +15,22 @@ extern_class!( extern_methods!( unsafe impl NSMovie { - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Option>; - #[method_id(initWithMovie:)] + #[method_id(@__retain_semantics Init initWithMovie:)] pub unsafe fn initWithMovie( this: Option>, movie: &QTMovie, ) -> Option>; - #[method_id(QTMovie)] + #[method_id(@__retain_semantics Other QTMovie)] pub unsafe fn QTMovie(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index 6d502eda4..c483f90ad 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -17,14 +17,14 @@ extern_class!( extern_methods!( unsafe impl NSNib { - #[method_id(initWithNibNamed:bundle:)] + #[method_id(@__retain_semantics Init initWithNibNamed:bundle:)] pub unsafe fn initWithNibNamed_bundle( this: Option>, nibName: &NSNibName, bundle: Option<&NSBundle>, ) -> Option>; - #[method_id(initWithNibData:bundle:)] + #[method_id(@__retain_semantics Init initWithNibData:bundle:)] pub unsafe fn initWithNibData_bundle( this: Option>, nibData: &NSData, @@ -43,7 +43,7 @@ extern_methods!( extern_methods!( /// NSDeprecated unsafe impl NSNib { - #[method_id(initWithContentsOfURL:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, nibFileURL: Option<&NSURL>, diff --git a/crates/icrate/src/generated/AppKit/NSObjectController.rs b/crates/icrate/src/generated/AppKit/NSObjectController.rs index c97de851c..e8626a499 100644 --- a/crates/icrate/src/generated/AppKit/NSObjectController.rs +++ b/crates/icrate/src/generated/AppKit/NSObjectController.rs @@ -15,28 +15,28 @@ extern_class!( extern_methods!( unsafe impl NSObjectController { - #[method_id(initWithContent:)] + #[method_id(@__retain_semantics Init initWithContent:)] pub unsafe fn initWithContent( this: Option>, content: Option<&Object>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(content)] + #[method_id(@__retain_semantics Other content)] pub unsafe fn content(&self) -> Option>; #[method(setContent:)] pub unsafe fn setContent(&self, content: Option<&Object>); - #[method_id(selection)] + #[method_id(@__retain_semantics Other selection)] pub unsafe fn selection(&self) -> Id; - #[method_id(selectedObjects)] + #[method_id(@__retain_semantics Other selectedObjects)] pub unsafe fn selectedObjects(&self) -> Id; #[method(automaticallyPreparesContent)] @@ -54,7 +54,7 @@ extern_methods!( #[method(setObjectClass:)] pub unsafe fn setObjectClass(&self, objectClass: Option<&Class>); - #[method_id(newObject)] + #[method_id(@__retain_semantics New newObject)] pub unsafe fn newObject(&self) -> Id; #[method(addObject:)] @@ -90,7 +90,7 @@ extern_methods!( extern_methods!( /// NSManagedController unsafe impl NSObjectController { - #[method_id(managedObjectContext)] + #[method_id(@__retain_semantics Other managedObjectContext)] pub unsafe fn managedObjectContext(&self) -> Option>; #[method(setManagedObjectContext:)] @@ -99,13 +99,13 @@ extern_methods!( managedObjectContext: Option<&NSManagedObjectContext>, ); - #[method_id(entityName)] + #[method_id(@__retain_semantics Other entityName)] pub unsafe fn entityName(&self) -> Option>; #[method(setEntityName:)] pub unsafe fn setEntityName(&self, entityName: Option<&NSString>); - #[method_id(fetchPredicate)] + #[method_id(@__retain_semantics Other fetchPredicate)] pub unsafe fn fetchPredicate(&self) -> Option>; #[method(setFetchPredicate:)] @@ -127,7 +127,7 @@ extern_methods!( #[method(setUsesLazyFetching:)] pub unsafe fn setUsesLazyFetching(&self, usesLazyFetching: bool); - #[method_id(defaultFetchRequest)] + #[method_id(@__retain_semantics Other defaultFetchRequest)] pub unsafe fn defaultFetchRequest(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index 74231de4a..3bf2d0f11 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -68,25 +68,25 @@ extern_class!( extern_methods!( unsafe impl NSOpenGLPixelFormat { - #[method_id(initWithCGLPixelFormatObj:)] + #[method_id(@__retain_semantics Init initWithCGLPixelFormatObj:)] pub unsafe fn initWithCGLPixelFormatObj( this: Option>, format: CGLPixelFormatObj, ) -> Option>; - #[method_id(initWithAttributes:)] + #[method_id(@__retain_semantics Init initWithAttributes:)] pub unsafe fn initWithAttributes( this: Option>, attribs: NonNull, ) -> Option>; - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, attribs: Option<&NSData>, ) -> Option>; - #[method_id(attributes)] + #[method_id(@__retain_semantics Other attributes)] pub unsafe fn attributes(&self) -> Option>; #[method(setAttributes:)] @@ -119,7 +119,7 @@ extern_class!( extern_methods!( unsafe impl NSOpenGLPixelBuffer { - #[method_id(initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh:)] + #[method_id(@__retain_semantics Init initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh:)] pub unsafe fn initWithTextureTarget_textureInternalFormat_textureMaxMipMapLevel_pixelsWide_pixelsHigh( this: Option>, target: GLenum, @@ -129,7 +129,7 @@ extern_methods!( pixelsHigh: GLsizei, ) -> Option>; - #[method_id(initWithCGLPBufferObj:)] + #[method_id(@__retain_semantics Init initWithCGLPBufferObj:)] pub unsafe fn initWithCGLPBufferObj( this: Option>, pbuffer: CGLPBufferObj, @@ -183,23 +183,23 @@ extern_class!( extern_methods!( unsafe impl NSOpenGLContext { - #[method_id(initWithFormat:shareContext:)] + #[method_id(@__retain_semantics Init initWithFormat:shareContext:)] pub unsafe fn initWithFormat_shareContext( this: Option>, format: &NSOpenGLPixelFormat, share: Option<&NSOpenGLContext>, ) -> Option>; - #[method_id(initWithCGLContextObj:)] + #[method_id(@__retain_semantics Init initWithCGLContextObj:)] pub unsafe fn initWithCGLContextObj( this: Option>, context: CGLContextObj, ) -> Option>; - #[method_id(pixelFormat)] + #[method_id(@__retain_semantics Other pixelFormat)] pub unsafe fn pixelFormat(&self) -> Id; - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[method(setView:)] @@ -232,7 +232,7 @@ extern_methods!( #[method(clearCurrentContext)] pub unsafe fn clearCurrentContext(); - #[method_id(currentContext)] + #[method_id(@__retain_semantics Other currentContext)] pub unsafe fn currentContext() -> Option>; #[method(copyAttributesFromContext:withMask:)] @@ -287,7 +287,7 @@ extern_methods!( screen: GLint, ); - #[method_id(pixelBuffer)] + #[method_id(@__retain_semantics Other pixelBuffer)] pub unsafe fn pixelBuffer(&self) -> Option>; #[method(pixelBufferCubeMapFace)] diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs index 6e81bb3cd..f3686f908 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs @@ -15,31 +15,31 @@ extern_class!( extern_methods!( unsafe impl NSOpenGLLayer { - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); - #[method_id(openGLPixelFormat)] + #[method_id(@__retain_semantics Other openGLPixelFormat)] pub unsafe fn openGLPixelFormat(&self) -> Option>; #[method(setOpenGLPixelFormat:)] pub unsafe fn setOpenGLPixelFormat(&self, openGLPixelFormat: Option<&NSOpenGLPixelFormat>); - #[method_id(openGLContext)] + #[method_id(@__retain_semantics Other openGLContext)] pub unsafe fn openGLContext(&self) -> Option>; #[method(setOpenGLContext:)] pub unsafe fn setOpenGLContext(&self, openGLContext: Option<&NSOpenGLContext>); - #[method_id(openGLPixelFormatForDisplayMask:)] + #[method_id(@__retain_semantics Other openGLPixelFormatForDisplayMask:)] pub unsafe fn openGLPixelFormatForDisplayMask( &self, mask: u32, ) -> Id; - #[method_id(openGLContextForPixelFormat:)] + #[method_id(@__retain_semantics Other openGLContextForPixelFormat:)] pub unsafe fn openGLContextForPixelFormat( &self, pixelFormat: &NSOpenGLPixelFormat, diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs index 7fccacd2f..b34d90b5c 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs @@ -15,17 +15,17 @@ extern_class!( extern_methods!( unsafe impl NSOpenGLView { - #[method_id(defaultPixelFormat)] + #[method_id(@__retain_semantics Other defaultPixelFormat)] pub unsafe fn defaultPixelFormat() -> Id; - #[method_id(initWithFrame:pixelFormat:)] + #[method_id(@__retain_semantics Init initWithFrame:pixelFormat:)] pub unsafe fn initWithFrame_pixelFormat( this: Option>, frameRect: NSRect, format: Option<&NSOpenGLPixelFormat>, ) -> Option>; - #[method_id(openGLContext)] + #[method_id(@__retain_semantics Other openGLContext)] pub unsafe fn openGLContext(&self) -> Option>; #[method(setOpenGLContext:)] @@ -40,7 +40,7 @@ extern_methods!( #[method(reshape)] pub unsafe fn reshape(&self); - #[method_id(pixelFormat)] + #[method_id(@__retain_semantics Other pixelFormat)] pub unsafe fn pixelFormat(&self) -> Option>; #[method(setPixelFormat:)] diff --git a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs index 706c953ba..a8cd54df8 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs @@ -15,10 +15,10 @@ extern_class!( extern_methods!( unsafe impl NSOpenPanel { - #[method_id(openPanel)] + #[method_id(@__retain_semantics Other openPanel)] pub unsafe fn openPanel() -> Id; - #[method_id(URLs)] + #[method_id(@__retain_semantics Other URLs)] pub unsafe fn URLs(&self) -> Id, Shared>; #[method(resolvesAliases)] @@ -68,7 +68,7 @@ extern_methods!( extern_methods!( /// NSDeprecated unsafe impl NSOpenPanel { - #[method_id(filenames)] + #[method_id(@__retain_semantics Other filenames)] pub unsafe fn filenames(&self) -> Id; #[method(beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector:contextInfo:)] diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index f51d870c7..73754efa4 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -17,19 +17,19 @@ extern_class!( extern_methods!( unsafe impl NSOutlineView { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSOutlineViewDelegate>); - #[method_id(dataSource)] + #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>; #[method(setDataSource:)] pub unsafe fn setDataSource(&self, dataSource: Option<&NSOutlineViewDataSource>); - #[method_id(outlineTableColumn)] + #[method_id(@__retain_semantics Other outlineTableColumn)] pub unsafe fn outlineTableColumn(&self) -> Option>; #[method(setOutlineTableColumn:)] @@ -41,7 +41,7 @@ extern_methods!( #[method(numberOfChildrenOfItem:)] pub unsafe fn numberOfChildrenOfItem(&self, item: Option<&Object>) -> NSInteger; - #[method_id(child:ofItem:)] + #[method_id(@__retain_semantics Other child:ofItem:)] pub unsafe fn child_ofItem( &self, index: NSInteger, @@ -70,13 +70,13 @@ extern_methods!( #[method(reloadItem:)] pub unsafe fn reloadItem(&self, item: Option<&Object>); - #[method_id(parentForItem:)] + #[method_id(@__retain_semantics Other parentForItem:)] pub unsafe fn parentForItem(&self, item: Option<&Object>) -> Option>; #[method(childIndexForItem:)] pub unsafe fn childIndexForItem(&self, item: &Object) -> NSInteger; - #[method_id(itemAtRow:)] + #[method_id(@__retain_semantics Other itemAtRow:)] pub unsafe fn itemAtRow(&self, row: NSInteger) -> Option>; #[method(rowForItem:)] diff --git a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs index bb02451cb..a15845a3e 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs @@ -15,16 +15,16 @@ extern_class!( extern_methods!( unsafe impl NSPDFImageRep { - #[method_id(imageRepWithData:)] + #[method_id(@__retain_semantics Other imageRepWithData:)] pub unsafe fn imageRepWithData(pdfData: &NSData) -> Option>; - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, pdfData: &NSData, ) -> Option>; - #[method_id(PDFRepresentation)] + #[method_id(@__retain_semantics Other PDFRepresentation)] pub unsafe fn PDFRepresentation(&self) -> Id; #[method(bounds)] diff --git a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs index a96509933..d26d2ac29 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSPDFInfo { - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[method(setURL:)] @@ -27,7 +27,7 @@ extern_methods!( #[method(setFileExtensionHidden:)] pub unsafe fn setFileExtensionHidden(&self, fileExtensionHidden: bool); - #[method_id(tagNames)] + #[method_id(@__retain_semantics Other tagNames)] pub unsafe fn tagNames(&self) -> Id, Shared>; #[method(setTagNames:)] @@ -45,7 +45,7 @@ extern_methods!( #[method(setPaperSize:)] pub unsafe fn setPaperSize(&self, paperSize: NSSize); - #[method_id(attributes)] + #[method_id(@__retain_semantics Other attributes)] pub unsafe fn attributes( &self, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs index 48f881031..54ed58ab1 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs @@ -20,10 +20,10 @@ extern_class!( extern_methods!( unsafe impl NSPDFPanel { - #[method_id(panel)] + #[method_id(@__retain_semantics Other panel)] pub unsafe fn panel() -> Id; - #[method_id(accessoryController)] + #[method_id(@__retain_semantics Other accessoryController)] pub unsafe fn accessoryController(&self) -> Option>; #[method(setAccessoryController:)] @@ -35,7 +35,7 @@ extern_methods!( #[method(setOptions:)] pub unsafe fn setOptions(&self, options: NSPDFPanelOptions); - #[method_id(defaultFileName)] + #[method_id(@__retain_semantics Other defaultFileName)] pub unsafe fn defaultFileName(&self) -> Id; #[method(setDefaultFileName:)] diff --git a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs index d28d2859e..bd8eaa59a 100644 --- a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs @@ -15,16 +15,16 @@ extern_class!( extern_methods!( unsafe impl NSPICTImageRep { - #[method_id(imageRepWithData:)] + #[method_id(@__retain_semantics Other imageRepWithData:)] pub unsafe fn imageRepWithData(pictData: &NSData) -> Option>; - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, pictData: &NSData, ) -> Option>; - #[method_id(PICTRepresentation)] + #[method_id(@__retain_semantics Other PICTRepresentation)] pub unsafe fn PICTRepresentation(&self) -> Id; #[method(boundingBox)] diff --git a/crates/icrate/src/generated/AppKit/NSPageController.rs b/crates/icrate/src/generated/AppKit/NSPageController.rs index 7dc099f64..2b182f1bf 100644 --- a/crates/icrate/src/generated/AppKit/NSPageController.rs +++ b/crates/icrate/src/generated/AppKit/NSPageController.rs @@ -22,13 +22,13 @@ extern_class!( extern_methods!( unsafe impl NSPageController { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSPageControllerDelegate>); - #[method_id(selectedViewController)] + #[method_id(@__retain_semantics Other selectedViewController)] pub unsafe fn selectedViewController(&self) -> Option>; #[method(transitionStyle)] @@ -37,7 +37,7 @@ extern_methods!( #[method(setTransitionStyle:)] pub unsafe fn setTransitionStyle(&self, transitionStyle: NSPageControllerTransitionStyle); - #[method_id(arrangedObjects)] + #[method_id(@__retain_semantics Other arrangedObjects)] pub unsafe fn arrangedObjects(&self) -> Id; #[method(setArrangedObjects:)] diff --git a/crates/icrate/src/generated/AppKit/NSPageLayout.rs b/crates/icrate/src/generated/AppKit/NSPageLayout.rs index 45af8c859..29834bab7 100644 --- a/crates/icrate/src/generated/AppKit/NSPageLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSPageLayout.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSPageLayout { - #[method_id(pageLayout)] + #[method_id(@__retain_semantics Other pageLayout)] pub unsafe fn pageLayout() -> Id; #[method(addAccessoryController:)] @@ -24,7 +24,7 @@ extern_methods!( #[method(removeAccessoryController:)] pub unsafe fn removeAccessoryController(&self, accessoryController: &NSViewController); - #[method_id(accessoryControllers)] + #[method_id(@__retain_semantics Other accessoryControllers)] pub unsafe fn accessoryControllers(&self) -> Id, Shared>; #[method(beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:)] @@ -43,7 +43,7 @@ extern_methods!( #[method(runModal)] pub unsafe fn runModal(&self) -> NSInteger; - #[method_id(printInfo)] + #[method_id(@__retain_semantics Other printInfo)] pub unsafe fn printInfo(&self) -> Option>; } ); @@ -54,7 +54,7 @@ extern_methods!( #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); - #[method_id(accessoryView)] + #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[method(readPrintInfo)] diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index 6a238b8d2..996cda7b9 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -35,12 +35,12 @@ extern_class!( extern_methods!( unsafe impl NSTextTab { - #[method_id(columnTerminatorsForLocale:)] + #[method_id(@__retain_semantics Other columnTerminatorsForLocale:)] pub unsafe fn columnTerminatorsForLocale( aLocale: Option<&NSLocale>, ) -> Id; - #[method_id(initWithTextAlignment:location:options:)] + #[method_id(@__retain_semantics Init initWithTextAlignment:location:options:)] pub unsafe fn initWithTextAlignment_location_options( this: Option>, alignment: NSTextAlignment, @@ -54,7 +54,7 @@ extern_methods!( #[method(location)] pub unsafe fn location(&self) -> CGFloat; - #[method_id(options)] + #[method_id(@__retain_semantics Other options)] pub unsafe fn options(&self) -> Id, Shared>; } ); @@ -70,7 +70,7 @@ extern_class!( extern_methods!( unsafe impl NSParagraphStyle { - #[method_id(defaultParagraphStyle)] + #[method_id(@__retain_semantics Other defaultParagraphStyle)] pub unsafe fn defaultParagraphStyle() -> Id; #[method(defaultWritingDirectionForLanguage:)] @@ -120,7 +120,7 @@ extern_methods!( #[method(usesDefaultHyphenation)] pub unsafe fn usesDefaultHyphenation(&self) -> bool; - #[method_id(tabStops)] + #[method_id(@__retain_semantics Other tabStops)] pub unsafe fn tabStops(&self) -> Id, Shared>; #[method(defaultTabInterval)] @@ -132,10 +132,10 @@ extern_methods!( #[method(tighteningFactorForTruncation)] pub unsafe fn tighteningFactorForTruncation(&self) -> c_float; - #[method_id(textBlocks)] + #[method_id(@__retain_semantics Other textBlocks)] pub unsafe fn textBlocks(&self) -> Id, Shared>; - #[method_id(textLists)] + #[method_id(@__retain_semantics Other textLists)] pub unsafe fn textLists(&self) -> Id, Shared>; #[method(headerLevel)] @@ -241,7 +241,7 @@ extern_methods!( #[method(setUsesDefaultHyphenation:)] pub unsafe fn setUsesDefaultHyphenation(&self, usesDefaultHyphenation: bool); - #[method_id(tabStops)] + #[method_id(@__retain_semantics Other tabStops)] pub unsafe fn tabStops(&self) -> Id, Shared>; #[method(setTabStops:)] @@ -280,13 +280,13 @@ extern_methods!( tighteningFactorForTruncation: c_float, ); - #[method_id(textBlocks)] + #[method_id(@__retain_semantics Other textBlocks)] pub unsafe fn textBlocks(&self) -> Id, Shared>; #[method(setTextBlocks:)] pub unsafe fn setTextBlocks(&self, textBlocks: &NSArray); - #[method_id(textLists)] + #[method_id(@__retain_semantics Other textLists)] pub unsafe fn textLists(&self) -> Id, Shared>; #[method(setTextLists:)] @@ -315,7 +315,7 @@ pub const NSDecimalTabStopType: NSTextTabType = 3; extern_methods!( /// NSTextTabDeprecated unsafe impl NSTextTab { - #[method_id(initWithType:location:)] + #[method_id(@__retain_semantics Init initWithType:location:)] pub unsafe fn initWithType_location( this: Option>, type_: NSTextTabType, diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index 6e0985e2f..c4dab9bc8 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -117,16 +117,16 @@ extern_class!( extern_methods!( unsafe impl NSPasteboard { - #[method_id(generalPasteboard)] + #[method_id(@__retain_semantics Other generalPasteboard)] pub unsafe fn generalPasteboard() -> Id; - #[method_id(pasteboardWithName:)] + #[method_id(@__retain_semantics Other pasteboardWithName:)] pub unsafe fn pasteboardWithName(name: &NSPasteboardName) -> Id; - #[method_id(pasteboardWithUniqueName)] + #[method_id(@__retain_semantics Other pasteboardWithUniqueName)] pub unsafe fn pasteboardWithUniqueName() -> Id; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; #[method(changeCount)] @@ -144,14 +144,14 @@ extern_methods!( #[method(writeObjects:)] pub unsafe fn writeObjects(&self, objects: &NSArray) -> bool; - #[method_id(readObjectsForClasses:options:)] + #[method_id(@__retain_semantics Other readObjectsForClasses:options:)] pub unsafe fn readObjectsForClasses_options( &self, classArray: &NSArray, options: Option<&NSDictionary>, ) -> Option>; - #[method_id(pasteboardItems)] + #[method_id(@__retain_semantics Other pasteboardItems)] pub unsafe fn pasteboardItems(&self) -> Option, Shared>>; #[method(indexOfPasteboardItem:)] @@ -185,10 +185,10 @@ extern_methods!( newOwner: Option<&Object>, ) -> NSInteger; - #[method_id(types)] + #[method_id(@__retain_semantics Other types)] pub unsafe fn types(&self) -> Option, Shared>>; - #[method_id(availableTypeFromArray:)] + #[method_id(@__retain_semantics Other availableTypeFromArray:)] pub unsafe fn availableTypeFromArray( &self, types: &NSArray, @@ -215,17 +215,17 @@ extern_methods!( dataType: &NSPasteboardType, ) -> bool; - #[method_id(dataForType:)] + #[method_id(@__retain_semantics Other dataForType:)] pub unsafe fn dataForType(&self, dataType: &NSPasteboardType) -> Option>; - #[method_id(propertyListForType:)] + #[method_id(@__retain_semantics Other propertyListForType:)] pub unsafe fn propertyListForType( &self, dataType: &NSPasteboardType, ) -> Option>; - #[method_id(stringForType:)] + #[method_id(@__retain_semantics Other stringForType:)] pub unsafe fn stringForType( &self, dataType: &NSPasteboardType, @@ -236,21 +236,21 @@ extern_methods!( extern_methods!( /// FilterServices unsafe impl NSPasteboard { - #[method_id(typesFilterableTo:)] + #[method_id(@__retain_semantics Other typesFilterableTo:)] pub unsafe fn typesFilterableTo( type_: &NSPasteboardType, ) -> Id, Shared>; - #[method_id(pasteboardByFilteringFile:)] + #[method_id(@__retain_semantics Other pasteboardByFilteringFile:)] pub unsafe fn pasteboardByFilteringFile(filename: &NSString) -> Id; - #[method_id(pasteboardByFilteringData:ofType:)] + #[method_id(@__retain_semantics Other pasteboardByFilteringData:ofType:)] pub unsafe fn pasteboardByFilteringData_ofType( data: &NSData, type_: &NSPasteboardType, ) -> Id; - #[method_id(pasteboardByFilteringTypesInPasteboard:)] + #[method_id(@__retain_semantics Other pasteboardByFilteringTypesInPasteboard:)] pub unsafe fn pasteboardByFilteringTypesInPasteboard( pboard: &NSPasteboard, ) -> Id; @@ -290,7 +290,7 @@ pub type NSPasteboardReading = NSObject; extern_methods!( /// NSPasteboardSupport unsafe impl NSURL { - #[method_id(URLFromPasteboard:)] + #[method_id(@__retain_semantics Other URLFromPasteboard:)] pub unsafe fn URLFromPasteboard(pasteBoard: &NSPasteboard) -> Option>; #[method(writeToPasteboard:)] @@ -309,7 +309,7 @@ extern_methods!( #[method(writeFileContents:)] pub unsafe fn writeFileContents(&self, filename: &NSString) -> bool; - #[method_id(readFileContentsType:toFile:)] + #[method_id(@__retain_semantics Other readFileContentsType:toFile:)] pub unsafe fn readFileContentsType_toFile( &self, type_: Option<&NSPasteboardType>, @@ -319,7 +319,7 @@ extern_methods!( #[method(writeFileWrapper:)] pub unsafe fn writeFileWrapper(&self, wrapper: &NSFileWrapper) -> bool; - #[method_id(readFileWrapper)] + #[method_id(@__retain_semantics Other readFileWrapper)] pub unsafe fn readFileWrapper(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs index 0ae639b5a..50ad47f99 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs @@ -15,10 +15,10 @@ extern_class!( extern_methods!( unsafe impl NSPasteboardItem { - #[method_id(types)] + #[method_id(@__retain_semantics Other types)] pub unsafe fn types(&self) -> Id, Shared>; - #[method_id(availableTypeFromArray:)] + #[method_id(@__retain_semantics Other availableTypeFromArray:)] pub unsafe fn availableTypeFromArray( &self, types: &NSArray, @@ -45,16 +45,16 @@ extern_methods!( type_: &NSPasteboardType, ) -> bool; - #[method_id(dataForType:)] + #[method_id(@__retain_semantics Other dataForType:)] pub unsafe fn dataForType(&self, type_: &NSPasteboardType) -> Option>; - #[method_id(stringForType:)] + #[method_id(@__retain_semantics Other stringForType:)] pub unsafe fn stringForType( &self, type_: &NSPasteboardType, ) -> Option>; - #[method_id(propertyListForType:)] + #[method_id(@__retain_semantics Other propertyListForType:)] pub unsafe fn propertyListForType( &self, type_: &NSPasteboardType, diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs index ca2466375..c59db1af6 100644 --- a/crates/icrate/src/generated/AppKit/NSPathCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -26,7 +26,7 @@ extern_methods!( #[method(setPathStyle:)] pub unsafe fn setPathStyle(&self, pathStyle: NSPathStyle); - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[method(setURL:)] @@ -35,13 +35,13 @@ extern_methods!( #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, obj: Option<&NSCopying>); - #[method_id(allowedTypes)] + #[method_id(@__retain_semantics Other allowedTypes)] pub unsafe fn allowedTypes(&self) -> Option, Shared>>; #[method(setAllowedTypes:)] pub unsafe fn setAllowedTypes(&self, allowedTypes: Option<&NSArray>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -50,7 +50,7 @@ extern_methods!( #[method(pathComponentCellClass)] pub unsafe fn pathComponentCellClass() -> &'static Class; - #[method_id(pathComponentCells)] + #[method_id(@__retain_semantics Other pathComponentCells)] pub unsafe fn pathComponentCells(&self) -> Id, Shared>; #[method(setPathComponentCells:)] @@ -67,7 +67,7 @@ extern_methods!( view: &NSView, ) -> NSRect; - #[method_id(pathComponentCellAtPoint:withFrame:inView:)] + #[method_id(@__retain_semantics Other pathComponentCellAtPoint:withFrame:inView:)] pub unsafe fn pathComponentCellAtPoint_withFrame_inView( &self, point: NSPoint, @@ -75,7 +75,7 @@ extern_methods!( view: &NSView, ) -> Option>; - #[method_id(clickedPathComponentCell)] + #[method_id(@__retain_semantics Other clickedPathComponentCell)] pub unsafe fn clickedPathComponentCell(&self) -> Option>; #[method(mouseEntered:withFrame:inView:)] @@ -100,19 +100,19 @@ extern_methods!( #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, doubleAction: Option); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); - #[method_id(placeholderString)] + #[method_id(@__retain_semantics Other placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); - #[method_id(placeholderAttributedString)] + #[method_id(@__retain_semantics Other placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; #[method(setPlaceholderAttributedString:)] diff --git a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs index 7a4811d1c..e95b3f7ab 100644 --- a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs @@ -15,13 +15,13 @@ extern_class!( extern_methods!( unsafe impl NSPathComponentCell { - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[method(setURL:)] diff --git a/crates/icrate/src/generated/AppKit/NSPathControl.rs b/crates/icrate/src/generated/AppKit/NSPathControl.rs index ac0572a6d..d2b956e58 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControl.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControl.rs @@ -21,19 +21,19 @@ extern_methods!( #[method(setEditable:)] pub unsafe fn setEditable(&self, editable: bool); - #[method_id(allowedTypes)] + #[method_id(@__retain_semantics Other allowedTypes)] pub unsafe fn allowedTypes(&self) -> Option, Shared>>; #[method(setAllowedTypes:)] pub unsafe fn setAllowedTypes(&self, allowedTypes: Option<&NSArray>); - #[method_id(placeholderString)] + #[method_id(@__retain_semantics Other placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); - #[method_id(placeholderAttributedString)] + #[method_id(@__retain_semantics Other placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; #[method(setPlaceholderAttributedString:)] @@ -42,7 +42,7 @@ extern_methods!( placeholderAttributedString: Option<&NSAttributedString>, ); - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[method(setURL:)] @@ -60,22 +60,22 @@ extern_methods!( #[method(setPathStyle:)] pub unsafe fn setPathStyle(&self, pathStyle: NSPathStyle); - #[method_id(clickedPathItem)] + #[method_id(@__retain_semantics Other clickedPathItem)] pub unsafe fn clickedPathItem(&self) -> Option>; - #[method_id(pathItems)] + #[method_id(@__retain_semantics Other pathItems)] pub unsafe fn pathItems(&self) -> Id, Shared>; #[method(setPathItems:)] pub unsafe fn setPathItems(&self, pathItems: &NSArray); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -88,7 +88,7 @@ extern_methods!( isLocal: bool, ); - #[method_id(menu)] + #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[method(setMenu:)] @@ -101,10 +101,10 @@ pub type NSPathControlDelegate = NSObject; extern_methods!( /// NSDeprecated unsafe impl NSPathControl { - #[method_id(clickedPathComponentCell)] + #[method_id(@__retain_semantics Other clickedPathComponentCell)] pub unsafe fn clickedPathComponentCell(&self) -> Option>; - #[method_id(pathComponentCells)] + #[method_id(@__retain_semantics Other pathComponentCells)] pub unsafe fn pathComponentCells(&self) -> Id, Shared>; #[method(setPathComponentCells:)] diff --git a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs index f99570245..3f2f055d9 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs @@ -15,25 +15,25 @@ extern_class!( extern_methods!( unsafe impl NSPathControlItem { - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); - #[method_id(attributedTitle)] + #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Id; #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: &NSAttributedString); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs index 10271a5c3..4e161c793 100644 --- a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSPersistentDocument { - #[method_id(managedObjectContext)] + #[method_id(@__retain_semantics Other managedObjectContext)] pub unsafe fn managedObjectContext(&self) -> Option>; #[method(setManagedObjectContext:)] @@ -24,7 +24,7 @@ extern_methods!( managedObjectContext: Option<&NSManagedObjectContext>, ); - #[method_id(managedObjectModel)] + #[method_id(@__retain_semantics Other managedObjectModel)] pub unsafe fn managedObjectModel(&self) -> Option>; #[method(configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:)] @@ -36,7 +36,7 @@ extern_methods!( storeOptions: Option<&NSDictionary>, ) -> Result<(), Id>; - #[method_id(persistentStoreTypeForFileType:)] + #[method_id(@__retain_semantics Other persistentStoreTypeForFileType:)] pub unsafe fn persistentStoreTypeForFileType( &self, fileType: &NSString, diff --git a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs index 707faf56b..3b2a6a343 100644 --- a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs @@ -28,7 +28,7 @@ extern_class!( extern_methods!( unsafe impl NSPickerTouchBarItem { - #[method_id(pickerTouchBarItemWithIdentifier:labels:selectionMode:target:action:)] + #[method_id(@__retain_semantics Other pickerTouchBarItemWithIdentifier:labels:selectionMode:target:action:)] pub unsafe fn pickerTouchBarItemWithIdentifier_labels_selectionMode_target_action( identifier: &NSTouchBarItemIdentifier, labels: &NSArray, @@ -37,7 +37,7 @@ extern_methods!( action: Option, ) -> Id; - #[method_id(pickerTouchBarItemWithIdentifier:images:selectionMode:target:action:)] + #[method_id(@__retain_semantics Other pickerTouchBarItemWithIdentifier:images:selectionMode:target:action:)] pub unsafe fn pickerTouchBarItemWithIdentifier_images_selectionMode_target_action( identifier: &NSTouchBarItemIdentifier, images: &NSArray, @@ -55,7 +55,7 @@ extern_methods!( controlRepresentation: NSPickerTouchBarItemControlRepresentation, ); - #[method_id(collapsedRepresentationLabel)] + #[method_id(@__retain_semantics Other collapsedRepresentationLabel)] pub unsafe fn collapsedRepresentationLabel(&self) -> Id; #[method(setCollapsedRepresentationLabel:)] @@ -64,7 +64,7 @@ extern_methods!( collapsedRepresentationLabel: &NSString, ); - #[method_id(collapsedRepresentationImage)] + #[method_id(@__retain_semantics Other collapsedRepresentationImage)] pub unsafe fn collapsedRepresentationImage(&self) -> Option>; #[method(setCollapsedRepresentationImage:)] @@ -79,7 +79,7 @@ extern_methods!( #[method(setSelectedIndex:)] pub unsafe fn setSelectedIndex(&self, selectedIndex: NSInteger); - #[method_id(selectionColor)] + #[method_id(@__retain_semantics Other selectionColor)] pub unsafe fn selectionColor(&self) -> Option>; #[method(setSelectionColor:)] @@ -100,16 +100,16 @@ extern_methods!( #[method(setImage:atIndex:)] pub unsafe fn setImage_atIndex(&self, image: Option<&NSImage>, index: NSInteger); - #[method_id(imageAtIndex:)] + #[method_id(@__retain_semantics Other imageAtIndex:)] pub unsafe fn imageAtIndex(&self, index: NSInteger) -> Option>; #[method(setLabel:atIndex:)] pub unsafe fn setLabel_atIndex(&self, label: &NSString, index: NSInteger); - #[method_id(labelAtIndex:)] + #[method_id(@__retain_semantics Other labelAtIndex:)] pub unsafe fn labelAtIndex(&self, index: NSInteger) -> Option>; - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] @@ -133,7 +133,7 @@ extern_methods!( #[method(isEnabledAtIndex:)] pub unsafe fn isEnabledAtIndex(&self, index: NSInteger) -> bool; - #[method_id(customizationLabel)] + #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[method(setCustomizationLabel:)] diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs index 0d505e4ba..203f2b104 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -15,14 +15,14 @@ extern_class!( extern_methods!( unsafe impl NSPopUpButton { - #[method_id(initWithFrame:pullsDown:)] + #[method_id(@__retain_semantics Init initWithFrame:pullsDown:)] pub unsafe fn initWithFrame_pullsDown( this: Option>, buttonFrame: NSRect, flag: bool, ) -> Id; - #[method_id(menu)] + #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[method(setMenu:)] @@ -64,7 +64,7 @@ extern_methods!( #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); - #[method_id(itemArray)] + #[method_id(@__retain_semantics Other itemArray)] pub unsafe fn itemArray(&self) -> Id, Shared>; #[method(numberOfItems)] @@ -89,13 +89,13 @@ extern_methods!( actionSelector: Option, ) -> NSInteger; - #[method_id(itemAtIndex:)] + #[method_id(@__retain_semantics Other itemAtIndex:)] pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; - #[method_id(itemWithTitle:)] + #[method_id(@__retain_semantics Other itemWithTitle:)] pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; - #[method_id(lastItem)] + #[method_id(@__retain_semantics Other lastItem)] pub unsafe fn lastItem(&self) -> Option>; #[method(selectItem:)] @@ -113,7 +113,7 @@ extern_methods!( #[method(setTitle:)] pub unsafe fn setTitle(&self, string: &NSString); - #[method_id(selectedItem)] + #[method_id(@__retain_semantics Other selectedItem)] pub unsafe fn selectedItem(&self) -> Option>; #[method(indexOfSelectedItem)] @@ -125,13 +125,13 @@ extern_methods!( #[method(synchronizeTitleAndSelectedItem)] pub unsafe fn synchronizeTitleAndSelectedItem(&self); - #[method_id(itemTitleAtIndex:)] + #[method_id(@__retain_semantics Other itemTitleAtIndex:)] pub unsafe fn itemTitleAtIndex(&self, index: NSInteger) -> Id; - #[method_id(itemTitles)] + #[method_id(@__retain_semantics Other itemTitles)] pub unsafe fn itemTitles(&self) -> Id, Shared>; - #[method_id(titleOfSelectedItem)] + #[method_id(@__retain_semantics Other titleOfSelectedItem)] pub unsafe fn titleOfSelectedItem(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index 417022651..4958fbdab 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -20,20 +20,20 @@ extern_class!( extern_methods!( unsafe impl NSPopUpButtonCell { - #[method_id(initTextCell:pullsDown:)] + #[method_id(@__retain_semantics Init initTextCell:pullsDown:)] pub unsafe fn initTextCell_pullsDown( this: Option>, stringValue: &NSString, pullDown: bool, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(menu)] + #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[method(setMenu:)] @@ -87,7 +87,7 @@ extern_methods!( #[method(removeAllItems)] pub unsafe fn removeAllItems(&self); - #[method_id(itemArray)] + #[method_id(@__retain_semantics Other itemArray)] pub unsafe fn itemArray(&self) -> Id, Shared>; #[method(numberOfItems)] @@ -112,13 +112,13 @@ extern_methods!( actionSelector: Option, ) -> NSInteger; - #[method_id(itemAtIndex:)] + #[method_id(@__retain_semantics Other itemAtIndex:)] pub unsafe fn itemAtIndex(&self, index: NSInteger) -> Option>; - #[method_id(itemWithTitle:)] + #[method_id(@__retain_semantics Other itemWithTitle:)] pub unsafe fn itemWithTitle(&self, title: &NSString) -> Option>; - #[method_id(lastItem)] + #[method_id(@__retain_semantics Other lastItem)] pub unsafe fn lastItem(&self) -> Option>; #[method(selectItem:)] @@ -136,7 +136,7 @@ extern_methods!( #[method(setTitle:)] pub unsafe fn setTitle(&self, string: Option<&NSString>); - #[method_id(selectedItem)] + #[method_id(@__retain_semantics Other selectedItem)] pub unsafe fn selectedItem(&self) -> Option>; #[method(indexOfSelectedItem)] @@ -145,13 +145,13 @@ extern_methods!( #[method(synchronizeTitleAndSelectedItem)] pub unsafe fn synchronizeTitleAndSelectedItem(&self); - #[method_id(itemTitleAtIndex:)] + #[method_id(@__retain_semantics Other itemTitleAtIndex:)] pub unsafe fn itemTitleAtIndex(&self, index: NSInteger) -> Id; - #[method_id(itemTitles)] + #[method_id(@__retain_semantics Other itemTitles)] pub unsafe fn itemTitles(&self) -> Id, Shared>; - #[method_id(titleOfSelectedItem)] + #[method_id(@__retain_semantics Other titleOfSelectedItem)] pub unsafe fn titleOfSelectedItem(&self) -> Option>; #[method(attachPopUpWithFrame:inView:)] diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index e79697677..0eb74ee97 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -24,16 +24,16 @@ extern_class!( extern_methods!( unsafe impl NSPopover { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -57,7 +57,7 @@ extern_methods!( #[method(setAnimates:)] pub unsafe fn setAnimates(&self, animates: bool); - #[method_id(contentViewController)] + #[method_id(@__retain_semantics Other contentViewController)] pub unsafe fn contentViewController(&self) -> Option>; #[method(setContentViewController:)] diff --git a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs index d0a05b882..f7669460d 100644 --- a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs @@ -15,25 +15,25 @@ extern_class!( extern_methods!( unsafe impl NSPopoverTouchBarItem { - #[method_id(popoverTouchBar)] + #[method_id(@__retain_semantics Other popoverTouchBar)] pub unsafe fn popoverTouchBar(&self) -> Id; #[method(setPopoverTouchBar:)] pub unsafe fn setPopoverTouchBar(&self, popoverTouchBar: &NSTouchBar); - #[method_id(customizationLabel)] + #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[method(setCustomizationLabel:)] pub unsafe fn setCustomizationLabel(&self, customizationLabel: Option<&NSString>); - #[method_id(collapsedRepresentation)] + #[method_id(@__retain_semantics Other collapsedRepresentation)] pub unsafe fn collapsedRepresentation(&self) -> Id; #[method(setCollapsedRepresentation:)] pub unsafe fn setCollapsedRepresentation(&self, collapsedRepresentation: &NSView); - #[method_id(collapsedRepresentationImage)] + #[method_id(@__retain_semantics Other collapsedRepresentationImage)] pub unsafe fn collapsedRepresentationImage(&self) -> Option>; #[method(setCollapsedRepresentationImage:)] @@ -42,7 +42,7 @@ extern_methods!( collapsedRepresentationImage: Option<&NSImage>, ); - #[method_id(collapsedRepresentationLabel)] + #[method_id(@__retain_semantics Other collapsedRepresentationLabel)] pub unsafe fn collapsedRepresentationLabel(&self) -> Id; #[method(setCollapsedRepresentationLabel:)] @@ -51,7 +51,7 @@ extern_methods!( collapsedRepresentationLabel: &NSString, ); - #[method_id(pressAndHoldTouchBar)] + #[method_id(@__retain_semantics Other pressAndHoldTouchBar)] pub unsafe fn pressAndHoldTouchBar(&self) -> Option>; #[method(setPressAndHoldTouchBar:)] @@ -69,7 +69,7 @@ extern_methods!( #[method(dismissPopover:)] pub unsafe fn dismissPopover(&self, sender: Option<&Object>); - #[method_id(makeStandardActivatePopoverGestureRecognizer)] + #[method_id(@__retain_semantics Other makeStandardActivatePopoverGestureRecognizer)] pub unsafe fn makeStandardActivatePopoverGestureRecognizer( &self, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs index 93c9969d4..fa03171d2 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSPredicateEditor { - #[method_id(rowTemplates)] + #[method_id(@__retain_semantics Other rowTemplates)] pub unsafe fn rowTemplates(&self) -> Id, Shared>; #[method(setRowTemplates:)] diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs index 675357e1d..da174ad56 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs @@ -18,25 +18,25 @@ extern_methods!( #[method(matchForPredicate:)] pub unsafe fn matchForPredicate(&self, predicate: &NSPredicate) -> c_double; - #[method_id(templateViews)] + #[method_id(@__retain_semantics Other templateViews)] pub unsafe fn templateViews(&self) -> Id, Shared>; #[method(setPredicate:)] pub unsafe fn setPredicate(&self, predicate: &NSPredicate); - #[method_id(predicateWithSubpredicates:)] + #[method_id(@__retain_semantics Other predicateWithSubpredicates:)] pub unsafe fn predicateWithSubpredicates( &self, subpredicates: Option<&NSArray>, ) -> Id; - #[method_id(displayableSubpredicatesOfPredicate:)] + #[method_id(@__retain_semantics Other displayableSubpredicatesOfPredicate:)] pub unsafe fn displayableSubpredicatesOfPredicate( &self, predicate: &NSPredicate, ) -> Option, Shared>>; - #[method_id(initWithLeftExpressions:rightExpressions:modifier:operators:options:)] + #[method_id(@__retain_semantics Init initWithLeftExpressions:rightExpressions:modifier:operators:options:)] pub unsafe fn initWithLeftExpressions_rightExpressions_modifier_operators_options( this: Option>, leftExpressions: &NSArray, @@ -46,7 +46,7 @@ extern_methods!( options: NSUInteger, ) -> Id; - #[method_id(initWithLeftExpressions:rightExpressionAttributeType:modifier:operators:options:)] + #[method_id(@__retain_semantics Init initWithLeftExpressions:rightExpressionAttributeType:modifier:operators:options:)] pub unsafe fn initWithLeftExpressions_rightExpressionAttributeType_modifier_operators_options( this: Option>, leftExpressions: &NSArray, @@ -56,16 +56,16 @@ extern_methods!( options: NSUInteger, ) -> Id; - #[method_id(initWithCompoundTypes:)] + #[method_id(@__retain_semantics Init initWithCompoundTypes:)] pub unsafe fn initWithCompoundTypes( this: Option>, compoundTypes: &NSArray, ) -> Id; - #[method_id(leftExpressions)] + #[method_id(@__retain_semantics Other leftExpressions)] pub unsafe fn leftExpressions(&self) -> Option, Shared>>; - #[method_id(rightExpressions)] + #[method_id(@__retain_semantics Other rightExpressions)] pub unsafe fn rightExpressions(&self) -> Option, Shared>>; #[method(rightExpressionAttributeType)] @@ -74,16 +74,16 @@ extern_methods!( #[method(modifier)] pub unsafe fn modifier(&self) -> NSComparisonPredicateModifier; - #[method_id(operators)] + #[method_id(@__retain_semantics Other operators)] pub unsafe fn operators(&self) -> Option, Shared>>; #[method(options)] pub unsafe fn options(&self) -> NSUInteger; - #[method_id(compoundTypes)] + #[method_id(@__retain_semantics Other compoundTypes)] pub unsafe fn compoundTypes(&self) -> Option, Shared>>; - #[method_id(templatesWithAttributeKeyPaths:inEntityDescription:)] + #[method_id(@__retain_semantics Other templatesWithAttributeKeyPaths:inEntityDescription:)] pub unsafe fn templatesWithAttributeKeyPaths_inEntityDescription( keyPaths: &NSArray, entityDescription: &NSEntityDescription, diff --git a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs index 5f75d4727..1da3bca04 100644 --- a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs @@ -18,7 +18,7 @@ extern_methods!( #[method(pressureBehavior)] pub unsafe fn pressureBehavior(&self) -> NSPressureBehavior; - #[method_id(initWithPressureBehavior:)] + #[method_id(@__retain_semantics Init initWithPressureBehavior:)] pub unsafe fn initWithPressureBehavior( this: Option>, pressureBehavior: NSPressureBehavior, @@ -32,7 +32,7 @@ extern_methods!( extern_methods!( /// NSPressureConfiguration unsafe impl NSView { - #[method_id(pressureConfiguration)] + #[method_id(@__retain_semantics Other pressureConfiguration)] pub unsafe fn pressureConfiguration(&self) -> Option>; #[method(setPressureConfiguration:)] diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs index 90c9a71fb..e5e78c8d1 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -166,33 +166,33 @@ extern_class!( extern_methods!( unsafe impl NSPrintInfo { - #[method_id(sharedPrintInfo)] + #[method_id(@__retain_semantics Other sharedPrintInfo)] pub unsafe fn sharedPrintInfo() -> Id; #[method(setSharedPrintInfo:)] pub unsafe fn setSharedPrintInfo(sharedPrintInfo: &NSPrintInfo); - #[method_id(initWithDictionary:)] + #[method_id(@__retain_semantics Init initWithDictionary:)] pub unsafe fn initWithDictionary( this: Option>, attributes: &NSDictionary, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(dictionary)] + #[method_id(@__retain_semantics Other dictionary)] pub unsafe fn dictionary( &self, ) -> Id, Shared>; - #[method_id(paperName)] + #[method_id(@__retain_semantics Other paperName)] pub unsafe fn paperName(&self) -> Option>; #[method(setPaperName:)] @@ -267,13 +267,13 @@ extern_methods!( #[method(setVerticalPagination:)] pub unsafe fn setVerticalPagination(&self, verticalPagination: NSPrintingPaginationMode); - #[method_id(jobDisposition)] + #[method_id(@__retain_semantics Other jobDisposition)] pub unsafe fn jobDisposition(&self) -> Id; #[method(setJobDisposition:)] pub unsafe fn setJobDisposition(&self, jobDisposition: &NSPrintJobDispositionValue); - #[method_id(printer)] + #[method_id(@__retain_semantics Other printer)] pub unsafe fn printer(&self) -> Id; #[method(setPrinter:)] @@ -285,13 +285,13 @@ extern_methods!( #[method(imageablePageBounds)] pub unsafe fn imageablePageBounds(&self) -> NSRect; - #[method_id(localizedPaperName)] + #[method_id(@__retain_semantics Other localizedPaperName)] pub unsafe fn localizedPaperName(&self) -> Option>; - #[method_id(defaultPrinter)] + #[method_id(@__retain_semantics Other defaultPrinter)] pub unsafe fn defaultPrinter() -> Option>; - #[method_id(printSettings)] + #[method_id(@__retain_semantics Other printSettings)] pub unsafe fn printSettings( &self, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs index 672b35a91..1d16dbeb0 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -29,13 +29,13 @@ extern_class!( extern_methods!( unsafe impl NSPrintOperation { - #[method_id(printOperationWithView:printInfo:)] + #[method_id(@__retain_semantics Other printOperationWithView:printInfo:)] pub unsafe fn printOperationWithView_printInfo( view: &NSView, printInfo: &NSPrintInfo, ) -> Id; - #[method_id(PDFOperationWithView:insideRect:toData:printInfo:)] + #[method_id(@__retain_semantics Other PDFOperationWithView:insideRect:toData:printInfo:)] pub unsafe fn PDFOperationWithView_insideRect_toData_printInfo( view: &NSView, rect: NSRect, @@ -43,7 +43,7 @@ extern_methods!( printInfo: &NSPrintInfo, ) -> Id; - #[method_id(PDFOperationWithView:insideRect:toPath:printInfo:)] + #[method_id(@__retain_semantics Other PDFOperationWithView:insideRect:toPath:printInfo:)] pub unsafe fn PDFOperationWithView_insideRect_toPath_printInfo( view: &NSView, rect: NSRect, @@ -51,7 +51,7 @@ extern_methods!( printInfo: &NSPrintInfo, ) -> Id; - #[method_id(EPSOperationWithView:insideRect:toData:printInfo:)] + #[method_id(@__retain_semantics Other EPSOperationWithView:insideRect:toData:printInfo:)] pub unsafe fn EPSOperationWithView_insideRect_toData_printInfo( view: &NSView, rect: NSRect, @@ -59,7 +59,7 @@ extern_methods!( printInfo: &NSPrintInfo, ) -> Id; - #[method_id(EPSOperationWithView:insideRect:toPath:printInfo:)] + #[method_id(@__retain_semantics Other EPSOperationWithView:insideRect:toPath:printInfo:)] pub unsafe fn EPSOperationWithView_insideRect_toPath_printInfo( view: &NSView, rect: NSRect, @@ -67,24 +67,24 @@ extern_methods!( printInfo: &NSPrintInfo, ) -> Id; - #[method_id(printOperationWithView:)] + #[method_id(@__retain_semantics Other printOperationWithView:)] pub unsafe fn printOperationWithView(view: &NSView) -> Id; - #[method_id(PDFOperationWithView:insideRect:toData:)] + #[method_id(@__retain_semantics Other PDFOperationWithView:insideRect:toData:)] pub unsafe fn PDFOperationWithView_insideRect_toData( view: &NSView, rect: NSRect, data: &NSMutableData, ) -> Id; - #[method_id(EPSOperationWithView:insideRect:toData:)] + #[method_id(@__retain_semantics Other EPSOperationWithView:insideRect:toData:)] pub unsafe fn EPSOperationWithView_insideRect_toData( view: &NSView, rect: NSRect, data: Option<&NSMutableData>, ) -> Id; - #[method_id(currentOperation)] + #[method_id(@__retain_semantics Other currentOperation)] pub unsafe fn currentOperation() -> Option>; #[method(setCurrentOperation:)] @@ -96,7 +96,7 @@ extern_methods!( #[method(preferredRenderingQuality)] pub unsafe fn preferredRenderingQuality(&self) -> NSPrintRenderingQuality; - #[method_id(jobTitle)] + #[method_id(@__retain_semantics Other jobTitle)] pub unsafe fn jobTitle(&self) -> Option>; #[method(setJobTitle:)] @@ -114,13 +114,13 @@ extern_methods!( #[method(setShowsProgressPanel:)] pub unsafe fn setShowsProgressPanel(&self, showsProgressPanel: bool); - #[method_id(printPanel)] + #[method_id(@__retain_semantics Other printPanel)] pub unsafe fn printPanel(&self) -> Id; #[method(setPrintPanel:)] pub unsafe fn setPrintPanel(&self, printPanel: &NSPrintPanel); - #[method_id(PDFPanel)] + #[method_id(@__retain_semantics Other PDFPanel)] pub unsafe fn PDFPanel(&self) -> Id; #[method(setPDFPanel:)] @@ -150,16 +150,16 @@ extern_methods!( #[method(runOperation)] pub unsafe fn runOperation(&self) -> bool; - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; - #[method_id(printInfo)] + #[method_id(@__retain_semantics Other printInfo)] pub unsafe fn printInfo(&self) -> Id; #[method(setPrintInfo:)] pub unsafe fn setPrintInfo(&self, printInfo: &NSPrintInfo); - #[method_id(context)] + #[method_id(@__retain_semantics Other context)] pub unsafe fn context(&self) -> Option>; #[method(pageRange)] @@ -168,7 +168,7 @@ extern_methods!( #[method(currentPage)] pub unsafe fn currentPage(&self) -> NSInteger; - #[method_id(createContext)] + #[method_id(@__retain_semantics Other createContext)] pub unsafe fn createContext(&self) -> Option>; #[method(destroyContext)] @@ -188,13 +188,13 @@ extern_methods!( #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, view: Option<&NSView>); - #[method_id(accessoryView)] + #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[method(setJobStyleHint:)] pub unsafe fn setJobStyleHint(&self, hint: Option<&NSString>); - #[method_id(jobStyleHint)] + #[method_id(@__retain_semantics Other jobStyleHint)] pub unsafe fn jobStyleHint(&self) -> Option>; #[method(setShowPanels:)] diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index 33a707701..0790a3067 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -52,7 +52,7 @@ extern_class!( extern_methods!( unsafe impl NSPrintPanel { - #[method_id(printPanel)] + #[method_id(@__retain_semantics Other printPanel)] pub unsafe fn printPanel() -> Id; #[method(addAccessoryController:)] @@ -61,7 +61,7 @@ extern_methods!( #[method(removeAccessoryController:)] pub unsafe fn removeAccessoryController(&self, accessoryController: &TodoProtocols); - #[method_id(accessoryControllers)] + #[method_id(@__retain_semantics Other accessoryControllers)] pub unsafe fn accessoryControllers(&self) -> Id, Shared>; #[method(options)] @@ -73,16 +73,16 @@ extern_methods!( #[method(setDefaultButtonTitle:)] pub unsafe fn setDefaultButtonTitle(&self, defaultButtonTitle: Option<&NSString>); - #[method_id(defaultButtonTitle)] + #[method_id(@__retain_semantics Other defaultButtonTitle)] pub unsafe fn defaultButtonTitle(&self) -> Option>; - #[method_id(helpAnchor)] + #[method_id(@__retain_semantics Other helpAnchor)] pub unsafe fn helpAnchor(&self) -> Option>; #[method(setHelpAnchor:)] pub unsafe fn setHelpAnchor(&self, helpAnchor: Option<&NSHelpAnchorName>); - #[method_id(jobStyleHint)] + #[method_id(@__retain_semantics Other jobStyleHint)] pub unsafe fn jobStyleHint(&self) -> Option>; #[method(setJobStyleHint:)] @@ -104,7 +104,7 @@ extern_methods!( #[method(runModal)] pub unsafe fn runModal(&self) -> NSInteger; - #[method_id(printInfo)] + #[method_id(@__retain_semantics Other printInfo)] pub unsafe fn printInfo(&self) -> Id; } ); @@ -115,7 +115,7 @@ extern_methods!( #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); - #[method_id(accessoryView)] + #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[method(updateFromPrintInfo)] diff --git a/crates/icrate/src/generated/AppKit/NSPrinter.rs b/crates/icrate/src/generated/AppKit/NSPrinter.rs index 8244246cb..3ec86c63a 100644 --- a/crates/icrate/src/generated/AppKit/NSPrinter.rs +++ b/crates/icrate/src/generated/AppKit/NSPrinter.rs @@ -24,22 +24,22 @@ extern_class!( extern_methods!( unsafe impl NSPrinter { - #[method_id(printerNames)] + #[method_id(@__retain_semantics Other printerNames)] pub unsafe fn printerNames() -> Id, Shared>; - #[method_id(printerTypes)] + #[method_id(@__retain_semantics Other printerTypes)] pub unsafe fn printerTypes() -> Id, Shared>; - #[method_id(printerWithName:)] + #[method_id(@__retain_semantics Other printerWithName:)] pub unsafe fn printerWithName(name: &NSString) -> Option>; - #[method_id(printerWithType:)] + #[method_id(@__retain_semantics Other printerWithType:)] pub unsafe fn printerWithType(type_: &NSPrinterTypeName) -> Option>; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; - #[method_id(type)] + #[method_id(@__retain_semantics Other type)] pub unsafe fn type_(&self) -> Id; #[method(languageLevel)] @@ -48,7 +48,7 @@ extern_methods!( #[method(pageSizeForPaper:)] pub unsafe fn pageSizeForPaper(&self, paperName: &NSPrinterPaperName) -> NSSize; - #[method_id(deviceDescription)] + #[method_id(@__retain_semantics Other deviceDescription)] pub unsafe fn deviceDescription( &self, ) -> Id, Shared>; @@ -89,14 +89,14 @@ extern_methods!( pub unsafe fn sizeForKey_inTable(&self, key: Option<&NSString>, table: &NSString) -> NSSize; - #[method_id(stringForKey:inTable:)] + #[method_id(@__retain_semantics Other stringForKey:inTable:)] pub unsafe fn stringForKey_inTable( &self, key: Option<&NSString>, table: &NSString, ) -> Option>; - #[method_id(stringListForKey:inTable:)] + #[method_id(@__retain_semantics Other stringListForKey:inTable:)] pub unsafe fn stringListForKey_inTable( &self, key: Option<&NSString>, @@ -118,20 +118,20 @@ extern_methods!( #[method(isOutputStackInReverseOrder)] pub unsafe fn isOutputStackInReverseOrder(&self) -> bool; - #[method_id(printerWithName:domain:includeUnavailable:)] + #[method_id(@__retain_semantics Other printerWithName:domain:includeUnavailable:)] pub unsafe fn printerWithName_domain_includeUnavailable( name: &NSString, domain: Option<&NSString>, flag: bool, ) -> Option>; - #[method_id(domain)] + #[method_id(@__retain_semantics Other domain)] pub unsafe fn domain(&self) -> Id; - #[method_id(host)] + #[method_id(@__retain_semantics Other host)] pub unsafe fn host(&self) -> Id; - #[method_id(note)] + #[method_id(@__retain_semantics Other note)] pub unsafe fn note(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSResponder.rs b/crates/icrate/src/generated/AppKit/NSResponder.rs index caca0958d..c04b7aec2 100644 --- a/crates/icrate/src/generated/AppKit/NSResponder.rs +++ b/crates/icrate/src/generated/AppKit/NSResponder.rs @@ -15,16 +15,16 @@ extern_class!( extern_methods!( unsafe impl NSResponder { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(nextResponder)] + #[method_id(@__retain_semantics Other nextResponder)] pub unsafe fn nextResponder(&self) -> Option>; #[method(setNextResponder:)] @@ -36,7 +36,7 @@ extern_methods!( #[method(performKeyEquivalent:)] pub unsafe fn performKeyEquivalent(&self, event: &NSEvent) -> bool; - #[method_id(validRequestorForSendType:returnType:)] + #[method_id(@__retain_semantics Other validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, sendType: Option<&NSPasteboardType>, @@ -157,7 +157,7 @@ extern_methods!( #[method(flushBufferedKeyEvents)] pub unsafe fn flushBufferedKeyEvents(&self); - #[method_id(menu)] + #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[method(setMenu:)] @@ -181,7 +181,7 @@ extern_methods!( #[method(wantsForwardedScrollEventsForAxis:)] pub unsafe fn wantsForwardedScrollEventsForAxis(&self, axis: NSEventGestureAxis) -> bool; - #[method_id(supplementalTargetForAction:sender:)] + #[method_id(@__retain_semantics Other supplementalTargetForAction:sender:)] pub unsafe fn supplementalTargetForAction_sender( &self, action: Sel, @@ -200,7 +200,7 @@ extern_methods!( extern_methods!( /// NSUndoSupport unsafe impl NSResponder { - #[method_id(undoManager)] + #[method_id(@__retain_semantics Other undoManager)] pub unsafe fn undoManager(&self) -> Option>; } ); @@ -233,7 +233,7 @@ extern_methods!( #[method(presentError:)] pub unsafe fn presentError(&self, error: &NSError) -> bool; - #[method_id(willPresentError:)] + #[method_id(@__retain_semantics Other willPresentError:)] pub unsafe fn willPresentError(&self, error: &NSError) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index 48d4c7b7c..e8f286e20 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -55,13 +55,13 @@ extern_class!( extern_methods!( unsafe impl NSRuleEditor { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSRuleEditorDelegate>); - #[method_id(formattingStringsFilename)] + #[method_id(@__retain_semantics Other formattingStringsFilename)] pub unsafe fn formattingStringsFilename(&self) -> Option>; #[method(setFormattingStringsFilename:)] @@ -70,7 +70,7 @@ extern_methods!( formattingStringsFilename: Option<&NSString>, ); - #[method_id(formattingDictionary)] + #[method_id(@__retain_semantics Other formattingDictionary)] pub unsafe fn formattingDictionary( &self, ) -> Option, Shared>>; @@ -108,25 +108,25 @@ extern_methods!( #[method(setCanRemoveAllRows:)] pub unsafe fn setCanRemoveAllRows(&self, canRemoveAllRows: bool); - #[method_id(predicate)] + #[method_id(@__retain_semantics Other predicate)] pub unsafe fn predicate(&self) -> Option>; #[method(reloadPredicate)] pub unsafe fn reloadPredicate(&self); - #[method_id(predicateForRow:)] + #[method_id(@__retain_semantics Other predicateForRow:)] pub unsafe fn predicateForRow(&self, row: NSInteger) -> Option>; #[method(numberOfRows)] pub unsafe fn numberOfRows(&self) -> NSInteger; - #[method_id(subrowIndexesForRow:)] + #[method_id(@__retain_semantics Other subrowIndexesForRow:)] pub unsafe fn subrowIndexesForRow(&self, rowIndex: NSInteger) -> Id; - #[method_id(criteriaForRow:)] + #[method_id(@__retain_semantics Other criteriaForRow:)] pub unsafe fn criteriaForRow(&self, row: NSInteger) -> Id; - #[method_id(displayValuesForRow:)] + #[method_id(@__retain_semantics Other displayValuesForRow:)] pub unsafe fn displayValuesForRow(&self, row: NSInteger) -> Id; #[method(rowForDisplayValue:)] @@ -168,7 +168,7 @@ extern_methods!( includeSubrows: bool, ); - #[method_id(selectedRowIndexes)] + #[method_id(@__retain_semantics Other selectedRowIndexes)] pub unsafe fn selectedRowIndexes(&self) -> Id; #[method(selectRowIndexes:byExtendingSelection:)] @@ -184,25 +184,25 @@ extern_methods!( #[method(setRowClass:)] pub unsafe fn setRowClass(&self, rowClass: &Class); - #[method_id(rowTypeKeyPath)] + #[method_id(@__retain_semantics Other rowTypeKeyPath)] pub unsafe fn rowTypeKeyPath(&self) -> Id; #[method(setRowTypeKeyPath:)] pub unsafe fn setRowTypeKeyPath(&self, rowTypeKeyPath: &NSString); - #[method_id(subrowsKeyPath)] + #[method_id(@__retain_semantics Other subrowsKeyPath)] pub unsafe fn subrowsKeyPath(&self) -> Id; #[method(setSubrowsKeyPath:)] pub unsafe fn setSubrowsKeyPath(&self, subrowsKeyPath: &NSString); - #[method_id(criteriaKeyPath)] + #[method_id(@__retain_semantics Other criteriaKeyPath)] pub unsafe fn criteriaKeyPath(&self) -> Id; #[method(setCriteriaKeyPath:)] pub unsafe fn setCriteriaKeyPath(&self, criteriaKeyPath: &NSString); - #[method_id(displayValuesKeyPath)] + #[method_id(@__retain_semantics Other displayValuesKeyPath)] pub unsafe fn displayValuesKeyPath(&self) -> Id; #[method(setDisplayValuesKeyPath:)] diff --git a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs index e1125c765..b0bec88e8 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSRulerMarker { - #[method_id(initWithRulerView:markerLocation:image:imageOrigin:)] + #[method_id(@__retain_semantics Init initWithRulerView:markerLocation:image:imageOrigin:)] pub unsafe fn initWithRulerView_markerLocation_image_imageOrigin( this: Option>, ruler: &NSRulerView, @@ -24,16 +24,16 @@ extern_methods!( imageOrigin: NSPoint, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(ruler)] + #[method_id(@__retain_semantics Other ruler)] pub unsafe fn ruler(&self) -> Option>; #[method(markerLocation)] @@ -42,7 +42,7 @@ extern_methods!( #[method(setMarkerLocation:)] pub unsafe fn setMarkerLocation(&self, markerLocation: CGFloat); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Id; #[method(setImage:)] @@ -69,7 +69,7 @@ extern_methods!( #[method(isDragging)] pub unsafe fn isDragging(&self) -> bool; - #[method_id(representedObject)] + #[method_id(@__retain_semantics Other representedObject)] pub unsafe fn representedObject(&self) -> Option>; #[method(setRepresentedObject:)] diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs index 471b214d7..da830bd89 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerView.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -46,20 +46,20 @@ extern_methods!( stepDownCycle: &NSArray, ); - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(initWithScrollView:orientation:)] + #[method_id(@__retain_semantics Init initWithScrollView:orientation:)] pub unsafe fn initWithScrollView_orientation( this: Option>, scrollView: Option<&NSScrollView>, orientation: NSRulerOrientation, ) -> Id; - #[method_id(scrollView)] + #[method_id(@__retain_semantics Other scrollView)] pub unsafe fn scrollView(&self) -> Option>; #[method(setScrollView:)] @@ -98,7 +98,7 @@ extern_methods!( reservedThicknessForAccessoryView: CGFloat, ); - #[method_id(measurementUnits)] + #[method_id(@__retain_semantics Other measurementUnits)] pub unsafe fn measurementUnits(&self) -> Id; #[method(setMeasurementUnits:)] @@ -110,7 +110,7 @@ extern_methods!( #[method(setOriginOffset:)] pub unsafe fn setOriginOffset(&self, originOffset: CGFloat); - #[method_id(clientView)] + #[method_id(@__retain_semantics Other clientView)] pub unsafe fn clientView(&self) -> Option>; #[method(setClientView:)] @@ -122,7 +122,7 @@ extern_methods!( #[method(removeMarker:)] pub unsafe fn removeMarker(&self, marker: &NSRulerMarker); - #[method_id(markers)] + #[method_id(@__retain_semantics Other markers)] pub unsafe fn markers(&self) -> Option, Shared>>; #[method(setMarkers:)] @@ -135,7 +135,7 @@ extern_methods!( event: &NSEvent, ) -> bool; - #[method_id(accessoryView)] + #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[method(setAccessoryView:)] diff --git a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs index 1f715fa11..047d692ae 100644 --- a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs @@ -42,25 +42,25 @@ extern_methods!( #[method(activationPolicy)] pub unsafe fn activationPolicy(&self) -> NSApplicationActivationPolicy; - #[method_id(localizedName)] + #[method_id(@__retain_semantics Other localizedName)] pub unsafe fn localizedName(&self) -> Option>; - #[method_id(bundleIdentifier)] + #[method_id(@__retain_semantics Other bundleIdentifier)] pub unsafe fn bundleIdentifier(&self) -> Option>; - #[method_id(bundleURL)] + #[method_id(@__retain_semantics Other bundleURL)] pub unsafe fn bundleURL(&self) -> Option>; - #[method_id(executableURL)] + #[method_id(@__retain_semantics Other executableURL)] pub unsafe fn executableURL(&self) -> Option>; #[method(processIdentifier)] pub unsafe fn processIdentifier(&self) -> pid_t; - #[method_id(launchDate)] + #[method_id(@__retain_semantics Other launchDate)] pub unsafe fn launchDate(&self) -> Option>; - #[method_id(icon)] + #[method_id(@__retain_semantics Other icon)] pub unsafe fn icon(&self) -> Option>; #[method(executableArchitecture)] @@ -81,17 +81,17 @@ extern_methods!( #[method(forceTerminate)] pub unsafe fn forceTerminate(&self) -> bool; - #[method_id(runningApplicationsWithBundleIdentifier:)] + #[method_id(@__retain_semantics Other runningApplicationsWithBundleIdentifier:)] pub unsafe fn runningApplicationsWithBundleIdentifier( bundleIdentifier: &NSString, ) -> Id, Shared>; - #[method_id(runningApplicationWithProcessIdentifier:)] + #[method_id(@__retain_semantics Other runningApplicationWithProcessIdentifier:)] pub unsafe fn runningApplicationWithProcessIdentifier( pid: pid_t, ) -> Option>; - #[method_id(currentApplication)] + #[method_id(@__retain_semantics Other currentApplication)] pub unsafe fn currentApplication() -> Id; #[method(terminateAutomaticallyTerminableApplications)] @@ -102,7 +102,7 @@ extern_methods!( extern_methods!( /// NSWorkspaceRunningApplications unsafe impl NSWorkspace { - #[method_id(runningApplications)] + #[method_id(@__retain_semantics Other runningApplications)] pub unsafe fn runningApplications(&self) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index b7de0ecfd..c86e7ea74 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -18,19 +18,19 @@ extern_class!( extern_methods!( unsafe impl NSSavePanel { - #[method_id(savePanel)] + #[method_id(@__retain_semantics Other savePanel)] pub unsafe fn savePanel() -> Id; - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; - #[method_id(directoryURL)] + #[method_id(@__retain_semantics Other directoryURL)] pub unsafe fn directoryURL(&self) -> Option>; #[method(setDirectoryURL:)] pub unsafe fn setDirectoryURL(&self, directoryURL: Option<&NSURL>); - #[method_id(allowedContentTypes)] + #[method_id(@__retain_semantics Other allowedContentTypes)] pub unsafe fn allowedContentTypes(&self) -> Id, Shared>; #[method(setAllowedContentTypes:)] @@ -42,13 +42,13 @@ extern_methods!( #[method(setAllowsOtherFileTypes:)] pub unsafe fn setAllowsOtherFileTypes(&self, allowsOtherFileTypes: bool); - #[method_id(accessoryView)] + #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -84,31 +84,31 @@ extern_methods!( treatsFilePackagesAsDirectories: bool, ); - #[method_id(prompt)] + #[method_id(@__retain_semantics Other prompt)] pub unsafe fn prompt(&self) -> Id; #[method(setPrompt:)] pub unsafe fn setPrompt(&self, prompt: Option<&NSString>); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); - #[method_id(nameFieldLabel)] + #[method_id(@__retain_semantics Other nameFieldLabel)] pub unsafe fn nameFieldLabel(&self) -> Id; #[method(setNameFieldLabel:)] pub unsafe fn setNameFieldLabel(&self, nameFieldLabel: Option<&NSString>); - #[method_id(nameFieldStringValue)] + #[method_id(@__retain_semantics Other nameFieldStringValue)] pub unsafe fn nameFieldStringValue(&self) -> Id; #[method(setNameFieldStringValue:)] pub unsafe fn setNameFieldStringValue(&self, nameFieldStringValue: &NSString); - #[method_id(message)] + #[method_id(@__retain_semantics Other message)] pub unsafe fn message(&self) -> Id; #[method(setMessage:)] @@ -129,7 +129,7 @@ extern_methods!( #[method(setShowsTagField:)] pub unsafe fn setShowsTagField(&self, showsTagField: bool); - #[method_id(tagNames)] + #[method_id(@__retain_semantics Other tagNames)] pub unsafe fn tagNames(&self) -> Option, Shared>>; #[method(setTagNames:)] @@ -185,16 +185,16 @@ extern_methods!( extern_methods!( /// NSDeprecated unsafe impl NSSavePanel { - #[method_id(filename)] + #[method_id(@__retain_semantics Other filename)] pub unsafe fn filename(&self) -> Id; - #[method_id(directory)] + #[method_id(@__retain_semantics Other directory)] pub unsafe fn directory(&self) -> Id; #[method(setDirectory:)] pub unsafe fn setDirectory(&self, path: Option<&NSString>); - #[method_id(requiredFileType)] + #[method_id(@__retain_semantics Other requiredFileType)] pub unsafe fn requiredFileType(&self) -> Option>; #[method(setRequiredFileType:)] @@ -221,7 +221,7 @@ extern_methods!( #[method(selectText:)] pub unsafe fn selectText(&self, sender: Option<&Object>); - #[method_id(allowedFileTypes)] + #[method_id(@__retain_semantics Other allowedFileTypes)] pub unsafe fn allowedFileTypes(&self) -> Option, Shared>>; #[method(setAllowedFileTypes:)] diff --git a/crates/icrate/src/generated/AppKit/NSScreen.rs b/crates/icrate/src/generated/AppKit/NSScreen.rs index 3326d4227..a77fe7a63 100644 --- a/crates/icrate/src/generated/AppKit/NSScreen.rs +++ b/crates/icrate/src/generated/AppKit/NSScreen.rs @@ -15,13 +15,13 @@ extern_class!( extern_methods!( unsafe impl NSScreen { - #[method_id(screens)] + #[method_id(@__retain_semantics Other screens)] pub unsafe fn screens() -> Id, Shared>; - #[method_id(mainScreen)] + #[method_id(@__retain_semantics Other mainScreen)] pub unsafe fn mainScreen() -> Option>; - #[method_id(deepestScreen)] + #[method_id(@__retain_semantics Other deepestScreen)] pub unsafe fn deepestScreen() -> Option>; #[method(screensHaveSeparateSpaces)] @@ -36,12 +36,12 @@ extern_methods!( #[method(visibleFrame)] pub unsafe fn visibleFrame(&self) -> NSRect; - #[method_id(deviceDescription)] + #[method_id(@__retain_semantics Other deviceDescription)] pub unsafe fn deviceDescription( &self, ) -> Id, Shared>; - #[method_id(colorSpace)] + #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Option>; #[method(supportedWindowDepths)] @@ -66,7 +66,7 @@ extern_methods!( #[method(backingScaleFactor)] pub unsafe fn backingScaleFactor(&self) -> CGFloat; - #[method_id(localizedName)] + #[method_id(@__retain_semantics Other localizedName)] pub unsafe fn localizedName(&self) -> Id; #[method(safeAreaInsets)] diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index 081d5b82a..5ac0f56cb 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -20,13 +20,13 @@ extern_class!( extern_methods!( unsafe impl NSScrollView { - #[method_id(initWithFrame:)] + #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame( this: Option>, frameRect: NSRect, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -74,19 +74,19 @@ extern_methods!( #[method(contentSize)] pub unsafe fn contentSize(&self) -> NSSize; - #[method_id(documentView)] + #[method_id(@__retain_semantics Other documentView)] pub unsafe fn documentView(&self) -> Option>; #[method(setDocumentView:)] pub unsafe fn setDocumentView(&self, documentView: Option<&NSView>); - #[method_id(contentView)] + #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Id; #[method(setContentView:)] pub unsafe fn setContentView(&self, contentView: &NSClipView); - #[method_id(documentCursor)] + #[method_id(@__retain_semantics Other documentCursor)] pub unsafe fn documentCursor(&self) -> Option>; #[method(setDocumentCursor:)] @@ -98,7 +98,7 @@ extern_methods!( #[method(setBorderType:)] pub unsafe fn setBorderType(&self, borderType: NSBorderType); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] @@ -122,13 +122,13 @@ extern_methods!( #[method(setHasHorizontalScroller:)] pub unsafe fn setHasHorizontalScroller(&self, hasHorizontalScroller: bool); - #[method_id(verticalScroller)] + #[method_id(@__retain_semantics Other verticalScroller)] pub unsafe fn verticalScroller(&self) -> Option>; #[method(setVerticalScroller:)] pub unsafe fn setVerticalScroller(&self, verticalScroller: Option<&NSScroller>); - #[method_id(horizontalScroller)] + #[method_id(@__retain_semantics Other horizontalScroller)] pub unsafe fn horizontalScroller(&self) -> Option>; #[method(setHorizontalScroller:)] @@ -337,13 +337,13 @@ extern_methods!( #[method(setHasVerticalRuler:)] pub unsafe fn setHasVerticalRuler(&self, hasVerticalRuler: bool); - #[method_id(horizontalRulerView)] + #[method_id(@__retain_semantics Other horizontalRulerView)] pub unsafe fn horizontalRulerView(&self) -> Option>; #[method(setHorizontalRulerView:)] pub unsafe fn setHorizontalRulerView(&self, horizontalRulerView: Option<&NSRulerView>); - #[method_id(verticalRulerView)] + #[method_id(@__retain_semantics Other verticalRulerView)] pub unsafe fn verticalRulerView(&self) -> Option>; #[method(setVerticalRulerView:)] diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs index 8c48bc38c..fb1e765e8 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubber.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -29,22 +29,22 @@ extern_class!( extern_methods!( unsafe impl NSScrubberSelectionStyle { - #[method_id(outlineOverlayStyle)] + #[method_id(@__retain_semantics Other outlineOverlayStyle)] pub unsafe fn outlineOverlayStyle() -> Id; - #[method_id(roundedBackgroundStyle)] + #[method_id(@__retain_semantics Other roundedBackgroundStyle)] pub unsafe fn roundedBackgroundStyle() -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(makeSelectionView)] + #[method_id(@__retain_semantics Other makeSelectionView)] pub unsafe fn makeSelectionView(&self) -> Option>; } ); @@ -60,19 +60,19 @@ extern_class!( extern_methods!( unsafe impl NSScrubber { - #[method_id(dataSource)] + #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>; #[method(setDataSource:)] pub unsafe fn setDataSource(&self, dataSource: Option<&NSScrubberDataSource>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSScrubberDelegate>); - #[method_id(scrubberLayout)] + #[method_id(@__retain_semantics Other scrubberLayout)] pub unsafe fn scrubberLayout(&self) -> Id; #[method(setScrubberLayout:)] @@ -114,7 +114,7 @@ extern_methods!( #[method(setFloatsSelectionViews:)] pub unsafe fn setFloatsSelectionViews(&self, floatsSelectionViews: bool); - #[method_id(selectionBackgroundStyle)] + #[method_id(@__retain_semantics Other selectionBackgroundStyle)] pub unsafe fn selectionBackgroundStyle( &self, ) -> Option>; @@ -125,7 +125,7 @@ extern_methods!( selectionBackgroundStyle: Option<&NSScrubberSelectionStyle>, ); - #[method_id(selectionOverlayStyle)] + #[method_id(@__retain_semantics Other selectionOverlayStyle)] pub unsafe fn selectionOverlayStyle(&self) -> Option>; #[method(setSelectionOverlayStyle:)] @@ -149,25 +149,25 @@ extern_methods!( showsAdditionalContentIndicators: bool, ); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); - #[method_id(backgroundView)] + #[method_id(@__retain_semantics Other backgroundView)] pub unsafe fn backgroundView(&self) -> Option>; #[method(setBackgroundView:)] pub unsafe fn setBackgroundView(&self, backgroundView: Option<&NSView>); - #[method_id(initWithFrame:)] + #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame( this: Option>, frameRect: NSRect, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -198,7 +198,7 @@ extern_methods!( alignment: NSScrubberAlignment, ); - #[method_id(itemViewForItemAtIndex:)] + #[method_id(@__retain_semantics Other itemViewForItemAtIndex:)] pub unsafe fn itemViewForItemAtIndex( &self, index: NSInteger, @@ -218,7 +218,7 @@ extern_methods!( itemIdentifier: &NSUserInterfaceItemIdentifier, ); - #[method_id(makeItemWithIdentifier:owner:)] + #[method_id(@__retain_semantics Other makeItemWithIdentifier:owner:)] pub unsafe fn makeItemWithIdentifier_owner( &self, itemIdentifier: &NSUserInterfaceItemIdentifier, diff --git a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs index 6e3052c6d..59a2b1ba4 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs @@ -69,10 +69,10 @@ extern_class!( extern_methods!( unsafe impl NSScrubberTextItemView { - #[method_id(textField)] + #[method_id(@__retain_semantics Other textField)] pub unsafe fn textField(&self) -> Id; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] @@ -91,10 +91,10 @@ extern_class!( extern_methods!( unsafe impl NSScrubberImageItemView { - #[method_id(imageView)] + #[method_id(@__retain_semantics Other imageView)] pub unsafe fn imageView(&self) -> Id; - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Id; #[method(setImage:)] diff --git a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs index 2d3805514..f8f442217 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs @@ -33,7 +33,7 @@ extern_methods!( #[method(setAlpha:)] pub unsafe fn setAlpha(&self, alpha: CGFloat); - #[method_id(layoutAttributesForItemAtIndex:)] + #[method_id(@__retain_semantics Other layoutAttributesForItemAtIndex:)] pub unsafe fn layoutAttributesForItemAtIndex(index: NSInteger) -> Id; } ); @@ -52,16 +52,16 @@ extern_methods!( #[method(layoutAttributesClass)] pub unsafe fn layoutAttributesClass() -> &'static Class; - #[method_id(scrubber)] + #[method_id(@__retain_semantics Other scrubber)] pub unsafe fn scrubber(&self) -> Option>; #[method(visibleRect)] pub unsafe fn visibleRect(&self) -> NSRect; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -76,13 +76,13 @@ extern_methods!( #[method(scrubberContentSize)] pub unsafe fn scrubberContentSize(&self) -> NSSize; - #[method_id(layoutAttributesForItemAtIndex:)] + #[method_id(@__retain_semantics Other layoutAttributesForItemAtIndex:)] pub unsafe fn layoutAttributesForItemAtIndex( &self, index: NSInteger, ) -> Option>; - #[method_id(layoutAttributesForItemsInRect:)] + #[method_id(@__retain_semantics Other layoutAttributesForItemsInRect:)] pub unsafe fn layoutAttributesForItemsInRect( &self, rect: NSRect, @@ -153,13 +153,13 @@ extern_methods!( #[method(setNumberOfVisibleItems:)] pub unsafe fn setNumberOfVisibleItems(&self, numberOfVisibleItems: NSInteger); - #[method_id(initWithNumberOfVisibleItems:)] + #[method_id(@__retain_semantics Init initWithNumberOfVisibleItems:)] pub unsafe fn initWithNumberOfVisibleItems( this: Option>, numberOfVisibleItems: NSInteger, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, diff --git a/crates/icrate/src/generated/AppKit/NSSearchField.rs b/crates/icrate/src/generated/AppKit/NSSearchField.rs index 0201d8829..b1a8b1ad6 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchField.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchField.rs @@ -28,13 +28,13 @@ extern_methods!( #[method(cancelButtonBounds)] pub unsafe fn cancelButtonBounds(&self) -> NSRect; - #[method_id(recentSearches)] + #[method_id(@__retain_semantics Other recentSearches)] pub unsafe fn recentSearches(&self) -> Id, Shared>; #[method(setRecentSearches:)] pub unsafe fn setRecentSearches(&self, recentSearches: &NSArray); - #[method_id(recentsAutosaveName)] + #[method_id(@__retain_semantics Other recentsAutosaveName)] pub unsafe fn recentsAutosaveName( &self, ) -> Option>; @@ -45,7 +45,7 @@ extern_methods!( recentsAutosaveName: Option<&NSSearchFieldRecentsAutosaveName>, ); - #[method_id(searchMenuTemplate)] + #[method_id(@__retain_semantics Other searchMenuTemplate)] pub unsafe fn searchMenuTemplate(&self) -> Option>; #[method(setSearchMenuTemplate:)] @@ -69,7 +69,7 @@ extern_methods!( #[method(setSendsSearchStringImmediately:)] pub unsafe fn setSendsSearchStringImmediately(&self, sendsSearchStringImmediately: bool); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] diff --git a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs index 091d5fdff..37413ab29 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs @@ -23,31 +23,31 @@ extern_class!( extern_methods!( unsafe impl NSSearchFieldCell { - #[method_id(initTextCell:)] + #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell( this: Option>, string: &NSString, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(initImageCell:)] + #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, image: Option<&NSImage>, ) -> Id; - #[method_id(searchButtonCell)] + #[method_id(@__retain_semantics Other searchButtonCell)] pub unsafe fn searchButtonCell(&self) -> Option>; #[method(setSearchButtonCell:)] pub unsafe fn setSearchButtonCell(&self, searchButtonCell: Option<&NSButtonCell>); - #[method_id(cancelButtonCell)] + #[method_id(@__retain_semantics Other cancelButtonCell)] pub unsafe fn cancelButtonCell(&self) -> Option>; #[method(setCancelButtonCell:)] @@ -68,7 +68,7 @@ extern_methods!( #[method(cancelButtonRectForBounds:)] pub unsafe fn cancelButtonRectForBounds(&self, rect: NSRect) -> NSRect; - #[method_id(searchMenuTemplate)] + #[method_id(@__retain_semantics Other searchMenuTemplate)] pub unsafe fn searchMenuTemplate(&self) -> Option>; #[method(setSearchMenuTemplate:)] @@ -86,13 +86,13 @@ extern_methods!( #[method(setMaximumRecents:)] pub unsafe fn setMaximumRecents(&self, maximumRecents: NSInteger); - #[method_id(recentSearches)] + #[method_id(@__retain_semantics Other recentSearches)] pub unsafe fn recentSearches(&self) -> Id, Shared>; #[method(setRecentSearches:)] pub unsafe fn setRecentSearches(&self, recentSearches: Option<&NSArray>); - #[method_id(recentsAutosaveName)] + #[method_id(@__retain_semantics Other recentsAutosaveName)] pub unsafe fn recentsAutosaveName( &self, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs index d43d5dc87..56c42351d 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs @@ -15,13 +15,13 @@ extern_class!( extern_methods!( unsafe impl NSSearchToolbarItem { - #[method_id(searchField)] + #[method_id(@__retain_semantics Other searchField)] pub unsafe fn searchField(&self) -> Id; #[method(setSearchField:)] pub unsafe fn setSearchField(&self, searchField: &NSSearchField); - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[method(setView:)] diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs index f07044c4a..3152eb182 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs @@ -51,7 +51,7 @@ extern_methods!( #[method(setImage:forSegment:)] pub unsafe fn setImage_forSegment(&self, image: Option<&NSImage>, segment: NSInteger); - #[method_id(imageForSegment:)] + #[method_id(@__retain_semantics Other imageForSegment:)] pub unsafe fn imageForSegment(&self, segment: NSInteger) -> Option>; #[method(setImageScaling:forSegment:)] @@ -67,7 +67,7 @@ extern_methods!( #[method(setLabel:forSegment:)] pub unsafe fn setLabel_forSegment(&self, label: &NSString, segment: NSInteger); - #[method_id(labelForSegment:)] + #[method_id(@__retain_semantics Other labelForSegment:)] pub unsafe fn labelForSegment(&self, segment: NSInteger) -> Option>; #[method(setSelected:forSegment:)] @@ -85,13 +85,13 @@ extern_methods!( #[method(setMenu:forSegment:)] pub unsafe fn setMenu_forSegment(&self, menu: Option<&NSMenu>, segment: NSInteger); - #[method_id(menuForSegment:)] + #[method_id(@__retain_semantics Other menuForSegment:)] pub unsafe fn menuForSegment(&self, segment: NSInteger) -> Option>; #[method(setToolTip:forSegment:)] pub unsafe fn setToolTip_forSegment(&self, toolTip: Option<&NSString>, segment: NSInteger); - #[method_id(toolTipForSegment:)] + #[method_id(@__retain_semantics Other toolTipForSegment:)] pub unsafe fn toolTipForSegment(&self, segment: NSInteger) -> Option>; #[method(setTag:forSegment:)] diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs index 510a4bd98..480b45a09 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs @@ -61,7 +61,7 @@ extern_methods!( #[method(setImage:forSegment:)] pub unsafe fn setImage_forSegment(&self, image: Option<&NSImage>, segment: NSInteger); - #[method_id(imageForSegment:)] + #[method_id(@__retain_semantics Other imageForSegment:)] pub unsafe fn imageForSegment(&self, segment: NSInteger) -> Option>; #[method(setImageScaling:forSegment:)] @@ -77,13 +77,13 @@ extern_methods!( #[method(setLabel:forSegment:)] pub unsafe fn setLabel_forSegment(&self, label: &NSString, segment: NSInteger); - #[method_id(labelForSegment:)] + #[method_id(@__retain_semantics Other labelForSegment:)] pub unsafe fn labelForSegment(&self, segment: NSInteger) -> Option>; #[method(setMenu:forSegment:)] pub unsafe fn setMenu_forSegment(&self, menu: Option<&NSMenu>, segment: NSInteger); - #[method_id(menuForSegment:)] + #[method_id(@__retain_semantics Other menuForSegment:)] pub unsafe fn menuForSegment(&self, segment: NSInteger) -> Option>; #[method(setSelected:forSegment:)] @@ -101,7 +101,7 @@ extern_methods!( #[method(setToolTip:forSegment:)] pub unsafe fn setToolTip_forSegment(&self, toolTip: Option<&NSString>, segment: NSInteger); - #[method_id(toolTipForSegment:)] + #[method_id(@__retain_semantics Other toolTipForSegment:)] pub unsafe fn toolTipForSegment(&self, segment: NSInteger) -> Option>; #[method(setTag:forSegment:)] @@ -141,7 +141,7 @@ extern_methods!( #[method(doubleValueForSelectedSegment)] pub unsafe fn doubleValueForSelectedSegment(&self) -> c_double; - #[method_id(selectedSegmentBezelColor)] + #[method_id(@__retain_semantics Other selectedSegmentBezelColor)] pub unsafe fn selectedSegmentBezelColor(&self) -> Option>; #[method(setSelectedSegmentBezelColor:)] @@ -181,7 +181,7 @@ extern_methods!( prioritizedOptions: &NSArray, ) -> NSSize; - #[method_id(activeCompressionOptions)] + #[method_id(@__retain_semantics Other activeCompressionOptions)] pub unsafe fn activeCompressionOptions( &self, ) -> Id; @@ -191,7 +191,7 @@ extern_methods!( extern_methods!( /// NSSegmentedControlConvenience unsafe impl NSSegmentedControl { - #[method_id(segmentedControlWithLabels:trackingMode:target:action:)] + #[method_id(@__retain_semantics Other segmentedControlWithLabels:trackingMode:target:action:)] pub unsafe fn segmentedControlWithLabels_trackingMode_target_action( labels: &NSArray, trackingMode: NSSegmentSwitchTracking, @@ -199,7 +199,7 @@ extern_methods!( action: Option, ) -> Id; - #[method_id(segmentedControlWithImages:trackingMode:target:action:)] + #[method_id(@__retain_semantics Other segmentedControlWithImages:trackingMode:target:action:)] pub unsafe fn segmentedControlWithImages_trackingMode_target_action( images: &NSArray, trackingMode: NSSegmentSwitchTracking, diff --git a/crates/icrate/src/generated/AppKit/NSShadow.rs b/crates/icrate/src/generated/AppKit/NSShadow.rs index be2d62415..45d7207d7 100644 --- a/crates/icrate/src/generated/AppKit/NSShadow.rs +++ b/crates/icrate/src/generated/AppKit/NSShadow.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSShadow { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[method(shadowOffset)] @@ -30,7 +30,7 @@ extern_methods!( #[method(setShadowBlurRadius:)] pub unsafe fn setShadowBlurRadius(&self, shadowBlurRadius: CGFloat); - #[method_id(shadowColor)] + #[method_id(@__retain_semantics Other shadowColor)] pub unsafe fn shadowColor(&self) -> Option>; #[method(setShadowColor:)] diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index 33802f0d0..633385990 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -97,62 +97,62 @@ extern_class!( extern_methods!( unsafe impl NSSharingService { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSharingServiceDelegate>); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Id; - #[method_id(alternateImage)] + #[method_id(@__retain_semantics Other alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; - #[method_id(menuItemTitle)] + #[method_id(@__retain_semantics Other menuItemTitle)] pub unsafe fn menuItemTitle(&self) -> Id; #[method(setMenuItemTitle:)] pub unsafe fn setMenuItemTitle(&self, menuItemTitle: &NSString); - #[method_id(recipients)] + #[method_id(@__retain_semantics Other recipients)] pub unsafe fn recipients(&self) -> Option, Shared>>; #[method(setRecipients:)] pub unsafe fn setRecipients(&self, recipients: Option<&NSArray>); - #[method_id(subject)] + #[method_id(@__retain_semantics Other subject)] pub unsafe fn subject(&self) -> Option>; #[method(setSubject:)] pub unsafe fn setSubject(&self, subject: Option<&NSString>); - #[method_id(messageBody)] + #[method_id(@__retain_semantics Other messageBody)] pub unsafe fn messageBody(&self) -> Option>; - #[method_id(permanentLink)] + #[method_id(@__retain_semantics Other permanentLink)] pub unsafe fn permanentLink(&self) -> Option>; - #[method_id(accountName)] + #[method_id(@__retain_semantics Other accountName)] pub unsafe fn accountName(&self) -> Option>; - #[method_id(attachmentFileURLs)] + #[method_id(@__retain_semantics Other attachmentFileURLs)] pub unsafe fn attachmentFileURLs(&self) -> Option, Shared>>; - #[method_id(sharingServicesForItems:)] + #[method_id(@__retain_semantics Other sharingServicesForItems:)] pub unsafe fn sharingServicesForItems( items: &NSArray, ) -> Id, Shared>; - #[method_id(sharingServiceNamed:)] + #[method_id(@__retain_semantics Other sharingServiceNamed:)] pub unsafe fn sharingServiceNamed( serviceName: &NSSharingServiceName, ) -> Option>; - #[method_id(initWithTitle:image:alternateImage:handler:)] + #[method_id(@__retain_semantics Init initWithTitle:image:alternateImage:handler:)] pub unsafe fn initWithTitle_image_alternateImage_handler( this: Option>, title: &NSString, @@ -161,7 +161,7 @@ extern_methods!( block: TodoBlock, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[method(canPerformWithItems:)] @@ -217,19 +217,19 @@ extern_class!( extern_methods!( unsafe impl NSSharingServicePicker { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSharingServicePickerDelegate>); - #[method_id(initWithItems:)] + #[method_id(@__retain_semantics Init initWithItems:)] pub unsafe fn initWithItems( this: Option>, items: &NSArray, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[method(showRelativeToRect:ofView:preferredEdge:)] diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs index 905d74b03..c54277c79 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSSharingServicePickerToolbarItem { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs index f04e07f28..cb66be7c3 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSSharingServicePickerTouchBarItem { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate( &self, ) -> Option>; @@ -32,13 +32,13 @@ extern_methods!( #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); - #[method_id(buttonTitle)] + #[method_id(@__retain_semantics Other buttonTitle)] pub unsafe fn buttonTitle(&self) -> Id; #[method(setButtonTitle:)] pub unsafe fn setButtonTitle(&self, buttonTitle: &NSString); - #[method_id(buttonImage)] + #[method_id(@__retain_semantics Other buttonImage)] pub unsafe fn buttonImage(&self) -> Option>; #[method(setButtonImage:)] diff --git a/crates/icrate/src/generated/AppKit/NSSlider.rs b/crates/icrate/src/generated/AppKit/NSSlider.rs index fa907b647..7088bf4a2 100644 --- a/crates/icrate/src/generated/AppKit/NSSlider.rs +++ b/crates/icrate/src/generated/AppKit/NSSlider.rs @@ -51,7 +51,7 @@ extern_methods!( #[method(setVertical:)] pub unsafe fn setVertical(&self, vertical: bool); - #[method_id(trackFillColor)] + #[method_id(@__retain_semantics Other trackFillColor)] pub unsafe fn trackFillColor(&self) -> Option>; #[method(setTrackFillColor:)] @@ -105,13 +105,13 @@ extern_methods!( extern_methods!( /// NSSliderConvenience unsafe impl NSSlider { - #[method_id(sliderWithTarget:action:)] + #[method_id(@__retain_semantics Other sliderWithTarget:action:)] pub unsafe fn sliderWithTarget_action( target: Option<&Object>, action: Option, ) -> Id; - #[method_id(sliderWithValue:minValue:maxValue:target:action:)] + #[method_id(@__retain_semantics Other sliderWithValue:minValue:maxValue:target:action:)] pub unsafe fn sliderWithValue_minValue_maxValue_target_action( value: c_double, minValue: c_double, @@ -128,22 +128,22 @@ extern_methods!( #[method(setTitleCell:)] pub unsafe fn setTitleCell(&self, cell: Option<&NSCell>); - #[method_id(titleCell)] + #[method_id(@__retain_semantics Other titleCell)] pub unsafe fn titleCell(&self) -> Option>; #[method(setTitleColor:)] pub unsafe fn setTitleColor(&self, newColor: Option<&NSColor>); - #[method_id(titleColor)] + #[method_id(@__retain_semantics Other titleColor)] pub unsafe fn titleColor(&self) -> Option>; #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, fontObj: Option<&NSFont>); - #[method_id(titleFont)] + #[method_id(@__retain_semantics Other titleFont)] pub unsafe fn titleFont(&self) -> Option>; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; #[method(setTitle:)] @@ -155,7 +155,7 @@ extern_methods!( #[method(setImage:)] pub unsafe fn setImage(&self, backgroundImage: Option<&NSImage>); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs index 8bf9e55f8..49afc51f6 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs @@ -15,10 +15,10 @@ extern_class!( extern_methods!( unsafe impl NSSliderAccessory { - #[method_id(accessoryWithImage:)] + #[method_id(@__retain_semantics Other accessoryWithImage:)] pub unsafe fn accessoryWithImage(image: &NSImage) -> Id; - #[method_id(behavior)] + #[method_id(@__retain_semantics Other behavior)] pub unsafe fn behavior(&self) -> Id; #[method(setBehavior:)] @@ -47,22 +47,22 @@ extern_class!( extern_methods!( unsafe impl NSSliderAccessoryBehavior { - #[method_id(automaticBehavior)] + #[method_id(@__retain_semantics Other automaticBehavior)] pub unsafe fn automaticBehavior() -> Id; - #[method_id(valueStepBehavior)] + #[method_id(@__retain_semantics Other valueStepBehavior)] pub unsafe fn valueStepBehavior() -> Id; - #[method_id(valueResetBehavior)] + #[method_id(@__retain_semantics Other valueResetBehavior)] pub unsafe fn valueResetBehavior() -> Id; - #[method_id(behaviorWithTarget:action:)] + #[method_id(@__retain_semantics Other behaviorWithTarget:action:)] pub unsafe fn behaviorWithTarget_action( target: Option<&Object>, action: Sel, ) -> Id; - #[method_id(behaviorWithHandler:)] + #[method_id(@__retain_semantics Other behaviorWithHandler:)] pub unsafe fn behaviorWithHandler( handler: TodoBlock, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index 2cc87c320..cc7cca93d 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -133,22 +133,22 @@ extern_methods!( #[method(setTitleCell:)] pub unsafe fn setTitleCell(&self, cell: Option<&NSCell>); - #[method_id(titleCell)] + #[method_id(@__retain_semantics Other titleCell)] pub unsafe fn titleCell(&self) -> Option>; #[method(setTitleColor:)] pub unsafe fn setTitleColor(&self, newColor: Option<&NSColor>); - #[method_id(titleColor)] + #[method_id(@__retain_semantics Other titleColor)] pub unsafe fn titleColor(&self) -> Option>; #[method(setTitleFont:)] pub unsafe fn setTitleFont(&self, fontObj: Option<&NSFont>); - #[method_id(titleFont)] + #[method_id(@__retain_semantics Other titleFont)] pub unsafe fn titleFont(&self) -> Option>; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; #[method(setTitle:)] @@ -160,7 +160,7 @@ extern_methods!( #[method(setImage:)] pub unsafe fn setImage(&self, backgroundImage: Option<&NSImage>); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs index 8ed149b11..a0e5557f7 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs @@ -25,10 +25,10 @@ extern_class!( extern_methods!( unsafe impl NSSliderTouchBarItem { - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Id; - #[method_id(slider)] + #[method_id(@__retain_semantics Other slider)] pub unsafe fn slider(&self) -> Id; #[method(setSlider:)] @@ -52,13 +52,13 @@ extern_methods!( #[method(setMaximumSliderWidth:)] pub unsafe fn setMaximumSliderWidth(&self, maximumSliderWidth: CGFloat); - #[method_id(label)] + #[method_id(@__retain_semantics Other label)] pub unsafe fn label(&self) -> Option>; #[method(setLabel:)] pub unsafe fn setLabel(&self, label: Option<&NSString>); - #[method_id(minimumValueAccessory)] + #[method_id(@__retain_semantics Other minimumValueAccessory)] pub unsafe fn minimumValueAccessory(&self) -> Option>; #[method(setMinimumValueAccessory:)] @@ -67,7 +67,7 @@ extern_methods!( minimumValueAccessory: Option<&NSSliderAccessory>, ); - #[method_id(maximumValueAccessory)] + #[method_id(@__retain_semantics Other maximumValueAccessory)] pub unsafe fn maximumValueAccessory(&self) -> Option>; #[method(setMaximumValueAccessory:)] @@ -82,7 +82,7 @@ extern_methods!( #[method(setValueAccessoryWidth:)] pub unsafe fn setValueAccessoryWidth(&self, valueAccessoryWidth: NSSliderAccessoryWidth); - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] @@ -94,7 +94,7 @@ extern_methods!( #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); - #[method_id(customizationLabel)] + #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[method(setCustomizationLabel:)] diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs index 3b22acc37..32f4a0333 100644 --- a/crates/icrate/src/generated/AppKit/NSSound.rs +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -23,24 +23,24 @@ extern_class!( extern_methods!( unsafe impl NSSound { - #[method_id(soundNamed:)] + #[method_id(@__retain_semantics Other soundNamed:)] pub unsafe fn soundNamed(name: &NSSoundName) -> Option>; - #[method_id(initWithContentsOfURL:byReference:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:byReference:)] pub unsafe fn initWithContentsOfURL_byReference( this: Option>, url: &NSURL, byRef: bool, ) -> Option>; - #[method_id(initWithContentsOfFile:byReference:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:byReference:)] pub unsafe fn initWithContentsOfFile_byReference( this: Option>, path: &NSString, byRef: bool, ) -> Option>; - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, data: &NSData, @@ -49,16 +49,16 @@ extern_methods!( #[method(setName:)] pub unsafe fn setName(&self, string: Option<&NSSoundName>) -> bool; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[method(canInitWithPasteboard:)] pub unsafe fn canInitWithPasteboard(pasteboard: &NSPasteboard) -> bool; - #[method_id(soundUnfilteredTypes)] + #[method_id(@__retain_semantics Other soundUnfilteredTypes)] pub unsafe fn soundUnfilteredTypes() -> Id, Shared>; - #[method_id(initWithPasteboard:)] + #[method_id(@__retain_semantics Init initWithPasteboard:)] pub unsafe fn initWithPasteboard( this: Option>, pasteboard: &NSPasteboard, @@ -82,7 +82,7 @@ extern_methods!( #[method(isPlaying)] pub unsafe fn isPlaying(&self) -> bool; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -109,7 +109,7 @@ extern_methods!( #[method(setLoops:)] pub unsafe fn setLoops(&self, loops: bool); - #[method_id(playbackDeviceIdentifier)] + #[method_id(@__retain_semantics Other playbackDeviceIdentifier)] pub unsafe fn playbackDeviceIdentifier( &self, ) -> Option>; @@ -123,7 +123,7 @@ extern_methods!( #[method(setChannelMapping:)] pub unsafe fn setChannelMapping(&self, channelMapping: Option<&NSArray>); - #[method_id(channelMapping)] + #[method_id(@__retain_semantics Other channelMapping)] pub unsafe fn channelMapping(&self) -> Option>; } ); @@ -131,10 +131,10 @@ extern_methods!( extern_methods!( /// NSDeprecated unsafe impl NSSound { - #[method_id(soundUnfilteredFileTypes)] + #[method_id(@__retain_semantics Other soundUnfilteredFileTypes)] pub unsafe fn soundUnfilteredFileTypes() -> Option>; - #[method_id(soundUnfilteredPasteboardTypes)] + #[method_id(@__retain_semantics Other soundUnfilteredPasteboardTypes)] pub unsafe fn soundUnfilteredPasteboardTypes() -> Option>; } ); @@ -144,7 +144,7 @@ pub type NSSoundDelegate = NSObject; extern_methods!( /// NSBundleSoundExtensions unsafe impl NSBundle { - #[method_id(pathForSoundResource:)] + #[method_id(@__retain_semantics Other pathForSoundResource:)] pub unsafe fn pathForSoundResource( &self, name: &NSSoundName, diff --git a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs index 75a60b8b2..43e822338 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSSpeechRecognizer { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Option>; #[method(startListening)] @@ -24,19 +24,19 @@ extern_methods!( #[method(stopListening)] pub unsafe fn stopListening(&self); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSpeechRecognizerDelegate>); - #[method_id(commands)] + #[method_id(@__retain_semantics Other commands)] pub unsafe fn commands(&self) -> Option, Shared>>; #[method(setCommands:)] pub unsafe fn setCommands(&self, commands: Option<&NSArray>); - #[method_id(displayedCommandsTitle)] + #[method_id(@__retain_semantics Other displayedCommandsTitle)] pub unsafe fn displayedCommandsTitle(&self) -> Option>; #[method(setDisplayedCommandsTitle:)] diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index fd0193f15..8aeaaac7a 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -170,7 +170,7 @@ extern_class!( extern_methods!( unsafe impl NSSpeechSynthesizer { - #[method_id(initWithVoice:)] + #[method_id(@__retain_semantics Init initWithVoice:)] pub unsafe fn initWithVoice( this: Option>, voice: Option<&NSSpeechSynthesizerVoiceName>, @@ -197,13 +197,13 @@ extern_methods!( #[method(continueSpeaking)] pub unsafe fn continueSpeaking(&self); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSSpeechSynthesizerDelegate>); - #[method_id(voice)] + #[method_id(@__retain_semantics Other voice)] pub unsafe fn voice(&self) -> Option>; #[method(setVoice:)] @@ -233,10 +233,10 @@ extern_methods!( speechDictionary: &NSDictionary, ); - #[method_id(phonemesFromText:)] + #[method_id(@__retain_semantics Other phonemesFromText:)] pub unsafe fn phonemesFromText(&self, text: &NSString) -> Id; - #[method_id(objectForProperty:error:)] + #[method_id(@__retain_semantics Other objectForProperty:error:)] pub unsafe fn objectForProperty_error( &self, property: &NSSpeechPropertyKey, @@ -252,13 +252,13 @@ extern_methods!( #[method(isAnyApplicationSpeaking)] pub unsafe fn isAnyApplicationSpeaking() -> bool; - #[method_id(defaultVoice)] + #[method_id(@__retain_semantics Other defaultVoice)] pub unsafe fn defaultVoice() -> Id; - #[method_id(availableVoices)] + #[method_id(@__retain_semantics Other availableVoices)] pub unsafe fn availableVoices() -> Id, Shared>; - #[method_id(attributesForVoice:)] + #[method_id(@__retain_semantics Other attributesForVoice:)] pub unsafe fn attributesForVoice( voice: &NSSpeechSynthesizerVoiceName, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index f68a30b89..496318a09 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -70,7 +70,7 @@ extern_class!( extern_methods!( unsafe impl NSSpellChecker { - #[method_id(sharedSpellChecker)] + #[method_id(@__retain_semantics Other sharedSpellChecker)] pub unsafe fn sharedSpellChecker() -> Id; #[method(sharedSpellCheckerExists)] @@ -115,7 +115,7 @@ extern_methods!( details: Option<&mut Option>, Shared>>>, ) -> NSRange; - #[method_id(checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)] + #[method_id(@__retain_semantics Other checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)] pub unsafe fn checkString_range_types_options_inSpellDocumentWithTag_orthography_wordCount( &self, stringToCheck: &NSString, @@ -149,7 +149,7 @@ extern_methods!( completionHandler: TodoBlock, ) -> NSInteger; - #[method_id(menuForResult:string:options:atLocation:inView:)] + #[method_id(@__retain_semantics Other menuForResult:string:options:atLocation:inView:)] pub unsafe fn menuForResult_string_options_atLocation_inView( &self, result: &NSTextCheckingResult, @@ -159,13 +159,13 @@ extern_methods!( view: &NSView, ) -> Option>; - #[method_id(userQuotesArrayForLanguage:)] + #[method_id(@__retain_semantics Other userQuotesArrayForLanguage:)] pub unsafe fn userQuotesArrayForLanguage( &self, language: &NSString, ) -> Id, Shared>; - #[method_id(userReplacementsDictionary)] + #[method_id(@__retain_semantics Other userReplacementsDictionary)] pub unsafe fn userReplacementsDictionary( &self, ) -> Id, Shared>; @@ -180,19 +180,19 @@ extern_methods!( detail: &NSDictionary, ); - #[method_id(spellingPanel)] + #[method_id(@__retain_semantics Other spellingPanel)] pub unsafe fn spellingPanel(&self) -> Id; - #[method_id(accessoryView)] + #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[method(setAccessoryView:)] pub unsafe fn setAccessoryView(&self, accessoryView: Option<&NSView>); - #[method_id(substitutionsPanel)] + #[method_id(@__retain_semantics Other substitutionsPanel)] pub unsafe fn substitutionsPanel(&self) -> Id; - #[method_id(substitutionsPanelAccessoryViewController)] + #[method_id(@__retain_semantics Other substitutionsPanelAccessoryViewController)] pub unsafe fn substitutionsPanelAccessoryViewController( &self, ) -> Option>; @@ -213,7 +213,7 @@ extern_methods!( tag: NSInteger, ); - #[method_id(ignoredWordsInSpellDocumentWithTag:)] + #[method_id(@__retain_semantics Other ignoredWordsInSpellDocumentWithTag:)] pub unsafe fn ignoredWordsInSpellDocumentWithTag( &self, tag: NSInteger, @@ -226,7 +226,7 @@ extern_methods!( tag: NSInteger, ); - #[method_id(guessesForWordRange:inString:language:inSpellDocumentWithTag:)] + #[method_id(@__retain_semantics Other guessesForWordRange:inString:language:inSpellDocumentWithTag:)] pub unsafe fn guessesForWordRange_inString_language_inSpellDocumentWithTag( &self, range: NSRange, @@ -235,7 +235,7 @@ extern_methods!( tag: NSInteger, ) -> Option, Shared>>; - #[method_id(correctionForWordRange:inString:language:inSpellDocumentWithTag:)] + #[method_id(@__retain_semantics Other correctionForWordRange:inString:language:inSpellDocumentWithTag:)] pub unsafe fn correctionForWordRange_inString_language_inSpellDocumentWithTag( &self, range: NSRange, @@ -244,7 +244,7 @@ extern_methods!( tag: NSInteger, ) -> Option>; - #[method_id(completionsForPartialWordRange:inString:language:inSpellDocumentWithTag:)] + #[method_id(@__retain_semantics Other completionsForPartialWordRange:inString:language:inSpellDocumentWithTag:)] pub unsafe fn completionsForPartialWordRange_inString_language_inSpellDocumentWithTag( &self, range: NSRange, @@ -253,7 +253,7 @@ extern_methods!( tag: NSInteger, ) -> Option, Shared>>; - #[method_id(languageForWordRange:inString:orthography:)] + #[method_id(@__retain_semantics Other languageForWordRange:inString:orthography:)] pub unsafe fn languageForWordRange_inString_orthography( &self, range: NSRange, @@ -303,10 +303,10 @@ extern_methods!( language: Option<&NSString>, ) -> bool; - #[method_id(availableLanguages)] + #[method_id(@__retain_semantics Other availableLanguages)] pub unsafe fn availableLanguages(&self) -> Id, Shared>; - #[method_id(userPreferredLanguages)] + #[method_id(@__retain_semantics Other userPreferredLanguages)] pub unsafe fn userPreferredLanguages(&self) -> Id, Shared>; #[method(automaticallyIdentifiesLanguages)] @@ -351,7 +351,7 @@ extern_methods!( #[method(isAutomaticTextCompletionEnabled)] pub unsafe fn isAutomaticTextCompletionEnabled() -> bool; - #[method_id(language)] + #[method_id(@__retain_semantics Other language)] pub unsafe fn language(&self) -> Id; #[method(setLanguage:)] @@ -397,7 +397,7 @@ extern "C" { extern_methods!( /// NSDeprecated unsafe impl NSSpellChecker { - #[method_id(guessesForWord:)] + #[method_id(@__retain_semantics Other guessesForWord:)] pub unsafe fn guessesForWord(&self, word: Option<&NSString>) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs index 05f87e8a8..289cbb76a 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitView.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -34,13 +34,13 @@ extern_methods!( #[method(setDividerStyle:)] pub unsafe fn setDividerStyle(&self, dividerStyle: NSSplitViewDividerStyle); - #[method_id(autosaveName)] + #[method_id(@__retain_semantics Other autosaveName)] pub unsafe fn autosaveName(&self) -> Option>; #[method(setAutosaveName:)] pub unsafe fn setAutosaveName(&self, autosaveName: Option<&NSSplitViewAutosaveName>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -49,7 +49,7 @@ extern_methods!( #[method(drawDividerInRect:)] pub unsafe fn drawDividerInRect(&self, rect: NSRect); - #[method_id(dividerColor)] + #[method_id(@__retain_semantics Other dividerColor)] pub unsafe fn dividerColor(&self) -> Id; #[method(dividerThickness)] @@ -104,7 +104,7 @@ extern_methods!( #[method(setArrangesAllSubviews:)] pub unsafe fn setArrangesAllSubviews(&self, arrangesAllSubviews: bool); - #[method_id(arrangedSubviews)] + #[method_id(@__retain_semantics Other arrangedSubviews)] pub unsafe fn arrangedSubviews(&self) -> Id, Shared>; #[method(addArrangedSubview:)] diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs index a6611cfa7..476fd7cf0 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs @@ -19,13 +19,13 @@ extern_class!( extern_methods!( unsafe impl NSSplitViewController { - #[method_id(splitView)] + #[method_id(@__retain_semantics Other splitView)] pub unsafe fn splitView(&self) -> Id; #[method(setSplitView:)] pub unsafe fn setSplitView(&self, splitView: &NSSplitView); - #[method_id(splitViewItems)] + #[method_id(@__retain_semantics Other splitViewItems)] pub unsafe fn splitViewItems(&self) -> Id, Shared>; #[method(setSplitViewItems:)] @@ -44,7 +44,7 @@ extern_methods!( #[method(removeSplitViewItem:)] pub unsafe fn removeSplitViewItem(&self, splitViewItem: &NSSplitViewItem); - #[method_id(splitViewItemForViewController:)] + #[method_id(@__retain_semantics Other splitViewItemForViewController:)] pub unsafe fn splitViewItemForViewController( &self, viewController: &NSViewController, diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs index 5e44fcecc..c4dcea79e 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs @@ -32,17 +32,17 @@ extern_class!( extern_methods!( unsafe impl NSSplitViewItem { - #[method_id(splitViewItemWithViewController:)] + #[method_id(@__retain_semantics Other splitViewItemWithViewController:)] pub unsafe fn splitViewItemWithViewController( viewController: &NSViewController, ) -> Id; - #[method_id(sidebarWithViewController:)] + #[method_id(@__retain_semantics Other sidebarWithViewController:)] pub unsafe fn sidebarWithViewController( viewController: &NSViewController, ) -> Id; - #[method_id(contentListWithViewController:)] + #[method_id(@__retain_semantics Other contentListWithViewController:)] pub unsafe fn contentListWithViewController( viewController: &NSViewController, ) -> Id; @@ -50,7 +50,7 @@ extern_methods!( #[method(behavior)] pub unsafe fn behavior(&self) -> NSSplitViewItemBehavior; - #[method_id(viewController)] + #[method_id(@__retain_semantics Other viewController)] pub unsafe fn viewController(&self) -> Id; #[method(setViewController:)] diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index 0cb8b4ae4..da5ca847c 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -38,10 +38,10 @@ extern_class!( extern_methods!( unsafe impl NSStackView { - #[method_id(stackViewWithViews:)] + #[method_id(@__retain_semantics Other stackViewWithViews:)] pub unsafe fn stackViewWithViews(views: &NSArray) -> Id; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -89,7 +89,7 @@ extern_methods!( #[method(setDetachesHiddenViews:)] pub unsafe fn setDetachesHiddenViews(&self, detachesHiddenViews: bool); - #[method_id(arrangedSubviews)] + #[method_id(@__retain_semantics Other arrangedSubviews)] pub unsafe fn arrangedSubviews(&self) -> Id, Shared>; #[method(addArrangedSubview:)] @@ -101,7 +101,7 @@ extern_methods!( #[method(removeArrangedSubview:)] pub unsafe fn removeArrangedSubview(&self, view: &NSView); - #[method_id(detachedViews)] + #[method_id(@__retain_semantics Other detachedViews)] pub unsafe fn detachedViews(&self) -> Id, Shared>; #[method(setVisibilityPriority:forView:)] @@ -164,7 +164,7 @@ extern_methods!( #[method(removeView:)] pub unsafe fn removeView(&self, view: &NSView); - #[method_id(viewsInGravity:)] + #[method_id(@__retain_semantics Other viewsInGravity:)] pub unsafe fn viewsInGravity( &self, gravity: NSStackViewGravity, @@ -177,7 +177,7 @@ extern_methods!( gravity: NSStackViewGravity, ); - #[method_id(views)] + #[method_id(@__retain_semantics Other views)] pub unsafe fn views(&self) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSStatusBar.rs b/crates/icrate/src/generated/AppKit/NSStatusBar.rs index bc0c339b7..f93fc238d 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBar.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBar.rs @@ -19,10 +19,10 @@ extern_class!( extern_methods!( unsafe impl NSStatusBar { - #[method_id(systemStatusBar)] + #[method_id(@__retain_semantics Other systemStatusBar)] pub unsafe fn systemStatusBar() -> Id; - #[method_id(statusItemWithLength:)] + #[method_id(@__retain_semantics Other statusItemWithLength:)] pub unsafe fn statusItemWithLength(&self, length: CGFloat) -> Id; #[method(removeStatusItem:)] diff --git a/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs index 3f2870f9d..f964b59bc 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusItem.rs @@ -21,7 +21,7 @@ extern_class!( extern_methods!( unsafe impl NSStatusItem { - #[method_id(statusBar)] + #[method_id(@__retain_semantics Other statusBar)] pub unsafe fn statusBar(&self) -> Option>; #[method(length)] @@ -30,13 +30,13 @@ extern_methods!( #[method(setLength:)] pub unsafe fn setLength(&self, length: CGFloat); - #[method_id(menu)] + #[method_id(@__retain_semantics Other menu)] pub unsafe fn menu(&self) -> Option>; #[method(setMenu:)] pub unsafe fn setMenu(&self, menu: Option<&NSMenu>); - #[method_id(button)] + #[method_id(@__retain_semantics Other button)] pub unsafe fn button(&self) -> Option>; #[method(behavior)] @@ -51,7 +51,7 @@ extern_methods!( #[method(setVisible:)] pub unsafe fn setVisible(&self, visible: bool); - #[method_id(autosaveName)] + #[method_id(@__retain_semantics Other autosaveName)] pub unsafe fn autosaveName(&self) -> Id; #[method(setAutosaveName:)] @@ -74,31 +74,31 @@ extern_methods!( #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, doubleAction: Option); - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); - #[method_id(attributedTitle)] + #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); - #[method_id(alternateImage)] + #[method_id(@__retain_semantics Other alternateImage)] pub unsafe fn alternateImage(&self) -> Option>; #[method(setAlternateImage:)] @@ -116,7 +116,7 @@ extern_methods!( #[method(setHighlightMode:)] pub unsafe fn setHighlightMode(&self, highlightMode: bool); - #[method_id(toolTip)] + #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Option>; #[method(setToolTip:)] @@ -125,7 +125,7 @@ extern_methods!( #[method(sendActionOn:)] pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[method(setView:)] diff --git a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs index db530019e..fac02f6eb 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs @@ -15,13 +15,13 @@ extern_class!( extern_methods!( unsafe impl NSStepperTouchBarItem { - #[method_id(stepperTouchBarItemWithIdentifier:formatter:)] + #[method_id(@__retain_semantics Other stepperTouchBarItemWithIdentifier:formatter:)] pub unsafe fn stepperTouchBarItemWithIdentifier_formatter( identifier: &NSTouchBarItemIdentifier, formatter: &NSFormatter, ) -> Id; - #[method_id(stepperTouchBarItemWithIdentifier:drawingHandler:)] + #[method_id(@__retain_semantics Other stepperTouchBarItemWithIdentifier:drawingHandler:)] pub unsafe fn stepperTouchBarItemWithIdentifier_drawingHandler( identifier: &NSTouchBarItemIdentifier, drawingHandler: TodoBlock, @@ -51,7 +51,7 @@ extern_methods!( #[method(setValue:)] pub unsafe fn setValue(&self, value: c_double); - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] @@ -63,7 +63,7 @@ extern_methods!( #[method(setAction:)] pub unsafe fn setAction(&self, action: Option); - #[method_id(customizationLabel)] + #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[method(setCustomizationLabel:)] diff --git a/crates/icrate/src/generated/AppKit/NSStoryboard.rs b/crates/icrate/src/generated/AppKit/NSStoryboard.rs index 99b1a8435..bfb384bea 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboard.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboard.rs @@ -19,31 +19,31 @@ extern_class!( extern_methods!( unsafe impl NSStoryboard { - #[method_id(mainStoryboard)] + #[method_id(@__retain_semantics Other mainStoryboard)] pub unsafe fn mainStoryboard() -> Option>; - #[method_id(storyboardWithName:bundle:)] + #[method_id(@__retain_semantics Other storyboardWithName:bundle:)] pub unsafe fn storyboardWithName_bundle( name: &NSStoryboardName, storyboardBundleOrNil: Option<&NSBundle>, ) -> Id; - #[method_id(instantiateInitialController)] + #[method_id(@__retain_semantics Other instantiateInitialController)] pub unsafe fn instantiateInitialController(&self) -> Option>; - #[method_id(instantiateInitialControllerWithCreator:)] + #[method_id(@__retain_semantics Other instantiateInitialControllerWithCreator:)] pub unsafe fn instantiateInitialControllerWithCreator( &self, block: NSStoryboardControllerCreator, ) -> Option>; - #[method_id(instantiateControllerWithIdentifier:)] + #[method_id(@__retain_semantics Other instantiateControllerWithIdentifier:)] pub unsafe fn instantiateControllerWithIdentifier( &self, identifier: &NSStoryboardSceneIdentifier, ) -> Id; - #[method_id(instantiateControllerWithIdentifier:creator:)] + #[method_id(@__retain_semantics Other instantiateControllerWithIdentifier:creator:)] pub unsafe fn instantiateControllerWithIdentifier_creator( &self, identifier: &NSStoryboardSceneIdentifier, diff --git a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs index 7a5c0b74b..7f99248a6 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs @@ -17,7 +17,7 @@ extern_class!( extern_methods!( unsafe impl NSStoryboardSegue { - #[method_id(segueWithIdentifier:source:destination:performHandler:)] + #[method_id(@__retain_semantics Other segueWithIdentifier:source:destination:performHandler:)] pub unsafe fn segueWithIdentifier_source_destination_performHandler( identifier: &NSStoryboardSegueIdentifier, sourceController: &Object, @@ -25,7 +25,7 @@ extern_methods!( performHandler: TodoBlock, ) -> Id; - #[method_id(initWithIdentifier:source:destination:)] + #[method_id(@__retain_semantics Init initWithIdentifier:source:destination:)] pub unsafe fn initWithIdentifier_source_destination( this: Option>, identifier: &NSStoryboardSegueIdentifier, @@ -33,13 +33,13 @@ extern_methods!( destinationController: &Object, ) -> Id; - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Option>; - #[method_id(sourceController)] + #[method_id(@__retain_semantics Other sourceController)] pub unsafe fn sourceController(&self) -> Id; - #[method_id(destinationController)] + #[method_id(@__retain_semantics Other destinationController)] pub unsafe fn destinationController(&self) -> Id; #[method(perform)] diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs index 746824ae0..285368283 100644 --- a/crates/icrate/src/generated/AppKit/NSTabView.rs +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -62,10 +62,10 @@ extern_methods!( #[method(selectPreviousTabViewItem:)] pub unsafe fn selectPreviousTabViewItem(&self, sender: Option<&Object>); - #[method_id(selectedTabViewItem)] + #[method_id(@__retain_semantics Other selectedTabViewItem)] pub unsafe fn selectedTabViewItem(&self) -> Option>; - #[method_id(font)] + #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Id; #[method(setFont:)] @@ -89,7 +89,7 @@ extern_methods!( #[method(setTabViewBorderType:)] pub unsafe fn setTabViewBorderType(&self, tabViewBorderType: NSTabViewBorderType); - #[method_id(tabViewItems)] + #[method_id(@__retain_semantics Other tabViewItems)] pub unsafe fn tabViewItems(&self) -> Id, Shared>; #[method(setTabViewItems:)] @@ -129,13 +129,13 @@ extern_methods!( #[method(removeTabViewItem:)] pub unsafe fn removeTabViewItem(&self, tabViewItem: &NSTabViewItem); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTabViewDelegate>); - #[method_id(tabViewItemAtPoint:)] + #[method_id(@__retain_semantics Other tabViewItemAtPoint:)] pub unsafe fn tabViewItemAtPoint( &self, point: NSPoint, @@ -150,7 +150,7 @@ extern_methods!( #[method(indexOfTabViewItem:)] pub unsafe fn indexOfTabViewItem(&self, tabViewItem: &NSTabViewItem) -> NSInteger; - #[method_id(tabViewItemAtIndex:)] + #[method_id(@__retain_semantics Other tabViewItemAtIndex:)] pub unsafe fn tabViewItemAtIndex(&self, index: NSInteger) -> Id; #[method(indexOfTabViewItemWithIdentifier:)] diff --git a/crates/icrate/src/generated/AppKit/NSTabViewController.rs b/crates/icrate/src/generated/AppKit/NSTabViewController.rs index 8df0234bb..3fb1b9d4c 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewController.rs @@ -27,7 +27,7 @@ extern_methods!( #[method(setTabStyle:)] pub unsafe fn setTabStyle(&self, tabStyle: NSTabViewControllerTabStyle); - #[method_id(tabView)] + #[method_id(@__retain_semantics Other tabView)] pub unsafe fn tabView(&self) -> Id; #[method(setTabView:)] @@ -51,7 +51,7 @@ extern_methods!( canPropagateSelectedChildViewControllerTitle: bool, ); - #[method_id(tabViewItems)] + #[method_id(@__retain_semantics Other tabViewItems)] pub unsafe fn tabViewItems(&self) -> Id, Shared>; #[method(setTabViewItems:)] @@ -76,7 +76,7 @@ extern_methods!( #[method(removeTabViewItem:)] pub unsafe fn removeTabViewItem(&self, tabViewItem: &NSTabViewItem); - #[method_id(tabViewItemForViewController:)] + #[method_id(@__retain_semantics Other tabViewItemForViewController:)] pub unsafe fn tabViewItemForViewController( &self, viewController: &NSViewController, @@ -106,7 +106,7 @@ extern_methods!( tabViewItem: Option<&NSTabViewItem>, ) -> bool; - #[method_id(toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:)] + #[method_id(@__retain_semantics Other toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:)] pub unsafe fn toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar( &self, toolbar: &NSToolbar, @@ -114,19 +114,19 @@ extern_methods!( flag: bool, ) -> Option>; - #[method_id(toolbarDefaultItemIdentifiers:)] + #[method_id(@__retain_semantics Other toolbarDefaultItemIdentifiers:)] pub unsafe fn toolbarDefaultItemIdentifiers( &self, toolbar: &NSToolbar, ) -> Id, Shared>; - #[method_id(toolbarAllowedItemIdentifiers:)] + #[method_id(@__retain_semantics Other toolbarAllowedItemIdentifiers:)] pub unsafe fn toolbarAllowedItemIdentifiers( &self, toolbar: &NSToolbar, ) -> Id, Shared>; - #[method_id(toolbarSelectableItemIdentifiers:)] + #[method_id(@__retain_semantics Other toolbarSelectableItemIdentifiers:)] pub unsafe fn toolbarSelectableItemIdentifiers( &self, toolbar: &NSToolbar, diff --git a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs index 2b8fa6f9e..5e466a984 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs @@ -20,48 +20,48 @@ extern_class!( extern_methods!( unsafe impl NSTabViewItem { - #[method_id(tabViewItemWithViewController:)] + #[method_id(@__retain_semantics Other tabViewItemWithViewController:)] pub unsafe fn tabViewItemWithViewController( viewController: &NSViewController, ) -> Id; - #[method_id(initWithIdentifier:)] + #[method_id(@__retain_semantics Init initWithIdentifier:)] pub unsafe fn initWithIdentifier( this: Option>, identifier: Option<&Object>, ) -> Id; - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Option>; #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: Option<&Object>); - #[method_id(color)] + #[method_id(@__retain_semantics Other color)] pub unsafe fn color(&self) -> Id; #[method(setColor:)] pub unsafe fn setColor(&self, color: &NSColor); - #[method_id(label)] + #[method_id(@__retain_semantics Other label)] pub unsafe fn label(&self) -> Id; #[method(setLabel:)] pub unsafe fn setLabel(&self, label: &NSString); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[method(setView:)] pub unsafe fn setView(&self, view: Option<&NSView>); - #[method_id(viewController)] + #[method_id(@__retain_semantics Other viewController)] pub unsafe fn viewController(&self) -> Option>; #[method(setViewController:)] @@ -70,16 +70,16 @@ extern_methods!( #[method(tabState)] pub unsafe fn tabState(&self) -> NSTabState; - #[method_id(tabView)] + #[method_id(@__retain_semantics Other tabView)] pub unsafe fn tabView(&self) -> Option>; - #[method_id(initialFirstResponder)] + #[method_id(@__retain_semantics Other initialFirstResponder)] pub unsafe fn initialFirstResponder(&self) -> Option>; #[method(setInitialFirstResponder:)] pub unsafe fn setInitialFirstResponder(&self, initialFirstResponder: Option<&NSView>); - #[method_id(toolTip)] + #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Option>; #[method(setToolTip:)] diff --git a/crates/icrate/src/generated/AppKit/NSTableCellView.rs b/crates/icrate/src/generated/AppKit/NSTableCellView.rs index 2413944da..4f19556e2 100644 --- a/crates/icrate/src/generated/AppKit/NSTableCellView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableCellView.rs @@ -15,19 +15,19 @@ extern_class!( extern_methods!( unsafe impl NSTableCellView { - #[method_id(objectValue)] + #[method_id(@__retain_semantics Other objectValue)] pub unsafe fn objectValue(&self) -> Option>; #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); - #[method_id(textField)] + #[method_id(@__retain_semantics Other textField)] pub unsafe fn textField(&self) -> Option>; #[method(setTextField:)] pub unsafe fn setTextField(&self, textField: Option<&NSTextField>); - #[method_id(imageView)] + #[method_id(@__retain_semantics Other imageView)] pub unsafe fn imageView(&self) -> Option>; #[method(setImageView:)] @@ -45,7 +45,7 @@ extern_methods!( #[method(setRowSizeStyle:)] pub unsafe fn setRowSizeStyle(&self, rowSizeStyle: NSTableViewRowSizeStyle); - #[method_id(draggingImageComponents)] + #[method_id(@__retain_semantics Other draggingImageComponents)] pub unsafe fn draggingImageComponents( &self, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs index c7d31f9f0..239df6612 100644 --- a/crates/icrate/src/generated/AppKit/NSTableColumn.rs +++ b/crates/icrate/src/generated/AppKit/NSTableColumn.rs @@ -20,25 +20,25 @@ extern_class!( extern_methods!( unsafe impl NSTableColumn { - #[method_id(initWithIdentifier:)] + #[method_id(@__retain_semantics Init initWithIdentifier:)] pub unsafe fn initWithIdentifier( this: Option>, identifier: &NSUserInterfaceItemIdentifier, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Id; #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: &NSUserInterfaceItemIdentifier); - #[method_id(tableView)] + #[method_id(@__retain_semantics Other tableView)] pub unsafe fn tableView(&self) -> Option>; #[method(setTableView:)] @@ -62,13 +62,13 @@ extern_methods!( #[method(setMaxWidth:)] pub unsafe fn setMaxWidth(&self, maxWidth: CGFloat); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); - #[method_id(headerCell)] + #[method_id(@__retain_semantics Other headerCell)] pub unsafe fn headerCell(&self) -> Id; #[method(setHeaderCell:)] @@ -83,7 +83,7 @@ extern_methods!( #[method(sizeToFit)] pub unsafe fn sizeToFit(&self); - #[method_id(sortDescriptorPrototype)] + #[method_id(@__retain_semantics Other sortDescriptorPrototype)] pub unsafe fn sortDescriptorPrototype(&self) -> Option>; #[method(setSortDescriptorPrototype:)] @@ -98,7 +98,7 @@ extern_methods!( #[method(setResizingMask:)] pub unsafe fn setResizingMask(&self, resizingMask: NSTableColumnResizingOptions); - #[method_id(headerToolTip)] + #[method_id(@__retain_semantics Other headerToolTip)] pub unsafe fn headerToolTip(&self) -> Option>; #[method(setHeaderToolTip:)] @@ -121,13 +121,13 @@ extern_methods!( #[method(isResizable)] pub unsafe fn isResizable(&self) -> bool; - #[method_id(dataCell)] + #[method_id(@__retain_semantics Other dataCell)] pub unsafe fn dataCell(&self) -> Id; #[method(setDataCell:)] pub unsafe fn setDataCell(&self, dataCell: &Object); - #[method_id(dataCellForRow:)] + #[method_id(@__retain_semantics Other dataCellForRow:)] pub unsafe fn dataCellForRow(&self, row: NSInteger) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs index aa75825ed..f10fcfeac 100644 --- a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSTableHeaderView { - #[method_id(tableView)] + #[method_id(@__retain_semantics Other tableView)] pub unsafe fn tableView(&self) -> Option>; #[method(setTableView:)] diff --git a/crates/icrate/src/generated/AppKit/NSTableRowView.rs b/crates/icrate/src/generated/AppKit/NSTableRowView.rs index 454e19e29..a1bf4de35 100644 --- a/crates/icrate/src/generated/AppKit/NSTableRowView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableRowView.rs @@ -86,7 +86,7 @@ extern_methods!( #[method(interiorBackgroundStyle)] pub unsafe fn interiorBackgroundStyle(&self) -> NSBackgroundStyle; - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] @@ -104,7 +104,7 @@ extern_methods!( #[method(drawDraggingDestinationFeedbackInRect:)] pub unsafe fn drawDraggingDestinationFeedbackInRect(&self, dirtyRect: NSRect); - #[method_id(viewAtColumn:)] + #[method_id(@__retain_semantics Other viewAtColumn:)] pub unsafe fn viewAtColumn(&self, column: NSInteger) -> Option>; #[method(numberOfColumns)] diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index f888dac96..5a17b9645 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -78,37 +78,37 @@ extern_class!( extern_methods!( unsafe impl NSTableView { - #[method_id(initWithFrame:)] + #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame( this: Option>, frameRect: NSRect, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(dataSource)] + #[method_id(@__retain_semantics Other dataSource)] pub unsafe fn dataSource(&self) -> Option>; #[method(setDataSource:)] pub unsafe fn setDataSource(&self, dataSource: Option<&NSTableViewDataSource>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTableViewDelegate>); - #[method_id(headerView)] + #[method_id(@__retain_semantics Other headerView)] pub unsafe fn headerView(&self) -> Option>; #[method(setHeaderView:)] pub unsafe fn setHeaderView(&self, headerView: Option<&NSTableHeaderView>); - #[method_id(cornerView)] + #[method_id(@__retain_semantics Other cornerView)] pub unsafe fn cornerView(&self) -> Option>; #[method(setCornerView:)] @@ -156,13 +156,13 @@ extern_methods!( usesAlternatingRowBackgroundColors: bool, ); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: &NSColor); - #[method_id(gridColor)] + #[method_id(@__retain_semantics Other gridColor)] pub unsafe fn gridColor(&self) -> Id; #[method(setGridColor:)] @@ -186,7 +186,7 @@ extern_methods!( #[method(noteHeightOfRowsWithIndexesChanged:)] pub unsafe fn noteHeightOfRowsWithIndexesChanged(&self, indexSet: &NSIndexSet); - #[method_id(tableColumns)] + #[method_id(@__retain_semantics Other tableColumns)] pub unsafe fn tableColumns(&self) -> Id, Shared>; #[method(numberOfColumns)] @@ -210,7 +210,7 @@ extern_methods!( identifier: &NSUserInterfaceItemIdentifier, ) -> NSInteger; - #[method_id(tableColumnWithIdentifier:)] + #[method_id(@__retain_semantics Other tableColumnWithIdentifier:)] pub unsafe fn tableColumnWithIdentifier( &self, identifier: &NSUserInterfaceItemIdentifier, @@ -262,7 +262,7 @@ extern_methods!( #[method(setDoubleAction:)] pub unsafe fn setDoubleAction(&self, doubleAction: Option); - #[method_id(sortDescriptors)] + #[method_id(@__retain_semantics Other sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id, Shared>; #[method(setSortDescriptors:)] @@ -275,13 +275,13 @@ extern_methods!( tableColumn: &NSTableColumn, ); - #[method_id(indicatorImageInTableColumn:)] + #[method_id(@__retain_semantics Other indicatorImageInTableColumn:)] pub unsafe fn indicatorImageInTableColumn( &self, tableColumn: &NSTableColumn, ) -> Option>; - #[method_id(highlightedTableColumn)] + #[method_id(@__retain_semantics Other highlightedTableColumn)] pub unsafe fn highlightedTableColumn(&self) -> Option>; #[method(setHighlightedTableColumn:)] @@ -303,7 +303,7 @@ extern_methods!( mouseDownPoint: NSPoint, ) -> bool; - #[method_id(dragImageForRowsWithIndexes:tableColumns:event:offset:)] + #[method_id(@__retain_semantics Other dragImageForRowsWithIndexes:tableColumns:event:offset:)] pub unsafe fn dragImageForRowsWithIndexes_tableColumns_event_offset( &self, dragRows: &NSIndexSet, @@ -364,10 +364,10 @@ extern_methods!( extend: bool, ); - #[method_id(selectedColumnIndexes)] + #[method_id(@__retain_semantics Other selectedColumnIndexes)] pub unsafe fn selectedColumnIndexes(&self) -> Id; - #[method_id(selectedRowIndexes)] + #[method_id(@__retain_semantics Other selectedRowIndexes)] pub unsafe fn selectedRowIndexes(&self) -> Id; #[method(deselectColumn:)] @@ -435,7 +435,7 @@ extern_methods!( #[method(rectOfRow:)] pub unsafe fn rectOfRow(&self, row: NSInteger) -> NSRect; - #[method_id(columnIndexesInRect:)] + #[method_id(@__retain_semantics Other columnIndexesInRect:)] pub unsafe fn columnIndexesInRect(&self, rect: NSRect) -> Id; #[method(rowsInRect:)] @@ -450,7 +450,7 @@ extern_methods!( #[method(frameOfCellAtColumn:row:)] pub unsafe fn frameOfCellAtColumn_row(&self, column: NSInteger, row: NSInteger) -> NSRect; - #[method_id(autosaveName)] + #[method_id(@__retain_semantics Other autosaveName)] pub unsafe fn autosaveName(&self) -> Option>; #[method(setAutosaveName:)] @@ -483,7 +483,7 @@ extern_methods!( #[method(drawBackgroundInClipRect:)] pub unsafe fn drawBackgroundInClipRect(&self, clipRect: NSRect); - #[method_id(viewAtColumn:row:makeIfNecessary:)] + #[method_id(@__retain_semantics Other viewAtColumn:row:makeIfNecessary:)] pub unsafe fn viewAtColumn_row_makeIfNecessary( &self, column: NSInteger, @@ -491,7 +491,7 @@ extern_methods!( makeIfNecessary: bool, ) -> Option>; - #[method_id(rowViewAtRow:makeIfNecessary:)] + #[method_id(@__retain_semantics Other rowViewAtRow:makeIfNecessary:)] pub unsafe fn rowViewAtRow_makeIfNecessary( &self, row: NSInteger, @@ -504,7 +504,7 @@ extern_methods!( #[method(columnForView:)] pub unsafe fn columnForView(&self, view: &NSView) -> NSInteger; - #[method_id(makeViewWithIdentifier:owner:)] + #[method_id(@__retain_semantics Other makeViewWithIdentifier:owner:)] pub unsafe fn makeViewWithIdentifier_owner( &self, identifier: &NSUserInterfaceItemIdentifier, @@ -563,7 +563,7 @@ extern_methods!( rowAnimation: NSTableViewAnimationOptions, ); - #[method_id(hiddenRowIndexes)] + #[method_id(@__retain_semantics Other hiddenRowIndexes)] pub unsafe fn hiddenRowIndexes(&self) -> Id; #[method(registerNib:forIdentifier:)] @@ -573,7 +573,7 @@ extern_methods!( identifier: &NSUserInterfaceItemIdentifier, ); - #[method_id(registeredNibsByIdentifier)] + #[method_id(@__retain_semantics Other registeredNibsByIdentifier)] pub unsafe fn registeredNibsByIdentifier( &self, ) -> Option, Shared>>; @@ -659,13 +659,13 @@ extern_methods!( #[method(selectRow:byExtendingSelection:)] pub unsafe fn selectRow_byExtendingSelection(&self, row: NSInteger, extend: bool); - #[method_id(selectedColumnEnumerator)] + #[method_id(@__retain_semantics Other selectedColumnEnumerator)] pub unsafe fn selectedColumnEnumerator(&self) -> Id; - #[method_id(selectedRowEnumerator)] + #[method_id(@__retain_semantics Other selectedRowEnumerator)] pub unsafe fn selectedRowEnumerator(&self) -> Id; - #[method_id(dragImageForRows:event:dragImageOffset:)] + #[method_id(@__retain_semantics Other dragImageForRows:event:dragImageOffset:)] pub unsafe fn dragImageForRows_event_dragImageOffset( &self, dragRows: &NSArray, @@ -682,7 +682,7 @@ extern_methods!( #[method(columnsInRect:)] pub unsafe fn columnsInRect(&self, rect: NSRect) -> NSRange; - #[method_id(preparedCellAtColumn:row:)] + #[method_id(@__retain_semantics Other preparedCellAtColumn:row:)] pub unsafe fn preparedCellAtColumn_row( &self, column: NSInteger, diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs index 03347227b..662170cfb 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -25,20 +25,20 @@ extern_methods!( unsafe impl NSTableViewDiffableDataSource { - #[method_id(initWithTableView:cellProvider:)] + #[method_id(@__retain_semantics Init initWithTableView:cellProvider:)] pub unsafe fn initWithTableView_cellProvider( this: Option>, tableView: &NSTableView, cellProvider: NSTableViewDiffableDataSourceCellProvider, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(snapshot)] + #[method_id(@__retain_semantics Other snapshot)] pub unsafe fn snapshot( &self, ) -> Id, Shared>; @@ -58,7 +58,7 @@ extern_methods!( completion: TodoBlock, ); - #[method_id(itemIdentifierForRow:)] + #[method_id(@__retain_semantics Other itemIdentifierForRow:)] pub unsafe fn itemIdentifierForRow( &self, row: NSInteger, @@ -67,7 +67,7 @@ extern_methods!( #[method(rowForItemIdentifier:)] pub unsafe fn rowForItemIdentifier(&self, identifier: &ItemIdentifierType) -> NSInteger; - #[method_id(sectionIdentifierForRow:)] + #[method_id(@__retain_semantics Other sectionIdentifierForRow:)] pub unsafe fn sectionIdentifierForRow( &self, row: NSInteger, diff --git a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs index 6a14eaf7a..bbacbc933 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs @@ -19,7 +19,7 @@ extern_class!( extern_methods!( unsafe impl NSTableViewRowAction { - #[method_id(rowActionWithStyle:title:handler:)] + #[method_id(@__retain_semantics Other rowActionWithStyle:title:handler:)] pub unsafe fn rowActionWithStyle_title_handler( style: NSTableViewRowActionStyle, title: &NSString, @@ -29,19 +29,19 @@ extern_methods!( #[method(style)] pub unsafe fn style(&self) -> NSTableViewRowActionStyle; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] pub unsafe fn setBackgroundColor(&self, backgroundColor: Option<&NSColor>); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index 43f9ce4bc..a5ac2846a 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -27,19 +27,19 @@ extern_class!( extern_methods!( unsafe impl NSText { - #[method_id(initWithFrame:)] + #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame( this: Option>, frameRect: NSRect, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(string)] + #[method_id(@__retain_semantics Other string)] pub unsafe fn string(&self) -> Id; #[method(setString:)] @@ -54,10 +54,10 @@ extern_methods!( #[method(replaceCharactersInRange:withRTFD:)] pub unsafe fn replaceCharactersInRange_withRTFD(&self, range: NSRange, rtfdData: &NSData); - #[method_id(RTFFromRange:)] + #[method_id(@__retain_semantics Other RTFFromRange:)] pub unsafe fn RTFFromRange(&self, range: NSRange) -> Option>; - #[method_id(RTFDFromRange:)] + #[method_id(@__retain_semantics Other RTFDFromRange:)] pub unsafe fn RTFDFromRange(&self, range: NSRange) -> Option>; #[method(writeRTFDToFile:atomically:)] @@ -66,7 +66,7 @@ extern_methods!( #[method(readRTFDFromFile:)] pub unsafe fn readRTFDFromFile(&self, path: &NSString) -> bool; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -114,7 +114,7 @@ extern_methods!( #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[method(setBackgroundColor:)] @@ -132,13 +132,13 @@ extern_methods!( #[method(scrollRangeToVisible:)] pub unsafe fn scrollRangeToVisible(&self, range: NSRange); - #[method_id(font)] + #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Option>; #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); - #[method_id(textColor)] + #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor(&self) -> Option>; #[method(setTextColor:)] diff --git a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs index 6aeca5fb1..f073fd4a3 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs @@ -15,17 +15,17 @@ extern_class!( extern_methods!( unsafe impl NSTextAlternatives { - #[method_id(initWithPrimaryString:alternativeStrings:)] + #[method_id(@__retain_semantics Init initWithPrimaryString:alternativeStrings:)] pub unsafe fn initWithPrimaryString_alternativeStrings( this: Option>, primaryString: &NSString, alternativeStrings: &NSArray, ) -> Id; - #[method_id(primaryString)] + #[method_id(@__retain_semantics Other primaryString)] pub unsafe fn primaryString(&self) -> Id; - #[method_id(alternativeStrings)] + #[method_id(@__retain_semantics Other alternativeStrings)] pub unsafe fn alternativeStrings(&self) -> Id, Shared>; #[method(noteSelectedAlternativeString:)] diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index a810237d0..dd88f20a2 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -21,32 +21,32 @@ extern_class!( extern_methods!( unsafe impl NSTextAttachment { - #[method_id(initWithData:ofType:)] + #[method_id(@__retain_semantics Init initWithData:ofType:)] pub unsafe fn initWithData_ofType( this: Option>, contentData: Option<&NSData>, uti: Option<&NSString>, ) -> Id; - #[method_id(initWithFileWrapper:)] + #[method_id(@__retain_semantics Init initWithFileWrapper:)] pub unsafe fn initWithFileWrapper( this: Option>, fileWrapper: Option<&NSFileWrapper>, ) -> Id; - #[method_id(contents)] + #[method_id(@__retain_semantics Other contents)] pub unsafe fn contents(&self) -> Option>; #[method(setContents:)] pub unsafe fn setContents(&self, contents: Option<&NSData>); - #[method_id(fileType)] + #[method_id(@__retain_semantics Other fileType)] pub unsafe fn fileType(&self) -> Option>; #[method(setFileType:)] pub unsafe fn setFileType(&self, fileType: Option<&NSString>); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] @@ -58,13 +58,13 @@ extern_methods!( #[method(setBounds:)] pub unsafe fn setBounds(&self, bounds: CGRect); - #[method_id(fileWrapper)] + #[method_id(@__retain_semantics Other fileWrapper)] pub unsafe fn fileWrapper(&self) -> Option>; #[method(setFileWrapper:)] pub unsafe fn setFileWrapper(&self, fileWrapper: Option<&NSFileWrapper>); - #[method_id(attachmentCell)] + #[method_id(@__retain_semantics Other attachmentCell)] pub unsafe fn attachmentCell(&self) -> Option>; #[method(setAttachmentCell:)] @@ -101,7 +101,7 @@ extern_methods!( extern_methods!( /// NSAttributedStringAttachmentConveniences unsafe impl NSAttributedString { - #[method_id(attributedStringWithAttachment:)] + #[method_id(@__retain_semantics Other attributedStringWithAttachment:)] pub unsafe fn attributedStringWithAttachment( attachment: &NSTextAttachment, ) -> Id; @@ -119,7 +119,7 @@ extern_class!( extern_methods!( unsafe impl NSTextAttachmentViewProvider { - #[method_id(initWithTextAttachment:parentView:textLayoutManager:location:)] + #[method_id(@__retain_semantics Init initWithTextAttachment:parentView:textLayoutManager:location:)] pub unsafe fn initWithTextAttachment_parentView_textLayoutManager_location( this: Option>, textAttachment: &NSTextAttachment, @@ -128,22 +128,22 @@ extern_methods!( location: &NSTextLocation, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(textAttachment)] + #[method_id(@__retain_semantics Other textAttachment)] pub unsafe fn textAttachment(&self) -> Option>; - #[method_id(textLayoutManager)] + #[method_id(@__retain_semantics Other textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; - #[method_id(location)] + #[method_id(@__retain_semantics Other location)] pub unsafe fn location(&self) -> Id; - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[method(setView:)] diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs index 57ca15da9..cca325582 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs @@ -15,16 +15,16 @@ extern_class!( extern_methods!( unsafe impl NSTextCheckingController { - #[method_id(initWithClient:)] + #[method_id(@__retain_semantics Init initWithClient:)] pub unsafe fn initWithClient( this: Option>, client: &NSTextCheckingClient, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(client)] + #[method_id(@__retain_semantics Other client)] pub unsafe fn client(&self) -> Id; #[method(invalidate)] @@ -74,10 +74,10 @@ extern_methods!( #[method(updateCandidates)] pub unsafe fn updateCandidates(&self); - #[method_id(validAnnotations)] + #[method_id(@__retain_semantics Other validAnnotations)] pub unsafe fn validAnnotations(&self) -> Id, Shared>; - #[method_id(menuAtIndex:clickedOnSelection:effectiveRange:)] + #[method_id(@__retain_semantics Other menuAtIndex:clickedOnSelection:effectiveRange:)] pub unsafe fn menuAtIndex_clickedOnSelection_effectiveRange( &self, location: NSUInteger, diff --git a/crates/icrate/src/generated/AppKit/NSTextContainer.rs b/crates/icrate/src/generated/AppKit/NSTextContainer.rs index ec06d2c61..19ff9f1ee 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContainer.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContainer.rs @@ -15,17 +15,17 @@ extern_class!( extern_methods!( unsafe impl NSTextContainer { - #[method_id(initWithSize:)] + #[method_id(@__retain_semantics Init initWithSize:)] pub unsafe fn initWithSize(this: Option>, size: NSSize) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(layoutManager)] + #[method_id(@__retain_semantics Other layoutManager)] pub unsafe fn layoutManager(&self) -> Option>; #[method(setLayoutManager:)] @@ -34,7 +34,7 @@ extern_methods!( #[method(replaceLayoutManager:)] pub unsafe fn replaceLayoutManager(&self, newLayoutManager: &NSLayoutManager); - #[method_id(textLayoutManager)] + #[method_id(@__retain_semantics Other textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; #[method(size)] @@ -43,7 +43,7 @@ extern_methods!( #[method(setSize:)] pub unsafe fn setSize(&self, size: NSSize); - #[method_id(exclusionPaths)] + #[method_id(@__retain_semantics Other exclusionPaths)] pub unsafe fn exclusionPaths(&self) -> Id, Shared>; #[method(setExclusionPaths:)] @@ -91,7 +91,7 @@ extern_methods!( #[method(setHeightTracksTextView:)] pub unsafe fn setHeightTracksTextView(&self, heightTracksTextView: bool); - #[method_id(textView)] + #[method_id(@__retain_semantics Other textView)] pub unsafe fn textView(&self) -> Option>; #[method(setTextView:)] @@ -115,7 +115,7 @@ pub const NSLineMovesUp: NSLineMovementDirection = 4; extern_methods!( /// NSTextContainerDeprecated unsafe impl NSTextContainer { - #[method_id(initWithContainerSize:)] + #[method_id(@__retain_semantics Init initWithContainerSize:)] pub unsafe fn initWithContainerSize( this: Option>, aContainerSize: NSSize, diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index 385fd6183..36f02c716 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -22,22 +22,22 @@ extern_class!( extern_methods!( unsafe impl NSTextContentManager { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextContentManagerDelegate>); - #[method_id(textLayoutManagers)] + #[method_id(@__retain_semantics Other textLayoutManagers)] pub unsafe fn textLayoutManagers(&self) -> Id, Shared>; #[method(addTextLayoutManager:)] @@ -46,7 +46,7 @@ extern_methods!( #[method(removeTextLayoutManager:)] pub unsafe fn removeTextLayoutManager(&self, textLayoutManager: &NSTextLayoutManager); - #[method_id(primaryTextLayoutManager)] + #[method_id(@__retain_semantics Other primaryTextLayoutManager)] pub unsafe fn primaryTextLayoutManager(&self) -> Option>; #[method(setPrimaryTextLayoutManager:)] @@ -58,7 +58,7 @@ extern_methods!( #[method(synchronizeTextLayoutManagers:)] pub unsafe fn synchronizeTextLayoutManagers(&self, completionHandler: TodoBlock); - #[method_id(textElementsForRange:)] + #[method_id(@__retain_semantics Other textElementsForRange:)] pub unsafe fn textElementsForRange( &self, range: &NSTextRange, @@ -112,31 +112,31 @@ extern_class!( extern_methods!( unsafe impl NSTextContentStorage { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextContentStorageDelegate>); - #[method_id(attributedString)] + #[method_id(@__retain_semantics Other attributedString)] pub unsafe fn attributedString(&self) -> Option>; #[method(setAttributedString:)] pub unsafe fn setAttributedString(&self, attributedString: Option<&NSAttributedString>); - #[method_id(attributedStringForTextElement:)] + #[method_id(@__retain_semantics Other attributedStringForTextElement:)] pub unsafe fn attributedStringForTextElement( &self, textElement: &NSTextElement, ) -> Option>; - #[method_id(textElementForAttributedString:)] + #[method_id(@__retain_semantics Other textElementForAttributedString:)] pub unsafe fn textElementForAttributedString( &self, attributedString: &NSAttributedString, ) -> Option>; - #[method_id(locationFromLocation:withOffset:)] + #[method_id(@__retain_semantics Other locationFromLocation:withOffset:)] pub unsafe fn locationFromLocation_withOffset( &self, location: &NSTextLocation, @@ -150,7 +150,7 @@ extern_methods!( to: &NSTextLocation, ) -> NSInteger; - #[method_id(adjustedRangeFromRange:forEditingTextSelection:)] + #[method_id(@__retain_semantics Other adjustedRangeFromRange:forEditingTextSelection:)] pub unsafe fn adjustedRangeFromRange_forEditingTextSelection( &self, textRange: &NSTextRange, diff --git a/crates/icrate/src/generated/AppKit/NSTextElement.rs b/crates/icrate/src/generated/AppKit/NSTextElement.rs index 9ccbb2f77..44c759933 100644 --- a/crates/icrate/src/generated/AppKit/NSTextElement.rs +++ b/crates/icrate/src/generated/AppKit/NSTextElement.rs @@ -15,13 +15,13 @@ extern_class!( extern_methods!( unsafe impl NSTextElement { - #[method_id(initWithTextContentManager:)] + #[method_id(@__retain_semantics Init initWithTextContentManager:)] pub unsafe fn initWithTextContentManager( this: Option>, textContentManager: Option<&NSTextContentManager>, ) -> Id; - #[method_id(textContentManager)] + #[method_id(@__retain_semantics Other textContentManager)] pub unsafe fn textContentManager(&self) -> Option>; #[method(setTextContentManager:)] @@ -30,7 +30,7 @@ extern_methods!( textContentManager: Option<&NSTextContentManager>, ); - #[method_id(elementRange)] + #[method_id(@__retain_semantics Other elementRange)] pub unsafe fn elementRange(&self) -> Option>; #[method(setElementRange:)] @@ -49,19 +49,19 @@ extern_class!( extern_methods!( unsafe impl NSTextParagraph { - #[method_id(initWithAttributedString:)] + #[method_id(@__retain_semantics Init initWithAttributedString:)] pub unsafe fn initWithAttributedString( this: Option>, attributedString: Option<&NSAttributedString>, ) -> Id; - #[method_id(attributedString)] + #[method_id(@__retain_semantics Other attributedString)] pub unsafe fn attributedString(&self) -> Id; - #[method_id(paragraphContentRange)] + #[method_id(@__retain_semantics Other paragraphContentRange)] pub unsafe fn paragraphContentRange(&self) -> Option>; - #[method_id(paragraphSeparatorRange)] + #[method_id(@__retain_semantics Other paragraphSeparatorRange)] pub unsafe fn paragraphSeparatorRange(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSTextField.rs b/crates/icrate/src/generated/AppKit/NSTextField.rs index 3bc00bfcb..bd031c2d0 100644 --- a/crates/icrate/src/generated/AppKit/NSTextField.rs +++ b/crates/icrate/src/generated/AppKit/NSTextField.rs @@ -15,13 +15,13 @@ extern_class!( extern_methods!( unsafe impl NSTextField { - #[method_id(placeholderString)] + #[method_id(@__retain_semantics Other placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); - #[method_id(placeholderAttributedString)] + #[method_id(@__retain_semantics Other placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; #[method(setPlaceholderAttributedString:)] @@ -30,7 +30,7 @@ extern_methods!( placeholderAttributedString: Option<&NSAttributedString>, ); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[method(setBackgroundColor:)] @@ -42,7 +42,7 @@ extern_methods!( #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); - #[method_id(textColor)] + #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor(&self) -> Option>; #[method(setTextColor:)] @@ -75,7 +75,7 @@ extern_methods!( #[method(selectText:)] pub unsafe fn selectText(&self, sender: Option<&Object>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -160,18 +160,18 @@ extern_methods!( extern_methods!( /// NSTextFieldConvenience unsafe impl NSTextField { - #[method_id(labelWithString:)] + #[method_id(@__retain_semantics Other labelWithString:)] pub unsafe fn labelWithString(stringValue: &NSString) -> Id; - #[method_id(wrappingLabelWithString:)] + #[method_id(@__retain_semantics Other wrappingLabelWithString:)] pub unsafe fn wrappingLabelWithString(stringValue: &NSString) -> Id; - #[method_id(labelWithAttributedString:)] + #[method_id(@__retain_semantics Other labelWithAttributedString:)] pub unsafe fn labelWithAttributedString( attributedStringValue: &NSAttributedString, ) -> Id; - #[method_id(textFieldWithString:)] + #[method_id(@__retain_semantics Other textFieldWithString:)] pub unsafe fn textFieldWithString(stringValue: &NSString) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs index 4aa890fb4..b9a776b86 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs @@ -19,25 +19,25 @@ extern_class!( extern_methods!( unsafe impl NSTextFieldCell { - #[method_id(initTextCell:)] + #[method_id(@__retain_semantics Init initTextCell:)] pub unsafe fn initTextCell( this: Option>, string: &NSString, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(initImageCell:)] + #[method_id(@__retain_semantics Init initImageCell:)] pub unsafe fn initImageCell( this: Option>, image: Option<&NSImage>, ) -> Id; - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[method(setBackgroundColor:)] @@ -49,13 +49,13 @@ extern_methods!( #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); - #[method_id(textColor)] + #[method_id(@__retain_semantics Other textColor)] pub unsafe fn textColor(&self) -> Option>; #[method(setTextColor:)] pub unsafe fn setTextColor(&self, textColor: Option<&NSColor>); - #[method_id(setUpFieldEditorAttributes:)] + #[method_id(@__retain_semantics Other setUpFieldEditorAttributes:)] pub unsafe fn setUpFieldEditorAttributes(&self, textObj: &NSText) -> Id; #[method(bezelStyle)] @@ -64,13 +64,13 @@ extern_methods!( #[method(setBezelStyle:)] pub unsafe fn setBezelStyle(&self, bezelStyle: NSTextFieldBezelStyle); - #[method_id(placeholderString)] + #[method_id(@__retain_semantics Other placeholderString)] pub unsafe fn placeholderString(&self) -> Option>; #[method(setPlaceholderString:)] pub unsafe fn setPlaceholderString(&self, placeholderString: Option<&NSString>); - #[method_id(placeholderAttributedString)] + #[method_id(@__retain_semantics Other placeholderAttributedString)] pub unsafe fn placeholderAttributedString(&self) -> Option>; #[method(setPlaceholderAttributedString:)] @@ -82,7 +82,7 @@ extern_methods!( #[method(setWantsNotificationForMarkedText:)] pub unsafe fn setWantsNotificationForMarkedText(&self, flag: bool); - #[method_id(allowedInputSourceLocales)] + #[method_id(@__retain_semantics Other allowedInputSourceLocales)] pub unsafe fn allowedInputSourceLocales(&self) -> Option, Shared>>; #[method(setAllowedInputSourceLocales:)] diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index ec3cabbba..06898c466 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -46,16 +46,16 @@ extern_class!( extern_methods!( unsafe impl NSTextFinder { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(client)] + #[method_id(@__retain_semantics Other client)] pub unsafe fn client(&self) -> Option>; #[method(setClient:)] @@ -67,7 +67,7 @@ extern_methods!( #[method(validateAction:)] pub unsafe fn validateAction(&self, op: NSTextFinderAction) -> bool; - #[method_id(findBarContainer)] + #[method_id(@__retain_semantics Other findBarContainer)] pub unsafe fn findBarContainer(&self) -> Option>; #[method(setFindBarContainer:)] @@ -100,7 +100,7 @@ extern_methods!( incrementalSearchingShouldDimContentView: bool, ); - #[method_id(incrementalMatchRanges)] + #[method_id(@__retain_semantics Other incrementalMatchRanges)] pub unsafe fn incrementalMatchRanges(&self) -> Id, Shared>; #[method(drawIncrementalMatchHighlightInRect:)] diff --git a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs index b354e9ddf..353234de5 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs @@ -17,19 +17,19 @@ extern_class!( extern_methods!( unsafe impl NSTextInputContext { - #[method_id(currentInputContext)] + #[method_id(@__retain_semantics Other currentInputContext)] pub unsafe fn currentInputContext() -> Option>; - #[method_id(initWithClient:)] + #[method_id(@__retain_semantics Init initWithClient:)] pub unsafe fn initWithClient( this: Option>, client: &NSTextInputClient, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(client)] + #[method_id(@__retain_semantics Other client)] pub unsafe fn client(&self) -> Id; #[method(acceptsGlyphInfo)] @@ -38,7 +38,7 @@ extern_methods!( #[method(setAcceptsGlyphInfo:)] pub unsafe fn setAcceptsGlyphInfo(&self, acceptsGlyphInfo: bool); - #[method_id(allowedInputSourceLocales)] + #[method_id(@__retain_semantics Other allowedInputSourceLocales)] pub unsafe fn allowedInputSourceLocales(&self) -> Option, Shared>>; #[method(setAllowedInputSourceLocales:)] @@ -62,12 +62,12 @@ extern_methods!( #[method(invalidateCharacterCoordinates)] pub unsafe fn invalidateCharacterCoordinates(&self); - #[method_id(keyboardInputSources)] + #[method_id(@__retain_semantics Other keyboardInputSources)] pub unsafe fn keyboardInputSources( &self, ) -> Option, Shared>>; - #[method_id(selectedKeyboardInputSource)] + #[method_id(@__retain_semantics Other selectedKeyboardInputSource)] pub unsafe fn selectedKeyboardInputSource( &self, ) -> Option>; @@ -78,7 +78,7 @@ extern_methods!( selectedKeyboardInputSource: Option<&NSTextInputSourceIdentifier>, ); - #[method_id(localizedNameForInputSource:)] + #[method_id(@__retain_semantics Other localizedNameForInputSource:)] pub unsafe fn localizedNameForInputSource( inputSourceIdentifier: &NSTextInputSourceIdentifier, ) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index 70741525e..978aa23a3 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -32,35 +32,35 @@ extern_class!( extern_methods!( unsafe impl NSTextLayoutFragment { - #[method_id(initWithTextElement:range:)] + #[method_id(@__retain_semantics Init initWithTextElement:range:)] pub unsafe fn initWithTextElement_range( this: Option>, textElement: &NSTextElement, rangeInElement: Option<&NSTextRange>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(textLayoutManager)] + #[method_id(@__retain_semantics Other textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; - #[method_id(textElement)] + #[method_id(@__retain_semantics Other textElement)] pub unsafe fn textElement(&self) -> Option>; - #[method_id(rangeInElement)] + #[method_id(@__retain_semantics Other rangeInElement)] pub unsafe fn rangeInElement(&self) -> Id; - #[method_id(textLineFragments)] + #[method_id(@__retain_semantics Other textLineFragments)] pub unsafe fn textLineFragments(&self) -> Id, Shared>; - #[method_id(layoutQueue)] + #[method_id(@__retain_semantics Other layoutQueue)] pub unsafe fn layoutQueue(&self) -> Option>; #[method(setLayoutQueue:)] @@ -93,7 +93,7 @@ extern_methods!( #[method(drawAtPoint:inContext:)] pub unsafe fn drawAtPoint_inContext(&self, point: CGPoint, context: CGContextRef); - #[method_id(textAttachmentViewProviders)] + #[method_id(@__retain_semantics Other textAttachmentViewProviders)] pub unsafe fn textAttachmentViewProviders( &self, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index 471244310..a869db739 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -33,16 +33,16 @@ extern_class!( extern_methods!( unsafe impl NSTextLayoutManager { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -69,13 +69,13 @@ extern_methods!( #[method(setUsesHyphenation:)] pub unsafe fn setUsesHyphenation(&self, usesHyphenation: bool); - #[method_id(textContentManager)] + #[method_id(@__retain_semantics Other textContentManager)] pub unsafe fn textContentManager(&self) -> Option>; #[method(replaceTextContentManager:)] pub unsafe fn replaceTextContentManager(&self, textContentManager: &NSTextContentManager); - #[method_id(textContainer)] + #[method_id(@__retain_semantics Other textContainer)] pub unsafe fn textContainer(&self) -> Option>; #[method(setTextContainer:)] @@ -84,12 +84,12 @@ extern_methods!( #[method(usageBoundsForTextContainer)] pub unsafe fn usageBoundsForTextContainer(&self) -> CGRect; - #[method_id(textViewportLayoutController)] + #[method_id(@__retain_semantics Other textViewportLayoutController)] pub unsafe fn textViewportLayoutController( &self, ) -> Id; - #[method_id(layoutQueue)] + #[method_id(@__retain_semantics Other layoutQueue)] pub unsafe fn layoutQueue(&self) -> Option>; #[method(setLayoutQueue:)] @@ -104,19 +104,19 @@ extern_methods!( #[method(invalidateLayoutForRange:)] pub unsafe fn invalidateLayoutForRange(&self, range: &NSTextRange); - #[method_id(textLayoutFragmentForPosition:)] + #[method_id(@__retain_semantics Other textLayoutFragmentForPosition:)] pub unsafe fn textLayoutFragmentForPosition( &self, position: CGPoint, ) -> Option>; - #[method_id(textLayoutFragmentForLocation:)] + #[method_id(@__retain_semantics Other textLayoutFragmentForLocation:)] pub unsafe fn textLayoutFragmentForLocation( &self, location: &NSTextLocation, ) -> Option>; - #[method_id(enumerateTextLayoutFragmentsFromLocation:options:usingBlock:)] + #[method_id(@__retain_semantics Other enumerateTextLayoutFragmentsFromLocation:options:usingBlock:)] pub unsafe fn enumerateTextLayoutFragmentsFromLocation_options_usingBlock( &self, location: Option<&NSTextLocation>, @@ -124,13 +124,13 @@ extern_methods!( block: TodoBlock, ) -> Option>; - #[method_id(textSelections)] + #[method_id(@__retain_semantics Other textSelections)] pub unsafe fn textSelections(&self) -> Id, Shared>; #[method(setTextSelections:)] pub unsafe fn setTextSelections(&self, textSelections: &NSArray); - #[method_id(textSelectionNavigation)] + #[method_id(@__retain_semantics Other textSelectionNavigation)] pub unsafe fn textSelectionNavigation(&self) -> Id; #[method(setTextSelectionNavigation:)] @@ -181,11 +181,11 @@ extern_methods!( renderingAttributesValidator: TodoBlock, ); - #[method_id(linkRenderingAttributes)] + #[method_id(@__retain_semantics Other linkRenderingAttributes)] pub unsafe fn linkRenderingAttributes( ) -> Id, Shared>; - #[method_id(renderingAttributesForLink:atLocation:)] + #[method_id(@__retain_semantics Other renderingAttributesForLink:atLocation:)] pub unsafe fn renderingAttributesForLink_atLocation( &self, link: &Object, diff --git a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs index 5b44397ae..85d1b0c43 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs @@ -15,20 +15,20 @@ extern_class!( extern_methods!( unsafe impl NSTextLineFragment { - #[method_id(initWithAttributedString:range:)] + #[method_id(@__retain_semantics Init initWithAttributedString:range:)] pub unsafe fn initWithAttributedString_range( this: Option>, attributedString: &NSAttributedString, range: NSRange, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, aDecoder: &NSCoder, ) -> Option>; - #[method_id(initWithString:attributes:range:)] + #[method_id(@__retain_semantics Init initWithString:attributes:range:)] pub unsafe fn initWithString_attributes_range( this: Option>, string: &NSString, @@ -36,10 +36,10 @@ extern_methods!( range: NSRange, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(attributedString)] + #[method_id(@__retain_semantics Other attributedString)] pub unsafe fn attributedString(&self) -> Id; #[method(characterRange)] diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index 57ce85f6f..eac60cac0 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -88,20 +88,20 @@ extern_class!( extern_methods!( unsafe impl NSTextList { - #[method_id(initWithMarkerFormat:options:)] + #[method_id(@__retain_semantics Init initWithMarkerFormat:options:)] pub unsafe fn initWithMarkerFormat_options( this: Option>, format: &NSTextListMarkerFormat, mask: NSUInteger, ) -> Id; - #[method_id(markerFormat)] + #[method_id(@__retain_semantics Other markerFormat)] pub unsafe fn markerFormat(&self) -> Id; #[method(listOptions)] pub unsafe fn listOptions(&self) -> NSTextListOptions; - #[method_id(markerForItemNumber:)] + #[method_id(@__retain_semantics Other markerForItemNumber:)] pub unsafe fn markerForItemNumber(&self, itemNum: NSInteger) -> Id; #[method(startingItemNumber)] diff --git a/crates/icrate/src/generated/AppKit/NSTextRange.rs b/crates/icrate/src/generated/AppKit/NSTextRange.rs index c4fa062d0..615125f3f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextRange.rs +++ b/crates/icrate/src/generated/AppKit/NSTextRange.rs @@ -17,32 +17,32 @@ extern_class!( extern_methods!( unsafe impl NSTextRange { - #[method_id(initWithLocation:endLocation:)] + #[method_id(@__retain_semantics Init initWithLocation:endLocation:)] pub unsafe fn initWithLocation_endLocation( this: Option>, location: &NSTextLocation, endLocation: Option<&NSTextLocation>, ) -> Option>; - #[method_id(initWithLocation:)] + #[method_id(@__retain_semantics Init initWithLocation:)] pub unsafe fn initWithLocation( this: Option>, location: &NSTextLocation, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; #[method(isEmpty)] pub unsafe fn isEmpty(&self) -> bool; - #[method_id(location)] + #[method_id(@__retain_semantics Other location)] pub unsafe fn location(&self) -> Id; - #[method_id(endLocation)] + #[method_id(@__retain_semantics Other endLocation)] pub unsafe fn endLocation(&self) -> Id; #[method(isEqualToTextRange:)] @@ -57,13 +57,13 @@ extern_methods!( #[method(intersectsWithTextRange:)] pub unsafe fn intersectsWithTextRange(&self, textRange: &NSTextRange) -> bool; - #[method_id(textRangeByIntersectingWithTextRange:)] + #[method_id(@__retain_semantics Other textRangeByIntersectingWithTextRange:)] pub unsafe fn textRangeByIntersectingWithTextRange( &self, textRange: &NSTextRange, ) -> Option>; - #[method_id(textRangeByFormingUnionWithTextRange:)] + #[method_id(@__retain_semantics Other textRangeByFormingUnionWithTextRange:)] pub unsafe fn textRangeByFormingUnionWithTextRange( &self, textRange: &NSTextRange, diff --git a/crates/icrate/src/generated/AppKit/NSTextSelection.rs b/crates/icrate/src/generated/AppKit/NSTextSelection.rs index 88def90d3..a809e3be0 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelection.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelection.rs @@ -26,7 +26,7 @@ extern_class!( extern_methods!( unsafe impl NSTextSelection { - #[method_id(initWithRanges:affinity:granularity:)] + #[method_id(@__retain_semantics Init initWithRanges:affinity:granularity:)] pub unsafe fn initWithRanges_affinity_granularity( this: Option>, textRanges: &NSArray, @@ -34,13 +34,13 @@ extern_methods!( granularity: NSTextSelectionGranularity, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(initWithRange:affinity:granularity:)] + #[method_id(@__retain_semantics Init initWithRange:affinity:granularity:)] pub unsafe fn initWithRange_affinity_granularity( this: Option>, range: &NSTextRange, @@ -48,17 +48,17 @@ extern_methods!( granularity: NSTextSelectionGranularity, ) -> Id; - #[method_id(initWithLocation:affinity:)] + #[method_id(@__retain_semantics Init initWithLocation:affinity:)] pub unsafe fn initWithLocation_affinity( this: Option>, location: &NSTextLocation, affinity: NSTextSelectionAffinity, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(textRanges)] + #[method_id(@__retain_semantics Other textRanges)] pub unsafe fn textRanges(&self) -> Id, Shared>; #[method(granularity)] @@ -82,7 +82,7 @@ extern_methods!( #[method(setLogical:)] pub unsafe fn setLogical(&self, logical: bool); - #[method_id(secondarySelectionLocation)] + #[method_id(@__retain_semantics Other secondarySelectionLocation)] pub unsafe fn secondarySelectionLocation(&self) -> Option>; #[method(setSecondarySelectionLocation:)] @@ -91,7 +91,7 @@ extern_methods!( secondarySelectionLocation: Option<&NSTextLocation>, ); - #[method_id(typingAttributes)] + #[method_id(@__retain_semantics Other typingAttributes)] pub unsafe fn typingAttributes( &self, ) -> Id, Shared>; @@ -102,7 +102,7 @@ extern_methods!( typingAttributes: &NSDictionary, ); - #[method_id(textSelectionWithTextRanges:)] + #[method_id(@__retain_semantics Other textSelectionWithTextRanges:)] pub unsafe fn textSelectionWithTextRanges( &self, textRanges: &NSArray, diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index 096a89e88..022889159 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -49,19 +49,19 @@ extern_class!( extern_methods!( unsafe impl NSTextSelectionNavigation { - #[method_id(initWithDataSource:)] + #[method_id(@__retain_semantics Init initWithDataSource:)] pub unsafe fn initWithDataSource( this: Option>, dataSource: &NSTextSelectionDataSource, ) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(textSelectionDataSource)] + #[method_id(@__retain_semantics Other textSelectionDataSource)] pub unsafe fn textSelectionDataSource( &self, ) -> Option>; @@ -84,7 +84,7 @@ extern_methods!( #[method(flushLayoutCache)] pub unsafe fn flushLayoutCache(&self); - #[method_id(destinationSelectionForTextSelection:direction:destination:extending:confined:)] + #[method_id(@__retain_semantics Other destinationSelectionForTextSelection:direction:destination:extending:confined:)] pub unsafe fn destinationSelectionForTextSelection_direction_destination_extending_confined( &self, textSelection: &NSTextSelection, @@ -94,7 +94,7 @@ extern_methods!( confined: bool, ) -> Option>; - #[method_id(textSelectionsInteractingAtPoint:inContainerAtLocation:anchors:modifiers:selecting:bounds:)] + #[method_id(@__retain_semantics Other textSelectionsInteractingAtPoint:inContainerAtLocation:anchors:modifiers:selecting:bounds:)] pub unsafe fn textSelectionsInteractingAtPoint_inContainerAtLocation_anchors_modifiers_selecting_bounds( &self, point: CGPoint, @@ -105,14 +105,14 @@ extern_methods!( bounds: CGRect, ) -> Id, Shared>; - #[method_id(textSelectionForSelectionGranularity:enclosingTextSelection:)] + #[method_id(@__retain_semantics Other textSelectionForSelectionGranularity:enclosingTextSelection:)] pub unsafe fn textSelectionForSelectionGranularity_enclosingTextSelection( &self, selectionGranularity: NSTextSelectionGranularity, textSelection: &NSTextSelection, ) -> Id; - #[method_id(textSelectionForSelectionGranularity:enclosingPoint:inContainerAtLocation:)] + #[method_id(@__retain_semantics Other textSelectionForSelectionGranularity:enclosingPoint:inContainerAtLocation:)] pub unsafe fn textSelectionForSelectionGranularity_enclosingPoint_inContainerAtLocation( &self, selectionGranularity: NSTextSelectionGranularity, @@ -120,14 +120,14 @@ extern_methods!( location: &NSTextLocation, ) -> Option>; - #[method_id(resolvedInsertionLocationForTextSelection:writingDirection:)] + #[method_id(@__retain_semantics Other resolvedInsertionLocationForTextSelection:writingDirection:)] pub unsafe fn resolvedInsertionLocationForTextSelection_writingDirection( &self, textSelection: &NSTextSelection, writingDirection: NSTextSelectionNavigationWritingDirection, ) -> Option>; - #[method_id(deletionRangesForTextSelection:direction:destination:allowsDecomposition:)] + #[method_id(@__retain_semantics Other deletionRangesForTextSelection:direction:destination:allowsDecomposition:)] pub unsafe fn deletionRangesForTextSelection_direction_destination_allowsDecomposition( &self, textSelection: &NSTextSelection, diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index 88e254c4b..e7e9b8878 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -19,7 +19,7 @@ extern_class!( extern_methods!( unsafe impl NSTextStorage { - #[method_id(layoutManagers)] + #[method_id(@__retain_semantics Other layoutManagers)] pub unsafe fn layoutManagers(&self) -> Id, Shared>; #[method(addLayoutManager:)] @@ -37,7 +37,7 @@ extern_methods!( #[method(changeInLength)] pub unsafe fn changeInLength(&self) -> NSInteger; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -63,7 +63,7 @@ extern_methods!( #[method(ensureAttributesAreFixedInRange:)] pub unsafe fn ensureAttributesAreFixedInRange(&self, range: NSRange); - #[method_id(textStorageObserver)] + #[method_id(@__retain_semantics Other textStorageObserver)] pub unsafe fn textStorageObserver(&self) -> Option>; #[method(setTextStorageObserver:)] diff --git a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs index e1353b1b1..16da87fc4 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs @@ -7,37 +7,37 @@ use crate::Foundation::*; extern_methods!( /// Scripting unsafe impl NSTextStorage { - #[method_id(attributeRuns)] + #[method_id(@__retain_semantics Other attributeRuns)] pub unsafe fn attributeRuns(&self) -> Id, Shared>; #[method(setAttributeRuns:)] pub unsafe fn setAttributeRuns(&self, attributeRuns: &NSArray); - #[method_id(paragraphs)] + #[method_id(@__retain_semantics Other paragraphs)] pub unsafe fn paragraphs(&self) -> Id, Shared>; #[method(setParagraphs:)] pub unsafe fn setParagraphs(&self, paragraphs: &NSArray); - #[method_id(words)] + #[method_id(@__retain_semantics Other words)] pub unsafe fn words(&self) -> Id, Shared>; #[method(setWords:)] pub unsafe fn setWords(&self, words: &NSArray); - #[method_id(characters)] + #[method_id(@__retain_semantics Other characters)] pub unsafe fn characters(&self) -> Id, Shared>; #[method(setCharacters:)] pub unsafe fn setCharacters(&self, characters: &NSArray); - #[method_id(font)] + #[method_id(@__retain_semantics Other font)] pub unsafe fn font(&self) -> Option>; #[method(setFont:)] pub unsafe fn setFont(&self, font: Option<&NSFont>); - #[method_id(foregroundColor)] + #[method_id(@__retain_semantics Other foregroundColor)] pub unsafe fn foregroundColor(&self) -> Option>; #[method(setForegroundColor:)] diff --git a/crates/icrate/src/generated/AppKit/NSTextTable.rs b/crates/icrate/src/generated/AppKit/NSTextTable.rs index c7f1b113e..d4fe6c303 100644 --- a/crates/icrate/src/generated/AppKit/NSTextTable.rs +++ b/crates/icrate/src/generated/AppKit/NSTextTable.rs @@ -42,7 +42,7 @@ extern_class!( extern_methods!( unsafe impl NSTextBlock { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[method(setValue:type:forDimension:)] @@ -108,7 +108,7 @@ extern_methods!( #[method(setVerticalAlignment:)] pub unsafe fn setVerticalAlignment(&self, verticalAlignment: NSTextBlockVerticalAlignment); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; #[method(setBackgroundColor:)] @@ -120,7 +120,7 @@ extern_methods!( #[method(setBorderColor:)] pub unsafe fn setBorderColor(&self, color: Option<&NSColor>); - #[method_id(borderColorForEdge:)] + #[method_id(@__retain_semantics Other borderColorForEdge:)] pub unsafe fn borderColorForEdge(&self, edge: NSRectEdge) -> Option>; #[method(rectForLayoutAtPoint:inRect:textContainer:characterRange:)] @@ -163,7 +163,7 @@ extern_class!( extern_methods!( unsafe impl NSTextTableBlock { - #[method_id(initWithTable:startingRow:rowSpan:startingColumn:columnSpan:)] + #[method_id(@__retain_semantics Init initWithTable:startingRow:rowSpan:startingColumn:columnSpan:)] pub unsafe fn initWithTable_startingRow_rowSpan_startingColumn_columnSpan( this: Option>, table: &NSTextTable, @@ -173,7 +173,7 @@ extern_methods!( colSpan: NSInteger, ) -> Id; - #[method_id(table)] + #[method_id(@__retain_semantics Other table)] pub unsafe fn table(&self) -> Id; #[method(startingRow)] diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index a15ded230..84cb2ed53 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -28,26 +28,26 @@ extern_class!( extern_methods!( unsafe impl NSTextView { - #[method_id(initWithFrame:textContainer:)] + #[method_id(@__retain_semantics Init initWithFrame:textContainer:)] pub unsafe fn initWithFrame_textContainer( this: Option>, frameRect: NSRect, container: Option<&NSTextContainer>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(initWithFrame:)] + #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame( this: Option>, frameRect: NSRect, ) -> Id; - #[method_id(textContainer)] + #[method_id(@__retain_semantics Other textContainer)] pub unsafe fn textContainer(&self) -> Option>; #[method(setTextContainer:)] @@ -68,16 +68,16 @@ extern_methods!( #[method(invalidateTextContainerOrigin)] pub unsafe fn invalidateTextContainerOrigin(&self); - #[method_id(layoutManager)] + #[method_id(@__retain_semantics Other layoutManager)] pub unsafe fn layoutManager(&self) -> Option>; - #[method_id(textStorage)] + #[method_id(@__retain_semantics Other textStorage)] pub unsafe fn textStorage(&self) -> Option>; - #[method_id(textLayoutManager)] + #[method_id(@__retain_semantics Other textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; - #[method_id(textContentStorage)] + #[method_id(@__retain_semantics Other textContentStorage)] pub unsafe fn textContentStorage(&self) -> Option>; #[method(insertText:)] @@ -286,7 +286,7 @@ extern_methods!( #[method(rangeForUserCompletion)] pub unsafe fn rangeForUserCompletion(&self) -> NSRange; - #[method_id(completionsForPartialWordRange:indexOfSelectedItem:)] + #[method_id(@__retain_semantics Other completionsForPartialWordRange:indexOfSelectedItem:)] pub unsafe fn completionsForPartialWordRange_indexOfSelectedItem( &self, charRange: NSRange, @@ -307,7 +307,7 @@ extern_methods!( extern_methods!( /// NSPasteboard unsafe impl NSTextView { - #[method_id(writablePasteboardTypes)] + #[method_id(@__retain_semantics Other writablePasteboardTypes)] pub unsafe fn writablePasteboardTypes(&self) -> Id, Shared>; #[method(writeSelectionToPasteboard:type:)] @@ -324,10 +324,10 @@ extern_methods!( types: &NSArray, ) -> bool; - #[method_id(readablePasteboardTypes)] + #[method_id(@__retain_semantics Other readablePasteboardTypes)] pub unsafe fn readablePasteboardTypes(&self) -> Id, Shared>; - #[method_id(preferredPasteboardTypeFromArray:restrictedToTypesFromArray:)] + #[method_id(@__retain_semantics Other preferredPasteboardTypeFromArray:restrictedToTypesFromArray:)] pub unsafe fn preferredPasteboardTypeFromArray_restrictedToTypesFromArray( &self, availableTypes: &NSArray, @@ -347,7 +347,7 @@ extern_methods!( #[method(registerForServices)] pub unsafe fn registerForServices(); - #[method_id(validRequestorForSendType:returnType:)] + #[method_id(@__retain_semantics Other validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, sendType: Option<&NSPasteboardType>, @@ -373,14 +373,14 @@ extern_methods!( slideBack: bool, ) -> bool; - #[method_id(dragImageForSelectionWithEvent:origin:)] + #[method_id(@__retain_semantics Other dragImageForSelectionWithEvent:origin:)] pub unsafe fn dragImageForSelectionWithEvent_origin( &self, event: &NSEvent, origin: NSPointPointer, ) -> Option>; - #[method_id(acceptableDragTypes)] + #[method_id(@__retain_semantics Other acceptableDragTypes)] pub unsafe fn acceptableDragTypes(&self) -> Id, Shared>; #[method(dragOperationForDraggingInfo:type:)] @@ -398,7 +398,7 @@ extern_methods!( extern_methods!( /// NSSharing unsafe impl NSTextView { - #[method_id(selectedRanges)] + #[method_id(@__retain_semantics Other selectedRanges)] pub unsafe fn selectedRanges(&self) -> Id, Shared>; #[method(setSelectedRanges:)] @@ -429,7 +429,7 @@ extern_methods!( #[method(setSelectionGranularity:)] pub unsafe fn setSelectionGranularity(&self, selectionGranularity: NSSelectionGranularity); - #[method_id(selectedTextAttributes)] + #[method_id(@__retain_semantics Other selectedTextAttributes)] pub unsafe fn selectedTextAttributes( &self, ) -> Id, Shared>; @@ -440,7 +440,7 @@ extern_methods!( selectedTextAttributes: &NSDictionary, ); - #[method_id(insertionPointColor)] + #[method_id(@__retain_semantics Other insertionPointColor)] pub unsafe fn insertionPointColor(&self) -> Id; #[method(setInsertionPointColor:)] @@ -449,7 +449,7 @@ extern_methods!( #[method(updateInsertionPointStateAndRestartTimer:)] pub unsafe fn updateInsertionPointStateAndRestartTimer(&self, restartFlag: bool); - #[method_id(markedTextAttributes)] + #[method_id(@__retain_semantics Other markedTextAttributes)] pub unsafe fn markedTextAttributes( &self, ) -> Option, Shared>>; @@ -460,7 +460,7 @@ extern_methods!( markedTextAttributes: Option<&NSDictionary>, ); - #[method_id(linkTextAttributes)] + #[method_id(@__retain_semantics Other linkTextAttributes)] pub unsafe fn linkTextAttributes( &self, ) -> Option, Shared>>; @@ -522,7 +522,7 @@ extern_methods!( #[method(setSpellingState:range:)] pub unsafe fn setSpellingState_range(&self, value: NSInteger, charRange: NSRange); - #[method_id(typingAttributes)] + #[method_id(@__retain_semantics Other typingAttributes)] pub unsafe fn typingAttributes( &self, ) -> Id, Shared>; @@ -540,15 +540,15 @@ extern_methods!( replacementStrings: Option<&NSArray>, ) -> bool; - #[method_id(rangesForUserTextChange)] + #[method_id(@__retain_semantics Other rangesForUserTextChange)] pub unsafe fn rangesForUserTextChange(&self) -> Option, Shared>>; - #[method_id(rangesForUserCharacterAttributeChange)] + #[method_id(@__retain_semantics Other rangesForUserCharacterAttributeChange)] pub unsafe fn rangesForUserCharacterAttributeChange( &self, ) -> Option, Shared>>; - #[method_id(rangesForUserParagraphAttributeChange)] + #[method_id(@__retain_semantics Other rangesForUserParagraphAttributeChange)] pub unsafe fn rangesForUserParagraphAttributeChange( &self, ) -> Option, Shared>>; @@ -581,7 +581,7 @@ extern_methods!( allowsDocumentBackgroundColorChange: bool, ); - #[method_id(defaultParagraphStyle)] + #[method_id(@__retain_semantics Other defaultParagraphStyle)] pub unsafe fn defaultParagraphStyle(&self) -> Option>; #[method(setDefaultParagraphStyle:)] @@ -620,7 +620,7 @@ extern_methods!( usesRolloverButtonForSelection: bool, ); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -656,7 +656,7 @@ extern_methods!( #[method(setDrawsBackground:)] pub unsafe fn setDrawsBackground(&self, drawsBackground: bool); - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] @@ -683,7 +683,7 @@ extern_methods!( #[method(setSelectedRange:)] pub unsafe fn setSelectedRange(&self, charRange: NSRange); - #[method_id(allowedInputSourceLocales)] + #[method_id(@__retain_semantics Other allowedInputSourceLocales)] pub unsafe fn allowedInputSourceLocales(&self) -> Option, Shared>>; #[method(setAllowedInputSourceLocales:)] @@ -721,14 +721,14 @@ extern_methods!( afterString: Option<&mut Option>>, ); - #[method_id(smartInsertBeforeStringForString:replacingRange:)] + #[method_id(@__retain_semantics Other smartInsertBeforeStringForString:replacingRange:)] pub unsafe fn smartInsertBeforeStringForString_replacingRange( &self, pasteString: &NSString, charRangeToReplace: NSRange, ) -> Option>; - #[method_id(smartInsertAfterStringForString:replacingRange:)] + #[method_id(@__retain_semantics Other smartInsertAfterStringForString:replacingRange:)] pub unsafe fn smartInsertAfterStringForString_replacingRange( &self, pasteString: &NSString, @@ -864,7 +864,7 @@ extern_methods!( #[method(toggleQuickLookPreviewPanel:)] pub unsafe fn toggleQuickLookPreviewPanel(&self, sender: Option<&Object>); - #[method_id(quickLookPreviewableItemsInRanges:)] + #[method_id(@__retain_semantics Other quickLookPreviewableItemsInRanges:)] pub unsafe fn quickLookPreviewableItemsInRanges( &self, ranges: &NSArray, @@ -916,7 +916,7 @@ extern_methods!( #[method(updateCandidates)] pub unsafe fn updateCandidates(&self); - #[method_id(candidateListTouchBarItem)] + #[method_id(@__retain_semantics Other candidateListTouchBarItem)] pub unsafe fn candidateListTouchBarItem( &self, ) -> Option>; @@ -926,16 +926,16 @@ extern_methods!( extern_methods!( /// NSTextView_Factory unsafe impl NSTextView { - #[method_id(scrollableTextView)] + #[method_id(@__retain_semantics Other scrollableTextView)] pub unsafe fn scrollableTextView() -> Id; - #[method_id(fieldEditor)] + #[method_id(@__retain_semantics Other fieldEditor)] pub unsafe fn fieldEditor() -> Id; - #[method_id(scrollableDocumentContentTextView)] + #[method_id(@__retain_semantics Other scrollableDocumentContentTextView)] pub unsafe fn scrollableDocumentContentTextView() -> Id; - #[method_id(scrollablePlainDocumentContentTextView)] + #[method_id(@__retain_semantics Other scrollablePlainDocumentContentTextView)] pub unsafe fn scrollablePlainDocumentContentTextView() -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs index f143813b1..0165843be 100644 --- a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs @@ -17,32 +17,32 @@ extern_class!( extern_methods!( unsafe impl NSTextViewportLayoutController { - #[method_id(initWithTextLayoutManager:)] + #[method_id(@__retain_semantics Init initWithTextLayoutManager:)] pub unsafe fn initWithTextLayoutManager( this: Option>, textLayoutManager: &NSTextLayoutManager, ) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTextViewportLayoutControllerDelegate>); - #[method_id(textLayoutManager)] + #[method_id(@__retain_semantics Other textLayoutManager)] pub unsafe fn textLayoutManager(&self) -> Option>; #[method(viewportBounds)] pub unsafe fn viewportBounds(&self) -> CGRect; - #[method_id(viewportRange)] + #[method_id(@__retain_semantics Other viewportRange)] pub unsafe fn viewportRange(&self) -> Option>; #[method(layoutViewport)] diff --git a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs index 0317b286a..060df9f1a 100644 --- a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs @@ -15,22 +15,22 @@ extern_class!( extern_methods!( unsafe impl NSTintConfiguration { - #[method_id(defaultTintConfiguration)] + #[method_id(@__retain_semantics Other defaultTintConfiguration)] pub unsafe fn defaultTintConfiguration() -> Id; - #[method_id(monochromeTintConfiguration)] + #[method_id(@__retain_semantics Other monochromeTintConfiguration)] pub unsafe fn monochromeTintConfiguration() -> Id; - #[method_id(tintConfigurationWithPreferredColor:)] + #[method_id(@__retain_semantics Other tintConfigurationWithPreferredColor:)] pub unsafe fn tintConfigurationWithPreferredColor(color: &NSColor) -> Id; - #[method_id(tintConfigurationWithFixedColor:)] + #[method_id(@__retain_semantics Other tintConfigurationWithFixedColor:)] pub unsafe fn tintConfigurationWithFixedColor(color: &NSColor) -> Id; - #[method_id(baseTintColor)] + #[method_id(@__retain_semantics Other baseTintColor)] pub unsafe fn baseTintColor(&self) -> Option>; - #[method_id(equivalentContentTintColor)] + #[method_id(@__retain_semantics Other equivalentContentTintColor)] pub unsafe fn equivalentContentTintColor(&self) -> Option>; #[method(adaptsToUserAccentColor)] diff --git a/crates/icrate/src/generated/AppKit/NSTokenField.rs b/crates/icrate/src/generated/AppKit/NSTokenField.rs index c6644673c..dcfeb216a 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenField.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenField.rs @@ -17,7 +17,7 @@ extern_class!( extern_methods!( unsafe impl NSTokenField { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -38,7 +38,7 @@ extern_methods!( #[method(defaultCompletionDelay)] pub unsafe fn defaultCompletionDelay() -> NSTimeInterval; - #[method_id(tokenizingCharacterSet)] + #[method_id(@__retain_semantics Other tokenizingCharacterSet)] pub unsafe fn tokenizingCharacterSet(&self) -> Id; #[method(setTokenizingCharacterSet:)] @@ -47,7 +47,7 @@ extern_methods!( tokenizingCharacterSet: Option<&NSCharacterSet>, ); - #[method_id(defaultTokenizingCharacterSet)] + #[method_id(@__retain_semantics Other defaultTokenizingCharacterSet)] pub unsafe fn defaultTokenizingCharacterSet() -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs index 3433ccaa6..ebe9804ea 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -37,7 +37,7 @@ extern_methods!( #[method(defaultCompletionDelay)] pub unsafe fn defaultCompletionDelay() -> NSTimeInterval; - #[method_id(tokenizingCharacterSet)] + #[method_id(@__retain_semantics Other tokenizingCharacterSet)] pub unsafe fn tokenizingCharacterSet(&self) -> Id; #[method(setTokenizingCharacterSet:)] @@ -46,10 +46,10 @@ extern_methods!( tokenizingCharacterSet: Option<&NSCharacterSet>, ); - #[method_id(defaultTokenizingCharacterSet)] + #[method_id(@__retain_semantics Other defaultTokenizingCharacterSet)] pub unsafe fn defaultTokenizingCharacterSet() -> Id; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index 077d5cfa8..6e75481fa 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -30,13 +30,13 @@ extern_class!( extern_methods!( unsafe impl NSToolbar { - #[method_id(initWithIdentifier:)] + #[method_id(@__retain_semantics Init initWithIdentifier:)] pub unsafe fn initWithIdentifier( this: Option>, identifier: &NSToolbarIdentifier, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[method(insertItemWithItemIdentifier:atIndex:)] @@ -49,7 +49,7 @@ extern_methods!( #[method(removeItemAtIndex:)] pub unsafe fn removeItemAtIndex(&self, index: NSInteger); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -73,7 +73,7 @@ extern_methods!( #[method(setDisplayMode:)] pub unsafe fn setDisplayMode(&self, displayMode: NSToolbarDisplayMode); - #[method_id(selectedItemIdentifier)] + #[method_id(@__retain_semantics Other selectedItemIdentifier)] pub unsafe fn selectedItemIdentifier(&self) -> Option>; #[method(setSelectedItemIdentifier:)] @@ -100,16 +100,16 @@ extern_methods!( #[method(setAllowsUserCustomization:)] pub unsafe fn setAllowsUserCustomization(&self, allowsUserCustomization: bool); - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Id; - #[method_id(items)] + #[method_id(@__retain_semantics Other items)] pub unsafe fn items(&self) -> Id, Shared>; - #[method_id(visibleItems)] + #[method_id(@__retain_semantics Other visibleItems)] pub unsafe fn visibleItems(&self) -> Option, Shared>>; - #[method_id(centeredItemIdentifier)] + #[method_id(@__retain_semantics Other centeredItemIdentifier)] pub unsafe fn centeredItemIdentifier(&self) -> Option>; #[method(setCenteredItemIdentifier:)] @@ -130,7 +130,7 @@ extern_methods!( configDict: &NSDictionary, ); - #[method_id(configurationDictionary)] + #[method_id(@__retain_semantics Other configurationDictionary)] pub unsafe fn configurationDictionary(&self) -> Id, Shared>; #[method(validateVisibleItems)] @@ -157,7 +157,7 @@ extern "C" { extern_methods!( /// NSDeprecated unsafe impl NSToolbar { - #[method_id(fullScreenAccessoryView)] + #[method_id(@__retain_semantics Other fullScreenAccessoryView)] pub unsafe fn fullScreenAccessoryView(&self) -> Option>; #[method(setFullScreenAccessoryView:)] diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index 5191ef4b9..c36fd5add 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -25,37 +25,37 @@ extern_class!( extern_methods!( unsafe impl NSToolbarItem { - #[method_id(initWithItemIdentifier:)] + #[method_id(@__retain_semantics Init initWithItemIdentifier:)] pub unsafe fn initWithItemIdentifier( this: Option>, itemIdentifier: &NSToolbarItemIdentifier, ) -> Id; - #[method_id(itemIdentifier)] + #[method_id(@__retain_semantics Other itemIdentifier)] pub unsafe fn itemIdentifier(&self) -> Id; - #[method_id(toolbar)] + #[method_id(@__retain_semantics Other toolbar)] pub unsafe fn toolbar(&self) -> Option>; - #[method_id(label)] + #[method_id(@__retain_semantics Other label)] pub unsafe fn label(&self) -> Id; #[method(setLabel:)] pub unsafe fn setLabel(&self, label: &NSString); - #[method_id(paletteLabel)] + #[method_id(@__retain_semantics Other paletteLabel)] pub unsafe fn paletteLabel(&self) -> Id; #[method(setPaletteLabel:)] pub unsafe fn setPaletteLabel(&self, paletteLabel: &NSString); - #[method_id(toolTip)] + #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Option>; #[method(setToolTip:)] pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); - #[method_id(menuFormRepresentation)] + #[method_id(@__retain_semantics Other menuFormRepresentation)] pub unsafe fn menuFormRepresentation(&self) -> Option>; #[method(setMenuFormRepresentation:)] @@ -67,7 +67,7 @@ extern_methods!( #[method(setTag:)] pub unsafe fn setTag(&self, tag: NSInteger); - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] @@ -85,13 +85,13 @@ extern_methods!( #[method(setEnabled:)] pub unsafe fn setEnabled(&self, enabled: bool); - #[method_id(image)] + #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Option>; #[method(setImage:)] pub unsafe fn setImage(&self, image: Option<&NSImage>); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] @@ -109,7 +109,7 @@ extern_methods!( #[method(setNavigational:)] pub unsafe fn setNavigational(&self, navigational: bool); - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; #[method(setView:)] diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs index d50ab0a5f..2ed47cc43 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs @@ -28,7 +28,7 @@ extern_class!( extern_methods!( unsafe impl NSToolbarItemGroup { - #[method_id(groupWithItemIdentifier:titles:selectionMode:labels:target:action:)] + #[method_id(@__retain_semantics Other groupWithItemIdentifier:titles:selectionMode:labels:target:action:)] pub unsafe fn groupWithItemIdentifier_titles_selectionMode_labels_target_action( itemIdentifier: &NSToolbarItemIdentifier, titles: &NSArray, @@ -38,7 +38,7 @@ extern_methods!( action: Option, ) -> Id; - #[method_id(groupWithItemIdentifier:images:selectionMode:labels:target:action:)] + #[method_id(@__retain_semantics Other groupWithItemIdentifier:images:selectionMode:labels:target:action:)] pub unsafe fn groupWithItemIdentifier_images_selectionMode_labels_target_action( itemIdentifier: &NSToolbarItemIdentifier, images: &NSArray, @@ -48,7 +48,7 @@ extern_methods!( action: Option, ) -> Id; - #[method_id(subitems)] + #[method_id(@__retain_semantics Other subitems)] pub unsafe fn subitems(&self) -> Id, Shared>; #[method(setSubitems:)] diff --git a/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs index cf295066c..c5b0a2b90 100644 --- a/crates/icrate/src/generated/AppKit/NSTouch.rs +++ b/crates/icrate/src/generated/AppKit/NSTouch.rs @@ -33,7 +33,7 @@ extern_class!( extern_methods!( unsafe impl NSTouch { - #[method_id(identity)] + #[method_id(@__retain_semantics Other identity)] pub unsafe fn identity(&self) -> Id; #[method(phase)] @@ -45,7 +45,7 @@ extern_methods!( #[method(isResting)] pub unsafe fn isResting(&self) -> bool; - #[method_id(device)] + #[method_id(@__retain_semantics Other device)] pub unsafe fn device(&self) -> Option>; #[method(deviceSize)] diff --git a/crates/icrate/src/generated/AppKit/NSTouchBar.rs b/crates/icrate/src/generated/AppKit/NSTouchBar.rs index 077d4dc88..f6ccfe9f0 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBar.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBar.rs @@ -17,16 +17,16 @@ extern_class!( extern_methods!( unsafe impl NSTouchBar { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(customizationIdentifier)] + #[method_id(@__retain_semantics Other customizationIdentifier)] pub unsafe fn customizationIdentifier( &self, ) -> Option>; @@ -37,7 +37,7 @@ extern_methods!( customizationIdentifier: Option<&NSTouchBarCustomizationIdentifier>, ); - #[method_id(customizationAllowedItemIdentifiers)] + #[method_id(@__retain_semantics Other customizationAllowedItemIdentifiers)] pub unsafe fn customizationAllowedItemIdentifiers( &self, ) -> Id, Shared>; @@ -48,7 +48,7 @@ extern_methods!( customizationAllowedItemIdentifiers: &NSArray, ); - #[method_id(customizationRequiredItemIdentifiers)] + #[method_id(@__retain_semantics Other customizationRequiredItemIdentifiers)] pub unsafe fn customizationRequiredItemIdentifiers( &self, ) -> Id, Shared>; @@ -59,7 +59,7 @@ extern_methods!( customizationRequiredItemIdentifiers: &NSArray, ); - #[method_id(defaultItemIdentifiers)] + #[method_id(@__retain_semantics Other defaultItemIdentifiers)] pub unsafe fn defaultItemIdentifiers( &self, ) -> Id, Shared>; @@ -70,10 +70,10 @@ extern_methods!( defaultItemIdentifiers: &NSArray, ); - #[method_id(itemIdentifiers)] + #[method_id(@__retain_semantics Other itemIdentifiers)] pub unsafe fn itemIdentifiers(&self) -> Id, Shared>; - #[method_id(principalItemIdentifier)] + #[method_id(@__retain_semantics Other principalItemIdentifier)] pub unsafe fn principalItemIdentifier( &self, ) -> Option>; @@ -84,7 +84,7 @@ extern_methods!( principalItemIdentifier: Option<&NSTouchBarItemIdentifier>, ); - #[method_id(escapeKeyReplacementItemIdentifier)] + #[method_id(@__retain_semantics Other escapeKeyReplacementItemIdentifier)] pub unsafe fn escapeKeyReplacementItemIdentifier( &self, ) -> Option>; @@ -95,19 +95,19 @@ extern_methods!( escapeKeyReplacementItemIdentifier: Option<&NSTouchBarItemIdentifier>, ); - #[method_id(templateItems)] + #[method_id(@__retain_semantics Other templateItems)] pub unsafe fn templateItems(&self) -> Id, Shared>; #[method(setTemplateItems:)] pub unsafe fn setTemplateItems(&self, templateItems: &NSSet); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSTouchBarDelegate>); - #[method_id(itemForIdentifier:)] + #[method_id(@__retain_semantics Other itemForIdentifier:)] pub unsafe fn itemForIdentifier( &self, identifier: &NSTouchBarItemIdentifier, @@ -133,13 +133,13 @@ pub type NSTouchBarProvider = NSObject; extern_methods!( /// NSTouchBarProvider unsafe impl NSResponder { - #[method_id(touchBar)] + #[method_id(@__retain_semantics Other touchBar)] pub unsafe fn touchBar(&self) -> Option>; #[method(setTouchBar:)] pub unsafe fn setTouchBar(&self, touchBar: Option<&NSTouchBar>); - #[method_id(makeTouchBar)] + #[method_id(@__retain_semantics Other makeTouchBar)] pub unsafe fn makeTouchBar(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs index a75b734c1..a7685b280 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -23,22 +23,22 @@ extern_class!( extern_methods!( unsafe impl NSTouchBarItem { - #[method_id(initWithIdentifier:)] + #[method_id(@__retain_semantics Init initWithIdentifier:)] pub unsafe fn initWithIdentifier( this: Option>, identifier: &NSTouchBarItemIdentifier, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Id; #[method(visibilityPriority)] @@ -47,13 +47,13 @@ extern_methods!( #[method(setVisibilityPriority:)] pub unsafe fn setVisibilityPriority(&self, visibilityPriority: NSTouchBarItemPriority); - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Option>; - #[method_id(viewController)] + #[method_id(@__retain_semantics Other viewController)] pub unsafe fn viewController(&self) -> Option>; - #[method_id(customizationLabel)] + #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; #[method(isVisible)] diff --git a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs index a418240a9..7580fc17a 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs @@ -27,7 +27,7 @@ extern_class!( extern_methods!( unsafe impl NSTrackingArea { - #[method_id(initWithRect:options:owner:userInfo:)] + #[method_id(@__retain_semantics Init initWithRect:options:owner:userInfo:)] pub unsafe fn initWithRect_options_owner_userInfo( this: Option>, rect: NSRect, @@ -42,10 +42,10 @@ extern_methods!( #[method(options)] pub unsafe fn options(&self) -> NSTrackingAreaOptions; - #[method_id(owner)] + #[method_id(@__retain_semantics Other owner)] pub unsafe fn owner(&self) -> Option>; - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option, Shared>>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs index 2d1a38150..36659ab84 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs @@ -15,14 +15,14 @@ extern_class!( extern_methods!( unsafe impl NSTrackingSeparatorToolbarItem { - #[method_id(trackingSeparatorToolbarItemWithIdentifier:splitView:dividerIndex:)] + #[method_id(@__retain_semantics Other trackingSeparatorToolbarItemWithIdentifier:splitView:dividerIndex:)] pub unsafe fn trackingSeparatorToolbarItemWithIdentifier_splitView_dividerIndex( identifier: &NSToolbarItemIdentifier, splitView: &NSSplitView, dividerIndex: NSInteger, ) -> Id; - #[method_id(splitView)] + #[method_id(@__retain_semantics Other splitView)] pub unsafe fn splitView(&self) -> Id; #[method(setSplitView:)] diff --git a/crates/icrate/src/generated/AppKit/NSTreeController.rs b/crates/icrate/src/generated/AppKit/NSTreeController.rs index 45ed88a97..95ce19af3 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeController.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeController.rs @@ -18,34 +18,34 @@ extern_methods!( #[method(rearrangeObjects)] pub unsafe fn rearrangeObjects(&self); - #[method_id(arrangedObjects)] + #[method_id(@__retain_semantics Other arrangedObjects)] pub unsafe fn arrangedObjects(&self) -> Id; - #[method_id(childrenKeyPath)] + #[method_id(@__retain_semantics Other childrenKeyPath)] pub unsafe fn childrenKeyPath(&self) -> Option>; #[method(setChildrenKeyPath:)] pub unsafe fn setChildrenKeyPath(&self, childrenKeyPath: Option<&NSString>); - #[method_id(countKeyPath)] + #[method_id(@__retain_semantics Other countKeyPath)] pub unsafe fn countKeyPath(&self) -> Option>; #[method(setCountKeyPath:)] pub unsafe fn setCountKeyPath(&self, countKeyPath: Option<&NSString>); - #[method_id(leafKeyPath)] + #[method_id(@__retain_semantics Other leafKeyPath)] pub unsafe fn leafKeyPath(&self) -> Option>; #[method(setLeafKeyPath:)] pub unsafe fn setLeafKeyPath(&self, leafKeyPath: Option<&NSString>); - #[method_id(sortDescriptors)] + #[method_id(@__retain_semantics Other sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id, Shared>; #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); - #[method_id(content)] + #[method_id(@__retain_semantics Other content)] pub unsafe fn content(&self) -> Option>; #[method(setContent:)] @@ -125,19 +125,19 @@ extern_methods!( alwaysUsesMultipleValuesMarker: bool, ); - #[method_id(selectedObjects)] + #[method_id(@__retain_semantics Other selectedObjects)] pub unsafe fn selectedObjects(&self) -> Id; #[method(setSelectionIndexPaths:)] pub unsafe fn setSelectionIndexPaths(&self, indexPaths: &NSArray) -> bool; - #[method_id(selectionIndexPaths)] + #[method_id(@__retain_semantics Other selectionIndexPaths)] pub unsafe fn selectionIndexPaths(&self) -> Id, Shared>; #[method(setSelectionIndexPath:)] pub unsafe fn setSelectionIndexPath(&self, indexPath: Option<&NSIndexPath>) -> bool; - #[method_id(selectionIndexPath)] + #[method_id(@__retain_semantics Other selectionIndexPath)] pub unsafe fn selectionIndexPath(&self) -> Option>; #[method(addSelectionIndexPaths:)] @@ -146,7 +146,7 @@ extern_methods!( #[method(removeSelectionIndexPaths:)] pub unsafe fn removeSelectionIndexPaths(&self, indexPaths: &NSArray) -> bool; - #[method_id(selectedNodes)] + #[method_id(@__retain_semantics Other selectedNodes)] pub unsafe fn selectedNodes(&self) -> Id, Shared>; #[method(moveNode:toIndexPath:)] @@ -159,17 +159,17 @@ extern_methods!( startingIndexPath: &NSIndexPath, ); - #[method_id(childrenKeyPathForNode:)] + #[method_id(@__retain_semantics Other childrenKeyPathForNode:)] pub unsafe fn childrenKeyPathForNode( &self, node: &NSTreeNode, ) -> Option>; - #[method_id(countKeyPathForNode:)] + #[method_id(@__retain_semantics Other countKeyPathForNode:)] pub unsafe fn countKeyPathForNode(&self, node: &NSTreeNode) -> Option>; - #[method_id(leafKeyPathForNode:)] + #[method_id(@__retain_semantics Other leafKeyPathForNode:)] pub unsafe fn leafKeyPathForNode(&self, node: &NSTreeNode) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSTreeNode.rs b/crates/icrate/src/generated/AppKit/NSTreeNode.rs index e8caa99f6..38295fe83 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeNode.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeNode.rs @@ -15,39 +15,39 @@ extern_class!( extern_methods!( unsafe impl NSTreeNode { - #[method_id(treeNodeWithRepresentedObject:)] + #[method_id(@__retain_semantics Other treeNodeWithRepresentedObject:)] pub unsafe fn treeNodeWithRepresentedObject( modelObject: Option<&Object>, ) -> Id; - #[method_id(initWithRepresentedObject:)] + #[method_id(@__retain_semantics Init initWithRepresentedObject:)] pub unsafe fn initWithRepresentedObject( this: Option>, modelObject: Option<&Object>, ) -> Id; - #[method_id(representedObject)] + #[method_id(@__retain_semantics Other representedObject)] pub unsafe fn representedObject(&self) -> Option>; - #[method_id(indexPath)] + #[method_id(@__retain_semantics Other indexPath)] pub unsafe fn indexPath(&self) -> Id; #[method(isLeaf)] pub unsafe fn isLeaf(&self) -> bool; - #[method_id(childNodes)] + #[method_id(@__retain_semantics Other childNodes)] pub unsafe fn childNodes(&self) -> Option, Shared>>; - #[method_id(mutableChildNodes)] + #[method_id(@__retain_semantics Other mutableChildNodes)] pub unsafe fn mutableChildNodes(&self) -> Id, Shared>; - #[method_id(descendantNodeAtIndexPath:)] + #[method_id(@__retain_semantics Other descendantNodeAtIndexPath:)] pub unsafe fn descendantNodeAtIndexPath( &self, indexPath: &NSIndexPath, ) -> Option>; - #[method_id(parentNode)] + #[method_id(@__retain_semantics Other parentNode)] pub unsafe fn parentNode(&self) -> Option>; #[method(sortWithSortDescriptors:recursively:)] diff --git a/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs index 1c13c6924..72dd31ea5 100644 --- a/crates/icrate/src/generated/AppKit/NSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSTypesetter.rs @@ -39,10 +39,10 @@ extern_methods!( #[method(setLineFragmentPadding:)] pub unsafe fn setLineFragmentPadding(&self, lineFragmentPadding: CGFloat); - #[method_id(substituteFontForFont:)] + #[method_id(@__retain_semantics Other substituteFontForFont:)] pub unsafe fn substituteFontForFont(&self, originalFont: &NSFont) -> Id; - #[method_id(textTabForGlyphLocation:writingDirection:maxLocation:)] + #[method_id(@__retain_semantics Other textTabForGlyphLocation:writingDirection:maxLocation:)] pub unsafe fn textTabForGlyphLocation_writingDirection_maxLocation( &self, glyphLocation: CGFloat, @@ -56,7 +56,7 @@ extern_methods!( #[method(setBidiProcessingEnabled:)] pub unsafe fn setBidiProcessingEnabled(&self, bidiProcessingEnabled: bool); - #[method_id(attributedString)] + #[method_id(@__retain_semantics Other attributedString)] pub unsafe fn attributedString(&self) -> Option>; #[method(setAttributedString:)] @@ -129,21 +129,21 @@ extern_methods!( lineOrigin: NSPoint, ); - #[method_id(attributesForExtraLineFragment)] + #[method_id(@__retain_semantics Other attributesForExtraLineFragment)] pub unsafe fn attributesForExtraLineFragment( &self, ) -> Id, Shared>; - #[method_id(layoutManager)] + #[method_id(@__retain_semantics Other layoutManager)] pub unsafe fn layoutManager(&self) -> Option>; - #[method_id(textContainers)] + #[method_id(@__retain_semantics Other textContainers)] pub unsafe fn textContainers(&self) -> Option, Shared>>; - #[method_id(currentTextContainer)] + #[method_id(@__retain_semantics Other currentTextContainer)] pub unsafe fn currentTextContainer(&self) -> Option>; - #[method_id(currentParagraphStyle)] + #[method_id(@__retain_semantics Other currentParagraphStyle)] pub unsafe fn currentParagraphStyle(&self) -> Option>; #[method(setHardInvalidation:forGlyphRange:)] @@ -181,10 +181,10 @@ extern_methods!( glyphIndex: NSUInteger, ) -> CGFloat; - #[method_id(sharedSystemTypesetter)] + #[method_id(@__retain_semantics Other sharedSystemTypesetter)] pub unsafe fn sharedSystemTypesetter() -> Id; - #[method_id(sharedSystemTypesetterForBehavior:)] + #[method_id(@__retain_semantics Other sharedSystemTypesetterForBehavior:)] pub unsafe fn sharedSystemTypesetterForBehavior( behavior: NSTypesetterBehavior, ) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSUserActivity.rs b/crates/icrate/src/generated/AppKit/NSUserActivity.rs index 2ba45ebcc..41d54df83 100644 --- a/crates/icrate/src/generated/AppKit/NSUserActivity.rs +++ b/crates/icrate/src/generated/AppKit/NSUserActivity.rs @@ -9,7 +9,7 @@ pub type NSUserActivityRestoring = NSObject; extern_methods!( /// NSUserActivity unsafe impl NSResponder { - #[method_id(userActivity)] + #[method_id(@__retain_semantics Other userActivity)] pub unsafe fn userActivity(&self) -> Option>; #[method(setUserActivity:)] @@ -23,7 +23,7 @@ extern_methods!( extern_methods!( /// NSUserActivity unsafe impl NSDocument { - #[method_id(userActivity)] + #[method_id(@__retain_semantics Other userActivity)] pub unsafe fn userActivity(&self) -> Option>; #[method(setUserActivity:)] diff --git a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs index cbe6ca328..dd3687aae 100644 --- a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs +++ b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs @@ -15,26 +15,26 @@ extern_class!( extern_methods!( unsafe impl NSUserDefaultsController { - #[method_id(sharedUserDefaultsController)] + #[method_id(@__retain_semantics Other sharedUserDefaultsController)] pub unsafe fn sharedUserDefaultsController() -> Id; - #[method_id(initWithDefaults:initialValues:)] + #[method_id(@__retain_semantics Init initWithDefaults:initialValues:)] pub unsafe fn initWithDefaults_initialValues( this: Option>, defaults: Option<&NSUserDefaults>, initialValues: Option<&NSDictionary>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(defaults)] + #[method_id(@__retain_semantics Other defaults)] pub unsafe fn defaults(&self) -> Id; - #[method_id(initialValues)] + #[method_id(@__retain_semantics Other initialValues)] pub unsafe fn initialValues(&self) -> Option, Shared>>; #[method(setInitialValues:)] @@ -52,7 +52,7 @@ extern_methods!( #[method(hasUnappliedChanges)] pub unsafe fn hasUnappliedChanges(&self) -> bool; - #[method_id(values)] + #[method_id(@__retain_semantics Other values)] pub unsafe fn values(&self) -> Id; #[method(revert:)] diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs index dcd95ce09..e9bd7f1eb 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs @@ -15,22 +15,22 @@ extern_class!( extern_methods!( unsafe impl NSUserInterfaceCompressionOptions { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(initWithIdentifier:)] + #[method_id(@__retain_semantics Init initWithIdentifier:)] pub unsafe fn initWithIdentifier( this: Option>, identifier: &NSString, ) -> Id; - #[method_id(initWithCompressionOptions:)] + #[method_id(@__retain_semantics Init initWithCompressionOptions:)] pub unsafe fn initWithCompressionOptions( this: Option>, options: &NSSet, @@ -46,31 +46,31 @@ extern_methods!( #[method(isEmpty)] pub unsafe fn isEmpty(&self) -> bool; - #[method_id(optionsByAddingOptions:)] + #[method_id(@__retain_semantics Other optionsByAddingOptions:)] pub unsafe fn optionsByAddingOptions( &self, options: &NSUserInterfaceCompressionOptions, ) -> Id; - #[method_id(optionsByRemovingOptions:)] + #[method_id(@__retain_semantics Other optionsByRemovingOptions:)] pub unsafe fn optionsByRemovingOptions( &self, options: &NSUserInterfaceCompressionOptions, ) -> Id; - #[method_id(hideImagesOption)] + #[method_id(@__retain_semantics Other hideImagesOption)] pub unsafe fn hideImagesOption() -> Id; - #[method_id(hideTextOption)] + #[method_id(@__retain_semantics Other hideTextOption)] pub unsafe fn hideTextOption() -> Id; - #[method_id(reduceMetricsOption)] + #[method_id(@__retain_semantics Other reduceMetricsOption)] pub unsafe fn reduceMetricsOption() -> Id; - #[method_id(breakEqualWidthsOption)] + #[method_id(@__retain_semantics Other breakEqualWidthsOption)] pub unsafe fn breakEqualWidthsOption() -> Id; - #[method_id(standardOptions)] + #[method_id(@__retain_semantics Other standardOptions)] pub unsafe fn standardOptions() -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index da1963c1b..0f32ee4de 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -55,25 +55,25 @@ extern_class!( extern_methods!( unsafe impl NSView { - #[method_id(initWithFrame:)] + #[method_id(@__retain_semantics Init initWithFrame:)] pub unsafe fn initWithFrame( this: Option>, frameRect: NSRect, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(window)] + #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Option>; - #[method_id(superview)] + #[method_id(@__retain_semantics Other superview)] pub unsafe fn superview(&self) -> Option>; - #[method_id(subviews)] + #[method_id(@__retain_semantics Other subviews)] pub unsafe fn subviews(&self) -> Id, Shared>; #[method(setSubviews:)] @@ -82,10 +82,10 @@ extern_methods!( #[method(isDescendantOf:)] pub unsafe fn isDescendantOf(&self, view: &NSView) -> bool; - #[method_id(ancestorSharedWithView:)] + #[method_id(@__retain_semantics Other ancestorSharedWithView:)] pub unsafe fn ancestorSharedWithView(&self, view: &NSView) -> Option>; - #[method_id(opaqueAncestor)] + #[method_id(@__retain_semantics Other opaqueAncestor)] pub unsafe fn opaqueAncestor(&self) -> Option>; #[method(isHidden)] @@ -352,7 +352,7 @@ extern_methods!( #[method(lockFocusIfCanDrawInContext:)] pub unsafe fn lockFocusIfCanDrawInContext(&self, context: &NSGraphicsContext) -> bool; - #[method_id(focusView)] + #[method_id(@__retain_semantics Other focusView)] pub unsafe fn focusView() -> Option>; #[method(visibleRect)] @@ -389,7 +389,7 @@ extern_methods!( context: &NSGraphicsContext, ); - #[method_id(bitmapImageRepForCachingDisplayInRect:)] + #[method_id(@__retain_semantics Other bitmapImageRepForCachingDisplayInRect:)] pub unsafe fn bitmapImageRepForCachingDisplayInRect( &self, rect: NSRect, @@ -423,13 +423,13 @@ extern_methods!( #[method(translateRectsNeedingDisplayInRect:by:)] pub unsafe fn translateRectsNeedingDisplayInRect_by(&self, clipRect: NSRect, delta: NSSize); - #[method_id(hitTest:)] + #[method_id(@__retain_semantics Other hitTest:)] pub unsafe fn hitTest(&self, point: NSPoint) -> Option>; #[method(mouse:inRect:)] pub unsafe fn mouse_inRect(&self, point: NSPoint, rect: NSRect) -> bool; - #[method_id(viewWithTag:)] + #[method_id(@__retain_semantics Other viewWithTag:)] pub unsafe fn viewWithTag(&self, tag: NSInteger) -> Option>; #[method(tag)] @@ -486,7 +486,7 @@ extern_methods!( #[method(removeTrackingRect:)] pub unsafe fn removeTrackingRect(&self, tag: NSTrackingRectTag); - #[method_id(makeBackingLayer)] + #[method_id(@__retain_semantics Other makeBackingLayer)] pub unsafe fn makeBackingLayer(&self) -> Id; #[method(layerContentsRedrawPolicy)] @@ -513,7 +513,7 @@ extern_methods!( #[method(setWantsLayer:)] pub unsafe fn setWantsLayer(&self, wantsLayer: bool); - #[method_id(layer)] + #[method_id(@__retain_semantics Other layer)] pub unsafe fn layer(&self) -> Option>; #[method(setLayer:)] @@ -555,25 +555,25 @@ extern_methods!( #[method(setLayerUsesCoreImageFilters:)] pub unsafe fn setLayerUsesCoreImageFilters(&self, layerUsesCoreImageFilters: bool); - #[method_id(backgroundFilters)] + #[method_id(@__retain_semantics Other backgroundFilters)] pub unsafe fn backgroundFilters(&self) -> Id, Shared>; #[method(setBackgroundFilters:)] pub unsafe fn setBackgroundFilters(&self, backgroundFilters: &NSArray); - #[method_id(compositingFilter)] + #[method_id(@__retain_semantics Other compositingFilter)] pub unsafe fn compositingFilter(&self) -> Option>; #[method(setCompositingFilter:)] pub unsafe fn setCompositingFilter(&self, compositingFilter: Option<&CIFilter>); - #[method_id(contentFilters)] + #[method_id(@__retain_semantics Other contentFilters)] pub unsafe fn contentFilters(&self) -> Id, Shared>; #[method(setContentFilters:)] pub unsafe fn setContentFilters(&self, contentFilters: &NSArray); - #[method_id(shadow)] + #[method_id(@__retain_semantics Other shadow)] pub unsafe fn shadow(&self) -> Option>; #[method(setShadow:)] @@ -585,7 +585,7 @@ extern_methods!( #[method(removeTrackingArea:)] pub unsafe fn removeTrackingArea(&self, trackingArea: &NSTrackingArea); - #[method_id(trackingAreas)] + #[method_id(@__retain_semantics Other trackingAreas)] pub unsafe fn trackingAreas(&self) -> Id, Shared>; #[method(updateTrackingAreas)] @@ -600,13 +600,13 @@ extern_methods!( postsBoundsChangedNotifications: bool, ); - #[method_id(enclosingScrollView)] + #[method_id(@__retain_semantics Other enclosingScrollView)] pub unsafe fn enclosingScrollView(&self) -> Option>; - #[method_id(menuForEvent:)] + #[method_id(@__retain_semantics Other menuForEvent:)] pub unsafe fn menuForEvent(&self, event: &NSEvent) -> Option>; - #[method_id(defaultMenu)] + #[method_id(@__retain_semantics Other defaultMenu)] pub unsafe fn defaultMenu() -> Option>; #[method(willOpenMenu:withEvent:)] @@ -615,7 +615,7 @@ extern_methods!( #[method(didCloseMenu:withEvent:)] pub unsafe fn didCloseMenu_withEvent(&self, menu: &NSMenu, event: Option<&NSEvent>); - #[method_id(toolTip)] + #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Option>; #[method(setToolTip:)] @@ -657,7 +657,7 @@ extern_methods!( count: NonNull, ); - #[method_id(inputContext)] + #[method_id(@__retain_semantics Other inputContext)] pub unsafe fn inputContext(&self) -> Option>; #[method(rectForSmartMagnificationAtPoint:inRect:)] @@ -719,7 +719,7 @@ pub type NSViewToolTipOwner = NSObject; extern_methods!( /// NSToolTipOwner unsafe impl NSObject { - #[method_id(view:stringForToolTip:point:userData:)] + #[method_id(@__retain_semantics Other view:stringForToolTip:point:userData:)] pub unsafe fn view_stringForToolTip_point_userData( &self, view: &NSView, @@ -733,19 +733,19 @@ extern_methods!( extern_methods!( /// NSKeyboardUI unsafe impl NSView { - #[method_id(nextKeyView)] + #[method_id(@__retain_semantics Other nextKeyView)] pub unsafe fn nextKeyView(&self) -> Option>; #[method(setNextKeyView:)] pub unsafe fn setNextKeyView(&self, nextKeyView: Option<&NSView>); - #[method_id(previousKeyView)] + #[method_id(@__retain_semantics Other previousKeyView)] pub unsafe fn previousKeyView(&self) -> Option>; - #[method_id(nextValidKeyView)] + #[method_id(@__retain_semantics Other nextValidKeyView)] pub unsafe fn nextValidKeyView(&self) -> Option>; - #[method_id(previousValidKeyView)] + #[method_id(@__retain_semantics Other previousValidKeyView)] pub unsafe fn previousValidKeyView(&self) -> Option>; #[method(canBecomeKeyView)] @@ -784,7 +784,7 @@ extern_methods!( pasteboard: &NSPasteboard, ); - #[method_id(dataWithEPSInsideRect:)] + #[method_id(@__retain_semantics Other dataWithEPSInsideRect:)] pub unsafe fn dataWithEPSInsideRect(&self, rect: NSRect) -> Id; #[method(writePDFInsideRect:toPasteboard:)] @@ -794,7 +794,7 @@ extern_methods!( pasteboard: &NSPasteboard, ); - #[method_id(dataWithPDFInsideRect:)] + #[method_id(@__retain_semantics Other dataWithPDFInsideRect:)] pub unsafe fn dataWithPDFInsideRect(&self, rect: NSRect) -> Id; #[method(print:)] @@ -836,16 +836,16 @@ extern_methods!( #[method(drawPageBorderWithSize:)] pub unsafe fn drawPageBorderWithSize(&self, borderSize: NSSize); - #[method_id(pageHeader)] + #[method_id(@__retain_semantics Other pageHeader)] pub unsafe fn pageHeader(&self) -> Id; - #[method_id(pageFooter)] + #[method_id(@__retain_semantics Other pageFooter)] pub unsafe fn pageFooter(&self) -> Id; #[method(drawSheetBorderWithSize:)] pub unsafe fn drawSheetBorderWithSize(&self, borderSize: NSSize); - #[method_id(printJobTitle)] + #[method_id(@__retain_semantics Other printJobTitle)] pub unsafe fn printJobTitle(&self) -> Id; #[method(beginDocument)] @@ -865,7 +865,7 @@ extern_methods!( extern_methods!( /// NSDrag unsafe impl NSView { - #[method_id(beginDraggingSessionWithItems:event:source:)] + #[method_id(@__retain_semantics Other beginDraggingSessionWithItems:event:source:)] pub unsafe fn beginDraggingSessionWithItems_event_source( &self, items: &NSArray, @@ -873,7 +873,7 @@ extern_methods!( source: &NSDraggingSource, ) -> Id; - #[method_id(registeredDraggedTypes)] + #[method_id(@__retain_semantics Other registeredDraggedTypes)] pub unsafe fn registeredDraggedTypes(&self) -> Id, Shared>; #[method(registerForDraggedTypes:)] @@ -973,7 +973,7 @@ extern_methods!( extern_methods!( /// NSGestureRecognizer unsafe impl NSView { - #[method_id(gestureRecognizers)] + #[method_id(@__retain_semantics Other gestureRecognizers)] pub unsafe fn gestureRecognizers(&self) -> Id, Shared>; #[method(setGestureRecognizers:)] @@ -1013,13 +1013,13 @@ extern_methods!( #[method(setAdditionalSafeAreaInsets:)] pub unsafe fn setAdditionalSafeAreaInsets(&self, additionalSafeAreaInsets: NSEdgeInsets); - #[method_id(safeAreaLayoutGuide)] + #[method_id(@__retain_semantics Other safeAreaLayoutGuide)] pub unsafe fn safeAreaLayoutGuide(&self) -> Id; #[method(safeAreaRect)] pub unsafe fn safeAreaRect(&self) -> NSRect; - #[method_id(layoutMarginsGuide)] + #[method_id(@__retain_semantics Other layoutMarginsGuide)] pub unsafe fn layoutMarginsGuide(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index 1c2fc13a9..f83faba4d 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -27,38 +27,38 @@ extern_class!( extern_methods!( unsafe impl NSViewController { - #[method_id(initWithNibName:bundle:)] + #[method_id(@__retain_semantics Init initWithNibName:bundle:)] pub unsafe fn initWithNibName_bundle( this: Option>, nibNameOrNil: Option<&NSNibName>, nibBundleOrNil: Option<&NSBundle>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(nibName)] + #[method_id(@__retain_semantics Other nibName)] pub unsafe fn nibName(&self) -> Option>; - #[method_id(nibBundle)] + #[method_id(@__retain_semantics Other nibBundle)] pub unsafe fn nibBundle(&self) -> Option>; - #[method_id(representedObject)] + #[method_id(@__retain_semantics Other representedObject)] pub unsafe fn representedObject(&self) -> Option>; #[method(setRepresentedObject:)] pub unsafe fn setRepresentedObject(&self, representedObject: Option<&Object>); - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); - #[method_id(view)] + #[method_id(@__retain_semantics Other view)] pub unsafe fn view(&self) -> Id; #[method(setView:)] @@ -132,12 +132,12 @@ extern_methods!( #[method(dismissController:)] pub unsafe fn dismissController(&self, sender: Option<&Object>); - #[method_id(presentedViewControllers)] + #[method_id(@__retain_semantics Other presentedViewControllers)] pub unsafe fn presentedViewControllers( &self, ) -> Option, Shared>>; - #[method_id(presentingViewController)] + #[method_id(@__retain_semantics Other presentingViewController)] pub unsafe fn presentingViewController(&self) -> Option>; } ); @@ -175,10 +175,10 @@ extern_methods!( extern_methods!( /// NSViewControllerContainer unsafe impl NSViewController { - #[method_id(parentViewController)] + #[method_id(@__retain_semantics Other parentViewController)] pub unsafe fn parentViewController(&self) -> Option>; - #[method_id(childViewControllers)] + #[method_id(@__retain_semantics Other childViewControllers)] pub unsafe fn childViewControllers(&self) -> Id, Shared>; #[method(setChildViewControllers:)] @@ -219,7 +219,7 @@ pub type NSViewControllerPresentationAnimator = NSObject; extern_methods!( /// NSViewControllerStoryboardingMethods unsafe impl NSViewController { - #[method_id(storyboard)] + #[method_id(@__retain_semantics Other storyboard)] pub unsafe fn storyboard(&self) -> Option>; } ); @@ -227,10 +227,10 @@ extern_methods!( extern_methods!( /// NSExtensionAdditions unsafe impl NSViewController { - #[method_id(extensionContext)] + #[method_id(@__retain_semantics Other extensionContext)] pub unsafe fn extensionContext(&self) -> Option>; - #[method_id(sourceItemView)] + #[method_id(@__retain_semantics Other sourceItemView)] pub unsafe fn sourceItemView(&self) -> Option>; #[method(setSourceItemView:)] diff --git a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs index d3a239e85..84e7b4160 100644 --- a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs +++ b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs @@ -66,7 +66,7 @@ extern_methods!( #[method(setState:)] pub unsafe fn setState(&self, state: NSVisualEffectState); - #[method_id(maskImage)] + #[method_id(@__retain_semantics Other maskImage)] pub unsafe fn maskImage(&self) -> Option>; #[method(setMaskImage:)] diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index f585269ce..d2852b0fb 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -170,7 +170,7 @@ extern_methods!( #[method(contentRectForFrameRect:)] pub unsafe fn contentRectForFrameRect(&self, frameRect: NSRect) -> NSRect; - #[method_id(initWithContentRect:styleMask:backing:defer:)] + #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:)] pub unsafe fn initWithContentRect_styleMask_backing_defer( this: Option>, contentRect: NSRect, @@ -179,7 +179,7 @@ extern_methods!( flag: bool, ) -> Id; - #[method_id(initWithContentRect:styleMask:backing:defer:screen:)] + #[method_id(@__retain_semantics Init initWithContentRect:styleMask:backing:defer:screen:)] pub unsafe fn initWithContentRect_styleMask_backing_defer_screen( this: Option>, contentRect: NSRect, @@ -189,19 +189,19 @@ extern_methods!( screen: Option<&NSScreen>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: &NSString); - #[method_id(subtitle)] + #[method_id(@__retain_semantics Other subtitle)] pub unsafe fn subtitle(&self) -> Id; #[method(setSubtitle:)] @@ -228,10 +228,10 @@ extern_methods!( #[method(contentLayoutRect)] pub unsafe fn contentLayoutRect(&self) -> NSRect; - #[method_id(contentLayoutGuide)] + #[method_id(@__retain_semantics Other contentLayoutGuide)] pub unsafe fn contentLayoutGuide(&self) -> Option>; - #[method_id(titlebarAccessoryViewControllers)] + #[method_id(@__retain_semantics Other titlebarAccessoryViewControllers)] pub unsafe fn titlebarAccessoryViewControllers( &self, ) -> Id, Shared>; @@ -258,13 +258,13 @@ extern_methods!( #[method(removeTitlebarAccessoryViewControllerAtIndex:)] pub unsafe fn removeTitlebarAccessoryViewControllerAtIndex(&self, index: NSInteger); - #[method_id(representedURL)] + #[method_id(@__retain_semantics Other representedURL)] pub unsafe fn representedURL(&self) -> Option>; #[method(setRepresentedURL:)] pub unsafe fn setRepresentedURL(&self, representedURL: Option<&NSURL>); - #[method_id(representedFilename)] + #[method_id(@__retain_semantics Other representedFilename)] pub unsafe fn representedFilename(&self) -> Id; #[method(setRepresentedFilename:)] @@ -279,13 +279,13 @@ extern_methods!( #[method(setExcludedFromWindowsMenu:)] pub unsafe fn setExcludedFromWindowsMenu(&self, excludedFromWindowsMenu: bool); - #[method_id(contentView)] + #[method_id(@__retain_semantics Other contentView)] pub unsafe fn contentView(&self) -> Option>; #[method(setContentView:)] pub unsafe fn setContentView(&self, contentView: Option<&NSView>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -300,7 +300,7 @@ extern_methods!( #[method(setStyleMask:)] pub unsafe fn setStyleMask(&self, styleMask: NSWindowStyleMask); - #[method_id(fieldEditor:forObject:)] + #[method_id(@__retain_semantics Other fieldEditor:forObject:)] pub unsafe fn fieldEditor_forObject( &self, createFlag: bool, @@ -400,7 +400,7 @@ extern_methods!( #[method(makeFirstResponder:)] pub unsafe fn makeFirstResponder(&self, responder: Option<&NSResponder>) -> bool; - #[method_id(firstResponder)] + #[method_id(@__retain_semantics Other firstResponder)] pub unsafe fn firstResponder(&self) -> Option>; #[method(resizeFlags)] @@ -433,14 +433,14 @@ extern_methods!( #[method(tryToPerform:with:)] pub unsafe fn tryToPerform_with(&self, action: Sel, object: Option<&Object>) -> bool; - #[method_id(validRequestorForSendType:returnType:)] + #[method_id(@__retain_semantics Other validRequestorForSendType:returnType:)] pub unsafe fn validRequestorForSendType_returnType( &self, sendType: Option<&NSPasteboardType>, returnType: Option<&NSPasteboardType>, ) -> Option>; - #[method_id(backgroundColor)] + #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Id; #[method(setBackgroundColor:)] @@ -518,19 +518,19 @@ extern_methods!( #[method(orderFrontRegardless)] pub unsafe fn orderFrontRegardless(&self); - #[method_id(miniwindowImage)] + #[method_id(@__retain_semantics Other miniwindowImage)] pub unsafe fn miniwindowImage(&self) -> Option>; #[method(setMiniwindowImage:)] pub unsafe fn setMiniwindowImage(&self, miniwindowImage: Option<&NSImage>); - #[method_id(miniwindowTitle)] + #[method_id(@__retain_semantics Other miniwindowTitle)] pub unsafe fn miniwindowTitle(&self) -> Id; #[method(setMiniwindowTitle:)] pub unsafe fn setMiniwindowTitle(&self, miniwindowTitle: Option<&NSString>); - #[method_id(dockTile)] + #[method_id(@__retain_semantics Other dockTile)] pub unsafe fn dockTile(&self) -> Id; #[method(isDocumentEdited)] @@ -627,10 +627,10 @@ extern_methods!( #[method(performZoom:)] pub unsafe fn performZoom(&self, sender: Option<&Object>); - #[method_id(dataWithEPSInsideRect:)] + #[method_id(@__retain_semantics Other dataWithEPSInsideRect:)] pub unsafe fn dataWithEPSInsideRect(&self, rect: NSRect) -> Id; - #[method_id(dataWithPDFInsideRect:)] + #[method_id(@__retain_semantics Other dataWithPDFInsideRect:)] pub unsafe fn dataWithPDFInsideRect(&self, rect: NSRect) -> Id; #[method(print:)] @@ -669,10 +669,10 @@ extern_methods!( #[method(hasDynamicDepthLimit)] pub unsafe fn hasDynamicDepthLimit(&self) -> bool; - #[method_id(screen)] + #[method_id(@__retain_semantics Other screen)] pub unsafe fn screen(&self) -> Option>; - #[method_id(deepestScreen)] + #[method_id(@__retain_semantics Other deepestScreen)] pub unsafe fn deepestScreen(&self) -> Option>; #[method(hasShadow)] @@ -744,7 +744,7 @@ extern_methods!( #[method(toggleFullScreen:)] pub unsafe fn toggleFullScreen(&self, sender: Option<&Object>); - #[method_id(stringWithSavedFrame)] + #[method_id(@__retain_semantics Other stringWithSavedFrame)] pub unsafe fn stringWithSavedFrame(&self) -> Id; @@ -767,7 +767,7 @@ extern_methods!( #[method(setFrameAutosaveName:)] pub unsafe fn setFrameAutosaveName(&self, name: &NSWindowFrameAutosaveName) -> bool; - #[method_id(frameAutosaveName)] + #[method_id(@__retain_semantics Other frameAutosaveName)] pub unsafe fn frameAutosaveName(&self) -> Id; #[method(removeFrameUsingName:)] @@ -809,12 +809,12 @@ extern_methods!( #[method(setMaxFullScreenContentSize:)] pub unsafe fn setMaxFullScreenContentSize(&self, maxFullScreenContentSize: NSSize); - #[method_id(deviceDescription)] + #[method_id(@__retain_semantics Other deviceDescription)] pub unsafe fn deviceDescription( &self, ) -> Id, Shared>; - #[method_id(windowController)] + #[method_id(@__retain_semantics Other windowController)] pub unsafe fn windowController(&self) -> Option>; #[method(setWindowController:)] @@ -844,25 +844,25 @@ extern_methods!( returnCode: NSModalResponse, ); - #[method_id(sheets)] + #[method_id(@__retain_semantics Other sheets)] pub unsafe fn sheets(&self) -> Id, Shared>; - #[method_id(attachedSheet)] + #[method_id(@__retain_semantics Other attachedSheet)] pub unsafe fn attachedSheet(&self) -> Option>; #[method(isSheet)] pub unsafe fn isSheet(&self) -> bool; - #[method_id(sheetParent)] + #[method_id(@__retain_semantics Other sheetParent)] pub unsafe fn sheetParent(&self) -> Option>; - #[method_id(standardWindowButton:forStyleMask:)] + #[method_id(@__retain_semantics Other standardWindowButton:forStyleMask:)] pub unsafe fn standardWindowButton_forStyleMask( b: NSWindowButton, styleMask: NSWindowStyleMask, ) -> Option>; - #[method_id(standardWindowButton:)] + #[method_id(@__retain_semantics Other standardWindowButton:)] pub unsafe fn standardWindowButton( &self, b: NSWindowButton, @@ -878,22 +878,22 @@ extern_methods!( #[method(removeChildWindow:)] pub unsafe fn removeChildWindow(&self, childWin: &NSWindow); - #[method_id(childWindows)] + #[method_id(@__retain_semantics Other childWindows)] pub unsafe fn childWindows(&self) -> Option, Shared>>; - #[method_id(parentWindow)] + #[method_id(@__retain_semantics Other parentWindow)] pub unsafe fn parentWindow(&self) -> Option>; #[method(setParentWindow:)] pub unsafe fn setParentWindow(&self, parentWindow: Option<&NSWindow>); - #[method_id(appearanceSource)] + #[method_id(@__retain_semantics Other appearanceSource)] pub unsafe fn appearanceSource(&self) -> Option>; #[method(setAppearanceSource:)] pub unsafe fn setAppearanceSource(&self, appearanceSource: Option<&TodoProtocols>); - #[method_id(colorSpace)] + #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Option>; #[method(setColorSpace:)] @@ -902,7 +902,7 @@ extern_methods!( #[method(canRepresentDisplayGamut:)] pub unsafe fn canRepresentDisplayGamut(&self, displayGamut: NSDisplayGamut) -> bool; - #[method_id(windowNumbersWithOptions:)] + #[method_id(@__retain_semantics Other windowNumbersWithOptions:)] pub unsafe fn windowNumbersWithOptions( options: NSWindowNumberListOptions, ) -> Option, Shared>>; @@ -925,7 +925,7 @@ extern_methods!( titlebarSeparatorStyle: NSTitlebarSeparatorStyle, ); - #[method_id(contentViewController)] + #[method_id(@__retain_semantics Other contentViewController)] pub unsafe fn contentViewController(&self) -> Option>; #[method(setContentViewController:)] @@ -934,7 +934,7 @@ extern_methods!( contentViewController: Option<&NSViewController>, ); - #[method_id(windowWithContentViewController:)] + #[method_id(@__retain_semantics Other windowWithContentViewController:)] pub unsafe fn windowWithContentViewController( contentViewController: &NSViewController, ) -> Id; @@ -942,7 +942,7 @@ extern_methods!( #[method(performWindowDragWithEvent:)] pub unsafe fn performWindowDragWithEvent(&self, event: &NSEvent); - #[method_id(initialFirstResponder)] + #[method_id(@__retain_semantics Other initialFirstResponder)] pub unsafe fn initialFirstResponder(&self) -> Option>; #[method(setInitialFirstResponder:)] @@ -963,7 +963,7 @@ extern_methods!( #[method(keyViewSelectionDirection)] pub unsafe fn keyViewSelectionDirection(&self) -> NSSelectionDirection; - #[method_id(defaultButtonCell)] + #[method_id(@__retain_semantics Other defaultButtonCell)] pub unsafe fn defaultButtonCell(&self) -> Option>; #[method(setDefaultButtonCell:)] @@ -984,7 +984,7 @@ extern_methods!( #[method(recalculateKeyViewLoop)] pub unsafe fn recalculateKeyViewLoop(&self); - #[method_id(toolbar)] + #[method_id(@__retain_semantics Other toolbar)] pub unsafe fn toolbar(&self) -> Option>; #[method(setToolbar:)] @@ -1017,7 +1017,7 @@ extern_methods!( #[method(setTabbingMode:)] pub unsafe fn setTabbingMode(&self, tabbingMode: NSWindowTabbingMode); - #[method_id(tabbingIdentifier)] + #[method_id(@__retain_semantics Other tabbingIdentifier)] pub unsafe fn tabbingIdentifier(&self) -> Id; #[method(setTabbingIdentifier:)] @@ -1041,7 +1041,7 @@ extern_methods!( #[method(toggleTabOverview:)] pub unsafe fn toggleTabOverview(&self, sender: Option<&Object>); - #[method_id(tabbedWindows)] + #[method_id(@__retain_semantics Other tabbedWindows)] pub unsafe fn tabbedWindows(&self) -> Option, Shared>>; #[method(addTabbedWindow:ordered:)] @@ -1051,10 +1051,10 @@ extern_methods!( ordered: NSWindowOrderingMode, ); - #[method_id(tab)] + #[method_id(@__retain_semantics Other tab)] pub unsafe fn tab(&self) -> Id; - #[method_id(tabGroup)] + #[method_id(@__retain_semantics Other tabGroup)] pub unsafe fn tabGroup(&self) -> Option>; #[method(windowTitlebarLayoutDirection)] @@ -1074,13 +1074,13 @@ extern_methods!( trackingHandler: TodoBlock, ); - #[method_id(nextEventMatchingMask:)] + #[method_id(@__retain_semantics Other nextEventMatchingMask:)] pub unsafe fn nextEventMatchingMask( &self, mask: NSEventMask, ) -> Option>; - #[method_id(nextEventMatchingMask:untilDate:inMode:dequeue:)] + #[method_id(@__retain_semantics Other nextEventMatchingMask:untilDate:inMode:dequeue:)] pub unsafe fn nextEventMatchingMask_untilDate_inMode_dequeue( &self, mask: NSEventMask, @@ -1102,7 +1102,7 @@ extern_methods!( #[method(sendEvent:)] pub unsafe fn sendEvent(&self, event: &NSEvent); - #[method_id(currentEvent)] + #[method_id(@__retain_semantics Other currentEvent)] pub unsafe fn currentEvent(&self) -> Option>; #[method(acceptsMouseMovedEvents)] @@ -1171,7 +1171,7 @@ extern_methods!( extern_methods!( /// NSCarbonExtensions unsafe impl NSWindow { - #[method_id(initWithWindowRef:)] + #[method_id(@__retain_semantics Init initWithWindowRef:)] pub unsafe fn initWithWindowRef( this: Option>, windowRef: NonNull, @@ -1367,7 +1367,7 @@ extern_methods!( #[method(setAutodisplay:)] pub unsafe fn setAutodisplay(&self, autodisplay: bool); - #[method_id(graphicsContext)] + #[method_id(@__retain_semantics Other graphicsContext)] pub unsafe fn graphicsContext(&self) -> Option>; #[method(isOneShot)] diff --git a/crates/icrate/src/generated/AppKit/NSWindowController.rs b/crates/icrate/src/generated/AppKit/NSWindowController.rs index 1ef507cb9..211b7d096 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowController.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowController.rs @@ -15,48 +15,48 @@ extern_class!( extern_methods!( unsafe impl NSWindowController { - #[method_id(initWithWindow:)] + #[method_id(@__retain_semantics Init initWithWindow:)] pub unsafe fn initWithWindow( this: Option>, window: Option<&NSWindow>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(initWithWindowNibName:)] + #[method_id(@__retain_semantics Init initWithWindowNibName:)] pub unsafe fn initWithWindowNibName( this: Option>, windowNibName: &NSNibName, ) -> Id; - #[method_id(initWithWindowNibName:owner:)] + #[method_id(@__retain_semantics Init initWithWindowNibName:owner:)] pub unsafe fn initWithWindowNibName_owner( this: Option>, windowNibName: &NSNibName, owner: &Object, ) -> Id; - #[method_id(initWithWindowNibPath:owner:)] + #[method_id(@__retain_semantics Init initWithWindowNibPath:owner:)] pub unsafe fn initWithWindowNibPath_owner( this: Option>, windowNibPath: &NSString, owner: &Object, ) -> Id; - #[method_id(windowNibName)] + #[method_id(@__retain_semantics Other windowNibName)] pub unsafe fn windowNibName(&self) -> Option>; - #[method_id(windowNibPath)] + #[method_id(@__retain_semantics Other windowNibPath)] pub unsafe fn windowNibPath(&self) -> Option>; - #[method_id(owner)] + #[method_id(@__retain_semantics Other owner)] pub unsafe fn owner(&self) -> Option>; - #[method_id(windowFrameAutosaveName)] + #[method_id(@__retain_semantics Other windowFrameAutosaveName)] pub unsafe fn windowFrameAutosaveName(&self) -> Id; #[method(setWindowFrameAutosaveName:)] @@ -71,7 +71,7 @@ extern_methods!( #[method(setShouldCascadeWindows:)] pub unsafe fn setShouldCascadeWindows(&self, shouldCascadeWindows: bool); - #[method_id(document)] + #[method_id(@__retain_semantics Other document)] pub unsafe fn document(&self) -> Option>; #[method(setDocument:)] @@ -89,13 +89,13 @@ extern_methods!( #[method(synchronizeWindowTitleWithDocumentName)] pub unsafe fn synchronizeWindowTitleWithDocumentName(&self); - #[method_id(windowTitleForDocumentDisplayName:)] + #[method_id(@__retain_semantics Other windowTitleForDocumentDisplayName:)] pub unsafe fn windowTitleForDocumentDisplayName( &self, displayName: &NSString, ) -> Id; - #[method_id(contentViewController)] + #[method_id(@__retain_semantics Other contentViewController)] pub unsafe fn contentViewController(&self) -> Option>; #[method(setContentViewController:)] @@ -104,7 +104,7 @@ extern_methods!( contentViewController: Option<&NSViewController>, ); - #[method_id(window)] + #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Option>; #[method(setWindow:)] @@ -133,7 +133,7 @@ extern_methods!( extern_methods!( /// NSWindowControllerStoryboardingMethods unsafe impl NSWindowController { - #[method_id(storyboard)] + #[method_id(@__retain_semantics Other storyboard)] pub unsafe fn storyboard(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs index 74822fe08..d75175190 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -37,7 +37,7 @@ extern_methods!( #[method(setRestorable:)] pub unsafe fn setRestorable(&self, restorable: bool); - #[method_id(restorationClass)] + #[method_id(@__retain_semantics Other restorationClass)] pub unsafe fn restorationClass(&self) -> Option>; #[method(setRestorationClass:)] @@ -70,10 +70,10 @@ extern_methods!( #[method(invalidateRestorableState)] pub unsafe fn invalidateRestorableState(&self); - #[method_id(restorableStateKeyPaths)] + #[method_id(@__retain_semantics Other restorableStateKeyPaths)] pub unsafe fn restorableStateKeyPaths() -> Id, Shared>; - #[method_id(allowedClassesForRestorableStateKeyPath:)] + #[method_id(@__retain_semantics Other allowedClassesForRestorableStateKeyPath:)] pub unsafe fn allowedClassesForRestorableStateKeyPath( keyPath: &NSString, ) -> Id, Shared>; @@ -118,10 +118,10 @@ extern_methods!( #[method(invalidateRestorableState)] pub unsafe fn invalidateRestorableState(&self); - #[method_id(restorableStateKeyPaths)] + #[method_id(@__retain_semantics Other restorableStateKeyPaths)] pub unsafe fn restorableStateKeyPaths() -> Id, Shared>; - #[method_id(allowedClassesForRestorableStateKeyPath:)] + #[method_id(@__retain_semantics Other allowedClassesForRestorableStateKeyPath:)] pub unsafe fn allowedClassesForRestorableStateKeyPath( keyPath: &NSString, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs index 8bfa52f65..dae19c46c 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs @@ -43,19 +43,19 @@ extern_methods!( #[method(setIsZoomed:)] pub unsafe fn setIsZoomed(&self, flag: bool); - #[method_id(handleCloseScriptCommand:)] + #[method_id(@__retain_semantics Other handleCloseScriptCommand:)] pub unsafe fn handleCloseScriptCommand( &self, command: &NSCloseCommand, ) -> Option>; - #[method_id(handlePrintScriptCommand:)] + #[method_id(@__retain_semantics Other handlePrintScriptCommand:)] pub unsafe fn handlePrintScriptCommand( &self, command: &NSScriptCommand, ) -> Option>; - #[method_id(handleSaveScriptCommand:)] + #[method_id(@__retain_semantics Other handleSaveScriptCommand:)] pub unsafe fn handleSaveScriptCommand( &self, command: &NSScriptCommand, diff --git a/crates/icrate/src/generated/AppKit/NSWindowTab.rs b/crates/icrate/src/generated/AppKit/NSWindowTab.rs index 75b92686e..7a1993883 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowTab.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowTab.rs @@ -15,25 +15,25 @@ extern_class!( extern_methods!( unsafe impl NSWindowTab { - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Id; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); - #[method_id(attributedTitle)] + #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); - #[method_id(toolTip)] + #[method_id(@__retain_semantics Other toolTip)] pub unsafe fn toolTip(&self) -> Id; #[method(setToolTip:)] pub unsafe fn setToolTip(&self, toolTip: Option<&NSString>); - #[method_id(accessoryView)] + #[method_id(@__retain_semantics Other accessoryView)] pub unsafe fn accessoryView(&self) -> Option>; #[method(setAccessoryView:)] diff --git a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs index fde64ec98..c6962e624 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs @@ -15,10 +15,10 @@ extern_class!( extern_methods!( unsafe impl NSWindowTabGroup { - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Id; - #[method_id(windows)] + #[method_id(@__retain_semantics Other windows)] pub unsafe fn windows(&self) -> Id, Shared>; #[method(isOverviewVisible)] @@ -30,7 +30,7 @@ extern_methods!( #[method(isTabBarVisible)] pub unsafe fn isTabBarVisible(&self) -> bool; - #[method_id(selectedWindow)] + #[method_id(@__retain_semantics Other selectedWindow)] pub unsafe fn selectedWindow(&self) -> Option>; #[method(setSelectedWindow:)] diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index c9e8df66a..63b54f58a 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -19,10 +19,10 @@ extern_class!( extern_methods!( unsafe impl NSWorkspace { - #[method_id(sharedWorkspace)] + #[method_id(@__retain_semantics Other sharedWorkspace)] pub unsafe fn sharedWorkspace() -> Id; - #[method_id(notificationCenter)] + #[method_id(@__retain_semantics Other notificationCenter)] pub unsafe fn notificationCenter(&self) -> Id; #[method(openURL:)] @@ -72,16 +72,16 @@ extern_methods!( #[method(isFilePackageAtPath:)] pub unsafe fn isFilePackageAtPath(&self, fullPath: &NSString) -> bool; - #[method_id(iconForFile:)] + #[method_id(@__retain_semantics Other iconForFile:)] pub unsafe fn iconForFile(&self, fullPath: &NSString) -> Id; - #[method_id(iconForFiles:)] + #[method_id(@__retain_semantics Other iconForFiles:)] pub unsafe fn iconForFiles( &self, fullPaths: &NSArray, ) -> Option>; - #[method_id(iconForContentType:)] + #[method_id(@__retain_semantics Other iconForContentType:)] pub unsafe fn iconForContentType(&self, contentType: &UTType) -> Id; #[method(setIcon:forFile:options:)] @@ -92,10 +92,10 @@ extern_methods!( options: NSWorkspaceIconCreationOptions, ) -> bool; - #[method_id(fileLabels)] + #[method_id(@__retain_semantics Other fileLabels)] pub unsafe fn fileLabels(&self) -> Id, Shared>; - #[method_id(fileLabelColors)] + #[method_id(@__retain_semantics Other fileLabelColors)] pub unsafe fn fileLabelColors(&self) -> Id, Shared>; #[method(recycleURLs:completionHandler:)] @@ -138,22 +138,22 @@ extern_methods!( #[method(hideOtherApplications)] pub unsafe fn hideOtherApplications(&self); - #[method_id(URLForApplicationWithBundleIdentifier:)] + #[method_id(@__retain_semantics Other URLForApplicationWithBundleIdentifier:)] pub unsafe fn URLForApplicationWithBundleIdentifier( &self, bundleIdentifier: &NSString, ) -> Option>; - #[method_id(URLsForApplicationsWithBundleIdentifier:)] + #[method_id(@__retain_semantics Other URLsForApplicationsWithBundleIdentifier:)] pub unsafe fn URLsForApplicationsWithBundleIdentifier( &self, bundleIdentifier: &NSString, ) -> Id, Shared>; - #[method_id(URLForApplicationToOpenURL:)] + #[method_id(@__retain_semantics Other URLForApplicationToOpenURL:)] pub unsafe fn URLForApplicationToOpenURL(&self, url: &NSURL) -> Option>; - #[method_id(URLsForApplicationsToOpenURL:)] + #[method_id(@__retain_semantics Other URLsForApplicationsToOpenURL:)] pub unsafe fn URLsForApplicationsToOpenURL( &self, url: &NSURL, @@ -183,13 +183,13 @@ extern_methods!( completionHandler: TodoBlock, ); - #[method_id(URLForApplicationToOpenContentType:)] + #[method_id(@__retain_semantics Other URLForApplicationToOpenContentType:)] pub unsafe fn URLForApplicationToOpenContentType( &self, contentType: &UTType, ) -> Option>; - #[method_id(URLsForApplicationsToOpenContentType:)] + #[method_id(@__retain_semantics Other URLsForApplicationsToOpenContentType:)] pub unsafe fn URLsForApplicationsToOpenContentType( &self, contentType: &UTType, @@ -203,10 +203,10 @@ extern_methods!( completionHandler: TodoBlock, ); - #[method_id(frontmostApplication)] + #[method_id(@__retain_semantics Other frontmostApplication)] pub unsafe fn frontmostApplication(&self) -> Option>; - #[method_id(menuBarOwningApplication)] + #[method_id(@__retain_semantics Other menuBarOwningApplication)] pub unsafe fn menuBarOwningApplication(&self) -> Option>; } ); @@ -222,7 +222,7 @@ extern_class!( extern_methods!( unsafe impl NSWorkspaceOpenConfiguration { - #[method_id(configuration)] + #[method_id(@__retain_semantics Other configuration)] pub unsafe fn configuration() -> Id; #[method(promptsUserIfNeeded)] @@ -276,19 +276,19 @@ extern_methods!( allowsRunningApplicationSubstitution: bool, ); - #[method_id(arguments)] + #[method_id(@__retain_semantics Other arguments)] pub unsafe fn arguments(&self) -> Id, Shared>; #[method(setArguments:)] pub unsafe fn setArguments(&self, arguments: &NSArray); - #[method_id(environment)] + #[method_id(@__retain_semantics Other environment)] pub unsafe fn environment(&self) -> Id, Shared>; #[method(setEnvironment:)] pub unsafe fn setEnvironment(&self, environment: &NSDictionary); - #[method_id(appleEvent)] + #[method_id(@__retain_semantics Other appleEvent)] pub unsafe fn appleEvent(&self) -> Option>; #[method(setAppleEvent:)] @@ -333,13 +333,13 @@ extern_methods!( options: &NSDictionary, ) -> Result<(), Id>; - #[method_id(desktopImageURLForScreen:)] + #[method_id(@__retain_semantics Other desktopImageURLForScreen:)] pub unsafe fn desktopImageURLForScreen( &self, screen: &NSScreen, ) -> Option>; - #[method_id(desktopImageOptionsForScreen:)] + #[method_id(@__retain_semantics Other desktopImageOptionsForScreen:)] pub unsafe fn desktopImageOptionsForScreen( &self, screen: &NSScreen, @@ -380,7 +380,7 @@ extern_methods!( extern_methods!( /// NSWorkspaceAuthorization unsafe impl NSFileManager { - #[method_id(fileManagerWithAuthorization:)] + #[method_id(@__retain_semantics Other fileManagerWithAuthorization:)] pub unsafe fn fileManagerWithAuthorization( authorization: &NSWorkspaceAuthorization, ) -> Id; @@ -547,7 +547,7 @@ extern_methods!( #[method(launchApplication:)] pub unsafe fn launchApplication(&self, appName: &NSString) -> bool; - #[method_id(launchApplicationAtURL:options:configuration:error:)] + #[method_id(@__retain_semantics Other launchApplicationAtURL:options:configuration:error:)] pub unsafe fn launchApplicationAtURL_options_configuration_error( &self, url: &NSURL, @@ -555,7 +555,7 @@ extern_methods!( configuration: &NSDictionary, ) -> Result, Id>; - #[method_id(openURL:options:configuration:error:)] + #[method_id(@__retain_semantics Other openURL:options:configuration:error:)] pub unsafe fn openURL_options_configuration_error( &self, url: &NSURL, @@ -563,7 +563,7 @@ extern_methods!( configuration: &NSDictionary, ) -> Result, Id>; - #[method_id(openURLs:withApplicationAtURL:options:configuration:error:)] + #[method_id(@__retain_semantics Other openURLs:withApplicationAtURL:options:configuration:error:)] pub unsafe fn openURLs_withApplicationAtURL_options_configuration_error( &self, urls: &NSArray, @@ -580,13 +580,13 @@ extern_methods!( autolaunch: bool, ) -> bool; - #[method_id(fullPathForApplication:)] + #[method_id(@__retain_semantics Other fullPathForApplication:)] pub unsafe fn fullPathForApplication( &self, appName: &NSString, ) -> Option>; - #[method_id(absolutePathForAppBundleWithIdentifier:)] + #[method_id(@__retain_semantics Other absolutePathForAppBundleWithIdentifier:)] pub unsafe fn absolutePathForAppBundleWithIdentifier( &self, bundleIdentifier: &NSString, @@ -640,19 +640,19 @@ extern_methods!( #[method(userDefaultsChanged)] pub unsafe fn userDefaultsChanged(&self) -> bool; - #[method_id(mountNewRemovableMedia)] + #[method_id(@__retain_semantics Other mountNewRemovableMedia)] pub unsafe fn mountNewRemovableMedia(&self) -> Option>; - #[method_id(activeApplication)] + #[method_id(@__retain_semantics Other activeApplication)] pub unsafe fn activeApplication(&self) -> Option>; - #[method_id(mountedLocalVolumePaths)] + #[method_id(@__retain_semantics Other mountedLocalVolumePaths)] pub unsafe fn mountedLocalVolumePaths(&self) -> Option>; - #[method_id(mountedRemovableMedia)] + #[method_id(@__retain_semantics Other mountedRemovableMedia)] pub unsafe fn mountedRemovableMedia(&self) -> Option>; - #[method_id(launchedApplications)] + #[method_id(@__retain_semantics Other launchedApplications)] pub unsafe fn launchedApplications(&self) -> Option>; #[method(openFile:fromImage:at:inView:)] @@ -682,22 +682,22 @@ extern_methods!( type_: Option<&mut Option>>, ) -> bool; - #[method_id(iconForFileType:)] + #[method_id(@__retain_semantics Other iconForFileType:)] pub unsafe fn iconForFileType(&self, fileType: &NSString) -> Id; - #[method_id(typeOfFile:error:)] + #[method_id(@__retain_semantics Other typeOfFile:error:)] pub unsafe fn typeOfFile_error( &self, absoluteFilePath: &NSString, ) -> Result, Id>; - #[method_id(localizedDescriptionForType:)] + #[method_id(@__retain_semantics Other localizedDescriptionForType:)] pub unsafe fn localizedDescriptionForType( &self, typeName: &NSString, ) -> Option>; - #[method_id(preferredFilenameExtensionForType:)] + #[method_id(@__retain_semantics Other preferredFilenameExtensionForType:)] pub unsafe fn preferredFilenameExtensionForType( &self, typeName: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index c7239a3b1..0435c9895 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -14,16 +14,16 @@ extern_class!( extern_methods!( unsafe impl NSAffineTransform { - #[method_id(transform)] + #[method_id(@__retain_semantics Other transform)] pub unsafe fn transform() -> Id; - #[method_id(initWithTransform:)] + #[method_id(@__retain_semantics Init initWithTransform:)] pub unsafe fn initWithTransform( this: Option>, transform: &NSAffineTransform, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[method(translateXBy:yBy:)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index f7e09fe7d..324ae2681 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -29,55 +29,55 @@ extern_class!( extern_methods!( unsafe impl NSAppleEventDescriptor { - #[method_id(nullDescriptor)] + #[method_id(@__retain_semantics Other nullDescriptor)] pub unsafe fn nullDescriptor() -> Id; - #[method_id(descriptorWithDescriptorType:bytes:length:)] + #[method_id(@__retain_semantics Other descriptorWithDescriptorType:bytes:length:)] pub unsafe fn descriptorWithDescriptorType_bytes_length( descriptorType: DescType, bytes: *mut c_void, byteCount: NSUInteger, ) -> Option>; - #[method_id(descriptorWithDescriptorType:data:)] + #[method_id(@__retain_semantics Other descriptorWithDescriptorType:data:)] pub unsafe fn descriptorWithDescriptorType_data( descriptorType: DescType, data: Option<&NSData>, ) -> Option>; - #[method_id(descriptorWithBoolean:)] + #[method_id(@__retain_semantics Other descriptorWithBoolean:)] pub unsafe fn descriptorWithBoolean(boolean: Boolean) -> Id; - #[method_id(descriptorWithEnumCode:)] + #[method_id(@__retain_semantics Other descriptorWithEnumCode:)] pub unsafe fn descriptorWithEnumCode( enumerator: OSType, ) -> Id; - #[method_id(descriptorWithInt32:)] + #[method_id(@__retain_semantics Other descriptorWithInt32:)] pub unsafe fn descriptorWithInt32(signedInt: i32) -> Id; - #[method_id(descriptorWithDouble:)] + #[method_id(@__retain_semantics Other descriptorWithDouble:)] pub unsafe fn descriptorWithDouble( doubleValue: c_double, ) -> Id; - #[method_id(descriptorWithTypeCode:)] + #[method_id(@__retain_semantics Other descriptorWithTypeCode:)] pub unsafe fn descriptorWithTypeCode( typeCode: OSType, ) -> Id; - #[method_id(descriptorWithString:)] + #[method_id(@__retain_semantics Other descriptorWithString:)] pub unsafe fn descriptorWithString(string: &NSString) -> Id; - #[method_id(descriptorWithDate:)] + #[method_id(@__retain_semantics Other descriptorWithDate:)] pub unsafe fn descriptorWithDate(date: &NSDate) -> Id; - #[method_id(descriptorWithFileURL:)] + #[method_id(@__retain_semantics Other descriptorWithFileURL:)] pub unsafe fn descriptorWithFileURL(fileURL: &NSURL) -> Id; - #[method_id(appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] + #[method_id(@__retain_semantics Other appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] pub unsafe fn appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID( eventClass: AEEventClass, eventID: AEEventID, @@ -86,37 +86,37 @@ extern_methods!( transactionID: AETransactionID, ) -> Id; - #[method_id(listDescriptor)] + #[method_id(@__retain_semantics Other listDescriptor)] pub unsafe fn listDescriptor() -> Id; - #[method_id(recordDescriptor)] + #[method_id(@__retain_semantics Other recordDescriptor)] pub unsafe fn recordDescriptor() -> Id; - #[method_id(currentProcessDescriptor)] + #[method_id(@__retain_semantics Other currentProcessDescriptor)] pub unsafe fn currentProcessDescriptor() -> Id; - #[method_id(descriptorWithProcessIdentifier:)] + #[method_id(@__retain_semantics Other descriptorWithProcessIdentifier:)] pub unsafe fn descriptorWithProcessIdentifier( processIdentifier: pid_t, ) -> Id; - #[method_id(descriptorWithBundleIdentifier:)] + #[method_id(@__retain_semantics Other descriptorWithBundleIdentifier:)] pub unsafe fn descriptorWithBundleIdentifier( bundleIdentifier: &NSString, ) -> Id; - #[method_id(descriptorWithApplicationURL:)] + #[method_id(@__retain_semantics Other descriptorWithApplicationURL:)] pub unsafe fn descriptorWithApplicationURL( applicationURL: &NSURL, ) -> Id; - #[method_id(initWithAEDescNoCopy:)] + #[method_id(@__retain_semantics Init initWithAEDescNoCopy:)] pub unsafe fn initWithAEDescNoCopy( this: Option>, aeDesc: NonNull, ) -> Id; - #[method_id(initWithDescriptorType:bytes:length:)] + #[method_id(@__retain_semantics Init initWithDescriptorType:bytes:length:)] pub unsafe fn initWithDescriptorType_bytes_length( this: Option>, descriptorType: DescType, @@ -124,14 +124,14 @@ extern_methods!( byteCount: NSUInteger, ) -> Option>; - #[method_id(initWithDescriptorType:data:)] + #[method_id(@__retain_semantics Init initWithDescriptorType:data:)] pub unsafe fn initWithDescriptorType_data( this: Option>, descriptorType: DescType, data: Option<&NSData>, ) -> Option>; - #[method_id(initWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] + #[method_id(@__retain_semantics Init initWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] pub unsafe fn initWithEventClass_eventID_targetDescriptor_returnID_transactionID( this: Option>, eventClass: AEEventClass, @@ -141,10 +141,10 @@ extern_methods!( transactionID: AETransactionID, ) -> Id; - #[method_id(initListDescriptor)] + #[method_id(@__retain_semantics Init initListDescriptor)] pub unsafe fn initListDescriptor(this: Option>) -> Id; - #[method_id(initRecordDescriptor)] + #[method_id(@__retain_semantics Init initRecordDescriptor)] pub unsafe fn initRecordDescriptor(this: Option>) -> Id; #[method(aeDesc)] @@ -153,7 +153,7 @@ extern_methods!( #[method(descriptorType)] pub unsafe fn descriptorType(&self) -> DescType; - #[method_id(data)] + #[method_id(@__retain_semantics Other data)] pub unsafe fn data(&self) -> Id; #[method(booleanValue)] @@ -171,13 +171,13 @@ extern_methods!( #[method(typeCodeValue)] pub unsafe fn typeCodeValue(&self) -> OSType; - #[method_id(stringValue)] + #[method_id(@__retain_semantics Other stringValue)] pub unsafe fn stringValue(&self) -> Option>; - #[method_id(dateValue)] + #[method_id(@__retain_semantics Other dateValue)] pub unsafe fn dateValue(&self) -> Option>; - #[method_id(fileURLValue)] + #[method_id(@__retain_semantics Other fileURLValue)] pub unsafe fn fileURLValue(&self) -> Option>; #[method(eventClass)] @@ -199,7 +199,7 @@ extern_methods!( keyword: AEKeyword, ); - #[method_id(paramDescriptorForKeyword:)] + #[method_id(@__retain_semantics Other paramDescriptorForKeyword:)] pub unsafe fn paramDescriptorForKeyword( &self, keyword: AEKeyword, @@ -215,13 +215,13 @@ extern_methods!( keyword: AEKeyword, ); - #[method_id(attributeDescriptorForKeyword:)] + #[method_id(@__retain_semantics Other attributeDescriptorForKeyword:)] pub unsafe fn attributeDescriptorForKeyword( &self, keyword: AEKeyword, ) -> Option>; - #[method_id(sendEventWithOptions:timeout:error:)] + #[method_id(@__retain_semantics Other sendEventWithOptions:timeout:error:)] pub unsafe fn sendEventWithOptions_timeout_error( &self, sendOptions: NSAppleEventSendOptions, @@ -241,7 +241,7 @@ extern_methods!( index: NSInteger, ); - #[method_id(descriptorAtIndex:)] + #[method_id(@__retain_semantics Other descriptorAtIndex:)] pub unsafe fn descriptorAtIndex( &self, index: NSInteger, @@ -257,7 +257,7 @@ extern_methods!( keyword: AEKeyword, ); - #[method_id(descriptorForKeyword:)] + #[method_id(@__retain_semantics Other descriptorForKeyword:)] pub unsafe fn descriptorForKeyword( &self, keyword: AEKeyword, @@ -269,7 +269,7 @@ extern_methods!( #[method(keywordForDescriptorAtIndex:)] pub unsafe fn keywordForDescriptorAtIndex(&self, index: NSInteger) -> AEKeyword; - #[method_id(coerceToDescriptorType:)] + #[method_id(@__retain_semantics Other coerceToDescriptorType:)] pub unsafe fn coerceToDescriptorType( &self, descriptorType: DescType, diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index e857ca08a..8f79a3c9b 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -26,7 +26,7 @@ extern_class!( extern_methods!( unsafe impl NSAppleEventManager { - #[method_id(sharedAppleEventManager)] + #[method_id(@__retain_semantics Other sharedAppleEventManager)] pub unsafe fn sharedAppleEventManager() -> Id; #[method(setEventHandler:andSelector:forEventClass:andEventID:)] @@ -53,22 +53,22 @@ extern_methods!( handlerRefCon: SRefCon, ) -> OSErr; - #[method_id(currentAppleEvent)] + #[method_id(@__retain_semantics Other currentAppleEvent)] pub unsafe fn currentAppleEvent(&self) -> Option>; - #[method_id(currentReplyAppleEvent)] + #[method_id(@__retain_semantics Other currentReplyAppleEvent)] pub unsafe fn currentReplyAppleEvent(&self) -> Option>; #[method(suspendCurrentAppleEvent)] pub unsafe fn suspendCurrentAppleEvent(&self) -> NSAppleEventManagerSuspensionID; - #[method_id(appleEventForSuspensionID:)] + #[method_id(@__retain_semantics Other appleEventForSuspensionID:)] pub unsafe fn appleEventForSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, ) -> Id; - #[method_id(replyAppleEventForSuspensionID:)] + #[method_id(@__retain_semantics Other replyAppleEventForSuspensionID:)] pub unsafe fn replyAppleEventForSuspensionID( &self, suspensionID: NSAppleEventManagerSuspensionID, diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index e6e189058..a6104cd2c 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -34,20 +34,20 @@ extern_class!( extern_methods!( unsafe impl NSAppleScript { - #[method_id(initWithContentsOfURL:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( this: Option>, url: &NSURL, errorInfo: Option<&mut Option, Shared>>>, ) -> Option>; - #[method_id(initWithSource:)] + #[method_id(@__retain_semantics Init initWithSource:)] pub unsafe fn initWithSource( this: Option>, source: &NSString, ) -> Option>; - #[method_id(source)] + #[method_id(@__retain_semantics Other source)] pub unsafe fn source(&self) -> Option>; #[method(isCompiled)] @@ -59,13 +59,13 @@ extern_methods!( errorInfo: Option<&mut Option, Shared>>>, ) -> bool; - #[method_id(executeAndReturnError:)] + #[method_id(@__retain_semantics Other executeAndReturnError:)] pub unsafe fn executeAndReturnError( &self, errorInfo: Option<&mut Option, Shared>>>, ) -> Id; - #[method_id(executeAppleEvent:error:)] + #[method_id(@__retain_semantics Other executeAppleEvent:error:)] pub unsafe fn executeAppleEvent_error( &self, event: &NSAppleEventDescriptor, diff --git a/crates/icrate/src/generated/Foundation/NSArchiver.rs b/crates/icrate/src/generated/Foundation/NSArchiver.rs index 3a2b3a122..89859917c 100644 --- a/crates/icrate/src/generated/Foundation/NSArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSArchiver.rs @@ -14,13 +14,13 @@ extern_class!( extern_methods!( unsafe impl NSArchiver { - #[method_id(initForWritingWithMutableData:)] + #[method_id(@__retain_semantics Init initForWritingWithMutableData:)] pub unsafe fn initForWritingWithMutableData( this: Option>, mdata: &NSMutableData, ) -> Id; - #[method_id(archiverData)] + #[method_id(@__retain_semantics Other archiverData)] pub unsafe fn archiverData(&self) -> Id; #[method(encodeRootObject:)] @@ -29,7 +29,7 @@ extern_methods!( #[method(encodeConditionalObject:)] pub unsafe fn encodeConditionalObject(&self, object: Option<&Object>); - #[method_id(archivedDataWithRootObject:)] + #[method_id(@__retain_semantics Other archivedDataWithRootObject:)] pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id; #[method(archiveRootObject:toFile:)] @@ -42,7 +42,7 @@ extern_methods!( inArchiveName: &NSString, ); - #[method_id(classNameEncodedForTrueClassName:)] + #[method_id(@__retain_semantics Other classNameEncodedForTrueClassName:)] pub unsafe fn classNameEncodedForTrueClassName( &self, trueName: &NSString, @@ -64,7 +64,7 @@ extern_class!( extern_methods!( unsafe impl NSUnarchiver { - #[method_id(initForReadingWithData:)] + #[method_id(@__retain_semantics Init initForReadingWithData:)] pub unsafe fn initForReadingWithData( this: Option>, data: &NSData, @@ -82,10 +82,10 @@ extern_methods!( #[method(systemVersion)] pub unsafe fn systemVersion(&self) -> c_uint; - #[method_id(unarchiveObjectWithData:)] + #[method_id(@__retain_semantics Other unarchiveObjectWithData:)] pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option>; - #[method_id(unarchiveObjectWithFile:)] + #[method_id(@__retain_semantics Other unarchiveObjectWithFile:)] pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option>; #[method(replaceObject:withObject:)] @@ -99,7 +99,7 @@ extern_methods!( #[method(classForArchiver)] pub unsafe fn classForArchiver(&self) -> Option<&'static Class>; - #[method_id(replacementObjectForArchiver:)] + #[method_id(@__retain_semantics Other replacementObjectForArchiver:)] pub unsafe fn replacementObjectForArchiver( &self, archiver: &NSArchiver, diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 5a00f9833..891868cc9 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -19,20 +19,20 @@ extern_methods!( #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - #[method_id(objectAtIndex:)] + #[method_id(@__retain_semantics Other objectAtIndex:)] pub unsafe fn objectAtIndex(&self, index: NSUInteger) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithObjects:count:)] + #[method_id(@__retain_semantics Init initWithObjects:count:)] pub unsafe fn initWithObjects_count( this: Option>, objects: TodoArray, cnt: NSUInteger, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -48,40 +48,40 @@ pub const NSBinarySearchingInsertionIndex: NSBinarySearchingOptions = 1 << 10; extern_methods!( /// NSExtendedArray unsafe impl NSArray { - #[method_id(arrayByAddingObject:)] + #[method_id(@__retain_semantics Other arrayByAddingObject:)] pub unsafe fn arrayByAddingObject( &self, anObject: &ObjectType, ) -> Id, Shared>; - #[method_id(arrayByAddingObjectsFromArray:)] + #[method_id(@__retain_semantics Other arrayByAddingObjectsFromArray:)] pub unsafe fn arrayByAddingObjectsFromArray( &self, otherArray: &NSArray, ) -> Id, Shared>; - #[method_id(componentsJoinedByString:)] + #[method_id(@__retain_semantics Other componentsJoinedByString:)] pub unsafe fn componentsJoinedByString(&self, separator: &NSString) -> Id; #[method(containsObject:)] pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool; - #[method_id(description)] + #[method_id(@__retain_semantics Other description)] pub unsafe fn description(&self) -> Id; - #[method_id(descriptionWithLocale:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; - #[method_id(descriptionWithLocale:indent:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:indent:)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, level: NSUInteger, ) -> Id; - #[method_id(firstObjectCommonWithArray:)] + #[method_id(@__retain_semantics Other firstObjectCommonWithArray:)] pub unsafe fn firstObjectCommonWithArray( &self, otherArray: &NSArray, @@ -113,29 +113,29 @@ extern_methods!( #[method(isEqualToArray:)] pub unsafe fn isEqualToArray(&self, otherArray: &NSArray) -> bool; - #[method_id(firstObject)] + #[method_id(@__retain_semantics Other firstObject)] pub unsafe fn firstObject(&self) -> Option>; - #[method_id(lastObject)] + #[method_id(@__retain_semantics Other lastObject)] pub unsafe fn lastObject(&self) -> Option>; - #[method_id(objectEnumerator)] + #[method_id(@__retain_semantics Other objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; - #[method_id(reverseObjectEnumerator)] + #[method_id(@__retain_semantics Other reverseObjectEnumerator)] pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared>; - #[method_id(sortedArrayHint)] + #[method_id(@__retain_semantics Other sortedArrayHint)] pub unsafe fn sortedArrayHint(&self) -> Id; - #[method_id(sortedArrayUsingFunction:context:)] + #[method_id(@__retain_semantics Other sortedArrayUsingFunction:context:)] pub unsafe fn sortedArrayUsingFunction_context( &self, comparator: NonNull, context: *mut c_void, ) -> Id, Shared>; - #[method_id(sortedArrayUsingFunction:context:hint:)] + #[method_id(@__retain_semantics Other sortedArrayUsingFunction:context:hint:)] pub unsafe fn sortedArrayUsingFunction_context_hint( &self, comparator: NonNull, @@ -143,13 +143,13 @@ extern_methods!( hint: Option<&NSData>, ) -> Id, Shared>; - #[method_id(sortedArrayUsingSelector:)] + #[method_id(@__retain_semantics Other sortedArrayUsingSelector:)] pub unsafe fn sortedArrayUsingSelector( &self, comparator: Sel, ) -> Id, Shared>; - #[method_id(subarrayWithRange:)] + #[method_id(@__retain_semantics Other subarrayWithRange:)] pub unsafe fn subarrayWithRange(&self, range: NSRange) -> Id, Shared>; #[method(writeToURL:error:)] @@ -165,13 +165,13 @@ extern_methods!( argument: Option<&Object>, ); - #[method_id(objectsAtIndexes:)] + #[method_id(@__retain_semantics Other objectsAtIndexes:)] pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet, ) -> Id, Shared>; - #[method_id(objectAtIndexedSubscript:)] + #[method_id(@__retain_semantics Other objectAtIndexedSubscript:)] pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; #[method(enumerateObjectsUsingBlock:)] @@ -210,20 +210,20 @@ extern_methods!( predicate: TodoBlock, ) -> NSUInteger; - #[method_id(indexesOfObjectsPassingTest:)] + #[method_id(@__retain_semantics Other indexesOfObjectsPassingTest:)] pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: TodoBlock, ) -> Id; - #[method_id(indexesOfObjectsWithOptions:passingTest:)] + #[method_id(@__retain_semantics Other indexesOfObjectsWithOptions:passingTest:)] pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; - #[method_id(indexesOfObjectsAtIndexes:options:passingTest:)] + #[method_id(@__retain_semantics Other indexesOfObjectsAtIndexes:options:passingTest:)] pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, s: &NSIndexSet, @@ -231,13 +231,13 @@ extern_methods!( predicate: TodoBlock, ) -> Id; - #[method_id(sortedArrayUsingComparator:)] + #[method_id(@__retain_semantics Other sortedArrayUsingComparator:)] pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator, ) -> Id, Shared>; - #[method_id(sortedArrayWithOptions:usingComparator:)] + #[method_id(@__retain_semantics Other sortedArrayWithOptions:usingComparator:)] pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, @@ -258,41 +258,41 @@ extern_methods!( extern_methods!( /// NSArrayCreation unsafe impl NSArray { - #[method_id(array)] + #[method_id(@__retain_semantics Other array)] pub unsafe fn array() -> Id; - #[method_id(arrayWithObject:)] + #[method_id(@__retain_semantics Other arrayWithObject:)] pub unsafe fn arrayWithObject(anObject: &ObjectType) -> Id; - #[method_id(arrayWithObjects:count:)] + #[method_id(@__retain_semantics Other arrayWithObjects:count:)] pub unsafe fn arrayWithObjects_count( objects: TodoArray, cnt: NSUInteger, ) -> Id; - #[method_id(arrayWithArray:)] + #[method_id(@__retain_semantics Other arrayWithArray:)] pub unsafe fn arrayWithArray(array: &NSArray) -> Id; - #[method_id(initWithArray:)] + #[method_id(@__retain_semantics Init initWithArray:)] pub unsafe fn initWithArray( this: Option>, array: &NSArray, ) -> Id; - #[method_id(initWithArray:copyItems:)] + #[method_id(@__retain_semantics Init initWithArray:copyItems:)] pub unsafe fn initWithArray_copyItems( this: Option>, array: &NSArray, flag: bool, ) -> Id; - #[method_id(initWithContentsOfURL:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( this: Option>, url: &NSURL, ) -> Result, Shared>, Id>; - #[method_id(arrayWithContentsOfURL:error:)] + #[method_id(@__retain_semantics Other arrayWithContentsOfURL:error:)] pub unsafe fn arrayWithContentsOfURL_error( url: &NSURL, ) -> Result, Shared>, Id>; @@ -302,7 +302,7 @@ extern_methods!( extern_methods!( /// NSArrayDiffing unsafe impl NSArray { - #[method_id(differenceFromArray:withOptions:usingEquivalenceTest:)] + #[method_id(@__retain_semantics Other differenceFromArray:withOptions:usingEquivalenceTest:)] pub unsafe fn differenceFromArray_withOptions_usingEquivalenceTest( &self, other: &NSArray, @@ -310,20 +310,20 @@ extern_methods!( block: TodoBlock, ) -> Id, Shared>; - #[method_id(differenceFromArray:withOptions:)] + #[method_id(@__retain_semantics Other differenceFromArray:withOptions:)] pub unsafe fn differenceFromArray_withOptions( &self, other: &NSArray, options: NSOrderedCollectionDifferenceCalculationOptions, ) -> Id, Shared>; - #[method_id(differenceFromArray:)] + #[method_id(@__retain_semantics Other differenceFromArray:)] pub unsafe fn differenceFromArray( &self, other: &NSArray, ) -> Id, Shared>; - #[method_id(arrayByApplyingDifference:)] + #[method_id(@__retain_semantics Other arrayByApplyingDifference:)] pub unsafe fn arrayByApplyingDifference( &self, difference: &NSOrderedCollectionDifference, @@ -337,23 +337,23 @@ extern_methods!( #[method(getObjects:)] pub unsafe fn getObjects(&self, objects: TodoArray); - #[method_id(arrayWithContentsOfFile:)] + #[method_id(@__retain_semantics Other arrayWithContentsOfFile:)] pub unsafe fn arrayWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; - #[method_id(arrayWithContentsOfURL:)] + #[method_id(@__retain_semantics Other arrayWithContentsOfURL:)] pub unsafe fn arrayWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; - #[method_id(initWithContentsOfFile:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( this: Option>, path: &NSString, ) -> Option, Shared>>; - #[method_id(initWithContentsOfURL:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, url: &NSURL, @@ -403,16 +403,16 @@ extern_methods!( anObject: &ObjectType, ); - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCapacity:)] + #[method_id(@__retain_semantics Init initWithCapacity:)] pub unsafe fn initWithCapacity( this: Option>, numItems: NSUInteger, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -524,26 +524,26 @@ extern_methods!( extern_methods!( /// NSMutableArrayCreation unsafe impl NSMutableArray { - #[method_id(arrayWithCapacity:)] + #[method_id(@__retain_semantics Other arrayWithCapacity:)] pub unsafe fn arrayWithCapacity(numItems: NSUInteger) -> Id; - #[method_id(arrayWithContentsOfFile:)] + #[method_id(@__retain_semantics Other arrayWithContentsOfFile:)] pub unsafe fn arrayWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; - #[method_id(arrayWithContentsOfURL:)] + #[method_id(@__retain_semantics Other arrayWithContentsOfURL:)] pub unsafe fn arrayWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; - #[method_id(initWithContentsOfFile:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( this: Option>, path: &NSString, ) -> Option, Shared>>; - #[method_id(initWithContentsOfURL:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, url: &NSURL, diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index 3b4c5b35c..e4db44cc5 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -16,10 +16,10 @@ extern_class!( extern_methods!( unsafe impl NSAttributedString { - #[method_id(string)] + #[method_id(@__retain_semantics Other string)] pub unsafe fn string(&self) -> Id; - #[method_id(attributesAtIndex:effectiveRange:)] + #[method_id(@__retain_semantics Other attributesAtIndex:effectiveRange:)] pub unsafe fn attributesAtIndex_effectiveRange( &self, location: NSUInteger, @@ -39,7 +39,7 @@ extern_methods!( #[method(length)] pub unsafe fn length(&self) -> NSUInteger; - #[method_id(attribute:atIndex:effectiveRange:)] + #[method_id(@__retain_semantics Other attribute:atIndex:effectiveRange:)] pub unsafe fn attribute_atIndex_effectiveRange( &self, attrName: &NSAttributedStringKey, @@ -47,13 +47,13 @@ extern_methods!( range: NSRangePointer, ) -> Option>; - #[method_id(attributedSubstringFromRange:)] + #[method_id(@__retain_semantics Other attributedSubstringFromRange:)] pub unsafe fn attributedSubstringFromRange( &self, range: NSRange, ) -> Id; - #[method_id(attributesAtIndex:longestEffectiveRange:inRange:)] + #[method_id(@__retain_semantics Other attributesAtIndex:longestEffectiveRange:inRange:)] pub unsafe fn attributesAtIndex_longestEffectiveRange_inRange( &self, location: NSUInteger, @@ -61,7 +61,7 @@ extern_methods!( rangeLimit: NSRange, ) -> Id, Shared>; - #[method_id(attribute:atIndex:longestEffectiveRange:inRange:)] + #[method_id(@__retain_semantics Other attribute:atIndex:longestEffectiveRange:inRange:)] pub unsafe fn attribute_atIndex_longestEffectiveRange_inRange( &self, attrName: &NSAttributedStringKey, @@ -73,20 +73,20 @@ extern_methods!( #[method(isEqualToAttributedString:)] pub unsafe fn isEqualToAttributedString(&self, other: &NSAttributedString) -> bool; - #[method_id(initWithString:)] + #[method_id(@__retain_semantics Init initWithString:)] pub unsafe fn initWithString( this: Option>, str: &NSString, ) -> Id; - #[method_id(initWithString:attributes:)] + #[method_id(@__retain_semantics Init initWithString:attributes:)] pub unsafe fn initWithString_attributes( this: Option>, str: &NSString, attrs: Option<&NSDictionary>, ) -> Id; - #[method_id(initWithAttributedString:)] + #[method_id(@__retain_semantics Init initWithAttributedString:)] pub unsafe fn initWithAttributedString( this: Option>, attrStr: &NSAttributedString, @@ -137,7 +137,7 @@ extern_methods!( extern_methods!( /// NSExtendedMutableAttributedString unsafe impl NSMutableAttributedString { - #[method_id(mutableString)] + #[method_id(@__retain_semantics Other mutableString)] pub unsafe fn mutableString(&self) -> Id; #[method(addAttribute:value:range:)] @@ -240,7 +240,7 @@ extern_class!( extern_methods!( unsafe impl NSAttributedStringMarkdownParsingOptions { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[method(allowsExtendedAttributes)] @@ -267,7 +267,7 @@ extern_methods!( failurePolicy: NSAttributedStringMarkdownParsingFailurePolicy, ); - #[method_id(languageCode)] + #[method_id(@__retain_semantics Other languageCode)] pub unsafe fn languageCode(&self) -> Option>; #[method(setLanguageCode:)] @@ -278,7 +278,7 @@ extern_methods!( extern_methods!( /// NSAttributedStringCreateFromMarkdown unsafe impl NSAttributedString { - #[method_id(initWithContentsOfMarkdownFileAtURL:options:baseURL:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfMarkdownFileAtURL:options:baseURL:error:)] pub unsafe fn initWithContentsOfMarkdownFileAtURL_options_baseURL_error( this: Option>, markdownFile: &NSURL, @@ -286,7 +286,7 @@ extern_methods!( baseURL: Option<&NSURL>, ) -> Result, Id>; - #[method_id(initWithMarkdown:options:baseURL:error:)] + #[method_id(@__retain_semantics Init initWithMarkdown:options:baseURL:error:)] pub unsafe fn initWithMarkdown_options_baseURL_error( this: Option>, markdown: &NSData, @@ -294,7 +294,7 @@ extern_methods!( baseURL: Option<&NSURL>, ) -> Result, Id>; - #[method_id(initWithMarkdownString:options:baseURL:error:)] + #[method_id(@__retain_semantics Init initWithMarkdownString:options:baseURL:error:)] pub unsafe fn initWithMarkdownString_options_baseURL_error( this: Option>, markdownString: &NSString, @@ -313,7 +313,7 @@ pub const NSAttributedStringFormattingApplyReplacementIndexAttribute: extern_methods!( /// NSAttributedStringFormatting unsafe impl NSAttributedString { - #[method_id(initWithFormat:options:locale:arguments:)] + #[method_id(@__retain_semantics Init initWithFormat:options:locale:arguments:)] pub unsafe fn initWithFormat_options_locale_arguments( this: Option>, format: &NSAttributedString, @@ -336,7 +336,7 @@ extern "C" { extern_methods!( /// NSMorphology unsafe impl NSAttributedString { - #[method_id(attributedStringByInflectingString)] + #[method_id(@__retain_semantics Other attributedStringByInflectingString)] pub unsafe fn attributedStringByInflectingString(&self) -> Id; } ); @@ -393,64 +393,64 @@ extern_methods!( #[method(intentKind)] pub unsafe fn intentKind(&self) -> NSPresentationIntentKind; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(parentIntent)] + #[method_id(@__retain_semantics Other parentIntent)] pub unsafe fn parentIntent(&self) -> Option>; - #[method_id(paragraphIntentWithIdentity:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other paragraphIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn paragraphIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(headerIntentWithIdentity:level:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other headerIntentWithIdentity:level:nestedInsideIntent:)] pub unsafe fn headerIntentWithIdentity_level_nestedInsideIntent( identity: NSInteger, level: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(codeBlockIntentWithIdentity:languageHint:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other codeBlockIntentWithIdentity:languageHint:nestedInsideIntent:)] pub unsafe fn codeBlockIntentWithIdentity_languageHint_nestedInsideIntent( identity: NSInteger, languageHint: Option<&NSString>, parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(thematicBreakIntentWithIdentity:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other thematicBreakIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn thematicBreakIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(orderedListIntentWithIdentity:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other orderedListIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn orderedListIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(unorderedListIntentWithIdentity:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other unorderedListIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn unorderedListIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(listItemIntentWithIdentity:ordinal:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other listItemIntentWithIdentity:ordinal:nestedInsideIntent:)] pub unsafe fn listItemIntentWithIdentity_ordinal_nestedInsideIntent( identity: NSInteger, ordinal: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(blockQuoteIntentWithIdentity:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other blockQuoteIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn blockQuoteIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(tableIntentWithIdentity:columnCount:alignments:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other tableIntentWithIdentity:columnCount:alignments:nestedInsideIntent:)] pub unsafe fn tableIntentWithIdentity_columnCount_alignments_nestedInsideIntent( identity: NSInteger, columnCount: NSInteger, @@ -458,20 +458,20 @@ extern_methods!( parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(tableHeaderRowIntentWithIdentity:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other tableHeaderRowIntentWithIdentity:nestedInsideIntent:)] pub unsafe fn tableHeaderRowIntentWithIdentity_nestedInsideIntent( identity: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(tableRowIntentWithIdentity:row:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other tableRowIntentWithIdentity:row:nestedInsideIntent:)] pub unsafe fn tableRowIntentWithIdentity_row_nestedInsideIntent( identity: NSInteger, row: NSInteger, parent: Option<&NSPresentationIntent>, ) -> Id; - #[method_id(tableCellIntentWithIdentity:column:nestedInsideIntent:)] + #[method_id(@__retain_semantics Other tableCellIntentWithIdentity:column:nestedInsideIntent:)] pub unsafe fn tableCellIntentWithIdentity_column_nestedInsideIntent( identity: NSInteger, column: NSInteger, @@ -484,7 +484,7 @@ extern_methods!( #[method(ordinal)] pub unsafe fn ordinal(&self) -> NSInteger; - #[method_id(columnAlignments)] + #[method_id(@__retain_semantics Other columnAlignments)] pub unsafe fn columnAlignments(&self) -> Option, Shared>>; #[method(columnCount)] @@ -493,7 +493,7 @@ extern_methods!( #[method(headerLevel)] pub unsafe fn headerLevel(&self) -> NSInteger; - #[method_id(languageHint)] + #[method_id(@__retain_semantics Other languageHint)] pub unsafe fn languageHint(&self) -> Option>; #[method(column)] diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 15b210729..714b28666 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -18,13 +18,13 @@ extern_class!( extern_methods!( unsafe impl NSBackgroundActivityScheduler { - #[method_id(initWithIdentifier:)] + #[method_id(@__retain_semantics Init initWithIdentifier:)] pub unsafe fn initWithIdentifier( this: Option>, identifier: &NSString, ) -> Id; - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Id; #[method(qualityOfService)] diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 7a29ad820..21c3779dc 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -20,37 +20,37 @@ extern_class!( extern_methods!( unsafe impl NSBundle { - #[method_id(mainBundle)] + #[method_id(@__retain_semantics Other mainBundle)] pub unsafe fn mainBundle() -> Id; - #[method_id(bundleWithPath:)] + #[method_id(@__retain_semantics Other bundleWithPath:)] pub unsafe fn bundleWithPath(path: &NSString) -> Option>; - #[method_id(initWithPath:)] + #[method_id(@__retain_semantics Init initWithPath:)] pub unsafe fn initWithPath( this: Option>, path: &NSString, ) -> Option>; - #[method_id(bundleWithURL:)] + #[method_id(@__retain_semantics Other bundleWithURL:)] pub unsafe fn bundleWithURL(url: &NSURL) -> Option>; - #[method_id(initWithURL:)] + #[method_id(@__retain_semantics Init initWithURL:)] pub unsafe fn initWithURL( this: Option>, url: &NSURL, ) -> Option>; - #[method_id(bundleForClass:)] + #[method_id(@__retain_semantics Other bundleForClass:)] pub unsafe fn bundleForClass(aClass: &Class) -> Id; - #[method_id(bundleWithIdentifier:)] + #[method_id(@__retain_semantics Other bundleWithIdentifier:)] pub unsafe fn bundleWithIdentifier(identifier: &NSString) -> Option>; - #[method_id(allBundles)] + #[method_id(@__retain_semantics Other allBundles)] pub unsafe fn allBundles() -> Id, Shared>; - #[method_id(allFrameworks)] + #[method_id(@__retain_semantics Other allFrameworks)] pub unsafe fn allFrameworks() -> Id, Shared>; #[method(load)] @@ -68,64 +68,64 @@ extern_methods!( #[method(loadAndReturnError:)] pub unsafe fn loadAndReturnError(&self) -> Result<(), Id>; - #[method_id(bundleURL)] + #[method_id(@__retain_semantics Other bundleURL)] pub unsafe fn bundleURL(&self) -> Id; - #[method_id(resourceURL)] + #[method_id(@__retain_semantics Other resourceURL)] pub unsafe fn resourceURL(&self) -> Option>; - #[method_id(executableURL)] + #[method_id(@__retain_semantics Other executableURL)] pub unsafe fn executableURL(&self) -> Option>; - #[method_id(URLForAuxiliaryExecutable:)] + #[method_id(@__retain_semantics Other URLForAuxiliaryExecutable:)] pub unsafe fn URLForAuxiliaryExecutable( &self, executableName: &NSString, ) -> Option>; - #[method_id(privateFrameworksURL)] + #[method_id(@__retain_semantics Other privateFrameworksURL)] pub unsafe fn privateFrameworksURL(&self) -> Option>; - #[method_id(sharedFrameworksURL)] + #[method_id(@__retain_semantics Other sharedFrameworksURL)] pub unsafe fn sharedFrameworksURL(&self) -> Option>; - #[method_id(sharedSupportURL)] + #[method_id(@__retain_semantics Other sharedSupportURL)] pub unsafe fn sharedSupportURL(&self) -> Option>; - #[method_id(builtInPlugInsURL)] + #[method_id(@__retain_semantics Other builtInPlugInsURL)] pub unsafe fn builtInPlugInsURL(&self) -> Option>; - #[method_id(appStoreReceiptURL)] + #[method_id(@__retain_semantics Other appStoreReceiptURL)] pub unsafe fn appStoreReceiptURL(&self) -> Option>; - #[method_id(bundlePath)] + #[method_id(@__retain_semantics Other bundlePath)] pub unsafe fn bundlePath(&self) -> Id; - #[method_id(resourcePath)] + #[method_id(@__retain_semantics Other resourcePath)] pub unsafe fn resourcePath(&self) -> Option>; - #[method_id(executablePath)] + #[method_id(@__retain_semantics Other executablePath)] pub unsafe fn executablePath(&self) -> Option>; - #[method_id(pathForAuxiliaryExecutable:)] + #[method_id(@__retain_semantics Other pathForAuxiliaryExecutable:)] pub unsafe fn pathForAuxiliaryExecutable( &self, executableName: &NSString, ) -> Option>; - #[method_id(privateFrameworksPath)] + #[method_id(@__retain_semantics Other privateFrameworksPath)] pub unsafe fn privateFrameworksPath(&self) -> Option>; - #[method_id(sharedFrameworksPath)] + #[method_id(@__retain_semantics Other sharedFrameworksPath)] pub unsafe fn sharedFrameworksPath(&self) -> Option>; - #[method_id(sharedSupportPath)] + #[method_id(@__retain_semantics Other sharedSupportPath)] pub unsafe fn sharedSupportPath(&self) -> Option>; - #[method_id(builtInPlugInsPath)] + #[method_id(@__retain_semantics Other builtInPlugInsPath)] pub unsafe fn builtInPlugInsPath(&self) -> Option>; - #[method_id(URLForResource:withExtension:subdirectory:inBundleWithURL:)] + #[method_id(@__retain_semantics Other URLForResource:withExtension:subdirectory:inBundleWithURL:)] pub unsafe fn URLForResource_withExtension_subdirectory_inBundleWithURL( name: Option<&NSString>, ext: Option<&NSString>, @@ -133,21 +133,21 @@ extern_methods!( bundleURL: &NSURL, ) -> Option>; - #[method_id(URLsForResourcesWithExtension:subdirectory:inBundleWithURL:)] + #[method_id(@__retain_semantics Other URLsForResourcesWithExtension:subdirectory:inBundleWithURL:)] pub unsafe fn URLsForResourcesWithExtension_subdirectory_inBundleWithURL( ext: Option<&NSString>, subpath: Option<&NSString>, bundleURL: &NSURL, ) -> Option, Shared>>; - #[method_id(URLForResource:withExtension:)] + #[method_id(@__retain_semantics Other URLForResource:withExtension:)] pub unsafe fn URLForResource_withExtension( &self, name: Option<&NSString>, ext: Option<&NSString>, ) -> Option>; - #[method_id(URLForResource:withExtension:subdirectory:)] + #[method_id(@__retain_semantics Other URLForResource:withExtension:subdirectory:)] pub unsafe fn URLForResource_withExtension_subdirectory( &self, name: Option<&NSString>, @@ -155,7 +155,7 @@ extern_methods!( subpath: Option<&NSString>, ) -> Option>; - #[method_id(URLForResource:withExtension:subdirectory:localization:)] + #[method_id(@__retain_semantics Other URLForResource:withExtension:subdirectory:localization:)] pub unsafe fn URLForResource_withExtension_subdirectory_localization( &self, name: Option<&NSString>, @@ -164,14 +164,14 @@ extern_methods!( localizationName: Option<&NSString>, ) -> Option>; - #[method_id(URLsForResourcesWithExtension:subdirectory:)] + #[method_id(@__retain_semantics Other URLsForResourcesWithExtension:subdirectory:)] pub unsafe fn URLsForResourcesWithExtension_subdirectory( &self, ext: Option<&NSString>, subpath: Option<&NSString>, ) -> Option, Shared>>; - #[method_id(URLsForResourcesWithExtension:subdirectory:localization:)] + #[method_id(@__retain_semantics Other URLsForResourcesWithExtension:subdirectory:localization:)] pub unsafe fn URLsForResourcesWithExtension_subdirectory_localization( &self, ext: Option<&NSString>, @@ -179,14 +179,14 @@ extern_methods!( localizationName: Option<&NSString>, ) -> Option, Shared>>; - #[method_id(pathForResource:ofType:)] + #[method_id(@__retain_semantics Other pathForResource:ofType:)] pub unsafe fn pathForResource_ofType( &self, name: Option<&NSString>, ext: Option<&NSString>, ) -> Option>; - #[method_id(pathForResource:ofType:inDirectory:forLocalization:)] + #[method_id(@__retain_semantics Other pathForResource:ofType:inDirectory:forLocalization:)] pub unsafe fn pathForResource_ofType_inDirectory_forLocalization( &self, name: Option<&NSString>, @@ -195,7 +195,7 @@ extern_methods!( localizationName: Option<&NSString>, ) -> Option>; - #[method_id(pathsForResourcesOfType:inDirectory:forLocalization:)] + #[method_id(@__retain_semantics Other pathsForResourcesOfType:inDirectory:forLocalization:)] pub unsafe fn pathsForResourcesOfType_inDirectory_forLocalization( &self, ext: Option<&NSString>, @@ -203,7 +203,7 @@ extern_methods!( localizationName: Option<&NSString>, ) -> Id, Shared>; - #[method_id(localizedStringForKey:value:table:)] + #[method_id(@__retain_semantics Other localizedStringForKey:value:table:)] pub unsafe fn localizedStringForKey_value_table( &self, key: &NSString, @@ -211,18 +211,18 @@ extern_methods!( tableName: Option<&NSString>, ) -> Id; - #[method_id(bundleIdentifier)] + #[method_id(@__retain_semantics Other bundleIdentifier)] pub unsafe fn bundleIdentifier(&self) -> Option>; - #[method_id(infoDictionary)] + #[method_id(@__retain_semantics Other infoDictionary)] pub unsafe fn infoDictionary(&self) -> Option, Shared>>; - #[method_id(localizedInfoDictionary)] + #[method_id(@__retain_semantics Other localizedInfoDictionary)] pub unsafe fn localizedInfoDictionary( &self, ) -> Option, Shared>>; - #[method_id(objectForInfoDictionaryKey:)] + #[method_id(@__retain_semantics Other objectForInfoDictionaryKey:)] pub unsafe fn objectForInfoDictionaryKey( &self, key: &NSString, @@ -234,27 +234,27 @@ extern_methods!( #[method(principalClass)] pub unsafe fn principalClass(&self) -> Option<&'static Class>; - #[method_id(preferredLocalizations)] + #[method_id(@__retain_semantics Other preferredLocalizations)] pub unsafe fn preferredLocalizations(&self) -> Id, Shared>; - #[method_id(localizations)] + #[method_id(@__retain_semantics Other localizations)] pub unsafe fn localizations(&self) -> Id, Shared>; - #[method_id(developmentLocalization)] + #[method_id(@__retain_semantics Other developmentLocalization)] pub unsafe fn developmentLocalization(&self) -> Option>; - #[method_id(preferredLocalizationsFromArray:)] + #[method_id(@__retain_semantics Other preferredLocalizationsFromArray:)] pub unsafe fn preferredLocalizationsFromArray( localizationsArray: &NSArray, ) -> Id, Shared>; - #[method_id(preferredLocalizationsFromArray:forPreferences:)] + #[method_id(@__retain_semantics Other preferredLocalizationsFromArray:forPreferences:)] pub unsafe fn preferredLocalizationsFromArray_forPreferences( localizationsArray: &NSArray, preferencesArray: Option<&NSArray>, ) -> Id, Shared>; - #[method_id(executableArchitectures)] + #[method_id(@__retain_semantics Other executableArchitectures)] pub unsafe fn executableArchitectures(&self) -> Option, Shared>>; } ); @@ -262,7 +262,7 @@ extern_methods!( extern_methods!( /// NSBundleExtensionMethods unsafe impl NSString { - #[method_id(variantFittingPresentationWidth:)] + #[method_id(@__retain_semantics Other variantFittingPresentationWidth:)] pub unsafe fn variantFittingPresentationWidth( &self, width: NSInteger, @@ -289,16 +289,16 @@ extern_class!( extern_methods!( unsafe impl NSBundleResourceRequest { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithTags:)] + #[method_id(@__retain_semantics Init initWithTags:)] pub unsafe fn initWithTags( this: Option>, tags: &NSSet, ) -> Id; - #[method_id(initWithTags:bundle:)] + #[method_id(@__retain_semantics Init initWithTags:bundle:)] pub unsafe fn initWithTags_bundle( this: Option>, tags: &NSSet, @@ -311,10 +311,10 @@ extern_methods!( #[method(setLoadingPriority:)] pub unsafe fn setLoadingPriority(&self, loadingPriority: c_double); - #[method_id(tags)] + #[method_id(@__retain_semantics Other tags)] pub unsafe fn tags(&self) -> Id, Shared>; - #[method_id(bundle)] + #[method_id(@__retain_semantics Other bundle)] pub unsafe fn bundle(&self) -> Id; #[method(beginAccessingResourcesWithCompletionHandler:)] @@ -332,7 +332,7 @@ extern_methods!( #[method(endAccessingResources)] pub unsafe fn endAccessingResources(&self); - #[method_id(progress)] + #[method_id(@__retain_semantics Other progress)] pub unsafe fn progress(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 2d7e85371..0b5bed7c3 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -33,28 +33,28 @@ extern_class!( extern_methods!( unsafe impl NSByteCountFormatter { - #[method_id(stringFromByteCount:countStyle:)] + #[method_id(@__retain_semantics Other stringFromByteCount:countStyle:)] pub unsafe fn stringFromByteCount_countStyle( byteCount: c_longlong, countStyle: NSByteCountFormatterCountStyle, ) -> Id; - #[method_id(stringFromByteCount:)] + #[method_id(@__retain_semantics Other stringFromByteCount:)] pub unsafe fn stringFromByteCount(&self, byteCount: c_longlong) -> Id; - #[method_id(stringFromMeasurement:countStyle:)] + #[method_id(@__retain_semantics Other stringFromMeasurement:countStyle:)] pub unsafe fn stringFromMeasurement_countStyle( measurement: &NSMeasurement, countStyle: NSByteCountFormatterCountStyle, ) -> Id; - #[method_id(stringFromMeasurement:)] + #[method_id(@__retain_semantics Other stringFromMeasurement:)] pub unsafe fn stringFromMeasurement( &self, measurement: &NSMeasurement, ) -> Id; - #[method_id(stringForObjectValue:)] + #[method_id(@__retain_semantics Other stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index b0ca33cfa..485e144b5 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -17,19 +17,19 @@ __inner_extern_class!( extern_methods!( unsafe impl NSCache { - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; #[method(setName:)] pub unsafe fn setName(&self, name: &NSString); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSCacheDelegate>); - #[method_id(objectForKey:)] + #[method_id(@__retain_semantics Other objectForKey:)] pub unsafe fn objectForKey(&self, key: &KeyType) -> Option>; #[method(setObject:forKey:)] diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 62191f888..d455a4b3c 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -126,36 +126,36 @@ extern_class!( extern_methods!( unsafe impl NSCalendar { - #[method_id(currentCalendar)] + #[method_id(@__retain_semantics Other currentCalendar)] pub unsafe fn currentCalendar() -> Id; - #[method_id(autoupdatingCurrentCalendar)] + #[method_id(@__retain_semantics Other autoupdatingCurrentCalendar)] pub unsafe fn autoupdatingCurrentCalendar() -> Id; - #[method_id(calendarWithIdentifier:)] + #[method_id(@__retain_semantics Other calendarWithIdentifier:)] pub unsafe fn calendarWithIdentifier( calendarIdentifierConstant: &NSCalendarIdentifier, ) -> Option>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCalendarIdentifier:)] + #[method_id(@__retain_semantics Init initWithCalendarIdentifier:)] pub unsafe fn initWithCalendarIdentifier( this: Option>, ident: &NSCalendarIdentifier, ) -> Option>; - #[method_id(calendarIdentifier)] + #[method_id(@__retain_semantics Other calendarIdentifier)] pub unsafe fn calendarIdentifier(&self) -> Id; - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Option>; #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); - #[method_id(timeZone)] + #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Id; #[method(setTimeZone:)] @@ -173,64 +173,64 @@ extern_methods!( #[method(setMinimumDaysInFirstWeek:)] pub unsafe fn setMinimumDaysInFirstWeek(&self, minimumDaysInFirstWeek: NSUInteger); - #[method_id(eraSymbols)] + #[method_id(@__retain_semantics Other eraSymbols)] pub unsafe fn eraSymbols(&self) -> Id, Shared>; - #[method_id(longEraSymbols)] + #[method_id(@__retain_semantics Other longEraSymbols)] pub unsafe fn longEraSymbols(&self) -> Id, Shared>; - #[method_id(monthSymbols)] + #[method_id(@__retain_semantics Other monthSymbols)] pub unsafe fn monthSymbols(&self) -> Id, Shared>; - #[method_id(shortMonthSymbols)] + #[method_id(@__retain_semantics Other shortMonthSymbols)] pub unsafe fn shortMonthSymbols(&self) -> Id, Shared>; - #[method_id(veryShortMonthSymbols)] + #[method_id(@__retain_semantics Other veryShortMonthSymbols)] pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared>; - #[method_id(standaloneMonthSymbols)] + #[method_id(@__retain_semantics Other standaloneMonthSymbols)] pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared>; - #[method_id(shortStandaloneMonthSymbols)] + #[method_id(@__retain_semantics Other shortStandaloneMonthSymbols)] pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared>; - #[method_id(veryShortStandaloneMonthSymbols)] + #[method_id(@__retain_semantics Other veryShortStandaloneMonthSymbols)] pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared>; - #[method_id(weekdaySymbols)] + #[method_id(@__retain_semantics Other weekdaySymbols)] pub unsafe fn weekdaySymbols(&self) -> Id, Shared>; - #[method_id(shortWeekdaySymbols)] + #[method_id(@__retain_semantics Other shortWeekdaySymbols)] pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared>; - #[method_id(veryShortWeekdaySymbols)] + #[method_id(@__retain_semantics Other veryShortWeekdaySymbols)] pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared>; - #[method_id(standaloneWeekdaySymbols)] + #[method_id(@__retain_semantics Other standaloneWeekdaySymbols)] pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared>; - #[method_id(shortStandaloneWeekdaySymbols)] + #[method_id(@__retain_semantics Other shortStandaloneWeekdaySymbols)] pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared>; - #[method_id(veryShortStandaloneWeekdaySymbols)] + #[method_id(@__retain_semantics Other veryShortStandaloneWeekdaySymbols)] pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared>; - #[method_id(quarterSymbols)] + #[method_id(@__retain_semantics Other quarterSymbols)] pub unsafe fn quarterSymbols(&self) -> Id, Shared>; - #[method_id(shortQuarterSymbols)] + #[method_id(@__retain_semantics Other shortQuarterSymbols)] pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared>; - #[method_id(standaloneQuarterSymbols)] + #[method_id(@__retain_semantics Other standaloneQuarterSymbols)] pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared>; - #[method_id(shortStandaloneQuarterSymbols)] + #[method_id(@__retain_semantics Other shortStandaloneQuarterSymbols)] pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared>; - #[method_id(AMSymbol)] + #[method_id(@__retain_semantics Other AMSymbol)] pub unsafe fn AMSymbol(&self) -> Id; - #[method_id(PMSymbol)] + #[method_id(@__retain_semantics Other PMSymbol)] pub unsafe fn PMSymbol(&self) -> Id; #[method(minimumRangeOfUnit:)] @@ -264,20 +264,20 @@ extern_methods!( date: &NSDate, ) -> bool; - #[method_id(dateFromComponents:)] + #[method_id(@__retain_semantics Other dateFromComponents:)] pub unsafe fn dateFromComponents( &self, comps: &NSDateComponents, ) -> Option>; - #[method_id(components:fromDate:)] + #[method_id(@__retain_semantics Other components:fromDate:)] pub unsafe fn components_fromDate( &self, unitFlags: NSCalendarUnit, date: &NSDate, ) -> Id; - #[method_id(dateByAddingComponents:toDate:options:)] + #[method_id(@__retain_semantics Other dateByAddingComponents:toDate:options:)] pub unsafe fn dateByAddingComponents_toDate_options( &self, comps: &NSDateComponents, @@ -285,7 +285,7 @@ extern_methods!( opts: NSCalendarOptions, ) -> Option>; - #[method_id(components:fromDate:toDate:options:)] + #[method_id(@__retain_semantics Other components:fromDate:toDate:options:)] pub unsafe fn components_fromDate_toDate_options( &self, unitFlags: NSCalendarUnit, @@ -327,7 +327,7 @@ extern_methods!( #[method(component:fromDate:)] pub unsafe fn component_fromDate(&self, unit: NSCalendarUnit, date: &NSDate) -> NSInteger; - #[method_id(dateWithEra:year:month:day:hour:minute:second:nanosecond:)] + #[method_id(@__retain_semantics Other dateWithEra:year:month:day:hour:minute:second:nanosecond:)] pub unsafe fn dateWithEra_year_month_day_hour_minute_second_nanosecond( &self, eraValue: NSInteger, @@ -340,7 +340,7 @@ extern_methods!( nanosecondValue: NSInteger, ) -> Option>; - #[method_id(dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:)] + #[method_id(@__retain_semantics Other dateWithEra:yearForWeekOfYear:weekOfYear:weekday:hour:minute:second:nanosecond:)] pub unsafe fn dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond( &self, eraValue: NSInteger, @@ -353,10 +353,10 @@ extern_methods!( nanosecondValue: NSInteger, ) -> Option>; - #[method_id(startOfDayForDate:)] + #[method_id(@__retain_semantics Other startOfDayForDate:)] pub unsafe fn startOfDayForDate(&self, date: &NSDate) -> Id; - #[method_id(componentsInTimeZone:fromDate:)] + #[method_id(@__retain_semantics Other componentsInTimeZone:fromDate:)] pub unsafe fn componentsInTimeZone_fromDate( &self, timezone: &NSTimeZone, @@ -411,7 +411,7 @@ extern_methods!( date: &NSDate, ) -> bool; - #[method_id(components:fromDateComponents:toDateComponents:options:)] + #[method_id(@__retain_semantics Other components:fromDateComponents:toDateComponents:options:)] pub unsafe fn components_fromDateComponents_toDateComponents_options( &self, unitFlags: NSCalendarUnit, @@ -420,7 +420,7 @@ extern_methods!( options: NSCalendarOptions, ) -> Id; - #[method_id(dateByAddingUnit:value:toDate:options:)] + #[method_id(@__retain_semantics Other dateByAddingUnit:value:toDate:options:)] pub unsafe fn dateByAddingUnit_value_toDate_options( &self, unit: NSCalendarUnit, @@ -438,7 +438,7 @@ extern_methods!( block: TodoBlock, ); - #[method_id(nextDateAfterDate:matchingComponents:options:)] + #[method_id(@__retain_semantics Other nextDateAfterDate:matchingComponents:options:)] pub unsafe fn nextDateAfterDate_matchingComponents_options( &self, date: &NSDate, @@ -446,7 +446,7 @@ extern_methods!( options: NSCalendarOptions, ) -> Option>; - #[method_id(nextDateAfterDate:matchingUnit:value:options:)] + #[method_id(@__retain_semantics Other nextDateAfterDate:matchingUnit:value:options:)] pub unsafe fn nextDateAfterDate_matchingUnit_value_options( &self, date: &NSDate, @@ -455,7 +455,7 @@ extern_methods!( options: NSCalendarOptions, ) -> Option>; - #[method_id(nextDateAfterDate:matchingHour:minute:second:options:)] + #[method_id(@__retain_semantics Other nextDateAfterDate:matchingHour:minute:second:options:)] pub unsafe fn nextDateAfterDate_matchingHour_minute_second_options( &self, date: &NSDate, @@ -465,7 +465,7 @@ extern_methods!( options: NSCalendarOptions, ) -> Option>; - #[method_id(dateBySettingUnit:value:ofDate:options:)] + #[method_id(@__retain_semantics Other dateBySettingUnit:value:ofDate:options:)] pub unsafe fn dateBySettingUnit_value_ofDate_options( &self, unit: NSCalendarUnit, @@ -474,7 +474,7 @@ extern_methods!( opts: NSCalendarOptions, ) -> Option>; - #[method_id(dateBySettingHour:minute:second:ofDate:options:)] + #[method_id(@__retain_semantics Other dateBySettingHour:minute:second:ofDate:options:)] pub unsafe fn dateBySettingHour_minute_second_ofDate_options( &self, h: NSInteger, @@ -511,13 +511,13 @@ extern_class!( extern_methods!( unsafe impl NSDateComponents { - #[method_id(calendar)] + #[method_id(@__retain_semantics Other calendar)] pub unsafe fn calendar(&self) -> Option>; #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); - #[method_id(timeZone)] + #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Option>; #[method(setTimeZone:)] @@ -613,7 +613,7 @@ extern_methods!( #[method(setLeapMonth:)] pub unsafe fn setLeapMonth(&self, leapMonth: bool); - #[method_id(date)] + #[method_id(@__retain_semantics Other date)] pub unsafe fn date(&self) -> Option>; #[method(week)] diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index 0b7a8a409..d25148c61 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -14,23 +14,23 @@ extern_class!( extern_methods!( unsafe impl NSCalendarDate { - #[method_id(calendarDate)] + #[method_id(@__retain_semantics Other calendarDate)] pub unsafe fn calendarDate() -> Id; - #[method_id(dateWithString:calendarFormat:locale:)] + #[method_id(@__retain_semantics Other dateWithString:calendarFormat:locale:)] pub unsafe fn dateWithString_calendarFormat_locale( description: &NSString, format: &NSString, locale: Option<&Object>, ) -> Option>; - #[method_id(dateWithString:calendarFormat:)] + #[method_id(@__retain_semantics Other dateWithString:calendarFormat:)] pub unsafe fn dateWithString_calendarFormat( description: &NSString, format: &NSString, ) -> Option>; - #[method_id(dateWithYear:month:day:hour:minute:second:timeZone:)] + #[method_id(@__retain_semantics Other dateWithYear:month:day:hour:minute:second:timeZone:)] pub unsafe fn dateWithYear_month_day_hour_minute_second_timeZone( year: NSInteger, month: NSUInteger, @@ -41,7 +41,7 @@ extern_methods!( aTimeZone: Option<&NSTimeZone>, ) -> Id; - #[method_id(dateByAddingYears:months:days:hours:minutes:seconds:)] + #[method_id(@__retain_semantics Other dateByAddingYears:months:days:hours:minutes:seconds:)] pub unsafe fn dateByAddingYears_months_days_hours_minutes_seconds( &self, year: NSInteger, @@ -79,30 +79,30 @@ extern_methods!( #[method(yearOfCommonEra)] pub unsafe fn yearOfCommonEra(&self) -> NSInteger; - #[method_id(calendarFormat)] + #[method_id(@__retain_semantics Other calendarFormat)] pub unsafe fn calendarFormat(&self) -> Id; - #[method_id(descriptionWithCalendarFormat:locale:)] + #[method_id(@__retain_semantics Other descriptionWithCalendarFormat:locale:)] pub unsafe fn descriptionWithCalendarFormat_locale( &self, format: &NSString, locale: Option<&Object>, ) -> Id; - #[method_id(descriptionWithCalendarFormat:)] + #[method_id(@__retain_semantics Other descriptionWithCalendarFormat:)] pub unsafe fn descriptionWithCalendarFormat( &self, format: &NSString, ) -> Id; - #[method_id(descriptionWithLocale:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; - #[method_id(timeZone)] + #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Id; - #[method_id(initWithString:calendarFormat:locale:)] + #[method_id(@__retain_semantics Init initWithString:calendarFormat:locale:)] pub unsafe fn initWithString_calendarFormat_locale( this: Option>, description: &NSString, @@ -110,20 +110,20 @@ extern_methods!( locale: Option<&Object>, ) -> Option>; - #[method_id(initWithString:calendarFormat:)] + #[method_id(@__retain_semantics Init initWithString:calendarFormat:)] pub unsafe fn initWithString_calendarFormat( this: Option>, description: &NSString, format: &NSString, ) -> Option>; - #[method_id(initWithString:)] + #[method_id(@__retain_semantics Init initWithString:)] pub unsafe fn initWithString( this: Option>, description: &NSString, ) -> Option>; - #[method_id(initWithYear:month:day:hour:minute:second:timeZone:)] + #[method_id(@__retain_semantics Init initWithYear:month:day:hour:minute:second:timeZone:)] pub unsafe fn initWithYear_month_day_hour_minute_second_timeZone( this: Option>, year: NSInteger, @@ -153,10 +153,10 @@ extern_methods!( date: &NSCalendarDate, ); - #[method_id(distantFuture)] + #[method_id(@__retain_semantics Other distantFuture)] pub unsafe fn distantFuture() -> Id; - #[method_id(distantPast)] + #[method_id(@__retain_semantics Other distantPast)] pub unsafe fn distantPast() -> Id; } ); @@ -164,28 +164,28 @@ extern_methods!( extern_methods!( /// NSCalendarDateExtras unsafe impl NSDate { - #[method_id(dateWithNaturalLanguageString:locale:)] + #[method_id(@__retain_semantics Other dateWithNaturalLanguageString:locale:)] pub unsafe fn dateWithNaturalLanguageString_locale( string: &NSString, locale: Option<&Object>, ) -> Option>; - #[method_id(dateWithNaturalLanguageString:)] + #[method_id(@__retain_semantics Other dateWithNaturalLanguageString:)] pub unsafe fn dateWithNaturalLanguageString( string: &NSString, ) -> Option>; - #[method_id(dateWithString:)] + #[method_id(@__retain_semantics Other dateWithString:)] pub unsafe fn dateWithString(aString: &NSString) -> Id; - #[method_id(dateWithCalendarFormat:timeZone:)] + #[method_id(@__retain_semantics Other dateWithCalendarFormat:timeZone:)] pub unsafe fn dateWithCalendarFormat_timeZone( &self, format: Option<&NSString>, aTimeZone: Option<&NSTimeZone>, ) -> Id; - #[method_id(descriptionWithCalendarFormat:timeZone:locale:)] + #[method_id(@__retain_semantics Other descriptionWithCalendarFormat:timeZone:locale:)] pub unsafe fn descriptionWithCalendarFormat_timeZone_locale( &self, format: Option<&NSString>, @@ -193,7 +193,7 @@ extern_methods!( locale: Option<&Object>, ) -> Option>; - #[method_id(initWithString:)] + #[method_id(@__retain_semantics Init initWithString:)] pub unsafe fn initWithString( this: Option>, description: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index feec50d93..3ece92fd8 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -16,70 +16,70 @@ extern_class!( extern_methods!( unsafe impl NSCharacterSet { - #[method_id(controlCharacterSet)] + #[method_id(@__retain_semantics Other controlCharacterSet)] pub unsafe fn controlCharacterSet() -> Id; - #[method_id(whitespaceCharacterSet)] + #[method_id(@__retain_semantics Other whitespaceCharacterSet)] pub unsafe fn whitespaceCharacterSet() -> Id; - #[method_id(whitespaceAndNewlineCharacterSet)] + #[method_id(@__retain_semantics Other whitespaceAndNewlineCharacterSet)] pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id; - #[method_id(decimalDigitCharacterSet)] + #[method_id(@__retain_semantics Other decimalDigitCharacterSet)] pub unsafe fn decimalDigitCharacterSet() -> Id; - #[method_id(letterCharacterSet)] + #[method_id(@__retain_semantics Other letterCharacterSet)] pub unsafe fn letterCharacterSet() -> Id; - #[method_id(lowercaseLetterCharacterSet)] + #[method_id(@__retain_semantics Other lowercaseLetterCharacterSet)] pub unsafe fn lowercaseLetterCharacterSet() -> Id; - #[method_id(uppercaseLetterCharacterSet)] + #[method_id(@__retain_semantics Other uppercaseLetterCharacterSet)] pub unsafe fn uppercaseLetterCharacterSet() -> Id; - #[method_id(nonBaseCharacterSet)] + #[method_id(@__retain_semantics Other nonBaseCharacterSet)] pub unsafe fn nonBaseCharacterSet() -> Id; - #[method_id(alphanumericCharacterSet)] + #[method_id(@__retain_semantics Other alphanumericCharacterSet)] pub unsafe fn alphanumericCharacterSet() -> Id; - #[method_id(decomposableCharacterSet)] + #[method_id(@__retain_semantics Other decomposableCharacterSet)] pub unsafe fn decomposableCharacterSet() -> Id; - #[method_id(illegalCharacterSet)] + #[method_id(@__retain_semantics Other illegalCharacterSet)] pub unsafe fn illegalCharacterSet() -> Id; - #[method_id(punctuationCharacterSet)] + #[method_id(@__retain_semantics Other punctuationCharacterSet)] pub unsafe fn punctuationCharacterSet() -> Id; - #[method_id(capitalizedLetterCharacterSet)] + #[method_id(@__retain_semantics Other capitalizedLetterCharacterSet)] pub unsafe fn capitalizedLetterCharacterSet() -> Id; - #[method_id(symbolCharacterSet)] + #[method_id(@__retain_semantics Other symbolCharacterSet)] pub unsafe fn symbolCharacterSet() -> Id; - #[method_id(newlineCharacterSet)] + #[method_id(@__retain_semantics Other newlineCharacterSet)] pub unsafe fn newlineCharacterSet() -> Id; - #[method_id(characterSetWithRange:)] + #[method_id(@__retain_semantics Other characterSetWithRange:)] pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id; - #[method_id(characterSetWithCharactersInString:)] + #[method_id(@__retain_semantics Other characterSetWithCharactersInString:)] pub unsafe fn characterSetWithCharactersInString( aString: &NSString, ) -> Id; - #[method_id(characterSetWithBitmapRepresentation:)] + #[method_id(@__retain_semantics Other characterSetWithBitmapRepresentation:)] pub unsafe fn characterSetWithBitmapRepresentation( data: &NSData, ) -> Id; - #[method_id(characterSetWithContentsOfFile:)] + #[method_id(@__retain_semantics Other characterSetWithContentsOfFile:)] pub unsafe fn characterSetWithContentsOfFile( fName: &NSString, ) -> Option>; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -88,10 +88,10 @@ extern_methods!( #[method(characterIsMember:)] pub unsafe fn characterIsMember(&self, aCharacter: unichar) -> bool; - #[method_id(bitmapRepresentation)] + #[method_id(@__retain_semantics Other bitmapRepresentation)] pub unsafe fn bitmapRepresentation(&self) -> Id; - #[method_id(invertedSet)] + #[method_id(@__retain_semantics Other invertedSet)] pub unsafe fn invertedSet(&self) -> Id; #[method(longCharacterIsMember:)] @@ -137,65 +137,65 @@ extern_methods!( #[method(invert)] pub unsafe fn invert(&self); - #[method_id(controlCharacterSet)] + #[method_id(@__retain_semantics Other controlCharacterSet)] pub unsafe fn controlCharacterSet() -> Id; - #[method_id(whitespaceCharacterSet)] + #[method_id(@__retain_semantics Other whitespaceCharacterSet)] pub unsafe fn whitespaceCharacterSet() -> Id; - #[method_id(whitespaceAndNewlineCharacterSet)] + #[method_id(@__retain_semantics Other whitespaceAndNewlineCharacterSet)] pub unsafe fn whitespaceAndNewlineCharacterSet() -> Id; - #[method_id(decimalDigitCharacterSet)] + #[method_id(@__retain_semantics Other decimalDigitCharacterSet)] pub unsafe fn decimalDigitCharacterSet() -> Id; - #[method_id(letterCharacterSet)] + #[method_id(@__retain_semantics Other letterCharacterSet)] pub unsafe fn letterCharacterSet() -> Id; - #[method_id(lowercaseLetterCharacterSet)] + #[method_id(@__retain_semantics Other lowercaseLetterCharacterSet)] pub unsafe fn lowercaseLetterCharacterSet() -> Id; - #[method_id(uppercaseLetterCharacterSet)] + #[method_id(@__retain_semantics Other uppercaseLetterCharacterSet)] pub unsafe fn uppercaseLetterCharacterSet() -> Id; - #[method_id(nonBaseCharacterSet)] + #[method_id(@__retain_semantics Other nonBaseCharacterSet)] pub unsafe fn nonBaseCharacterSet() -> Id; - #[method_id(alphanumericCharacterSet)] + #[method_id(@__retain_semantics Other alphanumericCharacterSet)] pub unsafe fn alphanumericCharacterSet() -> Id; - #[method_id(decomposableCharacterSet)] + #[method_id(@__retain_semantics Other decomposableCharacterSet)] pub unsafe fn decomposableCharacterSet() -> Id; - #[method_id(illegalCharacterSet)] + #[method_id(@__retain_semantics Other illegalCharacterSet)] pub unsafe fn illegalCharacterSet() -> Id; - #[method_id(punctuationCharacterSet)] + #[method_id(@__retain_semantics Other punctuationCharacterSet)] pub unsafe fn punctuationCharacterSet() -> Id; - #[method_id(capitalizedLetterCharacterSet)] + #[method_id(@__retain_semantics Other capitalizedLetterCharacterSet)] pub unsafe fn capitalizedLetterCharacterSet() -> Id; - #[method_id(symbolCharacterSet)] + #[method_id(@__retain_semantics Other symbolCharacterSet)] pub unsafe fn symbolCharacterSet() -> Id; - #[method_id(newlineCharacterSet)] + #[method_id(@__retain_semantics Other newlineCharacterSet)] pub unsafe fn newlineCharacterSet() -> Id; - #[method_id(characterSetWithRange:)] + #[method_id(@__retain_semantics Other characterSetWithRange:)] pub unsafe fn characterSetWithRange(aRange: NSRange) -> Id; - #[method_id(characterSetWithCharactersInString:)] + #[method_id(@__retain_semantics Other characterSetWithCharactersInString:)] pub unsafe fn characterSetWithCharactersInString( aString: &NSString, ) -> Id; - #[method_id(characterSetWithBitmapRepresentation:)] + #[method_id(@__retain_semantics Other characterSetWithBitmapRepresentation:)] pub unsafe fn characterSetWithBitmapRepresentation( data: &NSData, ) -> Id; - #[method_id(characterSetWithContentsOfFile:)] + #[method_id(@__retain_semantics Other characterSetWithContentsOfFile:)] pub unsafe fn characterSetWithContentsOfFile( fName: &NSString, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index 5268a420e..8e37d18e8 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -23,21 +23,21 @@ extern_methods!( #[method(invalidateClassDescriptionCache)] pub unsafe fn invalidateClassDescriptionCache(); - #[method_id(classDescriptionForClass:)] + #[method_id(@__retain_semantics Other classDescriptionForClass:)] pub unsafe fn classDescriptionForClass( aClass: &Class, ) -> Option>; - #[method_id(attributeKeys)] + #[method_id(@__retain_semantics Other attributeKeys)] pub unsafe fn attributeKeys(&self) -> Id, Shared>; - #[method_id(toOneRelationshipKeys)] + #[method_id(@__retain_semantics Other toOneRelationshipKeys)] pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared>; - #[method_id(toManyRelationshipKeys)] + #[method_id(@__retain_semantics Other toManyRelationshipKeys)] pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared>; - #[method_id(inverseForRelationshipKey:)] + #[method_id(@__retain_semantics Other inverseForRelationshipKey:)] pub unsafe fn inverseForRelationshipKey( &self, relationshipKey: &NSString, @@ -48,19 +48,19 @@ extern_methods!( extern_methods!( /// NSClassDescriptionPrimitives unsafe impl NSObject { - #[method_id(classDescription)] + #[method_id(@__retain_semantics Other classDescription)] pub unsafe fn classDescription(&self) -> Id; - #[method_id(attributeKeys)] + #[method_id(@__retain_semantics Other attributeKeys)] pub unsafe fn attributeKeys(&self) -> Id, Shared>; - #[method_id(toOneRelationshipKeys)] + #[method_id(@__retain_semantics Other toOneRelationshipKeys)] pub unsafe fn toOneRelationshipKeys(&self) -> Id, Shared>; - #[method_id(toManyRelationshipKeys)] + #[method_id(@__retain_semantics Other toManyRelationshipKeys)] pub unsafe fn toManyRelationshipKeys(&self) -> Id, Shared>; - #[method_id(inverseForRelationshipKey:)] + #[method_id(@__retain_semantics Other inverseForRelationshipKey:)] pub unsafe fn inverseForRelationshipKey( &self, relationshipKey: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index a55e88dc9..2a1c58846 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -28,7 +28,7 @@ extern_methods!( #[method(encodeDataObject:)] pub unsafe fn encodeDataObject(&self, data: &NSData); - #[method_id(decodeDataObject)] + #[method_id(@__retain_semantics Other decodeDataObject)] pub unsafe fn decodeDataObject(&self) -> Option>; #[method(decodeValueOfObjCType:at:size:)] @@ -73,10 +73,10 @@ extern_methods!( #[method(encodeBytes:length:)] pub unsafe fn encodeBytes_length(&self, byteaddr: *mut c_void, length: NSUInteger); - #[method_id(decodeObject)] + #[method_id(@__retain_semantics Other decodeObject)] pub unsafe fn decodeObject(&self) -> Option>; - #[method_id(decodeTopLevelObjectAndReturnError:)] + #[method_id(@__retain_semantics Other decodeTopLevelObjectAndReturnError:)] pub unsafe fn decodeTopLevelObjectAndReturnError( &self, ) -> Result, Id>; @@ -98,7 +98,7 @@ extern_methods!( #[method(encodePropertyList:)] pub unsafe fn encodePropertyList(&self, aPropertyList: &Object); - #[method_id(decodePropertyList)] + #[method_id(@__retain_semantics Other decodePropertyList)] pub unsafe fn decodePropertyList(&self) -> Option>; #[method(setObjectZone:)] @@ -152,10 +152,10 @@ extern_methods!( #[method(containsValueForKey:)] pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; - #[method_id(decodeObjectForKey:)] + #[method_id(@__retain_semantics Other decodeObjectForKey:)] pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option>; - #[method_id(decodeTopLevelObjectForKey:error:)] + #[method_id(@__retain_semantics Other decodeTopLevelObjectForKey:error:)] pub unsafe fn decodeTopLevelObjectForKey_error( &self, key: &NSString, @@ -195,28 +195,28 @@ extern_methods!( #[method(requiresSecureCoding)] pub unsafe fn requiresSecureCoding(&self) -> bool; - #[method_id(decodeObjectOfClass:forKey:)] + #[method_id(@__retain_semantics Other decodeObjectOfClass:forKey:)] pub unsafe fn decodeObjectOfClass_forKey( &self, aClass: &Class, key: &NSString, ) -> Option>; - #[method_id(decodeTopLevelObjectOfClass:forKey:error:)] + #[method_id(@__retain_semantics Other decodeTopLevelObjectOfClass:forKey:error:)] pub unsafe fn decodeTopLevelObjectOfClass_forKey_error( &self, aClass: &Class, key: &NSString, ) -> Result, Id>; - #[method_id(decodeArrayOfObjectsOfClass:forKey:)] + #[method_id(@__retain_semantics Other decodeArrayOfObjectsOfClass:forKey:)] pub unsafe fn decodeArrayOfObjectsOfClass_forKey( &self, cls: &Class, key: &NSString, ) -> Option>; - #[method_id(decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:)] + #[method_id(@__retain_semantics Other decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:)] pub unsafe fn decodeDictionaryWithKeysOfClass_objectsOfClass_forKey( &self, keyCls: &Class, @@ -224,28 +224,28 @@ extern_methods!( key: &NSString, ) -> Option>; - #[method_id(decodeObjectOfClasses:forKey:)] + #[method_id(@__retain_semantics Other decodeObjectOfClasses:forKey:)] pub unsafe fn decodeObjectOfClasses_forKey( &self, classes: Option<&NSSet>, key: &NSString, ) -> Option>; - #[method_id(decodeTopLevelObjectOfClasses:forKey:error:)] + #[method_id(@__retain_semantics Other decodeTopLevelObjectOfClasses:forKey:error:)] pub unsafe fn decodeTopLevelObjectOfClasses_forKey_error( &self, classes: Option<&NSSet>, key: &NSString, ) -> Result, Id>; - #[method_id(decodeArrayOfObjectsOfClasses:forKey:)] + #[method_id(@__retain_semantics Other decodeArrayOfObjectsOfClasses:forKey:)] pub unsafe fn decodeArrayOfObjectsOfClasses_forKey( &self, classes: &NSSet, key: &NSString, ) -> Option>; - #[method_id(decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:)] + #[method_id(@__retain_semantics Other decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:)] pub unsafe fn decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey( &self, keyClasses: &NSSet, @@ -253,11 +253,11 @@ extern_methods!( key: &NSString, ) -> Option>; - #[method_id(decodePropertyListForKey:)] + #[method_id(@__retain_semantics Other decodePropertyListForKey:)] pub unsafe fn decodePropertyListForKey(&self, key: &NSString) -> Option>; - #[method_id(allowedClasses)] + #[method_id(@__retain_semantics Other allowedClasses)] pub unsafe fn allowedClasses(&self) -> Option, Shared>>; #[method(failWithError:)] @@ -266,7 +266,7 @@ extern_methods!( #[method(decodingFailurePolicy)] pub unsafe fn decodingFailurePolicy(&self) -> NSDecodingFailurePolicy; - #[method_id(error)] + #[method_id(@__retain_semantics Other error)] pub unsafe fn error(&self) -> Option>; } ); @@ -277,7 +277,7 @@ extern_methods!( #[method(encodeNXObject:)] pub unsafe fn encodeNXObject(&self, object: &Object); - #[method_id(decodeNXObject)] + #[method_id(@__retain_semantics Other decodeNXObject)] pub unsafe fn decodeNXObject(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index 35fc09dbf..ae68a3db6 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -40,7 +40,7 @@ extern_class!( extern_methods!( unsafe impl NSComparisonPredicate { - #[method_id(predicateWithLeftExpression:rightExpression:modifier:type:options:)] + #[method_id(@__retain_semantics Other predicateWithLeftExpression:rightExpression:modifier:type:options:)] pub unsafe fn predicateWithLeftExpression_rightExpression_modifier_type_options( lhs: &NSExpression, rhs: &NSExpression, @@ -49,14 +49,14 @@ extern_methods!( options: NSComparisonPredicateOptions, ) -> Id; - #[method_id(predicateWithLeftExpression:rightExpression:customSelector:)] + #[method_id(@__retain_semantics Other predicateWithLeftExpression:rightExpression:customSelector:)] pub unsafe fn predicateWithLeftExpression_rightExpression_customSelector( lhs: &NSExpression, rhs: &NSExpression, selector: Sel, ) -> Id; - #[method_id(initWithLeftExpression:rightExpression:modifier:type:options:)] + #[method_id(@__retain_semantics Init initWithLeftExpression:rightExpression:modifier:type:options:)] pub unsafe fn initWithLeftExpression_rightExpression_modifier_type_options( this: Option>, lhs: &NSExpression, @@ -66,7 +66,7 @@ extern_methods!( options: NSComparisonPredicateOptions, ) -> Id; - #[method_id(initWithLeftExpression:rightExpression:customSelector:)] + #[method_id(@__retain_semantics Init initWithLeftExpression:rightExpression:customSelector:)] pub unsafe fn initWithLeftExpression_rightExpression_customSelector( this: Option>, lhs: &NSExpression, @@ -74,7 +74,7 @@ extern_methods!( selector: Sel, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -86,10 +86,10 @@ extern_methods!( #[method(comparisonPredicateModifier)] pub unsafe fn comparisonPredicateModifier(&self) -> NSComparisonPredicateModifier; - #[method_id(leftExpression)] + #[method_id(@__retain_semantics Other leftExpression)] pub unsafe fn leftExpression(&self) -> Id; - #[method_id(rightExpression)] + #[method_id(@__retain_semantics Other rightExpression)] pub unsafe fn rightExpression(&self) -> Id; #[method(customSelector)] diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index ed3054b9f..9907826c7 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -19,14 +19,14 @@ extern_class!( extern_methods!( unsafe impl NSCompoundPredicate { - #[method_id(initWithType:subpredicates:)] + #[method_id(@__retain_semantics Init initWithType:subpredicates:)] pub unsafe fn initWithType_subpredicates( this: Option>, type_: NSCompoundPredicateType, subpredicates: &NSArray, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -35,20 +35,20 @@ extern_methods!( #[method(compoundPredicateType)] pub unsafe fn compoundPredicateType(&self) -> NSCompoundPredicateType; - #[method_id(subpredicates)] + #[method_id(@__retain_semantics Other subpredicates)] pub unsafe fn subpredicates(&self) -> Id; - #[method_id(andPredicateWithSubpredicates:)] + #[method_id(@__retain_semantics Other andPredicateWithSubpredicates:)] pub unsafe fn andPredicateWithSubpredicates( subpredicates: &NSArray, ) -> Id; - #[method_id(orPredicateWithSubpredicates:)] + #[method_id(@__retain_semantics Other orPredicateWithSubpredicates:)] pub unsafe fn orPredicateWithSubpredicates( subpredicates: &NSArray, ) -> Id; - #[method_id(notPredicateWithSubpredicate:)] + #[method_id(@__retain_semantics Other notPredicateWithSubpredicate:)] pub unsafe fn notPredicateWithSubpredicate( predicate: &NSPredicate, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 2b751a7e4..e3ff0a859 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -14,49 +14,49 @@ extern_class!( extern_methods!( unsafe impl NSConnection { - #[method_id(statistics)] + #[method_id(@__retain_semantics Other statistics)] pub unsafe fn statistics(&self) -> Id, Shared>; - #[method_id(allConnections)] + #[method_id(@__retain_semantics Other allConnections)] pub unsafe fn allConnections() -> Id, Shared>; - #[method_id(defaultConnection)] + #[method_id(@__retain_semantics Other defaultConnection)] pub unsafe fn defaultConnection() -> Id; - #[method_id(connectionWithRegisteredName:host:)] + #[method_id(@__retain_semantics Other connectionWithRegisteredName:host:)] pub unsafe fn connectionWithRegisteredName_host( name: &NSString, hostName: Option<&NSString>, ) -> Option>; - #[method_id(connectionWithRegisteredName:host:usingNameServer:)] + #[method_id(@__retain_semantics Other connectionWithRegisteredName:host:usingNameServer:)] pub unsafe fn connectionWithRegisteredName_host_usingNameServer( name: &NSString, hostName: Option<&NSString>, server: &NSPortNameServer, ) -> Option>; - #[method_id(rootProxyForConnectionWithRegisteredName:host:)] + #[method_id(@__retain_semantics Other rootProxyForConnectionWithRegisteredName:host:)] pub unsafe fn rootProxyForConnectionWithRegisteredName_host( name: &NSString, hostName: Option<&NSString>, ) -> Option>; - #[method_id(rootProxyForConnectionWithRegisteredName:host:usingNameServer:)] + #[method_id(@__retain_semantics Other rootProxyForConnectionWithRegisteredName:host:usingNameServer:)] pub unsafe fn rootProxyForConnectionWithRegisteredName_host_usingNameServer( name: &NSString, hostName: Option<&NSString>, server: &NSPortNameServer, ) -> Option>; - #[method_id(serviceConnectionWithName:rootObject:usingNameServer:)] + #[method_id(@__retain_semantics Other serviceConnectionWithName:rootObject:usingNameServer:)] pub unsafe fn serviceConnectionWithName_rootObject_usingNameServer( name: &NSString, root: &Object, server: &NSPortNameServer, ) -> Option>; - #[method_id(serviceConnectionWithName:rootObject:)] + #[method_id(@__retain_semantics Other serviceConnectionWithName:rootObject:)] pub unsafe fn serviceConnectionWithName_rootObject( name: &NSString, root: &Object, @@ -74,13 +74,13 @@ extern_methods!( #[method(setReplyTimeout:)] pub unsafe fn setReplyTimeout(&self, replyTimeout: NSTimeInterval); - #[method_id(rootObject)] + #[method_id(@__retain_semantics Other rootObject)] pub unsafe fn rootObject(&self) -> Option>; #[method(setRootObject:)] pub unsafe fn setRootObject(&self, rootObject: Option<&Object>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -98,7 +98,7 @@ extern_methods!( #[method(isValid)] pub unsafe fn isValid(&self) -> bool; - #[method_id(rootProxy)] + #[method_id(@__retain_semantics Other rootProxy)] pub unsafe fn rootProxy(&self) -> Id; #[method(invalidate)] @@ -110,7 +110,7 @@ extern_methods!( #[method(removeRequestMode:)] pub unsafe fn removeRequestMode(&self, rmode: &NSString); - #[method_id(requestModes)] + #[method_id(@__retain_semantics Other requestModes)] pub unsafe fn requestModes(&self) -> Id, Shared>; #[method(registerName:)] @@ -123,26 +123,26 @@ extern_methods!( server: &NSPortNameServer, ) -> bool; - #[method_id(connectionWithReceivePort:sendPort:)] + #[method_id(@__retain_semantics Other connectionWithReceivePort:sendPort:)] pub unsafe fn connectionWithReceivePort_sendPort( receivePort: Option<&NSPort>, sendPort: Option<&NSPort>, ) -> Option>; - #[method_id(currentConversation)] + #[method_id(@__retain_semantics Other currentConversation)] pub unsafe fn currentConversation() -> Option>; - #[method_id(initWithReceivePort:sendPort:)] + #[method_id(@__retain_semantics Init initWithReceivePort:sendPort:)] pub unsafe fn initWithReceivePort_sendPort( this: Option>, receivePort: Option<&NSPort>, sendPort: Option<&NSPort>, ) -> Option>; - #[method_id(sendPort)] + #[method_id(@__retain_semantics Other sendPort)] pub unsafe fn sendPort(&self) -> Id; - #[method_id(receivePort)] + #[method_id(@__retain_semantics Other receivePort)] pub unsafe fn receivePort(&self) -> Id; #[method(enableMultipleThreads)] @@ -160,10 +160,10 @@ extern_methods!( #[method(runInNewThread)] pub unsafe fn runInNewThread(&self); - #[method_id(remoteObjects)] + #[method_id(@__retain_semantics Other remoteObjects)] pub unsafe fn remoteObjects(&self) -> Id; - #[method_id(localObjects)] + #[method_id(@__retain_semantics Other localObjects)] pub unsafe fn localObjects(&self) -> Id; #[method(dispatchWithComponents:)] @@ -200,13 +200,13 @@ extern_class!( extern_methods!( unsafe impl NSDistantObjectRequest { - #[method_id(invocation)] + #[method_id(@__retain_semantics Other invocation)] pub unsafe fn invocation(&self) -> Id; - #[method_id(connection)] + #[method_id(@__retain_semantics Other connection)] pub unsafe fn connection(&self) -> Id; - #[method_id(conversation)] + #[method_id(@__retain_semantics Other conversation)] pub unsafe fn conversation(&self) -> Id; #[method(replyWithException:)] diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index d2d141ea0..c4419a360 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -57,7 +57,7 @@ extern_methods!( extern_methods!( /// NSExtendedData unsafe impl NSData { - #[method_id(description)] + #[method_id(@__retain_semantics Other description)] pub unsafe fn description(&self) -> Id; #[method(getBytes:length:)] @@ -69,7 +69,7 @@ extern_methods!( #[method(isEqualToData:)] pub unsafe fn isEqualToData(&self, other: &NSData) -> bool; - #[method_id(subdataWithRange:)] + #[method_id(@__retain_semantics Other subdataWithRange:)] pub unsafe fn subdataWithRange(&self, range: NSRange) -> Id; #[method(writeToFile:atomically:)] @@ -112,61 +112,61 @@ extern_methods!( extern_methods!( /// NSDataCreation unsafe impl NSData { - #[method_id(data)] + #[method_id(@__retain_semantics Other data)] pub unsafe fn data() -> Id; - #[method_id(dataWithBytes:length:)] + #[method_id(@__retain_semantics Other dataWithBytes:length:)] pub unsafe fn dataWithBytes_length( bytes: *mut c_void, length: NSUInteger, ) -> Id; - #[method_id(dataWithBytesNoCopy:length:)] + #[method_id(@__retain_semantics Other dataWithBytesNoCopy:length:)] pub unsafe fn dataWithBytesNoCopy_length( bytes: NonNull, length: NSUInteger, ) -> Id; - #[method_id(dataWithBytesNoCopy:length:freeWhenDone:)] + #[method_id(@__retain_semantics Other dataWithBytesNoCopy:length:freeWhenDone:)] pub unsafe fn dataWithBytesNoCopy_length_freeWhenDone( bytes: NonNull, length: NSUInteger, b: bool, ) -> Id; - #[method_id(dataWithContentsOfFile:options:error:)] + #[method_id(@__retain_semantics Other dataWithContentsOfFile:options:error:)] pub unsafe fn dataWithContentsOfFile_options_error( path: &NSString, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; - #[method_id(dataWithContentsOfURL:options:error:)] + #[method_id(@__retain_semantics Other dataWithContentsOfURL:options:error:)] pub unsafe fn dataWithContentsOfURL_options_error( url: &NSURL, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; - #[method_id(dataWithContentsOfFile:)] + #[method_id(@__retain_semantics Other dataWithContentsOfFile:)] pub unsafe fn dataWithContentsOfFile(path: &NSString) -> Option>; - #[method_id(dataWithContentsOfURL:)] + #[method_id(@__retain_semantics Other dataWithContentsOfURL:)] pub unsafe fn dataWithContentsOfURL(url: &NSURL) -> Option>; - #[method_id(initWithBytes:length:)] + #[method_id(@__retain_semantics Init initWithBytes:length:)] pub unsafe fn initWithBytes_length( this: Option>, bytes: *mut c_void, length: NSUInteger, ) -> Id; - #[method_id(initWithBytesNoCopy:length:)] + #[method_id(@__retain_semantics Init initWithBytesNoCopy:length:)] pub unsafe fn initWithBytesNoCopy_length( this: Option>, bytes: NonNull, length: NSUInteger, ) -> Id; - #[method_id(initWithBytesNoCopy:length:freeWhenDone:)] + #[method_id(@__retain_semantics Init initWithBytesNoCopy:length:freeWhenDone:)] pub unsafe fn initWithBytesNoCopy_length_freeWhenDone( this: Option>, bytes: NonNull, @@ -174,7 +174,7 @@ extern_methods!( b: bool, ) -> Id; - #[method_id(initWithBytesNoCopy:length:deallocator:)] + #[method_id(@__retain_semantics Init initWithBytesNoCopy:length:deallocator:)] pub unsafe fn initWithBytesNoCopy_length_deallocator( this: Option>, bytes: NonNull, @@ -182,39 +182,39 @@ extern_methods!( deallocator: TodoBlock, ) -> Id; - #[method_id(initWithContentsOfFile:options:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:options:error:)] pub unsafe fn initWithContentsOfFile_options_error( this: Option>, path: &NSString, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; - #[method_id(initWithContentsOfURL:options:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( this: Option>, url: &NSURL, readOptionsMask: NSDataReadingOptions, ) -> Result, Id>; - #[method_id(initWithContentsOfFile:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( this: Option>, path: &NSString, ) -> Option>; - #[method_id(initWithContentsOfURL:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, url: &NSURL, ) -> Option>; - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, data: &NSData, ) -> Id; - #[method_id(dataWithData:)] + #[method_id(@__retain_semantics Other dataWithData:)] pub unsafe fn dataWithData(data: &NSData) -> Id; } ); @@ -222,27 +222,27 @@ extern_methods!( extern_methods!( /// NSDataBase64Encoding unsafe impl NSData { - #[method_id(initWithBase64EncodedString:options:)] + #[method_id(@__retain_semantics Init initWithBase64EncodedString:options:)] pub unsafe fn initWithBase64EncodedString_options( this: Option>, base64String: &NSString, options: NSDataBase64DecodingOptions, ) -> Option>; - #[method_id(base64EncodedStringWithOptions:)] + #[method_id(@__retain_semantics Other base64EncodedStringWithOptions:)] pub unsafe fn base64EncodedStringWithOptions( &self, options: NSDataBase64EncodingOptions, ) -> Id; - #[method_id(initWithBase64EncodedData:options:)] + #[method_id(@__retain_semantics Init initWithBase64EncodedData:options:)] pub unsafe fn initWithBase64EncodedData_options( this: Option>, base64Data: &NSData, options: NSDataBase64DecodingOptions, ) -> Option>; - #[method_id(base64EncodedDataWithOptions:)] + #[method_id(@__retain_semantics Other base64EncodedDataWithOptions:)] pub unsafe fn base64EncodedDataWithOptions( &self, options: NSDataBase64EncodingOptions, @@ -259,13 +259,13 @@ pub const NSDataCompressionAlgorithmZlib: NSDataCompressionAlgorithm = 3; extern_methods!( /// NSDataCompression unsafe impl NSData { - #[method_id(decompressedDataUsingAlgorithm:error:)] + #[method_id(@__retain_semantics Other decompressedDataUsingAlgorithm:error:)] pub unsafe fn decompressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, ) -> Result, Id>; - #[method_id(compressedDataUsingAlgorithm:error:)] + #[method_id(@__retain_semantics Other compressedDataUsingAlgorithm:error:)] pub unsafe fn compressedDataUsingAlgorithm_error( &self, algorithm: NSDataCompressionAlgorithm, @@ -279,22 +279,22 @@ extern_methods!( #[method(getBytes:)] pub unsafe fn getBytes(&self, buffer: NonNull); - #[method_id(dataWithContentsOfMappedFile:)] + #[method_id(@__retain_semantics Other dataWithContentsOfMappedFile:)] pub unsafe fn dataWithContentsOfMappedFile(path: &NSString) -> Option>; - #[method_id(initWithContentsOfMappedFile:)] + #[method_id(@__retain_semantics Init initWithContentsOfMappedFile:)] pub unsafe fn initWithContentsOfMappedFile( this: Option>, path: &NSString, ) -> Option>; - #[method_id(initWithBase64Encoding:)] + #[method_id(@__retain_semantics Init initWithBase64Encoding:)] pub unsafe fn initWithBase64Encoding( this: Option>, base64String: &NSString, ) -> Option>; - #[method_id(base64Encoding)] + #[method_id(@__retain_semantics Other base64Encoding)] pub unsafe fn base64Encoding(&self) -> Id; } ); @@ -355,19 +355,19 @@ extern_methods!( extern_methods!( /// NSMutableDataCreation unsafe impl NSMutableData { - #[method_id(dataWithCapacity:)] + #[method_id(@__retain_semantics Other dataWithCapacity:)] pub unsafe fn dataWithCapacity(aNumItems: NSUInteger) -> Option>; - #[method_id(dataWithLength:)] + #[method_id(@__retain_semantics Other dataWithLength:)] pub unsafe fn dataWithLength(length: NSUInteger) -> Option>; - #[method_id(initWithCapacity:)] + #[method_id(@__retain_semantics Init initWithCapacity:)] pub unsafe fn initWithCapacity( this: Option>, capacity: NSUInteger, ) -> Option>; - #[method_id(initWithLength:)] + #[method_id(@__retain_semantics Init initWithLength:)] pub unsafe fn initWithLength( this: Option>, length: NSUInteger, diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index bc1c5786c..80d1d3b57 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -21,16 +21,16 @@ extern_methods!( #[method(timeIntervalSinceReferenceDate)] pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithTimeIntervalSinceReferenceDate:)] + #[method_id(@__retain_semantics Init initWithTimeIntervalSinceReferenceDate:)] pub unsafe fn initWithTimeIntervalSinceReferenceDate( this: Option>, ti: NSTimeInterval, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -50,16 +50,16 @@ extern_methods!( #[method(timeIntervalSince1970)] pub unsafe fn timeIntervalSince1970(&self) -> NSTimeInterval; - #[method_id(addTimeInterval:)] + #[method_id(@__retain_semantics Other addTimeInterval:)] pub unsafe fn addTimeInterval(&self, seconds: NSTimeInterval) -> Id; - #[method_id(dateByAddingTimeInterval:)] + #[method_id(@__retain_semantics Other dateByAddingTimeInterval:)] pub unsafe fn dateByAddingTimeInterval(&self, ti: NSTimeInterval) -> Id; - #[method_id(earlierDate:)] + #[method_id(@__retain_semantics Other earlierDate:)] pub unsafe fn earlierDate(&self, anotherDate: &NSDate) -> Id; - #[method_id(laterDate:)] + #[method_id(@__retain_semantics Other laterDate:)] pub unsafe fn laterDate(&self, anotherDate: &NSDate) -> Id; #[method(compare:)] @@ -68,10 +68,10 @@ extern_methods!( #[method(isEqualToDate:)] pub unsafe fn isEqualToDate(&self, otherDate: &NSDate) -> bool; - #[method_id(description)] + #[method_id(@__retain_semantics Other description)] pub unsafe fn description(&self) -> Id; - #[method_id(descriptionWithLocale:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; @@ -83,48 +83,48 @@ extern_methods!( extern_methods!( /// NSDateCreation unsafe impl NSDate { - #[method_id(date)] + #[method_id(@__retain_semantics Other date)] pub unsafe fn date() -> Id; - #[method_id(dateWithTimeIntervalSinceNow:)] + #[method_id(@__retain_semantics Other dateWithTimeIntervalSinceNow:)] pub unsafe fn dateWithTimeIntervalSinceNow(secs: NSTimeInterval) -> Id; - #[method_id(dateWithTimeIntervalSinceReferenceDate:)] + #[method_id(@__retain_semantics Other dateWithTimeIntervalSinceReferenceDate:)] pub unsafe fn dateWithTimeIntervalSinceReferenceDate( ti: NSTimeInterval, ) -> Id; - #[method_id(dateWithTimeIntervalSince1970:)] + #[method_id(@__retain_semantics Other dateWithTimeIntervalSince1970:)] pub unsafe fn dateWithTimeIntervalSince1970(secs: NSTimeInterval) -> Id; - #[method_id(dateWithTimeInterval:sinceDate:)] + #[method_id(@__retain_semantics Other dateWithTimeInterval:sinceDate:)] pub unsafe fn dateWithTimeInterval_sinceDate( secsToBeAdded: NSTimeInterval, date: &NSDate, ) -> Id; - #[method_id(distantFuture)] + #[method_id(@__retain_semantics Other distantFuture)] pub unsafe fn distantFuture() -> Id; - #[method_id(distantPast)] + #[method_id(@__retain_semantics Other distantPast)] pub unsafe fn distantPast() -> Id; - #[method_id(now)] + #[method_id(@__retain_semantics Other now)] pub unsafe fn now() -> Id; - #[method_id(initWithTimeIntervalSinceNow:)] + #[method_id(@__retain_semantics Init initWithTimeIntervalSinceNow:)] pub unsafe fn initWithTimeIntervalSinceNow( this: Option>, secs: NSTimeInterval, ) -> Id; - #[method_id(initWithTimeIntervalSince1970:)] + #[method_id(@__retain_semantics Init initWithTimeIntervalSince1970:)] pub unsafe fn initWithTimeIntervalSince1970( this: Option>, secs: NSTimeInterval, ) -> Id; - #[method_id(initWithTimeInterval:sinceDate:)] + #[method_id(@__retain_semantics Init initWithTimeInterval:sinceDate:)] pub unsafe fn initWithTimeInterval_sinceDate( this: Option>, secsToBeAdded: NSTimeInterval, diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 109e9aa42..9cbfa858e 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -41,32 +41,32 @@ extern_class!( extern_methods!( unsafe impl NSDateComponentsFormatter { - #[method_id(stringForObjectValue:)] + #[method_id(@__retain_semantics Other stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, ) -> Option>; - #[method_id(stringFromDateComponents:)] + #[method_id(@__retain_semantics Other stringFromDateComponents:)] pub unsafe fn stringFromDateComponents( &self, components: &NSDateComponents, ) -> Option>; - #[method_id(stringFromDate:toDate:)] + #[method_id(@__retain_semantics Other stringFromDate:toDate:)] pub unsafe fn stringFromDate_toDate( &self, startDate: &NSDate, endDate: &NSDate, ) -> Option>; - #[method_id(stringFromTimeInterval:)] + #[method_id(@__retain_semantics Other stringFromTimeInterval:)] pub unsafe fn stringFromTimeInterval( &self, ti: NSTimeInterval, ) -> Option>; - #[method_id(localizedStringFromDateComponents:unitsStyle:)] + #[method_id(@__retain_semantics Other localizedStringFromDateComponents:unitsStyle:)] pub unsafe fn localizedStringFromDateComponents_unitsStyle( components: &NSDateComponents, unitsStyle: NSDateComponentsFormatterUnitsStyle, @@ -95,13 +95,13 @@ extern_methods!( zeroFormattingBehavior: NSDateComponentsFormatterZeroFormattingBehavior, ); - #[method_id(calendar)] + #[method_id(@__retain_semantics Other calendar)] pub unsafe fn calendar(&self) -> Option>; #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); - #[method_id(referenceDate)] + #[method_id(@__retain_semantics Other referenceDate)] pub unsafe fn referenceDate(&self) -> Option>; #[method(setReferenceDate:)] diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 0f89e4188..f0654993c 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -40,20 +40,20 @@ extern_methods!( rangep: *mut NSRange, ) -> Result<(), Id>; - #[method_id(stringFromDate:)] + #[method_id(@__retain_semantics Other stringFromDate:)] pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; - #[method_id(dateFromString:)] + #[method_id(@__retain_semantics Other dateFromString:)] pub unsafe fn dateFromString(&self, string: &NSString) -> Option>; - #[method_id(localizedStringFromDate:dateStyle:timeStyle:)] + #[method_id(@__retain_semantics Other localizedStringFromDate:dateStyle:timeStyle:)] pub unsafe fn localizedStringFromDate_dateStyle_timeStyle( date: &NSDate, dstyle: NSDateFormatterStyle, tstyle: NSDateFormatterStyle, ) -> Id; - #[method_id(dateFormatFromTemplate:options:locale:)] + #[method_id(@__retain_semantics Other dateFormatFromTemplate:options:locale:)] pub unsafe fn dateFormatFromTemplate_options_locale( tmplate: &NSString, opts: NSUInteger, @@ -71,7 +71,7 @@ extern_methods!( #[method(setLocalizedDateFormatFromTemplate:)] pub unsafe fn setLocalizedDateFormatFromTemplate(&self, dateFormatTemplate: &NSString); - #[method_id(dateFormat)] + #[method_id(@__retain_semantics Other dateFormat)] pub unsafe fn dateFormat(&self) -> Id; #[method(setDateFormat:)] @@ -89,7 +89,7 @@ extern_methods!( #[method(setTimeStyle:)] pub unsafe fn setTimeStyle(&self, timeStyle: NSDateFormatterStyle); - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Id; #[method(setLocale:)] @@ -107,13 +107,13 @@ extern_methods!( #[method(setFormatterBehavior:)] pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSDateFormatterBehavior); - #[method_id(timeZone)] + #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Id; #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); - #[method_id(calendar)] + #[method_id(@__retain_semantics Other calendar)] pub unsafe fn calendar(&self) -> Id; #[method(setCalendar:)] @@ -125,43 +125,43 @@ extern_methods!( #[method(setLenient:)] pub unsafe fn setLenient(&self, lenient: bool); - #[method_id(twoDigitStartDate)] + #[method_id(@__retain_semantics Other twoDigitStartDate)] pub unsafe fn twoDigitStartDate(&self) -> Option>; #[method(setTwoDigitStartDate:)] pub unsafe fn setTwoDigitStartDate(&self, twoDigitStartDate: Option<&NSDate>); - #[method_id(defaultDate)] + #[method_id(@__retain_semantics Other defaultDate)] pub unsafe fn defaultDate(&self) -> Option>; #[method(setDefaultDate:)] pub unsafe fn setDefaultDate(&self, defaultDate: Option<&NSDate>); - #[method_id(eraSymbols)] + #[method_id(@__retain_semantics Other eraSymbols)] pub unsafe fn eraSymbols(&self) -> Id, Shared>; #[method(setEraSymbols:)] pub unsafe fn setEraSymbols(&self, eraSymbols: Option<&NSArray>); - #[method_id(monthSymbols)] + #[method_id(@__retain_semantics Other monthSymbols)] pub unsafe fn monthSymbols(&self) -> Id, Shared>; #[method(setMonthSymbols:)] pub unsafe fn setMonthSymbols(&self, monthSymbols: Option<&NSArray>); - #[method_id(shortMonthSymbols)] + #[method_id(@__retain_semantics Other shortMonthSymbols)] pub unsafe fn shortMonthSymbols(&self) -> Id, Shared>; #[method(setShortMonthSymbols:)] pub unsafe fn setShortMonthSymbols(&self, shortMonthSymbols: Option<&NSArray>); - #[method_id(weekdaySymbols)] + #[method_id(@__retain_semantics Other weekdaySymbols)] pub unsafe fn weekdaySymbols(&self) -> Id, Shared>; #[method(setWeekdaySymbols:)] pub unsafe fn setWeekdaySymbols(&self, weekdaySymbols: Option<&NSArray>); - #[method_id(shortWeekdaySymbols)] + #[method_id(@__retain_semantics Other shortWeekdaySymbols)] pub unsafe fn shortWeekdaySymbols(&self) -> Id, Shared>; #[method(setShortWeekdaySymbols:)] @@ -170,25 +170,25 @@ extern_methods!( shortWeekdaySymbols: Option<&NSArray>, ); - #[method_id(AMSymbol)] + #[method_id(@__retain_semantics Other AMSymbol)] pub unsafe fn AMSymbol(&self) -> Id; #[method(setAMSymbol:)] pub unsafe fn setAMSymbol(&self, AMSymbol: Option<&NSString>); - #[method_id(PMSymbol)] + #[method_id(@__retain_semantics Other PMSymbol)] pub unsafe fn PMSymbol(&self) -> Id; #[method(setPMSymbol:)] pub unsafe fn setPMSymbol(&self, PMSymbol: Option<&NSString>); - #[method_id(longEraSymbols)] + #[method_id(@__retain_semantics Other longEraSymbols)] pub unsafe fn longEraSymbols(&self) -> Id, Shared>; #[method(setLongEraSymbols:)] pub unsafe fn setLongEraSymbols(&self, longEraSymbols: Option<&NSArray>); - #[method_id(veryShortMonthSymbols)] + #[method_id(@__retain_semantics Other veryShortMonthSymbols)] pub unsafe fn veryShortMonthSymbols(&self) -> Id, Shared>; #[method(setVeryShortMonthSymbols:)] @@ -197,7 +197,7 @@ extern_methods!( veryShortMonthSymbols: Option<&NSArray>, ); - #[method_id(standaloneMonthSymbols)] + #[method_id(@__retain_semantics Other standaloneMonthSymbols)] pub unsafe fn standaloneMonthSymbols(&self) -> Id, Shared>; #[method(setStandaloneMonthSymbols:)] @@ -206,7 +206,7 @@ extern_methods!( standaloneMonthSymbols: Option<&NSArray>, ); - #[method_id(shortStandaloneMonthSymbols)] + #[method_id(@__retain_semantics Other shortStandaloneMonthSymbols)] pub unsafe fn shortStandaloneMonthSymbols(&self) -> Id, Shared>; #[method(setShortStandaloneMonthSymbols:)] @@ -215,7 +215,7 @@ extern_methods!( shortStandaloneMonthSymbols: Option<&NSArray>, ); - #[method_id(veryShortStandaloneMonthSymbols)] + #[method_id(@__retain_semantics Other veryShortStandaloneMonthSymbols)] pub unsafe fn veryShortStandaloneMonthSymbols(&self) -> Id, Shared>; #[method(setVeryShortStandaloneMonthSymbols:)] @@ -224,7 +224,7 @@ extern_methods!( veryShortStandaloneMonthSymbols: Option<&NSArray>, ); - #[method_id(veryShortWeekdaySymbols)] + #[method_id(@__retain_semantics Other veryShortWeekdaySymbols)] pub unsafe fn veryShortWeekdaySymbols(&self) -> Id, Shared>; #[method(setVeryShortWeekdaySymbols:)] @@ -233,7 +233,7 @@ extern_methods!( veryShortWeekdaySymbols: Option<&NSArray>, ); - #[method_id(standaloneWeekdaySymbols)] + #[method_id(@__retain_semantics Other standaloneWeekdaySymbols)] pub unsafe fn standaloneWeekdaySymbols(&self) -> Id, Shared>; #[method(setStandaloneWeekdaySymbols:)] @@ -242,7 +242,7 @@ extern_methods!( standaloneWeekdaySymbols: Option<&NSArray>, ); - #[method_id(shortStandaloneWeekdaySymbols)] + #[method_id(@__retain_semantics Other shortStandaloneWeekdaySymbols)] pub unsafe fn shortStandaloneWeekdaySymbols(&self) -> Id, Shared>; #[method(setShortStandaloneWeekdaySymbols:)] @@ -251,7 +251,7 @@ extern_methods!( shortStandaloneWeekdaySymbols: Option<&NSArray>, ); - #[method_id(veryShortStandaloneWeekdaySymbols)] + #[method_id(@__retain_semantics Other veryShortStandaloneWeekdaySymbols)] pub unsafe fn veryShortStandaloneWeekdaySymbols(&self) -> Id, Shared>; #[method(setVeryShortStandaloneWeekdaySymbols:)] @@ -260,13 +260,13 @@ extern_methods!( veryShortStandaloneWeekdaySymbols: Option<&NSArray>, ); - #[method_id(quarterSymbols)] + #[method_id(@__retain_semantics Other quarterSymbols)] pub unsafe fn quarterSymbols(&self) -> Id, Shared>; #[method(setQuarterSymbols:)] pub unsafe fn setQuarterSymbols(&self, quarterSymbols: Option<&NSArray>); - #[method_id(shortQuarterSymbols)] + #[method_id(@__retain_semantics Other shortQuarterSymbols)] pub unsafe fn shortQuarterSymbols(&self) -> Id, Shared>; #[method(setShortQuarterSymbols:)] @@ -275,7 +275,7 @@ extern_methods!( shortQuarterSymbols: Option<&NSArray>, ); - #[method_id(standaloneQuarterSymbols)] + #[method_id(@__retain_semantics Other standaloneQuarterSymbols)] pub unsafe fn standaloneQuarterSymbols(&self) -> Id, Shared>; #[method(setStandaloneQuarterSymbols:)] @@ -284,7 +284,7 @@ extern_methods!( standaloneQuarterSymbols: Option<&NSArray>, ); - #[method_id(shortStandaloneQuarterSymbols)] + #[method_id(@__retain_semantics Other shortStandaloneQuarterSymbols)] pub unsafe fn shortStandaloneQuarterSymbols(&self) -> Id, Shared>; #[method(setShortStandaloneQuarterSymbols:)] @@ -293,7 +293,7 @@ extern_methods!( shortStandaloneQuarterSymbols: Option<&NSArray>, ); - #[method_id(gregorianStartDate)] + #[method_id(@__retain_semantics Other gregorianStartDate)] pub unsafe fn gregorianStartDate(&self) -> Option>; #[method(setGregorianStartDate:)] @@ -310,7 +310,7 @@ extern_methods!( extern_methods!( /// NSDateFormatterCompatibility unsafe impl NSDateFormatter { - #[method_id(initWithDateFormat:allowNaturalLanguage:)] + #[method_id(@__retain_semantics Init initWithDateFormat:allowNaturalLanguage:)] pub unsafe fn initWithDateFormat_allowNaturalLanguage( this: Option>, format: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSDateInterval.rs b/crates/icrate/src/generated/Foundation/NSDateInterval.rs index 83ce9cffa..da55513a2 100644 --- a/crates/icrate/src/generated/Foundation/NSDateInterval.rs +++ b/crates/icrate/src/generated/Foundation/NSDateInterval.rs @@ -14,32 +14,32 @@ extern_class!( extern_methods!( unsafe impl NSDateInterval { - #[method_id(startDate)] + #[method_id(@__retain_semantics Other startDate)] pub unsafe fn startDate(&self) -> Id; - #[method_id(endDate)] + #[method_id(@__retain_semantics Other endDate)] pub unsafe fn endDate(&self) -> Id; #[method(duration)] pub unsafe fn duration(&self) -> NSTimeInterval; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Id; - #[method_id(initWithStartDate:duration:)] + #[method_id(@__retain_semantics Init initWithStartDate:duration:)] pub unsafe fn initWithStartDate_duration( this: Option>, startDate: &NSDate, duration: NSTimeInterval, ) -> Id; - #[method_id(initWithStartDate:endDate:)] + #[method_id(@__retain_semantics Init initWithStartDate:endDate:)] pub unsafe fn initWithStartDate_endDate( this: Option>, startDate: &NSDate, @@ -55,7 +55,7 @@ extern_methods!( #[method(intersectsDateInterval:)] pub unsafe fn intersectsDateInterval(&self, dateInterval: &NSDateInterval) -> bool; - #[method_id(intersectionWithDateInterval:)] + #[method_id(@__retain_semantics Other intersectionWithDateInterval:)] pub unsafe fn intersectionWithDateInterval( &self, dateInterval: &NSDateInterval, diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index 5c9195e97..77ba236c0 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -21,25 +21,25 @@ extern_class!( extern_methods!( unsafe impl NSDateIntervalFormatter { - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Id; #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); - #[method_id(calendar)] + #[method_id(@__retain_semantics Other calendar)] pub unsafe fn calendar(&self) -> Id; #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); - #[method_id(timeZone)] + #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Id; #[method(setTimeZone:)] pub unsafe fn setTimeZone(&self, timeZone: Option<&NSTimeZone>); - #[method_id(dateTemplate)] + #[method_id(@__retain_semantics Other dateTemplate)] pub unsafe fn dateTemplate(&self) -> Id; #[method(setDateTemplate:)] @@ -57,14 +57,14 @@ extern_methods!( #[method(setTimeStyle:)] pub unsafe fn setTimeStyle(&self, timeStyle: NSDateIntervalFormatterStyle); - #[method_id(stringFromDate:toDate:)] + #[method_id(@__retain_semantics Other stringFromDate:toDate:)] pub unsafe fn stringFromDate_toDate( &self, fromDate: &NSDate, toDate: &NSDate, ) -> Id; - #[method_id(stringFromDateInterval:)] + #[method_id(@__retain_semantics Other stringFromDateInterval:)] pub unsafe fn stringFromDateInterval( &self, dateInterval: &NSDateInterval, diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index a7f1f8be7..05c206199 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -32,7 +32,7 @@ extern_class!( extern_methods!( unsafe impl NSDecimalNumber { - #[method_id(initWithMantissa:exponent:isNegative:)] + #[method_id(@__retain_semantics Init initWithMantissa:exponent:isNegative:)] pub unsafe fn initWithMantissa_exponent_isNegative( this: Option>, mantissa: c_ulonglong, @@ -40,147 +40,147 @@ extern_methods!( flag: bool, ) -> Id; - #[method_id(initWithDecimal:)] + #[method_id(@__retain_semantics Init initWithDecimal:)] pub unsafe fn initWithDecimal( this: Option>, dcm: NSDecimal, ) -> Id; - #[method_id(initWithString:)] + #[method_id(@__retain_semantics Init initWithString:)] pub unsafe fn initWithString( this: Option>, numberValue: Option<&NSString>, ) -> Id; - #[method_id(initWithString:locale:)] + #[method_id(@__retain_semantics Init initWithString:locale:)] pub unsafe fn initWithString_locale( this: Option>, numberValue: Option<&NSString>, locale: Option<&Object>, ) -> Id; - #[method_id(descriptionWithLocale:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; #[method(decimalValue)] pub unsafe fn decimalValue(&self) -> NSDecimal; - #[method_id(decimalNumberWithMantissa:exponent:isNegative:)] + #[method_id(@__retain_semantics Other decimalNumberWithMantissa:exponent:isNegative:)] pub unsafe fn decimalNumberWithMantissa_exponent_isNegative( mantissa: c_ulonglong, exponent: c_short, flag: bool, ) -> Id; - #[method_id(decimalNumberWithDecimal:)] + #[method_id(@__retain_semantics Other decimalNumberWithDecimal:)] pub unsafe fn decimalNumberWithDecimal(dcm: NSDecimal) -> Id; - #[method_id(decimalNumberWithString:)] + #[method_id(@__retain_semantics Other decimalNumberWithString:)] pub unsafe fn decimalNumberWithString( numberValue: Option<&NSString>, ) -> Id; - #[method_id(decimalNumberWithString:locale:)] + #[method_id(@__retain_semantics Other decimalNumberWithString:locale:)] pub unsafe fn decimalNumberWithString_locale( numberValue: Option<&NSString>, locale: Option<&Object>, ) -> Id; - #[method_id(zero)] + #[method_id(@__retain_semantics Other zero)] pub unsafe fn zero() -> Id; - #[method_id(one)] + #[method_id(@__retain_semantics Other one)] pub unsafe fn one() -> Id; - #[method_id(minimumDecimalNumber)] + #[method_id(@__retain_semantics Other minimumDecimalNumber)] pub unsafe fn minimumDecimalNumber() -> Id; - #[method_id(maximumDecimalNumber)] + #[method_id(@__retain_semantics Other maximumDecimalNumber)] pub unsafe fn maximumDecimalNumber() -> Id; - #[method_id(notANumber)] + #[method_id(@__retain_semantics Other notANumber)] pub unsafe fn notANumber() -> Id; - #[method_id(decimalNumberByAdding:)] + #[method_id(@__retain_semantics Other decimalNumberByAdding:)] pub unsafe fn decimalNumberByAdding( &self, decimalNumber: &NSDecimalNumber, ) -> Id; - #[method_id(decimalNumberByAdding:withBehavior:)] + #[method_id(@__retain_semantics Other decimalNumberByAdding:withBehavior:)] pub unsafe fn decimalNumberByAdding_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - #[method_id(decimalNumberBySubtracting:)] + #[method_id(@__retain_semantics Other decimalNumberBySubtracting:)] pub unsafe fn decimalNumberBySubtracting( &self, decimalNumber: &NSDecimalNumber, ) -> Id; - #[method_id(decimalNumberBySubtracting:withBehavior:)] + #[method_id(@__retain_semantics Other decimalNumberBySubtracting:withBehavior:)] pub unsafe fn decimalNumberBySubtracting_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - #[method_id(decimalNumberByMultiplyingBy:)] + #[method_id(@__retain_semantics Other decimalNumberByMultiplyingBy:)] pub unsafe fn decimalNumberByMultiplyingBy( &self, decimalNumber: &NSDecimalNumber, ) -> Id; - #[method_id(decimalNumberByMultiplyingBy:withBehavior:)] + #[method_id(@__retain_semantics Other decimalNumberByMultiplyingBy:withBehavior:)] pub unsafe fn decimalNumberByMultiplyingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - #[method_id(decimalNumberByDividingBy:)] + #[method_id(@__retain_semantics Other decimalNumberByDividingBy:)] pub unsafe fn decimalNumberByDividingBy( &self, decimalNumber: &NSDecimalNumber, ) -> Id; - #[method_id(decimalNumberByDividingBy:withBehavior:)] + #[method_id(@__retain_semantics Other decimalNumberByDividingBy:withBehavior:)] pub unsafe fn decimalNumberByDividingBy_withBehavior( &self, decimalNumber: &NSDecimalNumber, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - #[method_id(decimalNumberByRaisingToPower:)] + #[method_id(@__retain_semantics Other decimalNumberByRaisingToPower:)] pub unsafe fn decimalNumberByRaisingToPower( &self, power: NSUInteger, ) -> Id; - #[method_id(decimalNumberByRaisingToPower:withBehavior:)] + #[method_id(@__retain_semantics Other decimalNumberByRaisingToPower:withBehavior:)] pub unsafe fn decimalNumberByRaisingToPower_withBehavior( &self, power: NSUInteger, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - #[method_id(decimalNumberByMultiplyingByPowerOf10:)] + #[method_id(@__retain_semantics Other decimalNumberByMultiplyingByPowerOf10:)] pub unsafe fn decimalNumberByMultiplyingByPowerOf10( &self, power: c_short, ) -> Id; - #[method_id(decimalNumberByMultiplyingByPowerOf10:withBehavior:)] + #[method_id(@__retain_semantics Other decimalNumberByMultiplyingByPowerOf10:withBehavior:)] pub unsafe fn decimalNumberByMultiplyingByPowerOf10_withBehavior( &self, power: c_short, behavior: Option<&NSDecimalNumberBehaviors>, ) -> Id; - #[method_id(decimalNumberByRoundingAccordingToBehavior:)] + #[method_id(@__retain_semantics Other decimalNumberByRoundingAccordingToBehavior:)] pub unsafe fn decimalNumberByRoundingAccordingToBehavior( &self, behavior: Option<&NSDecimalNumberBehaviors>, @@ -189,7 +189,7 @@ extern_methods!( #[method(compare:)] pub unsafe fn compare(&self, decimalNumber: &NSNumber) -> NSComparisonResult; - #[method_id(defaultBehavior)] + #[method_id(@__retain_semantics Other defaultBehavior)] pub unsafe fn defaultBehavior() -> Id; #[method(setDefaultBehavior:)] @@ -214,10 +214,10 @@ extern_class!( extern_methods!( unsafe impl NSDecimalNumberHandler { - #[method_id(defaultDecimalNumberHandler)] + #[method_id(@__retain_semantics Other defaultDecimalNumberHandler)] pub unsafe fn defaultDecimalNumberHandler() -> Id; - #[method_id(initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:)] + #[method_id(@__retain_semantics Init initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:)] pub unsafe fn initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( this: Option>, roundingMode: NSRoundingMode, @@ -228,7 +228,7 @@ extern_methods!( divideByZero: bool, ) -> Id; - #[method_id(decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:)] + #[method_id(@__retain_semantics Other decimalNumberHandlerWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:)] pub unsafe fn decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero( roundingMode: NSRoundingMode, scale: c_short, diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 7243ef886..660329c16 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -20,16 +20,16 @@ extern_methods!( #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - #[method_id(objectForKey:)] + #[method_id(@__retain_semantics Other objectForKey:)] pub unsafe fn objectForKey(&self, aKey: &KeyType) -> Option>; - #[method_id(keyEnumerator)] + #[method_id(@__retain_semantics Other keyEnumerator)] pub unsafe fn keyEnumerator(&self) -> Id, Shared>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithObjects:forKeys:count:)] + #[method_id(@__retain_semantics Init initWithObjects:forKeys:count:)] pub unsafe fn initWithObjects_forKeys_count( this: Option>, objects: TodoArray, @@ -37,7 +37,7 @@ extern_methods!( cnt: NSUInteger, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -48,29 +48,29 @@ extern_methods!( extern_methods!( /// NSExtendedDictionary unsafe impl NSDictionary { - #[method_id(allKeys)] + #[method_id(@__retain_semantics Other allKeys)] pub unsafe fn allKeys(&self) -> Id, Shared>; - #[method_id(allKeysForObject:)] + #[method_id(@__retain_semantics Other allKeysForObject:)] pub unsafe fn allKeysForObject( &self, anObject: &ObjectType, ) -> Id, Shared>; - #[method_id(allValues)] + #[method_id(@__retain_semantics Other allValues)] pub unsafe fn allValues(&self) -> Id, Shared>; - #[method_id(description)] + #[method_id(@__retain_semantics Other description)] pub unsafe fn description(&self) -> Id; - #[method_id(descriptionInStringsFileFormat)] + #[method_id(@__retain_semantics Other descriptionInStringsFileFormat)] pub unsafe fn descriptionInStringsFileFormat(&self) -> Id; - #[method_id(descriptionWithLocale:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; - #[method_id(descriptionWithLocale:indent:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:indent:)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, @@ -83,10 +83,10 @@ extern_methods!( otherDictionary: &NSDictionary, ) -> bool; - #[method_id(objectEnumerator)] + #[method_id(@__retain_semantics Other objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; - #[method_id(objectsForKeys:notFoundMarker:)] + #[method_id(@__retain_semantics Other objectsForKeys:notFoundMarker:)] pub unsafe fn objectsForKeys_notFoundMarker( &self, keys: &NSArray, @@ -96,7 +96,7 @@ extern_methods!( #[method(writeToURL:error:)] pub unsafe fn writeToURL_error(&self, url: &NSURL) -> Result<(), Id>; - #[method_id(keysSortedByValueUsingSelector:)] + #[method_id(@__retain_semantics Other keysSortedByValueUsingSelector:)] pub unsafe fn keysSortedByValueUsingSelector( &self, comparator: Sel, @@ -110,7 +110,7 @@ extern_methods!( count: NSUInteger, ); - #[method_id(objectForKeyedSubscript:)] + #[method_id(@__retain_semantics Other objectForKeyedSubscript:)] pub unsafe fn objectForKeyedSubscript( &self, key: &KeyType, @@ -126,26 +126,26 @@ extern_methods!( block: TodoBlock, ); - #[method_id(keysSortedByValueUsingComparator:)] + #[method_id(@__retain_semantics Other keysSortedByValueUsingComparator:)] pub unsafe fn keysSortedByValueUsingComparator( &self, cmptr: NSComparator, ) -> Id, Shared>; - #[method_id(keysSortedByValueWithOptions:usingComparator:)] + #[method_id(@__retain_semantics Other keysSortedByValueWithOptions:usingComparator:)] pub unsafe fn keysSortedByValueWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, ) -> Id, Shared>; - #[method_id(keysOfEntriesPassingTest:)] + #[method_id(@__retain_semantics Other keysOfEntriesPassingTest:)] pub unsafe fn keysOfEntriesPassingTest( &self, predicate: TodoBlock, ) -> Id, Shared>; - #[method_id(keysOfEntriesWithOptions:passingTest:)] + #[method_id(@__retain_semantics Other keysOfEntriesWithOptions:passingTest:)] pub unsafe fn keysOfEntriesWithOptions_passingTest( &self, opts: NSEnumerationOptions, @@ -160,23 +160,23 @@ extern_methods!( #[method(getObjects:andKeys:)] pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray); - #[method_id(dictionaryWithContentsOfFile:)] + #[method_id(@__retain_semantics Other dictionaryWithContentsOfFile:)] pub unsafe fn dictionaryWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; - #[method_id(dictionaryWithContentsOfURL:)] + #[method_id(@__retain_semantics Other dictionaryWithContentsOfURL:)] pub unsafe fn dictionaryWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; - #[method_id(initWithContentsOfFile:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( this: Option>, path: &NSString, ) -> Option, Shared>>; - #[method_id(initWithContentsOfURL:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, url: &NSURL, @@ -197,60 +197,60 @@ extern_methods!( extern_methods!( /// NSDictionaryCreation unsafe impl NSDictionary { - #[method_id(dictionary)] + #[method_id(@__retain_semantics Other dictionary)] pub unsafe fn dictionary() -> Id; - #[method_id(dictionaryWithObject:forKey:)] + #[method_id(@__retain_semantics Other dictionaryWithObject:forKey:)] pub unsafe fn dictionaryWithObject_forKey( object: &ObjectType, key: &NSCopying, ) -> Id; - #[method_id(dictionaryWithObjects:forKeys:count:)] + #[method_id(@__retain_semantics Other dictionaryWithObjects:forKeys:count:)] pub unsafe fn dictionaryWithObjects_forKeys_count( objects: TodoArray, keys: TodoArray, cnt: NSUInteger, ) -> Id; - #[method_id(dictionaryWithDictionary:)] + #[method_id(@__retain_semantics Other dictionaryWithDictionary:)] pub unsafe fn dictionaryWithDictionary( dict: &NSDictionary, ) -> Id; - #[method_id(dictionaryWithObjects:forKeys:)] + #[method_id(@__retain_semantics Other dictionaryWithObjects:forKeys:)] pub unsafe fn dictionaryWithObjects_forKeys( objects: &NSArray, keys: &NSArray, ) -> Id; - #[method_id(initWithDictionary:)] + #[method_id(@__retain_semantics Init initWithDictionary:)] pub unsafe fn initWithDictionary( this: Option>, otherDictionary: &NSDictionary, ) -> Id; - #[method_id(initWithDictionary:copyItems:)] + #[method_id(@__retain_semantics Init initWithDictionary:copyItems:)] pub unsafe fn initWithDictionary_copyItems( this: Option>, otherDictionary: &NSDictionary, flag: bool, ) -> Id; - #[method_id(initWithObjects:forKeys:)] + #[method_id(@__retain_semantics Init initWithObjects:forKeys:)] pub unsafe fn initWithObjects_forKeys( this: Option>, objects: &NSArray, keys: &NSArray, ) -> Id; - #[method_id(initWithContentsOfURL:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:error:)] pub unsafe fn initWithContentsOfURL_error( this: Option>, url: &NSURL, ) -> Result, Shared>, Id>; - #[method_id(dictionaryWithContentsOfURL:error:)] + #[method_id(@__retain_semantics Other dictionaryWithContentsOfURL:error:)] pub unsafe fn dictionaryWithContentsOfURL_error( url: &NSURL, ) -> Result, Shared>, Id>; @@ -279,16 +279,16 @@ extern_methods!( #[method(setObject:forKey:)] pub unsafe fn setObject_forKey(&self, anObject: &ObjectType, aKey: &NSCopying); - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCapacity:)] + #[method_id(@__retain_semantics Init initWithCapacity:)] pub unsafe fn initWithCapacity( this: Option>, numItems: NSUInteger, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -322,26 +322,26 @@ extern_methods!( extern_methods!( /// NSMutableDictionaryCreation unsafe impl NSMutableDictionary { - #[method_id(dictionaryWithCapacity:)] + #[method_id(@__retain_semantics Other dictionaryWithCapacity:)] pub unsafe fn dictionaryWithCapacity(numItems: NSUInteger) -> Id; - #[method_id(dictionaryWithContentsOfFile:)] + #[method_id(@__retain_semantics Other dictionaryWithContentsOfFile:)] pub unsafe fn dictionaryWithContentsOfFile( path: &NSString, ) -> Option, Shared>>; - #[method_id(dictionaryWithContentsOfURL:)] + #[method_id(@__retain_semantics Other dictionaryWithContentsOfURL:)] pub unsafe fn dictionaryWithContentsOfURL( url: &NSURL, ) -> Option, Shared>>; - #[method_id(initWithContentsOfFile:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( this: Option>, path: &NSString, ) -> Option, Shared>>; - #[method_id(initWithContentsOfURL:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, url: &NSURL, @@ -352,7 +352,7 @@ extern_methods!( extern_methods!( /// NSSharedKeySetDictionary unsafe impl NSDictionary { - #[method_id(sharedKeySetForKeys:)] + #[method_id(@__retain_semantics Other sharedKeySetForKeys:)] pub unsafe fn sharedKeySetForKeys(keys: &NSArray) -> Id; } ); @@ -360,7 +360,7 @@ extern_methods!( extern_methods!( /// NSSharedKeySetDictionary unsafe impl NSMutableDictionary { - #[method_id(dictionaryWithSharedKeySet:)] + #[method_id(@__retain_semantics Other dictionaryWithSharedKeySet:)] pub unsafe fn dictionaryWithSharedKeySet( keyset: &Object, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/Foundation/NSDistantObject.rs b/crates/icrate/src/generated/Foundation/NSDistantObject.rs index 7c1059c2c..365eafa21 100644 --- a/crates/icrate/src/generated/Foundation/NSDistantObject.rs +++ b/crates/icrate/src/generated/Foundation/NSDistantObject.rs @@ -14,33 +14,33 @@ extern_class!( extern_methods!( unsafe impl NSDistantObject { - #[method_id(proxyWithTarget:connection:)] + #[method_id(@__retain_semantics Other proxyWithTarget:connection:)] pub unsafe fn proxyWithTarget_connection( target: &Object, connection: &NSConnection, ) -> Option>; - #[method_id(initWithTarget:connection:)] + #[method_id(@__retain_semantics Init initWithTarget:connection:)] pub unsafe fn initWithTarget_connection( this: Option>, target: &Object, connection: &NSConnection, ) -> Option>; - #[method_id(proxyWithLocal:connection:)] + #[method_id(@__retain_semantics Other proxyWithLocal:connection:)] pub unsafe fn proxyWithLocal_connection( target: &Object, connection: &NSConnection, ) -> Id; - #[method_id(initWithLocal:connection:)] + #[method_id(@__retain_semantics Init initWithLocal:connection:)] pub unsafe fn initWithLocal_connection( this: Option>, target: &Object, connection: &NSConnection, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, @@ -49,7 +49,7 @@ extern_methods!( #[method(setProtocolForProxy:)] pub unsafe fn setProtocolForProxy(&self, proto: Option<&Protocol>); - #[method_id(connectionForProxy)] + #[method_id(@__retain_semantics Other connectionForProxy)] pub unsafe fn connectionForProxy(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs index 859a0993a..c118bd51a 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedLock.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedLock.rs @@ -14,13 +14,13 @@ extern_class!( extern_methods!( unsafe impl NSDistributedLock { - #[method_id(lockWithPath:)] + #[method_id(@__retain_semantics Other lockWithPath:)] pub unsafe fn lockWithPath(path: &NSString) -> Option>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithPath:)] + #[method_id(@__retain_semantics Init initWithPath:)] pub unsafe fn initWithPath( this: Option>, path: &NSString, @@ -35,7 +35,7 @@ extern_methods!( #[method(breakLock)] pub unsafe fn breakLock(&self); - #[method_id(lockDate)] + #[method_id(@__retain_semantics Other lockDate)] pub unsafe fn lockDate(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 4c98865af..755c173b2 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -36,12 +36,12 @@ extern_class!( extern_methods!( unsafe impl NSDistributedNotificationCenter { - #[method_id(notificationCenterForType:)] + #[method_id(@__retain_semantics Other notificationCenterForType:)] pub unsafe fn notificationCenterForType( notificationCenterType: &NSDistributedNotificationCenterType, ) -> Id; - #[method_id(defaultCenter)] + #[method_id(@__retain_semantics Other defaultCenter)] pub unsafe fn defaultCenter() -> Id; #[method(addObserver:selector:name:object:suspensionBehavior:)] diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 7f3c4b95c..0c8ad2c36 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -20,7 +20,7 @@ extern_class!( extern_methods!( unsafe impl NSEnergyFormatter { - #[method_id(numberFormatter)] + #[method_id(@__retain_semantics Other numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; #[method(setNumberFormatter:)] @@ -38,24 +38,24 @@ extern_methods!( #[method(setForFoodEnergyUse:)] pub unsafe fn setForFoodEnergyUse(&self, forFoodEnergyUse: bool); - #[method_id(stringFromValue:unit:)] + #[method_id(@__retain_semantics Other stringFromValue:unit:)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSEnergyFormatterUnit, ) -> Id; - #[method_id(stringFromJoules:)] + #[method_id(@__retain_semantics Other stringFromJoules:)] pub unsafe fn stringFromJoules(&self, numberInJoules: c_double) -> Id; - #[method_id(unitStringFromValue:unit:)] + #[method_id(@__retain_semantics Other unitStringFromValue:unit:)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSEnergyFormatterUnit, ) -> Id; - #[method_id(unitStringFromJoules:usedUnit:)] + #[method_id(@__retain_semantics Other unitStringFromJoules:usedUnit:)] pub unsafe fn unitStringFromJoules_usedUnit( &self, numberInJoules: c_double, diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 2b1adcb3c..7d0aa143b 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -18,7 +18,7 @@ __inner_extern_class!( extern_methods!( unsafe impl NSEnumerator { - #[method_id(nextObject)] + #[method_id(@__retain_semantics Other nextObject)] pub unsafe fn nextObject(&self) -> Option>; } ); @@ -26,7 +26,7 @@ extern_methods!( extern_methods!( /// NSExtendedEnumerator unsafe impl NSEnumerator { - #[method_id(allObjects)] + #[method_id(@__retain_semantics Other allObjects)] pub unsafe fn allObjects(&self) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 623378b4a..727136a17 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -86,7 +86,7 @@ extern_class!( extern_methods!( unsafe impl NSError { - #[method_id(initWithDomain:code:userInfo:)] + #[method_id(@__retain_semantics Init initWithDomain:code:userInfo:)] pub unsafe fn initWithDomain_code_userInfo( this: Option>, domain: &NSErrorDomain, @@ -94,41 +94,41 @@ extern_methods!( dict: Option<&NSDictionary>, ) -> Id; - #[method_id(errorWithDomain:code:userInfo:)] + #[method_id(@__retain_semantics Other errorWithDomain:code:userInfo:)] pub unsafe fn errorWithDomain_code_userInfo( domain: &NSErrorDomain, code: NSInteger, dict: Option<&NSDictionary>, ) -> Id; - #[method_id(domain)] + #[method_id(@__retain_semantics Other domain)] pub unsafe fn domain(&self) -> Id; #[method(code)] pub unsafe fn code(&self) -> NSInteger; - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Id, Shared>; - #[method_id(localizedDescription)] + #[method_id(@__retain_semantics Other localizedDescription)] pub unsafe fn localizedDescription(&self) -> Id; - #[method_id(localizedFailureReason)] + #[method_id(@__retain_semantics Other localizedFailureReason)] pub unsafe fn localizedFailureReason(&self) -> Option>; - #[method_id(localizedRecoverySuggestion)] + #[method_id(@__retain_semantics Other localizedRecoverySuggestion)] pub unsafe fn localizedRecoverySuggestion(&self) -> Option>; - #[method_id(localizedRecoveryOptions)] + #[method_id(@__retain_semantics Other localizedRecoveryOptions)] pub unsafe fn localizedRecoveryOptions(&self) -> Option, Shared>>; - #[method_id(recoveryAttempter)] + #[method_id(@__retain_semantics Other recoveryAttempter)] pub unsafe fn recoveryAttempter(&self) -> Option>; - #[method_id(helpAnchor)] + #[method_id(@__retain_semantics Other helpAnchor)] pub unsafe fn helpAnchor(&self) -> Option>; - #[method_id(underlyingErrors)] + #[method_id(@__retain_semantics Other underlyingErrors)] pub unsafe fn underlyingErrors(&self) -> Id, Shared>; #[method(setUserInfoValueProviderForDomain:provider:)] diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index b23da2e75..ba3ee2899 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -74,14 +74,14 @@ extern_class!( extern_methods!( unsafe impl NSException { - #[method_id(exceptionWithName:reason:userInfo:)] + #[method_id(@__retain_semantics Other exceptionWithName:reason:userInfo:)] pub unsafe fn exceptionWithName_reason_userInfo( name: &NSExceptionName, reason: Option<&NSString>, userInfo: Option<&NSDictionary>, ) -> Id; - #[method_id(initWithName:reason:userInfo:)] + #[method_id(@__retain_semantics Init initWithName:reason:userInfo:)] pub unsafe fn initWithName_reason_userInfo( this: Option>, aName: &NSExceptionName, @@ -89,19 +89,19 @@ extern_methods!( aUserInfo: Option<&NSDictionary>, ) -> Id; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; - #[method_id(reason)] + #[method_id(@__retain_semantics Other reason)] pub unsafe fn reason(&self) -> Option>; - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>; - #[method_id(callStackReturnAddresses)] + #[method_id(@__retain_semantics Other callStackReturnAddresses)] pub unsafe fn callStackReturnAddresses(&self) -> Id, Shared>; - #[method_id(callStackSymbols)] + #[method_id(@__retain_semantics Other callStackSymbols)] pub unsafe fn callStackSymbols(&self) -> Id, Shared>; #[method(raise)] @@ -136,7 +136,7 @@ extern_class!( extern_methods!( unsafe impl NSAssertionHandler { - #[method_id(currentHandler)] + #[method_id(@__retain_semantics Other currentHandler)] pub unsafe fn currentHandler() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index a637ac48e..b0a59db61 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -29,96 +29,96 @@ extern_class!( extern_methods!( unsafe impl NSExpression { - #[method_id(expressionWithFormat:argumentArray:)] + #[method_id(@__retain_semantics Other expressionWithFormat:argumentArray:)] pub unsafe fn expressionWithFormat_argumentArray( expressionFormat: &NSString, arguments: &NSArray, ) -> Id; - #[method_id(expressionWithFormat:arguments:)] + #[method_id(@__retain_semantics Other expressionWithFormat:arguments:)] pub unsafe fn expressionWithFormat_arguments( expressionFormat: &NSString, argList: va_list, ) -> Id; - #[method_id(expressionForConstantValue:)] + #[method_id(@__retain_semantics Other expressionForConstantValue:)] pub unsafe fn expressionForConstantValue(obj: Option<&Object>) -> Id; - #[method_id(expressionForEvaluatedObject)] + #[method_id(@__retain_semantics Other expressionForEvaluatedObject)] pub unsafe fn expressionForEvaluatedObject() -> Id; - #[method_id(expressionForVariable:)] + #[method_id(@__retain_semantics Other expressionForVariable:)] pub unsafe fn expressionForVariable(string: &NSString) -> Id; - #[method_id(expressionForKeyPath:)] + #[method_id(@__retain_semantics Other expressionForKeyPath:)] pub unsafe fn expressionForKeyPath(keyPath: &NSString) -> Id; - #[method_id(expressionForFunction:arguments:)] + #[method_id(@__retain_semantics Other expressionForFunction:arguments:)] pub unsafe fn expressionForFunction_arguments( name: &NSString, parameters: &NSArray, ) -> Id; - #[method_id(expressionForAggregate:)] + #[method_id(@__retain_semantics Other expressionForAggregate:)] pub unsafe fn expressionForAggregate( subexpressions: &NSArray, ) -> Id; - #[method_id(expressionForUnionSet:with:)] + #[method_id(@__retain_semantics Other expressionForUnionSet:with:)] pub unsafe fn expressionForUnionSet_with( left: &NSExpression, right: &NSExpression, ) -> Id; - #[method_id(expressionForIntersectSet:with:)] + #[method_id(@__retain_semantics Other expressionForIntersectSet:with:)] pub unsafe fn expressionForIntersectSet_with( left: &NSExpression, right: &NSExpression, ) -> Id; - #[method_id(expressionForMinusSet:with:)] + #[method_id(@__retain_semantics Other expressionForMinusSet:with:)] pub unsafe fn expressionForMinusSet_with( left: &NSExpression, right: &NSExpression, ) -> Id; - #[method_id(expressionForSubquery:usingIteratorVariable:predicate:)] + #[method_id(@__retain_semantics Other expressionForSubquery:usingIteratorVariable:predicate:)] pub unsafe fn expressionForSubquery_usingIteratorVariable_predicate( expression: &NSExpression, variable: &NSString, predicate: &NSPredicate, ) -> Id; - #[method_id(expressionForFunction:selectorName:arguments:)] + #[method_id(@__retain_semantics Other expressionForFunction:selectorName:arguments:)] pub unsafe fn expressionForFunction_selectorName_arguments( target: &NSExpression, name: &NSString, parameters: Option<&NSArray>, ) -> Id; - #[method_id(expressionForAnyKey)] + #[method_id(@__retain_semantics Other expressionForAnyKey)] pub unsafe fn expressionForAnyKey() -> Id; - #[method_id(expressionForBlock:arguments:)] + #[method_id(@__retain_semantics Other expressionForBlock:arguments:)] pub unsafe fn expressionForBlock_arguments( block: TodoBlock, arguments: Option<&NSArray>, ) -> Id; - #[method_id(expressionForConditional:trueExpression:falseExpression:)] + #[method_id(@__retain_semantics Other expressionForConditional:trueExpression:falseExpression:)] pub unsafe fn expressionForConditional_trueExpression_falseExpression( predicate: &NSPredicate, trueExpression: &NSExpression, falseExpression: &NSExpression, ) -> Id; - #[method_id(initWithExpressionType:)] + #[method_id(@__retain_semantics Init initWithExpressionType:)] pub unsafe fn initWithExpressionType( this: Option>, type_: NSExpressionType, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -127,46 +127,46 @@ extern_methods!( #[method(expressionType)] pub unsafe fn expressionType(&self) -> NSExpressionType; - #[method_id(constantValue)] + #[method_id(@__retain_semantics Other constantValue)] pub unsafe fn constantValue(&self) -> Option>; - #[method_id(keyPath)] + #[method_id(@__retain_semantics Other keyPath)] pub unsafe fn keyPath(&self) -> Id; - #[method_id(function)] + #[method_id(@__retain_semantics Other function)] pub unsafe fn function(&self) -> Id; - #[method_id(variable)] + #[method_id(@__retain_semantics Other variable)] pub unsafe fn variable(&self) -> Id; - #[method_id(operand)] + #[method_id(@__retain_semantics Other operand)] pub unsafe fn operand(&self) -> Id; - #[method_id(arguments)] + #[method_id(@__retain_semantics Other arguments)] pub unsafe fn arguments(&self) -> Option, Shared>>; - #[method_id(collection)] + #[method_id(@__retain_semantics Other collection)] pub unsafe fn collection(&self) -> Id; - #[method_id(predicate)] + #[method_id(@__retain_semantics Other predicate)] pub unsafe fn predicate(&self) -> Id; - #[method_id(leftExpression)] + #[method_id(@__retain_semantics Other leftExpression)] pub unsafe fn leftExpression(&self) -> Id; - #[method_id(rightExpression)] + #[method_id(@__retain_semantics Other rightExpression)] pub unsafe fn rightExpression(&self) -> Id; - #[method_id(trueExpression)] + #[method_id(@__retain_semantics Other trueExpression)] pub unsafe fn trueExpression(&self) -> Id; - #[method_id(falseExpression)] + #[method_id(@__retain_semantics Other falseExpression)] pub unsafe fn falseExpression(&self) -> Id; #[method(expressionBlock)] pub unsafe fn expressionBlock(&self) -> TodoBlock; - #[method_id(expressionValueWithObject:context:)] + #[method_id(@__retain_semantics Other expressionValueWithObject:context:)] pub unsafe fn expressionValueWithObject_context( &self, object: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index febdcbc03..678d69562 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSExtensionContext { - #[method_id(inputItems)] + #[method_id(@__retain_semantics Other inputItems)] pub unsafe fn inputItems(&self) -> Id; #[method(completeRequestReturningItems:completionHandler:)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index b065d144e..8341dcd16 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -14,13 +14,13 @@ extern_class!( extern_methods!( unsafe impl NSExtensionItem { - #[method_id(attributedTitle)] + #[method_id(@__retain_semantics Other attributedTitle)] pub unsafe fn attributedTitle(&self) -> Option>; #[method(setAttributedTitle:)] pub unsafe fn setAttributedTitle(&self, attributedTitle: Option<&NSAttributedString>); - #[method_id(attributedContentText)] + #[method_id(@__retain_semantics Other attributedContentText)] pub unsafe fn attributedContentText(&self) -> Option>; #[method(setAttributedContentText:)] @@ -29,13 +29,13 @@ extern_methods!( attributedContentText: Option<&NSAttributedString>, ); - #[method_id(attachments)] + #[method_id(@__retain_semantics Other attachments)] pub unsafe fn attachments(&self) -> Option, Shared>>; #[method(setAttachments:)] pub unsafe fn setAttachments(&self, attachments: Option<&NSArray>); - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>; #[method(setUserInfo:)] diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 91164b9e2..241b22c75 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -29,19 +29,19 @@ extern_class!( extern_methods!( unsafe impl NSFileAccessIntent { - #[method_id(readingIntentWithURL:options:)] + #[method_id(@__retain_semantics Other readingIntentWithURL:options:)] pub unsafe fn readingIntentWithURL_options( url: &NSURL, options: NSFileCoordinatorReadingOptions, ) -> Id; - #[method_id(writingIntentWithURL:options:)] + #[method_id(@__retain_semantics Other writingIntentWithURL:options:)] pub unsafe fn writingIntentWithURL_options( url: &NSURL, options: NSFileCoordinatorWritingOptions, ) -> Id; - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Id; } ); @@ -63,16 +63,16 @@ extern_methods!( #[method(removeFilePresenter:)] pub unsafe fn removeFilePresenter(filePresenter: &NSFilePresenter); - #[method_id(filePresenters)] + #[method_id(@__retain_semantics Other filePresenters)] pub unsafe fn filePresenters() -> Id, Shared>; - #[method_id(initWithFilePresenter:)] + #[method_id(@__retain_semantics Init initWithFilePresenter:)] pub unsafe fn initWithFilePresenter( this: Option>, filePresenterOrNil: Option<&NSFilePresenter>, ) -> Id; - #[method_id(purposeIdentifier)] + #[method_id(@__retain_semantics Other purposeIdentifier)] pub unsafe fn purposeIdentifier(&self) -> Id; #[method(setPurposeIdentifier:)] diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 2f56e9375..df1bcc703 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -14,28 +14,28 @@ extern_class!( extern_methods!( unsafe impl NSFileHandle { - #[method_id(availableData)] + #[method_id(@__retain_semantics Other availableData)] pub unsafe fn availableData(&self) -> Id; - #[method_id(initWithFileDescriptor:closeOnDealloc:)] + #[method_id(@__retain_semantics Init initWithFileDescriptor:closeOnDealloc:)] pub unsafe fn initWithFileDescriptor_closeOnDealloc( this: Option>, fd: c_int, closeopt: bool, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(readDataToEndOfFileAndReturnError:)] + #[method_id(@__retain_semantics Other readDataToEndOfFileAndReturnError:)] pub unsafe fn readDataToEndOfFileAndReturnError( &self, ) -> Result, Id>; - #[method_id(readDataUpToLength:error:)] + #[method_id(@__retain_semantics Other readDataUpToLength:error:)] pub unsafe fn readDataUpToLength_error( &self, length: NSUInteger, @@ -79,38 +79,38 @@ extern_methods!( extern_methods!( /// NSFileHandleCreation unsafe impl NSFileHandle { - #[method_id(fileHandleWithStandardInput)] + #[method_id(@__retain_semantics Other fileHandleWithStandardInput)] pub unsafe fn fileHandleWithStandardInput() -> Id; - #[method_id(fileHandleWithStandardOutput)] + #[method_id(@__retain_semantics Other fileHandleWithStandardOutput)] pub unsafe fn fileHandleWithStandardOutput() -> Id; - #[method_id(fileHandleWithStandardError)] + #[method_id(@__retain_semantics Other fileHandleWithStandardError)] pub unsafe fn fileHandleWithStandardError() -> Id; - #[method_id(fileHandleWithNullDevice)] + #[method_id(@__retain_semantics Other fileHandleWithNullDevice)] pub unsafe fn fileHandleWithNullDevice() -> Id; - #[method_id(fileHandleForReadingAtPath:)] + #[method_id(@__retain_semantics Other fileHandleForReadingAtPath:)] pub unsafe fn fileHandleForReadingAtPath(path: &NSString) -> Option>; - #[method_id(fileHandleForWritingAtPath:)] + #[method_id(@__retain_semantics Other fileHandleForWritingAtPath:)] pub unsafe fn fileHandleForWritingAtPath(path: &NSString) -> Option>; - #[method_id(fileHandleForUpdatingAtPath:)] + #[method_id(@__retain_semantics Other fileHandleForUpdatingAtPath:)] pub unsafe fn fileHandleForUpdatingAtPath(path: &NSString) -> Option>; - #[method_id(fileHandleForReadingFromURL:error:)] + #[method_id(@__retain_semantics Other fileHandleForReadingFromURL:error:)] pub unsafe fn fileHandleForReadingFromURL_error( url: &NSURL, ) -> Result, Id>; - #[method_id(fileHandleForWritingToURL:error:)] + #[method_id(@__retain_semantics Other fileHandleForWritingToURL:error:)] pub unsafe fn fileHandleForWritingToURL_error( url: &NSURL, ) -> Result, Id>; - #[method_id(fileHandleForUpdatingURL:error:)] + #[method_id(@__retain_semantics Other fileHandleForUpdatingURL:error:)] pub unsafe fn fileHandleForUpdatingURL_error( url: &NSURL, ) -> Result, Id>; @@ -205,7 +205,7 @@ extern_methods!( extern_methods!( /// NSFileHandlePlatformSpecific unsafe impl NSFileHandle { - #[method_id(initWithFileDescriptor:)] + #[method_id(@__retain_semantics Init initWithFileDescriptor:)] pub unsafe fn initWithFileDescriptor( this: Option>, fd: c_int, @@ -218,10 +218,10 @@ extern_methods!( extern_methods!( unsafe impl NSFileHandle { - #[method_id(readDataToEndOfFile)] + #[method_id(@__retain_semantics Other readDataToEndOfFile)] pub unsafe fn readDataToEndOfFile(&self) -> Id; - #[method_id(readDataOfLength:)] + #[method_id(@__retain_semantics Other readDataOfLength:)] pub unsafe fn readDataOfLength(&self, length: NSUInteger) -> Id; #[method(writeData:)] @@ -258,13 +258,13 @@ extern_class!( extern_methods!( unsafe impl NSPipe { - #[method_id(fileHandleForReading)] + #[method_id(@__retain_semantics Other fileHandleForReading)] pub unsafe fn fileHandleForReading(&self) -> Id; - #[method_id(fileHandleForWriting)] + #[method_id(@__retain_semantics Other fileHandleForWriting)] pub unsafe fn fileHandleForWriting(&self) -> Id; - #[method_id(pipe)] + #[method_id(@__retain_semantics Other pipe)] pub unsafe fn pipe() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 0faa0278d..30ed09caa 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -58,10 +58,10 @@ extern_class!( extern_methods!( unsafe impl NSFileManager { - #[method_id(defaultManager)] + #[method_id(@__retain_semantics Other defaultManager)] pub unsafe fn defaultManager() -> Id; - #[method_id(mountedVolumeURLsIncludingResourceValuesForKeys:options:)] + #[method_id(@__retain_semantics Other mountedVolumeURLsIncludingResourceValuesForKeys:options:)] pub unsafe fn mountedVolumeURLsIncludingResourceValuesForKeys_options( &self, propertyKeys: Option<&NSArray>, @@ -76,7 +76,7 @@ extern_methods!( completionHandler: TodoBlock, ); - #[method_id(contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:)] + #[method_id(@__retain_semantics Other contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:)] pub unsafe fn contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error( &self, url: &NSURL, @@ -84,14 +84,14 @@ extern_methods!( mask: NSDirectoryEnumerationOptions, ) -> Result, Shared>, Id>; - #[method_id(URLsForDirectory:inDomains:)] + #[method_id(@__retain_semantics Other URLsForDirectory:inDomains:)] pub unsafe fn URLsForDirectory_inDomains( &self, directory: NSSearchPathDirectory, domainMask: NSSearchPathDomainMask, ) -> Id, Shared>; - #[method_id(URLForDirectory:inDomain:appropriateForURL:create:error:)] + #[method_id(@__retain_semantics Other URLForDirectory:inDomain:appropriateForURL:create:error:)] pub unsafe fn URLForDirectory_inDomain_appropriateForURL_create_error( &self, directory: NSSearchPathDirectory, @@ -132,7 +132,7 @@ extern_methods!( destURL: &NSURL, ) -> Result<(), Id>; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -153,25 +153,25 @@ extern_methods!( attributes: Option<&NSDictionary>, ) -> Result<(), Id>; - #[method_id(contentsOfDirectoryAtPath:error:)] + #[method_id(@__retain_semantics Other contentsOfDirectoryAtPath:error:)] pub unsafe fn contentsOfDirectoryAtPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; - #[method_id(subpathsOfDirectoryAtPath:error:)] + #[method_id(@__retain_semantics Other subpathsOfDirectoryAtPath:error:)] pub unsafe fn subpathsOfDirectoryAtPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; - #[method_id(attributesOfItemAtPath:error:)] + #[method_id(@__retain_semantics Other attributesOfItemAtPath:error:)] pub unsafe fn attributesOfItemAtPath_error( &self, path: &NSString, ) -> Result, Shared>, Id>; - #[method_id(attributesOfFileSystemForPath:error:)] + #[method_id(@__retain_semantics Other attributesOfFileSystemForPath:error:)] pub unsafe fn attributesOfFileSystemForPath_error( &self, path: &NSString, @@ -184,7 +184,7 @@ extern_methods!( destPath: &NSString, ) -> Result<(), Id>; - #[method_id(destinationOfSymbolicLinkAtPath:error:)] + #[method_id(@__retain_semantics Other destinationOfSymbolicLinkAtPath:error:)] pub unsafe fn destinationOfSymbolicLinkAtPath_error( &self, path: &NSString, @@ -248,7 +248,7 @@ extern_methods!( outResultingURL: Option<&mut Option>>, ) -> Result<(), Id>; - #[method_id(fileAttributesAtPath:traverseLink:)] + #[method_id(@__retain_semantics Other fileAttributesAtPath:traverseLink:)] pub unsafe fn fileAttributesAtPath_traverseLink( &self, path: &NSString, @@ -262,19 +262,19 @@ extern_methods!( path: &NSString, ) -> bool; - #[method_id(directoryContentsAtPath:)] + #[method_id(@__retain_semantics Other directoryContentsAtPath:)] pub unsafe fn directoryContentsAtPath( &self, path: &NSString, ) -> Option>; - #[method_id(fileSystemAttributesAtPath:)] + #[method_id(@__retain_semantics Other fileSystemAttributesAtPath:)] pub unsafe fn fileSystemAttributesAtPath( &self, path: &NSString, ) -> Option>; - #[method_id(pathContentOfSymbolicLinkAtPath:)] + #[method_id(@__retain_semantics Other pathContentOfSymbolicLinkAtPath:)] pub unsafe fn pathContentOfSymbolicLinkAtPath( &self, path: &NSString, @@ -325,7 +325,7 @@ extern_methods!( handler: Option<&Object>, ) -> bool; - #[method_id(currentDirectoryPath)] + #[method_id(@__retain_semantics Other currentDirectoryPath)] pub unsafe fn currentDirectoryPath(&self) -> Id; #[method(changeCurrentDirectoryPath:)] @@ -360,22 +360,22 @@ extern_methods!( path2: &NSString, ) -> bool; - #[method_id(displayNameAtPath:)] + #[method_id(@__retain_semantics Other displayNameAtPath:)] pub unsafe fn displayNameAtPath(&self, path: &NSString) -> Id; - #[method_id(componentsToDisplayForPath:)] + #[method_id(@__retain_semantics Other componentsToDisplayForPath:)] pub unsafe fn componentsToDisplayForPath( &self, path: &NSString, ) -> Option, Shared>>; - #[method_id(enumeratorAtPath:)] + #[method_id(@__retain_semantics Other enumeratorAtPath:)] pub unsafe fn enumeratorAtPath( &self, path: &NSString, ) -> Option, Shared>>; - #[method_id(enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:)] + #[method_id(@__retain_semantics Other enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:)] pub unsafe fn enumeratorAtURL_includingPropertiesForKeys_options_errorHandler( &self, url: &NSURL, @@ -384,13 +384,13 @@ extern_methods!( handler: TodoBlock, ) -> Option, Shared>>; - #[method_id(subpathsAtPath:)] + #[method_id(@__retain_semantics Other subpathsAtPath:)] pub unsafe fn subpathsAtPath( &self, path: &NSString, ) -> Option, Shared>>; - #[method_id(contentsAtPath:)] + #[method_id(@__retain_semantics Other contentsAtPath:)] pub unsafe fn contentsAtPath(&self, path: &NSString) -> Option>; #[method(createFileAtPath:contents:attributes:)] @@ -404,7 +404,7 @@ extern_methods!( #[method(fileSystemRepresentationWithPath:)] pub unsafe fn fileSystemRepresentationWithPath(&self, path: &NSString) -> NonNull; - #[method_id(stringWithFileSystemRepresentation:length:)] + #[method_id(@__retain_semantics Other stringWithFileSystemRepresentation:length:)] pub unsafe fn stringWithFileSystemRepresentation_length( &self, str: NonNull, @@ -444,20 +444,20 @@ extern_methods!( url: &NSURL, ) -> Result<(), Id>; - #[method_id(URLForUbiquityContainerIdentifier:)] + #[method_id(@__retain_semantics Other URLForUbiquityContainerIdentifier:)] pub unsafe fn URLForUbiquityContainerIdentifier( &self, containerIdentifier: Option<&NSString>, ) -> Option>; - #[method_id(URLForPublishingUbiquitousItemAtURL:expirationDate:error:)] + #[method_id(@__retain_semantics Other URLForPublishingUbiquitousItemAtURL:expirationDate:error:)] pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( &self, url: &NSURL, outDate: Option<&mut Option>>, ) -> Result, Id>; - #[method_id(ubiquityIdentityToken)] + #[method_id(@__retain_semantics Other ubiquityIdentityToken)] pub unsafe fn ubiquityIdentityToken(&self) -> Option>; #[method(getFileProviderServicesForItemAtURL:completionHandler:)] @@ -467,7 +467,7 @@ extern_methods!( completionHandler: TodoBlock, ); - #[method_id(containerURLForSecurityApplicationGroupIdentifier:)] + #[method_id(@__retain_semantics Other containerURLForSecurityApplicationGroupIdentifier:)] pub unsafe fn containerURLForSecurityApplicationGroupIdentifier( &self, groupIdentifier: &NSString, @@ -478,13 +478,13 @@ extern_methods!( extern_methods!( /// NSUserInformation unsafe impl NSFileManager { - #[method_id(homeDirectoryForCurrentUser)] + #[method_id(@__retain_semantics Other homeDirectoryForCurrentUser)] pub unsafe fn homeDirectoryForCurrentUser(&self) -> Id; - #[method_id(temporaryDirectory)] + #[method_id(@__retain_semantics Other temporaryDirectory)] pub unsafe fn temporaryDirectory(&self) -> Id; - #[method_id(homeDirectoryForUser:)] + #[method_id(@__retain_semantics Other homeDirectoryForUser:)] pub unsafe fn homeDirectoryForUser(&self, userName: &NSString) -> Option>; } @@ -520,12 +520,12 @@ __inner_extern_class!( extern_methods!( unsafe impl NSDirectoryEnumerator { - #[method_id(fileAttributes)] + #[method_id(@__retain_semantics Other fileAttributes)] pub unsafe fn fileAttributes( &self, ) -> Option, Shared>>; - #[method_id(directoryAttributes)] + #[method_id(@__retain_semantics Other directoryAttributes)] pub unsafe fn directoryAttributes( &self, ) -> Option, Shared>>; @@ -561,7 +561,7 @@ extern_methods!( completionHandler: TodoBlock, ); - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; } ); @@ -712,19 +712,19 @@ extern_methods!( #[method(fileSize)] pub unsafe fn fileSize(&self) -> c_ulonglong; - #[method_id(fileModificationDate)] + #[method_id(@__retain_semantics Other fileModificationDate)] pub unsafe fn fileModificationDate(&self) -> Option>; - #[method_id(fileType)] + #[method_id(@__retain_semantics Other fileType)] pub unsafe fn fileType(&self) -> Option>; #[method(filePosixPermissions)] pub unsafe fn filePosixPermissions(&self) -> NSUInteger; - #[method_id(fileOwnerAccountName)] + #[method_id(@__retain_semantics Other fileOwnerAccountName)] pub unsafe fn fileOwnerAccountName(&self) -> Option>; - #[method_id(fileGroupOwnerAccountName)] + #[method_id(@__retain_semantics Other fileGroupOwnerAccountName)] pub unsafe fn fileGroupOwnerAccountName(&self) -> Option>; #[method(fileSystemNumber)] @@ -748,13 +748,13 @@ extern_methods!( #[method(fileIsAppendOnly)] pub unsafe fn fileIsAppendOnly(&self) -> bool; - #[method_id(fileCreationDate)] + #[method_id(@__retain_semantics Other fileCreationDate)] pub unsafe fn fileCreationDate(&self) -> Option>; - #[method_id(fileOwnerAccountID)] + #[method_id(@__retain_semantics Other fileOwnerAccountID)] pub unsafe fn fileOwnerAccountID(&self) -> Option>; - #[method_id(fileGroupOwnerAccountID)] + #[method_id(@__retain_semantics Other fileGroupOwnerAccountID)] pub unsafe fn fileGroupOwnerAccountID(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index 0490e376c..073da91c1 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -20,15 +20,15 @@ extern_class!( extern_methods!( unsafe impl NSFileVersion { - #[method_id(currentVersionOfItemAtURL:)] + #[method_id(@__retain_semantics Other currentVersionOfItemAtURL:)] pub unsafe fn currentVersionOfItemAtURL(url: &NSURL) -> Option>; - #[method_id(otherVersionsOfItemAtURL:)] + #[method_id(@__retain_semantics Other otherVersionsOfItemAtURL:)] pub unsafe fn otherVersionsOfItemAtURL( url: &NSURL, ) -> Option, Shared>>; - #[method_id(unresolvedConflictVersionsOfItemAtURL:)] + #[method_id(@__retain_semantics Other unresolvedConflictVersionsOfItemAtURL:)] pub unsafe fn unresolvedConflictVersionsOfItemAtURL( url: &NSURL, ) -> Option, Shared>>; @@ -39,41 +39,41 @@ extern_methods!( completionHandler: TodoBlock, ); - #[method_id(versionOfItemAtURL:forPersistentIdentifier:)] + #[method_id(@__retain_semantics Other versionOfItemAtURL:forPersistentIdentifier:)] pub unsafe fn versionOfItemAtURL_forPersistentIdentifier( url: &NSURL, persistentIdentifier: &Object, ) -> Option>; - #[method_id(addVersionOfItemAtURL:withContentsOfURL:options:error:)] + #[method_id(@__retain_semantics Other addVersionOfItemAtURL:withContentsOfURL:options:error:)] pub unsafe fn addVersionOfItemAtURL_withContentsOfURL_options_error( url: &NSURL, contentsURL: &NSURL, options: NSFileVersionAddingOptions, ) -> Result, Id>; - #[method_id(temporaryDirectoryURLForNewVersionOfItemAtURL:)] + #[method_id(@__retain_semantics Other temporaryDirectoryURLForNewVersionOfItemAtURL:)] pub unsafe fn temporaryDirectoryURLForNewVersionOfItemAtURL( url: &NSURL, ) -> Id; - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Id; - #[method_id(localizedName)] + #[method_id(@__retain_semantics Other localizedName)] pub unsafe fn localizedName(&self) -> Option>; - #[method_id(localizedNameOfSavingComputer)] + #[method_id(@__retain_semantics Other localizedNameOfSavingComputer)] pub unsafe fn localizedNameOfSavingComputer(&self) -> Option>; - #[method_id(originatorNameComponents)] + #[method_id(@__retain_semantics Other originatorNameComponents)] pub unsafe fn originatorNameComponents(&self) -> Option>; - #[method_id(modificationDate)] + #[method_id(@__retain_semantics Other modificationDate)] pub unsafe fn modificationDate(&self) -> Option>; - #[method_id(persistentIdentifier)] + #[method_id(@__retain_semantics Other persistentIdentifier)] pub unsafe fn persistentIdentifier(&self) -> Id; #[method(isConflict)] @@ -97,7 +97,7 @@ extern_methods!( #[method(hasThumbnail)] pub unsafe fn hasThumbnail(&self) -> bool; - #[method_id(replaceItemAtURL:options:error:)] + #[method_id(@__retain_semantics Other replaceItemAtURL:options:error:)] pub unsafe fn replaceItemAtURL_options_error( &self, url: &NSURL, diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 6e0408584..914e7d430 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -22,38 +22,38 @@ extern_class!( extern_methods!( unsafe impl NSFileWrapper { - #[method_id(initWithURL:options:error:)] + #[method_id(@__retain_semantics Init initWithURL:options:error:)] pub unsafe fn initWithURL_options_error( this: Option>, url: &NSURL, options: NSFileWrapperReadingOptions, ) -> Result, Id>; - #[method_id(initDirectoryWithFileWrappers:)] + #[method_id(@__retain_semantics Init initDirectoryWithFileWrappers:)] pub unsafe fn initDirectoryWithFileWrappers( this: Option>, childrenByPreferredName: &NSDictionary, ) -> Id; - #[method_id(initRegularFileWithContents:)] + #[method_id(@__retain_semantics Init initRegularFileWithContents:)] pub unsafe fn initRegularFileWithContents( this: Option>, contents: &NSData, ) -> Id; - #[method_id(initSymbolicLinkWithDestinationURL:)] + #[method_id(@__retain_semantics Init initSymbolicLinkWithDestinationURL:)] pub unsafe fn initSymbolicLinkWithDestinationURL( this: Option>, url: &NSURL, ) -> Id; - #[method_id(initWithSerializedRepresentation:)] + #[method_id(@__retain_semantics Init initWithSerializedRepresentation:)] pub unsafe fn initWithSerializedRepresentation( this: Option>, serializeRepresentation: &NSData, ) -> Option>; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, @@ -68,19 +68,19 @@ extern_methods!( #[method(isSymbolicLink)] pub unsafe fn isSymbolicLink(&self) -> bool; - #[method_id(preferredFilename)] + #[method_id(@__retain_semantics Other preferredFilename)] pub unsafe fn preferredFilename(&self) -> Option>; #[method(setPreferredFilename:)] pub unsafe fn setPreferredFilename(&self, preferredFilename: Option<&NSString>); - #[method_id(filename)] + #[method_id(@__retain_semantics Other filename)] pub unsafe fn filename(&self) -> Option>; #[method(setFilename:)] pub unsafe fn setFilename(&self, filename: Option<&NSString>); - #[method_id(fileAttributes)] + #[method_id(@__retain_semantics Other fileAttributes)] pub unsafe fn fileAttributes(&self) -> Id, Shared>; #[method(setFileAttributes:)] @@ -104,13 +104,13 @@ extern_methods!( originalContentsURL: Option<&NSURL>, ) -> Result<(), Id>; - #[method_id(serializedRepresentation)] + #[method_id(@__retain_semantics Other serializedRepresentation)] pub unsafe fn serializedRepresentation(&self) -> Option>; - #[method_id(addFileWrapper:)] + #[method_id(@__retain_semantics Other addFileWrapper:)] pub unsafe fn addFileWrapper(&self, child: &NSFileWrapper) -> Id; - #[method_id(addRegularFileWithContents:preferredFilename:)] + #[method_id(@__retain_semantics Other addRegularFileWithContents:preferredFilename:)] pub unsafe fn addRegularFileWithContents_preferredFilename( &self, data: &NSData, @@ -120,21 +120,21 @@ extern_methods!( #[method(removeFileWrapper:)] pub unsafe fn removeFileWrapper(&self, child: &NSFileWrapper); - #[method_id(fileWrappers)] + #[method_id(@__retain_semantics Other fileWrappers)] pub unsafe fn fileWrappers( &self, ) -> Option, Shared>>; - #[method_id(keyForFileWrapper:)] + #[method_id(@__retain_semantics Other keyForFileWrapper:)] pub unsafe fn keyForFileWrapper( &self, child: &NSFileWrapper, ) -> Option>; - #[method_id(regularFileContents)] + #[method_id(@__retain_semantics Other regularFileContents)] pub unsafe fn regularFileContents(&self) -> Option>; - #[method_id(symbolicLinkDestinationURL)] + #[method_id(@__retain_semantics Other symbolicLinkDestinationURL)] pub unsafe fn symbolicLinkDestinationURL(&self) -> Option>; } ); @@ -142,13 +142,13 @@ extern_methods!( extern_methods!( /// NSDeprecated unsafe impl NSFileWrapper { - #[method_id(initWithPath:)] + #[method_id(@__retain_semantics Init initWithPath:)] pub unsafe fn initWithPath( this: Option>, path: &NSString, ) -> Option>; - #[method_id(initSymbolicLinkWithDestination:)] + #[method_id(@__retain_semantics Init initSymbolicLinkWithDestination:)] pub unsafe fn initSymbolicLinkWithDestination( this: Option>, path: &NSString, @@ -168,17 +168,17 @@ extern_methods!( updateFilenamesFlag: bool, ) -> bool; - #[method_id(addFileWithPath:)] + #[method_id(@__retain_semantics Other addFileWithPath:)] pub unsafe fn addFileWithPath(&self, path: &NSString) -> Id; - #[method_id(addSymbolicLinkWithDestination:preferredFilename:)] + #[method_id(@__retain_semantics Other addSymbolicLinkWithDestination:preferredFilename:)] pub unsafe fn addSymbolicLinkWithDestination_preferredFilename( &self, path: &NSString, filename: &NSString, ) -> Id; - #[method_id(symbolicLinkDestination)] + #[method_id(@__retain_semantics Other symbolicLinkDestination)] pub unsafe fn symbolicLinkDestination(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index 5b51a3068..57dbf5030 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -27,20 +27,20 @@ extern_class!( extern_methods!( unsafe impl NSFormatter { - #[method_id(stringForObjectValue:)] + #[method_id(@__retain_semantics Other stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, ) -> Option>; - #[method_id(attributedStringForObjectValue:withDefaultAttributes:)] + #[method_id(@__retain_semantics Other attributedStringForObjectValue:withDefaultAttributes:)] pub unsafe fn attributedStringForObjectValue_withDefaultAttributes( &self, obj: &Object, attrs: Option<&NSDictionary>, ) -> Option>; - #[method_id(editingStringForObjectValue:)] + #[method_id(@__retain_semantics Other editingStringForObjectValue:)] pub unsafe fn editingStringForObjectValue( &self, obj: &Object, diff --git a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs index b059265cd..bea92114c 100644 --- a/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs +++ b/crates/icrate/src/generated/Foundation/NSGarbageCollector.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSGarbageCollector { - #[method_id(defaultCollector)] + #[method_id(@__retain_semantics Other defaultCollector)] pub unsafe fn defaultCollector() -> Id; #[method(isCollecting)] diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 71753cb30..c91f79a72 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -65,16 +65,16 @@ extern "C" { extern_methods!( /// NSValueGeometryExtensions unsafe impl NSValue { - #[method_id(valueWithPoint:)] + #[method_id(@__retain_semantics Other valueWithPoint:)] pub unsafe fn valueWithPoint(point: NSPoint) -> Id; - #[method_id(valueWithSize:)] + #[method_id(@__retain_semantics Other valueWithSize:)] pub unsafe fn valueWithSize(size: NSSize) -> Id; - #[method_id(valueWithRect:)] + #[method_id(@__retain_semantics Other valueWithRect:)] pub unsafe fn valueWithRect(rect: NSRect) -> Id; - #[method_id(valueWithEdgeInsets:)] + #[method_id(@__retain_semantics Other valueWithEdgeInsets:)] pub unsafe fn valueWithEdgeInsets(insets: NSEdgeInsets) -> Id; #[method(pointValue)] diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index cf243c343..a377feba2 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -82,29 +82,29 @@ extern_class!( extern_methods!( unsafe impl NSHTTPCookie { - #[method_id(initWithProperties:)] + #[method_id(@__retain_semantics Init initWithProperties:)] pub unsafe fn initWithProperties( this: Option>, properties: &NSDictionary, ) -> Option>; - #[method_id(cookieWithProperties:)] + #[method_id(@__retain_semantics Other cookieWithProperties:)] pub unsafe fn cookieWithProperties( properties: &NSDictionary, ) -> Option>; - #[method_id(requestHeaderFieldsWithCookies:)] + #[method_id(@__retain_semantics Other requestHeaderFieldsWithCookies:)] pub unsafe fn requestHeaderFieldsWithCookies( cookies: &NSArray, ) -> Id, Shared>; - #[method_id(cookiesWithResponseHeaderFields:forURL:)] + #[method_id(@__retain_semantics Other cookiesWithResponseHeaderFields:forURL:)] pub unsafe fn cookiesWithResponseHeaderFields_forURL( headerFields: &NSDictionary, URL: &NSURL, ) -> Id, Shared>; - #[method_id(properties)] + #[method_id(@__retain_semantics Other properties)] pub unsafe fn properties( &self, ) -> Option, Shared>>; @@ -112,22 +112,22 @@ extern_methods!( #[method(version)] pub unsafe fn version(&self) -> NSUInteger; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; - #[method_id(value)] + #[method_id(@__retain_semantics Other value)] pub unsafe fn value(&self) -> Id; - #[method_id(expiresDate)] + #[method_id(@__retain_semantics Other expiresDate)] pub unsafe fn expiresDate(&self) -> Option>; #[method(isSessionOnly)] pub unsafe fn isSessionOnly(&self) -> bool; - #[method_id(domain)] + #[method_id(@__retain_semantics Other domain)] pub unsafe fn domain(&self) -> Id; - #[method_id(path)] + #[method_id(@__retain_semantics Other path)] pub unsafe fn path(&self) -> Id; #[method(isSecure)] @@ -136,16 +136,16 @@ extern_methods!( #[method(isHTTPOnly)] pub unsafe fn isHTTPOnly(&self) -> bool; - #[method_id(comment)] + #[method_id(@__retain_semantics Other comment)] pub unsafe fn comment(&self) -> Option>; - #[method_id(commentURL)] + #[method_id(@__retain_semantics Other commentURL)] pub unsafe fn commentURL(&self) -> Option>; - #[method_id(portList)] + #[method_id(@__retain_semantics Other portList)] pub unsafe fn portList(&self) -> Option, Shared>>; - #[method_id(sameSitePolicy)] + #[method_id(@__retain_semantics Other sameSitePolicy)] pub unsafe fn sameSitePolicy(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index 38ec76a51..fe624b64e 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -19,15 +19,15 @@ extern_class!( extern_methods!( unsafe impl NSHTTPCookieStorage { - #[method_id(sharedHTTPCookieStorage)] + #[method_id(@__retain_semantics Other sharedHTTPCookieStorage)] pub unsafe fn sharedHTTPCookieStorage() -> Id; - #[method_id(sharedCookieStorageForGroupContainerIdentifier:)] + #[method_id(@__retain_semantics Other sharedCookieStorageForGroupContainerIdentifier:)] pub unsafe fn sharedCookieStorageForGroupContainerIdentifier( identifier: &NSString, ) -> Id; - #[method_id(cookies)] + #[method_id(@__retain_semantics Other cookies)] pub unsafe fn cookies(&self) -> Option, Shared>>; #[method(setCookie:)] @@ -39,7 +39,7 @@ extern_methods!( #[method(removeCookiesSinceDate:)] pub unsafe fn removeCookiesSinceDate(&self, date: &NSDate); - #[method_id(cookiesForURL:)] + #[method_id(@__retain_semantics Other cookiesForURL:)] pub unsafe fn cookiesForURL( &self, URL: &NSURL, @@ -59,7 +59,7 @@ extern_methods!( #[method(setCookieAcceptPolicy:)] pub unsafe fn setCookieAcceptPolicy(&self, cookieAcceptPolicy: NSHTTPCookieAcceptPolicy); - #[method_id(sortedCookiesUsingDescriptors:)] + #[method_id(@__retain_semantics Other sortedCookiesUsingDescriptors:)] pub unsafe fn sortedCookiesUsingDescriptors( &self, sortOrder: &NSArray, diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index e43a30dd7..eece9fd86 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -30,41 +30,41 @@ __inner_extern_class!( extern_methods!( unsafe impl NSHashTable { - #[method_id(initWithOptions:capacity:)] + #[method_id(@__retain_semantics Init initWithOptions:capacity:)] pub unsafe fn initWithOptions_capacity( this: Option>, options: NSPointerFunctionsOptions, initialCapacity: NSUInteger, ) -> Id; - #[method_id(initWithPointerFunctions:capacity:)] + #[method_id(@__retain_semantics Init initWithPointerFunctions:capacity:)] pub unsafe fn initWithPointerFunctions_capacity( this: Option>, functions: &NSPointerFunctions, initialCapacity: NSUInteger, ) -> Id; - #[method_id(hashTableWithOptions:)] + #[method_id(@__retain_semantics Other hashTableWithOptions:)] pub unsafe fn hashTableWithOptions( options: NSPointerFunctionsOptions, ) -> Id, Shared>; - #[method_id(hashTableWithWeakObjects)] + #[method_id(@__retain_semantics Other hashTableWithWeakObjects)] pub unsafe fn hashTableWithWeakObjects() -> Id; - #[method_id(weakObjectsHashTable)] + #[method_id(@__retain_semantics Other weakObjectsHashTable)] pub unsafe fn weakObjectsHashTable() -> Id, Shared>; - #[method_id(pointerFunctions)] + #[method_id(@__retain_semantics Other pointerFunctions)] pub unsafe fn pointerFunctions(&self) -> Id; #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - #[method_id(member:)] + #[method_id(@__retain_semantics Other member:)] pub unsafe fn member(&self, object: Option<&ObjectType>) -> Option>; - #[method_id(objectEnumerator)] + #[method_id(@__retain_semantics Other objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; #[method(addObject:)] @@ -76,10 +76,10 @@ extern_methods!( #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); - #[method_id(allObjects)] + #[method_id(@__retain_semantics Other allObjects)] pub unsafe fn allObjects(&self) -> Id, Shared>; - #[method_id(anyObject)] + #[method_id(@__retain_semantics Other anyObject)] pub unsafe fn anyObject(&self) -> Option>; #[method(containsObject:)] @@ -103,7 +103,7 @@ extern_methods!( #[method(minusHashTable:)] pub unsafe fn minusHashTable(&self, other: &NSHashTable); - #[method_id(setRepresentation)] + #[method_id(@__retain_semantics Other setRepresentation)] pub unsafe fn setRepresentation(&self) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSHost.rs b/crates/icrate/src/generated/Foundation/NSHost.rs index eac7d0b52..79938e8eb 100644 --- a/crates/icrate/src/generated/Foundation/NSHost.rs +++ b/crates/icrate/src/generated/Foundation/NSHost.rs @@ -14,31 +14,31 @@ extern_class!( extern_methods!( unsafe impl NSHost { - #[method_id(currentHost)] + #[method_id(@__retain_semantics Other currentHost)] pub unsafe fn currentHost() -> Id; - #[method_id(hostWithName:)] + #[method_id(@__retain_semantics Other hostWithName:)] pub unsafe fn hostWithName(name: Option<&NSString>) -> Id; - #[method_id(hostWithAddress:)] + #[method_id(@__retain_semantics Other hostWithAddress:)] pub unsafe fn hostWithAddress(address: &NSString) -> Id; #[method(isEqualToHost:)] pub unsafe fn isEqualToHost(&self, aHost: &NSHost) -> bool; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; - #[method_id(names)] + #[method_id(@__retain_semantics Other names)] pub unsafe fn names(&self) -> Id, Shared>; - #[method_id(address)] + #[method_id(@__retain_semantics Other address)] pub unsafe fn address(&self) -> Option>; - #[method_id(addresses)] + #[method_id(@__retain_semantics Other addresses)] pub unsafe fn addresses(&self) -> Id, Shared>; - #[method_id(localizedName)] + #[method_id(@__retain_semantics Other localizedName)] pub unsafe fn localizedName(&self) -> Option>; #[method(setHostCacheEnabled:)] diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index d1e517c5b..1134f24c3 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -40,7 +40,7 @@ extern_class!( extern_methods!( unsafe impl NSISO8601DateFormatter { - #[method_id(timeZone)] + #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Id; #[method(setTimeZone:)] @@ -52,16 +52,16 @@ extern_methods!( #[method(setFormatOptions:)] pub unsafe fn setFormatOptions(&self, formatOptions: NSISO8601DateFormatOptions); - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(stringFromDate:)] + #[method_id(@__retain_semantics Other stringFromDate:)] pub unsafe fn stringFromDate(&self, date: &NSDate) -> Id; - #[method_id(dateFromString:)] + #[method_id(@__retain_semantics Other dateFromString:)] pub unsafe fn dateFromString(&self, string: &NSString) -> Option>; - #[method_id(stringFromDate:timeZone:formatOptions:)] + #[method_id(@__retain_semantics Other stringFromDate:timeZone:formatOptions:)] pub unsafe fn stringFromDate_timeZone_formatOptions( date: &NSDate, timeZone: &NSTimeZone, diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index e2153fdd8..9b597173a 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -14,32 +14,32 @@ extern_class!( extern_methods!( unsafe impl NSIndexPath { - #[method_id(indexPathWithIndex:)] + #[method_id(@__retain_semantics Other indexPathWithIndex:)] pub unsafe fn indexPathWithIndex(index: NSUInteger) -> Id; - #[method_id(indexPathWithIndexes:length:)] + #[method_id(@__retain_semantics Other indexPathWithIndexes:length:)] pub unsafe fn indexPathWithIndexes_length( indexes: TodoArray, length: NSUInteger, ) -> Id; - #[method_id(initWithIndexes:length:)] + #[method_id(@__retain_semantics Init initWithIndexes:length:)] pub unsafe fn initWithIndexes_length( this: Option>, indexes: TodoArray, length: NSUInteger, ) -> Id; - #[method_id(initWithIndex:)] + #[method_id(@__retain_semantics Init initWithIndex:)] pub unsafe fn initWithIndex( this: Option>, index: NSUInteger, ) -> Id; - #[method_id(indexPathByAddingIndex:)] + #[method_id(@__retain_semantics Other indexPathByAddingIndex:)] pub unsafe fn indexPathByAddingIndex(&self, index: NSUInteger) -> Id; - #[method_id(indexPathByRemovingLastIndex)] + #[method_id(@__retain_semantics Other indexPathByRemovingLastIndex)] pub unsafe fn indexPathByRemovingLastIndex(&self) -> Id; #[method(indexAtPosition:)] diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index 4ec9188b4..460c2db23 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -14,28 +14,28 @@ extern_class!( extern_methods!( unsafe impl NSIndexSet { - #[method_id(indexSet)] + #[method_id(@__retain_semantics Other indexSet)] pub unsafe fn indexSet() -> Id; - #[method_id(indexSetWithIndex:)] + #[method_id(@__retain_semantics Other indexSetWithIndex:)] pub unsafe fn indexSetWithIndex(value: NSUInteger) -> Id; - #[method_id(indexSetWithIndexesInRange:)] + #[method_id(@__retain_semantics Other indexSetWithIndexesInRange:)] pub unsafe fn indexSetWithIndexesInRange(range: NSRange) -> Id; - #[method_id(initWithIndexesInRange:)] + #[method_id(@__retain_semantics Init initWithIndexesInRange:)] pub unsafe fn initWithIndexesInRange( this: Option>, range: NSRange, ) -> Id; - #[method_id(initWithIndexSet:)] + #[method_id(@__retain_semantics Init initWithIndexSet:)] pub unsafe fn initWithIndexSet( this: Option>, indexSet: &NSIndexSet, ) -> Id; - #[method_id(initWithIndex:)] + #[method_id(@__retain_semantics Init initWithIndex:)] pub unsafe fn initWithIndex( this: Option>, value: NSUInteger, @@ -124,17 +124,17 @@ extern_methods!( predicate: TodoBlock, ) -> NSUInteger; - #[method_id(indexesPassingTest:)] + #[method_id(@__retain_semantics Other indexesPassingTest:)] pub unsafe fn indexesPassingTest(&self, predicate: TodoBlock) -> Id; - #[method_id(indexesWithOptions:passingTest:)] + #[method_id(@__retain_semantics Other indexesWithOptions:passingTest:)] pub unsafe fn indexesWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; - #[method_id(indexesInRange:options:passingTest:)] + #[method_id(@__retain_semantics Other indexesInRange:options:passingTest:)] pub unsafe fn indexesInRange_options_passingTest( &self, range: NSRange, diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index 0aa84dc41..fa4508ff2 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -14,10 +14,10 @@ extern_class!( extern_methods!( unsafe impl NSInflectionRule { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(automaticRule)] + #[method_id(@__retain_semantics Other automaticRule)] pub unsafe fn automaticRule() -> Id; } ); @@ -33,13 +33,13 @@ extern_class!( extern_methods!( unsafe impl NSInflectionRuleExplicit { - #[method_id(initWithMorphology:)] + #[method_id(@__retain_semantics Init initWithMorphology:)] pub unsafe fn initWithMorphology( this: Option>, morphology: &NSMorphology, ) -> Id; - #[method_id(morphology)] + #[method_id(@__retain_semantics Other morphology)] pub unsafe fn morphology(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSInvocation.rs b/crates/icrate/src/generated/Foundation/NSInvocation.rs index bd0bf8089..d489c5cea 100644 --- a/crates/icrate/src/generated/Foundation/NSInvocation.rs +++ b/crates/icrate/src/generated/Foundation/NSInvocation.rs @@ -14,12 +14,12 @@ extern_class!( extern_methods!( unsafe impl NSInvocation { - #[method_id(invocationWithMethodSignature:)] + #[method_id(@__retain_semantics Other invocationWithMethodSignature:)] pub unsafe fn invocationWithMethodSignature( sig: &NSMethodSignature, ) -> Id; - #[method_id(methodSignature)] + #[method_id(@__retain_semantics Other methodSignature)] pub unsafe fn methodSignature(&self) -> Id; #[method(retainArguments)] @@ -28,7 +28,7 @@ extern_methods!( #[method(argumentsRetained)] pub unsafe fn argumentsRetained(&self) -> bool; - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; #[method(setTarget:)] diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 8d11f5ecb..03c789d6f 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -28,7 +28,7 @@ extern_class!( extern_methods!( unsafe impl NSItemProvider { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[method(registerDataRepresentationForTypeIdentifier:visibility:loadHandler:)] @@ -48,10 +48,10 @@ extern_methods!( loadHandler: TodoBlock, ); - #[method_id(registeredTypeIdentifiers)] + #[method_id(@__retain_semantics Other registeredTypeIdentifiers)] pub unsafe fn registeredTypeIdentifiers(&self) -> Id, Shared>; - #[method_id(registeredTypeIdentifiersWithFileOptions:)] + #[method_id(@__retain_semantics Other registeredTypeIdentifiersWithFileOptions:)] pub unsafe fn registeredTypeIdentifiersWithFileOptions( &self, fileOptions: NSItemProviderFileOptions, @@ -67,34 +67,34 @@ extern_methods!( fileOptions: NSItemProviderFileOptions, ) -> bool; - #[method_id(loadDataRepresentationForTypeIdentifier:completionHandler:)] + #[method_id(@__retain_semantics Other loadDataRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadDataRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, ) -> Id; - #[method_id(loadFileRepresentationForTypeIdentifier:completionHandler:)] + #[method_id(@__retain_semantics Other loadFileRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadFileRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, ) -> Id; - #[method_id(loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:)] + #[method_id(@__retain_semantics Other loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadInPlaceFileRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, completionHandler: TodoBlock, ) -> Id; - #[method_id(suggestedName)] + #[method_id(@__retain_semantics Other suggestedName)] pub unsafe fn suggestedName(&self) -> Option>; #[method(setSuggestedName:)] pub unsafe fn setSuggestedName(&self, suggestedName: Option<&NSString>); - #[method_id(initWithObject:)] + #[method_id(@__retain_semantics Init initWithObject:)] pub unsafe fn initWithObject( this: Option>, object: &NSItemProviderWriting, @@ -107,14 +107,14 @@ extern_methods!( visibility: NSItemProviderRepresentationVisibility, ); - #[method_id(initWithItem:typeIdentifier:)] + #[method_id(@__retain_semantics Init initWithItem:typeIdentifier:)] pub unsafe fn initWithItem_typeIdentifier( this: Option>, item: Option<&NSSecureCoding>, typeIdentifier: Option<&NSString>, ) -> Id; - #[method_id(initWithContentsOfURL:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, fileURL: Option<&NSURL>, diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index e20b68e09..215262b52 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -31,19 +31,19 @@ extern_methods!( #[method(isValidJSONObject:)] pub unsafe fn isValidJSONObject(obj: &Object) -> bool; - #[method_id(dataWithJSONObject:options:error:)] + #[method_id(@__retain_semantics Other dataWithJSONObject:options:error:)] pub unsafe fn dataWithJSONObject_options_error( obj: &Object, opt: NSJSONWritingOptions, ) -> Result, Id>; - #[method_id(JSONObjectWithData:options:error:)] + #[method_id(@__retain_semantics Other JSONObjectWithData:options:error:)] pub unsafe fn JSONObjectWithData_options_error( data: &NSData, opt: NSJSONReadingOptions, ) -> Result, Id>; - #[method_id(JSONObjectWithStream:options:error:)] + #[method_id(@__retain_semantics Other JSONObjectWithStream:options:error:)] pub unsafe fn JSONObjectWithStream_options_error( stream: &NSInputStream, opt: NSJSONReadingOptions, diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index f7afc9395..20d2d372d 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -59,7 +59,7 @@ extern_methods!( #[method(accessInstanceVariablesDirectly)] pub unsafe fn accessInstanceVariablesDirectly() -> bool; - #[method_id(valueForKey:)] + #[method_id(@__retain_semantics Other valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; #[method(setValue:forKey:)] @@ -72,19 +72,19 @@ extern_methods!( inKey: &NSString, ) -> Result<(), Id>; - #[method_id(mutableArrayValueForKey:)] + #[method_id(@__retain_semantics Other mutableArrayValueForKey:)] pub unsafe fn mutableArrayValueForKey(&self, key: &NSString) -> Id; - #[method_id(mutableOrderedSetValueForKey:)] + #[method_id(@__retain_semantics Other mutableOrderedSetValueForKey:)] pub unsafe fn mutableOrderedSetValueForKey( &self, key: &NSString, ) -> Id; - #[method_id(mutableSetValueForKey:)] + #[method_id(@__retain_semantics Other mutableSetValueForKey:)] pub unsafe fn mutableSetValueForKey(&self, key: &NSString) -> Id; - #[method_id(valueForKeyPath:)] + #[method_id(@__retain_semantics Other valueForKeyPath:)] pub unsafe fn valueForKeyPath(&self, keyPath: &NSString) -> Option>; #[method(setValue:forKeyPath:)] @@ -97,25 +97,25 @@ extern_methods!( inKeyPath: &NSString, ) -> Result<(), Id>; - #[method_id(mutableArrayValueForKeyPath:)] + #[method_id(@__retain_semantics Other mutableArrayValueForKeyPath:)] pub unsafe fn mutableArrayValueForKeyPath( &self, keyPath: &NSString, ) -> Id; - #[method_id(mutableOrderedSetValueForKeyPath:)] + #[method_id(@__retain_semantics Other mutableOrderedSetValueForKeyPath:)] pub unsafe fn mutableOrderedSetValueForKeyPath( &self, keyPath: &NSString, ) -> Id; - #[method_id(mutableSetValueForKeyPath:)] + #[method_id(@__retain_semantics Other mutableSetValueForKeyPath:)] pub unsafe fn mutableSetValueForKeyPath( &self, keyPath: &NSString, ) -> Id; - #[method_id(valueForUndefinedKey:)] + #[method_id(@__retain_semantics Other valueForUndefinedKey:)] pub unsafe fn valueForUndefinedKey(&self, key: &NSString) -> Option>; #[method(setValue:forUndefinedKey:)] @@ -124,7 +124,7 @@ extern_methods!( #[method(setNilValueForKey:)] pub unsafe fn setNilValueForKey(&self, key: &NSString); - #[method_id(dictionaryWithValuesForKeys:)] + #[method_id(@__retain_semantics Other dictionaryWithValuesForKeys:)] pub unsafe fn dictionaryWithValuesForKeys( &self, keys: &NSArray, @@ -141,7 +141,7 @@ extern_methods!( extern_methods!( /// NSKeyValueCoding unsafe impl NSArray { - #[method_id(valueForKey:)] + #[method_id(@__retain_semantics Other valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Id; #[method(setValue:forKey:)] @@ -152,7 +152,7 @@ extern_methods!( extern_methods!( /// NSKeyValueCoding unsafe impl NSDictionary { - #[method_id(valueForKey:)] + #[method_id(@__retain_semantics Other valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; } ); @@ -168,7 +168,7 @@ extern_methods!( extern_methods!( /// NSKeyValueCoding unsafe impl NSOrderedSet { - #[method_id(valueForKey:)] + #[method_id(@__retain_semantics Other valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Id; #[method(setValue:forKey:)] @@ -179,7 +179,7 @@ extern_methods!( extern_methods!( /// NSKeyValueCoding unsafe impl NSSet { - #[method_id(valueForKey:)] + #[method_id(@__retain_semantics Other valueForKey:)] pub unsafe fn valueForKey(&self, key: &NSString) -> Id; #[method(setValue:forKey:)] @@ -193,7 +193,7 @@ extern_methods!( #[method(useStoredAccessor)] pub unsafe fn useStoredAccessor() -> bool; - #[method_id(storedValueForKey:)] + #[method_id(@__retain_semantics Other storedValueForKey:)] pub unsafe fn storedValueForKey(&self, key: &NSString) -> Option>; #[method(takeStoredValue:forKey:)] @@ -205,7 +205,7 @@ extern_methods!( #[method(takeValue:forKeyPath:)] pub unsafe fn takeValue_forKeyPath(&self, value: Option<&Object>, keyPath: &NSString); - #[method_id(handleQueryWithUnboundKey:)] + #[method_id(@__retain_semantics Other handleQueryWithUnboundKey:)] pub unsafe fn handleQueryWithUnboundKey( &self, key: &NSString, @@ -217,7 +217,7 @@ extern_methods!( #[method(unableToSetNilForKey:)] pub unsafe fn unableToSetNilForKey(&self, key: &NSString); - #[method_id(valuesForKeys:)] + #[method_id(@__retain_semantics Other valuesForKeys:)] pub unsafe fn valuesForKeys(&self, keys: &NSArray) -> Id; #[method(takeValuesFromDictionary:)] diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index ef81d93b4..04842736c 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -230,7 +230,7 @@ extern_methods!( extern_methods!( /// NSKeyValueObservingCustomization unsafe impl NSObject { - #[method_id(keyPathsForValuesAffectingValueForKey:)] + #[method_id(@__retain_semantics Other keyPathsForValuesAffectingValueForKey:)] pub unsafe fn keyPathsForValuesAffectingValueForKey( key: &NSString, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 39394df63..ba43c6674 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -26,34 +26,34 @@ extern_class!( extern_methods!( unsafe impl NSKeyedArchiver { - #[method_id(initRequiringSecureCoding:)] + #[method_id(@__retain_semantics Init initRequiringSecureCoding:)] pub unsafe fn initRequiringSecureCoding( this: Option>, requiresSecureCoding: bool, ) -> Id; - #[method_id(archivedDataWithRootObject:requiringSecureCoding:error:)] + #[method_id(@__retain_semantics Other archivedDataWithRootObject:requiringSecureCoding:error:)] pub unsafe fn archivedDataWithRootObject_requiringSecureCoding_error( object: &Object, requiresSecureCoding: bool, ) -> Result, Id>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initForWritingWithMutableData:)] + #[method_id(@__retain_semantics Init initForWritingWithMutableData:)] pub unsafe fn initForWritingWithMutableData( this: Option>, data: &NSMutableData, ) -> Id; - #[method_id(archivedDataWithRootObject:)] + #[method_id(@__retain_semantics Other archivedDataWithRootObject:)] pub unsafe fn archivedDataWithRootObject(rootObject: &Object) -> Id; #[method(archiveRootObject:toFile:)] pub unsafe fn archiveRootObject_toFile(rootObject: &Object, path: &NSString) -> bool; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -65,7 +65,7 @@ extern_methods!( #[method(setOutputFormat:)] pub unsafe fn setOutputFormat(&self, outputFormat: NSPropertyListFormat); - #[method_id(encodedData)] + #[method_id(@__retain_semantics Other encodedData)] pub unsafe fn encodedData(&self) -> Id; #[method(finishEncoding)] @@ -126,71 +126,71 @@ extern_class!( extern_methods!( unsafe impl NSKeyedUnarchiver { - #[method_id(initForReadingFromData:error:)] + #[method_id(@__retain_semantics Init initForReadingFromData:error:)] pub unsafe fn initForReadingFromData_error( this: Option>, data: &NSData, ) -> Result, Id>; - #[method_id(unarchivedObjectOfClass:fromData:error:)] + #[method_id(@__retain_semantics Other unarchivedObjectOfClass:fromData:error:)] pub unsafe fn unarchivedObjectOfClass_fromData_error( cls: &Class, data: &NSData, ) -> Result, Id>; - #[method_id(unarchivedArrayOfObjectsOfClass:fromData:error:)] + #[method_id(@__retain_semantics Other unarchivedArrayOfObjectsOfClass:fromData:error:)] pub unsafe fn unarchivedArrayOfObjectsOfClass_fromData_error( cls: &Class, data: &NSData, ) -> Result, Id>; - #[method_id(unarchivedDictionaryWithKeysOfClass:objectsOfClass:fromData:error:)] + #[method_id(@__retain_semantics Other unarchivedDictionaryWithKeysOfClass:objectsOfClass:fromData:error:)] pub unsafe fn unarchivedDictionaryWithKeysOfClass_objectsOfClass_fromData_error( keyCls: &Class, valueCls: &Class, data: &NSData, ) -> Result, Id>; - #[method_id(unarchivedObjectOfClasses:fromData:error:)] + #[method_id(@__retain_semantics Other unarchivedObjectOfClasses:fromData:error:)] pub unsafe fn unarchivedObjectOfClasses_fromData_error( classes: &NSSet, data: &NSData, ) -> Result, Id>; - #[method_id(unarchivedArrayOfObjectsOfClasses:fromData:error:)] + #[method_id(@__retain_semantics Other unarchivedArrayOfObjectsOfClasses:fromData:error:)] pub unsafe fn unarchivedArrayOfObjectsOfClasses_fromData_error( classes: &NSSet, data: &NSData, ) -> Result, Id>; - #[method_id(unarchivedDictionaryWithKeysOfClasses:objectsOfClasses:fromData:error:)] + #[method_id(@__retain_semantics Other unarchivedDictionaryWithKeysOfClasses:objectsOfClasses:fromData:error:)] pub unsafe fn unarchivedDictionaryWithKeysOfClasses_objectsOfClasses_fromData_error( keyClasses: &NSSet, valueClasses: &NSSet, data: &NSData, ) -> Result, Id>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initForReadingWithData:)] + #[method_id(@__retain_semantics Init initForReadingWithData:)] pub unsafe fn initForReadingWithData( this: Option>, data: &NSData, ) -> Id; - #[method_id(unarchiveObjectWithData:)] + #[method_id(@__retain_semantics Other unarchiveObjectWithData:)] pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option>; - #[method_id(unarchiveTopLevelObjectWithData:error:)] + #[method_id(@__retain_semantics Other unarchiveTopLevelObjectWithData:error:)] pub unsafe fn unarchiveTopLevelObjectWithData_error( data: &NSData, ) -> Result, Id>; - #[method_id(unarchiveObjectWithFile:)] + #[method_id(@__retain_semantics Other unarchiveObjectWithFile:)] pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option>; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -202,7 +202,7 @@ extern_methods!( #[method(containsValueForKey:)] pub unsafe fn containsValueForKey(&self, key: &NSString) -> bool; - #[method_id(decodeObjectForKey:)] + #[method_id(@__retain_semantics Other decodeObjectForKey:)] pub unsafe fn decodeObjectForKey(&self, key: &NSString) -> Option>; #[method(decodeBoolForKey:)] @@ -257,13 +257,13 @@ extern_methods!( #[method(classForKeyedArchiver)] pub unsafe fn classForKeyedArchiver(&self) -> Option<&'static Class>; - #[method_id(replacementObjectForKeyedArchiver:)] + #[method_id(@__retain_semantics Other replacementObjectForKeyedArchiver:)] pub unsafe fn replacementObjectForKeyedArchiver( &self, archiver: &NSKeyedArchiver, ) -> Option>; - #[method_id(classFallbacksForKeyedArchiver)] + #[method_id(@__retain_semantics Other classFallbacksForKeyedArchiver)] pub unsafe fn classFallbacksForKeyedArchiver() -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index 9d5c3cac3..181b7d166 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -24,7 +24,7 @@ extern_class!( extern_methods!( unsafe impl NSLengthFormatter { - #[method_id(numberFormatter)] + #[method_id(@__retain_semantics Other numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; #[method(setNumberFormatter:)] @@ -42,24 +42,24 @@ extern_methods!( #[method(setForPersonHeightUse:)] pub unsafe fn setForPersonHeightUse(&self, forPersonHeightUse: bool); - #[method_id(stringFromValue:unit:)] + #[method_id(@__retain_semantics Other stringFromValue:unit:)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSLengthFormatterUnit, ) -> Id; - #[method_id(stringFromMeters:)] + #[method_id(@__retain_semantics Other stringFromMeters:)] pub unsafe fn stringFromMeters(&self, numberInMeters: c_double) -> Id; - #[method_id(unitStringFromValue:unit:)] + #[method_id(@__retain_semantics Other unitStringFromValue:unit:)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSLengthFormatterUnit, ) -> Id; - #[method_id(unitStringFromMeters:usedUnit:)] + #[method_id(@__retain_semantics Other unitStringFromMeters:usedUnit:)] pub unsafe fn unitStringFromMeters_usedUnit( &self, numberInMeters: c_double, diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 313cadb0a..4919be780 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -183,29 +183,29 @@ extern_class!( extern_methods!( unsafe impl NSLinguisticTagger { - #[method_id(initWithTagSchemes:options:)] + #[method_id(@__retain_semantics Init initWithTagSchemes:options:)] pub unsafe fn initWithTagSchemes_options( this: Option>, tagSchemes: &NSArray, opts: NSUInteger, ) -> Id; - #[method_id(tagSchemes)] + #[method_id(@__retain_semantics Other tagSchemes)] pub unsafe fn tagSchemes(&self) -> Id, Shared>; - #[method_id(string)] + #[method_id(@__retain_semantics Other string)] pub unsafe fn string(&self) -> Option>; #[method(setString:)] pub unsafe fn setString(&self, string: Option<&NSString>); - #[method_id(availableTagSchemesForUnit:language:)] + #[method_id(@__retain_semantics Other availableTagSchemesForUnit:language:)] pub unsafe fn availableTagSchemesForUnit_language( unit: NSLinguisticTaggerUnit, language: &NSString, ) -> Id, Shared>; - #[method_id(availableTagSchemesForLanguage:)] + #[method_id(@__retain_semantics Other availableTagSchemesForLanguage:)] pub unsafe fn availableTagSchemesForLanguage( language: &NSString, ) -> Id, Shared>; @@ -217,7 +217,7 @@ extern_methods!( range: NSRange, ); - #[method_id(orthographyAtIndex:effectiveRange:)] + #[method_id(@__retain_semantics Other orthographyAtIndex:effectiveRange:)] pub unsafe fn orthographyAtIndex_effectiveRange( &self, charIndex: NSUInteger, @@ -251,7 +251,7 @@ extern_methods!( block: TodoBlock, ); - #[method_id(tagAtIndex:unit:scheme:tokenRange:)] + #[method_id(@__retain_semantics Other tagAtIndex:unit:scheme:tokenRange:)] pub unsafe fn tagAtIndex_unit_scheme_tokenRange( &self, charIndex: NSUInteger, @@ -260,7 +260,7 @@ extern_methods!( tokenRange: NSRangePointer, ) -> Option>; - #[method_id(tagsInRange:unit:scheme:options:tokenRanges:)] + #[method_id(@__retain_semantics Other tagsInRange:unit:scheme:options:tokenRanges:)] pub unsafe fn tagsInRange_unit_scheme_options_tokenRanges( &self, range: NSRange, @@ -279,7 +279,7 @@ extern_methods!( block: TodoBlock, ); - #[method_id(tagAtIndex:scheme:tokenRange:sentenceRange:)] + #[method_id(@__retain_semantics Other tagAtIndex:scheme:tokenRange:sentenceRange:)] pub unsafe fn tagAtIndex_scheme_tokenRange_sentenceRange( &self, charIndex: NSUInteger, @@ -288,7 +288,7 @@ extern_methods!( sentenceRange: NSRangePointer, ) -> Option>; - #[method_id(tagsInRange:scheme:options:tokenRanges:)] + #[method_id(@__retain_semantics Other tagsInRange:scheme:options:tokenRanges:)] pub unsafe fn tagsInRange_scheme_options_tokenRanges( &self, range: NSRange, @@ -297,13 +297,13 @@ extern_methods!( tokenRanges: Option<&mut Option, Shared>>>, ) -> Id, Shared>; - #[method_id(dominantLanguage)] + #[method_id(@__retain_semantics Other dominantLanguage)] pub unsafe fn dominantLanguage(&self) -> Option>; - #[method_id(dominantLanguageForString:)] + #[method_id(@__retain_semantics Other dominantLanguageForString:)] pub unsafe fn dominantLanguageForString(string: &NSString) -> Option>; - #[method_id(tagForString:atIndex:unit:scheme:orthography:tokenRange:)] + #[method_id(@__retain_semantics Other tagForString:atIndex:unit:scheme:orthography:tokenRange:)] pub unsafe fn tagForString_atIndex_unit_scheme_orthography_tokenRange( string: &NSString, charIndex: NSUInteger, @@ -313,7 +313,7 @@ extern_methods!( tokenRange: NSRangePointer, ) -> Option>; - #[method_id(tagsForString:range:unit:scheme:options:orthography:tokenRanges:)] + #[method_id(@__retain_semantics Other tagsForString:range:unit:scheme:options:orthography:tokenRanges:)] pub unsafe fn tagsForString_range_unit_scheme_options_orthography_tokenRanges( string: &NSString, range: NSRange, @@ -335,7 +335,7 @@ extern_methods!( block: TodoBlock, ); - #[method_id(possibleTagsAtIndex:scheme:tokenRange:sentenceRange:scores:)] + #[method_id(@__retain_semantics Other possibleTagsAtIndex:scheme:tokenRange:sentenceRange:scores:)] pub unsafe fn possibleTagsAtIndex_scheme_tokenRange_sentenceRange_scores( &self, charIndex: NSUInteger, @@ -350,7 +350,7 @@ extern_methods!( extern_methods!( /// NSLinguisticAnalysis unsafe impl NSString { - #[method_id(linguisticTagsInRange:scheme:options:orthography:tokenRanges:)] + #[method_id(@__retain_semantics Other linguisticTagsInRange:scheme:options:orthography:tokenRanges:)] pub unsafe fn linguisticTagsInRange_scheme_options_orthography_tokenRanges( &self, range: NSRange, diff --git a/crates/icrate/src/generated/Foundation/NSListFormatter.rs b/crates/icrate/src/generated/Foundation/NSListFormatter.rs index 243f05060..ab79eaa36 100644 --- a/crates/icrate/src/generated/Foundation/NSListFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSListFormatter.rs @@ -14,27 +14,27 @@ extern_class!( extern_methods!( unsafe impl NSListFormatter { - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Id; #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); - #[method_id(itemFormatter)] + #[method_id(@__retain_semantics Other itemFormatter)] pub unsafe fn itemFormatter(&self) -> Option>; #[method(setItemFormatter:)] pub unsafe fn setItemFormatter(&self, itemFormatter: Option<&NSFormatter>); - #[method_id(localizedStringByJoiningStrings:)] + #[method_id(@__retain_semantics Other localizedStringByJoiningStrings:)] pub unsafe fn localizedStringByJoiningStrings( strings: &NSArray, ) -> Id; - #[method_id(stringFromItems:)] + #[method_id(@__retain_semantics Other stringFromItems:)] pub unsafe fn stringFromItems(&self, items: &NSArray) -> Option>; - #[method_id(stringForObjectValue:)] + #[method_id(@__retain_semantics Other stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 46f3c5658..bc50875d2 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -16,23 +16,23 @@ extern_class!( extern_methods!( unsafe impl NSLocale { - #[method_id(objectForKey:)] + #[method_id(@__retain_semantics Other objectForKey:)] pub unsafe fn objectForKey(&self, key: &NSLocaleKey) -> Option>; - #[method_id(displayNameForKey:value:)] + #[method_id(@__retain_semantics Other displayNameForKey:value:)] pub unsafe fn displayNameForKey_value( &self, key: &NSLocaleKey, value: &Object, ) -> Option>; - #[method_id(initWithLocaleIdentifier:)] + #[method_id(@__retain_semantics Init initWithLocaleIdentifier:)] pub unsafe fn initWithLocaleIdentifier( this: Option>, string: &NSString, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -43,67 +43,67 @@ extern_methods!( extern_methods!( /// NSExtendedLocale unsafe impl NSLocale { - #[method_id(localeIdentifier)] + #[method_id(@__retain_semantics Other localeIdentifier)] pub unsafe fn localeIdentifier(&self) -> Id; - #[method_id(localizedStringForLocaleIdentifier:)] + #[method_id(@__retain_semantics Other localizedStringForLocaleIdentifier:)] pub unsafe fn localizedStringForLocaleIdentifier( &self, localeIdentifier: &NSString, ) -> Id; - #[method_id(languageCode)] + #[method_id(@__retain_semantics Other languageCode)] pub unsafe fn languageCode(&self) -> Id; - #[method_id(localizedStringForLanguageCode:)] + #[method_id(@__retain_semantics Other localizedStringForLanguageCode:)] pub unsafe fn localizedStringForLanguageCode( &self, languageCode: &NSString, ) -> Option>; - #[method_id(countryCode)] + #[method_id(@__retain_semantics Other countryCode)] pub unsafe fn countryCode(&self) -> Option>; - #[method_id(localizedStringForCountryCode:)] + #[method_id(@__retain_semantics Other localizedStringForCountryCode:)] pub unsafe fn localizedStringForCountryCode( &self, countryCode: &NSString, ) -> Option>; - #[method_id(scriptCode)] + #[method_id(@__retain_semantics Other scriptCode)] pub unsafe fn scriptCode(&self) -> Option>; - #[method_id(localizedStringForScriptCode:)] + #[method_id(@__retain_semantics Other localizedStringForScriptCode:)] pub unsafe fn localizedStringForScriptCode( &self, scriptCode: &NSString, ) -> Option>; - #[method_id(variantCode)] + #[method_id(@__retain_semantics Other variantCode)] pub unsafe fn variantCode(&self) -> Option>; - #[method_id(localizedStringForVariantCode:)] + #[method_id(@__retain_semantics Other localizedStringForVariantCode:)] pub unsafe fn localizedStringForVariantCode( &self, variantCode: &NSString, ) -> Option>; - #[method_id(exemplarCharacterSet)] + #[method_id(@__retain_semantics Other exemplarCharacterSet)] pub unsafe fn exemplarCharacterSet(&self) -> Id; - #[method_id(calendarIdentifier)] + #[method_id(@__retain_semantics Other calendarIdentifier)] pub unsafe fn calendarIdentifier(&self) -> Id; - #[method_id(localizedStringForCalendarIdentifier:)] + #[method_id(@__retain_semantics Other localizedStringForCalendarIdentifier:)] pub unsafe fn localizedStringForCalendarIdentifier( &self, calendarIdentifier: &NSString, ) -> Option>; - #[method_id(collationIdentifier)] + #[method_id(@__retain_semantics Other collationIdentifier)] pub unsafe fn collationIdentifier(&self) -> Option>; - #[method_id(localizedStringForCollationIdentifier:)] + #[method_id(@__retain_semantics Other localizedStringForCollationIdentifier:)] pub unsafe fn localizedStringForCollationIdentifier( &self, collationIdentifier: &NSString, @@ -112,43 +112,43 @@ extern_methods!( #[method(usesMetricSystem)] pub unsafe fn usesMetricSystem(&self) -> bool; - #[method_id(decimalSeparator)] + #[method_id(@__retain_semantics Other decimalSeparator)] pub unsafe fn decimalSeparator(&self) -> Id; - #[method_id(groupingSeparator)] + #[method_id(@__retain_semantics Other groupingSeparator)] pub unsafe fn groupingSeparator(&self) -> Id; - #[method_id(currencySymbol)] + #[method_id(@__retain_semantics Other currencySymbol)] pub unsafe fn currencySymbol(&self) -> Id; - #[method_id(currencyCode)] + #[method_id(@__retain_semantics Other currencyCode)] pub unsafe fn currencyCode(&self) -> Option>; - #[method_id(localizedStringForCurrencyCode:)] + #[method_id(@__retain_semantics Other localizedStringForCurrencyCode:)] pub unsafe fn localizedStringForCurrencyCode( &self, currencyCode: &NSString, ) -> Option>; - #[method_id(collatorIdentifier)] + #[method_id(@__retain_semantics Other collatorIdentifier)] pub unsafe fn collatorIdentifier(&self) -> Id; - #[method_id(localizedStringForCollatorIdentifier:)] + #[method_id(@__retain_semantics Other localizedStringForCollatorIdentifier:)] pub unsafe fn localizedStringForCollatorIdentifier( &self, collatorIdentifier: &NSString, ) -> Option>; - #[method_id(quotationBeginDelimiter)] + #[method_id(@__retain_semantics Other quotationBeginDelimiter)] pub unsafe fn quotationBeginDelimiter(&self) -> Id; - #[method_id(quotationEndDelimiter)] + #[method_id(@__retain_semantics Other quotationEndDelimiter)] pub unsafe fn quotationEndDelimiter(&self) -> Id; - #[method_id(alternateQuotationBeginDelimiter)] + #[method_id(@__retain_semantics Other alternateQuotationBeginDelimiter)] pub unsafe fn alternateQuotationBeginDelimiter(&self) -> Id; - #[method_id(alternateQuotationEndDelimiter)] + #[method_id(@__retain_semantics Other alternateQuotationEndDelimiter)] pub unsafe fn alternateQuotationEndDelimiter(&self) -> Id; } ); @@ -156,19 +156,19 @@ extern_methods!( extern_methods!( /// NSLocaleCreation unsafe impl NSLocale { - #[method_id(autoupdatingCurrentLocale)] + #[method_id(@__retain_semantics Other autoupdatingCurrentLocale)] pub unsafe fn autoupdatingCurrentLocale() -> Id; - #[method_id(currentLocale)] + #[method_id(@__retain_semantics Other currentLocale)] pub unsafe fn currentLocale() -> Id; - #[method_id(systemLocale)] + #[method_id(@__retain_semantics Other systemLocale)] pub unsafe fn systemLocale() -> Id; - #[method_id(localeWithLocaleIdentifier:)] + #[method_id(@__retain_semantics Other localeWithLocaleIdentifier:)] pub unsafe fn localeWithLocaleIdentifier(ident: &NSString) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; } ); @@ -188,45 +188,45 @@ pub const NSLocaleLanguageDirectionBottomToTop: NSLocaleLanguageDirection = extern_methods!( /// NSLocaleGeneralInfo unsafe impl NSLocale { - #[method_id(availableLocaleIdentifiers)] + #[method_id(@__retain_semantics Other availableLocaleIdentifiers)] pub unsafe fn availableLocaleIdentifiers() -> Id, Shared>; - #[method_id(ISOLanguageCodes)] + #[method_id(@__retain_semantics Other ISOLanguageCodes)] pub unsafe fn ISOLanguageCodes() -> Id, Shared>; - #[method_id(ISOCountryCodes)] + #[method_id(@__retain_semantics Other ISOCountryCodes)] pub unsafe fn ISOCountryCodes() -> Id, Shared>; - #[method_id(ISOCurrencyCodes)] + #[method_id(@__retain_semantics Other ISOCurrencyCodes)] pub unsafe fn ISOCurrencyCodes() -> Id, Shared>; - #[method_id(commonISOCurrencyCodes)] + #[method_id(@__retain_semantics Other commonISOCurrencyCodes)] pub unsafe fn commonISOCurrencyCodes() -> Id, Shared>; - #[method_id(preferredLanguages)] + #[method_id(@__retain_semantics Other preferredLanguages)] pub unsafe fn preferredLanguages() -> Id, Shared>; - #[method_id(componentsFromLocaleIdentifier:)] + #[method_id(@__retain_semantics Other componentsFromLocaleIdentifier:)] pub unsafe fn componentsFromLocaleIdentifier( string: &NSString, ) -> Id, Shared>; - #[method_id(localeIdentifierFromComponents:)] + #[method_id(@__retain_semantics Other localeIdentifierFromComponents:)] pub unsafe fn localeIdentifierFromComponents( dict: &NSDictionary, ) -> Id; - #[method_id(canonicalLocaleIdentifierFromString:)] + #[method_id(@__retain_semantics Other canonicalLocaleIdentifierFromString:)] pub unsafe fn canonicalLocaleIdentifierFromString( string: &NSString, ) -> Id; - #[method_id(canonicalLanguageIdentifierFromString:)] + #[method_id(@__retain_semantics Other canonicalLanguageIdentifierFromString:)] pub unsafe fn canonicalLanguageIdentifierFromString( string: &NSString, ) -> Id; - #[method_id(localeIdentifierFromWindowsLocaleCode:)] + #[method_id(@__retain_semantics Other localeIdentifierFromWindowsLocaleCode:)] pub unsafe fn localeIdentifierFromWindowsLocaleCode( lcid: u32, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index d8ceda918..8d1d74974 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -22,7 +22,7 @@ extern_methods!( #[method(lockBeforeDate:)] pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[method(setName:)] @@ -41,7 +41,7 @@ extern_class!( extern_methods!( unsafe impl NSConditionLock { - #[method_id(initWithCondition:)] + #[method_id(@__retain_semantics Init initWithCondition:)] pub unsafe fn initWithCondition( this: Option>, condition: NSInteger, @@ -72,7 +72,7 @@ extern_methods!( limit: &NSDate, ) -> bool; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[method(setName:)] @@ -97,7 +97,7 @@ extern_methods!( #[method(lockBeforeDate:)] pub unsafe fn lockBeforeDate(&self, limit: &NSDate) -> bool; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[method(setName:)] @@ -128,7 +128,7 @@ extern_methods!( #[method(broadcast)] pub unsafe fn broadcast(&self); - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[method(setName:)] diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 161887f87..5181fa8ee 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -31,7 +31,7 @@ __inner_extern_class!( extern_methods!( unsafe impl NSMapTable { - #[method_id(initWithKeyOptions:valueOptions:capacity:)] + #[method_id(@__retain_semantics Init initWithKeyOptions:valueOptions:capacity:)] pub unsafe fn initWithKeyOptions_valueOptions_capacity( this: Option>, keyOptions: NSPointerFunctionsOptions, @@ -39,7 +39,7 @@ extern_methods!( initialCapacity: NSUInteger, ) -> Id; - #[method_id(initWithKeyPointerFunctions:valuePointerFunctions:capacity:)] + #[method_id(@__retain_semantics Init initWithKeyPointerFunctions:valuePointerFunctions:capacity:)] pub unsafe fn initWithKeyPointerFunctions_valuePointerFunctions_capacity( this: Option>, keyFunctions: &NSPointerFunctions, @@ -47,43 +47,43 @@ extern_methods!( initialCapacity: NSUInteger, ) -> Id; - #[method_id(mapTableWithKeyOptions:valueOptions:)] + #[method_id(@__retain_semantics Other mapTableWithKeyOptions:valueOptions:)] pub unsafe fn mapTableWithKeyOptions_valueOptions( keyOptions: NSPointerFunctionsOptions, valueOptions: NSPointerFunctionsOptions, ) -> Id, Shared>; - #[method_id(mapTableWithStrongToStrongObjects)] + #[method_id(@__retain_semantics Other mapTableWithStrongToStrongObjects)] pub unsafe fn mapTableWithStrongToStrongObjects() -> Id; - #[method_id(mapTableWithWeakToStrongObjects)] + #[method_id(@__retain_semantics Other mapTableWithWeakToStrongObjects)] pub unsafe fn mapTableWithWeakToStrongObjects() -> Id; - #[method_id(mapTableWithStrongToWeakObjects)] + #[method_id(@__retain_semantics Other mapTableWithStrongToWeakObjects)] pub unsafe fn mapTableWithStrongToWeakObjects() -> Id; - #[method_id(mapTableWithWeakToWeakObjects)] + #[method_id(@__retain_semantics Other mapTableWithWeakToWeakObjects)] pub unsafe fn mapTableWithWeakToWeakObjects() -> Id; - #[method_id(strongToStrongObjectsMapTable)] + #[method_id(@__retain_semantics Other strongToStrongObjectsMapTable)] pub unsafe fn strongToStrongObjectsMapTable() -> Id, Shared>; - #[method_id(weakToStrongObjectsMapTable)] + #[method_id(@__retain_semantics Other weakToStrongObjectsMapTable)] pub unsafe fn weakToStrongObjectsMapTable() -> Id, Shared>; - #[method_id(strongToWeakObjectsMapTable)] + #[method_id(@__retain_semantics Other strongToWeakObjectsMapTable)] pub unsafe fn strongToWeakObjectsMapTable() -> Id, Shared>; - #[method_id(weakToWeakObjectsMapTable)] + #[method_id(@__retain_semantics Other weakToWeakObjectsMapTable)] pub unsafe fn weakToWeakObjectsMapTable() -> Id, Shared>; - #[method_id(keyPointerFunctions)] + #[method_id(@__retain_semantics Other keyPointerFunctions)] pub unsafe fn keyPointerFunctions(&self) -> Id; - #[method_id(valuePointerFunctions)] + #[method_id(@__retain_semantics Other valuePointerFunctions)] pub unsafe fn valuePointerFunctions(&self) -> Id; - #[method_id(objectForKey:)] + #[method_id(@__retain_semantics Other objectForKey:)] pub unsafe fn objectForKey(&self, aKey: Option<&KeyType>) -> Option>; @@ -100,16 +100,16 @@ extern_methods!( #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - #[method_id(keyEnumerator)] + #[method_id(@__retain_semantics Other keyEnumerator)] pub unsafe fn keyEnumerator(&self) -> Id, Shared>; - #[method_id(objectEnumerator)] + #[method_id(@__retain_semantics Other objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Option, Shared>>; #[method(removeAllObjects)] pub unsafe fn removeAllObjects(&self); - #[method_id(dictionaryRepresentation)] + #[method_id(@__retain_semantics Other dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation( &self, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 3d9c924d4..81e9df001 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -21,7 +21,7 @@ extern_class!( extern_methods!( unsafe impl NSMassFormatter { - #[method_id(numberFormatter)] + #[method_id(@__retain_semantics Other numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; #[method(setNumberFormatter:)] @@ -39,27 +39,27 @@ extern_methods!( #[method(setForPersonMassUse:)] pub unsafe fn setForPersonMassUse(&self, forPersonMassUse: bool); - #[method_id(stringFromValue:unit:)] + #[method_id(@__retain_semantics Other stringFromValue:unit:)] pub unsafe fn stringFromValue_unit( &self, value: c_double, unit: NSMassFormatterUnit, ) -> Id; - #[method_id(stringFromKilograms:)] + #[method_id(@__retain_semantics Other stringFromKilograms:)] pub unsafe fn stringFromKilograms( &self, numberInKilograms: c_double, ) -> Id; - #[method_id(unitStringFromValue:unit:)] + #[method_id(@__retain_semantics Other unitStringFromValue:unit:)] pub unsafe fn unitStringFromValue_unit( &self, value: c_double, unit: NSMassFormatterUnit, ) -> Id; - #[method_id(unitStringFromKilograms:usedUnit:)] + #[method_id(@__retain_semantics Other unitStringFromKilograms:usedUnit:)] pub unsafe fn unitStringFromKilograms_usedUnit( &self, numberInKilograms: c_double, diff --git a/crates/icrate/src/generated/Foundation/NSMeasurement.rs b/crates/icrate/src/generated/Foundation/NSMeasurement.rs index 20db01e58..d7e38bf16 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurement.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurement.rs @@ -16,16 +16,16 @@ __inner_extern_class!( extern_methods!( unsafe impl NSMeasurement { - #[method_id(unit)] + #[method_id(@__retain_semantics Other unit)] pub unsafe fn unit(&self) -> Id; #[method(doubleValue)] pub unsafe fn doubleValue(&self) -> c_double; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithDoubleValue:unit:)] + #[method_id(@__retain_semantics Init initWithDoubleValue:unit:)] pub unsafe fn initWithDoubleValue_unit( this: Option>, doubleValue: c_double, @@ -35,19 +35,19 @@ extern_methods!( #[method(canBeConvertedToUnit:)] pub unsafe fn canBeConvertedToUnit(&self, unit: &NSUnit) -> bool; - #[method_id(measurementByConvertingToUnit:)] + #[method_id(@__retain_semantics Other measurementByConvertingToUnit:)] pub unsafe fn measurementByConvertingToUnit( &self, unit: &NSUnit, ) -> Id; - #[method_id(measurementByAddingMeasurement:)] + #[method_id(@__retain_semantics Other measurementByAddingMeasurement:)] pub unsafe fn measurementByAddingMeasurement( &self, measurement: &NSMeasurement, ) -> Id, Shared>; - #[method_id(measurementBySubtractingMeasurement:)] + #[method_id(@__retain_semantics Other measurementBySubtractingMeasurement:)] pub unsafe fn measurementBySubtractingMeasurement( &self, measurement: &NSMeasurement, diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 330bc363f..0f66931c5 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -32,25 +32,25 @@ extern_methods!( #[method(setUnitStyle:)] pub unsafe fn setUnitStyle(&self, unitStyle: NSFormattingUnitStyle); - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Id; #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); - #[method_id(numberFormatter)] + #[method_id(@__retain_semantics Other numberFormatter)] pub unsafe fn numberFormatter(&self) -> Id; #[method(setNumberFormatter:)] pub unsafe fn setNumberFormatter(&self, numberFormatter: Option<&NSNumberFormatter>); - #[method_id(stringFromMeasurement:)] + #[method_id(@__retain_semantics Other stringFromMeasurement:)] pub unsafe fn stringFromMeasurement( &self, measurement: &NSMeasurement, ) -> Id; - #[method_id(stringFromUnit:)] + #[method_id(@__retain_semantics Other stringFromUnit:)] pub unsafe fn stringFromUnit(&self, unit: &NSUnit) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 48dc099dc..e5835806c 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -14,31 +14,31 @@ extern_class!( extern_methods!( unsafe impl NSMetadataQuery { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSMetadataQueryDelegate>); - #[method_id(predicate)] + #[method_id(@__retain_semantics Other predicate)] pub unsafe fn predicate(&self) -> Option>; #[method(setPredicate:)] pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>); - #[method_id(sortDescriptors)] + #[method_id(@__retain_semantics Other sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id, Shared>; #[method(setSortDescriptors:)] pub unsafe fn setSortDescriptors(&self, sortDescriptors: &NSArray); - #[method_id(valueListAttributes)] + #[method_id(@__retain_semantics Other valueListAttributes)] pub unsafe fn valueListAttributes(&self) -> Id, Shared>; #[method(setValueListAttributes:)] pub unsafe fn setValueListAttributes(&self, valueListAttributes: &NSArray); - #[method_id(groupingAttributes)] + #[method_id(@__retain_semantics Other groupingAttributes)] pub unsafe fn groupingAttributes(&self) -> Option, Shared>>; #[method(setGroupingAttributes:)] @@ -53,19 +53,19 @@ extern_methods!( notificationBatchingInterval: NSTimeInterval, ); - #[method_id(searchScopes)] + #[method_id(@__retain_semantics Other searchScopes)] pub unsafe fn searchScopes(&self) -> Id; #[method(setSearchScopes:)] pub unsafe fn setSearchScopes(&self, searchScopes: &NSArray); - #[method_id(searchItems)] + #[method_id(@__retain_semantics Other searchItems)] pub unsafe fn searchItems(&self) -> Option>; #[method(setSearchItems:)] pub unsafe fn setSearchItems(&self, searchItems: Option<&NSArray>); - #[method_id(operationQueue)] + #[method_id(@__retain_semantics Other operationQueue)] pub unsafe fn operationQueue(&self) -> Option>; #[method(setOperationQueue:)] @@ -95,7 +95,7 @@ extern_methods!( #[method(resultCount)] pub unsafe fn resultCount(&self) -> NSUInteger; - #[method_id(resultAtIndex:)] + #[method_id(@__retain_semantics Other resultAtIndex:)] pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; #[method(enumerateResultsUsingBlock:)] @@ -108,21 +108,21 @@ extern_methods!( block: TodoBlock, ); - #[method_id(results)] + #[method_id(@__retain_semantics Other results)] pub unsafe fn results(&self) -> Id; #[method(indexOfResult:)] pub unsafe fn indexOfResult(&self, result: &Object) -> NSUInteger; - #[method_id(valueLists)] + #[method_id(@__retain_semantics Other valueLists)] pub unsafe fn valueLists( &self, ) -> Id>, Shared>; - #[method_id(groupedResults)] + #[method_id(@__retain_semantics Other groupedResults)] pub unsafe fn groupedResults(&self) -> Id, Shared>; - #[method_id(valueOfAttribute:forResultAtIndex:)] + #[method_id(@__retain_semantics Other valueOfAttribute:forResultAtIndex:)] pub unsafe fn valueOfAttribute_forResultAtIndex( &self, attrName: &NSString, @@ -208,22 +208,22 @@ extern_class!( extern_methods!( unsafe impl NSMetadataItem { - #[method_id(initWithURL:)] + #[method_id(@__retain_semantics Init initWithURL:)] pub unsafe fn initWithURL( this: Option>, url: &NSURL, ) -> Option>; - #[method_id(valueForAttribute:)] + #[method_id(@__retain_semantics Other valueForAttribute:)] pub unsafe fn valueForAttribute(&self, key: &NSString) -> Option>; - #[method_id(valuesForAttributes:)] + #[method_id(@__retain_semantics Other valuesForAttributes:)] pub unsafe fn valuesForAttributes( &self, keys: &NSArray, ) -> Option, Shared>>; - #[method_id(attributes)] + #[method_id(@__retain_semantics Other attributes)] pub unsafe fn attributes(&self) -> Id, Shared>; } ); @@ -239,10 +239,10 @@ extern_class!( extern_methods!( unsafe impl NSMetadataQueryAttributeValueTuple { - #[method_id(attribute)] + #[method_id(@__retain_semantics Other attribute)] pub unsafe fn attribute(&self) -> Id; - #[method_id(value)] + #[method_id(@__retain_semantics Other value)] pub unsafe fn value(&self) -> Option>; #[method(count)] @@ -261,22 +261,22 @@ extern_class!( extern_methods!( unsafe impl NSMetadataQueryResultGroup { - #[method_id(attribute)] + #[method_id(@__retain_semantics Other attribute)] pub unsafe fn attribute(&self) -> Id; - #[method_id(value)] + #[method_id(@__retain_semantics Other value)] pub unsafe fn value(&self) -> Id; - #[method_id(subgroups)] + #[method_id(@__retain_semantics Other subgroups)] pub unsafe fn subgroups(&self) -> Option, Shared>>; #[method(resultCount)] pub unsafe fn resultCount(&self) -> NSUInteger; - #[method_id(resultAtIndex:)] + #[method_id(@__retain_semantics Other resultAtIndex:)] pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; - #[method_id(results)] + #[method_id(@__retain_semantics Other results)] pub unsafe fn results(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs index 5c9a38d05..921ab735c 100644 --- a/crates/icrate/src/generated/Foundation/NSMethodSignature.rs +++ b/crates/icrate/src/generated/Foundation/NSMethodSignature.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSMethodSignature { - #[method_id(signatureWithObjCTypes:)] + #[method_id(@__retain_semantics Other signatureWithObjCTypes:)] pub unsafe fn signatureWithObjCTypes( types: NonNull, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index 769bef83a..e1ec535fc 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -69,7 +69,7 @@ extern_methods!( extern_methods!( /// NSCustomPronouns unsafe impl NSMorphology { - #[method_id(customPronounForLanguage:)] + #[method_id(@__retain_semantics Other customPronounForLanguage:)] pub unsafe fn customPronounForLanguage( &self, language: &NSString, @@ -98,35 +98,35 @@ extern_methods!( #[method(isSupportedForLanguage:)] pub unsafe fn isSupportedForLanguage(language: &NSString) -> bool; - #[method_id(requiredKeysForLanguage:)] + #[method_id(@__retain_semantics Other requiredKeysForLanguage:)] pub unsafe fn requiredKeysForLanguage(language: &NSString) -> Id, Shared>; - #[method_id(subjectForm)] + #[method_id(@__retain_semantics Other subjectForm)] pub unsafe fn subjectForm(&self) -> Option>; #[method(setSubjectForm:)] pub unsafe fn setSubjectForm(&self, subjectForm: Option<&NSString>); - #[method_id(objectForm)] + #[method_id(@__retain_semantics Other objectForm)] pub unsafe fn objectForm(&self) -> Option>; #[method(setObjectForm:)] pub unsafe fn setObjectForm(&self, objectForm: Option<&NSString>); - #[method_id(possessiveForm)] + #[method_id(@__retain_semantics Other possessiveForm)] pub unsafe fn possessiveForm(&self) -> Option>; #[method(setPossessiveForm:)] pub unsafe fn setPossessiveForm(&self, possessiveForm: Option<&NSString>); - #[method_id(possessiveAdjectiveForm)] + #[method_id(@__retain_semantics Other possessiveAdjectiveForm)] pub unsafe fn possessiveAdjectiveForm(&self) -> Option>; #[method(setPossessiveAdjectiveForm:)] pub unsafe fn setPossessiveAdjectiveForm(&self, possessiveAdjectiveForm: Option<&NSString>); - #[method_id(reflexiveForm)] + #[method_id(@__retain_semantics Other reflexiveForm)] pub unsafe fn reflexiveForm(&self) -> Option>; #[method(setReflexiveForm:)] @@ -140,7 +140,7 @@ extern_methods!( #[method(isUnspecified)] pub unsafe fn isUnspecified(&self) -> bool; - #[method_id(userMorphology)] + #[method_id(@__retain_semantics Other userMorphology)] pub unsafe fn userMorphology() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 57c66781c..b75593efd 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -37,7 +37,7 @@ extern_class!( extern_methods!( unsafe impl NSNetService { - #[method_id(initWithDomain:type:name:port:)] + #[method_id(@__retain_semantics Init initWithDomain:type:name:port:)] pub unsafe fn initWithDomain_type_name_port( this: Option>, domain: &NSString, @@ -46,7 +46,7 @@ extern_methods!( port: c_int, ) -> Id; - #[method_id(initWithDomain:type:name:)] + #[method_id(@__retain_semantics Init initWithDomain:type:name:)] pub unsafe fn initWithDomain_type_name( this: Option>, domain: &NSString, @@ -60,7 +60,7 @@ extern_methods!( #[method(removeFromRunLoop:forMode:)] pub unsafe fn removeFromRunLoop_forMode(&self, aRunLoop: &NSRunLoop, mode: &NSRunLoopMode); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -72,19 +72,19 @@ extern_methods!( #[method(setIncludesPeerToPeer:)] pub unsafe fn setIncludesPeerToPeer(&self, includesPeerToPeer: bool); - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; - #[method_id(type)] + #[method_id(@__retain_semantics Other type)] pub unsafe fn type_(&self) -> Id; - #[method_id(domain)] + #[method_id(@__retain_semantics Other domain)] pub unsafe fn domain(&self) -> Id; - #[method_id(hostName)] + #[method_id(@__retain_semantics Other hostName)] pub unsafe fn hostName(&self) -> Option>; - #[method_id(addresses)] + #[method_id(@__retain_semantics Other addresses)] pub unsafe fn addresses(&self) -> Option, Shared>>; #[method(port)] @@ -102,12 +102,12 @@ extern_methods!( #[method(stop)] pub unsafe fn stop(&self); - #[method_id(dictionaryFromTXTRecordData:)] + #[method_id(@__retain_semantics Other dictionaryFromTXTRecordData:)] pub unsafe fn dictionaryFromTXTRecordData( txtData: &NSData, ) -> Id, Shared>; - #[method_id(dataFromTXTRecordDictionary:)] + #[method_id(@__retain_semantics Other dataFromTXTRecordDictionary:)] pub unsafe fn dataFromTXTRecordDictionary( txtDictionary: &NSDictionary, ) -> Id; @@ -118,7 +118,7 @@ extern_methods!( #[method(setTXTRecordData:)] pub unsafe fn setTXTRecordData(&self, recordData: Option<&NSData>) -> bool; - #[method_id(TXTRecordData)] + #[method_id(@__retain_semantics Other TXTRecordData)] pub unsafe fn TXTRecordData(&self) -> Option>; #[method(startMonitoring)] @@ -140,10 +140,10 @@ extern_class!( extern_methods!( unsafe impl NSNetServiceBrowser { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index cefd4a46a..8b94588c0 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -16,16 +16,16 @@ extern_class!( extern_methods!( unsafe impl NSNotification { - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; - #[method_id(object)] + #[method_id(@__retain_semantics Other object)] pub unsafe fn object(&self) -> Option>; - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>; - #[method_id(initWithName:object:userInfo:)] + #[method_id(@__retain_semantics Init initWithName:object:userInfo:)] pub unsafe fn initWithName_object_userInfo( this: Option>, name: &NSNotificationName, @@ -33,7 +33,7 @@ extern_methods!( userInfo: Option<&NSDictionary>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -44,20 +44,20 @@ extern_methods!( extern_methods!( /// NSNotificationCreation unsafe impl NSNotification { - #[method_id(notificationWithName:object:)] + #[method_id(@__retain_semantics Other notificationWithName:object:)] pub unsafe fn notificationWithName_object( aName: &NSNotificationName, anObject: Option<&Object>, ) -> Id; - #[method_id(notificationWithName:object:userInfo:)] + #[method_id(@__retain_semantics Other notificationWithName:object:userInfo:)] pub unsafe fn notificationWithName_object_userInfo( aName: &NSNotificationName, anObject: Option<&Object>, aUserInfo: Option<&NSDictionary>, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; } ); @@ -73,7 +73,7 @@ extern_class!( extern_methods!( unsafe impl NSNotificationCenter { - #[method_id(defaultCenter)] + #[method_id(@__retain_semantics Other defaultCenter)] pub unsafe fn defaultCenter() -> Id; #[method(addObserver:selector:name:object:)] @@ -114,7 +114,7 @@ extern_methods!( anObject: Option<&Object>, ); - #[method_id(addObserverForName:object:queue:usingBlock:)] + #[method_id(@__retain_semantics Other addObserverForName:object:queue:usingBlock:)] pub unsafe fn addObserverForName_object_queue_usingBlock( &self, name: Option<&NSNotificationName>, diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index 6d9c1c51f..ffb7df690 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -24,10 +24,10 @@ extern_class!( extern_methods!( unsafe impl NSNotificationQueue { - #[method_id(defaultQueue)] + #[method_id(@__retain_semantics Other defaultQueue)] pub unsafe fn defaultQueue() -> Id; - #[method_id(initWithNotificationCenter:)] + #[method_id(@__retain_semantics Init initWithNotificationCenter:)] pub unsafe fn initWithNotificationCenter( this: Option>, notificationCenter: &NSNotificationCenter, diff --git a/crates/icrate/src/generated/Foundation/NSNull.rs b/crates/icrate/src/generated/Foundation/NSNull.rs index ba96fd314..4fe215944 100644 --- a/crates/icrate/src/generated/Foundation/NSNull.rs +++ b/crates/icrate/src/generated/Foundation/NSNull.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSNull { - #[method_id(null)] + #[method_id(@__retain_semantics Other null)] pub unsafe fn null() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 229fe7159..01673d4f1 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -72,13 +72,13 @@ extern_methods!( rangep: *mut NSRange, ) -> Result<(), Id>; - #[method_id(stringFromNumber:)] + #[method_id(@__retain_semantics Other stringFromNumber:)] pub unsafe fn stringFromNumber(&self, number: &NSNumber) -> Option>; - #[method_id(numberFromString:)] + #[method_id(@__retain_semantics Other numberFromString:)] pub unsafe fn numberFromString(&self, string: &NSString) -> Option>; - #[method_id(localizedStringFromNumber:numberStyle:)] + #[method_id(@__retain_semantics Other localizedStringFromNumber:numberStyle:)] pub unsafe fn localizedStringFromNumber_numberStyle( num: &NSNumber, nstyle: NSNumberFormatterStyle, @@ -96,7 +96,7 @@ extern_methods!( #[method(setNumberStyle:)] pub unsafe fn setNumberStyle(&self, numberStyle: NSNumberFormatterStyle); - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Id; #[method(setLocale:)] @@ -114,13 +114,13 @@ extern_methods!( #[method(setFormatterBehavior:)] pub unsafe fn setFormatterBehavior(&self, formatterBehavior: NSNumberFormatterBehavior); - #[method_id(negativeFormat)] + #[method_id(@__retain_semantics Other negativeFormat)] pub unsafe fn negativeFormat(&self) -> Id; #[method(setNegativeFormat:)] pub unsafe fn setNegativeFormat(&self, negativeFormat: Option<&NSString>); - #[method_id(textAttributesForNegativeValues)] + #[method_id(@__retain_semantics Other textAttributesForNegativeValues)] pub unsafe fn textAttributesForNegativeValues( &self, ) -> Option, Shared>>; @@ -131,13 +131,13 @@ extern_methods!( textAttributesForNegativeValues: Option<&NSDictionary>, ); - #[method_id(positiveFormat)] + #[method_id(@__retain_semantics Other positiveFormat)] pub unsafe fn positiveFormat(&self) -> Id; #[method(setPositiveFormat:)] pub unsafe fn setPositiveFormat(&self, positiveFormat: Option<&NSString>); - #[method_id(textAttributesForPositiveValues)] + #[method_id(@__retain_semantics Other textAttributesForPositiveValues)] pub unsafe fn textAttributesForPositiveValues( &self, ) -> Option, Shared>>; @@ -154,7 +154,7 @@ extern_methods!( #[method(setAllowsFloats:)] pub unsafe fn setAllowsFloats(&self, allowsFloats: bool); - #[method_id(decimalSeparator)] + #[method_id(@__retain_semantics Other decimalSeparator)] pub unsafe fn decimalSeparator(&self) -> Id; #[method(setDecimalSeparator:)] @@ -166,7 +166,7 @@ extern_methods!( #[method(setAlwaysShowsDecimalSeparator:)] pub unsafe fn setAlwaysShowsDecimalSeparator(&self, alwaysShowsDecimalSeparator: bool); - #[method_id(currencyDecimalSeparator)] + #[method_id(@__retain_semantics Other currencyDecimalSeparator)] pub unsafe fn currencyDecimalSeparator(&self) -> Id; #[method(setCurrencyDecimalSeparator:)] @@ -181,19 +181,19 @@ extern_methods!( #[method(setUsesGroupingSeparator:)] pub unsafe fn setUsesGroupingSeparator(&self, usesGroupingSeparator: bool); - #[method_id(groupingSeparator)] + #[method_id(@__retain_semantics Other groupingSeparator)] pub unsafe fn groupingSeparator(&self) -> Id; #[method(setGroupingSeparator:)] pub unsafe fn setGroupingSeparator(&self, groupingSeparator: Option<&NSString>); - #[method_id(zeroSymbol)] + #[method_id(@__retain_semantics Other zeroSymbol)] pub unsafe fn zeroSymbol(&self) -> Option>; #[method(setZeroSymbol:)] pub unsafe fn setZeroSymbol(&self, zeroSymbol: Option<&NSString>); - #[method_id(textAttributesForZero)] + #[method_id(@__retain_semantics Other textAttributesForZero)] pub unsafe fn textAttributesForZero( &self, ) -> Option, Shared>>; @@ -204,13 +204,13 @@ extern_methods!( textAttributesForZero: Option<&NSDictionary>, ); - #[method_id(nilSymbol)] + #[method_id(@__retain_semantics Other nilSymbol)] pub unsafe fn nilSymbol(&self) -> Id; #[method(setNilSymbol:)] pub unsafe fn setNilSymbol(&self, nilSymbol: &NSString); - #[method_id(textAttributesForNil)] + #[method_id(@__retain_semantics Other textAttributesForNil)] pub unsafe fn textAttributesForNil( &self, ) -> Option, Shared>>; @@ -221,13 +221,13 @@ extern_methods!( textAttributesForNil: Option<&NSDictionary>, ); - #[method_id(notANumberSymbol)] + #[method_id(@__retain_semantics Other notANumberSymbol)] pub unsafe fn notANumberSymbol(&self) -> Id; #[method(setNotANumberSymbol:)] pub unsafe fn setNotANumberSymbol(&self, notANumberSymbol: Option<&NSString>); - #[method_id(textAttributesForNotANumber)] + #[method_id(@__retain_semantics Other textAttributesForNotANumber)] pub unsafe fn textAttributesForNotANumber( &self, ) -> Option, Shared>>; @@ -238,13 +238,13 @@ extern_methods!( textAttributesForNotANumber: Option<&NSDictionary>, ); - #[method_id(positiveInfinitySymbol)] + #[method_id(@__retain_semantics Other positiveInfinitySymbol)] pub unsafe fn positiveInfinitySymbol(&self) -> Id; #[method(setPositiveInfinitySymbol:)] pub unsafe fn setPositiveInfinitySymbol(&self, positiveInfinitySymbol: &NSString); - #[method_id(textAttributesForPositiveInfinity)] + #[method_id(@__retain_semantics Other textAttributesForPositiveInfinity)] pub unsafe fn textAttributesForPositiveInfinity( &self, ) -> Option, Shared>>; @@ -255,13 +255,13 @@ extern_methods!( textAttributesForPositiveInfinity: Option<&NSDictionary>, ); - #[method_id(negativeInfinitySymbol)] + #[method_id(@__retain_semantics Other negativeInfinitySymbol)] pub unsafe fn negativeInfinitySymbol(&self) -> Id; #[method(setNegativeInfinitySymbol:)] pub unsafe fn setNegativeInfinitySymbol(&self, negativeInfinitySymbol: &NSString); - #[method_id(textAttributesForNegativeInfinity)] + #[method_id(@__retain_semantics Other textAttributesForNegativeInfinity)] pub unsafe fn textAttributesForNegativeInfinity( &self, ) -> Option, Shared>>; @@ -272,43 +272,43 @@ extern_methods!( textAttributesForNegativeInfinity: Option<&NSDictionary>, ); - #[method_id(positivePrefix)] + #[method_id(@__retain_semantics Other positivePrefix)] pub unsafe fn positivePrefix(&self) -> Id; #[method(setPositivePrefix:)] pub unsafe fn setPositivePrefix(&self, positivePrefix: Option<&NSString>); - #[method_id(positiveSuffix)] + #[method_id(@__retain_semantics Other positiveSuffix)] pub unsafe fn positiveSuffix(&self) -> Id; #[method(setPositiveSuffix:)] pub unsafe fn setPositiveSuffix(&self, positiveSuffix: Option<&NSString>); - #[method_id(negativePrefix)] + #[method_id(@__retain_semantics Other negativePrefix)] pub unsafe fn negativePrefix(&self) -> Id; #[method(setNegativePrefix:)] pub unsafe fn setNegativePrefix(&self, negativePrefix: Option<&NSString>); - #[method_id(negativeSuffix)] + #[method_id(@__retain_semantics Other negativeSuffix)] pub unsafe fn negativeSuffix(&self) -> Id; #[method(setNegativeSuffix:)] pub unsafe fn setNegativeSuffix(&self, negativeSuffix: Option<&NSString>); - #[method_id(currencyCode)] + #[method_id(@__retain_semantics Other currencyCode)] pub unsafe fn currencyCode(&self) -> Id; #[method(setCurrencyCode:)] pub unsafe fn setCurrencyCode(&self, currencyCode: Option<&NSString>); - #[method_id(currencySymbol)] + #[method_id(@__retain_semantics Other currencySymbol)] pub unsafe fn currencySymbol(&self) -> Id; #[method(setCurrencySymbol:)] pub unsafe fn setCurrencySymbol(&self, currencySymbol: Option<&NSString>); - #[method_id(internationalCurrencySymbol)] + #[method_id(@__retain_semantics Other internationalCurrencySymbol)] pub unsafe fn internationalCurrencySymbol(&self) -> Id; #[method(setInternationalCurrencySymbol:)] @@ -317,31 +317,31 @@ extern_methods!( internationalCurrencySymbol: Option<&NSString>, ); - #[method_id(percentSymbol)] + #[method_id(@__retain_semantics Other percentSymbol)] pub unsafe fn percentSymbol(&self) -> Id; #[method(setPercentSymbol:)] pub unsafe fn setPercentSymbol(&self, percentSymbol: Option<&NSString>); - #[method_id(perMillSymbol)] + #[method_id(@__retain_semantics Other perMillSymbol)] pub unsafe fn perMillSymbol(&self) -> Id; #[method(setPerMillSymbol:)] pub unsafe fn setPerMillSymbol(&self, perMillSymbol: Option<&NSString>); - #[method_id(minusSign)] + #[method_id(@__retain_semantics Other minusSign)] pub unsafe fn minusSign(&self) -> Id; #[method(setMinusSign:)] pub unsafe fn setMinusSign(&self, minusSign: Option<&NSString>); - #[method_id(plusSign)] + #[method_id(@__retain_semantics Other plusSign)] pub unsafe fn plusSign(&self) -> Id; #[method(setPlusSign:)] pub unsafe fn setPlusSign(&self, plusSign: Option<&NSString>); - #[method_id(exponentSymbol)] + #[method_id(@__retain_semantics Other exponentSymbol)] pub unsafe fn exponentSymbol(&self) -> Id; #[method(setExponentSymbol:)] @@ -359,7 +359,7 @@ extern_methods!( #[method(setSecondaryGroupingSize:)] pub unsafe fn setSecondaryGroupingSize(&self, secondaryGroupingSize: NSUInteger); - #[method_id(multiplier)] + #[method_id(@__retain_semantics Other multiplier)] pub unsafe fn multiplier(&self) -> Option>; #[method(setMultiplier:)] @@ -371,7 +371,7 @@ extern_methods!( #[method(setFormatWidth:)] pub unsafe fn setFormatWidth(&self, formatWidth: NSUInteger); - #[method_id(paddingCharacter)] + #[method_id(@__retain_semantics Other paddingCharacter)] pub unsafe fn paddingCharacter(&self) -> Id; #[method(setPaddingCharacter:)] @@ -389,7 +389,7 @@ extern_methods!( #[method(setRoundingMode:)] pub unsafe fn setRoundingMode(&self, roundingMode: NSNumberFormatterRoundingMode); - #[method_id(roundingIncrement)] + #[method_id(@__retain_semantics Other roundingIncrement)] pub unsafe fn roundingIncrement(&self) -> Id; #[method(setRoundingIncrement:)] @@ -419,19 +419,19 @@ extern_methods!( #[method(setMaximumFractionDigits:)] pub unsafe fn setMaximumFractionDigits(&self, maximumFractionDigits: NSUInteger); - #[method_id(minimum)] + #[method_id(@__retain_semantics Other minimum)] pub unsafe fn minimum(&self) -> Option>; #[method(setMinimum:)] pub unsafe fn setMinimum(&self, minimum: Option<&NSNumber>); - #[method_id(maximum)] + #[method_id(@__retain_semantics Other maximum)] pub unsafe fn maximum(&self) -> Option>; #[method(setMaximum:)] pub unsafe fn setMaximum(&self, maximum: Option<&NSNumber>); - #[method_id(currencyGroupingSeparator)] + #[method_id(@__retain_semantics Other currencyGroupingSeparator)] pub unsafe fn currencyGroupingSeparator(&self) -> Id; #[method(setCurrencyGroupingSeparator:)] @@ -484,7 +484,7 @@ extern_methods!( #[method(setHasThousandSeparators:)] pub unsafe fn setHasThousandSeparators(&self, hasThousandSeparators: bool); - #[method_id(thousandSeparator)] + #[method_id(@__retain_semantics Other thousandSeparator)] pub unsafe fn thousandSeparator(&self) -> Id; #[method(setThousandSeparator:)] @@ -496,13 +496,13 @@ extern_methods!( #[method(setLocalizesFormat:)] pub unsafe fn setLocalizesFormat(&self, localizesFormat: bool); - #[method_id(format)] + #[method_id(@__retain_semantics Other format)] pub unsafe fn format(&self) -> Id; #[method(setFormat:)] pub unsafe fn setFormat(&self, format: &NSString); - #[method_id(attributedStringForZero)] + #[method_id(@__retain_semantics Other attributedStringForZero)] pub unsafe fn attributedStringForZero(&self) -> Id; #[method(setAttributedStringForZero:)] @@ -511,13 +511,13 @@ extern_methods!( attributedStringForZero: &NSAttributedString, ); - #[method_id(attributedStringForNil)] + #[method_id(@__retain_semantics Other attributedStringForNil)] pub unsafe fn attributedStringForNil(&self) -> Id; #[method(setAttributedStringForNil:)] pub unsafe fn setAttributedStringForNil(&self, attributedStringForNil: &NSAttributedString); - #[method_id(attributedStringForNotANumber)] + #[method_id(@__retain_semantics Other attributedStringForNotANumber)] pub unsafe fn attributedStringForNotANumber(&self) -> Id; #[method(setAttributedStringForNotANumber:)] @@ -526,7 +526,7 @@ extern_methods!( attributedStringForNotANumber: &NSAttributedString, ); - #[method_id(roundingBehavior)] + #[method_id(@__retain_semantics Other roundingBehavior)] pub unsafe fn roundingBehavior(&self) -> Id; #[method(setRoundingBehavior:)] diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index e01c5f77c..1ce8be2b4 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -23,7 +23,7 @@ extern_methods!( #[method(classForCoder)] pub unsafe fn classForCoder(&self) -> &'static Class; - #[method_id(replacementObjectForCoder:)] + #[method_id(@__retain_semantics Other replacementObjectForCoder:)] pub unsafe fn replacementObjectForCoder( &self, coder: &NSCoder, @@ -44,7 +44,7 @@ pub type NSDiscardableContent = NSObject; extern_methods!( /// NSDiscardableContentProxy unsafe impl NSObject { - #[method_id(autoContentAccessingProxy)] + #[method_id(@__retain_semantics Other autoContentAccessingProxy)] pub unsafe fn autoContentAccessingProxy(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs index c0455ada7..2edc067b4 100644 --- a/crates/icrate/src/generated/Foundation/NSObjectScripting.rs +++ b/crates/icrate/src/generated/Foundation/NSObjectScripting.rs @@ -6,13 +6,13 @@ use crate::Foundation::*; extern_methods!( /// NSScripting unsafe impl NSObject { - #[method_id(scriptingValueForSpecifier:)] + #[method_id(@__retain_semantics Other scriptingValueForSpecifier:)] pub unsafe fn scriptingValueForSpecifier( &self, objectSpecifier: &NSScriptObjectSpecifier, ) -> Option>; - #[method_id(scriptingProperties)] + #[method_id(@__retain_semantics Other scriptingProperties)] pub unsafe fn scriptingProperties( &self, ) -> Option, Shared>>; @@ -23,7 +23,7 @@ extern_methods!( scriptingProperties: Option<&NSDictionary>, ); - #[method_id(copyScriptingValue:forKey:withProperties:)] + #[method_id(@__retain_semantics CopyOrMutCopy copyScriptingValue:forKey:withProperties:)] pub unsafe fn copyScriptingValue_forKey_withProperties( &self, value: &Object, @@ -31,7 +31,7 @@ extern_methods!( properties: &NSDictionary, ) -> Option>; - #[method_id(newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:)] + #[method_id(@__retain_semantics New newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:)] pub unsafe fn newScriptingObjectOfClass_forValueForKey_withContentsValue_properties( &self, objectClass: &Class, diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 9f568a508..37dd073c1 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -54,7 +54,7 @@ extern_methods!( #[method(removeDependency:)] pub unsafe fn removeDependency(&self, op: &NSOperation); - #[method_id(dependencies)] + #[method_id(@__retain_semantics Other dependencies)] pub unsafe fn dependencies(&self) -> Id, Shared>; #[method(queuePriority)] @@ -84,7 +84,7 @@ extern_methods!( #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[method(setName:)] @@ -103,7 +103,7 @@ extern_class!( extern_methods!( unsafe impl NSBlockOperation { - #[method_id(blockOperationWithBlock:)] + #[method_id(@__retain_semantics Other blockOperationWithBlock:)] pub unsafe fn blockOperationWithBlock(block: TodoBlock) -> Id; #[method(addExecutionBlock:)] @@ -122,7 +122,7 @@ extern_class!( extern_methods!( unsafe impl NSInvocationOperation { - #[method_id(initWithTarget:selector:object:)] + #[method_id(@__retain_semantics Init initWithTarget:selector:object:)] pub unsafe fn initWithTarget_selector_object( this: Option>, target: &Object, @@ -130,16 +130,16 @@ extern_methods!( arg: Option<&Object>, ) -> Option>; - #[method_id(initWithInvocation:)] + #[method_id(@__retain_semantics Init initWithInvocation:)] pub unsafe fn initWithInvocation( this: Option>, inv: &NSInvocation, ) -> Id; - #[method_id(invocation)] + #[method_id(@__retain_semantics Other invocation)] pub unsafe fn invocation(&self) -> Id; - #[method_id(result)] + #[method_id(@__retain_semantics Other result)] pub unsafe fn result(&self) -> Option>; } ); @@ -165,7 +165,7 @@ extern_class!( extern_methods!( unsafe impl NSOperationQueue { - #[method_id(progress)] + #[method_id(@__retain_semantics Other progress)] pub unsafe fn progress(&self) -> Id; #[method(addOperation:)] @@ -196,7 +196,7 @@ extern_methods!( #[method(setSuspended:)] pub unsafe fn setSuspended(&self, suspended: bool); - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[method(setName:)] @@ -220,10 +220,10 @@ extern_methods!( #[method(waitUntilAllOperationsAreFinished)] pub unsafe fn waitUntilAllOperationsAreFinished(&self); - #[method_id(currentQueue)] + #[method_id(@__retain_semantics Other currentQueue)] pub unsafe fn currentQueue() -> Option>; - #[method_id(mainQueue)] + #[method_id(@__retain_semantics Other mainQueue)] pub unsafe fn mainQueue() -> Id; } ); @@ -231,7 +231,7 @@ extern_methods!( extern_methods!( /// NSDeprecated unsafe impl NSOperationQueue { - #[method_id(operations)] + #[method_id(@__retain_semantics Other operations)] pub unsafe fn operations(&self) -> Id, Shared>; #[method(operationCount)] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 7556e0315..3ff4736eb 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -20,14 +20,14 @@ __inner_extern_class!( extern_methods!( unsafe impl NSOrderedCollectionChange { - #[method_id(changeWithObject:type:index:)] + #[method_id(@__retain_semantics Other changeWithObject:type:index:)] pub unsafe fn changeWithObject_type_index( anObject: Option<&ObjectType>, type_: NSCollectionChangeType, index: NSUInteger, ) -> Id, Shared>; - #[method_id(changeWithObject:type:index:associatedIndex:)] + #[method_id(@__retain_semantics Other changeWithObject:type:index:associatedIndex:)] pub unsafe fn changeWithObject_type_index_associatedIndex( anObject: Option<&ObjectType>, type_: NSCollectionChangeType, @@ -35,7 +35,7 @@ extern_methods!( associatedIndex: NSUInteger, ) -> Id, Shared>; - #[method_id(object)] + #[method_id(@__retain_semantics Other object)] pub unsafe fn object(&self) -> Option>; #[method(changeType)] @@ -47,10 +47,10 @@ extern_methods!( #[method(associatedIndex)] pub unsafe fn associatedIndex(&self) -> NSUInteger; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithObject:type:index:)] + #[method_id(@__retain_semantics Init initWithObject:type:index:)] pub unsafe fn initWithObject_type_index( this: Option>, anObject: Option<&ObjectType>, @@ -58,7 +58,7 @@ extern_methods!( index: NSUInteger, ) -> Id; - #[method_id(initWithObject:type:index:associatedIndex:)] + #[method_id(@__retain_semantics Init initWithObject:type:index:associatedIndex:)] pub unsafe fn initWithObject_type_index_associatedIndex( this: Option>, anObject: Option<&ObjectType>, diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 6360329b8..9d6ecffb9 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -24,13 +24,13 @@ __inner_extern_class!( extern_methods!( unsafe impl NSOrderedCollectionDifference { - #[method_id(initWithChanges:)] + #[method_id(@__retain_semantics Init initWithChanges:)] pub unsafe fn initWithChanges( this: Option>, changes: &NSArray>, ) -> Id; - #[method_id(initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:)] + #[method_id(@__retain_semantics Init initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:)] pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges( this: Option>, inserts: &NSIndexSet, @@ -40,7 +40,7 @@ extern_methods!( changes: &NSArray>, ) -> Id; - #[method_id(initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:)] + #[method_id(@__retain_semantics Init initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:)] pub unsafe fn initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects( this: Option>, inserts: &NSIndexSet, @@ -49,25 +49,25 @@ extern_methods!( removedObjects: Option<&NSArray>, ) -> Id; - #[method_id(insertions)] + #[method_id(@__retain_semantics Other insertions)] pub unsafe fn insertions( &self, ) -> Id>, Shared>; - #[method_id(removals)] + #[method_id(@__retain_semantics Other removals)] pub unsafe fn removals(&self) -> Id>, Shared>; #[method(hasChanges)] pub unsafe fn hasChanges(&self) -> bool; - #[method_id(differenceByTransformingChangesWithBlock:)] + #[method_id(@__retain_semantics Other differenceByTransformingChangesWithBlock:)] pub unsafe fn differenceByTransformingChangesWithBlock( &self, block: TodoBlock, ) -> Id, Shared>; - #[method_id(inverseDifference)] + #[method_id(@__retain_semantics Other inverseDifference)] pub unsafe fn inverseDifference(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index 37fbb988e..bc6bf135a 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -19,23 +19,23 @@ extern_methods!( #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - #[method_id(objectAtIndex:)] + #[method_id(@__retain_semantics Other objectAtIndex:)] pub unsafe fn objectAtIndex(&self, idx: NSUInteger) -> Id; #[method(indexOfObject:)] pub unsafe fn indexOfObject(&self, object: &ObjectType) -> NSUInteger; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithObjects:count:)] + #[method_id(@__retain_semantics Init initWithObjects:count:)] pub unsafe fn initWithObjects_count( this: Option>, objects: TodoArray, cnt: NSUInteger, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -49,16 +49,16 @@ extern_methods!( #[method(getObjects:range:)] pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange); - #[method_id(objectsAtIndexes:)] + #[method_id(@__retain_semantics Other objectsAtIndexes:)] pub unsafe fn objectsAtIndexes( &self, indexes: &NSIndexSet, ) -> Id, Shared>; - #[method_id(firstObject)] + #[method_id(@__retain_semantics Other firstObject)] pub unsafe fn firstObject(&self) -> Option>; - #[method_id(lastObject)] + #[method_id(@__retain_semantics Other lastObject)] pub unsafe fn lastObject(&self) -> Option>; #[method(isEqualToOrderedSet:)] @@ -79,22 +79,22 @@ extern_methods!( #[method(isSubsetOfSet:)] pub unsafe fn isSubsetOfSet(&self, set: &NSSet) -> bool; - #[method_id(objectAtIndexedSubscript:)] + #[method_id(@__retain_semantics Other objectAtIndexedSubscript:)] pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; - #[method_id(objectEnumerator)] + #[method_id(@__retain_semantics Other objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; - #[method_id(reverseObjectEnumerator)] + #[method_id(@__retain_semantics Other reverseObjectEnumerator)] pub unsafe fn reverseObjectEnumerator(&self) -> Id, Shared>; - #[method_id(reversedOrderedSet)] + #[method_id(@__retain_semantics Other reversedOrderedSet)] pub unsafe fn reversedOrderedSet(&self) -> Id, Shared>; - #[method_id(array)] + #[method_id(@__retain_semantics Other array)] pub unsafe fn array(&self) -> Id, Shared>; - #[method_id(set)] + #[method_id(@__retain_semantics Other set)] pub unsafe fn set(&self) -> Id, Shared>; #[method(enumerateObjectsUsingBlock:)] @@ -133,20 +133,20 @@ extern_methods!( predicate: TodoBlock, ) -> NSUInteger; - #[method_id(indexesOfObjectsPassingTest:)] + #[method_id(@__retain_semantics Other indexesOfObjectsPassingTest:)] pub unsafe fn indexesOfObjectsPassingTest( &self, predicate: TodoBlock, ) -> Id; - #[method_id(indexesOfObjectsWithOptions:passingTest:)] + #[method_id(@__retain_semantics Other indexesOfObjectsWithOptions:passingTest:)] pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, predicate: TodoBlock, ) -> Id; - #[method_id(indexesOfObjectsAtIndexes:options:passingTest:)] + #[method_id(@__retain_semantics Other indexesOfObjectsAtIndexes:options:passingTest:)] pub unsafe fn indexesOfObjectsAtIndexes_options_passingTest( &self, s: &NSIndexSet, @@ -163,27 +163,27 @@ extern_methods!( cmp: NSComparator, ) -> NSUInteger; - #[method_id(sortedArrayUsingComparator:)] + #[method_id(@__retain_semantics Other sortedArrayUsingComparator:)] pub unsafe fn sortedArrayUsingComparator( &self, cmptr: NSComparator, ) -> Id, Shared>; - #[method_id(sortedArrayWithOptions:usingComparator:)] + #[method_id(@__retain_semantics Other sortedArrayWithOptions:usingComparator:)] pub unsafe fn sortedArrayWithOptions_usingComparator( &self, opts: NSSortOptions, cmptr: NSComparator, ) -> Id, Shared>; - #[method_id(description)] + #[method_id(@__retain_semantics Other description)] pub unsafe fn description(&self) -> Id; - #[method_id(descriptionWithLocale:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; - #[method_id(descriptionWithLocale:indent:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:indent:)] pub unsafe fn descriptionWithLocale_indent( &self, locale: Option<&Object>, @@ -195,67 +195,67 @@ extern_methods!( extern_methods!( /// NSOrderedSetCreation unsafe impl NSOrderedSet { - #[method_id(orderedSet)] + #[method_id(@__retain_semantics Other orderedSet)] pub unsafe fn orderedSet() -> Id; - #[method_id(orderedSetWithObject:)] + #[method_id(@__retain_semantics Other orderedSetWithObject:)] pub unsafe fn orderedSetWithObject(object: &ObjectType) -> Id; - #[method_id(orderedSetWithObjects:count:)] + #[method_id(@__retain_semantics Other orderedSetWithObjects:count:)] pub unsafe fn orderedSetWithObjects_count( objects: TodoArray, cnt: NSUInteger, ) -> Id; - #[method_id(orderedSetWithOrderedSet:)] + #[method_id(@__retain_semantics Other orderedSetWithOrderedSet:)] pub unsafe fn orderedSetWithOrderedSet(set: &NSOrderedSet) -> Id; - #[method_id(orderedSetWithOrderedSet:range:copyItems:)] + #[method_id(@__retain_semantics Other orderedSetWithOrderedSet:range:copyItems:)] pub unsafe fn orderedSetWithOrderedSet_range_copyItems( set: &NSOrderedSet, range: NSRange, flag: bool, ) -> Id; - #[method_id(orderedSetWithArray:)] + #[method_id(@__retain_semantics Other orderedSetWithArray:)] pub unsafe fn orderedSetWithArray(array: &NSArray) -> Id; - #[method_id(orderedSetWithArray:range:copyItems:)] + #[method_id(@__retain_semantics Other orderedSetWithArray:range:copyItems:)] pub unsafe fn orderedSetWithArray_range_copyItems( array: &NSArray, range: NSRange, flag: bool, ) -> Id; - #[method_id(orderedSetWithSet:)] + #[method_id(@__retain_semantics Other orderedSetWithSet:)] pub unsafe fn orderedSetWithSet(set: &NSSet) -> Id; - #[method_id(orderedSetWithSet:copyItems:)] + #[method_id(@__retain_semantics Other orderedSetWithSet:copyItems:)] pub unsafe fn orderedSetWithSet_copyItems( set: &NSSet, flag: bool, ) -> Id; - #[method_id(initWithObject:)] + #[method_id(@__retain_semantics Init initWithObject:)] pub unsafe fn initWithObject( this: Option>, object: &ObjectType, ) -> Id; - #[method_id(initWithOrderedSet:)] + #[method_id(@__retain_semantics Init initWithOrderedSet:)] pub unsafe fn initWithOrderedSet( this: Option>, set: &NSOrderedSet, ) -> Id; - #[method_id(initWithOrderedSet:copyItems:)] + #[method_id(@__retain_semantics Init initWithOrderedSet:copyItems:)] pub unsafe fn initWithOrderedSet_copyItems( this: Option>, set: &NSOrderedSet, flag: bool, ) -> Id; - #[method_id(initWithOrderedSet:range:copyItems:)] + #[method_id(@__retain_semantics Init initWithOrderedSet:range:copyItems:)] pub unsafe fn initWithOrderedSet_range_copyItems( this: Option>, set: &NSOrderedSet, @@ -263,20 +263,20 @@ extern_methods!( flag: bool, ) -> Id; - #[method_id(initWithArray:)] + #[method_id(@__retain_semantics Init initWithArray:)] pub unsafe fn initWithArray( this: Option>, array: &NSArray, ) -> Id; - #[method_id(initWithArray:copyItems:)] + #[method_id(@__retain_semantics Init initWithArray:copyItems:)] pub unsafe fn initWithArray_copyItems( this: Option>, set: &NSArray, flag: bool, ) -> Id; - #[method_id(initWithArray:range:copyItems:)] + #[method_id(@__retain_semantics Init initWithArray:range:copyItems:)] pub unsafe fn initWithArray_range_copyItems( this: Option>, set: &NSArray, @@ -284,13 +284,13 @@ extern_methods!( flag: bool, ) -> Id; - #[method_id(initWithSet:)] + #[method_id(@__retain_semantics Init initWithSet:)] pub unsafe fn initWithSet( this: Option>, set: &NSSet, ) -> Id; - #[method_id(initWithSet:copyItems:)] + #[method_id(@__retain_semantics Init initWithSet:copyItems:)] pub unsafe fn initWithSet_copyItems( this: Option>, set: &NSSet, @@ -302,7 +302,7 @@ extern_methods!( extern_methods!( /// NSOrderedSetDiffing unsafe impl NSOrderedSet { - #[method_id(differenceFromOrderedSet:withOptions:usingEquivalenceTest:)] + #[method_id(@__retain_semantics Other differenceFromOrderedSet:withOptions:usingEquivalenceTest:)] pub unsafe fn differenceFromOrderedSet_withOptions_usingEquivalenceTest( &self, other: &NSOrderedSet, @@ -310,20 +310,20 @@ extern_methods!( block: TodoBlock, ) -> Id, Shared>; - #[method_id(differenceFromOrderedSet:withOptions:)] + #[method_id(@__retain_semantics Other differenceFromOrderedSet:withOptions:)] pub unsafe fn differenceFromOrderedSet_withOptions( &self, other: &NSOrderedSet, options: NSOrderedCollectionDifferenceCalculationOptions, ) -> Id, Shared>; - #[method_id(differenceFromOrderedSet:)] + #[method_id(@__retain_semantics Other differenceFromOrderedSet:)] pub unsafe fn differenceFromOrderedSet( &self, other: &NSOrderedSet, ) -> Id, Shared>; - #[method_id(orderedSetByApplyingDifference:)] + #[method_id(@__retain_semantics Other orderedSetByApplyingDifference:)] pub unsafe fn orderedSetByApplyingDifference( &self, difference: &NSOrderedCollectionDifference, @@ -353,16 +353,16 @@ extern_methods!( #[method(replaceObjectAtIndex:withObject:)] pub unsafe fn replaceObjectAtIndex_withObject(&self, idx: NSUInteger, object: &ObjectType); - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCapacity:)] + #[method_id(@__retain_semantics Init initWithCapacity:)] pub unsafe fn initWithCapacity( this: Option>, numItems: NSUInteger, @@ -476,7 +476,7 @@ extern_methods!( extern_methods!( /// NSMutableOrderedSetCreation unsafe impl NSMutableOrderedSet { - #[method_id(orderedSetWithCapacity:)] + #[method_id(@__retain_semantics Other orderedSetWithCapacity:)] pub unsafe fn orderedSetWithCapacity(numItems: NSUInteger) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSOrthography.rs b/crates/icrate/src/generated/Foundation/NSOrthography.rs index b116e7774..6e7d25562 100644 --- a/crates/icrate/src/generated/Foundation/NSOrthography.rs +++ b/crates/icrate/src/generated/Foundation/NSOrthography.rs @@ -14,20 +14,20 @@ extern_class!( extern_methods!( unsafe impl NSOrthography { - #[method_id(dominantScript)] + #[method_id(@__retain_semantics Other dominantScript)] pub unsafe fn dominantScript(&self) -> Id; - #[method_id(languageMap)] + #[method_id(@__retain_semantics Other languageMap)] pub unsafe fn languageMap(&self) -> Id>, Shared>; - #[method_id(initWithDominantScript:languageMap:)] + #[method_id(@__retain_semantics Init initWithDominantScript:languageMap:)] pub unsafe fn initWithDominantScript_languageMap( this: Option>, script: &NSString, map: &NSDictionary>, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -38,28 +38,28 @@ extern_methods!( extern_methods!( /// NSOrthographyExtended unsafe impl NSOrthography { - #[method_id(languagesForScript:)] + #[method_id(@__retain_semantics Other languagesForScript:)] pub unsafe fn languagesForScript( &self, script: &NSString, ) -> Option, Shared>>; - #[method_id(dominantLanguageForScript:)] + #[method_id(@__retain_semantics Other dominantLanguageForScript:)] pub unsafe fn dominantLanguageForScript( &self, script: &NSString, ) -> Option>; - #[method_id(dominantLanguage)] + #[method_id(@__retain_semantics Other dominantLanguage)] pub unsafe fn dominantLanguage(&self) -> Id; - #[method_id(allScripts)] + #[method_id(@__retain_semantics Other allScripts)] pub unsafe fn allScripts(&self) -> Id, Shared>; - #[method_id(allLanguages)] + #[method_id(@__retain_semantics Other allLanguages)] pub unsafe fn allLanguages(&self) -> Id, Shared>; - #[method_id(defaultOrthographyForLanguage:)] + #[method_id(@__retain_semantics Other defaultOrthographyForLanguage:)] pub unsafe fn defaultOrthographyForLanguage(language: &NSString) -> Id; } ); @@ -67,7 +67,7 @@ extern_methods!( extern_methods!( /// NSOrthographyCreation unsafe impl NSOrthography { - #[method_id(orthographyWithDominantScript:languageMap:)] + #[method_id(@__retain_semantics Other orthographyWithDominantScript:languageMap:)] pub unsafe fn orthographyWithDominantScript_languageMap( script: &NSString, map: &NSDictionary>, diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index 266c8e320..12b5181dc 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -6,49 +6,49 @@ use crate::Foundation::*; extern_methods!( /// NSStringPathExtensions unsafe impl NSString { - #[method_id(pathWithComponents:)] + #[method_id(@__retain_semantics Other pathWithComponents:)] pub unsafe fn pathWithComponents(components: &NSArray) -> Id; - #[method_id(pathComponents)] + #[method_id(@__retain_semantics Other pathComponents)] pub unsafe fn pathComponents(&self) -> Id, Shared>; #[method(isAbsolutePath)] pub unsafe fn isAbsolutePath(&self) -> bool; - #[method_id(lastPathComponent)] + #[method_id(@__retain_semantics Other lastPathComponent)] pub unsafe fn lastPathComponent(&self) -> Id; - #[method_id(stringByDeletingLastPathComponent)] + #[method_id(@__retain_semantics Other stringByDeletingLastPathComponent)] pub unsafe fn stringByDeletingLastPathComponent(&self) -> Id; - #[method_id(stringByAppendingPathComponent:)] + #[method_id(@__retain_semantics Other stringByAppendingPathComponent:)] pub fn stringByAppendingPathComponent(&self, str: &NSString) -> Id; - #[method_id(pathExtension)] + #[method_id(@__retain_semantics Other pathExtension)] pub unsafe fn pathExtension(&self) -> Id; - #[method_id(stringByDeletingPathExtension)] + #[method_id(@__retain_semantics Other stringByDeletingPathExtension)] pub unsafe fn stringByDeletingPathExtension(&self) -> Id; - #[method_id(stringByAppendingPathExtension:)] + #[method_id(@__retain_semantics Other stringByAppendingPathExtension:)] pub unsafe fn stringByAppendingPathExtension( &self, str: &NSString, ) -> Option>; - #[method_id(stringByAbbreviatingWithTildeInPath)] + #[method_id(@__retain_semantics Other stringByAbbreviatingWithTildeInPath)] pub unsafe fn stringByAbbreviatingWithTildeInPath(&self) -> Id; - #[method_id(stringByExpandingTildeInPath)] + #[method_id(@__retain_semantics Other stringByExpandingTildeInPath)] pub unsafe fn stringByExpandingTildeInPath(&self) -> Id; - #[method_id(stringByStandardizingPath)] + #[method_id(@__retain_semantics Other stringByStandardizingPath)] pub unsafe fn stringByStandardizingPath(&self) -> Id; - #[method_id(stringByResolvingSymlinksInPath)] + #[method_id(@__retain_semantics Other stringByResolvingSymlinksInPath)] pub unsafe fn stringByResolvingSymlinksInPath(&self) -> Id; - #[method_id(stringsByAppendingPaths:)] + #[method_id(@__retain_semantics Other stringsByAppendingPaths:)] pub unsafe fn stringsByAppendingPaths( &self, paths: &NSArray, @@ -78,7 +78,7 @@ extern_methods!( extern_methods!( /// NSArrayPathExtensions unsafe impl NSArray { - #[method_id(pathsMatchingExtensions:)] + #[method_id(@__retain_semantics Other pathsMatchingExtensions:)] pub unsafe fn pathsMatchingExtensions( &self, filterTypes: &NSArray, diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs index 66acc2260..c5e94da2d 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponents.rs @@ -14,43 +14,43 @@ extern_class!( extern_methods!( unsafe impl NSPersonNameComponents { - #[method_id(namePrefix)] + #[method_id(@__retain_semantics Other namePrefix)] pub unsafe fn namePrefix(&self) -> Option>; #[method(setNamePrefix:)] pub unsafe fn setNamePrefix(&self, namePrefix: Option<&NSString>); - #[method_id(givenName)] + #[method_id(@__retain_semantics Other givenName)] pub unsafe fn givenName(&self) -> Option>; #[method(setGivenName:)] pub unsafe fn setGivenName(&self, givenName: Option<&NSString>); - #[method_id(middleName)] + #[method_id(@__retain_semantics Other middleName)] pub unsafe fn middleName(&self) -> Option>; #[method(setMiddleName:)] pub unsafe fn setMiddleName(&self, middleName: Option<&NSString>); - #[method_id(familyName)] + #[method_id(@__retain_semantics Other familyName)] pub unsafe fn familyName(&self) -> Option>; #[method(setFamilyName:)] pub unsafe fn setFamilyName(&self, familyName: Option<&NSString>); - #[method_id(nameSuffix)] + #[method_id(@__retain_semantics Other nameSuffix)] pub unsafe fn nameSuffix(&self) -> Option>; #[method(setNameSuffix:)] pub unsafe fn setNameSuffix(&self, nameSuffix: Option<&NSString>); - #[method_id(nickname)] + #[method_id(@__retain_semantics Other nickname)] pub unsafe fn nickname(&self) -> Option>; #[method(setNickname:)] pub unsafe fn setNickname(&self, nickname: Option<&NSString>); - #[method_id(phoneticRepresentation)] + #[method_id(@__retain_semantics Other phoneticRepresentation)] pub unsafe fn phoneticRepresentation(&self) -> Option>; #[method(setPhoneticRepresentation:)] diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index b9dfcd0b7..d4af1f1d1 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -36,32 +36,32 @@ extern_methods!( #[method(setPhonetic:)] pub unsafe fn setPhonetic(&self, phonetic: bool); - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Id; #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); - #[method_id(localizedStringFromPersonNameComponents:style:options:)] + #[method_id(@__retain_semantics Other localizedStringFromPersonNameComponents:style:options:)] pub unsafe fn localizedStringFromPersonNameComponents_style_options( components: &NSPersonNameComponents, nameFormatStyle: NSPersonNameComponentsFormatterStyle, nameOptions: NSPersonNameComponentsFormatterOptions, ) -> Id; - #[method_id(stringFromPersonNameComponents:)] + #[method_id(@__retain_semantics Other stringFromPersonNameComponents:)] pub unsafe fn stringFromPersonNameComponents( &self, components: &NSPersonNameComponents, ) -> Id; - #[method_id(annotatedStringFromPersonNameComponents:)] + #[method_id(@__retain_semantics Other annotatedStringFromPersonNameComponents:)] pub unsafe fn annotatedStringFromPersonNameComponents( &self, components: &NSPersonNameComponents, ) -> Id; - #[method_id(personNameComponentsFromString:)] + #[method_id(@__retain_semantics Other personNameComponentsFromString:)] pub unsafe fn personNameComponentsFromString( &self, string: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSPointerArray.rs b/crates/icrate/src/generated/Foundation/NSPointerArray.rs index b3b35acb2..a288a0b83 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerArray.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerArray.rs @@ -14,29 +14,29 @@ extern_class!( extern_methods!( unsafe impl NSPointerArray { - #[method_id(initWithOptions:)] + #[method_id(@__retain_semantics Init initWithOptions:)] pub unsafe fn initWithOptions( this: Option>, options: NSPointerFunctionsOptions, ) -> Id; - #[method_id(initWithPointerFunctions:)] + #[method_id(@__retain_semantics Init initWithPointerFunctions:)] pub unsafe fn initWithPointerFunctions( this: Option>, functions: &NSPointerFunctions, ) -> Id; - #[method_id(pointerArrayWithOptions:)] + #[method_id(@__retain_semantics Other pointerArrayWithOptions:)] pub unsafe fn pointerArrayWithOptions( options: NSPointerFunctionsOptions, ) -> Id; - #[method_id(pointerArrayWithPointerFunctions:)] + #[method_id(@__retain_semantics Other pointerArrayWithPointerFunctions:)] pub unsafe fn pointerArrayWithPointerFunctions( functions: &NSPointerFunctions, ) -> Id; - #[method_id(pointerFunctions)] + #[method_id(@__retain_semantics Other pointerFunctions)] pub unsafe fn pointerFunctions(&self) -> Id; #[method(pointerAtIndex:)] @@ -72,19 +72,19 @@ extern_methods!( extern_methods!( /// NSPointerArrayConveniences unsafe impl NSPointerArray { - #[method_id(pointerArrayWithStrongObjects)] + #[method_id(@__retain_semantics Other pointerArrayWithStrongObjects)] pub unsafe fn pointerArrayWithStrongObjects() -> Id; - #[method_id(pointerArrayWithWeakObjects)] + #[method_id(@__retain_semantics Other pointerArrayWithWeakObjects)] pub unsafe fn pointerArrayWithWeakObjects() -> Id; - #[method_id(strongObjectsPointerArray)] + #[method_id(@__retain_semantics Other strongObjectsPointerArray)] pub unsafe fn strongObjectsPointerArray() -> Id; - #[method_id(weakObjectsPointerArray)] + #[method_id(@__retain_semantics Other weakObjectsPointerArray)] pub unsafe fn weakObjectsPointerArray() -> Id; - #[method_id(allObjects)] + #[method_id(@__retain_semantics Other allObjects)] pub unsafe fn allObjects(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index b3417b348..87c0896f3 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -29,13 +29,13 @@ extern_class!( extern_methods!( unsafe impl NSPointerFunctions { - #[method_id(initWithOptions:)] + #[method_id(@__retain_semantics Init initWithOptions:)] pub unsafe fn initWithOptions( this: Option>, options: NSPointerFunctionsOptions, ) -> Id; - #[method_id(pointerFunctionsWithOptions:)] + #[method_id(@__retain_semantics Other pointerFunctionsWithOptions:)] pub unsafe fn pointerFunctionsWithOptions( options: NSPointerFunctionsOptions, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 8aec1f1de..aa27517b7 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -18,7 +18,7 @@ extern_class!( extern_methods!( unsafe impl NSPort { - #[method_id(port)] + #[method_id(@__retain_semantics Other port)] pub unsafe fn port() -> Id; #[method(invalidate)] @@ -30,7 +30,7 @@ extern_methods!( #[method(setDelegate:)] pub unsafe fn setDelegate(&self, anObject: Option<&NSPortDelegate>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(scheduleInRunLoop:forMode:)] @@ -97,10 +97,10 @@ extern_class!( extern_methods!( unsafe impl NSMachPort { - #[method_id(portWithMachPort:)] + #[method_id(@__retain_semantics Other portWithMachPort:)] pub unsafe fn portWithMachPort(machPort: u32) -> Id; - #[method_id(initWithMachPort:)] + #[method_id(@__retain_semantics Init initWithMachPort:)] pub unsafe fn initWithMachPort( this: Option>, machPort: u32, @@ -109,16 +109,16 @@ extern_methods!( #[method(setDelegate:)] pub unsafe fn setDelegate(&self, anObject: Option<&NSMachPortDelegate>); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; - #[method_id(portWithMachPort:options:)] + #[method_id(@__retain_semantics Other portWithMachPort:options:)] pub unsafe fn portWithMachPort_options( machPort: u32, f: NSMachPortOptions, ) -> Id; - #[method_id(initWithMachPort:options:)] + #[method_id(@__retain_semantics Init initWithMachPort:options:)] pub unsafe fn initWithMachPort_options( this: Option>, machPort: u32, @@ -162,16 +162,16 @@ extern_class!( extern_methods!( unsafe impl NSSocketPort { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithTCPPort:)] + #[method_id(@__retain_semantics Init initWithTCPPort:)] pub unsafe fn initWithTCPPort( this: Option>, port: c_ushort, ) -> Option>; - #[method_id(initWithProtocolFamily:socketType:protocol:address:)] + #[method_id(@__retain_semantics Init initWithProtocolFamily:socketType:protocol:address:)] pub unsafe fn initWithProtocolFamily_socketType_protocol_address( this: Option>, family: c_int, @@ -180,7 +180,7 @@ extern_methods!( address: &NSData, ) -> Option>; - #[method_id(initWithProtocolFamily:socketType:protocol:socket:)] + #[method_id(@__retain_semantics Init initWithProtocolFamily:socketType:protocol:socket:)] pub unsafe fn initWithProtocolFamily_socketType_protocol_socket( this: Option>, family: c_int, @@ -189,14 +189,14 @@ extern_methods!( sock: NSSocketNativeHandle, ) -> Option>; - #[method_id(initRemoteWithTCPPort:host:)] + #[method_id(@__retain_semantics Init initRemoteWithTCPPort:host:)] pub unsafe fn initRemoteWithTCPPort_host( this: Option>, port: c_ushort, hostName: Option<&NSString>, ) -> Option>; - #[method_id(initRemoteWithProtocolFamily:socketType:protocol:address:)] + #[method_id(@__retain_semantics Init initRemoteWithProtocolFamily:socketType:protocol:address:)] pub unsafe fn initRemoteWithProtocolFamily_socketType_protocol_address( this: Option>, family: c_int, @@ -214,7 +214,7 @@ extern_methods!( #[method(protocol)] pub unsafe fn protocol(&self) -> c_int; - #[method_id(address)] + #[method_id(@__retain_semantics Other address)] pub unsafe fn address(&self) -> Id; #[method(socket)] diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index bf536ec6e..4894467aa 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -23,20 +23,20 @@ extern_methods!( #[method(encodePortObject:)] pub unsafe fn encodePortObject(&self, aport: &NSPort); - #[method_id(decodePortObject)] + #[method_id(@__retain_semantics Other decodePortObject)] pub unsafe fn decodePortObject(&self) -> Option>; - #[method_id(connection)] + #[method_id(@__retain_semantics Other connection)] pub unsafe fn connection(&self) -> Option>; - #[method_id(portCoderWithReceivePort:sendPort:components:)] + #[method_id(@__retain_semantics Other portCoderWithReceivePort:sendPort:components:)] pub unsafe fn portCoderWithReceivePort_sendPort_components( rcvPort: Option<&NSPort>, sndPort: Option<&NSPort>, comps: Option<&NSArray>, ) -> Id; - #[method_id(initWithReceivePort:sendPort:components:)] + #[method_id(@__retain_semantics Init initWithReceivePort:sendPort:components:)] pub unsafe fn initWithReceivePort_sendPort_components( this: Option>, rcvPort: Option<&NSPort>, @@ -55,7 +55,7 @@ extern_methods!( #[method(classForPortCoder)] pub unsafe fn classForPortCoder(&self) -> &'static Class; - #[method_id(replacementObjectForPortCoder:)] + #[method_id(@__retain_semantics Other replacementObjectForPortCoder:)] pub unsafe fn replacementObjectForPortCoder( &self, coder: &NSPortCoder, diff --git a/crates/icrate/src/generated/Foundation/NSPortMessage.rs b/crates/icrate/src/generated/Foundation/NSPortMessage.rs index 39036680e..f9e9ca91e 100644 --- a/crates/icrate/src/generated/Foundation/NSPortMessage.rs +++ b/crates/icrate/src/generated/Foundation/NSPortMessage.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSPortMessage { - #[method_id(initWithSendPort:receivePort:components:)] + #[method_id(@__retain_semantics Init initWithSendPort:receivePort:components:)] pub unsafe fn initWithSendPort_receivePort_components( this: Option>, sendPort: Option<&NSPort>, @@ -22,13 +22,13 @@ extern_methods!( components: Option<&NSArray>, ) -> Id; - #[method_id(components)] + #[method_id(@__retain_semantics Other components)] pub unsafe fn components(&self) -> Option>; - #[method_id(receivePort)] + #[method_id(@__retain_semantics Other receivePort)] pub unsafe fn receivePort(&self) -> Option>; - #[method_id(sendPort)] + #[method_id(@__retain_semantics Other sendPort)] pub unsafe fn sendPort(&self) -> Option>; #[method(sendBeforeDate:)] diff --git a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs index 153daf3a8..38e643eb8 100644 --- a/crates/icrate/src/generated/Foundation/NSPortNameServer.rs +++ b/crates/icrate/src/generated/Foundation/NSPortNameServer.rs @@ -14,13 +14,13 @@ extern_class!( extern_methods!( unsafe impl NSPortNameServer { - #[method_id(systemDefaultPortNameServer)] + #[method_id(@__retain_semantics Other systemDefaultPortNameServer)] pub unsafe fn systemDefaultPortNameServer() -> Id; - #[method_id(portForName:)] + #[method_id(@__retain_semantics Other portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; - #[method_id(portForName:host:)] + #[method_id(@__retain_semantics Other portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, @@ -46,13 +46,13 @@ extern_class!( extern_methods!( unsafe impl NSMachBootstrapServer { - #[method_id(sharedInstance)] + #[method_id(@__retain_semantics Other sharedInstance)] pub unsafe fn sharedInstance() -> Id; - #[method_id(portForName:)] + #[method_id(@__retain_semantics Other portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; - #[method_id(portForName:host:)] + #[method_id(@__retain_semantics Other portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, @@ -62,7 +62,7 @@ extern_methods!( #[method(registerPort:name:)] pub unsafe fn registerPort_name(&self, port: &NSPort, name: &NSString) -> bool; - #[method_id(servicePortWithName:)] + #[method_id(@__retain_semantics Other servicePortWithName:)] pub unsafe fn servicePortWithName(&self, name: &NSString) -> Option>; } ); @@ -78,13 +78,13 @@ extern_class!( extern_methods!( unsafe impl NSMessagePortNameServer { - #[method_id(sharedInstance)] + #[method_id(@__retain_semantics Other sharedInstance)] pub unsafe fn sharedInstance() -> Id; - #[method_id(portForName:)] + #[method_id(@__retain_semantics Other portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; - #[method_id(portForName:host:)] + #[method_id(@__retain_semantics Other portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, @@ -104,13 +104,13 @@ extern_class!( extern_methods!( unsafe impl NSSocketPortNameServer { - #[method_id(sharedInstance)] + #[method_id(@__retain_semantics Other sharedInstance)] pub unsafe fn sharedInstance() -> Id; - #[method_id(portForName:)] + #[method_id(@__retain_semantics Other portForName:)] pub unsafe fn portForName(&self, name: &NSString) -> Option>; - #[method_id(portForName:host:)] + #[method_id(@__retain_semantics Other portForName:host:)] pub unsafe fn portForName_host( &self, name: &NSString, @@ -123,7 +123,7 @@ extern_methods!( #[method(removePortForName:)] pub unsafe fn removePortForName(&self, name: &NSString) -> bool; - #[method_id(portForName:host:nameServerPortNumber:)] + #[method_id(@__retain_semantics Other portForName:host:nameServerPortNumber:)] pub unsafe fn portForName_host_nameServerPortNumber( &self, name: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 7b8467349..039d47bc6 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -14,33 +14,33 @@ extern_class!( extern_methods!( unsafe impl NSPredicate { - #[method_id(predicateWithFormat:argumentArray:)] + #[method_id(@__retain_semantics Other predicateWithFormat:argumentArray:)] pub unsafe fn predicateWithFormat_argumentArray( predicateFormat: &NSString, arguments: Option<&NSArray>, ) -> Id; - #[method_id(predicateWithFormat:arguments:)] + #[method_id(@__retain_semantics Other predicateWithFormat:arguments:)] pub unsafe fn predicateWithFormat_arguments( predicateFormat: &NSString, argList: va_list, ) -> Id; - #[method_id(predicateFromMetadataQueryString:)] + #[method_id(@__retain_semantics Other predicateFromMetadataQueryString:)] pub unsafe fn predicateFromMetadataQueryString( queryString: &NSString, ) -> Option>; - #[method_id(predicateWithValue:)] + #[method_id(@__retain_semantics Other predicateWithValue:)] pub unsafe fn predicateWithValue(value: bool) -> Id; - #[method_id(predicateWithBlock:)] + #[method_id(@__retain_semantics Other predicateWithBlock:)] pub unsafe fn predicateWithBlock(block: TodoBlock) -> Id; - #[method_id(predicateFormat)] + #[method_id(@__retain_semantics Other predicateFormat)] pub unsafe fn predicateFormat(&self) -> Id; - #[method_id(predicateWithSubstitutionVariables:)] + #[method_id(@__retain_semantics Other predicateWithSubstitutionVariables:)] pub unsafe fn predicateWithSubstitutionVariables( &self, variables: &NSDictionary, @@ -64,7 +64,7 @@ extern_methods!( extern_methods!( /// NSPredicateSupport unsafe impl NSArray { - #[method_id(filteredArrayUsingPredicate:)] + #[method_id(@__retain_semantics Other filteredArrayUsingPredicate:)] pub unsafe fn filteredArrayUsingPredicate( &self, predicate: &NSPredicate, @@ -83,7 +83,7 @@ extern_methods!( extern_methods!( /// NSPredicateSupport unsafe impl NSSet { - #[method_id(filteredSetUsingPredicate:)] + #[method_id(@__retain_semantics Other filteredSetUsingPredicate:)] pub unsafe fn filteredSetUsingPredicate( &self, predicate: &NSPredicate, @@ -102,7 +102,7 @@ extern_methods!( extern_methods!( /// NSPredicateSupport unsafe impl NSOrderedSet { - #[method_id(filteredOrderedSetUsingPredicate:)] + #[method_id(@__retain_semantics Other filteredOrderedSetUsingPredicate:)] pub unsafe fn filteredOrderedSetUsingPredicate( &self, p: &NSPredicate, diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 1cddac14d..d8b54b0b7 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -22,19 +22,19 @@ extern_class!( extern_methods!( unsafe impl NSProcessInfo { - #[method_id(processInfo)] + #[method_id(@__retain_semantics Other processInfo)] pub unsafe fn processInfo() -> Id; - #[method_id(environment)] + #[method_id(@__retain_semantics Other environment)] pub unsafe fn environment(&self) -> Id, Shared>; - #[method_id(arguments)] + #[method_id(@__retain_semantics Other arguments)] pub unsafe fn arguments(&self) -> Id, Shared>; - #[method_id(hostName)] + #[method_id(@__retain_semantics Other hostName)] pub unsafe fn hostName(&self) -> Id; - #[method_id(processName)] + #[method_id(@__retain_semantics Other processName)] pub unsafe fn processName(&self) -> Id; #[method(setProcessName:)] @@ -43,16 +43,16 @@ extern_methods!( #[method(processIdentifier)] pub unsafe fn processIdentifier(&self) -> c_int; - #[method_id(globallyUniqueString)] + #[method_id(@__retain_semantics Other globallyUniqueString)] pub unsafe fn globallyUniqueString(&self) -> Id; #[method(operatingSystem)] pub unsafe fn operatingSystem(&self) -> NSUInteger; - #[method_id(operatingSystemName)] + #[method_id(@__retain_semantics Other operatingSystemName)] pub unsafe fn operatingSystemName(&self) -> Id; - #[method_id(operatingSystemVersionString)] + #[method_id(@__retain_semantics Other operatingSystemVersionString)] pub unsafe fn operatingSystemVersionString(&self) -> Id; #[method(operatingSystemVersion)] @@ -114,7 +114,7 @@ pub const NSActivityLatencyCritical: NSActivityOptions = 0xFF00000000; extern_methods!( /// NSProcessInfoActivity unsafe impl NSProcessInfo { - #[method_id(beginActivityWithOptions:reason:)] + #[method_id(@__retain_semantics Other beginActivityWithOptions:reason:)] pub unsafe fn beginActivityWithOptions_reason( &self, options: NSActivityOptions, @@ -144,10 +144,10 @@ extern_methods!( extern_methods!( /// NSUserInformation unsafe impl NSProcessInfo { - #[method_id(userName)] + #[method_id(@__retain_semantics Other userName)] pub unsafe fn userName(&self) -> Id; - #[method_id(fullUserName)] + #[method_id(@__retain_semantics Other fullUserName)] pub unsafe fn fullUserName(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index d04327526..83cb30777 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -20,23 +20,23 @@ extern_class!( extern_methods!( unsafe impl NSProgress { - #[method_id(currentProgress)] + #[method_id(@__retain_semantics Other currentProgress)] pub unsafe fn currentProgress() -> Option>; - #[method_id(progressWithTotalUnitCount:)] + #[method_id(@__retain_semantics Other progressWithTotalUnitCount:)] pub unsafe fn progressWithTotalUnitCount(unitCount: i64) -> Id; - #[method_id(discreteProgressWithTotalUnitCount:)] + #[method_id(@__retain_semantics Other discreteProgressWithTotalUnitCount:)] pub unsafe fn discreteProgressWithTotalUnitCount(unitCount: i64) -> Id; - #[method_id(progressWithTotalUnitCount:parent:pendingUnitCount:)] + #[method_id(@__retain_semantics Other progressWithTotalUnitCount:parent:pendingUnitCount:)] pub unsafe fn progressWithTotalUnitCount_parent_pendingUnitCount( unitCount: i64, parent: &NSProgress, portionOfParentTotalUnitCount: i64, ) -> Id; - #[method_id(initWithParent:userInfo:)] + #[method_id(@__retain_semantics Init initWithParent:userInfo:)] pub unsafe fn initWithParent_userInfo( this: Option>, parentProgressOrNil: Option<&NSProgress>, @@ -71,13 +71,13 @@ extern_methods!( #[method(setCompletedUnitCount:)] pub unsafe fn setCompletedUnitCount(&self, completedUnitCount: i64); - #[method_id(localizedDescription)] + #[method_id(@__retain_semantics Other localizedDescription)] pub unsafe fn localizedDescription(&self) -> Id; #[method(setLocalizedDescription:)] pub unsafe fn setLocalizedDescription(&self, localizedDescription: Option<&NSString>); - #[method_id(localizedAdditionalDescription)] + #[method_id(@__retain_semantics Other localizedAdditionalDescription)] pub unsafe fn localizedAdditionalDescription(&self) -> Id; #[method(setLocalizedAdditionalDescription:)] @@ -147,28 +147,28 @@ extern_methods!( #[method(resume)] pub unsafe fn resume(&self); - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Id, Shared>; - #[method_id(kind)] + #[method_id(@__retain_semantics Other kind)] pub unsafe fn kind(&self) -> Option>; #[method(setKind:)] pub unsafe fn setKind(&self, kind: Option<&NSProgressKind>); - #[method_id(estimatedTimeRemaining)] + #[method_id(@__retain_semantics Other estimatedTimeRemaining)] pub unsafe fn estimatedTimeRemaining(&self) -> Option>; #[method(setEstimatedTimeRemaining:)] pub unsafe fn setEstimatedTimeRemaining(&self, estimatedTimeRemaining: Option<&NSNumber>); - #[method_id(throughput)] + #[method_id(@__retain_semantics Other throughput)] pub unsafe fn throughput(&self) -> Option>; #[method(setThroughput:)] pub unsafe fn setThroughput(&self, throughput: Option<&NSNumber>); - #[method_id(fileOperationKind)] + #[method_id(@__retain_semantics Other fileOperationKind)] pub unsafe fn fileOperationKind(&self) -> Option>; #[method(setFileOperationKind:)] @@ -177,19 +177,19 @@ extern_methods!( fileOperationKind: Option<&NSProgressFileOperationKind>, ); - #[method_id(fileURL)] + #[method_id(@__retain_semantics Other fileURL)] pub unsafe fn fileURL(&self) -> Option>; #[method(setFileURL:)] pub unsafe fn setFileURL(&self, fileURL: Option<&NSURL>); - #[method_id(fileTotalCount)] + #[method_id(@__retain_semantics Other fileTotalCount)] pub unsafe fn fileTotalCount(&self) -> Option>; #[method(setFileTotalCount:)] pub unsafe fn setFileTotalCount(&self, fileTotalCount: Option<&NSNumber>); - #[method_id(fileCompletedCount)] + #[method_id(@__retain_semantics Other fileCompletedCount)] pub unsafe fn fileCompletedCount(&self) -> Option>; #[method(setFileCompletedCount:)] @@ -201,7 +201,7 @@ extern_methods!( #[method(unpublish)] pub unsafe fn unpublish(&self); - #[method_id(addSubscriberForFileURL:withPublishingHandler:)] + #[method_id(@__retain_semantics Other addSubscriberForFileURL:withPublishingHandler:)] pub unsafe fn addSubscriberForFileURL_withPublishingHandler( url: &NSURL, publishingHandler: NSProgressPublishingHandler, diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 58a38e591..e8c76dc98 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -36,21 +36,21 @@ extern_methods!( format: NSPropertyListFormat, ) -> bool; - #[method_id(dataWithPropertyList:format:options:error:)] + #[method_id(@__retain_semantics Other dataWithPropertyList:format:options:error:)] pub unsafe fn dataWithPropertyList_format_options_error( plist: &Object, format: NSPropertyListFormat, opt: NSPropertyListWriteOptions, ) -> Result, Id>; - #[method_id(propertyListWithData:options:format:error:)] + #[method_id(@__retain_semantics Other propertyListWithData:options:format:error:)] pub unsafe fn propertyListWithData_options_format_error( data: &NSData, opt: NSPropertyListReadOptions, format: *mut NSPropertyListFormat, ) -> Result, Id>; - #[method_id(propertyListWithStream:options:format:error:)] + #[method_id(@__retain_semantics Other propertyListWithStream:options:format:error:)] pub unsafe fn propertyListWithStream_options_format_error( stream: &NSInputStream, opt: NSPropertyListReadOptions, diff --git a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs index 10b37b516..f6f8b29eb 100644 --- a/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs +++ b/crates/icrate/src/generated/Foundation/NSProtocolChecker.rs @@ -14,10 +14,10 @@ extern_class!( extern_methods!( unsafe impl NSProtocolChecker { - #[method_id(protocol)] + #[method_id(@__retain_semantics Other protocol)] pub unsafe fn protocol(&self) -> Id; - #[method_id(target)] + #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; } ); @@ -25,13 +25,13 @@ extern_methods!( extern_methods!( /// NSProtocolCheckerCreation unsafe impl NSProtocolChecker { - #[method_id(protocolCheckerWithTarget:protocol:)] + #[method_id(@__retain_semantics Other protocolCheckerWithTarget:protocol:)] pub unsafe fn protocolCheckerWithTarget_protocol( anObject: &NSObject, aProtocol: &Protocol, ) -> Id; - #[method_id(initWithTarget:protocol:)] + #[method_id(@__retain_semantics Init initWithTarget:protocol:)] pub unsafe fn initWithTarget_protocol( this: Option>, anObject: &NSObject, diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index a3ed028fb..46e0487e7 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -14,10 +14,10 @@ extern_class!( extern_methods!( unsafe impl NSProxy { - #[method_id(alloc)] + #[method_id(@__retain_semantics Alloc alloc)] pub unsafe fn alloc() -> Option>; - #[method_id(allocWithZone:)] + #[method_id(@__retain_semantics Alloc allocWithZone:)] pub unsafe fn allocWithZone(zone: *mut NSZone) -> Option>; #[method(class)] @@ -26,7 +26,7 @@ extern_methods!( #[method(forwardInvocation:)] pub unsafe fn forwardInvocation(&self, invocation: &NSInvocation); - #[method_id(methodSignatureForSelector:)] + #[method_id(@__retain_semantics Other methodSignatureForSelector:)] pub unsafe fn methodSignatureForSelector( &self, sel: Sel, @@ -38,10 +38,10 @@ extern_methods!( #[method(finalize)] pub unsafe fn finalize(&self); - #[method_id(description)] + #[method_id(@__retain_semantics Other description)] pub unsafe fn description(&self) -> Id; - #[method_id(debugDescription)] + #[method_id(@__retain_semantics Other debugDescription)] pub unsafe fn debugDescription(&self) -> Id; #[method(respondsToSelector:)] diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index f285d0c8e..193811e5d 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -6,7 +6,7 @@ use crate::Foundation::*; extern_methods!( /// NSValueRangeExtensions unsafe impl NSValue { - #[method_id(valueWithRange:)] + #[method_id(@__retain_semantics Other valueWithRange:)] pub unsafe fn valueWithRange(range: NSRange) -> Id; #[method(rangeValue)] diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index d0ab5874d..4dc80f8d7 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -23,20 +23,20 @@ extern_class!( extern_methods!( unsafe impl NSRegularExpression { - #[method_id(regularExpressionWithPattern:options:error:)] + #[method_id(@__retain_semantics Other regularExpressionWithPattern:options:error:)] pub unsafe fn regularExpressionWithPattern_options_error( pattern: &NSString, options: NSRegularExpressionOptions, ) -> Result, Id>; - #[method_id(initWithPattern:options:error:)] + #[method_id(@__retain_semantics Init initWithPattern:options:error:)] pub unsafe fn initWithPattern_options_error( this: Option>, pattern: &NSString, options: NSRegularExpressionOptions, ) -> Result, Id>; - #[method_id(pattern)] + #[method_id(@__retain_semantics Other pattern)] pub unsafe fn pattern(&self) -> Id; #[method(options)] @@ -45,7 +45,7 @@ extern_methods!( #[method(numberOfCaptureGroups)] pub unsafe fn numberOfCaptureGroups(&self) -> NSUInteger; - #[method_id(escapedPatternForString:)] + #[method_id(@__retain_semantics Other escapedPatternForString:)] pub unsafe fn escapedPatternForString(string: &NSString) -> Id; } ); @@ -76,7 +76,7 @@ extern_methods!( block: TodoBlock, ); - #[method_id(matchesInString:options:range:)] + #[method_id(@__retain_semantics Other matchesInString:options:range:)] pub unsafe fn matchesInString_options_range( &self, string: &NSString, @@ -92,7 +92,7 @@ extern_methods!( range: NSRange, ) -> NSUInteger; - #[method_id(firstMatchInString:options:range:)] + #[method_id(@__retain_semantics Other firstMatchInString:options:range:)] pub unsafe fn firstMatchInString_options_range( &self, string: &NSString, @@ -113,7 +113,7 @@ extern_methods!( extern_methods!( /// NSReplacement unsafe impl NSRegularExpression { - #[method_id(stringByReplacingMatchesInString:options:range:withTemplate:)] + #[method_id(@__retain_semantics Other stringByReplacingMatchesInString:options:range:withTemplate:)] pub unsafe fn stringByReplacingMatchesInString_options_range_withTemplate( &self, string: &NSString, @@ -131,7 +131,7 @@ extern_methods!( templ: &NSString, ) -> NSUInteger; - #[method_id(replacementStringForResult:inString:offset:template:)] + #[method_id(@__retain_semantics Other replacementStringForResult:inString:offset:template:)] pub unsafe fn replacementStringForResult_inString_offset_template( &self, result: &NSTextCheckingResult, @@ -140,7 +140,7 @@ extern_methods!( templ: &NSString, ) -> Id; - #[method_id(escapedTemplateForString:)] + #[method_id(@__retain_semantics Other escapedTemplateForString:)] pub unsafe fn escapedTemplateForString(string: &NSString) -> Id; } ); @@ -156,12 +156,12 @@ extern_class!( extern_methods!( unsafe impl NSDataDetector { - #[method_id(dataDetectorWithTypes:error:)] + #[method_id(@__retain_semantics Other dataDetectorWithTypes:error:)] pub unsafe fn dataDetectorWithTypes_error( checkingTypes: NSTextCheckingTypes, ) -> Result, Id>; - #[method_id(initWithTypes:error:)] + #[method_id(@__retain_semantics Init initWithTypes:error:)] pub unsafe fn initWithTypes_error( this: Option>, checkingTypes: NSTextCheckingTypes, diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index b2106bd06..24878aa23 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -43,38 +43,38 @@ extern_methods!( #[method(setFormattingContext:)] pub unsafe fn setFormattingContext(&self, formattingContext: NSFormattingContext); - #[method_id(calendar)] + #[method_id(@__retain_semantics Other calendar)] pub unsafe fn calendar(&self) -> Id; #[method(setCalendar:)] pub unsafe fn setCalendar(&self, calendar: Option<&NSCalendar>); - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Id; #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&NSLocale>); - #[method_id(localizedStringFromDateComponents:)] + #[method_id(@__retain_semantics Other localizedStringFromDateComponents:)] pub unsafe fn localizedStringFromDateComponents( &self, dateComponents: &NSDateComponents, ) -> Id; - #[method_id(localizedStringFromTimeInterval:)] + #[method_id(@__retain_semantics Other localizedStringFromTimeInterval:)] pub unsafe fn localizedStringFromTimeInterval( &self, timeInterval: NSTimeInterval, ) -> Id; - #[method_id(localizedStringForDate:relativeToDate:)] + #[method_id(@__retain_semantics Other localizedStringForDate:relativeToDate:)] pub unsafe fn localizedStringForDate_relativeToDate( &self, date: &NSDate, referenceDate: &NSDate, ) -> Id; - #[method_id(stringForObjectValue:)] + #[method_id(@__retain_semantics Other stringForObjectValue:)] pub unsafe fn stringForObjectValue( &self, obj: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index f6b3d797f..56c21bbdd 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -22,13 +22,13 @@ extern_class!( extern_methods!( unsafe impl NSRunLoop { - #[method_id(currentRunLoop)] + #[method_id(@__retain_semantics Other currentRunLoop)] pub unsafe fn currentRunLoop() -> Id; - #[method_id(mainRunLoop)] + #[method_id(@__retain_semantics Other mainRunLoop)] pub unsafe fn mainRunLoop() -> Id; - #[method_id(currentMode)] + #[method_id(@__retain_semantics Other currentMode)] pub unsafe fn currentMode(&self) -> Option>; #[method(getCFRunLoop)] @@ -43,7 +43,7 @@ extern_methods!( #[method(removePort:forMode:)] pub unsafe fn removePort_forMode(&self, aPort: &NSPort, mode: &NSRunLoopMode); - #[method_id(limitDateForMode:)] + #[method_id(@__retain_semantics Other limitDateForMode:)] pub unsafe fn limitDateForMode(&self, mode: &NSRunLoopMode) -> Option>; #[method(acceptInputForMode:beforeDate:)] diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index 1bbfec828..d9cd2c051 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSScanner { - #[method_id(string)] + #[method_id(@__retain_semantics Other string)] pub unsafe fn string(&self) -> Id; #[method(scanLocation)] @@ -23,7 +23,7 @@ extern_methods!( #[method(setScanLocation:)] pub unsafe fn setScanLocation(&self, scanLocation: NSUInteger); - #[method_id(charactersToBeSkipped)] + #[method_id(@__retain_semantics Other charactersToBeSkipped)] pub unsafe fn charactersToBeSkipped(&self) -> Option>; #[method(setCharactersToBeSkipped:)] @@ -38,13 +38,13 @@ extern_methods!( #[method(setCaseSensitive:)] pub unsafe fn setCaseSensitive(&self, caseSensitive: bool); - #[method_id(locale)] + #[method_id(@__retain_semantics Other locale)] pub unsafe fn locale(&self) -> Option>; #[method(setLocale:)] pub unsafe fn setLocale(&self, locale: Option<&Object>); - #[method_id(initWithString:)] + #[method_id(@__retain_semantics Init initWithString:)] pub unsafe fn initWithString( this: Option>, string: &NSString, @@ -116,10 +116,10 @@ extern_methods!( #[method(isAtEnd)] pub unsafe fn isAtEnd(&self) -> bool; - #[method_id(scannerWithString:)] + #[method_id(@__retain_semantics Other scannerWithString:)] pub unsafe fn scannerWithString(string: &NSString) -> Id; - #[method_id(localizedScannerWithString:)] + #[method_id(@__retain_semantics Other localizedScannerWithString:)] pub unsafe fn localizedScannerWithString(string: &NSString) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index cc567f044..e9b79c0ab 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -14,12 +14,12 @@ extern_class!( extern_methods!( unsafe impl NSScriptClassDescription { - #[method_id(classDescriptionForClass:)] + #[method_id(@__retain_semantics Other classDescriptionForClass:)] pub unsafe fn classDescriptionForClass( aClass: &Class, ) -> Option>; - #[method_id(initWithSuiteName:className:dictionary:)] + #[method_id(@__retain_semantics Init initWithSuiteName:className:dictionary:)] pub unsafe fn initWithSuiteName_className_dictionary( this: Option>, suiteName: &NSString, @@ -27,16 +27,16 @@ extern_methods!( classDeclaration: Option<&NSDictionary>, ) -> Option>; - #[method_id(suiteName)] + #[method_id(@__retain_semantics Other suiteName)] pub unsafe fn suiteName(&self) -> Option>; - #[method_id(className)] + #[method_id(@__retain_semantics Other className)] pub unsafe fn className(&self) -> Option>; - #[method_id(implementationClassName)] + #[method_id(@__retain_semantics Other implementationClassName)] pub unsafe fn implementationClassName(&self) -> Option>; - #[method_id(superclassDescription)] + #[method_id(@__retain_semantics Other superclassDescription)] pub unsafe fn superclassDescription(&self) -> Option>; #[method(appleEventCode)] @@ -57,10 +57,10 @@ extern_methods!( commandDescription: &NSScriptCommandDescription, ) -> Option; - #[method_id(typeForKey:)] + #[method_id(@__retain_semantics Other typeForKey:)] pub unsafe fn typeForKey(&self, key: &NSString) -> Option>; - #[method_id(classDescriptionForKey:)] + #[method_id(@__retain_semantics Other classDescriptionForKey:)] pub unsafe fn classDescriptionForKey( &self, key: &NSString, @@ -69,13 +69,13 @@ extern_methods!( #[method(appleEventCodeForKey:)] pub unsafe fn appleEventCodeForKey(&self, key: &NSString) -> FourCharCode; - #[method_id(keyWithAppleEventCode:)] + #[method_id(@__retain_semantics Other keyWithAppleEventCode:)] pub unsafe fn keyWithAppleEventCode( &self, appleEventCode: FourCharCode, ) -> Option>; - #[method_id(defaultSubcontainerAttributeKey)] + #[method_id(@__retain_semantics Other defaultSubcontainerAttributeKey)] pub unsafe fn defaultSubcontainerAttributeKey(&self) -> Option>; #[method(isLocationRequiredToCreateForKey:)] @@ -112,7 +112,7 @@ extern_methods!( #[method(classCode)] pub unsafe fn classCode(&self) -> FourCharCode; - #[method_id(className)] + #[method_id(@__retain_semantics Other className)] pub unsafe fn className(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs index b6de7b239..179abf505 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCoercionHandler.rs @@ -14,10 +14,10 @@ extern_class!( extern_methods!( unsafe impl NSScriptCoercionHandler { - #[method_id(sharedCoercionHandler)] + #[method_id(@__retain_semantics Other sharedCoercionHandler)] pub unsafe fn sharedCoercionHandler() -> Id; - #[method_id(coerceValue:toClass:)] + #[method_id(@__retain_semantics Other coerceValue:toClass:)] pub unsafe fn coerceValue_toClass( &self, value: &Object, diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 25a678c95..c494358e4 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -26,28 +26,28 @@ extern_class!( extern_methods!( unsafe impl NSScriptCommand { - #[method_id(initWithCommandDescription:)] + #[method_id(@__retain_semantics Init initWithCommandDescription:)] pub unsafe fn initWithCommandDescription( this: Option>, commandDef: &NSScriptCommandDescription, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, ) -> Option>; - #[method_id(commandDescription)] + #[method_id(@__retain_semantics Other commandDescription)] pub unsafe fn commandDescription(&self) -> Id; - #[method_id(directParameter)] + #[method_id(@__retain_semantics Other directParameter)] pub unsafe fn directParameter(&self) -> Option>; #[method(setDirectParameter:)] pub unsafe fn setDirectParameter(&self, directParameter: Option<&Object>); - #[method_id(receiversSpecifier)] + #[method_id(@__retain_semantics Other receiversSpecifier)] pub unsafe fn receiversSpecifier(&self) -> Option>; #[method(setReceiversSpecifier:)] @@ -56,16 +56,16 @@ extern_methods!( receiversSpecifier: Option<&NSScriptObjectSpecifier>, ); - #[method_id(evaluatedReceivers)] + #[method_id(@__retain_semantics Other evaluatedReceivers)] pub unsafe fn evaluatedReceivers(&self) -> Option>; - #[method_id(arguments)] + #[method_id(@__retain_semantics Other arguments)] pub unsafe fn arguments(&self) -> Option, Shared>>; #[method(setArguments:)] pub unsafe fn setArguments(&self, arguments: Option<&NSDictionary>); - #[method_id(evaluatedArguments)] + #[method_id(@__retain_semantics Other evaluatedArguments)] pub unsafe fn evaluatedArguments( &self, ) -> Option, Shared>>; @@ -73,10 +73,10 @@ extern_methods!( #[method(isWellFormed)] pub unsafe fn isWellFormed(&self) -> bool; - #[method_id(performDefaultImplementation)] + #[method_id(@__retain_semantics Other performDefaultImplementation)] pub unsafe fn performDefaultImplementation(&self) -> Option>; - #[method_id(executeCommand)] + #[method_id(@__retain_semantics Other executeCommand)] pub unsafe fn executeCommand(&self) -> Option>; #[method(scriptErrorNumber)] @@ -85,7 +85,7 @@ extern_methods!( #[method(setScriptErrorNumber:)] pub unsafe fn setScriptErrorNumber(&self, scriptErrorNumber: NSInteger); - #[method_id(scriptErrorOffendingObjectDescriptor)] + #[method_id(@__retain_semantics Other scriptErrorOffendingObjectDescriptor)] pub unsafe fn scriptErrorOffendingObjectDescriptor( &self, ) -> Option>; @@ -96,7 +96,7 @@ extern_methods!( scriptErrorOffendingObjectDescriptor: Option<&NSAppleEventDescriptor>, ); - #[method_id(scriptErrorExpectedTypeDescriptor)] + #[method_id(@__retain_semantics Other scriptErrorExpectedTypeDescriptor)] pub unsafe fn scriptErrorExpectedTypeDescriptor( &self, ) -> Option>; @@ -107,16 +107,16 @@ extern_methods!( scriptErrorExpectedTypeDescriptor: Option<&NSAppleEventDescriptor>, ); - #[method_id(scriptErrorString)] + #[method_id(@__retain_semantics Other scriptErrorString)] pub unsafe fn scriptErrorString(&self) -> Option>; #[method(setScriptErrorString:)] pub unsafe fn setScriptErrorString(&self, scriptErrorString: Option<&NSString>); - #[method_id(currentCommand)] + #[method_id(@__retain_semantics Other currentCommand)] pub unsafe fn currentCommand() -> Option>; - #[method_id(appleEvent)] + #[method_id(@__retain_semantics Other appleEvent)] pub unsafe fn appleEvent(&self) -> Option>; #[method(suspendExecution)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index 0a4efb610..ebdfbbbc5 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -14,10 +14,10 @@ extern_class!( extern_methods!( unsafe impl NSScriptCommandDescription { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithSuiteName:commandName:dictionary:)] + #[method_id(@__retain_semantics Init initWithSuiteName:commandName:dictionary:)] pub unsafe fn initWithSuiteName_commandName_dictionary( this: Option>, suiteName: &NSString, @@ -25,16 +25,16 @@ extern_methods!( commandDeclaration: Option<&NSDictionary>, ) -> Option>; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, ) -> Option>; - #[method_id(suiteName)] + #[method_id(@__retain_semantics Other suiteName)] pub unsafe fn suiteName(&self) -> Id; - #[method_id(commandName)] + #[method_id(@__retain_semantics Other commandName)] pub unsafe fn commandName(&self) -> Id; #[method(appleEventClassCode)] @@ -43,19 +43,19 @@ extern_methods!( #[method(appleEventCode)] pub unsafe fn appleEventCode(&self) -> FourCharCode; - #[method_id(commandClassName)] + #[method_id(@__retain_semantics Other commandClassName)] pub unsafe fn commandClassName(&self) -> Id; - #[method_id(returnType)] + #[method_id(@__retain_semantics Other returnType)] pub unsafe fn returnType(&self) -> Option>; #[method(appleEventCodeForReturnType)] pub unsafe fn appleEventCodeForReturnType(&self) -> FourCharCode; - #[method_id(argumentNames)] + #[method_id(@__retain_semantics Other argumentNames)] pub unsafe fn argumentNames(&self) -> Id, Shared>; - #[method_id(typeForArgumentWithName:)] + #[method_id(@__retain_semantics Other typeForArgumentWithName:)] pub unsafe fn typeForArgumentWithName( &self, argumentName: &NSString, @@ -70,10 +70,10 @@ extern_methods!( #[method(isOptionalArgumentWithName:)] pub unsafe fn isOptionalArgumentWithName(&self, argumentName: &NSString) -> bool; - #[method_id(createCommandInstance)] + #[method_id(@__retain_semantics Other createCommandInstance)] pub unsafe fn createCommandInstance(&self) -> Id; - #[method_id(createCommandInstanceWithZone:)] + #[method_id(@__retain_semantics Other createCommandInstanceWithZone:)] pub unsafe fn createCommandInstanceWithZone( &self, zone: *mut NSZone, diff --git a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs index fe83c31ec..07d055c8d 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptExecutionContext.rs @@ -14,22 +14,22 @@ extern_class!( extern_methods!( unsafe impl NSScriptExecutionContext { - #[method_id(sharedScriptExecutionContext)] + #[method_id(@__retain_semantics Other sharedScriptExecutionContext)] pub unsafe fn sharedScriptExecutionContext() -> Id; - #[method_id(topLevelObject)] + #[method_id(@__retain_semantics Other topLevelObject)] pub unsafe fn topLevelObject(&self) -> Option>; #[method(setTopLevelObject:)] pub unsafe fn setTopLevelObject(&self, topLevelObject: Option<&Object>); - #[method_id(objectBeingTested)] + #[method_id(@__retain_semantics Other objectBeingTested)] pub unsafe fn objectBeingTested(&self) -> Option>; #[method(setObjectBeingTested:)] pub unsafe fn setObjectBeingTested(&self, objectBeingTested: Option<&Object>); - #[method_id(rangeContainerObject)] + #[method_id(@__retain_semantics Other rangeContainerObject)] pub unsafe fn rangeContainerObject(&self) -> Option>; #[method(setRangeContainerObject:)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index e965234c3..6546ff98d 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -10,21 +10,21 @@ extern "C" { extern_methods!( /// NSScriptKeyValueCoding unsafe impl NSObject { - #[method_id(valueAtIndex:inPropertyWithKey:)] + #[method_id(@__retain_semantics Other valueAtIndex:inPropertyWithKey:)] pub unsafe fn valueAtIndex_inPropertyWithKey( &self, index: NSUInteger, key: &NSString, ) -> Option>; - #[method_id(valueWithName:inPropertyWithKey:)] + #[method_id(@__retain_semantics Other valueWithName:inPropertyWithKey:)] pub unsafe fn valueWithName_inPropertyWithKey( &self, name: &NSString, key: &NSString, ) -> Option>; - #[method_id(valueWithUniqueID:inPropertyWithKey:)] + #[method_id(@__retain_semantics Other valueWithUniqueID:inPropertyWithKey:)] pub unsafe fn valueWithUniqueID_inPropertyWithKey( &self, uniqueID: &Object, @@ -57,7 +57,7 @@ extern_methods!( #[method(insertValue:inPropertyWithKey:)] pub unsafe fn insertValue_inPropertyWithKey(&self, value: &Object, key: &NSString); - #[method_id(coerceValue:forKey:)] + #[method_id(@__retain_semantics Other coerceValue:forKey:)] pub unsafe fn coerceValue_forKey( &self, value: Option<&Object>, diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index bc50f86e7..f1eefcc64 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -40,19 +40,19 @@ extern_class!( extern_methods!( unsafe impl NSScriptObjectSpecifier { - #[method_id(objectSpecifierWithDescriptor:)] + #[method_id(@__retain_semantics Other objectSpecifierWithDescriptor:)] pub unsafe fn objectSpecifierWithDescriptor( descriptor: &NSAppleEventDescriptor, ) -> Option>; - #[method_id(initWithContainerSpecifier:key:)] + #[method_id(@__retain_semantics Init initWithContainerSpecifier:key:)] pub unsafe fn initWithContainerSpecifier_key( this: Option>, container: &NSScriptObjectSpecifier, property: &NSString, ) -> Id; - #[method_id(initWithContainerClassDescription:containerSpecifier:key:)] + #[method_id(@__retain_semantics Init initWithContainerClassDescription:containerSpecifier:key:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key( this: Option>, classDesc: &NSScriptClassDescription, @@ -60,19 +60,19 @@ extern_methods!( property: &NSString, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, ) -> Option>; - #[method_id(childSpecifier)] + #[method_id(@__retain_semantics Other childSpecifier)] pub unsafe fn childSpecifier(&self) -> Option>; #[method(setChildSpecifier:)] pub unsafe fn setChildSpecifier(&self, childSpecifier: Option<&NSScriptObjectSpecifier>); - #[method_id(containerSpecifier)] + #[method_id(@__retain_semantics Other containerSpecifier)] pub unsafe fn containerSpecifier(&self) -> Option>; #[method(setContainerSpecifier:)] @@ -96,13 +96,13 @@ extern_methods!( containerIsRangeContainerObject: bool, ); - #[method_id(key)] + #[method_id(@__retain_semantics Other key)] pub unsafe fn key(&self) -> Id; #[method(setKey:)] pub unsafe fn setKey(&self, key: &NSString); - #[method_id(containerClassDescription)] + #[method_id(@__retain_semantics Other containerClassDescription)] pub unsafe fn containerClassDescription( &self, ) -> Option>; @@ -113,7 +113,7 @@ extern_methods!( containerClassDescription: Option<&NSScriptClassDescription>, ); - #[method_id(keyClassDescription)] + #[method_id(@__retain_semantics Other keyClassDescription)] pub unsafe fn keyClassDescription(&self) -> Option>; #[method(indicesOfObjectsByEvaluatingWithContainer:count:)] @@ -123,13 +123,13 @@ extern_methods!( count: NonNull, ) -> *mut NSInteger; - #[method_id(objectsByEvaluatingWithContainers:)] + #[method_id(@__retain_semantics Other objectsByEvaluatingWithContainers:)] pub unsafe fn objectsByEvaluatingWithContainers( &self, containers: &Object, ) -> Option>; - #[method_id(objectsByEvaluatingSpecifier)] + #[method_id(@__retain_semantics Other objectsByEvaluatingSpecifier)] pub unsafe fn objectsByEvaluatingSpecifier(&self) -> Option>; #[method(evaluationErrorNumber)] @@ -138,12 +138,12 @@ extern_methods!( #[method(setEvaluationErrorNumber:)] pub unsafe fn setEvaluationErrorNumber(&self, evaluationErrorNumber: NSInteger); - #[method_id(evaluationErrorSpecifier)] + #[method_id(@__retain_semantics Other evaluationErrorSpecifier)] pub unsafe fn evaluationErrorSpecifier( &self, ) -> Option>; - #[method_id(descriptor)] + #[method_id(@__retain_semantics Other descriptor)] pub unsafe fn descriptor(&self) -> Option>; } ); @@ -151,10 +151,10 @@ extern_methods!( extern_methods!( /// NSScriptObjectSpecifiers unsafe impl NSObject { - #[method_id(objectSpecifier)] + #[method_id(@__retain_semantics Other objectSpecifier)] pub unsafe fn objectSpecifier(&self) -> Option>; - #[method_id(indicesOfObjectsByEvaluatingObjectSpecifier:)] + #[method_id(@__retain_semantics Other indicesOfObjectsByEvaluatingObjectSpecifier:)] pub unsafe fn indicesOfObjectsByEvaluatingObjectSpecifier( &self, specifier: &NSScriptObjectSpecifier, @@ -173,7 +173,7 @@ extern_class!( extern_methods!( unsafe impl NSIndexSpecifier { - #[method_id(initWithContainerClassDescription:containerSpecifier:key:index:)] + #[method_id(@__retain_semantics Init initWithContainerClassDescription:containerSpecifier:key:index:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_index( this: Option>, classDesc: &NSScriptClassDescription, @@ -214,13 +214,13 @@ extern_class!( extern_methods!( unsafe impl NSNameSpecifier { - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, ) -> Option>; - #[method_id(initWithContainerClassDescription:containerSpecifier:key:name:)] + #[method_id(@__retain_semantics Init initWithContainerClassDescription:containerSpecifier:key:name:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_name( this: Option>, classDesc: &NSScriptClassDescription, @@ -229,7 +229,7 @@ extern_methods!( name: &NSString, ) -> Id; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; #[method(setName:)] @@ -248,7 +248,7 @@ extern_class!( extern_methods!( unsafe impl NSPositionalSpecifier { - #[method_id(initWithPosition:objectSpecifier:)] + #[method_id(@__retain_semantics Init initWithPosition:objectSpecifier:)] pub unsafe fn initWithPosition_objectSpecifier( this: Option>, position: NSInsertionPosition, @@ -258,7 +258,7 @@ extern_methods!( #[method(position)] pub unsafe fn position(&self) -> NSInsertionPosition; - #[method_id(objectSpecifier)] + #[method_id(@__retain_semantics Other objectSpecifier)] pub unsafe fn objectSpecifier(&self) -> Id; #[method(setInsertionClassDescription:)] @@ -270,10 +270,10 @@ extern_methods!( #[method(evaluate)] pub unsafe fn evaluate(&self); - #[method_id(insertionContainer)] + #[method_id(@__retain_semantics Other insertionContainer)] pub unsafe fn insertionContainer(&self) -> Option>; - #[method_id(insertionKey)] + #[method_id(@__retain_semantics Other insertionKey)] pub unsafe fn insertionKey(&self) -> Option>; #[method(insertionIndex)] @@ -321,13 +321,13 @@ extern_class!( extern_methods!( unsafe impl NSRangeSpecifier { - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, ) -> Option>; - #[method_id(initWithContainerClassDescription:containerSpecifier:key:startSpecifier:endSpecifier:)] + #[method_id(@__retain_semantics Init initWithContainerClassDescription:containerSpecifier:key:startSpecifier:endSpecifier:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_startSpecifier_endSpecifier( this: Option>, classDesc: &NSScriptClassDescription, @@ -337,13 +337,13 @@ extern_methods!( endSpec: Option<&NSScriptObjectSpecifier>, ) -> Id; - #[method_id(startSpecifier)] + #[method_id(@__retain_semantics Other startSpecifier)] pub unsafe fn startSpecifier(&self) -> Option>; #[method(setStartSpecifier:)] pub unsafe fn setStartSpecifier(&self, startSpecifier: Option<&NSScriptObjectSpecifier>); - #[method_id(endSpecifier)] + #[method_id(@__retain_semantics Other endSpecifier)] pub unsafe fn endSpecifier(&self) -> Option>; #[method(setEndSpecifier:)] @@ -362,13 +362,13 @@ extern_class!( extern_methods!( unsafe impl NSRelativeSpecifier { - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, ) -> Option>; - #[method_id(initWithContainerClassDescription:containerSpecifier:key:relativePosition:baseSpecifier:)] + #[method_id(@__retain_semantics Init initWithContainerClassDescription:containerSpecifier:key:relativePosition:baseSpecifier:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_relativePosition_baseSpecifier( this: Option>, classDesc: &NSScriptClassDescription, @@ -384,7 +384,7 @@ extern_methods!( #[method(setRelativePosition:)] pub unsafe fn setRelativePosition(&self, relativePosition: NSRelativePosition); - #[method_id(baseSpecifier)] + #[method_id(@__retain_semantics Other baseSpecifier)] pub unsafe fn baseSpecifier(&self) -> Option>; #[method(setBaseSpecifier:)] @@ -403,13 +403,13 @@ extern_class!( extern_methods!( unsafe impl NSUniqueIDSpecifier { - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, ) -> Option>; - #[method_id(initWithContainerClassDescription:containerSpecifier:key:uniqueID:)] + #[method_id(@__retain_semantics Init initWithContainerClassDescription:containerSpecifier:key:uniqueID:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_uniqueID( this: Option>, classDesc: &NSScriptClassDescription, @@ -418,7 +418,7 @@ extern_methods!( uniqueID: &Object, ) -> Id; - #[method_id(uniqueID)] + #[method_id(@__retain_semantics Other uniqueID)] pub unsafe fn uniqueID(&self) -> Id; #[method(setUniqueID:)] @@ -437,13 +437,13 @@ extern_class!( extern_methods!( unsafe impl NSWhoseSpecifier { - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, ) -> Option>; - #[method_id(initWithContainerClassDescription:containerSpecifier:key:test:)] + #[method_id(@__retain_semantics Init initWithContainerClassDescription:containerSpecifier:key:test:)] pub unsafe fn initWithContainerClassDescription_containerSpecifier_key_test( this: Option>, classDesc: &NSScriptClassDescription, @@ -452,7 +452,7 @@ extern_methods!( test: &NSScriptWhoseTest, ) -> Id; - #[method_id(test)] + #[method_id(@__retain_semantics Other test)] pub unsafe fn test(&self) -> Id; #[method(setTest:)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index 0c1448a73..e833d7757 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -22,7 +22,7 @@ extern_methods!( #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); - #[method_id(keySpecifier)] + #[method_id(@__retain_semantics Other keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; } ); @@ -67,10 +67,10 @@ extern_class!( extern_methods!( unsafe impl NSCreateCommand { - #[method_id(createClassDescription)] + #[method_id(@__retain_semantics Other createClassDescription)] pub unsafe fn createClassDescription(&self) -> Id; - #[method_id(resolvedKeyDictionary)] + #[method_id(@__retain_semantics Other resolvedKeyDictionary)] pub unsafe fn resolvedKeyDictionary(&self) -> Id, Shared>; } ); @@ -89,7 +89,7 @@ extern_methods!( #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); - #[method_id(keySpecifier)] + #[method_id(@__retain_semantics Other keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; } ); @@ -134,7 +134,7 @@ extern_methods!( #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); - #[method_id(keySpecifier)] + #[method_id(@__retain_semantics Other keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; } ); @@ -169,7 +169,7 @@ extern_methods!( #[method(setReceiversSpecifier:)] pub unsafe fn setReceiversSpecifier(&self, receiversRef: Option<&NSScriptObjectSpecifier>); - #[method_id(keySpecifier)] + #[method_id(@__retain_semantics Other keySpecifier)] pub unsafe fn keySpecifier(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs index 6547435ee..0b5012a5d 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptSuiteRegistry.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSScriptSuiteRegistry { - #[method_id(sharedScriptSuiteRegistry)] + #[method_id(@__retain_semantics Other sharedScriptSuiteRegistry)] pub unsafe fn sharedScriptSuiteRegistry() -> Id; #[method(setSharedScriptSuiteRegistry:)] @@ -39,47 +39,47 @@ extern_methods!( commandDescription: &NSScriptCommandDescription, ); - #[method_id(suiteNames)] + #[method_id(@__retain_semantics Other suiteNames)] pub unsafe fn suiteNames(&self) -> Id, Shared>; #[method(appleEventCodeForSuite:)] pub unsafe fn appleEventCodeForSuite(&self, suiteName: &NSString) -> FourCharCode; - #[method_id(bundleForSuite:)] + #[method_id(@__retain_semantics Other bundleForSuite:)] pub unsafe fn bundleForSuite(&self, suiteName: &NSString) -> Option>; - #[method_id(classDescriptionsInSuite:)] + #[method_id(@__retain_semantics Other classDescriptionsInSuite:)] pub unsafe fn classDescriptionsInSuite( &self, suiteName: &NSString, ) -> Option, Shared>>; - #[method_id(commandDescriptionsInSuite:)] + #[method_id(@__retain_semantics Other commandDescriptionsInSuite:)] pub unsafe fn commandDescriptionsInSuite( &self, suiteName: &NSString, ) -> Option, Shared>>; - #[method_id(suiteForAppleEventCode:)] + #[method_id(@__retain_semantics Other suiteForAppleEventCode:)] pub unsafe fn suiteForAppleEventCode( &self, appleEventCode: FourCharCode, ) -> Option>; - #[method_id(classDescriptionWithAppleEventCode:)] + #[method_id(@__retain_semantics Other classDescriptionWithAppleEventCode:)] pub unsafe fn classDescriptionWithAppleEventCode( &self, appleEventCode: FourCharCode, ) -> Option>; - #[method_id(commandDescriptionWithAppleEventClass:andAppleEventCode:)] + #[method_id(@__retain_semantics Other commandDescriptionWithAppleEventClass:andAppleEventCode:)] pub unsafe fn commandDescriptionWithAppleEventClass_andAppleEventCode( &self, appleEventClassCode: FourCharCode, appleEventIDCode: FourCharCode, ) -> Option>; - #[method_id(aeteResource:)] + #[method_id(@__retain_semantics Other aeteResource:)] pub unsafe fn aeteResource(&self, languageName: &NSString) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index 1ee995e4d..3904a1eba 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -27,10 +27,10 @@ extern_methods!( #[method(isTrue)] pub unsafe fn isTrue(&self) -> bool; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, @@ -49,19 +49,19 @@ extern_class!( extern_methods!( unsafe impl NSLogicalTest { - #[method_id(initAndTestWithTests:)] + #[method_id(@__retain_semantics Init initAndTestWithTests:)] pub unsafe fn initAndTestWithTests( this: Option>, subTests: &NSArray, ) -> Id; - #[method_id(initOrTestWithTests:)] + #[method_id(@__retain_semantics Init initOrTestWithTests:)] pub unsafe fn initOrTestWithTests( this: Option>, subTests: &NSArray, ) -> Id; - #[method_id(initNotTestWithTest:)] + #[method_id(@__retain_semantics Init initNotTestWithTest:)] pub unsafe fn initNotTestWithTest( this: Option>, subTest: &NSScriptWhoseTest, @@ -80,16 +80,16 @@ extern_class!( extern_methods!( unsafe impl NSSpecifierTest { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, inCoder: &NSCoder, ) -> Option>; - #[method_id(initWithObjectSpecifier:comparisonOperator:testObject:)] + #[method_id(@__retain_semantics Init initWithObjectSpecifier:comparisonOperator:testObject:)] pub unsafe fn initWithObjectSpecifier_comparisonOperator_testObject( this: Option>, obj1: Option<&NSScriptObjectSpecifier>, diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index e1db699fc..00365e622 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -19,23 +19,23 @@ extern_methods!( #[method(count)] pub unsafe fn count(&self) -> NSUInteger; - #[method_id(member:)] + #[method_id(@__retain_semantics Other member:)] pub unsafe fn member(&self, object: &ObjectType) -> Option>; - #[method_id(objectEnumerator)] + #[method_id(@__retain_semantics Other objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithObjects:count:)] + #[method_id(@__retain_semantics Init initWithObjects:count:)] pub unsafe fn initWithObjects_count( this: Option>, objects: TodoArray, cnt: NSUInteger, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -46,19 +46,19 @@ extern_methods!( extern_methods!( /// NSExtendedSet unsafe impl NSSet { - #[method_id(allObjects)] + #[method_id(@__retain_semantics Other allObjects)] pub unsafe fn allObjects(&self) -> Id, Shared>; - #[method_id(anyObject)] + #[method_id(@__retain_semantics Other anyObject)] pub unsafe fn anyObject(&self) -> Option>; #[method(containsObject:)] pub unsafe fn containsObject(&self, anObject: &ObjectType) -> bool; - #[method_id(description)] + #[method_id(@__retain_semantics Other description)] pub unsafe fn description(&self) -> Id; - #[method_id(descriptionWithLocale:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; @@ -81,19 +81,19 @@ extern_methods!( argument: Option<&Object>, ); - #[method_id(setByAddingObject:)] + #[method_id(@__retain_semantics Other setByAddingObject:)] pub unsafe fn setByAddingObject( &self, anObject: &ObjectType, ) -> Id, Shared>; - #[method_id(setByAddingObjectsFromSet:)] + #[method_id(@__retain_semantics Other setByAddingObjectsFromSet:)] pub unsafe fn setByAddingObjectsFromSet( &self, other: &NSSet, ) -> Id, Shared>; - #[method_id(setByAddingObjectsFromArray:)] + #[method_id(@__retain_semantics Other setByAddingObjectsFromArray:)] pub unsafe fn setByAddingObjectsFromArray( &self, other: &NSArray, @@ -109,13 +109,13 @@ extern_methods!( block: TodoBlock, ); - #[method_id(objectsPassingTest:)] + #[method_id(@__retain_semantics Other objectsPassingTest:)] pub unsafe fn objectsPassingTest( &self, predicate: TodoBlock, ) -> Id, Shared>; - #[method_id(objectsWithOptions:passingTest:)] + #[method_id(@__retain_semantics Other objectsWithOptions:passingTest:)] pub unsafe fn objectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, @@ -127,36 +127,36 @@ extern_methods!( extern_methods!( /// NSSetCreation unsafe impl NSSet { - #[method_id(set)] + #[method_id(@__retain_semantics Other set)] pub unsafe fn set() -> Id; - #[method_id(setWithObject:)] + #[method_id(@__retain_semantics Other setWithObject:)] pub unsafe fn setWithObject(object: &ObjectType) -> Id; - #[method_id(setWithObjects:count:)] + #[method_id(@__retain_semantics Other setWithObjects:count:)] pub unsafe fn setWithObjects_count(objects: TodoArray, cnt: NSUInteger) -> Id; - #[method_id(setWithSet:)] + #[method_id(@__retain_semantics Other setWithSet:)] pub unsafe fn setWithSet(set: &NSSet) -> Id; - #[method_id(setWithArray:)] + #[method_id(@__retain_semantics Other setWithArray:)] pub unsafe fn setWithArray(array: &NSArray) -> Id; - #[method_id(initWithSet:)] + #[method_id(@__retain_semantics Init initWithSet:)] pub unsafe fn initWithSet( this: Option>, set: &NSSet, ) -> Id; - #[method_id(initWithSet:copyItems:)] + #[method_id(@__retain_semantics Init initWithSet:copyItems:)] pub unsafe fn initWithSet_copyItems( this: Option>, set: &NSSet, flag: bool, ) -> Id; - #[method_id(initWithArray:)] + #[method_id(@__retain_semantics Init initWithArray:)] pub unsafe fn initWithArray( this: Option>, array: &NSArray, @@ -183,16 +183,16 @@ extern_methods!( #[method(removeObject:)] pub unsafe fn removeObject(&self, object: &ObjectType); - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCapacity:)] + #[method_id(@__retain_semantics Init initWithCapacity:)] pub unsafe fn initWithCapacity( this: Option>, numItems: NSUInteger, @@ -226,7 +226,7 @@ extern_methods!( extern_methods!( /// NSMutableSetCreation unsafe impl NSMutableSet { - #[method_id(setWithCapacity:)] + #[method_id(@__retain_semantics Other setWithCapacity:)] pub unsafe fn setWithCapacity(numItems: NSUInteger) -> Id; } ); @@ -244,19 +244,19 @@ __inner_extern_class!( extern_methods!( unsafe impl NSCountedSet { - #[method_id(initWithCapacity:)] + #[method_id(@__retain_semantics Init initWithCapacity:)] pub unsafe fn initWithCapacity( this: Option>, numItems: NSUInteger, ) -> Id; - #[method_id(initWithArray:)] + #[method_id(@__retain_semantics Init initWithArray:)] pub unsafe fn initWithArray( this: Option>, array: &NSArray, ) -> Id; - #[method_id(initWithSet:)] + #[method_id(@__retain_semantics Init initWithSet:)] pub unsafe fn initWithSet( this: Option>, set: &NSSet, @@ -265,7 +265,7 @@ extern_methods!( #[method(countForObject:)] pub unsafe fn countForObject(&self, object: &ObjectType) -> NSUInteger; - #[method_id(objectEnumerator)] + #[method_id(@__retain_semantics Other objectEnumerator)] pub unsafe fn objectEnumerator(&self) -> Id, Shared>; #[method(addObject:)] diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index 26c897d82..43df6acee 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -14,27 +14,27 @@ extern_class!( extern_methods!( unsafe impl NSSortDescriptor { - #[method_id(sortDescriptorWithKey:ascending:)] + #[method_id(@__retain_semantics Other sortDescriptorWithKey:ascending:)] pub unsafe fn sortDescriptorWithKey_ascending( key: Option<&NSString>, ascending: bool, ) -> Id; - #[method_id(sortDescriptorWithKey:ascending:selector:)] + #[method_id(@__retain_semantics Other sortDescriptorWithKey:ascending:selector:)] pub unsafe fn sortDescriptorWithKey_ascending_selector( key: Option<&NSString>, ascending: bool, selector: Option, ) -> Id; - #[method_id(initWithKey:ascending:)] + #[method_id(@__retain_semantics Init initWithKey:ascending:)] pub unsafe fn initWithKey_ascending( this: Option>, key: Option<&NSString>, ascending: bool, ) -> Id; - #[method_id(initWithKey:ascending:selector:)] + #[method_id(@__retain_semantics Init initWithKey:ascending:selector:)] pub unsafe fn initWithKey_ascending_selector( this: Option>, key: Option<&NSString>, @@ -42,13 +42,13 @@ extern_methods!( selector: Option, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(key)] + #[method_id(@__retain_semantics Other key)] pub unsafe fn key(&self) -> Option>; #[method(ascending)] @@ -60,14 +60,14 @@ extern_methods!( #[method(allowEvaluation)] pub unsafe fn allowEvaluation(&self); - #[method_id(sortDescriptorWithKey:ascending:comparator:)] + #[method_id(@__retain_semantics Other sortDescriptorWithKey:ascending:comparator:)] pub unsafe fn sortDescriptorWithKey_ascending_comparator( key: Option<&NSString>, ascending: bool, cmptr: NSComparator, ) -> Id; - #[method_id(initWithKey:ascending:comparator:)] + #[method_id(@__retain_semantics Init initWithKey:ascending:comparator:)] pub unsafe fn initWithKey_ascending_comparator( this: Option>, key: Option<&NSString>, @@ -85,7 +85,7 @@ extern_methods!( object2: &Object, ) -> NSComparisonResult; - #[method_id(reversedSortDescriptor)] + #[method_id(@__retain_semantics Other reversedSortDescriptor)] pub unsafe fn reversedSortDescriptor(&self) -> Id; } ); @@ -93,7 +93,7 @@ extern_methods!( extern_methods!( /// NSSortDescriptorSorting unsafe impl NSSet { - #[method_id(sortedArrayUsingDescriptors:)] + #[method_id(@__retain_semantics Other sortedArrayUsingDescriptors:)] pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: &NSArray, @@ -104,7 +104,7 @@ extern_methods!( extern_methods!( /// NSSortDescriptorSorting unsafe impl NSArray { - #[method_id(sortedArrayUsingDescriptors:)] + #[method_id(@__retain_semantics Other sortedArrayUsingDescriptors:)] pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: &NSArray, @@ -123,7 +123,7 @@ extern_methods!( extern_methods!( /// NSKeyValueSorting unsafe impl NSOrderedSet { - #[method_id(sortedArrayUsingDescriptors:)] + #[method_id(@__retain_semantics Other sortedArrayUsingDescriptors:)] pub unsafe fn sortedArrayUsingDescriptors( &self, sortDescriptors: &NSArray, diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 187da21cb..257898c02 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSSpellServer { - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 8fecb1ea3..e2a3d28b9 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -40,13 +40,13 @@ extern_methods!( #[method(close)] pub unsafe fn close(&self); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSStreamDelegate>); - #[method_id(propertyForKey:)] + #[method_id(@__retain_semantics Other propertyForKey:)] pub unsafe fn propertyForKey( &self, key: &NSStreamPropertyKey, @@ -68,7 +68,7 @@ extern_methods!( #[method(streamStatus)] pub unsafe fn streamStatus(&self) -> NSStreamStatus; - #[method_id(streamError)] + #[method_id(@__retain_semantics Other streamError)] pub unsafe fn streamError(&self) -> Option>; } ); @@ -97,13 +97,13 @@ extern_methods!( #[method(hasBytesAvailable)] pub unsafe fn hasBytesAvailable(&self) -> bool; - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, data: &NSData, ) -> Id; - #[method_id(initWithURL:)] + #[method_id(@__retain_semantics Init initWithURL:)] pub unsafe fn initWithURL( this: Option>, url: &NSURL, @@ -128,17 +128,17 @@ extern_methods!( #[method(hasSpaceAvailable)] pub unsafe fn hasSpaceAvailable(&self) -> bool; - #[method_id(initToMemory)] + #[method_id(@__retain_semantics Init initToMemory)] pub unsafe fn initToMemory(this: Option>) -> Id; - #[method_id(initToBuffer:capacity:)] + #[method_id(@__retain_semantics Init initToBuffer:capacity:)] pub unsafe fn initToBuffer_capacity( this: Option>, buffer: NonNull, capacity: NSUInteger, ) -> Id; - #[method_id(initWithURL:append:)] + #[method_id(@__retain_semantics Init initWithURL:append:)] pub unsafe fn initWithURL_append( this: Option>, url: &NSURL, @@ -183,19 +183,19 @@ extern_methods!( extern_methods!( /// NSInputStreamExtensions unsafe impl NSInputStream { - #[method_id(initWithFileAtPath:)] + #[method_id(@__retain_semantics Init initWithFileAtPath:)] pub unsafe fn initWithFileAtPath( this: Option>, path: &NSString, ) -> Option>; - #[method_id(inputStreamWithData:)] + #[method_id(@__retain_semantics Other inputStreamWithData:)] pub unsafe fn inputStreamWithData(data: &NSData) -> Option>; - #[method_id(inputStreamWithFileAtPath:)] + #[method_id(@__retain_semantics Other inputStreamWithFileAtPath:)] pub unsafe fn inputStreamWithFileAtPath(path: &NSString) -> Option>; - #[method_id(inputStreamWithURL:)] + #[method_id(@__retain_semantics Other inputStreamWithURL:)] pub unsafe fn inputStreamWithURL(url: &NSURL) -> Option>; } ); @@ -203,29 +203,29 @@ extern_methods!( extern_methods!( /// NSOutputStreamExtensions unsafe impl NSOutputStream { - #[method_id(initToFileAtPath:append:)] + #[method_id(@__retain_semantics Init initToFileAtPath:append:)] pub unsafe fn initToFileAtPath_append( this: Option>, path: &NSString, shouldAppend: bool, ) -> Option>; - #[method_id(outputStreamToMemory)] + #[method_id(@__retain_semantics Other outputStreamToMemory)] pub unsafe fn outputStreamToMemory() -> Id; - #[method_id(outputStreamToBuffer:capacity:)] + #[method_id(@__retain_semantics Other outputStreamToBuffer:capacity:)] pub unsafe fn outputStreamToBuffer_capacity( buffer: NonNull, capacity: NSUInteger, ) -> Id; - #[method_id(outputStreamToFileAtPath:append:)] + #[method_id(@__retain_semantics Other outputStreamToFileAtPath:append:)] pub unsafe fn outputStreamToFileAtPath_append( path: &NSString, shouldAppend: bool, ) -> Id; - #[method_id(outputStreamWithURL:append:)] + #[method_id(@__retain_semantics Other outputStreamWithURL:append:)] pub unsafe fn outputStreamWithURL_append( url: &NSURL, shouldAppend: bool, diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 24af6d3f4..c63a8f9ec 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -61,10 +61,10 @@ extern_methods!( #[method(characterAtIndex:)] pub unsafe fn characterAtIndex(&self, index: NSUInteger) -> unichar; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -153,13 +153,13 @@ extern "C" { extern_methods!( /// NSStringExtensionMethods unsafe impl NSString { - #[method_id(substringFromIndex:)] + #[method_id(@__retain_semantics Other substringFromIndex:)] pub unsafe fn substringFromIndex(&self, from: NSUInteger) -> Id; - #[method_id(substringToIndex:)] + #[method_id(@__retain_semantics Other substringToIndex:)] pub unsafe fn substringToIndex(&self, to: NSUInteger) -> Id; - #[method_id(substringWithRange:)] + #[method_id(@__retain_semantics Other substringWithRange:)] pub unsafe fn substringWithRange(&self, range: NSRange) -> Id; #[method(getCharacters:range:)] @@ -216,7 +216,7 @@ extern_methods!( #[method(hasSuffix:)] pub unsafe fn hasSuffix(&self, str: &NSString) -> bool; - #[method_id(commonPrefixWithString:options:)] + #[method_id(@__retain_semantics Other commonPrefixWithString:options:)] pub unsafe fn commonPrefixWithString_options( &self, str: &NSString, @@ -286,7 +286,7 @@ extern_methods!( #[method(rangeOfComposedCharacterSequencesForRange:)] pub unsafe fn rangeOfComposedCharacterSequencesForRange(&self, range: NSRange) -> NSRange; - #[method_id(stringByAppendingString:)] + #[method_id(@__retain_semantics Other stringByAppendingString:)] pub fn stringByAppendingString(&self, aString: &NSString) -> Id; #[method(doubleValue)] @@ -307,37 +307,37 @@ extern_methods!( #[method(boolValue)] pub unsafe fn boolValue(&self) -> bool; - #[method_id(uppercaseString)] + #[method_id(@__retain_semantics Other uppercaseString)] pub unsafe fn uppercaseString(&self) -> Id; - #[method_id(lowercaseString)] + #[method_id(@__retain_semantics Other lowercaseString)] pub unsafe fn lowercaseString(&self) -> Id; - #[method_id(capitalizedString)] + #[method_id(@__retain_semantics Other capitalizedString)] pub unsafe fn capitalizedString(&self) -> Id; - #[method_id(localizedUppercaseString)] + #[method_id(@__retain_semantics Other localizedUppercaseString)] pub unsafe fn localizedUppercaseString(&self) -> Id; - #[method_id(localizedLowercaseString)] + #[method_id(@__retain_semantics Other localizedLowercaseString)] pub unsafe fn localizedLowercaseString(&self) -> Id; - #[method_id(localizedCapitalizedString)] + #[method_id(@__retain_semantics Other localizedCapitalizedString)] pub unsafe fn localizedCapitalizedString(&self) -> Id; - #[method_id(uppercaseStringWithLocale:)] + #[method_id(@__retain_semantics Other uppercaseStringWithLocale:)] pub unsafe fn uppercaseStringWithLocale( &self, locale: Option<&NSLocale>, ) -> Id; - #[method_id(lowercaseStringWithLocale:)] + #[method_id(@__retain_semantics Other lowercaseStringWithLocale:)] pub unsafe fn lowercaseStringWithLocale( &self, locale: Option<&NSLocale>, ) -> Id; - #[method_id(capitalizedStringWithLocale:)] + #[method_id(@__retain_semantics Other capitalizedStringWithLocale:)] pub unsafe fn capitalizedStringWithLocale( &self, locale: Option<&NSLocale>, @@ -387,14 +387,14 @@ extern_methods!( #[method(smallestEncoding)] pub unsafe fn smallestEncoding(&self) -> NSStringEncoding; - #[method_id(dataUsingEncoding:allowLossyConversion:)] + #[method_id(@__retain_semantics Other dataUsingEncoding:allowLossyConversion:)] pub unsafe fn dataUsingEncoding_allowLossyConversion( &self, encoding: NSStringEncoding, lossy: bool, ) -> Option>; - #[method_id(dataUsingEncoding:)] + #[method_id(@__retain_semantics Other dataUsingEncoding:)] pub unsafe fn dataUsingEncoding( &self, encoding: NSStringEncoding, @@ -436,7 +436,7 @@ extern_methods!( #[method(availableStringEncodings)] pub unsafe fn availableStringEncodings() -> NonNull; - #[method_id(localizedNameOfStringEncoding:)] + #[method_id(@__retain_semantics Other localizedNameOfStringEncoding:)] pub unsafe fn localizedNameOfStringEncoding( encoding: NSStringEncoding, ) -> Id; @@ -444,37 +444,37 @@ extern_methods!( #[method(defaultCStringEncoding)] pub unsafe fn defaultCStringEncoding() -> NSStringEncoding; - #[method_id(decomposedStringWithCanonicalMapping)] + #[method_id(@__retain_semantics Other decomposedStringWithCanonicalMapping)] pub unsafe fn decomposedStringWithCanonicalMapping(&self) -> Id; - #[method_id(precomposedStringWithCanonicalMapping)] + #[method_id(@__retain_semantics Other precomposedStringWithCanonicalMapping)] pub unsafe fn precomposedStringWithCanonicalMapping(&self) -> Id; - #[method_id(decomposedStringWithCompatibilityMapping)] + #[method_id(@__retain_semantics Other decomposedStringWithCompatibilityMapping)] pub unsafe fn decomposedStringWithCompatibilityMapping(&self) -> Id; - #[method_id(precomposedStringWithCompatibilityMapping)] + #[method_id(@__retain_semantics Other precomposedStringWithCompatibilityMapping)] pub unsafe fn precomposedStringWithCompatibilityMapping(&self) -> Id; - #[method_id(componentsSeparatedByString:)] + #[method_id(@__retain_semantics Other componentsSeparatedByString:)] pub unsafe fn componentsSeparatedByString( &self, separator: &NSString, ) -> Id, Shared>; - #[method_id(componentsSeparatedByCharactersInSet:)] + #[method_id(@__retain_semantics Other componentsSeparatedByCharactersInSet:)] pub unsafe fn componentsSeparatedByCharactersInSet( &self, separator: &NSCharacterSet, ) -> Id, Shared>; - #[method_id(stringByTrimmingCharactersInSet:)] + #[method_id(@__retain_semantics Other stringByTrimmingCharactersInSet:)] pub unsafe fn stringByTrimmingCharactersInSet( &self, set: &NSCharacterSet, ) -> Id; - #[method_id(stringByPaddingToLength:withString:startingAtIndex:)] + #[method_id(@__retain_semantics Other stringByPaddingToLength:withString:startingAtIndex:)] pub unsafe fn stringByPaddingToLength_withString_startingAtIndex( &self, newLength: NSUInteger, @@ -482,14 +482,14 @@ extern_methods!( padIndex: NSUInteger, ) -> Id; - #[method_id(stringByFoldingWithOptions:locale:)] + #[method_id(@__retain_semantics Other stringByFoldingWithOptions:locale:)] pub unsafe fn stringByFoldingWithOptions_locale( &self, options: NSStringCompareOptions, locale: Option<&NSLocale>, ) -> Id; - #[method_id(stringByReplacingOccurrencesOfString:withString:options:range:)] + #[method_id(@__retain_semantics Other stringByReplacingOccurrencesOfString:withString:options:range:)] pub unsafe fn stringByReplacingOccurrencesOfString_withString_options_range( &self, target: &NSString, @@ -498,21 +498,21 @@ extern_methods!( searchRange: NSRange, ) -> Id; - #[method_id(stringByReplacingOccurrencesOfString:withString:)] + #[method_id(@__retain_semantics Other stringByReplacingOccurrencesOfString:withString:)] pub unsafe fn stringByReplacingOccurrencesOfString_withString( &self, target: &NSString, replacement: &NSString, ) -> Id; - #[method_id(stringByReplacingCharactersInRange:withString:)] + #[method_id(@__retain_semantics Other stringByReplacingCharactersInRange:withString:)] pub unsafe fn stringByReplacingCharactersInRange_withString( &self, range: NSRange, replacement: &NSString, ) -> Id; - #[method_id(stringByApplyingTransform:reverse:)] + #[method_id(@__retain_semantics Other stringByApplyingTransform:reverse:)] pub unsafe fn stringByApplyingTransform_reverse( &self, transform: &NSStringTransform, @@ -535,13 +535,13 @@ extern_methods!( enc: NSStringEncoding, ) -> Result<(), Id>; - #[method_id(description)] + #[method_id(@__retain_semantics Other description)] pub unsafe fn description(&self) -> Id; #[method(hash)] pub unsafe fn hash(&self) -> NSUInteger; - #[method_id(initWithCharactersNoCopy:length:freeWhenDone:)] + #[method_id(@__retain_semantics Init initWithCharactersNoCopy:length:freeWhenDone:)] pub unsafe fn initWithCharactersNoCopy_length_freeWhenDone( this: Option>, characters: NonNull, @@ -549,7 +549,7 @@ extern_methods!( freeBuffer: bool, ) -> Id; - #[method_id(initWithCharactersNoCopy:length:deallocator:)] + #[method_id(@__retain_semantics Init initWithCharactersNoCopy:length:deallocator:)] pub unsafe fn initWithCharactersNoCopy_length_deallocator( this: Option>, chars: NonNull, @@ -557,33 +557,33 @@ extern_methods!( deallocator: TodoBlock, ) -> Id; - #[method_id(initWithCharacters:length:)] + #[method_id(@__retain_semantics Init initWithCharacters:length:)] pub unsafe fn initWithCharacters_length( this: Option>, characters: NonNull, length: NSUInteger, ) -> Id; - #[method_id(initWithUTF8String:)] + #[method_id(@__retain_semantics Init initWithUTF8String:)] pub unsafe fn initWithUTF8String( this: Option>, nullTerminatedCString: NonNull, ) -> Option>; - #[method_id(initWithString:)] + #[method_id(@__retain_semantics Init initWithString:)] pub unsafe fn initWithString( this: Option>, aString: &NSString, ) -> Id; - #[method_id(initWithFormat:arguments:)] + #[method_id(@__retain_semantics Init initWithFormat:arguments:)] pub unsafe fn initWithFormat_arguments( this: Option>, format: &NSString, argList: va_list, ) -> Id; - #[method_id(initWithFormat:locale:arguments:)] + #[method_id(@__retain_semantics Init initWithFormat:locale:arguments:)] pub unsafe fn initWithFormat_locale_arguments( this: Option>, format: &NSString, @@ -591,14 +591,14 @@ extern_methods!( argList: va_list, ) -> Id; - #[method_id(initWithData:encoding:)] + #[method_id(@__retain_semantics Init initWithData:encoding:)] pub unsafe fn initWithData_encoding( this: Option>, data: &NSData, encoding: NSStringEncoding, ) -> Option>; - #[method_id(initWithBytes:length:encoding:)] + #[method_id(@__retain_semantics Init initWithBytes:length:encoding:)] pub unsafe fn initWithBytes_length_encoding( this: Option>, bytes: NonNull, @@ -606,7 +606,7 @@ extern_methods!( encoding: NSStringEncoding, ) -> Option>; - #[method_id(initWithBytesNoCopy:length:encoding:freeWhenDone:)] + #[method_id(@__retain_semantics Init initWithBytesNoCopy:length:encoding:freeWhenDone:)] pub unsafe fn initWithBytesNoCopy_length_encoding_freeWhenDone( this: Option>, bytes: NonNull, @@ -615,7 +615,7 @@ extern_methods!( freeBuffer: bool, ) -> Option>; - #[method_id(initWithBytesNoCopy:length:encoding:deallocator:)] + #[method_id(@__retain_semantics Init initWithBytesNoCopy:length:encoding:deallocator:)] pub unsafe fn initWithBytesNoCopy_length_encoding_deallocator( this: Option>, bytes: NonNull, @@ -624,83 +624,83 @@ extern_methods!( deallocator: TodoBlock, ) -> Option>; - #[method_id(string)] + #[method_id(@__retain_semantics Other string)] pub unsafe fn string() -> Id; - #[method_id(stringWithString:)] + #[method_id(@__retain_semantics Other stringWithString:)] pub unsafe fn stringWithString(string: &NSString) -> Id; - #[method_id(stringWithCharacters:length:)] + #[method_id(@__retain_semantics Other stringWithCharacters:length:)] pub unsafe fn stringWithCharacters_length( characters: NonNull, length: NSUInteger, ) -> Id; - #[method_id(stringWithUTF8String:)] + #[method_id(@__retain_semantics Other stringWithUTF8String:)] pub unsafe fn stringWithUTF8String( nullTerminatedCString: NonNull, ) -> Option>; - #[method_id(initWithCString:encoding:)] + #[method_id(@__retain_semantics Init initWithCString:encoding:)] pub unsafe fn initWithCString_encoding( this: Option>, nullTerminatedCString: NonNull, encoding: NSStringEncoding, ) -> Option>; - #[method_id(stringWithCString:encoding:)] + #[method_id(@__retain_semantics Other stringWithCString:encoding:)] pub unsafe fn stringWithCString_encoding( cString: NonNull, enc: NSStringEncoding, ) -> Option>; - #[method_id(initWithContentsOfURL:encoding:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:encoding:error:)] pub unsafe fn initWithContentsOfURL_encoding_error( this: Option>, url: &NSURL, enc: NSStringEncoding, ) -> Result, Id>; - #[method_id(initWithContentsOfFile:encoding:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:encoding:error:)] pub unsafe fn initWithContentsOfFile_encoding_error( this: Option>, path: &NSString, enc: NSStringEncoding, ) -> Result, Id>; - #[method_id(stringWithContentsOfURL:encoding:error:)] + #[method_id(@__retain_semantics Other stringWithContentsOfURL:encoding:error:)] pub unsafe fn stringWithContentsOfURL_encoding_error( url: &NSURL, enc: NSStringEncoding, ) -> Result, Id>; - #[method_id(stringWithContentsOfFile:encoding:error:)] + #[method_id(@__retain_semantics Other stringWithContentsOfFile:encoding:error:)] pub unsafe fn stringWithContentsOfFile_encoding_error( path: &NSString, enc: NSStringEncoding, ) -> Result, Id>; - #[method_id(initWithContentsOfURL:usedEncoding:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:usedEncoding:error:)] pub unsafe fn initWithContentsOfURL_usedEncoding_error( this: Option>, url: &NSURL, enc: *mut NSStringEncoding, ) -> Result, Id>; - #[method_id(initWithContentsOfFile:usedEncoding:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:usedEncoding:error:)] pub unsafe fn initWithContentsOfFile_usedEncoding_error( this: Option>, path: &NSString, enc: *mut NSStringEncoding, ) -> Result, Id>; - #[method_id(stringWithContentsOfURL:usedEncoding:error:)] + #[method_id(@__retain_semantics Other stringWithContentsOfURL:usedEncoding:error:)] pub unsafe fn stringWithContentsOfURL_usedEncoding_error( url: &NSURL, enc: *mut NSStringEncoding, ) -> Result, Id>; - #[method_id(stringWithContentsOfFile:usedEncoding:error:)] + #[method_id(@__retain_semantics Other stringWithContentsOfFile:usedEncoding:error:)] pub unsafe fn stringWithContentsOfFile_usedEncoding_error( path: &NSString, enc: *mut NSStringEncoding, @@ -815,13 +815,13 @@ extern_methods!( resultingRange: NSRangePointer, ) -> bool; - #[method_id(initWithCapacity:)] + #[method_id(@__retain_semantics Init initWithCapacity:)] pub unsafe fn initWithCapacity( this: Option>, capacity: NSUInteger, ) -> Id; - #[method_id(stringWithCapacity:)] + #[method_id(@__retain_semantics Other stringWithCapacity:)] pub unsafe fn stringWithCapacity(capacity: NSUInteger) -> Id; } ); @@ -837,10 +837,10 @@ extern "C" { extern_methods!( /// NSExtendedStringPropertyListParsing unsafe impl NSString { - #[method_id(propertyList)] + #[method_id(@__retain_semantics Other propertyList)] pub unsafe fn propertyList(&self) -> Id; - #[method_id(propertyListFromStringsFileFormat)] + #[method_id(@__retain_semantics Other propertyListFromStringsFileFormat)] pub unsafe fn propertyListFromStringsFileFormat(&self) -> Option>; } ); @@ -882,25 +882,25 @@ extern_methods!( #[method(writeToURL:atomically:)] pub unsafe fn writeToURL_atomically(&self, url: &NSURL, atomically: bool) -> bool; - #[method_id(initWithContentsOfFile:)] + #[method_id(@__retain_semantics Init initWithContentsOfFile:)] pub unsafe fn initWithContentsOfFile( this: Option>, path: &NSString, ) -> Option>; - #[method_id(initWithContentsOfURL:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, url: &NSURL, ) -> Option>; - #[method_id(stringWithContentsOfFile:)] + #[method_id(@__retain_semantics Other stringWithContentsOfFile:)] pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option>; - #[method_id(stringWithContentsOfURL:)] + #[method_id(@__retain_semantics Other stringWithContentsOfURL:)] pub unsafe fn stringWithContentsOfURL(url: &NSURL) -> Option>; - #[method_id(initWithCStringNoCopy:length:freeWhenDone:)] + #[method_id(@__retain_semantics Init initWithCStringNoCopy:length:freeWhenDone:)] pub unsafe fn initWithCStringNoCopy_length_freeWhenDone( this: Option>, bytes: NonNull, @@ -908,26 +908,26 @@ extern_methods!( freeBuffer: bool, ) -> Option>; - #[method_id(initWithCString:length:)] + #[method_id(@__retain_semantics Init initWithCString:length:)] pub unsafe fn initWithCString_length( this: Option>, bytes: NonNull, length: NSUInteger, ) -> Option>; - #[method_id(initWithCString:)] + #[method_id(@__retain_semantics Init initWithCString:)] pub unsafe fn initWithCString( this: Option>, bytes: NonNull, ) -> Option>; - #[method_id(stringWithCString:length:)] + #[method_id(@__retain_semantics Other stringWithCString:length:)] pub unsafe fn stringWithCString_length( bytes: NonNull, length: NSUInteger, ) -> Option>; - #[method_id(stringWithCString:)] + #[method_id(@__retain_semantics Other stringWithCString:)] pub unsafe fn stringWithCString(bytes: NonNull) -> Option>; #[method(getCharacters:)] diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 16dd41991..a63857a4f 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -18,46 +18,46 @@ extern_class!( extern_methods!( unsafe impl NSTask { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(executableURL)] + #[method_id(@__retain_semantics Other executableURL)] pub unsafe fn executableURL(&self) -> Option>; #[method(setExecutableURL:)] pub unsafe fn setExecutableURL(&self, executableURL: Option<&NSURL>); - #[method_id(arguments)] + #[method_id(@__retain_semantics Other arguments)] pub unsafe fn arguments(&self) -> Option, Shared>>; #[method(setArguments:)] pub unsafe fn setArguments(&self, arguments: Option<&NSArray>); - #[method_id(environment)] + #[method_id(@__retain_semantics Other environment)] pub unsafe fn environment(&self) -> Option, Shared>>; #[method(setEnvironment:)] pub unsafe fn setEnvironment(&self, environment: Option<&NSDictionary>); - #[method_id(currentDirectoryURL)] + #[method_id(@__retain_semantics Other currentDirectoryURL)] pub unsafe fn currentDirectoryURL(&self) -> Option>; #[method(setCurrentDirectoryURL:)] pub unsafe fn setCurrentDirectoryURL(&self, currentDirectoryURL: Option<&NSURL>); - #[method_id(standardInput)] + #[method_id(@__retain_semantics Other standardInput)] pub unsafe fn standardInput(&self) -> Option>; #[method(setStandardInput:)] pub unsafe fn setStandardInput(&self, standardInput: Option<&Object>); - #[method_id(standardOutput)] + #[method_id(@__retain_semantics Other standardOutput)] pub unsafe fn standardOutput(&self) -> Option>; #[method(setStandardOutput:)] pub unsafe fn setStandardOutput(&self, standardOutput: Option<&Object>); - #[method_id(standardError)] + #[method_id(@__retain_semantics Other standardError)] pub unsafe fn standardError(&self) -> Option>; #[method(setStandardError:)] @@ -107,7 +107,7 @@ extern_methods!( extern_methods!( /// NSTaskConveniences unsafe impl NSTask { - #[method_id(launchedTaskWithExecutableURL:arguments:error:terminationHandler:)] + #[method_id(@__retain_semantics Other launchedTaskWithExecutableURL:arguments:error:terminationHandler:)] pub unsafe fn launchedTaskWithExecutableURL_arguments_error_terminationHandler( url: &NSURL, arguments: &NSArray, @@ -123,13 +123,13 @@ extern_methods!( extern_methods!( /// NSDeprecated unsafe impl NSTask { - #[method_id(launchPath)] + #[method_id(@__retain_semantics Other launchPath)] pub unsafe fn launchPath(&self) -> Option>; #[method(setLaunchPath:)] pub unsafe fn setLaunchPath(&self, launchPath: Option<&NSString>); - #[method_id(currentDirectoryPath)] + #[method_id(@__retain_semantics Other currentDirectoryPath)] pub unsafe fn currentDirectoryPath(&self) -> Id; #[method(setCurrentDirectoryPath:)] @@ -138,7 +138,7 @@ extern_methods!( #[method(launch)] pub unsafe fn launch(&self); - #[method_id(launchedTaskWithLaunchPath:arguments:)] + #[method_id(@__retain_semantics Other launchedTaskWithLaunchPath:arguments:)] pub unsafe fn launchedTaskWithLaunchPath_arguments( path: &NSString, arguments: &NSArray, diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 79baf5347..7a6a72c36 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -48,41 +48,41 @@ extern_methods!( extern_methods!( /// NSTextCheckingResultOptional unsafe impl NSTextCheckingResult { - #[method_id(orthography)] + #[method_id(@__retain_semantics Other orthography)] pub unsafe fn orthography(&self) -> Option>; - #[method_id(grammarDetails)] + #[method_id(@__retain_semantics Other grammarDetails)] pub unsafe fn grammarDetails( &self, ) -> Option>, Shared>>; - #[method_id(date)] + #[method_id(@__retain_semantics Other date)] pub unsafe fn date(&self) -> Option>; - #[method_id(timeZone)] + #[method_id(@__retain_semantics Other timeZone)] pub unsafe fn timeZone(&self) -> Option>; #[method(duration)] pub unsafe fn duration(&self) -> NSTimeInterval; - #[method_id(components)] + #[method_id(@__retain_semantics Other components)] pub unsafe fn components( &self, ) -> Option, Shared>>; - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; - #[method_id(replacementString)] + #[method_id(@__retain_semantics Other replacementString)] pub unsafe fn replacementString(&self) -> Option>; - #[method_id(alternativeStrings)] + #[method_id(@__retain_semantics Other alternativeStrings)] pub unsafe fn alternativeStrings(&self) -> Option, Shared>>; - #[method_id(regularExpression)] + #[method_id(@__retain_semantics Other regularExpression)] pub unsafe fn regularExpression(&self) -> Option>; - #[method_id(phoneNumber)] + #[method_id(@__retain_semantics Other phoneNumber)] pub unsafe fn phoneNumber(&self) -> Option>; #[method(numberOfRanges)] @@ -94,13 +94,13 @@ extern_methods!( #[method(rangeWithName:)] pub unsafe fn rangeWithName(&self, name: &NSString) -> NSRange; - #[method_id(resultByAdjustingRangesWithOffset:)] + #[method_id(@__retain_semantics Other resultByAdjustingRangesWithOffset:)] pub unsafe fn resultByAdjustingRangesWithOffset( &self, offset: NSInteger, ) -> Id; - #[method_id(addressComponents)] + #[method_id(@__retain_semantics Other addressComponents)] pub unsafe fn addressComponents( &self, ) -> Option, Shared>>; @@ -154,30 +154,30 @@ extern "C" { extern_methods!( /// NSTextCheckingResultCreation unsafe impl NSTextCheckingResult { - #[method_id(orthographyCheckingResultWithRange:orthography:)] + #[method_id(@__retain_semantics Other orthographyCheckingResultWithRange:orthography:)] pub unsafe fn orthographyCheckingResultWithRange_orthography( range: NSRange, orthography: &NSOrthography, ) -> Id; - #[method_id(spellCheckingResultWithRange:)] + #[method_id(@__retain_semantics Other spellCheckingResultWithRange:)] pub unsafe fn spellCheckingResultWithRange( range: NSRange, ) -> Id; - #[method_id(grammarCheckingResultWithRange:details:)] + #[method_id(@__retain_semantics Other grammarCheckingResultWithRange:details:)] pub unsafe fn grammarCheckingResultWithRange_details( range: NSRange, details: &NSArray>, ) -> Id; - #[method_id(dateCheckingResultWithRange:date:)] + #[method_id(@__retain_semantics Other dateCheckingResultWithRange:date:)] pub unsafe fn dateCheckingResultWithRange_date( range: NSRange, date: &NSDate, ) -> Id; - #[method_id(dateCheckingResultWithRange:date:timeZone:duration:)] + #[method_id(@__retain_semantics Other dateCheckingResultWithRange:date:timeZone:duration:)] pub unsafe fn dateCheckingResultWithRange_date_timeZone_duration( range: NSRange, date: &NSDate, @@ -185,63 +185,63 @@ extern_methods!( duration: NSTimeInterval, ) -> Id; - #[method_id(addressCheckingResultWithRange:components:)] + #[method_id(@__retain_semantics Other addressCheckingResultWithRange:components:)] pub unsafe fn addressCheckingResultWithRange_components( range: NSRange, components: &NSDictionary, ) -> Id; - #[method_id(linkCheckingResultWithRange:URL:)] + #[method_id(@__retain_semantics Other linkCheckingResultWithRange:URL:)] pub unsafe fn linkCheckingResultWithRange_URL( range: NSRange, url: &NSURL, ) -> Id; - #[method_id(quoteCheckingResultWithRange:replacementString:)] + #[method_id(@__retain_semantics Other quoteCheckingResultWithRange:replacementString:)] pub unsafe fn quoteCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; - #[method_id(dashCheckingResultWithRange:replacementString:)] + #[method_id(@__retain_semantics Other dashCheckingResultWithRange:replacementString:)] pub unsafe fn dashCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; - #[method_id(replacementCheckingResultWithRange:replacementString:)] + #[method_id(@__retain_semantics Other replacementCheckingResultWithRange:replacementString:)] pub unsafe fn replacementCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; - #[method_id(correctionCheckingResultWithRange:replacementString:)] + #[method_id(@__retain_semantics Other correctionCheckingResultWithRange:replacementString:)] pub unsafe fn correctionCheckingResultWithRange_replacementString( range: NSRange, replacementString: &NSString, ) -> Id; - #[method_id(correctionCheckingResultWithRange:replacementString:alternativeStrings:)] + #[method_id(@__retain_semantics Other correctionCheckingResultWithRange:replacementString:alternativeStrings:)] pub unsafe fn correctionCheckingResultWithRange_replacementString_alternativeStrings( range: NSRange, replacementString: &NSString, alternativeStrings: &NSArray, ) -> Id; - #[method_id(regularExpressionCheckingResultWithRanges:count:regularExpression:)] + #[method_id(@__retain_semantics Other regularExpressionCheckingResultWithRanges:count:regularExpression:)] pub unsafe fn regularExpressionCheckingResultWithRanges_count_regularExpression( ranges: NSRangePointer, count: NSUInteger, regularExpression: &NSRegularExpression, ) -> Id; - #[method_id(phoneNumberCheckingResultWithRange:phoneNumber:)] + #[method_id(@__retain_semantics Other phoneNumberCheckingResultWithRange:phoneNumber:)] pub unsafe fn phoneNumberCheckingResultWithRange_phoneNumber( range: NSRange, phoneNumber: &NSString, ) -> Id; - #[method_id(transitInformationCheckingResultWithRange:components:)] + #[method_id(@__retain_semantics Other transitInformationCheckingResultWithRange:components:)] pub unsafe fn transitInformationCheckingResultWithRange_components( range: NSRange, components: &NSDictionary, diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index dfa47f5f3..062ffa326 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSThread { - #[method_id(currentThread)] + #[method_id(@__retain_semantics Other currentThread)] pub unsafe fn currentThread() -> Id; #[method(detachNewThreadWithBlock:)] @@ -30,7 +30,7 @@ extern_methods!( #[method(isMultiThreaded)] pub unsafe fn isMultiThreaded() -> bool; - #[method_id(threadDictionary)] + #[method_id(@__retain_semantics Other threadDictionary)] pub unsafe fn threadDictionary(&self) -> Id; #[method(sleepUntilDate:)] @@ -54,13 +54,13 @@ extern_methods!( #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); - #[method_id(callStackReturnAddresses)] + #[method_id(@__retain_semantics Other callStackReturnAddresses)] pub unsafe fn callStackReturnAddresses() -> Id, Shared>; - #[method_id(callStackSymbols)] + #[method_id(@__retain_semantics Other callStackSymbols)] pub unsafe fn callStackSymbols() -> Id, Shared>; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[method(setName:)] @@ -72,13 +72,13 @@ extern_methods!( #[method(setStackSize:)] pub unsafe fn setStackSize(&self, stackSize: NSUInteger); - #[method_id(mainThread)] + #[method_id(@__retain_semantics Other mainThread)] pub unsafe fn mainThread() -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithTarget:selector:object:)] + #[method_id(@__retain_semantics Init initWithTarget:selector:object:)] pub unsafe fn initWithTarget_selector_object( this: Option>, target: &Object, @@ -86,7 +86,7 @@ extern_methods!( argument: Option<&Object>, ) -> Id; - #[method_id(initWithBlock:)] + #[method_id(@__retain_semantics Init initWithBlock:)] pub unsafe fn initWithBlock( this: Option>, block: TodoBlock, diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 831a6e67f..459d41044 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -14,16 +14,16 @@ extern_class!( extern_methods!( unsafe impl NSTimeZone { - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; - #[method_id(data)] + #[method_id(@__retain_semantics Other data)] pub unsafe fn data(&self) -> Id; #[method(secondsFromGMTForDate:)] pub unsafe fn secondsFromGMTForDate(&self, aDate: &NSDate) -> NSInteger; - #[method_id(abbreviationForDate:)] + #[method_id(@__retain_semantics Other abbreviationForDate:)] pub unsafe fn abbreviationForDate(&self, aDate: &NSDate) -> Option>; #[method(isDaylightSavingTimeForDate:)] @@ -32,7 +32,7 @@ extern_methods!( #[method(daylightSavingTimeOffsetForDate:)] pub unsafe fn daylightSavingTimeOffsetForDate(&self, aDate: &NSDate) -> NSTimeInterval; - #[method_id(nextDaylightSavingTimeTransitionAfterDate:)] + #[method_id(@__retain_semantics Other nextDaylightSavingTimeTransitionAfterDate:)] pub unsafe fn nextDaylightSavingTimeTransitionAfterDate( &self, aDate: &NSDate, @@ -51,25 +51,25 @@ pub const NSTimeZoneNameStyleShortGeneric: NSTimeZoneNameStyle = 5; extern_methods!( /// NSExtendedTimeZone unsafe impl NSTimeZone { - #[method_id(systemTimeZone)] + #[method_id(@__retain_semantics Other systemTimeZone)] pub unsafe fn systemTimeZone() -> Id; #[method(resetSystemTimeZone)] pub unsafe fn resetSystemTimeZone(); - #[method_id(defaultTimeZone)] + #[method_id(@__retain_semantics Other defaultTimeZone)] pub unsafe fn defaultTimeZone() -> Id; #[method(setDefaultTimeZone:)] pub unsafe fn setDefaultTimeZone(defaultTimeZone: &NSTimeZone); - #[method_id(localTimeZone)] + #[method_id(@__retain_semantics Other localTimeZone)] pub unsafe fn localTimeZone() -> Id; - #[method_id(knownTimeZoneNames)] + #[method_id(@__retain_semantics Other knownTimeZoneNames)] pub unsafe fn knownTimeZoneNames() -> Id, Shared>; - #[method_id(abbreviationDictionary)] + #[method_id(@__retain_semantics Other abbreviationDictionary)] pub unsafe fn abbreviationDictionary() -> Id, Shared>; #[method(setAbbreviationDictionary:)] @@ -77,13 +77,13 @@ extern_methods!( abbreviationDictionary: &NSDictionary, ); - #[method_id(timeZoneDataVersion)] + #[method_id(@__retain_semantics Other timeZoneDataVersion)] pub unsafe fn timeZoneDataVersion() -> Id; #[method(secondsFromGMT)] pub unsafe fn secondsFromGMT(&self) -> NSInteger; - #[method_id(abbreviation)] + #[method_id(@__retain_semantics Other abbreviation)] pub unsafe fn abbreviation(&self) -> Option>; #[method(isDaylightSavingTime)] @@ -92,16 +92,16 @@ extern_methods!( #[method(daylightSavingTimeOffset)] pub unsafe fn daylightSavingTimeOffset(&self) -> NSTimeInterval; - #[method_id(nextDaylightSavingTimeTransition)] + #[method_id(@__retain_semantics Other nextDaylightSavingTimeTransition)] pub unsafe fn nextDaylightSavingTimeTransition(&self) -> Option>; - #[method_id(description)] + #[method_id(@__retain_semantics Other description)] pub unsafe fn description(&self) -> Id; #[method(isEqualToTimeZone:)] pub unsafe fn isEqualToTimeZone(&self, aTimeZone: &NSTimeZone) -> bool; - #[method_id(localizedName:locale:)] + #[method_id(@__retain_semantics Other localizedName:locale:)] pub unsafe fn localizedName_locale( &self, style: NSTimeZoneNameStyle, @@ -113,32 +113,32 @@ extern_methods!( extern_methods!( /// NSTimeZoneCreation unsafe impl NSTimeZone { - #[method_id(timeZoneWithName:)] + #[method_id(@__retain_semantics Other timeZoneWithName:)] pub unsafe fn timeZoneWithName(tzName: &NSString) -> Option>; - #[method_id(timeZoneWithName:data:)] + #[method_id(@__retain_semantics Other timeZoneWithName:data:)] pub unsafe fn timeZoneWithName_data( tzName: &NSString, aData: Option<&NSData>, ) -> Option>; - #[method_id(initWithName:)] + #[method_id(@__retain_semantics Init initWithName:)] pub unsafe fn initWithName( this: Option>, tzName: &NSString, ) -> Option>; - #[method_id(initWithName:data:)] + #[method_id(@__retain_semantics Init initWithName:data:)] pub unsafe fn initWithName_data( this: Option>, tzName: &NSString, aData: Option<&NSData>, ) -> Option>; - #[method_id(timeZoneForSecondsFromGMT:)] + #[method_id(@__retain_semantics Other timeZoneForSecondsFromGMT:)] pub unsafe fn timeZoneForSecondsFromGMT(seconds: NSInteger) -> Id; - #[method_id(timeZoneWithAbbreviation:)] + #[method_id(@__retain_semantics Other timeZoneWithAbbreviation:)] pub unsafe fn timeZoneWithAbbreviation(abbreviation: &NSString) -> Option>; } diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index b70c90ba5..24b938a0d 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -14,21 +14,21 @@ extern_class!( extern_methods!( unsafe impl NSTimer { - #[method_id(timerWithTimeInterval:invocation:repeats:)] + #[method_id(@__retain_semantics Other timerWithTimeInterval:invocation:repeats:)] pub unsafe fn timerWithTimeInterval_invocation_repeats( ti: NSTimeInterval, invocation: &NSInvocation, yesOrNo: bool, ) -> Id; - #[method_id(scheduledTimerWithTimeInterval:invocation:repeats:)] + #[method_id(@__retain_semantics Other scheduledTimerWithTimeInterval:invocation:repeats:)] pub unsafe fn scheduledTimerWithTimeInterval_invocation_repeats( ti: NSTimeInterval, invocation: &NSInvocation, yesOrNo: bool, ) -> Id; - #[method_id(timerWithTimeInterval:target:selector:userInfo:repeats:)] + #[method_id(@__retain_semantics Other timerWithTimeInterval:target:selector:userInfo:repeats:)] pub unsafe fn timerWithTimeInterval_target_selector_userInfo_repeats( ti: NSTimeInterval, aTarget: &Object, @@ -37,7 +37,7 @@ extern_methods!( yesOrNo: bool, ) -> Id; - #[method_id(scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:)] + #[method_id(@__retain_semantics Other scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:)] pub unsafe fn scheduledTimerWithTimeInterval_target_selector_userInfo_repeats( ti: NSTimeInterval, aTarget: &Object, @@ -46,21 +46,21 @@ extern_methods!( yesOrNo: bool, ) -> Id; - #[method_id(timerWithTimeInterval:repeats:block:)] + #[method_id(@__retain_semantics Other timerWithTimeInterval:repeats:block:)] pub unsafe fn timerWithTimeInterval_repeats_block( interval: NSTimeInterval, repeats: bool, block: TodoBlock, ) -> Id; - #[method_id(scheduledTimerWithTimeInterval:repeats:block:)] + #[method_id(@__retain_semantics Other scheduledTimerWithTimeInterval:repeats:block:)] pub unsafe fn scheduledTimerWithTimeInterval_repeats_block( interval: NSTimeInterval, repeats: bool, block: TodoBlock, ) -> Id; - #[method_id(initWithFireDate:interval:repeats:block:)] + #[method_id(@__retain_semantics Init initWithFireDate:interval:repeats:block:)] pub unsafe fn initWithFireDate_interval_repeats_block( this: Option>, date: &NSDate, @@ -69,7 +69,7 @@ extern_methods!( block: TodoBlock, ) -> Id; - #[method_id(initWithFireDate:interval:target:selector:userInfo:repeats:)] + #[method_id(@__retain_semantics Init initWithFireDate:interval:target:selector:userInfo:repeats:)] pub unsafe fn initWithFireDate_interval_target_selector_userInfo_repeats( this: Option>, date: &NSDate, @@ -83,7 +83,7 @@ extern_methods!( #[method(fire)] pub unsafe fn fire(&self); - #[method_id(fireDate)] + #[method_id(@__retain_semantics Other fireDate)] pub unsafe fn fireDate(&self) -> Id; #[method(setFireDate:)] @@ -104,7 +104,7 @@ extern_methods!( #[method(isValid)] pub unsafe fn isValid(&self) -> bool; - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index 92dcdacd1..3e0956712 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -617,7 +617,7 @@ extern_class!( extern_methods!( unsafe impl NSURL { - #[method_id(initWithScheme:host:path:)] + #[method_id(@__retain_semantics Init initWithScheme:host:path:)] pub unsafe fn initWithScheme_host_path( this: Option>, scheme: &NSString, @@ -625,7 +625,7 @@ extern_methods!( path: &NSString, ) -> Option>; - #[method_id(initFileURLWithPath:isDirectory:relativeToURL:)] + #[method_id(@__retain_semantics Init initFileURLWithPath:isDirectory:relativeToURL:)] pub unsafe fn initFileURLWithPath_isDirectory_relativeToURL( this: Option>, path: &NSString, @@ -633,49 +633,49 @@ extern_methods!( baseURL: Option<&NSURL>, ) -> Id; - #[method_id(initFileURLWithPath:relativeToURL:)] + #[method_id(@__retain_semantics Init initFileURLWithPath:relativeToURL:)] pub unsafe fn initFileURLWithPath_relativeToURL( this: Option>, path: &NSString, baseURL: Option<&NSURL>, ) -> Id; - #[method_id(initFileURLWithPath:isDirectory:)] + #[method_id(@__retain_semantics Init initFileURLWithPath:isDirectory:)] pub unsafe fn initFileURLWithPath_isDirectory( this: Option>, path: &NSString, isDir: bool, ) -> Id; - #[method_id(initFileURLWithPath:)] + #[method_id(@__retain_semantics Init initFileURLWithPath:)] pub unsafe fn initFileURLWithPath( this: Option>, path: &NSString, ) -> Id; - #[method_id(fileURLWithPath:isDirectory:relativeToURL:)] + #[method_id(@__retain_semantics Other fileURLWithPath:isDirectory:relativeToURL:)] pub unsafe fn fileURLWithPath_isDirectory_relativeToURL( path: &NSString, isDir: bool, baseURL: Option<&NSURL>, ) -> Id; - #[method_id(fileURLWithPath:relativeToURL:)] + #[method_id(@__retain_semantics Other fileURLWithPath:relativeToURL:)] pub unsafe fn fileURLWithPath_relativeToURL( path: &NSString, baseURL: Option<&NSURL>, ) -> Id; - #[method_id(fileURLWithPath:isDirectory:)] + #[method_id(@__retain_semantics Other fileURLWithPath:isDirectory:)] pub unsafe fn fileURLWithPath_isDirectory( path: &NSString, isDir: bool, ) -> Id; - #[method_id(fileURLWithPath:)] + #[method_id(@__retain_semantics Other fileURLWithPath:)] pub unsafe fn fileURLWithPath(path: &NSString) -> Id; - #[method_id(initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] + #[method_id(@__retain_semantics Init initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] pub unsafe fn initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL( this: Option>, path: NonNull, @@ -683,107 +683,107 @@ extern_methods!( baseURL: Option<&NSURL>, ) -> Id; - #[method_id(fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] + #[method_id(@__retain_semantics Other fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:)] pub unsafe fn fileURLWithFileSystemRepresentation_isDirectory_relativeToURL( path: NonNull, isDir: bool, baseURL: Option<&NSURL>, ) -> Id; - #[method_id(initWithString:)] + #[method_id(@__retain_semantics Init initWithString:)] pub unsafe fn initWithString( this: Option>, URLString: &NSString, ) -> Option>; - #[method_id(initWithString:relativeToURL:)] + #[method_id(@__retain_semantics Init initWithString:relativeToURL:)] pub unsafe fn initWithString_relativeToURL( this: Option>, URLString: &NSString, baseURL: Option<&NSURL>, ) -> Option>; - #[method_id(URLWithString:)] + #[method_id(@__retain_semantics Other URLWithString:)] pub unsafe fn URLWithString(URLString: &NSString) -> Option>; - #[method_id(URLWithString:relativeToURL:)] + #[method_id(@__retain_semantics Other URLWithString:relativeToURL:)] pub unsafe fn URLWithString_relativeToURL( URLString: &NSString, baseURL: Option<&NSURL>, ) -> Option>; - #[method_id(initWithDataRepresentation:relativeToURL:)] + #[method_id(@__retain_semantics Init initWithDataRepresentation:relativeToURL:)] pub unsafe fn initWithDataRepresentation_relativeToURL( this: Option>, data: &NSData, baseURL: Option<&NSURL>, ) -> Id; - #[method_id(URLWithDataRepresentation:relativeToURL:)] + #[method_id(@__retain_semantics Other URLWithDataRepresentation:relativeToURL:)] pub unsafe fn URLWithDataRepresentation_relativeToURL( data: &NSData, baseURL: Option<&NSURL>, ) -> Id; - #[method_id(initAbsoluteURLWithDataRepresentation:relativeToURL:)] + #[method_id(@__retain_semantics Init initAbsoluteURLWithDataRepresentation:relativeToURL:)] pub unsafe fn initAbsoluteURLWithDataRepresentation_relativeToURL( this: Option>, data: &NSData, baseURL: Option<&NSURL>, ) -> Id; - #[method_id(absoluteURLWithDataRepresentation:relativeToURL:)] + #[method_id(@__retain_semantics Other absoluteURLWithDataRepresentation:relativeToURL:)] pub unsafe fn absoluteURLWithDataRepresentation_relativeToURL( data: &NSData, baseURL: Option<&NSURL>, ) -> Id; - #[method_id(dataRepresentation)] + #[method_id(@__retain_semantics Other dataRepresentation)] pub unsafe fn dataRepresentation(&self) -> Id; - #[method_id(absoluteString)] + #[method_id(@__retain_semantics Other absoluteString)] pub unsafe fn absoluteString(&self) -> Option>; - #[method_id(relativeString)] + #[method_id(@__retain_semantics Other relativeString)] pub unsafe fn relativeString(&self) -> Id; - #[method_id(baseURL)] + #[method_id(@__retain_semantics Other baseURL)] pub unsafe fn baseURL(&self) -> Option>; - #[method_id(absoluteURL)] + #[method_id(@__retain_semantics Other absoluteURL)] pub unsafe fn absoluteURL(&self) -> Option>; - #[method_id(scheme)] + #[method_id(@__retain_semantics Other scheme)] pub unsafe fn scheme(&self) -> Option>; - #[method_id(resourceSpecifier)] + #[method_id(@__retain_semantics Other resourceSpecifier)] pub unsafe fn resourceSpecifier(&self) -> Option>; - #[method_id(host)] + #[method_id(@__retain_semantics Other host)] pub unsafe fn host(&self) -> Option>; - #[method_id(port)] + #[method_id(@__retain_semantics Other port)] pub unsafe fn port(&self) -> Option>; - #[method_id(user)] + #[method_id(@__retain_semantics Other user)] pub unsafe fn user(&self) -> Option>; - #[method_id(password)] + #[method_id(@__retain_semantics Other password)] pub unsafe fn password(&self) -> Option>; - #[method_id(path)] + #[method_id(@__retain_semantics Other path)] pub unsafe fn path(&self) -> Option>; - #[method_id(fragment)] + #[method_id(@__retain_semantics Other fragment)] pub unsafe fn fragment(&self) -> Option>; - #[method_id(parameterString)] + #[method_id(@__retain_semantics Other parameterString)] pub unsafe fn parameterString(&self) -> Option>; - #[method_id(query)] + #[method_id(@__retain_semantics Other query)] pub unsafe fn query(&self) -> Option>; - #[method_id(relativePath)] + #[method_id(@__retain_semantics Other relativePath)] pub unsafe fn relativePath(&self) -> Option>; #[method(hasDirectoryPath)] @@ -802,7 +802,7 @@ extern_methods!( #[method(isFileURL)] pub unsafe fn isFileURL(&self) -> bool; - #[method_id(standardizedURL)] + #[method_id(@__retain_semantics Other standardizedURL)] pub unsafe fn standardizedURL(&self) -> Option>; #[method(checkResourceIsReachableAndReturnError:)] @@ -813,10 +813,10 @@ extern_methods!( #[method(isFileReferenceURL)] pub unsafe fn isFileReferenceURL(&self) -> bool; - #[method_id(fileReferenceURL)] + #[method_id(@__retain_semantics Other fileReferenceURL)] pub unsafe fn fileReferenceURL(&self) -> Option>; - #[method_id(filePathURL)] + #[method_id(@__retain_semantics Other filePathURL)] pub unsafe fn filePathURL(&self) -> Option>; #[method(getResourceValue:forKey:error:)] @@ -826,7 +826,7 @@ extern_methods!( key: &NSURLResourceKey, ) -> Result<(), Id>; - #[method_id(resourceValuesForKeys:error:)] + #[method_id(@__retain_semantics Other resourceValuesForKeys:error:)] pub unsafe fn resourceValuesForKeys_error( &self, keys: &NSArray, @@ -858,7 +858,7 @@ extern_methods!( key: &NSURLResourceKey, ); - #[method_id(bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:)] + #[method_id(@__retain_semantics Other bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:)] pub unsafe fn bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error( &self, options: NSURLBookmarkCreationOptions, @@ -866,7 +866,7 @@ extern_methods!( relativeURL: Option<&NSURL>, ) -> Result, Id>; - #[method_id(initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] + #[method_id(@__retain_semantics Init initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] pub unsafe fn initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( this: Option>, bookmarkData: &NSData, @@ -875,7 +875,7 @@ extern_methods!( isStale: *mut bool, ) -> Result, Id>; - #[method_id(URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] + #[method_id(@__retain_semantics Other URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] pub unsafe fn URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error( bookmarkData: &NSData, options: NSURLBookmarkResolutionOptions, @@ -883,7 +883,7 @@ extern_methods!( isStale: *mut bool, ) -> Result, Id>; - #[method_id(resourceValuesForKeys:fromBookmarkData:)] + #[method_id(@__retain_semantics Other resourceValuesForKeys:fromBookmarkData:)] pub unsafe fn resourceValuesForKeys_fromBookmarkData( keys: &NSArray, bookmarkData: &NSData, @@ -896,12 +896,12 @@ extern_methods!( options: NSURLBookmarkFileCreationOptions, ) -> Result<(), Id>; - #[method_id(bookmarkDataWithContentsOfURL:error:)] + #[method_id(@__retain_semantics Other bookmarkDataWithContentsOfURL:error:)] pub unsafe fn bookmarkDataWithContentsOfURL_error( bookmarkFileURL: &NSURL, ) -> Result, Id>; - #[method_id(URLByResolvingAliasFileAtURL:options:error:)] + #[method_id(@__retain_semantics Other URLByResolvingAliasFileAtURL:options:error:)] pub unsafe fn URLByResolvingAliasFileAtURL_options_error( url: &NSURL, options: NSURLBookmarkResolutionOptions, @@ -925,7 +925,7 @@ extern_methods!( key: &NSURLResourceKey, ) -> Result<(), Id>; - #[method_id(promisedItemResourceValuesForKeys:error:)] + #[method_id(@__retain_semantics Other promisedItemResourceValuesForKeys:error:)] pub unsafe fn promisedItemResourceValuesForKeys_error( &self, keys: &NSArray, @@ -954,23 +954,23 @@ extern_class!( extern_methods!( unsafe impl NSURLQueryItem { - #[method_id(initWithName:value:)] + #[method_id(@__retain_semantics Init initWithName:value:)] pub unsafe fn initWithName_value( this: Option>, name: &NSString, value: Option<&NSString>, ) -> Id; - #[method_id(queryItemWithName:value:)] + #[method_id(@__retain_semantics Other queryItemWithName:value:)] pub unsafe fn queryItemWithName_value( name: &NSString, value: Option<&NSString>, ) -> Id; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Id; - #[method_id(value)] + #[method_id(@__retain_semantics Other value)] pub unsafe fn value(&self) -> Option>; } ); @@ -986,120 +986,120 @@ extern_class!( extern_methods!( unsafe impl NSURLComponents { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithURL:resolvingAgainstBaseURL:)] + #[method_id(@__retain_semantics Init initWithURL:resolvingAgainstBaseURL:)] pub unsafe fn initWithURL_resolvingAgainstBaseURL( this: Option>, url: &NSURL, resolve: bool, ) -> Option>; - #[method_id(componentsWithURL:resolvingAgainstBaseURL:)] + #[method_id(@__retain_semantics Other componentsWithURL:resolvingAgainstBaseURL:)] pub unsafe fn componentsWithURL_resolvingAgainstBaseURL( url: &NSURL, resolve: bool, ) -> Option>; - #[method_id(initWithString:)] + #[method_id(@__retain_semantics Init initWithString:)] pub unsafe fn initWithString( this: Option>, URLString: &NSString, ) -> Option>; - #[method_id(componentsWithString:)] + #[method_id(@__retain_semantics Other componentsWithString:)] pub unsafe fn componentsWithString(URLString: &NSString) -> Option>; - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; - #[method_id(URLRelativeToURL:)] + #[method_id(@__retain_semantics Other URLRelativeToURL:)] pub unsafe fn URLRelativeToURL(&self, baseURL: Option<&NSURL>) -> Option>; - #[method_id(string)] + #[method_id(@__retain_semantics Other string)] pub unsafe fn string(&self) -> Option>; - #[method_id(scheme)] + #[method_id(@__retain_semantics Other scheme)] pub unsafe fn scheme(&self) -> Option>; #[method(setScheme:)] pub unsafe fn setScheme(&self, scheme: Option<&NSString>); - #[method_id(user)] + #[method_id(@__retain_semantics Other user)] pub unsafe fn user(&self) -> Option>; #[method(setUser:)] pub unsafe fn setUser(&self, user: Option<&NSString>); - #[method_id(password)] + #[method_id(@__retain_semantics Other password)] pub unsafe fn password(&self) -> Option>; #[method(setPassword:)] pub unsafe fn setPassword(&self, password: Option<&NSString>); - #[method_id(host)] + #[method_id(@__retain_semantics Other host)] pub unsafe fn host(&self) -> Option>; #[method(setHost:)] pub unsafe fn setHost(&self, host: Option<&NSString>); - #[method_id(port)] + #[method_id(@__retain_semantics Other port)] pub unsafe fn port(&self) -> Option>; #[method(setPort:)] pub unsafe fn setPort(&self, port: Option<&NSNumber>); - #[method_id(path)] + #[method_id(@__retain_semantics Other path)] pub unsafe fn path(&self) -> Option>; #[method(setPath:)] pub unsafe fn setPath(&self, path: Option<&NSString>); - #[method_id(query)] + #[method_id(@__retain_semantics Other query)] pub unsafe fn query(&self) -> Option>; #[method(setQuery:)] pub unsafe fn setQuery(&self, query: Option<&NSString>); - #[method_id(fragment)] + #[method_id(@__retain_semantics Other fragment)] pub unsafe fn fragment(&self) -> Option>; #[method(setFragment:)] pub unsafe fn setFragment(&self, fragment: Option<&NSString>); - #[method_id(percentEncodedUser)] + #[method_id(@__retain_semantics Other percentEncodedUser)] pub unsafe fn percentEncodedUser(&self) -> Option>; #[method(setPercentEncodedUser:)] pub unsafe fn setPercentEncodedUser(&self, percentEncodedUser: Option<&NSString>); - #[method_id(percentEncodedPassword)] + #[method_id(@__retain_semantics Other percentEncodedPassword)] pub unsafe fn percentEncodedPassword(&self) -> Option>; #[method(setPercentEncodedPassword:)] pub unsafe fn setPercentEncodedPassword(&self, percentEncodedPassword: Option<&NSString>); - #[method_id(percentEncodedHost)] + #[method_id(@__retain_semantics Other percentEncodedHost)] pub unsafe fn percentEncodedHost(&self) -> Option>; #[method(setPercentEncodedHost:)] pub unsafe fn setPercentEncodedHost(&self, percentEncodedHost: Option<&NSString>); - #[method_id(percentEncodedPath)] + #[method_id(@__retain_semantics Other percentEncodedPath)] pub unsafe fn percentEncodedPath(&self) -> Option>; #[method(setPercentEncodedPath:)] pub unsafe fn setPercentEncodedPath(&self, percentEncodedPath: Option<&NSString>); - #[method_id(percentEncodedQuery)] + #[method_id(@__retain_semantics Other percentEncodedQuery)] pub unsafe fn percentEncodedQuery(&self) -> Option>; #[method(setPercentEncodedQuery:)] pub unsafe fn setPercentEncodedQuery(&self, percentEncodedQuery: Option<&NSString>); - #[method_id(percentEncodedFragment)] + #[method_id(@__retain_semantics Other percentEncodedFragment)] pub unsafe fn percentEncodedFragment(&self) -> Option>; #[method(setPercentEncodedFragment:)] @@ -1129,13 +1129,13 @@ extern_methods!( #[method(rangeOfFragment)] pub unsafe fn rangeOfFragment(&self) -> NSRange; - #[method_id(queryItems)] + #[method_id(@__retain_semantics Other queryItems)] pub unsafe fn queryItems(&self) -> Option, Shared>>; #[method(setQueryItems:)] pub unsafe fn setQueryItems(&self, queryItems: Option<&NSArray>); - #[method_id(percentEncodedQueryItems)] + #[method_id(@__retain_semantics Other percentEncodedQueryItems)] pub unsafe fn percentEncodedQueryItems( &self, ) -> Option, Shared>>; @@ -1151,22 +1151,22 @@ extern_methods!( extern_methods!( /// NSURLUtilities unsafe impl NSCharacterSet { - #[method_id(URLUserAllowedCharacterSet)] + #[method_id(@__retain_semantics Other URLUserAllowedCharacterSet)] pub unsafe fn URLUserAllowedCharacterSet() -> Id; - #[method_id(URLPasswordAllowedCharacterSet)] + #[method_id(@__retain_semantics Other URLPasswordAllowedCharacterSet)] pub unsafe fn URLPasswordAllowedCharacterSet() -> Id; - #[method_id(URLHostAllowedCharacterSet)] + #[method_id(@__retain_semantics Other URLHostAllowedCharacterSet)] pub unsafe fn URLHostAllowedCharacterSet() -> Id; - #[method_id(URLPathAllowedCharacterSet)] + #[method_id(@__retain_semantics Other URLPathAllowedCharacterSet)] pub unsafe fn URLPathAllowedCharacterSet() -> Id; - #[method_id(URLQueryAllowedCharacterSet)] + #[method_id(@__retain_semantics Other URLQueryAllowedCharacterSet)] pub unsafe fn URLQueryAllowedCharacterSet() -> Id; - #[method_id(URLFragmentAllowedCharacterSet)] + #[method_id(@__retain_semantics Other URLFragmentAllowedCharacterSet)] pub unsafe fn URLFragmentAllowedCharacterSet() -> Id; } ); @@ -1174,22 +1174,22 @@ extern_methods!( extern_methods!( /// NSURLUtilities unsafe impl NSString { - #[method_id(stringByAddingPercentEncodingWithAllowedCharacters:)] + #[method_id(@__retain_semantics Other stringByAddingPercentEncodingWithAllowedCharacters:)] pub unsafe fn stringByAddingPercentEncodingWithAllowedCharacters( &self, allowedCharacters: &NSCharacterSet, ) -> Option>; - #[method_id(stringByRemovingPercentEncoding)] + #[method_id(@__retain_semantics Other stringByRemovingPercentEncoding)] pub unsafe fn stringByRemovingPercentEncoding(&self) -> Option>; - #[method_id(stringByAddingPercentEscapesUsingEncoding:)] + #[method_id(@__retain_semantics Other stringByAddingPercentEscapesUsingEncoding:)] pub unsafe fn stringByAddingPercentEscapesUsingEncoding( &self, enc: NSStringEncoding, ) -> Option>; - #[method_id(stringByReplacingPercentEscapesUsingEncoding:)] + #[method_id(@__retain_semantics Other stringByReplacingPercentEscapesUsingEncoding:)] pub unsafe fn stringByReplacingPercentEscapesUsingEncoding( &self, enc: NSStringEncoding, @@ -1200,49 +1200,49 @@ extern_methods!( extern_methods!( /// NSURLPathUtilities unsafe impl NSURL { - #[method_id(fileURLWithPathComponents:)] + #[method_id(@__retain_semantics Other fileURLWithPathComponents:)] pub unsafe fn fileURLWithPathComponents( components: &NSArray, ) -> Option>; - #[method_id(pathComponents)] + #[method_id(@__retain_semantics Other pathComponents)] pub unsafe fn pathComponents(&self) -> Option, Shared>>; - #[method_id(lastPathComponent)] + #[method_id(@__retain_semantics Other lastPathComponent)] pub unsafe fn lastPathComponent(&self) -> Option>; - #[method_id(pathExtension)] + #[method_id(@__retain_semantics Other pathExtension)] pub unsafe fn pathExtension(&self) -> Option>; - #[method_id(URLByAppendingPathComponent:)] + #[method_id(@__retain_semantics Other URLByAppendingPathComponent:)] pub unsafe fn URLByAppendingPathComponent( &self, pathComponent: &NSString, ) -> Option>; - #[method_id(URLByAppendingPathComponent:isDirectory:)] + #[method_id(@__retain_semantics Other URLByAppendingPathComponent:isDirectory:)] pub unsafe fn URLByAppendingPathComponent_isDirectory( &self, pathComponent: &NSString, isDirectory: bool, ) -> Option>; - #[method_id(URLByDeletingLastPathComponent)] + #[method_id(@__retain_semantics Other URLByDeletingLastPathComponent)] pub unsafe fn URLByDeletingLastPathComponent(&self) -> Option>; - #[method_id(URLByAppendingPathExtension:)] + #[method_id(@__retain_semantics Other URLByAppendingPathExtension:)] pub unsafe fn URLByAppendingPathExtension( &self, pathExtension: &NSString, ) -> Option>; - #[method_id(URLByDeletingPathExtension)] + #[method_id(@__retain_semantics Other URLByDeletingPathExtension)] pub unsafe fn URLByDeletingPathExtension(&self) -> Option>; - #[method_id(URLByStandardizingPath)] + #[method_id(@__retain_semantics Other URLByStandardizingPath)] pub unsafe fn URLByStandardizingPath(&self) -> Option>; - #[method_id(URLByResolvingSymlinksInPath)] + #[method_id(@__retain_semantics Other URLByResolvingSymlinksInPath)] pub unsafe fn URLByResolvingSymlinksInPath(&self) -> Option>; } ); @@ -1258,7 +1258,7 @@ extern_class!( extern_methods!( unsafe impl NSFileSecurity { - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -1290,7 +1290,7 @@ extern_methods!( extern_methods!( /// NSURLLoading unsafe impl NSURL { - #[method_id(resourceDataUsingCache:)] + #[method_id(@__retain_semantics Other resourceDataUsingCache:)] pub unsafe fn resourceDataUsingCache( &self, shouldUseCache: bool, @@ -1303,7 +1303,7 @@ extern_methods!( shouldUseCache: bool, ); - #[method_id(propertyForKey:)] + #[method_id(@__retain_semantics Other propertyForKey:)] pub unsafe fn propertyForKey(&self, propertyKey: &NSString) -> Option>; #[method(setResourceData:)] @@ -1312,7 +1312,7 @@ extern_methods!( #[method(setProperty:forKey:)] pub unsafe fn setProperty_forKey(&self, property: &Object, propertyKey: &NSString) -> bool; - #[method_id(URLHandleUsingCache:)] + #[method_id(@__retain_semantics Other URLHandleUsingCache:)] pub unsafe fn URLHandleUsingCache( &self, shouldUseCache: bool, diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index 25d30c7d7..af8ef29a8 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -16,7 +16,7 @@ extern_class!( extern_methods!( unsafe impl NSURLAuthenticationChallenge { - #[method_id(initWithProtectionSpace:proposedCredential:previousFailureCount:failureResponse:error:sender:)] + #[method_id(@__retain_semantics Init initWithProtectionSpace:proposedCredential:previousFailureCount:failureResponse:error:sender:)] pub unsafe fn initWithProtectionSpace_proposedCredential_previousFailureCount_failureResponse_error_sender( this: Option>, space: &NSURLProtectionSpace, @@ -27,29 +27,29 @@ extern_methods!( sender: &NSURLAuthenticationChallengeSender, ) -> Id; - #[method_id(initWithAuthenticationChallenge:sender:)] + #[method_id(@__retain_semantics Init initWithAuthenticationChallenge:sender:)] pub unsafe fn initWithAuthenticationChallenge_sender( this: Option>, challenge: &NSURLAuthenticationChallenge, sender: &NSURLAuthenticationChallengeSender, ) -> Id; - #[method_id(protectionSpace)] + #[method_id(@__retain_semantics Other protectionSpace)] pub unsafe fn protectionSpace(&self) -> Id; - #[method_id(proposedCredential)] + #[method_id(@__retain_semantics Other proposedCredential)] pub unsafe fn proposedCredential(&self) -> Option>; #[method(previousFailureCount)] pub unsafe fn previousFailureCount(&self) -> NSInteger; - #[method_id(failureResponse)] + #[method_id(@__retain_semantics Other failureResponse)] pub unsafe fn failureResponse(&self) -> Option>; - #[method_id(error)] + #[method_id(@__retain_semantics Other error)] pub unsafe fn error(&self) -> Option>; - #[method_id(sender)] + #[method_id(@__retain_semantics Other sender)] pub unsafe fn sender(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 18a3292fa..bec37ffcb 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -19,14 +19,14 @@ extern_class!( extern_methods!( unsafe impl NSCachedURLResponse { - #[method_id(initWithResponse:data:)] + #[method_id(@__retain_semantics Init initWithResponse:data:)] pub unsafe fn initWithResponse_data( this: Option>, response: &NSURLResponse, data: &NSData, ) -> Id; - #[method_id(initWithResponse:data:userInfo:storagePolicy:)] + #[method_id(@__retain_semantics Init initWithResponse:data:userInfo:storagePolicy:)] pub unsafe fn initWithResponse_data_userInfo_storagePolicy( this: Option>, response: &NSURLResponse, @@ -35,13 +35,13 @@ extern_methods!( storagePolicy: NSURLCacheStoragePolicy, ) -> Id; - #[method_id(response)] + #[method_id(@__retain_semantics Other response)] pub unsafe fn response(&self) -> Id; - #[method_id(data)] + #[method_id(@__retain_semantics Other data)] pub unsafe fn data(&self) -> Id; - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>; #[method(storagePolicy)] @@ -60,13 +60,13 @@ extern_class!( extern_methods!( unsafe impl NSURLCache { - #[method_id(sharedURLCache)] + #[method_id(@__retain_semantics Other sharedURLCache)] pub unsafe fn sharedURLCache() -> Id; #[method(setSharedURLCache:)] pub unsafe fn setSharedURLCache(sharedURLCache: &NSURLCache); - #[method_id(initWithMemoryCapacity:diskCapacity:diskPath:)] + #[method_id(@__retain_semantics Init initWithMemoryCapacity:diskCapacity:diskPath:)] pub unsafe fn initWithMemoryCapacity_diskCapacity_diskPath( this: Option>, memoryCapacity: NSUInteger, @@ -74,7 +74,7 @@ extern_methods!( path: Option<&NSString>, ) -> Id; - #[method_id(initWithMemoryCapacity:diskCapacity:directoryURL:)] + #[method_id(@__retain_semantics Init initWithMemoryCapacity:diskCapacity:directoryURL:)] pub unsafe fn initWithMemoryCapacity_diskCapacity_directoryURL( this: Option>, memoryCapacity: NSUInteger, @@ -82,7 +82,7 @@ extern_methods!( directoryURL: Option<&NSURL>, ) -> Id; - #[method_id(cachedResponseForRequest:)] + #[method_id(@__retain_semantics Other cachedResponseForRequest:)] pub unsafe fn cachedResponseForRequest( &self, request: &NSURLRequest, diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 36faddaf3..6f4d7b268 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSURLConnection { - #[method_id(initWithRequest:delegate:startImmediately:)] + #[method_id(@__retain_semantics Init initWithRequest:delegate:startImmediately:)] pub unsafe fn initWithRequest_delegate_startImmediately( this: Option>, request: &NSURLRequest, @@ -22,23 +22,23 @@ extern_methods!( startImmediately: bool, ) -> Option>; - #[method_id(initWithRequest:delegate:)] + #[method_id(@__retain_semantics Init initWithRequest:delegate:)] pub unsafe fn initWithRequest_delegate( this: Option>, request: &NSURLRequest, delegate: Option<&Object>, ) -> Option>; - #[method_id(connectionWithRequest:delegate:)] + #[method_id(@__retain_semantics Other connectionWithRequest:delegate:)] pub unsafe fn connectionWithRequest_delegate( request: &NSURLRequest, delegate: Option<&Object>, ) -> Option>; - #[method_id(originalRequest)] + #[method_id(@__retain_semantics Other originalRequest)] pub unsafe fn originalRequest(&self) -> Id; - #[method_id(currentRequest)] + #[method_id(@__retain_semantics Other currentRequest)] pub unsafe fn currentRequest(&self) -> Id; #[method(start)] @@ -74,7 +74,7 @@ pub type NSURLConnectionDownloadDelegate = NSObject; extern_methods!( /// NSURLConnectionSynchronousLoading unsafe impl NSURLConnection { - #[method_id(sendSynchronousRequest:returningResponse:error:)] + #[method_id(@__retain_semantics Other sendSynchronousRequest:returningResponse:error:)] pub unsafe fn sendSynchronousRequest_returningResponse_error( request: &NSURLRequest, response: Option<&mut Option>>, diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index 93e871527..2e71752a2 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -28,7 +28,7 @@ extern_methods!( extern_methods!( /// NSInternetPassword unsafe impl NSURLCredential { - #[method_id(initWithUser:password:persistence:)] + #[method_id(@__retain_semantics Init initWithUser:password:persistence:)] pub unsafe fn initWithUser_password_persistence( this: Option>, user: &NSString, @@ -36,17 +36,17 @@ extern_methods!( persistence: NSURLCredentialPersistence, ) -> Id; - #[method_id(credentialWithUser:password:persistence:)] + #[method_id(@__retain_semantics Other credentialWithUser:password:persistence:)] pub unsafe fn credentialWithUser_password_persistence( user: &NSString, password: &NSString, persistence: NSURLCredentialPersistence, ) -> Id; - #[method_id(user)] + #[method_id(@__retain_semantics Other user)] pub unsafe fn user(&self) -> Option>; - #[method_id(password)] + #[method_id(@__retain_semantics Other password)] pub unsafe fn password(&self) -> Option>; #[method(hasPassword)] @@ -57,7 +57,7 @@ extern_methods!( extern_methods!( /// NSClientCertificate unsafe impl NSURLCredential { - #[method_id(initWithIdentity:certificates:persistence:)] + #[method_id(@__retain_semantics Init initWithIdentity:certificates:persistence:)] pub unsafe fn initWithIdentity_certificates_persistence( this: Option>, identity: SecIdentityRef, @@ -65,7 +65,7 @@ extern_methods!( persistence: NSURLCredentialPersistence, ) -> Id; - #[method_id(credentialWithIdentity:certificates:persistence:)] + #[method_id(@__retain_semantics Other credentialWithIdentity:certificates:persistence:)] pub unsafe fn credentialWithIdentity_certificates_persistence( identity: SecIdentityRef, certArray: Option<&NSArray>, @@ -75,7 +75,7 @@ extern_methods!( #[method(identity)] pub unsafe fn identity(&self) -> SecIdentityRef; - #[method_id(certificates)] + #[method_id(@__retain_semantics Other certificates)] pub unsafe fn certificates(&self) -> Id; } ); @@ -83,13 +83,13 @@ extern_methods!( extern_methods!( /// NSServerTrust unsafe impl NSURLCredential { - #[method_id(initWithTrust:)] + #[method_id(@__retain_semantics Init initWithTrust:)] pub unsafe fn initWithTrust( this: Option>, trust: SecTrustRef, ) -> Id; - #[method_id(credentialForTrust:)] + #[method_id(@__retain_semantics Other credentialForTrust:)] pub unsafe fn credentialForTrust(trust: SecTrustRef) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index c43f6cf7b..57b3104c8 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -14,16 +14,16 @@ extern_class!( extern_methods!( unsafe impl NSURLCredentialStorage { - #[method_id(sharedCredentialStorage)] + #[method_id(@__retain_semantics Other sharedCredentialStorage)] pub unsafe fn sharedCredentialStorage() -> Id; - #[method_id(credentialsForProtectionSpace:)] + #[method_id(@__retain_semantics Other credentialsForProtectionSpace:)] pub unsafe fn credentialsForProtectionSpace( &self, space: &NSURLProtectionSpace, ) -> Option, Shared>>; - #[method_id(allCredentials)] + #[method_id(@__retain_semantics Other allCredentials)] pub unsafe fn allCredentials( &self, ) -> Id>, Shared>; @@ -50,7 +50,7 @@ extern_methods!( options: Option<&NSDictionary>, ); - #[method_id(defaultCredentialForProtectionSpace:)] + #[method_id(@__retain_semantics Other defaultCredentialForProtectionSpace:)] pub unsafe fn defaultCredentialForProtectionSpace( &self, space: &NSURLProtectionSpace, diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index 2f8eee492..88331e9e0 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -17,14 +17,14 @@ extern_methods!( #[method(canResumeDownloadDecodedWithEncodingMIMEType:)] pub unsafe fn canResumeDownloadDecodedWithEncodingMIMEType(MIMEType: &NSString) -> bool; - #[method_id(initWithRequest:delegate:)] + #[method_id(@__retain_semantics Init initWithRequest:delegate:)] pub unsafe fn initWithRequest_delegate( this: Option>, request: &NSURLRequest, delegate: Option<&NSURLDownloadDelegate>, ) -> Id; - #[method_id(initWithResumeData:delegate:path:)] + #[method_id(@__retain_semantics Init initWithResumeData:delegate:path:)] pub unsafe fn initWithResumeData_delegate_path( this: Option>, resumeData: &NSData, @@ -38,10 +38,10 @@ extern_methods!( #[method(setDestination:allowOverwrite:)] pub unsafe fn setDestination_allowOverwrite(&self, path: &NSString, allowOverwrite: bool); - #[method_id(request)] + #[method_id(@__retain_semantics Other request)] pub unsafe fn request(&self) -> Id; - #[method_id(resumeData)] + #[method_id(@__retain_semantics Other resumeData)] pub unsafe fn resumeData(&self) -> Option>; #[method(deletesFileUponFailure)] diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index e1d8c872c..9ef522ee0 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -75,7 +75,7 @@ extern_methods!( #[method(status)] pub unsafe fn status(&self) -> NSURLHandleStatus; - #[method_id(failureReason)] + #[method_id(@__retain_semantics Other failureReason)] pub unsafe fn failureReason(&self) -> Option>; #[method(addClient:)] @@ -90,10 +90,10 @@ extern_methods!( #[method(cancelLoadInBackground)] pub unsafe fn cancelLoadInBackground(&self); - #[method_id(resourceData)] + #[method_id(@__retain_semantics Other resourceData)] pub unsafe fn resourceData(&self) -> Option>; - #[method_id(availableResourceData)] + #[method_id(@__retain_semantics Other availableResourceData)] pub unsafe fn availableResourceData(&self) -> Option>; #[method(expectedResourceDataSize)] @@ -111,23 +111,23 @@ extern_methods!( #[method(canInitWithURL:)] pub unsafe fn canInitWithURL(anURL: Option<&NSURL>) -> bool; - #[method_id(cachedHandleForURL:)] + #[method_id(@__retain_semantics Other cachedHandleForURL:)] pub unsafe fn cachedHandleForURL(anURL: Option<&NSURL>) -> Option>; - #[method_id(initWithURL:cached:)] + #[method_id(@__retain_semantics Init initWithURL:cached:)] pub unsafe fn initWithURL_cached( this: Option>, anURL: Option<&NSURL>, willCache: bool, ) -> Option>; - #[method_id(propertyForKey:)] + #[method_id(@__retain_semantics Other propertyForKey:)] pub unsafe fn propertyForKey( &self, propertyKey: Option<&NSString>, ) -> Option>; - #[method_id(propertyForKeyIfAvailable:)] + #[method_id(@__retain_semantics Other propertyForKeyIfAvailable:)] pub unsafe fn propertyForKeyIfAvailable( &self, propertyKey: Option<&NSString>, @@ -143,7 +143,7 @@ extern_methods!( #[method(writeData:)] pub unsafe fn writeData(&self, data: Option<&NSData>) -> bool; - #[method_id(loadInForeground)] + #[method_id(@__retain_semantics Other loadInForeground)] pub unsafe fn loadInForeground(&self) -> Option>; #[method(beginLoadInBackground)] diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index cd571f84b..01fc252fa 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -74,7 +74,7 @@ extern_class!( extern_methods!( unsafe impl NSURLProtectionSpace { - #[method_id(initWithHost:port:protocol:realm:authenticationMethod:)] + #[method_id(@__retain_semantics Init initWithHost:port:protocol:realm:authenticationMethod:)] pub unsafe fn initWithHost_port_protocol_realm_authenticationMethod( this: Option>, host: &NSString, @@ -84,7 +84,7 @@ extern_methods!( authenticationMethod: Option<&NSString>, ) -> Id; - #[method_id(initWithProxyHost:port:type:realm:authenticationMethod:)] + #[method_id(@__retain_semantics Init initWithProxyHost:port:type:realm:authenticationMethod:)] pub unsafe fn initWithProxyHost_port_type_realm_authenticationMethod( this: Option>, host: &NSString, @@ -94,7 +94,7 @@ extern_methods!( authenticationMethod: Option<&NSString>, ) -> Id; - #[method_id(realm)] + #[method_id(@__retain_semantics Other realm)] pub unsafe fn realm(&self) -> Option>; #[method(receivesCredentialSecurely)] @@ -103,19 +103,19 @@ extern_methods!( #[method(isProxy)] pub unsafe fn isProxy(&self) -> bool; - #[method_id(host)] + #[method_id(@__retain_semantics Other host)] pub unsafe fn host(&self) -> Id; #[method(port)] pub unsafe fn port(&self) -> NSInteger; - #[method_id(proxyType)] + #[method_id(@__retain_semantics Other proxyType)] pub unsafe fn proxyType(&self) -> Option>; - #[method_id(protocol)] + #[method_id(@__retain_semantics Other protocol)] pub unsafe fn protocol(&self) -> Option>; - #[method_id(authenticationMethod)] + #[method_id(@__retain_semantics Other authenticationMethod)] pub unsafe fn authenticationMethod(&self) -> Id; } ); @@ -123,7 +123,7 @@ extern_methods!( extern_methods!( /// NSClientCertificateSpace unsafe impl NSURLProtectionSpace { - #[method_id(distinguishedNames)] + #[method_id(@__retain_semantics Other distinguishedNames)] pub unsafe fn distinguishedNames(&self) -> Option, Shared>>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index ceef72be0..f7c96d4f4 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -16,7 +16,7 @@ extern_class!( extern_methods!( unsafe impl NSURLProtocol { - #[method_id(initWithRequest:cachedResponse:client:)] + #[method_id(@__retain_semantics Init initWithRequest:cachedResponse:client:)] pub unsafe fn initWithRequest_cachedResponse_client( this: Option>, request: &NSURLRequest, @@ -24,19 +24,19 @@ extern_methods!( client: Option<&NSURLProtocolClient>, ) -> Id; - #[method_id(client)] + #[method_id(@__retain_semantics Other client)] pub unsafe fn client(&self) -> Option>; - #[method_id(request)] + #[method_id(@__retain_semantics Other request)] pub unsafe fn request(&self) -> Id; - #[method_id(cachedResponse)] + #[method_id(@__retain_semantics Other cachedResponse)] pub unsafe fn cachedResponse(&self) -> Option>; #[method(canInitWithRequest:)] pub unsafe fn canInitWithRequest(request: &NSURLRequest) -> bool; - #[method_id(canonicalRequestForRequest:)] + #[method_id(@__retain_semantics Other canonicalRequestForRequest:)] pub unsafe fn canonicalRequestForRequest( request: &NSURLRequest, ) -> Id; @@ -53,7 +53,7 @@ extern_methods!( #[method(stopLoading)] pub unsafe fn stopLoading(&self); - #[method_id(propertyForKey:inRequest:)] + #[method_id(@__retain_semantics Other propertyForKey:inRequest:)] pub unsafe fn propertyForKey_inRequest( key: &NSString, request: &NSURLRequest, @@ -83,7 +83,7 @@ extern_methods!( #[method(canInitWithTask:)] pub unsafe fn canInitWithTask(task: &NSURLSessionTask) -> bool; - #[method_id(initWithTask:cachedResponse:client:)] + #[method_id(@__retain_semantics Init initWithTask:cachedResponse:client:)] pub unsafe fn initWithTask_cachedResponse_client( this: Option>, task: &NSURLSessionTask, @@ -91,7 +91,7 @@ extern_methods!( client: Option<&NSURLProtocolClient>, ) -> Id; - #[method_id(task)] + #[method_id(@__retain_semantics Other task)] pub unsafe fn task(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index 4e9d80e1c..b97f18f8e 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -39,23 +39,23 @@ extern_class!( extern_methods!( unsafe impl NSURLRequest { - #[method_id(requestWithURL:)] + #[method_id(@__retain_semantics Other requestWithURL:)] pub unsafe fn requestWithURL(URL: &NSURL) -> Id; #[method(supportsSecureCoding)] pub unsafe fn supportsSecureCoding() -> bool; - #[method_id(requestWithURL:cachePolicy:timeoutInterval:)] + #[method_id(@__retain_semantics Other requestWithURL:cachePolicy:timeoutInterval:)] pub unsafe fn requestWithURL_cachePolicy_timeoutInterval( URL: &NSURL, cachePolicy: NSURLRequestCachePolicy, timeoutInterval: NSTimeInterval, ) -> Id; - #[method_id(initWithURL:)] + #[method_id(@__retain_semantics Init initWithURL:)] pub unsafe fn initWithURL(this: Option>, URL: &NSURL) -> Id; - #[method_id(initWithURL:cachePolicy:timeoutInterval:)] + #[method_id(@__retain_semantics Init initWithURL:cachePolicy:timeoutInterval:)] pub unsafe fn initWithURL_cachePolicy_timeoutInterval( this: Option>, URL: &NSURL, @@ -63,7 +63,7 @@ extern_methods!( timeoutInterval: NSTimeInterval, ) -> Id; - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[method(cachePolicy)] @@ -72,7 +72,7 @@ extern_methods!( #[method(timeoutInterval)] pub unsafe fn timeoutInterval(&self) -> NSTimeInterval; - #[method_id(mainDocumentURL)] + #[method_id(@__retain_semantics Other mainDocumentURL)] pub unsafe fn mainDocumentURL(&self) -> Option>; #[method(networkServiceType)] @@ -106,7 +106,7 @@ extern_class!( extern_methods!( unsafe impl NSMutableURLRequest { - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; #[method(setURL:)] @@ -124,7 +124,7 @@ extern_methods!( #[method(setTimeoutInterval:)] pub unsafe fn setTimeoutInterval(&self, timeoutInterval: NSTimeInterval); - #[method_id(mainDocumentURL)] + #[method_id(@__retain_semantics Other mainDocumentURL)] pub unsafe fn mainDocumentURL(&self) -> Option>; #[method(setMainDocumentURL:)] @@ -177,24 +177,24 @@ extern_methods!( extern_methods!( /// NSHTTPURLRequest unsafe impl NSURLRequest { - #[method_id(HTTPMethod)] + #[method_id(@__retain_semantics Other HTTPMethod)] pub unsafe fn HTTPMethod(&self) -> Option>; - #[method_id(allHTTPHeaderFields)] + #[method_id(@__retain_semantics Other allHTTPHeaderFields)] pub unsafe fn allHTTPHeaderFields( &self, ) -> Option, Shared>>; - #[method_id(valueForHTTPHeaderField:)] + #[method_id(@__retain_semantics Other valueForHTTPHeaderField:)] pub unsafe fn valueForHTTPHeaderField( &self, field: &NSString, ) -> Option>; - #[method_id(HTTPBody)] + #[method_id(@__retain_semantics Other HTTPBody)] pub unsafe fn HTTPBody(&self) -> Option>; - #[method_id(HTTPBodyStream)] + #[method_id(@__retain_semantics Other HTTPBodyStream)] pub unsafe fn HTTPBodyStream(&self) -> Option>; #[method(HTTPShouldHandleCookies)] @@ -208,13 +208,13 @@ extern_methods!( extern_methods!( /// NSMutableHTTPURLRequest unsafe impl NSMutableURLRequest { - #[method_id(HTTPMethod)] + #[method_id(@__retain_semantics Other HTTPMethod)] pub unsafe fn HTTPMethod(&self) -> Id; #[method(setHTTPMethod:)] pub unsafe fn setHTTPMethod(&self, HTTPMethod: &NSString); - #[method_id(allHTTPHeaderFields)] + #[method_id(@__retain_semantics Other allHTTPHeaderFields)] pub unsafe fn allHTTPHeaderFields( &self, ) -> Option, Shared>>; @@ -235,13 +235,13 @@ extern_methods!( #[method(addValue:forHTTPHeaderField:)] pub unsafe fn addValue_forHTTPHeaderField(&self, value: &NSString, field: &NSString); - #[method_id(HTTPBody)] + #[method_id(@__retain_semantics Other HTTPBody)] pub unsafe fn HTTPBody(&self) -> Option>; #[method(setHTTPBody:)] pub unsafe fn setHTTPBody(&self, HTTPBody: Option<&NSData>); - #[method_id(HTTPBodyStream)] + #[method_id(@__retain_semantics Other HTTPBodyStream)] pub unsafe fn HTTPBodyStream(&self) -> Option>; #[method(setHTTPBodyStream:)] diff --git a/crates/icrate/src/generated/Foundation/NSURLResponse.rs b/crates/icrate/src/generated/Foundation/NSURLResponse.rs index 921e7846f..55544971c 100644 --- a/crates/icrate/src/generated/Foundation/NSURLResponse.rs +++ b/crates/icrate/src/generated/Foundation/NSURLResponse.rs @@ -14,7 +14,7 @@ extern_class!( extern_methods!( unsafe impl NSURLResponse { - #[method_id(initWithURL:MIMEType:expectedContentLength:textEncodingName:)] + #[method_id(@__retain_semantics Init initWithURL:MIMEType:expectedContentLength:textEncodingName:)] pub unsafe fn initWithURL_MIMEType_expectedContentLength_textEncodingName( this: Option>, URL: &NSURL, @@ -23,19 +23,19 @@ extern_methods!( name: Option<&NSString>, ) -> Id; - #[method_id(URL)] + #[method_id(@__retain_semantics Other URL)] pub unsafe fn URL(&self) -> Option>; - #[method_id(MIMEType)] + #[method_id(@__retain_semantics Other MIMEType)] pub unsafe fn MIMEType(&self) -> Option>; #[method(expectedContentLength)] pub unsafe fn expectedContentLength(&self) -> c_longlong; - #[method_id(textEncodingName)] + #[method_id(@__retain_semantics Other textEncodingName)] pub unsafe fn textEncodingName(&self) -> Option>; - #[method_id(suggestedFilename)] + #[method_id(@__retain_semantics Other suggestedFilename)] pub unsafe fn suggestedFilename(&self) -> Option>; } ); @@ -51,7 +51,7 @@ extern_class!( extern_methods!( unsafe impl NSHTTPURLResponse { - #[method_id(initWithURL:statusCode:HTTPVersion:headerFields:)] + #[method_id(@__retain_semantics Init initWithURL:statusCode:HTTPVersion:headerFields:)] pub unsafe fn initWithURL_statusCode_HTTPVersion_headerFields( this: Option>, url: &NSURL, @@ -63,16 +63,16 @@ extern_methods!( #[method(statusCode)] pub unsafe fn statusCode(&self) -> NSInteger; - #[method_id(allHeaderFields)] + #[method_id(@__retain_semantics Other allHeaderFields)] pub unsafe fn allHeaderFields(&self) -> Id; - #[method_id(valueForHTTPHeaderField:)] + #[method_id(@__retain_semantics Other valueForHTTPHeaderField:)] pub unsafe fn valueForHTTPHeaderField( &self, field: &NSString, ) -> Option>; - #[method_id(localizedStringForStatusCode:)] + #[method_id(@__retain_semantics Other localizedStringForStatusCode:)] pub unsafe fn localizedStringForStatusCode(statusCode: NSInteger) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 2857f216f..57820a737 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -18,31 +18,31 @@ extern_class!( extern_methods!( unsafe impl NSURLSession { - #[method_id(sharedSession)] + #[method_id(@__retain_semantics Other sharedSession)] pub unsafe fn sharedSession() -> Id; - #[method_id(sessionWithConfiguration:)] + #[method_id(@__retain_semantics Other sessionWithConfiguration:)] pub unsafe fn sessionWithConfiguration( configuration: &NSURLSessionConfiguration, ) -> Id; - #[method_id(sessionWithConfiguration:delegate:delegateQueue:)] + #[method_id(@__retain_semantics Other sessionWithConfiguration:delegate:delegateQueue:)] pub unsafe fn sessionWithConfiguration_delegate_delegateQueue( configuration: &NSURLSessionConfiguration, delegate: Option<&NSURLSessionDelegate>, queue: Option<&NSOperationQueue>, ) -> Id; - #[method_id(delegateQueue)] + #[method_id(@__retain_semantics Other delegateQueue)] pub unsafe fn delegateQueue(&self) -> Id; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; - #[method_id(configuration)] + #[method_id(@__retain_semantics Other configuration)] pub unsafe fn configuration(&self) -> Id; - #[method_id(sessionDescription)] + #[method_id(@__retain_semantics Other sessionDescription)] pub unsafe fn sessionDescription(&self) -> Option>; #[method(setSessionDescription:)] @@ -66,89 +66,89 @@ extern_methods!( #[method(getAllTasksWithCompletionHandler:)] pub unsafe fn getAllTasksWithCompletionHandler(&self, completionHandler: TodoBlock); - #[method_id(dataTaskWithRequest:)] + #[method_id(@__retain_semantics Other dataTaskWithRequest:)] pub unsafe fn dataTaskWithRequest( &self, request: &NSURLRequest, ) -> Id; - #[method_id(dataTaskWithURL:)] + #[method_id(@__retain_semantics Other dataTaskWithURL:)] pub unsafe fn dataTaskWithURL(&self, url: &NSURL) -> Id; - #[method_id(uploadTaskWithRequest:fromFile:)] + #[method_id(@__retain_semantics Other uploadTaskWithRequest:fromFile:)] pub unsafe fn uploadTaskWithRequest_fromFile( &self, request: &NSURLRequest, fileURL: &NSURL, ) -> Id; - #[method_id(uploadTaskWithRequest:fromData:)] + #[method_id(@__retain_semantics Other uploadTaskWithRequest:fromData:)] pub unsafe fn uploadTaskWithRequest_fromData( &self, request: &NSURLRequest, bodyData: &NSData, ) -> Id; - #[method_id(uploadTaskWithStreamedRequest:)] + #[method_id(@__retain_semantics Other uploadTaskWithStreamedRequest:)] pub unsafe fn uploadTaskWithStreamedRequest( &self, request: &NSURLRequest, ) -> Id; - #[method_id(downloadTaskWithRequest:)] + #[method_id(@__retain_semantics Other downloadTaskWithRequest:)] pub unsafe fn downloadTaskWithRequest( &self, request: &NSURLRequest, ) -> Id; - #[method_id(downloadTaskWithURL:)] + #[method_id(@__retain_semantics Other downloadTaskWithURL:)] pub unsafe fn downloadTaskWithURL( &self, url: &NSURL, ) -> Id; - #[method_id(downloadTaskWithResumeData:)] + #[method_id(@__retain_semantics Other downloadTaskWithResumeData:)] pub unsafe fn downloadTaskWithResumeData( &self, resumeData: &NSData, ) -> Id; - #[method_id(streamTaskWithHostName:port:)] + #[method_id(@__retain_semantics Other streamTaskWithHostName:port:)] pub unsafe fn streamTaskWithHostName_port( &self, hostname: &NSString, port: NSInteger, ) -> Id; - #[method_id(streamTaskWithNetService:)] + #[method_id(@__retain_semantics Other streamTaskWithNetService:)] pub unsafe fn streamTaskWithNetService( &self, service: &NSNetService, ) -> Id; - #[method_id(webSocketTaskWithURL:)] + #[method_id(@__retain_semantics Other webSocketTaskWithURL:)] pub unsafe fn webSocketTaskWithURL( &self, url: &NSURL, ) -> Id; - #[method_id(webSocketTaskWithURL:protocols:)] + #[method_id(@__retain_semantics Other webSocketTaskWithURL:protocols:)] pub unsafe fn webSocketTaskWithURL_protocols( &self, url: &NSURL, protocols: &NSArray, ) -> Id; - #[method_id(webSocketTaskWithRequest:)] + #[method_id(@__retain_semantics Other webSocketTaskWithRequest:)] pub unsafe fn webSocketTaskWithRequest( &self, request: &NSURLRequest, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); @@ -156,21 +156,21 @@ extern_methods!( extern_methods!( /// NSURLSessionAsynchronousConvenience unsafe impl NSURLSession { - #[method_id(dataTaskWithRequest:completionHandler:)] + #[method_id(@__retain_semantics Other dataTaskWithRequest:completionHandler:)] pub unsafe fn dataTaskWithRequest_completionHandler( &self, request: &NSURLRequest, completionHandler: TodoBlock, ) -> Id; - #[method_id(dataTaskWithURL:completionHandler:)] + #[method_id(@__retain_semantics Other dataTaskWithURL:completionHandler:)] pub unsafe fn dataTaskWithURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, ) -> Id; - #[method_id(uploadTaskWithRequest:fromFile:completionHandler:)] + #[method_id(@__retain_semantics Other uploadTaskWithRequest:fromFile:completionHandler:)] pub unsafe fn uploadTaskWithRequest_fromFile_completionHandler( &self, request: &NSURLRequest, @@ -178,7 +178,7 @@ extern_methods!( completionHandler: TodoBlock, ) -> Id; - #[method_id(uploadTaskWithRequest:fromData:completionHandler:)] + #[method_id(@__retain_semantics Other uploadTaskWithRequest:fromData:completionHandler:)] pub unsafe fn uploadTaskWithRequest_fromData_completionHandler( &self, request: &NSURLRequest, @@ -186,21 +186,21 @@ extern_methods!( completionHandler: TodoBlock, ) -> Id; - #[method_id(downloadTaskWithRequest:completionHandler:)] + #[method_id(@__retain_semantics Other downloadTaskWithRequest:completionHandler:)] pub unsafe fn downloadTaskWithRequest_completionHandler( &self, request: &NSURLRequest, completionHandler: TodoBlock, ) -> Id; - #[method_id(downloadTaskWithURL:completionHandler:)] + #[method_id(@__retain_semantics Other downloadTaskWithURL:completionHandler:)] pub unsafe fn downloadTaskWithURL_completionHandler( &self, url: &NSURL, completionHandler: TodoBlock, ) -> Id; - #[method_id(downloadTaskWithResumeData:completionHandler:)] + #[method_id(@__retain_semantics Other downloadTaskWithResumeData:completionHandler:)] pub unsafe fn downloadTaskWithResumeData_completionHandler( &self, resumeData: &NSData, @@ -229,25 +229,25 @@ extern_methods!( #[method(taskIdentifier)] pub unsafe fn taskIdentifier(&self) -> NSUInteger; - #[method_id(originalRequest)] + #[method_id(@__retain_semantics Other originalRequest)] pub unsafe fn originalRequest(&self) -> Option>; - #[method_id(currentRequest)] + #[method_id(@__retain_semantics Other currentRequest)] pub unsafe fn currentRequest(&self) -> Option>; - #[method_id(response)] + #[method_id(@__retain_semantics Other response)] pub unsafe fn response(&self) -> Option>; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSURLSessionTaskDelegate>); - #[method_id(progress)] + #[method_id(@__retain_semantics Other progress)] pub unsafe fn progress(&self) -> Id; - #[method_id(earliestBeginDate)] + #[method_id(@__retain_semantics Other earliestBeginDate)] pub unsafe fn earliestBeginDate(&self) -> Option>; #[method(setEarliestBeginDate:)] @@ -283,7 +283,7 @@ extern_methods!( #[method(countOfBytesExpectedToReceive)] pub unsafe fn countOfBytesExpectedToReceive(&self) -> i64; - #[method_id(taskDescription)] + #[method_id(@__retain_semantics Other taskDescription)] pub unsafe fn taskDescription(&self) -> Option>; #[method(setTaskDescription:)] @@ -295,7 +295,7 @@ extern_methods!( #[method(state)] pub unsafe fn state(&self) -> NSURLSessionTaskState; - #[method_id(error)] + #[method_id(@__retain_semantics Other error)] pub unsafe fn error(&self) -> Option>; #[method(suspend)] @@ -316,10 +316,10 @@ extern_methods!( #[method(setPrefersIncrementalDelivery:)] pub unsafe fn setPrefersIncrementalDelivery(&self, prefersIncrementalDelivery: bool); - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); @@ -347,10 +347,10 @@ extern_class!( extern_methods!( unsafe impl NSURLSessionDataTask { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); @@ -366,10 +366,10 @@ extern_class!( extern_methods!( unsafe impl NSURLSessionUploadTask { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); @@ -388,10 +388,10 @@ extern_methods!( #[method(cancelByProducingResumeData:)] pub unsafe fn cancelByProducingResumeData(&self, completionHandler: TodoBlock); - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); @@ -439,10 +439,10 @@ extern_methods!( #[method(stopSecureConnection)] pub unsafe fn stopSecureConnection(&self); - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); @@ -462,13 +462,13 @@ extern_class!( extern_methods!( unsafe impl NSURLSessionWebSocketMessage { - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, data: &NSData, ) -> Id; - #[method_id(initWithString:)] + #[method_id(@__retain_semantics Init initWithString:)] pub unsafe fn initWithString( this: Option>, string: &NSString, @@ -477,16 +477,16 @@ extern_methods!( #[method(type)] pub unsafe fn type_(&self) -> NSURLSessionWebSocketMessageType; - #[method_id(data)] + #[method_id(@__retain_semantics Other data)] pub unsafe fn data(&self) -> Option>; - #[method_id(string)] + #[method_id(@__retain_semantics Other string)] pub unsafe fn string(&self) -> Option>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); @@ -548,13 +548,13 @@ extern_methods!( #[method(closeCode)] pub unsafe fn closeCode(&self) -> NSURLSessionWebSocketCloseCode; - #[method_id(closeReason)] + #[method_id(@__retain_semantics Other closeReason)] pub unsafe fn closeReason(&self) -> Option>; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); @@ -576,18 +576,18 @@ extern_class!( extern_methods!( unsafe impl NSURLSessionConfiguration { - #[method_id(defaultSessionConfiguration)] + #[method_id(@__retain_semantics Other defaultSessionConfiguration)] pub unsafe fn defaultSessionConfiguration() -> Id; - #[method_id(ephemeralSessionConfiguration)] + #[method_id(@__retain_semantics Other ephemeralSessionConfiguration)] pub unsafe fn ephemeralSessionConfiguration() -> Id; - #[method_id(backgroundSessionConfigurationWithIdentifier:)] + #[method_id(@__retain_semantics Other backgroundSessionConfigurationWithIdentifier:)] pub unsafe fn backgroundSessionConfigurationWithIdentifier( identifier: &NSString, ) -> Id; - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Option>; #[method(requestCachePolicy)] @@ -656,7 +656,7 @@ extern_methods!( #[method(setDiscretionary:)] pub unsafe fn setDiscretionary(&self, discretionary: bool); - #[method_id(sharedContainerIdentifier)] + #[method_id(@__retain_semantics Other sharedContainerIdentifier)] pub unsafe fn sharedContainerIdentifier(&self) -> Option>; #[method(setSharedContainerIdentifier:)] @@ -671,7 +671,7 @@ extern_methods!( #[method(setSessionSendsLaunchEvents:)] pub unsafe fn setSessionSendsLaunchEvents(&self, sessionSendsLaunchEvents: bool); - #[method_id(connectionProxyDictionary)] + #[method_id(@__retain_semantics Other connectionProxyDictionary)] pub unsafe fn connectionProxyDictionary(&self) -> Option>; #[method(setConnectionProxyDictionary:)] @@ -737,7 +737,7 @@ extern_methods!( HTTPCookieAcceptPolicy: NSHTTPCookieAcceptPolicy, ); - #[method_id(HTTPAdditionalHeaders)] + #[method_id(@__retain_semantics Other HTTPAdditionalHeaders)] pub unsafe fn HTTPAdditionalHeaders(&self) -> Option>; #[method(setHTTPAdditionalHeaders:)] @@ -752,13 +752,13 @@ extern_methods!( HTTPMaximumConnectionsPerHost: NSInteger, ); - #[method_id(HTTPCookieStorage)] + #[method_id(@__retain_semantics Other HTTPCookieStorage)] pub unsafe fn HTTPCookieStorage(&self) -> Option>; #[method(setHTTPCookieStorage:)] pub unsafe fn setHTTPCookieStorage(&self, HTTPCookieStorage: Option<&NSHTTPCookieStorage>); - #[method_id(URLCredentialStorage)] + #[method_id(@__retain_semantics Other URLCredentialStorage)] pub unsafe fn URLCredentialStorage(&self) -> Option>; #[method(setURLCredentialStorage:)] @@ -767,7 +767,7 @@ extern_methods!( URLCredentialStorage: Option<&NSURLCredentialStorage>, ); - #[method_id(URLCache)] + #[method_id(@__retain_semantics Other URLCache)] pub unsafe fn URLCache(&self) -> Option>; #[method(setURLCache:)] @@ -782,7 +782,7 @@ extern_methods!( shouldUseExtendedBackgroundIdleMode: bool, ); - #[method_id(protocolClasses)] + #[method_id(@__retain_semantics Other protocolClasses)] pub unsafe fn protocolClasses(&self) -> Option, Shared>>; #[method(setProtocolClasses:)] @@ -797,10 +797,10 @@ extern_methods!( multipathServiceType: NSURLSessionMultipathServiceType, ); - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); @@ -842,7 +842,7 @@ extern "C" { extern_methods!( /// NSURLSessionDeprecated unsafe impl NSURLSessionConfiguration { - #[method_id(backgroundSessionConfiguration:)] + #[method_id(@__retain_semantics Other backgroundSessionConfiguration:)] pub unsafe fn backgroundSessionConfiguration( identifier: &NSString, ) -> Id; @@ -882,46 +882,46 @@ extern_class!( extern_methods!( unsafe impl NSURLSessionTaskTransactionMetrics { - #[method_id(request)] + #[method_id(@__retain_semantics Other request)] pub unsafe fn request(&self) -> Id; - #[method_id(response)] + #[method_id(@__retain_semantics Other response)] pub unsafe fn response(&self) -> Option>; - #[method_id(fetchStartDate)] + #[method_id(@__retain_semantics Other fetchStartDate)] pub unsafe fn fetchStartDate(&self) -> Option>; - #[method_id(domainLookupStartDate)] + #[method_id(@__retain_semantics Other domainLookupStartDate)] pub unsafe fn domainLookupStartDate(&self) -> Option>; - #[method_id(domainLookupEndDate)] + #[method_id(@__retain_semantics Other domainLookupEndDate)] pub unsafe fn domainLookupEndDate(&self) -> Option>; - #[method_id(connectStartDate)] + #[method_id(@__retain_semantics Other connectStartDate)] pub unsafe fn connectStartDate(&self) -> Option>; - #[method_id(secureConnectionStartDate)] + #[method_id(@__retain_semantics Other secureConnectionStartDate)] pub unsafe fn secureConnectionStartDate(&self) -> Option>; - #[method_id(secureConnectionEndDate)] + #[method_id(@__retain_semantics Other secureConnectionEndDate)] pub unsafe fn secureConnectionEndDate(&self) -> Option>; - #[method_id(connectEndDate)] + #[method_id(@__retain_semantics Other connectEndDate)] pub unsafe fn connectEndDate(&self) -> Option>; - #[method_id(requestStartDate)] + #[method_id(@__retain_semantics Other requestStartDate)] pub unsafe fn requestStartDate(&self) -> Option>; - #[method_id(requestEndDate)] + #[method_id(@__retain_semantics Other requestEndDate)] pub unsafe fn requestEndDate(&self) -> Option>; - #[method_id(responseStartDate)] + #[method_id(@__retain_semantics Other responseStartDate)] pub unsafe fn responseStartDate(&self) -> Option>; - #[method_id(responseEndDate)] + #[method_id(@__retain_semantics Other responseEndDate)] pub unsafe fn responseEndDate(&self) -> Option>; - #[method_id(networkProtocolName)] + #[method_id(@__retain_semantics Other networkProtocolName)] pub unsafe fn networkProtocolName(&self) -> Option>; #[method(isProxyConnection)] @@ -951,22 +951,22 @@ extern_methods!( #[method(countOfResponseBodyBytesAfterDecoding)] pub unsafe fn countOfResponseBodyBytesAfterDecoding(&self) -> i64; - #[method_id(localAddress)] + #[method_id(@__retain_semantics Other localAddress)] pub unsafe fn localAddress(&self) -> Option>; - #[method_id(localPort)] + #[method_id(@__retain_semantics Other localPort)] pub unsafe fn localPort(&self) -> Option>; - #[method_id(remoteAddress)] + #[method_id(@__retain_semantics Other remoteAddress)] pub unsafe fn remoteAddress(&self) -> Option>; - #[method_id(remotePort)] + #[method_id(@__retain_semantics Other remotePort)] pub unsafe fn remotePort(&self) -> Option>; - #[method_id(negotiatedTLSProtocolVersion)] + #[method_id(@__retain_semantics Other negotiatedTLSProtocolVersion)] pub unsafe fn negotiatedTLSProtocolVersion(&self) -> Option>; - #[method_id(negotiatedTLSCipherSuite)] + #[method_id(@__retain_semantics Other negotiatedTLSCipherSuite)] pub unsafe fn negotiatedTLSCipherSuite(&self) -> Option>; #[method(isCellular)] @@ -986,10 +986,10 @@ extern_methods!( &self, ) -> NSURLSessionTaskMetricsDomainResolutionProtocol; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); @@ -1005,21 +1005,21 @@ extern_class!( extern_methods!( unsafe impl NSURLSessionTaskMetrics { - #[method_id(transactionMetrics)] + #[method_id(@__retain_semantics Other transactionMetrics)] pub unsafe fn transactionMetrics( &self, ) -> Id, Shared>; - #[method_id(taskInterval)] + #[method_id(@__retain_semantics Other taskInterval)] pub unsafe fn taskInterval(&self) -> Id; #[method(redirectCount)] pub unsafe fn redirectCount(&self) -> NSUInteger; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index f30c13a4f..7f408457b 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -14,19 +14,19 @@ extern_class!( extern_methods!( unsafe impl NSUUID { - #[method_id(UUID)] + #[method_id(@__retain_semantics Other UUID)] pub unsafe fn UUID() -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithUUIDString:)] + #[method_id(@__retain_semantics Init initWithUUIDString:)] pub unsafe fn initWithUUIDString( this: Option>, string: &NSString, ) -> Option>; - #[method_id(initWithUUIDBytes:)] + #[method_id(@__retain_semantics Init initWithUUIDBytes:)] pub unsafe fn initWithUUIDBytes( this: Option>, bytes: uuid_t, @@ -38,7 +38,7 @@ extern_methods!( #[method(compare:)] pub unsafe fn compare(&self, otherUUID: &NSUUID) -> NSComparisonResult; - #[method_id(UUIDString)] + #[method_id(@__retain_semantics Other UUIDString)] pub unsafe fn UUIDString(&self) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 75c57d105..7b79a6f34 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -14,10 +14,10 @@ extern_class!( extern_methods!( unsafe impl NSUbiquitousKeyValueStore { - #[method_id(defaultStore)] + #[method_id(@__retain_semantics Other defaultStore)] pub unsafe fn defaultStore() -> Id; - #[method_id(objectForKey:)] + #[method_id(@__retain_semantics Other objectForKey:)] pub unsafe fn objectForKey(&self, aKey: &NSString) -> Option>; #[method(setObject:forKey:)] @@ -26,19 +26,19 @@ extern_methods!( #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, aKey: &NSString); - #[method_id(stringForKey:)] + #[method_id(@__retain_semantics Other stringForKey:)] pub unsafe fn stringForKey(&self, aKey: &NSString) -> Option>; - #[method_id(arrayForKey:)] + #[method_id(@__retain_semantics Other arrayForKey:)] pub unsafe fn arrayForKey(&self, aKey: &NSString) -> Option>; - #[method_id(dictionaryForKey:)] + #[method_id(@__retain_semantics Other dictionaryForKey:)] pub unsafe fn dictionaryForKey( &self, aKey: &NSString, ) -> Option, Shared>>; - #[method_id(dataForKey:)] + #[method_id(@__retain_semantics Other dataForKey:)] pub unsafe fn dataForKey(&self, aKey: &NSString) -> Option>; #[method(longLongForKey:)] @@ -75,7 +75,7 @@ extern_methods!( #[method(setBool:forKey:)] pub unsafe fn setBool_forKey(&self, value: bool, aKey: &NSString); - #[method_id(dictionaryRepresentation)] + #[method_id(@__retain_semantics Other dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared>; diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index 68a59aba4..11f061a97 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -50,7 +50,7 @@ extern_methods!( #[method(setLevelsOfUndo:)] pub unsafe fn setLevelsOfUndo(&self, levelsOfUndo: NSUInteger); - #[method_id(runLoopModes)] + #[method_id(@__retain_semantics Other runLoopModes)] pub unsafe fn runLoopModes(&self) -> Id, Shared>; #[method(setRunLoopModes:)] @@ -91,7 +91,7 @@ extern_methods!( anObject: Option<&Object>, ); - #[method_id(prepareWithInvocationTarget:)] + #[method_id(@__retain_semantics Other prepareWithInvocationTarget:)] pub unsafe fn prepareWithInvocationTarget(&self, target: &Object) -> Id; #[method(registerUndoWithTarget:handler:)] @@ -110,28 +110,28 @@ extern_methods!( #[method(redoActionIsDiscardable)] pub unsafe fn redoActionIsDiscardable(&self) -> bool; - #[method_id(undoActionName)] + #[method_id(@__retain_semantics Other undoActionName)] pub unsafe fn undoActionName(&self) -> Id; - #[method_id(redoActionName)] + #[method_id(@__retain_semantics Other redoActionName)] pub unsafe fn redoActionName(&self) -> Id; #[method(setActionName:)] pub unsafe fn setActionName(&self, actionName: &NSString); - #[method_id(undoMenuItemTitle)] + #[method_id(@__retain_semantics Other undoMenuItemTitle)] pub unsafe fn undoMenuItemTitle(&self) -> Id; - #[method_id(redoMenuItemTitle)] + #[method_id(@__retain_semantics Other redoMenuItemTitle)] pub unsafe fn redoMenuItemTitle(&self) -> Id; - #[method_id(undoMenuTitleForUndoActionName:)] + #[method_id(@__retain_semantics Other undoMenuTitleForUndoActionName:)] pub unsafe fn undoMenuTitleForUndoActionName( &self, actionName: &NSString, ) -> Id; - #[method_id(redoMenuTitleForUndoActionName:)] + #[method_id(@__retain_semantics Other redoMenuTitleForUndoActionName:)] pub unsafe fn redoMenuTitleForUndoActionName( &self, actionName: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSUnit.rs b/crates/icrate/src/generated/Foundation/NSUnit.rs index 62921819e..67bce1a1f 100644 --- a/crates/icrate/src/generated/Foundation/NSUnit.rs +++ b/crates/icrate/src/generated/Foundation/NSUnit.rs @@ -39,13 +39,13 @@ extern_methods!( #[method(constant)] pub unsafe fn constant(&self) -> c_double; - #[method_id(initWithCoefficient:)] + #[method_id(@__retain_semantics Init initWithCoefficient:)] pub unsafe fn initWithCoefficient( this: Option>, coefficient: c_double, ) -> Id; - #[method_id(initWithCoefficient:constant:)] + #[method_id(@__retain_semantics Init initWithCoefficient:constant:)] pub unsafe fn initWithCoefficient_constant( this: Option>, coefficient: c_double, @@ -65,16 +65,16 @@ extern_class!( extern_methods!( unsafe impl NSUnit { - #[method_id(symbol)] + #[method_id(@__retain_semantics Other symbol)] pub unsafe fn symbol(&self) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(new)] + #[method_id(@__retain_semantics New new)] pub unsafe fn new() -> Id; - #[method_id(initWithSymbol:)] + #[method_id(@__retain_semantics Init initWithSymbol:)] pub unsafe fn initWithSymbol( this: Option>, symbol: &NSString, @@ -93,17 +93,17 @@ extern_class!( extern_methods!( unsafe impl NSDimension { - #[method_id(converter)] + #[method_id(@__retain_semantics Other converter)] pub unsafe fn converter(&self) -> Id; - #[method_id(initWithSymbol:converter:)] + #[method_id(@__retain_semantics Init initWithSymbol:converter:)] pub unsafe fn initWithSymbol_converter( this: Option>, symbol: &NSString, converter: &NSUnitConverter, ) -> Id; - #[method_id(baseUnit)] + #[method_id(@__retain_semantics Other baseUnit)] pub unsafe fn baseUnit() -> Id; } ); @@ -119,10 +119,10 @@ extern_class!( extern_methods!( unsafe impl NSUnitAcceleration { - #[method_id(metersPerSecondSquared)] + #[method_id(@__retain_semantics Other metersPerSecondSquared)] pub unsafe fn metersPerSecondSquared() -> Id; - #[method_id(gravity)] + #[method_id(@__retain_semantics Other gravity)] pub unsafe fn gravity() -> Id; } ); @@ -138,22 +138,22 @@ extern_class!( extern_methods!( unsafe impl NSUnitAngle { - #[method_id(degrees)] + #[method_id(@__retain_semantics Other degrees)] pub unsafe fn degrees() -> Id; - #[method_id(arcMinutes)] + #[method_id(@__retain_semantics Other arcMinutes)] pub unsafe fn arcMinutes() -> Id; - #[method_id(arcSeconds)] + #[method_id(@__retain_semantics Other arcSeconds)] pub unsafe fn arcSeconds() -> Id; - #[method_id(radians)] + #[method_id(@__retain_semantics Other radians)] pub unsafe fn radians() -> Id; - #[method_id(gradians)] + #[method_id(@__retain_semantics Other gradians)] pub unsafe fn gradians() -> Id; - #[method_id(revolutions)] + #[method_id(@__retain_semantics Other revolutions)] pub unsafe fn revolutions() -> Id; } ); @@ -169,46 +169,46 @@ extern_class!( extern_methods!( unsafe impl NSUnitArea { - #[method_id(squareMegameters)] + #[method_id(@__retain_semantics Other squareMegameters)] pub unsafe fn squareMegameters() -> Id; - #[method_id(squareKilometers)] + #[method_id(@__retain_semantics Other squareKilometers)] pub unsafe fn squareKilometers() -> Id; - #[method_id(squareMeters)] + #[method_id(@__retain_semantics Other squareMeters)] pub unsafe fn squareMeters() -> Id; - #[method_id(squareCentimeters)] + #[method_id(@__retain_semantics Other squareCentimeters)] pub unsafe fn squareCentimeters() -> Id; - #[method_id(squareMillimeters)] + #[method_id(@__retain_semantics Other squareMillimeters)] pub unsafe fn squareMillimeters() -> Id; - #[method_id(squareMicrometers)] + #[method_id(@__retain_semantics Other squareMicrometers)] pub unsafe fn squareMicrometers() -> Id; - #[method_id(squareNanometers)] + #[method_id(@__retain_semantics Other squareNanometers)] pub unsafe fn squareNanometers() -> Id; - #[method_id(squareInches)] + #[method_id(@__retain_semantics Other squareInches)] pub unsafe fn squareInches() -> Id; - #[method_id(squareFeet)] + #[method_id(@__retain_semantics Other squareFeet)] pub unsafe fn squareFeet() -> Id; - #[method_id(squareYards)] + #[method_id(@__retain_semantics Other squareYards)] pub unsafe fn squareYards() -> Id; - #[method_id(squareMiles)] + #[method_id(@__retain_semantics Other squareMiles)] pub unsafe fn squareMiles() -> Id; - #[method_id(acres)] + #[method_id(@__retain_semantics Other acres)] pub unsafe fn acres() -> Id; - #[method_id(ares)] + #[method_id(@__retain_semantics Other ares)] pub unsafe fn ares() -> Id; - #[method_id(hectares)] + #[method_id(@__retain_semantics Other hectares)] pub unsafe fn hectares() -> Id; } ); @@ -224,13 +224,13 @@ extern_class!( extern_methods!( unsafe impl NSUnitConcentrationMass { - #[method_id(gramsPerLiter)] + #[method_id(@__retain_semantics Other gramsPerLiter)] pub unsafe fn gramsPerLiter() -> Id; - #[method_id(milligramsPerDeciliter)] + #[method_id(@__retain_semantics Other milligramsPerDeciliter)] pub unsafe fn milligramsPerDeciliter() -> Id; - #[method_id(millimolesPerLiterWithGramsPerMole:)] + #[method_id(@__retain_semantics Other millimolesPerLiterWithGramsPerMole:)] pub unsafe fn millimolesPerLiterWithGramsPerMole( gramsPerMole: c_double, ) -> Id; @@ -248,7 +248,7 @@ extern_class!( extern_methods!( unsafe impl NSUnitDispersion { - #[method_id(partsPerMillion)] + #[method_id(@__retain_semantics Other partsPerMillion)] pub unsafe fn partsPerMillion() -> Id; } ); @@ -264,25 +264,25 @@ extern_class!( extern_methods!( unsafe impl NSUnitDuration { - #[method_id(hours)] + #[method_id(@__retain_semantics Other hours)] pub unsafe fn hours() -> Id; - #[method_id(minutes)] + #[method_id(@__retain_semantics Other minutes)] pub unsafe fn minutes() -> Id; - #[method_id(seconds)] + #[method_id(@__retain_semantics Other seconds)] pub unsafe fn seconds() -> Id; - #[method_id(milliseconds)] + #[method_id(@__retain_semantics Other milliseconds)] pub unsafe fn milliseconds() -> Id; - #[method_id(microseconds)] + #[method_id(@__retain_semantics Other microseconds)] pub unsafe fn microseconds() -> Id; - #[method_id(nanoseconds)] + #[method_id(@__retain_semantics Other nanoseconds)] pub unsafe fn nanoseconds() -> Id; - #[method_id(picoseconds)] + #[method_id(@__retain_semantics Other picoseconds)] pub unsafe fn picoseconds() -> Id; } ); @@ -298,22 +298,22 @@ extern_class!( extern_methods!( unsafe impl NSUnitElectricCharge { - #[method_id(coulombs)] + #[method_id(@__retain_semantics Other coulombs)] pub unsafe fn coulombs() -> Id; - #[method_id(megaampereHours)] + #[method_id(@__retain_semantics Other megaampereHours)] pub unsafe fn megaampereHours() -> Id; - #[method_id(kiloampereHours)] + #[method_id(@__retain_semantics Other kiloampereHours)] pub unsafe fn kiloampereHours() -> Id; - #[method_id(ampereHours)] + #[method_id(@__retain_semantics Other ampereHours)] pub unsafe fn ampereHours() -> Id; - #[method_id(milliampereHours)] + #[method_id(@__retain_semantics Other milliampereHours)] pub unsafe fn milliampereHours() -> Id; - #[method_id(microampereHours)] + #[method_id(@__retain_semantics Other microampereHours)] pub unsafe fn microampereHours() -> Id; } ); @@ -329,19 +329,19 @@ extern_class!( extern_methods!( unsafe impl NSUnitElectricCurrent { - #[method_id(megaamperes)] + #[method_id(@__retain_semantics Other megaamperes)] pub unsafe fn megaamperes() -> Id; - #[method_id(kiloamperes)] + #[method_id(@__retain_semantics Other kiloamperes)] pub unsafe fn kiloamperes() -> Id; - #[method_id(amperes)] + #[method_id(@__retain_semantics Other amperes)] pub unsafe fn amperes() -> Id; - #[method_id(milliamperes)] + #[method_id(@__retain_semantics Other milliamperes)] pub unsafe fn milliamperes() -> Id; - #[method_id(microamperes)] + #[method_id(@__retain_semantics Other microamperes)] pub unsafe fn microamperes() -> Id; } ); @@ -357,19 +357,19 @@ extern_class!( extern_methods!( unsafe impl NSUnitElectricPotentialDifference { - #[method_id(megavolts)] + #[method_id(@__retain_semantics Other megavolts)] pub unsafe fn megavolts() -> Id; - #[method_id(kilovolts)] + #[method_id(@__retain_semantics Other kilovolts)] pub unsafe fn kilovolts() -> Id; - #[method_id(volts)] + #[method_id(@__retain_semantics Other volts)] pub unsafe fn volts() -> Id; - #[method_id(millivolts)] + #[method_id(@__retain_semantics Other millivolts)] pub unsafe fn millivolts() -> Id; - #[method_id(microvolts)] + #[method_id(@__retain_semantics Other microvolts)] pub unsafe fn microvolts() -> Id; } ); @@ -385,19 +385,19 @@ extern_class!( extern_methods!( unsafe impl NSUnitElectricResistance { - #[method_id(megaohms)] + #[method_id(@__retain_semantics Other megaohms)] pub unsafe fn megaohms() -> Id; - #[method_id(kiloohms)] + #[method_id(@__retain_semantics Other kiloohms)] pub unsafe fn kiloohms() -> Id; - #[method_id(ohms)] + #[method_id(@__retain_semantics Other ohms)] pub unsafe fn ohms() -> Id; - #[method_id(milliohms)] + #[method_id(@__retain_semantics Other milliohms)] pub unsafe fn milliohms() -> Id; - #[method_id(microohms)] + #[method_id(@__retain_semantics Other microohms)] pub unsafe fn microohms() -> Id; } ); @@ -413,19 +413,19 @@ extern_class!( extern_methods!( unsafe impl NSUnitEnergy { - #[method_id(kilojoules)] + #[method_id(@__retain_semantics Other kilojoules)] pub unsafe fn kilojoules() -> Id; - #[method_id(joules)] + #[method_id(@__retain_semantics Other joules)] pub unsafe fn joules() -> Id; - #[method_id(kilocalories)] + #[method_id(@__retain_semantics Other kilocalories)] pub unsafe fn kilocalories() -> Id; - #[method_id(calories)] + #[method_id(@__retain_semantics Other calories)] pub unsafe fn calories() -> Id; - #[method_id(kilowattHours)] + #[method_id(@__retain_semantics Other kilowattHours)] pub unsafe fn kilowattHours() -> Id; } ); @@ -441,31 +441,31 @@ extern_class!( extern_methods!( unsafe impl NSUnitFrequency { - #[method_id(terahertz)] + #[method_id(@__retain_semantics Other terahertz)] pub unsafe fn terahertz() -> Id; - #[method_id(gigahertz)] + #[method_id(@__retain_semantics Other gigahertz)] pub unsafe fn gigahertz() -> Id; - #[method_id(megahertz)] + #[method_id(@__retain_semantics Other megahertz)] pub unsafe fn megahertz() -> Id; - #[method_id(kilohertz)] + #[method_id(@__retain_semantics Other kilohertz)] pub unsafe fn kilohertz() -> Id; - #[method_id(hertz)] + #[method_id(@__retain_semantics Other hertz)] pub unsafe fn hertz() -> Id; - #[method_id(millihertz)] + #[method_id(@__retain_semantics Other millihertz)] pub unsafe fn millihertz() -> Id; - #[method_id(microhertz)] + #[method_id(@__retain_semantics Other microhertz)] pub unsafe fn microhertz() -> Id; - #[method_id(nanohertz)] + #[method_id(@__retain_semantics Other nanohertz)] pub unsafe fn nanohertz() -> Id; - #[method_id(framesPerSecond)] + #[method_id(@__retain_semantics Other framesPerSecond)] pub unsafe fn framesPerSecond() -> Id; } ); @@ -481,13 +481,13 @@ extern_class!( extern_methods!( unsafe impl NSUnitFuelEfficiency { - #[method_id(litersPer100Kilometers)] + #[method_id(@__retain_semantics Other litersPer100Kilometers)] pub unsafe fn litersPer100Kilometers() -> Id; - #[method_id(milesPerImperialGallon)] + #[method_id(@__retain_semantics Other milesPerImperialGallon)] pub unsafe fn milesPerImperialGallon() -> Id; - #[method_id(milesPerGallon)] + #[method_id(@__retain_semantics Other milesPerGallon)] pub unsafe fn milesPerGallon() -> Id; } ); @@ -503,109 +503,109 @@ extern_class!( extern_methods!( unsafe impl NSUnitInformationStorage { - #[method_id(bytes)] + #[method_id(@__retain_semantics Other bytes)] pub unsafe fn bytes() -> Id; - #[method_id(bits)] + #[method_id(@__retain_semantics Other bits)] pub unsafe fn bits() -> Id; - #[method_id(nibbles)] + #[method_id(@__retain_semantics Other nibbles)] pub unsafe fn nibbles() -> Id; - #[method_id(yottabytes)] + #[method_id(@__retain_semantics Other yottabytes)] pub unsafe fn yottabytes() -> Id; - #[method_id(zettabytes)] + #[method_id(@__retain_semantics Other zettabytes)] pub unsafe fn zettabytes() -> Id; - #[method_id(exabytes)] + #[method_id(@__retain_semantics Other exabytes)] pub unsafe fn exabytes() -> Id; - #[method_id(petabytes)] + #[method_id(@__retain_semantics Other petabytes)] pub unsafe fn petabytes() -> Id; - #[method_id(terabytes)] + #[method_id(@__retain_semantics Other terabytes)] pub unsafe fn terabytes() -> Id; - #[method_id(gigabytes)] + #[method_id(@__retain_semantics Other gigabytes)] pub unsafe fn gigabytes() -> Id; - #[method_id(megabytes)] + #[method_id(@__retain_semantics Other megabytes)] pub unsafe fn megabytes() -> Id; - #[method_id(kilobytes)] + #[method_id(@__retain_semantics Other kilobytes)] pub unsafe fn kilobytes() -> Id; - #[method_id(yottabits)] + #[method_id(@__retain_semantics Other yottabits)] pub unsafe fn yottabits() -> Id; - #[method_id(zettabits)] + #[method_id(@__retain_semantics Other zettabits)] pub unsafe fn zettabits() -> Id; - #[method_id(exabits)] + #[method_id(@__retain_semantics Other exabits)] pub unsafe fn exabits() -> Id; - #[method_id(petabits)] + #[method_id(@__retain_semantics Other petabits)] pub unsafe fn petabits() -> Id; - #[method_id(terabits)] + #[method_id(@__retain_semantics Other terabits)] pub unsafe fn terabits() -> Id; - #[method_id(gigabits)] + #[method_id(@__retain_semantics Other gigabits)] pub unsafe fn gigabits() -> Id; - #[method_id(megabits)] + #[method_id(@__retain_semantics Other megabits)] pub unsafe fn megabits() -> Id; - #[method_id(kilobits)] + #[method_id(@__retain_semantics Other kilobits)] pub unsafe fn kilobits() -> Id; - #[method_id(yobibytes)] + #[method_id(@__retain_semantics Other yobibytes)] pub unsafe fn yobibytes() -> Id; - #[method_id(zebibytes)] + #[method_id(@__retain_semantics Other zebibytes)] pub unsafe fn zebibytes() -> Id; - #[method_id(exbibytes)] + #[method_id(@__retain_semantics Other exbibytes)] pub unsafe fn exbibytes() -> Id; - #[method_id(pebibytes)] + #[method_id(@__retain_semantics Other pebibytes)] pub unsafe fn pebibytes() -> Id; - #[method_id(tebibytes)] + #[method_id(@__retain_semantics Other tebibytes)] pub unsafe fn tebibytes() -> Id; - #[method_id(gibibytes)] + #[method_id(@__retain_semantics Other gibibytes)] pub unsafe fn gibibytes() -> Id; - #[method_id(mebibytes)] + #[method_id(@__retain_semantics Other mebibytes)] pub unsafe fn mebibytes() -> Id; - #[method_id(kibibytes)] + #[method_id(@__retain_semantics Other kibibytes)] pub unsafe fn kibibytes() -> Id; - #[method_id(yobibits)] + #[method_id(@__retain_semantics Other yobibits)] pub unsafe fn yobibits() -> Id; - #[method_id(zebibits)] + #[method_id(@__retain_semantics Other zebibits)] pub unsafe fn zebibits() -> Id; - #[method_id(exbibits)] + #[method_id(@__retain_semantics Other exbibits)] pub unsafe fn exbibits() -> Id; - #[method_id(pebibits)] + #[method_id(@__retain_semantics Other pebibits)] pub unsafe fn pebibits() -> Id; - #[method_id(tebibits)] + #[method_id(@__retain_semantics Other tebibits)] pub unsafe fn tebibits() -> Id; - #[method_id(gibibits)] + #[method_id(@__retain_semantics Other gibibits)] pub unsafe fn gibibits() -> Id; - #[method_id(mebibits)] + #[method_id(@__retain_semantics Other mebibits)] pub unsafe fn mebibits() -> Id; - #[method_id(kibibits)] + #[method_id(@__retain_semantics Other kibibits)] pub unsafe fn kibibits() -> Id; } ); @@ -621,70 +621,70 @@ extern_class!( extern_methods!( unsafe impl NSUnitLength { - #[method_id(megameters)] + #[method_id(@__retain_semantics Other megameters)] pub unsafe fn megameters() -> Id; - #[method_id(kilometers)] + #[method_id(@__retain_semantics Other kilometers)] pub unsafe fn kilometers() -> Id; - #[method_id(hectometers)] + #[method_id(@__retain_semantics Other hectometers)] pub unsafe fn hectometers() -> Id; - #[method_id(decameters)] + #[method_id(@__retain_semantics Other decameters)] pub unsafe fn decameters() -> Id; - #[method_id(meters)] + #[method_id(@__retain_semantics Other meters)] pub unsafe fn meters() -> Id; - #[method_id(decimeters)] + #[method_id(@__retain_semantics Other decimeters)] pub unsafe fn decimeters() -> Id; - #[method_id(centimeters)] + #[method_id(@__retain_semantics Other centimeters)] pub unsafe fn centimeters() -> Id; - #[method_id(millimeters)] + #[method_id(@__retain_semantics Other millimeters)] pub unsafe fn millimeters() -> Id; - #[method_id(micrometers)] + #[method_id(@__retain_semantics Other micrometers)] pub unsafe fn micrometers() -> Id; - #[method_id(nanometers)] + #[method_id(@__retain_semantics Other nanometers)] pub unsafe fn nanometers() -> Id; - #[method_id(picometers)] + #[method_id(@__retain_semantics Other picometers)] pub unsafe fn picometers() -> Id; - #[method_id(inches)] + #[method_id(@__retain_semantics Other inches)] pub unsafe fn inches() -> Id; - #[method_id(feet)] + #[method_id(@__retain_semantics Other feet)] pub unsafe fn feet() -> Id; - #[method_id(yards)] + #[method_id(@__retain_semantics Other yards)] pub unsafe fn yards() -> Id; - #[method_id(miles)] + #[method_id(@__retain_semantics Other miles)] pub unsafe fn miles() -> Id; - #[method_id(scandinavianMiles)] + #[method_id(@__retain_semantics Other scandinavianMiles)] pub unsafe fn scandinavianMiles() -> Id; - #[method_id(lightyears)] + #[method_id(@__retain_semantics Other lightyears)] pub unsafe fn lightyears() -> Id; - #[method_id(nauticalMiles)] + #[method_id(@__retain_semantics Other nauticalMiles)] pub unsafe fn nauticalMiles() -> Id; - #[method_id(fathoms)] + #[method_id(@__retain_semantics Other fathoms)] pub unsafe fn fathoms() -> Id; - #[method_id(furlongs)] + #[method_id(@__retain_semantics Other furlongs)] pub unsafe fn furlongs() -> Id; - #[method_id(astronomicalUnits)] + #[method_id(@__retain_semantics Other astronomicalUnits)] pub unsafe fn astronomicalUnits() -> Id; - #[method_id(parsecs)] + #[method_id(@__retain_semantics Other parsecs)] pub unsafe fn parsecs() -> Id; } ); @@ -700,7 +700,7 @@ extern_class!( extern_methods!( unsafe impl NSUnitIlluminance { - #[method_id(lux)] + #[method_id(@__retain_semantics Other lux)] pub unsafe fn lux() -> Id; } ); @@ -716,52 +716,52 @@ extern_class!( extern_methods!( unsafe impl NSUnitMass { - #[method_id(kilograms)] + #[method_id(@__retain_semantics Other kilograms)] pub unsafe fn kilograms() -> Id; - #[method_id(grams)] + #[method_id(@__retain_semantics Other grams)] pub unsafe fn grams() -> Id; - #[method_id(decigrams)] + #[method_id(@__retain_semantics Other decigrams)] pub unsafe fn decigrams() -> Id; - #[method_id(centigrams)] + #[method_id(@__retain_semantics Other centigrams)] pub unsafe fn centigrams() -> Id; - #[method_id(milligrams)] + #[method_id(@__retain_semantics Other milligrams)] pub unsafe fn milligrams() -> Id; - #[method_id(micrograms)] + #[method_id(@__retain_semantics Other micrograms)] pub unsafe fn micrograms() -> Id; - #[method_id(nanograms)] + #[method_id(@__retain_semantics Other nanograms)] pub unsafe fn nanograms() -> Id; - #[method_id(picograms)] + #[method_id(@__retain_semantics Other picograms)] pub unsafe fn picograms() -> Id; - #[method_id(ounces)] + #[method_id(@__retain_semantics Other ounces)] pub unsafe fn ounces() -> Id; - #[method_id(poundsMass)] + #[method_id(@__retain_semantics Other poundsMass)] pub unsafe fn poundsMass() -> Id; - #[method_id(stones)] + #[method_id(@__retain_semantics Other stones)] pub unsafe fn stones() -> Id; - #[method_id(metricTons)] + #[method_id(@__retain_semantics Other metricTons)] pub unsafe fn metricTons() -> Id; - #[method_id(shortTons)] + #[method_id(@__retain_semantics Other shortTons)] pub unsafe fn shortTons() -> Id; - #[method_id(carats)] + #[method_id(@__retain_semantics Other carats)] pub unsafe fn carats() -> Id; - #[method_id(ouncesTroy)] + #[method_id(@__retain_semantics Other ouncesTroy)] pub unsafe fn ouncesTroy() -> Id; - #[method_id(slugs)] + #[method_id(@__retain_semantics Other slugs)] pub unsafe fn slugs() -> Id; } ); @@ -777,37 +777,37 @@ extern_class!( extern_methods!( unsafe impl NSUnitPower { - #[method_id(terawatts)] + #[method_id(@__retain_semantics Other terawatts)] pub unsafe fn terawatts() -> Id; - #[method_id(gigawatts)] + #[method_id(@__retain_semantics Other gigawatts)] pub unsafe fn gigawatts() -> Id; - #[method_id(megawatts)] + #[method_id(@__retain_semantics Other megawatts)] pub unsafe fn megawatts() -> Id; - #[method_id(kilowatts)] + #[method_id(@__retain_semantics Other kilowatts)] pub unsafe fn kilowatts() -> Id; - #[method_id(watts)] + #[method_id(@__retain_semantics Other watts)] pub unsafe fn watts() -> Id; - #[method_id(milliwatts)] + #[method_id(@__retain_semantics Other milliwatts)] pub unsafe fn milliwatts() -> Id; - #[method_id(microwatts)] + #[method_id(@__retain_semantics Other microwatts)] pub unsafe fn microwatts() -> Id; - #[method_id(nanowatts)] + #[method_id(@__retain_semantics Other nanowatts)] pub unsafe fn nanowatts() -> Id; - #[method_id(picowatts)] + #[method_id(@__retain_semantics Other picowatts)] pub unsafe fn picowatts() -> Id; - #[method_id(femtowatts)] + #[method_id(@__retain_semantics Other femtowatts)] pub unsafe fn femtowatts() -> Id; - #[method_id(horsepower)] + #[method_id(@__retain_semantics Other horsepower)] pub unsafe fn horsepower() -> Id; } ); @@ -823,34 +823,34 @@ extern_class!( extern_methods!( unsafe impl NSUnitPressure { - #[method_id(newtonsPerMetersSquared)] + #[method_id(@__retain_semantics Other newtonsPerMetersSquared)] pub unsafe fn newtonsPerMetersSquared() -> Id; - #[method_id(gigapascals)] + #[method_id(@__retain_semantics Other gigapascals)] pub unsafe fn gigapascals() -> Id; - #[method_id(megapascals)] + #[method_id(@__retain_semantics Other megapascals)] pub unsafe fn megapascals() -> Id; - #[method_id(kilopascals)] + #[method_id(@__retain_semantics Other kilopascals)] pub unsafe fn kilopascals() -> Id; - #[method_id(hectopascals)] + #[method_id(@__retain_semantics Other hectopascals)] pub unsafe fn hectopascals() -> Id; - #[method_id(inchesOfMercury)] + #[method_id(@__retain_semantics Other inchesOfMercury)] pub unsafe fn inchesOfMercury() -> Id; - #[method_id(bars)] + #[method_id(@__retain_semantics Other bars)] pub unsafe fn bars() -> Id; - #[method_id(millibars)] + #[method_id(@__retain_semantics Other millibars)] pub unsafe fn millibars() -> Id; - #[method_id(millimetersOfMercury)] + #[method_id(@__retain_semantics Other millimetersOfMercury)] pub unsafe fn millimetersOfMercury() -> Id; - #[method_id(poundsForcePerSquareInch)] + #[method_id(@__retain_semantics Other poundsForcePerSquareInch)] pub unsafe fn poundsForcePerSquareInch() -> Id; } ); @@ -866,16 +866,16 @@ extern_class!( extern_methods!( unsafe impl NSUnitSpeed { - #[method_id(metersPerSecond)] + #[method_id(@__retain_semantics Other metersPerSecond)] pub unsafe fn metersPerSecond() -> Id; - #[method_id(kilometersPerHour)] + #[method_id(@__retain_semantics Other kilometersPerHour)] pub unsafe fn kilometersPerHour() -> Id; - #[method_id(milesPerHour)] + #[method_id(@__retain_semantics Other milesPerHour)] pub unsafe fn milesPerHour() -> Id; - #[method_id(knots)] + #[method_id(@__retain_semantics Other knots)] pub unsafe fn knots() -> Id; } ); @@ -891,13 +891,13 @@ extern_class!( extern_methods!( unsafe impl NSUnitTemperature { - #[method_id(kelvin)] + #[method_id(@__retain_semantics Other kelvin)] pub unsafe fn kelvin() -> Id; - #[method_id(celsius)] + #[method_id(@__retain_semantics Other celsius)] pub unsafe fn celsius() -> Id; - #[method_id(fahrenheit)] + #[method_id(@__retain_semantics Other fahrenheit)] pub unsafe fn fahrenheit() -> Id; } ); @@ -913,97 +913,97 @@ extern_class!( extern_methods!( unsafe impl NSUnitVolume { - #[method_id(megaliters)] + #[method_id(@__retain_semantics Other megaliters)] pub unsafe fn megaliters() -> Id; - #[method_id(kiloliters)] + #[method_id(@__retain_semantics Other kiloliters)] pub unsafe fn kiloliters() -> Id; - #[method_id(liters)] + #[method_id(@__retain_semantics Other liters)] pub unsafe fn liters() -> Id; - #[method_id(deciliters)] + #[method_id(@__retain_semantics Other deciliters)] pub unsafe fn deciliters() -> Id; - #[method_id(centiliters)] + #[method_id(@__retain_semantics Other centiliters)] pub unsafe fn centiliters() -> Id; - #[method_id(milliliters)] + #[method_id(@__retain_semantics Other milliliters)] pub unsafe fn milliliters() -> Id; - #[method_id(cubicKilometers)] + #[method_id(@__retain_semantics Other cubicKilometers)] pub unsafe fn cubicKilometers() -> Id; - #[method_id(cubicMeters)] + #[method_id(@__retain_semantics Other cubicMeters)] pub unsafe fn cubicMeters() -> Id; - #[method_id(cubicDecimeters)] + #[method_id(@__retain_semantics Other cubicDecimeters)] pub unsafe fn cubicDecimeters() -> Id; - #[method_id(cubicCentimeters)] + #[method_id(@__retain_semantics Other cubicCentimeters)] pub unsafe fn cubicCentimeters() -> Id; - #[method_id(cubicMillimeters)] + #[method_id(@__retain_semantics Other cubicMillimeters)] pub unsafe fn cubicMillimeters() -> Id; - #[method_id(cubicInches)] + #[method_id(@__retain_semantics Other cubicInches)] pub unsafe fn cubicInches() -> Id; - #[method_id(cubicFeet)] + #[method_id(@__retain_semantics Other cubicFeet)] pub unsafe fn cubicFeet() -> Id; - #[method_id(cubicYards)] + #[method_id(@__retain_semantics Other cubicYards)] pub unsafe fn cubicYards() -> Id; - #[method_id(cubicMiles)] + #[method_id(@__retain_semantics Other cubicMiles)] pub unsafe fn cubicMiles() -> Id; - #[method_id(acreFeet)] + #[method_id(@__retain_semantics Other acreFeet)] pub unsafe fn acreFeet() -> Id; - #[method_id(bushels)] + #[method_id(@__retain_semantics Other bushels)] pub unsafe fn bushels() -> Id; - #[method_id(teaspoons)] + #[method_id(@__retain_semantics Other teaspoons)] pub unsafe fn teaspoons() -> Id; - #[method_id(tablespoons)] + #[method_id(@__retain_semantics Other tablespoons)] pub unsafe fn tablespoons() -> Id; - #[method_id(fluidOunces)] + #[method_id(@__retain_semantics Other fluidOunces)] pub unsafe fn fluidOunces() -> Id; - #[method_id(cups)] + #[method_id(@__retain_semantics Other cups)] pub unsafe fn cups() -> Id; - #[method_id(pints)] + #[method_id(@__retain_semantics Other pints)] pub unsafe fn pints() -> Id; - #[method_id(quarts)] + #[method_id(@__retain_semantics Other quarts)] pub unsafe fn quarts() -> Id; - #[method_id(gallons)] + #[method_id(@__retain_semantics Other gallons)] pub unsafe fn gallons() -> Id; - #[method_id(imperialTeaspoons)] + #[method_id(@__retain_semantics Other imperialTeaspoons)] pub unsafe fn imperialTeaspoons() -> Id; - #[method_id(imperialTablespoons)] + #[method_id(@__retain_semantics Other imperialTablespoons)] pub unsafe fn imperialTablespoons() -> Id; - #[method_id(imperialFluidOunces)] + #[method_id(@__retain_semantics Other imperialFluidOunces)] pub unsafe fn imperialFluidOunces() -> Id; - #[method_id(imperialPints)] + #[method_id(@__retain_semantics Other imperialPints)] pub unsafe fn imperialPints() -> Id; - #[method_id(imperialQuarts)] + #[method_id(@__retain_semantics Other imperialQuarts)] pub unsafe fn imperialQuarts() -> Id; - #[method_id(imperialGallons)] + #[method_id(@__retain_semantics Other imperialGallons)] pub unsafe fn imperialGallons() -> Id; - #[method_id(metricCups)] + #[method_id(@__retain_semantics Other metricCups)] pub unsafe fn metricCups() -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index fa39f10b5..64c05924e 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -16,25 +16,25 @@ extern_class!( extern_methods!( unsafe impl NSUserActivity { - #[method_id(initWithActivityType:)] + #[method_id(@__retain_semantics Init initWithActivityType:)] pub unsafe fn initWithActivityType( this: Option>, activityType: &NSString, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(activityType)] + #[method_id(@__retain_semantics Other activityType)] pub unsafe fn activityType(&self) -> Id; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>; #[method(setUserInfo:)] @@ -43,7 +43,7 @@ extern_methods!( #[method(addUserInfoEntriesFromDictionary:)] pub unsafe fn addUserInfoEntriesFromDictionary(&self, otherDictionary: &NSDictionary); - #[method_id(requiredUserInfoKeys)] + #[method_id(@__retain_semantics Other requiredUserInfoKeys)] pub unsafe fn requiredUserInfoKeys(&self) -> Option, Shared>>; #[method(setRequiredUserInfoKeys:)] @@ -58,25 +58,25 @@ extern_methods!( #[method(setNeedsSave:)] pub unsafe fn setNeedsSave(&self, needsSave: bool); - #[method_id(webpageURL)] + #[method_id(@__retain_semantics Other webpageURL)] pub unsafe fn webpageURL(&self) -> Option>; #[method(setWebpageURL:)] pub unsafe fn setWebpageURL(&self, webpageURL: Option<&NSURL>); - #[method_id(referrerURL)] + #[method_id(@__retain_semantics Other referrerURL)] pub unsafe fn referrerURL(&self) -> Option>; #[method(setReferrerURL:)] pub unsafe fn setReferrerURL(&self, referrerURL: Option<&NSURL>); - #[method_id(expirationDate)] + #[method_id(@__retain_semantics Other expirationDate)] pub unsafe fn expirationDate(&self) -> Option>; #[method(setExpirationDate:)] pub unsafe fn setExpirationDate(&self, expirationDate: Option<&NSDate>); - #[method_id(keywords)] + #[method_id(@__retain_semantics Other keywords)] pub unsafe fn keywords(&self) -> Id, Shared>; #[method(setKeywords:)] @@ -88,13 +88,13 @@ extern_methods!( #[method(setSupportsContinuationStreams:)] pub unsafe fn setSupportsContinuationStreams(&self, supportsContinuationStreams: bool); - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSUserActivityDelegate>); - #[method_id(targetContentIdentifier)] + #[method_id(@__retain_semantics Other targetContentIdentifier)] pub unsafe fn targetContentIdentifier(&self) -> Option>; #[method(setTargetContentIdentifier:)] @@ -139,7 +139,7 @@ extern_methods!( #[method(setEligibleForPrediction:)] pub unsafe fn setEligibleForPrediction(&self, eligibleForPrediction: bool); - #[method_id(persistentIdentifier)] + #[method_id(@__retain_semantics Other persistentIdentifier)] pub unsafe fn persistentIdentifier( &self, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index e95335552..ab9105667 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -26,28 +26,28 @@ extern_class!( extern_methods!( unsafe impl NSUserDefaults { - #[method_id(standardUserDefaults)] + #[method_id(@__retain_semantics Other standardUserDefaults)] pub unsafe fn standardUserDefaults() -> Id; #[method(resetStandardUserDefaults)] pub unsafe fn resetStandardUserDefaults(); - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithSuiteName:)] + #[method_id(@__retain_semantics Init initWithSuiteName:)] pub unsafe fn initWithSuiteName( this: Option>, suitename: Option<&NSString>, ) -> Option>; - #[method_id(initWithUser:)] + #[method_id(@__retain_semantics Init initWithUser:)] pub unsafe fn initWithUser( this: Option>, username: &NSString, ) -> Option>; - #[method_id(objectForKey:)] + #[method_id(@__retain_semantics Other objectForKey:)] pub unsafe fn objectForKey(&self, defaultName: &NSString) -> Option>; #[method(setObject:forKey:)] @@ -56,22 +56,22 @@ extern_methods!( #[method(removeObjectForKey:)] pub unsafe fn removeObjectForKey(&self, defaultName: &NSString); - #[method_id(stringForKey:)] + #[method_id(@__retain_semantics Other stringForKey:)] pub unsafe fn stringForKey(&self, defaultName: &NSString) -> Option>; - #[method_id(arrayForKey:)] + #[method_id(@__retain_semantics Other arrayForKey:)] pub unsafe fn arrayForKey(&self, defaultName: &NSString) -> Option>; - #[method_id(dictionaryForKey:)] + #[method_id(@__retain_semantics Other dictionaryForKey:)] pub unsafe fn dictionaryForKey( &self, defaultName: &NSString, ) -> Option, Shared>>; - #[method_id(dataForKey:)] + #[method_id(@__retain_semantics Other dataForKey:)] pub unsafe fn dataForKey(&self, defaultName: &NSString) -> Option>; - #[method_id(stringArrayForKey:)] + #[method_id(@__retain_semantics Other stringArrayForKey:)] pub unsafe fn stringArrayForKey( &self, defaultName: &NSString, @@ -89,7 +89,7 @@ extern_methods!( #[method(boolForKey:)] pub unsafe fn boolForKey(&self, defaultName: &NSString) -> bool; - #[method_id(URLForKey:)] + #[method_id(@__retain_semantics Other URLForKey:)] pub unsafe fn URLForKey(&self, defaultName: &NSString) -> Option>; #[method(setInteger:forKey:)] @@ -119,14 +119,14 @@ extern_methods!( #[method(removeSuiteNamed:)] pub unsafe fn removeSuiteNamed(&self, suiteName: &NSString); - #[method_id(dictionaryRepresentation)] + #[method_id(@__retain_semantics Other dictionaryRepresentation)] pub unsafe fn dictionaryRepresentation(&self) -> Id, Shared>; - #[method_id(volatileDomainNames)] + #[method_id(@__retain_semantics Other volatileDomainNames)] pub unsafe fn volatileDomainNames(&self) -> Id, Shared>; - #[method_id(volatileDomainForName:)] + #[method_id(@__retain_semantics Other volatileDomainForName:)] pub unsafe fn volatileDomainForName( &self, domainName: &NSString, @@ -142,10 +142,10 @@ extern_methods!( #[method(removeVolatileDomainForName:)] pub unsafe fn removeVolatileDomainForName(&self, domainName: &NSString); - #[method_id(persistentDomainNames)] + #[method_id(@__retain_semantics Other persistentDomainNames)] pub unsafe fn persistentDomainNames(&self) -> Id; - #[method_id(persistentDomainForName:)] + #[method_id(@__retain_semantics Other persistentDomainForName:)] pub unsafe fn persistentDomainForName( &self, domainName: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 96ab44f27..0a29bf059 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -22,52 +22,52 @@ extern_class!( extern_methods!( unsafe impl NSUserNotification { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; #[method(setTitle:)] pub unsafe fn setTitle(&self, title: Option<&NSString>); - #[method_id(subtitle)] + #[method_id(@__retain_semantics Other subtitle)] pub unsafe fn subtitle(&self) -> Option>; #[method(setSubtitle:)] pub unsafe fn setSubtitle(&self, subtitle: Option<&NSString>); - #[method_id(informativeText)] + #[method_id(@__retain_semantics Other informativeText)] pub unsafe fn informativeText(&self) -> Option>; #[method(setInformativeText:)] pub unsafe fn setInformativeText(&self, informativeText: Option<&NSString>); - #[method_id(actionButtonTitle)] + #[method_id(@__retain_semantics Other actionButtonTitle)] pub unsafe fn actionButtonTitle(&self) -> Id; #[method(setActionButtonTitle:)] pub unsafe fn setActionButtonTitle(&self, actionButtonTitle: &NSString); - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option, Shared>>; #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); - #[method_id(deliveryDate)] + #[method_id(@__retain_semantics Other deliveryDate)] pub unsafe fn deliveryDate(&self) -> Option>; #[method(setDeliveryDate:)] pub unsafe fn setDeliveryDate(&self, deliveryDate: Option<&NSDate>); - #[method_id(deliveryTimeZone)] + #[method_id(@__retain_semantics Other deliveryTimeZone)] pub unsafe fn deliveryTimeZone(&self) -> Option>; #[method(setDeliveryTimeZone:)] pub unsafe fn setDeliveryTimeZone(&self, deliveryTimeZone: Option<&NSTimeZone>); - #[method_id(deliveryRepeatInterval)] + #[method_id(@__retain_semantics Other deliveryRepeatInterval)] pub unsafe fn deliveryRepeatInterval(&self) -> Option>; #[method(setDeliveryRepeatInterval:)] @@ -76,7 +76,7 @@ extern_methods!( deliveryRepeatInterval: Option<&NSDateComponents>, ); - #[method_id(actualDeliveryDate)] + #[method_id(@__retain_semantics Other actualDeliveryDate)] pub unsafe fn actualDeliveryDate(&self) -> Option>; #[method(isPresented)] @@ -85,7 +85,7 @@ extern_methods!( #[method(isRemote)] pub unsafe fn isRemote(&self) -> bool; - #[method_id(soundName)] + #[method_id(@__retain_semantics Other soundName)] pub unsafe fn soundName(&self) -> Option>; #[method(setSoundName:)] @@ -100,19 +100,19 @@ extern_methods!( #[method(activationType)] pub unsafe fn activationType(&self) -> NSUserNotificationActivationType; - #[method_id(otherButtonTitle)] + #[method_id(@__retain_semantics Other otherButtonTitle)] pub unsafe fn otherButtonTitle(&self) -> Id; #[method(setOtherButtonTitle:)] pub unsafe fn setOtherButtonTitle(&self, otherButtonTitle: &NSString); - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Option>; #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>); - #[method_id(contentImage)] + #[method_id(@__retain_semantics Other contentImage)] pub unsafe fn contentImage(&self) -> Option>; #[method(setContentImage:)] @@ -124,16 +124,16 @@ extern_methods!( #[method(setHasReplyButton:)] pub unsafe fn setHasReplyButton(&self, hasReplyButton: bool); - #[method_id(responsePlaceholder)] + #[method_id(@__retain_semantics Other responsePlaceholder)] pub unsafe fn responsePlaceholder(&self) -> Option>; #[method(setResponsePlaceholder:)] pub unsafe fn setResponsePlaceholder(&self, responsePlaceholder: Option<&NSString>); - #[method_id(response)] + #[method_id(@__retain_semantics Other response)] pub unsafe fn response(&self) -> Option>; - #[method_id(additionalActions)] + #[method_id(@__retain_semantics Other additionalActions)] pub unsafe fn additionalActions( &self, ) -> Option, Shared>>; @@ -144,7 +144,7 @@ extern_methods!( additionalActions: Option<&NSArray>, ); - #[method_id(additionalActivationAction)] + #[method_id(@__retain_semantics Other additionalActivationAction)] pub unsafe fn additionalActivationAction( &self, ) -> Option>; @@ -162,16 +162,16 @@ extern_class!( extern_methods!( unsafe impl NSUserNotificationAction { - #[method_id(actionWithIdentifier:title:)] + #[method_id(@__retain_semantics Other actionWithIdentifier:title:)] pub unsafe fn actionWithIdentifier_title( identifier: Option<&NSString>, title: Option<&NSString>, ) -> Id; - #[method_id(identifier)] + #[method_id(@__retain_semantics Other identifier)] pub unsafe fn identifier(&self) -> Option>; - #[method_id(title)] + #[method_id(@__retain_semantics Other title)] pub unsafe fn title(&self) -> Option>; } ); @@ -191,16 +191,16 @@ extern_class!( extern_methods!( unsafe impl NSUserNotificationCenter { - #[method_id(defaultUserNotificationCenter)] + #[method_id(@__retain_semantics Other defaultUserNotificationCenter)] pub unsafe fn defaultUserNotificationCenter() -> Id; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSUserNotificationCenterDelegate>); - #[method_id(scheduledNotifications)] + #[method_id(@__retain_semantics Other scheduledNotifications)] pub unsafe fn scheduledNotifications(&self) -> Id, Shared>; #[method(setScheduledNotifications:)] @@ -215,7 +215,7 @@ extern_methods!( #[method(removeScheduledNotification:)] pub unsafe fn removeScheduledNotification(&self, notification: &NSUserNotification); - #[method_id(deliveredNotifications)] + #[method_id(@__retain_semantics Other deliveredNotifications)] pub unsafe fn deliveredNotifications(&self) -> Id, Shared>; #[method(deliverNotification:)] diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index 894995fd3..a03f9a1c5 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -14,13 +14,13 @@ extern_class!( extern_methods!( unsafe impl NSUserScriptTask { - #[method_id(initWithURL:error:)] + #[method_id(@__retain_semantics Init initWithURL:error:)] pub unsafe fn initWithURL_error( this: Option>, url: &NSURL, ) -> Result, Id>; - #[method_id(scriptURL)] + #[method_id(@__retain_semantics Other scriptURL)] pub unsafe fn scriptURL(&self) -> Id; #[method(executeWithCompletionHandler:)] @@ -42,19 +42,19 @@ extern_class!( extern_methods!( unsafe impl NSUserUnixTask { - #[method_id(standardInput)] + #[method_id(@__retain_semantics Other standardInput)] pub unsafe fn standardInput(&self) -> Option>; #[method(setStandardInput:)] pub unsafe fn setStandardInput(&self, standardInput: Option<&NSFileHandle>); - #[method_id(standardOutput)] + #[method_id(@__retain_semantics Other standardOutput)] pub unsafe fn standardOutput(&self) -> Option>; #[method(setStandardOutput:)] pub unsafe fn setStandardOutput(&self, standardOutput: Option<&NSFileHandle>); - #[method_id(standardError)] + #[method_id(@__retain_semantics Other standardError)] pub unsafe fn standardError(&self) -> Option>; #[method(setStandardError:)] @@ -100,7 +100,7 @@ extern_class!( extern_methods!( unsafe impl NSUserAutomatorTask { - #[method_id(variables)] + #[method_id(@__retain_semantics Other variables)] pub unsafe fn variables(&self) -> Option, Shared>>; #[method(setVariables:)] diff --git a/crates/icrate/src/generated/Foundation/NSValue.rs b/crates/icrate/src/generated/Foundation/NSValue.rs index f7a016e0b..e2e4442c5 100644 --- a/crates/icrate/src/generated/Foundation/NSValue.rs +++ b/crates/icrate/src/generated/Foundation/NSValue.rs @@ -20,14 +20,14 @@ extern_methods!( #[method(objCType)] pub unsafe fn objCType(&self) -> NonNull; - #[method_id(initWithBytes:objCType:)] + #[method_id(@__retain_semantics Init initWithBytes:objCType:)] pub unsafe fn initWithBytes_objCType( this: Option>, value: NonNull, type_: NonNull, ) -> Id; - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, @@ -38,13 +38,13 @@ extern_methods!( extern_methods!( /// NSValueCreation unsafe impl NSValue { - #[method_id(valueWithBytes:objCType:)] + #[method_id(@__retain_semantics Other valueWithBytes:objCType:)] pub unsafe fn valueWithBytes_objCType( value: NonNull, type_: NonNull, ) -> Id; - #[method_id(value:withObjCType:)] + #[method_id(@__retain_semantics Other value:withObjCType:)] pub unsafe fn value_withObjCType( value: NonNull, type_: NonNull, @@ -55,13 +55,13 @@ extern_methods!( extern_methods!( /// NSValueExtensionMethods unsafe impl NSValue { - #[method_id(valueWithNonretainedObject:)] + #[method_id(@__retain_semantics Other valueWithNonretainedObject:)] pub unsafe fn valueWithNonretainedObject(anObject: Option<&Object>) -> Id; - #[method_id(nonretainedObjectValue)] + #[method_id(@__retain_semantics Other nonretainedObjectValue)] pub unsafe fn nonretainedObjectValue(&self) -> Option>; - #[method_id(valueWithPointer:)] + #[method_id(@__retain_semantics Other valueWithPointer:)] pub unsafe fn valueWithPointer(pointer: *mut c_void) -> Id; #[method(pointerValue)] @@ -83,97 +83,97 @@ extern_class!( extern_methods!( unsafe impl NSNumber { - #[method_id(initWithCoder:)] + #[method_id(@__retain_semantics Init initWithCoder:)] pub unsafe fn initWithCoder( this: Option>, coder: &NSCoder, ) -> Option>; - #[method_id(initWithChar:)] + #[method_id(@__retain_semantics Init initWithChar:)] pub unsafe fn initWithChar( this: Option>, value: c_char, ) -> Id; - #[method_id(initWithUnsignedChar:)] + #[method_id(@__retain_semantics Init initWithUnsignedChar:)] pub unsafe fn initWithUnsignedChar( this: Option>, value: c_uchar, ) -> Id; - #[method_id(initWithShort:)] + #[method_id(@__retain_semantics Init initWithShort:)] pub unsafe fn initWithShort( this: Option>, value: c_short, ) -> Id; - #[method_id(initWithUnsignedShort:)] + #[method_id(@__retain_semantics Init initWithUnsignedShort:)] pub unsafe fn initWithUnsignedShort( this: Option>, value: c_ushort, ) -> Id; - #[method_id(initWithInt:)] + #[method_id(@__retain_semantics Init initWithInt:)] pub unsafe fn initWithInt( this: Option>, value: c_int, ) -> Id; - #[method_id(initWithUnsignedInt:)] + #[method_id(@__retain_semantics Init initWithUnsignedInt:)] pub unsafe fn initWithUnsignedInt( this: Option>, value: c_uint, ) -> Id; - #[method_id(initWithLong:)] + #[method_id(@__retain_semantics Init initWithLong:)] pub unsafe fn initWithLong( this: Option>, value: c_long, ) -> Id; - #[method_id(initWithUnsignedLong:)] + #[method_id(@__retain_semantics Init initWithUnsignedLong:)] pub unsafe fn initWithUnsignedLong( this: Option>, value: c_ulong, ) -> Id; - #[method_id(initWithLongLong:)] + #[method_id(@__retain_semantics Init initWithLongLong:)] pub unsafe fn initWithLongLong( this: Option>, value: c_longlong, ) -> Id; - #[method_id(initWithUnsignedLongLong:)] + #[method_id(@__retain_semantics Init initWithUnsignedLongLong:)] pub unsafe fn initWithUnsignedLongLong( this: Option>, value: c_ulonglong, ) -> Id; - #[method_id(initWithFloat:)] + #[method_id(@__retain_semantics Init initWithFloat:)] pub unsafe fn initWithFloat( this: Option>, value: c_float, ) -> Id; - #[method_id(initWithDouble:)] + #[method_id(@__retain_semantics Init initWithDouble:)] pub unsafe fn initWithDouble( this: Option>, value: c_double, ) -> Id; - #[method_id(initWithBool:)] + #[method_id(@__retain_semantics Init initWithBool:)] pub unsafe fn initWithBool( this: Option>, value: bool, ) -> Id; - #[method_id(initWithInteger:)] + #[method_id(@__retain_semantics Init initWithInteger:)] pub unsafe fn initWithInteger( this: Option>, value: NSInteger, ) -> Id; - #[method_id(initWithUnsignedInteger:)] + #[method_id(@__retain_semantics Init initWithUnsignedInteger:)] pub unsafe fn initWithUnsignedInteger( this: Option>, value: NSUInteger, @@ -224,7 +224,7 @@ extern_methods!( #[method(unsignedIntegerValue)] pub unsafe fn unsignedIntegerValue(&self) -> NSUInteger; - #[method_id(stringValue)] + #[method_id(@__retain_semantics Other stringValue)] pub unsafe fn stringValue(&self) -> Id; #[method(compare:)] @@ -233,7 +233,7 @@ extern_methods!( #[method(isEqualToNumber:)] pub unsafe fn isEqualToNumber(&self, number: &NSNumber) -> bool; - #[method_id(descriptionWithLocale:)] + #[method_id(@__retain_semantics Other descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; } @@ -242,49 +242,49 @@ extern_methods!( extern_methods!( /// NSNumberCreation unsafe impl NSNumber { - #[method_id(numberWithChar:)] + #[method_id(@__retain_semantics Other numberWithChar:)] pub unsafe fn numberWithChar(value: c_char) -> Id; - #[method_id(numberWithUnsignedChar:)] + #[method_id(@__retain_semantics Other numberWithUnsignedChar:)] pub unsafe fn numberWithUnsignedChar(value: c_uchar) -> Id; - #[method_id(numberWithShort:)] + #[method_id(@__retain_semantics Other numberWithShort:)] pub unsafe fn numberWithShort(value: c_short) -> Id; - #[method_id(numberWithUnsignedShort:)] + #[method_id(@__retain_semantics Other numberWithUnsignedShort:)] pub unsafe fn numberWithUnsignedShort(value: c_ushort) -> Id; - #[method_id(numberWithInt:)] + #[method_id(@__retain_semantics Other numberWithInt:)] pub unsafe fn numberWithInt(value: c_int) -> Id; - #[method_id(numberWithUnsignedInt:)] + #[method_id(@__retain_semantics Other numberWithUnsignedInt:)] pub unsafe fn numberWithUnsignedInt(value: c_uint) -> Id; - #[method_id(numberWithLong:)] + #[method_id(@__retain_semantics Other numberWithLong:)] pub unsafe fn numberWithLong(value: c_long) -> Id; - #[method_id(numberWithUnsignedLong:)] + #[method_id(@__retain_semantics Other numberWithUnsignedLong:)] pub unsafe fn numberWithUnsignedLong(value: c_ulong) -> Id; - #[method_id(numberWithLongLong:)] + #[method_id(@__retain_semantics Other numberWithLongLong:)] pub unsafe fn numberWithLongLong(value: c_longlong) -> Id; - #[method_id(numberWithUnsignedLongLong:)] + #[method_id(@__retain_semantics Other numberWithUnsignedLongLong:)] pub unsafe fn numberWithUnsignedLongLong(value: c_ulonglong) -> Id; - #[method_id(numberWithFloat:)] + #[method_id(@__retain_semantics Other numberWithFloat:)] pub unsafe fn numberWithFloat(value: c_float) -> Id; - #[method_id(numberWithDouble:)] + #[method_id(@__retain_semantics Other numberWithDouble:)] pub unsafe fn numberWithDouble(value: c_double) -> Id; - #[method_id(numberWithBool:)] + #[method_id(@__retain_semantics Other numberWithBool:)] pub unsafe fn numberWithBool(value: bool) -> Id; - #[method_id(numberWithInteger:)] + #[method_id(@__retain_semantics Other numberWithInteger:)] pub unsafe fn numberWithInteger(value: NSInteger) -> Id; - #[method_id(numberWithUnsignedInteger:)] + #[method_id(@__retain_semantics Other numberWithUnsignedInteger:)] pub unsafe fn numberWithUnsignedInteger(value: NSUInteger) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index 421a9a87c..8299f9845 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -46,12 +46,12 @@ extern_methods!( name: &NSValueTransformerName, ); - #[method_id(valueTransformerForName:)] + #[method_id(@__retain_semantics Other valueTransformerForName:)] pub unsafe fn valueTransformerForName( name: &NSValueTransformerName, ) -> Option>; - #[method_id(valueTransformerNames)] + #[method_id(@__retain_semantics Other valueTransformerNames)] pub unsafe fn valueTransformerNames() -> Id, Shared>; #[method(transformedValueClass)] @@ -60,11 +60,11 @@ extern_methods!( #[method(allowsReverseTransformation)] pub unsafe fn allowsReverseTransformation() -> bool; - #[method_id(transformedValue:)] + #[method_id(@__retain_semantics Other transformedValue:)] pub unsafe fn transformedValue(&self, value: Option<&Object>) -> Option>; - #[method_id(reverseTransformedValue:)] + #[method_id(@__retain_semantics Other reverseTransformedValue:)] pub unsafe fn reverseTransformedValue( &self, value: Option<&Object>, @@ -83,7 +83,7 @@ extern_class!( extern_methods!( unsafe impl NSSecureUnarchiveFromDataTransformer { - #[method_id(allowedTopLevelClasses)] + #[method_id(@__retain_semantics Other allowedTopLevelClasses)] pub unsafe fn allowedTopLevelClasses() -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs index 27ea835b2..a165bd7bf 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTD.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTD.rs @@ -14,37 +14,37 @@ extern_class!( extern_methods!( unsafe impl NSXMLDTD { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithKind:options:)] + #[method_id(@__retain_semantics Init initWithKind:options:)] pub unsafe fn initWithKind_options( this: Option>, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; - #[method_id(initWithContentsOfURL:options:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( this: Option>, url: &NSURL, mask: NSXMLNodeOptions, ) -> Result, Id>; - #[method_id(initWithData:options:error:)] + #[method_id(@__retain_semantics Init initWithData:options:error:)] pub unsafe fn initWithData_options_error( this: Option>, data: &NSData, mask: NSXMLNodeOptions, ) -> Result, Id>; - #[method_id(publicID)] + #[method_id(@__retain_semantics Other publicID)] pub unsafe fn publicID(&self) -> Option>; #[method(setPublicID:)] pub unsafe fn setPublicID(&self, publicID: Option<&NSString>); - #[method_id(systemID)] + #[method_id(@__retain_semantics Other systemID)] pub unsafe fn systemID(&self) -> Option>; #[method(setSystemID:)] @@ -72,32 +72,32 @@ extern_methods!( #[method(replaceChildAtIndex:withNode:)] pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); - #[method_id(entityDeclarationForName:)] + #[method_id(@__retain_semantics Other entityDeclarationForName:)] pub unsafe fn entityDeclarationForName( &self, name: &NSString, ) -> Option>; - #[method_id(notationDeclarationForName:)] + #[method_id(@__retain_semantics Other notationDeclarationForName:)] pub unsafe fn notationDeclarationForName( &self, name: &NSString, ) -> Option>; - #[method_id(elementDeclarationForName:)] + #[method_id(@__retain_semantics Other elementDeclarationForName:)] pub unsafe fn elementDeclarationForName( &self, name: &NSString, ) -> Option>; - #[method_id(attributeDeclarationForName:elementName:)] + #[method_id(@__retain_semantics Other attributeDeclarationForName:elementName:)] pub unsafe fn attributeDeclarationForName_elementName( &self, name: &NSString, elementName: &NSString, ) -> Option>; - #[method_id(predefinedEntityDeclarationForName:)] + #[method_id(@__retain_semantics Other predefinedEntityDeclarationForName:)] pub unsafe fn predefinedEntityDeclarationForName( name: &NSString, ) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index 61f4da64f..f31becc24 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -36,20 +36,20 @@ extern_class!( extern_methods!( unsafe impl NSXMLDTDNode { - #[method_id(initWithXMLString:)] + #[method_id(@__retain_semantics Init initWithXMLString:)] pub unsafe fn initWithXMLString( this: Option>, string: &NSString, ) -> Option>; - #[method_id(initWithKind:options:)] + #[method_id(@__retain_semantics Init initWithKind:options:)] pub unsafe fn initWithKind_options( this: Option>, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; #[method(DTDKind)] @@ -61,19 +61,19 @@ extern_methods!( #[method(isExternal)] pub unsafe fn isExternal(&self) -> bool; - #[method_id(publicID)] + #[method_id(@__retain_semantics Other publicID)] pub unsafe fn publicID(&self) -> Option>; #[method(setPublicID:)] pub unsafe fn setPublicID(&self, publicID: Option<&NSString>); - #[method_id(systemID)] + #[method_id(@__retain_semantics Other systemID)] pub unsafe fn systemID(&self) -> Option>; #[method(setSystemID:)] pub unsafe fn setSystemID(&self, systemID: Option<&NSString>); - #[method_id(notationName)] + #[method_id(@__retain_semantics Other notationName)] pub unsafe fn notationName(&self) -> Option>; #[method(setNotationName:)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index 4736927a9..9f6ae1d20 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -20,31 +20,31 @@ extern_class!( extern_methods!( unsafe impl NSXMLDocument { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithXMLString:options:error:)] + #[method_id(@__retain_semantics Init initWithXMLString:options:error:)] pub unsafe fn initWithXMLString_options_error( this: Option>, string: &NSString, mask: NSXMLNodeOptions, ) -> Result, Id>; - #[method_id(initWithContentsOfURL:options:error:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:options:error:)] pub unsafe fn initWithContentsOfURL_options_error( this: Option>, url: &NSURL, mask: NSXMLNodeOptions, ) -> Result, Id>; - #[method_id(initWithData:options:error:)] + #[method_id(@__retain_semantics Init initWithData:options:error:)] pub unsafe fn initWithData_options_error( this: Option>, data: &NSData, mask: NSXMLNodeOptions, ) -> Result, Id>; - #[method_id(initWithRootElement:)] + #[method_id(@__retain_semantics Init initWithRootElement:)] pub unsafe fn initWithRootElement( this: Option>, element: Option<&NSXMLElement>, @@ -53,13 +53,13 @@ extern_methods!( #[method(replacementClassForClass:)] pub unsafe fn replacementClassForClass(cls: &Class) -> &'static Class; - #[method_id(characterEncoding)] + #[method_id(@__retain_semantics Other characterEncoding)] pub unsafe fn characterEncoding(&self) -> Option>; #[method(setCharacterEncoding:)] pub unsafe fn setCharacterEncoding(&self, characterEncoding: Option<&NSString>); - #[method_id(version)] + #[method_id(@__retain_semantics Other version)] pub unsafe fn version(&self) -> Option>; #[method(setVersion:)] @@ -77,13 +77,13 @@ extern_methods!( #[method(setDocumentContentKind:)] pub unsafe fn setDocumentContentKind(&self, documentContentKind: NSXMLDocumentContentKind); - #[method_id(MIMEType)] + #[method_id(@__retain_semantics Other MIMEType)] pub unsafe fn MIMEType(&self) -> Option>; #[method(setMIMEType:)] pub unsafe fn setMIMEType(&self, MIMEType: Option<&NSString>); - #[method_id(DTD)] + #[method_id(@__retain_semantics Other DTD)] pub unsafe fn DTD(&self) -> Option>; #[method(setDTD:)] @@ -92,7 +92,7 @@ extern_methods!( #[method(setRootElement:)] pub unsafe fn setRootElement(&self, root: &NSXMLElement); - #[method_id(rootElement)] + #[method_id(@__retain_semantics Other rootElement)] pub unsafe fn rootElement(&self) -> Option>; #[method(insertChild:atIndex:)] @@ -117,27 +117,27 @@ extern_methods!( #[method(replaceChildAtIndex:withNode:)] pub unsafe fn replaceChildAtIndex_withNode(&self, index: NSUInteger, node: &NSXMLNode); - #[method_id(XMLData)] + #[method_id(@__retain_semantics Other XMLData)] pub unsafe fn XMLData(&self) -> Id; - #[method_id(XMLDataWithOptions:)] + #[method_id(@__retain_semantics Other XMLDataWithOptions:)] pub unsafe fn XMLDataWithOptions(&self, options: NSXMLNodeOptions) -> Id; - #[method_id(objectByApplyingXSLT:arguments:error:)] + #[method_id(@__retain_semantics Other objectByApplyingXSLT:arguments:error:)] pub unsafe fn objectByApplyingXSLT_arguments_error( &self, xslt: &NSData, arguments: Option<&NSDictionary>, ) -> Result, Id>; - #[method_id(objectByApplyingXSLTString:arguments:error:)] + #[method_id(@__retain_semantics Other objectByApplyingXSLTString:arguments:error:)] pub unsafe fn objectByApplyingXSLTString_arguments_error( &self, xslt: &NSString, arguments: Option<&NSDictionary>, ) -> Result, Id>; - #[method_id(objectByApplyingXSLTAtURL:arguments:error:)] + #[method_id(@__retain_semantics Other objectByApplyingXSLTAtURL:arguments:error:)] pub unsafe fn objectByApplyingXSLTAtURL_arguments_error( &self, xsltURL: &NSURL, diff --git a/crates/icrate/src/generated/Foundation/NSXMLElement.rs b/crates/icrate/src/generated/Foundation/NSXMLElement.rs index cdff75745..4a35b9447 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLElement.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLElement.rs @@ -14,43 +14,43 @@ extern_class!( extern_methods!( unsafe impl NSXMLElement { - #[method_id(initWithName:)] + #[method_id(@__retain_semantics Init initWithName:)] pub unsafe fn initWithName( this: Option>, name: &NSString, ) -> Id; - #[method_id(initWithName:URI:)] + #[method_id(@__retain_semantics Init initWithName:URI:)] pub unsafe fn initWithName_URI( this: Option>, name: &NSString, URI: Option<&NSString>, ) -> Id; - #[method_id(initWithName:stringValue:)] + #[method_id(@__retain_semantics Init initWithName:stringValue:)] pub unsafe fn initWithName_stringValue( this: Option>, name: &NSString, string: Option<&NSString>, ) -> Id; - #[method_id(initWithXMLString:error:)] + #[method_id(@__retain_semantics Init initWithXMLString:error:)] pub unsafe fn initWithXMLString_error( this: Option>, string: &NSString, ) -> Result, Id>; - #[method_id(initWithKind:options:)] + #[method_id(@__retain_semantics Init initWithKind:options:)] pub unsafe fn initWithKind_options( this: Option>, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; - #[method_id(elementsForName:)] + #[method_id(@__retain_semantics Other elementsForName:)] pub unsafe fn elementsForName(&self, name: &NSString) -> Id, Shared>; - #[method_id(elementsForLocalName:URI:)] + #[method_id(@__retain_semantics Other elementsForLocalName:URI:)] pub unsafe fn elementsForLocalName_URI( &self, localName: &NSString, @@ -63,7 +63,7 @@ extern_methods!( #[method(removeAttributeForName:)] pub unsafe fn removeAttributeForName(&self, name: &NSString); - #[method_id(attributes)] + #[method_id(@__retain_semantics Other attributes)] pub unsafe fn attributes(&self) -> Option, Shared>>; #[method(setAttributes:)] @@ -75,10 +75,10 @@ extern_methods!( attributes: &NSDictionary, ); - #[method_id(attributeForName:)] + #[method_id(@__retain_semantics Other attributeForName:)] pub unsafe fn attributeForName(&self, name: &NSString) -> Option>; - #[method_id(attributeForLocalName:URI:)] + #[method_id(@__retain_semantics Other attributeForLocalName:URI:)] pub unsafe fn attributeForLocalName_URI( &self, localName: &NSString, @@ -91,22 +91,22 @@ extern_methods!( #[method(removeNamespaceForPrefix:)] pub unsafe fn removeNamespaceForPrefix(&self, name: &NSString); - #[method_id(namespaces)] + #[method_id(@__retain_semantics Other namespaces)] pub unsafe fn namespaces(&self) -> Option, Shared>>; #[method(setNamespaces:)] pub unsafe fn setNamespaces(&self, namespaces: Option<&NSArray>); - #[method_id(namespaceForPrefix:)] + #[method_id(@__retain_semantics Other namespaceForPrefix:)] pub unsafe fn namespaceForPrefix(&self, name: &NSString) -> Option>; - #[method_id(resolveNamespaceForName:)] + #[method_id(@__retain_semantics Other resolveNamespaceForName:)] pub unsafe fn resolveNamespaceForName( &self, name: &NSString, ) -> Option>; - #[method_id(resolvePrefixForNamespaceURI:)] + #[method_id(@__retain_semantics Other resolvePrefixForNamespaceURI:)] pub unsafe fn resolvePrefixForNamespaceURI( &self, namespaceURI: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index c3139b9c0..1e7c9431f 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -29,97 +29,97 @@ extern_class!( extern_methods!( unsafe impl NSXMLNode { - #[method_id(init)] + #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; - #[method_id(initWithKind:)] + #[method_id(@__retain_semantics Init initWithKind:)] pub unsafe fn initWithKind( this: Option>, kind: NSXMLNodeKind, ) -> Id; - #[method_id(initWithKind:options:)] + #[method_id(@__retain_semantics Init initWithKind:options:)] pub unsafe fn initWithKind_options( this: Option>, kind: NSXMLNodeKind, options: NSXMLNodeOptions, ) -> Id; - #[method_id(document)] + #[method_id(@__retain_semantics Other document)] pub unsafe fn document() -> Id; - #[method_id(documentWithRootElement:)] + #[method_id(@__retain_semantics Other documentWithRootElement:)] pub unsafe fn documentWithRootElement(element: &NSXMLElement) -> Id; - #[method_id(elementWithName:)] + #[method_id(@__retain_semantics Other elementWithName:)] pub unsafe fn elementWithName(name: &NSString) -> Id; - #[method_id(elementWithName:URI:)] + #[method_id(@__retain_semantics Other elementWithName:URI:)] pub unsafe fn elementWithName_URI(name: &NSString, URI: &NSString) -> Id; - #[method_id(elementWithName:stringValue:)] + #[method_id(@__retain_semantics Other elementWithName:stringValue:)] pub unsafe fn elementWithName_stringValue( name: &NSString, string: &NSString, ) -> Id; - #[method_id(elementWithName:children:attributes:)] + #[method_id(@__retain_semantics Other elementWithName:children:attributes:)] pub unsafe fn elementWithName_children_attributes( name: &NSString, children: Option<&NSArray>, attributes: Option<&NSArray>, ) -> Id; - #[method_id(attributeWithName:stringValue:)] + #[method_id(@__retain_semantics Other attributeWithName:stringValue:)] pub unsafe fn attributeWithName_stringValue( name: &NSString, stringValue: &NSString, ) -> Id; - #[method_id(attributeWithName:URI:stringValue:)] + #[method_id(@__retain_semantics Other attributeWithName:URI:stringValue:)] pub unsafe fn attributeWithName_URI_stringValue( name: &NSString, URI: &NSString, stringValue: &NSString, ) -> Id; - #[method_id(namespaceWithName:stringValue:)] + #[method_id(@__retain_semantics Other namespaceWithName:stringValue:)] pub unsafe fn namespaceWithName_stringValue( name: &NSString, stringValue: &NSString, ) -> Id; - #[method_id(processingInstructionWithName:stringValue:)] + #[method_id(@__retain_semantics Other processingInstructionWithName:stringValue:)] pub unsafe fn processingInstructionWithName_stringValue( name: &NSString, stringValue: &NSString, ) -> Id; - #[method_id(commentWithStringValue:)] + #[method_id(@__retain_semantics Other commentWithStringValue:)] pub unsafe fn commentWithStringValue(stringValue: &NSString) -> Id; - #[method_id(textWithStringValue:)] + #[method_id(@__retain_semantics Other textWithStringValue:)] pub unsafe fn textWithStringValue(stringValue: &NSString) -> Id; - #[method_id(DTDNodeWithXMLString:)] + #[method_id(@__retain_semantics Other DTDNodeWithXMLString:)] pub unsafe fn DTDNodeWithXMLString(string: &NSString) -> Option>; #[method(kind)] pub unsafe fn kind(&self) -> NSXMLNodeKind; - #[method_id(name)] + #[method_id(@__retain_semantics Other name)] pub unsafe fn name(&self) -> Option>; #[method(setName:)] pub unsafe fn setName(&self, name: Option<&NSString>); - #[method_id(objectValue)] + #[method_id(@__retain_semantics Other objectValue)] pub unsafe fn objectValue(&self) -> Option>; #[method(setObjectValue:)] pub unsafe fn setObjectValue(&self, objectValue: Option<&Object>); - #[method_id(stringValue)] + #[method_id(@__retain_semantics Other stringValue)] pub unsafe fn stringValue(&self) -> Option>; #[method(setStringValue:)] @@ -134,94 +134,94 @@ extern_methods!( #[method(level)] pub unsafe fn level(&self) -> NSUInteger; - #[method_id(rootDocument)] + #[method_id(@__retain_semantics Other rootDocument)] pub unsafe fn rootDocument(&self) -> Option>; - #[method_id(parent)] + #[method_id(@__retain_semantics Other parent)] pub unsafe fn parent(&self) -> Option>; #[method(childCount)] pub unsafe fn childCount(&self) -> NSUInteger; - #[method_id(children)] + #[method_id(@__retain_semantics Other children)] pub unsafe fn children(&self) -> Option, Shared>>; - #[method_id(childAtIndex:)] + #[method_id(@__retain_semantics Other childAtIndex:)] pub unsafe fn childAtIndex(&self, index: NSUInteger) -> Option>; - #[method_id(previousSibling)] + #[method_id(@__retain_semantics Other previousSibling)] pub unsafe fn previousSibling(&self) -> Option>; - #[method_id(nextSibling)] + #[method_id(@__retain_semantics Other nextSibling)] pub unsafe fn nextSibling(&self) -> Option>; - #[method_id(previousNode)] + #[method_id(@__retain_semantics Other previousNode)] pub unsafe fn previousNode(&self) -> Option>; - #[method_id(nextNode)] + #[method_id(@__retain_semantics Other nextNode)] pub unsafe fn nextNode(&self) -> Option>; #[method(detach)] pub unsafe fn detach(&self); - #[method_id(XPath)] + #[method_id(@__retain_semantics Other XPath)] pub unsafe fn XPath(&self) -> Option>; - #[method_id(localName)] + #[method_id(@__retain_semantics Other localName)] pub unsafe fn localName(&self) -> Option>; - #[method_id(prefix)] + #[method_id(@__retain_semantics Other prefix)] pub unsafe fn prefix(&self) -> Option>; - #[method_id(URI)] + #[method_id(@__retain_semantics Other URI)] pub unsafe fn URI(&self) -> Option>; #[method(setURI:)] pub unsafe fn setURI(&self, URI: Option<&NSString>); - #[method_id(localNameForName:)] + #[method_id(@__retain_semantics Other localNameForName:)] pub unsafe fn localNameForName(name: &NSString) -> Id; - #[method_id(prefixForName:)] + #[method_id(@__retain_semantics Other prefixForName:)] pub unsafe fn prefixForName(name: &NSString) -> Option>; - #[method_id(predefinedNamespaceForPrefix:)] + #[method_id(@__retain_semantics Other predefinedNamespaceForPrefix:)] pub unsafe fn predefinedNamespaceForPrefix( name: &NSString, ) -> Option>; - #[method_id(description)] + #[method_id(@__retain_semantics Other description)] pub unsafe fn description(&self) -> Id; - #[method_id(XMLString)] + #[method_id(@__retain_semantics Other XMLString)] pub unsafe fn XMLString(&self) -> Id; - #[method_id(XMLStringWithOptions:)] + #[method_id(@__retain_semantics Other XMLStringWithOptions:)] pub unsafe fn XMLStringWithOptions( &self, options: NSXMLNodeOptions, ) -> Id; - #[method_id(canonicalXMLStringPreservingComments:)] + #[method_id(@__retain_semantics Other canonicalXMLStringPreservingComments:)] pub unsafe fn canonicalXMLStringPreservingComments( &self, comments: bool, ) -> Id; - #[method_id(nodesForXPath:error:)] + #[method_id(@__retain_semantics Other nodesForXPath:error:)] pub unsafe fn nodesForXPath_error( &self, xpath: &NSString, ) -> Result, Shared>, Id>; - #[method_id(objectsForXQuery:constants:error:)] + #[method_id(@__retain_semantics Other objectsForXQuery:constants:error:)] pub unsafe fn objectsForXQuery_constants_error( &self, xquery: &NSString, constants: Option<&NSDictionary>, ) -> Result, Id>; - #[method_id(objectsForXQuery:error:)] + #[method_id(@__retain_semantics Other objectsForXQuery:error:)] pub unsafe fn objectsForXQuery_error( &self, xquery: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index b3111fbf0..59f49d48c 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -21,25 +21,25 @@ extern_class!( extern_methods!( unsafe impl NSXMLParser { - #[method_id(initWithContentsOfURL:)] + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, url: &NSURL, ) -> Option>; - #[method_id(initWithData:)] + #[method_id(@__retain_semantics Init initWithData:)] pub unsafe fn initWithData( this: Option>, data: &NSData, ) -> Id; - #[method_id(initWithStream:)] + #[method_id(@__retain_semantics Init initWithStream:)] pub unsafe fn initWithStream( this: Option>, stream: &NSInputStream, ) -> Id; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] @@ -68,7 +68,7 @@ extern_methods!( externalEntityResolvingPolicy: NSXMLParserExternalEntityResolvingPolicy, ); - #[method_id(allowedExternalEntityURLs)] + #[method_id(@__retain_semantics Other allowedExternalEntityURLs)] pub unsafe fn allowedExternalEntityURLs(&self) -> Option, Shared>>; #[method(setAllowedExternalEntityURLs:)] @@ -83,7 +83,7 @@ extern_methods!( #[method(abortParsing)] pub unsafe fn abortParsing(&self); - #[method_id(parserError)] + #[method_id(@__retain_semantics Other parserError)] pub unsafe fn parserError(&self) -> Option>; #[method(shouldResolveExternalEntities)] @@ -97,10 +97,10 @@ extern_methods!( extern_methods!( /// NSXMLParserLocatorAdditions unsafe impl NSXMLParser { - #[method_id(publicID)] + #[method_id(@__retain_semantics Other publicID)] pub unsafe fn publicID(&self) -> Option>; - #[method_id(systemID)] + #[method_id(@__retain_semantics Other systemID)] pub unsafe fn systemID(&self) -> Option>; #[method(lineNumber)] diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 010f96854..47ff4524c 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -19,44 +19,44 @@ extern_class!( extern_methods!( unsafe impl NSXPCConnection { - #[method_id(initWithServiceName:)] + #[method_id(@__retain_semantics Init initWithServiceName:)] pub unsafe fn initWithServiceName( this: Option>, serviceName: &NSString, ) -> Id; - #[method_id(serviceName)] + #[method_id(@__retain_semantics Other serviceName)] pub unsafe fn serviceName(&self) -> Option>; - #[method_id(initWithMachServiceName:options:)] + #[method_id(@__retain_semantics Init initWithMachServiceName:options:)] pub unsafe fn initWithMachServiceName_options( this: Option>, name: &NSString, options: NSXPCConnectionOptions, ) -> Id; - #[method_id(initWithListenerEndpoint:)] + #[method_id(@__retain_semantics Init initWithListenerEndpoint:)] pub unsafe fn initWithListenerEndpoint( this: Option>, endpoint: &NSXPCListenerEndpoint, ) -> Id; - #[method_id(endpoint)] + #[method_id(@__retain_semantics Other endpoint)] pub unsafe fn endpoint(&self) -> Id; - #[method_id(exportedInterface)] + #[method_id(@__retain_semantics Other exportedInterface)] pub unsafe fn exportedInterface(&self) -> Option>; #[method(setExportedInterface:)] pub unsafe fn setExportedInterface(&self, exportedInterface: Option<&NSXPCInterface>); - #[method_id(exportedObject)] + #[method_id(@__retain_semantics Other exportedObject)] pub unsafe fn exportedObject(&self) -> Option>; #[method(setExportedObject:)] pub unsafe fn setExportedObject(&self, exportedObject: Option<&Object>); - #[method_id(remoteObjectInterface)] + #[method_id(@__retain_semantics Other remoteObjectInterface)] pub unsafe fn remoteObjectInterface(&self) -> Option>; #[method(setRemoteObjectInterface:)] @@ -65,16 +65,16 @@ extern_methods!( remoteObjectInterface: Option<&NSXPCInterface>, ); - #[method_id(remoteObjectProxy)] + #[method_id(@__retain_semantics Other remoteObjectProxy)] pub unsafe fn remoteObjectProxy(&self) -> Id; - #[method_id(remoteObjectProxyWithErrorHandler:)] + #[method_id(@__retain_semantics Other remoteObjectProxyWithErrorHandler:)] pub unsafe fn remoteObjectProxyWithErrorHandler( &self, handler: TodoBlock, ) -> Id; - #[method_id(synchronousRemoteObjectProxyWithErrorHandler:)] + #[method_id(@__retain_semantics Other synchronousRemoteObjectProxyWithErrorHandler:)] pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( &self, handler: TodoBlock, @@ -113,7 +113,7 @@ extern_methods!( #[method(effectiveGroupIdentifier)] pub unsafe fn effectiveGroupIdentifier(&self) -> gid_t; - #[method_id(currentConnection)] + #[method_id(@__retain_semantics Other currentConnection)] pub unsafe fn currentConnection() -> Option>; #[method(scheduleSendBarrierBlock:)] @@ -132,25 +132,25 @@ extern_class!( extern_methods!( unsafe impl NSXPCListener { - #[method_id(serviceListener)] + #[method_id(@__retain_semantics Other serviceListener)] pub unsafe fn serviceListener() -> Id; - #[method_id(anonymousListener)] + #[method_id(@__retain_semantics Other anonymousListener)] pub unsafe fn anonymousListener() -> Id; - #[method_id(initWithMachServiceName:)] + #[method_id(@__retain_semantics Init initWithMachServiceName:)] pub unsafe fn initWithMachServiceName( this: Option>, name: &NSString, ) -> Id; - #[method_id(delegate)] + #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSXPCListenerDelegate>); - #[method_id(endpoint)] + #[method_id(@__retain_semantics Other endpoint)] pub unsafe fn endpoint(&self) -> Id; #[method(resume)] @@ -177,10 +177,10 @@ extern_class!( extern_methods!( unsafe impl NSXPCInterface { - #[method_id(interfaceWithProtocol:)] + #[method_id(@__retain_semantics Other interfaceWithProtocol:)] pub unsafe fn interfaceWithProtocol(protocol: &Protocol) -> Id; - #[method_id(protocol)] + #[method_id(@__retain_semantics Other protocol)] pub unsafe fn protocol(&self) -> Id; #[method(setProtocol:)] @@ -195,7 +195,7 @@ extern_methods!( ofReply: bool, ); - #[method_id(classesForSelector:argumentIndex:ofReply:)] + #[method_id(@__retain_semantics Other classesForSelector:argumentIndex:ofReply:)] pub unsafe fn classesForSelector_argumentIndex_ofReply( &self, sel: Sel, @@ -212,7 +212,7 @@ extern_methods!( ofReply: bool, ); - #[method_id(interfaceForSelector:argumentIndex:ofReply:)] + #[method_id(@__retain_semantics Other interfaceForSelector:argumentIndex:ofReply:)] pub unsafe fn interfaceForSelector_argumentIndex_ofReply( &self, sel: Sel, @@ -273,13 +273,13 @@ extern_methods!( key: &NSString, ) -> xpc_object_t; - #[method_id(userInfo)] + #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>; #[method(setUserInfo:)] pub unsafe fn setUserInfo(&self, userInfo: Option<&NSObject>); - #[method_id(connection)] + #[method_id(@__retain_semantics Other connection)] pub unsafe fn connection(&self) -> Option>; } ); diff --git a/crates/objc2/src/macros.rs b/crates/objc2/src/macros.rs index 71865fcf5..a02626e0f 100644 --- a/crates/objc2/src/macros.rs +++ b/crates/objc2/src/macros.rs @@ -1079,6 +1079,20 @@ macro_rules! msg_send_id { result = <$crate::__macro_helpers::Init as $crate::__macro_helpers::MsgSendId<_, _>>::send_message_id($obj, sel, ()); result }); + [$obj:expr, @__retain_semantics $retain_semantics:ident $($selector_and_arguments:tt)+] => { + $crate::__msg_send_parse! { + ($crate::__msg_send_id_helper) + @(send_message_id_error) + @() + @() + @($($selector_and_arguments)+) + @(send_message_id) + + @($obj) + @($retain_semantics) + } + // compile_error!(stringify!($($selector_and_arguments)*)) + }; [$obj:expr, $($selector_and_arguments:tt)+] => { $crate::__msg_send_parse! { ($crate::__msg_send_id_helper) @@ -1089,6 +1103,7 @@ macro_rules! msg_send_id { @(send_message_id) @($obj) + @() } }; } @@ -1100,6 +1115,7 @@ macro_rules! __msg_send_id_helper { { @($fn:ident) @($obj:expr) + @($($retain_semantics:ident)?) @(retain) @() } => {{ @@ -1110,6 +1126,7 @@ macro_rules! __msg_send_id_helper { { @($fn:ident) @($obj:expr) + @($($retain_semantics:ident)?) @(release) @() } => {{ @@ -1120,6 +1137,7 @@ macro_rules! __msg_send_id_helper { { @($fn:ident) @($obj:expr) + @($($retain_semantics:ident)?) @(autorelease) @() } => {{ @@ -1130,6 +1148,7 @@ macro_rules! __msg_send_id_helper { { @($fn:ident) @($obj:expr) + @($($retain_semantics:ident)?) @(dealloc) @() } => {{ @@ -1140,6 +1159,20 @@ macro_rules! __msg_send_id_helper { { @($fn:ident) @($obj:expr) + @($retain_semantics:ident) + @($sel_first:ident $(: $($sel_rest:ident :)*)?) + @($($argument:expr,)*) + } => ({ + <$crate::__macro_helpers::$retain_semantics as $crate::__macro_helpers::MsgSendId<_, _>>::$fn::<_, _>( + $obj, + $crate::sel!($sel_first $(: $($sel_rest :)*)?), + ($($argument,)*), + ) + }); + { + @($fn:ident) + @($obj:expr) + @() @($sel_first:ident $(: $($sel_rest:ident :)*)?) @($($argument:expr,)*) } => ({ diff --git a/crates/objc2/src/macros/extern_methods.rs b/crates/objc2/src/macros/extern_methods.rs index cfb964a35..35eee2a58 100644 --- a/crates/objc2/src/macros/extern_methods.rs +++ b/crates/objc2/src/macros/extern_methods.rs @@ -433,10 +433,10 @@ macro_rules! __collect_msg_send { ( $macro:path; $obj:expr; - ($sel:ident); + ($(@__retain_semantics $retain_semantics:ident )? $sel:ident); (); ) => {{ - $macro![$obj, $sel] + $macro![$obj, $(@__retain_semantics $retain_semantics )? $sel] }}; // Base case @@ -454,7 +454,7 @@ macro_rules! __collect_msg_send { ( $macro:path; $obj:expr; - ($sel:ident:); + ($(@__retain_semantics $retain_semantics:ident )? $sel:ident:); ($(,)?); $($output:tt)* ) => { @@ -463,7 +463,7 @@ macro_rules! __collect_msg_send { $obj; (); (); - $($output)* $sel: _, + $($output)* $(@__retain_semantics $retain_semantics )? $sel: _, } }; @@ -471,7 +471,7 @@ macro_rules! __collect_msg_send { ( $macro:path; $obj:expr; - ($sel:ident : $($sel_rest:tt)*); + ($(@__retain_semantics $retain_semantics:ident )? $sel:ident : $($sel_rest:tt)*); ($arg:ident: $arg_ty:ty $(, $($args_rest:tt)*)?); $($output:tt)* ) => { @@ -480,7 +480,7 @@ macro_rules! __collect_msg_send { $obj; ($($sel_rest)*); ($($($args_rest)*)?); - $($output)* $sel: $arg, + $($output)* $(@__retain_semantics $retain_semantics )? $sel: $arg, } }; From 797a00d495708a6a54afd6a7dd91486fc43cc0a8 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 20:45:03 +0100 Subject: [PATCH 101/131] Custom NSObject --- crates/icrate/src/Foundation/mod.rs | 48 +++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index d08808170..2c9f32976 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -2,11 +2,53 @@ pub(crate) mod generated; pub use objc2::ffi::NSIntegerMax; -pub use objc2::foundation::{ - CGFloat, CGPoint, CGRect, CGSize, NSObject, NSRange, NSTimeInterval, NSZone, -}; +pub use objc2::foundation::{CGFloat, CGPoint, CGRect, CGSize, NSRange, NSTimeInterval, NSZone}; pub use objc2::ns_string; +objc2::__inner_extern_class! { + @__inner + pub struct (NSObject) {} + + unsafe impl () for NSObject { + INHERITS = [objc2::runtime::Object]; + } +} + +unsafe impl objc2::ClassType for NSObject { + type Super = objc2::runtime::Object; + const NAME: &'static str = "NSObject"; + + #[inline] + fn class() -> &'static objc2::runtime::Class { + objc2::class!(NSObject) + } + + fn as_super(&self) -> &Self::Super { + &self.__inner + } + + fn as_super_mut(&mut self) -> &mut Self::Super { + &mut self.__inner + } +} +impl PartialEq for NSObject { + fn eq(&self, _other: &Self) -> bool { + todo!() + } +} +impl Eq for NSObject {} +impl std::hash::Hash for NSObject { + #[inline] + fn hash(&self, _state: &mut H) { + todo!() + } +} +impl std::fmt::Debug for NSObject { + fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + // TODO pub type NSRangePointer = *const NSRange; From e051dd575850fe61548faf0957e4deefc357fb97 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 17:00:25 +0100 Subject: [PATCH 102/131] TMP import --- crates/icrate/src/Foundation/mod.rs | 1194 ++++++++++++++++++++++++++- 1 file changed, 1193 insertions(+), 1 deletion(-) diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index 2c9f32976..097c9a7f8 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -52,4 +52,1196 @@ impl std::fmt::Debug for NSObject { // TODO pub type NSRangePointer = *const NSRange; -pub use self::generated::__exported::*; +// Generated + +pub use self::generated::FoundationErrors::{ + NSBundleErrorMaximum, NSBundleErrorMinimum, NSBundleOnDemandResourceExceededMaximumSizeError, + NSBundleOnDemandResourceInvalidTagError, NSBundleOnDemandResourceOutOfSpaceError, + NSCloudSharingConflictError, NSCloudSharingErrorMaximum, NSCloudSharingErrorMinimum, + NSCloudSharingNetworkFailureError, NSCloudSharingNoPermissionError, NSCloudSharingOtherError, + NSCloudSharingQuotaExceededError, NSCloudSharingTooManyParticipantsError, NSCoderErrorMaximum, + NSCoderErrorMinimum, NSCoderInvalidValueError, NSCoderReadCorruptError, + NSCoderValueNotFoundError, NSCompressionErrorMaximum, NSCompressionErrorMinimum, + NSCompressionFailedError, NSDecompressionFailedError, NSExecutableArchitectureMismatchError, + NSExecutableErrorMaximum, NSExecutableErrorMinimum, NSExecutableLinkError, + NSExecutableLoadError, NSExecutableNotLoadableError, NSExecutableRuntimeMismatchError, + NSFeatureUnsupportedError, NSFileErrorMaximum, NSFileErrorMinimum, NSFileLockingError, + NSFileManagerUnmountBusyError, NSFileManagerUnmountUnknownError, NSFileNoSuchFileError, + NSFileReadCorruptFileError, NSFileReadInapplicableStringEncodingError, + NSFileReadInvalidFileNameError, NSFileReadNoPermissionError, NSFileReadNoSuchFileError, + NSFileReadTooLargeError, NSFileReadUnknownError, NSFileReadUnknownStringEncodingError, + NSFileReadUnsupportedSchemeError, NSFileWriteFileExistsError, + NSFileWriteInapplicableStringEncodingError, NSFileWriteInvalidFileNameError, + NSFileWriteNoPermissionError, NSFileWriteOutOfSpaceError, NSFileWriteUnknownError, + NSFileWriteUnsupportedSchemeError, NSFileWriteVolumeReadOnlyError, NSFormattingError, + NSFormattingErrorMaximum, NSFormattingErrorMinimum, NSKeyValueValidationError, + NSPropertyListErrorMaximum, NSPropertyListErrorMinimum, NSPropertyListReadCorruptError, + NSPropertyListReadStreamError, NSPropertyListReadUnknownVersionError, + NSPropertyListWriteInvalidError, NSPropertyListWriteStreamError, NSUbiquitousFileErrorMaximum, + NSUbiquitousFileErrorMinimum, NSUbiquitousFileNotUploadedDueToQuotaError, + NSUbiquitousFileUbiquityServerNotAvailable, NSUbiquitousFileUnavailableError, + NSUserActivityConnectionUnavailableError, NSUserActivityErrorMaximum, + NSUserActivityErrorMinimum, NSUserActivityHandoffFailedError, + NSUserActivityHandoffUserInfoTooLargeError, NSUserActivityRemoteApplicationTimedOutError, + NSUserCancelledError, NSValidationErrorMaximum, NSValidationErrorMinimum, + NSXPCConnectionErrorMaximum, NSXPCConnectionErrorMinimum, NSXPCConnectionInterrupted, + NSXPCConnectionInvalid, NSXPCConnectionReplyInvalid, +}; +pub use self::generated::NSAffineTransform::NSAffineTransform; +pub use self::generated::NSAppleEventDescriptor::{ + NSAppleEventDescriptor, NSAppleEventSendAlwaysInteract, NSAppleEventSendCanInteract, + NSAppleEventSendCanSwitchLayer, NSAppleEventSendDefaultOptions, NSAppleEventSendDontAnnotate, + NSAppleEventSendDontExecute, NSAppleEventSendDontRecord, NSAppleEventSendNeverInteract, + NSAppleEventSendNoReply, NSAppleEventSendOptions, NSAppleEventSendQueueReply, + NSAppleEventSendWaitForReply, +}; +pub use self::generated::NSAppleEventManager::{ + NSAppleEventManager, NSAppleEventManagerWillProcessFirstEventNotification, + NSAppleEventTimeOutDefault, NSAppleEventTimeOutNone, +}; +pub use self::generated::NSAppleScript::{ + NSAppleScript, NSAppleScriptErrorAppName, NSAppleScriptErrorBriefMessage, + NSAppleScriptErrorMessage, NSAppleScriptErrorNumber, NSAppleScriptErrorRange, +}; +pub use self::generated::NSArchiver::{NSArchiver, NSUnarchiver}; +pub use self::generated::NSArray::{ + NSArray, NSBinarySearchingFirstEqual, NSBinarySearchingInsertionIndex, + NSBinarySearchingLastEqual, NSBinarySearchingOptions, NSMutableArray, +}; +pub use self::generated::NSAttributedString::{ + NSAlternateDescriptionAttributeName, NSAttributedString, + NSAttributedStringEnumerationLongestEffectiveRangeNotRequired, + NSAttributedStringEnumerationOptions, NSAttributedStringEnumerationReverse, + NSAttributedStringFormattingApplyReplacementIndexAttribute, + NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging, + NSAttributedStringFormattingOptions, NSAttributedStringKey, + NSAttributedStringMarkdownInterpretedSyntax, NSAttributedStringMarkdownInterpretedSyntaxFull, + NSAttributedStringMarkdownInterpretedSyntaxInlineOnly, + NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace, + NSAttributedStringMarkdownParsingFailurePolicy, + NSAttributedStringMarkdownParsingFailureReturnError, + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible, + NSAttributedStringMarkdownParsingOptions, NSImageURLAttributeName, + NSInflectionAlternativeAttributeName, NSInflectionRuleAttributeName, + NSInlinePresentationIntent, NSInlinePresentationIntentAttributeName, + NSInlinePresentationIntentBlockHTML, NSInlinePresentationIntentCode, + NSInlinePresentationIntentEmphasized, NSInlinePresentationIntentInlineHTML, + NSInlinePresentationIntentLineBreak, NSInlinePresentationIntentSoftBreak, + NSInlinePresentationIntentStrikethrough, NSInlinePresentationIntentStronglyEmphasized, + NSLanguageIdentifierAttributeName, NSMorphologyAttributeName, NSMutableAttributedString, + NSPresentationIntent, NSPresentationIntentAttributeName, NSPresentationIntentKind, + NSPresentationIntentKindBlockQuote, NSPresentationIntentKindCodeBlock, + NSPresentationIntentKindHeader, NSPresentationIntentKindListItem, + NSPresentationIntentKindOrderedList, NSPresentationIntentKindParagraph, + NSPresentationIntentKindTable, NSPresentationIntentKindTableCell, + NSPresentationIntentKindTableHeaderRow, NSPresentationIntentKindTableRow, + NSPresentationIntentKindThematicBreak, NSPresentationIntentKindUnorderedList, + NSPresentationIntentTableColumnAlignment, NSPresentationIntentTableColumnAlignmentCenter, + NSPresentationIntentTableColumnAlignmentLeft, NSPresentationIntentTableColumnAlignmentRight, + NSReplacementIndexAttributeName, +}; +pub use self::generated::NSAutoreleasePool::NSAutoreleasePool; +pub use self::generated::NSBackgroundActivityScheduler::{ + NSBackgroundActivityResult, NSBackgroundActivityResultDeferred, + NSBackgroundActivityResultFinished, NSBackgroundActivityScheduler, +}; +pub use self::generated::NSBundle::{ + NSBundle, NSBundleDidLoadNotification, NSBundleExecutableArchitectureARM64, + NSBundleExecutableArchitectureI386, NSBundleExecutableArchitecturePPC, + NSBundleExecutableArchitecturePPC64, NSBundleExecutableArchitectureX86_64, + NSBundleResourceRequest, NSBundleResourceRequestLoadingPriorityUrgent, + NSBundleResourceRequestLowDiskSpaceNotification, NSLoadedClasses, +}; +pub use self::generated::NSByteCountFormatter::{ + NSByteCountFormatter, NSByteCountFormatterCountStyle, NSByteCountFormatterCountStyleBinary, + NSByteCountFormatterCountStyleDecimal, NSByteCountFormatterCountStyleFile, + NSByteCountFormatterCountStyleMemory, NSByteCountFormatterUnits, NSByteCountFormatterUseAll, + NSByteCountFormatterUseBytes, NSByteCountFormatterUseDefault, NSByteCountFormatterUseEB, + NSByteCountFormatterUseGB, NSByteCountFormatterUseKB, NSByteCountFormatterUseMB, + NSByteCountFormatterUsePB, NSByteCountFormatterUseTB, NSByteCountFormatterUseYBOrHigher, + NSByteCountFormatterUseZB, +}; +pub use self::generated::NSByteOrder::{NS_BigEndian, NS_LittleEndian, NS_UnknownByteOrder}; +pub use self::generated::NSCache::{NSCache, NSCacheDelegate}; +pub use self::generated::NSCalendar::{ + NSCalendar, NSCalendarCalendarUnit, NSCalendarDayChangedNotification, NSCalendarIdentifier, + NSCalendarIdentifierBuddhist, NSCalendarIdentifierChinese, NSCalendarIdentifierCoptic, + NSCalendarIdentifierEthiopicAmeteAlem, NSCalendarIdentifierEthiopicAmeteMihret, + NSCalendarIdentifierGregorian, NSCalendarIdentifierHebrew, NSCalendarIdentifierISO8601, + NSCalendarIdentifierIndian, NSCalendarIdentifierIslamic, NSCalendarIdentifierIslamicCivil, + NSCalendarIdentifierIslamicTabular, NSCalendarIdentifierIslamicUmmAlQura, + NSCalendarIdentifierJapanese, NSCalendarIdentifierPersian, NSCalendarIdentifierRepublicOfChina, + NSCalendarMatchFirst, NSCalendarMatchLast, NSCalendarMatchNextTime, + NSCalendarMatchNextTimePreservingSmallerUnits, + NSCalendarMatchPreviousTimePreservingSmallerUnits, NSCalendarMatchStrictly, NSCalendarOptions, + NSCalendarSearchBackwards, NSCalendarUnit, NSCalendarUnitCalendar, NSCalendarUnitDay, + NSCalendarUnitEra, NSCalendarUnitHour, NSCalendarUnitMinute, NSCalendarUnitMonth, + NSCalendarUnitNanosecond, NSCalendarUnitQuarter, NSCalendarUnitSecond, NSCalendarUnitTimeZone, + NSCalendarUnitWeekOfMonth, NSCalendarUnitWeekOfYear, NSCalendarUnitWeekday, + NSCalendarUnitWeekdayOrdinal, NSCalendarUnitYear, NSCalendarUnitYearForWeekOfYear, + NSCalendarWrapComponents, NSDateComponentUndefined, NSDateComponents, NSDayCalendarUnit, + NSEraCalendarUnit, NSHourCalendarUnit, NSMinuteCalendarUnit, NSMonthCalendarUnit, + NSQuarterCalendarUnit, NSSecondCalendarUnit, NSTimeZoneCalendarUnit, NSUndefinedDateComponent, + NSWeekCalendarUnit, NSWeekOfMonthCalendarUnit, NSWeekOfYearCalendarUnit, NSWeekdayCalendarUnit, + NSWeekdayOrdinalCalendarUnit, NSWrapCalendarComponents, NSYearCalendarUnit, + NSYearForWeekOfYearCalendarUnit, +}; +pub use self::generated::NSCalendarDate::NSCalendarDate; +pub use self::generated::NSCharacterSet::{ + NSCharacterSet, NSMutableCharacterSet, NSOpenStepUnicodeReservedBase, +}; +pub use self::generated::NSClassDescription::{ + NSClassDescription, NSClassDescriptionNeededForClassNotification, +}; +pub use self::generated::NSCoder::{ + NSCoder, NSDecodingFailurePolicy, NSDecodingFailurePolicyRaiseException, + NSDecodingFailurePolicySetErrorAndReturn, +}; +pub use self::generated::NSComparisonPredicate::{ + NSAllPredicateModifier, NSAnyPredicateModifier, NSBeginsWithPredicateOperatorType, + NSBetweenPredicateOperatorType, NSCaseInsensitivePredicateOption, NSComparisonPredicate, + NSComparisonPredicateModifier, NSComparisonPredicateOptions, NSContainsPredicateOperatorType, + NSCustomSelectorPredicateOperatorType, NSDiacriticInsensitivePredicateOption, + NSDirectPredicateModifier, NSEndsWithPredicateOperatorType, NSEqualToPredicateOperatorType, + NSGreaterThanOrEqualToPredicateOperatorType, NSGreaterThanPredicateOperatorType, + NSInPredicateOperatorType, NSLessThanOrEqualToPredicateOperatorType, + NSLessThanPredicateOperatorType, NSLikePredicateOperatorType, NSMatchesPredicateOperatorType, + NSNormalizedPredicateOption, NSNotEqualToPredicateOperatorType, NSPredicateOperatorType, +}; +pub use self::generated::NSCompoundPredicate::{ + NSAndPredicateType, NSCompoundPredicate, NSCompoundPredicateType, NSNotPredicateType, + NSOrPredicateType, +}; +pub use self::generated::NSConnection::{ + NSConnection, NSConnectionDelegate, NSConnectionDidDieNotification, + NSConnectionDidInitializeNotification, NSConnectionReplyMode, NSDistantObjectRequest, + NSFailedAuthenticationException, +}; +pub use self::generated::NSData::{ + NSAtomicWrite, NSData, NSDataBase64DecodingIgnoreUnknownCharacters, + NSDataBase64DecodingOptions, NSDataBase64Encoding64CharacterLineLength, + NSDataBase64Encoding76CharacterLineLength, NSDataBase64EncodingEndLineWithCarriageReturn, + NSDataBase64EncodingEndLineWithLineFeed, NSDataBase64EncodingOptions, + NSDataCompressionAlgorithm, NSDataCompressionAlgorithmLZ4, NSDataCompressionAlgorithmLZFSE, + NSDataCompressionAlgorithmLZMA, NSDataCompressionAlgorithmZlib, NSDataReadingMapped, + NSDataReadingMappedAlways, NSDataReadingMappedIfSafe, NSDataReadingOptions, + NSDataReadingUncached, NSDataSearchAnchored, NSDataSearchBackwards, NSDataSearchOptions, + NSDataWritingAtomic, NSDataWritingFileProtectionComplete, + NSDataWritingFileProtectionCompleteUnlessOpen, + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication, + NSDataWritingFileProtectionMask, NSDataWritingFileProtectionNone, NSDataWritingOptions, + NSDataWritingWithoutOverwriting, NSMappedRead, NSMutableData, NSPurgeableData, NSUncachedRead, +}; +pub use self::generated::NSDate::{NSDate, NSSystemClockDidChangeNotification}; +pub use self::generated::NSDateComponentsFormatter::{ + NSDateComponentsFormatter, NSDateComponentsFormatterUnitsStyle, + NSDateComponentsFormatterUnitsStyleAbbreviated, NSDateComponentsFormatterUnitsStyleBrief, + NSDateComponentsFormatterUnitsStyleFull, NSDateComponentsFormatterUnitsStylePositional, + NSDateComponentsFormatterUnitsStyleShort, NSDateComponentsFormatterUnitsStyleSpellOut, + NSDateComponentsFormatterZeroFormattingBehavior, + NSDateComponentsFormatterZeroFormattingBehaviorDefault, + NSDateComponentsFormatterZeroFormattingBehaviorDropAll, + NSDateComponentsFormatterZeroFormattingBehaviorDropLeading, + NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle, + NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing, + NSDateComponentsFormatterZeroFormattingBehaviorNone, + NSDateComponentsFormatterZeroFormattingBehaviorPad, +}; +pub use self::generated::NSDateFormatter::{ + NSDateFormatter, NSDateFormatterBehavior, NSDateFormatterBehavior10_0, + NSDateFormatterBehavior10_4, NSDateFormatterBehaviorDefault, NSDateFormatterFullStyle, + NSDateFormatterLongStyle, NSDateFormatterMediumStyle, NSDateFormatterNoStyle, + NSDateFormatterShortStyle, NSDateFormatterStyle, +}; +pub use self::generated::NSDateInterval::NSDateInterval; +pub use self::generated::NSDateIntervalFormatter::{ + NSDateIntervalFormatter, NSDateIntervalFormatterFullStyle, NSDateIntervalFormatterLongStyle, + NSDateIntervalFormatterMediumStyle, NSDateIntervalFormatterNoStyle, + NSDateIntervalFormatterShortStyle, NSDateIntervalFormatterStyle, +}; +pub use self::generated::NSDecimal::{ + NSCalculationDivideByZero, NSCalculationError, NSCalculationLossOfPrecision, + NSCalculationNoError, NSCalculationOverflow, NSCalculationUnderflow, NSRoundBankers, + NSRoundDown, NSRoundPlain, NSRoundUp, NSRoundingMode, +}; +pub use self::generated::NSDecimalNumber::{ + NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberDivideByZeroException, + NSDecimalNumberExactnessException, NSDecimalNumberHandler, NSDecimalNumberOverflowException, + NSDecimalNumberUnderflowException, +}; +pub use self::generated::NSDictionary::{NSDictionary, NSMutableDictionary}; +pub use self::generated::NSDistantObject::NSDistantObject; +pub use self::generated::NSDistributedLock::NSDistributedLock; +pub use self::generated::NSDistributedNotificationCenter::{ + NSDistributedNotificationCenter, NSDistributedNotificationCenterType, + NSDistributedNotificationDeliverImmediately, NSDistributedNotificationOptions, + NSDistributedNotificationPostToAllSessions, NSLocalNotificationCenterType, + NSNotificationDeliverImmediately, NSNotificationPostToAllSessions, + NSNotificationSuspensionBehavior, NSNotificationSuspensionBehaviorCoalesce, + NSNotificationSuspensionBehaviorDeliverImmediately, NSNotificationSuspensionBehaviorDrop, + NSNotificationSuspensionBehaviorHold, +}; +pub use self::generated::NSEnergyFormatter::{ + NSEnergyFormatter, NSEnergyFormatterUnit, NSEnergyFormatterUnitCalorie, + NSEnergyFormatterUnitJoule, NSEnergyFormatterUnitKilocalorie, NSEnergyFormatterUnitKilojoule, +}; +pub use self::generated::NSEnumerator::{NSEnumerator, NSFastEnumeration}; +pub use self::generated::NSError::{ + NSCocoaErrorDomain, NSDebugDescriptionErrorKey, NSError, NSErrorDomain, NSErrorUserInfoKey, + NSFilePathErrorKey, NSHelpAnchorErrorKey, NSLocalizedDescriptionKey, + NSLocalizedFailureErrorKey, NSLocalizedFailureReasonErrorKey, + NSLocalizedRecoveryOptionsErrorKey, NSLocalizedRecoverySuggestionErrorKey, NSMachErrorDomain, + NSMultipleUnderlyingErrorsKey, NSOSStatusErrorDomain, NSPOSIXErrorDomain, + NSRecoveryAttempterErrorKey, NSStringEncodingErrorKey, NSURLErrorKey, NSUnderlyingErrorKey, +}; +pub use self::generated::NSException::{ + NSAssertionHandler, NSAssertionHandlerKey, NSDestinationInvalidException, NSException, + NSGenericException, NSInconsistentArchiveException, NSInternalInconsistencyException, + NSInvalidArgumentException, NSInvalidReceivePortException, NSInvalidSendPortException, + NSMallocException, NSObjectInaccessibleException, NSObjectNotAvailableException, + NSOldStyleException, NSPortReceiveException, NSPortSendException, NSPortTimeoutException, + NSRangeException, +}; +pub use self::generated::NSExpression::{ + NSAggregateExpressionType, NSAnyKeyExpressionType, NSBlockExpressionType, + NSConditionalExpressionType, NSConstantValueExpressionType, NSEvaluatedObjectExpressionType, + NSExpression, NSExpressionType, NSFunctionExpressionType, NSIntersectSetExpressionType, + NSKeyPathExpressionType, NSMinusSetExpressionType, NSSubqueryExpressionType, + NSUnionSetExpressionType, NSVariableExpressionType, +}; +pub use self::generated::NSExtensionContext::{ + NSExtensionContext, NSExtensionHostDidBecomeActiveNotification, + NSExtensionHostDidEnterBackgroundNotification, NSExtensionHostWillEnterForegroundNotification, + NSExtensionHostWillResignActiveNotification, NSExtensionItemsAndErrorsKey, +}; +pub use self::generated::NSExtensionItem::{ + NSExtensionItem, NSExtensionItemAttachmentsKey, NSExtensionItemAttributedContentTextKey, + NSExtensionItemAttributedTitleKey, +}; +pub use self::generated::NSExtensionRequestHandling::NSExtensionRequestHandling; +pub use self::generated::NSFileCoordinator::{ + NSFileAccessIntent, NSFileCoordinator, NSFileCoordinatorReadingForUploading, + NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorReadingOptions, + NSFileCoordinatorReadingResolvesSymbolicLink, NSFileCoordinatorReadingWithoutChanges, + NSFileCoordinatorWritingContentIndependentMetadataOnly, NSFileCoordinatorWritingForDeleting, + NSFileCoordinatorWritingForMerging, NSFileCoordinatorWritingForMoving, + NSFileCoordinatorWritingForReplacing, NSFileCoordinatorWritingOptions, +}; +pub use self::generated::NSFileHandle::{ + NSFileHandle, NSFileHandleConnectionAcceptedNotification, + NSFileHandleDataAvailableNotification, NSFileHandleNotificationDataItem, + NSFileHandleNotificationFileHandleItem, NSFileHandleNotificationMonitorModes, + NSFileHandleOperationException, NSFileHandleReadCompletionNotification, + NSFileHandleReadToEndOfFileCompletionNotification, NSPipe, +}; +pub use self::generated::NSFileManager::{ + NSDirectoryEnumerationIncludesDirectoriesPostOrder, NSDirectoryEnumerationOptions, + NSDirectoryEnumerationProducesRelativePathURLs, NSDirectoryEnumerationSkipsHiddenFiles, + NSDirectoryEnumerationSkipsPackageDescendants, + NSDirectoryEnumerationSkipsSubdirectoryDescendants, NSDirectoryEnumerator, NSFileAppendOnly, + NSFileAttributeKey, NSFileAttributeType, NSFileBusy, NSFileCreationDate, + NSFileDeviceIdentifier, NSFileExtensionHidden, NSFileGroupOwnerAccountID, + NSFileGroupOwnerAccountName, NSFileHFSCreatorCode, NSFileHFSTypeCode, NSFileImmutable, + NSFileManager, NSFileManagerDelegate, NSFileManagerItemReplacementOptions, + NSFileManagerItemReplacementUsingNewMetadataOnly, + NSFileManagerItemReplacementWithoutDeletingBackupItem, + NSFileManagerUnmountAllPartitionsAndEjectDisk, + NSFileManagerUnmountDissentingProcessIdentifierErrorKey, NSFileManagerUnmountOptions, + NSFileManagerUnmountWithoutUI, NSFileModificationDate, NSFileOwnerAccountID, + NSFileOwnerAccountName, NSFilePosixPermissions, NSFileProtectionComplete, + NSFileProtectionCompleteUnlessOpen, NSFileProtectionCompleteUntilFirstUserAuthentication, + NSFileProtectionKey, NSFileProtectionNone, NSFileProtectionType, NSFileProviderService, + NSFileProviderServiceName, NSFileReferenceCount, NSFileSize, NSFileSystemFileNumber, + NSFileSystemFreeNodes, NSFileSystemFreeSize, NSFileSystemNodes, NSFileSystemNumber, + NSFileSystemSize, NSFileType, NSFileTypeBlockSpecial, NSFileTypeCharacterSpecial, + NSFileTypeDirectory, NSFileTypeRegular, NSFileTypeSocket, NSFileTypeSymbolicLink, + NSFileTypeUnknown, NSURLRelationship, NSURLRelationshipContains, NSURLRelationshipOther, + NSURLRelationshipSame, NSUbiquityIdentityDidChangeNotification, NSVolumeEnumerationOptions, + NSVolumeEnumerationProduceFileReferenceURLs, NSVolumeEnumerationSkipHiddenVolumes, +}; +pub use self::generated::NSFilePresenter::NSFilePresenter; +pub use self::generated::NSFileVersion::{ + NSFileVersion, NSFileVersionAddingByMoving, NSFileVersionAddingOptions, + NSFileVersionReplacingByMoving, NSFileVersionReplacingOptions, +}; +pub use self::generated::NSFileWrapper::{ + NSFileWrapper, NSFileWrapperReadingImmediate, NSFileWrapperReadingOptions, + NSFileWrapperReadingWithoutMapping, NSFileWrapperWritingAtomic, NSFileWrapperWritingOptions, + NSFileWrapperWritingWithNameUpdating, +}; +pub use self::generated::NSFormatter::{ + NSFormatter, NSFormattingContext, NSFormattingContextBeginningOfSentence, + NSFormattingContextDynamic, NSFormattingContextListItem, NSFormattingContextMiddleOfSentence, + NSFormattingContextStandalone, NSFormattingContextUnknown, NSFormattingUnitStyle, + NSFormattingUnitStyleLong, NSFormattingUnitStyleMedium, NSFormattingUnitStyleShort, +}; +pub use self::generated::NSGarbageCollector::NSGarbageCollector; +pub use self::generated::NSGeometry::{ + NSAlignAllEdgesInward, NSAlignAllEdgesNearest, NSAlignAllEdgesOutward, NSAlignHeightInward, + NSAlignHeightNearest, NSAlignHeightOutward, NSAlignMaxXInward, NSAlignMaxXNearest, + NSAlignMaxXOutward, NSAlignMaxYInward, NSAlignMaxYNearest, NSAlignMaxYOutward, + NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, + NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, + NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsetsZero, NSMaxXEdge, + NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSRect, NSRectEdge, NSRectEdgeMaxX, + NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, NSSize, NSZeroPoint, NSZeroRect, NSZeroSize, +}; +pub use self::generated::NSHTTPCookie::{ + NSHTTPCookie, NSHTTPCookieComment, NSHTTPCookieCommentURL, NSHTTPCookieDiscard, + NSHTTPCookieDomain, NSHTTPCookieExpires, NSHTTPCookieMaximumAge, NSHTTPCookieName, + NSHTTPCookieOriginURL, NSHTTPCookiePath, NSHTTPCookiePort, NSHTTPCookiePropertyKey, + NSHTTPCookieSameSiteLax, NSHTTPCookieSameSitePolicy, NSHTTPCookieSameSiteStrict, + NSHTTPCookieSecure, NSHTTPCookieStringPolicy, NSHTTPCookieValue, NSHTTPCookieVersion, +}; +pub use self::generated::NSHTTPCookieStorage::{ + NSHTTPCookieAcceptPolicy, NSHTTPCookieAcceptPolicyAlways, NSHTTPCookieAcceptPolicyNever, + NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, + NSHTTPCookieManagerAcceptPolicyChangedNotification, + NSHTTPCookieManagerCookiesChangedNotification, NSHTTPCookieStorage, +}; +pub use self::generated::NSHashTable::{ + NSHashTable, NSHashTableCopyIn, NSHashTableObjectPointerPersonality, NSHashTableOptions, + NSHashTableStrongMemory, NSHashTableWeakMemory, NSHashTableZeroingWeakMemory, + NSIntHashCallBacks, NSIntegerHashCallBacks, NSNonOwnedPointerHashCallBacks, + NSNonRetainedObjectHashCallBacks, NSObjectHashCallBacks, NSOwnedObjectIdentityHashCallBacks, + NSOwnedPointerHashCallBacks, NSPointerToStructHashCallBacks, +}; +pub use self::generated::NSHost::NSHost; +pub use self::generated::NSISO8601DateFormatter::{ + NSISO8601DateFormatOptions, NSISO8601DateFormatWithColonSeparatorInTime, + NSISO8601DateFormatWithColonSeparatorInTimeZone, NSISO8601DateFormatWithDashSeparatorInDate, + NSISO8601DateFormatWithDay, NSISO8601DateFormatWithFractionalSeconds, + NSISO8601DateFormatWithFullDate, NSISO8601DateFormatWithFullTime, + NSISO8601DateFormatWithInternetDateTime, NSISO8601DateFormatWithMonth, + NSISO8601DateFormatWithSpaceBetweenDateAndTime, NSISO8601DateFormatWithTime, + NSISO8601DateFormatWithTimeZone, NSISO8601DateFormatWithWeekOfYear, + NSISO8601DateFormatWithYear, NSISO8601DateFormatter, +}; +pub use self::generated::NSIndexPath::NSIndexPath; +pub use self::generated::NSIndexSet::{NSIndexSet, NSMutableIndexSet}; +pub use self::generated::NSInflectionRule::{NSInflectionRule, NSInflectionRuleExplicit}; +pub use self::generated::NSInvocation::NSInvocation; +pub use self::generated::NSItemProvider::{ + NSExtensionJavaScriptFinalizeArgumentKey, NSExtensionJavaScriptPreprocessingResultsKey, + NSItemProvider, NSItemProviderErrorCode, NSItemProviderErrorDomain, + NSItemProviderFileOptionOpenInPlace, NSItemProviderFileOptions, + NSItemProviderItemUnavailableError, NSItemProviderPreferredImageSizeKey, NSItemProviderReading, + NSItemProviderRepresentationVisibility, NSItemProviderRepresentationVisibilityAll, + NSItemProviderRepresentationVisibilityGroup, NSItemProviderRepresentationVisibilityOwnProcess, + NSItemProviderRepresentationVisibilityTeam, NSItemProviderUnavailableCoercionError, + NSItemProviderUnexpectedValueClassError, NSItemProviderUnknownError, NSItemProviderWriting, +}; +pub use self::generated::NSJSONSerialization::{ + NSJSONReadingAllowFragments, NSJSONReadingFragmentsAllowed, NSJSONReadingJSON5Allowed, + NSJSONReadingMutableContainers, NSJSONReadingMutableLeaves, NSJSONReadingOptions, + NSJSONReadingTopLevelDictionaryAssumed, NSJSONSerialization, NSJSONWritingFragmentsAllowed, + NSJSONWritingOptions, NSJSONWritingPrettyPrinted, NSJSONWritingSortedKeys, + NSJSONWritingWithoutEscapingSlashes, +}; +pub use self::generated::NSKeyValueCoding::{ + NSAverageKeyValueOperator, NSCountKeyValueOperator, NSDistinctUnionOfArraysKeyValueOperator, + NSDistinctUnionOfObjectsKeyValueOperator, NSDistinctUnionOfSetsKeyValueOperator, + NSKeyValueOperator, NSMaximumKeyValueOperator, NSMinimumKeyValueOperator, + NSSumKeyValueOperator, NSUndefinedKeyException, NSUnionOfArraysKeyValueOperator, + NSUnionOfObjectsKeyValueOperator, NSUnionOfSetsKeyValueOperator, +}; +pub use self::generated::NSKeyValueObserving::{ + NSKeyValueChange, NSKeyValueChangeIndexesKey, NSKeyValueChangeInsertion, NSKeyValueChangeKey, + NSKeyValueChangeKindKey, NSKeyValueChangeNewKey, NSKeyValueChangeNotificationIsPriorKey, + NSKeyValueChangeOldKey, NSKeyValueChangeRemoval, NSKeyValueChangeReplacement, + NSKeyValueChangeSetting, NSKeyValueIntersectSetMutation, NSKeyValueMinusSetMutation, + NSKeyValueObservingOptionInitial, NSKeyValueObservingOptionNew, NSKeyValueObservingOptionOld, + NSKeyValueObservingOptionPrior, NSKeyValueObservingOptions, NSKeyValueSetMutationKind, + NSKeyValueSetSetMutation, NSKeyValueUnionSetMutation, +}; +pub use self::generated::NSKeyedArchiver::{ + NSInvalidArchiveOperationException, NSInvalidUnarchiveOperationException, + NSKeyedArchiveRootObjectKey, NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, + NSKeyedUnarchiverDelegate, +}; +pub use self::generated::NSLengthFormatter::{ + NSLengthFormatter, NSLengthFormatterUnit, NSLengthFormatterUnitCentimeter, + NSLengthFormatterUnitFoot, NSLengthFormatterUnitInch, NSLengthFormatterUnitKilometer, + NSLengthFormatterUnitMeter, NSLengthFormatterUnitMile, NSLengthFormatterUnitMillimeter, + NSLengthFormatterUnitYard, +}; +pub use self::generated::NSLinguisticTagger::{ + NSLinguisticTag, NSLinguisticTagAdjective, NSLinguisticTagAdverb, NSLinguisticTagClassifier, + NSLinguisticTagCloseParenthesis, NSLinguisticTagCloseQuote, NSLinguisticTagConjunction, + NSLinguisticTagDash, NSLinguisticTagDeterminer, NSLinguisticTagIdiom, + NSLinguisticTagInterjection, NSLinguisticTagNoun, NSLinguisticTagNumber, + NSLinguisticTagOpenParenthesis, NSLinguisticTagOpenQuote, NSLinguisticTagOrganizationName, + NSLinguisticTagOther, NSLinguisticTagOtherPunctuation, NSLinguisticTagOtherWhitespace, + NSLinguisticTagOtherWord, NSLinguisticTagParagraphBreak, NSLinguisticTagParticle, + NSLinguisticTagPersonalName, NSLinguisticTagPlaceName, NSLinguisticTagPreposition, + NSLinguisticTagPronoun, NSLinguisticTagPunctuation, NSLinguisticTagScheme, + NSLinguisticTagSchemeLanguage, NSLinguisticTagSchemeLemma, NSLinguisticTagSchemeLexicalClass, + NSLinguisticTagSchemeNameType, NSLinguisticTagSchemeNameTypeOrLexicalClass, + NSLinguisticTagSchemeScript, NSLinguisticTagSchemeTokenType, NSLinguisticTagSentenceTerminator, + NSLinguisticTagVerb, NSLinguisticTagWhitespace, NSLinguisticTagWord, NSLinguisticTagWordJoiner, + NSLinguisticTagger, NSLinguisticTaggerJoinNames, NSLinguisticTaggerOmitOther, + NSLinguisticTaggerOmitPunctuation, NSLinguisticTaggerOmitWhitespace, + NSLinguisticTaggerOmitWords, NSLinguisticTaggerOptions, NSLinguisticTaggerUnit, + NSLinguisticTaggerUnitDocument, NSLinguisticTaggerUnitParagraph, + NSLinguisticTaggerUnitSentence, NSLinguisticTaggerUnitWord, +}; +pub use self::generated::NSListFormatter::NSListFormatter; +pub use self::generated::NSLocale::{ + NSBuddhistCalendar, NSChineseCalendar, NSCurrentLocaleDidChangeNotification, + NSGregorianCalendar, NSHebrewCalendar, NSISO8601Calendar, NSIndianCalendar, NSIslamicCalendar, + NSIslamicCivilCalendar, NSJapaneseCalendar, NSLocale, + NSLocaleAlternateQuotationBeginDelimiterKey, NSLocaleAlternateQuotationEndDelimiterKey, + NSLocaleCalendar, NSLocaleCollationIdentifier, NSLocaleCollatorIdentifier, NSLocaleCountryCode, + NSLocaleCurrencyCode, NSLocaleCurrencySymbol, NSLocaleDecimalSeparator, + NSLocaleExemplarCharacterSet, NSLocaleGroupingSeparator, NSLocaleIdentifier, NSLocaleKey, + NSLocaleLanguageCode, NSLocaleLanguageDirection, NSLocaleLanguageDirectionBottomToTop, + NSLocaleLanguageDirectionLeftToRight, NSLocaleLanguageDirectionRightToLeft, + NSLocaleLanguageDirectionTopToBottom, NSLocaleLanguageDirectionUnknown, + NSLocaleMeasurementSystem, NSLocaleQuotationBeginDelimiterKey, + NSLocaleQuotationEndDelimiterKey, NSLocaleScriptCode, NSLocaleUsesMetricSystem, + NSLocaleVariantCode, NSPersianCalendar, NSRepublicOfChinaCalendar, +}; +pub use self::generated::NSLock::{ + NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock, +}; +pub use self::generated::NSMapTable::{ + NSIntMapKeyCallBacks, NSIntMapValueCallBacks, NSIntegerMapKeyCallBacks, + NSIntegerMapValueCallBacks, NSMapTable, NSMapTableCopyIn, NSMapTableObjectPointerPersonality, + NSMapTableOptions, NSMapTableStrongMemory, NSMapTableWeakMemory, NSMapTableZeroingWeakMemory, + NSNonOwnedPointerMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, + NSNonOwnedPointerOrNullMapKeyCallBacks, NSNonRetainedObjectMapKeyCallBacks, + NSNonRetainedObjectMapValueCallBacks, NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, + NSOwnedPointerMapKeyCallBacks, NSOwnedPointerMapValueCallBacks, +}; +pub use self::generated::NSMassFormatter::{ + NSMassFormatter, NSMassFormatterUnit, NSMassFormatterUnitGram, NSMassFormatterUnitKilogram, + NSMassFormatterUnitOunce, NSMassFormatterUnitPound, NSMassFormatterUnitStone, +}; +pub use self::generated::NSMeasurement::NSMeasurement; +pub use self::generated::NSMeasurementFormatter::{ + NSMeasurementFormatter, NSMeasurementFormatterUnitOptions, + NSMeasurementFormatterUnitOptionsNaturalScale, NSMeasurementFormatterUnitOptionsProvidedUnit, + NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit, +}; +pub use self::generated::NSMetadata::{ + NSMetadataItem, NSMetadataQuery, NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope, + NSMetadataQueryAttributeValueTuple, NSMetadataQueryDelegate, + NSMetadataQueryDidFinishGatheringNotification, NSMetadataQueryDidStartGatheringNotification, + NSMetadataQueryDidUpdateNotification, NSMetadataQueryGatheringProgressNotification, + NSMetadataQueryIndexedLocalComputerScope, NSMetadataQueryIndexedNetworkScope, + NSMetadataQueryLocalComputerScope, NSMetadataQueryNetworkScope, + NSMetadataQueryResultContentRelevanceAttribute, NSMetadataQueryResultGroup, + NSMetadataQueryUbiquitousDataScope, NSMetadataQueryUbiquitousDocumentsScope, + NSMetadataQueryUpdateAddedItemsKey, NSMetadataQueryUpdateChangedItemsKey, + NSMetadataQueryUpdateRemovedItemsKey, NSMetadataQueryUserHomeScope, +}; +pub use self::generated::NSMetadataAttributes::{ + NSMetadataItemAcquisitionMakeKey, NSMetadataItemAcquisitionModelKey, NSMetadataItemAlbumKey, + NSMetadataItemAltitudeKey, NSMetadataItemApertureKey, NSMetadataItemAppleLoopDescriptorsKey, + NSMetadataItemAppleLoopsKeyFilterTypeKey, NSMetadataItemAppleLoopsLoopModeKey, + NSMetadataItemAppleLoopsRootKeyKey, NSMetadataItemApplicationCategoriesKey, + NSMetadataItemAttributeChangeDateKey, NSMetadataItemAudiencesKey, + NSMetadataItemAudioBitRateKey, NSMetadataItemAudioChannelCountKey, + NSMetadataItemAudioEncodingApplicationKey, NSMetadataItemAudioSampleRateKey, + NSMetadataItemAudioTrackNumberKey, NSMetadataItemAuthorAddressesKey, + NSMetadataItemAuthorEmailAddressesKey, NSMetadataItemAuthorsKey, + NSMetadataItemBitsPerSampleKey, NSMetadataItemCFBundleIdentifierKey, + NSMetadataItemCameraOwnerKey, NSMetadataItemCityKey, NSMetadataItemCodecsKey, + NSMetadataItemColorSpaceKey, NSMetadataItemCommentKey, NSMetadataItemComposerKey, + NSMetadataItemContactKeywordsKey, NSMetadataItemContentCreationDateKey, + NSMetadataItemContentModificationDateKey, NSMetadataItemContentTypeKey, + NSMetadataItemContentTypeTreeKey, NSMetadataItemContributorsKey, NSMetadataItemCopyrightKey, + NSMetadataItemCountryKey, NSMetadataItemCoverageKey, NSMetadataItemCreatorKey, + NSMetadataItemDateAddedKey, NSMetadataItemDeliveryTypeKey, NSMetadataItemDescriptionKey, + NSMetadataItemDirectorKey, NSMetadataItemDisplayNameKey, NSMetadataItemDownloadedDateKey, + NSMetadataItemDueDateKey, NSMetadataItemDurationSecondsKey, NSMetadataItemEXIFGPSVersionKey, + NSMetadataItemEXIFVersionKey, NSMetadataItemEditorsKey, NSMetadataItemEmailAddressesKey, + NSMetadataItemEncodingApplicationsKey, NSMetadataItemExecutableArchitecturesKey, + NSMetadataItemExecutablePlatformKey, NSMetadataItemExposureModeKey, + NSMetadataItemExposureProgramKey, NSMetadataItemExposureTimeSecondsKey, + NSMetadataItemExposureTimeStringKey, NSMetadataItemFNumberKey, + NSMetadataItemFSContentChangeDateKey, NSMetadataItemFSCreationDateKey, NSMetadataItemFSNameKey, + NSMetadataItemFSSizeKey, NSMetadataItemFinderCommentKey, NSMetadataItemFlashOnOffKey, + NSMetadataItemFocalLength35mmKey, NSMetadataItemFocalLengthKey, NSMetadataItemFontsKey, + NSMetadataItemGPSAreaInformationKey, NSMetadataItemGPSDOPKey, NSMetadataItemGPSDateStampKey, + NSMetadataItemGPSDestBearingKey, NSMetadataItemGPSDestDistanceKey, + NSMetadataItemGPSDestLatitudeKey, NSMetadataItemGPSDestLongitudeKey, + NSMetadataItemGPSDifferentalKey, NSMetadataItemGPSMapDatumKey, NSMetadataItemGPSMeasureModeKey, + NSMetadataItemGPSProcessingMethodKey, NSMetadataItemGPSStatusKey, NSMetadataItemGPSTrackKey, + NSMetadataItemGenreKey, NSMetadataItemHasAlphaChannelKey, NSMetadataItemHeadlineKey, + NSMetadataItemISOSpeedKey, NSMetadataItemIdentifierKey, NSMetadataItemImageDirectionKey, + NSMetadataItemInformationKey, NSMetadataItemInstantMessageAddressesKey, + NSMetadataItemInstructionsKey, NSMetadataItemIsApplicationManagedKey, + NSMetadataItemIsGeneralMIDISequenceKey, NSMetadataItemIsLikelyJunkKey, + NSMetadataItemIsUbiquitousKey, NSMetadataItemKeySignatureKey, NSMetadataItemKeywordsKey, + NSMetadataItemKindKey, NSMetadataItemLanguagesKey, NSMetadataItemLastUsedDateKey, + NSMetadataItemLatitudeKey, NSMetadataItemLayerNamesKey, NSMetadataItemLensModelKey, + NSMetadataItemLongitudeKey, NSMetadataItemLyricistKey, NSMetadataItemMaxApertureKey, + NSMetadataItemMediaTypesKey, NSMetadataItemMeteringModeKey, NSMetadataItemMusicalGenreKey, + NSMetadataItemMusicalInstrumentCategoryKey, NSMetadataItemMusicalInstrumentNameKey, + NSMetadataItemNamedLocationKey, NSMetadataItemNumberOfPagesKey, NSMetadataItemOrganizationsKey, + NSMetadataItemOrientationKey, NSMetadataItemOriginalFormatKey, NSMetadataItemOriginalSourceKey, + NSMetadataItemPageHeightKey, NSMetadataItemPageWidthKey, NSMetadataItemParticipantsKey, + NSMetadataItemPathKey, NSMetadataItemPerformersKey, NSMetadataItemPhoneNumbersKey, + NSMetadataItemPixelCountKey, NSMetadataItemPixelHeightKey, NSMetadataItemPixelWidthKey, + NSMetadataItemProducerKey, NSMetadataItemProfileNameKey, NSMetadataItemProjectsKey, + NSMetadataItemPublishersKey, NSMetadataItemRecipientAddressesKey, + NSMetadataItemRecipientEmailAddressesKey, NSMetadataItemRecipientsKey, + NSMetadataItemRecordingDateKey, NSMetadataItemRecordingYearKey, NSMetadataItemRedEyeOnOffKey, + NSMetadataItemResolutionHeightDPIKey, NSMetadataItemResolutionWidthDPIKey, + NSMetadataItemRightsKey, NSMetadataItemSecurityMethodKey, NSMetadataItemSpeedKey, + NSMetadataItemStarRatingKey, NSMetadataItemStateOrProvinceKey, NSMetadataItemStreamableKey, + NSMetadataItemSubjectKey, NSMetadataItemTempoKey, NSMetadataItemTextContentKey, + NSMetadataItemThemeKey, NSMetadataItemTimeSignatureKey, NSMetadataItemTimestampKey, + NSMetadataItemTitleKey, NSMetadataItemTotalBitRateKey, NSMetadataItemURLKey, + NSMetadataItemVersionKey, NSMetadataItemVideoBitRateKey, NSMetadataItemWhereFromsKey, + NSMetadataItemWhiteBalanceKey, NSMetadataUbiquitousItemContainerDisplayNameKey, + NSMetadataUbiquitousItemDownloadRequestedKey, NSMetadataUbiquitousItemDownloadingErrorKey, + NSMetadataUbiquitousItemDownloadingStatusCurrent, + NSMetadataUbiquitousItemDownloadingStatusDownloaded, + NSMetadataUbiquitousItemDownloadingStatusKey, + NSMetadataUbiquitousItemDownloadingStatusNotDownloaded, + NSMetadataUbiquitousItemHasUnresolvedConflictsKey, NSMetadataUbiquitousItemIsDownloadedKey, + NSMetadataUbiquitousItemIsDownloadingKey, NSMetadataUbiquitousItemIsExternalDocumentKey, + NSMetadataUbiquitousItemIsSharedKey, NSMetadataUbiquitousItemIsUploadedKey, + NSMetadataUbiquitousItemIsUploadingKey, NSMetadataUbiquitousItemPercentDownloadedKey, + NSMetadataUbiquitousItemPercentUploadedKey, NSMetadataUbiquitousItemURLInLocalContainerKey, + NSMetadataUbiquitousItemUploadingErrorKey, + NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey, + NSMetadataUbiquitousSharedItemCurrentUserRoleKey, + NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey, + NSMetadataUbiquitousSharedItemOwnerNameComponentsKey, + NSMetadataUbiquitousSharedItemPermissionsReadOnly, + NSMetadataUbiquitousSharedItemPermissionsReadWrite, NSMetadataUbiquitousSharedItemRoleOwner, + NSMetadataUbiquitousSharedItemRoleParticipant, +}; +pub use self::generated::NSMethodSignature::NSMethodSignature; +pub use self::generated::NSMorphology::{ + NSGrammaticalGender, NSGrammaticalGenderFeminine, NSGrammaticalGenderMasculine, + NSGrammaticalGenderNeuter, NSGrammaticalGenderNotSet, NSGrammaticalNumber, + NSGrammaticalNumberNotSet, NSGrammaticalNumberPlural, NSGrammaticalNumberPluralFew, + NSGrammaticalNumberPluralMany, NSGrammaticalNumberPluralTwo, NSGrammaticalNumberSingular, + NSGrammaticalNumberZero, NSGrammaticalPartOfSpeech, NSGrammaticalPartOfSpeechAbbreviation, + NSGrammaticalPartOfSpeechAdjective, NSGrammaticalPartOfSpeechAdposition, + NSGrammaticalPartOfSpeechAdverb, NSGrammaticalPartOfSpeechConjunction, + NSGrammaticalPartOfSpeechDeterminer, NSGrammaticalPartOfSpeechInterjection, + NSGrammaticalPartOfSpeechLetter, NSGrammaticalPartOfSpeechNotSet, + NSGrammaticalPartOfSpeechNoun, NSGrammaticalPartOfSpeechNumeral, + NSGrammaticalPartOfSpeechParticle, NSGrammaticalPartOfSpeechPreposition, + NSGrammaticalPartOfSpeechPronoun, NSGrammaticalPartOfSpeechVerb, NSMorphology, + NSMorphologyCustomPronoun, +}; +pub use self::generated::NSNetServices::{ + NSNetService, NSNetServiceBrowser, NSNetServiceBrowserDelegate, NSNetServiceDelegate, + NSNetServiceListenForConnections, NSNetServiceNoAutoRename, NSNetServiceOptions, + NSNetServicesActivityInProgress, NSNetServicesBadArgumentError, NSNetServicesCancelledError, + NSNetServicesCollisionError, NSNetServicesError, NSNetServicesErrorCode, + NSNetServicesErrorDomain, NSNetServicesInvalidError, + NSNetServicesMissingRequiredConfigurationError, NSNetServicesNotFoundError, + NSNetServicesTimeoutError, NSNetServicesUnknownError, +}; +pub use self::generated::NSNotification::{ + NSNotification, NSNotificationCenter, NSNotificationName, +}; +pub use self::generated::NSNotificationQueue::{ + NSNotificationCoalescing, NSNotificationCoalescingOnName, NSNotificationCoalescingOnSender, + NSNotificationNoCoalescing, NSNotificationQueue, NSPostASAP, NSPostNow, NSPostWhenIdle, + NSPostingStyle, +}; +pub use self::generated::NSNull::NSNull; +pub use self::generated::NSNumberFormatter::{ + NSNumberFormatter, NSNumberFormatterBehavior, NSNumberFormatterBehavior10_0, + NSNumberFormatterBehavior10_4, NSNumberFormatterBehaviorDefault, + NSNumberFormatterCurrencyAccountingStyle, NSNumberFormatterCurrencyISOCodeStyle, + NSNumberFormatterCurrencyPluralStyle, NSNumberFormatterCurrencyStyle, + NSNumberFormatterDecimalStyle, NSNumberFormatterNoStyle, NSNumberFormatterOrdinalStyle, + NSNumberFormatterPadAfterPrefix, NSNumberFormatterPadAfterSuffix, + NSNumberFormatterPadBeforePrefix, NSNumberFormatterPadBeforeSuffix, + NSNumberFormatterPadPosition, NSNumberFormatterPercentStyle, NSNumberFormatterRoundCeiling, + NSNumberFormatterRoundDown, NSNumberFormatterRoundFloor, NSNumberFormatterRoundHalfDown, + NSNumberFormatterRoundHalfEven, NSNumberFormatterRoundHalfUp, NSNumberFormatterRoundUp, + NSNumberFormatterRoundingMode, NSNumberFormatterScientificStyle, + NSNumberFormatterSpellOutStyle, NSNumberFormatterStyle, +}; +pub use self::generated::NSObjCRuntime::{ + NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, NSEnumerationReverse, + NSExceptionName, NSFoundationVersionNumber, NSNotFound, NSOrderedAscending, + NSOrderedDescending, NSOrderedSame, NSQualityOfService, NSQualityOfServiceBackground, + NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, + NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, NSSortOptions, NSSortStable, +}; +pub use self::generated::NSObject::{ + NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, +}; +pub use self::generated::NSOperation::{ + NSBlockOperation, NSInvocationOperation, NSInvocationOperationCancelledException, + NSInvocationOperationVoidResultException, NSOperation, NSOperationQueue, + NSOperationQueueDefaultMaxConcurrentOperationCount, NSOperationQueuePriority, + NSOperationQueuePriorityHigh, NSOperationQueuePriorityLow, NSOperationQueuePriorityNormal, + NSOperationQueuePriorityVeryHigh, NSOperationQueuePriorityVeryLow, +}; +pub use self::generated::NSOrderedCollectionChange::{ + NSCollectionChangeInsert, NSCollectionChangeRemove, NSCollectionChangeType, + NSOrderedCollectionChange, +}; +pub use self::generated::NSOrderedCollectionDifference::{ + NSOrderedCollectionDifference, NSOrderedCollectionDifferenceCalculationInferMoves, + NSOrderedCollectionDifferenceCalculationOmitInsertedObjects, + NSOrderedCollectionDifferenceCalculationOmitRemovedObjects, + NSOrderedCollectionDifferenceCalculationOptions, +}; +pub use self::generated::NSOrderedSet::{NSMutableOrderedSet, NSOrderedSet}; +pub use self::generated::NSOrthography::NSOrthography; +pub use self::generated::NSPathUtilities::{ + NSAdminApplicationDirectory, NSAllApplicationsDirectory, NSAllDomainsMask, + NSAllLibrariesDirectory, NSApplicationDirectory, NSApplicationScriptsDirectory, + NSApplicationSupportDirectory, NSAutosavedInformationDirectory, NSCachesDirectory, + NSCoreServiceDirectory, NSDemoApplicationDirectory, NSDesktopDirectory, + NSDeveloperApplicationDirectory, NSDeveloperDirectory, NSDocumentDirectory, + NSDocumentationDirectory, NSDownloadsDirectory, NSInputMethodsDirectory, + NSItemReplacementDirectory, NSLibraryDirectory, NSLocalDomainMask, NSMoviesDirectory, + NSMusicDirectory, NSNetworkDomainMask, NSPicturesDirectory, NSPreferencePanesDirectory, + NSPrinterDescriptionDirectory, NSSearchPathDirectory, NSSearchPathDomainMask, + NSSharedPublicDirectory, NSSystemDomainMask, NSTrashDirectory, NSUserDirectory, + NSUserDomainMask, +}; +pub use self::generated::NSPersonNameComponents::NSPersonNameComponents; +pub use self::generated::NSPersonNameComponentsFormatter::{ + NSPersonNameComponentDelimiter, NSPersonNameComponentFamilyName, + NSPersonNameComponentGivenName, NSPersonNameComponentKey, NSPersonNameComponentMiddleName, + NSPersonNameComponentNickname, NSPersonNameComponentPrefix, NSPersonNameComponentSuffix, + NSPersonNameComponentsFormatter, NSPersonNameComponentsFormatterOptions, + NSPersonNameComponentsFormatterPhonetic, NSPersonNameComponentsFormatterStyle, + NSPersonNameComponentsFormatterStyleAbbreviated, NSPersonNameComponentsFormatterStyleDefault, + NSPersonNameComponentsFormatterStyleLong, NSPersonNameComponentsFormatterStyleMedium, + NSPersonNameComponentsFormatterStyleShort, +}; +pub use self::generated::NSPointerArray::NSPointerArray; +pub use self::generated::NSPointerFunctions::{ + NSPointerFunctions, NSPointerFunctionsCStringPersonality, NSPointerFunctionsCopyIn, + NSPointerFunctionsIntegerPersonality, NSPointerFunctionsMachVirtualMemory, + NSPointerFunctionsMallocMemory, NSPointerFunctionsObjectPersonality, + NSPointerFunctionsObjectPointerPersonality, NSPointerFunctionsOpaqueMemory, + NSPointerFunctionsOpaquePersonality, NSPointerFunctionsOptions, NSPointerFunctionsStrongMemory, + NSPointerFunctionsStructPersonality, NSPointerFunctionsWeakMemory, + NSPointerFunctionsZeroingWeakMemory, +}; +pub use self::generated::NSPort::{ + NSMachPort, NSMachPortDeallocateNone, NSMachPortDeallocateReceiveRight, + NSMachPortDeallocateSendRight, NSMachPortDelegate, NSMachPortOptions, NSMessagePort, NSPort, + NSPortDelegate, NSPortDidBecomeInvalidNotification, NSSocketPort, +}; +pub use self::generated::NSPortCoder::NSPortCoder; +pub use self::generated::NSPortMessage::NSPortMessage; +pub use self::generated::NSPortNameServer::{ + NSMachBootstrapServer, NSMessagePortNameServer, NSPortNameServer, NSSocketPortNameServer, +}; +pub use self::generated::NSPredicate::NSPredicate; +pub use self::generated::NSProcessInfo::{ + NSActivityAutomaticTerminationDisabled, NSActivityBackground, + NSActivityIdleDisplaySleepDisabled, NSActivityIdleSystemSleepDisabled, + NSActivityLatencyCritical, NSActivityOptions, NSActivitySuddenTerminationDisabled, + NSActivityUserInitiated, NSActivityUserInitiatedAllowingIdleSystemSleep, NSHPUXOperatingSystem, + NSMACHOperatingSystem, NSOSF1OperatingSystem, NSProcessInfo, + NSProcessInfoPowerStateDidChangeNotification, NSProcessInfoThermalState, + NSProcessInfoThermalStateCritical, NSProcessInfoThermalStateDidChangeNotification, + NSProcessInfoThermalStateFair, NSProcessInfoThermalStateNominal, + NSProcessInfoThermalStateSerious, NSSolarisOperatingSystem, NSSunOSOperatingSystem, + NSWindows95OperatingSystem, NSWindowsNTOperatingSystem, +}; +pub use self::generated::NSProgress::{ + NSProgress, NSProgressEstimatedTimeRemainingKey, NSProgressFileAnimationImageKey, + NSProgressFileAnimationImageOriginalRectKey, NSProgressFileCompletedCountKey, + NSProgressFileIconKey, NSProgressFileOperationKind, NSProgressFileOperationKindCopying, + NSProgressFileOperationKindDecompressingAfterDownloading, + NSProgressFileOperationKindDownloading, NSProgressFileOperationKindDuplicating, + NSProgressFileOperationKindKey, NSProgressFileOperationKindReceiving, + NSProgressFileOperationKindUploading, NSProgressFileTotalCountKey, NSProgressFileURLKey, + NSProgressKind, NSProgressKindFile, NSProgressReporting, NSProgressThroughputKey, + NSProgressUserInfoKey, +}; +pub use self::generated::NSPropertyList::{ + NSPropertyListBinaryFormat_v1_0, NSPropertyListFormat, NSPropertyListImmutable, + NSPropertyListMutabilityOptions, NSPropertyListMutableContainers, + NSPropertyListMutableContainersAndLeaves, NSPropertyListOpenStepFormat, + NSPropertyListReadOptions, NSPropertyListSerialization, NSPropertyListWriteOptions, + NSPropertyListXMLFormat_v1_0, +}; +pub use self::generated::NSProtocolChecker::NSProtocolChecker; +pub use self::generated::NSProxy::NSProxy; +pub use self::generated::NSRegularExpression::{ + NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, + NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, + NSMatchingReportProgress, NSMatchingRequiredEnd, NSMatchingWithTransparentBounds, + NSMatchingWithoutAnchoringBounds, NSRegularExpression, + NSRegularExpressionAllowCommentsAndWhitespace, NSRegularExpressionAnchorsMatchLines, + NSRegularExpressionCaseInsensitive, NSRegularExpressionDotMatchesLineSeparators, + NSRegularExpressionIgnoreMetacharacters, NSRegularExpressionOptions, + NSRegularExpressionUseUnicodeWordBoundaries, NSRegularExpressionUseUnixLineSeparators, +}; +pub use self::generated::NSRelativeDateTimeFormatter::{ + NSRelativeDateTimeFormatter, NSRelativeDateTimeFormatterStyle, + NSRelativeDateTimeFormatterStyleNamed, NSRelativeDateTimeFormatterStyleNumeric, + NSRelativeDateTimeFormatterUnitsStyle, NSRelativeDateTimeFormatterUnitsStyleAbbreviated, + NSRelativeDateTimeFormatterUnitsStyleFull, NSRelativeDateTimeFormatterUnitsStyleShort, + NSRelativeDateTimeFormatterUnitsStyleSpellOut, +}; +pub use self::generated::NSRunLoop::{NSDefaultRunLoopMode, NSRunLoop, NSRunLoopCommonModes}; +pub use self::generated::NSScanner::NSScanner; +pub use self::generated::NSScriptClassDescription::NSScriptClassDescription; +pub use self::generated::NSScriptCoercionHandler::NSScriptCoercionHandler; +pub use self::generated::NSScriptCommand::{ + NSArgumentEvaluationScriptError, NSArgumentsWrongScriptError, NSCannotCreateScriptCommandError, + NSInternalScriptError, NSKeySpecifierEvaluationScriptError, NSNoScriptError, + NSOperationNotSupportedForKeyScriptError, NSReceiverEvaluationScriptError, + NSReceiversCantHandleCommandScriptError, NSRequiredArgumentsMissingScriptError, + NSScriptCommand, NSUnknownKeyScriptError, +}; +pub use self::generated::NSScriptCommandDescription::NSScriptCommandDescription; +pub use self::generated::NSScriptExecutionContext::NSScriptExecutionContext; +pub use self::generated::NSScriptKeyValueCoding::NSOperationNotSupportedForKeyException; +pub use self::generated::NSScriptObjectSpecifiers::{ + NSContainerSpecifierError, NSEverySubelement, NSIndexSpecifier, NSIndexSubelement, + NSInsertionPosition, NSInternalSpecifierError, NSInvalidIndexSpecifierError, NSMiddleSpecifier, + NSMiddleSubelement, NSNameSpecifier, NSNoSpecifierError, NSNoSubelement, + NSNoTopLevelContainersSpecifierError, NSOperationNotSupportedForKeySpecifierError, + NSPositionAfter, NSPositionBefore, NSPositionBeginning, NSPositionEnd, NSPositionReplace, + NSPositionalSpecifier, NSPropertySpecifier, NSRandomSpecifier, NSRandomSubelement, + NSRangeSpecifier, NSRelativeAfter, NSRelativeBefore, NSRelativePosition, NSRelativeSpecifier, + NSScriptObjectSpecifier, NSUniqueIDSpecifier, NSUnknownKeySpecifierError, NSWhoseSpecifier, + NSWhoseSubelementIdentifier, +}; +pub use self::generated::NSScriptStandardSuiteCommands::{ + NSCloneCommand, NSCloseCommand, NSCountCommand, NSCreateCommand, NSDeleteCommand, + NSExistsCommand, NSGetCommand, NSMoveCommand, NSQuitCommand, NSSaveOptions, NSSaveOptionsAsk, + NSSaveOptionsNo, NSSaveOptionsYes, NSSetCommand, +}; +pub use self::generated::NSScriptSuiteRegistry::NSScriptSuiteRegistry; +pub use self::generated::NSScriptWhoseTests::{ + NSBeginsWithComparison, NSContainsComparison, NSEndsWithComparison, NSEqualToComparison, + NSGreaterThanComparison, NSGreaterThanOrEqualToComparison, NSLessThanComparison, + NSLessThanOrEqualToComparison, NSLogicalTest, NSScriptWhoseTest, NSSpecifierTest, + NSTestComparisonOperation, +}; +pub use self::generated::NSSet::{NSCountedSet, NSMutableSet, NSSet}; +pub use self::generated::NSSortDescriptor::NSSortDescriptor; +pub use self::generated::NSSpellServer::{ + NSGrammarCorrections, NSGrammarRange, NSGrammarUserDescription, NSSpellServer, + NSSpellServerDelegate, +}; +pub use self::generated::NSStream::{ + NSInputStream, NSOutputStream, NSStream, NSStreamDataWrittenToMemoryStreamKey, + NSStreamDelegate, NSStreamEvent, NSStreamEventEndEncountered, NSStreamEventErrorOccurred, + NSStreamEventHasBytesAvailable, NSStreamEventHasSpaceAvailable, NSStreamEventNone, + NSStreamEventOpenCompleted, NSStreamFileCurrentOffsetKey, NSStreamNetworkServiceType, + NSStreamNetworkServiceTypeBackground, NSStreamNetworkServiceTypeCallSignaling, + NSStreamNetworkServiceTypeValue, NSStreamNetworkServiceTypeVideo, + NSStreamNetworkServiceTypeVoIP, NSStreamNetworkServiceTypeVoice, NSStreamPropertyKey, + NSStreamSOCKSErrorDomain, NSStreamSOCKSProxyConfiguration, NSStreamSOCKSProxyConfigurationKey, + NSStreamSOCKSProxyHostKey, NSStreamSOCKSProxyPasswordKey, NSStreamSOCKSProxyPortKey, + NSStreamSOCKSProxyUserKey, NSStreamSOCKSProxyVersion, NSStreamSOCKSProxyVersion4, + NSStreamSOCKSProxyVersion5, NSStreamSOCKSProxyVersionKey, NSStreamSocketSSLErrorDomain, + NSStreamSocketSecurityLevel, NSStreamSocketSecurityLevelKey, + NSStreamSocketSecurityLevelNegotiatedSSL, NSStreamSocketSecurityLevelNone, + NSStreamSocketSecurityLevelSSLv2, NSStreamSocketSecurityLevelSSLv3, + NSStreamSocketSecurityLevelTLSv1, NSStreamStatus, NSStreamStatusAtEnd, NSStreamStatusClosed, + NSStreamStatusError, NSStreamStatusNotOpen, NSStreamStatusOpen, NSStreamStatusOpening, + NSStreamStatusReading, NSStreamStatusWriting, +}; +pub use self::generated::NSString::{ + NSASCIIStringEncoding, NSAnchoredSearch, NSBackwardsSearch, NSCaseInsensitiveSearch, + NSCharacterConversionException, NSConstantString, NSDiacriticInsensitiveSearch, + NSForcedOrderingSearch, NSISO2022JPStringEncoding, NSISOLatin1StringEncoding, + NSISOLatin2StringEncoding, NSJapaneseEUCStringEncoding, NSLiteralSearch, + NSMacOSRomanStringEncoding, NSMutableString, NSNEXTSTEPStringEncoding, + NSNonLossyASCIIStringEncoding, NSNumericSearch, NSParseErrorException, + NSProprietaryStringEncoding, NSRegularExpressionSearch, NSShiftJISStringEncoding, + NSSimpleCString, NSString, NSStringCompareOptions, NSStringEncoding, + NSStringEncodingConversionAllowLossy, NSStringEncodingConversionExternalRepresentation, + NSStringEncodingConversionOptions, NSStringEncodingDetectionAllowLossyKey, + NSStringEncodingDetectionDisallowedEncodingsKey, NSStringEncodingDetectionFromWindowsKey, + NSStringEncodingDetectionLikelyLanguageKey, NSStringEncodingDetectionLossySubstitutionKey, + NSStringEncodingDetectionOptionsKey, NSStringEncodingDetectionSuggestedEncodingsKey, + NSStringEncodingDetectionUseOnlySuggestedEncodingsKey, NSStringEnumerationByCaretPositions, + NSStringEnumerationByComposedCharacterSequences, NSStringEnumerationByDeletionClusters, + NSStringEnumerationByLines, NSStringEnumerationByParagraphs, NSStringEnumerationBySentences, + NSStringEnumerationByWords, NSStringEnumerationLocalized, NSStringEnumerationOptions, + NSStringEnumerationReverse, NSStringEnumerationSubstringNotRequired, NSStringTransform, + NSStringTransformFullwidthToHalfwidth, NSStringTransformHiraganaToKatakana, + NSStringTransformLatinToArabic, NSStringTransformLatinToCyrillic, + NSStringTransformLatinToGreek, NSStringTransformLatinToHangul, NSStringTransformLatinToHebrew, + NSStringTransformLatinToHiragana, NSStringTransformLatinToKatakana, + NSStringTransformLatinToThai, NSStringTransformMandarinToLatin, + NSStringTransformStripCombiningMarks, NSStringTransformStripDiacritics, + NSStringTransformToLatin, NSStringTransformToUnicodeName, NSStringTransformToXMLHex, + NSSymbolStringEncoding, NSUTF16BigEndianStringEncoding, NSUTF16LittleEndianStringEncoding, + NSUTF16StringEncoding, NSUTF32BigEndianStringEncoding, NSUTF32LittleEndianStringEncoding, + NSUTF32StringEncoding, NSUTF8StringEncoding, NSUnicodeStringEncoding, NSWidthInsensitiveSearch, + NSWindowsCP1250StringEncoding, NSWindowsCP1251StringEncoding, NSWindowsCP1252StringEncoding, + NSWindowsCP1253StringEncoding, NSWindowsCP1254StringEncoding, +}; +pub use self::generated::NSTask::{ + NSTask, NSTaskDidTerminateNotification, NSTaskTerminationReason, NSTaskTerminationReasonExit, + NSTaskTerminationReasonUncaughtSignal, +}; +pub use self::generated::NSTextCheckingResult::{ + NSTextCheckingAirlineKey, NSTextCheckingAllCustomTypes, NSTextCheckingAllSystemTypes, + NSTextCheckingAllTypes, NSTextCheckingCityKey, NSTextCheckingCountryKey, + NSTextCheckingFlightKey, NSTextCheckingJobTitleKey, NSTextCheckingKey, NSTextCheckingNameKey, + NSTextCheckingOrganizationKey, NSTextCheckingPhoneKey, NSTextCheckingResult, + NSTextCheckingStateKey, NSTextCheckingStreetKey, NSTextCheckingType, NSTextCheckingTypeAddress, + NSTextCheckingTypeCorrection, NSTextCheckingTypeDash, NSTextCheckingTypeDate, + NSTextCheckingTypeGrammar, NSTextCheckingTypeLink, NSTextCheckingTypeOrthography, + NSTextCheckingTypePhoneNumber, NSTextCheckingTypeQuote, NSTextCheckingTypeRegularExpression, + NSTextCheckingTypeReplacement, NSTextCheckingTypeSpelling, + NSTextCheckingTypeTransitInformation, NSTextCheckingTypes, NSTextCheckingZIPKey, +}; +pub use self::generated::NSThread::{ + NSDidBecomeSingleThreadedNotification, NSThread, NSThreadWillExitNotification, + NSWillBecomeMultiThreadedNotification, +}; +pub use self::generated::NSTimeZone::{ + NSSystemTimeZoneDidChangeNotification, NSTimeZone, NSTimeZoneNameStyle, + NSTimeZoneNameStyleDaylightSaving, NSTimeZoneNameStyleGeneric, + NSTimeZoneNameStyleShortDaylightSaving, NSTimeZoneNameStyleShortGeneric, + NSTimeZoneNameStyleShortStandard, NSTimeZoneNameStyleStandard, +}; +pub use self::generated::NSTimer::NSTimer; +pub use self::generated::NSURLAuthenticationChallenge::{ + NSURLAuthenticationChallenge, NSURLAuthenticationChallengeSender, +}; +pub use self::generated::NSURLCache::{ + NSCachedURLResponse, NSURLCache, NSURLCacheStorageAllowed, + NSURLCacheStorageAllowedInMemoryOnly, NSURLCacheStorageNotAllowed, NSURLCacheStoragePolicy, +}; +pub use self::generated::NSURLConnection::{ + NSURLConnection, NSURLConnectionDataDelegate, NSURLConnectionDelegate, + NSURLConnectionDownloadDelegate, +}; +pub use self::generated::NSURLCredential::{ + NSURLCredential, NSURLCredentialPersistence, NSURLCredentialPersistenceForSession, + NSURLCredentialPersistenceNone, NSURLCredentialPersistencePermanent, + NSURLCredentialPersistenceSynchronizable, +}; +pub use self::generated::NSURLCredentialStorage::{ + NSURLCredentialStorage, NSURLCredentialStorageChangedNotification, + NSURLCredentialStorageRemoveSynchronizableCredentials, +}; +pub use self::generated::NSURLDownload::{NSURLDownload, NSURLDownloadDelegate}; +pub use self::generated::NSURLError::{ + NSErrorFailingURLStringKey, NSURLErrorAppTransportSecurityRequiresSecureConnection, + NSURLErrorBackgroundSessionInUseByAnotherProcess, + NSURLErrorBackgroundSessionRequiresSharedContainer, NSURLErrorBackgroundSessionWasDisconnected, + NSURLErrorBackgroundTaskCancelledReasonKey, NSURLErrorBadServerResponse, NSURLErrorBadURL, + NSURLErrorCallIsActive, NSURLErrorCancelled, + NSURLErrorCancelledReasonBackgroundUpdatesDisabled, + NSURLErrorCancelledReasonInsufficientSystemResources, + NSURLErrorCancelledReasonUserForceQuitApplication, NSURLErrorCannotCloseFile, + NSURLErrorCannotConnectToHost, NSURLErrorCannotCreateFile, NSURLErrorCannotDecodeContentData, + NSURLErrorCannotDecodeRawData, NSURLErrorCannotFindHost, NSURLErrorCannotLoadFromNetwork, + NSURLErrorCannotMoveFile, NSURLErrorCannotOpenFile, NSURLErrorCannotParseResponse, + NSURLErrorCannotRemoveFile, NSURLErrorCannotWriteToFile, NSURLErrorClientCertificateRejected, + NSURLErrorClientCertificateRequired, NSURLErrorDNSLookupFailed, + NSURLErrorDataLengthExceedsMaximum, NSURLErrorDataNotAllowed, NSURLErrorDomain, + NSURLErrorDownloadDecodingFailedMidStream, NSURLErrorDownloadDecodingFailedToComplete, + NSURLErrorFailingURLErrorKey, NSURLErrorFailingURLPeerTrustErrorKey, + NSURLErrorFailingURLStringErrorKey, NSURLErrorFileDoesNotExist, NSURLErrorFileIsDirectory, + NSURLErrorFileOutsideSafeArea, NSURLErrorHTTPTooManyRedirects, + NSURLErrorInternationalRoamingOff, NSURLErrorNetworkConnectionLost, + NSURLErrorNetworkUnavailableReason, NSURLErrorNetworkUnavailableReasonCellular, + NSURLErrorNetworkUnavailableReasonConstrained, NSURLErrorNetworkUnavailableReasonExpensive, + NSURLErrorNetworkUnavailableReasonKey, NSURLErrorNoPermissionsToReadFile, + NSURLErrorNotConnectedToInternet, NSURLErrorRedirectToNonExistentLocation, + NSURLErrorRequestBodyStreamExhausted, NSURLErrorResourceUnavailable, + NSURLErrorSecureConnectionFailed, NSURLErrorServerCertificateHasBadDate, + NSURLErrorServerCertificateHasUnknownRoot, NSURLErrorServerCertificateNotYetValid, + NSURLErrorServerCertificateUntrusted, NSURLErrorTimedOut, NSURLErrorUnknown, + NSURLErrorUnsupportedURL, NSURLErrorUserAuthenticationRequired, + NSURLErrorUserCancelledAuthentication, NSURLErrorZeroByteResource, +}; +pub use self::generated::NSURLHandle::{ + NSFTPPropertyActiveTransferModeKey, NSFTPPropertyFTPProxy, NSFTPPropertyFileOffsetKey, + NSFTPPropertyUserLoginKey, NSFTPPropertyUserPasswordKey, NSHTTPPropertyErrorPageDataKey, + NSHTTPPropertyHTTPProxy, NSHTTPPropertyRedirectionHeadersKey, + NSHTTPPropertyServerHTTPVersionKey, NSHTTPPropertyStatusCodeKey, NSHTTPPropertyStatusReasonKey, + NSURLHandle, NSURLHandleClient, NSURLHandleLoadFailed, NSURLHandleLoadInProgress, + NSURLHandleLoadSucceeded, NSURLHandleNotLoaded, NSURLHandleStatus, +}; +pub use self::generated::NSURLProtectionSpace::{ + NSURLAuthenticationMethodClientCertificate, NSURLAuthenticationMethodDefault, + NSURLAuthenticationMethodHTMLForm, NSURLAuthenticationMethodHTTPBasic, + NSURLAuthenticationMethodHTTPDigest, NSURLAuthenticationMethodNTLM, + NSURLAuthenticationMethodNegotiate, NSURLAuthenticationMethodServerTrust, NSURLProtectionSpace, + NSURLProtectionSpaceFTP, NSURLProtectionSpaceFTPProxy, NSURLProtectionSpaceHTTP, + NSURLProtectionSpaceHTTPProxy, NSURLProtectionSpaceHTTPS, NSURLProtectionSpaceHTTPSProxy, + NSURLProtectionSpaceSOCKSProxy, +}; +pub use self::generated::NSURLProtocol::{NSURLProtocol, NSURLProtocolClient}; +pub use self::generated::NSURLRequest::{ + NSMutableURLRequest, NSURLNetworkServiceTypeAVStreaming, NSURLNetworkServiceTypeBackground, + NSURLNetworkServiceTypeCallSignaling, NSURLNetworkServiceTypeDefault, + NSURLNetworkServiceTypeResponsiveAV, NSURLNetworkServiceTypeResponsiveData, + NSURLNetworkServiceTypeVideo, NSURLNetworkServiceTypeVoIP, NSURLNetworkServiceTypeVoice, + NSURLRequest, NSURLRequestAttribution, NSURLRequestAttributionDeveloper, + NSURLRequestAttributionUser, NSURLRequestCachePolicy, NSURLRequestNetworkServiceType, + NSURLRequestReloadIgnoringCacheData, NSURLRequestReloadIgnoringLocalAndRemoteCacheData, + NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestReloadRevalidatingCacheData, + NSURLRequestReturnCacheDataDontLoad, NSURLRequestReturnCacheDataElseLoad, + NSURLRequestUseProtocolCachePolicy, +}; +pub use self::generated::NSURLResponse::{NSHTTPURLResponse, NSURLResponse}; +pub use self::generated::NSURLSession::{ + NSURLSession, NSURLSessionAuthChallengeCancelAuthenticationChallenge, + NSURLSessionAuthChallengeDisposition, NSURLSessionAuthChallengePerformDefaultHandling, + NSURLSessionAuthChallengeRejectProtectionSpace, NSURLSessionAuthChallengeUseCredential, + NSURLSessionConfiguration, NSURLSessionDataDelegate, NSURLSessionDataTask, + NSURLSessionDelayedRequestCancel, NSURLSessionDelayedRequestContinueLoading, + NSURLSessionDelayedRequestDisposition, NSURLSessionDelayedRequestUseNewRequest, + NSURLSessionDelegate, NSURLSessionDownloadDelegate, NSURLSessionDownloadTask, + NSURLSessionDownloadTaskResumeData, NSURLSessionMultipathServiceType, + NSURLSessionMultipathServiceTypeAggregate, NSURLSessionMultipathServiceTypeHandover, + NSURLSessionMultipathServiceTypeInteractive, NSURLSessionMultipathServiceTypeNone, + NSURLSessionResponseAllow, NSURLSessionResponseBecomeDownload, + NSURLSessionResponseBecomeStream, NSURLSessionResponseCancel, NSURLSessionResponseDisposition, + NSURLSessionStreamDelegate, NSURLSessionStreamTask, NSURLSessionTask, NSURLSessionTaskDelegate, + NSURLSessionTaskMetrics, NSURLSessionTaskMetricsDomainResolutionProtocol, + NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS, + NSURLSessionTaskMetricsDomainResolutionProtocolTCP, + NSURLSessionTaskMetricsDomainResolutionProtocolTLS, + NSURLSessionTaskMetricsDomainResolutionProtocolUDP, + NSURLSessionTaskMetricsDomainResolutionProtocolUnknown, + NSURLSessionTaskMetricsResourceFetchType, NSURLSessionTaskMetricsResourceFetchTypeLocalCache, + NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad, + NSURLSessionTaskMetricsResourceFetchTypeServerPush, + NSURLSessionTaskMetricsResourceFetchTypeUnknown, NSURLSessionTaskPriorityDefault, + NSURLSessionTaskPriorityHigh, NSURLSessionTaskPriorityLow, NSURLSessionTaskState, + NSURLSessionTaskStateCanceling, NSURLSessionTaskStateCompleted, NSURLSessionTaskStateRunning, + NSURLSessionTaskStateSuspended, NSURLSessionTaskTransactionMetrics, + NSURLSessionTransferSizeUnknown, NSURLSessionUploadTask, NSURLSessionWebSocketCloseCode, + NSURLSessionWebSocketCloseCodeAbnormalClosure, NSURLSessionWebSocketCloseCodeGoingAway, + NSURLSessionWebSocketCloseCodeInternalServerError, NSURLSessionWebSocketCloseCodeInvalid, + NSURLSessionWebSocketCloseCodeInvalidFramePayloadData, + NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing, + NSURLSessionWebSocketCloseCodeMessageTooBig, NSURLSessionWebSocketCloseCodeNoStatusReceived, + NSURLSessionWebSocketCloseCodeNormalClosure, NSURLSessionWebSocketCloseCodePolicyViolation, + NSURLSessionWebSocketCloseCodeProtocolError, NSURLSessionWebSocketCloseCodeTLSHandshakeFailure, + NSURLSessionWebSocketCloseCodeUnsupportedData, NSURLSessionWebSocketDelegate, + NSURLSessionWebSocketMessage, NSURLSessionWebSocketMessageType, + NSURLSessionWebSocketMessageTypeData, NSURLSessionWebSocketMessageTypeString, + NSURLSessionWebSocketTask, +}; +pub use self::generated::NSUbiquitousKeyValueStore::{ + NSUbiquitousKeyValueStore, NSUbiquitousKeyValueStoreAccountChange, + NSUbiquitousKeyValueStoreChangeReasonKey, NSUbiquitousKeyValueStoreChangedKeysKey, + NSUbiquitousKeyValueStoreDidChangeExternallyNotification, + NSUbiquitousKeyValueStoreInitialSyncChange, NSUbiquitousKeyValueStoreQuotaViolationChange, + NSUbiquitousKeyValueStoreServerChange, +}; +pub use self::generated::NSUndoManager::{ + NSUndoCloseGroupingRunLoopOrdering, NSUndoManager, NSUndoManagerCheckpointNotification, + NSUndoManagerDidCloseUndoGroupNotification, NSUndoManagerDidOpenUndoGroupNotification, + NSUndoManagerDidRedoChangeNotification, NSUndoManagerDidUndoChangeNotification, + NSUndoManagerGroupIsDiscardableKey, NSUndoManagerWillCloseUndoGroupNotification, + NSUndoManagerWillRedoChangeNotification, NSUndoManagerWillUndoChangeNotification, +}; +pub use self::generated::NSUnit::{ + NSDimension, NSUnit, NSUnitAcceleration, NSUnitAngle, NSUnitArea, NSUnitConcentrationMass, + NSUnitConverter, NSUnitConverterLinear, NSUnitDispersion, NSUnitDuration, NSUnitElectricCharge, + NSUnitElectricCurrent, NSUnitElectricPotentialDifference, NSUnitElectricResistance, + NSUnitEnergy, NSUnitFrequency, NSUnitFuelEfficiency, NSUnitIlluminance, + NSUnitInformationStorage, NSUnitLength, NSUnitMass, NSUnitPower, NSUnitPressure, NSUnitSpeed, + NSUnitTemperature, NSUnitVolume, +}; +pub use self::generated::NSUserActivity::{ + NSUserActivity, NSUserActivityDelegate, NSUserActivityPersistentIdentifier, + NSUserActivityTypeBrowsingWeb, +}; +pub use self::generated::NSUserDefaults::{ + NSAMPMDesignation, NSArgumentDomain, NSCurrencySymbol, NSDateFormatString, NSDateTimeOrdering, + NSDecimalDigits, NSDecimalSeparator, NSEarlierTimeDesignations, NSGlobalDomain, + NSHourNameDesignations, NSInternationalCurrencyString, NSLaterTimeDesignations, + NSMonthNameArray, NSNegativeCurrencyFormatString, NSNextDayDesignations, + NSNextNextDayDesignations, NSPositiveCurrencyFormatString, NSPriorDayDesignations, + NSRegistrationDomain, NSShortDateFormatString, NSShortMonthNameArray, + NSShortTimeDateFormatString, NSShortWeekDayNameArray, NSThisDayDesignations, + NSThousandsSeparator, NSTimeDateFormatString, NSTimeFormatString, + NSUbiquitousUserDefaultsCompletedInitialSyncNotification, + NSUbiquitousUserDefaultsDidChangeAccountsNotification, + NSUbiquitousUserDefaultsNoCloudAccountNotification, NSUserDefaults, + NSUserDefaultsDidChangeNotification, NSUserDefaultsSizeLimitExceededNotification, + NSWeekDayNameArray, NSYearMonthWeekDesignations, +}; +pub use self::generated::NSUserNotification::{ + NSUserNotification, NSUserNotificationAction, NSUserNotificationActivationType, + NSUserNotificationActivationTypeActionButtonClicked, + NSUserNotificationActivationTypeAdditionalActionClicked, + NSUserNotificationActivationTypeContentsClicked, NSUserNotificationActivationTypeNone, + NSUserNotificationActivationTypeReplied, NSUserNotificationCenter, + NSUserNotificationCenterDelegate, NSUserNotificationDefaultSoundName, +}; +pub use self::generated::NSUserScriptTask::{ + NSUserAppleScriptTask, NSUserAutomatorTask, NSUserScriptTask, NSUserUnixTask, +}; +pub use self::generated::NSValue::{NSNumber, NSValue}; +pub use self::generated::NSValueTransformer::{ + NSIsNilTransformerName, NSIsNotNilTransformerName, NSKeyedUnarchiveFromDataTransformerName, + NSNegateBooleanTransformerName, NSSecureUnarchiveFromDataTransformer, + NSSecureUnarchiveFromDataTransformerName, NSUnarchiveFromDataTransformerName, + NSValueTransformer, NSValueTransformerName, +}; +pub use self::generated::NSXMLDTDNode::{ + NSXMLAttributeCDATAKind, NSXMLAttributeEntitiesKind, NSXMLAttributeEntityKind, + NSXMLAttributeEnumerationKind, NSXMLAttributeIDKind, NSXMLAttributeIDRefKind, + NSXMLAttributeIDRefsKind, NSXMLAttributeNMTokenKind, NSXMLAttributeNMTokensKind, + NSXMLAttributeNotationKind, NSXMLDTDNode, NSXMLDTDNodeKind, NSXMLElementDeclarationAnyKind, + NSXMLElementDeclarationElementKind, NSXMLElementDeclarationEmptyKind, + NSXMLElementDeclarationMixedKind, NSXMLElementDeclarationUndefinedKind, NSXMLEntityGeneralKind, + NSXMLEntityParameterKind, NSXMLEntityParsedKind, NSXMLEntityPredefined, + NSXMLEntityUnparsedKind, +}; +pub use self::generated::NSXMLDocument::{ + NSXMLDocument, NSXMLDocumentContentKind, NSXMLDocumentHTMLKind, NSXMLDocumentTextKind, + NSXMLDocumentXHTMLKind, NSXMLDocumentXMLKind, +}; +pub use self::generated::NSXMLElement::NSXMLElement; +pub use self::generated::NSXMLNode::{ + NSXMLAttributeDeclarationKind, NSXMLAttributeKind, NSXMLCommentKind, NSXMLDTDKind, + NSXMLDocumentKind, NSXMLElementDeclarationKind, NSXMLElementKind, NSXMLEntityDeclarationKind, + NSXMLInvalidKind, NSXMLNamespaceKind, NSXMLNode, NSXMLNodeKind, NSXMLNotationDeclarationKind, + NSXMLProcessingInstructionKind, NSXMLTextKind, +}; +pub use self::generated::NSXMLNodeOptions::{ + NSXMLDocumentIncludeContentTypeDeclaration, NSXMLDocumentTidyHTML, NSXMLDocumentTidyXML, + NSXMLDocumentValidate, NSXMLDocumentXInclude, NSXMLNodeCompactEmptyElement, + NSXMLNodeExpandEmptyElement, NSXMLNodeIsCDATA, NSXMLNodeLoadExternalEntitiesAlways, + NSXMLNodeLoadExternalEntitiesNever, NSXMLNodeLoadExternalEntitiesSameOriginOnly, + NSXMLNodeNeverEscapeContents, NSXMLNodeOptions, NSXMLNodeOptionsNone, NSXMLNodePreserveAll, + NSXMLNodePreserveAttributeOrder, NSXMLNodePreserveCDATA, NSXMLNodePreserveCharacterReferences, + NSXMLNodePreserveDTD, NSXMLNodePreserveEmptyElements, NSXMLNodePreserveEntities, + NSXMLNodePreserveNamespaceOrder, NSXMLNodePreservePrefixes, NSXMLNodePreserveQuotes, + NSXMLNodePreserveWhitespace, NSXMLNodePrettyPrint, NSXMLNodePromoteSignificantWhitespace, + NSXMLNodeUseDoubleQuotes, NSXMLNodeUseSingleQuotes, +}; +pub use self::generated::NSXMLParser::{ + NSXMLParser, NSXMLParserAttributeHasNoValueError, NSXMLParserAttributeListNotFinishedError, + NSXMLParserAttributeListNotStartedError, NSXMLParserAttributeNotFinishedError, + NSXMLParserAttributeNotStartedError, NSXMLParserAttributeRedefinedError, + NSXMLParserCDATANotFinishedError, NSXMLParserCharacterRefAtEOFError, + NSXMLParserCharacterRefInDTDError, NSXMLParserCharacterRefInEpilogError, + NSXMLParserCharacterRefInPrologError, NSXMLParserCommentContainsDoubleHyphenError, + NSXMLParserCommentNotFinishedError, NSXMLParserConditionalSectionNotFinishedError, + NSXMLParserConditionalSectionNotStartedError, NSXMLParserDOCTYPEDeclNotFinishedError, + NSXMLParserDelegate, NSXMLParserDelegateAbortedParseError, NSXMLParserDocumentStartError, + NSXMLParserElementContentDeclNotFinishedError, NSXMLParserElementContentDeclNotStartedError, + NSXMLParserEmptyDocumentError, NSXMLParserEncodingNotSupportedError, + NSXMLParserEntityBoundaryError, NSXMLParserEntityIsExternalError, + NSXMLParserEntityIsParameterError, NSXMLParserEntityNotFinishedError, + NSXMLParserEntityNotStartedError, NSXMLParserEntityRefAtEOFError, + NSXMLParserEntityRefInDTDError, NSXMLParserEntityRefInEpilogError, + NSXMLParserEntityRefInPrologError, NSXMLParserEntityRefLoopError, + NSXMLParserEntityReferenceMissingSemiError, NSXMLParserEntityReferenceWithoutNameError, + NSXMLParserEntityValueRequiredError, NSXMLParserEqualExpectedError, NSXMLParserError, + NSXMLParserErrorDomain, NSXMLParserExternalEntityResolvingPolicy, + NSXMLParserExternalStandaloneEntityError, NSXMLParserExternalSubsetNotFinishedError, + NSXMLParserExtraContentError, NSXMLParserGTRequiredError, NSXMLParserInternalError, + NSXMLParserInvalidCharacterError, NSXMLParserInvalidCharacterInEntityError, + NSXMLParserInvalidCharacterRefError, NSXMLParserInvalidConditionalSectionError, + NSXMLParserInvalidDecimalCharacterRefError, NSXMLParserInvalidEncodingError, + NSXMLParserInvalidEncodingNameError, NSXMLParserInvalidHexCharacterRefError, + NSXMLParserInvalidURIError, NSXMLParserLTRequiredError, NSXMLParserLTSlashRequiredError, + NSXMLParserLessThanSymbolInAttributeError, NSXMLParserLiteralNotFinishedError, + NSXMLParserLiteralNotStartedError, NSXMLParserMisplacedCDATAEndStringError, + NSXMLParserMisplacedXMLDeclarationError, NSXMLParserMixedContentDeclNotFinishedError, + NSXMLParserMixedContentDeclNotStartedError, NSXMLParserNAMERequiredError, + NSXMLParserNMTOKENRequiredError, NSXMLParserNamespaceDeclarationError, NSXMLParserNoDTDError, + NSXMLParserNotWellBalancedError, NSXMLParserNotationNotFinishedError, + NSXMLParserNotationNotStartedError, NSXMLParserOutOfMemoryError, + NSXMLParserPCDATARequiredError, NSXMLParserParsedEntityRefAtEOFError, + NSXMLParserParsedEntityRefInEpilogError, NSXMLParserParsedEntityRefInInternalError, + NSXMLParserParsedEntityRefInInternalSubsetError, NSXMLParserParsedEntityRefInPrologError, + NSXMLParserParsedEntityRefMissingSemiError, NSXMLParserParsedEntityRefNoNameError, + NSXMLParserPrematureDocumentEndError, NSXMLParserProcessingInstructionNotFinishedError, + NSXMLParserProcessingInstructionNotStartedError, NSXMLParserPublicIdentifierRequiredError, + NSXMLParserResolveExternalEntitiesAlways, NSXMLParserResolveExternalEntitiesNever, + NSXMLParserResolveExternalEntitiesNoNetwork, NSXMLParserResolveExternalEntitiesSameOriginOnly, + NSXMLParserSeparatorRequiredError, NSXMLParserSpaceRequiredError, + NSXMLParserStandaloneValueError, NSXMLParserStringNotClosedError, + NSXMLParserStringNotStartedError, NSXMLParserTagNameMismatchError, NSXMLParserURIFragmentError, + NSXMLParserURIRequiredError, NSXMLParserUndeclaredEntityError, NSXMLParserUnfinishedTagError, + NSXMLParserUnknownEncodingError, NSXMLParserUnparsedEntityError, + NSXMLParserXMLDeclNotFinishedError, NSXMLParserXMLDeclNotStartedError, +}; +pub use self::generated::NSXPCConnection::{ + NSXPCCoder, NSXPCConnection, NSXPCConnectionOptions, NSXPCConnectionPrivileged, NSXPCInterface, + NSXPCListener, NSXPCListenerDelegate, NSXPCListenerEndpoint, NSXPCProxyCreating, +}; +pub use self::generated::NSZone::{NSCollectorDisabledOption, NSScannedOption}; +pub use self::generated::NSURL::{ + NSFileSecurity, NSThumbnail1024x1024SizeKey, NSURLAddedToDirectoryDateKey, + NSURLApplicationIsScriptableKey, NSURLAttributeModificationDateKey, + NSURLBookmarkCreationMinimalBookmark, NSURLBookmarkCreationOptions, + NSURLBookmarkCreationPreferFileIDResolution, + NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess, + NSURLBookmarkCreationSuitableForBookmarkFile, NSURLBookmarkCreationWithSecurityScope, + NSURLBookmarkCreationWithoutImplicitSecurityScope, NSURLBookmarkFileCreationOptions, + NSURLBookmarkResolutionOptions, NSURLBookmarkResolutionWithSecurityScope, + NSURLBookmarkResolutionWithoutImplicitStartAccessing, NSURLBookmarkResolutionWithoutMounting, + NSURLBookmarkResolutionWithoutUI, NSURLCanonicalPathKey, NSURLComponents, + NSURLContentAccessDateKey, NSURLContentModificationDateKey, NSURLContentTypeKey, + NSURLCreationDateKey, NSURLCustomIconKey, NSURLDocumentIdentifierKey, NSURLEffectiveIconKey, + NSURLFileAllocatedSizeKey, NSURLFileContentIdentifierKey, NSURLFileProtectionComplete, + NSURLFileProtectionCompleteUnlessOpen, NSURLFileProtectionCompleteUntilFirstUserAuthentication, + NSURLFileProtectionKey, NSURLFileProtectionNone, NSURLFileProtectionType, + NSURLFileResourceIdentifierKey, NSURLFileResourceType, NSURLFileResourceTypeBlockSpecial, + NSURLFileResourceTypeCharacterSpecial, NSURLFileResourceTypeDirectory, + NSURLFileResourceTypeKey, NSURLFileResourceTypeNamedPipe, NSURLFileResourceTypeRegular, + NSURLFileResourceTypeSocket, NSURLFileResourceTypeSymbolicLink, NSURLFileResourceTypeUnknown, + NSURLFileScheme, NSURLFileSecurityKey, NSURLFileSizeKey, NSURLGenerationIdentifierKey, + NSURLHasHiddenExtensionKey, NSURLIsAliasFileKey, NSURLIsApplicationKey, NSURLIsDirectoryKey, + NSURLIsExcludedFromBackupKey, NSURLIsExecutableKey, NSURLIsHiddenKey, NSURLIsMountTriggerKey, + NSURLIsPackageKey, NSURLIsPurgeableKey, NSURLIsReadableKey, NSURLIsRegularFileKey, + NSURLIsSparseKey, NSURLIsSymbolicLinkKey, NSURLIsSystemImmutableKey, NSURLIsUbiquitousItemKey, + NSURLIsUserImmutableKey, NSURLIsVolumeKey, NSURLIsWritableKey, NSURLKeysOfUnsetValuesKey, + NSURLLabelColorKey, NSURLLabelNumberKey, NSURLLinkCountKey, NSURLLocalizedLabelKey, + NSURLLocalizedNameKey, NSURLLocalizedTypeDescriptionKey, NSURLMayHaveExtendedAttributesKey, + NSURLMayShareFileContentKey, NSURLNameKey, NSURLParentDirectoryURLKey, NSURLPathKey, + NSURLPreferredIOBlockSizeKey, NSURLQuarantinePropertiesKey, NSURLQueryItem, NSURLResourceKey, + NSURLTagNamesKey, NSURLThumbnailDictionaryItem, NSURLThumbnailDictionaryKey, NSURLThumbnailKey, + NSURLTotalFileAllocatedSizeKey, NSURLTotalFileSizeKey, NSURLTypeIdentifierKey, + NSURLUbiquitousItemContainerDisplayNameKey, NSURLUbiquitousItemDownloadRequestedKey, + NSURLUbiquitousItemDownloadingErrorKey, NSURLUbiquitousItemDownloadingStatus, + NSURLUbiquitousItemDownloadingStatusCurrent, NSURLUbiquitousItemDownloadingStatusDownloaded, + NSURLUbiquitousItemDownloadingStatusKey, NSURLUbiquitousItemDownloadingStatusNotDownloaded, + NSURLUbiquitousItemHasUnresolvedConflictsKey, NSURLUbiquitousItemIsDownloadedKey, + NSURLUbiquitousItemIsDownloadingKey, NSURLUbiquitousItemIsExcludedFromSyncKey, + NSURLUbiquitousItemIsSharedKey, NSURLUbiquitousItemIsUploadedKey, + NSURLUbiquitousItemIsUploadingKey, NSURLUbiquitousItemPercentDownloadedKey, + NSURLUbiquitousItemPercentUploadedKey, NSURLUbiquitousItemUploadingErrorKey, + NSURLUbiquitousSharedItemCurrentUserPermissionsKey, + NSURLUbiquitousSharedItemCurrentUserRoleKey, + NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey, + NSURLUbiquitousSharedItemOwnerNameComponentsKey, NSURLUbiquitousSharedItemPermissions, + NSURLUbiquitousSharedItemPermissionsReadOnly, NSURLUbiquitousSharedItemPermissionsReadWrite, + NSURLUbiquitousSharedItemRole, NSURLUbiquitousSharedItemRoleOwner, + NSURLUbiquitousSharedItemRoleParticipant, NSURLVolumeAvailableCapacityForImportantUsageKey, + NSURLVolumeAvailableCapacityForOpportunisticUsageKey, NSURLVolumeAvailableCapacityKey, + NSURLVolumeCreationDateKey, NSURLVolumeIdentifierKey, NSURLVolumeIsAutomountedKey, + NSURLVolumeIsBrowsableKey, NSURLVolumeIsEjectableKey, NSURLVolumeIsEncryptedKey, + NSURLVolumeIsInternalKey, NSURLVolumeIsJournalingKey, NSURLVolumeIsLocalKey, + NSURLVolumeIsReadOnlyKey, NSURLVolumeIsRemovableKey, NSURLVolumeIsRootFileSystemKey, + NSURLVolumeLocalizedFormatDescriptionKey, NSURLVolumeLocalizedNameKey, + NSURLVolumeMaximumFileSizeKey, NSURLVolumeNameKey, NSURLVolumeResourceCountKey, + NSURLVolumeSupportsAccessPermissionsKey, NSURLVolumeSupportsAdvisoryFileLockingKey, + NSURLVolumeSupportsCasePreservedNamesKey, NSURLVolumeSupportsCaseSensitiveNamesKey, + NSURLVolumeSupportsCompressionKey, NSURLVolumeSupportsExclusiveRenamingKey, + NSURLVolumeSupportsExtendedSecurityKey, NSURLVolumeSupportsFileCloningKey, + NSURLVolumeSupportsFileProtectionKey, NSURLVolumeSupportsHardLinksKey, + NSURLVolumeSupportsImmutableFilesKey, NSURLVolumeSupportsJournalingKey, + NSURLVolumeSupportsPersistentIDsKey, NSURLVolumeSupportsRenamingKey, + NSURLVolumeSupportsRootDirectoryDatesKey, NSURLVolumeSupportsSparseFilesKey, + NSURLVolumeSupportsSwapRenamingKey, NSURLVolumeSupportsSymbolicLinksKey, + NSURLVolumeSupportsVolumeSizesKey, NSURLVolumeSupportsZeroRunsKey, NSURLVolumeTotalCapacityKey, + NSURLVolumeURLForRemountingKey, NSURLVolumeURLKey, NSURLVolumeUUIDStringKey, NSURL, +}; +pub use self::generated::NSUUID::NSUUID; +pub use self::generated::NSXMLDTD::NSXMLDTD; From 79f46922f19d0a137b95cc9643466af640defdb3 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 21:57:06 +0100 Subject: [PATCH 103/131] Remove NSProxy --- crates/icrate/src/Foundation/mod.rs | 44 +++++++++++++++- .../src/Foundation/translation-config.toml | 6 ++- .../icrate/src/generated/Foundation/NSDate.rs | 6 --- .../src/generated/Foundation/NSProxy.rs | 52 ------------------- crates/icrate/src/generated/Foundation/mod.rs | 1 - 5 files changed, 48 insertions(+), 61 deletions(-) diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index 097c9a7f8..43d6aa906 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -49,6 +49,49 @@ impl std::fmt::Debug for NSObject { } } +objc2::__inner_extern_class! { + @__inner + pub struct (NSProxy) {} + + unsafe impl () for NSProxy { + INHERITS = [objc2::runtime::Object]; + } +} +unsafe impl objc2::ClassType for NSProxy { + type Super = objc2::runtime::Object; + const NAME: &'static str = "NSProxy"; + + #[inline] + fn class() -> &'static objc2::runtime::Class { + objc2::class!(NSProxy) + } + + fn as_super(&self) -> &Self::Super { + &self.__inner + } + + fn as_super_mut(&mut self) -> &mut Self::Super { + &mut self.__inner + } +} +impl PartialEq for NSProxy { + fn eq(&self, _other: &Self) -> bool { + todo!() + } +} +impl Eq for NSProxy {} +impl std::hash::Hash for NSProxy { + #[inline] + fn hash(&self, _state: &mut H) { + todo!() + } +} +impl std::fmt::Debug for NSProxy { + fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + // TODO pub type NSRangePointer = *const NSRange; @@ -768,7 +811,6 @@ pub use self::generated::NSPropertyList::{ NSPropertyListXMLFormat_v1_0, }; pub use self::generated::NSProtocolChecker::NSProtocolChecker; -pub use self::generated::NSProxy::NSProxy; pub use self::generated::NSRegularExpression::{ NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, diff --git a/crates/icrate/src/Foundation/translation-config.toml b/crates/icrate/src/Foundation/translation-config.toml index dd4c6ed96..5e5db4917 100644 --- a/crates/icrate/src/Foundation/translation-config.toml +++ b/crates/icrate/src/Foundation/translation-config.toml @@ -77,5 +77,9 @@ skipped = true skipped = true [class.NSThread.properties.isMainThread] skipped = true -[class.NSDate.methods.timeIntervalSinceReferenceDate] +[class.NSDate.properties.timeIntervalSinceReferenceDate] +skipped = true + +# Root class +[class.NSProxy] skipped = true diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 80d1d3b57..ad12b2886 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -18,9 +18,6 @@ extern_class!( extern_methods!( unsafe impl NSDate { - #[method(timeIntervalSinceReferenceDate)] - pub unsafe fn timeIntervalSinceReferenceDate(&self) -> NSTimeInterval; - #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; @@ -74,9 +71,6 @@ extern_methods!( #[method_id(@__retain_semantics Other descriptionWithLocale:)] pub unsafe fn descriptionWithLocale(&self, locale: Option<&Object>) -> Id; - - #[method(timeIntervalSinceReferenceDate)] - pub unsafe fn timeIntervalSinceReferenceDate() -> NSTimeInterval; } ); diff --git a/crates/icrate/src/generated/Foundation/NSProxy.rs b/crates/icrate/src/generated/Foundation/NSProxy.rs index 46e0487e7..bbc1e79ac 100644 --- a/crates/icrate/src/generated/Foundation/NSProxy.rs +++ b/crates/icrate/src/generated/Foundation/NSProxy.rs @@ -2,55 +2,3 @@ //! DO NOT EDIT use crate::common::*; use crate::Foundation::*; - -extern_class!( - #[derive(Debug)] - pub struct NSProxy; - - unsafe impl ClassType for NSProxy { - type Super = Object; - } -); - -extern_methods!( - unsafe impl NSProxy { - #[method_id(@__retain_semantics Alloc alloc)] - pub unsafe fn alloc() -> Option>; - - #[method_id(@__retain_semantics Alloc allocWithZone:)] - pub unsafe fn allocWithZone(zone: *mut NSZone) -> Option>; - - #[method(class)] - pub unsafe fn class() -> &'static Class; - - #[method(forwardInvocation:)] - pub unsafe fn forwardInvocation(&self, invocation: &NSInvocation); - - #[method_id(@__retain_semantics Other methodSignatureForSelector:)] - pub unsafe fn methodSignatureForSelector( - &self, - sel: Sel, - ) -> Option>; - - #[method(dealloc)] - pub unsafe fn dealloc(&self); - - #[method(finalize)] - pub unsafe fn finalize(&self); - - #[method_id(@__retain_semantics Other description)] - pub unsafe fn description(&self) -> Id; - - #[method_id(@__retain_semantics Other debugDescription)] - pub unsafe fn debugDescription(&self) -> Id; - - #[method(respondsToSelector:)] - pub unsafe fn respondsToSelector(aSelector: Sel) -> bool; - - #[method(allowsWeakReference)] - pub unsafe fn allowsWeakReference(&self) -> bool; - - #[method(retainWeakReference)] - pub unsafe fn retainWeakReference(&self) -> bool; - } -); diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 104ebc429..7c13aaad5 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -904,7 +904,6 @@ mod __exported { NSPropertyListXMLFormat_v1_0, }; pub use super::NSProtocolChecker::NSProtocolChecker; - pub use super::NSProxy::NSProxy; pub use super::NSRegularExpression::{ NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, From e7d6ab7066e5a03679d8096d5a8046fc91a44a75 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 1 Nov 2022 21:55:13 +0100 Subject: [PATCH 104/131] Temporarily remove out parameter setup --- crates/header-translator/src/rust_type.rs | 53 +++++++------ .../generated/AppKit/NSAttributedString.rs | 74 ++++--------------- .../icrate/src/generated/AppKit/NSGradient.rs | 2 +- crates/icrate/src/generated/AppKit/NSNib.rs | 4 +- .../src/generated/AppKit/NSNibLoading.rs | 2 +- .../src/generated/AppKit/NSSpellChecker.rs | 4 +- .../icrate/src/generated/AppKit/NSTextView.rs | 4 +- .../src/generated/AppKit/NSWorkspace.rs | 12 +-- .../src/generated/Foundation/NSAppleScript.rs | 8 +- .../src/generated/Foundation/NSCalendar.rs | 6 +- .../Foundation/NSDateComponentsFormatter.rs | 4 +- .../generated/Foundation/NSDateFormatter.rs | 2 +- .../generated/Foundation/NSEnergyFormatter.rs | 4 +- .../src/generated/Foundation/NSFileManager.rs | 6 +- .../src/generated/Foundation/NSFormatter.rs | 12 +-- .../generated/Foundation/NSKeyValueCoding.rs | 4 +- .../generated/Foundation/NSLengthFormatter.rs | 4 +- .../Foundation/NSLinguisticTagger.rs | 10 +-- .../generated/Foundation/NSMassFormatter.rs | 4 +- .../generated/Foundation/NSNumberFormatter.rs | 2 +- .../generated/Foundation/NSPathUtilities.rs | 4 +- .../NSPersonNameComponentsFormatter.rs | 4 +- .../src/generated/Foundation/NSScanner.rs | 8 +- .../src/generated/Foundation/NSStream.rs | 12 +-- .../src/generated/Foundation/NSString.rs | 2 +- .../icrate/src/generated/Foundation/NSURL.rs | 4 +- .../generated/Foundation/NSURLConnection.rs | 2 +- 27 files changed, 105 insertions(+), 152 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 760a18ebe..ab8b33cbf 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -637,39 +637,36 @@ impl fmt::Display for RustType { is_const, pointee, } => match &**pointee { - Self::Id { - type_, - is_const: false, - lifetime: Lifetime::Autoreleasing, - nullability: inner_nullability, - } => { - let tokens = format!("Id<{type_}, Shared>"); - let tokens = if *inner_nullability == Nullability::NonNull { - tokens - } else { - format!("Option<{tokens}>") - }; - - let tokens = if *is_const { - format!("&{tokens}") - } else { - format!("&mut {tokens}") - }; - if *nullability == Nullability::NonNull { - write!(f, "{tokens}") - } else { - write!(f, "Option<{tokens}>") - } - } + // Self::Id { + // type_, + // is_const: false, + // lifetime: Lifetime::Autoreleasing, + // nullability: inner_nullability, + // } => { + // let tokens = format!("Id<{type_}, Shared>"); + // let tokens = if *inner_nullability == Nullability::NonNull { + // tokens + // } else { + // format!("Option<{tokens}>") + // }; + // + // let tokens = if *is_const { + // format!("&{tokens}") + // } else { + // format!("&mut {tokens}") + // }; + // if *nullability == Nullability::NonNull { + // write!(f, "{tokens}") + // } else { + // write!(f, "Option<{tokens}>") + // } + // } Self::Id { type_: tokens, is_const: false, - lifetime: Lifetime::Unspecified, + lifetime: _, nullability: inner_nullability, } => { - if tokens.name != "NSError" { - println!("id*: {self:?}"); - } let tokens = if *inner_nullability == Nullability::NonNull { format!("NonNull<{tokens}>") } else { diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index a9edac874..6a424411f 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -439,11 +439,7 @@ extern_methods!( this: Option>, url: &NSURL, options: &NSDictionary, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Result, Id>; #[method_id(@__retain_semantics Init initWithData:options:documentAttributes:error:)] @@ -451,11 +447,7 @@ extern_methods!( this: Option>, data: &NSData, options: &NSDictionary, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Result, Id>; #[method_id(@__retain_semantics Other dataFromRange:documentAttributes:error:)] @@ -476,33 +468,21 @@ extern_methods!( pub unsafe fn initWithRTF_documentAttributes( this: Option>, data: &NSData, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Option>; #[method_id(@__retain_semantics Init initWithRTFD:documentAttributes:)] pub unsafe fn initWithRTFD_documentAttributes( this: Option>, data: &NSData, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Option>; #[method_id(@__retain_semantics Init initWithHTML:documentAttributes:)] pub unsafe fn initWithHTML_documentAttributes( this: Option>, data: &NSData, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Option>; #[method_id(@__retain_semantics Init initWithHTML:baseURL:documentAttributes:)] @@ -510,22 +490,14 @@ extern_methods!( this: Option>, data: &NSData, base: &NSURL, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Option>; #[method_id(@__retain_semantics Init initWithDocFormat:documentAttributes:)] pub unsafe fn initWithDocFormat_documentAttributes( this: Option>, data: &NSData, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Option>; #[method_id(@__retain_semantics Init initWithHTML:options:documentAttributes:)] @@ -533,22 +505,14 @@ extern_methods!( this: Option>, data: &NSData, options: &NSDictionary, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Option>; #[method_id(@__retain_semantics Init initWithRTFDFileWrapper:documentAttributes:)] pub unsafe fn initWithRTFDFileWrapper_documentAttributes( this: Option>, wrapper: &NSFileWrapper, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Option>; #[method_id(@__retain_semantics Other RTFFromRange:documentAttributes:)] @@ -589,11 +553,7 @@ extern_methods!( &self, url: &NSURL, opts: &NSDictionary, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Result<(), Id>; #[method(readFromData:options:documentAttributes:error:)] @@ -601,11 +561,7 @@ extern_methods!( &self, data: &NSData, opts: &NSDictionary, - dict: Option< - &mut Option< - Id, Shared>, - >, - >, + dict: *mut *mut NSDictionary, ) -> Result<(), Id>; } ); @@ -773,14 +729,14 @@ extern_methods!( pub unsafe fn initWithURL_documentAttributes( this: Option>, url: &NSURL, - dict: Option<&mut Option>>, + dict: *mut *mut NSDictionary, ) -> Option>; #[method_id(@__retain_semantics Init initWithPath:documentAttributes:)] pub unsafe fn initWithPath_documentAttributes( this: Option>, path: &NSString, - dict: Option<&mut Option>>, + dict: *mut *mut NSDictionary, ) -> Option>; #[method_id(@__retain_semantics Other URLAtIndex:effectiveRange:)] @@ -800,7 +756,7 @@ extern_methods!( &self, url: &NSURL, options: &NSDictionary, - dict: Option<&mut Option>>, + dict: *mut *mut NSDictionary, ) -> bool; #[method(readFromData:options:documentAttributes:)] @@ -808,7 +764,7 @@ extern_methods!( &self, data: &NSData, options: &NSDictionary, - dict: Option<&mut Option>>, + dict: *mut *mut NSDictionary, ) -> bool; } ); diff --git a/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index 0469fec76..336426d88 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/NSGradient.rs @@ -93,7 +93,7 @@ extern_methods!( #[method(getColor:location:atIndex:)] pub unsafe fn getColor_location_atIndex( &self, - color: Option<&mut Id>, + color: *mut NonNull, location: *mut CGFloat, index: NSInteger, ); diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index c483f90ad..b658db564 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -35,7 +35,7 @@ extern_methods!( pub unsafe fn instantiateWithOwner_topLevelObjects( &self, owner: Option<&Object>, - topLevelObjects: Option<&mut Option>>, + topLevelObjects: *mut *mut NSArray, ) -> bool; } ); @@ -59,7 +59,7 @@ extern_methods!( pub unsafe fn instantiateNibWithOwner_topLevelObjects( &self, owner: Option<&Object>, - topLevelObjects: Option<&mut Option>>, + topLevelObjects: *mut *mut NSArray, ) -> bool; } ); diff --git a/crates/icrate/src/generated/AppKit/NSNibLoading.rs b/crates/icrate/src/generated/AppKit/NSNibLoading.rs index dab1fa31d..29b8cf2e6 100644 --- a/crates/icrate/src/generated/AppKit/NSNibLoading.rs +++ b/crates/icrate/src/generated/AppKit/NSNibLoading.rs @@ -12,7 +12,7 @@ extern_methods!( &self, nibName: &NSNibName, owner: Option<&Object>, - topLevelObjects: Option<&mut Option>>, + topLevelObjects: *mut *mut NSArray, ) -> bool; } ); diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index 496318a09..ca5c74164 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -112,7 +112,7 @@ extern_methods!( language: Option<&NSString>, wrapFlag: bool, tag: NSInteger, - details: Option<&mut Option>, Shared>>>, + details: *mut *mut NSArray>, ) -> NSRange; #[method_id(@__retain_semantics Other checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:)] @@ -123,7 +123,7 @@ extern_methods!( checkingTypes: NSTextCheckingTypes, options: Option<&NSDictionary>, tag: NSInteger, - orthography: Option<&mut Option>>, + orthography: *mut *mut NSOrthography, wordCount: *mut NSInteger, ) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index 84cb2ed53..6ca775056 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -717,8 +717,8 @@ extern_methods!( &self, pasteString: &NSString, charRangeToReplace: NSRange, - beforeString: Option<&mut Option>>, - afterString: Option<&mut Option>>, + beforeString: *mut *mut NSString, + afterString: *mut *mut NSString, ); #[method_id(@__retain_semantics Other smartInsertBeforeStringForString:replacingRange:)] diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index 63b54f58a..173754b75 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -119,8 +119,8 @@ extern_methods!( removableFlag: *mut bool, writableFlag: *mut bool, unmountableFlag: *mut bool, - description: Option<&mut Option>>, - fileSystemType: Option<&mut Option>>, + description: *mut *mut NSString, + fileSystemType: *mut *mut NSString, ) -> bool; #[method(unmountAndEjectDeviceAtPath:)] @@ -598,7 +598,7 @@ extern_methods!( bundleIdentifier: &NSString, options: NSWorkspaceLaunchOptions, descriptor: Option<&NSAppleEventDescriptor>, - identifier: Option<&mut Option>>, + identifier: *mut *mut NSNumber, ) -> bool; #[method(openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:)] @@ -608,7 +608,7 @@ extern_methods!( bundleIdentifier: Option<&NSString>, options: NSWorkspaceLaunchOptions, descriptor: Option<&NSAppleEventDescriptor>, - identifiers: Option<&mut Option, Shared>>>, + identifiers: *mut *mut NSArray, ) -> bool; #[method(openTempFile:)] @@ -678,8 +678,8 @@ extern_methods!( pub unsafe fn getInfoForFile_application_type( &self, fullPath: &NSString, - appName: Option<&mut Option>>, - type_: Option<&mut Option>>, + appName: *mut *mut NSString, + type_: *mut *mut NSString, ) -> bool; #[method_id(@__retain_semantics Other iconForFileType:)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index a6104cd2c..aedf2834b 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -38,7 +38,7 @@ extern_methods!( pub unsafe fn initWithContentsOfURL_error( this: Option>, url: &NSURL, - errorInfo: Option<&mut Option, Shared>>>, + errorInfo: *mut *mut NSDictionary, ) -> Option>; #[method_id(@__retain_semantics Init initWithSource:)] @@ -56,20 +56,20 @@ extern_methods!( #[method(compileAndReturnError:)] pub unsafe fn compileAndReturnError( &self, - errorInfo: Option<&mut Option, Shared>>>, + errorInfo: *mut *mut NSDictionary, ) -> bool; #[method_id(@__retain_semantics Other executeAndReturnError:)] pub unsafe fn executeAndReturnError( &self, - errorInfo: Option<&mut Option, Shared>>>, + errorInfo: *mut *mut NSDictionary, ) -> Id; #[method_id(@__retain_semantics Other executeAppleEvent:error:)] pub unsafe fn executeAppleEvent_error( &self, event: &NSAppleEventDescriptor, - errorInfo: Option<&mut Option, Shared>>>, + errorInfo: *mut *mut NSDictionary, ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index d455a4b3c..29231e533 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -259,7 +259,7 @@ extern_methods!( pub unsafe fn rangeOfUnit_startDate_interval_forDate( &self, unit: NSCalendarUnit, - datep: Option<&mut Option>>, + datep: *mut *mut NSDate, tip: *mut NSTimeInterval, date: &NSDate, ) -> bool; @@ -397,7 +397,7 @@ extern_methods!( #[method(rangeOfWeekendStartDate:interval:containingDate:)] pub unsafe fn rangeOfWeekendStartDate_interval_containingDate( &self, - datep: Option<&mut Option>>, + datep: *mut *mut NSDate, tip: *mut NSTimeInterval, date: &NSDate, ) -> bool; @@ -405,7 +405,7 @@ extern_methods!( #[method(nextWeekendStartDate:interval:options:afterDate:)] pub unsafe fn nextWeekendStartDate_interval_options_afterDate( &self, - datep: Option<&mut Option>>, + datep: *mut *mut NSDate, tip: *mut NSTimeInterval, options: NSCalendarOptions, date: &NSDate, diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 9cbfa858e..0bc67c612 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -146,9 +146,9 @@ extern_methods!( #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: Option<&mut Option>>, + obj: *mut *mut Object, string: &NSString, - error: Option<&mut Option>>, + error: *mut *mut NSString, ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index f0654993c..aab7a214d 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -35,7 +35,7 @@ extern_methods!( #[method(getObjectValue:forString:range:error:)] pub unsafe fn getObjectValue_forString_range_error( &self, - obj: Option<&mut Option>>, + obj: *mut *mut Object, string: &NSString, rangep: *mut NSRange, ) -> Result<(), Id>; diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 0c8ad2c36..373519117 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -65,9 +65,9 @@ extern_methods!( #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: Option<&mut Option>>, + obj: *mut *mut Object, string: &NSString, - error: Option<&mut Option>>, + error: *mut *mut NSString, ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 30ed09caa..1d7173846 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -245,7 +245,7 @@ extern_methods!( pub unsafe fn trashItemAtURL_resultingItemURL_error( &self, url: &NSURL, - outResultingURL: Option<&mut Option>>, + outResultingURL: *mut *mut NSURL, ) -> Result<(), Id>; #[method_id(@__retain_semantics Other fileAttributesAtPath:traverseLink:)] @@ -418,7 +418,7 @@ extern_methods!( newItemURL: &NSURL, backupItemName: Option<&NSString>, options: NSFileManagerItemReplacementOptions, - resultingURL: Option<&mut Option>>, + resultingURL: *mut *mut NSURL, ) -> Result<(), Id>; #[method(setUbiquitous:itemAtURL:destinationURL:error:)] @@ -454,7 +454,7 @@ extern_methods!( pub unsafe fn URLForPublishingUbiquitousItemAtURL_expirationDate_error( &self, url: &NSURL, - outDate: Option<&mut Option>>, + outDate: *mut *mut NSDate, ) -> Result, Id>; #[method_id(@__retain_semantics Other ubiquityIdentityToken)] diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index 57dbf5030..12c399f31 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -49,27 +49,27 @@ extern_methods!( #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: Option<&mut Option>>, + obj: *mut *mut Object, string: &NSString, - error: Option<&mut Option>>, + error: *mut *mut NSString, ) -> bool; #[method(isPartialStringValid:newEditingString:errorDescription:)] pub unsafe fn isPartialStringValid_newEditingString_errorDescription( &self, partialString: &NSString, - newString: Option<&mut Option>>, - error: Option<&mut Option>>, + newString: *mut *mut NSString, + error: *mut *mut NSString, ) -> bool; #[method(isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription:)] pub unsafe fn isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription( &self, - partialStringPtr: &mut Id, + partialStringPtr: NonNull>, proposedSelRangePtr: NSRangePointer, origString: &NSString, origSelRange: NSRange, - error: Option<&mut Option>>, + error: *mut *mut NSString, ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index 20d2d372d..5a4f0351d 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -68,7 +68,7 @@ extern_methods!( #[method(validateValue:forKey:error:)] pub unsafe fn validateValue_forKey_error( &self, - ioValue: &mut Option>, + ioValue: NonNull<*mut Object>, inKey: &NSString, ) -> Result<(), Id>; @@ -93,7 +93,7 @@ extern_methods!( #[method(validateValue:forKeyPath:error:)] pub unsafe fn validateValue_forKeyPath_error( &self, - ioValue: &mut Option>, + ioValue: NonNull<*mut Object>, inKeyPath: &NSString, ) -> Result<(), Id>; diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index 181b7d166..cfd6f04ae 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -69,9 +69,9 @@ extern_methods!( #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: Option<&mut Option>>, + obj: *mut *mut Object, string: &NSString, - error: Option<&mut Option>>, + error: *mut *mut NSString, ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 4919be780..f6e348be9 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -267,7 +267,7 @@ extern_methods!( unit: NSLinguisticTaggerUnit, scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, - tokenRanges: Option<&mut Option, Shared>>>, + tokenRanges: *mut *mut NSArray, ) -> Id, Shared>; #[method(enumerateTagsInRange:scheme:options:usingBlock:)] @@ -294,7 +294,7 @@ extern_methods!( range: NSRange, tagScheme: &NSString, opts: NSLinguisticTaggerOptions, - tokenRanges: Option<&mut Option, Shared>>>, + tokenRanges: *mut *mut NSArray, ) -> Id, Shared>; #[method_id(@__retain_semantics Other dominantLanguage)] @@ -321,7 +321,7 @@ extern_methods!( scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, - tokenRanges: Option<&mut Option, Shared>>>, + tokenRanges: *mut *mut NSArray, ) -> Id, Shared>; #[method(enumerateTagsForString:range:unit:scheme:options:orthography:usingBlock:)] @@ -342,7 +342,7 @@ extern_methods!( tagScheme: &NSString, tokenRange: NSRangePointer, sentenceRange: NSRangePointer, - scores: Option<&mut Option, Shared>>>, + scores: *mut *mut NSArray, ) -> Option, Shared>>; } ); @@ -357,7 +357,7 @@ extern_methods!( scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, - tokenRanges: Option<&mut Option, Shared>>>, + tokenRanges: *mut *mut NSArray, ) -> Id, Shared>; #[method(enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:)] diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index 81e9df001..a080d192f 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -69,9 +69,9 @@ extern_methods!( #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: Option<&mut Option>>, + obj: *mut *mut Object, string: &NSString, - error: Option<&mut Option>>, + error: *mut *mut NSString, ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 01673d4f1..cf9d15d4c 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -67,7 +67,7 @@ extern_methods!( #[method(getObjectValue:forString:range:error:)] pub unsafe fn getObjectValue_forString_range_error( &self, - obj: Option<&mut Option>>, + obj: *mut *mut Object, string: &NSString, rangep: *mut NSRange, ) -> Result<(), Id>; diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index 12b5181dc..d2bd1c088 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -57,9 +57,9 @@ extern_methods!( #[method(completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:)] pub unsafe fn completePathIntoString_caseSensitive_matchesIntoArray_filterTypes( &self, - outputName: Option<&mut Option>>, + outputName: *mut *mut NSString, flag: bool, - outputArray: Option<&mut Option, Shared>>>, + outputArray: *mut *mut NSArray, filterTypes: Option<&NSArray>, ) -> NSUInteger; diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index d4af1f1d1..df6069f36 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -70,9 +70,9 @@ extern_methods!( #[method(getObjectValue:forString:errorDescription:)] pub unsafe fn getObjectValue_forString_errorDescription( &self, - obj: Option<&mut Option>>, + obj: *mut *mut Object, string: &NSString, - error: Option<&mut Option>>, + error: *mut *mut NSString, ) -> bool; } ); diff --git a/crates/icrate/src/generated/Foundation/NSScanner.rs b/crates/icrate/src/generated/Foundation/NSScanner.rs index d9cd2c051..5e0618d07 100644 --- a/crates/icrate/src/generated/Foundation/NSScanner.rs +++ b/crates/icrate/src/generated/Foundation/NSScanner.rs @@ -89,28 +89,28 @@ extern_methods!( pub unsafe fn scanString_intoString( &self, string: &NSString, - result: Option<&mut Option>>, + result: *mut *mut NSString, ) -> bool; #[method(scanCharactersFromSet:intoString:)] pub unsafe fn scanCharactersFromSet_intoString( &self, set: &NSCharacterSet, - result: Option<&mut Option>>, + result: *mut *mut NSString, ) -> bool; #[method(scanUpToString:intoString:)] pub unsafe fn scanUpToString_intoString( &self, string: &NSString, - result: Option<&mut Option>>, + result: *mut *mut NSString, ) -> bool; #[method(scanUpToCharactersFromSet:intoString:)] pub unsafe fn scanUpToCharactersFromSet_intoString( &self, set: &NSCharacterSet, - result: Option<&mut Option>>, + result: *mut *mut NSString, ) -> bool; #[method(isAtEnd)] diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index e2a3d28b9..247c12ac5 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -154,16 +154,16 @@ extern_methods!( pub unsafe fn getStreamsToHostWithName_port_inputStream_outputStream( hostname: &NSString, port: NSInteger, - inputStream: Option<&mut Option>>, - outputStream: Option<&mut Option>>, + inputStream: *mut *mut NSInputStream, + outputStream: *mut *mut NSOutputStream, ); #[method(getStreamsToHost:port:inputStream:outputStream:)] pub unsafe fn getStreamsToHost_port_inputStream_outputStream( host: &NSHost, port: NSInteger, - inputStream: Option<&mut Option>>, - outputStream: Option<&mut Option>>, + inputStream: *mut *mut NSInputStream, + outputStream: *mut *mut NSOutputStream, ); } ); @@ -174,8 +174,8 @@ extern_methods!( #[method(getBoundStreamsWithBufferSize:inputStream:outputStream:)] pub unsafe fn getBoundStreamsWithBufferSize_inputStream_outputStream( bufferSize: NSUInteger, - inputStream: Option<&mut Option>>, - outputStream: Option<&mut Option>>, + inputStream: *mut *mut NSInputStream, + outputStream: *mut *mut NSOutputStream, ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index c63a8f9ec..963577d29 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -751,7 +751,7 @@ extern_methods!( pub unsafe fn stringEncodingForData_encodingOptions_convertedString_usedLossyConversion( data: &NSData, opts: Option<&NSDictionary>, - string: Option<&mut Option>>, + string: *mut *mut NSString, usedLossyConversion: *mut bool, ) -> NSStringEncoding; } diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index 3e0956712..b97db70bd 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -822,7 +822,7 @@ extern_methods!( #[method(getResourceValue:forKey:error:)] pub unsafe fn getResourceValue_forKey_error( &self, - value: &mut Option>, + value: NonNull<*mut Object>, key: &NSURLResourceKey, ) -> Result<(), Id>; @@ -921,7 +921,7 @@ extern_methods!( #[method(getPromisedItemResourceValue:forKey:error:)] pub unsafe fn getPromisedItemResourceValue_forKey_error( &self, - value: &mut Option>, + value: NonNull<*mut Object>, key: &NSURLResourceKey, ) -> Result<(), Id>; diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 6f4d7b268..26bd38816 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -77,7 +77,7 @@ extern_methods!( #[method_id(@__retain_semantics Other sendSynchronousRequest:returningResponse:error:)] pub unsafe fn sendSynchronousRequest_returningResponse_error( request: &NSURLRequest, - response: Option<&mut Option>>, + response: *mut *mut NSURLResponse, ) -> Result, Id>; } ); From da25fc0a5a051c7ee806245e264db5c1ad2baf45 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 01:40:43 +0100 Subject: [PATCH 105/131] Add struct support --- crates/header-translator/src/config.rs | 10 ++ crates/header-translator/src/lib.rs | 3 + crates/header-translator/src/rust_type.rs | 12 ++ crates/header-translator/src/stmt.rs | 119 ++++++++++++++++-- crates/icrate/src/Foundation/mod.rs | 54 +++++--- .../src/Foundation/translation-config.toml | 4 + .../NSCollectionViewCompositionalLayout.rs | 9 ++ crates/icrate/src/generated/AppKit/mod.rs | 12 +- .../generated/Foundation/NSAffineTransform.rs | 11 ++ .../src/generated/Foundation/NSByteOrder.rs | 12 ++ .../src/generated/Foundation/NSEnumerator.rs | 9 ++ .../src/generated/Foundation/NSGeometry.rs | 9 ++ .../src/generated/Foundation/NSHashTable.rs | 18 +++ .../src/generated/Foundation/NSMapTable.rs | 27 ++++ .../src/generated/Foundation/NSProcessInfo.rs | 8 ++ .../src/generated/Foundation/NSRange.rs | 7 ++ crates/icrate/src/generated/Foundation/mod.rs | 47 +++---- crates/icrate/src/lib.rs | 27 ++++ 18 files changed, 342 insertions(+), 56 deletions(-) diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index 918617b7d..be383c19e 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -14,6 +14,9 @@ pub struct Config { #[serde(rename = "protocol")] #[serde(default)] pub protocol_data: HashMap, + #[serde(rename = "struct")] + #[serde(default)] + pub struct_data: HashMap, #[serde(default)] pub imports: Vec, } @@ -29,6 +32,13 @@ pub struct ClassData { pub properties: HashMap, } +#[derive(Deserialize, Debug, Default, Clone, PartialEq, Eq)] +#[serde(deny_unknown_fields)] +pub struct StructData { + #[serde(default)] + pub skipped: bool, +} + #[derive(Deserialize, Debug, Clone, Copy, PartialEq, Eq)] #[serde(deny_unknown_fields)] pub struct MethodData { diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index d5b9a6353..3218300f0 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -43,6 +43,9 @@ impl RustFile { Stmt::ProtocolDecl { name, .. } => { self.declared_types.insert(name.clone()); } + Stmt::StructDecl { name, .. } => { + self.declared_types.insert(name.clone()); + } Stmt::EnumDecl { name, variants, .. } => { if let Some(name) = name { self.declared_types.insert(name.clone()); diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index ab8b33cbf..8763ce553 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -558,6 +558,18 @@ impl RustType { this } + pub fn parse_struct_field(ty: Type<'_>) -> Self { + let this = Self::parse(ty, false, Nullability::Unspecified); + + this.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in struct field {this:?}"); + } + }); + + this + } + pub fn parse_enum(ty: Type<'_>) -> Self { let this = Self::parse(ty, false, Nullability::Unspecified); diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 4242a3472..0fcc3436b 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -185,6 +185,22 @@ pub enum Stmt { protocols: Vec, methods: Vec, }, + /// struct name { + /// fields* + /// }; + /// + /// typedef struct { + /// fields* + /// } name; + /// + /// typedef struct _name { + /// fields* + /// } name; + StructDecl { + name: String, + boxable: bool, + fields: Vec<(String, RustType)>, + }, /// typedef NS_OPTIONS(type, name) { /// variants* /// }; @@ -227,8 +243,43 @@ pub enum Stmt { }, /// typedef Type TypedefName; AliasDecl { name: String, type_: RustType }, - // /// typedef struct Name { fields } TypedefName; - // X, +} + +fn parse_struct(entity: &Entity<'_>, name: String) -> Stmt { + let mut boxable = false; + let mut fields = Vec::new(); + + entity.visit_children(|entity, _parent| { + match entity.get_kind() { + EntityKind::UnexposedAttr => { + if let Some(macro_) = UnexposedMacro::parse(&entity) { + panic!("unexpected attribute: {macro_:?}"); + } + } + EntityKind::FieldDecl => { + let name = entity.get_name().expect("struct field name"); + let ty = entity.get_type().expect("struct field type"); + let ty = RustType::parse_struct_field(ty); + + if entity.is_bit_field() { + println!("[UNSOUND] struct bitfield {name}: {entity:?}"); + } + + fields.push((name, ty)) + } + EntityKind::ObjCBoxable => { + boxable = true; + } + _ => panic!("unknown struct field {entity:?}"), + } + EntityVisitResult::Continue + }); + + Stmt::StructDecl { + name, + boxable, + fields, + } } impl Stmt { @@ -338,6 +389,7 @@ impl Stmt { } EntityKind::TypedefDecl => { let name = entity.get_name().expect("typedef name"); + let mut struct_ = None; entity.visit_children(|entity, _parent| { match entity.get_kind() { @@ -348,7 +400,26 @@ impl Stmt { } } EntityKind::StructDecl => { - // TODO? + if config + .struct_data + .get(&name) + .map(|data| data.skipped) + .unwrap_or_default() + { + return EntityVisitResult::Continue; + } + + let struct_name = entity.get_name(); + if struct_name.is_none() + || struct_name + .map(|name| name.starts_with('_')) + .unwrap_or(false) + { + // If this struct doesn't have a name, or the + // name is private, let's parse it with the + // typedef name. + struct_ = Some(parse_struct(&entity, name.clone())) + } } EntityKind::ObjCClassRef | EntityKind::ObjCProtocolRef @@ -359,6 +430,10 @@ impl Stmt { EntityVisitResult::Continue }); + if let Some(struct_) = struct_ { + return Some(struct_); + } + let ty = entity .get_typedef_underlying_type() .expect("typedef underlying type"); @@ -444,14 +519,19 @@ impl Stmt { } } EntityKind::StructDecl => { - // println!( - // "struct: {:?}, {:?}, {:#?}, {:#?}", - // entity.get_display_name(), - // entity.get_name(), - // entity.has_attributes(), - // entity.get_children(), - // ); - // EntityKind::FieldDecl | EntityKind::IntegerLiteral | EntityKind::ObjCBoxable => {} + if let Some(name) = entity.get_name() { + if config + .struct_data + .get(&name) + .map(|data| data.skipped) + .unwrap_or_default() + { + return None; + } + if !name.starts_with('_') { + return Some(parse_struct(entity, name)); + } + } None } EntityKind::EnumDecl => { @@ -736,6 +816,23 @@ impl fmt::Display for Stmt { // } writeln!(f, "pub type {name} = NSObject;")?; } + Self::StructDecl { + name, + boxable: _, + fields, + } => { + writeln!(f, "struct_impl!(")?; + writeln!(f, " pub struct {name} {{")?; + for (name, ty) in fields { + write!(f, " ")?; + if !name.starts_with('_') { + write!(f, "pub ")?; + } + writeln!(f, "{name}: {ty},")?; + } + writeln!(f, " }}")?; + writeln!(f, ");")?; + } Self::EnumDecl { name, ty, diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index 43d6aa906..224d2859f 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -2,7 +2,7 @@ pub(crate) mod generated; pub use objc2::ffi::NSIntegerMax; -pub use objc2::foundation::{CGFloat, CGPoint, CGRect, CGSize, NSRange, NSTimeInterval, NSZone}; +pub use objc2::foundation::{CGFloat, CGPoint, CGRect, CGSize, NSTimeInterval, NSZone}; pub use objc2::ns_string; objc2::__inner_extern_class! { @@ -95,6 +95,18 @@ impl std::fmt::Debug for NSProxy { // TODO pub type NSRangePointer = *const NSRange; +struct_impl!( + pub struct NSDecimal { + // signed int _exponent:8; + // unsigned int _length:4; + // unsigned int _isNegative:1; + // unsigned int _isCompact:1; + // unsigned int _reserved:18; + _inner: i32, + _mantissa: [std::ffi::c_ushort; 8], + } +); + // Generated pub use self::generated::FoundationErrors::{ @@ -130,7 +142,7 @@ pub use self::generated::FoundationErrors::{ NSXPCConnectionErrorMaximum, NSXPCConnectionErrorMinimum, NSXPCConnectionInterrupted, NSXPCConnectionInvalid, NSXPCConnectionReplyInvalid, }; -pub use self::generated::NSAffineTransform::NSAffineTransform; +pub use self::generated::NSAffineTransform::{NSAffineTransform, NSAffineTransformStruct}; pub use self::generated::NSAppleEventDescriptor::{ NSAppleEventDescriptor, NSAppleEventSendAlwaysInteract, NSAppleEventSendCanInteract, NSAppleEventSendCanSwitchLayer, NSAppleEventSendDefaultOptions, NSAppleEventSendDontAnnotate, @@ -204,7 +216,9 @@ pub use self::generated::NSByteCountFormatter::{ NSByteCountFormatterUsePB, NSByteCountFormatterUseTB, NSByteCountFormatterUseYBOrHigher, NSByteCountFormatterUseZB, }; -pub use self::generated::NSByteOrder::{NS_BigEndian, NS_LittleEndian, NS_UnknownByteOrder}; +pub use self::generated::NSByteOrder::{ + NSSwappedDouble, NSSwappedFloat, NS_BigEndian, NS_LittleEndian, NS_UnknownByteOrder, +}; pub use self::generated::NSCache::{NSCache, NSCacheDelegate}; pub use self::generated::NSCalendar::{ NSCalendar, NSCalendarCalendarUnit, NSCalendarDayChangedNotification, NSCalendarIdentifier, @@ -328,7 +342,7 @@ pub use self::generated::NSEnergyFormatter::{ NSEnergyFormatter, NSEnergyFormatterUnit, NSEnergyFormatterUnitCalorie, NSEnergyFormatterUnitJoule, NSEnergyFormatterUnitKilocalorie, NSEnergyFormatterUnitKilojoule, }; -pub use self::generated::NSEnumerator::{NSEnumerator, NSFastEnumeration}; +pub use self::generated::NSEnumerator::{NSEnumerator, NSFastEnumeration, NSFastEnumerationState}; pub use self::generated::NSError::{ NSCocoaErrorDomain, NSDebugDescriptionErrorKey, NSError, NSErrorDomain, NSErrorUserInfoKey, NSFilePathErrorKey, NSHelpAnchorErrorKey, NSLocalizedDescriptionKey, @@ -425,8 +439,8 @@ pub use self::generated::NSGeometry::{ NSAlignMaxXOutward, NSAlignMaxYInward, NSAlignMaxYNearest, NSAlignMaxYOutward, NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, - NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsetsZero, NSMaxXEdge, - NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSRect, NSRectEdge, NSRectEdgeMaxX, + NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsets, NSEdgeInsetsZero, + NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSRect, NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, NSSize, NSZeroPoint, NSZeroRect, NSZeroSize, }; pub use self::generated::NSHTTPCookie::{ @@ -443,11 +457,12 @@ pub use self::generated::NSHTTPCookieStorage::{ NSHTTPCookieManagerCookiesChangedNotification, NSHTTPCookieStorage, }; pub use self::generated::NSHashTable::{ - NSHashTable, NSHashTableCopyIn, NSHashTableObjectPointerPersonality, NSHashTableOptions, - NSHashTableStrongMemory, NSHashTableWeakMemory, NSHashTableZeroingWeakMemory, - NSIntHashCallBacks, NSIntegerHashCallBacks, NSNonOwnedPointerHashCallBacks, - NSNonRetainedObjectHashCallBacks, NSObjectHashCallBacks, NSOwnedObjectIdentityHashCallBacks, - NSOwnedPointerHashCallBacks, NSPointerToStructHashCallBacks, + NSHashEnumerator, NSHashTable, NSHashTableCallBacks, NSHashTableCopyIn, + NSHashTableObjectPointerPersonality, NSHashTableOptions, NSHashTableStrongMemory, + NSHashTableWeakMemory, NSHashTableZeroingWeakMemory, NSIntHashCallBacks, + NSIntegerHashCallBacks, NSNonOwnedPointerHashCallBacks, NSNonRetainedObjectHashCallBacks, + NSObjectHashCallBacks, NSOwnedObjectIdentityHashCallBacks, NSOwnedPointerHashCallBacks, + NSPointerToStructHashCallBacks, }; pub use self::generated::NSHost::NSHost; pub use self::generated::NSISO8601DateFormatter::{ @@ -549,12 +564,14 @@ pub use self::generated::NSLock::{ }; pub use self::generated::NSMapTable::{ NSIntMapKeyCallBacks, NSIntMapValueCallBacks, NSIntegerMapKeyCallBacks, - NSIntegerMapValueCallBacks, NSMapTable, NSMapTableCopyIn, NSMapTableObjectPointerPersonality, - NSMapTableOptions, NSMapTableStrongMemory, NSMapTableWeakMemory, NSMapTableZeroingWeakMemory, - NSNonOwnedPointerMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, - NSNonOwnedPointerOrNullMapKeyCallBacks, NSNonRetainedObjectMapKeyCallBacks, - NSNonRetainedObjectMapValueCallBacks, NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, - NSOwnedPointerMapKeyCallBacks, NSOwnedPointerMapValueCallBacks, + NSIntegerMapValueCallBacks, NSMapEnumerator, NSMapTable, NSMapTableCopyIn, + NSMapTableKeyCallBacks, NSMapTableObjectPointerPersonality, NSMapTableOptions, + NSMapTableStrongMemory, NSMapTableValueCallBacks, NSMapTableWeakMemory, + NSMapTableZeroingWeakMemory, NSNonOwnedPointerMapKeyCallBacks, + NSNonOwnedPointerMapValueCallBacks, NSNonOwnedPointerOrNullMapKeyCallBacks, + NSNonRetainedObjectMapKeyCallBacks, NSNonRetainedObjectMapValueCallBacks, + NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, NSOwnedPointerMapKeyCallBacks, + NSOwnedPointerMapValueCallBacks, }; pub use self::generated::NSMassFormatter::{ NSMassFormatter, NSMassFormatterUnit, NSMassFormatterUnitGram, NSMassFormatterUnitKilogram, @@ -785,7 +802,7 @@ pub use self::generated::NSProcessInfo::{ NSActivityIdleDisplaySleepDisabled, NSActivityIdleSystemSleepDisabled, NSActivityLatencyCritical, NSActivityOptions, NSActivitySuddenTerminationDisabled, NSActivityUserInitiated, NSActivityUserInitiatedAllowingIdleSystemSleep, NSHPUXOperatingSystem, - NSMACHOperatingSystem, NSOSF1OperatingSystem, NSProcessInfo, + NSMACHOperatingSystem, NSOSF1OperatingSystem, NSOperatingSystemVersion, NSProcessInfo, NSProcessInfoPowerStateDidChangeNotification, NSProcessInfoThermalState, NSProcessInfoThermalStateCritical, NSProcessInfoThermalStateDidChangeNotification, NSProcessInfoThermalStateFair, NSProcessInfoThermalStateNominal, @@ -811,6 +828,7 @@ pub use self::generated::NSPropertyList::{ NSPropertyListXMLFormat_v1_0, }; pub use self::generated::NSProtocolChecker::NSProtocolChecker; +pub use self::generated::NSRange::NSRange; pub use self::generated::NSRegularExpression::{ NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, diff --git a/crates/icrate/src/Foundation/translation-config.toml b/crates/icrate/src/Foundation/translation-config.toml index 5e5db4917..db0689d64 100644 --- a/crates/icrate/src/Foundation/translation-config.toml +++ b/crates/icrate/src/Foundation/translation-config.toml @@ -83,3 +83,7 @@ skipped = true # Root class [class.NSProxy] skipped = true + +# Contains bitfields +[struct.NSDecimal] +skipped = true diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index b5969bd3e..f9c86a8b6 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -15,6 +15,15 @@ pub const NSDirectionalRectEdgeAll: NSDirectionalRectEdge = NSDirectionalRectEdg | NSDirectionalRectEdgeBottom | NSDirectionalRectEdgeTrailing; +struct_impl!( + pub struct NSDirectionalEdgeInsets { + pub top: CGFloat, + pub leading: CGFloat, + pub bottom: CGFloat, + pub trailing: CGFloat, + } +); + extern "C" { pub static NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets; } diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index 79a1b703e..53858d6cc 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -771,12 +771,12 @@ mod __exported { NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging, NSCollectionLayoutSize, NSCollectionLayoutSpacing, NSCollectionLayoutSupplementaryItem, NSCollectionLayoutVisibleItem, NSCollectionViewCompositionalLayout, - NSCollectionViewCompositionalLayoutConfiguration, NSDirectionalEdgeInsetsZero, - NSDirectionalRectEdge, NSDirectionalRectEdgeAll, NSDirectionalRectEdgeBottom, - NSDirectionalRectEdgeLeading, NSDirectionalRectEdgeNone, NSDirectionalRectEdgeTop, - NSDirectionalRectEdgeTrailing, NSRectAlignment, NSRectAlignmentBottom, - NSRectAlignmentBottomLeading, NSRectAlignmentBottomTrailing, NSRectAlignmentLeading, - NSRectAlignmentNone, NSRectAlignmentTop, NSRectAlignmentTopLeading, + NSCollectionViewCompositionalLayoutConfiguration, NSDirectionalEdgeInsets, + NSDirectionalEdgeInsetsZero, NSDirectionalRectEdge, NSDirectionalRectEdgeAll, + NSDirectionalRectEdgeBottom, NSDirectionalRectEdgeLeading, NSDirectionalRectEdgeNone, + NSDirectionalRectEdgeTop, NSDirectionalRectEdgeTrailing, NSRectAlignment, + NSRectAlignmentBottom, NSRectAlignmentBottomLeading, NSRectAlignmentBottomTrailing, + NSRectAlignmentLeading, NSRectAlignmentNone, NSRectAlignmentTop, NSRectAlignmentTopLeading, NSRectAlignmentTopTrailing, NSRectAlignmentTrailing, }; pub use super::NSCollectionViewFlowLayout::{ diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index 0435c9895..78ad7e66b 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -3,6 +3,17 @@ use crate::common::*; use crate::Foundation::*; +struct_impl!( + pub struct NSAffineTransformStruct { + pub m11: CGFloat, + pub m12: CGFloat, + pub m21: CGFloat, + pub m22: CGFloat, + pub tX: CGFloat, + pub tY: CGFloat, + } +); + extern_class!( #[derive(Debug)] pub struct NSAffineTransform; diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index 8d3c1cf8d..8f132ec4a 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -6,3 +6,15 @@ use crate::Foundation::*; pub const NS_UnknownByteOrder: i32 = CFByteOrderUnknown; pub const NS_LittleEndian: i32 = CFByteOrderLittleEndian; pub const NS_BigEndian: i32 = CFByteOrderBigEndian; + +struct_impl!( + pub struct NSSwappedFloat { + pub v: c_uint, + } +); + +struct_impl!( + pub struct NSSwappedDouble { + pub v: c_ulonglong, + } +); diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 7d0aa143b..536714542 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -3,6 +3,15 @@ use crate::common::*; use crate::Foundation::*; +struct_impl!( + pub struct NSFastEnumerationState { + pub state: c_ulong, + pub itemsPtr: *mut *mut Object, + pub mutationsPtr: *mut c_ulong, + pub extra: [c_ulong; 5], + } +); + pub type NSFastEnumeration = NSObject; __inner_extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index c91f79a72..455c421a4 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -19,6 +19,15 @@ pub const NSMinYEdge: NSRectEdge = NSRectEdgeMinY; pub const NSMaxXEdge: NSRectEdge = NSRectEdgeMaxX; pub const NSMaxYEdge: NSRectEdge = NSRectEdgeMaxY; +struct_impl!( + pub struct NSEdgeInsets { + pub top: CGFloat, + pub left: CGFloat, + pub bottom: CGFloat, + pub right: CGFloat, + } +); + pub type NSAlignmentOptions = c_ulonglong; pub const NSAlignMinXInward: NSAlignmentOptions = 1 << 0; pub const NSAlignMinYInward: NSAlignmentOptions = 1 << 1; diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index eece9fd86..23e658613 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -108,6 +108,24 @@ extern_methods!( } ); +struct_impl!( + pub struct NSHashEnumerator { + _pi: NSUInteger, + _si: NSUInteger, + _bs: *mut c_void, + } +); + +struct_impl!( + pub struct NSHashTableCallBacks { + pub hash: *mut TodoFunction, + pub isEqual: *mut TodoFunction, + pub retain: *mut TodoFunction, + pub release: *mut TodoFunction, + pub describe: *mut TodoFunction, + } +); + extern "C" { pub static NSIntegerHashCallBacks: NSHashTableCallBacks; } diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 5181fa8ee..f6bd6c4d3 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -116,6 +116,33 @@ extern_methods!( } ); +struct_impl!( + pub struct NSMapEnumerator { + _pi: NSUInteger, + _si: NSUInteger, + _bs: *mut c_void, + } +); + +struct_impl!( + pub struct NSMapTableKeyCallBacks { + pub hash: *mut TodoFunction, + pub isEqual: *mut TodoFunction, + pub retain: *mut TodoFunction, + pub release: *mut TodoFunction, + pub describe: *mut TodoFunction, + pub notAKeyMarker: *mut c_void, + } +); + +struct_impl!( + pub struct NSMapTableValueCallBacks { + pub retain: *mut TodoFunction, + pub release: *mut TodoFunction, + pub describe: *mut TodoFunction, + } +); + extern "C" { pub static NSIntegerMapKeyCallBacks: NSMapTableKeyCallBacks; } diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index d8b54b0b7..b0d571461 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -11,6 +11,14 @@ pub const NSMACHOperatingSystem: i32 = 5; pub const NSSunOSOperatingSystem: i32 = 6; pub const NSOSF1OperatingSystem: i32 = 7; +struct_impl!( + pub struct NSOperatingSystemVersion { + pub majorVersion: NSInteger, + pub minorVersion: NSInteger, + pub patchVersion: NSInteger, + } +); + extern_class!( #[derive(Debug)] pub struct NSProcessInfo; diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index 193811e5d..2abc4e5de 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -3,6 +3,13 @@ use crate::common::*; use crate::Foundation::*; +struct_impl!( + pub struct NSRange { + pub location: NSUInteger, + pub length: NSUInteger, + } +); + extern_methods!( /// NSValueRangeExtensions unsafe impl NSValue { diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 7c13aaad5..d8c764deb 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -201,7 +201,7 @@ mod __exported { NSXPCConnectionErrorMaximum, NSXPCConnectionErrorMinimum, NSXPCConnectionInterrupted, NSXPCConnectionInvalid, NSXPCConnectionReplyInvalid, }; - pub use super::NSAffineTransform::NSAffineTransform; + pub use super::NSAffineTransform::{NSAffineTransform, NSAffineTransformStruct}; pub use super::NSAppleEventDescriptor::{ NSAppleEventDescriptor, NSAppleEventSendAlwaysInteract, NSAppleEventSendCanInteract, NSAppleEventSendCanSwitchLayer, NSAppleEventSendDefaultOptions, @@ -276,7 +276,9 @@ mod __exported { NSByteCountFormatterUseMB, NSByteCountFormatterUsePB, NSByteCountFormatterUseTB, NSByteCountFormatterUseYBOrHigher, NSByteCountFormatterUseZB, }; - pub use super::NSByteOrder::{NS_BigEndian, NS_LittleEndian, NS_UnknownByteOrder}; + pub use super::NSByteOrder::{ + NSSwappedDouble, NSSwappedFloat, NS_BigEndian, NS_LittleEndian, NS_UnknownByteOrder, + }; pub use super::NSCache::{NSCache, NSCacheDelegate}; pub use super::NSCalendar::{ NSCalendar, NSCalendarCalendarUnit, NSCalendarDayChangedNotification, NSCalendarIdentifier, @@ -406,7 +408,7 @@ mod __exported { NSEnergyFormatterUnitJoule, NSEnergyFormatterUnitKilocalorie, NSEnergyFormatterUnitKilojoule, }; - pub use super::NSEnumerator::{NSEnumerator, NSFastEnumeration}; + pub use super::NSEnumerator::{NSEnumerator, NSFastEnumeration, NSFastEnumerationState}; pub use super::NSError::{ NSCocoaErrorDomain, NSDebugDescriptionErrorKey, NSError, NSErrorDomain, NSErrorUserInfoKey, NSFilePathErrorKey, NSHelpAnchorErrorKey, NSLocalizedDescriptionKey, @@ -507,10 +509,10 @@ mod __exported { NSAlignMaxXOutward, NSAlignMaxYInward, NSAlignMaxYNearest, NSAlignMaxYOutward, NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, - NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsetsZero, NSMaxXEdge, - NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSRect, NSRectEdge, NSRectEdgeMaxX, - NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, NSSize, NSZeroPoint, NSZeroRect, - NSZeroSize, + NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsets, + NSEdgeInsetsZero, NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSRect, + NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, NSSize, + NSZeroPoint, NSZeroRect, NSZeroSize, }; pub use super::NSHTTPCookie::{ NSHTTPCookie, NSHTTPCookieComment, NSHTTPCookieCommentURL, NSHTTPCookieDiscard, @@ -526,11 +528,11 @@ mod __exported { NSHTTPCookieManagerCookiesChangedNotification, NSHTTPCookieStorage, }; pub use super::NSHashTable::{ - NSHashTable, NSHashTableCopyIn, NSHashTableObjectPointerPersonality, NSHashTableOptions, - NSHashTableStrongMemory, NSHashTableWeakMemory, NSHashTableZeroingWeakMemory, - NSIntHashCallBacks, NSIntegerHashCallBacks, NSNonOwnedPointerHashCallBacks, - NSNonRetainedObjectHashCallBacks, NSObjectHashCallBacks, - NSOwnedObjectIdentityHashCallBacks, NSOwnedPointerHashCallBacks, + NSHashEnumerator, NSHashTable, NSHashTableCallBacks, NSHashTableCopyIn, + NSHashTableObjectPointerPersonality, NSHashTableOptions, NSHashTableStrongMemory, + NSHashTableWeakMemory, NSHashTableZeroingWeakMemory, NSIntHashCallBacks, + NSIntegerHashCallBacks, NSNonOwnedPointerHashCallBacks, NSNonRetainedObjectHashCallBacks, + NSObjectHashCallBacks, NSOwnedObjectIdentityHashCallBacks, NSOwnedPointerHashCallBacks, NSPointerToStructHashCallBacks, }; pub use super::NSHost::NSHost; @@ -635,9 +637,10 @@ mod __exported { pub use super::NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; pub use super::NSMapTable::{ NSIntMapKeyCallBacks, NSIntMapValueCallBacks, NSIntegerMapKeyCallBacks, - NSIntegerMapValueCallBacks, NSMapTable, NSMapTableCopyIn, - NSMapTableObjectPointerPersonality, NSMapTableOptions, NSMapTableStrongMemory, - NSMapTableWeakMemory, NSMapTableZeroingWeakMemory, NSNonOwnedPointerMapKeyCallBacks, + NSIntegerMapValueCallBacks, NSMapEnumerator, NSMapTable, NSMapTableCopyIn, + NSMapTableKeyCallBacks, NSMapTableObjectPointerPersonality, NSMapTableOptions, + NSMapTableStrongMemory, NSMapTableValueCallBacks, NSMapTableWeakMemory, + NSMapTableZeroingWeakMemory, NSNonOwnedPointerMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, NSNonOwnedPointerOrNullMapKeyCallBacks, NSNonRetainedObjectMapKeyCallBacks, NSNonRetainedObjectMapValueCallBacks, NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, NSOwnedPointerMapKeyCallBacks, @@ -878,12 +881,13 @@ mod __exported { NSActivityIdleDisplaySleepDisabled, NSActivityIdleSystemSleepDisabled, NSActivityLatencyCritical, NSActivityOptions, NSActivitySuddenTerminationDisabled, NSActivityUserInitiated, NSActivityUserInitiatedAllowingIdleSystemSleep, - NSHPUXOperatingSystem, NSMACHOperatingSystem, NSOSF1OperatingSystem, NSProcessInfo, - NSProcessInfoPowerStateDidChangeNotification, NSProcessInfoThermalState, - NSProcessInfoThermalStateCritical, NSProcessInfoThermalStateDidChangeNotification, - NSProcessInfoThermalStateFair, NSProcessInfoThermalStateNominal, - NSProcessInfoThermalStateSerious, NSSolarisOperatingSystem, NSSunOSOperatingSystem, - NSWindows95OperatingSystem, NSWindowsNTOperatingSystem, + NSHPUXOperatingSystem, NSMACHOperatingSystem, NSOSF1OperatingSystem, + NSOperatingSystemVersion, NSProcessInfo, NSProcessInfoPowerStateDidChangeNotification, + NSProcessInfoThermalState, NSProcessInfoThermalStateCritical, + NSProcessInfoThermalStateDidChangeNotification, NSProcessInfoThermalStateFair, + NSProcessInfoThermalStateNominal, NSProcessInfoThermalStateSerious, + NSSolarisOperatingSystem, NSSunOSOperatingSystem, NSWindows95OperatingSystem, + NSWindowsNTOperatingSystem, }; pub use super::NSProgress::{ NSProgress, NSProgressEstimatedTimeRemainingKey, NSProgressFileAnimationImageKey, @@ -904,6 +908,7 @@ mod __exported { NSPropertyListXMLFormat_v1_0, }; pub use super::NSProtocolChecker::NSProtocolChecker; + pub use super::NSRange::NSRange; pub use super::NSRegularExpression::{ NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index b9bbc19d6..609d032ba 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -19,6 +19,33 @@ extern crate std; #[cfg(feature = "objective-c")] pub use objc2; +macro_rules! struct_impl { + ( + $v:vis struct $name:ident { + $($field_v:vis $field:ident: $ty:ty),* $(,)? + } + ) => { + #[repr(C)] + #[derive(Clone, Copy, Debug, PartialEq)] + $v struct $name { + $($field_v $field: $ty,)* + } + + #[cfg(feature = "objective-c")] + unsafe impl objc2::Encode for $name { + const ENCODING: objc2::Encoding = objc2::Encoding::Struct( + stringify!($name), + &[$(<$ty as objc2::Encode>::ENCODING),*], + ); + } + + #[cfg(feature = "objective-c")] + unsafe impl objc2::RefEncode for $name { + const ENCODING_REF: objc2::Encoding = objc2::Encoding::Pointer(&::ENCODING); + } + }; +} + // Frameworks #[cfg(feature = "AppKit")] pub mod AppKit; From 6afde3a564431eb83c17cc898a38cbf3fdb0fc69 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 01:08:03 +0100 Subject: [PATCH 106/131] Add partial support for "related result types" --- crates/header-translator/src/method.rs | 35 +++++++++++++++++-- crates/header-translator/src/rust_type.rs | 16 ++++----- .../src/generated/AppKit/NSCachedImageRep.rs | 4 +-- .../icrate/src/generated/AppKit/NSDocument.rs | 4 +-- crates/icrate/src/generated/AppKit/NSNib.rs | 2 +- .../icrate/src/generated/AppKit/NSOpenGL.rs | 2 +- .../src/generated/Foundation/NSCalendar.rs | 2 +- .../generated/Foundation/NSCalendarDate.rs | 10 +++--- .../icrate/src/generated/Foundation/NSData.rs | 4 +-- .../generated/Foundation/NSDateFormatter.rs | 2 +- .../src/generated/Foundation/NSFileWrapper.rs | 4 +-- .../generated/Foundation/NSInflectionRule.rs | 2 +- .../Foundation/NSOrderedCollectionChange.rs | 2 +- .../src/generated/Foundation/NSPortCoder.rs | 2 +- .../Foundation/NSScriptCommandDescription.rs | 2 +- .../src/generated/Foundation/NSString.rs | 10 +++--- .../src/generated/Foundation/NSURLHandle.rs | 2 +- .../generated/Foundation/NSUserDefaults.rs | 2 +- 18 files changed, 68 insertions(+), 39 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 4eec78007..47450d800 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -136,6 +136,10 @@ impl MemoryManagement { fn is_alloc(sel: &str) -> bool { in_selector_family(sel.as_bytes(), b"alloc") } + + fn is_new(sel: &str) -> bool { + in_selector_family(sel.as_bytes(), b"new") + } } #[allow(dead_code)] @@ -259,7 +263,34 @@ impl<'tu> PartialMethod<'tu> { } let result_type = entity.get_result_type().expect("method return type"); - let result_type = RustTypeReturn::parse(result_type); + let result_type = match RustTypeReturn::parse(result_type) { + RustTypeReturn(RustType::Id { + mut type_, + is_const, + lifetime, + nullability, + }) => { + // Related result types + // https://clang.llvm.org/docs/AutomaticReferenceCounting.html#related-result-types + if type_.name == "Object" { + assert!(type_.generics.is_empty(), "Object return generics empty"); + if (is_class && MemoryManagement::is_new(&selector)) + || (is_class && MemoryManagement::is_alloc(&selector)) + || (!is_class && MemoryManagement::is_init(&selector)) + || (!is_class && selector == "self") + { + type_.name = "Self".into(); + } + } + RustTypeReturn(RustType::Id { + type_, + is_const, + lifetime, + nullability, + }) + } + ty => ty, + }; let mut designated_initializer = false; let mut consumes_self = false; @@ -396,7 +427,7 @@ impl fmt::Display for Method { self.result_type, self.fn_name ); - writeln!(f, "-> Option>;")?; + writeln!(f, "-> Option>;")?; } else { writeln!(f, "{};", self.result_type)?; } diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 8763ce553..d899ada0d 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -715,13 +715,11 @@ impl fmt::Display for RustType { } #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct RustTypeReturn { - inner: RustType, -} +pub struct RustTypeReturn(pub RustType); impl RustTypeReturn { pub fn is_id(&self) -> bool { - matches!(self.inner, RustType::Id { .. }) + matches!(self.0, RustType::Id { .. }) } pub fn new(inner: RustType) -> Self { @@ -731,7 +729,7 @@ impl RustTypeReturn { } }); - Self { inner } + Self(inner) } pub fn parse(ty: Type<'_>) -> Self { @@ -739,7 +737,7 @@ impl RustTypeReturn { } pub fn as_error(&self) -> String { - match &self.inner { + match &self.0 { RustType::Id { type_, lifetime: Lifetime::Unspecified, @@ -758,13 +756,13 @@ impl RustTypeReturn { } pub fn is_alloc(&self) -> bool { - match &self.inner { + match &self.0 { RustType::Id { type_, lifetime: Lifetime::Unspecified, is_const: false, nullability: Nullability::NonNull, - } => type_.name == "Object" && type_.generics.is_empty(), + } => type_.name == "Self" && type_.generics.is_empty(), _ => false, } } @@ -772,7 +770,7 @@ impl RustTypeReturn { impl fmt::Display for RustTypeReturn { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match &self.inner { + match &self.0 { RustType::Void => Ok(()), RustType::Id { type_, diff --git a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs index d52fc209c..30571700d 100644 --- a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs @@ -20,7 +20,7 @@ extern_methods!( this: Option>, win: Option<&NSWindow>, rect: NSRect, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Init initWithSize:depth:separate:alpha:)] pub unsafe fn initWithSize_depth_separate_alpha( @@ -29,7 +29,7 @@ extern_methods!( depth: NSWindowDepth, flag: bool, alpha: bool, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Other window)] pub unsafe fn window(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index 0e87fcfda..4c43dfab0 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -623,14 +623,14 @@ extern_methods!( this: Option>, absolutePath: &NSString, typeName: &NSString, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Init initWithContentsOfURL:ofType:)] pub unsafe fn initWithContentsOfURL_ofType( this: Option>, url: &NSURL, typeName: &NSString, - ) -> Option>; + ) -> Option>; #[method(loadDataRepresentation:ofType:)] pub unsafe fn loadDataRepresentation_ofType(&self, data: &NSData, type_: &NSString) diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index b658db564..8c6a26faf 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -47,7 +47,7 @@ extern_methods!( pub unsafe fn initWithContentsOfURL( this: Option>, nibFileURL: Option<&NSURL>, - ) -> Option>; + ) -> Option>; #[method(instantiateNibWithExternalNameTable:)] pub unsafe fn instantiateNibWithExternalNameTable( diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index 3bf2d0f11..36b498095 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -84,7 +84,7 @@ extern_methods!( pub unsafe fn initWithData( this: Option>, attribs: Option<&NSData>, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Other attributes)] pub unsafe fn attributes(&self) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 29231e533..069c01354 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -144,7 +144,7 @@ extern_methods!( pub unsafe fn initWithCalendarIdentifier( this: Option>, ident: &NSCalendarIdentifier, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Other calendarIdentifier)] pub unsafe fn calendarIdentifier(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs index d25148c61..ed10e2dc9 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendarDate.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendarDate.rs @@ -108,20 +108,20 @@ extern_methods!( description: &NSString, format: &NSString, locale: Option<&Object>, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Init initWithString:calendarFormat:)] pub unsafe fn initWithString_calendarFormat( this: Option>, description: &NSString, format: &NSString, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Init initWithString:)] pub unsafe fn initWithString( this: Option>, description: &NSString, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Init initWithYear:month:day:hour:minute:second:timeZone:)] pub unsafe fn initWithYear_month_day_hour_minute_second_timeZone( @@ -133,7 +133,7 @@ extern_methods!( minute: NSUInteger, second: NSUInteger, aTimeZone: Option<&NSTimeZone>, - ) -> Id; + ) -> Id; #[method(setCalendarFormat:)] pub unsafe fn setCalendarFormat(&self, format: Option<&NSString>); @@ -197,6 +197,6 @@ extern_methods!( pub unsafe fn initWithString( this: Option>, description: &NSString, - ) -> Option>; + ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index c4419a360..23515cd66 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -286,13 +286,13 @@ extern_methods!( pub unsafe fn initWithContentsOfMappedFile( this: Option>, path: &NSString, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Init initWithBase64Encoding:)] pub unsafe fn initWithBase64Encoding( this: Option>, base64String: &NSString, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Other base64Encoding)] pub unsafe fn base64Encoding(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index aab7a214d..2374a7bcc 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -315,7 +315,7 @@ extern_methods!( this: Option>, format: &NSString, flag: bool, - ) -> Id; + ) -> Id; #[method(allowsNaturalLanguage)] pub unsafe fn allowsNaturalLanguage(&self) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 914e7d430..45c99537b 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -146,13 +146,13 @@ extern_methods!( pub unsafe fn initWithPath( this: Option>, path: &NSString, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Init initSymbolicLinkWithDestination:)] pub unsafe fn initSymbolicLinkWithDestination( this: Option>, path: &NSString, - ) -> Id; + ) -> Id; #[method(needsToBeUpdatedFromPath:)] pub unsafe fn needsToBeUpdatedFromPath(&self, path: &NSString) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs index fa4508ff2..b71b5ba6b 100644 --- a/crates/icrate/src/generated/Foundation/NSInflectionRule.rs +++ b/crates/icrate/src/generated/Foundation/NSInflectionRule.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSInflectionRule { #[method_id(@__retain_semantics Init init)] - pub unsafe fn init(this: Option>) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(@__retain_semantics Other automaticRule)] pub unsafe fn automaticRule() -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 3ff4736eb..9b22e674a 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -48,7 +48,7 @@ extern_methods!( pub unsafe fn associatedIndex(&self) -> NSUInteger; #[method_id(@__retain_semantics Init init)] - pub unsafe fn init(this: Option>) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(@__retain_semantics Init initWithObject:type:index:)] pub unsafe fn initWithObject_type_index( diff --git a/crates/icrate/src/generated/Foundation/NSPortCoder.rs b/crates/icrate/src/generated/Foundation/NSPortCoder.rs index 4894467aa..0626405c7 100644 --- a/crates/icrate/src/generated/Foundation/NSPortCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSPortCoder.rs @@ -42,7 +42,7 @@ extern_methods!( rcvPort: Option<&NSPort>, sndPort: Option<&NSPort>, comps: Option<&NSArray>, - ) -> Id; + ) -> Id; #[method(dispatch)] pub unsafe fn dispatch(&self); diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs index ebdfbbbc5..e6f21ef3b 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommandDescription.rs @@ -15,7 +15,7 @@ extern_class!( extern_methods!( unsafe impl NSScriptCommandDescription { #[method_id(@__retain_semantics Init init)] - pub unsafe fn init(this: Option>) -> Id; + pub unsafe fn init(this: Option>) -> Id; #[method_id(@__retain_semantics Init initWithSuiteName:commandName:dictionary:)] pub unsafe fn initWithSuiteName_commandName_dictionary( diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 963577d29..4dcfbb0d4 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -886,13 +886,13 @@ extern_methods!( pub unsafe fn initWithContentsOfFile( this: Option>, path: &NSString, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Init initWithContentsOfURL:)] pub unsafe fn initWithContentsOfURL( this: Option>, url: &NSURL, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Other stringWithContentsOfFile:)] pub unsafe fn stringWithContentsOfFile(path: &NSString) -> Option>; @@ -906,20 +906,20 @@ extern_methods!( bytes: NonNull, length: NSUInteger, freeBuffer: bool, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Init initWithCString:length:)] pub unsafe fn initWithCString_length( this: Option>, bytes: NonNull, length: NSUInteger, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Init initWithCString:)] pub unsafe fn initWithCString( this: Option>, bytes: NonNull, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Other stringWithCString:length:)] pub unsafe fn stringWithCString_length( diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 9ef522ee0..a9af7280d 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -119,7 +119,7 @@ extern_methods!( this: Option>, anURL: Option<&NSURL>, willCache: bool, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Other propertyForKey:)] pub unsafe fn propertyForKey( diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index ab9105667..7405b2a68 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -45,7 +45,7 @@ extern_methods!( pub unsafe fn initWithUser( this: Option>, username: &NSString, - ) -> Option>; + ) -> Option>; #[method_id(@__retain_semantics Other objectForKey:)] pub unsafe fn objectForKey(&self, defaultName: &NSString) -> Option>; From dee50de6641aa302345394c162f18d6846b731fb Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 02:24:22 +0100 Subject: [PATCH 107/131] Refactor typedef parsing a bit --- crates/header-translator/src/rust_type.rs | 60 +++++++++++++-- crates/header-translator/src/stmt.rs | 92 +++-------------------- 2 files changed, 64 insertions(+), 88 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index d899ada0d..9efc908fb 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -534,16 +534,62 @@ impl RustType { this } - pub fn parse_typedef(ty: Type<'_>) -> Self { - let this = Self::parse(ty, false, Nullability::Unspecified); + pub fn parse_typedef(ty: Type<'_>) -> Option { + match ty.get_kind() { + // When we encounter a typedef declaration like this: + // typedef NSString* NSAbc; + // + // We parse it as one of: + // type NSAbc = NSString; + // struct NSAbc(NSString); + // + // Instead of: + // type NSAbc = *const NSString; + // + // Because that means we can later on use ordinary Id<...> handling. + TypeKind::ObjCObjectPointer => { + let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + let type_ = GenericType::parse_objc_pointer(ty); - this.visit_lifetime(|lifetime| { - if lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime in typedef {this:?}"); + match &*type_.name { + "NSString" => {} + "NSUnit" => {} // TODO: Handle this differently + "TodoProtocols" => {} // TODO + _ => panic!("typedef declaration was not NSString: {type_:?}"), + } + + if !type_.generics.is_empty() { + panic!("typedef declaration generics not empty"); + } + + Some(Self::TypeDef { name: type_.name }) } - }); + TypeKind::Elaborated => { + let ty = ty.get_elaborated_type().expect("elaborated"); + match ty.get_kind() { + TypeKind::Record => { + // TODO + None + } + // Handled by Stmt::EnumDecl + TypeKind::Enum => None, + _ => panic!("unknown elaborated type {ty:?}"), + } + } + TypeKind::Typedef => { + let this = Self::parse(ty, false, Nullability::Unspecified); - this + this.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in typedef {this:?}"); + } + }); + + Some(this) + } + // TODO + _ => None, + } } pub fn parse_property(ty: Type<'_>, default_nullability: Nullability) -> Self { diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 0fcc3436b..228d7ad8e 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -1,14 +1,14 @@ use std::collections::HashSet; use std::fmt; -use clang::{Entity, EntityKind, EntityVisitResult, TypeKind}; +use clang::{Entity, EntityKind, EntityVisitResult}; use crate::availability::Availability; use crate::config::{ClassData, Config}; use crate::expr::Expr; use crate::method::Method; use crate::property::Property; -use crate::rust_type::{GenericType, RustType, RustTypeReturn, RustTypeStatic}; +use crate::rust_type::{RustType, RustTypeReturn, RustTypeStatic}; use crate::unexposed_macro::UnexposedMacro; #[derive(Debug, Clone)] @@ -390,6 +390,7 @@ impl Stmt { EntityKind::TypedefDecl => { let name = entity.get_name().expect("typedef name"); let mut struct_ = None; + let mut skip_struct = false; entity.visit_children(|entity, _parent| { match entity.get_kind() { @@ -406,12 +407,14 @@ impl Stmt { .map(|data| data.skipped) .unwrap_or_default() { + skip_struct = true; return EntityVisitResult::Continue; } let struct_name = entity.get_name(); if struct_name.is_none() || struct_name + .as_deref() .map(|name| name.starts_with('_')) .unwrap_or(false) { @@ -434,89 +437,16 @@ impl Stmt { return Some(struct_); } + if skip_struct { + return None; + } + let ty = entity .get_typedef_underlying_type() .expect("typedef underlying type"); - match ty.get_kind() { - // Note: When we encounter a typedef declaration like this: - // typedef NSString* NSAbc; - // - // We parse it as one of: - // type NSAbc = NSString; - // struct NSAbc(NSString); - // - // Instead of: - // type NSAbc = *const NSString; - // - // Because that means we can use ordinary Id<...> handling. - TypeKind::ObjCObjectPointer => { - let ty = ty.get_pointee_type().expect("pointer type to have pointee"); - let type_ = GenericType::parse_objc_pointer(ty); - - match &*type_.name { - "NSString" => {} - "NSUnit" => {} // TODO: Handle this differently - "TodoProtocols" => {} // TODO - _ => panic!("typedef declaration was not NSString: {type_:?}"), - } + let ty = RustType::parse_typedef(ty); - if !type_.generics.is_empty() { - panic!("typedef declaration generics not empty"); - } - - Some(Self::AliasDecl { - name, - type_: RustType::TypeDef { name: type_.name }, - }) - } - TypeKind::Typedef => { - // println!( - // "typedef: {:?}, {:?}, {:#?}, {:#?}, {:#?}", - // entity.get_display_name(), - // entity.get_name(), - // entity.has_attributes(), - // entity.get_children(), - // ty, - // ); - let type_ = RustType::parse_typedef(ty); - Some(Self::AliasDecl { name, type_ }) - } - TypeKind::Elaborated => { - let ty = ty.get_elaborated_type().expect("elaborated"); - match ty.get_kind() { - TypeKind::Enum => { - // Handled below - None - } - _ => { - // println!( - // "elaborated: {:?}, {:?}, {:?}, {:#?}, {:#?}, {:?}, {:#?}", - // entity.get_kind(), - // entity.get_display_name(), - // entity.get_name(), - // entity.has_attributes(), - // entity.get_children(), - // ty.get_kind(), - // ty, - // ); - None - } - } - } - _ => { - // println!( - // "typedef2: {:?}, {:?}, {:?}, {:#?}, {:#?}, {:?}, {:#?}", - // entity.get_kind(), - // entity.get_display_name(), - // entity.get_name(), - // entity.has_attributes(), - // entity.get_children(), - // ty.get_kind(), - // ty, - // ); - None - } - } + ty.map(|type_| Self::AliasDecl { name, type_ }) } EntityKind::StructDecl => { if let Some(name) = entity.get_name() { From 3c3c3c46f79f1aee0236bba8f21337d03f42e318 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 03:05:59 +0100 Subject: [PATCH 108/131] Output remaining typedefs --- crates/header-translator/src/rust_type.rs | 50 +++++++---- crates/header-translator/src/stmt.rs | 36 ++++++-- crates/icrate/src/Foundation/mod.rs | 56 ++++++------ .../src/generated/AppKit/NSAnimation.rs | 2 + .../src/generated/AppKit/NSApplication.rs | 4 + .../NSCollectionViewCompositionalLayout.rs | 6 ++ .../generated/AppKit/NSDiffableDataSource.rs | 4 + crates/icrate/src/generated/AppKit/NSFont.rs | 2 + .../generated/AppKit/NSLayoutConstraint.rs | 2 + .../src/generated/AppKit/NSStackView.rs | 2 + .../src/generated/AppKit/NSStoryboard.rs | 2 + .../AppKit/NSTableViewDiffableDataSource.rs | 6 ++ .../src/generated/AppKit/NSTouchBarItem.rs | 2 + crates/icrate/src/generated/AppKit/mod.rs | 90 +++++++++++-------- .../Foundation/NSAppleEventManager.rs | 2 + .../NSBackgroundActivityScheduler.rs | 2 + .../icrate/src/generated/Foundation/NSDate.rs | 2 + .../src/generated/Foundation/NSException.rs | 2 + .../src/generated/Foundation/NSGeometry.rs | 12 +++ .../generated/Foundation/NSItemProvider.rs | 4 + .../src/generated/Foundation/NSObjCRuntime.rs | 2 + .../icrate/src/generated/Foundation/NSPort.rs | 2 + .../src/generated/Foundation/NSProgress.rs | 4 + .../src/generated/Foundation/NSRange.rs | 2 + .../src/generated/Foundation/NSString.rs | 2 + .../generated/Foundation/NSUserScriptTask.rs | 8 ++ crates/icrate/src/generated/Foundation/mod.rs | 61 +++++++------ 27 files changed, 252 insertions(+), 117 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 9efc908fb..d5b3e6773 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -296,6 +296,12 @@ pub enum RustType { element_type: Box, num_elements: usize, }, + Enum { + name: String, + }, + Struct { + name: String, + }, TypeDef { name: String, @@ -475,6 +481,26 @@ impl RustType { } } } + Elaborated => { + let ty = ty.get_elaborated_type().expect("elaborated"); + match ty.get_kind() { + TypeKind::Record => { + let name = ty + .get_display_name() + .trim_start_matches("struct ") + .to_string(); + Self::Struct { name } + } + TypeKind::Enum => { + let name = ty + .get_display_name() + .trim_start_matches("enum ") + .to_string(); + Self::Enum { name } + } + _ => panic!("unknown elaborated type {ty:?}"), + } + } BlockPointer => Self::TypeDef { name: "TodoBlock".to_string(), }, @@ -534,7 +560,7 @@ impl RustType { this } - pub fn parse_typedef(ty: Type<'_>) -> Option { + pub fn parse_typedef(ty: Type<'_>) -> Self { match ty.get_kind() { // When we encounter a typedef declaration like this: // typedef NSString* NSAbc; @@ -562,21 +588,9 @@ impl RustType { panic!("typedef declaration generics not empty"); } - Some(Self::TypeDef { name: type_.name }) - } - TypeKind::Elaborated => { - let ty = ty.get_elaborated_type().expect("elaborated"); - match ty.get_kind() { - TypeKind::Record => { - // TODO - None - } - // Handled by Stmt::EnumDecl - TypeKind::Enum => None, - _ => panic!("unknown elaborated type {ty:?}"), - } + Self::TypeDef { name: type_.name } } - TypeKind::Typedef => { + _ => { let this = Self::parse(ty, false, Nullability::Unspecified); this.visit_lifetime(|lifetime| { @@ -585,10 +599,8 @@ impl RustType { } }); - Some(this) + this } - // TODO - _ => None, } } @@ -755,7 +767,7 @@ impl fmt::Display for RustType { element_type, num_elements, } => write!(f, "[{element_type}; {num_elements}]"), - TypeDef { name } => write!(f, "{name}"), + Enum { name } | Struct { name } | TypeDef { name } => write!(f, "{name}"), } } } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 228d7ad8e..3e448fb82 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -412,16 +412,16 @@ impl Stmt { } let struct_name = entity.get_name(); - if struct_name.is_none() - || struct_name - .as_deref() - .map(|name| name.starts_with('_')) - .unwrap_or(false) + if struct_name + .map(|name| name.starts_with('_')) + .unwrap_or(true) { // If this struct doesn't have a name, or the // name is private, let's parse it with the // typedef name. struct_ = Some(parse_struct(&entity, name.clone())) + } else { + skip_struct = true; } } EntityKind::ObjCClassRef @@ -446,7 +446,31 @@ impl Stmt { .expect("typedef underlying type"); let ty = RustType::parse_typedef(ty); - ty.map(|type_| Self::AliasDecl { name, type_ }) + match ty { + // Handled by Stmt::EnumDecl + RustType::Enum { .. } => None, + // Handled above and in Stmt::StructDecl + // The rest is only `NSZone` + RustType::Struct { name } => { + assert_eq!(name, "_NSZone", "invalid struct in typedef"); + None + } + // Opaque structs + RustType::Pointer { + nullability, + is_const, + mut pointee, + } if matches!(*pointee, RustType::Struct { .. }) => { + *pointee = RustType::Void; + let type_ = RustType::Pointer { + nullability, + is_const, + pointee, + }; + Some(Self::AliasDecl { name, type_ }) + } + type_ => Some(Self::AliasDecl { name, type_ }), + } } EntityKind::StructDecl => { if let Some(name) = entity.get_name() { diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index 224d2859f..f09211575 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -2,7 +2,7 @@ pub(crate) mod generated; pub use objc2::ffi::NSIntegerMax; -pub use objc2::foundation::{CGFloat, CGPoint, CGRect, CGSize, NSTimeInterval, NSZone}; +pub use objc2::foundation::{CGFloat, CGPoint, CGRect, CGSize, NSZone}; pub use objc2::ns_string; objc2::__inner_extern_class! { @@ -92,9 +92,6 @@ impl std::fmt::Debug for NSProxy { } } -// TODO -pub type NSRangePointer = *const NSRange; - struct_impl!( pub struct NSDecimal { // signed int _exponent:8; @@ -151,8 +148,9 @@ pub use self::generated::NSAppleEventDescriptor::{ NSAppleEventSendWaitForReply, }; pub use self::generated::NSAppleEventManager::{ - NSAppleEventManager, NSAppleEventManagerWillProcessFirstEventNotification, - NSAppleEventTimeOutDefault, NSAppleEventTimeOutNone, + NSAppleEventManager, NSAppleEventManagerSuspensionID, + NSAppleEventManagerWillProcessFirstEventNotification, NSAppleEventTimeOutDefault, + NSAppleEventTimeOutNone, }; pub use self::generated::NSAppleScript::{ NSAppleScript, NSAppleScriptErrorAppName, NSAppleScriptErrorBriefMessage, @@ -197,8 +195,9 @@ pub use self::generated::NSAttributedString::{ }; pub use self::generated::NSAutoreleasePool::NSAutoreleasePool; pub use self::generated::NSBackgroundActivityScheduler::{ - NSBackgroundActivityResult, NSBackgroundActivityResultDeferred, - NSBackgroundActivityResultFinished, NSBackgroundActivityScheduler, + NSBackgroundActivityCompletionHandler, NSBackgroundActivityResult, + NSBackgroundActivityResultDeferred, NSBackgroundActivityResultFinished, + NSBackgroundActivityScheduler, }; pub use self::generated::NSBundle::{ NSBundle, NSBundleDidLoadNotification, NSBundleExecutableArchitectureARM64, @@ -289,7 +288,7 @@ pub use self::generated::NSData::{ NSDataWritingFileProtectionMask, NSDataWritingFileProtectionNone, NSDataWritingOptions, NSDataWritingWithoutOverwriting, NSMappedRead, NSMutableData, NSPurgeableData, NSUncachedRead, }; -pub use self::generated::NSDate::{NSDate, NSSystemClockDidChangeNotification}; +pub use self::generated::NSDate::{NSDate, NSSystemClockDidChangeNotification, NSTimeInterval}; pub use self::generated::NSDateComponentsFormatter::{ NSDateComponentsFormatter, NSDateComponentsFormatterUnitsStyle, NSDateComponentsFormatterUnitsStyleAbbreviated, NSDateComponentsFormatterUnitsStyleBrief, @@ -357,7 +356,7 @@ pub use self::generated::NSException::{ NSInvalidArgumentException, NSInvalidReceivePortException, NSInvalidSendPortException, NSMallocException, NSObjectInaccessibleException, NSObjectNotAvailableException, NSOldStyleException, NSPortReceiveException, NSPortSendException, NSPortTimeoutException, - NSRangeException, + NSRangeException, NSUncaughtExceptionHandler, }; pub use self::generated::NSExpression::{ NSAggregateExpressionType, NSAnyKeyExpressionType, NSBlockExpressionType, @@ -440,8 +439,9 @@ pub use self::generated::NSGeometry::{ NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsets, NSEdgeInsetsZero, - NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSRect, NSRectEdge, NSRectEdgeMaxX, - NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, NSSize, NSZeroPoint, NSZeroRect, NSZeroSize, + NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSPointArray, NSPointPointer, NSRect, + NSRectArray, NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, + NSRectPointer, NSSize, NSSizeArray, NSSizePointer, NSZeroPoint, NSZeroRect, NSZeroSize, }; pub use self::generated::NSHTTPCookie::{ NSHTTPCookie, NSHTTPCookieComment, NSHTTPCookieCommentURL, NSHTTPCookieDiscard, @@ -481,9 +481,10 @@ pub use self::generated::NSInflectionRule::{NSInflectionRule, NSInflectionRuleEx pub use self::generated::NSInvocation::NSInvocation; pub use self::generated::NSItemProvider::{ NSExtensionJavaScriptFinalizeArgumentKey, NSExtensionJavaScriptPreprocessingResultsKey, - NSItemProvider, NSItemProviderErrorCode, NSItemProviderErrorDomain, - NSItemProviderFileOptionOpenInPlace, NSItemProviderFileOptions, - NSItemProviderItemUnavailableError, NSItemProviderPreferredImageSizeKey, NSItemProviderReading, + NSItemProvider, NSItemProviderCompletionHandler, NSItemProviderErrorCode, + NSItemProviderErrorDomain, NSItemProviderFileOptionOpenInPlace, NSItemProviderFileOptions, + NSItemProviderItemUnavailableError, NSItemProviderLoadHandler, + NSItemProviderPreferredImageSizeKey, NSItemProviderReading, NSItemProviderRepresentationVisibility, NSItemProviderRepresentationVisibilityAll, NSItemProviderRepresentationVisibilityGroup, NSItemProviderRepresentationVisibilityOwnProcess, NSItemProviderRepresentationVisibilityTeam, NSItemProviderUnavailableCoercionError, @@ -724,11 +725,12 @@ pub use self::generated::NSNumberFormatter::{ NSNumberFormatterSpellOutStyle, NSNumberFormatterStyle, }; pub use self::generated::NSObjCRuntime::{ - NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, NSEnumerationReverse, - NSExceptionName, NSFoundationVersionNumber, NSNotFound, NSOrderedAscending, - NSOrderedDescending, NSOrderedSame, NSQualityOfService, NSQualityOfServiceBackground, - NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, - NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, NSSortOptions, NSSortStable, + NSComparator, NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, + NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, NSNotFound, + NSOrderedAscending, NSOrderedDescending, NSOrderedSame, NSQualityOfService, + NSQualityOfServiceBackground, NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, + NSQualityOfServiceUserInteractive, NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, + NSSortOptions, NSSortStable, }; pub use self::generated::NSObject::{ NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, @@ -789,7 +791,7 @@ pub use self::generated::NSPointerFunctions::{ pub use self::generated::NSPort::{ NSMachPort, NSMachPortDeallocateNone, NSMachPortDeallocateReceiveRight, NSMachPortDeallocateSendRight, NSMachPortDelegate, NSMachPortOptions, NSMessagePort, NSPort, - NSPortDelegate, NSPortDidBecomeInvalidNotification, NSSocketPort, + NSPortDelegate, NSPortDidBecomeInvalidNotification, NSSocketNativeHandle, NSSocketPort, }; pub use self::generated::NSPortCoder::NSPortCoder; pub use self::generated::NSPortMessage::NSPortMessage; @@ -817,8 +819,8 @@ pub use self::generated::NSProgress::{ NSProgressFileOperationKindDownloading, NSProgressFileOperationKindDuplicating, NSProgressFileOperationKindKey, NSProgressFileOperationKindReceiving, NSProgressFileOperationKindUploading, NSProgressFileTotalCountKey, NSProgressFileURLKey, - NSProgressKind, NSProgressKindFile, NSProgressReporting, NSProgressThroughputKey, - NSProgressUserInfoKey, + NSProgressKind, NSProgressKindFile, NSProgressPublishingHandler, NSProgressReporting, + NSProgressThroughputKey, NSProgressUnpublishingHandler, NSProgressUserInfoKey, }; pub use self::generated::NSPropertyList::{ NSPropertyListBinaryFormat_v1_0, NSPropertyListFormat, NSPropertyListImmutable, @@ -828,7 +830,7 @@ pub use self::generated::NSPropertyList::{ NSPropertyListXMLFormat_v1_0, }; pub use self::generated::NSProtocolChecker::NSProtocolChecker; -pub use self::generated::NSRange::NSRange; +pub use self::generated::NSRange::{NSRange, NSRangePointer}; pub use self::generated::NSRegularExpression::{ NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, @@ -909,7 +911,7 @@ pub use self::generated::NSStream::{ NSStreamStatusReading, NSStreamStatusWriting, }; pub use self::generated::NSString::{ - NSASCIIStringEncoding, NSAnchoredSearch, NSBackwardsSearch, NSCaseInsensitiveSearch, + unichar, NSASCIIStringEncoding, NSAnchoredSearch, NSBackwardsSearch, NSCaseInsensitiveSearch, NSCharacterConversionException, NSConstantString, NSDiacriticInsensitiveSearch, NSForcedOrderingSearch, NSISO2022JPStringEncoding, NSISOLatin1StringEncoding, NSISOLatin2StringEncoding, NSJapaneseEUCStringEncoding, NSLiteralSearch, @@ -1140,7 +1142,9 @@ pub use self::generated::NSUserNotification::{ NSUserNotificationCenterDelegate, NSUserNotificationDefaultSoundName, }; pub use self::generated::NSUserScriptTask::{ - NSUserAppleScriptTask, NSUserAutomatorTask, NSUserScriptTask, NSUserUnixTask, + NSUserAppleScriptTask, NSUserAppleScriptTaskCompletionHandler, NSUserAutomatorTask, + NSUserAutomatorTaskCompletionHandler, NSUserScriptTask, NSUserScriptTaskCompletionHandler, + NSUserUnixTask, NSUserUnixTaskCompletionHandler, }; pub use self::generated::NSValue::{NSNumber, NSValue}; pub use self::generated::NSValueTransformer::{ diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index 040d0a03a..69ba18e97 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -15,6 +15,8 @@ pub const NSAnimationBlocking: NSAnimationBlockingMode = 0; pub const NSAnimationNonblocking: NSAnimationBlockingMode = 1; pub const NSAnimationNonblockingThreaded: NSAnimationBlockingMode = 2; +pub type NSAnimationProgress = c_float; + extern "C" { pub static NSAnimationProgressMarkNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 475b0dc5c..83ba9acdc 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -4,6 +4,8 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; +pub type NSAppKitVersion = c_double; + extern "C" { pub static NSAppKitVersionNumber: NSAppKitVersion; } @@ -173,6 +175,8 @@ pub const NSApplicationOcclusionStateVisible: NSApplicationOcclusionState = 1 << pub type NSWindowListOptions = NSInteger; pub const NSWindowListOrderedFrontToBack: NSWindowListOptions = 1 << 0; +pub type NSModalSession = *mut c_void; + extern "C" { pub static NSApp: Option<&'static NSApplication>; } diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index f9c86a8b6..2d8503cd4 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -75,6 +75,8 @@ extern_methods!( } ); +pub type NSCollectionViewCompositionalLayoutSectionProvider = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSCollectionViewCompositionalLayout; @@ -145,6 +147,8 @@ pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging: pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered: NSCollectionLayoutSectionOrthogonalScrollingBehavior = 5; +pub type NSCollectionLayoutSectionVisibleItemsInvalidationHandler = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutSection; @@ -314,6 +318,8 @@ extern_methods!( } ); +pub type NSCollectionLayoutGroupCustomItemProvider = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSCollectionLayoutGroup; diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index 6575f5f1a..fbf5c76ab 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -159,6 +159,10 @@ extern_methods!( } ); +pub type NSCollectionViewDiffableDataSourceItemProvider = TodoBlock; + +pub type NSCollectionViewDiffableDataSourceSupplementaryViewProvider = TodoBlock; + __inner_extern_class!( #[derive(Debug)] pub struct NSCollectionViewDiffableDataSource< diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index d213d5aa4..5f7fdaf32 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -225,6 +225,8 @@ extern "C" { pub static NSFontSetChangedNotification: &'static NSNotificationName; } +pub type NSGlyph = c_uint; + pub const NSControlGlyph: i32 = 0x00FFFFFF; pub const NSNullGlyph: i32 = 0x0; diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index 56442c7df..e08711b60 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -4,6 +4,8 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; +pub type NSLayoutPriority = c_float; + pub static NSLayoutPriorityRequired: NSLayoutPriority = 1000; pub static NSLayoutPriorityDefaultHigh: NSLayoutPriority = 750; diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index da5ca847c..c12da61c7 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -19,6 +19,8 @@ pub const NSStackViewDistributionFillProportionally: NSStackViewDistribution = 2 pub const NSStackViewDistributionEqualSpacing: NSStackViewDistribution = 3; pub const NSStackViewDistributionEqualCentering: NSStackViewDistribution = 4; +pub type NSStackViewVisibilityPriority = c_float; + pub static NSStackViewVisibilityPriorityMustHold: NSStackViewVisibilityPriority = 1000; pub static NSStackViewVisibilityPriorityDetachOnlyIfNecessary: NSStackViewVisibilityPriority = 900; diff --git a/crates/icrate/src/generated/AppKit/NSStoryboard.rs b/crates/icrate/src/generated/AppKit/NSStoryboard.rs index bfb384bea..bc4a1bacb 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboard.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboard.rs @@ -8,6 +8,8 @@ pub type NSStoryboardName = NSString; pub type NSStoryboardSceneIdentifier = NSString; +pub type NSStoryboardControllerCreator = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSStoryboard; diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs index 662170cfb..e7fcf7294 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -4,6 +4,12 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; +pub type NSTableViewDiffableDataSourceCellProvider = TodoBlock; + +pub type NSTableViewDiffableDataSourceRowProvider = TodoBlock; + +pub type NSTableViewDiffableDataSourceSectionHeaderViewProvider = TodoBlock; + __inner_extern_class!( #[derive(Debug)] pub struct NSTableViewDiffableDataSource< diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs index a7685b280..ac60896d4 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -6,6 +6,8 @@ use crate::Foundation::*; pub type NSTouchBarItemIdentifier = NSString; +pub type NSTouchBarItemPriority = c_float; + pub static NSTouchBarItemPriorityHigh: NSTouchBarItemPriority = 1000; pub static NSTouchBarItemPriorityNormal: NSTouchBarItemPriority = 0; diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index 53858d6cc..772c7ba86 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -515,7 +515,7 @@ mod __exported { NSAnimatablePropertyContainer, NSAnimatablePropertyKey, NSAnimation, NSAnimationBlocking, NSAnimationBlockingMode, NSAnimationCurve, NSAnimationDelegate, NSAnimationEaseIn, NSAnimationEaseInOut, NSAnimationEaseOut, NSAnimationLinear, NSAnimationNonblocking, - NSAnimationNonblockingThreaded, NSAnimationProgressMark, + NSAnimationNonblockingThreaded, NSAnimationProgress, NSAnimationProgressMark, NSAnimationProgressMarkNotification, NSAnimationTriggerOrderIn, NSAnimationTriggerOrderOut, NSViewAnimation, NSViewAnimationEffectKey, NSViewAnimationEffectName, NSViewAnimationEndFrameKey, NSViewAnimationFadeInEffect, NSViewAnimationFadeOutEffect, @@ -534,30 +534,31 @@ mod __exported { pub use super::NSApplication::{ NSAboutPanelOptionApplicationIcon, NSAboutPanelOptionApplicationName, NSAboutPanelOptionApplicationVersion, NSAboutPanelOptionCredits, NSAboutPanelOptionKey, - NSAboutPanelOptionVersion, NSApp, NSAppKitVersionNumber, NSAppKitVersionNumber10_0, - NSAppKitVersionNumber10_1, NSAppKitVersionNumber10_10, NSAppKitVersionNumber10_10_2, - NSAppKitVersionNumber10_10_3, NSAppKitVersionNumber10_10_4, NSAppKitVersionNumber10_10_5, - NSAppKitVersionNumber10_10_Max, NSAppKitVersionNumber10_11, NSAppKitVersionNumber10_11_1, - NSAppKitVersionNumber10_11_2, NSAppKitVersionNumber10_11_3, NSAppKitVersionNumber10_12, - NSAppKitVersionNumber10_12_1, NSAppKitVersionNumber10_12_2, NSAppKitVersionNumber10_13, - NSAppKitVersionNumber10_13_1, NSAppKitVersionNumber10_13_2, NSAppKitVersionNumber10_13_4, - NSAppKitVersionNumber10_14, NSAppKitVersionNumber10_14_1, NSAppKitVersionNumber10_14_2, - NSAppKitVersionNumber10_14_3, NSAppKitVersionNumber10_14_4, NSAppKitVersionNumber10_14_5, - NSAppKitVersionNumber10_15, NSAppKitVersionNumber10_15_1, NSAppKitVersionNumber10_15_2, - NSAppKitVersionNumber10_15_3, NSAppKitVersionNumber10_15_4, NSAppKitVersionNumber10_15_5, - NSAppKitVersionNumber10_15_6, NSAppKitVersionNumber10_2, NSAppKitVersionNumber10_2_3, - NSAppKitVersionNumber10_3, NSAppKitVersionNumber10_3_2, NSAppKitVersionNumber10_3_3, - NSAppKitVersionNumber10_3_5, NSAppKitVersionNumber10_3_7, NSAppKitVersionNumber10_3_9, - NSAppKitVersionNumber10_4, NSAppKitVersionNumber10_4_1, NSAppKitVersionNumber10_4_3, - NSAppKitVersionNumber10_4_4, NSAppKitVersionNumber10_4_7, NSAppKitVersionNumber10_5, - NSAppKitVersionNumber10_5_2, NSAppKitVersionNumber10_5_3, NSAppKitVersionNumber10_6, - NSAppKitVersionNumber10_7, NSAppKitVersionNumber10_7_2, NSAppKitVersionNumber10_7_3, - NSAppKitVersionNumber10_7_4, NSAppKitVersionNumber10_8, NSAppKitVersionNumber10_9, - NSAppKitVersionNumber11_0, NSAppKitVersionNumber11_1, NSAppKitVersionNumber11_2, - NSAppKitVersionNumber11_3, NSAppKitVersionNumber11_4, NSApplication, NSApplicationDelegate, - NSApplicationDelegateReply, NSApplicationDelegateReplyCancel, - NSApplicationDelegateReplyFailure, NSApplicationDelegateReplySuccess, - NSApplicationDidBecomeActiveNotification, NSApplicationDidChangeOcclusionStateNotification, + NSAboutPanelOptionVersion, NSApp, NSAppKitVersion, NSAppKitVersionNumber, + NSAppKitVersionNumber10_0, NSAppKitVersionNumber10_1, NSAppKitVersionNumber10_10, + NSAppKitVersionNumber10_10_2, NSAppKitVersionNumber10_10_3, NSAppKitVersionNumber10_10_4, + NSAppKitVersionNumber10_10_5, NSAppKitVersionNumber10_10_Max, NSAppKitVersionNumber10_11, + NSAppKitVersionNumber10_11_1, NSAppKitVersionNumber10_11_2, NSAppKitVersionNumber10_11_3, + NSAppKitVersionNumber10_12, NSAppKitVersionNumber10_12_1, NSAppKitVersionNumber10_12_2, + NSAppKitVersionNumber10_13, NSAppKitVersionNumber10_13_1, NSAppKitVersionNumber10_13_2, + NSAppKitVersionNumber10_13_4, NSAppKitVersionNumber10_14, NSAppKitVersionNumber10_14_1, + NSAppKitVersionNumber10_14_2, NSAppKitVersionNumber10_14_3, NSAppKitVersionNumber10_14_4, + NSAppKitVersionNumber10_14_5, NSAppKitVersionNumber10_15, NSAppKitVersionNumber10_15_1, + NSAppKitVersionNumber10_15_2, NSAppKitVersionNumber10_15_3, NSAppKitVersionNumber10_15_4, + NSAppKitVersionNumber10_15_5, NSAppKitVersionNumber10_15_6, NSAppKitVersionNumber10_2, + NSAppKitVersionNumber10_2_3, NSAppKitVersionNumber10_3, NSAppKitVersionNumber10_3_2, + NSAppKitVersionNumber10_3_3, NSAppKitVersionNumber10_3_5, NSAppKitVersionNumber10_3_7, + NSAppKitVersionNumber10_3_9, NSAppKitVersionNumber10_4, NSAppKitVersionNumber10_4_1, + NSAppKitVersionNumber10_4_3, NSAppKitVersionNumber10_4_4, NSAppKitVersionNumber10_4_7, + NSAppKitVersionNumber10_5, NSAppKitVersionNumber10_5_2, NSAppKitVersionNumber10_5_3, + NSAppKitVersionNumber10_6, NSAppKitVersionNumber10_7, NSAppKitVersionNumber10_7_2, + NSAppKitVersionNumber10_7_3, NSAppKitVersionNumber10_7_4, NSAppKitVersionNumber10_8, + NSAppKitVersionNumber10_9, NSAppKitVersionNumber11_0, NSAppKitVersionNumber11_1, + NSAppKitVersionNumber11_2, NSAppKitVersionNumber11_3, NSAppKitVersionNumber11_4, + NSApplication, NSApplicationDelegate, NSApplicationDelegateReply, + NSApplicationDelegateReplyCancel, NSApplicationDelegateReplyFailure, + NSApplicationDelegateReplySuccess, NSApplicationDidBecomeActiveNotification, + NSApplicationDidChangeOcclusionStateNotification, NSApplicationDidChangeScreenParametersNotification, NSApplicationDidFinishLaunchingNotification, NSApplicationDidHideNotification, NSApplicationDidResignActiveNotification, NSApplicationDidUnhideNotification, @@ -581,8 +582,8 @@ mod __exported { NSApplicationWillTerminateNotification, NSApplicationWillUnhideNotification, NSApplicationWillUpdateNotification, NSCriticalRequest, NSEventTrackingRunLoopMode, NSInformationalRequest, NSModalPanelRunLoopMode, NSModalResponse, NSModalResponseAbort, - NSModalResponseContinue, NSModalResponseStop, NSPrintingCancelled, NSPrintingFailure, - NSPrintingReplyLater, NSPrintingSuccess, NSRemoteNotificationType, + NSModalResponseContinue, NSModalResponseStop, NSModalSession, NSPrintingCancelled, + NSPrintingFailure, NSPrintingReplyLater, NSPrintingSuccess, NSRemoteNotificationType, NSRemoteNotificationTypeAlert, NSRemoteNotificationTypeBadge, NSRemoteNotificationTypeNone, NSRemoteNotificationTypeSound, NSRequestUserAttentionType, NSRunAbortedResponse, NSRunContinuesResponse, NSRunStoppedResponse, NSServiceProviderName, @@ -761,17 +762,20 @@ mod __exported { NSCollectionLayoutAnchor, NSCollectionLayoutBoundarySupplementaryItem, NSCollectionLayoutContainer, NSCollectionLayoutDecorationItem, NSCollectionLayoutDimension, NSCollectionLayoutEdgeSpacing, NSCollectionLayoutEnvironment, NSCollectionLayoutGroup, - NSCollectionLayoutGroupCustomItem, NSCollectionLayoutItem, NSCollectionLayoutSection, + NSCollectionLayoutGroupCustomItem, NSCollectionLayoutGroupCustomItemProvider, + NSCollectionLayoutItem, NSCollectionLayoutSection, NSCollectionLayoutSectionOrthogonalScrollingBehavior, NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuous, NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary, NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging, NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered, NSCollectionLayoutSectionOrthogonalScrollingBehaviorNone, - NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging, NSCollectionLayoutSize, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging, + NSCollectionLayoutSectionVisibleItemsInvalidationHandler, NSCollectionLayoutSize, NSCollectionLayoutSpacing, NSCollectionLayoutSupplementaryItem, NSCollectionLayoutVisibleItem, NSCollectionViewCompositionalLayout, - NSCollectionViewCompositionalLayoutConfiguration, NSDirectionalEdgeInsets, + NSCollectionViewCompositionalLayoutConfiguration, + NSCollectionViewCompositionalLayoutSectionProvider, NSDirectionalEdgeInsets, NSDirectionalEdgeInsetsZero, NSDirectionalRectEdge, NSDirectionalRectEdgeAll, NSDirectionalRectEdgeBottom, NSDirectionalRectEdgeLeading, NSDirectionalRectEdgeNone, NSDirectionalRectEdgeTop, NSDirectionalRectEdgeTrailing, NSRectAlignment, @@ -866,7 +870,8 @@ mod __exported { NSDictionaryController, NSDictionaryControllerKeyValuePair, }; pub use super::NSDiffableDataSource::{ - NSCollectionViewDiffableDataSource, NSDiffableDataSourceSnapshot, + NSCollectionViewDiffableDataSource, NSCollectionViewDiffableDataSourceItemProvider, + NSCollectionViewDiffableDataSourceSupplementaryViewProvider, NSDiffableDataSourceSnapshot, }; pub use super::NSDockTile::{ NSAppKitVersionNumberWithDockTilePlugInSupport, NSDockTile, NSDockTilePlugIn, @@ -1004,7 +1009,7 @@ mod __exported { NSAntialiasThresholdChangedNotification, NSControlGlyph, NSFont, NSFontAntialiasedIntegerAdvancementsRenderingMode, NSFontAntialiasedRenderingMode, NSFontDefaultRenderingMode, NSFontIdentityMatrix, NSFontIntegerAdvancementsRenderingMode, - NSFontRenderingMode, NSFontSetChangedNotification, NSMultibyteGlyphPacking, + NSFontRenderingMode, NSFontSetChangedNotification, NSGlyph, NSMultibyteGlyphPacking, NSNativeShortGlyphPacking, NSNullGlyph, }; pub use super::NSFontAssetRequest::{ @@ -1332,7 +1337,7 @@ mod __exported { NSLayoutFormatAlignAllTop, NSLayoutFormatAlignAllTrailing, NSLayoutFormatAlignmentMask, NSLayoutFormatDirectionLeadingToTrailing, NSLayoutFormatDirectionLeftToRight, NSLayoutFormatDirectionMask, NSLayoutFormatDirectionRightToLeft, NSLayoutFormatOptions, - NSLayoutPriorityDefaultHigh, NSLayoutPriorityDefaultLow, + NSLayoutPriority, NSLayoutPriorityDefaultHigh, NSLayoutPriorityDefaultLow, NSLayoutPriorityDragThatCanResizeWindow, NSLayoutPriorityDragThatCannotResizeWindow, NSLayoutPriorityFittingSizeCompression, NSLayoutPriorityRequired, NSLayoutPriorityWindowSizeStayPut, NSLayoutRelation, NSLayoutRelationEqual, @@ -1756,8 +1761,9 @@ mod __exported { NSStackViewDistributionFillProportionally, NSStackViewDistributionGravityAreas, NSStackViewGravity, NSStackViewGravityBottom, NSStackViewGravityCenter, NSStackViewGravityLeading, NSStackViewGravityTop, NSStackViewGravityTrailing, - NSStackViewSpacingUseDefault, NSStackViewVisibilityPriorityDetachOnlyIfNecessary, - NSStackViewVisibilityPriorityMustHold, NSStackViewVisibilityPriorityNotVisible, + NSStackViewSpacingUseDefault, NSStackViewVisibilityPriority, + NSStackViewVisibilityPriorityDetachOnlyIfNecessary, NSStackViewVisibilityPriorityMustHold, + NSStackViewVisibilityPriorityNotVisible, }; pub use super::NSStatusBar::{ NSSquareStatusItemLength, NSStatusBar, NSVariableStatusItemLength, @@ -1770,7 +1776,9 @@ mod __exported { pub use super::NSStepper::NSStepper; pub use super::NSStepperCell::NSStepperCell; pub use super::NSStepperTouchBarItem::NSStepperTouchBarItem; - pub use super::NSStoryboard::{NSStoryboard, NSStoryboardName, NSStoryboardSceneIdentifier}; + pub use super::NSStoryboard::{ + NSStoryboard, NSStoryboardControllerCreator, NSStoryboardName, NSStoryboardSceneIdentifier, + }; pub use super::NSStoryboardSegue::{ NSSeguePerforming, NSStoryboardSegue, NSStoryboardSegueIdentifier, }; @@ -1833,7 +1841,11 @@ mod __exported { NSTableViewStyleInset, NSTableViewStylePlain, NSTableViewStyleSourceList, NSTableViewUniformColumnAutoresizingStyle, }; - pub use super::NSTableViewDiffableDataSource::NSTableViewDiffableDataSource; + pub use super::NSTableViewDiffableDataSource::{ + NSTableViewDiffableDataSource, NSTableViewDiffableDataSourceCellProvider, + NSTableViewDiffableDataSourceRowProvider, + NSTableViewDiffableDataSourceSectionHeaderViewProvider, + }; pub use super::NSTableViewRowAction::{ NSTableViewRowAction, NSTableViewRowActionStyle, NSTableViewRowActionStyleDestructive, NSTableViewRowActionStyleRegular, @@ -2049,8 +2061,8 @@ mod __exported { pub use super::NSTouchBarItem::{ NSTouchBarItem, NSTouchBarItemIdentifier, NSTouchBarItemIdentifierFixedSpaceLarge, NSTouchBarItemIdentifierFixedSpaceSmall, NSTouchBarItemIdentifierFlexibleSpace, - NSTouchBarItemIdentifierOtherItemsProxy, NSTouchBarItemPriorityHigh, - NSTouchBarItemPriorityLow, NSTouchBarItemPriorityNormal, + NSTouchBarItemIdentifierOtherItemsProxy, NSTouchBarItemPriority, + NSTouchBarItemPriorityHigh, NSTouchBarItemPriorityLow, NSTouchBarItemPriorityNormal, }; pub use super::NSTrackingArea::{ NSTrackingActiveAlways, NSTrackingActiveInActiveApp, NSTrackingActiveInKeyWindow, diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index 8f79a3c9b..3d69f43dc 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -3,6 +3,8 @@ use crate::common::*; use crate::Foundation::*; +pub type NSAppleEventManagerSuspensionID = *mut c_void; + extern "C" { pub static NSAppleEventTimeOutDefault: c_double; } diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 714b28666..473e59164 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -7,6 +7,8 @@ pub type NSBackgroundActivityResult = NSInteger; pub const NSBackgroundActivityResultFinished: NSBackgroundActivityResult = 1; pub const NSBackgroundActivityResultDeferred: NSBackgroundActivityResult = 2; +pub type NSBackgroundActivityCompletionHandler = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSBackgroundActivityScheduler; diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index ad12b2886..5f9441091 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -7,6 +7,8 @@ extern "C" { pub static NSSystemClockDidChangeNotification: &'static NSNotificationName; } +pub type NSTimeInterval = c_double; + extern_class!( #[derive(Debug)] pub struct NSDate; diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index ba3ee2899..ad7d895d7 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -121,6 +121,8 @@ extern_methods!( } ); +pub type NSUncaughtExceptionHandler = TodoFunction; + extern "C" { pub static NSAssertionHandlerKey: &'static NSString; } diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 455c421a4..9950401dc 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -5,10 +5,22 @@ use crate::Foundation::*; pub type NSPoint = CGPoint; +pub type NSPointPointer = *mut NSPoint; + +pub type NSPointArray = *mut NSPoint; + pub type NSSize = CGSize; +pub type NSSizePointer = *mut NSSize; + +pub type NSSizeArray = *mut NSSize; + pub type NSRect = CGRect; +pub type NSRectPointer = *mut NSRect; + +pub type NSRectArray = *mut NSRect; + pub type NSRectEdge = NSUInteger; pub const NSRectEdgeMinX: NSRectEdge = CGRectMinXEdge; pub const NSRectEdgeMinY: NSRectEdge = CGRectMinYEdge; diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 03c789d6f..65d562966 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -17,6 +17,10 @@ pub type NSItemProviderWriting = NSObject; pub type NSItemProviderReading = NSObject; +pub type NSItemProviderCompletionHandler = TodoBlock; + +pub type NSItemProviderLoadHandler = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSItemProvider; diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 5222caad3..6ff2559f1 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -16,6 +16,8 @@ pub const NSOrderedAscending: NSComparisonResult = -1; pub const NSOrderedSame: NSComparisonResult = 0; pub const NSOrderedDescending: NSComparisonResult = 1; +pub type NSComparator = TodoBlock; + pub type NSEnumerationOptions = NSUInteger; pub const NSEnumerationConcurrent: NSEnumerationOptions = 1 << 0; pub const NSEnumerationReverse: NSEnumerationOptions = 1 << 1; diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index aa27517b7..28206dbab 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -3,6 +3,8 @@ use crate::common::*; use crate::Foundation::*; +pub type NSSocketNativeHandle = c_int; + extern "C" { pub static NSPortDidBecomeInvalidNotification: &'static NSNotificationName; } diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 83cb30777..e6acf9228 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -9,6 +9,10 @@ pub type NSProgressUserInfoKey = NSString; pub type NSProgressFileOperationKind = NSString; +pub type NSProgressUnpublishingHandler = TodoBlock; + +pub type NSProgressPublishingHandler = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSProgress; diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index 2abc4e5de..c5e0d6548 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -10,6 +10,8 @@ struct_impl!( } ); +pub type NSRangePointer = *mut NSRange; + extern_methods!( /// NSValueRangeExtensions unsafe impl NSValue { diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 4dcfbb0d4..c02839460 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -3,6 +3,8 @@ use crate::common::*; use crate::Foundation::*; +pub type unichar = c_ushort; + pub type NSStringCompareOptions = NSUInteger; pub const NSCaseInsensitiveSearch: NSStringCompareOptions = 1; pub const NSLiteralSearch: NSStringCompareOptions = 2; diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index a03f9a1c5..dcede4b13 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -3,6 +3,8 @@ use crate::common::*; use crate::Foundation::*; +pub type NSUserScriptTaskCompletionHandler = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSUserScriptTask; @@ -31,6 +33,8 @@ extern_methods!( } ); +pub type NSUserUnixTaskCompletionHandler = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSUserUnixTask; @@ -69,6 +73,8 @@ extern_methods!( } ); +pub type NSUserAppleScriptTaskCompletionHandler = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSUserAppleScriptTask; @@ -89,6 +95,8 @@ extern_methods!( } ); +pub type NSUserAutomatorTaskCompletionHandler = TodoBlock; + extern_class!( #[derive(Debug)] pub struct NSUserAutomatorTask; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index d8c764deb..2ec3c8e6a 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -210,8 +210,9 @@ mod __exported { NSAppleEventSendQueueReply, NSAppleEventSendWaitForReply, }; pub use super::NSAppleEventManager::{ - NSAppleEventManager, NSAppleEventManagerWillProcessFirstEventNotification, - NSAppleEventTimeOutDefault, NSAppleEventTimeOutNone, + NSAppleEventManager, NSAppleEventManagerSuspensionID, + NSAppleEventManagerWillProcessFirstEventNotification, NSAppleEventTimeOutDefault, + NSAppleEventTimeOutNone, }; pub use super::NSAppleScript::{ NSAppleScript, NSAppleScriptErrorAppName, NSAppleScriptErrorBriefMessage, @@ -257,8 +258,9 @@ mod __exported { }; pub use super::NSAutoreleasePool::NSAutoreleasePool; pub use super::NSBackgroundActivityScheduler::{ - NSBackgroundActivityResult, NSBackgroundActivityResultDeferred, - NSBackgroundActivityResultFinished, NSBackgroundActivityScheduler, + NSBackgroundActivityCompletionHandler, NSBackgroundActivityResult, + NSBackgroundActivityResultDeferred, NSBackgroundActivityResultFinished, + NSBackgroundActivityScheduler, }; pub use super::NSBundle::{ NSBundle, NSBundleDidLoadNotification, NSBundleExecutableArchitectureARM64, @@ -353,7 +355,7 @@ mod __exported { NSDataWritingWithoutOverwriting, NSMappedRead, NSMutableData, NSPurgeableData, NSUncachedRead, }; - pub use super::NSDate::{NSDate, NSSystemClockDidChangeNotification}; + pub use super::NSDate::{NSDate, NSSystemClockDidChangeNotification, NSTimeInterval}; pub use super::NSDateComponentsFormatter::{ NSDateComponentsFormatter, NSDateComponentsFormatterUnitsStyle, NSDateComponentsFormatterUnitsStyleAbbreviated, NSDateComponentsFormatterUnitsStyleBrief, @@ -424,7 +426,7 @@ mod __exported { NSInvalidArgumentException, NSInvalidReceivePortException, NSInvalidSendPortException, NSMallocException, NSObjectInaccessibleException, NSObjectNotAvailableException, NSOldStyleException, NSPortReceiveException, NSPortSendException, NSPortTimeoutException, - NSRangeException, + NSRangeException, NSUncaughtExceptionHandler, }; pub use super::NSExpression::{ NSAggregateExpressionType, NSAnyKeyExpressionType, NSBlockExpressionType, @@ -510,8 +512,9 @@ mod __exported { NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsets, - NSEdgeInsetsZero, NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSRect, - NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, NSSize, + NSEdgeInsetsZero, NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSPointArray, + NSPointPointer, NSRect, NSRectArray, NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, + NSRectEdgeMinX, NSRectEdgeMinY, NSRectPointer, NSSize, NSSizeArray, NSSizePointer, NSZeroPoint, NSZeroRect, NSZeroSize, }; pub use super::NSHTTPCookie::{ @@ -552,11 +555,12 @@ mod __exported { pub use super::NSInvocation::NSInvocation; pub use super::NSItemProvider::{ NSExtensionJavaScriptFinalizeArgumentKey, NSExtensionJavaScriptPreprocessingResultsKey, - NSItemProvider, NSItemProviderErrorCode, NSItemProviderErrorDomain, - NSItemProviderFileOptionOpenInPlace, NSItemProviderFileOptions, - NSItemProviderItemUnavailableError, NSItemProviderPreferredImageSizeKey, - NSItemProviderReading, NSItemProviderRepresentationVisibility, - NSItemProviderRepresentationVisibilityAll, NSItemProviderRepresentationVisibilityGroup, + NSItemProvider, NSItemProviderCompletionHandler, NSItemProviderErrorCode, + NSItemProviderErrorDomain, NSItemProviderFileOptionOpenInPlace, NSItemProviderFileOptions, + NSItemProviderItemUnavailableError, NSItemProviderLoadHandler, + NSItemProviderPreferredImageSizeKey, NSItemProviderReading, + NSItemProviderRepresentationVisibility, NSItemProviderRepresentationVisibilityAll, + NSItemProviderRepresentationVisibilityGroup, NSItemProviderRepresentationVisibilityOwnProcess, NSItemProviderRepresentationVisibilityTeam, NSItemProviderUnavailableCoercionError, NSItemProviderUnexpectedValueClassError, NSItemProviderUnknownError, NSItemProviderWriting, @@ -802,10 +806,10 @@ mod __exported { NSNumberFormatterSpellOutStyle, NSNumberFormatterStyle, }; pub use super::NSObjCRuntime::{ - NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, NSEnumerationReverse, - NSExceptionName, NSFoundationVersionNumber, NSNotFound, NSOrderedAscending, - NSOrderedDescending, NSOrderedSame, NSQualityOfService, NSQualityOfServiceBackground, - NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, + NSComparator, NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, + NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, NSNotFound, + NSOrderedAscending, NSOrderedDescending, NSOrderedSame, NSQualityOfService, + NSQualityOfServiceBackground, NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, NSSortOptions, NSSortStable, }; @@ -868,7 +872,8 @@ mod __exported { pub use super::NSPort::{ NSMachPort, NSMachPortDeallocateNone, NSMachPortDeallocateReceiveRight, NSMachPortDeallocateSendRight, NSMachPortDelegate, NSMachPortOptions, NSMessagePort, - NSPort, NSPortDelegate, NSPortDidBecomeInvalidNotification, NSSocketPort, + NSPort, NSPortDelegate, NSPortDidBecomeInvalidNotification, NSSocketNativeHandle, + NSSocketPort, }; pub use super::NSPortCoder::NSPortCoder; pub use super::NSPortMessage::NSPortMessage; @@ -897,8 +902,8 @@ mod __exported { NSProgressFileOperationKindDownloading, NSProgressFileOperationKindDuplicating, NSProgressFileOperationKindKey, NSProgressFileOperationKindReceiving, NSProgressFileOperationKindUploading, NSProgressFileTotalCountKey, NSProgressFileURLKey, - NSProgressKind, NSProgressKindFile, NSProgressReporting, NSProgressThroughputKey, - NSProgressUserInfoKey, + NSProgressKind, NSProgressKindFile, NSProgressPublishingHandler, NSProgressReporting, + NSProgressThroughputKey, NSProgressUnpublishingHandler, NSProgressUserInfoKey, }; pub use super::NSPropertyList::{ NSPropertyListBinaryFormat_v1_0, NSPropertyListFormat, NSPropertyListImmutable, @@ -908,7 +913,7 @@ mod __exported { NSPropertyListXMLFormat_v1_0, }; pub use super::NSProtocolChecker::NSProtocolChecker; - pub use super::NSRange::NSRange; + pub use super::NSRange::{NSRange, NSRangePointer}; pub use super::NSRegularExpression::{ NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, @@ -990,11 +995,11 @@ mod __exported { NSStreamStatusOpen, NSStreamStatusOpening, NSStreamStatusReading, NSStreamStatusWriting, }; pub use super::NSString::{ - NSASCIIStringEncoding, NSAnchoredSearch, NSBackwardsSearch, NSCaseInsensitiveSearch, - NSCharacterConversionException, NSConstantString, NSDiacriticInsensitiveSearch, - NSForcedOrderingSearch, NSISO2022JPStringEncoding, NSISOLatin1StringEncoding, - NSISOLatin2StringEncoding, NSJapaneseEUCStringEncoding, NSLiteralSearch, - NSMacOSRomanStringEncoding, NSMutableString, NSNEXTSTEPStringEncoding, + unichar, NSASCIIStringEncoding, NSAnchoredSearch, NSBackwardsSearch, + NSCaseInsensitiveSearch, NSCharacterConversionException, NSConstantString, + NSDiacriticInsensitiveSearch, NSForcedOrderingSearch, NSISO2022JPStringEncoding, + NSISOLatin1StringEncoding, NSISOLatin2StringEncoding, NSJapaneseEUCStringEncoding, + NSLiteralSearch, NSMacOSRomanStringEncoding, NSMutableString, NSNEXTSTEPStringEncoding, NSNonLossyASCIIStringEncoding, NSNumericSearch, NSParseErrorException, NSProprietaryStringEncoding, NSRegularExpressionSearch, NSShiftJISStringEncoding, NSSimpleCString, NSString, NSStringCompareOptions, NSStringEncoding, @@ -1231,7 +1236,9 @@ mod __exported { NSUserNotificationCenterDelegate, NSUserNotificationDefaultSoundName, }; pub use super::NSUserScriptTask::{ - NSUserAppleScriptTask, NSUserAutomatorTask, NSUserScriptTask, NSUserUnixTask, + NSUserAppleScriptTask, NSUserAppleScriptTaskCompletionHandler, NSUserAutomatorTask, + NSUserAutomatorTaskCompletionHandler, NSUserScriptTask, NSUserScriptTaskCompletionHandler, + NSUserUnixTask, NSUserUnixTaskCompletionHandler, }; pub use super::NSValue::{NSNumber, NSValue}; pub use super::NSValueTransformer::{ From 67f7efde7a7f1408d50ae5a998d68997f928731e Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 04:15:23 +0100 Subject: [PATCH 109/131] Fix Option and *mut bool --- crates/header-translator/src/rust_type.rs | 11 ++++++++- .../src/generated/AppKit/NSATSTypesetter.rs | 2 +- .../AppKit/NSAccessibilityCustomAction.rs | 4 ++-- .../src/generated/AppKit/NSActionCell.rs | 4 ++-- crates/icrate/src/generated/AppKit/NSAlert.rs | 2 +- .../src/generated/AppKit/NSApplication.rs | 2 +- .../icrate/src/generated/AppKit/NSBrowser.rs | 4 ++-- .../icrate/src/generated/AppKit/NSButton.rs | 10 ++++---- .../generated/AppKit/NSButtonTouchBarItem.rs | 10 ++++---- crates/icrate/src/generated/AppKit/NSCell.rs | 4 ++-- .../src/generated/AppKit/NSColorPanel.rs | 2 +- .../AppKit/NSColorPickerTouchBarItem.rs | 4 ++-- .../icrate/src/generated/AppKit/NSControl.rs | 6 ++--- .../src/generated/AppKit/NSController.rs | 2 +- .../src/generated/AppKit/NSCustomImageRep.rs | 2 +- .../icrate/src/generated/AppKit/NSDocument.rs | 24 +++++++++---------- .../generated/AppKit/NSDocumentController.rs | 6 ++--- .../generated/AppKit/NSGestureRecognizer.rs | 6 ++--- .../src/generated/AppKit/NSKeyValueBinding.rs | 2 +- .../src/generated/AppKit/NSLayoutManager.rs | 8 +++---- .../icrate/src/generated/AppKit/NSMatrix.rs | 4 ++-- crates/icrate/src/generated/AppKit/NSMenu.rs | 6 ++--- .../icrate/src/generated/AppKit/NSMenuItem.rs | 6 ++--- .../src/generated/AppKit/NSOpenPanel.rs | 4 ++-- .../src/generated/AppKit/NSPageLayout.rs | 2 +- .../icrate/src/generated/AppKit/NSPathCell.rs | 4 ++-- .../src/generated/AppKit/NSPathControl.rs | 4 ++-- .../generated/AppKit/NSPickerTouchBarItem.rs | 8 +++---- .../src/generated/AppKit/NSPopUpButton.rs | 2 +- .../src/generated/AppKit/NSPopUpButtonCell.rs | 2 +- .../src/generated/AppKit/NSPrintOperation.rs | 2 +- .../src/generated/AppKit/NSPrintPanel.rs | 2 +- .../src/generated/AppKit/NSResponder.rs | 2 +- .../src/generated/AppKit/NSSavePanel.rs | 2 +- .../generated/AppKit/NSSegmentedControl.rs | 4 ++-- .../icrate/src/generated/AppKit/NSSlider.rs | 4 ++-- .../generated/AppKit/NSSliderTouchBarItem.rs | 4 ++-- .../src/generated/AppKit/NSStatusItem.rs | 8 +++---- .../generated/AppKit/NSStepperTouchBarItem.rs | 4 ++-- .../src/generated/AppKit/NSTableView.rs | 4 ++-- .../src/generated/AppKit/NSToolbarItem.rs | 4 ++-- .../generated/AppKit/NSToolbarItemGroup.rs | 4 ++-- .../src/generated/AppKit/NSTypesetter.rs | 2 +- .../src/generated/AppKit/NSViewController.rs | 2 +- .../src/generated/AppKit/NSWorkspace.rs | 6 ++--- .../Foundation/NSComparisonPredicate.rs | 2 +- .../src/generated/Foundation/NSError.rs | 2 +- .../src/generated/Foundation/NSFileManager.rs | 2 +- .../Foundation/NSScriptClassDescription.rs | 2 +- .../generated/Foundation/NSSortDescriptor.rs | 6 ++--- .../src/generated/Foundation/NSString.rs | 2 +- .../icrate/src/generated/Foundation/NSURL.rs | 4 ++-- crates/icrate/src/lib.rs | 8 ++++++- 53 files changed, 127 insertions(+), 112 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index d5b3e6773..e9a8eeb4c 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -696,7 +696,7 @@ impl fmt::Display for RustType { if *nullability == Nullability::NonNull { write!(f, "Sel") } else { - write!(f, "Option") + write!(f, "OptionSel") } } ObjcBool => write!(f, "bool"), @@ -753,6 +753,15 @@ impl fmt::Display for RustType { Self::Id { .. } => { unreachable!("there should be no id with other values: {self:?}") } + Self::ObjcBool => { + if *nullability == Nullability::NonNull { + write!(f, "NonNull") + } else if *is_const { + write!(f, "*const Bool") + } else { + write!(f, "*mut Bool") + } + } pointee => { if *nullability == Nullability::NonNull { write!(f, "NonNull<{pointee}>") diff --git a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs index e3e93211d..69fa60b38 100644 --- a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs @@ -194,7 +194,7 @@ extern_methods!( glyphBuffer: *mut NSGlyph, charIndexBuffer: *mut NSUInteger, inscribeBuffer: *mut NSGlyphInscription, - elasticBuffer: *mut bool, + elasticBuffer: *mut Bool, ) -> NSUInteger; } ); diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs index 2b536b11f..be2aac4c1 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs @@ -49,9 +49,9 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&NSObject>); #[method(selector)] - pub unsafe fn selector(&self) -> Option; + pub unsafe fn selector(&self) -> OptionSel; #[method(setSelector:)] - pub unsafe fn setSelector(&self, selector: Option); + pub unsafe fn setSelector(&self, selector: OptionSel); } ); diff --git a/crates/icrate/src/generated/AppKit/NSActionCell.rs b/crates/icrate/src/generated/AppKit/NSActionCell.rs index 15c0116eb..19d32d8b0 100644 --- a/crates/icrate/src/generated/AppKit/NSActionCell.rs +++ b/crates/icrate/src/generated/AppKit/NSActionCell.rs @@ -22,10 +22,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index 6f586d61e..25ecd1b6b 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -120,7 +120,7 @@ extern_methods!( &self, window: &NSWindow, delegate: Option<&Object>, - didEndSelector: Option, + didEndSelector: OptionSel, contextInfo: *mut c_void, ); } diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 83ba9acdc..b796ea873 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -753,7 +753,7 @@ extern_methods!( sheet: &NSWindow, docWindow: &NSWindow, modalDelegate: Option<&Object>, - didEndSelector: Option, + didEndSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index 8a9aacf8b..0304fd772 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -40,10 +40,10 @@ extern_methods!( pub unsafe fn isLoaded(&self) -> bool; #[method(doubleAction)] - pub unsafe fn doubleAction(&self) -> Option; + pub unsafe fn doubleAction(&self) -> OptionSel; #[method(setDoubleAction:)] - pub unsafe fn setDoubleAction(&self, doubleAction: Option); + pub unsafe fn setDoubleAction(&self, doubleAction: OptionSel); #[method(setCellClass:)] pub unsafe fn setCellClass(&self, factoryId: &Class); diff --git a/crates/icrate/src/generated/AppKit/NSButton.rs b/crates/icrate/src/generated/AppKit/NSButton.rs index 47aac06b9..47b0e67b8 100644 --- a/crates/icrate/src/generated/AppKit/NSButton.rs +++ b/crates/icrate/src/generated/AppKit/NSButton.rs @@ -20,35 +20,35 @@ extern_methods!( title: &NSString, image: &NSImage, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other buttonWithTitle:target:action:)] pub unsafe fn buttonWithTitle_target_action( title: &NSString, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other buttonWithImage:target:action:)] pub unsafe fn buttonWithImage_target_action( image: &NSImage, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other checkboxWithTitle:target:action:)] pub unsafe fn checkboxWithTitle_target_action( title: &NSString, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other radioButtonWithTitle:target:action:)] pub unsafe fn radioButtonWithTitle_target_action( title: &NSString, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method(setButtonType:)] diff --git a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs index 5eaf2732a..a2616c3e0 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs @@ -20,7 +20,7 @@ extern_methods!( identifier: &NSTouchBarItemIdentifier, title: &NSString, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other buttonTouchBarItemWithIdentifier:image:target:action:)] @@ -28,7 +28,7 @@ extern_methods!( identifier: &NSTouchBarItemIdentifier, image: &NSImage, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other buttonTouchBarItemWithIdentifier:title:image:target:action:)] @@ -37,7 +37,7 @@ extern_methods!( title: &NSString, image: &NSImage, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other title)] @@ -65,10 +65,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index 5a54f3d0e..346a165d9 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -135,10 +135,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index 620d8c27f..5d52a7e62 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -90,7 +90,7 @@ extern_methods!( pub unsafe fn alpha(&self) -> CGFloat; #[method(setAction:)] - pub unsafe fn setAction(&self, selector: Option); + pub unsafe fn setAction(&self, selector: OptionSel); #[method(setTarget:)] pub unsafe fn setTarget(&self, target: Option<&Object>); diff --git a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs index 9f97c39b3..42000183c 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs @@ -76,10 +76,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index 30d1bbca4..5757674c0 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -34,10 +34,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; @@ -139,7 +139,7 @@ extern_methods!( pub unsafe fn sendActionOn(&self, mask: NSEventMask) -> NSInteger; #[method(sendAction:to:)] - pub unsafe fn sendAction_to(&self, action: Option, target: Option<&Object>) -> bool; + pub unsafe fn sendAction_to(&self, action: OptionSel, target: Option<&Object>) -> bool; #[method(takeIntValueFrom:)] pub unsafe fn takeIntValueFrom(&self, sender: Option<&Object>); diff --git a/crates/icrate/src/generated/AppKit/NSController.rs b/crates/icrate/src/generated/AppKit/NSController.rs index 4eb29a662..3e1ed8c55 100644 --- a/crates/icrate/src/generated/AppKit/NSController.rs +++ b/crates/icrate/src/generated/AppKit/NSController.rs @@ -40,7 +40,7 @@ extern_methods!( pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( &self, delegate: Option<&Object>, - didCommitSelector: Option, + didCommitSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs index c6d972325..3677c8903 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs @@ -34,7 +34,7 @@ extern_methods!( ) -> Id; #[method(drawSelector)] - pub unsafe fn drawSelector(&self) -> Option; + pub unsafe fn drawSelector(&self) -> OptionSel; #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index 4c43dfab0..7f693a1f0 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -207,7 +207,7 @@ extern_methods!( pub unsafe fn saveDocumentWithDelegate_didSaveSelector_contextInfo( &self, delegate: Option<&Object>, - didSaveSelector: Option, + didSaveSelector: OptionSel, contextInfo: *mut c_void, ); @@ -216,7 +216,7 @@ extern_methods!( &self, saveOperation: NSSaveOperationType, delegate: Option<&Object>, - didSaveSelector: Option, + didSaveSelector: OptionSel, contextInfo: *mut c_void, ); @@ -239,7 +239,7 @@ extern_methods!( typeName: &NSString, saveOperation: NSSaveOperationType, delegate: Option<&Object>, - didSaveSelector: Option, + didSaveSelector: OptionSel, contextInfo: *mut c_void, ); @@ -274,7 +274,7 @@ extern_methods!( pub unsafe fn autosaveDocumentWithDelegate_didAutosaveSelector_contextInfo( &self, delegate: Option<&Object>, - didAutosaveSelector: Option, + didAutosaveSelector: OptionSel, contextInfo: *mut c_void, ); @@ -319,7 +319,7 @@ extern_methods!( pub unsafe fn canCloseDocumentWithDelegate_shouldCloseSelector_contextInfo( &self, delegate: &Object, - shouldCloseSelector: Option, + shouldCloseSelector: OptionSel, contextInfo: *mut c_void, ); @@ -333,7 +333,7 @@ extern_methods!( pub unsafe fn duplicateDocumentWithDelegate_didDuplicateSelector_contextInfo( &self, delegate: Option<&Object>, - didDuplicateSelector: Option, + didDuplicateSelector: OptionSel, contextInfo: *mut c_void, ); @@ -386,7 +386,7 @@ extern_methods!( &self, printInfo: &NSPrintInfo, delegate: Option<&Object>, - didRunSelector: Option, + didRunSelector: OptionSel, contextInfo: *mut c_void, ); @@ -411,7 +411,7 @@ extern_methods!( printSettings: &NSDictionary, showPrintPanel: bool, delegate: Option<&Object>, - didPrintSelector: Option, + didPrintSelector: OptionSel, contextInfo: *mut c_void, ); @@ -426,7 +426,7 @@ extern_methods!( &self, printOperation: &NSPrintOperation, delegate: Option<&Object>, - didRunSelector: Option, + didRunSelector: OptionSel, contextInfo: *mut c_void, ); @@ -492,7 +492,7 @@ extern_methods!( error: &NSError, window: &NSWindow, delegate: Option<&Object>, - didPresentSelector: Option, + didPresentSelector: OptionSel, contextInfo: *mut c_void, ); @@ -537,7 +537,7 @@ extern_methods!( &self, windowController: &NSWindowController, delegate: Option<&Object>, - shouldCloseSelector: Option, + shouldCloseSelector: OptionSel, contextInfo: *mut c_void, ); @@ -671,7 +671,7 @@ extern_methods!( fileName: &NSString, saveOperation: NSSaveOperationType, delegate: Option<&Object>, - didSaveSelector: Option, + didSaveSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSDocumentController.rs b/crates/icrate/src/generated/AppKit/NSDocumentController.rs index acf0b9ae1..cd243bcd6 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentController.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentController.rs @@ -138,7 +138,7 @@ extern_methods!( title: Option<&NSString>, cancellable: bool, delegate: Option<&Object>, - didReviewAllSelector: Option, + didReviewAllSelector: OptionSel, contextInfo: *mut c_void, ); @@ -146,7 +146,7 @@ extern_methods!( pub unsafe fn closeAllDocumentsWithDelegate_didCloseAllSelector_contextInfo( &self, delegate: Option<&Object>, - didCloseAllSelector: Option, + didCloseAllSelector: OptionSel, contextInfo: *mut c_void, ); @@ -170,7 +170,7 @@ extern_methods!( error: &NSError, window: &NSWindow, delegate: Option<&Object>, - didPresentSelector: Option, + didPresentSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index 496e673eb..54806ee32 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -29,7 +29,7 @@ extern_methods!( pub unsafe fn initWithTarget_action( this: Option>, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Init initWithCoder:)] @@ -45,10 +45,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method(state)] pub unsafe fn state(&self) -> NSGestureRecognizerState; diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index 639c3c182..bbc367aa8 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -150,7 +150,7 @@ extern_methods!( pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( &self, delegate: Option<&Object>, - didCommitSelector: Option, + didCommitSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index 1bdab2953..2acb5381d 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -225,7 +225,7 @@ extern_methods!( pub unsafe fn CGGlyphAtIndex_isValidIndex( &self, glyphIndex: NSUInteger, - isValidIndex: *mut bool, + isValidIndex: *mut Bool, ) -> CGGlyph; #[method(CGGlyphAtIndex:)] @@ -747,7 +747,7 @@ extern_methods!( pub unsafe fn glyphAtIndex_isValidIndex( &self, glyphIndex: NSUInteger, - isValidIndex: *mut bool, + isValidIndex: *mut Bool, ) -> NSGlyph; #[method(glyphAtIndex:)] @@ -839,7 +839,7 @@ extern_methods!( glyphBuffer: *mut NSGlyph, charIndexBuffer: *mut NSUInteger, inscribeBuffer: *mut NSGlyphInscription, - elasticBuffer: *mut bool, + elasticBuffer: *mut Bool, ) -> NSUInteger; #[method(getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)] @@ -849,7 +849,7 @@ extern_methods!( glyphBuffer: *mut NSGlyph, charIndexBuffer: *mut NSUInteger, inscribeBuffer: *mut NSGlyphInscription, - elasticBuffer: *mut bool, + elasticBuffer: *mut Bool, bidiLevelBuffer: *mut c_uchar, ) -> NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index 4141ec88c..0bb139006 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -270,10 +270,10 @@ extern_methods!( pub unsafe fn cellWithTag(&self, tag: NSInteger) -> Option>; #[method(doubleAction)] - pub unsafe fn doubleAction(&self) -> Option; + pub unsafe fn doubleAction(&self) -> OptionSel; #[method(setDoubleAction:)] - pub unsafe fn setDoubleAction(&self, doubleAction: Option); + pub unsafe fn setDoubleAction(&self, doubleAction: OptionSel); #[method(autosizesCells)] pub unsafe fn autosizesCells(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 81aa4b660..7745934ce 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -78,7 +78,7 @@ extern_methods!( pub unsafe fn insertItemWithTitle_action_keyEquivalent_atIndex( &self, string: &NSString, - selector: Option, + selector: OptionSel, charCode: &NSString, index: NSInteger, ) -> Id; @@ -87,7 +87,7 @@ extern_methods!( pub unsafe fn addItemWithTitle_action_keyEquivalent( &self, string: &NSString, - selector: Option, + selector: OptionSel, charCode: &NSString, ) -> Id; @@ -135,7 +135,7 @@ extern_methods!( pub unsafe fn indexOfItemWithTarget_andAction( &self, target: Option<&Object>, - actionSelector: Option, + actionSelector: OptionSel, ) -> NSInteger; #[method_id(@__retain_semantics Other itemWithTitle:)] diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs index ed14cd43b..71968d20e 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -28,7 +28,7 @@ extern_methods!( pub unsafe fn initWithTitle_action_keyEquivalent( this: Option>, string: &NSString, - selector: Option, + selector: OptionSel, charCode: &NSString, ) -> Id; @@ -168,10 +168,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method(tag)] pub unsafe fn tag(&self) -> NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs index a8cd54df8..1c79a67b0 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs @@ -79,7 +79,7 @@ extern_methods!( fileTypes: Option<&NSArray>, docWindow: Option<&NSWindow>, delegate: Option<&Object>, - didEndSelector: Option, + didEndSelector: OptionSel, contextInfo: *mut c_void, ); @@ -90,7 +90,7 @@ extern_methods!( name: Option<&NSString>, fileTypes: Option<&NSArray>, delegate: Option<&Object>, - didEndSelector: Option, + didEndSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSPageLayout.rs b/crates/icrate/src/generated/AppKit/NSPageLayout.rs index 29834bab7..934d2d3b9 100644 --- a/crates/icrate/src/generated/AppKit/NSPageLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSPageLayout.rs @@ -33,7 +33,7 @@ extern_methods!( printInfo: &NSPrintInfo, docWindow: &NSWindow, delegate: Option<&Object>, - didEndSelector: Option, + didEndSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs index c59db1af6..110105376 100644 --- a/crates/icrate/src/generated/AppKit/NSPathCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -95,10 +95,10 @@ extern_methods!( ); #[method(doubleAction)] - pub unsafe fn doubleAction(&self) -> Option; + pub unsafe fn doubleAction(&self) -> OptionSel; #[method(setDoubleAction:)] - pub unsafe fn setDoubleAction(&self, doubleAction: Option); + pub unsafe fn setDoubleAction(&self, doubleAction: OptionSel); #[method_id(@__retain_semantics Other backgroundColor)] pub unsafe fn backgroundColor(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSPathControl.rs b/crates/icrate/src/generated/AppKit/NSPathControl.rs index d2b956e58..738231fb1 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControl.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControl.rs @@ -49,10 +49,10 @@ extern_methods!( pub unsafe fn setURL(&self, URL: Option<&NSURL>); #[method(doubleAction)] - pub unsafe fn doubleAction(&self) -> Option; + pub unsafe fn doubleAction(&self) -> OptionSel; #[method(setDoubleAction:)] - pub unsafe fn setDoubleAction(&self, doubleAction: Option); + pub unsafe fn setDoubleAction(&self, doubleAction: OptionSel); #[method(pathStyle)] pub unsafe fn pathStyle(&self) -> NSPathStyle; diff --git a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs index 3b2a6a343..69a38ffdc 100644 --- a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs @@ -34,7 +34,7 @@ extern_methods!( labels: &NSArray, selectionMode: NSPickerTouchBarItemSelectionMode, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other pickerTouchBarItemWithIdentifier:images:selectionMode:target:action:)] @@ -43,7 +43,7 @@ extern_methods!( images: &NSArray, selectionMode: NSPickerTouchBarItemSelectionMode, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method(controlRepresentation)] @@ -116,10 +116,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs index 203f2b104..7e7e58efd 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -86,7 +86,7 @@ extern_methods!( pub unsafe fn indexOfItemWithTarget_andAction( &self, target: Option<&Object>, - actionSelector: Option, + actionSelector: OptionSel, ) -> NSInteger; #[method_id(@__retain_semantics Other itemAtIndex:)] diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index 4958fbdab..def420c19 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -109,7 +109,7 @@ extern_methods!( pub unsafe fn indexOfItemWithTarget_andAction( &self, target: Option<&Object>, - actionSelector: Option, + actionSelector: OptionSel, ) -> NSInteger; #[method_id(@__retain_semantics Other itemAtIndex:)] diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs index 1d16dbeb0..5dca9c2bf 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -143,7 +143,7 @@ extern_methods!( &self, docWindow: &NSWindow, delegate: Option<&Object>, - didRunSelector: Option, + didRunSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index 0790a3067..4b71b9e32 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -94,7 +94,7 @@ extern_methods!( printInfo: &NSPrintInfo, docWindow: &NSWindow, delegate: Option<&Object>, - didEndSelector: Option, + didEndSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSResponder.rs b/crates/icrate/src/generated/AppKit/NSResponder.rs index c04b7aec2..1101fd835 100644 --- a/crates/icrate/src/generated/AppKit/NSResponder.rs +++ b/crates/icrate/src/generated/AppKit/NSResponder.rs @@ -226,7 +226,7 @@ extern_methods!( error: &NSError, window: &NSWindow, delegate: Option<&Object>, - didPresentSelector: Option, + didPresentSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index c86e7ea74..e4df1246a 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -207,7 +207,7 @@ extern_methods!( name: Option<&NSString>, docWindow: Option<&NSWindow>, delegate: Option<&Object>, - didEndSelector: Option, + didEndSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs index 480b45a09..4bec2c95e 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs @@ -196,7 +196,7 @@ extern_methods!( labels: &NSArray, trackingMode: NSSegmentSwitchTracking, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other segmentedControlWithImages:trackingMode:target:action:)] @@ -204,7 +204,7 @@ extern_methods!( images: &NSArray, trackingMode: NSSegmentSwitchTracking, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSSlider.rs b/crates/icrate/src/generated/AppKit/NSSlider.rs index 7088bf4a2..39249d2f6 100644 --- a/crates/icrate/src/generated/AppKit/NSSlider.rs +++ b/crates/icrate/src/generated/AppKit/NSSlider.rs @@ -108,7 +108,7 @@ extern_methods!( #[method_id(@__retain_semantics Other sliderWithTarget:action:)] pub unsafe fn sliderWithTarget_action( target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other sliderWithValue:minValue:maxValue:target:action:)] @@ -117,7 +117,7 @@ extern_methods!( minValue: c_double, maxValue: c_double, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; } ); diff --git a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs index a0e5557f7..211abdabf 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs @@ -89,10 +89,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs index f964b59bc..61d78bebe 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusItem.rs @@ -63,16 +63,16 @@ extern_methods!( /// NSStatusItemDeprecated unsafe impl NSStatusItem { #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method(doubleAction)] - pub unsafe fn doubleAction(&self) -> Option; + pub unsafe fn doubleAction(&self) -> OptionSel; #[method(setDoubleAction:)] - pub unsafe fn setDoubleAction(&self, doubleAction: Option); + pub unsafe fn setDoubleAction(&self, doubleAction: OptionSel); #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs index fac02f6eb..08bcce935 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs @@ -58,10 +58,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method_id(@__retain_semantics Other customizationLabel)] pub unsafe fn customizationLabel(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index 5a17b9645..4cc883eed 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -257,10 +257,10 @@ extern_methods!( pub unsafe fn clickedRow(&self) -> NSInteger; #[method(doubleAction)] - pub unsafe fn doubleAction(&self) -> Option; + pub unsafe fn doubleAction(&self) -> OptionSel; #[method(setDoubleAction:)] - pub unsafe fn setDoubleAction(&self, doubleAction: Option); + pub unsafe fn setDoubleAction(&self, doubleAction: OptionSel); #[method_id(@__retain_semantics Other sortDescriptors)] pub unsafe fn sortDescriptors(&self) -> Id, Shared>; diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index c36fd5add..39ea5953f 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -74,10 +74,10 @@ extern_methods!( pub unsafe fn setTarget(&self, target: Option<&Object>); #[method(action)] - pub unsafe fn action(&self) -> Option; + pub unsafe fn action(&self) -> OptionSel; #[method(setAction:)] - pub unsafe fn setAction(&self, action: Option); + pub unsafe fn setAction(&self, action: OptionSel); #[method(isEnabled)] pub unsafe fn isEnabled(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs index 2ed47cc43..7b2dd5a4c 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs @@ -35,7 +35,7 @@ extern_methods!( selectionMode: NSToolbarItemGroupSelectionMode, labels: Option<&NSArray>, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other groupWithItemIdentifier:images:selectionMode:labels:target:action:)] @@ -45,7 +45,7 @@ extern_methods!( selectionMode: NSToolbarItemGroupSelectionMode, labels: Option<&NSArray>, target: Option<&Object>, - action: Option, + action: OptionSel, ) -> Id; #[method_id(@__retain_semantics Other subitems)] diff --git a/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs index 72dd31ea5..f04994bff 100644 --- a/crates/icrate/src/generated/AppKit/NSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSTypesetter.rs @@ -329,7 +329,7 @@ extern_methods!( glyphBuffer: *mut NSGlyph, charIndexBuffer: *mut NSUInteger, inscribeBuffer: *mut NSGlyphInscription, - elasticBuffer: *mut bool, + elasticBuffer: *mut Bool, bidiLevelBuffer: *mut c_uchar, ) -> NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index f83faba4d..0aad3f540 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -71,7 +71,7 @@ extern_methods!( pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( &self, delegate: Option<&Object>, - didCommitSelector: Option, + didCommitSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index 173754b75..96ae6a190 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -116,9 +116,9 @@ extern_methods!( pub unsafe fn getFileSystemInfoForPath_isRemovable_isWritable_isUnmountable_description_type( &self, fullPath: &NSString, - removableFlag: *mut bool, - writableFlag: *mut bool, - unmountableFlag: *mut bool, + removableFlag: *mut Bool, + writableFlag: *mut Bool, + unmountableFlag: *mut Bool, description: *mut *mut NSString, fileSystemType: *mut *mut NSString, ) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index ae68a3db6..be20404d5 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -93,7 +93,7 @@ extern_methods!( pub unsafe fn rightExpression(&self) -> Id; #[method(customSelector)] - pub unsafe fn customSelector(&self) -> Option; + pub unsafe fn customSelector(&self) -> OptionSel; #[method(options)] pub unsafe fn options(&self) -> NSComparisonPredicateOptions; diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 727136a17..490472346 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -151,7 +151,7 @@ extern_methods!( error: &NSError, recoveryOptionIndex: NSUInteger, delegate: Option<&Object>, - didRecoverSelector: Option, + didRecoverSelector: OptionSel, contextInfo: *mut c_void, ); diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 1d7173846..bd789b7da 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -338,7 +338,7 @@ extern_methods!( pub unsafe fn fileExistsAtPath_isDirectory( &self, path: &NSString, - isDirectory: *mut bool, + isDirectory: *mut Bool, ) -> bool; #[method(isReadableFileAtPath:)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs index e9b79c0ab..a27bbf881 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptClassDescription.rs @@ -55,7 +55,7 @@ extern_methods!( pub unsafe fn selectorForCommand( &self, commandDescription: &NSScriptCommandDescription, - ) -> Option; + ) -> OptionSel; #[method_id(@__retain_semantics Other typeForKey:)] pub unsafe fn typeForKey(&self, key: &NSString) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs index 43df6acee..a44a3c471 100644 --- a/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSSortDescriptor.rs @@ -24,7 +24,7 @@ extern_methods!( pub unsafe fn sortDescriptorWithKey_ascending_selector( key: Option<&NSString>, ascending: bool, - selector: Option, + selector: OptionSel, ) -> Id; #[method_id(@__retain_semantics Init initWithKey:ascending:)] @@ -39,7 +39,7 @@ extern_methods!( this: Option>, key: Option<&NSString>, ascending: bool, - selector: Option, + selector: OptionSel, ) -> Id; #[method_id(@__retain_semantics Init initWithCoder:)] @@ -55,7 +55,7 @@ extern_methods!( pub unsafe fn ascending(&self) -> bool; #[method(selector)] - pub unsafe fn selector(&self) -> Option; + pub unsafe fn selector(&self) -> OptionSel; #[method(allowEvaluation)] pub unsafe fn allowEvaluation(&self); diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index c02839460..a707ac872 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -754,7 +754,7 @@ extern_methods!( data: &NSData, opts: Option<&NSDictionary>, string: *mut *mut NSString, - usedLossyConversion: *mut bool, + usedLossyConversion: *mut Bool, ) -> NSStringEncoding; } ); diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index b97db70bd..f31fdeb24 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -872,7 +872,7 @@ extern_methods!( bookmarkData: &NSData, options: NSURLBookmarkResolutionOptions, relativeURL: Option<&NSURL>, - isStale: *mut bool, + isStale: *mut Bool, ) -> Result, Id>; #[method_id(@__retain_semantics Other URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:)] @@ -880,7 +880,7 @@ extern_methods!( bookmarkData: &NSData, options: NSURLBookmarkResolutionOptions, relativeURL: Option<&NSURL>, - isStale: *mut bool, + isStale: *mut Bool, ) -> Result, Id>; #[method_id(@__retain_semantics Other resourceValuesForKeys:fromBookmarkData:)] diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 609d032ba..8ada8f12c 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -63,11 +63,17 @@ mod common { pub(crate) use objc2::ffi::{NSInteger, NSUInteger}; pub(crate) use objc2::rc::{Allocated, Id, Shared}; - pub(crate) use objc2::runtime::{Class, Object, Sel}; + pub(crate) use objc2::runtime::{Bool, Class, Object, Sel}; pub(crate) use objc2::{ __inner_extern_class, extern_class, extern_methods, ClassType, Message, }; + // TODO + pub struct OptionSel(*const objc2::ffi::objc_selector); + unsafe impl objc2::Encode for OptionSel { + const ENCODING: objc2::Encoding = objc2::Encoding::Sel; + } + // TODO pub(crate) type Protocol = Object; pub(crate) type TodoBlock = *const c_void; From 7885cb32986bf7962b7d73a4fcad4e3cc02529fc Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 03:59:25 +0100 Subject: [PATCH 110/131] Fix almost all remaining type errors in Foundation --- crates/header-translator/src/config.rs | 15 ++ crates/header-translator/src/stmt.rs | 36 +++- crates/icrate/src/AppKit/mod.rs | 1 + crates/icrate/src/Foundation/mod.rs | 8 +- .../src/Foundation/translation-config.toml | 122 +++++++++++++ .../Foundation/NSAppleEventDescriptor.rs | 161 ++---------------- .../Foundation/NSAppleEventManager.rs | 24 --- .../Foundation/NSAttributedString.rs | 11 +- .../src/generated/Foundation/NSByteOrder.rs | 4 - .../src/generated/Foundation/NSCalendar.rs | 66 ++++--- .../generated/Foundation/NSDateFormatter.rs | 10 +- .../src/generated/Foundation/NSDictionary.rs | 11 -- .../src/generated/Foundation/NSException.rs | 9 +- .../src/generated/Foundation/NSExpression.rs | 6 - .../src/generated/Foundation/NSGeometry.rs | 16 +- .../Foundation/NSISO8601DateFormatter.rs | 38 ++--- .../src/generated/Foundation/NSLocale.rs | 15 +- .../generated/Foundation/NSNumberFormatter.rs | 54 +++--- .../src/generated/Foundation/NSOperation.rs | 6 - .../src/generated/Foundation/NSPredicate.rs | 6 - .../generated/Foundation/NSPropertyList.rs | 14 +- .../src/generated/Foundation/NSRunLoop.rs | 3 - .../src/generated/Foundation/NSString.rs | 15 -- .../generated/Foundation/NSURLCredential.rs | 29 +--- .../Foundation/NSURLProtectionSpace.rs | 5 +- .../src/generated/Foundation/NSURLSession.rs | 36 ---- .../icrate/src/generated/Foundation/NSUUID.rs | 9 - .../Foundation/NSUserNotification.rs | 6 - .../generated/Foundation/NSXPCConnection.rs | 39 ----- crates/icrate/src/generated/Foundation/mod.rs | 7 +- crates/icrate/src/lib.rs | 6 + 31 files changed, 286 insertions(+), 502 deletions(-) diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index be383c19e..d2a2f933d 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -17,6 +17,9 @@ pub struct Config { #[serde(rename = "struct")] #[serde(default)] pub struct_data: HashMap, + #[serde(rename = "enum")] + #[serde(default)] + pub enum_data: HashMap, #[serde(default)] pub imports: Vec, } @@ -39,6 +42,18 @@ pub struct StructData { pub skipped: bool, } +#[derive(Deserialize, Debug, Default, Clone, PartialEq, Eq)] +#[serde(deny_unknown_fields)] +pub struct EnumData { + #[serde(default)] + pub skipped: bool, + #[serde(rename = "use-value")] + #[serde(default)] + pub use_value: bool, + #[serde(default)] + pub constants: HashMap, +} + #[derive(Deserialize, Debug, Clone, Copy, PartialEq, Eq)] #[serde(deny_unknown_fields)] pub struct MethodData { diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 3e448fb82..53c83cd09 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -496,6 +496,16 @@ impl Stmt { } let name = entity.get_name(); + + let data = config + .enum_data + .get(name.as_deref().unwrap_or("anonymous")) + .cloned() + .unwrap_or_default(); + if data.skipped { + return None; + } + let ty = entity.get_enum_underlying_type().expect("enum type"); let is_signed = ty.is_signed_integer(); let ty = RustType::parse_enum(ty); @@ -506,11 +516,27 @@ impl Stmt { match entity.get_kind() { EntityKind::EnumConstantDecl => { let name = entity.get_name().expect("enum constant name"); - let val = entity - .get_enum_constant_value() - .expect("enum constant value"); - let expr = Expr::parse_enum_constant(&entity) - .unwrap_or_else(|| Expr::from_val(val, is_signed)); + + if data + .constants + .get(&name) + .map(|data| data.skipped) + .unwrap_or_default() + { + return EntityVisitResult::Continue; + } + + let val = Expr::from_val( + entity + .get_enum_constant_value() + .expect("enum constant value"), + is_signed, + ); + let expr = if data.use_value { + val + } else { + Expr::parse_enum_constant(&entity).unwrap_or(val) + }; variants.push((name, expr)); } EntityKind::UnexposedAttr => { diff --git a/crates/icrate/src/AppKit/mod.rs b/crates/icrate/src/AppKit/mod.rs index 9f7595c06..4698a8cb5 100644 --- a/crates/icrate/src/AppKit/mod.rs +++ b/crates/icrate/src/AppKit/mod.rs @@ -1,3 +1,4 @@ +#[allow(unused_imports)] #[path = "../generated/AppKit/mod.rs"] pub(crate) mod generated; diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index f09211575..8933ff7dd 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -1,3 +1,4 @@ +#[allow(unused_imports)] #[path = "../generated/Foundation/mod.rs"] pub(crate) mod generated; @@ -215,9 +216,7 @@ pub use self::generated::NSByteCountFormatter::{ NSByteCountFormatterUsePB, NSByteCountFormatterUseTB, NSByteCountFormatterUseYBOrHigher, NSByteCountFormatterUseZB, }; -pub use self::generated::NSByteOrder::{ - NSSwappedDouble, NSSwappedFloat, NS_BigEndian, NS_LittleEndian, NS_UnknownByteOrder, -}; +pub use self::generated::NSByteOrder::{NSSwappedDouble, NSSwappedFloat}; pub use self::generated::NSCache::{NSCache, NSCacheDelegate}; pub use self::generated::NSCalendar::{ NSCalendar, NSCalendarCalendarUnit, NSCalendarDayChangedNotification, NSCalendarIdentifier, @@ -239,8 +238,7 @@ pub use self::generated::NSCalendar::{ NSEraCalendarUnit, NSHourCalendarUnit, NSMinuteCalendarUnit, NSMonthCalendarUnit, NSQuarterCalendarUnit, NSSecondCalendarUnit, NSTimeZoneCalendarUnit, NSUndefinedDateComponent, NSWeekCalendarUnit, NSWeekOfMonthCalendarUnit, NSWeekOfYearCalendarUnit, NSWeekdayCalendarUnit, - NSWeekdayOrdinalCalendarUnit, NSWrapCalendarComponents, NSYearCalendarUnit, - NSYearForWeekOfYearCalendarUnit, + NSWeekdayOrdinalCalendarUnit, NSYearCalendarUnit, NSYearForWeekOfYearCalendarUnit, }; pub use self::generated::NSCalendarDate::NSCalendarDate; pub use self::generated::NSCharacterSet::{ diff --git a/crates/icrate/src/Foundation/translation-config.toml b/crates/icrate/src/Foundation/translation-config.toml index db0689d64..e11bfd537 100644 --- a/crates/icrate/src/Foundation/translation-config.toml +++ b/crates/icrate/src/Foundation/translation-config.toml @@ -87,3 +87,125 @@ skipped = true # Contains bitfields [struct.NSDecimal] skipped = true + +# Uses stuff from core Darwin libraries which we have not yet mapped +[class.NSAppleEventDescriptor.methods] +descriptorWithDescriptorType_bytes_length = { skipped = true } +descriptorWithDescriptorType_data = { skipped = true } +appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID = { skipped = true } +descriptorWithProcessIdentifier = { skipped = true } +initWithAEDescNoCopy = { skipped = true } +initWithDescriptorType_bytes_length = { skipped = true } +initWithDescriptorType_data = { skipped = true } +initWithEventClass_eventID_targetDescriptor_returnID_transactionID = { skipped = true } +setParamDescriptor_forKeyword = { skipped = true } +paramDescriptorForKeyword = { skipped = true } +removeParamDescriptorWithKeyword = { skipped = true } +setAttributeDescriptor_forKeyword = { skipped = true } +attributeDescriptorForKeyword = { skipped = true } +sendEventWithOptions_timeout_error = { skipped = true } +setDescriptor_forKeyword = { skipped = true } +descriptorForKeyword = { skipped = true } +removeDescriptorWithKeyword = { skipped = true } +keywordForDescriptorAtIndex = { skipped = true } +coerceToDescriptorType = { skipped = true } +[class.NSAppleEventDescriptor.properties] +aeDesc = { skipped = true } +descriptorType = { skipped = true } +eventClass = { skipped = true } +eventID = { skipped = true } +returnID = { skipped = true } +transactionID = { skipped = true } +[class.NSAppleEventManager.methods] +setEventHandler_andSelector_forEventClass_andEventID = { skipped = true } +removeEventHandlerForEventClass_andEventID = { skipped = true } +dispatchRawAppleEvent_withRawReply_handlerRefCon = { skipped = true } +[class.NSOperationQueue.properties.underlyingQueue] +skipped = true +[class.NSRunLoop.methods.getCFRunLoop] +skipped = true +[class.NSURLCredential.methods] +initWithIdentity_certificates_persistence = { skipped = true } +credentialWithIdentity_certificates_persistence = { skipped = true } +initWithTrust = { skipped = true } +credentialForTrust = { skipped = true } +[class.NSURLCredential.properties.identity] +skipped = true +[class.NSURLProtectionSpace.properties.serverTrust] +skipped = true +[class.NSURLSessionConfiguration.properties] +TLSMinimumSupportedProtocol = { skipped = true } +TLSMaximumSupportedProtocol = { skipped = true } +TLSMinimumSupportedProtocolVersion = { skipped = true } +TLSMaximumSupportedProtocolVersion = { skipped = true } +[class.NSUUID.methods] +initWithUUIDBytes = { skipped = true } +getUUIDBytes = { skipped = true } +[class.NSXPCConnection.properties] +auditSessionIdentifier = { skipped = true } +processIdentifier = { skipped = true } +effectiveUserIdentifier = { skipped = true } +effectiveGroupIdentifier = { skipped = true } +[class.NSXPCInterface.methods] +setXPCType_forSelector_argumentIndex_ofReply = { skipped = true } +XPCTypeForSelector_argumentIndex_ofReply = { skipped = true } +[class.NSXPCCoder.methods] +encodeXPCObject_forKey = { skipped = true } +decodeXPCObjectOfType_forKey = { skipped = true } + +# Uses constants from CoreFoundation or similar frameworks +[enum.NSAppleEventSendOptions] +use-value = true +[enum.NSCalendarUnit] +use-value = true +[enum.NSDateFormatterStyle] +use-value = true +[enum.NSRectEdge] +use-value = true +[enum.NSISO8601DateFormatOptions] +use-value = true +[enum.NSLocaleLanguageDirection] +use-value = true +[enum.NSNumberFormatterStyle] +use-value = true +[enum.NSNumberFormatterPadPosition] +use-value = true +[enum.NSNumberFormatterRoundingMode] +use-value = true +[enum.NSPropertyListMutabilityOptions] +use-value = true +[enum.NSPropertyListFormat] +use-value = true +[enum.anonymous.constants.NS_UnknownByteOrder] +skipped = true +[enum.anonymous.constants.NS_LittleEndian] +skipped = true +[enum.anonymous.constants.NS_BigEndian] +skipped = true + +# Uses va_list +[class.NSAttributedString.methods.initWithFormat_options_locale_arguments] +skipped = true +[class.NSException.methods.raise_format_arguments] +skipped = true +[class.NSExpression.methods.expressionWithFormat_arguments] +skipped = true +[class.NSPredicate.methods.predicateWithFormat_arguments] +skipped = true +[class.NSString.methods.initWithFormat_arguments] +skipped = true +[class.NSString.methods.initWithFormat_locale_arguments] +skipped = true + +# Wrong type compared to value +[enum.anonymous.constants.NSWrapCalendarComponents] +skipped = true + +# Uses NSImage, which is only available in AppKit +[class.NSUserNotification.properties.contentImage] +skipped = true + +# Has the wrong generic parameter +[class.NSDictionary.methods] +initWithContentsOfURL_error = { skipped = true } +dictionaryWithContentsOfURL_error = { skipped = true } diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index 324ae2681..f667e8702 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -4,19 +4,17 @@ use crate::common::*; use crate::Foundation::*; pub type NSAppleEventSendOptions = NSUInteger; -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; +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; extern_class!( #[derive(Debug)] @@ -32,19 +30,6 @@ extern_methods!( #[method_id(@__retain_semantics Other nullDescriptor)] pub unsafe fn nullDescriptor() -> Id; - #[method_id(@__retain_semantics Other descriptorWithDescriptorType:bytes:length:)] - pub unsafe fn descriptorWithDescriptorType_bytes_length( - descriptorType: DescType, - bytes: *mut c_void, - byteCount: NSUInteger, - ) -> Option>; - - #[method_id(@__retain_semantics Other descriptorWithDescriptorType:data:)] - pub unsafe fn descriptorWithDescriptorType_data( - descriptorType: DescType, - data: Option<&NSData>, - ) -> Option>; - #[method_id(@__retain_semantics Other descriptorWithBoolean:)] pub unsafe fn descriptorWithBoolean(boolean: Boolean) -> Id; @@ -77,15 +62,6 @@ extern_methods!( #[method_id(@__retain_semantics Other descriptorWithFileURL:)] pub unsafe fn descriptorWithFileURL(fileURL: &NSURL) -> Id; - #[method_id(@__retain_semantics Other appleEventWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] - pub unsafe fn appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID( - eventClass: AEEventClass, - eventID: AEEventID, - targetDescriptor: Option<&NSAppleEventDescriptor>, - returnID: AEReturnID, - transactionID: AETransactionID, - ) -> Id; - #[method_id(@__retain_semantics Other listDescriptor)] pub unsafe fn listDescriptor() -> Id; @@ -95,11 +71,6 @@ extern_methods!( #[method_id(@__retain_semantics Other currentProcessDescriptor)] pub unsafe fn currentProcessDescriptor() -> Id; - #[method_id(@__retain_semantics Other descriptorWithProcessIdentifier:)] - pub unsafe fn descriptorWithProcessIdentifier( - processIdentifier: pid_t, - ) -> Id; - #[method_id(@__retain_semantics Other descriptorWithBundleIdentifier:)] pub unsafe fn descriptorWithBundleIdentifier( bundleIdentifier: &NSString, @@ -110,49 +81,12 @@ extern_methods!( applicationURL: &NSURL, ) -> Id; - #[method_id(@__retain_semantics Init initWithAEDescNoCopy:)] - pub unsafe fn initWithAEDescNoCopy( - this: Option>, - aeDesc: NonNull, - ) -> Id; - - #[method_id(@__retain_semantics Init initWithDescriptorType:bytes:length:)] - pub unsafe fn initWithDescriptorType_bytes_length( - this: Option>, - descriptorType: DescType, - bytes: *mut c_void, - byteCount: NSUInteger, - ) -> Option>; - - #[method_id(@__retain_semantics Init initWithDescriptorType:data:)] - pub unsafe fn initWithDescriptorType_data( - this: Option>, - descriptorType: DescType, - data: Option<&NSData>, - ) -> Option>; - - #[method_id(@__retain_semantics Init initWithEventClass:eventID:targetDescriptor:returnID:transactionID:)] - pub unsafe fn initWithEventClass_eventID_targetDescriptor_returnID_transactionID( - this: Option>, - eventClass: AEEventClass, - eventID: AEEventID, - targetDescriptor: Option<&NSAppleEventDescriptor>, - returnID: AEReturnID, - transactionID: AETransactionID, - ) -> Id; - #[method_id(@__retain_semantics Init initListDescriptor)] pub unsafe fn initListDescriptor(this: Option>) -> Id; #[method_id(@__retain_semantics Init initRecordDescriptor)] pub unsafe fn initRecordDescriptor(this: Option>) -> Id; - #[method(aeDesc)] - pub unsafe fn aeDesc(&self) -> *mut AEDesc; - - #[method(descriptorType)] - pub unsafe fn descriptorType(&self) -> DescType; - #[method_id(@__retain_semantics Other data)] pub unsafe fn data(&self) -> Id; @@ -180,54 +114,6 @@ extern_methods!( #[method_id(@__retain_semantics Other fileURLValue)] pub unsafe fn fileURLValue(&self) -> Option>; - #[method(eventClass)] - pub unsafe fn eventClass(&self) -> AEEventClass; - - #[method(eventID)] - pub unsafe fn eventID(&self) -> AEEventID; - - #[method(returnID)] - pub unsafe fn returnID(&self) -> AEReturnID; - - #[method(transactionID)] - pub unsafe fn transactionID(&self) -> AETransactionID; - - #[method(setParamDescriptor:forKeyword:)] - pub unsafe fn setParamDescriptor_forKeyword( - &self, - descriptor: &NSAppleEventDescriptor, - keyword: AEKeyword, - ); - - #[method_id(@__retain_semantics Other paramDescriptorForKeyword:)] - pub unsafe fn paramDescriptorForKeyword( - &self, - keyword: AEKeyword, - ) -> Option>; - - #[method(removeParamDescriptorWithKeyword:)] - pub unsafe fn removeParamDescriptorWithKeyword(&self, keyword: AEKeyword); - - #[method(setAttributeDescriptor:forKeyword:)] - pub unsafe fn setAttributeDescriptor_forKeyword( - &self, - descriptor: &NSAppleEventDescriptor, - keyword: AEKeyword, - ); - - #[method_id(@__retain_semantics Other attributeDescriptorForKeyword:)] - pub unsafe fn attributeDescriptorForKeyword( - &self, - keyword: AEKeyword, - ) -> Option>; - - #[method_id(@__retain_semantics Other sendEventWithOptions:timeout:error:)] - pub unsafe fn sendEventWithOptions_timeout_error( - &self, - sendOptions: NSAppleEventSendOptions, - timeoutInSeconds: NSTimeInterval, - ) -> Result, Id>; - #[method(isRecordDescriptor)] pub unsafe fn isRecordDescriptor(&self) -> bool; @@ -249,30 +135,5 @@ extern_methods!( #[method(removeDescriptorAtIndex:)] pub unsafe fn removeDescriptorAtIndex(&self, index: NSInteger); - - #[method(setDescriptor:forKeyword:)] - pub unsafe fn setDescriptor_forKeyword( - &self, - descriptor: &NSAppleEventDescriptor, - keyword: AEKeyword, - ); - - #[method_id(@__retain_semantics Other descriptorForKeyword:)] - pub unsafe fn descriptorForKeyword( - &self, - keyword: AEKeyword, - ) -> Option>; - - #[method(removeDescriptorWithKeyword:)] - pub unsafe fn removeDescriptorWithKeyword(&self, keyword: AEKeyword); - - #[method(keywordForDescriptorAtIndex:)] - pub unsafe fn keywordForDescriptorAtIndex(&self, index: NSInteger) -> AEKeyword; - - #[method_id(@__retain_semantics Other coerceToDescriptorType:)] - pub unsafe fn coerceToDescriptorType( - &self, - descriptorType: DescType, - ) -> Option>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index 3d69f43dc..bc5d09b06 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -31,30 +31,6 @@ extern_methods!( #[method_id(@__retain_semantics Other sharedAppleEventManager)] pub unsafe fn sharedAppleEventManager() -> Id; - #[method(setEventHandler:andSelector:forEventClass:andEventID:)] - pub unsafe fn setEventHandler_andSelector_forEventClass_andEventID( - &self, - handler: &Object, - handleEventSelector: Sel, - eventClass: AEEventClass, - eventID: AEEventID, - ); - - #[method(removeEventHandlerForEventClass:andEventID:)] - pub unsafe fn removeEventHandlerForEventClass_andEventID( - &self, - eventClass: AEEventClass, - eventID: AEEventID, - ); - - #[method(dispatchRawAppleEvent:withRawReply:handlerRefCon:)] - pub unsafe fn dispatchRawAppleEvent_withRawReply_handlerRefCon( - &self, - theAppleEvent: NonNull, - theReply: NonNull, - handlerRefCon: SRefCon, - ) -> OSErr; - #[method_id(@__retain_semantics Other currentAppleEvent)] pub unsafe fn currentAppleEvent(&self) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index e4db44cc5..59d2d1458 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -312,16 +312,7 @@ pub const NSAttributedStringFormattingApplyReplacementIndexAttribute: extern_methods!( /// NSAttributedStringFormatting - unsafe impl NSAttributedString { - #[method_id(@__retain_semantics Init initWithFormat:options:locale:arguments:)] - pub unsafe fn initWithFormat_options_locale_arguments( - this: Option>, - format: &NSAttributedString, - options: NSAttributedStringFormattingOptions, - locale: Option<&NSLocale>, - arguments: va_list, - ) -> Id; - } + unsafe impl NSAttributedString {} ); extern_methods!( diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index 8f132ec4a..936ec5309 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -3,10 +3,6 @@ use crate::common::*; use crate::Foundation::*; -pub const NS_UnknownByteOrder: i32 = CFByteOrderUnknown; -pub const NS_LittleEndian: i32 = CFByteOrderLittleEndian; -pub const NS_BigEndian: i32 = CFByteOrderBigEndian; - struct_impl!( pub struct NSSwappedFloat { pub v: c_uint, diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 069c01354..e736544b6 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -70,38 +70,38 @@ extern "C" { } pub type NSCalendarUnit = NSUInteger; -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 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 type NSCalendarOptions = NSUInteger; pub const NSCalendarWrapComponents: NSCalendarOptions = 1 << 0; @@ -113,8 +113,6 @@ pub const NSCalendarMatchNextTime: NSCalendarOptions = 1 << 10; pub const NSCalendarMatchFirst: NSCalendarOptions = 1 << 12; pub const NSCalendarMatchLast: NSCalendarOptions = 1 << 13; -pub const NSWrapCalendarComponents: i32 = NSCalendarWrapComponents; - extern_class!( #[derive(Debug)] pub struct NSCalendar; diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 2374a7bcc..76737216b 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -4,11 +4,11 @@ use crate::common::*; use crate::Foundation::*; pub type NSDateFormatterStyle = NSUInteger; -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 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 type NSDateFormatterBehavior = NSUInteger; pub const NSDateFormatterBehaviorDefault: NSDateFormatterBehavior = 0; diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 660329c16..e54902482 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -243,17 +243,6 @@ extern_methods!( objects: &NSArray, keys: &NSArray, ) -> Id; - - #[method_id(@__retain_semantics Init initWithContentsOfURL:error:)] - pub unsafe fn initWithContentsOfURL_error( - this: Option>, - url: &NSURL, - ) -> Result, Shared>, Id>; - - #[method_id(@__retain_semantics Other dictionaryWithContentsOfURL:error:)] - pub unsafe fn dictionaryWithContentsOfURL_error( - url: &NSURL, - ) -> Result, Shared>, Id>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index ad7d895d7..250dffa5f 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -111,14 +111,7 @@ extern_methods!( extern_methods!( /// NSExceptionRaisingConveniences - unsafe impl NSException { - #[method(raise:format:arguments:)] - pub unsafe fn raise_format_arguments( - name: &NSExceptionName, - format: &NSString, - argList: va_list, - ); - } + unsafe impl NSException {} ); pub type NSUncaughtExceptionHandler = TodoFunction; diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index b0a59db61..47f54d148 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -35,12 +35,6 @@ extern_methods!( arguments: &NSArray, ) -> Id; - #[method_id(@__retain_semantics Other expressionWithFormat:arguments:)] - pub unsafe fn expressionWithFormat_arguments( - expressionFormat: &NSString, - argList: va_list, - ) -> Id; - #[method_id(@__retain_semantics Other expressionForConstantValue:)] pub unsafe fn expressionForConstantValue(obj: Option<&Object>) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 9950401dc..09eb8ceb3 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -22,14 +22,14 @@ pub type NSRectPointer = *mut NSRect; pub type NSRectArray = *mut NSRect; pub type NSRectEdge = NSUInteger; -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 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; struct_impl!( pub struct NSEdgeInsets { diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 1134f24c3..805893351 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -4,30 +4,20 @@ use crate::common::*; use crate::Foundation::*; pub type NSISO8601DateFormatOptions = NSUInteger; -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; +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; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index bc50875d2..584e9ce53 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -174,16 +174,11 @@ extern_methods!( ); pub type NSLocaleLanguageDirection = NSUInteger; -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; +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; extern_methods!( /// NSLocaleGeneralInfo diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index cf9d15d4c..04217aa5e 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -9,43 +9,31 @@ pub const NSNumberFormatterBehavior10_0: NSNumberFormatterBehavior = 1000; pub const NSNumberFormatterBehavior10_4: NSNumberFormatterBehavior = 1040; pub type NSNumberFormatterStyle = NSUInteger; -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 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 type NSNumberFormatterPadPosition = NSUInteger; -pub const NSNumberFormatterPadBeforePrefix: NSNumberFormatterPadPosition = - kCFNumberFormatterPadBeforePrefix; -pub const NSNumberFormatterPadAfterPrefix: NSNumberFormatterPadPosition = - kCFNumberFormatterPadAfterPrefix; -pub const NSNumberFormatterPadBeforeSuffix: NSNumberFormatterPadPosition = - kCFNumberFormatterPadBeforeSuffix; -pub const NSNumberFormatterPadAfterSuffix: NSNumberFormatterPadPosition = - kCFNumberFormatterPadAfterSuffix; +pub const NSNumberFormatterPadBeforePrefix: NSNumberFormatterPadPosition = 0; +pub const NSNumberFormatterPadAfterPrefix: NSNumberFormatterPadPosition = 1; +pub const NSNumberFormatterPadBeforeSuffix: NSNumberFormatterPadPosition = 2; +pub const NSNumberFormatterPadAfterSuffix: NSNumberFormatterPadPosition = 3; pub type NSNumberFormatterRoundingMode = NSUInteger; -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; +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; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 37dd073c1..49bab8b35 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -208,12 +208,6 @@ extern_methods!( #[method(setQualityOfService:)] pub unsafe fn setQualityOfService(&self, qualityOfService: NSQualityOfService); - #[method(underlyingQueue)] - pub unsafe fn underlyingQueue(&self) -> dispatch_queue_t; - - #[method(setUnderlyingQueue:)] - pub unsafe fn setUnderlyingQueue(&self, underlyingQueue: dispatch_queue_t); - #[method(cancelAllOperations)] pub unsafe fn cancelAllOperations(&self); diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 039d47bc6..63125326a 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -20,12 +20,6 @@ extern_methods!( arguments: Option<&NSArray>, ) -> Id; - #[method_id(@__retain_semantics Other predicateWithFormat:arguments:)] - pub unsafe fn predicateWithFormat_arguments( - predicateFormat: &NSString, - argList: va_list, - ) -> Id; - #[method_id(@__retain_semantics Other predicateFromMetadataQueryString:)] pub unsafe fn predicateFromMetadataQueryString( queryString: &NSString, diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index e8c76dc98..7d6a97806 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -4,16 +4,14 @@ use crate::common::*; use crate::Foundation::*; pub type NSPropertyListMutabilityOptions = NSUInteger; -pub const NSPropertyListImmutable: NSPropertyListMutabilityOptions = kCFPropertyListImmutable; -pub const NSPropertyListMutableContainers: NSPropertyListMutabilityOptions = - kCFPropertyListMutableContainers; -pub const NSPropertyListMutableContainersAndLeaves: NSPropertyListMutabilityOptions = - kCFPropertyListMutableContainersAndLeaves; +pub const NSPropertyListImmutable: NSPropertyListMutabilityOptions = 0; +pub const NSPropertyListMutableContainers: NSPropertyListMutabilityOptions = 1; +pub const NSPropertyListMutableContainersAndLeaves: NSPropertyListMutabilityOptions = 2; pub type NSPropertyListFormat = NSUInteger; -pub const NSPropertyListOpenStepFormat: NSPropertyListFormat = kCFPropertyListOpenStepFormat; -pub const NSPropertyListXMLFormat_v1_0: NSPropertyListFormat = kCFPropertyListXMLFormat_v1_0; -pub const NSPropertyListBinaryFormat_v1_0: NSPropertyListFormat = kCFPropertyListBinaryFormat_v1_0; +pub const NSPropertyListOpenStepFormat: NSPropertyListFormat = 1; +pub const NSPropertyListXMLFormat_v1_0: NSPropertyListFormat = 100; +pub const NSPropertyListBinaryFormat_v1_0: NSPropertyListFormat = 200; pub type NSPropertyListReadOptions = NSPropertyListMutabilityOptions; diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 56c21bbdd..4c19bf0e3 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -31,9 +31,6 @@ extern_methods!( #[method_id(@__retain_semantics Other currentMode)] pub unsafe fn currentMode(&self) -> Option>; - #[method(getCFRunLoop)] - pub unsafe fn getCFRunLoop(&self) -> CFRunLoopRef; - #[method(addTimer:forMode:)] pub unsafe fn addTimer_forMode(&self, timer: &NSTimer, mode: &NSRunLoopMode); diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index a707ac872..d3dec25fc 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -578,21 +578,6 @@ extern_methods!( aString: &NSString, ) -> Id; - #[method_id(@__retain_semantics Init initWithFormat:arguments:)] - pub unsafe fn initWithFormat_arguments( - this: Option>, - format: &NSString, - argList: va_list, - ) -> Id; - - #[method_id(@__retain_semantics Init initWithFormat:locale:arguments:)] - pub unsafe fn initWithFormat_locale_arguments( - this: Option>, - format: &NSString, - locale: Option<&Object>, - argList: va_list, - ) -> Id; - #[method_id(@__retain_semantics Init initWithData:encoding:)] pub unsafe fn initWithData_encoding( this: Option>, diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index 2e71752a2..a0fba3486 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -57,24 +57,6 @@ extern_methods!( extern_methods!( /// NSClientCertificate unsafe impl NSURLCredential { - #[method_id(@__retain_semantics Init initWithIdentity:certificates:persistence:)] - pub unsafe fn initWithIdentity_certificates_persistence( - this: Option>, - identity: SecIdentityRef, - certArray: Option<&NSArray>, - persistence: NSURLCredentialPersistence, - ) -> Id; - - #[method_id(@__retain_semantics Other credentialWithIdentity:certificates:persistence:)] - pub unsafe fn credentialWithIdentity_certificates_persistence( - identity: SecIdentityRef, - certArray: Option<&NSArray>, - persistence: NSURLCredentialPersistence, - ) -> Id; - - #[method(identity)] - pub unsafe fn identity(&self) -> SecIdentityRef; - #[method_id(@__retain_semantics Other certificates)] pub unsafe fn certificates(&self) -> Id; } @@ -82,14 +64,5 @@ extern_methods!( extern_methods!( /// NSServerTrust - unsafe impl NSURLCredential { - #[method_id(@__retain_semantics Init initWithTrust:)] - pub unsafe fn initWithTrust( - this: Option>, - trust: SecTrustRef, - ) -> Id; - - #[method_id(@__retain_semantics Other credentialForTrust:)] - pub unsafe fn credentialForTrust(trust: SecTrustRef) -> Id; - } + unsafe impl NSURLCredential {} ); diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 01fc252fa..2b3da01dc 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -130,8 +130,5 @@ extern_methods!( extern_methods!( /// NSServerTrustValidationSpace - unsafe impl NSURLProtectionSpace { - #[method(serverTrust)] - pub unsafe fn serverTrust(&self) -> SecTrustRef; - } + unsafe impl NSURLProtectionSpace {} ); diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 57820a737..d9c47cae2 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -680,42 +680,6 @@ extern_methods!( connectionProxyDictionary: Option<&NSDictionary>, ); - #[method(TLSMinimumSupportedProtocol)] - pub unsafe fn TLSMinimumSupportedProtocol(&self) -> SSLProtocol; - - #[method(setTLSMinimumSupportedProtocol:)] - pub unsafe fn setTLSMinimumSupportedProtocol( - &self, - TLSMinimumSupportedProtocol: SSLProtocol, - ); - - #[method(TLSMaximumSupportedProtocol)] - pub unsafe fn TLSMaximumSupportedProtocol(&self) -> SSLProtocol; - - #[method(setTLSMaximumSupportedProtocol:)] - pub unsafe fn setTLSMaximumSupportedProtocol( - &self, - TLSMaximumSupportedProtocol: SSLProtocol, - ); - - #[method(TLSMinimumSupportedProtocolVersion)] - pub unsafe fn TLSMinimumSupportedProtocolVersion(&self) -> tls_protocol_version_t; - - #[method(setTLSMinimumSupportedProtocolVersion:)] - pub unsafe fn setTLSMinimumSupportedProtocolVersion( - &self, - TLSMinimumSupportedProtocolVersion: tls_protocol_version_t, - ); - - #[method(TLSMaximumSupportedProtocolVersion)] - pub unsafe fn TLSMaximumSupportedProtocolVersion(&self) -> tls_protocol_version_t; - - #[method(setTLSMaximumSupportedProtocolVersion:)] - pub unsafe fn setTLSMaximumSupportedProtocolVersion( - &self, - TLSMaximumSupportedProtocolVersion: tls_protocol_version_t, - ); - #[method(HTTPShouldUsePipelining)] pub unsafe fn HTTPShouldUsePipelining(&self) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSUUID.rs b/crates/icrate/src/generated/Foundation/NSUUID.rs index 7f408457b..7212e8fec 100644 --- a/crates/icrate/src/generated/Foundation/NSUUID.rs +++ b/crates/icrate/src/generated/Foundation/NSUUID.rs @@ -26,15 +26,6 @@ extern_methods!( string: &NSString, ) -> Option>; - #[method_id(@__retain_semantics Init initWithUUIDBytes:)] - pub unsafe fn initWithUUIDBytes( - this: Option>, - bytes: uuid_t, - ) -> Id; - - #[method(getUUIDBytes:)] - pub unsafe fn getUUIDBytes(&self, uuid: uuid_t); - #[method(compare:)] pub unsafe fn compare(&self, otherUUID: &NSUUID) -> NSComparisonResult; diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 0a29bf059..3e3e1d7b4 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -112,12 +112,6 @@ extern_methods!( #[method(setIdentifier:)] pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>); - #[method_id(@__retain_semantics Other contentImage)] - pub unsafe fn contentImage(&self) -> Option>; - - #[method(setContentImage:)] - pub unsafe fn setContentImage(&self, contentImage: Option<&NSImage>); - #[method(hasReplyButton)] pub unsafe fn hasReplyButton(&self) -> bool; diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 47ff4524c..3479dba3b 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -101,18 +101,6 @@ extern_methods!( #[method(invalidate)] pub unsafe fn invalidate(&self); - #[method(auditSessionIdentifier)] - pub unsafe fn auditSessionIdentifier(&self) -> au_asid_t; - - #[method(processIdentifier)] - pub unsafe fn processIdentifier(&self) -> pid_t; - - #[method(effectiveUserIdentifier)] - pub unsafe fn effectiveUserIdentifier(&self) -> uid_t; - - #[method(effectiveGroupIdentifier)] - pub unsafe fn effectiveGroupIdentifier(&self) -> gid_t; - #[method_id(@__retain_semantics Other currentConnection)] pub unsafe fn currentConnection() -> Option>; @@ -219,23 +207,6 @@ extern_methods!( arg: NSUInteger, ofReply: bool, ) -> Option>; - - #[method(setXPCType:forSelector:argumentIndex:ofReply:)] - pub unsafe fn setXPCType_forSelector_argumentIndex_ofReply( - &self, - type_: xpc_type_t, - sel: Sel, - arg: NSUInteger, - ofReply: bool, - ); - - #[method(XPCTypeForSelector:argumentIndex:ofReply:)] - pub unsafe fn XPCTypeForSelector_argumentIndex_ofReply( - &self, - sel: Sel, - arg: NSUInteger, - ofReply: bool, - ) -> xpc_type_t; } ); @@ -263,16 +234,6 @@ extern_class!( extern_methods!( unsafe impl NSXPCCoder { - #[method(encodeXPCObject:forKey:)] - pub unsafe fn encodeXPCObject_forKey(&self, xpcObject: xpc_object_t, key: &NSString); - - #[method(decodeXPCObjectOfType:forKey:)] - pub unsafe fn decodeXPCObjectOfType_forKey( - &self, - type_: xpc_type_t, - key: &NSString, - ) -> xpc_object_t; - #[method_id(@__retain_semantics Other userInfo)] pub unsafe fn userInfo(&self) -> Option>; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 2ec3c8e6a..ce15f8e84 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -278,9 +278,7 @@ mod __exported { NSByteCountFormatterUseMB, NSByteCountFormatterUsePB, NSByteCountFormatterUseTB, NSByteCountFormatterUseYBOrHigher, NSByteCountFormatterUseZB, }; - pub use super::NSByteOrder::{ - NSSwappedDouble, NSSwappedFloat, NS_BigEndian, NS_LittleEndian, NS_UnknownByteOrder, - }; + pub use super::NSByteOrder::{NSSwappedDouble, NSSwappedFloat}; pub use super::NSCache::{NSCache, NSCacheDelegate}; pub use super::NSCalendar::{ NSCalendar, NSCalendarCalendarUnit, NSCalendarDayChangedNotification, NSCalendarIdentifier, @@ -303,8 +301,7 @@ mod __exported { NSMinuteCalendarUnit, NSMonthCalendarUnit, NSQuarterCalendarUnit, NSSecondCalendarUnit, NSTimeZoneCalendarUnit, NSUndefinedDateComponent, NSWeekCalendarUnit, NSWeekOfMonthCalendarUnit, NSWeekOfYearCalendarUnit, NSWeekdayCalendarUnit, - NSWeekdayOrdinalCalendarUnit, NSWrapCalendarComponents, NSYearCalendarUnit, - NSYearForWeekOfYearCalendarUnit, + NSWeekdayOrdinalCalendarUnit, NSYearCalendarUnit, NSYearForWeekOfYearCalendarUnit, }; pub use super::NSCalendarDate::NSCalendarDate; pub use super::NSCharacterSet::{ diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 8ada8f12c..67b8ebfc9 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -80,6 +80,12 @@ mod common { pub(crate) type TodoFunction = *const c_void; pub(crate) type TodoArray = *const c_void; pub(crate) type TodoClass = Object; + pub(crate) type TodoProtocols = Object; + // MacTypes.h pub(crate) type Boolean = u8; // unsigned char + pub(crate) type FourCharCode = u32; + pub(crate) type OSType = FourCharCode; + pub(crate) type ResType = FourCharCode; + pub(crate) type UTF32Char = u32; // Or maybe Rust's char? } From be5916b412633806d8f8339e9289e51fdb89ff3d Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 04:13:31 +0100 Subject: [PATCH 111/131] Skip statics whoose value we cannot find --- crates/header-translator/src/stmt.rs | 20 ++++++----- crates/icrate/src/Foundation/mod.rs | 9 +++-- crates/icrate/src/generated/AppKit/NSEvent.rs | 2 -- .../src/generated/AppKit/NSStackView.rs | 2 -- .../icrate/src/generated/AppKit/NSWindow.rs | 22 ------------- crates/icrate/src/generated/AppKit/mod.rs | 33 ++++++++----------- .../src/generated/Foundation/NSObjCRuntime.rs | 2 -- crates/icrate/src/generated/Foundation/mod.rs | 6 ++-- 8 files changed, 32 insertions(+), 64 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 53c83cd09..96d022225 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -227,7 +227,7 @@ pub enum Stmt { VarDecl { name: String, ty: RustTypeStatic, - value: Option>, + value: Option, }, /// extern ret name(args*); /// @@ -600,6 +600,15 @@ impl Stmt { EntityVisitResult::Continue }); + let value = match value { + Some(Some(expr)) => Some(expr), + Some(None) => { + println!("skipped static {name}"); + return None; + } + None => None, + }; + Some(Self::VarDecl { name, ty, value }) } EntityKind::FunctionDecl => { @@ -843,14 +852,7 @@ impl fmt::Display for Stmt { Self::VarDecl { name, ty, - value: Some(None), - } => { - writeln!(f, "pub static {name}: {ty} = todo;")?; - } - Self::VarDecl { - name, - ty, - value: Some(Some(expr)), + value: Some(expr), } => { writeln!(f, "pub static {name}: {ty} = {expr};")?; } diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index 8933ff7dd..1f8c3660a 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -724,11 +724,10 @@ pub use self::generated::NSNumberFormatter::{ }; pub use self::generated::NSObjCRuntime::{ NSComparator, NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, - NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, NSNotFound, - NSOrderedAscending, NSOrderedDescending, NSOrderedSame, NSQualityOfService, - NSQualityOfServiceBackground, NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, - NSQualityOfServiceUserInteractive, NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, - NSSortOptions, NSSortStable, + NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, NSOrderedAscending, + NSOrderedDescending, NSOrderedSame, NSQualityOfService, NSQualityOfServiceBackground, + NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, + NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, NSSortOptions, NSSortStable, }; pub use self::generated::NSObject::{ NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 4eecafb93..0d0919dd0 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -168,8 +168,6 @@ pub static NSOtherMouseUpMask: NSEventMask = NSEventMaskOtherMouseUp; pub static NSOtherMouseDraggedMask: NSEventMask = NSEventMaskOtherMouseDragged; -pub static NSAnyEventMask: NSEventMask = todo; - pub type NSEventModifierFlags = NSUInteger; pub const NSEventModifierFlagCapsLock: NSEventModifierFlags = 1 << 16; pub const NSEventModifierFlagShift: NSEventModifierFlags = 1 << 17; diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index c12da61c7..981f6921e 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -27,8 +27,6 @@ pub static NSStackViewVisibilityPriorityDetachOnlyIfNecessary: NSStackViewVisibi pub static NSStackViewVisibilityPriorityNotVisible: NSStackViewVisibilityPriority = 0; -pub static NSStackViewSpacingUseDefault: CGFloat = todo; - extern_class!( #[derive(Debug)] pub struct NSStackView; diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index d2852b0fb..e04e7e848 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -66,24 +66,6 @@ pub const NSWindowOcclusionStateVisible: NSWindowOcclusionState = 1 << 1; pub type NSWindowLevel = NSInteger; -pub static NSNormalWindowLevel: NSWindowLevel = todo; - -pub static NSFloatingWindowLevel: NSWindowLevel = todo; - -pub static NSSubmenuWindowLevel: NSWindowLevel = todo; - -pub static NSTornOffMenuWindowLevel: NSWindowLevel = todo; - -pub static NSMainMenuWindowLevel: NSWindowLevel = todo; - -pub static NSStatusWindowLevel: NSWindowLevel = todo; - -pub static NSModalPanelWindowLevel: NSWindowLevel = todo; - -pub static NSPopUpMenuWindowLevel: NSWindowLevel = todo; - -pub static NSScreenSaverWindowLevel: NSWindowLevel = todo; - pub type NSSelectionDirection = NSUInteger; pub const NSDirectSelection: NSSelectionDirection = 0; pub const NSSelectingNext: NSSelectionDirection = 1; @@ -108,8 +90,6 @@ pub const NSWindowToolbarStylePreference: NSWindowToolbarStyle = 2; pub const NSWindowToolbarStyleUnified: NSWindowToolbarStyle = 3; pub const NSWindowToolbarStyleUnifiedCompact: NSWindowToolbarStyle = 4; -pub static NSEventDurationForever: NSTimeInterval = todo; - pub type NSWindowUserTabbingPreference = NSInteger; pub const NSWindowUserTabbingPreferenceManual: NSWindowUserTabbingPreference = 0; pub const NSWindowUserTabbingPreferenceAlways: NSWindowUserTabbingPreference = 1; @@ -1427,5 +1407,3 @@ pub static NSHUDWindowMask: NSWindowStyleMask = NSWindowStyleMaskHUDWindow; pub static NSUnscaledWindowMask: NSWindowStyleMask = 1 << 11; pub static NSWindowFullScreenButton: NSWindowButton = 7; - -pub static NSDockWindowLevel: NSWindowLevel = todo; diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index 772c7ba86..5115579ac 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -926,7 +926,7 @@ mod __exported { NSWordTablesReadException, NSWordTablesWriteException, }; pub use super::NSEvent::{ - NSAWTEventType, NSAlphaShiftKeyMask, NSAlternateKeyMask, NSAnyEventMask, NSAppKitDefined, + NSAWTEventType, NSAlphaShiftKeyMask, NSAlternateKeyMask, NSAppKitDefined, NSAppKitDefinedMask, NSApplicationActivatedEventType, NSApplicationDeactivatedEventType, NSApplicationDefined, NSApplicationDefinedMask, NSBeginFunctionKey, NSBreakFunctionKey, NSClearDisplayFunctionKey, NSClearLineFunctionKey, NSCommandKeyMask, NSControlKeyMask, @@ -1761,9 +1761,8 @@ mod __exported { NSStackViewDistributionFillProportionally, NSStackViewDistributionGravityAreas, NSStackViewGravity, NSStackViewGravityBottom, NSStackViewGravityCenter, NSStackViewGravityLeading, NSStackViewGravityTop, NSStackViewGravityTrailing, - NSStackViewSpacingUseDefault, NSStackViewVisibilityPriority, - NSStackViewVisibilityPriorityDetachOnlyIfNecessary, NSStackViewVisibilityPriorityMustHold, - NSStackViewVisibilityPriorityNotVisible, + NSStackViewVisibilityPriority, NSStackViewVisibilityPriorityDetachOnlyIfNecessary, + NSStackViewVisibilityPriorityMustHold, NSStackViewVisibilityPriorityNotVisible, }; pub use super::NSStatusBar::{ NSSquareStatusItemLength, NSStatusBar, NSVariableStatusItemLength, @@ -2147,22 +2146,18 @@ mod __exported { NSAppKitVersionNumberWithCustomSheetPosition, NSAppKitVersionNumberWithDeferredWindowDisplaySupport, NSBackingPropertyOldColorSpaceKey, NSBackingPropertyOldScaleFactorKey, NSBorderlessWindowMask, NSClosableWindowMask, - NSDirectSelection, NSDisplayWindowRunLoopOrdering, NSDocModalWindowMask, NSDockWindowLevel, - NSEventDurationForever, NSFloatingWindowLevel, NSFullScreenWindowMask, - NSFullSizeContentViewWindowMask, NSHUDWindowMask, NSMainMenuWindowLevel, - NSMiniaturizableWindowMask, NSModalPanelWindowLevel, NSModalResponseCancel, - NSModalResponseOK, NSNonactivatingPanelMask, NSNormalWindowLevel, NSPopUpMenuWindowLevel, - NSResetCursorRectsRunLoopOrdering, NSResizableWindowMask, NSScreenSaverWindowLevel, - NSSelectingNext, NSSelectingPrevious, NSSelectionDirection, NSStatusWindowLevel, - NSSubmenuWindowLevel, NSTexturedBackgroundWindowMask, NSTitlebarSeparatorStyle, - NSTitlebarSeparatorStyleAutomatic, NSTitlebarSeparatorStyleLine, + NSDirectSelection, NSDisplayWindowRunLoopOrdering, NSDocModalWindowMask, + NSFullScreenWindowMask, NSFullSizeContentViewWindowMask, NSHUDWindowMask, + NSMiniaturizableWindowMask, NSModalResponseCancel, NSModalResponseOK, + NSNonactivatingPanelMask, NSResetCursorRectsRunLoopOrdering, NSResizableWindowMask, + NSSelectingNext, NSSelectingPrevious, NSSelectionDirection, NSTexturedBackgroundWindowMask, + NSTitlebarSeparatorStyle, NSTitlebarSeparatorStyleAutomatic, NSTitlebarSeparatorStyleLine, NSTitlebarSeparatorStyleNone, NSTitlebarSeparatorStyleShadow, NSTitledWindowMask, - NSTornOffMenuWindowLevel, NSUnifiedTitleAndToolbarWindowMask, NSUnscaledWindowMask, - NSUtilityWindowMask, NSWindow, NSWindowAnimationBehavior, - NSWindowAnimationBehaviorAlertPanel, NSWindowAnimationBehaviorDefault, - NSWindowAnimationBehaviorDocumentWindow, NSWindowAnimationBehaviorNone, - NSWindowAnimationBehaviorUtilityWindow, NSWindowBackingLocation, - NSWindowBackingLocationDefault, NSWindowBackingLocationMainMemory, + NSUnifiedTitleAndToolbarWindowMask, NSUnscaledWindowMask, NSUtilityWindowMask, NSWindow, + NSWindowAnimationBehavior, NSWindowAnimationBehaviorAlertPanel, + NSWindowAnimationBehaviorDefault, NSWindowAnimationBehaviorDocumentWindow, + NSWindowAnimationBehaviorNone, NSWindowAnimationBehaviorUtilityWindow, + NSWindowBackingLocation, NSWindowBackingLocationDefault, NSWindowBackingLocationMainMemory, NSWindowBackingLocationVideoMemory, NSWindowButton, NSWindowCloseButton, NSWindowCollectionBehavior, NSWindowCollectionBehaviorCanJoinAllSpaces, NSWindowCollectionBehaviorDefault, NSWindowCollectionBehaviorFullScreenAllowsTiling, diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 6ff2559f1..77e04c797 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -32,5 +32,3 @@ pub const NSQualityOfServiceUserInitiated: NSQualityOfService = 0x19; pub const NSQualityOfServiceUtility: NSQualityOfService = 0x11; pub const NSQualityOfServiceBackground: NSQualityOfService = 0x09; pub const NSQualityOfServiceDefault: NSQualityOfService = -1; - -pub static NSNotFound: NSInteger = todo; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index ce15f8e84..62b7f3ec5 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -804,9 +804,9 @@ mod __exported { }; pub use super::NSObjCRuntime::{ NSComparator, NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, - NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, NSNotFound, - NSOrderedAscending, NSOrderedDescending, NSOrderedSame, NSQualityOfService, - NSQualityOfServiceBackground, NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, + NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, NSOrderedAscending, + NSOrderedDescending, NSOrderedSame, NSQualityOfService, NSQualityOfServiceBackground, + NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, NSSortOptions, NSSortStable, }; From c18ce67d2fc73e0d9efd0b560de529cf8f79b509 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 04:19:54 +0100 Subject: [PATCH 112/131] Fix anonymous enum types --- crates/header-translator/src/stmt.rs | 2 +- .../src/generated/AppKit/AppKitErrors.rs | 42 ++--- .../src/generated/AppKit/NSApplication.rs | 8 +- .../generated/AppKit/NSAttributedString.rs | 4 +- crates/icrate/src/generated/AppKit/NSCell.rs | 14 +- crates/icrate/src/generated/AppKit/NSEvent.rs | 144 +++++++-------- crates/icrate/src/generated/AppKit/NSFont.rs | 4 +- .../src/generated/AppKit/NSFontDescriptor.rs | 42 ++--- .../src/generated/AppKit/NSFontPanel.rs | 38 ++-- .../src/generated/AppKit/NSGlyphGenerator.rs | 6 +- .../icrate/src/generated/AppKit/NSImageRep.rs | 2 +- .../src/generated/AppKit/NSInterfaceStyle.rs | 8 +- .../src/generated/AppKit/NSLayoutManager.rs | 8 +- .../icrate/src/generated/AppKit/NSOpenGL.rs | 84 ++++----- .../src/generated/AppKit/NSOutlineView.rs | 2 +- crates/icrate/src/generated/AppKit/NSPanel.rs | 12 +- .../src/generated/AppKit/NSSavePanel.rs | 4 +- crates/icrate/src/generated/AppKit/NSText.rs | 44 ++--- .../src/generated/AppKit/NSTextAttachment.rs | 2 +- .../icrate/src/generated/AppKit/NSWindow.rs | 4 +- .../generated/Foundation/FoundationErrors.rs | 166 +++++++++--------- .../src/generated/Foundation/NSBundle.rs | 10 +- .../src/generated/Foundation/NSCalendar.rs | 4 +- .../generated/Foundation/NSCharacterSet.rs | 2 +- .../src/generated/Foundation/NSProcessInfo.rs | 14 +- .../generated/Foundation/NSScriptCommand.rs | 22 +-- .../Foundation/NSScriptObjectSpecifiers.rs | 14 +- .../src/generated/Foundation/NSString.rs | 48 ++--- .../Foundation/NSTextCheckingResult.rs | 7 +- .../src/generated/Foundation/NSURLError.rs | 104 +++++------ .../Foundation/NSUbiquitousKeyValueStore.rs | 8 +- .../icrate/src/generated/Foundation/NSZone.rs | 4 +- 32 files changed, 439 insertions(+), 438 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 96d022225..cf42b20b4 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -836,7 +836,7 @@ impl fmt::Display for Stmt { } } else { for (variant_name, expr) in variants { - writeln!(f, "pub const {variant_name}: i32 = {expr};")?; + writeln!(f, "pub const {variant_name}: {ty} = {expr};")?; } } } diff --git a/crates/icrate/src/generated/AppKit/AppKitErrors.rs b/crates/icrate/src/generated/AppKit/AppKitErrors.rs index 2c351560e..6a763d557 100644 --- a/crates/icrate/src/generated/AppKit/AppKitErrors.rs +++ b/crates/icrate/src/generated/AppKit/AppKitErrors.rs @@ -4,24 +4,24 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -pub const NSTextReadInapplicableDocumentTypeError: i32 = 65806; -pub const NSTextWriteInapplicableDocumentTypeError: i32 = 66062; -pub const NSTextReadWriteErrorMinimum: i32 = 65792; -pub const NSTextReadWriteErrorMaximum: i32 = 66303; -pub const NSFontAssetDownloadError: i32 = 66304; -pub const NSFontErrorMinimum: i32 = 66304; -pub const NSFontErrorMaximum: i32 = 66335; -pub const NSServiceApplicationNotFoundError: i32 = 66560; -pub const NSServiceApplicationLaunchFailedError: i32 = 66561; -pub const NSServiceRequestTimedOutError: i32 = 66562; -pub const NSServiceInvalidPasteboardDataError: i32 = 66563; -pub const NSServiceMalformedServiceDictionaryError: i32 = 66564; -pub const NSServiceMiscellaneousError: i32 = 66800; -pub const NSServiceErrorMinimum: i32 = 66560; -pub const NSServiceErrorMaximum: i32 = 66817; -pub const NSSharingServiceNotConfiguredError: i32 = 67072; -pub const NSSharingServiceErrorMinimum: i32 = 67072; -pub const NSSharingServiceErrorMaximum: i32 = 67327; -pub const NSWorkspaceAuthorizationInvalidError: i32 = 67328; -pub const NSWorkspaceErrorMinimum: i32 = 67328; -pub const NSWorkspaceErrorMaximum: i32 = 67455; +pub const NSTextReadInapplicableDocumentTypeError: c_uint = 65806; +pub const NSTextWriteInapplicableDocumentTypeError: c_uint = 66062; +pub const NSTextReadWriteErrorMinimum: c_uint = 65792; +pub const NSTextReadWriteErrorMaximum: c_uint = 66303; +pub const NSFontAssetDownloadError: c_uint = 66304; +pub const NSFontErrorMinimum: c_uint = 66304; +pub const NSFontErrorMaximum: c_uint = 66335; +pub const NSServiceApplicationNotFoundError: c_uint = 66560; +pub const NSServiceApplicationLaunchFailedError: c_uint = 66561; +pub const NSServiceRequestTimedOutError: c_uint = 66562; +pub const NSServiceInvalidPasteboardDataError: c_uint = 66563; +pub const NSServiceMalformedServiceDictionaryError: c_uint = 66564; +pub const NSServiceMiscellaneousError: c_uint = 66800; +pub const NSServiceErrorMinimum: c_uint = 66560; +pub const NSServiceErrorMaximum: c_uint = 66817; +pub const NSSharingServiceNotConfiguredError: c_uint = 67072; +pub const NSSharingServiceErrorMinimum: c_uint = 67072; +pub const NSSharingServiceErrorMaximum: c_uint = 67327; +pub const NSWorkspaceAuthorizationInvalidError: c_uint = 67328; +pub const NSWorkspaceErrorMinimum: c_uint = 67328; +pub const NSWorkspaceErrorMaximum: c_uint = 67455; diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index b796ea873..cf4674ac9 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -146,7 +146,7 @@ pub static NSModalResponseAbort: NSModalResponse = -1001; pub static NSModalResponseContinue: NSModalResponse = -1002; -pub const NSUpdateWindowsRunLoopOrdering: i32 = 500000; +pub const NSUpdateWindowsRunLoopOrdering: c_uint = 500000; pub type NSApplicationPresentationOptions = NSUInteger; pub const NSApplicationPresentationDefault: NSApplicationPresentationOptions = 0; @@ -719,9 +719,9 @@ extern "C" { pub static NSApplicationDidChangeOcclusionStateNotification: &'static NSNotificationName; } -pub const NSRunStoppedResponse: i32 = -1000; -pub const NSRunAbortedResponse: i32 = -1001; -pub const NSRunContinuesResponse: i32 = -1002; +pub const NSRunStoppedResponse: c_int = -1000; +pub const NSRunAbortedResponse: c_int = -1001; +pub const NSRunContinuesResponse: c_int = -1002; extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index 6a424411f..ba864552e 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -696,8 +696,8 @@ extern "C" { pub static NSUsesScreenFontsDocumentAttribute: &'static NSAttributedStringKey; } -pub const NSNoUnderlineStyle: i32 = 0; -pub const NSSingleUnderlineStyle: i32 = 1; +pub const NSNoUnderlineStyle: c_uint = 0; +pub const NSSingleUnderlineStyle: c_uint = 1; extern "C" { pub static NSUnderlineStrikethroughMask: NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index 346a165d9..ecdfe3a42 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -711,10 +711,10 @@ extern "C" { pub static NSControlTintDidChangeNotification: &'static NSNotificationName; } -pub const NSAnyType: i32 = 0; -pub const NSIntType: i32 = 1; -pub const NSPositiveIntType: i32 = 2; -pub const NSFloatType: i32 = 3; -pub const NSPositiveFloatType: i32 = 4; -pub const NSDoubleType: i32 = 6; -pub const NSPositiveDoubleType: i32 = 7; +pub const NSAnyType: c_uint = 0; +pub const NSIntType: c_uint = 1; +pub const NSPositiveIntType: c_uint = 2; +pub const NSFloatType: c_uint = 3; +pub const NSPositiveFloatType: c_uint = 4; +pub const NSDoubleType: c_uint = 6; +pub const NSPositiveDoubleType: c_uint = 7; diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 0d0919dd0..19f30df5b 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -609,75 +609,75 @@ extern_methods!( } ); -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; +pub const NSUpArrowFunctionKey: c_uint = 0xF700; +pub const NSDownArrowFunctionKey: c_uint = 0xF701; +pub const NSLeftArrowFunctionKey: c_uint = 0xF702; +pub const NSRightArrowFunctionKey: c_uint = 0xF703; +pub const NSF1FunctionKey: c_uint = 0xF704; +pub const NSF2FunctionKey: c_uint = 0xF705; +pub const NSF3FunctionKey: c_uint = 0xF706; +pub const NSF4FunctionKey: c_uint = 0xF707; +pub const NSF5FunctionKey: c_uint = 0xF708; +pub const NSF6FunctionKey: c_uint = 0xF709; +pub const NSF7FunctionKey: c_uint = 0xF70A; +pub const NSF8FunctionKey: c_uint = 0xF70B; +pub const NSF9FunctionKey: c_uint = 0xF70C; +pub const NSF10FunctionKey: c_uint = 0xF70D; +pub const NSF11FunctionKey: c_uint = 0xF70E; +pub const NSF12FunctionKey: c_uint = 0xF70F; +pub const NSF13FunctionKey: c_uint = 0xF710; +pub const NSF14FunctionKey: c_uint = 0xF711; +pub const NSF15FunctionKey: c_uint = 0xF712; +pub const NSF16FunctionKey: c_uint = 0xF713; +pub const NSF17FunctionKey: c_uint = 0xF714; +pub const NSF18FunctionKey: c_uint = 0xF715; +pub const NSF19FunctionKey: c_uint = 0xF716; +pub const NSF20FunctionKey: c_uint = 0xF717; +pub const NSF21FunctionKey: c_uint = 0xF718; +pub const NSF22FunctionKey: c_uint = 0xF719; +pub const NSF23FunctionKey: c_uint = 0xF71A; +pub const NSF24FunctionKey: c_uint = 0xF71B; +pub const NSF25FunctionKey: c_uint = 0xF71C; +pub const NSF26FunctionKey: c_uint = 0xF71D; +pub const NSF27FunctionKey: c_uint = 0xF71E; +pub const NSF28FunctionKey: c_uint = 0xF71F; +pub const NSF29FunctionKey: c_uint = 0xF720; +pub const NSF30FunctionKey: c_uint = 0xF721; +pub const NSF31FunctionKey: c_uint = 0xF722; +pub const NSF32FunctionKey: c_uint = 0xF723; +pub const NSF33FunctionKey: c_uint = 0xF724; +pub const NSF34FunctionKey: c_uint = 0xF725; +pub const NSF35FunctionKey: c_uint = 0xF726; +pub const NSInsertFunctionKey: c_uint = 0xF727; +pub const NSDeleteFunctionKey: c_uint = 0xF728; +pub const NSHomeFunctionKey: c_uint = 0xF729; +pub const NSBeginFunctionKey: c_uint = 0xF72A; +pub const NSEndFunctionKey: c_uint = 0xF72B; +pub const NSPageUpFunctionKey: c_uint = 0xF72C; +pub const NSPageDownFunctionKey: c_uint = 0xF72D; +pub const NSPrintScreenFunctionKey: c_uint = 0xF72E; +pub const NSScrollLockFunctionKey: c_uint = 0xF72F; +pub const NSPauseFunctionKey: c_uint = 0xF730; +pub const NSSysReqFunctionKey: c_uint = 0xF731; +pub const NSBreakFunctionKey: c_uint = 0xF732; +pub const NSResetFunctionKey: c_uint = 0xF733; +pub const NSStopFunctionKey: c_uint = 0xF734; +pub const NSMenuFunctionKey: c_uint = 0xF735; +pub const NSUserFunctionKey: c_uint = 0xF736; +pub const NSSystemFunctionKey: c_uint = 0xF737; +pub const NSPrintFunctionKey: c_uint = 0xF738; +pub const NSClearLineFunctionKey: c_uint = 0xF739; +pub const NSClearDisplayFunctionKey: c_uint = 0xF73A; +pub const NSInsertLineFunctionKey: c_uint = 0xF73B; +pub const NSDeleteLineFunctionKey: c_uint = 0xF73C; +pub const NSInsertCharFunctionKey: c_uint = 0xF73D; +pub const NSDeleteCharFunctionKey: c_uint = 0xF73E; +pub const NSPrevFunctionKey: c_uint = 0xF73F; +pub const NSNextFunctionKey: c_uint = 0xF740; +pub const NSSelectFunctionKey: c_uint = 0xF741; +pub const NSExecuteFunctionKey: c_uint = 0xF742; +pub const NSUndoFunctionKey: c_uint = 0xF743; +pub const NSRedoFunctionKey: c_uint = 0xF744; +pub const NSFindFunctionKey: c_uint = 0xF745; +pub const NSHelpFunctionKey: c_uint = 0xF746; +pub const NSModeSwitchFunctionKey: c_uint = 0xF747; diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 5f7fdaf32..3447ad525 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -227,8 +227,8 @@ extern "C" { pub type NSGlyph = c_uint; -pub const NSControlGlyph: i32 = 0x00FFFFFF; -pub const NSNullGlyph: i32 = 0x0; +pub const NSControlGlyph: c_uint = 0x00FFFFFF; +pub const NSNullGlyph: c_uint = 0x0; pub type NSFontRenderingMode = NSUInteger; pub const NSFontDefaultRenderingMode: NSFontRenderingMode = 0; diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index fe66bd0d7..3117db116 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -353,27 +353,27 @@ extern "C" { pub type NSFontFamilyClass = u32; -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; +pub const NSFontUnknownClass: c_int = 0 << 28; +pub const NSFontOldStyleSerifsClass: c_int = 1 << 28; +pub const NSFontTransitionalSerifsClass: c_int = 2 << 28; +pub const NSFontModernSerifsClass: c_int = 3 << 28; +pub const NSFontClarendonSerifsClass: c_int = 4 << 28; +pub const NSFontSlabSerifsClass: c_int = 5 << 28; +pub const NSFontFreeformSerifsClass: c_int = 7 << 28; +pub const NSFontSansSerifClass: c_int = 8 << 28; +pub const NSFontOrnamentalsClass: c_int = 9 << 28; +pub const NSFontScriptsClass: c_int = 10 << 28; +pub const NSFontSymbolicClass: c_int = 12 << 28; + +pub const NSFontFamilyClassMask: c_uint = 0xF0000000; + +pub const NSFontItalicTrait: c_uint = 1 << 0; +pub const NSFontBoldTrait: c_uint = 1 << 1; +pub const NSFontExpandedTrait: c_uint = 1 << 5; +pub const NSFontCondensedTrait: c_uint = 1 << 6; +pub const NSFontMonoSpaceTrait: c_uint = 1 << 10; +pub const NSFontVerticalTrait: c_uint = 1 << 11; +pub const NSFontUIOptimizedTrait: c_uint = 1 << 12; extern "C" { pub static NSFontColorAttribute: &'static NSString; diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index d9430d9de..2b6eb5492 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -74,22 +74,22 @@ extern_methods!( } ); -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; -pub const NSFPSetButton: i32 = 132; -pub const NSFPPreviewField: i32 = 128; -pub const NSFPSizeField: i32 = 129; -pub const NSFPSizeTitle: i32 = 133; -pub const NSFPCurrentField: i32 = 134; +pub const NSFontPanelFaceModeMask: c_uint = 1 << 0; +pub const NSFontPanelSizeModeMask: c_uint = 1 << 1; +pub const NSFontPanelCollectionModeMask: c_uint = 1 << 2; +pub const NSFontPanelUnderlineEffectModeMask: c_uint = 1 << 8; +pub const NSFontPanelStrikethroughEffectModeMask: c_uint = 1 << 9; +pub const NSFontPanelTextColorEffectModeMask: c_uint = 1 << 10; +pub const NSFontPanelDocumentColorEffectModeMask: c_uint = 1 << 11; +pub const NSFontPanelShadowEffectModeMask: c_uint = 1 << 12; +pub const NSFontPanelAllEffectsModeMask: c_uint = 0xFFF00; +pub const NSFontPanelStandardModesMask: c_uint = 0xFFFF; +pub const NSFontPanelAllModesMask: c_uint = 0xFFFFFFFF; + +pub const NSFPPreviewButton: c_uint = 131; +pub const NSFPRevertButton: c_uint = 130; +pub const NSFPSetButton: c_uint = 132; +pub const NSFPPreviewField: c_uint = 128; +pub const NSFPSizeField: c_uint = 129; +pub const NSFPSizeTitle: c_uint = 133; +pub const NSFPCurrentField: c_uint = 134; diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index daea4f455..723a4d76c 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs @@ -4,9 +4,9 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -pub const NSShowControlGlyphs: i32 = 1 << 0; -pub const NSShowInvisibleGlyphs: i32 = 1 << 1; -pub const NSWantsBidiLevels: i32 = 1 << 2; +pub const NSShowControlGlyphs: c_uint = 1 << 0; +pub const NSShowInvisibleGlyphs: c_uint = 1 << 1; +pub const NSWantsBidiLevels: c_uint = 1 << 2; pub type NSGlyphStorage = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index a833cb150..bbc7d81fb 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -6,7 +6,7 @@ use crate::Foundation::*; pub type NSImageHintKey = NSString; -pub const NSImageRepMatchesDevice: i32 = 0; +pub const NSImageRepMatchesDevice: c_uint = 0; pub type NSImageLayoutDirection = NSInteger; pub const NSImageLayoutDirectionUnspecified: NSImageLayoutDirection = -1; diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs index c2a3e0c08..d49ccdc5b 100644 --- a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -4,10 +4,10 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -pub const NSNoInterfaceStyle: i32 = 0; -pub const NSNextStepInterfaceStyle: i32 = 1; -pub const NSWindows95InterfaceStyle: i32 = 2; -pub const NSMacintoshInterfaceStyle: i32 = 3; +pub const NSNoInterfaceStyle: c_uint = 0; +pub const NSNextStepInterfaceStyle: c_uint = 1; +pub const NSWindows95InterfaceStyle: c_uint = 2; +pub const NSMacintoshInterfaceStyle: c_uint = 3; pub type NSInterfaceStyle = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index 2acb5381d..1375c88c2 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -728,10 +728,10 @@ extern_methods!( pub type NSLayoutManagerDelegate = NSObject; -pub const NSGlyphAttributeSoft: i32 = 0; -pub const NSGlyphAttributeElastic: i32 = 1; -pub const NSGlyphAttributeBidiLevel: i32 = 2; -pub const NSGlyphAttributeInscribe: i32 = 5; +pub const NSGlyphAttributeSoft: c_uint = 0; +pub const NSGlyphAttributeElastic: c_uint = 1; +pub const NSGlyphAttributeBidiLevel: c_uint = 2; +pub const NSGlyphAttributeInscribe: c_uint = 5; pub type NSGlyphInscription = NSUInteger; pub const NSGlyphInscribeBase: NSGlyphInscription = 0; diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index 36b498095..7cacecbba 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -11,51 +11,51 @@ pub const NSOpenGLGORetainRenderers: NSOpenGLGlobalOption = 503; pub const NSOpenGLGOUseBuildCache: NSOpenGLGlobalOption = 506; pub const NSOpenGLGOResetLibrary: NSOpenGLGlobalOption = 504; -pub const NSOpenGLPFAAllRenderers: i32 = 1; -pub const NSOpenGLPFATripleBuffer: i32 = 3; -pub const NSOpenGLPFADoubleBuffer: i32 = 5; -pub const NSOpenGLPFAAuxBuffers: i32 = 7; -pub const NSOpenGLPFAColorSize: i32 = 8; -pub const NSOpenGLPFAAlphaSize: i32 = 11; -pub const NSOpenGLPFADepthSize: i32 = 12; -pub const NSOpenGLPFAStencilSize: i32 = 13; -pub const NSOpenGLPFAAccumSize: i32 = 14; -pub const NSOpenGLPFAMinimumPolicy: i32 = 51; -pub const NSOpenGLPFAMaximumPolicy: i32 = 52; -pub const NSOpenGLPFASampleBuffers: i32 = 55; -pub const NSOpenGLPFASamples: i32 = 56; -pub const NSOpenGLPFAAuxDepthStencil: i32 = 57; -pub const NSOpenGLPFAColorFloat: i32 = 58; -pub const NSOpenGLPFAMultisample: i32 = 59; -pub const NSOpenGLPFASupersample: i32 = 60; -pub const NSOpenGLPFASampleAlpha: i32 = 61; -pub const NSOpenGLPFARendererID: i32 = 70; -pub const NSOpenGLPFANoRecovery: i32 = 72; -pub const NSOpenGLPFAAccelerated: i32 = 73; -pub const NSOpenGLPFAClosestPolicy: i32 = 74; -pub const NSOpenGLPFABackingStore: i32 = 76; -pub const NSOpenGLPFAScreenMask: i32 = 84; -pub const NSOpenGLPFAAllowOfflineRenderers: i32 = 96; -pub const NSOpenGLPFAAcceleratedCompute: i32 = 97; -pub const NSOpenGLPFAOpenGLProfile: i32 = 99; -pub const NSOpenGLPFAVirtualScreenCount: i32 = 128; -pub const NSOpenGLPFAStereo: i32 = 6; -pub const NSOpenGLPFAOffScreen: i32 = 53; -pub const NSOpenGLPFAFullScreen: i32 = 54; -pub const NSOpenGLPFASingleRenderer: i32 = 71; -pub const NSOpenGLPFARobust: i32 = 75; -pub const NSOpenGLPFAMPSafe: i32 = 78; -pub const NSOpenGLPFAWindow: i32 = 80; -pub const NSOpenGLPFAMultiScreen: i32 = 81; -pub const NSOpenGLPFACompliant: i32 = 83; -pub const NSOpenGLPFAPixelBuffer: i32 = 90; -pub const NSOpenGLPFARemotePixelBuffer: i32 = 91; +pub const NSOpenGLPFAAllRenderers: c_uint = 1; +pub const NSOpenGLPFATripleBuffer: c_uint = 3; +pub const NSOpenGLPFADoubleBuffer: c_uint = 5; +pub const NSOpenGLPFAAuxBuffers: c_uint = 7; +pub const NSOpenGLPFAColorSize: c_uint = 8; +pub const NSOpenGLPFAAlphaSize: c_uint = 11; +pub const NSOpenGLPFADepthSize: c_uint = 12; +pub const NSOpenGLPFAStencilSize: c_uint = 13; +pub const NSOpenGLPFAAccumSize: c_uint = 14; +pub const NSOpenGLPFAMinimumPolicy: c_uint = 51; +pub const NSOpenGLPFAMaximumPolicy: c_uint = 52; +pub const NSOpenGLPFASampleBuffers: c_uint = 55; +pub const NSOpenGLPFASamples: c_uint = 56; +pub const NSOpenGLPFAAuxDepthStencil: c_uint = 57; +pub const NSOpenGLPFAColorFloat: c_uint = 58; +pub const NSOpenGLPFAMultisample: c_uint = 59; +pub const NSOpenGLPFASupersample: c_uint = 60; +pub const NSOpenGLPFASampleAlpha: c_uint = 61; +pub const NSOpenGLPFARendererID: c_uint = 70; +pub const NSOpenGLPFANoRecovery: c_uint = 72; +pub const NSOpenGLPFAAccelerated: c_uint = 73; +pub const NSOpenGLPFAClosestPolicy: c_uint = 74; +pub const NSOpenGLPFABackingStore: c_uint = 76; +pub const NSOpenGLPFAScreenMask: c_uint = 84; +pub const NSOpenGLPFAAllowOfflineRenderers: c_uint = 96; +pub const NSOpenGLPFAAcceleratedCompute: c_uint = 97; +pub const NSOpenGLPFAOpenGLProfile: c_uint = 99; +pub const NSOpenGLPFAVirtualScreenCount: c_uint = 128; +pub const NSOpenGLPFAStereo: c_uint = 6; +pub const NSOpenGLPFAOffScreen: c_uint = 53; +pub const NSOpenGLPFAFullScreen: c_uint = 54; +pub const NSOpenGLPFASingleRenderer: c_uint = 71; +pub const NSOpenGLPFARobust: c_uint = 75; +pub const NSOpenGLPFAMPSafe: c_uint = 78; +pub const NSOpenGLPFAWindow: c_uint = 80; +pub const NSOpenGLPFAMultiScreen: c_uint = 81; +pub const NSOpenGLPFACompliant: c_uint = 83; +pub const NSOpenGLPFAPixelBuffer: c_uint = 90; +pub const NSOpenGLPFARemotePixelBuffer: c_uint = 91; pub type NSOpenGLPixelFormatAttribute = u32; -pub const NSOpenGLProfileVersionLegacy: i32 = 0x1000; -pub const NSOpenGLProfileVersion3_2Core: i32 = 0x3200; -pub const NSOpenGLProfileVersion4_1Core: i32 = 0x4100; +pub const NSOpenGLProfileVersionLegacy: c_uint = 0x1000; +pub const NSOpenGLProfileVersion3_2Core: c_uint = 0x3200; +pub const NSOpenGLProfileVersion4_1Core: c_uint = 0x4100; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index 73754efa4..a64851df2 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -pub const NSOutlineViewDropOnItemIndex: i32 = -1; +pub const NSOutlineViewDropOnItemIndex: c_int = -1; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index d324ccb85..42cc00b47 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -35,10 +35,10 @@ extern_methods!( } ); -pub const NSAlertDefaultReturn: i32 = 1; -pub const NSAlertAlternateReturn: i32 = 0; -pub const NSAlertOtherReturn: i32 = -1; -pub const NSAlertErrorReturn: i32 = -2; +pub const NSAlertDefaultReturn: c_int = 1; +pub const NSAlertAlternateReturn: c_int = 0; +pub const NSAlertOtherReturn: c_int = -1; +pub const NSAlertErrorReturn: c_int = -2; -pub const NSOKButton: i32 = NSModalResponseOK; -pub const NSCancelButton: i32 = NSModalResponseCancel; +pub const NSOKButton: c_uint = NSModalResponseOK; +pub const NSCancelButton: c_uint = NSModalResponseCancel; diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index e4df1246a..1ee134465 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -4,8 +4,8 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -pub const NSFileHandlingPanelCancelButton: i32 = NSModalResponseCancel; -pub const NSFileHandlingPanelOKButton: i32 = NSModalResponseOK; +pub const NSFileHandlingPanelCancelButton: c_uint = NSModalResponseCancel; +pub const NSFileHandlingPanelOKButton: c_uint = NSModalResponseOK; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index a5ac2846a..06600e7f1 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -251,16 +251,16 @@ extern_methods!( } ); -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 const NSEnterCharacter: c_uint = 0x0003; +pub const NSBackspaceCharacter: c_uint = 0x0008; +pub const NSTabCharacter: c_uint = 0x0009; +pub const NSNewlineCharacter: c_uint = 0x000a; +pub const NSFormFeedCharacter: c_uint = 0x000c; +pub const NSCarriageReturnCharacter: c_uint = 0x000d; +pub const NSBackTabCharacter: c_uint = 0x0019; +pub const NSDeleteCharacter: c_uint = 0x007f; +pub const NSLineSeparatorCharacter: c_uint = 0x2028; +pub const NSParagraphSeparatorCharacter: c_uint = 0x2029; pub type NSTextMovement = NSInteger; pub const NSTextMovementReturn: NSTextMovement = 0x10; @@ -289,21 +289,21 @@ extern "C" { pub static NSTextMovementUserInfoKey: &'static NSString; } -pub const NSIllegalTextMovement: i32 = 0; -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 const NSIllegalTextMovement: c_uint = 0; +pub const NSReturnTextMovement: c_uint = 0x10; +pub const NSTabTextMovement: c_uint = 0x11; +pub const NSBacktabTextMovement: c_uint = 0x12; +pub const NSLeftTextMovement: c_uint = 0x13; +pub const NSRightTextMovement: c_uint = 0x14; +pub const NSUpTextMovement: c_uint = 0x15; +pub const NSDownTextMovement: c_uint = 0x16; +pub const NSCancelTextMovement: c_uint = 0x17; +pub const NSOtherTextMovement: c_uint = 0; pub type NSTextDelegate = NSObject; -pub const NSTextWritingDirectionEmbedding: i32 = 0 << 1; -pub const NSTextWritingDirectionOverride: i32 = 1 << 1; +pub const NSTextWritingDirectionEmbedding: c_uint = 0 << 1; +pub const NSTextWritingDirectionOverride: c_uint = 1 << 1; pub static NSLeftTextAlignment: NSTextAlignment = NSTextAlignmentLeft; diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index dd88f20a2..3d981666d 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::AppKit::*; use crate::Foundation::*; -pub const NSAttachmentCharacter: i32 = 0xFFFC; +pub const NSAttachmentCharacter: c_uint = 0xFFFC; pub type NSTextAttachmentContainer = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index e04e7e848..28f7a2ccf 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -27,8 +27,8 @@ pub static NSModalResponseOK: NSModalResponse = 1; pub static NSModalResponseCancel: NSModalResponse = 0; -pub const NSDisplayWindowRunLoopOrdering: i32 = 600000; -pub const NSResetCursorRectsRunLoopOrdering: i32 = 700000; +pub const NSDisplayWindowRunLoopOrdering: c_uint = 600000; +pub const NSResetCursorRectsRunLoopOrdering: c_uint = 700000; pub type NSWindowSharingType = NSUInteger; pub const NSWindowSharingNone: NSWindowSharingType = 0; diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs index 8ce4150ac..2c5bf1492 100644 --- a/crates/icrate/src/generated/Foundation/FoundationErrors.rs +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -3,86 +3,86 @@ use crate::common::*; use crate::Foundation::*; -pub const NSFileNoSuchFileError: i32 = 4; -pub const NSFileLockingError: i32 = 255; -pub const NSFileReadUnknownError: i32 = 256; -pub const NSFileReadNoPermissionError: i32 = 257; -pub const NSFileReadInvalidFileNameError: i32 = 258; -pub const NSFileReadCorruptFileError: i32 = 259; -pub const NSFileReadNoSuchFileError: i32 = 260; -pub const NSFileReadInapplicableStringEncodingError: i32 = 261; -pub const NSFileReadUnsupportedSchemeError: i32 = 262; -pub const NSFileReadTooLargeError: i32 = 263; -pub const NSFileReadUnknownStringEncodingError: i32 = 264; -pub const NSFileWriteUnknownError: i32 = 512; -pub const NSFileWriteNoPermissionError: i32 = 513; -pub const NSFileWriteInvalidFileNameError: i32 = 514; -pub const NSFileWriteFileExistsError: i32 = 516; -pub const NSFileWriteInapplicableStringEncodingError: i32 = 517; -pub const NSFileWriteUnsupportedSchemeError: i32 = 518; -pub const NSFileWriteOutOfSpaceError: i32 = 640; -pub const NSFileWriteVolumeReadOnlyError: i32 = 642; -pub const NSFileManagerUnmountUnknownError: i32 = 768; -pub const NSFileManagerUnmountBusyError: i32 = 769; -pub const NSKeyValueValidationError: i32 = 1024; -pub const NSFormattingError: i32 = 2048; -pub const NSUserCancelledError: i32 = 3072; -pub const NSFeatureUnsupportedError: i32 = 3328; -pub const NSExecutableNotLoadableError: i32 = 3584; -pub const NSExecutableArchitectureMismatchError: i32 = 3585; -pub const NSExecutableRuntimeMismatchError: i32 = 3586; -pub const NSExecutableLoadError: i32 = 3587; -pub const NSExecutableLinkError: i32 = 3588; -pub const NSFileErrorMinimum: i32 = 0; -pub const NSFileErrorMaximum: i32 = 1023; -pub const NSValidationErrorMinimum: i32 = 1024; -pub const NSValidationErrorMaximum: i32 = 2047; -pub const NSExecutableErrorMinimum: i32 = 3584; -pub const NSExecutableErrorMaximum: i32 = 3839; -pub const NSFormattingErrorMinimum: i32 = 2048; -pub const NSFormattingErrorMaximum: i32 = 2559; -pub const NSPropertyListReadCorruptError: i32 = 3840; -pub const NSPropertyListReadUnknownVersionError: i32 = 3841; -pub const NSPropertyListReadStreamError: i32 = 3842; -pub const NSPropertyListWriteStreamError: i32 = 3851; -pub const NSPropertyListWriteInvalidError: i32 = 3852; -pub const NSPropertyListErrorMinimum: i32 = 3840; -pub const NSPropertyListErrorMaximum: i32 = 4095; -pub const NSXPCConnectionInterrupted: i32 = 4097; -pub const NSXPCConnectionInvalid: i32 = 4099; -pub const NSXPCConnectionReplyInvalid: i32 = 4101; -pub const NSXPCConnectionErrorMinimum: i32 = 4096; -pub const NSXPCConnectionErrorMaximum: i32 = 4224; -pub const NSUbiquitousFileUnavailableError: i32 = 4353; -pub const NSUbiquitousFileNotUploadedDueToQuotaError: i32 = 4354; -pub const NSUbiquitousFileUbiquityServerNotAvailable: i32 = 4355; -pub const NSUbiquitousFileErrorMinimum: i32 = 4352; -pub const NSUbiquitousFileErrorMaximum: i32 = 4607; -pub const NSUserActivityHandoffFailedError: i32 = 4608; -pub const NSUserActivityConnectionUnavailableError: i32 = 4609; -pub const NSUserActivityRemoteApplicationTimedOutError: i32 = 4610; -pub const NSUserActivityHandoffUserInfoTooLargeError: i32 = 4611; -pub const NSUserActivityErrorMinimum: i32 = 4608; -pub const NSUserActivityErrorMaximum: i32 = 4863; -pub const NSCoderReadCorruptError: i32 = 4864; -pub const NSCoderValueNotFoundError: i32 = 4865; -pub const NSCoderInvalidValueError: i32 = 4866; -pub const NSCoderErrorMinimum: i32 = 4864; -pub const NSCoderErrorMaximum: i32 = 4991; -pub const NSBundleErrorMinimum: i32 = 4992; -pub const NSBundleErrorMaximum: i32 = 5119; -pub const NSBundleOnDemandResourceOutOfSpaceError: i32 = 4992; -pub const NSBundleOnDemandResourceExceededMaximumSizeError: i32 = 4993; -pub const NSBundleOnDemandResourceInvalidTagError: i32 = 4994; -pub const NSCloudSharingNetworkFailureError: i32 = 5120; -pub const NSCloudSharingQuotaExceededError: i32 = 5121; -pub const NSCloudSharingTooManyParticipantsError: i32 = 5122; -pub const NSCloudSharingConflictError: i32 = 5123; -pub const NSCloudSharingNoPermissionError: i32 = 5124; -pub const NSCloudSharingOtherError: i32 = 5375; -pub const NSCloudSharingErrorMinimum: i32 = 5120; -pub const NSCloudSharingErrorMaximum: i32 = 5375; -pub const NSCompressionFailedError: i32 = 5376; -pub const NSDecompressionFailedError: i32 = 5377; -pub const NSCompressionErrorMinimum: i32 = 5376; -pub const NSCompressionErrorMaximum: i32 = 5503; +pub const NSFileNoSuchFileError: NSInteger = 4; +pub const NSFileLockingError: NSInteger = 255; +pub const NSFileReadUnknownError: NSInteger = 256; +pub const NSFileReadNoPermissionError: NSInteger = 257; +pub const NSFileReadInvalidFileNameError: NSInteger = 258; +pub const NSFileReadCorruptFileError: NSInteger = 259; +pub const NSFileReadNoSuchFileError: NSInteger = 260; +pub const NSFileReadInapplicableStringEncodingError: NSInteger = 261; +pub const NSFileReadUnsupportedSchemeError: NSInteger = 262; +pub const NSFileReadTooLargeError: NSInteger = 263; +pub const NSFileReadUnknownStringEncodingError: NSInteger = 264; +pub const NSFileWriteUnknownError: NSInteger = 512; +pub const NSFileWriteNoPermissionError: NSInteger = 513; +pub const NSFileWriteInvalidFileNameError: NSInteger = 514; +pub const NSFileWriteFileExistsError: NSInteger = 516; +pub const NSFileWriteInapplicableStringEncodingError: NSInteger = 517; +pub const NSFileWriteUnsupportedSchemeError: NSInteger = 518; +pub const NSFileWriteOutOfSpaceError: NSInteger = 640; +pub const NSFileWriteVolumeReadOnlyError: NSInteger = 642; +pub const NSFileManagerUnmountUnknownError: NSInteger = 768; +pub const NSFileManagerUnmountBusyError: NSInteger = 769; +pub const NSKeyValueValidationError: NSInteger = 1024; +pub const NSFormattingError: NSInteger = 2048; +pub const NSUserCancelledError: NSInteger = 3072; +pub const NSFeatureUnsupportedError: NSInteger = 3328; +pub const NSExecutableNotLoadableError: NSInteger = 3584; +pub const NSExecutableArchitectureMismatchError: NSInteger = 3585; +pub const NSExecutableRuntimeMismatchError: NSInteger = 3586; +pub const NSExecutableLoadError: NSInteger = 3587; +pub const NSExecutableLinkError: NSInteger = 3588; +pub const NSFileErrorMinimum: NSInteger = 0; +pub const NSFileErrorMaximum: NSInteger = 1023; +pub const NSValidationErrorMinimum: NSInteger = 1024; +pub const NSValidationErrorMaximum: NSInteger = 2047; +pub const NSExecutableErrorMinimum: NSInteger = 3584; +pub const NSExecutableErrorMaximum: NSInteger = 3839; +pub const NSFormattingErrorMinimum: NSInteger = 2048; +pub const NSFormattingErrorMaximum: NSInteger = 2559; +pub const NSPropertyListReadCorruptError: NSInteger = 3840; +pub const NSPropertyListReadUnknownVersionError: NSInteger = 3841; +pub const NSPropertyListReadStreamError: NSInteger = 3842; +pub const NSPropertyListWriteStreamError: NSInteger = 3851; +pub const NSPropertyListWriteInvalidError: NSInteger = 3852; +pub const NSPropertyListErrorMinimum: NSInteger = 3840; +pub const NSPropertyListErrorMaximum: NSInteger = 4095; +pub const NSXPCConnectionInterrupted: NSInteger = 4097; +pub const NSXPCConnectionInvalid: NSInteger = 4099; +pub const NSXPCConnectionReplyInvalid: NSInteger = 4101; +pub const NSXPCConnectionErrorMinimum: NSInteger = 4096; +pub const NSXPCConnectionErrorMaximum: NSInteger = 4224; +pub const NSUbiquitousFileUnavailableError: NSInteger = 4353; +pub const NSUbiquitousFileNotUploadedDueToQuotaError: NSInteger = 4354; +pub const NSUbiquitousFileUbiquityServerNotAvailable: NSInteger = 4355; +pub const NSUbiquitousFileErrorMinimum: NSInteger = 4352; +pub const NSUbiquitousFileErrorMaximum: NSInteger = 4607; +pub const NSUserActivityHandoffFailedError: NSInteger = 4608; +pub const NSUserActivityConnectionUnavailableError: NSInteger = 4609; +pub const NSUserActivityRemoteApplicationTimedOutError: NSInteger = 4610; +pub const NSUserActivityHandoffUserInfoTooLargeError: NSInteger = 4611; +pub const NSUserActivityErrorMinimum: NSInteger = 4608; +pub const NSUserActivityErrorMaximum: NSInteger = 4863; +pub const NSCoderReadCorruptError: NSInteger = 4864; +pub const NSCoderValueNotFoundError: NSInteger = 4865; +pub const NSCoderInvalidValueError: NSInteger = 4866; +pub const NSCoderErrorMinimum: NSInteger = 4864; +pub const NSCoderErrorMaximum: NSInteger = 4991; +pub const NSBundleErrorMinimum: NSInteger = 4992; +pub const NSBundleErrorMaximum: NSInteger = 5119; +pub const NSBundleOnDemandResourceOutOfSpaceError: NSInteger = 4992; +pub const NSBundleOnDemandResourceExceededMaximumSizeError: NSInteger = 4993; +pub const NSBundleOnDemandResourceInvalidTagError: NSInteger = 4994; +pub const NSCloudSharingNetworkFailureError: NSInteger = 5120; +pub const NSCloudSharingQuotaExceededError: NSInteger = 5121; +pub const NSCloudSharingTooManyParticipantsError: NSInteger = 5122; +pub const NSCloudSharingConflictError: NSInteger = 5123; +pub const NSCloudSharingNoPermissionError: NSInteger = 5124; +pub const NSCloudSharingOtherError: NSInteger = 5375; +pub const NSCloudSharingErrorMinimum: NSInteger = 5120; +pub const NSCloudSharingErrorMaximum: NSInteger = 5375; +pub const NSCompressionFailedError: NSInteger = 5376; +pub const NSDecompressionFailedError: NSInteger = 5377; +pub const NSCompressionErrorMinimum: NSInteger = 5376; +pub const NSCompressionErrorMaximum: NSInteger = 5503; diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 21c3779dc..1a5c26759 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -3,11 +3,11 @@ use crate::common::*; use crate::Foundation::*; -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; +pub const NSBundleExecutableArchitectureI386: c_uint = 0x00000007; +pub const NSBundleExecutableArchitecturePPC: c_uint = 0x00000012; +pub const NSBundleExecutableArchitectureX86_64: c_uint = 0x01000007; +pub const NSBundleExecutableArchitecturePPC64: c_uint = 0x01000012; +pub const NSBundleExecutableArchitectureARM64: c_uint = 0x0100000c; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index e736544b6..33c29896b 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -495,8 +495,8 @@ extern "C" { pub static NSCalendarDayChangedNotification: &'static NSNotificationName; } -pub const NSDateComponentUndefined: i32 = 9223372036854775807; -pub const NSUndefinedDateComponent: i32 = NSDateComponentUndefined; +pub const NSDateComponentUndefined: NSInteger = 9223372036854775807; +pub const NSUndefinedDateComponent: NSInteger = NSDateComponentUndefined; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 3ece92fd8..26f8526b5 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -3,7 +3,7 @@ use crate::common::*; use crate::Foundation::*; -pub const NSOpenStepUnicodeReservedBase: i32 = 0xF400; +pub const NSOpenStepUnicodeReservedBase: c_uint = 0xF400; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index b0d571461..0a515faf3 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -3,13 +3,13 @@ use crate::common::*; use crate::Foundation::*; -pub const NSWindowsNTOperatingSystem: i32 = 1; -pub const NSWindows95OperatingSystem: i32 = 2; -pub const NSSolarisOperatingSystem: i32 = 3; -pub const NSHPUXOperatingSystem: i32 = 4; -pub const NSMACHOperatingSystem: i32 = 5; -pub const NSSunOSOperatingSystem: i32 = 6; -pub const NSOSF1OperatingSystem: i32 = 7; +pub const NSWindowsNTOperatingSystem: c_uint = 1; +pub const NSWindows95OperatingSystem: c_uint = 2; +pub const NSSolarisOperatingSystem: c_uint = 3; +pub const NSHPUXOperatingSystem: c_uint = 4; +pub const NSMACHOperatingSystem: c_uint = 5; +pub const NSSunOSOperatingSystem: c_uint = 6; +pub const NSOSF1OperatingSystem: c_uint = 7; struct_impl!( pub struct NSOperatingSystemVersion { diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index c494358e4..2bd809708 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -3,17 +3,17 @@ use crate::common::*; use crate::Foundation::*; -pub const NSNoScriptError: i32 = 0; -pub const NSReceiverEvaluationScriptError: i32 = 1; -pub const NSKeySpecifierEvaluationScriptError: i32 = 2; -pub const NSArgumentEvaluationScriptError: i32 = 3; -pub const NSReceiversCantHandleCommandScriptError: i32 = 4; -pub const NSRequiredArgumentsMissingScriptError: i32 = 5; -pub const NSArgumentsWrongScriptError: i32 = 6; -pub const NSUnknownKeyScriptError: i32 = 7; -pub const NSInternalScriptError: i32 = 8; -pub const NSOperationNotSupportedForKeyScriptError: i32 = 9; -pub const NSCannotCreateScriptCommandError: i32 = 10; +pub const NSNoScriptError: NSInteger = 0; +pub const NSReceiverEvaluationScriptError: NSInteger = 1; +pub const NSKeySpecifierEvaluationScriptError: NSInteger = 2; +pub const NSArgumentEvaluationScriptError: NSInteger = 3; +pub const NSReceiversCantHandleCommandScriptError: NSInteger = 4; +pub const NSRequiredArgumentsMissingScriptError: NSInteger = 5; +pub const NSArgumentsWrongScriptError: NSInteger = 6; +pub const NSUnknownKeyScriptError: NSInteger = 7; +pub const NSInternalScriptError: NSInteger = 8; +pub const NSOperationNotSupportedForKeyScriptError: NSInteger = 9; +pub const NSCannotCreateScriptCommandError: NSInteger = 10; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index f1eefcc64..23528c7bd 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -3,13 +3,13 @@ use crate::common::*; use crate::Foundation::*; -pub const NSNoSpecifierError: i32 = 0; -pub const NSNoTopLevelContainersSpecifierError: i32 = 1; -pub const NSContainerSpecifierError: i32 = 2; -pub const NSUnknownKeySpecifierError: i32 = 3; -pub const NSInvalidIndexSpecifierError: i32 = 4; -pub const NSInternalSpecifierError: i32 = 5; -pub const NSOperationNotSupportedForKeySpecifierError: i32 = 6; +pub const NSNoSpecifierError: NSInteger = 0; +pub const NSNoTopLevelContainersSpecifierError: NSInteger = 1; +pub const NSContainerSpecifierError: NSInteger = 2; +pub const NSUnknownKeySpecifierError: NSInteger = 3; +pub const NSInvalidIndexSpecifierError: NSInteger = 4; +pub const NSInternalSpecifierError: NSInteger = 5; +pub const NSOperationNotSupportedForKeySpecifierError: NSInteger = 6; pub type NSInsertionPosition = NSUInteger; pub const NSPositionAfter: NSInsertionPosition = 0; diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index d3dec25fc..a1872cc79 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -18,29 +18,29 @@ pub const NSRegularExpressionSearch: NSStringCompareOptions = 1024; pub type NSStringEncoding = NSUInteger; -pub const NSASCIIStringEncoding: i32 = 1; -pub const NSNEXTSTEPStringEncoding: i32 = 2; -pub const NSJapaneseEUCStringEncoding: i32 = 3; -pub const NSUTF8StringEncoding: i32 = 4; -pub const NSISOLatin1StringEncoding: i32 = 5; -pub const NSSymbolStringEncoding: i32 = 6; -pub const NSNonLossyASCIIStringEncoding: i32 = 7; -pub const NSShiftJISStringEncoding: i32 = 8; -pub const NSISOLatin2StringEncoding: i32 = 9; -pub const NSUnicodeStringEncoding: i32 = 10; -pub const NSWindowsCP1251StringEncoding: i32 = 11; -pub const NSWindowsCP1252StringEncoding: i32 = 12; -pub const NSWindowsCP1253StringEncoding: i32 = 13; -pub const NSWindowsCP1254StringEncoding: i32 = 14; -pub const NSWindowsCP1250StringEncoding: i32 = 15; -pub const NSISO2022JPStringEncoding: i32 = 21; -pub const NSMacOSRomanStringEncoding: i32 = 30; -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 const NSASCIIStringEncoding: NSStringEncoding = 1; +pub const NSNEXTSTEPStringEncoding: NSStringEncoding = 2; +pub const NSJapaneseEUCStringEncoding: NSStringEncoding = 3; +pub const NSUTF8StringEncoding: NSStringEncoding = 4; +pub const NSISOLatin1StringEncoding: NSStringEncoding = 5; +pub const NSSymbolStringEncoding: NSStringEncoding = 6; +pub const NSNonLossyASCIIStringEncoding: NSStringEncoding = 7; +pub const NSShiftJISStringEncoding: NSStringEncoding = 8; +pub const NSISOLatin2StringEncoding: NSStringEncoding = 9; +pub const NSUnicodeStringEncoding: NSStringEncoding = 10; +pub const NSWindowsCP1251StringEncoding: NSStringEncoding = 11; +pub const NSWindowsCP1252StringEncoding: NSStringEncoding = 12; +pub const NSWindowsCP1253StringEncoding: NSStringEncoding = 13; +pub const NSWindowsCP1254StringEncoding: NSStringEncoding = 14; +pub const NSWindowsCP1250StringEncoding: NSStringEncoding = 15; +pub const NSISO2022JPStringEncoding: NSStringEncoding = 21; +pub const NSMacOSRomanStringEncoding: NSStringEncoding = 30; +pub const NSUTF16StringEncoding: NSStringEncoding = NSUnicodeStringEncoding; +pub const NSUTF16BigEndianStringEncoding: NSStringEncoding = 0x90000100; +pub const NSUTF16LittleEndianStringEncoding: NSStringEncoding = 0x94000100; +pub const NSUTF32StringEncoding: NSStringEncoding = 0x8c000100; +pub const NSUTF32BigEndianStringEncoding: NSStringEncoding = 0x98000100; +pub const NSUTF32LittleEndianStringEncoding: NSStringEncoding = 0x9c000100; pub type NSStringEncodingConversionOptions = NSUInteger; pub const NSStringEncodingConversionAllowLossy: NSStringEncodingConversionOptions = 1; @@ -922,7 +922,7 @@ extern_methods!( } ); -pub const NSProprietaryStringEncoding: i32 = 65536; +pub const NSProprietaryStringEncoding: NSStringEncoding = 65536; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index 7a6a72c36..a4733b579 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -20,9 +20,10 @@ pub const NSTextCheckingTypeTransitInformation: NSTextCheckingType = 1 << 12; pub type NSTextCheckingTypes = u64; -pub const NSTextCheckingAllSystemTypes: i32 = 0xffffffff; -pub const NSTextCheckingAllCustomTypes: i32 = 0xffffffff << 32; -pub const NSTextCheckingAllTypes: i32 = NSTextCheckingAllSystemTypes | NSTextCheckingAllCustomTypes; +pub const NSTextCheckingAllSystemTypes: NSTextCheckingTypes = 0xffffffff; +pub const NSTextCheckingAllCustomTypes: NSTextCheckingTypes = 0xffffffff << 32; +pub const NSTextCheckingAllTypes: NSTextCheckingTypes = + NSTextCheckingAllSystemTypes | NSTextCheckingAllCustomTypes; pub type NSTextCheckingKey = NSString; diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index f3c4dd4b1..9232e66ea 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -27,9 +27,9 @@ extern "C" { pub static NSURLErrorBackgroundTaskCancelledReasonKey: &'static NSString; } -pub const NSURLErrorCancelledReasonUserForceQuitApplication: i32 = 0; -pub const NSURLErrorCancelledReasonBackgroundUpdatesDisabled: i32 = 1; -pub const NSURLErrorCancelledReasonInsufficientSystemResources: i32 = 2; +pub const NSURLErrorCancelledReasonUserForceQuitApplication: NSInteger = 0; +pub const NSURLErrorCancelledReasonBackgroundUpdatesDisabled: NSInteger = 1; +pub const NSURLErrorCancelledReasonInsufficientSystemResources: NSInteger = 2; extern "C" { pub static NSURLErrorNetworkUnavailableReasonKey: &'static NSErrorUserInfoKey; @@ -40,52 +40,52 @@ pub const NSURLErrorNetworkUnavailableReasonCellular: NSURLErrorNetworkUnavailab pub const NSURLErrorNetworkUnavailableReasonExpensive: NSURLErrorNetworkUnavailableReason = 1; pub const NSURLErrorNetworkUnavailableReasonConstrained: NSURLErrorNetworkUnavailableReason = 2; -pub const NSURLErrorUnknown: i32 = -1; -pub const NSURLErrorCancelled: i32 = -999; -pub const NSURLErrorBadURL: i32 = -1000; -pub const NSURLErrorTimedOut: i32 = -1001; -pub const NSURLErrorUnsupportedURL: i32 = -1002; -pub const NSURLErrorCannotFindHost: i32 = -1003; -pub const NSURLErrorCannotConnectToHost: i32 = -1004; -pub const NSURLErrorNetworkConnectionLost: i32 = -1005; -pub const NSURLErrorDNSLookupFailed: i32 = -1006; -pub const NSURLErrorHTTPTooManyRedirects: i32 = -1007; -pub const NSURLErrorResourceUnavailable: i32 = -1008; -pub const NSURLErrorNotConnectedToInternet: i32 = -1009; -pub const NSURLErrorRedirectToNonExistentLocation: i32 = -1010; -pub const NSURLErrorBadServerResponse: i32 = -1011; -pub const NSURLErrorUserCancelledAuthentication: i32 = -1012; -pub const NSURLErrorUserAuthenticationRequired: i32 = -1013; -pub const NSURLErrorZeroByteResource: i32 = -1014; -pub const NSURLErrorCannotDecodeRawData: i32 = -1015; -pub const NSURLErrorCannotDecodeContentData: i32 = -1016; -pub const NSURLErrorCannotParseResponse: i32 = -1017; -pub const NSURLErrorAppTransportSecurityRequiresSecureConnection: i32 = -1022; -pub const NSURLErrorFileDoesNotExist: i32 = -1100; -pub const NSURLErrorFileIsDirectory: i32 = -1101; -pub const NSURLErrorNoPermissionsToReadFile: i32 = -1102; -pub const NSURLErrorDataLengthExceedsMaximum: i32 = -1103; -pub const NSURLErrorFileOutsideSafeArea: i32 = -1104; -pub const NSURLErrorSecureConnectionFailed: i32 = -1200; -pub const NSURLErrorServerCertificateHasBadDate: i32 = -1201; -pub const NSURLErrorServerCertificateUntrusted: i32 = -1202; -pub const NSURLErrorServerCertificateHasUnknownRoot: i32 = -1203; -pub const NSURLErrorServerCertificateNotYetValid: i32 = -1204; -pub const NSURLErrorClientCertificateRejected: i32 = -1205; -pub const NSURLErrorClientCertificateRequired: i32 = -1206; -pub const NSURLErrorCannotLoadFromNetwork: i32 = -2000; -pub const NSURLErrorCannotCreateFile: i32 = -3000; -pub const NSURLErrorCannotOpenFile: i32 = -3001; -pub const NSURLErrorCannotCloseFile: i32 = -3002; -pub const NSURLErrorCannotWriteToFile: i32 = -3003; -pub const NSURLErrorCannotRemoveFile: i32 = -3004; -pub const NSURLErrorCannotMoveFile: i32 = -3005; -pub const NSURLErrorDownloadDecodingFailedMidStream: i32 = -3006; -pub const NSURLErrorDownloadDecodingFailedToComplete: i32 = -3007; -pub const NSURLErrorInternationalRoamingOff: i32 = -1018; -pub const NSURLErrorCallIsActive: i32 = -1019; -pub const NSURLErrorDataNotAllowed: i32 = -1020; -pub const NSURLErrorRequestBodyStreamExhausted: i32 = -1021; -pub const NSURLErrorBackgroundSessionRequiresSharedContainer: i32 = -995; -pub const NSURLErrorBackgroundSessionInUseByAnotherProcess: i32 = -996; -pub const NSURLErrorBackgroundSessionWasDisconnected: i32 = -997; +pub const NSURLErrorUnknown: NSInteger = -1; +pub const NSURLErrorCancelled: NSInteger = -999; +pub const NSURLErrorBadURL: NSInteger = -1000; +pub const NSURLErrorTimedOut: NSInteger = -1001; +pub const NSURLErrorUnsupportedURL: NSInteger = -1002; +pub const NSURLErrorCannotFindHost: NSInteger = -1003; +pub const NSURLErrorCannotConnectToHost: NSInteger = -1004; +pub const NSURLErrorNetworkConnectionLost: NSInteger = -1005; +pub const NSURLErrorDNSLookupFailed: NSInteger = -1006; +pub const NSURLErrorHTTPTooManyRedirects: NSInteger = -1007; +pub const NSURLErrorResourceUnavailable: NSInteger = -1008; +pub const NSURLErrorNotConnectedToInternet: NSInteger = -1009; +pub const NSURLErrorRedirectToNonExistentLocation: NSInteger = -1010; +pub const NSURLErrorBadServerResponse: NSInteger = -1011; +pub const NSURLErrorUserCancelledAuthentication: NSInteger = -1012; +pub const NSURLErrorUserAuthenticationRequired: NSInteger = -1013; +pub const NSURLErrorZeroByteResource: NSInteger = -1014; +pub const NSURLErrorCannotDecodeRawData: NSInteger = -1015; +pub const NSURLErrorCannotDecodeContentData: NSInteger = -1016; +pub const NSURLErrorCannotParseResponse: NSInteger = -1017; +pub const NSURLErrorAppTransportSecurityRequiresSecureConnection: NSInteger = -1022; +pub const NSURLErrorFileDoesNotExist: NSInteger = -1100; +pub const NSURLErrorFileIsDirectory: NSInteger = -1101; +pub const NSURLErrorNoPermissionsToReadFile: NSInteger = -1102; +pub const NSURLErrorDataLengthExceedsMaximum: NSInteger = -1103; +pub const NSURLErrorFileOutsideSafeArea: NSInteger = -1104; +pub const NSURLErrorSecureConnectionFailed: NSInteger = -1200; +pub const NSURLErrorServerCertificateHasBadDate: NSInteger = -1201; +pub const NSURLErrorServerCertificateUntrusted: NSInteger = -1202; +pub const NSURLErrorServerCertificateHasUnknownRoot: NSInteger = -1203; +pub const NSURLErrorServerCertificateNotYetValid: NSInteger = -1204; +pub const NSURLErrorClientCertificateRejected: NSInteger = -1205; +pub const NSURLErrorClientCertificateRequired: NSInteger = -1206; +pub const NSURLErrorCannotLoadFromNetwork: NSInteger = -2000; +pub const NSURLErrorCannotCreateFile: NSInteger = -3000; +pub const NSURLErrorCannotOpenFile: NSInteger = -3001; +pub const NSURLErrorCannotCloseFile: NSInteger = -3002; +pub const NSURLErrorCannotWriteToFile: NSInteger = -3003; +pub const NSURLErrorCannotRemoveFile: NSInteger = -3004; +pub const NSURLErrorCannotMoveFile: NSInteger = -3005; +pub const NSURLErrorDownloadDecodingFailedMidStream: NSInteger = -3006; +pub const NSURLErrorDownloadDecodingFailedToComplete: NSInteger = -3007; +pub const NSURLErrorInternationalRoamingOff: NSInteger = -1018; +pub const NSURLErrorCallIsActive: NSInteger = -1019; +pub const NSURLErrorDataNotAllowed: NSInteger = -1020; +pub const NSURLErrorRequestBodyStreamExhausted: NSInteger = -1021; +pub const NSURLErrorBackgroundSessionRequiresSharedContainer: NSInteger = -995; +pub const NSURLErrorBackgroundSessionInUseByAnotherProcess: NSInteger = -996; +pub const NSURLErrorBackgroundSessionWasDisconnected: NSInteger = -997; diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 7b79a6f34..2c94d21d6 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -97,7 +97,7 @@ extern "C" { pub static NSUbiquitousKeyValueStoreChangedKeysKey: &'static NSString; } -pub const NSUbiquitousKeyValueStoreServerChange: i32 = 0; -pub const NSUbiquitousKeyValueStoreInitialSyncChange: i32 = 1; -pub const NSUbiquitousKeyValueStoreQuotaViolationChange: i32 = 2; -pub const NSUbiquitousKeyValueStoreAccountChange: i32 = 3; +pub const NSUbiquitousKeyValueStoreServerChange: NSInteger = 0; +pub const NSUbiquitousKeyValueStoreInitialSyncChange: NSInteger = 1; +pub const NSUbiquitousKeyValueStoreQuotaViolationChange: NSInteger = 2; +pub const NSUbiquitousKeyValueStoreAccountChange: NSInteger = 3; diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index e66818c21..4387b5409 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -3,5 +3,5 @@ use crate::common::*; use crate::Foundation::*; -pub const NSScannedOption: i32 = 1 << 0; -pub const NSCollectorDisabledOption: i32 = 1 << 1; +pub const NSScannedOption: NSUInteger = 1 << 0; +pub const NSCollectorDisabledOption: NSUInteger = 1 << 1; From d5ff38401261244debe5dea4b208d2de6cd6abab Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 04:39:12 +0100 Subject: [PATCH 113/131] Fix AppKit duplicate methods --- .../icrate/src/AppKit/translation-config.toml | 28 +++++++++++++++++++ .../icrate/src/generated/AppKit/NSCursor.rs | 6 ---- .../icrate/src/generated/AppKit/NSDrawer.rs | 12 -------- crates/icrate/src/generated/AppKit/NSEvent.rs | 6 ---- .../icrate/src/generated/AppKit/NSFormCell.rs | 3 -- .../generated/AppKit/NSGestureRecognizer.rs | 9 ------ .../src/generated/AppKit/NSGraphicsContext.rs | 12 -------- .../src/generated/AppKit/NSNibLoading.rs | 15 ---------- .../icrate/src/generated/AppKit/NSSlider.rs | 11 +------- .../src/generated/AppKit/NSSliderCell.rs | 17 +---------- .../src/generated/AppKit/NSWorkspace.rs | 6 ---- 11 files changed, 30 insertions(+), 95 deletions(-) diff --git a/crates/icrate/src/AppKit/translation-config.toml b/crates/icrate/src/AppKit/translation-config.toml index 5ee1d0b36..582040dee 100644 --- a/crates/icrate/src/AppKit/translation-config.toml +++ b/crates/icrate/src/AppKit/translation-config.toml @@ -15,3 +15,31 @@ skipped = true skipped = true [protocol.NSAccessibilityElement] skipped = true + +# Both instance and class methods +[class.NSCursor.methods.pop] +skipped = true +[class.NSDrawer.methods.open] +skipped = true +[class.NSDrawer.methods.close] +skipped = true +[class.NSEvent.properties.modifierFlags] +skipped = true +[class.NSFormCell.methods.titleWidth] +skipped = true +[class.NSGestureRecognizer.properties.state] +skipped = true +[class.NSGraphicsContext.methods.saveGraphicsState] +skipped = true +[class.NSGraphicsContext.methods.restoreGraphicsState] +skipped = true +[class.NSSlider.properties.vertical] +skipped = true +[class.NSSliderCell.methods.drawKnob] +skipped = true +[class.NSSliderCell.properties.vertical] +skipped = true +[class.NSWorkspace.methods.noteFileSystemChanged] +skipped = true +[class.NSBundle.methods.loadNibFile_externalNameTable_withZone] +skipped = true diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs index 68f81aa66..e13dbedcd 100644 --- a/crates/icrate/src/generated/AppKit/NSCursor.rs +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -97,9 +97,6 @@ extern_methods!( #[method(setHiddenUntilMouseMoves:)] pub unsafe fn setHiddenUntilMouseMoves(flag: bool); - #[method(pop)] - pub unsafe fn pop(); - #[method_id(@__retain_semantics Other image)] pub unsafe fn image(&self) -> Id; @@ -109,9 +106,6 @@ extern_methods!( #[method(push)] pub unsafe fn push(&self); - #[method(pop)] - pub unsafe fn pop(&self); - #[method(set)] pub unsafe fn set(&self); } diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index c54cac0cc..b3a13bc85 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -52,21 +52,9 @@ extern_methods!( #[method(setDelegate:)] pub unsafe fn setDelegate(&self, delegate: Option<&NSDrawerDelegate>); - #[method(open)] - pub unsafe fn open(&self); - #[method(openOnEdge:)] pub unsafe fn openOnEdge(&self, edge: NSRectEdge); - #[method(close)] - pub unsafe fn close(&self); - - #[method(open:)] - pub unsafe fn open(&self, sender: Option<&Object>); - - #[method(close:)] - pub unsafe fn close(&self, sender: Option<&Object>); - #[method(toggle:)] pub unsafe fn toggle(&self, sender: Option<&Object>); diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 19f30df5b..e21e1be38 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -298,9 +298,6 @@ extern_methods!( #[method(type)] pub unsafe fn type_(&self) -> NSEventType; - #[method(modifierFlags)] - pub unsafe fn modifierFlags(&self) -> NSEventModifierFlags; - #[method(timestamp)] pub unsafe fn timestamp(&self) -> NSTimeInterval; @@ -577,9 +574,6 @@ extern_methods!( #[method(mouseLocation)] pub unsafe fn mouseLocation() -> NSPoint; - #[method(modifierFlags)] - pub unsafe fn modifierFlags() -> NSEventModifierFlags; - #[method(pressedMouseButtons)] pub unsafe fn pressedMouseButtons() -> NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSFormCell.rs b/crates/icrate/src/generated/AppKit/NSFormCell.rs index 927501103..8ca4ed12c 100644 --- a/crates/icrate/src/generated/AppKit/NSFormCell.rs +++ b/crates/icrate/src/generated/AppKit/NSFormCell.rs @@ -33,9 +33,6 @@ extern_methods!( image: Option<&NSImage>, ) -> Id; - #[method(titleWidth:)] - pub unsafe fn titleWidth(&self, size: NSSize) -> CGFloat; - #[method(titleWidth)] pub unsafe fn titleWidth(&self) -> CGFloat; diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index 54806ee32..fddf70c2b 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -50,9 +50,6 @@ extern_methods!( #[method(setAction:)] pub unsafe fn setAction(&self, action: OptionSel); - #[method(state)] - pub unsafe fn state(&self) -> NSGestureRecognizerState; - #[method_id(@__retain_semantics Other delegate)] pub unsafe fn delegate(&self) -> Option>; @@ -140,12 +137,6 @@ pub type NSGestureRecognizerDelegate = NSObject; extern_methods!( /// NSSubclassUse unsafe impl NSGestureRecognizer { - #[method(state)] - pub unsafe fn state(&self) -> NSGestureRecognizerState; - - #[method(setState:)] - pub unsafe fn setState(&self, state: NSGestureRecognizerState); - #[method(reset)] pub unsafe fn reset(&self); diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index 4e01975e5..96b2e6d7d 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -72,12 +72,6 @@ extern_methods!( #[method(currentContextDrawingToScreen)] pub unsafe fn currentContextDrawingToScreen() -> bool; - #[method(saveGraphicsState)] - pub unsafe fn saveGraphicsState(); - - #[method(restoreGraphicsState)] - pub unsafe fn restoreGraphicsState(); - #[method_id(@__retain_semantics Other attributes)] pub unsafe fn attributes( &self, @@ -86,12 +80,6 @@ extern_methods!( #[method(isDrawingToScreen)] pub unsafe fn isDrawingToScreen(&self) -> bool; - #[method(saveGraphicsState)] - pub unsafe fn saveGraphicsState(&self); - - #[method(restoreGraphicsState)] - pub unsafe fn restoreGraphicsState(&self); - #[method(flushGraphics)] pub unsafe fn flushGraphics(&self); diff --git a/crates/icrate/src/generated/AppKit/NSNibLoading.rs b/crates/icrate/src/generated/AppKit/NSNibLoading.rs index 29b8cf2e6..1e62deaa9 100644 --- a/crates/icrate/src/generated/AppKit/NSNibLoading.rs +++ b/crates/icrate/src/generated/AppKit/NSNibLoading.rs @@ -31,25 +31,10 @@ extern_methods!( extern_methods!( /// NSNibLoadingDeprecated unsafe impl NSBundle { - #[method(loadNibFile:externalNameTable:withZone:)] - pub unsafe fn loadNibFile_externalNameTable_withZone( - fileName: Option<&NSString>, - context: Option<&NSDictionary>, - zone: *mut NSZone, - ) -> bool; - #[method(loadNibNamed:owner:)] pub unsafe fn loadNibNamed_owner( nibName: Option<&NSString>, owner: Option<&Object>, ) -> bool; - - #[method(loadNibFile:externalNameTable:withZone:)] - pub unsafe fn loadNibFile_externalNameTable_withZone( - &self, - fileName: Option<&NSString>, - context: Option<&NSDictionary>, - zone: *mut NSZone, - ) -> bool; } ); diff --git a/crates/icrate/src/generated/AppKit/NSSlider.rs b/crates/icrate/src/generated/AppKit/NSSlider.rs index 39249d2f6..09e8bdde2 100644 --- a/crates/icrate/src/generated/AppKit/NSSlider.rs +++ b/crates/icrate/src/generated/AppKit/NSSlider.rs @@ -45,12 +45,6 @@ extern_methods!( #[method(acceptsFirstMouse:)] pub unsafe fn acceptsFirstMouse(&self, event: Option<&NSEvent>) -> bool; - #[method(isVertical)] - pub unsafe fn isVertical(&self) -> bool; - - #[method(setVertical:)] - pub unsafe fn setVertical(&self, vertical: bool); - #[method_id(@__retain_semantics Other trackFillColor)] pub unsafe fn trackFillColor(&self) -> Option>; @@ -61,10 +55,7 @@ extern_methods!( extern_methods!( /// NSSliderVerticalGetter - unsafe impl NSSlider { - #[method(isVertical)] - pub unsafe fn isVertical(&self) -> bool; - } + unsafe impl NSSlider {} ); extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index cc7cca93d..c6656449a 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -52,12 +52,6 @@ extern_methods!( #[method(setSliderType:)] pub unsafe fn setSliderType(&self, sliderType: NSSliderType); - #[method(isVertical)] - pub unsafe fn isVertical(&self) -> bool; - - #[method(setVertical:)] - pub unsafe fn setVertical(&self, vertical: bool); - #[method(trackRect)] pub unsafe fn trackRect(&self) -> NSRect; @@ -70,12 +64,6 @@ extern_methods!( #[method(barRectFlipped:)] pub unsafe fn barRectFlipped(&self, flipped: bool) -> NSRect; - #[method(drawKnob:)] - pub unsafe fn drawKnob(&self, knobRect: NSRect); - - #[method(drawKnob)] - pub unsafe fn drawKnob(&self); - #[method(drawBarInside:flipped:)] pub unsafe fn drawBarInside_flipped(&self, rect: NSRect, flipped: bool); } @@ -83,10 +71,7 @@ extern_methods!( extern_methods!( /// NSSliderCellVerticalGetter - unsafe impl NSSliderCell { - #[method(isVertical)] - pub unsafe fn isVertical(&self) -> bool; - } + unsafe impl NSSliderCell {} ); extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index 96ae6a190..b8af3f4bd 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -66,9 +66,6 @@ extern_methods!( #[method(showSearchResultsForQueryString:)] pub unsafe fn showSearchResultsForQueryString(&self, queryString: &NSString) -> bool; - #[method(noteFileSystemChanged:)] - pub unsafe fn noteFileSystemChanged(&self, path: &NSString); - #[method(isFilePackageAtPath:)] pub unsafe fn isFilePackageAtPath(&self, fullPath: &NSString) -> bool; @@ -631,9 +628,6 @@ extern_methods!( #[method(checkForRemovableMedia)] pub unsafe fn checkForRemovableMedia(&self); - #[method(noteFileSystemChanged)] - pub unsafe fn noteFileSystemChanged(&self); - #[method(fileSystemChanged)] pub unsafe fn fileSystemChanged(&self) -> bool; From ff3012fa83a090f4b6192541ac0b592f46392189 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 8 Dec 2022 11:14:27 +0100 Subject: [PATCH 114/131] Add CoreData --- crates/header-translator/framework-includes.h | 2 + crates/header-translator/src/expr.rs | 1 + crates/icrate/Cargo.toml | 4 +- .../icrate/src/AppKit/translation-config.toml | 2 +- crates/icrate/src/CoreData/mod.rs | 5 + .../src/CoreData/translation-config.toml | 5 + .../src/generated/AppKit/AppKitDefines.rs | 1 + .../src/generated/AppKit/AppKitErrors.rs | 1 + .../src/generated/AppKit/NSATSTypesetter.rs | 1 + .../src/generated/AppKit/NSAccessibility.rs | 1 + .../AppKit/NSAccessibilityConstants.rs | 1 + .../AppKit/NSAccessibilityCustomAction.rs | 1 + .../AppKit/NSAccessibilityCustomRotor.rs | 1 + .../AppKit/NSAccessibilityElement.rs | 1 + .../AppKit/NSAccessibilityProtocols.rs | 1 + .../src/generated/AppKit/NSActionCell.rs | 1 + .../src/generated/AppKit/NSAffineTransform.rs | 1 + crates/icrate/src/generated/AppKit/NSAlert.rs | 1 + .../AppKit/NSAlignmentFeedbackFilter.rs | 1 + .../src/generated/AppKit/NSAnimation.rs | 1 + .../generated/AppKit/NSAnimationContext.rs | 1 + .../src/generated/AppKit/NSAppearance.rs | 1 + .../AppKit/NSAppleScriptExtensions.rs | 1 + .../src/generated/AppKit/NSApplication.rs | 1 + .../AppKit/NSApplicationScripting.rs | 1 + .../src/generated/AppKit/NSArrayController.rs | 1 + .../generated/AppKit/NSAttributedString.rs | 1 + .../src/generated/AppKit/NSBezierPath.rs | 1 + .../src/generated/AppKit/NSBitmapImageRep.rs | 1 + crates/icrate/src/generated/AppKit/NSBox.rs | 1 + .../icrate/src/generated/AppKit/NSBrowser.rs | 1 + .../src/generated/AppKit/NSBrowserCell.rs | 1 + .../icrate/src/generated/AppKit/NSButton.rs | 1 + .../src/generated/AppKit/NSButtonCell.rs | 1 + .../generated/AppKit/NSButtonTouchBarItem.rs | 1 + .../src/generated/AppKit/NSCIImageRep.rs | 1 + .../src/generated/AppKit/NSCachedImageRep.rs | 1 + .../AppKit/NSCandidateListTouchBarItem.rs | 1 + crates/icrate/src/generated/AppKit/NSCell.rs | 1 + .../AppKit/NSClickGestureRecognizer.rs | 1 + .../icrate/src/generated/AppKit/NSClipView.rs | 1 + .../src/generated/AppKit/NSCollectionView.rs | 1 + .../NSCollectionViewCompositionalLayout.rs | 1 + .../AppKit/NSCollectionViewFlowLayout.rs | 1 + .../AppKit/NSCollectionViewGridLayout.rs | 1 + .../AppKit/NSCollectionViewLayout.rs | 1 + .../NSCollectionViewTransitionLayout.rs | 1 + crates/icrate/src/generated/AppKit/NSColor.rs | 1 + .../src/generated/AppKit/NSColorList.rs | 1 + .../src/generated/AppKit/NSColorPanel.rs | 1 + .../src/generated/AppKit/NSColorPicker.rs | 1 + .../AppKit/NSColorPickerTouchBarItem.rs | 1 + .../src/generated/AppKit/NSColorPicking.rs | 1 + .../src/generated/AppKit/NSColorSampler.rs | 1 + .../src/generated/AppKit/NSColorSpace.rs | 1 + .../src/generated/AppKit/NSColorWell.rs | 1 + .../icrate/src/generated/AppKit/NSComboBox.rs | 1 + .../src/generated/AppKit/NSComboBoxCell.rs | 1 + .../icrate/src/generated/AppKit/NSControl.rs | 1 + .../src/generated/AppKit/NSController.rs | 1 + .../icrate/src/generated/AppKit/NSCursor.rs | 1 + .../src/generated/AppKit/NSCustomImageRep.rs | 1 + .../generated/AppKit/NSCustomTouchBarItem.rs | 1 + .../src/generated/AppKit/NSDataAsset.rs | 1 + .../src/generated/AppKit/NSDatePicker.rs | 1 + .../src/generated/AppKit/NSDatePickerCell.rs | 1 + .../AppKit/NSDictionaryController.rs | 1 + .../generated/AppKit/NSDiffableDataSource.rs | 1 + .../icrate/src/generated/AppKit/NSDockTile.rs | 1 + .../icrate/src/generated/AppKit/NSDocument.rs | 1 + .../generated/AppKit/NSDocumentController.rs | 1 + .../generated/AppKit/NSDocumentScripting.rs | 1 + .../icrate/src/generated/AppKit/NSDragging.rs | 1 + .../src/generated/AppKit/NSDraggingItem.rs | 1 + .../src/generated/AppKit/NSDraggingSession.rs | 1 + .../icrate/src/generated/AppKit/NSDrawer.rs | 1 + .../src/generated/AppKit/NSEPSImageRep.rs | 1 + .../icrate/src/generated/AppKit/NSErrors.rs | 1 + crates/icrate/src/generated/AppKit/NSEvent.rs | 1 + .../generated/AppKit/NSFilePromiseProvider.rs | 1 + .../generated/AppKit/NSFilePromiseReceiver.rs | 1 + .../AppKit/NSFileWrapperExtensions.rs | 1 + crates/icrate/src/generated/AppKit/NSFont.rs | 1 + .../generated/AppKit/NSFontAssetRequest.rs | 1 + .../src/generated/AppKit/NSFontCollection.rs | 1 + .../src/generated/AppKit/NSFontDescriptor.rs | 1 + .../src/generated/AppKit/NSFontManager.rs | 1 + .../src/generated/AppKit/NSFontPanel.rs | 1 + crates/icrate/src/generated/AppKit/NSForm.rs | 1 + .../icrate/src/generated/AppKit/NSFormCell.rs | 1 + .../generated/AppKit/NSGestureRecognizer.rs | 1 + .../src/generated/AppKit/NSGlyphGenerator.rs | 1 + .../src/generated/AppKit/NSGlyphInfo.rs | 1 + .../icrate/src/generated/AppKit/NSGradient.rs | 1 + .../icrate/src/generated/AppKit/NSGraphics.rs | 1 + .../src/generated/AppKit/NSGraphicsContext.rs | 1 + .../icrate/src/generated/AppKit/NSGridView.rs | 1 + .../generated/AppKit/NSGroupTouchBarItem.rs | 1 + .../src/generated/AppKit/NSHapticFeedback.rs | 1 + .../src/generated/AppKit/NSHelpManager.rs | 1 + crates/icrate/src/generated/AppKit/NSImage.rs | 1 + .../src/generated/AppKit/NSImageCell.rs | 1 + .../icrate/src/generated/AppKit/NSImageRep.rs | 1 + .../src/generated/AppKit/NSImageView.rs | 1 + .../src/generated/AppKit/NSInputManager.rs | 1 + .../src/generated/AppKit/NSInputServer.rs | 1 + .../src/generated/AppKit/NSInterfaceStyle.rs | 1 + .../src/generated/AppKit/NSItemProvider.rs | 1 + .../src/generated/AppKit/NSKeyValueBinding.rs | 1 + .../src/generated/AppKit/NSLayoutAnchor.rs | 1 + .../generated/AppKit/NSLayoutConstraint.rs | 1 + .../src/generated/AppKit/NSLayoutGuide.rs | 1 + .../src/generated/AppKit/NSLayoutManager.rs | 1 + .../src/generated/AppKit/NSLevelIndicator.rs | 1 + .../generated/AppKit/NSLevelIndicatorCell.rs | 1 + .../NSMagnificationGestureRecognizer.rs | 1 + .../icrate/src/generated/AppKit/NSMatrix.rs | 1 + .../AppKit/NSMediaLibraryBrowserController.rs | 1 + crates/icrate/src/generated/AppKit/NSMenu.rs | 1 + .../icrate/src/generated/AppKit/NSMenuItem.rs | 1 + .../src/generated/AppKit/NSMenuItemCell.rs | 1 + .../src/generated/AppKit/NSMenuToolbarItem.rs | 1 + crates/icrate/src/generated/AppKit/NSMovie.rs | 1 + crates/icrate/src/generated/AppKit/NSNib.rs | 1 + .../src/generated/AppKit/NSNibDeclarations.rs | 1 + .../src/generated/AppKit/NSNibLoading.rs | 1 + .../generated/AppKit/NSObjectController.rs | 1 + .../icrate/src/generated/AppKit/NSOpenGL.rs | 1 + .../src/generated/AppKit/NSOpenGLLayer.rs | 1 + .../src/generated/AppKit/NSOpenGLView.rs | 1 + .../src/generated/AppKit/NSOpenPanel.rs | 1 + .../src/generated/AppKit/NSOutlineView.rs | 1 + .../src/generated/AppKit/NSPDFImageRep.rs | 1 + .../icrate/src/generated/AppKit/NSPDFInfo.rs | 1 + .../icrate/src/generated/AppKit/NSPDFPanel.rs | 1 + .../src/generated/AppKit/NSPICTImageRep.rs | 1 + .../src/generated/AppKit/NSPageController.rs | 1 + .../src/generated/AppKit/NSPageLayout.rs | 1 + .../AppKit/NSPanGestureRecognizer.rs | 1 + crates/icrate/src/generated/AppKit/NSPanel.rs | 1 + .../src/generated/AppKit/NSParagraphStyle.rs | 1 + .../src/generated/AppKit/NSPasteboard.rs | 1 + .../src/generated/AppKit/NSPasteboardItem.rs | 1 + .../icrate/src/generated/AppKit/NSPathCell.rs | 1 + .../generated/AppKit/NSPathComponentCell.rs | 1 + .../src/generated/AppKit/NSPathControl.rs | 1 + .../src/generated/AppKit/NSPathControlItem.rs | 1 + .../generated/AppKit/NSPersistentDocument.rs | 1 + .../generated/AppKit/NSPickerTouchBarItem.rs | 1 + .../src/generated/AppKit/NSPopUpButton.rs | 1 + .../src/generated/AppKit/NSPopUpButtonCell.rs | 1 + .../icrate/src/generated/AppKit/NSPopover.rs | 1 + .../generated/AppKit/NSPopoverTouchBarItem.rs | 1 + .../src/generated/AppKit/NSPredicateEditor.rs | 1 + .../AppKit/NSPredicateEditorRowTemplate.rs | 1 + .../AppKit/NSPressGestureRecognizer.rs | 1 + .../AppKit/NSPressureConfiguration.rs | 1 + .../src/generated/AppKit/NSPrintInfo.rs | 1 + .../src/generated/AppKit/NSPrintOperation.rs | 1 + .../src/generated/AppKit/NSPrintPanel.rs | 1 + .../icrate/src/generated/AppKit/NSPrinter.rs | 1 + .../generated/AppKit/NSProgressIndicator.rs | 1 + .../src/generated/AppKit/NSResponder.rs | 1 + .../AppKit/NSRotationGestureRecognizer.rs | 1 + .../src/generated/AppKit/NSRuleEditor.rs | 1 + .../src/generated/AppKit/NSRulerMarker.rs | 1 + .../src/generated/AppKit/NSRulerView.rs | 1 + .../generated/AppKit/NSRunningApplication.rs | 1 + .../src/generated/AppKit/NSSavePanel.rs | 1 + .../icrate/src/generated/AppKit/NSScreen.rs | 1 + .../src/generated/AppKit/NSScrollView.rs | 1 + .../icrate/src/generated/AppKit/NSScroller.rs | 1 + .../icrate/src/generated/AppKit/NSScrubber.rs | 1 + .../generated/AppKit/NSScrubberItemView.rs | 1 + .../src/generated/AppKit/NSScrubberLayout.rs | 1 + .../src/generated/AppKit/NSSearchField.rs | 1 + .../src/generated/AppKit/NSSearchFieldCell.rs | 1 + .../generated/AppKit/NSSearchToolbarItem.rs | 1 + .../src/generated/AppKit/NSSecureTextField.rs | 1 + .../src/generated/AppKit/NSSegmentedCell.rs | 1 + .../generated/AppKit/NSSegmentedControl.rs | 1 + .../icrate/src/generated/AppKit/NSShadow.rs | 1 + .../src/generated/AppKit/NSSharingService.rs | 1 + .../NSSharingServicePickerToolbarItem.rs | 1 + .../NSSharingServicePickerTouchBarItem.rs | 1 + .../icrate/src/generated/AppKit/NSSlider.rs | 1 + .../src/generated/AppKit/NSSliderAccessory.rs | 1 + .../src/generated/AppKit/NSSliderCell.rs | 1 + .../generated/AppKit/NSSliderTouchBarItem.rs | 1 + crates/icrate/src/generated/AppKit/NSSound.rs | 1 + .../generated/AppKit/NSSpeechRecognizer.rs | 1 + .../generated/AppKit/NSSpeechSynthesizer.rs | 1 + .../src/generated/AppKit/NSSpellChecker.rs | 1 + .../src/generated/AppKit/NSSpellProtocol.rs | 1 + .../src/generated/AppKit/NSSplitView.rs | 1 + .../generated/AppKit/NSSplitViewController.rs | 1 + .../src/generated/AppKit/NSSplitViewItem.rs | 1 + .../src/generated/AppKit/NSStackView.rs | 1 + .../src/generated/AppKit/NSStatusBar.rs | 1 + .../src/generated/AppKit/NSStatusBarButton.rs | 1 + .../src/generated/AppKit/NSStatusItem.rs | 1 + .../icrate/src/generated/AppKit/NSStepper.rs | 1 + .../src/generated/AppKit/NSStepperCell.rs | 1 + .../generated/AppKit/NSStepperTouchBarItem.rs | 1 + .../src/generated/AppKit/NSStoryboard.rs | 1 + .../src/generated/AppKit/NSStoryboardSegue.rs | 1 + .../src/generated/AppKit/NSStringDrawing.rs | 1 + .../icrate/src/generated/AppKit/NSSwitch.rs | 1 + .../icrate/src/generated/AppKit/NSTabView.rs | 1 + .../generated/AppKit/NSTabViewController.rs | 1 + .../src/generated/AppKit/NSTabViewItem.rs | 1 + .../src/generated/AppKit/NSTableCellView.rs | 1 + .../src/generated/AppKit/NSTableColumn.rs | 1 + .../src/generated/AppKit/NSTableHeaderCell.rs | 1 + .../src/generated/AppKit/NSTableHeaderView.rs | 1 + .../src/generated/AppKit/NSTableRowView.rs | 1 + .../src/generated/AppKit/NSTableView.rs | 1 + .../AppKit/NSTableViewDiffableDataSource.rs | 1 + .../generated/AppKit/NSTableViewRowAction.rs | 1 + crates/icrate/src/generated/AppKit/NSText.rs | 1 + .../generated/AppKit/NSTextAlternatives.rs | 1 + .../src/generated/AppKit/NSTextAttachment.rs | 1 + .../generated/AppKit/NSTextAttachmentCell.rs | 1 + .../generated/AppKit/NSTextCheckingClient.rs | 1 + .../AppKit/NSTextCheckingController.rs | 1 + .../src/generated/AppKit/NSTextContainer.rs | 1 + .../src/generated/AppKit/NSTextContent.rs | 1 + .../generated/AppKit/NSTextContentManager.rs | 1 + .../src/generated/AppKit/NSTextElement.rs | 1 + .../src/generated/AppKit/NSTextField.rs | 1 + .../src/generated/AppKit/NSTextFieldCell.rs | 1 + .../src/generated/AppKit/NSTextFinder.rs | 1 + .../src/generated/AppKit/NSTextInputClient.rs | 1 + .../generated/AppKit/NSTextInputContext.rs | 1 + .../generated/AppKit/NSTextLayoutFragment.rs | 1 + .../generated/AppKit/NSTextLayoutManager.rs | 1 + .../generated/AppKit/NSTextLineFragment.rs | 1 + .../icrate/src/generated/AppKit/NSTextList.rs | 1 + .../src/generated/AppKit/NSTextRange.rs | 1 + .../src/generated/AppKit/NSTextSelection.rs | 1 + .../AppKit/NSTextSelectionNavigation.rs | 1 + .../src/generated/AppKit/NSTextStorage.rs | 1 + .../AppKit/NSTextStorageScripting.rs | 1 + .../src/generated/AppKit/NSTextTable.rs | 1 + .../icrate/src/generated/AppKit/NSTextView.rs | 1 + .../AppKit/NSTextViewportLayoutController.rs | 1 + .../generated/AppKit/NSTintConfiguration.rs | 1 + .../NSTitlebarAccessoryViewController.rs | 1 + .../src/generated/AppKit/NSTokenField.rs | 1 + .../src/generated/AppKit/NSTokenFieldCell.rs | 1 + .../icrate/src/generated/AppKit/NSToolbar.rs | 1 + .../src/generated/AppKit/NSToolbarItem.rs | 1 + .../generated/AppKit/NSToolbarItemGroup.rs | 1 + crates/icrate/src/generated/AppKit/NSTouch.rs | 1 + .../icrate/src/generated/AppKit/NSTouchBar.rs | 1 + .../src/generated/AppKit/NSTouchBarItem.rs | 1 + .../src/generated/AppKit/NSTrackingArea.rs | 1 + .../AppKit/NSTrackingSeparatorToolbarItem.rs | 1 + .../src/generated/AppKit/NSTreeController.rs | 1 + .../icrate/src/generated/AppKit/NSTreeNode.rs | 1 + .../src/generated/AppKit/NSTypesetter.rs | 1 + .../src/generated/AppKit/NSUserActivity.rs | 1 + .../AppKit/NSUserDefaultsController.rs | 1 + .../AppKit/NSUserInterfaceCompression.rs | 1 + .../NSUserInterfaceItemIdentification.rs | 1 + .../AppKit/NSUserInterfaceItemSearching.rs | 1 + .../generated/AppKit/NSUserInterfaceLayout.rs | 1 + .../AppKit/NSUserInterfaceValidation.rs | 1 + crates/icrate/src/generated/AppKit/NSView.rs | 1 + .../src/generated/AppKit/NSViewController.rs | 1 + .../generated/AppKit/NSVisualEffectView.rs | 1 + .../icrate/src/generated/AppKit/NSWindow.rs | 1 + .../generated/AppKit/NSWindowController.rs | 1 + .../generated/AppKit/NSWindowRestoration.rs | 1 + .../src/generated/AppKit/NSWindowScripting.rs | 1 + .../src/generated/AppKit/NSWindowTab.rs | 1 + .../src/generated/AppKit/NSWindowTabGroup.rs | 1 + .../src/generated/AppKit/NSWorkspace.rs | 1 + .../src/generated/CoreData/CoreDataDefines.rs | 9 + .../src/generated/CoreData/CoreDataErrors.rs | 88 ++++ .../src/generated/CoreData/NSAtomicStore.rs | 80 ++++ .../CoreData/NSAtomicStoreCacheNode.rs | 44 ++ .../CoreData/NSAttributeDescription.rs | 86 ++++ .../CoreData/NSBatchDeleteRequest.rs | 42 ++ .../CoreData/NSBatchInsertRequest.rs | 116 +++++ .../CoreData/NSBatchUpdateRequest.rs | 63 +++ .../NSCoreDataCoreSpotlightDelegate.rs | 82 ++++ .../CoreData/NSDerivedAttributeDescription.rs | 24 + .../generated/CoreData/NSEntityDescription.rs | 124 +++++ .../src/generated/CoreData/NSEntityMapping.rs | 105 +++++ .../CoreData/NSEntityMigrationPolicy.rs | 93 ++++ .../CoreData/NSExpressionDescription.rs | 30 ++ .../CoreData/NSFetchIndexDescription.rs | 46 ++ .../NSFetchIndexElementDescription.rs | 50 ++ .../src/generated/CoreData/NSFetchRequest.rs | 223 +++++++++ .../CoreData/NSFetchRequestExpression.rs | 36 ++ .../CoreData/NSFetchedPropertyDescription.rs | 24 + .../CoreData/NSFetchedResultsController.rs | 94 ++++ .../generated/CoreData/NSIncrementalStore.rs | 77 ++++ .../CoreData/NSIncrementalStoreNode.rs | 45 ++ .../src/generated/CoreData/NSManagedObject.rs | 187 ++++++++ .../CoreData/NSManagedObjectContext.rs | 350 ++++++++++++++ .../generated/CoreData/NSManagedObjectID.rs | 30 ++ .../CoreData/NSManagedObjectModel.rs | 130 ++++++ .../src/generated/CoreData/NSMappingModel.rs | 48 ++ .../src/generated/CoreData/NSMergePolicy.rs | 178 +++++++ .../generated/CoreData/NSMigrationManager.rs | 113 +++++ .../CoreData/NSPersistentCloudKitContainer.rs | 71 +++ .../NSPersistentCloudKitContainerEvent.rs | 58 +++ ...PersistentCloudKitContainerEventRequest.rs | 43 ++ .../NSPersistentCloudKitContainerOptions.rs | 36 ++ .../CoreData/NSPersistentContainer.rs | 76 +++ .../CoreData/NSPersistentHistoryChange.rs | 52 +++ .../NSPersistentHistoryChangeRequest.rs | 64 +++ .../CoreData/NSPersistentHistoryToken.rs | 18 + .../NSPersistentHistoryTransaction.rs | 59 +++ .../generated/CoreData/NSPersistentStore.rs | 100 ++++ .../CoreData/NSPersistentStoreCoordinator.rs | 433 ++++++++++++++++++ .../CoreData/NSPersistentStoreDescription.rs | 106 +++++ .../CoreData/NSPersistentStoreRequest.rs | 34 ++ .../CoreData/NSPersistentStoreResult.rs | 194 ++++++++ .../CoreData/NSPropertyDescription.rs | 91 ++++ .../generated/CoreData/NSPropertyMapping.rs | 36 ++ .../CoreData/NSQueryGenerationToken.rs | 21 + .../CoreData/NSRelationshipDescription.rs | 69 +++ .../CoreData/NSSaveChangesRequest.rs | 39 ++ crates/icrate/src/generated/CoreData/mod.rs | 247 ++++++++++ crates/icrate/src/lib.rs | 2 + 328 files changed, 4754 insertions(+), 3 deletions(-) create mode 100644 crates/icrate/src/CoreData/mod.rs create mode 100644 crates/icrate/src/CoreData/translation-config.toml create mode 100644 crates/icrate/src/generated/CoreData/CoreDataDefines.rs create mode 100644 crates/icrate/src/generated/CoreData/CoreDataErrors.rs create mode 100644 crates/icrate/src/generated/CoreData/NSAtomicStore.rs create mode 100644 crates/icrate/src/generated/CoreData/NSAtomicStoreCacheNode.rs create mode 100644 crates/icrate/src/generated/CoreData/NSAttributeDescription.rs create mode 100644 crates/icrate/src/generated/CoreData/NSBatchDeleteRequest.rs create mode 100644 crates/icrate/src/generated/CoreData/NSBatchInsertRequest.rs create mode 100644 crates/icrate/src/generated/CoreData/NSBatchUpdateRequest.rs create mode 100644 crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs create mode 100644 crates/icrate/src/generated/CoreData/NSDerivedAttributeDescription.rs create mode 100644 crates/icrate/src/generated/CoreData/NSEntityDescription.rs create mode 100644 crates/icrate/src/generated/CoreData/NSEntityMapping.rs create mode 100644 crates/icrate/src/generated/CoreData/NSEntityMigrationPolicy.rs create mode 100644 crates/icrate/src/generated/CoreData/NSExpressionDescription.rs create mode 100644 crates/icrate/src/generated/CoreData/NSFetchIndexDescription.rs create mode 100644 crates/icrate/src/generated/CoreData/NSFetchIndexElementDescription.rs create mode 100644 crates/icrate/src/generated/CoreData/NSFetchRequest.rs create mode 100644 crates/icrate/src/generated/CoreData/NSFetchRequestExpression.rs create mode 100644 crates/icrate/src/generated/CoreData/NSFetchedPropertyDescription.rs create mode 100644 crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs create mode 100644 crates/icrate/src/generated/CoreData/NSIncrementalStore.rs create mode 100644 crates/icrate/src/generated/CoreData/NSIncrementalStoreNode.rs create mode 100644 crates/icrate/src/generated/CoreData/NSManagedObject.rs create mode 100644 crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs create mode 100644 crates/icrate/src/generated/CoreData/NSManagedObjectID.rs create mode 100644 crates/icrate/src/generated/CoreData/NSManagedObjectModel.rs create mode 100644 crates/icrate/src/generated/CoreData/NSMappingModel.rs create mode 100644 crates/icrate/src/generated/CoreData/NSMergePolicy.rs create mode 100644 crates/icrate/src/generated/CoreData/NSMigrationManager.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEvent.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEventRequest.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerOptions.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentContainer.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentHistoryChange.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentHistoryChangeRequest.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentHistoryToken.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentHistoryTransaction.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentStore.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentStoreDescription.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentStoreRequest.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPersistentStoreResult.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPropertyDescription.rs create mode 100644 crates/icrate/src/generated/CoreData/NSPropertyMapping.rs create mode 100644 crates/icrate/src/generated/CoreData/NSQueryGenerationToken.rs create mode 100644 crates/icrate/src/generated/CoreData/NSRelationshipDescription.rs create mode 100644 crates/icrate/src/generated/CoreData/NSSaveChangesRequest.rs create mode 100644 crates/icrate/src/generated/CoreData/mod.rs diff --git a/crates/header-translator/framework-includes.h b/crates/header-translator/framework-includes.h index 1db4dc494..a9455fdcf 100644 --- a/crates/header-translator/framework-includes.h +++ b/crates/header-translator/framework-includes.h @@ -2,6 +2,8 @@ #import +#import + #if TARGET_OS_OSX #import #endif diff --git a/crates/header-translator/src/expr.rs b/crates/header-translator/src/expr.rs index 6fd56f44f..f24be0e78 100644 --- a/crates/header-translator/src/expr.rs +++ b/crates/header-translator/src/expr.rs @@ -108,6 +108,7 @@ impl Expr { .trim_start_matches("(NSBezelStyle)") .trim_start_matches("(NSEventSubtype)") .trim_start_matches("(NSWindowButton)") + .trim_start_matches("(NSExpressionType)") .to_string(); // Trim unnecessary parentheses diff --git a/crates/icrate/Cargo.toml b/crates/icrate/Cargo.toml index c4015a580..0cb109986 100644 --- a/crates/icrate/Cargo.toml +++ b/crates/icrate/Cargo.toml @@ -76,7 +76,7 @@ unstable-docsrs = [] # AppClip = [] # AppIntents = [] # AppTrackingTransparency = [] -AppKit = ["objective-c", "Foundation"] +AppKit = ["objective-c", "Foundation", "CoreData"] # AppleScriptKit = [] # AppleScriptObjC = [] # ApplicationServices = [] @@ -116,7 +116,7 @@ AppKit = ["objective-c", "Foundation"] # CoreAudioKit = [] # CoreAudioTypes = [] # CoreBluetooth = [] -# CoreData = [] +CoreData = ["objective-c", "Foundation"] # CoreFoundation = [] # CoreGraphics = [] # CoreHaptics = [] diff --git a/crates/icrate/src/AppKit/translation-config.toml b/crates/icrate/src/AppKit/translation-config.toml index 582040dee..437cde9d2 100644 --- a/crates/icrate/src/AppKit/translation-config.toml +++ b/crates/icrate/src/AppKit/translation-config.toml @@ -1,4 +1,4 @@ -imports = ["Foundation", "AppKit"] +imports = ["AppKit", "CoreData", "Foundation"] # These return `oneway void`, which is a bit tricky to handle. [class.NSPasteboard.methods.releaseGlobally] diff --git a/crates/icrate/src/CoreData/mod.rs b/crates/icrate/src/CoreData/mod.rs new file mode 100644 index 000000000..98e1f5a17 --- /dev/null +++ b/crates/icrate/src/CoreData/mod.rs @@ -0,0 +1,5 @@ +#[allow(unused_imports)] +#[path = "../generated/CoreData/mod.rs"] +pub(crate) mod generated; + +pub use self::generated::__exported::*; diff --git a/crates/icrate/src/CoreData/translation-config.toml b/crates/icrate/src/CoreData/translation-config.toml new file mode 100644 index 000000000..816a62f38 --- /dev/null +++ b/crates/icrate/src/CoreData/translation-config.toml @@ -0,0 +1,5 @@ +imports = ["CoreData", "Foundation"] + +# Has `error:` parameter, but returns NSInteger (where 0 means error) +[class.NSManagedObjectContext.methods] +countForFetchRequest_error = { skipped = true } diff --git a/crates/icrate/src/generated/AppKit/AppKitDefines.rs b/crates/icrate/src/generated/AppKit/AppKitDefines.rs index 9e6a32e39..661a20881 100644 --- a/crates/icrate/src/generated/AppKit/AppKitDefines.rs +++ b/crates/icrate/src/generated/AppKit/AppKitDefines.rs @@ -2,4 +2,5 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; diff --git a/crates/icrate/src/generated/AppKit/AppKitErrors.rs b/crates/icrate/src/generated/AppKit/AppKitErrors.rs index 6a763d557..35371d1be 100644 --- a/crates/icrate/src/generated/AppKit/AppKitErrors.rs +++ b/crates/icrate/src/generated/AppKit/AppKitErrors.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub const NSTextReadInapplicableDocumentTypeError: c_uint = 65806; diff --git a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs index 69fa60b38..0d8cd8178 100644 --- a/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSATSTypesetter.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSAccessibility.rs b/crates/icrate/src/generated/AppKit/NSAccessibility.rs index 776e9638a..81685b3a6 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibility.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibility.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs index d19a88de9..5b7b56401 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern "C" { diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs index be2aac4c1..b84a76d3f 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs index 76985a7fb..70f47a73e 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSAccessibilityCustomRotorSearchDirection = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs index 294517504..b2254cd32 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityElement.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs index 4d657c94a..f53729d0b 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSAccessibilityGroup = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSActionCell.rs b/crates/icrate/src/generated/AppKit/NSActionCell.rs index 19d32d8b0..116b7a406 100644 --- a/crates/icrate/src/generated/AppKit/NSActionCell.rs +++ b/crates/icrate/src/generated/AppKit/NSActionCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs index f8ee5dea4..2ba45c937 100644 --- a/crates/icrate/src/generated/AppKit/NSAffineTransform.rs +++ b/crates/icrate/src/generated/AppKit/NSAffineTransform.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index 25ecd1b6b..a14dbd892 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSAlertStyle = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs index 334c0c764..64bad9a5e 100644 --- a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs +++ b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSAlignmentFeedbackToken = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index 69ba18e97..301433d8e 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSAnimationCurve = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs index 3f882a653..ad6ad9f33 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index 6a768b9b0..1cbfa46c5 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSAppearanceName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs index 84ae853dd..8189b16ed 100644 --- a/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs +++ b/crates/icrate/src/generated/AppKit/NSAppleScriptExtensions.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index cf4674ac9..d8c1436bd 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSAppKitVersion = c_double; diff --git a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs index ea26cbe66..9d607f505 100644 --- a/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSApplicationScripting.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSArrayController.rs b/crates/icrate/src/generated/AppKit/NSArrayController.rs index e7067b24f..dccb29803 100644 --- a/crates/icrate/src/generated/AppKit/NSArrayController.rs +++ b/crates/icrate/src/generated/AppKit/NSArrayController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index ba864552e..6a2ec5402 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern "C" { diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index 808b0face..d67bb4342 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSLineCapStyle = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index 36e187c3e..c4dfac5da 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTIFFCompression = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSBox.rs b/crates/icrate/src/generated/AppKit/NSBox.rs index 9c161c669..2a6842366 100644 --- a/crates/icrate/src/generated/AppKit/NSBox.rs +++ b/crates/icrate/src/generated/AppKit/NSBox.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTitlePosition = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index 0304fd772..d3813d99b 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub static NSAppKitVersionNumberWithContinuousScrollingBrowser: NSAppKitVersion = 680.0; diff --git a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs index 3c77f7815..91f071e57 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowserCell.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowserCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSButton.rs b/crates/icrate/src/generated/AppKit/NSButton.rs index 47b0e67b8..e03a35f53 100644 --- a/crates/icrate/src/generated/AppKit/NSButton.rs +++ b/crates/icrate/src/generated/AppKit/NSButton.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs index 89e5be2dc..707b3848f 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSButtonType = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs index a2616c3e0..96310517a 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs index 682bd62dc..454ce50e7 100644 --- a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs index 30571700d..fca572917 100644 --- a/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCachedImageRep.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index d5edcfadd..25ec80ba0 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; __inner_extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index ecdfe3a42..66a1f4686 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSCellType = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs index 3c05eee03..196a1ebac 100644 --- a/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSClickGestureRecognizer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSClipView.rs b/crates/icrate/src/generated/AppKit/NSClipView.rs index e434e221e..aaf482462 100644 --- a/crates/icrate/src/generated/AppKit/NSClipView.rs +++ b/crates/icrate/src/generated/AppKit/NSClipView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs index aaeb28f94..e27037aa4 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionView.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSCollectionViewDropOperation = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 2d8503cd4..240f3630d 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSDirectionalRectEdge = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs index 35cd5c065..edcdfa6aa 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSCollectionViewScrollDirection = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs index a810b85c3..6a99de670 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewGridLayout.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs index 50e39fb01..a8881257e 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSCollectionElementCategory = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs index 98a4f49b2..9590ab272 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewTransitionLayout.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSCollectionViewTransitionLayoutAnimatedKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index 99cec0025..e0fdd2954 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub static NSAppKitVersionNumberWithPatternColorLeakFix: NSAppKitVersion = 641.0; diff --git a/crates/icrate/src/generated/AppKit/NSColorList.rs b/crates/icrate/src/generated/AppKit/NSColorList.rs index 6a9b5bff4..b76fc9c60 100644 --- a/crates/icrate/src/generated/AppKit/NSColorList.rs +++ b/crates/icrate/src/generated/AppKit/NSColorList.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSColorListName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index 5d52a7e62..f24e0d9b2 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSColorPanelMode = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSColorPicker.rs b/crates/icrate/src/generated/AppKit/NSColorPicker.rs index d4a23f982..0264bbe23 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicker.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicker.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs index 42000183c..fdb1e7ef5 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPickerTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSColorPicking.rs b/crates/icrate/src/generated/AppKit/NSColorPicking.rs index 2a872473a..7d7018e48 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicking.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicking.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSColorPickingDefault = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSColorSampler.rs b/crates/icrate/src/generated/AppKit/NSColorSampler.rs index 8c2fea053..e87fdd2a1 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSampler.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSampler.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index 029060b40..cdf6cb10a 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSColorSpaceModel = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSColorWell.rs b/crates/icrate/src/generated/AppKit/NSColorWell.rs index 5be8a6012..8a7dd47cd 100644 --- a/crates/icrate/src/generated/AppKit/NSColorWell.rs +++ b/crates/icrate/src/generated/AppKit/NSColorWell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSComboBox.rs b/crates/icrate/src/generated/AppKit/NSComboBox.rs index 03162ce43..f3d42ee0d 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBox.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBox.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern "C" { diff --git a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs index b2b131a8e..d772e6629 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index 5757674c0..959a3a286 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSController.rs b/crates/icrate/src/generated/AppKit/NSController.rs index 3e1ed8c55..97ba28701 100644 --- a/crates/icrate/src/generated/AppKit/NSController.rs +++ b/crates/icrate/src/generated/AppKit/NSController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs index e13dbedcd..ba33cae56 100644 --- a/crates/icrate/src/generated/AppKit/NSCursor.rs +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs index 3677c8903..634446c33 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs index ff26ed4a1..7253a1b4c 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSDataAsset.rs b/crates/icrate/src/generated/AppKit/NSDataAsset.rs index c1aca393c..d0dde56b4 100644 --- a/crates/icrate/src/generated/AppKit/NSDataAsset.rs +++ b/crates/icrate/src/generated/AppKit/NSDataAsset.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSDataAssetName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSDatePicker.rs b/crates/icrate/src/generated/AppKit/NSDatePicker.rs index 9c392112b..4234e4e90 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePicker.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePicker.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index 682d609ad..9311634dd 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSDatePickerStyle = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs index afdde83e9..0b318f397 100644 --- a/crates/icrate/src/generated/AppKit/NSDictionaryController.rs +++ b/crates/icrate/src/generated/AppKit/NSDictionaryController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index fbf5c76ab..29a1a848f 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; __inner_extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSDockTile.rs b/crates/icrate/src/generated/AppKit/NSDockTile.rs index f0f3d0f36..f6bfcb422 100644 --- a/crates/icrate/src/generated/AppKit/NSDockTile.rs +++ b/crates/icrate/src/generated/AppKit/NSDockTile.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub static NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = 1001.0; diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index 7f693a1f0..c529c588a 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSDocumentChangeType = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSDocumentController.rs b/crates/icrate/src/generated/AppKit/NSDocumentController.rs index cd243bcd6..4dd8c6a97 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentController.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs index 20c8d60d1..4f6e48ff7 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentScripting.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs index a7cdd138a..9d790b838 100644 --- a/crates/icrate/src/generated/AppKit/NSDragging.rs +++ b/crates/icrate/src/generated/AppKit/NSDragging.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSDragOperation = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs index 1c666bb3e..a7dd6f30d 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSDraggingImageComponentKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs index ee9a4fad4..c278fdd69 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index b3a13bc85..5efec09c1 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSDrawerState = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs index 08173dcff..9de95e267 100644 --- a/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSEPSImageRep.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSErrors.rs b/crates/icrate/src/generated/AppKit/NSErrors.rs index 96820b869..0d48122f8 100644 --- a/crates/icrate/src/generated/AppKit/NSErrors.rs +++ b/crates/icrate/src/generated/AppKit/NSErrors.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern "C" { diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index e21e1be38..abca52dfa 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSEventType = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs index 62300a38e..3e03b5f5d 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs index ea640c877..5e1a0c2a8 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs index 0dfcd3a51..a32edd1e4 100644 --- a/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs +++ b/crates/icrate/src/generated/AppKit/NSFileWrapperExtensions.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 3447ad525..5cb2fbabd 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern "C" { diff --git a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs index bafc35a00..38d54ba82 100644 --- a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs +++ b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSFontAssetRequestOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index a0c949340..282fa6cf1 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/NSFontCollection.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSFontCollectionVisibility = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 3117db116..2b8892ec4 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSFontSymbolicTraits = u32; diff --git a/crates/icrate/src/generated/AppKit/NSFontManager.rs b/crates/icrate/src/generated/AppKit/NSFontManager.rs index e04d746d8..ef243d386 100644 --- a/crates/icrate/src/generated/AppKit/NSFontManager.rs +++ b/crates/icrate/src/generated/AppKit/NSFontManager.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSFontTraitMask = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index 2b6eb5492..dadc73d6c 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSFontPanelModeMask = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSForm.rs b/crates/icrate/src/generated/AppKit/NSForm.rs index a4ba725a5..71c8a0951 100644 --- a/crates/icrate/src/generated/AppKit/NSForm.rs +++ b/crates/icrate/src/generated/AppKit/NSForm.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSFormCell.rs b/crates/icrate/src/generated/AppKit/NSFormCell.rs index 8ca4ed12c..6b55b0853 100644 --- a/crates/icrate/src/generated/AppKit/NSFormCell.rs +++ b/crates/icrate/src/generated/AppKit/NSFormCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index fddf70c2b..569985f66 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSGestureRecognizerState = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index 723a4d76c..61f1e2e85 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub const NSShowControlGlyphs: c_uint = 1 << 0; diff --git a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs index e65204d89..489e41530 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index 336426d88..1a083c9c6 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/NSGradient.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSGradientDrawingOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs index 274cb3b4b..d2708bcdb 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphics.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphics.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSCompositingOperation = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index 96b2e6d7d..4f05ce105 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSGraphicsContextAttributeKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index 66c38069a..fe26daf19 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSGridCellPlacement = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs index c666ea5bf..48a577b70 100644 --- a/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSGroupTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs index cae411906..c29ea5b36 100644 --- a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs +++ b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSHapticFeedbackPattern = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSHelpManager.rs b/crates/icrate/src/generated/AppKit/NSHelpManager.rs index 095b08811..2f91b34ea 100644 --- a/crates/icrate/src/generated/AppKit/NSHelpManager.rs +++ b/crates/icrate/src/generated/AppKit/NSHelpManager.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSHelpBookName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index c8ea4b350..d6a5056d1 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSImageName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSImageCell.rs b/crates/icrate/src/generated/AppKit/NSImageCell.rs index db455c4b2..5dca1d90f 100644 --- a/crates/icrate/src/generated/AppKit/NSImageCell.rs +++ b/crates/icrate/src/generated/AppKit/NSImageCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSImageAlignment = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index bbc7d81fb..44e81a726 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSImageHintKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSImageView.rs b/crates/icrate/src/generated/AppKit/NSImageView.rs index 74d8dce57..6fcde1f76 100644 --- a/crates/icrate/src/generated/AppKit/NSImageView.rs +++ b/crates/icrate/src/generated/AppKit/NSImageView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSInputManager.rs b/crates/icrate/src/generated/AppKit/NSInputManager.rs index 49d02cd89..89abe2584 100644 --- a/crates/icrate/src/generated/AppKit/NSInputManager.rs +++ b/crates/icrate/src/generated/AppKit/NSInputManager.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextInput = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSInputServer.rs b/crates/icrate/src/generated/AppKit/NSInputServer.rs index f71208a44..f6d63deeb 100644 --- a/crates/icrate/src/generated/AppKit/NSInputServer.rs +++ b/crates/icrate/src/generated/AppKit/NSInputServer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSInputServiceProvider = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs index d49ccdc5b..a783cf54a 100644 --- a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub const NSNoInterfaceStyle: c_uint = 0; diff --git a/crates/icrate/src/generated/AppKit/NSItemProvider.rs b/crates/icrate/src/generated/AppKit/NSItemProvider.rs index 95ee1584b..63b0c5436 100644 --- a/crates/icrate/src/generated/AppKit/NSItemProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSItemProvider.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index bbc367aa8..f2a9ec9fd 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSBindingName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs index 63c9867ad..13ed1033e 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutAnchor.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; __inner_extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index e08711b60..e3f7ae0e3 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSLayoutPriority = c_float; diff --git a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs index 93e34e82d..f1d9a99f0 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutGuide.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index 1375c88c2..f83009e33 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextLayoutOrientation = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs index e37c53701..286bafb8a 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSLevelIndicatorPlaceholderVisibility = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs index 677369a61..853e85f3b 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSLevelIndicatorStyle = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs index 0c47bc896..f50e0d669 100644 --- a/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSMagnificationGestureRecognizer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index 0bb139006..dadddc84d 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSMatrixMode = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs index e5bd81383..c1905f4e8 100644 --- a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs +++ b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSMediaLibrary = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 7745934ce..63b9e9351 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs index 71968d20e..86c5c6561 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs index 880ef4863..9f671dce8 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItemCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs index 79fc783d1..32e9b7282 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuToolbarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSMovie.rs b/crates/icrate/src/generated/AppKit/NSMovie.rs index 40f89a63c..d921d91d7 100644 --- a/crates/icrate/src/generated/AppKit/NSMovie.rs +++ b/crates/icrate/src/generated/AppKit/NSMovie.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index 8c6a26faf..9f126b513 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSNibName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs b/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs index 9e6a32e39..661a20881 100644 --- a/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs +++ b/crates/icrate/src/generated/AppKit/NSNibDeclarations.rs @@ -2,4 +2,5 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; diff --git a/crates/icrate/src/generated/AppKit/NSNibLoading.rs b/crates/icrate/src/generated/AppKit/NSNibLoading.rs index 1e62deaa9..2f8de856d 100644 --- a/crates/icrate/src/generated/AppKit/NSNibLoading.rs +++ b/crates/icrate/src/generated/AppKit/NSNibLoading.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSObjectController.rs b/crates/icrate/src/generated/AppKit/NSObjectController.rs index e8626a499..bd2a8ffe9 100644 --- a/crates/icrate/src/generated/AppKit/NSObjectController.rs +++ b/crates/icrate/src/generated/AppKit/NSObjectController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index 7cacecbba..5c08eedfd 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSOpenGLGlobalOption = u32; diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs index f3686f908..ce985c8c0 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs index b34d90b5c..4f2fd885d 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs index 1c79a67b0..269ad2c23 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenPanel.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index a64851df2..8c19b262b 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub const NSOutlineViewDropOnItemIndex: c_int = -1; diff --git a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs index a15845a3e..163983b32 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFImageRep.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs index d26d2ac29..8de36b399 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFInfo.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs index 54ed58ab1..b1e846ffc 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPDFPanelOptions = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs index bd8eaa59a..f77e63f72 100644 --- a/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSPICTImageRep.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPageController.rs b/crates/icrate/src/generated/AppKit/NSPageController.rs index 2b182f1bf..d07092884 100644 --- a/crates/icrate/src/generated/AppKit/NSPageController.rs +++ b/crates/icrate/src/generated/AppKit/NSPageController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPageControllerObjectIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSPageLayout.rs b/crates/icrate/src/generated/AppKit/NSPageLayout.rs index 934d2d3b9..287e79b9c 100644 --- a/crates/icrate/src/generated/AppKit/NSPageLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSPageLayout.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs index 51ff608e8..4671b6e98 100644 --- a/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSPanGestureRecognizer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index 42cc00b47..b6a5e114c 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index 996cda7b9..9f2ed9613 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSLineBreakMode = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index c4dab9bc8..62e38da83 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPasteboardType = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs index 50ad47f99..6cd170a7c 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs index 110105376..7ccc2d658 100644 --- a/crates/icrate/src/generated/AppKit/NSPathCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPathStyle = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs index e95b3f7ab..666e146ac 100644 --- a/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathComponentCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPathControl.rs b/crates/icrate/src/generated/AppKit/NSPathControl.rs index 738231fb1..f4031d969 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControl.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControl.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs index 3f2f055d9..b73c38e77 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControlItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControlItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs index 4e161c793..7ed9aecce 100644 --- a/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSPersistentDocument.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs index 69a38ffdc..94e07582b 100644 --- a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPickerTouchBarItemSelectionMode = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs index 7e7e58efd..6c434cf56 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index def420c19..9c97708fd 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPopUpArrowPosition = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index 0eb74ee97..d7eb443d3 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPopoverAppearance = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs index f7669460d..30e1c4b75 100644 --- a/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPopoverTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs index fa03171d2..ccaa15e32 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditor.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs index da174ad56..f7a5b2649 100644 --- a/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs +++ b/crates/icrate/src/generated/AppKit/NSPredicateEditorRowTemplate.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs index 4b2e9d10c..89ba74221 100644 --- a/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSPressGestureRecognizer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs index 1da3bca04..457a92524 100644 --- a/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSPressureConfiguration.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs index e5e78c8d1..62ff39240 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPaperOrientation = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs index 5dca9c2bf..447520085 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPrintingPageOrder = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index 4b71b9e32..4400d1ef8 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPrintPanelOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSPrinter.rs b/crates/icrate/src/generated/AppKit/NSPrinter.rs index 3ec86c63a..9495d9959 100644 --- a/crates/icrate/src/generated/AppKit/NSPrinter.rs +++ b/crates/icrate/src/generated/AppKit/NSPrinter.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSPrinterTableStatus = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs index 332f33c28..ba3bbcd3e 100644 --- a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSProgressIndicatorStyle = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSResponder.rs b/crates/icrate/src/generated/AppKit/NSResponder.rs index 1101fd835..9108c7c10 100644 --- a/crates/icrate/src/generated/AppKit/NSResponder.rs +++ b/crates/icrate/src/generated/AppKit/NSResponder.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs index 27542051f..eb9243e1a 100644 --- a/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSRotationGestureRecognizer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index e8f286e20..68aed8a0d 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSRuleEditorPredicatePartKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs index b0bec88e8..e2215e191 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerMarker.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerMarker.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs index da830bd89..babeb398b 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerView.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSRulerOrientation = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs index 047d692ae..0b02c236f 100644 --- a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSApplicationActivationOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index 1ee134465..9fdb2818f 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub const NSFileHandlingPanelCancelButton: c_uint = NSModalResponseCancel; diff --git a/crates/icrate/src/generated/AppKit/NSScreen.rs b/crates/icrate/src/generated/AppKit/NSScreen.rs index a77fe7a63..c1fac0dda 100644 --- a/crates/icrate/src/generated/AppKit/NSScreen.rs +++ b/crates/icrate/src/generated/AppKit/NSScreen.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index 5ac0f56cb..da3d5c6ce 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSScrollElasticity = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSScroller.rs b/crates/icrate/src/generated/AppKit/NSScroller.rs index 7d024890e..67d92d7d6 100644 --- a/crates/icrate/src/generated/AppKit/NSScroller.rs +++ b/crates/icrate/src/generated/AppKit/NSScroller.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSUsableScrollerParts = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs index fb1e765e8..a91960a6e 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubber.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSScrubberDataSource = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs index 59a2b1ba4..4800cc26f 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberItemView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs index f8f442217..9e7e06912 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSearchField.rs b/crates/icrate/src/generated/AppKit/NSSearchField.rs index b1a8b1ad6..7f8eb8ecf 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchField.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchField.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSSearchFieldRecentsAutosaveName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs index 37413ab29..d7a442375 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub static NSSearchFieldRecentsTitleMenuItemTag: NSInteger = 1000; diff --git a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs index 56c42351d..de4c6a17f 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchToolbarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSecureTextField.rs b/crates/icrate/src/generated/AppKit/NSSecureTextField.rs index e98587bf0..91b41b257 100644 --- a/crates/icrate/src/generated/AppKit/NSSecureTextField.rs +++ b/crates/icrate/src/generated/AppKit/NSSecureTextField.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs index 3152eb182..5a26c7230 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs index 4bec2c95e..5ae069288 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSSegmentSwitchTracking = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSShadow.rs b/crates/icrate/src/generated/AppKit/NSShadow.rs index 45d7207d7..db96e5ed1 100644 --- a/crates/icrate/src/generated/AppKit/NSShadow.rs +++ b/crates/icrate/src/generated/AppKit/NSShadow.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index 633385990..d55e38a72 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSSharingServiceName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs index c54277c79..8d6c8808e 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs index cb66be7c3..6b7e3c7d6 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSlider.rs b/crates/icrate/src/generated/AppKit/NSSlider.rs index 09e8bdde2..c42f8d3be 100644 --- a/crates/icrate/src/generated/AppKit/NSSlider.rs +++ b/crates/icrate/src/generated/AppKit/NSSlider.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs index 49afc51f6..e1ee7bc19 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index c6656449a..45d30721b 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTickMarkPosition = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs index 211abdabf..b1327b627 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSSliderAccessoryWidth = CGFloat; diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs index 32f4a0333..58bcf16bf 100644 --- a/crates/icrate/src/generated/AppKit/NSSound.rs +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern "C" { diff --git a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs index 43e822338..d62896bd7 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index 8aeaaac7a..0151d1730 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSSpeechSynthesizerVoiceName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index ca5c74164..00b07d287 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextCheckingOptionKey = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs index 3bbcf4862..700ea835f 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSChangeSpelling = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs index 289cbb76a..c54269b30 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitView.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSSplitViewAutosaveName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs index 476fd7cf0..01a087628 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern "C" { diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs index c4dcea79e..585f8c395 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSSplitViewItemBehavior = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index 981f6921e..724300017 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSStackViewGravity = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSStatusBar.rs b/crates/icrate/src/generated/AppKit/NSStatusBar.rs index f93fc238d..0b3708fb8 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBar.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBar.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub static NSVariableStatusItemLength: CGFloat = -1.0; diff --git a/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs b/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs index e6a3a5c0f..f0ff3b7b4 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBarButton.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs index 61d78bebe..8231057a6 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSStatusItemAutosaveName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSStepper.rs b/crates/icrate/src/generated/AppKit/NSStepper.rs index 669a5fcef..ec710bfc4 100644 --- a/crates/icrate/src/generated/AppKit/NSStepper.rs +++ b/crates/icrate/src/generated/AppKit/NSStepper.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSStepperCell.rs b/crates/icrate/src/generated/AppKit/NSStepperCell.rs index 9844aff3b..166bae696 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperCell.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs index 08bcce935..e144053b8 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSStoryboard.rs b/crates/icrate/src/generated/AppKit/NSStoryboard.rs index bc4a1bacb..e2347ea1d 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboard.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboard.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSStoryboardName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs index 7f99248a6..20011b779 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSStoryboardSegueIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs index ec76cb3fc..8c06dfdd4 100644 --- a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs +++ b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSSwitch.rs b/crates/icrate/src/generated/AppKit/NSSwitch.rs index 40172550f..c6554710a 100644 --- a/crates/icrate/src/generated/AppKit/NSSwitch.rs +++ b/crates/icrate/src/generated/AppKit/NSSwitch.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs index 285368283..04f61a4e8 100644 --- a/crates/icrate/src/generated/AppKit/NSTabView.rs +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub static NSAppKitVersionNumberWithDirectionalTabs: NSAppKitVersion = 631.0; diff --git a/crates/icrate/src/generated/AppKit/NSTabViewController.rs b/crates/icrate/src/generated/AppKit/NSTabViewController.rs index 3fb1b9d4c..eae5b921c 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTabViewControllerTabStyle = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs index 5e466a984..494c84c9b 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTabState = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTableCellView.rs b/crates/icrate/src/generated/AppKit/NSTableCellView.rs index 4f19556e2..8dc498773 100644 --- a/crates/icrate/src/generated/AppKit/NSTableCellView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableCellView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs index 239df6612..29bb83a7c 100644 --- a/crates/icrate/src/generated/AppKit/NSTableColumn.rs +++ b/crates/icrate/src/generated/AppKit/NSTableColumn.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTableColumnResizingOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs index 3c4909b0a..2fdfdc94c 100644 --- a/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs index f10fcfeac..069d918cb 100644 --- a/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableHeaderView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTableRowView.rs b/crates/icrate/src/generated/AppKit/NSTableRowView.rs index a1bf4de35..0b93f72ab 100644 --- a/crates/icrate/src/generated/AppKit/NSTableRowView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableRowView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index 4cc883eed..fe3691fca 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTableViewDropOperation = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs index e7fcf7294..ce5c3a429 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTableViewDiffableDataSourceCellProvider = TodoBlock; diff --git a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs index bbacbc933..b16ae48ca 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTableViewRowActionStyle = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index 06600e7f1..46d1e9f0d 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextAlignment = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs index f073fd4a3..57ff59578 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index 3d981666d..9a78e2c6b 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub const NSAttachmentCharacter: c_uint = 0xFFFC; diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs index 5e4bc6859..5802cb58a 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachmentCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs index a198b2f81..70505f1ac 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextInputTraitType = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs index cca325582..abdd84ad8 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTextContainer.rs b/crates/icrate/src/generated/AppKit/NSTextContainer.rs index 19ff9f1ee..3ca9bfb3f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContainer.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContainer.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTextContent.rs b/crates/icrate/src/generated/AppKit/NSTextContent.rs index 372df8a0f..dc9f21c8f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContent.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContent.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextContentType = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index 36f02c716..471d3706f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextContentManagerEnumerationOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextElement.rs b/crates/icrate/src/generated/AppKit/NSTextElement.rs index 44c759933..ad8882ecc 100644 --- a/crates/icrate/src/generated/AppKit/NSTextElement.rs +++ b/crates/icrate/src/generated/AppKit/NSTextElement.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTextField.rs b/crates/icrate/src/generated/AppKit/NSTextField.rs index bd031c2d0..ff22419ac 100644 --- a/crates/icrate/src/generated/AppKit/NSTextField.rs +++ b/crates/icrate/src/generated/AppKit/NSTextField.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs index b9a776b86..951e46b1d 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextFieldBezelStyle = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index 06898c466..9e6833026 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextFinderAction = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs index face0d45d..e12675e10 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextInputClient = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs index 353234de5..15e99a204 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextInputSourceIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index 978aa23a3..aebfbd534 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextLayoutFragmentEnumerationOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index a869db739..e36e6e125 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextLayoutManagerSegmentType = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs index 85d1b0c43..b20497021 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index eac60cac0..d79bafcc6 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextListMarkerFormat = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTextRange.rs b/crates/icrate/src/generated/AppKit/NSTextRange.rs index 615125f3f..f19d6638f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextRange.rs +++ b/crates/icrate/src/generated/AppKit/NSTextRange.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextLocation = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextSelection.rs b/crates/icrate/src/generated/AppKit/NSTextSelection.rs index a809e3be0..804e0c1ff 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelection.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelection.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextSelectionGranularity = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index 022889159..bd774805a 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextSelectionNavigationDirection = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index e7e9b8878..37f1437e6 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextStorageEditActions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs index 16da87fc4..4ae0ad6cb 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorageScripting.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSTextTable.rs b/crates/icrate/src/generated/AppKit/NSTextTable.rs index d4fe6c303..0a1cbbbd4 100644 --- a/crates/icrate/src/generated/AppKit/NSTextTable.rs +++ b/crates/icrate/src/generated/AppKit/NSTextTable.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextBlockValueType = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index 6ca775056..aabaa6ec1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSSelectionGranularity = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs index 0165843be..f07f57343 100644 --- a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTextViewportLayoutControllerDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs index 060df9f1a..535e5e0d2 100644 --- a/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs +++ b/crates/icrate/src/generated/AppKit/NSTintConfiguration.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs b/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs index bdef8242b..6d430cc9e 100644 --- a/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTitlebarAccessoryViewController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTokenField.rs b/crates/icrate/src/generated/AppKit/NSTokenField.rs index dcfeb216a..544f23a64 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenField.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenField.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTokenFieldDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs index ebe9804ea..12025ef46 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTokenStyle = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index 6e75481fa..fac1088ca 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSToolbarIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index 39ea5953f..cca82ea11 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSToolbarItemVisibilityPriority = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs index 7b2dd5a4c..0f77eb84e 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSToolbarItemGroupSelectionMode = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs index c5b0a2b90..293e10724 100644 --- a/crates/icrate/src/generated/AppKit/NSTouch.rs +++ b/crates/icrate/src/generated/AppKit/NSTouch.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTouchPhase = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTouchBar.rs b/crates/icrate/src/generated/AppKit/NSTouchBar.rs index f6ccfe9f0..d383d4382 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBar.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBar.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTouchBarCustomizationIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs index ac60896d4..301ae2a8b 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTouchBarItemIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs index 7580fc17a..f8940a97e 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSTrackingAreaOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs index 36659ab84..41a47d077 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingSeparatorToolbarItem.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTreeController.rs b/crates/icrate/src/generated/AppKit/NSTreeController.rs index 95ce19af3..15a84e6a9 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeController.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTreeNode.rs b/crates/icrate/src/generated/AppKit/NSTreeNode.rs index 38295fe83..8c10f0fb8 100644 --- a/crates/icrate/src/generated/AppKit/NSTreeNode.rs +++ b/crates/icrate/src/generated/AppKit/NSTreeNode.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs index f04994bff..2341733b9 100644 --- a/crates/icrate/src/generated/AppKit/NSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSTypesetter.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSUserActivity.rs b/crates/icrate/src/generated/AppKit/NSUserActivity.rs index 41d54df83..e91005dda 100644 --- a/crates/icrate/src/generated/AppKit/NSUserActivity.rs +++ b/crates/icrate/src/generated/AppKit/NSUserActivity.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSUserActivityRestoring = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs index dd3687aae..47edb2f5a 100644 --- a/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs +++ b/crates/icrate/src/generated/AppKit/NSUserDefaultsController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs index e9bd7f1eb..7124c6a66 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs index 8b0f5eddc..eceba9f29 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSUserInterfaceItemIdentifier = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs index 9f907deb5..7ac714381 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSUserInterfaceItemSearching = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs index a512432fb..81c08d982 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSUserInterfaceLayoutDirection = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs index cb621e7f3..b8e983ea8 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSValidatedUserInterfaceItem = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 0f32ee4de..747dec477 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSAutoresizingMaskOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index 0aad3f540..1bdedd8a5 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSViewControllerTransitionOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs index 84e7b4160..d22bdb968 100644 --- a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs +++ b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSVisualEffectMaterial = NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 28f7a2ccf..2fcdcff02 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub static NSAppKitVersionNumberWithCustomSheetPosition: NSAppKitVersion = 686.0; diff --git a/crates/icrate/src/generated/AppKit/NSWindowController.rs b/crates/icrate/src/generated/AppKit/NSWindowController.rs index 211b7d096..9c9bbe6de 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowController.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowController.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs index d75175190..d4d96ec5b 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSWindowRestoration = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs index dae19c46c..304c953d6 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowScripting.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowScripting.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSWindowTab.rs b/crates/icrate/src/generated/AppKit/NSWindowTab.rs index 7a1993883..edb9ad40f 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowTab.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowTab.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs index c6962e624..4543f846d 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowTabGroup.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index b8af3f4bd..64be75177 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -2,6 +2,7 @@ //! DO NOT EDIT use crate::common::*; use crate::AppKit::*; +use crate::CoreData::*; use crate::Foundation::*; pub type NSWorkspaceIconCreationOptions = NSUInteger; diff --git a/crates/icrate/src/generated/CoreData/CoreDataDefines.rs b/crates/icrate/src/generated/CoreData/CoreDataDefines.rs new file mode 100644 index 000000000..651fc4182 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/CoreDataDefines.rs @@ -0,0 +1,9 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern "C" { + pub static NSCoreDataVersionNumber: c_double; +} diff --git a/crates/icrate/src/generated/CoreData/CoreDataErrors.rs b/crates/icrate/src/generated/CoreData/CoreDataErrors.rs new file mode 100644 index 000000000..014d7a703 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/CoreDataErrors.rs @@ -0,0 +1,88 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern "C" { + pub static NSDetailedErrorsKey: &'static NSString; +} + +extern "C" { + pub static NSValidationObjectErrorKey: &'static NSString; +} + +extern "C" { + pub static NSValidationKeyErrorKey: &'static NSString; +} + +extern "C" { + pub static NSValidationPredicateErrorKey: &'static NSString; +} + +extern "C" { + pub static NSValidationValueErrorKey: &'static NSString; +} + +extern "C" { + pub static NSAffectedStoresErrorKey: &'static NSString; +} + +extern "C" { + pub static NSAffectedObjectsErrorKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreSaveConflictsErrorKey: &'static NSString; +} + +extern "C" { + pub static NSSQLiteErrorDomain: &'static NSString; +} + +pub const NSManagedObjectValidationError: NSInteger = 1550; +pub const NSManagedObjectConstraintValidationError: NSInteger = 1551; +pub const NSValidationMultipleErrorsError: NSInteger = 1560; +pub const NSValidationMissingMandatoryPropertyError: NSInteger = 1570; +pub const NSValidationRelationshipLacksMinimumCountError: NSInteger = 1580; +pub const NSValidationRelationshipExceedsMaximumCountError: NSInteger = 1590; +pub const NSValidationRelationshipDeniedDeleteError: NSInteger = 1600; +pub const NSValidationNumberTooLargeError: NSInteger = 1610; +pub const NSValidationNumberTooSmallError: NSInteger = 1620; +pub const NSValidationDateTooLateError: NSInteger = 1630; +pub const NSValidationDateTooSoonError: NSInteger = 1640; +pub const NSValidationInvalidDateError: NSInteger = 1650; +pub const NSValidationStringTooLongError: NSInteger = 1660; +pub const NSValidationStringTooShortError: NSInteger = 1670; +pub const NSValidationStringPatternMatchingError: NSInteger = 1680; +pub const NSValidationInvalidURIError: NSInteger = 1690; +pub const NSManagedObjectContextLockingError: NSInteger = 132000; +pub const NSPersistentStoreCoordinatorLockingError: NSInteger = 132010; +pub const NSManagedObjectReferentialIntegrityError: NSInteger = 133000; +pub const NSManagedObjectExternalRelationshipError: NSInteger = 133010; +pub const NSManagedObjectMergeError: NSInteger = 133020; +pub const NSManagedObjectConstraintMergeError: NSInteger = 133021; +pub const NSPersistentStoreInvalidTypeError: NSInteger = 134000; +pub const NSPersistentStoreTypeMismatchError: NSInteger = 134010; +pub const NSPersistentStoreIncompatibleSchemaError: NSInteger = 134020; +pub const NSPersistentStoreSaveError: NSInteger = 134030; +pub const NSPersistentStoreIncompleteSaveError: NSInteger = 134040; +pub const NSPersistentStoreSaveConflictsError: NSInteger = 134050; +pub const NSCoreDataError: NSInteger = 134060; +pub const NSPersistentStoreOperationError: NSInteger = 134070; +pub const NSPersistentStoreOpenError: NSInteger = 134080; +pub const NSPersistentStoreTimeoutError: NSInteger = 134090; +pub const NSPersistentStoreUnsupportedRequestTypeError: NSInteger = 134091; +pub const NSPersistentStoreIncompatibleVersionHashError: NSInteger = 134100; +pub const NSMigrationError: NSInteger = 134110; +pub const NSMigrationConstraintViolationError: NSInteger = 134111; +pub const NSMigrationCancelledError: NSInteger = 134120; +pub const NSMigrationMissingSourceModelError: NSInteger = 134130; +pub const NSMigrationMissingMappingModelError: NSInteger = 134140; +pub const NSMigrationManagerSourceStoreError: NSInteger = 134150; +pub const NSMigrationManagerDestinationStoreError: NSInteger = 134160; +pub const NSEntityMigrationPolicyError: NSInteger = 134170; +pub const NSSQLiteError: NSInteger = 134180; +pub const NSInferredMappingModelError: NSInteger = 134190; +pub const NSExternalRecordImportError: NSInteger = 134200; +pub const NSPersistentHistoryTokenExpiredError: NSInteger = 134301; diff --git a/crates/icrate/src/generated/CoreData/NSAtomicStore.rs b/crates/icrate/src/generated/CoreData/NSAtomicStore.rs new file mode 100644 index 000000000..5944fafdd --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSAtomicStore.rs @@ -0,0 +1,80 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSAtomicStore; + + unsafe impl ClassType for NSAtomicStore { + type Super = NSPersistentStore; + } +); + +extern_methods!( + unsafe impl NSAtomicStore { + #[method_id(@__retain_semantics Init initWithPersistentStoreCoordinator:configurationName:URL:options:)] + pub unsafe fn initWithPersistentStoreCoordinator_configurationName_URL_options( + this: Option>, + coordinator: Option<&NSPersistentStoreCoordinator>, + configurationName: Option<&NSString>, + url: &NSURL, + options: Option<&NSDictionary>, + ) -> Id; + + #[method(load:)] + pub unsafe fn load(&self, error: *mut *mut NSError) -> bool; + + #[method(save:)] + pub unsafe fn save(&self, error: *mut *mut NSError) -> bool; + + #[method_id(@__retain_semantics New newCacheNodeForManagedObject:)] + pub unsafe fn newCacheNodeForManagedObject( + &self, + managedObject: &NSManagedObject, + ) -> Id; + + #[method(updateCacheNode:fromManagedObject:)] + pub unsafe fn updateCacheNode_fromManagedObject( + &self, + node: &NSAtomicStoreCacheNode, + managedObject: &NSManagedObject, + ); + + #[method_id(@__retain_semantics Other cacheNodes)] + pub unsafe fn cacheNodes(&self) -> Id, Shared>; + + #[method(addCacheNodes:)] + pub unsafe fn addCacheNodes(&self, cacheNodes: &NSSet); + + #[method(willRemoveCacheNodes:)] + pub unsafe fn willRemoveCacheNodes(&self, cacheNodes: &NSSet); + + #[method_id(@__retain_semantics Other cacheNodeForObjectID:)] + pub unsafe fn cacheNodeForObjectID( + &self, + objectID: &NSManagedObjectID, + ) -> Option>; + + #[method_id(@__retain_semantics Other objectIDForEntity:referenceObject:)] + pub unsafe fn objectIDForEntity_referenceObject( + &self, + entity: &NSEntityDescription, + data: &Object, + ) -> Id; + + #[method_id(@__retain_semantics New newReferenceObjectForManagedObject:)] + pub unsafe fn newReferenceObjectForManagedObject( + &self, + managedObject: &NSManagedObject, + ) -> Id; + + #[method_id(@__retain_semantics Other referenceObjectForObjectID:)] + pub unsafe fn referenceObjectForObjectID( + &self, + objectID: &NSManagedObjectID, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSAtomicStoreCacheNode.rs b/crates/icrate/src/generated/CoreData/NSAtomicStoreCacheNode.rs new file mode 100644 index 000000000..0cc5b65c7 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSAtomicStoreCacheNode.rs @@ -0,0 +1,44 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSAtomicStoreCacheNode; + + unsafe impl ClassType for NSAtomicStoreCacheNode { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSAtomicStoreCacheNode { + #[method_id(@__retain_semantics Init initWithObjectID:)] + pub unsafe fn initWithObjectID( + this: Option>, + moid: &NSManagedObjectID, + ) -> Id; + + #[method_id(@__retain_semantics Other objectID)] + pub unsafe fn objectID(&self) -> Id; + + #[method_id(@__retain_semantics Other propertyCache)] + pub unsafe fn propertyCache( + &self, + ) -> Option, Shared>>; + + #[method(setPropertyCache:)] + pub unsafe fn setPropertyCache( + &self, + propertyCache: Option<&NSMutableDictionary>, + ); + + #[method_id(@__retain_semantics Other valueForKey:)] + pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; + + #[method(setValue:forKey:)] + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSAttributeDescription.rs b/crates/icrate/src/generated/CoreData/NSAttributeDescription.rs new file mode 100644 index 000000000..168b8e33d --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSAttributeDescription.rs @@ -0,0 +1,86 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSAttributeType = NSUInteger; +pub const NSUndefinedAttributeType: NSAttributeType = 0; +pub const NSInteger16AttributeType: NSAttributeType = 100; +pub const NSInteger32AttributeType: NSAttributeType = 200; +pub const NSInteger64AttributeType: NSAttributeType = 300; +pub const NSDecimalAttributeType: NSAttributeType = 400; +pub const NSDoubleAttributeType: NSAttributeType = 500; +pub const NSFloatAttributeType: NSAttributeType = 600; +pub const NSStringAttributeType: NSAttributeType = 700; +pub const NSBooleanAttributeType: NSAttributeType = 800; +pub const NSDateAttributeType: NSAttributeType = 900; +pub const NSBinaryDataAttributeType: NSAttributeType = 1000; +pub const NSUUIDAttributeType: NSAttributeType = 1100; +pub const NSURIAttributeType: NSAttributeType = 1200; +pub const NSTransformableAttributeType: NSAttributeType = 1800; +pub const NSObjectIDAttributeType: NSAttributeType = 2000; + +extern_class!( + #[derive(Debug)] + pub struct NSAttributeDescription; + + unsafe impl ClassType for NSAttributeDescription { + type Super = NSPropertyDescription; + } +); + +extern_methods!( + unsafe impl NSAttributeDescription { + #[method(attributeType)] + pub unsafe fn attributeType(&self) -> NSAttributeType; + + #[method(setAttributeType:)] + pub unsafe fn setAttributeType(&self, attributeType: NSAttributeType); + + #[method_id(@__retain_semantics Other attributeValueClassName)] + pub unsafe fn attributeValueClassName(&self) -> Option>; + + #[method(setAttributeValueClassName:)] + pub unsafe fn setAttributeValueClassName(&self, attributeValueClassName: Option<&NSString>); + + #[method_id(@__retain_semantics Other defaultValue)] + pub unsafe fn defaultValue(&self) -> Option>; + + #[method(setDefaultValue:)] + pub unsafe fn setDefaultValue(&self, defaultValue: Option<&Object>); + + #[method_id(@__retain_semantics Other versionHash)] + pub unsafe fn versionHash(&self) -> Id; + + #[method_id(@__retain_semantics Other valueTransformerName)] + pub unsafe fn valueTransformerName(&self) -> Option>; + + #[method(setValueTransformerName:)] + pub unsafe fn setValueTransformerName(&self, valueTransformerName: Option<&NSString>); + + #[method(allowsExternalBinaryDataStorage)] + pub unsafe fn allowsExternalBinaryDataStorage(&self) -> bool; + + #[method(setAllowsExternalBinaryDataStorage:)] + pub unsafe fn setAllowsExternalBinaryDataStorage( + &self, + allowsExternalBinaryDataStorage: bool, + ); + + #[method(preservesValueInHistoryOnDeletion)] + pub unsafe fn preservesValueInHistoryOnDeletion(&self) -> bool; + + #[method(setPreservesValueInHistoryOnDeletion:)] + pub unsafe fn setPreservesValueInHistoryOnDeletion( + &self, + preservesValueInHistoryOnDeletion: bool, + ); + + #[method(allowsCloudEncryption)] + pub unsafe fn allowsCloudEncryption(&self) -> bool; + + #[method(setAllowsCloudEncryption:)] + pub unsafe fn setAllowsCloudEncryption(&self, allowsCloudEncryption: bool); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSBatchDeleteRequest.rs b/crates/icrate/src/generated/CoreData/NSBatchDeleteRequest.rs new file mode 100644 index 000000000..c506ed766 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSBatchDeleteRequest.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSBatchDeleteRequest; + + unsafe impl ClassType for NSBatchDeleteRequest { + type Super = NSPersistentStoreRequest; + } +); + +extern_methods!( + unsafe impl NSBatchDeleteRequest { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithFetchRequest:)] + pub unsafe fn initWithFetchRequest( + this: Option>, + fetch: &NSFetchRequest, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithObjectIDs:)] + pub unsafe fn initWithObjectIDs( + this: Option>, + objects: &NSArray, + ) -> Id; + + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSBatchDeleteRequestResultType; + + #[method(setResultType:)] + pub unsafe fn setResultType(&self, resultType: NSBatchDeleteRequestResultType); + + #[method_id(@__retain_semantics Other fetchRequest)] + pub unsafe fn fetchRequest(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSBatchInsertRequest.rs b/crates/icrate/src/generated/CoreData/NSBatchInsertRequest.rs new file mode 100644 index 000000000..34637eb94 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSBatchInsertRequest.rs @@ -0,0 +1,116 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSBatchInsertRequest; + + unsafe impl ClassType for NSBatchInsertRequest { + type Super = NSPersistentStoreRequest; + } +); + +extern_methods!( + unsafe impl NSBatchInsertRequest { + #[method_id(@__retain_semantics Other entityName)] + pub unsafe fn entityName(&self) -> Id; + + #[method_id(@__retain_semantics Other entity)] + pub unsafe fn entity(&self) -> Option>; + + #[method_id(@__retain_semantics Other objectsToInsert)] + pub unsafe fn objectsToInsert( + &self, + ) -> Option>, Shared>>; + + #[method(setObjectsToInsert:)] + pub unsafe fn setObjectsToInsert( + &self, + objectsToInsert: Option<&NSArray>>, + ); + + #[method(dictionaryHandler)] + pub unsafe fn dictionaryHandler(&self) -> TodoBlock; + + #[method(setDictionaryHandler:)] + pub unsafe fn setDictionaryHandler(&self, dictionaryHandler: TodoBlock); + + #[method(managedObjectHandler)] + pub unsafe fn managedObjectHandler(&self) -> TodoBlock; + + #[method(setManagedObjectHandler:)] + pub unsafe fn setManagedObjectHandler(&self, managedObjectHandler: TodoBlock); + + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSBatchInsertRequestResultType; + + #[method(setResultType:)] + pub unsafe fn setResultType(&self, resultType: NSBatchInsertRequestResultType); + + #[method_id(@__retain_semantics Other batchInsertRequestWithEntityName:objects:)] + pub unsafe fn batchInsertRequestWithEntityName_objects( + entityName: &NSString, + dictionaries: &NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Other batchInsertRequestWithEntityName:dictionaryHandler:)] + pub unsafe fn batchInsertRequestWithEntityName_dictionaryHandler( + entityName: &NSString, + handler: TodoBlock, + ) -> Id; + + #[method_id(@__retain_semantics Other batchInsertRequestWithEntityName:managedObjectHandler:)] + pub unsafe fn batchInsertRequestWithEntityName_managedObjectHandler( + entityName: &NSString, + handler: TodoBlock, + ) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithEntityName:objects:)] + pub unsafe fn initWithEntityName_objects( + this: Option>, + entityName: &NSString, + dictionaries: &NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithEntity:objects:)] + pub unsafe fn initWithEntity_objects( + this: Option>, + entity: &NSEntityDescription, + dictionaries: &NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithEntity:dictionaryHandler:)] + pub unsafe fn initWithEntity_dictionaryHandler( + this: Option>, + entity: &NSEntityDescription, + handler: TodoBlock, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithEntity:managedObjectHandler:)] + pub unsafe fn initWithEntity_managedObjectHandler( + this: Option>, + entity: &NSEntityDescription, + handler: TodoBlock, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithEntityName:dictionaryHandler:)] + pub unsafe fn initWithEntityName_dictionaryHandler( + this: Option>, + entityName: &NSString, + handler: TodoBlock, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithEntityName:managedObjectHandler:)] + pub unsafe fn initWithEntityName_managedObjectHandler( + this: Option>, + entityName: &NSString, + handler: TodoBlock, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSBatchUpdateRequest.rs b/crates/icrate/src/generated/CoreData/NSBatchUpdateRequest.rs new file mode 100644 index 000000000..5d5289187 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSBatchUpdateRequest.rs @@ -0,0 +1,63 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSBatchUpdateRequest; + + unsafe impl ClassType for NSBatchUpdateRequest { + type Super = NSPersistentStoreRequest; + } +); + +extern_methods!( + unsafe impl NSBatchUpdateRequest { + #[method_id(@__retain_semantics Other batchUpdateRequestWithEntityName:)] + pub unsafe fn batchUpdateRequestWithEntityName(entityName: &NSString) -> Id; + + #[method_id(@__retain_semantics Init initWithEntityName:)] + pub unsafe fn initWithEntityName( + this: Option>, + entityName: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithEntity:)] + pub unsafe fn initWithEntity( + this: Option>, + entity: &NSEntityDescription, + ) -> Id; + + #[method_id(@__retain_semantics Other entityName)] + pub unsafe fn entityName(&self) -> Id; + + #[method_id(@__retain_semantics Other entity)] + pub unsafe fn entity(&self) -> Id; + + #[method_id(@__retain_semantics Other predicate)] + pub unsafe fn predicate(&self) -> Option>; + + #[method(setPredicate:)] + pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>); + + #[method(includesSubentities)] + pub unsafe fn includesSubentities(&self) -> bool; + + #[method(setIncludesSubentities:)] + pub unsafe fn setIncludesSubentities(&self, includesSubentities: bool); + + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSBatchUpdateRequestResultType; + + #[method(setResultType:)] + pub unsafe fn setResultType(&self, resultType: NSBatchUpdateRequestResultType); + + #[method_id(@__retain_semantics Other propertiesToUpdate)] + pub unsafe fn propertiesToUpdate(&self) -> Option>; + + #[method(setPropertiesToUpdate:)] + pub unsafe fn setPropertiesToUpdate(&self, propertiesToUpdate: Option<&NSDictionary>); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs b/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs new file mode 100644 index 000000000..bb919299b --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs @@ -0,0 +1,82 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern "C" { + pub static NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification: + &'static NSNotificationName; +} + +extern_class!( + #[derive(Debug)] + pub struct NSCoreDataCoreSpotlightDelegate; + + unsafe impl ClassType for NSCoreDataCoreSpotlightDelegate { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSCoreDataCoreSpotlightDelegate { + #[method(isIndexingEnabled)] + pub unsafe fn isIndexingEnabled(&self) -> bool; + + #[method_id(@__retain_semantics Other domainIdentifier)] + pub unsafe fn domainIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other indexName)] + pub unsafe fn indexName(&self) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initForStoreWithDescription:coordinator:)] + pub unsafe fn initForStoreWithDescription_coordinator( + this: Option>, + description: &NSPersistentStoreDescription, + psc: &NSPersistentStoreCoordinator, + ) -> Id; + + #[method_id(@__retain_semantics Init initForStoreWithDescription:model:)] + pub unsafe fn initForStoreWithDescription_model( + this: Option>, + description: &NSPersistentStoreDescription, + model: &NSManagedObjectModel, + ) -> Id; + + #[method(startSpotlightIndexing)] + pub unsafe fn startSpotlightIndexing(&self); + + #[method(stopSpotlightIndexing)] + pub unsafe fn stopSpotlightIndexing(&self); + + #[method(deleteSpotlightIndexWithCompletionHandler:)] + pub unsafe fn deleteSpotlightIndexWithCompletionHandler( + &self, + completionHandler: TodoBlock, + ); + + #[method_id(@__retain_semantics Other attributeSetForObject:)] + pub unsafe fn attributeSetForObject( + &self, + object: &NSManagedObject, + ) -> Option>; + + #[method(searchableIndex:reindexAllSearchableItemsWithAcknowledgementHandler:)] + pub unsafe fn searchableIndex_reindexAllSearchableItemsWithAcknowledgementHandler( + &self, + searchableIndex: &CSSearchableIndex, + acknowledgementHandler: TodoBlock, + ); + + #[method(searchableIndex:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:)] + pub unsafe fn searchableIndex_reindexSearchableItemsWithIdentifiers_acknowledgementHandler( + &self, + searchableIndex: &CSSearchableIndex, + identifiers: &NSArray, + acknowledgementHandler: TodoBlock, + ); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSDerivedAttributeDescription.rs b/crates/icrate/src/generated/CoreData/NSDerivedAttributeDescription.rs new file mode 100644 index 000000000..54a6e6174 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSDerivedAttributeDescription.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSDerivedAttributeDescription; + + unsafe impl ClassType for NSDerivedAttributeDescription { + type Super = NSAttributeDescription; + } +); + +extern_methods!( + unsafe impl NSDerivedAttributeDescription { + #[method_id(@__retain_semantics Other derivationExpression)] + pub unsafe fn derivationExpression(&self) -> Option>; + + #[method(setDerivationExpression:)] + pub unsafe fn setDerivationExpression(&self, derivationExpression: Option<&NSExpression>); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSEntityDescription.rs b/crates/icrate/src/generated/CoreData/NSEntityDescription.rs new file mode 100644 index 000000000..602fa480b --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSEntityDescription.rs @@ -0,0 +1,124 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSEntityDescription; + + unsafe impl ClassType for NSEntityDescription { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSEntityDescription { + #[method_id(@__retain_semantics Other entityForName:inManagedObjectContext:)] + pub unsafe fn entityForName_inManagedObjectContext(entityName: &NSString,context: &NSManagedObjectContext,) -> Option>; + + #[method_id(@__retain_semantics Other insertNewObjectForEntityForName:inManagedObjectContext:)] + pub unsafe fn insertNewObjectForEntityForName_inManagedObjectContext(entityName: &NSString,context: &NSManagedObjectContext,) -> Id; + + #[method_id(@__retain_semantics Other managedObjectModel)] + pub unsafe fn managedObjectModel(&self, ) -> Id; + + #[method_id(@__retain_semantics Other managedObjectClassName)] + pub unsafe fn managedObjectClassName(&self, ) -> Id; + + #[method(setManagedObjectClassName:)] + pub unsafe fn setManagedObjectClassName(&self, managedObjectClassName: Option<&NSString>,); + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self, ) -> Option>; + + #[method(setName:)] + pub unsafe fn setName(&self, name: Option<&NSString>,); + + #[method(isAbstract)] + pub unsafe fn isAbstract(&self, ) -> bool; + + #[method(setAbstract:)] + pub unsafe fn setAbstract(&self, abstract: bool,); + + #[method_id(@__retain_semantics Other subentitiesByName)] + pub unsafe fn subentitiesByName(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other subentities)] + pub unsafe fn subentities(&self, ) -> Id, Shared>; + + #[method(setSubentities:)] + pub unsafe fn setSubentities(&self, subentities: &NSArray,); + + #[method_id(@__retain_semantics Other superentity)] + pub unsafe fn superentity(&self, ) -> Option>; + + #[method_id(@__retain_semantics Other propertiesByName)] + pub unsafe fn propertiesByName(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other properties)] + pub unsafe fn properties(&self, ) -> Id, Shared>; + + #[method(setProperties:)] + pub unsafe fn setProperties(&self, properties: &NSArray,); + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self, ) -> Option>; + + #[method(setUserInfo:)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>,); + + #[method_id(@__retain_semantics Other attributesByName)] + pub unsafe fn attributesByName(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other relationshipsByName)] + pub unsafe fn relationshipsByName(&self, ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other relationshipsWithDestinationEntity:)] + pub unsafe fn relationshipsWithDestinationEntity(&self, entity: &NSEntityDescription,) -> Id, Shared>; + + #[method(isKindOfEntity:)] + pub unsafe fn isKindOfEntity(&self, entity: &NSEntityDescription,) -> bool; + + #[method_id(@__retain_semantics Other versionHash)] + pub unsafe fn versionHash(&self, ) -> Id; + + #[method_id(@__retain_semantics Other versionHashModifier)] + pub unsafe fn versionHashModifier(&self, ) -> Option>; + + #[method(setVersionHashModifier:)] + pub unsafe fn setVersionHashModifier(&self, versionHashModifier: Option<&NSString>,); + + #[method_id(@__retain_semantics Other renamingIdentifier)] + pub unsafe fn renamingIdentifier(&self, ) -> Option>; + + #[method(setRenamingIdentifier:)] + pub unsafe fn setRenamingIdentifier(&self, renamingIdentifier: Option<&NSString>,); + + #[method_id(@__retain_semantics Other indexes)] + pub unsafe fn indexes(&self, ) -> Id, Shared>; + + #[method(setIndexes:)] + pub unsafe fn setIndexes(&self, indexes: &NSArray,); + + #[method_id(@__retain_semantics Other uniquenessConstraints)] + pub unsafe fn uniquenessConstraints(&self, ) -> Id,>, Shared>; + + #[method(setUniquenessConstraints:)] + pub unsafe fn setUniquenessConstraints(&self, uniquenessConstraints: &NSArray,>,); + + #[method_id(@__retain_semantics Other compoundIndexes)] + pub unsafe fn compoundIndexes(&self, ) -> Id,>, Shared>; + + #[method(setCompoundIndexes:)] + pub unsafe fn setCompoundIndexes(&self, compoundIndexes: &NSArray,>,); + + #[method_id(@__retain_semantics Other coreSpotlightDisplayNameExpression)] + pub unsafe fn coreSpotlightDisplayNameExpression(&self, ) -> Id; + + #[method(setCoreSpotlightDisplayNameExpression:)] + pub unsafe fn setCoreSpotlightDisplayNameExpression(&self, coreSpotlightDisplayNameExpression: &NSExpression,); + + } +); diff --git a/crates/icrate/src/generated/CoreData/NSEntityMapping.rs b/crates/icrate/src/generated/CoreData/NSEntityMapping.rs new file mode 100644 index 000000000..a910d8b70 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSEntityMapping.rs @@ -0,0 +1,105 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSEntityMappingType = NSUInteger; +pub const NSUndefinedEntityMappingType: NSEntityMappingType = 0x00; +pub const NSCustomEntityMappingType: NSEntityMappingType = 0x01; +pub const NSAddEntityMappingType: NSEntityMappingType = 0x02; +pub const NSRemoveEntityMappingType: NSEntityMappingType = 0x03; +pub const NSCopyEntityMappingType: NSEntityMappingType = 0x04; +pub const NSTransformEntityMappingType: NSEntityMappingType = 0x05; + +extern_class!( + #[derive(Debug)] + pub struct NSEntityMapping; + + unsafe impl ClassType for NSEntityMapping { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSEntityMapping { + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method(setName:)] + pub unsafe fn setName(&self, name: Option<&NSString>); + + #[method(mappingType)] + pub unsafe fn mappingType(&self) -> NSEntityMappingType; + + #[method(setMappingType:)] + pub unsafe fn setMappingType(&self, mappingType: NSEntityMappingType); + + #[method_id(@__retain_semantics Other sourceEntityName)] + pub unsafe fn sourceEntityName(&self) -> Option>; + + #[method(setSourceEntityName:)] + pub unsafe fn setSourceEntityName(&self, sourceEntityName: Option<&NSString>); + + #[method_id(@__retain_semantics Other sourceEntityVersionHash)] + pub unsafe fn sourceEntityVersionHash(&self) -> Option>; + + #[method(setSourceEntityVersionHash:)] + pub unsafe fn setSourceEntityVersionHash(&self, sourceEntityVersionHash: Option<&NSData>); + + #[method_id(@__retain_semantics Other destinationEntityName)] + pub unsafe fn destinationEntityName(&self) -> Option>; + + #[method(setDestinationEntityName:)] + pub unsafe fn setDestinationEntityName(&self, destinationEntityName: Option<&NSString>); + + #[method_id(@__retain_semantics Other destinationEntityVersionHash)] + pub unsafe fn destinationEntityVersionHash(&self) -> Option>; + + #[method(setDestinationEntityVersionHash:)] + pub unsafe fn setDestinationEntityVersionHash( + &self, + destinationEntityVersionHash: Option<&NSData>, + ); + + #[method_id(@__retain_semantics Other attributeMappings)] + pub unsafe fn attributeMappings(&self) -> Option, Shared>>; + + #[method(setAttributeMappings:)] + pub unsafe fn setAttributeMappings( + &self, + attributeMappings: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other relationshipMappings)] + pub unsafe fn relationshipMappings(&self) + -> Option, Shared>>; + + #[method(setRelationshipMappings:)] + pub unsafe fn setRelationshipMappings( + &self, + relationshipMappings: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other sourceExpression)] + pub unsafe fn sourceExpression(&self) -> Option>; + + #[method(setSourceExpression:)] + pub unsafe fn setSourceExpression(&self, sourceExpression: Option<&NSExpression>); + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + + #[method(setUserInfo:)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); + + #[method_id(@__retain_semantics Other entityMigrationPolicyClassName)] + pub unsafe fn entityMigrationPolicyClassName(&self) -> Option>; + + #[method(setEntityMigrationPolicyClassName:)] + pub unsafe fn setEntityMigrationPolicyClassName( + &self, + entityMigrationPolicyClassName: Option<&NSString>, + ); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSEntityMigrationPolicy.rs b/crates/icrate/src/generated/CoreData/NSEntityMigrationPolicy.rs new file mode 100644 index 000000000..9da4f642a --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSEntityMigrationPolicy.rs @@ -0,0 +1,93 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern "C" { + pub static NSMigrationManagerKey: &'static NSString; +} + +extern "C" { + pub static NSMigrationSourceObjectKey: &'static NSString; +} + +extern "C" { + pub static NSMigrationDestinationObjectKey: &'static NSString; +} + +extern "C" { + pub static NSMigrationEntityMappingKey: &'static NSString; +} + +extern "C" { + pub static NSMigrationPropertyMappingKey: &'static NSString; +} + +extern "C" { + pub static NSMigrationEntityPolicyKey: &'static NSString; +} + +extern_class!( + #[derive(Debug)] + pub struct NSEntityMigrationPolicy; + + unsafe impl ClassType for NSEntityMigrationPolicy { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSEntityMigrationPolicy { + #[method(beginEntityMapping:manager:error:)] + pub unsafe fn beginEntityMapping_manager_error( + &self, + mapping: &NSEntityMapping, + manager: &NSMigrationManager, + ) -> Result<(), Id>; + + #[method(createDestinationInstancesForSourceInstance:entityMapping:manager:error:)] + pub unsafe fn createDestinationInstancesForSourceInstance_entityMapping_manager_error( + &self, + sInstance: &NSManagedObject, + mapping: &NSEntityMapping, + manager: &NSMigrationManager, + ) -> Result<(), Id>; + + #[method(endInstanceCreationForEntityMapping:manager:error:)] + pub unsafe fn endInstanceCreationForEntityMapping_manager_error( + &self, + mapping: &NSEntityMapping, + manager: &NSMigrationManager, + ) -> Result<(), Id>; + + #[method(createRelationshipsForDestinationInstance:entityMapping:manager:error:)] + pub unsafe fn createRelationshipsForDestinationInstance_entityMapping_manager_error( + &self, + dInstance: &NSManagedObject, + mapping: &NSEntityMapping, + manager: &NSMigrationManager, + ) -> Result<(), Id>; + + #[method(endRelationshipCreationForEntityMapping:manager:error:)] + pub unsafe fn endRelationshipCreationForEntityMapping_manager_error( + &self, + mapping: &NSEntityMapping, + manager: &NSMigrationManager, + ) -> Result<(), Id>; + + #[method(performCustomValidationForEntityMapping:manager:error:)] + pub unsafe fn performCustomValidationForEntityMapping_manager_error( + &self, + mapping: &NSEntityMapping, + manager: &NSMigrationManager, + ) -> Result<(), Id>; + + #[method(endEntityMapping:manager:error:)] + pub unsafe fn endEntityMapping_manager_error( + &self, + mapping: &NSEntityMapping, + manager: &NSMigrationManager, + ) -> Result<(), Id>; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSExpressionDescription.rs b/crates/icrate/src/generated/CoreData/NSExpressionDescription.rs new file mode 100644 index 000000000..de7ee2785 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSExpressionDescription.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSExpressionDescription; + + unsafe impl ClassType for NSExpressionDescription { + type Super = NSPropertyDescription; + } +); + +extern_methods!( + unsafe impl NSExpressionDescription { + #[method_id(@__retain_semantics Other expression)] + pub unsafe fn expression(&self) -> Option>; + + #[method(setExpression:)] + pub unsafe fn setExpression(&self, expression: Option<&NSExpression>); + + #[method(expressionResultType)] + pub unsafe fn expressionResultType(&self) -> NSAttributeType; + + #[method(setExpressionResultType:)] + pub unsafe fn setExpressionResultType(&self, expressionResultType: NSAttributeType); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSFetchIndexDescription.rs b/crates/icrate/src/generated/CoreData/NSFetchIndexDescription.rs new file mode 100644 index 000000000..b3a703859 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSFetchIndexDescription.rs @@ -0,0 +1,46 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSFetchIndexDescription; + + unsafe impl ClassType for NSFetchIndexDescription { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSFetchIndexDescription { + #[method_id(@__retain_semantics Init initWithName:elements:)] + pub unsafe fn initWithName_elements( + this: Option>, + name: &NSString, + elements: Option<&NSArray>, + ) -> Id; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method(setName:)] + pub unsafe fn setName(&self, name: &NSString); + + #[method_id(@__retain_semantics Other elements)] + pub unsafe fn elements(&self) -> Id, Shared>; + + #[method(setElements:)] + pub unsafe fn setElements(&self, elements: &NSArray); + + #[method_id(@__retain_semantics Other entity)] + pub unsafe fn entity(&self) -> Option>; + + #[method_id(@__retain_semantics Other partialIndexPredicate)] + pub unsafe fn partialIndexPredicate(&self) -> Option>; + + #[method(setPartialIndexPredicate:)] + pub unsafe fn setPartialIndexPredicate(&self, partialIndexPredicate: Option<&NSPredicate>); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSFetchIndexElementDescription.rs b/crates/icrate/src/generated/CoreData/NSFetchIndexElementDescription.rs new file mode 100644 index 000000000..d7c87a90c --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSFetchIndexElementDescription.rs @@ -0,0 +1,50 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSFetchIndexElementType = NSUInteger; +pub const NSFetchIndexElementTypeBinary: NSFetchIndexElementType = 0; +pub const NSFetchIndexElementTypeRTree: NSFetchIndexElementType = 1; + +extern_class!( + #[derive(Debug)] + pub struct NSFetchIndexElementDescription; + + unsafe impl ClassType for NSFetchIndexElementDescription { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSFetchIndexElementDescription { + #[method_id(@__retain_semantics Init initWithProperty:collationType:)] + pub unsafe fn initWithProperty_collationType( + this: Option>, + property: &NSPropertyDescription, + collationType: NSFetchIndexElementType, + ) -> Id; + + #[method_id(@__retain_semantics Other property)] + pub unsafe fn property(&self) -> Option>; + + #[method_id(@__retain_semantics Other propertyName)] + pub unsafe fn propertyName(&self) -> Option>; + + #[method(collationType)] + pub unsafe fn collationType(&self) -> NSFetchIndexElementType; + + #[method(setCollationType:)] + pub unsafe fn setCollationType(&self, collationType: NSFetchIndexElementType); + + #[method(isAscending)] + pub unsafe fn isAscending(&self) -> bool; + + #[method(setAscending:)] + pub unsafe fn setAscending(&self, ascending: bool); + + #[method_id(@__retain_semantics Other indexDescription)] + pub unsafe fn indexDescription(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSFetchRequest.rs b/crates/icrate/src/generated/CoreData/NSFetchRequest.rs new file mode 100644 index 000000000..e57586705 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSFetchRequest.rs @@ -0,0 +1,223 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSFetchRequestResultType = NSUInteger; +pub const NSManagedObjectResultType: NSFetchRequestResultType = 0x00; +pub const NSManagedObjectIDResultType: NSFetchRequestResultType = 0x01; +pub const NSDictionaryResultType: NSFetchRequestResultType = 0x02; +pub const NSCountResultType: NSFetchRequestResultType = 0x04; + +pub type NSFetchRequestResult = NSObject; + +extern_methods!( + /// NSFetchedResultSupport + unsafe impl NSNumber {} +); + +extern_methods!( + /// NSFetchedResultSupport + unsafe impl NSDictionary {} +); + +extern_methods!( + /// NSFetchedResultSupport + unsafe impl NSManagedObject {} +); + +extern_methods!( + /// NSFetchedResultSupport + unsafe impl NSManagedObjectID {} +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSFetchRequest { + _inner0: PhantomData<*mut ResultType>, + } + + unsafe impl ClassType for NSFetchRequest { + type Super = NSPersistentStoreRequest; + } +); + +extern_methods!( + unsafe impl NSFetchRequest { + #[method_id(@__retain_semantics Other fetchRequestWithEntityName:)] + pub unsafe fn fetchRequestWithEntityName(entityName: &NSString) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithEntityName:)] + pub unsafe fn initWithEntityName( + this: Option>, + entityName: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other execute:)] + pub unsafe fn execute( + &self, + error: *mut *mut NSError, + ) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other entity)] + pub unsafe fn entity(&self) -> Option>; + + #[method(setEntity:)] + pub unsafe fn setEntity(&self, entity: Option<&NSEntityDescription>); + + #[method_id(@__retain_semantics Other entityName)] + pub unsafe fn entityName(&self) -> Option>; + + #[method_id(@__retain_semantics Other predicate)] + pub unsafe fn predicate(&self) -> Option>; + + #[method(setPredicate:)] + pub unsafe fn setPredicate(&self, predicate: Option<&NSPredicate>); + + #[method_id(@__retain_semantics Other sortDescriptors)] + pub unsafe fn sortDescriptors(&self) -> Option, Shared>>; + + #[method(setSortDescriptors:)] + pub unsafe fn setSortDescriptors( + &self, + sortDescriptors: Option<&NSArray>, + ); + + #[method(fetchLimit)] + pub unsafe fn fetchLimit(&self) -> NSUInteger; + + #[method(setFetchLimit:)] + pub unsafe fn setFetchLimit(&self, fetchLimit: NSUInteger); + + #[method_id(@__retain_semantics Other affectedStores)] + pub unsafe fn affectedStores(&self) -> Option, Shared>>; + + #[method(setAffectedStores:)] + pub unsafe fn setAffectedStores(&self, affectedStores: Option<&NSArray>); + + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSFetchRequestResultType; + + #[method(setResultType:)] + pub unsafe fn setResultType(&self, resultType: NSFetchRequestResultType); + + #[method(includesSubentities)] + pub unsafe fn includesSubentities(&self) -> bool; + + #[method(setIncludesSubentities:)] + pub unsafe fn setIncludesSubentities(&self, includesSubentities: bool); + + #[method(includesPropertyValues)] + pub unsafe fn includesPropertyValues(&self) -> bool; + + #[method(setIncludesPropertyValues:)] + pub unsafe fn setIncludesPropertyValues(&self, includesPropertyValues: bool); + + #[method(returnsObjectsAsFaults)] + pub unsafe fn returnsObjectsAsFaults(&self) -> bool; + + #[method(setReturnsObjectsAsFaults:)] + pub unsafe fn setReturnsObjectsAsFaults(&self, returnsObjectsAsFaults: bool); + + #[method_id(@__retain_semantics Other relationshipKeyPathsForPrefetching)] + pub unsafe fn relationshipKeyPathsForPrefetching( + &self, + ) -> Option, Shared>>; + + #[method(setRelationshipKeyPathsForPrefetching:)] + pub unsafe fn setRelationshipKeyPathsForPrefetching( + &self, + relationshipKeyPathsForPrefetching: Option<&NSArray>, + ); + + #[method(includesPendingChanges)] + pub unsafe fn includesPendingChanges(&self) -> bool; + + #[method(setIncludesPendingChanges:)] + pub unsafe fn setIncludesPendingChanges(&self, includesPendingChanges: bool); + + #[method(returnsDistinctResults)] + pub unsafe fn returnsDistinctResults(&self) -> bool; + + #[method(setReturnsDistinctResults:)] + pub unsafe fn setReturnsDistinctResults(&self, returnsDistinctResults: bool); + + #[method_id(@__retain_semantics Other propertiesToFetch)] + pub unsafe fn propertiesToFetch(&self) -> Option>; + + #[method(setPropertiesToFetch:)] + pub unsafe fn setPropertiesToFetch(&self, propertiesToFetch: Option<&NSArray>); + + #[method(fetchOffset)] + pub unsafe fn fetchOffset(&self) -> NSUInteger; + + #[method(setFetchOffset:)] + pub unsafe fn setFetchOffset(&self, fetchOffset: NSUInteger); + + #[method(fetchBatchSize)] + pub unsafe fn fetchBatchSize(&self) -> NSUInteger; + + #[method(setFetchBatchSize:)] + pub unsafe fn setFetchBatchSize(&self, fetchBatchSize: NSUInteger); + + #[method(shouldRefreshRefetchedObjects)] + pub unsafe fn shouldRefreshRefetchedObjects(&self) -> bool; + + #[method(setShouldRefreshRefetchedObjects:)] + pub unsafe fn setShouldRefreshRefetchedObjects(&self, shouldRefreshRefetchedObjects: bool); + + #[method_id(@__retain_semantics Other propertiesToGroupBy)] + pub unsafe fn propertiesToGroupBy(&self) -> Option>; + + #[method(setPropertiesToGroupBy:)] + pub unsafe fn setPropertiesToGroupBy(&self, propertiesToGroupBy: Option<&NSArray>); + + #[method_id(@__retain_semantics Other havingPredicate)] + pub unsafe fn havingPredicate(&self) -> Option>; + + #[method(setHavingPredicate:)] + pub unsafe fn setHavingPredicate(&self, havingPredicate: Option<&NSPredicate>); + } +); + +pub type NSPersistentStoreAsynchronousFetchResultCompletionBlock = TodoBlock; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSAsynchronousFetchRequest { + _inner0: PhantomData<*mut ResultType>, + } + + unsafe impl ClassType for NSAsynchronousFetchRequest { + type Super = NSPersistentStoreRequest; + } +); + +extern_methods!( + unsafe impl NSAsynchronousFetchRequest { + #[method_id(@__retain_semantics Other fetchRequest)] + pub unsafe fn fetchRequest(&self) -> Id, Shared>; + + #[method(completionBlock)] + pub unsafe fn completionBlock( + &self, + ) -> NSPersistentStoreAsynchronousFetchResultCompletionBlock; + + #[method(estimatedResultCount)] + pub unsafe fn estimatedResultCount(&self) -> NSInteger; + + #[method(setEstimatedResultCount:)] + pub unsafe fn setEstimatedResultCount(&self, estimatedResultCount: NSInteger); + + #[method_id(@__retain_semantics Init initWithFetchRequest:completionBlock:)] + pub unsafe fn initWithFetchRequest_completionBlock( + this: Option>, + request: &NSFetchRequest, + blk: TodoBlock, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSFetchRequestExpression.rs b/crates/icrate/src/generated/CoreData/NSFetchRequestExpression.rs new file mode 100644 index 000000000..f84720bea --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSFetchRequestExpression.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub static NSFetchRequestExpressionType: NSExpressionType = 50; + +extern_class!( + #[derive(Debug)] + pub struct NSFetchRequestExpression; + + unsafe impl ClassType for NSFetchRequestExpression { + type Super = NSExpression; + } +); + +extern_methods!( + unsafe impl NSFetchRequestExpression { + #[method_id(@__retain_semantics Other expressionForFetch:context:countOnly:)] + pub unsafe fn expressionForFetch_context_countOnly( + fetch: &NSExpression, + context: &NSExpression, + countFlag: bool, + ) -> Id; + + #[method_id(@__retain_semantics Other requestExpression)] + pub unsafe fn requestExpression(&self) -> Id; + + #[method_id(@__retain_semantics Other contextExpression)] + pub unsafe fn contextExpression(&self) -> Id; + + #[method(isCountOnlyRequest)] + pub unsafe fn isCountOnlyRequest(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSFetchedPropertyDescription.rs b/crates/icrate/src/generated/CoreData/NSFetchedPropertyDescription.rs new file mode 100644 index 000000000..82b8eacb1 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSFetchedPropertyDescription.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSFetchedPropertyDescription; + + unsafe impl ClassType for NSFetchedPropertyDescription { + type Super = NSPropertyDescription; + } +); + +extern_methods!( + unsafe impl NSFetchedPropertyDescription { + #[method_id(@__retain_semantics Other fetchRequest)] + pub unsafe fn fetchRequest(&self) -> Option>; + + #[method(setFetchRequest:)] + pub unsafe fn setFetchRequest(&self, fetchRequest: Option<&NSFetchRequest>); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs b/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs new file mode 100644 index 000000000..e80228b10 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs @@ -0,0 +1,94 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSFetchedResultsController { + _inner0: PhantomData<*mut ResultType>, + } + + unsafe impl ClassType for NSFetchedResultsController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSFetchedResultsController { + #[method_id(@__retain_semantics Init initWithFetchRequest:managedObjectContext:sectionNameKeyPath:cacheName:)] + pub unsafe fn initWithFetchRequest_managedObjectContext_sectionNameKeyPath_cacheName( + this: Option>, + fetchRequest: &NSFetchRequest, + context: &NSManagedObjectContext, + sectionNameKeyPath: Option<&NSString>, + name: Option<&NSString>, + ) -> Id; + + #[method(performFetch:)] + pub unsafe fn performFetch(&self, error: *mut *mut NSError) -> bool; + + #[method_id(@__retain_semantics Other fetchRequest)] + pub unsafe fn fetchRequest(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other managedObjectContext)] + pub unsafe fn managedObjectContext(&self) -> Id; + + #[method_id(@__retain_semantics Other sectionNameKeyPath)] + pub unsafe fn sectionNameKeyPath(&self) -> Option>; + + #[method_id(@__retain_semantics Other cacheName)] + pub unsafe fn cacheName(&self) -> Option>; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&NSFetchedResultsControllerDelegate>); + + #[method(deleteCacheWithName:)] + pub unsafe fn deleteCacheWithName(name: Option<&NSString>); + + #[method_id(@__retain_semantics Other fetchedObjects)] + pub unsafe fn fetchedObjects(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other objectAtIndexPath:)] + pub unsafe fn objectAtIndexPath(&self, indexPath: &NSIndexPath) -> Id; + + #[method_id(@__retain_semantics Other indexPathForObject:)] + pub unsafe fn indexPathForObject( + &self, + object: &ResultType, + ) -> Option>; + + #[method_id(@__retain_semantics Other sectionIndexTitleForSectionName:)] + pub unsafe fn sectionIndexTitleForSectionName( + &self, + sectionName: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other sectionIndexTitles)] + pub unsafe fn sectionIndexTitles(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other sections)] + pub unsafe fn sections(&self) -> Option, Shared>>; + + #[method(sectionForSectionIndexTitle:atIndex:)] + pub unsafe fn sectionForSectionIndexTitle_atIndex( + &self, + title: &NSString, + sectionIndex: NSInteger, + ) -> NSInteger; + } +); + +pub type NSFetchedResultsSectionInfo = NSObject; + +pub type NSFetchedResultsChangeType = NSUInteger; +pub const NSFetchedResultsChangeInsert: NSFetchedResultsChangeType = 1; +pub const NSFetchedResultsChangeDelete: NSFetchedResultsChangeType = 2; +pub const NSFetchedResultsChangeMove: NSFetchedResultsChangeType = 3; +pub const NSFetchedResultsChangeUpdate: NSFetchedResultsChangeType = 4; + +pub type NSFetchedResultsControllerDelegate = NSObject; diff --git a/crates/icrate/src/generated/CoreData/NSIncrementalStore.rs b/crates/icrate/src/generated/CoreData/NSIncrementalStore.rs new file mode 100644 index 000000000..d368dbd74 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSIncrementalStore.rs @@ -0,0 +1,77 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSIncrementalStore; + + unsafe impl ClassType for NSIncrementalStore { + type Super = NSPersistentStore; + } +); + +extern_methods!( + unsafe impl NSIncrementalStore { + #[method(loadMetadata:)] + pub unsafe fn loadMetadata(&self, error: *mut *mut NSError) -> bool; + + #[method_id(@__retain_semantics Other executeRequest:withContext:error:)] + pub unsafe fn executeRequest_withContext_error( + &self, + request: &NSPersistentStoreRequest, + context: Option<&NSManagedObjectContext>, + ) -> Result, Id>; + + #[method_id(@__retain_semantics New newValuesForObjectWithID:withContext:error:)] + pub unsafe fn newValuesForObjectWithID_withContext_error( + &self, + objectID: &NSManagedObjectID, + context: &NSManagedObjectContext, + ) -> Result, Id>; + + #[method_id(@__retain_semantics New newValueForRelationship:forObjectWithID:withContext:error:)] + pub unsafe fn newValueForRelationship_forObjectWithID_withContext_error( + &self, + relationship: &NSRelationshipDescription, + objectID: &NSManagedObjectID, + context: Option<&NSManagedObjectContext>, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other identifierForNewStoreAtURL:)] + pub unsafe fn identifierForNewStoreAtURL(storeURL: &NSURL) -> Id; + + #[method_id(@__retain_semantics Other obtainPermanentIDsForObjects:error:)] + pub unsafe fn obtainPermanentIDsForObjects_error( + &self, + array: &NSArray, + ) -> Result, Shared>, Id>; + + #[method(managedObjectContextDidRegisterObjectsWithIDs:)] + pub unsafe fn managedObjectContextDidRegisterObjectsWithIDs( + &self, + objectIDs: &NSArray, + ); + + #[method(managedObjectContextDidUnregisterObjectsWithIDs:)] + pub unsafe fn managedObjectContextDidUnregisterObjectsWithIDs( + &self, + objectIDs: &NSArray, + ); + + #[method_id(@__retain_semantics New newObjectIDForEntity:referenceObject:)] + pub unsafe fn newObjectIDForEntity_referenceObject( + &self, + entity: &NSEntityDescription, + data: &Object, + ) -> Id; + + #[method_id(@__retain_semantics Other referenceObjectForObjectID:)] + pub unsafe fn referenceObjectForObjectID( + &self, + objectID: &NSManagedObjectID, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSIncrementalStoreNode.rs b/crates/icrate/src/generated/CoreData/NSIncrementalStoreNode.rs new file mode 100644 index 000000000..d58e8b5f3 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSIncrementalStoreNode.rs @@ -0,0 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSIncrementalStoreNode; + + unsafe impl ClassType for NSIncrementalStoreNode { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSIncrementalStoreNode { + #[method_id(@__retain_semantics Init initWithObjectID:withValues:version:)] + pub unsafe fn initWithObjectID_withValues_version( + this: Option>, + objectID: &NSManagedObjectID, + values: &NSDictionary, + version: u64, + ) -> Id; + + #[method(updateWithValues:version:)] + pub unsafe fn updateWithValues_version( + &self, + values: &NSDictionary, + version: u64, + ); + + #[method_id(@__retain_semantics Other objectID)] + pub unsafe fn objectID(&self) -> Id; + + #[method(version)] + pub unsafe fn version(&self) -> u64; + + #[method_id(@__retain_semantics Other valueForPropertyDescription:)] + pub unsafe fn valueForPropertyDescription( + &self, + prop: &NSPropertyDescription, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSManagedObject.rs b/crates/icrate/src/generated/CoreData/NSManagedObject.rs new file mode 100644 index 000000000..b13d701fc --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSManagedObject.rs @@ -0,0 +1,187 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSSnapshotEventType = NSUInteger; +pub const NSSnapshotEventUndoInsertion: NSSnapshotEventType = 1 << 1; +pub const NSSnapshotEventUndoDeletion: NSSnapshotEventType = 1 << 2; +pub const NSSnapshotEventUndoUpdate: NSSnapshotEventType = 1 << 3; +pub const NSSnapshotEventRollback: NSSnapshotEventType = 1 << 4; +pub const NSSnapshotEventRefresh: NSSnapshotEventType = 1 << 5; +pub const NSSnapshotEventMergePolicy: NSSnapshotEventType = 1 << 6; + +extern_class!( + #[derive(Debug)] + pub struct NSManagedObject; + + unsafe impl ClassType for NSManagedObject { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSManagedObject { + #[method(contextShouldIgnoreUnmodeledPropertyChanges)] + pub unsafe fn contextShouldIgnoreUnmodeledPropertyChanges() -> bool; + + #[method_id(@__retain_semantics Other entity)] + pub unsafe fn entity() -> Id; + + #[method_id(@__retain_semantics Other fetchRequest)] + pub unsafe fn fetchRequest() -> Id; + + #[method_id(@__retain_semantics Init initWithEntity:insertIntoManagedObjectContext:)] + pub unsafe fn initWithEntity_insertIntoManagedObjectContext( + this: Option>, + entity: &NSEntityDescription, + context: Option<&NSManagedObjectContext>, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithContext:)] + pub unsafe fn initWithContext( + this: Option>, + moc: &NSManagedObjectContext, + ) -> Id; + + #[method_id(@__retain_semantics Other managedObjectContext)] + pub unsafe fn managedObjectContext(&self) -> Option>; + + #[method_id(@__retain_semantics Other entity)] + pub unsafe fn entity(&self) -> Id; + + #[method_id(@__retain_semantics Other objectID)] + pub unsafe fn objectID(&self) -> Id; + + #[method(isInserted)] + pub unsafe fn isInserted(&self) -> bool; + + #[method(isUpdated)] + pub unsafe fn isUpdated(&self) -> bool; + + #[method(isDeleted)] + pub unsafe fn isDeleted(&self) -> bool; + + #[method(hasChanges)] + pub unsafe fn hasChanges(&self) -> bool; + + #[method(hasPersistentChangedValues)] + pub unsafe fn hasPersistentChangedValues(&self) -> bool; + + #[method(isFault)] + pub unsafe fn isFault(&self) -> bool; + + #[method(hasFaultForRelationshipNamed:)] + pub unsafe fn hasFaultForRelationshipNamed(&self, key: &NSString) -> bool; + + #[method_id(@__retain_semantics Other objectIDsForRelationshipNamed:)] + pub unsafe fn objectIDsForRelationshipNamed( + &self, + key: &NSString, + ) -> Id, Shared>; + + #[method(faultingState)] + pub unsafe fn faultingState(&self) -> NSUInteger; + + #[method(willAccessValueForKey:)] + pub unsafe fn willAccessValueForKey(&self, key: Option<&NSString>); + + #[method(didAccessValueForKey:)] + pub unsafe fn didAccessValueForKey(&self, key: Option<&NSString>); + + #[method(willChangeValueForKey:)] + pub unsafe fn willChangeValueForKey(&self, key: &NSString); + + #[method(didChangeValueForKey:)] + pub unsafe fn didChangeValueForKey(&self, key: &NSString); + + #[method(willChangeValueForKey:withSetMutation:usingObjects:)] + pub unsafe fn willChangeValueForKey_withSetMutation_usingObjects( + &self, + inKey: &NSString, + inMutationKind: NSKeyValueSetMutationKind, + inObjects: &NSSet, + ); + + #[method(didChangeValueForKey:withSetMutation:usingObjects:)] + pub unsafe fn didChangeValueForKey_withSetMutation_usingObjects( + &self, + inKey: &NSString, + inMutationKind: NSKeyValueSetMutationKind, + inObjects: &NSSet, + ); + + #[method(awakeFromFetch)] + pub unsafe fn awakeFromFetch(&self); + + #[method(awakeFromInsert)] + pub unsafe fn awakeFromInsert(&self); + + #[method(awakeFromSnapshotEvents:)] + pub unsafe fn awakeFromSnapshotEvents(&self, flags: NSSnapshotEventType); + + #[method(prepareForDeletion)] + pub unsafe fn prepareForDeletion(&self); + + #[method(willSave)] + pub unsafe fn willSave(&self); + + #[method(didSave)] + pub unsafe fn didSave(&self); + + #[method(willTurnIntoFault)] + pub unsafe fn willTurnIntoFault(&self); + + #[method(didTurnIntoFault)] + pub unsafe fn didTurnIntoFault(&self); + + #[method_id(@__retain_semantics Other valueForKey:)] + pub unsafe fn valueForKey(&self, key: &NSString) -> Option>; + + #[method(setValue:forKey:)] + pub unsafe fn setValue_forKey(&self, value: Option<&Object>, key: &NSString); + + #[method_id(@__retain_semantics Other primitiveValueForKey:)] + pub unsafe fn primitiveValueForKey(&self, key: &NSString) -> Option>; + + #[method(setPrimitiveValue:forKey:)] + pub unsafe fn setPrimitiveValue_forKey(&self, value: Option<&Object>, key: &NSString); + + #[method_id(@__retain_semantics Other committedValuesForKeys:)] + pub unsafe fn committedValuesForKeys( + &self, + keys: Option<&NSArray>, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other changedValues)] + pub unsafe fn changedValues(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other changedValuesForCurrentEvent)] + pub unsafe fn changedValuesForCurrentEvent( + &self, + ) -> Id, Shared>; + + #[method(validateValue:forKey:error:)] + pub unsafe fn validateValue_forKey_error( + &self, + value: NonNull<*mut Object>, + key: &NSString, + ) -> Result<(), Id>; + + #[method(validateForDelete:)] + pub unsafe fn validateForDelete(&self, error: *mut *mut NSError) -> bool; + + #[method(validateForInsert:)] + pub unsafe fn validateForInsert(&self, error: *mut *mut NSError) -> bool; + + #[method(validateForUpdate:)] + pub unsafe fn validateForUpdate(&self, error: *mut *mut NSError) -> bool; + + #[method(setObservationInfo:)] + pub unsafe fn setObservationInfo(&self, inObservationInfo: *mut c_void); + + #[method(observationInfo)] + pub unsafe fn observationInfo(&self) -> *mut c_void; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs b/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs new file mode 100644 index 000000000..a395b4fe5 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs @@ -0,0 +1,350 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern "C" { + pub static NSManagedObjectContextWillSaveNotification: &'static NSString; +} + +extern "C" { + pub static NSManagedObjectContextDidSaveNotification: &'static NSString; +} + +extern "C" { + pub static NSManagedObjectContextObjectsDidChangeNotification: &'static NSString; +} + +extern "C" { + pub static NSManagedObjectContextDidSaveObjectIDsNotification: &'static NSString; +} + +extern "C" { + pub static NSManagedObjectContextDidMergeChangesObjectIDsNotification: &'static NSString; +} + +extern "C" { + pub static NSInsertedObjectsKey: &'static NSString; +} + +extern "C" { + pub static NSUpdatedObjectsKey: &'static NSString; +} + +extern "C" { + pub static NSDeletedObjectsKey: &'static NSString; +} + +extern "C" { + pub static NSRefreshedObjectsKey: &'static NSString; +} + +extern "C" { + pub static NSInvalidatedObjectsKey: &'static NSString; +} + +extern "C" { + pub static NSManagedObjectContextQueryGenerationKey: &'static NSString; +} + +extern "C" { + pub static NSInvalidatedAllObjectsKey: &'static NSString; +} + +extern "C" { + pub static NSInsertedObjectIDsKey: &'static NSString; +} + +extern "C" { + pub static NSUpdatedObjectIDsKey: &'static NSString; +} + +extern "C" { + pub static NSDeletedObjectIDsKey: &'static NSString; +} + +extern "C" { + pub static NSRefreshedObjectIDsKey: &'static NSString; +} + +extern "C" { + pub static NSInvalidatedObjectIDsKey: &'static NSString; +} + +extern "C" { + pub static NSErrorMergePolicy: &'static Object; +} + +extern "C" { + pub static NSMergeByPropertyStoreTrumpMergePolicy: &'static Object; +} + +extern "C" { + pub static NSMergeByPropertyObjectTrumpMergePolicy: &'static Object; +} + +extern "C" { + pub static NSOverwriteMergePolicy: &'static Object; +} + +extern "C" { + pub static NSRollbackMergePolicy: &'static Object; +} + +pub type NSManagedObjectContextConcurrencyType = NSUInteger; +pub const NSConfinementConcurrencyType: NSManagedObjectContextConcurrencyType = 0x00; +pub const NSPrivateQueueConcurrencyType: NSManagedObjectContextConcurrencyType = 0x01; +pub const NSMainQueueConcurrencyType: NSManagedObjectContextConcurrencyType = 0x02; + +extern_class!( + #[derive(Debug)] + pub struct NSManagedObjectContext; + + unsafe impl ClassType for NSManagedObjectContext { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSManagedObjectContext { + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithConcurrencyType:)] + pub unsafe fn initWithConcurrencyType( + this: Option>, + ct: NSManagedObjectContextConcurrencyType, + ) -> Id; + + #[method(performBlock:)] + pub unsafe fn performBlock(&self, block: TodoBlock); + + #[method(performBlockAndWait:)] + pub unsafe fn performBlockAndWait(&self, block: TodoBlock); + + #[method_id(@__retain_semantics Other persistentStoreCoordinator)] + pub unsafe fn persistentStoreCoordinator( + &self, + ) -> Option>; + + #[method(setPersistentStoreCoordinator:)] + pub unsafe fn setPersistentStoreCoordinator( + &self, + persistentStoreCoordinator: Option<&NSPersistentStoreCoordinator>, + ); + + #[method_id(@__retain_semantics Other parentContext)] + pub unsafe fn parentContext(&self) -> Option>; + + #[method(setParentContext:)] + pub unsafe fn setParentContext(&self, parentContext: Option<&NSManagedObjectContext>); + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Option>; + + #[method(setName:)] + pub unsafe fn setName(&self, name: Option<&NSString>); + + #[method_id(@__retain_semantics Other undoManager)] + pub unsafe fn undoManager(&self) -> Option>; + + #[method(setUndoManager:)] + pub unsafe fn setUndoManager(&self, undoManager: Option<&NSUndoManager>); + + #[method(hasChanges)] + pub unsafe fn hasChanges(&self) -> bool; + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Id; + + #[method(concurrencyType)] + pub unsafe fn concurrencyType(&self) -> NSManagedObjectContextConcurrencyType; + + #[method_id(@__retain_semantics Other objectRegisteredForID:)] + pub unsafe fn objectRegisteredForID( + &self, + objectID: &NSManagedObjectID, + ) -> Option>; + + #[method_id(@__retain_semantics Other objectWithID:)] + pub unsafe fn objectWithID( + &self, + objectID: &NSManagedObjectID, + ) -> Id; + + #[method_id(@__retain_semantics Other existingObjectWithID:error:)] + pub unsafe fn existingObjectWithID_error( + &self, + objectID: &NSManagedObjectID, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other executeFetchRequest:error:)] + pub unsafe fn executeFetchRequest_error( + &self, + request: &NSFetchRequest, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other executeRequest:error:)] + pub unsafe fn executeRequest_error( + &self, + request: &NSPersistentStoreRequest, + ) -> Result, Id>; + + #[method(insertObject:)] + pub unsafe fn insertObject(&self, object: &NSManagedObject); + + #[method(deleteObject:)] + pub unsafe fn deleteObject(&self, object: &NSManagedObject); + + #[method(refreshObject:mergeChanges:)] + pub unsafe fn refreshObject_mergeChanges(&self, object: &NSManagedObject, flag: bool); + + #[method(detectConflictsForObject:)] + pub unsafe fn detectConflictsForObject(&self, object: &NSManagedObject); + + #[method(observeValueForKeyPath:ofObject:change:context:)] + pub unsafe fn observeValueForKeyPath_ofObject_change_context( + &self, + keyPath: Option<&NSString>, + object: Option<&Object>, + change: Option<&NSDictionary>, + context: *mut c_void, + ); + + #[method(processPendingChanges)] + pub unsafe fn processPendingChanges(&self); + + #[method(assignObject:toPersistentStore:)] + pub unsafe fn assignObject_toPersistentStore( + &self, + object: &Object, + store: &NSPersistentStore, + ); + + #[method_id(@__retain_semantics Other insertedObjects)] + pub unsafe fn insertedObjects(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other updatedObjects)] + pub unsafe fn updatedObjects(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other deletedObjects)] + pub unsafe fn deletedObjects(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other registeredObjects)] + pub unsafe fn registeredObjects(&self) -> Id, Shared>; + + #[method(undo)] + pub unsafe fn undo(&self); + + #[method(redo)] + pub unsafe fn redo(&self); + + #[method(reset)] + pub unsafe fn reset(&self); + + #[method(rollback)] + pub unsafe fn rollback(&self); + + #[method(save:)] + pub unsafe fn save(&self, error: *mut *mut NSError) -> bool; + + #[method(refreshAllObjects)] + pub unsafe fn refreshAllObjects(&self); + + #[method(lock)] + pub unsafe fn lock(&self); + + #[method(unlock)] + pub unsafe fn unlock(&self); + + #[method(tryLock)] + pub unsafe fn tryLock(&self) -> bool; + + #[method(propagatesDeletesAtEndOfEvent)] + pub unsafe fn propagatesDeletesAtEndOfEvent(&self) -> bool; + + #[method(setPropagatesDeletesAtEndOfEvent:)] + pub unsafe fn setPropagatesDeletesAtEndOfEvent(&self, propagatesDeletesAtEndOfEvent: bool); + + #[method(retainsRegisteredObjects)] + pub unsafe fn retainsRegisteredObjects(&self) -> bool; + + #[method(setRetainsRegisteredObjects:)] + pub unsafe fn setRetainsRegisteredObjects(&self, retainsRegisteredObjects: bool); + + #[method(shouldDeleteInaccessibleFaults)] + pub unsafe fn shouldDeleteInaccessibleFaults(&self) -> bool; + + #[method(setShouldDeleteInaccessibleFaults:)] + pub unsafe fn setShouldDeleteInaccessibleFaults( + &self, + shouldDeleteInaccessibleFaults: bool, + ); + + #[method(shouldHandleInaccessibleFault:forObjectID:triggeredByProperty:)] + pub unsafe fn shouldHandleInaccessibleFault_forObjectID_triggeredByProperty( + &self, + fault: &NSManagedObject, + oid: &NSManagedObjectID, + property: Option<&NSPropertyDescription>, + ) -> bool; + + #[method(stalenessInterval)] + pub unsafe fn stalenessInterval(&self) -> NSTimeInterval; + + #[method(setStalenessInterval:)] + pub unsafe fn setStalenessInterval(&self, stalenessInterval: NSTimeInterval); + + #[method_id(@__retain_semantics Other mergePolicy)] + pub unsafe fn mergePolicy(&self) -> Id; + + #[method(setMergePolicy:)] + pub unsafe fn setMergePolicy(&self, mergePolicy: &Object); + + #[method(obtainPermanentIDsForObjects:error:)] + pub unsafe fn obtainPermanentIDsForObjects_error( + &self, + objects: &NSArray, + ) -> Result<(), Id>; + + #[method(mergeChangesFromContextDidSaveNotification:)] + pub unsafe fn mergeChangesFromContextDidSaveNotification( + &self, + notification: &NSNotification, + ); + + #[method(mergeChangesFromRemoteContextSave:intoContexts:)] + pub unsafe fn mergeChangesFromRemoteContextSave_intoContexts( + changeNotificationData: &NSDictionary, + contexts: &NSArray, + ); + + #[method_id(@__retain_semantics Other queryGenerationToken)] + pub unsafe fn queryGenerationToken(&self) -> Option>; + + #[method(setQueryGenerationFromToken:error:)] + pub unsafe fn setQueryGenerationFromToken_error( + &self, + generation: Option<&NSQueryGenerationToken>, + ) -> Result<(), Id>; + + #[method(automaticallyMergesChangesFromParent)] + pub unsafe fn automaticallyMergesChangesFromParent(&self) -> bool; + + #[method(setAutomaticallyMergesChangesFromParent:)] + pub unsafe fn setAutomaticallyMergesChangesFromParent( + &self, + automaticallyMergesChangesFromParent: bool, + ); + + #[method_id(@__retain_semantics Other transactionAuthor)] + pub unsafe fn transactionAuthor(&self) -> Option>; + + #[method(setTransactionAuthor:)] + pub unsafe fn setTransactionAuthor(&self, transactionAuthor: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSManagedObjectID.rs b/crates/icrate/src/generated/CoreData/NSManagedObjectID.rs new file mode 100644 index 000000000..62b171570 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSManagedObjectID.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSManagedObjectID; + + unsafe impl ClassType for NSManagedObjectID { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSManagedObjectID { + #[method_id(@__retain_semantics Other entity)] + pub unsafe fn entity(&self) -> Id; + + #[method_id(@__retain_semantics Other persistentStore)] + pub unsafe fn persistentStore(&self) -> Option>; + + #[method(isTemporaryID)] + pub unsafe fn isTemporaryID(&self) -> bool; + + #[method_id(@__retain_semantics Other URIRepresentation)] + pub unsafe fn URIRepresentation(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSManagedObjectModel.rs b/crates/icrate/src/generated/CoreData/NSManagedObjectModel.rs new file mode 100644 index 000000000..0b2673546 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSManagedObjectModel.rs @@ -0,0 +1,130 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSManagedObjectModel; + + unsafe impl ClassType for NSManagedObjectModel { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSManagedObjectModel { + #[method_id(@__retain_semantics Other mergedModelFromBundles:)] + pub unsafe fn mergedModelFromBundles( + bundles: Option<&NSArray>, + ) -> Option>; + + #[method_id(@__retain_semantics Other modelByMergingModels:)] + pub unsafe fn modelByMergingModels( + models: Option<&NSArray>, + ) -> Option>; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: &NSURL, + ) -> Option>; + + #[method_id(@__retain_semantics Other entitiesByName)] + pub unsafe fn entitiesByName( + &self, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other entities)] + pub unsafe fn entities(&self) -> Id, Shared>; + + #[method(setEntities:)] + pub unsafe fn setEntities(&self, entities: &NSArray); + + #[method_id(@__retain_semantics Other configurations)] + pub unsafe fn configurations(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other entitiesForConfiguration:)] + pub unsafe fn entitiesForConfiguration( + &self, + configuration: Option<&NSString>, + ) -> Option, Shared>>; + + #[method(setEntities:forConfiguration:)] + pub unsafe fn setEntities_forConfiguration( + &self, + entities: &NSArray, + configuration: &NSString, + ); + + #[method(setFetchRequestTemplate:forName:)] + pub unsafe fn setFetchRequestTemplate_forName( + &self, + fetchRequestTemplate: Option<&NSFetchRequest>, + name: &NSString, + ); + + #[method_id(@__retain_semantics Other fetchRequestTemplateForName:)] + pub unsafe fn fetchRequestTemplateForName( + &self, + name: &NSString, + ) -> Option>; + + #[method_id(@__retain_semantics Other fetchRequestFromTemplateWithName:substitutionVariables:)] + pub unsafe fn fetchRequestFromTemplateWithName_substitutionVariables( + &self, + name: &NSString, + variables: &NSDictionary, + ) -> Option>; + + #[method_id(@__retain_semantics Other localizationDictionary)] + pub unsafe fn localizationDictionary( + &self, + ) -> Option, Shared>>; + + #[method(setLocalizationDictionary:)] + pub unsafe fn setLocalizationDictionary( + &self, + localizationDictionary: Option<&NSDictionary>, + ); + + #[method_id(@__retain_semantics Other mergedModelFromBundles:forStoreMetadata:)] + pub unsafe fn mergedModelFromBundles_forStoreMetadata( + bundles: Option<&NSArray>, + metadata: &NSDictionary, + ) -> Option>; + + #[method_id(@__retain_semantics Other modelByMergingModels:forStoreMetadata:)] + pub unsafe fn modelByMergingModels_forStoreMetadata( + models: &NSArray, + metadata: &NSDictionary, + ) -> Option>; + + #[method_id(@__retain_semantics Other fetchRequestTemplatesByName)] + pub unsafe fn fetchRequestTemplatesByName( + &self, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other versionIdentifiers)] + pub unsafe fn versionIdentifiers(&self) -> Id; + + #[method(setVersionIdentifiers:)] + pub unsafe fn setVersionIdentifiers(&self, versionIdentifiers: &NSSet); + + #[method(isConfiguration:compatibleWithStoreMetadata:)] + pub unsafe fn isConfiguration_compatibleWithStoreMetadata( + &self, + configuration: Option<&NSString>, + metadata: &NSDictionary, + ) -> bool; + + #[method_id(@__retain_semantics Other entityVersionHashesByName)] + pub unsafe fn entityVersionHashesByName( + &self, + ) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSMappingModel.rs b/crates/icrate/src/generated/CoreData/NSMappingModel.rs new file mode 100644 index 000000000..358e16d3d --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSMappingModel.rs @@ -0,0 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSMappingModel; + + unsafe impl ClassType for NSMappingModel { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSMappingModel { + #[method_id(@__retain_semantics Other mappingModelFromBundles:forSourceModel:destinationModel:)] + pub unsafe fn mappingModelFromBundles_forSourceModel_destinationModel( + bundles: Option<&NSArray>, + sourceModel: Option<&NSManagedObjectModel>, + destinationModel: Option<&NSManagedObjectModel>, + ) -> Option>; + + #[method_id(@__retain_semantics Other inferredMappingModelForSourceModel:destinationModel:error:)] + pub unsafe fn inferredMappingModelForSourceModel_destinationModel_error( + sourceModel: &NSManagedObjectModel, + destinationModel: &NSManagedObjectModel, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Init initWithContentsOfURL:)] + pub unsafe fn initWithContentsOfURL( + this: Option>, + url: Option<&NSURL>, + ) -> Option>; + + #[method_id(@__retain_semantics Other entityMappings)] + pub unsafe fn entityMappings(&self) -> Option, Shared>>; + + #[method(setEntityMappings:)] + pub unsafe fn setEntityMappings(&self, entityMappings: Option<&NSArray>); + + #[method_id(@__retain_semantics Other entityMappingsByName)] + pub unsafe fn entityMappingsByName( + &self, + ) -> Id, Shared>; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSMergePolicy.rs b/crates/icrate/src/generated/CoreData/NSMergePolicy.rs new file mode 100644 index 000000000..37841e659 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSMergePolicy.rs @@ -0,0 +1,178 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern "C" { + pub static NSErrorMergePolicy: &'static Object; +} + +extern "C" { + pub static NSMergeByPropertyStoreTrumpMergePolicy: &'static Object; +} + +extern "C" { + pub static NSMergeByPropertyObjectTrumpMergePolicy: &'static Object; +} + +extern "C" { + pub static NSOverwriteMergePolicy: &'static Object; +} + +extern "C" { + pub static NSRollbackMergePolicy: &'static Object; +} + +pub type NSMergePolicyType = NSUInteger; +pub const NSErrorMergePolicyType: NSMergePolicyType = 0x00; +pub const NSMergeByPropertyStoreTrumpMergePolicyType: NSMergePolicyType = 0x01; +pub const NSMergeByPropertyObjectTrumpMergePolicyType: NSMergePolicyType = 0x02; +pub const NSOverwriteMergePolicyType: NSMergePolicyType = 0x03; +pub const NSRollbackMergePolicyType: NSMergePolicyType = 0x04; + +extern_class!( + #[derive(Debug)] + pub struct NSMergeConflict; + + unsafe impl ClassType for NSMergeConflict { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSMergeConflict { + #[method_id(@__retain_semantics Other sourceObject)] + pub unsafe fn sourceObject(&self) -> Id; + + #[method_id(@__retain_semantics Other objectSnapshot)] + pub unsafe fn objectSnapshot(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other cachedSnapshot)] + pub unsafe fn cachedSnapshot(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other persistedSnapshot)] + pub unsafe fn persistedSnapshot( + &self, + ) -> Option, Shared>>; + + #[method(newVersionNumber)] + pub unsafe fn newVersionNumber(&self) -> NSUInteger; + + #[method(oldVersionNumber)] + pub unsafe fn oldVersionNumber(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Init initWithSource:newVersion:oldVersion:cachedSnapshot:persistedSnapshot:)] + pub unsafe fn initWithSource_newVersion_oldVersion_cachedSnapshot_persistedSnapshot( + this: Option>, + srcObject: &NSManagedObject, + newvers: NSUInteger, + oldvers: NSUInteger, + cachesnap: Option<&NSDictionary>, + persnap: Option<&NSDictionary>, + ) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSConstraintConflict; + + unsafe impl ClassType for NSConstraintConflict { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSConstraintConflict { + #[method_id(@__retain_semantics Other constraint)] + pub unsafe fn constraint(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other constraintValues)] + pub unsafe fn constraintValues(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other databaseObject)] + pub unsafe fn databaseObject(&self) -> Option>; + + #[method_id(@__retain_semantics Other databaseSnapshot)] + pub unsafe fn databaseSnapshot(&self) + -> Option, Shared>>; + + #[method_id(@__retain_semantics Other conflictingObjects)] + pub unsafe fn conflictingObjects(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other conflictingSnapshots)] + pub unsafe fn conflictingSnapshots(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Init initWithConstraint:databaseObject:databaseSnapshot:conflictingObjects:conflictingSnapshots:)] + pub unsafe fn initWithConstraint_databaseObject_databaseSnapshot_conflictingObjects_conflictingSnapshots( + this: Option>, + contraint: &NSArray, + databaseObject: Option<&NSManagedObject>, + databaseSnapshot: Option<&NSDictionary>, + conflictingObjects: &NSArray, + conflictingSnapshots: &NSArray, + ) -> Id; + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSMergePolicy; + + unsafe impl ClassType for NSMergePolicy { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSMergePolicy { + #[method_id(@__retain_semantics Other errorMergePolicy)] + pub unsafe fn errorMergePolicy() -> Id; + + #[method_id(@__retain_semantics Other rollbackMergePolicy)] + pub unsafe fn rollbackMergePolicy() -> Id; + + #[method_id(@__retain_semantics Other overwriteMergePolicy)] + pub unsafe fn overwriteMergePolicy() -> Id; + + #[method_id(@__retain_semantics Other mergeByPropertyObjectTrumpMergePolicy)] + pub unsafe fn mergeByPropertyObjectTrumpMergePolicy() -> Id; + + #[method_id(@__retain_semantics Other mergeByPropertyStoreTrumpMergePolicy)] + pub unsafe fn mergeByPropertyStoreTrumpMergePolicy() -> Id; + + #[method(mergeType)] + pub unsafe fn mergeType(&self) -> NSMergePolicyType; + + #[method_id(@__retain_semantics Init initWithMergeType:)] + pub unsafe fn initWithMergeType( + this: Option>, + ty: NSMergePolicyType, + ) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method(resolveConflicts:error:)] + pub unsafe fn resolveConflicts_error( + &self, + list: &NSArray, + ) -> Result<(), Id>; + + #[method(resolveOptimisticLockingVersionConflicts:error:)] + pub unsafe fn resolveOptimisticLockingVersionConflicts_error( + &self, + list: &NSArray, + ) -> Result<(), Id>; + + #[method(resolveConstraintConflicts:error:)] + pub unsafe fn resolveConstraintConflicts_error( + &self, + list: &NSArray, + ) -> Result<(), Id>; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSMigrationManager.rs b/crates/icrate/src/generated/CoreData/NSMigrationManager.rs new file mode 100644 index 000000000..f4c497e8c --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSMigrationManager.rs @@ -0,0 +1,113 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSMigrationManager; + + unsafe impl ClassType for NSMigrationManager { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSMigrationManager { + #[method_id(@__retain_semantics Init initWithSourceModel:destinationModel:)] + pub unsafe fn initWithSourceModel_destinationModel( + this: Option>, + sourceModel: &NSManagedObjectModel, + destinationModel: &NSManagedObjectModel, + ) -> Id; + + #[method(migrateStoreFromURL:type:options:withMappingModel:toDestinationURL:destinationType:destinationOptions:error:)] + pub unsafe fn migrateStoreFromURL_type_options_withMappingModel_toDestinationURL_destinationType_destinationOptions_error( + &self, + sourceURL: &NSURL, + sStoreType: &NSString, + sOptions: Option<&NSDictionary>, + mappings: Option<&NSMappingModel>, + dURL: &NSURL, + dStoreType: &NSString, + dOptions: Option<&NSDictionary>, + ) -> Result<(), Id>; + + #[method(usesStoreSpecificMigrationManager)] + pub unsafe fn usesStoreSpecificMigrationManager(&self) -> bool; + + #[method(setUsesStoreSpecificMigrationManager:)] + pub unsafe fn setUsesStoreSpecificMigrationManager( + &self, + usesStoreSpecificMigrationManager: bool, + ); + + #[method(reset)] + pub unsafe fn reset(&self); + + #[method_id(@__retain_semantics Other mappingModel)] + pub unsafe fn mappingModel(&self) -> Id; + + #[method_id(@__retain_semantics Other sourceModel)] + pub unsafe fn sourceModel(&self) -> Id; + + #[method_id(@__retain_semantics Other destinationModel)] + pub unsafe fn destinationModel(&self) -> Id; + + #[method_id(@__retain_semantics Other sourceContext)] + pub unsafe fn sourceContext(&self) -> Id; + + #[method_id(@__retain_semantics Other destinationContext)] + pub unsafe fn destinationContext(&self) -> Id; + + #[method_id(@__retain_semantics Other sourceEntityForEntityMapping:)] + pub unsafe fn sourceEntityForEntityMapping( + &self, + mEntity: &NSEntityMapping, + ) -> Option>; + + #[method_id(@__retain_semantics Other destinationEntityForEntityMapping:)] + pub unsafe fn destinationEntityForEntityMapping( + &self, + mEntity: &NSEntityMapping, + ) -> Option>; + + #[method(associateSourceInstance:withDestinationInstance:forEntityMapping:)] + pub unsafe fn associateSourceInstance_withDestinationInstance_forEntityMapping( + &self, + sourceInstance: &NSManagedObject, + destinationInstance: &NSManagedObject, + entityMapping: &NSEntityMapping, + ); + + #[method_id(@__retain_semantics Other destinationInstancesForEntityMappingNamed:sourceInstances:)] + pub unsafe fn destinationInstancesForEntityMappingNamed_sourceInstances( + &self, + mappingName: &NSString, + sourceInstances: Option<&NSArray>, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other sourceInstancesForEntityMappingNamed:destinationInstances:)] + pub unsafe fn sourceInstancesForEntityMappingNamed_destinationInstances( + &self, + mappingName: &NSString, + destinationInstances: Option<&NSArray>, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other currentEntityMapping)] + pub unsafe fn currentEntityMapping(&self) -> Id; + + #[method(migrationProgress)] + pub unsafe fn migrationProgress(&self) -> c_float; + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + + #[method(setUserInfo:)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); + + #[method(cancelMigrationWithError:)] + pub unsafe fn cancelMigrationWithError(&self, error: &NSError); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs new file mode 100644 index 000000000..93b32517a --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs @@ -0,0 +1,71 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSPersistentCloudKitContainerSchemaInitializationOptions = NSUInteger; +pub const NSPersistentCloudKitContainerSchemaInitializationOptionsNone: + NSPersistentCloudKitContainerSchemaInitializationOptions = 0; +pub const NSPersistentCloudKitContainerSchemaInitializationOptionsDryRun: + NSPersistentCloudKitContainerSchemaInitializationOptions = 1 << 1; +pub const NSPersistentCloudKitContainerSchemaInitializationOptionsPrintSchema: + NSPersistentCloudKitContainerSchemaInitializationOptions = 1 << 2; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentCloudKitContainer; + + unsafe impl ClassType for NSPersistentCloudKitContainer { + type Super = NSPersistentContainer; + } +); + +extern_methods!( + unsafe impl NSPersistentCloudKitContainer { + #[method(initializeCloudKitSchemaWithOptions:error:)] + pub unsafe fn initializeCloudKitSchemaWithOptions_error( + &self, + options: NSPersistentCloudKitContainerSchemaInitializationOptions, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other recordForManagedObjectID:)] + pub unsafe fn recordForManagedObjectID( + &self, + managedObjectID: &NSManagedObjectID, + ) -> Option>; + + #[method_id(@__retain_semantics Other recordsForManagedObjectIDs:)] + pub unsafe fn recordsForManagedObjectIDs( + &self, + managedObjectIDs: &NSArray, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other recordIDForManagedObjectID:)] + pub unsafe fn recordIDForManagedObjectID( + &self, + managedObjectID: &NSManagedObjectID, + ) -> Option>; + + #[method_id(@__retain_semantics Other recordIDsForManagedObjectIDs:)] + pub unsafe fn recordIDsForManagedObjectIDs( + &self, + managedObjectIDs: &NSArray, + ) -> Id, Shared>; + + #[method(canUpdateRecordForManagedObjectWithID:)] + pub unsafe fn canUpdateRecordForManagedObjectWithID( + &self, + objectID: &NSManagedObjectID, + ) -> bool; + + #[method(canDeleteRecordForManagedObjectWithID:)] + pub unsafe fn canDeleteRecordForManagedObjectWithID( + &self, + objectID: &NSManagedObjectID, + ) -> bool; + + #[method(canModifyManagedObjectsInStore:)] + pub unsafe fn canModifyManagedObjectsInStore(&self, store: &NSPersistentStore) -> bool; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEvent.rs b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEvent.rs new file mode 100644 index 000000000..a65aa5b98 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEvent.rs @@ -0,0 +1,58 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSPersistentCloudKitContainerEventType = NSInteger; +pub const NSPersistentCloudKitContainerEventTypeSetup: NSPersistentCloudKitContainerEventType = 0; +pub const NSPersistentCloudKitContainerEventTypeImport: NSPersistentCloudKitContainerEventType = 1; +pub const NSPersistentCloudKitContainerEventTypeExport: NSPersistentCloudKitContainerEventType = 2; + +extern "C" { + pub static NSPersistentCloudKitContainerEventChangedNotification: &'static NSNotificationName; +} + +extern "C" { + pub static NSPersistentCloudKitContainerEventUserInfoKey: &'static NSString; +} + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentCloudKitContainerEvent; + + unsafe impl ClassType for NSPersistentCloudKitContainerEvent { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentCloudKitContainerEvent { + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self) -> Id; + + #[method_id(@__retain_semantics Other storeIdentifier)] + pub unsafe fn storeIdentifier(&self) -> Id; + + #[method(type)] + pub unsafe fn type_(&self) -> NSPersistentCloudKitContainerEventType; + + #[method_id(@__retain_semantics Other startDate)] + pub unsafe fn startDate(&self) -> Id; + + #[method_id(@__retain_semantics Other endDate)] + pub unsafe fn endDate(&self) -> Option>; + + #[method(succeeded)] + pub unsafe fn succeeded(&self) -> bool; + + #[method_id(@__retain_semantics Other error)] + pub unsafe fn error(&self) -> Option>; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEventRequest.rs b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEventRequest.rs new file mode 100644 index 000000000..fe1add1d4 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEventRequest.rs @@ -0,0 +1,43 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentCloudKitContainerEventRequest; + + unsafe impl ClassType for NSPersistentCloudKitContainerEventRequest { + type Super = NSPersistentStoreRequest; + } +); + +extern_methods!( + unsafe impl NSPersistentCloudKitContainerEventRequest { + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSPersistentCloudKitContainerEventResultType; + + #[method(setResultType:)] + pub unsafe fn setResultType( + &self, + resultType: NSPersistentCloudKitContainerEventResultType, + ); + + #[method_id(@__retain_semantics Other fetchEventsAfterDate:)] + pub unsafe fn fetchEventsAfterDate(date: &NSDate) -> Id; + + #[method_id(@__retain_semantics Other fetchEventsAfterEvent:)] + pub unsafe fn fetchEventsAfterEvent( + event: Option<&NSPersistentCloudKitContainerEvent>, + ) -> Id; + + #[method_id(@__retain_semantics Other fetchEventsMatchingFetchRequest:)] + pub unsafe fn fetchEventsMatchingFetchRequest( + fetchRequest: &NSFetchRequest, + ) -> Id; + + #[method_id(@__retain_semantics Other fetchRequestForEvents)] + pub unsafe fn fetchRequestForEvents() -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerOptions.rs b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerOptions.rs new file mode 100644 index 000000000..224e108fa --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerOptions.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentCloudKitContainerOptions; + + unsafe impl ClassType for NSPersistentCloudKitContainerOptions { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentCloudKitContainerOptions { + #[method_id(@__retain_semantics Other containerIdentifier)] + pub unsafe fn containerIdentifier(&self) -> Id; + + #[method(databaseScope)] + pub unsafe fn databaseScope(&self) -> CKDatabaseScope; + + #[method(setDatabaseScope:)] + pub unsafe fn setDatabaseScope(&self, databaseScope: CKDatabaseScope); + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithContainerIdentifier:)] + pub unsafe fn initWithContainerIdentifier( + this: Option>, + containerIdentifier: &NSString, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentContainer.rs b/crates/icrate/src/generated/CoreData/NSPersistentContainer.rs new file mode 100644 index 000000000..547a8e577 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentContainer.rs @@ -0,0 +1,76 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentContainer; + + unsafe impl ClassType for NSPersistentContainer { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentContainer { + #[method_id(@__retain_semantics Other persistentContainerWithName:)] + pub unsafe fn persistentContainerWithName(name: &NSString) -> Id; + + #[method_id(@__retain_semantics Other persistentContainerWithName:managedObjectModel:)] + pub unsafe fn persistentContainerWithName_managedObjectModel( + name: &NSString, + model: &NSManagedObjectModel, + ) -> Id; + + #[method_id(@__retain_semantics Other defaultDirectoryURL)] + pub unsafe fn defaultDirectoryURL() -> Id; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method_id(@__retain_semantics Other viewContext)] + pub unsafe fn viewContext(&self) -> Id; + + #[method_id(@__retain_semantics Other managedObjectModel)] + pub unsafe fn managedObjectModel(&self) -> Id; + + #[method_id(@__retain_semantics Other persistentStoreCoordinator)] + pub unsafe fn persistentStoreCoordinator(&self) + -> Id; + + #[method_id(@__retain_semantics Other persistentStoreDescriptions)] + pub unsafe fn persistentStoreDescriptions( + &self, + ) -> Id, Shared>; + + #[method(setPersistentStoreDescriptions:)] + pub unsafe fn setPersistentStoreDescriptions( + &self, + persistentStoreDescriptions: &NSArray, + ); + + #[method_id(@__retain_semantics Init initWithName:)] + pub unsafe fn initWithName( + this: Option>, + name: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithName:managedObjectModel:)] + pub unsafe fn initWithName_managedObjectModel( + this: Option>, + name: &NSString, + model: &NSManagedObjectModel, + ) -> Id; + + #[method(loadPersistentStoresWithCompletionHandler:)] + pub unsafe fn loadPersistentStoresWithCompletionHandler(&self, block: TodoBlock); + + #[method_id(@__retain_semantics New newBackgroundContext)] + pub unsafe fn newBackgroundContext(&self) -> Id; + + #[method(performBackgroundTask:)] + pub unsafe fn performBackgroundTask(&self, block: TodoBlock); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentHistoryChange.rs b/crates/icrate/src/generated/CoreData/NSPersistentHistoryChange.rs new file mode 100644 index 000000000..c269026d0 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentHistoryChange.rs @@ -0,0 +1,52 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSPersistentHistoryChangeType = NSInteger; +pub const NSPersistentHistoryChangeTypeInsert: NSPersistentHistoryChangeType = 0; +pub const NSPersistentHistoryChangeTypeUpdate: NSPersistentHistoryChangeType = 1; +pub const NSPersistentHistoryChangeTypeDelete: NSPersistentHistoryChangeType = 2; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentHistoryChange; + + unsafe impl ClassType for NSPersistentHistoryChange { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentHistoryChange { + #[method_id(@__retain_semantics Other entityDescriptionWithContext:)] + pub unsafe fn entityDescriptionWithContext( + context: &NSManagedObjectContext, + ) -> Option>; + + #[method_id(@__retain_semantics Other entityDescription)] + pub unsafe fn entityDescription() -> Option>; + + #[method_id(@__retain_semantics Other fetchRequest)] + pub unsafe fn fetchRequest() -> Option>; + + #[method(changeID)] + pub unsafe fn changeID(&self) -> i64; + + #[method_id(@__retain_semantics Other changedObjectID)] + pub unsafe fn changedObjectID(&self) -> Id; + + #[method(changeType)] + pub unsafe fn changeType(&self) -> NSPersistentHistoryChangeType; + + #[method_id(@__retain_semantics Other tombstone)] + pub unsafe fn tombstone(&self) -> Option>; + + #[method_id(@__retain_semantics Other transaction)] + pub unsafe fn transaction(&self) -> Option>; + + #[method_id(@__retain_semantics Other updatedProperties)] + pub unsafe fn updatedProperties(&self) -> Option, Shared>>; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentHistoryChangeRequest.rs b/crates/icrate/src/generated/CoreData/NSPersistentHistoryChangeRequest.rs new file mode 100644 index 000000000..4f1107926 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentHistoryChangeRequest.rs @@ -0,0 +1,64 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentHistoryChangeRequest; + + unsafe impl ClassType for NSPersistentHistoryChangeRequest { + type Super = NSPersistentStoreRequest; + } +); + +extern_methods!( + unsafe impl NSPersistentHistoryChangeRequest { + #[method_id(@__retain_semantics Other fetchHistoryAfterDate:)] + pub unsafe fn fetchHistoryAfterDate(date: &NSDate) -> Id; + + #[method_id(@__retain_semantics Other fetchHistoryAfterToken:)] + pub unsafe fn fetchHistoryAfterToken( + token: Option<&NSPersistentHistoryToken>, + ) -> Id; + + #[method_id(@__retain_semantics Other fetchHistoryAfterTransaction:)] + pub unsafe fn fetchHistoryAfterTransaction( + transaction: Option<&NSPersistentHistoryTransaction>, + ) -> Id; + + #[method_id(@__retain_semantics Other fetchHistoryWithFetchRequest:)] + pub unsafe fn fetchHistoryWithFetchRequest( + fetchRequest: &NSFetchRequest, + ) -> Id; + + #[method_id(@__retain_semantics Other deleteHistoryBeforeDate:)] + pub unsafe fn deleteHistoryBeforeDate(date: &NSDate) -> Id; + + #[method_id(@__retain_semantics Other deleteHistoryBeforeToken:)] + pub unsafe fn deleteHistoryBeforeToken( + token: Option<&NSPersistentHistoryToken>, + ) -> Id; + + #[method_id(@__retain_semantics Other deleteHistoryBeforeTransaction:)] + pub unsafe fn deleteHistoryBeforeTransaction( + transaction: Option<&NSPersistentHistoryTransaction>, + ) -> Id; + + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSPersistentHistoryResultType; + + #[method(setResultType:)] + pub unsafe fn setResultType(&self, resultType: NSPersistentHistoryResultType); + + #[method_id(@__retain_semantics Other token)] + pub unsafe fn token(&self) -> Option>; + + #[method_id(@__retain_semantics Other fetchRequest)] + pub unsafe fn fetchRequest(&self) -> Option>; + + #[method(setFetchRequest:)] + pub unsafe fn setFetchRequest(&self, fetchRequest: Option<&NSFetchRequest>); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentHistoryToken.rs b/crates/icrate/src/generated/CoreData/NSPersistentHistoryToken.rs new file mode 100644 index 000000000..fbdabcab1 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentHistoryToken.rs @@ -0,0 +1,18 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentHistoryToken; + + unsafe impl ClassType for NSPersistentHistoryToken { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentHistoryToken {} +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentHistoryTransaction.rs b/crates/icrate/src/generated/CoreData/NSPersistentHistoryTransaction.rs new file mode 100644 index 000000000..546f70976 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentHistoryTransaction.rs @@ -0,0 +1,59 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentHistoryTransaction; + + unsafe impl ClassType for NSPersistentHistoryTransaction { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentHistoryTransaction { + #[method_id(@__retain_semantics Other entityDescriptionWithContext:)] + pub unsafe fn entityDescriptionWithContext( + context: &NSManagedObjectContext, + ) -> Option>; + + #[method_id(@__retain_semantics Other entityDescription)] + pub unsafe fn entityDescription() -> Option>; + + #[method_id(@__retain_semantics Other fetchRequest)] + pub unsafe fn fetchRequest() -> Option>; + + #[method_id(@__retain_semantics Other timestamp)] + pub unsafe fn timestamp(&self) -> Id; + + #[method_id(@__retain_semantics Other changes)] + pub unsafe fn changes(&self) -> Option, Shared>>; + + #[method(transactionNumber)] + pub unsafe fn transactionNumber(&self) -> i64; + + #[method_id(@__retain_semantics Other storeID)] + pub unsafe fn storeID(&self) -> Id; + + #[method_id(@__retain_semantics Other bundleID)] + pub unsafe fn bundleID(&self) -> Id; + + #[method_id(@__retain_semantics Other processID)] + pub unsafe fn processID(&self) -> Id; + + #[method_id(@__retain_semantics Other contextName)] + pub unsafe fn contextName(&self) -> Option>; + + #[method_id(@__retain_semantics Other author)] + pub unsafe fn author(&self) -> Option>; + + #[method_id(@__retain_semantics Other token)] + pub unsafe fn token(&self) -> Id; + + #[method_id(@__retain_semantics Other objectIDNotification)] + pub unsafe fn objectIDNotification(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentStore.rs b/crates/icrate/src/generated/CoreData/NSPersistentStore.rs new file mode 100644 index 000000000..ce1cd827e --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentStore.rs @@ -0,0 +1,100 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentStore; + + unsafe impl ClassType for NSPersistentStore { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentStore { + #[method_id(@__retain_semantics Other metadataForPersistentStoreWithURL:error:)] + pub unsafe fn metadataForPersistentStoreWithURL_error( + url: &NSURL, + ) -> Result, Shared>, Id>; + + #[method(setMetadata:forPersistentStoreWithURL:error:)] + pub unsafe fn setMetadata_forPersistentStoreWithURL_error( + metadata: Option<&NSDictionary>, + url: &NSURL, + ) -> Result<(), Id>; + + #[method(migrationManagerClass)] + pub unsafe fn migrationManagerClass() -> &'static Class; + + #[method_id(@__retain_semantics Init initWithPersistentStoreCoordinator:configurationName:URL:options:)] + pub unsafe fn initWithPersistentStoreCoordinator_configurationName_URL_options( + this: Option>, + root: Option<&NSPersistentStoreCoordinator>, + name: Option<&NSString>, + url: &NSURL, + options: Option<&NSDictionary>, + ) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method(loadMetadata:)] + pub unsafe fn loadMetadata(&self, error: *mut *mut NSError) -> bool; + + #[method_id(@__retain_semantics Other persistentStoreCoordinator)] + pub unsafe fn persistentStoreCoordinator( + &self, + ) -> Option>; + + #[method_id(@__retain_semantics Other configurationName)] + pub unsafe fn configurationName(&self) -> Id; + + #[method_id(@__retain_semantics Other options)] + pub unsafe fn options(&self) -> Option>; + + #[method_id(@__retain_semantics Other URL)] + pub unsafe fn URL(&self) -> Option>; + + #[method(setURL:)] + pub unsafe fn setURL(&self, URL: Option<&NSURL>); + + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self) -> Id; + + #[method(setIdentifier:)] + pub unsafe fn setIdentifier(&self, identifier: Option<&NSString>); + + #[method_id(@__retain_semantics Other type)] + pub unsafe fn type_(&self) -> Id; + + #[method(isReadOnly)] + pub unsafe fn isReadOnly(&self) -> bool; + + #[method(setReadOnly:)] + pub unsafe fn setReadOnly(&self, readOnly: bool); + + #[method_id(@__retain_semantics Other metadata)] + pub unsafe fn metadata(&self) -> Option, Shared>>; + + #[method(setMetadata:)] + pub unsafe fn setMetadata(&self, metadata: Option<&NSDictionary>); + + #[method(didAddToPersistentStoreCoordinator:)] + pub unsafe fn didAddToPersistentStoreCoordinator( + &self, + coordinator: &NSPersistentStoreCoordinator, + ); + + #[method(willRemoveFromPersistentStoreCoordinator:)] + pub unsafe fn willRemoveFromPersistentStoreCoordinator( + &self, + coordinator: Option<&NSPersistentStoreCoordinator>, + ); + + #[method_id(@__retain_semantics Other coreSpotlightExporter)] + pub unsafe fn coreSpotlightExporter(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs b/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs new file mode 100644 index 000000000..333dfe394 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs @@ -0,0 +1,433 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern "C" { + pub static NSSQLiteStoreType: &'static NSString; +} + +extern "C" { + pub static NSXMLStoreType: &'static NSString; +} + +extern "C" { + pub static NSBinaryStoreType: &'static NSString; +} + +extern "C" { + pub static NSInMemoryStoreType: &'static NSString; +} + +extern "C" { + pub static NSStoreTypeKey: &'static NSString; +} + +extern "C" { + pub static NSStoreUUIDKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreCoordinatorStoresWillChangeNotification: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreCoordinatorStoresDidChangeNotification: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreCoordinatorWillRemoveStoreNotification: &'static NSString; +} + +extern "C" { + pub static NSAddedPersistentStoresKey: &'static NSString; +} + +extern "C" { + pub static NSRemovedPersistentStoresKey: &'static NSString; +} + +extern "C" { + pub static NSUUIDChangedPersistentStoresKey: &'static NSString; +} + +extern "C" { + pub static NSReadOnlyPersistentStoreOption: &'static NSString; +} + +extern "C" { + pub static NSValidateXMLStoreOption: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreTimeoutOption: &'static NSString; +} + +extern "C" { + pub static NSSQLitePragmasOption: &'static NSString; +} + +extern "C" { + pub static NSSQLiteAnalyzeOption: &'static NSString; +} + +extern "C" { + pub static NSSQLiteManualVacuumOption: &'static NSString; +} + +extern "C" { + pub static NSIgnorePersistentStoreVersioningOption: &'static NSString; +} + +extern "C" { + pub static NSMigratePersistentStoresAutomaticallyOption: &'static NSString; +} + +extern "C" { + pub static NSInferMappingModelAutomaticallyOption: &'static NSString; +} + +extern "C" { + pub static NSStoreModelVersionHashesKey: &'static NSString; +} + +extern "C" { + pub static NSStoreModelVersionIdentifiersKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreOSCompatibility: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreConnectionPoolMaxSizeKey: &'static NSString; +} + +extern "C" { + pub static NSCoreDataCoreSpotlightExporter: &'static NSString; +} + +extern "C" { + pub static NSXMLExternalRecordType: &'static NSString; +} + +extern "C" { + pub static NSBinaryExternalRecordType: &'static NSString; +} + +extern "C" { + pub static NSExternalRecordsFileFormatOption: &'static NSString; +} + +extern "C" { + pub static NSExternalRecordsDirectoryOption: &'static NSString; +} + +extern "C" { + pub static NSExternalRecordExtensionOption: &'static NSString; +} + +extern "C" { + pub static NSEntityNameInPathKey: &'static NSString; +} + +extern "C" { + pub static NSStoreUUIDInPathKey: &'static NSString; +} + +extern "C" { + pub static NSStorePathKey: &'static NSString; +} + +extern "C" { + pub static NSModelPathKey: &'static NSString; +} + +extern "C" { + pub static NSObjectURIKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreForceDestroyOption: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreFileProtectionKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentHistoryTrackingKey: &'static NSString; +} + +extern "C" { + pub static NSBinaryStoreSecureDecodingClasses: &'static NSString; +} + +extern "C" { + pub static NSBinaryStoreInsecureDecodingCompatibilityOption: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreRemoteChangeNotificationPostOptionKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreRemoteChangeNotification: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreURLKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentHistoryTokenKey: &'static NSString; +} + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentStoreCoordinator; + + unsafe impl ClassType for NSPersistentStoreCoordinator { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentStoreCoordinator { + #[method_id(@__retain_semantics Init initWithManagedObjectModel:)] + pub unsafe fn initWithManagedObjectModel( + this: Option>, + model: &NSManagedObjectModel, + ) -> Id; + + #[method_id(@__retain_semantics Other managedObjectModel)] + pub unsafe fn managedObjectModel(&self) -> Id; + + #[method_id(@__retain_semantics Other persistentStores)] + pub unsafe fn persistentStores(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Option>; + + #[method(setName:)] + pub unsafe fn setName(&self, name: Option<&NSString>); + + #[method_id(@__retain_semantics Other persistentStoreForURL:)] + pub unsafe fn persistentStoreForURL( + &self, + URL: &NSURL, + ) -> Option>; + + #[method_id(@__retain_semantics Other URLForPersistentStore:)] + pub unsafe fn URLForPersistentStore(&self, store: &NSPersistentStore) -> Id; + + #[method(setURL:forPersistentStore:)] + pub unsafe fn setURL_forPersistentStore( + &self, + url: &NSURL, + store: &NSPersistentStore, + ) -> bool; + + #[method_id(@__retain_semantics Other addPersistentStoreWithType:configuration:URL:options:error:)] + pub unsafe fn addPersistentStoreWithType_configuration_URL_options_error( + &self, + storeType: &NSString, + configuration: Option<&NSString>, + storeURL: Option<&NSURL>, + options: Option<&NSDictionary>, + ) -> Result, Id>; + + #[method(addPersistentStoreWithDescription:completionHandler:)] + pub unsafe fn addPersistentStoreWithDescription_completionHandler( + &self, + storeDescription: &NSPersistentStoreDescription, + block: TodoBlock, + ); + + #[method(removePersistentStore:error:)] + pub unsafe fn removePersistentStore_error( + &self, + store: &NSPersistentStore, + ) -> Result<(), Id>; + + #[method(setMetadata:forPersistentStore:)] + pub unsafe fn setMetadata_forPersistentStore( + &self, + metadata: Option<&NSDictionary>, + store: &NSPersistentStore, + ); + + #[method_id(@__retain_semantics Other metadataForPersistentStore:)] + pub unsafe fn metadataForPersistentStore( + &self, + store: &NSPersistentStore, + ) -> Id, Shared>; + + #[method_id(@__retain_semantics Other managedObjectIDForURIRepresentation:)] + pub unsafe fn managedObjectIDForURIRepresentation( + &self, + url: &NSURL, + ) -> Option>; + + #[method_id(@__retain_semantics Other executeRequest:withContext:error:)] + pub unsafe fn executeRequest_withContext_error( + &self, + request: &NSPersistentStoreRequest, + context: &NSManagedObjectContext, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other registeredStoreTypes)] + pub unsafe fn registeredStoreTypes() -> Id, Shared>; + + #[method(registerStoreClass:forStoreType:)] + pub unsafe fn registerStoreClass_forStoreType( + storeClass: Option<&Class>, + storeType: &NSString, + ); + + #[method_id(@__retain_semantics Other metadataForPersistentStoreOfType:URL:options:error:)] + pub unsafe fn metadataForPersistentStoreOfType_URL_options_error( + storeType: &NSString, + url: &NSURL, + options: Option<&NSDictionary>, + ) -> Result, Shared>, Id>; + + #[method(setMetadata:forPersistentStoreOfType:URL:options:error:)] + pub unsafe fn setMetadata_forPersistentStoreOfType_URL_options_error( + metadata: Option<&NSDictionary>, + storeType: &NSString, + url: &NSURL, + options: Option<&NSDictionary>, + ) -> Result<(), Id>; + + #[method_id(@__retain_semantics Other elementsDerivedFromExternalRecordURL:)] + pub unsafe fn elementsDerivedFromExternalRecordURL( + fileURL: &NSURL, + ) -> Id; + + #[method_id(@__retain_semantics Other importStoreWithIdentifier:fromExternalRecordsDirectory:toURL:options:withType:error:)] + pub unsafe fn importStoreWithIdentifier_fromExternalRecordsDirectory_toURL_options_withType_error( + &self, + storeIdentifier: Option<&NSString>, + externalRecordsURL: &NSURL, + destinationURL: &NSURL, + options: Option<&NSDictionary>, + storeType: &NSString, + ) -> Result, Id>; + + #[method_id(@__retain_semantics Other migratePersistentStore:toURL:options:withType:error:)] + pub unsafe fn migratePersistentStore_toURL_options_withType_error( + &self, + store: &NSPersistentStore, + URL: &NSURL, + options: Option<&NSDictionary>, + storeType: &NSString, + ) -> Result, Id>; + + #[method(destroyPersistentStoreAtURL:withType:options:error:)] + pub unsafe fn destroyPersistentStoreAtURL_withType_options_error( + &self, + url: &NSURL, + storeType: &NSString, + options: Option<&NSDictionary>, + ) -> Result<(), Id>; + + #[method(replacePersistentStoreAtURL:destinationOptions:withPersistentStoreFromURL:sourceOptions:storeType:error:)] + pub unsafe fn replacePersistentStoreAtURL_destinationOptions_withPersistentStoreFromURL_sourceOptions_storeType_error( + &self, + destinationURL: &NSURL, + destinationOptions: Option<&NSDictionary>, + sourceURL: &NSURL, + sourceOptions: Option<&NSDictionary>, + storeType: &NSString, + ) -> Result<(), Id>; + + #[method(performBlock:)] + pub unsafe fn performBlock(&self, block: TodoBlock); + + #[method(performBlockAndWait:)] + pub unsafe fn performBlockAndWait(&self, block: TodoBlock); + + #[method_id(@__retain_semantics Other currentPersistentHistoryTokenFromStores:)] + pub unsafe fn currentPersistentHistoryTokenFromStores( + &self, + stores: Option<&NSArray>, + ) -> Option>; + + #[method_id(@__retain_semantics Other metadataForPersistentStoreWithURL:error:)] + pub unsafe fn metadataForPersistentStoreWithURL_error( + url: &NSURL, + ) -> Result, Id>; + + #[method(lock)] + pub unsafe fn lock(&self); + + #[method(unlock)] + pub unsafe fn unlock(&self); + + #[method(tryLock)] + pub unsafe fn tryLock(&self) -> bool; + + #[method_id(@__retain_semantics Other metadataForPersistentStoreOfType:URL:error:)] + pub unsafe fn metadataForPersistentStoreOfType_URL_error( + storeType: Option<&NSString>, + url: &NSURL, + ) -> Result, Shared>, Id>; + + #[method(setMetadata:forPersistentStoreOfType:URL:error:)] + pub unsafe fn setMetadata_forPersistentStoreOfType_URL_error( + metadata: Option<&NSDictionary>, + storeType: Option<&NSString>, + url: &NSURL, + ) -> Result<(), Id>; + + #[method(removeUbiquitousContentAndPersistentStoreAtURL:options:error:)] + pub unsafe fn removeUbiquitousContentAndPersistentStoreAtURL_options_error( + storeURL: &NSURL, + options: Option<&NSDictionary>, + ) -> Result<(), Id>; + } +); + +pub type NSPersistentStoreUbiquitousTransitionType = NSUInteger; +pub const NSPersistentStoreUbiquitousTransitionTypeAccountAdded: + NSPersistentStoreUbiquitousTransitionType = 1; +pub const NSPersistentStoreUbiquitousTransitionTypeAccountRemoved: + NSPersistentStoreUbiquitousTransitionType = 2; +pub const NSPersistentStoreUbiquitousTransitionTypeContentRemoved: + NSPersistentStoreUbiquitousTransitionType = 3; +pub const NSPersistentStoreUbiquitousTransitionTypeInitialImportCompleted: + NSPersistentStoreUbiquitousTransitionType = 4; + +extern "C" { + pub static NSPersistentStoreUbiquitousContentNameKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreUbiquitousContentURLKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreDidImportUbiquitousContentChangesNotification: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreUbiquitousTransitionTypeKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreUbiquitousPeerTokenOption: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreRemoveUbiquitousMetadataOption: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreUbiquitousContainerIdentifierKey: &'static NSString; +} + +extern "C" { + pub static NSPersistentStoreRebuildFromUbiquitousContentOption: &'static NSString; +} diff --git a/crates/icrate/src/generated/CoreData/NSPersistentStoreDescription.rs b/crates/icrate/src/generated/CoreData/NSPersistentStoreDescription.rs new file mode 100644 index 000000000..c271e0eea --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentStoreDescription.rs @@ -0,0 +1,106 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentStoreDescription; + + unsafe impl ClassType for NSPersistentStoreDescription { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentStoreDescription { + #[method_id(@__retain_semantics Other persistentStoreDescriptionWithURL:)] + pub unsafe fn persistentStoreDescriptionWithURL(URL: &NSURL) -> Id; + + #[method_id(@__retain_semantics Other type)] + pub unsafe fn type_(&self) -> Id; + + #[method(setType:)] + pub unsafe fn setType(&self, type_: &NSString); + + #[method_id(@__retain_semantics Other configuration)] + pub unsafe fn configuration(&self) -> Option>; + + #[method(setConfiguration:)] + pub unsafe fn setConfiguration(&self, configuration: Option<&NSString>); + + #[method_id(@__retain_semantics Other URL)] + pub unsafe fn URL(&self) -> Option>; + + #[method(setURL:)] + pub unsafe fn setURL(&self, URL: Option<&NSURL>); + + #[method_id(@__retain_semantics Other options)] + pub unsafe fn options(&self) -> Id, Shared>; + + #[method(setOption:forKey:)] + pub unsafe fn setOption_forKey(&self, option: Option<&NSObject>, key: &NSString); + + #[method(isReadOnly)] + pub unsafe fn isReadOnly(&self) -> bool; + + #[method(setReadOnly:)] + pub unsafe fn setReadOnly(&self, readOnly: bool); + + #[method(timeout)] + pub unsafe fn timeout(&self) -> NSTimeInterval; + + #[method(setTimeout:)] + pub unsafe fn setTimeout(&self, timeout: NSTimeInterval); + + #[method_id(@__retain_semantics Other sqlitePragmas)] + pub unsafe fn sqlitePragmas(&self) -> Id, Shared>; + + #[method(setValue:forPragmaNamed:)] + pub unsafe fn setValue_forPragmaNamed(&self, value: Option<&NSObject>, name: &NSString); + + #[method(shouldAddStoreAsynchronously)] + pub unsafe fn shouldAddStoreAsynchronously(&self) -> bool; + + #[method(setShouldAddStoreAsynchronously:)] + pub unsafe fn setShouldAddStoreAsynchronously(&self, shouldAddStoreAsynchronously: bool); + + #[method(shouldMigrateStoreAutomatically)] + pub unsafe fn shouldMigrateStoreAutomatically(&self) -> bool; + + #[method(setShouldMigrateStoreAutomatically:)] + pub unsafe fn setShouldMigrateStoreAutomatically( + &self, + shouldMigrateStoreAutomatically: bool, + ); + + #[method(shouldInferMappingModelAutomatically)] + pub unsafe fn shouldInferMappingModelAutomatically(&self) -> bool; + + #[method(setShouldInferMappingModelAutomatically:)] + pub unsafe fn setShouldInferMappingModelAutomatically( + &self, + shouldInferMappingModelAutomatically: bool, + ); + + #[method_id(@__retain_semantics Init initWithURL:)] + pub unsafe fn initWithURL(this: Option>, url: &NSURL) -> Id; + } +); + +extern_methods!( + /// NSPersistentCloudKitContainerAdditions + unsafe impl NSPersistentStoreDescription { + #[method_id(@__retain_semantics Other cloudKitContainerOptions)] + pub unsafe fn cloudKitContainerOptions( + &self, + ) -> Option>; + + #[method(setCloudKitContainerOptions:)] + pub unsafe fn setCloudKitContainerOptions( + &self, + cloudKitContainerOptions: Option<&NSPersistentCloudKitContainerOptions>, + ); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentStoreRequest.rs b/crates/icrate/src/generated/CoreData/NSPersistentStoreRequest.rs new file mode 100644 index 000000000..72bb13274 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentStoreRequest.rs @@ -0,0 +1,34 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSPersistentStoreRequestType = NSUInteger; +pub const NSFetchRequestType: NSPersistentStoreRequestType = 1; +pub const NSSaveRequestType: NSPersistentStoreRequestType = 2; +pub const NSBatchInsertRequestType: NSPersistentStoreRequestType = 5; +pub const NSBatchUpdateRequestType: NSPersistentStoreRequestType = 6; +pub const NSBatchDeleteRequestType: NSPersistentStoreRequestType = 7; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentStoreRequest; + + unsafe impl ClassType for NSPersistentStoreRequest { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentStoreRequest { + #[method_id(@__retain_semantics Other affectedStores)] + pub unsafe fn affectedStores(&self) -> Option, Shared>>; + + #[method(setAffectedStores:)] + pub unsafe fn setAffectedStores(&self, affectedStores: Option<&NSArray>); + + #[method(requestType)] + pub unsafe fn requestType(&self) -> NSPersistentStoreRequestType; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentStoreResult.rs b/crates/icrate/src/generated/CoreData/NSPersistentStoreResult.rs new file mode 100644 index 000000000..03babf440 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPersistentStoreResult.rs @@ -0,0 +1,194 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSBatchInsertRequestResultType = NSUInteger; +pub const NSBatchInsertRequestResultTypeStatusOnly: NSBatchInsertRequestResultType = 0x0; +pub const NSBatchInsertRequestResultTypeObjectIDs: NSBatchInsertRequestResultType = 0x1; +pub const NSBatchInsertRequestResultTypeCount: NSBatchInsertRequestResultType = 0x2; + +pub type NSBatchUpdateRequestResultType = NSUInteger; +pub const NSStatusOnlyResultType: NSBatchUpdateRequestResultType = 0x0; +pub const NSUpdatedObjectIDsResultType: NSBatchUpdateRequestResultType = 0x1; +pub const NSUpdatedObjectsCountResultType: NSBatchUpdateRequestResultType = 0x2; + +pub type NSBatchDeleteRequestResultType = NSUInteger; +pub const NSBatchDeleteResultTypeStatusOnly: NSBatchDeleteRequestResultType = 0x0; +pub const NSBatchDeleteResultTypeObjectIDs: NSBatchDeleteRequestResultType = 0x1; +pub const NSBatchDeleteResultTypeCount: NSBatchDeleteRequestResultType = 0x2; + +pub type NSPersistentHistoryResultType = NSInteger; +pub const NSPersistentHistoryResultTypeStatusOnly: NSPersistentHistoryResultType = 0x0; +pub const NSPersistentHistoryResultTypeObjectIDs: NSPersistentHistoryResultType = 0x1; +pub const NSPersistentHistoryResultTypeCount: NSPersistentHistoryResultType = 0x2; +pub const NSPersistentHistoryResultTypeTransactionsOnly: NSPersistentHistoryResultType = 0x3; +pub const NSPersistentHistoryResultTypeChangesOnly: NSPersistentHistoryResultType = 0x4; +pub const NSPersistentHistoryResultTypeTransactionsAndChanges: NSPersistentHistoryResultType = 0x5; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentStoreResult; + + unsafe impl ClassType for NSPersistentStoreResult { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPersistentStoreResult {} +); + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentStoreAsynchronousResult; + + unsafe impl ClassType for NSPersistentStoreAsynchronousResult { + type Super = NSPersistentStoreResult; + } +); + +extern_methods!( + unsafe impl NSPersistentStoreAsynchronousResult { + #[method_id(@__retain_semantics Other managedObjectContext)] + pub unsafe fn managedObjectContext(&self) -> Id; + + #[method_id(@__retain_semantics Other operationError)] + pub unsafe fn operationError(&self) -> Option>; + + #[method_id(@__retain_semantics Other progress)] + pub unsafe fn progress(&self) -> Option>; + + #[method(cancel)] + pub unsafe fn cancel(&self); + } +); + +__inner_extern_class!( + #[derive(Debug)] + pub struct NSAsynchronousFetchResult { + _inner0: PhantomData<*mut ResultType>, + } + + unsafe impl ClassType for NSAsynchronousFetchResult { + type Super = NSPersistentStoreAsynchronousResult; + } +); + +extern_methods!( + unsafe impl NSAsynchronousFetchResult { + #[method_id(@__retain_semantics Other fetchRequest)] + pub unsafe fn fetchRequest(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other finalResult)] + pub unsafe fn finalResult(&self) -> Option, Shared>>; + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSBatchInsertResult; + + unsafe impl ClassType for NSBatchInsertResult { + type Super = NSPersistentStoreResult; + } +); + +extern_methods!( + unsafe impl NSBatchInsertResult { + #[method_id(@__retain_semantics Other result)] + pub unsafe fn result(&self) -> Option>; + + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSBatchInsertRequestResultType; + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSBatchUpdateResult; + + unsafe impl ClassType for NSBatchUpdateResult { + type Super = NSPersistentStoreResult; + } +); + +extern_methods!( + unsafe impl NSBatchUpdateResult { + #[method_id(@__retain_semantics Other result)] + pub unsafe fn result(&self) -> Option>; + + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSBatchUpdateRequestResultType; + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSBatchDeleteResult; + + unsafe impl ClassType for NSBatchDeleteResult { + type Super = NSPersistentStoreResult; + } +); + +extern_methods!( + unsafe impl NSBatchDeleteResult { + #[method_id(@__retain_semantics Other result)] + pub unsafe fn result(&self) -> Option>; + + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSBatchDeleteRequestResultType; + } +); + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentHistoryResult; + + unsafe impl ClassType for NSPersistentHistoryResult { + type Super = NSPersistentStoreResult; + } +); + +extern_methods!( + unsafe impl NSPersistentHistoryResult { + #[method_id(@__retain_semantics Other result)] + pub unsafe fn result(&self) -> Option>; + + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSPersistentHistoryResultType; + } +); + +pub type NSPersistentCloudKitContainerEventResultType = NSInteger; +pub const NSPersistentCloudKitContainerEventResultTypeEvents: + NSPersistentCloudKitContainerEventResultType = 0; +pub const NSPersistentCloudKitContainerEventResultTypeCountEvents: + NSPersistentCloudKitContainerEventResultType = 1; + +extern_class!( + #[derive(Debug)] + pub struct NSPersistentCloudKitContainerEventResult; + + unsafe impl ClassType for NSPersistentCloudKitContainerEventResult { + type Super = NSPersistentStoreResult; + } +); + +extern_methods!( + unsafe impl NSPersistentCloudKitContainerEventResult { + #[method_id(@__retain_semantics Other result)] + pub unsafe fn result(&self) -> Option>; + + #[method(resultType)] + pub unsafe fn resultType(&self) -> NSPersistentCloudKitContainerEventResultType; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPropertyDescription.rs b/crates/icrate/src/generated/CoreData/NSPropertyDescription.rs new file mode 100644 index 000000000..d43dcb671 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPropertyDescription.rs @@ -0,0 +1,91 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPropertyDescription; + + unsafe impl ClassType for NSPropertyDescription { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPropertyDescription { + #[method_id(@__retain_semantics Other entity)] + pub unsafe fn entity(&self) -> Id; + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method(setName:)] + pub unsafe fn setName(&self, name: &NSString); + + #[method(isOptional)] + pub unsafe fn isOptional(&self) -> bool; + + #[method(setOptional:)] + pub unsafe fn setOptional(&self, optional: bool); + + #[method(isTransient)] + pub unsafe fn isTransient(&self) -> bool; + + #[method(setTransient:)] + pub unsafe fn setTransient(&self, transient: bool); + + #[method_id(@__retain_semantics Other validationPredicates)] + pub unsafe fn validationPredicates(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other validationWarnings)] + pub unsafe fn validationWarnings(&self) -> Id; + + #[method(setValidationPredicates:withValidationWarnings:)] + pub unsafe fn setValidationPredicates_withValidationWarnings( + &self, + validationPredicates: Option<&NSArray>, + validationWarnings: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + + #[method(setUserInfo:)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); + + #[method(isIndexed)] + pub unsafe fn isIndexed(&self) -> bool; + + #[method(setIndexed:)] + pub unsafe fn setIndexed(&self, indexed: bool); + + #[method_id(@__retain_semantics Other versionHash)] + pub unsafe fn versionHash(&self) -> Id; + + #[method_id(@__retain_semantics Other versionHashModifier)] + pub unsafe fn versionHashModifier(&self) -> Option>; + + #[method(setVersionHashModifier:)] + pub unsafe fn setVersionHashModifier(&self, versionHashModifier: Option<&NSString>); + + #[method(isIndexedBySpotlight)] + pub unsafe fn isIndexedBySpotlight(&self) -> bool; + + #[method(setIndexedBySpotlight:)] + pub unsafe fn setIndexedBySpotlight(&self, indexedBySpotlight: bool); + + #[method(isStoredInExternalRecord)] + pub unsafe fn isStoredInExternalRecord(&self) -> bool; + + #[method(setStoredInExternalRecord:)] + pub unsafe fn setStoredInExternalRecord(&self, storedInExternalRecord: bool); + + #[method_id(@__retain_semantics Other renamingIdentifier)] + pub unsafe fn renamingIdentifier(&self) -> Option>; + + #[method(setRenamingIdentifier:)] + pub unsafe fn setRenamingIdentifier(&self, renamingIdentifier: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSPropertyMapping.rs b/crates/icrate/src/generated/CoreData/NSPropertyMapping.rs new file mode 100644 index 000000000..8633f9aae --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSPropertyMapping.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSPropertyMapping; + + unsafe impl ClassType for NSPropertyMapping { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSPropertyMapping { + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Option>; + + #[method(setName:)] + pub unsafe fn setName(&self, name: Option<&NSString>); + + #[method_id(@__retain_semantics Other valueExpression)] + pub unsafe fn valueExpression(&self) -> Option>; + + #[method(setValueExpression:)] + pub unsafe fn setValueExpression(&self, valueExpression: Option<&NSExpression>); + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + + #[method(setUserInfo:)] + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSQueryGenerationToken.rs b/crates/icrate/src/generated/CoreData/NSQueryGenerationToken.rs new file mode 100644 index 000000000..c9449570a --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSQueryGenerationToken.rs @@ -0,0 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSQueryGenerationToken; + + unsafe impl ClassType for NSQueryGenerationToken { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl NSQueryGenerationToken { + #[method_id(@__retain_semantics Other currentQueryGenerationToken)] + pub unsafe fn currentQueryGenerationToken() -> Id; + } +); diff --git a/crates/icrate/src/generated/CoreData/NSRelationshipDescription.rs b/crates/icrate/src/generated/CoreData/NSRelationshipDescription.rs new file mode 100644 index 000000000..5162f7b2b --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSRelationshipDescription.rs @@ -0,0 +1,69 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +pub type NSDeleteRule = NSUInteger; +pub const NSNoActionDeleteRule: NSDeleteRule = 0; +pub const NSNullifyDeleteRule: NSDeleteRule = 1; +pub const NSCascadeDeleteRule: NSDeleteRule = 2; +pub const NSDenyDeleteRule: NSDeleteRule = 3; + +extern_class!( + #[derive(Debug)] + pub struct NSRelationshipDescription; + + unsafe impl ClassType for NSRelationshipDescription { + type Super = NSPropertyDescription; + } +); + +extern_methods!( + unsafe impl NSRelationshipDescription { + #[method_id(@__retain_semantics Other destinationEntity)] + pub unsafe fn destinationEntity(&self) -> Option>; + + #[method(setDestinationEntity:)] + pub unsafe fn setDestinationEntity(&self, destinationEntity: Option<&NSEntityDescription>); + + #[method_id(@__retain_semantics Other inverseRelationship)] + pub unsafe fn inverseRelationship(&self) -> Option>; + + #[method(setInverseRelationship:)] + pub unsafe fn setInverseRelationship( + &self, + inverseRelationship: Option<&NSRelationshipDescription>, + ); + + #[method(maxCount)] + pub unsafe fn maxCount(&self) -> NSUInteger; + + #[method(setMaxCount:)] + pub unsafe fn setMaxCount(&self, maxCount: NSUInteger); + + #[method(minCount)] + pub unsafe fn minCount(&self) -> NSUInteger; + + #[method(setMinCount:)] + pub unsafe fn setMinCount(&self, minCount: NSUInteger); + + #[method(deleteRule)] + pub unsafe fn deleteRule(&self) -> NSDeleteRule; + + #[method(setDeleteRule:)] + pub unsafe fn setDeleteRule(&self, deleteRule: NSDeleteRule); + + #[method(isToMany)] + pub unsafe fn isToMany(&self) -> bool; + + #[method_id(@__retain_semantics Other versionHash)] + pub unsafe fn versionHash(&self) -> Id; + + #[method(isOrdered)] + pub unsafe fn isOrdered(&self) -> bool; + + #[method(setOrdered:)] + pub unsafe fn setOrdered(&self, ordered: bool); + } +); diff --git a/crates/icrate/src/generated/CoreData/NSSaveChangesRequest.rs b/crates/icrate/src/generated/CoreData/NSSaveChangesRequest.rs new file mode 100644 index 000000000..ec77bddb9 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/NSSaveChangesRequest.rs @@ -0,0 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::CoreData::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct NSSaveChangesRequest; + + unsafe impl ClassType for NSSaveChangesRequest { + type Super = NSPersistentStoreRequest; + } +); + +extern_methods!( + unsafe impl NSSaveChangesRequest { + #[method_id(@__retain_semantics Init initWithInsertedObjects:updatedObjects:deletedObjects:lockedObjects:)] + pub unsafe fn initWithInsertedObjects_updatedObjects_deletedObjects_lockedObjects( + this: Option>, + insertedObjects: Option<&NSSet>, + updatedObjects: Option<&NSSet>, + deletedObjects: Option<&NSSet>, + lockedObjects: Option<&NSSet>, + ) -> Id; + + #[method_id(@__retain_semantics Other insertedObjects)] + pub unsafe fn insertedObjects(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other updatedObjects)] + pub unsafe fn updatedObjects(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other deletedObjects)] + pub unsafe fn deletedObjects(&self) -> Option, Shared>>; + + #[method_id(@__retain_semantics Other lockedObjects)] + pub unsafe fn lockedObjects(&self) -> Option, Shared>>; + } +); diff --git a/crates/icrate/src/generated/CoreData/mod.rs b/crates/icrate/src/generated/CoreData/mod.rs new file mode 100644 index 000000000..bd6bfd7a5 --- /dev/null +++ b/crates/icrate/src/generated/CoreData/mod.rs @@ -0,0 +1,247 @@ +pub(crate) mod CoreDataDefines; +pub(crate) mod CoreDataErrors; +pub(crate) mod NSAtomicStore; +pub(crate) mod NSAtomicStoreCacheNode; +pub(crate) mod NSAttributeDescription; +pub(crate) mod NSBatchDeleteRequest; +pub(crate) mod NSBatchInsertRequest; +pub(crate) mod NSBatchUpdateRequest; +pub(crate) mod NSCoreDataCoreSpotlightDelegate; +pub(crate) mod NSDerivedAttributeDescription; +pub(crate) mod NSEntityDescription; +pub(crate) mod NSEntityMapping; +pub(crate) mod NSEntityMigrationPolicy; +pub(crate) mod NSExpressionDescription; +pub(crate) mod NSFetchIndexDescription; +pub(crate) mod NSFetchIndexElementDescription; +pub(crate) mod NSFetchRequest; +pub(crate) mod NSFetchRequestExpression; +pub(crate) mod NSFetchedPropertyDescription; +pub(crate) mod NSFetchedResultsController; +pub(crate) mod NSIncrementalStore; +pub(crate) mod NSIncrementalStoreNode; +pub(crate) mod NSManagedObject; +pub(crate) mod NSManagedObjectContext; +pub(crate) mod NSManagedObjectID; +pub(crate) mod NSManagedObjectModel; +pub(crate) mod NSMappingModel; +pub(crate) mod NSMergePolicy; +pub(crate) mod NSMigrationManager; +pub(crate) mod NSPersistentCloudKitContainer; +pub(crate) mod NSPersistentCloudKitContainerEvent; +pub(crate) mod NSPersistentCloudKitContainerEventRequest; +pub(crate) mod NSPersistentCloudKitContainerOptions; +pub(crate) mod NSPersistentContainer; +pub(crate) mod NSPersistentHistoryChange; +pub(crate) mod NSPersistentHistoryChangeRequest; +pub(crate) mod NSPersistentHistoryToken; +pub(crate) mod NSPersistentHistoryTransaction; +pub(crate) mod NSPersistentStore; +pub(crate) mod NSPersistentStoreCoordinator; +pub(crate) mod NSPersistentStoreDescription; +pub(crate) mod NSPersistentStoreRequest; +pub(crate) mod NSPersistentStoreResult; +pub(crate) mod NSPropertyDescription; +pub(crate) mod NSPropertyMapping; +pub(crate) mod NSQueryGenerationToken; +pub(crate) mod NSRelationshipDescription; +pub(crate) mod NSSaveChangesRequest; + +mod __exported { + pub use super::CoreDataDefines::NSCoreDataVersionNumber; + pub use super::CoreDataErrors::{ + NSAffectedObjectsErrorKey, NSAffectedStoresErrorKey, NSCoreDataError, NSDetailedErrorsKey, + NSEntityMigrationPolicyError, NSExternalRecordImportError, NSInferredMappingModelError, + NSManagedObjectConstraintMergeError, NSManagedObjectConstraintValidationError, + NSManagedObjectContextLockingError, NSManagedObjectExternalRelationshipError, + NSManagedObjectMergeError, NSManagedObjectReferentialIntegrityError, + NSManagedObjectValidationError, NSMigrationCancelledError, + NSMigrationConstraintViolationError, NSMigrationError, + NSMigrationManagerDestinationStoreError, NSMigrationManagerSourceStoreError, + NSMigrationMissingMappingModelError, NSMigrationMissingSourceModelError, + NSPersistentHistoryTokenExpiredError, NSPersistentStoreCoordinatorLockingError, + NSPersistentStoreIncompatibleSchemaError, NSPersistentStoreIncompatibleVersionHashError, + NSPersistentStoreIncompleteSaveError, NSPersistentStoreInvalidTypeError, + NSPersistentStoreOpenError, NSPersistentStoreOperationError, + NSPersistentStoreSaveConflictsError, NSPersistentStoreSaveConflictsErrorKey, + NSPersistentStoreSaveError, NSPersistentStoreTimeoutError, + NSPersistentStoreTypeMismatchError, NSPersistentStoreUnsupportedRequestTypeError, + NSSQLiteError, NSSQLiteErrorDomain, NSValidationDateTooLateError, + NSValidationDateTooSoonError, NSValidationInvalidDateError, NSValidationInvalidURIError, + NSValidationKeyErrorKey, NSValidationMissingMandatoryPropertyError, + NSValidationMultipleErrorsError, NSValidationNumberTooLargeError, + NSValidationNumberTooSmallError, NSValidationObjectErrorKey, NSValidationPredicateErrorKey, + NSValidationRelationshipDeniedDeleteError, + NSValidationRelationshipExceedsMaximumCountError, + NSValidationRelationshipLacksMinimumCountError, NSValidationStringPatternMatchingError, + NSValidationStringTooLongError, NSValidationStringTooShortError, NSValidationValueErrorKey, + }; + pub use super::NSAtomicStore::NSAtomicStore; + pub use super::NSAtomicStoreCacheNode::NSAtomicStoreCacheNode; + pub use super::NSAttributeDescription::{ + NSAttributeDescription, NSAttributeType, NSBinaryDataAttributeType, NSBooleanAttributeType, + NSDateAttributeType, NSDecimalAttributeType, NSDoubleAttributeType, NSFloatAttributeType, + NSInteger16AttributeType, NSInteger32AttributeType, NSInteger64AttributeType, + NSObjectIDAttributeType, NSStringAttributeType, NSTransformableAttributeType, + NSURIAttributeType, NSUUIDAttributeType, NSUndefinedAttributeType, + }; + pub use super::NSBatchDeleteRequest::NSBatchDeleteRequest; + pub use super::NSBatchInsertRequest::NSBatchInsertRequest; + pub use super::NSBatchUpdateRequest::NSBatchUpdateRequest; + pub use super::NSCoreDataCoreSpotlightDelegate::{ + NSCoreDataCoreSpotlightDelegate, NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification, + }; + pub use super::NSDerivedAttributeDescription::NSDerivedAttributeDescription; + pub use super::NSEntityDescription::NSEntityDescription; + pub use super::NSEntityMapping::{ + NSAddEntityMappingType, NSCopyEntityMappingType, NSCustomEntityMappingType, + NSEntityMapping, NSEntityMappingType, NSRemoveEntityMappingType, + NSTransformEntityMappingType, NSUndefinedEntityMappingType, + }; + pub use super::NSEntityMigrationPolicy::{ + NSEntityMigrationPolicy, NSMigrationDestinationObjectKey, NSMigrationEntityMappingKey, + NSMigrationEntityPolicyKey, NSMigrationManagerKey, NSMigrationPropertyMappingKey, + NSMigrationSourceObjectKey, + }; + pub use super::NSExpressionDescription::NSExpressionDescription; + pub use super::NSFetchIndexDescription::NSFetchIndexDescription; + pub use super::NSFetchIndexElementDescription::{ + NSFetchIndexElementDescription, NSFetchIndexElementType, NSFetchIndexElementTypeBinary, + NSFetchIndexElementTypeRTree, + }; + pub use super::NSFetchRequest::{ + NSAsynchronousFetchRequest, NSCountResultType, NSDictionaryResultType, NSFetchRequest, + NSFetchRequestResult, NSFetchRequestResultType, NSManagedObjectIDResultType, + NSManagedObjectResultType, NSPersistentStoreAsynchronousFetchResultCompletionBlock, + }; + pub use super::NSFetchRequestExpression::{ + NSFetchRequestExpression, NSFetchRequestExpressionType, + }; + pub use super::NSFetchedPropertyDescription::NSFetchedPropertyDescription; + pub use super::NSFetchedResultsController::{ + NSFetchedResultsChangeDelete, NSFetchedResultsChangeInsert, NSFetchedResultsChangeMove, + NSFetchedResultsChangeType, NSFetchedResultsChangeUpdate, NSFetchedResultsController, + NSFetchedResultsControllerDelegate, NSFetchedResultsSectionInfo, + }; + pub use super::NSIncrementalStore::NSIncrementalStore; + pub use super::NSIncrementalStoreNode::NSIncrementalStoreNode; + pub use super::NSManagedObject::{ + NSManagedObject, NSSnapshotEventMergePolicy, NSSnapshotEventRefresh, + NSSnapshotEventRollback, NSSnapshotEventType, NSSnapshotEventUndoDeletion, + NSSnapshotEventUndoInsertion, NSSnapshotEventUndoUpdate, + }; + pub use super::NSManagedObjectContext::{ + NSConfinementConcurrencyType, NSDeletedObjectIDsKey, NSDeletedObjectsKey, + NSErrorMergePolicy, NSInsertedObjectIDsKey, NSInsertedObjectsKey, + NSInvalidatedAllObjectsKey, NSInvalidatedObjectIDsKey, NSInvalidatedObjectsKey, + NSMainQueueConcurrencyType, NSManagedObjectContext, NSManagedObjectContextConcurrencyType, + NSManagedObjectContextDidMergeChangesObjectIDsNotification, + NSManagedObjectContextDidSaveNotification, + NSManagedObjectContextDidSaveObjectIDsNotification, + NSManagedObjectContextObjectsDidChangeNotification, + NSManagedObjectContextQueryGenerationKey, NSManagedObjectContextWillSaveNotification, + NSMergeByPropertyObjectTrumpMergePolicy, NSMergeByPropertyStoreTrumpMergePolicy, + NSOverwriteMergePolicy, NSPrivateQueueConcurrencyType, NSRefreshedObjectIDsKey, + NSRefreshedObjectsKey, NSRollbackMergePolicy, NSUpdatedObjectIDsKey, NSUpdatedObjectsKey, + }; + pub use super::NSManagedObjectID::NSManagedObjectID; + pub use super::NSManagedObjectModel::NSManagedObjectModel; + pub use super::NSMappingModel::NSMappingModel; + pub use super::NSMergePolicy::{ + NSConstraintConflict, NSErrorMergePolicy, NSErrorMergePolicyType, + NSMergeByPropertyObjectTrumpMergePolicy, NSMergeByPropertyObjectTrumpMergePolicyType, + NSMergeByPropertyStoreTrumpMergePolicy, NSMergeByPropertyStoreTrumpMergePolicyType, + NSMergeConflict, NSMergePolicy, NSMergePolicyType, NSOverwriteMergePolicy, + NSOverwriteMergePolicyType, NSRollbackMergePolicy, NSRollbackMergePolicyType, + }; + pub use super::NSMigrationManager::NSMigrationManager; + pub use super::NSPersistentCloudKitContainer::{ + NSPersistentCloudKitContainer, NSPersistentCloudKitContainerSchemaInitializationOptions, + NSPersistentCloudKitContainerSchemaInitializationOptionsDryRun, + NSPersistentCloudKitContainerSchemaInitializationOptionsNone, + NSPersistentCloudKitContainerSchemaInitializationOptionsPrintSchema, + }; + pub use super::NSPersistentCloudKitContainerEvent::{ + NSPersistentCloudKitContainerEvent, NSPersistentCloudKitContainerEventChangedNotification, + NSPersistentCloudKitContainerEventType, NSPersistentCloudKitContainerEventTypeExport, + NSPersistentCloudKitContainerEventTypeImport, NSPersistentCloudKitContainerEventTypeSetup, + NSPersistentCloudKitContainerEventUserInfoKey, + }; + pub use super::NSPersistentCloudKitContainerEventRequest::NSPersistentCloudKitContainerEventRequest; + pub use super::NSPersistentCloudKitContainerOptions::NSPersistentCloudKitContainerOptions; + pub use super::NSPersistentContainer::NSPersistentContainer; + pub use super::NSPersistentHistoryChange::{ + NSPersistentHistoryChange, NSPersistentHistoryChangeType, + NSPersistentHistoryChangeTypeDelete, NSPersistentHistoryChangeTypeInsert, + NSPersistentHistoryChangeTypeUpdate, + }; + pub use super::NSPersistentHistoryChangeRequest::NSPersistentHistoryChangeRequest; + pub use super::NSPersistentHistoryToken::NSPersistentHistoryToken; + pub use super::NSPersistentHistoryTransaction::NSPersistentHistoryTransaction; + pub use super::NSPersistentStore::NSPersistentStore; + pub use super::NSPersistentStoreCoordinator::{ + NSAddedPersistentStoresKey, NSBinaryExternalRecordType, + NSBinaryStoreInsecureDecodingCompatibilityOption, NSBinaryStoreSecureDecodingClasses, + NSBinaryStoreType, NSCoreDataCoreSpotlightExporter, NSEntityNameInPathKey, + NSExternalRecordExtensionOption, NSExternalRecordsDirectoryOption, + NSExternalRecordsFileFormatOption, NSIgnorePersistentStoreVersioningOption, + NSInMemoryStoreType, NSInferMappingModelAutomaticallyOption, + NSMigratePersistentStoresAutomaticallyOption, NSModelPathKey, NSObjectURIKey, + NSPersistentHistoryTokenKey, NSPersistentHistoryTrackingKey, + NSPersistentStoreConnectionPoolMaxSizeKey, NSPersistentStoreCoordinator, + NSPersistentStoreCoordinatorStoresDidChangeNotification, + NSPersistentStoreCoordinatorStoresWillChangeNotification, + NSPersistentStoreCoordinatorWillRemoveStoreNotification, + NSPersistentStoreDidImportUbiquitousContentChangesNotification, + NSPersistentStoreFileProtectionKey, NSPersistentStoreForceDestroyOption, + NSPersistentStoreOSCompatibility, NSPersistentStoreRebuildFromUbiquitousContentOption, + NSPersistentStoreRemoteChangeNotification, + NSPersistentStoreRemoteChangeNotificationPostOptionKey, + NSPersistentStoreRemoveUbiquitousMetadataOption, NSPersistentStoreTimeoutOption, + NSPersistentStoreURLKey, NSPersistentStoreUbiquitousContainerIdentifierKey, + NSPersistentStoreUbiquitousContentNameKey, NSPersistentStoreUbiquitousContentURLKey, + NSPersistentStoreUbiquitousPeerTokenOption, NSPersistentStoreUbiquitousTransitionType, + NSPersistentStoreUbiquitousTransitionTypeAccountAdded, + NSPersistentStoreUbiquitousTransitionTypeAccountRemoved, + NSPersistentStoreUbiquitousTransitionTypeContentRemoved, + NSPersistentStoreUbiquitousTransitionTypeInitialImportCompleted, + NSPersistentStoreUbiquitousTransitionTypeKey, NSReadOnlyPersistentStoreOption, + NSRemovedPersistentStoresKey, NSSQLiteAnalyzeOption, NSSQLiteManualVacuumOption, + NSSQLitePragmasOption, NSSQLiteStoreType, NSStoreModelVersionHashesKey, + NSStoreModelVersionIdentifiersKey, NSStorePathKey, NSStoreTypeKey, NSStoreUUIDInPathKey, + NSStoreUUIDKey, NSUUIDChangedPersistentStoresKey, NSValidateXMLStoreOption, + NSXMLExternalRecordType, NSXMLStoreType, + }; + pub use super::NSPersistentStoreDescription::NSPersistentStoreDescription; + pub use super::NSPersistentStoreRequest::{ + NSBatchDeleteRequestType, NSBatchInsertRequestType, NSBatchUpdateRequestType, + NSFetchRequestType, NSPersistentStoreRequest, NSPersistentStoreRequestType, + NSSaveRequestType, + }; + pub use super::NSPersistentStoreResult::{ + NSAsynchronousFetchResult, NSBatchDeleteRequestResultType, NSBatchDeleteResult, + NSBatchDeleteResultTypeCount, NSBatchDeleteResultTypeObjectIDs, + NSBatchDeleteResultTypeStatusOnly, NSBatchInsertRequestResultType, + NSBatchInsertRequestResultTypeCount, NSBatchInsertRequestResultTypeObjectIDs, + NSBatchInsertRequestResultTypeStatusOnly, NSBatchInsertResult, + NSBatchUpdateRequestResultType, NSBatchUpdateResult, + NSPersistentCloudKitContainerEventResult, NSPersistentCloudKitContainerEventResultType, + NSPersistentCloudKitContainerEventResultTypeCountEvents, + NSPersistentCloudKitContainerEventResultTypeEvents, NSPersistentHistoryResult, + NSPersistentHistoryResultType, NSPersistentHistoryResultTypeChangesOnly, + NSPersistentHistoryResultTypeCount, NSPersistentHistoryResultTypeObjectIDs, + NSPersistentHistoryResultTypeStatusOnly, + NSPersistentHistoryResultTypeTransactionsAndChanges, + NSPersistentHistoryResultTypeTransactionsOnly, NSPersistentStoreAsynchronousResult, + NSPersistentStoreResult, NSStatusOnlyResultType, NSUpdatedObjectIDsResultType, + NSUpdatedObjectsCountResultType, + }; + pub use super::NSPropertyDescription::NSPropertyDescription; + pub use super::NSPropertyMapping::NSPropertyMapping; + pub use super::NSQueryGenerationToken::NSQueryGenerationToken; + pub use super::NSRelationshipDescription::{ + NSCascadeDeleteRule, NSDeleteRule, NSDenyDeleteRule, NSNoActionDeleteRule, + NSNullifyDeleteRule, NSRelationshipDescription, + }; + pub use super::NSSaveChangesRequest::NSSaveChangesRequest; +} diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 67b8ebfc9..2c3c7a17d 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -49,6 +49,8 @@ macro_rules! struct_impl { // Frameworks #[cfg(feature = "AppKit")] pub mod AppKit; +#[cfg(feature = "CoreData")] +pub mod CoreData; #[cfg(feature = "Foundation")] pub mod Foundation; From 8694bebf720e3ad77e2d9e5db46a0e670a642bc5 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 05:18:40 +0100 Subject: [PATCH 115/131] Properly fix imports --- crates/header-translator/src/main.rs | 7 +- crates/icrate/src/AppKit/mod.rs | 4 +- crates/icrate/src/CoreData/mod.rs | 4 +- crates/icrate/src/Foundation/mod.rs | 1204 +---- crates/icrate/src/generated/AppKit/mod.rs | 4681 +++++++++-------- crates/icrate/src/generated/CoreData/mod.rs | 532 +- crates/icrate/src/generated/Foundation/mod.rs | 2939 ++++++----- 7 files changed, 4257 insertions(+), 5114 deletions(-) diff --git a/crates/header-translator/src/main.rs b/crates/header-translator/src/main.rs index 751a2d730..7f1c8f1fe 100644 --- a/crates/header-translator/src/main.rs +++ b/crates/header-translator/src/main.rs @@ -284,21 +284,20 @@ fn output_files( let mut tokens = String::new(); for (name, _) in &declared { - writeln!(tokens, "pub(crate) mod {name};")?; + writeln!(tokens, "#[path = \"{name}.rs\"]")?; + writeln!(tokens, "mod __{name};")?; } writeln!(tokens, "")?; - writeln!(tokens, "mod __exported {{")?; for (name, declared_types) in declared { if !declared_types.is_empty() { let declared_types: Vec<_> = declared_types.into_iter().collect(); writeln!( tokens, - " pub use super::{name}::{{{}}};", + "pub use self::__{name}::{{{}}};", declared_types.join(",") )?; } } - writeln!(tokens, "}}")?; let output = if format_incrementally { run_rustfmt(tokens) diff --git a/crates/icrate/src/AppKit/mod.rs b/crates/icrate/src/AppKit/mod.rs index 4698a8cb5..c5593d688 100644 --- a/crates/icrate/src/AppKit/mod.rs +++ b/crates/icrate/src/AppKit/mod.rs @@ -1,5 +1,5 @@ #[allow(unused_imports)] #[path = "../generated/AppKit/mod.rs"] -pub(crate) mod generated; +mod generated; -pub use self::generated::__exported::*; +pub use self::generated::*; diff --git a/crates/icrate/src/CoreData/mod.rs b/crates/icrate/src/CoreData/mod.rs index 98e1f5a17..fff32a503 100644 --- a/crates/icrate/src/CoreData/mod.rs +++ b/crates/icrate/src/CoreData/mod.rs @@ -1,5 +1,5 @@ #[allow(unused_imports)] #[path = "../generated/CoreData/mod.rs"] -pub(crate) mod generated; +mod generated; -pub use self::generated::__exported::*; +pub use self::generated::*; diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index 1f8c3660a..9f70520a7 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -1,6 +1,6 @@ #[allow(unused_imports)] #[path = "../generated/Foundation/mod.rs"] -pub(crate) mod generated; +mod generated; pub use objc2::ffi::NSIntegerMax; pub use objc2::foundation::{CGFloat, CGPoint, CGRect, CGSize, NSZone}; @@ -105,1204 +105,4 @@ struct_impl!( } ); -// Generated - -pub use self::generated::FoundationErrors::{ - NSBundleErrorMaximum, NSBundleErrorMinimum, NSBundleOnDemandResourceExceededMaximumSizeError, - NSBundleOnDemandResourceInvalidTagError, NSBundleOnDemandResourceOutOfSpaceError, - NSCloudSharingConflictError, NSCloudSharingErrorMaximum, NSCloudSharingErrorMinimum, - NSCloudSharingNetworkFailureError, NSCloudSharingNoPermissionError, NSCloudSharingOtherError, - NSCloudSharingQuotaExceededError, NSCloudSharingTooManyParticipantsError, NSCoderErrorMaximum, - NSCoderErrorMinimum, NSCoderInvalidValueError, NSCoderReadCorruptError, - NSCoderValueNotFoundError, NSCompressionErrorMaximum, NSCompressionErrorMinimum, - NSCompressionFailedError, NSDecompressionFailedError, NSExecutableArchitectureMismatchError, - NSExecutableErrorMaximum, NSExecutableErrorMinimum, NSExecutableLinkError, - NSExecutableLoadError, NSExecutableNotLoadableError, NSExecutableRuntimeMismatchError, - NSFeatureUnsupportedError, NSFileErrorMaximum, NSFileErrorMinimum, NSFileLockingError, - NSFileManagerUnmountBusyError, NSFileManagerUnmountUnknownError, NSFileNoSuchFileError, - NSFileReadCorruptFileError, NSFileReadInapplicableStringEncodingError, - NSFileReadInvalidFileNameError, NSFileReadNoPermissionError, NSFileReadNoSuchFileError, - NSFileReadTooLargeError, NSFileReadUnknownError, NSFileReadUnknownStringEncodingError, - NSFileReadUnsupportedSchemeError, NSFileWriteFileExistsError, - NSFileWriteInapplicableStringEncodingError, NSFileWriteInvalidFileNameError, - NSFileWriteNoPermissionError, NSFileWriteOutOfSpaceError, NSFileWriteUnknownError, - NSFileWriteUnsupportedSchemeError, NSFileWriteVolumeReadOnlyError, NSFormattingError, - NSFormattingErrorMaximum, NSFormattingErrorMinimum, NSKeyValueValidationError, - NSPropertyListErrorMaximum, NSPropertyListErrorMinimum, NSPropertyListReadCorruptError, - NSPropertyListReadStreamError, NSPropertyListReadUnknownVersionError, - NSPropertyListWriteInvalidError, NSPropertyListWriteStreamError, NSUbiquitousFileErrorMaximum, - NSUbiquitousFileErrorMinimum, NSUbiquitousFileNotUploadedDueToQuotaError, - NSUbiquitousFileUbiquityServerNotAvailable, NSUbiquitousFileUnavailableError, - NSUserActivityConnectionUnavailableError, NSUserActivityErrorMaximum, - NSUserActivityErrorMinimum, NSUserActivityHandoffFailedError, - NSUserActivityHandoffUserInfoTooLargeError, NSUserActivityRemoteApplicationTimedOutError, - NSUserCancelledError, NSValidationErrorMaximum, NSValidationErrorMinimum, - NSXPCConnectionErrorMaximum, NSXPCConnectionErrorMinimum, NSXPCConnectionInterrupted, - NSXPCConnectionInvalid, NSXPCConnectionReplyInvalid, -}; -pub use self::generated::NSAffineTransform::{NSAffineTransform, NSAffineTransformStruct}; -pub use self::generated::NSAppleEventDescriptor::{ - NSAppleEventDescriptor, NSAppleEventSendAlwaysInteract, NSAppleEventSendCanInteract, - NSAppleEventSendCanSwitchLayer, NSAppleEventSendDefaultOptions, NSAppleEventSendDontAnnotate, - NSAppleEventSendDontExecute, NSAppleEventSendDontRecord, NSAppleEventSendNeverInteract, - NSAppleEventSendNoReply, NSAppleEventSendOptions, NSAppleEventSendQueueReply, - NSAppleEventSendWaitForReply, -}; -pub use self::generated::NSAppleEventManager::{ - NSAppleEventManager, NSAppleEventManagerSuspensionID, - NSAppleEventManagerWillProcessFirstEventNotification, NSAppleEventTimeOutDefault, - NSAppleEventTimeOutNone, -}; -pub use self::generated::NSAppleScript::{ - NSAppleScript, NSAppleScriptErrorAppName, NSAppleScriptErrorBriefMessage, - NSAppleScriptErrorMessage, NSAppleScriptErrorNumber, NSAppleScriptErrorRange, -}; -pub use self::generated::NSArchiver::{NSArchiver, NSUnarchiver}; -pub use self::generated::NSArray::{ - NSArray, NSBinarySearchingFirstEqual, NSBinarySearchingInsertionIndex, - NSBinarySearchingLastEqual, NSBinarySearchingOptions, NSMutableArray, -}; -pub use self::generated::NSAttributedString::{ - NSAlternateDescriptionAttributeName, NSAttributedString, - NSAttributedStringEnumerationLongestEffectiveRangeNotRequired, - NSAttributedStringEnumerationOptions, NSAttributedStringEnumerationReverse, - NSAttributedStringFormattingApplyReplacementIndexAttribute, - NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging, - NSAttributedStringFormattingOptions, NSAttributedStringKey, - NSAttributedStringMarkdownInterpretedSyntax, NSAttributedStringMarkdownInterpretedSyntaxFull, - NSAttributedStringMarkdownInterpretedSyntaxInlineOnly, - NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace, - NSAttributedStringMarkdownParsingFailurePolicy, - NSAttributedStringMarkdownParsingFailureReturnError, - NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible, - NSAttributedStringMarkdownParsingOptions, NSImageURLAttributeName, - NSInflectionAlternativeAttributeName, NSInflectionRuleAttributeName, - NSInlinePresentationIntent, NSInlinePresentationIntentAttributeName, - NSInlinePresentationIntentBlockHTML, NSInlinePresentationIntentCode, - NSInlinePresentationIntentEmphasized, NSInlinePresentationIntentInlineHTML, - NSInlinePresentationIntentLineBreak, NSInlinePresentationIntentSoftBreak, - NSInlinePresentationIntentStrikethrough, NSInlinePresentationIntentStronglyEmphasized, - NSLanguageIdentifierAttributeName, NSMorphologyAttributeName, NSMutableAttributedString, - NSPresentationIntent, NSPresentationIntentAttributeName, NSPresentationIntentKind, - NSPresentationIntentKindBlockQuote, NSPresentationIntentKindCodeBlock, - NSPresentationIntentKindHeader, NSPresentationIntentKindListItem, - NSPresentationIntentKindOrderedList, NSPresentationIntentKindParagraph, - NSPresentationIntentKindTable, NSPresentationIntentKindTableCell, - NSPresentationIntentKindTableHeaderRow, NSPresentationIntentKindTableRow, - NSPresentationIntentKindThematicBreak, NSPresentationIntentKindUnorderedList, - NSPresentationIntentTableColumnAlignment, NSPresentationIntentTableColumnAlignmentCenter, - NSPresentationIntentTableColumnAlignmentLeft, NSPresentationIntentTableColumnAlignmentRight, - NSReplacementIndexAttributeName, -}; -pub use self::generated::NSAutoreleasePool::NSAutoreleasePool; -pub use self::generated::NSBackgroundActivityScheduler::{ - NSBackgroundActivityCompletionHandler, NSBackgroundActivityResult, - NSBackgroundActivityResultDeferred, NSBackgroundActivityResultFinished, - NSBackgroundActivityScheduler, -}; -pub use self::generated::NSBundle::{ - NSBundle, NSBundleDidLoadNotification, NSBundleExecutableArchitectureARM64, - NSBundleExecutableArchitectureI386, NSBundleExecutableArchitecturePPC, - NSBundleExecutableArchitecturePPC64, NSBundleExecutableArchitectureX86_64, - NSBundleResourceRequest, NSBundleResourceRequestLoadingPriorityUrgent, - NSBundleResourceRequestLowDiskSpaceNotification, NSLoadedClasses, -}; -pub use self::generated::NSByteCountFormatter::{ - NSByteCountFormatter, NSByteCountFormatterCountStyle, NSByteCountFormatterCountStyleBinary, - NSByteCountFormatterCountStyleDecimal, NSByteCountFormatterCountStyleFile, - NSByteCountFormatterCountStyleMemory, NSByteCountFormatterUnits, NSByteCountFormatterUseAll, - NSByteCountFormatterUseBytes, NSByteCountFormatterUseDefault, NSByteCountFormatterUseEB, - NSByteCountFormatterUseGB, NSByteCountFormatterUseKB, NSByteCountFormatterUseMB, - NSByteCountFormatterUsePB, NSByteCountFormatterUseTB, NSByteCountFormatterUseYBOrHigher, - NSByteCountFormatterUseZB, -}; -pub use self::generated::NSByteOrder::{NSSwappedDouble, NSSwappedFloat}; -pub use self::generated::NSCache::{NSCache, NSCacheDelegate}; -pub use self::generated::NSCalendar::{ - NSCalendar, NSCalendarCalendarUnit, NSCalendarDayChangedNotification, NSCalendarIdentifier, - NSCalendarIdentifierBuddhist, NSCalendarIdentifierChinese, NSCalendarIdentifierCoptic, - NSCalendarIdentifierEthiopicAmeteAlem, NSCalendarIdentifierEthiopicAmeteMihret, - NSCalendarIdentifierGregorian, NSCalendarIdentifierHebrew, NSCalendarIdentifierISO8601, - NSCalendarIdentifierIndian, NSCalendarIdentifierIslamic, NSCalendarIdentifierIslamicCivil, - NSCalendarIdentifierIslamicTabular, NSCalendarIdentifierIslamicUmmAlQura, - NSCalendarIdentifierJapanese, NSCalendarIdentifierPersian, NSCalendarIdentifierRepublicOfChina, - NSCalendarMatchFirst, NSCalendarMatchLast, NSCalendarMatchNextTime, - NSCalendarMatchNextTimePreservingSmallerUnits, - NSCalendarMatchPreviousTimePreservingSmallerUnits, NSCalendarMatchStrictly, NSCalendarOptions, - NSCalendarSearchBackwards, NSCalendarUnit, NSCalendarUnitCalendar, NSCalendarUnitDay, - NSCalendarUnitEra, NSCalendarUnitHour, NSCalendarUnitMinute, NSCalendarUnitMonth, - NSCalendarUnitNanosecond, NSCalendarUnitQuarter, NSCalendarUnitSecond, NSCalendarUnitTimeZone, - NSCalendarUnitWeekOfMonth, NSCalendarUnitWeekOfYear, NSCalendarUnitWeekday, - NSCalendarUnitWeekdayOrdinal, NSCalendarUnitYear, NSCalendarUnitYearForWeekOfYear, - NSCalendarWrapComponents, NSDateComponentUndefined, NSDateComponents, NSDayCalendarUnit, - NSEraCalendarUnit, NSHourCalendarUnit, NSMinuteCalendarUnit, NSMonthCalendarUnit, - NSQuarterCalendarUnit, NSSecondCalendarUnit, NSTimeZoneCalendarUnit, NSUndefinedDateComponent, - NSWeekCalendarUnit, NSWeekOfMonthCalendarUnit, NSWeekOfYearCalendarUnit, NSWeekdayCalendarUnit, - NSWeekdayOrdinalCalendarUnit, NSYearCalendarUnit, NSYearForWeekOfYearCalendarUnit, -}; -pub use self::generated::NSCalendarDate::NSCalendarDate; -pub use self::generated::NSCharacterSet::{ - NSCharacterSet, NSMutableCharacterSet, NSOpenStepUnicodeReservedBase, -}; -pub use self::generated::NSClassDescription::{ - NSClassDescription, NSClassDescriptionNeededForClassNotification, -}; -pub use self::generated::NSCoder::{ - NSCoder, NSDecodingFailurePolicy, NSDecodingFailurePolicyRaiseException, - NSDecodingFailurePolicySetErrorAndReturn, -}; -pub use self::generated::NSComparisonPredicate::{ - NSAllPredicateModifier, NSAnyPredicateModifier, NSBeginsWithPredicateOperatorType, - NSBetweenPredicateOperatorType, NSCaseInsensitivePredicateOption, NSComparisonPredicate, - NSComparisonPredicateModifier, NSComparisonPredicateOptions, NSContainsPredicateOperatorType, - NSCustomSelectorPredicateOperatorType, NSDiacriticInsensitivePredicateOption, - NSDirectPredicateModifier, NSEndsWithPredicateOperatorType, NSEqualToPredicateOperatorType, - NSGreaterThanOrEqualToPredicateOperatorType, NSGreaterThanPredicateOperatorType, - NSInPredicateOperatorType, NSLessThanOrEqualToPredicateOperatorType, - NSLessThanPredicateOperatorType, NSLikePredicateOperatorType, NSMatchesPredicateOperatorType, - NSNormalizedPredicateOption, NSNotEqualToPredicateOperatorType, NSPredicateOperatorType, -}; -pub use self::generated::NSCompoundPredicate::{ - NSAndPredicateType, NSCompoundPredicate, NSCompoundPredicateType, NSNotPredicateType, - NSOrPredicateType, -}; -pub use self::generated::NSConnection::{ - NSConnection, NSConnectionDelegate, NSConnectionDidDieNotification, - NSConnectionDidInitializeNotification, NSConnectionReplyMode, NSDistantObjectRequest, - NSFailedAuthenticationException, -}; -pub use self::generated::NSData::{ - NSAtomicWrite, NSData, NSDataBase64DecodingIgnoreUnknownCharacters, - NSDataBase64DecodingOptions, NSDataBase64Encoding64CharacterLineLength, - NSDataBase64Encoding76CharacterLineLength, NSDataBase64EncodingEndLineWithCarriageReturn, - NSDataBase64EncodingEndLineWithLineFeed, NSDataBase64EncodingOptions, - NSDataCompressionAlgorithm, NSDataCompressionAlgorithmLZ4, NSDataCompressionAlgorithmLZFSE, - NSDataCompressionAlgorithmLZMA, NSDataCompressionAlgorithmZlib, NSDataReadingMapped, - NSDataReadingMappedAlways, NSDataReadingMappedIfSafe, NSDataReadingOptions, - NSDataReadingUncached, NSDataSearchAnchored, NSDataSearchBackwards, NSDataSearchOptions, - NSDataWritingAtomic, NSDataWritingFileProtectionComplete, - NSDataWritingFileProtectionCompleteUnlessOpen, - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication, - NSDataWritingFileProtectionMask, NSDataWritingFileProtectionNone, NSDataWritingOptions, - NSDataWritingWithoutOverwriting, NSMappedRead, NSMutableData, NSPurgeableData, NSUncachedRead, -}; -pub use self::generated::NSDate::{NSDate, NSSystemClockDidChangeNotification, NSTimeInterval}; -pub use self::generated::NSDateComponentsFormatter::{ - NSDateComponentsFormatter, NSDateComponentsFormatterUnitsStyle, - NSDateComponentsFormatterUnitsStyleAbbreviated, NSDateComponentsFormatterUnitsStyleBrief, - NSDateComponentsFormatterUnitsStyleFull, NSDateComponentsFormatterUnitsStylePositional, - NSDateComponentsFormatterUnitsStyleShort, NSDateComponentsFormatterUnitsStyleSpellOut, - NSDateComponentsFormatterZeroFormattingBehavior, - NSDateComponentsFormatterZeroFormattingBehaviorDefault, - NSDateComponentsFormatterZeroFormattingBehaviorDropAll, - NSDateComponentsFormatterZeroFormattingBehaviorDropLeading, - NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle, - NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing, - NSDateComponentsFormatterZeroFormattingBehaviorNone, - NSDateComponentsFormatterZeroFormattingBehaviorPad, -}; -pub use self::generated::NSDateFormatter::{ - NSDateFormatter, NSDateFormatterBehavior, NSDateFormatterBehavior10_0, - NSDateFormatterBehavior10_4, NSDateFormatterBehaviorDefault, NSDateFormatterFullStyle, - NSDateFormatterLongStyle, NSDateFormatterMediumStyle, NSDateFormatterNoStyle, - NSDateFormatterShortStyle, NSDateFormatterStyle, -}; -pub use self::generated::NSDateInterval::NSDateInterval; -pub use self::generated::NSDateIntervalFormatter::{ - NSDateIntervalFormatter, NSDateIntervalFormatterFullStyle, NSDateIntervalFormatterLongStyle, - NSDateIntervalFormatterMediumStyle, NSDateIntervalFormatterNoStyle, - NSDateIntervalFormatterShortStyle, NSDateIntervalFormatterStyle, -}; -pub use self::generated::NSDecimal::{ - NSCalculationDivideByZero, NSCalculationError, NSCalculationLossOfPrecision, - NSCalculationNoError, NSCalculationOverflow, NSCalculationUnderflow, NSRoundBankers, - NSRoundDown, NSRoundPlain, NSRoundUp, NSRoundingMode, -}; -pub use self::generated::NSDecimalNumber::{ - NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberDivideByZeroException, - NSDecimalNumberExactnessException, NSDecimalNumberHandler, NSDecimalNumberOverflowException, - NSDecimalNumberUnderflowException, -}; -pub use self::generated::NSDictionary::{NSDictionary, NSMutableDictionary}; -pub use self::generated::NSDistantObject::NSDistantObject; -pub use self::generated::NSDistributedLock::NSDistributedLock; -pub use self::generated::NSDistributedNotificationCenter::{ - NSDistributedNotificationCenter, NSDistributedNotificationCenterType, - NSDistributedNotificationDeliverImmediately, NSDistributedNotificationOptions, - NSDistributedNotificationPostToAllSessions, NSLocalNotificationCenterType, - NSNotificationDeliverImmediately, NSNotificationPostToAllSessions, - NSNotificationSuspensionBehavior, NSNotificationSuspensionBehaviorCoalesce, - NSNotificationSuspensionBehaviorDeliverImmediately, NSNotificationSuspensionBehaviorDrop, - NSNotificationSuspensionBehaviorHold, -}; -pub use self::generated::NSEnergyFormatter::{ - NSEnergyFormatter, NSEnergyFormatterUnit, NSEnergyFormatterUnitCalorie, - NSEnergyFormatterUnitJoule, NSEnergyFormatterUnitKilocalorie, NSEnergyFormatterUnitKilojoule, -}; -pub use self::generated::NSEnumerator::{NSEnumerator, NSFastEnumeration, NSFastEnumerationState}; -pub use self::generated::NSError::{ - NSCocoaErrorDomain, NSDebugDescriptionErrorKey, NSError, NSErrorDomain, NSErrorUserInfoKey, - NSFilePathErrorKey, NSHelpAnchorErrorKey, NSLocalizedDescriptionKey, - NSLocalizedFailureErrorKey, NSLocalizedFailureReasonErrorKey, - NSLocalizedRecoveryOptionsErrorKey, NSLocalizedRecoverySuggestionErrorKey, NSMachErrorDomain, - NSMultipleUnderlyingErrorsKey, NSOSStatusErrorDomain, NSPOSIXErrorDomain, - NSRecoveryAttempterErrorKey, NSStringEncodingErrorKey, NSURLErrorKey, NSUnderlyingErrorKey, -}; -pub use self::generated::NSException::{ - NSAssertionHandler, NSAssertionHandlerKey, NSDestinationInvalidException, NSException, - NSGenericException, NSInconsistentArchiveException, NSInternalInconsistencyException, - NSInvalidArgumentException, NSInvalidReceivePortException, NSInvalidSendPortException, - NSMallocException, NSObjectInaccessibleException, NSObjectNotAvailableException, - NSOldStyleException, NSPortReceiveException, NSPortSendException, NSPortTimeoutException, - NSRangeException, NSUncaughtExceptionHandler, -}; -pub use self::generated::NSExpression::{ - NSAggregateExpressionType, NSAnyKeyExpressionType, NSBlockExpressionType, - NSConditionalExpressionType, NSConstantValueExpressionType, NSEvaluatedObjectExpressionType, - NSExpression, NSExpressionType, NSFunctionExpressionType, NSIntersectSetExpressionType, - NSKeyPathExpressionType, NSMinusSetExpressionType, NSSubqueryExpressionType, - NSUnionSetExpressionType, NSVariableExpressionType, -}; -pub use self::generated::NSExtensionContext::{ - NSExtensionContext, NSExtensionHostDidBecomeActiveNotification, - NSExtensionHostDidEnterBackgroundNotification, NSExtensionHostWillEnterForegroundNotification, - NSExtensionHostWillResignActiveNotification, NSExtensionItemsAndErrorsKey, -}; -pub use self::generated::NSExtensionItem::{ - NSExtensionItem, NSExtensionItemAttachmentsKey, NSExtensionItemAttributedContentTextKey, - NSExtensionItemAttributedTitleKey, -}; -pub use self::generated::NSExtensionRequestHandling::NSExtensionRequestHandling; -pub use self::generated::NSFileCoordinator::{ - NSFileAccessIntent, NSFileCoordinator, NSFileCoordinatorReadingForUploading, - NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorReadingOptions, - NSFileCoordinatorReadingResolvesSymbolicLink, NSFileCoordinatorReadingWithoutChanges, - NSFileCoordinatorWritingContentIndependentMetadataOnly, NSFileCoordinatorWritingForDeleting, - NSFileCoordinatorWritingForMerging, NSFileCoordinatorWritingForMoving, - NSFileCoordinatorWritingForReplacing, NSFileCoordinatorWritingOptions, -}; -pub use self::generated::NSFileHandle::{ - NSFileHandle, NSFileHandleConnectionAcceptedNotification, - NSFileHandleDataAvailableNotification, NSFileHandleNotificationDataItem, - NSFileHandleNotificationFileHandleItem, NSFileHandleNotificationMonitorModes, - NSFileHandleOperationException, NSFileHandleReadCompletionNotification, - NSFileHandleReadToEndOfFileCompletionNotification, NSPipe, -}; -pub use self::generated::NSFileManager::{ - NSDirectoryEnumerationIncludesDirectoriesPostOrder, NSDirectoryEnumerationOptions, - NSDirectoryEnumerationProducesRelativePathURLs, NSDirectoryEnumerationSkipsHiddenFiles, - NSDirectoryEnumerationSkipsPackageDescendants, - NSDirectoryEnumerationSkipsSubdirectoryDescendants, NSDirectoryEnumerator, NSFileAppendOnly, - NSFileAttributeKey, NSFileAttributeType, NSFileBusy, NSFileCreationDate, - NSFileDeviceIdentifier, NSFileExtensionHidden, NSFileGroupOwnerAccountID, - NSFileGroupOwnerAccountName, NSFileHFSCreatorCode, NSFileHFSTypeCode, NSFileImmutable, - NSFileManager, NSFileManagerDelegate, NSFileManagerItemReplacementOptions, - NSFileManagerItemReplacementUsingNewMetadataOnly, - NSFileManagerItemReplacementWithoutDeletingBackupItem, - NSFileManagerUnmountAllPartitionsAndEjectDisk, - NSFileManagerUnmountDissentingProcessIdentifierErrorKey, NSFileManagerUnmountOptions, - NSFileManagerUnmountWithoutUI, NSFileModificationDate, NSFileOwnerAccountID, - NSFileOwnerAccountName, NSFilePosixPermissions, NSFileProtectionComplete, - NSFileProtectionCompleteUnlessOpen, NSFileProtectionCompleteUntilFirstUserAuthentication, - NSFileProtectionKey, NSFileProtectionNone, NSFileProtectionType, NSFileProviderService, - NSFileProviderServiceName, NSFileReferenceCount, NSFileSize, NSFileSystemFileNumber, - NSFileSystemFreeNodes, NSFileSystemFreeSize, NSFileSystemNodes, NSFileSystemNumber, - NSFileSystemSize, NSFileType, NSFileTypeBlockSpecial, NSFileTypeCharacterSpecial, - NSFileTypeDirectory, NSFileTypeRegular, NSFileTypeSocket, NSFileTypeSymbolicLink, - NSFileTypeUnknown, NSURLRelationship, NSURLRelationshipContains, NSURLRelationshipOther, - NSURLRelationshipSame, NSUbiquityIdentityDidChangeNotification, NSVolumeEnumerationOptions, - NSVolumeEnumerationProduceFileReferenceURLs, NSVolumeEnumerationSkipHiddenVolumes, -}; -pub use self::generated::NSFilePresenter::NSFilePresenter; -pub use self::generated::NSFileVersion::{ - NSFileVersion, NSFileVersionAddingByMoving, NSFileVersionAddingOptions, - NSFileVersionReplacingByMoving, NSFileVersionReplacingOptions, -}; -pub use self::generated::NSFileWrapper::{ - NSFileWrapper, NSFileWrapperReadingImmediate, NSFileWrapperReadingOptions, - NSFileWrapperReadingWithoutMapping, NSFileWrapperWritingAtomic, NSFileWrapperWritingOptions, - NSFileWrapperWritingWithNameUpdating, -}; -pub use self::generated::NSFormatter::{ - NSFormatter, NSFormattingContext, NSFormattingContextBeginningOfSentence, - NSFormattingContextDynamic, NSFormattingContextListItem, NSFormattingContextMiddleOfSentence, - NSFormattingContextStandalone, NSFormattingContextUnknown, NSFormattingUnitStyle, - NSFormattingUnitStyleLong, NSFormattingUnitStyleMedium, NSFormattingUnitStyleShort, -}; -pub use self::generated::NSGarbageCollector::NSGarbageCollector; -pub use self::generated::NSGeometry::{ - NSAlignAllEdgesInward, NSAlignAllEdgesNearest, NSAlignAllEdgesOutward, NSAlignHeightInward, - NSAlignHeightNearest, NSAlignHeightOutward, NSAlignMaxXInward, NSAlignMaxXNearest, - NSAlignMaxXOutward, NSAlignMaxYInward, NSAlignMaxYNearest, NSAlignMaxYOutward, - NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, - NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, - NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsets, NSEdgeInsetsZero, - NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSPointArray, NSPointPointer, NSRect, - NSRectArray, NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, - NSRectPointer, NSSize, NSSizeArray, NSSizePointer, NSZeroPoint, NSZeroRect, NSZeroSize, -}; -pub use self::generated::NSHTTPCookie::{ - NSHTTPCookie, NSHTTPCookieComment, NSHTTPCookieCommentURL, NSHTTPCookieDiscard, - NSHTTPCookieDomain, NSHTTPCookieExpires, NSHTTPCookieMaximumAge, NSHTTPCookieName, - NSHTTPCookieOriginURL, NSHTTPCookiePath, NSHTTPCookiePort, NSHTTPCookiePropertyKey, - NSHTTPCookieSameSiteLax, NSHTTPCookieSameSitePolicy, NSHTTPCookieSameSiteStrict, - NSHTTPCookieSecure, NSHTTPCookieStringPolicy, NSHTTPCookieValue, NSHTTPCookieVersion, -}; -pub use self::generated::NSHTTPCookieStorage::{ - NSHTTPCookieAcceptPolicy, NSHTTPCookieAcceptPolicyAlways, NSHTTPCookieAcceptPolicyNever, - NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, - NSHTTPCookieManagerAcceptPolicyChangedNotification, - NSHTTPCookieManagerCookiesChangedNotification, NSHTTPCookieStorage, -}; -pub use self::generated::NSHashTable::{ - NSHashEnumerator, NSHashTable, NSHashTableCallBacks, NSHashTableCopyIn, - NSHashTableObjectPointerPersonality, NSHashTableOptions, NSHashTableStrongMemory, - NSHashTableWeakMemory, NSHashTableZeroingWeakMemory, NSIntHashCallBacks, - NSIntegerHashCallBacks, NSNonOwnedPointerHashCallBacks, NSNonRetainedObjectHashCallBacks, - NSObjectHashCallBacks, NSOwnedObjectIdentityHashCallBacks, NSOwnedPointerHashCallBacks, - NSPointerToStructHashCallBacks, -}; -pub use self::generated::NSHost::NSHost; -pub use self::generated::NSISO8601DateFormatter::{ - NSISO8601DateFormatOptions, NSISO8601DateFormatWithColonSeparatorInTime, - NSISO8601DateFormatWithColonSeparatorInTimeZone, NSISO8601DateFormatWithDashSeparatorInDate, - NSISO8601DateFormatWithDay, NSISO8601DateFormatWithFractionalSeconds, - NSISO8601DateFormatWithFullDate, NSISO8601DateFormatWithFullTime, - NSISO8601DateFormatWithInternetDateTime, NSISO8601DateFormatWithMonth, - NSISO8601DateFormatWithSpaceBetweenDateAndTime, NSISO8601DateFormatWithTime, - NSISO8601DateFormatWithTimeZone, NSISO8601DateFormatWithWeekOfYear, - NSISO8601DateFormatWithYear, NSISO8601DateFormatter, -}; -pub use self::generated::NSIndexPath::NSIndexPath; -pub use self::generated::NSIndexSet::{NSIndexSet, NSMutableIndexSet}; -pub use self::generated::NSInflectionRule::{NSInflectionRule, NSInflectionRuleExplicit}; -pub use self::generated::NSInvocation::NSInvocation; -pub use self::generated::NSItemProvider::{ - NSExtensionJavaScriptFinalizeArgumentKey, NSExtensionJavaScriptPreprocessingResultsKey, - NSItemProvider, NSItemProviderCompletionHandler, NSItemProviderErrorCode, - NSItemProviderErrorDomain, NSItemProviderFileOptionOpenInPlace, NSItemProviderFileOptions, - NSItemProviderItemUnavailableError, NSItemProviderLoadHandler, - NSItemProviderPreferredImageSizeKey, NSItemProviderReading, - NSItemProviderRepresentationVisibility, NSItemProviderRepresentationVisibilityAll, - NSItemProviderRepresentationVisibilityGroup, NSItemProviderRepresentationVisibilityOwnProcess, - NSItemProviderRepresentationVisibilityTeam, NSItemProviderUnavailableCoercionError, - NSItemProviderUnexpectedValueClassError, NSItemProviderUnknownError, NSItemProviderWriting, -}; -pub use self::generated::NSJSONSerialization::{ - NSJSONReadingAllowFragments, NSJSONReadingFragmentsAllowed, NSJSONReadingJSON5Allowed, - NSJSONReadingMutableContainers, NSJSONReadingMutableLeaves, NSJSONReadingOptions, - NSJSONReadingTopLevelDictionaryAssumed, NSJSONSerialization, NSJSONWritingFragmentsAllowed, - NSJSONWritingOptions, NSJSONWritingPrettyPrinted, NSJSONWritingSortedKeys, - NSJSONWritingWithoutEscapingSlashes, -}; -pub use self::generated::NSKeyValueCoding::{ - NSAverageKeyValueOperator, NSCountKeyValueOperator, NSDistinctUnionOfArraysKeyValueOperator, - NSDistinctUnionOfObjectsKeyValueOperator, NSDistinctUnionOfSetsKeyValueOperator, - NSKeyValueOperator, NSMaximumKeyValueOperator, NSMinimumKeyValueOperator, - NSSumKeyValueOperator, NSUndefinedKeyException, NSUnionOfArraysKeyValueOperator, - NSUnionOfObjectsKeyValueOperator, NSUnionOfSetsKeyValueOperator, -}; -pub use self::generated::NSKeyValueObserving::{ - NSKeyValueChange, NSKeyValueChangeIndexesKey, NSKeyValueChangeInsertion, NSKeyValueChangeKey, - NSKeyValueChangeKindKey, NSKeyValueChangeNewKey, NSKeyValueChangeNotificationIsPriorKey, - NSKeyValueChangeOldKey, NSKeyValueChangeRemoval, NSKeyValueChangeReplacement, - NSKeyValueChangeSetting, NSKeyValueIntersectSetMutation, NSKeyValueMinusSetMutation, - NSKeyValueObservingOptionInitial, NSKeyValueObservingOptionNew, NSKeyValueObservingOptionOld, - NSKeyValueObservingOptionPrior, NSKeyValueObservingOptions, NSKeyValueSetMutationKind, - NSKeyValueSetSetMutation, NSKeyValueUnionSetMutation, -}; -pub use self::generated::NSKeyedArchiver::{ - NSInvalidArchiveOperationException, NSInvalidUnarchiveOperationException, - NSKeyedArchiveRootObjectKey, NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, - NSKeyedUnarchiverDelegate, -}; -pub use self::generated::NSLengthFormatter::{ - NSLengthFormatter, NSLengthFormatterUnit, NSLengthFormatterUnitCentimeter, - NSLengthFormatterUnitFoot, NSLengthFormatterUnitInch, NSLengthFormatterUnitKilometer, - NSLengthFormatterUnitMeter, NSLengthFormatterUnitMile, NSLengthFormatterUnitMillimeter, - NSLengthFormatterUnitYard, -}; -pub use self::generated::NSLinguisticTagger::{ - NSLinguisticTag, NSLinguisticTagAdjective, NSLinguisticTagAdverb, NSLinguisticTagClassifier, - NSLinguisticTagCloseParenthesis, NSLinguisticTagCloseQuote, NSLinguisticTagConjunction, - NSLinguisticTagDash, NSLinguisticTagDeterminer, NSLinguisticTagIdiom, - NSLinguisticTagInterjection, NSLinguisticTagNoun, NSLinguisticTagNumber, - NSLinguisticTagOpenParenthesis, NSLinguisticTagOpenQuote, NSLinguisticTagOrganizationName, - NSLinguisticTagOther, NSLinguisticTagOtherPunctuation, NSLinguisticTagOtherWhitespace, - NSLinguisticTagOtherWord, NSLinguisticTagParagraphBreak, NSLinguisticTagParticle, - NSLinguisticTagPersonalName, NSLinguisticTagPlaceName, NSLinguisticTagPreposition, - NSLinguisticTagPronoun, NSLinguisticTagPunctuation, NSLinguisticTagScheme, - NSLinguisticTagSchemeLanguage, NSLinguisticTagSchemeLemma, NSLinguisticTagSchemeLexicalClass, - NSLinguisticTagSchemeNameType, NSLinguisticTagSchemeNameTypeOrLexicalClass, - NSLinguisticTagSchemeScript, NSLinguisticTagSchemeTokenType, NSLinguisticTagSentenceTerminator, - NSLinguisticTagVerb, NSLinguisticTagWhitespace, NSLinguisticTagWord, NSLinguisticTagWordJoiner, - NSLinguisticTagger, NSLinguisticTaggerJoinNames, NSLinguisticTaggerOmitOther, - NSLinguisticTaggerOmitPunctuation, NSLinguisticTaggerOmitWhitespace, - NSLinguisticTaggerOmitWords, NSLinguisticTaggerOptions, NSLinguisticTaggerUnit, - NSLinguisticTaggerUnitDocument, NSLinguisticTaggerUnitParagraph, - NSLinguisticTaggerUnitSentence, NSLinguisticTaggerUnitWord, -}; -pub use self::generated::NSListFormatter::NSListFormatter; -pub use self::generated::NSLocale::{ - NSBuddhistCalendar, NSChineseCalendar, NSCurrentLocaleDidChangeNotification, - NSGregorianCalendar, NSHebrewCalendar, NSISO8601Calendar, NSIndianCalendar, NSIslamicCalendar, - NSIslamicCivilCalendar, NSJapaneseCalendar, NSLocale, - NSLocaleAlternateQuotationBeginDelimiterKey, NSLocaleAlternateQuotationEndDelimiterKey, - NSLocaleCalendar, NSLocaleCollationIdentifier, NSLocaleCollatorIdentifier, NSLocaleCountryCode, - NSLocaleCurrencyCode, NSLocaleCurrencySymbol, NSLocaleDecimalSeparator, - NSLocaleExemplarCharacterSet, NSLocaleGroupingSeparator, NSLocaleIdentifier, NSLocaleKey, - NSLocaleLanguageCode, NSLocaleLanguageDirection, NSLocaleLanguageDirectionBottomToTop, - NSLocaleLanguageDirectionLeftToRight, NSLocaleLanguageDirectionRightToLeft, - NSLocaleLanguageDirectionTopToBottom, NSLocaleLanguageDirectionUnknown, - NSLocaleMeasurementSystem, NSLocaleQuotationBeginDelimiterKey, - NSLocaleQuotationEndDelimiterKey, NSLocaleScriptCode, NSLocaleUsesMetricSystem, - NSLocaleVariantCode, NSPersianCalendar, NSRepublicOfChinaCalendar, -}; -pub use self::generated::NSLock::{ - NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock, -}; -pub use self::generated::NSMapTable::{ - NSIntMapKeyCallBacks, NSIntMapValueCallBacks, NSIntegerMapKeyCallBacks, - NSIntegerMapValueCallBacks, NSMapEnumerator, NSMapTable, NSMapTableCopyIn, - NSMapTableKeyCallBacks, NSMapTableObjectPointerPersonality, NSMapTableOptions, - NSMapTableStrongMemory, NSMapTableValueCallBacks, NSMapTableWeakMemory, - NSMapTableZeroingWeakMemory, NSNonOwnedPointerMapKeyCallBacks, - NSNonOwnedPointerMapValueCallBacks, NSNonOwnedPointerOrNullMapKeyCallBacks, - NSNonRetainedObjectMapKeyCallBacks, NSNonRetainedObjectMapValueCallBacks, - NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, NSOwnedPointerMapKeyCallBacks, - NSOwnedPointerMapValueCallBacks, -}; -pub use self::generated::NSMassFormatter::{ - NSMassFormatter, NSMassFormatterUnit, NSMassFormatterUnitGram, NSMassFormatterUnitKilogram, - NSMassFormatterUnitOunce, NSMassFormatterUnitPound, NSMassFormatterUnitStone, -}; -pub use self::generated::NSMeasurement::NSMeasurement; -pub use self::generated::NSMeasurementFormatter::{ - NSMeasurementFormatter, NSMeasurementFormatterUnitOptions, - NSMeasurementFormatterUnitOptionsNaturalScale, NSMeasurementFormatterUnitOptionsProvidedUnit, - NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit, -}; -pub use self::generated::NSMetadata::{ - NSMetadataItem, NSMetadataQuery, NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope, - NSMetadataQueryAttributeValueTuple, NSMetadataQueryDelegate, - NSMetadataQueryDidFinishGatheringNotification, NSMetadataQueryDidStartGatheringNotification, - NSMetadataQueryDidUpdateNotification, NSMetadataQueryGatheringProgressNotification, - NSMetadataQueryIndexedLocalComputerScope, NSMetadataQueryIndexedNetworkScope, - NSMetadataQueryLocalComputerScope, NSMetadataQueryNetworkScope, - NSMetadataQueryResultContentRelevanceAttribute, NSMetadataQueryResultGroup, - NSMetadataQueryUbiquitousDataScope, NSMetadataQueryUbiquitousDocumentsScope, - NSMetadataQueryUpdateAddedItemsKey, NSMetadataQueryUpdateChangedItemsKey, - NSMetadataQueryUpdateRemovedItemsKey, NSMetadataQueryUserHomeScope, -}; -pub use self::generated::NSMetadataAttributes::{ - NSMetadataItemAcquisitionMakeKey, NSMetadataItemAcquisitionModelKey, NSMetadataItemAlbumKey, - NSMetadataItemAltitudeKey, NSMetadataItemApertureKey, NSMetadataItemAppleLoopDescriptorsKey, - NSMetadataItemAppleLoopsKeyFilterTypeKey, NSMetadataItemAppleLoopsLoopModeKey, - NSMetadataItemAppleLoopsRootKeyKey, NSMetadataItemApplicationCategoriesKey, - NSMetadataItemAttributeChangeDateKey, NSMetadataItemAudiencesKey, - NSMetadataItemAudioBitRateKey, NSMetadataItemAudioChannelCountKey, - NSMetadataItemAudioEncodingApplicationKey, NSMetadataItemAudioSampleRateKey, - NSMetadataItemAudioTrackNumberKey, NSMetadataItemAuthorAddressesKey, - NSMetadataItemAuthorEmailAddressesKey, NSMetadataItemAuthorsKey, - NSMetadataItemBitsPerSampleKey, NSMetadataItemCFBundleIdentifierKey, - NSMetadataItemCameraOwnerKey, NSMetadataItemCityKey, NSMetadataItemCodecsKey, - NSMetadataItemColorSpaceKey, NSMetadataItemCommentKey, NSMetadataItemComposerKey, - NSMetadataItemContactKeywordsKey, NSMetadataItemContentCreationDateKey, - NSMetadataItemContentModificationDateKey, NSMetadataItemContentTypeKey, - NSMetadataItemContentTypeTreeKey, NSMetadataItemContributorsKey, NSMetadataItemCopyrightKey, - NSMetadataItemCountryKey, NSMetadataItemCoverageKey, NSMetadataItemCreatorKey, - NSMetadataItemDateAddedKey, NSMetadataItemDeliveryTypeKey, NSMetadataItemDescriptionKey, - NSMetadataItemDirectorKey, NSMetadataItemDisplayNameKey, NSMetadataItemDownloadedDateKey, - NSMetadataItemDueDateKey, NSMetadataItemDurationSecondsKey, NSMetadataItemEXIFGPSVersionKey, - NSMetadataItemEXIFVersionKey, NSMetadataItemEditorsKey, NSMetadataItemEmailAddressesKey, - NSMetadataItemEncodingApplicationsKey, NSMetadataItemExecutableArchitecturesKey, - NSMetadataItemExecutablePlatformKey, NSMetadataItemExposureModeKey, - NSMetadataItemExposureProgramKey, NSMetadataItemExposureTimeSecondsKey, - NSMetadataItemExposureTimeStringKey, NSMetadataItemFNumberKey, - NSMetadataItemFSContentChangeDateKey, NSMetadataItemFSCreationDateKey, NSMetadataItemFSNameKey, - NSMetadataItemFSSizeKey, NSMetadataItemFinderCommentKey, NSMetadataItemFlashOnOffKey, - NSMetadataItemFocalLength35mmKey, NSMetadataItemFocalLengthKey, NSMetadataItemFontsKey, - NSMetadataItemGPSAreaInformationKey, NSMetadataItemGPSDOPKey, NSMetadataItemGPSDateStampKey, - NSMetadataItemGPSDestBearingKey, NSMetadataItemGPSDestDistanceKey, - NSMetadataItemGPSDestLatitudeKey, NSMetadataItemGPSDestLongitudeKey, - NSMetadataItemGPSDifferentalKey, NSMetadataItemGPSMapDatumKey, NSMetadataItemGPSMeasureModeKey, - NSMetadataItemGPSProcessingMethodKey, NSMetadataItemGPSStatusKey, NSMetadataItemGPSTrackKey, - NSMetadataItemGenreKey, NSMetadataItemHasAlphaChannelKey, NSMetadataItemHeadlineKey, - NSMetadataItemISOSpeedKey, NSMetadataItemIdentifierKey, NSMetadataItemImageDirectionKey, - NSMetadataItemInformationKey, NSMetadataItemInstantMessageAddressesKey, - NSMetadataItemInstructionsKey, NSMetadataItemIsApplicationManagedKey, - NSMetadataItemIsGeneralMIDISequenceKey, NSMetadataItemIsLikelyJunkKey, - NSMetadataItemIsUbiquitousKey, NSMetadataItemKeySignatureKey, NSMetadataItemKeywordsKey, - NSMetadataItemKindKey, NSMetadataItemLanguagesKey, NSMetadataItemLastUsedDateKey, - NSMetadataItemLatitudeKey, NSMetadataItemLayerNamesKey, NSMetadataItemLensModelKey, - NSMetadataItemLongitudeKey, NSMetadataItemLyricistKey, NSMetadataItemMaxApertureKey, - NSMetadataItemMediaTypesKey, NSMetadataItemMeteringModeKey, NSMetadataItemMusicalGenreKey, - NSMetadataItemMusicalInstrumentCategoryKey, NSMetadataItemMusicalInstrumentNameKey, - NSMetadataItemNamedLocationKey, NSMetadataItemNumberOfPagesKey, NSMetadataItemOrganizationsKey, - NSMetadataItemOrientationKey, NSMetadataItemOriginalFormatKey, NSMetadataItemOriginalSourceKey, - NSMetadataItemPageHeightKey, NSMetadataItemPageWidthKey, NSMetadataItemParticipantsKey, - NSMetadataItemPathKey, NSMetadataItemPerformersKey, NSMetadataItemPhoneNumbersKey, - NSMetadataItemPixelCountKey, NSMetadataItemPixelHeightKey, NSMetadataItemPixelWidthKey, - NSMetadataItemProducerKey, NSMetadataItemProfileNameKey, NSMetadataItemProjectsKey, - NSMetadataItemPublishersKey, NSMetadataItemRecipientAddressesKey, - NSMetadataItemRecipientEmailAddressesKey, NSMetadataItemRecipientsKey, - NSMetadataItemRecordingDateKey, NSMetadataItemRecordingYearKey, NSMetadataItemRedEyeOnOffKey, - NSMetadataItemResolutionHeightDPIKey, NSMetadataItemResolutionWidthDPIKey, - NSMetadataItemRightsKey, NSMetadataItemSecurityMethodKey, NSMetadataItemSpeedKey, - NSMetadataItemStarRatingKey, NSMetadataItemStateOrProvinceKey, NSMetadataItemStreamableKey, - NSMetadataItemSubjectKey, NSMetadataItemTempoKey, NSMetadataItemTextContentKey, - NSMetadataItemThemeKey, NSMetadataItemTimeSignatureKey, NSMetadataItemTimestampKey, - NSMetadataItemTitleKey, NSMetadataItemTotalBitRateKey, NSMetadataItemURLKey, - NSMetadataItemVersionKey, NSMetadataItemVideoBitRateKey, NSMetadataItemWhereFromsKey, - NSMetadataItemWhiteBalanceKey, NSMetadataUbiquitousItemContainerDisplayNameKey, - NSMetadataUbiquitousItemDownloadRequestedKey, NSMetadataUbiquitousItemDownloadingErrorKey, - NSMetadataUbiquitousItemDownloadingStatusCurrent, - NSMetadataUbiquitousItemDownloadingStatusDownloaded, - NSMetadataUbiquitousItemDownloadingStatusKey, - NSMetadataUbiquitousItemDownloadingStatusNotDownloaded, - NSMetadataUbiquitousItemHasUnresolvedConflictsKey, NSMetadataUbiquitousItemIsDownloadedKey, - NSMetadataUbiquitousItemIsDownloadingKey, NSMetadataUbiquitousItemIsExternalDocumentKey, - NSMetadataUbiquitousItemIsSharedKey, NSMetadataUbiquitousItemIsUploadedKey, - NSMetadataUbiquitousItemIsUploadingKey, NSMetadataUbiquitousItemPercentDownloadedKey, - NSMetadataUbiquitousItemPercentUploadedKey, NSMetadataUbiquitousItemURLInLocalContainerKey, - NSMetadataUbiquitousItemUploadingErrorKey, - NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey, - NSMetadataUbiquitousSharedItemCurrentUserRoleKey, - NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey, - NSMetadataUbiquitousSharedItemOwnerNameComponentsKey, - NSMetadataUbiquitousSharedItemPermissionsReadOnly, - NSMetadataUbiquitousSharedItemPermissionsReadWrite, NSMetadataUbiquitousSharedItemRoleOwner, - NSMetadataUbiquitousSharedItemRoleParticipant, -}; -pub use self::generated::NSMethodSignature::NSMethodSignature; -pub use self::generated::NSMorphology::{ - NSGrammaticalGender, NSGrammaticalGenderFeminine, NSGrammaticalGenderMasculine, - NSGrammaticalGenderNeuter, NSGrammaticalGenderNotSet, NSGrammaticalNumber, - NSGrammaticalNumberNotSet, NSGrammaticalNumberPlural, NSGrammaticalNumberPluralFew, - NSGrammaticalNumberPluralMany, NSGrammaticalNumberPluralTwo, NSGrammaticalNumberSingular, - NSGrammaticalNumberZero, NSGrammaticalPartOfSpeech, NSGrammaticalPartOfSpeechAbbreviation, - NSGrammaticalPartOfSpeechAdjective, NSGrammaticalPartOfSpeechAdposition, - NSGrammaticalPartOfSpeechAdverb, NSGrammaticalPartOfSpeechConjunction, - NSGrammaticalPartOfSpeechDeterminer, NSGrammaticalPartOfSpeechInterjection, - NSGrammaticalPartOfSpeechLetter, NSGrammaticalPartOfSpeechNotSet, - NSGrammaticalPartOfSpeechNoun, NSGrammaticalPartOfSpeechNumeral, - NSGrammaticalPartOfSpeechParticle, NSGrammaticalPartOfSpeechPreposition, - NSGrammaticalPartOfSpeechPronoun, NSGrammaticalPartOfSpeechVerb, NSMorphology, - NSMorphologyCustomPronoun, -}; -pub use self::generated::NSNetServices::{ - NSNetService, NSNetServiceBrowser, NSNetServiceBrowserDelegate, NSNetServiceDelegate, - NSNetServiceListenForConnections, NSNetServiceNoAutoRename, NSNetServiceOptions, - NSNetServicesActivityInProgress, NSNetServicesBadArgumentError, NSNetServicesCancelledError, - NSNetServicesCollisionError, NSNetServicesError, NSNetServicesErrorCode, - NSNetServicesErrorDomain, NSNetServicesInvalidError, - NSNetServicesMissingRequiredConfigurationError, NSNetServicesNotFoundError, - NSNetServicesTimeoutError, NSNetServicesUnknownError, -}; -pub use self::generated::NSNotification::{ - NSNotification, NSNotificationCenter, NSNotificationName, -}; -pub use self::generated::NSNotificationQueue::{ - NSNotificationCoalescing, NSNotificationCoalescingOnName, NSNotificationCoalescingOnSender, - NSNotificationNoCoalescing, NSNotificationQueue, NSPostASAP, NSPostNow, NSPostWhenIdle, - NSPostingStyle, -}; -pub use self::generated::NSNull::NSNull; -pub use self::generated::NSNumberFormatter::{ - NSNumberFormatter, NSNumberFormatterBehavior, NSNumberFormatterBehavior10_0, - NSNumberFormatterBehavior10_4, NSNumberFormatterBehaviorDefault, - NSNumberFormatterCurrencyAccountingStyle, NSNumberFormatterCurrencyISOCodeStyle, - NSNumberFormatterCurrencyPluralStyle, NSNumberFormatterCurrencyStyle, - NSNumberFormatterDecimalStyle, NSNumberFormatterNoStyle, NSNumberFormatterOrdinalStyle, - NSNumberFormatterPadAfterPrefix, NSNumberFormatterPadAfterSuffix, - NSNumberFormatterPadBeforePrefix, NSNumberFormatterPadBeforeSuffix, - NSNumberFormatterPadPosition, NSNumberFormatterPercentStyle, NSNumberFormatterRoundCeiling, - NSNumberFormatterRoundDown, NSNumberFormatterRoundFloor, NSNumberFormatterRoundHalfDown, - NSNumberFormatterRoundHalfEven, NSNumberFormatterRoundHalfUp, NSNumberFormatterRoundUp, - NSNumberFormatterRoundingMode, NSNumberFormatterScientificStyle, - NSNumberFormatterSpellOutStyle, NSNumberFormatterStyle, -}; -pub use self::generated::NSObjCRuntime::{ - NSComparator, NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, - NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, NSOrderedAscending, - NSOrderedDescending, NSOrderedSame, NSQualityOfService, NSQualityOfServiceBackground, - NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, - NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, NSSortOptions, NSSortStable, -}; -pub use self::generated::NSObject::{ - NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, -}; -pub use self::generated::NSOperation::{ - NSBlockOperation, NSInvocationOperation, NSInvocationOperationCancelledException, - NSInvocationOperationVoidResultException, NSOperation, NSOperationQueue, - NSOperationQueueDefaultMaxConcurrentOperationCount, NSOperationQueuePriority, - NSOperationQueuePriorityHigh, NSOperationQueuePriorityLow, NSOperationQueuePriorityNormal, - NSOperationQueuePriorityVeryHigh, NSOperationQueuePriorityVeryLow, -}; -pub use self::generated::NSOrderedCollectionChange::{ - NSCollectionChangeInsert, NSCollectionChangeRemove, NSCollectionChangeType, - NSOrderedCollectionChange, -}; -pub use self::generated::NSOrderedCollectionDifference::{ - NSOrderedCollectionDifference, NSOrderedCollectionDifferenceCalculationInferMoves, - NSOrderedCollectionDifferenceCalculationOmitInsertedObjects, - NSOrderedCollectionDifferenceCalculationOmitRemovedObjects, - NSOrderedCollectionDifferenceCalculationOptions, -}; -pub use self::generated::NSOrderedSet::{NSMutableOrderedSet, NSOrderedSet}; -pub use self::generated::NSOrthography::NSOrthography; -pub use self::generated::NSPathUtilities::{ - NSAdminApplicationDirectory, NSAllApplicationsDirectory, NSAllDomainsMask, - NSAllLibrariesDirectory, NSApplicationDirectory, NSApplicationScriptsDirectory, - NSApplicationSupportDirectory, NSAutosavedInformationDirectory, NSCachesDirectory, - NSCoreServiceDirectory, NSDemoApplicationDirectory, NSDesktopDirectory, - NSDeveloperApplicationDirectory, NSDeveloperDirectory, NSDocumentDirectory, - NSDocumentationDirectory, NSDownloadsDirectory, NSInputMethodsDirectory, - NSItemReplacementDirectory, NSLibraryDirectory, NSLocalDomainMask, NSMoviesDirectory, - NSMusicDirectory, NSNetworkDomainMask, NSPicturesDirectory, NSPreferencePanesDirectory, - NSPrinterDescriptionDirectory, NSSearchPathDirectory, NSSearchPathDomainMask, - NSSharedPublicDirectory, NSSystemDomainMask, NSTrashDirectory, NSUserDirectory, - NSUserDomainMask, -}; -pub use self::generated::NSPersonNameComponents::NSPersonNameComponents; -pub use self::generated::NSPersonNameComponentsFormatter::{ - NSPersonNameComponentDelimiter, NSPersonNameComponentFamilyName, - NSPersonNameComponentGivenName, NSPersonNameComponentKey, NSPersonNameComponentMiddleName, - NSPersonNameComponentNickname, NSPersonNameComponentPrefix, NSPersonNameComponentSuffix, - NSPersonNameComponentsFormatter, NSPersonNameComponentsFormatterOptions, - NSPersonNameComponentsFormatterPhonetic, NSPersonNameComponentsFormatterStyle, - NSPersonNameComponentsFormatterStyleAbbreviated, NSPersonNameComponentsFormatterStyleDefault, - NSPersonNameComponentsFormatterStyleLong, NSPersonNameComponentsFormatterStyleMedium, - NSPersonNameComponentsFormatterStyleShort, -}; -pub use self::generated::NSPointerArray::NSPointerArray; -pub use self::generated::NSPointerFunctions::{ - NSPointerFunctions, NSPointerFunctionsCStringPersonality, NSPointerFunctionsCopyIn, - NSPointerFunctionsIntegerPersonality, NSPointerFunctionsMachVirtualMemory, - NSPointerFunctionsMallocMemory, NSPointerFunctionsObjectPersonality, - NSPointerFunctionsObjectPointerPersonality, NSPointerFunctionsOpaqueMemory, - NSPointerFunctionsOpaquePersonality, NSPointerFunctionsOptions, NSPointerFunctionsStrongMemory, - NSPointerFunctionsStructPersonality, NSPointerFunctionsWeakMemory, - NSPointerFunctionsZeroingWeakMemory, -}; -pub use self::generated::NSPort::{ - NSMachPort, NSMachPortDeallocateNone, NSMachPortDeallocateReceiveRight, - NSMachPortDeallocateSendRight, NSMachPortDelegate, NSMachPortOptions, NSMessagePort, NSPort, - NSPortDelegate, NSPortDidBecomeInvalidNotification, NSSocketNativeHandle, NSSocketPort, -}; -pub use self::generated::NSPortCoder::NSPortCoder; -pub use self::generated::NSPortMessage::NSPortMessage; -pub use self::generated::NSPortNameServer::{ - NSMachBootstrapServer, NSMessagePortNameServer, NSPortNameServer, NSSocketPortNameServer, -}; -pub use self::generated::NSPredicate::NSPredicate; -pub use self::generated::NSProcessInfo::{ - NSActivityAutomaticTerminationDisabled, NSActivityBackground, - NSActivityIdleDisplaySleepDisabled, NSActivityIdleSystemSleepDisabled, - NSActivityLatencyCritical, NSActivityOptions, NSActivitySuddenTerminationDisabled, - NSActivityUserInitiated, NSActivityUserInitiatedAllowingIdleSystemSleep, NSHPUXOperatingSystem, - NSMACHOperatingSystem, NSOSF1OperatingSystem, NSOperatingSystemVersion, NSProcessInfo, - NSProcessInfoPowerStateDidChangeNotification, NSProcessInfoThermalState, - NSProcessInfoThermalStateCritical, NSProcessInfoThermalStateDidChangeNotification, - NSProcessInfoThermalStateFair, NSProcessInfoThermalStateNominal, - NSProcessInfoThermalStateSerious, NSSolarisOperatingSystem, NSSunOSOperatingSystem, - NSWindows95OperatingSystem, NSWindowsNTOperatingSystem, -}; -pub use self::generated::NSProgress::{ - NSProgress, NSProgressEstimatedTimeRemainingKey, NSProgressFileAnimationImageKey, - NSProgressFileAnimationImageOriginalRectKey, NSProgressFileCompletedCountKey, - NSProgressFileIconKey, NSProgressFileOperationKind, NSProgressFileOperationKindCopying, - NSProgressFileOperationKindDecompressingAfterDownloading, - NSProgressFileOperationKindDownloading, NSProgressFileOperationKindDuplicating, - NSProgressFileOperationKindKey, NSProgressFileOperationKindReceiving, - NSProgressFileOperationKindUploading, NSProgressFileTotalCountKey, NSProgressFileURLKey, - NSProgressKind, NSProgressKindFile, NSProgressPublishingHandler, NSProgressReporting, - NSProgressThroughputKey, NSProgressUnpublishingHandler, NSProgressUserInfoKey, -}; -pub use self::generated::NSPropertyList::{ - NSPropertyListBinaryFormat_v1_0, NSPropertyListFormat, NSPropertyListImmutable, - NSPropertyListMutabilityOptions, NSPropertyListMutableContainers, - NSPropertyListMutableContainersAndLeaves, NSPropertyListOpenStepFormat, - NSPropertyListReadOptions, NSPropertyListSerialization, NSPropertyListWriteOptions, - NSPropertyListXMLFormat_v1_0, -}; -pub use self::generated::NSProtocolChecker::NSProtocolChecker; -pub use self::generated::NSRange::{NSRange, NSRangePointer}; -pub use self::generated::NSRegularExpression::{ - NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, - NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, - NSMatchingReportProgress, NSMatchingRequiredEnd, NSMatchingWithTransparentBounds, - NSMatchingWithoutAnchoringBounds, NSRegularExpression, - NSRegularExpressionAllowCommentsAndWhitespace, NSRegularExpressionAnchorsMatchLines, - NSRegularExpressionCaseInsensitive, NSRegularExpressionDotMatchesLineSeparators, - NSRegularExpressionIgnoreMetacharacters, NSRegularExpressionOptions, - NSRegularExpressionUseUnicodeWordBoundaries, NSRegularExpressionUseUnixLineSeparators, -}; -pub use self::generated::NSRelativeDateTimeFormatter::{ - NSRelativeDateTimeFormatter, NSRelativeDateTimeFormatterStyle, - NSRelativeDateTimeFormatterStyleNamed, NSRelativeDateTimeFormatterStyleNumeric, - NSRelativeDateTimeFormatterUnitsStyle, NSRelativeDateTimeFormatterUnitsStyleAbbreviated, - NSRelativeDateTimeFormatterUnitsStyleFull, NSRelativeDateTimeFormatterUnitsStyleShort, - NSRelativeDateTimeFormatterUnitsStyleSpellOut, -}; -pub use self::generated::NSRunLoop::{NSDefaultRunLoopMode, NSRunLoop, NSRunLoopCommonModes}; -pub use self::generated::NSScanner::NSScanner; -pub use self::generated::NSScriptClassDescription::NSScriptClassDescription; -pub use self::generated::NSScriptCoercionHandler::NSScriptCoercionHandler; -pub use self::generated::NSScriptCommand::{ - NSArgumentEvaluationScriptError, NSArgumentsWrongScriptError, NSCannotCreateScriptCommandError, - NSInternalScriptError, NSKeySpecifierEvaluationScriptError, NSNoScriptError, - NSOperationNotSupportedForKeyScriptError, NSReceiverEvaluationScriptError, - NSReceiversCantHandleCommandScriptError, NSRequiredArgumentsMissingScriptError, - NSScriptCommand, NSUnknownKeyScriptError, -}; -pub use self::generated::NSScriptCommandDescription::NSScriptCommandDescription; -pub use self::generated::NSScriptExecutionContext::NSScriptExecutionContext; -pub use self::generated::NSScriptKeyValueCoding::NSOperationNotSupportedForKeyException; -pub use self::generated::NSScriptObjectSpecifiers::{ - NSContainerSpecifierError, NSEverySubelement, NSIndexSpecifier, NSIndexSubelement, - NSInsertionPosition, NSInternalSpecifierError, NSInvalidIndexSpecifierError, NSMiddleSpecifier, - NSMiddleSubelement, NSNameSpecifier, NSNoSpecifierError, NSNoSubelement, - NSNoTopLevelContainersSpecifierError, NSOperationNotSupportedForKeySpecifierError, - NSPositionAfter, NSPositionBefore, NSPositionBeginning, NSPositionEnd, NSPositionReplace, - NSPositionalSpecifier, NSPropertySpecifier, NSRandomSpecifier, NSRandomSubelement, - NSRangeSpecifier, NSRelativeAfter, NSRelativeBefore, NSRelativePosition, NSRelativeSpecifier, - NSScriptObjectSpecifier, NSUniqueIDSpecifier, NSUnknownKeySpecifierError, NSWhoseSpecifier, - NSWhoseSubelementIdentifier, -}; -pub use self::generated::NSScriptStandardSuiteCommands::{ - NSCloneCommand, NSCloseCommand, NSCountCommand, NSCreateCommand, NSDeleteCommand, - NSExistsCommand, NSGetCommand, NSMoveCommand, NSQuitCommand, NSSaveOptions, NSSaveOptionsAsk, - NSSaveOptionsNo, NSSaveOptionsYes, NSSetCommand, -}; -pub use self::generated::NSScriptSuiteRegistry::NSScriptSuiteRegistry; -pub use self::generated::NSScriptWhoseTests::{ - NSBeginsWithComparison, NSContainsComparison, NSEndsWithComparison, NSEqualToComparison, - NSGreaterThanComparison, NSGreaterThanOrEqualToComparison, NSLessThanComparison, - NSLessThanOrEqualToComparison, NSLogicalTest, NSScriptWhoseTest, NSSpecifierTest, - NSTestComparisonOperation, -}; -pub use self::generated::NSSet::{NSCountedSet, NSMutableSet, NSSet}; -pub use self::generated::NSSortDescriptor::NSSortDescriptor; -pub use self::generated::NSSpellServer::{ - NSGrammarCorrections, NSGrammarRange, NSGrammarUserDescription, NSSpellServer, - NSSpellServerDelegate, -}; -pub use self::generated::NSStream::{ - NSInputStream, NSOutputStream, NSStream, NSStreamDataWrittenToMemoryStreamKey, - NSStreamDelegate, NSStreamEvent, NSStreamEventEndEncountered, NSStreamEventErrorOccurred, - NSStreamEventHasBytesAvailable, NSStreamEventHasSpaceAvailable, NSStreamEventNone, - NSStreamEventOpenCompleted, NSStreamFileCurrentOffsetKey, NSStreamNetworkServiceType, - NSStreamNetworkServiceTypeBackground, NSStreamNetworkServiceTypeCallSignaling, - NSStreamNetworkServiceTypeValue, NSStreamNetworkServiceTypeVideo, - NSStreamNetworkServiceTypeVoIP, NSStreamNetworkServiceTypeVoice, NSStreamPropertyKey, - NSStreamSOCKSErrorDomain, NSStreamSOCKSProxyConfiguration, NSStreamSOCKSProxyConfigurationKey, - NSStreamSOCKSProxyHostKey, NSStreamSOCKSProxyPasswordKey, NSStreamSOCKSProxyPortKey, - NSStreamSOCKSProxyUserKey, NSStreamSOCKSProxyVersion, NSStreamSOCKSProxyVersion4, - NSStreamSOCKSProxyVersion5, NSStreamSOCKSProxyVersionKey, NSStreamSocketSSLErrorDomain, - NSStreamSocketSecurityLevel, NSStreamSocketSecurityLevelKey, - NSStreamSocketSecurityLevelNegotiatedSSL, NSStreamSocketSecurityLevelNone, - NSStreamSocketSecurityLevelSSLv2, NSStreamSocketSecurityLevelSSLv3, - NSStreamSocketSecurityLevelTLSv1, NSStreamStatus, NSStreamStatusAtEnd, NSStreamStatusClosed, - NSStreamStatusError, NSStreamStatusNotOpen, NSStreamStatusOpen, NSStreamStatusOpening, - NSStreamStatusReading, NSStreamStatusWriting, -}; -pub use self::generated::NSString::{ - unichar, NSASCIIStringEncoding, NSAnchoredSearch, NSBackwardsSearch, NSCaseInsensitiveSearch, - NSCharacterConversionException, NSConstantString, NSDiacriticInsensitiveSearch, - NSForcedOrderingSearch, NSISO2022JPStringEncoding, NSISOLatin1StringEncoding, - NSISOLatin2StringEncoding, NSJapaneseEUCStringEncoding, NSLiteralSearch, - NSMacOSRomanStringEncoding, NSMutableString, NSNEXTSTEPStringEncoding, - NSNonLossyASCIIStringEncoding, NSNumericSearch, NSParseErrorException, - NSProprietaryStringEncoding, NSRegularExpressionSearch, NSShiftJISStringEncoding, - NSSimpleCString, NSString, NSStringCompareOptions, NSStringEncoding, - NSStringEncodingConversionAllowLossy, NSStringEncodingConversionExternalRepresentation, - NSStringEncodingConversionOptions, NSStringEncodingDetectionAllowLossyKey, - NSStringEncodingDetectionDisallowedEncodingsKey, NSStringEncodingDetectionFromWindowsKey, - NSStringEncodingDetectionLikelyLanguageKey, NSStringEncodingDetectionLossySubstitutionKey, - NSStringEncodingDetectionOptionsKey, NSStringEncodingDetectionSuggestedEncodingsKey, - NSStringEncodingDetectionUseOnlySuggestedEncodingsKey, NSStringEnumerationByCaretPositions, - NSStringEnumerationByComposedCharacterSequences, NSStringEnumerationByDeletionClusters, - NSStringEnumerationByLines, NSStringEnumerationByParagraphs, NSStringEnumerationBySentences, - NSStringEnumerationByWords, NSStringEnumerationLocalized, NSStringEnumerationOptions, - NSStringEnumerationReverse, NSStringEnumerationSubstringNotRequired, NSStringTransform, - NSStringTransformFullwidthToHalfwidth, NSStringTransformHiraganaToKatakana, - NSStringTransformLatinToArabic, NSStringTransformLatinToCyrillic, - NSStringTransformLatinToGreek, NSStringTransformLatinToHangul, NSStringTransformLatinToHebrew, - NSStringTransformLatinToHiragana, NSStringTransformLatinToKatakana, - NSStringTransformLatinToThai, NSStringTransformMandarinToLatin, - NSStringTransformStripCombiningMarks, NSStringTransformStripDiacritics, - NSStringTransformToLatin, NSStringTransformToUnicodeName, NSStringTransformToXMLHex, - NSSymbolStringEncoding, NSUTF16BigEndianStringEncoding, NSUTF16LittleEndianStringEncoding, - NSUTF16StringEncoding, NSUTF32BigEndianStringEncoding, NSUTF32LittleEndianStringEncoding, - NSUTF32StringEncoding, NSUTF8StringEncoding, NSUnicodeStringEncoding, NSWidthInsensitiveSearch, - NSWindowsCP1250StringEncoding, NSWindowsCP1251StringEncoding, NSWindowsCP1252StringEncoding, - NSWindowsCP1253StringEncoding, NSWindowsCP1254StringEncoding, -}; -pub use self::generated::NSTask::{ - NSTask, NSTaskDidTerminateNotification, NSTaskTerminationReason, NSTaskTerminationReasonExit, - NSTaskTerminationReasonUncaughtSignal, -}; -pub use self::generated::NSTextCheckingResult::{ - NSTextCheckingAirlineKey, NSTextCheckingAllCustomTypes, NSTextCheckingAllSystemTypes, - NSTextCheckingAllTypes, NSTextCheckingCityKey, NSTextCheckingCountryKey, - NSTextCheckingFlightKey, NSTextCheckingJobTitleKey, NSTextCheckingKey, NSTextCheckingNameKey, - NSTextCheckingOrganizationKey, NSTextCheckingPhoneKey, NSTextCheckingResult, - NSTextCheckingStateKey, NSTextCheckingStreetKey, NSTextCheckingType, NSTextCheckingTypeAddress, - NSTextCheckingTypeCorrection, NSTextCheckingTypeDash, NSTextCheckingTypeDate, - NSTextCheckingTypeGrammar, NSTextCheckingTypeLink, NSTextCheckingTypeOrthography, - NSTextCheckingTypePhoneNumber, NSTextCheckingTypeQuote, NSTextCheckingTypeRegularExpression, - NSTextCheckingTypeReplacement, NSTextCheckingTypeSpelling, - NSTextCheckingTypeTransitInformation, NSTextCheckingTypes, NSTextCheckingZIPKey, -}; -pub use self::generated::NSThread::{ - NSDidBecomeSingleThreadedNotification, NSThread, NSThreadWillExitNotification, - NSWillBecomeMultiThreadedNotification, -}; -pub use self::generated::NSTimeZone::{ - NSSystemTimeZoneDidChangeNotification, NSTimeZone, NSTimeZoneNameStyle, - NSTimeZoneNameStyleDaylightSaving, NSTimeZoneNameStyleGeneric, - NSTimeZoneNameStyleShortDaylightSaving, NSTimeZoneNameStyleShortGeneric, - NSTimeZoneNameStyleShortStandard, NSTimeZoneNameStyleStandard, -}; -pub use self::generated::NSTimer::NSTimer; -pub use self::generated::NSURLAuthenticationChallenge::{ - NSURLAuthenticationChallenge, NSURLAuthenticationChallengeSender, -}; -pub use self::generated::NSURLCache::{ - NSCachedURLResponse, NSURLCache, NSURLCacheStorageAllowed, - NSURLCacheStorageAllowedInMemoryOnly, NSURLCacheStorageNotAllowed, NSURLCacheStoragePolicy, -}; -pub use self::generated::NSURLConnection::{ - NSURLConnection, NSURLConnectionDataDelegate, NSURLConnectionDelegate, - NSURLConnectionDownloadDelegate, -}; -pub use self::generated::NSURLCredential::{ - NSURLCredential, NSURLCredentialPersistence, NSURLCredentialPersistenceForSession, - NSURLCredentialPersistenceNone, NSURLCredentialPersistencePermanent, - NSURLCredentialPersistenceSynchronizable, -}; -pub use self::generated::NSURLCredentialStorage::{ - NSURLCredentialStorage, NSURLCredentialStorageChangedNotification, - NSURLCredentialStorageRemoveSynchronizableCredentials, -}; -pub use self::generated::NSURLDownload::{NSURLDownload, NSURLDownloadDelegate}; -pub use self::generated::NSURLError::{ - NSErrorFailingURLStringKey, NSURLErrorAppTransportSecurityRequiresSecureConnection, - NSURLErrorBackgroundSessionInUseByAnotherProcess, - NSURLErrorBackgroundSessionRequiresSharedContainer, NSURLErrorBackgroundSessionWasDisconnected, - NSURLErrorBackgroundTaskCancelledReasonKey, NSURLErrorBadServerResponse, NSURLErrorBadURL, - NSURLErrorCallIsActive, NSURLErrorCancelled, - NSURLErrorCancelledReasonBackgroundUpdatesDisabled, - NSURLErrorCancelledReasonInsufficientSystemResources, - NSURLErrorCancelledReasonUserForceQuitApplication, NSURLErrorCannotCloseFile, - NSURLErrorCannotConnectToHost, NSURLErrorCannotCreateFile, NSURLErrorCannotDecodeContentData, - NSURLErrorCannotDecodeRawData, NSURLErrorCannotFindHost, NSURLErrorCannotLoadFromNetwork, - NSURLErrorCannotMoveFile, NSURLErrorCannotOpenFile, NSURLErrorCannotParseResponse, - NSURLErrorCannotRemoveFile, NSURLErrorCannotWriteToFile, NSURLErrorClientCertificateRejected, - NSURLErrorClientCertificateRequired, NSURLErrorDNSLookupFailed, - NSURLErrorDataLengthExceedsMaximum, NSURLErrorDataNotAllowed, NSURLErrorDomain, - NSURLErrorDownloadDecodingFailedMidStream, NSURLErrorDownloadDecodingFailedToComplete, - NSURLErrorFailingURLErrorKey, NSURLErrorFailingURLPeerTrustErrorKey, - NSURLErrorFailingURLStringErrorKey, NSURLErrorFileDoesNotExist, NSURLErrorFileIsDirectory, - NSURLErrorFileOutsideSafeArea, NSURLErrorHTTPTooManyRedirects, - NSURLErrorInternationalRoamingOff, NSURLErrorNetworkConnectionLost, - NSURLErrorNetworkUnavailableReason, NSURLErrorNetworkUnavailableReasonCellular, - NSURLErrorNetworkUnavailableReasonConstrained, NSURLErrorNetworkUnavailableReasonExpensive, - NSURLErrorNetworkUnavailableReasonKey, NSURLErrorNoPermissionsToReadFile, - NSURLErrorNotConnectedToInternet, NSURLErrorRedirectToNonExistentLocation, - NSURLErrorRequestBodyStreamExhausted, NSURLErrorResourceUnavailable, - NSURLErrorSecureConnectionFailed, NSURLErrorServerCertificateHasBadDate, - NSURLErrorServerCertificateHasUnknownRoot, NSURLErrorServerCertificateNotYetValid, - NSURLErrorServerCertificateUntrusted, NSURLErrorTimedOut, NSURLErrorUnknown, - NSURLErrorUnsupportedURL, NSURLErrorUserAuthenticationRequired, - NSURLErrorUserCancelledAuthentication, NSURLErrorZeroByteResource, -}; -pub use self::generated::NSURLHandle::{ - NSFTPPropertyActiveTransferModeKey, NSFTPPropertyFTPProxy, NSFTPPropertyFileOffsetKey, - NSFTPPropertyUserLoginKey, NSFTPPropertyUserPasswordKey, NSHTTPPropertyErrorPageDataKey, - NSHTTPPropertyHTTPProxy, NSHTTPPropertyRedirectionHeadersKey, - NSHTTPPropertyServerHTTPVersionKey, NSHTTPPropertyStatusCodeKey, NSHTTPPropertyStatusReasonKey, - NSURLHandle, NSURLHandleClient, NSURLHandleLoadFailed, NSURLHandleLoadInProgress, - NSURLHandleLoadSucceeded, NSURLHandleNotLoaded, NSURLHandleStatus, -}; -pub use self::generated::NSURLProtectionSpace::{ - NSURLAuthenticationMethodClientCertificate, NSURLAuthenticationMethodDefault, - NSURLAuthenticationMethodHTMLForm, NSURLAuthenticationMethodHTTPBasic, - NSURLAuthenticationMethodHTTPDigest, NSURLAuthenticationMethodNTLM, - NSURLAuthenticationMethodNegotiate, NSURLAuthenticationMethodServerTrust, NSURLProtectionSpace, - NSURLProtectionSpaceFTP, NSURLProtectionSpaceFTPProxy, NSURLProtectionSpaceHTTP, - NSURLProtectionSpaceHTTPProxy, NSURLProtectionSpaceHTTPS, NSURLProtectionSpaceHTTPSProxy, - NSURLProtectionSpaceSOCKSProxy, -}; -pub use self::generated::NSURLProtocol::{NSURLProtocol, NSURLProtocolClient}; -pub use self::generated::NSURLRequest::{ - NSMutableURLRequest, NSURLNetworkServiceTypeAVStreaming, NSURLNetworkServiceTypeBackground, - NSURLNetworkServiceTypeCallSignaling, NSURLNetworkServiceTypeDefault, - NSURLNetworkServiceTypeResponsiveAV, NSURLNetworkServiceTypeResponsiveData, - NSURLNetworkServiceTypeVideo, NSURLNetworkServiceTypeVoIP, NSURLNetworkServiceTypeVoice, - NSURLRequest, NSURLRequestAttribution, NSURLRequestAttributionDeveloper, - NSURLRequestAttributionUser, NSURLRequestCachePolicy, NSURLRequestNetworkServiceType, - NSURLRequestReloadIgnoringCacheData, NSURLRequestReloadIgnoringLocalAndRemoteCacheData, - NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestReloadRevalidatingCacheData, - NSURLRequestReturnCacheDataDontLoad, NSURLRequestReturnCacheDataElseLoad, - NSURLRequestUseProtocolCachePolicy, -}; -pub use self::generated::NSURLResponse::{NSHTTPURLResponse, NSURLResponse}; -pub use self::generated::NSURLSession::{ - NSURLSession, NSURLSessionAuthChallengeCancelAuthenticationChallenge, - NSURLSessionAuthChallengeDisposition, NSURLSessionAuthChallengePerformDefaultHandling, - NSURLSessionAuthChallengeRejectProtectionSpace, NSURLSessionAuthChallengeUseCredential, - NSURLSessionConfiguration, NSURLSessionDataDelegate, NSURLSessionDataTask, - NSURLSessionDelayedRequestCancel, NSURLSessionDelayedRequestContinueLoading, - NSURLSessionDelayedRequestDisposition, NSURLSessionDelayedRequestUseNewRequest, - NSURLSessionDelegate, NSURLSessionDownloadDelegate, NSURLSessionDownloadTask, - NSURLSessionDownloadTaskResumeData, NSURLSessionMultipathServiceType, - NSURLSessionMultipathServiceTypeAggregate, NSURLSessionMultipathServiceTypeHandover, - NSURLSessionMultipathServiceTypeInteractive, NSURLSessionMultipathServiceTypeNone, - NSURLSessionResponseAllow, NSURLSessionResponseBecomeDownload, - NSURLSessionResponseBecomeStream, NSURLSessionResponseCancel, NSURLSessionResponseDisposition, - NSURLSessionStreamDelegate, NSURLSessionStreamTask, NSURLSessionTask, NSURLSessionTaskDelegate, - NSURLSessionTaskMetrics, NSURLSessionTaskMetricsDomainResolutionProtocol, - NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS, - NSURLSessionTaskMetricsDomainResolutionProtocolTCP, - NSURLSessionTaskMetricsDomainResolutionProtocolTLS, - NSURLSessionTaskMetricsDomainResolutionProtocolUDP, - NSURLSessionTaskMetricsDomainResolutionProtocolUnknown, - NSURLSessionTaskMetricsResourceFetchType, NSURLSessionTaskMetricsResourceFetchTypeLocalCache, - NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad, - NSURLSessionTaskMetricsResourceFetchTypeServerPush, - NSURLSessionTaskMetricsResourceFetchTypeUnknown, NSURLSessionTaskPriorityDefault, - NSURLSessionTaskPriorityHigh, NSURLSessionTaskPriorityLow, NSURLSessionTaskState, - NSURLSessionTaskStateCanceling, NSURLSessionTaskStateCompleted, NSURLSessionTaskStateRunning, - NSURLSessionTaskStateSuspended, NSURLSessionTaskTransactionMetrics, - NSURLSessionTransferSizeUnknown, NSURLSessionUploadTask, NSURLSessionWebSocketCloseCode, - NSURLSessionWebSocketCloseCodeAbnormalClosure, NSURLSessionWebSocketCloseCodeGoingAway, - NSURLSessionWebSocketCloseCodeInternalServerError, NSURLSessionWebSocketCloseCodeInvalid, - NSURLSessionWebSocketCloseCodeInvalidFramePayloadData, - NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing, - NSURLSessionWebSocketCloseCodeMessageTooBig, NSURLSessionWebSocketCloseCodeNoStatusReceived, - NSURLSessionWebSocketCloseCodeNormalClosure, NSURLSessionWebSocketCloseCodePolicyViolation, - NSURLSessionWebSocketCloseCodeProtocolError, NSURLSessionWebSocketCloseCodeTLSHandshakeFailure, - NSURLSessionWebSocketCloseCodeUnsupportedData, NSURLSessionWebSocketDelegate, - NSURLSessionWebSocketMessage, NSURLSessionWebSocketMessageType, - NSURLSessionWebSocketMessageTypeData, NSURLSessionWebSocketMessageTypeString, - NSURLSessionWebSocketTask, -}; -pub use self::generated::NSUbiquitousKeyValueStore::{ - NSUbiquitousKeyValueStore, NSUbiquitousKeyValueStoreAccountChange, - NSUbiquitousKeyValueStoreChangeReasonKey, NSUbiquitousKeyValueStoreChangedKeysKey, - NSUbiquitousKeyValueStoreDidChangeExternallyNotification, - NSUbiquitousKeyValueStoreInitialSyncChange, NSUbiquitousKeyValueStoreQuotaViolationChange, - NSUbiquitousKeyValueStoreServerChange, -}; -pub use self::generated::NSUndoManager::{ - NSUndoCloseGroupingRunLoopOrdering, NSUndoManager, NSUndoManagerCheckpointNotification, - NSUndoManagerDidCloseUndoGroupNotification, NSUndoManagerDidOpenUndoGroupNotification, - NSUndoManagerDidRedoChangeNotification, NSUndoManagerDidUndoChangeNotification, - NSUndoManagerGroupIsDiscardableKey, NSUndoManagerWillCloseUndoGroupNotification, - NSUndoManagerWillRedoChangeNotification, NSUndoManagerWillUndoChangeNotification, -}; -pub use self::generated::NSUnit::{ - NSDimension, NSUnit, NSUnitAcceleration, NSUnitAngle, NSUnitArea, NSUnitConcentrationMass, - NSUnitConverter, NSUnitConverterLinear, NSUnitDispersion, NSUnitDuration, NSUnitElectricCharge, - NSUnitElectricCurrent, NSUnitElectricPotentialDifference, NSUnitElectricResistance, - NSUnitEnergy, NSUnitFrequency, NSUnitFuelEfficiency, NSUnitIlluminance, - NSUnitInformationStorage, NSUnitLength, NSUnitMass, NSUnitPower, NSUnitPressure, NSUnitSpeed, - NSUnitTemperature, NSUnitVolume, -}; -pub use self::generated::NSUserActivity::{ - NSUserActivity, NSUserActivityDelegate, NSUserActivityPersistentIdentifier, - NSUserActivityTypeBrowsingWeb, -}; -pub use self::generated::NSUserDefaults::{ - NSAMPMDesignation, NSArgumentDomain, NSCurrencySymbol, NSDateFormatString, NSDateTimeOrdering, - NSDecimalDigits, NSDecimalSeparator, NSEarlierTimeDesignations, NSGlobalDomain, - NSHourNameDesignations, NSInternationalCurrencyString, NSLaterTimeDesignations, - NSMonthNameArray, NSNegativeCurrencyFormatString, NSNextDayDesignations, - NSNextNextDayDesignations, NSPositiveCurrencyFormatString, NSPriorDayDesignations, - NSRegistrationDomain, NSShortDateFormatString, NSShortMonthNameArray, - NSShortTimeDateFormatString, NSShortWeekDayNameArray, NSThisDayDesignations, - NSThousandsSeparator, NSTimeDateFormatString, NSTimeFormatString, - NSUbiquitousUserDefaultsCompletedInitialSyncNotification, - NSUbiquitousUserDefaultsDidChangeAccountsNotification, - NSUbiquitousUserDefaultsNoCloudAccountNotification, NSUserDefaults, - NSUserDefaultsDidChangeNotification, NSUserDefaultsSizeLimitExceededNotification, - NSWeekDayNameArray, NSYearMonthWeekDesignations, -}; -pub use self::generated::NSUserNotification::{ - NSUserNotification, NSUserNotificationAction, NSUserNotificationActivationType, - NSUserNotificationActivationTypeActionButtonClicked, - NSUserNotificationActivationTypeAdditionalActionClicked, - NSUserNotificationActivationTypeContentsClicked, NSUserNotificationActivationTypeNone, - NSUserNotificationActivationTypeReplied, NSUserNotificationCenter, - NSUserNotificationCenterDelegate, NSUserNotificationDefaultSoundName, -}; -pub use self::generated::NSUserScriptTask::{ - NSUserAppleScriptTask, NSUserAppleScriptTaskCompletionHandler, NSUserAutomatorTask, - NSUserAutomatorTaskCompletionHandler, NSUserScriptTask, NSUserScriptTaskCompletionHandler, - NSUserUnixTask, NSUserUnixTaskCompletionHandler, -}; -pub use self::generated::NSValue::{NSNumber, NSValue}; -pub use self::generated::NSValueTransformer::{ - NSIsNilTransformerName, NSIsNotNilTransformerName, NSKeyedUnarchiveFromDataTransformerName, - NSNegateBooleanTransformerName, NSSecureUnarchiveFromDataTransformer, - NSSecureUnarchiveFromDataTransformerName, NSUnarchiveFromDataTransformerName, - NSValueTransformer, NSValueTransformerName, -}; -pub use self::generated::NSXMLDTDNode::{ - NSXMLAttributeCDATAKind, NSXMLAttributeEntitiesKind, NSXMLAttributeEntityKind, - NSXMLAttributeEnumerationKind, NSXMLAttributeIDKind, NSXMLAttributeIDRefKind, - NSXMLAttributeIDRefsKind, NSXMLAttributeNMTokenKind, NSXMLAttributeNMTokensKind, - NSXMLAttributeNotationKind, NSXMLDTDNode, NSXMLDTDNodeKind, NSXMLElementDeclarationAnyKind, - NSXMLElementDeclarationElementKind, NSXMLElementDeclarationEmptyKind, - NSXMLElementDeclarationMixedKind, NSXMLElementDeclarationUndefinedKind, NSXMLEntityGeneralKind, - NSXMLEntityParameterKind, NSXMLEntityParsedKind, NSXMLEntityPredefined, - NSXMLEntityUnparsedKind, -}; -pub use self::generated::NSXMLDocument::{ - NSXMLDocument, NSXMLDocumentContentKind, NSXMLDocumentHTMLKind, NSXMLDocumentTextKind, - NSXMLDocumentXHTMLKind, NSXMLDocumentXMLKind, -}; -pub use self::generated::NSXMLElement::NSXMLElement; -pub use self::generated::NSXMLNode::{ - NSXMLAttributeDeclarationKind, NSXMLAttributeKind, NSXMLCommentKind, NSXMLDTDKind, - NSXMLDocumentKind, NSXMLElementDeclarationKind, NSXMLElementKind, NSXMLEntityDeclarationKind, - NSXMLInvalidKind, NSXMLNamespaceKind, NSXMLNode, NSXMLNodeKind, NSXMLNotationDeclarationKind, - NSXMLProcessingInstructionKind, NSXMLTextKind, -}; -pub use self::generated::NSXMLNodeOptions::{ - NSXMLDocumentIncludeContentTypeDeclaration, NSXMLDocumentTidyHTML, NSXMLDocumentTidyXML, - NSXMLDocumentValidate, NSXMLDocumentXInclude, NSXMLNodeCompactEmptyElement, - NSXMLNodeExpandEmptyElement, NSXMLNodeIsCDATA, NSXMLNodeLoadExternalEntitiesAlways, - NSXMLNodeLoadExternalEntitiesNever, NSXMLNodeLoadExternalEntitiesSameOriginOnly, - NSXMLNodeNeverEscapeContents, NSXMLNodeOptions, NSXMLNodeOptionsNone, NSXMLNodePreserveAll, - NSXMLNodePreserveAttributeOrder, NSXMLNodePreserveCDATA, NSXMLNodePreserveCharacterReferences, - NSXMLNodePreserveDTD, NSXMLNodePreserveEmptyElements, NSXMLNodePreserveEntities, - NSXMLNodePreserveNamespaceOrder, NSXMLNodePreservePrefixes, NSXMLNodePreserveQuotes, - NSXMLNodePreserveWhitespace, NSXMLNodePrettyPrint, NSXMLNodePromoteSignificantWhitespace, - NSXMLNodeUseDoubleQuotes, NSXMLNodeUseSingleQuotes, -}; -pub use self::generated::NSXMLParser::{ - NSXMLParser, NSXMLParserAttributeHasNoValueError, NSXMLParserAttributeListNotFinishedError, - NSXMLParserAttributeListNotStartedError, NSXMLParserAttributeNotFinishedError, - NSXMLParserAttributeNotStartedError, NSXMLParserAttributeRedefinedError, - NSXMLParserCDATANotFinishedError, NSXMLParserCharacterRefAtEOFError, - NSXMLParserCharacterRefInDTDError, NSXMLParserCharacterRefInEpilogError, - NSXMLParserCharacterRefInPrologError, NSXMLParserCommentContainsDoubleHyphenError, - NSXMLParserCommentNotFinishedError, NSXMLParserConditionalSectionNotFinishedError, - NSXMLParserConditionalSectionNotStartedError, NSXMLParserDOCTYPEDeclNotFinishedError, - NSXMLParserDelegate, NSXMLParserDelegateAbortedParseError, NSXMLParserDocumentStartError, - NSXMLParserElementContentDeclNotFinishedError, NSXMLParserElementContentDeclNotStartedError, - NSXMLParserEmptyDocumentError, NSXMLParserEncodingNotSupportedError, - NSXMLParserEntityBoundaryError, NSXMLParserEntityIsExternalError, - NSXMLParserEntityIsParameterError, NSXMLParserEntityNotFinishedError, - NSXMLParserEntityNotStartedError, NSXMLParserEntityRefAtEOFError, - NSXMLParserEntityRefInDTDError, NSXMLParserEntityRefInEpilogError, - NSXMLParserEntityRefInPrologError, NSXMLParserEntityRefLoopError, - NSXMLParserEntityReferenceMissingSemiError, NSXMLParserEntityReferenceWithoutNameError, - NSXMLParserEntityValueRequiredError, NSXMLParserEqualExpectedError, NSXMLParserError, - NSXMLParserErrorDomain, NSXMLParserExternalEntityResolvingPolicy, - NSXMLParserExternalStandaloneEntityError, NSXMLParserExternalSubsetNotFinishedError, - NSXMLParserExtraContentError, NSXMLParserGTRequiredError, NSXMLParserInternalError, - NSXMLParserInvalidCharacterError, NSXMLParserInvalidCharacterInEntityError, - NSXMLParserInvalidCharacterRefError, NSXMLParserInvalidConditionalSectionError, - NSXMLParserInvalidDecimalCharacterRefError, NSXMLParserInvalidEncodingError, - NSXMLParserInvalidEncodingNameError, NSXMLParserInvalidHexCharacterRefError, - NSXMLParserInvalidURIError, NSXMLParserLTRequiredError, NSXMLParserLTSlashRequiredError, - NSXMLParserLessThanSymbolInAttributeError, NSXMLParserLiteralNotFinishedError, - NSXMLParserLiteralNotStartedError, NSXMLParserMisplacedCDATAEndStringError, - NSXMLParserMisplacedXMLDeclarationError, NSXMLParserMixedContentDeclNotFinishedError, - NSXMLParserMixedContentDeclNotStartedError, NSXMLParserNAMERequiredError, - NSXMLParserNMTOKENRequiredError, NSXMLParserNamespaceDeclarationError, NSXMLParserNoDTDError, - NSXMLParserNotWellBalancedError, NSXMLParserNotationNotFinishedError, - NSXMLParserNotationNotStartedError, NSXMLParserOutOfMemoryError, - NSXMLParserPCDATARequiredError, NSXMLParserParsedEntityRefAtEOFError, - NSXMLParserParsedEntityRefInEpilogError, NSXMLParserParsedEntityRefInInternalError, - NSXMLParserParsedEntityRefInInternalSubsetError, NSXMLParserParsedEntityRefInPrologError, - NSXMLParserParsedEntityRefMissingSemiError, NSXMLParserParsedEntityRefNoNameError, - NSXMLParserPrematureDocumentEndError, NSXMLParserProcessingInstructionNotFinishedError, - NSXMLParserProcessingInstructionNotStartedError, NSXMLParserPublicIdentifierRequiredError, - NSXMLParserResolveExternalEntitiesAlways, NSXMLParserResolveExternalEntitiesNever, - NSXMLParserResolveExternalEntitiesNoNetwork, NSXMLParserResolveExternalEntitiesSameOriginOnly, - NSXMLParserSeparatorRequiredError, NSXMLParserSpaceRequiredError, - NSXMLParserStandaloneValueError, NSXMLParserStringNotClosedError, - NSXMLParserStringNotStartedError, NSXMLParserTagNameMismatchError, NSXMLParserURIFragmentError, - NSXMLParserURIRequiredError, NSXMLParserUndeclaredEntityError, NSXMLParserUnfinishedTagError, - NSXMLParserUnknownEncodingError, NSXMLParserUnparsedEntityError, - NSXMLParserXMLDeclNotFinishedError, NSXMLParserXMLDeclNotStartedError, -}; -pub use self::generated::NSXPCConnection::{ - NSXPCCoder, NSXPCConnection, NSXPCConnectionOptions, NSXPCConnectionPrivileged, NSXPCInterface, - NSXPCListener, NSXPCListenerDelegate, NSXPCListenerEndpoint, NSXPCProxyCreating, -}; -pub use self::generated::NSZone::{NSCollectorDisabledOption, NSScannedOption}; -pub use self::generated::NSURL::{ - NSFileSecurity, NSThumbnail1024x1024SizeKey, NSURLAddedToDirectoryDateKey, - NSURLApplicationIsScriptableKey, NSURLAttributeModificationDateKey, - NSURLBookmarkCreationMinimalBookmark, NSURLBookmarkCreationOptions, - NSURLBookmarkCreationPreferFileIDResolution, - NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess, - NSURLBookmarkCreationSuitableForBookmarkFile, NSURLBookmarkCreationWithSecurityScope, - NSURLBookmarkCreationWithoutImplicitSecurityScope, NSURLBookmarkFileCreationOptions, - NSURLBookmarkResolutionOptions, NSURLBookmarkResolutionWithSecurityScope, - NSURLBookmarkResolutionWithoutImplicitStartAccessing, NSURLBookmarkResolutionWithoutMounting, - NSURLBookmarkResolutionWithoutUI, NSURLCanonicalPathKey, NSURLComponents, - NSURLContentAccessDateKey, NSURLContentModificationDateKey, NSURLContentTypeKey, - NSURLCreationDateKey, NSURLCustomIconKey, NSURLDocumentIdentifierKey, NSURLEffectiveIconKey, - NSURLFileAllocatedSizeKey, NSURLFileContentIdentifierKey, NSURLFileProtectionComplete, - NSURLFileProtectionCompleteUnlessOpen, NSURLFileProtectionCompleteUntilFirstUserAuthentication, - NSURLFileProtectionKey, NSURLFileProtectionNone, NSURLFileProtectionType, - NSURLFileResourceIdentifierKey, NSURLFileResourceType, NSURLFileResourceTypeBlockSpecial, - NSURLFileResourceTypeCharacterSpecial, NSURLFileResourceTypeDirectory, - NSURLFileResourceTypeKey, NSURLFileResourceTypeNamedPipe, NSURLFileResourceTypeRegular, - NSURLFileResourceTypeSocket, NSURLFileResourceTypeSymbolicLink, NSURLFileResourceTypeUnknown, - NSURLFileScheme, NSURLFileSecurityKey, NSURLFileSizeKey, NSURLGenerationIdentifierKey, - NSURLHasHiddenExtensionKey, NSURLIsAliasFileKey, NSURLIsApplicationKey, NSURLIsDirectoryKey, - NSURLIsExcludedFromBackupKey, NSURLIsExecutableKey, NSURLIsHiddenKey, NSURLIsMountTriggerKey, - NSURLIsPackageKey, NSURLIsPurgeableKey, NSURLIsReadableKey, NSURLIsRegularFileKey, - NSURLIsSparseKey, NSURLIsSymbolicLinkKey, NSURLIsSystemImmutableKey, NSURLIsUbiquitousItemKey, - NSURLIsUserImmutableKey, NSURLIsVolumeKey, NSURLIsWritableKey, NSURLKeysOfUnsetValuesKey, - NSURLLabelColorKey, NSURLLabelNumberKey, NSURLLinkCountKey, NSURLLocalizedLabelKey, - NSURLLocalizedNameKey, NSURLLocalizedTypeDescriptionKey, NSURLMayHaveExtendedAttributesKey, - NSURLMayShareFileContentKey, NSURLNameKey, NSURLParentDirectoryURLKey, NSURLPathKey, - NSURLPreferredIOBlockSizeKey, NSURLQuarantinePropertiesKey, NSURLQueryItem, NSURLResourceKey, - NSURLTagNamesKey, NSURLThumbnailDictionaryItem, NSURLThumbnailDictionaryKey, NSURLThumbnailKey, - NSURLTotalFileAllocatedSizeKey, NSURLTotalFileSizeKey, NSURLTypeIdentifierKey, - NSURLUbiquitousItemContainerDisplayNameKey, NSURLUbiquitousItemDownloadRequestedKey, - NSURLUbiquitousItemDownloadingErrorKey, NSURLUbiquitousItemDownloadingStatus, - NSURLUbiquitousItemDownloadingStatusCurrent, NSURLUbiquitousItemDownloadingStatusDownloaded, - NSURLUbiquitousItemDownloadingStatusKey, NSURLUbiquitousItemDownloadingStatusNotDownloaded, - NSURLUbiquitousItemHasUnresolvedConflictsKey, NSURLUbiquitousItemIsDownloadedKey, - NSURLUbiquitousItemIsDownloadingKey, NSURLUbiquitousItemIsExcludedFromSyncKey, - NSURLUbiquitousItemIsSharedKey, NSURLUbiquitousItemIsUploadedKey, - NSURLUbiquitousItemIsUploadingKey, NSURLUbiquitousItemPercentDownloadedKey, - NSURLUbiquitousItemPercentUploadedKey, NSURLUbiquitousItemUploadingErrorKey, - NSURLUbiquitousSharedItemCurrentUserPermissionsKey, - NSURLUbiquitousSharedItemCurrentUserRoleKey, - NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey, - NSURLUbiquitousSharedItemOwnerNameComponentsKey, NSURLUbiquitousSharedItemPermissions, - NSURLUbiquitousSharedItemPermissionsReadOnly, NSURLUbiquitousSharedItemPermissionsReadWrite, - NSURLUbiquitousSharedItemRole, NSURLUbiquitousSharedItemRoleOwner, - NSURLUbiquitousSharedItemRoleParticipant, NSURLVolumeAvailableCapacityForImportantUsageKey, - NSURLVolumeAvailableCapacityForOpportunisticUsageKey, NSURLVolumeAvailableCapacityKey, - NSURLVolumeCreationDateKey, NSURLVolumeIdentifierKey, NSURLVolumeIsAutomountedKey, - NSURLVolumeIsBrowsableKey, NSURLVolumeIsEjectableKey, NSURLVolumeIsEncryptedKey, - NSURLVolumeIsInternalKey, NSURLVolumeIsJournalingKey, NSURLVolumeIsLocalKey, - NSURLVolumeIsReadOnlyKey, NSURLVolumeIsRemovableKey, NSURLVolumeIsRootFileSystemKey, - NSURLVolumeLocalizedFormatDescriptionKey, NSURLVolumeLocalizedNameKey, - NSURLVolumeMaximumFileSizeKey, NSURLVolumeNameKey, NSURLVolumeResourceCountKey, - NSURLVolumeSupportsAccessPermissionsKey, NSURLVolumeSupportsAdvisoryFileLockingKey, - NSURLVolumeSupportsCasePreservedNamesKey, NSURLVolumeSupportsCaseSensitiveNamesKey, - NSURLVolumeSupportsCompressionKey, NSURLVolumeSupportsExclusiveRenamingKey, - NSURLVolumeSupportsExtendedSecurityKey, NSURLVolumeSupportsFileCloningKey, - NSURLVolumeSupportsFileProtectionKey, NSURLVolumeSupportsHardLinksKey, - NSURLVolumeSupportsImmutableFilesKey, NSURLVolumeSupportsJournalingKey, - NSURLVolumeSupportsPersistentIDsKey, NSURLVolumeSupportsRenamingKey, - NSURLVolumeSupportsRootDirectoryDatesKey, NSURLVolumeSupportsSparseFilesKey, - NSURLVolumeSupportsSwapRenamingKey, NSURLVolumeSupportsSymbolicLinksKey, - NSURLVolumeSupportsVolumeSizesKey, NSURLVolumeSupportsZeroRunsKey, NSURLVolumeTotalCapacityKey, - NSURLVolumeURLForRemountingKey, NSURLVolumeURLKey, NSURLVolumeUUIDStringKey, NSURL, -}; -pub use self::generated::NSUUID::NSUUID; -pub use self::generated::NSXMLDTD::NSXMLDTD; +pub use self::generated::*; diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index 5115579ac..a98f54ac4 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -1,2247 +1,2436 @@ -pub(crate) mod AppKitDefines; -pub(crate) mod AppKitErrors; -pub(crate) mod NSATSTypesetter; -pub(crate) mod NSAccessibility; -pub(crate) mod NSAccessibilityConstants; -pub(crate) mod NSAccessibilityCustomAction; -pub(crate) mod NSAccessibilityCustomRotor; -pub(crate) mod NSAccessibilityElement; -pub(crate) mod NSAccessibilityProtocols; -pub(crate) mod NSActionCell; -pub(crate) mod NSAffineTransform; -pub(crate) mod NSAlert; -pub(crate) mod NSAlignmentFeedbackFilter; -pub(crate) mod NSAnimation; -pub(crate) mod NSAnimationContext; -pub(crate) mod NSAppearance; -pub(crate) mod NSAppleScriptExtensions; -pub(crate) mod NSApplication; -pub(crate) mod NSApplicationScripting; -pub(crate) mod NSArrayController; -pub(crate) mod NSAttributedString; -pub(crate) mod NSBezierPath; -pub(crate) mod NSBitmapImageRep; -pub(crate) mod NSBox; -pub(crate) mod NSBrowser; -pub(crate) mod NSBrowserCell; -pub(crate) mod NSButton; -pub(crate) mod NSButtonCell; -pub(crate) mod NSButtonTouchBarItem; -pub(crate) mod NSCIImageRep; -pub(crate) mod NSCachedImageRep; -pub(crate) mod NSCandidateListTouchBarItem; -pub(crate) mod NSCell; -pub(crate) mod NSClickGestureRecognizer; -pub(crate) mod NSClipView; -pub(crate) mod NSCollectionView; -pub(crate) mod NSCollectionViewCompositionalLayout; -pub(crate) mod NSCollectionViewFlowLayout; -pub(crate) mod NSCollectionViewGridLayout; -pub(crate) mod NSCollectionViewLayout; -pub(crate) mod NSCollectionViewTransitionLayout; -pub(crate) mod NSColor; -pub(crate) mod NSColorList; -pub(crate) mod NSColorPanel; -pub(crate) mod NSColorPicker; -pub(crate) mod NSColorPickerTouchBarItem; -pub(crate) mod NSColorPicking; -pub(crate) mod NSColorSampler; -pub(crate) mod NSColorSpace; -pub(crate) mod NSColorWell; -pub(crate) mod NSComboBox; -pub(crate) mod NSComboBoxCell; -pub(crate) mod NSControl; -pub(crate) mod NSController; -pub(crate) mod NSCursor; -pub(crate) mod NSCustomImageRep; -pub(crate) mod NSCustomTouchBarItem; -pub(crate) mod NSDataAsset; -pub(crate) mod NSDatePicker; -pub(crate) mod NSDatePickerCell; -pub(crate) mod NSDictionaryController; -pub(crate) mod NSDiffableDataSource; -pub(crate) mod NSDockTile; -pub(crate) mod NSDocument; -pub(crate) mod NSDocumentController; -pub(crate) mod NSDocumentScripting; -pub(crate) mod NSDragging; -pub(crate) mod NSDraggingItem; -pub(crate) mod NSDraggingSession; -pub(crate) mod NSDrawer; -pub(crate) mod NSEPSImageRep; -pub(crate) mod NSErrors; -pub(crate) mod NSEvent; -pub(crate) mod NSFilePromiseProvider; -pub(crate) mod NSFilePromiseReceiver; -pub(crate) mod NSFileWrapperExtensions; -pub(crate) mod NSFont; -pub(crate) mod NSFontAssetRequest; -pub(crate) mod NSFontCollection; -pub(crate) mod NSFontDescriptor; -pub(crate) mod NSFontManager; -pub(crate) mod NSFontPanel; -pub(crate) mod NSForm; -pub(crate) mod NSFormCell; -pub(crate) mod NSGestureRecognizer; -pub(crate) mod NSGlyphGenerator; -pub(crate) mod NSGlyphInfo; -pub(crate) mod NSGradient; -pub(crate) mod NSGraphics; -pub(crate) mod NSGraphicsContext; -pub(crate) mod NSGridView; -pub(crate) mod NSGroupTouchBarItem; -pub(crate) mod NSHapticFeedback; -pub(crate) mod NSHelpManager; -pub(crate) mod NSImage; -pub(crate) mod NSImageCell; -pub(crate) mod NSImageRep; -pub(crate) mod NSImageView; -pub(crate) mod NSInputManager; -pub(crate) mod NSInputServer; -pub(crate) mod NSInterfaceStyle; -pub(crate) mod NSItemProvider; -pub(crate) mod NSKeyValueBinding; -pub(crate) mod NSLayoutAnchor; -pub(crate) mod NSLayoutConstraint; -pub(crate) mod NSLayoutGuide; -pub(crate) mod NSLayoutManager; -pub(crate) mod NSLevelIndicator; -pub(crate) mod NSLevelIndicatorCell; -pub(crate) mod NSMagnificationGestureRecognizer; -pub(crate) mod NSMatrix; -pub(crate) mod NSMediaLibraryBrowserController; -pub(crate) mod NSMenu; -pub(crate) mod NSMenuItem; -pub(crate) mod NSMenuItemCell; -pub(crate) mod NSMenuToolbarItem; -pub(crate) mod NSMovie; -pub(crate) mod NSNib; -pub(crate) mod NSNibDeclarations; -pub(crate) mod NSNibLoading; -pub(crate) mod NSObjectController; -pub(crate) mod NSOpenGL; -pub(crate) mod NSOpenGLLayer; -pub(crate) mod NSOpenGLView; -pub(crate) mod NSOpenPanel; -pub(crate) mod NSOutlineView; -pub(crate) mod NSPDFImageRep; -pub(crate) mod NSPDFInfo; -pub(crate) mod NSPDFPanel; -pub(crate) mod NSPICTImageRep; -pub(crate) mod NSPageController; -pub(crate) mod NSPageLayout; -pub(crate) mod NSPanGestureRecognizer; -pub(crate) mod NSPanel; -pub(crate) mod NSParagraphStyle; -pub(crate) mod NSPasteboard; -pub(crate) mod NSPasteboardItem; -pub(crate) mod NSPathCell; -pub(crate) mod NSPathComponentCell; -pub(crate) mod NSPathControl; -pub(crate) mod NSPathControlItem; -pub(crate) mod NSPersistentDocument; -pub(crate) mod NSPickerTouchBarItem; -pub(crate) mod NSPopUpButton; -pub(crate) mod NSPopUpButtonCell; -pub(crate) mod NSPopover; -pub(crate) mod NSPopoverTouchBarItem; -pub(crate) mod NSPredicateEditor; -pub(crate) mod NSPredicateEditorRowTemplate; -pub(crate) mod NSPressGestureRecognizer; -pub(crate) mod NSPressureConfiguration; -pub(crate) mod NSPrintInfo; -pub(crate) mod NSPrintOperation; -pub(crate) mod NSPrintPanel; -pub(crate) mod NSPrinter; -pub(crate) mod NSProgressIndicator; -pub(crate) mod NSResponder; -pub(crate) mod NSRotationGestureRecognizer; -pub(crate) mod NSRuleEditor; -pub(crate) mod NSRulerMarker; -pub(crate) mod NSRulerView; -pub(crate) mod NSRunningApplication; -pub(crate) mod NSSavePanel; -pub(crate) mod NSScreen; -pub(crate) mod NSScrollView; -pub(crate) mod NSScroller; -pub(crate) mod NSScrubber; -pub(crate) mod NSScrubberItemView; -pub(crate) mod NSScrubberLayout; -pub(crate) mod NSSearchField; -pub(crate) mod NSSearchFieldCell; -pub(crate) mod NSSearchToolbarItem; -pub(crate) mod NSSecureTextField; -pub(crate) mod NSSegmentedCell; -pub(crate) mod NSSegmentedControl; -pub(crate) mod NSShadow; -pub(crate) mod NSSharingService; -pub(crate) mod NSSharingServicePickerToolbarItem; -pub(crate) mod NSSharingServicePickerTouchBarItem; -pub(crate) mod NSSlider; -pub(crate) mod NSSliderAccessory; -pub(crate) mod NSSliderCell; -pub(crate) mod NSSliderTouchBarItem; -pub(crate) mod NSSound; -pub(crate) mod NSSpeechRecognizer; -pub(crate) mod NSSpeechSynthesizer; -pub(crate) mod NSSpellChecker; -pub(crate) mod NSSpellProtocol; -pub(crate) mod NSSplitView; -pub(crate) mod NSSplitViewController; -pub(crate) mod NSSplitViewItem; -pub(crate) mod NSStackView; -pub(crate) mod NSStatusBar; -pub(crate) mod NSStatusBarButton; -pub(crate) mod NSStatusItem; -pub(crate) mod NSStepper; -pub(crate) mod NSStepperCell; -pub(crate) mod NSStepperTouchBarItem; -pub(crate) mod NSStoryboard; -pub(crate) mod NSStoryboardSegue; -pub(crate) mod NSStringDrawing; -pub(crate) mod NSSwitch; -pub(crate) mod NSTabView; -pub(crate) mod NSTabViewController; -pub(crate) mod NSTabViewItem; -pub(crate) mod NSTableCellView; -pub(crate) mod NSTableColumn; -pub(crate) mod NSTableHeaderCell; -pub(crate) mod NSTableHeaderView; -pub(crate) mod NSTableRowView; -pub(crate) mod NSTableView; -pub(crate) mod NSTableViewDiffableDataSource; -pub(crate) mod NSTableViewRowAction; -pub(crate) mod NSText; -pub(crate) mod NSTextAlternatives; -pub(crate) mod NSTextAttachment; -pub(crate) mod NSTextAttachmentCell; -pub(crate) mod NSTextCheckingClient; -pub(crate) mod NSTextCheckingController; -pub(crate) mod NSTextContainer; -pub(crate) mod NSTextContent; -pub(crate) mod NSTextContentManager; -pub(crate) mod NSTextElement; -pub(crate) mod NSTextField; -pub(crate) mod NSTextFieldCell; -pub(crate) mod NSTextFinder; -pub(crate) mod NSTextInputClient; -pub(crate) mod NSTextInputContext; -pub(crate) mod NSTextLayoutFragment; -pub(crate) mod NSTextLayoutManager; -pub(crate) mod NSTextLineFragment; -pub(crate) mod NSTextList; -pub(crate) mod NSTextRange; -pub(crate) mod NSTextSelection; -pub(crate) mod NSTextSelectionNavigation; -pub(crate) mod NSTextStorage; -pub(crate) mod NSTextStorageScripting; -pub(crate) mod NSTextTable; -pub(crate) mod NSTextView; -pub(crate) mod NSTextViewportLayoutController; -pub(crate) mod NSTintConfiguration; -pub(crate) mod NSTitlebarAccessoryViewController; -pub(crate) mod NSTokenField; -pub(crate) mod NSTokenFieldCell; -pub(crate) mod NSToolbar; -pub(crate) mod NSToolbarItem; -pub(crate) mod NSToolbarItemGroup; -pub(crate) mod NSTouch; -pub(crate) mod NSTouchBar; -pub(crate) mod NSTouchBarItem; -pub(crate) mod NSTrackingArea; -pub(crate) mod NSTrackingSeparatorToolbarItem; -pub(crate) mod NSTreeController; -pub(crate) mod NSTreeNode; -pub(crate) mod NSTypesetter; -pub(crate) mod NSUserActivity; -pub(crate) mod NSUserDefaultsController; -pub(crate) mod NSUserInterfaceCompression; -pub(crate) mod NSUserInterfaceItemIdentification; -pub(crate) mod NSUserInterfaceItemSearching; -pub(crate) mod NSUserInterfaceLayout; -pub(crate) mod NSUserInterfaceValidation; -pub(crate) mod NSView; -pub(crate) mod NSViewController; -pub(crate) mod NSVisualEffectView; -pub(crate) mod NSWindow; -pub(crate) mod NSWindowController; -pub(crate) mod NSWindowRestoration; -pub(crate) mod NSWindowScripting; -pub(crate) mod NSWindowTab; -pub(crate) mod NSWindowTabGroup; -pub(crate) mod NSWorkspace; +#[path = "AppKitDefines.rs"] +mod __AppKitDefines; +#[path = "AppKitErrors.rs"] +mod __AppKitErrors; +#[path = "NSATSTypesetter.rs"] +mod __NSATSTypesetter; +#[path = "NSAccessibility.rs"] +mod __NSAccessibility; +#[path = "NSAccessibilityConstants.rs"] +mod __NSAccessibilityConstants; +#[path = "NSAccessibilityCustomAction.rs"] +mod __NSAccessibilityCustomAction; +#[path = "NSAccessibilityCustomRotor.rs"] +mod __NSAccessibilityCustomRotor; +#[path = "NSAccessibilityElement.rs"] +mod __NSAccessibilityElement; +#[path = "NSAccessibilityProtocols.rs"] +mod __NSAccessibilityProtocols; +#[path = "NSActionCell.rs"] +mod __NSActionCell; +#[path = "NSAffineTransform.rs"] +mod __NSAffineTransform; +#[path = "NSAlert.rs"] +mod __NSAlert; +#[path = "NSAlignmentFeedbackFilter.rs"] +mod __NSAlignmentFeedbackFilter; +#[path = "NSAnimation.rs"] +mod __NSAnimation; +#[path = "NSAnimationContext.rs"] +mod __NSAnimationContext; +#[path = "NSAppearance.rs"] +mod __NSAppearance; +#[path = "NSAppleScriptExtensions.rs"] +mod __NSAppleScriptExtensions; +#[path = "NSApplication.rs"] +mod __NSApplication; +#[path = "NSApplicationScripting.rs"] +mod __NSApplicationScripting; +#[path = "NSArrayController.rs"] +mod __NSArrayController; +#[path = "NSAttributedString.rs"] +mod __NSAttributedString; +#[path = "NSBezierPath.rs"] +mod __NSBezierPath; +#[path = "NSBitmapImageRep.rs"] +mod __NSBitmapImageRep; +#[path = "NSBox.rs"] +mod __NSBox; +#[path = "NSBrowser.rs"] +mod __NSBrowser; +#[path = "NSBrowserCell.rs"] +mod __NSBrowserCell; +#[path = "NSButton.rs"] +mod __NSButton; +#[path = "NSButtonCell.rs"] +mod __NSButtonCell; +#[path = "NSButtonTouchBarItem.rs"] +mod __NSButtonTouchBarItem; +#[path = "NSCIImageRep.rs"] +mod __NSCIImageRep; +#[path = "NSCachedImageRep.rs"] +mod __NSCachedImageRep; +#[path = "NSCandidateListTouchBarItem.rs"] +mod __NSCandidateListTouchBarItem; +#[path = "NSCell.rs"] +mod __NSCell; +#[path = "NSClickGestureRecognizer.rs"] +mod __NSClickGestureRecognizer; +#[path = "NSClipView.rs"] +mod __NSClipView; +#[path = "NSCollectionView.rs"] +mod __NSCollectionView; +#[path = "NSCollectionViewCompositionalLayout.rs"] +mod __NSCollectionViewCompositionalLayout; +#[path = "NSCollectionViewFlowLayout.rs"] +mod __NSCollectionViewFlowLayout; +#[path = "NSCollectionViewGridLayout.rs"] +mod __NSCollectionViewGridLayout; +#[path = "NSCollectionViewLayout.rs"] +mod __NSCollectionViewLayout; +#[path = "NSCollectionViewTransitionLayout.rs"] +mod __NSCollectionViewTransitionLayout; +#[path = "NSColor.rs"] +mod __NSColor; +#[path = "NSColorList.rs"] +mod __NSColorList; +#[path = "NSColorPanel.rs"] +mod __NSColorPanel; +#[path = "NSColorPicker.rs"] +mod __NSColorPicker; +#[path = "NSColorPickerTouchBarItem.rs"] +mod __NSColorPickerTouchBarItem; +#[path = "NSColorPicking.rs"] +mod __NSColorPicking; +#[path = "NSColorSampler.rs"] +mod __NSColorSampler; +#[path = "NSColorSpace.rs"] +mod __NSColorSpace; +#[path = "NSColorWell.rs"] +mod __NSColorWell; +#[path = "NSComboBox.rs"] +mod __NSComboBox; +#[path = "NSComboBoxCell.rs"] +mod __NSComboBoxCell; +#[path = "NSControl.rs"] +mod __NSControl; +#[path = "NSController.rs"] +mod __NSController; +#[path = "NSCursor.rs"] +mod __NSCursor; +#[path = "NSCustomImageRep.rs"] +mod __NSCustomImageRep; +#[path = "NSCustomTouchBarItem.rs"] +mod __NSCustomTouchBarItem; +#[path = "NSDataAsset.rs"] +mod __NSDataAsset; +#[path = "NSDatePicker.rs"] +mod __NSDatePicker; +#[path = "NSDatePickerCell.rs"] +mod __NSDatePickerCell; +#[path = "NSDictionaryController.rs"] +mod __NSDictionaryController; +#[path = "NSDiffableDataSource.rs"] +mod __NSDiffableDataSource; +#[path = "NSDockTile.rs"] +mod __NSDockTile; +#[path = "NSDocument.rs"] +mod __NSDocument; +#[path = "NSDocumentController.rs"] +mod __NSDocumentController; +#[path = "NSDocumentScripting.rs"] +mod __NSDocumentScripting; +#[path = "NSDragging.rs"] +mod __NSDragging; +#[path = "NSDraggingItem.rs"] +mod __NSDraggingItem; +#[path = "NSDraggingSession.rs"] +mod __NSDraggingSession; +#[path = "NSDrawer.rs"] +mod __NSDrawer; +#[path = "NSEPSImageRep.rs"] +mod __NSEPSImageRep; +#[path = "NSErrors.rs"] +mod __NSErrors; +#[path = "NSEvent.rs"] +mod __NSEvent; +#[path = "NSFilePromiseProvider.rs"] +mod __NSFilePromiseProvider; +#[path = "NSFilePromiseReceiver.rs"] +mod __NSFilePromiseReceiver; +#[path = "NSFileWrapperExtensions.rs"] +mod __NSFileWrapperExtensions; +#[path = "NSFont.rs"] +mod __NSFont; +#[path = "NSFontAssetRequest.rs"] +mod __NSFontAssetRequest; +#[path = "NSFontCollection.rs"] +mod __NSFontCollection; +#[path = "NSFontDescriptor.rs"] +mod __NSFontDescriptor; +#[path = "NSFontManager.rs"] +mod __NSFontManager; +#[path = "NSFontPanel.rs"] +mod __NSFontPanel; +#[path = "NSForm.rs"] +mod __NSForm; +#[path = "NSFormCell.rs"] +mod __NSFormCell; +#[path = "NSGestureRecognizer.rs"] +mod __NSGestureRecognizer; +#[path = "NSGlyphGenerator.rs"] +mod __NSGlyphGenerator; +#[path = "NSGlyphInfo.rs"] +mod __NSGlyphInfo; +#[path = "NSGradient.rs"] +mod __NSGradient; +#[path = "NSGraphics.rs"] +mod __NSGraphics; +#[path = "NSGraphicsContext.rs"] +mod __NSGraphicsContext; +#[path = "NSGridView.rs"] +mod __NSGridView; +#[path = "NSGroupTouchBarItem.rs"] +mod __NSGroupTouchBarItem; +#[path = "NSHapticFeedback.rs"] +mod __NSHapticFeedback; +#[path = "NSHelpManager.rs"] +mod __NSHelpManager; +#[path = "NSImage.rs"] +mod __NSImage; +#[path = "NSImageCell.rs"] +mod __NSImageCell; +#[path = "NSImageRep.rs"] +mod __NSImageRep; +#[path = "NSImageView.rs"] +mod __NSImageView; +#[path = "NSInputManager.rs"] +mod __NSInputManager; +#[path = "NSInputServer.rs"] +mod __NSInputServer; +#[path = "NSInterfaceStyle.rs"] +mod __NSInterfaceStyle; +#[path = "NSItemProvider.rs"] +mod __NSItemProvider; +#[path = "NSKeyValueBinding.rs"] +mod __NSKeyValueBinding; +#[path = "NSLayoutAnchor.rs"] +mod __NSLayoutAnchor; +#[path = "NSLayoutConstraint.rs"] +mod __NSLayoutConstraint; +#[path = "NSLayoutGuide.rs"] +mod __NSLayoutGuide; +#[path = "NSLayoutManager.rs"] +mod __NSLayoutManager; +#[path = "NSLevelIndicator.rs"] +mod __NSLevelIndicator; +#[path = "NSLevelIndicatorCell.rs"] +mod __NSLevelIndicatorCell; +#[path = "NSMagnificationGestureRecognizer.rs"] +mod __NSMagnificationGestureRecognizer; +#[path = "NSMatrix.rs"] +mod __NSMatrix; +#[path = "NSMediaLibraryBrowserController.rs"] +mod __NSMediaLibraryBrowserController; +#[path = "NSMenu.rs"] +mod __NSMenu; +#[path = "NSMenuItem.rs"] +mod __NSMenuItem; +#[path = "NSMenuItemCell.rs"] +mod __NSMenuItemCell; +#[path = "NSMenuToolbarItem.rs"] +mod __NSMenuToolbarItem; +#[path = "NSMovie.rs"] +mod __NSMovie; +#[path = "NSNib.rs"] +mod __NSNib; +#[path = "NSNibDeclarations.rs"] +mod __NSNibDeclarations; +#[path = "NSNibLoading.rs"] +mod __NSNibLoading; +#[path = "NSObjectController.rs"] +mod __NSObjectController; +#[path = "NSOpenGL.rs"] +mod __NSOpenGL; +#[path = "NSOpenGLLayer.rs"] +mod __NSOpenGLLayer; +#[path = "NSOpenGLView.rs"] +mod __NSOpenGLView; +#[path = "NSOpenPanel.rs"] +mod __NSOpenPanel; +#[path = "NSOutlineView.rs"] +mod __NSOutlineView; +#[path = "NSPDFImageRep.rs"] +mod __NSPDFImageRep; +#[path = "NSPDFInfo.rs"] +mod __NSPDFInfo; +#[path = "NSPDFPanel.rs"] +mod __NSPDFPanel; +#[path = "NSPICTImageRep.rs"] +mod __NSPICTImageRep; +#[path = "NSPageController.rs"] +mod __NSPageController; +#[path = "NSPageLayout.rs"] +mod __NSPageLayout; +#[path = "NSPanGestureRecognizer.rs"] +mod __NSPanGestureRecognizer; +#[path = "NSPanel.rs"] +mod __NSPanel; +#[path = "NSParagraphStyle.rs"] +mod __NSParagraphStyle; +#[path = "NSPasteboard.rs"] +mod __NSPasteboard; +#[path = "NSPasteboardItem.rs"] +mod __NSPasteboardItem; +#[path = "NSPathCell.rs"] +mod __NSPathCell; +#[path = "NSPathComponentCell.rs"] +mod __NSPathComponentCell; +#[path = "NSPathControl.rs"] +mod __NSPathControl; +#[path = "NSPathControlItem.rs"] +mod __NSPathControlItem; +#[path = "NSPersistentDocument.rs"] +mod __NSPersistentDocument; +#[path = "NSPickerTouchBarItem.rs"] +mod __NSPickerTouchBarItem; +#[path = "NSPopUpButton.rs"] +mod __NSPopUpButton; +#[path = "NSPopUpButtonCell.rs"] +mod __NSPopUpButtonCell; +#[path = "NSPopover.rs"] +mod __NSPopover; +#[path = "NSPopoverTouchBarItem.rs"] +mod __NSPopoverTouchBarItem; +#[path = "NSPredicateEditor.rs"] +mod __NSPredicateEditor; +#[path = "NSPredicateEditorRowTemplate.rs"] +mod __NSPredicateEditorRowTemplate; +#[path = "NSPressGestureRecognizer.rs"] +mod __NSPressGestureRecognizer; +#[path = "NSPressureConfiguration.rs"] +mod __NSPressureConfiguration; +#[path = "NSPrintInfo.rs"] +mod __NSPrintInfo; +#[path = "NSPrintOperation.rs"] +mod __NSPrintOperation; +#[path = "NSPrintPanel.rs"] +mod __NSPrintPanel; +#[path = "NSPrinter.rs"] +mod __NSPrinter; +#[path = "NSProgressIndicator.rs"] +mod __NSProgressIndicator; +#[path = "NSResponder.rs"] +mod __NSResponder; +#[path = "NSRotationGestureRecognizer.rs"] +mod __NSRotationGestureRecognizer; +#[path = "NSRuleEditor.rs"] +mod __NSRuleEditor; +#[path = "NSRulerMarker.rs"] +mod __NSRulerMarker; +#[path = "NSRulerView.rs"] +mod __NSRulerView; +#[path = "NSRunningApplication.rs"] +mod __NSRunningApplication; +#[path = "NSSavePanel.rs"] +mod __NSSavePanel; +#[path = "NSScreen.rs"] +mod __NSScreen; +#[path = "NSScrollView.rs"] +mod __NSScrollView; +#[path = "NSScroller.rs"] +mod __NSScroller; +#[path = "NSScrubber.rs"] +mod __NSScrubber; +#[path = "NSScrubberItemView.rs"] +mod __NSScrubberItemView; +#[path = "NSScrubberLayout.rs"] +mod __NSScrubberLayout; +#[path = "NSSearchField.rs"] +mod __NSSearchField; +#[path = "NSSearchFieldCell.rs"] +mod __NSSearchFieldCell; +#[path = "NSSearchToolbarItem.rs"] +mod __NSSearchToolbarItem; +#[path = "NSSecureTextField.rs"] +mod __NSSecureTextField; +#[path = "NSSegmentedCell.rs"] +mod __NSSegmentedCell; +#[path = "NSSegmentedControl.rs"] +mod __NSSegmentedControl; +#[path = "NSShadow.rs"] +mod __NSShadow; +#[path = "NSSharingService.rs"] +mod __NSSharingService; +#[path = "NSSharingServicePickerToolbarItem.rs"] +mod __NSSharingServicePickerToolbarItem; +#[path = "NSSharingServicePickerTouchBarItem.rs"] +mod __NSSharingServicePickerTouchBarItem; +#[path = "NSSlider.rs"] +mod __NSSlider; +#[path = "NSSliderAccessory.rs"] +mod __NSSliderAccessory; +#[path = "NSSliderCell.rs"] +mod __NSSliderCell; +#[path = "NSSliderTouchBarItem.rs"] +mod __NSSliderTouchBarItem; +#[path = "NSSound.rs"] +mod __NSSound; +#[path = "NSSpeechRecognizer.rs"] +mod __NSSpeechRecognizer; +#[path = "NSSpeechSynthesizer.rs"] +mod __NSSpeechSynthesizer; +#[path = "NSSpellChecker.rs"] +mod __NSSpellChecker; +#[path = "NSSpellProtocol.rs"] +mod __NSSpellProtocol; +#[path = "NSSplitView.rs"] +mod __NSSplitView; +#[path = "NSSplitViewController.rs"] +mod __NSSplitViewController; +#[path = "NSSplitViewItem.rs"] +mod __NSSplitViewItem; +#[path = "NSStackView.rs"] +mod __NSStackView; +#[path = "NSStatusBar.rs"] +mod __NSStatusBar; +#[path = "NSStatusBarButton.rs"] +mod __NSStatusBarButton; +#[path = "NSStatusItem.rs"] +mod __NSStatusItem; +#[path = "NSStepper.rs"] +mod __NSStepper; +#[path = "NSStepperCell.rs"] +mod __NSStepperCell; +#[path = "NSStepperTouchBarItem.rs"] +mod __NSStepperTouchBarItem; +#[path = "NSStoryboard.rs"] +mod __NSStoryboard; +#[path = "NSStoryboardSegue.rs"] +mod __NSStoryboardSegue; +#[path = "NSStringDrawing.rs"] +mod __NSStringDrawing; +#[path = "NSSwitch.rs"] +mod __NSSwitch; +#[path = "NSTabView.rs"] +mod __NSTabView; +#[path = "NSTabViewController.rs"] +mod __NSTabViewController; +#[path = "NSTabViewItem.rs"] +mod __NSTabViewItem; +#[path = "NSTableCellView.rs"] +mod __NSTableCellView; +#[path = "NSTableColumn.rs"] +mod __NSTableColumn; +#[path = "NSTableHeaderCell.rs"] +mod __NSTableHeaderCell; +#[path = "NSTableHeaderView.rs"] +mod __NSTableHeaderView; +#[path = "NSTableRowView.rs"] +mod __NSTableRowView; +#[path = "NSTableView.rs"] +mod __NSTableView; +#[path = "NSTableViewDiffableDataSource.rs"] +mod __NSTableViewDiffableDataSource; +#[path = "NSTableViewRowAction.rs"] +mod __NSTableViewRowAction; +#[path = "NSText.rs"] +mod __NSText; +#[path = "NSTextAlternatives.rs"] +mod __NSTextAlternatives; +#[path = "NSTextAttachment.rs"] +mod __NSTextAttachment; +#[path = "NSTextAttachmentCell.rs"] +mod __NSTextAttachmentCell; +#[path = "NSTextCheckingClient.rs"] +mod __NSTextCheckingClient; +#[path = "NSTextCheckingController.rs"] +mod __NSTextCheckingController; +#[path = "NSTextContainer.rs"] +mod __NSTextContainer; +#[path = "NSTextContent.rs"] +mod __NSTextContent; +#[path = "NSTextContentManager.rs"] +mod __NSTextContentManager; +#[path = "NSTextElement.rs"] +mod __NSTextElement; +#[path = "NSTextField.rs"] +mod __NSTextField; +#[path = "NSTextFieldCell.rs"] +mod __NSTextFieldCell; +#[path = "NSTextFinder.rs"] +mod __NSTextFinder; +#[path = "NSTextInputClient.rs"] +mod __NSTextInputClient; +#[path = "NSTextInputContext.rs"] +mod __NSTextInputContext; +#[path = "NSTextLayoutFragment.rs"] +mod __NSTextLayoutFragment; +#[path = "NSTextLayoutManager.rs"] +mod __NSTextLayoutManager; +#[path = "NSTextLineFragment.rs"] +mod __NSTextLineFragment; +#[path = "NSTextList.rs"] +mod __NSTextList; +#[path = "NSTextRange.rs"] +mod __NSTextRange; +#[path = "NSTextSelection.rs"] +mod __NSTextSelection; +#[path = "NSTextSelectionNavigation.rs"] +mod __NSTextSelectionNavigation; +#[path = "NSTextStorage.rs"] +mod __NSTextStorage; +#[path = "NSTextStorageScripting.rs"] +mod __NSTextStorageScripting; +#[path = "NSTextTable.rs"] +mod __NSTextTable; +#[path = "NSTextView.rs"] +mod __NSTextView; +#[path = "NSTextViewportLayoutController.rs"] +mod __NSTextViewportLayoutController; +#[path = "NSTintConfiguration.rs"] +mod __NSTintConfiguration; +#[path = "NSTitlebarAccessoryViewController.rs"] +mod __NSTitlebarAccessoryViewController; +#[path = "NSTokenField.rs"] +mod __NSTokenField; +#[path = "NSTokenFieldCell.rs"] +mod __NSTokenFieldCell; +#[path = "NSToolbar.rs"] +mod __NSToolbar; +#[path = "NSToolbarItem.rs"] +mod __NSToolbarItem; +#[path = "NSToolbarItemGroup.rs"] +mod __NSToolbarItemGroup; +#[path = "NSTouch.rs"] +mod __NSTouch; +#[path = "NSTouchBar.rs"] +mod __NSTouchBar; +#[path = "NSTouchBarItem.rs"] +mod __NSTouchBarItem; +#[path = "NSTrackingArea.rs"] +mod __NSTrackingArea; +#[path = "NSTrackingSeparatorToolbarItem.rs"] +mod __NSTrackingSeparatorToolbarItem; +#[path = "NSTreeController.rs"] +mod __NSTreeController; +#[path = "NSTreeNode.rs"] +mod __NSTreeNode; +#[path = "NSTypesetter.rs"] +mod __NSTypesetter; +#[path = "NSUserActivity.rs"] +mod __NSUserActivity; +#[path = "NSUserDefaultsController.rs"] +mod __NSUserDefaultsController; +#[path = "NSUserInterfaceCompression.rs"] +mod __NSUserInterfaceCompression; +#[path = "NSUserInterfaceItemIdentification.rs"] +mod __NSUserInterfaceItemIdentification; +#[path = "NSUserInterfaceItemSearching.rs"] +mod __NSUserInterfaceItemSearching; +#[path = "NSUserInterfaceLayout.rs"] +mod __NSUserInterfaceLayout; +#[path = "NSUserInterfaceValidation.rs"] +mod __NSUserInterfaceValidation; +#[path = "NSView.rs"] +mod __NSView; +#[path = "NSViewController.rs"] +mod __NSViewController; +#[path = "NSVisualEffectView.rs"] +mod __NSVisualEffectView; +#[path = "NSWindow.rs"] +mod __NSWindow; +#[path = "NSWindowController.rs"] +mod __NSWindowController; +#[path = "NSWindowRestoration.rs"] +mod __NSWindowRestoration; +#[path = "NSWindowScripting.rs"] +mod __NSWindowScripting; +#[path = "NSWindowTab.rs"] +mod __NSWindowTab; +#[path = "NSWindowTabGroup.rs"] +mod __NSWindowTabGroup; +#[path = "NSWorkspace.rs"] +mod __NSWorkspace; -mod __exported { - pub use super::AppKitErrors::{ - NSFontAssetDownloadError, NSFontErrorMaximum, NSFontErrorMinimum, - NSServiceApplicationLaunchFailedError, NSServiceApplicationNotFoundError, - NSServiceErrorMaximum, NSServiceErrorMinimum, NSServiceInvalidPasteboardDataError, - NSServiceMalformedServiceDictionaryError, NSServiceMiscellaneousError, - NSServiceRequestTimedOutError, NSSharingServiceErrorMaximum, NSSharingServiceErrorMinimum, - NSSharingServiceNotConfiguredError, NSTextReadInapplicableDocumentTypeError, - NSTextReadWriteErrorMaximum, NSTextReadWriteErrorMinimum, - NSTextWriteInapplicableDocumentTypeError, NSWorkspaceAuthorizationInvalidError, - NSWorkspaceErrorMaximum, NSWorkspaceErrorMinimum, - }; - pub use super::NSATSTypesetter::NSATSTypesetter; - pub use super::NSAccessibility::NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification; - pub use super::NSAccessibilityConstants::{ - NSAccessibilityActionName, NSAccessibilityActivationPointAttribute, - NSAccessibilityAllowedValuesAttribute, NSAccessibilityAlternateUIVisibleAttribute, - NSAccessibilityAnnotationAttributeKey, NSAccessibilityAnnotationElement, - NSAccessibilityAnnotationLabel, NSAccessibilityAnnotationLocation, - NSAccessibilityAnnotationPosition, NSAccessibilityAnnotationPositionEnd, - NSAccessibilityAnnotationPositionFullRange, NSAccessibilityAnnotationPositionStart, - NSAccessibilityAnnotationTextAttribute, NSAccessibilityAnnouncementKey, - NSAccessibilityAnnouncementRequestedNotification, - NSAccessibilityApplicationActivatedNotification, - NSAccessibilityApplicationDeactivatedNotification, - NSAccessibilityApplicationHiddenNotification, NSAccessibilityApplicationRole, - NSAccessibilityApplicationShownNotification, NSAccessibilityAscendingSortDirectionValue, - NSAccessibilityAttachmentTextAttribute, NSAccessibilityAttributeName, - NSAccessibilityAttributedStringForRangeParameterizedAttribute, - NSAccessibilityAutocorrectedTextAttribute, NSAccessibilityBackgroundColorTextAttribute, - NSAccessibilityBoundsForRangeParameterizedAttribute, NSAccessibilityBrowserRole, - NSAccessibilityBusyIndicatorRole, NSAccessibilityButtonRole, NSAccessibilityCancelAction, - NSAccessibilityCancelButtonAttribute, - NSAccessibilityCellForColumnAndRowParameterizedAttribute, NSAccessibilityCellRole, - NSAccessibilityCenterTabStopMarkerTypeValue, NSAccessibilityCentimetersUnitValue, - NSAccessibilityCheckBoxRole, NSAccessibilityChildrenAttribute, - NSAccessibilityClearButtonAttribute, NSAccessibilityCloseButtonAttribute, - NSAccessibilityCloseButtonSubrole, NSAccessibilityCollectionListSubrole, - NSAccessibilityColorWellRole, NSAccessibilityColumnCountAttribute, - NSAccessibilityColumnHeaderUIElementsAttribute, NSAccessibilityColumnIndexRangeAttribute, - NSAccessibilityColumnRole, NSAccessibilityColumnTitlesAttribute, - NSAccessibilityColumnsAttribute, NSAccessibilityComboBoxRole, NSAccessibilityConfirmAction, - NSAccessibilityContainsProtectedContentAttribute, NSAccessibilityContentListSubrole, - NSAccessibilityContentsAttribute, NSAccessibilityCreatedNotification, - NSAccessibilityCriticalValueAttribute, NSAccessibilityCustomTextAttribute, - NSAccessibilityDecimalTabStopMarkerTypeValue, NSAccessibilityDecrementAction, - NSAccessibilityDecrementArrowSubrole, NSAccessibilityDecrementButtonAttribute, - NSAccessibilityDecrementPageSubrole, NSAccessibilityDefaultButtonAttribute, - NSAccessibilityDefinitionListSubrole, NSAccessibilityDeleteAction, - NSAccessibilityDescendingSortDirectionValue, NSAccessibilityDescriptionAttribute, - NSAccessibilityDescriptionListSubrole, NSAccessibilityDialogSubrole, - NSAccessibilityDisclosedByRowAttribute, NSAccessibilityDisclosedRowsAttribute, - NSAccessibilityDisclosingAttribute, NSAccessibilityDisclosureLevelAttribute, - NSAccessibilityDisclosureTriangleRole, NSAccessibilityDocumentAttribute, - NSAccessibilityDrawerCreatedNotification, NSAccessibilityDrawerRole, - NSAccessibilityEditedAttribute, NSAccessibilityEnabledAttribute, - NSAccessibilityErrorCodeExceptionInfo, NSAccessibilityExpandedAttribute, - NSAccessibilityExtrasMenuBarAttribute, NSAccessibilityFilenameAttribute, - NSAccessibilityFirstLineIndentMarkerTypeValue, NSAccessibilityFloatingWindowSubrole, - NSAccessibilityFocusedAttribute, NSAccessibilityFocusedUIElementAttribute, - NSAccessibilityFocusedUIElementChangedNotification, NSAccessibilityFocusedWindowAttribute, - NSAccessibilityFocusedWindowChangedNotification, NSAccessibilityFontAttributeKey, - NSAccessibilityFontFamilyKey, NSAccessibilityFontNameKey, NSAccessibilityFontSizeKey, - NSAccessibilityFontTextAttribute, NSAccessibilityForegroundColorTextAttribute, - NSAccessibilityFrontmostAttribute, NSAccessibilityFullScreenButtonAttribute, - NSAccessibilityFullScreenButtonSubrole, NSAccessibilityGridRole, NSAccessibilityGroupRole, - NSAccessibilityGrowAreaAttribute, NSAccessibilityGrowAreaRole, NSAccessibilityHandleRole, - NSAccessibilityHandlesAttribute, NSAccessibilityHeadIndentMarkerTypeValue, - NSAccessibilityHeaderAttribute, NSAccessibilityHelpAttribute, - NSAccessibilityHelpTagCreatedNotification, NSAccessibilityHelpTagRole, - NSAccessibilityHiddenAttribute, NSAccessibilityHorizontalOrientationValue, - NSAccessibilityHorizontalScrollBarAttribute, - NSAccessibilityHorizontalUnitDescriptionAttribute, NSAccessibilityHorizontalUnitsAttribute, - NSAccessibilityIdentifierAttribute, NSAccessibilityImageRole, - NSAccessibilityInchesUnitValue, NSAccessibilityIncrementAction, - NSAccessibilityIncrementArrowSubrole, NSAccessibilityIncrementButtonAttribute, - NSAccessibilityIncrementPageSubrole, NSAccessibilityIncrementorRole, - NSAccessibilityIndexAttribute, NSAccessibilityInsertionPointLineNumberAttribute, - NSAccessibilityLabelUIElementsAttribute, NSAccessibilityLabelValueAttribute, - NSAccessibilityLanguageTextAttribute, NSAccessibilityLayoutAreaRole, - NSAccessibilityLayoutChangedNotification, NSAccessibilityLayoutItemRole, - NSAccessibilityLayoutPointForScreenPointParameterizedAttribute, - NSAccessibilityLayoutSizeForScreenSizeParameterizedAttribute, - NSAccessibilityLeftTabStopMarkerTypeValue, NSAccessibilityLevelIndicatorRole, - NSAccessibilityLineForIndexParameterizedAttribute, NSAccessibilityLinkRole, - NSAccessibilityLinkTextAttribute, NSAccessibilityLinkedUIElementsAttribute, - NSAccessibilityListItemIndexTextAttribute, NSAccessibilityListItemLevelTextAttribute, - NSAccessibilityListItemPrefixTextAttribute, NSAccessibilityListRole, - NSAccessibilityLoadingToken, NSAccessibilityMainAttribute, - NSAccessibilityMainWindowAttribute, NSAccessibilityMainWindowChangedNotification, - NSAccessibilityMarkedMisspelledTextAttribute, NSAccessibilityMarkerGroupUIElementAttribute, - NSAccessibilityMarkerTypeAttribute, NSAccessibilityMarkerTypeDescriptionAttribute, - NSAccessibilityMarkerUIElementsAttribute, NSAccessibilityMarkerValuesAttribute, - NSAccessibilityMatteContentUIElementAttribute, NSAccessibilityMatteHoleAttribute, - NSAccessibilityMatteRole, NSAccessibilityMaxValueAttribute, - NSAccessibilityMenuBarAttribute, NSAccessibilityMenuBarItemRole, - NSAccessibilityMenuBarRole, NSAccessibilityMenuButtonRole, NSAccessibilityMenuItemRole, - NSAccessibilityMenuRole, NSAccessibilityMinValueAttribute, - NSAccessibilityMinimizeButtonAttribute, NSAccessibilityMinimizeButtonSubrole, - NSAccessibilityMinimizedAttribute, NSAccessibilityMisspelledTextAttribute, - NSAccessibilityModalAttribute, NSAccessibilityMovedNotification, - NSAccessibilityNextContentsAttribute, NSAccessibilityNotificationName, - NSAccessibilityNotificationUserInfoKey, NSAccessibilityNumberOfCharactersAttribute, - NSAccessibilityOrderedByRowAttribute, NSAccessibilityOrientation, - NSAccessibilityOrientationAttribute, NSAccessibilityOrientationHorizontal, - NSAccessibilityOrientationUnknown, NSAccessibilityOrientationValue, - NSAccessibilityOrientationVertical, NSAccessibilityOutlineRole, - NSAccessibilityOutlineRowSubrole, NSAccessibilityOverflowButtonAttribute, - NSAccessibilityPageRole, NSAccessibilityParameterizedAttributeName, - NSAccessibilityParentAttribute, NSAccessibilityPicasUnitValue, NSAccessibilityPickAction, - NSAccessibilityPlaceholderValueAttribute, NSAccessibilityPointsUnitValue, - NSAccessibilityPopUpButtonRole, NSAccessibilityPopoverRole, - NSAccessibilityPositionAttribute, NSAccessibilityPressAction, - NSAccessibilityPreviousContentsAttribute, NSAccessibilityPriorityHigh, - NSAccessibilityPriorityKey, NSAccessibilityPriorityLevel, NSAccessibilityPriorityLow, - NSAccessibilityPriorityMedium, NSAccessibilityProgressIndicatorRole, - NSAccessibilityProxyAttribute, NSAccessibilityRTFForRangeParameterizedAttribute, - NSAccessibilityRadioButtonRole, NSAccessibilityRadioGroupRole, NSAccessibilityRaiseAction, - NSAccessibilityRangeForIndexParameterizedAttribute, - NSAccessibilityRangeForLineParameterizedAttribute, - NSAccessibilityRangeForPositionParameterizedAttribute, - NSAccessibilityRatingIndicatorSubrole, NSAccessibilityRelevanceIndicatorRole, - NSAccessibilityRequiredAttribute, NSAccessibilityResizedNotification, - NSAccessibilityRightTabStopMarkerTypeValue, NSAccessibilityRole, - NSAccessibilityRoleAttribute, NSAccessibilityRoleDescriptionAttribute, - NSAccessibilityRowCollapsedNotification, NSAccessibilityRowCountAttribute, - NSAccessibilityRowCountChangedNotification, NSAccessibilityRowExpandedNotification, - NSAccessibilityRowHeaderUIElementsAttribute, NSAccessibilityRowIndexRangeAttribute, - NSAccessibilityRowRole, NSAccessibilityRowsAttribute, NSAccessibilityRulerMarkerRole, - NSAccessibilityRulerMarkerType, NSAccessibilityRulerMarkerTypeIndentFirstLine, - NSAccessibilityRulerMarkerTypeIndentHead, NSAccessibilityRulerMarkerTypeIndentTail, - NSAccessibilityRulerMarkerTypeTabStopCenter, NSAccessibilityRulerMarkerTypeTabStopDecimal, - NSAccessibilityRulerMarkerTypeTabStopLeft, NSAccessibilityRulerMarkerTypeTabStopRight, - NSAccessibilityRulerMarkerTypeUnknown, NSAccessibilityRulerMarkerTypeValue, - NSAccessibilityRulerRole, NSAccessibilityRulerUnitValue, - NSAccessibilityScreenPointForLayoutPointParameterizedAttribute, - NSAccessibilityScreenSizeForLayoutSizeParameterizedAttribute, - NSAccessibilityScrollAreaRole, NSAccessibilityScrollBarRole, - NSAccessibilitySearchButtonAttribute, NSAccessibilitySearchFieldSubrole, - NSAccessibilitySearchMenuAttribute, NSAccessibilitySectionListSubrole, - NSAccessibilitySecureTextFieldSubrole, NSAccessibilitySelectedAttribute, - NSAccessibilitySelectedCellsAttribute, NSAccessibilitySelectedCellsChangedNotification, - NSAccessibilitySelectedChildrenAttribute, - NSAccessibilitySelectedChildrenChangedNotification, - NSAccessibilitySelectedChildrenMovedNotification, NSAccessibilitySelectedColumnsAttribute, - NSAccessibilitySelectedColumnsChangedNotification, NSAccessibilitySelectedRowsAttribute, - NSAccessibilitySelectedRowsChangedNotification, NSAccessibilitySelectedTextAttribute, - NSAccessibilitySelectedTextChangedNotification, NSAccessibilitySelectedTextRangeAttribute, - NSAccessibilitySelectedTextRangesAttribute, - NSAccessibilityServesAsTitleForUIElementsAttribute, NSAccessibilityShadowTextAttribute, - NSAccessibilitySharedCharacterRangeAttribute, NSAccessibilitySharedFocusElementsAttribute, - NSAccessibilitySharedTextUIElementsAttribute, NSAccessibilitySheetCreatedNotification, - NSAccessibilitySheetRole, NSAccessibilityShowAlternateUIAction, - NSAccessibilityShowDefaultUIAction, NSAccessibilityShowMenuAction, - NSAccessibilityShownMenuAttribute, NSAccessibilitySizeAttribute, NSAccessibilitySliderRole, - NSAccessibilitySortButtonRole, NSAccessibilitySortButtonSubrole, - NSAccessibilitySortDirection, NSAccessibilitySortDirectionAscending, - NSAccessibilitySortDirectionAttribute, NSAccessibilitySortDirectionDescending, - NSAccessibilitySortDirectionUnknown, NSAccessibilitySortDirectionValue, - NSAccessibilitySplitGroupRole, NSAccessibilitySplitterRole, - NSAccessibilitySplittersAttribute, NSAccessibilityStandardWindowSubrole, - NSAccessibilityStaticTextRole, NSAccessibilityStrikethroughColorTextAttribute, - NSAccessibilityStrikethroughTextAttribute, - NSAccessibilityStringForRangeParameterizedAttribute, - NSAccessibilityStyleRangeForIndexParameterizedAttribute, NSAccessibilitySubrole, - NSAccessibilitySubroleAttribute, NSAccessibilitySuperscriptTextAttribute, - NSAccessibilitySwitchSubrole, NSAccessibilitySystemDialogSubrole, - NSAccessibilitySystemFloatingWindowSubrole, NSAccessibilitySystemWideRole, - NSAccessibilityTabButtonSubrole, NSAccessibilityTabGroupRole, NSAccessibilityTableRole, - NSAccessibilityTableRowSubrole, NSAccessibilityTabsAttribute, - NSAccessibilityTailIndentMarkerTypeValue, NSAccessibilityTextAlignmentAttribute, - NSAccessibilityTextAreaRole, NSAccessibilityTextAttachmentSubrole, - NSAccessibilityTextFieldRole, NSAccessibilityTextLinkSubrole, - NSAccessibilityTimelineSubrole, NSAccessibilityTitleAttribute, - NSAccessibilityTitleChangedNotification, NSAccessibilityTitleUIElementAttribute, - NSAccessibilityToggleSubrole, NSAccessibilityToolbarButtonAttribute, - NSAccessibilityToolbarButtonSubrole, NSAccessibilityToolbarRole, - NSAccessibilityTopLevelUIElementAttribute, NSAccessibilityUIElementDestroyedNotification, - NSAccessibilityUIElementsKey, NSAccessibilityURLAttribute, - NSAccessibilityUnderlineColorTextAttribute, NSAccessibilityUnderlineTextAttribute, - NSAccessibilityUnitDescriptionAttribute, NSAccessibilityUnits, - NSAccessibilityUnitsAttribute, NSAccessibilityUnitsCentimeters, - NSAccessibilityUnitsChangedNotification, NSAccessibilityUnitsInches, - NSAccessibilityUnitsPicas, NSAccessibilityUnitsPoints, NSAccessibilityUnitsUnknown, - NSAccessibilityUnknownMarkerTypeValue, NSAccessibilityUnknownOrientationValue, - NSAccessibilityUnknownRole, NSAccessibilityUnknownSortDirectionValue, - NSAccessibilityUnknownSubrole, NSAccessibilityUnknownUnitValue, - NSAccessibilityValueAttribute, NSAccessibilityValueChangedNotification, - NSAccessibilityValueDescriptionAttribute, NSAccessibilityValueIndicatorRole, - NSAccessibilityVerticalOrientationValue, NSAccessibilityVerticalScrollBarAttribute, - NSAccessibilityVerticalUnitDescriptionAttribute, NSAccessibilityVerticalUnitsAttribute, - NSAccessibilityVisibleCellsAttribute, NSAccessibilityVisibleCharacterRangeAttribute, - NSAccessibilityVisibleChildrenAttribute, NSAccessibilityVisibleColumnsAttribute, - NSAccessibilityVisibleNameKey, NSAccessibilityVisibleRowsAttribute, - NSAccessibilityWarningValueAttribute, NSAccessibilityWindowAttribute, - NSAccessibilityWindowCreatedNotification, NSAccessibilityWindowDeminiaturizedNotification, - NSAccessibilityWindowMiniaturizedNotification, NSAccessibilityWindowMovedNotification, - NSAccessibilityWindowResizedNotification, NSAccessibilityWindowRole, - NSAccessibilityWindowsAttribute, NSAccessibilityZoomButtonAttribute, - NSAccessibilityZoomButtonSubrole, - }; - pub use super::NSAccessibilityCustomAction::NSAccessibilityCustomAction; - pub use super::NSAccessibilityCustomRotor::{ - NSAccessibilityCustomRotor, NSAccessibilityCustomRotorItemResult, - NSAccessibilityCustomRotorItemSearchDelegate, NSAccessibilityCustomRotorSearchDirection, - NSAccessibilityCustomRotorSearchDirectionNext, - NSAccessibilityCustomRotorSearchDirectionPrevious, - NSAccessibilityCustomRotorSearchParameters, NSAccessibilityCustomRotorType, - NSAccessibilityCustomRotorTypeAnnotation, NSAccessibilityCustomRotorTypeAny, - NSAccessibilityCustomRotorTypeAudiograph, NSAccessibilityCustomRotorTypeBoldText, - NSAccessibilityCustomRotorTypeCustom, NSAccessibilityCustomRotorTypeHeading, - NSAccessibilityCustomRotorTypeHeadingLevel1, NSAccessibilityCustomRotorTypeHeadingLevel2, - NSAccessibilityCustomRotorTypeHeadingLevel3, NSAccessibilityCustomRotorTypeHeadingLevel4, - NSAccessibilityCustomRotorTypeHeadingLevel5, NSAccessibilityCustomRotorTypeHeadingLevel6, - NSAccessibilityCustomRotorTypeImage, NSAccessibilityCustomRotorTypeItalicText, - NSAccessibilityCustomRotorTypeLandmark, NSAccessibilityCustomRotorTypeLink, - NSAccessibilityCustomRotorTypeList, NSAccessibilityCustomRotorTypeMisspelledWord, - NSAccessibilityCustomRotorTypeTable, NSAccessibilityCustomRotorTypeTextField, - NSAccessibilityCustomRotorTypeUnderlinedText, NSAccessibilityCustomRotorTypeVisitedLink, - }; - pub use super::NSAccessibilityElement::NSAccessibilityElement; - pub use super::NSAccessibilityProtocols::{ - NSAccessibility, NSAccessibilityButton, NSAccessibilityCheckBox, - NSAccessibilityContainsTransientUI, NSAccessibilityElementLoading, NSAccessibilityGroup, - NSAccessibilityImage, NSAccessibilityLayoutArea, NSAccessibilityLayoutItem, - NSAccessibilityList, NSAccessibilityNavigableStaticText, NSAccessibilityOutline, - NSAccessibilityProgressIndicator, NSAccessibilityRadioButton, NSAccessibilityRow, - NSAccessibilitySlider, NSAccessibilityStaticText, NSAccessibilityStepper, - NSAccessibilitySwitch, NSAccessibilityTable, - }; - pub use super::NSActionCell::NSActionCell; - pub use super::NSAlert::{ - NSAlert, NSAlertDelegate, NSAlertFirstButtonReturn, NSAlertSecondButtonReturn, - NSAlertStyle, NSAlertStyleCritical, NSAlertStyleInformational, NSAlertStyleWarning, - NSAlertThirdButtonReturn, NSCriticalAlertStyle, NSInformationalAlertStyle, - NSWarningAlertStyle, - }; - pub use super::NSAlignmentFeedbackFilter::{ - NSAlignmentFeedbackFilter, NSAlignmentFeedbackToken, - }; - pub use super::NSAnimation::{ - NSAnimatablePropertyContainer, NSAnimatablePropertyKey, NSAnimation, NSAnimationBlocking, - NSAnimationBlockingMode, NSAnimationCurve, NSAnimationDelegate, NSAnimationEaseIn, - NSAnimationEaseInOut, NSAnimationEaseOut, NSAnimationLinear, NSAnimationNonblocking, - NSAnimationNonblockingThreaded, NSAnimationProgress, NSAnimationProgressMark, - NSAnimationProgressMarkNotification, NSAnimationTriggerOrderIn, NSAnimationTriggerOrderOut, - NSViewAnimation, NSViewAnimationEffectKey, NSViewAnimationEffectName, - NSViewAnimationEndFrameKey, NSViewAnimationFadeInEffect, NSViewAnimationFadeOutEffect, - NSViewAnimationKey, NSViewAnimationStartFrameKey, NSViewAnimationTargetKey, - }; - pub use super::NSAnimationContext::NSAnimationContext; - pub use super::NSAppearance::{ - NSAppearance, NSAppearanceCustomization, NSAppearanceName, - NSAppearanceNameAccessibilityHighContrastAqua, - NSAppearanceNameAccessibilityHighContrastDarkAqua, - NSAppearanceNameAccessibilityHighContrastVibrantDark, - NSAppearanceNameAccessibilityHighContrastVibrantLight, NSAppearanceNameAqua, - NSAppearanceNameDarkAqua, NSAppearanceNameLightContent, NSAppearanceNameVibrantDark, - NSAppearanceNameVibrantLight, - }; - pub use super::NSApplication::{ - NSAboutPanelOptionApplicationIcon, NSAboutPanelOptionApplicationName, - NSAboutPanelOptionApplicationVersion, NSAboutPanelOptionCredits, NSAboutPanelOptionKey, - NSAboutPanelOptionVersion, NSApp, NSAppKitVersion, NSAppKitVersionNumber, - NSAppKitVersionNumber10_0, NSAppKitVersionNumber10_1, NSAppKitVersionNumber10_10, - NSAppKitVersionNumber10_10_2, NSAppKitVersionNumber10_10_3, NSAppKitVersionNumber10_10_4, - NSAppKitVersionNumber10_10_5, NSAppKitVersionNumber10_10_Max, NSAppKitVersionNumber10_11, - NSAppKitVersionNumber10_11_1, NSAppKitVersionNumber10_11_2, NSAppKitVersionNumber10_11_3, - NSAppKitVersionNumber10_12, NSAppKitVersionNumber10_12_1, NSAppKitVersionNumber10_12_2, - NSAppKitVersionNumber10_13, NSAppKitVersionNumber10_13_1, NSAppKitVersionNumber10_13_2, - NSAppKitVersionNumber10_13_4, NSAppKitVersionNumber10_14, NSAppKitVersionNumber10_14_1, - NSAppKitVersionNumber10_14_2, NSAppKitVersionNumber10_14_3, NSAppKitVersionNumber10_14_4, - NSAppKitVersionNumber10_14_5, NSAppKitVersionNumber10_15, NSAppKitVersionNumber10_15_1, - NSAppKitVersionNumber10_15_2, NSAppKitVersionNumber10_15_3, NSAppKitVersionNumber10_15_4, - NSAppKitVersionNumber10_15_5, NSAppKitVersionNumber10_15_6, NSAppKitVersionNumber10_2, - NSAppKitVersionNumber10_2_3, NSAppKitVersionNumber10_3, NSAppKitVersionNumber10_3_2, - NSAppKitVersionNumber10_3_3, NSAppKitVersionNumber10_3_5, NSAppKitVersionNumber10_3_7, - NSAppKitVersionNumber10_3_9, NSAppKitVersionNumber10_4, NSAppKitVersionNumber10_4_1, - NSAppKitVersionNumber10_4_3, NSAppKitVersionNumber10_4_4, NSAppKitVersionNumber10_4_7, - NSAppKitVersionNumber10_5, NSAppKitVersionNumber10_5_2, NSAppKitVersionNumber10_5_3, - NSAppKitVersionNumber10_6, NSAppKitVersionNumber10_7, NSAppKitVersionNumber10_7_2, - NSAppKitVersionNumber10_7_3, NSAppKitVersionNumber10_7_4, NSAppKitVersionNumber10_8, - NSAppKitVersionNumber10_9, NSAppKitVersionNumber11_0, NSAppKitVersionNumber11_1, - NSAppKitVersionNumber11_2, NSAppKitVersionNumber11_3, NSAppKitVersionNumber11_4, - NSApplication, NSApplicationDelegate, NSApplicationDelegateReply, - NSApplicationDelegateReplyCancel, NSApplicationDelegateReplyFailure, - NSApplicationDelegateReplySuccess, NSApplicationDidBecomeActiveNotification, - NSApplicationDidChangeOcclusionStateNotification, - NSApplicationDidChangeScreenParametersNotification, - NSApplicationDidFinishLaunchingNotification, NSApplicationDidHideNotification, - NSApplicationDidResignActiveNotification, NSApplicationDidUnhideNotification, - NSApplicationDidUpdateNotification, NSApplicationLaunchIsDefaultLaunchKey, - NSApplicationLaunchRemoteNotificationKey, NSApplicationLaunchUserNotificationKey, - NSApplicationOcclusionState, NSApplicationOcclusionStateVisible, - NSApplicationPresentationAutoHideDock, NSApplicationPresentationAutoHideMenuBar, - NSApplicationPresentationAutoHideToolbar, NSApplicationPresentationDefault, - NSApplicationPresentationDisableAppleMenu, - NSApplicationPresentationDisableCursorLocationAssistance, - NSApplicationPresentationDisableForceQuit, NSApplicationPresentationDisableHideApplication, - NSApplicationPresentationDisableMenuBarTransparency, - NSApplicationPresentationDisableProcessSwitching, - NSApplicationPresentationDisableSessionTermination, NSApplicationPresentationFullScreen, - NSApplicationPresentationHideDock, NSApplicationPresentationHideMenuBar, - NSApplicationPresentationOptions, NSApplicationPrintReply, - NSApplicationProtectedDataDidBecomeAvailableNotification, - NSApplicationProtectedDataWillBecomeUnavailableNotification, NSApplicationTerminateReply, - NSApplicationWillBecomeActiveNotification, NSApplicationWillFinishLaunchingNotification, - NSApplicationWillHideNotification, NSApplicationWillResignActiveNotification, - NSApplicationWillTerminateNotification, NSApplicationWillUnhideNotification, - NSApplicationWillUpdateNotification, NSCriticalRequest, NSEventTrackingRunLoopMode, - NSInformationalRequest, NSModalPanelRunLoopMode, NSModalResponse, NSModalResponseAbort, - NSModalResponseContinue, NSModalResponseStop, NSModalSession, NSPrintingCancelled, - NSPrintingFailure, NSPrintingReplyLater, NSPrintingSuccess, NSRemoteNotificationType, - NSRemoteNotificationTypeAlert, NSRemoteNotificationTypeBadge, NSRemoteNotificationTypeNone, - NSRemoteNotificationTypeSound, NSRequestUserAttentionType, NSRunAbortedResponse, - NSRunContinuesResponse, NSRunStoppedResponse, NSServiceProviderName, - NSServicesMenuRequestor, NSTerminateCancel, NSTerminateLater, NSTerminateNow, - NSUpdateWindowsRunLoopOrdering, NSWindowListOptions, NSWindowListOrderedFrontToBack, - }; - pub use super::NSArrayController::NSArrayController; - pub use super::NSAttributedString::{ - NSAppearanceDocumentAttribute, NSAttachmentAttributeName, - NSAttributedStringDocumentAttributeKey, NSAttributedStringDocumentReadingOptionKey, - NSAttributedStringDocumentType, NSAuthorDocumentAttribute, NSBackgroundColorAttributeName, - NSBackgroundColorDocumentAttribute, NSBaseURLDocumentOption, NSBaselineOffsetAttributeName, - NSBottomMarginDocumentAttribute, NSCategoryDocumentAttribute, - NSCharacterEncodingDocumentAttribute, NSCharacterEncodingDocumentOption, - NSCharacterShapeAttributeName, NSCocoaVersionDocumentAttribute, NSCommentDocumentAttribute, - NSCompanyDocumentAttribute, NSConvertedDocumentAttribute, NSCopyrightDocumentAttribute, - NSCreationTimeDocumentAttribute, NSCursorAttributeName, - NSDefaultAttributesDocumentAttribute, NSDefaultAttributesDocumentOption, - NSDefaultTabIntervalDocumentAttribute, NSDocFormatTextDocumentType, - NSDocumentTypeDocumentAttribute, NSDocumentTypeDocumentOption, NSEditorDocumentAttribute, - NSExcludedElementsDocumentAttribute, NSExpansionAttributeName, NSFileTypeDocumentAttribute, - NSFileTypeDocumentOption, NSFontAttributeName, NSForegroundColorAttributeName, - NSGlyphInfoAttributeName, NSHTMLTextDocumentType, NSHyphenationFactorDocumentAttribute, - NSKernAttributeName, NSKeywordsDocumentAttribute, NSLeftMarginDocumentAttribute, - NSLigatureAttributeName, NSLinkAttributeName, NSMacSimpleTextDocumentType, - NSManagerDocumentAttribute, NSMarkedClauseSegmentAttributeName, - NSModificationTimeDocumentAttribute, NSNoUnderlineStyle, NSObliquenessAttributeName, - NSOfficeOpenXMLTextDocumentType, NSOpenDocumentTextDocumentType, - NSPaperSizeDocumentAttribute, NSParagraphStyleAttributeName, NSPlainTextDocumentType, - NSPrefixSpacesDocumentAttribute, NSRTFDTextDocumentType, NSRTFTextDocumentType, - NSReadOnlyDocumentAttribute, NSRightMarginDocumentAttribute, NSShadowAttributeName, - NSSingleUnderlineStyle, NSSourceTextScalingDocumentAttribute, - NSSourceTextScalingDocumentOption, NSSpellingState, NSSpellingStateAttributeName, - NSSpellingStateGrammarFlag, NSSpellingStateSpellingFlag, NSStrikethroughColorAttributeName, - NSStrikethroughStyleAttributeName, NSStrokeColorAttributeName, NSStrokeWidthAttributeName, - NSSubjectDocumentAttribute, NSSuperscriptAttributeName, NSTargetTextScalingDocumentOption, - NSTextAlternativesAttributeName, NSTextEffectAttributeName, NSTextEffectLetterpressStyle, - NSTextEffectStyle, NSTextEncodingNameDocumentAttribute, NSTextEncodingNameDocumentOption, - NSTextLayoutSectionKey, NSTextLayoutSectionOrientation, NSTextLayoutSectionRange, - NSTextLayoutSectionsAttribute, NSTextScalingDocumentAttribute, NSTextScalingStandard, - NSTextScalingType, NSTextScalingiOS, NSTextSizeMultiplierDocumentOption, - NSTimeoutDocumentOption, NSTitleDocumentAttribute, NSToolTipAttributeName, - NSTopMarginDocumentAttribute, NSTrackingAttributeName, NSUnderlineByWord, - NSUnderlineByWordMask, NSUnderlineColorAttributeName, NSUnderlinePatternDash, - NSUnderlinePatternDashDot, NSUnderlinePatternDashDotDot, NSUnderlinePatternDot, - NSUnderlinePatternSolid, NSUnderlineStrikethroughMask, NSUnderlineStyle, - NSUnderlineStyleAttributeName, NSUnderlineStyleByWord, NSUnderlineStyleDouble, - NSUnderlineStyleNone, NSUnderlineStylePatternDash, NSUnderlineStylePatternDashDot, - NSUnderlineStylePatternDashDotDot, NSUnderlineStylePatternDot, - NSUnderlineStylePatternSolid, NSUnderlineStyleSingle, NSUnderlineStyleThick, - NSUsesScreenFontsDocumentAttribute, NSVerticalGlyphFormAttributeName, - NSViewModeDocumentAttribute, NSViewSizeDocumentAttribute, NSViewZoomDocumentAttribute, - NSWebArchiveTextDocumentType, NSWebPreferencesDocumentOption, - NSWebResourceLoadDelegateDocumentOption, NSWordMLTextDocumentType, - NSWritingDirectionAttributeName, NSWritingDirectionEmbedding, NSWritingDirectionFormatType, - NSWritingDirectionOverride, - }; - pub use super::NSBezierPath::{ - NSBevelLineJoinStyle, NSBezierPath, NSBezierPathElement, NSBezierPathElementClosePath, - NSBezierPathElementCurveTo, NSBezierPathElementLineTo, NSBezierPathElementMoveTo, - NSButtLineCapStyle, NSClosePathBezierPathElement, NSCurveToBezierPathElement, - NSEvenOddWindingRule, NSLineCapStyle, NSLineCapStyleButt, NSLineCapStyleRound, - NSLineCapStyleSquare, NSLineJoinStyle, NSLineJoinStyleBevel, NSLineJoinStyleMiter, - NSLineJoinStyleRound, NSLineToBezierPathElement, NSMiterLineJoinStyle, - NSMoveToBezierPathElement, NSNonZeroWindingRule, NSRoundLineCapStyle, NSRoundLineJoinStyle, - NSSquareLineCapStyle, NSWindingRule, NSWindingRuleEvenOdd, NSWindingRuleNonZero, - }; - pub use super::NSBitmapImageRep::{ - NS16BitBigEndianBitmapFormat, NS16BitLittleEndianBitmapFormat, - NS32BitBigEndianBitmapFormat, NS32BitLittleEndianBitmapFormat, NSAlphaFirstBitmapFormat, - NSAlphaNonpremultipliedBitmapFormat, NSBMPFileType, NSBitmapFormat, - NSBitmapFormatAlphaFirst, NSBitmapFormatAlphaNonpremultiplied, - NSBitmapFormatFloatingPointSamples, NSBitmapFormatSixteenBitBigEndian, - NSBitmapFormatSixteenBitLittleEndian, NSBitmapFormatThirtyTwoBitBigEndian, - NSBitmapFormatThirtyTwoBitLittleEndian, NSBitmapImageFileType, NSBitmapImageFileTypeBMP, - NSBitmapImageFileTypeGIF, NSBitmapImageFileTypeJPEG, NSBitmapImageFileTypeJPEG2000, - NSBitmapImageFileTypePNG, NSBitmapImageFileTypeTIFF, NSBitmapImageRep, - NSBitmapImageRepPropertyKey, NSFloatingPointSamplesBitmapFormat, NSGIFFileType, - NSImageColorSyncProfileData, NSImageCompressionFactor, NSImageCompressionMethod, - NSImageCurrentFrame, NSImageCurrentFrameDuration, NSImageDitherTransparency, - NSImageEXIFData, NSImageFallbackBackgroundColor, NSImageFrameCount, NSImageGamma, - NSImageIPTCData, NSImageInterlaced, NSImageLoopCount, NSImageProgressive, - NSImageRGBColorTable, NSImageRepLoadStatus, NSImageRepLoadStatusCompleted, - NSImageRepLoadStatusInvalidData, NSImageRepLoadStatusReadingHeader, - NSImageRepLoadStatusUnexpectedEOF, NSImageRepLoadStatusUnknownType, - NSImageRepLoadStatusWillNeedAllData, NSJPEG2000FileType, NSJPEGFileType, NSPNGFileType, - NSTIFFCompression, NSTIFFCompressionCCITTFAX3, NSTIFFCompressionCCITTFAX4, - NSTIFFCompressionJPEG, NSTIFFCompressionLZW, NSTIFFCompressionNEXT, NSTIFFCompressionNone, - NSTIFFCompressionOldJPEG, NSTIFFCompressionPackBits, NSTIFFFileType, - }; - pub use super::NSBox::{ - NSAboveBottom, NSAboveTop, NSAtBottom, NSAtTop, NSBelowBottom, NSBelowTop, NSBox, - NSBoxCustom, NSBoxOldStyle, NSBoxPrimary, NSBoxSecondary, NSBoxSeparator, NSBoxType, - NSNoTitle, NSTitlePosition, - }; - pub use super::NSBrowser::{ - NSAppKitVersionNumberWithColumnResizingBrowser, - NSAppKitVersionNumberWithContinuousScrollingBrowser, NSBrowser, - NSBrowserAutoColumnResizing, NSBrowserColumnConfigurationDidChangeNotification, - NSBrowserColumnResizingType, NSBrowserColumnsAutosaveName, NSBrowserDelegate, - NSBrowserDropAbove, NSBrowserDropOn, NSBrowserDropOperation, NSBrowserNoColumnResizing, - NSBrowserUserColumnResizing, - }; - pub use super::NSBrowserCell::NSBrowserCell; - pub use super::NSButton::NSButton; - pub use super::NSButtonCell::{ - NSAcceleratorButton, NSBezelStyle, NSBezelStyleCircular, NSBezelStyleDisclosure, - NSBezelStyleHelpButton, NSBezelStyleInline, NSBezelStyleRecessed, - NSBezelStyleRegularSquare, NSBezelStyleRoundRect, NSBezelStyleRounded, - NSBezelStyleRoundedDisclosure, NSBezelStyleShadowlessSquare, NSBezelStyleSmallSquare, - NSBezelStyleTexturedRounded, NSBezelStyleTexturedSquare, NSButtonCell, NSButtonType, - NSButtonTypeAccelerator, NSButtonTypeMomentaryChange, NSButtonTypeMomentaryLight, - NSButtonTypeMomentaryPushIn, NSButtonTypeMultiLevelAccelerator, NSButtonTypeOnOff, - NSButtonTypePushOnPushOff, NSButtonTypeRadio, NSButtonTypeSwitch, NSButtonTypeToggle, - NSCircularBezelStyle, NSDisclosureBezelStyle, NSGradientConcaveStrong, - NSGradientConcaveWeak, NSGradientConvexStrong, NSGradientConvexWeak, NSGradientNone, - NSGradientType, NSHelpButtonBezelStyle, NSInlineBezelStyle, NSMomentaryChangeButton, - NSMomentaryLight, NSMomentaryLightButton, NSMomentaryPushButton, NSMomentaryPushInButton, - NSMultiLevelAcceleratorButton, NSOnOffButton, NSPushOnPushOffButton, NSRadioButton, - NSRecessedBezelStyle, NSRegularSquareBezelStyle, NSRoundRectBezelStyle, - NSRoundedBezelStyle, NSRoundedDisclosureBezelStyle, NSShadowlessSquareBezelStyle, - NSSmallIconButtonBezelStyle, NSSmallSquareBezelStyle, NSSwitchButton, - NSTexturedRoundedBezelStyle, NSTexturedSquareBezelStyle, NSThickSquareBezelStyle, - NSThickerSquareBezelStyle, NSToggleButton, - }; - pub use super::NSButtonTouchBarItem::NSButtonTouchBarItem; - pub use super::NSCIImageRep::NSCIImageRep; - pub use super::NSCachedImageRep::NSCachedImageRep; - pub use super::NSCandidateListTouchBarItem::{ - NSCandidateListTouchBarItem, NSCandidateListTouchBarItemDelegate, - NSTouchBarItemIdentifierCandidateList, - }; - pub use super::NSCell::{ - NSAnyType, NSBackgroundStyle, NSBackgroundStyleDark, NSBackgroundStyleEmphasized, - NSBackgroundStyleLight, NSBackgroundStyleLowered, NSBackgroundStyleNormal, - NSBackgroundStyleRaised, NSBlueControlTint, NSCell, NSCellAllowsMixedState, - NSCellAttribute, NSCellChangesContents, NSCellDisabled, NSCellEditable, - NSCellHasImageHorizontal, NSCellHasImageOnLeftOrBottom, NSCellHasOverlappingImage, - NSCellHighlighted, NSCellHitContentArea, NSCellHitEditableTextArea, NSCellHitNone, - NSCellHitResult, NSCellHitTrackableArea, NSCellImagePosition, NSCellIsBordered, - NSCellIsInsetButton, NSCellLightsByBackground, NSCellLightsByContents, NSCellLightsByGray, - NSCellState, NSCellStateValue, NSCellStyleMask, NSCellType, NSChangeBackgroundCell, - NSChangeBackgroundCellMask, NSChangeGrayCell, NSChangeGrayCellMask, NSClearControlTint, - NSContentsCellMask, NSControlSize, NSControlSizeLarge, NSControlSizeMini, - NSControlSizeRegular, NSControlSizeSmall, NSControlStateValue, NSControlStateValueMixed, - NSControlStateValueOff, NSControlStateValueOn, NSControlTint, - NSControlTintDidChangeNotification, NSDefaultControlTint, NSDoubleType, NSFloatType, - NSGraphiteControlTint, NSImageAbove, NSImageBelow, NSImageCellType, NSImageLeading, - NSImageLeft, NSImageOnly, NSImageOverlaps, NSImageRight, NSImageScaleAxesIndependently, - NSImageScaleNone, NSImageScaleProportionallyDown, NSImageScaleProportionallyUpOrDown, - NSImageScaling, NSImageTrailing, NSIntType, NSMiniControlSize, NSMixedState, NSNoCellMask, - NSNoImage, NSNullCellType, NSOffState, NSOnState, NSPositiveDoubleType, - NSPositiveFloatType, NSPositiveIntType, NSPushInCell, NSPushInCellMask, - NSRegularControlSize, NSScaleNone, NSScaleProportionally, NSScaleToFit, NSSmallControlSize, - NSTextCellType, - }; - pub use super::NSClickGestureRecognizer::NSClickGestureRecognizer; - pub use super::NSClipView::NSClipView; - pub use super::NSCollectionView::{ - NSCollectionView, NSCollectionViewDataSource, NSCollectionViewDelegate, - NSCollectionViewDropBefore, NSCollectionViewDropOn, NSCollectionViewDropOperation, - NSCollectionViewElement, NSCollectionViewItem, NSCollectionViewItemHighlightAsDropTarget, - NSCollectionViewItemHighlightForDeselection, NSCollectionViewItemHighlightForSelection, - NSCollectionViewItemHighlightNone, NSCollectionViewItemHighlightState, - NSCollectionViewPrefetching, NSCollectionViewScrollPosition, - NSCollectionViewScrollPositionBottom, NSCollectionViewScrollPositionCenteredHorizontally, - NSCollectionViewScrollPositionCenteredVertically, - NSCollectionViewScrollPositionLeadingEdge, NSCollectionViewScrollPositionLeft, - NSCollectionViewScrollPositionNearestHorizontalEdge, - NSCollectionViewScrollPositionNearestVerticalEdge, NSCollectionViewScrollPositionNone, - NSCollectionViewScrollPositionRight, NSCollectionViewScrollPositionTop, - NSCollectionViewScrollPositionTrailingEdge, NSCollectionViewSectionHeaderView, - NSCollectionViewSupplementaryElementKind, - }; - pub use super::NSCollectionViewCompositionalLayout::{ - NSCollectionLayoutAnchor, NSCollectionLayoutBoundarySupplementaryItem, - NSCollectionLayoutContainer, NSCollectionLayoutDecorationItem, NSCollectionLayoutDimension, - NSCollectionLayoutEdgeSpacing, NSCollectionLayoutEnvironment, NSCollectionLayoutGroup, - NSCollectionLayoutGroupCustomItem, NSCollectionLayoutGroupCustomItemProvider, - NSCollectionLayoutItem, NSCollectionLayoutSection, - NSCollectionLayoutSectionOrthogonalScrollingBehavior, - NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuous, - NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary, - NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging, - NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered, - NSCollectionLayoutSectionOrthogonalScrollingBehaviorNone, - NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging, - NSCollectionLayoutSectionVisibleItemsInvalidationHandler, NSCollectionLayoutSize, - NSCollectionLayoutSpacing, NSCollectionLayoutSupplementaryItem, - NSCollectionLayoutVisibleItem, NSCollectionViewCompositionalLayout, - NSCollectionViewCompositionalLayoutConfiguration, - NSCollectionViewCompositionalLayoutSectionProvider, NSDirectionalEdgeInsets, - NSDirectionalEdgeInsetsZero, NSDirectionalRectEdge, NSDirectionalRectEdgeAll, - NSDirectionalRectEdgeBottom, NSDirectionalRectEdgeLeading, NSDirectionalRectEdgeNone, - NSDirectionalRectEdgeTop, NSDirectionalRectEdgeTrailing, NSRectAlignment, - NSRectAlignmentBottom, NSRectAlignmentBottomLeading, NSRectAlignmentBottomTrailing, - NSRectAlignmentLeading, NSRectAlignmentNone, NSRectAlignmentTop, NSRectAlignmentTopLeading, - NSRectAlignmentTopTrailing, NSRectAlignmentTrailing, - }; - pub use super::NSCollectionViewFlowLayout::{ - NSCollectionElementKindSectionFooter, NSCollectionElementKindSectionHeader, - NSCollectionViewDelegateFlowLayout, NSCollectionViewFlowLayout, - NSCollectionViewFlowLayoutInvalidationContext, NSCollectionViewScrollDirection, - NSCollectionViewScrollDirectionHorizontal, NSCollectionViewScrollDirectionVertical, - }; - pub use super::NSCollectionViewGridLayout::NSCollectionViewGridLayout; - pub use super::NSCollectionViewLayout::{ - NSCollectionElementCategory, NSCollectionElementCategoryDecorationView, - NSCollectionElementCategoryInterItemGap, NSCollectionElementCategoryItem, - NSCollectionElementCategorySupplementaryView, NSCollectionElementKindInterItemGapIndicator, - NSCollectionUpdateAction, NSCollectionUpdateActionDelete, NSCollectionUpdateActionInsert, - NSCollectionUpdateActionMove, NSCollectionUpdateActionNone, NSCollectionUpdateActionReload, - NSCollectionViewDecorationElementKind, NSCollectionViewLayout, - NSCollectionViewLayoutAttributes, NSCollectionViewLayoutInvalidationContext, - NSCollectionViewUpdateItem, - }; - pub use super::NSCollectionViewTransitionLayout::{ - NSCollectionViewTransitionLayout, NSCollectionViewTransitionLayoutAnimatedKey, - }; - pub use super::NSColor::{ - NSAppKitVersionNumberWithPatternColorLeakFix, NSColor, NSColorSystemEffect, - NSColorSystemEffectDeepPressed, NSColorSystemEffectDisabled, NSColorSystemEffectNone, - NSColorSystemEffectPressed, NSColorSystemEffectRollover, NSColorType, NSColorTypeCatalog, - NSColorTypeComponentBased, NSColorTypePattern, NSSystemColorsDidChangeNotification, - }; - pub use super::NSColorList::{ - NSColorList, NSColorListDidChangeNotification, NSColorListName, NSColorName, - }; - pub use super::NSColorPanel::{ - NSCMYKModeColorPanel, NSColorChanging, NSColorListModeColorPanel, NSColorPanel, - NSColorPanelAllModesMask, NSColorPanelCMYKModeMask, NSColorPanelColorDidChangeNotification, - NSColorPanelColorListModeMask, NSColorPanelCrayonModeMask, - NSColorPanelCustomPaletteModeMask, NSColorPanelGrayModeMask, NSColorPanelHSBModeMask, - NSColorPanelMode, NSColorPanelModeCMYK, NSColorPanelModeColorList, NSColorPanelModeCrayon, - NSColorPanelModeCustomPalette, NSColorPanelModeGray, NSColorPanelModeHSB, - NSColorPanelModeNone, NSColorPanelModeRGB, NSColorPanelModeWheel, NSColorPanelOptions, - NSColorPanelRGBModeMask, NSColorPanelWheelModeMask, NSCrayonModeColorPanel, - NSCustomPaletteModeColorPanel, NSGrayModeColorPanel, NSHSBModeColorPanel, - NSNoModeColorPanel, NSRGBModeColorPanel, NSWheelModeColorPanel, - }; - pub use super::NSColorPicker::NSColorPicker; - pub use super::NSColorPickerTouchBarItem::NSColorPickerTouchBarItem; - pub use super::NSColorPicking::{NSColorPickingCustom, NSColorPickingDefault}; - pub use super::NSColorSampler::NSColorSampler; - pub use super::NSColorSpace::{ - NSCMYKColorSpaceModel, NSColorSpace, NSColorSpaceModel, NSColorSpaceModelCMYK, - NSColorSpaceModelDeviceN, NSColorSpaceModelGray, NSColorSpaceModelIndexed, - NSColorSpaceModelLAB, NSColorSpaceModelPatterned, NSColorSpaceModelRGB, - NSColorSpaceModelUnknown, NSDeviceNColorSpaceModel, NSGrayColorSpaceModel, - NSIndexedColorSpaceModel, NSLABColorSpaceModel, NSPatternColorSpaceModel, - NSRGBColorSpaceModel, NSUnknownColorSpaceModel, - }; - pub use super::NSColorWell::NSColorWell; - pub use super::NSComboBox::{ - NSComboBox, NSComboBoxDataSource, NSComboBoxDelegate, - NSComboBoxSelectionDidChangeNotification, NSComboBoxSelectionIsChangingNotification, - NSComboBoxWillDismissNotification, NSComboBoxWillPopUpNotification, - }; - pub use super::NSComboBoxCell::{NSComboBoxCell, NSComboBoxCellDataSource}; - pub use super::NSControl::{ - NSControl, NSControlTextDidBeginEditingNotification, NSControlTextDidChangeNotification, - NSControlTextDidEndEditingNotification, NSControlTextEditingDelegate, - }; - pub use super::NSController::NSController; - pub use super::NSCursor::{NSAppKitVersionNumberWithCursorSizeSupport, NSCursor}; - pub use super::NSCustomImageRep::NSCustomImageRep; - pub use super::NSCustomTouchBarItem::NSCustomTouchBarItem; - pub use super::NSDataAsset::{NSDataAsset, NSDataAssetName}; - pub use super::NSDatePicker::NSDatePicker; - pub use super::NSDatePickerCell::{ - NSClockAndCalendarDatePickerStyle, NSDatePickerCell, NSDatePickerCellDelegate, - NSDatePickerElementFlagEra, NSDatePickerElementFlagHourMinute, - NSDatePickerElementFlagHourMinuteSecond, NSDatePickerElementFlagTimeZone, - NSDatePickerElementFlagYearMonth, NSDatePickerElementFlagYearMonthDay, - NSDatePickerElementFlags, NSDatePickerMode, NSDatePickerModeRange, NSDatePickerModeSingle, - NSDatePickerStyle, NSDatePickerStyleClockAndCalendar, NSDatePickerStyleTextField, - NSDatePickerStyleTextFieldAndStepper, NSEraDatePickerElementFlag, - NSHourMinuteDatePickerElementFlag, NSHourMinuteSecondDatePickerElementFlag, - NSRangeDateMode, NSSingleDateMode, NSTextFieldAndStepperDatePickerStyle, - NSTextFieldDatePickerStyle, NSTimeZoneDatePickerElementFlag, - NSYearMonthDatePickerElementFlag, NSYearMonthDayDatePickerElementFlag, - }; - pub use super::NSDictionaryController::{ - NSDictionaryController, NSDictionaryControllerKeyValuePair, - }; - pub use super::NSDiffableDataSource::{ - NSCollectionViewDiffableDataSource, NSCollectionViewDiffableDataSourceItemProvider, - NSCollectionViewDiffableDataSourceSupplementaryViewProvider, NSDiffableDataSourceSnapshot, - }; - pub use super::NSDockTile::{ - NSAppKitVersionNumberWithDockTilePlugInSupport, NSDockTile, NSDockTilePlugIn, - }; - pub use super::NSDocument::{ - NSAutosaveAsOperation, NSAutosaveElsewhereOperation, NSAutosaveInPlaceOperation, - NSAutosaveOperation, NSChangeAutosaved, NSChangeCleared, NSChangeDiscardable, NSChangeDone, - NSChangeReadOtherContents, NSChangeRedone, NSChangeUndone, NSDocument, - NSDocumentChangeType, NSSaveAsOperation, NSSaveOperation, NSSaveOperationType, - NSSaveToOperation, - }; - pub use super::NSDocumentController::NSDocumentController; - pub use super::NSDragging::{ - NSDragOperation, NSDragOperationAll, NSDragOperationAll_Obsolete, NSDragOperationCopy, - NSDragOperationDelete, NSDragOperationEvery, NSDragOperationGeneric, NSDragOperationLink, - NSDragOperationMove, NSDragOperationNone, NSDragOperationPrivate, NSDraggingContext, - NSDraggingContextOutsideApplication, NSDraggingContextWithinApplication, - NSDraggingDestination, NSDraggingFormation, NSDraggingFormationDefault, - NSDraggingFormationList, NSDraggingFormationNone, NSDraggingFormationPile, - NSDraggingFormationStack, NSDraggingInfo, - NSDraggingItemEnumerationClearNonenumeratedImages, NSDraggingItemEnumerationConcurrent, - NSDraggingItemEnumerationOptions, NSDraggingSource, NSSpringLoadingContinuousActivation, - NSSpringLoadingDestination, NSSpringLoadingDisabled, NSSpringLoadingEnabled, - NSSpringLoadingHighlight, NSSpringLoadingHighlightEmphasized, NSSpringLoadingHighlightNone, - NSSpringLoadingHighlightStandard, NSSpringLoadingNoHover, NSSpringLoadingOptions, - }; - pub use super::NSDraggingItem::{ - NSDraggingImageComponent, NSDraggingImageComponentIconKey, NSDraggingImageComponentKey, - NSDraggingImageComponentLabelKey, NSDraggingItem, - }; - pub use super::NSDraggingSession::NSDraggingSession; - pub use super::NSDrawer::{ - NSDrawer, NSDrawerClosedState, NSDrawerClosingState, NSDrawerDelegate, - NSDrawerDidCloseNotification, NSDrawerDidOpenNotification, NSDrawerOpenState, - NSDrawerOpeningState, NSDrawerState, NSDrawerWillCloseNotification, - NSDrawerWillOpenNotification, - }; - pub use super::NSEPSImageRep::NSEPSImageRep; - pub use super::NSErrors::{ - NSAbortModalException, NSAbortPrintingException, NSAccessibilityException, - NSAppKitIgnoredException, NSAppKitVirtualMemoryException, NSBadBitmapParametersException, - NSBadComparisonException, NSBadRTFColorTableException, NSBadRTFDirectiveException, - NSBadRTFFontTableException, NSBadRTFStyleSheetException, NSBrowserIllegalDelegateException, - NSColorListIOException, NSColorListNotEditableException, NSDraggingException, - NSFontUnavailableException, NSIllegalSelectorException, NSImageCacheException, - NSNibLoadingException, NSPPDIncludeNotFoundException, NSPPDIncludeStackOverflowException, - NSPPDIncludeStackUnderflowException, NSPPDParseException, - NSPasteboardCommunicationException, NSPrintPackageException, - NSPrintingCommunicationException, NSRTFPropertyStackOverflowException, NSTIFFException, - NSTextLineTooLongException, NSTextNoSelectionException, NSTextReadException, - NSTextWriteException, NSTypedStreamVersionException, NSWindowServerCommunicationException, - NSWordTablesReadException, NSWordTablesWriteException, - }; - pub use super::NSEvent::{ - NSAWTEventType, NSAlphaShiftKeyMask, NSAlternateKeyMask, NSAppKitDefined, - NSAppKitDefinedMask, NSApplicationActivatedEventType, NSApplicationDeactivatedEventType, - NSApplicationDefined, NSApplicationDefinedMask, NSBeginFunctionKey, NSBreakFunctionKey, - NSClearDisplayFunctionKey, NSClearLineFunctionKey, NSCommandKeyMask, NSControlKeyMask, - NSCursorPointingDevice, NSCursorUpdate, NSCursorUpdateMask, NSDeleteCharFunctionKey, - NSDeleteFunctionKey, NSDeleteLineFunctionKey, NSDeviceIndependentModifierFlagsMask, - NSDownArrowFunctionKey, NSEndFunctionKey, NSEraserPointingDevice, NSEvent, - NSEventButtonMask, NSEventButtonMaskPenLowerSide, NSEventButtonMaskPenTip, - NSEventButtonMaskPenUpperSide, NSEventGestureAxis, NSEventGestureAxisHorizontal, - NSEventGestureAxisNone, NSEventGestureAxisVertical, NSEventMask, NSEventMaskAny, - NSEventMaskAppKitDefined, NSEventMaskApplicationDefined, NSEventMaskBeginGesture, - NSEventMaskChangeMode, NSEventMaskCursorUpdate, NSEventMaskDirectTouch, - NSEventMaskEndGesture, NSEventMaskFlagsChanged, NSEventMaskGesture, NSEventMaskKeyDown, - NSEventMaskKeyUp, NSEventMaskLeftMouseDown, NSEventMaskLeftMouseDragged, - NSEventMaskLeftMouseUp, NSEventMaskMagnify, NSEventMaskMouseEntered, - NSEventMaskMouseExited, NSEventMaskMouseMoved, NSEventMaskOtherMouseDown, - NSEventMaskOtherMouseDragged, NSEventMaskOtherMouseUp, NSEventMaskPeriodic, - NSEventMaskPressure, NSEventMaskRightMouseDown, NSEventMaskRightMouseDragged, - NSEventMaskRightMouseUp, NSEventMaskRotate, NSEventMaskScrollWheel, - NSEventMaskSmartMagnify, NSEventMaskSwipe, NSEventMaskSystemDefined, - NSEventMaskTabletPoint, NSEventMaskTabletProximity, NSEventModifierFlagCapsLock, - NSEventModifierFlagCommand, NSEventModifierFlagControl, - NSEventModifierFlagDeviceIndependentFlagsMask, NSEventModifierFlagFunction, - NSEventModifierFlagHelp, NSEventModifierFlagNumericPad, NSEventModifierFlagOption, - NSEventModifierFlagShift, NSEventModifierFlags, NSEventPhase, NSEventPhaseBegan, - NSEventPhaseCancelled, NSEventPhaseChanged, NSEventPhaseEnded, NSEventPhaseMayBegin, - NSEventPhaseNone, NSEventPhaseStationary, NSEventSubtype, - NSEventSubtypeApplicationActivated, NSEventSubtypeApplicationDeactivated, - NSEventSubtypeMouseEvent, NSEventSubtypePowerOff, NSEventSubtypeScreenChanged, - NSEventSubtypeTabletPoint, NSEventSubtypeTabletProximity, NSEventSubtypeTouch, - NSEventSubtypeWindowExposed, NSEventSubtypeWindowMoved, - NSEventSwipeTrackingClampGestureAmount, NSEventSwipeTrackingLockDirection, - NSEventSwipeTrackingOptions, NSEventType, NSEventTypeAppKitDefined, - NSEventTypeApplicationDefined, NSEventTypeBeginGesture, NSEventTypeChangeMode, - NSEventTypeCursorUpdate, NSEventTypeDirectTouch, NSEventTypeEndGesture, - NSEventTypeFlagsChanged, NSEventTypeGesture, NSEventTypeKeyDown, NSEventTypeKeyUp, - NSEventTypeLeftMouseDown, NSEventTypeLeftMouseDragged, NSEventTypeLeftMouseUp, - NSEventTypeMagnify, NSEventTypeMouseEntered, NSEventTypeMouseExited, NSEventTypeMouseMoved, - NSEventTypeOtherMouseDown, NSEventTypeOtherMouseDragged, NSEventTypeOtherMouseUp, - NSEventTypePeriodic, NSEventTypePressure, NSEventTypeQuickLook, NSEventTypeRightMouseDown, - NSEventTypeRightMouseDragged, NSEventTypeRightMouseUp, NSEventTypeRotate, - NSEventTypeScrollWheel, NSEventTypeSmartMagnify, NSEventTypeSwipe, - NSEventTypeSystemDefined, NSEventTypeTabletPoint, NSEventTypeTabletProximity, - NSExecuteFunctionKey, NSF10FunctionKey, NSF11FunctionKey, NSF12FunctionKey, - NSF13FunctionKey, NSF14FunctionKey, NSF15FunctionKey, NSF16FunctionKey, NSF17FunctionKey, - NSF18FunctionKey, NSF19FunctionKey, NSF1FunctionKey, NSF20FunctionKey, NSF21FunctionKey, - NSF22FunctionKey, NSF23FunctionKey, NSF24FunctionKey, NSF25FunctionKey, NSF26FunctionKey, - NSF27FunctionKey, NSF28FunctionKey, NSF29FunctionKey, NSF2FunctionKey, NSF30FunctionKey, - NSF31FunctionKey, NSF32FunctionKey, NSF33FunctionKey, NSF34FunctionKey, NSF35FunctionKey, - NSF3FunctionKey, NSF4FunctionKey, NSF5FunctionKey, NSF6FunctionKey, NSF7FunctionKey, - NSF8FunctionKey, NSF9FunctionKey, NSFindFunctionKey, NSFlagsChanged, NSFlagsChangedMask, - NSFunctionKeyMask, NSHelpFunctionKey, NSHelpKeyMask, NSHomeFunctionKey, - NSInsertCharFunctionKey, NSInsertFunctionKey, NSInsertLineFunctionKey, NSKeyDown, - NSKeyDownMask, NSKeyUp, NSKeyUpMask, NSLeftArrowFunctionKey, NSLeftMouseDown, - NSLeftMouseDownMask, NSLeftMouseDragged, NSLeftMouseDraggedMask, NSLeftMouseUp, - NSLeftMouseUpMask, NSMenuFunctionKey, NSModeSwitchFunctionKey, NSMouseEntered, - NSMouseEnteredMask, NSMouseEventSubtype, NSMouseExited, NSMouseExitedMask, NSMouseMoved, - NSMouseMovedMask, NSNextFunctionKey, NSNumericPadKeyMask, NSOtherMouseDown, - NSOtherMouseDownMask, NSOtherMouseDragged, NSOtherMouseDraggedMask, NSOtherMouseUp, - NSOtherMouseUpMask, NSPageDownFunctionKey, NSPageUpFunctionKey, NSPauseFunctionKey, - NSPenLowerSideMask, NSPenPointingDevice, NSPenTipMask, NSPenUpperSideMask, NSPeriodic, - NSPeriodicMask, NSPointingDeviceType, NSPointingDeviceTypeCursor, - NSPointingDeviceTypeEraser, NSPointingDeviceTypePen, NSPointingDeviceTypeUnknown, - NSPowerOffEventType, NSPressureBehavior, NSPressureBehaviorPrimaryAccelerator, - NSPressureBehaviorPrimaryClick, NSPressureBehaviorPrimaryDeepClick, - NSPressureBehaviorPrimaryDeepDrag, NSPressureBehaviorPrimaryDefault, - NSPressureBehaviorPrimaryGeneric, NSPressureBehaviorUnknown, NSPrevFunctionKey, - NSPrintFunctionKey, NSPrintScreenFunctionKey, NSRedoFunctionKey, NSResetFunctionKey, - NSRightArrowFunctionKey, NSRightMouseDown, NSRightMouseDownMask, NSRightMouseDragged, - NSRightMouseDraggedMask, NSRightMouseUp, NSRightMouseUpMask, NSScreenChangedEventType, - NSScrollLockFunctionKey, NSScrollWheel, NSScrollWheelMask, NSSelectFunctionKey, - NSShiftKeyMask, NSStopFunctionKey, NSSysReqFunctionKey, NSSystemDefined, - NSSystemDefinedMask, NSSystemFunctionKey, NSTabletPoint, NSTabletPointEventSubtype, - NSTabletPointMask, NSTabletProximity, NSTabletProximityEventSubtype, NSTabletProximityMask, - NSTouchEventSubtype, NSUndoFunctionKey, NSUnknownPointingDevice, NSUpArrowFunctionKey, - NSUserFunctionKey, NSWindowExposedEventType, NSWindowMovedEventType, - }; - pub use super::NSFilePromiseProvider::{NSFilePromiseProvider, NSFilePromiseProviderDelegate}; - pub use super::NSFilePromiseReceiver::NSFilePromiseReceiver; - pub use super::NSFont::{ - NSAntialiasThresholdChangedNotification, NSControlGlyph, NSFont, - NSFontAntialiasedIntegerAdvancementsRenderingMode, NSFontAntialiasedRenderingMode, - NSFontDefaultRenderingMode, NSFontIdentityMatrix, NSFontIntegerAdvancementsRenderingMode, - NSFontRenderingMode, NSFontSetChangedNotification, NSGlyph, NSMultibyteGlyphPacking, - NSNativeShortGlyphPacking, NSNullGlyph, - }; - pub use super::NSFontAssetRequest::{ - NSFontAssetRequest, NSFontAssetRequestOptionUsesStandardUI, NSFontAssetRequestOptions, - }; - pub use super::NSFontCollection::{ - NSFontCollection, NSFontCollectionActionKey, NSFontCollectionActionTypeKey, - NSFontCollectionAllFonts, NSFontCollectionDidChangeNotification, - NSFontCollectionDisallowAutoActivationOption, NSFontCollectionFavorites, - NSFontCollectionIncludeDisabledFontsOption, NSFontCollectionMatchingOptionKey, - NSFontCollectionName, NSFontCollectionNameKey, NSFontCollectionOldNameKey, - NSFontCollectionRecentlyUsed, NSFontCollectionRemoveDuplicatesOption, NSFontCollectionUser, - NSFontCollectionUserInfoKey, NSFontCollectionVisibility, - NSFontCollectionVisibilityComputer, NSFontCollectionVisibilityKey, - NSFontCollectionVisibilityProcess, NSFontCollectionVisibilityUser, - NSFontCollectionWasHidden, NSFontCollectionWasRenamed, NSFontCollectionWasShown, - NSMutableFontCollection, - }; - pub use super::NSFontDescriptor::{ - NSFontBoldTrait, NSFontCascadeListAttribute, NSFontCharacterSetAttribute, - NSFontClarendonSerifsClass, NSFontColorAttribute, NSFontCondensedTrait, NSFontDescriptor, - NSFontDescriptorAttributeName, NSFontDescriptorClassClarendonSerifs, - NSFontDescriptorClassFreeformSerifs, NSFontDescriptorClassMask, - NSFontDescriptorClassModernSerifs, NSFontDescriptorClassOldStyleSerifs, - NSFontDescriptorClassOrnamentals, NSFontDescriptorClassSansSerif, - NSFontDescriptorClassScripts, NSFontDescriptorClassSlabSerifs, - NSFontDescriptorClassSymbolic, NSFontDescriptorClassTransitionalSerifs, - NSFontDescriptorClassUnknown, NSFontDescriptorFeatureKey, NSFontDescriptorSymbolicTraits, - NSFontDescriptorSystemDesign, NSFontDescriptorSystemDesignDefault, - NSFontDescriptorSystemDesignMonospaced, NSFontDescriptorSystemDesignRounded, - NSFontDescriptorSystemDesignSerif, NSFontDescriptorTraitBold, - NSFontDescriptorTraitCondensed, NSFontDescriptorTraitEmphasized, - NSFontDescriptorTraitExpanded, NSFontDescriptorTraitItalic, NSFontDescriptorTraitKey, - NSFontDescriptorTraitLooseLeading, NSFontDescriptorTraitMonoSpace, - NSFontDescriptorTraitTightLeading, NSFontDescriptorTraitUIOptimized, - NSFontDescriptorTraitVertical, NSFontDescriptorVariationKey, NSFontExpandedTrait, - NSFontFaceAttribute, NSFontFamilyAttribute, NSFontFamilyClass, NSFontFamilyClassMask, - NSFontFeatureSelectorIdentifierKey, NSFontFeatureSettingsAttribute, - NSFontFeatureTypeIdentifierKey, NSFontFixedAdvanceAttribute, NSFontFreeformSerifsClass, - NSFontItalicTrait, NSFontMatrixAttribute, NSFontModernSerifsClass, NSFontMonoSpaceTrait, - NSFontNameAttribute, NSFontOldStyleSerifsClass, NSFontOrnamentalsClass, - NSFontSansSerifClass, NSFontScriptsClass, NSFontSizeAttribute, NSFontSlabSerifsClass, - NSFontSlantTrait, NSFontSymbolicClass, NSFontSymbolicTrait, NSFontSymbolicTraits, - NSFontTextStyle, NSFontTextStyleBody, NSFontTextStyleCallout, NSFontTextStyleCaption1, - NSFontTextStyleCaption2, NSFontTextStyleFootnote, NSFontTextStyleHeadline, - NSFontTextStyleLargeTitle, NSFontTextStyleOptionKey, NSFontTextStyleSubheadline, - NSFontTextStyleTitle1, NSFontTextStyleTitle2, NSFontTextStyleTitle3, NSFontTraitsAttribute, - NSFontTransitionalSerifsClass, NSFontUIOptimizedTrait, NSFontUnknownClass, - NSFontVariationAttribute, NSFontVariationAxisDefaultValueKey, - NSFontVariationAxisIdentifierKey, NSFontVariationAxisMaximumValueKey, - NSFontVariationAxisMinimumValueKey, NSFontVariationAxisNameKey, NSFontVerticalTrait, - NSFontVisibleNameAttribute, NSFontWeight, NSFontWeightBlack, NSFontWeightBold, - NSFontWeightHeavy, NSFontWeightLight, NSFontWeightMedium, NSFontWeightRegular, - NSFontWeightSemibold, NSFontWeightThin, NSFontWeightTrait, NSFontWeightUltraLight, - NSFontWidthTrait, - }; - pub use super::NSFontManager::{ - NSAddTraitFontAction, NSBoldFontMask, NSCompressedFontMask, NSCondensedFontMask, - NSExpandedFontMask, NSFixedPitchFontMask, NSFontAction, - NSFontCollectionApplicationOnlyMask, NSFontCollectionOptions, NSFontManager, - NSFontTraitMask, NSHeavierFontAction, NSItalicFontMask, NSLighterFontAction, - NSNarrowFontMask, NSNoFontChangeAction, NSNonStandardCharacterSetFontMask, - NSPosterFontMask, NSRemoveTraitFontAction, NSSizeDownFontAction, NSSizeUpFontAction, - NSSmallCapsFontMask, NSUnboldFontMask, NSUnitalicFontMask, NSViaPanelFontAction, - }; - pub use super::NSFontPanel::{ - NSFPCurrentField, NSFPPreviewButton, NSFPPreviewField, NSFPRevertButton, NSFPSetButton, - NSFPSizeField, NSFPSizeTitle, NSFontChanging, NSFontPanel, NSFontPanelAllEffectsModeMask, - NSFontPanelAllModesMask, NSFontPanelCollectionModeMask, - NSFontPanelDocumentColorEffectModeMask, NSFontPanelFaceModeMask, NSFontPanelModeMask, - NSFontPanelModeMaskAllEffects, NSFontPanelModeMaskCollection, - NSFontPanelModeMaskDocumentColorEffect, NSFontPanelModeMaskFace, - NSFontPanelModeMaskShadowEffect, NSFontPanelModeMaskSize, - NSFontPanelModeMaskStrikethroughEffect, NSFontPanelModeMaskTextColorEffect, - NSFontPanelModeMaskUnderlineEffect, NSFontPanelModesMaskAllModes, - NSFontPanelModesMaskStandardModes, NSFontPanelShadowEffectModeMask, - NSFontPanelSizeModeMask, NSFontPanelStandardModesMask, - NSFontPanelStrikethroughEffectModeMask, NSFontPanelTextColorEffectModeMask, - NSFontPanelUnderlineEffectModeMask, - }; - pub use super::NSForm::NSForm; - pub use super::NSFormCell::NSFormCell; - pub use super::NSGestureRecognizer::{ - NSGestureRecognizer, NSGestureRecognizerDelegate, NSGestureRecognizerState, - NSGestureRecognizerStateBegan, NSGestureRecognizerStateCancelled, - NSGestureRecognizerStateChanged, NSGestureRecognizerStateEnded, - NSGestureRecognizerStateFailed, NSGestureRecognizerStatePossible, - NSGestureRecognizerStateRecognized, - }; - pub use super::NSGlyphGenerator::{ - NSGlyphGenerator, NSGlyphStorage, NSShowControlGlyphs, NSShowInvisibleGlyphs, - NSWantsBidiLevels, - }; - pub use super::NSGlyphInfo::{ - NSAdobeCNS1CharacterCollection, NSAdobeGB1CharacterCollection, - NSAdobeJapan1CharacterCollection, NSAdobeJapan2CharacterCollection, - NSAdobeKorea1CharacterCollection, NSCharacterCollection, NSGlyphInfo, - NSIdentityMappingCharacterCollection, - }; - pub use super::NSGradient::{ - NSGradient, NSGradientDrawingOptions, NSGradientDrawsAfterEndingLocation, - NSGradientDrawsBeforeStartingLocation, - }; - pub use super::NSGraphics::{ - NSAnimationEffect, NSAnimationEffectDisappearingItemDefault, NSAnimationEffectPoof, - NSBackingStoreBuffered, NSBackingStoreNonretained, NSBackingStoreRetained, - NSBackingStoreType, NSBlack, NSCalibratedBlackColorSpace, NSCalibratedRGBColorSpace, - NSCalibratedWhiteColorSpace, NSColorRenderingIntent, - NSColorRenderingIntentAbsoluteColorimetric, NSColorRenderingIntentDefault, - NSColorRenderingIntentPerceptual, NSColorRenderingIntentRelativeColorimetric, - NSColorRenderingIntentSaturation, NSColorSpaceName, NSCompositeClear, NSCompositeColor, - NSCompositeColorBurn, NSCompositeColorDodge, NSCompositeCopy, NSCompositeDarken, - NSCompositeDestinationAtop, NSCompositeDestinationIn, NSCompositeDestinationOut, - NSCompositeDestinationOver, NSCompositeDifference, NSCompositeExclusion, - NSCompositeHardLight, NSCompositeHighlight, NSCompositeHue, NSCompositeLighten, - NSCompositeLuminosity, NSCompositeMultiply, NSCompositeOverlay, NSCompositePlusDarker, - NSCompositePlusLighter, NSCompositeSaturation, NSCompositeScreen, NSCompositeSoftLight, - NSCompositeSourceAtop, NSCompositeSourceIn, NSCompositeSourceOut, NSCompositeSourceOver, - NSCompositeXOR, NSCompositingOperation, NSCompositingOperationClear, - NSCompositingOperationColor, NSCompositingOperationColorBurn, - NSCompositingOperationColorDodge, NSCompositingOperationCopy, NSCompositingOperationDarken, - NSCompositingOperationDestinationAtop, NSCompositingOperationDestinationIn, - NSCompositingOperationDestinationOut, NSCompositingOperationDestinationOver, - NSCompositingOperationDifference, NSCompositingOperationExclusion, - NSCompositingOperationHardLight, NSCompositingOperationHighlight, - NSCompositingOperationHue, NSCompositingOperationLighten, NSCompositingOperationLuminosity, - NSCompositingOperationMultiply, NSCompositingOperationOverlay, - NSCompositingOperationPlusDarker, NSCompositingOperationPlusLighter, - NSCompositingOperationSaturation, NSCompositingOperationScreen, - NSCompositingOperationSoftLight, NSCompositingOperationSourceAtop, - NSCompositingOperationSourceIn, NSCompositingOperationSourceOut, - NSCompositingOperationSourceOver, NSCompositingOperationXOR, NSCustomColorSpace, - NSDarkGray, NSDeviceBitsPerSample, NSDeviceBlackColorSpace, NSDeviceCMYKColorSpace, - NSDeviceColorSpaceName, NSDeviceDescriptionKey, NSDeviceIsPrinter, NSDeviceIsScreen, - NSDeviceRGBColorSpace, NSDeviceResolution, NSDeviceSize, NSDeviceWhiteColorSpace, - NSDisplayGamut, NSDisplayGamutP3, NSDisplayGamutSRGB, NSFocusRingAbove, NSFocusRingBelow, - NSFocusRingOnly, NSFocusRingPlacement, NSFocusRingType, NSFocusRingTypeDefault, - NSFocusRingTypeExterior, NSFocusRingTypeNone, NSLightGray, NSNamedColorSpace, - NSPatternColorSpace, NSWhite, NSWindowAbove, NSWindowBelow, NSWindowDepth, - NSWindowDepthOnehundredtwentyeightBitRGB, NSWindowDepthSixtyfourBitRGB, - NSWindowDepthTwentyfourBitRGB, NSWindowOrderingMode, NSWindowOut, - }; - pub use super::NSGraphicsContext::{ - NSGraphicsContext, NSGraphicsContextAttributeKey, - NSGraphicsContextDestinationAttributeName, NSGraphicsContextPDFFormat, - NSGraphicsContextPSFormat, NSGraphicsContextRepresentationFormatAttributeName, - NSGraphicsContextRepresentationFormatName, NSImageInterpolation, - NSImageInterpolationDefault, NSImageInterpolationHigh, NSImageInterpolationLow, - NSImageInterpolationMedium, NSImageInterpolationNone, - }; - pub use super::NSGridView::{ - NSGridCell, NSGridCellPlacement, NSGridCellPlacementBottom, NSGridCellPlacementCenter, - NSGridCellPlacementFill, NSGridCellPlacementInherited, NSGridCellPlacementLeading, - NSGridCellPlacementNone, NSGridCellPlacementTop, NSGridCellPlacementTrailing, NSGridColumn, - NSGridRow, NSGridRowAlignment, NSGridRowAlignmentFirstBaseline, - NSGridRowAlignmentInherited, NSGridRowAlignmentLastBaseline, NSGridRowAlignmentNone, - NSGridView, NSGridViewSizeForContent, - }; - pub use super::NSGroupTouchBarItem::NSGroupTouchBarItem; - pub use super::NSHapticFeedback::{ - NSHapticFeedbackManager, NSHapticFeedbackPattern, NSHapticFeedbackPatternAlignment, - NSHapticFeedbackPatternGeneric, NSHapticFeedbackPatternLevelChange, - NSHapticFeedbackPerformanceTime, NSHapticFeedbackPerformanceTimeDefault, - NSHapticFeedbackPerformanceTimeDrawCompleted, NSHapticFeedbackPerformanceTimeNow, - NSHapticFeedbackPerformer, - }; - pub use super::NSHelpManager::{ - NSContextHelpModeDidActivateNotification, NSContextHelpModeDidDeactivateNotification, - NSHelpAnchorName, NSHelpBookName, NSHelpManager, NSHelpManagerContextHelpKey, - }; - pub use super::NSImage::{ - NSImage, NSImageCacheAlways, NSImageCacheBySize, NSImageCacheDefault, NSImageCacheMode, - NSImageCacheNever, NSImageDelegate, NSImageHintCTM, NSImageHintInterpolation, - NSImageHintUserInterfaceLayoutDirection, NSImageLoadStatus, NSImageLoadStatusCancelled, - NSImageLoadStatusCompleted, NSImageLoadStatusInvalidData, NSImageLoadStatusReadError, - NSImageLoadStatusUnexpectedEOF, NSImageName, NSImageNameActionTemplate, - NSImageNameAddTemplate, NSImageNameAdvanced, NSImageNameApplicationIcon, - NSImageNameBluetoothTemplate, NSImageNameBonjour, NSImageNameBookmarksTemplate, - NSImageNameCaution, NSImageNameColorPanel, NSImageNameColumnViewTemplate, - NSImageNameComputer, NSImageNameDotMac, NSImageNameEnterFullScreenTemplate, - NSImageNameEveryone, NSImageNameExitFullScreenTemplate, NSImageNameFlowViewTemplate, - NSImageNameFolder, NSImageNameFolderBurnable, NSImageNameFolderSmart, - NSImageNameFollowLinkFreestandingTemplate, NSImageNameFontPanel, NSImageNameGoBackTemplate, - NSImageNameGoForwardTemplate, NSImageNameGoLeftTemplate, NSImageNameGoRightTemplate, - NSImageNameHomeTemplate, NSImageNameIChatTheaterTemplate, NSImageNameIconViewTemplate, - NSImageNameInfo, NSImageNameInvalidDataFreestandingTemplate, - NSImageNameLeftFacingTriangleTemplate, NSImageNameListViewTemplate, - NSImageNameLockLockedTemplate, NSImageNameLockUnlockedTemplate, - NSImageNameMenuMixedStateTemplate, NSImageNameMenuOnStateTemplate, NSImageNameMobileMe, - NSImageNameMultipleDocuments, NSImageNameNetwork, NSImageNamePathTemplate, - NSImageNamePreferencesGeneral, NSImageNameQuickLookTemplate, - NSImageNameRefreshFreestandingTemplate, NSImageNameRefreshTemplate, - NSImageNameRemoveTemplate, NSImageNameRevealFreestandingTemplate, - NSImageNameRightFacingTriangleTemplate, NSImageNameShareTemplate, - NSImageNameSlideshowTemplate, NSImageNameSmartBadgeTemplate, NSImageNameStatusAvailable, - NSImageNameStatusNone, NSImageNameStatusPartiallyAvailable, NSImageNameStatusUnavailable, - NSImageNameStopProgressFreestandingTemplate, NSImageNameStopProgressTemplate, - NSImageNameTouchBarAddDetailTemplate, NSImageNameTouchBarAddTemplate, - NSImageNameTouchBarAlarmTemplate, NSImageNameTouchBarAudioInputMuteTemplate, - NSImageNameTouchBarAudioInputTemplate, NSImageNameTouchBarAudioOutputMuteTemplate, - NSImageNameTouchBarAudioOutputVolumeHighTemplate, - NSImageNameTouchBarAudioOutputVolumeLowTemplate, - NSImageNameTouchBarAudioOutputVolumeMediumTemplate, - NSImageNameTouchBarAudioOutputVolumeOffTemplate, NSImageNameTouchBarBookmarksTemplate, - NSImageNameTouchBarColorPickerFill, NSImageNameTouchBarColorPickerFont, - NSImageNameTouchBarColorPickerStroke, NSImageNameTouchBarCommunicationAudioTemplate, - NSImageNameTouchBarCommunicationVideoTemplate, NSImageNameTouchBarComposeTemplate, - NSImageNameTouchBarDeleteTemplate, NSImageNameTouchBarDownloadTemplate, - NSImageNameTouchBarEnterFullScreenTemplate, NSImageNameTouchBarExitFullScreenTemplate, - NSImageNameTouchBarFastForwardTemplate, NSImageNameTouchBarFolderCopyToTemplate, - NSImageNameTouchBarFolderMoveToTemplate, NSImageNameTouchBarFolderTemplate, - NSImageNameTouchBarGetInfoTemplate, NSImageNameTouchBarGoBackTemplate, - NSImageNameTouchBarGoDownTemplate, NSImageNameTouchBarGoForwardTemplate, - NSImageNameTouchBarGoUpTemplate, NSImageNameTouchBarHistoryTemplate, - NSImageNameTouchBarIconViewTemplate, NSImageNameTouchBarListViewTemplate, - NSImageNameTouchBarMailTemplate, NSImageNameTouchBarNewFolderTemplate, - NSImageNameTouchBarNewMessageTemplate, NSImageNameTouchBarOpenInBrowserTemplate, - NSImageNameTouchBarPauseTemplate, NSImageNameTouchBarPlayPauseTemplate, - NSImageNameTouchBarPlayTemplate, NSImageNameTouchBarPlayheadTemplate, - NSImageNameTouchBarQuickLookTemplate, NSImageNameTouchBarRecordStartTemplate, - NSImageNameTouchBarRecordStopTemplate, NSImageNameTouchBarRefreshTemplate, - NSImageNameTouchBarRemoveTemplate, NSImageNameTouchBarRewindTemplate, - NSImageNameTouchBarRotateLeftTemplate, NSImageNameTouchBarRotateRightTemplate, - NSImageNameTouchBarSearchTemplate, NSImageNameTouchBarShareTemplate, - NSImageNameTouchBarSidebarTemplate, NSImageNameTouchBarSkipAhead15SecondsTemplate, - NSImageNameTouchBarSkipAhead30SecondsTemplate, NSImageNameTouchBarSkipAheadTemplate, - NSImageNameTouchBarSkipBack15SecondsTemplate, NSImageNameTouchBarSkipBack30SecondsTemplate, - NSImageNameTouchBarSkipBackTemplate, NSImageNameTouchBarSkipToEndTemplate, - NSImageNameTouchBarSkipToStartTemplate, NSImageNameTouchBarSlideshowTemplate, - NSImageNameTouchBarTagIconTemplate, NSImageNameTouchBarTextBoldTemplate, - NSImageNameTouchBarTextBoxTemplate, NSImageNameTouchBarTextCenterAlignTemplate, - NSImageNameTouchBarTextItalicTemplate, NSImageNameTouchBarTextJustifiedAlignTemplate, - NSImageNameTouchBarTextLeftAlignTemplate, NSImageNameTouchBarTextListTemplate, - NSImageNameTouchBarTextRightAlignTemplate, NSImageNameTouchBarTextStrikethroughTemplate, - NSImageNameTouchBarTextUnderlineTemplate, NSImageNameTouchBarUserAddTemplate, - NSImageNameTouchBarUserGroupTemplate, NSImageNameTouchBarUserTemplate, - NSImageNameTouchBarVolumeDownTemplate, NSImageNameTouchBarVolumeUpTemplate, - NSImageNameTrashEmpty, NSImageNameTrashFull, NSImageNameUser, NSImageNameUserAccounts, - NSImageNameUserGroup, NSImageNameUserGuest, NSImageResizingMode, - NSImageResizingModeStretch, NSImageResizingModeTile, NSImageSymbolConfiguration, - NSImageSymbolScale, NSImageSymbolScaleLarge, NSImageSymbolScaleMedium, - NSImageSymbolScaleSmall, - }; - pub use super::NSImageCell::{ - NSImageAlignBottom, NSImageAlignBottomLeft, NSImageAlignBottomRight, NSImageAlignCenter, - NSImageAlignLeft, NSImageAlignRight, NSImageAlignTop, NSImageAlignTopLeft, - NSImageAlignTopRight, NSImageAlignment, NSImageCell, NSImageFrameButton, - NSImageFrameGrayBezel, NSImageFrameGroove, NSImageFrameNone, NSImageFramePhoto, - NSImageFrameStyle, - }; - pub use super::NSImageRep::{ - NSImageHintKey, NSImageLayoutDirection, NSImageLayoutDirectionLeftToRight, - NSImageLayoutDirectionRightToLeft, NSImageLayoutDirectionUnspecified, NSImageRep, - NSImageRepMatchesDevice, NSImageRepRegistryDidChangeNotification, - }; - pub use super::NSImageView::NSImageView; - pub use super::NSInputManager::{NSInputManager, NSTextInput}; - pub use super::NSInputServer::{ - NSInputServer, NSInputServerMouseTracker, NSInputServiceProvider, - }; - pub use super::NSInterfaceStyle::{ - NSInterfaceStyle, NSInterfaceStyleDefault, NSMacintoshInterfaceStyle, - NSNextStepInterfaceStyle, NSNoInterfaceStyle, NSWindows95InterfaceStyle, - }; - pub use super::NSItemProvider::{ - NSTypeIdentifierAddressText, NSTypeIdentifierDateText, NSTypeIdentifierPhoneNumberText, - NSTypeIdentifierTransitInformationText, - }; - pub use super::NSKeyValueBinding::{ - NSAlignmentBinding, NSAllowsEditingMultipleValuesSelectionBindingOption, - NSAllowsNullArgumentBindingOption, NSAlternateImageBinding, NSAlternateTitleBinding, - NSAlwaysPresentsApplicationModalAlertsBindingOption, NSAnimateBinding, - NSAnimationDelayBinding, NSArgumentBinding, NSAttributedStringBinding, NSBindingInfoKey, - NSBindingName, NSBindingOption, NSBindingSelectionMarker, - NSConditionallySetsEditableBindingOption, NSConditionallySetsEnabledBindingOption, - NSConditionallySetsHiddenBindingOption, NSContentArrayBinding, - NSContentArrayForMultipleSelectionBinding, NSContentBinding, NSContentDictionaryBinding, - NSContentHeightBinding, NSContentObjectBinding, NSContentObjectsBinding, - NSContentPlacementTagBindingOption, NSContentSetBinding, NSContentValuesBinding, - NSContentWidthBinding, NSContinuouslyUpdatesValueBindingOption, - NSCreatesSortDescriptorBindingOption, NSCriticalValueBinding, NSDataBinding, - NSDeletesObjectsOnRemoveBindingsOption, NSDisplayNameBindingOption, - NSDisplayPatternBindingOption, NSDisplayPatternTitleBinding, NSDisplayPatternValueBinding, - NSDocumentEditedBinding, NSDoubleClickArgumentBinding, NSDoubleClickTargetBinding, - NSEditableBinding, NSEditor, NSEditorRegistration, NSEnabledBinding, NSExcludedKeysBinding, - NSFilterPredicateBinding, NSFontBinding, NSFontBoldBinding, NSFontFamilyNameBinding, - NSFontItalicBinding, NSFontNameBinding, NSFontSizeBinding, - NSHandlesContentAsCompoundValueBindingOption, NSHeaderTitleBinding, NSHiddenBinding, - NSImageBinding, NSIncludedKeysBinding, NSInitialKeyBinding, NSInitialValueBinding, - NSInsertsNullPlaceholderBindingOption, NSInvokesSeparatelyWithArrayObjectsBindingOption, - NSIsIndeterminateBinding, NSLabelBinding, NSLocalizedKeyDictionaryBinding, - NSManagedObjectContextBinding, NSMaxValueBinding, NSMaxWidthBinding, - NSMaximumRecentsBinding, NSMinValueBinding, NSMinWidthBinding, NSMixedStateImageBinding, - NSMultipleValuesMarker, NSMultipleValuesPlaceholderBindingOption, NSNoSelectionMarker, - NSNoSelectionPlaceholderBindingOption, NSNotApplicableMarker, - NSNotApplicablePlaceholderBindingOption, NSNullPlaceholderBindingOption, - NSObservedKeyPathKey, NSObservedObjectKey, NSOffStateImageBinding, NSOnStateImageBinding, - NSOptionsKey, NSPositioningRectBinding, NSPredicateBinding, NSPredicateFormatBindingOption, - NSRaisesForNotApplicableKeysBindingOption, NSRecentSearchesBinding, - NSRepresentedFilenameBinding, NSRowHeightBinding, NSSelectedIdentifierBinding, - NSSelectedIndexBinding, NSSelectedLabelBinding, NSSelectedObjectBinding, - NSSelectedObjectsBinding, NSSelectedTagBinding, NSSelectedValueBinding, - NSSelectedValuesBinding, NSSelectionIndexPathsBinding, NSSelectionIndexesBinding, - NSSelectorNameBindingOption, NSSelectsAllWhenSettingContentBindingOption, - NSSortDescriptorsBinding, NSTargetBinding, NSTextColorBinding, NSTitleBinding, - NSToolTipBinding, NSTransparentBinding, NSValidatesImmediatelyBindingOption, - NSValueBinding, NSValuePathBinding, NSValueTransformerBindingOption, - NSValueTransformerNameBindingOption, NSValueURLBinding, NSVisibleBinding, - NSWarningValueBinding, NSWidthBinding, - }; - pub use super::NSLayoutAnchor::{ - NSLayoutAnchor, NSLayoutDimension, NSLayoutXAxisAnchor, NSLayoutYAxisAnchor, - }; - pub use super::NSLayoutConstraint::{ - NSLayoutAttribute, NSLayoutAttributeBaseline, NSLayoutAttributeBottom, - NSLayoutAttributeCenterX, NSLayoutAttributeCenterY, NSLayoutAttributeFirstBaseline, - NSLayoutAttributeHeight, NSLayoutAttributeLastBaseline, NSLayoutAttributeLeading, - NSLayoutAttributeLeft, NSLayoutAttributeNotAnAttribute, NSLayoutAttributeRight, - NSLayoutAttributeTop, NSLayoutAttributeTrailing, NSLayoutAttributeWidth, - NSLayoutConstraint, NSLayoutConstraintOrientation, NSLayoutConstraintOrientationHorizontal, - NSLayoutConstraintOrientationVertical, NSLayoutFormatAlignAllBaseline, - NSLayoutFormatAlignAllBottom, NSLayoutFormatAlignAllCenterX, NSLayoutFormatAlignAllCenterY, - NSLayoutFormatAlignAllFirstBaseline, NSLayoutFormatAlignAllLastBaseline, - NSLayoutFormatAlignAllLeading, NSLayoutFormatAlignAllLeft, NSLayoutFormatAlignAllRight, - NSLayoutFormatAlignAllTop, NSLayoutFormatAlignAllTrailing, NSLayoutFormatAlignmentMask, - NSLayoutFormatDirectionLeadingToTrailing, NSLayoutFormatDirectionLeftToRight, - NSLayoutFormatDirectionMask, NSLayoutFormatDirectionRightToLeft, NSLayoutFormatOptions, - NSLayoutPriority, NSLayoutPriorityDefaultHigh, NSLayoutPriorityDefaultLow, - NSLayoutPriorityDragThatCanResizeWindow, NSLayoutPriorityDragThatCannotResizeWindow, - NSLayoutPriorityFittingSizeCompression, NSLayoutPriorityRequired, - NSLayoutPriorityWindowSizeStayPut, NSLayoutRelation, NSLayoutRelationEqual, - NSLayoutRelationGreaterThanOrEqual, NSLayoutRelationLessThanOrEqual, - NSViewNoInstrinsicMetric, NSViewNoIntrinsicMetric, - }; - pub use super::NSLayoutGuide::NSLayoutGuide; - pub use super::NSLayoutManager::{ - NSControlCharacterAction, NSControlCharacterActionContainerBreak, - NSControlCharacterActionHorizontalTab, NSControlCharacterActionLineBreak, - NSControlCharacterActionParagraphBreak, NSControlCharacterActionWhitespace, - NSControlCharacterActionZeroAdvancement, NSGlyphAttributeBidiLevel, - NSGlyphAttributeElastic, NSGlyphAttributeInscribe, NSGlyphAttributeSoft, - NSGlyphInscribeAbove, NSGlyphInscribeBase, NSGlyphInscribeBelow, NSGlyphInscribeOverBelow, - NSGlyphInscribeOverstrike, NSGlyphInscription, NSGlyphProperty, - NSGlyphPropertyControlCharacter, NSGlyphPropertyElastic, NSGlyphPropertyNonBaseCharacter, - NSGlyphPropertyNull, NSLayoutManager, NSLayoutManagerDelegate, NSTextLayoutOrientation, - NSTextLayoutOrientationHorizontal, NSTextLayoutOrientationProvider, - NSTextLayoutOrientationVertical, NSTypesetterBehavior, NSTypesetterBehavior_10_2, - NSTypesetterBehavior_10_2_WithCompatibility, NSTypesetterBehavior_10_3, - NSTypesetterBehavior_10_4, NSTypesetterLatestBehavior, NSTypesetterOriginalBehavior, - }; - pub use super::NSLevelIndicator::{ - NSLevelIndicator, NSLevelIndicatorPlaceholderVisibility, - NSLevelIndicatorPlaceholderVisibilityAlways, - NSLevelIndicatorPlaceholderVisibilityAutomatic, - NSLevelIndicatorPlaceholderVisibilityWhileEditing, - }; - pub use super::NSLevelIndicatorCell::{ - NSContinuousCapacityLevelIndicatorStyle, NSDiscreteCapacityLevelIndicatorStyle, - NSLevelIndicatorCell, NSLevelIndicatorStyle, NSLevelIndicatorStyleContinuousCapacity, - NSLevelIndicatorStyleDiscreteCapacity, NSLevelIndicatorStyleRating, - NSLevelIndicatorStyleRelevancy, NSRatingLevelIndicatorStyle, - NSRelevancyLevelIndicatorStyle, - }; - pub use super::NSMagnificationGestureRecognizer::NSMagnificationGestureRecognizer; - pub use super::NSMatrix::{ - NSHighlightModeMatrix, NSListModeMatrix, NSMatrix, NSMatrixDelegate, NSMatrixMode, - NSRadioModeMatrix, NSTrackModeMatrix, - }; - pub use super::NSMediaLibraryBrowserController::{ - NSMediaLibrary, NSMediaLibraryAudio, NSMediaLibraryBrowserController, NSMediaLibraryImage, - NSMediaLibraryMovie, - }; - pub use super::NSMenu::{ - NSMenu, NSMenuDelegate, NSMenuDidAddItemNotification, NSMenuDidBeginTrackingNotification, - NSMenuDidChangeItemNotification, NSMenuDidEndTrackingNotification, - NSMenuDidRemoveItemNotification, NSMenuDidSendActionNotification, NSMenuItemValidation, - NSMenuProperties, NSMenuPropertyItemAccessibilityDescription, - NSMenuPropertyItemAttributedTitle, NSMenuPropertyItemEnabled, NSMenuPropertyItemImage, - NSMenuPropertyItemKeyEquivalent, NSMenuPropertyItemTitle, NSMenuWillSendActionNotification, - }; - pub use super::NSMenuItem::{NSMenuItem, NSMenuItemImportFromDeviceIdentifier}; - pub use super::NSMenuItemCell::NSMenuItemCell; - pub use super::NSMenuToolbarItem::NSMenuToolbarItem; - pub use super::NSMovie::NSMovie; - pub use super::NSNib::{NSNib, NSNibName, NSNibOwner, NSNibTopLevelObjects}; - pub use super::NSObjectController::NSObjectController; - pub use super::NSOpenGL::{ - NSOpenGLCPCurrentRendererID, NSOpenGLCPGPUFragmentProcessing, - NSOpenGLCPGPUVertexProcessing, NSOpenGLCPHasDrawable, NSOpenGLCPMPSwapsInFlight, - NSOpenGLCPRasterizationEnable, NSOpenGLCPReclaimResources, NSOpenGLCPStateValidation, - NSOpenGLCPSurfaceBackingSize, NSOpenGLCPSurfaceOpacity, NSOpenGLCPSurfaceOrder, - NSOpenGLCPSurfaceSurfaceVolatile, NSOpenGLCPSwapInterval, NSOpenGLCPSwapRectangle, - NSOpenGLCPSwapRectangleEnable, NSOpenGLContext, NSOpenGLContextParameter, - NSOpenGLContextParameterCurrentRendererID, NSOpenGLContextParameterGPUFragmentProcessing, - NSOpenGLContextParameterGPUVertexProcessing, NSOpenGLContextParameterHasDrawable, - NSOpenGLContextParameterMPSwapsInFlight, NSOpenGLContextParameterRasterizationEnable, - NSOpenGLContextParameterReclaimResources, NSOpenGLContextParameterStateValidation, - NSOpenGLContextParameterSurfaceBackingSize, NSOpenGLContextParameterSurfaceOpacity, - NSOpenGLContextParameterSurfaceOrder, NSOpenGLContextParameterSurfaceSurfaceVolatile, - NSOpenGLContextParameterSwapInterval, NSOpenGLContextParameterSwapRectangle, - NSOpenGLContextParameterSwapRectangleEnable, NSOpenGLGOClearFormatCache, - NSOpenGLGOFormatCacheSize, NSOpenGLGOResetLibrary, NSOpenGLGORetainRenderers, - NSOpenGLGOUseBuildCache, NSOpenGLGlobalOption, NSOpenGLPFAAccelerated, - NSOpenGLPFAAcceleratedCompute, NSOpenGLPFAAccumSize, NSOpenGLPFAAllRenderers, - NSOpenGLPFAAllowOfflineRenderers, NSOpenGLPFAAlphaSize, NSOpenGLPFAAuxBuffers, - NSOpenGLPFAAuxDepthStencil, NSOpenGLPFABackingStore, NSOpenGLPFAClosestPolicy, - NSOpenGLPFAColorFloat, NSOpenGLPFAColorSize, NSOpenGLPFACompliant, NSOpenGLPFADepthSize, - NSOpenGLPFADoubleBuffer, NSOpenGLPFAFullScreen, NSOpenGLPFAMPSafe, - NSOpenGLPFAMaximumPolicy, NSOpenGLPFAMinimumPolicy, NSOpenGLPFAMultiScreen, - NSOpenGLPFAMultisample, NSOpenGLPFANoRecovery, NSOpenGLPFAOffScreen, - NSOpenGLPFAOpenGLProfile, NSOpenGLPFAPixelBuffer, NSOpenGLPFARemotePixelBuffer, - NSOpenGLPFARendererID, NSOpenGLPFARobust, NSOpenGLPFASampleAlpha, NSOpenGLPFASampleBuffers, - NSOpenGLPFASamples, NSOpenGLPFAScreenMask, NSOpenGLPFASingleRenderer, - NSOpenGLPFAStencilSize, NSOpenGLPFAStereo, NSOpenGLPFASupersample, NSOpenGLPFATripleBuffer, - NSOpenGLPFAVirtualScreenCount, NSOpenGLPFAWindow, NSOpenGLPixelBuffer, NSOpenGLPixelFormat, - NSOpenGLPixelFormatAttribute, NSOpenGLProfileVersion3_2Core, NSOpenGLProfileVersion4_1Core, - NSOpenGLProfileVersionLegacy, - }; - pub use super::NSOpenGLLayer::NSOpenGLLayer; - pub use super::NSOpenGLView::NSOpenGLView; - pub use super::NSOpenPanel::NSOpenPanel; - pub use super::NSOutlineView::{ - NSOutlineView, NSOutlineViewColumnDidMoveNotification, - NSOutlineViewColumnDidResizeNotification, NSOutlineViewDataSource, NSOutlineViewDelegate, - NSOutlineViewDisclosureButtonKey, NSOutlineViewDropOnItemIndex, - NSOutlineViewItemDidCollapseNotification, NSOutlineViewItemDidExpandNotification, - NSOutlineViewItemWillCollapseNotification, NSOutlineViewItemWillExpandNotification, - NSOutlineViewSelectionDidChangeNotification, NSOutlineViewSelectionIsChangingNotification, - NSOutlineViewShowHideButtonKey, - }; - pub use super::NSPDFImageRep::NSPDFImageRep; - pub use super::NSPDFInfo::NSPDFInfo; - pub use super::NSPDFPanel::{ - NSPDFPanel, NSPDFPanelOptions, NSPDFPanelRequestsParentDirectory, - NSPDFPanelShowsOrientation, NSPDFPanelShowsPaperSize, - }; - pub use super::NSPICTImageRep::NSPICTImageRep; - pub use super::NSPageController::{ - NSPageController, NSPageControllerDelegate, NSPageControllerObjectIdentifier, - NSPageControllerTransitionStyle, NSPageControllerTransitionStyleHorizontalStrip, - NSPageControllerTransitionStyleStackBook, NSPageControllerTransitionStyleStackHistory, - }; - pub use super::NSPageLayout::NSPageLayout; - pub use super::NSPanGestureRecognizer::NSPanGestureRecognizer; - pub use super::NSPanel::{ - NSAlertAlternateReturn, NSAlertDefaultReturn, NSAlertErrorReturn, NSAlertOtherReturn, - NSCancelButton, NSOKButton, NSPanel, - }; - pub use super::NSParagraphStyle::{ - NSCenterTabStopType, NSDecimalTabStopType, NSLeftTabStopType, NSLineBreakByCharWrapping, - NSLineBreakByClipping, NSLineBreakByTruncatingHead, NSLineBreakByTruncatingMiddle, - NSLineBreakByTruncatingTail, NSLineBreakByWordWrapping, NSLineBreakMode, - NSLineBreakStrategy, NSLineBreakStrategyHangulWordPriority, NSLineBreakStrategyNone, - NSLineBreakStrategyPushOut, NSLineBreakStrategyStandard, NSMutableParagraphStyle, - NSParagraphStyle, NSRightTabStopType, NSTabColumnTerminatorsAttributeName, NSTextTab, - NSTextTabOptionKey, NSTextTabType, - }; - pub use super::NSPasteboard::{ - NSColorPboardType, NSDragPboard, NSFileContentsPboardType, NSFilenamesPboardType, - NSFilesPromisePboardType, NSFindPboard, NSFontPboard, NSFontPboardType, NSGeneralPboard, - NSHTMLPboardType, NSInkTextPboardType, NSMultipleTextSelectionPboardType, NSPDFPboardType, - NSPICTPboardType, NSPasteboard, NSPasteboardContentsCurrentHostOnly, - NSPasteboardContentsOptions, NSPasteboardName, NSPasteboardNameDrag, NSPasteboardNameFind, - NSPasteboardNameFont, NSPasteboardNameGeneral, NSPasteboardNameRuler, NSPasteboardReading, - NSPasteboardReadingAsData, NSPasteboardReadingAsKeyedArchive, - NSPasteboardReadingAsPropertyList, NSPasteboardReadingAsString, - NSPasteboardReadingOptionKey, NSPasteboardReadingOptions, NSPasteboardType, - NSPasteboardTypeColor, NSPasteboardTypeFileURL, NSPasteboardTypeFindPanelSearchOptions, - NSPasteboardTypeFont, NSPasteboardTypeHTML, NSPasteboardTypeMultipleTextSelection, - NSPasteboardTypeOwner, NSPasteboardTypePDF, NSPasteboardTypePNG, NSPasteboardTypeRTF, - NSPasteboardTypeRTFD, NSPasteboardTypeRuler, NSPasteboardTypeSound, NSPasteboardTypeString, - NSPasteboardTypeTIFF, NSPasteboardTypeTabularText, NSPasteboardTypeTextFinderOptions, - NSPasteboardTypeURL, NSPasteboardURLReadingContentsConformToTypesKey, - NSPasteboardURLReadingFileURLsOnlyKey, NSPasteboardWriting, NSPasteboardWritingOptions, - NSPasteboardWritingPromised, NSPostScriptPboardType, NSRTFDPboardType, NSRTFPboardType, - NSRulerPboard, NSRulerPboardType, NSStringPboardType, NSTIFFPboardType, - NSTabularTextPboardType, NSURLPboardType, NSVCardPboardType, - }; - pub use super::NSPasteboardItem::{NSPasteboardItem, NSPasteboardItemDataProvider}; - pub use super::NSPathCell::{ - NSPathCell, NSPathCellDelegate, NSPathStyle, NSPathStyleNavigationBar, NSPathStylePopUp, - NSPathStyleStandard, - }; - pub use super::NSPathComponentCell::NSPathComponentCell; - pub use super::NSPathControl::{NSPathControl, NSPathControlDelegate}; - pub use super::NSPathControlItem::NSPathControlItem; - pub use super::NSPersistentDocument::NSPersistentDocument; - pub use super::NSPickerTouchBarItem::{ - NSPickerTouchBarItem, NSPickerTouchBarItemControlRepresentation, - NSPickerTouchBarItemControlRepresentationAutomatic, - NSPickerTouchBarItemControlRepresentationCollapsed, - NSPickerTouchBarItemControlRepresentationExpanded, NSPickerTouchBarItemSelectionMode, - NSPickerTouchBarItemSelectionModeMomentary, NSPickerTouchBarItemSelectionModeSelectAny, - NSPickerTouchBarItemSelectionModeSelectOne, - }; - pub use super::NSPopUpButton::{NSPopUpButton, NSPopUpButtonWillPopUpNotification}; - pub use super::NSPopUpButtonCell::{ - NSPopUpArrowAtBottom, NSPopUpArrowAtCenter, NSPopUpArrowPosition, NSPopUpButtonCell, - NSPopUpButtonCellWillPopUpNotification, NSPopUpNoArrow, - }; - pub use super::NSPopover::{ - NSPopover, NSPopoverAppearance, NSPopoverAppearanceHUD, NSPopoverAppearanceMinimal, - NSPopoverBehavior, NSPopoverBehaviorApplicationDefined, NSPopoverBehaviorSemitransient, - NSPopoverBehaviorTransient, NSPopoverCloseReasonDetachToWindow, NSPopoverCloseReasonKey, - NSPopoverCloseReasonStandard, NSPopoverCloseReasonValue, NSPopoverDelegate, - NSPopoverDidCloseNotification, NSPopoverDidShowNotification, - NSPopoverWillCloseNotification, NSPopoverWillShowNotification, - }; - pub use super::NSPopoverTouchBarItem::NSPopoverTouchBarItem; - pub use super::NSPredicateEditor::NSPredicateEditor; - pub use super::NSPredicateEditorRowTemplate::NSPredicateEditorRowTemplate; - pub use super::NSPressGestureRecognizer::NSPressGestureRecognizer; - pub use super::NSPressureConfiguration::NSPressureConfiguration; - pub use super::NSPrintInfo::{ - NSAutoPagination, NSClipPagination, NSFitPagination, NSLandscapeOrientation, - NSPaperOrientation, NSPaperOrientationLandscape, NSPaperOrientationPortrait, - NSPortraitOrientation, NSPrintAllPages, NSPrintBottomMargin, NSPrintCancelJob, - NSPrintCopies, NSPrintDetailedErrorReporting, NSPrintFaxNumber, NSPrintFirstPage, - NSPrintFormName, NSPrintHeaderAndFooter, NSPrintHorizontalPagination, - NSPrintHorizontallyCentered, NSPrintInfo, NSPrintInfoAttributeKey, NSPrintInfoSettingKey, - NSPrintJobDisposition, NSPrintJobDispositionValue, NSPrintJobFeatures, - NSPrintJobSavingFileNameExtensionHidden, NSPrintJobSavingURL, NSPrintLastPage, - NSPrintLeftMargin, NSPrintManualFeed, NSPrintMustCollate, NSPrintOrientation, - NSPrintPagesAcross, NSPrintPagesDown, NSPrintPagesPerSheet, NSPrintPaperFeed, - NSPrintPaperName, NSPrintPaperSize, NSPrintPreviewJob, NSPrintPrinter, NSPrintPrinterName, - NSPrintReversePageOrder, NSPrintRightMargin, NSPrintSaveJob, NSPrintSavePath, - NSPrintScalingFactor, NSPrintSelectionOnly, NSPrintSpoolJob, NSPrintTime, NSPrintTopMargin, - NSPrintVerticalPagination, NSPrintVerticallyCentered, NSPrintingOrientation, - NSPrintingPaginationMode, NSPrintingPaginationModeAutomatic, NSPrintingPaginationModeClip, - NSPrintingPaginationModeFit, - }; - pub use super::NSPrintOperation::{ - NSAscendingPageOrder, NSDescendingPageOrder, NSPrintOperation, - NSPrintOperationExistsException, NSPrintRenderingQuality, NSPrintRenderingQualityBest, - NSPrintRenderingQualityResponsive, NSPrintingPageOrder, NSSpecialPageOrder, - NSUnknownPageOrder, - }; - pub use super::NSPrintPanel::{ - NSPrintAllPresetsJobStyleHint, NSPrintNoPresetsJobStyleHint, NSPrintPanel, - NSPrintPanelAccessorizing, NSPrintPanelAccessorySummaryItemDescriptionKey, - NSPrintPanelAccessorySummaryItemNameKey, NSPrintPanelAccessorySummaryKey, - NSPrintPanelJobStyleHint, NSPrintPanelOptions, NSPrintPanelShowsCopies, - NSPrintPanelShowsOrientation, NSPrintPanelShowsPageRange, - NSPrintPanelShowsPageSetupAccessory, NSPrintPanelShowsPaperSize, NSPrintPanelShowsPreview, - NSPrintPanelShowsPrintSelection, NSPrintPanelShowsScaling, NSPrintPhotoJobStyleHint, - }; - pub use super::NSPrinter::{ - NSPrinter, NSPrinterPaperName, NSPrinterTableError, NSPrinterTableNotFound, - NSPrinterTableOK, NSPrinterTableStatus, NSPrinterTypeName, - }; - pub use super::NSProgressIndicator::{ - NSProgressIndicator, NSProgressIndicatorBarStyle, - NSProgressIndicatorPreferredAquaThickness, NSProgressIndicatorPreferredLargeThickness, - NSProgressIndicatorPreferredSmallThickness, NSProgressIndicatorPreferredThickness, - NSProgressIndicatorSpinningStyle, NSProgressIndicatorStyle, NSProgressIndicatorStyleBar, - NSProgressIndicatorStyleSpinning, NSProgressIndicatorThickness, - }; - pub use super::NSResponder::{NSResponder, NSStandardKeyBindingResponding}; - pub use super::NSRotationGestureRecognizer::NSRotationGestureRecognizer; - pub use super::NSRuleEditor::{ - NSRuleEditor, NSRuleEditorDelegate, NSRuleEditorNestingMode, - NSRuleEditorNestingModeCompound, NSRuleEditorNestingModeList, - NSRuleEditorNestingModeSimple, NSRuleEditorNestingModeSingle, - NSRuleEditorPredicateComparisonModifier, NSRuleEditorPredicateCompoundType, - NSRuleEditorPredicateCustomSelector, NSRuleEditorPredicateLeftExpression, - NSRuleEditorPredicateOperatorType, NSRuleEditorPredicateOptions, - NSRuleEditorPredicatePartKey, NSRuleEditorPredicateRightExpression, NSRuleEditorRowType, - NSRuleEditorRowTypeCompound, NSRuleEditorRowTypeSimple, - NSRuleEditorRowsDidChangeNotification, - }; - pub use super::NSRulerMarker::NSRulerMarker; - pub use super::NSRulerView::{ - NSHorizontalRuler, NSRulerOrientation, NSRulerView, NSRulerViewUnitCentimeters, - NSRulerViewUnitInches, NSRulerViewUnitName, NSRulerViewUnitPicas, NSRulerViewUnitPoints, - NSVerticalRuler, - }; - pub use super::NSRunningApplication::{ - NSApplicationActivateAllWindows, NSApplicationActivateIgnoringOtherApps, - NSApplicationActivationOptions, NSApplicationActivationPolicy, - NSApplicationActivationPolicyAccessory, NSApplicationActivationPolicyProhibited, - NSApplicationActivationPolicyRegular, NSRunningApplication, - }; - pub use super::NSSavePanel::{ - NSFileHandlingPanelCancelButton, NSFileHandlingPanelOKButton, NSOpenSavePanelDelegate, - NSSavePanel, - }; - pub use super::NSScreen::{NSScreen, NSScreenColorSpaceDidChangeNotification}; - pub use super::NSScrollView::{ - NSScrollElasticity, NSScrollElasticityAllowed, NSScrollElasticityAutomatic, - NSScrollElasticityNone, NSScrollView, NSScrollViewDidEndLiveMagnifyNotification, - NSScrollViewDidEndLiveScrollNotification, NSScrollViewDidLiveScrollNotification, - NSScrollViewFindBarPosition, NSScrollViewFindBarPositionAboveContent, - NSScrollViewFindBarPositionAboveHorizontalRuler, NSScrollViewFindBarPositionBelowContent, - NSScrollViewWillStartLiveMagnifyNotification, NSScrollViewWillStartLiveScrollNotification, - }; - pub use super::NSScroller::{ - NSAllScrollerParts, NSNoScrollerParts, NSOnlyScrollerArrows, - NSPreferredScrollerStyleDidChangeNotification, NSScrollArrowPosition, NSScroller, - NSScrollerArrow, NSScrollerArrowsDefaultSetting, NSScrollerArrowsMaxEnd, - NSScrollerArrowsMinEnd, NSScrollerArrowsNone, NSScrollerDecrementArrow, - NSScrollerDecrementLine, NSScrollerDecrementPage, NSScrollerIncrementArrow, - NSScrollerIncrementLine, NSScrollerIncrementPage, NSScrollerKnob, NSScrollerKnobSlot, - NSScrollerKnobStyle, NSScrollerKnobStyleDark, NSScrollerKnobStyleDefault, - NSScrollerKnobStyleLight, NSScrollerNoPart, NSScrollerPart, NSScrollerStyle, - NSScrollerStyleLegacy, NSScrollerStyleOverlay, NSUsableScrollerParts, - }; - pub use super::NSScrubber::{ - NSScrubber, NSScrubberAlignment, NSScrubberAlignmentCenter, NSScrubberAlignmentLeading, - NSScrubberAlignmentNone, NSScrubberAlignmentTrailing, NSScrubberDataSource, - NSScrubberDelegate, NSScrubberMode, NSScrubberModeFixed, NSScrubberModeFree, - NSScrubberSelectionStyle, - }; - pub use super::NSScrubberItemView::{ - NSScrubberArrangedView, NSScrubberImageItemView, NSScrubberItemView, - NSScrubberSelectionView, NSScrubberTextItemView, - }; - pub use super::NSScrubberLayout::{ - NSScrubberFlowLayout, NSScrubberFlowLayoutDelegate, NSScrubberLayout, - NSScrubberLayoutAttributes, NSScrubberProportionalLayout, - }; - pub use super::NSSearchField::{ - NSSearchField, NSSearchFieldDelegate, NSSearchFieldRecentsAutosaveName, - }; - pub use super::NSSearchFieldCell::{ - NSSearchFieldCell, NSSearchFieldClearRecentsMenuItemTag, NSSearchFieldNoRecentsMenuItemTag, - NSSearchFieldRecentsMenuItemTag, NSSearchFieldRecentsTitleMenuItemTag, - }; - pub use super::NSSearchToolbarItem::NSSearchToolbarItem; - pub use super::NSSecureTextField::{NSSecureTextField, NSSecureTextFieldCell}; - pub use super::NSSegmentedCell::NSSegmentedCell; - pub use super::NSSegmentedControl::{ - NSSegmentDistribution, NSSegmentDistributionFill, NSSegmentDistributionFillEqually, - NSSegmentDistributionFillProportionally, NSSegmentDistributionFit, NSSegmentStyle, - NSSegmentStyleAutomatic, NSSegmentStyleCapsule, NSSegmentStyleRoundRect, - NSSegmentStyleRounded, NSSegmentStyleSeparated, NSSegmentStyleSmallSquare, - NSSegmentStyleTexturedRounded, NSSegmentStyleTexturedSquare, NSSegmentSwitchTracking, - NSSegmentSwitchTrackingMomentary, NSSegmentSwitchTrackingMomentaryAccelerator, - NSSegmentSwitchTrackingSelectAny, NSSegmentSwitchTrackingSelectOne, NSSegmentedControl, - }; - pub use super::NSShadow::NSShadow; - pub use super::NSSharingService::{ - NSCloudKitSharingServiceAllowPrivate, NSCloudKitSharingServiceAllowPublic, - NSCloudKitSharingServiceAllowReadOnly, NSCloudKitSharingServiceAllowReadWrite, - NSCloudKitSharingServiceOptions, NSCloudKitSharingServiceStandard, - NSCloudSharingServiceDelegate, NSSharingContentScope, NSSharingContentScopeFull, - NSSharingContentScopeItem, NSSharingContentScopePartial, NSSharingService, - NSSharingServiceDelegate, NSSharingServiceName, NSSharingServiceNameAddToAperture, - NSSharingServiceNameAddToIPhoto, NSSharingServiceNameAddToSafariReadingList, - NSSharingServiceNameCloudSharing, NSSharingServiceNameComposeEmail, - NSSharingServiceNameComposeMessage, NSSharingServiceNamePostImageOnFlickr, - NSSharingServiceNamePostOnFacebook, NSSharingServiceNamePostOnLinkedIn, - NSSharingServiceNamePostOnSinaWeibo, NSSharingServiceNamePostOnTencentWeibo, - NSSharingServiceNamePostOnTwitter, NSSharingServiceNamePostVideoOnTudou, - NSSharingServiceNamePostVideoOnVimeo, NSSharingServiceNamePostVideoOnYouku, - NSSharingServiceNameSendViaAirDrop, NSSharingServiceNameUseAsDesktopPicture, - NSSharingServiceNameUseAsFacebookProfileImage, - NSSharingServiceNameUseAsLinkedInProfileImage, - NSSharingServiceNameUseAsTwitterProfileImage, NSSharingServicePicker, - NSSharingServicePickerDelegate, - }; - pub use super::NSSharingServicePickerToolbarItem::{ - NSSharingServicePickerToolbarItem, NSSharingServicePickerToolbarItemDelegate, - }; - pub use super::NSSharingServicePickerTouchBarItem::{ - NSSharingServicePickerTouchBarItem, NSSharingServicePickerTouchBarItemDelegate, - }; - pub use super::NSSlider::NSSlider; - pub use super::NSSliderAccessory::{NSSliderAccessory, NSSliderAccessoryBehavior}; - pub use super::NSSliderCell::{ - NSCircularSlider, NSLinearSlider, NSSliderCell, NSSliderType, NSSliderTypeCircular, - NSSliderTypeLinear, NSTickMarkAbove, NSTickMarkBelow, NSTickMarkLeft, NSTickMarkPosition, - NSTickMarkPositionAbove, NSTickMarkPositionBelow, NSTickMarkPositionLeading, - NSTickMarkPositionTrailing, NSTickMarkRight, - }; - pub use super::NSSliderTouchBarItem::{ - NSSliderAccessoryWidth, NSSliderAccessoryWidthDefault, NSSliderAccessoryWidthWide, - NSSliderTouchBarItem, - }; - pub use super::NSSound::{ - NSSound, NSSoundDelegate, NSSoundName, NSSoundPboardType, NSSoundPlaybackDeviceIdentifier, - }; - pub use super::NSSpeechRecognizer::{NSSpeechRecognizer, NSSpeechRecognizerDelegate}; - pub use super::NSSpeechSynthesizer::{ - NSSpeechBoundary, NSSpeechCharacterModeProperty, NSSpeechCommandDelimiterKey, - NSSpeechCommandDelimiterProperty, NSSpeechCommandPrefix, NSSpeechCommandSuffix, - NSSpeechCurrentVoiceProperty, NSSpeechDictionaryAbbreviations, - NSSpeechDictionaryEntryPhonemes, NSSpeechDictionaryEntrySpelling, NSSpeechDictionaryKey, - NSSpeechDictionaryLocaleIdentifier, NSSpeechDictionaryModificationDate, - NSSpeechDictionaryPronunciations, NSSpeechErrorCount, NSSpeechErrorKey, - NSSpeechErrorNewestCharacterOffset, NSSpeechErrorNewestCode, - NSSpeechErrorOldestCharacterOffset, NSSpeechErrorOldestCode, NSSpeechErrorsProperty, - NSSpeechImmediateBoundary, NSSpeechInputModeProperty, NSSpeechMode, NSSpeechModeLiteral, - NSSpeechModeNormal, NSSpeechModePhoneme, NSSpeechModeText, NSSpeechNumberModeProperty, - NSSpeechOutputToFileURLProperty, NSSpeechPhonemeInfoExample, NSSpeechPhonemeInfoHiliteEnd, - NSSpeechPhonemeInfoHiliteStart, NSSpeechPhonemeInfoKey, NSSpeechPhonemeInfoOpcode, - NSSpeechPhonemeInfoSymbol, NSSpeechPhonemeSymbolsProperty, NSSpeechPitchBaseProperty, - NSSpeechPitchModProperty, NSSpeechPropertyKey, NSSpeechRateProperty, - NSSpeechRecentSyncProperty, NSSpeechResetProperty, NSSpeechSentenceBoundary, - NSSpeechStatusKey, NSSpeechStatusNumberOfCharactersLeft, NSSpeechStatusOutputBusy, - NSSpeechStatusOutputPaused, NSSpeechStatusPhonemeCode, NSSpeechStatusProperty, - NSSpeechSynthesizer, NSSpeechSynthesizerDelegate, NSSpeechSynthesizerInfoIdentifier, - NSSpeechSynthesizerInfoKey, NSSpeechSynthesizerInfoProperty, - NSSpeechSynthesizerInfoVersion, NSSpeechSynthesizerVoiceName, NSSpeechVolumeProperty, - NSSpeechWordBoundary, NSVoiceAge, NSVoiceAttributeKey, NSVoiceDemoText, NSVoiceGender, - NSVoiceGenderFemale, NSVoiceGenderMale, NSVoiceGenderName, NSVoiceGenderNeuter, - NSVoiceGenderNeutral, NSVoiceIdentifier, NSVoiceIndividuallySpokenCharacters, - NSVoiceLanguage, NSVoiceLocaleIdentifier, NSVoiceName, NSVoiceSupportedCharacters, - }; - pub use super::NSSpellChecker::{ - NSCorrectionIndicatorType, NSCorrectionIndicatorTypeDefault, - NSCorrectionIndicatorTypeGuesses, NSCorrectionIndicatorTypeReversion, NSCorrectionResponse, - NSCorrectionResponseAccepted, NSCorrectionResponseEdited, NSCorrectionResponseIgnored, - NSCorrectionResponseNone, NSCorrectionResponseRejected, NSCorrectionResponseReverted, - NSSpellChecker, NSSpellCheckerDidChangeAutomaticCapitalizationNotification, - NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification, - NSSpellCheckerDidChangeAutomaticPeriodSubstitutionNotification, - NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification, - NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification, - NSSpellCheckerDidChangeAutomaticTextCompletionNotification, - NSSpellCheckerDidChangeAutomaticTextReplacementNotification, - NSTextCheckingDocumentAuthorKey, NSTextCheckingDocumentTitleKey, - NSTextCheckingDocumentURLKey, NSTextCheckingOptionKey, NSTextCheckingOrthographyKey, - NSTextCheckingQuotesKey, NSTextCheckingReferenceDateKey, - NSTextCheckingReferenceTimeZoneKey, NSTextCheckingRegularExpressionsKey, - NSTextCheckingReplacementsKey, NSTextCheckingSelectedRangeKey, - }; - pub use super::NSSpellProtocol::{NSChangeSpelling, NSIgnoreMisspelledWords}; - pub use super::NSSplitView::{ - NSSplitView, NSSplitViewAutosaveName, NSSplitViewDelegate, - NSSplitViewDidResizeSubviewsNotification, NSSplitViewDividerStyle, - NSSplitViewDividerStylePaneSplitter, NSSplitViewDividerStyleThick, - NSSplitViewDividerStyleThin, NSSplitViewWillResizeSubviewsNotification, - }; - pub use super::NSSplitViewController::{ - NSSplitViewController, NSSplitViewControllerAutomaticDimension, - }; - pub use super::NSSplitViewItem::{ - NSSplitViewItem, NSSplitViewItemBehavior, NSSplitViewItemBehaviorContentList, - NSSplitViewItemBehaviorDefault, NSSplitViewItemBehaviorSidebar, - NSSplitViewItemCollapseBehavior, NSSplitViewItemCollapseBehaviorDefault, - NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitView, - NSSplitViewItemCollapseBehaviorPreferResizingSplitViewWithFixedSiblings, - NSSplitViewItemCollapseBehaviorUseConstraints, NSSplitViewItemUnspecifiedDimension, - }; - pub use super::NSStackView::{ - NSStackView, NSStackViewDelegate, NSStackViewDistribution, - NSStackViewDistributionEqualCentering, NSStackViewDistributionEqualSpacing, - NSStackViewDistributionFill, NSStackViewDistributionFillEqually, - NSStackViewDistributionFillProportionally, NSStackViewDistributionGravityAreas, - NSStackViewGravity, NSStackViewGravityBottom, NSStackViewGravityCenter, - NSStackViewGravityLeading, NSStackViewGravityTop, NSStackViewGravityTrailing, - NSStackViewVisibilityPriority, NSStackViewVisibilityPriorityDetachOnlyIfNecessary, - NSStackViewVisibilityPriorityMustHold, NSStackViewVisibilityPriorityNotVisible, - }; - pub use super::NSStatusBar::{ - NSSquareStatusItemLength, NSStatusBar, NSVariableStatusItemLength, - }; - pub use super::NSStatusBarButton::NSStatusBarButton; - pub use super::NSStatusItem::{ - NSStatusItem, NSStatusItemAutosaveName, NSStatusItemBehavior, - NSStatusItemBehaviorRemovalAllowed, NSStatusItemBehaviorTerminationOnRemoval, - }; - pub use super::NSStepper::NSStepper; - pub use super::NSStepperCell::NSStepperCell; - pub use super::NSStepperTouchBarItem::NSStepperTouchBarItem; - pub use super::NSStoryboard::{ - NSStoryboard, NSStoryboardControllerCreator, NSStoryboardName, NSStoryboardSceneIdentifier, - }; - pub use super::NSStoryboardSegue::{ - NSSeguePerforming, NSStoryboardSegue, NSStoryboardSegueIdentifier, - }; - pub use super::NSStringDrawing::{ - NSStringDrawingContext, NSStringDrawingDisableScreenFontSubstitution, - NSStringDrawingOneShot, NSStringDrawingOptions, NSStringDrawingTruncatesLastVisibleLine, - NSStringDrawingUsesDeviceMetrics, NSStringDrawingUsesFontLeading, - NSStringDrawingUsesLineFragmentOrigin, - }; - pub use super::NSSwitch::NSSwitch; - pub use super::NSTabView::{ - NSAppKitVersionNumberWithDirectionalTabs, NSBottomTabsBezelBorder, NSLeftTabsBezelBorder, - NSNoTabsBezelBorder, NSNoTabsLineBorder, NSNoTabsNoBorder, NSRightTabsBezelBorder, - NSTabPosition, NSTabPositionBottom, NSTabPositionLeft, NSTabPositionNone, - NSTabPositionRight, NSTabPositionTop, NSTabView, NSTabViewBorderType, - NSTabViewBorderTypeBezel, NSTabViewBorderTypeLine, NSTabViewBorderTypeNone, - NSTabViewDelegate, NSTabViewType, NSTopTabsBezelBorder, - }; - pub use super::NSTabViewController::{ - NSTabViewController, NSTabViewControllerTabStyle, - NSTabViewControllerTabStyleSegmentedControlOnBottom, - NSTabViewControllerTabStyleSegmentedControlOnTop, NSTabViewControllerTabStyleToolbar, - NSTabViewControllerTabStyleUnspecified, - }; - pub use super::NSTabViewItem::{ - NSBackgroundTab, NSPressedTab, NSSelectedTab, NSTabState, NSTabViewItem, - }; - pub use super::NSTableCellView::NSTableCellView; - pub use super::NSTableColumn::{ - NSTableColumn, NSTableColumnAutoresizingMask, NSTableColumnNoResizing, - NSTableColumnResizingOptions, NSTableColumnUserResizingMask, - }; - pub use super::NSTableHeaderCell::NSTableHeaderCell; - pub use super::NSTableHeaderView::NSTableHeaderView; - pub use super::NSTableRowView::NSTableRowView; - pub use super::NSTableView::{ - NSTableRowActionEdge, NSTableRowActionEdgeLeading, NSTableRowActionEdgeTrailing, - NSTableView, NSTableViewAnimationEffectFade, NSTableViewAnimationEffectGap, - NSTableViewAnimationEffectNone, NSTableViewAnimationOptions, NSTableViewAnimationSlideDown, - NSTableViewAnimationSlideLeft, NSTableViewAnimationSlideRight, NSTableViewAnimationSlideUp, - NSTableViewAutosaveName, NSTableViewColumnAutoresizingStyle, - NSTableViewColumnDidMoveNotification, NSTableViewColumnDidResizeNotification, - NSTableViewDashedHorizontalGridLineMask, NSTableViewDataSource, NSTableViewDelegate, - NSTableViewDraggingDestinationFeedbackStyle, - NSTableViewDraggingDestinationFeedbackStyleGap, - NSTableViewDraggingDestinationFeedbackStyleNone, - NSTableViewDraggingDestinationFeedbackStyleRegular, - NSTableViewDraggingDestinationFeedbackStyleSourceList, NSTableViewDropAbove, - NSTableViewDropOn, NSTableViewDropOperation, NSTableViewFirstColumnOnlyAutoresizingStyle, - NSTableViewGridLineStyle, NSTableViewGridNone, NSTableViewLastColumnOnlyAutoresizingStyle, - NSTableViewNoColumnAutoresizing, NSTableViewReverseSequentialColumnAutoresizingStyle, - NSTableViewRowSizeStyle, NSTableViewRowSizeStyleCustom, NSTableViewRowSizeStyleDefault, - NSTableViewRowSizeStyleLarge, NSTableViewRowSizeStyleMedium, NSTableViewRowSizeStyleSmall, - NSTableViewRowViewKey, NSTableViewSelectionDidChangeNotification, - NSTableViewSelectionHighlightStyle, NSTableViewSelectionHighlightStyleNone, - NSTableViewSelectionHighlightStyleRegular, NSTableViewSelectionHighlightStyleSourceList, - NSTableViewSelectionIsChangingNotification, NSTableViewSequentialColumnAutoresizingStyle, - NSTableViewSolidHorizontalGridLineMask, NSTableViewSolidVerticalGridLineMask, - NSTableViewStyle, NSTableViewStyleAutomatic, NSTableViewStyleFullWidth, - NSTableViewStyleInset, NSTableViewStylePlain, NSTableViewStyleSourceList, - NSTableViewUniformColumnAutoresizingStyle, - }; - pub use super::NSTableViewDiffableDataSource::{ - NSTableViewDiffableDataSource, NSTableViewDiffableDataSourceCellProvider, - NSTableViewDiffableDataSourceRowProvider, - NSTableViewDiffableDataSourceSectionHeaderViewProvider, - }; - pub use super::NSTableViewRowAction::{ - NSTableViewRowAction, NSTableViewRowActionStyle, NSTableViewRowActionStyleDestructive, - NSTableViewRowActionStyleRegular, - }; - pub use super::NSText::{ - NSBackTabCharacter, NSBackspaceCharacter, NSBacktabTextMovement, NSCancelTextMovement, - NSCarriageReturnCharacter, NSCenterTextAlignment, NSDeleteCharacter, NSDownTextMovement, - NSEnterCharacter, NSFormFeedCharacter, NSIllegalTextMovement, NSJustifiedTextAlignment, - NSLeftTextAlignment, NSLeftTextMovement, NSLineSeparatorCharacter, NSNaturalTextAlignment, - NSNewlineCharacter, NSOtherTextMovement, NSParagraphSeparatorCharacter, - NSReturnTextMovement, NSRightTextAlignment, NSRightTextMovement, NSTabCharacter, - NSTabTextMovement, NSText, NSTextAlignment, NSTextAlignmentCenter, - NSTextAlignmentJustified, NSTextAlignmentLeft, NSTextAlignmentNatural, - NSTextAlignmentRight, NSTextDelegate, NSTextDidBeginEditingNotification, - NSTextDidChangeNotification, NSTextDidEndEditingNotification, NSTextMovement, - NSTextMovementBacktab, NSTextMovementCancel, NSTextMovementDown, NSTextMovementLeft, - NSTextMovementOther, NSTextMovementReturn, NSTextMovementRight, NSTextMovementTab, - NSTextMovementUp, NSTextMovementUserInfoKey, NSTextWritingDirectionEmbedding, - NSTextWritingDirectionOverride, NSUpTextMovement, NSWritingDirection, - NSWritingDirectionLeftToRight, NSWritingDirectionNatural, NSWritingDirectionRightToLeft, - }; - pub use super::NSTextAlternatives::{ - NSTextAlternatives, NSTextAlternativesSelectedAlternativeStringNotification, - }; - pub use super::NSTextAttachment::{ - NSAttachmentCharacter, NSTextAttachment, NSTextAttachmentContainer, NSTextAttachmentLayout, - NSTextAttachmentViewProvider, - }; - pub use super::NSTextAttachmentCell::NSTextAttachmentCell; - pub use super::NSTextCheckingClient::{ - NSTextCheckingClient, NSTextInputTraitType, NSTextInputTraitTypeDefault, - NSTextInputTraitTypeNo, NSTextInputTraitTypeYes, NSTextInputTraits, - }; - pub use super::NSTextCheckingController::NSTextCheckingController; - pub use super::NSTextContainer::{ - NSLineDoesntMove, NSLineMovementDirection, NSLineMovesDown, NSLineMovesLeft, - NSLineMovesRight, NSLineMovesUp, NSLineSweepDirection, NSLineSweepDown, NSLineSweepLeft, - NSLineSweepRight, NSLineSweepUp, NSTextContainer, - }; - pub use super::NSTextContent::{ - NSTextContent, NSTextContentType, NSTextContentTypeOneTimeCode, NSTextContentTypePassword, - NSTextContentTypeUsername, - }; - pub use super::NSTextContentManager::{ - NSTextContentManager, NSTextContentManagerDelegate, NSTextContentManagerEnumerationOptions, - NSTextContentManagerEnumerationOptionsNone, NSTextContentManagerEnumerationOptionsReverse, - NSTextContentStorage, NSTextContentStorageDelegate, - NSTextContentStorageUnsupportedAttributeAddedNotification, NSTextElementProvider, - }; - pub use super::NSTextElement::{NSTextElement, NSTextParagraph}; - pub use super::NSTextField::{NSTextField, NSTextFieldDelegate}; - pub use super::NSTextFieldCell::{ - NSTextFieldBezelStyle, NSTextFieldCell, NSTextFieldRoundedBezel, NSTextFieldSquareBezel, - }; - pub use super::NSTextFinder::{ - NSPasteboardTypeTextFinderOptionKey, NSTextFinder, NSTextFinderAction, - NSTextFinderActionHideFindInterface, NSTextFinderActionHideReplaceInterface, - NSTextFinderActionNextMatch, NSTextFinderActionPreviousMatch, NSTextFinderActionReplace, - NSTextFinderActionReplaceAll, NSTextFinderActionReplaceAllInSelection, - NSTextFinderActionReplaceAndFind, NSTextFinderActionSelectAll, - NSTextFinderActionSelectAllInSelection, NSTextFinderActionSetSearchString, - NSTextFinderActionShowFindInterface, NSTextFinderActionShowReplaceInterface, - NSTextFinderBarContainer, NSTextFinderCaseInsensitiveKey, NSTextFinderClient, - NSTextFinderMatchingType, NSTextFinderMatchingTypeContains, - NSTextFinderMatchingTypeEndsWith, NSTextFinderMatchingTypeFullWord, - NSTextFinderMatchingTypeKey, NSTextFinderMatchingTypeStartsWith, - }; - pub use super::NSTextInputClient::NSTextInputClient; - pub use super::NSTextInputContext::{ - NSTextInputContext, NSTextInputContextKeyboardSelectionDidChangeNotification, - NSTextInputSourceIdentifier, - }; - pub use super::NSTextLayoutFragment::{ - NSTextLayoutFragment, NSTextLayoutFragmentEnumerationOptions, - NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment, - NSTextLayoutFragmentEnumerationOptionsEnsuresLayout, - NSTextLayoutFragmentEnumerationOptionsEstimatesSize, - NSTextLayoutFragmentEnumerationOptionsNone, NSTextLayoutFragmentEnumerationOptionsReverse, - NSTextLayoutFragmentState, NSTextLayoutFragmentStateCalculatedUsageBounds, - NSTextLayoutFragmentStateEstimatedUsageBounds, NSTextLayoutFragmentStateLayoutAvailable, - NSTextLayoutFragmentStateNone, - }; - pub use super::NSTextLayoutManager::{ - NSTextLayoutManager, NSTextLayoutManagerDelegate, NSTextLayoutManagerSegmentOptions, - NSTextLayoutManagerSegmentOptionsHeadSegmentExtended, - NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded, - NSTextLayoutManagerSegmentOptionsNone, NSTextLayoutManagerSegmentOptionsRangeNotRequired, - NSTextLayoutManagerSegmentOptionsTailSegmentExtended, - NSTextLayoutManagerSegmentOptionsUpstreamAffinity, NSTextLayoutManagerSegmentType, - NSTextLayoutManagerSegmentTypeHighlight, NSTextLayoutManagerSegmentTypeSelection, - NSTextLayoutManagerSegmentTypeStandard, - }; - pub use super::NSTextLineFragment::NSTextLineFragment; - pub use super::NSTextList::{ - NSTextList, NSTextListMarkerBox, NSTextListMarkerCheck, NSTextListMarkerCircle, - NSTextListMarkerDecimal, NSTextListMarkerDiamond, NSTextListMarkerDisc, - NSTextListMarkerFormat, NSTextListMarkerHyphen, NSTextListMarkerLowercaseAlpha, - NSTextListMarkerLowercaseHexadecimal, NSTextListMarkerLowercaseLatin, - NSTextListMarkerLowercaseRoman, NSTextListMarkerOctal, NSTextListMarkerSquare, - NSTextListMarkerUppercaseAlpha, NSTextListMarkerUppercaseHexadecimal, - NSTextListMarkerUppercaseLatin, NSTextListMarkerUppercaseRoman, NSTextListOptions, - NSTextListPrependEnclosingMarker, - }; - pub use super::NSTextRange::{NSTextLocation, NSTextRange}; - pub use super::NSTextSelection::{ - NSTextSelection, NSTextSelectionAffinity, NSTextSelectionAffinityDownstream, - NSTextSelectionAffinityUpstream, NSTextSelectionGranularity, - NSTextSelectionGranularityCharacter, NSTextSelectionGranularityLine, - NSTextSelectionGranularityParagraph, NSTextSelectionGranularitySentence, - NSTextSelectionGranularityWord, - }; - pub use super::NSTextSelectionNavigation::{ - NSTextSelectionDataSource, NSTextSelectionNavigation, NSTextSelectionNavigationDestination, - NSTextSelectionNavigationDestinationCharacter, - NSTextSelectionNavigationDestinationContainer, - NSTextSelectionNavigationDestinationDocument, NSTextSelectionNavigationDestinationLine, - NSTextSelectionNavigationDestinationParagraph, - NSTextSelectionNavigationDestinationSentence, NSTextSelectionNavigationDestinationWord, - NSTextSelectionNavigationDirection, NSTextSelectionNavigationDirectionBackward, - NSTextSelectionNavigationDirectionDown, NSTextSelectionNavigationDirectionForward, - NSTextSelectionNavigationDirectionLeft, NSTextSelectionNavigationDirectionRight, - NSTextSelectionNavigationDirectionUp, NSTextSelectionNavigationLayoutOrientation, - NSTextSelectionNavigationLayoutOrientationHorizontal, - NSTextSelectionNavigationLayoutOrientationVertical, NSTextSelectionNavigationModifier, - NSTextSelectionNavigationModifierExtend, NSTextSelectionNavigationModifierMultiple, - NSTextSelectionNavigationModifierVisual, NSTextSelectionNavigationWritingDirection, - NSTextSelectionNavigationWritingDirectionLeftToRight, - NSTextSelectionNavigationWritingDirectionRightToLeft, - }; - pub use super::NSTextStorage::{ - NSTextStorage, NSTextStorageDelegate, NSTextStorageDidProcessEditingNotification, - NSTextStorageEditActions, NSTextStorageEditedAttributes, NSTextStorageEditedCharacters, - NSTextStorageEditedOptions, NSTextStorageObserving, - NSTextStorageWillProcessEditingNotification, - }; - pub use super::NSTextTable::{ - NSTextBlock, NSTextBlockAbsoluteValueType, NSTextBlockBaselineAlignment, NSTextBlockBorder, - NSTextBlockBottomAlignment, NSTextBlockDimension, NSTextBlockHeight, NSTextBlockLayer, - NSTextBlockMargin, NSTextBlockMaximumHeight, NSTextBlockMaximumWidth, - NSTextBlockMiddleAlignment, NSTextBlockMinimumHeight, NSTextBlockMinimumWidth, - NSTextBlockPadding, NSTextBlockPercentageValueType, NSTextBlockTopAlignment, - NSTextBlockValueType, NSTextBlockVerticalAlignment, NSTextBlockWidth, NSTextTable, - NSTextTableAutomaticLayoutAlgorithm, NSTextTableBlock, NSTextTableFixedLayoutAlgorithm, - NSTextTableLayoutAlgorithm, - }; - pub use super::NSTextView::{ - NSAllRomanInputSourcesLocaleIdentifier, NSFindPanelAction, NSFindPanelActionNext, - NSFindPanelActionPrevious, NSFindPanelActionReplace, NSFindPanelActionReplaceAll, - NSFindPanelActionReplaceAllInSelection, NSFindPanelActionReplaceAndFind, - NSFindPanelActionSelectAll, NSFindPanelActionSelectAllInSelection, - NSFindPanelActionSetFindString, NSFindPanelActionShowFindPanel, - NSFindPanelCaseInsensitiveSearch, NSFindPanelSearchOptionsPboardType, - NSFindPanelSubstringMatch, NSFindPanelSubstringMatchType, - NSFindPanelSubstringMatchTypeContains, NSFindPanelSubstringMatchTypeEndsWith, - NSFindPanelSubstringMatchTypeFullWord, NSFindPanelSubstringMatchTypeStartsWith, - NSPasteboardTypeFindPanelSearchOptionKey, NSSelectByCharacter, NSSelectByParagraph, - NSSelectByWord, NSSelectionAffinity, NSSelectionAffinityDownstream, - NSSelectionAffinityUpstream, NSSelectionGranularity, NSTextView, NSTextViewDelegate, - NSTextViewDidChangeSelectionNotification, NSTextViewDidChangeTypingAttributesNotification, - NSTextViewDidSwitchToNSLayoutManagerNotification, - NSTextViewWillChangeNotifyingTextViewNotification, - NSTextViewWillSwitchToNSLayoutManagerNotification, NSTouchBarItemIdentifierCharacterPicker, - NSTouchBarItemIdentifierTextAlignment, NSTouchBarItemIdentifierTextColorPicker, - NSTouchBarItemIdentifierTextFormat, NSTouchBarItemIdentifierTextList, - NSTouchBarItemIdentifierTextStyle, - }; - pub use super::NSTextViewportLayoutController::{ - NSTextViewportLayoutController, NSTextViewportLayoutControllerDelegate, - }; - pub use super::NSTintConfiguration::NSTintConfiguration; - pub use super::NSTitlebarAccessoryViewController::NSTitlebarAccessoryViewController; - pub use super::NSTokenField::{NSTokenField, NSTokenFieldDelegate}; - pub use super::NSTokenFieldCell::{ - NSDefaultTokenStyle, NSPlainTextTokenStyle, NSRoundedTokenStyle, NSTokenFieldCell, - NSTokenFieldCellDelegate, NSTokenStyle, NSTokenStyleDefault, NSTokenStyleNone, - NSTokenStylePlainSquared, NSTokenStyleRounded, NSTokenStyleSquared, - }; - pub use super::NSToolbar::{ - NSToolbar, NSToolbarDelegate, NSToolbarDidRemoveItemNotification, NSToolbarDisplayMode, - NSToolbarDisplayModeDefault, NSToolbarDisplayModeIconAndLabel, - NSToolbarDisplayModeIconOnly, NSToolbarDisplayModeLabelOnly, NSToolbarIdentifier, - NSToolbarItemIdentifier, NSToolbarSizeMode, NSToolbarSizeModeDefault, - NSToolbarSizeModeRegular, NSToolbarSizeModeSmall, NSToolbarWillAddItemNotification, - }; - pub use super::NSToolbarItem::{ - NSCloudSharingValidation, NSToolbarCloudSharingItemIdentifier, - NSToolbarCustomizeToolbarItemIdentifier, NSToolbarFlexibleSpaceItemIdentifier, - NSToolbarItem, NSToolbarItemValidation, NSToolbarItemVisibilityPriority, - NSToolbarItemVisibilityPriorityHigh, NSToolbarItemVisibilityPriorityLow, - NSToolbarItemVisibilityPriorityStandard, NSToolbarItemVisibilityPriorityUser, - NSToolbarPrintItemIdentifier, NSToolbarSeparatorItemIdentifier, - NSToolbarShowColorsItemIdentifier, NSToolbarShowFontsItemIdentifier, - NSToolbarSidebarTrackingSeparatorItemIdentifier, NSToolbarSpaceItemIdentifier, - NSToolbarToggleSidebarItemIdentifier, - }; - pub use super::NSToolbarItemGroup::{ - NSToolbarItemGroup, NSToolbarItemGroupControlRepresentation, - NSToolbarItemGroupControlRepresentationAutomatic, - NSToolbarItemGroupControlRepresentationCollapsed, - NSToolbarItemGroupControlRepresentationExpanded, NSToolbarItemGroupSelectionMode, - NSToolbarItemGroupSelectionModeMomentary, NSToolbarItemGroupSelectionModeSelectAny, - NSToolbarItemGroupSelectionModeSelectOne, - }; - pub use super::NSTouch::{ - NSTouch, NSTouchPhase, NSTouchPhaseAny, NSTouchPhaseBegan, NSTouchPhaseCancelled, - NSTouchPhaseEnded, NSTouchPhaseMoved, NSTouchPhaseStationary, NSTouchPhaseTouching, - NSTouchType, NSTouchTypeDirect, NSTouchTypeIndirect, NSTouchTypeMask, - NSTouchTypeMaskDirect, NSTouchTypeMaskIndirect, - }; - pub use super::NSTouchBar::{ - NSTouchBar, NSTouchBarCustomizationIdentifier, NSTouchBarDelegate, NSTouchBarProvider, - }; - pub use super::NSTouchBarItem::{ - NSTouchBarItem, NSTouchBarItemIdentifier, NSTouchBarItemIdentifierFixedSpaceLarge, - NSTouchBarItemIdentifierFixedSpaceSmall, NSTouchBarItemIdentifierFlexibleSpace, - NSTouchBarItemIdentifierOtherItemsProxy, NSTouchBarItemPriority, - NSTouchBarItemPriorityHigh, NSTouchBarItemPriorityLow, NSTouchBarItemPriorityNormal, - }; - pub use super::NSTrackingArea::{ - NSTrackingActiveAlways, NSTrackingActiveInActiveApp, NSTrackingActiveInKeyWindow, - NSTrackingActiveWhenFirstResponder, NSTrackingArea, NSTrackingAreaOptions, - NSTrackingAssumeInside, NSTrackingCursorUpdate, NSTrackingEnabledDuringMouseDrag, - NSTrackingInVisibleRect, NSTrackingMouseEnteredAndExited, NSTrackingMouseMoved, - }; - pub use super::NSTrackingSeparatorToolbarItem::NSTrackingSeparatorToolbarItem; - pub use super::NSTreeController::NSTreeController; - pub use super::NSTreeNode::NSTreeNode; - pub use super::NSTypesetter::{ - NSTypesetter, NSTypesetterContainerBreakAction, NSTypesetterControlCharacterAction, - NSTypesetterHorizontalTabAction, NSTypesetterLineBreakAction, - NSTypesetterParagraphBreakAction, NSTypesetterWhitespaceAction, - NSTypesetterZeroAdvancementAction, - }; - pub use super::NSUserActivity::{NSUserActivityDocumentURLKey, NSUserActivityRestoring}; - pub use super::NSUserDefaultsController::NSUserDefaultsController; - pub use super::NSUserInterfaceCompression::{ - NSUserInterfaceCompression, NSUserInterfaceCompressionOptions, - }; - pub use super::NSUserInterfaceItemIdentification::{ - NSUserInterfaceItemIdentification, NSUserInterfaceItemIdentifier, - }; - pub use super::NSUserInterfaceItemSearching::NSUserInterfaceItemSearching; - pub use super::NSUserInterfaceLayout::{ - NSUserInterfaceLayoutDirection, NSUserInterfaceLayoutDirectionLeftToRight, - NSUserInterfaceLayoutDirectionRightToLeft, NSUserInterfaceLayoutOrientation, - NSUserInterfaceLayoutOrientationHorizontal, NSUserInterfaceLayoutOrientationVertical, - }; - pub use super::NSUserInterfaceValidation::{ - NSUserInterfaceValidations, NSValidatedUserInterfaceItem, - }; - pub use super::NSView::{ - NSAutoresizingMaskOptions, NSBezelBorder, NSBorderType, NSDefinitionOptionKey, - NSDefinitionPresentationType, NSDefinitionPresentationTypeDictionaryApplication, - NSDefinitionPresentationTypeKey, NSDefinitionPresentationTypeOverlay, - NSFullScreenModeAllScreens, NSFullScreenModeApplicationPresentationOptions, - NSFullScreenModeSetting, NSFullScreenModeWindowLevel, NSGrooveBorder, NSLineBorder, - NSNoBorder, NSToolTipTag, NSTrackingRectTag, NSView, NSViewBoundsDidChangeNotification, - NSViewDidUpdateTrackingAreasNotification, NSViewFocusDidChangeNotification, - NSViewFrameDidChangeNotification, NSViewFullScreenModeOptionKey, - NSViewGlobalFrameDidChangeNotification, NSViewHeightSizable, - NSViewLayerContentScaleDelegate, NSViewLayerContentsPlacement, - NSViewLayerContentsPlacementBottom, NSViewLayerContentsPlacementBottomLeft, - NSViewLayerContentsPlacementBottomRight, NSViewLayerContentsPlacementCenter, - NSViewLayerContentsPlacementLeft, NSViewLayerContentsPlacementRight, - NSViewLayerContentsPlacementScaleAxesIndependently, - NSViewLayerContentsPlacementScaleProportionallyToFill, - NSViewLayerContentsPlacementScaleProportionallyToFit, NSViewLayerContentsPlacementTop, - NSViewLayerContentsPlacementTopLeft, NSViewLayerContentsPlacementTopRight, - NSViewLayerContentsRedrawBeforeViewResize, NSViewLayerContentsRedrawCrossfade, - NSViewLayerContentsRedrawDuringViewResize, NSViewLayerContentsRedrawNever, - NSViewLayerContentsRedrawOnSetNeedsDisplay, NSViewLayerContentsRedrawPolicy, - NSViewMaxXMargin, NSViewMaxYMargin, NSViewMinXMargin, NSViewMinYMargin, NSViewNotSizable, - NSViewToolTipOwner, NSViewWidthSizable, - }; - pub use super::NSViewController::{ - NSViewController, NSViewControllerPresentationAnimator, - NSViewControllerTransitionAllowUserInteraction, NSViewControllerTransitionCrossfade, - NSViewControllerTransitionNone, NSViewControllerTransitionOptions, - NSViewControllerTransitionSlideBackward, NSViewControllerTransitionSlideDown, - NSViewControllerTransitionSlideForward, NSViewControllerTransitionSlideLeft, - NSViewControllerTransitionSlideRight, NSViewControllerTransitionSlideUp, - }; - pub use super::NSVisualEffectView::{ - NSVisualEffectBlendingMode, NSVisualEffectBlendingModeBehindWindow, - NSVisualEffectBlendingModeWithinWindow, NSVisualEffectMaterial, - NSVisualEffectMaterialAppearanceBased, NSVisualEffectMaterialContentBackground, - NSVisualEffectMaterialDark, NSVisualEffectMaterialFullScreenUI, - NSVisualEffectMaterialHUDWindow, NSVisualEffectMaterialHeaderView, - NSVisualEffectMaterialLight, NSVisualEffectMaterialMediumLight, NSVisualEffectMaterialMenu, - NSVisualEffectMaterialPopover, NSVisualEffectMaterialSelection, - NSVisualEffectMaterialSheet, NSVisualEffectMaterialSidebar, NSVisualEffectMaterialTitlebar, - NSVisualEffectMaterialToolTip, NSVisualEffectMaterialUltraDark, - NSVisualEffectMaterialUnderPageBackground, NSVisualEffectMaterialUnderWindowBackground, - NSVisualEffectMaterialWindowBackground, NSVisualEffectState, NSVisualEffectStateActive, - NSVisualEffectStateFollowsWindowActiveState, NSVisualEffectStateInactive, - NSVisualEffectView, - }; - pub use super::NSWindow::{ - NSAppKitVersionNumberWithCustomSheetPosition, - NSAppKitVersionNumberWithDeferredWindowDisplaySupport, NSBackingPropertyOldColorSpaceKey, - NSBackingPropertyOldScaleFactorKey, NSBorderlessWindowMask, NSClosableWindowMask, - NSDirectSelection, NSDisplayWindowRunLoopOrdering, NSDocModalWindowMask, - NSFullScreenWindowMask, NSFullSizeContentViewWindowMask, NSHUDWindowMask, - NSMiniaturizableWindowMask, NSModalResponseCancel, NSModalResponseOK, - NSNonactivatingPanelMask, NSResetCursorRectsRunLoopOrdering, NSResizableWindowMask, - NSSelectingNext, NSSelectingPrevious, NSSelectionDirection, NSTexturedBackgroundWindowMask, - NSTitlebarSeparatorStyle, NSTitlebarSeparatorStyleAutomatic, NSTitlebarSeparatorStyleLine, - NSTitlebarSeparatorStyleNone, NSTitlebarSeparatorStyleShadow, NSTitledWindowMask, - NSUnifiedTitleAndToolbarWindowMask, NSUnscaledWindowMask, NSUtilityWindowMask, NSWindow, - NSWindowAnimationBehavior, NSWindowAnimationBehaviorAlertPanel, - NSWindowAnimationBehaviorDefault, NSWindowAnimationBehaviorDocumentWindow, - NSWindowAnimationBehaviorNone, NSWindowAnimationBehaviorUtilityWindow, - NSWindowBackingLocation, NSWindowBackingLocationDefault, NSWindowBackingLocationMainMemory, - NSWindowBackingLocationVideoMemory, NSWindowButton, NSWindowCloseButton, - NSWindowCollectionBehavior, NSWindowCollectionBehaviorCanJoinAllSpaces, - NSWindowCollectionBehaviorDefault, NSWindowCollectionBehaviorFullScreenAllowsTiling, - NSWindowCollectionBehaviorFullScreenAuxiliary, - NSWindowCollectionBehaviorFullScreenDisallowsTiling, - NSWindowCollectionBehaviorFullScreenNone, NSWindowCollectionBehaviorFullScreenPrimary, - NSWindowCollectionBehaviorIgnoresCycle, NSWindowCollectionBehaviorManaged, - NSWindowCollectionBehaviorMoveToActiveSpace, NSWindowCollectionBehaviorParticipatesInCycle, - NSWindowCollectionBehaviorStationary, NSWindowCollectionBehaviorTransient, - NSWindowDelegate, NSWindowDidBecomeKeyNotification, NSWindowDidBecomeMainNotification, - NSWindowDidChangeBackingPropertiesNotification, - NSWindowDidChangeOcclusionStateNotification, NSWindowDidChangeScreenNotification, - NSWindowDidChangeScreenProfileNotification, NSWindowDidDeminiaturizeNotification, - NSWindowDidEndLiveResizeNotification, NSWindowDidEndSheetNotification, - NSWindowDidEnterFullScreenNotification, NSWindowDidEnterVersionBrowserNotification, - NSWindowDidExitFullScreenNotification, NSWindowDidExitVersionBrowserNotification, - NSWindowDidExposeNotification, NSWindowDidMiniaturizeNotification, - NSWindowDidMoveNotification, NSWindowDidResignKeyNotification, - NSWindowDidResignMainNotification, NSWindowDidResizeNotification, - NSWindowDidUpdateNotification, NSWindowDocumentIconButton, NSWindowDocumentVersionsButton, - NSWindowFrameAutosaveName, NSWindowFullScreenButton, NSWindowLevel, - NSWindowMiniaturizeButton, NSWindowNumberListAllApplications, NSWindowNumberListAllSpaces, - NSWindowNumberListOptions, NSWindowOcclusionState, NSWindowOcclusionStateVisible, - NSWindowPersistableFrameDescriptor, NSWindowSharingNone, NSWindowSharingReadOnly, - NSWindowSharingReadWrite, NSWindowSharingType, NSWindowStyleMask, - NSWindowStyleMaskBorderless, NSWindowStyleMaskClosable, NSWindowStyleMaskDocModalWindow, - NSWindowStyleMaskFullScreen, NSWindowStyleMaskFullSizeContentView, - NSWindowStyleMaskHUDWindow, NSWindowStyleMaskMiniaturizable, - NSWindowStyleMaskNonactivatingPanel, NSWindowStyleMaskResizable, - NSWindowStyleMaskTexturedBackground, NSWindowStyleMaskTitled, - NSWindowStyleMaskUnifiedTitleAndToolbar, NSWindowStyleMaskUtilityWindow, - NSWindowTabbingIdentifier, NSWindowTabbingMode, NSWindowTabbingModeAutomatic, - NSWindowTabbingModeDisallowed, NSWindowTabbingModePreferred, NSWindowTitleHidden, - NSWindowTitleVisibility, NSWindowTitleVisible, NSWindowToolbarButton, NSWindowToolbarStyle, - NSWindowToolbarStyleAutomatic, NSWindowToolbarStyleExpanded, - NSWindowToolbarStylePreference, NSWindowToolbarStyleUnified, - NSWindowToolbarStyleUnifiedCompact, NSWindowUserTabbingPreference, - NSWindowUserTabbingPreferenceAlways, NSWindowUserTabbingPreferenceInFullScreen, - NSWindowUserTabbingPreferenceManual, NSWindowWillBeginSheetNotification, - NSWindowWillCloseNotification, NSWindowWillEnterFullScreenNotification, - NSWindowWillEnterVersionBrowserNotification, NSWindowWillExitFullScreenNotification, - NSWindowWillExitVersionBrowserNotification, NSWindowWillMiniaturizeNotification, - NSWindowWillMoveNotification, NSWindowWillStartLiveResizeNotification, NSWindowZoomButton, - }; - pub use super::NSWindowController::NSWindowController; - pub use super::NSWindowRestoration::{ - NSApplicationDidFinishRestoringWindowsNotification, NSWindowRestoration, - }; - pub use super::NSWindowTab::NSWindowTab; - pub use super::NSWindowTabGroup::NSWindowTabGroup; - pub use super::NSWorkspace::{ - NSApplicationFileType, NSDirectoryFileType, NSExclude10_4ElementsIconCreationOption, - NSExcludeQuickDrawElementsIconCreationOption, NSFilesystemFileType, NSPlainFileType, - NSShellCommandFileType, NSWorkspace, NSWorkspaceActiveSpaceDidChangeNotification, - NSWorkspaceApplicationKey, NSWorkspaceAuthorization, NSWorkspaceAuthorizationType, - NSWorkspaceAuthorizationTypeCreateSymbolicLink, NSWorkspaceAuthorizationTypeReplaceFile, - NSWorkspaceAuthorizationTypeSetAttributes, NSWorkspaceCompressOperation, - NSWorkspaceCopyOperation, NSWorkspaceDecompressOperation, NSWorkspaceDecryptOperation, - NSWorkspaceDesktopImageAllowClippingKey, NSWorkspaceDesktopImageFillColorKey, - NSWorkspaceDesktopImageOptionKey, NSWorkspaceDesktopImageScalingKey, - NSWorkspaceDestroyOperation, NSWorkspaceDidActivateApplicationNotification, - NSWorkspaceDidChangeFileLabelsNotification, - NSWorkspaceDidDeactivateApplicationNotification, NSWorkspaceDidHideApplicationNotification, - NSWorkspaceDidLaunchApplicationNotification, NSWorkspaceDidMountNotification, - NSWorkspaceDidPerformFileOperationNotification, NSWorkspaceDidRenameVolumeNotification, - NSWorkspaceDidTerminateApplicationNotification, - NSWorkspaceDidUnhideApplicationNotification, NSWorkspaceDidUnmountNotification, - NSWorkspaceDidWakeNotification, NSWorkspaceDuplicateOperation, NSWorkspaceEncryptOperation, - NSWorkspaceFileOperationName, NSWorkspaceIconCreationOptions, - NSWorkspaceLaunchAllowingClassicStartup, NSWorkspaceLaunchAndHide, - NSWorkspaceLaunchAndHideOthers, NSWorkspaceLaunchAndPrint, NSWorkspaceLaunchAsync, - NSWorkspaceLaunchConfigurationAppleEvent, NSWorkspaceLaunchConfigurationArchitecture, - NSWorkspaceLaunchConfigurationArguments, NSWorkspaceLaunchConfigurationEnvironment, - NSWorkspaceLaunchConfigurationKey, NSWorkspaceLaunchDefault, - NSWorkspaceLaunchInhibitingBackgroundOnly, NSWorkspaceLaunchNewInstance, - NSWorkspaceLaunchOptions, NSWorkspaceLaunchPreferringClassic, - NSWorkspaceLaunchWithErrorPresentation, NSWorkspaceLaunchWithoutActivation, - NSWorkspaceLaunchWithoutAddingToRecents, NSWorkspaceLinkOperation, - NSWorkspaceMoveOperation, NSWorkspaceOpenConfiguration, NSWorkspaceRecycleOperation, - NSWorkspaceScreensDidSleepNotification, NSWorkspaceScreensDidWakeNotification, - NSWorkspaceSessionDidBecomeActiveNotification, - NSWorkspaceSessionDidResignActiveNotification, NSWorkspaceVolumeLocalizedNameKey, - NSWorkspaceVolumeOldLocalizedNameKey, NSWorkspaceVolumeOldURLKey, NSWorkspaceVolumeURLKey, - NSWorkspaceWillLaunchApplicationNotification, NSWorkspaceWillPowerOffNotification, - NSWorkspaceWillSleepNotification, NSWorkspaceWillUnmountNotification, - }; -} +pub use self::__AppKitErrors::{ + NSFontAssetDownloadError, NSFontErrorMaximum, NSFontErrorMinimum, + NSServiceApplicationLaunchFailedError, NSServiceApplicationNotFoundError, + NSServiceErrorMaximum, NSServiceErrorMinimum, NSServiceInvalidPasteboardDataError, + NSServiceMalformedServiceDictionaryError, NSServiceMiscellaneousError, + NSServiceRequestTimedOutError, NSSharingServiceErrorMaximum, NSSharingServiceErrorMinimum, + NSSharingServiceNotConfiguredError, NSTextReadInapplicableDocumentTypeError, + NSTextReadWriteErrorMaximum, NSTextReadWriteErrorMinimum, + NSTextWriteInapplicableDocumentTypeError, NSWorkspaceAuthorizationInvalidError, + NSWorkspaceErrorMaximum, NSWorkspaceErrorMinimum, +}; +pub use self::__NSATSTypesetter::NSATSTypesetter; +pub use self::__NSAccessibility::NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification; +pub use self::__NSAccessibilityConstants::{ + NSAccessibilityActionName, NSAccessibilityActivationPointAttribute, + NSAccessibilityAllowedValuesAttribute, NSAccessibilityAlternateUIVisibleAttribute, + NSAccessibilityAnnotationAttributeKey, NSAccessibilityAnnotationElement, + NSAccessibilityAnnotationLabel, NSAccessibilityAnnotationLocation, + NSAccessibilityAnnotationPosition, NSAccessibilityAnnotationPositionEnd, + NSAccessibilityAnnotationPositionFullRange, NSAccessibilityAnnotationPositionStart, + NSAccessibilityAnnotationTextAttribute, NSAccessibilityAnnouncementKey, + NSAccessibilityAnnouncementRequestedNotification, + NSAccessibilityApplicationActivatedNotification, + NSAccessibilityApplicationDeactivatedNotification, + NSAccessibilityApplicationHiddenNotification, NSAccessibilityApplicationRole, + NSAccessibilityApplicationShownNotification, NSAccessibilityAscendingSortDirectionValue, + NSAccessibilityAttachmentTextAttribute, NSAccessibilityAttributeName, + NSAccessibilityAttributedStringForRangeParameterizedAttribute, + NSAccessibilityAutocorrectedTextAttribute, NSAccessibilityBackgroundColorTextAttribute, + NSAccessibilityBoundsForRangeParameterizedAttribute, NSAccessibilityBrowserRole, + NSAccessibilityBusyIndicatorRole, NSAccessibilityButtonRole, NSAccessibilityCancelAction, + NSAccessibilityCancelButtonAttribute, NSAccessibilityCellForColumnAndRowParameterizedAttribute, + NSAccessibilityCellRole, NSAccessibilityCenterTabStopMarkerTypeValue, + NSAccessibilityCentimetersUnitValue, NSAccessibilityCheckBoxRole, + NSAccessibilityChildrenAttribute, NSAccessibilityClearButtonAttribute, + NSAccessibilityCloseButtonAttribute, NSAccessibilityCloseButtonSubrole, + NSAccessibilityCollectionListSubrole, NSAccessibilityColorWellRole, + NSAccessibilityColumnCountAttribute, NSAccessibilityColumnHeaderUIElementsAttribute, + NSAccessibilityColumnIndexRangeAttribute, NSAccessibilityColumnRole, + NSAccessibilityColumnTitlesAttribute, NSAccessibilityColumnsAttribute, + NSAccessibilityComboBoxRole, NSAccessibilityConfirmAction, + NSAccessibilityContainsProtectedContentAttribute, NSAccessibilityContentListSubrole, + NSAccessibilityContentsAttribute, NSAccessibilityCreatedNotification, + NSAccessibilityCriticalValueAttribute, NSAccessibilityCustomTextAttribute, + NSAccessibilityDecimalTabStopMarkerTypeValue, NSAccessibilityDecrementAction, + NSAccessibilityDecrementArrowSubrole, NSAccessibilityDecrementButtonAttribute, + NSAccessibilityDecrementPageSubrole, NSAccessibilityDefaultButtonAttribute, + NSAccessibilityDefinitionListSubrole, NSAccessibilityDeleteAction, + NSAccessibilityDescendingSortDirectionValue, NSAccessibilityDescriptionAttribute, + NSAccessibilityDescriptionListSubrole, NSAccessibilityDialogSubrole, + NSAccessibilityDisclosedByRowAttribute, NSAccessibilityDisclosedRowsAttribute, + NSAccessibilityDisclosingAttribute, NSAccessibilityDisclosureLevelAttribute, + NSAccessibilityDisclosureTriangleRole, NSAccessibilityDocumentAttribute, + NSAccessibilityDrawerCreatedNotification, NSAccessibilityDrawerRole, + NSAccessibilityEditedAttribute, NSAccessibilityEnabledAttribute, + NSAccessibilityErrorCodeExceptionInfo, NSAccessibilityExpandedAttribute, + NSAccessibilityExtrasMenuBarAttribute, NSAccessibilityFilenameAttribute, + NSAccessibilityFirstLineIndentMarkerTypeValue, NSAccessibilityFloatingWindowSubrole, + NSAccessibilityFocusedAttribute, NSAccessibilityFocusedUIElementAttribute, + NSAccessibilityFocusedUIElementChangedNotification, NSAccessibilityFocusedWindowAttribute, + NSAccessibilityFocusedWindowChangedNotification, NSAccessibilityFontAttributeKey, + NSAccessibilityFontFamilyKey, NSAccessibilityFontNameKey, NSAccessibilityFontSizeKey, + NSAccessibilityFontTextAttribute, NSAccessibilityForegroundColorTextAttribute, + NSAccessibilityFrontmostAttribute, NSAccessibilityFullScreenButtonAttribute, + NSAccessibilityFullScreenButtonSubrole, NSAccessibilityGridRole, NSAccessibilityGroupRole, + NSAccessibilityGrowAreaAttribute, NSAccessibilityGrowAreaRole, NSAccessibilityHandleRole, + NSAccessibilityHandlesAttribute, NSAccessibilityHeadIndentMarkerTypeValue, + NSAccessibilityHeaderAttribute, NSAccessibilityHelpAttribute, + NSAccessibilityHelpTagCreatedNotification, NSAccessibilityHelpTagRole, + NSAccessibilityHiddenAttribute, NSAccessibilityHorizontalOrientationValue, + NSAccessibilityHorizontalScrollBarAttribute, NSAccessibilityHorizontalUnitDescriptionAttribute, + NSAccessibilityHorizontalUnitsAttribute, NSAccessibilityIdentifierAttribute, + NSAccessibilityImageRole, NSAccessibilityInchesUnitValue, NSAccessibilityIncrementAction, + NSAccessibilityIncrementArrowSubrole, NSAccessibilityIncrementButtonAttribute, + NSAccessibilityIncrementPageSubrole, NSAccessibilityIncrementorRole, + NSAccessibilityIndexAttribute, NSAccessibilityInsertionPointLineNumberAttribute, + NSAccessibilityLabelUIElementsAttribute, NSAccessibilityLabelValueAttribute, + NSAccessibilityLanguageTextAttribute, NSAccessibilityLayoutAreaRole, + NSAccessibilityLayoutChangedNotification, NSAccessibilityLayoutItemRole, + NSAccessibilityLayoutPointForScreenPointParameterizedAttribute, + NSAccessibilityLayoutSizeForScreenSizeParameterizedAttribute, + NSAccessibilityLeftTabStopMarkerTypeValue, NSAccessibilityLevelIndicatorRole, + NSAccessibilityLineForIndexParameterizedAttribute, NSAccessibilityLinkRole, + NSAccessibilityLinkTextAttribute, NSAccessibilityLinkedUIElementsAttribute, + NSAccessibilityListItemIndexTextAttribute, NSAccessibilityListItemLevelTextAttribute, + NSAccessibilityListItemPrefixTextAttribute, NSAccessibilityListRole, + NSAccessibilityLoadingToken, NSAccessibilityMainAttribute, NSAccessibilityMainWindowAttribute, + NSAccessibilityMainWindowChangedNotification, NSAccessibilityMarkedMisspelledTextAttribute, + NSAccessibilityMarkerGroupUIElementAttribute, NSAccessibilityMarkerTypeAttribute, + NSAccessibilityMarkerTypeDescriptionAttribute, NSAccessibilityMarkerUIElementsAttribute, + NSAccessibilityMarkerValuesAttribute, NSAccessibilityMatteContentUIElementAttribute, + NSAccessibilityMatteHoleAttribute, NSAccessibilityMatteRole, NSAccessibilityMaxValueAttribute, + NSAccessibilityMenuBarAttribute, NSAccessibilityMenuBarItemRole, NSAccessibilityMenuBarRole, + NSAccessibilityMenuButtonRole, NSAccessibilityMenuItemRole, NSAccessibilityMenuRole, + NSAccessibilityMinValueAttribute, NSAccessibilityMinimizeButtonAttribute, + NSAccessibilityMinimizeButtonSubrole, NSAccessibilityMinimizedAttribute, + NSAccessibilityMisspelledTextAttribute, NSAccessibilityModalAttribute, + NSAccessibilityMovedNotification, NSAccessibilityNextContentsAttribute, + NSAccessibilityNotificationName, NSAccessibilityNotificationUserInfoKey, + NSAccessibilityNumberOfCharactersAttribute, NSAccessibilityOrderedByRowAttribute, + NSAccessibilityOrientation, NSAccessibilityOrientationAttribute, + NSAccessibilityOrientationHorizontal, NSAccessibilityOrientationUnknown, + NSAccessibilityOrientationValue, NSAccessibilityOrientationVertical, + NSAccessibilityOutlineRole, NSAccessibilityOutlineRowSubrole, + NSAccessibilityOverflowButtonAttribute, NSAccessibilityPageRole, + NSAccessibilityParameterizedAttributeName, NSAccessibilityParentAttribute, + NSAccessibilityPicasUnitValue, NSAccessibilityPickAction, + NSAccessibilityPlaceholderValueAttribute, NSAccessibilityPointsUnitValue, + NSAccessibilityPopUpButtonRole, NSAccessibilityPopoverRole, NSAccessibilityPositionAttribute, + NSAccessibilityPressAction, NSAccessibilityPreviousContentsAttribute, + NSAccessibilityPriorityHigh, NSAccessibilityPriorityKey, NSAccessibilityPriorityLevel, + NSAccessibilityPriorityLow, NSAccessibilityPriorityMedium, + NSAccessibilityProgressIndicatorRole, NSAccessibilityProxyAttribute, + NSAccessibilityRTFForRangeParameterizedAttribute, NSAccessibilityRadioButtonRole, + NSAccessibilityRadioGroupRole, NSAccessibilityRaiseAction, + NSAccessibilityRangeForIndexParameterizedAttribute, + NSAccessibilityRangeForLineParameterizedAttribute, + NSAccessibilityRangeForPositionParameterizedAttribute, NSAccessibilityRatingIndicatorSubrole, + NSAccessibilityRelevanceIndicatorRole, NSAccessibilityRequiredAttribute, + NSAccessibilityResizedNotification, NSAccessibilityRightTabStopMarkerTypeValue, + NSAccessibilityRole, NSAccessibilityRoleAttribute, NSAccessibilityRoleDescriptionAttribute, + NSAccessibilityRowCollapsedNotification, NSAccessibilityRowCountAttribute, + NSAccessibilityRowCountChangedNotification, NSAccessibilityRowExpandedNotification, + NSAccessibilityRowHeaderUIElementsAttribute, NSAccessibilityRowIndexRangeAttribute, + NSAccessibilityRowRole, NSAccessibilityRowsAttribute, NSAccessibilityRulerMarkerRole, + NSAccessibilityRulerMarkerType, NSAccessibilityRulerMarkerTypeIndentFirstLine, + NSAccessibilityRulerMarkerTypeIndentHead, NSAccessibilityRulerMarkerTypeIndentTail, + NSAccessibilityRulerMarkerTypeTabStopCenter, NSAccessibilityRulerMarkerTypeTabStopDecimal, + NSAccessibilityRulerMarkerTypeTabStopLeft, NSAccessibilityRulerMarkerTypeTabStopRight, + NSAccessibilityRulerMarkerTypeUnknown, NSAccessibilityRulerMarkerTypeValue, + NSAccessibilityRulerRole, NSAccessibilityRulerUnitValue, + NSAccessibilityScreenPointForLayoutPointParameterizedAttribute, + NSAccessibilityScreenSizeForLayoutSizeParameterizedAttribute, NSAccessibilityScrollAreaRole, + NSAccessibilityScrollBarRole, NSAccessibilitySearchButtonAttribute, + NSAccessibilitySearchFieldSubrole, NSAccessibilitySearchMenuAttribute, + NSAccessibilitySectionListSubrole, NSAccessibilitySecureTextFieldSubrole, + NSAccessibilitySelectedAttribute, NSAccessibilitySelectedCellsAttribute, + NSAccessibilitySelectedCellsChangedNotification, NSAccessibilitySelectedChildrenAttribute, + NSAccessibilitySelectedChildrenChangedNotification, + NSAccessibilitySelectedChildrenMovedNotification, NSAccessibilitySelectedColumnsAttribute, + NSAccessibilitySelectedColumnsChangedNotification, NSAccessibilitySelectedRowsAttribute, + NSAccessibilitySelectedRowsChangedNotification, NSAccessibilitySelectedTextAttribute, + NSAccessibilitySelectedTextChangedNotification, NSAccessibilitySelectedTextRangeAttribute, + NSAccessibilitySelectedTextRangesAttribute, NSAccessibilityServesAsTitleForUIElementsAttribute, + NSAccessibilityShadowTextAttribute, NSAccessibilitySharedCharacterRangeAttribute, + NSAccessibilitySharedFocusElementsAttribute, NSAccessibilitySharedTextUIElementsAttribute, + NSAccessibilitySheetCreatedNotification, NSAccessibilitySheetRole, + NSAccessibilityShowAlternateUIAction, NSAccessibilityShowDefaultUIAction, + NSAccessibilityShowMenuAction, NSAccessibilityShownMenuAttribute, NSAccessibilitySizeAttribute, + NSAccessibilitySliderRole, NSAccessibilitySortButtonRole, NSAccessibilitySortButtonSubrole, + NSAccessibilitySortDirection, NSAccessibilitySortDirectionAscending, + NSAccessibilitySortDirectionAttribute, NSAccessibilitySortDirectionDescending, + NSAccessibilitySortDirectionUnknown, NSAccessibilitySortDirectionValue, + NSAccessibilitySplitGroupRole, NSAccessibilitySplitterRole, NSAccessibilitySplittersAttribute, + NSAccessibilityStandardWindowSubrole, NSAccessibilityStaticTextRole, + NSAccessibilityStrikethroughColorTextAttribute, NSAccessibilityStrikethroughTextAttribute, + NSAccessibilityStringForRangeParameterizedAttribute, + NSAccessibilityStyleRangeForIndexParameterizedAttribute, NSAccessibilitySubrole, + NSAccessibilitySubroleAttribute, NSAccessibilitySuperscriptTextAttribute, + NSAccessibilitySwitchSubrole, NSAccessibilitySystemDialogSubrole, + NSAccessibilitySystemFloatingWindowSubrole, NSAccessibilitySystemWideRole, + NSAccessibilityTabButtonSubrole, NSAccessibilityTabGroupRole, NSAccessibilityTableRole, + NSAccessibilityTableRowSubrole, NSAccessibilityTabsAttribute, + NSAccessibilityTailIndentMarkerTypeValue, NSAccessibilityTextAlignmentAttribute, + NSAccessibilityTextAreaRole, NSAccessibilityTextAttachmentSubrole, + NSAccessibilityTextFieldRole, NSAccessibilityTextLinkSubrole, NSAccessibilityTimelineSubrole, + NSAccessibilityTitleAttribute, NSAccessibilityTitleChangedNotification, + NSAccessibilityTitleUIElementAttribute, NSAccessibilityToggleSubrole, + NSAccessibilityToolbarButtonAttribute, NSAccessibilityToolbarButtonSubrole, + NSAccessibilityToolbarRole, NSAccessibilityTopLevelUIElementAttribute, + NSAccessibilityUIElementDestroyedNotification, NSAccessibilityUIElementsKey, + NSAccessibilityURLAttribute, NSAccessibilityUnderlineColorTextAttribute, + NSAccessibilityUnderlineTextAttribute, NSAccessibilityUnitDescriptionAttribute, + NSAccessibilityUnits, NSAccessibilityUnitsAttribute, NSAccessibilityUnitsCentimeters, + NSAccessibilityUnitsChangedNotification, NSAccessibilityUnitsInches, NSAccessibilityUnitsPicas, + NSAccessibilityUnitsPoints, NSAccessibilityUnitsUnknown, NSAccessibilityUnknownMarkerTypeValue, + NSAccessibilityUnknownOrientationValue, NSAccessibilityUnknownRole, + NSAccessibilityUnknownSortDirectionValue, NSAccessibilityUnknownSubrole, + NSAccessibilityUnknownUnitValue, NSAccessibilityValueAttribute, + NSAccessibilityValueChangedNotification, NSAccessibilityValueDescriptionAttribute, + NSAccessibilityValueIndicatorRole, NSAccessibilityVerticalOrientationValue, + NSAccessibilityVerticalScrollBarAttribute, NSAccessibilityVerticalUnitDescriptionAttribute, + NSAccessibilityVerticalUnitsAttribute, NSAccessibilityVisibleCellsAttribute, + NSAccessibilityVisibleCharacterRangeAttribute, NSAccessibilityVisibleChildrenAttribute, + NSAccessibilityVisibleColumnsAttribute, NSAccessibilityVisibleNameKey, + NSAccessibilityVisibleRowsAttribute, NSAccessibilityWarningValueAttribute, + NSAccessibilityWindowAttribute, NSAccessibilityWindowCreatedNotification, + NSAccessibilityWindowDeminiaturizedNotification, NSAccessibilityWindowMiniaturizedNotification, + NSAccessibilityWindowMovedNotification, NSAccessibilityWindowResizedNotification, + NSAccessibilityWindowRole, NSAccessibilityWindowsAttribute, NSAccessibilityZoomButtonAttribute, + NSAccessibilityZoomButtonSubrole, +}; +pub use self::__NSAccessibilityCustomAction::NSAccessibilityCustomAction; +pub use self::__NSAccessibilityCustomRotor::{ + NSAccessibilityCustomRotor, NSAccessibilityCustomRotorItemResult, + NSAccessibilityCustomRotorItemSearchDelegate, NSAccessibilityCustomRotorSearchDirection, + NSAccessibilityCustomRotorSearchDirectionNext, + NSAccessibilityCustomRotorSearchDirectionPrevious, NSAccessibilityCustomRotorSearchParameters, + NSAccessibilityCustomRotorType, NSAccessibilityCustomRotorTypeAnnotation, + NSAccessibilityCustomRotorTypeAny, NSAccessibilityCustomRotorTypeAudiograph, + NSAccessibilityCustomRotorTypeBoldText, NSAccessibilityCustomRotorTypeCustom, + NSAccessibilityCustomRotorTypeHeading, NSAccessibilityCustomRotorTypeHeadingLevel1, + NSAccessibilityCustomRotorTypeHeadingLevel2, NSAccessibilityCustomRotorTypeHeadingLevel3, + NSAccessibilityCustomRotorTypeHeadingLevel4, NSAccessibilityCustomRotorTypeHeadingLevel5, + NSAccessibilityCustomRotorTypeHeadingLevel6, NSAccessibilityCustomRotorTypeImage, + NSAccessibilityCustomRotorTypeItalicText, NSAccessibilityCustomRotorTypeLandmark, + NSAccessibilityCustomRotorTypeLink, NSAccessibilityCustomRotorTypeList, + NSAccessibilityCustomRotorTypeMisspelledWord, NSAccessibilityCustomRotorTypeTable, + NSAccessibilityCustomRotorTypeTextField, NSAccessibilityCustomRotorTypeUnderlinedText, + NSAccessibilityCustomRotorTypeVisitedLink, +}; +pub use self::__NSAccessibilityElement::NSAccessibilityElement; +pub use self::__NSAccessibilityProtocols::{ + NSAccessibility, NSAccessibilityButton, NSAccessibilityCheckBox, + NSAccessibilityContainsTransientUI, NSAccessibilityElementLoading, NSAccessibilityGroup, + NSAccessibilityImage, NSAccessibilityLayoutArea, NSAccessibilityLayoutItem, + NSAccessibilityList, NSAccessibilityNavigableStaticText, NSAccessibilityOutline, + NSAccessibilityProgressIndicator, NSAccessibilityRadioButton, NSAccessibilityRow, + NSAccessibilitySlider, NSAccessibilityStaticText, NSAccessibilityStepper, + NSAccessibilitySwitch, NSAccessibilityTable, +}; +pub use self::__NSActionCell::NSActionCell; +pub use self::__NSAlert::{ + NSAlert, NSAlertDelegate, NSAlertFirstButtonReturn, NSAlertSecondButtonReturn, NSAlertStyle, + NSAlertStyleCritical, NSAlertStyleInformational, NSAlertStyleWarning, NSAlertThirdButtonReturn, + NSCriticalAlertStyle, NSInformationalAlertStyle, NSWarningAlertStyle, +}; +pub use self::__NSAlignmentFeedbackFilter::{NSAlignmentFeedbackFilter, NSAlignmentFeedbackToken}; +pub use self::__NSAnimation::{ + NSAnimatablePropertyContainer, NSAnimatablePropertyKey, NSAnimation, NSAnimationBlocking, + NSAnimationBlockingMode, NSAnimationCurve, NSAnimationDelegate, NSAnimationEaseIn, + NSAnimationEaseInOut, NSAnimationEaseOut, NSAnimationLinear, NSAnimationNonblocking, + NSAnimationNonblockingThreaded, NSAnimationProgress, NSAnimationProgressMark, + NSAnimationProgressMarkNotification, NSAnimationTriggerOrderIn, NSAnimationTriggerOrderOut, + NSViewAnimation, NSViewAnimationEffectKey, NSViewAnimationEffectName, + NSViewAnimationEndFrameKey, NSViewAnimationFadeInEffect, NSViewAnimationFadeOutEffect, + NSViewAnimationKey, NSViewAnimationStartFrameKey, NSViewAnimationTargetKey, +}; +pub use self::__NSAnimationContext::NSAnimationContext; +pub use self::__NSAppearance::{ + NSAppearance, NSAppearanceCustomization, NSAppearanceName, + NSAppearanceNameAccessibilityHighContrastAqua, + NSAppearanceNameAccessibilityHighContrastDarkAqua, + NSAppearanceNameAccessibilityHighContrastVibrantDark, + NSAppearanceNameAccessibilityHighContrastVibrantLight, NSAppearanceNameAqua, + NSAppearanceNameDarkAqua, NSAppearanceNameLightContent, NSAppearanceNameVibrantDark, + NSAppearanceNameVibrantLight, +}; +pub use self::__NSApplication::{ + NSAboutPanelOptionApplicationIcon, NSAboutPanelOptionApplicationName, + NSAboutPanelOptionApplicationVersion, NSAboutPanelOptionCredits, NSAboutPanelOptionKey, + NSAboutPanelOptionVersion, NSApp, NSAppKitVersion, NSAppKitVersionNumber, + NSAppKitVersionNumber10_0, NSAppKitVersionNumber10_1, NSAppKitVersionNumber10_10, + NSAppKitVersionNumber10_10_2, NSAppKitVersionNumber10_10_3, NSAppKitVersionNumber10_10_4, + NSAppKitVersionNumber10_10_5, NSAppKitVersionNumber10_10_Max, NSAppKitVersionNumber10_11, + NSAppKitVersionNumber10_11_1, NSAppKitVersionNumber10_11_2, NSAppKitVersionNumber10_11_3, + NSAppKitVersionNumber10_12, NSAppKitVersionNumber10_12_1, NSAppKitVersionNumber10_12_2, + NSAppKitVersionNumber10_13, NSAppKitVersionNumber10_13_1, NSAppKitVersionNumber10_13_2, + NSAppKitVersionNumber10_13_4, NSAppKitVersionNumber10_14, NSAppKitVersionNumber10_14_1, + NSAppKitVersionNumber10_14_2, NSAppKitVersionNumber10_14_3, NSAppKitVersionNumber10_14_4, + NSAppKitVersionNumber10_14_5, NSAppKitVersionNumber10_15, NSAppKitVersionNumber10_15_1, + NSAppKitVersionNumber10_15_2, NSAppKitVersionNumber10_15_3, NSAppKitVersionNumber10_15_4, + NSAppKitVersionNumber10_15_5, NSAppKitVersionNumber10_15_6, NSAppKitVersionNumber10_2, + NSAppKitVersionNumber10_2_3, NSAppKitVersionNumber10_3, NSAppKitVersionNumber10_3_2, + NSAppKitVersionNumber10_3_3, NSAppKitVersionNumber10_3_5, NSAppKitVersionNumber10_3_7, + NSAppKitVersionNumber10_3_9, NSAppKitVersionNumber10_4, NSAppKitVersionNumber10_4_1, + NSAppKitVersionNumber10_4_3, NSAppKitVersionNumber10_4_4, NSAppKitVersionNumber10_4_7, + NSAppKitVersionNumber10_5, NSAppKitVersionNumber10_5_2, NSAppKitVersionNumber10_5_3, + NSAppKitVersionNumber10_6, NSAppKitVersionNumber10_7, NSAppKitVersionNumber10_7_2, + NSAppKitVersionNumber10_7_3, NSAppKitVersionNumber10_7_4, NSAppKitVersionNumber10_8, + NSAppKitVersionNumber10_9, NSAppKitVersionNumber11_0, NSAppKitVersionNumber11_1, + NSAppKitVersionNumber11_2, NSAppKitVersionNumber11_3, NSAppKitVersionNumber11_4, NSApplication, + NSApplicationDelegate, NSApplicationDelegateReply, NSApplicationDelegateReplyCancel, + NSApplicationDelegateReplyFailure, NSApplicationDelegateReplySuccess, + NSApplicationDidBecomeActiveNotification, NSApplicationDidChangeOcclusionStateNotification, + NSApplicationDidChangeScreenParametersNotification, + NSApplicationDidFinishLaunchingNotification, NSApplicationDidHideNotification, + NSApplicationDidResignActiveNotification, NSApplicationDidUnhideNotification, + NSApplicationDidUpdateNotification, NSApplicationLaunchIsDefaultLaunchKey, + NSApplicationLaunchRemoteNotificationKey, NSApplicationLaunchUserNotificationKey, + NSApplicationOcclusionState, NSApplicationOcclusionStateVisible, + NSApplicationPresentationAutoHideDock, NSApplicationPresentationAutoHideMenuBar, + NSApplicationPresentationAutoHideToolbar, NSApplicationPresentationDefault, + NSApplicationPresentationDisableAppleMenu, + NSApplicationPresentationDisableCursorLocationAssistance, + NSApplicationPresentationDisableForceQuit, NSApplicationPresentationDisableHideApplication, + NSApplicationPresentationDisableMenuBarTransparency, + NSApplicationPresentationDisableProcessSwitching, + NSApplicationPresentationDisableSessionTermination, NSApplicationPresentationFullScreen, + NSApplicationPresentationHideDock, NSApplicationPresentationHideMenuBar, + NSApplicationPresentationOptions, NSApplicationPrintReply, + NSApplicationProtectedDataDidBecomeAvailableNotification, + NSApplicationProtectedDataWillBecomeUnavailableNotification, NSApplicationTerminateReply, + NSApplicationWillBecomeActiveNotification, NSApplicationWillFinishLaunchingNotification, + NSApplicationWillHideNotification, NSApplicationWillResignActiveNotification, + NSApplicationWillTerminateNotification, NSApplicationWillUnhideNotification, + NSApplicationWillUpdateNotification, NSCriticalRequest, NSEventTrackingRunLoopMode, + NSInformationalRequest, NSModalPanelRunLoopMode, NSModalResponse, NSModalResponseAbort, + NSModalResponseContinue, NSModalResponseStop, NSModalSession, NSPrintingCancelled, + NSPrintingFailure, NSPrintingReplyLater, NSPrintingSuccess, NSRemoteNotificationType, + NSRemoteNotificationTypeAlert, NSRemoteNotificationTypeBadge, NSRemoteNotificationTypeNone, + NSRemoteNotificationTypeSound, NSRequestUserAttentionType, NSRunAbortedResponse, + NSRunContinuesResponse, NSRunStoppedResponse, NSServiceProviderName, NSServicesMenuRequestor, + NSTerminateCancel, NSTerminateLater, NSTerminateNow, NSUpdateWindowsRunLoopOrdering, + NSWindowListOptions, NSWindowListOrderedFrontToBack, +}; +pub use self::__NSArrayController::NSArrayController; +pub use self::__NSAttributedString::{ + NSAppearanceDocumentAttribute, NSAttachmentAttributeName, + NSAttributedStringDocumentAttributeKey, NSAttributedStringDocumentReadingOptionKey, + NSAttributedStringDocumentType, NSAuthorDocumentAttribute, NSBackgroundColorAttributeName, + NSBackgroundColorDocumentAttribute, NSBaseURLDocumentOption, NSBaselineOffsetAttributeName, + NSBottomMarginDocumentAttribute, NSCategoryDocumentAttribute, + NSCharacterEncodingDocumentAttribute, NSCharacterEncodingDocumentOption, + NSCharacterShapeAttributeName, NSCocoaVersionDocumentAttribute, NSCommentDocumentAttribute, + NSCompanyDocumentAttribute, NSConvertedDocumentAttribute, NSCopyrightDocumentAttribute, + NSCreationTimeDocumentAttribute, NSCursorAttributeName, NSDefaultAttributesDocumentAttribute, + NSDefaultAttributesDocumentOption, NSDefaultTabIntervalDocumentAttribute, + NSDocFormatTextDocumentType, NSDocumentTypeDocumentAttribute, NSDocumentTypeDocumentOption, + NSEditorDocumentAttribute, NSExcludedElementsDocumentAttribute, NSExpansionAttributeName, + NSFileTypeDocumentAttribute, NSFileTypeDocumentOption, NSFontAttributeName, + NSForegroundColorAttributeName, NSGlyphInfoAttributeName, NSHTMLTextDocumentType, + NSHyphenationFactorDocumentAttribute, NSKernAttributeName, NSKeywordsDocumentAttribute, + NSLeftMarginDocumentAttribute, NSLigatureAttributeName, NSLinkAttributeName, + NSMacSimpleTextDocumentType, NSManagerDocumentAttribute, NSMarkedClauseSegmentAttributeName, + NSModificationTimeDocumentAttribute, NSNoUnderlineStyle, NSObliquenessAttributeName, + NSOfficeOpenXMLTextDocumentType, NSOpenDocumentTextDocumentType, NSPaperSizeDocumentAttribute, + NSParagraphStyleAttributeName, NSPlainTextDocumentType, NSPrefixSpacesDocumentAttribute, + NSRTFDTextDocumentType, NSRTFTextDocumentType, NSReadOnlyDocumentAttribute, + NSRightMarginDocumentAttribute, NSShadowAttributeName, NSSingleUnderlineStyle, + NSSourceTextScalingDocumentAttribute, NSSourceTextScalingDocumentOption, NSSpellingState, + NSSpellingStateAttributeName, NSSpellingStateGrammarFlag, NSSpellingStateSpellingFlag, + NSStrikethroughColorAttributeName, NSStrikethroughStyleAttributeName, + NSStrokeColorAttributeName, NSStrokeWidthAttributeName, NSSubjectDocumentAttribute, + NSSuperscriptAttributeName, NSTargetTextScalingDocumentOption, NSTextAlternativesAttributeName, + NSTextEffectAttributeName, NSTextEffectLetterpressStyle, NSTextEffectStyle, + NSTextEncodingNameDocumentAttribute, NSTextEncodingNameDocumentOption, NSTextLayoutSectionKey, + NSTextLayoutSectionOrientation, NSTextLayoutSectionRange, NSTextLayoutSectionsAttribute, + NSTextScalingDocumentAttribute, NSTextScalingStandard, NSTextScalingType, NSTextScalingiOS, + NSTextSizeMultiplierDocumentOption, NSTimeoutDocumentOption, NSTitleDocumentAttribute, + NSToolTipAttributeName, NSTopMarginDocumentAttribute, NSTrackingAttributeName, + NSUnderlineByWord, NSUnderlineByWordMask, NSUnderlineColorAttributeName, + NSUnderlinePatternDash, NSUnderlinePatternDashDot, NSUnderlinePatternDashDotDot, + NSUnderlinePatternDot, NSUnderlinePatternSolid, NSUnderlineStrikethroughMask, NSUnderlineStyle, + NSUnderlineStyleAttributeName, NSUnderlineStyleByWord, NSUnderlineStyleDouble, + NSUnderlineStyleNone, NSUnderlineStylePatternDash, NSUnderlineStylePatternDashDot, + NSUnderlineStylePatternDashDotDot, NSUnderlineStylePatternDot, NSUnderlineStylePatternSolid, + NSUnderlineStyleSingle, NSUnderlineStyleThick, NSUsesScreenFontsDocumentAttribute, + NSVerticalGlyphFormAttributeName, NSViewModeDocumentAttribute, NSViewSizeDocumentAttribute, + NSViewZoomDocumentAttribute, NSWebArchiveTextDocumentType, NSWebPreferencesDocumentOption, + NSWebResourceLoadDelegateDocumentOption, NSWordMLTextDocumentType, + NSWritingDirectionAttributeName, NSWritingDirectionEmbedding, NSWritingDirectionFormatType, + NSWritingDirectionOverride, +}; +pub use self::__NSBezierPath::{ + NSBevelLineJoinStyle, NSBezierPath, NSBezierPathElement, NSBezierPathElementClosePath, + NSBezierPathElementCurveTo, NSBezierPathElementLineTo, NSBezierPathElementMoveTo, + NSButtLineCapStyle, NSClosePathBezierPathElement, NSCurveToBezierPathElement, + NSEvenOddWindingRule, NSLineCapStyle, NSLineCapStyleButt, NSLineCapStyleRound, + NSLineCapStyleSquare, NSLineJoinStyle, NSLineJoinStyleBevel, NSLineJoinStyleMiter, + NSLineJoinStyleRound, NSLineToBezierPathElement, NSMiterLineJoinStyle, + NSMoveToBezierPathElement, NSNonZeroWindingRule, NSRoundLineCapStyle, NSRoundLineJoinStyle, + NSSquareLineCapStyle, NSWindingRule, NSWindingRuleEvenOdd, NSWindingRuleNonZero, +}; +pub use self::__NSBitmapImageRep::{ + NS16BitBigEndianBitmapFormat, NS16BitLittleEndianBitmapFormat, NS32BitBigEndianBitmapFormat, + NS32BitLittleEndianBitmapFormat, NSAlphaFirstBitmapFormat, NSAlphaNonpremultipliedBitmapFormat, + NSBMPFileType, NSBitmapFormat, NSBitmapFormatAlphaFirst, NSBitmapFormatAlphaNonpremultiplied, + NSBitmapFormatFloatingPointSamples, NSBitmapFormatSixteenBitBigEndian, + NSBitmapFormatSixteenBitLittleEndian, NSBitmapFormatThirtyTwoBitBigEndian, + NSBitmapFormatThirtyTwoBitLittleEndian, NSBitmapImageFileType, NSBitmapImageFileTypeBMP, + NSBitmapImageFileTypeGIF, NSBitmapImageFileTypeJPEG, NSBitmapImageFileTypeJPEG2000, + NSBitmapImageFileTypePNG, NSBitmapImageFileTypeTIFF, NSBitmapImageRep, + NSBitmapImageRepPropertyKey, NSFloatingPointSamplesBitmapFormat, NSGIFFileType, + NSImageColorSyncProfileData, NSImageCompressionFactor, NSImageCompressionMethod, + NSImageCurrentFrame, NSImageCurrentFrameDuration, NSImageDitherTransparency, NSImageEXIFData, + NSImageFallbackBackgroundColor, NSImageFrameCount, NSImageGamma, NSImageIPTCData, + NSImageInterlaced, NSImageLoopCount, NSImageProgressive, NSImageRGBColorTable, + NSImageRepLoadStatus, NSImageRepLoadStatusCompleted, NSImageRepLoadStatusInvalidData, + NSImageRepLoadStatusReadingHeader, NSImageRepLoadStatusUnexpectedEOF, + NSImageRepLoadStatusUnknownType, NSImageRepLoadStatusWillNeedAllData, NSJPEG2000FileType, + NSJPEGFileType, NSPNGFileType, NSTIFFCompression, NSTIFFCompressionCCITTFAX3, + NSTIFFCompressionCCITTFAX4, NSTIFFCompressionJPEG, NSTIFFCompressionLZW, NSTIFFCompressionNEXT, + NSTIFFCompressionNone, NSTIFFCompressionOldJPEG, NSTIFFCompressionPackBits, NSTIFFFileType, +}; +pub use self::__NSBox::{ + NSAboveBottom, NSAboveTop, NSAtBottom, NSAtTop, NSBelowBottom, NSBelowTop, NSBox, NSBoxCustom, + NSBoxOldStyle, NSBoxPrimary, NSBoxSecondary, NSBoxSeparator, NSBoxType, NSNoTitle, + NSTitlePosition, +}; +pub use self::__NSBrowser::{ + NSAppKitVersionNumberWithColumnResizingBrowser, + NSAppKitVersionNumberWithContinuousScrollingBrowser, NSBrowser, NSBrowserAutoColumnResizing, + NSBrowserColumnConfigurationDidChangeNotification, NSBrowserColumnResizingType, + NSBrowserColumnsAutosaveName, NSBrowserDelegate, NSBrowserDropAbove, NSBrowserDropOn, + NSBrowserDropOperation, NSBrowserNoColumnResizing, NSBrowserUserColumnResizing, +}; +pub use self::__NSBrowserCell::NSBrowserCell; +pub use self::__NSButton::NSButton; +pub use self::__NSButtonCell::{ + NSAcceleratorButton, NSBezelStyle, NSBezelStyleCircular, NSBezelStyleDisclosure, + NSBezelStyleHelpButton, NSBezelStyleInline, NSBezelStyleRecessed, NSBezelStyleRegularSquare, + NSBezelStyleRoundRect, NSBezelStyleRounded, NSBezelStyleRoundedDisclosure, + NSBezelStyleShadowlessSquare, NSBezelStyleSmallSquare, NSBezelStyleTexturedRounded, + NSBezelStyleTexturedSquare, NSButtonCell, NSButtonType, NSButtonTypeAccelerator, + NSButtonTypeMomentaryChange, NSButtonTypeMomentaryLight, NSButtonTypeMomentaryPushIn, + NSButtonTypeMultiLevelAccelerator, NSButtonTypeOnOff, NSButtonTypePushOnPushOff, + NSButtonTypeRadio, NSButtonTypeSwitch, NSButtonTypeToggle, NSCircularBezelStyle, + NSDisclosureBezelStyle, NSGradientConcaveStrong, NSGradientConcaveWeak, NSGradientConvexStrong, + NSGradientConvexWeak, NSGradientNone, NSGradientType, NSHelpButtonBezelStyle, + NSInlineBezelStyle, NSMomentaryChangeButton, NSMomentaryLight, NSMomentaryLightButton, + NSMomentaryPushButton, NSMomentaryPushInButton, NSMultiLevelAcceleratorButton, NSOnOffButton, + NSPushOnPushOffButton, NSRadioButton, NSRecessedBezelStyle, NSRegularSquareBezelStyle, + NSRoundRectBezelStyle, NSRoundedBezelStyle, NSRoundedDisclosureBezelStyle, + NSShadowlessSquareBezelStyle, NSSmallIconButtonBezelStyle, NSSmallSquareBezelStyle, + NSSwitchButton, NSTexturedRoundedBezelStyle, NSTexturedSquareBezelStyle, + NSThickSquareBezelStyle, NSThickerSquareBezelStyle, NSToggleButton, +}; +pub use self::__NSButtonTouchBarItem::NSButtonTouchBarItem; +pub use self::__NSCIImageRep::NSCIImageRep; +pub use self::__NSCachedImageRep::NSCachedImageRep; +pub use self::__NSCandidateListTouchBarItem::{ + NSCandidateListTouchBarItem, NSCandidateListTouchBarItemDelegate, + NSTouchBarItemIdentifierCandidateList, +}; +pub use self::__NSCell::{ + NSAnyType, NSBackgroundStyle, NSBackgroundStyleDark, NSBackgroundStyleEmphasized, + NSBackgroundStyleLight, NSBackgroundStyleLowered, NSBackgroundStyleNormal, + NSBackgroundStyleRaised, NSBlueControlTint, NSCell, NSCellAllowsMixedState, NSCellAttribute, + NSCellChangesContents, NSCellDisabled, NSCellEditable, NSCellHasImageHorizontal, + NSCellHasImageOnLeftOrBottom, NSCellHasOverlappingImage, NSCellHighlighted, + NSCellHitContentArea, NSCellHitEditableTextArea, NSCellHitNone, NSCellHitResult, + NSCellHitTrackableArea, NSCellImagePosition, NSCellIsBordered, NSCellIsInsetButton, + NSCellLightsByBackground, NSCellLightsByContents, NSCellLightsByGray, NSCellState, + NSCellStateValue, NSCellStyleMask, NSCellType, NSChangeBackgroundCell, + NSChangeBackgroundCellMask, NSChangeGrayCell, NSChangeGrayCellMask, NSClearControlTint, + NSContentsCellMask, NSControlSize, NSControlSizeLarge, NSControlSizeMini, NSControlSizeRegular, + NSControlSizeSmall, NSControlStateValue, NSControlStateValueMixed, NSControlStateValueOff, + NSControlStateValueOn, NSControlTint, NSControlTintDidChangeNotification, NSDefaultControlTint, + NSDoubleType, NSFloatType, NSGraphiteControlTint, NSImageAbove, NSImageBelow, NSImageCellType, + NSImageLeading, NSImageLeft, NSImageOnly, NSImageOverlaps, NSImageRight, + NSImageScaleAxesIndependently, NSImageScaleNone, NSImageScaleProportionallyDown, + NSImageScaleProportionallyUpOrDown, NSImageScaling, NSImageTrailing, NSIntType, + NSMiniControlSize, NSMixedState, NSNoCellMask, NSNoImage, NSNullCellType, NSOffState, + NSOnState, NSPositiveDoubleType, NSPositiveFloatType, NSPositiveIntType, NSPushInCell, + NSPushInCellMask, NSRegularControlSize, NSScaleNone, NSScaleProportionally, NSScaleToFit, + NSSmallControlSize, NSTextCellType, +}; +pub use self::__NSClickGestureRecognizer::NSClickGestureRecognizer; +pub use self::__NSClipView::NSClipView; +pub use self::__NSCollectionView::{ + NSCollectionView, NSCollectionViewDataSource, NSCollectionViewDelegate, + NSCollectionViewDropBefore, NSCollectionViewDropOn, NSCollectionViewDropOperation, + NSCollectionViewElement, NSCollectionViewItem, NSCollectionViewItemHighlightAsDropTarget, + NSCollectionViewItemHighlightForDeselection, NSCollectionViewItemHighlightForSelection, + NSCollectionViewItemHighlightNone, NSCollectionViewItemHighlightState, + NSCollectionViewPrefetching, NSCollectionViewScrollPosition, + NSCollectionViewScrollPositionBottom, NSCollectionViewScrollPositionCenteredHorizontally, + NSCollectionViewScrollPositionCenteredVertically, NSCollectionViewScrollPositionLeadingEdge, + NSCollectionViewScrollPositionLeft, NSCollectionViewScrollPositionNearestHorizontalEdge, + NSCollectionViewScrollPositionNearestVerticalEdge, NSCollectionViewScrollPositionNone, + NSCollectionViewScrollPositionRight, NSCollectionViewScrollPositionTop, + NSCollectionViewScrollPositionTrailingEdge, NSCollectionViewSectionHeaderView, + NSCollectionViewSupplementaryElementKind, +}; +pub use self::__NSCollectionViewCompositionalLayout::{ + NSCollectionLayoutAnchor, NSCollectionLayoutBoundarySupplementaryItem, + NSCollectionLayoutContainer, NSCollectionLayoutDecorationItem, NSCollectionLayoutDimension, + NSCollectionLayoutEdgeSpacing, NSCollectionLayoutEnvironment, NSCollectionLayoutGroup, + NSCollectionLayoutGroupCustomItem, NSCollectionLayoutGroupCustomItemProvider, + NSCollectionLayoutItem, NSCollectionLayoutSection, + NSCollectionLayoutSectionOrthogonalScrollingBehavior, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuous, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorNone, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging, + NSCollectionLayoutSectionVisibleItemsInvalidationHandler, NSCollectionLayoutSize, + NSCollectionLayoutSpacing, NSCollectionLayoutSupplementaryItem, NSCollectionLayoutVisibleItem, + NSCollectionViewCompositionalLayout, NSCollectionViewCompositionalLayoutConfiguration, + NSCollectionViewCompositionalLayoutSectionProvider, NSDirectionalEdgeInsets, + NSDirectionalEdgeInsetsZero, NSDirectionalRectEdge, NSDirectionalRectEdgeAll, + NSDirectionalRectEdgeBottom, NSDirectionalRectEdgeLeading, NSDirectionalRectEdgeNone, + NSDirectionalRectEdgeTop, NSDirectionalRectEdgeTrailing, NSRectAlignment, + NSRectAlignmentBottom, NSRectAlignmentBottomLeading, NSRectAlignmentBottomTrailing, + NSRectAlignmentLeading, NSRectAlignmentNone, NSRectAlignmentTop, NSRectAlignmentTopLeading, + NSRectAlignmentTopTrailing, NSRectAlignmentTrailing, +}; +pub use self::__NSCollectionViewFlowLayout::{ + NSCollectionElementKindSectionFooter, NSCollectionElementKindSectionHeader, + NSCollectionViewDelegateFlowLayout, NSCollectionViewFlowLayout, + NSCollectionViewFlowLayoutInvalidationContext, NSCollectionViewScrollDirection, + NSCollectionViewScrollDirectionHorizontal, NSCollectionViewScrollDirectionVertical, +}; +pub use self::__NSCollectionViewGridLayout::NSCollectionViewGridLayout; +pub use self::__NSCollectionViewLayout::{ + NSCollectionElementCategory, NSCollectionElementCategoryDecorationView, + NSCollectionElementCategoryInterItemGap, NSCollectionElementCategoryItem, + NSCollectionElementCategorySupplementaryView, NSCollectionElementKindInterItemGapIndicator, + NSCollectionUpdateAction, NSCollectionUpdateActionDelete, NSCollectionUpdateActionInsert, + NSCollectionUpdateActionMove, NSCollectionUpdateActionNone, NSCollectionUpdateActionReload, + NSCollectionViewDecorationElementKind, NSCollectionViewLayout, + NSCollectionViewLayoutAttributes, NSCollectionViewLayoutInvalidationContext, + NSCollectionViewUpdateItem, +}; +pub use self::__NSCollectionViewTransitionLayout::{ + NSCollectionViewTransitionLayout, NSCollectionViewTransitionLayoutAnimatedKey, +}; +pub use self::__NSColor::{ + NSAppKitVersionNumberWithPatternColorLeakFix, NSColor, NSColorSystemEffect, + NSColorSystemEffectDeepPressed, NSColorSystemEffectDisabled, NSColorSystemEffectNone, + NSColorSystemEffectPressed, NSColorSystemEffectRollover, NSColorType, NSColorTypeCatalog, + NSColorTypeComponentBased, NSColorTypePattern, NSSystemColorsDidChangeNotification, +}; +pub use self::__NSColorList::{ + NSColorList, NSColorListDidChangeNotification, NSColorListName, NSColorName, +}; +pub use self::__NSColorPanel::{ + NSCMYKModeColorPanel, NSColorChanging, NSColorListModeColorPanel, NSColorPanel, + NSColorPanelAllModesMask, NSColorPanelCMYKModeMask, NSColorPanelColorDidChangeNotification, + NSColorPanelColorListModeMask, NSColorPanelCrayonModeMask, NSColorPanelCustomPaletteModeMask, + NSColorPanelGrayModeMask, NSColorPanelHSBModeMask, NSColorPanelMode, NSColorPanelModeCMYK, + NSColorPanelModeColorList, NSColorPanelModeCrayon, NSColorPanelModeCustomPalette, + NSColorPanelModeGray, NSColorPanelModeHSB, NSColorPanelModeNone, NSColorPanelModeRGB, + NSColorPanelModeWheel, NSColorPanelOptions, NSColorPanelRGBModeMask, NSColorPanelWheelModeMask, + NSCrayonModeColorPanel, NSCustomPaletteModeColorPanel, NSGrayModeColorPanel, + NSHSBModeColorPanel, NSNoModeColorPanel, NSRGBModeColorPanel, NSWheelModeColorPanel, +}; +pub use self::__NSColorPicker::NSColorPicker; +pub use self::__NSColorPickerTouchBarItem::NSColorPickerTouchBarItem; +pub use self::__NSColorPicking::{NSColorPickingCustom, NSColorPickingDefault}; +pub use self::__NSColorSampler::NSColorSampler; +pub use self::__NSColorSpace::{ + NSCMYKColorSpaceModel, NSColorSpace, NSColorSpaceModel, NSColorSpaceModelCMYK, + NSColorSpaceModelDeviceN, NSColorSpaceModelGray, NSColorSpaceModelIndexed, + NSColorSpaceModelLAB, NSColorSpaceModelPatterned, NSColorSpaceModelRGB, + NSColorSpaceModelUnknown, NSDeviceNColorSpaceModel, NSGrayColorSpaceModel, + NSIndexedColorSpaceModel, NSLABColorSpaceModel, NSPatternColorSpaceModel, NSRGBColorSpaceModel, + NSUnknownColorSpaceModel, +}; +pub use self::__NSColorWell::NSColorWell; +pub use self::__NSComboBox::{ + NSComboBox, NSComboBoxDataSource, NSComboBoxDelegate, NSComboBoxSelectionDidChangeNotification, + NSComboBoxSelectionIsChangingNotification, NSComboBoxWillDismissNotification, + NSComboBoxWillPopUpNotification, +}; +pub use self::__NSComboBoxCell::{NSComboBoxCell, NSComboBoxCellDataSource}; +pub use self::__NSControl::{ + NSControl, NSControlTextDidBeginEditingNotification, NSControlTextDidChangeNotification, + NSControlTextDidEndEditingNotification, NSControlTextEditingDelegate, +}; +pub use self::__NSController::NSController; +pub use self::__NSCursor::{NSAppKitVersionNumberWithCursorSizeSupport, NSCursor}; +pub use self::__NSCustomImageRep::NSCustomImageRep; +pub use self::__NSCustomTouchBarItem::NSCustomTouchBarItem; +pub use self::__NSDataAsset::{NSDataAsset, NSDataAssetName}; +pub use self::__NSDatePicker::NSDatePicker; +pub use self::__NSDatePickerCell::{ + NSClockAndCalendarDatePickerStyle, NSDatePickerCell, NSDatePickerCellDelegate, + NSDatePickerElementFlagEra, NSDatePickerElementFlagHourMinute, + NSDatePickerElementFlagHourMinuteSecond, NSDatePickerElementFlagTimeZone, + NSDatePickerElementFlagYearMonth, NSDatePickerElementFlagYearMonthDay, + NSDatePickerElementFlags, NSDatePickerMode, NSDatePickerModeRange, NSDatePickerModeSingle, + NSDatePickerStyle, NSDatePickerStyleClockAndCalendar, NSDatePickerStyleTextField, + NSDatePickerStyleTextFieldAndStepper, NSEraDatePickerElementFlag, + NSHourMinuteDatePickerElementFlag, NSHourMinuteSecondDatePickerElementFlag, NSRangeDateMode, + NSSingleDateMode, NSTextFieldAndStepperDatePickerStyle, NSTextFieldDatePickerStyle, + NSTimeZoneDatePickerElementFlag, NSYearMonthDatePickerElementFlag, + NSYearMonthDayDatePickerElementFlag, +}; +pub use self::__NSDictionaryController::{ + NSDictionaryController, NSDictionaryControllerKeyValuePair, +}; +pub use self::__NSDiffableDataSource::{ + NSCollectionViewDiffableDataSource, NSCollectionViewDiffableDataSourceItemProvider, + NSCollectionViewDiffableDataSourceSupplementaryViewProvider, NSDiffableDataSourceSnapshot, +}; +pub use self::__NSDockTile::{ + NSAppKitVersionNumberWithDockTilePlugInSupport, NSDockTile, NSDockTilePlugIn, +}; +pub use self::__NSDocument::{ + NSAutosaveAsOperation, NSAutosaveElsewhereOperation, NSAutosaveInPlaceOperation, + NSAutosaveOperation, NSChangeAutosaved, NSChangeCleared, NSChangeDiscardable, NSChangeDone, + NSChangeReadOtherContents, NSChangeRedone, NSChangeUndone, NSDocument, NSDocumentChangeType, + NSSaveAsOperation, NSSaveOperation, NSSaveOperationType, NSSaveToOperation, +}; +pub use self::__NSDocumentController::NSDocumentController; +pub use self::__NSDragging::{ + NSDragOperation, NSDragOperationAll, NSDragOperationAll_Obsolete, NSDragOperationCopy, + NSDragOperationDelete, NSDragOperationEvery, NSDragOperationGeneric, NSDragOperationLink, + NSDragOperationMove, NSDragOperationNone, NSDragOperationPrivate, NSDraggingContext, + NSDraggingContextOutsideApplication, NSDraggingContextWithinApplication, NSDraggingDestination, + NSDraggingFormation, NSDraggingFormationDefault, NSDraggingFormationList, + NSDraggingFormationNone, NSDraggingFormationPile, NSDraggingFormationStack, NSDraggingInfo, + NSDraggingItemEnumerationClearNonenumeratedImages, NSDraggingItemEnumerationConcurrent, + NSDraggingItemEnumerationOptions, NSDraggingSource, NSSpringLoadingContinuousActivation, + NSSpringLoadingDestination, NSSpringLoadingDisabled, NSSpringLoadingEnabled, + NSSpringLoadingHighlight, NSSpringLoadingHighlightEmphasized, NSSpringLoadingHighlightNone, + NSSpringLoadingHighlightStandard, NSSpringLoadingNoHover, NSSpringLoadingOptions, +}; +pub use self::__NSDraggingItem::{ + NSDraggingImageComponent, NSDraggingImageComponentIconKey, NSDraggingImageComponentKey, + NSDraggingImageComponentLabelKey, NSDraggingItem, +}; +pub use self::__NSDraggingSession::NSDraggingSession; +pub use self::__NSDrawer::{ + NSDrawer, NSDrawerClosedState, NSDrawerClosingState, NSDrawerDelegate, + NSDrawerDidCloseNotification, NSDrawerDidOpenNotification, NSDrawerOpenState, + NSDrawerOpeningState, NSDrawerState, NSDrawerWillCloseNotification, + NSDrawerWillOpenNotification, +}; +pub use self::__NSEPSImageRep::NSEPSImageRep; +pub use self::__NSErrors::{ + NSAbortModalException, NSAbortPrintingException, NSAccessibilityException, + NSAppKitIgnoredException, NSAppKitVirtualMemoryException, NSBadBitmapParametersException, + NSBadComparisonException, NSBadRTFColorTableException, NSBadRTFDirectiveException, + NSBadRTFFontTableException, NSBadRTFStyleSheetException, NSBrowserIllegalDelegateException, + NSColorListIOException, NSColorListNotEditableException, NSDraggingException, + NSFontUnavailableException, NSIllegalSelectorException, NSImageCacheException, + NSNibLoadingException, NSPPDIncludeNotFoundException, NSPPDIncludeStackOverflowException, + NSPPDIncludeStackUnderflowException, NSPPDParseException, NSPasteboardCommunicationException, + NSPrintPackageException, NSPrintingCommunicationException, NSRTFPropertyStackOverflowException, + NSTIFFException, NSTextLineTooLongException, NSTextNoSelectionException, NSTextReadException, + NSTextWriteException, NSTypedStreamVersionException, NSWindowServerCommunicationException, + NSWordTablesReadException, NSWordTablesWriteException, +}; +pub use self::__NSEvent::{ + NSAWTEventType, NSAlphaShiftKeyMask, NSAlternateKeyMask, NSAppKitDefined, NSAppKitDefinedMask, + NSApplicationActivatedEventType, NSApplicationDeactivatedEventType, NSApplicationDefined, + NSApplicationDefinedMask, NSBeginFunctionKey, NSBreakFunctionKey, NSClearDisplayFunctionKey, + NSClearLineFunctionKey, NSCommandKeyMask, NSControlKeyMask, NSCursorPointingDevice, + NSCursorUpdate, NSCursorUpdateMask, NSDeleteCharFunctionKey, NSDeleteFunctionKey, + NSDeleteLineFunctionKey, NSDeviceIndependentModifierFlagsMask, NSDownArrowFunctionKey, + NSEndFunctionKey, NSEraserPointingDevice, NSEvent, NSEventButtonMask, + NSEventButtonMaskPenLowerSide, NSEventButtonMaskPenTip, NSEventButtonMaskPenUpperSide, + NSEventGestureAxis, NSEventGestureAxisHorizontal, NSEventGestureAxisNone, + NSEventGestureAxisVertical, NSEventMask, NSEventMaskAny, NSEventMaskAppKitDefined, + NSEventMaskApplicationDefined, NSEventMaskBeginGesture, NSEventMaskChangeMode, + NSEventMaskCursorUpdate, NSEventMaskDirectTouch, NSEventMaskEndGesture, + NSEventMaskFlagsChanged, NSEventMaskGesture, NSEventMaskKeyDown, NSEventMaskKeyUp, + NSEventMaskLeftMouseDown, NSEventMaskLeftMouseDragged, NSEventMaskLeftMouseUp, + NSEventMaskMagnify, NSEventMaskMouseEntered, NSEventMaskMouseExited, NSEventMaskMouseMoved, + NSEventMaskOtherMouseDown, NSEventMaskOtherMouseDragged, NSEventMaskOtherMouseUp, + NSEventMaskPeriodic, NSEventMaskPressure, NSEventMaskRightMouseDown, + NSEventMaskRightMouseDragged, NSEventMaskRightMouseUp, NSEventMaskRotate, + NSEventMaskScrollWheel, NSEventMaskSmartMagnify, NSEventMaskSwipe, NSEventMaskSystemDefined, + NSEventMaskTabletPoint, NSEventMaskTabletProximity, NSEventModifierFlagCapsLock, + NSEventModifierFlagCommand, NSEventModifierFlagControl, + NSEventModifierFlagDeviceIndependentFlagsMask, NSEventModifierFlagFunction, + NSEventModifierFlagHelp, NSEventModifierFlagNumericPad, NSEventModifierFlagOption, + NSEventModifierFlagShift, NSEventModifierFlags, NSEventPhase, NSEventPhaseBegan, + NSEventPhaseCancelled, NSEventPhaseChanged, NSEventPhaseEnded, NSEventPhaseMayBegin, + NSEventPhaseNone, NSEventPhaseStationary, NSEventSubtype, NSEventSubtypeApplicationActivated, + NSEventSubtypeApplicationDeactivated, NSEventSubtypeMouseEvent, NSEventSubtypePowerOff, + NSEventSubtypeScreenChanged, NSEventSubtypeTabletPoint, NSEventSubtypeTabletProximity, + NSEventSubtypeTouch, NSEventSubtypeWindowExposed, NSEventSubtypeWindowMoved, + NSEventSwipeTrackingClampGestureAmount, NSEventSwipeTrackingLockDirection, + NSEventSwipeTrackingOptions, NSEventType, NSEventTypeAppKitDefined, + NSEventTypeApplicationDefined, NSEventTypeBeginGesture, NSEventTypeChangeMode, + NSEventTypeCursorUpdate, NSEventTypeDirectTouch, NSEventTypeEndGesture, + NSEventTypeFlagsChanged, NSEventTypeGesture, NSEventTypeKeyDown, NSEventTypeKeyUp, + NSEventTypeLeftMouseDown, NSEventTypeLeftMouseDragged, NSEventTypeLeftMouseUp, + NSEventTypeMagnify, NSEventTypeMouseEntered, NSEventTypeMouseExited, NSEventTypeMouseMoved, + NSEventTypeOtherMouseDown, NSEventTypeOtherMouseDragged, NSEventTypeOtherMouseUp, + NSEventTypePeriodic, NSEventTypePressure, NSEventTypeQuickLook, NSEventTypeRightMouseDown, + NSEventTypeRightMouseDragged, NSEventTypeRightMouseUp, NSEventTypeRotate, + NSEventTypeScrollWheel, NSEventTypeSmartMagnify, NSEventTypeSwipe, NSEventTypeSystemDefined, + NSEventTypeTabletPoint, NSEventTypeTabletProximity, NSExecuteFunctionKey, NSF10FunctionKey, + NSF11FunctionKey, NSF12FunctionKey, NSF13FunctionKey, NSF14FunctionKey, NSF15FunctionKey, + NSF16FunctionKey, NSF17FunctionKey, NSF18FunctionKey, NSF19FunctionKey, NSF1FunctionKey, + NSF20FunctionKey, NSF21FunctionKey, NSF22FunctionKey, NSF23FunctionKey, NSF24FunctionKey, + NSF25FunctionKey, NSF26FunctionKey, NSF27FunctionKey, NSF28FunctionKey, NSF29FunctionKey, + NSF2FunctionKey, NSF30FunctionKey, NSF31FunctionKey, NSF32FunctionKey, NSF33FunctionKey, + NSF34FunctionKey, NSF35FunctionKey, NSF3FunctionKey, NSF4FunctionKey, NSF5FunctionKey, + NSF6FunctionKey, NSF7FunctionKey, NSF8FunctionKey, NSF9FunctionKey, NSFindFunctionKey, + NSFlagsChanged, NSFlagsChangedMask, NSFunctionKeyMask, NSHelpFunctionKey, NSHelpKeyMask, + NSHomeFunctionKey, NSInsertCharFunctionKey, NSInsertFunctionKey, NSInsertLineFunctionKey, + NSKeyDown, NSKeyDownMask, NSKeyUp, NSKeyUpMask, NSLeftArrowFunctionKey, NSLeftMouseDown, + NSLeftMouseDownMask, NSLeftMouseDragged, NSLeftMouseDraggedMask, NSLeftMouseUp, + NSLeftMouseUpMask, NSMenuFunctionKey, NSModeSwitchFunctionKey, NSMouseEntered, + NSMouseEnteredMask, NSMouseEventSubtype, NSMouseExited, NSMouseExitedMask, NSMouseMoved, + NSMouseMovedMask, NSNextFunctionKey, NSNumericPadKeyMask, NSOtherMouseDown, + NSOtherMouseDownMask, NSOtherMouseDragged, NSOtherMouseDraggedMask, NSOtherMouseUp, + NSOtherMouseUpMask, NSPageDownFunctionKey, NSPageUpFunctionKey, NSPauseFunctionKey, + NSPenLowerSideMask, NSPenPointingDevice, NSPenTipMask, NSPenUpperSideMask, NSPeriodic, + NSPeriodicMask, NSPointingDeviceType, NSPointingDeviceTypeCursor, NSPointingDeviceTypeEraser, + NSPointingDeviceTypePen, NSPointingDeviceTypeUnknown, NSPowerOffEventType, NSPressureBehavior, + NSPressureBehaviorPrimaryAccelerator, NSPressureBehaviorPrimaryClick, + NSPressureBehaviorPrimaryDeepClick, NSPressureBehaviorPrimaryDeepDrag, + NSPressureBehaviorPrimaryDefault, NSPressureBehaviorPrimaryGeneric, NSPressureBehaviorUnknown, + NSPrevFunctionKey, NSPrintFunctionKey, NSPrintScreenFunctionKey, NSRedoFunctionKey, + NSResetFunctionKey, NSRightArrowFunctionKey, NSRightMouseDown, NSRightMouseDownMask, + NSRightMouseDragged, NSRightMouseDraggedMask, NSRightMouseUp, NSRightMouseUpMask, + NSScreenChangedEventType, NSScrollLockFunctionKey, NSScrollWheel, NSScrollWheelMask, + NSSelectFunctionKey, NSShiftKeyMask, NSStopFunctionKey, NSSysReqFunctionKey, NSSystemDefined, + NSSystemDefinedMask, NSSystemFunctionKey, NSTabletPoint, NSTabletPointEventSubtype, + NSTabletPointMask, NSTabletProximity, NSTabletProximityEventSubtype, NSTabletProximityMask, + NSTouchEventSubtype, NSUndoFunctionKey, NSUnknownPointingDevice, NSUpArrowFunctionKey, + NSUserFunctionKey, NSWindowExposedEventType, NSWindowMovedEventType, +}; +pub use self::__NSFilePromiseProvider::{NSFilePromiseProvider, NSFilePromiseProviderDelegate}; +pub use self::__NSFilePromiseReceiver::NSFilePromiseReceiver; +pub use self::__NSFont::{ + NSAntialiasThresholdChangedNotification, NSControlGlyph, NSFont, + NSFontAntialiasedIntegerAdvancementsRenderingMode, NSFontAntialiasedRenderingMode, + NSFontDefaultRenderingMode, NSFontIdentityMatrix, NSFontIntegerAdvancementsRenderingMode, + NSFontRenderingMode, NSFontSetChangedNotification, NSGlyph, NSMultibyteGlyphPacking, + NSNativeShortGlyphPacking, NSNullGlyph, +}; +pub use self::__NSFontAssetRequest::{ + NSFontAssetRequest, NSFontAssetRequestOptionUsesStandardUI, NSFontAssetRequestOptions, +}; +pub use self::__NSFontCollection::{ + NSFontCollection, NSFontCollectionActionKey, NSFontCollectionActionTypeKey, + NSFontCollectionAllFonts, NSFontCollectionDidChangeNotification, + NSFontCollectionDisallowAutoActivationOption, NSFontCollectionFavorites, + NSFontCollectionIncludeDisabledFontsOption, NSFontCollectionMatchingOptionKey, + NSFontCollectionName, NSFontCollectionNameKey, NSFontCollectionOldNameKey, + NSFontCollectionRecentlyUsed, NSFontCollectionRemoveDuplicatesOption, NSFontCollectionUser, + NSFontCollectionUserInfoKey, NSFontCollectionVisibility, NSFontCollectionVisibilityComputer, + NSFontCollectionVisibilityKey, NSFontCollectionVisibilityProcess, + NSFontCollectionVisibilityUser, NSFontCollectionWasHidden, NSFontCollectionWasRenamed, + NSFontCollectionWasShown, NSMutableFontCollection, +}; +pub use self::__NSFontDescriptor::{ + NSFontBoldTrait, NSFontCascadeListAttribute, NSFontCharacterSetAttribute, + NSFontClarendonSerifsClass, NSFontColorAttribute, NSFontCondensedTrait, NSFontDescriptor, + NSFontDescriptorAttributeName, NSFontDescriptorClassClarendonSerifs, + NSFontDescriptorClassFreeformSerifs, NSFontDescriptorClassMask, + NSFontDescriptorClassModernSerifs, NSFontDescriptorClassOldStyleSerifs, + NSFontDescriptorClassOrnamentals, NSFontDescriptorClassSansSerif, NSFontDescriptorClassScripts, + NSFontDescriptorClassSlabSerifs, NSFontDescriptorClassSymbolic, + NSFontDescriptorClassTransitionalSerifs, NSFontDescriptorClassUnknown, + NSFontDescriptorFeatureKey, NSFontDescriptorSymbolicTraits, NSFontDescriptorSystemDesign, + NSFontDescriptorSystemDesignDefault, NSFontDescriptorSystemDesignMonospaced, + NSFontDescriptorSystemDesignRounded, NSFontDescriptorSystemDesignSerif, + NSFontDescriptorTraitBold, NSFontDescriptorTraitCondensed, NSFontDescriptorTraitEmphasized, + NSFontDescriptorTraitExpanded, NSFontDescriptorTraitItalic, NSFontDescriptorTraitKey, + NSFontDescriptorTraitLooseLeading, NSFontDescriptorTraitMonoSpace, + NSFontDescriptorTraitTightLeading, NSFontDescriptorTraitUIOptimized, + NSFontDescriptorTraitVertical, NSFontDescriptorVariationKey, NSFontExpandedTrait, + NSFontFaceAttribute, NSFontFamilyAttribute, NSFontFamilyClass, NSFontFamilyClassMask, + NSFontFeatureSelectorIdentifierKey, NSFontFeatureSettingsAttribute, + NSFontFeatureTypeIdentifierKey, NSFontFixedAdvanceAttribute, NSFontFreeformSerifsClass, + NSFontItalicTrait, NSFontMatrixAttribute, NSFontModernSerifsClass, NSFontMonoSpaceTrait, + NSFontNameAttribute, NSFontOldStyleSerifsClass, NSFontOrnamentalsClass, NSFontSansSerifClass, + NSFontScriptsClass, NSFontSizeAttribute, NSFontSlabSerifsClass, NSFontSlantTrait, + NSFontSymbolicClass, NSFontSymbolicTrait, NSFontSymbolicTraits, NSFontTextStyle, + NSFontTextStyleBody, NSFontTextStyleCallout, NSFontTextStyleCaption1, NSFontTextStyleCaption2, + NSFontTextStyleFootnote, NSFontTextStyleHeadline, NSFontTextStyleLargeTitle, + NSFontTextStyleOptionKey, NSFontTextStyleSubheadline, NSFontTextStyleTitle1, + NSFontTextStyleTitle2, NSFontTextStyleTitle3, NSFontTraitsAttribute, + NSFontTransitionalSerifsClass, NSFontUIOptimizedTrait, NSFontUnknownClass, + NSFontVariationAttribute, NSFontVariationAxisDefaultValueKey, NSFontVariationAxisIdentifierKey, + NSFontVariationAxisMaximumValueKey, NSFontVariationAxisMinimumValueKey, + NSFontVariationAxisNameKey, NSFontVerticalTrait, NSFontVisibleNameAttribute, NSFontWeight, + NSFontWeightBlack, NSFontWeightBold, NSFontWeightHeavy, NSFontWeightLight, NSFontWeightMedium, + NSFontWeightRegular, NSFontWeightSemibold, NSFontWeightThin, NSFontWeightTrait, + NSFontWeightUltraLight, NSFontWidthTrait, +}; +pub use self::__NSFontManager::{ + NSAddTraitFontAction, NSBoldFontMask, NSCompressedFontMask, NSCondensedFontMask, + NSExpandedFontMask, NSFixedPitchFontMask, NSFontAction, NSFontCollectionApplicationOnlyMask, + NSFontCollectionOptions, NSFontManager, NSFontTraitMask, NSHeavierFontAction, NSItalicFontMask, + NSLighterFontAction, NSNarrowFontMask, NSNoFontChangeAction, NSNonStandardCharacterSetFontMask, + NSPosterFontMask, NSRemoveTraitFontAction, NSSizeDownFontAction, NSSizeUpFontAction, + NSSmallCapsFontMask, NSUnboldFontMask, NSUnitalicFontMask, NSViaPanelFontAction, +}; +pub use self::__NSFontPanel::{ + NSFPCurrentField, NSFPPreviewButton, NSFPPreviewField, NSFPRevertButton, NSFPSetButton, + NSFPSizeField, NSFPSizeTitle, NSFontChanging, NSFontPanel, NSFontPanelAllEffectsModeMask, + NSFontPanelAllModesMask, NSFontPanelCollectionModeMask, NSFontPanelDocumentColorEffectModeMask, + NSFontPanelFaceModeMask, NSFontPanelModeMask, NSFontPanelModeMaskAllEffects, + NSFontPanelModeMaskCollection, NSFontPanelModeMaskDocumentColorEffect, NSFontPanelModeMaskFace, + NSFontPanelModeMaskShadowEffect, NSFontPanelModeMaskSize, + NSFontPanelModeMaskStrikethroughEffect, NSFontPanelModeMaskTextColorEffect, + NSFontPanelModeMaskUnderlineEffect, NSFontPanelModesMaskAllModes, + NSFontPanelModesMaskStandardModes, NSFontPanelShadowEffectModeMask, NSFontPanelSizeModeMask, + NSFontPanelStandardModesMask, NSFontPanelStrikethroughEffectModeMask, + NSFontPanelTextColorEffectModeMask, NSFontPanelUnderlineEffectModeMask, +}; +pub use self::__NSForm::NSForm; +pub use self::__NSFormCell::NSFormCell; +pub use self::__NSGestureRecognizer::{ + NSGestureRecognizer, NSGestureRecognizerDelegate, NSGestureRecognizerState, + NSGestureRecognizerStateBegan, NSGestureRecognizerStateCancelled, + NSGestureRecognizerStateChanged, NSGestureRecognizerStateEnded, NSGestureRecognizerStateFailed, + NSGestureRecognizerStatePossible, NSGestureRecognizerStateRecognized, +}; +pub use self::__NSGlyphGenerator::{ + NSGlyphGenerator, NSGlyphStorage, NSShowControlGlyphs, NSShowInvisibleGlyphs, NSWantsBidiLevels, +}; +pub use self::__NSGlyphInfo::{ + NSAdobeCNS1CharacterCollection, NSAdobeGB1CharacterCollection, + NSAdobeJapan1CharacterCollection, NSAdobeJapan2CharacterCollection, + NSAdobeKorea1CharacterCollection, NSCharacterCollection, NSGlyphInfo, + NSIdentityMappingCharacterCollection, +}; +pub use self::__NSGradient::{ + NSGradient, NSGradientDrawingOptions, NSGradientDrawsAfterEndingLocation, + NSGradientDrawsBeforeStartingLocation, +}; +pub use self::__NSGraphics::{ + NSAnimationEffect, NSAnimationEffectDisappearingItemDefault, NSAnimationEffectPoof, + NSBackingStoreBuffered, NSBackingStoreNonretained, NSBackingStoreRetained, NSBackingStoreType, + NSBlack, NSCalibratedBlackColorSpace, NSCalibratedRGBColorSpace, NSCalibratedWhiteColorSpace, + NSColorRenderingIntent, NSColorRenderingIntentAbsoluteColorimetric, + NSColorRenderingIntentDefault, NSColorRenderingIntentPerceptual, + NSColorRenderingIntentRelativeColorimetric, NSColorRenderingIntentSaturation, NSColorSpaceName, + NSCompositeClear, NSCompositeColor, NSCompositeColorBurn, NSCompositeColorDodge, + NSCompositeCopy, NSCompositeDarken, NSCompositeDestinationAtop, NSCompositeDestinationIn, + NSCompositeDestinationOut, NSCompositeDestinationOver, NSCompositeDifference, + NSCompositeExclusion, NSCompositeHardLight, NSCompositeHighlight, NSCompositeHue, + NSCompositeLighten, NSCompositeLuminosity, NSCompositeMultiply, NSCompositeOverlay, + NSCompositePlusDarker, NSCompositePlusLighter, NSCompositeSaturation, NSCompositeScreen, + NSCompositeSoftLight, NSCompositeSourceAtop, NSCompositeSourceIn, NSCompositeSourceOut, + NSCompositeSourceOver, NSCompositeXOR, NSCompositingOperation, NSCompositingOperationClear, + NSCompositingOperationColor, NSCompositingOperationColorBurn, NSCompositingOperationColorDodge, + NSCompositingOperationCopy, NSCompositingOperationDarken, + NSCompositingOperationDestinationAtop, NSCompositingOperationDestinationIn, + NSCompositingOperationDestinationOut, NSCompositingOperationDestinationOver, + NSCompositingOperationDifference, NSCompositingOperationExclusion, + NSCompositingOperationHardLight, NSCompositingOperationHighlight, NSCompositingOperationHue, + NSCompositingOperationLighten, NSCompositingOperationLuminosity, + NSCompositingOperationMultiply, NSCompositingOperationOverlay, + NSCompositingOperationPlusDarker, NSCompositingOperationPlusLighter, + NSCompositingOperationSaturation, NSCompositingOperationScreen, + NSCompositingOperationSoftLight, NSCompositingOperationSourceAtop, + NSCompositingOperationSourceIn, NSCompositingOperationSourceOut, + NSCompositingOperationSourceOver, NSCompositingOperationXOR, NSCustomColorSpace, NSDarkGray, + NSDeviceBitsPerSample, NSDeviceBlackColorSpace, NSDeviceCMYKColorSpace, NSDeviceColorSpaceName, + NSDeviceDescriptionKey, NSDeviceIsPrinter, NSDeviceIsScreen, NSDeviceRGBColorSpace, + NSDeviceResolution, NSDeviceSize, NSDeviceWhiteColorSpace, NSDisplayGamut, NSDisplayGamutP3, + NSDisplayGamutSRGB, NSFocusRingAbove, NSFocusRingBelow, NSFocusRingOnly, NSFocusRingPlacement, + NSFocusRingType, NSFocusRingTypeDefault, NSFocusRingTypeExterior, NSFocusRingTypeNone, + NSLightGray, NSNamedColorSpace, NSPatternColorSpace, NSWhite, NSWindowAbove, NSWindowBelow, + NSWindowDepth, NSWindowDepthOnehundredtwentyeightBitRGB, NSWindowDepthSixtyfourBitRGB, + NSWindowDepthTwentyfourBitRGB, NSWindowOrderingMode, NSWindowOut, +}; +pub use self::__NSGraphicsContext::{ + NSGraphicsContext, NSGraphicsContextAttributeKey, NSGraphicsContextDestinationAttributeName, + NSGraphicsContextPDFFormat, NSGraphicsContextPSFormat, + NSGraphicsContextRepresentationFormatAttributeName, NSGraphicsContextRepresentationFormatName, + NSImageInterpolation, NSImageInterpolationDefault, NSImageInterpolationHigh, + NSImageInterpolationLow, NSImageInterpolationMedium, NSImageInterpolationNone, +}; +pub use self::__NSGridView::{ + NSGridCell, NSGridCellPlacement, NSGridCellPlacementBottom, NSGridCellPlacementCenter, + NSGridCellPlacementFill, NSGridCellPlacementInherited, NSGridCellPlacementLeading, + NSGridCellPlacementNone, NSGridCellPlacementTop, NSGridCellPlacementTrailing, NSGridColumn, + NSGridRow, NSGridRowAlignment, NSGridRowAlignmentFirstBaseline, NSGridRowAlignmentInherited, + NSGridRowAlignmentLastBaseline, NSGridRowAlignmentNone, NSGridView, NSGridViewSizeForContent, +}; +pub use self::__NSGroupTouchBarItem::NSGroupTouchBarItem; +pub use self::__NSHapticFeedback::{ + NSHapticFeedbackManager, NSHapticFeedbackPattern, NSHapticFeedbackPatternAlignment, + NSHapticFeedbackPatternGeneric, NSHapticFeedbackPatternLevelChange, + NSHapticFeedbackPerformanceTime, NSHapticFeedbackPerformanceTimeDefault, + NSHapticFeedbackPerformanceTimeDrawCompleted, NSHapticFeedbackPerformanceTimeNow, + NSHapticFeedbackPerformer, +}; +pub use self::__NSHelpManager::{ + NSContextHelpModeDidActivateNotification, NSContextHelpModeDidDeactivateNotification, + NSHelpAnchorName, NSHelpBookName, NSHelpManager, NSHelpManagerContextHelpKey, +}; +pub use self::__NSImage::{ + NSImage, NSImageCacheAlways, NSImageCacheBySize, NSImageCacheDefault, NSImageCacheMode, + NSImageCacheNever, NSImageDelegate, NSImageHintCTM, NSImageHintInterpolation, + NSImageHintUserInterfaceLayoutDirection, NSImageLoadStatus, NSImageLoadStatusCancelled, + NSImageLoadStatusCompleted, NSImageLoadStatusInvalidData, NSImageLoadStatusReadError, + NSImageLoadStatusUnexpectedEOF, NSImageName, NSImageNameActionTemplate, NSImageNameAddTemplate, + NSImageNameAdvanced, NSImageNameApplicationIcon, NSImageNameBluetoothTemplate, + NSImageNameBonjour, NSImageNameBookmarksTemplate, NSImageNameCaution, NSImageNameColorPanel, + NSImageNameColumnViewTemplate, NSImageNameComputer, NSImageNameDotMac, + NSImageNameEnterFullScreenTemplate, NSImageNameEveryone, NSImageNameExitFullScreenTemplate, + NSImageNameFlowViewTemplate, NSImageNameFolder, NSImageNameFolderBurnable, + NSImageNameFolderSmart, NSImageNameFollowLinkFreestandingTemplate, NSImageNameFontPanel, + NSImageNameGoBackTemplate, NSImageNameGoForwardTemplate, NSImageNameGoLeftTemplate, + NSImageNameGoRightTemplate, NSImageNameHomeTemplate, NSImageNameIChatTheaterTemplate, + NSImageNameIconViewTemplate, NSImageNameInfo, NSImageNameInvalidDataFreestandingTemplate, + NSImageNameLeftFacingTriangleTemplate, NSImageNameListViewTemplate, + NSImageNameLockLockedTemplate, NSImageNameLockUnlockedTemplate, + NSImageNameMenuMixedStateTemplate, NSImageNameMenuOnStateTemplate, NSImageNameMobileMe, + NSImageNameMultipleDocuments, NSImageNameNetwork, NSImageNamePathTemplate, + NSImageNamePreferencesGeneral, NSImageNameQuickLookTemplate, + NSImageNameRefreshFreestandingTemplate, NSImageNameRefreshTemplate, NSImageNameRemoveTemplate, + NSImageNameRevealFreestandingTemplate, NSImageNameRightFacingTriangleTemplate, + NSImageNameShareTemplate, NSImageNameSlideshowTemplate, NSImageNameSmartBadgeTemplate, + NSImageNameStatusAvailable, NSImageNameStatusNone, NSImageNameStatusPartiallyAvailable, + NSImageNameStatusUnavailable, NSImageNameStopProgressFreestandingTemplate, + NSImageNameStopProgressTemplate, NSImageNameTouchBarAddDetailTemplate, + NSImageNameTouchBarAddTemplate, NSImageNameTouchBarAlarmTemplate, + NSImageNameTouchBarAudioInputMuteTemplate, NSImageNameTouchBarAudioInputTemplate, + NSImageNameTouchBarAudioOutputMuteTemplate, NSImageNameTouchBarAudioOutputVolumeHighTemplate, + NSImageNameTouchBarAudioOutputVolumeLowTemplate, + NSImageNameTouchBarAudioOutputVolumeMediumTemplate, + NSImageNameTouchBarAudioOutputVolumeOffTemplate, NSImageNameTouchBarBookmarksTemplate, + NSImageNameTouchBarColorPickerFill, NSImageNameTouchBarColorPickerFont, + NSImageNameTouchBarColorPickerStroke, NSImageNameTouchBarCommunicationAudioTemplate, + NSImageNameTouchBarCommunicationVideoTemplate, NSImageNameTouchBarComposeTemplate, + NSImageNameTouchBarDeleteTemplate, NSImageNameTouchBarDownloadTemplate, + NSImageNameTouchBarEnterFullScreenTemplate, NSImageNameTouchBarExitFullScreenTemplate, + NSImageNameTouchBarFastForwardTemplate, NSImageNameTouchBarFolderCopyToTemplate, + NSImageNameTouchBarFolderMoveToTemplate, NSImageNameTouchBarFolderTemplate, + NSImageNameTouchBarGetInfoTemplate, NSImageNameTouchBarGoBackTemplate, + NSImageNameTouchBarGoDownTemplate, NSImageNameTouchBarGoForwardTemplate, + NSImageNameTouchBarGoUpTemplate, NSImageNameTouchBarHistoryTemplate, + NSImageNameTouchBarIconViewTemplate, NSImageNameTouchBarListViewTemplate, + NSImageNameTouchBarMailTemplate, NSImageNameTouchBarNewFolderTemplate, + NSImageNameTouchBarNewMessageTemplate, NSImageNameTouchBarOpenInBrowserTemplate, + NSImageNameTouchBarPauseTemplate, NSImageNameTouchBarPlayPauseTemplate, + NSImageNameTouchBarPlayTemplate, NSImageNameTouchBarPlayheadTemplate, + NSImageNameTouchBarQuickLookTemplate, NSImageNameTouchBarRecordStartTemplate, + NSImageNameTouchBarRecordStopTemplate, NSImageNameTouchBarRefreshTemplate, + NSImageNameTouchBarRemoveTemplate, NSImageNameTouchBarRewindTemplate, + NSImageNameTouchBarRotateLeftTemplate, NSImageNameTouchBarRotateRightTemplate, + NSImageNameTouchBarSearchTemplate, NSImageNameTouchBarShareTemplate, + NSImageNameTouchBarSidebarTemplate, NSImageNameTouchBarSkipAhead15SecondsTemplate, + NSImageNameTouchBarSkipAhead30SecondsTemplate, NSImageNameTouchBarSkipAheadTemplate, + NSImageNameTouchBarSkipBack15SecondsTemplate, NSImageNameTouchBarSkipBack30SecondsTemplate, + NSImageNameTouchBarSkipBackTemplate, NSImageNameTouchBarSkipToEndTemplate, + NSImageNameTouchBarSkipToStartTemplate, NSImageNameTouchBarSlideshowTemplate, + NSImageNameTouchBarTagIconTemplate, NSImageNameTouchBarTextBoldTemplate, + NSImageNameTouchBarTextBoxTemplate, NSImageNameTouchBarTextCenterAlignTemplate, + NSImageNameTouchBarTextItalicTemplate, NSImageNameTouchBarTextJustifiedAlignTemplate, + NSImageNameTouchBarTextLeftAlignTemplate, NSImageNameTouchBarTextListTemplate, + NSImageNameTouchBarTextRightAlignTemplate, NSImageNameTouchBarTextStrikethroughTemplate, + NSImageNameTouchBarTextUnderlineTemplate, NSImageNameTouchBarUserAddTemplate, + NSImageNameTouchBarUserGroupTemplate, NSImageNameTouchBarUserTemplate, + NSImageNameTouchBarVolumeDownTemplate, NSImageNameTouchBarVolumeUpTemplate, + NSImageNameTrashEmpty, NSImageNameTrashFull, NSImageNameUser, NSImageNameUserAccounts, + NSImageNameUserGroup, NSImageNameUserGuest, NSImageResizingMode, NSImageResizingModeStretch, + NSImageResizingModeTile, NSImageSymbolConfiguration, NSImageSymbolScale, + NSImageSymbolScaleLarge, NSImageSymbolScaleMedium, NSImageSymbolScaleSmall, +}; +pub use self::__NSImageCell::{ + NSImageAlignBottom, NSImageAlignBottomLeft, NSImageAlignBottomRight, NSImageAlignCenter, + NSImageAlignLeft, NSImageAlignRight, NSImageAlignTop, NSImageAlignTopLeft, + NSImageAlignTopRight, NSImageAlignment, NSImageCell, NSImageFrameButton, NSImageFrameGrayBezel, + NSImageFrameGroove, NSImageFrameNone, NSImageFramePhoto, NSImageFrameStyle, +}; +pub use self::__NSImageRep::{ + NSImageHintKey, NSImageLayoutDirection, NSImageLayoutDirectionLeftToRight, + NSImageLayoutDirectionRightToLeft, NSImageLayoutDirectionUnspecified, NSImageRep, + NSImageRepMatchesDevice, NSImageRepRegistryDidChangeNotification, +}; +pub use self::__NSImageView::NSImageView; +pub use self::__NSInputManager::{NSInputManager, NSTextInput}; +pub use self::__NSInputServer::{NSInputServer, NSInputServerMouseTracker, NSInputServiceProvider}; +pub use self::__NSInterfaceStyle::{ + NSInterfaceStyle, NSInterfaceStyleDefault, NSMacintoshInterfaceStyle, NSNextStepInterfaceStyle, + NSNoInterfaceStyle, NSWindows95InterfaceStyle, +}; +pub use self::__NSItemProvider::{ + NSTypeIdentifierAddressText, NSTypeIdentifierDateText, NSTypeIdentifierPhoneNumberText, + NSTypeIdentifierTransitInformationText, +}; +pub use self::__NSKeyValueBinding::{ + NSAlignmentBinding, NSAllowsEditingMultipleValuesSelectionBindingOption, + NSAllowsNullArgumentBindingOption, NSAlternateImageBinding, NSAlternateTitleBinding, + NSAlwaysPresentsApplicationModalAlertsBindingOption, NSAnimateBinding, NSAnimationDelayBinding, + NSArgumentBinding, NSAttributedStringBinding, NSBindingInfoKey, NSBindingName, NSBindingOption, + NSBindingSelectionMarker, NSConditionallySetsEditableBindingOption, + NSConditionallySetsEnabledBindingOption, NSConditionallySetsHiddenBindingOption, + NSContentArrayBinding, NSContentArrayForMultipleSelectionBinding, NSContentBinding, + NSContentDictionaryBinding, NSContentHeightBinding, NSContentObjectBinding, + NSContentObjectsBinding, NSContentPlacementTagBindingOption, NSContentSetBinding, + NSContentValuesBinding, NSContentWidthBinding, NSContinuouslyUpdatesValueBindingOption, + NSCreatesSortDescriptorBindingOption, NSCriticalValueBinding, NSDataBinding, + NSDeletesObjectsOnRemoveBindingsOption, NSDisplayNameBindingOption, + NSDisplayPatternBindingOption, NSDisplayPatternTitleBinding, NSDisplayPatternValueBinding, + NSDocumentEditedBinding, NSDoubleClickArgumentBinding, NSDoubleClickTargetBinding, + NSEditableBinding, NSEditor, NSEditorRegistration, NSEnabledBinding, NSExcludedKeysBinding, + NSFilterPredicateBinding, NSFontBinding, NSFontBoldBinding, NSFontFamilyNameBinding, + NSFontItalicBinding, NSFontNameBinding, NSFontSizeBinding, + NSHandlesContentAsCompoundValueBindingOption, NSHeaderTitleBinding, NSHiddenBinding, + NSImageBinding, NSIncludedKeysBinding, NSInitialKeyBinding, NSInitialValueBinding, + NSInsertsNullPlaceholderBindingOption, NSInvokesSeparatelyWithArrayObjectsBindingOption, + NSIsIndeterminateBinding, NSLabelBinding, NSLocalizedKeyDictionaryBinding, + NSManagedObjectContextBinding, NSMaxValueBinding, NSMaxWidthBinding, NSMaximumRecentsBinding, + NSMinValueBinding, NSMinWidthBinding, NSMixedStateImageBinding, NSMultipleValuesMarker, + NSMultipleValuesPlaceholderBindingOption, NSNoSelectionMarker, + NSNoSelectionPlaceholderBindingOption, NSNotApplicableMarker, + NSNotApplicablePlaceholderBindingOption, NSNullPlaceholderBindingOption, NSObservedKeyPathKey, + NSObservedObjectKey, NSOffStateImageBinding, NSOnStateImageBinding, NSOptionsKey, + NSPositioningRectBinding, NSPredicateBinding, NSPredicateFormatBindingOption, + NSRaisesForNotApplicableKeysBindingOption, NSRecentSearchesBinding, + NSRepresentedFilenameBinding, NSRowHeightBinding, NSSelectedIdentifierBinding, + NSSelectedIndexBinding, NSSelectedLabelBinding, NSSelectedObjectBinding, + NSSelectedObjectsBinding, NSSelectedTagBinding, NSSelectedValueBinding, + NSSelectedValuesBinding, NSSelectionIndexPathsBinding, NSSelectionIndexesBinding, + NSSelectorNameBindingOption, NSSelectsAllWhenSettingContentBindingOption, + NSSortDescriptorsBinding, NSTargetBinding, NSTextColorBinding, NSTitleBinding, + NSToolTipBinding, NSTransparentBinding, NSValidatesImmediatelyBindingOption, NSValueBinding, + NSValuePathBinding, NSValueTransformerBindingOption, NSValueTransformerNameBindingOption, + NSValueURLBinding, NSVisibleBinding, NSWarningValueBinding, NSWidthBinding, +}; +pub use self::__NSLayoutAnchor::{ + NSLayoutAnchor, NSLayoutDimension, NSLayoutXAxisAnchor, NSLayoutYAxisAnchor, +}; +pub use self::__NSLayoutConstraint::{ + NSLayoutAttribute, NSLayoutAttributeBaseline, NSLayoutAttributeBottom, + NSLayoutAttributeCenterX, NSLayoutAttributeCenterY, NSLayoutAttributeFirstBaseline, + NSLayoutAttributeHeight, NSLayoutAttributeLastBaseline, NSLayoutAttributeLeading, + NSLayoutAttributeLeft, NSLayoutAttributeNotAnAttribute, NSLayoutAttributeRight, + NSLayoutAttributeTop, NSLayoutAttributeTrailing, NSLayoutAttributeWidth, NSLayoutConstraint, + NSLayoutConstraintOrientation, NSLayoutConstraintOrientationHorizontal, + NSLayoutConstraintOrientationVertical, NSLayoutFormatAlignAllBaseline, + NSLayoutFormatAlignAllBottom, NSLayoutFormatAlignAllCenterX, NSLayoutFormatAlignAllCenterY, + NSLayoutFormatAlignAllFirstBaseline, NSLayoutFormatAlignAllLastBaseline, + NSLayoutFormatAlignAllLeading, NSLayoutFormatAlignAllLeft, NSLayoutFormatAlignAllRight, + NSLayoutFormatAlignAllTop, NSLayoutFormatAlignAllTrailing, NSLayoutFormatAlignmentMask, + NSLayoutFormatDirectionLeadingToTrailing, NSLayoutFormatDirectionLeftToRight, + NSLayoutFormatDirectionMask, NSLayoutFormatDirectionRightToLeft, NSLayoutFormatOptions, + NSLayoutPriority, NSLayoutPriorityDefaultHigh, NSLayoutPriorityDefaultLow, + NSLayoutPriorityDragThatCanResizeWindow, NSLayoutPriorityDragThatCannotResizeWindow, + NSLayoutPriorityFittingSizeCompression, NSLayoutPriorityRequired, + NSLayoutPriorityWindowSizeStayPut, NSLayoutRelation, NSLayoutRelationEqual, + NSLayoutRelationGreaterThanOrEqual, NSLayoutRelationLessThanOrEqual, NSViewNoInstrinsicMetric, + NSViewNoIntrinsicMetric, +}; +pub use self::__NSLayoutGuide::NSLayoutGuide; +pub use self::__NSLayoutManager::{ + NSControlCharacterAction, NSControlCharacterActionContainerBreak, + NSControlCharacterActionHorizontalTab, NSControlCharacterActionLineBreak, + NSControlCharacterActionParagraphBreak, NSControlCharacterActionWhitespace, + NSControlCharacterActionZeroAdvancement, NSGlyphAttributeBidiLevel, NSGlyphAttributeElastic, + NSGlyphAttributeInscribe, NSGlyphAttributeSoft, NSGlyphInscribeAbove, NSGlyphInscribeBase, + NSGlyphInscribeBelow, NSGlyphInscribeOverBelow, NSGlyphInscribeOverstrike, NSGlyphInscription, + NSGlyphProperty, NSGlyphPropertyControlCharacter, NSGlyphPropertyElastic, + NSGlyphPropertyNonBaseCharacter, NSGlyphPropertyNull, NSLayoutManager, NSLayoutManagerDelegate, + NSTextLayoutOrientation, NSTextLayoutOrientationHorizontal, NSTextLayoutOrientationProvider, + NSTextLayoutOrientationVertical, NSTypesetterBehavior, NSTypesetterBehavior_10_2, + NSTypesetterBehavior_10_2_WithCompatibility, NSTypesetterBehavior_10_3, + NSTypesetterBehavior_10_4, NSTypesetterLatestBehavior, NSTypesetterOriginalBehavior, +}; +pub use self::__NSLevelIndicator::{ + NSLevelIndicator, NSLevelIndicatorPlaceholderVisibility, + NSLevelIndicatorPlaceholderVisibilityAlways, NSLevelIndicatorPlaceholderVisibilityAutomatic, + NSLevelIndicatorPlaceholderVisibilityWhileEditing, +}; +pub use self::__NSLevelIndicatorCell::{ + NSContinuousCapacityLevelIndicatorStyle, NSDiscreteCapacityLevelIndicatorStyle, + NSLevelIndicatorCell, NSLevelIndicatorStyle, NSLevelIndicatorStyleContinuousCapacity, + NSLevelIndicatorStyleDiscreteCapacity, NSLevelIndicatorStyleRating, + NSLevelIndicatorStyleRelevancy, NSRatingLevelIndicatorStyle, NSRelevancyLevelIndicatorStyle, +}; +pub use self::__NSMagnificationGestureRecognizer::NSMagnificationGestureRecognizer; +pub use self::__NSMatrix::{ + NSHighlightModeMatrix, NSListModeMatrix, NSMatrix, NSMatrixDelegate, NSMatrixMode, + NSRadioModeMatrix, NSTrackModeMatrix, +}; +pub use self::__NSMediaLibraryBrowserController::{ + NSMediaLibrary, NSMediaLibraryAudio, NSMediaLibraryBrowserController, NSMediaLibraryImage, + NSMediaLibraryMovie, +}; +pub use self::__NSMenu::{ + NSMenu, NSMenuDelegate, NSMenuDidAddItemNotification, NSMenuDidBeginTrackingNotification, + NSMenuDidChangeItemNotification, NSMenuDidEndTrackingNotification, + NSMenuDidRemoveItemNotification, NSMenuDidSendActionNotification, NSMenuItemValidation, + NSMenuProperties, NSMenuPropertyItemAccessibilityDescription, + NSMenuPropertyItemAttributedTitle, NSMenuPropertyItemEnabled, NSMenuPropertyItemImage, + NSMenuPropertyItemKeyEquivalent, NSMenuPropertyItemTitle, NSMenuWillSendActionNotification, +}; +pub use self::__NSMenuItem::{NSMenuItem, NSMenuItemImportFromDeviceIdentifier}; +pub use self::__NSMenuItemCell::NSMenuItemCell; +pub use self::__NSMenuToolbarItem::NSMenuToolbarItem; +pub use self::__NSMovie::NSMovie; +pub use self::__NSNib::{NSNib, NSNibName, NSNibOwner, NSNibTopLevelObjects}; +pub use self::__NSObjectController::NSObjectController; +pub use self::__NSOpenGL::{ + NSOpenGLCPCurrentRendererID, NSOpenGLCPGPUFragmentProcessing, NSOpenGLCPGPUVertexProcessing, + NSOpenGLCPHasDrawable, NSOpenGLCPMPSwapsInFlight, NSOpenGLCPRasterizationEnable, + NSOpenGLCPReclaimResources, NSOpenGLCPStateValidation, NSOpenGLCPSurfaceBackingSize, + NSOpenGLCPSurfaceOpacity, NSOpenGLCPSurfaceOrder, NSOpenGLCPSurfaceSurfaceVolatile, + NSOpenGLCPSwapInterval, NSOpenGLCPSwapRectangle, NSOpenGLCPSwapRectangleEnable, + NSOpenGLContext, NSOpenGLContextParameter, NSOpenGLContextParameterCurrentRendererID, + NSOpenGLContextParameterGPUFragmentProcessing, NSOpenGLContextParameterGPUVertexProcessing, + NSOpenGLContextParameterHasDrawable, NSOpenGLContextParameterMPSwapsInFlight, + NSOpenGLContextParameterRasterizationEnable, NSOpenGLContextParameterReclaimResources, + NSOpenGLContextParameterStateValidation, NSOpenGLContextParameterSurfaceBackingSize, + NSOpenGLContextParameterSurfaceOpacity, NSOpenGLContextParameterSurfaceOrder, + NSOpenGLContextParameterSurfaceSurfaceVolatile, NSOpenGLContextParameterSwapInterval, + NSOpenGLContextParameterSwapRectangle, NSOpenGLContextParameterSwapRectangleEnable, + NSOpenGLGOClearFormatCache, NSOpenGLGOFormatCacheSize, NSOpenGLGOResetLibrary, + NSOpenGLGORetainRenderers, NSOpenGLGOUseBuildCache, NSOpenGLGlobalOption, + NSOpenGLPFAAccelerated, NSOpenGLPFAAcceleratedCompute, NSOpenGLPFAAccumSize, + NSOpenGLPFAAllRenderers, NSOpenGLPFAAllowOfflineRenderers, NSOpenGLPFAAlphaSize, + NSOpenGLPFAAuxBuffers, NSOpenGLPFAAuxDepthStencil, NSOpenGLPFABackingStore, + NSOpenGLPFAClosestPolicy, NSOpenGLPFAColorFloat, NSOpenGLPFAColorSize, NSOpenGLPFACompliant, + NSOpenGLPFADepthSize, NSOpenGLPFADoubleBuffer, NSOpenGLPFAFullScreen, NSOpenGLPFAMPSafe, + NSOpenGLPFAMaximumPolicy, NSOpenGLPFAMinimumPolicy, NSOpenGLPFAMultiScreen, + NSOpenGLPFAMultisample, NSOpenGLPFANoRecovery, NSOpenGLPFAOffScreen, NSOpenGLPFAOpenGLProfile, + NSOpenGLPFAPixelBuffer, NSOpenGLPFARemotePixelBuffer, NSOpenGLPFARendererID, NSOpenGLPFARobust, + NSOpenGLPFASampleAlpha, NSOpenGLPFASampleBuffers, NSOpenGLPFASamples, NSOpenGLPFAScreenMask, + NSOpenGLPFASingleRenderer, NSOpenGLPFAStencilSize, NSOpenGLPFAStereo, NSOpenGLPFASupersample, + NSOpenGLPFATripleBuffer, NSOpenGLPFAVirtualScreenCount, NSOpenGLPFAWindow, NSOpenGLPixelBuffer, + NSOpenGLPixelFormat, NSOpenGLPixelFormatAttribute, NSOpenGLProfileVersion3_2Core, + NSOpenGLProfileVersion4_1Core, NSOpenGLProfileVersionLegacy, +}; +pub use self::__NSOpenGLLayer::NSOpenGLLayer; +pub use self::__NSOpenGLView::NSOpenGLView; +pub use self::__NSOpenPanel::NSOpenPanel; +pub use self::__NSOutlineView::{ + NSOutlineView, NSOutlineViewColumnDidMoveNotification, + NSOutlineViewColumnDidResizeNotification, NSOutlineViewDataSource, NSOutlineViewDelegate, + NSOutlineViewDisclosureButtonKey, NSOutlineViewDropOnItemIndex, + NSOutlineViewItemDidCollapseNotification, NSOutlineViewItemDidExpandNotification, + NSOutlineViewItemWillCollapseNotification, NSOutlineViewItemWillExpandNotification, + NSOutlineViewSelectionDidChangeNotification, NSOutlineViewSelectionIsChangingNotification, + NSOutlineViewShowHideButtonKey, +}; +pub use self::__NSPDFImageRep::NSPDFImageRep; +pub use self::__NSPDFInfo::NSPDFInfo; +pub use self::__NSPDFPanel::{ + NSPDFPanel, NSPDFPanelOptions, NSPDFPanelRequestsParentDirectory, NSPDFPanelShowsOrientation, + NSPDFPanelShowsPaperSize, +}; +pub use self::__NSPICTImageRep::NSPICTImageRep; +pub use self::__NSPageController::{ + NSPageController, NSPageControllerDelegate, NSPageControllerObjectIdentifier, + NSPageControllerTransitionStyle, NSPageControllerTransitionStyleHorizontalStrip, + NSPageControllerTransitionStyleStackBook, NSPageControllerTransitionStyleStackHistory, +}; +pub use self::__NSPageLayout::NSPageLayout; +pub use self::__NSPanGestureRecognizer::NSPanGestureRecognizer; +pub use self::__NSPanel::{ + NSAlertAlternateReturn, NSAlertDefaultReturn, NSAlertErrorReturn, NSAlertOtherReturn, + NSCancelButton, NSOKButton, NSPanel, +}; +pub use self::__NSParagraphStyle::{ + NSCenterTabStopType, NSDecimalTabStopType, NSLeftTabStopType, NSLineBreakByCharWrapping, + NSLineBreakByClipping, NSLineBreakByTruncatingHead, NSLineBreakByTruncatingMiddle, + NSLineBreakByTruncatingTail, NSLineBreakByWordWrapping, NSLineBreakMode, NSLineBreakStrategy, + NSLineBreakStrategyHangulWordPriority, NSLineBreakStrategyNone, NSLineBreakStrategyPushOut, + NSLineBreakStrategyStandard, NSMutableParagraphStyle, NSParagraphStyle, NSRightTabStopType, + NSTabColumnTerminatorsAttributeName, NSTextTab, NSTextTabOptionKey, NSTextTabType, +}; +pub use self::__NSPasteboard::{ + NSColorPboardType, NSDragPboard, NSFileContentsPboardType, NSFilenamesPboardType, + NSFilesPromisePboardType, NSFindPboard, NSFontPboard, NSFontPboardType, NSGeneralPboard, + NSHTMLPboardType, NSInkTextPboardType, NSMultipleTextSelectionPboardType, NSPDFPboardType, + NSPICTPboardType, NSPasteboard, NSPasteboardContentsCurrentHostOnly, + NSPasteboardContentsOptions, NSPasteboardName, NSPasteboardNameDrag, NSPasteboardNameFind, + NSPasteboardNameFont, NSPasteboardNameGeneral, NSPasteboardNameRuler, NSPasteboardReading, + NSPasteboardReadingAsData, NSPasteboardReadingAsKeyedArchive, + NSPasteboardReadingAsPropertyList, NSPasteboardReadingAsString, NSPasteboardReadingOptionKey, + NSPasteboardReadingOptions, NSPasteboardType, NSPasteboardTypeColor, NSPasteboardTypeFileURL, + NSPasteboardTypeFindPanelSearchOptions, NSPasteboardTypeFont, NSPasteboardTypeHTML, + NSPasteboardTypeMultipleTextSelection, NSPasteboardTypeOwner, NSPasteboardTypePDF, + NSPasteboardTypePNG, NSPasteboardTypeRTF, NSPasteboardTypeRTFD, NSPasteboardTypeRuler, + NSPasteboardTypeSound, NSPasteboardTypeString, NSPasteboardTypeTIFF, + NSPasteboardTypeTabularText, NSPasteboardTypeTextFinderOptions, NSPasteboardTypeURL, + NSPasteboardURLReadingContentsConformToTypesKey, NSPasteboardURLReadingFileURLsOnlyKey, + NSPasteboardWriting, NSPasteboardWritingOptions, NSPasteboardWritingPromised, + NSPostScriptPboardType, NSRTFDPboardType, NSRTFPboardType, NSRulerPboard, NSRulerPboardType, + NSStringPboardType, NSTIFFPboardType, NSTabularTextPboardType, NSURLPboardType, + NSVCardPboardType, +}; +pub use self::__NSPasteboardItem::{NSPasteboardItem, NSPasteboardItemDataProvider}; +pub use self::__NSPathCell::{ + NSPathCell, NSPathCellDelegate, NSPathStyle, NSPathStyleNavigationBar, NSPathStylePopUp, + NSPathStyleStandard, +}; +pub use self::__NSPathComponentCell::NSPathComponentCell; +pub use self::__NSPathControl::{NSPathControl, NSPathControlDelegate}; +pub use self::__NSPathControlItem::NSPathControlItem; +pub use self::__NSPersistentDocument::NSPersistentDocument; +pub use self::__NSPickerTouchBarItem::{ + NSPickerTouchBarItem, NSPickerTouchBarItemControlRepresentation, + NSPickerTouchBarItemControlRepresentationAutomatic, + NSPickerTouchBarItemControlRepresentationCollapsed, + NSPickerTouchBarItemControlRepresentationExpanded, NSPickerTouchBarItemSelectionMode, + NSPickerTouchBarItemSelectionModeMomentary, NSPickerTouchBarItemSelectionModeSelectAny, + NSPickerTouchBarItemSelectionModeSelectOne, +}; +pub use self::__NSPopUpButton::{NSPopUpButton, NSPopUpButtonWillPopUpNotification}; +pub use self::__NSPopUpButtonCell::{ + NSPopUpArrowAtBottom, NSPopUpArrowAtCenter, NSPopUpArrowPosition, NSPopUpButtonCell, + NSPopUpButtonCellWillPopUpNotification, NSPopUpNoArrow, +}; +pub use self::__NSPopover::{ + NSPopover, NSPopoverAppearance, NSPopoverAppearanceHUD, NSPopoverAppearanceMinimal, + NSPopoverBehavior, NSPopoverBehaviorApplicationDefined, NSPopoverBehaviorSemitransient, + NSPopoverBehaviorTransient, NSPopoverCloseReasonDetachToWindow, NSPopoverCloseReasonKey, + NSPopoverCloseReasonStandard, NSPopoverCloseReasonValue, NSPopoverDelegate, + NSPopoverDidCloseNotification, NSPopoverDidShowNotification, NSPopoverWillCloseNotification, + NSPopoverWillShowNotification, +}; +pub use self::__NSPopoverTouchBarItem::NSPopoverTouchBarItem; +pub use self::__NSPredicateEditor::NSPredicateEditor; +pub use self::__NSPredicateEditorRowTemplate::NSPredicateEditorRowTemplate; +pub use self::__NSPressGestureRecognizer::NSPressGestureRecognizer; +pub use self::__NSPressureConfiguration::NSPressureConfiguration; +pub use self::__NSPrintInfo::{ + NSAutoPagination, NSClipPagination, NSFitPagination, NSLandscapeOrientation, + NSPaperOrientation, NSPaperOrientationLandscape, NSPaperOrientationPortrait, + NSPortraitOrientation, NSPrintAllPages, NSPrintBottomMargin, NSPrintCancelJob, NSPrintCopies, + NSPrintDetailedErrorReporting, NSPrintFaxNumber, NSPrintFirstPage, NSPrintFormName, + NSPrintHeaderAndFooter, NSPrintHorizontalPagination, NSPrintHorizontallyCentered, NSPrintInfo, + NSPrintInfoAttributeKey, NSPrintInfoSettingKey, NSPrintJobDisposition, + NSPrintJobDispositionValue, NSPrintJobFeatures, NSPrintJobSavingFileNameExtensionHidden, + NSPrintJobSavingURL, NSPrintLastPage, NSPrintLeftMargin, NSPrintManualFeed, NSPrintMustCollate, + NSPrintOrientation, NSPrintPagesAcross, NSPrintPagesDown, NSPrintPagesPerSheet, + NSPrintPaperFeed, NSPrintPaperName, NSPrintPaperSize, NSPrintPreviewJob, NSPrintPrinter, + NSPrintPrinterName, NSPrintReversePageOrder, NSPrintRightMargin, NSPrintSaveJob, + NSPrintSavePath, NSPrintScalingFactor, NSPrintSelectionOnly, NSPrintSpoolJob, NSPrintTime, + NSPrintTopMargin, NSPrintVerticalPagination, NSPrintVerticallyCentered, NSPrintingOrientation, + NSPrintingPaginationMode, NSPrintingPaginationModeAutomatic, NSPrintingPaginationModeClip, + NSPrintingPaginationModeFit, +}; +pub use self::__NSPrintOperation::{ + NSAscendingPageOrder, NSDescendingPageOrder, NSPrintOperation, NSPrintOperationExistsException, + NSPrintRenderingQuality, NSPrintRenderingQualityBest, NSPrintRenderingQualityResponsive, + NSPrintingPageOrder, NSSpecialPageOrder, NSUnknownPageOrder, +}; +pub use self::__NSPrintPanel::{ + NSPrintAllPresetsJobStyleHint, NSPrintNoPresetsJobStyleHint, NSPrintPanel, + NSPrintPanelAccessorizing, NSPrintPanelAccessorySummaryItemDescriptionKey, + NSPrintPanelAccessorySummaryItemNameKey, NSPrintPanelAccessorySummaryKey, + NSPrintPanelJobStyleHint, NSPrintPanelOptions, NSPrintPanelShowsCopies, + NSPrintPanelShowsOrientation, NSPrintPanelShowsPageRange, NSPrintPanelShowsPageSetupAccessory, + NSPrintPanelShowsPaperSize, NSPrintPanelShowsPreview, NSPrintPanelShowsPrintSelection, + NSPrintPanelShowsScaling, NSPrintPhotoJobStyleHint, +}; +pub use self::__NSPrinter::{ + NSPrinter, NSPrinterPaperName, NSPrinterTableError, NSPrinterTableNotFound, NSPrinterTableOK, + NSPrinterTableStatus, NSPrinterTypeName, +}; +pub use self::__NSProgressIndicator::{ + NSProgressIndicator, NSProgressIndicatorBarStyle, NSProgressIndicatorPreferredAquaThickness, + NSProgressIndicatorPreferredLargeThickness, NSProgressIndicatorPreferredSmallThickness, + NSProgressIndicatorPreferredThickness, NSProgressIndicatorSpinningStyle, + NSProgressIndicatorStyle, NSProgressIndicatorStyleBar, NSProgressIndicatorStyleSpinning, + NSProgressIndicatorThickness, +}; +pub use self::__NSResponder::{NSResponder, NSStandardKeyBindingResponding}; +pub use self::__NSRotationGestureRecognizer::NSRotationGestureRecognizer; +pub use self::__NSRuleEditor::{ + NSRuleEditor, NSRuleEditorDelegate, NSRuleEditorNestingMode, NSRuleEditorNestingModeCompound, + NSRuleEditorNestingModeList, NSRuleEditorNestingModeSimple, NSRuleEditorNestingModeSingle, + NSRuleEditorPredicateComparisonModifier, NSRuleEditorPredicateCompoundType, + NSRuleEditorPredicateCustomSelector, NSRuleEditorPredicateLeftExpression, + NSRuleEditorPredicateOperatorType, NSRuleEditorPredicateOptions, NSRuleEditorPredicatePartKey, + NSRuleEditorPredicateRightExpression, NSRuleEditorRowType, NSRuleEditorRowTypeCompound, + NSRuleEditorRowTypeSimple, NSRuleEditorRowsDidChangeNotification, +}; +pub use self::__NSRulerMarker::NSRulerMarker; +pub use self::__NSRulerView::{ + NSHorizontalRuler, NSRulerOrientation, NSRulerView, NSRulerViewUnitCentimeters, + NSRulerViewUnitInches, NSRulerViewUnitName, NSRulerViewUnitPicas, NSRulerViewUnitPoints, + NSVerticalRuler, +}; +pub use self::__NSRunningApplication::{ + NSApplicationActivateAllWindows, NSApplicationActivateIgnoringOtherApps, + NSApplicationActivationOptions, NSApplicationActivationPolicy, + NSApplicationActivationPolicyAccessory, NSApplicationActivationPolicyProhibited, + NSApplicationActivationPolicyRegular, NSRunningApplication, +}; +pub use self::__NSSavePanel::{ + NSFileHandlingPanelCancelButton, NSFileHandlingPanelOKButton, NSOpenSavePanelDelegate, + NSSavePanel, +}; +pub use self::__NSScreen::{NSScreen, NSScreenColorSpaceDidChangeNotification}; +pub use self::__NSScrollView::{ + NSScrollElasticity, NSScrollElasticityAllowed, NSScrollElasticityAutomatic, + NSScrollElasticityNone, NSScrollView, NSScrollViewDidEndLiveMagnifyNotification, + NSScrollViewDidEndLiveScrollNotification, NSScrollViewDidLiveScrollNotification, + NSScrollViewFindBarPosition, NSScrollViewFindBarPositionAboveContent, + NSScrollViewFindBarPositionAboveHorizontalRuler, NSScrollViewFindBarPositionBelowContent, + NSScrollViewWillStartLiveMagnifyNotification, NSScrollViewWillStartLiveScrollNotification, +}; +pub use self::__NSScroller::{ + NSAllScrollerParts, NSNoScrollerParts, NSOnlyScrollerArrows, + NSPreferredScrollerStyleDidChangeNotification, NSScrollArrowPosition, NSScroller, + NSScrollerArrow, NSScrollerArrowsDefaultSetting, NSScrollerArrowsMaxEnd, + NSScrollerArrowsMinEnd, NSScrollerArrowsNone, NSScrollerDecrementArrow, + NSScrollerDecrementLine, NSScrollerDecrementPage, NSScrollerIncrementArrow, + NSScrollerIncrementLine, NSScrollerIncrementPage, NSScrollerKnob, NSScrollerKnobSlot, + NSScrollerKnobStyle, NSScrollerKnobStyleDark, NSScrollerKnobStyleDefault, + NSScrollerKnobStyleLight, NSScrollerNoPart, NSScrollerPart, NSScrollerStyle, + NSScrollerStyleLegacy, NSScrollerStyleOverlay, NSUsableScrollerParts, +}; +pub use self::__NSScrubber::{ + NSScrubber, NSScrubberAlignment, NSScrubberAlignmentCenter, NSScrubberAlignmentLeading, + NSScrubberAlignmentNone, NSScrubberAlignmentTrailing, NSScrubberDataSource, NSScrubberDelegate, + NSScrubberMode, NSScrubberModeFixed, NSScrubberModeFree, NSScrubberSelectionStyle, +}; +pub use self::__NSScrubberItemView::{ + NSScrubberArrangedView, NSScrubberImageItemView, NSScrubberItemView, NSScrubberSelectionView, + NSScrubberTextItemView, +}; +pub use self::__NSScrubberLayout::{ + NSScrubberFlowLayout, NSScrubberFlowLayoutDelegate, NSScrubberLayout, + NSScrubberLayoutAttributes, NSScrubberProportionalLayout, +}; +pub use self::__NSSearchField::{ + NSSearchField, NSSearchFieldDelegate, NSSearchFieldRecentsAutosaveName, +}; +pub use self::__NSSearchFieldCell::{ + NSSearchFieldCell, NSSearchFieldClearRecentsMenuItemTag, NSSearchFieldNoRecentsMenuItemTag, + NSSearchFieldRecentsMenuItemTag, NSSearchFieldRecentsTitleMenuItemTag, +}; +pub use self::__NSSearchToolbarItem::NSSearchToolbarItem; +pub use self::__NSSecureTextField::{NSSecureTextField, NSSecureTextFieldCell}; +pub use self::__NSSegmentedCell::NSSegmentedCell; +pub use self::__NSSegmentedControl::{ + NSSegmentDistribution, NSSegmentDistributionFill, NSSegmentDistributionFillEqually, + NSSegmentDistributionFillProportionally, NSSegmentDistributionFit, NSSegmentStyle, + NSSegmentStyleAutomatic, NSSegmentStyleCapsule, NSSegmentStyleRoundRect, NSSegmentStyleRounded, + NSSegmentStyleSeparated, NSSegmentStyleSmallSquare, NSSegmentStyleTexturedRounded, + NSSegmentStyleTexturedSquare, NSSegmentSwitchTracking, NSSegmentSwitchTrackingMomentary, + NSSegmentSwitchTrackingMomentaryAccelerator, NSSegmentSwitchTrackingSelectAny, + NSSegmentSwitchTrackingSelectOne, NSSegmentedControl, +}; +pub use self::__NSShadow::NSShadow; +pub use self::__NSSharingService::{ + NSCloudKitSharingServiceAllowPrivate, NSCloudKitSharingServiceAllowPublic, + NSCloudKitSharingServiceAllowReadOnly, NSCloudKitSharingServiceAllowReadWrite, + NSCloudKitSharingServiceOptions, NSCloudKitSharingServiceStandard, + NSCloudSharingServiceDelegate, NSSharingContentScope, NSSharingContentScopeFull, + NSSharingContentScopeItem, NSSharingContentScopePartial, NSSharingService, + NSSharingServiceDelegate, NSSharingServiceName, NSSharingServiceNameAddToAperture, + NSSharingServiceNameAddToIPhoto, NSSharingServiceNameAddToSafariReadingList, + NSSharingServiceNameCloudSharing, NSSharingServiceNameComposeEmail, + NSSharingServiceNameComposeMessage, NSSharingServiceNamePostImageOnFlickr, + NSSharingServiceNamePostOnFacebook, NSSharingServiceNamePostOnLinkedIn, + NSSharingServiceNamePostOnSinaWeibo, NSSharingServiceNamePostOnTencentWeibo, + NSSharingServiceNamePostOnTwitter, NSSharingServiceNamePostVideoOnTudou, + NSSharingServiceNamePostVideoOnVimeo, NSSharingServiceNamePostVideoOnYouku, + NSSharingServiceNameSendViaAirDrop, NSSharingServiceNameUseAsDesktopPicture, + NSSharingServiceNameUseAsFacebookProfileImage, NSSharingServiceNameUseAsLinkedInProfileImage, + NSSharingServiceNameUseAsTwitterProfileImage, NSSharingServicePicker, + NSSharingServicePickerDelegate, +}; +pub use self::__NSSharingServicePickerToolbarItem::{ + NSSharingServicePickerToolbarItem, NSSharingServicePickerToolbarItemDelegate, +}; +pub use self::__NSSharingServicePickerTouchBarItem::{ + NSSharingServicePickerTouchBarItem, NSSharingServicePickerTouchBarItemDelegate, +}; +pub use self::__NSSlider::NSSlider; +pub use self::__NSSliderAccessory::{NSSliderAccessory, NSSliderAccessoryBehavior}; +pub use self::__NSSliderCell::{ + NSCircularSlider, NSLinearSlider, NSSliderCell, NSSliderType, NSSliderTypeCircular, + NSSliderTypeLinear, NSTickMarkAbove, NSTickMarkBelow, NSTickMarkLeft, NSTickMarkPosition, + NSTickMarkPositionAbove, NSTickMarkPositionBelow, NSTickMarkPositionLeading, + NSTickMarkPositionTrailing, NSTickMarkRight, +}; +pub use self::__NSSliderTouchBarItem::{ + NSSliderAccessoryWidth, NSSliderAccessoryWidthDefault, NSSliderAccessoryWidthWide, + NSSliderTouchBarItem, +}; +pub use self::__NSSound::{ + NSSound, NSSoundDelegate, NSSoundName, NSSoundPboardType, NSSoundPlaybackDeviceIdentifier, +}; +pub use self::__NSSpeechRecognizer::{NSSpeechRecognizer, NSSpeechRecognizerDelegate}; +pub use self::__NSSpeechSynthesizer::{ + NSSpeechBoundary, NSSpeechCharacterModeProperty, NSSpeechCommandDelimiterKey, + NSSpeechCommandDelimiterProperty, NSSpeechCommandPrefix, NSSpeechCommandSuffix, + NSSpeechCurrentVoiceProperty, NSSpeechDictionaryAbbreviations, NSSpeechDictionaryEntryPhonemes, + NSSpeechDictionaryEntrySpelling, NSSpeechDictionaryKey, NSSpeechDictionaryLocaleIdentifier, + NSSpeechDictionaryModificationDate, NSSpeechDictionaryPronunciations, NSSpeechErrorCount, + NSSpeechErrorKey, NSSpeechErrorNewestCharacterOffset, NSSpeechErrorNewestCode, + NSSpeechErrorOldestCharacterOffset, NSSpeechErrorOldestCode, NSSpeechErrorsProperty, + NSSpeechImmediateBoundary, NSSpeechInputModeProperty, NSSpeechMode, NSSpeechModeLiteral, + NSSpeechModeNormal, NSSpeechModePhoneme, NSSpeechModeText, NSSpeechNumberModeProperty, + NSSpeechOutputToFileURLProperty, NSSpeechPhonemeInfoExample, NSSpeechPhonemeInfoHiliteEnd, + NSSpeechPhonemeInfoHiliteStart, NSSpeechPhonemeInfoKey, NSSpeechPhonemeInfoOpcode, + NSSpeechPhonemeInfoSymbol, NSSpeechPhonemeSymbolsProperty, NSSpeechPitchBaseProperty, + NSSpeechPitchModProperty, NSSpeechPropertyKey, NSSpeechRateProperty, + NSSpeechRecentSyncProperty, NSSpeechResetProperty, NSSpeechSentenceBoundary, NSSpeechStatusKey, + NSSpeechStatusNumberOfCharactersLeft, NSSpeechStatusOutputBusy, NSSpeechStatusOutputPaused, + NSSpeechStatusPhonemeCode, NSSpeechStatusProperty, NSSpeechSynthesizer, + NSSpeechSynthesizerDelegate, NSSpeechSynthesizerInfoIdentifier, NSSpeechSynthesizerInfoKey, + NSSpeechSynthesizerInfoProperty, NSSpeechSynthesizerInfoVersion, NSSpeechSynthesizerVoiceName, + NSSpeechVolumeProperty, NSSpeechWordBoundary, NSVoiceAge, NSVoiceAttributeKey, NSVoiceDemoText, + NSVoiceGender, NSVoiceGenderFemale, NSVoiceGenderMale, NSVoiceGenderName, NSVoiceGenderNeuter, + NSVoiceGenderNeutral, NSVoiceIdentifier, NSVoiceIndividuallySpokenCharacters, NSVoiceLanguage, + NSVoiceLocaleIdentifier, NSVoiceName, NSVoiceSupportedCharacters, +}; +pub use self::__NSSpellChecker::{ + NSCorrectionIndicatorType, NSCorrectionIndicatorTypeDefault, NSCorrectionIndicatorTypeGuesses, + NSCorrectionIndicatorTypeReversion, NSCorrectionResponse, NSCorrectionResponseAccepted, + NSCorrectionResponseEdited, NSCorrectionResponseIgnored, NSCorrectionResponseNone, + NSCorrectionResponseRejected, NSCorrectionResponseReverted, NSSpellChecker, + NSSpellCheckerDidChangeAutomaticCapitalizationNotification, + NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification, + NSSpellCheckerDidChangeAutomaticPeriodSubstitutionNotification, + NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification, + NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification, + NSSpellCheckerDidChangeAutomaticTextCompletionNotification, + NSSpellCheckerDidChangeAutomaticTextReplacementNotification, NSTextCheckingDocumentAuthorKey, + NSTextCheckingDocumentTitleKey, NSTextCheckingDocumentURLKey, NSTextCheckingOptionKey, + NSTextCheckingOrthographyKey, NSTextCheckingQuotesKey, NSTextCheckingReferenceDateKey, + NSTextCheckingReferenceTimeZoneKey, NSTextCheckingRegularExpressionsKey, + NSTextCheckingReplacementsKey, NSTextCheckingSelectedRangeKey, +}; +pub use self::__NSSpellProtocol::{NSChangeSpelling, NSIgnoreMisspelledWords}; +pub use self::__NSSplitView::{ + NSSplitView, NSSplitViewAutosaveName, NSSplitViewDelegate, + NSSplitViewDidResizeSubviewsNotification, NSSplitViewDividerStyle, + NSSplitViewDividerStylePaneSplitter, NSSplitViewDividerStyleThick, NSSplitViewDividerStyleThin, + NSSplitViewWillResizeSubviewsNotification, +}; +pub use self::__NSSplitViewController::{ + NSSplitViewController, NSSplitViewControllerAutomaticDimension, +}; +pub use self::__NSSplitViewItem::{ + NSSplitViewItem, NSSplitViewItemBehavior, NSSplitViewItemBehaviorContentList, + NSSplitViewItemBehaviorDefault, NSSplitViewItemBehaviorSidebar, + NSSplitViewItemCollapseBehavior, NSSplitViewItemCollapseBehaviorDefault, + NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitView, + NSSplitViewItemCollapseBehaviorPreferResizingSplitViewWithFixedSiblings, + NSSplitViewItemCollapseBehaviorUseConstraints, NSSplitViewItemUnspecifiedDimension, +}; +pub use self::__NSStackView::{ + NSStackView, NSStackViewDelegate, NSStackViewDistribution, + NSStackViewDistributionEqualCentering, NSStackViewDistributionEqualSpacing, + NSStackViewDistributionFill, NSStackViewDistributionFillEqually, + NSStackViewDistributionFillProportionally, NSStackViewDistributionGravityAreas, + NSStackViewGravity, NSStackViewGravityBottom, NSStackViewGravityCenter, + NSStackViewGravityLeading, NSStackViewGravityTop, NSStackViewGravityTrailing, + NSStackViewVisibilityPriority, NSStackViewVisibilityPriorityDetachOnlyIfNecessary, + NSStackViewVisibilityPriorityMustHold, NSStackViewVisibilityPriorityNotVisible, +}; +pub use self::__NSStatusBar::{NSSquareStatusItemLength, NSStatusBar, NSVariableStatusItemLength}; +pub use self::__NSStatusBarButton::NSStatusBarButton; +pub use self::__NSStatusItem::{ + NSStatusItem, NSStatusItemAutosaveName, NSStatusItemBehavior, + NSStatusItemBehaviorRemovalAllowed, NSStatusItemBehaviorTerminationOnRemoval, +}; +pub use self::__NSStepper::NSStepper; +pub use self::__NSStepperCell::NSStepperCell; +pub use self::__NSStepperTouchBarItem::NSStepperTouchBarItem; +pub use self::__NSStoryboard::{ + NSStoryboard, NSStoryboardControllerCreator, NSStoryboardName, NSStoryboardSceneIdentifier, +}; +pub use self::__NSStoryboardSegue::{ + NSSeguePerforming, NSStoryboardSegue, NSStoryboardSegueIdentifier, +}; +pub use self::__NSStringDrawing::{ + NSStringDrawingContext, NSStringDrawingDisableScreenFontSubstitution, NSStringDrawingOneShot, + NSStringDrawingOptions, NSStringDrawingTruncatesLastVisibleLine, + NSStringDrawingUsesDeviceMetrics, NSStringDrawingUsesFontLeading, + NSStringDrawingUsesLineFragmentOrigin, +}; +pub use self::__NSSwitch::NSSwitch; +pub use self::__NSTabView::{ + NSAppKitVersionNumberWithDirectionalTabs, NSBottomTabsBezelBorder, NSLeftTabsBezelBorder, + NSNoTabsBezelBorder, NSNoTabsLineBorder, NSNoTabsNoBorder, NSRightTabsBezelBorder, + NSTabPosition, NSTabPositionBottom, NSTabPositionLeft, NSTabPositionNone, NSTabPositionRight, + NSTabPositionTop, NSTabView, NSTabViewBorderType, NSTabViewBorderTypeBezel, + NSTabViewBorderTypeLine, NSTabViewBorderTypeNone, NSTabViewDelegate, NSTabViewType, + NSTopTabsBezelBorder, +}; +pub use self::__NSTabViewController::{ + NSTabViewController, NSTabViewControllerTabStyle, + NSTabViewControllerTabStyleSegmentedControlOnBottom, + NSTabViewControllerTabStyleSegmentedControlOnTop, NSTabViewControllerTabStyleToolbar, + NSTabViewControllerTabStyleUnspecified, +}; +pub use self::__NSTabViewItem::{ + NSBackgroundTab, NSPressedTab, NSSelectedTab, NSTabState, NSTabViewItem, +}; +pub use self::__NSTableCellView::NSTableCellView; +pub use self::__NSTableColumn::{ + NSTableColumn, NSTableColumnAutoresizingMask, NSTableColumnNoResizing, + NSTableColumnResizingOptions, NSTableColumnUserResizingMask, +}; +pub use self::__NSTableHeaderCell::NSTableHeaderCell; +pub use self::__NSTableHeaderView::NSTableHeaderView; +pub use self::__NSTableRowView::NSTableRowView; +pub use self::__NSTableView::{ + NSTableRowActionEdge, NSTableRowActionEdgeLeading, NSTableRowActionEdgeTrailing, NSTableView, + NSTableViewAnimationEffectFade, NSTableViewAnimationEffectGap, NSTableViewAnimationEffectNone, + NSTableViewAnimationOptions, NSTableViewAnimationSlideDown, NSTableViewAnimationSlideLeft, + NSTableViewAnimationSlideRight, NSTableViewAnimationSlideUp, NSTableViewAutosaveName, + NSTableViewColumnAutoresizingStyle, NSTableViewColumnDidMoveNotification, + NSTableViewColumnDidResizeNotification, NSTableViewDashedHorizontalGridLineMask, + NSTableViewDataSource, NSTableViewDelegate, NSTableViewDraggingDestinationFeedbackStyle, + NSTableViewDraggingDestinationFeedbackStyleGap, + NSTableViewDraggingDestinationFeedbackStyleNone, + NSTableViewDraggingDestinationFeedbackStyleRegular, + NSTableViewDraggingDestinationFeedbackStyleSourceList, NSTableViewDropAbove, NSTableViewDropOn, + NSTableViewDropOperation, NSTableViewFirstColumnOnlyAutoresizingStyle, + NSTableViewGridLineStyle, NSTableViewGridNone, NSTableViewLastColumnOnlyAutoresizingStyle, + NSTableViewNoColumnAutoresizing, NSTableViewReverseSequentialColumnAutoresizingStyle, + NSTableViewRowSizeStyle, NSTableViewRowSizeStyleCustom, NSTableViewRowSizeStyleDefault, + NSTableViewRowSizeStyleLarge, NSTableViewRowSizeStyleMedium, NSTableViewRowSizeStyleSmall, + NSTableViewRowViewKey, NSTableViewSelectionDidChangeNotification, + NSTableViewSelectionHighlightStyle, NSTableViewSelectionHighlightStyleNone, + NSTableViewSelectionHighlightStyleRegular, NSTableViewSelectionHighlightStyleSourceList, + NSTableViewSelectionIsChangingNotification, NSTableViewSequentialColumnAutoresizingStyle, + NSTableViewSolidHorizontalGridLineMask, NSTableViewSolidVerticalGridLineMask, NSTableViewStyle, + NSTableViewStyleAutomatic, NSTableViewStyleFullWidth, NSTableViewStyleInset, + NSTableViewStylePlain, NSTableViewStyleSourceList, NSTableViewUniformColumnAutoresizingStyle, +}; +pub use self::__NSTableViewDiffableDataSource::{ + NSTableViewDiffableDataSource, NSTableViewDiffableDataSourceCellProvider, + NSTableViewDiffableDataSourceRowProvider, + NSTableViewDiffableDataSourceSectionHeaderViewProvider, +}; +pub use self::__NSTableViewRowAction::{ + NSTableViewRowAction, NSTableViewRowActionStyle, NSTableViewRowActionStyleDestructive, + NSTableViewRowActionStyleRegular, +}; +pub use self::__NSText::{ + NSBackTabCharacter, NSBackspaceCharacter, NSBacktabTextMovement, NSCancelTextMovement, + NSCarriageReturnCharacter, NSCenterTextAlignment, NSDeleteCharacter, NSDownTextMovement, + NSEnterCharacter, NSFormFeedCharacter, NSIllegalTextMovement, NSJustifiedTextAlignment, + NSLeftTextAlignment, NSLeftTextMovement, NSLineSeparatorCharacter, NSNaturalTextAlignment, + NSNewlineCharacter, NSOtherTextMovement, NSParagraphSeparatorCharacter, NSReturnTextMovement, + NSRightTextAlignment, NSRightTextMovement, NSTabCharacter, NSTabTextMovement, NSText, + NSTextAlignment, NSTextAlignmentCenter, NSTextAlignmentJustified, NSTextAlignmentLeft, + NSTextAlignmentNatural, NSTextAlignmentRight, NSTextDelegate, + NSTextDidBeginEditingNotification, NSTextDidChangeNotification, + NSTextDidEndEditingNotification, NSTextMovement, NSTextMovementBacktab, NSTextMovementCancel, + NSTextMovementDown, NSTextMovementLeft, NSTextMovementOther, NSTextMovementReturn, + NSTextMovementRight, NSTextMovementTab, NSTextMovementUp, NSTextMovementUserInfoKey, + NSTextWritingDirectionEmbedding, NSTextWritingDirectionOverride, NSUpTextMovement, + NSWritingDirection, NSWritingDirectionLeftToRight, NSWritingDirectionNatural, + NSWritingDirectionRightToLeft, +}; +pub use self::__NSTextAlternatives::{ + NSTextAlternatives, NSTextAlternativesSelectedAlternativeStringNotification, +}; +pub use self::__NSTextAttachment::{ + NSAttachmentCharacter, NSTextAttachment, NSTextAttachmentContainer, NSTextAttachmentLayout, + NSTextAttachmentViewProvider, +}; +pub use self::__NSTextAttachmentCell::NSTextAttachmentCell; +pub use self::__NSTextCheckingClient::{ + NSTextCheckingClient, NSTextInputTraitType, NSTextInputTraitTypeDefault, + NSTextInputTraitTypeNo, NSTextInputTraitTypeYes, NSTextInputTraits, +}; +pub use self::__NSTextCheckingController::NSTextCheckingController; +pub use self::__NSTextContainer::{ + NSLineDoesntMove, NSLineMovementDirection, NSLineMovesDown, NSLineMovesLeft, NSLineMovesRight, + NSLineMovesUp, NSLineSweepDirection, NSLineSweepDown, NSLineSweepLeft, NSLineSweepRight, + NSLineSweepUp, NSTextContainer, +}; +pub use self::__NSTextContent::{ + NSTextContent, NSTextContentType, NSTextContentTypeOneTimeCode, NSTextContentTypePassword, + NSTextContentTypeUsername, +}; +pub use self::__NSTextContentManager::{ + NSTextContentManager, NSTextContentManagerDelegate, NSTextContentManagerEnumerationOptions, + NSTextContentManagerEnumerationOptionsNone, NSTextContentManagerEnumerationOptionsReverse, + NSTextContentStorage, NSTextContentStorageDelegate, + NSTextContentStorageUnsupportedAttributeAddedNotification, NSTextElementProvider, +}; +pub use self::__NSTextElement::{NSTextElement, NSTextParagraph}; +pub use self::__NSTextField::{NSTextField, NSTextFieldDelegate}; +pub use self::__NSTextFieldCell::{ + NSTextFieldBezelStyle, NSTextFieldCell, NSTextFieldRoundedBezel, NSTextFieldSquareBezel, +}; +pub use self::__NSTextFinder::{ + NSPasteboardTypeTextFinderOptionKey, NSTextFinder, NSTextFinderAction, + NSTextFinderActionHideFindInterface, NSTextFinderActionHideReplaceInterface, + NSTextFinderActionNextMatch, NSTextFinderActionPreviousMatch, NSTextFinderActionReplace, + NSTextFinderActionReplaceAll, NSTextFinderActionReplaceAllInSelection, + NSTextFinderActionReplaceAndFind, NSTextFinderActionSelectAll, + NSTextFinderActionSelectAllInSelection, NSTextFinderActionSetSearchString, + NSTextFinderActionShowFindInterface, NSTextFinderActionShowReplaceInterface, + NSTextFinderBarContainer, NSTextFinderCaseInsensitiveKey, NSTextFinderClient, + NSTextFinderMatchingType, NSTextFinderMatchingTypeContains, NSTextFinderMatchingTypeEndsWith, + NSTextFinderMatchingTypeFullWord, NSTextFinderMatchingTypeKey, + NSTextFinderMatchingTypeStartsWith, +}; +pub use self::__NSTextInputClient::NSTextInputClient; +pub use self::__NSTextInputContext::{ + NSTextInputContext, NSTextInputContextKeyboardSelectionDidChangeNotification, + NSTextInputSourceIdentifier, +}; +pub use self::__NSTextLayoutFragment::{ + NSTextLayoutFragment, NSTextLayoutFragmentEnumerationOptions, + NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment, + NSTextLayoutFragmentEnumerationOptionsEnsuresLayout, + NSTextLayoutFragmentEnumerationOptionsEstimatesSize, + NSTextLayoutFragmentEnumerationOptionsNone, NSTextLayoutFragmentEnumerationOptionsReverse, + NSTextLayoutFragmentState, NSTextLayoutFragmentStateCalculatedUsageBounds, + NSTextLayoutFragmentStateEstimatedUsageBounds, NSTextLayoutFragmentStateLayoutAvailable, + NSTextLayoutFragmentStateNone, +}; +pub use self::__NSTextLayoutManager::{ + NSTextLayoutManager, NSTextLayoutManagerDelegate, NSTextLayoutManagerSegmentOptions, + NSTextLayoutManagerSegmentOptionsHeadSegmentExtended, + NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded, + NSTextLayoutManagerSegmentOptionsNone, NSTextLayoutManagerSegmentOptionsRangeNotRequired, + NSTextLayoutManagerSegmentOptionsTailSegmentExtended, + NSTextLayoutManagerSegmentOptionsUpstreamAffinity, NSTextLayoutManagerSegmentType, + NSTextLayoutManagerSegmentTypeHighlight, NSTextLayoutManagerSegmentTypeSelection, + NSTextLayoutManagerSegmentTypeStandard, +}; +pub use self::__NSTextLineFragment::NSTextLineFragment; +pub use self::__NSTextList::{ + NSTextList, NSTextListMarkerBox, NSTextListMarkerCheck, NSTextListMarkerCircle, + NSTextListMarkerDecimal, NSTextListMarkerDiamond, NSTextListMarkerDisc, NSTextListMarkerFormat, + NSTextListMarkerHyphen, NSTextListMarkerLowercaseAlpha, NSTextListMarkerLowercaseHexadecimal, + NSTextListMarkerLowercaseLatin, NSTextListMarkerLowercaseRoman, NSTextListMarkerOctal, + NSTextListMarkerSquare, NSTextListMarkerUppercaseAlpha, NSTextListMarkerUppercaseHexadecimal, + NSTextListMarkerUppercaseLatin, NSTextListMarkerUppercaseRoman, NSTextListOptions, + NSTextListPrependEnclosingMarker, +}; +pub use self::__NSTextRange::{NSTextLocation, NSTextRange}; +pub use self::__NSTextSelection::{ + NSTextSelection, NSTextSelectionAffinity, NSTextSelectionAffinityDownstream, + NSTextSelectionAffinityUpstream, NSTextSelectionGranularity, + NSTextSelectionGranularityCharacter, NSTextSelectionGranularityLine, + NSTextSelectionGranularityParagraph, NSTextSelectionGranularitySentence, + NSTextSelectionGranularityWord, +}; +pub use self::__NSTextSelectionNavigation::{ + NSTextSelectionDataSource, NSTextSelectionNavigation, NSTextSelectionNavigationDestination, + NSTextSelectionNavigationDestinationCharacter, NSTextSelectionNavigationDestinationContainer, + NSTextSelectionNavigationDestinationDocument, NSTextSelectionNavigationDestinationLine, + NSTextSelectionNavigationDestinationParagraph, NSTextSelectionNavigationDestinationSentence, + NSTextSelectionNavigationDestinationWord, NSTextSelectionNavigationDirection, + NSTextSelectionNavigationDirectionBackward, NSTextSelectionNavigationDirectionDown, + NSTextSelectionNavigationDirectionForward, NSTextSelectionNavigationDirectionLeft, + NSTextSelectionNavigationDirectionRight, NSTextSelectionNavigationDirectionUp, + NSTextSelectionNavigationLayoutOrientation, + NSTextSelectionNavigationLayoutOrientationHorizontal, + NSTextSelectionNavigationLayoutOrientationVertical, NSTextSelectionNavigationModifier, + NSTextSelectionNavigationModifierExtend, NSTextSelectionNavigationModifierMultiple, + NSTextSelectionNavigationModifierVisual, NSTextSelectionNavigationWritingDirection, + NSTextSelectionNavigationWritingDirectionLeftToRight, + NSTextSelectionNavigationWritingDirectionRightToLeft, +}; +pub use self::__NSTextStorage::{ + NSTextStorage, NSTextStorageDelegate, NSTextStorageDidProcessEditingNotification, + NSTextStorageEditActions, NSTextStorageEditedAttributes, NSTextStorageEditedCharacters, + NSTextStorageEditedOptions, NSTextStorageObserving, + NSTextStorageWillProcessEditingNotification, +}; +pub use self::__NSTextTable::{ + NSTextBlock, NSTextBlockAbsoluteValueType, NSTextBlockBaselineAlignment, NSTextBlockBorder, + NSTextBlockBottomAlignment, NSTextBlockDimension, NSTextBlockHeight, NSTextBlockLayer, + NSTextBlockMargin, NSTextBlockMaximumHeight, NSTextBlockMaximumWidth, + NSTextBlockMiddleAlignment, NSTextBlockMinimumHeight, NSTextBlockMinimumWidth, + NSTextBlockPadding, NSTextBlockPercentageValueType, NSTextBlockTopAlignment, + NSTextBlockValueType, NSTextBlockVerticalAlignment, NSTextBlockWidth, NSTextTable, + NSTextTableAutomaticLayoutAlgorithm, NSTextTableBlock, NSTextTableFixedLayoutAlgorithm, + NSTextTableLayoutAlgorithm, +}; +pub use self::__NSTextView::{ + NSAllRomanInputSourcesLocaleIdentifier, NSFindPanelAction, NSFindPanelActionNext, + NSFindPanelActionPrevious, NSFindPanelActionReplace, NSFindPanelActionReplaceAll, + NSFindPanelActionReplaceAllInSelection, NSFindPanelActionReplaceAndFind, + NSFindPanelActionSelectAll, NSFindPanelActionSelectAllInSelection, + NSFindPanelActionSetFindString, NSFindPanelActionShowFindPanel, + NSFindPanelCaseInsensitiveSearch, NSFindPanelSearchOptionsPboardType, + NSFindPanelSubstringMatch, NSFindPanelSubstringMatchType, + NSFindPanelSubstringMatchTypeContains, NSFindPanelSubstringMatchTypeEndsWith, + NSFindPanelSubstringMatchTypeFullWord, NSFindPanelSubstringMatchTypeStartsWith, + NSPasteboardTypeFindPanelSearchOptionKey, NSSelectByCharacter, NSSelectByParagraph, + NSSelectByWord, NSSelectionAffinity, NSSelectionAffinityDownstream, + NSSelectionAffinityUpstream, NSSelectionGranularity, NSTextView, NSTextViewDelegate, + NSTextViewDidChangeSelectionNotification, NSTextViewDidChangeTypingAttributesNotification, + NSTextViewDidSwitchToNSLayoutManagerNotification, + NSTextViewWillChangeNotifyingTextViewNotification, + NSTextViewWillSwitchToNSLayoutManagerNotification, NSTouchBarItemIdentifierCharacterPicker, + NSTouchBarItemIdentifierTextAlignment, NSTouchBarItemIdentifierTextColorPicker, + NSTouchBarItemIdentifierTextFormat, NSTouchBarItemIdentifierTextList, + NSTouchBarItemIdentifierTextStyle, +}; +pub use self::__NSTextViewportLayoutController::{ + NSTextViewportLayoutController, NSTextViewportLayoutControllerDelegate, +}; +pub use self::__NSTintConfiguration::NSTintConfiguration; +pub use self::__NSTitlebarAccessoryViewController::NSTitlebarAccessoryViewController; +pub use self::__NSTokenField::{NSTokenField, NSTokenFieldDelegate}; +pub use self::__NSTokenFieldCell::{ + NSDefaultTokenStyle, NSPlainTextTokenStyle, NSRoundedTokenStyle, NSTokenFieldCell, + NSTokenFieldCellDelegate, NSTokenStyle, NSTokenStyleDefault, NSTokenStyleNone, + NSTokenStylePlainSquared, NSTokenStyleRounded, NSTokenStyleSquared, +}; +pub use self::__NSToolbar::{ + NSToolbar, NSToolbarDelegate, NSToolbarDidRemoveItemNotification, NSToolbarDisplayMode, + NSToolbarDisplayModeDefault, NSToolbarDisplayModeIconAndLabel, NSToolbarDisplayModeIconOnly, + NSToolbarDisplayModeLabelOnly, NSToolbarIdentifier, NSToolbarItemIdentifier, NSToolbarSizeMode, + NSToolbarSizeModeDefault, NSToolbarSizeModeRegular, NSToolbarSizeModeSmall, + NSToolbarWillAddItemNotification, +}; +pub use self::__NSToolbarItem::{ + NSCloudSharingValidation, NSToolbarCloudSharingItemIdentifier, + NSToolbarCustomizeToolbarItemIdentifier, NSToolbarFlexibleSpaceItemIdentifier, NSToolbarItem, + NSToolbarItemValidation, NSToolbarItemVisibilityPriority, NSToolbarItemVisibilityPriorityHigh, + NSToolbarItemVisibilityPriorityLow, NSToolbarItemVisibilityPriorityStandard, + NSToolbarItemVisibilityPriorityUser, NSToolbarPrintItemIdentifier, + NSToolbarSeparatorItemIdentifier, NSToolbarShowColorsItemIdentifier, + NSToolbarShowFontsItemIdentifier, NSToolbarSidebarTrackingSeparatorItemIdentifier, + NSToolbarSpaceItemIdentifier, NSToolbarToggleSidebarItemIdentifier, +}; +pub use self::__NSToolbarItemGroup::{ + NSToolbarItemGroup, NSToolbarItemGroupControlRepresentation, + NSToolbarItemGroupControlRepresentationAutomatic, + NSToolbarItemGroupControlRepresentationCollapsed, + NSToolbarItemGroupControlRepresentationExpanded, NSToolbarItemGroupSelectionMode, + NSToolbarItemGroupSelectionModeMomentary, NSToolbarItemGroupSelectionModeSelectAny, + NSToolbarItemGroupSelectionModeSelectOne, +}; +pub use self::__NSTouch::{ + NSTouch, NSTouchPhase, NSTouchPhaseAny, NSTouchPhaseBegan, NSTouchPhaseCancelled, + NSTouchPhaseEnded, NSTouchPhaseMoved, NSTouchPhaseStationary, NSTouchPhaseTouching, + NSTouchType, NSTouchTypeDirect, NSTouchTypeIndirect, NSTouchTypeMask, NSTouchTypeMaskDirect, + NSTouchTypeMaskIndirect, +}; +pub use self::__NSTouchBar::{ + NSTouchBar, NSTouchBarCustomizationIdentifier, NSTouchBarDelegate, NSTouchBarProvider, +}; +pub use self::__NSTouchBarItem::{ + NSTouchBarItem, NSTouchBarItemIdentifier, NSTouchBarItemIdentifierFixedSpaceLarge, + NSTouchBarItemIdentifierFixedSpaceSmall, NSTouchBarItemIdentifierFlexibleSpace, + NSTouchBarItemIdentifierOtherItemsProxy, NSTouchBarItemPriority, NSTouchBarItemPriorityHigh, + NSTouchBarItemPriorityLow, NSTouchBarItemPriorityNormal, +}; +pub use self::__NSTrackingArea::{ + NSTrackingActiveAlways, NSTrackingActiveInActiveApp, NSTrackingActiveInKeyWindow, + NSTrackingActiveWhenFirstResponder, NSTrackingArea, NSTrackingAreaOptions, + NSTrackingAssumeInside, NSTrackingCursorUpdate, NSTrackingEnabledDuringMouseDrag, + NSTrackingInVisibleRect, NSTrackingMouseEnteredAndExited, NSTrackingMouseMoved, +}; +pub use self::__NSTrackingSeparatorToolbarItem::NSTrackingSeparatorToolbarItem; +pub use self::__NSTreeController::NSTreeController; +pub use self::__NSTreeNode::NSTreeNode; +pub use self::__NSTypesetter::{ + NSTypesetter, NSTypesetterContainerBreakAction, NSTypesetterControlCharacterAction, + NSTypesetterHorizontalTabAction, NSTypesetterLineBreakAction, NSTypesetterParagraphBreakAction, + NSTypesetterWhitespaceAction, NSTypesetterZeroAdvancementAction, +}; +pub use self::__NSUserActivity::{NSUserActivityDocumentURLKey, NSUserActivityRestoring}; +pub use self::__NSUserDefaultsController::NSUserDefaultsController; +pub use self::__NSUserInterfaceCompression::{ + NSUserInterfaceCompression, NSUserInterfaceCompressionOptions, +}; +pub use self::__NSUserInterfaceItemIdentification::{ + NSUserInterfaceItemIdentification, NSUserInterfaceItemIdentifier, +}; +pub use self::__NSUserInterfaceItemSearching::NSUserInterfaceItemSearching; +pub use self::__NSUserInterfaceLayout::{ + NSUserInterfaceLayoutDirection, NSUserInterfaceLayoutDirectionLeftToRight, + NSUserInterfaceLayoutDirectionRightToLeft, NSUserInterfaceLayoutOrientation, + NSUserInterfaceLayoutOrientationHorizontal, NSUserInterfaceLayoutOrientationVertical, +}; +pub use self::__NSUserInterfaceValidation::{ + NSUserInterfaceValidations, NSValidatedUserInterfaceItem, +}; +pub use self::__NSView::{ + NSAutoresizingMaskOptions, NSBezelBorder, NSBorderType, NSDefinitionOptionKey, + NSDefinitionPresentationType, NSDefinitionPresentationTypeDictionaryApplication, + NSDefinitionPresentationTypeKey, NSDefinitionPresentationTypeOverlay, + NSFullScreenModeAllScreens, NSFullScreenModeApplicationPresentationOptions, + NSFullScreenModeSetting, NSFullScreenModeWindowLevel, NSGrooveBorder, NSLineBorder, NSNoBorder, + NSToolTipTag, NSTrackingRectTag, NSView, NSViewBoundsDidChangeNotification, + NSViewDidUpdateTrackingAreasNotification, NSViewFocusDidChangeNotification, + NSViewFrameDidChangeNotification, NSViewFullScreenModeOptionKey, + NSViewGlobalFrameDidChangeNotification, NSViewHeightSizable, NSViewLayerContentScaleDelegate, + NSViewLayerContentsPlacement, NSViewLayerContentsPlacementBottom, + NSViewLayerContentsPlacementBottomLeft, NSViewLayerContentsPlacementBottomRight, + NSViewLayerContentsPlacementCenter, NSViewLayerContentsPlacementLeft, + NSViewLayerContentsPlacementRight, NSViewLayerContentsPlacementScaleAxesIndependently, + NSViewLayerContentsPlacementScaleProportionallyToFill, + NSViewLayerContentsPlacementScaleProportionallyToFit, NSViewLayerContentsPlacementTop, + NSViewLayerContentsPlacementTopLeft, NSViewLayerContentsPlacementTopRight, + NSViewLayerContentsRedrawBeforeViewResize, NSViewLayerContentsRedrawCrossfade, + NSViewLayerContentsRedrawDuringViewResize, NSViewLayerContentsRedrawNever, + NSViewLayerContentsRedrawOnSetNeedsDisplay, NSViewLayerContentsRedrawPolicy, NSViewMaxXMargin, + NSViewMaxYMargin, NSViewMinXMargin, NSViewMinYMargin, NSViewNotSizable, NSViewToolTipOwner, + NSViewWidthSizable, +}; +pub use self::__NSViewController::{ + NSViewController, NSViewControllerPresentationAnimator, + NSViewControllerTransitionAllowUserInteraction, NSViewControllerTransitionCrossfade, + NSViewControllerTransitionNone, NSViewControllerTransitionOptions, + NSViewControllerTransitionSlideBackward, NSViewControllerTransitionSlideDown, + NSViewControllerTransitionSlideForward, NSViewControllerTransitionSlideLeft, + NSViewControllerTransitionSlideRight, NSViewControllerTransitionSlideUp, +}; +pub use self::__NSVisualEffectView::{ + NSVisualEffectBlendingMode, NSVisualEffectBlendingModeBehindWindow, + NSVisualEffectBlendingModeWithinWindow, NSVisualEffectMaterial, + NSVisualEffectMaterialAppearanceBased, NSVisualEffectMaterialContentBackground, + NSVisualEffectMaterialDark, NSVisualEffectMaterialFullScreenUI, + NSVisualEffectMaterialHUDWindow, NSVisualEffectMaterialHeaderView, NSVisualEffectMaterialLight, + NSVisualEffectMaterialMediumLight, NSVisualEffectMaterialMenu, NSVisualEffectMaterialPopover, + NSVisualEffectMaterialSelection, NSVisualEffectMaterialSheet, NSVisualEffectMaterialSidebar, + NSVisualEffectMaterialTitlebar, NSVisualEffectMaterialToolTip, NSVisualEffectMaterialUltraDark, + NSVisualEffectMaterialUnderPageBackground, NSVisualEffectMaterialUnderWindowBackground, + NSVisualEffectMaterialWindowBackground, NSVisualEffectState, NSVisualEffectStateActive, + NSVisualEffectStateFollowsWindowActiveState, NSVisualEffectStateInactive, NSVisualEffectView, +}; +pub use self::__NSWindow::{ + NSAppKitVersionNumberWithCustomSheetPosition, + NSAppKitVersionNumberWithDeferredWindowDisplaySupport, NSBackingPropertyOldColorSpaceKey, + NSBackingPropertyOldScaleFactorKey, NSBorderlessWindowMask, NSClosableWindowMask, + NSDirectSelection, NSDisplayWindowRunLoopOrdering, NSDocModalWindowMask, + NSFullScreenWindowMask, NSFullSizeContentViewWindowMask, NSHUDWindowMask, + NSMiniaturizableWindowMask, NSModalResponseCancel, NSModalResponseOK, NSNonactivatingPanelMask, + NSResetCursorRectsRunLoopOrdering, NSResizableWindowMask, NSSelectingNext, NSSelectingPrevious, + NSSelectionDirection, NSTexturedBackgroundWindowMask, NSTitlebarSeparatorStyle, + NSTitlebarSeparatorStyleAutomatic, NSTitlebarSeparatorStyleLine, NSTitlebarSeparatorStyleNone, + NSTitlebarSeparatorStyleShadow, NSTitledWindowMask, NSUnifiedTitleAndToolbarWindowMask, + NSUnscaledWindowMask, NSUtilityWindowMask, NSWindow, NSWindowAnimationBehavior, + NSWindowAnimationBehaviorAlertPanel, NSWindowAnimationBehaviorDefault, + NSWindowAnimationBehaviorDocumentWindow, NSWindowAnimationBehaviorNone, + NSWindowAnimationBehaviorUtilityWindow, NSWindowBackingLocation, + NSWindowBackingLocationDefault, NSWindowBackingLocationMainMemory, + NSWindowBackingLocationVideoMemory, NSWindowButton, NSWindowCloseButton, + NSWindowCollectionBehavior, NSWindowCollectionBehaviorCanJoinAllSpaces, + NSWindowCollectionBehaviorDefault, NSWindowCollectionBehaviorFullScreenAllowsTiling, + NSWindowCollectionBehaviorFullScreenAuxiliary, + NSWindowCollectionBehaviorFullScreenDisallowsTiling, NSWindowCollectionBehaviorFullScreenNone, + NSWindowCollectionBehaviorFullScreenPrimary, NSWindowCollectionBehaviorIgnoresCycle, + NSWindowCollectionBehaviorManaged, NSWindowCollectionBehaviorMoveToActiveSpace, + NSWindowCollectionBehaviorParticipatesInCycle, NSWindowCollectionBehaviorStationary, + NSWindowCollectionBehaviorTransient, NSWindowDelegate, NSWindowDidBecomeKeyNotification, + NSWindowDidBecomeMainNotification, NSWindowDidChangeBackingPropertiesNotification, + NSWindowDidChangeOcclusionStateNotification, NSWindowDidChangeScreenNotification, + NSWindowDidChangeScreenProfileNotification, NSWindowDidDeminiaturizeNotification, + NSWindowDidEndLiveResizeNotification, NSWindowDidEndSheetNotification, + NSWindowDidEnterFullScreenNotification, NSWindowDidEnterVersionBrowserNotification, + NSWindowDidExitFullScreenNotification, NSWindowDidExitVersionBrowserNotification, + NSWindowDidExposeNotification, NSWindowDidMiniaturizeNotification, NSWindowDidMoveNotification, + NSWindowDidResignKeyNotification, NSWindowDidResignMainNotification, + NSWindowDidResizeNotification, NSWindowDidUpdateNotification, NSWindowDocumentIconButton, + NSWindowDocumentVersionsButton, NSWindowFrameAutosaveName, NSWindowFullScreenButton, + NSWindowLevel, NSWindowMiniaturizeButton, NSWindowNumberListAllApplications, + NSWindowNumberListAllSpaces, NSWindowNumberListOptions, NSWindowOcclusionState, + NSWindowOcclusionStateVisible, NSWindowPersistableFrameDescriptor, NSWindowSharingNone, + NSWindowSharingReadOnly, NSWindowSharingReadWrite, NSWindowSharingType, NSWindowStyleMask, + NSWindowStyleMaskBorderless, NSWindowStyleMaskClosable, NSWindowStyleMaskDocModalWindow, + NSWindowStyleMaskFullScreen, NSWindowStyleMaskFullSizeContentView, NSWindowStyleMaskHUDWindow, + NSWindowStyleMaskMiniaturizable, NSWindowStyleMaskNonactivatingPanel, + NSWindowStyleMaskResizable, NSWindowStyleMaskTexturedBackground, NSWindowStyleMaskTitled, + NSWindowStyleMaskUnifiedTitleAndToolbar, NSWindowStyleMaskUtilityWindow, + NSWindowTabbingIdentifier, NSWindowTabbingMode, NSWindowTabbingModeAutomatic, + NSWindowTabbingModeDisallowed, NSWindowTabbingModePreferred, NSWindowTitleHidden, + NSWindowTitleVisibility, NSWindowTitleVisible, NSWindowToolbarButton, NSWindowToolbarStyle, + NSWindowToolbarStyleAutomatic, NSWindowToolbarStyleExpanded, NSWindowToolbarStylePreference, + NSWindowToolbarStyleUnified, NSWindowToolbarStyleUnifiedCompact, NSWindowUserTabbingPreference, + NSWindowUserTabbingPreferenceAlways, NSWindowUserTabbingPreferenceInFullScreen, + NSWindowUserTabbingPreferenceManual, NSWindowWillBeginSheetNotification, + NSWindowWillCloseNotification, NSWindowWillEnterFullScreenNotification, + NSWindowWillEnterVersionBrowserNotification, NSWindowWillExitFullScreenNotification, + NSWindowWillExitVersionBrowserNotification, NSWindowWillMiniaturizeNotification, + NSWindowWillMoveNotification, NSWindowWillStartLiveResizeNotification, NSWindowZoomButton, +}; +pub use self::__NSWindowController::NSWindowController; +pub use self::__NSWindowRestoration::{ + NSApplicationDidFinishRestoringWindowsNotification, NSWindowRestoration, +}; +pub use self::__NSWindowTab::NSWindowTab; +pub use self::__NSWindowTabGroup::NSWindowTabGroup; +pub use self::__NSWorkspace::{ + NSApplicationFileType, NSDirectoryFileType, NSExclude10_4ElementsIconCreationOption, + NSExcludeQuickDrawElementsIconCreationOption, NSFilesystemFileType, NSPlainFileType, + NSShellCommandFileType, NSWorkspace, NSWorkspaceActiveSpaceDidChangeNotification, + NSWorkspaceApplicationKey, NSWorkspaceAuthorization, NSWorkspaceAuthorizationType, + NSWorkspaceAuthorizationTypeCreateSymbolicLink, NSWorkspaceAuthorizationTypeReplaceFile, + NSWorkspaceAuthorizationTypeSetAttributes, NSWorkspaceCompressOperation, + NSWorkspaceCopyOperation, NSWorkspaceDecompressOperation, NSWorkspaceDecryptOperation, + NSWorkspaceDesktopImageAllowClippingKey, NSWorkspaceDesktopImageFillColorKey, + NSWorkspaceDesktopImageOptionKey, NSWorkspaceDesktopImageScalingKey, + NSWorkspaceDestroyOperation, NSWorkspaceDidActivateApplicationNotification, + NSWorkspaceDidChangeFileLabelsNotification, NSWorkspaceDidDeactivateApplicationNotification, + NSWorkspaceDidHideApplicationNotification, NSWorkspaceDidLaunchApplicationNotification, + NSWorkspaceDidMountNotification, NSWorkspaceDidPerformFileOperationNotification, + NSWorkspaceDidRenameVolumeNotification, NSWorkspaceDidTerminateApplicationNotification, + NSWorkspaceDidUnhideApplicationNotification, NSWorkspaceDidUnmountNotification, + NSWorkspaceDidWakeNotification, NSWorkspaceDuplicateOperation, NSWorkspaceEncryptOperation, + NSWorkspaceFileOperationName, NSWorkspaceIconCreationOptions, + NSWorkspaceLaunchAllowingClassicStartup, NSWorkspaceLaunchAndHide, + NSWorkspaceLaunchAndHideOthers, NSWorkspaceLaunchAndPrint, NSWorkspaceLaunchAsync, + NSWorkspaceLaunchConfigurationAppleEvent, NSWorkspaceLaunchConfigurationArchitecture, + NSWorkspaceLaunchConfigurationArguments, NSWorkspaceLaunchConfigurationEnvironment, + NSWorkspaceLaunchConfigurationKey, NSWorkspaceLaunchDefault, + NSWorkspaceLaunchInhibitingBackgroundOnly, NSWorkspaceLaunchNewInstance, + NSWorkspaceLaunchOptions, NSWorkspaceLaunchPreferringClassic, + NSWorkspaceLaunchWithErrorPresentation, NSWorkspaceLaunchWithoutActivation, + NSWorkspaceLaunchWithoutAddingToRecents, NSWorkspaceLinkOperation, NSWorkspaceMoveOperation, + NSWorkspaceOpenConfiguration, NSWorkspaceRecycleOperation, + NSWorkspaceScreensDidSleepNotification, NSWorkspaceScreensDidWakeNotification, + NSWorkspaceSessionDidBecomeActiveNotification, NSWorkspaceSessionDidResignActiveNotification, + NSWorkspaceVolumeLocalizedNameKey, NSWorkspaceVolumeOldLocalizedNameKey, + NSWorkspaceVolumeOldURLKey, NSWorkspaceVolumeURLKey, + NSWorkspaceWillLaunchApplicationNotification, NSWorkspaceWillPowerOffNotification, + NSWorkspaceWillSleepNotification, NSWorkspaceWillUnmountNotification, +}; diff --git a/crates/icrate/src/generated/CoreData/mod.rs b/crates/icrate/src/generated/CoreData/mod.rs index bd6bfd7a5..ac0f1dca6 100644 --- a/crates/icrate/src/generated/CoreData/mod.rs +++ b/crates/icrate/src/generated/CoreData/mod.rs @@ -1,247 +1,287 @@ -pub(crate) mod CoreDataDefines; -pub(crate) mod CoreDataErrors; -pub(crate) mod NSAtomicStore; -pub(crate) mod NSAtomicStoreCacheNode; -pub(crate) mod NSAttributeDescription; -pub(crate) mod NSBatchDeleteRequest; -pub(crate) mod NSBatchInsertRequest; -pub(crate) mod NSBatchUpdateRequest; -pub(crate) mod NSCoreDataCoreSpotlightDelegate; -pub(crate) mod NSDerivedAttributeDescription; -pub(crate) mod NSEntityDescription; -pub(crate) mod NSEntityMapping; -pub(crate) mod NSEntityMigrationPolicy; -pub(crate) mod NSExpressionDescription; -pub(crate) mod NSFetchIndexDescription; -pub(crate) mod NSFetchIndexElementDescription; -pub(crate) mod NSFetchRequest; -pub(crate) mod NSFetchRequestExpression; -pub(crate) mod NSFetchedPropertyDescription; -pub(crate) mod NSFetchedResultsController; -pub(crate) mod NSIncrementalStore; -pub(crate) mod NSIncrementalStoreNode; -pub(crate) mod NSManagedObject; -pub(crate) mod NSManagedObjectContext; -pub(crate) mod NSManagedObjectID; -pub(crate) mod NSManagedObjectModel; -pub(crate) mod NSMappingModel; -pub(crate) mod NSMergePolicy; -pub(crate) mod NSMigrationManager; -pub(crate) mod NSPersistentCloudKitContainer; -pub(crate) mod NSPersistentCloudKitContainerEvent; -pub(crate) mod NSPersistentCloudKitContainerEventRequest; -pub(crate) mod NSPersistentCloudKitContainerOptions; -pub(crate) mod NSPersistentContainer; -pub(crate) mod NSPersistentHistoryChange; -pub(crate) mod NSPersistentHistoryChangeRequest; -pub(crate) mod NSPersistentHistoryToken; -pub(crate) mod NSPersistentHistoryTransaction; -pub(crate) mod NSPersistentStore; -pub(crate) mod NSPersistentStoreCoordinator; -pub(crate) mod NSPersistentStoreDescription; -pub(crate) mod NSPersistentStoreRequest; -pub(crate) mod NSPersistentStoreResult; -pub(crate) mod NSPropertyDescription; -pub(crate) mod NSPropertyMapping; -pub(crate) mod NSQueryGenerationToken; -pub(crate) mod NSRelationshipDescription; -pub(crate) mod NSSaveChangesRequest; +#[path = "CoreDataDefines.rs"] +mod __CoreDataDefines; +#[path = "CoreDataErrors.rs"] +mod __CoreDataErrors; +#[path = "NSAtomicStore.rs"] +mod __NSAtomicStore; +#[path = "NSAtomicStoreCacheNode.rs"] +mod __NSAtomicStoreCacheNode; +#[path = "NSAttributeDescription.rs"] +mod __NSAttributeDescription; +#[path = "NSBatchDeleteRequest.rs"] +mod __NSBatchDeleteRequest; +#[path = "NSBatchInsertRequest.rs"] +mod __NSBatchInsertRequest; +#[path = "NSBatchUpdateRequest.rs"] +mod __NSBatchUpdateRequest; +#[path = "NSCoreDataCoreSpotlightDelegate.rs"] +mod __NSCoreDataCoreSpotlightDelegate; +#[path = "NSDerivedAttributeDescription.rs"] +mod __NSDerivedAttributeDescription; +#[path = "NSEntityDescription.rs"] +mod __NSEntityDescription; +#[path = "NSEntityMapping.rs"] +mod __NSEntityMapping; +#[path = "NSEntityMigrationPolicy.rs"] +mod __NSEntityMigrationPolicy; +#[path = "NSExpressionDescription.rs"] +mod __NSExpressionDescription; +#[path = "NSFetchIndexDescription.rs"] +mod __NSFetchIndexDescription; +#[path = "NSFetchIndexElementDescription.rs"] +mod __NSFetchIndexElementDescription; +#[path = "NSFetchRequest.rs"] +mod __NSFetchRequest; +#[path = "NSFetchRequestExpression.rs"] +mod __NSFetchRequestExpression; +#[path = "NSFetchedPropertyDescription.rs"] +mod __NSFetchedPropertyDescription; +#[path = "NSFetchedResultsController.rs"] +mod __NSFetchedResultsController; +#[path = "NSIncrementalStore.rs"] +mod __NSIncrementalStore; +#[path = "NSIncrementalStoreNode.rs"] +mod __NSIncrementalStoreNode; +#[path = "NSManagedObject.rs"] +mod __NSManagedObject; +#[path = "NSManagedObjectContext.rs"] +mod __NSManagedObjectContext; +#[path = "NSManagedObjectID.rs"] +mod __NSManagedObjectID; +#[path = "NSManagedObjectModel.rs"] +mod __NSManagedObjectModel; +#[path = "NSMappingModel.rs"] +mod __NSMappingModel; +#[path = "NSMergePolicy.rs"] +mod __NSMergePolicy; +#[path = "NSMigrationManager.rs"] +mod __NSMigrationManager; +#[path = "NSPersistentCloudKitContainer.rs"] +mod __NSPersistentCloudKitContainer; +#[path = "NSPersistentCloudKitContainerEvent.rs"] +mod __NSPersistentCloudKitContainerEvent; +#[path = "NSPersistentCloudKitContainerEventRequest.rs"] +mod __NSPersistentCloudKitContainerEventRequest; +#[path = "NSPersistentCloudKitContainerOptions.rs"] +mod __NSPersistentCloudKitContainerOptions; +#[path = "NSPersistentContainer.rs"] +mod __NSPersistentContainer; +#[path = "NSPersistentHistoryChange.rs"] +mod __NSPersistentHistoryChange; +#[path = "NSPersistentHistoryChangeRequest.rs"] +mod __NSPersistentHistoryChangeRequest; +#[path = "NSPersistentHistoryToken.rs"] +mod __NSPersistentHistoryToken; +#[path = "NSPersistentHistoryTransaction.rs"] +mod __NSPersistentHistoryTransaction; +#[path = "NSPersistentStore.rs"] +mod __NSPersistentStore; +#[path = "NSPersistentStoreCoordinator.rs"] +mod __NSPersistentStoreCoordinator; +#[path = "NSPersistentStoreDescription.rs"] +mod __NSPersistentStoreDescription; +#[path = "NSPersistentStoreRequest.rs"] +mod __NSPersistentStoreRequest; +#[path = "NSPersistentStoreResult.rs"] +mod __NSPersistentStoreResult; +#[path = "NSPropertyDescription.rs"] +mod __NSPropertyDescription; +#[path = "NSPropertyMapping.rs"] +mod __NSPropertyMapping; +#[path = "NSQueryGenerationToken.rs"] +mod __NSQueryGenerationToken; +#[path = "NSRelationshipDescription.rs"] +mod __NSRelationshipDescription; +#[path = "NSSaveChangesRequest.rs"] +mod __NSSaveChangesRequest; -mod __exported { - pub use super::CoreDataDefines::NSCoreDataVersionNumber; - pub use super::CoreDataErrors::{ - NSAffectedObjectsErrorKey, NSAffectedStoresErrorKey, NSCoreDataError, NSDetailedErrorsKey, - NSEntityMigrationPolicyError, NSExternalRecordImportError, NSInferredMappingModelError, - NSManagedObjectConstraintMergeError, NSManagedObjectConstraintValidationError, - NSManagedObjectContextLockingError, NSManagedObjectExternalRelationshipError, - NSManagedObjectMergeError, NSManagedObjectReferentialIntegrityError, - NSManagedObjectValidationError, NSMigrationCancelledError, - NSMigrationConstraintViolationError, NSMigrationError, - NSMigrationManagerDestinationStoreError, NSMigrationManagerSourceStoreError, - NSMigrationMissingMappingModelError, NSMigrationMissingSourceModelError, - NSPersistentHistoryTokenExpiredError, NSPersistentStoreCoordinatorLockingError, - NSPersistentStoreIncompatibleSchemaError, NSPersistentStoreIncompatibleVersionHashError, - NSPersistentStoreIncompleteSaveError, NSPersistentStoreInvalidTypeError, - NSPersistentStoreOpenError, NSPersistentStoreOperationError, - NSPersistentStoreSaveConflictsError, NSPersistentStoreSaveConflictsErrorKey, - NSPersistentStoreSaveError, NSPersistentStoreTimeoutError, - NSPersistentStoreTypeMismatchError, NSPersistentStoreUnsupportedRequestTypeError, - NSSQLiteError, NSSQLiteErrorDomain, NSValidationDateTooLateError, - NSValidationDateTooSoonError, NSValidationInvalidDateError, NSValidationInvalidURIError, - NSValidationKeyErrorKey, NSValidationMissingMandatoryPropertyError, - NSValidationMultipleErrorsError, NSValidationNumberTooLargeError, - NSValidationNumberTooSmallError, NSValidationObjectErrorKey, NSValidationPredicateErrorKey, - NSValidationRelationshipDeniedDeleteError, - NSValidationRelationshipExceedsMaximumCountError, - NSValidationRelationshipLacksMinimumCountError, NSValidationStringPatternMatchingError, - NSValidationStringTooLongError, NSValidationStringTooShortError, NSValidationValueErrorKey, - }; - pub use super::NSAtomicStore::NSAtomicStore; - pub use super::NSAtomicStoreCacheNode::NSAtomicStoreCacheNode; - pub use super::NSAttributeDescription::{ - NSAttributeDescription, NSAttributeType, NSBinaryDataAttributeType, NSBooleanAttributeType, - NSDateAttributeType, NSDecimalAttributeType, NSDoubleAttributeType, NSFloatAttributeType, - NSInteger16AttributeType, NSInteger32AttributeType, NSInteger64AttributeType, - NSObjectIDAttributeType, NSStringAttributeType, NSTransformableAttributeType, - NSURIAttributeType, NSUUIDAttributeType, NSUndefinedAttributeType, - }; - pub use super::NSBatchDeleteRequest::NSBatchDeleteRequest; - pub use super::NSBatchInsertRequest::NSBatchInsertRequest; - pub use super::NSBatchUpdateRequest::NSBatchUpdateRequest; - pub use super::NSCoreDataCoreSpotlightDelegate::{ - NSCoreDataCoreSpotlightDelegate, NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification, - }; - pub use super::NSDerivedAttributeDescription::NSDerivedAttributeDescription; - pub use super::NSEntityDescription::NSEntityDescription; - pub use super::NSEntityMapping::{ - NSAddEntityMappingType, NSCopyEntityMappingType, NSCustomEntityMappingType, - NSEntityMapping, NSEntityMappingType, NSRemoveEntityMappingType, - NSTransformEntityMappingType, NSUndefinedEntityMappingType, - }; - pub use super::NSEntityMigrationPolicy::{ - NSEntityMigrationPolicy, NSMigrationDestinationObjectKey, NSMigrationEntityMappingKey, - NSMigrationEntityPolicyKey, NSMigrationManagerKey, NSMigrationPropertyMappingKey, - NSMigrationSourceObjectKey, - }; - pub use super::NSExpressionDescription::NSExpressionDescription; - pub use super::NSFetchIndexDescription::NSFetchIndexDescription; - pub use super::NSFetchIndexElementDescription::{ - NSFetchIndexElementDescription, NSFetchIndexElementType, NSFetchIndexElementTypeBinary, - NSFetchIndexElementTypeRTree, - }; - pub use super::NSFetchRequest::{ - NSAsynchronousFetchRequest, NSCountResultType, NSDictionaryResultType, NSFetchRequest, - NSFetchRequestResult, NSFetchRequestResultType, NSManagedObjectIDResultType, - NSManagedObjectResultType, NSPersistentStoreAsynchronousFetchResultCompletionBlock, - }; - pub use super::NSFetchRequestExpression::{ - NSFetchRequestExpression, NSFetchRequestExpressionType, - }; - pub use super::NSFetchedPropertyDescription::NSFetchedPropertyDescription; - pub use super::NSFetchedResultsController::{ - NSFetchedResultsChangeDelete, NSFetchedResultsChangeInsert, NSFetchedResultsChangeMove, - NSFetchedResultsChangeType, NSFetchedResultsChangeUpdate, NSFetchedResultsController, - NSFetchedResultsControllerDelegate, NSFetchedResultsSectionInfo, - }; - pub use super::NSIncrementalStore::NSIncrementalStore; - pub use super::NSIncrementalStoreNode::NSIncrementalStoreNode; - pub use super::NSManagedObject::{ - NSManagedObject, NSSnapshotEventMergePolicy, NSSnapshotEventRefresh, - NSSnapshotEventRollback, NSSnapshotEventType, NSSnapshotEventUndoDeletion, - NSSnapshotEventUndoInsertion, NSSnapshotEventUndoUpdate, - }; - pub use super::NSManagedObjectContext::{ - NSConfinementConcurrencyType, NSDeletedObjectIDsKey, NSDeletedObjectsKey, - NSErrorMergePolicy, NSInsertedObjectIDsKey, NSInsertedObjectsKey, - NSInvalidatedAllObjectsKey, NSInvalidatedObjectIDsKey, NSInvalidatedObjectsKey, - NSMainQueueConcurrencyType, NSManagedObjectContext, NSManagedObjectContextConcurrencyType, - NSManagedObjectContextDidMergeChangesObjectIDsNotification, - NSManagedObjectContextDidSaveNotification, - NSManagedObjectContextDidSaveObjectIDsNotification, - NSManagedObjectContextObjectsDidChangeNotification, - NSManagedObjectContextQueryGenerationKey, NSManagedObjectContextWillSaveNotification, - NSMergeByPropertyObjectTrumpMergePolicy, NSMergeByPropertyStoreTrumpMergePolicy, - NSOverwriteMergePolicy, NSPrivateQueueConcurrencyType, NSRefreshedObjectIDsKey, - NSRefreshedObjectsKey, NSRollbackMergePolicy, NSUpdatedObjectIDsKey, NSUpdatedObjectsKey, - }; - pub use super::NSManagedObjectID::NSManagedObjectID; - pub use super::NSManagedObjectModel::NSManagedObjectModel; - pub use super::NSMappingModel::NSMappingModel; - pub use super::NSMergePolicy::{ - NSConstraintConflict, NSErrorMergePolicy, NSErrorMergePolicyType, - NSMergeByPropertyObjectTrumpMergePolicy, NSMergeByPropertyObjectTrumpMergePolicyType, - NSMergeByPropertyStoreTrumpMergePolicy, NSMergeByPropertyStoreTrumpMergePolicyType, - NSMergeConflict, NSMergePolicy, NSMergePolicyType, NSOverwriteMergePolicy, - NSOverwriteMergePolicyType, NSRollbackMergePolicy, NSRollbackMergePolicyType, - }; - pub use super::NSMigrationManager::NSMigrationManager; - pub use super::NSPersistentCloudKitContainer::{ - NSPersistentCloudKitContainer, NSPersistentCloudKitContainerSchemaInitializationOptions, - NSPersistentCloudKitContainerSchemaInitializationOptionsDryRun, - NSPersistentCloudKitContainerSchemaInitializationOptionsNone, - NSPersistentCloudKitContainerSchemaInitializationOptionsPrintSchema, - }; - pub use super::NSPersistentCloudKitContainerEvent::{ - NSPersistentCloudKitContainerEvent, NSPersistentCloudKitContainerEventChangedNotification, - NSPersistentCloudKitContainerEventType, NSPersistentCloudKitContainerEventTypeExport, - NSPersistentCloudKitContainerEventTypeImport, NSPersistentCloudKitContainerEventTypeSetup, - NSPersistentCloudKitContainerEventUserInfoKey, - }; - pub use super::NSPersistentCloudKitContainerEventRequest::NSPersistentCloudKitContainerEventRequest; - pub use super::NSPersistentCloudKitContainerOptions::NSPersistentCloudKitContainerOptions; - pub use super::NSPersistentContainer::NSPersistentContainer; - pub use super::NSPersistentHistoryChange::{ - NSPersistentHistoryChange, NSPersistentHistoryChangeType, - NSPersistentHistoryChangeTypeDelete, NSPersistentHistoryChangeTypeInsert, - NSPersistentHistoryChangeTypeUpdate, - }; - pub use super::NSPersistentHistoryChangeRequest::NSPersistentHistoryChangeRequest; - pub use super::NSPersistentHistoryToken::NSPersistentHistoryToken; - pub use super::NSPersistentHistoryTransaction::NSPersistentHistoryTransaction; - pub use super::NSPersistentStore::NSPersistentStore; - pub use super::NSPersistentStoreCoordinator::{ - NSAddedPersistentStoresKey, NSBinaryExternalRecordType, - NSBinaryStoreInsecureDecodingCompatibilityOption, NSBinaryStoreSecureDecodingClasses, - NSBinaryStoreType, NSCoreDataCoreSpotlightExporter, NSEntityNameInPathKey, - NSExternalRecordExtensionOption, NSExternalRecordsDirectoryOption, - NSExternalRecordsFileFormatOption, NSIgnorePersistentStoreVersioningOption, - NSInMemoryStoreType, NSInferMappingModelAutomaticallyOption, - NSMigratePersistentStoresAutomaticallyOption, NSModelPathKey, NSObjectURIKey, - NSPersistentHistoryTokenKey, NSPersistentHistoryTrackingKey, - NSPersistentStoreConnectionPoolMaxSizeKey, NSPersistentStoreCoordinator, - NSPersistentStoreCoordinatorStoresDidChangeNotification, - NSPersistentStoreCoordinatorStoresWillChangeNotification, - NSPersistentStoreCoordinatorWillRemoveStoreNotification, - NSPersistentStoreDidImportUbiquitousContentChangesNotification, - NSPersistentStoreFileProtectionKey, NSPersistentStoreForceDestroyOption, - NSPersistentStoreOSCompatibility, NSPersistentStoreRebuildFromUbiquitousContentOption, - NSPersistentStoreRemoteChangeNotification, - NSPersistentStoreRemoteChangeNotificationPostOptionKey, - NSPersistentStoreRemoveUbiquitousMetadataOption, NSPersistentStoreTimeoutOption, - NSPersistentStoreURLKey, NSPersistentStoreUbiquitousContainerIdentifierKey, - NSPersistentStoreUbiquitousContentNameKey, NSPersistentStoreUbiquitousContentURLKey, - NSPersistentStoreUbiquitousPeerTokenOption, NSPersistentStoreUbiquitousTransitionType, - NSPersistentStoreUbiquitousTransitionTypeAccountAdded, - NSPersistentStoreUbiquitousTransitionTypeAccountRemoved, - NSPersistentStoreUbiquitousTransitionTypeContentRemoved, - NSPersistentStoreUbiquitousTransitionTypeInitialImportCompleted, - NSPersistentStoreUbiquitousTransitionTypeKey, NSReadOnlyPersistentStoreOption, - NSRemovedPersistentStoresKey, NSSQLiteAnalyzeOption, NSSQLiteManualVacuumOption, - NSSQLitePragmasOption, NSSQLiteStoreType, NSStoreModelVersionHashesKey, - NSStoreModelVersionIdentifiersKey, NSStorePathKey, NSStoreTypeKey, NSStoreUUIDInPathKey, - NSStoreUUIDKey, NSUUIDChangedPersistentStoresKey, NSValidateXMLStoreOption, - NSXMLExternalRecordType, NSXMLStoreType, - }; - pub use super::NSPersistentStoreDescription::NSPersistentStoreDescription; - pub use super::NSPersistentStoreRequest::{ - NSBatchDeleteRequestType, NSBatchInsertRequestType, NSBatchUpdateRequestType, - NSFetchRequestType, NSPersistentStoreRequest, NSPersistentStoreRequestType, - NSSaveRequestType, - }; - pub use super::NSPersistentStoreResult::{ - NSAsynchronousFetchResult, NSBatchDeleteRequestResultType, NSBatchDeleteResult, - NSBatchDeleteResultTypeCount, NSBatchDeleteResultTypeObjectIDs, - NSBatchDeleteResultTypeStatusOnly, NSBatchInsertRequestResultType, - NSBatchInsertRequestResultTypeCount, NSBatchInsertRequestResultTypeObjectIDs, - NSBatchInsertRequestResultTypeStatusOnly, NSBatchInsertResult, - NSBatchUpdateRequestResultType, NSBatchUpdateResult, - NSPersistentCloudKitContainerEventResult, NSPersistentCloudKitContainerEventResultType, - NSPersistentCloudKitContainerEventResultTypeCountEvents, - NSPersistentCloudKitContainerEventResultTypeEvents, NSPersistentHistoryResult, - NSPersistentHistoryResultType, NSPersistentHistoryResultTypeChangesOnly, - NSPersistentHistoryResultTypeCount, NSPersistentHistoryResultTypeObjectIDs, - NSPersistentHistoryResultTypeStatusOnly, - NSPersistentHistoryResultTypeTransactionsAndChanges, - NSPersistentHistoryResultTypeTransactionsOnly, NSPersistentStoreAsynchronousResult, - NSPersistentStoreResult, NSStatusOnlyResultType, NSUpdatedObjectIDsResultType, - NSUpdatedObjectsCountResultType, - }; - pub use super::NSPropertyDescription::NSPropertyDescription; - pub use super::NSPropertyMapping::NSPropertyMapping; - pub use super::NSQueryGenerationToken::NSQueryGenerationToken; - pub use super::NSRelationshipDescription::{ - NSCascadeDeleteRule, NSDeleteRule, NSDenyDeleteRule, NSNoActionDeleteRule, - NSNullifyDeleteRule, NSRelationshipDescription, - }; - pub use super::NSSaveChangesRequest::NSSaveChangesRequest; -} +pub use self::__CoreDataDefines::NSCoreDataVersionNumber; +pub use self::__CoreDataErrors::{ + NSAffectedObjectsErrorKey, NSAffectedStoresErrorKey, NSCoreDataError, NSDetailedErrorsKey, + NSEntityMigrationPolicyError, NSExternalRecordImportError, NSInferredMappingModelError, + NSManagedObjectConstraintMergeError, NSManagedObjectConstraintValidationError, + NSManagedObjectContextLockingError, NSManagedObjectExternalRelationshipError, + NSManagedObjectMergeError, NSManagedObjectReferentialIntegrityError, + NSManagedObjectValidationError, NSMigrationCancelledError, NSMigrationConstraintViolationError, + NSMigrationError, NSMigrationManagerDestinationStoreError, NSMigrationManagerSourceStoreError, + NSMigrationMissingMappingModelError, NSMigrationMissingSourceModelError, + NSPersistentHistoryTokenExpiredError, NSPersistentStoreCoordinatorLockingError, + NSPersistentStoreIncompatibleSchemaError, NSPersistentStoreIncompatibleVersionHashError, + NSPersistentStoreIncompleteSaveError, NSPersistentStoreInvalidTypeError, + NSPersistentStoreOpenError, NSPersistentStoreOperationError, + NSPersistentStoreSaveConflictsError, NSPersistentStoreSaveConflictsErrorKey, + NSPersistentStoreSaveError, NSPersistentStoreTimeoutError, NSPersistentStoreTypeMismatchError, + NSPersistentStoreUnsupportedRequestTypeError, NSSQLiteError, NSSQLiteErrorDomain, + NSValidationDateTooLateError, NSValidationDateTooSoonError, NSValidationInvalidDateError, + NSValidationInvalidURIError, NSValidationKeyErrorKey, + NSValidationMissingMandatoryPropertyError, NSValidationMultipleErrorsError, + NSValidationNumberTooLargeError, NSValidationNumberTooSmallError, NSValidationObjectErrorKey, + NSValidationPredicateErrorKey, NSValidationRelationshipDeniedDeleteError, + NSValidationRelationshipExceedsMaximumCountError, + NSValidationRelationshipLacksMinimumCountError, NSValidationStringPatternMatchingError, + NSValidationStringTooLongError, NSValidationStringTooShortError, NSValidationValueErrorKey, +}; +pub use self::__NSAtomicStore::NSAtomicStore; +pub use self::__NSAtomicStoreCacheNode::NSAtomicStoreCacheNode; +pub use self::__NSAttributeDescription::{ + NSAttributeDescription, NSAttributeType, NSBinaryDataAttributeType, NSBooleanAttributeType, + NSDateAttributeType, NSDecimalAttributeType, NSDoubleAttributeType, NSFloatAttributeType, + NSInteger16AttributeType, NSInteger32AttributeType, NSInteger64AttributeType, + NSObjectIDAttributeType, NSStringAttributeType, NSTransformableAttributeType, + NSURIAttributeType, NSUUIDAttributeType, NSUndefinedAttributeType, +}; +pub use self::__NSBatchDeleteRequest::NSBatchDeleteRequest; +pub use self::__NSBatchInsertRequest::NSBatchInsertRequest; +pub use self::__NSBatchUpdateRequest::NSBatchUpdateRequest; +pub use self::__NSCoreDataCoreSpotlightDelegate::{ + NSCoreDataCoreSpotlightDelegate, NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification, +}; +pub use self::__NSDerivedAttributeDescription::NSDerivedAttributeDescription; +pub use self::__NSEntityDescription::NSEntityDescription; +pub use self::__NSEntityMapping::{ + NSAddEntityMappingType, NSCopyEntityMappingType, NSCustomEntityMappingType, NSEntityMapping, + NSEntityMappingType, NSRemoveEntityMappingType, NSTransformEntityMappingType, + NSUndefinedEntityMappingType, +}; +pub use self::__NSEntityMigrationPolicy::{ + NSEntityMigrationPolicy, NSMigrationDestinationObjectKey, NSMigrationEntityMappingKey, + NSMigrationEntityPolicyKey, NSMigrationManagerKey, NSMigrationPropertyMappingKey, + NSMigrationSourceObjectKey, +}; +pub use self::__NSExpressionDescription::NSExpressionDescription; +pub use self::__NSFetchIndexDescription::NSFetchIndexDescription; +pub use self::__NSFetchIndexElementDescription::{ + NSFetchIndexElementDescription, NSFetchIndexElementType, NSFetchIndexElementTypeBinary, + NSFetchIndexElementTypeRTree, +}; +pub use self::__NSFetchRequest::{ + NSAsynchronousFetchRequest, NSCountResultType, NSDictionaryResultType, NSFetchRequest, + NSFetchRequestResult, NSFetchRequestResultType, NSManagedObjectIDResultType, + NSManagedObjectResultType, NSPersistentStoreAsynchronousFetchResultCompletionBlock, +}; +pub use self::__NSFetchRequestExpression::{ + NSFetchRequestExpression, NSFetchRequestExpressionType, +}; +pub use self::__NSFetchedPropertyDescription::NSFetchedPropertyDescription; +pub use self::__NSFetchedResultsController::{ + NSFetchedResultsChangeDelete, NSFetchedResultsChangeInsert, NSFetchedResultsChangeMove, + NSFetchedResultsChangeType, NSFetchedResultsChangeUpdate, NSFetchedResultsController, + NSFetchedResultsControllerDelegate, NSFetchedResultsSectionInfo, +}; +pub use self::__NSIncrementalStore::NSIncrementalStore; +pub use self::__NSIncrementalStoreNode::NSIncrementalStoreNode; +pub use self::__NSManagedObject::{ + NSManagedObject, NSSnapshotEventMergePolicy, NSSnapshotEventRefresh, NSSnapshotEventRollback, + NSSnapshotEventType, NSSnapshotEventUndoDeletion, NSSnapshotEventUndoInsertion, + NSSnapshotEventUndoUpdate, +}; +pub use self::__NSManagedObjectContext::{ + NSConfinementConcurrencyType, NSDeletedObjectIDsKey, NSDeletedObjectsKey, NSErrorMergePolicy, + NSInsertedObjectIDsKey, NSInsertedObjectsKey, NSInvalidatedAllObjectsKey, + NSInvalidatedObjectIDsKey, NSInvalidatedObjectsKey, NSMainQueueConcurrencyType, + NSManagedObjectContext, NSManagedObjectContextConcurrencyType, + NSManagedObjectContextDidMergeChangesObjectIDsNotification, + NSManagedObjectContextDidSaveNotification, NSManagedObjectContextDidSaveObjectIDsNotification, + NSManagedObjectContextObjectsDidChangeNotification, NSManagedObjectContextQueryGenerationKey, + NSManagedObjectContextWillSaveNotification, NSMergeByPropertyObjectTrumpMergePolicy, + NSMergeByPropertyStoreTrumpMergePolicy, NSOverwriteMergePolicy, NSPrivateQueueConcurrencyType, + NSRefreshedObjectIDsKey, NSRefreshedObjectsKey, NSRollbackMergePolicy, NSUpdatedObjectIDsKey, + NSUpdatedObjectsKey, +}; +pub use self::__NSManagedObjectID::NSManagedObjectID; +pub use self::__NSManagedObjectModel::NSManagedObjectModel; +pub use self::__NSMappingModel::NSMappingModel; +pub use self::__NSMergePolicy::{ + NSConstraintConflict, NSErrorMergePolicy, NSErrorMergePolicyType, + NSMergeByPropertyObjectTrumpMergePolicy, NSMergeByPropertyObjectTrumpMergePolicyType, + NSMergeByPropertyStoreTrumpMergePolicy, NSMergeByPropertyStoreTrumpMergePolicyType, + NSMergeConflict, NSMergePolicy, NSMergePolicyType, NSOverwriteMergePolicy, + NSOverwriteMergePolicyType, NSRollbackMergePolicy, NSRollbackMergePolicyType, +}; +pub use self::__NSMigrationManager::NSMigrationManager; +pub use self::__NSPersistentCloudKitContainer::{ + NSPersistentCloudKitContainer, NSPersistentCloudKitContainerSchemaInitializationOptions, + NSPersistentCloudKitContainerSchemaInitializationOptionsDryRun, + NSPersistentCloudKitContainerSchemaInitializationOptionsNone, + NSPersistentCloudKitContainerSchemaInitializationOptionsPrintSchema, +}; +pub use self::__NSPersistentCloudKitContainerEvent::{ + NSPersistentCloudKitContainerEvent, NSPersistentCloudKitContainerEventChangedNotification, + NSPersistentCloudKitContainerEventType, NSPersistentCloudKitContainerEventTypeExport, + NSPersistentCloudKitContainerEventTypeImport, NSPersistentCloudKitContainerEventTypeSetup, + NSPersistentCloudKitContainerEventUserInfoKey, +}; +pub use self::__NSPersistentCloudKitContainerEventRequest::NSPersistentCloudKitContainerEventRequest; +pub use self::__NSPersistentCloudKitContainerOptions::NSPersistentCloudKitContainerOptions; +pub use self::__NSPersistentContainer::NSPersistentContainer; +pub use self::__NSPersistentHistoryChange::{ + NSPersistentHistoryChange, NSPersistentHistoryChangeType, NSPersistentHistoryChangeTypeDelete, + NSPersistentHistoryChangeTypeInsert, NSPersistentHistoryChangeTypeUpdate, +}; +pub use self::__NSPersistentHistoryChangeRequest::NSPersistentHistoryChangeRequest; +pub use self::__NSPersistentHistoryToken::NSPersistentHistoryToken; +pub use self::__NSPersistentHistoryTransaction::NSPersistentHistoryTransaction; +pub use self::__NSPersistentStore::NSPersistentStore; +pub use self::__NSPersistentStoreCoordinator::{ + NSAddedPersistentStoresKey, NSBinaryExternalRecordType, + NSBinaryStoreInsecureDecodingCompatibilityOption, NSBinaryStoreSecureDecodingClasses, + NSBinaryStoreType, NSCoreDataCoreSpotlightExporter, NSEntityNameInPathKey, + NSExternalRecordExtensionOption, NSExternalRecordsDirectoryOption, + NSExternalRecordsFileFormatOption, NSIgnorePersistentStoreVersioningOption, + NSInMemoryStoreType, NSInferMappingModelAutomaticallyOption, + NSMigratePersistentStoresAutomaticallyOption, NSModelPathKey, NSObjectURIKey, + NSPersistentHistoryTokenKey, NSPersistentHistoryTrackingKey, + NSPersistentStoreConnectionPoolMaxSizeKey, NSPersistentStoreCoordinator, + NSPersistentStoreCoordinatorStoresDidChangeNotification, + NSPersistentStoreCoordinatorStoresWillChangeNotification, + NSPersistentStoreCoordinatorWillRemoveStoreNotification, + NSPersistentStoreDidImportUbiquitousContentChangesNotification, + NSPersistentStoreFileProtectionKey, NSPersistentStoreForceDestroyOption, + NSPersistentStoreOSCompatibility, NSPersistentStoreRebuildFromUbiquitousContentOption, + NSPersistentStoreRemoteChangeNotification, + NSPersistentStoreRemoteChangeNotificationPostOptionKey, + NSPersistentStoreRemoveUbiquitousMetadataOption, NSPersistentStoreTimeoutOption, + NSPersistentStoreURLKey, NSPersistentStoreUbiquitousContainerIdentifierKey, + NSPersistentStoreUbiquitousContentNameKey, NSPersistentStoreUbiquitousContentURLKey, + NSPersistentStoreUbiquitousPeerTokenOption, NSPersistentStoreUbiquitousTransitionType, + NSPersistentStoreUbiquitousTransitionTypeAccountAdded, + NSPersistentStoreUbiquitousTransitionTypeAccountRemoved, + NSPersistentStoreUbiquitousTransitionTypeContentRemoved, + NSPersistentStoreUbiquitousTransitionTypeInitialImportCompleted, + NSPersistentStoreUbiquitousTransitionTypeKey, NSReadOnlyPersistentStoreOption, + NSRemovedPersistentStoresKey, NSSQLiteAnalyzeOption, NSSQLiteManualVacuumOption, + NSSQLitePragmasOption, NSSQLiteStoreType, NSStoreModelVersionHashesKey, + NSStoreModelVersionIdentifiersKey, NSStorePathKey, NSStoreTypeKey, NSStoreUUIDInPathKey, + NSStoreUUIDKey, NSUUIDChangedPersistentStoresKey, NSValidateXMLStoreOption, + NSXMLExternalRecordType, NSXMLStoreType, +}; +pub use self::__NSPersistentStoreDescription::NSPersistentStoreDescription; +pub use self::__NSPersistentStoreRequest::{ + NSBatchDeleteRequestType, NSBatchInsertRequestType, NSBatchUpdateRequestType, + NSFetchRequestType, NSPersistentStoreRequest, NSPersistentStoreRequestType, NSSaveRequestType, +}; +pub use self::__NSPersistentStoreResult::{ + NSAsynchronousFetchResult, NSBatchDeleteRequestResultType, NSBatchDeleteResult, + NSBatchDeleteResultTypeCount, NSBatchDeleteResultTypeObjectIDs, + NSBatchDeleteResultTypeStatusOnly, NSBatchInsertRequestResultType, + NSBatchInsertRequestResultTypeCount, NSBatchInsertRequestResultTypeObjectIDs, + NSBatchInsertRequestResultTypeStatusOnly, NSBatchInsertResult, NSBatchUpdateRequestResultType, + NSBatchUpdateResult, NSPersistentCloudKitContainerEventResult, + NSPersistentCloudKitContainerEventResultType, + NSPersistentCloudKitContainerEventResultTypeCountEvents, + NSPersistentCloudKitContainerEventResultTypeEvents, NSPersistentHistoryResult, + NSPersistentHistoryResultType, NSPersistentHistoryResultTypeChangesOnly, + NSPersistentHistoryResultTypeCount, NSPersistentHistoryResultTypeObjectIDs, + NSPersistentHistoryResultTypeStatusOnly, NSPersistentHistoryResultTypeTransactionsAndChanges, + NSPersistentHistoryResultTypeTransactionsOnly, NSPersistentStoreAsynchronousResult, + NSPersistentStoreResult, NSStatusOnlyResultType, NSUpdatedObjectIDsResultType, + NSUpdatedObjectsCountResultType, +}; +pub use self::__NSPropertyDescription::NSPropertyDescription; +pub use self::__NSPropertyMapping::NSPropertyMapping; +pub use self::__NSQueryGenerationToken::NSQueryGenerationToken; +pub use self::__NSRelationshipDescription::{ + NSCascadeDeleteRule, NSDeleteRule, NSDenyDeleteRule, NSNoActionDeleteRule, NSNullifyDeleteRule, + NSRelationshipDescription, +}; +pub use self::__NSSaveChangesRequest::NSSaveChangesRequest; diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index 62b7f3ec5..b1ea6cda1 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -1,1413 +1,1528 @@ -pub(crate) mod FoundationErrors; -pub(crate) mod FoundationLegacySwiftCompatibility; -pub(crate) mod NSAffineTransform; -pub(crate) mod NSAppleEventDescriptor; -pub(crate) mod NSAppleEventManager; -pub(crate) mod NSAppleScript; -pub(crate) mod NSArchiver; -pub(crate) mod NSArray; -pub(crate) mod NSAttributedString; -pub(crate) mod NSAutoreleasePool; -pub(crate) mod NSBackgroundActivityScheduler; -pub(crate) mod NSBundle; -pub(crate) mod NSByteCountFormatter; -pub(crate) mod NSByteOrder; -pub(crate) mod NSCache; -pub(crate) mod NSCalendar; -pub(crate) mod NSCalendarDate; -pub(crate) mod NSCharacterSet; -pub(crate) mod NSClassDescription; -pub(crate) mod NSCoder; -pub(crate) mod NSComparisonPredicate; -pub(crate) mod NSCompoundPredicate; -pub(crate) mod NSConnection; -pub(crate) mod NSData; -pub(crate) mod NSDate; -pub(crate) mod NSDateComponentsFormatter; -pub(crate) mod NSDateFormatter; -pub(crate) mod NSDateInterval; -pub(crate) mod NSDateIntervalFormatter; -pub(crate) mod NSDecimal; -pub(crate) mod NSDecimalNumber; -pub(crate) mod NSDictionary; -pub(crate) mod NSDistantObject; -pub(crate) mod NSDistributedLock; -pub(crate) mod NSDistributedNotificationCenter; -pub(crate) mod NSEnergyFormatter; -pub(crate) mod NSEnumerator; -pub(crate) mod NSError; -pub(crate) mod NSException; -pub(crate) mod NSExpression; -pub(crate) mod NSExtensionContext; -pub(crate) mod NSExtensionItem; -pub(crate) mod NSExtensionRequestHandling; -pub(crate) mod NSFileCoordinator; -pub(crate) mod NSFileHandle; -pub(crate) mod NSFileManager; -pub(crate) mod NSFilePresenter; -pub(crate) mod NSFileVersion; -pub(crate) mod NSFileWrapper; -pub(crate) mod NSFormatter; -pub(crate) mod NSGarbageCollector; -pub(crate) mod NSGeometry; -pub(crate) mod NSHFSFileTypes; -pub(crate) mod NSHTTPCookie; -pub(crate) mod NSHTTPCookieStorage; -pub(crate) mod NSHashTable; -pub(crate) mod NSHost; -pub(crate) mod NSISO8601DateFormatter; -pub(crate) mod NSIndexPath; -pub(crate) mod NSIndexSet; -pub(crate) mod NSInflectionRule; -pub(crate) mod NSInvocation; -pub(crate) mod NSItemProvider; -pub(crate) mod NSJSONSerialization; -pub(crate) mod NSKeyValueCoding; -pub(crate) mod NSKeyValueObserving; -pub(crate) mod NSKeyedArchiver; -pub(crate) mod NSLengthFormatter; -pub(crate) mod NSLinguisticTagger; -pub(crate) mod NSListFormatter; -pub(crate) mod NSLocale; -pub(crate) mod NSLock; -pub(crate) mod NSMapTable; -pub(crate) mod NSMassFormatter; -pub(crate) mod NSMeasurement; -pub(crate) mod NSMeasurementFormatter; -pub(crate) mod NSMetadata; -pub(crate) mod NSMetadataAttributes; -pub(crate) mod NSMethodSignature; -pub(crate) mod NSMorphology; -pub(crate) mod NSNetServices; -pub(crate) mod NSNotification; -pub(crate) mod NSNotificationQueue; -pub(crate) mod NSNull; -pub(crate) mod NSNumberFormatter; -pub(crate) mod NSObjCRuntime; -pub(crate) mod NSObject; -pub(crate) mod NSObjectScripting; -pub(crate) mod NSOperation; -pub(crate) mod NSOrderedCollectionChange; -pub(crate) mod NSOrderedCollectionDifference; -pub(crate) mod NSOrderedSet; -pub(crate) mod NSOrthography; -pub(crate) mod NSPathUtilities; -pub(crate) mod NSPersonNameComponents; -pub(crate) mod NSPersonNameComponentsFormatter; -pub(crate) mod NSPointerArray; -pub(crate) mod NSPointerFunctions; -pub(crate) mod NSPort; -pub(crate) mod NSPortCoder; -pub(crate) mod NSPortMessage; -pub(crate) mod NSPortNameServer; -pub(crate) mod NSPredicate; -pub(crate) mod NSProcessInfo; -pub(crate) mod NSProgress; -pub(crate) mod NSPropertyList; -pub(crate) mod NSProtocolChecker; -pub(crate) mod NSProxy; -pub(crate) mod NSRange; -pub(crate) mod NSRegularExpression; -pub(crate) mod NSRelativeDateTimeFormatter; -pub(crate) mod NSRunLoop; -pub(crate) mod NSScanner; -pub(crate) mod NSScriptClassDescription; -pub(crate) mod NSScriptCoercionHandler; -pub(crate) mod NSScriptCommand; -pub(crate) mod NSScriptCommandDescription; -pub(crate) mod NSScriptExecutionContext; -pub(crate) mod NSScriptKeyValueCoding; -pub(crate) mod NSScriptObjectSpecifiers; -pub(crate) mod NSScriptStandardSuiteCommands; -pub(crate) mod NSScriptSuiteRegistry; -pub(crate) mod NSScriptWhoseTests; -pub(crate) mod NSSet; -pub(crate) mod NSSortDescriptor; -pub(crate) mod NSSpellServer; -pub(crate) mod NSStream; -pub(crate) mod NSString; -pub(crate) mod NSTask; -pub(crate) mod NSTextCheckingResult; -pub(crate) mod NSThread; -pub(crate) mod NSTimeZone; -pub(crate) mod NSTimer; -pub(crate) mod NSURL; -pub(crate) mod NSURLAuthenticationChallenge; -pub(crate) mod NSURLCache; -pub(crate) mod NSURLConnection; -pub(crate) mod NSURLCredential; -pub(crate) mod NSURLCredentialStorage; -pub(crate) mod NSURLDownload; -pub(crate) mod NSURLError; -pub(crate) mod NSURLHandle; -pub(crate) mod NSURLProtectionSpace; -pub(crate) mod NSURLProtocol; -pub(crate) mod NSURLRequest; -pub(crate) mod NSURLResponse; -pub(crate) mod NSURLSession; -pub(crate) mod NSUUID; -pub(crate) mod NSUbiquitousKeyValueStore; -pub(crate) mod NSUndoManager; -pub(crate) mod NSUnit; -pub(crate) mod NSUserActivity; -pub(crate) mod NSUserDefaults; -pub(crate) mod NSUserNotification; -pub(crate) mod NSUserScriptTask; -pub(crate) mod NSValue; -pub(crate) mod NSValueTransformer; -pub(crate) mod NSXMLDTD; -pub(crate) mod NSXMLDTDNode; -pub(crate) mod NSXMLDocument; -pub(crate) mod NSXMLElement; -pub(crate) mod NSXMLNode; -pub(crate) mod NSXMLNodeOptions; -pub(crate) mod NSXMLParser; -pub(crate) mod NSXPCConnection; -pub(crate) mod NSZone; +#[path = "FoundationErrors.rs"] +mod __FoundationErrors; +#[path = "FoundationLegacySwiftCompatibility.rs"] +mod __FoundationLegacySwiftCompatibility; +#[path = "NSAffineTransform.rs"] +mod __NSAffineTransform; +#[path = "NSAppleEventDescriptor.rs"] +mod __NSAppleEventDescriptor; +#[path = "NSAppleEventManager.rs"] +mod __NSAppleEventManager; +#[path = "NSAppleScript.rs"] +mod __NSAppleScript; +#[path = "NSArchiver.rs"] +mod __NSArchiver; +#[path = "NSArray.rs"] +mod __NSArray; +#[path = "NSAttributedString.rs"] +mod __NSAttributedString; +#[path = "NSAutoreleasePool.rs"] +mod __NSAutoreleasePool; +#[path = "NSBackgroundActivityScheduler.rs"] +mod __NSBackgroundActivityScheduler; +#[path = "NSBundle.rs"] +mod __NSBundle; +#[path = "NSByteCountFormatter.rs"] +mod __NSByteCountFormatter; +#[path = "NSByteOrder.rs"] +mod __NSByteOrder; +#[path = "NSCache.rs"] +mod __NSCache; +#[path = "NSCalendar.rs"] +mod __NSCalendar; +#[path = "NSCalendarDate.rs"] +mod __NSCalendarDate; +#[path = "NSCharacterSet.rs"] +mod __NSCharacterSet; +#[path = "NSClassDescription.rs"] +mod __NSClassDescription; +#[path = "NSCoder.rs"] +mod __NSCoder; +#[path = "NSComparisonPredicate.rs"] +mod __NSComparisonPredicate; +#[path = "NSCompoundPredicate.rs"] +mod __NSCompoundPredicate; +#[path = "NSConnection.rs"] +mod __NSConnection; +#[path = "NSData.rs"] +mod __NSData; +#[path = "NSDate.rs"] +mod __NSDate; +#[path = "NSDateComponentsFormatter.rs"] +mod __NSDateComponentsFormatter; +#[path = "NSDateFormatter.rs"] +mod __NSDateFormatter; +#[path = "NSDateInterval.rs"] +mod __NSDateInterval; +#[path = "NSDateIntervalFormatter.rs"] +mod __NSDateIntervalFormatter; +#[path = "NSDecimal.rs"] +mod __NSDecimal; +#[path = "NSDecimalNumber.rs"] +mod __NSDecimalNumber; +#[path = "NSDictionary.rs"] +mod __NSDictionary; +#[path = "NSDistantObject.rs"] +mod __NSDistantObject; +#[path = "NSDistributedLock.rs"] +mod __NSDistributedLock; +#[path = "NSDistributedNotificationCenter.rs"] +mod __NSDistributedNotificationCenter; +#[path = "NSEnergyFormatter.rs"] +mod __NSEnergyFormatter; +#[path = "NSEnumerator.rs"] +mod __NSEnumerator; +#[path = "NSError.rs"] +mod __NSError; +#[path = "NSException.rs"] +mod __NSException; +#[path = "NSExpression.rs"] +mod __NSExpression; +#[path = "NSExtensionContext.rs"] +mod __NSExtensionContext; +#[path = "NSExtensionItem.rs"] +mod __NSExtensionItem; +#[path = "NSExtensionRequestHandling.rs"] +mod __NSExtensionRequestHandling; +#[path = "NSFileCoordinator.rs"] +mod __NSFileCoordinator; +#[path = "NSFileHandle.rs"] +mod __NSFileHandle; +#[path = "NSFileManager.rs"] +mod __NSFileManager; +#[path = "NSFilePresenter.rs"] +mod __NSFilePresenter; +#[path = "NSFileVersion.rs"] +mod __NSFileVersion; +#[path = "NSFileWrapper.rs"] +mod __NSFileWrapper; +#[path = "NSFormatter.rs"] +mod __NSFormatter; +#[path = "NSGarbageCollector.rs"] +mod __NSGarbageCollector; +#[path = "NSGeometry.rs"] +mod __NSGeometry; +#[path = "NSHFSFileTypes.rs"] +mod __NSHFSFileTypes; +#[path = "NSHTTPCookie.rs"] +mod __NSHTTPCookie; +#[path = "NSHTTPCookieStorage.rs"] +mod __NSHTTPCookieStorage; +#[path = "NSHashTable.rs"] +mod __NSHashTable; +#[path = "NSHost.rs"] +mod __NSHost; +#[path = "NSISO8601DateFormatter.rs"] +mod __NSISO8601DateFormatter; +#[path = "NSIndexPath.rs"] +mod __NSIndexPath; +#[path = "NSIndexSet.rs"] +mod __NSIndexSet; +#[path = "NSInflectionRule.rs"] +mod __NSInflectionRule; +#[path = "NSInvocation.rs"] +mod __NSInvocation; +#[path = "NSItemProvider.rs"] +mod __NSItemProvider; +#[path = "NSJSONSerialization.rs"] +mod __NSJSONSerialization; +#[path = "NSKeyValueCoding.rs"] +mod __NSKeyValueCoding; +#[path = "NSKeyValueObserving.rs"] +mod __NSKeyValueObserving; +#[path = "NSKeyedArchiver.rs"] +mod __NSKeyedArchiver; +#[path = "NSLengthFormatter.rs"] +mod __NSLengthFormatter; +#[path = "NSLinguisticTagger.rs"] +mod __NSLinguisticTagger; +#[path = "NSListFormatter.rs"] +mod __NSListFormatter; +#[path = "NSLocale.rs"] +mod __NSLocale; +#[path = "NSLock.rs"] +mod __NSLock; +#[path = "NSMapTable.rs"] +mod __NSMapTable; +#[path = "NSMassFormatter.rs"] +mod __NSMassFormatter; +#[path = "NSMeasurement.rs"] +mod __NSMeasurement; +#[path = "NSMeasurementFormatter.rs"] +mod __NSMeasurementFormatter; +#[path = "NSMetadata.rs"] +mod __NSMetadata; +#[path = "NSMetadataAttributes.rs"] +mod __NSMetadataAttributes; +#[path = "NSMethodSignature.rs"] +mod __NSMethodSignature; +#[path = "NSMorphology.rs"] +mod __NSMorphology; +#[path = "NSNetServices.rs"] +mod __NSNetServices; +#[path = "NSNotification.rs"] +mod __NSNotification; +#[path = "NSNotificationQueue.rs"] +mod __NSNotificationQueue; +#[path = "NSNull.rs"] +mod __NSNull; +#[path = "NSNumberFormatter.rs"] +mod __NSNumberFormatter; +#[path = "NSObjCRuntime.rs"] +mod __NSObjCRuntime; +#[path = "NSObject.rs"] +mod __NSObject; +#[path = "NSObjectScripting.rs"] +mod __NSObjectScripting; +#[path = "NSOperation.rs"] +mod __NSOperation; +#[path = "NSOrderedCollectionChange.rs"] +mod __NSOrderedCollectionChange; +#[path = "NSOrderedCollectionDifference.rs"] +mod __NSOrderedCollectionDifference; +#[path = "NSOrderedSet.rs"] +mod __NSOrderedSet; +#[path = "NSOrthography.rs"] +mod __NSOrthography; +#[path = "NSPathUtilities.rs"] +mod __NSPathUtilities; +#[path = "NSPersonNameComponents.rs"] +mod __NSPersonNameComponents; +#[path = "NSPersonNameComponentsFormatter.rs"] +mod __NSPersonNameComponentsFormatter; +#[path = "NSPointerArray.rs"] +mod __NSPointerArray; +#[path = "NSPointerFunctions.rs"] +mod __NSPointerFunctions; +#[path = "NSPort.rs"] +mod __NSPort; +#[path = "NSPortCoder.rs"] +mod __NSPortCoder; +#[path = "NSPortMessage.rs"] +mod __NSPortMessage; +#[path = "NSPortNameServer.rs"] +mod __NSPortNameServer; +#[path = "NSPredicate.rs"] +mod __NSPredicate; +#[path = "NSProcessInfo.rs"] +mod __NSProcessInfo; +#[path = "NSProgress.rs"] +mod __NSProgress; +#[path = "NSPropertyList.rs"] +mod __NSPropertyList; +#[path = "NSProtocolChecker.rs"] +mod __NSProtocolChecker; +#[path = "NSProxy.rs"] +mod __NSProxy; +#[path = "NSRange.rs"] +mod __NSRange; +#[path = "NSRegularExpression.rs"] +mod __NSRegularExpression; +#[path = "NSRelativeDateTimeFormatter.rs"] +mod __NSRelativeDateTimeFormatter; +#[path = "NSRunLoop.rs"] +mod __NSRunLoop; +#[path = "NSScanner.rs"] +mod __NSScanner; +#[path = "NSScriptClassDescription.rs"] +mod __NSScriptClassDescription; +#[path = "NSScriptCoercionHandler.rs"] +mod __NSScriptCoercionHandler; +#[path = "NSScriptCommand.rs"] +mod __NSScriptCommand; +#[path = "NSScriptCommandDescription.rs"] +mod __NSScriptCommandDescription; +#[path = "NSScriptExecutionContext.rs"] +mod __NSScriptExecutionContext; +#[path = "NSScriptKeyValueCoding.rs"] +mod __NSScriptKeyValueCoding; +#[path = "NSScriptObjectSpecifiers.rs"] +mod __NSScriptObjectSpecifiers; +#[path = "NSScriptStandardSuiteCommands.rs"] +mod __NSScriptStandardSuiteCommands; +#[path = "NSScriptSuiteRegistry.rs"] +mod __NSScriptSuiteRegistry; +#[path = "NSScriptWhoseTests.rs"] +mod __NSScriptWhoseTests; +#[path = "NSSet.rs"] +mod __NSSet; +#[path = "NSSortDescriptor.rs"] +mod __NSSortDescriptor; +#[path = "NSSpellServer.rs"] +mod __NSSpellServer; +#[path = "NSStream.rs"] +mod __NSStream; +#[path = "NSString.rs"] +mod __NSString; +#[path = "NSTask.rs"] +mod __NSTask; +#[path = "NSTextCheckingResult.rs"] +mod __NSTextCheckingResult; +#[path = "NSThread.rs"] +mod __NSThread; +#[path = "NSTimeZone.rs"] +mod __NSTimeZone; +#[path = "NSTimer.rs"] +mod __NSTimer; +#[path = "NSURL.rs"] +mod __NSURL; +#[path = "NSURLAuthenticationChallenge.rs"] +mod __NSURLAuthenticationChallenge; +#[path = "NSURLCache.rs"] +mod __NSURLCache; +#[path = "NSURLConnection.rs"] +mod __NSURLConnection; +#[path = "NSURLCredential.rs"] +mod __NSURLCredential; +#[path = "NSURLCredentialStorage.rs"] +mod __NSURLCredentialStorage; +#[path = "NSURLDownload.rs"] +mod __NSURLDownload; +#[path = "NSURLError.rs"] +mod __NSURLError; +#[path = "NSURLHandle.rs"] +mod __NSURLHandle; +#[path = "NSURLProtectionSpace.rs"] +mod __NSURLProtectionSpace; +#[path = "NSURLProtocol.rs"] +mod __NSURLProtocol; +#[path = "NSURLRequest.rs"] +mod __NSURLRequest; +#[path = "NSURLResponse.rs"] +mod __NSURLResponse; +#[path = "NSURLSession.rs"] +mod __NSURLSession; +#[path = "NSUUID.rs"] +mod __NSUUID; +#[path = "NSUbiquitousKeyValueStore.rs"] +mod __NSUbiquitousKeyValueStore; +#[path = "NSUndoManager.rs"] +mod __NSUndoManager; +#[path = "NSUnit.rs"] +mod __NSUnit; +#[path = "NSUserActivity.rs"] +mod __NSUserActivity; +#[path = "NSUserDefaults.rs"] +mod __NSUserDefaults; +#[path = "NSUserNotification.rs"] +mod __NSUserNotification; +#[path = "NSUserScriptTask.rs"] +mod __NSUserScriptTask; +#[path = "NSValue.rs"] +mod __NSValue; +#[path = "NSValueTransformer.rs"] +mod __NSValueTransformer; +#[path = "NSXMLDTD.rs"] +mod __NSXMLDTD; +#[path = "NSXMLDTDNode.rs"] +mod __NSXMLDTDNode; +#[path = "NSXMLDocument.rs"] +mod __NSXMLDocument; +#[path = "NSXMLElement.rs"] +mod __NSXMLElement; +#[path = "NSXMLNode.rs"] +mod __NSXMLNode; +#[path = "NSXMLNodeOptions.rs"] +mod __NSXMLNodeOptions; +#[path = "NSXMLParser.rs"] +mod __NSXMLParser; +#[path = "NSXPCConnection.rs"] +mod __NSXPCConnection; +#[path = "NSZone.rs"] +mod __NSZone; -mod __exported { - pub use super::FoundationErrors::{ - NSBundleErrorMaximum, NSBundleErrorMinimum, - NSBundleOnDemandResourceExceededMaximumSizeError, NSBundleOnDemandResourceInvalidTagError, - NSBundleOnDemandResourceOutOfSpaceError, NSCloudSharingConflictError, - NSCloudSharingErrorMaximum, NSCloudSharingErrorMinimum, NSCloudSharingNetworkFailureError, - NSCloudSharingNoPermissionError, NSCloudSharingOtherError, - NSCloudSharingQuotaExceededError, NSCloudSharingTooManyParticipantsError, - NSCoderErrorMaximum, NSCoderErrorMinimum, NSCoderInvalidValueError, - NSCoderReadCorruptError, NSCoderValueNotFoundError, NSCompressionErrorMaximum, - NSCompressionErrorMinimum, NSCompressionFailedError, NSDecompressionFailedError, - NSExecutableArchitectureMismatchError, NSExecutableErrorMaximum, NSExecutableErrorMinimum, - NSExecutableLinkError, NSExecutableLoadError, NSExecutableNotLoadableError, - NSExecutableRuntimeMismatchError, NSFeatureUnsupportedError, NSFileErrorMaximum, - NSFileErrorMinimum, NSFileLockingError, NSFileManagerUnmountBusyError, - NSFileManagerUnmountUnknownError, NSFileNoSuchFileError, NSFileReadCorruptFileError, - NSFileReadInapplicableStringEncodingError, NSFileReadInvalidFileNameError, - NSFileReadNoPermissionError, NSFileReadNoSuchFileError, NSFileReadTooLargeError, - NSFileReadUnknownError, NSFileReadUnknownStringEncodingError, - NSFileReadUnsupportedSchemeError, NSFileWriteFileExistsError, - NSFileWriteInapplicableStringEncodingError, NSFileWriteInvalidFileNameError, - NSFileWriteNoPermissionError, NSFileWriteOutOfSpaceError, NSFileWriteUnknownError, - NSFileWriteUnsupportedSchemeError, NSFileWriteVolumeReadOnlyError, NSFormattingError, - NSFormattingErrorMaximum, NSFormattingErrorMinimum, NSKeyValueValidationError, - NSPropertyListErrorMaximum, NSPropertyListErrorMinimum, NSPropertyListReadCorruptError, - NSPropertyListReadStreamError, NSPropertyListReadUnknownVersionError, - NSPropertyListWriteInvalidError, NSPropertyListWriteStreamError, - NSUbiquitousFileErrorMaximum, NSUbiquitousFileErrorMinimum, - NSUbiquitousFileNotUploadedDueToQuotaError, NSUbiquitousFileUbiquityServerNotAvailable, - NSUbiquitousFileUnavailableError, NSUserActivityConnectionUnavailableError, - NSUserActivityErrorMaximum, NSUserActivityErrorMinimum, NSUserActivityHandoffFailedError, - NSUserActivityHandoffUserInfoTooLargeError, NSUserActivityRemoteApplicationTimedOutError, - NSUserCancelledError, NSValidationErrorMaximum, NSValidationErrorMinimum, - NSXPCConnectionErrorMaximum, NSXPCConnectionErrorMinimum, NSXPCConnectionInterrupted, - NSXPCConnectionInvalid, NSXPCConnectionReplyInvalid, - }; - pub use super::NSAffineTransform::{NSAffineTransform, NSAffineTransformStruct}; - pub use super::NSAppleEventDescriptor::{ - NSAppleEventDescriptor, NSAppleEventSendAlwaysInteract, NSAppleEventSendCanInteract, - NSAppleEventSendCanSwitchLayer, NSAppleEventSendDefaultOptions, - NSAppleEventSendDontAnnotate, NSAppleEventSendDontExecute, NSAppleEventSendDontRecord, - NSAppleEventSendNeverInteract, NSAppleEventSendNoReply, NSAppleEventSendOptions, - NSAppleEventSendQueueReply, NSAppleEventSendWaitForReply, - }; - pub use super::NSAppleEventManager::{ - NSAppleEventManager, NSAppleEventManagerSuspensionID, - NSAppleEventManagerWillProcessFirstEventNotification, NSAppleEventTimeOutDefault, - NSAppleEventTimeOutNone, - }; - pub use super::NSAppleScript::{ - NSAppleScript, NSAppleScriptErrorAppName, NSAppleScriptErrorBriefMessage, - NSAppleScriptErrorMessage, NSAppleScriptErrorNumber, NSAppleScriptErrorRange, - }; - pub use super::NSArchiver::{NSArchiver, NSUnarchiver}; - pub use super::NSArray::{ - NSArray, NSBinarySearchingFirstEqual, NSBinarySearchingInsertionIndex, - NSBinarySearchingLastEqual, NSBinarySearchingOptions, NSMutableArray, - }; - pub use super::NSAttributedString::{ - NSAlternateDescriptionAttributeName, NSAttributedString, - NSAttributedStringEnumerationLongestEffectiveRangeNotRequired, - NSAttributedStringEnumerationOptions, NSAttributedStringEnumerationReverse, - NSAttributedStringFormattingApplyReplacementIndexAttribute, - NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging, - NSAttributedStringFormattingOptions, NSAttributedStringKey, - NSAttributedStringMarkdownInterpretedSyntax, - NSAttributedStringMarkdownInterpretedSyntaxFull, - NSAttributedStringMarkdownInterpretedSyntaxInlineOnly, - NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace, - NSAttributedStringMarkdownParsingFailurePolicy, - NSAttributedStringMarkdownParsingFailureReturnError, - NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible, - NSAttributedStringMarkdownParsingOptions, NSImageURLAttributeName, - NSInflectionAlternativeAttributeName, NSInflectionRuleAttributeName, - NSInlinePresentationIntent, NSInlinePresentationIntentAttributeName, - NSInlinePresentationIntentBlockHTML, NSInlinePresentationIntentCode, - NSInlinePresentationIntentEmphasized, NSInlinePresentationIntentInlineHTML, - NSInlinePresentationIntentLineBreak, NSInlinePresentationIntentSoftBreak, - NSInlinePresentationIntentStrikethrough, NSInlinePresentationIntentStronglyEmphasized, - NSLanguageIdentifierAttributeName, NSMorphologyAttributeName, NSMutableAttributedString, - NSPresentationIntent, NSPresentationIntentAttributeName, NSPresentationIntentKind, - NSPresentationIntentKindBlockQuote, NSPresentationIntentKindCodeBlock, - NSPresentationIntentKindHeader, NSPresentationIntentKindListItem, - NSPresentationIntentKindOrderedList, NSPresentationIntentKindParagraph, - NSPresentationIntentKindTable, NSPresentationIntentKindTableCell, - NSPresentationIntentKindTableHeaderRow, NSPresentationIntentKindTableRow, - NSPresentationIntentKindThematicBreak, NSPresentationIntentKindUnorderedList, - NSPresentationIntentTableColumnAlignment, NSPresentationIntentTableColumnAlignmentCenter, - NSPresentationIntentTableColumnAlignmentLeft, - NSPresentationIntentTableColumnAlignmentRight, NSReplacementIndexAttributeName, - }; - pub use super::NSAutoreleasePool::NSAutoreleasePool; - pub use super::NSBackgroundActivityScheduler::{ - NSBackgroundActivityCompletionHandler, NSBackgroundActivityResult, - NSBackgroundActivityResultDeferred, NSBackgroundActivityResultFinished, - NSBackgroundActivityScheduler, - }; - pub use super::NSBundle::{ - NSBundle, NSBundleDidLoadNotification, NSBundleExecutableArchitectureARM64, - NSBundleExecutableArchitectureI386, NSBundleExecutableArchitecturePPC, - NSBundleExecutableArchitecturePPC64, NSBundleExecutableArchitectureX86_64, - NSBundleResourceRequest, NSBundleResourceRequestLoadingPriorityUrgent, - NSBundleResourceRequestLowDiskSpaceNotification, NSLoadedClasses, - }; - pub use super::NSByteCountFormatter::{ - NSByteCountFormatter, NSByteCountFormatterCountStyle, NSByteCountFormatterCountStyleBinary, - NSByteCountFormatterCountStyleDecimal, NSByteCountFormatterCountStyleFile, - NSByteCountFormatterCountStyleMemory, NSByteCountFormatterUnits, - NSByteCountFormatterUseAll, NSByteCountFormatterUseBytes, NSByteCountFormatterUseDefault, - NSByteCountFormatterUseEB, NSByteCountFormatterUseGB, NSByteCountFormatterUseKB, - NSByteCountFormatterUseMB, NSByteCountFormatterUsePB, NSByteCountFormatterUseTB, - NSByteCountFormatterUseYBOrHigher, NSByteCountFormatterUseZB, - }; - pub use super::NSByteOrder::{NSSwappedDouble, NSSwappedFloat}; - pub use super::NSCache::{NSCache, NSCacheDelegate}; - pub use super::NSCalendar::{ - NSCalendar, NSCalendarCalendarUnit, NSCalendarDayChangedNotification, NSCalendarIdentifier, - NSCalendarIdentifierBuddhist, NSCalendarIdentifierChinese, NSCalendarIdentifierCoptic, - NSCalendarIdentifierEthiopicAmeteAlem, NSCalendarIdentifierEthiopicAmeteMihret, - NSCalendarIdentifierGregorian, NSCalendarIdentifierHebrew, NSCalendarIdentifierISO8601, - NSCalendarIdentifierIndian, NSCalendarIdentifierIslamic, NSCalendarIdentifierIslamicCivil, - NSCalendarIdentifierIslamicTabular, NSCalendarIdentifierIslamicUmmAlQura, - NSCalendarIdentifierJapanese, NSCalendarIdentifierPersian, - NSCalendarIdentifierRepublicOfChina, NSCalendarMatchFirst, NSCalendarMatchLast, - NSCalendarMatchNextTime, NSCalendarMatchNextTimePreservingSmallerUnits, - NSCalendarMatchPreviousTimePreservingSmallerUnits, NSCalendarMatchStrictly, - NSCalendarOptions, NSCalendarSearchBackwards, NSCalendarUnit, NSCalendarUnitCalendar, - NSCalendarUnitDay, NSCalendarUnitEra, NSCalendarUnitHour, NSCalendarUnitMinute, - NSCalendarUnitMonth, NSCalendarUnitNanosecond, NSCalendarUnitQuarter, NSCalendarUnitSecond, - NSCalendarUnitTimeZone, NSCalendarUnitWeekOfMonth, NSCalendarUnitWeekOfYear, - NSCalendarUnitWeekday, NSCalendarUnitWeekdayOrdinal, NSCalendarUnitYear, - NSCalendarUnitYearForWeekOfYear, NSCalendarWrapComponents, NSDateComponentUndefined, - NSDateComponents, NSDayCalendarUnit, NSEraCalendarUnit, NSHourCalendarUnit, - NSMinuteCalendarUnit, NSMonthCalendarUnit, NSQuarterCalendarUnit, NSSecondCalendarUnit, - NSTimeZoneCalendarUnit, NSUndefinedDateComponent, NSWeekCalendarUnit, - NSWeekOfMonthCalendarUnit, NSWeekOfYearCalendarUnit, NSWeekdayCalendarUnit, - NSWeekdayOrdinalCalendarUnit, NSYearCalendarUnit, NSYearForWeekOfYearCalendarUnit, - }; - pub use super::NSCalendarDate::NSCalendarDate; - pub use super::NSCharacterSet::{ - NSCharacterSet, NSMutableCharacterSet, NSOpenStepUnicodeReservedBase, - }; - pub use super::NSClassDescription::{ - NSClassDescription, NSClassDescriptionNeededForClassNotification, - }; - pub use super::NSCoder::{ - NSCoder, NSDecodingFailurePolicy, NSDecodingFailurePolicyRaiseException, - NSDecodingFailurePolicySetErrorAndReturn, - }; - pub use super::NSComparisonPredicate::{ - NSAllPredicateModifier, NSAnyPredicateModifier, NSBeginsWithPredicateOperatorType, - NSBetweenPredicateOperatorType, NSCaseInsensitivePredicateOption, NSComparisonPredicate, - NSComparisonPredicateModifier, NSComparisonPredicateOptions, - NSContainsPredicateOperatorType, NSCustomSelectorPredicateOperatorType, - NSDiacriticInsensitivePredicateOption, NSDirectPredicateModifier, - NSEndsWithPredicateOperatorType, NSEqualToPredicateOperatorType, - NSGreaterThanOrEqualToPredicateOperatorType, NSGreaterThanPredicateOperatorType, - NSInPredicateOperatorType, NSLessThanOrEqualToPredicateOperatorType, - NSLessThanPredicateOperatorType, NSLikePredicateOperatorType, - NSMatchesPredicateOperatorType, NSNormalizedPredicateOption, - NSNotEqualToPredicateOperatorType, NSPredicateOperatorType, - }; - pub use super::NSCompoundPredicate::{ - NSAndPredicateType, NSCompoundPredicate, NSCompoundPredicateType, NSNotPredicateType, - NSOrPredicateType, - }; - pub use super::NSConnection::{ - NSConnection, NSConnectionDelegate, NSConnectionDidDieNotification, - NSConnectionDidInitializeNotification, NSConnectionReplyMode, NSDistantObjectRequest, - NSFailedAuthenticationException, - }; - pub use super::NSData::{ - NSAtomicWrite, NSData, NSDataBase64DecodingIgnoreUnknownCharacters, - NSDataBase64DecodingOptions, NSDataBase64Encoding64CharacterLineLength, - NSDataBase64Encoding76CharacterLineLength, NSDataBase64EncodingEndLineWithCarriageReturn, - NSDataBase64EncodingEndLineWithLineFeed, NSDataBase64EncodingOptions, - NSDataCompressionAlgorithm, NSDataCompressionAlgorithmLZ4, NSDataCompressionAlgorithmLZFSE, - NSDataCompressionAlgorithmLZMA, NSDataCompressionAlgorithmZlib, NSDataReadingMapped, - NSDataReadingMappedAlways, NSDataReadingMappedIfSafe, NSDataReadingOptions, - NSDataReadingUncached, NSDataSearchAnchored, NSDataSearchBackwards, NSDataSearchOptions, - NSDataWritingAtomic, NSDataWritingFileProtectionComplete, - NSDataWritingFileProtectionCompleteUnlessOpen, - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication, - NSDataWritingFileProtectionMask, NSDataWritingFileProtectionNone, NSDataWritingOptions, - NSDataWritingWithoutOverwriting, NSMappedRead, NSMutableData, NSPurgeableData, - NSUncachedRead, - }; - pub use super::NSDate::{NSDate, NSSystemClockDidChangeNotification, NSTimeInterval}; - pub use super::NSDateComponentsFormatter::{ - NSDateComponentsFormatter, NSDateComponentsFormatterUnitsStyle, - NSDateComponentsFormatterUnitsStyleAbbreviated, NSDateComponentsFormatterUnitsStyleBrief, - NSDateComponentsFormatterUnitsStyleFull, NSDateComponentsFormatterUnitsStylePositional, - NSDateComponentsFormatterUnitsStyleShort, NSDateComponentsFormatterUnitsStyleSpellOut, - NSDateComponentsFormatterZeroFormattingBehavior, - NSDateComponentsFormatterZeroFormattingBehaviorDefault, - NSDateComponentsFormatterZeroFormattingBehaviorDropAll, - NSDateComponentsFormatterZeroFormattingBehaviorDropLeading, - NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle, - NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing, - NSDateComponentsFormatterZeroFormattingBehaviorNone, - NSDateComponentsFormatterZeroFormattingBehaviorPad, - }; - pub use super::NSDateFormatter::{ - NSDateFormatter, NSDateFormatterBehavior, NSDateFormatterBehavior10_0, - NSDateFormatterBehavior10_4, NSDateFormatterBehaviorDefault, NSDateFormatterFullStyle, - NSDateFormatterLongStyle, NSDateFormatterMediumStyle, NSDateFormatterNoStyle, - NSDateFormatterShortStyle, NSDateFormatterStyle, - }; - pub use super::NSDateInterval::NSDateInterval; - pub use super::NSDateIntervalFormatter::{ - NSDateIntervalFormatter, NSDateIntervalFormatterFullStyle, - NSDateIntervalFormatterLongStyle, NSDateIntervalFormatterMediumStyle, - NSDateIntervalFormatterNoStyle, NSDateIntervalFormatterShortStyle, - NSDateIntervalFormatterStyle, - }; - pub use super::NSDecimal::{ - NSCalculationDivideByZero, NSCalculationError, NSCalculationLossOfPrecision, - NSCalculationNoError, NSCalculationOverflow, NSCalculationUnderflow, NSRoundBankers, - NSRoundDown, NSRoundPlain, NSRoundUp, NSRoundingMode, - }; - pub use super::NSDecimalNumber::{ - NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberDivideByZeroException, - NSDecimalNumberExactnessException, NSDecimalNumberHandler, - NSDecimalNumberOverflowException, NSDecimalNumberUnderflowException, - }; - pub use super::NSDictionary::{NSDictionary, NSMutableDictionary}; - pub use super::NSDistantObject::NSDistantObject; - pub use super::NSDistributedLock::NSDistributedLock; - pub use super::NSDistributedNotificationCenter::{ - NSDistributedNotificationCenter, NSDistributedNotificationCenterType, - NSDistributedNotificationDeliverImmediately, NSDistributedNotificationOptions, - NSDistributedNotificationPostToAllSessions, NSLocalNotificationCenterType, - NSNotificationDeliverImmediately, NSNotificationPostToAllSessions, - NSNotificationSuspensionBehavior, NSNotificationSuspensionBehaviorCoalesce, - NSNotificationSuspensionBehaviorDeliverImmediately, NSNotificationSuspensionBehaviorDrop, - NSNotificationSuspensionBehaviorHold, - }; - pub use super::NSEnergyFormatter::{ - NSEnergyFormatter, NSEnergyFormatterUnit, NSEnergyFormatterUnitCalorie, - NSEnergyFormatterUnitJoule, NSEnergyFormatterUnitKilocalorie, - NSEnergyFormatterUnitKilojoule, - }; - pub use super::NSEnumerator::{NSEnumerator, NSFastEnumeration, NSFastEnumerationState}; - pub use super::NSError::{ - NSCocoaErrorDomain, NSDebugDescriptionErrorKey, NSError, NSErrorDomain, NSErrorUserInfoKey, - NSFilePathErrorKey, NSHelpAnchorErrorKey, NSLocalizedDescriptionKey, - NSLocalizedFailureErrorKey, NSLocalizedFailureReasonErrorKey, - NSLocalizedRecoveryOptionsErrorKey, NSLocalizedRecoverySuggestionErrorKey, - NSMachErrorDomain, NSMultipleUnderlyingErrorsKey, NSOSStatusErrorDomain, - NSPOSIXErrorDomain, NSRecoveryAttempterErrorKey, NSStringEncodingErrorKey, NSURLErrorKey, - NSUnderlyingErrorKey, - }; - pub use super::NSException::{ - NSAssertionHandler, NSAssertionHandlerKey, NSDestinationInvalidException, NSException, - NSGenericException, NSInconsistentArchiveException, NSInternalInconsistencyException, - NSInvalidArgumentException, NSInvalidReceivePortException, NSInvalidSendPortException, - NSMallocException, NSObjectInaccessibleException, NSObjectNotAvailableException, - NSOldStyleException, NSPortReceiveException, NSPortSendException, NSPortTimeoutException, - NSRangeException, NSUncaughtExceptionHandler, - }; - pub use super::NSExpression::{ - NSAggregateExpressionType, NSAnyKeyExpressionType, NSBlockExpressionType, - NSConditionalExpressionType, NSConstantValueExpressionType, - NSEvaluatedObjectExpressionType, NSExpression, NSExpressionType, NSFunctionExpressionType, - NSIntersectSetExpressionType, NSKeyPathExpressionType, NSMinusSetExpressionType, - NSSubqueryExpressionType, NSUnionSetExpressionType, NSVariableExpressionType, - }; - pub use super::NSExtensionContext::{ - NSExtensionContext, NSExtensionHostDidBecomeActiveNotification, - NSExtensionHostDidEnterBackgroundNotification, - NSExtensionHostWillEnterForegroundNotification, - NSExtensionHostWillResignActiveNotification, NSExtensionItemsAndErrorsKey, - }; - pub use super::NSExtensionItem::{ - NSExtensionItem, NSExtensionItemAttachmentsKey, NSExtensionItemAttributedContentTextKey, - NSExtensionItemAttributedTitleKey, - }; - pub use super::NSExtensionRequestHandling::NSExtensionRequestHandling; - pub use super::NSFileCoordinator::{ - NSFileAccessIntent, NSFileCoordinator, NSFileCoordinatorReadingForUploading, - NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorReadingOptions, - NSFileCoordinatorReadingResolvesSymbolicLink, NSFileCoordinatorReadingWithoutChanges, - NSFileCoordinatorWritingContentIndependentMetadataOnly, - NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMerging, - NSFileCoordinatorWritingForMoving, NSFileCoordinatorWritingForReplacing, - NSFileCoordinatorWritingOptions, - }; - pub use super::NSFileHandle::{ - NSFileHandle, NSFileHandleConnectionAcceptedNotification, - NSFileHandleDataAvailableNotification, NSFileHandleNotificationDataItem, - NSFileHandleNotificationFileHandleItem, NSFileHandleNotificationMonitorModes, - NSFileHandleOperationException, NSFileHandleReadCompletionNotification, - NSFileHandleReadToEndOfFileCompletionNotification, NSPipe, - }; - pub use super::NSFileManager::{ - NSDirectoryEnumerationIncludesDirectoriesPostOrder, NSDirectoryEnumerationOptions, - NSDirectoryEnumerationProducesRelativePathURLs, NSDirectoryEnumerationSkipsHiddenFiles, - NSDirectoryEnumerationSkipsPackageDescendants, - NSDirectoryEnumerationSkipsSubdirectoryDescendants, NSDirectoryEnumerator, - NSFileAppendOnly, NSFileAttributeKey, NSFileAttributeType, NSFileBusy, NSFileCreationDate, - NSFileDeviceIdentifier, NSFileExtensionHidden, NSFileGroupOwnerAccountID, - NSFileGroupOwnerAccountName, NSFileHFSCreatorCode, NSFileHFSTypeCode, NSFileImmutable, - NSFileManager, NSFileManagerDelegate, NSFileManagerItemReplacementOptions, - NSFileManagerItemReplacementUsingNewMetadataOnly, - NSFileManagerItemReplacementWithoutDeletingBackupItem, - NSFileManagerUnmountAllPartitionsAndEjectDisk, - NSFileManagerUnmountDissentingProcessIdentifierErrorKey, NSFileManagerUnmountOptions, - NSFileManagerUnmountWithoutUI, NSFileModificationDate, NSFileOwnerAccountID, - NSFileOwnerAccountName, NSFilePosixPermissions, NSFileProtectionComplete, - NSFileProtectionCompleteUnlessOpen, NSFileProtectionCompleteUntilFirstUserAuthentication, - NSFileProtectionKey, NSFileProtectionNone, NSFileProtectionType, NSFileProviderService, - NSFileProviderServiceName, NSFileReferenceCount, NSFileSize, NSFileSystemFileNumber, - NSFileSystemFreeNodes, NSFileSystemFreeSize, NSFileSystemNodes, NSFileSystemNumber, - NSFileSystemSize, NSFileType, NSFileTypeBlockSpecial, NSFileTypeCharacterSpecial, - NSFileTypeDirectory, NSFileTypeRegular, NSFileTypeSocket, NSFileTypeSymbolicLink, - NSFileTypeUnknown, NSURLRelationship, NSURLRelationshipContains, NSURLRelationshipOther, - NSURLRelationshipSame, NSUbiquityIdentityDidChangeNotification, NSVolumeEnumerationOptions, - NSVolumeEnumerationProduceFileReferenceURLs, NSVolumeEnumerationSkipHiddenVolumes, - }; - pub use super::NSFilePresenter::NSFilePresenter; - pub use super::NSFileVersion::{ - NSFileVersion, NSFileVersionAddingByMoving, NSFileVersionAddingOptions, - NSFileVersionReplacingByMoving, NSFileVersionReplacingOptions, - }; - pub use super::NSFileWrapper::{ - NSFileWrapper, NSFileWrapperReadingImmediate, NSFileWrapperReadingOptions, - NSFileWrapperReadingWithoutMapping, NSFileWrapperWritingAtomic, - NSFileWrapperWritingOptions, NSFileWrapperWritingWithNameUpdating, - }; - pub use super::NSFormatter::{ - NSFormatter, NSFormattingContext, NSFormattingContextBeginningOfSentence, - NSFormattingContextDynamic, NSFormattingContextListItem, - NSFormattingContextMiddleOfSentence, NSFormattingContextStandalone, - NSFormattingContextUnknown, NSFormattingUnitStyle, NSFormattingUnitStyleLong, - NSFormattingUnitStyleMedium, NSFormattingUnitStyleShort, - }; - pub use super::NSGarbageCollector::NSGarbageCollector; - pub use super::NSGeometry::{ - NSAlignAllEdgesInward, NSAlignAllEdgesNearest, NSAlignAllEdgesOutward, NSAlignHeightInward, - NSAlignHeightNearest, NSAlignHeightOutward, NSAlignMaxXInward, NSAlignMaxXNearest, - NSAlignMaxXOutward, NSAlignMaxYInward, NSAlignMaxYNearest, NSAlignMaxYOutward, - NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, - NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, - NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsets, - NSEdgeInsetsZero, NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSPointArray, - NSPointPointer, NSRect, NSRectArray, NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, - NSRectEdgeMinX, NSRectEdgeMinY, NSRectPointer, NSSize, NSSizeArray, NSSizePointer, - NSZeroPoint, NSZeroRect, NSZeroSize, - }; - pub use super::NSHTTPCookie::{ - NSHTTPCookie, NSHTTPCookieComment, NSHTTPCookieCommentURL, NSHTTPCookieDiscard, - NSHTTPCookieDomain, NSHTTPCookieExpires, NSHTTPCookieMaximumAge, NSHTTPCookieName, - NSHTTPCookieOriginURL, NSHTTPCookiePath, NSHTTPCookiePort, NSHTTPCookiePropertyKey, - NSHTTPCookieSameSiteLax, NSHTTPCookieSameSitePolicy, NSHTTPCookieSameSiteStrict, - NSHTTPCookieSecure, NSHTTPCookieStringPolicy, NSHTTPCookieValue, NSHTTPCookieVersion, - }; - pub use super::NSHTTPCookieStorage::{ - NSHTTPCookieAcceptPolicy, NSHTTPCookieAcceptPolicyAlways, NSHTTPCookieAcceptPolicyNever, - NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, - NSHTTPCookieManagerAcceptPolicyChangedNotification, - NSHTTPCookieManagerCookiesChangedNotification, NSHTTPCookieStorage, - }; - pub use super::NSHashTable::{ - NSHashEnumerator, NSHashTable, NSHashTableCallBacks, NSHashTableCopyIn, - NSHashTableObjectPointerPersonality, NSHashTableOptions, NSHashTableStrongMemory, - NSHashTableWeakMemory, NSHashTableZeroingWeakMemory, NSIntHashCallBacks, - NSIntegerHashCallBacks, NSNonOwnedPointerHashCallBacks, NSNonRetainedObjectHashCallBacks, - NSObjectHashCallBacks, NSOwnedObjectIdentityHashCallBacks, NSOwnedPointerHashCallBacks, - NSPointerToStructHashCallBacks, - }; - pub use super::NSHost::NSHost; - pub use super::NSISO8601DateFormatter::{ - NSISO8601DateFormatOptions, NSISO8601DateFormatWithColonSeparatorInTime, - NSISO8601DateFormatWithColonSeparatorInTimeZone, - NSISO8601DateFormatWithDashSeparatorInDate, NSISO8601DateFormatWithDay, - NSISO8601DateFormatWithFractionalSeconds, NSISO8601DateFormatWithFullDate, - NSISO8601DateFormatWithFullTime, NSISO8601DateFormatWithInternetDateTime, - NSISO8601DateFormatWithMonth, NSISO8601DateFormatWithSpaceBetweenDateAndTime, - NSISO8601DateFormatWithTime, NSISO8601DateFormatWithTimeZone, - NSISO8601DateFormatWithWeekOfYear, NSISO8601DateFormatWithYear, NSISO8601DateFormatter, - }; - pub use super::NSIndexPath::NSIndexPath; - pub use super::NSIndexSet::{NSIndexSet, NSMutableIndexSet}; - pub use super::NSInflectionRule::{NSInflectionRule, NSInflectionRuleExplicit}; - pub use super::NSInvocation::NSInvocation; - pub use super::NSItemProvider::{ - NSExtensionJavaScriptFinalizeArgumentKey, NSExtensionJavaScriptPreprocessingResultsKey, - NSItemProvider, NSItemProviderCompletionHandler, NSItemProviderErrorCode, - NSItemProviderErrorDomain, NSItemProviderFileOptionOpenInPlace, NSItemProviderFileOptions, - NSItemProviderItemUnavailableError, NSItemProviderLoadHandler, - NSItemProviderPreferredImageSizeKey, NSItemProviderReading, - NSItemProviderRepresentationVisibility, NSItemProviderRepresentationVisibilityAll, - NSItemProviderRepresentationVisibilityGroup, - NSItemProviderRepresentationVisibilityOwnProcess, - NSItemProviderRepresentationVisibilityTeam, NSItemProviderUnavailableCoercionError, - NSItemProviderUnexpectedValueClassError, NSItemProviderUnknownError, NSItemProviderWriting, - }; - pub use super::NSJSONSerialization::{ - NSJSONReadingAllowFragments, NSJSONReadingFragmentsAllowed, NSJSONReadingJSON5Allowed, - NSJSONReadingMutableContainers, NSJSONReadingMutableLeaves, NSJSONReadingOptions, - NSJSONReadingTopLevelDictionaryAssumed, NSJSONSerialization, NSJSONWritingFragmentsAllowed, - NSJSONWritingOptions, NSJSONWritingPrettyPrinted, NSJSONWritingSortedKeys, - NSJSONWritingWithoutEscapingSlashes, - }; - pub use super::NSKeyValueCoding::{ - NSAverageKeyValueOperator, NSCountKeyValueOperator, - NSDistinctUnionOfArraysKeyValueOperator, NSDistinctUnionOfObjectsKeyValueOperator, - NSDistinctUnionOfSetsKeyValueOperator, NSKeyValueOperator, NSMaximumKeyValueOperator, - NSMinimumKeyValueOperator, NSSumKeyValueOperator, NSUndefinedKeyException, - NSUnionOfArraysKeyValueOperator, NSUnionOfObjectsKeyValueOperator, - NSUnionOfSetsKeyValueOperator, - }; - pub use super::NSKeyValueObserving::{ - NSKeyValueChange, NSKeyValueChangeIndexesKey, NSKeyValueChangeInsertion, - NSKeyValueChangeKey, NSKeyValueChangeKindKey, NSKeyValueChangeNewKey, - NSKeyValueChangeNotificationIsPriorKey, NSKeyValueChangeOldKey, NSKeyValueChangeRemoval, - NSKeyValueChangeReplacement, NSKeyValueChangeSetting, NSKeyValueIntersectSetMutation, - NSKeyValueMinusSetMutation, NSKeyValueObservingOptionInitial, NSKeyValueObservingOptionNew, - NSKeyValueObservingOptionOld, NSKeyValueObservingOptionPrior, NSKeyValueObservingOptions, - NSKeyValueSetMutationKind, NSKeyValueSetSetMutation, NSKeyValueUnionSetMutation, - }; - pub use super::NSKeyedArchiver::{ - NSInvalidArchiveOperationException, NSInvalidUnarchiveOperationException, - NSKeyedArchiveRootObjectKey, NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, - NSKeyedUnarchiverDelegate, - }; - pub use super::NSLengthFormatter::{ - NSLengthFormatter, NSLengthFormatterUnit, NSLengthFormatterUnitCentimeter, - NSLengthFormatterUnitFoot, NSLengthFormatterUnitInch, NSLengthFormatterUnitKilometer, - NSLengthFormatterUnitMeter, NSLengthFormatterUnitMile, NSLengthFormatterUnitMillimeter, - NSLengthFormatterUnitYard, - }; - pub use super::NSLinguisticTagger::{ - NSLinguisticTag, NSLinguisticTagAdjective, NSLinguisticTagAdverb, - NSLinguisticTagClassifier, NSLinguisticTagCloseParenthesis, NSLinguisticTagCloseQuote, - NSLinguisticTagConjunction, NSLinguisticTagDash, NSLinguisticTagDeterminer, - NSLinguisticTagIdiom, NSLinguisticTagInterjection, NSLinguisticTagNoun, - NSLinguisticTagNumber, NSLinguisticTagOpenParenthesis, NSLinguisticTagOpenQuote, - NSLinguisticTagOrganizationName, NSLinguisticTagOther, NSLinguisticTagOtherPunctuation, - NSLinguisticTagOtherWhitespace, NSLinguisticTagOtherWord, NSLinguisticTagParagraphBreak, - NSLinguisticTagParticle, NSLinguisticTagPersonalName, NSLinguisticTagPlaceName, - NSLinguisticTagPreposition, NSLinguisticTagPronoun, NSLinguisticTagPunctuation, - NSLinguisticTagScheme, NSLinguisticTagSchemeLanguage, NSLinguisticTagSchemeLemma, - NSLinguisticTagSchemeLexicalClass, NSLinguisticTagSchemeNameType, - NSLinguisticTagSchemeNameTypeOrLexicalClass, NSLinguisticTagSchemeScript, - NSLinguisticTagSchemeTokenType, NSLinguisticTagSentenceTerminator, NSLinguisticTagVerb, - NSLinguisticTagWhitespace, NSLinguisticTagWord, NSLinguisticTagWordJoiner, - NSLinguisticTagger, NSLinguisticTaggerJoinNames, NSLinguisticTaggerOmitOther, - NSLinguisticTaggerOmitPunctuation, NSLinguisticTaggerOmitWhitespace, - NSLinguisticTaggerOmitWords, NSLinguisticTaggerOptions, NSLinguisticTaggerUnit, - NSLinguisticTaggerUnitDocument, NSLinguisticTaggerUnitParagraph, - NSLinguisticTaggerUnitSentence, NSLinguisticTaggerUnitWord, - }; - pub use super::NSListFormatter::NSListFormatter; - pub use super::NSLocale::{ - NSBuddhistCalendar, NSChineseCalendar, NSCurrentLocaleDidChangeNotification, - NSGregorianCalendar, NSHebrewCalendar, NSISO8601Calendar, NSIndianCalendar, - NSIslamicCalendar, NSIslamicCivilCalendar, NSJapaneseCalendar, NSLocale, - NSLocaleAlternateQuotationBeginDelimiterKey, NSLocaleAlternateQuotationEndDelimiterKey, - NSLocaleCalendar, NSLocaleCollationIdentifier, NSLocaleCollatorIdentifier, - NSLocaleCountryCode, NSLocaleCurrencyCode, NSLocaleCurrencySymbol, - NSLocaleDecimalSeparator, NSLocaleExemplarCharacterSet, NSLocaleGroupingSeparator, - NSLocaleIdentifier, NSLocaleKey, NSLocaleLanguageCode, NSLocaleLanguageDirection, - NSLocaleLanguageDirectionBottomToTop, NSLocaleLanguageDirectionLeftToRight, - NSLocaleLanguageDirectionRightToLeft, NSLocaleLanguageDirectionTopToBottom, - NSLocaleLanguageDirectionUnknown, NSLocaleMeasurementSystem, - NSLocaleQuotationBeginDelimiterKey, NSLocaleQuotationEndDelimiterKey, NSLocaleScriptCode, - NSLocaleUsesMetricSystem, NSLocaleVariantCode, NSPersianCalendar, - NSRepublicOfChinaCalendar, - }; - pub use super::NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; - pub use super::NSMapTable::{ - NSIntMapKeyCallBacks, NSIntMapValueCallBacks, NSIntegerMapKeyCallBacks, - NSIntegerMapValueCallBacks, NSMapEnumerator, NSMapTable, NSMapTableCopyIn, - NSMapTableKeyCallBacks, NSMapTableObjectPointerPersonality, NSMapTableOptions, - NSMapTableStrongMemory, NSMapTableValueCallBacks, NSMapTableWeakMemory, - NSMapTableZeroingWeakMemory, NSNonOwnedPointerMapKeyCallBacks, - NSNonOwnedPointerMapValueCallBacks, NSNonOwnedPointerOrNullMapKeyCallBacks, - NSNonRetainedObjectMapKeyCallBacks, NSNonRetainedObjectMapValueCallBacks, - NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, NSOwnedPointerMapKeyCallBacks, - NSOwnedPointerMapValueCallBacks, - }; - pub use super::NSMassFormatter::{ - NSMassFormatter, NSMassFormatterUnit, NSMassFormatterUnitGram, NSMassFormatterUnitKilogram, - NSMassFormatterUnitOunce, NSMassFormatterUnitPound, NSMassFormatterUnitStone, - }; - pub use super::NSMeasurement::NSMeasurement; - pub use super::NSMeasurementFormatter::{ - NSMeasurementFormatter, NSMeasurementFormatterUnitOptions, - NSMeasurementFormatterUnitOptionsNaturalScale, - NSMeasurementFormatterUnitOptionsProvidedUnit, - NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit, - }; - pub use super::NSMetadata::{ - NSMetadataItem, NSMetadataQuery, NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope, - NSMetadataQueryAttributeValueTuple, NSMetadataQueryDelegate, - NSMetadataQueryDidFinishGatheringNotification, - NSMetadataQueryDidStartGatheringNotification, NSMetadataQueryDidUpdateNotification, - NSMetadataQueryGatheringProgressNotification, NSMetadataQueryIndexedLocalComputerScope, - NSMetadataQueryIndexedNetworkScope, NSMetadataQueryLocalComputerScope, - NSMetadataQueryNetworkScope, NSMetadataQueryResultContentRelevanceAttribute, - NSMetadataQueryResultGroup, NSMetadataQueryUbiquitousDataScope, - NSMetadataQueryUbiquitousDocumentsScope, NSMetadataQueryUpdateAddedItemsKey, - NSMetadataQueryUpdateChangedItemsKey, NSMetadataQueryUpdateRemovedItemsKey, - NSMetadataQueryUserHomeScope, - }; - pub use super::NSMetadataAttributes::{ - NSMetadataItemAcquisitionMakeKey, NSMetadataItemAcquisitionModelKey, - NSMetadataItemAlbumKey, NSMetadataItemAltitudeKey, NSMetadataItemApertureKey, - NSMetadataItemAppleLoopDescriptorsKey, NSMetadataItemAppleLoopsKeyFilterTypeKey, - NSMetadataItemAppleLoopsLoopModeKey, NSMetadataItemAppleLoopsRootKeyKey, - NSMetadataItemApplicationCategoriesKey, NSMetadataItemAttributeChangeDateKey, - NSMetadataItemAudiencesKey, NSMetadataItemAudioBitRateKey, - NSMetadataItemAudioChannelCountKey, NSMetadataItemAudioEncodingApplicationKey, - NSMetadataItemAudioSampleRateKey, NSMetadataItemAudioTrackNumberKey, - NSMetadataItemAuthorAddressesKey, NSMetadataItemAuthorEmailAddressesKey, - NSMetadataItemAuthorsKey, NSMetadataItemBitsPerSampleKey, - NSMetadataItemCFBundleIdentifierKey, NSMetadataItemCameraOwnerKey, NSMetadataItemCityKey, - NSMetadataItemCodecsKey, NSMetadataItemColorSpaceKey, NSMetadataItemCommentKey, - NSMetadataItemComposerKey, NSMetadataItemContactKeywordsKey, - NSMetadataItemContentCreationDateKey, NSMetadataItemContentModificationDateKey, - NSMetadataItemContentTypeKey, NSMetadataItemContentTypeTreeKey, - NSMetadataItemContributorsKey, NSMetadataItemCopyrightKey, NSMetadataItemCountryKey, - NSMetadataItemCoverageKey, NSMetadataItemCreatorKey, NSMetadataItemDateAddedKey, - NSMetadataItemDeliveryTypeKey, NSMetadataItemDescriptionKey, NSMetadataItemDirectorKey, - NSMetadataItemDisplayNameKey, NSMetadataItemDownloadedDateKey, NSMetadataItemDueDateKey, - NSMetadataItemDurationSecondsKey, NSMetadataItemEXIFGPSVersionKey, - NSMetadataItemEXIFVersionKey, NSMetadataItemEditorsKey, NSMetadataItemEmailAddressesKey, - NSMetadataItemEncodingApplicationsKey, NSMetadataItemExecutableArchitecturesKey, - NSMetadataItemExecutablePlatformKey, NSMetadataItemExposureModeKey, - NSMetadataItemExposureProgramKey, NSMetadataItemExposureTimeSecondsKey, - NSMetadataItemExposureTimeStringKey, NSMetadataItemFNumberKey, - NSMetadataItemFSContentChangeDateKey, NSMetadataItemFSCreationDateKey, - NSMetadataItemFSNameKey, NSMetadataItemFSSizeKey, NSMetadataItemFinderCommentKey, - NSMetadataItemFlashOnOffKey, NSMetadataItemFocalLength35mmKey, - NSMetadataItemFocalLengthKey, NSMetadataItemFontsKey, NSMetadataItemGPSAreaInformationKey, - NSMetadataItemGPSDOPKey, NSMetadataItemGPSDateStampKey, NSMetadataItemGPSDestBearingKey, - NSMetadataItemGPSDestDistanceKey, NSMetadataItemGPSDestLatitudeKey, - NSMetadataItemGPSDestLongitudeKey, NSMetadataItemGPSDifferentalKey, - NSMetadataItemGPSMapDatumKey, NSMetadataItemGPSMeasureModeKey, - NSMetadataItemGPSProcessingMethodKey, NSMetadataItemGPSStatusKey, - NSMetadataItemGPSTrackKey, NSMetadataItemGenreKey, NSMetadataItemHasAlphaChannelKey, - NSMetadataItemHeadlineKey, NSMetadataItemISOSpeedKey, NSMetadataItemIdentifierKey, - NSMetadataItemImageDirectionKey, NSMetadataItemInformationKey, - NSMetadataItemInstantMessageAddressesKey, NSMetadataItemInstructionsKey, - NSMetadataItemIsApplicationManagedKey, NSMetadataItemIsGeneralMIDISequenceKey, - NSMetadataItemIsLikelyJunkKey, NSMetadataItemIsUbiquitousKey, - NSMetadataItemKeySignatureKey, NSMetadataItemKeywordsKey, NSMetadataItemKindKey, - NSMetadataItemLanguagesKey, NSMetadataItemLastUsedDateKey, NSMetadataItemLatitudeKey, - NSMetadataItemLayerNamesKey, NSMetadataItemLensModelKey, NSMetadataItemLongitudeKey, - NSMetadataItemLyricistKey, NSMetadataItemMaxApertureKey, NSMetadataItemMediaTypesKey, - NSMetadataItemMeteringModeKey, NSMetadataItemMusicalGenreKey, - NSMetadataItemMusicalInstrumentCategoryKey, NSMetadataItemMusicalInstrumentNameKey, - NSMetadataItemNamedLocationKey, NSMetadataItemNumberOfPagesKey, - NSMetadataItemOrganizationsKey, NSMetadataItemOrientationKey, - NSMetadataItemOriginalFormatKey, NSMetadataItemOriginalSourceKey, - NSMetadataItemPageHeightKey, NSMetadataItemPageWidthKey, NSMetadataItemParticipantsKey, - NSMetadataItemPathKey, NSMetadataItemPerformersKey, NSMetadataItemPhoneNumbersKey, - NSMetadataItemPixelCountKey, NSMetadataItemPixelHeightKey, NSMetadataItemPixelWidthKey, - NSMetadataItemProducerKey, NSMetadataItemProfileNameKey, NSMetadataItemProjectsKey, - NSMetadataItemPublishersKey, NSMetadataItemRecipientAddressesKey, - NSMetadataItemRecipientEmailAddressesKey, NSMetadataItemRecipientsKey, - NSMetadataItemRecordingDateKey, NSMetadataItemRecordingYearKey, - NSMetadataItemRedEyeOnOffKey, NSMetadataItemResolutionHeightDPIKey, - NSMetadataItemResolutionWidthDPIKey, NSMetadataItemRightsKey, - NSMetadataItemSecurityMethodKey, NSMetadataItemSpeedKey, NSMetadataItemStarRatingKey, - NSMetadataItemStateOrProvinceKey, NSMetadataItemStreamableKey, NSMetadataItemSubjectKey, - NSMetadataItemTempoKey, NSMetadataItemTextContentKey, NSMetadataItemThemeKey, - NSMetadataItemTimeSignatureKey, NSMetadataItemTimestampKey, NSMetadataItemTitleKey, - NSMetadataItemTotalBitRateKey, NSMetadataItemURLKey, NSMetadataItemVersionKey, - NSMetadataItemVideoBitRateKey, NSMetadataItemWhereFromsKey, NSMetadataItemWhiteBalanceKey, - NSMetadataUbiquitousItemContainerDisplayNameKey, - NSMetadataUbiquitousItemDownloadRequestedKey, NSMetadataUbiquitousItemDownloadingErrorKey, - NSMetadataUbiquitousItemDownloadingStatusCurrent, - NSMetadataUbiquitousItemDownloadingStatusDownloaded, - NSMetadataUbiquitousItemDownloadingStatusKey, - NSMetadataUbiquitousItemDownloadingStatusNotDownloaded, - NSMetadataUbiquitousItemHasUnresolvedConflictsKey, NSMetadataUbiquitousItemIsDownloadedKey, - NSMetadataUbiquitousItemIsDownloadingKey, NSMetadataUbiquitousItemIsExternalDocumentKey, - NSMetadataUbiquitousItemIsSharedKey, NSMetadataUbiquitousItemIsUploadedKey, - NSMetadataUbiquitousItemIsUploadingKey, NSMetadataUbiquitousItemPercentDownloadedKey, - NSMetadataUbiquitousItemPercentUploadedKey, NSMetadataUbiquitousItemURLInLocalContainerKey, - NSMetadataUbiquitousItemUploadingErrorKey, - NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey, - NSMetadataUbiquitousSharedItemCurrentUserRoleKey, - NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey, - NSMetadataUbiquitousSharedItemOwnerNameComponentsKey, - NSMetadataUbiquitousSharedItemPermissionsReadOnly, - NSMetadataUbiquitousSharedItemPermissionsReadWrite, - NSMetadataUbiquitousSharedItemRoleOwner, NSMetadataUbiquitousSharedItemRoleParticipant, - }; - pub use super::NSMethodSignature::NSMethodSignature; - pub use super::NSMorphology::{ - NSGrammaticalGender, NSGrammaticalGenderFeminine, NSGrammaticalGenderMasculine, - NSGrammaticalGenderNeuter, NSGrammaticalGenderNotSet, NSGrammaticalNumber, - NSGrammaticalNumberNotSet, NSGrammaticalNumberPlural, NSGrammaticalNumberPluralFew, - NSGrammaticalNumberPluralMany, NSGrammaticalNumberPluralTwo, NSGrammaticalNumberSingular, - NSGrammaticalNumberZero, NSGrammaticalPartOfSpeech, NSGrammaticalPartOfSpeechAbbreviation, - NSGrammaticalPartOfSpeechAdjective, NSGrammaticalPartOfSpeechAdposition, - NSGrammaticalPartOfSpeechAdverb, NSGrammaticalPartOfSpeechConjunction, - NSGrammaticalPartOfSpeechDeterminer, NSGrammaticalPartOfSpeechInterjection, - NSGrammaticalPartOfSpeechLetter, NSGrammaticalPartOfSpeechNotSet, - NSGrammaticalPartOfSpeechNoun, NSGrammaticalPartOfSpeechNumeral, - NSGrammaticalPartOfSpeechParticle, NSGrammaticalPartOfSpeechPreposition, - NSGrammaticalPartOfSpeechPronoun, NSGrammaticalPartOfSpeechVerb, NSMorphology, - NSMorphologyCustomPronoun, - }; - pub use super::NSNetServices::{ - NSNetService, NSNetServiceBrowser, NSNetServiceBrowserDelegate, NSNetServiceDelegate, - NSNetServiceListenForConnections, NSNetServiceNoAutoRename, NSNetServiceOptions, - NSNetServicesActivityInProgress, NSNetServicesBadArgumentError, - NSNetServicesCancelledError, NSNetServicesCollisionError, NSNetServicesError, - NSNetServicesErrorCode, NSNetServicesErrorDomain, NSNetServicesInvalidError, - NSNetServicesMissingRequiredConfigurationError, NSNetServicesNotFoundError, - NSNetServicesTimeoutError, NSNetServicesUnknownError, - }; - pub use super::NSNotification::{NSNotification, NSNotificationCenter, NSNotificationName}; - pub use super::NSNotificationQueue::{ - NSNotificationCoalescing, NSNotificationCoalescingOnName, NSNotificationCoalescingOnSender, - NSNotificationNoCoalescing, NSNotificationQueue, NSPostASAP, NSPostNow, NSPostWhenIdle, - NSPostingStyle, - }; - pub use super::NSNull::NSNull; - pub use super::NSNumberFormatter::{ - NSNumberFormatter, NSNumberFormatterBehavior, NSNumberFormatterBehavior10_0, - NSNumberFormatterBehavior10_4, NSNumberFormatterBehaviorDefault, - NSNumberFormatterCurrencyAccountingStyle, NSNumberFormatterCurrencyISOCodeStyle, - NSNumberFormatterCurrencyPluralStyle, NSNumberFormatterCurrencyStyle, - NSNumberFormatterDecimalStyle, NSNumberFormatterNoStyle, NSNumberFormatterOrdinalStyle, - NSNumberFormatterPadAfterPrefix, NSNumberFormatterPadAfterSuffix, - NSNumberFormatterPadBeforePrefix, NSNumberFormatterPadBeforeSuffix, - NSNumberFormatterPadPosition, NSNumberFormatterPercentStyle, NSNumberFormatterRoundCeiling, - NSNumberFormatterRoundDown, NSNumberFormatterRoundFloor, NSNumberFormatterRoundHalfDown, - NSNumberFormatterRoundHalfEven, NSNumberFormatterRoundHalfUp, NSNumberFormatterRoundUp, - NSNumberFormatterRoundingMode, NSNumberFormatterScientificStyle, - NSNumberFormatterSpellOutStyle, NSNumberFormatterStyle, - }; - pub use super::NSObjCRuntime::{ - NSComparator, NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, - NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, NSOrderedAscending, - NSOrderedDescending, NSOrderedSame, NSQualityOfService, NSQualityOfServiceBackground, - NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, - NSQualityOfServiceUserInteractive, NSQualityOfServiceUtility, NSRunLoopMode, - NSSortConcurrent, NSSortOptions, NSSortStable, - }; - pub use super::NSObject::{ - NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, - }; - pub use super::NSOperation::{ - NSBlockOperation, NSInvocationOperation, NSInvocationOperationCancelledException, - NSInvocationOperationVoidResultException, NSOperation, NSOperationQueue, - NSOperationQueueDefaultMaxConcurrentOperationCount, NSOperationQueuePriority, - NSOperationQueuePriorityHigh, NSOperationQueuePriorityLow, NSOperationQueuePriorityNormal, - NSOperationQueuePriorityVeryHigh, NSOperationQueuePriorityVeryLow, - }; - pub use super::NSOrderedCollectionChange::{ - NSCollectionChangeInsert, NSCollectionChangeRemove, NSCollectionChangeType, - NSOrderedCollectionChange, - }; - pub use super::NSOrderedCollectionDifference::{ - NSOrderedCollectionDifference, NSOrderedCollectionDifferenceCalculationInferMoves, - NSOrderedCollectionDifferenceCalculationOmitInsertedObjects, - NSOrderedCollectionDifferenceCalculationOmitRemovedObjects, - NSOrderedCollectionDifferenceCalculationOptions, - }; - pub use super::NSOrderedSet::{NSMutableOrderedSet, NSOrderedSet}; - pub use super::NSOrthography::NSOrthography; - pub use super::NSPathUtilities::{ - NSAdminApplicationDirectory, NSAllApplicationsDirectory, NSAllDomainsMask, - NSAllLibrariesDirectory, NSApplicationDirectory, NSApplicationScriptsDirectory, - NSApplicationSupportDirectory, NSAutosavedInformationDirectory, NSCachesDirectory, - NSCoreServiceDirectory, NSDemoApplicationDirectory, NSDesktopDirectory, - NSDeveloperApplicationDirectory, NSDeveloperDirectory, NSDocumentDirectory, - NSDocumentationDirectory, NSDownloadsDirectory, NSInputMethodsDirectory, - NSItemReplacementDirectory, NSLibraryDirectory, NSLocalDomainMask, NSMoviesDirectory, - NSMusicDirectory, NSNetworkDomainMask, NSPicturesDirectory, NSPreferencePanesDirectory, - NSPrinterDescriptionDirectory, NSSearchPathDirectory, NSSearchPathDomainMask, - NSSharedPublicDirectory, NSSystemDomainMask, NSTrashDirectory, NSUserDirectory, - NSUserDomainMask, - }; - pub use super::NSPersonNameComponents::NSPersonNameComponents; - pub use super::NSPersonNameComponentsFormatter::{ - NSPersonNameComponentDelimiter, NSPersonNameComponentFamilyName, - NSPersonNameComponentGivenName, NSPersonNameComponentKey, NSPersonNameComponentMiddleName, - NSPersonNameComponentNickname, NSPersonNameComponentPrefix, NSPersonNameComponentSuffix, - NSPersonNameComponentsFormatter, NSPersonNameComponentsFormatterOptions, - NSPersonNameComponentsFormatterPhonetic, NSPersonNameComponentsFormatterStyle, - NSPersonNameComponentsFormatterStyleAbbreviated, - NSPersonNameComponentsFormatterStyleDefault, NSPersonNameComponentsFormatterStyleLong, - NSPersonNameComponentsFormatterStyleMedium, NSPersonNameComponentsFormatterStyleShort, - }; - pub use super::NSPointerArray::NSPointerArray; - pub use super::NSPointerFunctions::{ - NSPointerFunctions, NSPointerFunctionsCStringPersonality, NSPointerFunctionsCopyIn, - NSPointerFunctionsIntegerPersonality, NSPointerFunctionsMachVirtualMemory, - NSPointerFunctionsMallocMemory, NSPointerFunctionsObjectPersonality, - NSPointerFunctionsObjectPointerPersonality, NSPointerFunctionsOpaqueMemory, - NSPointerFunctionsOpaquePersonality, NSPointerFunctionsOptions, - NSPointerFunctionsStrongMemory, NSPointerFunctionsStructPersonality, - NSPointerFunctionsWeakMemory, NSPointerFunctionsZeroingWeakMemory, - }; - pub use super::NSPort::{ - NSMachPort, NSMachPortDeallocateNone, NSMachPortDeallocateReceiveRight, - NSMachPortDeallocateSendRight, NSMachPortDelegate, NSMachPortOptions, NSMessagePort, - NSPort, NSPortDelegate, NSPortDidBecomeInvalidNotification, NSSocketNativeHandle, - NSSocketPort, - }; - pub use super::NSPortCoder::NSPortCoder; - pub use super::NSPortMessage::NSPortMessage; - pub use super::NSPortNameServer::{ - NSMachBootstrapServer, NSMessagePortNameServer, NSPortNameServer, NSSocketPortNameServer, - }; - pub use super::NSPredicate::NSPredicate; - pub use super::NSProcessInfo::{ - NSActivityAutomaticTerminationDisabled, NSActivityBackground, - NSActivityIdleDisplaySleepDisabled, NSActivityIdleSystemSleepDisabled, - NSActivityLatencyCritical, NSActivityOptions, NSActivitySuddenTerminationDisabled, - NSActivityUserInitiated, NSActivityUserInitiatedAllowingIdleSystemSleep, - NSHPUXOperatingSystem, NSMACHOperatingSystem, NSOSF1OperatingSystem, - NSOperatingSystemVersion, NSProcessInfo, NSProcessInfoPowerStateDidChangeNotification, - NSProcessInfoThermalState, NSProcessInfoThermalStateCritical, - NSProcessInfoThermalStateDidChangeNotification, NSProcessInfoThermalStateFair, - NSProcessInfoThermalStateNominal, NSProcessInfoThermalStateSerious, - NSSolarisOperatingSystem, NSSunOSOperatingSystem, NSWindows95OperatingSystem, - NSWindowsNTOperatingSystem, - }; - pub use super::NSProgress::{ - NSProgress, NSProgressEstimatedTimeRemainingKey, NSProgressFileAnimationImageKey, - NSProgressFileAnimationImageOriginalRectKey, NSProgressFileCompletedCountKey, - NSProgressFileIconKey, NSProgressFileOperationKind, NSProgressFileOperationKindCopying, - NSProgressFileOperationKindDecompressingAfterDownloading, - NSProgressFileOperationKindDownloading, NSProgressFileOperationKindDuplicating, - NSProgressFileOperationKindKey, NSProgressFileOperationKindReceiving, - NSProgressFileOperationKindUploading, NSProgressFileTotalCountKey, NSProgressFileURLKey, - NSProgressKind, NSProgressKindFile, NSProgressPublishingHandler, NSProgressReporting, - NSProgressThroughputKey, NSProgressUnpublishingHandler, NSProgressUserInfoKey, - }; - pub use super::NSPropertyList::{ - NSPropertyListBinaryFormat_v1_0, NSPropertyListFormat, NSPropertyListImmutable, - NSPropertyListMutabilityOptions, NSPropertyListMutableContainers, - NSPropertyListMutableContainersAndLeaves, NSPropertyListOpenStepFormat, - NSPropertyListReadOptions, NSPropertyListSerialization, NSPropertyListWriteOptions, - NSPropertyListXMLFormat_v1_0, - }; - pub use super::NSProtocolChecker::NSProtocolChecker; - pub use super::NSRange::{NSRange, NSRangePointer}; - pub use super::NSRegularExpression::{ - NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, - NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, - NSMatchingReportProgress, NSMatchingRequiredEnd, NSMatchingWithTransparentBounds, - NSMatchingWithoutAnchoringBounds, NSRegularExpression, - NSRegularExpressionAllowCommentsAndWhitespace, NSRegularExpressionAnchorsMatchLines, - NSRegularExpressionCaseInsensitive, NSRegularExpressionDotMatchesLineSeparators, - NSRegularExpressionIgnoreMetacharacters, NSRegularExpressionOptions, - NSRegularExpressionUseUnicodeWordBoundaries, NSRegularExpressionUseUnixLineSeparators, - }; - pub use super::NSRelativeDateTimeFormatter::{ - NSRelativeDateTimeFormatter, NSRelativeDateTimeFormatterStyle, - NSRelativeDateTimeFormatterStyleNamed, NSRelativeDateTimeFormatterStyleNumeric, - NSRelativeDateTimeFormatterUnitsStyle, NSRelativeDateTimeFormatterUnitsStyleAbbreviated, - NSRelativeDateTimeFormatterUnitsStyleFull, NSRelativeDateTimeFormatterUnitsStyleShort, - NSRelativeDateTimeFormatterUnitsStyleSpellOut, - }; - pub use super::NSRunLoop::{NSDefaultRunLoopMode, NSRunLoop, NSRunLoopCommonModes}; - pub use super::NSScanner::NSScanner; - pub use super::NSScriptClassDescription::NSScriptClassDescription; - pub use super::NSScriptCoercionHandler::NSScriptCoercionHandler; - pub use super::NSScriptCommand::{ - NSArgumentEvaluationScriptError, NSArgumentsWrongScriptError, - NSCannotCreateScriptCommandError, NSInternalScriptError, - NSKeySpecifierEvaluationScriptError, NSNoScriptError, - NSOperationNotSupportedForKeyScriptError, NSReceiverEvaluationScriptError, - NSReceiversCantHandleCommandScriptError, NSRequiredArgumentsMissingScriptError, - NSScriptCommand, NSUnknownKeyScriptError, - }; - pub use super::NSScriptCommandDescription::NSScriptCommandDescription; - pub use super::NSScriptExecutionContext::NSScriptExecutionContext; - pub use super::NSScriptKeyValueCoding::NSOperationNotSupportedForKeyException; - pub use super::NSScriptObjectSpecifiers::{ - NSContainerSpecifierError, NSEverySubelement, NSIndexSpecifier, NSIndexSubelement, - NSInsertionPosition, NSInternalSpecifierError, NSInvalidIndexSpecifierError, - NSMiddleSpecifier, NSMiddleSubelement, NSNameSpecifier, NSNoSpecifierError, NSNoSubelement, - NSNoTopLevelContainersSpecifierError, NSOperationNotSupportedForKeySpecifierError, - NSPositionAfter, NSPositionBefore, NSPositionBeginning, NSPositionEnd, NSPositionReplace, - NSPositionalSpecifier, NSPropertySpecifier, NSRandomSpecifier, NSRandomSubelement, - NSRangeSpecifier, NSRelativeAfter, NSRelativeBefore, NSRelativePosition, - NSRelativeSpecifier, NSScriptObjectSpecifier, NSUniqueIDSpecifier, - NSUnknownKeySpecifierError, NSWhoseSpecifier, NSWhoseSubelementIdentifier, - }; - pub use super::NSScriptStandardSuiteCommands::{ - NSCloneCommand, NSCloseCommand, NSCountCommand, NSCreateCommand, NSDeleteCommand, - NSExistsCommand, NSGetCommand, NSMoveCommand, NSQuitCommand, NSSaveOptions, - NSSaveOptionsAsk, NSSaveOptionsNo, NSSaveOptionsYes, NSSetCommand, - }; - pub use super::NSScriptSuiteRegistry::NSScriptSuiteRegistry; - pub use super::NSScriptWhoseTests::{ - NSBeginsWithComparison, NSContainsComparison, NSEndsWithComparison, NSEqualToComparison, - NSGreaterThanComparison, NSGreaterThanOrEqualToComparison, NSLessThanComparison, - NSLessThanOrEqualToComparison, NSLogicalTest, NSScriptWhoseTest, NSSpecifierTest, - NSTestComparisonOperation, - }; - pub use super::NSSet::{NSCountedSet, NSMutableSet, NSSet}; - pub use super::NSSortDescriptor::NSSortDescriptor; - pub use super::NSSpellServer::{ - NSGrammarCorrections, NSGrammarRange, NSGrammarUserDescription, NSSpellServer, - NSSpellServerDelegate, - }; - pub use super::NSStream::{ - NSInputStream, NSOutputStream, NSStream, NSStreamDataWrittenToMemoryStreamKey, - NSStreamDelegate, NSStreamEvent, NSStreamEventEndEncountered, NSStreamEventErrorOccurred, - NSStreamEventHasBytesAvailable, NSStreamEventHasSpaceAvailable, NSStreamEventNone, - NSStreamEventOpenCompleted, NSStreamFileCurrentOffsetKey, NSStreamNetworkServiceType, - NSStreamNetworkServiceTypeBackground, NSStreamNetworkServiceTypeCallSignaling, - NSStreamNetworkServiceTypeValue, NSStreamNetworkServiceTypeVideo, - NSStreamNetworkServiceTypeVoIP, NSStreamNetworkServiceTypeVoice, NSStreamPropertyKey, - NSStreamSOCKSErrorDomain, NSStreamSOCKSProxyConfiguration, - NSStreamSOCKSProxyConfigurationKey, NSStreamSOCKSProxyHostKey, - NSStreamSOCKSProxyPasswordKey, NSStreamSOCKSProxyPortKey, NSStreamSOCKSProxyUserKey, - NSStreamSOCKSProxyVersion, NSStreamSOCKSProxyVersion4, NSStreamSOCKSProxyVersion5, - NSStreamSOCKSProxyVersionKey, NSStreamSocketSSLErrorDomain, NSStreamSocketSecurityLevel, - NSStreamSocketSecurityLevelKey, NSStreamSocketSecurityLevelNegotiatedSSL, - NSStreamSocketSecurityLevelNone, NSStreamSocketSecurityLevelSSLv2, - NSStreamSocketSecurityLevelSSLv3, NSStreamSocketSecurityLevelTLSv1, NSStreamStatus, - NSStreamStatusAtEnd, NSStreamStatusClosed, NSStreamStatusError, NSStreamStatusNotOpen, - NSStreamStatusOpen, NSStreamStatusOpening, NSStreamStatusReading, NSStreamStatusWriting, - }; - pub use super::NSString::{ - unichar, NSASCIIStringEncoding, NSAnchoredSearch, NSBackwardsSearch, - NSCaseInsensitiveSearch, NSCharacterConversionException, NSConstantString, - NSDiacriticInsensitiveSearch, NSForcedOrderingSearch, NSISO2022JPStringEncoding, - NSISOLatin1StringEncoding, NSISOLatin2StringEncoding, NSJapaneseEUCStringEncoding, - NSLiteralSearch, NSMacOSRomanStringEncoding, NSMutableString, NSNEXTSTEPStringEncoding, - NSNonLossyASCIIStringEncoding, NSNumericSearch, NSParseErrorException, - NSProprietaryStringEncoding, NSRegularExpressionSearch, NSShiftJISStringEncoding, - NSSimpleCString, NSString, NSStringCompareOptions, NSStringEncoding, - NSStringEncodingConversionAllowLossy, NSStringEncodingConversionExternalRepresentation, - NSStringEncodingConversionOptions, NSStringEncodingDetectionAllowLossyKey, - NSStringEncodingDetectionDisallowedEncodingsKey, NSStringEncodingDetectionFromWindowsKey, - NSStringEncodingDetectionLikelyLanguageKey, NSStringEncodingDetectionLossySubstitutionKey, - NSStringEncodingDetectionOptionsKey, NSStringEncodingDetectionSuggestedEncodingsKey, - NSStringEncodingDetectionUseOnlySuggestedEncodingsKey, NSStringEnumerationByCaretPositions, - NSStringEnumerationByComposedCharacterSequences, NSStringEnumerationByDeletionClusters, - NSStringEnumerationByLines, NSStringEnumerationByParagraphs, - NSStringEnumerationBySentences, NSStringEnumerationByWords, NSStringEnumerationLocalized, - NSStringEnumerationOptions, NSStringEnumerationReverse, - NSStringEnumerationSubstringNotRequired, NSStringTransform, - NSStringTransformFullwidthToHalfwidth, NSStringTransformHiraganaToKatakana, - NSStringTransformLatinToArabic, NSStringTransformLatinToCyrillic, - NSStringTransformLatinToGreek, NSStringTransformLatinToHangul, - NSStringTransformLatinToHebrew, NSStringTransformLatinToHiragana, - NSStringTransformLatinToKatakana, NSStringTransformLatinToThai, - NSStringTransformMandarinToLatin, NSStringTransformStripCombiningMarks, - NSStringTransformStripDiacritics, NSStringTransformToLatin, NSStringTransformToUnicodeName, - NSStringTransformToXMLHex, NSSymbolStringEncoding, NSUTF16BigEndianStringEncoding, - NSUTF16LittleEndianStringEncoding, NSUTF16StringEncoding, NSUTF32BigEndianStringEncoding, - NSUTF32LittleEndianStringEncoding, NSUTF32StringEncoding, NSUTF8StringEncoding, - NSUnicodeStringEncoding, NSWidthInsensitiveSearch, NSWindowsCP1250StringEncoding, - NSWindowsCP1251StringEncoding, NSWindowsCP1252StringEncoding, - NSWindowsCP1253StringEncoding, NSWindowsCP1254StringEncoding, - }; - pub use super::NSTask::{ - NSTask, NSTaskDidTerminateNotification, NSTaskTerminationReason, - NSTaskTerminationReasonExit, NSTaskTerminationReasonUncaughtSignal, - }; - pub use super::NSTextCheckingResult::{ - NSTextCheckingAirlineKey, NSTextCheckingAllCustomTypes, NSTextCheckingAllSystemTypes, - NSTextCheckingAllTypes, NSTextCheckingCityKey, NSTextCheckingCountryKey, - NSTextCheckingFlightKey, NSTextCheckingJobTitleKey, NSTextCheckingKey, - NSTextCheckingNameKey, NSTextCheckingOrganizationKey, NSTextCheckingPhoneKey, - NSTextCheckingResult, NSTextCheckingStateKey, NSTextCheckingStreetKey, NSTextCheckingType, - NSTextCheckingTypeAddress, NSTextCheckingTypeCorrection, NSTextCheckingTypeDash, - NSTextCheckingTypeDate, NSTextCheckingTypeGrammar, NSTextCheckingTypeLink, - NSTextCheckingTypeOrthography, NSTextCheckingTypePhoneNumber, NSTextCheckingTypeQuote, - NSTextCheckingTypeRegularExpression, NSTextCheckingTypeReplacement, - NSTextCheckingTypeSpelling, NSTextCheckingTypeTransitInformation, NSTextCheckingTypes, - NSTextCheckingZIPKey, - }; - pub use super::NSThread::{ - NSDidBecomeSingleThreadedNotification, NSThread, NSThreadWillExitNotification, - NSWillBecomeMultiThreadedNotification, - }; - pub use super::NSTimeZone::{ - NSSystemTimeZoneDidChangeNotification, NSTimeZone, NSTimeZoneNameStyle, - NSTimeZoneNameStyleDaylightSaving, NSTimeZoneNameStyleGeneric, - NSTimeZoneNameStyleShortDaylightSaving, NSTimeZoneNameStyleShortGeneric, - NSTimeZoneNameStyleShortStandard, NSTimeZoneNameStyleStandard, - }; - pub use super::NSTimer::NSTimer; - pub use super::NSURLAuthenticationChallenge::{ - NSURLAuthenticationChallenge, NSURLAuthenticationChallengeSender, - }; - pub use super::NSURLCache::{ - NSCachedURLResponse, NSURLCache, NSURLCacheStorageAllowed, - NSURLCacheStorageAllowedInMemoryOnly, NSURLCacheStorageNotAllowed, NSURLCacheStoragePolicy, - }; - pub use super::NSURLConnection::{ - NSURLConnection, NSURLConnectionDataDelegate, NSURLConnectionDelegate, - NSURLConnectionDownloadDelegate, - }; - pub use super::NSURLCredential::{ - NSURLCredential, NSURLCredentialPersistence, NSURLCredentialPersistenceForSession, - NSURLCredentialPersistenceNone, NSURLCredentialPersistencePermanent, - NSURLCredentialPersistenceSynchronizable, - }; - pub use super::NSURLCredentialStorage::{ - NSURLCredentialStorage, NSURLCredentialStorageChangedNotification, - NSURLCredentialStorageRemoveSynchronizableCredentials, - }; - pub use super::NSURLDownload::{NSURLDownload, NSURLDownloadDelegate}; - pub use super::NSURLError::{ - NSErrorFailingURLStringKey, NSURLErrorAppTransportSecurityRequiresSecureConnection, - NSURLErrorBackgroundSessionInUseByAnotherProcess, - NSURLErrorBackgroundSessionRequiresSharedContainer, - NSURLErrorBackgroundSessionWasDisconnected, NSURLErrorBackgroundTaskCancelledReasonKey, - NSURLErrorBadServerResponse, NSURLErrorBadURL, NSURLErrorCallIsActive, NSURLErrorCancelled, - NSURLErrorCancelledReasonBackgroundUpdatesDisabled, - NSURLErrorCancelledReasonInsufficientSystemResources, - NSURLErrorCancelledReasonUserForceQuitApplication, NSURLErrorCannotCloseFile, - NSURLErrorCannotConnectToHost, NSURLErrorCannotCreateFile, - NSURLErrorCannotDecodeContentData, NSURLErrorCannotDecodeRawData, NSURLErrorCannotFindHost, - NSURLErrorCannotLoadFromNetwork, NSURLErrorCannotMoveFile, NSURLErrorCannotOpenFile, - NSURLErrorCannotParseResponse, NSURLErrorCannotRemoveFile, NSURLErrorCannotWriteToFile, - NSURLErrorClientCertificateRejected, NSURLErrorClientCertificateRequired, - NSURLErrorDNSLookupFailed, NSURLErrorDataLengthExceedsMaximum, NSURLErrorDataNotAllowed, - NSURLErrorDomain, NSURLErrorDownloadDecodingFailedMidStream, - NSURLErrorDownloadDecodingFailedToComplete, NSURLErrorFailingURLErrorKey, - NSURLErrorFailingURLPeerTrustErrorKey, NSURLErrorFailingURLStringErrorKey, - NSURLErrorFileDoesNotExist, NSURLErrorFileIsDirectory, NSURLErrorFileOutsideSafeArea, - NSURLErrorHTTPTooManyRedirects, NSURLErrorInternationalRoamingOff, - NSURLErrorNetworkConnectionLost, NSURLErrorNetworkUnavailableReason, - NSURLErrorNetworkUnavailableReasonCellular, NSURLErrorNetworkUnavailableReasonConstrained, - NSURLErrorNetworkUnavailableReasonExpensive, NSURLErrorNetworkUnavailableReasonKey, - NSURLErrorNoPermissionsToReadFile, NSURLErrorNotConnectedToInternet, - NSURLErrorRedirectToNonExistentLocation, NSURLErrorRequestBodyStreamExhausted, - NSURLErrorResourceUnavailable, NSURLErrorSecureConnectionFailed, - NSURLErrorServerCertificateHasBadDate, NSURLErrorServerCertificateHasUnknownRoot, - NSURLErrorServerCertificateNotYetValid, NSURLErrorServerCertificateUntrusted, - NSURLErrorTimedOut, NSURLErrorUnknown, NSURLErrorUnsupportedURL, - NSURLErrorUserAuthenticationRequired, NSURLErrorUserCancelledAuthentication, - NSURLErrorZeroByteResource, - }; - pub use super::NSURLHandle::{ - NSFTPPropertyActiveTransferModeKey, NSFTPPropertyFTPProxy, NSFTPPropertyFileOffsetKey, - NSFTPPropertyUserLoginKey, NSFTPPropertyUserPasswordKey, NSHTTPPropertyErrorPageDataKey, - NSHTTPPropertyHTTPProxy, NSHTTPPropertyRedirectionHeadersKey, - NSHTTPPropertyServerHTTPVersionKey, NSHTTPPropertyStatusCodeKey, - NSHTTPPropertyStatusReasonKey, NSURLHandle, NSURLHandleClient, NSURLHandleLoadFailed, - NSURLHandleLoadInProgress, NSURLHandleLoadSucceeded, NSURLHandleNotLoaded, - NSURLHandleStatus, - }; - pub use super::NSURLProtectionSpace::{ - NSURLAuthenticationMethodClientCertificate, NSURLAuthenticationMethodDefault, - NSURLAuthenticationMethodHTMLForm, NSURLAuthenticationMethodHTTPBasic, - NSURLAuthenticationMethodHTTPDigest, NSURLAuthenticationMethodNTLM, - NSURLAuthenticationMethodNegotiate, NSURLAuthenticationMethodServerTrust, - NSURLProtectionSpace, NSURLProtectionSpaceFTP, NSURLProtectionSpaceFTPProxy, - NSURLProtectionSpaceHTTP, NSURLProtectionSpaceHTTPProxy, NSURLProtectionSpaceHTTPS, - NSURLProtectionSpaceHTTPSProxy, NSURLProtectionSpaceSOCKSProxy, - }; - pub use super::NSURLProtocol::{NSURLProtocol, NSURLProtocolClient}; - pub use super::NSURLRequest::{ - NSMutableURLRequest, NSURLNetworkServiceTypeAVStreaming, NSURLNetworkServiceTypeBackground, - NSURLNetworkServiceTypeCallSignaling, NSURLNetworkServiceTypeDefault, - NSURLNetworkServiceTypeResponsiveAV, NSURLNetworkServiceTypeResponsiveData, - NSURLNetworkServiceTypeVideo, NSURLNetworkServiceTypeVoIP, NSURLNetworkServiceTypeVoice, - NSURLRequest, NSURLRequestAttribution, NSURLRequestAttributionDeveloper, - NSURLRequestAttributionUser, NSURLRequestCachePolicy, NSURLRequestNetworkServiceType, - NSURLRequestReloadIgnoringCacheData, NSURLRequestReloadIgnoringLocalAndRemoteCacheData, - NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestReloadRevalidatingCacheData, - NSURLRequestReturnCacheDataDontLoad, NSURLRequestReturnCacheDataElseLoad, - NSURLRequestUseProtocolCachePolicy, - }; - pub use super::NSURLResponse::{NSHTTPURLResponse, NSURLResponse}; - pub use super::NSURLSession::{ - NSURLSession, NSURLSessionAuthChallengeCancelAuthenticationChallenge, - NSURLSessionAuthChallengeDisposition, NSURLSessionAuthChallengePerformDefaultHandling, - NSURLSessionAuthChallengeRejectProtectionSpace, NSURLSessionAuthChallengeUseCredential, - NSURLSessionConfiguration, NSURLSessionDataDelegate, NSURLSessionDataTask, - NSURLSessionDelayedRequestCancel, NSURLSessionDelayedRequestContinueLoading, - NSURLSessionDelayedRequestDisposition, NSURLSessionDelayedRequestUseNewRequest, - NSURLSessionDelegate, NSURLSessionDownloadDelegate, NSURLSessionDownloadTask, - NSURLSessionDownloadTaskResumeData, NSURLSessionMultipathServiceType, - NSURLSessionMultipathServiceTypeAggregate, NSURLSessionMultipathServiceTypeHandover, - NSURLSessionMultipathServiceTypeInteractive, NSURLSessionMultipathServiceTypeNone, - NSURLSessionResponseAllow, NSURLSessionResponseBecomeDownload, - NSURLSessionResponseBecomeStream, NSURLSessionResponseCancel, - NSURLSessionResponseDisposition, NSURLSessionStreamDelegate, NSURLSessionStreamTask, - NSURLSessionTask, NSURLSessionTaskDelegate, NSURLSessionTaskMetrics, - NSURLSessionTaskMetricsDomainResolutionProtocol, - NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS, - NSURLSessionTaskMetricsDomainResolutionProtocolTCP, - NSURLSessionTaskMetricsDomainResolutionProtocolTLS, - NSURLSessionTaskMetricsDomainResolutionProtocolUDP, - NSURLSessionTaskMetricsDomainResolutionProtocolUnknown, - NSURLSessionTaskMetricsResourceFetchType, - NSURLSessionTaskMetricsResourceFetchTypeLocalCache, - NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad, - NSURLSessionTaskMetricsResourceFetchTypeServerPush, - NSURLSessionTaskMetricsResourceFetchTypeUnknown, NSURLSessionTaskPriorityDefault, - NSURLSessionTaskPriorityHigh, NSURLSessionTaskPriorityLow, NSURLSessionTaskState, - NSURLSessionTaskStateCanceling, NSURLSessionTaskStateCompleted, - NSURLSessionTaskStateRunning, NSURLSessionTaskStateSuspended, - NSURLSessionTaskTransactionMetrics, NSURLSessionTransferSizeUnknown, - NSURLSessionUploadTask, NSURLSessionWebSocketCloseCode, - NSURLSessionWebSocketCloseCodeAbnormalClosure, NSURLSessionWebSocketCloseCodeGoingAway, - NSURLSessionWebSocketCloseCodeInternalServerError, NSURLSessionWebSocketCloseCodeInvalid, - NSURLSessionWebSocketCloseCodeInvalidFramePayloadData, - NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing, - NSURLSessionWebSocketCloseCodeMessageTooBig, - NSURLSessionWebSocketCloseCodeNoStatusReceived, - NSURLSessionWebSocketCloseCodeNormalClosure, NSURLSessionWebSocketCloseCodePolicyViolation, - NSURLSessionWebSocketCloseCodeProtocolError, - NSURLSessionWebSocketCloseCodeTLSHandshakeFailure, - NSURLSessionWebSocketCloseCodeUnsupportedData, NSURLSessionWebSocketDelegate, - NSURLSessionWebSocketMessage, NSURLSessionWebSocketMessageType, - NSURLSessionWebSocketMessageTypeData, NSURLSessionWebSocketMessageTypeString, - NSURLSessionWebSocketTask, - }; - pub use super::NSUbiquitousKeyValueStore::{ - NSUbiquitousKeyValueStore, NSUbiquitousKeyValueStoreAccountChange, - NSUbiquitousKeyValueStoreChangeReasonKey, NSUbiquitousKeyValueStoreChangedKeysKey, - NSUbiquitousKeyValueStoreDidChangeExternallyNotification, - NSUbiquitousKeyValueStoreInitialSyncChange, NSUbiquitousKeyValueStoreQuotaViolationChange, - NSUbiquitousKeyValueStoreServerChange, - }; - pub use super::NSUndoManager::{ - NSUndoCloseGroupingRunLoopOrdering, NSUndoManager, NSUndoManagerCheckpointNotification, - NSUndoManagerDidCloseUndoGroupNotification, NSUndoManagerDidOpenUndoGroupNotification, - NSUndoManagerDidRedoChangeNotification, NSUndoManagerDidUndoChangeNotification, - NSUndoManagerGroupIsDiscardableKey, NSUndoManagerWillCloseUndoGroupNotification, - NSUndoManagerWillRedoChangeNotification, NSUndoManagerWillUndoChangeNotification, - }; - pub use super::NSUnit::{ - NSDimension, NSUnit, NSUnitAcceleration, NSUnitAngle, NSUnitArea, NSUnitConcentrationMass, - NSUnitConverter, NSUnitConverterLinear, NSUnitDispersion, NSUnitDuration, - NSUnitElectricCharge, NSUnitElectricCurrent, NSUnitElectricPotentialDifference, - NSUnitElectricResistance, NSUnitEnergy, NSUnitFrequency, NSUnitFuelEfficiency, - NSUnitIlluminance, NSUnitInformationStorage, NSUnitLength, NSUnitMass, NSUnitPower, - NSUnitPressure, NSUnitSpeed, NSUnitTemperature, NSUnitVolume, - }; - pub use super::NSUserActivity::{ - NSUserActivity, NSUserActivityDelegate, NSUserActivityPersistentIdentifier, - NSUserActivityTypeBrowsingWeb, - }; - pub use super::NSUserDefaults::{ - NSAMPMDesignation, NSArgumentDomain, NSCurrencySymbol, NSDateFormatString, - NSDateTimeOrdering, NSDecimalDigits, NSDecimalSeparator, NSEarlierTimeDesignations, - NSGlobalDomain, NSHourNameDesignations, NSInternationalCurrencyString, - NSLaterTimeDesignations, NSMonthNameArray, NSNegativeCurrencyFormatString, - NSNextDayDesignations, NSNextNextDayDesignations, NSPositiveCurrencyFormatString, - NSPriorDayDesignations, NSRegistrationDomain, NSShortDateFormatString, - NSShortMonthNameArray, NSShortTimeDateFormatString, NSShortWeekDayNameArray, - NSThisDayDesignations, NSThousandsSeparator, NSTimeDateFormatString, NSTimeFormatString, - NSUbiquitousUserDefaultsCompletedInitialSyncNotification, - NSUbiquitousUserDefaultsDidChangeAccountsNotification, - NSUbiquitousUserDefaultsNoCloudAccountNotification, NSUserDefaults, - NSUserDefaultsDidChangeNotification, NSUserDefaultsSizeLimitExceededNotification, - NSWeekDayNameArray, NSYearMonthWeekDesignations, - }; - pub use super::NSUserNotification::{ - NSUserNotification, NSUserNotificationAction, NSUserNotificationActivationType, - NSUserNotificationActivationTypeActionButtonClicked, - NSUserNotificationActivationTypeAdditionalActionClicked, - NSUserNotificationActivationTypeContentsClicked, NSUserNotificationActivationTypeNone, - NSUserNotificationActivationTypeReplied, NSUserNotificationCenter, - NSUserNotificationCenterDelegate, NSUserNotificationDefaultSoundName, - }; - pub use super::NSUserScriptTask::{ - NSUserAppleScriptTask, NSUserAppleScriptTaskCompletionHandler, NSUserAutomatorTask, - NSUserAutomatorTaskCompletionHandler, NSUserScriptTask, NSUserScriptTaskCompletionHandler, - NSUserUnixTask, NSUserUnixTaskCompletionHandler, - }; - pub use super::NSValue::{NSNumber, NSValue}; - pub use super::NSValueTransformer::{ - NSIsNilTransformerName, NSIsNotNilTransformerName, NSKeyedUnarchiveFromDataTransformerName, - NSNegateBooleanTransformerName, NSSecureUnarchiveFromDataTransformer, - NSSecureUnarchiveFromDataTransformerName, NSUnarchiveFromDataTransformerName, - NSValueTransformer, NSValueTransformerName, - }; - pub use super::NSXMLDTDNode::{ - NSXMLAttributeCDATAKind, NSXMLAttributeEntitiesKind, NSXMLAttributeEntityKind, - NSXMLAttributeEnumerationKind, NSXMLAttributeIDKind, NSXMLAttributeIDRefKind, - NSXMLAttributeIDRefsKind, NSXMLAttributeNMTokenKind, NSXMLAttributeNMTokensKind, - NSXMLAttributeNotationKind, NSXMLDTDNode, NSXMLDTDNodeKind, NSXMLElementDeclarationAnyKind, - NSXMLElementDeclarationElementKind, NSXMLElementDeclarationEmptyKind, - NSXMLElementDeclarationMixedKind, NSXMLElementDeclarationUndefinedKind, - NSXMLEntityGeneralKind, NSXMLEntityParameterKind, NSXMLEntityParsedKind, - NSXMLEntityPredefined, NSXMLEntityUnparsedKind, - }; - pub use super::NSXMLDocument::{ - NSXMLDocument, NSXMLDocumentContentKind, NSXMLDocumentHTMLKind, NSXMLDocumentTextKind, - NSXMLDocumentXHTMLKind, NSXMLDocumentXMLKind, - }; - pub use super::NSXMLElement::NSXMLElement; - pub use super::NSXMLNode::{ - NSXMLAttributeDeclarationKind, NSXMLAttributeKind, NSXMLCommentKind, NSXMLDTDKind, - NSXMLDocumentKind, NSXMLElementDeclarationKind, NSXMLElementKind, - NSXMLEntityDeclarationKind, NSXMLInvalidKind, NSXMLNamespaceKind, NSXMLNode, NSXMLNodeKind, - NSXMLNotationDeclarationKind, NSXMLProcessingInstructionKind, NSXMLTextKind, - }; - pub use super::NSXMLNodeOptions::{ - NSXMLDocumentIncludeContentTypeDeclaration, NSXMLDocumentTidyHTML, NSXMLDocumentTidyXML, - NSXMLDocumentValidate, NSXMLDocumentXInclude, NSXMLNodeCompactEmptyElement, - NSXMLNodeExpandEmptyElement, NSXMLNodeIsCDATA, NSXMLNodeLoadExternalEntitiesAlways, - NSXMLNodeLoadExternalEntitiesNever, NSXMLNodeLoadExternalEntitiesSameOriginOnly, - NSXMLNodeNeverEscapeContents, NSXMLNodeOptions, NSXMLNodeOptionsNone, NSXMLNodePreserveAll, - NSXMLNodePreserveAttributeOrder, NSXMLNodePreserveCDATA, - NSXMLNodePreserveCharacterReferences, NSXMLNodePreserveDTD, NSXMLNodePreserveEmptyElements, - NSXMLNodePreserveEntities, NSXMLNodePreserveNamespaceOrder, NSXMLNodePreservePrefixes, - NSXMLNodePreserveQuotes, NSXMLNodePreserveWhitespace, NSXMLNodePrettyPrint, - NSXMLNodePromoteSignificantWhitespace, NSXMLNodeUseDoubleQuotes, NSXMLNodeUseSingleQuotes, - }; - pub use super::NSXMLParser::{ - NSXMLParser, NSXMLParserAttributeHasNoValueError, NSXMLParserAttributeListNotFinishedError, - NSXMLParserAttributeListNotStartedError, NSXMLParserAttributeNotFinishedError, - NSXMLParserAttributeNotStartedError, NSXMLParserAttributeRedefinedError, - NSXMLParserCDATANotFinishedError, NSXMLParserCharacterRefAtEOFError, - NSXMLParserCharacterRefInDTDError, NSXMLParserCharacterRefInEpilogError, - NSXMLParserCharacterRefInPrologError, NSXMLParserCommentContainsDoubleHyphenError, - NSXMLParserCommentNotFinishedError, NSXMLParserConditionalSectionNotFinishedError, - NSXMLParserConditionalSectionNotStartedError, NSXMLParserDOCTYPEDeclNotFinishedError, - NSXMLParserDelegate, NSXMLParserDelegateAbortedParseError, NSXMLParserDocumentStartError, - NSXMLParserElementContentDeclNotFinishedError, - NSXMLParserElementContentDeclNotStartedError, NSXMLParserEmptyDocumentError, - NSXMLParserEncodingNotSupportedError, NSXMLParserEntityBoundaryError, - NSXMLParserEntityIsExternalError, NSXMLParserEntityIsParameterError, - NSXMLParserEntityNotFinishedError, NSXMLParserEntityNotStartedError, - NSXMLParserEntityRefAtEOFError, NSXMLParserEntityRefInDTDError, - NSXMLParserEntityRefInEpilogError, NSXMLParserEntityRefInPrologError, - NSXMLParserEntityRefLoopError, NSXMLParserEntityReferenceMissingSemiError, - NSXMLParserEntityReferenceWithoutNameError, NSXMLParserEntityValueRequiredError, - NSXMLParserEqualExpectedError, NSXMLParserError, NSXMLParserErrorDomain, - NSXMLParserExternalEntityResolvingPolicy, NSXMLParserExternalStandaloneEntityError, - NSXMLParserExternalSubsetNotFinishedError, NSXMLParserExtraContentError, - NSXMLParserGTRequiredError, NSXMLParserInternalError, NSXMLParserInvalidCharacterError, - NSXMLParserInvalidCharacterInEntityError, NSXMLParserInvalidCharacterRefError, - NSXMLParserInvalidConditionalSectionError, NSXMLParserInvalidDecimalCharacterRefError, - NSXMLParserInvalidEncodingError, NSXMLParserInvalidEncodingNameError, - NSXMLParserInvalidHexCharacterRefError, NSXMLParserInvalidURIError, - NSXMLParserLTRequiredError, NSXMLParserLTSlashRequiredError, - NSXMLParserLessThanSymbolInAttributeError, NSXMLParserLiteralNotFinishedError, - NSXMLParserLiteralNotStartedError, NSXMLParserMisplacedCDATAEndStringError, - NSXMLParserMisplacedXMLDeclarationError, NSXMLParserMixedContentDeclNotFinishedError, - NSXMLParserMixedContentDeclNotStartedError, NSXMLParserNAMERequiredError, - NSXMLParserNMTOKENRequiredError, NSXMLParserNamespaceDeclarationError, - NSXMLParserNoDTDError, NSXMLParserNotWellBalancedError, - NSXMLParserNotationNotFinishedError, NSXMLParserNotationNotStartedError, - NSXMLParserOutOfMemoryError, NSXMLParserPCDATARequiredError, - NSXMLParserParsedEntityRefAtEOFError, NSXMLParserParsedEntityRefInEpilogError, - NSXMLParserParsedEntityRefInInternalError, NSXMLParserParsedEntityRefInInternalSubsetError, - NSXMLParserParsedEntityRefInPrologError, NSXMLParserParsedEntityRefMissingSemiError, - NSXMLParserParsedEntityRefNoNameError, NSXMLParserPrematureDocumentEndError, - NSXMLParserProcessingInstructionNotFinishedError, - NSXMLParserProcessingInstructionNotStartedError, NSXMLParserPublicIdentifierRequiredError, - NSXMLParserResolveExternalEntitiesAlways, NSXMLParserResolveExternalEntitiesNever, - NSXMLParserResolveExternalEntitiesNoNetwork, - NSXMLParserResolveExternalEntitiesSameOriginOnly, NSXMLParserSeparatorRequiredError, - NSXMLParserSpaceRequiredError, NSXMLParserStandaloneValueError, - NSXMLParserStringNotClosedError, NSXMLParserStringNotStartedError, - NSXMLParserTagNameMismatchError, NSXMLParserURIFragmentError, NSXMLParserURIRequiredError, - NSXMLParserUndeclaredEntityError, NSXMLParserUnfinishedTagError, - NSXMLParserUnknownEncodingError, NSXMLParserUnparsedEntityError, - NSXMLParserXMLDeclNotFinishedError, NSXMLParserXMLDeclNotStartedError, - }; - pub use super::NSXPCConnection::{ - NSXPCCoder, NSXPCConnection, NSXPCConnectionOptions, NSXPCConnectionPrivileged, - NSXPCInterface, NSXPCListener, NSXPCListenerDelegate, NSXPCListenerEndpoint, - NSXPCProxyCreating, - }; - pub use super::NSZone::{NSCollectorDisabledOption, NSScannedOption}; - pub use super::NSURL::{ - NSFileSecurity, NSThumbnail1024x1024SizeKey, NSURLAddedToDirectoryDateKey, - NSURLApplicationIsScriptableKey, NSURLAttributeModificationDateKey, - NSURLBookmarkCreationMinimalBookmark, NSURLBookmarkCreationOptions, - NSURLBookmarkCreationPreferFileIDResolution, - NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess, - NSURLBookmarkCreationSuitableForBookmarkFile, NSURLBookmarkCreationWithSecurityScope, - NSURLBookmarkCreationWithoutImplicitSecurityScope, NSURLBookmarkFileCreationOptions, - NSURLBookmarkResolutionOptions, NSURLBookmarkResolutionWithSecurityScope, - NSURLBookmarkResolutionWithoutImplicitStartAccessing, - NSURLBookmarkResolutionWithoutMounting, NSURLBookmarkResolutionWithoutUI, - NSURLCanonicalPathKey, NSURLComponents, NSURLContentAccessDateKey, - NSURLContentModificationDateKey, NSURLContentTypeKey, NSURLCreationDateKey, - NSURLCustomIconKey, NSURLDocumentIdentifierKey, NSURLEffectiveIconKey, - NSURLFileAllocatedSizeKey, NSURLFileContentIdentifierKey, NSURLFileProtectionComplete, - NSURLFileProtectionCompleteUnlessOpen, - NSURLFileProtectionCompleteUntilFirstUserAuthentication, NSURLFileProtectionKey, - NSURLFileProtectionNone, NSURLFileProtectionType, NSURLFileResourceIdentifierKey, - NSURLFileResourceType, NSURLFileResourceTypeBlockSpecial, - NSURLFileResourceTypeCharacterSpecial, NSURLFileResourceTypeDirectory, - NSURLFileResourceTypeKey, NSURLFileResourceTypeNamedPipe, NSURLFileResourceTypeRegular, - NSURLFileResourceTypeSocket, NSURLFileResourceTypeSymbolicLink, - NSURLFileResourceTypeUnknown, NSURLFileScheme, NSURLFileSecurityKey, NSURLFileSizeKey, - NSURLGenerationIdentifierKey, NSURLHasHiddenExtensionKey, NSURLIsAliasFileKey, - NSURLIsApplicationKey, NSURLIsDirectoryKey, NSURLIsExcludedFromBackupKey, - NSURLIsExecutableKey, NSURLIsHiddenKey, NSURLIsMountTriggerKey, NSURLIsPackageKey, - NSURLIsPurgeableKey, NSURLIsReadableKey, NSURLIsRegularFileKey, NSURLIsSparseKey, - NSURLIsSymbolicLinkKey, NSURLIsSystemImmutableKey, NSURLIsUbiquitousItemKey, - NSURLIsUserImmutableKey, NSURLIsVolumeKey, NSURLIsWritableKey, NSURLKeysOfUnsetValuesKey, - NSURLLabelColorKey, NSURLLabelNumberKey, NSURLLinkCountKey, NSURLLocalizedLabelKey, - NSURLLocalizedNameKey, NSURLLocalizedTypeDescriptionKey, NSURLMayHaveExtendedAttributesKey, - NSURLMayShareFileContentKey, NSURLNameKey, NSURLParentDirectoryURLKey, NSURLPathKey, - NSURLPreferredIOBlockSizeKey, NSURLQuarantinePropertiesKey, NSURLQueryItem, - NSURLResourceKey, NSURLTagNamesKey, NSURLThumbnailDictionaryItem, - NSURLThumbnailDictionaryKey, NSURLThumbnailKey, NSURLTotalFileAllocatedSizeKey, - NSURLTotalFileSizeKey, NSURLTypeIdentifierKey, NSURLUbiquitousItemContainerDisplayNameKey, - NSURLUbiquitousItemDownloadRequestedKey, NSURLUbiquitousItemDownloadingErrorKey, - NSURLUbiquitousItemDownloadingStatus, NSURLUbiquitousItemDownloadingStatusCurrent, - NSURLUbiquitousItemDownloadingStatusDownloaded, NSURLUbiquitousItemDownloadingStatusKey, - NSURLUbiquitousItemDownloadingStatusNotDownloaded, - NSURLUbiquitousItemHasUnresolvedConflictsKey, NSURLUbiquitousItemIsDownloadedKey, - NSURLUbiquitousItemIsDownloadingKey, NSURLUbiquitousItemIsExcludedFromSyncKey, - NSURLUbiquitousItemIsSharedKey, NSURLUbiquitousItemIsUploadedKey, - NSURLUbiquitousItemIsUploadingKey, NSURLUbiquitousItemPercentDownloadedKey, - NSURLUbiquitousItemPercentUploadedKey, NSURLUbiquitousItemUploadingErrorKey, - NSURLUbiquitousSharedItemCurrentUserPermissionsKey, - NSURLUbiquitousSharedItemCurrentUserRoleKey, - NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey, - NSURLUbiquitousSharedItemOwnerNameComponentsKey, NSURLUbiquitousSharedItemPermissions, - NSURLUbiquitousSharedItemPermissionsReadOnly, - NSURLUbiquitousSharedItemPermissionsReadWrite, NSURLUbiquitousSharedItemRole, - NSURLUbiquitousSharedItemRoleOwner, NSURLUbiquitousSharedItemRoleParticipant, - NSURLVolumeAvailableCapacityForImportantUsageKey, - NSURLVolumeAvailableCapacityForOpportunisticUsageKey, NSURLVolumeAvailableCapacityKey, - NSURLVolumeCreationDateKey, NSURLVolumeIdentifierKey, NSURLVolumeIsAutomountedKey, - NSURLVolumeIsBrowsableKey, NSURLVolumeIsEjectableKey, NSURLVolumeIsEncryptedKey, - NSURLVolumeIsInternalKey, NSURLVolumeIsJournalingKey, NSURLVolumeIsLocalKey, - NSURLVolumeIsReadOnlyKey, NSURLVolumeIsRemovableKey, NSURLVolumeIsRootFileSystemKey, - NSURLVolumeLocalizedFormatDescriptionKey, NSURLVolumeLocalizedNameKey, - NSURLVolumeMaximumFileSizeKey, NSURLVolumeNameKey, NSURLVolumeResourceCountKey, - NSURLVolumeSupportsAccessPermissionsKey, NSURLVolumeSupportsAdvisoryFileLockingKey, - NSURLVolumeSupportsCasePreservedNamesKey, NSURLVolumeSupportsCaseSensitiveNamesKey, - NSURLVolumeSupportsCompressionKey, NSURLVolumeSupportsExclusiveRenamingKey, - NSURLVolumeSupportsExtendedSecurityKey, NSURLVolumeSupportsFileCloningKey, - NSURLVolumeSupportsFileProtectionKey, NSURLVolumeSupportsHardLinksKey, - NSURLVolumeSupportsImmutableFilesKey, NSURLVolumeSupportsJournalingKey, - NSURLVolumeSupportsPersistentIDsKey, NSURLVolumeSupportsRenamingKey, - NSURLVolumeSupportsRootDirectoryDatesKey, NSURLVolumeSupportsSparseFilesKey, - NSURLVolumeSupportsSwapRenamingKey, NSURLVolumeSupportsSymbolicLinksKey, - NSURLVolumeSupportsVolumeSizesKey, NSURLVolumeSupportsZeroRunsKey, - NSURLVolumeTotalCapacityKey, NSURLVolumeURLForRemountingKey, NSURLVolumeURLKey, - NSURLVolumeUUIDStringKey, NSURL, - }; - pub use super::NSUUID::NSUUID; - pub use super::NSXMLDTD::NSXMLDTD; -} +pub use self::__FoundationErrors::{ + NSBundleErrorMaximum, NSBundleErrorMinimum, NSBundleOnDemandResourceExceededMaximumSizeError, + NSBundleOnDemandResourceInvalidTagError, NSBundleOnDemandResourceOutOfSpaceError, + NSCloudSharingConflictError, NSCloudSharingErrorMaximum, NSCloudSharingErrorMinimum, + NSCloudSharingNetworkFailureError, NSCloudSharingNoPermissionError, NSCloudSharingOtherError, + NSCloudSharingQuotaExceededError, NSCloudSharingTooManyParticipantsError, NSCoderErrorMaximum, + NSCoderErrorMinimum, NSCoderInvalidValueError, NSCoderReadCorruptError, + NSCoderValueNotFoundError, NSCompressionErrorMaximum, NSCompressionErrorMinimum, + NSCompressionFailedError, NSDecompressionFailedError, NSExecutableArchitectureMismatchError, + NSExecutableErrorMaximum, NSExecutableErrorMinimum, NSExecutableLinkError, + NSExecutableLoadError, NSExecutableNotLoadableError, NSExecutableRuntimeMismatchError, + NSFeatureUnsupportedError, NSFileErrorMaximum, NSFileErrorMinimum, NSFileLockingError, + NSFileManagerUnmountBusyError, NSFileManagerUnmountUnknownError, NSFileNoSuchFileError, + NSFileReadCorruptFileError, NSFileReadInapplicableStringEncodingError, + NSFileReadInvalidFileNameError, NSFileReadNoPermissionError, NSFileReadNoSuchFileError, + NSFileReadTooLargeError, NSFileReadUnknownError, NSFileReadUnknownStringEncodingError, + NSFileReadUnsupportedSchemeError, NSFileWriteFileExistsError, + NSFileWriteInapplicableStringEncodingError, NSFileWriteInvalidFileNameError, + NSFileWriteNoPermissionError, NSFileWriteOutOfSpaceError, NSFileWriteUnknownError, + NSFileWriteUnsupportedSchemeError, NSFileWriteVolumeReadOnlyError, NSFormattingError, + NSFormattingErrorMaximum, NSFormattingErrorMinimum, NSKeyValueValidationError, + NSPropertyListErrorMaximum, NSPropertyListErrorMinimum, NSPropertyListReadCorruptError, + NSPropertyListReadStreamError, NSPropertyListReadUnknownVersionError, + NSPropertyListWriteInvalidError, NSPropertyListWriteStreamError, NSUbiquitousFileErrorMaximum, + NSUbiquitousFileErrorMinimum, NSUbiquitousFileNotUploadedDueToQuotaError, + NSUbiquitousFileUbiquityServerNotAvailable, NSUbiquitousFileUnavailableError, + NSUserActivityConnectionUnavailableError, NSUserActivityErrorMaximum, + NSUserActivityErrorMinimum, NSUserActivityHandoffFailedError, + NSUserActivityHandoffUserInfoTooLargeError, NSUserActivityRemoteApplicationTimedOutError, + NSUserCancelledError, NSValidationErrorMaximum, NSValidationErrorMinimum, + NSXPCConnectionErrorMaximum, NSXPCConnectionErrorMinimum, NSXPCConnectionInterrupted, + NSXPCConnectionInvalid, NSXPCConnectionReplyInvalid, +}; +pub use self::__NSAffineTransform::{NSAffineTransform, NSAffineTransformStruct}; +pub use self::__NSAppleEventDescriptor::{ + NSAppleEventDescriptor, NSAppleEventSendAlwaysInteract, NSAppleEventSendCanInteract, + NSAppleEventSendCanSwitchLayer, NSAppleEventSendDefaultOptions, NSAppleEventSendDontAnnotate, + NSAppleEventSendDontExecute, NSAppleEventSendDontRecord, NSAppleEventSendNeverInteract, + NSAppleEventSendNoReply, NSAppleEventSendOptions, NSAppleEventSendQueueReply, + NSAppleEventSendWaitForReply, +}; +pub use self::__NSAppleEventManager::{ + NSAppleEventManager, NSAppleEventManagerSuspensionID, + NSAppleEventManagerWillProcessFirstEventNotification, NSAppleEventTimeOutDefault, + NSAppleEventTimeOutNone, +}; +pub use self::__NSAppleScript::{ + NSAppleScript, NSAppleScriptErrorAppName, NSAppleScriptErrorBriefMessage, + NSAppleScriptErrorMessage, NSAppleScriptErrorNumber, NSAppleScriptErrorRange, +}; +pub use self::__NSArchiver::{NSArchiver, NSUnarchiver}; +pub use self::__NSArray::{ + NSArray, NSBinarySearchingFirstEqual, NSBinarySearchingInsertionIndex, + NSBinarySearchingLastEqual, NSBinarySearchingOptions, NSMutableArray, +}; +pub use self::__NSAttributedString::{ + NSAlternateDescriptionAttributeName, NSAttributedString, + NSAttributedStringEnumerationLongestEffectiveRangeNotRequired, + NSAttributedStringEnumerationOptions, NSAttributedStringEnumerationReverse, + NSAttributedStringFormattingApplyReplacementIndexAttribute, + NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging, + NSAttributedStringFormattingOptions, NSAttributedStringKey, + NSAttributedStringMarkdownInterpretedSyntax, NSAttributedStringMarkdownInterpretedSyntaxFull, + NSAttributedStringMarkdownInterpretedSyntaxInlineOnly, + NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace, + NSAttributedStringMarkdownParsingFailurePolicy, + NSAttributedStringMarkdownParsingFailureReturnError, + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible, + NSAttributedStringMarkdownParsingOptions, NSImageURLAttributeName, + NSInflectionAlternativeAttributeName, NSInflectionRuleAttributeName, + NSInlinePresentationIntent, NSInlinePresentationIntentAttributeName, + NSInlinePresentationIntentBlockHTML, NSInlinePresentationIntentCode, + NSInlinePresentationIntentEmphasized, NSInlinePresentationIntentInlineHTML, + NSInlinePresentationIntentLineBreak, NSInlinePresentationIntentSoftBreak, + NSInlinePresentationIntentStrikethrough, NSInlinePresentationIntentStronglyEmphasized, + NSLanguageIdentifierAttributeName, NSMorphologyAttributeName, NSMutableAttributedString, + NSPresentationIntent, NSPresentationIntentAttributeName, NSPresentationIntentKind, + NSPresentationIntentKindBlockQuote, NSPresentationIntentKindCodeBlock, + NSPresentationIntentKindHeader, NSPresentationIntentKindListItem, + NSPresentationIntentKindOrderedList, NSPresentationIntentKindParagraph, + NSPresentationIntentKindTable, NSPresentationIntentKindTableCell, + NSPresentationIntentKindTableHeaderRow, NSPresentationIntentKindTableRow, + NSPresentationIntentKindThematicBreak, NSPresentationIntentKindUnorderedList, + NSPresentationIntentTableColumnAlignment, NSPresentationIntentTableColumnAlignmentCenter, + NSPresentationIntentTableColumnAlignmentLeft, NSPresentationIntentTableColumnAlignmentRight, + NSReplacementIndexAttributeName, +}; +pub use self::__NSAutoreleasePool::NSAutoreleasePool; +pub use self::__NSBackgroundActivityScheduler::{ + NSBackgroundActivityCompletionHandler, NSBackgroundActivityResult, + NSBackgroundActivityResultDeferred, NSBackgroundActivityResultFinished, + NSBackgroundActivityScheduler, +}; +pub use self::__NSBundle::{ + NSBundle, NSBundleDidLoadNotification, NSBundleExecutableArchitectureARM64, + NSBundleExecutableArchitectureI386, NSBundleExecutableArchitecturePPC, + NSBundleExecutableArchitecturePPC64, NSBundleExecutableArchitectureX86_64, + NSBundleResourceRequest, NSBundleResourceRequestLoadingPriorityUrgent, + NSBundleResourceRequestLowDiskSpaceNotification, NSLoadedClasses, +}; +pub use self::__NSByteCountFormatter::{ + NSByteCountFormatter, NSByteCountFormatterCountStyle, NSByteCountFormatterCountStyleBinary, + NSByteCountFormatterCountStyleDecimal, NSByteCountFormatterCountStyleFile, + NSByteCountFormatterCountStyleMemory, NSByteCountFormatterUnits, NSByteCountFormatterUseAll, + NSByteCountFormatterUseBytes, NSByteCountFormatterUseDefault, NSByteCountFormatterUseEB, + NSByteCountFormatterUseGB, NSByteCountFormatterUseKB, NSByteCountFormatterUseMB, + NSByteCountFormatterUsePB, NSByteCountFormatterUseTB, NSByteCountFormatterUseYBOrHigher, + NSByteCountFormatterUseZB, +}; +pub use self::__NSByteOrder::{NSSwappedDouble, NSSwappedFloat}; +pub use self::__NSCache::{NSCache, NSCacheDelegate}; +pub use self::__NSCalendar::{ + NSCalendar, NSCalendarCalendarUnit, NSCalendarDayChangedNotification, NSCalendarIdentifier, + NSCalendarIdentifierBuddhist, NSCalendarIdentifierChinese, NSCalendarIdentifierCoptic, + NSCalendarIdentifierEthiopicAmeteAlem, NSCalendarIdentifierEthiopicAmeteMihret, + NSCalendarIdentifierGregorian, NSCalendarIdentifierHebrew, NSCalendarIdentifierISO8601, + NSCalendarIdentifierIndian, NSCalendarIdentifierIslamic, NSCalendarIdentifierIslamicCivil, + NSCalendarIdentifierIslamicTabular, NSCalendarIdentifierIslamicUmmAlQura, + NSCalendarIdentifierJapanese, NSCalendarIdentifierPersian, NSCalendarIdentifierRepublicOfChina, + NSCalendarMatchFirst, NSCalendarMatchLast, NSCalendarMatchNextTime, + NSCalendarMatchNextTimePreservingSmallerUnits, + NSCalendarMatchPreviousTimePreservingSmallerUnits, NSCalendarMatchStrictly, NSCalendarOptions, + NSCalendarSearchBackwards, NSCalendarUnit, NSCalendarUnitCalendar, NSCalendarUnitDay, + NSCalendarUnitEra, NSCalendarUnitHour, NSCalendarUnitMinute, NSCalendarUnitMonth, + NSCalendarUnitNanosecond, NSCalendarUnitQuarter, NSCalendarUnitSecond, NSCalendarUnitTimeZone, + NSCalendarUnitWeekOfMonth, NSCalendarUnitWeekOfYear, NSCalendarUnitWeekday, + NSCalendarUnitWeekdayOrdinal, NSCalendarUnitYear, NSCalendarUnitYearForWeekOfYear, + NSCalendarWrapComponents, NSDateComponentUndefined, NSDateComponents, NSDayCalendarUnit, + NSEraCalendarUnit, NSHourCalendarUnit, NSMinuteCalendarUnit, NSMonthCalendarUnit, + NSQuarterCalendarUnit, NSSecondCalendarUnit, NSTimeZoneCalendarUnit, NSUndefinedDateComponent, + NSWeekCalendarUnit, NSWeekOfMonthCalendarUnit, NSWeekOfYearCalendarUnit, NSWeekdayCalendarUnit, + NSWeekdayOrdinalCalendarUnit, NSYearCalendarUnit, NSYearForWeekOfYearCalendarUnit, +}; +pub use self::__NSCalendarDate::NSCalendarDate; +pub use self::__NSCharacterSet::{ + NSCharacterSet, NSMutableCharacterSet, NSOpenStepUnicodeReservedBase, +}; +pub use self::__NSClassDescription::{ + NSClassDescription, NSClassDescriptionNeededForClassNotification, +}; +pub use self::__NSCoder::{ + NSCoder, NSDecodingFailurePolicy, NSDecodingFailurePolicyRaiseException, + NSDecodingFailurePolicySetErrorAndReturn, +}; +pub use self::__NSComparisonPredicate::{ + NSAllPredicateModifier, NSAnyPredicateModifier, NSBeginsWithPredicateOperatorType, + NSBetweenPredicateOperatorType, NSCaseInsensitivePredicateOption, NSComparisonPredicate, + NSComparisonPredicateModifier, NSComparisonPredicateOptions, NSContainsPredicateOperatorType, + NSCustomSelectorPredicateOperatorType, NSDiacriticInsensitivePredicateOption, + NSDirectPredicateModifier, NSEndsWithPredicateOperatorType, NSEqualToPredicateOperatorType, + NSGreaterThanOrEqualToPredicateOperatorType, NSGreaterThanPredicateOperatorType, + NSInPredicateOperatorType, NSLessThanOrEqualToPredicateOperatorType, + NSLessThanPredicateOperatorType, NSLikePredicateOperatorType, NSMatchesPredicateOperatorType, + NSNormalizedPredicateOption, NSNotEqualToPredicateOperatorType, NSPredicateOperatorType, +}; +pub use self::__NSCompoundPredicate::{ + NSAndPredicateType, NSCompoundPredicate, NSCompoundPredicateType, NSNotPredicateType, + NSOrPredicateType, +}; +pub use self::__NSConnection::{ + NSConnection, NSConnectionDelegate, NSConnectionDidDieNotification, + NSConnectionDidInitializeNotification, NSConnectionReplyMode, NSDistantObjectRequest, + NSFailedAuthenticationException, +}; +pub use self::__NSData::{ + NSAtomicWrite, NSData, NSDataBase64DecodingIgnoreUnknownCharacters, + NSDataBase64DecodingOptions, NSDataBase64Encoding64CharacterLineLength, + NSDataBase64Encoding76CharacterLineLength, NSDataBase64EncodingEndLineWithCarriageReturn, + NSDataBase64EncodingEndLineWithLineFeed, NSDataBase64EncodingOptions, + NSDataCompressionAlgorithm, NSDataCompressionAlgorithmLZ4, NSDataCompressionAlgorithmLZFSE, + NSDataCompressionAlgorithmLZMA, NSDataCompressionAlgorithmZlib, NSDataReadingMapped, + NSDataReadingMappedAlways, NSDataReadingMappedIfSafe, NSDataReadingOptions, + NSDataReadingUncached, NSDataSearchAnchored, NSDataSearchBackwards, NSDataSearchOptions, + NSDataWritingAtomic, NSDataWritingFileProtectionComplete, + NSDataWritingFileProtectionCompleteUnlessOpen, + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication, + NSDataWritingFileProtectionMask, NSDataWritingFileProtectionNone, NSDataWritingOptions, + NSDataWritingWithoutOverwriting, NSMappedRead, NSMutableData, NSPurgeableData, NSUncachedRead, +}; +pub use self::__NSDate::{NSDate, NSSystemClockDidChangeNotification, NSTimeInterval}; +pub use self::__NSDateComponentsFormatter::{ + NSDateComponentsFormatter, NSDateComponentsFormatterUnitsStyle, + NSDateComponentsFormatterUnitsStyleAbbreviated, NSDateComponentsFormatterUnitsStyleBrief, + NSDateComponentsFormatterUnitsStyleFull, NSDateComponentsFormatterUnitsStylePositional, + NSDateComponentsFormatterUnitsStyleShort, NSDateComponentsFormatterUnitsStyleSpellOut, + NSDateComponentsFormatterZeroFormattingBehavior, + NSDateComponentsFormatterZeroFormattingBehaviorDefault, + NSDateComponentsFormatterZeroFormattingBehaviorDropAll, + NSDateComponentsFormatterZeroFormattingBehaviorDropLeading, + NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle, + NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing, + NSDateComponentsFormatterZeroFormattingBehaviorNone, + NSDateComponentsFormatterZeroFormattingBehaviorPad, +}; +pub use self::__NSDateFormatter::{ + NSDateFormatter, NSDateFormatterBehavior, NSDateFormatterBehavior10_0, + NSDateFormatterBehavior10_4, NSDateFormatterBehaviorDefault, NSDateFormatterFullStyle, + NSDateFormatterLongStyle, NSDateFormatterMediumStyle, NSDateFormatterNoStyle, + NSDateFormatterShortStyle, NSDateFormatterStyle, +}; +pub use self::__NSDateInterval::NSDateInterval; +pub use self::__NSDateIntervalFormatter::{ + NSDateIntervalFormatter, NSDateIntervalFormatterFullStyle, NSDateIntervalFormatterLongStyle, + NSDateIntervalFormatterMediumStyle, NSDateIntervalFormatterNoStyle, + NSDateIntervalFormatterShortStyle, NSDateIntervalFormatterStyle, +}; +pub use self::__NSDecimal::{ + NSCalculationDivideByZero, NSCalculationError, NSCalculationLossOfPrecision, + NSCalculationNoError, NSCalculationOverflow, NSCalculationUnderflow, NSRoundBankers, + NSRoundDown, NSRoundPlain, NSRoundUp, NSRoundingMode, +}; +pub use self::__NSDecimalNumber::{ + NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberDivideByZeroException, + NSDecimalNumberExactnessException, NSDecimalNumberHandler, NSDecimalNumberOverflowException, + NSDecimalNumberUnderflowException, +}; +pub use self::__NSDictionary::{NSDictionary, NSMutableDictionary}; +pub use self::__NSDistantObject::NSDistantObject; +pub use self::__NSDistributedLock::NSDistributedLock; +pub use self::__NSDistributedNotificationCenter::{ + NSDistributedNotificationCenter, NSDistributedNotificationCenterType, + NSDistributedNotificationDeliverImmediately, NSDistributedNotificationOptions, + NSDistributedNotificationPostToAllSessions, NSLocalNotificationCenterType, + NSNotificationDeliverImmediately, NSNotificationPostToAllSessions, + NSNotificationSuspensionBehavior, NSNotificationSuspensionBehaviorCoalesce, + NSNotificationSuspensionBehaviorDeliverImmediately, NSNotificationSuspensionBehaviorDrop, + NSNotificationSuspensionBehaviorHold, +}; +pub use self::__NSEnergyFormatter::{ + NSEnergyFormatter, NSEnergyFormatterUnit, NSEnergyFormatterUnitCalorie, + NSEnergyFormatterUnitJoule, NSEnergyFormatterUnitKilocalorie, NSEnergyFormatterUnitKilojoule, +}; +pub use self::__NSEnumerator::{NSEnumerator, NSFastEnumeration, NSFastEnumerationState}; +pub use self::__NSError::{ + NSCocoaErrorDomain, NSDebugDescriptionErrorKey, NSError, NSErrorDomain, NSErrorUserInfoKey, + NSFilePathErrorKey, NSHelpAnchorErrorKey, NSLocalizedDescriptionKey, + NSLocalizedFailureErrorKey, NSLocalizedFailureReasonErrorKey, + NSLocalizedRecoveryOptionsErrorKey, NSLocalizedRecoverySuggestionErrorKey, NSMachErrorDomain, + NSMultipleUnderlyingErrorsKey, NSOSStatusErrorDomain, NSPOSIXErrorDomain, + NSRecoveryAttempterErrorKey, NSStringEncodingErrorKey, NSURLErrorKey, NSUnderlyingErrorKey, +}; +pub use self::__NSException::{ + NSAssertionHandler, NSAssertionHandlerKey, NSDestinationInvalidException, NSException, + NSGenericException, NSInconsistentArchiveException, NSInternalInconsistencyException, + NSInvalidArgumentException, NSInvalidReceivePortException, NSInvalidSendPortException, + NSMallocException, NSObjectInaccessibleException, NSObjectNotAvailableException, + NSOldStyleException, NSPortReceiveException, NSPortSendException, NSPortTimeoutException, + NSRangeException, NSUncaughtExceptionHandler, +}; +pub use self::__NSExpression::{ + NSAggregateExpressionType, NSAnyKeyExpressionType, NSBlockExpressionType, + NSConditionalExpressionType, NSConstantValueExpressionType, NSEvaluatedObjectExpressionType, + NSExpression, NSExpressionType, NSFunctionExpressionType, NSIntersectSetExpressionType, + NSKeyPathExpressionType, NSMinusSetExpressionType, NSSubqueryExpressionType, + NSUnionSetExpressionType, NSVariableExpressionType, +}; +pub use self::__NSExtensionContext::{ + NSExtensionContext, NSExtensionHostDidBecomeActiveNotification, + NSExtensionHostDidEnterBackgroundNotification, NSExtensionHostWillEnterForegroundNotification, + NSExtensionHostWillResignActiveNotification, NSExtensionItemsAndErrorsKey, +}; +pub use self::__NSExtensionItem::{ + NSExtensionItem, NSExtensionItemAttachmentsKey, NSExtensionItemAttributedContentTextKey, + NSExtensionItemAttributedTitleKey, +}; +pub use self::__NSExtensionRequestHandling::NSExtensionRequestHandling; +pub use self::__NSFileCoordinator::{ + NSFileAccessIntent, NSFileCoordinator, NSFileCoordinatorReadingForUploading, + NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorReadingOptions, + NSFileCoordinatorReadingResolvesSymbolicLink, NSFileCoordinatorReadingWithoutChanges, + NSFileCoordinatorWritingContentIndependentMetadataOnly, NSFileCoordinatorWritingForDeleting, + NSFileCoordinatorWritingForMerging, NSFileCoordinatorWritingForMoving, + NSFileCoordinatorWritingForReplacing, NSFileCoordinatorWritingOptions, +}; +pub use self::__NSFileHandle::{ + NSFileHandle, NSFileHandleConnectionAcceptedNotification, + NSFileHandleDataAvailableNotification, NSFileHandleNotificationDataItem, + NSFileHandleNotificationFileHandleItem, NSFileHandleNotificationMonitorModes, + NSFileHandleOperationException, NSFileHandleReadCompletionNotification, + NSFileHandleReadToEndOfFileCompletionNotification, NSPipe, +}; +pub use self::__NSFileManager::{ + NSDirectoryEnumerationIncludesDirectoriesPostOrder, NSDirectoryEnumerationOptions, + NSDirectoryEnumerationProducesRelativePathURLs, NSDirectoryEnumerationSkipsHiddenFiles, + NSDirectoryEnumerationSkipsPackageDescendants, + NSDirectoryEnumerationSkipsSubdirectoryDescendants, NSDirectoryEnumerator, NSFileAppendOnly, + NSFileAttributeKey, NSFileAttributeType, NSFileBusy, NSFileCreationDate, + NSFileDeviceIdentifier, NSFileExtensionHidden, NSFileGroupOwnerAccountID, + NSFileGroupOwnerAccountName, NSFileHFSCreatorCode, NSFileHFSTypeCode, NSFileImmutable, + NSFileManager, NSFileManagerDelegate, NSFileManagerItemReplacementOptions, + NSFileManagerItemReplacementUsingNewMetadataOnly, + NSFileManagerItemReplacementWithoutDeletingBackupItem, + NSFileManagerUnmountAllPartitionsAndEjectDisk, + NSFileManagerUnmountDissentingProcessIdentifierErrorKey, NSFileManagerUnmountOptions, + NSFileManagerUnmountWithoutUI, NSFileModificationDate, NSFileOwnerAccountID, + NSFileOwnerAccountName, NSFilePosixPermissions, NSFileProtectionComplete, + NSFileProtectionCompleteUnlessOpen, NSFileProtectionCompleteUntilFirstUserAuthentication, + NSFileProtectionKey, NSFileProtectionNone, NSFileProtectionType, NSFileProviderService, + NSFileProviderServiceName, NSFileReferenceCount, NSFileSize, NSFileSystemFileNumber, + NSFileSystemFreeNodes, NSFileSystemFreeSize, NSFileSystemNodes, NSFileSystemNumber, + NSFileSystemSize, NSFileType, NSFileTypeBlockSpecial, NSFileTypeCharacterSpecial, + NSFileTypeDirectory, NSFileTypeRegular, NSFileTypeSocket, NSFileTypeSymbolicLink, + NSFileTypeUnknown, NSURLRelationship, NSURLRelationshipContains, NSURLRelationshipOther, + NSURLRelationshipSame, NSUbiquityIdentityDidChangeNotification, NSVolumeEnumerationOptions, + NSVolumeEnumerationProduceFileReferenceURLs, NSVolumeEnumerationSkipHiddenVolumes, +}; +pub use self::__NSFilePresenter::NSFilePresenter; +pub use self::__NSFileVersion::{ + NSFileVersion, NSFileVersionAddingByMoving, NSFileVersionAddingOptions, + NSFileVersionReplacingByMoving, NSFileVersionReplacingOptions, +}; +pub use self::__NSFileWrapper::{ + NSFileWrapper, NSFileWrapperReadingImmediate, NSFileWrapperReadingOptions, + NSFileWrapperReadingWithoutMapping, NSFileWrapperWritingAtomic, NSFileWrapperWritingOptions, + NSFileWrapperWritingWithNameUpdating, +}; +pub use self::__NSFormatter::{ + NSFormatter, NSFormattingContext, NSFormattingContextBeginningOfSentence, + NSFormattingContextDynamic, NSFormattingContextListItem, NSFormattingContextMiddleOfSentence, + NSFormattingContextStandalone, NSFormattingContextUnknown, NSFormattingUnitStyle, + NSFormattingUnitStyleLong, NSFormattingUnitStyleMedium, NSFormattingUnitStyleShort, +}; +pub use self::__NSGarbageCollector::NSGarbageCollector; +pub use self::__NSGeometry::{ + NSAlignAllEdgesInward, NSAlignAllEdgesNearest, NSAlignAllEdgesOutward, NSAlignHeightInward, + NSAlignHeightNearest, NSAlignHeightOutward, NSAlignMaxXInward, NSAlignMaxXNearest, + NSAlignMaxXOutward, NSAlignMaxYInward, NSAlignMaxYNearest, NSAlignMaxYOutward, + NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, + NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, + NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsets, NSEdgeInsetsZero, + NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSPointArray, NSPointPointer, NSRect, + NSRectArray, NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, + NSRectPointer, NSSize, NSSizeArray, NSSizePointer, NSZeroPoint, NSZeroRect, NSZeroSize, +}; +pub use self::__NSHTTPCookie::{ + NSHTTPCookie, NSHTTPCookieComment, NSHTTPCookieCommentURL, NSHTTPCookieDiscard, + NSHTTPCookieDomain, NSHTTPCookieExpires, NSHTTPCookieMaximumAge, NSHTTPCookieName, + NSHTTPCookieOriginURL, NSHTTPCookiePath, NSHTTPCookiePort, NSHTTPCookiePropertyKey, + NSHTTPCookieSameSiteLax, NSHTTPCookieSameSitePolicy, NSHTTPCookieSameSiteStrict, + NSHTTPCookieSecure, NSHTTPCookieStringPolicy, NSHTTPCookieValue, NSHTTPCookieVersion, +}; +pub use self::__NSHTTPCookieStorage::{ + NSHTTPCookieAcceptPolicy, NSHTTPCookieAcceptPolicyAlways, NSHTTPCookieAcceptPolicyNever, + NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, + NSHTTPCookieManagerAcceptPolicyChangedNotification, + NSHTTPCookieManagerCookiesChangedNotification, NSHTTPCookieStorage, +}; +pub use self::__NSHashTable::{ + NSHashEnumerator, NSHashTable, NSHashTableCallBacks, NSHashTableCopyIn, + NSHashTableObjectPointerPersonality, NSHashTableOptions, NSHashTableStrongMemory, + NSHashTableWeakMemory, NSHashTableZeroingWeakMemory, NSIntHashCallBacks, + NSIntegerHashCallBacks, NSNonOwnedPointerHashCallBacks, NSNonRetainedObjectHashCallBacks, + NSObjectHashCallBacks, NSOwnedObjectIdentityHashCallBacks, NSOwnedPointerHashCallBacks, + NSPointerToStructHashCallBacks, +}; +pub use self::__NSHost::NSHost; +pub use self::__NSISO8601DateFormatter::{ + NSISO8601DateFormatOptions, NSISO8601DateFormatWithColonSeparatorInTime, + NSISO8601DateFormatWithColonSeparatorInTimeZone, NSISO8601DateFormatWithDashSeparatorInDate, + NSISO8601DateFormatWithDay, NSISO8601DateFormatWithFractionalSeconds, + NSISO8601DateFormatWithFullDate, NSISO8601DateFormatWithFullTime, + NSISO8601DateFormatWithInternetDateTime, NSISO8601DateFormatWithMonth, + NSISO8601DateFormatWithSpaceBetweenDateAndTime, NSISO8601DateFormatWithTime, + NSISO8601DateFormatWithTimeZone, NSISO8601DateFormatWithWeekOfYear, + NSISO8601DateFormatWithYear, NSISO8601DateFormatter, +}; +pub use self::__NSIndexPath::NSIndexPath; +pub use self::__NSIndexSet::{NSIndexSet, NSMutableIndexSet}; +pub use self::__NSInflectionRule::{NSInflectionRule, NSInflectionRuleExplicit}; +pub use self::__NSInvocation::NSInvocation; +pub use self::__NSItemProvider::{ + NSExtensionJavaScriptFinalizeArgumentKey, NSExtensionJavaScriptPreprocessingResultsKey, + NSItemProvider, NSItemProviderCompletionHandler, NSItemProviderErrorCode, + NSItemProviderErrorDomain, NSItemProviderFileOptionOpenInPlace, NSItemProviderFileOptions, + NSItemProviderItemUnavailableError, NSItemProviderLoadHandler, + NSItemProviderPreferredImageSizeKey, NSItemProviderReading, + NSItemProviderRepresentationVisibility, NSItemProviderRepresentationVisibilityAll, + NSItemProviderRepresentationVisibilityGroup, NSItemProviderRepresentationVisibilityOwnProcess, + NSItemProviderRepresentationVisibilityTeam, NSItemProviderUnavailableCoercionError, + NSItemProviderUnexpectedValueClassError, NSItemProviderUnknownError, NSItemProviderWriting, +}; +pub use self::__NSJSONSerialization::{ + NSJSONReadingAllowFragments, NSJSONReadingFragmentsAllowed, NSJSONReadingJSON5Allowed, + NSJSONReadingMutableContainers, NSJSONReadingMutableLeaves, NSJSONReadingOptions, + NSJSONReadingTopLevelDictionaryAssumed, NSJSONSerialization, NSJSONWritingFragmentsAllowed, + NSJSONWritingOptions, NSJSONWritingPrettyPrinted, NSJSONWritingSortedKeys, + NSJSONWritingWithoutEscapingSlashes, +}; +pub use self::__NSKeyValueCoding::{ + NSAverageKeyValueOperator, NSCountKeyValueOperator, NSDistinctUnionOfArraysKeyValueOperator, + NSDistinctUnionOfObjectsKeyValueOperator, NSDistinctUnionOfSetsKeyValueOperator, + NSKeyValueOperator, NSMaximumKeyValueOperator, NSMinimumKeyValueOperator, + NSSumKeyValueOperator, NSUndefinedKeyException, NSUnionOfArraysKeyValueOperator, + NSUnionOfObjectsKeyValueOperator, NSUnionOfSetsKeyValueOperator, +}; +pub use self::__NSKeyValueObserving::{ + NSKeyValueChange, NSKeyValueChangeIndexesKey, NSKeyValueChangeInsertion, NSKeyValueChangeKey, + NSKeyValueChangeKindKey, NSKeyValueChangeNewKey, NSKeyValueChangeNotificationIsPriorKey, + NSKeyValueChangeOldKey, NSKeyValueChangeRemoval, NSKeyValueChangeReplacement, + NSKeyValueChangeSetting, NSKeyValueIntersectSetMutation, NSKeyValueMinusSetMutation, + NSKeyValueObservingOptionInitial, NSKeyValueObservingOptionNew, NSKeyValueObservingOptionOld, + NSKeyValueObservingOptionPrior, NSKeyValueObservingOptions, NSKeyValueSetMutationKind, + NSKeyValueSetSetMutation, NSKeyValueUnionSetMutation, +}; +pub use self::__NSKeyedArchiver::{ + NSInvalidArchiveOperationException, NSInvalidUnarchiveOperationException, + NSKeyedArchiveRootObjectKey, NSKeyedArchiver, NSKeyedArchiverDelegate, NSKeyedUnarchiver, + NSKeyedUnarchiverDelegate, +}; +pub use self::__NSLengthFormatter::{ + NSLengthFormatter, NSLengthFormatterUnit, NSLengthFormatterUnitCentimeter, + NSLengthFormatterUnitFoot, NSLengthFormatterUnitInch, NSLengthFormatterUnitKilometer, + NSLengthFormatterUnitMeter, NSLengthFormatterUnitMile, NSLengthFormatterUnitMillimeter, + NSLengthFormatterUnitYard, +}; +pub use self::__NSLinguisticTagger::{ + NSLinguisticTag, NSLinguisticTagAdjective, NSLinguisticTagAdverb, NSLinguisticTagClassifier, + NSLinguisticTagCloseParenthesis, NSLinguisticTagCloseQuote, NSLinguisticTagConjunction, + NSLinguisticTagDash, NSLinguisticTagDeterminer, NSLinguisticTagIdiom, + NSLinguisticTagInterjection, NSLinguisticTagNoun, NSLinguisticTagNumber, + NSLinguisticTagOpenParenthesis, NSLinguisticTagOpenQuote, NSLinguisticTagOrganizationName, + NSLinguisticTagOther, NSLinguisticTagOtherPunctuation, NSLinguisticTagOtherWhitespace, + NSLinguisticTagOtherWord, NSLinguisticTagParagraphBreak, NSLinguisticTagParticle, + NSLinguisticTagPersonalName, NSLinguisticTagPlaceName, NSLinguisticTagPreposition, + NSLinguisticTagPronoun, NSLinguisticTagPunctuation, NSLinguisticTagScheme, + NSLinguisticTagSchemeLanguage, NSLinguisticTagSchemeLemma, NSLinguisticTagSchemeLexicalClass, + NSLinguisticTagSchemeNameType, NSLinguisticTagSchemeNameTypeOrLexicalClass, + NSLinguisticTagSchemeScript, NSLinguisticTagSchemeTokenType, NSLinguisticTagSentenceTerminator, + NSLinguisticTagVerb, NSLinguisticTagWhitespace, NSLinguisticTagWord, NSLinguisticTagWordJoiner, + NSLinguisticTagger, NSLinguisticTaggerJoinNames, NSLinguisticTaggerOmitOther, + NSLinguisticTaggerOmitPunctuation, NSLinguisticTaggerOmitWhitespace, + NSLinguisticTaggerOmitWords, NSLinguisticTaggerOptions, NSLinguisticTaggerUnit, + NSLinguisticTaggerUnitDocument, NSLinguisticTaggerUnitParagraph, + NSLinguisticTaggerUnitSentence, NSLinguisticTaggerUnitWord, +}; +pub use self::__NSListFormatter::NSListFormatter; +pub use self::__NSLocale::{ + NSBuddhistCalendar, NSChineseCalendar, NSCurrentLocaleDidChangeNotification, + NSGregorianCalendar, NSHebrewCalendar, NSISO8601Calendar, NSIndianCalendar, NSIslamicCalendar, + NSIslamicCivilCalendar, NSJapaneseCalendar, NSLocale, + NSLocaleAlternateQuotationBeginDelimiterKey, NSLocaleAlternateQuotationEndDelimiterKey, + NSLocaleCalendar, NSLocaleCollationIdentifier, NSLocaleCollatorIdentifier, NSLocaleCountryCode, + NSLocaleCurrencyCode, NSLocaleCurrencySymbol, NSLocaleDecimalSeparator, + NSLocaleExemplarCharacterSet, NSLocaleGroupingSeparator, NSLocaleIdentifier, NSLocaleKey, + NSLocaleLanguageCode, NSLocaleLanguageDirection, NSLocaleLanguageDirectionBottomToTop, + NSLocaleLanguageDirectionLeftToRight, NSLocaleLanguageDirectionRightToLeft, + NSLocaleLanguageDirectionTopToBottom, NSLocaleLanguageDirectionUnknown, + NSLocaleMeasurementSystem, NSLocaleQuotationBeginDelimiterKey, + NSLocaleQuotationEndDelimiterKey, NSLocaleScriptCode, NSLocaleUsesMetricSystem, + NSLocaleVariantCode, NSPersianCalendar, NSRepublicOfChinaCalendar, +}; +pub use self::__NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; +pub use self::__NSMapTable::{ + NSIntMapKeyCallBacks, NSIntMapValueCallBacks, NSIntegerMapKeyCallBacks, + NSIntegerMapValueCallBacks, NSMapEnumerator, NSMapTable, NSMapTableCopyIn, + NSMapTableKeyCallBacks, NSMapTableObjectPointerPersonality, NSMapTableOptions, + NSMapTableStrongMemory, NSMapTableValueCallBacks, NSMapTableWeakMemory, + NSMapTableZeroingWeakMemory, NSNonOwnedPointerMapKeyCallBacks, + NSNonOwnedPointerMapValueCallBacks, NSNonOwnedPointerOrNullMapKeyCallBacks, + NSNonRetainedObjectMapKeyCallBacks, NSNonRetainedObjectMapValueCallBacks, + NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, NSOwnedPointerMapKeyCallBacks, + NSOwnedPointerMapValueCallBacks, +}; +pub use self::__NSMassFormatter::{ + NSMassFormatter, NSMassFormatterUnit, NSMassFormatterUnitGram, NSMassFormatterUnitKilogram, + NSMassFormatterUnitOunce, NSMassFormatterUnitPound, NSMassFormatterUnitStone, +}; +pub use self::__NSMeasurement::NSMeasurement; +pub use self::__NSMeasurementFormatter::{ + NSMeasurementFormatter, NSMeasurementFormatterUnitOptions, + NSMeasurementFormatterUnitOptionsNaturalScale, NSMeasurementFormatterUnitOptionsProvidedUnit, + NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit, +}; +pub use self::__NSMetadata::{ + NSMetadataItem, NSMetadataQuery, NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope, + NSMetadataQueryAttributeValueTuple, NSMetadataQueryDelegate, + NSMetadataQueryDidFinishGatheringNotification, NSMetadataQueryDidStartGatheringNotification, + NSMetadataQueryDidUpdateNotification, NSMetadataQueryGatheringProgressNotification, + NSMetadataQueryIndexedLocalComputerScope, NSMetadataQueryIndexedNetworkScope, + NSMetadataQueryLocalComputerScope, NSMetadataQueryNetworkScope, + NSMetadataQueryResultContentRelevanceAttribute, NSMetadataQueryResultGroup, + NSMetadataQueryUbiquitousDataScope, NSMetadataQueryUbiquitousDocumentsScope, + NSMetadataQueryUpdateAddedItemsKey, NSMetadataQueryUpdateChangedItemsKey, + NSMetadataQueryUpdateRemovedItemsKey, NSMetadataQueryUserHomeScope, +}; +pub use self::__NSMetadataAttributes::{ + NSMetadataItemAcquisitionMakeKey, NSMetadataItemAcquisitionModelKey, NSMetadataItemAlbumKey, + NSMetadataItemAltitudeKey, NSMetadataItemApertureKey, NSMetadataItemAppleLoopDescriptorsKey, + NSMetadataItemAppleLoopsKeyFilterTypeKey, NSMetadataItemAppleLoopsLoopModeKey, + NSMetadataItemAppleLoopsRootKeyKey, NSMetadataItemApplicationCategoriesKey, + NSMetadataItemAttributeChangeDateKey, NSMetadataItemAudiencesKey, + NSMetadataItemAudioBitRateKey, NSMetadataItemAudioChannelCountKey, + NSMetadataItemAudioEncodingApplicationKey, NSMetadataItemAudioSampleRateKey, + NSMetadataItemAudioTrackNumberKey, NSMetadataItemAuthorAddressesKey, + NSMetadataItemAuthorEmailAddressesKey, NSMetadataItemAuthorsKey, + NSMetadataItemBitsPerSampleKey, NSMetadataItemCFBundleIdentifierKey, + NSMetadataItemCameraOwnerKey, NSMetadataItemCityKey, NSMetadataItemCodecsKey, + NSMetadataItemColorSpaceKey, NSMetadataItemCommentKey, NSMetadataItemComposerKey, + NSMetadataItemContactKeywordsKey, NSMetadataItemContentCreationDateKey, + NSMetadataItemContentModificationDateKey, NSMetadataItemContentTypeKey, + NSMetadataItemContentTypeTreeKey, NSMetadataItemContributorsKey, NSMetadataItemCopyrightKey, + NSMetadataItemCountryKey, NSMetadataItemCoverageKey, NSMetadataItemCreatorKey, + NSMetadataItemDateAddedKey, NSMetadataItemDeliveryTypeKey, NSMetadataItemDescriptionKey, + NSMetadataItemDirectorKey, NSMetadataItemDisplayNameKey, NSMetadataItemDownloadedDateKey, + NSMetadataItemDueDateKey, NSMetadataItemDurationSecondsKey, NSMetadataItemEXIFGPSVersionKey, + NSMetadataItemEXIFVersionKey, NSMetadataItemEditorsKey, NSMetadataItemEmailAddressesKey, + NSMetadataItemEncodingApplicationsKey, NSMetadataItemExecutableArchitecturesKey, + NSMetadataItemExecutablePlatformKey, NSMetadataItemExposureModeKey, + NSMetadataItemExposureProgramKey, NSMetadataItemExposureTimeSecondsKey, + NSMetadataItemExposureTimeStringKey, NSMetadataItemFNumberKey, + NSMetadataItemFSContentChangeDateKey, NSMetadataItemFSCreationDateKey, NSMetadataItemFSNameKey, + NSMetadataItemFSSizeKey, NSMetadataItemFinderCommentKey, NSMetadataItemFlashOnOffKey, + NSMetadataItemFocalLength35mmKey, NSMetadataItemFocalLengthKey, NSMetadataItemFontsKey, + NSMetadataItemGPSAreaInformationKey, NSMetadataItemGPSDOPKey, NSMetadataItemGPSDateStampKey, + NSMetadataItemGPSDestBearingKey, NSMetadataItemGPSDestDistanceKey, + NSMetadataItemGPSDestLatitudeKey, NSMetadataItemGPSDestLongitudeKey, + NSMetadataItemGPSDifferentalKey, NSMetadataItemGPSMapDatumKey, NSMetadataItemGPSMeasureModeKey, + NSMetadataItemGPSProcessingMethodKey, NSMetadataItemGPSStatusKey, NSMetadataItemGPSTrackKey, + NSMetadataItemGenreKey, NSMetadataItemHasAlphaChannelKey, NSMetadataItemHeadlineKey, + NSMetadataItemISOSpeedKey, NSMetadataItemIdentifierKey, NSMetadataItemImageDirectionKey, + NSMetadataItemInformationKey, NSMetadataItemInstantMessageAddressesKey, + NSMetadataItemInstructionsKey, NSMetadataItemIsApplicationManagedKey, + NSMetadataItemIsGeneralMIDISequenceKey, NSMetadataItemIsLikelyJunkKey, + NSMetadataItemIsUbiquitousKey, NSMetadataItemKeySignatureKey, NSMetadataItemKeywordsKey, + NSMetadataItemKindKey, NSMetadataItemLanguagesKey, NSMetadataItemLastUsedDateKey, + NSMetadataItemLatitudeKey, NSMetadataItemLayerNamesKey, NSMetadataItemLensModelKey, + NSMetadataItemLongitudeKey, NSMetadataItemLyricistKey, NSMetadataItemMaxApertureKey, + NSMetadataItemMediaTypesKey, NSMetadataItemMeteringModeKey, NSMetadataItemMusicalGenreKey, + NSMetadataItemMusicalInstrumentCategoryKey, NSMetadataItemMusicalInstrumentNameKey, + NSMetadataItemNamedLocationKey, NSMetadataItemNumberOfPagesKey, NSMetadataItemOrganizationsKey, + NSMetadataItemOrientationKey, NSMetadataItemOriginalFormatKey, NSMetadataItemOriginalSourceKey, + NSMetadataItemPageHeightKey, NSMetadataItemPageWidthKey, NSMetadataItemParticipantsKey, + NSMetadataItemPathKey, NSMetadataItemPerformersKey, NSMetadataItemPhoneNumbersKey, + NSMetadataItemPixelCountKey, NSMetadataItemPixelHeightKey, NSMetadataItemPixelWidthKey, + NSMetadataItemProducerKey, NSMetadataItemProfileNameKey, NSMetadataItemProjectsKey, + NSMetadataItemPublishersKey, NSMetadataItemRecipientAddressesKey, + NSMetadataItemRecipientEmailAddressesKey, NSMetadataItemRecipientsKey, + NSMetadataItemRecordingDateKey, NSMetadataItemRecordingYearKey, NSMetadataItemRedEyeOnOffKey, + NSMetadataItemResolutionHeightDPIKey, NSMetadataItemResolutionWidthDPIKey, + NSMetadataItemRightsKey, NSMetadataItemSecurityMethodKey, NSMetadataItemSpeedKey, + NSMetadataItemStarRatingKey, NSMetadataItemStateOrProvinceKey, NSMetadataItemStreamableKey, + NSMetadataItemSubjectKey, NSMetadataItemTempoKey, NSMetadataItemTextContentKey, + NSMetadataItemThemeKey, NSMetadataItemTimeSignatureKey, NSMetadataItemTimestampKey, + NSMetadataItemTitleKey, NSMetadataItemTotalBitRateKey, NSMetadataItemURLKey, + NSMetadataItemVersionKey, NSMetadataItemVideoBitRateKey, NSMetadataItemWhereFromsKey, + NSMetadataItemWhiteBalanceKey, NSMetadataUbiquitousItemContainerDisplayNameKey, + NSMetadataUbiquitousItemDownloadRequestedKey, NSMetadataUbiquitousItemDownloadingErrorKey, + NSMetadataUbiquitousItemDownloadingStatusCurrent, + NSMetadataUbiquitousItemDownloadingStatusDownloaded, + NSMetadataUbiquitousItemDownloadingStatusKey, + NSMetadataUbiquitousItemDownloadingStatusNotDownloaded, + NSMetadataUbiquitousItemHasUnresolvedConflictsKey, NSMetadataUbiquitousItemIsDownloadedKey, + NSMetadataUbiquitousItemIsDownloadingKey, NSMetadataUbiquitousItemIsExternalDocumentKey, + NSMetadataUbiquitousItemIsSharedKey, NSMetadataUbiquitousItemIsUploadedKey, + NSMetadataUbiquitousItemIsUploadingKey, NSMetadataUbiquitousItemPercentDownloadedKey, + NSMetadataUbiquitousItemPercentUploadedKey, NSMetadataUbiquitousItemURLInLocalContainerKey, + NSMetadataUbiquitousItemUploadingErrorKey, + NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey, + NSMetadataUbiquitousSharedItemCurrentUserRoleKey, + NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey, + NSMetadataUbiquitousSharedItemOwnerNameComponentsKey, + NSMetadataUbiquitousSharedItemPermissionsReadOnly, + NSMetadataUbiquitousSharedItemPermissionsReadWrite, NSMetadataUbiquitousSharedItemRoleOwner, + NSMetadataUbiquitousSharedItemRoleParticipant, +}; +pub use self::__NSMethodSignature::NSMethodSignature; +pub use self::__NSMorphology::{ + NSGrammaticalGender, NSGrammaticalGenderFeminine, NSGrammaticalGenderMasculine, + NSGrammaticalGenderNeuter, NSGrammaticalGenderNotSet, NSGrammaticalNumber, + NSGrammaticalNumberNotSet, NSGrammaticalNumberPlural, NSGrammaticalNumberPluralFew, + NSGrammaticalNumberPluralMany, NSGrammaticalNumberPluralTwo, NSGrammaticalNumberSingular, + NSGrammaticalNumberZero, NSGrammaticalPartOfSpeech, NSGrammaticalPartOfSpeechAbbreviation, + NSGrammaticalPartOfSpeechAdjective, NSGrammaticalPartOfSpeechAdposition, + NSGrammaticalPartOfSpeechAdverb, NSGrammaticalPartOfSpeechConjunction, + NSGrammaticalPartOfSpeechDeterminer, NSGrammaticalPartOfSpeechInterjection, + NSGrammaticalPartOfSpeechLetter, NSGrammaticalPartOfSpeechNotSet, + NSGrammaticalPartOfSpeechNoun, NSGrammaticalPartOfSpeechNumeral, + NSGrammaticalPartOfSpeechParticle, NSGrammaticalPartOfSpeechPreposition, + NSGrammaticalPartOfSpeechPronoun, NSGrammaticalPartOfSpeechVerb, NSMorphology, + NSMorphologyCustomPronoun, +}; +pub use self::__NSNetServices::{ + NSNetService, NSNetServiceBrowser, NSNetServiceBrowserDelegate, NSNetServiceDelegate, + NSNetServiceListenForConnections, NSNetServiceNoAutoRename, NSNetServiceOptions, + NSNetServicesActivityInProgress, NSNetServicesBadArgumentError, NSNetServicesCancelledError, + NSNetServicesCollisionError, NSNetServicesError, NSNetServicesErrorCode, + NSNetServicesErrorDomain, NSNetServicesInvalidError, + NSNetServicesMissingRequiredConfigurationError, NSNetServicesNotFoundError, + NSNetServicesTimeoutError, NSNetServicesUnknownError, +}; +pub use self::__NSNotification::{NSNotification, NSNotificationCenter, NSNotificationName}; +pub use self::__NSNotificationQueue::{ + NSNotificationCoalescing, NSNotificationCoalescingOnName, NSNotificationCoalescingOnSender, + NSNotificationNoCoalescing, NSNotificationQueue, NSPostASAP, NSPostNow, NSPostWhenIdle, + NSPostingStyle, +}; +pub use self::__NSNull::NSNull; +pub use self::__NSNumberFormatter::{ + NSNumberFormatter, NSNumberFormatterBehavior, NSNumberFormatterBehavior10_0, + NSNumberFormatterBehavior10_4, NSNumberFormatterBehaviorDefault, + NSNumberFormatterCurrencyAccountingStyle, NSNumberFormatterCurrencyISOCodeStyle, + NSNumberFormatterCurrencyPluralStyle, NSNumberFormatterCurrencyStyle, + NSNumberFormatterDecimalStyle, NSNumberFormatterNoStyle, NSNumberFormatterOrdinalStyle, + NSNumberFormatterPadAfterPrefix, NSNumberFormatterPadAfterSuffix, + NSNumberFormatterPadBeforePrefix, NSNumberFormatterPadBeforeSuffix, + NSNumberFormatterPadPosition, NSNumberFormatterPercentStyle, NSNumberFormatterRoundCeiling, + NSNumberFormatterRoundDown, NSNumberFormatterRoundFloor, NSNumberFormatterRoundHalfDown, + NSNumberFormatterRoundHalfEven, NSNumberFormatterRoundHalfUp, NSNumberFormatterRoundUp, + NSNumberFormatterRoundingMode, NSNumberFormatterScientificStyle, + NSNumberFormatterSpellOutStyle, NSNumberFormatterStyle, +}; +pub use self::__NSObjCRuntime::{ + NSComparator, NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, + NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, NSOrderedAscending, + NSOrderedDescending, NSOrderedSame, NSQualityOfService, NSQualityOfServiceBackground, + NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, + NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, NSSortOptions, NSSortStable, +}; +pub use self::__NSObject::{ + NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, +}; +pub use self::__NSOperation::{ + NSBlockOperation, NSInvocationOperation, NSInvocationOperationCancelledException, + NSInvocationOperationVoidResultException, NSOperation, NSOperationQueue, + NSOperationQueueDefaultMaxConcurrentOperationCount, NSOperationQueuePriority, + NSOperationQueuePriorityHigh, NSOperationQueuePriorityLow, NSOperationQueuePriorityNormal, + NSOperationQueuePriorityVeryHigh, NSOperationQueuePriorityVeryLow, +}; +pub use self::__NSOrderedCollectionChange::{ + NSCollectionChangeInsert, NSCollectionChangeRemove, NSCollectionChangeType, + NSOrderedCollectionChange, +}; +pub use self::__NSOrderedCollectionDifference::{ + NSOrderedCollectionDifference, NSOrderedCollectionDifferenceCalculationInferMoves, + NSOrderedCollectionDifferenceCalculationOmitInsertedObjects, + NSOrderedCollectionDifferenceCalculationOmitRemovedObjects, + NSOrderedCollectionDifferenceCalculationOptions, +}; +pub use self::__NSOrderedSet::{NSMutableOrderedSet, NSOrderedSet}; +pub use self::__NSOrthography::NSOrthography; +pub use self::__NSPathUtilities::{ + NSAdminApplicationDirectory, NSAllApplicationsDirectory, NSAllDomainsMask, + NSAllLibrariesDirectory, NSApplicationDirectory, NSApplicationScriptsDirectory, + NSApplicationSupportDirectory, NSAutosavedInformationDirectory, NSCachesDirectory, + NSCoreServiceDirectory, NSDemoApplicationDirectory, NSDesktopDirectory, + NSDeveloperApplicationDirectory, NSDeveloperDirectory, NSDocumentDirectory, + NSDocumentationDirectory, NSDownloadsDirectory, NSInputMethodsDirectory, + NSItemReplacementDirectory, NSLibraryDirectory, NSLocalDomainMask, NSMoviesDirectory, + NSMusicDirectory, NSNetworkDomainMask, NSPicturesDirectory, NSPreferencePanesDirectory, + NSPrinterDescriptionDirectory, NSSearchPathDirectory, NSSearchPathDomainMask, + NSSharedPublicDirectory, NSSystemDomainMask, NSTrashDirectory, NSUserDirectory, + NSUserDomainMask, +}; +pub use self::__NSPersonNameComponents::NSPersonNameComponents; +pub use self::__NSPersonNameComponentsFormatter::{ + NSPersonNameComponentDelimiter, NSPersonNameComponentFamilyName, + NSPersonNameComponentGivenName, NSPersonNameComponentKey, NSPersonNameComponentMiddleName, + NSPersonNameComponentNickname, NSPersonNameComponentPrefix, NSPersonNameComponentSuffix, + NSPersonNameComponentsFormatter, NSPersonNameComponentsFormatterOptions, + NSPersonNameComponentsFormatterPhonetic, NSPersonNameComponentsFormatterStyle, + NSPersonNameComponentsFormatterStyleAbbreviated, NSPersonNameComponentsFormatterStyleDefault, + NSPersonNameComponentsFormatterStyleLong, NSPersonNameComponentsFormatterStyleMedium, + NSPersonNameComponentsFormatterStyleShort, +}; +pub use self::__NSPointerArray::NSPointerArray; +pub use self::__NSPointerFunctions::{ + NSPointerFunctions, NSPointerFunctionsCStringPersonality, NSPointerFunctionsCopyIn, + NSPointerFunctionsIntegerPersonality, NSPointerFunctionsMachVirtualMemory, + NSPointerFunctionsMallocMemory, NSPointerFunctionsObjectPersonality, + NSPointerFunctionsObjectPointerPersonality, NSPointerFunctionsOpaqueMemory, + NSPointerFunctionsOpaquePersonality, NSPointerFunctionsOptions, NSPointerFunctionsStrongMemory, + NSPointerFunctionsStructPersonality, NSPointerFunctionsWeakMemory, + NSPointerFunctionsZeroingWeakMemory, +}; +pub use self::__NSPort::{ + NSMachPort, NSMachPortDeallocateNone, NSMachPortDeallocateReceiveRight, + NSMachPortDeallocateSendRight, NSMachPortDelegate, NSMachPortOptions, NSMessagePort, NSPort, + NSPortDelegate, NSPortDidBecomeInvalidNotification, NSSocketNativeHandle, NSSocketPort, +}; +pub use self::__NSPortCoder::NSPortCoder; +pub use self::__NSPortMessage::NSPortMessage; +pub use self::__NSPortNameServer::{ + NSMachBootstrapServer, NSMessagePortNameServer, NSPortNameServer, NSSocketPortNameServer, +}; +pub use self::__NSPredicate::NSPredicate; +pub use self::__NSProcessInfo::{ + NSActivityAutomaticTerminationDisabled, NSActivityBackground, + NSActivityIdleDisplaySleepDisabled, NSActivityIdleSystemSleepDisabled, + NSActivityLatencyCritical, NSActivityOptions, NSActivitySuddenTerminationDisabled, + NSActivityUserInitiated, NSActivityUserInitiatedAllowingIdleSystemSleep, NSHPUXOperatingSystem, + NSMACHOperatingSystem, NSOSF1OperatingSystem, NSOperatingSystemVersion, NSProcessInfo, + NSProcessInfoPowerStateDidChangeNotification, NSProcessInfoThermalState, + NSProcessInfoThermalStateCritical, NSProcessInfoThermalStateDidChangeNotification, + NSProcessInfoThermalStateFair, NSProcessInfoThermalStateNominal, + NSProcessInfoThermalStateSerious, NSSolarisOperatingSystem, NSSunOSOperatingSystem, + NSWindows95OperatingSystem, NSWindowsNTOperatingSystem, +}; +pub use self::__NSProgress::{ + NSProgress, NSProgressEstimatedTimeRemainingKey, NSProgressFileAnimationImageKey, + NSProgressFileAnimationImageOriginalRectKey, NSProgressFileCompletedCountKey, + NSProgressFileIconKey, NSProgressFileOperationKind, NSProgressFileOperationKindCopying, + NSProgressFileOperationKindDecompressingAfterDownloading, + NSProgressFileOperationKindDownloading, NSProgressFileOperationKindDuplicating, + NSProgressFileOperationKindKey, NSProgressFileOperationKindReceiving, + NSProgressFileOperationKindUploading, NSProgressFileTotalCountKey, NSProgressFileURLKey, + NSProgressKind, NSProgressKindFile, NSProgressPublishingHandler, NSProgressReporting, + NSProgressThroughputKey, NSProgressUnpublishingHandler, NSProgressUserInfoKey, +}; +pub use self::__NSPropertyList::{ + NSPropertyListBinaryFormat_v1_0, NSPropertyListFormat, NSPropertyListImmutable, + NSPropertyListMutabilityOptions, NSPropertyListMutableContainers, + NSPropertyListMutableContainersAndLeaves, NSPropertyListOpenStepFormat, + NSPropertyListReadOptions, NSPropertyListSerialization, NSPropertyListWriteOptions, + NSPropertyListXMLFormat_v1_0, +}; +pub use self::__NSProtocolChecker::NSProtocolChecker; +pub use self::__NSRange::{NSRange, NSRangePointer}; +pub use self::__NSRegularExpression::{ + NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, + NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, + NSMatchingReportProgress, NSMatchingRequiredEnd, NSMatchingWithTransparentBounds, + NSMatchingWithoutAnchoringBounds, NSRegularExpression, + NSRegularExpressionAllowCommentsAndWhitespace, NSRegularExpressionAnchorsMatchLines, + NSRegularExpressionCaseInsensitive, NSRegularExpressionDotMatchesLineSeparators, + NSRegularExpressionIgnoreMetacharacters, NSRegularExpressionOptions, + NSRegularExpressionUseUnicodeWordBoundaries, NSRegularExpressionUseUnixLineSeparators, +}; +pub use self::__NSRelativeDateTimeFormatter::{ + NSRelativeDateTimeFormatter, NSRelativeDateTimeFormatterStyle, + NSRelativeDateTimeFormatterStyleNamed, NSRelativeDateTimeFormatterStyleNumeric, + NSRelativeDateTimeFormatterUnitsStyle, NSRelativeDateTimeFormatterUnitsStyleAbbreviated, + NSRelativeDateTimeFormatterUnitsStyleFull, NSRelativeDateTimeFormatterUnitsStyleShort, + NSRelativeDateTimeFormatterUnitsStyleSpellOut, +}; +pub use self::__NSRunLoop::{NSDefaultRunLoopMode, NSRunLoop, NSRunLoopCommonModes}; +pub use self::__NSScanner::NSScanner; +pub use self::__NSScriptClassDescription::NSScriptClassDescription; +pub use self::__NSScriptCoercionHandler::NSScriptCoercionHandler; +pub use self::__NSScriptCommand::{ + NSArgumentEvaluationScriptError, NSArgumentsWrongScriptError, NSCannotCreateScriptCommandError, + NSInternalScriptError, NSKeySpecifierEvaluationScriptError, NSNoScriptError, + NSOperationNotSupportedForKeyScriptError, NSReceiverEvaluationScriptError, + NSReceiversCantHandleCommandScriptError, NSRequiredArgumentsMissingScriptError, + NSScriptCommand, NSUnknownKeyScriptError, +}; +pub use self::__NSScriptCommandDescription::NSScriptCommandDescription; +pub use self::__NSScriptExecutionContext::NSScriptExecutionContext; +pub use self::__NSScriptKeyValueCoding::NSOperationNotSupportedForKeyException; +pub use self::__NSScriptObjectSpecifiers::{ + NSContainerSpecifierError, NSEverySubelement, NSIndexSpecifier, NSIndexSubelement, + NSInsertionPosition, NSInternalSpecifierError, NSInvalidIndexSpecifierError, NSMiddleSpecifier, + NSMiddleSubelement, NSNameSpecifier, NSNoSpecifierError, NSNoSubelement, + NSNoTopLevelContainersSpecifierError, NSOperationNotSupportedForKeySpecifierError, + NSPositionAfter, NSPositionBefore, NSPositionBeginning, NSPositionEnd, NSPositionReplace, + NSPositionalSpecifier, NSPropertySpecifier, NSRandomSpecifier, NSRandomSubelement, + NSRangeSpecifier, NSRelativeAfter, NSRelativeBefore, NSRelativePosition, NSRelativeSpecifier, + NSScriptObjectSpecifier, NSUniqueIDSpecifier, NSUnknownKeySpecifierError, NSWhoseSpecifier, + NSWhoseSubelementIdentifier, +}; +pub use self::__NSScriptStandardSuiteCommands::{ + NSCloneCommand, NSCloseCommand, NSCountCommand, NSCreateCommand, NSDeleteCommand, + NSExistsCommand, NSGetCommand, NSMoveCommand, NSQuitCommand, NSSaveOptions, NSSaveOptionsAsk, + NSSaveOptionsNo, NSSaveOptionsYes, NSSetCommand, +}; +pub use self::__NSScriptSuiteRegistry::NSScriptSuiteRegistry; +pub use self::__NSScriptWhoseTests::{ + NSBeginsWithComparison, NSContainsComparison, NSEndsWithComparison, NSEqualToComparison, + NSGreaterThanComparison, NSGreaterThanOrEqualToComparison, NSLessThanComparison, + NSLessThanOrEqualToComparison, NSLogicalTest, NSScriptWhoseTest, NSSpecifierTest, + NSTestComparisonOperation, +}; +pub use self::__NSSet::{NSCountedSet, NSMutableSet, NSSet}; +pub use self::__NSSortDescriptor::NSSortDescriptor; +pub use self::__NSSpellServer::{ + NSGrammarCorrections, NSGrammarRange, NSGrammarUserDescription, NSSpellServer, + NSSpellServerDelegate, +}; +pub use self::__NSStream::{ + NSInputStream, NSOutputStream, NSStream, NSStreamDataWrittenToMemoryStreamKey, + NSStreamDelegate, NSStreamEvent, NSStreamEventEndEncountered, NSStreamEventErrorOccurred, + NSStreamEventHasBytesAvailable, NSStreamEventHasSpaceAvailable, NSStreamEventNone, + NSStreamEventOpenCompleted, NSStreamFileCurrentOffsetKey, NSStreamNetworkServiceType, + NSStreamNetworkServiceTypeBackground, NSStreamNetworkServiceTypeCallSignaling, + NSStreamNetworkServiceTypeValue, NSStreamNetworkServiceTypeVideo, + NSStreamNetworkServiceTypeVoIP, NSStreamNetworkServiceTypeVoice, NSStreamPropertyKey, + NSStreamSOCKSErrorDomain, NSStreamSOCKSProxyConfiguration, NSStreamSOCKSProxyConfigurationKey, + NSStreamSOCKSProxyHostKey, NSStreamSOCKSProxyPasswordKey, NSStreamSOCKSProxyPortKey, + NSStreamSOCKSProxyUserKey, NSStreamSOCKSProxyVersion, NSStreamSOCKSProxyVersion4, + NSStreamSOCKSProxyVersion5, NSStreamSOCKSProxyVersionKey, NSStreamSocketSSLErrorDomain, + NSStreamSocketSecurityLevel, NSStreamSocketSecurityLevelKey, + NSStreamSocketSecurityLevelNegotiatedSSL, NSStreamSocketSecurityLevelNone, + NSStreamSocketSecurityLevelSSLv2, NSStreamSocketSecurityLevelSSLv3, + NSStreamSocketSecurityLevelTLSv1, NSStreamStatus, NSStreamStatusAtEnd, NSStreamStatusClosed, + NSStreamStatusError, NSStreamStatusNotOpen, NSStreamStatusOpen, NSStreamStatusOpening, + NSStreamStatusReading, NSStreamStatusWriting, +}; +pub use self::__NSString::{ + unichar, NSASCIIStringEncoding, NSAnchoredSearch, NSBackwardsSearch, NSCaseInsensitiveSearch, + NSCharacterConversionException, NSConstantString, NSDiacriticInsensitiveSearch, + NSForcedOrderingSearch, NSISO2022JPStringEncoding, NSISOLatin1StringEncoding, + NSISOLatin2StringEncoding, NSJapaneseEUCStringEncoding, NSLiteralSearch, + NSMacOSRomanStringEncoding, NSMutableString, NSNEXTSTEPStringEncoding, + NSNonLossyASCIIStringEncoding, NSNumericSearch, NSParseErrorException, + NSProprietaryStringEncoding, NSRegularExpressionSearch, NSShiftJISStringEncoding, + NSSimpleCString, NSString, NSStringCompareOptions, NSStringEncoding, + NSStringEncodingConversionAllowLossy, NSStringEncodingConversionExternalRepresentation, + NSStringEncodingConversionOptions, NSStringEncodingDetectionAllowLossyKey, + NSStringEncodingDetectionDisallowedEncodingsKey, NSStringEncodingDetectionFromWindowsKey, + NSStringEncodingDetectionLikelyLanguageKey, NSStringEncodingDetectionLossySubstitutionKey, + NSStringEncodingDetectionOptionsKey, NSStringEncodingDetectionSuggestedEncodingsKey, + NSStringEncodingDetectionUseOnlySuggestedEncodingsKey, NSStringEnumerationByCaretPositions, + NSStringEnumerationByComposedCharacterSequences, NSStringEnumerationByDeletionClusters, + NSStringEnumerationByLines, NSStringEnumerationByParagraphs, NSStringEnumerationBySentences, + NSStringEnumerationByWords, NSStringEnumerationLocalized, NSStringEnumerationOptions, + NSStringEnumerationReverse, NSStringEnumerationSubstringNotRequired, NSStringTransform, + NSStringTransformFullwidthToHalfwidth, NSStringTransformHiraganaToKatakana, + NSStringTransformLatinToArabic, NSStringTransformLatinToCyrillic, + NSStringTransformLatinToGreek, NSStringTransformLatinToHangul, NSStringTransformLatinToHebrew, + NSStringTransformLatinToHiragana, NSStringTransformLatinToKatakana, + NSStringTransformLatinToThai, NSStringTransformMandarinToLatin, + NSStringTransformStripCombiningMarks, NSStringTransformStripDiacritics, + NSStringTransformToLatin, NSStringTransformToUnicodeName, NSStringTransformToXMLHex, + NSSymbolStringEncoding, NSUTF16BigEndianStringEncoding, NSUTF16LittleEndianStringEncoding, + NSUTF16StringEncoding, NSUTF32BigEndianStringEncoding, NSUTF32LittleEndianStringEncoding, + NSUTF32StringEncoding, NSUTF8StringEncoding, NSUnicodeStringEncoding, NSWidthInsensitiveSearch, + NSWindowsCP1250StringEncoding, NSWindowsCP1251StringEncoding, NSWindowsCP1252StringEncoding, + NSWindowsCP1253StringEncoding, NSWindowsCP1254StringEncoding, +}; +pub use self::__NSTask::{ + NSTask, NSTaskDidTerminateNotification, NSTaskTerminationReason, NSTaskTerminationReasonExit, + NSTaskTerminationReasonUncaughtSignal, +}; +pub use self::__NSTextCheckingResult::{ + NSTextCheckingAirlineKey, NSTextCheckingAllCustomTypes, NSTextCheckingAllSystemTypes, + NSTextCheckingAllTypes, NSTextCheckingCityKey, NSTextCheckingCountryKey, + NSTextCheckingFlightKey, NSTextCheckingJobTitleKey, NSTextCheckingKey, NSTextCheckingNameKey, + NSTextCheckingOrganizationKey, NSTextCheckingPhoneKey, NSTextCheckingResult, + NSTextCheckingStateKey, NSTextCheckingStreetKey, NSTextCheckingType, NSTextCheckingTypeAddress, + NSTextCheckingTypeCorrection, NSTextCheckingTypeDash, NSTextCheckingTypeDate, + NSTextCheckingTypeGrammar, NSTextCheckingTypeLink, NSTextCheckingTypeOrthography, + NSTextCheckingTypePhoneNumber, NSTextCheckingTypeQuote, NSTextCheckingTypeRegularExpression, + NSTextCheckingTypeReplacement, NSTextCheckingTypeSpelling, + NSTextCheckingTypeTransitInformation, NSTextCheckingTypes, NSTextCheckingZIPKey, +}; +pub use self::__NSThread::{ + NSDidBecomeSingleThreadedNotification, NSThread, NSThreadWillExitNotification, + NSWillBecomeMultiThreadedNotification, +}; +pub use self::__NSTimeZone::{ + NSSystemTimeZoneDidChangeNotification, NSTimeZone, NSTimeZoneNameStyle, + NSTimeZoneNameStyleDaylightSaving, NSTimeZoneNameStyleGeneric, + NSTimeZoneNameStyleShortDaylightSaving, NSTimeZoneNameStyleShortGeneric, + NSTimeZoneNameStyleShortStandard, NSTimeZoneNameStyleStandard, +}; +pub use self::__NSTimer::NSTimer; +pub use self::__NSURLAuthenticationChallenge::{ + NSURLAuthenticationChallenge, NSURLAuthenticationChallengeSender, +}; +pub use self::__NSURLCache::{ + NSCachedURLResponse, NSURLCache, NSURLCacheStorageAllowed, + NSURLCacheStorageAllowedInMemoryOnly, NSURLCacheStorageNotAllowed, NSURLCacheStoragePolicy, +}; +pub use self::__NSURLConnection::{ + NSURLConnection, NSURLConnectionDataDelegate, NSURLConnectionDelegate, + NSURLConnectionDownloadDelegate, +}; +pub use self::__NSURLCredential::{ + NSURLCredential, NSURLCredentialPersistence, NSURLCredentialPersistenceForSession, + NSURLCredentialPersistenceNone, NSURLCredentialPersistencePermanent, + NSURLCredentialPersistenceSynchronizable, +}; +pub use self::__NSURLCredentialStorage::{ + NSURLCredentialStorage, NSURLCredentialStorageChangedNotification, + NSURLCredentialStorageRemoveSynchronizableCredentials, +}; +pub use self::__NSURLDownload::{NSURLDownload, NSURLDownloadDelegate}; +pub use self::__NSURLError::{ + NSErrorFailingURLStringKey, NSURLErrorAppTransportSecurityRequiresSecureConnection, + NSURLErrorBackgroundSessionInUseByAnotherProcess, + NSURLErrorBackgroundSessionRequiresSharedContainer, NSURLErrorBackgroundSessionWasDisconnected, + NSURLErrorBackgroundTaskCancelledReasonKey, NSURLErrorBadServerResponse, NSURLErrorBadURL, + NSURLErrorCallIsActive, NSURLErrorCancelled, + NSURLErrorCancelledReasonBackgroundUpdatesDisabled, + NSURLErrorCancelledReasonInsufficientSystemResources, + NSURLErrorCancelledReasonUserForceQuitApplication, NSURLErrorCannotCloseFile, + NSURLErrorCannotConnectToHost, NSURLErrorCannotCreateFile, NSURLErrorCannotDecodeContentData, + NSURLErrorCannotDecodeRawData, NSURLErrorCannotFindHost, NSURLErrorCannotLoadFromNetwork, + NSURLErrorCannotMoveFile, NSURLErrorCannotOpenFile, NSURLErrorCannotParseResponse, + NSURLErrorCannotRemoveFile, NSURLErrorCannotWriteToFile, NSURLErrorClientCertificateRejected, + NSURLErrorClientCertificateRequired, NSURLErrorDNSLookupFailed, + NSURLErrorDataLengthExceedsMaximum, NSURLErrorDataNotAllowed, NSURLErrorDomain, + NSURLErrorDownloadDecodingFailedMidStream, NSURLErrorDownloadDecodingFailedToComplete, + NSURLErrorFailingURLErrorKey, NSURLErrorFailingURLPeerTrustErrorKey, + NSURLErrorFailingURLStringErrorKey, NSURLErrorFileDoesNotExist, NSURLErrorFileIsDirectory, + NSURLErrorFileOutsideSafeArea, NSURLErrorHTTPTooManyRedirects, + NSURLErrorInternationalRoamingOff, NSURLErrorNetworkConnectionLost, + NSURLErrorNetworkUnavailableReason, NSURLErrorNetworkUnavailableReasonCellular, + NSURLErrorNetworkUnavailableReasonConstrained, NSURLErrorNetworkUnavailableReasonExpensive, + NSURLErrorNetworkUnavailableReasonKey, NSURLErrorNoPermissionsToReadFile, + NSURLErrorNotConnectedToInternet, NSURLErrorRedirectToNonExistentLocation, + NSURLErrorRequestBodyStreamExhausted, NSURLErrorResourceUnavailable, + NSURLErrorSecureConnectionFailed, NSURLErrorServerCertificateHasBadDate, + NSURLErrorServerCertificateHasUnknownRoot, NSURLErrorServerCertificateNotYetValid, + NSURLErrorServerCertificateUntrusted, NSURLErrorTimedOut, NSURLErrorUnknown, + NSURLErrorUnsupportedURL, NSURLErrorUserAuthenticationRequired, + NSURLErrorUserCancelledAuthentication, NSURLErrorZeroByteResource, +}; +pub use self::__NSURLHandle::{ + NSFTPPropertyActiveTransferModeKey, NSFTPPropertyFTPProxy, NSFTPPropertyFileOffsetKey, + NSFTPPropertyUserLoginKey, NSFTPPropertyUserPasswordKey, NSHTTPPropertyErrorPageDataKey, + NSHTTPPropertyHTTPProxy, NSHTTPPropertyRedirectionHeadersKey, + NSHTTPPropertyServerHTTPVersionKey, NSHTTPPropertyStatusCodeKey, NSHTTPPropertyStatusReasonKey, + NSURLHandle, NSURLHandleClient, NSURLHandleLoadFailed, NSURLHandleLoadInProgress, + NSURLHandleLoadSucceeded, NSURLHandleNotLoaded, NSURLHandleStatus, +}; +pub use self::__NSURLProtectionSpace::{ + NSURLAuthenticationMethodClientCertificate, NSURLAuthenticationMethodDefault, + NSURLAuthenticationMethodHTMLForm, NSURLAuthenticationMethodHTTPBasic, + NSURLAuthenticationMethodHTTPDigest, NSURLAuthenticationMethodNTLM, + NSURLAuthenticationMethodNegotiate, NSURLAuthenticationMethodServerTrust, NSURLProtectionSpace, + NSURLProtectionSpaceFTP, NSURLProtectionSpaceFTPProxy, NSURLProtectionSpaceHTTP, + NSURLProtectionSpaceHTTPProxy, NSURLProtectionSpaceHTTPS, NSURLProtectionSpaceHTTPSProxy, + NSURLProtectionSpaceSOCKSProxy, +}; +pub use self::__NSURLProtocol::{NSURLProtocol, NSURLProtocolClient}; +pub use self::__NSURLRequest::{ + NSMutableURLRequest, NSURLNetworkServiceTypeAVStreaming, NSURLNetworkServiceTypeBackground, + NSURLNetworkServiceTypeCallSignaling, NSURLNetworkServiceTypeDefault, + NSURLNetworkServiceTypeResponsiveAV, NSURLNetworkServiceTypeResponsiveData, + NSURLNetworkServiceTypeVideo, NSURLNetworkServiceTypeVoIP, NSURLNetworkServiceTypeVoice, + NSURLRequest, NSURLRequestAttribution, NSURLRequestAttributionDeveloper, + NSURLRequestAttributionUser, NSURLRequestCachePolicy, NSURLRequestNetworkServiceType, + NSURLRequestReloadIgnoringCacheData, NSURLRequestReloadIgnoringLocalAndRemoteCacheData, + NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestReloadRevalidatingCacheData, + NSURLRequestReturnCacheDataDontLoad, NSURLRequestReturnCacheDataElseLoad, + NSURLRequestUseProtocolCachePolicy, +}; +pub use self::__NSURLResponse::{NSHTTPURLResponse, NSURLResponse}; +pub use self::__NSURLSession::{ + NSURLSession, NSURLSessionAuthChallengeCancelAuthenticationChallenge, + NSURLSessionAuthChallengeDisposition, NSURLSessionAuthChallengePerformDefaultHandling, + NSURLSessionAuthChallengeRejectProtectionSpace, NSURLSessionAuthChallengeUseCredential, + NSURLSessionConfiguration, NSURLSessionDataDelegate, NSURLSessionDataTask, + NSURLSessionDelayedRequestCancel, NSURLSessionDelayedRequestContinueLoading, + NSURLSessionDelayedRequestDisposition, NSURLSessionDelayedRequestUseNewRequest, + NSURLSessionDelegate, NSURLSessionDownloadDelegate, NSURLSessionDownloadTask, + NSURLSessionDownloadTaskResumeData, NSURLSessionMultipathServiceType, + NSURLSessionMultipathServiceTypeAggregate, NSURLSessionMultipathServiceTypeHandover, + NSURLSessionMultipathServiceTypeInteractive, NSURLSessionMultipathServiceTypeNone, + NSURLSessionResponseAllow, NSURLSessionResponseBecomeDownload, + NSURLSessionResponseBecomeStream, NSURLSessionResponseCancel, NSURLSessionResponseDisposition, + NSURLSessionStreamDelegate, NSURLSessionStreamTask, NSURLSessionTask, NSURLSessionTaskDelegate, + NSURLSessionTaskMetrics, NSURLSessionTaskMetricsDomainResolutionProtocol, + NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS, + NSURLSessionTaskMetricsDomainResolutionProtocolTCP, + NSURLSessionTaskMetricsDomainResolutionProtocolTLS, + NSURLSessionTaskMetricsDomainResolutionProtocolUDP, + NSURLSessionTaskMetricsDomainResolutionProtocolUnknown, + NSURLSessionTaskMetricsResourceFetchType, NSURLSessionTaskMetricsResourceFetchTypeLocalCache, + NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad, + NSURLSessionTaskMetricsResourceFetchTypeServerPush, + NSURLSessionTaskMetricsResourceFetchTypeUnknown, NSURLSessionTaskPriorityDefault, + NSURLSessionTaskPriorityHigh, NSURLSessionTaskPriorityLow, NSURLSessionTaskState, + NSURLSessionTaskStateCanceling, NSURLSessionTaskStateCompleted, NSURLSessionTaskStateRunning, + NSURLSessionTaskStateSuspended, NSURLSessionTaskTransactionMetrics, + NSURLSessionTransferSizeUnknown, NSURLSessionUploadTask, NSURLSessionWebSocketCloseCode, + NSURLSessionWebSocketCloseCodeAbnormalClosure, NSURLSessionWebSocketCloseCodeGoingAway, + NSURLSessionWebSocketCloseCodeInternalServerError, NSURLSessionWebSocketCloseCodeInvalid, + NSURLSessionWebSocketCloseCodeInvalidFramePayloadData, + NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing, + NSURLSessionWebSocketCloseCodeMessageTooBig, NSURLSessionWebSocketCloseCodeNoStatusReceived, + NSURLSessionWebSocketCloseCodeNormalClosure, NSURLSessionWebSocketCloseCodePolicyViolation, + NSURLSessionWebSocketCloseCodeProtocolError, NSURLSessionWebSocketCloseCodeTLSHandshakeFailure, + NSURLSessionWebSocketCloseCodeUnsupportedData, NSURLSessionWebSocketDelegate, + NSURLSessionWebSocketMessage, NSURLSessionWebSocketMessageType, + NSURLSessionWebSocketMessageTypeData, NSURLSessionWebSocketMessageTypeString, + NSURLSessionWebSocketTask, +}; +pub use self::__NSUbiquitousKeyValueStore::{ + NSUbiquitousKeyValueStore, NSUbiquitousKeyValueStoreAccountChange, + NSUbiquitousKeyValueStoreChangeReasonKey, NSUbiquitousKeyValueStoreChangedKeysKey, + NSUbiquitousKeyValueStoreDidChangeExternallyNotification, + NSUbiquitousKeyValueStoreInitialSyncChange, NSUbiquitousKeyValueStoreQuotaViolationChange, + NSUbiquitousKeyValueStoreServerChange, +}; +pub use self::__NSUndoManager::{ + NSUndoCloseGroupingRunLoopOrdering, NSUndoManager, NSUndoManagerCheckpointNotification, + NSUndoManagerDidCloseUndoGroupNotification, NSUndoManagerDidOpenUndoGroupNotification, + NSUndoManagerDidRedoChangeNotification, NSUndoManagerDidUndoChangeNotification, + NSUndoManagerGroupIsDiscardableKey, NSUndoManagerWillCloseUndoGroupNotification, + NSUndoManagerWillRedoChangeNotification, NSUndoManagerWillUndoChangeNotification, +}; +pub use self::__NSUnit::{ + NSDimension, NSUnit, NSUnitAcceleration, NSUnitAngle, NSUnitArea, NSUnitConcentrationMass, + NSUnitConverter, NSUnitConverterLinear, NSUnitDispersion, NSUnitDuration, NSUnitElectricCharge, + NSUnitElectricCurrent, NSUnitElectricPotentialDifference, NSUnitElectricResistance, + NSUnitEnergy, NSUnitFrequency, NSUnitFuelEfficiency, NSUnitIlluminance, + NSUnitInformationStorage, NSUnitLength, NSUnitMass, NSUnitPower, NSUnitPressure, NSUnitSpeed, + NSUnitTemperature, NSUnitVolume, +}; +pub use self::__NSUserActivity::{ + NSUserActivity, NSUserActivityDelegate, NSUserActivityPersistentIdentifier, + NSUserActivityTypeBrowsingWeb, +}; +pub use self::__NSUserDefaults::{ + NSAMPMDesignation, NSArgumentDomain, NSCurrencySymbol, NSDateFormatString, NSDateTimeOrdering, + NSDecimalDigits, NSDecimalSeparator, NSEarlierTimeDesignations, NSGlobalDomain, + NSHourNameDesignations, NSInternationalCurrencyString, NSLaterTimeDesignations, + NSMonthNameArray, NSNegativeCurrencyFormatString, NSNextDayDesignations, + NSNextNextDayDesignations, NSPositiveCurrencyFormatString, NSPriorDayDesignations, + NSRegistrationDomain, NSShortDateFormatString, NSShortMonthNameArray, + NSShortTimeDateFormatString, NSShortWeekDayNameArray, NSThisDayDesignations, + NSThousandsSeparator, NSTimeDateFormatString, NSTimeFormatString, + NSUbiquitousUserDefaultsCompletedInitialSyncNotification, + NSUbiquitousUserDefaultsDidChangeAccountsNotification, + NSUbiquitousUserDefaultsNoCloudAccountNotification, NSUserDefaults, + NSUserDefaultsDidChangeNotification, NSUserDefaultsSizeLimitExceededNotification, + NSWeekDayNameArray, NSYearMonthWeekDesignations, +}; +pub use self::__NSUserNotification::{ + NSUserNotification, NSUserNotificationAction, NSUserNotificationActivationType, + NSUserNotificationActivationTypeActionButtonClicked, + NSUserNotificationActivationTypeAdditionalActionClicked, + NSUserNotificationActivationTypeContentsClicked, NSUserNotificationActivationTypeNone, + NSUserNotificationActivationTypeReplied, NSUserNotificationCenter, + NSUserNotificationCenterDelegate, NSUserNotificationDefaultSoundName, +}; +pub use self::__NSUserScriptTask::{ + NSUserAppleScriptTask, NSUserAppleScriptTaskCompletionHandler, NSUserAutomatorTask, + NSUserAutomatorTaskCompletionHandler, NSUserScriptTask, NSUserScriptTaskCompletionHandler, + NSUserUnixTask, NSUserUnixTaskCompletionHandler, +}; +pub use self::__NSValue::{NSNumber, NSValue}; +pub use self::__NSValueTransformer::{ + NSIsNilTransformerName, NSIsNotNilTransformerName, NSKeyedUnarchiveFromDataTransformerName, + NSNegateBooleanTransformerName, NSSecureUnarchiveFromDataTransformer, + NSSecureUnarchiveFromDataTransformerName, NSUnarchiveFromDataTransformerName, + NSValueTransformer, NSValueTransformerName, +}; +pub use self::__NSXMLDTDNode::{ + NSXMLAttributeCDATAKind, NSXMLAttributeEntitiesKind, NSXMLAttributeEntityKind, + NSXMLAttributeEnumerationKind, NSXMLAttributeIDKind, NSXMLAttributeIDRefKind, + NSXMLAttributeIDRefsKind, NSXMLAttributeNMTokenKind, NSXMLAttributeNMTokensKind, + NSXMLAttributeNotationKind, NSXMLDTDNode, NSXMLDTDNodeKind, NSXMLElementDeclarationAnyKind, + NSXMLElementDeclarationElementKind, NSXMLElementDeclarationEmptyKind, + NSXMLElementDeclarationMixedKind, NSXMLElementDeclarationUndefinedKind, NSXMLEntityGeneralKind, + NSXMLEntityParameterKind, NSXMLEntityParsedKind, NSXMLEntityPredefined, + NSXMLEntityUnparsedKind, +}; +pub use self::__NSXMLDocument::{ + NSXMLDocument, NSXMLDocumentContentKind, NSXMLDocumentHTMLKind, NSXMLDocumentTextKind, + NSXMLDocumentXHTMLKind, NSXMLDocumentXMLKind, +}; +pub use self::__NSXMLElement::NSXMLElement; +pub use self::__NSXMLNode::{ + NSXMLAttributeDeclarationKind, NSXMLAttributeKind, NSXMLCommentKind, NSXMLDTDKind, + NSXMLDocumentKind, NSXMLElementDeclarationKind, NSXMLElementKind, NSXMLEntityDeclarationKind, + NSXMLInvalidKind, NSXMLNamespaceKind, NSXMLNode, NSXMLNodeKind, NSXMLNotationDeclarationKind, + NSXMLProcessingInstructionKind, NSXMLTextKind, +}; +pub use self::__NSXMLNodeOptions::{ + NSXMLDocumentIncludeContentTypeDeclaration, NSXMLDocumentTidyHTML, NSXMLDocumentTidyXML, + NSXMLDocumentValidate, NSXMLDocumentXInclude, NSXMLNodeCompactEmptyElement, + NSXMLNodeExpandEmptyElement, NSXMLNodeIsCDATA, NSXMLNodeLoadExternalEntitiesAlways, + NSXMLNodeLoadExternalEntitiesNever, NSXMLNodeLoadExternalEntitiesSameOriginOnly, + NSXMLNodeNeverEscapeContents, NSXMLNodeOptions, NSXMLNodeOptionsNone, NSXMLNodePreserveAll, + NSXMLNodePreserveAttributeOrder, NSXMLNodePreserveCDATA, NSXMLNodePreserveCharacterReferences, + NSXMLNodePreserveDTD, NSXMLNodePreserveEmptyElements, NSXMLNodePreserveEntities, + NSXMLNodePreserveNamespaceOrder, NSXMLNodePreservePrefixes, NSXMLNodePreserveQuotes, + NSXMLNodePreserveWhitespace, NSXMLNodePrettyPrint, NSXMLNodePromoteSignificantWhitespace, + NSXMLNodeUseDoubleQuotes, NSXMLNodeUseSingleQuotes, +}; +pub use self::__NSXMLParser::{ + NSXMLParser, NSXMLParserAttributeHasNoValueError, NSXMLParserAttributeListNotFinishedError, + NSXMLParserAttributeListNotStartedError, NSXMLParserAttributeNotFinishedError, + NSXMLParserAttributeNotStartedError, NSXMLParserAttributeRedefinedError, + NSXMLParserCDATANotFinishedError, NSXMLParserCharacterRefAtEOFError, + NSXMLParserCharacterRefInDTDError, NSXMLParserCharacterRefInEpilogError, + NSXMLParserCharacterRefInPrologError, NSXMLParserCommentContainsDoubleHyphenError, + NSXMLParserCommentNotFinishedError, NSXMLParserConditionalSectionNotFinishedError, + NSXMLParserConditionalSectionNotStartedError, NSXMLParserDOCTYPEDeclNotFinishedError, + NSXMLParserDelegate, NSXMLParserDelegateAbortedParseError, NSXMLParserDocumentStartError, + NSXMLParserElementContentDeclNotFinishedError, NSXMLParserElementContentDeclNotStartedError, + NSXMLParserEmptyDocumentError, NSXMLParserEncodingNotSupportedError, + NSXMLParserEntityBoundaryError, NSXMLParserEntityIsExternalError, + NSXMLParserEntityIsParameterError, NSXMLParserEntityNotFinishedError, + NSXMLParserEntityNotStartedError, NSXMLParserEntityRefAtEOFError, + NSXMLParserEntityRefInDTDError, NSXMLParserEntityRefInEpilogError, + NSXMLParserEntityRefInPrologError, NSXMLParserEntityRefLoopError, + NSXMLParserEntityReferenceMissingSemiError, NSXMLParserEntityReferenceWithoutNameError, + NSXMLParserEntityValueRequiredError, NSXMLParserEqualExpectedError, NSXMLParserError, + NSXMLParserErrorDomain, NSXMLParserExternalEntityResolvingPolicy, + NSXMLParserExternalStandaloneEntityError, NSXMLParserExternalSubsetNotFinishedError, + NSXMLParserExtraContentError, NSXMLParserGTRequiredError, NSXMLParserInternalError, + NSXMLParserInvalidCharacterError, NSXMLParserInvalidCharacterInEntityError, + NSXMLParserInvalidCharacterRefError, NSXMLParserInvalidConditionalSectionError, + NSXMLParserInvalidDecimalCharacterRefError, NSXMLParserInvalidEncodingError, + NSXMLParserInvalidEncodingNameError, NSXMLParserInvalidHexCharacterRefError, + NSXMLParserInvalidURIError, NSXMLParserLTRequiredError, NSXMLParserLTSlashRequiredError, + NSXMLParserLessThanSymbolInAttributeError, NSXMLParserLiteralNotFinishedError, + NSXMLParserLiteralNotStartedError, NSXMLParserMisplacedCDATAEndStringError, + NSXMLParserMisplacedXMLDeclarationError, NSXMLParserMixedContentDeclNotFinishedError, + NSXMLParserMixedContentDeclNotStartedError, NSXMLParserNAMERequiredError, + NSXMLParserNMTOKENRequiredError, NSXMLParserNamespaceDeclarationError, NSXMLParserNoDTDError, + NSXMLParserNotWellBalancedError, NSXMLParserNotationNotFinishedError, + NSXMLParserNotationNotStartedError, NSXMLParserOutOfMemoryError, + NSXMLParserPCDATARequiredError, NSXMLParserParsedEntityRefAtEOFError, + NSXMLParserParsedEntityRefInEpilogError, NSXMLParserParsedEntityRefInInternalError, + NSXMLParserParsedEntityRefInInternalSubsetError, NSXMLParserParsedEntityRefInPrologError, + NSXMLParserParsedEntityRefMissingSemiError, NSXMLParserParsedEntityRefNoNameError, + NSXMLParserPrematureDocumentEndError, NSXMLParserProcessingInstructionNotFinishedError, + NSXMLParserProcessingInstructionNotStartedError, NSXMLParserPublicIdentifierRequiredError, + NSXMLParserResolveExternalEntitiesAlways, NSXMLParserResolveExternalEntitiesNever, + NSXMLParserResolveExternalEntitiesNoNetwork, NSXMLParserResolveExternalEntitiesSameOriginOnly, + NSXMLParserSeparatorRequiredError, NSXMLParserSpaceRequiredError, + NSXMLParserStandaloneValueError, NSXMLParserStringNotClosedError, + NSXMLParserStringNotStartedError, NSXMLParserTagNameMismatchError, NSXMLParserURIFragmentError, + NSXMLParserURIRequiredError, NSXMLParserUndeclaredEntityError, NSXMLParserUnfinishedTagError, + NSXMLParserUnknownEncodingError, NSXMLParserUnparsedEntityError, + NSXMLParserXMLDeclNotFinishedError, NSXMLParserXMLDeclNotStartedError, +}; +pub use self::__NSXPCConnection::{ + NSXPCCoder, NSXPCConnection, NSXPCConnectionOptions, NSXPCConnectionPrivileged, NSXPCInterface, + NSXPCListener, NSXPCListenerDelegate, NSXPCListenerEndpoint, NSXPCProxyCreating, +}; +pub use self::__NSZone::{NSCollectorDisabledOption, NSScannedOption}; +pub use self::__NSURL::{ + NSFileSecurity, NSThumbnail1024x1024SizeKey, NSURLAddedToDirectoryDateKey, + NSURLApplicationIsScriptableKey, NSURLAttributeModificationDateKey, + NSURLBookmarkCreationMinimalBookmark, NSURLBookmarkCreationOptions, + NSURLBookmarkCreationPreferFileIDResolution, + NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess, + NSURLBookmarkCreationSuitableForBookmarkFile, NSURLBookmarkCreationWithSecurityScope, + NSURLBookmarkCreationWithoutImplicitSecurityScope, NSURLBookmarkFileCreationOptions, + NSURLBookmarkResolutionOptions, NSURLBookmarkResolutionWithSecurityScope, + NSURLBookmarkResolutionWithoutImplicitStartAccessing, NSURLBookmarkResolutionWithoutMounting, + NSURLBookmarkResolutionWithoutUI, NSURLCanonicalPathKey, NSURLComponents, + NSURLContentAccessDateKey, NSURLContentModificationDateKey, NSURLContentTypeKey, + NSURLCreationDateKey, NSURLCustomIconKey, NSURLDocumentIdentifierKey, NSURLEffectiveIconKey, + NSURLFileAllocatedSizeKey, NSURLFileContentIdentifierKey, NSURLFileProtectionComplete, + NSURLFileProtectionCompleteUnlessOpen, NSURLFileProtectionCompleteUntilFirstUserAuthentication, + NSURLFileProtectionKey, NSURLFileProtectionNone, NSURLFileProtectionType, + NSURLFileResourceIdentifierKey, NSURLFileResourceType, NSURLFileResourceTypeBlockSpecial, + NSURLFileResourceTypeCharacterSpecial, NSURLFileResourceTypeDirectory, + NSURLFileResourceTypeKey, NSURLFileResourceTypeNamedPipe, NSURLFileResourceTypeRegular, + NSURLFileResourceTypeSocket, NSURLFileResourceTypeSymbolicLink, NSURLFileResourceTypeUnknown, + NSURLFileScheme, NSURLFileSecurityKey, NSURLFileSizeKey, NSURLGenerationIdentifierKey, + NSURLHasHiddenExtensionKey, NSURLIsAliasFileKey, NSURLIsApplicationKey, NSURLIsDirectoryKey, + NSURLIsExcludedFromBackupKey, NSURLIsExecutableKey, NSURLIsHiddenKey, NSURLIsMountTriggerKey, + NSURLIsPackageKey, NSURLIsPurgeableKey, NSURLIsReadableKey, NSURLIsRegularFileKey, + NSURLIsSparseKey, NSURLIsSymbolicLinkKey, NSURLIsSystemImmutableKey, NSURLIsUbiquitousItemKey, + NSURLIsUserImmutableKey, NSURLIsVolumeKey, NSURLIsWritableKey, NSURLKeysOfUnsetValuesKey, + NSURLLabelColorKey, NSURLLabelNumberKey, NSURLLinkCountKey, NSURLLocalizedLabelKey, + NSURLLocalizedNameKey, NSURLLocalizedTypeDescriptionKey, NSURLMayHaveExtendedAttributesKey, + NSURLMayShareFileContentKey, NSURLNameKey, NSURLParentDirectoryURLKey, NSURLPathKey, + NSURLPreferredIOBlockSizeKey, NSURLQuarantinePropertiesKey, NSURLQueryItem, NSURLResourceKey, + NSURLTagNamesKey, NSURLThumbnailDictionaryItem, NSURLThumbnailDictionaryKey, NSURLThumbnailKey, + NSURLTotalFileAllocatedSizeKey, NSURLTotalFileSizeKey, NSURLTypeIdentifierKey, + NSURLUbiquitousItemContainerDisplayNameKey, NSURLUbiquitousItemDownloadRequestedKey, + NSURLUbiquitousItemDownloadingErrorKey, NSURLUbiquitousItemDownloadingStatus, + NSURLUbiquitousItemDownloadingStatusCurrent, NSURLUbiquitousItemDownloadingStatusDownloaded, + NSURLUbiquitousItemDownloadingStatusKey, NSURLUbiquitousItemDownloadingStatusNotDownloaded, + NSURLUbiquitousItemHasUnresolvedConflictsKey, NSURLUbiquitousItemIsDownloadedKey, + NSURLUbiquitousItemIsDownloadingKey, NSURLUbiquitousItemIsExcludedFromSyncKey, + NSURLUbiquitousItemIsSharedKey, NSURLUbiquitousItemIsUploadedKey, + NSURLUbiquitousItemIsUploadingKey, NSURLUbiquitousItemPercentDownloadedKey, + NSURLUbiquitousItemPercentUploadedKey, NSURLUbiquitousItemUploadingErrorKey, + NSURLUbiquitousSharedItemCurrentUserPermissionsKey, + NSURLUbiquitousSharedItemCurrentUserRoleKey, + NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey, + NSURLUbiquitousSharedItemOwnerNameComponentsKey, NSURLUbiquitousSharedItemPermissions, + NSURLUbiquitousSharedItemPermissionsReadOnly, NSURLUbiquitousSharedItemPermissionsReadWrite, + NSURLUbiquitousSharedItemRole, NSURLUbiquitousSharedItemRoleOwner, + NSURLUbiquitousSharedItemRoleParticipant, NSURLVolumeAvailableCapacityForImportantUsageKey, + NSURLVolumeAvailableCapacityForOpportunisticUsageKey, NSURLVolumeAvailableCapacityKey, + NSURLVolumeCreationDateKey, NSURLVolumeIdentifierKey, NSURLVolumeIsAutomountedKey, + NSURLVolumeIsBrowsableKey, NSURLVolumeIsEjectableKey, NSURLVolumeIsEncryptedKey, + NSURLVolumeIsInternalKey, NSURLVolumeIsJournalingKey, NSURLVolumeIsLocalKey, + NSURLVolumeIsReadOnlyKey, NSURLVolumeIsRemovableKey, NSURLVolumeIsRootFileSystemKey, + NSURLVolumeLocalizedFormatDescriptionKey, NSURLVolumeLocalizedNameKey, + NSURLVolumeMaximumFileSizeKey, NSURLVolumeNameKey, NSURLVolumeResourceCountKey, + NSURLVolumeSupportsAccessPermissionsKey, NSURLVolumeSupportsAdvisoryFileLockingKey, + NSURLVolumeSupportsCasePreservedNamesKey, NSURLVolumeSupportsCaseSensitiveNamesKey, + NSURLVolumeSupportsCompressionKey, NSURLVolumeSupportsExclusiveRenamingKey, + NSURLVolumeSupportsExtendedSecurityKey, NSURLVolumeSupportsFileCloningKey, + NSURLVolumeSupportsFileProtectionKey, NSURLVolumeSupportsHardLinksKey, + NSURLVolumeSupportsImmutableFilesKey, NSURLVolumeSupportsJournalingKey, + NSURLVolumeSupportsPersistentIDsKey, NSURLVolumeSupportsRenamingKey, + NSURLVolumeSupportsRootDirectoryDatesKey, NSURLVolumeSupportsSparseFilesKey, + NSURLVolumeSupportsSwapRenamingKey, NSURLVolumeSupportsSymbolicLinksKey, + NSURLVolumeSupportsVolumeSizesKey, NSURLVolumeSupportsZeroRunsKey, NSURLVolumeTotalCapacityKey, + NSURLVolumeURLForRemountingKey, NSURLVolumeURLKey, NSURLVolumeUUIDStringKey, NSURL, +}; +pub use self::__NSUUID::NSUUID; +pub use self::__NSXMLDTD::NSXMLDTD; From 588e17feea116ca4284658f588b3678475169b5a Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 05:19:12 +0100 Subject: [PATCH 116/131] Add `abstract` keyword --- crates/header-translator/src/method.rs | 1 + .../generated/CoreData/NSEntityDescription.rs | 94 ++++++++++++------- 2 files changed, 59 insertions(+), 36 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 47450d800..854a39c92 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -441,6 +441,7 @@ pub(crate) fn handle_reserved(s: &str) -> &str { match s { "type" => "type_", "trait" => "trait_", + "abstract" => "abstract_", s => s, } } diff --git a/crates/icrate/src/generated/CoreData/NSEntityDescription.rs b/crates/icrate/src/generated/CoreData/NSEntityDescription.rs index 602fa480b..33c824460 100644 --- a/crates/icrate/src/generated/CoreData/NSEntityDescription.rs +++ b/crates/icrate/src/generated/CoreData/NSEntityDescription.rs @@ -16,109 +16,131 @@ extern_class!( extern_methods!( unsafe impl NSEntityDescription { #[method_id(@__retain_semantics Other entityForName:inManagedObjectContext:)] - pub unsafe fn entityForName_inManagedObjectContext(entityName: &NSString,context: &NSManagedObjectContext,) -> Option>; + pub unsafe fn entityForName_inManagedObjectContext( + entityName: &NSString, + context: &NSManagedObjectContext, + ) -> Option>; #[method_id(@__retain_semantics Other insertNewObjectForEntityForName:inManagedObjectContext:)] - pub unsafe fn insertNewObjectForEntityForName_inManagedObjectContext(entityName: &NSString,context: &NSManagedObjectContext,) -> Id; + pub unsafe fn insertNewObjectForEntityForName_inManagedObjectContext( + entityName: &NSString, + context: &NSManagedObjectContext, + ) -> Id; #[method_id(@__retain_semantics Other managedObjectModel)] - pub unsafe fn managedObjectModel(&self, ) -> Id; + pub unsafe fn managedObjectModel(&self) -> Id; #[method_id(@__retain_semantics Other managedObjectClassName)] - pub unsafe fn managedObjectClassName(&self, ) -> Id; + pub unsafe fn managedObjectClassName(&self) -> Id; #[method(setManagedObjectClassName:)] - pub unsafe fn setManagedObjectClassName(&self, managedObjectClassName: Option<&NSString>,); + pub unsafe fn setManagedObjectClassName(&self, managedObjectClassName: Option<&NSString>); #[method_id(@__retain_semantics Other name)] - pub unsafe fn name(&self, ) -> Option>; + pub unsafe fn name(&self) -> Option>; #[method(setName:)] - pub unsafe fn setName(&self, name: Option<&NSString>,); + pub unsafe fn setName(&self, name: Option<&NSString>); #[method(isAbstract)] - pub unsafe fn isAbstract(&self, ) -> bool; + pub unsafe fn isAbstract(&self) -> bool; #[method(setAbstract:)] - pub unsafe fn setAbstract(&self, abstract: bool,); + pub unsafe fn setAbstract(&self, abstract_: bool); #[method_id(@__retain_semantics Other subentitiesByName)] - pub unsafe fn subentitiesByName(&self, ) -> Id, Shared>; + pub unsafe fn subentitiesByName( + &self, + ) -> Id, Shared>; #[method_id(@__retain_semantics Other subentities)] - pub unsafe fn subentities(&self, ) -> Id, Shared>; + pub unsafe fn subentities(&self) -> Id, Shared>; #[method(setSubentities:)] - pub unsafe fn setSubentities(&self, subentities: &NSArray,); + pub unsafe fn setSubentities(&self, subentities: &NSArray); #[method_id(@__retain_semantics Other superentity)] - pub unsafe fn superentity(&self, ) -> Option>; + pub unsafe fn superentity(&self) -> Option>; #[method_id(@__retain_semantics Other propertiesByName)] - pub unsafe fn propertiesByName(&self, ) -> Id, Shared>; + pub unsafe fn propertiesByName( + &self, + ) -> Id, Shared>; #[method_id(@__retain_semantics Other properties)] - pub unsafe fn properties(&self, ) -> Id, Shared>; + pub unsafe fn properties(&self) -> Id, Shared>; #[method(setProperties:)] - pub unsafe fn setProperties(&self, properties: &NSArray,); + pub unsafe fn setProperties(&self, properties: &NSArray); #[method_id(@__retain_semantics Other userInfo)] - pub unsafe fn userInfo(&self, ) -> Option>; + pub unsafe fn userInfo(&self) -> Option>; #[method(setUserInfo:)] - pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>,); + pub unsafe fn setUserInfo(&self, userInfo: Option<&NSDictionary>); #[method_id(@__retain_semantics Other attributesByName)] - pub unsafe fn attributesByName(&self, ) -> Id, Shared>; + pub unsafe fn attributesByName( + &self, + ) -> Id, Shared>; #[method_id(@__retain_semantics Other relationshipsByName)] - pub unsafe fn relationshipsByName(&self, ) -> Id, Shared>; + pub unsafe fn relationshipsByName( + &self, + ) -> Id, Shared>; #[method_id(@__retain_semantics Other relationshipsWithDestinationEntity:)] - pub unsafe fn relationshipsWithDestinationEntity(&self, entity: &NSEntityDescription,) -> Id, Shared>; + pub unsafe fn relationshipsWithDestinationEntity( + &self, + entity: &NSEntityDescription, + ) -> Id, Shared>; #[method(isKindOfEntity:)] - pub unsafe fn isKindOfEntity(&self, entity: &NSEntityDescription,) -> bool; + pub unsafe fn isKindOfEntity(&self, entity: &NSEntityDescription) -> bool; #[method_id(@__retain_semantics Other versionHash)] - pub unsafe fn versionHash(&self, ) -> Id; + pub unsafe fn versionHash(&self) -> Id; #[method_id(@__retain_semantics Other versionHashModifier)] - pub unsafe fn versionHashModifier(&self, ) -> Option>; + pub unsafe fn versionHashModifier(&self) -> Option>; #[method(setVersionHashModifier:)] - pub unsafe fn setVersionHashModifier(&self, versionHashModifier: Option<&NSString>,); + pub unsafe fn setVersionHashModifier(&self, versionHashModifier: Option<&NSString>); #[method_id(@__retain_semantics Other renamingIdentifier)] - pub unsafe fn renamingIdentifier(&self, ) -> Option>; + pub unsafe fn renamingIdentifier(&self) -> Option>; #[method(setRenamingIdentifier:)] - pub unsafe fn setRenamingIdentifier(&self, renamingIdentifier: Option<&NSString>,); + pub unsafe fn setRenamingIdentifier(&self, renamingIdentifier: Option<&NSString>); #[method_id(@__retain_semantics Other indexes)] - pub unsafe fn indexes(&self, ) -> Id, Shared>; + pub unsafe fn indexes(&self) -> Id, Shared>; #[method(setIndexes:)] - pub unsafe fn setIndexes(&self, indexes: &NSArray,); + pub unsafe fn setIndexes(&self, indexes: &NSArray); #[method_id(@__retain_semantics Other uniquenessConstraints)] - pub unsafe fn uniquenessConstraints(&self, ) -> Id,>, Shared>; + pub unsafe fn uniquenessConstraints(&self) -> Id>, Shared>; #[method(setUniquenessConstraints:)] - pub unsafe fn setUniquenessConstraints(&self, uniquenessConstraints: &NSArray,>,); + pub unsafe fn setUniquenessConstraints( + &self, + uniquenessConstraints: &NSArray>, + ); #[method_id(@__retain_semantics Other compoundIndexes)] - pub unsafe fn compoundIndexes(&self, ) -> Id,>, Shared>; + pub unsafe fn compoundIndexes(&self) -> Id>, Shared>; #[method(setCompoundIndexes:)] - pub unsafe fn setCompoundIndexes(&self, compoundIndexes: &NSArray,>,); + pub unsafe fn setCompoundIndexes(&self, compoundIndexes: &NSArray>); #[method_id(@__retain_semantics Other coreSpotlightDisplayNameExpression)] - pub unsafe fn coreSpotlightDisplayNameExpression(&self, ) -> Id; + pub unsafe fn coreSpotlightDisplayNameExpression(&self) -> Id; #[method(setCoreSpotlightDisplayNameExpression:)] - pub unsafe fn setCoreSpotlightDisplayNameExpression(&self, coreSpotlightDisplayNameExpression: &NSExpression,); - + pub unsafe fn setCoreSpotlightDisplayNameExpression( + &self, + coreSpotlightDisplayNameExpression: &NSExpression, + ); } ); From f495d7539831a26af3e1605a9ca38fc7607fcf3d Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 2 Nov 2022 23:45:38 +0100 Subject: [PATCH 117/131] Put enum and static declarations behind a macro --- crates/header-translator/src/stmt.rs | 36 +- crates/icrate/src/Foundation/mod.rs | 2 +- .../src/generated/AppKit/AppKitErrors.rs | 47 +- .../src/generated/AppKit/NSAccessibility.rs | 7 +- .../AppKit/NSAccessibilityConstants.rs | 1716 ++++++----------- .../AppKit/NSAccessibilityCustomRotor.rs | 64 +- crates/icrate/src/generated/AppKit/NSAlert.rs | 24 +- .../src/generated/AppKit/NSAnimation.rs | 66 +- .../src/generated/AppKit/NSAppearance.rs | 36 +- .../src/generated/AppKit/NSApplication.rs | 395 ++-- .../generated/AppKit/NSAttributedString.rs | 585 +++--- .../src/generated/AppKit/NSBezierPath.rs | 78 +- .../src/generated/AppKit/NSBitmapImageRep.rs | 179 +- crates/icrate/src/generated/AppKit/NSBox.rs | 38 +- .../icrate/src/generated/AppKit/NSBrowser.rs | 30 +- .../src/generated/AppKit/NSButtonCell.rs | 132 +- .../AppKit/NSCandidateListTouchBarItem.rs | 4 +- crates/icrate/src/generated/AppKit/NSCell.rs | 219 ++- .../src/generated/AppKit/NSCollectionView.rs | 59 +- .../NSCollectionViewCompositionalLayout.rs | 82 +- .../AppKit/NSCollectionViewFlowLayout.rs | 28 +- .../AppKit/NSCollectionViewLayout.rs | 37 +- crates/icrate/src/generated/AppKit/NSColor.rs | 36 +- .../src/generated/AppKit/NSColorList.rs | 4 +- .../src/generated/AppKit/NSColorPanel.rs | 72 +- .../src/generated/AppKit/NSColorSpace.rs | 38 +- .../icrate/src/generated/AppKit/NSComboBox.rs | 16 +- .../icrate/src/generated/AppKit/NSControl.rs | 12 +- .../icrate/src/generated/AppKit/NSCursor.rs | 2 +- .../src/generated/AppKit/NSDatePickerCell.rs | 88 +- .../icrate/src/generated/AppKit/NSDockTile.rs | 2 +- .../icrate/src/generated/AppKit/NSDocument.rs | 42 +- .../icrate/src/generated/AppKit/NSDragging.rs | 98 +- .../src/generated/AppKit/NSDraggingItem.rs | 8 +- .../icrate/src/generated/AppKit/NSDrawer.rs | 30 +- .../icrate/src/generated/AppKit/NSErrors.rs | 144 +- crates/icrate/src/generated/AppKit/NSEvent.rs | 589 +++--- crates/icrate/src/generated/AppKit/NSFont.rs | 43 +- .../generated/AppKit/NSFontAssetRequest.rs | 8 +- .../src/generated/AppKit/NSFontCollection.rs | 78 +- .../src/generated/AppKit/NSFontDescriptor.rs | 302 ++- .../src/generated/AppKit/NSFontManager.rs | 64 +- .../src/generated/AppKit/NSFontPanel.rs | 76 +- .../generated/AppKit/NSGestureRecognizer.rs | 21 +- .../src/generated/AppKit/NSGlyphGenerator.rs | 11 +- .../src/generated/AppKit/NSGlyphInfo.rs | 18 +- .../icrate/src/generated/AppKit/NSGradient.rs | 10 +- .../icrate/src/generated/AppKit/NSGraphics.rs | 362 ++-- .../src/generated/AppKit/NSGraphicsContext.rs | 35 +- .../icrate/src/generated/AppKit/NSGridView.rs | 44 +- .../src/generated/AppKit/NSHapticFeedback.rs | 24 +- .../src/generated/AppKit/NSHelpManager.rs | 8 +- crates/icrate/src/generated/AppKit/NSImage.rs | 630 ++---- .../src/generated/AppKit/NSImageCell.rs | 42 +- .../icrate/src/generated/AppKit/NSImageRep.rs | 23 +- .../src/generated/AppKit/NSInterfaceStyle.rs | 17 +- .../src/generated/AppKit/NSItemProvider.rs | 16 +- .../src/generated/AppKit/NSKeyValueBinding.rs | 444 ++--- .../generated/AppKit/NSLayoutConstraint.rs | 139 +- .../src/generated/AppKit/NSLayoutManager.rs | 95 +- .../src/generated/AppKit/NSLevelIndicator.rs | 13 +- .../generated/AppKit/NSLevelIndicatorCell.rs | 32 +- .../icrate/src/generated/AppKit/NSMatrix.rs | 14 +- .../AppKit/NSMediaLibraryBrowserController.rs | 12 +- crates/icrate/src/generated/AppKit/NSMenu.rs | 46 +- .../icrate/src/generated/AppKit/NSMenuItem.rs | 4 +- crates/icrate/src/generated/AppKit/NSNib.rs | 8 +- .../icrate/src/generated/AppKit/NSOpenGL.rs | 227 ++- .../src/generated/AppKit/NSOutlineView.rs | 47 +- .../icrate/src/generated/AppKit/NSPDFPanel.rs | 12 +- .../src/generated/AppKit/NSPageController.rs | 12 +- crates/icrate/src/generated/AppKit/NSPanel.rs | 22 +- .../src/generated/AppKit/NSParagraphStyle.rs | 52 +- .../src/generated/AppKit/NSPasteboard.rs | 225 +-- .../icrate/src/generated/AppKit/NSPathCell.rs | 12 +- .../generated/AppKit/NSPickerTouchBarItem.rs | 29 +- .../src/generated/AppKit/NSPopUpButton.rs | 4 +- .../src/generated/AppKit/NSPopUpButtonCell.rs | 16 +- .../icrate/src/generated/AppKit/NSPopover.rs | 50 +- .../src/generated/AppKit/NSPrintInfo.rs | 198 +- .../src/generated/AppKit/NSPrintOperation.rs | 32 +- .../src/generated/AppKit/NSPrintPanel.rs | 45 +- .../icrate/src/generated/AppKit/NSPrinter.rs | 12 +- .../generated/AppKit/NSProgressIndicator.rs | 31 +- .../src/generated/AppKit/NSRuleEditor.rs | 56 +- .../src/generated/AppKit/NSRulerView.rs | 26 +- .../generated/AppKit/NSRunningApplication.rs | 24 +- .../src/generated/AppKit/NSSavePanel.rs | 9 +- .../icrate/src/generated/AppKit/NSScreen.rs | 4 +- .../src/generated/AppKit/NSScrollView.rs | 44 +- .../icrate/src/generated/AppKit/NSScroller.rs | 88 +- .../icrate/src/generated/AppKit/NSScrubber.rs | 26 +- .../src/generated/AppKit/NSSearchFieldCell.rs | 8 +- .../generated/AppKit/NSSegmentedControl.rs | 54 +- .../src/generated/AppKit/NSSharingService.rs | 108 +- .../src/generated/AppKit/NSSliderCell.rs | 36 +- .../generated/AppKit/NSSliderTouchBarItem.rs | 8 +- crates/icrate/src/generated/AppKit/NSSound.rs | 4 +- .../generated/AppKit/NSSpeechSynthesizer.rs | 240 +-- .../src/generated/AppKit/NSSpellChecker.rs | 153 +- .../src/generated/AppKit/NSSplitView.rs | 20 +- .../generated/AppKit/NSSplitViewController.rs | 4 +- .../src/generated/AppKit/NSSplitViewItem.rs | 36 +- .../src/generated/AppKit/NSStackView.rs | 44 +- .../src/generated/AppKit/NSStatusBar.rs | 4 +- .../src/generated/AppKit/NSStatusItem.rs | 10 +- .../src/generated/AppKit/NSStringDrawing.rs | 18 +- .../icrate/src/generated/AppKit/NSTabView.rs | 56 +- .../generated/AppKit/NSTabViewController.rs | 14 +- .../src/generated/AppKit/NSTabViewItem.rs | 12 +- .../src/generated/AppKit/NSTableColumn.rs | 12 +- .../src/generated/AppKit/NSTableView.rs | 169 +- .../generated/AppKit/NSTableViewRowAction.rs | 10 +- crates/icrate/src/generated/AppKit/NSText.rs | 151 +- .../generated/AppKit/NSTextAlternatives.rs | 6 +- .../src/generated/AppKit/NSTextAttachment.rs | 7 +- .../generated/AppKit/NSTextCheckingClient.rs | 12 +- .../src/generated/AppKit/NSTextContainer.rs | 32 +- .../src/generated/AppKit/NSTextContent.rs | 12 +- .../generated/AppKit/NSTextContentManager.rs | 18 +- .../src/generated/AppKit/NSTextFieldCell.rs | 10 +- .../src/generated/AppKit/NSTextFinder.rs | 54 +- .../generated/AppKit/NSTextInputContext.rs | 7 +- .../generated/AppKit/NSTextLayoutFragment.rs | 36 +- .../generated/AppKit/NSTextLayoutManager.rs | 37 +- .../icrate/src/generated/AppKit/NSTextList.rs | 76 +- .../src/generated/AppKit/NSTextSelection.rs | 28 +- .../AppKit/NSTextSelectionNavigation.rs | 82 +- .../src/generated/AppKit/NSTextStorage.rs | 18 +- .../src/generated/AppKit/NSTextTable.rs | 72 +- .../icrate/src/generated/AppKit/NSTextView.rs | 146 +- .../src/generated/AppKit/NSTokenFieldCell.rs | 22 +- .../icrate/src/generated/AppKit/NSToolbar.rs | 34 +- .../src/generated/AppKit/NSToolbarItem.rs | 48 +- .../generated/AppKit/NSToolbarItemGroup.rs | 29 +- crates/icrate/src/generated/AppKit/NSTouch.rs | 41 +- .../src/generated/AppKit/NSTouchBarItem.rs | 22 +- .../src/generated/AppKit/NSTrackingArea.rs | 26 +- .../src/generated/AppKit/NSTypesetter.rs | 18 +- .../src/generated/AppKit/NSUserActivity.rs | 4 +- .../generated/AppKit/NSUserInterfaceLayout.rs | 20 +- crates/icrate/src/generated/AppKit/NSView.rs | 140 +- .../src/generated/AppKit/NSViewController.rs | 25 +- .../generated/AppKit/NSVisualEffectView.rs | 70 +- .../icrate/src/generated/AppKit/NSWindow.rs | 427 ++-- .../generated/AppKit/NSWindowRestoration.rs | 4 +- .../src/generated/AppKit/NSWorkspace.rs | 252 +-- .../src/generated/CoreData/CoreDataDefines.rs | 4 +- .../src/generated/CoreData/CoreDataErrors.rs | 133 +- .../CoreData/NSAttributeDescription.rs | 36 +- .../NSCoreDataCoreSpotlightDelegate.rs | 7 +- .../src/generated/CoreData/NSEntityMapping.rs | 18 +- .../CoreData/NSEntityMigrationPolicy.rs | 24 +- .../NSFetchIndexElementDescription.rs | 10 +- .../src/generated/CoreData/NSFetchRequest.rs | 14 +- .../CoreData/NSFetchRequestExpression.rs | 2 +- .../CoreData/NSFetchedResultsController.rs | 14 +- .../src/generated/CoreData/NSManagedObject.rs | 18 +- .../CoreData/NSManagedObjectContext.rs | 144 +- .../src/generated/CoreData/NSMergePolicy.rs | 46 +- .../CoreData/NSPersistentCloudKitContainer.rs | 15 +- .../NSPersistentCloudKitContainerEvent.rs | 24 +- .../CoreData/NSPersistentHistoryChange.rs | 12 +- .../CoreData/NSPersistentStoreCoordinator.rs | 246 +-- .../CoreData/NSPersistentStoreRequest.rs | 16 +- .../CoreData/NSPersistentStoreResult.rs | 72 +- .../CoreData/NSRelationshipDescription.rs | 14 +- .../generated/Foundation/FoundationErrors.rs | 171 +- .../generated/Foundation/NSAffineTransform.rs | 2 +- .../Foundation/NSAppleEventDescriptor.rs | 28 +- .../Foundation/NSAppleEventManager.rs | 12 +- .../src/generated/Foundation/NSAppleScript.rs | 20 +- .../src/generated/Foundation/NSArray.rs | 12 +- .../Foundation/NSAttributedString.rs | 175 +- .../NSBackgroundActivityScheduler.rs | 10 +- .../src/generated/Foundation/NSBundle.rs | 31 +- .../Foundation/NSByteCountFormatter.rs | 44 +- .../src/generated/Foundation/NSByteOrder.rs | 10 +- .../src/generated/Foundation/NSCalendar.rs | 209 +- .../generated/Foundation/NSCharacterSet.rs | 7 +- .../Foundation/NSClassDescription.rs | 4 +- .../src/generated/Foundation/NSCoder.rs | 10 +- .../Foundation/NSComparisonPredicate.rs | 62 +- .../Foundation/NSCompoundPredicate.rs | 12 +- .../src/generated/Foundation/NSConnection.rs | 16 +- .../icrate/src/generated/Foundation/NSData.rs | 95 +- .../icrate/src/generated/Foundation/NSDate.rs | 4 +- .../Foundation/NSDateComponentsFormatter.rs | 53 +- .../generated/Foundation/NSDateFormatter.rs | 30 +- .../Foundation/NSDateIntervalFormatter.rs | 16 +- .../src/generated/Foundation/NSDecimal.rs | 30 +- .../generated/Foundation/NSDecimalNumber.rs | 16 +- .../NSDistributedNotificationCenter.rs | 42 +- .../generated/Foundation/NSEnergyFormatter.rs | 14 +- .../src/generated/Foundation/NSEnumerator.rs | 2 +- .../src/generated/Foundation/NSError.rs | 68 +- .../src/generated/Foundation/NSException.rs | 64 +- .../src/generated/Foundation/NSExpression.rs | 32 +- .../Foundation/NSExtensionContext.rs | 20 +- .../generated/Foundation/NSExtensionItem.rs | 12 +- .../generated/Foundation/NSFileCoordinator.rs | 34 +- .../src/generated/Foundation/NSFileHandle.rs | 32 +- .../src/generated/Foundation/NSFileManager.rs | 222 +-- .../src/generated/Foundation/NSFileVersion.rs | 16 +- .../src/generated/Foundation/NSFileWrapper.rs | 20 +- .../src/generated/Foundation/NSFormatter.rs | 30 +- .../src/generated/Foundation/NSGeometry.rs | 106 +- .../src/generated/Foundation/NSHTTPCookie.rs | 64 +- .../Foundation/NSHTTPCookieStorage.rs | 20 +- .../src/generated/Foundation/NSHashTable.rs | 53 +- .../Foundation/NSISO8601DateFormatter.rs | 34 +- .../generated/Foundation/NSItemProvider.rs | 53 +- .../Foundation/NSJSONSerialization.rs | 34 +- .../generated/Foundation/NSKeyValueCoding.rs | 48 +- .../Foundation/NSKeyValueObserving.rs | 66 +- .../generated/Foundation/NSKeyedArchiver.rs | 12 +- .../generated/Foundation/NSLengthFormatter.rs | 22 +- .../Foundation/NSLinguisticTagger.rs | 230 +-- .../src/generated/Foundation/NSLocale.rs | 140 +- .../src/generated/Foundation/NSMapTable.rs | 75 +- .../generated/Foundation/NSMassFormatter.rs | 16 +- .../Foundation/NSMeasurementFormatter.rs | 13 +- .../src/generated/Foundation/NSMetadata.rs | 64 +- .../Foundation/NSMetadataAttributes.rs | 724 ++----- .../src/generated/Foundation/NSMorphology.rs | 74 +- .../src/generated/Foundation/NSNetServices.rs | 48 +- .../Foundation/NSNotificationQueue.rs | 26 +- .../generated/Foundation/NSNumberFormatter.rs | 78 +- .../src/generated/Foundation/NSObjCRuntime.rs | 56 +- .../src/generated/Foundation/NSOperation.rs | 26 +- .../Foundation/NSOrderedCollectionChange.rs | 10 +- .../NSOrderedCollectionDifference.rs | 15 +- .../generated/Foundation/NSPathUtilities.rs | 78 +- .../NSPersonNameComponentsFormatter.rs | 56 +- .../Foundation/NSPointerFunctions.rs | 32 +- .../icrate/src/generated/Foundation/NSPort.rs | 16 +- .../src/generated/Foundation/NSProcessInfo.rs | 70 +- .../src/generated/Foundation/NSProgress.rs | 97 +- .../generated/Foundation/NSPropertyList.rs | 26 +- .../src/generated/Foundation/NSRange.rs | 2 +- .../Foundation/NSRegularExpression.rs | 54 +- .../Foundation/NSRelativeDateTimeFormatter.rs | 27 +- .../src/generated/Foundation/NSRunLoop.rs | 8 +- .../generated/Foundation/NSScriptCommand.rs | 27 +- .../Foundation/NSScriptKeyValueCoding.rs | 4 +- .../Foundation/NSScriptObjectSpecifiers.rs | 67 +- .../NSScriptStandardSuiteCommands.rs | 12 +- .../Foundation/NSScriptWhoseTests.rs | 22 +- .../src/generated/Foundation/NSSpellServer.rs | 12 +- .../src/generated/Foundation/NSStream.rs | 138 +- .../src/generated/Foundation/NSString.rs | 241 ++- .../icrate/src/generated/Foundation/NSTask.rs | 14 +- .../Foundation/NSTextCheckingResult.rs | 88 +- .../src/generated/Foundation/NSThread.rs | 12 +- .../src/generated/Foundation/NSTimeZone.rs | 22 +- .../icrate/src/generated/Foundation/NSURL.rs | 626 ++---- .../src/generated/Foundation/NSURLCache.rs | 12 +- .../generated/Foundation/NSURLCredential.rs | 14 +- .../Foundation/NSURLCredentialStorage.rs | 8 +- .../src/generated/Foundation/NSURLError.rs | 154 +- .../src/generated/Foundation/NSURLHandle.rs | 80 +- .../Foundation/NSURLProtectionSpace.rs | 60 +- .../src/generated/Foundation/NSURLRequest.rs | 59 +- .../src/generated/Foundation/NSURLSession.rs | 174 +- .../Foundation/NSUbiquitousKeyValueStore.rs | 34 +- .../src/generated/Foundation/NSUndoManager.rs | 38 +- .../generated/Foundation/NSUserActivity.rs | 4 +- .../generated/Foundation/NSUserDefaults.rs | 147 +- .../Foundation/NSUserNotification.rs | 21 +- .../Foundation/NSValueTransformer.rs | 24 +- .../src/generated/Foundation/NSXMLDTDNode.rs | 46 +- .../src/generated/Foundation/NSXMLDocument.rs | 14 +- .../src/generated/Foundation/NSXMLNode.rs | 32 +- .../generated/Foundation/NSXMLNodeOptions.rs | 84 +- .../src/generated/Foundation/NSXMLParser.rs | 213 +- .../generated/Foundation/NSXPCConnection.rs | 8 +- .../icrate/src/generated/Foundation/NSZone.rs | 9 +- crates/icrate/src/lib.rs | 158 +- 278 files changed, 8801 insertions(+), 10999 deletions(-) diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index cf42b20b4..eb1b2b529 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -810,7 +810,7 @@ impl fmt::Display for Stmt { boxable: _, fields, } => { - writeln!(f, "struct_impl!(")?; + writeln!(f, "extern_struct!(")?; writeln!(f, " pub struct {name} {{")?; for (name, ty) in fields { write!(f, " ")?; @@ -825,36 +825,42 @@ impl fmt::Display for Stmt { Self::EnumDecl { name, ty, - // TODO: Use the enum kind - kind: _, + kind, variants, } => { + let macro_name = match kind { + None => "extern_enum", + Some(UnexposedMacro::Enum) => "ns_enum", + Some(UnexposedMacro::Options) => "ns_options", + Some(UnexposedMacro::ClosedEnum) => "ns_closed_enum", + Some(UnexposedMacro::ErrorEnum) => "ns_error_enum", + }; + writeln!(f, "{}!(", macro_name)?; + writeln!(f, " #[underlying({ty})]")?; + write!(f, " pub enum ",)?; if let Some(name) = name { - writeln!(f, "pub type {name} = {ty};")?; - for (variant_name, expr) in variants { - writeln!(f, "pub const {variant_name}: {name} = {expr};")?; - } - } else { - for (variant_name, expr) in variants { - writeln!(f, "pub const {variant_name}: {ty} = {expr};")?; - } + write!(f, "{name} ")?; } + writeln!(f, "{{")?; + for (name, expr) in variants { + writeln!(f, " {name} = {expr},")?; + } + writeln!(f, " }}")?; + writeln!(f, ");")?; } Self::VarDecl { name, ty, value: None, } => { - writeln!(f, r#"extern "C" {{"#)?; - writeln!(f, " pub static {name}: {ty};")?; - writeln!(f, "}}")?; + writeln!(f, "extern_static!({name}: {ty});")?; } Self::VarDecl { name, ty, value: Some(expr), } => { - writeln!(f, "pub static {name}: {ty} = {expr};")?; + writeln!(f, "extern_static!({name}: {ty} = {expr});")?; } Self::FnDecl { name: _, diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index 9f70520a7..a32a47974 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -93,7 +93,7 @@ impl std::fmt::Debug for NSProxy { } } -struct_impl!( +extern_struct!( pub struct NSDecimal { // signed int _exponent:8; // unsigned int _length:4; diff --git a/crates/icrate/src/generated/AppKit/AppKitErrors.rs b/crates/icrate/src/generated/AppKit/AppKitErrors.rs index 35371d1be..047a12cfc 100644 --- a/crates/icrate/src/generated/AppKit/AppKitErrors.rs +++ b/crates/icrate/src/generated/AppKit/AppKitErrors.rs @@ -5,24 +5,29 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub const NSTextReadInapplicableDocumentTypeError: c_uint = 65806; -pub const NSTextWriteInapplicableDocumentTypeError: c_uint = 66062; -pub const NSTextReadWriteErrorMinimum: c_uint = 65792; -pub const NSTextReadWriteErrorMaximum: c_uint = 66303; -pub const NSFontAssetDownloadError: c_uint = 66304; -pub const NSFontErrorMinimum: c_uint = 66304; -pub const NSFontErrorMaximum: c_uint = 66335; -pub const NSServiceApplicationNotFoundError: c_uint = 66560; -pub const NSServiceApplicationLaunchFailedError: c_uint = 66561; -pub const NSServiceRequestTimedOutError: c_uint = 66562; -pub const NSServiceInvalidPasteboardDataError: c_uint = 66563; -pub const NSServiceMalformedServiceDictionaryError: c_uint = 66564; -pub const NSServiceMiscellaneousError: c_uint = 66800; -pub const NSServiceErrorMinimum: c_uint = 66560; -pub const NSServiceErrorMaximum: c_uint = 66817; -pub const NSSharingServiceNotConfiguredError: c_uint = 67072; -pub const NSSharingServiceErrorMinimum: c_uint = 67072; -pub const NSSharingServiceErrorMaximum: c_uint = 67327; -pub const NSWorkspaceAuthorizationInvalidError: c_uint = 67328; -pub const NSWorkspaceErrorMinimum: c_uint = 67328; -pub const NSWorkspaceErrorMaximum: c_uint = 67455; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSTextReadInapplicableDocumentTypeError = 65806, + NSTextWriteInapplicableDocumentTypeError = 66062, + NSTextReadWriteErrorMinimum = 65792, + NSTextReadWriteErrorMaximum = 66303, + NSFontAssetDownloadError = 66304, + NSFontErrorMinimum = 66304, + NSFontErrorMaximum = 66335, + NSServiceApplicationNotFoundError = 66560, + NSServiceApplicationLaunchFailedError = 66561, + NSServiceRequestTimedOutError = 66562, + NSServiceInvalidPasteboardDataError = 66563, + NSServiceMalformedServiceDictionaryError = 66564, + NSServiceMiscellaneousError = 66800, + NSServiceErrorMinimum = 66560, + NSServiceErrorMaximum = 66817, + NSSharingServiceNotConfiguredError = 67072, + NSSharingServiceErrorMinimum = 67072, + NSSharingServiceErrorMaximum = 67327, + NSWorkspaceAuthorizationInvalidError = 67328, + NSWorkspaceErrorMinimum = 67328, + NSWorkspaceErrorMaximum = 67455, + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAccessibility.rs b/crates/icrate/src/generated/AppKit/NSAccessibility.rs index 81685b3a6..514bc43a9 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibility.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibility.rs @@ -120,10 +120,9 @@ extern_methods!( } ); -extern "C" { - pub static NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification: - &'static NSNotificationName; -} +extern_static!( + NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification: &'static NSNotificationName +); extern_methods!( /// NSAccessibilityAdditions diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs index 5b7b56401..2655e5fa4 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs @@ -5,1389 +5,845 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSAccessibilityErrorCodeExceptionInfo: &'static NSString; -} +extern_static!(NSAccessibilityErrorCodeExceptionInfo: &'static NSString); pub type NSAccessibilityAttributeName = NSString; -extern "C" { - pub static NSAccessibilityRoleAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityRoleAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityRoleDescriptionAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityRoleDescriptionAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilitySubroleAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySubroleAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityHelpAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityHelpAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityValueAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityValueAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMinValueAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMinValueAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMaxValueAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMaxValueAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityEnabledAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityEnabledAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityFocusedAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityFocusedAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityParentAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityParentAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityChildrenAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityChildrenAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityWindowAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityWindowAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityTopLevelUIElementAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityTopLevelUIElementAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilitySelectedChildrenAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySelectedChildrenAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityVisibleChildrenAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityVisibleChildrenAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityPositionAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityPositionAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilitySizeAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySizeAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityContentsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityContentsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityTitleAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityTitleAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityDescriptionAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityDescriptionAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityShownMenuAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityShownMenuAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityValueDescriptionAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityValueDescriptionAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilitySharedFocusElementsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySharedFocusElementsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityPreviousContentsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityPreviousContentsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityNextContentsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityNextContentsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityHeaderAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityHeaderAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityEditedAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityEditedAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityTabsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityTabsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityHorizontalScrollBarAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityHorizontalScrollBarAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityVerticalScrollBarAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityVerticalScrollBarAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityOverflowButtonAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityOverflowButtonAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityIncrementButtonAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityIncrementButtonAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityDecrementButtonAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityDecrementButtonAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityFilenameAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityFilenameAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityExpandedAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityExpandedAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilitySelectedAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySelectedAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilitySplittersAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySplittersAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityDocumentAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityDocumentAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityActivationPointAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityActivationPointAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityURLAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityURLAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityIndexAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityIndexAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityRowCountAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityRowCountAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityColumnCountAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityColumnCountAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityOrderedByRowAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityOrderedByRowAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityWarningValueAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityWarningValueAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityCriticalValueAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityCriticalValueAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityPlaceholderValueAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityPlaceholderValueAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityContainsProtectedContentAttribute: - &'static NSAccessibilityAttributeName; -} +extern_static!( + NSAccessibilityContainsProtectedContentAttribute: &'static NSAccessibilityAttributeName +); -extern "C" { - pub static NSAccessibilityAlternateUIVisibleAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityAlternateUIVisibleAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityRequiredAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityRequiredAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityTitleUIElementAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityTitleUIElementAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityServesAsTitleForUIElementsAttribute: - &'static NSAccessibilityAttributeName; -} +extern_static!( + NSAccessibilityServesAsTitleForUIElementsAttribute: &'static NSAccessibilityAttributeName +); -extern "C" { - pub static NSAccessibilityLinkedUIElementsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityLinkedUIElementsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilitySelectedTextAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySelectedTextAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilitySelectedTextRangeAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySelectedTextRangeAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityNumberOfCharactersAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityNumberOfCharactersAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityVisibleCharacterRangeAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!( + NSAccessibilityVisibleCharacterRangeAttribute: &'static NSAccessibilityAttributeName +); -extern "C" { - pub static NSAccessibilitySharedTextUIElementsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySharedTextUIElementsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilitySharedCharacterRangeAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySharedCharacterRangeAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityInsertionPointLineNumberAttribute: - &'static NSAccessibilityAttributeName; -} +extern_static!( + NSAccessibilityInsertionPointLineNumberAttribute: &'static NSAccessibilityAttributeName +); -extern "C" { - pub static NSAccessibilitySelectedTextRangesAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilitySelectedTextRangesAttribute: &'static NSAccessibilityAttributeName); pub type NSAccessibilityParameterizedAttributeName = NSString; -extern "C" { - pub static NSAccessibilityLineForIndexParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityRangeForLineParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityStringForRangeParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityRangeForPositionParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityRangeForIndexParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityBoundsForRangeParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityRTFForRangeParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityStyleRangeForIndexParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityAttributedStringForRangeParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityFontTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityForegroundColorTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityBackgroundColorTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityUnderlineColorTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityStrikethroughColorTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityUnderlineTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilitySuperscriptTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityStrikethroughTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityShadowTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityAttachmentTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityLinkTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityAutocorrectedTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityTextAlignmentAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityListItemPrefixTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityListItemIndexTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityListItemLevelTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityMisspelledTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityMarkedMisspelledTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityLanguageTextAttribute: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAccessibilityCustomTextAttribute: &'static NSAttributedStringKey; -} +extern_static!( + NSAccessibilityLineForIndexParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); -extern "C" { - pub static NSAccessibilityAnnotationTextAttribute: &'static NSAttributedStringKey; -} +extern_static!( + NSAccessibilityRangeForLineParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!( + NSAccessibilityStringForRangeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!( + NSAccessibilityRangeForPositionParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!( + NSAccessibilityRangeForIndexParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!( + NSAccessibilityBoundsForRangeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!( + NSAccessibilityRTFForRangeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!( + NSAccessibilityStyleRangeForIndexParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!( + NSAccessibilityAttributedStringForRangeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!(NSAccessibilityFontTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityForegroundColorTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityBackgroundColorTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityUnderlineColorTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityStrikethroughColorTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityUnderlineTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilitySuperscriptTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityStrikethroughTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityShadowTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityAttachmentTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityLinkTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityAutocorrectedTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityTextAlignmentAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityListItemPrefixTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityListItemIndexTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityListItemLevelTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityMisspelledTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityMarkedMisspelledTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityLanguageTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityCustomTextAttribute: &'static NSAttributedStringKey); + +extern_static!(NSAccessibilityAnnotationTextAttribute: &'static NSAttributedStringKey); pub type NSAccessibilityAnnotationAttributeKey = NSString; -extern "C" { - pub static NSAccessibilityAnnotationLabel: &'static NSAccessibilityAnnotationAttributeKey; -} +extern_static!(NSAccessibilityAnnotationLabel: &'static NSAccessibilityAnnotationAttributeKey); -extern "C" { - pub static NSAccessibilityAnnotationElement: &'static NSAccessibilityAnnotationAttributeKey; -} +extern_static!(NSAccessibilityAnnotationElement: &'static NSAccessibilityAnnotationAttributeKey); -extern "C" { - pub static NSAccessibilityAnnotationLocation: &'static NSAccessibilityAnnotationAttributeKey; -} +extern_static!(NSAccessibilityAnnotationLocation: &'static NSAccessibilityAnnotationAttributeKey); -pub type NSAccessibilityAnnotationPosition = NSInteger; -pub const NSAccessibilityAnnotationPositionFullRange: NSAccessibilityAnnotationPosition = 0; -pub const NSAccessibilityAnnotationPositionStart: NSAccessibilityAnnotationPosition = 1; -pub const NSAccessibilityAnnotationPositionEnd: NSAccessibilityAnnotationPosition = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSAccessibilityAnnotationPosition { + NSAccessibilityAnnotationPositionFullRange = 0, + NSAccessibilityAnnotationPositionStart = 1, + NSAccessibilityAnnotationPositionEnd = 2, + } +); pub type NSAccessibilityFontAttributeKey = NSString; -extern "C" { - pub static NSAccessibilityFontNameKey: &'static NSAccessibilityFontAttributeKey; -} +extern_static!(NSAccessibilityFontNameKey: &'static NSAccessibilityFontAttributeKey); -extern "C" { - pub static NSAccessibilityFontFamilyKey: &'static NSAccessibilityFontAttributeKey; -} +extern_static!(NSAccessibilityFontFamilyKey: &'static NSAccessibilityFontAttributeKey); -extern "C" { - pub static NSAccessibilityVisibleNameKey: &'static NSAccessibilityFontAttributeKey; -} +extern_static!(NSAccessibilityVisibleNameKey: &'static NSAccessibilityFontAttributeKey); -extern "C" { - pub static NSAccessibilityFontSizeKey: &'static NSAccessibilityFontAttributeKey; -} +extern_static!(NSAccessibilityFontSizeKey: &'static NSAccessibilityFontAttributeKey); -extern "C" { - pub static NSAccessibilityMainAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMainAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMinimizedAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMinimizedAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityCloseButtonAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityCloseButtonAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityZoomButtonAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityZoomButtonAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMinimizeButtonAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMinimizeButtonAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityToolbarButtonAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityToolbarButtonAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityProxyAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityProxyAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityGrowAreaAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityGrowAreaAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityModalAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityModalAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityDefaultButtonAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityDefaultButtonAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityCancelButtonAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityCancelButtonAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityFullScreenButtonAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityFullScreenButtonAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMenuBarAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMenuBarAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityWindowsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityWindowsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityFrontmostAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityFrontmostAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityHiddenAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityHiddenAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMainWindowAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMainWindowAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityFocusedWindowAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityFocusedWindowAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityFocusedUIElementAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityFocusedUIElementAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityExtrasMenuBarAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityExtrasMenuBarAttribute: &'static NSAccessibilityAttributeName); -pub type NSAccessibilityOrientation = NSInteger; -pub const NSAccessibilityOrientationUnknown: NSAccessibilityOrientation = 0; -pub const NSAccessibilityOrientationVertical: NSAccessibilityOrientation = 1; -pub const NSAccessibilityOrientationHorizontal: NSAccessibilityOrientation = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSAccessibilityOrientation { + NSAccessibilityOrientationUnknown = 0, + NSAccessibilityOrientationVertical = 1, + NSAccessibilityOrientationHorizontal = 2, + } +); -extern "C" { - pub static NSAccessibilityOrientationAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityOrientationAttribute: &'static NSAccessibilityAttributeName); pub type NSAccessibilityOrientationValue = NSString; -extern "C" { - pub static NSAccessibilityVerticalOrientationValue: &'static NSAccessibilityOrientationValue; -} +extern_static!(NSAccessibilityVerticalOrientationValue: &'static NSAccessibilityOrientationValue); + +extern_static!(NSAccessibilityHorizontalOrientationValue: &'static NSAccessibilityOrientationValue); + +extern_static!(NSAccessibilityUnknownOrientationValue: &'static NSAccessibilityOrientationValue); + +extern_static!(NSAccessibilityColumnTitlesAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilitySearchButtonAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilitySearchMenuAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilityClearButtonAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilityRowsAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilityVisibleRowsAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilitySelectedRowsAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilityColumnsAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilityVisibleColumnsAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilitySelectedColumnsAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilitySortDirectionAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilitySelectedCellsAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilityVisibleCellsAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilityRowHeaderUIElementsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityHorizontalOrientationValue: &'static NSAccessibilityOrientationValue; -} - -extern "C" { - pub static NSAccessibilityUnknownOrientationValue: &'static NSAccessibilityOrientationValue; -} - -extern "C" { - pub static NSAccessibilityColumnTitlesAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilitySearchButtonAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilitySearchMenuAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityClearButtonAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityRowsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityVisibleRowsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilitySelectedRowsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityColumnsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityVisibleColumnsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilitySelectedColumnsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilitySortDirectionAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilitySelectedCellsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityVisibleCellsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityRowHeaderUIElementsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityColumnHeaderUIElementsAttribute: - &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityCellForColumnAndRowParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityRowIndexRangeAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityColumnIndexRangeAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityHorizontalUnitsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityVerticalUnitsAttribute: &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityHorizontalUnitDescriptionAttribute: - &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityVerticalUnitDescriptionAttribute: - &'static NSAccessibilityAttributeName; -} - -extern "C" { - pub static NSAccessibilityLayoutPointForScreenPointParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityLayoutSizeForScreenSizeParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityScreenPointForLayoutPointParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityScreenSizeForLayoutSizeParameterizedAttribute: - &'static NSAccessibilityParameterizedAttributeName; -} - -extern "C" { - pub static NSAccessibilityHandlesAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!( + NSAccessibilityColumnHeaderUIElementsAttribute: &'static NSAccessibilityAttributeName +); + +extern_static!( + NSAccessibilityCellForColumnAndRowParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!(NSAccessibilityRowIndexRangeAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilityColumnIndexRangeAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilityHorizontalUnitsAttribute: &'static NSAccessibilityAttributeName); + +extern_static!(NSAccessibilityVerticalUnitsAttribute: &'static NSAccessibilityAttributeName); + +extern_static!( + NSAccessibilityHorizontalUnitDescriptionAttribute: &'static NSAccessibilityAttributeName +); + +extern_static!( + NSAccessibilityVerticalUnitDescriptionAttribute: &'static NSAccessibilityAttributeName +); + +extern_static!( + NSAccessibilityLayoutPointForScreenPointParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!( + NSAccessibilityLayoutSizeForScreenSizeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!( + NSAccessibilityScreenPointForLayoutPointParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!( + NSAccessibilityScreenSizeForLayoutSizeParameterizedAttribute: + &'static NSAccessibilityParameterizedAttributeName +); + +extern_static!(NSAccessibilityHandlesAttribute: &'static NSAccessibilityAttributeName); pub type NSAccessibilitySortDirectionValue = NSString; -extern "C" { - pub static NSAccessibilityAscendingSortDirectionValue: - &'static NSAccessibilitySortDirectionValue; -} +extern_static!( + NSAccessibilityAscendingSortDirectionValue: &'static NSAccessibilitySortDirectionValue +); -extern "C" { - pub static NSAccessibilityDescendingSortDirectionValue: - &'static NSAccessibilitySortDirectionValue; -} +extern_static!( + NSAccessibilityDescendingSortDirectionValue: &'static NSAccessibilitySortDirectionValue +); -extern "C" { - pub static NSAccessibilityUnknownSortDirectionValue: &'static NSAccessibilitySortDirectionValue; -} +extern_static!( + NSAccessibilityUnknownSortDirectionValue: &'static NSAccessibilitySortDirectionValue +); -pub type NSAccessibilitySortDirection = NSInteger; -pub const NSAccessibilitySortDirectionUnknown: NSAccessibilitySortDirection = 0; -pub const NSAccessibilitySortDirectionAscending: NSAccessibilitySortDirection = 1; -pub const NSAccessibilitySortDirectionDescending: NSAccessibilitySortDirection = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSAccessibilitySortDirection { + NSAccessibilitySortDirectionUnknown = 0, + NSAccessibilitySortDirectionAscending = 1, + NSAccessibilitySortDirectionDescending = 2, + } +); -extern "C" { - pub static NSAccessibilityDisclosingAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityDisclosingAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityDisclosedRowsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityDisclosedRowsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityDisclosedByRowAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityDisclosedByRowAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityDisclosureLevelAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityDisclosureLevelAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityAllowedValuesAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityAllowedValuesAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityLabelUIElementsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityLabelUIElementsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityLabelValueAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityLabelValueAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMatteHoleAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMatteHoleAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMatteContentUIElementAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!( + NSAccessibilityMatteContentUIElementAttribute: &'static NSAccessibilityAttributeName +); -extern "C" { - pub static NSAccessibilityMarkerUIElementsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMarkerUIElementsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMarkerValuesAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMarkerValuesAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMarkerGroupUIElementAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMarkerGroupUIElementAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityUnitsAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityUnitsAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityUnitDescriptionAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityUnitDescriptionAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMarkerTypeAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityMarkerTypeAttribute: &'static NSAccessibilityAttributeName); -extern "C" { - pub static NSAccessibilityMarkerTypeDescriptionAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!( + NSAccessibilityMarkerTypeDescriptionAttribute: &'static NSAccessibilityAttributeName +); -extern "C" { - pub static NSAccessibilityIdentifierAttribute: &'static NSAccessibilityAttributeName; -} +extern_static!(NSAccessibilityIdentifierAttribute: &'static NSAccessibilityAttributeName); pub type NSAccessibilityRulerMarkerTypeValue = NSString; -extern "C" { - pub static NSAccessibilityLeftTabStopMarkerTypeValue: - &'static NSAccessibilityRulerMarkerTypeValue; -} - -extern "C" { - pub static NSAccessibilityRightTabStopMarkerTypeValue: - &'static NSAccessibilityRulerMarkerTypeValue; -} - -extern "C" { - pub static NSAccessibilityCenterTabStopMarkerTypeValue: - &'static NSAccessibilityRulerMarkerTypeValue; -} - -extern "C" { - pub static NSAccessibilityDecimalTabStopMarkerTypeValue: - &'static NSAccessibilityRulerMarkerTypeValue; -} - -extern "C" { - pub static NSAccessibilityHeadIndentMarkerTypeValue: - &'static NSAccessibilityRulerMarkerTypeValue; -} - -extern "C" { - pub static NSAccessibilityTailIndentMarkerTypeValue: - &'static NSAccessibilityRulerMarkerTypeValue; -} - -extern "C" { - pub static NSAccessibilityFirstLineIndentMarkerTypeValue: - &'static NSAccessibilityRulerMarkerTypeValue; -} - -extern "C" { - pub static NSAccessibilityUnknownMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue; -} - -pub type NSAccessibilityRulerMarkerType = NSInteger; -pub const NSAccessibilityRulerMarkerTypeUnknown: NSAccessibilityRulerMarkerType = 0; -pub const NSAccessibilityRulerMarkerTypeTabStopLeft: NSAccessibilityRulerMarkerType = 1; -pub const NSAccessibilityRulerMarkerTypeTabStopRight: NSAccessibilityRulerMarkerType = 2; -pub const NSAccessibilityRulerMarkerTypeTabStopCenter: NSAccessibilityRulerMarkerType = 3; -pub const NSAccessibilityRulerMarkerTypeTabStopDecimal: NSAccessibilityRulerMarkerType = 4; -pub const NSAccessibilityRulerMarkerTypeIndentHead: NSAccessibilityRulerMarkerType = 5; -pub const NSAccessibilityRulerMarkerTypeIndentTail: NSAccessibilityRulerMarkerType = 6; -pub const NSAccessibilityRulerMarkerTypeIndentFirstLine: NSAccessibilityRulerMarkerType = 7; +extern_static!( + NSAccessibilityLeftTabStopMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue +); + +extern_static!( + NSAccessibilityRightTabStopMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue +); + +extern_static!( + NSAccessibilityCenterTabStopMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue +); + +extern_static!( + NSAccessibilityDecimalTabStopMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue +); + +extern_static!( + NSAccessibilityHeadIndentMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue +); + +extern_static!( + NSAccessibilityTailIndentMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue +); + +extern_static!( + NSAccessibilityFirstLineIndentMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue +); + +extern_static!(NSAccessibilityUnknownMarkerTypeValue: &'static NSAccessibilityRulerMarkerTypeValue); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSAccessibilityRulerMarkerType { + NSAccessibilityRulerMarkerTypeUnknown = 0, + NSAccessibilityRulerMarkerTypeTabStopLeft = 1, + NSAccessibilityRulerMarkerTypeTabStopRight = 2, + NSAccessibilityRulerMarkerTypeTabStopCenter = 3, + NSAccessibilityRulerMarkerTypeTabStopDecimal = 4, + NSAccessibilityRulerMarkerTypeIndentHead = 5, + NSAccessibilityRulerMarkerTypeIndentTail = 6, + NSAccessibilityRulerMarkerTypeIndentFirstLine = 7, + } +); pub type NSAccessibilityRulerUnitValue = NSString; -extern "C" { - pub static NSAccessibilityInchesUnitValue: &'static NSAccessibilityRulerUnitValue; -} +extern_static!(NSAccessibilityInchesUnitValue: &'static NSAccessibilityRulerUnitValue); -extern "C" { - pub static NSAccessibilityCentimetersUnitValue: &'static NSAccessibilityRulerUnitValue; -} +extern_static!(NSAccessibilityCentimetersUnitValue: &'static NSAccessibilityRulerUnitValue); -extern "C" { - pub static NSAccessibilityPointsUnitValue: &'static NSAccessibilityRulerUnitValue; -} +extern_static!(NSAccessibilityPointsUnitValue: &'static NSAccessibilityRulerUnitValue); -extern "C" { - pub static NSAccessibilityPicasUnitValue: &'static NSAccessibilityRulerUnitValue; -} +extern_static!(NSAccessibilityPicasUnitValue: &'static NSAccessibilityRulerUnitValue); -extern "C" { - pub static NSAccessibilityUnknownUnitValue: &'static NSAccessibilityRulerUnitValue; -} +extern_static!(NSAccessibilityUnknownUnitValue: &'static NSAccessibilityRulerUnitValue); -pub type NSAccessibilityUnits = NSInteger; -pub const NSAccessibilityUnitsUnknown: NSAccessibilityUnits = 0; -pub const NSAccessibilityUnitsInches: NSAccessibilityUnits = 1; -pub const NSAccessibilityUnitsCentimeters: NSAccessibilityUnits = 2; -pub const NSAccessibilityUnitsPoints: NSAccessibilityUnits = 3; -pub const NSAccessibilityUnitsPicas: NSAccessibilityUnits = 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSAccessibilityUnits { + NSAccessibilityUnitsUnknown = 0, + NSAccessibilityUnitsInches = 1, + NSAccessibilityUnitsCentimeters = 2, + NSAccessibilityUnitsPoints = 3, + NSAccessibilityUnitsPicas = 4, + } +); pub type NSAccessibilityActionName = NSString; -extern "C" { - pub static NSAccessibilityPressAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityPressAction: &'static NSAccessibilityActionName); -extern "C" { - pub static NSAccessibilityIncrementAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityIncrementAction: &'static NSAccessibilityActionName); -extern "C" { - pub static NSAccessibilityDecrementAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityDecrementAction: &'static NSAccessibilityActionName); -extern "C" { - pub static NSAccessibilityConfirmAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityConfirmAction: &'static NSAccessibilityActionName); -extern "C" { - pub static NSAccessibilityPickAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityPickAction: &'static NSAccessibilityActionName); -extern "C" { - pub static NSAccessibilityCancelAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityCancelAction: &'static NSAccessibilityActionName); -extern "C" { - pub static NSAccessibilityRaiseAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityRaiseAction: &'static NSAccessibilityActionName); -extern "C" { - pub static NSAccessibilityShowMenuAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityShowMenuAction: &'static NSAccessibilityActionName); -extern "C" { - pub static NSAccessibilityDeleteAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityDeleteAction: &'static NSAccessibilityActionName); -extern "C" { - pub static NSAccessibilityShowAlternateUIAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityShowAlternateUIAction: &'static NSAccessibilityActionName); -extern "C" { - pub static NSAccessibilityShowDefaultUIAction: &'static NSAccessibilityActionName; -} +extern_static!(NSAccessibilityShowDefaultUIAction: &'static NSAccessibilityActionName); pub type NSAccessibilityNotificationName = NSString; -extern "C" { - pub static NSAccessibilityMainWindowChangedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityFocusedWindowChangedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityFocusedUIElementChangedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityApplicationActivatedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityApplicationDeactivatedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityApplicationHiddenNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityApplicationShownNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityWindowCreatedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityWindowMovedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityWindowResizedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityWindowMiniaturizedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityWindowDeminiaturizedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityDrawerCreatedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilitySheetCreatedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityUIElementDestroyedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityValueChangedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityTitleChangedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityResizedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityMovedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityCreatedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityLayoutChangedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityHelpTagCreatedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilitySelectedTextChangedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityRowCountChangedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilitySelectedChildrenChangedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilitySelectedRowsChangedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilitySelectedColumnsChangedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityRowExpandedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityRowCollapsedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilitySelectedCellsChangedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityUnitsChangedNotification: &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilitySelectedChildrenMovedNotification: - &'static NSAccessibilityNotificationName; -} - -extern "C" { - pub static NSAccessibilityAnnouncementRequestedNotification: - &'static NSAccessibilityNotificationName; -} +extern_static!( + NSAccessibilityMainWindowChangedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilityFocusedWindowChangedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilityFocusedUIElementChangedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilityApplicationActivatedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilityApplicationDeactivatedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilityApplicationHiddenNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilityApplicationShownNotification: &'static NSAccessibilityNotificationName +); + +extern_static!(NSAccessibilityWindowCreatedNotification: &'static NSAccessibilityNotificationName); + +extern_static!(NSAccessibilityWindowMovedNotification: &'static NSAccessibilityNotificationName); + +extern_static!(NSAccessibilityWindowResizedNotification: &'static NSAccessibilityNotificationName); + +extern_static!( + NSAccessibilityWindowMiniaturizedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilityWindowDeminiaturizedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!(NSAccessibilityDrawerCreatedNotification: &'static NSAccessibilityNotificationName); + +extern_static!(NSAccessibilitySheetCreatedNotification: &'static NSAccessibilityNotificationName); + +extern_static!( + NSAccessibilityUIElementDestroyedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!(NSAccessibilityValueChangedNotification: &'static NSAccessibilityNotificationName); + +extern_static!(NSAccessibilityTitleChangedNotification: &'static NSAccessibilityNotificationName); + +extern_static!(NSAccessibilityResizedNotification: &'static NSAccessibilityNotificationName); + +extern_static!(NSAccessibilityMovedNotification: &'static NSAccessibilityNotificationName); + +extern_static!(NSAccessibilityCreatedNotification: &'static NSAccessibilityNotificationName); + +extern_static!(NSAccessibilityLayoutChangedNotification: &'static NSAccessibilityNotificationName); + +extern_static!(NSAccessibilityHelpTagCreatedNotification: &'static NSAccessibilityNotificationName); + +extern_static!( + NSAccessibilitySelectedTextChangedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilityRowCountChangedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilitySelectedChildrenChangedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilitySelectedRowsChangedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilitySelectedColumnsChangedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!(NSAccessibilityRowExpandedNotification: &'static NSAccessibilityNotificationName); + +extern_static!(NSAccessibilityRowCollapsedNotification: &'static NSAccessibilityNotificationName); + +extern_static!( + NSAccessibilitySelectedCellsChangedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!(NSAccessibilityUnitsChangedNotification: &'static NSAccessibilityNotificationName); + +extern_static!( + NSAccessibilitySelectedChildrenMovedNotification: &'static NSAccessibilityNotificationName +); + +extern_static!( + NSAccessibilityAnnouncementRequestedNotification: &'static NSAccessibilityNotificationName +); pub type NSAccessibilityRole = NSString; -extern "C" { - pub static NSAccessibilityUnknownRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityUnknownRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityButtonRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityButtonRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityRadioButtonRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityRadioButtonRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityCheckBoxRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityCheckBoxRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilitySliderRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilitySliderRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityTabGroupRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityTabGroupRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityTextFieldRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityTextFieldRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityStaticTextRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityStaticTextRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityTextAreaRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityTextAreaRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityScrollAreaRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityScrollAreaRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityPopUpButtonRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityPopUpButtonRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityMenuButtonRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityMenuButtonRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityTableRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityTableRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityApplicationRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityApplicationRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityGroupRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityGroupRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityRadioGroupRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityRadioGroupRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityListRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityListRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityScrollBarRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityScrollBarRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityValueIndicatorRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityValueIndicatorRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityImageRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityImageRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityMenuBarRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityMenuBarRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityMenuBarItemRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityMenuBarItemRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityMenuRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityMenuRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityMenuItemRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityMenuItemRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityColumnRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityColumnRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityRowRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityRowRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityToolbarRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityToolbarRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityBusyIndicatorRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityBusyIndicatorRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityProgressIndicatorRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityProgressIndicatorRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityWindowRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityWindowRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityDrawerRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityDrawerRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilitySystemWideRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilitySystemWideRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityOutlineRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityOutlineRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityIncrementorRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityIncrementorRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityBrowserRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityBrowserRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityComboBoxRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityComboBoxRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilitySplitGroupRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilitySplitGroupRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilitySplitterRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilitySplitterRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityColorWellRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityColorWellRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityGrowAreaRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityGrowAreaRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilitySheetRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilitySheetRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityHelpTagRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityHelpTagRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityMatteRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityMatteRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityRulerRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityRulerRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityRulerMarkerRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityRulerMarkerRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityLinkRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityLinkRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityDisclosureTriangleRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityDisclosureTriangleRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityGridRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityGridRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityRelevanceIndicatorRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityRelevanceIndicatorRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityLevelIndicatorRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityLevelIndicatorRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityCellRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityCellRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityPopoverRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityPopoverRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityPageRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityPageRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityLayoutAreaRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityLayoutAreaRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityLayoutItemRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityLayoutItemRole: &'static NSAccessibilityRole); -extern "C" { - pub static NSAccessibilityHandleRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilityHandleRole: &'static NSAccessibilityRole); pub type NSAccessibilitySubrole = NSString; -extern "C" { - pub static NSAccessibilityUnknownSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityUnknownSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityCloseButtonSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityCloseButtonSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityZoomButtonSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityZoomButtonSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityMinimizeButtonSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityMinimizeButtonSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityToolbarButtonSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityToolbarButtonSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityTableRowSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityTableRowSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityOutlineRowSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityOutlineRowSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilitySecureTextFieldSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilitySecureTextFieldSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityStandardWindowSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityStandardWindowSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityDialogSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityDialogSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilitySystemDialogSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilitySystemDialogSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityFloatingWindowSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityFloatingWindowSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilitySystemFloatingWindowSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilitySystemFloatingWindowSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityIncrementArrowSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityIncrementArrowSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityDecrementArrowSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityDecrementArrowSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityIncrementPageSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityIncrementPageSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityDecrementPageSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityDecrementPageSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilitySearchFieldSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilitySearchFieldSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityTextAttachmentSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityTextAttachmentSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityTextLinkSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityTextLinkSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityTimelineSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityTimelineSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilitySortButtonSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilitySortButtonSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityRatingIndicatorSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityRatingIndicatorSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityContentListSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityContentListSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityDefinitionListSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityDefinitionListSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityFullScreenButtonSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityFullScreenButtonSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityToggleSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityToggleSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilitySwitchSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilitySwitchSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityDescriptionListSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityDescriptionListSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityTabButtonSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityTabButtonSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilityCollectionListSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilityCollectionListSubrole: &'static NSAccessibilitySubrole); -extern "C" { - pub static NSAccessibilitySectionListSubrole: &'static NSAccessibilitySubrole; -} +extern_static!(NSAccessibilitySectionListSubrole: &'static NSAccessibilitySubrole); pub type NSAccessibilityNotificationUserInfoKey = NSString; -extern "C" { - pub static NSAccessibilityUIElementsKey: &'static NSAccessibilityNotificationUserInfoKey; -} +extern_static!(NSAccessibilityUIElementsKey: &'static NSAccessibilityNotificationUserInfoKey); -extern "C" { - pub static NSAccessibilityPriorityKey: &'static NSAccessibilityNotificationUserInfoKey; -} +extern_static!(NSAccessibilityPriorityKey: &'static NSAccessibilityNotificationUserInfoKey); -extern "C" { - pub static NSAccessibilityAnnouncementKey: &'static NSAccessibilityNotificationUserInfoKey; -} +extern_static!(NSAccessibilityAnnouncementKey: &'static NSAccessibilityNotificationUserInfoKey); -pub type NSAccessibilityPriorityLevel = NSInteger; -pub const NSAccessibilityPriorityLow: NSAccessibilityPriorityLevel = 10; -pub const NSAccessibilityPriorityMedium: NSAccessibilityPriorityLevel = 50; -pub const NSAccessibilityPriorityHigh: NSAccessibilityPriorityLevel = 90; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSAccessibilityPriorityLevel { + NSAccessibilityPriorityLow = 10, + NSAccessibilityPriorityMedium = 50, + NSAccessibilityPriorityHigh = 90, + } +); pub type NSAccessibilityLoadingToken = TodoProtocols; -extern "C" { - pub static NSAccessibilitySortButtonRole: &'static NSAccessibilityRole; -} +extern_static!(NSAccessibilitySortButtonRole: &'static NSAccessibilityRole); diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs index 70f47a73e..25f10db6d 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs @@ -5,35 +5,41 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSAccessibilityCustomRotorSearchDirection = NSInteger; -pub const NSAccessibilityCustomRotorSearchDirectionPrevious: - NSAccessibilityCustomRotorSearchDirection = 0; -pub const NSAccessibilityCustomRotorSearchDirectionNext: NSAccessibilityCustomRotorSearchDirection = - 1; - -pub type NSAccessibilityCustomRotorType = NSInteger; -pub const NSAccessibilityCustomRotorTypeCustom: NSAccessibilityCustomRotorType = 0; -pub const NSAccessibilityCustomRotorTypeAny: NSAccessibilityCustomRotorType = 1; -pub const NSAccessibilityCustomRotorTypeAnnotation: NSAccessibilityCustomRotorType = 2; -pub const NSAccessibilityCustomRotorTypeBoldText: NSAccessibilityCustomRotorType = 3; -pub const NSAccessibilityCustomRotorTypeHeading: NSAccessibilityCustomRotorType = 4; -pub const NSAccessibilityCustomRotorTypeHeadingLevel1: NSAccessibilityCustomRotorType = 5; -pub const NSAccessibilityCustomRotorTypeHeadingLevel2: NSAccessibilityCustomRotorType = 6; -pub const NSAccessibilityCustomRotorTypeHeadingLevel3: NSAccessibilityCustomRotorType = 7; -pub const NSAccessibilityCustomRotorTypeHeadingLevel4: NSAccessibilityCustomRotorType = 8; -pub const NSAccessibilityCustomRotorTypeHeadingLevel5: NSAccessibilityCustomRotorType = 9; -pub const NSAccessibilityCustomRotorTypeHeadingLevel6: NSAccessibilityCustomRotorType = 10; -pub const NSAccessibilityCustomRotorTypeImage: NSAccessibilityCustomRotorType = 11; -pub const NSAccessibilityCustomRotorTypeItalicText: NSAccessibilityCustomRotorType = 12; -pub const NSAccessibilityCustomRotorTypeLandmark: NSAccessibilityCustomRotorType = 13; -pub const NSAccessibilityCustomRotorTypeLink: NSAccessibilityCustomRotorType = 14; -pub const NSAccessibilityCustomRotorTypeList: NSAccessibilityCustomRotorType = 15; -pub const NSAccessibilityCustomRotorTypeMisspelledWord: NSAccessibilityCustomRotorType = 16; -pub const NSAccessibilityCustomRotorTypeTable: NSAccessibilityCustomRotorType = 17; -pub const NSAccessibilityCustomRotorTypeTextField: NSAccessibilityCustomRotorType = 18; -pub const NSAccessibilityCustomRotorTypeUnderlinedText: NSAccessibilityCustomRotorType = 19; -pub const NSAccessibilityCustomRotorTypeVisitedLink: NSAccessibilityCustomRotorType = 20; -pub const NSAccessibilityCustomRotorTypeAudiograph: NSAccessibilityCustomRotorType = 21; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSAccessibilityCustomRotorSearchDirection { + NSAccessibilityCustomRotorSearchDirectionPrevious = 0, + NSAccessibilityCustomRotorSearchDirectionNext = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSAccessibilityCustomRotorType { + NSAccessibilityCustomRotorTypeCustom = 0, + NSAccessibilityCustomRotorTypeAny = 1, + NSAccessibilityCustomRotorTypeAnnotation = 2, + NSAccessibilityCustomRotorTypeBoldText = 3, + NSAccessibilityCustomRotorTypeHeading = 4, + NSAccessibilityCustomRotorTypeHeadingLevel1 = 5, + NSAccessibilityCustomRotorTypeHeadingLevel2 = 6, + NSAccessibilityCustomRotorTypeHeadingLevel3 = 7, + NSAccessibilityCustomRotorTypeHeadingLevel4 = 8, + NSAccessibilityCustomRotorTypeHeadingLevel5 = 9, + NSAccessibilityCustomRotorTypeHeadingLevel6 = 10, + NSAccessibilityCustomRotorTypeImage = 11, + NSAccessibilityCustomRotorTypeItalicText = 12, + NSAccessibilityCustomRotorTypeLandmark = 13, + NSAccessibilityCustomRotorTypeLink = 14, + NSAccessibilityCustomRotorTypeList = 15, + NSAccessibilityCustomRotorTypeMisspelledWord = 16, + NSAccessibilityCustomRotorTypeTable = 17, + NSAccessibilityCustomRotorTypeTextField = 18, + NSAccessibilityCustomRotorTypeUnderlinedText = 19, + NSAccessibilityCustomRotorTypeVisitedLink = 20, + NSAccessibilityCustomRotorTypeAudiograph = 21, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index a14dbd892..04ab2d3f3 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -5,16 +5,20 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSAlertStyle = NSUInteger; -pub const NSAlertStyleWarning: NSAlertStyle = 0; -pub const NSAlertStyleInformational: NSAlertStyle = 1; -pub const NSAlertStyleCritical: NSAlertStyle = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSAlertStyle { + NSAlertStyleWarning = 0, + NSAlertStyleInformational = 1, + NSAlertStyleCritical = 2, + } +); -pub static NSAlertFirstButtonReturn: NSModalResponse = 1000; +extern_static!(NSAlertFirstButtonReturn: NSModalResponse = 1000); -pub static NSAlertSecondButtonReturn: NSModalResponse = 1001; +extern_static!(NSAlertSecondButtonReturn: NSModalResponse = 1001); -pub static NSAlertThirdButtonReturn: NSModalResponse = 1002; +extern_static!(NSAlertThirdButtonReturn: NSModalResponse = 1002); extern_class!( #[derive(Debug)] @@ -127,8 +131,8 @@ extern_methods!( } ); -pub static NSWarningAlertStyle: NSAlertStyle = NSAlertStyleWarning; +extern_static!(NSWarningAlertStyle: NSAlertStyle = NSAlertStyleWarning); -pub static NSInformationalAlertStyle: NSAlertStyle = NSAlertStyleInformational; +extern_static!(NSInformationalAlertStyle: NSAlertStyle = NSAlertStyleInformational); -pub static NSCriticalAlertStyle: NSAlertStyle = NSAlertStyleCritical; +extern_static!(NSCriticalAlertStyle: NSAlertStyle = NSAlertStyleCritical); diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index 301433d8e..d0259a76d 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -5,26 +5,30 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSAnimationCurve = NSUInteger; -pub const NSAnimationEaseInOut: NSAnimationCurve = 0; -pub const NSAnimationEaseIn: NSAnimationCurve = 1; -pub const NSAnimationEaseOut: NSAnimationCurve = 2; -pub const NSAnimationLinear: NSAnimationCurve = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSAnimationCurve { + NSAnimationEaseInOut = 0, + NSAnimationEaseIn = 1, + NSAnimationEaseOut = 2, + NSAnimationLinear = 3, + } +); -pub type NSAnimationBlockingMode = NSUInteger; -pub const NSAnimationBlocking: NSAnimationBlockingMode = 0; -pub const NSAnimationNonblocking: NSAnimationBlockingMode = 1; -pub const NSAnimationNonblockingThreaded: NSAnimationBlockingMode = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSAnimationBlockingMode { + NSAnimationBlocking = 0, + NSAnimationNonblocking = 1, + NSAnimationNonblockingThreaded = 2, + } +); pub type NSAnimationProgress = c_float; -extern "C" { - pub static NSAnimationProgressMarkNotification: &'static NSNotificationName; -} +extern_static!(NSAnimationProgressMarkNotification: &'static NSNotificationName); -extern "C" { - pub static NSAnimationProgressMark: &'static NSString; -} +extern_static!(NSAnimationProgressMark: &'static NSString); extern_class!( #[derive(Debug)] @@ -143,31 +147,19 @@ pub type NSAnimationDelegate = NSObject; pub type NSViewAnimationKey = NSString; -extern "C" { - pub static NSViewAnimationTargetKey: &'static NSViewAnimationKey; -} +extern_static!(NSViewAnimationTargetKey: &'static NSViewAnimationKey); -extern "C" { - pub static NSViewAnimationStartFrameKey: &'static NSViewAnimationKey; -} +extern_static!(NSViewAnimationStartFrameKey: &'static NSViewAnimationKey); -extern "C" { - pub static NSViewAnimationEndFrameKey: &'static NSViewAnimationKey; -} +extern_static!(NSViewAnimationEndFrameKey: &'static NSViewAnimationKey); -extern "C" { - pub static NSViewAnimationEffectKey: &'static NSViewAnimationKey; -} +extern_static!(NSViewAnimationEffectKey: &'static NSViewAnimationKey); pub type NSViewAnimationEffectName = NSString; -extern "C" { - pub static NSViewAnimationFadeInEffect: &'static NSViewAnimationEffectName; -} +extern_static!(NSViewAnimationFadeInEffect: &'static NSViewAnimationEffectName); -extern "C" { - pub static NSViewAnimationFadeOutEffect: &'static NSViewAnimationEffectName; -} +extern_static!(NSViewAnimationFadeOutEffect: &'static NSViewAnimationEffectName); extern_class!( #[derive(Debug)] @@ -203,10 +195,6 @@ pub type NSAnimatablePropertyKey = NSString; pub type NSAnimatablePropertyContainer = NSObject; -extern "C" { - pub static NSAnimationTriggerOrderIn: &'static NSAnimatablePropertyKey; -} +extern_static!(NSAnimationTriggerOrderIn: &'static NSAnimatablePropertyKey); -extern "C" { - pub static NSAnimationTriggerOrderOut: &'static NSAnimatablePropertyKey; -} +extern_static!(NSAnimationTriggerOrderOut: &'static NSAnimatablePropertyKey); diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index 1cbfa46c5..75acd1fa5 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -60,40 +60,22 @@ extern_methods!( } ); -extern "C" { - pub static NSAppearanceNameAqua: &'static NSAppearanceName; -} +extern_static!(NSAppearanceNameAqua: &'static NSAppearanceName); -extern "C" { - pub static NSAppearanceNameDarkAqua: &'static NSAppearanceName; -} +extern_static!(NSAppearanceNameDarkAqua: &'static NSAppearanceName); -extern "C" { - pub static NSAppearanceNameLightContent: &'static NSAppearanceName; -} +extern_static!(NSAppearanceNameLightContent: &'static NSAppearanceName); -extern "C" { - pub static NSAppearanceNameVibrantDark: &'static NSAppearanceName; -} +extern_static!(NSAppearanceNameVibrantDark: &'static NSAppearanceName); -extern "C" { - pub static NSAppearanceNameVibrantLight: &'static NSAppearanceName; -} +extern_static!(NSAppearanceNameVibrantLight: &'static NSAppearanceName); -extern "C" { - pub static NSAppearanceNameAccessibilityHighContrastAqua: &'static NSAppearanceName; -} +extern_static!(NSAppearanceNameAccessibilityHighContrastAqua: &'static NSAppearanceName); -extern "C" { - pub static NSAppearanceNameAccessibilityHighContrastDarkAqua: &'static NSAppearanceName; -} +extern_static!(NSAppearanceNameAccessibilityHighContrastDarkAqua: &'static NSAppearanceName); -extern "C" { - pub static NSAppearanceNameAccessibilityHighContrastVibrantLight: &'static NSAppearanceName; -} +extern_static!(NSAppearanceNameAccessibilityHighContrastVibrantLight: &'static NSAppearanceName); -extern "C" { - pub static NSAppearanceNameAccessibilityHighContrastVibrantDark: &'static NSAppearanceName; -} +extern_static!(NSAppearanceNameAccessibilityHighContrastVibrantDark: &'static NSAppearanceName); pub type NSAppearanceCustomization = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index d8c1436bd..115076496 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -7,189 +7,201 @@ use crate::Foundation::*; pub type NSAppKitVersion = c_double; -extern "C" { - pub static NSAppKitVersionNumber: NSAppKitVersion; -} +extern_static!(NSAppKitVersionNumber: NSAppKitVersion); -pub static NSAppKitVersionNumber10_0: NSAppKitVersion = 577; +extern_static!(NSAppKitVersionNumber10_0: NSAppKitVersion = 577); -pub static NSAppKitVersionNumber10_1: NSAppKitVersion = 620; +extern_static!(NSAppKitVersionNumber10_1: NSAppKitVersion = 620); -pub static NSAppKitVersionNumber10_2: NSAppKitVersion = 663; +extern_static!(NSAppKitVersionNumber10_2: NSAppKitVersion = 663); -pub static NSAppKitVersionNumber10_2_3: NSAppKitVersion = 663.6; +extern_static!(NSAppKitVersionNumber10_2_3: NSAppKitVersion = 663.6); -pub static NSAppKitVersionNumber10_3: NSAppKitVersion = 743; +extern_static!(NSAppKitVersionNumber10_3: NSAppKitVersion = 743); -pub static NSAppKitVersionNumber10_3_2: NSAppKitVersion = 743.14; +extern_static!(NSAppKitVersionNumber10_3_2: NSAppKitVersion = 743.14); -pub static NSAppKitVersionNumber10_3_3: NSAppKitVersion = 743.2; +extern_static!(NSAppKitVersionNumber10_3_3: NSAppKitVersion = 743.2); -pub static NSAppKitVersionNumber10_3_5: NSAppKitVersion = 743.24; +extern_static!(NSAppKitVersionNumber10_3_5: NSAppKitVersion = 743.24); -pub static NSAppKitVersionNumber10_3_7: NSAppKitVersion = 743.33; +extern_static!(NSAppKitVersionNumber10_3_7: NSAppKitVersion = 743.33); -pub static NSAppKitVersionNumber10_3_9: NSAppKitVersion = 743.36; +extern_static!(NSAppKitVersionNumber10_3_9: NSAppKitVersion = 743.36); -pub static NSAppKitVersionNumber10_4: NSAppKitVersion = 824; +extern_static!(NSAppKitVersionNumber10_4: NSAppKitVersion = 824); -pub static NSAppKitVersionNumber10_4_1: NSAppKitVersion = 824.1; +extern_static!(NSAppKitVersionNumber10_4_1: NSAppKitVersion = 824.1); -pub static NSAppKitVersionNumber10_4_3: NSAppKitVersion = 824.23; +extern_static!(NSAppKitVersionNumber10_4_3: NSAppKitVersion = 824.23); -pub static NSAppKitVersionNumber10_4_4: NSAppKitVersion = 824.33; +extern_static!(NSAppKitVersionNumber10_4_4: NSAppKitVersion = 824.33); -pub static NSAppKitVersionNumber10_4_7: NSAppKitVersion = 824.41; +extern_static!(NSAppKitVersionNumber10_4_7: NSAppKitVersion = 824.41); -pub static NSAppKitVersionNumber10_5: NSAppKitVersion = 949; +extern_static!(NSAppKitVersionNumber10_5: NSAppKitVersion = 949); -pub static NSAppKitVersionNumber10_5_2: NSAppKitVersion = 949.27; +extern_static!(NSAppKitVersionNumber10_5_2: NSAppKitVersion = 949.27); -pub static NSAppKitVersionNumber10_5_3: NSAppKitVersion = 949.33; +extern_static!(NSAppKitVersionNumber10_5_3: NSAppKitVersion = 949.33); -pub static NSAppKitVersionNumber10_6: NSAppKitVersion = 1038; +extern_static!(NSAppKitVersionNumber10_6: NSAppKitVersion = 1038); -pub static NSAppKitVersionNumber10_7: NSAppKitVersion = 1138; +extern_static!(NSAppKitVersionNumber10_7: NSAppKitVersion = 1138); -pub static NSAppKitVersionNumber10_7_2: NSAppKitVersion = 1138.23; +extern_static!(NSAppKitVersionNumber10_7_2: NSAppKitVersion = 1138.23); -pub static NSAppKitVersionNumber10_7_3: NSAppKitVersion = 1138.32; +extern_static!(NSAppKitVersionNumber10_7_3: NSAppKitVersion = 1138.32); -pub static NSAppKitVersionNumber10_7_4: NSAppKitVersion = 1138.47; +extern_static!(NSAppKitVersionNumber10_7_4: NSAppKitVersion = 1138.47); -pub static NSAppKitVersionNumber10_8: NSAppKitVersion = 1187; +extern_static!(NSAppKitVersionNumber10_8: NSAppKitVersion = 1187); -pub static NSAppKitVersionNumber10_9: NSAppKitVersion = 1265; +extern_static!(NSAppKitVersionNumber10_9: NSAppKitVersion = 1265); -pub static NSAppKitVersionNumber10_10: NSAppKitVersion = 1343; +extern_static!(NSAppKitVersionNumber10_10: NSAppKitVersion = 1343); -pub static NSAppKitVersionNumber10_10_2: NSAppKitVersion = 1344; +extern_static!(NSAppKitVersionNumber10_10_2: NSAppKitVersion = 1344); -pub static NSAppKitVersionNumber10_10_3: NSAppKitVersion = 1347; +extern_static!(NSAppKitVersionNumber10_10_3: NSAppKitVersion = 1347); -pub static NSAppKitVersionNumber10_10_4: NSAppKitVersion = 1348; +extern_static!(NSAppKitVersionNumber10_10_4: NSAppKitVersion = 1348); -pub static NSAppKitVersionNumber10_10_5: NSAppKitVersion = 1348; +extern_static!(NSAppKitVersionNumber10_10_5: NSAppKitVersion = 1348); -pub static NSAppKitVersionNumber10_10_Max: NSAppKitVersion = 1349; +extern_static!(NSAppKitVersionNumber10_10_Max: NSAppKitVersion = 1349); -pub static NSAppKitVersionNumber10_11: NSAppKitVersion = 1404; +extern_static!(NSAppKitVersionNumber10_11: NSAppKitVersion = 1404); -pub static NSAppKitVersionNumber10_11_1: NSAppKitVersion = 1404.13; +extern_static!(NSAppKitVersionNumber10_11_1: NSAppKitVersion = 1404.13); -pub static NSAppKitVersionNumber10_11_2: NSAppKitVersion = 1404.34; +extern_static!(NSAppKitVersionNumber10_11_2: NSAppKitVersion = 1404.34); -pub static NSAppKitVersionNumber10_11_3: NSAppKitVersion = 1404.34; +extern_static!(NSAppKitVersionNumber10_11_3: NSAppKitVersion = 1404.34); -pub static NSAppKitVersionNumber10_12: NSAppKitVersion = 1504; +extern_static!(NSAppKitVersionNumber10_12: NSAppKitVersion = 1504); -pub static NSAppKitVersionNumber10_12_1: NSAppKitVersion = 1504.60; +extern_static!(NSAppKitVersionNumber10_12_1: NSAppKitVersion = 1504.60); -pub static NSAppKitVersionNumber10_12_2: NSAppKitVersion = 1504.76; +extern_static!(NSAppKitVersionNumber10_12_2: NSAppKitVersion = 1504.76); -pub static NSAppKitVersionNumber10_13: NSAppKitVersion = 1561; +extern_static!(NSAppKitVersionNumber10_13: NSAppKitVersion = 1561); -pub static NSAppKitVersionNumber10_13_1: NSAppKitVersion = 1561.1; +extern_static!(NSAppKitVersionNumber10_13_1: NSAppKitVersion = 1561.1); -pub static NSAppKitVersionNumber10_13_2: NSAppKitVersion = 1561.2; +extern_static!(NSAppKitVersionNumber10_13_2: NSAppKitVersion = 1561.2); -pub static NSAppKitVersionNumber10_13_4: NSAppKitVersion = 1561.4; +extern_static!(NSAppKitVersionNumber10_13_4: NSAppKitVersion = 1561.4); -pub static NSAppKitVersionNumber10_14: NSAppKitVersion = 1671; +extern_static!(NSAppKitVersionNumber10_14: NSAppKitVersion = 1671); -pub static NSAppKitVersionNumber10_14_1: NSAppKitVersion = 1671.1; +extern_static!(NSAppKitVersionNumber10_14_1: NSAppKitVersion = 1671.1); -pub static NSAppKitVersionNumber10_14_2: NSAppKitVersion = 1671.2; +extern_static!(NSAppKitVersionNumber10_14_2: NSAppKitVersion = 1671.2); -pub static NSAppKitVersionNumber10_14_3: NSAppKitVersion = 1671.3; +extern_static!(NSAppKitVersionNumber10_14_3: NSAppKitVersion = 1671.3); -pub static NSAppKitVersionNumber10_14_4: NSAppKitVersion = 1671.4; +extern_static!(NSAppKitVersionNumber10_14_4: NSAppKitVersion = 1671.4); -pub static NSAppKitVersionNumber10_14_5: NSAppKitVersion = 1671.5; +extern_static!(NSAppKitVersionNumber10_14_5: NSAppKitVersion = 1671.5); -pub static NSAppKitVersionNumber10_15: NSAppKitVersion = 1894; +extern_static!(NSAppKitVersionNumber10_15: NSAppKitVersion = 1894); -pub static NSAppKitVersionNumber10_15_1: NSAppKitVersion = 1894.1; +extern_static!(NSAppKitVersionNumber10_15_1: NSAppKitVersion = 1894.1); -pub static NSAppKitVersionNumber10_15_2: NSAppKitVersion = 1894.2; +extern_static!(NSAppKitVersionNumber10_15_2: NSAppKitVersion = 1894.2); -pub static NSAppKitVersionNumber10_15_3: NSAppKitVersion = 1894.3; +extern_static!(NSAppKitVersionNumber10_15_3: NSAppKitVersion = 1894.3); -pub static NSAppKitVersionNumber10_15_4: NSAppKitVersion = 1894.4; +extern_static!(NSAppKitVersionNumber10_15_4: NSAppKitVersion = 1894.4); -pub static NSAppKitVersionNumber10_15_5: NSAppKitVersion = 1894.5; +extern_static!(NSAppKitVersionNumber10_15_5: NSAppKitVersion = 1894.5); -pub static NSAppKitVersionNumber10_15_6: NSAppKitVersion = 1894.6; +extern_static!(NSAppKitVersionNumber10_15_6: NSAppKitVersion = 1894.6); -pub static NSAppKitVersionNumber11_0: NSAppKitVersion = 2022; +extern_static!(NSAppKitVersionNumber11_0: NSAppKitVersion = 2022); -pub static NSAppKitVersionNumber11_1: NSAppKitVersion = 2022.2; +extern_static!(NSAppKitVersionNumber11_1: NSAppKitVersion = 2022.2); -pub static NSAppKitVersionNumber11_2: NSAppKitVersion = 2022.3; +extern_static!(NSAppKitVersionNumber11_2: NSAppKitVersion = 2022.3); -pub static NSAppKitVersionNumber11_3: NSAppKitVersion = 2022.4; +extern_static!(NSAppKitVersionNumber11_3: NSAppKitVersion = 2022.4); -pub static NSAppKitVersionNumber11_4: NSAppKitVersion = 2022.5; +extern_static!(NSAppKitVersionNumber11_4: NSAppKitVersion = 2022.5); -extern "C" { - pub static NSModalPanelRunLoopMode: &'static NSRunLoopMode; -} +extern_static!(NSModalPanelRunLoopMode: &'static NSRunLoopMode); -extern "C" { - pub static NSEventTrackingRunLoopMode: &'static NSRunLoopMode; -} +extern_static!(NSEventTrackingRunLoopMode: &'static NSRunLoopMode); pub type NSModalResponse = NSInteger; -pub static NSModalResponseStop: NSModalResponse = -1000; - -pub static NSModalResponseAbort: NSModalResponse = -1001; - -pub static NSModalResponseContinue: NSModalResponse = -1002; - -pub const NSUpdateWindowsRunLoopOrdering: c_uint = 500000; - -pub type NSApplicationPresentationOptions = NSUInteger; -pub const NSApplicationPresentationDefault: NSApplicationPresentationOptions = 0; -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 = - 1 << 7; -pub const NSApplicationPresentationDisableHideApplication: NSApplicationPresentationOptions = - 1 << 8; -pub const NSApplicationPresentationDisableMenuBarTransparency: NSApplicationPresentationOptions = - 1 << 9; -pub const NSApplicationPresentationFullScreen: NSApplicationPresentationOptions = 1 << 10; -pub const NSApplicationPresentationAutoHideToolbar: NSApplicationPresentationOptions = 1 << 11; -pub const NSApplicationPresentationDisableCursorLocationAssistance: - NSApplicationPresentationOptions = 1 << 12; - -pub type NSApplicationOcclusionState = NSUInteger; -pub const NSApplicationOcclusionStateVisible: NSApplicationOcclusionState = 1 << 1; - -pub type NSWindowListOptions = NSInteger; -pub const NSWindowListOrderedFrontToBack: NSWindowListOptions = 1 << 0; +extern_static!(NSModalResponseStop: NSModalResponse = -1000); + +extern_static!(NSModalResponseAbort: NSModalResponse = -1001); + +extern_static!(NSModalResponseContinue: NSModalResponse = -1002); + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSUpdateWindowsRunLoopOrdering = 500000, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSApplicationPresentationOptions { + NSApplicationPresentationDefault = 0, + NSApplicationPresentationAutoHideDock = 1 << 0, + NSApplicationPresentationHideDock = 1 << 1, + NSApplicationPresentationAutoHideMenuBar = 1 << 2, + NSApplicationPresentationHideMenuBar = 1 << 3, + NSApplicationPresentationDisableAppleMenu = 1 << 4, + NSApplicationPresentationDisableProcessSwitching = 1 << 5, + NSApplicationPresentationDisableForceQuit = 1 << 6, + NSApplicationPresentationDisableSessionTermination = 1 << 7, + NSApplicationPresentationDisableHideApplication = 1 << 8, + NSApplicationPresentationDisableMenuBarTransparency = 1 << 9, + NSApplicationPresentationFullScreen = 1 << 10, + NSApplicationPresentationAutoHideToolbar = 1 << 11, + NSApplicationPresentationDisableCursorLocationAssistance = 1 << 12, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSApplicationOcclusionState { + NSApplicationOcclusionStateVisible = 1 << 1, + } +); + +ns_options!( + #[underlying(NSInteger)] + pub enum NSWindowListOptions { + NSWindowListOrderedFrontToBack = 1 << 0, + } +); pub type NSModalSession = *mut c_void; -extern "C" { - pub static NSApp: Option<&'static NSApplication>; -} +extern_static!(NSApp: Option<&'static NSApplication>); -pub type NSRequestUserAttentionType = NSUInteger; -pub const NSCriticalRequest: NSRequestUserAttentionType = 0; -pub const NSInformationalRequest: NSRequestUserAttentionType = 10; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSRequestUserAttentionType { + NSCriticalRequest = 0, + NSInformationalRequest = 10, + } +); -pub type NSApplicationDelegateReply = NSUInteger; -pub const NSApplicationDelegateReplySuccess: NSApplicationDelegateReply = 0; -pub const NSApplicationDelegateReplyCancel: NSApplicationDelegateReply = 1; -pub const NSApplicationDelegateReplyFailure: NSApplicationDelegateReply = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSApplicationDelegateReply { + NSApplicationDelegateReplySuccess = 0, + NSApplicationDelegateReplyCancel = 1, + NSApplicationDelegateReplyFailure = 2, + } +); extern_class!( #[derive(Debug)] @@ -511,16 +523,24 @@ extern_methods!( } ); -pub type NSApplicationTerminateReply = NSUInteger; -pub const NSTerminateCancel: NSApplicationTerminateReply = 0; -pub const NSTerminateNow: NSApplicationTerminateReply = 1; -pub const NSTerminateLater: NSApplicationTerminateReply = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSApplicationTerminateReply { + NSTerminateCancel = 0, + NSTerminateNow = 1, + NSTerminateLater = 2, + } +); -pub type NSApplicationPrintReply = NSUInteger; -pub const NSPrintingCancelled: NSApplicationPrintReply = 0; -pub const NSPrintingSuccess: NSApplicationPrintReply = 1; -pub const NSPrintingFailure: NSApplicationPrintReply = 3; -pub const NSPrintingReplyLater: NSApplicationPrintReply = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSApplicationPrintReply { + NSPrintingCancelled = 0, + NSPrintingSuccess = 1, + NSPrintingFailure = 3, + NSPrintingReplyLater = 2, + } +); pub type NSApplicationDelegate = NSObject; @@ -557,25 +577,15 @@ extern_methods!( pub type NSAboutPanelOptionKey = NSString; -extern "C" { - pub static NSAboutPanelOptionCredits: &'static NSAboutPanelOptionKey; -} +extern_static!(NSAboutPanelOptionCredits: &'static NSAboutPanelOptionKey); -extern "C" { - pub static NSAboutPanelOptionApplicationName: &'static NSAboutPanelOptionKey; -} +extern_static!(NSAboutPanelOptionApplicationName: &'static NSAboutPanelOptionKey); -extern "C" { - pub static NSAboutPanelOptionApplicationIcon: &'static NSAboutPanelOptionKey; -} +extern_static!(NSAboutPanelOptionApplicationIcon: &'static NSAboutPanelOptionKey); -extern "C" { - pub static NSAboutPanelOptionVersion: &'static NSAboutPanelOptionKey; -} +extern_static!(NSAboutPanelOptionVersion: &'static NSAboutPanelOptionKey); -extern "C" { - pub static NSAboutPanelOptionApplicationVersion: &'static NSAboutPanelOptionKey; -} +extern_static!(NSAboutPanelOptionApplicationVersion: &'static NSAboutPanelOptionKey); extern_methods!( /// NSStandardAboutPanel @@ -610,11 +620,15 @@ extern_methods!( } ); -pub type NSRemoteNotificationType = NSUInteger; -pub const NSRemoteNotificationTypeNone: NSRemoteNotificationType = 0; -pub const NSRemoteNotificationTypeBadge: NSRemoteNotificationType = 1 << 0; -pub const NSRemoteNotificationTypeSound: NSRemoteNotificationType = 1 << 1; -pub const NSRemoteNotificationTypeAlert: NSRemoteNotificationType = 1 << 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSRemoteNotificationType { + NSRemoteNotificationTypeNone = 0, + NSRemoteNotificationTypeBadge = 1 << 0, + NSRemoteNotificationTypeSound = 1 << 1, + NSRemoteNotificationTypeAlert = 1 << 2, + } +); extern_methods!( /// NSRemoteNotifications @@ -638,91 +652,58 @@ extern_methods!( pub type NSServiceProviderName = NSString; -extern "C" { - pub static NSApplicationDidBecomeActiveNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationDidBecomeActiveNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationDidHideNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationDidHideNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationDidFinishLaunchingNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationDidFinishLaunchingNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationDidResignActiveNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationDidResignActiveNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationDidUnhideNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationDidUnhideNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationDidUpdateNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationDidUpdateNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationWillBecomeActiveNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationWillBecomeActiveNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationWillHideNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationWillHideNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationWillFinishLaunchingNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationWillFinishLaunchingNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationWillResignActiveNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationWillResignActiveNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationWillUnhideNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationWillUnhideNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationWillUpdateNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationWillUpdateNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationWillTerminateNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationWillTerminateNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationDidChangeScreenParametersNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationDidChangeScreenParametersNotification: &'static NSNotificationName); -extern "C" { - pub static NSApplicationProtectedDataWillBecomeUnavailableNotification: - &'static NSNotificationName; -} +extern_static!( + NSApplicationProtectedDataWillBecomeUnavailableNotification: &'static NSNotificationName +); -extern "C" { - pub static NSApplicationProtectedDataDidBecomeAvailableNotification: - &'static NSNotificationName; -} +extern_static!( + NSApplicationProtectedDataDidBecomeAvailableNotification: &'static NSNotificationName +); -extern "C" { - pub static NSApplicationLaunchIsDefaultLaunchKey: &'static NSString; -} +extern_static!(NSApplicationLaunchIsDefaultLaunchKey: &'static NSString); -extern "C" { - pub static NSApplicationLaunchUserNotificationKey: &'static NSString; -} +extern_static!(NSApplicationLaunchUserNotificationKey: &'static NSString); -extern "C" { - pub static NSApplicationLaunchRemoteNotificationKey: &'static NSString; -} +extern_static!(NSApplicationLaunchRemoteNotificationKey: &'static NSString); -extern "C" { - pub static NSApplicationDidChangeOcclusionStateNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationDidChangeOcclusionStateNotification: &'static NSNotificationName); -pub const NSRunStoppedResponse: c_int = -1000; -pub const NSRunAbortedResponse: c_int = -1001; -pub const NSRunContinuesResponse: c_int = -1002; +extern_enum!( + #[underlying(c_int)] + pub enum { + NSRunStoppedResponse = -1000, + NSRunAbortedResponse = -1001, + NSRunContinuesResponse = -1002, + } +); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSAttributedString.rs b/crates/icrate/src/generated/AppKit/NSAttributedString.rs index 6a2ec5402..802b72ccf 100644 --- a/crates/icrate/src/generated/AppKit/NSAttributedString.rs +++ b/crates/icrate/src/generated/AppKit/NSAttributedString.rs @@ -5,147 +5,99 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSFontAttributeName: &'static NSAttributedStringKey; -} +extern_static!(NSFontAttributeName: &'static NSAttributedStringKey); -extern "C" { - pub static NSParagraphStyleAttributeName: &'static NSAttributedStringKey; -} +extern_static!(NSParagraphStyleAttributeName: &'static NSAttributedStringKey); -extern "C" { - pub static NSForegroundColorAttributeName: &'static NSAttributedStringKey; -} +extern_static!(NSForegroundColorAttributeName: &'static NSAttributedStringKey); -extern "C" { - pub static NSBackgroundColorAttributeName: &'static NSAttributedStringKey; -} +extern_static!(NSBackgroundColorAttributeName: &'static NSAttributedStringKey); -extern "C" { - pub static NSLigatureAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSKernAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSTrackingAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSStrikethroughStyleAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSUnderlineStyleAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSStrokeColorAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSStrokeWidthAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSShadowAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSTextEffectAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAttachmentAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSLinkAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSBaselineOffsetAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSUnderlineColorAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSStrikethroughColorAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSObliquenessAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSExpansionAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSWritingDirectionAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSVerticalGlyphFormAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSCursorAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSToolTipAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSMarkedClauseSegmentAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSTextAlternativesAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSSpellingStateAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSSuperscriptAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSGlyphInfoAttributeName: &'static NSAttributedStringKey; -} - -pub type NSUnderlineStyle = NSInteger; -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 << 1; -pub const NSWritingDirectionOverride: NSWritingDirectionFormatType = 1 << 1; +extern_static!(NSLigatureAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSKernAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSTrackingAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSStrikethroughStyleAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSUnderlineStyleAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSStrokeColorAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSStrokeWidthAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSShadowAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSTextEffectAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSAttachmentAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSLinkAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSBaselineOffsetAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSUnderlineColorAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSStrikethroughColorAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSObliquenessAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSExpansionAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSWritingDirectionAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSVerticalGlyphFormAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSCursorAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSToolTipAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSMarkedClauseSegmentAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSTextAlternativesAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSSpellingStateAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSSuperscriptAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSGlyphInfoAttributeName: &'static NSAttributedStringKey); + +ns_options!( + #[underlying(NSInteger)] + pub enum NSUnderlineStyle { + NSUnderlineStyleNone = 0x00, + NSUnderlineStyleSingle = 0x01, + NSUnderlineStyleThick = 0x02, + NSUnderlineStyleDouble = 0x09, + NSUnderlineStylePatternSolid = 0x0000, + NSUnderlineStylePatternDot = 0x0100, + NSUnderlineStylePatternDash = 0x0200, + NSUnderlineStylePatternDashDot = 0x0300, + NSUnderlineStylePatternDashDotDot = 0x0400, + NSUnderlineStyleByWord = 0x8000, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSWritingDirectionFormatType { + NSWritingDirectionEmbedding = 0 << 1, + NSWritingDirectionOverride = 1 << 1, + } +); pub type NSTextEffectStyle = NSString; -extern "C" { - pub static NSTextEffectLetterpressStyle: &'static NSTextEffectStyle; -} +extern_static!(NSTextEffectLetterpressStyle: &'static NSTextEffectStyle); -pub type NSSpellingState = NSInteger; -pub const NSSpellingStateSpellingFlag: NSSpellingState = 1 << 0; -pub const NSSpellingStateGrammarFlag: NSSpellingState = 1 << 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSSpellingState { + NSSpellingStateSpellingFlag = 1 << 0, + NSSpellingStateGrammarFlag = 1 << 1, + } +); extern_methods!( /// NSAttributedStringAttributeFixing @@ -166,271 +118,171 @@ extern_methods!( pub type NSAttributedStringDocumentType = NSString; -extern "C" { - pub static NSPlainTextDocumentType: &'static NSAttributedStringDocumentType; -} +extern_static!(NSPlainTextDocumentType: &'static NSAttributedStringDocumentType); -extern "C" { - pub static NSRTFTextDocumentType: &'static NSAttributedStringDocumentType; -} +extern_static!(NSRTFTextDocumentType: &'static NSAttributedStringDocumentType); -extern "C" { - pub static NSRTFDTextDocumentType: &'static NSAttributedStringDocumentType; -} +extern_static!(NSRTFDTextDocumentType: &'static NSAttributedStringDocumentType); -extern "C" { - pub static NSHTMLTextDocumentType: &'static NSAttributedStringDocumentType; -} +extern_static!(NSHTMLTextDocumentType: &'static NSAttributedStringDocumentType); -extern "C" { - pub static NSMacSimpleTextDocumentType: &'static NSAttributedStringDocumentType; -} +extern_static!(NSMacSimpleTextDocumentType: &'static NSAttributedStringDocumentType); -extern "C" { - pub static NSDocFormatTextDocumentType: &'static NSAttributedStringDocumentType; -} +extern_static!(NSDocFormatTextDocumentType: &'static NSAttributedStringDocumentType); -extern "C" { - pub static NSWordMLTextDocumentType: &'static NSAttributedStringDocumentType; -} +extern_static!(NSWordMLTextDocumentType: &'static NSAttributedStringDocumentType); -extern "C" { - pub static NSWebArchiveTextDocumentType: &'static NSAttributedStringDocumentType; -} +extern_static!(NSWebArchiveTextDocumentType: &'static NSAttributedStringDocumentType); -extern "C" { - pub static NSOfficeOpenXMLTextDocumentType: &'static NSAttributedStringDocumentType; -} +extern_static!(NSOfficeOpenXMLTextDocumentType: &'static NSAttributedStringDocumentType); -extern "C" { - pub static NSOpenDocumentTextDocumentType: &'static NSAttributedStringDocumentType; -} +extern_static!(NSOpenDocumentTextDocumentType: &'static NSAttributedStringDocumentType); pub type NSTextLayoutSectionKey = NSString; -extern "C" { - pub static NSTextLayoutSectionOrientation: &'static NSTextLayoutSectionKey; -} +extern_static!(NSTextLayoutSectionOrientation: &'static NSTextLayoutSectionKey); -extern "C" { - pub static NSTextLayoutSectionRange: &'static NSTextLayoutSectionKey; -} +extern_static!(NSTextLayoutSectionRange: &'static NSTextLayoutSectionKey); -pub type NSTextScalingType = NSInteger; -pub const NSTextScalingStandard: NSTextScalingType = 0; -pub const NSTextScalingiOS: NSTextScalingType = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextScalingType { + NSTextScalingStandard = 0, + NSTextScalingiOS = 1, + } +); pub type NSAttributedStringDocumentAttributeKey = NSString; -extern "C" { - pub static NSDocumentTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSDocumentTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSConvertedDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSConvertedDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSCocoaVersionDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSCocoaVersionDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSFileTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSFileTypeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSTitleDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSTitleDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSCompanyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSCompanyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSCopyrightDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSCopyrightDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSSubjectDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSSubjectDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSAuthorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSAuthorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSKeywordsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSKeywordsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSCommentDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSCommentDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSEditorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSEditorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSCreationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} - -extern "C" { - pub static NSModificationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSCreationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSManagerDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!( + NSModificationTimeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey +); -extern "C" { - pub static NSCategoryDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSManagerDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSAppearanceDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSCategoryDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSCharacterEncodingDocumentAttribute: - &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSAppearanceDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSDefaultAttributesDocumentAttribute: - &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!( + NSCharacterEncodingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey +); -extern "C" { - pub static NSPaperSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!( + NSDefaultAttributesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey +); -extern "C" { - pub static NSLeftMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSPaperSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSRightMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSLeftMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSTopMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSRightMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSBottomMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSTopMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSViewSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} - -extern "C" { - pub static NSViewZoomDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} - -extern "C" { - pub static NSViewModeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} - -extern "C" { - pub static NSReadOnlyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} - -extern "C" { - pub static NSBackgroundColorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} - -extern "C" { - pub static NSHyphenationFactorDocumentAttribute: - &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSBottomMarginDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSDefaultTabIntervalDocumentAttribute: - &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSViewSizeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSTextLayoutSectionsAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSViewZoomDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSExcludedElementsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSViewModeDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSTextEncodingNameDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSReadOnlyDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSPrefixSpacesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!(NSBackgroundColorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); -extern "C" { - pub static NSTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!( + NSHyphenationFactorDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey +); -extern "C" { - pub static NSSourceTextScalingDocumentAttribute: - &'static NSAttributedStringDocumentAttributeKey; -} +extern_static!( + NSDefaultTabIntervalDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey +); + +extern_static!(NSTextLayoutSectionsAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!( + NSExcludedElementsDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey +); + +extern_static!( + NSTextEncodingNameDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey +); + +extern_static!(NSPrefixSpacesDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!(NSTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey); + +extern_static!( + NSSourceTextScalingDocumentAttribute: &'static NSAttributedStringDocumentAttributeKey +); pub type NSAttributedStringDocumentReadingOptionKey = NSString; -extern "C" { - pub static NSDocumentTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSDefaultAttributesDocumentOption: - &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSCharacterEncodingDocumentOption: - &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSTextEncodingNameDocumentOption: - &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSBaseURLDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSTimeoutDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSWebPreferencesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSWebResourceLoadDelegateDocumentOption: - &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSTextSizeMultiplierDocumentOption: - &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSFileTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSTargetTextScalingDocumentOption: - &'static NSAttributedStringDocumentReadingOptionKey; -} - -extern "C" { - pub static NSSourceTextScalingDocumentOption: - &'static NSAttributedStringDocumentReadingOptionKey; -} +extern_static!(NSDocumentTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey); + +extern_static!( + NSDefaultAttributesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey +); + +extern_static!( + NSCharacterEncodingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey +); + +extern_static!( + NSTextEncodingNameDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey +); + +extern_static!(NSBaseURLDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey); + +extern_static!(NSTimeoutDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey); + +extern_static!(NSWebPreferencesDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey); + +extern_static!( + NSWebResourceLoadDelegateDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey +); + +extern_static!( + NSTextSizeMultiplierDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey +); + +extern_static!(NSFileTypeDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey); + +extern_static!( + NSTargetTextScalingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey +); + +extern_static!( + NSSourceTextScalingDocumentOption: &'static NSAttributedStringDocumentReadingOptionKey +); extern_methods!( /// NSAttributedStringDocumentFormats @@ -677,36 +529,33 @@ extern_methods!( } ); -pub static NSUnderlinePatternSolid: NSUnderlineStyle = NSUnderlineStylePatternSolid; +extern_static!(NSUnderlinePatternSolid: NSUnderlineStyle = NSUnderlineStylePatternSolid); -pub static NSUnderlinePatternDot: NSUnderlineStyle = NSUnderlineStylePatternDot; +extern_static!(NSUnderlinePatternDot: NSUnderlineStyle = NSUnderlineStylePatternDot); -pub static NSUnderlinePatternDash: NSUnderlineStyle = NSUnderlineStylePatternDash; +extern_static!(NSUnderlinePatternDash: NSUnderlineStyle = NSUnderlineStylePatternDash); -pub static NSUnderlinePatternDashDot: NSUnderlineStyle = NSUnderlineStylePatternDashDot; +extern_static!(NSUnderlinePatternDashDot: NSUnderlineStyle = NSUnderlineStylePatternDashDot); -pub static NSUnderlinePatternDashDotDot: NSUnderlineStyle = NSUnderlineStylePatternDashDotDot; +extern_static!(NSUnderlinePatternDashDotDot: NSUnderlineStyle = NSUnderlineStylePatternDashDotDot); -pub static NSUnderlineByWord: NSUnderlineStyle = NSUnderlineStyleByWord; +extern_static!(NSUnderlineByWord: NSUnderlineStyle = NSUnderlineStyleByWord); -extern "C" { - pub static NSCharacterShapeAttributeName: &'static NSAttributedStringKey; -} +extern_static!(NSCharacterShapeAttributeName: &'static NSAttributedStringKey); -extern "C" { - pub static NSUsesScreenFontsDocumentAttribute: &'static NSAttributedStringKey; -} +extern_static!(NSUsesScreenFontsDocumentAttribute: &'static NSAttributedStringKey); -pub const NSNoUnderlineStyle: c_uint = 0; -pub const NSSingleUnderlineStyle: c_uint = 1; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSNoUnderlineStyle = 0, + NSSingleUnderlineStyle = 1, + } +); -extern "C" { - pub static NSUnderlineStrikethroughMask: NSUInteger; -} +extern_static!(NSUnderlineStrikethroughMask: NSUInteger); -extern "C" { - pub static NSUnderlineByWordMask: NSUInteger; -} +extern_static!(NSUnderlineByWordMask: NSUInteger); extern_methods!( /// NSDeprecatedKitAdditions diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index d67bb4342..768c87062 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -5,25 +5,41 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSLineCapStyle = NSUInteger; -pub const NSLineCapStyleButt: NSLineCapStyle = 0; -pub const NSLineCapStyleRound: NSLineCapStyle = 1; -pub const NSLineCapStyleSquare: NSLineCapStyle = 2; - -pub type NSLineJoinStyle = NSUInteger; -pub const NSLineJoinStyleMiter: NSLineJoinStyle = 0; -pub const NSLineJoinStyleRound: NSLineJoinStyle = 1; -pub const NSLineJoinStyleBevel: NSLineJoinStyle = 2; - -pub type NSWindingRule = NSUInteger; -pub const NSWindingRuleNonZero: NSWindingRule = 0; -pub const NSWindingRuleEvenOdd: NSWindingRule = 1; - -pub type NSBezierPathElement = NSUInteger; -pub const NSBezierPathElementMoveTo: NSBezierPathElement = 0; -pub const NSBezierPathElementLineTo: NSBezierPathElement = 1; -pub const NSBezierPathElementCurveTo: NSBezierPathElement = 2; -pub const NSBezierPathElementClosePath: NSBezierPathElement = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSLineCapStyle { + NSLineCapStyleButt = 0, + NSLineCapStyleRound = 1, + NSLineCapStyleSquare = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSLineJoinStyle { + NSLineJoinStyleMiter = 0, + NSLineJoinStyleRound = 1, + NSLineJoinStyleBevel = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSWindingRule { + NSWindingRuleNonZero = 0, + NSWindingRuleEvenOdd = 1, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBezierPathElement { + NSBezierPathElementMoveTo = 0, + NSBezierPathElementLineTo = 1, + NSBezierPathElementCurveTo = 2, + NSBezierPathElementClosePath = 3, + } +); extern_class!( #[derive(Debug)] @@ -330,26 +346,26 @@ extern_methods!( } ); -pub static NSButtLineCapStyle: NSLineCapStyle = NSLineCapStyleButt; +extern_static!(NSButtLineCapStyle: NSLineCapStyle = NSLineCapStyleButt); -pub static NSRoundLineCapStyle: NSLineCapStyle = NSLineCapStyleRound; +extern_static!(NSRoundLineCapStyle: NSLineCapStyle = NSLineCapStyleRound); -pub static NSSquareLineCapStyle: NSLineCapStyle = NSLineCapStyleSquare; +extern_static!(NSSquareLineCapStyle: NSLineCapStyle = NSLineCapStyleSquare); -pub static NSMiterLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleMiter; +extern_static!(NSMiterLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleMiter); -pub static NSRoundLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleRound; +extern_static!(NSRoundLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleRound); -pub static NSBevelLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleBevel; +extern_static!(NSBevelLineJoinStyle: NSLineJoinStyle = NSLineJoinStyleBevel); -pub static NSNonZeroWindingRule: NSWindingRule = NSWindingRuleNonZero; +extern_static!(NSNonZeroWindingRule: NSWindingRule = NSWindingRuleNonZero); -pub static NSEvenOddWindingRule: NSWindingRule = NSWindingRuleEvenOdd; +extern_static!(NSEvenOddWindingRule: NSWindingRule = NSWindingRuleEvenOdd); -pub static NSMoveToBezierPathElement: NSBezierPathElement = NSBezierPathElementMoveTo; +extern_static!(NSMoveToBezierPathElement: NSBezierPathElement = NSBezierPathElementMoveTo); -pub static NSLineToBezierPathElement: NSBezierPathElement = NSBezierPathElementLineTo; +extern_static!(NSLineToBezierPathElement: NSBezierPathElement = NSBezierPathElementLineTo); -pub static NSCurveToBezierPathElement: NSBezierPathElement = NSBezierPathElementCurveTo; +extern_static!(NSCurveToBezierPathElement: NSBezierPathElement = NSBezierPathElementCurveTo); -pub static NSClosePathBezierPathElement: NSBezierPathElement = NSBezierPathElementClosePath; +extern_static!(NSClosePathBezierPathElement: NSBezierPathElement = NSBezierPathElementClosePath); diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index c4dfac5da..d93d5aa50 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -5,102 +5,88 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTIFFCompression = NSUInteger; -pub const NSTIFFCompressionNone: NSTIFFCompression = 1; -pub const NSTIFFCompressionCCITTFAX3: NSTIFFCompression = 3; -pub const NSTIFFCompressionCCITTFAX4: NSTIFFCompression = 4; -pub const NSTIFFCompressionLZW: NSTIFFCompression = 5; -pub const NSTIFFCompressionJPEG: NSTIFFCompression = 6; -pub const NSTIFFCompressionNEXT: NSTIFFCompression = 32766; -pub const NSTIFFCompressionPackBits: NSTIFFCompression = 32773; -pub const NSTIFFCompressionOldJPEG: NSTIFFCompression = 32865; - -pub type NSBitmapImageFileType = NSUInteger; -pub const NSBitmapImageFileTypeTIFF: NSBitmapImageFileType = 0; -pub const NSBitmapImageFileTypeBMP: NSBitmapImageFileType = 1; -pub const NSBitmapImageFileTypeGIF: NSBitmapImageFileType = 2; -pub const NSBitmapImageFileTypeJPEG: NSBitmapImageFileType = 3; -pub const NSBitmapImageFileTypePNG: NSBitmapImageFileType = 4; -pub const NSBitmapImageFileTypeJPEG2000: NSBitmapImageFileType = 5; - -pub type NSImageRepLoadStatus = NSInteger; -pub const NSImageRepLoadStatusUnknownType: NSImageRepLoadStatus = -1; -pub const NSImageRepLoadStatusReadingHeader: NSImageRepLoadStatus = -2; -pub const NSImageRepLoadStatusWillNeedAllData: NSImageRepLoadStatus = -3; -pub const NSImageRepLoadStatusInvalidData: NSImageRepLoadStatus = -4; -pub const NSImageRepLoadStatusUnexpectedEOF: NSImageRepLoadStatus = -5; -pub const NSImageRepLoadStatusCompleted: NSImageRepLoadStatus = -6; - -pub type NSBitmapFormat = NSUInteger; -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; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTIFFCompression { + NSTIFFCompressionNone = 1, + NSTIFFCompressionCCITTFAX3 = 3, + NSTIFFCompressionCCITTFAX4 = 4, + NSTIFFCompressionLZW = 5, + NSTIFFCompressionJPEG = 6, + NSTIFFCompressionNEXT = 32766, + NSTIFFCompressionPackBits = 32773, + NSTIFFCompressionOldJPEG = 32865, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBitmapImageFileType { + NSBitmapImageFileTypeTIFF = 0, + NSBitmapImageFileTypeBMP = 1, + NSBitmapImageFileTypeGIF = 2, + NSBitmapImageFileTypeJPEG = 3, + NSBitmapImageFileTypePNG = 4, + NSBitmapImageFileTypeJPEG2000 = 5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSImageRepLoadStatus { + NSImageRepLoadStatusUnknownType = -1, + NSImageRepLoadStatusReadingHeader = -2, + NSImageRepLoadStatusWillNeedAllData = -3, + NSImageRepLoadStatusInvalidData = -4, + NSImageRepLoadStatusUnexpectedEOF = -5, + NSImageRepLoadStatusCompleted = -6, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSBitmapFormat { + NSBitmapFormatAlphaFirst = 1 << 0, + NSBitmapFormatAlphaNonpremultiplied = 1 << 1, + NSBitmapFormatFloatingPointSamples = 1 << 2, + NSBitmapFormatSixteenBitLittleEndian = 1 << 8, + NSBitmapFormatThirtyTwoBitLittleEndian = 1 << 9, + NSBitmapFormatSixteenBitBigEndian = 1 << 10, + NSBitmapFormatThirtyTwoBitBigEndian = 1 << 11, + } +); pub type NSBitmapImageRepPropertyKey = NSString; -extern "C" { - pub static NSImageCompressionMethod: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageCompressionMethod: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageCompressionFactor: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageCompressionFactor: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageDitherTransparency: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageDitherTransparency: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageRGBColorTable: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageRGBColorTable: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageInterlaced: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageInterlaced: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageColorSyncProfileData: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageColorSyncProfileData: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageFrameCount: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageFrameCount: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageCurrentFrame: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageCurrentFrame: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageCurrentFrameDuration: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageCurrentFrameDuration: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageLoopCount: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageLoopCount: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageGamma: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageGamma: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageProgressive: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageProgressive: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageEXIFData: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageEXIFData: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageIPTCData: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageIPTCData: &'static NSBitmapImageRepPropertyKey); -extern "C" { - pub static NSImageFallbackBackgroundColor: &'static NSBitmapImageRepPropertyKey; -} +extern_static!(NSImageFallbackBackgroundColor: &'static NSBitmapImageRepPropertyKey); extern_class!( #[derive(Debug)] @@ -331,29 +317,36 @@ extern_methods!( } ); -pub static NSTIFFFileType: NSBitmapImageFileType = NSBitmapImageFileTypeTIFF; +extern_static!(NSTIFFFileType: NSBitmapImageFileType = NSBitmapImageFileTypeTIFF); -pub static NSBMPFileType: NSBitmapImageFileType = NSBitmapImageFileTypeBMP; +extern_static!(NSBMPFileType: NSBitmapImageFileType = NSBitmapImageFileTypeBMP); -pub static NSGIFFileType: NSBitmapImageFileType = NSBitmapImageFileTypeGIF; +extern_static!(NSGIFFileType: NSBitmapImageFileType = NSBitmapImageFileTypeGIF); -pub static NSJPEGFileType: NSBitmapImageFileType = NSBitmapImageFileTypeJPEG; +extern_static!(NSJPEGFileType: NSBitmapImageFileType = NSBitmapImageFileTypeJPEG); -pub static NSPNGFileType: NSBitmapImageFileType = NSBitmapImageFileTypePNG; +extern_static!(NSPNGFileType: NSBitmapImageFileType = NSBitmapImageFileTypePNG); -pub static NSJPEG2000FileType: NSBitmapImageFileType = NSBitmapImageFileTypeJPEG2000; +extern_static!(NSJPEG2000FileType: NSBitmapImageFileType = NSBitmapImageFileTypeJPEG2000); -pub static NSAlphaFirstBitmapFormat: NSBitmapFormat = NSBitmapFormatAlphaFirst; +extern_static!(NSAlphaFirstBitmapFormat: NSBitmapFormat = NSBitmapFormatAlphaFirst); -pub static NSAlphaNonpremultipliedBitmapFormat: NSBitmapFormat = - NSBitmapFormatAlphaNonpremultiplied; +extern_static!( + NSAlphaNonpremultipliedBitmapFormat: NSBitmapFormat = NSBitmapFormatAlphaNonpremultiplied +); -pub static NSFloatingPointSamplesBitmapFormat: NSBitmapFormat = NSBitmapFormatFloatingPointSamples; +extern_static!( + NSFloatingPointSamplesBitmapFormat: NSBitmapFormat = NSBitmapFormatFloatingPointSamples +); -pub static NS16BitLittleEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatSixteenBitLittleEndian; +extern_static!( + NS16BitLittleEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatSixteenBitLittleEndian +); -pub static NS32BitLittleEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatThirtyTwoBitLittleEndian; +extern_static!( + NS32BitLittleEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatThirtyTwoBitLittleEndian +); -pub static NS16BitBigEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatSixteenBitBigEndian; +extern_static!(NS16BitBigEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatSixteenBitBigEndian); -pub static NS32BitBigEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatThirtyTwoBitBigEndian; +extern_static!(NS32BitBigEndianBitmapFormat: NSBitmapFormat = NSBitmapFormatThirtyTwoBitBigEndian); diff --git a/crates/icrate/src/generated/AppKit/NSBox.rs b/crates/icrate/src/generated/AppKit/NSBox.rs index 2a6842366..f1f545550 100644 --- a/crates/icrate/src/generated/AppKit/NSBox.rs +++ b/crates/icrate/src/generated/AppKit/NSBox.rs @@ -5,19 +5,27 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTitlePosition = NSUInteger; -pub const NSNoTitle: NSTitlePosition = 0; -pub const NSAboveTop: NSTitlePosition = 1; -pub const NSAtTop: NSTitlePosition = 2; -pub const NSBelowTop: NSTitlePosition = 3; -pub const NSAboveBottom: NSTitlePosition = 4; -pub const NSAtBottom: NSTitlePosition = 5; -pub const NSBelowBottom: NSTitlePosition = 6; - -pub type NSBoxType = NSUInteger; -pub const NSBoxPrimary: NSBoxType = 0; -pub const NSBoxSeparator: NSBoxType = 2; -pub const NSBoxCustom: NSBoxType = 4; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTitlePosition { + NSNoTitle = 0, + NSAboveTop = 1, + NSAtTop = 2, + NSBelowTop = 3, + NSAboveBottom = 4, + NSAtBottom = 5, + NSBelowBottom = 6, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBoxType { + NSBoxPrimary = 0, + NSBoxSeparator = 2, + NSBoxCustom = 4, + } +); extern_class!( #[derive(Debug)] @@ -127,6 +135,6 @@ extern_methods!( } ); -pub static NSBoxSecondary: NSBoxType = 1; +extern_static!(NSBoxSecondary: NSBoxType = 1); -pub static NSBoxOldStyle: NSBoxType = 3; +extern_static!(NSBoxOldStyle: NSBoxType = 3); diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index d3813d99b..ed087af63 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -5,20 +5,28 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub static NSAppKitVersionNumberWithContinuousScrollingBrowser: NSAppKitVersion = 680.0; +extern_static!(NSAppKitVersionNumberWithContinuousScrollingBrowser: NSAppKitVersion = 680.0); -pub static NSAppKitVersionNumberWithColumnResizingBrowser: NSAppKitVersion = 685.0; +extern_static!(NSAppKitVersionNumberWithColumnResizingBrowser: NSAppKitVersion = 685.0); pub type NSBrowserColumnsAutosaveName = NSString; -pub type NSBrowserColumnResizingType = NSUInteger; -pub const NSBrowserNoColumnResizing: NSBrowserColumnResizingType = 0; -pub const NSBrowserAutoColumnResizing: NSBrowserColumnResizingType = 1; -pub const NSBrowserUserColumnResizing: NSBrowserColumnResizingType = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBrowserColumnResizingType { + NSBrowserNoColumnResizing = 0, + NSBrowserAutoColumnResizing = 1, + NSBrowserUserColumnResizing = 2, + } +); -pub type NSBrowserDropOperation = NSUInteger; -pub const NSBrowserDropOn: NSBrowserDropOperation = 0; -pub const NSBrowserDropAbove: NSBrowserDropOperation = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBrowserDropOperation { + NSBrowserDropOn = 0, + NSBrowserDropAbove = 1, + } +); extern_class!( #[derive(Debug)] @@ -417,9 +425,7 @@ extern_methods!( } ); -extern "C" { - pub static NSBrowserColumnConfigurationDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSBrowserColumnConfigurationDidChangeNotification: &'static NSNotificationName); pub type NSBrowserDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSButtonCell.rs b/crates/icrate/src/generated/AppKit/NSButtonCell.rs index 707b3848f..a5f579231 100644 --- a/crates/icrate/src/generated/AppKit/NSButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSButtonCell.rs @@ -5,32 +5,40 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSButtonType = NSUInteger; -pub const NSButtonTypeMomentaryLight: NSButtonType = 0; -pub const NSButtonTypePushOnPushOff: NSButtonType = 1; -pub const NSButtonTypeToggle: NSButtonType = 2; -pub const NSButtonTypeSwitch: NSButtonType = 3; -pub const NSButtonTypeRadio: NSButtonType = 4; -pub const NSButtonTypeMomentaryChange: NSButtonType = 5; -pub const NSButtonTypeOnOff: NSButtonType = 6; -pub const NSButtonTypeMomentaryPushIn: NSButtonType = 7; -pub const NSButtonTypeAccelerator: NSButtonType = 8; -pub const NSButtonTypeMultiLevelAccelerator: NSButtonType = 9; - -pub type NSBezelStyle = NSUInteger; -pub const NSBezelStyleRounded: NSBezelStyle = 1; -pub const NSBezelStyleRegularSquare: NSBezelStyle = 2; -pub const NSBezelStyleDisclosure: NSBezelStyle = 5; -pub const NSBezelStyleShadowlessSquare: NSBezelStyle = 6; -pub const NSBezelStyleCircular: NSBezelStyle = 7; -pub const NSBezelStyleTexturedSquare: NSBezelStyle = 8; -pub const NSBezelStyleHelpButton: NSBezelStyle = 9; -pub const NSBezelStyleSmallSquare: NSBezelStyle = 10; -pub const NSBezelStyleTexturedRounded: NSBezelStyle = 11; -pub const NSBezelStyleRoundRect: NSBezelStyle = 12; -pub const NSBezelStyleRecessed: NSBezelStyle = 13; -pub const NSBezelStyleRoundedDisclosure: NSBezelStyle = 14; -pub const NSBezelStyleInline: NSBezelStyle = 15; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSButtonType { + NSButtonTypeMomentaryLight = 0, + NSButtonTypePushOnPushOff = 1, + NSButtonTypeToggle = 2, + NSButtonTypeSwitch = 3, + NSButtonTypeRadio = 4, + NSButtonTypeMomentaryChange = 5, + NSButtonTypeOnOff = 6, + NSButtonTypeMomentaryPushIn = 7, + NSButtonTypeAccelerator = 8, + NSButtonTypeMultiLevelAccelerator = 9, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBezelStyle { + NSBezelStyleRounded = 1, + NSBezelStyleRegularSquare = 2, + NSBezelStyleDisclosure = 5, + NSBezelStyleShadowlessSquare = 6, + NSBezelStyleCircular = 7, + NSBezelStyleTexturedSquare = 8, + NSBezelStyleHelpButton = 9, + NSBezelStyleSmallSquare = 10, + NSBezelStyleTexturedRounded = 11, + NSBezelStyleRoundRect = 12, + NSBezelStyleRecessed = 13, + NSBezelStyleRoundedDisclosure = 14, + NSBezelStyleInline = 15, + } +); extern_class!( #[derive(Debug)] @@ -218,68 +226,72 @@ extern_methods!( } ); -pub type NSGradientType = NSUInteger; -pub const NSGradientNone: NSGradientType = 0; -pub const NSGradientConcaveWeak: NSGradientType = 1; -pub const NSGradientConcaveStrong: NSGradientType = 2; -pub const NSGradientConvexWeak: NSGradientType = 3; -pub const NSGradientConvexStrong: NSGradientType = 4; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSGradientType { + NSGradientNone = 0, + NSGradientConcaveWeak = 1, + NSGradientConcaveStrong = 2, + NSGradientConvexWeak = 3, + NSGradientConvexStrong = 4, + } +); -pub static NSMomentaryLightButton: NSButtonType = NSButtonTypeMomentaryLight; +extern_static!(NSMomentaryLightButton: NSButtonType = NSButtonTypeMomentaryLight); -pub static NSPushOnPushOffButton: NSButtonType = NSButtonTypePushOnPushOff; +extern_static!(NSPushOnPushOffButton: NSButtonType = NSButtonTypePushOnPushOff); -pub static NSToggleButton: NSButtonType = NSButtonTypeToggle; +extern_static!(NSToggleButton: NSButtonType = NSButtonTypeToggle); -pub static NSSwitchButton: NSButtonType = NSButtonTypeSwitch; +extern_static!(NSSwitchButton: NSButtonType = NSButtonTypeSwitch); -pub static NSRadioButton: NSButtonType = NSButtonTypeRadio; +extern_static!(NSRadioButton: NSButtonType = NSButtonTypeRadio); -pub static NSMomentaryChangeButton: NSButtonType = NSButtonTypeMomentaryChange; +extern_static!(NSMomentaryChangeButton: NSButtonType = NSButtonTypeMomentaryChange); -pub static NSOnOffButton: NSButtonType = NSButtonTypeOnOff; +extern_static!(NSOnOffButton: NSButtonType = NSButtonTypeOnOff); -pub static NSMomentaryPushInButton: NSButtonType = NSButtonTypeMomentaryPushIn; +extern_static!(NSMomentaryPushInButton: NSButtonType = NSButtonTypeMomentaryPushIn); -pub static NSAcceleratorButton: NSButtonType = NSButtonTypeAccelerator; +extern_static!(NSAcceleratorButton: NSButtonType = NSButtonTypeAccelerator); -pub static NSMultiLevelAcceleratorButton: NSButtonType = NSButtonTypeMultiLevelAccelerator; +extern_static!(NSMultiLevelAcceleratorButton: NSButtonType = NSButtonTypeMultiLevelAccelerator); -pub static NSMomentaryPushButton: NSButtonType = NSButtonTypeMomentaryLight; +extern_static!(NSMomentaryPushButton: NSButtonType = NSButtonTypeMomentaryLight); -pub static NSMomentaryLight: NSButtonType = NSButtonTypeMomentaryPushIn; +extern_static!(NSMomentaryLight: NSButtonType = NSButtonTypeMomentaryPushIn); -pub static NSRoundedBezelStyle: NSBezelStyle = NSBezelStyleRounded; +extern_static!(NSRoundedBezelStyle: NSBezelStyle = NSBezelStyleRounded); -pub static NSRegularSquareBezelStyle: NSBezelStyle = NSBezelStyleRegularSquare; +extern_static!(NSRegularSquareBezelStyle: NSBezelStyle = NSBezelStyleRegularSquare); -pub static NSDisclosureBezelStyle: NSBezelStyle = NSBezelStyleDisclosure; +extern_static!(NSDisclosureBezelStyle: NSBezelStyle = NSBezelStyleDisclosure); -pub static NSShadowlessSquareBezelStyle: NSBezelStyle = NSBezelStyleShadowlessSquare; +extern_static!(NSShadowlessSquareBezelStyle: NSBezelStyle = NSBezelStyleShadowlessSquare); -pub static NSCircularBezelStyle: NSBezelStyle = NSBezelStyleCircular; +extern_static!(NSCircularBezelStyle: NSBezelStyle = NSBezelStyleCircular); -pub static NSTexturedSquareBezelStyle: NSBezelStyle = NSBezelStyleTexturedSquare; +extern_static!(NSTexturedSquareBezelStyle: NSBezelStyle = NSBezelStyleTexturedSquare); -pub static NSHelpButtonBezelStyle: NSBezelStyle = NSBezelStyleHelpButton; +extern_static!(NSHelpButtonBezelStyle: NSBezelStyle = NSBezelStyleHelpButton); -pub static NSSmallSquareBezelStyle: NSBezelStyle = NSBezelStyleSmallSquare; +extern_static!(NSSmallSquareBezelStyle: NSBezelStyle = NSBezelStyleSmallSquare); -pub static NSTexturedRoundedBezelStyle: NSBezelStyle = NSBezelStyleTexturedRounded; +extern_static!(NSTexturedRoundedBezelStyle: NSBezelStyle = NSBezelStyleTexturedRounded); -pub static NSRoundRectBezelStyle: NSBezelStyle = NSBezelStyleRoundRect; +extern_static!(NSRoundRectBezelStyle: NSBezelStyle = NSBezelStyleRoundRect); -pub static NSRecessedBezelStyle: NSBezelStyle = NSBezelStyleRecessed; +extern_static!(NSRecessedBezelStyle: NSBezelStyle = NSBezelStyleRecessed); -pub static NSRoundedDisclosureBezelStyle: NSBezelStyle = NSBezelStyleRoundedDisclosure; +extern_static!(NSRoundedDisclosureBezelStyle: NSBezelStyle = NSBezelStyleRoundedDisclosure); -pub static NSInlineBezelStyle: NSBezelStyle = NSBezelStyleInline; +extern_static!(NSInlineBezelStyle: NSBezelStyle = NSBezelStyleInline); -pub static NSSmallIconButtonBezelStyle: NSBezelStyle = 2; +extern_static!(NSSmallIconButtonBezelStyle: NSBezelStyle = 2); -pub static NSThickSquareBezelStyle: NSBezelStyle = 3; +extern_static!(NSThickSquareBezelStyle: NSBezelStyle = 3); -pub static NSThickerSquareBezelStyle: NSBezelStyle = 4; +extern_static!(NSThickerSquareBezelStyle: NSBezelStyle = 4); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index 25ec80ba0..b839fb763 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -97,6 +97,4 @@ extern_methods!( } ); -extern "C" { - pub static NSTouchBarItemIdentifierCandidateList: &'static NSTouchBarItemIdentifier; -} +extern_static!(NSTouchBarItemIdentifierCandidateList: &'static NSTouchBarItemIdentifier); diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index 66a1f4686..1dfdc0446 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -5,76 +5,104 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSCellType = NSUInteger; -pub const NSNullCellType: NSCellType = 0; -pub const NSTextCellType: NSCellType = 1; -pub const NSImageCellType: NSCellType = 2; - -pub type NSCellAttribute = NSUInteger; -pub const NSCellDisabled: NSCellAttribute = 0; -pub const NSCellState: NSCellAttribute = 1; -pub const NSPushInCell: NSCellAttribute = 2; -pub const NSCellEditable: NSCellAttribute = 3; -pub const NSChangeGrayCell: NSCellAttribute = 4; -pub const NSCellHighlighted: NSCellAttribute = 5; -pub const NSCellLightsByContents: NSCellAttribute = 6; -pub const NSCellLightsByGray: NSCellAttribute = 7; -pub const NSChangeBackgroundCell: NSCellAttribute = 8; -pub const NSCellLightsByBackground: NSCellAttribute = 9; -pub const NSCellIsBordered: NSCellAttribute = 10; -pub const NSCellHasOverlappingImage: NSCellAttribute = 11; -pub const NSCellHasImageHorizontal: NSCellAttribute = 12; -pub const NSCellHasImageOnLeftOrBottom: NSCellAttribute = 13; -pub const NSCellChangesContents: NSCellAttribute = 14; -pub const NSCellIsInsetButton: NSCellAttribute = 15; -pub const NSCellAllowsMixedState: NSCellAttribute = 16; - -pub type NSCellImagePosition = NSUInteger; -pub const NSNoImage: NSCellImagePosition = 0; -pub const NSImageOnly: NSCellImagePosition = 1; -pub const NSImageLeft: NSCellImagePosition = 2; -pub const NSImageRight: NSCellImagePosition = 3; -pub const NSImageBelow: NSCellImagePosition = 4; -pub const NSImageAbove: NSCellImagePosition = 5; -pub const NSImageOverlaps: NSCellImagePosition = 6; -pub const NSImageLeading: NSCellImagePosition = 7; -pub const NSImageTrailing: NSCellImagePosition = 8; - -pub type NSImageScaling = NSUInteger; -pub const NSImageScaleProportionallyDown: NSImageScaling = 0; -pub const NSImageScaleAxesIndependently: NSImageScaling = 1; -pub const NSImageScaleNone: NSImageScaling = 2; -pub const NSImageScaleProportionallyUpOrDown: NSImageScaling = 3; -pub const NSScaleProportionally: NSImageScaling = 0; -pub const NSScaleToFit: NSImageScaling = 1; -pub const NSScaleNone: NSImageScaling = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSCellType { + NSNullCellType = 0, + NSTextCellType = 1, + NSImageCellType = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSCellAttribute { + NSCellDisabled = 0, + NSCellState = 1, + NSPushInCell = 2, + NSCellEditable = 3, + NSChangeGrayCell = 4, + NSCellHighlighted = 5, + NSCellLightsByContents = 6, + NSCellLightsByGray = 7, + NSChangeBackgroundCell = 8, + NSCellLightsByBackground = 9, + NSCellIsBordered = 10, + NSCellHasOverlappingImage = 11, + NSCellHasImageHorizontal = 12, + NSCellHasImageOnLeftOrBottom = 13, + NSCellChangesContents = 14, + NSCellIsInsetButton = 15, + NSCellAllowsMixedState = 16, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSCellImagePosition { + NSNoImage = 0, + NSImageOnly = 1, + NSImageLeft = 2, + NSImageRight = 3, + NSImageBelow = 4, + NSImageAbove = 5, + NSImageOverlaps = 6, + NSImageLeading = 7, + NSImageTrailing = 8, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSImageScaling { + NSImageScaleProportionallyDown = 0, + NSImageScaleAxesIndependently = 1, + NSImageScaleNone = 2, + NSImageScaleProportionallyUpOrDown = 3, + NSScaleProportionally = 0, + NSScaleToFit = 1, + NSScaleNone = 2, + } +); pub type NSControlStateValue = NSInteger; -pub static NSControlStateValueMixed: NSControlStateValue = -1; +extern_static!(NSControlStateValueMixed: NSControlStateValue = -1); -pub static NSControlStateValueOff: NSControlStateValue = 0; +extern_static!(NSControlStateValueOff: NSControlStateValue = 0); -pub static NSControlStateValueOn: NSControlStateValue = 1; +extern_static!(NSControlStateValueOn: NSControlStateValue = 1); -pub type NSCellStyleMask = NSUInteger; -pub const NSNoCellMask: NSCellStyleMask = 0; -pub const NSContentsCellMask: NSCellStyleMask = 1; -pub const NSPushInCellMask: NSCellStyleMask = 2; -pub const NSChangeGrayCellMask: NSCellStyleMask = 4; -pub const NSChangeBackgroundCellMask: NSCellStyleMask = 8; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSCellStyleMask { + NSNoCellMask = 0, + NSContentsCellMask = 1, + NSPushInCellMask = 2, + NSChangeGrayCellMask = 4, + NSChangeBackgroundCellMask = 8, + } +); -pub type NSControlTint = NSUInteger; -pub const NSDefaultControlTint: NSControlTint = 0; -pub const NSBlueControlTint: NSControlTint = 1; -pub const NSGraphiteControlTint: NSControlTint = 6; -pub const NSClearControlTint: NSControlTint = 7; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSControlTint { + NSDefaultControlTint = 0, + NSBlueControlTint = 1, + NSGraphiteControlTint = 6, + NSClearControlTint = 7, + } +); -pub type NSControlSize = NSUInteger; -pub const NSControlSizeRegular: NSControlSize = 0; -pub const NSControlSizeSmall: NSControlSize = 1; -pub const NSControlSizeMini: NSControlSize = 2; -pub const NSControlSizeLarge: NSControlSize = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSControlSize { + NSControlSizeRegular = 0, + NSControlSizeSmall = 1, + NSControlSizeMini = 2, + NSControlSizeLarge = 3, + } +); extern_class!( #[derive(Debug)] @@ -596,11 +624,15 @@ extern_methods!( } ); -pub type NSCellHitResult = NSUInteger; -pub const NSCellHitNone: NSCellHitResult = 0; -pub const NSCellHitContentArea: NSCellHitResult = 1 << 0; -pub const NSCellHitEditableTextArea: NSCellHitResult = 1 << 1; -pub const NSCellHitTrackableArea: NSCellHitResult = 1 << 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSCellHitResult { + NSCellHitNone = 0, + NSCellHitContentArea = 1 << 0, + NSCellHitEditableTextArea = 1 << 1, + NSCellHitTrackableArea = 1 << 2, + } +); extern_methods!( /// NSCellHitTest @@ -630,11 +662,15 @@ extern_methods!( } ); -pub type NSBackgroundStyle = NSInteger; -pub const NSBackgroundStyleNormal: NSBackgroundStyle = 0; -pub const NSBackgroundStyleEmphasized: NSBackgroundStyle = 1; -pub const NSBackgroundStyleRaised: NSBackgroundStyle = 2; -pub const NSBackgroundStyleLowered: NSBackgroundStyle = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSBackgroundStyle { + NSBackgroundStyleNormal = 0, + NSBackgroundStyleEmphasized = 1, + NSBackgroundStyleRaised = 2, + NSBackgroundStyleLowered = 3, + } +); extern_methods!( /// NSCellBackgroundStyle @@ -690,32 +726,35 @@ extern_methods!( } ); -pub static NSBackgroundStyleLight: NSBackgroundStyle = NSBackgroundStyleNormal; +extern_static!(NSBackgroundStyleLight: NSBackgroundStyle = NSBackgroundStyleNormal); -pub static NSBackgroundStyleDark: NSBackgroundStyle = NSBackgroundStyleEmphasized; +extern_static!(NSBackgroundStyleDark: NSBackgroundStyle = NSBackgroundStyleEmphasized); pub type NSCellStateValue = NSControlStateValue; -pub static NSMixedState: NSControlStateValue = NSControlStateValueMixed; +extern_static!(NSMixedState: NSControlStateValue = NSControlStateValueMixed); -pub static NSOffState: NSControlStateValue = NSControlStateValueOff; +extern_static!(NSOffState: NSControlStateValue = NSControlStateValueOff); -pub static NSOnState: NSControlStateValue = NSControlStateValueOn; +extern_static!(NSOnState: NSControlStateValue = NSControlStateValueOn); -pub static NSRegularControlSize: NSControlSize = NSControlSizeRegular; +extern_static!(NSRegularControlSize: NSControlSize = NSControlSizeRegular); -pub static NSSmallControlSize: NSControlSize = NSControlSizeSmall; +extern_static!(NSSmallControlSize: NSControlSize = NSControlSizeSmall); -pub static NSMiniControlSize: NSControlSize = NSControlSizeMini; +extern_static!(NSMiniControlSize: NSControlSize = NSControlSizeMini); -extern "C" { - pub static NSControlTintDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSControlTintDidChangeNotification: &'static NSNotificationName); -pub const NSAnyType: c_uint = 0; -pub const NSIntType: c_uint = 1; -pub const NSPositiveIntType: c_uint = 2; -pub const NSFloatType: c_uint = 3; -pub const NSPositiveFloatType: c_uint = 4; -pub const NSDoubleType: c_uint = 6; -pub const NSPositiveDoubleType: c_uint = 7; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSAnyType = 0, + NSIntType = 1, + NSPositiveIntType = 2, + NSFloatType = 3, + NSPositiveFloatType = 4, + NSDoubleType = 6, + NSPositiveDoubleType = 7, + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs index e27037aa4..f787ca4c2 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionView.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionView.rs @@ -5,31 +5,40 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSCollectionViewDropOperation = NSInteger; -pub const NSCollectionViewDropOn: NSCollectionViewDropOperation = 0; -pub const NSCollectionViewDropBefore: NSCollectionViewDropOperation = 1; - -pub type NSCollectionViewItemHighlightState = NSInteger; -pub const NSCollectionViewItemHighlightNone: NSCollectionViewItemHighlightState = 0; -pub const NSCollectionViewItemHighlightForSelection: NSCollectionViewItemHighlightState = 1; -pub const NSCollectionViewItemHighlightForDeselection: NSCollectionViewItemHighlightState = 2; -pub const NSCollectionViewItemHighlightAsDropTarget: NSCollectionViewItemHighlightState = 3; - -pub type NSCollectionViewScrollPosition = NSUInteger; -pub const NSCollectionViewScrollPositionNone: NSCollectionViewScrollPosition = 0; -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; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSCollectionViewDropOperation { + NSCollectionViewDropOn = 0, + NSCollectionViewDropBefore = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSCollectionViewItemHighlightState { + NSCollectionViewItemHighlightNone = 0, + NSCollectionViewItemHighlightForSelection = 1, + NSCollectionViewItemHighlightForDeselection = 2, + NSCollectionViewItemHighlightAsDropTarget = 3, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSCollectionViewScrollPosition { + NSCollectionViewScrollPositionNone = 0, + NSCollectionViewScrollPositionTop = 1 << 0, + NSCollectionViewScrollPositionCenteredVertically = 1 << 1, + NSCollectionViewScrollPositionBottom = 1 << 2, + NSCollectionViewScrollPositionNearestHorizontalEdge = 1 << 9, + NSCollectionViewScrollPositionLeft = 1 << 3, + NSCollectionViewScrollPositionCenteredHorizontally = 1 << 4, + NSCollectionViewScrollPositionRight = 1 << 5, + NSCollectionViewScrollPositionLeadingEdge = 1 << 6, + NSCollectionViewScrollPositionTrailingEdge = 1 << 7, + NSCollectionViewScrollPositionNearestVerticalEdge = 1 << 8, + } +); pub type NSCollectionViewSupplementaryElementKind = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 240f3630d..a377896a0 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -5,18 +5,22 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSDirectionalRectEdge = NSUInteger; -pub const NSDirectionalRectEdgeNone: NSDirectionalRectEdge = 0; -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; - -struct_impl!( +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDirectionalRectEdge { + NSDirectionalRectEdgeNone = 0, + NSDirectionalRectEdgeTop = 1 << 0, + NSDirectionalRectEdgeLeading = 1 << 1, + NSDirectionalRectEdgeBottom = 1 << 2, + NSDirectionalRectEdgeTrailing = 1 << 3, + NSDirectionalRectEdgeAll = NSDirectionalRectEdgeTop + | NSDirectionalRectEdgeLeading + | NSDirectionalRectEdgeBottom + | NSDirectionalRectEdgeTrailing, + } +); + +extern_struct!( pub struct NSDirectionalEdgeInsets { pub top: CGFloat, pub leading: CGFloat, @@ -25,20 +29,22 @@ struct_impl!( } ); -extern "C" { - pub static NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets; -} - -pub type NSRectAlignment = NSInteger; -pub const NSRectAlignmentNone: NSRectAlignment = 0; -pub const NSRectAlignmentTop: NSRectAlignment = 1; -pub const NSRectAlignmentTopLeading: NSRectAlignment = 2; -pub const NSRectAlignmentLeading: NSRectAlignment = 3; -pub const NSRectAlignmentBottomLeading: NSRectAlignment = 4; -pub const NSRectAlignmentBottom: NSRectAlignment = 5; -pub const NSRectAlignmentBottomTrailing: NSRectAlignment = 6; -pub const NSRectAlignmentTrailing: NSRectAlignment = 7; -pub const NSRectAlignmentTopTrailing: NSRectAlignment = 8; +extern_static!(NSDirectionalEdgeInsetsZero: NSDirectionalEdgeInsets); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSRectAlignment { + NSRectAlignmentNone = 0, + NSRectAlignmentTop = 1, + NSRectAlignmentTopLeading = 2, + NSRectAlignmentLeading = 3, + NSRectAlignmentBottomLeading = 4, + NSRectAlignmentBottom = 5, + NSRectAlignmentBottomTrailing = 6, + NSRectAlignmentTrailing = 7, + NSRectAlignmentTopTrailing = 8, + } +); extern_class!( #[derive(Debug)] @@ -134,19 +140,17 @@ extern_methods!( } ); -pub type NSCollectionLayoutSectionOrthogonalScrollingBehavior = NSInteger; -pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorNone: - NSCollectionLayoutSectionOrthogonalScrollingBehavior = 0; -pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuous: - NSCollectionLayoutSectionOrthogonalScrollingBehavior = 1; -pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary: - NSCollectionLayoutSectionOrthogonalScrollingBehavior = 2; -pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging: - NSCollectionLayoutSectionOrthogonalScrollingBehavior = 3; -pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging: - NSCollectionLayoutSectionOrthogonalScrollingBehavior = 4; -pub const NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered: - NSCollectionLayoutSectionOrthogonalScrollingBehavior = 5; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSCollectionLayoutSectionOrthogonalScrollingBehavior { + NSCollectionLayoutSectionOrthogonalScrollingBehaviorNone = 0, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuous = 1, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorContinuousGroupLeadingBoundary = 2, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorPaging = 3, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging = 4, + NSCollectionLayoutSectionOrthogonalScrollingBehaviorGroupPagingCentered = 5, + } +); pub type NSCollectionLayoutSectionVisibleItemsInvalidationHandler = TodoBlock; diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs index edcdfa6aa..50dbf2ba9 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs @@ -5,19 +5,21 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSCollectionViewScrollDirection = NSInteger; -pub const NSCollectionViewScrollDirectionVertical: NSCollectionViewScrollDirection = 0; -pub const NSCollectionViewScrollDirectionHorizontal: NSCollectionViewScrollDirection = 1; - -extern "C" { - pub static NSCollectionElementKindSectionHeader: - &'static NSCollectionViewSupplementaryElementKind; -} - -extern "C" { - pub static NSCollectionElementKindSectionFooter: - &'static NSCollectionViewSupplementaryElementKind; -} +ns_enum!( + #[underlying(NSInteger)] + pub enum NSCollectionViewScrollDirection { + NSCollectionViewScrollDirectionVertical = 0, + NSCollectionViewScrollDirectionHorizontal = 1, + } +); + +extern_static!( + NSCollectionElementKindSectionHeader: &'static NSCollectionViewSupplementaryElementKind +); + +extern_static!( + NSCollectionElementKindSectionFooter: &'static NSCollectionViewSupplementaryElementKind +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs index a8881257e..a13d63e6d 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewLayout.rs @@ -5,18 +5,21 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSCollectionElementCategory = NSInteger; -pub const NSCollectionElementCategoryItem: NSCollectionElementCategory = 0; -pub const NSCollectionElementCategorySupplementaryView: NSCollectionElementCategory = 1; -pub const NSCollectionElementCategoryDecorationView: NSCollectionElementCategory = 2; -pub const NSCollectionElementCategoryInterItemGap: NSCollectionElementCategory = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSCollectionElementCategory { + NSCollectionElementCategoryItem = 0, + NSCollectionElementCategorySupplementaryView = 1, + NSCollectionElementCategoryDecorationView = 2, + NSCollectionElementCategoryInterItemGap = 3, + } +); pub type NSCollectionViewDecorationElementKind = NSString; -extern "C" { - pub static NSCollectionElementKindInterItemGapIndicator: - &'static NSCollectionViewSupplementaryElementKind; -} +extern_static!( + NSCollectionElementKindInterItemGapIndicator: &'static NSCollectionViewSupplementaryElementKind +); extern_class!( #[derive(Debug)] @@ -95,12 +98,16 @@ extern_methods!( } ); -pub type NSCollectionUpdateAction = NSInteger; -pub const NSCollectionUpdateActionInsert: NSCollectionUpdateAction = 0; -pub const NSCollectionUpdateActionDelete: NSCollectionUpdateAction = 1; -pub const NSCollectionUpdateActionReload: NSCollectionUpdateAction = 2; -pub const NSCollectionUpdateActionMove: NSCollectionUpdateAction = 3; -pub const NSCollectionUpdateActionNone: NSCollectionUpdateAction = 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSCollectionUpdateAction { + NSCollectionUpdateActionInsert = 0, + NSCollectionUpdateActionDelete = 1, + NSCollectionUpdateActionReload = 2, + NSCollectionUpdateActionMove = 3, + NSCollectionUpdateActionNone = 4, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index e0fdd2954..85ed3e932 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -5,19 +5,27 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub static NSAppKitVersionNumberWithPatternColorLeakFix: NSAppKitVersion = 641.0; - -pub type NSColorType = NSInteger; -pub const NSColorTypeComponentBased: NSColorType = 0; -pub const NSColorTypePattern: NSColorType = 1; -pub const NSColorTypeCatalog: NSColorType = 2; +extern_static!(NSAppKitVersionNumberWithPatternColorLeakFix: NSAppKitVersion = 641.0); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSColorType { + NSColorTypeComponentBased = 0, + NSColorTypePattern = 1, + NSColorTypeCatalog = 2, + } +); -pub type NSColorSystemEffect = NSInteger; -pub const NSColorSystemEffectNone: NSColorSystemEffect = 0; -pub const NSColorSystemEffectPressed: NSColorSystemEffect = 1; -pub const NSColorSystemEffectDeepPressed: NSColorSystemEffect = 2; -pub const NSColorSystemEffectDisabled: NSColorSystemEffect = 3; -pub const NSColorSystemEffectRollover: NSColorSystemEffect = 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSColorSystemEffect { + NSColorSystemEffectNone = 0, + NSColorSystemEffectPressed = 1, + NSColorSystemEffectDeepPressed = 2, + NSColorSystemEffectDisabled = 3, + NSColorSystemEffectRollover = 4, + } +); extern_class!( #[derive(Debug)] @@ -613,6 +621,4 @@ extern_methods!( } ); -extern "C" { - pub static NSSystemColorsDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSSystemColorsDidChangeNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSColorList.rs b/crates/icrate/src/generated/AppKit/NSColorList.rs index b76fc9c60..69950dfd0 100644 --- a/crates/icrate/src/generated/AppKit/NSColorList.rs +++ b/crates/icrate/src/generated/AppKit/NSColorList.rs @@ -79,6 +79,4 @@ extern_methods!( } ); -extern "C" { - pub static NSColorListDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSColorListDidChangeNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index f24e0d9b2..b9b24a483 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -5,27 +5,35 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSColorPanelMode = NSInteger; -pub const NSColorPanelModeNone: NSColorPanelMode = -1; -pub const NSColorPanelModeGray: NSColorPanelMode = 0; -pub const NSColorPanelModeRGB: NSColorPanelMode = 1; -pub const NSColorPanelModeCMYK: NSColorPanelMode = 2; -pub const NSColorPanelModeHSB: NSColorPanelMode = 3; -pub const NSColorPanelModeCustomPalette: NSColorPanelMode = 4; -pub const NSColorPanelModeColorList: NSColorPanelMode = 5; -pub const NSColorPanelModeWheel: NSColorPanelMode = 6; -pub const NSColorPanelModeCrayon: NSColorPanelMode = 7; - -pub type NSColorPanelOptions = NSUInteger; -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; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSColorPanelMode { + NSColorPanelModeNone = -1, + NSColorPanelModeGray = 0, + NSColorPanelModeRGB = 1, + NSColorPanelModeCMYK = 2, + NSColorPanelModeHSB = 3, + NSColorPanelModeCustomPalette = 4, + NSColorPanelModeColorList = 5, + NSColorPanelModeWheel = 6, + NSColorPanelModeCrayon = 7, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSColorPanelOptions { + NSColorPanelGrayModeMask = 0x00000001, + NSColorPanelRGBModeMask = 0x00000002, + NSColorPanelCMYKModeMask = 0x00000004, + NSColorPanelHSBModeMask = 0x00000008, + NSColorPanelCustomPaletteModeMask = 0x00000010, + NSColorPanelColorListModeMask = 0x00000020, + NSColorPanelWheelModeMask = 0x00000040, + NSColorPanelCrayonModeMask = 0x00000080, + NSColorPanelAllModesMask = 0x0000ffff, + } +); extern_class!( #[derive(Debug)] @@ -122,24 +130,22 @@ extern_methods!( } ); -extern "C" { - pub static NSColorPanelColorDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSColorPanelColorDidChangeNotification: &'static NSNotificationName); -pub static NSNoModeColorPanel: NSColorPanelMode = NSColorPanelModeNone; +extern_static!(NSNoModeColorPanel: NSColorPanelMode = NSColorPanelModeNone); -pub static NSGrayModeColorPanel: NSColorPanelMode = NSColorPanelModeGray; +extern_static!(NSGrayModeColorPanel: NSColorPanelMode = NSColorPanelModeGray); -pub static NSRGBModeColorPanel: NSColorPanelMode = NSColorPanelModeRGB; +extern_static!(NSRGBModeColorPanel: NSColorPanelMode = NSColorPanelModeRGB); -pub static NSCMYKModeColorPanel: NSColorPanelMode = NSColorPanelModeCMYK; +extern_static!(NSCMYKModeColorPanel: NSColorPanelMode = NSColorPanelModeCMYK); -pub static NSHSBModeColorPanel: NSColorPanelMode = NSColorPanelModeHSB; +extern_static!(NSHSBModeColorPanel: NSColorPanelMode = NSColorPanelModeHSB); -pub static NSCustomPaletteModeColorPanel: NSColorPanelMode = NSColorPanelModeCustomPalette; +extern_static!(NSCustomPaletteModeColorPanel: NSColorPanelMode = NSColorPanelModeCustomPalette); -pub static NSColorListModeColorPanel: NSColorPanelMode = NSColorPanelModeColorList; +extern_static!(NSColorListModeColorPanel: NSColorPanelMode = NSColorPanelModeColorList); -pub static NSWheelModeColorPanel: NSColorPanelMode = NSColorPanelModeWheel; +extern_static!(NSWheelModeColorPanel: NSColorPanelMode = NSColorPanelModeWheel); -pub static NSCrayonModeColorPanel: NSColorPanelMode = NSColorPanelModeCrayon; +extern_static!(NSCrayonModeColorPanel: NSColorPanelMode = NSColorPanelModeCrayon); diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index cdf6cb10a..0ae0523da 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -5,15 +5,19 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSColorSpaceModel = NSInteger; -pub const NSColorSpaceModelUnknown: NSColorSpaceModel = -1; -pub const NSColorSpaceModelGray: NSColorSpaceModel = 0; -pub const NSColorSpaceModelRGB: NSColorSpaceModel = 1; -pub const NSColorSpaceModelCMYK: NSColorSpaceModel = 2; -pub const NSColorSpaceModelLAB: NSColorSpaceModel = 3; -pub const NSColorSpaceModelDeviceN: NSColorSpaceModel = 4; -pub const NSColorSpaceModelIndexed: NSColorSpaceModel = 5; -pub const NSColorSpaceModelPatterned: NSColorSpaceModel = 6; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSColorSpaceModel { + NSColorSpaceModelUnknown = -1, + NSColorSpaceModelGray = 0, + NSColorSpaceModelRGB = 1, + NSColorSpaceModelCMYK = 2, + NSColorSpaceModelLAB = 3, + NSColorSpaceModelDeviceN = 4, + NSColorSpaceModelIndexed = 5, + NSColorSpaceModelPatterned = 6, + } +); extern_class!( #[derive(Debug)] @@ -105,18 +109,18 @@ extern_methods!( } ); -pub static NSUnknownColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelUnknown; +extern_static!(NSUnknownColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelUnknown); -pub static NSGrayColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelGray; +extern_static!(NSGrayColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelGray); -pub static NSRGBColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelRGB; +extern_static!(NSRGBColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelRGB); -pub static NSCMYKColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelCMYK; +extern_static!(NSCMYKColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelCMYK); -pub static NSLABColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelLAB; +extern_static!(NSLABColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelLAB); -pub static NSDeviceNColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelDeviceN; +extern_static!(NSDeviceNColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelDeviceN); -pub static NSIndexedColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelIndexed; +extern_static!(NSIndexedColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelIndexed); -pub static NSPatternColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelPatterned; +extern_static!(NSPatternColorSpaceModel: NSColorSpaceModel = NSColorSpaceModelPatterned); diff --git a/crates/icrate/src/generated/AppKit/NSComboBox.rs b/crates/icrate/src/generated/AppKit/NSComboBox.rs index f3d42ee0d..af6495fdd 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBox.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBox.rs @@ -5,21 +5,13 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSComboBoxWillPopUpNotification: &'static NSNotificationName; -} +extern_static!(NSComboBoxWillPopUpNotification: &'static NSNotificationName); -extern "C" { - pub static NSComboBoxWillDismissNotification: &'static NSNotificationName; -} +extern_static!(NSComboBoxWillDismissNotification: &'static NSNotificationName); -extern "C" { - pub static NSComboBoxSelectionDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSComboBoxSelectionDidChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSComboBoxSelectionIsChangingNotification: &'static NSNotificationName; -} +extern_static!(NSComboBoxSelectionIsChangingNotification: &'static NSNotificationName); pub type NSComboBoxDataSource = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index 959a3a286..ee78285c4 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -248,17 +248,11 @@ extern_methods!( pub type NSControlTextEditingDelegate = NSObject; -extern "C" { - pub static NSControlTextDidBeginEditingNotification: &'static NSNotificationName; -} +extern_static!(NSControlTextDidBeginEditingNotification: &'static NSNotificationName); -extern "C" { - pub static NSControlTextDidEndEditingNotification: &'static NSNotificationName; -} +extern_static!(NSControlTextDidEndEditingNotification: &'static NSNotificationName); -extern "C" { - pub static NSControlTextDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSControlTextDidChangeNotification: &'static NSNotificationName); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSCursor.rs b/crates/icrate/src/generated/AppKit/NSCursor.rs index ba33cae56..d86228a42 100644 --- a/crates/icrate/src/generated/AppKit/NSCursor.rs +++ b/crates/icrate/src/generated/AppKit/NSCursor.rs @@ -112,7 +112,7 @@ extern_methods!( } ); -pub static NSAppKitVersionNumberWithCursorSizeSupport: NSAppKitVersion = 682.0; +extern_static!(NSAppKitVersionNumberWithCursorSizeSupport: NSAppKitVersion = 682.0); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index 9311634dd..559f2a096 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -5,22 +5,34 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSDatePickerStyle = NSUInteger; -pub const NSDatePickerStyleTextFieldAndStepper: NSDatePickerStyle = 0; -pub const NSDatePickerStyleClockAndCalendar: NSDatePickerStyle = 1; -pub const NSDatePickerStyleTextField: NSDatePickerStyle = 2; - -pub type NSDatePickerMode = NSUInteger; -pub const NSDatePickerModeSingle: NSDatePickerMode = 0; -pub const NSDatePickerModeRange: NSDatePickerMode = 1; - -pub type NSDatePickerElementFlags = NSUInteger; -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; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSDatePickerStyle { + NSDatePickerStyleTextFieldAndStepper = 0, + NSDatePickerStyleClockAndCalendar = 1, + NSDatePickerStyleTextField = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSDatePickerMode { + NSDatePickerModeSingle = 0, + NSDatePickerModeRange = 1, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDatePickerElementFlags { + NSDatePickerElementFlagHourMinute = 0x000c, + NSDatePickerElementFlagHourMinuteSecond = 0x000e, + NSDatePickerElementFlagTimeZone = 0x0010, + NSDatePickerElementFlagYearMonth = 0x00c0, + NSDatePickerElementFlagYearMonthDay = 0x00e0, + NSDatePickerElementFlagEra = 0x0100, + } +); extern_class!( #[derive(Debug)] @@ -139,30 +151,40 @@ extern_methods!( pub type NSDatePickerCellDelegate = NSObject; -pub static NSTextFieldAndStepperDatePickerStyle: NSDatePickerStyle = - NSDatePickerStyleTextFieldAndStepper; +extern_static!( + NSTextFieldAndStepperDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleTextFieldAndStepper +); -pub static NSClockAndCalendarDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleClockAndCalendar; +extern_static!( + NSClockAndCalendarDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleClockAndCalendar +); -pub static NSTextFieldDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleTextField; +extern_static!(NSTextFieldDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleTextField); -pub static NSSingleDateMode: NSDatePickerMode = NSDatePickerModeSingle; +extern_static!(NSSingleDateMode: NSDatePickerMode = NSDatePickerModeSingle); -pub static NSRangeDateMode: NSDatePickerMode = NSDatePickerModeRange; +extern_static!(NSRangeDateMode: NSDatePickerMode = NSDatePickerModeRange); -pub static NSHourMinuteDatePickerElementFlag: NSDatePickerElementFlags = - NSDatePickerElementFlagHourMinute; +extern_static!( + NSHourMinuteDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagHourMinute +); -pub static NSHourMinuteSecondDatePickerElementFlag: NSDatePickerElementFlags = - NSDatePickerElementFlagHourMinuteSecond; +extern_static!( + NSHourMinuteSecondDatePickerElementFlag: NSDatePickerElementFlags = + NSDatePickerElementFlagHourMinuteSecond +); -pub static NSTimeZoneDatePickerElementFlag: NSDatePickerElementFlags = - NSDatePickerElementFlagTimeZone; +extern_static!( + NSTimeZoneDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagTimeZone +); -pub static NSYearMonthDatePickerElementFlag: NSDatePickerElementFlags = - NSDatePickerElementFlagYearMonth; +extern_static!( + NSYearMonthDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagYearMonth +); -pub static NSYearMonthDayDatePickerElementFlag: NSDatePickerElementFlags = - NSDatePickerElementFlagYearMonthDay; +extern_static!( + NSYearMonthDayDatePickerElementFlag: NSDatePickerElementFlags = + NSDatePickerElementFlagYearMonthDay +); -pub static NSEraDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagEra; +extern_static!(NSEraDatePickerElementFlag: NSDatePickerElementFlags = NSDatePickerElementFlagEra); diff --git a/crates/icrate/src/generated/AppKit/NSDockTile.rs b/crates/icrate/src/generated/AppKit/NSDockTile.rs index f6bfcb422..dcb53b53a 100644 --- a/crates/icrate/src/generated/AppKit/NSDockTile.rs +++ b/crates/icrate/src/generated/AppKit/NSDockTile.rs @@ -5,7 +5,7 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub static NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = 1001.0; +extern_static!(NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = 1001.0); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index c529c588a..a85ca7301 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -5,23 +5,31 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSDocumentChangeType = NSUInteger; -pub const NSChangeDone: NSDocumentChangeType = 0; -pub const NSChangeUndone: NSDocumentChangeType = 1; -pub const NSChangeRedone: NSDocumentChangeType = 5; -pub const NSChangeCleared: NSDocumentChangeType = 2; -pub const NSChangeReadOtherContents: NSDocumentChangeType = 3; -pub const NSChangeAutosaved: NSDocumentChangeType = 4; -pub const NSChangeDiscardable: NSDocumentChangeType = 256; - -pub type NSSaveOperationType = NSUInteger; -pub const NSSaveOperation: NSSaveOperationType = 0; -pub const NSSaveAsOperation: NSSaveOperationType = 1; -pub const NSSaveToOperation: NSSaveOperationType = 2; -pub const NSAutosaveInPlaceOperation: NSSaveOperationType = 4; -pub const NSAutosaveElsewhereOperation: NSSaveOperationType = 3; -pub const NSAutosaveAsOperation: NSSaveOperationType = 5; -pub const NSAutosaveOperation: NSSaveOperationType = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSDocumentChangeType { + NSChangeDone = 0, + NSChangeUndone = 1, + NSChangeRedone = 5, + NSChangeCleared = 2, + NSChangeReadOtherContents = 3, + NSChangeAutosaved = 4, + NSChangeDiscardable = 256, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSSaveOperationType { + NSSaveOperation = 0, + NSSaveAsOperation = 1, + NSSaveToOperation = 2, + NSAutosaveInPlaceOperation = 4, + NSAutosaveElsewhereOperation = 3, + NSAutosaveAsOperation = 5, + NSAutosaveOperation = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs index 9d790b838..f8d77498a 100644 --- a/crates/icrate/src/generated/AppKit/NSDragging.rs +++ b/crates/icrate/src/generated/AppKit/NSDragging.rs @@ -5,39 +5,57 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSDragOperation = NSUInteger; -pub const NSDragOperationNone: NSDragOperation = 0; -pub const NSDragOperationCopy: NSDragOperation = 1; -pub const NSDragOperationLink: NSDragOperation = 2; -pub const NSDragOperationGeneric: NSDragOperation = 4; -pub const NSDragOperationPrivate: NSDragOperation = 8; -pub const NSDragOperationMove: NSDragOperation = 16; -pub const NSDragOperationDelete: NSDragOperation = 32; -pub const NSDragOperationEvery: NSDragOperation = 18446744073709551615; -pub const NSDragOperationAll_Obsolete: NSDragOperation = 15; -pub const NSDragOperationAll: NSDragOperation = NSDragOperationAll_Obsolete; - -pub type NSDraggingFormation = NSInteger; -pub const NSDraggingFormationDefault: NSDraggingFormation = 0; -pub const NSDraggingFormationNone: NSDraggingFormation = 1; -pub const NSDraggingFormationPile: NSDraggingFormation = 2; -pub const NSDraggingFormationList: NSDraggingFormation = 3; -pub const NSDraggingFormationStack: NSDraggingFormation = 4; - -pub type NSDraggingContext = NSInteger; -pub const NSDraggingContextOutsideApplication: NSDraggingContext = 0; -pub const NSDraggingContextWithinApplication: NSDraggingContext = 1; - -pub type NSDraggingItemEnumerationOptions = NSUInteger; -pub const NSDraggingItemEnumerationConcurrent: NSDraggingItemEnumerationOptions = - NSEnumerationConcurrent; -pub const NSDraggingItemEnumerationClearNonenumeratedImages: NSDraggingItemEnumerationOptions = - 1 << 16; - -pub type NSSpringLoadingHighlight = NSInteger; -pub const NSSpringLoadingHighlightNone: NSSpringLoadingHighlight = 0; -pub const NSSpringLoadingHighlightStandard: NSSpringLoadingHighlight = 1; -pub const NSSpringLoadingHighlightEmphasized: NSSpringLoadingHighlight = 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDragOperation { + NSDragOperationNone = 0, + NSDragOperationCopy = 1, + NSDragOperationLink = 2, + NSDragOperationGeneric = 4, + NSDragOperationPrivate = 8, + NSDragOperationMove = 16, + NSDragOperationDelete = 32, + NSDragOperationEvery = 18446744073709551615, + NSDragOperationAll_Obsolete = 15, + NSDragOperationAll = NSDragOperationAll_Obsolete, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSDraggingFormation { + NSDraggingFormationDefault = 0, + NSDraggingFormationNone = 1, + NSDraggingFormationPile = 2, + NSDraggingFormationList = 3, + NSDraggingFormationStack = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSDraggingContext { + NSDraggingContextOutsideApplication = 0, + NSDraggingContextWithinApplication = 1, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDraggingItemEnumerationOptions { + NSDraggingItemEnumerationConcurrent = NSEnumerationConcurrent, + NSDraggingItemEnumerationClearNonenumeratedImages = 1 << 16, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSSpringLoadingHighlight { + NSSpringLoadingHighlightNone = 0, + NSSpringLoadingHighlightStandard = 1, + NSSpringLoadingHighlightEmphasized = 2, + } +); pub type NSDraggingInfo = NSObject; @@ -45,11 +63,15 @@ pub type NSDraggingDestination = NSObject; pub type NSDraggingSource = NSObject; -pub type NSSpringLoadingOptions = NSUInteger; -pub const NSSpringLoadingDisabled: NSSpringLoadingOptions = 0; -pub const NSSpringLoadingEnabled: NSSpringLoadingOptions = 1 << 0; -pub const NSSpringLoadingContinuousActivation: NSSpringLoadingOptions = 1 << 1; -pub const NSSpringLoadingNoHover: NSSpringLoadingOptions = 1 << 3; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSSpringLoadingOptions { + NSSpringLoadingDisabled = 0, + NSSpringLoadingEnabled = 1 << 0, + NSSpringLoadingContinuousActivation = 1 << 1, + NSSpringLoadingNoHover = 1 << 3, + } +); pub type NSSpringLoadingDestination = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs index a7dd6f30d..ceb8bcc58 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -7,13 +7,9 @@ use crate::Foundation::*; pub type NSDraggingImageComponentKey = NSString; -extern "C" { - pub static NSDraggingImageComponentIconKey: &'static NSDraggingImageComponentKey; -} +extern_static!(NSDraggingImageComponentIconKey: &'static NSDraggingImageComponentKey); -extern "C" { - pub static NSDraggingImageComponentLabelKey: &'static NSDraggingImageComponentKey; -} +extern_static!(NSDraggingImageComponentLabelKey: &'static NSDraggingImageComponentKey); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index 5efec09c1..68a0376e1 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -5,11 +5,15 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSDrawerState = NSUInteger; -pub const NSDrawerClosedState: NSDrawerState = 0; -pub const NSDrawerOpeningState: NSDrawerState = 1; -pub const NSDrawerOpenState: NSDrawerState = 2; -pub const NSDrawerClosingState: NSDrawerState = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSDrawerState { + NSDrawerClosedState = 0, + NSDrawerOpeningState = 1, + NSDrawerOpenState = 2, + NSDrawerClosingState = 3, + } +); extern_class!( #[derive(Debug)] @@ -107,18 +111,10 @@ extern_methods!( pub type NSDrawerDelegate = NSObject; -extern "C" { - pub static NSDrawerWillOpenNotification: &'static NSNotificationName; -} +extern_static!(NSDrawerWillOpenNotification: &'static NSNotificationName); -extern "C" { - pub static NSDrawerDidOpenNotification: &'static NSNotificationName; -} +extern_static!(NSDrawerDidOpenNotification: &'static NSNotificationName); -extern "C" { - pub static NSDrawerWillCloseNotification: &'static NSNotificationName; -} +extern_static!(NSDrawerWillCloseNotification: &'static NSNotificationName); -extern "C" { - pub static NSDrawerDidCloseNotification: &'static NSNotificationName; -} +extern_static!(NSDrawerDidCloseNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSErrors.rs b/crates/icrate/src/generated/AppKit/NSErrors.rs index 0d48122f8..6decaf947 100644 --- a/crates/icrate/src/generated/AppKit/NSErrors.rs +++ b/crates/icrate/src/generated/AppKit/NSErrors.rs @@ -5,146 +5,74 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSTextLineTooLongException: &'static NSExceptionName; -} +extern_static!(NSTextLineTooLongException: &'static NSExceptionName); -extern "C" { - pub static NSTextNoSelectionException: &'static NSExceptionName; -} +extern_static!(NSTextNoSelectionException: &'static NSExceptionName); -extern "C" { - pub static NSWordTablesWriteException: &'static NSExceptionName; -} +extern_static!(NSWordTablesWriteException: &'static NSExceptionName); -extern "C" { - pub static NSWordTablesReadException: &'static NSExceptionName; -} +extern_static!(NSWordTablesReadException: &'static NSExceptionName); -extern "C" { - pub static NSTextReadException: &'static NSExceptionName; -} +extern_static!(NSTextReadException: &'static NSExceptionName); -extern "C" { - pub static NSTextWriteException: &'static NSExceptionName; -} +extern_static!(NSTextWriteException: &'static NSExceptionName); -extern "C" { - pub static NSPasteboardCommunicationException: &'static NSExceptionName; -} +extern_static!(NSPasteboardCommunicationException: &'static NSExceptionName); -extern "C" { - pub static NSPrintingCommunicationException: &'static NSExceptionName; -} +extern_static!(NSPrintingCommunicationException: &'static NSExceptionName); -extern "C" { - pub static NSAbortModalException: &'static NSExceptionName; -} +extern_static!(NSAbortModalException: &'static NSExceptionName); -extern "C" { - pub static NSAbortPrintingException: &'static NSExceptionName; -} +extern_static!(NSAbortPrintingException: &'static NSExceptionName); -extern "C" { - pub static NSIllegalSelectorException: &'static NSExceptionName; -} +extern_static!(NSIllegalSelectorException: &'static NSExceptionName); -extern "C" { - pub static NSAppKitVirtualMemoryException: &'static NSExceptionName; -} +extern_static!(NSAppKitVirtualMemoryException: &'static NSExceptionName); -extern "C" { - pub static NSBadRTFDirectiveException: &'static NSExceptionName; -} +extern_static!(NSBadRTFDirectiveException: &'static NSExceptionName); -extern "C" { - pub static NSBadRTFFontTableException: &'static NSExceptionName; -} +extern_static!(NSBadRTFFontTableException: &'static NSExceptionName); -extern "C" { - pub static NSBadRTFStyleSheetException: &'static NSExceptionName; -} +extern_static!(NSBadRTFStyleSheetException: &'static NSExceptionName); -extern "C" { - pub static NSTypedStreamVersionException: &'static NSExceptionName; -} +extern_static!(NSTypedStreamVersionException: &'static NSExceptionName); -extern "C" { - pub static NSTIFFException: &'static NSExceptionName; -} +extern_static!(NSTIFFException: &'static NSExceptionName); -extern "C" { - pub static NSPrintPackageException: &'static NSExceptionName; -} +extern_static!(NSPrintPackageException: &'static NSExceptionName); -extern "C" { - pub static NSBadRTFColorTableException: &'static NSExceptionName; -} +extern_static!(NSBadRTFColorTableException: &'static NSExceptionName); -extern "C" { - pub static NSDraggingException: &'static NSExceptionName; -} +extern_static!(NSDraggingException: &'static NSExceptionName); -extern "C" { - pub static NSColorListIOException: &'static NSExceptionName; -} +extern_static!(NSColorListIOException: &'static NSExceptionName); -extern "C" { - pub static NSColorListNotEditableException: &'static NSExceptionName; -} +extern_static!(NSColorListNotEditableException: &'static NSExceptionName); -extern "C" { - pub static NSBadBitmapParametersException: &'static NSExceptionName; -} +extern_static!(NSBadBitmapParametersException: &'static NSExceptionName); -extern "C" { - pub static NSWindowServerCommunicationException: &'static NSExceptionName; -} +extern_static!(NSWindowServerCommunicationException: &'static NSExceptionName); -extern "C" { - pub static NSFontUnavailableException: &'static NSExceptionName; -} +extern_static!(NSFontUnavailableException: &'static NSExceptionName); -extern "C" { - pub static NSPPDIncludeNotFoundException: &'static NSExceptionName; -} +extern_static!(NSPPDIncludeNotFoundException: &'static NSExceptionName); -extern "C" { - pub static NSPPDParseException: &'static NSExceptionName; -} +extern_static!(NSPPDParseException: &'static NSExceptionName); -extern "C" { - pub static NSPPDIncludeStackOverflowException: &'static NSExceptionName; -} +extern_static!(NSPPDIncludeStackOverflowException: &'static NSExceptionName); -extern "C" { - pub static NSPPDIncludeStackUnderflowException: &'static NSExceptionName; -} +extern_static!(NSPPDIncludeStackUnderflowException: &'static NSExceptionName); -extern "C" { - pub static NSRTFPropertyStackOverflowException: &'static NSExceptionName; -} +extern_static!(NSRTFPropertyStackOverflowException: &'static NSExceptionName); -extern "C" { - pub static NSAppKitIgnoredException: &'static NSExceptionName; -} +extern_static!(NSAppKitIgnoredException: &'static NSExceptionName); -extern "C" { - pub static NSBadComparisonException: &'static NSExceptionName; -} +extern_static!(NSBadComparisonException: &'static NSExceptionName); -extern "C" { - pub static NSImageCacheException: &'static NSExceptionName; -} +extern_static!(NSImageCacheException: &'static NSExceptionName); -extern "C" { - pub static NSNibLoadingException: &'static NSExceptionName; -} +extern_static!(NSNibLoadingException: &'static NSExceptionName); -extern "C" { - pub static NSBrowserIllegalDelegateException: &'static NSExceptionName; -} +extern_static!(NSBrowserIllegalDelegateException: &'static NSExceptionName); -extern "C" { - pub static NSAccessibilityException: &'static NSExceptionName; -} +extern_static!(NSAccessibilityException: &'static NSExceptionName); diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index abca52dfa..e26233c35 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -5,285 +5,331 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSEventType = NSUInteger; -pub const NSEventTypeLeftMouseDown: NSEventType = 1; -pub const NSEventTypeLeftMouseUp: NSEventType = 2; -pub const NSEventTypeRightMouseDown: NSEventType = 3; -pub const NSEventTypeRightMouseUp: NSEventType = 4; -pub const NSEventTypeMouseMoved: NSEventType = 5; -pub const NSEventTypeLeftMouseDragged: NSEventType = 6; -pub const NSEventTypeRightMouseDragged: NSEventType = 7; -pub const NSEventTypeMouseEntered: NSEventType = 8; -pub const NSEventTypeMouseExited: NSEventType = 9; -pub const NSEventTypeKeyDown: NSEventType = 10; -pub const NSEventTypeKeyUp: NSEventType = 11; -pub const NSEventTypeFlagsChanged: NSEventType = 12; -pub const NSEventTypeAppKitDefined: NSEventType = 13; -pub const NSEventTypeSystemDefined: NSEventType = 14; -pub const NSEventTypeApplicationDefined: NSEventType = 15; -pub const NSEventTypePeriodic: NSEventType = 16; -pub const NSEventTypeCursorUpdate: NSEventType = 17; -pub const NSEventTypeScrollWheel: NSEventType = 22; -pub const NSEventTypeTabletPoint: NSEventType = 23; -pub const NSEventTypeTabletProximity: NSEventType = 24; -pub const NSEventTypeOtherMouseDown: NSEventType = 25; -pub const NSEventTypeOtherMouseUp: NSEventType = 26; -pub const NSEventTypeOtherMouseDragged: NSEventType = 27; -pub const NSEventTypeGesture: NSEventType = 29; -pub const NSEventTypeMagnify: NSEventType = 30; -pub const NSEventTypeSwipe: NSEventType = 31; -pub const NSEventTypeRotate: NSEventType = 18; -pub const NSEventTypeBeginGesture: NSEventType = 19; -pub const NSEventTypeEndGesture: NSEventType = 20; -pub const NSEventTypeSmartMagnify: NSEventType = 32; -pub const NSEventTypeQuickLook: NSEventType = 33; -pub const NSEventTypePressure: NSEventType = 34; -pub const NSEventTypeDirectTouch: NSEventType = 37; -pub const NSEventTypeChangeMode: NSEventType = 38; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSEventType { + NSEventTypeLeftMouseDown = 1, + NSEventTypeLeftMouseUp = 2, + NSEventTypeRightMouseDown = 3, + NSEventTypeRightMouseUp = 4, + NSEventTypeMouseMoved = 5, + NSEventTypeLeftMouseDragged = 6, + NSEventTypeRightMouseDragged = 7, + NSEventTypeMouseEntered = 8, + NSEventTypeMouseExited = 9, + NSEventTypeKeyDown = 10, + NSEventTypeKeyUp = 11, + NSEventTypeFlagsChanged = 12, + NSEventTypeAppKitDefined = 13, + NSEventTypeSystemDefined = 14, + NSEventTypeApplicationDefined = 15, + NSEventTypePeriodic = 16, + NSEventTypeCursorUpdate = 17, + NSEventTypeScrollWheel = 22, + NSEventTypeTabletPoint = 23, + NSEventTypeTabletProximity = 24, + NSEventTypeOtherMouseDown = 25, + NSEventTypeOtherMouseUp = 26, + NSEventTypeOtherMouseDragged = 27, + NSEventTypeGesture = 29, + NSEventTypeMagnify = 30, + NSEventTypeSwipe = 31, + NSEventTypeRotate = 18, + NSEventTypeBeginGesture = 19, + NSEventTypeEndGesture = 20, + NSEventTypeSmartMagnify = 32, + NSEventTypeQuickLook = 33, + NSEventTypePressure = 34, + NSEventTypeDirectTouch = 37, + NSEventTypeChangeMode = 38, + } +); -pub static NSLeftMouseDown: NSEventType = NSEventTypeLeftMouseDown; +extern_static!(NSLeftMouseDown: NSEventType = NSEventTypeLeftMouseDown); -pub static NSLeftMouseUp: NSEventType = NSEventTypeLeftMouseUp; +extern_static!(NSLeftMouseUp: NSEventType = NSEventTypeLeftMouseUp); -pub static NSRightMouseDown: NSEventType = NSEventTypeRightMouseDown; +extern_static!(NSRightMouseDown: NSEventType = NSEventTypeRightMouseDown); -pub static NSRightMouseUp: NSEventType = NSEventTypeRightMouseUp; +extern_static!(NSRightMouseUp: NSEventType = NSEventTypeRightMouseUp); -pub static NSMouseMoved: NSEventType = NSEventTypeMouseMoved; +extern_static!(NSMouseMoved: NSEventType = NSEventTypeMouseMoved); -pub static NSLeftMouseDragged: NSEventType = NSEventTypeLeftMouseDragged; +extern_static!(NSLeftMouseDragged: NSEventType = NSEventTypeLeftMouseDragged); -pub static NSRightMouseDragged: NSEventType = NSEventTypeRightMouseDragged; +extern_static!(NSRightMouseDragged: NSEventType = NSEventTypeRightMouseDragged); -pub static NSMouseEntered: NSEventType = NSEventTypeMouseEntered; +extern_static!(NSMouseEntered: NSEventType = NSEventTypeMouseEntered); -pub static NSMouseExited: NSEventType = NSEventTypeMouseExited; +extern_static!(NSMouseExited: NSEventType = NSEventTypeMouseExited); -pub static NSKeyDown: NSEventType = NSEventTypeKeyDown; +extern_static!(NSKeyDown: NSEventType = NSEventTypeKeyDown); -pub static NSKeyUp: NSEventType = NSEventTypeKeyUp; +extern_static!(NSKeyUp: NSEventType = NSEventTypeKeyUp); -pub static NSFlagsChanged: NSEventType = NSEventTypeFlagsChanged; +extern_static!(NSFlagsChanged: NSEventType = NSEventTypeFlagsChanged); -pub static NSAppKitDefined: NSEventType = NSEventTypeAppKitDefined; +extern_static!(NSAppKitDefined: NSEventType = NSEventTypeAppKitDefined); -pub static NSSystemDefined: NSEventType = NSEventTypeSystemDefined; +extern_static!(NSSystemDefined: NSEventType = NSEventTypeSystemDefined); -pub static NSApplicationDefined: NSEventType = NSEventTypeApplicationDefined; +extern_static!(NSApplicationDefined: NSEventType = NSEventTypeApplicationDefined); -pub static NSPeriodic: NSEventType = NSEventTypePeriodic; +extern_static!(NSPeriodic: NSEventType = NSEventTypePeriodic); -pub static NSCursorUpdate: NSEventType = NSEventTypeCursorUpdate; +extern_static!(NSCursorUpdate: NSEventType = NSEventTypeCursorUpdate); -pub static NSScrollWheel: NSEventType = NSEventTypeScrollWheel; +extern_static!(NSScrollWheel: NSEventType = NSEventTypeScrollWheel); -pub static NSTabletPoint: NSEventType = NSEventTypeTabletPoint; +extern_static!(NSTabletPoint: NSEventType = NSEventTypeTabletPoint); -pub static NSTabletProximity: NSEventType = NSEventTypeTabletProximity; +extern_static!(NSTabletProximity: NSEventType = NSEventTypeTabletProximity); -pub static NSOtherMouseDown: NSEventType = NSEventTypeOtherMouseDown; +extern_static!(NSOtherMouseDown: NSEventType = NSEventTypeOtherMouseDown); -pub static NSOtherMouseUp: NSEventType = NSEventTypeOtherMouseUp; +extern_static!(NSOtherMouseUp: NSEventType = NSEventTypeOtherMouseUp); -pub static NSOtherMouseDragged: NSEventType = NSEventTypeOtherMouseDragged; +extern_static!(NSOtherMouseDragged: NSEventType = NSEventTypeOtherMouseDragged); -pub type NSEventMask = c_ulonglong; -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; +ns_options!( + #[underlying(c_ulonglong)] + pub enum NSEventMask { + NSEventMaskLeftMouseDown = 1 << NSEventTypeLeftMouseDown, + NSEventMaskLeftMouseUp = 1 << NSEventTypeLeftMouseUp, + NSEventMaskRightMouseDown = 1 << NSEventTypeRightMouseDown, + NSEventMaskRightMouseUp = 1 << NSEventTypeRightMouseUp, + NSEventMaskMouseMoved = 1 << NSEventTypeMouseMoved, + NSEventMaskLeftMouseDragged = 1 << NSEventTypeLeftMouseDragged, + NSEventMaskRightMouseDragged = 1 << NSEventTypeRightMouseDragged, + NSEventMaskMouseEntered = 1 << NSEventTypeMouseEntered, + NSEventMaskMouseExited = 1 << NSEventTypeMouseExited, + NSEventMaskKeyDown = 1 << NSEventTypeKeyDown, + NSEventMaskKeyUp = 1 << NSEventTypeKeyUp, + NSEventMaskFlagsChanged = 1 << NSEventTypeFlagsChanged, + NSEventMaskAppKitDefined = 1 << NSEventTypeAppKitDefined, + NSEventMaskSystemDefined = 1 << NSEventTypeSystemDefined, + NSEventMaskApplicationDefined = 1 << NSEventTypeApplicationDefined, + NSEventMaskPeriodic = 1 << NSEventTypePeriodic, + NSEventMaskCursorUpdate = 1 << NSEventTypeCursorUpdate, + NSEventMaskScrollWheel = 1 << NSEventTypeScrollWheel, + NSEventMaskTabletPoint = 1 << NSEventTypeTabletPoint, + NSEventMaskTabletProximity = 1 << NSEventTypeTabletProximity, + NSEventMaskOtherMouseDown = 1 << NSEventTypeOtherMouseDown, + NSEventMaskOtherMouseUp = 1 << NSEventTypeOtherMouseUp, + NSEventMaskOtherMouseDragged = 1 << NSEventTypeOtherMouseDragged, + NSEventMaskGesture = 1 << NSEventTypeGesture, + NSEventMaskMagnify = 1 << NSEventTypeMagnify, + NSEventMaskSwipe = 1 << NSEventTypeSwipe, + NSEventMaskRotate = 1 << NSEventTypeRotate, + NSEventMaskBeginGesture = 1 << NSEventTypeBeginGesture, + NSEventMaskEndGesture = 1 << NSEventTypeEndGesture, + NSEventMaskSmartMagnify = 1 << NSEventTypeSmartMagnify, + NSEventMaskPressure = 1 << NSEventTypePressure, + NSEventMaskDirectTouch = 1 << NSEventTypeDirectTouch, + NSEventMaskChangeMode = 1 << NSEventTypeChangeMode, + NSEventMaskAny = 18446744073709551615, + } +); -pub static NSLeftMouseDownMask: NSEventMask = NSEventMaskLeftMouseDown; +extern_static!(NSLeftMouseDownMask: NSEventMask = NSEventMaskLeftMouseDown); -pub static NSLeftMouseUpMask: NSEventMask = NSEventMaskLeftMouseUp; +extern_static!(NSLeftMouseUpMask: NSEventMask = NSEventMaskLeftMouseUp); -pub static NSRightMouseDownMask: NSEventMask = NSEventMaskRightMouseDown; +extern_static!(NSRightMouseDownMask: NSEventMask = NSEventMaskRightMouseDown); -pub static NSRightMouseUpMask: NSEventMask = NSEventMaskRightMouseUp; +extern_static!(NSRightMouseUpMask: NSEventMask = NSEventMaskRightMouseUp); -pub static NSMouseMovedMask: NSEventMask = NSEventMaskMouseMoved; +extern_static!(NSMouseMovedMask: NSEventMask = NSEventMaskMouseMoved); -pub static NSLeftMouseDraggedMask: NSEventMask = NSEventMaskLeftMouseDragged; +extern_static!(NSLeftMouseDraggedMask: NSEventMask = NSEventMaskLeftMouseDragged); -pub static NSRightMouseDraggedMask: NSEventMask = NSEventMaskRightMouseDragged; +extern_static!(NSRightMouseDraggedMask: NSEventMask = NSEventMaskRightMouseDragged); -pub static NSMouseEnteredMask: NSEventMask = NSEventMaskMouseEntered; +extern_static!(NSMouseEnteredMask: NSEventMask = NSEventMaskMouseEntered); -pub static NSMouseExitedMask: NSEventMask = NSEventMaskMouseExited; +extern_static!(NSMouseExitedMask: NSEventMask = NSEventMaskMouseExited); -pub static NSKeyDownMask: NSEventMask = NSEventMaskKeyDown; +extern_static!(NSKeyDownMask: NSEventMask = NSEventMaskKeyDown); -pub static NSKeyUpMask: NSEventMask = NSEventMaskKeyUp; +extern_static!(NSKeyUpMask: NSEventMask = NSEventMaskKeyUp); -pub static NSFlagsChangedMask: NSEventMask = NSEventMaskFlagsChanged; +extern_static!(NSFlagsChangedMask: NSEventMask = NSEventMaskFlagsChanged); -pub static NSAppKitDefinedMask: NSEventMask = NSEventMaskAppKitDefined; +extern_static!(NSAppKitDefinedMask: NSEventMask = NSEventMaskAppKitDefined); -pub static NSSystemDefinedMask: NSEventMask = NSEventMaskSystemDefined; +extern_static!(NSSystemDefinedMask: NSEventMask = NSEventMaskSystemDefined); -pub static NSApplicationDefinedMask: NSEventMask = NSEventMaskApplicationDefined; +extern_static!(NSApplicationDefinedMask: NSEventMask = NSEventMaskApplicationDefined); -pub static NSPeriodicMask: NSEventMask = NSEventMaskPeriodic; +extern_static!(NSPeriodicMask: NSEventMask = NSEventMaskPeriodic); -pub static NSCursorUpdateMask: NSEventMask = NSEventMaskCursorUpdate; +extern_static!(NSCursorUpdateMask: NSEventMask = NSEventMaskCursorUpdate); -pub static NSScrollWheelMask: NSEventMask = NSEventMaskScrollWheel; +extern_static!(NSScrollWheelMask: NSEventMask = NSEventMaskScrollWheel); -pub static NSTabletPointMask: NSEventMask = NSEventMaskTabletPoint; +extern_static!(NSTabletPointMask: NSEventMask = NSEventMaskTabletPoint); -pub static NSTabletProximityMask: NSEventMask = NSEventMaskTabletProximity; +extern_static!(NSTabletProximityMask: NSEventMask = NSEventMaskTabletProximity); -pub static NSOtherMouseDownMask: NSEventMask = NSEventMaskOtherMouseDown; +extern_static!(NSOtherMouseDownMask: NSEventMask = NSEventMaskOtherMouseDown); -pub static NSOtherMouseUpMask: NSEventMask = NSEventMaskOtherMouseUp; +extern_static!(NSOtherMouseUpMask: NSEventMask = NSEventMaskOtherMouseUp); -pub static NSOtherMouseDraggedMask: NSEventMask = NSEventMaskOtherMouseDragged; +extern_static!(NSOtherMouseDraggedMask: NSEventMask = NSEventMaskOtherMouseDragged); -pub type NSEventModifierFlags = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSEventModifierFlags { + NSEventModifierFlagCapsLock = 1 << 16, + NSEventModifierFlagShift = 1 << 17, + NSEventModifierFlagControl = 1 << 18, + NSEventModifierFlagOption = 1 << 19, + NSEventModifierFlagCommand = 1 << 20, + NSEventModifierFlagNumericPad = 1 << 21, + NSEventModifierFlagHelp = 1 << 22, + NSEventModifierFlagFunction = 1 << 23, + NSEventModifierFlagDeviceIndependentFlagsMask = 0xffff0000, + } +); -pub static NSAlphaShiftKeyMask: NSEventModifierFlags = NSEventModifierFlagCapsLock; +extern_static!(NSAlphaShiftKeyMask: NSEventModifierFlags = NSEventModifierFlagCapsLock); -pub static NSShiftKeyMask: NSEventModifierFlags = NSEventModifierFlagShift; +extern_static!(NSShiftKeyMask: NSEventModifierFlags = NSEventModifierFlagShift); -pub static NSControlKeyMask: NSEventModifierFlags = NSEventModifierFlagControl; +extern_static!(NSControlKeyMask: NSEventModifierFlags = NSEventModifierFlagControl); -pub static NSAlternateKeyMask: NSEventModifierFlags = NSEventModifierFlagOption; +extern_static!(NSAlternateKeyMask: NSEventModifierFlags = NSEventModifierFlagOption); -pub static NSCommandKeyMask: NSEventModifierFlags = NSEventModifierFlagCommand; +extern_static!(NSCommandKeyMask: NSEventModifierFlags = NSEventModifierFlagCommand); -pub static NSNumericPadKeyMask: NSEventModifierFlags = NSEventModifierFlagNumericPad; +extern_static!(NSNumericPadKeyMask: NSEventModifierFlags = NSEventModifierFlagNumericPad); -pub static NSHelpKeyMask: NSEventModifierFlags = NSEventModifierFlagHelp; +extern_static!(NSHelpKeyMask: NSEventModifierFlags = NSEventModifierFlagHelp); -pub static NSFunctionKeyMask: NSEventModifierFlags = NSEventModifierFlagFunction; +extern_static!(NSFunctionKeyMask: NSEventModifierFlags = NSEventModifierFlagFunction); -pub static NSDeviceIndependentModifierFlagsMask: NSEventModifierFlags = - NSEventModifierFlagDeviceIndependentFlagsMask; +extern_static!( + NSDeviceIndependentModifierFlagsMask: NSEventModifierFlags = + NSEventModifierFlagDeviceIndependentFlagsMask +); -pub type NSPointingDeviceType = NSUInteger; -pub const NSPointingDeviceTypeUnknown: NSPointingDeviceType = 0; -pub const NSPointingDeviceTypePen: NSPointingDeviceType = 1; -pub const NSPointingDeviceTypeCursor: NSPointingDeviceType = 2; -pub const NSPointingDeviceTypeEraser: NSPointingDeviceType = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPointingDeviceType { + NSPointingDeviceTypeUnknown = 0, + NSPointingDeviceTypePen = 1, + NSPointingDeviceTypeCursor = 2, + NSPointingDeviceTypeEraser = 3, + } +); -pub static NSUnknownPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeUnknown; +extern_static!(NSUnknownPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeUnknown); -pub static NSPenPointingDevice: NSPointingDeviceType = NSPointingDeviceTypePen; +extern_static!(NSPenPointingDevice: NSPointingDeviceType = NSPointingDeviceTypePen); -pub static NSCursorPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeCursor; +extern_static!(NSCursorPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeCursor); -pub static NSEraserPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeEraser; +extern_static!(NSEraserPointingDevice: NSPointingDeviceType = NSPointingDeviceTypeEraser); -pub type NSEventButtonMask = NSUInteger; -pub const NSEventButtonMaskPenTip: NSEventButtonMask = 1; -pub const NSEventButtonMaskPenLowerSide: NSEventButtonMask = 2; -pub const NSEventButtonMaskPenUpperSide: NSEventButtonMask = 4; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSEventButtonMask { + NSEventButtonMaskPenTip = 1, + NSEventButtonMaskPenLowerSide = 2, + NSEventButtonMaskPenUpperSide = 4, + } +); -pub static NSPenTipMask: NSEventButtonMask = NSEventButtonMaskPenTip; +extern_static!(NSPenTipMask: NSEventButtonMask = NSEventButtonMaskPenTip); -pub static NSPenLowerSideMask: NSEventButtonMask = NSEventButtonMaskPenLowerSide; +extern_static!(NSPenLowerSideMask: NSEventButtonMask = NSEventButtonMaskPenLowerSide); -pub static NSPenUpperSideMask: NSEventButtonMask = NSEventButtonMaskPenUpperSide; +extern_static!(NSPenUpperSideMask: NSEventButtonMask = NSEventButtonMaskPenUpperSide); -pub type NSEventPhase = NSUInteger; -pub const NSEventPhaseNone: NSEventPhase = 0; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSEventPhase { + NSEventPhaseNone = 0, + NSEventPhaseBegan = 0x1 << 0, + NSEventPhaseStationary = 0x1 << 1, + NSEventPhaseChanged = 0x1 << 2, + NSEventPhaseEnded = 0x1 << 3, + NSEventPhaseCancelled = 0x1 << 4, + NSEventPhaseMayBegin = 0x1 << 5, + } +); -pub type NSEventGestureAxis = NSInteger; -pub const NSEventGestureAxisNone: NSEventGestureAxis = 0; -pub const NSEventGestureAxisHorizontal: NSEventGestureAxis = 1; -pub const NSEventGestureAxisVertical: NSEventGestureAxis = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSEventGestureAxis { + NSEventGestureAxisNone = 0, + NSEventGestureAxisHorizontal = 1, + NSEventGestureAxisVertical = 2, + } +); -pub type NSEventSwipeTrackingOptions = NSUInteger; -pub const NSEventSwipeTrackingLockDirection: NSEventSwipeTrackingOptions = 0x1 << 0; -pub const NSEventSwipeTrackingClampGestureAmount: NSEventSwipeTrackingOptions = 0x1 << 1; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSEventSwipeTrackingOptions { + NSEventSwipeTrackingLockDirection = 0x1 << 0, + NSEventSwipeTrackingClampGestureAmount = 0x1 << 1, + } +); -pub type NSEventSubtype = c_short; -pub const NSEventSubtypeWindowExposed: NSEventSubtype = 0; -pub const NSEventSubtypeApplicationActivated: NSEventSubtype = 1; -pub const NSEventSubtypeApplicationDeactivated: NSEventSubtype = 2; -pub const NSEventSubtypeWindowMoved: NSEventSubtype = 4; -pub const NSEventSubtypeScreenChanged: NSEventSubtype = 8; -pub const NSEventSubtypePowerOff: NSEventSubtype = 1; -pub const NSEventSubtypeMouseEvent: NSEventSubtype = 0; -pub const NSEventSubtypeTabletPoint: NSEventSubtype = 1; -pub const NSEventSubtypeTabletProximity: NSEventSubtype = 2; -pub const NSEventSubtypeTouch: NSEventSubtype = 3; +ns_enum!( + #[underlying(c_short)] + pub enum NSEventSubtype { + NSEventSubtypeWindowExposed = 0, + NSEventSubtypeApplicationActivated = 1, + NSEventSubtypeApplicationDeactivated = 2, + NSEventSubtypeWindowMoved = 4, + NSEventSubtypeScreenChanged = 8, + NSEventSubtypePowerOff = 1, + NSEventSubtypeMouseEvent = 0, + NSEventSubtypeTabletPoint = 1, + NSEventSubtypeTabletProximity = 2, + NSEventSubtypeTouch = 3, + } +); -pub static NSWindowExposedEventType: NSEventSubtype = NSEventSubtypeWindowExposed; +extern_static!(NSWindowExposedEventType: NSEventSubtype = NSEventSubtypeWindowExposed); -pub static NSApplicationActivatedEventType: NSEventSubtype = NSEventSubtypeApplicationActivated; +extern_static!( + NSApplicationActivatedEventType: NSEventSubtype = NSEventSubtypeApplicationActivated +); -pub static NSApplicationDeactivatedEventType: NSEventSubtype = NSEventSubtypeApplicationDeactivated; +extern_static!( + NSApplicationDeactivatedEventType: NSEventSubtype = NSEventSubtypeApplicationDeactivated +); -pub static NSWindowMovedEventType: NSEventSubtype = NSEventSubtypeWindowMoved; +extern_static!(NSWindowMovedEventType: NSEventSubtype = NSEventSubtypeWindowMoved); -pub static NSScreenChangedEventType: NSEventSubtype = NSEventSubtypeScreenChanged; +extern_static!(NSScreenChangedEventType: NSEventSubtype = NSEventSubtypeScreenChanged); -pub static NSAWTEventType: NSEventSubtype = 16; +extern_static!(NSAWTEventType: NSEventSubtype = 16); -pub static NSPowerOffEventType: NSEventSubtype = NSEventSubtypePowerOff; +extern_static!(NSPowerOffEventType: NSEventSubtype = NSEventSubtypePowerOff); -pub static NSMouseEventSubtype: NSEventSubtype = NSEventSubtypeMouseEvent; +extern_static!(NSMouseEventSubtype: NSEventSubtype = NSEventSubtypeMouseEvent); -pub static NSTabletPointEventSubtype: NSEventSubtype = NSEventSubtypeTabletPoint; +extern_static!(NSTabletPointEventSubtype: NSEventSubtype = NSEventSubtypeTabletPoint); -pub static NSTabletProximityEventSubtype: NSEventSubtype = NSEventSubtypeTabletProximity; +extern_static!(NSTabletProximityEventSubtype: NSEventSubtype = NSEventSubtypeTabletProximity); -pub static NSTouchEventSubtype: NSEventSubtype = NSEventSubtypeTouch; +extern_static!(NSTouchEventSubtype: NSEventSubtype = NSEventSubtypeTouch); -pub type NSPressureBehavior = NSInteger; -pub const NSPressureBehaviorUnknown: NSPressureBehavior = -1; -pub const NSPressureBehaviorPrimaryDefault: NSPressureBehavior = 0; -pub const NSPressureBehaviorPrimaryClick: NSPressureBehavior = 1; -pub const NSPressureBehaviorPrimaryGeneric: NSPressureBehavior = 2; -pub const NSPressureBehaviorPrimaryAccelerator: NSPressureBehavior = 3; -pub const NSPressureBehaviorPrimaryDeepClick: NSPressureBehavior = 5; -pub const NSPressureBehaviorPrimaryDeepDrag: NSPressureBehavior = 6; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPressureBehavior { + NSPressureBehaviorUnknown = -1, + NSPressureBehaviorPrimaryDefault = 0, + NSPressureBehaviorPrimaryClick = 1, + NSPressureBehaviorPrimaryGeneric = 2, + NSPressureBehaviorPrimaryAccelerator = 3, + NSPressureBehaviorPrimaryDeepClick = 5, + NSPressureBehaviorPrimaryDeepDrag = 6, + } +); extern_class!( #[derive(Debug)] @@ -604,75 +650,80 @@ extern_methods!( } ); -pub const NSUpArrowFunctionKey: c_uint = 0xF700; -pub const NSDownArrowFunctionKey: c_uint = 0xF701; -pub const NSLeftArrowFunctionKey: c_uint = 0xF702; -pub const NSRightArrowFunctionKey: c_uint = 0xF703; -pub const NSF1FunctionKey: c_uint = 0xF704; -pub const NSF2FunctionKey: c_uint = 0xF705; -pub const NSF3FunctionKey: c_uint = 0xF706; -pub const NSF4FunctionKey: c_uint = 0xF707; -pub const NSF5FunctionKey: c_uint = 0xF708; -pub const NSF6FunctionKey: c_uint = 0xF709; -pub const NSF7FunctionKey: c_uint = 0xF70A; -pub const NSF8FunctionKey: c_uint = 0xF70B; -pub const NSF9FunctionKey: c_uint = 0xF70C; -pub const NSF10FunctionKey: c_uint = 0xF70D; -pub const NSF11FunctionKey: c_uint = 0xF70E; -pub const NSF12FunctionKey: c_uint = 0xF70F; -pub const NSF13FunctionKey: c_uint = 0xF710; -pub const NSF14FunctionKey: c_uint = 0xF711; -pub const NSF15FunctionKey: c_uint = 0xF712; -pub const NSF16FunctionKey: c_uint = 0xF713; -pub const NSF17FunctionKey: c_uint = 0xF714; -pub const NSF18FunctionKey: c_uint = 0xF715; -pub const NSF19FunctionKey: c_uint = 0xF716; -pub const NSF20FunctionKey: c_uint = 0xF717; -pub const NSF21FunctionKey: c_uint = 0xF718; -pub const NSF22FunctionKey: c_uint = 0xF719; -pub const NSF23FunctionKey: c_uint = 0xF71A; -pub const NSF24FunctionKey: c_uint = 0xF71B; -pub const NSF25FunctionKey: c_uint = 0xF71C; -pub const NSF26FunctionKey: c_uint = 0xF71D; -pub const NSF27FunctionKey: c_uint = 0xF71E; -pub const NSF28FunctionKey: c_uint = 0xF71F; -pub const NSF29FunctionKey: c_uint = 0xF720; -pub const NSF30FunctionKey: c_uint = 0xF721; -pub const NSF31FunctionKey: c_uint = 0xF722; -pub const NSF32FunctionKey: c_uint = 0xF723; -pub const NSF33FunctionKey: c_uint = 0xF724; -pub const NSF34FunctionKey: c_uint = 0xF725; -pub const NSF35FunctionKey: c_uint = 0xF726; -pub const NSInsertFunctionKey: c_uint = 0xF727; -pub const NSDeleteFunctionKey: c_uint = 0xF728; -pub const NSHomeFunctionKey: c_uint = 0xF729; -pub const NSBeginFunctionKey: c_uint = 0xF72A; -pub const NSEndFunctionKey: c_uint = 0xF72B; -pub const NSPageUpFunctionKey: c_uint = 0xF72C; -pub const NSPageDownFunctionKey: c_uint = 0xF72D; -pub const NSPrintScreenFunctionKey: c_uint = 0xF72E; -pub const NSScrollLockFunctionKey: c_uint = 0xF72F; -pub const NSPauseFunctionKey: c_uint = 0xF730; -pub const NSSysReqFunctionKey: c_uint = 0xF731; -pub const NSBreakFunctionKey: c_uint = 0xF732; -pub const NSResetFunctionKey: c_uint = 0xF733; -pub const NSStopFunctionKey: c_uint = 0xF734; -pub const NSMenuFunctionKey: c_uint = 0xF735; -pub const NSUserFunctionKey: c_uint = 0xF736; -pub const NSSystemFunctionKey: c_uint = 0xF737; -pub const NSPrintFunctionKey: c_uint = 0xF738; -pub const NSClearLineFunctionKey: c_uint = 0xF739; -pub const NSClearDisplayFunctionKey: c_uint = 0xF73A; -pub const NSInsertLineFunctionKey: c_uint = 0xF73B; -pub const NSDeleteLineFunctionKey: c_uint = 0xF73C; -pub const NSInsertCharFunctionKey: c_uint = 0xF73D; -pub const NSDeleteCharFunctionKey: c_uint = 0xF73E; -pub const NSPrevFunctionKey: c_uint = 0xF73F; -pub const NSNextFunctionKey: c_uint = 0xF740; -pub const NSSelectFunctionKey: c_uint = 0xF741; -pub const NSExecuteFunctionKey: c_uint = 0xF742; -pub const NSUndoFunctionKey: c_uint = 0xF743; -pub const NSRedoFunctionKey: c_uint = 0xF744; -pub const NSFindFunctionKey: c_uint = 0xF745; -pub const NSHelpFunctionKey: c_uint = 0xF746; -pub const NSModeSwitchFunctionKey: c_uint = 0xF747; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSUpArrowFunctionKey = 0xF700, + NSDownArrowFunctionKey = 0xF701, + NSLeftArrowFunctionKey = 0xF702, + NSRightArrowFunctionKey = 0xF703, + NSF1FunctionKey = 0xF704, + NSF2FunctionKey = 0xF705, + NSF3FunctionKey = 0xF706, + NSF4FunctionKey = 0xF707, + NSF5FunctionKey = 0xF708, + NSF6FunctionKey = 0xF709, + NSF7FunctionKey = 0xF70A, + NSF8FunctionKey = 0xF70B, + NSF9FunctionKey = 0xF70C, + NSF10FunctionKey = 0xF70D, + NSF11FunctionKey = 0xF70E, + NSF12FunctionKey = 0xF70F, + NSF13FunctionKey = 0xF710, + NSF14FunctionKey = 0xF711, + NSF15FunctionKey = 0xF712, + NSF16FunctionKey = 0xF713, + NSF17FunctionKey = 0xF714, + NSF18FunctionKey = 0xF715, + NSF19FunctionKey = 0xF716, + NSF20FunctionKey = 0xF717, + NSF21FunctionKey = 0xF718, + NSF22FunctionKey = 0xF719, + NSF23FunctionKey = 0xF71A, + NSF24FunctionKey = 0xF71B, + NSF25FunctionKey = 0xF71C, + NSF26FunctionKey = 0xF71D, + NSF27FunctionKey = 0xF71E, + NSF28FunctionKey = 0xF71F, + NSF29FunctionKey = 0xF720, + NSF30FunctionKey = 0xF721, + NSF31FunctionKey = 0xF722, + NSF32FunctionKey = 0xF723, + NSF33FunctionKey = 0xF724, + NSF34FunctionKey = 0xF725, + NSF35FunctionKey = 0xF726, + NSInsertFunctionKey = 0xF727, + NSDeleteFunctionKey = 0xF728, + NSHomeFunctionKey = 0xF729, + NSBeginFunctionKey = 0xF72A, + NSEndFunctionKey = 0xF72B, + NSPageUpFunctionKey = 0xF72C, + NSPageDownFunctionKey = 0xF72D, + NSPrintScreenFunctionKey = 0xF72E, + NSScrollLockFunctionKey = 0xF72F, + NSPauseFunctionKey = 0xF730, + NSSysReqFunctionKey = 0xF731, + NSBreakFunctionKey = 0xF732, + NSResetFunctionKey = 0xF733, + NSStopFunctionKey = 0xF734, + NSMenuFunctionKey = 0xF735, + NSUserFunctionKey = 0xF736, + NSSystemFunctionKey = 0xF737, + NSPrintFunctionKey = 0xF738, + NSClearLineFunctionKey = 0xF739, + NSClearDisplayFunctionKey = 0xF73A, + NSInsertLineFunctionKey = 0xF73B, + NSDeleteLineFunctionKey = 0xF73C, + NSInsertCharFunctionKey = 0xF73D, + NSDeleteCharFunctionKey = 0xF73E, + NSPrevFunctionKey = 0xF73F, + NSNextFunctionKey = 0xF740, + NSSelectFunctionKey = 0xF741, + NSExecuteFunctionKey = 0xF742, + NSUndoFunctionKey = 0xF743, + NSRedoFunctionKey = 0xF744, + NSFindFunctionKey = 0xF745, + NSHelpFunctionKey = 0xF746, + NSModeSwitchFunctionKey = 0xF747, + } +); diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 5cb2fbabd..782b53a80 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -5,9 +5,7 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSFontIdentityMatrix: NonNull; -} +extern_static!(NSFontIdentityMatrix: NonNull); extern_class!( #[derive(Debug)] @@ -218,27 +216,36 @@ extern_methods!( } ); -extern "C" { - pub static NSAntialiasThresholdChangedNotification: &'static NSNotificationName; -} +extern_static!(NSAntialiasThresholdChangedNotification: &'static NSNotificationName); -extern "C" { - pub static NSFontSetChangedNotification: &'static NSNotificationName; -} +extern_static!(NSFontSetChangedNotification: &'static NSNotificationName); pub type NSGlyph = c_uint; -pub const NSControlGlyph: c_uint = 0x00FFFFFF; -pub const NSNullGlyph: c_uint = 0x0; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSControlGlyph = 0x00FFFFFF, + NSNullGlyph = 0x0, + } +); -pub type NSFontRenderingMode = NSUInteger; -pub const NSFontDefaultRenderingMode: NSFontRenderingMode = 0; -pub const NSFontAntialiasedRenderingMode: NSFontRenderingMode = 1; -pub const NSFontIntegerAdvancementsRenderingMode: NSFontRenderingMode = 2; -pub const NSFontAntialiasedIntegerAdvancementsRenderingMode: NSFontRenderingMode = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSFontRenderingMode { + NSFontDefaultRenderingMode = 0, + NSFontAntialiasedRenderingMode = 1, + NSFontIntegerAdvancementsRenderingMode = 2, + NSFontAntialiasedIntegerAdvancementsRenderingMode = 3, + } +); -pub type NSMultibyteGlyphPacking = NSUInteger; -pub const NSNativeShortGlyphPacking: NSMultibyteGlyphPacking = 5; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSMultibyteGlyphPacking { + NSNativeShortGlyphPacking = 5, + } +); extern_methods!( /// NSFont_Deprecated diff --git a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs index 38d54ba82..322287d41 100644 --- a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs +++ b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs @@ -5,8 +5,12 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSFontAssetRequestOptions = NSUInteger; -pub const NSFontAssetRequestOptionUsesStandardUI: NSFontAssetRequestOptions = 1 << 0; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFontAssetRequestOptions { + NSFontAssetRequestOptionUsesStandardUI = 1 << 0, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSFontCollection.rs b/crates/icrate/src/generated/AppKit/NSFontCollection.rs index 282fa6cf1..62b4d459f 100644 --- a/crates/icrate/src/generated/AppKit/NSFontCollection.rs +++ b/crates/icrate/src/generated/AppKit/NSFontCollection.rs @@ -5,26 +5,26 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSFontCollectionVisibility = NSUInteger; -pub const NSFontCollectionVisibilityProcess: NSFontCollectionVisibility = 1 << 0; -pub const NSFontCollectionVisibilityUser: NSFontCollectionVisibility = 1 << 1; -pub const NSFontCollectionVisibilityComputer: NSFontCollectionVisibility = 1 << 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFontCollectionVisibility { + NSFontCollectionVisibilityProcess = 1 << 0, + NSFontCollectionVisibilityUser = 1 << 1, + NSFontCollectionVisibilityComputer = 1 << 2, + } +); pub type NSFontCollectionMatchingOptionKey = NSString; -extern "C" { - pub static NSFontCollectionIncludeDisabledFontsOption: - &'static NSFontCollectionMatchingOptionKey; -} +extern_static!( + NSFontCollectionIncludeDisabledFontsOption: &'static NSFontCollectionMatchingOptionKey +); -extern "C" { - pub static NSFontCollectionRemoveDuplicatesOption: &'static NSFontCollectionMatchingOptionKey; -} +extern_static!(NSFontCollectionRemoveDuplicatesOption: &'static NSFontCollectionMatchingOptionKey); -extern "C" { - pub static NSFontCollectionDisallowAutoActivationOption: - &'static NSFontCollectionMatchingOptionKey; -} +extern_static!( + NSFontCollectionDisallowAutoActivationOption: &'static NSFontCollectionMatchingOptionKey +); pub type NSFontCollectionName = NSString; @@ -178,54 +178,30 @@ extern_methods!( } ); -extern "C" { - pub static NSFontCollectionDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSFontCollectionDidChangeNotification: &'static NSNotificationName); pub type NSFontCollectionUserInfoKey = NSString; -extern "C" { - pub static NSFontCollectionActionKey: &'static NSFontCollectionUserInfoKey; -} +extern_static!(NSFontCollectionActionKey: &'static NSFontCollectionUserInfoKey); -extern "C" { - pub static NSFontCollectionNameKey: &'static NSFontCollectionUserInfoKey; -} +extern_static!(NSFontCollectionNameKey: &'static NSFontCollectionUserInfoKey); -extern "C" { - pub static NSFontCollectionOldNameKey: &'static NSFontCollectionUserInfoKey; -} +extern_static!(NSFontCollectionOldNameKey: &'static NSFontCollectionUserInfoKey); -extern "C" { - pub static NSFontCollectionVisibilityKey: &'static NSFontCollectionUserInfoKey; -} +extern_static!(NSFontCollectionVisibilityKey: &'static NSFontCollectionUserInfoKey); pub type NSFontCollectionActionTypeKey = NSString; -extern "C" { - pub static NSFontCollectionWasShown: &'static NSFontCollectionActionTypeKey; -} +extern_static!(NSFontCollectionWasShown: &'static NSFontCollectionActionTypeKey); -extern "C" { - pub static NSFontCollectionWasHidden: &'static NSFontCollectionActionTypeKey; -} +extern_static!(NSFontCollectionWasHidden: &'static NSFontCollectionActionTypeKey); -extern "C" { - pub static NSFontCollectionWasRenamed: &'static NSFontCollectionActionTypeKey; -} +extern_static!(NSFontCollectionWasRenamed: &'static NSFontCollectionActionTypeKey); -extern "C" { - pub static NSFontCollectionAllFonts: &'static NSFontCollectionName; -} +extern_static!(NSFontCollectionAllFonts: &'static NSFontCollectionName); -extern "C" { - pub static NSFontCollectionUser: &'static NSFontCollectionName; -} +extern_static!(NSFontCollectionUser: &'static NSFontCollectionName); -extern "C" { - pub static NSFontCollectionFavorites: &'static NSFontCollectionName; -} +extern_static!(NSFontCollectionFavorites: &'static NSFontCollectionName); -extern "C" { - pub static NSFontCollectionRecentlyUsed: &'static NSFontCollectionName; -} +extern_static!(NSFontCollectionRecentlyUsed: &'static NSFontCollectionName); diff --git a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs index 2b8892ec4..877cda83c 100644 --- a/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs +++ b/crates/icrate/src/generated/AppKit/NSFontDescriptor.rs @@ -7,30 +7,33 @@ use crate::Foundation::*; pub type NSFontSymbolicTraits = u32; -pub type NSFontDescriptorSymbolicTraits = u32; -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; +ns_options!( + #[underlying(u32)] + pub enum NSFontDescriptorSymbolicTraits { + NSFontDescriptorTraitItalic = 1 << 0, + NSFontDescriptorTraitBold = 1 << 1, + NSFontDescriptorTraitExpanded = 1 << 5, + NSFontDescriptorTraitCondensed = 1 << 6, + NSFontDescriptorTraitMonoSpace = 1 << 10, + NSFontDescriptorTraitVertical = 1 << 11, + NSFontDescriptorTraitUIOptimized = 1 << 12, + NSFontDescriptorTraitTightLeading = 1 << 15, + NSFontDescriptorTraitLooseLeading = 1 << 16, + NSFontDescriptorTraitEmphasized = NSFontDescriptorTraitBold, + NSFontDescriptorClassMask = 0xF0000000, + NSFontDescriptorClassUnknown = 0 << 28, + NSFontDescriptorClassOldStyleSerifs = 1 << 28, + NSFontDescriptorClassTransitionalSerifs = 2 << 28, + NSFontDescriptorClassModernSerifs = 3 << 28, + NSFontDescriptorClassClarendonSerifs = 4 << 28, + NSFontDescriptorClassSlabSerifs = 5 << 28, + NSFontDescriptorClassFreeformSerifs = 7 << 28, + NSFontDescriptorClassSansSerif = 8 << 28, + NSFontDescriptorClassOrnamentals = 9 << 28, + NSFontDescriptorClassScripts = 10 << 28, + NSFontDescriptorClassSymbolic = 12 << 28, + } +); pub type NSFontDescriptorAttributeName = NSString; @@ -164,221 +167,140 @@ extern_methods!( } ); -extern "C" { - pub static NSFontFamilyAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontFamilyAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontNameAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontNameAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontFaceAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontFaceAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontSizeAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontSizeAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontVisibleNameAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontVisibleNameAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontMatrixAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontMatrixAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontVariationAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontVariationAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontCharacterSetAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontCharacterSetAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontCascadeListAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontCascadeListAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontTraitsAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontTraitsAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontFixedAdvanceAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontFixedAdvanceAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontFeatureSettingsAttribute: &'static NSFontDescriptorAttributeName; -} +extern_static!(NSFontFeatureSettingsAttribute: &'static NSFontDescriptorAttributeName); -extern "C" { - pub static NSFontSymbolicTrait: &'static NSFontDescriptorTraitKey; -} +extern_static!(NSFontSymbolicTrait: &'static NSFontDescriptorTraitKey); -extern "C" { - pub static NSFontWeightTrait: &'static NSFontDescriptorTraitKey; -} +extern_static!(NSFontWeightTrait: &'static NSFontDescriptorTraitKey); -extern "C" { - pub static NSFontWidthTrait: &'static NSFontDescriptorTraitKey; -} +extern_static!(NSFontWidthTrait: &'static NSFontDescriptorTraitKey); -extern "C" { - pub static NSFontSlantTrait: &'static NSFontDescriptorTraitKey; -} +extern_static!(NSFontSlantTrait: &'static NSFontDescriptorTraitKey); -extern "C" { - pub static NSFontVariationAxisIdentifierKey: &'static NSFontDescriptorVariationKey; -} +extern_static!(NSFontVariationAxisIdentifierKey: &'static NSFontDescriptorVariationKey); -extern "C" { - pub static NSFontVariationAxisMinimumValueKey: &'static NSFontDescriptorVariationKey; -} +extern_static!(NSFontVariationAxisMinimumValueKey: &'static NSFontDescriptorVariationKey); -extern "C" { - pub static NSFontVariationAxisMaximumValueKey: &'static NSFontDescriptorVariationKey; -} +extern_static!(NSFontVariationAxisMaximumValueKey: &'static NSFontDescriptorVariationKey); -extern "C" { - pub static NSFontVariationAxisDefaultValueKey: &'static NSFontDescriptorVariationKey; -} +extern_static!(NSFontVariationAxisDefaultValueKey: &'static NSFontDescriptorVariationKey); -extern "C" { - pub static NSFontVariationAxisNameKey: &'static NSFontDescriptorVariationKey; -} +extern_static!(NSFontVariationAxisNameKey: &'static NSFontDescriptorVariationKey); -extern "C" { - pub static NSFontFeatureTypeIdentifierKey: &'static NSFontDescriptorFeatureKey; -} +extern_static!(NSFontFeatureTypeIdentifierKey: &'static NSFontDescriptorFeatureKey); -extern "C" { - pub static NSFontFeatureSelectorIdentifierKey: &'static NSFontDescriptorFeatureKey; -} +extern_static!(NSFontFeatureSelectorIdentifierKey: &'static NSFontDescriptorFeatureKey); -extern "C" { - pub static NSFontWeightUltraLight: NSFontWeight; -} +extern_static!(NSFontWeightUltraLight: NSFontWeight); -extern "C" { - pub static NSFontWeightThin: NSFontWeight; -} +extern_static!(NSFontWeightThin: NSFontWeight); -extern "C" { - pub static NSFontWeightLight: NSFontWeight; -} +extern_static!(NSFontWeightLight: NSFontWeight); -extern "C" { - pub static NSFontWeightRegular: NSFontWeight; -} +extern_static!(NSFontWeightRegular: NSFontWeight); -extern "C" { - pub static NSFontWeightMedium: NSFontWeight; -} +extern_static!(NSFontWeightMedium: NSFontWeight); -extern "C" { - pub static NSFontWeightSemibold: NSFontWeight; -} +extern_static!(NSFontWeightSemibold: NSFontWeight); -extern "C" { - pub static NSFontWeightBold: NSFontWeight; -} +extern_static!(NSFontWeightBold: NSFontWeight); -extern "C" { - pub static NSFontWeightHeavy: NSFontWeight; -} +extern_static!(NSFontWeightHeavy: NSFontWeight); -extern "C" { - pub static NSFontWeightBlack: NSFontWeight; -} +extern_static!(NSFontWeightBlack: NSFontWeight); -extern "C" { - pub static NSFontDescriptorSystemDesignDefault: &'static NSFontDescriptorSystemDesign; -} +extern_static!(NSFontDescriptorSystemDesignDefault: &'static NSFontDescriptorSystemDesign); -extern "C" { - pub static NSFontDescriptorSystemDesignSerif: &'static NSFontDescriptorSystemDesign; -} +extern_static!(NSFontDescriptorSystemDesignSerif: &'static NSFontDescriptorSystemDesign); -extern "C" { - pub static NSFontDescriptorSystemDesignMonospaced: &'static NSFontDescriptorSystemDesign; -} +extern_static!(NSFontDescriptorSystemDesignMonospaced: &'static NSFontDescriptorSystemDesign); -extern "C" { - pub static NSFontDescriptorSystemDesignRounded: &'static NSFontDescriptorSystemDesign; -} +extern_static!(NSFontDescriptorSystemDesignRounded: &'static NSFontDescriptorSystemDesign); -extern "C" { - pub static NSFontTextStyleLargeTitle: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleLargeTitle: &'static NSFontTextStyle); -extern "C" { - pub static NSFontTextStyleTitle1: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleTitle1: &'static NSFontTextStyle); -extern "C" { - pub static NSFontTextStyleTitle2: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleTitle2: &'static NSFontTextStyle); -extern "C" { - pub static NSFontTextStyleTitle3: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleTitle3: &'static NSFontTextStyle); -extern "C" { - pub static NSFontTextStyleHeadline: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleHeadline: &'static NSFontTextStyle); -extern "C" { - pub static NSFontTextStyleSubheadline: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleSubheadline: &'static NSFontTextStyle); -extern "C" { - pub static NSFontTextStyleBody: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleBody: &'static NSFontTextStyle); -extern "C" { - pub static NSFontTextStyleCallout: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleCallout: &'static NSFontTextStyle); -extern "C" { - pub static NSFontTextStyleFootnote: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleFootnote: &'static NSFontTextStyle); -extern "C" { - pub static NSFontTextStyleCaption1: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleCaption1: &'static NSFontTextStyle); -extern "C" { - pub static NSFontTextStyleCaption2: &'static NSFontTextStyle; -} +extern_static!(NSFontTextStyleCaption2: &'static NSFontTextStyle); pub type NSFontFamilyClass = u32; -pub const NSFontUnknownClass: c_int = 0 << 28; -pub const NSFontOldStyleSerifsClass: c_int = 1 << 28; -pub const NSFontTransitionalSerifsClass: c_int = 2 << 28; -pub const NSFontModernSerifsClass: c_int = 3 << 28; -pub const NSFontClarendonSerifsClass: c_int = 4 << 28; -pub const NSFontSlabSerifsClass: c_int = 5 << 28; -pub const NSFontFreeformSerifsClass: c_int = 7 << 28; -pub const NSFontSansSerifClass: c_int = 8 << 28; -pub const NSFontOrnamentalsClass: c_int = 9 << 28; -pub const NSFontScriptsClass: c_int = 10 << 28; -pub const NSFontSymbolicClass: c_int = 12 << 28; - -pub const NSFontFamilyClassMask: c_uint = 0xF0000000; - -pub const NSFontItalicTrait: c_uint = 1 << 0; -pub const NSFontBoldTrait: c_uint = 1 << 1; -pub const NSFontExpandedTrait: c_uint = 1 << 5; -pub const NSFontCondensedTrait: c_uint = 1 << 6; -pub const NSFontMonoSpaceTrait: c_uint = 1 << 10; -pub const NSFontVerticalTrait: c_uint = 1 << 11; -pub const NSFontUIOptimizedTrait: c_uint = 1 << 12; - -extern "C" { - pub static NSFontColorAttribute: &'static NSString; -} +extern_enum!( + #[underlying(c_int)] + pub enum { + NSFontUnknownClass = 0<<28, + NSFontOldStyleSerifsClass = 1<<28, + NSFontTransitionalSerifsClass = 2<<28, + NSFontModernSerifsClass = 3<<28, + NSFontClarendonSerifsClass = 4<<28, + NSFontSlabSerifsClass = 5<<28, + NSFontFreeformSerifsClass = 7<<28, + NSFontSansSerifClass = 8<<28, + NSFontOrnamentalsClass = 9<<28, + NSFontScriptsClass = 10<<28, + NSFontSymbolicClass = 12<<28, + } +); + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSFontFamilyClassMask = 0xF0000000, + } +); + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSFontItalicTrait = 1<<0, + NSFontBoldTrait = 1<<1, + NSFontExpandedTrait = 1<<5, + NSFontCondensedTrait = 1<<6, + NSFontMonoSpaceTrait = 1<<10, + NSFontVerticalTrait = 1<<11, + NSFontUIOptimizedTrait = 1<<12, + } +); + +extern_static!(NSFontColorAttribute: &'static NSString); extern_methods!( /// NSFontDescriptor_TextStyles diff --git a/crates/icrate/src/generated/AppKit/NSFontManager.rs b/crates/icrate/src/generated/AppKit/NSFontManager.rs index ef243d386..a6b48746b 100644 --- a/crates/icrate/src/generated/AppKit/NSFontManager.rs +++ b/crates/icrate/src/generated/AppKit/NSFontManager.rs @@ -5,32 +5,44 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSFontTraitMask = NSUInteger; -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 << 0; - -pub type NSFontAction = NSUInteger; -pub const NSNoFontChangeAction: NSFontAction = 0; -pub const NSViaPanelFontAction: NSFontAction = 1; -pub const NSAddTraitFontAction: NSFontAction = 2; -pub const NSSizeUpFontAction: NSFontAction = 3; -pub const NSSizeDownFontAction: NSFontAction = 4; -pub const NSHeavierFontAction: NSFontAction = 5; -pub const NSLighterFontAction: NSFontAction = 6; -pub const NSRemoveTraitFontAction: NSFontAction = 7; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFontTraitMask { + NSItalicFontMask = 0x00000001, + NSBoldFontMask = 0x00000002, + NSUnboldFontMask = 0x00000004, + NSNonStandardCharacterSetFontMask = 0x00000008, + NSNarrowFontMask = 0x00000010, + NSExpandedFontMask = 0x00000020, + NSCondensedFontMask = 0x00000040, + NSSmallCapsFontMask = 0x00000080, + NSPosterFontMask = 0x00000100, + NSCompressedFontMask = 0x00000200, + NSFixedPitchFontMask = 0x00000400, + NSUnitalicFontMask = 0x01000000, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFontCollectionOptions { + NSFontCollectionApplicationOnlyMask = 1 << 0, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSFontAction { + NSNoFontChangeAction = 0, + NSViaPanelFontAction = 1, + NSAddTraitFontAction = 2, + NSSizeUpFontAction = 3, + NSSizeDownFontAction = 4, + NSHeavierFontAction = 5, + NSLighterFontAction = 6, + NSRemoveTraitFontAction = 7, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index dadc73d6c..1debce2df 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -5,18 +5,22 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSFontPanelModeMask = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFontPanelModeMask { + NSFontPanelModeMaskFace = 1 << 0, + NSFontPanelModeMaskSize = 1 << 1, + NSFontPanelModeMaskCollection = 1 << 2, + NSFontPanelModeMaskUnderlineEffect = 1 << 8, + NSFontPanelModeMaskStrikethroughEffect = 1 << 9, + NSFontPanelModeMaskTextColorEffect = 1 << 10, + NSFontPanelModeMaskDocumentColorEffect = 1 << 11, + NSFontPanelModeMaskShadowEffect = 1 << 12, + NSFontPanelModeMaskAllEffects = 0xFFF00, + NSFontPanelModesMaskStandardModes = 0xFFFF, + NSFontPanelModesMaskAllModes = 0xFFFFFFFF, + } +); pub type NSFontChanging = NSObject; @@ -75,22 +79,32 @@ extern_methods!( } ); -pub const NSFontPanelFaceModeMask: c_uint = 1 << 0; -pub const NSFontPanelSizeModeMask: c_uint = 1 << 1; -pub const NSFontPanelCollectionModeMask: c_uint = 1 << 2; -pub const NSFontPanelUnderlineEffectModeMask: c_uint = 1 << 8; -pub const NSFontPanelStrikethroughEffectModeMask: c_uint = 1 << 9; -pub const NSFontPanelTextColorEffectModeMask: c_uint = 1 << 10; -pub const NSFontPanelDocumentColorEffectModeMask: c_uint = 1 << 11; -pub const NSFontPanelShadowEffectModeMask: c_uint = 1 << 12; -pub const NSFontPanelAllEffectsModeMask: c_uint = 0xFFF00; -pub const NSFontPanelStandardModesMask: c_uint = 0xFFFF; -pub const NSFontPanelAllModesMask: c_uint = 0xFFFFFFFF; - -pub const NSFPPreviewButton: c_uint = 131; -pub const NSFPRevertButton: c_uint = 130; -pub const NSFPSetButton: c_uint = 132; -pub const NSFPPreviewField: c_uint = 128; -pub const NSFPSizeField: c_uint = 129; -pub const NSFPSizeTitle: c_uint = 133; -pub const NSFPCurrentField: c_uint = 134; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSFontPanelFaceModeMask = 1<<0, + NSFontPanelSizeModeMask = 1<<1, + NSFontPanelCollectionModeMask = 1<<2, + NSFontPanelUnderlineEffectModeMask = 1<<8, + NSFontPanelStrikethroughEffectModeMask = 1<<9, + NSFontPanelTextColorEffectModeMask = 1<<10, + NSFontPanelDocumentColorEffectModeMask = 1<<11, + NSFontPanelShadowEffectModeMask = 1<<12, + NSFontPanelAllEffectsModeMask = 0xFFF00, + NSFontPanelStandardModesMask = 0xFFFF, + NSFontPanelAllModesMask = 0xFFFFFFFF, + } +); + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSFPPreviewButton = 131, + NSFPRevertButton = 130, + NSFPSetButton = 132, + NSFPPreviewField = 128, + NSFPSizeField = 129, + NSFPSizeTitle = 133, + NSFPCurrentField = 134, + } +); diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index 569985f66..50ea4de39 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -5,15 +5,18 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSGestureRecognizerState = NSInteger; -pub const NSGestureRecognizerStatePossible: NSGestureRecognizerState = 0; -pub const NSGestureRecognizerStateBegan: NSGestureRecognizerState = 1; -pub const NSGestureRecognizerStateChanged: NSGestureRecognizerState = 2; -pub const NSGestureRecognizerStateEnded: NSGestureRecognizerState = 3; -pub const NSGestureRecognizerStateCancelled: NSGestureRecognizerState = 4; -pub const NSGestureRecognizerStateFailed: NSGestureRecognizerState = 5; -pub const NSGestureRecognizerStateRecognized: NSGestureRecognizerState = - NSGestureRecognizerStateEnded; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSGestureRecognizerState { + NSGestureRecognizerStatePossible = 0, + NSGestureRecognizerStateBegan = 1, + NSGestureRecognizerStateChanged = 2, + NSGestureRecognizerStateEnded = 3, + NSGestureRecognizerStateCancelled = 4, + NSGestureRecognizerStateFailed = 5, + NSGestureRecognizerStateRecognized = NSGestureRecognizerStateEnded, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index 61f1e2e85..3f7a86972 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs @@ -5,9 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub const NSShowControlGlyphs: c_uint = 1 << 0; -pub const NSShowInvisibleGlyphs: c_uint = 1 << 1; -pub const NSWantsBidiLevels: c_uint = 1 << 2; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSShowControlGlyphs = 1<<0, + NSShowInvisibleGlyphs = 1<<1, + NSWantsBidiLevels = 1<<2, + } +); pub type NSGlyphStorage = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs index 489e41530..b2754505c 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs @@ -31,13 +31,17 @@ extern_methods!( } ); -pub type NSCharacterCollection = NSUInteger; -pub const NSIdentityMappingCharacterCollection: NSCharacterCollection = 0; -pub const NSAdobeCNS1CharacterCollection: NSCharacterCollection = 1; -pub const NSAdobeGB1CharacterCollection: NSCharacterCollection = 2; -pub const NSAdobeJapan1CharacterCollection: NSCharacterCollection = 3; -pub const NSAdobeJapan2CharacterCollection: NSCharacterCollection = 4; -pub const NSAdobeKorea1CharacterCollection: NSCharacterCollection = 5; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSCharacterCollection { + NSIdentityMappingCharacterCollection = 0, + NSAdobeCNS1CharacterCollection = 1, + NSAdobeGB1CharacterCollection = 2, + NSAdobeJapan1CharacterCollection = 3, + NSAdobeJapan2CharacterCollection = 4, + NSAdobeKorea1CharacterCollection = 5, + } +); extern_methods!( /// NSGlyphInfo_Deprecated diff --git a/crates/icrate/src/generated/AppKit/NSGradient.rs b/crates/icrate/src/generated/AppKit/NSGradient.rs index 1a083c9c6..9276f0caa 100644 --- a/crates/icrate/src/generated/AppKit/NSGradient.rs +++ b/crates/icrate/src/generated/AppKit/NSGradient.rs @@ -5,9 +5,13 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSGradientDrawingOptions = NSUInteger; -pub const NSGradientDrawsBeforeStartingLocation: NSGradientDrawingOptions = 1 << 0; -pub const NSGradientDrawsAfterEndingLocation: NSGradientDrawingOptions = 1 << 1; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSGradientDrawingOptions { + NSGradientDrawsBeforeStartingLocation = 1 << 0, + NSGradientDrawsAfterEndingLocation = 1 << 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs index d2708bcdb..e4b2d4238 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphics.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphics.rs @@ -5,217 +5,219 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSCompositingOperation = NSUInteger; -pub const NSCompositingOperationClear: NSCompositingOperation = 0; -pub const NSCompositingOperationCopy: NSCompositingOperation = 1; -pub const NSCompositingOperationSourceOver: NSCompositingOperation = 2; -pub const NSCompositingOperationSourceIn: NSCompositingOperation = 3; -pub const NSCompositingOperationSourceOut: NSCompositingOperation = 4; -pub const NSCompositingOperationSourceAtop: NSCompositingOperation = 5; -pub const NSCompositingOperationDestinationOver: NSCompositingOperation = 6; -pub const NSCompositingOperationDestinationIn: NSCompositingOperation = 7; -pub const NSCompositingOperationDestinationOut: NSCompositingOperation = 8; -pub const NSCompositingOperationDestinationAtop: NSCompositingOperation = 9; -pub const NSCompositingOperationXOR: NSCompositingOperation = 10; -pub const NSCompositingOperationPlusDarker: NSCompositingOperation = 11; -pub const NSCompositingOperationHighlight: NSCompositingOperation = 12; -pub const NSCompositingOperationPlusLighter: NSCompositingOperation = 13; -pub const NSCompositingOperationMultiply: NSCompositingOperation = 14; -pub const NSCompositingOperationScreen: NSCompositingOperation = 15; -pub const NSCompositingOperationOverlay: NSCompositingOperation = 16; -pub const NSCompositingOperationDarken: NSCompositingOperation = 17; -pub const NSCompositingOperationLighten: NSCompositingOperation = 18; -pub const NSCompositingOperationColorDodge: NSCompositingOperation = 19; -pub const NSCompositingOperationColorBurn: NSCompositingOperation = 20; -pub const NSCompositingOperationSoftLight: NSCompositingOperation = 21; -pub const NSCompositingOperationHardLight: NSCompositingOperation = 22; -pub const NSCompositingOperationDifference: NSCompositingOperation = 23; -pub const NSCompositingOperationExclusion: NSCompositingOperation = 24; -pub const NSCompositingOperationHue: NSCompositingOperation = 25; -pub const NSCompositingOperationSaturation: NSCompositingOperation = 26; -pub const NSCompositingOperationColor: NSCompositingOperation = 27; -pub const NSCompositingOperationLuminosity: NSCompositingOperation = 28; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSCompositingOperation { + NSCompositingOperationClear = 0, + NSCompositingOperationCopy = 1, + NSCompositingOperationSourceOver = 2, + NSCompositingOperationSourceIn = 3, + NSCompositingOperationSourceOut = 4, + NSCompositingOperationSourceAtop = 5, + NSCompositingOperationDestinationOver = 6, + NSCompositingOperationDestinationIn = 7, + NSCompositingOperationDestinationOut = 8, + NSCompositingOperationDestinationAtop = 9, + NSCompositingOperationXOR = 10, + NSCompositingOperationPlusDarker = 11, + NSCompositingOperationHighlight = 12, + NSCompositingOperationPlusLighter = 13, + NSCompositingOperationMultiply = 14, + NSCompositingOperationScreen = 15, + NSCompositingOperationOverlay = 16, + NSCompositingOperationDarken = 17, + NSCompositingOperationLighten = 18, + NSCompositingOperationColorDodge = 19, + NSCompositingOperationColorBurn = 20, + NSCompositingOperationSoftLight = 21, + NSCompositingOperationHardLight = 22, + NSCompositingOperationDifference = 23, + NSCompositingOperationExclusion = 24, + NSCompositingOperationHue = 25, + NSCompositingOperationSaturation = 26, + NSCompositingOperationColor = 27, + NSCompositingOperationLuminosity = 28, + } +); -pub static NSCompositeClear: NSCompositingOperation = NSCompositingOperationClear; +extern_static!(NSCompositeClear: NSCompositingOperation = NSCompositingOperationClear); -pub static NSCompositeCopy: NSCompositingOperation = NSCompositingOperationCopy; +extern_static!(NSCompositeCopy: NSCompositingOperation = NSCompositingOperationCopy); -pub static NSCompositeSourceOver: NSCompositingOperation = NSCompositingOperationSourceOver; +extern_static!(NSCompositeSourceOver: NSCompositingOperation = NSCompositingOperationSourceOver); + +extern_static!(NSCompositeSourceIn: NSCompositingOperation = NSCompositingOperationSourceIn); + +extern_static!(NSCompositeSourceOut: NSCompositingOperation = NSCompositingOperationSourceOut); + +extern_static!(NSCompositeSourceAtop: NSCompositingOperation = NSCompositingOperationSourceAtop); + +extern_static!( + NSCompositeDestinationOver: NSCompositingOperation = NSCompositingOperationDestinationOver +); + +extern_static!( + NSCompositeDestinationIn: NSCompositingOperation = NSCompositingOperationDestinationIn +); + +extern_static!( + NSCompositeDestinationOut: NSCompositingOperation = NSCompositingOperationDestinationOut +); + +extern_static!( + NSCompositeDestinationAtop: NSCompositingOperation = NSCompositingOperationDestinationAtop +); + +extern_static!(NSCompositeXOR: NSCompositingOperation = NSCompositingOperationXOR); + +extern_static!(NSCompositePlusDarker: NSCompositingOperation = NSCompositingOperationPlusDarker); + +extern_static!(NSCompositeHighlight: NSCompositingOperation = NSCompositingOperationHighlight); + +extern_static!(NSCompositePlusLighter: NSCompositingOperation = NSCompositingOperationPlusLighter); + +extern_static!(NSCompositeMultiply: NSCompositingOperation = NSCompositingOperationMultiply); + +extern_static!(NSCompositeScreen: NSCompositingOperation = NSCompositingOperationScreen); + +extern_static!(NSCompositeOverlay: NSCompositingOperation = NSCompositingOperationOverlay); + +extern_static!(NSCompositeDarken: NSCompositingOperation = NSCompositingOperationDarken); + +extern_static!(NSCompositeLighten: NSCompositingOperation = NSCompositingOperationLighten); + +extern_static!(NSCompositeColorDodge: NSCompositingOperation = NSCompositingOperationColorDodge); + +extern_static!(NSCompositeColorBurn: NSCompositingOperation = NSCompositingOperationColorBurn); + +extern_static!(NSCompositeSoftLight: NSCompositingOperation = NSCompositingOperationSoftLight); + +extern_static!(NSCompositeHardLight: NSCompositingOperation = NSCompositingOperationHardLight); + +extern_static!(NSCompositeDifference: NSCompositingOperation = NSCompositingOperationDifference); + +extern_static!(NSCompositeExclusion: NSCompositingOperation = NSCompositingOperationExclusion); + +extern_static!(NSCompositeHue: NSCompositingOperation = NSCompositingOperationHue); + +extern_static!(NSCompositeSaturation: NSCompositingOperation = NSCompositingOperationSaturation); + +extern_static!(NSCompositeColor: NSCompositingOperation = NSCompositingOperationColor); + +extern_static!(NSCompositeLuminosity: NSCompositingOperation = NSCompositingOperationLuminosity); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBackingStoreType { + NSBackingStoreRetained = 0, + NSBackingStoreNonretained = 1, + NSBackingStoreBuffered = 2, + } +); -pub static NSCompositeSourceIn: NSCompositingOperation = NSCompositingOperationSourceIn; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSWindowOrderingMode { + NSWindowAbove = 1, + NSWindowBelow = -1, + NSWindowOut = 0, + } +); -pub static NSCompositeSourceOut: NSCompositingOperation = NSCompositingOperationSourceOut; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSFocusRingPlacement { + NSFocusRingOnly = 0, + NSFocusRingBelow = 1, + NSFocusRingAbove = 2, + } +); -pub static NSCompositeSourceAtop: NSCompositingOperation = NSCompositingOperationSourceAtop; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSFocusRingType { + NSFocusRingTypeDefault = 0, + NSFocusRingTypeNone = 1, + NSFocusRingTypeExterior = 2, + } +); -pub static NSCompositeDestinationOver: NSCompositingOperation = - NSCompositingOperationDestinationOver; - -pub static NSCompositeDestinationIn: NSCompositingOperation = NSCompositingOperationDestinationIn; - -pub static NSCompositeDestinationOut: NSCompositingOperation = NSCompositingOperationDestinationOut; - -pub static NSCompositeDestinationAtop: NSCompositingOperation = - NSCompositingOperationDestinationAtop; - -pub static NSCompositeXOR: NSCompositingOperation = NSCompositingOperationXOR; - -pub static NSCompositePlusDarker: NSCompositingOperation = NSCompositingOperationPlusDarker; - -pub static NSCompositeHighlight: NSCompositingOperation = NSCompositingOperationHighlight; - -pub static NSCompositePlusLighter: NSCompositingOperation = NSCompositingOperationPlusLighter; - -pub static NSCompositeMultiply: NSCompositingOperation = NSCompositingOperationMultiply; - -pub static NSCompositeScreen: NSCompositingOperation = NSCompositingOperationScreen; - -pub static NSCompositeOverlay: NSCompositingOperation = NSCompositingOperationOverlay; - -pub static NSCompositeDarken: NSCompositingOperation = NSCompositingOperationDarken; - -pub static NSCompositeLighten: NSCompositingOperation = NSCompositingOperationLighten; - -pub static NSCompositeColorDodge: NSCompositingOperation = NSCompositingOperationColorDodge; - -pub static NSCompositeColorBurn: NSCompositingOperation = NSCompositingOperationColorBurn; - -pub static NSCompositeSoftLight: NSCompositingOperation = NSCompositingOperationSoftLight; - -pub static NSCompositeHardLight: NSCompositingOperation = NSCompositingOperationHardLight; - -pub static NSCompositeDifference: NSCompositingOperation = NSCompositingOperationDifference; - -pub static NSCompositeExclusion: NSCompositingOperation = NSCompositingOperationExclusion; - -pub static NSCompositeHue: NSCompositingOperation = NSCompositingOperationHue; - -pub static NSCompositeSaturation: NSCompositingOperation = NSCompositingOperationSaturation; - -pub static NSCompositeColor: NSCompositingOperation = NSCompositingOperationColor; - -pub static NSCompositeLuminosity: NSCompositingOperation = NSCompositingOperationLuminosity; - -pub type NSBackingStoreType = NSUInteger; -pub const NSBackingStoreRetained: NSBackingStoreType = 0; -pub const NSBackingStoreNonretained: NSBackingStoreType = 1; -pub const NSBackingStoreBuffered: NSBackingStoreType = 2; - -pub type NSWindowOrderingMode = NSInteger; -pub const NSWindowAbove: NSWindowOrderingMode = 1; -pub const NSWindowBelow: NSWindowOrderingMode = -1; -pub const NSWindowOut: NSWindowOrderingMode = 0; - -pub type NSFocusRingPlacement = NSUInteger; -pub const NSFocusRingOnly: NSFocusRingPlacement = 0; -pub const NSFocusRingBelow: NSFocusRingPlacement = 1; -pub const NSFocusRingAbove: NSFocusRingPlacement = 2; - -pub type NSFocusRingType = NSUInteger; -pub const NSFocusRingTypeDefault: NSFocusRingType = 0; -pub const NSFocusRingTypeNone: NSFocusRingType = 1; -pub const NSFocusRingTypeExterior: NSFocusRingType = 2; - -pub type NSColorRenderingIntent = NSInteger; -pub const NSColorRenderingIntentDefault: NSColorRenderingIntent = 0; -pub const NSColorRenderingIntentAbsoluteColorimetric: NSColorRenderingIntent = 1; -pub const NSColorRenderingIntentRelativeColorimetric: NSColorRenderingIntent = 2; -pub const NSColorRenderingIntentPerceptual: NSColorRenderingIntent = 3; -pub const NSColorRenderingIntentSaturation: NSColorRenderingIntent = 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSColorRenderingIntent { + NSColorRenderingIntentDefault = 0, + NSColorRenderingIntentAbsoluteColorimetric = 1, + NSColorRenderingIntentRelativeColorimetric = 2, + NSColorRenderingIntentPerceptual = 3, + NSColorRenderingIntentSaturation = 4, + } +); pub type NSColorSpaceName = NSString; -extern "C" { - pub static NSCalibratedWhiteColorSpace: &'static NSColorSpaceName; -} +extern_static!(NSCalibratedWhiteColorSpace: &'static NSColorSpaceName); -extern "C" { - pub static NSCalibratedRGBColorSpace: &'static NSColorSpaceName; -} +extern_static!(NSCalibratedRGBColorSpace: &'static NSColorSpaceName); -extern "C" { - pub static NSDeviceWhiteColorSpace: &'static NSColorSpaceName; -} +extern_static!(NSDeviceWhiteColorSpace: &'static NSColorSpaceName); -extern "C" { - pub static NSDeviceRGBColorSpace: &'static NSColorSpaceName; -} +extern_static!(NSDeviceRGBColorSpace: &'static NSColorSpaceName); -extern "C" { - pub static NSDeviceCMYKColorSpace: &'static NSColorSpaceName; -} +extern_static!(NSDeviceCMYKColorSpace: &'static NSColorSpaceName); -extern "C" { - pub static NSNamedColorSpace: &'static NSColorSpaceName; -} +extern_static!(NSNamedColorSpace: &'static NSColorSpaceName); -extern "C" { - pub static NSPatternColorSpace: &'static NSColorSpaceName; -} +extern_static!(NSPatternColorSpace: &'static NSColorSpaceName); -extern "C" { - pub static NSCustomColorSpace: &'static NSColorSpaceName; -} +extern_static!(NSCustomColorSpace: &'static NSColorSpaceName); -extern "C" { - pub static NSCalibratedBlackColorSpace: &'static NSColorSpaceName; -} +extern_static!(NSCalibratedBlackColorSpace: &'static NSColorSpaceName); -extern "C" { - pub static NSDeviceBlackColorSpace: &'static NSColorSpaceName; -} +extern_static!(NSDeviceBlackColorSpace: &'static NSColorSpaceName); -pub type NSWindowDepth = i32; -pub const NSWindowDepthTwentyfourBitRGB: NSWindowDepth = 0x208; -pub const NSWindowDepthSixtyfourBitRGB: NSWindowDepth = 0x210; -pub const NSWindowDepthOnehundredtwentyeightBitRGB: NSWindowDepth = 0x220; +ns_enum!( + #[underlying(i32)] + pub enum NSWindowDepth { + NSWindowDepthTwentyfourBitRGB = 0x208, + NSWindowDepthSixtyfourBitRGB = 0x210, + NSWindowDepthOnehundredtwentyeightBitRGB = 0x220, + } +); -extern "C" { - pub static NSWhite: CGFloat; -} +extern_static!(NSWhite: CGFloat); -extern "C" { - pub static NSLightGray: CGFloat; -} +extern_static!(NSLightGray: CGFloat); -extern "C" { - pub static NSDarkGray: CGFloat; -} +extern_static!(NSDarkGray: CGFloat); -extern "C" { - pub static NSBlack: CGFloat; -} +extern_static!(NSBlack: CGFloat); -pub type NSDisplayGamut = NSInteger; -pub const NSDisplayGamutSRGB: NSDisplayGamut = 1; -pub const NSDisplayGamutP3: NSDisplayGamut = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSDisplayGamut { + NSDisplayGamutSRGB = 1, + NSDisplayGamutP3 = 2, + } +); pub type NSDeviceDescriptionKey = NSString; -extern "C" { - pub static NSDeviceResolution: &'static NSDeviceDescriptionKey; -} +extern_static!(NSDeviceResolution: &'static NSDeviceDescriptionKey); -extern "C" { - pub static NSDeviceColorSpaceName: &'static NSDeviceDescriptionKey; -} +extern_static!(NSDeviceColorSpaceName: &'static NSDeviceDescriptionKey); -extern "C" { - pub static NSDeviceBitsPerSample: &'static NSDeviceDescriptionKey; -} +extern_static!(NSDeviceBitsPerSample: &'static NSDeviceDescriptionKey); -extern "C" { - pub static NSDeviceIsScreen: &'static NSDeviceDescriptionKey; -} +extern_static!(NSDeviceIsScreen: &'static NSDeviceDescriptionKey); -extern "C" { - pub static NSDeviceIsPrinter: &'static NSDeviceDescriptionKey; -} +extern_static!(NSDeviceIsPrinter: &'static NSDeviceDescriptionKey); -extern "C" { - pub static NSDeviceSize: &'static NSDeviceDescriptionKey; -} +extern_static!(NSDeviceSize: &'static NSDeviceDescriptionKey); -pub type NSAnimationEffect = NSUInteger; -pub const NSAnimationEffectDisappearingItemDefault: NSAnimationEffect = 0; -pub const NSAnimationEffectPoof: NSAnimationEffect = 10; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSAnimationEffect { + NSAnimationEffectDisappearingItemDefault = 0, + NSAnimationEffectPoof = 10, + } +); diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index 4f05ce105..b951af41e 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -7,31 +7,28 @@ use crate::Foundation::*; pub type NSGraphicsContextAttributeKey = NSString; -extern "C" { - pub static NSGraphicsContextDestinationAttributeName: &'static NSGraphicsContextAttributeKey; -} +extern_static!(NSGraphicsContextDestinationAttributeName: &'static NSGraphicsContextAttributeKey); -extern "C" { - pub static NSGraphicsContextRepresentationFormatAttributeName: - &'static NSGraphicsContextAttributeKey; -} +extern_static!( + NSGraphicsContextRepresentationFormatAttributeName: &'static NSGraphicsContextAttributeKey +); pub type NSGraphicsContextRepresentationFormatName = NSString; -extern "C" { - pub static NSGraphicsContextPSFormat: &'static NSGraphicsContextRepresentationFormatName; -} +extern_static!(NSGraphicsContextPSFormat: &'static NSGraphicsContextRepresentationFormatName); -extern "C" { - pub static NSGraphicsContextPDFFormat: &'static NSGraphicsContextRepresentationFormatName; -} +extern_static!(NSGraphicsContextPDFFormat: &'static NSGraphicsContextRepresentationFormatName); -pub type NSImageInterpolation = NSUInteger; -pub const NSImageInterpolationDefault: NSImageInterpolation = 0; -pub const NSImageInterpolationNone: NSImageInterpolation = 1; -pub const NSImageInterpolationLow: NSImageInterpolation = 2; -pub const NSImageInterpolationMedium: NSImageInterpolation = 4; -pub const NSImageInterpolationHigh: NSImageInterpolation = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSImageInterpolation { + NSImageInterpolationDefault = 0, + NSImageInterpolationNone = 1, + NSImageInterpolationLow = 2, + NSImageInterpolationMedium = 4, + NSImageInterpolationHigh = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSGridView.rs b/crates/icrate/src/generated/AppKit/NSGridView.rs index fe26daf19..31278321b 100644 --- a/crates/icrate/src/generated/AppKit/NSGridView.rs +++ b/crates/icrate/src/generated/AppKit/NSGridView.rs @@ -5,25 +5,31 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSGridCellPlacement = NSInteger; -pub const NSGridCellPlacementInherited: NSGridCellPlacement = 0; -pub const NSGridCellPlacementNone: NSGridCellPlacement = 1; -pub const NSGridCellPlacementLeading: NSGridCellPlacement = 2; -pub const NSGridCellPlacementTop: NSGridCellPlacement = NSGridCellPlacementLeading; -pub const NSGridCellPlacementTrailing: NSGridCellPlacement = 3; -pub const NSGridCellPlacementBottom: NSGridCellPlacement = NSGridCellPlacementTrailing; -pub const NSGridCellPlacementCenter: NSGridCellPlacement = 4; -pub const NSGridCellPlacementFill: NSGridCellPlacement = 5; - -pub type NSGridRowAlignment = NSInteger; -pub const NSGridRowAlignmentInherited: NSGridRowAlignment = 0; -pub const NSGridRowAlignmentNone: NSGridRowAlignment = 1; -pub const NSGridRowAlignmentFirstBaseline: NSGridRowAlignment = 2; -pub const NSGridRowAlignmentLastBaseline: NSGridRowAlignment = 3; - -extern "C" { - pub static NSGridViewSizeForContent: CGFloat; -} +ns_enum!( + #[underlying(NSInteger)] + pub enum NSGridCellPlacement { + NSGridCellPlacementInherited = 0, + NSGridCellPlacementNone = 1, + NSGridCellPlacementLeading = 2, + NSGridCellPlacementTop = NSGridCellPlacementLeading, + NSGridCellPlacementTrailing = 3, + NSGridCellPlacementBottom = NSGridCellPlacementTrailing, + NSGridCellPlacementCenter = 4, + NSGridCellPlacementFill = 5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSGridRowAlignment { + NSGridRowAlignmentInherited = 0, + NSGridRowAlignmentNone = 1, + NSGridRowAlignmentFirstBaseline = 2, + NSGridRowAlignmentLastBaseline = 3, + } +); + +extern_static!(NSGridViewSizeForContent: CGFloat); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs index c29ea5b36..56999d5f2 100644 --- a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs +++ b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs @@ -5,15 +5,23 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSHapticFeedbackPattern = NSInteger; -pub const NSHapticFeedbackPatternGeneric: NSHapticFeedbackPattern = 0; -pub const NSHapticFeedbackPatternAlignment: NSHapticFeedbackPattern = 1; -pub const NSHapticFeedbackPatternLevelChange: NSHapticFeedbackPattern = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSHapticFeedbackPattern { + NSHapticFeedbackPatternGeneric = 0, + NSHapticFeedbackPatternAlignment = 1, + NSHapticFeedbackPatternLevelChange = 2, + } +); -pub type NSHapticFeedbackPerformanceTime = NSUInteger; -pub const NSHapticFeedbackPerformanceTimeDefault: NSHapticFeedbackPerformanceTime = 0; -pub const NSHapticFeedbackPerformanceTimeNow: NSHapticFeedbackPerformanceTime = 1; -pub const NSHapticFeedbackPerformanceTimeDrawCompleted: NSHapticFeedbackPerformanceTime = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSHapticFeedbackPerformanceTime { + NSHapticFeedbackPerformanceTimeDefault = 0, + NSHapticFeedbackPerformanceTimeNow = 1, + NSHapticFeedbackPerformanceTimeDrawCompleted = 2, + } +); pub type NSHapticFeedbackPerformer = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSHelpManager.rs b/crates/icrate/src/generated/AppKit/NSHelpManager.rs index 2f91b34ea..65acffa5e 100644 --- a/crates/icrate/src/generated/AppKit/NSHelpManager.rs +++ b/crates/icrate/src/generated/AppKit/NSHelpManager.rs @@ -69,13 +69,9 @@ extern_methods!( } ); -extern "C" { - pub static NSContextHelpModeDidActivateNotification: &'static NSNotificationName; -} +extern_static!(NSContextHelpModeDidActivateNotification: &'static NSNotificationName); -extern "C" { - pub static NSContextHelpModeDidDeactivateNotification: &'static NSNotificationName; -} +extern_static!(NSContextHelpModeDidDeactivateNotification: &'static NSNotificationName); extern_methods!( /// NSBundleHelpExtension diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index d6a5056d1..47957486d 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -7,34 +7,40 @@ use crate::Foundation::*; pub type NSImageName = NSString; -extern "C" { - pub static NSImageHintCTM: &'static NSImageHintKey; -} - -extern "C" { - pub static NSImageHintInterpolation: &'static NSImageHintKey; -} - -extern "C" { - pub static NSImageHintUserInterfaceLayoutDirection: &'static NSImageHintKey; -} - -pub type NSImageLoadStatus = NSUInteger; -pub const NSImageLoadStatusCompleted: NSImageLoadStatus = 0; -pub const NSImageLoadStatusCancelled: NSImageLoadStatus = 1; -pub const NSImageLoadStatusInvalidData: NSImageLoadStatus = 2; -pub const NSImageLoadStatusUnexpectedEOF: NSImageLoadStatus = 3; -pub const NSImageLoadStatusReadError: NSImageLoadStatus = 4; - -pub type NSImageCacheMode = NSUInteger; -pub const NSImageCacheDefault: NSImageCacheMode = 0; -pub const NSImageCacheAlways: NSImageCacheMode = 1; -pub const NSImageCacheBySize: NSImageCacheMode = 2; -pub const NSImageCacheNever: NSImageCacheMode = 3; - -pub type NSImageResizingMode = NSInteger; -pub const NSImageResizingModeStretch: NSImageResizingMode = 0; -pub const NSImageResizingModeTile: NSImageResizingMode = 1; +extern_static!(NSImageHintCTM: &'static NSImageHintKey); + +extern_static!(NSImageHintInterpolation: &'static NSImageHintKey); + +extern_static!(NSImageHintUserInterfaceLayoutDirection: &'static NSImageHintKey); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSImageLoadStatus { + NSImageLoadStatusCompleted = 0, + NSImageLoadStatusCancelled = 1, + NSImageLoadStatusInvalidData = 2, + NSImageLoadStatusUnexpectedEOF = 3, + NSImageLoadStatusReadError = 4, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSImageCacheMode { + NSImageCacheDefault = 0, + NSImageCacheAlways = 1, + NSImageCacheBySize = 2, + NSImageCacheNever = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSImageResizingMode { + NSImageResizingModeStretch = 0, + NSImageResizingModeTile = 1, + } +); extern_class!( #[derive(Debug)] @@ -466,566 +472,292 @@ extern_methods!( } ); -extern "C" { - pub static NSImageNameAddTemplate: &'static NSImageName; -} +extern_static!(NSImageNameAddTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameBluetoothTemplate: &'static NSImageName; -} +extern_static!(NSImageNameBluetoothTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameBonjour: &'static NSImageName; -} +extern_static!(NSImageNameBonjour: &'static NSImageName); -extern "C" { - pub static NSImageNameBookmarksTemplate: &'static NSImageName; -} +extern_static!(NSImageNameBookmarksTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameCaution: &'static NSImageName; -} +extern_static!(NSImageNameCaution: &'static NSImageName); -extern "C" { - pub static NSImageNameComputer: &'static NSImageName; -} +extern_static!(NSImageNameComputer: &'static NSImageName); -extern "C" { - pub static NSImageNameEnterFullScreenTemplate: &'static NSImageName; -} +extern_static!(NSImageNameEnterFullScreenTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameExitFullScreenTemplate: &'static NSImageName; -} +extern_static!(NSImageNameExitFullScreenTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameFolder: &'static NSImageName; -} +extern_static!(NSImageNameFolder: &'static NSImageName); -extern "C" { - pub static NSImageNameFolderBurnable: &'static NSImageName; -} +extern_static!(NSImageNameFolderBurnable: &'static NSImageName); -extern "C" { - pub static NSImageNameFolderSmart: &'static NSImageName; -} +extern_static!(NSImageNameFolderSmart: &'static NSImageName); -extern "C" { - pub static NSImageNameFollowLinkFreestandingTemplate: &'static NSImageName; -} +extern_static!(NSImageNameFollowLinkFreestandingTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameHomeTemplate: &'static NSImageName; -} +extern_static!(NSImageNameHomeTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameIChatTheaterTemplate: &'static NSImageName; -} +extern_static!(NSImageNameIChatTheaterTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameLockLockedTemplate: &'static NSImageName; -} +extern_static!(NSImageNameLockLockedTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameLockUnlockedTemplate: &'static NSImageName; -} +extern_static!(NSImageNameLockUnlockedTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameNetwork: &'static NSImageName; -} +extern_static!(NSImageNameNetwork: &'static NSImageName); -extern "C" { - pub static NSImageNamePathTemplate: &'static NSImageName; -} +extern_static!(NSImageNamePathTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameQuickLookTemplate: &'static NSImageName; -} +extern_static!(NSImageNameQuickLookTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameRefreshFreestandingTemplate: &'static NSImageName; -} +extern_static!(NSImageNameRefreshFreestandingTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameRefreshTemplate: &'static NSImageName; -} +extern_static!(NSImageNameRefreshTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameRemoveTemplate: &'static NSImageName; -} +extern_static!(NSImageNameRemoveTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameRevealFreestandingTemplate: &'static NSImageName; -} +extern_static!(NSImageNameRevealFreestandingTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameShareTemplate: &'static NSImageName; -} +extern_static!(NSImageNameShareTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameSlideshowTemplate: &'static NSImageName; -} +extern_static!(NSImageNameSlideshowTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameStatusAvailable: &'static NSImageName; -} +extern_static!(NSImageNameStatusAvailable: &'static NSImageName); -extern "C" { - pub static NSImageNameStatusNone: &'static NSImageName; -} +extern_static!(NSImageNameStatusNone: &'static NSImageName); -extern "C" { - pub static NSImageNameStatusPartiallyAvailable: &'static NSImageName; -} +extern_static!(NSImageNameStatusPartiallyAvailable: &'static NSImageName); -extern "C" { - pub static NSImageNameStatusUnavailable: &'static NSImageName; -} +extern_static!(NSImageNameStatusUnavailable: &'static NSImageName); -extern "C" { - pub static NSImageNameStopProgressFreestandingTemplate: &'static NSImageName; -} +extern_static!(NSImageNameStopProgressFreestandingTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameStopProgressTemplate: &'static NSImageName; -} +extern_static!(NSImageNameStopProgressTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTrashEmpty: &'static NSImageName; -} +extern_static!(NSImageNameTrashEmpty: &'static NSImageName); -extern "C" { - pub static NSImageNameTrashFull: &'static NSImageName; -} +extern_static!(NSImageNameTrashFull: &'static NSImageName); -extern "C" { - pub static NSImageNameActionTemplate: &'static NSImageName; -} +extern_static!(NSImageNameActionTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameSmartBadgeTemplate: &'static NSImageName; -} +extern_static!(NSImageNameSmartBadgeTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameIconViewTemplate: &'static NSImageName; -} +extern_static!(NSImageNameIconViewTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameListViewTemplate: &'static NSImageName; -} +extern_static!(NSImageNameListViewTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameColumnViewTemplate: &'static NSImageName; -} +extern_static!(NSImageNameColumnViewTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameFlowViewTemplate: &'static NSImageName; -} +extern_static!(NSImageNameFlowViewTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameInvalidDataFreestandingTemplate: &'static NSImageName; -} +extern_static!(NSImageNameInvalidDataFreestandingTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameGoForwardTemplate: &'static NSImageName; -} +extern_static!(NSImageNameGoForwardTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameGoBackTemplate: &'static NSImageName; -} +extern_static!(NSImageNameGoBackTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameGoRightTemplate: &'static NSImageName; -} +extern_static!(NSImageNameGoRightTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameGoLeftTemplate: &'static NSImageName; -} +extern_static!(NSImageNameGoLeftTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameRightFacingTriangleTemplate: &'static NSImageName; -} +extern_static!(NSImageNameRightFacingTriangleTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameLeftFacingTriangleTemplate: &'static NSImageName; -} +extern_static!(NSImageNameLeftFacingTriangleTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameDotMac: &'static NSImageName; -} +extern_static!(NSImageNameDotMac: &'static NSImageName); -extern "C" { - pub static NSImageNameMobileMe: &'static NSImageName; -} +extern_static!(NSImageNameMobileMe: &'static NSImageName); -extern "C" { - pub static NSImageNameMultipleDocuments: &'static NSImageName; -} +extern_static!(NSImageNameMultipleDocuments: &'static NSImageName); -extern "C" { - pub static NSImageNameUserAccounts: &'static NSImageName; -} +extern_static!(NSImageNameUserAccounts: &'static NSImageName); -extern "C" { - pub static NSImageNamePreferencesGeneral: &'static NSImageName; -} +extern_static!(NSImageNamePreferencesGeneral: &'static NSImageName); -extern "C" { - pub static NSImageNameAdvanced: &'static NSImageName; -} +extern_static!(NSImageNameAdvanced: &'static NSImageName); -extern "C" { - pub static NSImageNameInfo: &'static NSImageName; -} +extern_static!(NSImageNameInfo: &'static NSImageName); -extern "C" { - pub static NSImageNameFontPanel: &'static NSImageName; -} +extern_static!(NSImageNameFontPanel: &'static NSImageName); -extern "C" { - pub static NSImageNameColorPanel: &'static NSImageName; -} +extern_static!(NSImageNameColorPanel: &'static NSImageName); -extern "C" { - pub static NSImageNameUser: &'static NSImageName; -} +extern_static!(NSImageNameUser: &'static NSImageName); -extern "C" { - pub static NSImageNameUserGroup: &'static NSImageName; -} +extern_static!(NSImageNameUserGroup: &'static NSImageName); -extern "C" { - pub static NSImageNameEveryone: &'static NSImageName; -} +extern_static!(NSImageNameEveryone: &'static NSImageName); -extern "C" { - pub static NSImageNameUserGuest: &'static NSImageName; -} +extern_static!(NSImageNameUserGuest: &'static NSImageName); -extern "C" { - pub static NSImageNameMenuOnStateTemplate: &'static NSImageName; -} +extern_static!(NSImageNameMenuOnStateTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameMenuMixedStateTemplate: &'static NSImageName; -} +extern_static!(NSImageNameMenuMixedStateTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameApplicationIcon: &'static NSImageName; -} +extern_static!(NSImageNameApplicationIcon: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarAddDetailTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarAddDetailTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarAddTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarAddTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarAlarmTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarAlarmTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarAudioInputMuteTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarAudioInputMuteTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarAudioInputTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarAudioInputTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarAudioOutputMuteTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarAudioOutputMuteTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarAudioOutputVolumeHighTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarAudioOutputVolumeHighTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarAudioOutputVolumeLowTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarAudioOutputVolumeLowTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarAudioOutputVolumeMediumTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarAudioOutputVolumeMediumTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarAudioOutputVolumeOffTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarAudioOutputVolumeOffTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarBookmarksTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarBookmarksTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarColorPickerFill: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarColorPickerFill: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarColorPickerFont: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarColorPickerFont: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarColorPickerStroke: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarColorPickerStroke: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarCommunicationAudioTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarCommunicationAudioTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarCommunicationVideoTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarCommunicationVideoTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarComposeTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarComposeTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarDeleteTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarDeleteTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarDownloadTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarDownloadTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarEnterFullScreenTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarEnterFullScreenTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarExitFullScreenTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarExitFullScreenTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarFastForwardTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarFastForwardTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarFolderCopyToTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarFolderCopyToTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarFolderMoveToTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarFolderMoveToTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarFolderTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarFolderTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarGetInfoTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarGetInfoTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarGoBackTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarGoBackTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarGoDownTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarGoDownTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarGoForwardTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarGoForwardTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarGoUpTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarGoUpTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarHistoryTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarHistoryTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarIconViewTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarIconViewTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarListViewTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarListViewTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarMailTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarMailTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarNewFolderTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarNewFolderTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarNewMessageTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarNewMessageTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarOpenInBrowserTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarOpenInBrowserTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarPauseTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarPauseTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarPlayPauseTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarPlayPauseTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarPlayTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarPlayTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarQuickLookTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarQuickLookTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarRecordStartTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarRecordStartTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarRecordStopTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarRecordStopTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarRefreshTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarRefreshTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarRemoveTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarRemoveTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarRewindTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarRewindTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarRotateLeftTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarRotateLeftTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarRotateRightTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarRotateRightTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSearchTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSearchTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarShareTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarShareTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSidebarTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSidebarTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSkipAhead15SecondsTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSkipAhead15SecondsTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSkipAhead30SecondsTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSkipAhead30SecondsTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSkipAheadTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSkipAheadTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSkipBack15SecondsTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSkipBack15SecondsTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSkipBack30SecondsTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSkipBack30SecondsTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSkipBackTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSkipBackTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSkipToEndTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSkipToEndTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSkipToStartTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSkipToStartTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarSlideshowTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarSlideshowTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTagIconTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTagIconTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTextBoldTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTextBoldTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTextBoxTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTextBoxTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTextCenterAlignTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTextCenterAlignTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTextItalicTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTextItalicTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTextJustifiedAlignTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTextJustifiedAlignTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTextLeftAlignTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTextLeftAlignTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTextListTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTextListTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTextRightAlignTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTextRightAlignTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTextStrikethroughTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTextStrikethroughTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarTextUnderlineTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarTextUnderlineTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarUserAddTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarUserAddTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarUserGroupTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarUserGroupTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarUserTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarUserTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarVolumeDownTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarVolumeDownTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarVolumeUpTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarVolumeUpTemplate: &'static NSImageName); -extern "C" { - pub static NSImageNameTouchBarPlayheadTemplate: &'static NSImageName; -} +extern_static!(NSImageNameTouchBarPlayheadTemplate: &'static NSImageName); -pub type NSImageSymbolScale = NSInteger; -pub const NSImageSymbolScaleSmall: NSImageSymbolScale = 1; -pub const NSImageSymbolScaleMedium: NSImageSymbolScale = 2; -pub const NSImageSymbolScaleLarge: NSImageSymbolScale = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSImageSymbolScale { + NSImageSymbolScaleSmall = 1, + NSImageSymbolScaleMedium = 2, + NSImageSymbolScaleLarge = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSImageCell.rs b/crates/icrate/src/generated/AppKit/NSImageCell.rs index 5dca1d90f..09d8819cf 100644 --- a/crates/icrate/src/generated/AppKit/NSImageCell.rs +++ b/crates/icrate/src/generated/AppKit/NSImageCell.rs @@ -5,23 +5,31 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSImageAlignment = NSUInteger; -pub const NSImageAlignCenter: NSImageAlignment = 0; -pub const NSImageAlignTop: NSImageAlignment = 1; -pub const NSImageAlignTopLeft: NSImageAlignment = 2; -pub const NSImageAlignTopRight: NSImageAlignment = 3; -pub const NSImageAlignLeft: NSImageAlignment = 4; -pub const NSImageAlignBottom: NSImageAlignment = 5; -pub const NSImageAlignBottomLeft: NSImageAlignment = 6; -pub const NSImageAlignBottomRight: NSImageAlignment = 7; -pub const NSImageAlignRight: NSImageAlignment = 8; - -pub type NSImageFrameStyle = NSUInteger; -pub const NSImageFrameNone: NSImageFrameStyle = 0; -pub const NSImageFramePhoto: NSImageFrameStyle = 1; -pub const NSImageFrameGrayBezel: NSImageFrameStyle = 2; -pub const NSImageFrameGroove: NSImageFrameStyle = 3; -pub const NSImageFrameButton: NSImageFrameStyle = 4; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSImageAlignment { + NSImageAlignCenter = 0, + NSImageAlignTop = 1, + NSImageAlignTopLeft = 2, + NSImageAlignTopRight = 3, + NSImageAlignLeft = 4, + NSImageAlignBottom = 5, + NSImageAlignBottomLeft = 6, + NSImageAlignBottomRight = 7, + NSImageAlignRight = 8, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSImageFrameStyle { + NSImageFrameNone = 0, + NSImageFramePhoto = 1, + NSImageFrameGrayBezel = 2, + NSImageFrameGroove = 3, + NSImageFrameButton = 4, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index 44e81a726..1be8e9f9e 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -7,12 +7,21 @@ use crate::Foundation::*; pub type NSImageHintKey = NSString; -pub const NSImageRepMatchesDevice: c_uint = 0; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSImageRepMatchesDevice = 0, + } +); -pub type NSImageLayoutDirection = NSInteger; -pub const NSImageLayoutDirectionUnspecified: NSImageLayoutDirection = -1; -pub const NSImageLayoutDirectionLeftToRight: NSImageLayoutDirection = 2; -pub const NSImageLayoutDirectionRightToLeft: NSImageLayoutDirection = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSImageLayoutDirection { + NSImageLayoutDirectionUnspecified = -1, + NSImageLayoutDirectionLeftToRight = 2, + NSImageLayoutDirectionRightToLeft = 3, + } +); extern_class!( #[derive(Debug)] @@ -187,6 +196,4 @@ extern_methods!( } ); -extern "C" { - pub static NSImageRepRegistryDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSImageRepRegistryDidChangeNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs index a783cf54a..5cb759ffd 100644 --- a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -5,10 +5,15 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub const NSNoInterfaceStyle: c_uint = 0; -pub const NSNextStepInterfaceStyle: c_uint = 1; -pub const NSWindows95InterfaceStyle: c_uint = 2; -pub const NSMacintoshInterfaceStyle: c_uint = 3; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSNoInterfaceStyle = 0, + NSNextStepInterfaceStyle = 1, + NSWindows95InterfaceStyle = 2, + NSMacintoshInterfaceStyle = 3, + } +); pub type NSInterfaceStyle = NSUInteger; @@ -23,6 +28,4 @@ extern_methods!( } ); -extern "C" { - pub static NSInterfaceStyleDefault: Option<&'static NSString>; -} +extern_static!(NSInterfaceStyleDefault: Option<&'static NSString>); diff --git a/crates/icrate/src/generated/AppKit/NSItemProvider.rs b/crates/icrate/src/generated/AppKit/NSItemProvider.rs index 63b0c5436..b89007ffa 100644 --- a/crates/icrate/src/generated/AppKit/NSItemProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSItemProvider.rs @@ -19,18 +19,10 @@ extern_methods!( } ); -extern "C" { - pub static NSTypeIdentifierDateText: &'static NSString; -} +extern_static!(NSTypeIdentifierDateText: &'static NSString); -extern "C" { - pub static NSTypeIdentifierAddressText: &'static NSString; -} +extern_static!(NSTypeIdentifierAddressText: &'static NSString); -extern "C" { - pub static NSTypeIdentifierPhoneNumberText: &'static NSString; -} +extern_static!(NSTypeIdentifierPhoneNumberText: &'static NSString); -extern "C" { - pub static NSTypeIdentifierTransitInformationText: &'static NSString; -} +extern_static!(NSTypeIdentifierTransitInformationText: &'static NSString); diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index f2a9ec9fd..a86ee2950 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -49,31 +49,19 @@ extern_methods!( } ); -extern "C" { - pub static NSMultipleValuesMarker: &'static Object; -} +extern_static!(NSMultipleValuesMarker: &'static Object); -extern "C" { - pub static NSNoSelectionMarker: &'static Object; -} +extern_static!(NSNoSelectionMarker: &'static Object); -extern "C" { - pub static NSNotApplicableMarker: &'static Object; -} +extern_static!(NSNotApplicableMarker: &'static Object); pub type NSBindingInfoKey = NSString; -extern "C" { - pub static NSObservedObjectKey: &'static NSBindingInfoKey; -} +extern_static!(NSObservedObjectKey: &'static NSBindingInfoKey); -extern "C" { - pub static NSObservedKeyPathKey: &'static NSBindingInfoKey; -} +extern_static!(NSObservedKeyPathKey: &'static NSBindingInfoKey); -extern "C" { - pub static NSOptionsKey: &'static NSBindingInfoKey; -} +extern_static!(NSOptionsKey: &'static NSBindingInfoKey); extern_methods!( /// NSKeyValueBindingCreation @@ -171,425 +159,215 @@ extern_methods!( } ); -extern "C" { - pub static NSAlignmentBinding: &'static NSBindingName; -} +extern_static!(NSAlignmentBinding: &'static NSBindingName); -extern "C" { - pub static NSAlternateImageBinding: &'static NSBindingName; -} +extern_static!(NSAlternateImageBinding: &'static NSBindingName); -extern "C" { - pub static NSAlternateTitleBinding: &'static NSBindingName; -} +extern_static!(NSAlternateTitleBinding: &'static NSBindingName); -extern "C" { - pub static NSAnimateBinding: &'static NSBindingName; -} +extern_static!(NSAnimateBinding: &'static NSBindingName); -extern "C" { - pub static NSAnimationDelayBinding: &'static NSBindingName; -} +extern_static!(NSAnimationDelayBinding: &'static NSBindingName); -extern "C" { - pub static NSArgumentBinding: &'static NSBindingName; -} +extern_static!(NSArgumentBinding: &'static NSBindingName); -extern "C" { - pub static NSAttributedStringBinding: &'static NSBindingName; -} +extern_static!(NSAttributedStringBinding: &'static NSBindingName); -extern "C" { - pub static NSContentArrayBinding: &'static NSBindingName; -} +extern_static!(NSContentArrayBinding: &'static NSBindingName); -extern "C" { - pub static NSContentArrayForMultipleSelectionBinding: &'static NSBindingName; -} +extern_static!(NSContentArrayForMultipleSelectionBinding: &'static NSBindingName); -extern "C" { - pub static NSContentBinding: &'static NSBindingName; -} +extern_static!(NSContentBinding: &'static NSBindingName); -extern "C" { - pub static NSContentDictionaryBinding: &'static NSBindingName; -} +extern_static!(NSContentDictionaryBinding: &'static NSBindingName); -extern "C" { - pub static NSContentHeightBinding: &'static NSBindingName; -} +extern_static!(NSContentHeightBinding: &'static NSBindingName); -extern "C" { - pub static NSContentObjectBinding: &'static NSBindingName; -} +extern_static!(NSContentObjectBinding: &'static NSBindingName); -extern "C" { - pub static NSContentObjectsBinding: &'static NSBindingName; -} +extern_static!(NSContentObjectsBinding: &'static NSBindingName); -extern "C" { - pub static NSContentSetBinding: &'static NSBindingName; -} +extern_static!(NSContentSetBinding: &'static NSBindingName); -extern "C" { - pub static NSContentValuesBinding: &'static NSBindingName; -} +extern_static!(NSContentValuesBinding: &'static NSBindingName); -extern "C" { - pub static NSContentWidthBinding: &'static NSBindingName; -} +extern_static!(NSContentWidthBinding: &'static NSBindingName); -extern "C" { - pub static NSCriticalValueBinding: &'static NSBindingName; -} +extern_static!(NSCriticalValueBinding: &'static NSBindingName); -extern "C" { - pub static NSDataBinding: &'static NSBindingName; -} +extern_static!(NSDataBinding: &'static NSBindingName); -extern "C" { - pub static NSDisplayPatternTitleBinding: &'static NSBindingName; -} +extern_static!(NSDisplayPatternTitleBinding: &'static NSBindingName); -extern "C" { - pub static NSDisplayPatternValueBinding: &'static NSBindingName; -} +extern_static!(NSDisplayPatternValueBinding: &'static NSBindingName); -extern "C" { - pub static NSDocumentEditedBinding: &'static NSBindingName; -} +extern_static!(NSDocumentEditedBinding: &'static NSBindingName); -extern "C" { - pub static NSDoubleClickArgumentBinding: &'static NSBindingName; -} +extern_static!(NSDoubleClickArgumentBinding: &'static NSBindingName); -extern "C" { - pub static NSDoubleClickTargetBinding: &'static NSBindingName; -} +extern_static!(NSDoubleClickTargetBinding: &'static NSBindingName); -extern "C" { - pub static NSEditableBinding: &'static NSBindingName; -} +extern_static!(NSEditableBinding: &'static NSBindingName); -extern "C" { - pub static NSEnabledBinding: &'static NSBindingName; -} +extern_static!(NSEnabledBinding: &'static NSBindingName); -extern "C" { - pub static NSExcludedKeysBinding: &'static NSBindingName; -} +extern_static!(NSExcludedKeysBinding: &'static NSBindingName); -extern "C" { - pub static NSFilterPredicateBinding: &'static NSBindingName; -} +extern_static!(NSFilterPredicateBinding: &'static NSBindingName); -extern "C" { - pub static NSFontBinding: &'static NSBindingName; -} +extern_static!(NSFontBinding: &'static NSBindingName); -extern "C" { - pub static NSFontBoldBinding: &'static NSBindingName; -} +extern_static!(NSFontBoldBinding: &'static NSBindingName); -extern "C" { - pub static NSFontFamilyNameBinding: &'static NSBindingName; -} +extern_static!(NSFontFamilyNameBinding: &'static NSBindingName); -extern "C" { - pub static NSFontItalicBinding: &'static NSBindingName; -} +extern_static!(NSFontItalicBinding: &'static NSBindingName); -extern "C" { - pub static NSFontNameBinding: &'static NSBindingName; -} +extern_static!(NSFontNameBinding: &'static NSBindingName); -extern "C" { - pub static NSFontSizeBinding: &'static NSBindingName; -} +extern_static!(NSFontSizeBinding: &'static NSBindingName); -extern "C" { - pub static NSHeaderTitleBinding: &'static NSBindingName; -} +extern_static!(NSHeaderTitleBinding: &'static NSBindingName); -extern "C" { - pub static NSHiddenBinding: &'static NSBindingName; -} +extern_static!(NSHiddenBinding: &'static NSBindingName); -extern "C" { - pub static NSImageBinding: &'static NSBindingName; -} +extern_static!(NSImageBinding: &'static NSBindingName); -extern "C" { - pub static NSIncludedKeysBinding: &'static NSBindingName; -} +extern_static!(NSIncludedKeysBinding: &'static NSBindingName); -extern "C" { - pub static NSInitialKeyBinding: &'static NSBindingName; -} +extern_static!(NSInitialKeyBinding: &'static NSBindingName); -extern "C" { - pub static NSInitialValueBinding: &'static NSBindingName; -} +extern_static!(NSInitialValueBinding: &'static NSBindingName); -extern "C" { - pub static NSIsIndeterminateBinding: &'static NSBindingName; -} +extern_static!(NSIsIndeterminateBinding: &'static NSBindingName); -extern "C" { - pub static NSLabelBinding: &'static NSBindingName; -} +extern_static!(NSLabelBinding: &'static NSBindingName); -extern "C" { - pub static NSLocalizedKeyDictionaryBinding: &'static NSBindingName; -} +extern_static!(NSLocalizedKeyDictionaryBinding: &'static NSBindingName); -extern "C" { - pub static NSManagedObjectContextBinding: &'static NSBindingName; -} +extern_static!(NSManagedObjectContextBinding: &'static NSBindingName); -extern "C" { - pub static NSMaximumRecentsBinding: &'static NSBindingName; -} +extern_static!(NSMaximumRecentsBinding: &'static NSBindingName); -extern "C" { - pub static NSMaxValueBinding: &'static NSBindingName; -} +extern_static!(NSMaxValueBinding: &'static NSBindingName); -extern "C" { - pub static NSMaxWidthBinding: &'static NSBindingName; -} +extern_static!(NSMaxWidthBinding: &'static NSBindingName); -extern "C" { - pub static NSMinValueBinding: &'static NSBindingName; -} +extern_static!(NSMinValueBinding: &'static NSBindingName); -extern "C" { - pub static NSMinWidthBinding: &'static NSBindingName; -} +extern_static!(NSMinWidthBinding: &'static NSBindingName); -extern "C" { - pub static NSMixedStateImageBinding: &'static NSBindingName; -} +extern_static!(NSMixedStateImageBinding: &'static NSBindingName); -extern "C" { - pub static NSOffStateImageBinding: &'static NSBindingName; -} +extern_static!(NSOffStateImageBinding: &'static NSBindingName); -extern "C" { - pub static NSOnStateImageBinding: &'static NSBindingName; -} +extern_static!(NSOnStateImageBinding: &'static NSBindingName); -extern "C" { - pub static NSPositioningRectBinding: &'static NSBindingName; -} +extern_static!(NSPositioningRectBinding: &'static NSBindingName); -extern "C" { - pub static NSPredicateBinding: &'static NSBindingName; -} +extern_static!(NSPredicateBinding: &'static NSBindingName); -extern "C" { - pub static NSRecentSearchesBinding: &'static NSBindingName; -} +extern_static!(NSRecentSearchesBinding: &'static NSBindingName); -extern "C" { - pub static NSRepresentedFilenameBinding: &'static NSBindingName; -} +extern_static!(NSRepresentedFilenameBinding: &'static NSBindingName); -extern "C" { - pub static NSRowHeightBinding: &'static NSBindingName; -} +extern_static!(NSRowHeightBinding: &'static NSBindingName); -extern "C" { - pub static NSSelectedIdentifierBinding: &'static NSBindingName; -} +extern_static!(NSSelectedIdentifierBinding: &'static NSBindingName); -extern "C" { - pub static NSSelectedIndexBinding: &'static NSBindingName; -} +extern_static!(NSSelectedIndexBinding: &'static NSBindingName); -extern "C" { - pub static NSSelectedLabelBinding: &'static NSBindingName; -} +extern_static!(NSSelectedLabelBinding: &'static NSBindingName); -extern "C" { - pub static NSSelectedObjectBinding: &'static NSBindingName; -} +extern_static!(NSSelectedObjectBinding: &'static NSBindingName); -extern "C" { - pub static NSSelectedObjectsBinding: &'static NSBindingName; -} +extern_static!(NSSelectedObjectsBinding: &'static NSBindingName); -extern "C" { - pub static NSSelectedTagBinding: &'static NSBindingName; -} +extern_static!(NSSelectedTagBinding: &'static NSBindingName); -extern "C" { - pub static NSSelectedValueBinding: &'static NSBindingName; -} +extern_static!(NSSelectedValueBinding: &'static NSBindingName); -extern "C" { - pub static NSSelectedValuesBinding: &'static NSBindingName; -} +extern_static!(NSSelectedValuesBinding: &'static NSBindingName); -extern "C" { - pub static NSSelectionIndexesBinding: &'static NSBindingName; -} +extern_static!(NSSelectionIndexesBinding: &'static NSBindingName); -extern "C" { - pub static NSSelectionIndexPathsBinding: &'static NSBindingName; -} +extern_static!(NSSelectionIndexPathsBinding: &'static NSBindingName); -extern "C" { - pub static NSSortDescriptorsBinding: &'static NSBindingName; -} +extern_static!(NSSortDescriptorsBinding: &'static NSBindingName); -extern "C" { - pub static NSTargetBinding: &'static NSBindingName; -} +extern_static!(NSTargetBinding: &'static NSBindingName); -extern "C" { - pub static NSTextColorBinding: &'static NSBindingName; -} +extern_static!(NSTextColorBinding: &'static NSBindingName); -extern "C" { - pub static NSTitleBinding: &'static NSBindingName; -} +extern_static!(NSTitleBinding: &'static NSBindingName); -extern "C" { - pub static NSToolTipBinding: &'static NSBindingName; -} +extern_static!(NSToolTipBinding: &'static NSBindingName); -extern "C" { - pub static NSTransparentBinding: &'static NSBindingName; -} +extern_static!(NSTransparentBinding: &'static NSBindingName); -extern "C" { - pub static NSValueBinding: &'static NSBindingName; -} +extern_static!(NSValueBinding: &'static NSBindingName); -extern "C" { - pub static NSValuePathBinding: &'static NSBindingName; -} +extern_static!(NSValuePathBinding: &'static NSBindingName); -extern "C" { - pub static NSValueURLBinding: &'static NSBindingName; -} +extern_static!(NSValueURLBinding: &'static NSBindingName); -extern "C" { - pub static NSVisibleBinding: &'static NSBindingName; -} +extern_static!(NSVisibleBinding: &'static NSBindingName); -extern "C" { - pub static NSWarningValueBinding: &'static NSBindingName; -} +extern_static!(NSWarningValueBinding: &'static NSBindingName); -extern "C" { - pub static NSWidthBinding: &'static NSBindingName; -} +extern_static!(NSWidthBinding: &'static NSBindingName); -extern "C" { - pub static NSAllowsEditingMultipleValuesSelectionBindingOption: &'static NSBindingOption; -} +extern_static!(NSAllowsEditingMultipleValuesSelectionBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSAllowsNullArgumentBindingOption: &'static NSBindingOption; -} +extern_static!(NSAllowsNullArgumentBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSAlwaysPresentsApplicationModalAlertsBindingOption: &'static NSBindingOption; -} +extern_static!(NSAlwaysPresentsApplicationModalAlertsBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSConditionallySetsEditableBindingOption: &'static NSBindingOption; -} +extern_static!(NSConditionallySetsEditableBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSConditionallySetsEnabledBindingOption: &'static NSBindingOption; -} +extern_static!(NSConditionallySetsEnabledBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSConditionallySetsHiddenBindingOption: &'static NSBindingOption; -} +extern_static!(NSConditionallySetsHiddenBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSContinuouslyUpdatesValueBindingOption: &'static NSBindingOption; -} +extern_static!(NSContinuouslyUpdatesValueBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSCreatesSortDescriptorBindingOption: &'static NSBindingOption; -} +extern_static!(NSCreatesSortDescriptorBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSDeletesObjectsOnRemoveBindingsOption: &'static NSBindingOption; -} +extern_static!(NSDeletesObjectsOnRemoveBindingsOption: &'static NSBindingOption); -extern "C" { - pub static NSDisplayNameBindingOption: &'static NSBindingOption; -} +extern_static!(NSDisplayNameBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSDisplayPatternBindingOption: &'static NSBindingOption; -} +extern_static!(NSDisplayPatternBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSContentPlacementTagBindingOption: &'static NSBindingOption; -} +extern_static!(NSContentPlacementTagBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSHandlesContentAsCompoundValueBindingOption: &'static NSBindingOption; -} +extern_static!(NSHandlesContentAsCompoundValueBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSInsertsNullPlaceholderBindingOption: &'static NSBindingOption; -} +extern_static!(NSInsertsNullPlaceholderBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSInvokesSeparatelyWithArrayObjectsBindingOption: &'static NSBindingOption; -} +extern_static!(NSInvokesSeparatelyWithArrayObjectsBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSMultipleValuesPlaceholderBindingOption: &'static NSBindingOption; -} +extern_static!(NSMultipleValuesPlaceholderBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSNoSelectionPlaceholderBindingOption: &'static NSBindingOption; -} +extern_static!(NSNoSelectionPlaceholderBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSNotApplicablePlaceholderBindingOption: &'static NSBindingOption; -} +extern_static!(NSNotApplicablePlaceholderBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSNullPlaceholderBindingOption: &'static NSBindingOption; -} +extern_static!(NSNullPlaceholderBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSRaisesForNotApplicableKeysBindingOption: &'static NSBindingOption; -} +extern_static!(NSRaisesForNotApplicableKeysBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSPredicateFormatBindingOption: &'static NSBindingOption; -} +extern_static!(NSPredicateFormatBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSSelectorNameBindingOption: &'static NSBindingOption; -} +extern_static!(NSSelectorNameBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSSelectsAllWhenSettingContentBindingOption: &'static NSBindingOption; -} +extern_static!(NSSelectsAllWhenSettingContentBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSValidatesImmediatelyBindingOption: &'static NSBindingOption; -} +extern_static!(NSValidatesImmediatelyBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSValueTransformerNameBindingOption: &'static NSBindingOption; -} +extern_static!(NSValueTransformerNameBindingOption: &'static NSBindingOption); -extern "C" { - pub static NSValueTransformerBindingOption: &'static NSBindingOption; -} +extern_static!(NSValueTransformerBindingOption: &'static NSBindingOption); extern_methods!( /// NSEditorAndEditorRegistrationConformance diff --git a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs index e3f7ae0e3..156ea843c 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutConstraint.rs @@ -7,65 +7,78 @@ use crate::Foundation::*; pub type NSLayoutPriority = c_float; -pub static NSLayoutPriorityRequired: NSLayoutPriority = 1000; - -pub static NSLayoutPriorityDefaultHigh: NSLayoutPriority = 750; - -pub static NSLayoutPriorityDragThatCanResizeWindow: NSLayoutPriority = 510; - -pub static NSLayoutPriorityWindowSizeStayPut: NSLayoutPriority = 500; - -pub static NSLayoutPriorityDragThatCannotResizeWindow: NSLayoutPriority = 490; - -pub static NSLayoutPriorityDefaultLow: NSLayoutPriority = 250; - -pub static NSLayoutPriorityFittingSizeCompression: NSLayoutPriority = 50; - -pub type NSLayoutConstraintOrientation = NSInteger; -pub const NSLayoutConstraintOrientationHorizontal: NSLayoutConstraintOrientation = 0; -pub const NSLayoutConstraintOrientationVertical: NSLayoutConstraintOrientation = 1; - -pub type NSLayoutRelation = NSInteger; -pub const NSLayoutRelationLessThanOrEqual: NSLayoutRelation = -1; -pub const NSLayoutRelationEqual: NSLayoutRelation = 0; -pub const NSLayoutRelationGreaterThanOrEqual: NSLayoutRelation = 1; - -pub type NSLayoutAttribute = NSInteger; -pub const NSLayoutAttributeLeft: NSLayoutAttribute = 1; -pub const NSLayoutAttributeRight: NSLayoutAttribute = 2; -pub const NSLayoutAttributeTop: NSLayoutAttribute = 3; -pub const NSLayoutAttributeBottom: NSLayoutAttribute = 4; -pub const NSLayoutAttributeLeading: NSLayoutAttribute = 5; -pub const NSLayoutAttributeTrailing: NSLayoutAttribute = 6; -pub const NSLayoutAttributeWidth: NSLayoutAttribute = 7; -pub const NSLayoutAttributeHeight: NSLayoutAttribute = 8; -pub const NSLayoutAttributeCenterX: NSLayoutAttribute = 9; -pub const NSLayoutAttributeCenterY: NSLayoutAttribute = 10; -pub const NSLayoutAttributeLastBaseline: 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 = 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_static!(NSLayoutPriorityRequired: NSLayoutPriority = 1000); + +extern_static!(NSLayoutPriorityDefaultHigh: NSLayoutPriority = 750); + +extern_static!(NSLayoutPriorityDragThatCanResizeWindow: NSLayoutPriority = 510); + +extern_static!(NSLayoutPriorityWindowSizeStayPut: NSLayoutPriority = 500); + +extern_static!(NSLayoutPriorityDragThatCannotResizeWindow: NSLayoutPriority = 490); + +extern_static!(NSLayoutPriorityDefaultLow: NSLayoutPriority = 250); + +extern_static!(NSLayoutPriorityFittingSizeCompression: NSLayoutPriority = 50); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSLayoutConstraintOrientation { + NSLayoutConstraintOrientationHorizontal = 0, + NSLayoutConstraintOrientationVertical = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSLayoutRelation { + NSLayoutRelationLessThanOrEqual = -1, + NSLayoutRelationEqual = 0, + NSLayoutRelationGreaterThanOrEqual = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSLayoutAttribute { + NSLayoutAttributeLeft = 1, + NSLayoutAttributeRight = 2, + NSLayoutAttributeTop = 3, + NSLayoutAttributeBottom = 4, + NSLayoutAttributeLeading = 5, + NSLayoutAttributeTrailing = 6, + NSLayoutAttributeWidth = 7, + NSLayoutAttributeHeight = 8, + NSLayoutAttributeCenterX = 9, + NSLayoutAttributeCenterY = 10, + NSLayoutAttributeLastBaseline = 11, + NSLayoutAttributeBaseline = NSLayoutAttributeLastBaseline, + NSLayoutAttributeFirstBaseline = 12, + NSLayoutAttributeNotAnAttribute = 0, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSLayoutFormatOptions { + NSLayoutFormatAlignAllLeft = 1 << NSLayoutAttributeLeft, + NSLayoutFormatAlignAllRight = 1 << NSLayoutAttributeRight, + NSLayoutFormatAlignAllTop = 1 << NSLayoutAttributeTop, + NSLayoutFormatAlignAllBottom = 1 << NSLayoutAttributeBottom, + NSLayoutFormatAlignAllLeading = 1 << NSLayoutAttributeLeading, + NSLayoutFormatAlignAllTrailing = 1 << NSLayoutAttributeTrailing, + NSLayoutFormatAlignAllCenterX = 1 << NSLayoutAttributeCenterX, + NSLayoutFormatAlignAllCenterY = 1 << NSLayoutAttributeCenterY, + NSLayoutFormatAlignAllLastBaseline = 1 << NSLayoutAttributeLastBaseline, + NSLayoutFormatAlignAllFirstBaseline = 1 << NSLayoutAttributeFirstBaseline, + NSLayoutFormatAlignAllBaseline = NSLayoutFormatAlignAllLastBaseline, + NSLayoutFormatAlignmentMask = 0xFFFF, + NSLayoutFormatDirectionLeadingToTrailing = 0 << 16, + NSLayoutFormatDirectionLeftToRight = 1 << 16, + NSLayoutFormatDirectionRightToLeft = 2 << 16, + NSLayoutFormatDirectionMask = 0x3 << 16, + } +); extern_class!( #[derive(Debug)] @@ -269,13 +282,9 @@ extern_methods!( } ); -extern "C" { - pub static NSViewNoInstrinsicMetric: CGFloat; -} +extern_static!(NSViewNoInstrinsicMetric: CGFloat); -extern "C" { - pub static NSViewNoIntrinsicMetric: CGFloat; -} +extern_static!(NSViewNoIntrinsicMetric: CGFloat); extern_methods!( /// NSConstraintBasedLayoutLayering diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index f83009e33..c6002de40 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -5,33 +5,49 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextLayoutOrientation = NSInteger; -pub const NSTextLayoutOrientationHorizontal: NSTextLayoutOrientation = 0; -pub const NSTextLayoutOrientationVertical: NSTextLayoutOrientation = 1; - -pub type NSGlyphProperty = NSInteger; -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 << 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; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextLayoutOrientation { + NSTextLayoutOrientationHorizontal = 0, + NSTextLayoutOrientationVertical = 1, + } +); + +ns_options!( + #[underlying(NSInteger)] + pub enum NSGlyphProperty { + NSGlyphPropertyNull = 1 << 0, + NSGlyphPropertyControlCharacter = 1 << 1, + NSGlyphPropertyElastic = 1 << 2, + NSGlyphPropertyNonBaseCharacter = 1 << 3, + } +); + +ns_options!( + #[underlying(NSInteger)] + pub enum NSControlCharacterAction { + NSControlCharacterActionZeroAdvancement = 1 << 0, + NSControlCharacterActionWhitespace = 1 << 1, + NSControlCharacterActionHorizontalTab = 1 << 2, + NSControlCharacterActionLineBreak = 1 << 3, + NSControlCharacterActionParagraphBreak = 1 << 4, + NSControlCharacterActionContainerBreak = 1 << 5, + } +); pub type NSTextLayoutOrientationProvider = NSObject; -pub type NSTypesetterBehavior = NSInteger; -pub const NSTypesetterLatestBehavior: NSTypesetterBehavior = -1; -pub const NSTypesetterOriginalBehavior: NSTypesetterBehavior = 0; -pub const NSTypesetterBehavior_10_2_WithCompatibility: NSTypesetterBehavior = 1; -pub const NSTypesetterBehavior_10_2: NSTypesetterBehavior = 2; -pub const NSTypesetterBehavior_10_3: NSTypesetterBehavior = 3; -pub const NSTypesetterBehavior_10_4: NSTypesetterBehavior = 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTypesetterBehavior { + NSTypesetterLatestBehavior = -1, + NSTypesetterOriginalBehavior = 0, + NSTypesetterBehavior_10_2_WithCompatibility = 1, + NSTypesetterBehavior_10_2 = 2, + NSTypesetterBehavior_10_3 = 3, + NSTypesetterBehavior_10_4 = 4, + } +); extern_class!( #[derive(Debug)] @@ -729,17 +745,26 @@ extern_methods!( pub type NSLayoutManagerDelegate = NSObject; -pub const NSGlyphAttributeSoft: c_uint = 0; -pub const NSGlyphAttributeElastic: c_uint = 1; -pub const NSGlyphAttributeBidiLevel: c_uint = 2; -pub const NSGlyphAttributeInscribe: c_uint = 5; - -pub type NSGlyphInscription = NSUInteger; -pub const NSGlyphInscribeBase: NSGlyphInscription = 0; -pub const NSGlyphInscribeBelow: NSGlyphInscription = 1; -pub const NSGlyphInscribeAbove: NSGlyphInscription = 2; -pub const NSGlyphInscribeOverstrike: NSGlyphInscription = 3; -pub const NSGlyphInscribeOverBelow: NSGlyphInscription = 4; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSGlyphAttributeSoft = 0, + NSGlyphAttributeElastic = 1, + NSGlyphAttributeBidiLevel = 2, + NSGlyphAttributeInscribe = 5, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSGlyphInscription { + NSGlyphInscribeBase = 0, + NSGlyphInscribeBelow = 1, + NSGlyphInscribeAbove = 2, + NSGlyphInscribeOverstrike = 3, + NSGlyphInscribeOverBelow = 4, + } +); extern_methods!( /// NSLayoutManagerDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs index 286bafb8a..f1bcba006 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicator.rs @@ -5,11 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSLevelIndicatorPlaceholderVisibility = NSInteger; -pub const NSLevelIndicatorPlaceholderVisibilityAutomatic: NSLevelIndicatorPlaceholderVisibility = 0; -pub const NSLevelIndicatorPlaceholderVisibilityAlways: NSLevelIndicatorPlaceholderVisibility = 1; -pub const NSLevelIndicatorPlaceholderVisibilityWhileEditing: NSLevelIndicatorPlaceholderVisibility = - 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSLevelIndicatorPlaceholderVisibility { + NSLevelIndicatorPlaceholderVisibilityAutomatic = 0, + NSLevelIndicatorPlaceholderVisibilityAlways = 1, + NSLevelIndicatorPlaceholderVisibilityWhileEditing = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs index 853e85f3b..abfd906be 100644 --- a/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs +++ b/crates/icrate/src/generated/AppKit/NSLevelIndicatorCell.rs @@ -5,11 +5,15 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSLevelIndicatorStyle = NSUInteger; -pub const NSLevelIndicatorStyleRelevancy: NSLevelIndicatorStyle = 0; -pub const NSLevelIndicatorStyleContinuousCapacity: NSLevelIndicatorStyle = 1; -pub const NSLevelIndicatorStyleDiscreteCapacity: NSLevelIndicatorStyle = 2; -pub const NSLevelIndicatorStyleRating: NSLevelIndicatorStyle = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSLevelIndicatorStyle { + NSLevelIndicatorStyleRelevancy = 0, + NSLevelIndicatorStyleContinuousCapacity = 1, + NSLevelIndicatorStyleDiscreteCapacity = 2, + NSLevelIndicatorStyleRating = 3, + } +); extern_class!( #[derive(Debug)] @@ -84,12 +88,18 @@ extern_methods!( } ); -pub static NSRelevancyLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleRelevancy; +extern_static!( + NSRelevancyLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleRelevancy +); -pub static NSContinuousCapacityLevelIndicatorStyle: NSLevelIndicatorStyle = - NSLevelIndicatorStyleContinuousCapacity; +extern_static!( + NSContinuousCapacityLevelIndicatorStyle: NSLevelIndicatorStyle = + NSLevelIndicatorStyleContinuousCapacity +); -pub static NSDiscreteCapacityLevelIndicatorStyle: NSLevelIndicatorStyle = - NSLevelIndicatorStyleDiscreteCapacity; +extern_static!( + NSDiscreteCapacityLevelIndicatorStyle: NSLevelIndicatorStyle = + NSLevelIndicatorStyleDiscreteCapacity +); -pub static NSRatingLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleRating; +extern_static!(NSRatingLevelIndicatorStyle: NSLevelIndicatorStyle = NSLevelIndicatorStyleRating); diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index dadddc84d..7a80e42be 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -5,11 +5,15 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSMatrixMode = NSUInteger; -pub const NSRadioModeMatrix: NSMatrixMode = 0; -pub const NSHighlightModeMatrix: NSMatrixMode = 1; -pub const NSListModeMatrix: NSMatrixMode = 2; -pub const NSTrackModeMatrix: NSMatrixMode = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSMatrixMode { + NSRadioModeMatrix = 0, + NSHighlightModeMatrix = 1, + NSListModeMatrix = 2, + NSTrackModeMatrix = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs index c1905f4e8..5a3984c85 100644 --- a/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs +++ b/crates/icrate/src/generated/AppKit/NSMediaLibraryBrowserController.rs @@ -5,10 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSMediaLibrary = NSUInteger; -pub const NSMediaLibraryAudio: NSMediaLibrary = 1 << 0; -pub const NSMediaLibraryImage: NSMediaLibrary = 1 << 1; -pub const NSMediaLibraryMovie: NSMediaLibrary = 1 << 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSMediaLibrary { + NSMediaLibraryAudio = 1 << 0, + NSMediaLibraryImage = 1 << 1, + NSMediaLibraryMovie = 1 << 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 63b9e9351..7ba9d4fd6 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -239,13 +239,17 @@ extern_methods!( pub type NSMenuDelegate = NSObject; -pub type NSMenuProperties = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSMenuProperties { + NSMenuPropertyItemTitle = 1 << 0, + NSMenuPropertyItemAttributedTitle = 1 << 1, + NSMenuPropertyItemKeyEquivalent = 1 << 2, + NSMenuPropertyItemImage = 1 << 3, + NSMenuPropertyItemEnabled = 1 << 4, + NSMenuPropertyItemAccessibilityDescription = 1 << 5, + } +); extern_methods!( /// NSMenuPropertiesToUpdate @@ -255,33 +259,19 @@ extern_methods!( } ); -extern "C" { - pub static NSMenuWillSendActionNotification: &'static NSNotificationName; -} +extern_static!(NSMenuWillSendActionNotification: &'static NSNotificationName); -extern "C" { - pub static NSMenuDidSendActionNotification: &'static NSNotificationName; -} +extern_static!(NSMenuDidSendActionNotification: &'static NSNotificationName); -extern "C" { - pub static NSMenuDidAddItemNotification: &'static NSNotificationName; -} +extern_static!(NSMenuDidAddItemNotification: &'static NSNotificationName); -extern "C" { - pub static NSMenuDidRemoveItemNotification: &'static NSNotificationName; -} +extern_static!(NSMenuDidRemoveItemNotification: &'static NSNotificationName); -extern "C" { - pub static NSMenuDidChangeItemNotification: &'static NSNotificationName; -} +extern_static!(NSMenuDidChangeItemNotification: &'static NSNotificationName); -extern "C" { - pub static NSMenuDidBeginTrackingNotification: &'static NSNotificationName; -} +extern_static!(NSMenuDidBeginTrackingNotification: &'static NSNotificationName); -extern "C" { - pub static NSMenuDidEndTrackingNotification: &'static NSNotificationName; -} +extern_static!(NSMenuDidEndTrackingNotification: &'static NSNotificationName); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSMenuItem.rs b/crates/icrate/src/generated/AppKit/NSMenuItem.rs index 86c5c6561..7ff145d6c 100644 --- a/crates/icrate/src/generated/AppKit/NSMenuItem.rs +++ b/crates/icrate/src/generated/AppKit/NSMenuItem.rs @@ -220,9 +220,7 @@ extern_methods!( } ); -extern "C" { - pub static NSMenuItemImportFromDeviceIdentifier: &'static NSUserInterfaceItemIdentifier; -} +extern_static!(NSMenuItemImportFromDeviceIdentifier: &'static NSUserInterfaceItemIdentifier); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSNib.rs b/crates/icrate/src/generated/AppKit/NSNib.rs index 9f126b513..900bf3d25 100644 --- a/crates/icrate/src/generated/AppKit/NSNib.rs +++ b/crates/icrate/src/generated/AppKit/NSNib.rs @@ -65,10 +65,6 @@ extern_methods!( } ); -extern "C" { - pub static NSNibOwner: &'static NSString; -} +extern_static!(NSNibOwner: &'static NSString); -extern "C" { - pub static NSNibTopLevelObjects: &'static NSString; -} +extern_static!(NSNibTopLevelObjects: &'static NSString); diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index 5c08eedfd..befc8a865 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -5,58 +5,72 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSOpenGLGlobalOption = u32; -pub const NSOpenGLGOFormatCacheSize: NSOpenGLGlobalOption = 501; -pub const NSOpenGLGOClearFormatCache: NSOpenGLGlobalOption = 502; -pub const NSOpenGLGORetainRenderers: NSOpenGLGlobalOption = 503; -pub const NSOpenGLGOUseBuildCache: NSOpenGLGlobalOption = 506; -pub const NSOpenGLGOResetLibrary: NSOpenGLGlobalOption = 504; - -pub const NSOpenGLPFAAllRenderers: c_uint = 1; -pub const NSOpenGLPFATripleBuffer: c_uint = 3; -pub const NSOpenGLPFADoubleBuffer: c_uint = 5; -pub const NSOpenGLPFAAuxBuffers: c_uint = 7; -pub const NSOpenGLPFAColorSize: c_uint = 8; -pub const NSOpenGLPFAAlphaSize: c_uint = 11; -pub const NSOpenGLPFADepthSize: c_uint = 12; -pub const NSOpenGLPFAStencilSize: c_uint = 13; -pub const NSOpenGLPFAAccumSize: c_uint = 14; -pub const NSOpenGLPFAMinimumPolicy: c_uint = 51; -pub const NSOpenGLPFAMaximumPolicy: c_uint = 52; -pub const NSOpenGLPFASampleBuffers: c_uint = 55; -pub const NSOpenGLPFASamples: c_uint = 56; -pub const NSOpenGLPFAAuxDepthStencil: c_uint = 57; -pub const NSOpenGLPFAColorFloat: c_uint = 58; -pub const NSOpenGLPFAMultisample: c_uint = 59; -pub const NSOpenGLPFASupersample: c_uint = 60; -pub const NSOpenGLPFASampleAlpha: c_uint = 61; -pub const NSOpenGLPFARendererID: c_uint = 70; -pub const NSOpenGLPFANoRecovery: c_uint = 72; -pub const NSOpenGLPFAAccelerated: c_uint = 73; -pub const NSOpenGLPFAClosestPolicy: c_uint = 74; -pub const NSOpenGLPFABackingStore: c_uint = 76; -pub const NSOpenGLPFAScreenMask: c_uint = 84; -pub const NSOpenGLPFAAllowOfflineRenderers: c_uint = 96; -pub const NSOpenGLPFAAcceleratedCompute: c_uint = 97; -pub const NSOpenGLPFAOpenGLProfile: c_uint = 99; -pub const NSOpenGLPFAVirtualScreenCount: c_uint = 128; -pub const NSOpenGLPFAStereo: c_uint = 6; -pub const NSOpenGLPFAOffScreen: c_uint = 53; -pub const NSOpenGLPFAFullScreen: c_uint = 54; -pub const NSOpenGLPFASingleRenderer: c_uint = 71; -pub const NSOpenGLPFARobust: c_uint = 75; -pub const NSOpenGLPFAMPSafe: c_uint = 78; -pub const NSOpenGLPFAWindow: c_uint = 80; -pub const NSOpenGLPFAMultiScreen: c_uint = 81; -pub const NSOpenGLPFACompliant: c_uint = 83; -pub const NSOpenGLPFAPixelBuffer: c_uint = 90; -pub const NSOpenGLPFARemotePixelBuffer: c_uint = 91; +ns_enum!( + #[underlying(u32)] + pub enum NSOpenGLGlobalOption { + NSOpenGLGOFormatCacheSize = 501, + NSOpenGLGOClearFormatCache = 502, + NSOpenGLGORetainRenderers = 503, + NSOpenGLGOUseBuildCache = 506, + NSOpenGLGOResetLibrary = 504, + } +); + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSOpenGLPFAAllRenderers = 1, + NSOpenGLPFATripleBuffer = 3, + NSOpenGLPFADoubleBuffer = 5, + NSOpenGLPFAAuxBuffers = 7, + NSOpenGLPFAColorSize = 8, + NSOpenGLPFAAlphaSize = 11, + NSOpenGLPFADepthSize = 12, + NSOpenGLPFAStencilSize = 13, + NSOpenGLPFAAccumSize = 14, + NSOpenGLPFAMinimumPolicy = 51, + NSOpenGLPFAMaximumPolicy = 52, + NSOpenGLPFASampleBuffers = 55, + NSOpenGLPFASamples = 56, + NSOpenGLPFAAuxDepthStencil = 57, + NSOpenGLPFAColorFloat = 58, + NSOpenGLPFAMultisample = 59, + NSOpenGLPFASupersample = 60, + NSOpenGLPFASampleAlpha = 61, + NSOpenGLPFARendererID = 70, + NSOpenGLPFANoRecovery = 72, + NSOpenGLPFAAccelerated = 73, + NSOpenGLPFAClosestPolicy = 74, + NSOpenGLPFABackingStore = 76, + NSOpenGLPFAScreenMask = 84, + NSOpenGLPFAAllowOfflineRenderers = 96, + NSOpenGLPFAAcceleratedCompute = 97, + NSOpenGLPFAOpenGLProfile = 99, + NSOpenGLPFAVirtualScreenCount = 128, + NSOpenGLPFAStereo = 6, + NSOpenGLPFAOffScreen = 53, + NSOpenGLPFAFullScreen = 54, + NSOpenGLPFASingleRenderer = 71, + NSOpenGLPFARobust = 75, + NSOpenGLPFAMPSafe = 78, + NSOpenGLPFAWindow = 80, + NSOpenGLPFAMultiScreen = 81, + NSOpenGLPFACompliant = 83, + NSOpenGLPFAPixelBuffer = 90, + NSOpenGLPFARemotePixelBuffer = 91, + } +); pub type NSOpenGLPixelFormatAttribute = u32; -pub const NSOpenGLProfileVersionLegacy: c_uint = 0x1000; -pub const NSOpenGLProfileVersion3_2Core: c_uint = 0x3200; -pub const NSOpenGLProfileVersion4_1Core: c_uint = 0x4100; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSOpenGLProfileVersionLegacy = 0x1000, + NSOpenGLProfileVersion3_2Core = 0x3200, + NSOpenGLProfileVersion4_1Core = 0x4100, + } +); extern_class!( #[derive(Debug)] @@ -156,22 +170,26 @@ extern_methods!( } ); -pub type NSOpenGLContextParameter = NSInteger; -pub const NSOpenGLContextParameterSwapInterval: NSOpenGLContextParameter = 222; -pub const NSOpenGLContextParameterSurfaceOrder: NSOpenGLContextParameter = 235; -pub const NSOpenGLContextParameterSurfaceOpacity: NSOpenGLContextParameter = 236; -pub const NSOpenGLContextParameterSurfaceBackingSize: NSOpenGLContextParameter = 304; -pub const NSOpenGLContextParameterReclaimResources: NSOpenGLContextParameter = 308; -pub const NSOpenGLContextParameterCurrentRendererID: NSOpenGLContextParameter = 309; -pub const NSOpenGLContextParameterGPUVertexProcessing: NSOpenGLContextParameter = 310; -pub const NSOpenGLContextParameterGPUFragmentProcessing: NSOpenGLContextParameter = 311; -pub const NSOpenGLContextParameterHasDrawable: NSOpenGLContextParameter = 314; -pub const NSOpenGLContextParameterMPSwapsInFlight: NSOpenGLContextParameter = 315; -pub const NSOpenGLContextParameterSwapRectangle: NSOpenGLContextParameter = 200; -pub const NSOpenGLContextParameterSwapRectangleEnable: NSOpenGLContextParameter = 201; -pub const NSOpenGLContextParameterRasterizationEnable: NSOpenGLContextParameter = 221; -pub const NSOpenGLContextParameterStateValidation: NSOpenGLContextParameter = 301; -pub const NSOpenGLContextParameterSurfaceSurfaceVolatile: NSOpenGLContextParameter = 306; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSOpenGLContextParameter { + NSOpenGLContextParameterSwapInterval = 222, + NSOpenGLContextParameterSurfaceOrder = 235, + NSOpenGLContextParameterSurfaceOpacity = 236, + NSOpenGLContextParameterSurfaceBackingSize = 304, + NSOpenGLContextParameterReclaimResources = 308, + NSOpenGLContextParameterCurrentRendererID = 309, + NSOpenGLContextParameterGPUVertexProcessing = 310, + NSOpenGLContextParameterGPUFragmentProcessing = 311, + NSOpenGLContextParameterHasDrawable = 314, + NSOpenGLContextParameterMPSwapsInFlight = 315, + NSOpenGLContextParameterSwapRectangle = 200, + NSOpenGLContextParameterSwapRectangleEnable = 201, + NSOpenGLContextParameterRasterizationEnable = 221, + NSOpenGLContextParameterStateValidation = 301, + NSOpenGLContextParameterSurfaceSurfaceVolatile = 306, + } +); extern_class!( #[derive(Debug)] @@ -306,44 +324,69 @@ extern_methods!( } ); -pub static NSOpenGLCPSwapInterval: NSOpenGLContextParameter = NSOpenGLContextParameterSwapInterval; +extern_static!( + NSOpenGLCPSwapInterval: NSOpenGLContextParameter = NSOpenGLContextParameterSwapInterval +); -pub static NSOpenGLCPSurfaceOrder: NSOpenGLContextParameter = NSOpenGLContextParameterSurfaceOrder; +extern_static!( + NSOpenGLCPSurfaceOrder: NSOpenGLContextParameter = NSOpenGLContextParameterSurfaceOrder +); -pub static NSOpenGLCPSurfaceOpacity: NSOpenGLContextParameter = - NSOpenGLContextParameterSurfaceOpacity; +extern_static!( + NSOpenGLCPSurfaceOpacity: NSOpenGLContextParameter = NSOpenGLContextParameterSurfaceOpacity +); -pub static NSOpenGLCPSurfaceBackingSize: NSOpenGLContextParameter = - NSOpenGLContextParameterSurfaceBackingSize; +extern_static!( + NSOpenGLCPSurfaceBackingSize: NSOpenGLContextParameter = + NSOpenGLContextParameterSurfaceBackingSize +); -pub static NSOpenGLCPReclaimResources: NSOpenGLContextParameter = - NSOpenGLContextParameterReclaimResources; +extern_static!( + NSOpenGLCPReclaimResources: NSOpenGLContextParameter = NSOpenGLContextParameterReclaimResources +); -pub static NSOpenGLCPCurrentRendererID: NSOpenGLContextParameter = - NSOpenGLContextParameterCurrentRendererID; +extern_static!( + NSOpenGLCPCurrentRendererID: NSOpenGLContextParameter = + NSOpenGLContextParameterCurrentRendererID +); -pub static NSOpenGLCPGPUVertexProcessing: NSOpenGLContextParameter = - NSOpenGLContextParameterGPUVertexProcessing; +extern_static!( + NSOpenGLCPGPUVertexProcessing: NSOpenGLContextParameter = + NSOpenGLContextParameterGPUVertexProcessing +); -pub static NSOpenGLCPGPUFragmentProcessing: NSOpenGLContextParameter = - NSOpenGLContextParameterGPUFragmentProcessing; +extern_static!( + NSOpenGLCPGPUFragmentProcessing: NSOpenGLContextParameter = + NSOpenGLContextParameterGPUFragmentProcessing +); -pub static NSOpenGLCPHasDrawable: NSOpenGLContextParameter = NSOpenGLContextParameterHasDrawable; +extern_static!( + NSOpenGLCPHasDrawable: NSOpenGLContextParameter = NSOpenGLContextParameterHasDrawable +); -pub static NSOpenGLCPMPSwapsInFlight: NSOpenGLContextParameter = - NSOpenGLContextParameterMPSwapsInFlight; +extern_static!( + NSOpenGLCPMPSwapsInFlight: NSOpenGLContextParameter = NSOpenGLContextParameterMPSwapsInFlight +); -pub static NSOpenGLCPSwapRectangle: NSOpenGLContextParameter = - NSOpenGLContextParameterSwapRectangle; +extern_static!( + NSOpenGLCPSwapRectangle: NSOpenGLContextParameter = NSOpenGLContextParameterSwapRectangle +); -pub static NSOpenGLCPSwapRectangleEnable: NSOpenGLContextParameter = - NSOpenGLContextParameterSwapRectangleEnable; +extern_static!( + NSOpenGLCPSwapRectangleEnable: NSOpenGLContextParameter = + NSOpenGLContextParameterSwapRectangleEnable +); -pub static NSOpenGLCPRasterizationEnable: NSOpenGLContextParameter = - NSOpenGLContextParameterRasterizationEnable; +extern_static!( + NSOpenGLCPRasterizationEnable: NSOpenGLContextParameter = + NSOpenGLContextParameterRasterizationEnable +); -pub static NSOpenGLCPStateValidation: NSOpenGLContextParameter = - NSOpenGLContextParameterStateValidation; +extern_static!( + NSOpenGLCPStateValidation: NSOpenGLContextParameter = NSOpenGLContextParameterStateValidation +); -pub static NSOpenGLCPSurfaceSurfaceVolatile: NSOpenGLContextParameter = - NSOpenGLContextParameterSurfaceSurfaceVolatile; +extern_static!( + NSOpenGLCPSurfaceSurfaceVolatile: NSOpenGLContextParameter = + NSOpenGLContextParameterSurfaceSurfaceVolatile +); diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index 8c19b262b..2db7e0335 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -5,7 +5,12 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub const NSOutlineViewDropOnItemIndex: c_int = -1; +extern_enum!( + #[underlying(c_int)] + pub enum { + NSOutlineViewDropOnItemIndex = -1, + } +); extern_class!( #[derive(Debug)] @@ -188,42 +193,22 @@ pub type NSOutlineViewDataSource = NSObject; pub type NSOutlineViewDelegate = NSObject; -extern "C" { - pub static NSOutlineViewDisclosureButtonKey: &'static NSUserInterfaceItemIdentifier; -} +extern_static!(NSOutlineViewDisclosureButtonKey: &'static NSUserInterfaceItemIdentifier); -extern "C" { - pub static NSOutlineViewShowHideButtonKey: &'static NSUserInterfaceItemIdentifier; -} +extern_static!(NSOutlineViewShowHideButtonKey: &'static NSUserInterfaceItemIdentifier); -extern "C" { - pub static NSOutlineViewSelectionDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSOutlineViewSelectionDidChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSOutlineViewColumnDidMoveNotification: &'static NSNotificationName; -} +extern_static!(NSOutlineViewColumnDidMoveNotification: &'static NSNotificationName); -extern "C" { - pub static NSOutlineViewColumnDidResizeNotification: &'static NSNotificationName; -} +extern_static!(NSOutlineViewColumnDidResizeNotification: &'static NSNotificationName); -extern "C" { - pub static NSOutlineViewSelectionIsChangingNotification: &'static NSNotificationName; -} +extern_static!(NSOutlineViewSelectionIsChangingNotification: &'static NSNotificationName); -extern "C" { - pub static NSOutlineViewItemWillExpandNotification: &'static NSNotificationName; -} +extern_static!(NSOutlineViewItemWillExpandNotification: &'static NSNotificationName); -extern "C" { - pub static NSOutlineViewItemDidExpandNotification: &'static NSNotificationName; -} +extern_static!(NSOutlineViewItemDidExpandNotification: &'static NSNotificationName); -extern "C" { - pub static NSOutlineViewItemWillCollapseNotification: &'static NSNotificationName; -} +extern_static!(NSOutlineViewItemWillCollapseNotification: &'static NSNotificationName); -extern "C" { - pub static NSOutlineViewItemDidCollapseNotification: &'static NSNotificationName; -} +extern_static!(NSOutlineViewItemDidCollapseNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs index b1e846ffc..7d6702c73 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs @@ -5,10 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPDFPanelOptions = NSInteger; -pub const NSPDFPanelShowsPaperSize: NSPDFPanelOptions = 1 << 2; -pub const NSPDFPanelShowsOrientation: NSPDFPanelOptions = 1 << 3; -pub const NSPDFPanelRequestsParentDirectory: NSPDFPanelOptions = 1 << 24; +ns_options!( + #[underlying(NSInteger)] + pub enum NSPDFPanelOptions { + NSPDFPanelShowsPaperSize = 1 << 2, + NSPDFPanelShowsOrientation = 1 << 3, + NSPDFPanelRequestsParentDirectory = 1 << 24, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPageController.rs b/crates/icrate/src/generated/AppKit/NSPageController.rs index d07092884..159c6a5d3 100644 --- a/crates/icrate/src/generated/AppKit/NSPageController.rs +++ b/crates/icrate/src/generated/AppKit/NSPageController.rs @@ -7,10 +7,14 @@ use crate::Foundation::*; pub type NSPageControllerObjectIdentifier = NSString; -pub type NSPageControllerTransitionStyle = NSInteger; -pub const NSPageControllerTransitionStyleStackHistory: NSPageControllerTransitionStyle = 0; -pub const NSPageControllerTransitionStyleStackBook: NSPageControllerTransitionStyle = 1; -pub const NSPageControllerTransitionStyleHorizontalStrip: NSPageControllerTransitionStyle = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPageControllerTransitionStyle { + NSPageControllerTransitionStyleStackHistory = 0, + NSPageControllerTransitionStyleStackBook = 1, + NSPageControllerTransitionStyleHorizontalStrip = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index b6a5e114c..9fe5ae7a2 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -36,10 +36,20 @@ extern_methods!( } ); -pub const NSAlertDefaultReturn: c_int = 1; -pub const NSAlertAlternateReturn: c_int = 0; -pub const NSAlertOtherReturn: c_int = -1; -pub const NSAlertErrorReturn: c_int = -2; +extern_enum!( + #[underlying(c_int)] + pub enum { + NSAlertDefaultReturn = 1, + NSAlertAlternateReturn = 0, + NSAlertOtherReturn = -1, + NSAlertErrorReturn = -2, + } +); -pub const NSOKButton: c_uint = NSModalResponseOK; -pub const NSCancelButton: c_uint = NSModalResponseCancel; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSOKButton = NSModalResponseOK, + NSCancelButton = NSModalResponseCancel, + } +); diff --git a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs index 9f2ed9613..7bd38f9c6 100644 --- a/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSParagraphStyle.rs @@ -5,25 +5,31 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSLineBreakMode = NSUInteger; -pub const NSLineBreakByWordWrapping: NSLineBreakMode = 0; -pub const NSLineBreakByCharWrapping: NSLineBreakMode = 1; -pub const NSLineBreakByClipping: NSLineBreakMode = 2; -pub const NSLineBreakByTruncatingHead: NSLineBreakMode = 3; -pub const NSLineBreakByTruncatingTail: NSLineBreakMode = 4; -pub const NSLineBreakByTruncatingMiddle: NSLineBreakMode = 5; - -pub type NSLineBreakStrategy = NSUInteger; -pub const NSLineBreakStrategyNone: NSLineBreakStrategy = 0; -pub const NSLineBreakStrategyPushOut: NSLineBreakStrategy = 1 << 0; -pub const NSLineBreakStrategyHangulWordPriority: NSLineBreakStrategy = 1 << 1; -pub const NSLineBreakStrategyStandard: NSLineBreakStrategy = 0xFFFF; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSLineBreakMode { + NSLineBreakByWordWrapping = 0, + NSLineBreakByCharWrapping = 1, + NSLineBreakByClipping = 2, + NSLineBreakByTruncatingHead = 3, + NSLineBreakByTruncatingTail = 4, + NSLineBreakByTruncatingMiddle = 5, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSLineBreakStrategy { + NSLineBreakStrategyNone = 0, + NSLineBreakStrategyPushOut = 1 << 0, + NSLineBreakStrategyHangulWordPriority = 1 << 1, + NSLineBreakStrategyStandard = 0xFFFF, + } +); pub type NSTextTabOptionKey = NSString; -extern "C" { - pub static NSTabColumnTerminatorsAttributeName: &'static NSTextTabOptionKey; -} +extern_static!(NSTabColumnTerminatorsAttributeName: &'static NSTextTabOptionKey); extern_class!( #[derive(Debug)] @@ -307,11 +313,15 @@ extern_methods!( } ); -pub type NSTextTabType = NSUInteger; -pub const NSLeftTabStopType: NSTextTabType = 0; -pub const NSRightTabStopType: NSTextTabType = 1; -pub const NSCenterTabStopType: NSTextTabType = 2; -pub const NSDecimalTabStopType: NSTextTabType = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTextTabType { + NSLeftTabStopType = 0, + NSRightTabStopType = 1, + NSCenterTabStopType = 2, + NSDecimalTabStopType = 3, + } +); extern_methods!( /// NSTextTabDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index 62e38da83..f98c0fbbd 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -7,105 +7,64 @@ use crate::Foundation::*; pub type NSPasteboardType = NSString; -extern "C" { - pub static NSPasteboardTypeString: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeString: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypePDF: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypePDF: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeTIFF: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeTIFF: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypePNG: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypePNG: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeRTF: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeRTF: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeRTFD: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeRTFD: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeHTML: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeHTML: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeTabularText: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeTabularText: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeFont: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeFont: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeRuler: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeRuler: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeColor: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeColor: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeSound: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeSound: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeMultipleTextSelection: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeMultipleTextSelection: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeTextFinderOptions: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeTextFinderOptions: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeURL: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeURL: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeFileURL: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeFileURL: &'static NSPasteboardType); pub type NSPasteboardName = NSString; -extern "C" { - pub static NSPasteboardNameGeneral: &'static NSPasteboardName; -} +extern_static!(NSPasteboardNameGeneral: &'static NSPasteboardName); -extern "C" { - pub static NSPasteboardNameFont: &'static NSPasteboardName; -} +extern_static!(NSPasteboardNameFont: &'static NSPasteboardName); -extern "C" { - pub static NSPasteboardNameRuler: &'static NSPasteboardName; -} +extern_static!(NSPasteboardNameRuler: &'static NSPasteboardName); -extern "C" { - pub static NSPasteboardNameFind: &'static NSPasteboardName; -} +extern_static!(NSPasteboardNameFind: &'static NSPasteboardName); -extern "C" { - pub static NSPasteboardNameDrag: &'static NSPasteboardName; -} +extern_static!(NSPasteboardNameDrag: &'static NSPasteboardName); -pub type NSPasteboardContentsOptions = NSUInteger; -pub const NSPasteboardContentsCurrentHostOnly: NSPasteboardContentsOptions = 1 << 0; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSPasteboardContentsOptions { + NSPasteboardContentsCurrentHostOnly = 1 << 0, + } +); pub type NSPasteboardReadingOptionKey = NSString; -extern "C" { - pub static NSPasteboardURLReadingFileURLsOnlyKey: &'static NSPasteboardReadingOptionKey; -} +extern_static!(NSPasteboardURLReadingFileURLsOnlyKey: &'static NSPasteboardReadingOptionKey); -extern "C" { - pub static NSPasteboardURLReadingContentsConformToTypesKey: - &'static NSPasteboardReadingOptionKey; -} +extern_static!( + NSPasteboardURLReadingContentsConformToTypesKey: &'static NSPasteboardReadingOptionKey +); extern_class!( #[derive(Debug)] @@ -275,16 +234,24 @@ extern_methods!( } ); -pub type NSPasteboardWritingOptions = NSUInteger; -pub const NSPasteboardWritingPromised: NSPasteboardWritingOptions = 1 << 9; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSPasteboardWritingOptions { + NSPasteboardWritingPromised = 1 << 9, + } +); pub type NSPasteboardWriting = NSObject; -pub type NSPasteboardReadingOptions = NSUInteger; -pub const NSPasteboardReadingAsData: NSPasteboardReadingOptions = 0; -pub const NSPasteboardReadingAsString: NSPasteboardReadingOptions = 1 << 0; -pub const NSPasteboardReadingAsPropertyList: NSPasteboardReadingOptions = 1 << 1; -pub const NSPasteboardReadingAsKeyedArchive: NSPasteboardReadingOptions = 1 << 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSPasteboardReadingOptions { + NSPasteboardReadingAsData = 0, + NSPasteboardReadingAsString = 1 << 0, + NSPasteboardReadingAsPropertyList = 1 << 1, + NSPasteboardReadingAsKeyedArchive = 1 << 2, + } +); pub type NSPasteboardReading = NSObject; @@ -325,102 +292,52 @@ extern_methods!( } ); -extern "C" { - pub static NSFileContentsPboardType: &'static NSPasteboardType; -} +extern_static!(NSFileContentsPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSStringPboardType: &'static NSPasteboardType; -} +extern_static!(NSStringPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSFilenamesPboardType: &'static NSPasteboardType; -} +extern_static!(NSFilenamesPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSTIFFPboardType: &'static NSPasteboardType; -} +extern_static!(NSTIFFPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSRTFPboardType: &'static NSPasteboardType; -} +extern_static!(NSRTFPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSTabularTextPboardType: &'static NSPasteboardType; -} +extern_static!(NSTabularTextPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSFontPboardType: &'static NSPasteboardType; -} +extern_static!(NSFontPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSRulerPboardType: &'static NSPasteboardType; -} +extern_static!(NSRulerPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSColorPboardType: &'static NSPasteboardType; -} +extern_static!(NSColorPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSRTFDPboardType: &'static NSPasteboardType; -} +extern_static!(NSRTFDPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSHTMLPboardType: &'static NSPasteboardType; -} +extern_static!(NSHTMLPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSURLPboardType: &'static NSPasteboardType; -} +extern_static!(NSURLPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSPDFPboardType: &'static NSPasteboardType; -} +extern_static!(NSPDFPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSMultipleTextSelectionPboardType: &'static NSPasteboardType; -} +extern_static!(NSMultipleTextSelectionPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSPostScriptPboardType: &'static NSPasteboardType; -} +extern_static!(NSPostScriptPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSVCardPboardType: &'static NSPasteboardType; -} +extern_static!(NSVCardPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSInkTextPboardType: &'static NSPasteboardType; -} +extern_static!(NSInkTextPboardType: &'static NSPasteboardType); -extern "C" { - pub static NSFilesPromisePboardType: &'static NSPasteboardType; -} +extern_static!(NSFilesPromisePboardType: &'static NSPasteboardType); -extern "C" { - pub static NSPasteboardTypeFindPanelSearchOptions: &'static NSPasteboardType; -} +extern_static!(NSPasteboardTypeFindPanelSearchOptions: &'static NSPasteboardType); -extern "C" { - pub static NSGeneralPboard: &'static NSPasteboardName; -} +extern_static!(NSGeneralPboard: &'static NSPasteboardName); -extern "C" { - pub static NSFontPboard: &'static NSPasteboardName; -} +extern_static!(NSFontPboard: &'static NSPasteboardName); -extern "C" { - pub static NSRulerPboard: &'static NSPasteboardName; -} +extern_static!(NSRulerPboard: &'static NSPasteboardName); -extern "C" { - pub static NSFindPboard: &'static NSPasteboardName; -} +extern_static!(NSFindPboard: &'static NSPasteboardName); -extern "C" { - pub static NSDragPboard: &'static NSPasteboardName; -} +extern_static!(NSDragPboard: &'static NSPasteboardName); -extern "C" { - pub static NSPICTPboardType: &'static NSPasteboardType; -} +extern_static!(NSPICTPboardType: &'static NSPasteboardType); diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs index 7ccc2d658..d8f4b4a45 100644 --- a/crates/icrate/src/generated/AppKit/NSPathCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -5,10 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPathStyle = NSInteger; -pub const NSPathStyleStandard: NSPathStyle = 0; -pub const NSPathStylePopUp: NSPathStyle = 2; -pub const NSPathStyleNavigationBar: NSPathStyle = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPathStyle { + NSPathStyleStandard = 0, + NSPathStylePopUp = 2, + NSPathStyleNavigationBar = 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs index 94e07582b..aafd33892 100644 --- a/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPickerTouchBarItem.rs @@ -5,18 +5,23 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPickerTouchBarItemSelectionMode = NSInteger; -pub const NSPickerTouchBarItemSelectionModeSelectOne: NSPickerTouchBarItemSelectionMode = 0; -pub const NSPickerTouchBarItemSelectionModeSelectAny: NSPickerTouchBarItemSelectionMode = 1; -pub const NSPickerTouchBarItemSelectionModeMomentary: NSPickerTouchBarItemSelectionMode = 2; - -pub type NSPickerTouchBarItemControlRepresentation = NSInteger; -pub const NSPickerTouchBarItemControlRepresentationAutomatic: - NSPickerTouchBarItemControlRepresentation = 0; -pub const NSPickerTouchBarItemControlRepresentationExpanded: - NSPickerTouchBarItemControlRepresentation = 1; -pub const NSPickerTouchBarItemControlRepresentationCollapsed: - NSPickerTouchBarItemControlRepresentation = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPickerTouchBarItemSelectionMode { + NSPickerTouchBarItemSelectionModeSelectOne = 0, + NSPickerTouchBarItemSelectionModeSelectAny = 1, + NSPickerTouchBarItemSelectionModeMomentary = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPickerTouchBarItemControlRepresentation { + NSPickerTouchBarItemControlRepresentationAutomatic = 0, + NSPickerTouchBarItemControlRepresentationExpanded = 1, + NSPickerTouchBarItemControlRepresentationCollapsed = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs index 6c434cf56..787527fbf 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButton.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButton.rs @@ -137,6 +137,4 @@ extern_methods!( } ); -extern "C" { - pub static NSPopUpButtonWillPopUpNotification: &'static NSNotificationName; -} +extern_static!(NSPopUpButtonWillPopUpNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs index 9c97708fd..0d0de55d3 100644 --- a/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPopUpButtonCell.rs @@ -5,10 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPopUpArrowPosition = NSUInteger; -pub const NSPopUpNoArrow: NSPopUpArrowPosition = 0; -pub const NSPopUpArrowAtCenter: NSPopUpArrowPosition = 1; -pub const NSPopUpArrowAtBottom: NSPopUpArrowPosition = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPopUpArrowPosition { + NSPopUpNoArrow = 0, + NSPopUpArrowAtCenter = 1, + NSPopUpArrowAtBottom = 2, + } +); extern_class!( #[derive(Debug)] @@ -172,6 +176,4 @@ extern_methods!( } ); -extern "C" { - pub static NSPopUpButtonCellWillPopUpNotification: &'static NSNotificationName; -} +extern_static!(NSPopUpButtonCellWillPopUpNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index d7eb443d3..b49b87a37 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -5,14 +5,22 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPopoverAppearance = NSInteger; -pub const NSPopoverAppearanceMinimal: NSPopoverAppearance = 0; -pub const NSPopoverAppearanceHUD: NSPopoverAppearance = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPopoverAppearance { + NSPopoverAppearanceMinimal = 0, + NSPopoverAppearanceHUD = 1, + } +); -pub type NSPopoverBehavior = NSInteger; -pub const NSPopoverBehaviorApplicationDefined: NSPopoverBehavior = 0; -pub const NSPopoverBehaviorTransient: NSPopoverBehavior = 1; -pub const NSPopoverBehaviorSemitransient: NSPopoverBehavior = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPopoverBehavior { + NSPopoverBehaviorApplicationDefined = 0, + NSPopoverBehaviorTransient = 1, + NSPopoverBehaviorSemitransient = 2, + } +); extern_class!( #[derive(Debug)] @@ -101,34 +109,20 @@ extern_methods!( } ); -extern "C" { - pub static NSPopoverCloseReasonKey: &'static NSString; -} +extern_static!(NSPopoverCloseReasonKey: &'static NSString); pub type NSPopoverCloseReasonValue = NSString; -extern "C" { - pub static NSPopoverCloseReasonStandard: &'static NSPopoverCloseReasonValue; -} +extern_static!(NSPopoverCloseReasonStandard: &'static NSPopoverCloseReasonValue); -extern "C" { - pub static NSPopoverCloseReasonDetachToWindow: &'static NSPopoverCloseReasonValue; -} +extern_static!(NSPopoverCloseReasonDetachToWindow: &'static NSPopoverCloseReasonValue); -extern "C" { - pub static NSPopoverWillShowNotification: &'static NSNotificationName; -} +extern_static!(NSPopoverWillShowNotification: &'static NSNotificationName); -extern "C" { - pub static NSPopoverDidShowNotification: &'static NSNotificationName; -} +extern_static!(NSPopoverDidShowNotification: &'static NSNotificationName); -extern "C" { - pub static NSPopoverWillCloseNotification: &'static NSNotificationName; -} +extern_static!(NSPopoverWillCloseNotification: &'static NSNotificationName); -extern "C" { - pub static NSPopoverDidCloseNotification: &'static NSNotificationName; -} +extern_static!(NSPopoverDidCloseNotification: &'static NSNotificationName); pub type NSPopoverDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs index 62ff39240..6dcfe3113 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintInfo.rs @@ -5,154 +5,94 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPaperOrientation = NSInteger; -pub const NSPaperOrientationPortrait: NSPaperOrientation = 0; -pub const NSPaperOrientationLandscape: NSPaperOrientation = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPaperOrientation { + NSPaperOrientationPortrait = 0, + NSPaperOrientationLandscape = 1, + } +); -pub type NSPrintingPaginationMode = NSUInteger; -pub const NSPrintingPaginationModeAutomatic: NSPrintingPaginationMode = 0; -pub const NSPrintingPaginationModeFit: NSPrintingPaginationMode = 1; -pub const NSPrintingPaginationModeClip: NSPrintingPaginationMode = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPrintingPaginationMode { + NSPrintingPaginationModeAutomatic = 0, + NSPrintingPaginationModeFit = 1, + NSPrintingPaginationModeClip = 2, + } +); pub type NSPrintInfoAttributeKey = NSString; -extern "C" { - pub static NSPrintPaperName: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintPaperName: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintPaperSize: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintPaperSize: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintOrientation: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintOrientation: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintScalingFactor: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintScalingFactor: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintLeftMargin: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintLeftMargin: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintRightMargin: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintRightMargin: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintTopMargin: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintTopMargin: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintBottomMargin: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintBottomMargin: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintHorizontallyCentered: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintHorizontallyCentered: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintVerticallyCentered: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintVerticallyCentered: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintHorizontalPagination: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintHorizontalPagination: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintVerticalPagination: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintVerticalPagination: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintPrinter: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintPrinter: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintCopies: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintCopies: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintAllPages: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintAllPages: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintFirstPage: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintFirstPage: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintLastPage: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintLastPage: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintMustCollate: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintMustCollate: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintReversePageOrder: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintReversePageOrder: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintJobDisposition: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintJobDisposition: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintPagesAcross: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintPagesAcross: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintPagesDown: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintPagesDown: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintTime: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintTime: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintDetailedErrorReporting: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintDetailedErrorReporting: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintFaxNumber: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintFaxNumber: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintPrinterName: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintPrinterName: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintSelectionOnly: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintSelectionOnly: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintJobSavingURL: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintJobSavingURL: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintJobSavingFileNameExtensionHidden: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintJobSavingFileNameExtensionHidden: &'static NSPrintInfoAttributeKey); -extern "C" { - pub static NSPrintHeaderAndFooter: &'static NSPrintInfoAttributeKey; -} +extern_static!(NSPrintHeaderAndFooter: &'static NSPrintInfoAttributeKey); pub type NSPrintJobDispositionValue = NSString; -extern "C" { - pub static NSPrintSpoolJob: &'static NSPrintJobDispositionValue; -} +extern_static!(NSPrintSpoolJob: &'static NSPrintJobDispositionValue); -extern "C" { - pub static NSPrintPreviewJob: &'static NSPrintJobDispositionValue; -} +extern_static!(NSPrintPreviewJob: &'static NSPrintJobDispositionValue); -extern "C" { - pub static NSPrintSaveJob: &'static NSPrintJobDispositionValue; -} +extern_static!(NSPrintSaveJob: &'static NSPrintJobDispositionValue); -extern "C" { - pub static NSPrintCancelJob: &'static NSPrintJobDispositionValue; -} +extern_static!(NSPrintCancelJob: &'static NSPrintJobDispositionValue); pub type NSPrintInfoSettingKey = NSString; @@ -334,36 +274,28 @@ extern_methods!( } ); -extern "C" { - pub static NSPrintFormName: &'static NSString; -} +extern_static!(NSPrintFormName: &'static NSString); -extern "C" { - pub static NSPrintJobFeatures: &'static NSString; -} +extern_static!(NSPrintJobFeatures: &'static NSString); -extern "C" { - pub static NSPrintManualFeed: &'static NSString; -} +extern_static!(NSPrintManualFeed: &'static NSString); -extern "C" { - pub static NSPrintPagesPerSheet: &'static NSString; -} +extern_static!(NSPrintPagesPerSheet: &'static NSString); -extern "C" { - pub static NSPrintPaperFeed: &'static NSString; -} +extern_static!(NSPrintPaperFeed: &'static NSString); -extern "C" { - pub static NSPrintSavePath: &'static NSString; -} +extern_static!(NSPrintSavePath: &'static NSString); -pub type NSPrintingOrientation = NSUInteger; -pub const NSPortraitOrientation: NSPrintingOrientation = 0; -pub const NSLandscapeOrientation: NSPrintingOrientation = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPrintingOrientation { + NSPortraitOrientation = 0, + NSLandscapeOrientation = 1, + } +); -pub static NSAutoPagination: NSPrintingPaginationMode = NSPrintingPaginationModeAutomatic; +extern_static!(NSAutoPagination: NSPrintingPaginationMode = NSPrintingPaginationModeAutomatic); -pub static NSFitPagination: NSPrintingPaginationMode = NSPrintingPaginationModeFit; +extern_static!(NSFitPagination: NSPrintingPaginationMode = NSPrintingPaginationModeFit); -pub static NSClipPagination: NSPrintingPaginationMode = NSPrintingPaginationModeClip; +extern_static!(NSClipPagination: NSPrintingPaginationMode = NSPrintingPaginationModeClip); diff --git a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs index 447520085..95bfa9583 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintOperation.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintOperation.rs @@ -5,19 +5,25 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPrintingPageOrder = NSInteger; -pub const NSDescendingPageOrder: NSPrintingPageOrder = -1; -pub const NSSpecialPageOrder: NSPrintingPageOrder = 0; -pub const NSAscendingPageOrder: NSPrintingPageOrder = 1; -pub const NSUnknownPageOrder: NSPrintingPageOrder = 2; - -pub type NSPrintRenderingQuality = NSInteger; -pub const NSPrintRenderingQualityBest: NSPrintRenderingQuality = 0; -pub const NSPrintRenderingQualityResponsive: NSPrintRenderingQuality = 1; - -extern "C" { - pub static NSPrintOperationExistsException: &'static NSExceptionName; -} +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPrintingPageOrder { + NSDescendingPageOrder = -1, + NSSpecialPageOrder = 0, + NSAscendingPageOrder = 1, + NSUnknownPageOrder = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPrintRenderingQuality { + NSPrintRenderingQualityBest = 0, + NSPrintRenderingQualityResponsive = 1, + } +); + +extern_static!(NSPrintOperationExistsException: &'static NSExceptionName); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index 4400d1ef8..f1c7dd0d5 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -5,40 +5,35 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPrintPanelOptions = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSPrintPanelOptions { + NSPrintPanelShowsCopies = 1 << 0, + NSPrintPanelShowsPageRange = 1 << 1, + NSPrintPanelShowsPaperSize = 1 << 2, + NSPrintPanelShowsOrientation = 1 << 3, + NSPrintPanelShowsScaling = 1 << 4, + NSPrintPanelShowsPrintSelection = 1 << 5, + NSPrintPanelShowsPageSetupAccessory = 1 << 8, + NSPrintPanelShowsPreview = 1 << 17, + } +); pub type NSPrintPanelJobStyleHint = NSString; -extern "C" { - pub static NSPrintPhotoJobStyleHint: &'static NSPrintPanelJobStyleHint; -} +extern_static!(NSPrintPhotoJobStyleHint: &'static NSPrintPanelJobStyleHint); -extern "C" { - pub static NSPrintAllPresetsJobStyleHint: &'static NSPrintPanelJobStyleHint; -} +extern_static!(NSPrintAllPresetsJobStyleHint: &'static NSPrintPanelJobStyleHint); -extern "C" { - pub static NSPrintNoPresetsJobStyleHint: &'static NSPrintPanelJobStyleHint; -} +extern_static!(NSPrintNoPresetsJobStyleHint: &'static NSPrintPanelJobStyleHint); pub type NSPrintPanelAccessorySummaryKey = NSString; -extern "C" { - pub static NSPrintPanelAccessorySummaryItemNameKey: &'static NSPrintPanelAccessorySummaryKey; -} +extern_static!(NSPrintPanelAccessorySummaryItemNameKey: &'static NSPrintPanelAccessorySummaryKey); -extern "C" { - pub static NSPrintPanelAccessorySummaryItemDescriptionKey: - &'static NSPrintPanelAccessorySummaryKey; -} +extern_static!( + NSPrintPanelAccessorySummaryItemDescriptionKey: &'static NSPrintPanelAccessorySummaryKey +); pub type NSPrintPanelAccessorizing = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSPrinter.rs b/crates/icrate/src/generated/AppKit/NSPrinter.rs index 9495d9959..494ba4bdf 100644 --- a/crates/icrate/src/generated/AppKit/NSPrinter.rs +++ b/crates/icrate/src/generated/AppKit/NSPrinter.rs @@ -5,10 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPrinterTableStatus = NSUInteger; -pub const NSPrinterTableOK: NSPrinterTableStatus = 0; -pub const NSPrinterTableNotFound: NSPrinterTableStatus = 1; -pub const NSPrinterTableError: NSPrinterTableStatus = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPrinterTableStatus { + NSPrinterTableOK = 0, + NSPrinterTableNotFound = 1, + NSPrinterTableError = 2, + } +); pub type NSPrinterTypeName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs index ba3bbcd3e..5603f94ab 100644 --- a/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs +++ b/crates/icrate/src/generated/AppKit/NSProgressIndicator.rs @@ -5,9 +5,13 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSProgressIndicatorStyle = NSUInteger; -pub const NSProgressIndicatorStyleBar: NSProgressIndicatorStyle = 0; -pub const NSProgressIndicatorStyleSpinning: NSProgressIndicatorStyle = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSProgressIndicatorStyle { + NSProgressIndicatorStyleBar = 0, + NSProgressIndicatorStyleSpinning = 1, + } +); extern_class!( #[derive(Debug)] @@ -94,16 +98,21 @@ extern_methods!( } ); -pub type NSProgressIndicatorThickness = NSUInteger; -pub const NSProgressIndicatorPreferredThickness: NSProgressIndicatorThickness = 14; -pub const NSProgressIndicatorPreferredSmallThickness: NSProgressIndicatorThickness = 10; -pub const NSProgressIndicatorPreferredLargeThickness: NSProgressIndicatorThickness = 18; -pub const NSProgressIndicatorPreferredAquaThickness: NSProgressIndicatorThickness = 12; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSProgressIndicatorThickness { + NSProgressIndicatorPreferredThickness = 14, + NSProgressIndicatorPreferredSmallThickness = 10, + NSProgressIndicatorPreferredLargeThickness = 18, + NSProgressIndicatorPreferredAquaThickness = 12, + } +); -pub static NSProgressIndicatorBarStyle: NSProgressIndicatorStyle = NSProgressIndicatorStyleBar; +extern_static!(NSProgressIndicatorBarStyle: NSProgressIndicatorStyle = NSProgressIndicatorStyleBar); -pub static NSProgressIndicatorSpinningStyle: NSProgressIndicatorStyle = - NSProgressIndicatorStyleSpinning; +extern_static!( + NSProgressIndicatorSpinningStyle: NSProgressIndicatorStyle = NSProgressIndicatorStyleSpinning +); extern_methods!( /// NSProgressIndicatorDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index 68aed8a0d..ef54530c1 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -7,43 +7,37 @@ use crate::Foundation::*; pub type NSRuleEditorPredicatePartKey = NSString; -extern "C" { - pub static NSRuleEditorPredicateLeftExpression: &'static NSRuleEditorPredicatePartKey; -} +extern_static!(NSRuleEditorPredicateLeftExpression: &'static NSRuleEditorPredicatePartKey); -extern "C" { - pub static NSRuleEditorPredicateRightExpression: &'static NSRuleEditorPredicatePartKey; -} +extern_static!(NSRuleEditorPredicateRightExpression: &'static NSRuleEditorPredicatePartKey); -extern "C" { - pub static NSRuleEditorPredicateComparisonModifier: &'static NSRuleEditorPredicatePartKey; -} +extern_static!(NSRuleEditorPredicateComparisonModifier: &'static NSRuleEditorPredicatePartKey); -extern "C" { - pub static NSRuleEditorPredicateOptions: &'static NSRuleEditorPredicatePartKey; -} +extern_static!(NSRuleEditorPredicateOptions: &'static NSRuleEditorPredicatePartKey); -extern "C" { - pub static NSRuleEditorPredicateOperatorType: &'static NSRuleEditorPredicatePartKey; -} +extern_static!(NSRuleEditorPredicateOperatorType: &'static NSRuleEditorPredicatePartKey); -extern "C" { - pub static NSRuleEditorPredicateCustomSelector: &'static NSRuleEditorPredicatePartKey; -} +extern_static!(NSRuleEditorPredicateCustomSelector: &'static NSRuleEditorPredicatePartKey); -extern "C" { - pub static NSRuleEditorPredicateCompoundType: &'static NSRuleEditorPredicatePartKey; -} +extern_static!(NSRuleEditorPredicateCompoundType: &'static NSRuleEditorPredicatePartKey); -pub type NSRuleEditorNestingMode = NSUInteger; -pub const NSRuleEditorNestingModeSingle: NSRuleEditorNestingMode = 0; -pub const NSRuleEditorNestingModeList: NSRuleEditorNestingMode = 1; -pub const NSRuleEditorNestingModeCompound: NSRuleEditorNestingMode = 2; -pub const NSRuleEditorNestingModeSimple: NSRuleEditorNestingMode = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSRuleEditorNestingMode { + NSRuleEditorNestingModeSingle = 0, + NSRuleEditorNestingModeList = 1, + NSRuleEditorNestingModeCompound = 2, + NSRuleEditorNestingModeSimple = 3, + } +); -pub type NSRuleEditorRowType = NSUInteger; -pub const NSRuleEditorRowTypeSimple: NSRuleEditorRowType = 0; -pub const NSRuleEditorRowTypeCompound: NSRuleEditorRowType = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSRuleEditorRowType { + NSRuleEditorRowTypeSimple = 0, + NSRuleEditorRowTypeCompound = 1, + } +); extern_class!( #[derive(Debug)] @@ -213,6 +207,4 @@ extern_methods!( pub type NSRuleEditorDelegate = NSObject; -extern "C" { - pub static NSRuleEditorRowsDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSRuleEditorRowsDidChangeNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSRulerView.rs b/crates/icrate/src/generated/AppKit/NSRulerView.rs index babeb398b..97d38ee33 100644 --- a/crates/icrate/src/generated/AppKit/NSRulerView.rs +++ b/crates/icrate/src/generated/AppKit/NSRulerView.rs @@ -5,27 +5,23 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSRulerOrientation = NSUInteger; -pub const NSHorizontalRuler: NSRulerOrientation = 0; -pub const NSVerticalRuler: NSRulerOrientation = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSRulerOrientation { + NSHorizontalRuler = 0, + NSVerticalRuler = 1, + } +); pub type NSRulerViewUnitName = NSString; -extern "C" { - pub static NSRulerViewUnitInches: &'static NSRulerViewUnitName; -} +extern_static!(NSRulerViewUnitInches: &'static NSRulerViewUnitName); -extern "C" { - pub static NSRulerViewUnitCentimeters: &'static NSRulerViewUnitName; -} +extern_static!(NSRulerViewUnitCentimeters: &'static NSRulerViewUnitName); -extern "C" { - pub static NSRulerViewUnitPoints: &'static NSRulerViewUnitName; -} +extern_static!(NSRulerViewUnitPoints: &'static NSRulerViewUnitName); -extern "C" { - pub static NSRulerViewUnitPicas: &'static NSRulerViewUnitName; -} +extern_static!(NSRulerViewUnitPicas: &'static NSRulerViewUnitName); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs index 0b02c236f..ae923e6b8 100644 --- a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs @@ -5,14 +5,22 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSApplicationActivationOptions = NSUInteger; -pub const NSApplicationActivateAllWindows: NSApplicationActivationOptions = 1 << 0; -pub const NSApplicationActivateIgnoringOtherApps: NSApplicationActivationOptions = 1 << 1; - -pub type NSApplicationActivationPolicy = NSInteger; -pub const NSApplicationActivationPolicyRegular: NSApplicationActivationPolicy = 0; -pub const NSApplicationActivationPolicyAccessory: NSApplicationActivationPolicy = 1; -pub const NSApplicationActivationPolicyProhibited: NSApplicationActivationPolicy = 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSApplicationActivationOptions { + NSApplicationActivateAllWindows = 1 << 0, + NSApplicationActivateIgnoringOtherApps = 1 << 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSApplicationActivationPolicy { + NSApplicationActivationPolicyRegular = 0, + NSApplicationActivationPolicyAccessory = 1, + NSApplicationActivationPolicyProhibited = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index 9fdb2818f..59a2fbdaf 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -5,8 +5,13 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub const NSFileHandlingPanelCancelButton: c_uint = NSModalResponseCancel; -pub const NSFileHandlingPanelOKButton: c_uint = NSModalResponseOK; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSFileHandlingPanelCancelButton = NSModalResponseCancel, + NSFileHandlingPanelOKButton = NSModalResponseOK, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSScreen.rs b/crates/icrate/src/generated/AppKit/NSScreen.rs index c1fac0dda..12117125b 100644 --- a/crates/icrate/src/generated/AppKit/NSScreen.rs +++ b/crates/icrate/src/generated/AppKit/NSScreen.rs @@ -81,9 +81,7 @@ extern_methods!( } ); -extern "C" { - pub static NSScreenColorSpaceDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSScreenColorSpaceDidChangeNotification: &'static NSNotificationName); extern_methods!( unsafe impl NSScreen { diff --git a/crates/icrate/src/generated/AppKit/NSScrollView.rs b/crates/icrate/src/generated/AppKit/NSScrollView.rs index da3d5c6ce..6012b1338 100644 --- a/crates/icrate/src/generated/AppKit/NSScrollView.rs +++ b/crates/icrate/src/generated/AppKit/NSScrollView.rs @@ -5,10 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSScrollElasticity = NSInteger; -pub const NSScrollElasticityAutomatic: NSScrollElasticity = 0; -pub const NSScrollElasticityNone: NSScrollElasticity = 1; -pub const NSScrollElasticityAllowed: NSScrollElasticity = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSScrollElasticity { + NSScrollElasticityAutomatic = 0, + NSScrollElasticityNone = 1, + NSScrollElasticityAllowed = 2, + } +); extern_class!( #[derive(Debug)] @@ -291,25 +295,15 @@ extern_methods!( } ); -extern "C" { - pub static NSScrollViewWillStartLiveMagnifyNotification: &'static NSNotificationName; -} +extern_static!(NSScrollViewWillStartLiveMagnifyNotification: &'static NSNotificationName); -extern "C" { - pub static NSScrollViewDidEndLiveMagnifyNotification: &'static NSNotificationName; -} +extern_static!(NSScrollViewDidEndLiveMagnifyNotification: &'static NSNotificationName); -extern "C" { - pub static NSScrollViewWillStartLiveScrollNotification: &'static NSNotificationName; -} +extern_static!(NSScrollViewWillStartLiveScrollNotification: &'static NSNotificationName); -extern "C" { - pub static NSScrollViewDidLiveScrollNotification: &'static NSNotificationName; -} +extern_static!(NSScrollViewDidLiveScrollNotification: &'static NSNotificationName); -extern "C" { - pub static NSScrollViewDidEndLiveScrollNotification: &'static NSNotificationName; -} +extern_static!(NSScrollViewDidEndLiveScrollNotification: &'static NSNotificationName); extern_methods!( /// NSRulerSupport @@ -352,10 +346,14 @@ extern_methods!( } ); -pub type NSScrollViewFindBarPosition = NSInteger; -pub const NSScrollViewFindBarPositionAboveHorizontalRuler: NSScrollViewFindBarPosition = 0; -pub const NSScrollViewFindBarPositionAboveContent: NSScrollViewFindBarPosition = 1; -pub const NSScrollViewFindBarPositionBelowContent: NSScrollViewFindBarPosition = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSScrollViewFindBarPosition { + NSScrollViewFindBarPositionAboveHorizontalRuler = 0, + NSScrollViewFindBarPositionAboveContent = 1, + NSScrollViewFindBarPositionBelowContent = 2, + } +); extern_methods!( /// NSFindBarSupport diff --git a/crates/icrate/src/generated/AppKit/NSScroller.rs b/crates/icrate/src/generated/AppKit/NSScroller.rs index 67d92d7d6..09e59612f 100644 --- a/crates/icrate/src/generated/AppKit/NSScroller.rs +++ b/crates/icrate/src/generated/AppKit/NSScroller.rs @@ -5,28 +5,44 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSUsableScrollerParts = NSUInteger; -pub const NSNoScrollerParts: NSUsableScrollerParts = 0; -pub const NSOnlyScrollerArrows: NSUsableScrollerParts = 1; -pub const NSAllScrollerParts: NSUsableScrollerParts = 2; - -pub type NSScrollerPart = NSUInteger; -pub const NSScrollerNoPart: NSScrollerPart = 0; -pub const NSScrollerDecrementPage: NSScrollerPart = 1; -pub const NSScrollerKnob: NSScrollerPart = 2; -pub const NSScrollerIncrementPage: NSScrollerPart = 3; -pub const NSScrollerDecrementLine: NSScrollerPart = 4; -pub const NSScrollerIncrementLine: NSScrollerPart = 5; -pub const NSScrollerKnobSlot: NSScrollerPart = 6; - -pub type NSScrollerStyle = NSInteger; -pub const NSScrollerStyleLegacy: NSScrollerStyle = 0; -pub const NSScrollerStyleOverlay: NSScrollerStyle = 1; - -pub type NSScrollerKnobStyle = NSInteger; -pub const NSScrollerKnobStyleDefault: NSScrollerKnobStyle = 0; -pub const NSScrollerKnobStyleDark: NSScrollerKnobStyle = 1; -pub const NSScrollerKnobStyleLight: NSScrollerKnobStyle = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSUsableScrollerParts { + NSNoScrollerParts = 0, + NSOnlyScrollerArrows = 1, + NSAllScrollerParts = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSScrollerPart { + NSScrollerNoPart = 0, + NSScrollerDecrementPage = 1, + NSScrollerKnob = 2, + NSScrollerIncrementPage = 3, + NSScrollerDecrementLine = 4, + NSScrollerIncrementLine = 5, + NSScrollerKnobSlot = 6, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSScrollerStyle { + NSScrollerStyleLegacy = 0, + NSScrollerStyleOverlay = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSScrollerKnobStyle { + NSScrollerKnobStyleDefault = 0, + NSScrollerKnobStyleDark = 1, + NSScrollerKnobStyleLight = 2, + } +); extern_class!( #[derive(Debug)] @@ -101,19 +117,25 @@ extern_methods!( } ); -extern "C" { - pub static NSPreferredScrollerStyleDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSPreferredScrollerStyleDidChangeNotification: &'static NSNotificationName); -pub type NSScrollArrowPosition = NSUInteger; -pub const NSScrollerArrowsMaxEnd: NSScrollArrowPosition = 0; -pub const NSScrollerArrowsMinEnd: NSScrollArrowPosition = 1; -pub const NSScrollerArrowsDefaultSetting: NSScrollArrowPosition = 0; -pub const NSScrollerArrowsNone: NSScrollArrowPosition = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSScrollArrowPosition { + NSScrollerArrowsMaxEnd = 0, + NSScrollerArrowsMinEnd = 1, + NSScrollerArrowsDefaultSetting = 0, + NSScrollerArrowsNone = 2, + } +); -pub type NSScrollerArrow = NSUInteger; -pub const NSScrollerIncrementArrow: NSScrollerArrow = 0; -pub const NSScrollerDecrementArrow: NSScrollerArrow = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSScrollerArrow { + NSScrollerIncrementArrow = 0, + NSScrollerDecrementArrow = 1, + } +); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs index a91960a6e..58bddd4ad 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubber.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -9,15 +9,23 @@ pub type NSScrubberDataSource = NSObject; pub type NSScrubberDelegate = NSObject; -pub type NSScrubberMode = NSInteger; -pub const NSScrubberModeFixed: NSScrubberMode = 0; -pub const NSScrubberModeFree: NSScrubberMode = 1; - -pub type NSScrubberAlignment = NSInteger; -pub const NSScrubberAlignmentNone: NSScrubberAlignment = 0; -pub const NSScrubberAlignmentLeading: NSScrubberAlignment = 1; -pub const NSScrubberAlignmentTrailing: NSScrubberAlignment = 2; -pub const NSScrubberAlignmentCenter: NSScrubberAlignment = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSScrubberMode { + NSScrubberModeFixed = 0, + NSScrubberModeFree = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSScrubberAlignment { + NSScrubberAlignmentNone = 0, + NSScrubberAlignmentLeading = 1, + NSScrubberAlignmentTrailing = 2, + NSScrubberAlignmentCenter = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs index d7a442375..25956da9c 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchFieldCell.rs @@ -5,13 +5,13 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub static NSSearchFieldRecentsTitleMenuItemTag: NSInteger = 1000; +extern_static!(NSSearchFieldRecentsTitleMenuItemTag: NSInteger = 1000); -pub static NSSearchFieldRecentsMenuItemTag: NSInteger = 1001; +extern_static!(NSSearchFieldRecentsMenuItemTag: NSInteger = 1001); -pub static NSSearchFieldClearRecentsMenuItemTag: NSInteger = 1002; +extern_static!(NSSearchFieldClearRecentsMenuItemTag: NSInteger = 1002); -pub static NSSearchFieldNoRecentsMenuItemTag: NSInteger = 1003; +extern_static!(NSSearchFieldNoRecentsMenuItemTag: NSInteger = 1003); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs index 5ae069288..228fd68e9 100644 --- a/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs +++ b/crates/icrate/src/generated/AppKit/NSSegmentedControl.rs @@ -5,27 +5,39 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSSegmentSwitchTracking = NSUInteger; -pub const NSSegmentSwitchTrackingSelectOne: NSSegmentSwitchTracking = 0; -pub const NSSegmentSwitchTrackingSelectAny: NSSegmentSwitchTracking = 1; -pub const NSSegmentSwitchTrackingMomentary: NSSegmentSwitchTracking = 2; -pub const NSSegmentSwitchTrackingMomentaryAccelerator: NSSegmentSwitchTracking = 3; - -pub type NSSegmentStyle = NSInteger; -pub const NSSegmentStyleAutomatic: NSSegmentStyle = 0; -pub const NSSegmentStyleRounded: NSSegmentStyle = 1; -pub const NSSegmentStyleRoundRect: NSSegmentStyle = 3; -pub const NSSegmentStyleTexturedSquare: NSSegmentStyle = 4; -pub const NSSegmentStyleSmallSquare: NSSegmentStyle = 6; -pub const NSSegmentStyleSeparated: NSSegmentStyle = 8; -pub const NSSegmentStyleTexturedRounded: NSSegmentStyle = 2; -pub const NSSegmentStyleCapsule: NSSegmentStyle = 5; - -pub type NSSegmentDistribution = NSInteger; -pub const NSSegmentDistributionFit: NSSegmentDistribution = 0; -pub const NSSegmentDistributionFill: NSSegmentDistribution = 1; -pub const NSSegmentDistributionFillEqually: NSSegmentDistribution = 2; -pub const NSSegmentDistributionFillProportionally: NSSegmentDistribution = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSSegmentSwitchTracking { + NSSegmentSwitchTrackingSelectOne = 0, + NSSegmentSwitchTrackingSelectAny = 1, + NSSegmentSwitchTrackingMomentary = 2, + NSSegmentSwitchTrackingMomentaryAccelerator = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSSegmentStyle { + NSSegmentStyleAutomatic = 0, + NSSegmentStyleRounded = 1, + NSSegmentStyleRoundRect = 3, + NSSegmentStyleTexturedSquare = 4, + NSSegmentStyleSmallSquare = 6, + NSSegmentStyleSeparated = 8, + NSSegmentStyleTexturedRounded = 2, + NSSegmentStyleCapsule = 5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSSegmentDistribution { + NSSegmentDistributionFit = 0, + NSSegmentDistributionFill = 1, + NSSegmentDistributionFillEqually = 2, + NSSegmentDistributionFillProportionally = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index d55e38a72..6e3bc02c5 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -7,85 +7,45 @@ use crate::Foundation::*; pub type NSSharingServiceName = NSString; -extern "C" { - pub static NSSharingServiceNameComposeEmail: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameComposeEmail: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNameComposeMessage: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameComposeMessage: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNameSendViaAirDrop: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameSendViaAirDrop: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNameAddToSafariReadingList: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameAddToSafariReadingList: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNameAddToIPhoto: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameAddToIPhoto: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNameAddToAperture: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameAddToAperture: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNameUseAsDesktopPicture: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameUseAsDesktopPicture: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNamePostOnFacebook: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNamePostOnFacebook: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNamePostOnTwitter: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNamePostOnTwitter: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNamePostOnSinaWeibo: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNamePostOnSinaWeibo: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNamePostOnTencentWeibo: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNamePostOnTencentWeibo: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNamePostOnLinkedIn: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNamePostOnLinkedIn: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNameUseAsTwitterProfileImage: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameUseAsTwitterProfileImage: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNameUseAsFacebookProfileImage: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameUseAsFacebookProfileImage: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNameUseAsLinkedInProfileImage: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameUseAsLinkedInProfileImage: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNamePostImageOnFlickr: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNamePostImageOnFlickr: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNamePostVideoOnVimeo: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNamePostVideoOnVimeo: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNamePostVideoOnYouku: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNamePostVideoOnYouku: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNamePostVideoOnTudou: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNamePostVideoOnTudou: &'static NSSharingServiceName); -extern "C" { - pub static NSSharingServiceNameCloudSharing: &'static NSSharingServiceName; -} +extern_static!(NSSharingServiceNameCloudSharing: &'static NSSharingServiceName); extern_class!( #[derive(Debug)] @@ -173,19 +133,27 @@ extern_methods!( } ); -pub type NSSharingContentScope = NSInteger; -pub const NSSharingContentScopeItem: NSSharingContentScope = 0; -pub const NSSharingContentScopePartial: NSSharingContentScope = 1; -pub const NSSharingContentScopeFull: NSSharingContentScope = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSSharingContentScope { + NSSharingContentScopeItem = 0, + NSSharingContentScopePartial = 1, + NSSharingContentScopeFull = 2, + } +); pub type NSSharingServiceDelegate = NSObject; -pub type NSCloudKitSharingServiceOptions = NSUInteger; -pub const NSCloudKitSharingServiceStandard: NSCloudKitSharingServiceOptions = 0; -pub const NSCloudKitSharingServiceAllowPublic: NSCloudKitSharingServiceOptions = 1 << 0; -pub const NSCloudKitSharingServiceAllowPrivate: NSCloudKitSharingServiceOptions = 1 << 1; -pub const NSCloudKitSharingServiceAllowReadOnly: NSCloudKitSharingServiceOptions = 1 << 4; -pub const NSCloudKitSharingServiceAllowReadWrite: NSCloudKitSharingServiceOptions = 1 << 5; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSCloudKitSharingServiceOptions { + NSCloudKitSharingServiceStandard = 0, + NSCloudKitSharingServiceAllowPublic = 1 << 0, + NSCloudKitSharingServiceAllowPrivate = 1 << 1, + NSCloudKitSharingServiceAllowReadOnly = 1 << 4, + NSCloudKitSharingServiceAllowReadWrite = 1 << 5, + } +); pub type NSCloudSharingServiceDelegate = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSSliderCell.rs b/crates/icrate/src/generated/AppKit/NSSliderCell.rs index 45d30721b..41fb3f065 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderCell.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderCell.rs @@ -5,15 +5,23 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTickMarkPosition = NSUInteger; -pub const NSTickMarkPositionBelow: NSTickMarkPosition = 0; -pub const NSTickMarkPositionAbove: NSTickMarkPosition = 1; -pub const NSTickMarkPositionLeading: NSTickMarkPosition = NSTickMarkPositionAbove; -pub const NSTickMarkPositionTrailing: NSTickMarkPosition = NSTickMarkPositionBelow; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTickMarkPosition { + NSTickMarkPositionBelow = 0, + NSTickMarkPositionAbove = 1, + NSTickMarkPositionLeading = NSTickMarkPositionAbove, + NSTickMarkPositionTrailing = NSTickMarkPositionBelow, + } +); -pub type NSSliderType = NSUInteger; -pub const NSSliderTypeLinear: NSSliderType = 0; -pub const NSSliderTypeCircular: NSSliderType = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSSliderType { + NSSliderTypeLinear = 0, + NSSliderTypeCircular = 1, + } +); extern_class!( #[derive(Debug)] @@ -151,14 +159,14 @@ extern_methods!( } ); -pub static NSTickMarkBelow: NSTickMarkPosition = NSTickMarkPositionBelow; +extern_static!(NSTickMarkBelow: NSTickMarkPosition = NSTickMarkPositionBelow); -pub static NSTickMarkAbove: NSTickMarkPosition = NSTickMarkPositionAbove; +extern_static!(NSTickMarkAbove: NSTickMarkPosition = NSTickMarkPositionAbove); -pub static NSTickMarkLeft: NSTickMarkPosition = NSTickMarkPositionLeading; +extern_static!(NSTickMarkLeft: NSTickMarkPosition = NSTickMarkPositionLeading); -pub static NSTickMarkRight: NSTickMarkPosition = NSTickMarkPositionTrailing; +extern_static!(NSTickMarkRight: NSTickMarkPosition = NSTickMarkPositionTrailing); -pub static NSLinearSlider: NSSliderType = NSSliderTypeLinear; +extern_static!(NSLinearSlider: NSSliderType = NSSliderTypeLinear); -pub static NSCircularSlider: NSSliderType = NSSliderTypeCircular; +extern_static!(NSCircularSlider: NSSliderType = NSSliderTypeCircular); diff --git a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs index b1327b627..e0244fd85 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderTouchBarItem.rs @@ -7,13 +7,9 @@ use crate::Foundation::*; pub type NSSliderAccessoryWidth = CGFloat; -extern "C" { - pub static NSSliderAccessoryWidthDefault: NSSliderAccessoryWidth; -} +extern_static!(NSSliderAccessoryWidthDefault: NSSliderAccessoryWidth); -extern "C" { - pub static NSSliderAccessoryWidthWide: NSSliderAccessoryWidth; -} +extern_static!(NSSliderAccessoryWidthWide: NSSliderAccessoryWidth); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs index 58bcf16bf..3a0a7557a 100644 --- a/crates/icrate/src/generated/AppKit/NSSound.rs +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -5,9 +5,7 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSSoundPboardType: &'static NSPasteboardType; -} +extern_static!(NSSoundPboardType: &'static NSPasteboardType); pub type NSSoundName = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index 0151d1730..cffadb637 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -9,156 +9,90 @@ pub type NSSpeechSynthesizerVoiceName = NSString; pub type NSVoiceAttributeKey = NSString; -extern "C" { - pub static NSVoiceName: &'static NSVoiceAttributeKey; -} +extern_static!(NSVoiceName: &'static NSVoiceAttributeKey); -extern "C" { - pub static NSVoiceIdentifier: &'static NSVoiceAttributeKey; -} +extern_static!(NSVoiceIdentifier: &'static NSVoiceAttributeKey); -extern "C" { - pub static NSVoiceAge: &'static NSVoiceAttributeKey; -} +extern_static!(NSVoiceAge: &'static NSVoiceAttributeKey); -extern "C" { - pub static NSVoiceGender: &'static NSVoiceAttributeKey; -} +extern_static!(NSVoiceGender: &'static NSVoiceAttributeKey); -extern "C" { - pub static NSVoiceDemoText: &'static NSVoiceAttributeKey; -} +extern_static!(NSVoiceDemoText: &'static NSVoiceAttributeKey); -extern "C" { - pub static NSVoiceLocaleIdentifier: &'static NSVoiceAttributeKey; -} +extern_static!(NSVoiceLocaleIdentifier: &'static NSVoiceAttributeKey); -extern "C" { - pub static NSVoiceSupportedCharacters: &'static NSVoiceAttributeKey; -} +extern_static!(NSVoiceSupportedCharacters: &'static NSVoiceAttributeKey); -extern "C" { - pub static NSVoiceIndividuallySpokenCharacters: &'static NSVoiceAttributeKey; -} +extern_static!(NSVoiceIndividuallySpokenCharacters: &'static NSVoiceAttributeKey); pub type NSSpeechDictionaryKey = NSString; -extern "C" { - pub static NSSpeechDictionaryLocaleIdentifier: &'static NSSpeechDictionaryKey; -} +extern_static!(NSSpeechDictionaryLocaleIdentifier: &'static NSSpeechDictionaryKey); -extern "C" { - pub static NSSpeechDictionaryModificationDate: &'static NSSpeechDictionaryKey; -} +extern_static!(NSSpeechDictionaryModificationDate: &'static NSSpeechDictionaryKey); -extern "C" { - pub static NSSpeechDictionaryPronunciations: &'static NSSpeechDictionaryKey; -} +extern_static!(NSSpeechDictionaryPronunciations: &'static NSSpeechDictionaryKey); -extern "C" { - pub static NSSpeechDictionaryAbbreviations: &'static NSSpeechDictionaryKey; -} +extern_static!(NSSpeechDictionaryAbbreviations: &'static NSSpeechDictionaryKey); -extern "C" { - pub static NSSpeechDictionaryEntrySpelling: &'static NSSpeechDictionaryKey; -} +extern_static!(NSSpeechDictionaryEntrySpelling: &'static NSSpeechDictionaryKey); -extern "C" { - pub static NSSpeechDictionaryEntryPhonemes: &'static NSSpeechDictionaryKey; -} +extern_static!(NSSpeechDictionaryEntryPhonemes: &'static NSSpeechDictionaryKey); pub type NSVoiceGenderName = NSString; -extern "C" { - pub static NSVoiceGenderNeuter: &'static NSVoiceGenderName; -} +extern_static!(NSVoiceGenderNeuter: &'static NSVoiceGenderName); -extern "C" { - pub static NSVoiceGenderMale: &'static NSVoiceGenderName; -} +extern_static!(NSVoiceGenderMale: &'static NSVoiceGenderName); -extern "C" { - pub static NSVoiceGenderFemale: &'static NSVoiceGenderName; -} +extern_static!(NSVoiceGenderFemale: &'static NSVoiceGenderName); -extern "C" { - pub static NSVoiceGenderNeutral: &'static NSVoiceGenderName; -} +extern_static!(NSVoiceGenderNeutral: &'static NSVoiceGenderName); pub type NSSpeechPropertyKey = NSString; -extern "C" { - pub static NSSpeechStatusProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechStatusProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechErrorsProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechErrorsProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechInputModeProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechInputModeProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechCharacterModeProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechCharacterModeProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechNumberModeProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechNumberModeProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechRateProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechRateProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechPitchBaseProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechPitchBaseProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechPitchModProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechPitchModProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechVolumeProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechVolumeProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechSynthesizerInfoProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechSynthesizerInfoProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechRecentSyncProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechRecentSyncProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechPhonemeSymbolsProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechPhonemeSymbolsProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechCurrentVoiceProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechCurrentVoiceProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechCommandDelimiterProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechCommandDelimiterProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechResetProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechResetProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSSpeechOutputToFileURLProperty: &'static NSSpeechPropertyKey; -} +extern_static!(NSSpeechOutputToFileURLProperty: &'static NSSpeechPropertyKey); -extern "C" { - pub static NSVoiceLanguage: &'static NSVoiceAttributeKey; -} +extern_static!(NSVoiceLanguage: &'static NSVoiceAttributeKey); -pub type NSSpeechBoundary = NSUInteger; -pub const NSSpeechImmediateBoundary: NSSpeechBoundary = 0; -pub const NSSpeechWordBoundary: NSSpeechBoundary = 1; -pub const NSSpeechSentenceBoundary: NSSpeechBoundary = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSSpeechBoundary { + NSSpeechImmediateBoundary = 0, + NSSpeechWordBoundary = 1, + NSSpeechSentenceBoundary = 2, + } +); extern_class!( #[derive(Debug)] @@ -270,100 +204,56 @@ pub type NSSpeechSynthesizerDelegate = NSObject; pub type NSSpeechMode = NSString; -extern "C" { - pub static NSSpeechModeText: &'static NSSpeechMode; -} +extern_static!(NSSpeechModeText: &'static NSSpeechMode); -extern "C" { - pub static NSSpeechModePhoneme: &'static NSSpeechMode; -} +extern_static!(NSSpeechModePhoneme: &'static NSSpeechMode); -extern "C" { - pub static NSSpeechModeNormal: &'static NSSpeechMode; -} +extern_static!(NSSpeechModeNormal: &'static NSSpeechMode); -extern "C" { - pub static NSSpeechModeLiteral: &'static NSSpeechMode; -} +extern_static!(NSSpeechModeLiteral: &'static NSSpeechMode); pub type NSSpeechStatusKey = NSString; -extern "C" { - pub static NSSpeechStatusOutputBusy: &'static NSSpeechStatusKey; -} +extern_static!(NSSpeechStatusOutputBusy: &'static NSSpeechStatusKey); -extern "C" { - pub static NSSpeechStatusOutputPaused: &'static NSSpeechStatusKey; -} +extern_static!(NSSpeechStatusOutputPaused: &'static NSSpeechStatusKey); -extern "C" { - pub static NSSpeechStatusNumberOfCharactersLeft: &'static NSSpeechStatusKey; -} +extern_static!(NSSpeechStatusNumberOfCharactersLeft: &'static NSSpeechStatusKey); -extern "C" { - pub static NSSpeechStatusPhonemeCode: &'static NSSpeechStatusKey; -} +extern_static!(NSSpeechStatusPhonemeCode: &'static NSSpeechStatusKey); pub type NSSpeechErrorKey = NSString; -extern "C" { - pub static NSSpeechErrorCount: &'static NSSpeechErrorKey; -} +extern_static!(NSSpeechErrorCount: &'static NSSpeechErrorKey); -extern "C" { - pub static NSSpeechErrorOldestCode: &'static NSSpeechErrorKey; -} +extern_static!(NSSpeechErrorOldestCode: &'static NSSpeechErrorKey); -extern "C" { - pub static NSSpeechErrorOldestCharacterOffset: &'static NSSpeechErrorKey; -} +extern_static!(NSSpeechErrorOldestCharacterOffset: &'static NSSpeechErrorKey); -extern "C" { - pub static NSSpeechErrorNewestCode: &'static NSSpeechErrorKey; -} +extern_static!(NSSpeechErrorNewestCode: &'static NSSpeechErrorKey); -extern "C" { - pub static NSSpeechErrorNewestCharacterOffset: &'static NSSpeechErrorKey; -} +extern_static!(NSSpeechErrorNewestCharacterOffset: &'static NSSpeechErrorKey); pub type NSSpeechSynthesizerInfoKey = NSString; -extern "C" { - pub static NSSpeechSynthesizerInfoIdentifier: &'static NSSpeechSynthesizerInfoKey; -} +extern_static!(NSSpeechSynthesizerInfoIdentifier: &'static NSSpeechSynthesizerInfoKey); -extern "C" { - pub static NSSpeechSynthesizerInfoVersion: &'static NSSpeechSynthesizerInfoKey; -} +extern_static!(NSSpeechSynthesizerInfoVersion: &'static NSSpeechSynthesizerInfoKey); pub type NSSpeechPhonemeInfoKey = NSString; -extern "C" { - pub static NSSpeechPhonemeInfoOpcode: &'static NSSpeechPhonemeInfoKey; -} +extern_static!(NSSpeechPhonemeInfoOpcode: &'static NSSpeechPhonemeInfoKey); -extern "C" { - pub static NSSpeechPhonemeInfoSymbol: &'static NSSpeechPhonemeInfoKey; -} +extern_static!(NSSpeechPhonemeInfoSymbol: &'static NSSpeechPhonemeInfoKey); -extern "C" { - pub static NSSpeechPhonemeInfoExample: &'static NSSpeechPhonemeInfoKey; -} +extern_static!(NSSpeechPhonemeInfoExample: &'static NSSpeechPhonemeInfoKey); -extern "C" { - pub static NSSpeechPhonemeInfoHiliteStart: &'static NSSpeechPhonemeInfoKey; -} +extern_static!(NSSpeechPhonemeInfoHiliteStart: &'static NSSpeechPhonemeInfoKey); -extern "C" { - pub static NSSpeechPhonemeInfoHiliteEnd: &'static NSSpeechPhonemeInfoKey; -} +extern_static!(NSSpeechPhonemeInfoHiliteEnd: &'static NSSpeechPhonemeInfoKey); pub type NSSpeechCommandDelimiterKey = NSString; -extern "C" { - pub static NSSpeechCommandPrefix: &'static NSSpeechCommandDelimiterKey; -} +extern_static!(NSSpeechCommandPrefix: &'static NSSpeechCommandDelimiterKey); -extern "C" { - pub static NSSpeechCommandSuffix: &'static NSSpeechCommandDelimiterKey; -} +extern_static!(NSSpeechCommandSuffix: &'static NSSpeechCommandDelimiterKey); diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index 00b07d287..e04b0de58 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -7,58 +7,46 @@ use crate::Foundation::*; pub type NSTextCheckingOptionKey = NSString; -extern "C" { - pub static NSTextCheckingOrthographyKey: &'static NSTextCheckingOptionKey; -} - -extern "C" { - pub static NSTextCheckingQuotesKey: &'static NSTextCheckingOptionKey; -} - -extern "C" { - pub static NSTextCheckingReplacementsKey: &'static NSTextCheckingOptionKey; -} - -extern "C" { - pub static NSTextCheckingReferenceDateKey: &'static NSTextCheckingOptionKey; -} - -extern "C" { - pub static NSTextCheckingReferenceTimeZoneKey: &'static NSTextCheckingOptionKey; -} - -extern "C" { - pub static NSTextCheckingDocumentURLKey: &'static NSTextCheckingOptionKey; -} - -extern "C" { - pub static NSTextCheckingDocumentTitleKey: &'static NSTextCheckingOptionKey; -} - -extern "C" { - pub static NSTextCheckingDocumentAuthorKey: &'static NSTextCheckingOptionKey; -} - -extern "C" { - pub static NSTextCheckingRegularExpressionsKey: &'static NSTextCheckingOptionKey; -} - -extern "C" { - pub static NSTextCheckingSelectedRangeKey: &'static NSTextCheckingOptionKey; -} - -pub type NSCorrectionResponse = NSInteger; -pub const NSCorrectionResponseNone: NSCorrectionResponse = 0; -pub const NSCorrectionResponseAccepted: NSCorrectionResponse = 1; -pub const NSCorrectionResponseRejected: NSCorrectionResponse = 2; -pub const NSCorrectionResponseIgnored: NSCorrectionResponse = 3; -pub const NSCorrectionResponseEdited: NSCorrectionResponse = 4; -pub const NSCorrectionResponseReverted: NSCorrectionResponse = 5; - -pub type NSCorrectionIndicatorType = NSInteger; -pub const NSCorrectionIndicatorTypeDefault: NSCorrectionIndicatorType = 0; -pub const NSCorrectionIndicatorTypeReversion: NSCorrectionIndicatorType = 1; -pub const NSCorrectionIndicatorTypeGuesses: NSCorrectionIndicatorType = 2; +extern_static!(NSTextCheckingOrthographyKey: &'static NSTextCheckingOptionKey); + +extern_static!(NSTextCheckingQuotesKey: &'static NSTextCheckingOptionKey); + +extern_static!(NSTextCheckingReplacementsKey: &'static NSTextCheckingOptionKey); + +extern_static!(NSTextCheckingReferenceDateKey: &'static NSTextCheckingOptionKey); + +extern_static!(NSTextCheckingReferenceTimeZoneKey: &'static NSTextCheckingOptionKey); + +extern_static!(NSTextCheckingDocumentURLKey: &'static NSTextCheckingOptionKey); + +extern_static!(NSTextCheckingDocumentTitleKey: &'static NSTextCheckingOptionKey); + +extern_static!(NSTextCheckingDocumentAuthorKey: &'static NSTextCheckingOptionKey); + +extern_static!(NSTextCheckingRegularExpressionsKey: &'static NSTextCheckingOptionKey); + +extern_static!(NSTextCheckingSelectedRangeKey: &'static NSTextCheckingOptionKey); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSCorrectionResponse { + NSCorrectionResponseNone = 0, + NSCorrectionResponseAccepted = 1, + NSCorrectionResponseRejected = 2, + NSCorrectionResponseIgnored = 3, + NSCorrectionResponseEdited = 4, + NSCorrectionResponseReverted = 5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSCorrectionIndicatorType { + NSCorrectionIndicatorTypeDefault = 0, + NSCorrectionIndicatorTypeReversion = 1, + NSCorrectionIndicatorTypeGuesses = 2, + } +); extern_class!( #[derive(Debug)] @@ -360,40 +348,33 @@ extern_methods!( } ); -extern "C" { - pub static NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification: - &'static NSNotificationName; -} - -extern "C" { - pub static NSSpellCheckerDidChangeAutomaticTextReplacementNotification: - &'static NSNotificationName; -} - -extern "C" { - pub static NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification: - &'static NSNotificationName; -} - -extern "C" { - pub static NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification: - &'static NSNotificationName; -} - -extern "C" { - pub static NSSpellCheckerDidChangeAutomaticCapitalizationNotification: - &'static NSNotificationName; -} - -extern "C" { - pub static NSSpellCheckerDidChangeAutomaticPeriodSubstitutionNotification: - &'static NSNotificationName; -} - -extern "C" { - pub static NSSpellCheckerDidChangeAutomaticTextCompletionNotification: - &'static NSNotificationName; -} +extern_static!( + NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification: &'static NSNotificationName +); + +extern_static!( + NSSpellCheckerDidChangeAutomaticTextReplacementNotification: &'static NSNotificationName +); + +extern_static!( + NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification: &'static NSNotificationName +); + +extern_static!( + NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification: &'static NSNotificationName +); + +extern_static!( + NSSpellCheckerDidChangeAutomaticCapitalizationNotification: &'static NSNotificationName +); + +extern_static!( + NSSpellCheckerDidChangeAutomaticPeriodSubstitutionNotification: &'static NSNotificationName +); + +extern_static!( + NSSpellCheckerDidChangeAutomaticTextCompletionNotification: &'static NSNotificationName +); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs index c54269b30..efea60cee 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitView.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -7,10 +7,14 @@ use crate::Foundation::*; pub type NSSplitViewAutosaveName = NSString; -pub type NSSplitViewDividerStyle = NSInteger; -pub const NSSplitViewDividerStyleThick: NSSplitViewDividerStyle = 1; -pub const NSSplitViewDividerStyleThin: NSSplitViewDividerStyle = 2; -pub const NSSplitViewDividerStylePaneSplitter: NSSplitViewDividerStyle = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSSplitViewDividerStyle { + NSSplitViewDividerStyleThick = 1, + NSSplitViewDividerStyleThin = 2, + NSSplitViewDividerStylePaneSplitter = 3, + } +); extern_class!( #[derive(Debug)] @@ -121,13 +125,9 @@ extern_methods!( pub type NSSplitViewDelegate = NSObject; -extern "C" { - pub static NSSplitViewWillResizeSubviewsNotification: &'static NSNotificationName; -} +extern_static!(NSSplitViewWillResizeSubviewsNotification: &'static NSNotificationName); -extern "C" { - pub static NSSplitViewDidResizeSubviewsNotification: &'static NSNotificationName; -} +extern_static!(NSSplitViewDidResizeSubviewsNotification: &'static NSNotificationName); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs index 01a087628..995c3e3ae 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewController.rs @@ -5,9 +5,7 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSSplitViewControllerAutomaticDimension: CGFloat; -} +extern_static!(NSSplitViewControllerAutomaticDimension: CGFloat); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs index 585f8c395..7e2192a51 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitViewItem.rs @@ -5,22 +5,26 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSSplitViewItemBehavior = NSInteger; -pub const NSSplitViewItemBehaviorDefault: NSSplitViewItemBehavior = 0; -pub const NSSplitViewItemBehaviorSidebar: NSSplitViewItemBehavior = 1; -pub const NSSplitViewItemBehaviorContentList: NSSplitViewItemBehavior = 2; - -pub type NSSplitViewItemCollapseBehavior = NSInteger; -pub const NSSplitViewItemCollapseBehaviorDefault: NSSplitViewItemCollapseBehavior = 0; -pub const NSSplitViewItemCollapseBehaviorPreferResizingSplitViewWithFixedSiblings: - NSSplitViewItemCollapseBehavior = 1; -pub const NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitView: - NSSplitViewItemCollapseBehavior = 2; -pub const NSSplitViewItemCollapseBehaviorUseConstraints: NSSplitViewItemCollapseBehavior = 3; - -extern "C" { - pub static NSSplitViewItemUnspecifiedDimension: CGFloat; -} +ns_enum!( + #[underlying(NSInteger)] + pub enum NSSplitViewItemBehavior { + NSSplitViewItemBehaviorDefault = 0, + NSSplitViewItemBehaviorSidebar = 1, + NSSplitViewItemBehaviorContentList = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSSplitViewItemCollapseBehavior { + NSSplitViewItemCollapseBehaviorDefault = 0, + NSSplitViewItemCollapseBehaviorPreferResizingSplitViewWithFixedSiblings = 1, + NSSplitViewItemCollapseBehaviorPreferResizingSiblingsWithFixedSplitView = 2, + NSSplitViewItemCollapseBehaviorUseConstraints = 3, + } +); + +extern_static!(NSSplitViewItemUnspecifiedDimension: CGFloat); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index 724300017..0113ec0e1 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -5,28 +5,38 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSStackViewGravity = NSInteger; -pub const NSStackViewGravityTop: NSStackViewGravity = 1; -pub const NSStackViewGravityLeading: NSStackViewGravity = 1; -pub const NSStackViewGravityCenter: NSStackViewGravity = 2; -pub const NSStackViewGravityBottom: NSStackViewGravity = 3; -pub const NSStackViewGravityTrailing: NSStackViewGravity = 3; - -pub type NSStackViewDistribution = NSInteger; -pub const NSStackViewDistributionGravityAreas: NSStackViewDistribution = -1; -pub const NSStackViewDistributionFill: NSStackViewDistribution = 0; -pub const NSStackViewDistributionFillEqually: NSStackViewDistribution = 1; -pub const NSStackViewDistributionFillProportionally: NSStackViewDistribution = 2; -pub const NSStackViewDistributionEqualSpacing: NSStackViewDistribution = 3; -pub const NSStackViewDistributionEqualCentering: NSStackViewDistribution = 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSStackViewGravity { + NSStackViewGravityTop = 1, + NSStackViewGravityLeading = 1, + NSStackViewGravityCenter = 2, + NSStackViewGravityBottom = 3, + NSStackViewGravityTrailing = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSStackViewDistribution { + NSStackViewDistributionGravityAreas = -1, + NSStackViewDistributionFill = 0, + NSStackViewDistributionFillEqually = 1, + NSStackViewDistributionFillProportionally = 2, + NSStackViewDistributionEqualSpacing = 3, + NSStackViewDistributionEqualCentering = 4, + } +); pub type NSStackViewVisibilityPriority = c_float; -pub static NSStackViewVisibilityPriorityMustHold: NSStackViewVisibilityPriority = 1000; +extern_static!(NSStackViewVisibilityPriorityMustHold: NSStackViewVisibilityPriority = 1000); -pub static NSStackViewVisibilityPriorityDetachOnlyIfNecessary: NSStackViewVisibilityPriority = 900; +extern_static!( + NSStackViewVisibilityPriorityDetachOnlyIfNecessary: NSStackViewVisibilityPriority = 900 +); -pub static NSStackViewVisibilityPriorityNotVisible: NSStackViewVisibilityPriority = 0; +extern_static!(NSStackViewVisibilityPriorityNotVisible: NSStackViewVisibilityPriority = 0); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStatusBar.rs b/crates/icrate/src/generated/AppKit/NSStatusBar.rs index 0b3708fb8..c8c1c907a 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusBar.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusBar.rs @@ -5,9 +5,9 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub static NSVariableStatusItemLength: CGFloat = -1.0; +extern_static!(NSVariableStatusItemLength: CGFloat = -1.0); -pub static NSSquareStatusItemLength: CGFloat = -2.0; +extern_static!(NSSquareStatusItemLength: CGFloat = -2.0); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStatusItem.rs b/crates/icrate/src/generated/AppKit/NSStatusItem.rs index 8231057a6..a034206ef 100644 --- a/crates/icrate/src/generated/AppKit/NSStatusItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStatusItem.rs @@ -7,9 +7,13 @@ use crate::Foundation::*; pub type NSStatusItemAutosaveName = NSString; -pub type NSStatusItemBehavior = NSUInteger; -pub const NSStatusItemBehaviorRemovalAllowed: NSStatusItemBehavior = 1 << 1; -pub const NSStatusItemBehaviorTerminationOnRemoval: NSStatusItemBehavior = 1 << 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSStatusItemBehavior { + NSStatusItemBehaviorRemovalAllowed = 1 << 1, + NSStatusItemBehaviorTerminationOnRemoval = 1 << 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs index 8c06dfdd4..df36c5672 100644 --- a/crates/icrate/src/generated/AppKit/NSStringDrawing.rs +++ b/crates/icrate/src/generated/AppKit/NSStringDrawing.rs @@ -69,13 +69,17 @@ extern_methods!( } ); -pub type NSStringDrawingOptions = NSInteger; -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; +ns_options!( + #[underlying(NSInteger)] + pub enum NSStringDrawingOptions { + NSStringDrawingUsesLineFragmentOrigin = 1 << 0, + NSStringDrawingUsesFontLeading = 1 << 1, + NSStringDrawingUsesDeviceMetrics = 1 << 3, + NSStringDrawingTruncatesLastVisibleLine = 1 << 5, + NSStringDrawingDisableScreenFontSubstitution = 1 << 2, + NSStringDrawingOneShot = 1 << 4, + } +); extern_methods!( /// NSExtendedStringDrawing diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs index 04f61a4e8..1ff1e8503 100644 --- a/crates/icrate/src/generated/AppKit/NSTabView.rs +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -5,28 +5,40 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub static NSAppKitVersionNumberWithDirectionalTabs: NSAppKitVersion = 631.0; - -pub type NSTabViewType = NSUInteger; -pub const NSTopTabsBezelBorder: NSTabViewType = 0; -pub const NSLeftTabsBezelBorder: NSTabViewType = 1; -pub const NSBottomTabsBezelBorder: NSTabViewType = 2; -pub const NSRightTabsBezelBorder: NSTabViewType = 3; -pub const NSNoTabsBezelBorder: NSTabViewType = 4; -pub const NSNoTabsLineBorder: NSTabViewType = 5; -pub const NSNoTabsNoBorder: NSTabViewType = 6; - -pub type NSTabPosition = NSUInteger; -pub const NSTabPositionNone: NSTabPosition = 0; -pub const NSTabPositionTop: NSTabPosition = 1; -pub const NSTabPositionLeft: NSTabPosition = 2; -pub const NSTabPositionBottom: NSTabPosition = 3; -pub const NSTabPositionRight: NSTabPosition = 4; - -pub type NSTabViewBorderType = NSUInteger; -pub const NSTabViewBorderTypeNone: NSTabViewBorderType = 0; -pub const NSTabViewBorderTypeLine: NSTabViewBorderType = 1; -pub const NSTabViewBorderTypeBezel: NSTabViewBorderType = 2; +extern_static!(NSAppKitVersionNumberWithDirectionalTabs: NSAppKitVersion = 631.0); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTabViewType { + NSTopTabsBezelBorder = 0, + NSLeftTabsBezelBorder = 1, + NSBottomTabsBezelBorder = 2, + NSRightTabsBezelBorder = 3, + NSNoTabsBezelBorder = 4, + NSNoTabsLineBorder = 5, + NSNoTabsNoBorder = 6, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTabPosition { + NSTabPositionNone = 0, + NSTabPositionTop = 1, + NSTabPositionLeft = 2, + NSTabPositionBottom = 3, + NSTabPositionRight = 4, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTabViewBorderType { + NSTabViewBorderTypeNone = 0, + NSTabViewBorderTypeLine = 1, + NSTabViewBorderTypeBezel = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTabViewController.rs b/crates/icrate/src/generated/AppKit/NSTabViewController.rs index eae5b921c..405fbe406 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewController.rs @@ -5,11 +5,15 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTabViewControllerTabStyle = NSInteger; -pub const NSTabViewControllerTabStyleSegmentedControlOnTop: NSTabViewControllerTabStyle = 0; -pub const NSTabViewControllerTabStyleSegmentedControlOnBottom: NSTabViewControllerTabStyle = 1; -pub const NSTabViewControllerTabStyleToolbar: NSTabViewControllerTabStyle = 2; -pub const NSTabViewControllerTabStyleUnspecified: NSTabViewControllerTabStyle = -1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTabViewControllerTabStyle { + NSTabViewControllerTabStyleSegmentedControlOnTop = 0, + NSTabViewControllerTabStyleSegmentedControlOnBottom = 1, + NSTabViewControllerTabStyleToolbar = 2, + NSTabViewControllerTabStyleUnspecified = -1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs index 494c84c9b..5ae56ed8d 100644 --- a/crates/icrate/src/generated/AppKit/NSTabViewItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTabViewItem.rs @@ -5,10 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTabState = NSUInteger; -pub const NSSelectedTab: NSTabState = 0; -pub const NSBackgroundTab: NSTabState = 1; -pub const NSPressedTab: NSTabState = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTabState { + NSSelectedTab = 0, + NSBackgroundTab = 1, + NSPressedTab = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTableColumn.rs b/crates/icrate/src/generated/AppKit/NSTableColumn.rs index 29bb83a7c..3ac97620c 100644 --- a/crates/icrate/src/generated/AppKit/NSTableColumn.rs +++ b/crates/icrate/src/generated/AppKit/NSTableColumn.rs @@ -5,10 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTableColumnResizingOptions = NSUInteger; -pub const NSTableColumnNoResizing: NSTableColumnResizingOptions = 0; -pub const NSTableColumnAutoresizingMask: NSTableColumnResizingOptions = 1 << 0; -pub const NSTableColumnUserResizingMask: NSTableColumnResizingOptions = 1 << 1; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTableColumnResizingOptions { + NSTableColumnNoResizing = 0, + NSTableColumnAutoresizingMask = 1 << 0, + NSTableColumnUserResizingMask = 1 << 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index fe3691fca..6e2454edd 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -5,68 +5,99 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTableViewDropOperation = NSUInteger; -pub const NSTableViewDropOn: NSTableViewDropOperation = 0; -pub const NSTableViewDropAbove: NSTableViewDropOperation = 1; - -pub type NSTableViewColumnAutoresizingStyle = NSUInteger; -pub const NSTableViewNoColumnAutoresizing: NSTableViewColumnAutoresizingStyle = 0; -pub const NSTableViewUniformColumnAutoresizingStyle: NSTableViewColumnAutoresizingStyle = 1; -pub const NSTableViewSequentialColumnAutoresizingStyle: NSTableViewColumnAutoresizingStyle = 2; -pub const NSTableViewReverseSequentialColumnAutoresizingStyle: NSTableViewColumnAutoresizingStyle = - 3; -pub const NSTableViewLastColumnOnlyAutoresizingStyle: NSTableViewColumnAutoresizingStyle = 4; -pub const NSTableViewFirstColumnOnlyAutoresizingStyle: NSTableViewColumnAutoresizingStyle = 5; - -pub type NSTableViewGridLineStyle = NSUInteger; -pub const NSTableViewGridNone: NSTableViewGridLineStyle = 0; -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; -pub const NSTableViewRowSizeStyleCustom: NSTableViewRowSizeStyle = 0; -pub const NSTableViewRowSizeStyleSmall: NSTableViewRowSizeStyle = 1; -pub const NSTableViewRowSizeStyleMedium: NSTableViewRowSizeStyle = 2; -pub const NSTableViewRowSizeStyleLarge: NSTableViewRowSizeStyle = 3; - -pub type NSTableViewStyle = NSInteger; -pub const NSTableViewStyleAutomatic: NSTableViewStyle = 0; -pub const NSTableViewStyleFullWidth: NSTableViewStyle = 1; -pub const NSTableViewStyleInset: NSTableViewStyle = 2; -pub const NSTableViewStyleSourceList: NSTableViewStyle = 3; -pub const NSTableViewStylePlain: NSTableViewStyle = 4; - -pub type NSTableViewSelectionHighlightStyle = NSInteger; -pub const NSTableViewSelectionHighlightStyleNone: NSTableViewSelectionHighlightStyle = -1; -pub const NSTableViewSelectionHighlightStyleRegular: NSTableViewSelectionHighlightStyle = 0; -pub const NSTableViewSelectionHighlightStyleSourceList: NSTableViewSelectionHighlightStyle = 1; - -pub type NSTableViewDraggingDestinationFeedbackStyle = NSInteger; -pub const NSTableViewDraggingDestinationFeedbackStyleNone: - NSTableViewDraggingDestinationFeedbackStyle = -1; -pub const NSTableViewDraggingDestinationFeedbackStyleRegular: - NSTableViewDraggingDestinationFeedbackStyle = 0; -pub const NSTableViewDraggingDestinationFeedbackStyleSourceList: - NSTableViewDraggingDestinationFeedbackStyle = 1; -pub const NSTableViewDraggingDestinationFeedbackStyleGap: - NSTableViewDraggingDestinationFeedbackStyle = 2; - -pub type NSTableRowActionEdge = NSInteger; -pub const NSTableRowActionEdgeLeading: NSTableRowActionEdge = 0; -pub const NSTableRowActionEdgeTrailing: NSTableRowActionEdge = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTableViewDropOperation { + NSTableViewDropOn = 0, + NSTableViewDropAbove = 1, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTableViewColumnAutoresizingStyle { + NSTableViewNoColumnAutoresizing = 0, + NSTableViewUniformColumnAutoresizingStyle = 1, + NSTableViewSequentialColumnAutoresizingStyle = 2, + NSTableViewReverseSequentialColumnAutoresizingStyle = 3, + NSTableViewLastColumnOnlyAutoresizingStyle = 4, + NSTableViewFirstColumnOnlyAutoresizingStyle = 5, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTableViewGridLineStyle { + NSTableViewGridNone = 0, + NSTableViewSolidVerticalGridLineMask = 1 << 0, + NSTableViewSolidHorizontalGridLineMask = 1 << 1, + NSTableViewDashedHorizontalGridLineMask = 1 << 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTableViewRowSizeStyle { + NSTableViewRowSizeStyleDefault = -1, + NSTableViewRowSizeStyleCustom = 0, + NSTableViewRowSizeStyleSmall = 1, + NSTableViewRowSizeStyleMedium = 2, + NSTableViewRowSizeStyleLarge = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTableViewStyle { + NSTableViewStyleAutomatic = 0, + NSTableViewStyleFullWidth = 1, + NSTableViewStyleInset = 2, + NSTableViewStyleSourceList = 3, + NSTableViewStylePlain = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTableViewSelectionHighlightStyle { + NSTableViewSelectionHighlightStyleNone = -1, + NSTableViewSelectionHighlightStyleRegular = 0, + NSTableViewSelectionHighlightStyleSourceList = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTableViewDraggingDestinationFeedbackStyle { + NSTableViewDraggingDestinationFeedbackStyleNone = -1, + NSTableViewDraggingDestinationFeedbackStyleRegular = 0, + NSTableViewDraggingDestinationFeedbackStyleSourceList = 1, + NSTableViewDraggingDestinationFeedbackStyleGap = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTableRowActionEdge { + NSTableRowActionEdgeLeading = 0, + NSTableRowActionEdgeTrailing = 1, + } +); pub type NSTableViewAutosaveName = NSString; -pub type NSTableViewAnimationOptions = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTableViewAnimationOptions { + NSTableViewAnimationEffectNone = 0x0, + NSTableViewAnimationEffectFade = 0x1, + NSTableViewAnimationEffectGap = 0x2, + NSTableViewAnimationSlideUp = 0x10, + NSTableViewAnimationSlideDown = 0x20, + NSTableViewAnimationSlideLeft = 0x30, + NSTableViewAnimationSlideRight = 0x40, + } +); extern_class!( #[derive(Debug)] @@ -610,25 +641,15 @@ extern_methods!( pub type NSTableViewDelegate = NSObject; -extern "C" { - pub static NSTableViewSelectionDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSTableViewSelectionDidChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSTableViewColumnDidMoveNotification: &'static NSNotificationName; -} +extern_static!(NSTableViewColumnDidMoveNotification: &'static NSNotificationName); -extern "C" { - pub static NSTableViewColumnDidResizeNotification: &'static NSNotificationName; -} +extern_static!(NSTableViewColumnDidResizeNotification: &'static NSNotificationName); -extern "C" { - pub static NSTableViewSelectionIsChangingNotification: &'static NSNotificationName; -} +extern_static!(NSTableViewSelectionIsChangingNotification: &'static NSNotificationName); -extern "C" { - pub static NSTableViewRowViewKey: &'static NSUserInterfaceItemIdentifier; -} +extern_static!(NSTableViewRowViewKey: &'static NSUserInterfaceItemIdentifier); pub type NSTableViewDataSource = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs index b16ae48ca..66c856d0b 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs @@ -5,9 +5,13 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTableViewRowActionStyle = NSInteger; -pub const NSTableViewRowActionStyleRegular: NSTableViewRowActionStyle = 0; -pub const NSTableViewRowActionStyleDestructive: NSTableViewRowActionStyle = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTableViewRowActionStyle { + NSTableViewRowActionStyleRegular = 0, + NSTableViewRowActionStyleDestructive = 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index 46d1e9f0d..a8705beb9 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -5,17 +5,25 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextAlignment = NSInteger; -pub const NSTextAlignmentLeft: NSTextAlignment = 0; -pub const NSTextAlignmentRight: NSTextAlignment = 1; -pub const NSTextAlignmentCenter: NSTextAlignment = 2; -pub const NSTextAlignmentJustified: NSTextAlignment = 3; -pub const NSTextAlignmentNatural: NSTextAlignment = 4; - -pub type NSWritingDirection = NSInteger; -pub const NSWritingDirectionNatural: NSWritingDirection = -1; -pub const NSWritingDirectionLeftToRight: NSWritingDirection = 0; -pub const NSWritingDirectionRightToLeft: NSWritingDirection = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextAlignment { + NSTextAlignmentLeft = 0, + NSTextAlignmentRight = 1, + NSTextAlignmentCenter = 2, + NSTextAlignmentJustified = 3, + NSTextAlignmentNatural = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSWritingDirection { + NSWritingDirectionNatural = -1, + NSWritingDirectionLeftToRight = 0, + NSWritingDirectionRightToLeft = 1, + } +); extern_class!( #[derive(Debug)] @@ -252,66 +260,77 @@ extern_methods!( } ); -pub const NSEnterCharacter: c_uint = 0x0003; -pub const NSBackspaceCharacter: c_uint = 0x0008; -pub const NSTabCharacter: c_uint = 0x0009; -pub const NSNewlineCharacter: c_uint = 0x000a; -pub const NSFormFeedCharacter: c_uint = 0x000c; -pub const NSCarriageReturnCharacter: c_uint = 0x000d; -pub const NSBackTabCharacter: c_uint = 0x0019; -pub const NSDeleteCharacter: c_uint = 0x007f; -pub const NSLineSeparatorCharacter: c_uint = 0x2028; -pub const NSParagraphSeparatorCharacter: c_uint = 0x2029; - -pub type NSTextMovement = NSInteger; -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; - -extern "C" { - pub static NSTextDidBeginEditingNotification: &'static NSNotificationName; -} - -extern "C" { - pub static NSTextDidEndEditingNotification: &'static NSNotificationName; -} - -extern "C" { - pub static NSTextDidChangeNotification: &'static NSNotificationName; -} - -extern "C" { - pub static NSTextMovementUserInfoKey: &'static NSString; -} - -pub const NSIllegalTextMovement: c_uint = 0; -pub const NSReturnTextMovement: c_uint = 0x10; -pub const NSTabTextMovement: c_uint = 0x11; -pub const NSBacktabTextMovement: c_uint = 0x12; -pub const NSLeftTextMovement: c_uint = 0x13; -pub const NSRightTextMovement: c_uint = 0x14; -pub const NSUpTextMovement: c_uint = 0x15; -pub const NSDownTextMovement: c_uint = 0x16; -pub const NSCancelTextMovement: c_uint = 0x17; -pub const NSOtherTextMovement: c_uint = 0; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSEnterCharacter = 0x0003, + NSBackspaceCharacter = 0x0008, + NSTabCharacter = 0x0009, + NSNewlineCharacter = 0x000a, + NSFormFeedCharacter = 0x000c, + NSCarriageReturnCharacter = 0x000d, + NSBackTabCharacter = 0x0019, + NSDeleteCharacter = 0x007f, + NSLineSeparatorCharacter = 0x2028, + NSParagraphSeparatorCharacter = 0x2029, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextMovement { + NSTextMovementReturn = 0x10, + NSTextMovementTab = 0x11, + NSTextMovementBacktab = 0x12, + NSTextMovementLeft = 0x13, + NSTextMovementRight = 0x14, + NSTextMovementUp = 0x15, + NSTextMovementDown = 0x16, + NSTextMovementCancel = 0x17, + NSTextMovementOther = 0, + } +); + +extern_static!(NSTextDidBeginEditingNotification: &'static NSNotificationName); + +extern_static!(NSTextDidEndEditingNotification: &'static NSNotificationName); + +extern_static!(NSTextDidChangeNotification: &'static NSNotificationName); + +extern_static!(NSTextMovementUserInfoKey: &'static NSString); + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSIllegalTextMovement = 0, + NSReturnTextMovement = 0x10, + NSTabTextMovement = 0x11, + NSBacktabTextMovement = 0x12, + NSLeftTextMovement = 0x13, + NSRightTextMovement = 0x14, + NSUpTextMovement = 0x15, + NSDownTextMovement = 0x16, + NSCancelTextMovement = 0x17, + NSOtherTextMovement = 0, + } +); pub type NSTextDelegate = NSObject; -pub const NSTextWritingDirectionEmbedding: c_uint = 0 << 1; -pub const NSTextWritingDirectionOverride: c_uint = 1 << 1; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSTextWritingDirectionEmbedding = 0<<1, + NSTextWritingDirectionOverride = 1<<1, + } +); -pub static NSLeftTextAlignment: NSTextAlignment = NSTextAlignmentLeft; +extern_static!(NSLeftTextAlignment: NSTextAlignment = NSTextAlignmentLeft); -pub static NSRightTextAlignment: NSTextAlignment = NSTextAlignmentRight; +extern_static!(NSRightTextAlignment: NSTextAlignment = NSTextAlignmentRight); -pub static NSCenterTextAlignment: NSTextAlignment = NSTextAlignmentCenter; +extern_static!(NSCenterTextAlignment: NSTextAlignment = NSTextAlignmentCenter); -pub static NSJustifiedTextAlignment: NSTextAlignment = NSTextAlignmentJustified; +extern_static!(NSJustifiedTextAlignment: NSTextAlignment = NSTextAlignmentJustified); -pub static NSNaturalTextAlignment: NSTextAlignment = NSTextAlignmentNatural; +extern_static!(NSNaturalTextAlignment: NSTextAlignment = NSTextAlignmentNatural); diff --git a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs index 57ff59578..6c3a27d45 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAlternatives.rs @@ -34,6 +34,6 @@ extern_methods!( } ); -extern "C" { - pub static NSTextAlternativesSelectedAlternativeStringNotification: &'static NSNotificationName; -} +extern_static!( + NSTextAlternativesSelectedAlternativeStringNotification: &'static NSNotificationName +); diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index 9a78e2c6b..7163e03d6 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -5,7 +5,12 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub const NSAttachmentCharacter: c_uint = 0xFFFC; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSAttachmentCharacter = 0xFFFC, + } +); pub type NSTextAttachmentContainer = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs index 70505f1ac..cfc1162c7 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs @@ -5,10 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextInputTraitType = NSInteger; -pub const NSTextInputTraitTypeDefault: NSTextInputTraitType = 0; -pub const NSTextInputTraitTypeNo: NSTextInputTraitType = 1; -pub const NSTextInputTraitTypeYes: NSTextInputTraitType = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextInputTraitType { + NSTextInputTraitTypeDefault = 0, + NSTextInputTraitTypeNo = 1, + NSTextInputTraitTypeYes = 2, + } +); pub type NSTextInputTraits = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextContainer.rs b/crates/icrate/src/generated/AppKit/NSTextContainer.rs index 3ca9bfb3f..c076f6695 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContainer.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContainer.rs @@ -100,18 +100,26 @@ extern_methods!( } ); -pub type NSLineSweepDirection = NSUInteger; -pub const NSLineSweepLeft: NSLineSweepDirection = 0; -pub const NSLineSweepRight: NSLineSweepDirection = 1; -pub const NSLineSweepDown: NSLineSweepDirection = 2; -pub const NSLineSweepUp: NSLineSweepDirection = 3; - -pub type NSLineMovementDirection = NSUInteger; -pub const NSLineDoesntMove: NSLineMovementDirection = 0; -pub const NSLineMovesLeft: NSLineMovementDirection = 1; -pub const NSLineMovesRight: NSLineMovementDirection = 2; -pub const NSLineMovesDown: NSLineMovementDirection = 3; -pub const NSLineMovesUp: NSLineMovementDirection = 4; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSLineSweepDirection { + NSLineSweepLeft = 0, + NSLineSweepRight = 1, + NSLineSweepDown = 2, + NSLineSweepUp = 3, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSLineMovementDirection { + NSLineDoesntMove = 0, + NSLineMovesLeft = 1, + NSLineMovesRight = 2, + NSLineMovesDown = 3, + NSLineMovesUp = 4, + } +); extern_methods!( /// NSTextContainerDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSTextContent.rs b/crates/icrate/src/generated/AppKit/NSTextContent.rs index dc9f21c8f..59dffe76d 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContent.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContent.rs @@ -7,16 +7,10 @@ use crate::Foundation::*; pub type NSTextContentType = NSString; -extern "C" { - pub static NSTextContentTypeUsername: &'static NSTextContentType; -} +extern_static!(NSTextContentTypeUsername: &'static NSTextContentType); -extern "C" { - pub static NSTextContentTypePassword: &'static NSTextContentType; -} +extern_static!(NSTextContentTypePassword: &'static NSTextContentType); -extern "C" { - pub static NSTextContentTypeOneTimeCode: &'static NSTextContentType; -} +extern_static!(NSTextContentTypeOneTimeCode: &'static NSTextContentType); pub type NSTextContent = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index 471d3706f..4dcc181bf 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -5,10 +5,13 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextContentManagerEnumerationOptions = NSUInteger; -pub const NSTextContentManagerEnumerationOptionsNone: NSTextContentManagerEnumerationOptions = 0; -pub const NSTextContentManagerEnumerationOptionsReverse: NSTextContentManagerEnumerationOptions = - 1 << 0; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTextContentManagerEnumerationOptions { + NSTextContentManagerEnumerationOptionsNone = 0, + NSTextContentManagerEnumerationOptionsReverse = 1 << 0, + } +); pub type NSTextElementProvider = NSObject; @@ -160,7 +163,6 @@ extern_methods!( } ); -extern "C" { - pub static NSTextContentStorageUnsupportedAttributeAddedNotification: - &'static NSNotificationName; -} +extern_static!( + NSTextContentStorageUnsupportedAttributeAddedNotification: &'static NSNotificationName +); diff --git a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs index 951e46b1d..12303cb9e 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFieldCell.rs @@ -5,9 +5,13 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextFieldBezelStyle = NSUInteger; -pub const NSTextFieldSquareBezel: NSTextFieldBezelStyle = 0; -pub const NSTextFieldRoundedBezel: NSTextFieldBezelStyle = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTextFieldBezelStyle { + NSTextFieldSquareBezel = 0, + NSTextFieldRoundedBezel = 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index 9e6833026..b4aeb4ae5 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -5,36 +5,40 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextFinderAction = NSInteger; -pub const NSTextFinderActionShowFindInterface: NSTextFinderAction = 1; -pub const NSTextFinderActionNextMatch: NSTextFinderAction = 2; -pub const NSTextFinderActionPreviousMatch: NSTextFinderAction = 3; -pub const NSTextFinderActionReplaceAll: NSTextFinderAction = 4; -pub const NSTextFinderActionReplace: NSTextFinderAction = 5; -pub const NSTextFinderActionReplaceAndFind: NSTextFinderAction = 6; -pub const NSTextFinderActionSetSearchString: NSTextFinderAction = 7; -pub const NSTextFinderActionReplaceAllInSelection: NSTextFinderAction = 8; -pub const NSTextFinderActionSelectAll: NSTextFinderAction = 9; -pub const NSTextFinderActionSelectAllInSelection: NSTextFinderAction = 10; -pub const NSTextFinderActionHideFindInterface: NSTextFinderAction = 11; -pub const NSTextFinderActionShowReplaceInterface: NSTextFinderAction = 12; -pub const NSTextFinderActionHideReplaceInterface: NSTextFinderAction = 13; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextFinderAction { + NSTextFinderActionShowFindInterface = 1, + NSTextFinderActionNextMatch = 2, + NSTextFinderActionPreviousMatch = 3, + NSTextFinderActionReplaceAll = 4, + NSTextFinderActionReplace = 5, + NSTextFinderActionReplaceAndFind = 6, + NSTextFinderActionSetSearchString = 7, + NSTextFinderActionReplaceAllInSelection = 8, + NSTextFinderActionSelectAll = 9, + NSTextFinderActionSelectAllInSelection = 10, + NSTextFinderActionHideFindInterface = 11, + NSTextFinderActionShowReplaceInterface = 12, + NSTextFinderActionHideReplaceInterface = 13, + } +); pub type NSPasteboardTypeTextFinderOptionKey = NSString; -extern "C" { - pub static NSTextFinderCaseInsensitiveKey: &'static NSPasteboardTypeTextFinderOptionKey; -} +extern_static!(NSTextFinderCaseInsensitiveKey: &'static NSPasteboardTypeTextFinderOptionKey); -extern "C" { - pub static NSTextFinderMatchingTypeKey: &'static NSPasteboardTypeTextFinderOptionKey; -} +extern_static!(NSTextFinderMatchingTypeKey: &'static NSPasteboardTypeTextFinderOptionKey); -pub type NSTextFinderMatchingType = NSInteger; -pub const NSTextFinderMatchingTypeContains: NSTextFinderMatchingType = 0; -pub const NSTextFinderMatchingTypeStartsWith: NSTextFinderMatchingType = 1; -pub const NSTextFinderMatchingTypeFullWord: NSTextFinderMatchingType = 2; -pub const NSTextFinderMatchingTypeEndsWith: NSTextFinderMatchingType = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextFinderMatchingType { + NSTextFinderMatchingTypeContains = 0, + NSTextFinderMatchingTypeStartsWith = 1, + NSTextFinderMatchingTypeFullWord = 2, + NSTextFinderMatchingTypeEndsWith = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs index 15e99a204..21c35a2a1 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputContext.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputContext.rs @@ -86,7 +86,6 @@ extern_methods!( } ); -extern "C" { - pub static NSTextInputContextKeyboardSelectionDidChangeNotification: - &'static NSNotificationName; -} +extern_static!( + NSTextInputContextKeyboardSelectionDidChangeNotification: &'static NSNotificationName +); diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index aebfbd534..3907cc6c3 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -5,22 +5,26 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextLayoutFragmentEnumerationOptions = NSUInteger; -pub const NSTextLayoutFragmentEnumerationOptionsNone: NSTextLayoutFragmentEnumerationOptions = 0; -pub const NSTextLayoutFragmentEnumerationOptionsReverse: NSTextLayoutFragmentEnumerationOptions = - 1 << 0; -pub const NSTextLayoutFragmentEnumerationOptionsEstimatesSize: - NSTextLayoutFragmentEnumerationOptions = 1 << 1; -pub const NSTextLayoutFragmentEnumerationOptionsEnsuresLayout: - NSTextLayoutFragmentEnumerationOptions = 1 << 2; -pub const NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment: - NSTextLayoutFragmentEnumerationOptions = 1 << 3; - -pub type NSTextLayoutFragmentState = NSUInteger; -pub const NSTextLayoutFragmentStateNone: NSTextLayoutFragmentState = 0; -pub const NSTextLayoutFragmentStateEstimatedUsageBounds: NSTextLayoutFragmentState = 1; -pub const NSTextLayoutFragmentStateCalculatedUsageBounds: NSTextLayoutFragmentState = 2; -pub const NSTextLayoutFragmentStateLayoutAvailable: NSTextLayoutFragmentState = 3; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTextLayoutFragmentEnumerationOptions { + NSTextLayoutFragmentEnumerationOptionsNone = 0, + NSTextLayoutFragmentEnumerationOptionsReverse = 1 << 0, + NSTextLayoutFragmentEnumerationOptionsEstimatesSize = 1 << 1, + NSTextLayoutFragmentEnumerationOptionsEnsuresLayout = 1 << 2, + NSTextLayoutFragmentEnumerationOptionsEnsuresExtraLineFragment = 1 << 3, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTextLayoutFragmentState { + NSTextLayoutFragmentStateNone = 0, + NSTextLayoutFragmentStateEstimatedUsageBounds = 1, + NSTextLayoutFragmentStateCalculatedUsageBounds = 2, + NSTextLayoutFragmentStateLayoutAvailable = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index e36e6e125..608e6454d 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -5,23 +5,26 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextLayoutManagerSegmentType = NSInteger; -pub const NSTextLayoutManagerSegmentTypeStandard: NSTextLayoutManagerSegmentType = 0; -pub const NSTextLayoutManagerSegmentTypeSelection: NSTextLayoutManagerSegmentType = 1; -pub const NSTextLayoutManagerSegmentTypeHighlight: NSTextLayoutManagerSegmentType = 2; - -pub type NSTextLayoutManagerSegmentOptions = NSUInteger; -pub const NSTextLayoutManagerSegmentOptionsNone: NSTextLayoutManagerSegmentOptions = 0; -pub const NSTextLayoutManagerSegmentOptionsRangeNotRequired: NSTextLayoutManagerSegmentOptions = - 1 << 0; -pub const NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded: - NSTextLayoutManagerSegmentOptions = 1 << 1; -pub const NSTextLayoutManagerSegmentOptionsHeadSegmentExtended: NSTextLayoutManagerSegmentOptions = - 1 << 2; -pub const NSTextLayoutManagerSegmentOptionsTailSegmentExtended: NSTextLayoutManagerSegmentOptions = - 1 << 3; -pub const NSTextLayoutManagerSegmentOptionsUpstreamAffinity: NSTextLayoutManagerSegmentOptions = - 1 << 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextLayoutManagerSegmentType { + NSTextLayoutManagerSegmentTypeStandard = 0, + NSTextLayoutManagerSegmentTypeSelection = 1, + NSTextLayoutManagerSegmentTypeHighlight = 2, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTextLayoutManagerSegmentOptions { + NSTextLayoutManagerSegmentOptionsNone = 0, + NSTextLayoutManagerSegmentOptionsRangeNotRequired = 1 << 0, + NSTextLayoutManagerSegmentOptionsMiddleFragmentsExcluded = 1 << 1, + NSTextLayoutManagerSegmentOptionsHeadSegmentExtended = 1 << 2, + NSTextLayoutManagerSegmentOptionsTailSegmentExtended = 1 << 3, + NSTextLayoutManagerSegmentOptionsUpstreamAffinity = 1 << 4, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextList.rs b/crates/icrate/src/generated/AppKit/NSTextList.rs index d79bafcc6..0c1207cc4 100644 --- a/crates/icrate/src/generated/AppKit/NSTextList.rs +++ b/crates/icrate/src/generated/AppKit/NSTextList.rs @@ -7,76 +7,46 @@ use crate::Foundation::*; pub type NSTextListMarkerFormat = NSString; -extern "C" { - pub static NSTextListMarkerBox: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerBox: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerCheck: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerCheck: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerCircle: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerCircle: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerDiamond: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerDiamond: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerDisc: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerDisc: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerHyphen: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerHyphen: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerSquare: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerSquare: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerLowercaseHexadecimal: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerLowercaseHexadecimal: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerUppercaseHexadecimal: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerUppercaseHexadecimal: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerOctal: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerOctal: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerLowercaseAlpha: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerLowercaseAlpha: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerUppercaseAlpha: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerUppercaseAlpha: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerLowercaseLatin: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerLowercaseLatin: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerUppercaseLatin: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerUppercaseLatin: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerLowercaseRoman: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerLowercaseRoman: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerUppercaseRoman: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerUppercaseRoman: &'static NSTextListMarkerFormat); -extern "C" { - pub static NSTextListMarkerDecimal: &'static NSTextListMarkerFormat; -} +extern_static!(NSTextListMarkerDecimal: &'static NSTextListMarkerFormat); -pub type NSTextListOptions = NSUInteger; -pub const NSTextListPrependEnclosingMarker: NSTextListOptions = 1 << 0; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTextListOptions { + NSTextListPrependEnclosingMarker = 1 << 0, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextSelection.rs b/crates/icrate/src/generated/AppKit/NSTextSelection.rs index 804e0c1ff..f9e9e90f0 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelection.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelection.rs @@ -5,16 +5,24 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextSelectionGranularity = NSInteger; -pub const NSTextSelectionGranularityCharacter: NSTextSelectionGranularity = 0; -pub const NSTextSelectionGranularityWord: NSTextSelectionGranularity = 1; -pub const NSTextSelectionGranularityParagraph: NSTextSelectionGranularity = 2; -pub const NSTextSelectionGranularityLine: NSTextSelectionGranularity = 3; -pub const NSTextSelectionGranularitySentence: NSTextSelectionGranularity = 4; - -pub type NSTextSelectionAffinity = NSInteger; -pub const NSTextSelectionAffinityUpstream: NSTextSelectionAffinity = 0; -pub const NSTextSelectionAffinityDownstream: NSTextSelectionAffinity = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextSelectionGranularity { + NSTextSelectionGranularityCharacter = 0, + NSTextSelectionGranularityWord = 1, + NSTextSelectionGranularityParagraph = 2, + NSTextSelectionGranularityLine = 3, + NSTextSelectionGranularitySentence = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextSelectionAffinity { + NSTextSelectionAffinityUpstream = 0, + NSTextSelectionAffinityDownstream = 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index bd774805a..23bb72150 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -5,39 +5,55 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextSelectionNavigationDirection = NSInteger; -pub const NSTextSelectionNavigationDirectionForward: NSTextSelectionNavigationDirection = 0; -pub const NSTextSelectionNavigationDirectionBackward: NSTextSelectionNavigationDirection = 1; -pub const NSTextSelectionNavigationDirectionRight: NSTextSelectionNavigationDirection = 2; -pub const NSTextSelectionNavigationDirectionLeft: NSTextSelectionNavigationDirection = 3; -pub const NSTextSelectionNavigationDirectionUp: NSTextSelectionNavigationDirection = 4; -pub const NSTextSelectionNavigationDirectionDown: NSTextSelectionNavigationDirection = 5; - -pub type NSTextSelectionNavigationDestination = NSInteger; -pub const NSTextSelectionNavigationDestinationCharacter: NSTextSelectionNavigationDestination = 0; -pub const NSTextSelectionNavigationDestinationWord: NSTextSelectionNavigationDestination = 1; -pub const NSTextSelectionNavigationDestinationLine: NSTextSelectionNavigationDestination = 2; -pub const NSTextSelectionNavigationDestinationSentence: NSTextSelectionNavigationDestination = 3; -pub const NSTextSelectionNavigationDestinationParagraph: NSTextSelectionNavigationDestination = 4; -pub const NSTextSelectionNavigationDestinationContainer: NSTextSelectionNavigationDestination = 5; -pub const NSTextSelectionNavigationDestinationDocument: NSTextSelectionNavigationDestination = 6; - -pub type NSTextSelectionNavigationModifier = NSUInteger; -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: - NSTextSelectionNavigationWritingDirection = 0; -pub const NSTextSelectionNavigationWritingDirectionRightToLeft: - NSTextSelectionNavigationWritingDirection = 1; - -pub type NSTextSelectionNavigationLayoutOrientation = NSInteger; -pub const NSTextSelectionNavigationLayoutOrientationHorizontal: - NSTextSelectionNavigationLayoutOrientation = 0; -pub const NSTextSelectionNavigationLayoutOrientationVertical: - NSTextSelectionNavigationLayoutOrientation = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextSelectionNavigationDirection { + NSTextSelectionNavigationDirectionForward = 0, + NSTextSelectionNavigationDirectionBackward = 1, + NSTextSelectionNavigationDirectionRight = 2, + NSTextSelectionNavigationDirectionLeft = 3, + NSTextSelectionNavigationDirectionUp = 4, + NSTextSelectionNavigationDirectionDown = 5, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextSelectionNavigationDestination { + NSTextSelectionNavigationDestinationCharacter = 0, + NSTextSelectionNavigationDestinationWord = 1, + NSTextSelectionNavigationDestinationLine = 2, + NSTextSelectionNavigationDestinationSentence = 3, + NSTextSelectionNavigationDestinationParagraph = 4, + NSTextSelectionNavigationDestinationContainer = 5, + NSTextSelectionNavigationDestinationDocument = 6, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTextSelectionNavigationModifier { + NSTextSelectionNavigationModifierExtend = 1 << 0, + NSTextSelectionNavigationModifierVisual = 1 << 1, + NSTextSelectionNavigationModifierMultiple = 1 << 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextSelectionNavigationWritingDirection { + NSTextSelectionNavigationWritingDirectionLeftToRight = 0, + NSTextSelectionNavigationWritingDirectionRightToLeft = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextSelectionNavigationLayoutOrientation { + NSTextSelectionNavigationLayoutOrientationHorizontal = 0, + NSTextSelectionNavigationLayoutOrientationVertical = 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index 37f1437e6..ceb67db1f 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -5,9 +5,13 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextStorageEditActions = NSUInteger; -pub const NSTextStorageEditedAttributes: NSTextStorageEditActions = 1 << 0; -pub const NSTextStorageEditedCharacters: NSTextStorageEditActions = 1 << 1; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTextStorageEditActions { + NSTextStorageEditedAttributes = 1 << 0, + NSTextStorageEditedCharacters = 1 << 1, + } +); extern_class!( #[derive(Debug)] @@ -77,13 +81,9 @@ extern_methods!( pub type NSTextStorageDelegate = NSObject; -extern "C" { - pub static NSTextStorageWillProcessEditingNotification: &'static NSNotificationName; -} +extern_static!(NSTextStorageWillProcessEditingNotification: &'static NSNotificationName); -extern "C" { - pub static NSTextStorageDidProcessEditingNotification: &'static NSNotificationName; -} +extern_static!(NSTextStorageDidProcessEditingNotification: &'static NSNotificationName); pub type NSTextStorageObserving = NSObject; diff --git a/crates/icrate/src/generated/AppKit/NSTextTable.rs b/crates/icrate/src/generated/AppKit/NSTextTable.rs index 0a1cbbbd4..560fed7af 100644 --- a/crates/icrate/src/generated/AppKit/NSTextTable.rs +++ b/crates/icrate/src/generated/AppKit/NSTextTable.rs @@ -5,32 +5,52 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextBlockValueType = NSUInteger; -pub const NSTextBlockAbsoluteValueType: NSTextBlockValueType = 0; -pub const NSTextBlockPercentageValueType: NSTextBlockValueType = 1; - -pub type NSTextBlockDimension = NSUInteger; -pub const NSTextBlockWidth: NSTextBlockDimension = 0; -pub const NSTextBlockMinimumWidth: NSTextBlockDimension = 1; -pub const NSTextBlockMaximumWidth: NSTextBlockDimension = 2; -pub const NSTextBlockHeight: NSTextBlockDimension = 4; -pub const NSTextBlockMinimumHeight: NSTextBlockDimension = 5; -pub const NSTextBlockMaximumHeight: NSTextBlockDimension = 6; - -pub type NSTextBlockLayer = NSInteger; -pub const NSTextBlockPadding: NSTextBlockLayer = -1; -pub const NSTextBlockBorder: NSTextBlockLayer = 0; -pub const NSTextBlockMargin: NSTextBlockLayer = 1; - -pub type NSTextBlockVerticalAlignment = NSUInteger; -pub const NSTextBlockTopAlignment: NSTextBlockVerticalAlignment = 0; -pub const NSTextBlockMiddleAlignment: NSTextBlockVerticalAlignment = 1; -pub const NSTextBlockBottomAlignment: NSTextBlockVerticalAlignment = 2; -pub const NSTextBlockBaselineAlignment: NSTextBlockVerticalAlignment = 3; - -pub type NSTextTableLayoutAlgorithm = NSUInteger; -pub const NSTextTableAutomaticLayoutAlgorithm: NSTextTableLayoutAlgorithm = 0; -pub const NSTextTableFixedLayoutAlgorithm: NSTextTableLayoutAlgorithm = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTextBlockValueType { + NSTextBlockAbsoluteValueType = 0, + NSTextBlockPercentageValueType = 1, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTextBlockDimension { + NSTextBlockWidth = 0, + NSTextBlockMinimumWidth = 1, + NSTextBlockMaximumWidth = 2, + NSTextBlockHeight = 4, + NSTextBlockMinimumHeight = 5, + NSTextBlockMaximumHeight = 6, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTextBlockLayer { + NSTextBlockPadding = -1, + NSTextBlockBorder = 0, + NSTextBlockMargin = 1, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTextBlockVerticalAlignment { + NSTextBlockTopAlignment = 0, + NSTextBlockMiddleAlignment = 1, + NSTextBlockBottomAlignment = 2, + NSTextBlockBaselineAlignment = 3, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTextTableLayoutAlgorithm { + NSTextTableAutomaticLayoutAlgorithm = 0, + NSTextTableFixedLayoutAlgorithm = 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index aabaa6ec1..6bd48ba11 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -5,18 +5,24 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSSelectionGranularity = NSUInteger; -pub const NSSelectByCharacter: NSSelectionGranularity = 0; -pub const NSSelectByWord: NSSelectionGranularity = 1; -pub const NSSelectByParagraph: NSSelectionGranularity = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSSelectionGranularity { + NSSelectByCharacter = 0, + NSSelectByWord = 1, + NSSelectByParagraph = 2, + } +); -pub type NSSelectionAffinity = NSUInteger; -pub const NSSelectionAffinityUpstream: NSSelectionAffinity = 0; -pub const NSSelectionAffinityDownstream: NSSelectionAffinity = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSSelectionAffinity { + NSSelectionAffinityUpstream = 0, + NSSelectionAffinityDownstream = 1, + } +); -extern "C" { - pub static NSAllRomanInputSourcesLocaleIdentifier: &'static NSString; -} +extern_static!(NSAllRomanInputSourcesLocaleIdentifier: &'static NSString); extern_class!( #[derive(Debug)] @@ -951,78 +957,58 @@ extern_methods!( pub type NSTextViewDelegate = NSObject; -extern "C" { - pub static NSTouchBarItemIdentifierCharacterPicker: &'static NSTouchBarItemIdentifier; -} - -extern "C" { - pub static NSTouchBarItemIdentifierTextColorPicker: &'static NSTouchBarItemIdentifier; -} - -extern "C" { - pub static NSTouchBarItemIdentifierTextStyle: &'static NSTouchBarItemIdentifier; -} - -extern "C" { - pub static NSTouchBarItemIdentifierTextAlignment: &'static NSTouchBarItemIdentifier; -} - -extern "C" { - pub static NSTouchBarItemIdentifierTextList: &'static NSTouchBarItemIdentifier; -} - -extern "C" { - pub static NSTouchBarItemIdentifierTextFormat: &'static NSTouchBarItemIdentifier; -} - -extern "C" { - pub static NSTextViewWillChangeNotifyingTextViewNotification: &'static NSNotificationName; -} - -extern "C" { - pub static NSTextViewDidChangeSelectionNotification: &'static NSNotificationName; -} - -extern "C" { - pub static NSTextViewDidChangeTypingAttributesNotification: &'static NSNotificationName; -} - -extern "C" { - pub static NSTextViewWillSwitchToNSLayoutManagerNotification: &'static NSNotificationName; -} - -extern "C" { - pub static NSTextViewDidSwitchToNSLayoutManagerNotification: &'static NSNotificationName; -} - -pub type NSFindPanelAction = NSUInteger; -pub const NSFindPanelActionShowFindPanel: NSFindPanelAction = 1; -pub const NSFindPanelActionNext: NSFindPanelAction = 2; -pub const NSFindPanelActionPrevious: NSFindPanelAction = 3; -pub const NSFindPanelActionReplaceAll: NSFindPanelAction = 4; -pub const NSFindPanelActionReplace: NSFindPanelAction = 5; -pub const NSFindPanelActionReplaceAndFind: NSFindPanelAction = 6; -pub const NSFindPanelActionSetFindString: NSFindPanelAction = 7; -pub const NSFindPanelActionReplaceAllInSelection: NSFindPanelAction = 8; -pub const NSFindPanelActionSelectAll: NSFindPanelAction = 9; -pub const NSFindPanelActionSelectAllInSelection: NSFindPanelAction = 10; - -extern "C" { - pub static NSFindPanelSearchOptionsPboardType: &'static NSPasteboardType; -} +extern_static!(NSTouchBarItemIdentifierCharacterPicker: &'static NSTouchBarItemIdentifier); + +extern_static!(NSTouchBarItemIdentifierTextColorPicker: &'static NSTouchBarItemIdentifier); + +extern_static!(NSTouchBarItemIdentifierTextStyle: &'static NSTouchBarItemIdentifier); + +extern_static!(NSTouchBarItemIdentifierTextAlignment: &'static NSTouchBarItemIdentifier); + +extern_static!(NSTouchBarItemIdentifierTextList: &'static NSTouchBarItemIdentifier); + +extern_static!(NSTouchBarItemIdentifierTextFormat: &'static NSTouchBarItemIdentifier); + +extern_static!(NSTextViewWillChangeNotifyingTextViewNotification: &'static NSNotificationName); + +extern_static!(NSTextViewDidChangeSelectionNotification: &'static NSNotificationName); + +extern_static!(NSTextViewDidChangeTypingAttributesNotification: &'static NSNotificationName); + +extern_static!(NSTextViewWillSwitchToNSLayoutManagerNotification: &'static NSNotificationName); + +extern_static!(NSTextViewDidSwitchToNSLayoutManagerNotification: &'static NSNotificationName); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSFindPanelAction { + NSFindPanelActionShowFindPanel = 1, + NSFindPanelActionNext = 2, + NSFindPanelActionPrevious = 3, + NSFindPanelActionReplaceAll = 4, + NSFindPanelActionReplace = 5, + NSFindPanelActionReplaceAndFind = 6, + NSFindPanelActionSetFindString = 7, + NSFindPanelActionReplaceAllInSelection = 8, + NSFindPanelActionSelectAll = 9, + NSFindPanelActionSelectAllInSelection = 10, + } +); + +extern_static!(NSFindPanelSearchOptionsPboardType: &'static NSPasteboardType); pub type NSPasteboardTypeFindPanelSearchOptionKey = NSString; -extern "C" { - pub static NSFindPanelCaseInsensitiveSearch: &'static NSPasteboardTypeFindPanelSearchOptionKey; -} +extern_static!(NSFindPanelCaseInsensitiveSearch: &'static NSPasteboardTypeFindPanelSearchOptionKey); -extern "C" { - pub static NSFindPanelSubstringMatch: &'static NSPasteboardTypeFindPanelSearchOptionKey; -} +extern_static!(NSFindPanelSubstringMatch: &'static NSPasteboardTypeFindPanelSearchOptionKey); -pub type NSFindPanelSubstringMatchType = NSUInteger; -pub const NSFindPanelSubstringMatchTypeContains: NSFindPanelSubstringMatchType = 0; -pub const NSFindPanelSubstringMatchTypeStartsWith: NSFindPanelSubstringMatchType = 1; -pub const NSFindPanelSubstringMatchTypeFullWord: NSFindPanelSubstringMatchType = 2; -pub const NSFindPanelSubstringMatchTypeEndsWith: NSFindPanelSubstringMatchType = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSFindPanelSubstringMatchType { + NSFindPanelSubstringMatchTypeContains = 0, + NSFindPanelSubstringMatchTypeStartsWith = 1, + NSFindPanelSubstringMatchTypeFullWord = 2, + NSFindPanelSubstringMatchTypeEndsWith = 3, + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs index 12025ef46..5f119d72b 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -5,12 +5,16 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTokenStyle = NSUInteger; -pub const NSTokenStyleDefault: NSTokenStyle = 0; -pub const NSTokenStyleNone: NSTokenStyle = 1; -pub const NSTokenStyleRounded: NSTokenStyle = 2; -pub const NSTokenStyleSquared: NSTokenStyle = 3; -pub const NSTokenStylePlainSquared: NSTokenStyle = 4; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTokenStyle { + NSTokenStyleDefault = 0, + NSTokenStyleNone = 1, + NSTokenStyleRounded = 2, + NSTokenStyleSquared = 3, + NSTokenStylePlainSquared = 4, + } +); extern_class!( #[derive(Debug)] @@ -60,8 +64,8 @@ extern_methods!( pub type NSTokenFieldCellDelegate = NSObject; -pub static NSDefaultTokenStyle: NSTokenStyle = NSTokenStyleDefault; +extern_static!(NSDefaultTokenStyle: NSTokenStyle = NSTokenStyleDefault); -pub static NSPlainTextTokenStyle: NSTokenStyle = NSTokenStyleNone; +extern_static!(NSPlainTextTokenStyle: NSTokenStyle = NSTokenStyleNone); -pub static NSRoundedTokenStyle: NSTokenStyle = NSTokenStyleRounded; +extern_static!(NSRoundedTokenStyle: NSTokenStyle = NSTokenStyleRounded); diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index fac1088ca..d43b5fd87 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -9,16 +9,24 @@ pub type NSToolbarIdentifier = NSString; pub type NSToolbarItemIdentifier = NSString; -pub type NSToolbarDisplayMode = NSUInteger; -pub const NSToolbarDisplayModeDefault: NSToolbarDisplayMode = 0; -pub const NSToolbarDisplayModeIconAndLabel: NSToolbarDisplayMode = 1; -pub const NSToolbarDisplayModeIconOnly: NSToolbarDisplayMode = 2; -pub const NSToolbarDisplayModeLabelOnly: NSToolbarDisplayMode = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSToolbarDisplayMode { + NSToolbarDisplayModeDefault = 0, + NSToolbarDisplayModeIconAndLabel = 1, + NSToolbarDisplayModeIconOnly = 2, + NSToolbarDisplayModeLabelOnly = 3, + } +); -pub type NSToolbarSizeMode = NSUInteger; -pub const NSToolbarSizeModeDefault: NSToolbarSizeMode = 0; -pub const NSToolbarSizeModeRegular: NSToolbarSizeMode = 1; -pub const NSToolbarSizeModeSmall: NSToolbarSizeMode = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSToolbarSizeMode { + NSToolbarSizeModeDefault = 0, + NSToolbarSizeModeRegular = 1, + NSToolbarSizeModeSmall = 2, + } +); extern_class!( #[derive(Debug)] @@ -147,13 +155,9 @@ extern_methods!( pub type NSToolbarDelegate = NSObject; -extern "C" { - pub static NSToolbarWillAddItemNotification: &'static NSNotificationName; -} +extern_static!(NSToolbarWillAddItemNotification: &'static NSNotificationName); -extern "C" { - pub static NSToolbarDidRemoveItemNotification: &'static NSNotificationName; -} +extern_static!(NSToolbarDidRemoveItemNotification: &'static NSNotificationName); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index cca82ea11..6ad63caf0 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -7,13 +7,13 @@ use crate::Foundation::*; pub type NSToolbarItemVisibilityPriority = NSInteger; -pub static NSToolbarItemVisibilityPriorityStandard: NSToolbarItemVisibilityPriority = 0; +extern_static!(NSToolbarItemVisibilityPriorityStandard: NSToolbarItemVisibilityPriority = 0); -pub static NSToolbarItemVisibilityPriorityLow: NSToolbarItemVisibilityPriority = -1000; +extern_static!(NSToolbarItemVisibilityPriorityLow: NSToolbarItemVisibilityPriority = -1000); -pub static NSToolbarItemVisibilityPriorityHigh: NSToolbarItemVisibilityPriority = 1000; +extern_static!(NSToolbarItemVisibilityPriorityHigh: NSToolbarItemVisibilityPriority = 1000); -pub static NSToolbarItemVisibilityPriorityUser: NSToolbarItemVisibilityPriority = 2000; +extern_static!(NSToolbarItemVisibilityPriorityUser: NSToolbarItemVisibilityPriority = 2000); extern_class!( #[derive(Debug)] @@ -167,42 +167,22 @@ extern_methods!( pub type NSCloudSharingValidation = NSObject; -extern "C" { - pub static NSToolbarSeparatorItemIdentifier: &'static NSToolbarItemIdentifier; -} +extern_static!(NSToolbarSeparatorItemIdentifier: &'static NSToolbarItemIdentifier); -extern "C" { - pub static NSToolbarSpaceItemIdentifier: &'static NSToolbarItemIdentifier; -} +extern_static!(NSToolbarSpaceItemIdentifier: &'static NSToolbarItemIdentifier); -extern "C" { - pub static NSToolbarFlexibleSpaceItemIdentifier: &'static NSToolbarItemIdentifier; -} +extern_static!(NSToolbarFlexibleSpaceItemIdentifier: &'static NSToolbarItemIdentifier); -extern "C" { - pub static NSToolbarShowColorsItemIdentifier: &'static NSToolbarItemIdentifier; -} +extern_static!(NSToolbarShowColorsItemIdentifier: &'static NSToolbarItemIdentifier); -extern "C" { - pub static NSToolbarShowFontsItemIdentifier: &'static NSToolbarItemIdentifier; -} +extern_static!(NSToolbarShowFontsItemIdentifier: &'static NSToolbarItemIdentifier); -extern "C" { - pub static NSToolbarCustomizeToolbarItemIdentifier: &'static NSToolbarItemIdentifier; -} +extern_static!(NSToolbarCustomizeToolbarItemIdentifier: &'static NSToolbarItemIdentifier); -extern "C" { - pub static NSToolbarPrintItemIdentifier: &'static NSToolbarItemIdentifier; -} +extern_static!(NSToolbarPrintItemIdentifier: &'static NSToolbarItemIdentifier); -extern "C" { - pub static NSToolbarToggleSidebarItemIdentifier: &'static NSToolbarItemIdentifier; -} +extern_static!(NSToolbarToggleSidebarItemIdentifier: &'static NSToolbarItemIdentifier); -extern "C" { - pub static NSToolbarCloudSharingItemIdentifier: &'static NSToolbarItemIdentifier; -} +extern_static!(NSToolbarCloudSharingItemIdentifier: &'static NSToolbarItemIdentifier); -extern "C" { - pub static NSToolbarSidebarTrackingSeparatorItemIdentifier: &'static NSToolbarItemIdentifier; -} +extern_static!(NSToolbarSidebarTrackingSeparatorItemIdentifier: &'static NSToolbarItemIdentifier); diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs index 0f77eb84e..e4882a8ba 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItemGroup.rs @@ -5,18 +5,23 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSToolbarItemGroupSelectionMode = NSInteger; -pub const NSToolbarItemGroupSelectionModeSelectOne: NSToolbarItemGroupSelectionMode = 0; -pub const NSToolbarItemGroupSelectionModeSelectAny: NSToolbarItemGroupSelectionMode = 1; -pub const NSToolbarItemGroupSelectionModeMomentary: NSToolbarItemGroupSelectionMode = 2; - -pub type NSToolbarItemGroupControlRepresentation = NSInteger; -pub const NSToolbarItemGroupControlRepresentationAutomatic: - NSToolbarItemGroupControlRepresentation = 0; -pub const NSToolbarItemGroupControlRepresentationExpanded: NSToolbarItemGroupControlRepresentation = - 1; -pub const NSToolbarItemGroupControlRepresentationCollapsed: - NSToolbarItemGroupControlRepresentation = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSToolbarItemGroupSelectionMode { + NSToolbarItemGroupSelectionModeSelectOne = 0, + NSToolbarItemGroupSelectionModeSelectAny = 1, + NSToolbarItemGroupSelectionModeMomentary = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSToolbarItemGroupControlRepresentation { + NSToolbarItemGroupControlRepresentationAutomatic = 0, + NSToolbarItemGroupControlRepresentationExpanded = 1, + NSToolbarItemGroupControlRepresentationCollapsed = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs index 293e10724..d1bffa749 100644 --- a/crates/icrate/src/generated/AppKit/NSTouch.rs +++ b/crates/icrate/src/generated/AppKit/NSTouch.rs @@ -5,23 +5,34 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTouchPhase = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTouchPhase { + NSTouchPhaseBegan = 1 << 0, + NSTouchPhaseMoved = 1 << 1, + NSTouchPhaseStationary = 1 << 2, + NSTouchPhaseEnded = 1 << 3, + NSTouchPhaseCancelled = 1 << 4, + NSTouchPhaseTouching = NSTouchPhaseBegan | NSTouchPhaseMoved | NSTouchPhaseStationary, + NSTouchPhaseAny = 18446744073709551615, + } +); -pub type NSTouchType = NSInteger; -pub const NSTouchTypeDirect: NSTouchType = 0; -pub const NSTouchTypeIndirect: NSTouchType = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTouchType { + NSTouchTypeDirect = 0, + NSTouchTypeIndirect = 1, + } +); -pub type NSTouchTypeMask = NSUInteger; -pub const NSTouchTypeMaskDirect: NSTouchTypeMask = 1 << NSTouchTypeDirect; -pub const NSTouchTypeMaskIndirect: NSTouchTypeMask = 1 << NSTouchTypeIndirect; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTouchTypeMask { + NSTouchTypeMaskDirect = 1 << NSTouchTypeDirect, + NSTouchTypeMaskIndirect = 1 << NSTouchTypeIndirect, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs index 301ae2a8b..dbffb161c 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBarItem.rs @@ -9,11 +9,11 @@ pub type NSTouchBarItemIdentifier = NSString; pub type NSTouchBarItemPriority = c_float; -pub static NSTouchBarItemPriorityHigh: NSTouchBarItemPriority = 1000; +extern_static!(NSTouchBarItemPriorityHigh: NSTouchBarItemPriority = 1000); -pub static NSTouchBarItemPriorityNormal: NSTouchBarItemPriority = 0; +extern_static!(NSTouchBarItemPriorityNormal: NSTouchBarItemPriority = 0); -pub static NSTouchBarItemPriorityLow: NSTouchBarItemPriority = -1000; +extern_static!(NSTouchBarItemPriorityLow: NSTouchBarItemPriority = -1000); extern_class!( #[derive(Debug)] @@ -64,18 +64,10 @@ extern_methods!( } ); -extern "C" { - pub static NSTouchBarItemIdentifierFixedSpaceSmall: &'static NSTouchBarItemIdentifier; -} +extern_static!(NSTouchBarItemIdentifierFixedSpaceSmall: &'static NSTouchBarItemIdentifier); -extern "C" { - pub static NSTouchBarItemIdentifierFixedSpaceLarge: &'static NSTouchBarItemIdentifier; -} +extern_static!(NSTouchBarItemIdentifierFixedSpaceLarge: &'static NSTouchBarItemIdentifier); -extern "C" { - pub static NSTouchBarItemIdentifierFlexibleSpace: &'static NSTouchBarItemIdentifier; -} +extern_static!(NSTouchBarItemIdentifierFlexibleSpace: &'static NSTouchBarItemIdentifier); -extern "C" { - pub static NSTouchBarItemIdentifierOtherItemsProxy: &'static NSTouchBarItemIdentifier; -} +extern_static!(NSTouchBarItemIdentifierOtherItemsProxy: &'static NSTouchBarItemIdentifier); diff --git a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs index f8940a97e..d95a6f3b6 100644 --- a/crates/icrate/src/generated/AppKit/NSTrackingArea.rs +++ b/crates/icrate/src/generated/AppKit/NSTrackingArea.rs @@ -5,17 +5,21 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTrackingAreaOptions = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTrackingAreaOptions { + NSTrackingMouseEnteredAndExited = 0x01, + NSTrackingMouseMoved = 0x02, + NSTrackingCursorUpdate = 0x04, + NSTrackingActiveWhenFirstResponder = 0x10, + NSTrackingActiveInKeyWindow = 0x20, + NSTrackingActiveInActiveApp = 0x40, + NSTrackingActiveAlways = 0x80, + NSTrackingAssumeInside = 0x100, + NSTrackingInVisibleRect = 0x200, + NSTrackingEnabledDuringMouseDrag = 0x400, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTypesetter.rs b/crates/icrate/src/generated/AppKit/NSTypesetter.rs index 2341733b9..7cf7f5fab 100644 --- a/crates/icrate/src/generated/AppKit/NSTypesetter.rs +++ b/crates/icrate/src/generated/AppKit/NSTypesetter.rs @@ -306,13 +306,17 @@ extern_methods!( } ); -pub type NSTypesetterControlCharacterAction = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSTypesetterControlCharacterAction { + NSTypesetterZeroAdvancementAction = 1 << 0, + NSTypesetterWhitespaceAction = 1 << 1, + NSTypesetterHorizontalTabAction = 1 << 2, + NSTypesetterLineBreakAction = 1 << 3, + NSTypesetterParagraphBreakAction = 1 << 4, + NSTypesetterContainerBreakAction = 1 << 5, + } +); extern_methods!( /// NSTypesetter_Deprecated diff --git a/crates/icrate/src/generated/AppKit/NSUserActivity.rs b/crates/icrate/src/generated/AppKit/NSUserActivity.rs index e91005dda..673e96f38 100644 --- a/crates/icrate/src/generated/AppKit/NSUserActivity.rs +++ b/crates/icrate/src/generated/AppKit/NSUserActivity.rs @@ -35,6 +35,4 @@ extern_methods!( } ); -extern "C" { - pub static NSUserActivityDocumentURLKey: &'static NSString; -} +extern_static!(NSUserActivityDocumentURLKey: &'static NSString); diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs index 81c08d982..dbbef7ed3 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceLayout.rs @@ -5,10 +5,18 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSUserInterfaceLayoutDirection = NSInteger; -pub const NSUserInterfaceLayoutDirectionLeftToRight: NSUserInterfaceLayoutDirection = 0; -pub const NSUserInterfaceLayoutDirectionRightToLeft: NSUserInterfaceLayoutDirection = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSUserInterfaceLayoutDirection { + NSUserInterfaceLayoutDirectionLeftToRight = 0, + NSUserInterfaceLayoutDirectionRightToLeft = 1, + } +); -pub type NSUserInterfaceLayoutOrientation = NSInteger; -pub const NSUserInterfaceLayoutOrientationHorizontal: NSUserInterfaceLayoutOrientation = 0; -pub const NSUserInterfaceLayoutOrientationVertical: NSUserInterfaceLayoutOrientation = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSUserInterfaceLayoutOrientation { + NSUserInterfaceLayoutOrientationHorizontal = 0, + NSUserInterfaceLayoutOrientationVertical = 1, + } +); diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 747dec477..c091f56ad 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -5,41 +5,57 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSAutoresizingMaskOptions = NSUInteger; -pub const NSViewNotSizable: NSAutoresizingMaskOptions = 0; -pub const NSViewMinXMargin: NSAutoresizingMaskOptions = 1; -pub const NSViewWidthSizable: NSAutoresizingMaskOptions = 2; -pub const NSViewMaxXMargin: NSAutoresizingMaskOptions = 4; -pub const NSViewMinYMargin: NSAutoresizingMaskOptions = 8; -pub const NSViewHeightSizable: NSAutoresizingMaskOptions = 16; -pub const NSViewMaxYMargin: NSAutoresizingMaskOptions = 32; - -pub type NSBorderType = NSUInteger; -pub const NSNoBorder: NSBorderType = 0; -pub const NSLineBorder: NSBorderType = 1; -pub const NSBezelBorder: NSBorderType = 2; -pub const NSGrooveBorder: NSBorderType = 3; - -pub type NSViewLayerContentsRedrawPolicy = NSInteger; -pub const NSViewLayerContentsRedrawNever: NSViewLayerContentsRedrawPolicy = 0; -pub const NSViewLayerContentsRedrawOnSetNeedsDisplay: NSViewLayerContentsRedrawPolicy = 1; -pub const NSViewLayerContentsRedrawDuringViewResize: NSViewLayerContentsRedrawPolicy = 2; -pub const NSViewLayerContentsRedrawBeforeViewResize: NSViewLayerContentsRedrawPolicy = 3; -pub const NSViewLayerContentsRedrawCrossfade: NSViewLayerContentsRedrawPolicy = 4; - -pub type NSViewLayerContentsPlacement = NSInteger; -pub const NSViewLayerContentsPlacementScaleAxesIndependently: NSViewLayerContentsPlacement = 0; -pub const NSViewLayerContentsPlacementScaleProportionallyToFit: NSViewLayerContentsPlacement = 1; -pub const NSViewLayerContentsPlacementScaleProportionallyToFill: NSViewLayerContentsPlacement = 2; -pub const NSViewLayerContentsPlacementCenter: NSViewLayerContentsPlacement = 3; -pub const NSViewLayerContentsPlacementTop: NSViewLayerContentsPlacement = 4; -pub const NSViewLayerContentsPlacementTopRight: NSViewLayerContentsPlacement = 5; -pub const NSViewLayerContentsPlacementRight: NSViewLayerContentsPlacement = 6; -pub const NSViewLayerContentsPlacementBottomRight: NSViewLayerContentsPlacement = 7; -pub const NSViewLayerContentsPlacementBottom: NSViewLayerContentsPlacement = 8; -pub const NSViewLayerContentsPlacementBottomLeft: NSViewLayerContentsPlacement = 9; -pub const NSViewLayerContentsPlacementLeft: NSViewLayerContentsPlacement = 10; -pub const NSViewLayerContentsPlacementTopLeft: NSViewLayerContentsPlacement = 11; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSAutoresizingMaskOptions { + NSViewNotSizable = 0, + NSViewMinXMargin = 1, + NSViewWidthSizable = 2, + NSViewMaxXMargin = 4, + NSViewMinYMargin = 8, + NSViewHeightSizable = 16, + NSViewMaxYMargin = 32, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBorderType { + NSNoBorder = 0, + NSLineBorder = 1, + NSBezelBorder = 2, + NSGrooveBorder = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSViewLayerContentsRedrawPolicy { + NSViewLayerContentsRedrawNever = 0, + NSViewLayerContentsRedrawOnSetNeedsDisplay = 1, + NSViewLayerContentsRedrawDuringViewResize = 2, + NSViewLayerContentsRedrawBeforeViewResize = 3, + NSViewLayerContentsRedrawCrossfade = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSViewLayerContentsPlacement { + NSViewLayerContentsPlacementScaleAxesIndependently = 0, + NSViewLayerContentsPlacementScaleProportionallyToFit = 1, + NSViewLayerContentsPlacementScaleProportionallyToFill = 2, + NSViewLayerContentsPlacementCenter = 3, + NSViewLayerContentsPlacementTop = 4, + NSViewLayerContentsPlacementTopRight = 5, + NSViewLayerContentsPlacementRight = 6, + NSViewLayerContentsPlacementBottomRight = 7, + NSViewLayerContentsPlacementBottom = 8, + NSViewLayerContentsPlacementBottomLeft = 9, + NSViewLayerContentsPlacementLeft = 10, + NSViewLayerContentsPlacementTopLeft = 11, + } +); pub type NSTrackingRectTag = NSInteger; @@ -887,22 +903,15 @@ extern_methods!( pub type NSViewFullScreenModeOptionKey = NSString; -extern "C" { - pub static NSFullScreenModeAllScreens: &'static NSViewFullScreenModeOptionKey; -} +extern_static!(NSFullScreenModeAllScreens: &'static NSViewFullScreenModeOptionKey); -extern "C" { - pub static NSFullScreenModeSetting: &'static NSViewFullScreenModeOptionKey; -} +extern_static!(NSFullScreenModeSetting: &'static NSViewFullScreenModeOptionKey); -extern "C" { - pub static NSFullScreenModeWindowLevel: &'static NSViewFullScreenModeOptionKey; -} +extern_static!(NSFullScreenModeWindowLevel: &'static NSViewFullScreenModeOptionKey); -extern "C" { - pub static NSFullScreenModeApplicationPresentationOptions: - &'static NSViewFullScreenModeOptionKey; -} +extern_static!( + NSFullScreenModeApplicationPresentationOptions: &'static NSViewFullScreenModeOptionKey +); extern_methods!( /// NSFullScreenMode @@ -927,20 +936,15 @@ extern_methods!( pub type NSDefinitionOptionKey = NSString; -extern "C" { - pub static NSDefinitionPresentationTypeKey: &'static NSDefinitionOptionKey; -} +extern_static!(NSDefinitionPresentationTypeKey: &'static NSDefinitionOptionKey); pub type NSDefinitionPresentationType = NSString; -extern "C" { - pub static NSDefinitionPresentationTypeOverlay: &'static NSDefinitionPresentationType; -} +extern_static!(NSDefinitionPresentationTypeOverlay: &'static NSDefinitionPresentationType); -extern "C" { - pub static NSDefinitionPresentationTypeDictionaryApplication: - &'static NSDefinitionPresentationType; -} +extern_static!( + NSDefinitionPresentationTypeDictionaryApplication: &'static NSDefinitionPresentationType +); extern_methods!( /// NSDefinition @@ -1097,22 +1101,12 @@ extern_methods!( } ); -extern "C" { - pub static NSViewFrameDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSViewFrameDidChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSViewFocusDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSViewFocusDidChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSViewBoundsDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSViewBoundsDidChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSViewGlobalFrameDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSViewGlobalFrameDidChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSViewDidUpdateTrackingAreasNotification: &'static NSNotificationName; -} +extern_static!(NSViewDidUpdateTrackingAreasNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index 1bdedd8a5..160fa9791 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -5,17 +5,20 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSViewControllerTransitionOptions = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSViewControllerTransitionOptions { + NSViewControllerTransitionNone = 0x0, + NSViewControllerTransitionCrossfade = 0x1, + NSViewControllerTransitionSlideUp = 0x10, + NSViewControllerTransitionSlideDown = 0x20, + NSViewControllerTransitionSlideLeft = 0x40, + NSViewControllerTransitionSlideRight = 0x80, + NSViewControllerTransitionSlideForward = 0x140, + NSViewControllerTransitionSlideBackward = 0x180, + NSViewControllerTransitionAllowUserInteraction = 0x1000, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs index d22bdb968..d863b57c1 100644 --- a/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs +++ b/crates/icrate/src/generated/AppKit/NSVisualEffectView.rs @@ -5,35 +5,47 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSVisualEffectMaterial = NSInteger; -pub const NSVisualEffectMaterialTitlebar: NSVisualEffectMaterial = 3; -pub const NSVisualEffectMaterialSelection: NSVisualEffectMaterial = 4; -pub const NSVisualEffectMaterialMenu: NSVisualEffectMaterial = 5; -pub const NSVisualEffectMaterialPopover: NSVisualEffectMaterial = 6; -pub const NSVisualEffectMaterialSidebar: NSVisualEffectMaterial = 7; -pub const NSVisualEffectMaterialHeaderView: NSVisualEffectMaterial = 10; -pub const NSVisualEffectMaterialSheet: NSVisualEffectMaterial = 11; -pub const NSVisualEffectMaterialWindowBackground: NSVisualEffectMaterial = 12; -pub const NSVisualEffectMaterialHUDWindow: NSVisualEffectMaterial = 13; -pub const NSVisualEffectMaterialFullScreenUI: NSVisualEffectMaterial = 15; -pub const NSVisualEffectMaterialToolTip: NSVisualEffectMaterial = 17; -pub const NSVisualEffectMaterialContentBackground: NSVisualEffectMaterial = 18; -pub const NSVisualEffectMaterialUnderWindowBackground: NSVisualEffectMaterial = 21; -pub const NSVisualEffectMaterialUnderPageBackground: NSVisualEffectMaterial = 22; -pub const NSVisualEffectMaterialAppearanceBased: NSVisualEffectMaterial = 0; -pub const NSVisualEffectMaterialLight: NSVisualEffectMaterial = 1; -pub const NSVisualEffectMaterialDark: NSVisualEffectMaterial = 2; -pub const NSVisualEffectMaterialMediumLight: NSVisualEffectMaterial = 8; -pub const NSVisualEffectMaterialUltraDark: NSVisualEffectMaterial = 9; - -pub type NSVisualEffectBlendingMode = NSInteger; -pub const NSVisualEffectBlendingModeBehindWindow: NSVisualEffectBlendingMode = 0; -pub const NSVisualEffectBlendingModeWithinWindow: NSVisualEffectBlendingMode = 1; - -pub type NSVisualEffectState = NSInteger; -pub const NSVisualEffectStateFollowsWindowActiveState: NSVisualEffectState = 0; -pub const NSVisualEffectStateActive: NSVisualEffectState = 1; -pub const NSVisualEffectStateInactive: NSVisualEffectState = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSVisualEffectMaterial { + NSVisualEffectMaterialTitlebar = 3, + NSVisualEffectMaterialSelection = 4, + NSVisualEffectMaterialMenu = 5, + NSVisualEffectMaterialPopover = 6, + NSVisualEffectMaterialSidebar = 7, + NSVisualEffectMaterialHeaderView = 10, + NSVisualEffectMaterialSheet = 11, + NSVisualEffectMaterialWindowBackground = 12, + NSVisualEffectMaterialHUDWindow = 13, + NSVisualEffectMaterialFullScreenUI = 15, + NSVisualEffectMaterialToolTip = 17, + NSVisualEffectMaterialContentBackground = 18, + NSVisualEffectMaterialUnderWindowBackground = 21, + NSVisualEffectMaterialUnderPageBackground = 22, + NSVisualEffectMaterialAppearanceBased = 0, + NSVisualEffectMaterialLight = 1, + NSVisualEffectMaterialDark = 2, + NSVisualEffectMaterialMediumLight = 8, + NSVisualEffectMaterialUltraDark = 9, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSVisualEffectBlendingMode { + NSVisualEffectBlendingModeBehindWindow = 0, + NSVisualEffectBlendingModeWithinWindow = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSVisualEffectState { + NSVisualEffectStateFollowsWindowActiveState = 0, + NSVisualEffectStateActive = 1, + NSVisualEffectStateInactive = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 2fcdcff02..eaabcc774 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -5,107 +5,164 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub static NSAppKitVersionNumberWithCustomSheetPosition: NSAppKitVersion = 686.0; - -pub static NSAppKitVersionNumberWithDeferredWindowDisplaySupport: NSAppKitVersion = 1019.0; - -pub type NSWindowStyleMask = NSUInteger; -pub const NSWindowStyleMaskBorderless: NSWindowStyleMask = 0; -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 static NSModalResponseOK: NSModalResponse = 1; - -pub static NSModalResponseCancel: NSModalResponse = 0; - -pub const NSDisplayWindowRunLoopOrdering: c_uint = 600000; -pub const NSResetCursorRectsRunLoopOrdering: c_uint = 700000; - -pub type NSWindowSharingType = NSUInteger; -pub const NSWindowSharingNone: NSWindowSharingType = 0; -pub const NSWindowSharingReadOnly: NSWindowSharingType = 1; -pub const NSWindowSharingReadWrite: NSWindowSharingType = 2; - -pub type NSWindowCollectionBehavior = NSUInteger; -pub const NSWindowCollectionBehaviorDefault: NSWindowCollectionBehavior = 0; -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; -pub const NSWindowAnimationBehaviorNone: NSWindowAnimationBehavior = 2; -pub const NSWindowAnimationBehaviorDocumentWindow: NSWindowAnimationBehavior = 3; -pub const NSWindowAnimationBehaviorUtilityWindow: NSWindowAnimationBehavior = 4; -pub const NSWindowAnimationBehaviorAlertPanel: NSWindowAnimationBehavior = 5; - -pub type NSWindowNumberListOptions = NSUInteger; -pub const NSWindowNumberListAllApplications: NSWindowNumberListOptions = 1 << 0; -pub const NSWindowNumberListAllSpaces: NSWindowNumberListOptions = 1 << 4; - -pub type NSWindowOcclusionState = NSUInteger; -pub const NSWindowOcclusionStateVisible: NSWindowOcclusionState = 1 << 1; +extern_static!(NSAppKitVersionNumberWithCustomSheetPosition: NSAppKitVersion = 686.0); + +extern_static!(NSAppKitVersionNumberWithDeferredWindowDisplaySupport: NSAppKitVersion = 1019.0); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSWindowStyleMask { + NSWindowStyleMaskBorderless = 0, + NSWindowStyleMaskTitled = 1 << 0, + NSWindowStyleMaskClosable = 1 << 1, + NSWindowStyleMaskMiniaturizable = 1 << 2, + NSWindowStyleMaskResizable = 1 << 3, + NSWindowStyleMaskTexturedBackground = 1 << 8, + NSWindowStyleMaskUnifiedTitleAndToolbar = 1 << 12, + NSWindowStyleMaskFullScreen = 1 << 14, + NSWindowStyleMaskFullSizeContentView = 1 << 15, + NSWindowStyleMaskUtilityWindow = 1 << 4, + NSWindowStyleMaskDocModalWindow = 1 << 6, + NSWindowStyleMaskNonactivatingPanel = 1 << 7, + NSWindowStyleMaskHUDWindow = 1 << 13, + } +); + +extern_static!(NSModalResponseOK: NSModalResponse = 1); + +extern_static!(NSModalResponseCancel: NSModalResponse = 0); + +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSDisplayWindowRunLoopOrdering = 600000, + NSResetCursorRectsRunLoopOrdering = 700000, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSWindowSharingType { + NSWindowSharingNone = 0, + NSWindowSharingReadOnly = 1, + NSWindowSharingReadWrite = 2, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSWindowCollectionBehavior { + NSWindowCollectionBehaviorDefault = 0, + NSWindowCollectionBehaviorCanJoinAllSpaces = 1 << 0, + NSWindowCollectionBehaviorMoveToActiveSpace = 1 << 1, + NSWindowCollectionBehaviorManaged = 1 << 2, + NSWindowCollectionBehaviorTransient = 1 << 3, + NSWindowCollectionBehaviorStationary = 1 << 4, + NSWindowCollectionBehaviorParticipatesInCycle = 1 << 5, + NSWindowCollectionBehaviorIgnoresCycle = 1 << 6, + NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7, + NSWindowCollectionBehaviorFullScreenAuxiliary = 1 << 8, + NSWindowCollectionBehaviorFullScreenNone = 1 << 9, + NSWindowCollectionBehaviorFullScreenAllowsTiling = 1 << 11, + NSWindowCollectionBehaviorFullScreenDisallowsTiling = 1 << 12, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSWindowAnimationBehavior { + NSWindowAnimationBehaviorDefault = 0, + NSWindowAnimationBehaviorNone = 2, + NSWindowAnimationBehaviorDocumentWindow = 3, + NSWindowAnimationBehaviorUtilityWindow = 4, + NSWindowAnimationBehaviorAlertPanel = 5, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSWindowNumberListOptions { + NSWindowNumberListAllApplications = 1 << 0, + NSWindowNumberListAllSpaces = 1 << 4, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSWindowOcclusionState { + NSWindowOcclusionStateVisible = 1 << 1, + } +); pub type NSWindowLevel = NSInteger; -pub type NSSelectionDirection = NSUInteger; -pub const NSDirectSelection: NSSelectionDirection = 0; -pub const NSSelectingNext: NSSelectionDirection = 1; -pub const NSSelectingPrevious: NSSelectionDirection = 2; - -pub type NSWindowButton = NSUInteger; -pub const NSWindowCloseButton: NSWindowButton = 0; -pub const NSWindowMiniaturizeButton: NSWindowButton = 1; -pub const NSWindowZoomButton: NSWindowButton = 2; -pub const NSWindowToolbarButton: NSWindowButton = 3; -pub const NSWindowDocumentIconButton: NSWindowButton = 4; -pub const NSWindowDocumentVersionsButton: NSWindowButton = 6; - -pub type NSWindowTitleVisibility = NSInteger; -pub const NSWindowTitleVisible: NSWindowTitleVisibility = 0; -pub const NSWindowTitleHidden: NSWindowTitleVisibility = 1; - -pub type NSWindowToolbarStyle = NSInteger; -pub const NSWindowToolbarStyleAutomatic: NSWindowToolbarStyle = 0; -pub const NSWindowToolbarStyleExpanded: NSWindowToolbarStyle = 1; -pub const NSWindowToolbarStylePreference: NSWindowToolbarStyle = 2; -pub const NSWindowToolbarStyleUnified: NSWindowToolbarStyle = 3; -pub const NSWindowToolbarStyleUnifiedCompact: NSWindowToolbarStyle = 4; - -pub type NSWindowUserTabbingPreference = NSInteger; -pub const NSWindowUserTabbingPreferenceManual: NSWindowUserTabbingPreference = 0; -pub const NSWindowUserTabbingPreferenceAlways: NSWindowUserTabbingPreference = 1; -pub const NSWindowUserTabbingPreferenceInFullScreen: NSWindowUserTabbingPreference = 2; - -pub type NSWindowTabbingMode = NSInteger; -pub const NSWindowTabbingModeAutomatic: NSWindowTabbingMode = 0; -pub const NSWindowTabbingModePreferred: NSWindowTabbingMode = 1; -pub const NSWindowTabbingModeDisallowed: NSWindowTabbingMode = 2; - -pub type NSTitlebarSeparatorStyle = NSInteger; -pub const NSTitlebarSeparatorStyleAutomatic: NSTitlebarSeparatorStyle = 0; -pub const NSTitlebarSeparatorStyleNone: NSTitlebarSeparatorStyle = 1; -pub const NSTitlebarSeparatorStyleLine: NSTitlebarSeparatorStyle = 2; -pub const NSTitlebarSeparatorStyleShadow: NSTitlebarSeparatorStyle = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSSelectionDirection { + NSDirectSelection = 0, + NSSelectingNext = 1, + NSSelectingPrevious = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSWindowButton { + NSWindowCloseButton = 0, + NSWindowMiniaturizeButton = 1, + NSWindowZoomButton = 2, + NSWindowToolbarButton = 3, + NSWindowDocumentIconButton = 4, + NSWindowDocumentVersionsButton = 6, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSWindowTitleVisibility { + NSWindowTitleVisible = 0, + NSWindowTitleHidden = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSWindowToolbarStyle { + NSWindowToolbarStyleAutomatic = 0, + NSWindowToolbarStyleExpanded = 1, + NSWindowToolbarStylePreference = 2, + NSWindowToolbarStyleUnified = 3, + NSWindowToolbarStyleUnifiedCompact = 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSWindowUserTabbingPreference { + NSWindowUserTabbingPreferenceManual = 0, + NSWindowUserTabbingPreferenceAlways = 1, + NSWindowUserTabbingPreferenceInFullScreen = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSWindowTabbingMode { + NSWindowTabbingModeAutomatic = 0, + NSWindowTabbingModePreferred = 1, + NSWindowTabbingModeDisallowed = 2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTitlebarSeparatorStyle { + NSTitlebarSeparatorStyleAutomatic = 0, + NSTitlebarSeparatorStyleNone = 1, + NSTitlebarSeparatorStyleLine = 2, + NSTitlebarSeparatorStyleShadow = 3, + } +); pub type NSWindowFrameAutosaveName = NSString; @@ -1165,134 +1222,76 @@ extern_methods!( pub type NSWindowDelegate = NSObject; -extern "C" { - pub static NSWindowDidBecomeKeyNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidBecomeKeyNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidBecomeMainNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidBecomeMainNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidChangeScreenNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidChangeScreenNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidDeminiaturizeNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidDeminiaturizeNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidExposeNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidExposeNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidMiniaturizeNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidMiniaturizeNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidMoveNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidMoveNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidResignKeyNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidResignKeyNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidResignMainNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidResignMainNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidResizeNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidResizeNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidUpdateNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidUpdateNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowWillCloseNotification: &'static NSNotificationName; -} +extern_static!(NSWindowWillCloseNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowWillMiniaturizeNotification: &'static NSNotificationName; -} +extern_static!(NSWindowWillMiniaturizeNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowWillMoveNotification: &'static NSNotificationName; -} +extern_static!(NSWindowWillMoveNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowWillBeginSheetNotification: &'static NSNotificationName; -} +extern_static!(NSWindowWillBeginSheetNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidEndSheetNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidEndSheetNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidChangeBackingPropertiesNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidChangeBackingPropertiesNotification: &'static NSNotificationName); -extern "C" { - pub static NSBackingPropertyOldScaleFactorKey: &'static NSString; -} +extern_static!(NSBackingPropertyOldScaleFactorKey: &'static NSString); -extern "C" { - pub static NSBackingPropertyOldColorSpaceKey: &'static NSString; -} +extern_static!(NSBackingPropertyOldColorSpaceKey: &'static NSString); -extern "C" { - pub static NSWindowDidChangeScreenProfileNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidChangeScreenProfileNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowWillStartLiveResizeNotification: &'static NSNotificationName; -} +extern_static!(NSWindowWillStartLiveResizeNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidEndLiveResizeNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidEndLiveResizeNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowWillEnterFullScreenNotification: &'static NSNotificationName; -} +extern_static!(NSWindowWillEnterFullScreenNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidEnterFullScreenNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidEnterFullScreenNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowWillExitFullScreenNotification: &'static NSNotificationName; -} +extern_static!(NSWindowWillExitFullScreenNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidExitFullScreenNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidExitFullScreenNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowWillEnterVersionBrowserNotification: &'static NSNotificationName; -} +extern_static!(NSWindowWillEnterVersionBrowserNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidEnterVersionBrowserNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidEnterVersionBrowserNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowWillExitVersionBrowserNotification: &'static NSNotificationName; -} +extern_static!(NSWindowWillExitVersionBrowserNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidExitVersionBrowserNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidExitVersionBrowserNotification: &'static NSNotificationName); -extern "C" { - pub static NSWindowDidChangeOcclusionStateNotification: &'static NSNotificationName; -} +extern_static!(NSWindowDidChangeOcclusionStateNotification: &'static NSNotificationName); -pub type NSWindowBackingLocation = NSUInteger; -pub const NSWindowBackingLocationDefault: NSWindowBackingLocation = 0; -pub const NSWindowBackingLocationVideoMemory: NSWindowBackingLocation = 1; -pub const NSWindowBackingLocationMainMemory: NSWindowBackingLocation = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSWindowBackingLocation { + NSWindowBackingLocationDefault = 0, + NSWindowBackingLocationVideoMemory = 1, + NSWindowBackingLocationMainMemory = 2, + } +); extern_methods!( /// NSDeprecated @@ -1377,34 +1376,38 @@ extern_methods!( } ); -pub static NSBorderlessWindowMask: NSWindowStyleMask = NSWindowStyleMaskBorderless; +extern_static!(NSBorderlessWindowMask: NSWindowStyleMask = NSWindowStyleMaskBorderless); -pub static NSTitledWindowMask: NSWindowStyleMask = NSWindowStyleMaskTitled; +extern_static!(NSTitledWindowMask: NSWindowStyleMask = NSWindowStyleMaskTitled); -pub static NSClosableWindowMask: NSWindowStyleMask = NSWindowStyleMaskClosable; +extern_static!(NSClosableWindowMask: NSWindowStyleMask = NSWindowStyleMaskClosable); -pub static NSMiniaturizableWindowMask: NSWindowStyleMask = NSWindowStyleMaskMiniaturizable; +extern_static!(NSMiniaturizableWindowMask: NSWindowStyleMask = NSWindowStyleMaskMiniaturizable); -pub static NSResizableWindowMask: NSWindowStyleMask = NSWindowStyleMaskResizable; +extern_static!(NSResizableWindowMask: NSWindowStyleMask = NSWindowStyleMaskResizable); -pub static NSTexturedBackgroundWindowMask: NSWindowStyleMask = NSWindowStyleMaskTexturedBackground; +extern_static!( + NSTexturedBackgroundWindowMask: NSWindowStyleMask = NSWindowStyleMaskTexturedBackground +); -pub static NSUnifiedTitleAndToolbarWindowMask: NSWindowStyleMask = - NSWindowStyleMaskUnifiedTitleAndToolbar; +extern_static!( + NSUnifiedTitleAndToolbarWindowMask: NSWindowStyleMask = NSWindowStyleMaskUnifiedTitleAndToolbar +); -pub static NSFullScreenWindowMask: NSWindowStyleMask = NSWindowStyleMaskFullScreen; +extern_static!(NSFullScreenWindowMask: NSWindowStyleMask = NSWindowStyleMaskFullScreen); -pub static NSFullSizeContentViewWindowMask: NSWindowStyleMask = - NSWindowStyleMaskFullSizeContentView; +extern_static!( + NSFullSizeContentViewWindowMask: NSWindowStyleMask = NSWindowStyleMaskFullSizeContentView +); -pub static NSUtilityWindowMask: NSWindowStyleMask = NSWindowStyleMaskUtilityWindow; +extern_static!(NSUtilityWindowMask: NSWindowStyleMask = NSWindowStyleMaskUtilityWindow); -pub static NSDocModalWindowMask: NSWindowStyleMask = NSWindowStyleMaskDocModalWindow; +extern_static!(NSDocModalWindowMask: NSWindowStyleMask = NSWindowStyleMaskDocModalWindow); -pub static NSNonactivatingPanelMask: NSWindowStyleMask = NSWindowStyleMaskNonactivatingPanel; +extern_static!(NSNonactivatingPanelMask: NSWindowStyleMask = NSWindowStyleMaskNonactivatingPanel); -pub static NSHUDWindowMask: NSWindowStyleMask = NSWindowStyleMaskHUDWindow; +extern_static!(NSHUDWindowMask: NSWindowStyleMask = NSWindowStyleMaskHUDWindow); -pub static NSUnscaledWindowMask: NSWindowStyleMask = 1 << 11; +extern_static!(NSUnscaledWindowMask: NSWindowStyleMask = 1 << 11); -pub static NSWindowFullScreenButton: NSWindowButton = 7; +extern_static!(NSWindowFullScreenButton: NSWindowButton = 7); diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs index d4d96ec5b..9380a685b 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -25,9 +25,7 @@ extern_methods!( } ); -extern "C" { - pub static NSApplicationDidFinishRestoringWindowsNotification: &'static NSNotificationName; -} +extern_static!(NSApplicationDidFinishRestoringWindowsNotification: &'static NSNotificationName); extern_methods!( /// NSUserInterfaceRestoration diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index 64be75177..fd2da0579 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -5,9 +5,13 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSWorkspaceIconCreationOptions = NSUInteger; -pub const NSExcludeQuickDrawElementsIconCreationOption: NSWorkspaceIconCreationOptions = 1 << 1; -pub const NSExclude10_4ElementsIconCreationOption: NSWorkspaceIconCreationOptions = 1 << 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSWorkspaceIconCreationOptions { + NSExcludeQuickDrawElementsIconCreationOption = 1 << 1, + NSExclude10_4ElementsIconCreationOption = 1 << 2, + } +); extern_class!( #[derive(Debug)] @@ -308,17 +312,11 @@ extern_methods!( pub type NSWorkspaceDesktopImageOptionKey = NSString; -extern "C" { - pub static NSWorkspaceDesktopImageScalingKey: &'static NSWorkspaceDesktopImageOptionKey; -} +extern_static!(NSWorkspaceDesktopImageScalingKey: &'static NSWorkspaceDesktopImageOptionKey); -extern "C" { - pub static NSWorkspaceDesktopImageAllowClippingKey: &'static NSWorkspaceDesktopImageOptionKey; -} +extern_static!(NSWorkspaceDesktopImageAllowClippingKey: &'static NSWorkspaceDesktopImageOptionKey); -extern "C" { - pub static NSWorkspaceDesktopImageFillColorKey: &'static NSWorkspaceDesktopImageOptionKey; -} +extern_static!(NSWorkspaceDesktopImageFillColorKey: &'static NSWorkspaceDesktopImageOptionKey); extern_methods!( /// NSDesktopImages @@ -345,10 +343,14 @@ extern_methods!( } ); -pub type NSWorkspaceAuthorizationType = NSInteger; -pub const NSWorkspaceAuthorizationTypeCreateSymbolicLink: NSWorkspaceAuthorizationType = 0; -pub const NSWorkspaceAuthorizationTypeSetAttributes: NSWorkspaceAuthorizationType = 1; -pub const NSWorkspaceAuthorizationTypeReplaceFile: NSWorkspaceAuthorizationType = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSWorkspaceAuthorizationType { + NSWorkspaceAuthorizationTypeCreateSymbolicLink = 0, + NSWorkspaceAuthorizationTypeSetAttributes = 1, + NSWorkspaceAuthorizationTypeReplaceFile = 2, + } +); extern_class!( #[derive(Debug)] @@ -385,141 +387,91 @@ extern_methods!( } ); -extern "C" { - pub static NSWorkspaceApplicationKey: &'static NSString; -} +extern_static!(NSWorkspaceApplicationKey: &'static NSString); -extern "C" { - pub static NSWorkspaceWillLaunchApplicationNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceWillLaunchApplicationNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceDidLaunchApplicationNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidLaunchApplicationNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceDidTerminateApplicationNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidTerminateApplicationNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceDidHideApplicationNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidHideApplicationNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceDidUnhideApplicationNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidUnhideApplicationNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceDidActivateApplicationNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidActivateApplicationNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceDidDeactivateApplicationNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidDeactivateApplicationNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceVolumeLocalizedNameKey: &'static NSString; -} +extern_static!(NSWorkspaceVolumeLocalizedNameKey: &'static NSString); -extern "C" { - pub static NSWorkspaceVolumeURLKey: &'static NSString; -} +extern_static!(NSWorkspaceVolumeURLKey: &'static NSString); -extern "C" { - pub static NSWorkspaceVolumeOldLocalizedNameKey: &'static NSString; -} +extern_static!(NSWorkspaceVolumeOldLocalizedNameKey: &'static NSString); -extern "C" { - pub static NSWorkspaceVolumeOldURLKey: &'static NSString; -} +extern_static!(NSWorkspaceVolumeOldURLKey: &'static NSString); -extern "C" { - pub static NSWorkspaceDidMountNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidMountNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceDidUnmountNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidUnmountNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceWillUnmountNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceWillUnmountNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceDidRenameVolumeNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidRenameVolumeNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceWillPowerOffNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceWillPowerOffNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceWillSleepNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceWillSleepNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceDidWakeNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidWakeNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceScreensDidSleepNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceScreensDidSleepNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceScreensDidWakeNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceScreensDidWakeNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceSessionDidBecomeActiveNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceSessionDidBecomeActiveNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceSessionDidResignActiveNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceSessionDidResignActiveNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceDidChangeFileLabelsNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidChangeFileLabelsNotification: &'static NSNotificationName); -extern "C" { - pub static NSWorkspaceActiveSpaceDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceActiveSpaceDidChangeNotification: &'static NSNotificationName); pub type NSWorkspaceFileOperationName = NSString; -pub type NSWorkspaceLaunchOptions = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSWorkspaceLaunchOptions { + NSWorkspaceLaunchAndPrint = 0x00000002, + NSWorkspaceLaunchWithErrorPresentation = 0x00000040, + NSWorkspaceLaunchInhibitingBackgroundOnly = 0x00000080, + NSWorkspaceLaunchWithoutAddingToRecents = 0x00000100, + NSWorkspaceLaunchWithoutActivation = 0x00000200, + NSWorkspaceLaunchAsync = 0x00010000, + NSWorkspaceLaunchNewInstance = 0x00080000, + NSWorkspaceLaunchAndHide = 0x00100000, + NSWorkspaceLaunchAndHideOthers = 0x00200000, + NSWorkspaceLaunchDefault = NSWorkspaceLaunchAsync, + NSWorkspaceLaunchAllowingClassicStartup = 0x00020000, + NSWorkspaceLaunchPreferringClassic = 0x00040000, + } +); pub type NSWorkspaceLaunchConfigurationKey = NSString; -extern "C" { - pub static NSWorkspaceLaunchConfigurationAppleEvent: &'static NSWorkspaceLaunchConfigurationKey; -} +extern_static!( + NSWorkspaceLaunchConfigurationAppleEvent: &'static NSWorkspaceLaunchConfigurationKey +); -extern "C" { - pub static NSWorkspaceLaunchConfigurationArguments: &'static NSWorkspaceLaunchConfigurationKey; -} +extern_static!(NSWorkspaceLaunchConfigurationArguments: &'static NSWorkspaceLaunchConfigurationKey); -extern "C" { - pub static NSWorkspaceLaunchConfigurationEnvironment: - &'static NSWorkspaceLaunchConfigurationKey; -} +extern_static!( + NSWorkspaceLaunchConfigurationEnvironment: &'static NSWorkspaceLaunchConfigurationKey +); -extern "C" { - pub static NSWorkspaceLaunchConfigurationArchitecture: - &'static NSWorkspaceLaunchConfigurationKey; -} +extern_static!( + NSWorkspaceLaunchConfigurationArchitecture: &'static NSWorkspaceLaunchConfigurationKey +); extern_methods!( /// NSDeprecated @@ -714,66 +666,34 @@ extern_methods!( } ); -extern "C" { - pub static NSWorkspaceMoveOperation: &'static NSWorkspaceFileOperationName; -} +extern_static!(NSWorkspaceMoveOperation: &'static NSWorkspaceFileOperationName); -extern "C" { - pub static NSWorkspaceCopyOperation: &'static NSWorkspaceFileOperationName; -} +extern_static!(NSWorkspaceCopyOperation: &'static NSWorkspaceFileOperationName); -extern "C" { - pub static NSWorkspaceLinkOperation: &'static NSWorkspaceFileOperationName; -} +extern_static!(NSWorkspaceLinkOperation: &'static NSWorkspaceFileOperationName); -extern "C" { - pub static NSWorkspaceCompressOperation: &'static NSWorkspaceFileOperationName; -} +extern_static!(NSWorkspaceCompressOperation: &'static NSWorkspaceFileOperationName); -extern "C" { - pub static NSWorkspaceDecompressOperation: &'static NSWorkspaceFileOperationName; -} +extern_static!(NSWorkspaceDecompressOperation: &'static NSWorkspaceFileOperationName); -extern "C" { - pub static NSWorkspaceEncryptOperation: &'static NSWorkspaceFileOperationName; -} +extern_static!(NSWorkspaceEncryptOperation: &'static NSWorkspaceFileOperationName); -extern "C" { - pub static NSWorkspaceDecryptOperation: &'static NSWorkspaceFileOperationName; -} +extern_static!(NSWorkspaceDecryptOperation: &'static NSWorkspaceFileOperationName); -extern "C" { - pub static NSWorkspaceDestroyOperation: &'static NSWorkspaceFileOperationName; -} +extern_static!(NSWorkspaceDestroyOperation: &'static NSWorkspaceFileOperationName); -extern "C" { - pub static NSWorkspaceRecycleOperation: &'static NSWorkspaceFileOperationName; -} +extern_static!(NSWorkspaceRecycleOperation: &'static NSWorkspaceFileOperationName); -extern "C" { - pub static NSWorkspaceDuplicateOperation: &'static NSWorkspaceFileOperationName; -} +extern_static!(NSWorkspaceDuplicateOperation: &'static NSWorkspaceFileOperationName); -extern "C" { - pub static NSWorkspaceDidPerformFileOperationNotification: &'static NSNotificationName; -} +extern_static!(NSWorkspaceDidPerformFileOperationNotification: &'static NSNotificationName); -extern "C" { - pub static NSPlainFileType: &'static NSString; -} +extern_static!(NSPlainFileType: &'static NSString); -extern "C" { - pub static NSDirectoryFileType: &'static NSString; -} +extern_static!(NSDirectoryFileType: &'static NSString); -extern "C" { - pub static NSApplicationFileType: &'static NSString; -} +extern_static!(NSApplicationFileType: &'static NSString); -extern "C" { - pub static NSFilesystemFileType: &'static NSString; -} +extern_static!(NSFilesystemFileType: &'static NSString); -extern "C" { - pub static NSShellCommandFileType: &'static NSString; -} +extern_static!(NSShellCommandFileType: &'static NSString); diff --git a/crates/icrate/src/generated/CoreData/CoreDataDefines.rs b/crates/icrate/src/generated/CoreData/CoreDataDefines.rs index 651fc4182..cacfdc74b 100644 --- a/crates/icrate/src/generated/CoreData/CoreDataDefines.rs +++ b/crates/icrate/src/generated/CoreData/CoreDataDefines.rs @@ -4,6 +4,4 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSCoreDataVersionNumber: c_double; -} +extern_static!(NSCoreDataVersionNumber: c_double); diff --git a/crates/icrate/src/generated/CoreData/CoreDataErrors.rs b/crates/icrate/src/generated/CoreData/CoreDataErrors.rs index 014d7a703..cddf0c517 100644 --- a/crates/icrate/src/generated/CoreData/CoreDataErrors.rs +++ b/crates/icrate/src/generated/CoreData/CoreDataErrors.rs @@ -4,85 +4,72 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSDetailedErrorsKey: &'static NSString; -} +extern_static!(NSDetailedErrorsKey: &'static NSString); -extern "C" { - pub static NSValidationObjectErrorKey: &'static NSString; -} +extern_static!(NSValidationObjectErrorKey: &'static NSString); -extern "C" { - pub static NSValidationKeyErrorKey: &'static NSString; -} +extern_static!(NSValidationKeyErrorKey: &'static NSString); -extern "C" { - pub static NSValidationPredicateErrorKey: &'static NSString; -} +extern_static!(NSValidationPredicateErrorKey: &'static NSString); -extern "C" { - pub static NSValidationValueErrorKey: &'static NSString; -} +extern_static!(NSValidationValueErrorKey: &'static NSString); -extern "C" { - pub static NSAffectedStoresErrorKey: &'static NSString; -} +extern_static!(NSAffectedStoresErrorKey: &'static NSString); -extern "C" { - pub static NSAffectedObjectsErrorKey: &'static NSString; -} +extern_static!(NSAffectedObjectsErrorKey: &'static NSString); -extern "C" { - pub static NSPersistentStoreSaveConflictsErrorKey: &'static NSString; -} +extern_static!(NSPersistentStoreSaveConflictsErrorKey: &'static NSString); -extern "C" { - pub static NSSQLiteErrorDomain: &'static NSString; -} +extern_static!(NSSQLiteErrorDomain: &'static NSString); -pub const NSManagedObjectValidationError: NSInteger = 1550; -pub const NSManagedObjectConstraintValidationError: NSInteger = 1551; -pub const NSValidationMultipleErrorsError: NSInteger = 1560; -pub const NSValidationMissingMandatoryPropertyError: NSInteger = 1570; -pub const NSValidationRelationshipLacksMinimumCountError: NSInteger = 1580; -pub const NSValidationRelationshipExceedsMaximumCountError: NSInteger = 1590; -pub const NSValidationRelationshipDeniedDeleteError: NSInteger = 1600; -pub const NSValidationNumberTooLargeError: NSInteger = 1610; -pub const NSValidationNumberTooSmallError: NSInteger = 1620; -pub const NSValidationDateTooLateError: NSInteger = 1630; -pub const NSValidationDateTooSoonError: NSInteger = 1640; -pub const NSValidationInvalidDateError: NSInteger = 1650; -pub const NSValidationStringTooLongError: NSInteger = 1660; -pub const NSValidationStringTooShortError: NSInteger = 1670; -pub const NSValidationStringPatternMatchingError: NSInteger = 1680; -pub const NSValidationInvalidURIError: NSInteger = 1690; -pub const NSManagedObjectContextLockingError: NSInteger = 132000; -pub const NSPersistentStoreCoordinatorLockingError: NSInteger = 132010; -pub const NSManagedObjectReferentialIntegrityError: NSInteger = 133000; -pub const NSManagedObjectExternalRelationshipError: NSInteger = 133010; -pub const NSManagedObjectMergeError: NSInteger = 133020; -pub const NSManagedObjectConstraintMergeError: NSInteger = 133021; -pub const NSPersistentStoreInvalidTypeError: NSInteger = 134000; -pub const NSPersistentStoreTypeMismatchError: NSInteger = 134010; -pub const NSPersistentStoreIncompatibleSchemaError: NSInteger = 134020; -pub const NSPersistentStoreSaveError: NSInteger = 134030; -pub const NSPersistentStoreIncompleteSaveError: NSInteger = 134040; -pub const NSPersistentStoreSaveConflictsError: NSInteger = 134050; -pub const NSCoreDataError: NSInteger = 134060; -pub const NSPersistentStoreOperationError: NSInteger = 134070; -pub const NSPersistentStoreOpenError: NSInteger = 134080; -pub const NSPersistentStoreTimeoutError: NSInteger = 134090; -pub const NSPersistentStoreUnsupportedRequestTypeError: NSInteger = 134091; -pub const NSPersistentStoreIncompatibleVersionHashError: NSInteger = 134100; -pub const NSMigrationError: NSInteger = 134110; -pub const NSMigrationConstraintViolationError: NSInteger = 134111; -pub const NSMigrationCancelledError: NSInteger = 134120; -pub const NSMigrationMissingSourceModelError: NSInteger = 134130; -pub const NSMigrationMissingMappingModelError: NSInteger = 134140; -pub const NSMigrationManagerSourceStoreError: NSInteger = 134150; -pub const NSMigrationManagerDestinationStoreError: NSInteger = 134160; -pub const NSEntityMigrationPolicyError: NSInteger = 134170; -pub const NSSQLiteError: NSInteger = 134180; -pub const NSInferredMappingModelError: NSInteger = 134190; -pub const NSExternalRecordImportError: NSInteger = 134200; -pub const NSPersistentHistoryTokenExpiredError: NSInteger = 134301; +extern_enum!( + #[underlying(NSInteger)] + pub enum { + NSManagedObjectValidationError = 1550, + NSManagedObjectConstraintValidationError = 1551, + NSValidationMultipleErrorsError = 1560, + NSValidationMissingMandatoryPropertyError = 1570, + NSValidationRelationshipLacksMinimumCountError = 1580, + NSValidationRelationshipExceedsMaximumCountError = 1590, + NSValidationRelationshipDeniedDeleteError = 1600, + NSValidationNumberTooLargeError = 1610, + NSValidationNumberTooSmallError = 1620, + NSValidationDateTooLateError = 1630, + NSValidationDateTooSoonError = 1640, + NSValidationInvalidDateError = 1650, + NSValidationStringTooLongError = 1660, + NSValidationStringTooShortError = 1670, + NSValidationStringPatternMatchingError = 1680, + NSValidationInvalidURIError = 1690, + NSManagedObjectContextLockingError = 132000, + NSPersistentStoreCoordinatorLockingError = 132010, + NSManagedObjectReferentialIntegrityError = 133000, + NSManagedObjectExternalRelationshipError = 133010, + NSManagedObjectMergeError = 133020, + NSManagedObjectConstraintMergeError = 133021, + NSPersistentStoreInvalidTypeError = 134000, + NSPersistentStoreTypeMismatchError = 134010, + NSPersistentStoreIncompatibleSchemaError = 134020, + NSPersistentStoreSaveError = 134030, + NSPersistentStoreIncompleteSaveError = 134040, + NSPersistentStoreSaveConflictsError = 134050, + NSCoreDataError = 134060, + NSPersistentStoreOperationError = 134070, + NSPersistentStoreOpenError = 134080, + NSPersistentStoreTimeoutError = 134090, + NSPersistentStoreUnsupportedRequestTypeError = 134091, + NSPersistentStoreIncompatibleVersionHashError = 134100, + NSMigrationError = 134110, + NSMigrationConstraintViolationError = 134111, + NSMigrationCancelledError = 134120, + NSMigrationMissingSourceModelError = 134130, + NSMigrationMissingMappingModelError = 134140, + NSMigrationManagerSourceStoreError = 134150, + NSMigrationManagerDestinationStoreError = 134160, + NSEntityMigrationPolicyError = 134170, + NSSQLiteError = 134180, + NSInferredMappingModelError = 134190, + NSExternalRecordImportError = 134200, + NSPersistentHistoryTokenExpiredError = 134301, + } +); diff --git a/crates/icrate/src/generated/CoreData/NSAttributeDescription.rs b/crates/icrate/src/generated/CoreData/NSAttributeDescription.rs index 168b8e33d..e568fc59b 100644 --- a/crates/icrate/src/generated/CoreData/NSAttributeDescription.rs +++ b/crates/icrate/src/generated/CoreData/NSAttributeDescription.rs @@ -4,22 +4,26 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSAttributeType = NSUInteger; -pub const NSUndefinedAttributeType: NSAttributeType = 0; -pub const NSInteger16AttributeType: NSAttributeType = 100; -pub const NSInteger32AttributeType: NSAttributeType = 200; -pub const NSInteger64AttributeType: NSAttributeType = 300; -pub const NSDecimalAttributeType: NSAttributeType = 400; -pub const NSDoubleAttributeType: NSAttributeType = 500; -pub const NSFloatAttributeType: NSAttributeType = 600; -pub const NSStringAttributeType: NSAttributeType = 700; -pub const NSBooleanAttributeType: NSAttributeType = 800; -pub const NSDateAttributeType: NSAttributeType = 900; -pub const NSBinaryDataAttributeType: NSAttributeType = 1000; -pub const NSUUIDAttributeType: NSAttributeType = 1100; -pub const NSURIAttributeType: NSAttributeType = 1200; -pub const NSTransformableAttributeType: NSAttributeType = 1800; -pub const NSObjectIDAttributeType: NSAttributeType = 2000; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSAttributeType { + NSUndefinedAttributeType = 0, + NSInteger16AttributeType = 100, + NSInteger32AttributeType = 200, + NSInteger64AttributeType = 300, + NSDecimalAttributeType = 400, + NSDoubleAttributeType = 500, + NSFloatAttributeType = 600, + NSStringAttributeType = 700, + NSBooleanAttributeType = 800, + NSDateAttributeType = 900, + NSBinaryDataAttributeType = 1000, + NSUUIDAttributeType = 1100, + NSURIAttributeType = 1200, + NSTransformableAttributeType = 1800, + NSObjectIDAttributeType = 2000, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs b/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs index bb919299b..d81c55d16 100644 --- a/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs +++ b/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs @@ -4,10 +4,9 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification: - &'static NSNotificationName; -} +extern_static!( + NSCoreDataCoreSpotlightDelegateIndexDidUpdateNotification: &'static NSNotificationName +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSEntityMapping.rs b/crates/icrate/src/generated/CoreData/NSEntityMapping.rs index a910d8b70..05e8fe5fa 100644 --- a/crates/icrate/src/generated/CoreData/NSEntityMapping.rs +++ b/crates/icrate/src/generated/CoreData/NSEntityMapping.rs @@ -4,13 +4,17 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSEntityMappingType = NSUInteger; -pub const NSUndefinedEntityMappingType: NSEntityMappingType = 0x00; -pub const NSCustomEntityMappingType: NSEntityMappingType = 0x01; -pub const NSAddEntityMappingType: NSEntityMappingType = 0x02; -pub const NSRemoveEntityMappingType: NSEntityMappingType = 0x03; -pub const NSCopyEntityMappingType: NSEntityMappingType = 0x04; -pub const NSTransformEntityMappingType: NSEntityMappingType = 0x05; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSEntityMappingType { + NSUndefinedEntityMappingType = 0x00, + NSCustomEntityMappingType = 0x01, + NSAddEntityMappingType = 0x02, + NSRemoveEntityMappingType = 0x03, + NSCopyEntityMappingType = 0x04, + NSTransformEntityMappingType = 0x05, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSEntityMigrationPolicy.rs b/crates/icrate/src/generated/CoreData/NSEntityMigrationPolicy.rs index 9da4f642a..2adf9aa76 100644 --- a/crates/icrate/src/generated/CoreData/NSEntityMigrationPolicy.rs +++ b/crates/icrate/src/generated/CoreData/NSEntityMigrationPolicy.rs @@ -4,29 +4,17 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSMigrationManagerKey: &'static NSString; -} +extern_static!(NSMigrationManagerKey: &'static NSString); -extern "C" { - pub static NSMigrationSourceObjectKey: &'static NSString; -} +extern_static!(NSMigrationSourceObjectKey: &'static NSString); -extern "C" { - pub static NSMigrationDestinationObjectKey: &'static NSString; -} +extern_static!(NSMigrationDestinationObjectKey: &'static NSString); -extern "C" { - pub static NSMigrationEntityMappingKey: &'static NSString; -} +extern_static!(NSMigrationEntityMappingKey: &'static NSString); -extern "C" { - pub static NSMigrationPropertyMappingKey: &'static NSString; -} +extern_static!(NSMigrationPropertyMappingKey: &'static NSString); -extern "C" { - pub static NSMigrationEntityPolicyKey: &'static NSString; -} +extern_static!(NSMigrationEntityPolicyKey: &'static NSString); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSFetchIndexElementDescription.rs b/crates/icrate/src/generated/CoreData/NSFetchIndexElementDescription.rs index d7c87a90c..9aa6bade5 100644 --- a/crates/icrate/src/generated/CoreData/NSFetchIndexElementDescription.rs +++ b/crates/icrate/src/generated/CoreData/NSFetchIndexElementDescription.rs @@ -4,9 +4,13 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSFetchIndexElementType = NSUInteger; -pub const NSFetchIndexElementTypeBinary: NSFetchIndexElementType = 0; -pub const NSFetchIndexElementTypeRTree: NSFetchIndexElementType = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSFetchIndexElementType { + NSFetchIndexElementTypeBinary = 0, + NSFetchIndexElementTypeRTree = 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSFetchRequest.rs b/crates/icrate/src/generated/CoreData/NSFetchRequest.rs index e57586705..7d4426c44 100644 --- a/crates/icrate/src/generated/CoreData/NSFetchRequest.rs +++ b/crates/icrate/src/generated/CoreData/NSFetchRequest.rs @@ -4,11 +4,15 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSFetchRequestResultType = NSUInteger; -pub const NSManagedObjectResultType: NSFetchRequestResultType = 0x00; -pub const NSManagedObjectIDResultType: NSFetchRequestResultType = 0x01; -pub const NSDictionaryResultType: NSFetchRequestResultType = 0x02; -pub const NSCountResultType: NSFetchRequestResultType = 0x04; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFetchRequestResultType { + NSManagedObjectResultType = 0x00, + NSManagedObjectIDResultType = 0x01, + NSDictionaryResultType = 0x02, + NSCountResultType = 0x04, + } +); pub type NSFetchRequestResult = NSObject; diff --git a/crates/icrate/src/generated/CoreData/NSFetchRequestExpression.rs b/crates/icrate/src/generated/CoreData/NSFetchRequestExpression.rs index f84720bea..42d4a6488 100644 --- a/crates/icrate/src/generated/CoreData/NSFetchRequestExpression.rs +++ b/crates/icrate/src/generated/CoreData/NSFetchRequestExpression.rs @@ -4,7 +4,7 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub static NSFetchRequestExpressionType: NSExpressionType = 50; +extern_static!(NSFetchRequestExpressionType: NSExpressionType = 50); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs b/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs index e80228b10..7f004649b 100644 --- a/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs +++ b/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs @@ -85,10 +85,14 @@ extern_methods!( pub type NSFetchedResultsSectionInfo = NSObject; -pub type NSFetchedResultsChangeType = NSUInteger; -pub const NSFetchedResultsChangeInsert: NSFetchedResultsChangeType = 1; -pub const NSFetchedResultsChangeDelete: NSFetchedResultsChangeType = 2; -pub const NSFetchedResultsChangeMove: NSFetchedResultsChangeType = 3; -pub const NSFetchedResultsChangeUpdate: NSFetchedResultsChangeType = 4; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSFetchedResultsChangeType { + NSFetchedResultsChangeInsert = 1, + NSFetchedResultsChangeDelete = 2, + NSFetchedResultsChangeMove = 3, + NSFetchedResultsChangeUpdate = 4, + } +); pub type NSFetchedResultsControllerDelegate = NSObject; diff --git a/crates/icrate/src/generated/CoreData/NSManagedObject.rs b/crates/icrate/src/generated/CoreData/NSManagedObject.rs index b13d701fc..2b87acbf3 100644 --- a/crates/icrate/src/generated/CoreData/NSManagedObject.rs +++ b/crates/icrate/src/generated/CoreData/NSManagedObject.rs @@ -4,13 +4,17 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSSnapshotEventType = NSUInteger; -pub const NSSnapshotEventUndoInsertion: NSSnapshotEventType = 1 << 1; -pub const NSSnapshotEventUndoDeletion: NSSnapshotEventType = 1 << 2; -pub const NSSnapshotEventUndoUpdate: NSSnapshotEventType = 1 << 3; -pub const NSSnapshotEventRollback: NSSnapshotEventType = 1 << 4; -pub const NSSnapshotEventRefresh: NSSnapshotEventType = 1 << 5; -pub const NSSnapshotEventMergePolicy: NSSnapshotEventType = 1 << 6; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSSnapshotEventType { + NSSnapshotEventUndoInsertion = 1 << 1, + NSSnapshotEventUndoDeletion = 1 << 2, + NSSnapshotEventUndoUpdate = 1 << 3, + NSSnapshotEventRollback = 1 << 4, + NSSnapshotEventRefresh = 1 << 5, + NSSnapshotEventMergePolicy = 1 << 6, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs b/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs index a395b4fe5..f8b0fec04 100644 --- a/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs +++ b/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs @@ -4,98 +4,58 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSManagedObjectContextWillSaveNotification: &'static NSString; -} - -extern "C" { - pub static NSManagedObjectContextDidSaveNotification: &'static NSString; -} - -extern "C" { - pub static NSManagedObjectContextObjectsDidChangeNotification: &'static NSString; -} - -extern "C" { - pub static NSManagedObjectContextDidSaveObjectIDsNotification: &'static NSString; -} - -extern "C" { - pub static NSManagedObjectContextDidMergeChangesObjectIDsNotification: &'static NSString; -} - -extern "C" { - pub static NSInsertedObjectsKey: &'static NSString; -} - -extern "C" { - pub static NSUpdatedObjectsKey: &'static NSString; -} - -extern "C" { - pub static NSDeletedObjectsKey: &'static NSString; -} - -extern "C" { - pub static NSRefreshedObjectsKey: &'static NSString; -} - -extern "C" { - pub static NSInvalidatedObjectsKey: &'static NSString; -} - -extern "C" { - pub static NSManagedObjectContextQueryGenerationKey: &'static NSString; -} - -extern "C" { - pub static NSInvalidatedAllObjectsKey: &'static NSString; -} - -extern "C" { - pub static NSInsertedObjectIDsKey: &'static NSString; -} - -extern "C" { - pub static NSUpdatedObjectIDsKey: &'static NSString; -} - -extern "C" { - pub static NSDeletedObjectIDsKey: &'static NSString; -} - -extern "C" { - pub static NSRefreshedObjectIDsKey: &'static NSString; -} - -extern "C" { - pub static NSInvalidatedObjectIDsKey: &'static NSString; -} - -extern "C" { - pub static NSErrorMergePolicy: &'static Object; -} - -extern "C" { - pub static NSMergeByPropertyStoreTrumpMergePolicy: &'static Object; -} - -extern "C" { - pub static NSMergeByPropertyObjectTrumpMergePolicy: &'static Object; -} - -extern "C" { - pub static NSOverwriteMergePolicy: &'static Object; -} - -extern "C" { - pub static NSRollbackMergePolicy: &'static Object; -} - -pub type NSManagedObjectContextConcurrencyType = NSUInteger; -pub const NSConfinementConcurrencyType: NSManagedObjectContextConcurrencyType = 0x00; -pub const NSPrivateQueueConcurrencyType: NSManagedObjectContextConcurrencyType = 0x01; -pub const NSMainQueueConcurrencyType: NSManagedObjectContextConcurrencyType = 0x02; +extern_static!(NSManagedObjectContextWillSaveNotification: &'static NSString); + +extern_static!(NSManagedObjectContextDidSaveNotification: &'static NSString); + +extern_static!(NSManagedObjectContextObjectsDidChangeNotification: &'static NSString); + +extern_static!(NSManagedObjectContextDidSaveObjectIDsNotification: &'static NSString); + +extern_static!(NSManagedObjectContextDidMergeChangesObjectIDsNotification: &'static NSString); + +extern_static!(NSInsertedObjectsKey: &'static NSString); + +extern_static!(NSUpdatedObjectsKey: &'static NSString); + +extern_static!(NSDeletedObjectsKey: &'static NSString); + +extern_static!(NSRefreshedObjectsKey: &'static NSString); + +extern_static!(NSInvalidatedObjectsKey: &'static NSString); + +extern_static!(NSManagedObjectContextQueryGenerationKey: &'static NSString); + +extern_static!(NSInvalidatedAllObjectsKey: &'static NSString); + +extern_static!(NSInsertedObjectIDsKey: &'static NSString); + +extern_static!(NSUpdatedObjectIDsKey: &'static NSString); + +extern_static!(NSDeletedObjectIDsKey: &'static NSString); + +extern_static!(NSRefreshedObjectIDsKey: &'static NSString); + +extern_static!(NSInvalidatedObjectIDsKey: &'static NSString); + +extern_static!(NSErrorMergePolicy: &'static Object); + +extern_static!(NSMergeByPropertyStoreTrumpMergePolicy: &'static Object); + +extern_static!(NSMergeByPropertyObjectTrumpMergePolicy: &'static Object); + +extern_static!(NSOverwriteMergePolicy: &'static Object); + +extern_static!(NSRollbackMergePolicy: &'static Object); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSManagedObjectContextConcurrencyType { + NSConfinementConcurrencyType = 0x00, + NSPrivateQueueConcurrencyType = 0x01, + NSMainQueueConcurrencyType = 0x02, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSMergePolicy.rs b/crates/icrate/src/generated/CoreData/NSMergePolicy.rs index 37841e659..567e6b5ed 100644 --- a/crates/icrate/src/generated/CoreData/NSMergePolicy.rs +++ b/crates/icrate/src/generated/CoreData/NSMergePolicy.rs @@ -4,32 +4,26 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSErrorMergePolicy: &'static Object; -} - -extern "C" { - pub static NSMergeByPropertyStoreTrumpMergePolicy: &'static Object; -} - -extern "C" { - pub static NSMergeByPropertyObjectTrumpMergePolicy: &'static Object; -} - -extern "C" { - pub static NSOverwriteMergePolicy: &'static Object; -} - -extern "C" { - pub static NSRollbackMergePolicy: &'static Object; -} - -pub type NSMergePolicyType = NSUInteger; -pub const NSErrorMergePolicyType: NSMergePolicyType = 0x00; -pub const NSMergeByPropertyStoreTrumpMergePolicyType: NSMergePolicyType = 0x01; -pub const NSMergeByPropertyObjectTrumpMergePolicyType: NSMergePolicyType = 0x02; -pub const NSOverwriteMergePolicyType: NSMergePolicyType = 0x03; -pub const NSRollbackMergePolicyType: NSMergePolicyType = 0x04; +extern_static!(NSErrorMergePolicy: &'static Object); + +extern_static!(NSMergeByPropertyStoreTrumpMergePolicy: &'static Object); + +extern_static!(NSMergeByPropertyObjectTrumpMergePolicy: &'static Object); + +extern_static!(NSOverwriteMergePolicy: &'static Object); + +extern_static!(NSRollbackMergePolicy: &'static Object); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSMergePolicyType { + NSErrorMergePolicyType = 0x00, + NSMergeByPropertyStoreTrumpMergePolicyType = 0x01, + NSMergeByPropertyObjectTrumpMergePolicyType = 0x02, + NSOverwriteMergePolicyType = 0x03, + NSRollbackMergePolicyType = 0x04, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs index 93b32517a..b37c59b97 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs @@ -4,13 +4,14 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPersistentCloudKitContainerSchemaInitializationOptions = NSUInteger; -pub const NSPersistentCloudKitContainerSchemaInitializationOptionsNone: - NSPersistentCloudKitContainerSchemaInitializationOptions = 0; -pub const NSPersistentCloudKitContainerSchemaInitializationOptionsDryRun: - NSPersistentCloudKitContainerSchemaInitializationOptions = 1 << 1; -pub const NSPersistentCloudKitContainerSchemaInitializationOptionsPrintSchema: - NSPersistentCloudKitContainerSchemaInitializationOptions = 1 << 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSPersistentCloudKitContainerSchemaInitializationOptions { + NSPersistentCloudKitContainerSchemaInitializationOptionsNone = 0, + NSPersistentCloudKitContainerSchemaInitializationOptionsDryRun = 1 << 1, + NSPersistentCloudKitContainerSchemaInitializationOptionsPrintSchema = 1 << 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEvent.rs b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEvent.rs index a65aa5b98..529c0c0f1 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEvent.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerEvent.rs @@ -4,18 +4,18 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPersistentCloudKitContainerEventType = NSInteger; -pub const NSPersistentCloudKitContainerEventTypeSetup: NSPersistentCloudKitContainerEventType = 0; -pub const NSPersistentCloudKitContainerEventTypeImport: NSPersistentCloudKitContainerEventType = 1; -pub const NSPersistentCloudKitContainerEventTypeExport: NSPersistentCloudKitContainerEventType = 2; - -extern "C" { - pub static NSPersistentCloudKitContainerEventChangedNotification: &'static NSNotificationName; -} - -extern "C" { - pub static NSPersistentCloudKitContainerEventUserInfoKey: &'static NSString; -} +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPersistentCloudKitContainerEventType { + NSPersistentCloudKitContainerEventTypeSetup = 0, + NSPersistentCloudKitContainerEventTypeImport = 1, + NSPersistentCloudKitContainerEventTypeExport = 2, + } +); + +extern_static!(NSPersistentCloudKitContainerEventChangedNotification: &'static NSNotificationName); + +extern_static!(NSPersistentCloudKitContainerEventUserInfoKey: &'static NSString); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSPersistentHistoryChange.rs b/crates/icrate/src/generated/CoreData/NSPersistentHistoryChange.rs index c269026d0..1e635d1fd 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentHistoryChange.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentHistoryChange.rs @@ -4,10 +4,14 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPersistentHistoryChangeType = NSInteger; -pub const NSPersistentHistoryChangeTypeInsert: NSPersistentHistoryChangeType = 0; -pub const NSPersistentHistoryChangeTypeUpdate: NSPersistentHistoryChangeType = 1; -pub const NSPersistentHistoryChangeTypeDelete: NSPersistentHistoryChangeType = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPersistentHistoryChangeType { + NSPersistentHistoryChangeTypeInsert = 0, + NSPersistentHistoryChangeTypeUpdate = 1, + NSPersistentHistoryChangeTypeDelete = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs b/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs index 333dfe394..286239715 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs @@ -4,185 +4,95 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -extern "C" { - pub static NSSQLiteStoreType: &'static NSString; -} +extern_static!(NSSQLiteStoreType: &'static NSString); -extern "C" { - pub static NSXMLStoreType: &'static NSString; -} +extern_static!(NSXMLStoreType: &'static NSString); -extern "C" { - pub static NSBinaryStoreType: &'static NSString; -} +extern_static!(NSBinaryStoreType: &'static NSString); -extern "C" { - pub static NSInMemoryStoreType: &'static NSString; -} +extern_static!(NSInMemoryStoreType: &'static NSString); -extern "C" { - pub static NSStoreTypeKey: &'static NSString; -} +extern_static!(NSStoreTypeKey: &'static NSString); -extern "C" { - pub static NSStoreUUIDKey: &'static NSString; -} +extern_static!(NSStoreUUIDKey: &'static NSString); -extern "C" { - pub static NSPersistentStoreCoordinatorStoresWillChangeNotification: &'static NSString; -} +extern_static!(NSPersistentStoreCoordinatorStoresWillChangeNotification: &'static NSString); -extern "C" { - pub static NSPersistentStoreCoordinatorStoresDidChangeNotification: &'static NSString; -} +extern_static!(NSPersistentStoreCoordinatorStoresDidChangeNotification: &'static NSString); -extern "C" { - pub static NSPersistentStoreCoordinatorWillRemoveStoreNotification: &'static NSString; -} +extern_static!(NSPersistentStoreCoordinatorWillRemoveStoreNotification: &'static NSString); -extern "C" { - pub static NSAddedPersistentStoresKey: &'static NSString; -} +extern_static!(NSAddedPersistentStoresKey: &'static NSString); -extern "C" { - pub static NSRemovedPersistentStoresKey: &'static NSString; -} +extern_static!(NSRemovedPersistentStoresKey: &'static NSString); -extern "C" { - pub static NSUUIDChangedPersistentStoresKey: &'static NSString; -} +extern_static!(NSUUIDChangedPersistentStoresKey: &'static NSString); -extern "C" { - pub static NSReadOnlyPersistentStoreOption: &'static NSString; -} +extern_static!(NSReadOnlyPersistentStoreOption: &'static NSString); -extern "C" { - pub static NSValidateXMLStoreOption: &'static NSString; -} +extern_static!(NSValidateXMLStoreOption: &'static NSString); -extern "C" { - pub static NSPersistentStoreTimeoutOption: &'static NSString; -} +extern_static!(NSPersistentStoreTimeoutOption: &'static NSString); -extern "C" { - pub static NSSQLitePragmasOption: &'static NSString; -} +extern_static!(NSSQLitePragmasOption: &'static NSString); -extern "C" { - pub static NSSQLiteAnalyzeOption: &'static NSString; -} +extern_static!(NSSQLiteAnalyzeOption: &'static NSString); -extern "C" { - pub static NSSQLiteManualVacuumOption: &'static NSString; -} +extern_static!(NSSQLiteManualVacuumOption: &'static NSString); -extern "C" { - pub static NSIgnorePersistentStoreVersioningOption: &'static NSString; -} +extern_static!(NSIgnorePersistentStoreVersioningOption: &'static NSString); -extern "C" { - pub static NSMigratePersistentStoresAutomaticallyOption: &'static NSString; -} +extern_static!(NSMigratePersistentStoresAutomaticallyOption: &'static NSString); -extern "C" { - pub static NSInferMappingModelAutomaticallyOption: &'static NSString; -} +extern_static!(NSInferMappingModelAutomaticallyOption: &'static NSString); -extern "C" { - pub static NSStoreModelVersionHashesKey: &'static NSString; -} +extern_static!(NSStoreModelVersionHashesKey: &'static NSString); -extern "C" { - pub static NSStoreModelVersionIdentifiersKey: &'static NSString; -} +extern_static!(NSStoreModelVersionIdentifiersKey: &'static NSString); -extern "C" { - pub static NSPersistentStoreOSCompatibility: &'static NSString; -} +extern_static!(NSPersistentStoreOSCompatibility: &'static NSString); -extern "C" { - pub static NSPersistentStoreConnectionPoolMaxSizeKey: &'static NSString; -} +extern_static!(NSPersistentStoreConnectionPoolMaxSizeKey: &'static NSString); -extern "C" { - pub static NSCoreDataCoreSpotlightExporter: &'static NSString; -} +extern_static!(NSCoreDataCoreSpotlightExporter: &'static NSString); -extern "C" { - pub static NSXMLExternalRecordType: &'static NSString; -} +extern_static!(NSXMLExternalRecordType: &'static NSString); -extern "C" { - pub static NSBinaryExternalRecordType: &'static NSString; -} +extern_static!(NSBinaryExternalRecordType: &'static NSString); -extern "C" { - pub static NSExternalRecordsFileFormatOption: &'static NSString; -} +extern_static!(NSExternalRecordsFileFormatOption: &'static NSString); -extern "C" { - pub static NSExternalRecordsDirectoryOption: &'static NSString; -} +extern_static!(NSExternalRecordsDirectoryOption: &'static NSString); -extern "C" { - pub static NSExternalRecordExtensionOption: &'static NSString; -} +extern_static!(NSExternalRecordExtensionOption: &'static NSString); -extern "C" { - pub static NSEntityNameInPathKey: &'static NSString; -} +extern_static!(NSEntityNameInPathKey: &'static NSString); -extern "C" { - pub static NSStoreUUIDInPathKey: &'static NSString; -} +extern_static!(NSStoreUUIDInPathKey: &'static NSString); -extern "C" { - pub static NSStorePathKey: &'static NSString; -} +extern_static!(NSStorePathKey: &'static NSString); -extern "C" { - pub static NSModelPathKey: &'static NSString; -} +extern_static!(NSModelPathKey: &'static NSString); -extern "C" { - pub static NSObjectURIKey: &'static NSString; -} +extern_static!(NSObjectURIKey: &'static NSString); -extern "C" { - pub static NSPersistentStoreForceDestroyOption: &'static NSString; -} +extern_static!(NSPersistentStoreForceDestroyOption: &'static NSString); -extern "C" { - pub static NSPersistentStoreFileProtectionKey: &'static NSString; -} +extern_static!(NSPersistentStoreFileProtectionKey: &'static NSString); -extern "C" { - pub static NSPersistentHistoryTrackingKey: &'static NSString; -} +extern_static!(NSPersistentHistoryTrackingKey: &'static NSString); -extern "C" { - pub static NSBinaryStoreSecureDecodingClasses: &'static NSString; -} +extern_static!(NSBinaryStoreSecureDecodingClasses: &'static NSString); -extern "C" { - pub static NSBinaryStoreInsecureDecodingCompatibilityOption: &'static NSString; -} +extern_static!(NSBinaryStoreInsecureDecodingCompatibilityOption: &'static NSString); -extern "C" { - pub static NSPersistentStoreRemoteChangeNotificationPostOptionKey: &'static NSString; -} +extern_static!(NSPersistentStoreRemoteChangeNotificationPostOptionKey: &'static NSString); -extern "C" { - pub static NSPersistentStoreRemoteChangeNotification: &'static NSString; -} +extern_static!(NSPersistentStoreRemoteChangeNotification: &'static NSString); -extern "C" { - pub static NSPersistentStoreURLKey: &'static NSString; -} +extern_static!(NSPersistentStoreURLKey: &'static NSString); -extern "C" { - pub static NSPersistentHistoryTokenKey: &'static NSString; -} +extern_static!(NSPersistentHistoryTokenKey: &'static NSString); extern_class!( #[derive(Debug)] @@ -390,44 +300,28 @@ extern_methods!( } ); -pub type NSPersistentStoreUbiquitousTransitionType = NSUInteger; -pub const NSPersistentStoreUbiquitousTransitionTypeAccountAdded: - NSPersistentStoreUbiquitousTransitionType = 1; -pub const NSPersistentStoreUbiquitousTransitionTypeAccountRemoved: - NSPersistentStoreUbiquitousTransitionType = 2; -pub const NSPersistentStoreUbiquitousTransitionTypeContentRemoved: - NSPersistentStoreUbiquitousTransitionType = 3; -pub const NSPersistentStoreUbiquitousTransitionTypeInitialImportCompleted: - NSPersistentStoreUbiquitousTransitionType = 4; - -extern "C" { - pub static NSPersistentStoreUbiquitousContentNameKey: &'static NSString; -} - -extern "C" { - pub static NSPersistentStoreUbiquitousContentURLKey: &'static NSString; -} - -extern "C" { - pub static NSPersistentStoreDidImportUbiquitousContentChangesNotification: &'static NSString; -} - -extern "C" { - pub static NSPersistentStoreUbiquitousTransitionTypeKey: &'static NSString; -} - -extern "C" { - pub static NSPersistentStoreUbiquitousPeerTokenOption: &'static NSString; -} - -extern "C" { - pub static NSPersistentStoreRemoveUbiquitousMetadataOption: &'static NSString; -} - -extern "C" { - pub static NSPersistentStoreUbiquitousContainerIdentifierKey: &'static NSString; -} - -extern "C" { - pub static NSPersistentStoreRebuildFromUbiquitousContentOption: &'static NSString; -} +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPersistentStoreUbiquitousTransitionType { + NSPersistentStoreUbiquitousTransitionTypeAccountAdded = 1, + NSPersistentStoreUbiquitousTransitionTypeAccountRemoved = 2, + NSPersistentStoreUbiquitousTransitionTypeContentRemoved = 3, + NSPersistentStoreUbiquitousTransitionTypeInitialImportCompleted = 4, + } +); + +extern_static!(NSPersistentStoreUbiquitousContentNameKey: &'static NSString); + +extern_static!(NSPersistentStoreUbiquitousContentURLKey: &'static NSString); + +extern_static!(NSPersistentStoreDidImportUbiquitousContentChangesNotification: &'static NSString); + +extern_static!(NSPersistentStoreUbiquitousTransitionTypeKey: &'static NSString); + +extern_static!(NSPersistentStoreUbiquitousPeerTokenOption: &'static NSString); + +extern_static!(NSPersistentStoreRemoveUbiquitousMetadataOption: &'static NSString); + +extern_static!(NSPersistentStoreUbiquitousContainerIdentifierKey: &'static NSString); + +extern_static!(NSPersistentStoreRebuildFromUbiquitousContentOption: &'static NSString); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentStoreRequest.rs b/crates/icrate/src/generated/CoreData/NSPersistentStoreRequest.rs index 72bb13274..84711a576 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentStoreRequest.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentStoreRequest.rs @@ -4,12 +4,16 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSPersistentStoreRequestType = NSUInteger; -pub const NSFetchRequestType: NSPersistentStoreRequestType = 1; -pub const NSSaveRequestType: NSPersistentStoreRequestType = 2; -pub const NSBatchInsertRequestType: NSPersistentStoreRequestType = 5; -pub const NSBatchUpdateRequestType: NSPersistentStoreRequestType = 6; -pub const NSBatchDeleteRequestType: NSPersistentStoreRequestType = 7; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPersistentStoreRequestType { + NSFetchRequestType = 1, + NSSaveRequestType = 2, + NSBatchInsertRequestType = 5, + NSBatchUpdateRequestType = 6, + NSBatchDeleteRequestType = 7, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSPersistentStoreResult.rs b/crates/icrate/src/generated/CoreData/NSPersistentStoreResult.rs index 03babf440..980786b68 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentStoreResult.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentStoreResult.rs @@ -4,28 +4,44 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSBatchInsertRequestResultType = NSUInteger; -pub const NSBatchInsertRequestResultTypeStatusOnly: NSBatchInsertRequestResultType = 0x0; -pub const NSBatchInsertRequestResultTypeObjectIDs: NSBatchInsertRequestResultType = 0x1; -pub const NSBatchInsertRequestResultTypeCount: NSBatchInsertRequestResultType = 0x2; - -pub type NSBatchUpdateRequestResultType = NSUInteger; -pub const NSStatusOnlyResultType: NSBatchUpdateRequestResultType = 0x0; -pub const NSUpdatedObjectIDsResultType: NSBatchUpdateRequestResultType = 0x1; -pub const NSUpdatedObjectsCountResultType: NSBatchUpdateRequestResultType = 0x2; - -pub type NSBatchDeleteRequestResultType = NSUInteger; -pub const NSBatchDeleteResultTypeStatusOnly: NSBatchDeleteRequestResultType = 0x0; -pub const NSBatchDeleteResultTypeObjectIDs: NSBatchDeleteRequestResultType = 0x1; -pub const NSBatchDeleteResultTypeCount: NSBatchDeleteRequestResultType = 0x2; - -pub type NSPersistentHistoryResultType = NSInteger; -pub const NSPersistentHistoryResultTypeStatusOnly: NSPersistentHistoryResultType = 0x0; -pub const NSPersistentHistoryResultTypeObjectIDs: NSPersistentHistoryResultType = 0x1; -pub const NSPersistentHistoryResultTypeCount: NSPersistentHistoryResultType = 0x2; -pub const NSPersistentHistoryResultTypeTransactionsOnly: NSPersistentHistoryResultType = 0x3; -pub const NSPersistentHistoryResultTypeChangesOnly: NSPersistentHistoryResultType = 0x4; -pub const NSPersistentHistoryResultTypeTransactionsAndChanges: NSPersistentHistoryResultType = 0x5; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBatchInsertRequestResultType { + NSBatchInsertRequestResultTypeStatusOnly = 0x0, + NSBatchInsertRequestResultTypeObjectIDs = 0x1, + NSBatchInsertRequestResultTypeCount = 0x2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBatchUpdateRequestResultType { + NSStatusOnlyResultType = 0x0, + NSUpdatedObjectIDsResultType = 0x1, + NSUpdatedObjectsCountResultType = 0x2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSBatchDeleteRequestResultType { + NSBatchDeleteResultTypeStatusOnly = 0x0, + NSBatchDeleteResultTypeObjectIDs = 0x1, + NSBatchDeleteResultTypeCount = 0x2, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPersistentHistoryResultType { + NSPersistentHistoryResultTypeStatusOnly = 0x0, + NSPersistentHistoryResultTypeObjectIDs = 0x1, + NSPersistentHistoryResultTypeCount = 0x2, + NSPersistentHistoryResultTypeTransactionsOnly = 0x3, + NSPersistentHistoryResultTypeChangesOnly = 0x4, + NSPersistentHistoryResultTypeTransactionsAndChanges = 0x5, + } +); extern_class!( #[derive(Debug)] @@ -162,11 +178,13 @@ extern_methods!( } ); -pub type NSPersistentCloudKitContainerEventResultType = NSInteger; -pub const NSPersistentCloudKitContainerEventResultTypeEvents: - NSPersistentCloudKitContainerEventResultType = 0; -pub const NSPersistentCloudKitContainerEventResultTypeCountEvents: - NSPersistentCloudKitContainerEventResultType = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPersistentCloudKitContainerEventResultType { + NSPersistentCloudKitContainerEventResultTypeEvents = 0, + NSPersistentCloudKitContainerEventResultTypeCountEvents = 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/CoreData/NSRelationshipDescription.rs b/crates/icrate/src/generated/CoreData/NSRelationshipDescription.rs index 5162f7b2b..b2719e072 100644 --- a/crates/icrate/src/generated/CoreData/NSRelationshipDescription.rs +++ b/crates/icrate/src/generated/CoreData/NSRelationshipDescription.rs @@ -4,11 +4,15 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSDeleteRule = NSUInteger; -pub const NSNoActionDeleteRule: NSDeleteRule = 0; -pub const NSNullifyDeleteRule: NSDeleteRule = 1; -pub const NSCascadeDeleteRule: NSDeleteRule = 2; -pub const NSDenyDeleteRule: NSDeleteRule = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSDeleteRule { + NSNoActionDeleteRule = 0, + NSNullifyDeleteRule = 1, + NSCascadeDeleteRule = 2, + NSDenyDeleteRule = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/FoundationErrors.rs b/crates/icrate/src/generated/Foundation/FoundationErrors.rs index 2c5bf1492..93081e7da 100644 --- a/crates/icrate/src/generated/Foundation/FoundationErrors.rs +++ b/crates/icrate/src/generated/Foundation/FoundationErrors.rs @@ -3,86 +3,91 @@ use crate::common::*; use crate::Foundation::*; -pub const NSFileNoSuchFileError: NSInteger = 4; -pub const NSFileLockingError: NSInteger = 255; -pub const NSFileReadUnknownError: NSInteger = 256; -pub const NSFileReadNoPermissionError: NSInteger = 257; -pub const NSFileReadInvalidFileNameError: NSInteger = 258; -pub const NSFileReadCorruptFileError: NSInteger = 259; -pub const NSFileReadNoSuchFileError: NSInteger = 260; -pub const NSFileReadInapplicableStringEncodingError: NSInteger = 261; -pub const NSFileReadUnsupportedSchemeError: NSInteger = 262; -pub const NSFileReadTooLargeError: NSInteger = 263; -pub const NSFileReadUnknownStringEncodingError: NSInteger = 264; -pub const NSFileWriteUnknownError: NSInteger = 512; -pub const NSFileWriteNoPermissionError: NSInteger = 513; -pub const NSFileWriteInvalidFileNameError: NSInteger = 514; -pub const NSFileWriteFileExistsError: NSInteger = 516; -pub const NSFileWriteInapplicableStringEncodingError: NSInteger = 517; -pub const NSFileWriteUnsupportedSchemeError: NSInteger = 518; -pub const NSFileWriteOutOfSpaceError: NSInteger = 640; -pub const NSFileWriteVolumeReadOnlyError: NSInteger = 642; -pub const NSFileManagerUnmountUnknownError: NSInteger = 768; -pub const NSFileManagerUnmountBusyError: NSInteger = 769; -pub const NSKeyValueValidationError: NSInteger = 1024; -pub const NSFormattingError: NSInteger = 2048; -pub const NSUserCancelledError: NSInteger = 3072; -pub const NSFeatureUnsupportedError: NSInteger = 3328; -pub const NSExecutableNotLoadableError: NSInteger = 3584; -pub const NSExecutableArchitectureMismatchError: NSInteger = 3585; -pub const NSExecutableRuntimeMismatchError: NSInteger = 3586; -pub const NSExecutableLoadError: NSInteger = 3587; -pub const NSExecutableLinkError: NSInteger = 3588; -pub const NSFileErrorMinimum: NSInteger = 0; -pub const NSFileErrorMaximum: NSInteger = 1023; -pub const NSValidationErrorMinimum: NSInteger = 1024; -pub const NSValidationErrorMaximum: NSInteger = 2047; -pub const NSExecutableErrorMinimum: NSInteger = 3584; -pub const NSExecutableErrorMaximum: NSInteger = 3839; -pub const NSFormattingErrorMinimum: NSInteger = 2048; -pub const NSFormattingErrorMaximum: NSInteger = 2559; -pub const NSPropertyListReadCorruptError: NSInteger = 3840; -pub const NSPropertyListReadUnknownVersionError: NSInteger = 3841; -pub const NSPropertyListReadStreamError: NSInteger = 3842; -pub const NSPropertyListWriteStreamError: NSInteger = 3851; -pub const NSPropertyListWriteInvalidError: NSInteger = 3852; -pub const NSPropertyListErrorMinimum: NSInteger = 3840; -pub const NSPropertyListErrorMaximum: NSInteger = 4095; -pub const NSXPCConnectionInterrupted: NSInteger = 4097; -pub const NSXPCConnectionInvalid: NSInteger = 4099; -pub const NSXPCConnectionReplyInvalid: NSInteger = 4101; -pub const NSXPCConnectionErrorMinimum: NSInteger = 4096; -pub const NSXPCConnectionErrorMaximum: NSInteger = 4224; -pub const NSUbiquitousFileUnavailableError: NSInteger = 4353; -pub const NSUbiquitousFileNotUploadedDueToQuotaError: NSInteger = 4354; -pub const NSUbiquitousFileUbiquityServerNotAvailable: NSInteger = 4355; -pub const NSUbiquitousFileErrorMinimum: NSInteger = 4352; -pub const NSUbiquitousFileErrorMaximum: NSInteger = 4607; -pub const NSUserActivityHandoffFailedError: NSInteger = 4608; -pub const NSUserActivityConnectionUnavailableError: NSInteger = 4609; -pub const NSUserActivityRemoteApplicationTimedOutError: NSInteger = 4610; -pub const NSUserActivityHandoffUserInfoTooLargeError: NSInteger = 4611; -pub const NSUserActivityErrorMinimum: NSInteger = 4608; -pub const NSUserActivityErrorMaximum: NSInteger = 4863; -pub const NSCoderReadCorruptError: NSInteger = 4864; -pub const NSCoderValueNotFoundError: NSInteger = 4865; -pub const NSCoderInvalidValueError: NSInteger = 4866; -pub const NSCoderErrorMinimum: NSInteger = 4864; -pub const NSCoderErrorMaximum: NSInteger = 4991; -pub const NSBundleErrorMinimum: NSInteger = 4992; -pub const NSBundleErrorMaximum: NSInteger = 5119; -pub const NSBundleOnDemandResourceOutOfSpaceError: NSInteger = 4992; -pub const NSBundleOnDemandResourceExceededMaximumSizeError: NSInteger = 4993; -pub const NSBundleOnDemandResourceInvalidTagError: NSInteger = 4994; -pub const NSCloudSharingNetworkFailureError: NSInteger = 5120; -pub const NSCloudSharingQuotaExceededError: NSInteger = 5121; -pub const NSCloudSharingTooManyParticipantsError: NSInteger = 5122; -pub const NSCloudSharingConflictError: NSInteger = 5123; -pub const NSCloudSharingNoPermissionError: NSInteger = 5124; -pub const NSCloudSharingOtherError: NSInteger = 5375; -pub const NSCloudSharingErrorMinimum: NSInteger = 5120; -pub const NSCloudSharingErrorMaximum: NSInteger = 5375; -pub const NSCompressionFailedError: NSInteger = 5376; -pub const NSDecompressionFailedError: NSInteger = 5377; -pub const NSCompressionErrorMinimum: NSInteger = 5376; -pub const NSCompressionErrorMaximum: NSInteger = 5503; +ns_error_enum!( + #[underlying(NSInteger)] + pub enum { + NSFileNoSuchFileError = 4, + NSFileLockingError = 255, + NSFileReadUnknownError = 256, + NSFileReadNoPermissionError = 257, + NSFileReadInvalidFileNameError = 258, + NSFileReadCorruptFileError = 259, + NSFileReadNoSuchFileError = 260, + NSFileReadInapplicableStringEncodingError = 261, + NSFileReadUnsupportedSchemeError = 262, + NSFileReadTooLargeError = 263, + NSFileReadUnknownStringEncodingError = 264, + NSFileWriteUnknownError = 512, + NSFileWriteNoPermissionError = 513, + NSFileWriteInvalidFileNameError = 514, + NSFileWriteFileExistsError = 516, + NSFileWriteInapplicableStringEncodingError = 517, + NSFileWriteUnsupportedSchemeError = 518, + NSFileWriteOutOfSpaceError = 640, + NSFileWriteVolumeReadOnlyError = 642, + NSFileManagerUnmountUnknownError = 768, + NSFileManagerUnmountBusyError = 769, + NSKeyValueValidationError = 1024, + NSFormattingError = 2048, + NSUserCancelledError = 3072, + NSFeatureUnsupportedError = 3328, + NSExecutableNotLoadableError = 3584, + NSExecutableArchitectureMismatchError = 3585, + NSExecutableRuntimeMismatchError = 3586, + NSExecutableLoadError = 3587, + NSExecutableLinkError = 3588, + NSFileErrorMinimum = 0, + NSFileErrorMaximum = 1023, + NSValidationErrorMinimum = 1024, + NSValidationErrorMaximum = 2047, + NSExecutableErrorMinimum = 3584, + NSExecutableErrorMaximum = 3839, + NSFormattingErrorMinimum = 2048, + NSFormattingErrorMaximum = 2559, + NSPropertyListReadCorruptError = 3840, + NSPropertyListReadUnknownVersionError = 3841, + NSPropertyListReadStreamError = 3842, + NSPropertyListWriteStreamError = 3851, + NSPropertyListWriteInvalidError = 3852, + NSPropertyListErrorMinimum = 3840, + NSPropertyListErrorMaximum = 4095, + NSXPCConnectionInterrupted = 4097, + NSXPCConnectionInvalid = 4099, + NSXPCConnectionReplyInvalid = 4101, + NSXPCConnectionErrorMinimum = 4096, + NSXPCConnectionErrorMaximum = 4224, + NSUbiquitousFileUnavailableError = 4353, + NSUbiquitousFileNotUploadedDueToQuotaError = 4354, + NSUbiquitousFileUbiquityServerNotAvailable = 4355, + NSUbiquitousFileErrorMinimum = 4352, + NSUbiquitousFileErrorMaximum = 4607, + NSUserActivityHandoffFailedError = 4608, + NSUserActivityConnectionUnavailableError = 4609, + NSUserActivityRemoteApplicationTimedOutError = 4610, + NSUserActivityHandoffUserInfoTooLargeError = 4611, + NSUserActivityErrorMinimum = 4608, + NSUserActivityErrorMaximum = 4863, + NSCoderReadCorruptError = 4864, + NSCoderValueNotFoundError = 4865, + NSCoderInvalidValueError = 4866, + NSCoderErrorMinimum = 4864, + NSCoderErrorMaximum = 4991, + NSBundleErrorMinimum = 4992, + NSBundleErrorMaximum = 5119, + NSBundleOnDemandResourceOutOfSpaceError = 4992, + NSBundleOnDemandResourceExceededMaximumSizeError = 4993, + NSBundleOnDemandResourceInvalidTagError = 4994, + NSCloudSharingNetworkFailureError = 5120, + NSCloudSharingQuotaExceededError = 5121, + NSCloudSharingTooManyParticipantsError = 5122, + NSCloudSharingConflictError = 5123, + NSCloudSharingNoPermissionError = 5124, + NSCloudSharingOtherError = 5375, + NSCloudSharingErrorMinimum = 5120, + NSCloudSharingErrorMaximum = 5375, + NSCompressionFailedError = 5376, + NSDecompressionFailedError = 5377, + NSCompressionErrorMinimum = 5376, + NSCompressionErrorMaximum = 5503, + } +); diff --git a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs index 78ad7e66b..6dc22f2a7 100644 --- a/crates/icrate/src/generated/Foundation/NSAffineTransform.rs +++ b/crates/icrate/src/generated/Foundation/NSAffineTransform.rs @@ -3,7 +3,7 @@ use crate::common::*; use crate::Foundation::*; -struct_impl!( +extern_struct!( pub struct NSAffineTransformStruct { pub m11: CGFloat, pub m12: CGFloat, diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs index f667e8702..0756bed4e 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventDescriptor.rs @@ -3,18 +3,22 @@ use crate::common::*; use crate::Foundation::*; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSAppleEventSendOptions { + NSAppleEventSendNoReply = 1, + NSAppleEventSendQueueReply = 2, + NSAppleEventSendWaitForReply = 3, + NSAppleEventSendNeverInteract = 16, + NSAppleEventSendCanInteract = 32, + NSAppleEventSendAlwaysInteract = 48, + NSAppleEventSendCanSwitchLayer = 64, + NSAppleEventSendDontRecord = 4096, + NSAppleEventSendDontExecute = 8192, + NSAppleEventSendDontAnnotate = 65536, + NSAppleEventSendDefaultOptions = 35, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs index bc5d09b06..15f00dce4 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleEventManager.rs @@ -5,17 +5,11 @@ use crate::Foundation::*; pub type NSAppleEventManagerSuspensionID = *mut c_void; -extern "C" { - pub static NSAppleEventTimeOutDefault: c_double; -} +extern_static!(NSAppleEventTimeOutDefault: c_double); -extern "C" { - pub static NSAppleEventTimeOutNone: c_double; -} +extern_static!(NSAppleEventTimeOutNone: c_double); -extern "C" { - pub static NSAppleEventManagerWillProcessFirstEventNotification: &'static NSNotificationName; -} +extern_static!(NSAppleEventManagerWillProcessFirstEventNotification: &'static NSNotificationName); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSAppleScript.rs b/crates/icrate/src/generated/Foundation/NSAppleScript.rs index aedf2834b..b8b91c17e 100644 --- a/crates/icrate/src/generated/Foundation/NSAppleScript.rs +++ b/crates/icrate/src/generated/Foundation/NSAppleScript.rs @@ -3,25 +3,15 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSAppleScriptErrorMessage: &'static NSString; -} +extern_static!(NSAppleScriptErrorMessage: &'static NSString); -extern "C" { - pub static NSAppleScriptErrorNumber: &'static NSString; -} +extern_static!(NSAppleScriptErrorNumber: &'static NSString); -extern "C" { - pub static NSAppleScriptErrorAppName: &'static NSString; -} +extern_static!(NSAppleScriptErrorAppName: &'static NSString); -extern "C" { - pub static NSAppleScriptErrorBriefMessage: &'static NSString; -} +extern_static!(NSAppleScriptErrorBriefMessage: &'static NSString); -extern "C" { - pub static NSAppleScriptErrorRange: &'static NSString; -} +extern_static!(NSAppleScriptErrorRange: &'static NSString); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 891868cc9..bf622937b 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -40,10 +40,14 @@ extern_methods!( } ); -pub type NSBinarySearchingOptions = NSUInteger; -pub const NSBinarySearchingFirstEqual: NSBinarySearchingOptions = 1 << 8; -pub const NSBinarySearchingLastEqual: NSBinarySearchingOptions = 1 << 9; -pub const NSBinarySearchingInsertionIndex: NSBinarySearchingOptions = 1 << 10; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSBinarySearchingOptions { + NSBinarySearchingFirstEqual = 1 << 8, + NSBinarySearchingLastEqual = 1 << 9, + NSBinarySearchingInsertionIndex = 1 << 10, + } +); extern_methods!( /// NSExtendedArray diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index 59d2d1458..076e56c24 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -28,10 +28,13 @@ extern_methods!( } ); -pub type NSAttributedStringEnumerationOptions = NSUInteger; -pub const NSAttributedStringEnumerationReverse: NSAttributedStringEnumerationOptions = 1 << 1; -pub const NSAttributedStringEnumerationLongestEffectiveRangeNotRequired: - NSAttributedStringEnumerationOptions = 1 << 20; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSAttributedStringEnumerationOptions { + NSAttributedStringEnumerationReverse = 1 << 1, + NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1 << 20, + } +); extern_methods!( /// NSExtendedAttributedString @@ -189,45 +192,44 @@ extern_methods!( } ); -pub type NSInlinePresentationIntent = NSUInteger; -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; - -extern "C" { - pub static NSInlinePresentationIntentAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSAlternateDescriptionAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSImageURLAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSLanguageIdentifierAttributeName: &'static NSAttributedStringKey; -} - -pub type NSAttributedStringMarkdownParsingFailurePolicy = NSInteger; -pub const NSAttributedStringMarkdownParsingFailureReturnError: - NSAttributedStringMarkdownParsingFailurePolicy = 0; -pub const NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible: - NSAttributedStringMarkdownParsingFailurePolicy = 1; - -pub type NSAttributedStringMarkdownInterpretedSyntax = NSInteger; -pub const NSAttributedStringMarkdownInterpretedSyntaxFull: - NSAttributedStringMarkdownInterpretedSyntax = 0; -pub const NSAttributedStringMarkdownInterpretedSyntaxInlineOnly: - NSAttributedStringMarkdownInterpretedSyntax = 1; -pub const NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace: - NSAttributedStringMarkdownInterpretedSyntax = 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSInlinePresentationIntent { + NSInlinePresentationIntentEmphasized = 1 << 0, + NSInlinePresentationIntentStronglyEmphasized = 1 << 1, + NSInlinePresentationIntentCode = 1 << 2, + NSInlinePresentationIntentStrikethrough = 1 << 5, + NSInlinePresentationIntentSoftBreak = 1 << 6, + NSInlinePresentationIntentLineBreak = 1 << 7, + NSInlinePresentationIntentInlineHTML = 1 << 8, + NSInlinePresentationIntentBlockHTML = 1 << 9, + } +); + +extern_static!(NSInlinePresentationIntentAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSAlternateDescriptionAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSImageURLAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSLanguageIdentifierAttributeName: &'static NSAttributedStringKey); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSAttributedStringMarkdownParsingFailurePolicy { + NSAttributedStringMarkdownParsingFailureReturnError = 0, + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSAttributedStringMarkdownInterpretedSyntax { + NSAttributedStringMarkdownInterpretedSyntaxFull = 0, + NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1, + NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = 2, + } +); extern_class!( #[derive(Debug)] @@ -304,11 +306,13 @@ extern_methods!( } ); -pub type NSAttributedStringFormattingOptions = NSUInteger; -pub const NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging: - NSAttributedStringFormattingOptions = 1 << 0; -pub const NSAttributedStringFormattingApplyReplacementIndexAttribute: - NSAttributedStringFormattingOptions = 1 << 1; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSAttributedStringFormattingOptions { + NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1 << 0, + NSAttributedStringFormattingApplyReplacementIndexAttribute = 1 << 1, + } +); extern_methods!( /// NSAttributedStringFormatting @@ -320,9 +324,7 @@ extern_methods!( unsafe impl NSMutableAttributedString {} ); -extern "C" { - pub static NSReplacementIndexAttributeName: &'static NSAttributedStringKey; -} +extern_static!(NSReplacementIndexAttributeName: &'static NSAttributedStringKey); extern_methods!( /// NSMorphology @@ -332,43 +334,40 @@ extern_methods!( } ); -extern "C" { - pub static NSMorphologyAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSInflectionRuleAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSInflectionAlternativeAttributeName: &'static NSAttributedStringKey; -} - -extern "C" { - pub static NSPresentationIntentAttributeName: &'static NSAttributedStringKey; -} - -pub type NSPresentationIntentKind = NSInteger; -pub const NSPresentationIntentKindParagraph: NSPresentationIntentKind = 0; -pub const NSPresentationIntentKindHeader: NSPresentationIntentKind = 1; -pub const NSPresentationIntentKindOrderedList: NSPresentationIntentKind = 2; -pub const NSPresentationIntentKindUnorderedList: NSPresentationIntentKind = 3; -pub const NSPresentationIntentKindListItem: NSPresentationIntentKind = 4; -pub const NSPresentationIntentKindCodeBlock: NSPresentationIntentKind = 5; -pub const NSPresentationIntentKindBlockQuote: NSPresentationIntentKind = 6; -pub const NSPresentationIntentKindThematicBreak: NSPresentationIntentKind = 7; -pub const NSPresentationIntentKindTable: NSPresentationIntentKind = 8; -pub const NSPresentationIntentKindTableHeaderRow: NSPresentationIntentKind = 9; -pub const NSPresentationIntentKindTableRow: NSPresentationIntentKind = 10; -pub const NSPresentationIntentKindTableCell: NSPresentationIntentKind = 11; - -pub type NSPresentationIntentTableColumnAlignment = NSInteger; -pub const NSPresentationIntentTableColumnAlignmentLeft: NSPresentationIntentTableColumnAlignment = - 0; -pub const NSPresentationIntentTableColumnAlignmentCenter: NSPresentationIntentTableColumnAlignment = - 1; -pub const NSPresentationIntentTableColumnAlignmentRight: NSPresentationIntentTableColumnAlignment = - 2; +extern_static!(NSMorphologyAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSInflectionRuleAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSInflectionAlternativeAttributeName: &'static NSAttributedStringKey); + +extern_static!(NSPresentationIntentAttributeName: &'static NSAttributedStringKey); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPresentationIntentKind { + NSPresentationIntentKindParagraph = 0, + NSPresentationIntentKindHeader = 1, + NSPresentationIntentKindOrderedList = 2, + NSPresentationIntentKindUnorderedList = 3, + NSPresentationIntentKindListItem = 4, + NSPresentationIntentKindCodeBlock = 5, + NSPresentationIntentKindBlockQuote = 6, + NSPresentationIntentKindThematicBreak = 7, + NSPresentationIntentKindTable = 8, + NSPresentationIntentKindTableHeaderRow = 9, + NSPresentationIntentKindTableRow = 10, + NSPresentationIntentKindTableCell = 11, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPresentationIntentTableColumnAlignment { + NSPresentationIntentTableColumnAlignmentLeft = 0, + NSPresentationIntentTableColumnAlignmentCenter = 1, + NSPresentationIntentTableColumnAlignmentRight = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 473e59164..9aa90b8ce 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -3,9 +3,13 @@ use crate::common::*; use crate::Foundation::*; -pub type NSBackgroundActivityResult = NSInteger; -pub const NSBackgroundActivityResultFinished: NSBackgroundActivityResult = 1; -pub const NSBackgroundActivityResultDeferred: NSBackgroundActivityResult = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSBackgroundActivityResult { + NSBackgroundActivityResultFinished = 1, + NSBackgroundActivityResultDeferred = 2, + } +); pub type NSBackgroundActivityCompletionHandler = TodoBlock; diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 1a5c26759..0b2c06962 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -3,11 +3,16 @@ use crate::common::*; use crate::Foundation::*; -pub const NSBundleExecutableArchitectureI386: c_uint = 0x00000007; -pub const NSBundleExecutableArchitecturePPC: c_uint = 0x00000012; -pub const NSBundleExecutableArchitectureX86_64: c_uint = 0x01000007; -pub const NSBundleExecutableArchitecturePPC64: c_uint = 0x01000012; -pub const NSBundleExecutableArchitectureARM64: c_uint = 0x0100000c; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSBundleExecutableArchitectureI386 = 0x00000007, + NSBundleExecutableArchitecturePPC = 0x00000012, + NSBundleExecutableArchitectureX86_64 = 0x01000007, + NSBundleExecutableArchitecturePPC64 = 0x01000012, + NSBundleExecutableArchitectureARM64 = 0x0100000c, + } +); extern_class!( #[derive(Debug)] @@ -270,13 +275,9 @@ extern_methods!( } ); -extern "C" { - pub static NSBundleDidLoadNotification: &'static NSNotificationName; -} +extern_static!(NSBundleDidLoadNotification: &'static NSNotificationName); -extern "C" { - pub static NSLoadedClasses: &'static NSString; -} +extern_static!(NSLoadedClasses: &'static NSString); extern_class!( #[derive(Debug)] @@ -352,10 +353,6 @@ extern_methods!( } ); -extern "C" { - pub static NSBundleResourceRequestLowDiskSpaceNotification: &'static NSNotificationName; -} +extern_static!(NSBundleResourceRequestLowDiskSpaceNotification: &'static NSNotificationName); -extern "C" { - pub static NSBundleResourceRequestLoadingPriorityUrgent: c_double; -} +extern_static!(NSBundleResourceRequestLoadingPriorityUrgent: c_double); diff --git a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs index 0b5bed7c3..5cb4eb185 100644 --- a/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSByteCountFormatter.rs @@ -3,24 +3,32 @@ use crate::common::*; use crate::Foundation::*; -pub type NSByteCountFormatterUnits = NSUInteger; -pub const NSByteCountFormatterUseDefault: NSByteCountFormatterUnits = 0; -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; -pub const NSByteCountFormatterCountStyleMemory: NSByteCountFormatterCountStyle = 1; -pub const NSByteCountFormatterCountStyleDecimal: NSByteCountFormatterCountStyle = 2; -pub const NSByteCountFormatterCountStyleBinary: NSByteCountFormatterCountStyle = 3; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSByteCountFormatterUnits { + NSByteCountFormatterUseDefault = 0, + NSByteCountFormatterUseBytes = 1 << 0, + NSByteCountFormatterUseKB = 1 << 1, + NSByteCountFormatterUseMB = 1 << 2, + NSByteCountFormatterUseGB = 1 << 3, + NSByteCountFormatterUseTB = 1 << 4, + NSByteCountFormatterUsePB = 1 << 5, + NSByteCountFormatterUseEB = 1 << 6, + NSByteCountFormatterUseZB = 1 << 7, + NSByteCountFormatterUseYBOrHigher = 0x0FF << 8, + NSByteCountFormatterUseAll = 0x0FFFF, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSByteCountFormatterCountStyle { + NSByteCountFormatterCountStyleFile = 0, + NSByteCountFormatterCountStyleMemory = 1, + NSByteCountFormatterCountStyleDecimal = 2, + NSByteCountFormatterCountStyleBinary = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index 936ec5309..d7d52474e 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -3,13 +3,19 @@ use crate::common::*; use crate::Foundation::*; -struct_impl!( +extern_enum!( + #[underlying(c_uint)] + pub enum { + } +); + +extern_struct!( pub struct NSSwappedFloat { pub v: c_uint, } ); -struct_impl!( +extern_struct!( pub struct NSSwappedDouble { pub v: c_ulonglong, } diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 33c29896b..67fe7b38e 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -5,113 +5,95 @@ use crate::Foundation::*; pub type NSCalendarIdentifier = NSString; -extern "C" { - pub static NSCalendarIdentifierGregorian: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierBuddhist: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierChinese: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierCoptic: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierEthiopicAmeteMihret: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierEthiopicAmeteAlem: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierHebrew: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierISO8601: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierIndian: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierIslamic: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierIslamicCivil: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierJapanese: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierPersian: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierRepublicOfChina: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierIslamicTabular: &'static NSCalendarIdentifier; -} - -extern "C" { - pub static NSCalendarIdentifierIslamicUmmAlQura: &'static NSCalendarIdentifier; -} - -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 type NSCalendarOptions = NSUInteger; -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; +extern_static!(NSCalendarIdentifierGregorian: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierBuddhist: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierChinese: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierCoptic: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierEthiopicAmeteMihret: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierEthiopicAmeteAlem: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierHebrew: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierISO8601: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierIndian: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierIslamic: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierIslamicCivil: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierJapanese: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierPersian: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierRepublicOfChina: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierIslamicTabular: &'static NSCalendarIdentifier); + +extern_static!(NSCalendarIdentifierIslamicUmmAlQura: &'static NSCalendarIdentifier); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSCalendarUnit { + NSCalendarUnitEra = 2, + NSCalendarUnitYear = 4, + NSCalendarUnitMonth = 8, + NSCalendarUnitDay = 16, + NSCalendarUnitHour = 32, + NSCalendarUnitMinute = 64, + NSCalendarUnitSecond = 128, + NSCalendarUnitWeekday = 512, + NSCalendarUnitWeekdayOrdinal = 1024, + NSCalendarUnitQuarter = 2048, + NSCalendarUnitWeekOfMonth = 4096, + NSCalendarUnitWeekOfYear = 8192, + NSCalendarUnitYearForWeekOfYear = 16384, + NSCalendarUnitNanosecond = 32768, + NSCalendarUnitCalendar = 1048576, + NSCalendarUnitTimeZone = 2097152, + NSEraCalendarUnit = 2, + NSYearCalendarUnit = 4, + NSMonthCalendarUnit = 8, + NSDayCalendarUnit = 16, + NSHourCalendarUnit = 32, + NSMinuteCalendarUnit = 64, + NSSecondCalendarUnit = 128, + NSWeekCalendarUnit = 256, + NSWeekdayCalendarUnit = 512, + NSWeekdayOrdinalCalendarUnit = 1024, + NSQuarterCalendarUnit = 2048, + NSWeekOfMonthCalendarUnit = 4096, + NSWeekOfYearCalendarUnit = 8192, + NSYearForWeekOfYearCalendarUnit = 16384, + NSCalendarCalendarUnit = 1048576, + NSTimeZoneCalendarUnit = 2097152, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSCalendarOptions { + NSCalendarWrapComponents = 1 << 0, + NSCalendarMatchStrictly = 1 << 1, + NSCalendarSearchBackwards = 1 << 2, + NSCalendarMatchPreviousTimePreservingSmallerUnits = 1 << 8, + NSCalendarMatchNextTimePreservingSmallerUnits = 1 << 9, + NSCalendarMatchNextTime = 1 << 10, + NSCalendarMatchFirst = 1 << 12, + NSCalendarMatchLast = 1 << 13, + } +); + +extern_enum!( + #[underlying(c_uint)] + pub enum { + } +); extern_class!( #[derive(Debug)] @@ -491,12 +473,15 @@ extern_methods!( } ); -extern "C" { - pub static NSCalendarDayChangedNotification: &'static NSNotificationName; -} +extern_static!(NSCalendarDayChangedNotification: &'static NSNotificationName); -pub const NSDateComponentUndefined: NSInteger = 9223372036854775807; -pub const NSUndefinedDateComponent: NSInteger = NSDateComponentUndefined; +ns_enum!( + #[underlying(NSInteger)] + pub enum { + NSDateComponentUndefined = 9223372036854775807, + NSUndefinedDateComponent = NSDateComponentUndefined, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs index 26f8526b5..c40fe4c10 100644 --- a/crates/icrate/src/generated/Foundation/NSCharacterSet.rs +++ b/crates/icrate/src/generated/Foundation/NSCharacterSet.rs @@ -3,7 +3,12 @@ use crate::common::*; use crate::Foundation::*; -pub const NSOpenStepUnicodeReservedBase: c_uint = 0xF400; +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSOpenStepUnicodeReservedBase = 0xF400, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSClassDescription.rs b/crates/icrate/src/generated/Foundation/NSClassDescription.rs index 8e37d18e8..b0cbba71d 100644 --- a/crates/icrate/src/generated/Foundation/NSClassDescription.rs +++ b/crates/icrate/src/generated/Foundation/NSClassDescription.rs @@ -68,6 +68,4 @@ extern_methods!( } ); -extern "C" { - pub static NSClassDescriptionNeededForClassNotification: &'static NSNotificationName; -} +extern_static!(NSClassDescriptionNeededForClassNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 2a1c58846..16c441141 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -3,9 +3,13 @@ use crate::common::*; use crate::Foundation::*; -pub type NSDecodingFailurePolicy = NSInteger; -pub const NSDecodingFailurePolicyRaiseException: NSDecodingFailurePolicy = 0; -pub const NSDecodingFailurePolicySetErrorAndReturn: NSDecodingFailurePolicy = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSDecodingFailurePolicy { + NSDecodingFailurePolicyRaiseException = 0, + NSDecodingFailurePolicySetErrorAndReturn = 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs index be20404d5..5b4d010e3 100644 --- a/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSComparisonPredicate.rs @@ -3,31 +3,43 @@ use crate::common::*; use crate::Foundation::*; -pub type NSComparisonPredicateOptions = NSUInteger; -pub const NSCaseInsensitivePredicateOption: NSComparisonPredicateOptions = 0x01; -pub const NSDiacriticInsensitivePredicateOption: NSComparisonPredicateOptions = 0x02; -pub const NSNormalizedPredicateOption: NSComparisonPredicateOptions = 0x04; - -pub type NSComparisonPredicateModifier = NSUInteger; -pub const NSDirectPredicateModifier: NSComparisonPredicateModifier = 0; -pub const NSAllPredicateModifier: NSComparisonPredicateModifier = 1; -pub const NSAnyPredicateModifier: NSComparisonPredicateModifier = 2; - -pub type NSPredicateOperatorType = NSUInteger; -pub const NSLessThanPredicateOperatorType: NSPredicateOperatorType = 0; -pub const NSLessThanOrEqualToPredicateOperatorType: NSPredicateOperatorType = 1; -pub const NSGreaterThanPredicateOperatorType: NSPredicateOperatorType = 2; -pub const NSGreaterThanOrEqualToPredicateOperatorType: NSPredicateOperatorType = 3; -pub const NSEqualToPredicateOperatorType: NSPredicateOperatorType = 4; -pub const NSNotEqualToPredicateOperatorType: NSPredicateOperatorType = 5; -pub const NSMatchesPredicateOperatorType: NSPredicateOperatorType = 6; -pub const NSLikePredicateOperatorType: NSPredicateOperatorType = 7; -pub const NSBeginsWithPredicateOperatorType: NSPredicateOperatorType = 8; -pub const NSEndsWithPredicateOperatorType: NSPredicateOperatorType = 9; -pub const NSInPredicateOperatorType: NSPredicateOperatorType = 10; -pub const NSCustomSelectorPredicateOperatorType: NSPredicateOperatorType = 11; -pub const NSContainsPredicateOperatorType: NSPredicateOperatorType = 99; -pub const NSBetweenPredicateOperatorType: NSPredicateOperatorType = 100; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSComparisonPredicateOptions { + NSCaseInsensitivePredicateOption = 0x01, + NSDiacriticInsensitivePredicateOption = 0x02, + NSNormalizedPredicateOption = 0x04, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSComparisonPredicateModifier { + NSDirectPredicateModifier = 0, + NSAllPredicateModifier = 1, + NSAnyPredicateModifier = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPredicateOperatorType { + NSLessThanPredicateOperatorType = 0, + NSLessThanOrEqualToPredicateOperatorType = 1, + NSGreaterThanPredicateOperatorType = 2, + NSGreaterThanOrEqualToPredicateOperatorType = 3, + NSEqualToPredicateOperatorType = 4, + NSNotEqualToPredicateOperatorType = 5, + NSMatchesPredicateOperatorType = 6, + NSLikePredicateOperatorType = 7, + NSBeginsWithPredicateOperatorType = 8, + NSEndsWithPredicateOperatorType = 9, + NSInPredicateOperatorType = 10, + NSCustomSelectorPredicateOperatorType = 11, + NSContainsPredicateOperatorType = 99, + NSBetweenPredicateOperatorType = 100, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs index 9907826c7..1ce1606f0 100644 --- a/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSCompoundPredicate.rs @@ -3,10 +3,14 @@ use crate::common::*; use crate::Foundation::*; -pub type NSCompoundPredicateType = NSUInteger; -pub const NSNotPredicateType: NSCompoundPredicateType = 0; -pub const NSAndPredicateType: NSCompoundPredicateType = 1; -pub const NSOrPredicateType: NSCompoundPredicateType = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSCompoundPredicateType { + NSNotPredicateType = 0, + NSAndPredicateType = 1, + NSOrPredicateType = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index e3ff0a859..88ad69ced 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -171,23 +171,15 @@ extern_methods!( } ); -extern "C" { - pub static NSConnectionReplyMode: &'static NSString; -} +extern_static!(NSConnectionReplyMode: &'static NSString); -extern "C" { - pub static NSConnectionDidDieNotification: &'static NSString; -} +extern_static!(NSConnectionDidDieNotification: &'static NSString); pub type NSConnectionDelegate = NSObject; -extern "C" { - pub static NSFailedAuthenticationException: &'static NSString; -} +extern_static!(NSFailedAuthenticationException: &'static NSString); -extern "C" { - pub static NSConnectionDidInitializeNotification: &'static NSString; -} +extern_static!(NSConnectionDidInitializeNotification: &'static NSString); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index 23515cd66..b3bd6c713 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -3,37 +3,56 @@ use crate::common::*; use crate::Foundation::*; -pub type NSDataReadingOptions = NSUInteger; -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 << 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 = - 0x40000000; -pub const NSDataWritingFileProtectionMask: NSDataWritingOptions = 0xf0000000; -pub const NSAtomicWrite: NSDataWritingOptions = NSDataWritingAtomic; - -pub type NSDataSearchOptions = NSUInteger; -pub const NSDataSearchBackwards: NSDataSearchOptions = 1 << 0; -pub const NSDataSearchAnchored: NSDataSearchOptions = 1 << 1; - -pub type NSDataBase64EncodingOptions = NSUInteger; -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 << 0; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDataReadingOptions { + NSDataReadingMappedIfSafe = 1 << 0, + NSDataReadingUncached = 1 << 1, + NSDataReadingMappedAlways = 1 << 3, + NSDataReadingMapped = NSDataReadingMappedIfSafe, + NSMappedRead = NSDataReadingMapped, + NSUncachedRead = NSDataReadingUncached, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDataWritingOptions { + NSDataWritingAtomic = 1 << 0, + NSDataWritingWithoutOverwriting = 1 << 1, + NSDataWritingFileProtectionNone = 0x10000000, + NSDataWritingFileProtectionComplete = 0x20000000, + NSDataWritingFileProtectionCompleteUnlessOpen = 0x30000000, + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = 0x40000000, + NSDataWritingFileProtectionMask = 0xf0000000, + NSAtomicWrite = NSDataWritingAtomic, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDataSearchOptions { + NSDataSearchBackwards = 1 << 0, + NSDataSearchAnchored = 1 << 1, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDataBase64EncodingOptions { + NSDataBase64Encoding64CharacterLineLength = 1 << 0, + NSDataBase64Encoding76CharacterLineLength = 1 << 1, + NSDataBase64EncodingEndLineWithCarriageReturn = 1 << 4, + NSDataBase64EncodingEndLineWithLineFeed = 1 << 5, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDataBase64DecodingOptions { + NSDataBase64DecodingIgnoreUnknownCharacters = 1 << 0, + } +); extern_class!( #[derive(Debug)] @@ -250,11 +269,15 @@ extern_methods!( } ); -pub type NSDataCompressionAlgorithm = NSInteger; -pub const NSDataCompressionAlgorithmLZFSE: NSDataCompressionAlgorithm = 0; -pub const NSDataCompressionAlgorithmLZ4: NSDataCompressionAlgorithm = 1; -pub const NSDataCompressionAlgorithmLZMA: NSDataCompressionAlgorithm = 2; -pub const NSDataCompressionAlgorithmZlib: NSDataCompressionAlgorithm = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSDataCompressionAlgorithm { + NSDataCompressionAlgorithmLZFSE = 0, + NSDataCompressionAlgorithmLZ4 = 1, + NSDataCompressionAlgorithmLZMA = 2, + NSDataCompressionAlgorithmZlib = 3, + } +); extern_methods!( /// NSDataCompression diff --git a/crates/icrate/src/generated/Foundation/NSDate.rs b/crates/icrate/src/generated/Foundation/NSDate.rs index 5f9441091..e4c7444a0 100644 --- a/crates/icrate/src/generated/Foundation/NSDate.rs +++ b/crates/icrate/src/generated/Foundation/NSDate.rs @@ -3,9 +3,7 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSSystemClockDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSSystemClockDidChangeNotification: &'static NSNotificationName); pub type NSTimeInterval = c_double; diff --git a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs index 0bc67c612..14575838d 100644 --- a/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateComponentsFormatter.rs @@ -3,32 +3,33 @@ use crate::common::*; use crate::Foundation::*; -pub type NSDateComponentsFormatterUnitsStyle = NSInteger; -pub const NSDateComponentsFormatterUnitsStylePositional: NSDateComponentsFormatterUnitsStyle = 0; -pub const NSDateComponentsFormatterUnitsStyleAbbreviated: NSDateComponentsFormatterUnitsStyle = 1; -pub const NSDateComponentsFormatterUnitsStyleShort: NSDateComponentsFormatterUnitsStyle = 2; -pub const NSDateComponentsFormatterUnitsStyleFull: NSDateComponentsFormatterUnitsStyle = 3; -pub const NSDateComponentsFormatterUnitsStyleSpellOut: NSDateComponentsFormatterUnitsStyle = 4; -pub const NSDateComponentsFormatterUnitsStyleBrief: NSDateComponentsFormatterUnitsStyle = 5; - -pub type NSDateComponentsFormatterZeroFormattingBehavior = NSUInteger; -pub const NSDateComponentsFormatterZeroFormattingBehaviorNone: - NSDateComponentsFormatterZeroFormattingBehavior = 0; -pub const NSDateComponentsFormatterZeroFormattingBehaviorDefault: - NSDateComponentsFormatterZeroFormattingBehavior = 1 << 0; -pub const NSDateComponentsFormatterZeroFormattingBehaviorDropLeading: - NSDateComponentsFormatterZeroFormattingBehavior = 1 << 1; -pub const NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle: - NSDateComponentsFormatterZeroFormattingBehavior = 1 << 2; -pub const NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing: - NSDateComponentsFormatterZeroFormattingBehavior = 1 << 3; -pub const NSDateComponentsFormatterZeroFormattingBehaviorDropAll: - NSDateComponentsFormatterZeroFormattingBehavior = - NSDateComponentsFormatterZeroFormattingBehaviorDropLeading - | NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle - | NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing; -pub const NSDateComponentsFormatterZeroFormattingBehaviorPad: - NSDateComponentsFormatterZeroFormattingBehavior = 1 << 16; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSDateComponentsFormatterUnitsStyle { + NSDateComponentsFormatterUnitsStylePositional = 0, + NSDateComponentsFormatterUnitsStyleAbbreviated = 1, + NSDateComponentsFormatterUnitsStyleShort = 2, + NSDateComponentsFormatterUnitsStyleFull = 3, + NSDateComponentsFormatterUnitsStyleSpellOut = 4, + NSDateComponentsFormatterUnitsStyleBrief = 5, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDateComponentsFormatterZeroFormattingBehavior { + NSDateComponentsFormatterZeroFormattingBehaviorNone = 0, + NSDateComponentsFormatterZeroFormattingBehaviorDefault = 1 << 0, + NSDateComponentsFormatterZeroFormattingBehaviorDropLeading = 1 << 1, + NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle = 1 << 2, + NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing = 1 << 3, + NSDateComponentsFormatterZeroFormattingBehaviorDropAll = + NSDateComponentsFormatterZeroFormattingBehaviorDropLeading + | NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle + | NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing, + NSDateComponentsFormatterZeroFormattingBehaviorPad = 1 << 16, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs index 76737216b..217070bbf 100644 --- a/crates/icrate/src/generated/Foundation/NSDateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateFormatter.rs @@ -3,17 +3,25 @@ use crate::common::*; use crate::Foundation::*; -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 type NSDateFormatterBehavior = NSUInteger; -pub const NSDateFormatterBehaviorDefault: NSDateFormatterBehavior = 0; -pub const NSDateFormatterBehavior10_0: NSDateFormatterBehavior = 1000; -pub const NSDateFormatterBehavior10_4: NSDateFormatterBehavior = 1040; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSDateFormatterStyle { + NSDateFormatterNoStyle = 0, + NSDateFormatterShortStyle = 1, + NSDateFormatterMediumStyle = 2, + NSDateFormatterLongStyle = 3, + NSDateFormatterFullStyle = 4, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSDateFormatterBehavior { + NSDateFormatterBehaviorDefault = 0, + NSDateFormatterBehavior10_0 = 1000, + NSDateFormatterBehavior10_4 = 1040, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs index 77ba236c0..8cd1f58f8 100644 --- a/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSDateIntervalFormatter.rs @@ -3,12 +3,16 @@ use crate::common::*; use crate::Foundation::*; -pub type NSDateIntervalFormatterStyle = NSUInteger; -pub const NSDateIntervalFormatterNoStyle: NSDateIntervalFormatterStyle = 0; -pub const NSDateIntervalFormatterShortStyle: NSDateIntervalFormatterStyle = 1; -pub const NSDateIntervalFormatterMediumStyle: NSDateIntervalFormatterStyle = 2; -pub const NSDateIntervalFormatterLongStyle: NSDateIntervalFormatterStyle = 3; -pub const NSDateIntervalFormatterFullStyle: NSDateIntervalFormatterStyle = 4; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSDateIntervalFormatterStyle { + NSDateIntervalFormatterNoStyle = 0, + NSDateIntervalFormatterShortStyle = 1, + NSDateIntervalFormatterMediumStyle = 2, + NSDateIntervalFormatterLongStyle = 3, + NSDateIntervalFormatterFullStyle = 4, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs index e005f7e1a..b3df4a76d 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimal.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -3,15 +3,23 @@ use crate::common::*; use crate::Foundation::*; -pub type NSRoundingMode = NSUInteger; -pub const NSRoundPlain: NSRoundingMode = 0; -pub const NSRoundDown: NSRoundingMode = 1; -pub const NSRoundUp: NSRoundingMode = 2; -pub const NSRoundBankers: NSRoundingMode = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSRoundingMode { + NSRoundPlain = 0, + NSRoundDown = 1, + NSRoundUp = 2, + NSRoundBankers = 3, + } +); -pub type NSCalculationError = NSUInteger; -pub const NSCalculationNoError: NSCalculationError = 0; -pub const NSCalculationLossOfPrecision: NSCalculationError = 1; -pub const NSCalculationUnderflow: NSCalculationError = 2; -pub const NSCalculationOverflow: NSCalculationError = 3; -pub const NSCalculationDivideByZero: NSCalculationError = 4; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSCalculationError { + NSCalculationNoError = 0, + NSCalculationLossOfPrecision = 1, + NSCalculationUnderflow = 2, + NSCalculationOverflow = 3, + NSCalculationDivideByZero = 4, + } +); diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index 05c206199..e0f685e3e 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -3,21 +3,13 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSDecimalNumberExactnessException: &'static NSExceptionName; -} +extern_static!(NSDecimalNumberExactnessException: &'static NSExceptionName); -extern "C" { - pub static NSDecimalNumberOverflowException: &'static NSExceptionName; -} +extern_static!(NSDecimalNumberOverflowException: &'static NSExceptionName); -extern "C" { - pub static NSDecimalNumberUnderflowException: &'static NSExceptionName; -} +extern_static!(NSDecimalNumberUnderflowException: &'static NSExceptionName); -extern "C" { - pub static NSDecimalNumberDivideByZeroException: &'static NSExceptionName; -} +extern_static!(NSDecimalNumberDivideByZeroException: &'static NSExceptionName); pub type NSDecimalNumberBehaviors = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs index 755c173b2..6ac467d6b 100644 --- a/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs +++ b/crates/icrate/src/generated/Foundation/NSDistributedNotificationCenter.rs @@ -5,25 +5,35 @@ use crate::Foundation::*; pub type NSDistributedNotificationCenterType = NSString; -extern "C" { - pub static NSLocalNotificationCenterType: &'static NSDistributedNotificationCenterType; -} - -pub type NSNotificationSuspensionBehavior = NSUInteger; -pub const NSNotificationSuspensionBehaviorDrop: NSNotificationSuspensionBehavior = 1; -pub const NSNotificationSuspensionBehaviorCoalesce: NSNotificationSuspensionBehavior = 2; -pub const NSNotificationSuspensionBehaviorHold: NSNotificationSuspensionBehavior = 3; -pub const NSNotificationSuspensionBehaviorDeliverImmediately: NSNotificationSuspensionBehavior = 4; +extern_static!(NSLocalNotificationCenterType: &'static NSDistributedNotificationCenterType); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSNotificationSuspensionBehavior { + NSNotificationSuspensionBehaviorDrop = 1, + NSNotificationSuspensionBehaviorCoalesce = 2, + NSNotificationSuspensionBehaviorHold = 3, + NSNotificationSuspensionBehaviorDeliverImmediately = 4, + } +); -pub type NSDistributedNotificationOptions = NSUInteger; -pub const NSDistributedNotificationDeliverImmediately: NSDistributedNotificationOptions = 1 << 0; -pub const NSDistributedNotificationPostToAllSessions: NSDistributedNotificationOptions = 1 << 1; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDistributedNotificationOptions { + NSDistributedNotificationDeliverImmediately = 1 << 0, + NSDistributedNotificationPostToAllSessions = 1 << 1, + } +); -pub static NSNotificationDeliverImmediately: NSDistributedNotificationOptions = - NSDistributedNotificationDeliverImmediately; +extern_static!( + NSNotificationDeliverImmediately: NSDistributedNotificationOptions = + NSDistributedNotificationDeliverImmediately +); -pub static NSNotificationPostToAllSessions: NSDistributedNotificationOptions = - NSDistributedNotificationPostToAllSessions; +extern_static!( + NSNotificationPostToAllSessions: NSDistributedNotificationOptions = + NSDistributedNotificationPostToAllSessions +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs index 373519117..35d49affc 100644 --- a/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSEnergyFormatter.rs @@ -3,11 +3,15 @@ use crate::common::*; use crate::Foundation::*; -pub type NSEnergyFormatterUnit = NSInteger; -pub const NSEnergyFormatterUnitJoule: NSEnergyFormatterUnit = 11; -pub const NSEnergyFormatterUnitKilojoule: NSEnergyFormatterUnit = 14; -pub const NSEnergyFormatterUnitCalorie: NSEnergyFormatterUnit = (7 << 8) + 1; -pub const NSEnergyFormatterUnitKilocalorie: NSEnergyFormatterUnit = (7 << 8) + 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSEnergyFormatterUnit { + NSEnergyFormatterUnitJoule = 11, + NSEnergyFormatterUnitKilojoule = 14, + NSEnergyFormatterUnitCalorie = (7 << 8) + 1, + NSEnergyFormatterUnitKilocalorie = (7 << 8) + 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index 536714542..acb302090 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -3,7 +3,7 @@ use crate::common::*; use crate::Foundation::*; -struct_impl!( +extern_struct!( pub struct NSFastEnumerationState { pub state: c_ulong, pub itemsPtr: *mut *mut Object, diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index 490472346..b821f1d60 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -5,75 +5,41 @@ use crate::Foundation::*; pub type NSErrorDomain = NSString; -extern "C" { - pub static NSCocoaErrorDomain: &'static NSErrorDomain; -} +extern_static!(NSCocoaErrorDomain: &'static NSErrorDomain); -extern "C" { - pub static NSPOSIXErrorDomain: &'static NSErrorDomain; -} +extern_static!(NSPOSIXErrorDomain: &'static NSErrorDomain); -extern "C" { - pub static NSOSStatusErrorDomain: &'static NSErrorDomain; -} +extern_static!(NSOSStatusErrorDomain: &'static NSErrorDomain); -extern "C" { - pub static NSMachErrorDomain: &'static NSErrorDomain; -} +extern_static!(NSMachErrorDomain: &'static NSErrorDomain); pub type NSErrorUserInfoKey = NSString; -extern "C" { - pub static NSUnderlyingErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSUnderlyingErrorKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSMultipleUnderlyingErrorsKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSMultipleUnderlyingErrorsKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSLocalizedDescriptionKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSLocalizedDescriptionKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSLocalizedFailureReasonErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSLocalizedFailureReasonErrorKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSLocalizedRecoverySuggestionErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSLocalizedRecoverySuggestionErrorKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSLocalizedRecoveryOptionsErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSLocalizedRecoveryOptionsErrorKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSRecoveryAttempterErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSRecoveryAttempterErrorKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSHelpAnchorErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSHelpAnchorErrorKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSDebugDescriptionErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSDebugDescriptionErrorKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSLocalizedFailureErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSLocalizedFailureErrorKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSStringEncodingErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSStringEncodingErrorKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSURLErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSURLErrorKey: &'static NSErrorUserInfoKey); -extern "C" { - pub static NSFilePathErrorKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSFilePathErrorKey: &'static NSErrorUserInfoKey); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index 250dffa5f..e41ed226c 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -3,65 +3,35 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSGenericException: &'static NSExceptionName; -} +extern_static!(NSGenericException: &'static NSExceptionName); -extern "C" { - pub static NSRangeException: &'static NSExceptionName; -} +extern_static!(NSRangeException: &'static NSExceptionName); -extern "C" { - pub static NSInvalidArgumentException: &'static NSExceptionName; -} +extern_static!(NSInvalidArgumentException: &'static NSExceptionName); -extern "C" { - pub static NSInternalInconsistencyException: &'static NSExceptionName; -} +extern_static!(NSInternalInconsistencyException: &'static NSExceptionName); -extern "C" { - pub static NSMallocException: &'static NSExceptionName; -} +extern_static!(NSMallocException: &'static NSExceptionName); -extern "C" { - pub static NSObjectInaccessibleException: &'static NSExceptionName; -} +extern_static!(NSObjectInaccessibleException: &'static NSExceptionName); -extern "C" { - pub static NSObjectNotAvailableException: &'static NSExceptionName; -} +extern_static!(NSObjectNotAvailableException: &'static NSExceptionName); -extern "C" { - pub static NSDestinationInvalidException: &'static NSExceptionName; -} +extern_static!(NSDestinationInvalidException: &'static NSExceptionName); -extern "C" { - pub static NSPortTimeoutException: &'static NSExceptionName; -} +extern_static!(NSPortTimeoutException: &'static NSExceptionName); -extern "C" { - pub static NSInvalidSendPortException: &'static NSExceptionName; -} +extern_static!(NSInvalidSendPortException: &'static NSExceptionName); -extern "C" { - pub static NSInvalidReceivePortException: &'static NSExceptionName; -} +extern_static!(NSInvalidReceivePortException: &'static NSExceptionName); -extern "C" { - pub static NSPortSendException: &'static NSExceptionName; -} +extern_static!(NSPortSendException: &'static NSExceptionName); -extern "C" { - pub static NSPortReceiveException: &'static NSExceptionName; -} +extern_static!(NSPortReceiveException: &'static NSExceptionName); -extern "C" { - pub static NSOldStyleException: &'static NSExceptionName; -} +extern_static!(NSOldStyleException: &'static NSExceptionName); -extern "C" { - pub static NSInconsistentArchiveException: &'static NSExceptionName; -} +extern_static!(NSInconsistentArchiveException: &'static NSExceptionName); extern_class!( #[derive(Debug)] @@ -116,9 +86,7 @@ extern_methods!( pub type NSUncaughtExceptionHandler = TodoFunction; -extern "C" { - pub static NSAssertionHandlerKey: &'static NSString; -} +extern_static!(NSAssertionHandlerKey: &'static NSString); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index 47f54d148..fdad3ece1 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -3,20 +3,24 @@ use crate::common::*; use crate::Foundation::*; -pub type NSExpressionType = NSUInteger; -pub const NSConstantValueExpressionType: NSExpressionType = 0; -pub const NSEvaluatedObjectExpressionType: NSExpressionType = 1; -pub const NSVariableExpressionType: NSExpressionType = 2; -pub const NSKeyPathExpressionType: NSExpressionType = 3; -pub const NSFunctionExpressionType: NSExpressionType = 4; -pub const NSUnionSetExpressionType: NSExpressionType = 5; -pub const NSIntersectSetExpressionType: NSExpressionType = 6; -pub const NSMinusSetExpressionType: NSExpressionType = 7; -pub const NSSubqueryExpressionType: NSExpressionType = 13; -pub const NSAggregateExpressionType: NSExpressionType = 14; -pub const NSAnyKeyExpressionType: NSExpressionType = 15; -pub const NSBlockExpressionType: NSExpressionType = 19; -pub const NSConditionalExpressionType: NSExpressionType = 20; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSExpressionType { + NSConstantValueExpressionType = 0, + NSEvaluatedObjectExpressionType = 1, + NSVariableExpressionType = 2, + NSKeyPathExpressionType = 3, + NSFunctionExpressionType = 4, + NSUnionSetExpressionType = 5, + NSIntersectSetExpressionType = 6, + NSMinusSetExpressionType = 7, + NSSubqueryExpressionType = 13, + NSAggregateExpressionType = 14, + NSAnyKeyExpressionType = 15, + NSBlockExpressionType = 19, + NSConditionalExpressionType = 20, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index 678d69562..37423038d 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -32,22 +32,12 @@ extern_methods!( } ); -extern "C" { - pub static NSExtensionItemsAndErrorsKey: Option<&'static NSString>; -} +extern_static!(NSExtensionItemsAndErrorsKey: Option<&'static NSString>); -extern "C" { - pub static NSExtensionHostWillEnterForegroundNotification: Option<&'static NSString>; -} +extern_static!(NSExtensionHostWillEnterForegroundNotification: Option<&'static NSString>); -extern "C" { - pub static NSExtensionHostDidEnterBackgroundNotification: Option<&'static NSString>; -} +extern_static!(NSExtensionHostDidEnterBackgroundNotification: Option<&'static NSString>); -extern "C" { - pub static NSExtensionHostWillResignActiveNotification: Option<&'static NSString>; -} +extern_static!(NSExtensionHostWillResignActiveNotification: Option<&'static NSString>); -extern "C" { - pub static NSExtensionHostDidBecomeActiveNotification: Option<&'static NSString>; -} +extern_static!(NSExtensionHostDidBecomeActiveNotification: Option<&'static NSString>); diff --git a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs index 8341dcd16..820cbac22 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionItem.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionItem.rs @@ -43,14 +43,8 @@ extern_methods!( } ); -extern "C" { - pub static NSExtensionItemAttributedTitleKey: Option<&'static NSString>; -} +extern_static!(NSExtensionItemAttributedTitleKey: Option<&'static NSString>); -extern "C" { - pub static NSExtensionItemAttributedContentTextKey: Option<&'static NSString>; -} +extern_static!(NSExtensionItemAttributedContentTextKey: Option<&'static NSString>); -extern "C" { - pub static NSExtensionItemAttachmentsKey: Option<&'static NSString>; -} +extern_static!(NSExtensionItemAttachmentsKey: Option<&'static NSString>); diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index 241b22c75..f45310fb5 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -3,20 +3,26 @@ use crate::common::*; use crate::Foundation::*; -pub type NSFileCoordinatorReadingOptions = NSUInteger; -pub const NSFileCoordinatorReadingWithoutChanges: NSFileCoordinatorReadingOptions = 1 << 0; -pub const NSFileCoordinatorReadingResolvesSymbolicLink: NSFileCoordinatorReadingOptions = 1 << 1; -pub const NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly: - NSFileCoordinatorReadingOptions = 1 << 2; -pub const NSFileCoordinatorReadingForUploading: NSFileCoordinatorReadingOptions = 1 << 3; - -pub type NSFileCoordinatorWritingOptions = NSUInteger; -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 = - 1 << 4; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileCoordinatorReadingOptions { + NSFileCoordinatorReadingWithoutChanges = 1 << 0, + NSFileCoordinatorReadingResolvesSymbolicLink = 1 << 1, + NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly = 1 << 2, + NSFileCoordinatorReadingForUploading = 1 << 3, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileCoordinatorWritingOptions { + NSFileCoordinatorWritingForDeleting = 1 << 0, + NSFileCoordinatorWritingForMoving = 1 << 1, + NSFileCoordinatorWritingForMerging = 1 << 2, + NSFileCoordinatorWritingForReplacing = 1 << 3, + NSFileCoordinatorWritingContentIndependentMetadataOnly = 1 << 4, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index df1bcc703..97043e7f7 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -117,37 +117,21 @@ extern_methods!( } ); -extern "C" { - pub static NSFileHandleOperationException: &'static NSExceptionName; -} +extern_static!(NSFileHandleOperationException: &'static NSExceptionName); -extern "C" { - pub static NSFileHandleReadCompletionNotification: &'static NSNotificationName; -} +extern_static!(NSFileHandleReadCompletionNotification: &'static NSNotificationName); -extern "C" { - pub static NSFileHandleReadToEndOfFileCompletionNotification: &'static NSNotificationName; -} +extern_static!(NSFileHandleReadToEndOfFileCompletionNotification: &'static NSNotificationName); -extern "C" { - pub static NSFileHandleConnectionAcceptedNotification: &'static NSNotificationName; -} +extern_static!(NSFileHandleConnectionAcceptedNotification: &'static NSNotificationName); -extern "C" { - pub static NSFileHandleDataAvailableNotification: &'static NSNotificationName; -} +extern_static!(NSFileHandleDataAvailableNotification: &'static NSNotificationName); -extern "C" { - pub static NSFileHandleNotificationDataItem: &'static NSString; -} +extern_static!(NSFileHandleNotificationDataItem: &'static NSString); -extern "C" { - pub static NSFileHandleNotificationFileHandleItem: &'static NSString; -} +extern_static!(NSFileHandleNotificationFileHandleItem: &'static NSString); -extern "C" { - pub static NSFileHandleNotificationMonitorModes: &'static NSString; -} +extern_static!(NSFileHandleNotificationMonitorModes: &'static NSString); extern_methods!( /// NSFileHandleAsynchronousAccess diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index bd789b7da..459dcb1ee 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -11,41 +11,53 @@ pub type NSFileProtectionType = NSString; pub type NSFileProviderServiceName = NSString; -pub type NSVolumeEnumerationOptions = NSUInteger; -pub const NSVolumeEnumerationSkipHiddenVolumes: NSVolumeEnumerationOptions = 1 << 1; -pub const NSVolumeEnumerationProduceFileReferenceURLs: NSVolumeEnumerationOptions = 1 << 2; - -pub type NSDirectoryEnumerationOptions = NSUInteger; -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 << 0; -pub const NSFileManagerItemReplacementWithoutDeletingBackupItem: - NSFileManagerItemReplacementOptions = 1 << 1; - -pub type NSURLRelationship = NSInteger; -pub const NSURLRelationshipContains: NSURLRelationship = 0; -pub const NSURLRelationshipSame: NSURLRelationship = 1; -pub const NSURLRelationshipOther: NSURLRelationship = 2; - -pub type NSFileManagerUnmountOptions = NSUInteger; -pub const NSFileManagerUnmountAllPartitionsAndEjectDisk: NSFileManagerUnmountOptions = 1 << 0; -pub const NSFileManagerUnmountWithoutUI: NSFileManagerUnmountOptions = 1 << 1; - -extern "C" { - pub static NSFileManagerUnmountDissentingProcessIdentifierErrorKey: &'static NSString; -} - -extern "C" { - pub static NSUbiquityIdentityDidChangeNotification: &'static NSNotificationName; -} +ns_options!( + #[underlying(NSUInteger)] + pub enum NSVolumeEnumerationOptions { + NSVolumeEnumerationSkipHiddenVolumes = 1 << 1, + NSVolumeEnumerationProduceFileReferenceURLs = 1 << 2, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSDirectoryEnumerationOptions { + NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1 << 0, + NSDirectoryEnumerationSkipsPackageDescendants = 1 << 1, + NSDirectoryEnumerationSkipsHiddenFiles = 1 << 2, + NSDirectoryEnumerationIncludesDirectoriesPostOrder = 1 << 3, + NSDirectoryEnumerationProducesRelativePathURLs = 1 << 4, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileManagerItemReplacementOptions { + NSFileManagerItemReplacementUsingNewMetadataOnly = 1 << 0, + NSFileManagerItemReplacementWithoutDeletingBackupItem = 1 << 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLRelationship { + NSURLRelationshipContains = 0, + NSURLRelationshipSame = 1, + NSURLRelationshipOther = 2, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileManagerUnmountOptions { + NSFileManagerUnmountAllPartitionsAndEjectDisk = 1 << 0, + NSFileManagerUnmountWithoutUI = 1 << 1, + } +); + +extern_static!(NSFileManagerUnmountDissentingProcessIdentifierErrorKey: &'static NSString); + +extern_static!(NSUbiquityIdentityDidChangeNotification: &'static NSNotificationName); extern_class!( #[derive(Debug)] @@ -566,145 +578,75 @@ extern_methods!( } ); -extern "C" { - pub static NSFileType: &'static NSFileAttributeKey; -} +extern_static!(NSFileType: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileTypeDirectory: &'static NSFileAttributeType; -} +extern_static!(NSFileTypeDirectory: &'static NSFileAttributeType); -extern "C" { - pub static NSFileTypeRegular: &'static NSFileAttributeType; -} +extern_static!(NSFileTypeRegular: &'static NSFileAttributeType); -extern "C" { - pub static NSFileTypeSymbolicLink: &'static NSFileAttributeType; -} +extern_static!(NSFileTypeSymbolicLink: &'static NSFileAttributeType); -extern "C" { - pub static NSFileTypeSocket: &'static NSFileAttributeType; -} +extern_static!(NSFileTypeSocket: &'static NSFileAttributeType); -extern "C" { - pub static NSFileTypeCharacterSpecial: &'static NSFileAttributeType; -} +extern_static!(NSFileTypeCharacterSpecial: &'static NSFileAttributeType); -extern "C" { - pub static NSFileTypeBlockSpecial: &'static NSFileAttributeType; -} +extern_static!(NSFileTypeBlockSpecial: &'static NSFileAttributeType); -extern "C" { - pub static NSFileTypeUnknown: &'static NSFileAttributeType; -} +extern_static!(NSFileTypeUnknown: &'static NSFileAttributeType); -extern "C" { - pub static NSFileSize: &'static NSFileAttributeKey; -} +extern_static!(NSFileSize: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileModificationDate: &'static NSFileAttributeKey; -} +extern_static!(NSFileModificationDate: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileReferenceCount: &'static NSFileAttributeKey; -} +extern_static!(NSFileReferenceCount: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileDeviceIdentifier: &'static NSFileAttributeKey; -} +extern_static!(NSFileDeviceIdentifier: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileOwnerAccountName: &'static NSFileAttributeKey; -} +extern_static!(NSFileOwnerAccountName: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileGroupOwnerAccountName: &'static NSFileAttributeKey; -} +extern_static!(NSFileGroupOwnerAccountName: &'static NSFileAttributeKey); -extern "C" { - pub static NSFilePosixPermissions: &'static NSFileAttributeKey; -} +extern_static!(NSFilePosixPermissions: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileSystemNumber: &'static NSFileAttributeKey; -} +extern_static!(NSFileSystemNumber: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileSystemFileNumber: &'static NSFileAttributeKey; -} +extern_static!(NSFileSystemFileNumber: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileExtensionHidden: &'static NSFileAttributeKey; -} +extern_static!(NSFileExtensionHidden: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileHFSCreatorCode: &'static NSFileAttributeKey; -} +extern_static!(NSFileHFSCreatorCode: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileHFSTypeCode: &'static NSFileAttributeKey; -} +extern_static!(NSFileHFSTypeCode: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileImmutable: &'static NSFileAttributeKey; -} +extern_static!(NSFileImmutable: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileAppendOnly: &'static NSFileAttributeKey; -} +extern_static!(NSFileAppendOnly: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileCreationDate: &'static NSFileAttributeKey; -} +extern_static!(NSFileCreationDate: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileOwnerAccountID: &'static NSFileAttributeKey; -} +extern_static!(NSFileOwnerAccountID: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileGroupOwnerAccountID: &'static NSFileAttributeKey; -} +extern_static!(NSFileGroupOwnerAccountID: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileBusy: &'static NSFileAttributeKey; -} +extern_static!(NSFileBusy: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileProtectionKey: &'static NSFileAttributeKey; -} +extern_static!(NSFileProtectionKey: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileProtectionNone: &'static NSFileProtectionType; -} +extern_static!(NSFileProtectionNone: &'static NSFileProtectionType); -extern "C" { - pub static NSFileProtectionComplete: &'static NSFileProtectionType; -} +extern_static!(NSFileProtectionComplete: &'static NSFileProtectionType); -extern "C" { - pub static NSFileProtectionCompleteUnlessOpen: &'static NSFileProtectionType; -} +extern_static!(NSFileProtectionCompleteUnlessOpen: &'static NSFileProtectionType); -extern "C" { - pub static NSFileProtectionCompleteUntilFirstUserAuthentication: &'static NSFileProtectionType; -} +extern_static!(NSFileProtectionCompleteUntilFirstUserAuthentication: &'static NSFileProtectionType); -extern "C" { - pub static NSFileSystemSize: &'static NSFileAttributeKey; -} +extern_static!(NSFileSystemSize: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileSystemFreeSize: &'static NSFileAttributeKey; -} +extern_static!(NSFileSystemFreeSize: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileSystemNodes: &'static NSFileAttributeKey; -} +extern_static!(NSFileSystemNodes: &'static NSFileAttributeKey); -extern "C" { - pub static NSFileSystemFreeNodes: &'static NSFileAttributeKey; -} +extern_static!(NSFileSystemFreeNodes: &'static NSFileAttributeKey); extern_methods!( /// NSFileAttributes diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index 073da91c1..a124c989e 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -3,11 +3,19 @@ use crate::common::*; use crate::Foundation::*; -pub type NSFileVersionAddingOptions = NSUInteger; -pub const NSFileVersionAddingByMoving: NSFileVersionAddingOptions = 1 << 0; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileVersionAddingOptions { + NSFileVersionAddingByMoving = 1 << 0, + } +); -pub type NSFileVersionReplacingOptions = NSUInteger; -pub const NSFileVersionReplacingByMoving: NSFileVersionReplacingOptions = 1 << 0; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileVersionReplacingOptions { + NSFileVersionReplacingByMoving = 1 << 0, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs index 45c99537b..a1a76ed2b 100644 --- a/crates/icrate/src/generated/Foundation/NSFileWrapper.rs +++ b/crates/icrate/src/generated/Foundation/NSFileWrapper.rs @@ -3,13 +3,21 @@ use crate::common::*; use crate::Foundation::*; -pub type NSFileWrapperReadingOptions = NSUInteger; -pub const NSFileWrapperReadingImmediate: NSFileWrapperReadingOptions = 1 << 0; -pub const NSFileWrapperReadingWithoutMapping: NSFileWrapperReadingOptions = 1 << 1; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileWrapperReadingOptions { + NSFileWrapperReadingImmediate = 1 << 0, + NSFileWrapperReadingWithoutMapping = 1 << 1, + } +); -pub type NSFileWrapperWritingOptions = NSUInteger; -pub const NSFileWrapperWritingAtomic: NSFileWrapperWritingOptions = 1 << 0; -pub const NSFileWrapperWritingWithNameUpdating: NSFileWrapperWritingOptions = 1 << 1; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSFileWrapperWritingOptions { + NSFileWrapperWritingAtomic = 1 << 0, + NSFileWrapperWritingWithNameUpdating = 1 << 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSFormatter.rs b/crates/icrate/src/generated/Foundation/NSFormatter.rs index 12c399f31..389d9ee64 100644 --- a/crates/icrate/src/generated/Foundation/NSFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSFormatter.rs @@ -3,18 +3,26 @@ use crate::common::*; use crate::Foundation::*; -pub type NSFormattingContext = NSInteger; -pub const NSFormattingContextUnknown: NSFormattingContext = 0; -pub const NSFormattingContextDynamic: NSFormattingContext = 1; -pub const NSFormattingContextStandalone: NSFormattingContext = 2; -pub const NSFormattingContextListItem: NSFormattingContext = 3; -pub const NSFormattingContextBeginningOfSentence: NSFormattingContext = 4; -pub const NSFormattingContextMiddleOfSentence: NSFormattingContext = 5; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSFormattingContext { + NSFormattingContextUnknown = 0, + NSFormattingContextDynamic = 1, + NSFormattingContextStandalone = 2, + NSFormattingContextListItem = 3, + NSFormattingContextBeginningOfSentence = 4, + NSFormattingContextMiddleOfSentence = 5, + } +); -pub type NSFormattingUnitStyle = NSInteger; -pub const NSFormattingUnitStyleShort: NSFormattingUnitStyle = 1; -pub const NSFormattingUnitStyleMedium: NSFormattingUnitStyle = 2; -pub const NSFormattingUnitStyleLong: NSFormattingUnitStyle = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSFormattingUnitStyle { + NSFormattingUnitStyleShort = 1, + NSFormattingUnitStyleMedium = 2, + NSFormattingUnitStyleLong = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 09eb8ceb3..5063ce905 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -21,17 +21,21 @@ pub type NSRectPointer = *mut NSRect; pub type NSRectArray = *mut NSRect; -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; - -struct_impl!( +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSRectEdge { + NSRectEdgeMinX = 0, + NSRectEdgeMinY = 1, + NSRectEdgeMaxX = 2, + NSRectEdgeMaxY = 3, + NSMinXEdge = 0, + NSMinYEdge = 1, + NSMaxXEdge = 2, + NSMaxYEdge = 3, + } +); + +extern_struct!( pub struct NSEdgeInsets { pub top: CGFloat, pub left: CGFloat, @@ -40,48 +44,44 @@ struct_impl!( } ); -pub type NSAlignmentOptions = c_ulonglong; -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 "C" { - pub static NSZeroPoint: NSPoint; -} - -extern "C" { - pub static NSZeroSize: NSSize; -} - -extern "C" { - pub static NSZeroRect: NSRect; -} - -extern "C" { - pub static NSEdgeInsetsZero: NSEdgeInsets; -} +ns_options!( + #[underlying(c_ulonglong)] + pub enum NSAlignmentOptions { + NSAlignMinXInward = 1 << 0, + NSAlignMinYInward = 1 << 1, + NSAlignMaxXInward = 1 << 2, + NSAlignMaxYInward = 1 << 3, + NSAlignWidthInward = 1 << 4, + NSAlignHeightInward = 1 << 5, + NSAlignMinXOutward = 1 << 8, + NSAlignMinYOutward = 1 << 9, + NSAlignMaxXOutward = 1 << 10, + NSAlignMaxYOutward = 1 << 11, + NSAlignWidthOutward = 1 << 12, + NSAlignHeightOutward = 1 << 13, + NSAlignMinXNearest = 1 << 16, + NSAlignMinYNearest = 1 << 17, + NSAlignMaxXNearest = 1 << 18, + NSAlignMaxYNearest = 1 << 19, + NSAlignWidthNearest = 1 << 20, + NSAlignHeightNearest = 1 << 21, + NSAlignRectFlipped = 1 << 63, + NSAlignAllEdgesInward = + NSAlignMinXInward | NSAlignMaxXInward | NSAlignMinYInward | NSAlignMaxYInward, + NSAlignAllEdgesOutward = + NSAlignMinXOutward | NSAlignMaxXOutward | NSAlignMinYOutward | NSAlignMaxYOutward, + NSAlignAllEdgesNearest = + NSAlignMinXNearest | NSAlignMaxXNearest | NSAlignMinYNearest | NSAlignMaxYNearest, + } +); + +extern_static!(NSZeroPoint: NSPoint); + +extern_static!(NSZeroSize: NSSize); + +extern_static!(NSZeroRect: NSRect); + +extern_static!(NSEdgeInsetsZero: NSEdgeInsets); extern_methods!( /// NSValueGeometryExtensions diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs index a377feba2..355509633 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookie.rs @@ -7,69 +7,37 @@ pub type NSHTTPCookiePropertyKey = NSString; pub type NSHTTPCookieStringPolicy = NSString; -extern "C" { - pub static NSHTTPCookieName: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieName: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieValue: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieValue: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieOriginURL: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieOriginURL: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieVersion: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieVersion: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieDomain: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieDomain: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookiePath: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookiePath: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieSecure: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieSecure: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieExpires: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieExpires: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieComment: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieComment: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieCommentURL: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieCommentURL: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieDiscard: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieDiscard: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieMaximumAge: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieMaximumAge: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookiePort: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookiePort: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieSameSitePolicy: &'static NSHTTPCookiePropertyKey; -} +extern_static!(NSHTTPCookieSameSitePolicy: &'static NSHTTPCookiePropertyKey); -extern "C" { - pub static NSHTTPCookieSameSiteLax: &'static NSHTTPCookieStringPolicy; -} +extern_static!(NSHTTPCookieSameSiteLax: &'static NSHTTPCookieStringPolicy); -extern "C" { - pub static NSHTTPCookieSameSiteStrict: &'static NSHTTPCookieStringPolicy; -} +extern_static!(NSHTTPCookieSameSiteStrict: &'static NSHTTPCookieStringPolicy); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index fe624b64e..ffbbae168 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -3,10 +3,14 @@ use crate::common::*; use crate::Foundation::*; -pub type NSHTTPCookieAcceptPolicy = NSUInteger; -pub const NSHTTPCookieAcceptPolicyAlways: NSHTTPCookieAcceptPolicy = 0; -pub const NSHTTPCookieAcceptPolicyNever: NSHTTPCookieAcceptPolicy = 1; -pub const NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain: NSHTTPCookieAcceptPolicy = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSHTTPCookieAcceptPolicy { + NSHTTPCookieAcceptPolicyAlways = 0, + NSHTTPCookieAcceptPolicyNever = 1, + NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2, + } +); extern_class!( #[derive(Debug)] @@ -86,10 +90,6 @@ extern_methods!( } ); -extern "C" { - pub static NSHTTPCookieManagerAcceptPolicyChangedNotification: &'static NSNotificationName; -} +extern_static!(NSHTTPCookieManagerAcceptPolicyChangedNotification: &'static NSNotificationName); -extern "C" { - pub static NSHTTPCookieManagerCookiesChangedNotification: &'static NSNotificationName; -} +extern_static!(NSHTTPCookieManagerCookiesChangedNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 23e658613..1222b7d7e 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -3,17 +3,20 @@ use crate::common::*; use crate::Foundation::*; -pub static NSHashTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory; +extern_static!(NSHashTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory); -pub static NSHashTableZeroingWeakMemory: NSPointerFunctionsOptions = - NSPointerFunctionsZeroingWeakMemory; +extern_static!( + NSHashTableZeroingWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsZeroingWeakMemory +); -pub static NSHashTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn; +extern_static!(NSHashTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn); -pub static NSHashTableObjectPointerPersonality: NSPointerFunctionsOptions = - NSPointerFunctionsObjectPointerPersonality; +extern_static!( + NSHashTableObjectPointerPersonality: NSPointerFunctionsOptions = + NSPointerFunctionsObjectPointerPersonality +); -pub static NSHashTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory; +extern_static!(NSHashTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory); pub type NSHashTableOptions = NSUInteger; @@ -108,7 +111,7 @@ extern_methods!( } ); -struct_impl!( +extern_struct!( pub struct NSHashEnumerator { _pi: NSUInteger, _si: NSUInteger, @@ -116,7 +119,7 @@ struct_impl!( } ); -struct_impl!( +extern_struct!( pub struct NSHashTableCallBacks { pub hash: *mut TodoFunction, pub isEqual: *mut TodoFunction, @@ -126,34 +129,18 @@ struct_impl!( } ); -extern "C" { - pub static NSIntegerHashCallBacks: NSHashTableCallBacks; -} +extern_static!(NSIntegerHashCallBacks: NSHashTableCallBacks); -extern "C" { - pub static NSNonOwnedPointerHashCallBacks: NSHashTableCallBacks; -} +extern_static!(NSNonOwnedPointerHashCallBacks: NSHashTableCallBacks); -extern "C" { - pub static NSNonRetainedObjectHashCallBacks: NSHashTableCallBacks; -} +extern_static!(NSNonRetainedObjectHashCallBacks: NSHashTableCallBacks); -extern "C" { - pub static NSObjectHashCallBacks: NSHashTableCallBacks; -} +extern_static!(NSObjectHashCallBacks: NSHashTableCallBacks); -extern "C" { - pub static NSOwnedObjectIdentityHashCallBacks: NSHashTableCallBacks; -} +extern_static!(NSOwnedObjectIdentityHashCallBacks: NSHashTableCallBacks); -extern "C" { - pub static NSOwnedPointerHashCallBacks: NSHashTableCallBacks; -} +extern_static!(NSOwnedPointerHashCallBacks: NSHashTableCallBacks); -extern "C" { - pub static NSPointerToStructHashCallBacks: NSHashTableCallBacks; -} +extern_static!(NSPointerToStructHashCallBacks: NSHashTableCallBacks); -extern "C" { - pub static NSIntHashCallBacks: NSHashTableCallBacks; -} +extern_static!(NSIntHashCallBacks: NSHashTableCallBacks); diff --git a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs index 805893351..6eb915c79 100644 --- a/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSISO8601DateFormatter.rs @@ -3,21 +3,25 @@ use crate::common::*; use crate::Foundation::*; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSISO8601DateFormatOptions { + NSISO8601DateFormatWithYear = 1, + NSISO8601DateFormatWithMonth = 2, + NSISO8601DateFormatWithWeekOfYear = 4, + NSISO8601DateFormatWithDay = 16, + NSISO8601DateFormatWithTime = 32, + NSISO8601DateFormatWithTimeZone = 64, + NSISO8601DateFormatWithSpaceBetweenDateAndTime = 128, + NSISO8601DateFormatWithDashSeparatorInDate = 256, + NSISO8601DateFormatWithColonSeparatorInTime = 512, + NSISO8601DateFormatWithColonSeparatorInTimeZone = 1024, + NSISO8601DateFormatWithFractionalSeconds = 2048, + NSISO8601DateFormatWithFullDate = 275, + NSISO8601DateFormatWithFullTime = 1632, + NSISO8601DateFormatWithInternetDateTime = 1907, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 65d562966..c51ce597e 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -3,15 +3,22 @@ use crate::common::*; use crate::Foundation::*; -pub type NSItemProviderRepresentationVisibility = NSInteger; -pub const NSItemProviderRepresentationVisibilityAll: NSItemProviderRepresentationVisibility = 0; -pub const NSItemProviderRepresentationVisibilityTeam: NSItemProviderRepresentationVisibility = 1; -pub const NSItemProviderRepresentationVisibilityGroup: NSItemProviderRepresentationVisibility = 2; -pub const NSItemProviderRepresentationVisibilityOwnProcess: NSItemProviderRepresentationVisibility = - 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSItemProviderRepresentationVisibility { + NSItemProviderRepresentationVisibilityAll = 0, + NSItemProviderRepresentationVisibilityTeam = 1, + NSItemProviderRepresentationVisibilityGroup = 2, + NSItemProviderRepresentationVisibilityOwnProcess = 3, + } +); -pub type NSItemProviderFileOptions = NSInteger; -pub const NSItemProviderFileOptionOpenInPlace: NSItemProviderFileOptions = 1; +ns_options!( + #[underlying(NSInteger)] + pub enum NSItemProviderFileOptions { + NSItemProviderFileOptionOpenInPlace = 1, + } +); pub type NSItemProviderWriting = NSObject; @@ -141,9 +148,7 @@ extern_methods!( } ); -extern "C" { - pub static NSItemProviderPreferredImageSizeKey: &'static NSString; -} +extern_static!(NSItemProviderPreferredImageSizeKey: &'static NSString); extern_methods!( /// NSPreviewSupport @@ -163,20 +168,18 @@ extern_methods!( } ); -extern "C" { - pub static NSExtensionJavaScriptPreprocessingResultsKey: Option<&'static NSString>; -} +extern_static!(NSExtensionJavaScriptPreprocessingResultsKey: Option<&'static NSString>); -extern "C" { - pub static NSExtensionJavaScriptFinalizeArgumentKey: Option<&'static NSString>; -} +extern_static!(NSExtensionJavaScriptFinalizeArgumentKey: Option<&'static NSString>); -extern "C" { - pub static NSItemProviderErrorDomain: &'static NSString; -} +extern_static!(NSItemProviderErrorDomain: &'static NSString); -pub type NSItemProviderErrorCode = NSInteger; -pub const NSItemProviderUnknownError: NSItemProviderErrorCode = -1; -pub const NSItemProviderItemUnavailableError: NSItemProviderErrorCode = -1000; -pub const NSItemProviderUnexpectedValueClassError: NSItemProviderErrorCode = -1100; -pub const NSItemProviderUnavailableCoercionError: NSItemProviderErrorCode = -1200; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSItemProviderErrorCode { + NSItemProviderUnknownError = -1, + NSItemProviderItemUnavailableError = -1000, + NSItemProviderUnexpectedValueClassError = -1100, + NSItemProviderUnavailableCoercionError = -1200, + } +); diff --git a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs index 215262b52..a34f2d565 100644 --- a/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs +++ b/crates/icrate/src/generated/Foundation/NSJSONSerialization.rs @@ -3,19 +3,27 @@ use crate::common::*; use crate::Foundation::*; -pub type NSJSONReadingOptions = NSUInteger; -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 << 0; -pub const NSJSONWritingSortedKeys: NSJSONWritingOptions = 1 << 1; -pub const NSJSONWritingFragmentsAllowed: NSJSONWritingOptions = 1 << 2; -pub const NSJSONWritingWithoutEscapingSlashes: NSJSONWritingOptions = 1 << 3; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSJSONReadingOptions { + NSJSONReadingMutableContainers = 1 << 0, + NSJSONReadingMutableLeaves = 1 << 1, + NSJSONReadingFragmentsAllowed = 1 << 2, + NSJSONReadingJSON5Allowed = 1 << 3, + NSJSONReadingTopLevelDictionaryAssumed = 1 << 4, + NSJSONReadingAllowFragments = NSJSONReadingFragmentsAllowed, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSJSONWritingOptions { + NSJSONWritingPrettyPrinted = 1 << 0, + NSJSONWritingSortedKeys = 1 << 1, + NSJSONWritingFragmentsAllowed = 1 << 2, + NSJSONWritingWithoutEscapingSlashes = 1 << 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs index 5a4f0351d..9ce059959 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueCoding.rs @@ -3,55 +3,31 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSUndefinedKeyException: &'static NSExceptionName; -} +extern_static!(NSUndefinedKeyException: &'static NSExceptionName); pub type NSKeyValueOperator = NSString; -extern "C" { - pub static NSAverageKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSAverageKeyValueOperator: &'static NSKeyValueOperator); -extern "C" { - pub static NSCountKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSCountKeyValueOperator: &'static NSKeyValueOperator); -extern "C" { - pub static NSDistinctUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSDistinctUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator); -extern "C" { - pub static NSDistinctUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSDistinctUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator); -extern "C" { - pub static NSDistinctUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSDistinctUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator); -extern "C" { - pub static NSMaximumKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSMaximumKeyValueOperator: &'static NSKeyValueOperator); -extern "C" { - pub static NSMinimumKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSMinimumKeyValueOperator: &'static NSKeyValueOperator); -extern "C" { - pub static NSSumKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSSumKeyValueOperator: &'static NSKeyValueOperator); -extern "C" { - pub static NSUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSUnionOfArraysKeyValueOperator: &'static NSKeyValueOperator); -extern "C" { - pub static NSUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSUnionOfObjectsKeyValueOperator: &'static NSKeyValueOperator); -extern "C" { - pub static NSUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator; -} +extern_static!(NSUnionOfSetsKeyValueOperator: &'static NSKeyValueOperator); extern_methods!( /// NSKeyValueCoding diff --git a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs index 04842736c..5a2441bc4 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyValueObserving.rs @@ -3,45 +3,47 @@ use crate::common::*; use crate::Foundation::*; -pub type NSKeyValueObservingOptions = NSUInteger; -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; -pub const NSKeyValueChangeInsertion: NSKeyValueChange = 2; -pub const NSKeyValueChangeRemoval: NSKeyValueChange = 3; -pub const NSKeyValueChangeReplacement: NSKeyValueChange = 4; - -pub type NSKeyValueSetMutationKind = NSUInteger; -pub const NSKeyValueUnionSetMutation: NSKeyValueSetMutationKind = 1; -pub const NSKeyValueMinusSetMutation: NSKeyValueSetMutationKind = 2; -pub const NSKeyValueIntersectSetMutation: NSKeyValueSetMutationKind = 3; -pub const NSKeyValueSetSetMutation: NSKeyValueSetMutationKind = 4; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSKeyValueObservingOptions { + NSKeyValueObservingOptionNew = 0x01, + NSKeyValueObservingOptionOld = 0x02, + NSKeyValueObservingOptionInitial = 0x04, + NSKeyValueObservingOptionPrior = 0x08, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSKeyValueChange { + NSKeyValueChangeSetting = 1, + NSKeyValueChangeInsertion = 2, + NSKeyValueChangeRemoval = 3, + NSKeyValueChangeReplacement = 4, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSKeyValueSetMutationKind { + NSKeyValueUnionSetMutation = 1, + NSKeyValueMinusSetMutation = 2, + NSKeyValueIntersectSetMutation = 3, + NSKeyValueSetSetMutation = 4, + } +); pub type NSKeyValueChangeKey = NSString; -extern "C" { - pub static NSKeyValueChangeKindKey: &'static NSKeyValueChangeKey; -} +extern_static!(NSKeyValueChangeKindKey: &'static NSKeyValueChangeKey); -extern "C" { - pub static NSKeyValueChangeNewKey: &'static NSKeyValueChangeKey; -} +extern_static!(NSKeyValueChangeNewKey: &'static NSKeyValueChangeKey); -extern "C" { - pub static NSKeyValueChangeOldKey: &'static NSKeyValueChangeKey; -} +extern_static!(NSKeyValueChangeOldKey: &'static NSKeyValueChangeKey); -extern "C" { - pub static NSKeyValueChangeIndexesKey: &'static NSKeyValueChangeKey; -} +extern_static!(NSKeyValueChangeIndexesKey: &'static NSKeyValueChangeKey); -extern "C" { - pub static NSKeyValueChangeNotificationIsPriorKey: &'static NSKeyValueChangeKey; -} +extern_static!(NSKeyValueChangeNotificationIsPriorKey: &'static NSKeyValueChangeKey); extern_methods!( /// NSKeyValueObserving diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index ba43c6674..5b4371fe4 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -3,17 +3,11 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSInvalidArchiveOperationException: &'static NSExceptionName; -} +extern_static!(NSInvalidArchiveOperationException: &'static NSExceptionName); -extern "C" { - pub static NSInvalidUnarchiveOperationException: &'static NSExceptionName; -} +extern_static!(NSInvalidUnarchiveOperationException: &'static NSExceptionName); -extern "C" { - pub static NSKeyedArchiveRootObjectKey: &'static NSString; -} +extern_static!(NSKeyedArchiveRootObjectKey: &'static NSString); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs index cfd6f04ae..9e79a3fbe 100644 --- a/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSLengthFormatter.rs @@ -3,15 +3,19 @@ use crate::common::*; use crate::Foundation::*; -pub type NSLengthFormatterUnit = NSInteger; -pub const NSLengthFormatterUnitMillimeter: NSLengthFormatterUnit = 8; -pub const NSLengthFormatterUnitCentimeter: NSLengthFormatterUnit = 9; -pub const NSLengthFormatterUnitMeter: NSLengthFormatterUnit = 11; -pub const NSLengthFormatterUnitKilometer: NSLengthFormatterUnit = 14; -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; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSLengthFormatterUnit { + NSLengthFormatterUnitMillimeter = 8, + NSLengthFormatterUnitCentimeter = 9, + NSLengthFormatterUnitMeter = 11, + NSLengthFormatterUnitKilometer = 14, + NSLengthFormatterUnitInch = (5 << 8) + 1, + NSLengthFormatterUnitFoot = (5 << 8) + 2, + NSLengthFormatterUnitYard = (5 << 8) + 3, + NSLengthFormatterUnitMile = (5 << 8) + 4, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index f6e348be9..8fde2dfe7 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -5,172 +5,104 @@ use crate::Foundation::*; pub type NSLinguisticTagScheme = NSString; -extern "C" { - pub static NSLinguisticTagSchemeTokenType: &'static NSLinguisticTagScheme; -} +extern_static!(NSLinguisticTagSchemeTokenType: &'static NSLinguisticTagScheme); -extern "C" { - pub static NSLinguisticTagSchemeLexicalClass: &'static NSLinguisticTagScheme; -} +extern_static!(NSLinguisticTagSchemeLexicalClass: &'static NSLinguisticTagScheme); -extern "C" { - pub static NSLinguisticTagSchemeNameType: &'static NSLinguisticTagScheme; -} +extern_static!(NSLinguisticTagSchemeNameType: &'static NSLinguisticTagScheme); -extern "C" { - pub static NSLinguisticTagSchemeNameTypeOrLexicalClass: &'static NSLinguisticTagScheme; -} +extern_static!(NSLinguisticTagSchemeNameTypeOrLexicalClass: &'static NSLinguisticTagScheme); -extern "C" { - pub static NSLinguisticTagSchemeLemma: &'static NSLinguisticTagScheme; -} +extern_static!(NSLinguisticTagSchemeLemma: &'static NSLinguisticTagScheme); -extern "C" { - pub static NSLinguisticTagSchemeLanguage: &'static NSLinguisticTagScheme; -} +extern_static!(NSLinguisticTagSchemeLanguage: &'static NSLinguisticTagScheme); -extern "C" { - pub static NSLinguisticTagSchemeScript: &'static NSLinguisticTagScheme; -} +extern_static!(NSLinguisticTagSchemeScript: &'static NSLinguisticTagScheme); pub type NSLinguisticTag = NSString; -extern "C" { - pub static NSLinguisticTagWord: &'static NSLinguisticTag; -} +extern_static!(NSLinguisticTagWord: &'static NSLinguisticTag); -extern "C" { - pub static NSLinguisticTagPunctuation: &'static NSLinguisticTag; -} +extern_static!(NSLinguisticTagPunctuation: &'static NSLinguisticTag); -extern "C" { - pub static NSLinguisticTagWhitespace: &'static NSLinguisticTag; -} +extern_static!(NSLinguisticTagWhitespace: &'static NSLinguisticTag); -extern "C" { - pub static NSLinguisticTagOther: &'static NSLinguisticTag; -} +extern_static!(NSLinguisticTagOther: &'static NSLinguisticTag); -extern "C" { - pub static NSLinguisticTagNoun: &'static NSLinguisticTag; -} +extern_static!(NSLinguisticTagNoun: &'static NSLinguisticTag); -extern "C" { - pub static NSLinguisticTagVerb: &'static NSLinguisticTag; -} +extern_static!(NSLinguisticTagVerb: &'static NSLinguisticTag); -extern "C" { - pub static NSLinguisticTagAdjective: &'static NSLinguisticTag; -} +extern_static!(NSLinguisticTagAdjective: &'static NSLinguisticTag); -extern "C" { - pub static NSLinguisticTagAdverb: &'static NSLinguisticTag; -} +extern_static!(NSLinguisticTagAdverb: &'static NSLinguisticTag); -extern "C" { - pub static NSLinguisticTagPronoun: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagDeterminer: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagParticle: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagPreposition: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagNumber: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagConjunction: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagInterjection: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagClassifier: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagIdiom: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagOtherWord: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagSentenceTerminator: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagOpenQuote: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagCloseQuote: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagOpenParenthesis: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagCloseParenthesis: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagWordJoiner: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagDash: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagOtherPunctuation: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagParagraphBreak: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagOtherWhitespace: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagPersonalName: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagPlaceName: &'static NSLinguisticTag; -} - -extern "C" { - pub static NSLinguisticTagOrganizationName: &'static NSLinguisticTag; -} - -pub type NSLinguisticTaggerUnit = NSInteger; -pub const NSLinguisticTaggerUnitWord: NSLinguisticTaggerUnit = 0; -pub const NSLinguisticTaggerUnitSentence: NSLinguisticTaggerUnit = 1; -pub const NSLinguisticTaggerUnitParagraph: NSLinguisticTaggerUnit = 2; -pub const NSLinguisticTaggerUnitDocument: NSLinguisticTaggerUnit = 3; - -pub type NSLinguisticTaggerOptions = NSUInteger; -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_static!(NSLinguisticTagPronoun: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagDeterminer: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagParticle: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagPreposition: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagNumber: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagConjunction: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagInterjection: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagClassifier: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagIdiom: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagOtherWord: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagSentenceTerminator: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagOpenQuote: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagCloseQuote: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagOpenParenthesis: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagCloseParenthesis: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagWordJoiner: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagDash: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagOtherPunctuation: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagParagraphBreak: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagOtherWhitespace: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagPersonalName: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagPlaceName: &'static NSLinguisticTag); + +extern_static!(NSLinguisticTagOrganizationName: &'static NSLinguisticTag); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSLinguisticTaggerUnit { + NSLinguisticTaggerUnitWord = 0, + NSLinguisticTaggerUnitSentence = 1, + NSLinguisticTaggerUnitParagraph = 2, + NSLinguisticTaggerUnitDocument = 3, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSLinguisticTaggerOptions { + NSLinguisticTaggerOmitWords = 1 << 0, + NSLinguisticTaggerOmitPunctuation = 1 << 1, + NSLinguisticTaggerOmitWhitespace = 1 << 2, + NSLinguisticTaggerOmitOther = 1 << 3, + NSLinguisticTaggerJoinNames = 1 << 4, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSLocale.rs b/crates/icrate/src/generated/Foundation/NSLocale.rs index 584e9ce53..1ae565a07 100644 --- a/crates/icrate/src/generated/Foundation/NSLocale.rs +++ b/crates/icrate/src/generated/Foundation/NSLocale.rs @@ -173,12 +173,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; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSLocaleLanguageDirection { + NSLocaleLanguageDirectionUnknown = 0, + NSLocaleLanguageDirectionLeftToRight = 1, + NSLocaleLanguageDirectionRightToLeft = 2, + NSLocaleLanguageDirectionTopToBottom = 3, + NSLocaleLanguageDirectionBottomToTop = 4, + } +); extern_methods!( /// NSLocaleGeneralInfo @@ -240,126 +244,64 @@ extern_methods!( } ); -extern "C" { - pub static NSCurrentLocaleDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSCurrentLocaleDidChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSLocaleIdentifier: &'static NSLocaleKey; -} +extern_static!(NSLocaleIdentifier: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleLanguageCode: &'static NSLocaleKey; -} +extern_static!(NSLocaleLanguageCode: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleCountryCode: &'static NSLocaleKey; -} +extern_static!(NSLocaleCountryCode: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleScriptCode: &'static NSLocaleKey; -} +extern_static!(NSLocaleScriptCode: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleVariantCode: &'static NSLocaleKey; -} +extern_static!(NSLocaleVariantCode: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleExemplarCharacterSet: &'static NSLocaleKey; -} +extern_static!(NSLocaleExemplarCharacterSet: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleCalendar: &'static NSLocaleKey; -} +extern_static!(NSLocaleCalendar: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleCollationIdentifier: &'static NSLocaleKey; -} +extern_static!(NSLocaleCollationIdentifier: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleUsesMetricSystem: &'static NSLocaleKey; -} +extern_static!(NSLocaleUsesMetricSystem: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleMeasurementSystem: &'static NSLocaleKey; -} +extern_static!(NSLocaleMeasurementSystem: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleDecimalSeparator: &'static NSLocaleKey; -} +extern_static!(NSLocaleDecimalSeparator: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleGroupingSeparator: &'static NSLocaleKey; -} +extern_static!(NSLocaleGroupingSeparator: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleCurrencySymbol: &'static NSLocaleKey; -} +extern_static!(NSLocaleCurrencySymbol: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleCurrencyCode: &'static NSLocaleKey; -} +extern_static!(NSLocaleCurrencyCode: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleCollatorIdentifier: &'static NSLocaleKey; -} +extern_static!(NSLocaleCollatorIdentifier: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleQuotationBeginDelimiterKey: &'static NSLocaleKey; -} +extern_static!(NSLocaleQuotationBeginDelimiterKey: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleQuotationEndDelimiterKey: &'static NSLocaleKey; -} +extern_static!(NSLocaleQuotationEndDelimiterKey: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleAlternateQuotationBeginDelimiterKey: &'static NSLocaleKey; -} +extern_static!(NSLocaleAlternateQuotationBeginDelimiterKey: &'static NSLocaleKey); -extern "C" { - pub static NSLocaleAlternateQuotationEndDelimiterKey: &'static NSLocaleKey; -} +extern_static!(NSLocaleAlternateQuotationEndDelimiterKey: &'static NSLocaleKey); -extern "C" { - pub static NSGregorianCalendar: &'static NSString; -} +extern_static!(NSGregorianCalendar: &'static NSString); -extern "C" { - pub static NSBuddhistCalendar: &'static NSString; -} +extern_static!(NSBuddhistCalendar: &'static NSString); -extern "C" { - pub static NSChineseCalendar: &'static NSString; -} +extern_static!(NSChineseCalendar: &'static NSString); -extern "C" { - pub static NSHebrewCalendar: &'static NSString; -} +extern_static!(NSHebrewCalendar: &'static NSString); -extern "C" { - pub static NSIslamicCalendar: &'static NSString; -} +extern_static!(NSIslamicCalendar: &'static NSString); -extern "C" { - pub static NSIslamicCivilCalendar: &'static NSString; -} +extern_static!(NSIslamicCivilCalendar: &'static NSString); -extern "C" { - pub static NSJapaneseCalendar: &'static NSString; -} +extern_static!(NSJapaneseCalendar: &'static NSString); -extern "C" { - pub static NSRepublicOfChinaCalendar: &'static NSString; -} +extern_static!(NSRepublicOfChinaCalendar: &'static NSString); -extern "C" { - pub static NSPersianCalendar: &'static NSString; -} +extern_static!(NSPersianCalendar: &'static NSString); -extern "C" { - pub static NSIndianCalendar: &'static NSString; -} +extern_static!(NSIndianCalendar: &'static NSString); -extern "C" { - pub static NSISO8601Calendar: &'static NSString; -} +extern_static!(NSISO8601Calendar: &'static NSString); diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index f6bd6c4d3..47d4d8e7a 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -3,17 +3,20 @@ use crate::common::*; use crate::Foundation::*; -pub static NSMapTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory; +extern_static!(NSMapTableStrongMemory: NSPointerFunctionsOptions = NSPointerFunctionsStrongMemory); -pub static NSMapTableZeroingWeakMemory: NSPointerFunctionsOptions = - NSPointerFunctionsZeroingWeakMemory; +extern_static!( + NSMapTableZeroingWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsZeroingWeakMemory +); -pub static NSMapTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn; +extern_static!(NSMapTableCopyIn: NSPointerFunctionsOptions = NSPointerFunctionsCopyIn); -pub static NSMapTableObjectPointerPersonality: NSPointerFunctionsOptions = - NSPointerFunctionsObjectPointerPersonality; +extern_static!( + NSMapTableObjectPointerPersonality: NSPointerFunctionsOptions = + NSPointerFunctionsObjectPointerPersonality +); -pub static NSMapTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory; +extern_static!(NSMapTableWeakMemory: NSPointerFunctionsOptions = NSPointerFunctionsWeakMemory); pub type NSMapTableOptions = NSUInteger; @@ -116,7 +119,7 @@ extern_methods!( } ); -struct_impl!( +extern_struct!( pub struct NSMapEnumerator { _pi: NSUInteger, _si: NSUInteger, @@ -124,7 +127,7 @@ struct_impl!( } ); -struct_impl!( +extern_struct!( pub struct NSMapTableKeyCallBacks { pub hash: *mut TodoFunction, pub isEqual: *mut TodoFunction, @@ -135,7 +138,7 @@ struct_impl!( } ); -struct_impl!( +extern_struct!( pub struct NSMapTableValueCallBacks { pub retain: *mut TodoFunction, pub release: *mut TodoFunction, @@ -143,54 +146,28 @@ struct_impl!( } ); -extern "C" { - pub static NSIntegerMapKeyCallBacks: NSMapTableKeyCallBacks; -} +extern_static!(NSIntegerMapKeyCallBacks: NSMapTableKeyCallBacks); -extern "C" { - pub static NSNonOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks; -} +extern_static!(NSNonOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks); -extern "C" { - pub static NSNonOwnedPointerOrNullMapKeyCallBacks: NSMapTableKeyCallBacks; -} +extern_static!(NSNonOwnedPointerOrNullMapKeyCallBacks: NSMapTableKeyCallBacks); -extern "C" { - pub static NSNonRetainedObjectMapKeyCallBacks: NSMapTableKeyCallBacks; -} +extern_static!(NSNonRetainedObjectMapKeyCallBacks: NSMapTableKeyCallBacks); -extern "C" { - pub static NSObjectMapKeyCallBacks: NSMapTableKeyCallBacks; -} +extern_static!(NSObjectMapKeyCallBacks: NSMapTableKeyCallBacks); -extern "C" { - pub static NSOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks; -} +extern_static!(NSOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks); -extern "C" { - pub static NSIntMapKeyCallBacks: NSMapTableKeyCallBacks; -} +extern_static!(NSIntMapKeyCallBacks: NSMapTableKeyCallBacks); -extern "C" { - pub static NSIntegerMapValueCallBacks: NSMapTableValueCallBacks; -} +extern_static!(NSIntegerMapValueCallBacks: NSMapTableValueCallBacks); -extern "C" { - pub static NSNonOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks; -} +extern_static!(NSNonOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks); -extern "C" { - pub static NSObjectMapValueCallBacks: NSMapTableValueCallBacks; -} +extern_static!(NSObjectMapValueCallBacks: NSMapTableValueCallBacks); -extern "C" { - pub static NSNonRetainedObjectMapValueCallBacks: NSMapTableValueCallBacks; -} +extern_static!(NSNonRetainedObjectMapValueCallBacks: NSMapTableValueCallBacks); -extern "C" { - pub static NSOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks; -} +extern_static!(NSOwnedPointerMapValueCallBacks: NSMapTableValueCallBacks); -extern "C" { - pub static NSIntMapValueCallBacks: NSMapTableValueCallBacks; -} +extern_static!(NSIntMapValueCallBacks: NSMapTableValueCallBacks); diff --git a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs index a080d192f..cfee0b847 100644 --- a/crates/icrate/src/generated/Foundation/NSMassFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMassFormatter.rs @@ -3,12 +3,16 @@ use crate::common::*; use crate::Foundation::*; -pub type NSMassFormatterUnit = NSInteger; -pub const NSMassFormatterUnitGram: NSMassFormatterUnit = 11; -pub const NSMassFormatterUnitKilogram: NSMassFormatterUnit = 14; -pub const NSMassFormatterUnitOunce: NSMassFormatterUnit = (6 << 8) + 1; -pub const NSMassFormatterUnitPound: NSMassFormatterUnit = (6 << 8) + 2; -pub const NSMassFormatterUnitStone: NSMassFormatterUnit = (6 << 8) + 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSMassFormatterUnit { + NSMassFormatterUnitGram = 11, + NSMassFormatterUnitKilogram = 14, + NSMassFormatterUnitOunce = (6 << 8) + 1, + NSMassFormatterUnitPound = (6 << 8) + 2, + NSMassFormatterUnitStone = (6 << 8) + 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs index 0f66931c5..e7c4eeb2e 100644 --- a/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSMeasurementFormatter.rs @@ -3,11 +3,14 @@ use crate::common::*; use crate::Foundation::*; -pub type NSMeasurementFormatterUnitOptions = NSUInteger; -pub const NSMeasurementFormatterUnitOptionsProvidedUnit: NSMeasurementFormatterUnitOptions = 1 << 0; -pub const NSMeasurementFormatterUnitOptionsNaturalScale: NSMeasurementFormatterUnitOptions = 1 << 1; -pub const NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit: - NSMeasurementFormatterUnitOptions = 1 << 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSMeasurementFormatterUnitOptions { + NSMeasurementFormatterUnitOptionsProvidedUnit = 1 << 0, + NSMeasurementFormatterUnitOptionsNaturalScale = 1 << 1, + NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit = 1 << 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index e5835806c..bd825c0b6 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -133,69 +133,37 @@ extern_methods!( pub type NSMetadataQueryDelegate = NSObject; -extern "C" { - pub static NSMetadataQueryDidStartGatheringNotification: &'static NSNotificationName; -} +extern_static!(NSMetadataQueryDidStartGatheringNotification: &'static NSNotificationName); -extern "C" { - pub static NSMetadataQueryGatheringProgressNotification: &'static NSNotificationName; -} +extern_static!(NSMetadataQueryGatheringProgressNotification: &'static NSNotificationName); -extern "C" { - pub static NSMetadataQueryDidFinishGatheringNotification: &'static NSNotificationName; -} +extern_static!(NSMetadataQueryDidFinishGatheringNotification: &'static NSNotificationName); -extern "C" { - pub static NSMetadataQueryDidUpdateNotification: &'static NSNotificationName; -} +extern_static!(NSMetadataQueryDidUpdateNotification: &'static NSNotificationName); -extern "C" { - pub static NSMetadataQueryUpdateAddedItemsKey: &'static NSString; -} +extern_static!(NSMetadataQueryUpdateAddedItemsKey: &'static NSString); -extern "C" { - pub static NSMetadataQueryUpdateChangedItemsKey: &'static NSString; -} +extern_static!(NSMetadataQueryUpdateChangedItemsKey: &'static NSString); -extern "C" { - pub static NSMetadataQueryUpdateRemovedItemsKey: &'static NSString; -} +extern_static!(NSMetadataQueryUpdateRemovedItemsKey: &'static NSString); -extern "C" { - pub static NSMetadataQueryResultContentRelevanceAttribute: &'static NSString; -} +extern_static!(NSMetadataQueryResultContentRelevanceAttribute: &'static NSString); -extern "C" { - pub static NSMetadataQueryUserHomeScope: &'static NSString; -} +extern_static!(NSMetadataQueryUserHomeScope: &'static NSString); -extern "C" { - pub static NSMetadataQueryLocalComputerScope: &'static NSString; -} +extern_static!(NSMetadataQueryLocalComputerScope: &'static NSString); -extern "C" { - pub static NSMetadataQueryNetworkScope: &'static NSString; -} +extern_static!(NSMetadataQueryNetworkScope: &'static NSString); -extern "C" { - pub static NSMetadataQueryIndexedLocalComputerScope: &'static NSString; -} +extern_static!(NSMetadataQueryIndexedLocalComputerScope: &'static NSString); -extern "C" { - pub static NSMetadataQueryIndexedNetworkScope: &'static NSString; -} +extern_static!(NSMetadataQueryIndexedNetworkScope: &'static NSString); -extern "C" { - pub static NSMetadataQueryUbiquitousDocumentsScope: &'static NSString; -} +extern_static!(NSMetadataQueryUbiquitousDocumentsScope: &'static NSString); -extern "C" { - pub static NSMetadataQueryUbiquitousDataScope: &'static NSString; -} +extern_static!(NSMetadataQueryUbiquitousDataScope: &'static NSString); -extern "C" { - pub static NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope: &'static NSString; -} +extern_static!(NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope: &'static NSString); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs index 8d334817a..cc1a2c95e 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadataAttributes.rs @@ -3,726 +3,364 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSMetadataItemFSNameKey: &'static NSString; -} +extern_static!(NSMetadataItemFSNameKey: &'static NSString); -extern "C" { - pub static NSMetadataItemDisplayNameKey: &'static NSString; -} +extern_static!(NSMetadataItemDisplayNameKey: &'static NSString); -extern "C" { - pub static NSMetadataItemURLKey: &'static NSString; -} +extern_static!(NSMetadataItemURLKey: &'static NSString); -extern "C" { - pub static NSMetadataItemPathKey: &'static NSString; -} +extern_static!(NSMetadataItemPathKey: &'static NSString); -extern "C" { - pub static NSMetadataItemFSSizeKey: &'static NSString; -} +extern_static!(NSMetadataItemFSSizeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemFSCreationDateKey: &'static NSString; -} +extern_static!(NSMetadataItemFSCreationDateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemFSContentChangeDateKey: &'static NSString; -} +extern_static!(NSMetadataItemFSContentChangeDateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemContentTypeKey: &'static NSString; -} +extern_static!(NSMetadataItemContentTypeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemContentTypeTreeKey: &'static NSString; -} +extern_static!(NSMetadataItemContentTypeTreeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemIsUbiquitousKey: &'static NSString; -} +extern_static!(NSMetadataItemIsUbiquitousKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemHasUnresolvedConflictsKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemHasUnresolvedConflictsKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemIsDownloadedKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemIsDownloadedKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemDownloadingStatusKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemDownloadingStatusKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemDownloadingStatusNotDownloaded: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemDownloadingStatusNotDownloaded: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemDownloadingStatusDownloaded: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemDownloadingStatusDownloaded: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemDownloadingStatusCurrent: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemDownloadingStatusCurrent: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemIsDownloadingKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemIsDownloadingKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemIsUploadedKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemIsUploadedKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemIsUploadingKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemIsUploadingKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemPercentDownloadedKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemPercentDownloadedKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemPercentUploadedKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemPercentUploadedKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemDownloadingErrorKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemDownloadingErrorKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemUploadingErrorKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemUploadingErrorKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemDownloadRequestedKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemDownloadRequestedKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemIsExternalDocumentKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemIsExternalDocumentKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemContainerDisplayNameKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemContainerDisplayNameKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemURLInLocalContainerKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemURLInLocalContainerKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousItemIsSharedKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousItemIsSharedKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousSharedItemCurrentUserRoleKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousSharedItemCurrentUserRoleKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousSharedItemOwnerNameComponentsKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousSharedItemOwnerNameComponentsKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey: &'static NSString; -} +extern_static!(NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousSharedItemRoleOwner: &'static NSString; -} +extern_static!(NSMetadataUbiquitousSharedItemRoleOwner: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousSharedItemRoleParticipant: &'static NSString; -} +extern_static!(NSMetadataUbiquitousSharedItemRoleParticipant: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousSharedItemPermissionsReadOnly: &'static NSString; -} +extern_static!(NSMetadataUbiquitousSharedItemPermissionsReadOnly: &'static NSString); -extern "C" { - pub static NSMetadataUbiquitousSharedItemPermissionsReadWrite: &'static NSString; -} +extern_static!(NSMetadataUbiquitousSharedItemPermissionsReadWrite: &'static NSString); -extern "C" { - pub static NSMetadataItemAttributeChangeDateKey: &'static NSString; -} +extern_static!(NSMetadataItemAttributeChangeDateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemKeywordsKey: &'static NSString; -} +extern_static!(NSMetadataItemKeywordsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemTitleKey: &'static NSString; -} +extern_static!(NSMetadataItemTitleKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAuthorsKey: &'static NSString; -} +extern_static!(NSMetadataItemAuthorsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemEditorsKey: &'static NSString; -} +extern_static!(NSMetadataItemEditorsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemParticipantsKey: &'static NSString; -} +extern_static!(NSMetadataItemParticipantsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemProjectsKey: &'static NSString; -} +extern_static!(NSMetadataItemProjectsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemDownloadedDateKey: &'static NSString; -} +extern_static!(NSMetadataItemDownloadedDateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemWhereFromsKey: &'static NSString; -} +extern_static!(NSMetadataItemWhereFromsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemCommentKey: &'static NSString; -} +extern_static!(NSMetadataItemCommentKey: &'static NSString); -extern "C" { - pub static NSMetadataItemCopyrightKey: &'static NSString; -} +extern_static!(NSMetadataItemCopyrightKey: &'static NSString); -extern "C" { - pub static NSMetadataItemLastUsedDateKey: &'static NSString; -} +extern_static!(NSMetadataItemLastUsedDateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemContentCreationDateKey: &'static NSString; -} +extern_static!(NSMetadataItemContentCreationDateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemContentModificationDateKey: &'static NSString; -} +extern_static!(NSMetadataItemContentModificationDateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemDateAddedKey: &'static NSString; -} +extern_static!(NSMetadataItemDateAddedKey: &'static NSString); -extern "C" { - pub static NSMetadataItemDurationSecondsKey: &'static NSString; -} +extern_static!(NSMetadataItemDurationSecondsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemContactKeywordsKey: &'static NSString; -} +extern_static!(NSMetadataItemContactKeywordsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemVersionKey: &'static NSString; -} +extern_static!(NSMetadataItemVersionKey: &'static NSString); -extern "C" { - pub static NSMetadataItemPixelHeightKey: &'static NSString; -} +extern_static!(NSMetadataItemPixelHeightKey: &'static NSString); -extern "C" { - pub static NSMetadataItemPixelWidthKey: &'static NSString; -} +extern_static!(NSMetadataItemPixelWidthKey: &'static NSString); -extern "C" { - pub static NSMetadataItemPixelCountKey: &'static NSString; -} +extern_static!(NSMetadataItemPixelCountKey: &'static NSString); -extern "C" { - pub static NSMetadataItemColorSpaceKey: &'static NSString; -} +extern_static!(NSMetadataItemColorSpaceKey: &'static NSString); -extern "C" { - pub static NSMetadataItemBitsPerSampleKey: &'static NSString; -} +extern_static!(NSMetadataItemBitsPerSampleKey: &'static NSString); -extern "C" { - pub static NSMetadataItemFlashOnOffKey: &'static NSString; -} +extern_static!(NSMetadataItemFlashOnOffKey: &'static NSString); -extern "C" { - pub static NSMetadataItemFocalLengthKey: &'static NSString; -} +extern_static!(NSMetadataItemFocalLengthKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAcquisitionMakeKey: &'static NSString; -} +extern_static!(NSMetadataItemAcquisitionMakeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAcquisitionModelKey: &'static NSString; -} +extern_static!(NSMetadataItemAcquisitionModelKey: &'static NSString); -extern "C" { - pub static NSMetadataItemISOSpeedKey: &'static NSString; -} +extern_static!(NSMetadataItemISOSpeedKey: &'static NSString); -extern "C" { - pub static NSMetadataItemOrientationKey: &'static NSString; -} +extern_static!(NSMetadataItemOrientationKey: &'static NSString); -extern "C" { - pub static NSMetadataItemLayerNamesKey: &'static NSString; -} +extern_static!(NSMetadataItemLayerNamesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemWhiteBalanceKey: &'static NSString; -} +extern_static!(NSMetadataItemWhiteBalanceKey: &'static NSString); -extern "C" { - pub static NSMetadataItemApertureKey: &'static NSString; -} +extern_static!(NSMetadataItemApertureKey: &'static NSString); -extern "C" { - pub static NSMetadataItemProfileNameKey: &'static NSString; -} +extern_static!(NSMetadataItemProfileNameKey: &'static NSString); -extern "C" { - pub static NSMetadataItemResolutionWidthDPIKey: &'static NSString; -} +extern_static!(NSMetadataItemResolutionWidthDPIKey: &'static NSString); -extern "C" { - pub static NSMetadataItemResolutionHeightDPIKey: &'static NSString; -} +extern_static!(NSMetadataItemResolutionHeightDPIKey: &'static NSString); -extern "C" { - pub static NSMetadataItemExposureModeKey: &'static NSString; -} +extern_static!(NSMetadataItemExposureModeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemExposureTimeSecondsKey: &'static NSString; -} +extern_static!(NSMetadataItemExposureTimeSecondsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemEXIFVersionKey: &'static NSString; -} +extern_static!(NSMetadataItemEXIFVersionKey: &'static NSString); -extern "C" { - pub static NSMetadataItemCameraOwnerKey: &'static NSString; -} +extern_static!(NSMetadataItemCameraOwnerKey: &'static NSString); -extern "C" { - pub static NSMetadataItemFocalLength35mmKey: &'static NSString; -} +extern_static!(NSMetadataItemFocalLength35mmKey: &'static NSString); -extern "C" { - pub static NSMetadataItemLensModelKey: &'static NSString; -} +extern_static!(NSMetadataItemLensModelKey: &'static NSString); -extern "C" { - pub static NSMetadataItemEXIFGPSVersionKey: &'static NSString; -} +extern_static!(NSMetadataItemEXIFGPSVersionKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAltitudeKey: &'static NSString; -} +extern_static!(NSMetadataItemAltitudeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemLatitudeKey: &'static NSString; -} +extern_static!(NSMetadataItemLatitudeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemLongitudeKey: &'static NSString; -} +extern_static!(NSMetadataItemLongitudeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemSpeedKey: &'static NSString; -} +extern_static!(NSMetadataItemSpeedKey: &'static NSString); -extern "C" { - pub static NSMetadataItemTimestampKey: &'static NSString; -} +extern_static!(NSMetadataItemTimestampKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSTrackKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSTrackKey: &'static NSString); -extern "C" { - pub static NSMetadataItemImageDirectionKey: &'static NSString; -} +extern_static!(NSMetadataItemImageDirectionKey: &'static NSString); -extern "C" { - pub static NSMetadataItemNamedLocationKey: &'static NSString; -} +extern_static!(NSMetadataItemNamedLocationKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSStatusKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSStatusKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSMeasureModeKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSMeasureModeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSDOPKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSDOPKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSMapDatumKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSMapDatumKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSDestLatitudeKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSDestLatitudeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSDestLongitudeKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSDestLongitudeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSDestBearingKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSDestBearingKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSDestDistanceKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSDestDistanceKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSProcessingMethodKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSProcessingMethodKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSAreaInformationKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSAreaInformationKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSDateStampKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSDateStampKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGPSDifferentalKey: &'static NSString; -} +extern_static!(NSMetadataItemGPSDifferentalKey: &'static NSString); -extern "C" { - pub static NSMetadataItemCodecsKey: &'static NSString; -} +extern_static!(NSMetadataItemCodecsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemMediaTypesKey: &'static NSString; -} +extern_static!(NSMetadataItemMediaTypesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemStreamableKey: &'static NSString; -} +extern_static!(NSMetadataItemStreamableKey: &'static NSString); -extern "C" { - pub static NSMetadataItemTotalBitRateKey: &'static NSString; -} +extern_static!(NSMetadataItemTotalBitRateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemVideoBitRateKey: &'static NSString; -} +extern_static!(NSMetadataItemVideoBitRateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAudioBitRateKey: &'static NSString; -} +extern_static!(NSMetadataItemAudioBitRateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemDeliveryTypeKey: &'static NSString; -} +extern_static!(NSMetadataItemDeliveryTypeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAlbumKey: &'static NSString; -} +extern_static!(NSMetadataItemAlbumKey: &'static NSString); -extern "C" { - pub static NSMetadataItemHasAlphaChannelKey: &'static NSString; -} +extern_static!(NSMetadataItemHasAlphaChannelKey: &'static NSString); -extern "C" { - pub static NSMetadataItemRedEyeOnOffKey: &'static NSString; -} +extern_static!(NSMetadataItemRedEyeOnOffKey: &'static NSString); -extern "C" { - pub static NSMetadataItemMeteringModeKey: &'static NSString; -} +extern_static!(NSMetadataItemMeteringModeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemMaxApertureKey: &'static NSString; -} +extern_static!(NSMetadataItemMaxApertureKey: &'static NSString); -extern "C" { - pub static NSMetadataItemFNumberKey: &'static NSString; -} +extern_static!(NSMetadataItemFNumberKey: &'static NSString); -extern "C" { - pub static NSMetadataItemExposureProgramKey: &'static NSString; -} +extern_static!(NSMetadataItemExposureProgramKey: &'static NSString); -extern "C" { - pub static NSMetadataItemExposureTimeStringKey: &'static NSString; -} +extern_static!(NSMetadataItemExposureTimeStringKey: &'static NSString); -extern "C" { - pub static NSMetadataItemHeadlineKey: &'static NSString; -} +extern_static!(NSMetadataItemHeadlineKey: &'static NSString); -extern "C" { - pub static NSMetadataItemInstructionsKey: &'static NSString; -} +extern_static!(NSMetadataItemInstructionsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemCityKey: &'static NSString; -} +extern_static!(NSMetadataItemCityKey: &'static NSString); -extern "C" { - pub static NSMetadataItemStateOrProvinceKey: &'static NSString; -} +extern_static!(NSMetadataItemStateOrProvinceKey: &'static NSString); -extern "C" { - pub static NSMetadataItemCountryKey: &'static NSString; -} +extern_static!(NSMetadataItemCountryKey: &'static NSString); -extern "C" { - pub static NSMetadataItemTextContentKey: &'static NSString; -} +extern_static!(NSMetadataItemTextContentKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAudioSampleRateKey: &'static NSString; -} +extern_static!(NSMetadataItemAudioSampleRateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAudioChannelCountKey: &'static NSString; -} +extern_static!(NSMetadataItemAudioChannelCountKey: &'static NSString); -extern "C" { - pub static NSMetadataItemTempoKey: &'static NSString; -} +extern_static!(NSMetadataItemTempoKey: &'static NSString); -extern "C" { - pub static NSMetadataItemKeySignatureKey: &'static NSString; -} +extern_static!(NSMetadataItemKeySignatureKey: &'static NSString); -extern "C" { - pub static NSMetadataItemTimeSignatureKey: &'static NSString; -} +extern_static!(NSMetadataItemTimeSignatureKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAudioEncodingApplicationKey: &'static NSString; -} +extern_static!(NSMetadataItemAudioEncodingApplicationKey: &'static NSString); -extern "C" { - pub static NSMetadataItemComposerKey: &'static NSString; -} +extern_static!(NSMetadataItemComposerKey: &'static NSString); -extern "C" { - pub static NSMetadataItemLyricistKey: &'static NSString; -} +extern_static!(NSMetadataItemLyricistKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAudioTrackNumberKey: &'static NSString; -} +extern_static!(NSMetadataItemAudioTrackNumberKey: &'static NSString); -extern "C" { - pub static NSMetadataItemRecordingDateKey: &'static NSString; -} +extern_static!(NSMetadataItemRecordingDateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemMusicalGenreKey: &'static NSString; -} +extern_static!(NSMetadataItemMusicalGenreKey: &'static NSString); -extern "C" { - pub static NSMetadataItemIsGeneralMIDISequenceKey: &'static NSString; -} +extern_static!(NSMetadataItemIsGeneralMIDISequenceKey: &'static NSString); -extern "C" { - pub static NSMetadataItemRecordingYearKey: &'static NSString; -} +extern_static!(NSMetadataItemRecordingYearKey: &'static NSString); -extern "C" { - pub static NSMetadataItemOrganizationsKey: &'static NSString; -} +extern_static!(NSMetadataItemOrganizationsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemLanguagesKey: &'static NSString; -} +extern_static!(NSMetadataItemLanguagesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemRightsKey: &'static NSString; -} +extern_static!(NSMetadataItemRightsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemPublishersKey: &'static NSString; -} +extern_static!(NSMetadataItemPublishersKey: &'static NSString); -extern "C" { - pub static NSMetadataItemContributorsKey: &'static NSString; -} +extern_static!(NSMetadataItemContributorsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemCoverageKey: &'static NSString; -} +extern_static!(NSMetadataItemCoverageKey: &'static NSString); -extern "C" { - pub static NSMetadataItemSubjectKey: &'static NSString; -} +extern_static!(NSMetadataItemSubjectKey: &'static NSString); -extern "C" { - pub static NSMetadataItemThemeKey: &'static NSString; -} +extern_static!(NSMetadataItemThemeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemDescriptionKey: &'static NSString; -} +extern_static!(NSMetadataItemDescriptionKey: &'static NSString); -extern "C" { - pub static NSMetadataItemIdentifierKey: &'static NSString; -} +extern_static!(NSMetadataItemIdentifierKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAudiencesKey: &'static NSString; -} +extern_static!(NSMetadataItemAudiencesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemNumberOfPagesKey: &'static NSString; -} +extern_static!(NSMetadataItemNumberOfPagesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemPageWidthKey: &'static NSString; -} +extern_static!(NSMetadataItemPageWidthKey: &'static NSString); -extern "C" { - pub static NSMetadataItemPageHeightKey: &'static NSString; -} +extern_static!(NSMetadataItemPageHeightKey: &'static NSString); -extern "C" { - pub static NSMetadataItemSecurityMethodKey: &'static NSString; -} +extern_static!(NSMetadataItemSecurityMethodKey: &'static NSString); -extern "C" { - pub static NSMetadataItemCreatorKey: &'static NSString; -} +extern_static!(NSMetadataItemCreatorKey: &'static NSString); -extern "C" { - pub static NSMetadataItemEncodingApplicationsKey: &'static NSString; -} +extern_static!(NSMetadataItemEncodingApplicationsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemDueDateKey: &'static NSString; -} +extern_static!(NSMetadataItemDueDateKey: &'static NSString); -extern "C" { - pub static NSMetadataItemStarRatingKey: &'static NSString; -} +extern_static!(NSMetadataItemStarRatingKey: &'static NSString); -extern "C" { - pub static NSMetadataItemPhoneNumbersKey: &'static NSString; -} +extern_static!(NSMetadataItemPhoneNumbersKey: &'static NSString); -extern "C" { - pub static NSMetadataItemEmailAddressesKey: &'static NSString; -} +extern_static!(NSMetadataItemEmailAddressesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemInstantMessageAddressesKey: &'static NSString; -} +extern_static!(NSMetadataItemInstantMessageAddressesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemKindKey: &'static NSString; -} +extern_static!(NSMetadataItemKindKey: &'static NSString); -extern "C" { - pub static NSMetadataItemRecipientsKey: &'static NSString; -} +extern_static!(NSMetadataItemRecipientsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemFinderCommentKey: &'static NSString; -} +extern_static!(NSMetadataItemFinderCommentKey: &'static NSString); -extern "C" { - pub static NSMetadataItemFontsKey: &'static NSString; -} +extern_static!(NSMetadataItemFontsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAppleLoopsRootKeyKey: &'static NSString; -} +extern_static!(NSMetadataItemAppleLoopsRootKeyKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAppleLoopsKeyFilterTypeKey: &'static NSString; -} +extern_static!(NSMetadataItemAppleLoopsKeyFilterTypeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAppleLoopsLoopModeKey: &'static NSString; -} +extern_static!(NSMetadataItemAppleLoopsLoopModeKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAppleLoopDescriptorsKey: &'static NSString; -} +extern_static!(NSMetadataItemAppleLoopDescriptorsKey: &'static NSString); -extern "C" { - pub static NSMetadataItemMusicalInstrumentCategoryKey: &'static NSString; -} +extern_static!(NSMetadataItemMusicalInstrumentCategoryKey: &'static NSString); -extern "C" { - pub static NSMetadataItemMusicalInstrumentNameKey: &'static NSString; -} +extern_static!(NSMetadataItemMusicalInstrumentNameKey: &'static NSString); -extern "C" { - pub static NSMetadataItemCFBundleIdentifierKey: &'static NSString; -} +extern_static!(NSMetadataItemCFBundleIdentifierKey: &'static NSString); -extern "C" { - pub static NSMetadataItemInformationKey: &'static NSString; -} +extern_static!(NSMetadataItemInformationKey: &'static NSString); -extern "C" { - pub static NSMetadataItemDirectorKey: &'static NSString; -} +extern_static!(NSMetadataItemDirectorKey: &'static NSString); -extern "C" { - pub static NSMetadataItemProducerKey: &'static NSString; -} +extern_static!(NSMetadataItemProducerKey: &'static NSString); -extern "C" { - pub static NSMetadataItemGenreKey: &'static NSString; -} +extern_static!(NSMetadataItemGenreKey: &'static NSString); -extern "C" { - pub static NSMetadataItemPerformersKey: &'static NSString; -} +extern_static!(NSMetadataItemPerformersKey: &'static NSString); -extern "C" { - pub static NSMetadataItemOriginalFormatKey: &'static NSString; -} +extern_static!(NSMetadataItemOriginalFormatKey: &'static NSString); -extern "C" { - pub static NSMetadataItemOriginalSourceKey: &'static NSString; -} +extern_static!(NSMetadataItemOriginalSourceKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAuthorEmailAddressesKey: &'static NSString; -} +extern_static!(NSMetadataItemAuthorEmailAddressesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemRecipientEmailAddressesKey: &'static NSString; -} +extern_static!(NSMetadataItemRecipientEmailAddressesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemAuthorAddressesKey: &'static NSString; -} +extern_static!(NSMetadataItemAuthorAddressesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemRecipientAddressesKey: &'static NSString; -} +extern_static!(NSMetadataItemRecipientAddressesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemIsLikelyJunkKey: &'static NSString; -} +extern_static!(NSMetadataItemIsLikelyJunkKey: &'static NSString); -extern "C" { - pub static NSMetadataItemExecutableArchitecturesKey: &'static NSString; -} +extern_static!(NSMetadataItemExecutableArchitecturesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemExecutablePlatformKey: &'static NSString; -} +extern_static!(NSMetadataItemExecutablePlatformKey: &'static NSString); -extern "C" { - pub static NSMetadataItemApplicationCategoriesKey: &'static NSString; -} +extern_static!(NSMetadataItemApplicationCategoriesKey: &'static NSString); -extern "C" { - pub static NSMetadataItemIsApplicationManagedKey: &'static NSString; -} +extern_static!(NSMetadataItemIsApplicationManagedKey: &'static NSString); diff --git a/crates/icrate/src/generated/Foundation/NSMorphology.rs b/crates/icrate/src/generated/Foundation/NSMorphology.rs index e1ec535fc..e9b547e28 100644 --- a/crates/icrate/src/generated/Foundation/NSMorphology.rs +++ b/crates/icrate/src/generated/Foundation/NSMorphology.rs @@ -3,37 +3,49 @@ use crate::common::*; use crate::Foundation::*; -pub type NSGrammaticalGender = NSInteger; -pub const NSGrammaticalGenderNotSet: NSGrammaticalGender = 0; -pub const NSGrammaticalGenderFeminine: NSGrammaticalGender = 1; -pub const NSGrammaticalGenderMasculine: NSGrammaticalGender = 2; -pub const NSGrammaticalGenderNeuter: NSGrammaticalGender = 3; - -pub type NSGrammaticalPartOfSpeech = NSInteger; -pub const NSGrammaticalPartOfSpeechNotSet: NSGrammaticalPartOfSpeech = 0; -pub const NSGrammaticalPartOfSpeechDeterminer: NSGrammaticalPartOfSpeech = 1; -pub const NSGrammaticalPartOfSpeechPronoun: NSGrammaticalPartOfSpeech = 2; -pub const NSGrammaticalPartOfSpeechLetter: NSGrammaticalPartOfSpeech = 3; -pub const NSGrammaticalPartOfSpeechAdverb: NSGrammaticalPartOfSpeech = 4; -pub const NSGrammaticalPartOfSpeechParticle: NSGrammaticalPartOfSpeech = 5; -pub const NSGrammaticalPartOfSpeechAdjective: NSGrammaticalPartOfSpeech = 6; -pub const NSGrammaticalPartOfSpeechAdposition: NSGrammaticalPartOfSpeech = 7; -pub const NSGrammaticalPartOfSpeechVerb: NSGrammaticalPartOfSpeech = 8; -pub const NSGrammaticalPartOfSpeechNoun: NSGrammaticalPartOfSpeech = 9; -pub const NSGrammaticalPartOfSpeechConjunction: NSGrammaticalPartOfSpeech = 10; -pub const NSGrammaticalPartOfSpeechNumeral: NSGrammaticalPartOfSpeech = 11; -pub const NSGrammaticalPartOfSpeechInterjection: NSGrammaticalPartOfSpeech = 12; -pub const NSGrammaticalPartOfSpeechPreposition: NSGrammaticalPartOfSpeech = 13; -pub const NSGrammaticalPartOfSpeechAbbreviation: NSGrammaticalPartOfSpeech = 14; - -pub type NSGrammaticalNumber = NSInteger; -pub const NSGrammaticalNumberNotSet: NSGrammaticalNumber = 0; -pub const NSGrammaticalNumberSingular: NSGrammaticalNumber = 1; -pub const NSGrammaticalNumberZero: NSGrammaticalNumber = 2; -pub const NSGrammaticalNumberPlural: NSGrammaticalNumber = 3; -pub const NSGrammaticalNumberPluralTwo: NSGrammaticalNumber = 4; -pub const NSGrammaticalNumberPluralFew: NSGrammaticalNumber = 5; -pub const NSGrammaticalNumberPluralMany: NSGrammaticalNumber = 6; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSGrammaticalGender { + NSGrammaticalGenderNotSet = 0, + NSGrammaticalGenderFeminine = 1, + NSGrammaticalGenderMasculine = 2, + NSGrammaticalGenderNeuter = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSGrammaticalPartOfSpeech { + NSGrammaticalPartOfSpeechNotSet = 0, + NSGrammaticalPartOfSpeechDeterminer = 1, + NSGrammaticalPartOfSpeechPronoun = 2, + NSGrammaticalPartOfSpeechLetter = 3, + NSGrammaticalPartOfSpeechAdverb = 4, + NSGrammaticalPartOfSpeechParticle = 5, + NSGrammaticalPartOfSpeechAdjective = 6, + NSGrammaticalPartOfSpeechAdposition = 7, + NSGrammaticalPartOfSpeechVerb = 8, + NSGrammaticalPartOfSpeechNoun = 9, + NSGrammaticalPartOfSpeechConjunction = 10, + NSGrammaticalPartOfSpeechNumeral = 11, + NSGrammaticalPartOfSpeechInterjection = 12, + NSGrammaticalPartOfSpeechPreposition = 13, + NSGrammaticalPartOfSpeechAbbreviation = 14, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSGrammaticalNumber { + NSGrammaticalNumberNotSet = 0, + NSGrammaticalNumberSingular = 1, + NSGrammaticalNumberZero = 2, + NSGrammaticalNumberPlural = 3, + NSGrammaticalNumberPluralTwo = 4, + NSGrammaticalNumberPluralFew = 5, + NSGrammaticalNumberPluralMany = 6, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index b75593efd..559db9ef8 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -3,28 +3,32 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSNetServicesErrorCode: &'static NSString; -} - -extern "C" { - pub static NSNetServicesErrorDomain: &'static NSErrorDomain; -} - -pub type NSNetServicesError = NSInteger; -pub const NSNetServicesUnknownError: NSNetServicesError = -72000; -pub const NSNetServicesCollisionError: NSNetServicesError = -72001; -pub const NSNetServicesNotFoundError: NSNetServicesError = -72002; -pub const NSNetServicesActivityInProgress: NSNetServicesError = -72003; -pub const NSNetServicesBadArgumentError: NSNetServicesError = -72004; -pub const NSNetServicesCancelledError: NSNetServicesError = -72005; -pub const NSNetServicesInvalidError: NSNetServicesError = -72006; -pub const NSNetServicesTimeoutError: NSNetServicesError = -72007; -pub const NSNetServicesMissingRequiredConfigurationError: NSNetServicesError = -72008; - -pub type NSNetServiceOptions = NSUInteger; -pub const NSNetServiceNoAutoRename: NSNetServiceOptions = 1 << 0; -pub const NSNetServiceListenForConnections: NSNetServiceOptions = 1 << 1; +extern_static!(NSNetServicesErrorCode: &'static NSString); + +extern_static!(NSNetServicesErrorDomain: &'static NSErrorDomain); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSNetServicesError { + NSNetServicesUnknownError = -72000, + NSNetServicesCollisionError = -72001, + NSNetServicesNotFoundError = -72002, + NSNetServicesActivityInProgress = -72003, + NSNetServicesBadArgumentError = -72004, + NSNetServicesCancelledError = -72005, + NSNetServicesInvalidError = -72006, + NSNetServicesTimeoutError = -72007, + NSNetServicesMissingRequiredConfigurationError = -72008, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSNetServiceOptions { + NSNetServiceNoAutoRename = 1 << 0, + NSNetServiceListenForConnections = 1 << 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs index ffb7df690..9e953e3d7 100644 --- a/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs +++ b/crates/icrate/src/generated/Foundation/NSNotificationQueue.rs @@ -3,15 +3,23 @@ use crate::common::*; use crate::Foundation::*; -pub type NSPostingStyle = NSUInteger; -pub const NSPostWhenIdle: NSPostingStyle = 1; -pub const NSPostASAP: NSPostingStyle = 2; -pub const NSPostNow: NSPostingStyle = 3; - -pub type NSNotificationCoalescing = NSUInteger; -pub const NSNotificationNoCoalescing: NSNotificationCoalescing = 0; -pub const NSNotificationCoalescingOnName: NSNotificationCoalescing = 1; -pub const NSNotificationCoalescingOnSender: NSNotificationCoalescing = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPostingStyle { + NSPostWhenIdle = 1, + NSPostASAP = 2, + NSPostNow = 3, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSNotificationCoalescing { + NSNotificationNoCoalescing = 0, + NSNotificationCoalescingOnName = 1, + NSNotificationCoalescingOnSender = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs index 04217aa5e..11fff3c0f 100644 --- a/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSNumberFormatter.rs @@ -3,37 +3,53 @@ use crate::common::*; use crate::Foundation::*; -pub type NSNumberFormatterBehavior = NSUInteger; -pub const NSNumberFormatterBehaviorDefault: NSNumberFormatterBehavior = 0; -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 type NSNumberFormatterPadPosition = NSUInteger; -pub const NSNumberFormatterPadBeforePrefix: NSNumberFormatterPadPosition = 0; -pub const NSNumberFormatterPadAfterPrefix: NSNumberFormatterPadPosition = 1; -pub const NSNumberFormatterPadBeforeSuffix: NSNumberFormatterPadPosition = 2; -pub const NSNumberFormatterPadAfterSuffix: NSNumberFormatterPadPosition = 3; - -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; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSNumberFormatterBehavior { + NSNumberFormatterBehaviorDefault = 0, + NSNumberFormatterBehavior10_0 = 1000, + NSNumberFormatterBehavior10_4 = 1040, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSNumberFormatterStyle { + NSNumberFormatterNoStyle = 0, + NSNumberFormatterDecimalStyle = 1, + NSNumberFormatterCurrencyStyle = 2, + NSNumberFormatterPercentStyle = 3, + NSNumberFormatterScientificStyle = 4, + NSNumberFormatterSpellOutStyle = 5, + NSNumberFormatterOrdinalStyle = 6, + NSNumberFormatterCurrencyISOCodeStyle = 8, + NSNumberFormatterCurrencyPluralStyle = 9, + NSNumberFormatterCurrencyAccountingStyle = 10, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSNumberFormatterPadPosition { + NSNumberFormatterPadBeforePrefix = 0, + NSNumberFormatterPadAfterPrefix = 1, + NSNumberFormatterPadBeforeSuffix = 2, + NSNumberFormatterPadAfterSuffix = 3, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSNumberFormatterRoundingMode { + NSNumberFormatterRoundCeiling = 0, + NSNumberFormatterRoundFloor = 1, + NSNumberFormatterRoundDown = 2, + NSNumberFormatterRoundUp = 3, + NSNumberFormatterRoundHalfEven = 4, + NSNumberFormatterRoundHalfDown = 5, + NSNumberFormatterRoundHalfUp = 6, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 77e04c797..95e0bc0ef 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -3,32 +3,46 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSFoundationVersionNumber: c_double; -} +extern_static!(NSFoundationVersionNumber: c_double); pub type NSExceptionName = NSString; pub type NSRunLoopMode = NSString; -pub type NSComparisonResult = NSInteger; -pub const NSOrderedAscending: NSComparisonResult = -1; -pub const NSOrderedSame: NSComparisonResult = 0; -pub const NSOrderedDescending: NSComparisonResult = 1; +ns_closed_enum!( + #[underlying(NSInteger)] + pub enum NSComparisonResult { + NSOrderedAscending = -1, + NSOrderedSame = 0, + NSOrderedDescending = 1, + } +); pub type NSComparator = TodoBlock; -pub type NSEnumerationOptions = NSUInteger; -pub const NSEnumerationConcurrent: NSEnumerationOptions = 1 << 0; -pub const NSEnumerationReverse: NSEnumerationOptions = 1 << 1; - -pub type NSSortOptions = NSUInteger; -pub const NSSortConcurrent: NSSortOptions = 1 << 0; -pub const NSSortStable: NSSortOptions = 1 << 4; - -pub type NSQualityOfService = NSInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSEnumerationOptions { + NSEnumerationConcurrent = 1 << 0, + NSEnumerationReverse = 1 << 1, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSSortOptions { + NSSortConcurrent = 1 << 0, + NSSortStable = 1 << 4, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSQualityOfService { + NSQualityOfServiceUserInteractive = 0x21, + NSQualityOfServiceUserInitiated = 0x19, + NSQualityOfServiceUtility = 0x11, + NSQualityOfServiceBackground = 0x09, + NSQualityOfServiceDefault = -1, + } +); diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 49bab8b35..2c285ce44 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -3,12 +3,16 @@ use crate::common::*; use crate::Foundation::*; -pub type NSOperationQueuePriority = NSInteger; -pub const NSOperationQueuePriorityVeryLow: NSOperationQueuePriority = -8; -pub const NSOperationQueuePriorityLow: NSOperationQueuePriority = -4; -pub const NSOperationQueuePriorityNormal: NSOperationQueuePriority = 0; -pub const NSOperationQueuePriorityHigh: NSOperationQueuePriority = 4; -pub const NSOperationQueuePriorityVeryHigh: NSOperationQueuePriority = 8; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSOperationQueuePriority { + NSOperationQueuePriorityVeryLow = -8, + NSOperationQueuePriorityLow = -4, + NSOperationQueuePriorityNormal = 0, + NSOperationQueuePriorityHigh = 4, + NSOperationQueuePriorityVeryHigh = 8, + } +); extern_class!( #[derive(Debug)] @@ -144,15 +148,11 @@ extern_methods!( } ); -extern "C" { - pub static NSInvocationOperationVoidResultException: &'static NSExceptionName; -} +extern_static!(NSInvocationOperationVoidResultException: &'static NSExceptionName); -extern "C" { - pub static NSInvocationOperationCancelledException: &'static NSExceptionName; -} +extern_static!(NSInvocationOperationCancelledException: &'static NSExceptionName); -pub static NSOperationQueueDefaultMaxConcurrentOperationCount: NSInteger = -1; +extern_static!(NSOperationQueueDefaultMaxConcurrentOperationCount: NSInteger = -1); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs index 9b22e674a..f44091090 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionChange.rs @@ -3,9 +3,13 @@ use crate::common::*; use crate::Foundation::*; -pub type NSCollectionChangeType = NSInteger; -pub const NSCollectionChangeInsert: NSCollectionChangeType = 0; -pub const NSCollectionChangeRemove: NSCollectionChangeType = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSCollectionChangeType { + NSCollectionChangeInsert = 0, + NSCollectionChangeRemove = 1, + } +); __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index 9d6ecffb9..cebee6c49 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -3,13 +3,14 @@ use crate::common::*; use crate::Foundation::*; -pub type NSOrderedCollectionDifferenceCalculationOptions = NSUInteger; -pub const NSOrderedCollectionDifferenceCalculationOmitInsertedObjects: - NSOrderedCollectionDifferenceCalculationOptions = 1 << 0; -pub const NSOrderedCollectionDifferenceCalculationOmitRemovedObjects: - NSOrderedCollectionDifferenceCalculationOptions = 1 << 1; -pub const NSOrderedCollectionDifferenceCalculationInferMoves: - NSOrderedCollectionDifferenceCalculationOptions = 1 << 2; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSOrderedCollectionDifferenceCalculationOptions { + NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = 1 << 0, + NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = 1 << 1, + NSOrderedCollectionDifferenceCalculationInferMoves = 1 << 2, + } +); __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index d2bd1c088..cb81845f0 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -86,38 +86,46 @@ extern_methods!( } ); -pub type NSSearchPathDirectory = NSUInteger; -pub const NSApplicationDirectory: NSSearchPathDirectory = 1; -pub const NSDemoApplicationDirectory: NSSearchPathDirectory = 2; -pub const NSDeveloperApplicationDirectory: NSSearchPathDirectory = 3; -pub const NSAdminApplicationDirectory: NSSearchPathDirectory = 4; -pub const NSLibraryDirectory: NSSearchPathDirectory = 5; -pub const NSDeveloperDirectory: NSSearchPathDirectory = 6; -pub const NSUserDirectory: NSSearchPathDirectory = 7; -pub const NSDocumentationDirectory: NSSearchPathDirectory = 8; -pub const NSDocumentDirectory: NSSearchPathDirectory = 9; -pub const NSCoreServiceDirectory: NSSearchPathDirectory = 10; -pub const NSAutosavedInformationDirectory: NSSearchPathDirectory = 11; -pub const NSDesktopDirectory: NSSearchPathDirectory = 12; -pub const NSCachesDirectory: NSSearchPathDirectory = 13; -pub const NSApplicationSupportDirectory: NSSearchPathDirectory = 14; -pub const NSDownloadsDirectory: NSSearchPathDirectory = 15; -pub const NSInputMethodsDirectory: NSSearchPathDirectory = 16; -pub const NSMoviesDirectory: NSSearchPathDirectory = 17; -pub const NSMusicDirectory: NSSearchPathDirectory = 18; -pub const NSPicturesDirectory: NSSearchPathDirectory = 19; -pub const NSPrinterDescriptionDirectory: NSSearchPathDirectory = 20; -pub const NSSharedPublicDirectory: NSSearchPathDirectory = 21; -pub const NSPreferencePanesDirectory: NSSearchPathDirectory = 22; -pub const NSApplicationScriptsDirectory: NSSearchPathDirectory = 23; -pub const NSItemReplacementDirectory: NSSearchPathDirectory = 99; -pub const NSAllApplicationsDirectory: NSSearchPathDirectory = 100; -pub const NSAllLibrariesDirectory: NSSearchPathDirectory = 101; -pub const NSTrashDirectory: NSSearchPathDirectory = 102; - -pub type NSSearchPathDomainMask = NSUInteger; -pub const NSUserDomainMask: NSSearchPathDomainMask = 1; -pub const NSLocalDomainMask: NSSearchPathDomainMask = 2; -pub const NSNetworkDomainMask: NSSearchPathDomainMask = 4; -pub const NSSystemDomainMask: NSSearchPathDomainMask = 8; -pub const NSAllDomainsMask: NSSearchPathDomainMask = 0x0ffff; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSSearchPathDirectory { + NSApplicationDirectory = 1, + NSDemoApplicationDirectory = 2, + NSDeveloperApplicationDirectory = 3, + NSAdminApplicationDirectory = 4, + NSLibraryDirectory = 5, + NSDeveloperDirectory = 6, + NSUserDirectory = 7, + NSDocumentationDirectory = 8, + NSDocumentDirectory = 9, + NSCoreServiceDirectory = 10, + NSAutosavedInformationDirectory = 11, + NSDesktopDirectory = 12, + NSCachesDirectory = 13, + NSApplicationSupportDirectory = 14, + NSDownloadsDirectory = 15, + NSInputMethodsDirectory = 16, + NSMoviesDirectory = 17, + NSMusicDirectory = 18, + NSPicturesDirectory = 19, + NSPrinterDescriptionDirectory = 20, + NSSharedPublicDirectory = 21, + NSPreferencePanesDirectory = 22, + NSApplicationScriptsDirectory = 23, + NSItemReplacementDirectory = 99, + NSAllApplicationsDirectory = 100, + NSAllLibrariesDirectory = 101, + NSTrashDirectory = 102, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSSearchPathDomainMask { + NSUserDomainMask = 1, + NSLocalDomainMask = 2, + NSNetworkDomainMask = 4, + NSSystemDomainMask = 8, + NSAllDomainsMask = 0x0ffff, + } +); diff --git a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs index df6069f36..4895bc125 100644 --- a/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSPersonNameComponentsFormatter.rs @@ -3,15 +3,23 @@ use crate::common::*; use crate::Foundation::*; -pub type NSPersonNameComponentsFormatterStyle = NSInteger; -pub const NSPersonNameComponentsFormatterStyleDefault: NSPersonNameComponentsFormatterStyle = 0; -pub const NSPersonNameComponentsFormatterStyleShort: NSPersonNameComponentsFormatterStyle = 1; -pub const NSPersonNameComponentsFormatterStyleMedium: NSPersonNameComponentsFormatterStyle = 2; -pub const NSPersonNameComponentsFormatterStyleLong: NSPersonNameComponentsFormatterStyle = 3; -pub const NSPersonNameComponentsFormatterStyleAbbreviated: NSPersonNameComponentsFormatterStyle = 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSPersonNameComponentsFormatterStyle { + NSPersonNameComponentsFormatterStyleDefault = 0, + NSPersonNameComponentsFormatterStyleShort = 1, + NSPersonNameComponentsFormatterStyleMedium = 2, + NSPersonNameComponentsFormatterStyleLong = 3, + NSPersonNameComponentsFormatterStyleAbbreviated = 4, + } +); -pub type NSPersonNameComponentsFormatterOptions = NSUInteger; -pub const NSPersonNameComponentsFormatterPhonetic: NSPersonNameComponentsFormatterOptions = 1 << 1; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSPersonNameComponentsFormatterOptions { + NSPersonNameComponentsFormatterPhonetic = 1 << 1, + } +); extern_class!( #[derive(Debug)] @@ -77,34 +85,18 @@ extern_methods!( } ); -extern "C" { - pub static NSPersonNameComponentKey: &'static NSString; -} +extern_static!(NSPersonNameComponentKey: &'static NSString); -extern "C" { - pub static NSPersonNameComponentGivenName: &'static NSString; -} +extern_static!(NSPersonNameComponentGivenName: &'static NSString); -extern "C" { - pub static NSPersonNameComponentFamilyName: &'static NSString; -} +extern_static!(NSPersonNameComponentFamilyName: &'static NSString); -extern "C" { - pub static NSPersonNameComponentMiddleName: &'static NSString; -} +extern_static!(NSPersonNameComponentMiddleName: &'static NSString); -extern "C" { - pub static NSPersonNameComponentPrefix: &'static NSString; -} +extern_static!(NSPersonNameComponentPrefix: &'static NSString); -extern "C" { - pub static NSPersonNameComponentSuffix: &'static NSString; -} +extern_static!(NSPersonNameComponentSuffix: &'static NSString); -extern "C" { - pub static NSPersonNameComponentNickname: &'static NSString; -} +extern_static!(NSPersonNameComponentNickname: &'static NSString); -extern "C" { - pub static NSPersonNameComponentDelimiter: &'static NSString; -} +extern_static!(NSPersonNameComponentDelimiter: &'static NSString); diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index 87c0896f3..ea1171485 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -3,20 +3,24 @@ use crate::common::*; use crate::Foundation::*; -pub type NSPointerFunctionsOptions = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSPointerFunctionsOptions { + NSPointerFunctionsStrongMemory = 0 << 0, + NSPointerFunctionsZeroingWeakMemory = 1 << 0, + NSPointerFunctionsOpaqueMemory = 2 << 0, + NSPointerFunctionsMallocMemory = 3 << 0, + NSPointerFunctionsMachVirtualMemory = 4 << 0, + NSPointerFunctionsWeakMemory = 5 << 0, + NSPointerFunctionsObjectPersonality = 0 << 8, + NSPointerFunctionsOpaquePersonality = 1 << 8, + NSPointerFunctionsObjectPointerPersonality = 2 << 8, + NSPointerFunctionsCStringPersonality = 3 << 8, + NSPointerFunctionsStructPersonality = 4 << 8, + NSPointerFunctionsIntegerPersonality = 5 << 8, + NSPointerFunctionsCopyIn = 1 << 16, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index 28206dbab..dd1a5aeaf 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -5,9 +5,7 @@ use crate::Foundation::*; pub type NSSocketNativeHandle = c_int; -extern "C" { - pub static NSPortDidBecomeInvalidNotification: &'static NSNotificationName; -} +extern_static!(NSPortDidBecomeInvalidNotification: &'static NSNotificationName); extern_class!( #[derive(Debug)] @@ -83,10 +81,14 @@ extern_methods!( pub type NSPortDelegate = NSObject; -pub type NSMachPortOptions = NSUInteger; -pub const NSMachPortDeallocateNone: NSMachPortOptions = 0; -pub const NSMachPortDeallocateSendRight: NSMachPortOptions = 1 << 0; -pub const NSMachPortDeallocateReceiveRight: NSMachPortOptions = 1 << 1; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSMachPortOptions { + NSMachPortDeallocateNone = 0, + NSMachPortDeallocateSendRight = 1 << 0, + NSMachPortDeallocateReceiveRight = 1 << 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index 0a515faf3..fa680957b 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -3,15 +3,20 @@ use crate::common::*; use crate::Foundation::*; -pub const NSWindowsNTOperatingSystem: c_uint = 1; -pub const NSWindows95OperatingSystem: c_uint = 2; -pub const NSSolarisOperatingSystem: c_uint = 3; -pub const NSHPUXOperatingSystem: c_uint = 4; -pub const NSMACHOperatingSystem: c_uint = 5; -pub const NSSunOSOperatingSystem: c_uint = 6; -pub const NSOSF1OperatingSystem: c_uint = 7; - -struct_impl!( +extern_enum!( + #[underlying(c_uint)] + pub enum { + NSWindowsNTOperatingSystem = 1, + NSWindows95OperatingSystem = 2, + NSSolarisOperatingSystem = 3, + NSHPUXOperatingSystem = 4, + NSMACHOperatingSystem = 5, + NSSunOSOperatingSystem = 6, + NSOSF1OperatingSystem = 7, + } +); + +extern_struct!( pub struct NSOperatingSystemVersion { pub majorVersion: NSInteger, pub minorVersion: NSInteger, @@ -107,17 +112,20 @@ extern_methods!( } ); -pub type NSActivityOptions = u64; -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; +ns_options!( + #[underlying(u64)] + pub enum NSActivityOptions { + NSActivityIdleDisplaySleepDisabled = 1 << 40, + NSActivityIdleSystemSleepDisabled = 1 << 20, + NSActivitySuddenTerminationDisabled = 1 << 14, + NSActivityAutomaticTerminationDisabled = 1 << 15, + NSActivityUserInitiated = 0x00FFFFFF | NSActivityIdleSystemSleepDisabled, + NSActivityUserInitiatedAllowingIdleSystemSleep = + NSActivityUserInitiated & !NSActivityIdleSystemSleepDisabled, + NSActivityBackground = 0x000000FF, + NSActivityLatencyCritical = 0xFF00000000, + } +); extern_methods!( /// NSProcessInfoActivity @@ -160,11 +168,15 @@ extern_methods!( } ); -pub type NSProcessInfoThermalState = NSInteger; -pub const NSProcessInfoThermalStateNominal: NSProcessInfoThermalState = 0; -pub const NSProcessInfoThermalStateFair: NSProcessInfoThermalState = 1; -pub const NSProcessInfoThermalStateSerious: NSProcessInfoThermalState = 2; -pub const NSProcessInfoThermalStateCritical: NSProcessInfoThermalState = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSProcessInfoThermalState { + NSProcessInfoThermalStateNominal = 0, + NSProcessInfoThermalStateFair = 1, + NSProcessInfoThermalStateSerious = 2, + NSProcessInfoThermalStateCritical = 3, + } +); extern_methods!( /// NSProcessInfoThermalState @@ -182,13 +194,9 @@ extern_methods!( } ); -extern "C" { - pub static NSProcessInfoThermalStateDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSProcessInfoThermalStateDidChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSProcessInfoPowerStateDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSProcessInfoPowerStateDidChangeNotification: &'static NSNotificationName); extern_methods!( /// NSProcessInfoPlatform diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index e6acf9228..401646ecd 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -221,67 +221,36 @@ extern_methods!( pub type NSProgressReporting = NSObject; -extern "C" { - pub static NSProgressEstimatedTimeRemainingKey: &'static NSProgressUserInfoKey; -} - -extern "C" { - pub static NSProgressThroughputKey: &'static NSProgressUserInfoKey; -} - -extern "C" { - pub static NSProgressKindFile: &'static NSProgressKind; -} - -extern "C" { - pub static NSProgressFileOperationKindKey: &'static NSProgressUserInfoKey; -} - -extern "C" { - pub static NSProgressFileOperationKindDownloading: &'static NSProgressFileOperationKind; -} - -extern "C" { - pub static NSProgressFileOperationKindDecompressingAfterDownloading: - &'static NSProgressFileOperationKind; -} - -extern "C" { - pub static NSProgressFileOperationKindReceiving: &'static NSProgressFileOperationKind; -} - -extern "C" { - pub static NSProgressFileOperationKindCopying: &'static NSProgressFileOperationKind; -} - -extern "C" { - pub static NSProgressFileOperationKindUploading: &'static NSProgressFileOperationKind; -} - -extern "C" { - pub static NSProgressFileOperationKindDuplicating: &'static NSProgressFileOperationKind; -} - -extern "C" { - pub static NSProgressFileURLKey: &'static NSProgressUserInfoKey; -} - -extern "C" { - pub static NSProgressFileTotalCountKey: &'static NSProgressUserInfoKey; -} - -extern "C" { - pub static NSProgressFileCompletedCountKey: &'static NSProgressUserInfoKey; -} - -extern "C" { - pub static NSProgressFileAnimationImageKey: &'static NSProgressUserInfoKey; -} - -extern "C" { - pub static NSProgressFileAnimationImageOriginalRectKey: &'static NSProgressUserInfoKey; -} - -extern "C" { - pub static NSProgressFileIconKey: &'static NSProgressUserInfoKey; -} +extern_static!(NSProgressEstimatedTimeRemainingKey: &'static NSProgressUserInfoKey); + +extern_static!(NSProgressThroughputKey: &'static NSProgressUserInfoKey); + +extern_static!(NSProgressKindFile: &'static NSProgressKind); + +extern_static!(NSProgressFileOperationKindKey: &'static NSProgressUserInfoKey); + +extern_static!(NSProgressFileOperationKindDownloading: &'static NSProgressFileOperationKind); + +extern_static!( + NSProgressFileOperationKindDecompressingAfterDownloading: &'static NSProgressFileOperationKind +); + +extern_static!(NSProgressFileOperationKindReceiving: &'static NSProgressFileOperationKind); + +extern_static!(NSProgressFileOperationKindCopying: &'static NSProgressFileOperationKind); + +extern_static!(NSProgressFileOperationKindUploading: &'static NSProgressFileOperationKind); + +extern_static!(NSProgressFileOperationKindDuplicating: &'static NSProgressFileOperationKind); + +extern_static!(NSProgressFileURLKey: &'static NSProgressUserInfoKey); + +extern_static!(NSProgressFileTotalCountKey: &'static NSProgressUserInfoKey); + +extern_static!(NSProgressFileCompletedCountKey: &'static NSProgressUserInfoKey); + +extern_static!(NSProgressFileAnimationImageKey: &'static NSProgressUserInfoKey); + +extern_static!(NSProgressFileAnimationImageOriginalRectKey: &'static NSProgressUserInfoKey); + +extern_static!(NSProgressFileIconKey: &'static NSProgressUserInfoKey); diff --git a/crates/icrate/src/generated/Foundation/NSPropertyList.rs b/crates/icrate/src/generated/Foundation/NSPropertyList.rs index 7d6a97806..3970b29c4 100644 --- a/crates/icrate/src/generated/Foundation/NSPropertyList.rs +++ b/crates/icrate/src/generated/Foundation/NSPropertyList.rs @@ -3,15 +3,23 @@ use crate::common::*; use crate::Foundation::*; -pub type NSPropertyListMutabilityOptions = NSUInteger; -pub const NSPropertyListImmutable: NSPropertyListMutabilityOptions = 0; -pub const NSPropertyListMutableContainers: NSPropertyListMutabilityOptions = 1; -pub const NSPropertyListMutableContainersAndLeaves: NSPropertyListMutabilityOptions = 2; - -pub type NSPropertyListFormat = NSUInteger; -pub const NSPropertyListOpenStepFormat: NSPropertyListFormat = 1; -pub const NSPropertyListXMLFormat_v1_0: NSPropertyListFormat = 100; -pub const NSPropertyListBinaryFormat_v1_0: NSPropertyListFormat = 200; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSPropertyListMutabilityOptions { + NSPropertyListImmutable = 0, + NSPropertyListMutableContainers = 1, + NSPropertyListMutableContainersAndLeaves = 2, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSPropertyListFormat { + NSPropertyListOpenStepFormat = 1, + NSPropertyListXMLFormat_v1_0 = 100, + NSPropertyListBinaryFormat_v1_0 = 200, + } +); pub type NSPropertyListReadOptions = NSPropertyListMutabilityOptions; diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index c5e0d6548..64ef7147f 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -3,7 +3,7 @@ use crate::common::*; use crate::Foundation::*; -struct_impl!( +extern_struct!( pub struct NSRange { pub location: NSUInteger, pub length: NSUInteger, diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 4dc80f8d7..9f1f51428 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -3,14 +3,18 @@ use crate::common::*; use crate::Foundation::*; -pub type NSRegularExpressionOptions = NSUInteger; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSRegularExpressionOptions { + NSRegularExpressionCaseInsensitive = 1 << 0, + NSRegularExpressionAllowCommentsAndWhitespace = 1 << 1, + NSRegularExpressionIgnoreMetacharacters = 1 << 2, + NSRegularExpressionDotMatchesLineSeparators = 1 << 3, + NSRegularExpressionAnchorsMatchLines = 1 << 4, + NSRegularExpressionUseUnixLineSeparators = 1 << 5, + NSRegularExpressionUseUnicodeWordBoundaries = 1 << 6, + } +); extern_class!( #[derive(Debug)] @@ -50,19 +54,27 @@ extern_methods!( } ); -pub type NSMatchingOptions = NSUInteger; -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 << 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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSMatchingOptions { + NSMatchingReportProgress = 1 << 0, + NSMatchingReportCompletion = 1 << 1, + NSMatchingAnchored = 1 << 2, + NSMatchingWithTransparentBounds = 1 << 3, + NSMatchingWithoutAnchoringBounds = 1 << 4, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSMatchingFlags { + NSMatchingProgress = 1 << 0, + NSMatchingCompleted = 1 << 1, + NSMatchingHitEnd = 1 << 2, + NSMatchingRequiredEnd = 1 << 3, + NSMatchingInternalError = 1 << 4, + } +); extern_methods!( /// NSMatching diff --git a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs index 24878aa23..eea5cfe05 100644 --- a/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs +++ b/crates/icrate/src/generated/Foundation/NSRelativeDateTimeFormatter.rs @@ -3,16 +3,23 @@ use crate::common::*; use crate::Foundation::*; -pub type NSRelativeDateTimeFormatterStyle = NSInteger; -pub const NSRelativeDateTimeFormatterStyleNumeric: NSRelativeDateTimeFormatterStyle = 0; -pub const NSRelativeDateTimeFormatterStyleNamed: NSRelativeDateTimeFormatterStyle = 1; - -pub type NSRelativeDateTimeFormatterUnitsStyle = NSInteger; -pub const NSRelativeDateTimeFormatterUnitsStyleFull: NSRelativeDateTimeFormatterUnitsStyle = 0; -pub const NSRelativeDateTimeFormatterUnitsStyleSpellOut: NSRelativeDateTimeFormatterUnitsStyle = 1; -pub const NSRelativeDateTimeFormatterUnitsStyleShort: NSRelativeDateTimeFormatterUnitsStyle = 2; -pub const NSRelativeDateTimeFormatterUnitsStyleAbbreviated: NSRelativeDateTimeFormatterUnitsStyle = - 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSRelativeDateTimeFormatterStyle { + NSRelativeDateTimeFormatterStyleNumeric = 0, + NSRelativeDateTimeFormatterStyleNamed = 1, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSRelativeDateTimeFormatterUnitsStyle { + NSRelativeDateTimeFormatterUnitsStyleFull = 0, + NSRelativeDateTimeFormatterUnitsStyleSpellOut = 1, + NSRelativeDateTimeFormatterUnitsStyleShort = 2, + NSRelativeDateTimeFormatterUnitsStyleAbbreviated = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 4c19bf0e3..848c8c5e5 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -3,13 +3,9 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSDefaultRunLoopMode: &'static NSRunLoopMode; -} +extern_static!(NSDefaultRunLoopMode: &'static NSRunLoopMode); -extern "C" { - pub static NSRunLoopCommonModes: &'static NSRunLoopMode; -} +extern_static!(NSRunLoopCommonModes: &'static NSRunLoopMode); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs index 2bd809708..412255b84 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptCommand.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptCommand.rs @@ -3,17 +3,22 @@ use crate::common::*; use crate::Foundation::*; -pub const NSNoScriptError: NSInteger = 0; -pub const NSReceiverEvaluationScriptError: NSInteger = 1; -pub const NSKeySpecifierEvaluationScriptError: NSInteger = 2; -pub const NSArgumentEvaluationScriptError: NSInteger = 3; -pub const NSReceiversCantHandleCommandScriptError: NSInteger = 4; -pub const NSRequiredArgumentsMissingScriptError: NSInteger = 5; -pub const NSArgumentsWrongScriptError: NSInteger = 6; -pub const NSUnknownKeyScriptError: NSInteger = 7; -pub const NSInternalScriptError: NSInteger = 8; -pub const NSOperationNotSupportedForKeyScriptError: NSInteger = 9; -pub const NSCannotCreateScriptCommandError: NSInteger = 10; +ns_enum!( + #[underlying(NSInteger)] + pub enum { + NSNoScriptError = 0, + NSReceiverEvaluationScriptError = 1, + NSKeySpecifierEvaluationScriptError = 2, + NSArgumentEvaluationScriptError = 3, + NSReceiversCantHandleCommandScriptError = 4, + NSRequiredArgumentsMissingScriptError = 5, + NSArgumentsWrongScriptError = 6, + NSUnknownKeyScriptError = 7, + NSInternalScriptError = 8, + NSOperationNotSupportedForKeyScriptError = 9, + NSCannotCreateScriptCommandError = 10, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs index 6546ff98d..53e850964 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptKeyValueCoding.rs @@ -3,9 +3,7 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSOperationNotSupportedForKeyException: &'static NSString; -} +extern_static!(NSOperationNotSupportedForKeyException: &'static NSString); extern_methods!( /// NSScriptKeyValueCoding diff --git a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs index 23528c7bd..4f938dcee 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptObjectSpecifiers.rs @@ -3,31 +3,48 @@ use crate::common::*; use crate::Foundation::*; -pub const NSNoSpecifierError: NSInteger = 0; -pub const NSNoTopLevelContainersSpecifierError: NSInteger = 1; -pub const NSContainerSpecifierError: NSInteger = 2; -pub const NSUnknownKeySpecifierError: NSInteger = 3; -pub const NSInvalidIndexSpecifierError: NSInteger = 4; -pub const NSInternalSpecifierError: NSInteger = 5; -pub const NSOperationNotSupportedForKeySpecifierError: NSInteger = 6; - -pub type NSInsertionPosition = NSUInteger; -pub const NSPositionAfter: NSInsertionPosition = 0; -pub const NSPositionBefore: NSInsertionPosition = 1; -pub const NSPositionBeginning: NSInsertionPosition = 2; -pub const NSPositionEnd: NSInsertionPosition = 3; -pub const NSPositionReplace: NSInsertionPosition = 4; - -pub type NSRelativePosition = NSUInteger; -pub const NSRelativeAfter: NSRelativePosition = 0; -pub const NSRelativeBefore: NSRelativePosition = 1; - -pub type NSWhoseSubelementIdentifier = NSUInteger; -pub const NSIndexSubelement: NSWhoseSubelementIdentifier = 0; -pub const NSEverySubelement: NSWhoseSubelementIdentifier = 1; -pub const NSMiddleSubelement: NSWhoseSubelementIdentifier = 2; -pub const NSRandomSubelement: NSWhoseSubelementIdentifier = 3; -pub const NSNoSubelement: NSWhoseSubelementIdentifier = 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum { + NSNoSpecifierError = 0, + NSNoTopLevelContainersSpecifierError = 1, + NSContainerSpecifierError = 2, + NSUnknownKeySpecifierError = 3, + NSInvalidIndexSpecifierError = 4, + NSInternalSpecifierError = 5, + NSOperationNotSupportedForKeySpecifierError = 6, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSInsertionPosition { + NSPositionAfter = 0, + NSPositionBefore = 1, + NSPositionBeginning = 2, + NSPositionEnd = 3, + NSPositionReplace = 4, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSRelativePosition { + NSRelativeAfter = 0, + NSRelativeBefore = 1, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSWhoseSubelementIdentifier { + NSIndexSubelement = 0, + NSEverySubelement = 1, + NSMiddleSubelement = 2, + NSRandomSubelement = 3, + NSNoSubelement = 4, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs index e833d7757..fba08a56f 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptStandardSuiteCommands.rs @@ -3,10 +3,14 @@ use crate::common::*; use crate::Foundation::*; -pub type NSSaveOptions = NSUInteger; -pub const NSSaveOptionsYes: NSSaveOptions = 0; -pub const NSSaveOptionsNo: NSSaveOptions = 1; -pub const NSSaveOptionsAsk: NSSaveOptions = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSSaveOptions { + NSSaveOptionsYes = 0, + NSSaveOptionsNo = 1, + NSSaveOptionsAsk = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs index 3904a1eba..310fa731c 100644 --- a/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs +++ b/crates/icrate/src/generated/Foundation/NSScriptWhoseTests.rs @@ -3,15 +3,19 @@ use crate::common::*; use crate::Foundation::*; -pub type NSTestComparisonOperation = NSUInteger; -pub const NSEqualToComparison: NSTestComparisonOperation = 0; -pub const NSLessThanOrEqualToComparison: NSTestComparisonOperation = 1; -pub const NSLessThanComparison: NSTestComparisonOperation = 2; -pub const NSGreaterThanOrEqualToComparison: NSTestComparisonOperation = 3; -pub const NSGreaterThanComparison: NSTestComparisonOperation = 4; -pub const NSBeginsWithComparison: NSTestComparisonOperation = 5; -pub const NSEndsWithComparison: NSTestComparisonOperation = 6; -pub const NSContainsComparison: NSTestComparisonOperation = 7; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSTestComparisonOperation { + NSEqualToComparison = 0, + NSLessThanOrEqualToComparison = 1, + NSLessThanComparison = 2, + NSGreaterThanOrEqualToComparison = 3, + NSGreaterThanComparison = 4, + NSBeginsWithComparison = 5, + NSEndsWithComparison = 6, + NSContainsComparison = 7, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 257898c02..0a032e8f3 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -39,16 +39,10 @@ extern_methods!( } ); -extern "C" { - pub static NSGrammarRange: &'static NSString; -} +extern_static!(NSGrammarRange: &'static NSString); -extern "C" { - pub static NSGrammarUserDescription: &'static NSString; -} +extern_static!(NSGrammarUserDescription: &'static NSString); -extern "C" { - pub static NSGrammarCorrections: &'static NSString; -} +extern_static!(NSGrammarCorrections: &'static NSString); pub type NSSpellServerDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index 247c12ac5..adfecf53d 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -5,23 +5,31 @@ use crate::Foundation::*; pub type NSStreamPropertyKey = NSString; -pub type NSStreamStatus = NSUInteger; -pub const NSStreamStatusNotOpen: NSStreamStatus = 0; -pub const NSStreamStatusOpening: NSStreamStatus = 1; -pub const NSStreamStatusOpen: NSStreamStatus = 2; -pub const NSStreamStatusReading: NSStreamStatus = 3; -pub const NSStreamStatusWriting: NSStreamStatus = 4; -pub const NSStreamStatusAtEnd: NSStreamStatus = 5; -pub const NSStreamStatusClosed: NSStreamStatus = 6; -pub const NSStreamStatusError: NSStreamStatus = 7; - -pub type NSStreamEvent = NSUInteger; -pub const NSStreamEventNone: NSStreamEvent = 0; -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; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSStreamStatus { + NSStreamStatusNotOpen = 0, + NSStreamStatusOpening = 1, + NSStreamStatusOpen = 2, + NSStreamStatusReading = 3, + NSStreamStatusWriting = 4, + NSStreamStatusAtEnd = 5, + NSStreamStatusClosed = 6, + NSStreamStatusError = 7, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSStreamEvent { + NSStreamEventNone = 0, + NSStreamEventOpenCompleted = 1 << 0, + NSStreamEventHasBytesAvailable = 1 << 1, + NSStreamEventHasSpaceAvailable = 1 << 2, + NSStreamEventErrorOccurred = 1 << 3, + NSStreamEventEndEncountered = 1 << 4, + } +); extern_class!( #[derive(Debug)] @@ -235,106 +243,58 @@ extern_methods!( pub type NSStreamDelegate = NSObject; -extern "C" { - pub static NSStreamSocketSecurityLevelKey: &'static NSStreamPropertyKey; -} +extern_static!(NSStreamSocketSecurityLevelKey: &'static NSStreamPropertyKey); pub type NSStreamSocketSecurityLevel = NSString; -extern "C" { - pub static NSStreamSocketSecurityLevelNone: &'static NSStreamSocketSecurityLevel; -} +extern_static!(NSStreamSocketSecurityLevelNone: &'static NSStreamSocketSecurityLevel); -extern "C" { - pub static NSStreamSocketSecurityLevelSSLv2: &'static NSStreamSocketSecurityLevel; -} +extern_static!(NSStreamSocketSecurityLevelSSLv2: &'static NSStreamSocketSecurityLevel); -extern "C" { - pub static NSStreamSocketSecurityLevelSSLv3: &'static NSStreamSocketSecurityLevel; -} +extern_static!(NSStreamSocketSecurityLevelSSLv3: &'static NSStreamSocketSecurityLevel); -extern "C" { - pub static NSStreamSocketSecurityLevelTLSv1: &'static NSStreamSocketSecurityLevel; -} +extern_static!(NSStreamSocketSecurityLevelTLSv1: &'static NSStreamSocketSecurityLevel); -extern "C" { - pub static NSStreamSocketSecurityLevelNegotiatedSSL: &'static NSStreamSocketSecurityLevel; -} +extern_static!(NSStreamSocketSecurityLevelNegotiatedSSL: &'static NSStreamSocketSecurityLevel); -extern "C" { - pub static NSStreamSOCKSProxyConfigurationKey: &'static NSStreamPropertyKey; -} +extern_static!(NSStreamSOCKSProxyConfigurationKey: &'static NSStreamPropertyKey); pub type NSStreamSOCKSProxyConfiguration = NSString; -extern "C" { - pub static NSStreamSOCKSProxyHostKey: &'static NSStreamSOCKSProxyConfiguration; -} +extern_static!(NSStreamSOCKSProxyHostKey: &'static NSStreamSOCKSProxyConfiguration); -extern "C" { - pub static NSStreamSOCKSProxyPortKey: &'static NSStreamSOCKSProxyConfiguration; -} +extern_static!(NSStreamSOCKSProxyPortKey: &'static NSStreamSOCKSProxyConfiguration); -extern "C" { - pub static NSStreamSOCKSProxyVersionKey: &'static NSStreamSOCKSProxyConfiguration; -} +extern_static!(NSStreamSOCKSProxyVersionKey: &'static NSStreamSOCKSProxyConfiguration); -extern "C" { - pub static NSStreamSOCKSProxyUserKey: &'static NSStreamSOCKSProxyConfiguration; -} +extern_static!(NSStreamSOCKSProxyUserKey: &'static NSStreamSOCKSProxyConfiguration); -extern "C" { - pub static NSStreamSOCKSProxyPasswordKey: &'static NSStreamSOCKSProxyConfiguration; -} +extern_static!(NSStreamSOCKSProxyPasswordKey: &'static NSStreamSOCKSProxyConfiguration); pub type NSStreamSOCKSProxyVersion = NSString; -extern "C" { - pub static NSStreamSOCKSProxyVersion4: &'static NSStreamSOCKSProxyVersion; -} +extern_static!(NSStreamSOCKSProxyVersion4: &'static NSStreamSOCKSProxyVersion); -extern "C" { - pub static NSStreamSOCKSProxyVersion5: &'static NSStreamSOCKSProxyVersion; -} +extern_static!(NSStreamSOCKSProxyVersion5: &'static NSStreamSOCKSProxyVersion); -extern "C" { - pub static NSStreamDataWrittenToMemoryStreamKey: &'static NSStreamPropertyKey; -} +extern_static!(NSStreamDataWrittenToMemoryStreamKey: &'static NSStreamPropertyKey); -extern "C" { - pub static NSStreamFileCurrentOffsetKey: &'static NSStreamPropertyKey; -} +extern_static!(NSStreamFileCurrentOffsetKey: &'static NSStreamPropertyKey); -extern "C" { - pub static NSStreamSocketSSLErrorDomain: &'static NSErrorDomain; -} +extern_static!(NSStreamSocketSSLErrorDomain: &'static NSErrorDomain); -extern "C" { - pub static NSStreamSOCKSErrorDomain: &'static NSErrorDomain; -} +extern_static!(NSStreamSOCKSErrorDomain: &'static NSErrorDomain); -extern "C" { - pub static NSStreamNetworkServiceType: &'static NSStreamPropertyKey; -} +extern_static!(NSStreamNetworkServiceType: &'static NSStreamPropertyKey); pub type NSStreamNetworkServiceTypeValue = NSString; -extern "C" { - pub static NSStreamNetworkServiceTypeVoIP: &'static NSStreamNetworkServiceTypeValue; -} +extern_static!(NSStreamNetworkServiceTypeVoIP: &'static NSStreamNetworkServiceTypeValue); -extern "C" { - pub static NSStreamNetworkServiceTypeVideo: &'static NSStreamNetworkServiceTypeValue; -} +extern_static!(NSStreamNetworkServiceTypeVideo: &'static NSStreamNetworkServiceTypeValue); -extern "C" { - pub static NSStreamNetworkServiceTypeBackground: &'static NSStreamNetworkServiceTypeValue; -} +extern_static!(NSStreamNetworkServiceTypeBackground: &'static NSStreamNetworkServiceTypeValue); -extern "C" { - pub static NSStreamNetworkServiceTypeVoice: &'static NSStreamNetworkServiceTypeValue; -} +extern_static!(NSStreamNetworkServiceTypeVoice: &'static NSStreamNetworkServiceTypeValue); -extern "C" { - pub static NSStreamNetworkServiceTypeCallSignaling: &'static NSStreamNetworkServiceTypeValue; -} +extern_static!(NSStreamNetworkServiceTypeCallSignaling: &'static NSStreamNetworkServiceTypeValue); diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index a1872cc79..161b86949 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -5,46 +5,59 @@ use crate::Foundation::*; pub type unichar = c_ushort; -pub type NSStringCompareOptions = NSUInteger; -pub const NSCaseInsensitiveSearch: NSStringCompareOptions = 1; -pub const NSLiteralSearch: NSStringCompareOptions = 2; -pub const NSBackwardsSearch: NSStringCompareOptions = 4; -pub const NSAnchoredSearch: NSStringCompareOptions = 8; -pub const NSNumericSearch: NSStringCompareOptions = 64; -pub const NSDiacriticInsensitiveSearch: NSStringCompareOptions = 128; -pub const NSWidthInsensitiveSearch: NSStringCompareOptions = 256; -pub const NSForcedOrderingSearch: NSStringCompareOptions = 512; -pub const NSRegularExpressionSearch: NSStringCompareOptions = 1024; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSStringCompareOptions { + NSCaseInsensitiveSearch = 1, + NSLiteralSearch = 2, + NSBackwardsSearch = 4, + NSAnchoredSearch = 8, + NSNumericSearch = 64, + NSDiacriticInsensitiveSearch = 128, + NSWidthInsensitiveSearch = 256, + NSForcedOrderingSearch = 512, + NSRegularExpressionSearch = 1024, + } +); pub type NSStringEncoding = NSUInteger; -pub const NSASCIIStringEncoding: NSStringEncoding = 1; -pub const NSNEXTSTEPStringEncoding: NSStringEncoding = 2; -pub const NSJapaneseEUCStringEncoding: NSStringEncoding = 3; -pub const NSUTF8StringEncoding: NSStringEncoding = 4; -pub const NSISOLatin1StringEncoding: NSStringEncoding = 5; -pub const NSSymbolStringEncoding: NSStringEncoding = 6; -pub const NSNonLossyASCIIStringEncoding: NSStringEncoding = 7; -pub const NSShiftJISStringEncoding: NSStringEncoding = 8; -pub const NSISOLatin2StringEncoding: NSStringEncoding = 9; -pub const NSUnicodeStringEncoding: NSStringEncoding = 10; -pub const NSWindowsCP1251StringEncoding: NSStringEncoding = 11; -pub const NSWindowsCP1252StringEncoding: NSStringEncoding = 12; -pub const NSWindowsCP1253StringEncoding: NSStringEncoding = 13; -pub const NSWindowsCP1254StringEncoding: NSStringEncoding = 14; -pub const NSWindowsCP1250StringEncoding: NSStringEncoding = 15; -pub const NSISO2022JPStringEncoding: NSStringEncoding = 21; -pub const NSMacOSRomanStringEncoding: NSStringEncoding = 30; -pub const NSUTF16StringEncoding: NSStringEncoding = NSUnicodeStringEncoding; -pub const NSUTF16BigEndianStringEncoding: NSStringEncoding = 0x90000100; -pub const NSUTF16LittleEndianStringEncoding: NSStringEncoding = 0x94000100; -pub const NSUTF32StringEncoding: NSStringEncoding = 0x8c000100; -pub const NSUTF32BigEndianStringEncoding: NSStringEncoding = 0x98000100; -pub const NSUTF32LittleEndianStringEncoding: NSStringEncoding = 0x9c000100; - -pub type NSStringEncodingConversionOptions = NSUInteger; -pub const NSStringEncodingConversionAllowLossy: NSStringEncodingConversionOptions = 1; -pub const NSStringEncodingConversionExternalRepresentation: NSStringEncodingConversionOptions = 2; +ns_enum!( + #[underlying(NSStringEncoding)] + pub enum { + NSASCIIStringEncoding = 1, + NSNEXTSTEPStringEncoding = 2, + NSJapaneseEUCStringEncoding = 3, + NSUTF8StringEncoding = 4, + NSISOLatin1StringEncoding = 5, + NSSymbolStringEncoding = 6, + NSNonLossyASCIIStringEncoding = 7, + NSShiftJISStringEncoding = 8, + NSISOLatin2StringEncoding = 9, + NSUnicodeStringEncoding = 10, + NSWindowsCP1251StringEncoding = 11, + NSWindowsCP1252StringEncoding = 12, + NSWindowsCP1253StringEncoding = 13, + NSWindowsCP1254StringEncoding = 14, + NSWindowsCP1250StringEncoding = 15, + NSISO2022JPStringEncoding = 21, + NSMacOSRomanStringEncoding = 30, + NSUTF16StringEncoding = NSUnicodeStringEncoding, + NSUTF16BigEndianStringEncoding = 0x90000100, + NSUTF16LittleEndianStringEncoding = 0x94000100, + NSUTF32StringEncoding = 0x8c000100, + NSUTF32BigEndianStringEncoding = 0x98000100, + NSUTF32LittleEndianStringEncoding = 0x9c000100, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSStringEncodingConversionOptions { + NSStringEncodingConversionAllowLossy = 1, + NSStringEncodingConversionExternalRepresentation = 2, + } +); extern_class!( #[derive(Debug)] @@ -74,83 +87,55 @@ extern_methods!( } ); -pub type NSStringEnumerationOptions = NSUInteger; -pub const NSStringEnumerationByLines: NSStringEnumerationOptions = 0; -pub const NSStringEnumerationByParagraphs: NSStringEnumerationOptions = 1; -pub const NSStringEnumerationByComposedCharacterSequences: NSStringEnumerationOptions = 2; -pub const NSStringEnumerationByWords: NSStringEnumerationOptions = 3; -pub const NSStringEnumerationBySentences: NSStringEnumerationOptions = 4; -pub const NSStringEnumerationByCaretPositions: NSStringEnumerationOptions = 5; -pub const NSStringEnumerationByDeletionClusters: NSStringEnumerationOptions = 6; -pub const NSStringEnumerationReverse: NSStringEnumerationOptions = 1 << 8; -pub const NSStringEnumerationSubstringNotRequired: NSStringEnumerationOptions = 1 << 9; -pub const NSStringEnumerationLocalized: NSStringEnumerationOptions = 1 << 10; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSStringEnumerationOptions { + NSStringEnumerationByLines = 0, + NSStringEnumerationByParagraphs = 1, + NSStringEnumerationByComposedCharacterSequences = 2, + NSStringEnumerationByWords = 3, + NSStringEnumerationBySentences = 4, + NSStringEnumerationByCaretPositions = 5, + NSStringEnumerationByDeletionClusters = 6, + NSStringEnumerationReverse = 1 << 8, + NSStringEnumerationSubstringNotRequired = 1 << 9, + NSStringEnumerationLocalized = 1 << 10, + } +); pub type NSStringTransform = NSString; -extern "C" { - pub static NSStringTransformLatinToKatakana: &'static NSStringTransform; -} +extern_static!(NSStringTransformLatinToKatakana: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformLatinToHiragana: &'static NSStringTransform; -} +extern_static!(NSStringTransformLatinToHiragana: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformLatinToHangul: &'static NSStringTransform; -} +extern_static!(NSStringTransformLatinToHangul: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformLatinToArabic: &'static NSStringTransform; -} +extern_static!(NSStringTransformLatinToArabic: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformLatinToHebrew: &'static NSStringTransform; -} +extern_static!(NSStringTransformLatinToHebrew: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformLatinToThai: &'static NSStringTransform; -} +extern_static!(NSStringTransformLatinToThai: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformLatinToCyrillic: &'static NSStringTransform; -} +extern_static!(NSStringTransformLatinToCyrillic: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformLatinToGreek: &'static NSStringTransform; -} +extern_static!(NSStringTransformLatinToGreek: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformToLatin: &'static NSStringTransform; -} +extern_static!(NSStringTransformToLatin: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformMandarinToLatin: &'static NSStringTransform; -} +extern_static!(NSStringTransformMandarinToLatin: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformHiraganaToKatakana: &'static NSStringTransform; -} +extern_static!(NSStringTransformHiraganaToKatakana: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformFullwidthToHalfwidth: &'static NSStringTransform; -} +extern_static!(NSStringTransformFullwidthToHalfwidth: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformToXMLHex: &'static NSStringTransform; -} +extern_static!(NSStringTransformToXMLHex: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformToUnicodeName: &'static NSStringTransform; -} +extern_static!(NSStringTransformToUnicodeName: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformStripCombiningMarks: &'static NSStringTransform; -} +extern_static!(NSStringTransformStripCombiningMarks: &'static NSStringTransform); -extern "C" { - pub static NSStringTransformStripDiacritics: &'static NSStringTransform; -} +extern_static!(NSStringTransformStripDiacritics: &'static NSStringTransform); extern_methods!( /// NSStringExtensionMethods @@ -697,39 +682,34 @@ extern_methods!( pub type NSStringEncodingDetectionOptionsKey = NSString; -extern "C" { - pub static NSStringEncodingDetectionSuggestedEncodingsKey: - &'static NSStringEncodingDetectionOptionsKey; -} +extern_static!( + NSStringEncodingDetectionSuggestedEncodingsKey: &'static NSStringEncodingDetectionOptionsKey +); -extern "C" { - pub static NSStringEncodingDetectionDisallowedEncodingsKey: - &'static NSStringEncodingDetectionOptionsKey; -} +extern_static!( + NSStringEncodingDetectionDisallowedEncodingsKey: &'static NSStringEncodingDetectionOptionsKey +); -extern "C" { - pub static NSStringEncodingDetectionUseOnlySuggestedEncodingsKey: - &'static NSStringEncodingDetectionOptionsKey; -} +extern_static!( + NSStringEncodingDetectionUseOnlySuggestedEncodingsKey: + &'static NSStringEncodingDetectionOptionsKey +); -extern "C" { - pub static NSStringEncodingDetectionAllowLossyKey: &'static NSStringEncodingDetectionOptionsKey; -} +extern_static!( + NSStringEncodingDetectionAllowLossyKey: &'static NSStringEncodingDetectionOptionsKey +); -extern "C" { - pub static NSStringEncodingDetectionFromWindowsKey: - &'static NSStringEncodingDetectionOptionsKey; -} +extern_static!( + NSStringEncodingDetectionFromWindowsKey: &'static NSStringEncodingDetectionOptionsKey +); -extern "C" { - pub static NSStringEncodingDetectionLossySubstitutionKey: - &'static NSStringEncodingDetectionOptionsKey; -} +extern_static!( + NSStringEncodingDetectionLossySubstitutionKey: &'static NSStringEncodingDetectionOptionsKey +); -extern "C" { - pub static NSStringEncodingDetectionLikelyLanguageKey: - &'static NSStringEncodingDetectionOptionsKey; -} +extern_static!( + NSStringEncodingDetectionLikelyLanguageKey: &'static NSStringEncodingDetectionOptionsKey +); extern_methods!( /// NSStringEncodingDetection @@ -813,13 +793,9 @@ extern_methods!( } ); -extern "C" { - pub static NSCharacterConversionException: &'static NSExceptionName; -} +extern_static!(NSCharacterConversionException: &'static NSExceptionName); -extern "C" { - pub static NSParseErrorException: &'static NSExceptionName; -} +extern_static!(NSParseErrorException: &'static NSExceptionName); extern_methods!( /// NSExtendedStringPropertyListParsing @@ -922,7 +898,12 @@ extern_methods!( } ); -pub const NSProprietaryStringEncoding: NSStringEncoding = 65536; +ns_enum!( + #[underlying(NSStringEncoding)] + pub enum { + NSProprietaryStringEncoding = 65536, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index a63857a4f..09ba8c4d3 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -3,9 +3,13 @@ use crate::common::*; use crate::Foundation::*; -pub type NSTaskTerminationReason = NSInteger; -pub const NSTaskTerminationReasonExit: NSTaskTerminationReason = 1; -pub const NSTaskTerminationReasonUncaughtSignal: NSTaskTerminationReason = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTaskTerminationReason { + NSTaskTerminationReasonExit = 1, + NSTaskTerminationReasonUncaughtSignal = 2, + } +); extern_class!( #[derive(Debug)] @@ -146,6 +150,4 @@ extern_methods!( } ); -extern "C" { - pub static NSTaskDidTerminateNotification: &'static NSNotificationName; -} +extern_static!(NSTaskDidTerminateNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs index a4733b579..8e522a214 100644 --- a/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs +++ b/crates/icrate/src/generated/Foundation/NSTextCheckingResult.rs @@ -3,27 +3,35 @@ use crate::common::*; use crate::Foundation::*; -pub type NSTextCheckingType = u64; -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; +ns_options!( + #[underlying(u64)] + pub enum NSTextCheckingType { + NSTextCheckingTypeOrthography = 1 << 0, + NSTextCheckingTypeSpelling = 1 << 1, + NSTextCheckingTypeGrammar = 1 << 2, + NSTextCheckingTypeDate = 1 << 3, + NSTextCheckingTypeAddress = 1 << 4, + NSTextCheckingTypeLink = 1 << 5, + NSTextCheckingTypeQuote = 1 << 6, + NSTextCheckingTypeDash = 1 << 7, + NSTextCheckingTypeReplacement = 1 << 8, + NSTextCheckingTypeCorrection = 1 << 9, + NSTextCheckingTypeRegularExpression = 1 << 10, + NSTextCheckingTypePhoneNumber = 1 << 11, + NSTextCheckingTypeTransitInformation = 1 << 12, + } +); pub type NSTextCheckingTypes = u64; -pub const NSTextCheckingAllSystemTypes: NSTextCheckingTypes = 0xffffffff; -pub const NSTextCheckingAllCustomTypes: NSTextCheckingTypes = 0xffffffff << 32; -pub const NSTextCheckingAllTypes: NSTextCheckingTypes = - NSTextCheckingAllSystemTypes | NSTextCheckingAllCustomTypes; +ns_enum!( + #[underlying(NSTextCheckingTypes)] + pub enum { + NSTextCheckingAllSystemTypes = 0xffffffff, + NSTextCheckingAllCustomTypes = 0xffffffff<<32, + NSTextCheckingAllTypes = NSTextCheckingAllSystemTypes|NSTextCheckingAllCustomTypes, + } +); pub type NSTextCheckingKey = NSString; @@ -108,49 +116,27 @@ extern_methods!( } ); -extern "C" { - pub static NSTextCheckingNameKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingNameKey: &'static NSTextCheckingKey); -extern "C" { - pub static NSTextCheckingJobTitleKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingJobTitleKey: &'static NSTextCheckingKey); -extern "C" { - pub static NSTextCheckingOrganizationKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingOrganizationKey: &'static NSTextCheckingKey); -extern "C" { - pub static NSTextCheckingStreetKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingStreetKey: &'static NSTextCheckingKey); -extern "C" { - pub static NSTextCheckingCityKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingCityKey: &'static NSTextCheckingKey); -extern "C" { - pub static NSTextCheckingStateKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingStateKey: &'static NSTextCheckingKey); -extern "C" { - pub static NSTextCheckingZIPKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingZIPKey: &'static NSTextCheckingKey); -extern "C" { - pub static NSTextCheckingCountryKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingCountryKey: &'static NSTextCheckingKey); -extern "C" { - pub static NSTextCheckingPhoneKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingPhoneKey: &'static NSTextCheckingKey); -extern "C" { - pub static NSTextCheckingAirlineKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingAirlineKey: &'static NSTextCheckingKey); -extern "C" { - pub static NSTextCheckingFlightKey: &'static NSTextCheckingKey; -} +extern_static!(NSTextCheckingFlightKey: &'static NSTextCheckingKey); extern_methods!( /// NSTextCheckingResultCreation diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 062ffa326..2e7a3a2b9 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -112,17 +112,11 @@ extern_methods!( } ); -extern "C" { - pub static NSWillBecomeMultiThreadedNotification: &'static NSNotificationName; -} +extern_static!(NSWillBecomeMultiThreadedNotification: &'static NSNotificationName); -extern "C" { - pub static NSDidBecomeSingleThreadedNotification: &'static NSNotificationName; -} +extern_static!(NSDidBecomeSingleThreadedNotification: &'static NSNotificationName); -extern "C" { - pub static NSThreadWillExitNotification: &'static NSNotificationName; -} +extern_static!(NSThreadWillExitNotification: &'static NSNotificationName); extern_methods!( /// NSThreadPerformAdditions diff --git a/crates/icrate/src/generated/Foundation/NSTimeZone.rs b/crates/icrate/src/generated/Foundation/NSTimeZone.rs index 459d41044..29500b1db 100644 --- a/crates/icrate/src/generated/Foundation/NSTimeZone.rs +++ b/crates/icrate/src/generated/Foundation/NSTimeZone.rs @@ -40,13 +40,17 @@ extern_methods!( } ); -pub type NSTimeZoneNameStyle = NSInteger; -pub const NSTimeZoneNameStyleStandard: NSTimeZoneNameStyle = 0; -pub const NSTimeZoneNameStyleShortStandard: NSTimeZoneNameStyle = 1; -pub const NSTimeZoneNameStyleDaylightSaving: NSTimeZoneNameStyle = 2; -pub const NSTimeZoneNameStyleShortDaylightSaving: NSTimeZoneNameStyle = 3; -pub const NSTimeZoneNameStyleGeneric: NSTimeZoneNameStyle = 4; -pub const NSTimeZoneNameStyleShortGeneric: NSTimeZoneNameStyle = 5; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSTimeZoneNameStyle { + NSTimeZoneNameStyleStandard = 0, + NSTimeZoneNameStyleShortStandard = 1, + NSTimeZoneNameStyleDaylightSaving = 2, + NSTimeZoneNameStyleShortDaylightSaving = 3, + NSTimeZoneNameStyleGeneric = 4, + NSTimeZoneNameStyleShortGeneric = 5, + } +); extern_methods!( /// NSExtendedTimeZone @@ -144,6 +148,4 @@ extern_methods!( } ); -extern "C" { - pub static NSSystemTimeZoneDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSSystemTimeZoneDidChangeNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/Foundation/NSURL.rs b/crates/icrate/src/generated/Foundation/NSURL.rs index f31fdeb24..601a3b851 100644 --- a/crates/icrate/src/generated/Foundation/NSURL.rs +++ b/crates/icrate/src/generated/Foundation/NSURL.rs @@ -5,604 +5,336 @@ use crate::Foundation::*; pub type NSURLResourceKey = NSString; -extern "C" { - pub static NSURLFileScheme: &'static NSString; -} +extern_static!(NSURLFileScheme: &'static NSString); -extern "C" { - pub static NSURLKeysOfUnsetValuesKey: &'static NSURLResourceKey; -} +extern_static!(NSURLKeysOfUnsetValuesKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLNameKey: &'static NSURLResourceKey; -} +extern_static!(NSURLNameKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLLocalizedNameKey: &'static NSURLResourceKey; -} +extern_static!(NSURLLocalizedNameKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsRegularFileKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsRegularFileKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsDirectoryKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsDirectoryKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsSymbolicLinkKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsSymbolicLinkKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsVolumeKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsVolumeKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsPackageKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsPackageKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsApplicationKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsApplicationKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLApplicationIsScriptableKey: &'static NSURLResourceKey; -} +extern_static!(NSURLApplicationIsScriptableKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsSystemImmutableKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsSystemImmutableKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsUserImmutableKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsUserImmutableKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsHiddenKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsHiddenKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLHasHiddenExtensionKey: &'static NSURLResourceKey; -} +extern_static!(NSURLHasHiddenExtensionKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLCreationDateKey: &'static NSURLResourceKey; -} +extern_static!(NSURLCreationDateKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLContentAccessDateKey: &'static NSURLResourceKey; -} +extern_static!(NSURLContentAccessDateKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLContentModificationDateKey: &'static NSURLResourceKey; -} +extern_static!(NSURLContentModificationDateKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLAttributeModificationDateKey: &'static NSURLResourceKey; -} +extern_static!(NSURLAttributeModificationDateKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLLinkCountKey: &'static NSURLResourceKey; -} +extern_static!(NSURLLinkCountKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLParentDirectoryURLKey: &'static NSURLResourceKey; -} +extern_static!(NSURLParentDirectoryURLKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeURLKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeURLKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLTypeIdentifierKey: &'static NSURLResourceKey; -} +extern_static!(NSURLTypeIdentifierKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLContentTypeKey: &'static NSURLResourceKey; -} +extern_static!(NSURLContentTypeKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLLocalizedTypeDescriptionKey: &'static NSURLResourceKey; -} +extern_static!(NSURLLocalizedTypeDescriptionKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLLabelNumberKey: &'static NSURLResourceKey; -} +extern_static!(NSURLLabelNumberKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLLabelColorKey: &'static NSURLResourceKey; -} +extern_static!(NSURLLabelColorKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLLocalizedLabelKey: &'static NSURLResourceKey; -} +extern_static!(NSURLLocalizedLabelKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLEffectiveIconKey: &'static NSURLResourceKey; -} +extern_static!(NSURLEffectiveIconKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLCustomIconKey: &'static NSURLResourceKey; -} +extern_static!(NSURLCustomIconKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLFileResourceIdentifierKey: &'static NSURLResourceKey; -} +extern_static!(NSURLFileResourceIdentifierKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIdentifierKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIdentifierKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLPreferredIOBlockSizeKey: &'static NSURLResourceKey; -} +extern_static!(NSURLPreferredIOBlockSizeKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsReadableKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsReadableKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsWritableKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsWritableKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsExecutableKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsExecutableKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLFileSecurityKey: &'static NSURLResourceKey; -} +extern_static!(NSURLFileSecurityKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsExcludedFromBackupKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsExcludedFromBackupKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLTagNamesKey: &'static NSURLResourceKey; -} +extern_static!(NSURLTagNamesKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLPathKey: &'static NSURLResourceKey; -} +extern_static!(NSURLPathKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLCanonicalPathKey: &'static NSURLResourceKey; -} +extern_static!(NSURLCanonicalPathKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsMountTriggerKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsMountTriggerKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLGenerationIdentifierKey: &'static NSURLResourceKey; -} +extern_static!(NSURLGenerationIdentifierKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLDocumentIdentifierKey: &'static NSURLResourceKey; -} +extern_static!(NSURLDocumentIdentifierKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLAddedToDirectoryDateKey: &'static NSURLResourceKey; -} +extern_static!(NSURLAddedToDirectoryDateKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLQuarantinePropertiesKey: &'static NSURLResourceKey; -} +extern_static!(NSURLQuarantinePropertiesKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLFileResourceTypeKey: &'static NSURLResourceKey; -} +extern_static!(NSURLFileResourceTypeKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLFileContentIdentifierKey: &'static NSURLResourceKey; -} +extern_static!(NSURLFileContentIdentifierKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLMayShareFileContentKey: &'static NSURLResourceKey; -} +extern_static!(NSURLMayShareFileContentKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLMayHaveExtendedAttributesKey: &'static NSURLResourceKey; -} +extern_static!(NSURLMayHaveExtendedAttributesKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsPurgeableKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsPurgeableKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsSparseKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsSparseKey: &'static NSURLResourceKey); pub type NSURLFileResourceType = NSString; -extern "C" { - pub static NSURLFileResourceTypeNamedPipe: &'static NSURLFileResourceType; -} +extern_static!(NSURLFileResourceTypeNamedPipe: &'static NSURLFileResourceType); -extern "C" { - pub static NSURLFileResourceTypeCharacterSpecial: &'static NSURLFileResourceType; -} +extern_static!(NSURLFileResourceTypeCharacterSpecial: &'static NSURLFileResourceType); -extern "C" { - pub static NSURLFileResourceTypeDirectory: &'static NSURLFileResourceType; -} +extern_static!(NSURLFileResourceTypeDirectory: &'static NSURLFileResourceType); -extern "C" { - pub static NSURLFileResourceTypeBlockSpecial: &'static NSURLFileResourceType; -} +extern_static!(NSURLFileResourceTypeBlockSpecial: &'static NSURLFileResourceType); -extern "C" { - pub static NSURLFileResourceTypeRegular: &'static NSURLFileResourceType; -} +extern_static!(NSURLFileResourceTypeRegular: &'static NSURLFileResourceType); -extern "C" { - pub static NSURLFileResourceTypeSymbolicLink: &'static NSURLFileResourceType; -} +extern_static!(NSURLFileResourceTypeSymbolicLink: &'static NSURLFileResourceType); -extern "C" { - pub static NSURLFileResourceTypeSocket: &'static NSURLFileResourceType; -} +extern_static!(NSURLFileResourceTypeSocket: &'static NSURLFileResourceType); -extern "C" { - pub static NSURLFileResourceTypeUnknown: &'static NSURLFileResourceType; -} +extern_static!(NSURLFileResourceTypeUnknown: &'static NSURLFileResourceType); -extern "C" { - pub static NSURLThumbnailDictionaryKey: &'static NSURLResourceKey; -} +extern_static!(NSURLThumbnailDictionaryKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLThumbnailKey: &'static NSURLResourceKey; -} +extern_static!(NSURLThumbnailKey: &'static NSURLResourceKey); pub type NSURLThumbnailDictionaryItem = NSString; -extern "C" { - pub static NSThumbnail1024x1024SizeKey: &'static NSURLThumbnailDictionaryItem; -} +extern_static!(NSThumbnail1024x1024SizeKey: &'static NSURLThumbnailDictionaryItem); -extern "C" { - pub static NSURLFileSizeKey: &'static NSURLResourceKey; -} +extern_static!(NSURLFileSizeKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLFileAllocatedSizeKey: &'static NSURLResourceKey; -} +extern_static!(NSURLFileAllocatedSizeKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLTotalFileSizeKey: &'static NSURLResourceKey; -} +extern_static!(NSURLTotalFileSizeKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLTotalFileAllocatedSizeKey: &'static NSURLResourceKey; -} +extern_static!(NSURLTotalFileAllocatedSizeKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsAliasFileKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsAliasFileKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLFileProtectionKey: &'static NSURLResourceKey; -} +extern_static!(NSURLFileProtectionKey: &'static NSURLResourceKey); pub type NSURLFileProtectionType = NSString; -extern "C" { - pub static NSURLFileProtectionNone: &'static NSURLFileProtectionType; -} +extern_static!(NSURLFileProtectionNone: &'static NSURLFileProtectionType); -extern "C" { - pub static NSURLFileProtectionComplete: &'static NSURLFileProtectionType; -} +extern_static!(NSURLFileProtectionComplete: &'static NSURLFileProtectionType); -extern "C" { - pub static NSURLFileProtectionCompleteUnlessOpen: &'static NSURLFileProtectionType; -} +extern_static!(NSURLFileProtectionCompleteUnlessOpen: &'static NSURLFileProtectionType); -extern "C" { - pub static NSURLFileProtectionCompleteUntilFirstUserAuthentication: - &'static NSURLFileProtectionType; -} +extern_static!( + NSURLFileProtectionCompleteUntilFirstUserAuthentication: &'static NSURLFileProtectionType +); -extern "C" { - pub static NSURLVolumeLocalizedFormatDescriptionKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeLocalizedFormatDescriptionKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeTotalCapacityKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeTotalCapacityKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeAvailableCapacityKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeAvailableCapacityKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeResourceCountKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeResourceCountKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsPersistentIDsKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsPersistentIDsKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsSymbolicLinksKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsSymbolicLinksKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsHardLinksKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsHardLinksKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsJournalingKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsJournalingKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIsJournalingKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIsJournalingKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsSparseFilesKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsSparseFilesKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsZeroRunsKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsZeroRunsKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsCaseSensitiveNamesKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsCaseSensitiveNamesKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsCasePreservedNamesKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsCasePreservedNamesKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsRootDirectoryDatesKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsRootDirectoryDatesKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsVolumeSizesKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsVolumeSizesKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsRenamingKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsRenamingKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsAdvisoryFileLockingKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsAdvisoryFileLockingKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsExtendedSecurityKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsExtendedSecurityKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIsBrowsableKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIsBrowsableKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeMaximumFileSizeKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeMaximumFileSizeKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIsEjectableKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIsEjectableKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIsRemovableKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIsRemovableKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIsInternalKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIsInternalKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIsAutomountedKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIsAutomountedKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIsLocalKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIsLocalKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIsReadOnlyKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIsReadOnlyKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeCreationDateKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeCreationDateKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeURLForRemountingKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeURLForRemountingKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeUUIDStringKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeUUIDStringKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeNameKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeNameKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeLocalizedNameKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeLocalizedNameKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIsEncryptedKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIsEncryptedKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeIsRootFileSystemKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeIsRootFileSystemKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsCompressionKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsCompressionKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsFileCloningKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsFileCloningKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsSwapRenamingKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsSwapRenamingKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsExclusiveRenamingKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsExclusiveRenamingKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsImmutableFilesKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsImmutableFilesKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsAccessPermissionsKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsAccessPermissionsKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeSupportsFileProtectionKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeSupportsFileProtectionKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeAvailableCapacityForImportantUsageKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeAvailableCapacityForImportantUsageKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLVolumeAvailableCapacityForOpportunisticUsageKey: &'static NSURLResourceKey; -} +extern_static!(NSURLVolumeAvailableCapacityForOpportunisticUsageKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLIsUbiquitousItemKey: &'static NSURLResourceKey; -} +extern_static!(NSURLIsUbiquitousItemKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemHasUnresolvedConflictsKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemHasUnresolvedConflictsKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemIsDownloadedKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemIsDownloadedKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemIsDownloadingKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemIsDownloadingKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemIsUploadedKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemIsUploadedKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemIsUploadingKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemIsUploadingKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemPercentDownloadedKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemPercentDownloadedKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemPercentUploadedKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemPercentUploadedKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemDownloadingStatusKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemDownloadingStatusKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemDownloadingErrorKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemDownloadingErrorKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemUploadingErrorKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemUploadingErrorKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemDownloadRequestedKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemDownloadRequestedKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemContainerDisplayNameKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemContainerDisplayNameKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemIsExcludedFromSyncKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemIsExcludedFromSyncKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousItemIsSharedKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousItemIsSharedKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousSharedItemCurrentUserRoleKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousSharedItemCurrentUserRoleKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousSharedItemCurrentUserPermissionsKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousSharedItemOwnerNameComponentsKey: &'static NSURLResourceKey; -} +extern_static!(NSURLUbiquitousSharedItemOwnerNameComponentsKey: &'static NSURLResourceKey); -extern "C" { - pub static NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey: - &'static NSURLResourceKey; -} +extern_static!( + NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey: &'static NSURLResourceKey +); pub type NSURLUbiquitousItemDownloadingStatus = NSString; -extern "C" { - pub static NSURLUbiquitousItemDownloadingStatusNotDownloaded: - &'static NSURLUbiquitousItemDownloadingStatus; -} +extern_static!( + NSURLUbiquitousItemDownloadingStatusNotDownloaded: + &'static NSURLUbiquitousItemDownloadingStatus +); -extern "C" { - pub static NSURLUbiquitousItemDownloadingStatusDownloaded: - &'static NSURLUbiquitousItemDownloadingStatus; -} +extern_static!( + NSURLUbiquitousItemDownloadingStatusDownloaded: &'static NSURLUbiquitousItemDownloadingStatus +); -extern "C" { - pub static NSURLUbiquitousItemDownloadingStatusCurrent: - &'static NSURLUbiquitousItemDownloadingStatus; -} +extern_static!( + NSURLUbiquitousItemDownloadingStatusCurrent: &'static NSURLUbiquitousItemDownloadingStatus +); pub type NSURLUbiquitousSharedItemRole = NSString; -extern "C" { - pub static NSURLUbiquitousSharedItemRoleOwner: &'static NSURLUbiquitousSharedItemRole; -} +extern_static!(NSURLUbiquitousSharedItemRoleOwner: &'static NSURLUbiquitousSharedItemRole); -extern "C" { - pub static NSURLUbiquitousSharedItemRoleParticipant: &'static NSURLUbiquitousSharedItemRole; -} +extern_static!(NSURLUbiquitousSharedItemRoleParticipant: &'static NSURLUbiquitousSharedItemRole); pub type NSURLUbiquitousSharedItemPermissions = NSString; -extern "C" { - pub static NSURLUbiquitousSharedItemPermissionsReadOnly: - &'static NSURLUbiquitousSharedItemPermissions; -} - -extern "C" { - pub static NSURLUbiquitousSharedItemPermissionsReadWrite: - &'static NSURLUbiquitousSharedItemPermissions; -} - -pub type NSURLBookmarkCreationOptions = NSUInteger; -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 = - 1 << 12; -pub const NSURLBookmarkCreationWithoutImplicitSecurityScope: NSURLBookmarkCreationOptions = 1 << 29; - -pub type NSURLBookmarkResolutionOptions = NSUInteger; -pub const NSURLBookmarkResolutionWithoutUI: NSURLBookmarkResolutionOptions = 1 << 8; -pub const NSURLBookmarkResolutionWithoutMounting: NSURLBookmarkResolutionOptions = 1 << 9; -pub const NSURLBookmarkResolutionWithSecurityScope: NSURLBookmarkResolutionOptions = 1 << 10; -pub const NSURLBookmarkResolutionWithoutImplicitStartAccessing: NSURLBookmarkResolutionOptions = - 1 << 15; +extern_static!( + NSURLUbiquitousSharedItemPermissionsReadOnly: &'static NSURLUbiquitousSharedItemPermissions +); + +extern_static!( + NSURLUbiquitousSharedItemPermissionsReadWrite: &'static NSURLUbiquitousSharedItemPermissions +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSURLBookmarkCreationOptions { + NSURLBookmarkCreationPreferFileIDResolution = 1 << 8, + NSURLBookmarkCreationMinimalBookmark = 1 << 9, + NSURLBookmarkCreationSuitableForBookmarkFile = 1 << 10, + NSURLBookmarkCreationWithSecurityScope = 1 << 11, + NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 1 << 12, + NSURLBookmarkCreationWithoutImplicitSecurityScope = 1 << 29, + } +); + +ns_options!( + #[underlying(NSUInteger)] + pub enum NSURLBookmarkResolutionOptions { + NSURLBookmarkResolutionWithoutUI = 1 << 8, + NSURLBookmarkResolutionWithoutMounting = 1 << 9, + NSURLBookmarkResolutionWithSecurityScope = 1 << 10, + NSURLBookmarkResolutionWithoutImplicitStartAccessing = 1 << 15, + } +); pub type NSURLBookmarkFileCreationOptions = NSUInteger; diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index bec37ffcb..6c3ecfefd 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -3,10 +3,14 @@ use crate::common::*; use crate::Foundation::*; -pub type NSURLCacheStoragePolicy = NSUInteger; -pub const NSURLCacheStorageAllowed: NSURLCacheStoragePolicy = 0; -pub const NSURLCacheStorageAllowedInMemoryOnly: NSURLCacheStoragePolicy = 1; -pub const NSURLCacheStorageNotAllowed: NSURLCacheStoragePolicy = 2; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSURLCacheStoragePolicy { + NSURLCacheStorageAllowed = 0, + NSURLCacheStorageAllowedInMemoryOnly = 1, + NSURLCacheStorageNotAllowed = 2, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLCredential.rs b/crates/icrate/src/generated/Foundation/NSURLCredential.rs index a0fba3486..b8afdac8e 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredential.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredential.rs @@ -3,11 +3,15 @@ use crate::common::*; use crate::Foundation::*; -pub type NSURLCredentialPersistence = NSUInteger; -pub const NSURLCredentialPersistenceNone: NSURLCredentialPersistence = 0; -pub const NSURLCredentialPersistenceForSession: NSURLCredentialPersistence = 1; -pub const NSURLCredentialPersistencePermanent: NSURLCredentialPersistence = 2; -pub const NSURLCredentialPersistenceSynchronizable: NSURLCredentialPersistence = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSURLCredentialPersistence { + NSURLCredentialPersistenceNone = 0, + NSURLCredentialPersistenceForSession = 1, + NSURLCredentialPersistencePermanent = 2, + NSURLCredentialPersistenceSynchronizable = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index 57b3104c8..a637f609b 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -111,10 +111,6 @@ extern_methods!( } ); -extern "C" { - pub static NSURLCredentialStorageChangedNotification: &'static NSNotificationName; -} +extern_static!(NSURLCredentialStorageChangedNotification: &'static NSNotificationName); -extern "C" { - pub static NSURLCredentialStorageRemoveSynchronizableCredentials: &'static NSString; -} +extern_static!(NSURLCredentialStorageRemoveSynchronizableCredentials: &'static NSString); diff --git a/crates/icrate/src/generated/Foundation/NSURLError.rs b/crates/icrate/src/generated/Foundation/NSURLError.rs index 9232e66ea..05ac44e28 100644 --- a/crates/icrate/src/generated/Foundation/NSURLError.rs +++ b/crates/icrate/src/generated/Foundation/NSURLError.rs @@ -3,89 +3,89 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSURLErrorDomain: &'static NSErrorDomain; -} +extern_static!(NSURLErrorDomain: &'static NSErrorDomain); -extern "C" { - pub static NSURLErrorFailingURLErrorKey: &'static NSString; -} +extern_static!(NSURLErrorFailingURLErrorKey: &'static NSString); -extern "C" { - pub static NSURLErrorFailingURLStringErrorKey: &'static NSString; -} +extern_static!(NSURLErrorFailingURLStringErrorKey: &'static NSString); -extern "C" { - pub static NSErrorFailingURLStringKey: &'static NSString; -} +extern_static!(NSErrorFailingURLStringKey: &'static NSString); -extern "C" { - pub static NSURLErrorFailingURLPeerTrustErrorKey: &'static NSString; -} +extern_static!(NSURLErrorFailingURLPeerTrustErrorKey: &'static NSString); -extern "C" { - pub static NSURLErrorBackgroundTaskCancelledReasonKey: &'static NSString; -} +extern_static!(NSURLErrorBackgroundTaskCancelledReasonKey: &'static NSString); -pub const NSURLErrorCancelledReasonUserForceQuitApplication: NSInteger = 0; -pub const NSURLErrorCancelledReasonBackgroundUpdatesDisabled: NSInteger = 1; -pub const NSURLErrorCancelledReasonInsufficientSystemResources: NSInteger = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum { + NSURLErrorCancelledReasonUserForceQuitApplication = 0, + NSURLErrorCancelledReasonBackgroundUpdatesDisabled = 1, + NSURLErrorCancelledReasonInsufficientSystemResources = 2, + } +); -extern "C" { - pub static NSURLErrorNetworkUnavailableReasonKey: &'static NSErrorUserInfoKey; -} +extern_static!(NSURLErrorNetworkUnavailableReasonKey: &'static NSErrorUserInfoKey); -pub type NSURLErrorNetworkUnavailableReason = NSInteger; -pub const NSURLErrorNetworkUnavailableReasonCellular: NSURLErrorNetworkUnavailableReason = 0; -pub const NSURLErrorNetworkUnavailableReasonExpensive: NSURLErrorNetworkUnavailableReason = 1; -pub const NSURLErrorNetworkUnavailableReasonConstrained: NSURLErrorNetworkUnavailableReason = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLErrorNetworkUnavailableReason { + NSURLErrorNetworkUnavailableReasonCellular = 0, + NSURLErrorNetworkUnavailableReasonExpensive = 1, + NSURLErrorNetworkUnavailableReasonConstrained = 2, + } +); -pub const NSURLErrorUnknown: NSInteger = -1; -pub const NSURLErrorCancelled: NSInteger = -999; -pub const NSURLErrorBadURL: NSInteger = -1000; -pub const NSURLErrorTimedOut: NSInteger = -1001; -pub const NSURLErrorUnsupportedURL: NSInteger = -1002; -pub const NSURLErrorCannotFindHost: NSInteger = -1003; -pub const NSURLErrorCannotConnectToHost: NSInteger = -1004; -pub const NSURLErrorNetworkConnectionLost: NSInteger = -1005; -pub const NSURLErrorDNSLookupFailed: NSInteger = -1006; -pub const NSURLErrorHTTPTooManyRedirects: NSInteger = -1007; -pub const NSURLErrorResourceUnavailable: NSInteger = -1008; -pub const NSURLErrorNotConnectedToInternet: NSInteger = -1009; -pub const NSURLErrorRedirectToNonExistentLocation: NSInteger = -1010; -pub const NSURLErrorBadServerResponse: NSInteger = -1011; -pub const NSURLErrorUserCancelledAuthentication: NSInteger = -1012; -pub const NSURLErrorUserAuthenticationRequired: NSInteger = -1013; -pub const NSURLErrorZeroByteResource: NSInteger = -1014; -pub const NSURLErrorCannotDecodeRawData: NSInteger = -1015; -pub const NSURLErrorCannotDecodeContentData: NSInteger = -1016; -pub const NSURLErrorCannotParseResponse: NSInteger = -1017; -pub const NSURLErrorAppTransportSecurityRequiresSecureConnection: NSInteger = -1022; -pub const NSURLErrorFileDoesNotExist: NSInteger = -1100; -pub const NSURLErrorFileIsDirectory: NSInteger = -1101; -pub const NSURLErrorNoPermissionsToReadFile: NSInteger = -1102; -pub const NSURLErrorDataLengthExceedsMaximum: NSInteger = -1103; -pub const NSURLErrorFileOutsideSafeArea: NSInteger = -1104; -pub const NSURLErrorSecureConnectionFailed: NSInteger = -1200; -pub const NSURLErrorServerCertificateHasBadDate: NSInteger = -1201; -pub const NSURLErrorServerCertificateUntrusted: NSInteger = -1202; -pub const NSURLErrorServerCertificateHasUnknownRoot: NSInteger = -1203; -pub const NSURLErrorServerCertificateNotYetValid: NSInteger = -1204; -pub const NSURLErrorClientCertificateRejected: NSInteger = -1205; -pub const NSURLErrorClientCertificateRequired: NSInteger = -1206; -pub const NSURLErrorCannotLoadFromNetwork: NSInteger = -2000; -pub const NSURLErrorCannotCreateFile: NSInteger = -3000; -pub const NSURLErrorCannotOpenFile: NSInteger = -3001; -pub const NSURLErrorCannotCloseFile: NSInteger = -3002; -pub const NSURLErrorCannotWriteToFile: NSInteger = -3003; -pub const NSURLErrorCannotRemoveFile: NSInteger = -3004; -pub const NSURLErrorCannotMoveFile: NSInteger = -3005; -pub const NSURLErrorDownloadDecodingFailedMidStream: NSInteger = -3006; -pub const NSURLErrorDownloadDecodingFailedToComplete: NSInteger = -3007; -pub const NSURLErrorInternationalRoamingOff: NSInteger = -1018; -pub const NSURLErrorCallIsActive: NSInteger = -1019; -pub const NSURLErrorDataNotAllowed: NSInteger = -1020; -pub const NSURLErrorRequestBodyStreamExhausted: NSInteger = -1021; -pub const NSURLErrorBackgroundSessionRequiresSharedContainer: NSInteger = -995; -pub const NSURLErrorBackgroundSessionInUseByAnotherProcess: NSInteger = -996; -pub const NSURLErrorBackgroundSessionWasDisconnected: NSInteger = -997; +ns_error_enum!( + #[underlying(NSInteger)] + pub enum { + NSURLErrorUnknown = -1, + NSURLErrorCancelled = -999, + NSURLErrorBadURL = -1000, + NSURLErrorTimedOut = -1001, + NSURLErrorUnsupportedURL = -1002, + NSURLErrorCannotFindHost = -1003, + NSURLErrorCannotConnectToHost = -1004, + NSURLErrorNetworkConnectionLost = -1005, + NSURLErrorDNSLookupFailed = -1006, + NSURLErrorHTTPTooManyRedirects = -1007, + NSURLErrorResourceUnavailable = -1008, + NSURLErrorNotConnectedToInternet = -1009, + NSURLErrorRedirectToNonExistentLocation = -1010, + NSURLErrorBadServerResponse = -1011, + NSURLErrorUserCancelledAuthentication = -1012, + NSURLErrorUserAuthenticationRequired = -1013, + NSURLErrorZeroByteResource = -1014, + NSURLErrorCannotDecodeRawData = -1015, + NSURLErrorCannotDecodeContentData = -1016, + NSURLErrorCannotParseResponse = -1017, + NSURLErrorAppTransportSecurityRequiresSecureConnection = -1022, + NSURLErrorFileDoesNotExist = -1100, + NSURLErrorFileIsDirectory = -1101, + NSURLErrorNoPermissionsToReadFile = -1102, + NSURLErrorDataLengthExceedsMaximum = -1103, + NSURLErrorFileOutsideSafeArea = -1104, + NSURLErrorSecureConnectionFailed = -1200, + NSURLErrorServerCertificateHasBadDate = -1201, + NSURLErrorServerCertificateUntrusted = -1202, + NSURLErrorServerCertificateHasUnknownRoot = -1203, + NSURLErrorServerCertificateNotYetValid = -1204, + NSURLErrorClientCertificateRejected = -1205, + NSURLErrorClientCertificateRequired = -1206, + NSURLErrorCannotLoadFromNetwork = -2000, + NSURLErrorCannotCreateFile = -3000, + NSURLErrorCannotOpenFile = -3001, + NSURLErrorCannotCloseFile = -3002, + NSURLErrorCannotWriteToFile = -3003, + NSURLErrorCannotRemoveFile = -3004, + NSURLErrorCannotMoveFile = -3005, + NSURLErrorDownloadDecodingFailedMidStream = -3006, + NSURLErrorDownloadDecodingFailedToComplete = -3007, + NSURLErrorInternationalRoamingOff = -1018, + NSURLErrorCallIsActive = -1019, + NSURLErrorDataNotAllowed = -1020, + NSURLErrorRequestBodyStreamExhausted = -1021, + NSURLErrorBackgroundSessionRequiresSharedContainer = -995, + NSURLErrorBackgroundSessionInUseByAnotherProcess = -996, + NSURLErrorBackgroundSessionWasDisconnected = -997, + } +); diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index a9af7280d..80e9c9207 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -3,55 +3,37 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSHTTPPropertyStatusCodeKey: Option<&'static NSString>; -} - -extern "C" { - pub static NSHTTPPropertyStatusReasonKey: Option<&'static NSString>; -} - -extern "C" { - pub static NSHTTPPropertyServerHTTPVersionKey: Option<&'static NSString>; -} - -extern "C" { - pub static NSHTTPPropertyRedirectionHeadersKey: Option<&'static NSString>; -} - -extern "C" { - pub static NSHTTPPropertyErrorPageDataKey: Option<&'static NSString>; -} - -extern "C" { - pub static NSHTTPPropertyHTTPProxy: Option<&'static NSString>; -} - -extern "C" { - pub static NSFTPPropertyUserLoginKey: Option<&'static NSString>; -} - -extern "C" { - pub static NSFTPPropertyUserPasswordKey: Option<&'static NSString>; -} - -extern "C" { - pub static NSFTPPropertyActiveTransferModeKey: Option<&'static NSString>; -} - -extern "C" { - pub static NSFTPPropertyFileOffsetKey: Option<&'static NSString>; -} - -extern "C" { - pub static NSFTPPropertyFTPProxy: Option<&'static NSString>; -} - -pub type NSURLHandleStatus = NSUInteger; -pub const NSURLHandleNotLoaded: NSURLHandleStatus = 0; -pub const NSURLHandleLoadSucceeded: NSURLHandleStatus = 1; -pub const NSURLHandleLoadInProgress: NSURLHandleStatus = 2; -pub const NSURLHandleLoadFailed: NSURLHandleStatus = 3; +extern_static!(NSHTTPPropertyStatusCodeKey: Option<&'static NSString>); + +extern_static!(NSHTTPPropertyStatusReasonKey: Option<&'static NSString>); + +extern_static!(NSHTTPPropertyServerHTTPVersionKey: Option<&'static NSString>); + +extern_static!(NSHTTPPropertyRedirectionHeadersKey: Option<&'static NSString>); + +extern_static!(NSHTTPPropertyErrorPageDataKey: Option<&'static NSString>); + +extern_static!(NSHTTPPropertyHTTPProxy: Option<&'static NSString>); + +extern_static!(NSFTPPropertyUserLoginKey: Option<&'static NSString>); + +extern_static!(NSFTPPropertyUserPasswordKey: Option<&'static NSString>); + +extern_static!(NSFTPPropertyActiveTransferModeKey: Option<&'static NSString>); + +extern_static!(NSFTPPropertyFileOffsetKey: Option<&'static NSString>); + +extern_static!(NSFTPPropertyFTPProxy: Option<&'static NSString>); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSURLHandleStatus { + NSURLHandleNotLoaded = 0, + NSURLHandleLoadSucceeded = 1, + NSURLHandleLoadInProgress = 2, + NSURLHandleLoadFailed = 3, + } +); pub type NSURLHandleClient = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs index 2b3da01dc..961ffa194 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtectionSpace.rs @@ -3,65 +3,35 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSURLProtectionSpaceHTTP: &'static NSString; -} +extern_static!(NSURLProtectionSpaceHTTP: &'static NSString); -extern "C" { - pub static NSURLProtectionSpaceHTTPS: &'static NSString; -} +extern_static!(NSURLProtectionSpaceHTTPS: &'static NSString); -extern "C" { - pub static NSURLProtectionSpaceFTP: &'static NSString; -} +extern_static!(NSURLProtectionSpaceFTP: &'static NSString); -extern "C" { - pub static NSURLProtectionSpaceHTTPProxy: &'static NSString; -} +extern_static!(NSURLProtectionSpaceHTTPProxy: &'static NSString); -extern "C" { - pub static NSURLProtectionSpaceHTTPSProxy: &'static NSString; -} +extern_static!(NSURLProtectionSpaceHTTPSProxy: &'static NSString); -extern "C" { - pub static NSURLProtectionSpaceFTPProxy: &'static NSString; -} +extern_static!(NSURLProtectionSpaceFTPProxy: &'static NSString); -extern "C" { - pub static NSURLProtectionSpaceSOCKSProxy: &'static NSString; -} +extern_static!(NSURLProtectionSpaceSOCKSProxy: &'static NSString); -extern "C" { - pub static NSURLAuthenticationMethodDefault: &'static NSString; -} +extern_static!(NSURLAuthenticationMethodDefault: &'static NSString); -extern "C" { - pub static NSURLAuthenticationMethodHTTPBasic: &'static NSString; -} +extern_static!(NSURLAuthenticationMethodHTTPBasic: &'static NSString); -extern "C" { - pub static NSURLAuthenticationMethodHTTPDigest: &'static NSString; -} +extern_static!(NSURLAuthenticationMethodHTTPDigest: &'static NSString); -extern "C" { - pub static NSURLAuthenticationMethodHTMLForm: &'static NSString; -} +extern_static!(NSURLAuthenticationMethodHTMLForm: &'static NSString); -extern "C" { - pub static NSURLAuthenticationMethodNTLM: &'static NSString; -} +extern_static!(NSURLAuthenticationMethodNTLM: &'static NSString); -extern "C" { - pub static NSURLAuthenticationMethodNegotiate: &'static NSString; -} +extern_static!(NSURLAuthenticationMethodNegotiate: &'static NSString); -extern "C" { - pub static NSURLAuthenticationMethodClientCertificate: &'static NSString; -} +extern_static!(NSURLAuthenticationMethodClientCertificate: &'static NSString); -extern "C" { - pub static NSURLAuthenticationMethodServerTrust: &'static NSString; -} +extern_static!(NSURLAuthenticationMethodServerTrust: &'static NSString); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLRequest.rs b/crates/icrate/src/generated/Foundation/NSURLRequest.rs index b97f18f8e..afccd3a40 100644 --- a/crates/icrate/src/generated/Foundation/NSURLRequest.rs +++ b/crates/icrate/src/generated/Foundation/NSURLRequest.rs @@ -3,30 +3,41 @@ use crate::common::*; use crate::Foundation::*; -pub type NSURLRequestCachePolicy = NSUInteger; -pub const NSURLRequestUseProtocolCachePolicy: NSURLRequestCachePolicy = 0; -pub const NSURLRequestReloadIgnoringLocalCacheData: NSURLRequestCachePolicy = 1; -pub const NSURLRequestReloadIgnoringLocalAndRemoteCacheData: NSURLRequestCachePolicy = 4; -pub const NSURLRequestReloadIgnoringCacheData: NSURLRequestCachePolicy = - NSURLRequestReloadIgnoringLocalCacheData; -pub const NSURLRequestReturnCacheDataElseLoad: NSURLRequestCachePolicy = 2; -pub const NSURLRequestReturnCacheDataDontLoad: NSURLRequestCachePolicy = 3; -pub const NSURLRequestReloadRevalidatingCacheData: NSURLRequestCachePolicy = 5; - -pub type NSURLRequestNetworkServiceType = NSUInteger; -pub const NSURLNetworkServiceTypeDefault: NSURLRequestNetworkServiceType = 0; -pub const NSURLNetworkServiceTypeVoIP: NSURLRequestNetworkServiceType = 1; -pub const NSURLNetworkServiceTypeVideo: NSURLRequestNetworkServiceType = 2; -pub const NSURLNetworkServiceTypeBackground: NSURLRequestNetworkServiceType = 3; -pub const NSURLNetworkServiceTypeVoice: NSURLRequestNetworkServiceType = 4; -pub const NSURLNetworkServiceTypeResponsiveData: NSURLRequestNetworkServiceType = 6; -pub const NSURLNetworkServiceTypeAVStreaming: NSURLRequestNetworkServiceType = 8; -pub const NSURLNetworkServiceTypeResponsiveAV: NSURLRequestNetworkServiceType = 9; -pub const NSURLNetworkServiceTypeCallSignaling: NSURLRequestNetworkServiceType = 11; - -pub type NSURLRequestAttribution = NSUInteger; -pub const NSURLRequestAttributionDeveloper: NSURLRequestAttribution = 0; -pub const NSURLRequestAttributionUser: NSURLRequestAttribution = 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSURLRequestCachePolicy { + NSURLRequestUseProtocolCachePolicy = 0, + NSURLRequestReloadIgnoringLocalCacheData = 1, + NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4, + NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData, + NSURLRequestReturnCacheDataElseLoad = 2, + NSURLRequestReturnCacheDataDontLoad = 3, + NSURLRequestReloadRevalidatingCacheData = 5, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSURLRequestNetworkServiceType { + NSURLNetworkServiceTypeDefault = 0, + NSURLNetworkServiceTypeVoIP = 1, + NSURLNetworkServiceTypeVideo = 2, + NSURLNetworkServiceTypeBackground = 3, + NSURLNetworkServiceTypeVoice = 4, + NSURLNetworkServiceTypeResponsiveData = 6, + NSURLNetworkServiceTypeAVStreaming = 8, + NSURLNetworkServiceTypeResponsiveAV = 9, + NSURLNetworkServiceTypeCallSignaling = 11, + } +); + +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSURLRequestAttribution { + NSURLRequestAttributionDeveloper = 0, + NSURLRequestAttributionUser = 1, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index d9c47cae2..2ac2a37af 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -3,9 +3,7 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSURLSessionTransferSizeUnknown: i64; -} +extern_static!(NSURLSessionTransferSizeUnknown: i64); extern_class!( #[derive(Debug)] @@ -209,11 +207,15 @@ extern_methods!( } ); -pub type NSURLSessionTaskState = NSInteger; -pub const NSURLSessionTaskStateRunning: NSURLSessionTaskState = 0; -pub const NSURLSessionTaskStateSuspended: NSURLSessionTaskState = 1; -pub const NSURLSessionTaskStateCanceling: NSURLSessionTaskState = 2; -pub const NSURLSessionTaskStateCompleted: NSURLSessionTaskState = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionTaskState { + NSURLSessionTaskStateRunning = 0, + NSURLSessionTaskStateSuspended = 1, + NSURLSessionTaskStateCanceling = 2, + NSURLSessionTaskStateCompleted = 3, + } +); extern_class!( #[derive(Debug)] @@ -324,17 +326,11 @@ extern_methods!( } ); -extern "C" { - pub static NSURLSessionTaskPriorityDefault: c_float; -} +extern_static!(NSURLSessionTaskPriorityDefault: c_float); -extern "C" { - pub static NSURLSessionTaskPriorityLow: c_float; -} +extern_static!(NSURLSessionTaskPriorityLow: c_float); -extern "C" { - pub static NSURLSessionTaskPriorityHigh: c_float; -} +extern_static!(NSURLSessionTaskPriorityHigh: c_float); extern_class!( #[derive(Debug)] @@ -447,9 +443,13 @@ extern_methods!( } ); -pub type NSURLSessionWebSocketMessageType = NSInteger; -pub const NSURLSessionWebSocketMessageTypeData: NSURLSessionWebSocketMessageType = 0; -pub const NSURLSessionWebSocketMessageTypeString: NSURLSessionWebSocketMessageType = 1; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionWebSocketMessageType { + NSURLSessionWebSocketMessageTypeData = 0, + NSURLSessionWebSocketMessageTypeString = 1, + } +); extern_class!( #[derive(Debug)] @@ -491,22 +491,24 @@ extern_methods!( } ); -pub type NSURLSessionWebSocketCloseCode = NSInteger; -pub const NSURLSessionWebSocketCloseCodeInvalid: NSURLSessionWebSocketCloseCode = 0; -pub const NSURLSessionWebSocketCloseCodeNormalClosure: NSURLSessionWebSocketCloseCode = 1000; -pub const NSURLSessionWebSocketCloseCodeGoingAway: NSURLSessionWebSocketCloseCode = 1001; -pub const NSURLSessionWebSocketCloseCodeProtocolError: NSURLSessionWebSocketCloseCode = 1002; -pub const NSURLSessionWebSocketCloseCodeUnsupportedData: NSURLSessionWebSocketCloseCode = 1003; -pub const NSURLSessionWebSocketCloseCodeNoStatusReceived: NSURLSessionWebSocketCloseCode = 1005; -pub const NSURLSessionWebSocketCloseCodeAbnormalClosure: NSURLSessionWebSocketCloseCode = 1006; -pub const NSURLSessionWebSocketCloseCodeInvalidFramePayloadData: NSURLSessionWebSocketCloseCode = - 1007; -pub const NSURLSessionWebSocketCloseCodePolicyViolation: NSURLSessionWebSocketCloseCode = 1008; -pub const NSURLSessionWebSocketCloseCodeMessageTooBig: NSURLSessionWebSocketCloseCode = 1009; -pub const NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing: NSURLSessionWebSocketCloseCode = - 1010; -pub const NSURLSessionWebSocketCloseCodeInternalServerError: NSURLSessionWebSocketCloseCode = 1011; -pub const NSURLSessionWebSocketCloseCodeTLSHandshakeFailure: NSURLSessionWebSocketCloseCode = 1015; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionWebSocketCloseCode { + NSURLSessionWebSocketCloseCodeInvalid = 0, + NSURLSessionWebSocketCloseCodeNormalClosure = 1000, + NSURLSessionWebSocketCloseCodeGoingAway = 1001, + NSURLSessionWebSocketCloseCodeProtocolError = 1002, + NSURLSessionWebSocketCloseCodeUnsupportedData = 1003, + NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005, + NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006, + NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007, + NSURLSessionWebSocketCloseCodePolicyViolation = 1008, + NSURLSessionWebSocketCloseCodeMessageTooBig = 1009, + NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = 1010, + NSURLSessionWebSocketCloseCodeInternalServerError = 1011, + NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015, + } +); extern_class!( #[derive(Debug)] @@ -559,11 +561,15 @@ extern_methods!( } ); -pub type NSURLSessionMultipathServiceType = NSInteger; -pub const NSURLSessionMultipathServiceTypeNone: NSURLSessionMultipathServiceType = 0; -pub const NSURLSessionMultipathServiceTypeHandover: NSURLSessionMultipathServiceType = 1; -pub const NSURLSessionMultipathServiceTypeInteractive: NSURLSessionMultipathServiceType = 2; -pub const NSURLSessionMultipathServiceTypeAggregate: NSURLSessionMultipathServiceType = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionMultipathServiceType { + NSURLSessionMultipathServiceTypeNone = 0, + NSURLSessionMultipathServiceTypeHandover = 1, + NSURLSessionMultipathServiceTypeInteractive = 2, + NSURLSessionMultipathServiceTypeAggregate = 3, + } +); extern_class!( #[derive(Debug)] @@ -769,23 +775,34 @@ extern_methods!( } ); -pub type NSURLSessionDelayedRequestDisposition = NSInteger; -pub const NSURLSessionDelayedRequestContinueLoading: NSURLSessionDelayedRequestDisposition = 0; -pub const NSURLSessionDelayedRequestUseNewRequest: NSURLSessionDelayedRequestDisposition = 1; -pub const NSURLSessionDelayedRequestCancel: NSURLSessionDelayedRequestDisposition = 2; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionDelayedRequestDisposition { + NSURLSessionDelayedRequestContinueLoading = 0, + NSURLSessionDelayedRequestUseNewRequest = 1, + NSURLSessionDelayedRequestCancel = 2, + } +); -pub type NSURLSessionAuthChallengeDisposition = NSInteger; -pub const NSURLSessionAuthChallengeUseCredential: NSURLSessionAuthChallengeDisposition = 0; -pub const NSURLSessionAuthChallengePerformDefaultHandling: NSURLSessionAuthChallengeDisposition = 1; -pub const NSURLSessionAuthChallengeCancelAuthenticationChallenge: - NSURLSessionAuthChallengeDisposition = 2; -pub const NSURLSessionAuthChallengeRejectProtectionSpace: NSURLSessionAuthChallengeDisposition = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionAuthChallengeDisposition { + NSURLSessionAuthChallengeUseCredential = 0, + NSURLSessionAuthChallengePerformDefaultHandling = 1, + NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2, + NSURLSessionAuthChallengeRejectProtectionSpace = 3, + } +); -pub type NSURLSessionResponseDisposition = NSInteger; -pub const NSURLSessionResponseCancel: NSURLSessionResponseDisposition = 0; -pub const NSURLSessionResponseAllow: NSURLSessionResponseDisposition = 1; -pub const NSURLSessionResponseBecomeDownload: NSURLSessionResponseDisposition = 2; -pub const NSURLSessionResponseBecomeStream: NSURLSessionResponseDisposition = 3; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionResponseDisposition { + NSURLSessionResponseCancel = 0, + NSURLSessionResponseAllow = 1, + NSURLSessionResponseBecomeDownload = 2, + NSURLSessionResponseBecomeStream = 3, + } +); pub type NSURLSessionDelegate = NSObject; @@ -799,9 +816,7 @@ pub type NSURLSessionStreamDelegate = NSObject; pub type NSURLSessionWebSocketDelegate = NSObject; -extern "C" { - pub static NSURLSessionDownloadTaskResumeData: &'static NSString; -} +extern_static!(NSURLSessionDownloadTaskResumeData: &'static NSString); extern_methods!( /// NSURLSessionDeprecated @@ -813,27 +828,26 @@ extern_methods!( } ); -pub type NSURLSessionTaskMetricsResourceFetchType = NSInteger; -pub const NSURLSessionTaskMetricsResourceFetchTypeUnknown: - NSURLSessionTaskMetricsResourceFetchType = 0; -pub const NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad: - NSURLSessionTaskMetricsResourceFetchType = 1; -pub const NSURLSessionTaskMetricsResourceFetchTypeServerPush: - NSURLSessionTaskMetricsResourceFetchType = 2; -pub const NSURLSessionTaskMetricsResourceFetchTypeLocalCache: - NSURLSessionTaskMetricsResourceFetchType = 3; - -pub type NSURLSessionTaskMetricsDomainResolutionProtocol = NSInteger; -pub const NSURLSessionTaskMetricsDomainResolutionProtocolUnknown: - NSURLSessionTaskMetricsDomainResolutionProtocol = 0; -pub const NSURLSessionTaskMetricsDomainResolutionProtocolUDP: - NSURLSessionTaskMetricsDomainResolutionProtocol = 1; -pub const NSURLSessionTaskMetricsDomainResolutionProtocolTCP: - NSURLSessionTaskMetricsDomainResolutionProtocol = 2; -pub const NSURLSessionTaskMetricsDomainResolutionProtocolTLS: - NSURLSessionTaskMetricsDomainResolutionProtocol = 3; -pub const NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS: - NSURLSessionTaskMetricsDomainResolutionProtocol = 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionTaskMetricsResourceFetchType { + NSURLSessionTaskMetricsResourceFetchTypeUnknown = 0, + NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad = 1, + NSURLSessionTaskMetricsResourceFetchTypeServerPush = 2, + NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSURLSessionTaskMetricsDomainResolutionProtocol { + NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0, + NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1, + NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2, + NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3, + NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs index 2c94d21d6..bb33c024b 100644 --- a/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs +++ b/crates/icrate/src/generated/Foundation/NSUbiquitousKeyValueStore.rs @@ -84,20 +84,20 @@ extern_methods!( } ); -extern "C" { - pub static NSUbiquitousKeyValueStoreDidChangeExternallyNotification: - &'static NSNotificationName; -} - -extern "C" { - pub static NSUbiquitousKeyValueStoreChangeReasonKey: &'static NSString; -} - -extern "C" { - pub static NSUbiquitousKeyValueStoreChangedKeysKey: &'static NSString; -} - -pub const NSUbiquitousKeyValueStoreServerChange: NSInteger = 0; -pub const NSUbiquitousKeyValueStoreInitialSyncChange: NSInteger = 1; -pub const NSUbiquitousKeyValueStoreQuotaViolationChange: NSInteger = 2; -pub const NSUbiquitousKeyValueStoreAccountChange: NSInteger = 3; +extern_static!( + NSUbiquitousKeyValueStoreDidChangeExternallyNotification: &'static NSNotificationName +); + +extern_static!(NSUbiquitousKeyValueStoreChangeReasonKey: &'static NSString); + +extern_static!(NSUbiquitousKeyValueStoreChangedKeysKey: &'static NSString); + +ns_enum!( + #[underlying(NSInteger)] + pub enum { + NSUbiquitousKeyValueStoreServerChange = 0, + NSUbiquitousKeyValueStoreInitialSyncChange = 1, + NSUbiquitousKeyValueStoreQuotaViolationChange = 2, + NSUbiquitousKeyValueStoreAccountChange = 3, + } +); diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index 11f061a97..213dd161a 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -3,11 +3,9 @@ use crate::common::*; use crate::Foundation::*; -pub static NSUndoCloseGroupingRunLoopOrdering: NSUInteger = 350000; +extern_static!(NSUndoCloseGroupingRunLoopOrdering: NSUInteger = 350000); -extern "C" { - pub static NSUndoManagerGroupIsDiscardableKey: &'static NSString; -} +extern_static!(NSUndoManagerGroupIsDiscardableKey: &'static NSString); extern_class!( #[derive(Debug)] @@ -139,34 +137,18 @@ extern_methods!( } ); -extern "C" { - pub static NSUndoManagerCheckpointNotification: &'static NSNotificationName; -} +extern_static!(NSUndoManagerCheckpointNotification: &'static NSNotificationName); -extern "C" { - pub static NSUndoManagerWillUndoChangeNotification: &'static NSNotificationName; -} +extern_static!(NSUndoManagerWillUndoChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSUndoManagerWillRedoChangeNotification: &'static NSNotificationName; -} +extern_static!(NSUndoManagerWillRedoChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSUndoManagerDidUndoChangeNotification: &'static NSNotificationName; -} +extern_static!(NSUndoManagerDidUndoChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSUndoManagerDidRedoChangeNotification: &'static NSNotificationName; -} +extern_static!(NSUndoManagerDidRedoChangeNotification: &'static NSNotificationName); -extern "C" { - pub static NSUndoManagerDidOpenUndoGroupNotification: &'static NSNotificationName; -} +extern_static!(NSUndoManagerDidOpenUndoGroupNotification: &'static NSNotificationName); -extern "C" { - pub static NSUndoManagerWillCloseUndoGroupNotification: &'static NSNotificationName; -} +extern_static!(NSUndoManagerWillCloseUndoGroupNotification: &'static NSNotificationName); -extern "C" { - pub static NSUndoManagerDidCloseUndoGroupNotification: &'static NSNotificationName; -} +extern_static!(NSUndoManagerDidCloseUndoGroupNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 64c05924e..3ac6601c0 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -161,8 +161,6 @@ extern_methods!( } ); -extern "C" { - pub static NSUserActivityTypeBrowsingWeb: &'static NSString; -} +extern_static!(NSUserActivityTypeBrowsingWeb: &'static NSString); pub type NSUserActivityDelegate = NSObject; diff --git a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs index 7405b2a68..4737cbcf1 100644 --- a/crates/icrate/src/generated/Foundation/NSUserDefaults.rs +++ b/crates/icrate/src/generated/Foundation/NSUserDefaults.rs @@ -3,17 +3,11 @@ use crate::common::*; use crate::Foundation::*; -extern "C" { - pub static NSGlobalDomain: &'static NSString; -} +extern_static!(NSGlobalDomain: &'static NSString); -extern "C" { - pub static NSArgumentDomain: &'static NSString; -} +extern_static!(NSArgumentDomain: &'static NSString); -extern "C" { - pub static NSRegistrationDomain: &'static NSString; -} +extern_static!(NSRegistrationDomain: &'static NSString); extern_class!( #[derive(Debug)] @@ -176,127 +170,66 @@ extern_methods!( } ); -extern "C" { - pub static NSUserDefaultsSizeLimitExceededNotification: &'static NSNotificationName; -} +extern_static!(NSUserDefaultsSizeLimitExceededNotification: &'static NSNotificationName); -extern "C" { - pub static NSUbiquitousUserDefaultsNoCloudAccountNotification: &'static NSNotificationName; -} +extern_static!(NSUbiquitousUserDefaultsNoCloudAccountNotification: &'static NSNotificationName); -extern "C" { - pub static NSUbiquitousUserDefaultsDidChangeAccountsNotification: &'static NSNotificationName; -} +extern_static!(NSUbiquitousUserDefaultsDidChangeAccountsNotification: &'static NSNotificationName); -extern "C" { - pub static NSUbiquitousUserDefaultsCompletedInitialSyncNotification: - &'static NSNotificationName; -} +extern_static!( + NSUbiquitousUserDefaultsCompletedInitialSyncNotification: &'static NSNotificationName +); + +extern_static!(NSUserDefaultsDidChangeNotification: &'static NSNotificationName); + +extern_static!(NSWeekDayNameArray: &'static NSString); + +extern_static!(NSShortWeekDayNameArray: &'static NSString); + +extern_static!(NSMonthNameArray: &'static NSString); -extern "C" { - pub static NSUserDefaultsDidChangeNotification: &'static NSNotificationName; -} +extern_static!(NSShortMonthNameArray: &'static NSString); -extern "C" { - pub static NSWeekDayNameArray: &'static NSString; -} +extern_static!(NSTimeFormatString: &'static NSString); -extern "C" { - pub static NSShortWeekDayNameArray: &'static NSString; -} +extern_static!(NSDateFormatString: &'static NSString); -extern "C" { - pub static NSMonthNameArray: &'static NSString; -} +extern_static!(NSTimeDateFormatString: &'static NSString); -extern "C" { - pub static NSShortMonthNameArray: &'static NSString; -} +extern_static!(NSShortTimeDateFormatString: &'static NSString); -extern "C" { - pub static NSTimeFormatString: &'static NSString; -} +extern_static!(NSCurrencySymbol: &'static NSString); -extern "C" { - pub static NSDateFormatString: &'static NSString; -} +extern_static!(NSDecimalSeparator: &'static NSString); -extern "C" { - pub static NSTimeDateFormatString: &'static NSString; -} +extern_static!(NSThousandsSeparator: &'static NSString); -extern "C" { - pub static NSShortTimeDateFormatString: &'static NSString; -} +extern_static!(NSDecimalDigits: &'static NSString); -extern "C" { - pub static NSCurrencySymbol: &'static NSString; -} +extern_static!(NSAMPMDesignation: &'static NSString); -extern "C" { - pub static NSDecimalSeparator: &'static NSString; -} +extern_static!(NSHourNameDesignations: &'static NSString); -extern "C" { - pub static NSThousandsSeparator: &'static NSString; -} +extern_static!(NSYearMonthWeekDesignations: &'static NSString); -extern "C" { - pub static NSDecimalDigits: &'static NSString; -} +extern_static!(NSEarlierTimeDesignations: &'static NSString); -extern "C" { - pub static NSAMPMDesignation: &'static NSString; -} +extern_static!(NSLaterTimeDesignations: &'static NSString); -extern "C" { - pub static NSHourNameDesignations: &'static NSString; -} +extern_static!(NSThisDayDesignations: &'static NSString); -extern "C" { - pub static NSYearMonthWeekDesignations: &'static NSString; -} +extern_static!(NSNextDayDesignations: &'static NSString); -extern "C" { - pub static NSEarlierTimeDesignations: &'static NSString; -} +extern_static!(NSNextNextDayDesignations: &'static NSString); -extern "C" { - pub static NSLaterTimeDesignations: &'static NSString; -} +extern_static!(NSPriorDayDesignations: &'static NSString); -extern "C" { - pub static NSThisDayDesignations: &'static NSString; -} +extern_static!(NSDateTimeOrdering: &'static NSString); -extern "C" { - pub static NSNextDayDesignations: &'static NSString; -} +extern_static!(NSInternationalCurrencyString: &'static NSString); -extern "C" { - pub static NSNextNextDayDesignations: &'static NSString; -} - -extern "C" { - pub static NSPriorDayDesignations: &'static NSString; -} - -extern "C" { - pub static NSDateTimeOrdering: &'static NSString; -} - -extern "C" { - pub static NSInternationalCurrencyString: &'static NSString; -} - -extern "C" { - pub static NSShortDateFormatString: &'static NSString; -} +extern_static!(NSShortDateFormatString: &'static NSString); -extern "C" { - pub static NSPositiveCurrencyFormatString: &'static NSString; -} +extern_static!(NSPositiveCurrencyFormatString: &'static NSString); -extern "C" { - pub static NSNegativeCurrencyFormatString: &'static NSString; -} +extern_static!(NSNegativeCurrencyFormatString: &'static NSString); diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 3e3e1d7b4..26f27c2b7 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -3,13 +3,16 @@ use crate::common::*; use crate::Foundation::*; -pub type NSUserNotificationActivationType = NSInteger; -pub const NSUserNotificationActivationTypeNone: NSUserNotificationActivationType = 0; -pub const NSUserNotificationActivationTypeContentsClicked: NSUserNotificationActivationType = 1; -pub const NSUserNotificationActivationTypeActionButtonClicked: NSUserNotificationActivationType = 2; -pub const NSUserNotificationActivationTypeReplied: NSUserNotificationActivationType = 3; -pub const NSUserNotificationActivationTypeAdditionalActionClicked: - NSUserNotificationActivationType = 4; +ns_enum!( + #[underlying(NSInteger)] + pub enum NSUserNotificationActivationType { + NSUserNotificationActivationTypeNone = 0, + NSUserNotificationActivationTypeContentsClicked = 1, + NSUserNotificationActivationTypeActionButtonClicked = 2, + NSUserNotificationActivationTypeReplied = 3, + NSUserNotificationActivationTypeAdditionalActionClicked = 4, + } +); extern_class!( #[derive(Debug)] @@ -170,9 +173,7 @@ extern_methods!( } ); -extern "C" { - pub static NSUserNotificationDefaultSoundName: &'static NSString; -} +extern_static!(NSUserNotificationDefaultSoundName: &'static NSString); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs index 8299f9845..5ae5c3e06 100644 --- a/crates/icrate/src/generated/Foundation/NSValueTransformer.rs +++ b/crates/icrate/src/generated/Foundation/NSValueTransformer.rs @@ -5,29 +5,17 @@ use crate::Foundation::*; pub type NSValueTransformerName = NSString; -extern "C" { - pub static NSNegateBooleanTransformerName: &'static NSValueTransformerName; -} +extern_static!(NSNegateBooleanTransformerName: &'static NSValueTransformerName); -extern "C" { - pub static NSIsNilTransformerName: &'static NSValueTransformerName; -} +extern_static!(NSIsNilTransformerName: &'static NSValueTransformerName); -extern "C" { - pub static NSIsNotNilTransformerName: &'static NSValueTransformerName; -} +extern_static!(NSIsNotNilTransformerName: &'static NSValueTransformerName); -extern "C" { - pub static NSUnarchiveFromDataTransformerName: &'static NSValueTransformerName; -} +extern_static!(NSUnarchiveFromDataTransformerName: &'static NSValueTransformerName); -extern "C" { - pub static NSKeyedUnarchiveFromDataTransformerName: &'static NSValueTransformerName; -} +extern_static!(NSKeyedUnarchiveFromDataTransformerName: &'static NSValueTransformerName); -extern "C" { - pub static NSSecureUnarchiveFromDataTransformerName: &'static NSValueTransformerName; -} +extern_static!(NSSecureUnarchiveFromDataTransformerName: &'static NSValueTransformerName); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs index f31becc24..c4fd96cda 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDTDNode.rs @@ -3,27 +3,31 @@ use crate::common::*; use crate::Foundation::*; -pub type NSXMLDTDNodeKind = NSUInteger; -pub const NSXMLEntityGeneralKind: NSXMLDTDNodeKind = 1; -pub const NSXMLEntityParsedKind: NSXMLDTDNodeKind = 2; -pub const NSXMLEntityUnparsedKind: NSXMLDTDNodeKind = 3; -pub const NSXMLEntityParameterKind: NSXMLDTDNodeKind = 4; -pub const NSXMLEntityPredefined: NSXMLDTDNodeKind = 5; -pub const NSXMLAttributeCDATAKind: NSXMLDTDNodeKind = 6; -pub const NSXMLAttributeIDKind: NSXMLDTDNodeKind = 7; -pub const NSXMLAttributeIDRefKind: NSXMLDTDNodeKind = 8; -pub const NSXMLAttributeIDRefsKind: NSXMLDTDNodeKind = 9; -pub const NSXMLAttributeEntityKind: NSXMLDTDNodeKind = 10; -pub const NSXMLAttributeEntitiesKind: NSXMLDTDNodeKind = 11; -pub const NSXMLAttributeNMTokenKind: NSXMLDTDNodeKind = 12; -pub const NSXMLAttributeNMTokensKind: NSXMLDTDNodeKind = 13; -pub const NSXMLAttributeEnumerationKind: NSXMLDTDNodeKind = 14; -pub const NSXMLAttributeNotationKind: NSXMLDTDNodeKind = 15; -pub const NSXMLElementDeclarationUndefinedKind: NSXMLDTDNodeKind = 16; -pub const NSXMLElementDeclarationEmptyKind: NSXMLDTDNodeKind = 17; -pub const NSXMLElementDeclarationAnyKind: NSXMLDTDNodeKind = 18; -pub const NSXMLElementDeclarationMixedKind: NSXMLDTDNodeKind = 19; -pub const NSXMLElementDeclarationElementKind: NSXMLDTDNodeKind = 20; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSXMLDTDNodeKind { + NSXMLEntityGeneralKind = 1, + NSXMLEntityParsedKind = 2, + NSXMLEntityUnparsedKind = 3, + NSXMLEntityParameterKind = 4, + NSXMLEntityPredefined = 5, + NSXMLAttributeCDATAKind = 6, + NSXMLAttributeIDKind = 7, + NSXMLAttributeIDRefKind = 8, + NSXMLAttributeIDRefsKind = 9, + NSXMLAttributeEntityKind = 10, + NSXMLAttributeEntitiesKind = 11, + NSXMLAttributeNMTokenKind = 12, + NSXMLAttributeNMTokensKind = 13, + NSXMLAttributeEnumerationKind = 14, + NSXMLAttributeNotationKind = 15, + NSXMLElementDeclarationUndefinedKind = 16, + NSXMLElementDeclarationEmptyKind = 17, + NSXMLElementDeclarationAnyKind = 18, + NSXMLElementDeclarationMixedKind = 19, + NSXMLElementDeclarationElementKind = 20, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs index 9f6ae1d20..a94886dd7 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLDocument.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLDocument.rs @@ -3,11 +3,15 @@ use crate::common::*; use crate::Foundation::*; -pub type NSXMLDocumentContentKind = NSUInteger; -pub const NSXMLDocumentXMLKind: NSXMLDocumentContentKind = 0; -pub const NSXMLDocumentXHTMLKind: NSXMLDocumentContentKind = 1; -pub const NSXMLDocumentHTMLKind: NSXMLDocumentContentKind = 2; -pub const NSXMLDocumentTextKind: NSXMLDocumentContentKind = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSXMLDocumentContentKind { + NSXMLDocumentXMLKind = 0, + NSXMLDocumentXHTMLKind = 1, + NSXMLDocumentHTMLKind = 2, + NSXMLDocumentTextKind = 3, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLNode.rs b/crates/icrate/src/generated/Foundation/NSXMLNode.rs index 1e7c9431f..c0c3d9d69 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNode.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNode.rs @@ -3,20 +3,24 @@ use crate::common::*; use crate::Foundation::*; -pub type NSXMLNodeKind = NSUInteger; -pub const NSXMLInvalidKind: NSXMLNodeKind = 0; -pub const NSXMLDocumentKind: NSXMLNodeKind = 1; -pub const NSXMLElementKind: NSXMLNodeKind = 2; -pub const NSXMLAttributeKind: NSXMLNodeKind = 3; -pub const NSXMLNamespaceKind: NSXMLNodeKind = 4; -pub const NSXMLProcessingInstructionKind: NSXMLNodeKind = 5; -pub const NSXMLCommentKind: NSXMLNodeKind = 6; -pub const NSXMLTextKind: NSXMLNodeKind = 7; -pub const NSXMLDTDKind: NSXMLNodeKind = 8; -pub const NSXMLEntityDeclarationKind: NSXMLNodeKind = 9; -pub const NSXMLAttributeDeclarationKind: NSXMLNodeKind = 10; -pub const NSXMLElementDeclarationKind: NSXMLNodeKind = 11; -pub const NSXMLNotationDeclarationKind: NSXMLNodeKind = 12; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSXMLNodeKind { + NSXMLInvalidKind = 0, + NSXMLDocumentKind = 1, + NSXMLElementKind = 2, + NSXMLAttributeKind = 3, + NSXMLNamespaceKind = 4, + NSXMLProcessingInstructionKind = 5, + NSXMLCommentKind = 6, + NSXMLTextKind = 7, + NSXMLDTDKind = 8, + NSXMLEntityDeclarationKind = 9, + NSXMLAttributeDeclarationKind = 10, + NSXMLElementDeclarationKind = 11, + NSXMLNotationDeclarationKind = 12, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs index d348b45f1..d38456dd8 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLNodeOptions.rs @@ -3,44 +3,46 @@ use crate::common::*; use crate::Foundation::*; -pub type NSXMLNodeOptions = NSUInteger; -pub const NSXMLNodeOptionsNone: NSXMLNodeOptions = 0; -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; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSXMLNodeOptions { + NSXMLNodeOptionsNone = 0, + NSXMLNodeIsCDATA = 1 << 0, + NSXMLNodeExpandEmptyElement = 1 << 1, + NSXMLNodeCompactEmptyElement = 1 << 2, + NSXMLNodeUseSingleQuotes = 1 << 3, + NSXMLNodeUseDoubleQuotes = 1 << 4, + NSXMLNodeNeverEscapeContents = 1 << 5, + NSXMLDocumentTidyHTML = 1 << 9, + NSXMLDocumentTidyXML = 1 << 10, + NSXMLDocumentValidate = 1 << 13, + NSXMLNodeLoadExternalEntitiesAlways = 1 << 14, + NSXMLNodeLoadExternalEntitiesSameOriginOnly = 1 << 15, + NSXMLNodeLoadExternalEntitiesNever = 1 << 19, + NSXMLDocumentXInclude = 1 << 16, + NSXMLNodePrettyPrint = 1 << 17, + NSXMLDocumentIncludeContentTypeDeclaration = 1 << 18, + NSXMLNodePreserveNamespaceOrder = 1 << 20, + NSXMLNodePreserveAttributeOrder = 1 << 21, + NSXMLNodePreserveEntities = 1 << 22, + NSXMLNodePreservePrefixes = 1 << 23, + NSXMLNodePreserveCDATA = 1 << 24, + NSXMLNodePreserveWhitespace = 1 << 25, + NSXMLNodePreserveDTD = 1 << 26, + NSXMLNodePreserveCharacterReferences = 1 << 27, + NSXMLNodePromoteSignificantWhitespace = 1 << 28, + NSXMLNodePreserveEmptyElements = NSXMLNodeExpandEmptyElement | NSXMLNodeCompactEmptyElement, + NSXMLNodePreserveQuotes = NSXMLNodeUseSingleQuotes | NSXMLNodeUseDoubleQuotes, + NSXMLNodePreserveAll = NSXMLNodePreserveNamespaceOrder + | NSXMLNodePreserveAttributeOrder + | NSXMLNodePreserveEntities + | NSXMLNodePreservePrefixes + | NSXMLNodePreserveCDATA + | NSXMLNodePreserveEmptyElements + | NSXMLNodePreserveQuotes + | NSXMLNodePreserveWhitespace + | NSXMLNodePreserveDTD + | NSXMLNodePreserveCharacterReferences + | 0xFFF00000, + } +); diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 59f49d48c..5bcf2cbfc 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -3,12 +3,15 @@ use crate::common::*; use crate::Foundation::*; -pub type NSXMLParserExternalEntityResolvingPolicy = NSUInteger; -pub const NSXMLParserResolveExternalEntitiesNever: NSXMLParserExternalEntityResolvingPolicy = 0; -pub const NSXMLParserResolveExternalEntitiesNoNetwork: NSXMLParserExternalEntityResolvingPolicy = 1; -pub const NSXMLParserResolveExternalEntitiesSameOriginOnly: - NSXMLParserExternalEntityResolvingPolicy = 2; -pub const NSXMLParserResolveExternalEntitiesAlways: NSXMLParserExternalEntityResolvingPolicy = 3; +ns_enum!( + #[underlying(NSUInteger)] + pub enum NSXMLParserExternalEntityResolvingPolicy { + NSXMLParserResolveExternalEntitiesNever = 0, + NSXMLParserResolveExternalEntitiesNoNetwork = 1, + NSXMLParserResolveExternalEntitiesSameOriginOnly = 2, + NSXMLParserResolveExternalEntitiesAlways = 3, + } +); extern_class!( #[derive(Debug)] @@ -113,101 +116,103 @@ extern_methods!( pub type NSXMLParserDelegate = NSObject; -extern "C" { - pub static NSXMLParserErrorDomain: &'static NSErrorDomain; -} - -pub type NSXMLParserError = NSInteger; -pub const NSXMLParserInternalError: NSXMLParserError = 1; -pub const NSXMLParserOutOfMemoryError: NSXMLParserError = 2; -pub const NSXMLParserDocumentStartError: NSXMLParserError = 3; -pub const NSXMLParserEmptyDocumentError: NSXMLParserError = 4; -pub const NSXMLParserPrematureDocumentEndError: NSXMLParserError = 5; -pub const NSXMLParserInvalidHexCharacterRefError: NSXMLParserError = 6; -pub const NSXMLParserInvalidDecimalCharacterRefError: NSXMLParserError = 7; -pub const NSXMLParserInvalidCharacterRefError: NSXMLParserError = 8; -pub const NSXMLParserInvalidCharacterError: NSXMLParserError = 9; -pub const NSXMLParserCharacterRefAtEOFError: NSXMLParserError = 10; -pub const NSXMLParserCharacterRefInPrologError: NSXMLParserError = 11; -pub const NSXMLParserCharacterRefInEpilogError: NSXMLParserError = 12; -pub const NSXMLParserCharacterRefInDTDError: NSXMLParserError = 13; -pub const NSXMLParserEntityRefAtEOFError: NSXMLParserError = 14; -pub const NSXMLParserEntityRefInPrologError: NSXMLParserError = 15; -pub const NSXMLParserEntityRefInEpilogError: NSXMLParserError = 16; -pub const NSXMLParserEntityRefInDTDError: NSXMLParserError = 17; -pub const NSXMLParserParsedEntityRefAtEOFError: NSXMLParserError = 18; -pub const NSXMLParserParsedEntityRefInPrologError: NSXMLParserError = 19; -pub const NSXMLParserParsedEntityRefInEpilogError: NSXMLParserError = 20; -pub const NSXMLParserParsedEntityRefInInternalSubsetError: NSXMLParserError = 21; -pub const NSXMLParserEntityReferenceWithoutNameError: NSXMLParserError = 22; -pub const NSXMLParserEntityReferenceMissingSemiError: NSXMLParserError = 23; -pub const NSXMLParserParsedEntityRefNoNameError: NSXMLParserError = 24; -pub const NSXMLParserParsedEntityRefMissingSemiError: NSXMLParserError = 25; -pub const NSXMLParserUndeclaredEntityError: NSXMLParserError = 26; -pub const NSXMLParserUnparsedEntityError: NSXMLParserError = 28; -pub const NSXMLParserEntityIsExternalError: NSXMLParserError = 29; -pub const NSXMLParserEntityIsParameterError: NSXMLParserError = 30; -pub const NSXMLParserUnknownEncodingError: NSXMLParserError = 31; -pub const NSXMLParserEncodingNotSupportedError: NSXMLParserError = 32; -pub const NSXMLParserStringNotStartedError: NSXMLParserError = 33; -pub const NSXMLParserStringNotClosedError: NSXMLParserError = 34; -pub const NSXMLParserNamespaceDeclarationError: NSXMLParserError = 35; -pub const NSXMLParserEntityNotStartedError: NSXMLParserError = 36; -pub const NSXMLParserEntityNotFinishedError: NSXMLParserError = 37; -pub const NSXMLParserLessThanSymbolInAttributeError: NSXMLParserError = 38; -pub const NSXMLParserAttributeNotStartedError: NSXMLParserError = 39; -pub const NSXMLParserAttributeNotFinishedError: NSXMLParserError = 40; -pub const NSXMLParserAttributeHasNoValueError: NSXMLParserError = 41; -pub const NSXMLParserAttributeRedefinedError: NSXMLParserError = 42; -pub const NSXMLParserLiteralNotStartedError: NSXMLParserError = 43; -pub const NSXMLParserLiteralNotFinishedError: NSXMLParserError = 44; -pub const NSXMLParserCommentNotFinishedError: NSXMLParserError = 45; -pub const NSXMLParserProcessingInstructionNotStartedError: NSXMLParserError = 46; -pub const NSXMLParserProcessingInstructionNotFinishedError: NSXMLParserError = 47; -pub const NSXMLParserNotationNotStartedError: NSXMLParserError = 48; -pub const NSXMLParserNotationNotFinishedError: NSXMLParserError = 49; -pub const NSXMLParserAttributeListNotStartedError: NSXMLParserError = 50; -pub const NSXMLParserAttributeListNotFinishedError: NSXMLParserError = 51; -pub const NSXMLParserMixedContentDeclNotStartedError: NSXMLParserError = 52; -pub const NSXMLParserMixedContentDeclNotFinishedError: NSXMLParserError = 53; -pub const NSXMLParserElementContentDeclNotStartedError: NSXMLParserError = 54; -pub const NSXMLParserElementContentDeclNotFinishedError: NSXMLParserError = 55; -pub const NSXMLParserXMLDeclNotStartedError: NSXMLParserError = 56; -pub const NSXMLParserXMLDeclNotFinishedError: NSXMLParserError = 57; -pub const NSXMLParserConditionalSectionNotStartedError: NSXMLParserError = 58; -pub const NSXMLParserConditionalSectionNotFinishedError: NSXMLParserError = 59; -pub const NSXMLParserExternalSubsetNotFinishedError: NSXMLParserError = 60; -pub const NSXMLParserDOCTYPEDeclNotFinishedError: NSXMLParserError = 61; -pub const NSXMLParserMisplacedCDATAEndStringError: NSXMLParserError = 62; -pub const NSXMLParserCDATANotFinishedError: NSXMLParserError = 63; -pub const NSXMLParserMisplacedXMLDeclarationError: NSXMLParserError = 64; -pub const NSXMLParserSpaceRequiredError: NSXMLParserError = 65; -pub const NSXMLParserSeparatorRequiredError: NSXMLParserError = 66; -pub const NSXMLParserNMTOKENRequiredError: NSXMLParserError = 67; -pub const NSXMLParserNAMERequiredError: NSXMLParserError = 68; -pub const NSXMLParserPCDATARequiredError: NSXMLParserError = 69; -pub const NSXMLParserURIRequiredError: NSXMLParserError = 70; -pub const NSXMLParserPublicIdentifierRequiredError: NSXMLParserError = 71; -pub const NSXMLParserLTRequiredError: NSXMLParserError = 72; -pub const NSXMLParserGTRequiredError: NSXMLParserError = 73; -pub const NSXMLParserLTSlashRequiredError: NSXMLParserError = 74; -pub const NSXMLParserEqualExpectedError: NSXMLParserError = 75; -pub const NSXMLParserTagNameMismatchError: NSXMLParserError = 76; -pub const NSXMLParserUnfinishedTagError: NSXMLParserError = 77; -pub const NSXMLParserStandaloneValueError: NSXMLParserError = 78; -pub const NSXMLParserInvalidEncodingNameError: NSXMLParserError = 79; -pub const NSXMLParserCommentContainsDoubleHyphenError: NSXMLParserError = 80; -pub const NSXMLParserInvalidEncodingError: NSXMLParserError = 81; -pub const NSXMLParserExternalStandaloneEntityError: NSXMLParserError = 82; -pub const NSXMLParserInvalidConditionalSectionError: NSXMLParserError = 83; -pub const NSXMLParserEntityValueRequiredError: NSXMLParserError = 84; -pub const NSXMLParserNotWellBalancedError: NSXMLParserError = 85; -pub const NSXMLParserExtraContentError: NSXMLParserError = 86; -pub const NSXMLParserInvalidCharacterInEntityError: NSXMLParserError = 87; -pub const NSXMLParserParsedEntityRefInInternalError: NSXMLParserError = 88; -pub const NSXMLParserEntityRefLoopError: NSXMLParserError = 89; -pub const NSXMLParserEntityBoundaryError: NSXMLParserError = 90; -pub const NSXMLParserInvalidURIError: NSXMLParserError = 91; -pub const NSXMLParserURIFragmentError: NSXMLParserError = 92; -pub const NSXMLParserNoDTDError: NSXMLParserError = 94; -pub const NSXMLParserDelegateAbortedParseError: NSXMLParserError = 512; +extern_static!(NSXMLParserErrorDomain: &'static NSErrorDomain); + +ns_enum!( + #[underlying(NSInteger)] + pub enum NSXMLParserError { + NSXMLParserInternalError = 1, + NSXMLParserOutOfMemoryError = 2, + NSXMLParserDocumentStartError = 3, + NSXMLParserEmptyDocumentError = 4, + NSXMLParserPrematureDocumentEndError = 5, + NSXMLParserInvalidHexCharacterRefError = 6, + NSXMLParserInvalidDecimalCharacterRefError = 7, + NSXMLParserInvalidCharacterRefError = 8, + NSXMLParserInvalidCharacterError = 9, + NSXMLParserCharacterRefAtEOFError = 10, + NSXMLParserCharacterRefInPrologError = 11, + NSXMLParserCharacterRefInEpilogError = 12, + NSXMLParserCharacterRefInDTDError = 13, + NSXMLParserEntityRefAtEOFError = 14, + NSXMLParserEntityRefInPrologError = 15, + NSXMLParserEntityRefInEpilogError = 16, + NSXMLParserEntityRefInDTDError = 17, + NSXMLParserParsedEntityRefAtEOFError = 18, + NSXMLParserParsedEntityRefInPrologError = 19, + NSXMLParserParsedEntityRefInEpilogError = 20, + NSXMLParserParsedEntityRefInInternalSubsetError = 21, + NSXMLParserEntityReferenceWithoutNameError = 22, + NSXMLParserEntityReferenceMissingSemiError = 23, + NSXMLParserParsedEntityRefNoNameError = 24, + NSXMLParserParsedEntityRefMissingSemiError = 25, + NSXMLParserUndeclaredEntityError = 26, + NSXMLParserUnparsedEntityError = 28, + NSXMLParserEntityIsExternalError = 29, + NSXMLParserEntityIsParameterError = 30, + NSXMLParserUnknownEncodingError = 31, + NSXMLParserEncodingNotSupportedError = 32, + NSXMLParserStringNotStartedError = 33, + NSXMLParserStringNotClosedError = 34, + NSXMLParserNamespaceDeclarationError = 35, + NSXMLParserEntityNotStartedError = 36, + NSXMLParserEntityNotFinishedError = 37, + NSXMLParserLessThanSymbolInAttributeError = 38, + NSXMLParserAttributeNotStartedError = 39, + NSXMLParserAttributeNotFinishedError = 40, + NSXMLParserAttributeHasNoValueError = 41, + NSXMLParserAttributeRedefinedError = 42, + NSXMLParserLiteralNotStartedError = 43, + NSXMLParserLiteralNotFinishedError = 44, + NSXMLParserCommentNotFinishedError = 45, + NSXMLParserProcessingInstructionNotStartedError = 46, + NSXMLParserProcessingInstructionNotFinishedError = 47, + NSXMLParserNotationNotStartedError = 48, + NSXMLParserNotationNotFinishedError = 49, + NSXMLParserAttributeListNotStartedError = 50, + NSXMLParserAttributeListNotFinishedError = 51, + NSXMLParserMixedContentDeclNotStartedError = 52, + NSXMLParserMixedContentDeclNotFinishedError = 53, + NSXMLParserElementContentDeclNotStartedError = 54, + NSXMLParserElementContentDeclNotFinishedError = 55, + NSXMLParserXMLDeclNotStartedError = 56, + NSXMLParserXMLDeclNotFinishedError = 57, + NSXMLParserConditionalSectionNotStartedError = 58, + NSXMLParserConditionalSectionNotFinishedError = 59, + NSXMLParserExternalSubsetNotFinishedError = 60, + NSXMLParserDOCTYPEDeclNotFinishedError = 61, + NSXMLParserMisplacedCDATAEndStringError = 62, + NSXMLParserCDATANotFinishedError = 63, + NSXMLParserMisplacedXMLDeclarationError = 64, + NSXMLParserSpaceRequiredError = 65, + NSXMLParserSeparatorRequiredError = 66, + NSXMLParserNMTOKENRequiredError = 67, + NSXMLParserNAMERequiredError = 68, + NSXMLParserPCDATARequiredError = 69, + NSXMLParserURIRequiredError = 70, + NSXMLParserPublicIdentifierRequiredError = 71, + NSXMLParserLTRequiredError = 72, + NSXMLParserGTRequiredError = 73, + NSXMLParserLTSlashRequiredError = 74, + NSXMLParserEqualExpectedError = 75, + NSXMLParserTagNameMismatchError = 76, + NSXMLParserUnfinishedTagError = 77, + NSXMLParserStandaloneValueError = 78, + NSXMLParserInvalidEncodingNameError = 79, + NSXMLParserCommentContainsDoubleHyphenError = 80, + NSXMLParserInvalidEncodingError = 81, + NSXMLParserExternalStandaloneEntityError = 82, + NSXMLParserInvalidConditionalSectionError = 83, + NSXMLParserEntityValueRequiredError = 84, + NSXMLParserNotWellBalancedError = 85, + NSXMLParserExtraContentError = 86, + NSXMLParserInvalidCharacterInEntityError = 87, + NSXMLParserParsedEntityRefInInternalError = 88, + NSXMLParserEntityRefLoopError = 89, + NSXMLParserEntityBoundaryError = 90, + NSXMLParserInvalidURIError = 91, + NSXMLParserURIFragmentError = 92, + NSXMLParserNoDTDError = 94, + NSXMLParserDelegateAbortedParseError = 512, + } +); diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 3479dba3b..4f2389797 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -5,8 +5,12 @@ use crate::Foundation::*; pub type NSXPCProxyCreating = NSObject; -pub type NSXPCConnectionOptions = NSUInteger; -pub const NSXPCConnectionPrivileged: NSXPCConnectionOptions = 1 << 12; +ns_options!( + #[underlying(NSUInteger)] + pub enum NSXPCConnectionOptions { + NSXPCConnectionPrivileged = 1 << 12, + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index 4387b5409..25dc3556e 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -3,5 +3,10 @@ use crate::common::*; use crate::Foundation::*; -pub const NSScannedOption: NSUInteger = 1 << 0; -pub const NSCollectorDisabledOption: NSUInteger = 1 << 1; +ns_enum!( + #[underlying(NSUInteger)] + pub enum { + NSScannedOption = 1<<0, + NSCollectorDisabledOption = 1<<1, + } +); diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 2c3c7a17d..723a13f75 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -19,7 +19,7 @@ extern crate std; #[cfg(feature = "objective-c")] pub use objc2; -macro_rules! struct_impl { +macro_rules! extern_struct { ( $v:vis struct $name:ident { $($field_v:vis $field:ident: $ty:ty),* $(,)? @@ -46,6 +46,162 @@ macro_rules! struct_impl { }; } +macro_rules! extern_enum { + ( + #[underlying($ty:ty)] + $v:vis enum $name:ident { + $($field:ident = $value:expr),* $(,)? + } + ) => { + // TODO: Improve type-safety + $v type $name = $ty; + + extern_enum! { + @__inner + @($v) + @($name) + @($($field = $value,)*) + } + }; + ( + #[underlying($ty:ty)] + $v:vis enum { + $($field:ident = $value:expr),* $(,)? + } + ) => { + extern_enum! { + @__inner + @($v) + @($ty) + @($($field = $value,)*) + } + }; + + // tt-munch each field + ( + @__inner + @($v:vis) + @($ty:ty) + @() + ) => { + // Base case + }; + ( + @__inner + @($v:vis) + @($ty:ty) + @( + $field:ident = $value:expr, + $($rest:tt)* + ) + ) => { + $v const $field: $ty = $value; + + extern_enum! { + @__inner + @($v) + @($ty) + @($($rest)*) + } + }; +} + +/// Corresponds to `NS_ENUM` +macro_rules! ns_enum { + ( + #[underlying($ty:ty)] + $v:vis enum $($name:ident)? { + $($field:ident = $value:expr),* $(,)? + } + ) => { + extern_enum! { + #[underlying($ty)] + $v enum $($name)? { + $($field = $value),* + } + } + }; +} + +/// Corresponds to `NS_OPTIONS` +macro_rules! ns_options { + ( + #[underlying($ty:ty)] + $v:vis enum $name:ident { + $($field:ident = $value:expr),* $(,)? + } + ) => { + // TODO: Handle this differently (e.g. as `bitflags`) + extern_enum! { + #[underlying($ty)] + $v enum $name { + $($field = $value),* + } + } + }; +} + +/// Corresponds to `NS_CLOSED_ENUM` +macro_rules! ns_closed_enum { + ( + #[underlying(NSUInteger)] + $v:vis enum $name:ident { + $($field:ident = $value:expr),* $(,)? + } + ) => { + // TODO: Handle this differently + extern_enum! { + #[underlying(NSUInteger)] + $v enum $name { + $($field = $value),* + } + } + }; + ( + #[underlying(NSInteger)] + $v:vis enum $name:ident { + $($field:ident = $value:expr),* $(,)? + } + ) => { + // TODO: Handle this differently + extern_enum! { + #[underlying(NSInteger)] + $v enum $name { + $($field = $value),* + } + } + }; +} + +/// Corresponds to `NS_ERROR_ENUM` +macro_rules! ns_error_enum { + ( + #[underlying(NSInteger)] + $v:vis enum $($name:ident)? { + $($field:ident = $value:expr),* $(,)? + } + ) => { + // TODO: Handle this differently + extern_enum! { + #[underlying(NSInteger)] + $v enum $($name)? { + $($field = $value),* + } + } + }; +} + +macro_rules! extern_static { + ($name:ident: $ty:ty) => { + extern "C" { + pub static $name: $ty; + } + }; + ($name:ident: $ty:ty = $value:expr) => { + pub static $name: $ty = $value; + }; +} + // Frameworks #[cfg(feature = "AppKit")] pub mod AppKit; From 98d8dd80bdbdaa8b469eae49e15a9b3f182a7625 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 3 Nov 2022 01:40:55 +0100 Subject: [PATCH 118/131] Add proper IncompleteArray parsing --- crates/header-translator/src/rust_type.rs | 81 +++++++++++++++---- crates/header-translator/src/stmt.rs | 3 + .../src/generated/AppKit/NSBitmapImageRep.rs | 4 +- .../src/generated/Foundation/NSArray.rs | 12 ++- .../src/generated/Foundation/NSDictionary.rs | 20 +++-- .../src/generated/Foundation/NSIndexPath.rs | 4 +- .../src/generated/Foundation/NSOrderedSet.rs | 10 +-- .../icrate/src/generated/Foundation/NSSet.rs | 8 +- crates/icrate/src/lib.rs | 1 - 9 files changed, 103 insertions(+), 40 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index e9a8eeb4c..5ce750b1d 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -36,7 +36,7 @@ impl GenericType { .get_objc_type_arguments() .into_iter() .map(|param| { - match RustType::parse(param, false, Nullability::Unspecified) { + match RustType::parse(param, false, Nullability::Unspecified, false) { RustType::Id { type_, is_const: _, @@ -112,6 +112,7 @@ fn parse_attributed<'a>( nullability: &mut Nullability, lifetime: &mut Lifetime, kindof: Option<&mut bool>, + inside_partial_array: bool, ) -> Type<'a> { let mut modified_ty = ty.clone(); while modified_ty.get_kind() == TypeKind::Attributed { @@ -186,6 +187,13 @@ fn parse_attributed<'a>( } } + if inside_partial_array { + if let Some(rest) = name.strip_prefix("__unsafe_unretained") { + *lifetime = Lifetime::Unretained; + name = rest.trim(); + } + } + if let Some(rest) = name.strip_suffix("__unsafe_unretained") { *lifetime = Lifetime::Unretained; name = rest.trim(); @@ -292,6 +300,11 @@ pub enum RustType { is_const: bool, pointee: Box, }, + IncompleteArray { + nullability: Nullability, + is_const: bool, + pointee: Box, + }, Array { element_type: Box, num_elements: usize, @@ -356,13 +369,24 @@ impl RustType { } } - fn parse(ty: Type<'_>, is_consumed: bool, mut nullability: Nullability) -> Self { + fn parse( + ty: Type<'_>, + is_consumed: bool, + mut nullability: Nullability, + inside_partial_array: bool, + ) -> Self { use TypeKind::*; // println!("{:?}, {:?}", ty, ty.get_class_type()); let mut lifetime = Lifetime::Unspecified; - let ty = parse_attributed(ty, &mut nullability, &mut lifetime, None); + let ty = parse_attributed( + ty, + &mut nullability, + &mut lifetime, + None, + inside_partial_array, + ); // println!("{:?}: {:?}", ty.get_kind(), ty.get_display_name()); @@ -398,7 +422,7 @@ impl RustType { let ty = ty.get_pointee_type().expect("pointer type to have pointee"); // Note: Can't handle const id pointers // assert!(!ty.is_const_qualified(), "expected pointee to not be const"); - let pointee = Self::parse(ty, is_consumed, Nullability::Unspecified); + let pointee = Self::parse(ty, is_consumed, Nullability::Unspecified, false); Self::Pointer { nullability, is_const, @@ -408,7 +432,13 @@ impl RustType { ObjCObjectPointer => { let ty = ty.get_pointee_type().expect("pointer type to have pointee"); let mut kindof = false; - let ty = parse_attributed(ty, &mut nullability, &mut lifetime, Some(&mut kindof)); + let ty = parse_attributed( + ty, + &mut nullability, + &mut lifetime, + Some(&mut kindof), + false, + ); let type_ = GenericType::parse_objc_pointer(ty); Self::Id { @@ -507,14 +537,24 @@ impl RustType { FunctionPrototype => Self::TypeDef { name: "TodoFunction".to_string(), }, - IncompleteArray => Self::TypeDef { - name: "TodoArray".to_string(), - }, + IncompleteArray => { + let is_const = ty.is_const_qualified(); + let ty = ty + .get_element_type() + .expect("incomplete array to have element type"); + let pointee = Self::parse(ty, is_consumed, Nullability::Unspecified, true); + Self::IncompleteArray { + nullability, + is_const, + pointee: Box::new(pointee), + } + } ConstantArray => { let element_type = Self::parse( ty.get_element_type().expect("array to have element type"), is_consumed, Nullability::Unspecified, + false, ); let num_elements = ty .get_size() @@ -536,13 +576,14 @@ impl RustType { match self { Self::Id { lifetime, .. } => f(*lifetime), Self::Pointer { pointee, .. } => pointee.visit_lifetime(f), + Self::IncompleteArray { pointee, .. } => pointee.visit_lifetime(f), Self::Array { element_type, .. } => element_type.visit_lifetime(f), _ => {} } } pub fn parse_argument(ty: Type<'_>, is_consumed: bool) -> Self { - let this = Self::parse(ty, is_consumed, Nullability::Unspecified); + let this = Self::parse(ty, is_consumed, Nullability::Unspecified, false); match &this { Self::Pointer { pointee, .. } => pointee.visit_lifetime(|lifetime| { @@ -550,6 +591,11 @@ impl RustType { panic!("unexpected lifetime {lifetime:?} in pointer argument {ty:?}"); } }), + Self::IncompleteArray { pointee, .. } => pointee.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unretained && lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime {lifetime:?} in incomplete array argument {ty:?}"); + } + }), _ => this.visit_lifetime(|lifetime| { if lifetime != Lifetime::Strong && lifetime != Lifetime::Unspecified { panic!("unexpected lifetime {lifetime:?} in argument {ty:?}"); @@ -591,7 +637,7 @@ impl RustType { Self::TypeDef { name: type_.name } } _ => { - let this = Self::parse(ty, false, Nullability::Unspecified); + let this = Self::parse(ty, false, Nullability::Unspecified, false); this.visit_lifetime(|lifetime| { if lifetime != Lifetime::Unspecified { @@ -605,7 +651,7 @@ impl RustType { } pub fn parse_property(ty: Type<'_>, default_nullability: Nullability) -> Self { - let this = Self::parse(ty, false, default_nullability); + let this = Self::parse(ty, false, default_nullability, false); this.visit_lifetime(|lifetime| { if lifetime != Lifetime::Unspecified { @@ -617,7 +663,7 @@ impl RustType { } pub fn parse_struct_field(ty: Type<'_>) -> Self { - let this = Self::parse(ty, false, Nullability::Unspecified); + let this = Self::parse(ty, false, Nullability::Unspecified, false); this.visit_lifetime(|lifetime| { if lifetime != Lifetime::Unspecified { @@ -629,7 +675,7 @@ impl RustType { } pub fn parse_enum(ty: Type<'_>) -> Self { - let this = Self::parse(ty, false, Nullability::Unspecified); + let this = Self::parse(ty, false, Nullability::Unspecified, false); this.visit_lifetime(|_lifetime| { panic!("unexpected lifetime in enum {this:?}"); @@ -706,6 +752,11 @@ impl fmt::Display for RustType { nullability, is_const, pointee, + } + | IncompleteArray { + nullability, + is_const, + pointee, } => match &**pointee { // Self::Id { // type_, @@ -800,7 +851,7 @@ impl RustTypeReturn { } pub fn parse(ty: Type<'_>) -> Self { - Self::new(RustType::parse(ty, false, Nullability::Unspecified)) + Self::new(RustType::parse(ty, false, Nullability::Unspecified, false)) } pub fn as_error(&self) -> String { @@ -873,7 +924,7 @@ pub struct RustTypeStatic { impl RustTypeStatic { pub fn parse(ty: Type<'_>) -> Self { - let inner = RustType::parse(ty, false, Nullability::Unspecified); + let inner = RustType::parse(ty, false, Nullability::Unspecified, false); inner.visit_lifetime(|lifetime| { if lifetime != Lifetime::Strong && lifetime != Lifetime::Unspecified { diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index eb1b2b529..ac99613de 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -469,6 +469,9 @@ impl Stmt { }; Some(Self::AliasDecl { name, type_ }) } + RustType::IncompleteArray { .. } => { + unimplemented!("incomplete array in struct") + } type_ => Some(Self::AliasDecl { name, type_ }), } } diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index d93d5aa50..261acc077 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -259,10 +259,10 @@ extern_methods!( pub unsafe fn colorAtX_y(&self, x: NSInteger, y: NSInteger) -> Option>; #[method(getPixel:atX:y:)] - pub unsafe fn getPixel_atX_y(&self, p: TodoArray, x: NSInteger, y: NSInteger); + pub unsafe fn getPixel_atX_y(&self, p: NonNull, x: NSInteger, y: NSInteger); #[method(setPixel:atX:y:)] - pub unsafe fn setPixel_atX_y(&self, p: TodoArray, x: NSInteger, y: NSInteger); + pub unsafe fn setPixel_atX_y(&self, p: NonNull, x: NSInteger, y: NSInteger); #[method(CGImage)] pub unsafe fn CGImage(&self) -> CGImageRef; diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index bf622937b..839fb05b9 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -28,7 +28,7 @@ extern_methods!( #[method_id(@__retain_semantics Init initWithObjects:count:)] pub unsafe fn initWithObjects_count( this: Option>, - objects: TodoArray, + objects: *mut NonNull, cnt: NSUInteger, ) -> Id; @@ -92,7 +92,11 @@ extern_methods!( ) -> Option>; #[method(getObjects:range:)] - pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange); + pub unsafe fn getObjects_range( + &self, + objects: NonNull>, + range: NSRange, + ); #[method(indexOfObject:)] pub unsafe fn indexOfObject(&self, anObject: &ObjectType) -> NSUInteger; @@ -270,7 +274,7 @@ extern_methods!( #[method_id(@__retain_semantics Other arrayWithObjects:count:)] pub unsafe fn arrayWithObjects_count( - objects: TodoArray, + objects: NonNull>, cnt: NSUInteger, ) -> Id; @@ -339,7 +343,7 @@ extern_methods!( /// NSDeprecated unsafe impl NSArray { #[method(getObjects:)] - pub unsafe fn getObjects(&self, objects: TodoArray); + pub unsafe fn getObjects(&self, objects: NonNull>); #[method_id(@__retain_semantics Other arrayWithContentsOfFile:)] pub unsafe fn arrayWithContentsOfFile( diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index e54902482..509ab7409 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -32,8 +32,8 @@ extern_methods!( #[method_id(@__retain_semantics Init initWithObjects:forKeys:count:)] pub unsafe fn initWithObjects_forKeys_count( this: Option>, - objects: TodoArray, - keys: TodoArray, + objects: *mut NonNull, + keys: *mut NonNull, cnt: NSUInteger, ) -> Id; @@ -105,8 +105,8 @@ extern_methods!( #[method(getObjects:andKeys:count:)] pub unsafe fn getObjects_andKeys_count( &self, - objects: TodoArray, - keys: TodoArray, + objects: *mut NonNull, + keys: *mut NonNull, count: NSUInteger, ); @@ -158,7 +158,11 @@ extern_methods!( /// NSDeprecated unsafe impl NSDictionary { #[method(getObjects:andKeys:)] - pub unsafe fn getObjects_andKeys(&self, objects: TodoArray, keys: TodoArray); + pub unsafe fn getObjects_andKeys( + &self, + objects: *mut NonNull, + keys: *mut NonNull, + ); #[method_id(@__retain_semantics Other dictionaryWithContentsOfFile:)] pub unsafe fn dictionaryWithContentsOfFile( @@ -208,8 +212,8 @@ extern_methods!( #[method_id(@__retain_semantics Other dictionaryWithObjects:forKeys:count:)] pub unsafe fn dictionaryWithObjects_forKeys_count( - objects: TodoArray, - keys: TodoArray, + objects: *mut NonNull, + keys: *mut NonNull, cnt: NSUInteger, ) -> Id; @@ -363,7 +367,7 @@ extern_methods!( pub unsafe fn countByEnumeratingWithState_objects_count( &self, state: NonNull, - buffer: TodoArray, + buffer: NonNull<*mut K>, len: NSUInteger, ) -> NSUInteger; } diff --git a/crates/icrate/src/generated/Foundation/NSIndexPath.rs b/crates/icrate/src/generated/Foundation/NSIndexPath.rs index 9b597173a..ef8b1c7bd 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexPath.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexPath.rs @@ -19,14 +19,14 @@ extern_methods!( #[method_id(@__retain_semantics Other indexPathWithIndexes:length:)] pub unsafe fn indexPathWithIndexes_length( - indexes: TodoArray, + indexes: *mut NSUInteger, length: NSUInteger, ) -> Id; #[method_id(@__retain_semantics Init initWithIndexes:length:)] pub unsafe fn initWithIndexes_length( this: Option>, - indexes: TodoArray, + indexes: *mut NSUInteger, length: NSUInteger, ) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index bc6bf135a..e71c5dd96 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -31,7 +31,7 @@ extern_methods!( #[method_id(@__retain_semantics Init initWithObjects:count:)] pub unsafe fn initWithObjects_count( this: Option>, - objects: TodoArray, + objects: *mut NonNull, cnt: NSUInteger, ) -> Id; @@ -47,7 +47,7 @@ extern_methods!( /// NSExtendedOrderedSet unsafe impl NSOrderedSet { #[method(getObjects:range:)] - pub unsafe fn getObjects_range(&self, objects: TodoArray, range: NSRange); + pub unsafe fn getObjects_range(&self, objects: *mut NonNull, range: NSRange); #[method_id(@__retain_semantics Other objectsAtIndexes:)] pub unsafe fn objectsAtIndexes( @@ -203,7 +203,7 @@ extern_methods!( #[method_id(@__retain_semantics Other orderedSetWithObjects:count:)] pub unsafe fn orderedSetWithObjects_count( - objects: TodoArray, + objects: NonNull>, cnt: NSUInteger, ) -> Id; @@ -377,7 +377,7 @@ extern_methods!( pub unsafe fn addObject(&self, object: &ObjectType); #[method(addObjects:count:)] - pub unsafe fn addObjects_count(&self, objects: TodoArray, count: NSUInteger); + pub unsafe fn addObjects_count(&self, objects: *mut NonNull, count: NSUInteger); #[method(addObjectsFromArray:)] pub unsafe fn addObjectsFromArray(&self, array: &NSArray); @@ -409,7 +409,7 @@ extern_methods!( pub unsafe fn replaceObjectsInRange_withObjects_count( &self, range: NSRange, - objects: TodoArray, + objects: *mut NonNull, count: NSUInteger, ); diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index 00365e622..d7321836c 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -31,7 +31,7 @@ extern_methods!( #[method_id(@__retain_semantics Init initWithObjects:count:)] pub unsafe fn initWithObjects_count( this: Option>, - objects: TodoArray, + objects: *mut NonNull, cnt: NSUInteger, ) -> Id; @@ -134,8 +134,10 @@ extern_methods!( pub unsafe fn setWithObject(object: &ObjectType) -> Id; #[method_id(@__retain_semantics Other setWithObjects:count:)] - pub unsafe fn setWithObjects_count(objects: TodoArray, cnt: NSUInteger) - -> Id; + pub unsafe fn setWithObjects_count( + objects: NonNull>, + cnt: NSUInteger, + ) -> Id; #[method_id(@__retain_semantics Other setWithSet:)] pub unsafe fn setWithSet(set: &NSSet) -> Id; diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 723a13f75..3e5226781 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -236,7 +236,6 @@ mod common { pub(crate) type Protocol = Object; pub(crate) type TodoBlock = *const c_void; pub(crate) type TodoFunction = *const c_void; - pub(crate) type TodoArray = *const c_void; pub(crate) type TodoClass = Object; pub(crate) type TodoProtocols = Object; From 4e692fe178a6585ba45054341104f12f2247db89 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 3 Nov 2022 03:31:06 +0100 Subject: [PATCH 119/131] Refactor type parsing --- crates/header-translator/src/method.rs | 44 +- crates/header-translator/src/property.rs | 14 +- crates/header-translator/src/rust_type.rs | 528 +++++++++++++--------- crates/header-translator/src/stmt.rs | 74 +-- 4 files changed, 353 insertions(+), 307 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 854a39c92..69897992d 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -5,7 +5,7 @@ use clang::{Entity, EntityKind, EntityVisitResult, ObjCQualifiers}; use crate::availability::Availability; use crate::config::MethodData; use crate::objc2_utils::in_selector_family; -use crate::rust_type::{RustType, RustTypeReturn}; +use crate::rust_type::Ty; use crate::unexposed_macro::UnexposedMacro; #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] @@ -129,15 +129,15 @@ impl MemoryManagement { } } - fn is_init(sel: &str) -> bool { + pub fn is_init(sel: &str) -> bool { in_selector_family(sel.as_bytes(), b"init") } - fn is_alloc(sel: &str) -> bool { + pub fn is_alloc(sel: &str) -> bool { in_selector_family(sel.as_bytes(), b"alloc") } - fn is_new(sel: &str) -> bool { + pub fn is_new(sel: &str) -> bool { in_selector_family(sel.as_bytes(), b"new") } } @@ -152,8 +152,8 @@ pub struct Method { pub is_optional_protocol: bool, pub memory_management: MemoryManagement, pub designated_initializer: bool, - pub arguments: Vec<(String, Option, RustType)>, - pub result_type: RustTypeReturn, + pub arguments: Vec<(String, Option, Ty)>, + pub result_type: Ty, pub safe: bool, } @@ -248,7 +248,7 @@ impl<'tu> PartialMethod<'tu> { }); let ty = entity.get_type().expect("argument type"); - let ty = RustType::parse_argument(ty, is_consumed); + let ty = Ty::parse_method_argument(ty, is_consumed); (name, qualifier, ty) }) @@ -263,34 +263,8 @@ impl<'tu> PartialMethod<'tu> { } let result_type = entity.get_result_type().expect("method return type"); - let result_type = match RustTypeReturn::parse(result_type) { - RustTypeReturn(RustType::Id { - mut type_, - is_const, - lifetime, - nullability, - }) => { - // Related result types - // https://clang.llvm.org/docs/AutomaticReferenceCounting.html#related-result-types - if type_.name == "Object" { - assert!(type_.generics.is_empty(), "Object return generics empty"); - if (is_class && MemoryManagement::is_new(&selector)) - || (is_class && MemoryManagement::is_alloc(&selector)) - || (!is_class && MemoryManagement::is_init(&selector)) - || (!is_class && selector == "self") - { - type_.name = "Self".into(); - } - } - RustTypeReturn(RustType::Id { - type_, - is_const, - lifetime, - nullability, - }) - } - ty => ty, - }; + let mut result_type = Ty::parse_method_return(result_type); + result_type.fix_related_result_type(is_class, &selector); let mut designated_initializer = false; let mut consumes_self = false; diff --git a/crates/header-translator/src/property.rs b/crates/header-translator/src/property.rs index 19f3947b5..2f7640ef8 100644 --- a/crates/header-translator/src/property.rs +++ b/crates/header-translator/src/property.rs @@ -5,7 +5,7 @@ use clang::{Entity, EntityKind, EntityVisitResult, Nullability, ObjCAttributes}; use crate::availability::Availability; use crate::config::MethodData; use crate::method::{MemoryManagement, Method, Qualifier}; -use crate::rust_type::{RustType, RustTypeReturn}; +use crate::rust_type::Ty; use crate::unexposed_macro::UnexposedMacro; #[allow(dead_code)] @@ -17,8 +17,8 @@ pub struct Property { availability: Availability, is_class: bool, is_optional_protocol: bool, - type_in: RustType, - type_out: RustType, + type_in: Ty, + type_out: Ty, safe: bool, } @@ -89,11 +89,11 @@ impl PartialProperty<'_> { Nullability::Unspecified }; - let type_in = RustType::parse_property( + let type_in = Ty::parse_property( entity.get_type().expect("property type"), Nullability::Unspecified, ); - let type_out = RustType::parse_property( + let type_out = Ty::parse_property_return( entity.get_type().expect("property type"), default_nullability, ); @@ -158,7 +158,7 @@ impl fmt::Display for Property { memory_management: MemoryManagement::Normal, designated_initializer: false, arguments: Vec::new(), - result_type: RustTypeReturn::new(self.type_out.clone()), + result_type: self.type_out.clone(), safe: self.safe, }; write!(f, "{method}")?; @@ -173,7 +173,7 @@ impl fmt::Display for Property { memory_management: MemoryManagement::Normal, designated_initializer: false, arguments: Vec::from([(self.name.clone(), None, self.type_in.clone())]), - result_type: RustTypeReturn::new(RustType::Void), + result_type: Ty::VOID_RESULT, safe: self.safe, }; write!(f, "{method}")?; diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 5ce750b1d..8ed70cebf 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -2,6 +2,8 @@ use std::fmt; use clang::{Nullability, Type, TypeKind}; +use crate::method::MemoryManagement; + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct GenericType { pub name: String, @@ -251,7 +253,7 @@ fn parse_attributed<'a>( } #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub enum RustType { +enum RustType { // Primitives Void, C99Bool, @@ -322,53 +324,6 @@ pub enum RustType { } impl RustType { - pub fn is_error_out(&self) -> bool { - if let Self::Pointer { - nullability, - is_const, - pointee, - } = self - { - assert_eq!( - *nullability, - Nullability::Nullable, - "invalid error nullability {self:?}" - ); - assert!(!is_const, "expected error not const {self:?}"); - if let Self::Id { - type_, - is_const, - lifetime, - nullability, - } = &**pointee - { - if type_.name != "NSError" { - return false; - } - assert!( - type_.generics.is_empty(), - "expected error generics to be empty {self:?}" - ); - assert_eq!( - *nullability, - Nullability::Nullable, - "invalid inner error nullability {self:?}" - ); - assert!(!is_const, "expected inner error not const {self:?}"); - assert_eq!( - *lifetime, - Lifetime::Unspecified, - "invalid error lifetime {self:?}" - ); - true - } else { - panic!("invalid error parameter {self:?}") - } - } else { - false - } - } - fn parse( ty: Type<'_>, is_consumed: bool, @@ -569,9 +524,7 @@ impl RustType { } } } -} -impl RustType { fn visit_lifetime(&self, mut f: impl FnMut(Lifetime)) { match self { Self::Id { lifetime, .. } => f(*lifetime), @@ -581,108 +534,6 @@ impl RustType { _ => {} } } - - pub fn parse_argument(ty: Type<'_>, is_consumed: bool) -> Self { - let this = Self::parse(ty, is_consumed, Nullability::Unspecified, false); - - match &this { - Self::Pointer { pointee, .. } => pointee.visit_lifetime(|lifetime| { - if lifetime != Lifetime::Autoreleasing && lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime {lifetime:?} in pointer argument {ty:?}"); - } - }), - Self::IncompleteArray { pointee, .. } => pointee.visit_lifetime(|lifetime| { - if lifetime != Lifetime::Unretained && lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime {lifetime:?} in incomplete array argument {ty:?}"); - } - }), - _ => this.visit_lifetime(|lifetime| { - if lifetime != Lifetime::Strong && lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime {lifetime:?} in argument {ty:?}"); - } - }), - } - - this - } - - pub fn parse_typedef(ty: Type<'_>) -> Self { - match ty.get_kind() { - // When we encounter a typedef declaration like this: - // typedef NSString* NSAbc; - // - // We parse it as one of: - // type NSAbc = NSString; - // struct NSAbc(NSString); - // - // Instead of: - // type NSAbc = *const NSString; - // - // Because that means we can later on use ordinary Id<...> handling. - TypeKind::ObjCObjectPointer => { - let ty = ty.get_pointee_type().expect("pointer type to have pointee"); - let type_ = GenericType::parse_objc_pointer(ty); - - match &*type_.name { - "NSString" => {} - "NSUnit" => {} // TODO: Handle this differently - "TodoProtocols" => {} // TODO - _ => panic!("typedef declaration was not NSString: {type_:?}"), - } - - if !type_.generics.is_empty() { - panic!("typedef declaration generics not empty"); - } - - Self::TypeDef { name: type_.name } - } - _ => { - let this = Self::parse(ty, false, Nullability::Unspecified, false); - - this.visit_lifetime(|lifetime| { - if lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime in typedef {this:?}"); - } - }); - - this - } - } - } - - pub fn parse_property(ty: Type<'_>, default_nullability: Nullability) -> Self { - let this = Self::parse(ty, false, default_nullability, false); - - this.visit_lifetime(|lifetime| { - if lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime in property {this:?}"); - } - }); - - this - } - - pub fn parse_struct_field(ty: Type<'_>) -> Self { - let this = Self::parse(ty, false, Nullability::Unspecified, false); - - this.visit_lifetime(|lifetime| { - if lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime in struct field {this:?}"); - } - }); - - this - } - - pub fn parse_enum(ty: Type<'_>) -> Self { - let this = Self::parse(ty, false, Nullability::Unspecified, false); - - this.visit_lifetime(|_lifetime| { - panic!("unexpected lifetime in enum {this:?}"); - }); - - this - } } impl fmt::Display for RustType { @@ -833,29 +684,254 @@ impl fmt::Display for RustType { } #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct RustTypeReturn(pub RustType); +pub struct Ty { + ty: RustType, + in_return: bool, + in_static: bool, +} -impl RustTypeReturn { - pub fn is_id(&self) -> bool { - matches!(self.0, RustType::Id { .. }) +impl Ty { + pub const VOID_RESULT: Self = Self { + ty: RustType::Void, + in_return: true, + in_static: false, + }; + + pub fn parse_method_argument(ty: Type<'_>, is_consumed: bool) -> Self { + let ty = RustType::parse(ty, is_consumed, Nullability::Unspecified, false); + + match &ty { + RustType::Pointer { pointee, .. } => pointee.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Autoreleasing && lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime {lifetime:?} in pointer argument {ty:?}"); + } + }), + RustType::IncompleteArray { pointee, .. } => pointee.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unretained && lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime {lifetime:?} in incomplete array argument {ty:?}"); + } + }), + _ => ty.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Strong && lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime {lifetime:?} in argument {ty:?}"); + } + }), + } + + Self { + ty, + in_return: false, + in_static: false, + } } - pub fn new(inner: RustType) -> Self { - inner.visit_lifetime(|lifetime| { + pub fn parse_method_return(ty: Type<'_>) -> Self { + let ty = RustType::parse(ty, false, Nullability::Unspecified, false); + + ty.visit_lifetime(|lifetime| { if lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime in return {inner:?}"); + panic!("unexpected lifetime in return {ty:?}"); } }); - Self(inner) + Self { + ty, + in_return: true, + in_static: false, + } } - pub fn parse(ty: Type<'_>) -> Self { - Self::new(RustType::parse(ty, false, Nullability::Unspecified, false)) + pub fn parse_function_argument(ty: Type<'_>) -> Self { + Self::parse_method_argument(ty, false) + } + + pub fn parse_function_return(ty: Type<'_>) -> Self { + Self::parse_method_return(ty) + } + + pub fn parse_typedef(ty: Type<'_>) -> Self { + let ty = match ty.get_kind() { + // When we encounter a typedef declaration like this: + // typedef NSString* NSAbc; + // + // We parse it as one of: + // type NSAbc = NSString; + // struct NSAbc(NSString); + // + // Instead of: + // type NSAbc = *const NSString; + // + // Because that means we can later on use ordinary Id<...> handling. + TypeKind::ObjCObjectPointer => { + let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + let ty = GenericType::parse_objc_pointer(ty); + + match &*ty.name { + "NSString" => {} + "NSUnit" => {} // TODO: Handle this differently + "TodoProtocols" => {} // TODO + _ => panic!("typedef declaration was not NSString: {ty:?}"), + } + + if !ty.generics.is_empty() { + panic!("typedef declaration generics not empty"); + } + + RustType::TypeDef { name: ty.name } + } + _ => { + let ty = RustType::parse(ty, false, Nullability::Unspecified, false); + + ty.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in typedef {ty:?}"); + } + }); + + ty + } + }; + + Self { + ty, + in_return: false, + in_static: false, + } + } + + pub fn parse_property(ty: Type<'_>, default_nullability: Nullability) -> Self { + let ty = RustType::parse(ty, false, default_nullability, false); + + ty.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in property {ty:?}"); + } + }); + + Self { + ty, + in_return: false, + in_static: false, + } + } + + pub fn parse_property_return(ty: Type<'_>, default_nullability: Nullability) -> Self { + let ty = RustType::parse(ty, false, default_nullability, false); + + ty.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in property {ty:?}"); + } + }); + + Self { + ty, + in_return: true, + in_static: false, + } + } + + pub fn parse_struct_field(ty: Type<'_>) -> Self { + let ty = RustType::parse(ty, false, Nullability::Unspecified, false); + + ty.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in struct field {ty:?}"); + } + }); + + Self { + ty, + in_return: false, + in_static: false, + } + } + + pub fn parse_enum(ty: Type<'_>) -> Self { + let ty = RustType::parse(ty, false, Nullability::Unspecified, false); + + ty.visit_lifetime(|_lifetime| { + panic!("unexpected lifetime in enum {ty:?}"); + }); + + Self { + ty, + in_return: false, + in_static: false, + } + } + + pub fn parse_static(ty: Type<'_>) -> Self { + let ty = RustType::parse(ty, false, Nullability::Unspecified, false); + + ty.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Strong && lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in var {ty:?}"); + } + }); + + Self { + ty, + in_return: false, + in_static: true, + } + } +} + +impl Ty { + pub fn is_error_out(&self) -> bool { + if let RustType::Pointer { + nullability, + is_const, + pointee, + } = &self.ty + { + assert_eq!( + *nullability, + Nullability::Nullable, + "invalid error nullability {self:?}" + ); + assert!(!is_const, "expected error not const {self:?}"); + if let RustType::Id { + type_, + is_const, + lifetime, + nullability, + } = &**pointee + { + if type_.name != "NSError" { + return false; + } + assert!( + type_.generics.is_empty(), + "expected error generics to be empty {self:?}" + ); + assert_eq!( + *nullability, + Nullability::Nullable, + "invalid inner error nullability {self:?}" + ); + assert!(!is_const, "expected inner error not const {self:?}"); + assert_eq!( + *lifetime, + Lifetime::Unspecified, + "invalid error lifetime {self:?}" + ); + true + } else { + panic!("invalid error parameter {self:?}") + } + } else { + false + } + } + + pub fn is_id(&self) -> bool { + matches!(self.ty, RustType::Id { .. }) } pub fn as_error(&self) -> String { - match &self.0 { + match &self.ty { RustType::Id { type_, lifetime: Lifetime::Unspecified, @@ -874,7 +950,7 @@ impl RustTypeReturn { } pub fn is_alloc(&self) -> bool { - match &self.0 { + match &self.ty { RustType::Id { type_, lifetime: Lifetime::Unspecified, @@ -884,75 +960,101 @@ impl RustTypeReturn { _ => false, } } + + pub fn typedef_type(mut self) -> Option { + match &mut self.ty { + // Handled by Stmt::EnumDecl + RustType::Enum { .. } => None, + // Handled above and in Stmt::StructDecl + // The rest is only `NSZone` + RustType::Struct { name } => { + assert_eq!(name, "_NSZone", "invalid struct in typedef"); + None + } + // Opaque structs + RustType::Pointer { pointee, .. } if matches!(&**pointee, RustType::Struct { .. }) => { + **pointee = RustType::Void; + Some(self) + } + RustType::IncompleteArray { .. } => { + unimplemented!("incomplete array in struct") + } + _ => Some(self), + } + } + + /// Related result types + /// https://clang.llvm.org/docs/AutomaticReferenceCounting.html#related-result-types + pub fn fix_related_result_type(&mut self, is_class: bool, selector: &str) { + if let RustType::Id { type_, .. } = &mut self.ty { + if type_.name == "Object" { + assert!(type_.generics.is_empty(), "Object return generics empty"); + if (is_class && MemoryManagement::is_new(&selector)) + || (is_class && MemoryManagement::is_alloc(&selector)) + || (!is_class && MemoryManagement::is_init(&selector)) + || (!is_class && selector == "self") + { + type_.name = "Self".into(); + } + } + } + } } -impl fmt::Display for RustTypeReturn { +impl fmt::Display for Ty { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match &self.0 { - RustType::Void => Ok(()), - RustType::Id { - type_, + if self.in_return { + if let RustType::Void = &self.ty { + // Don't output anything + return Ok(()); + } + + write!(f, " -> ")?; + + if let RustType::Id { + type_: ty, // Ignore is_const: _, // Ignore lifetime: _, nullability, - } => { + } = &self.ty + { if *nullability == Nullability::NonNull { - write!(f, " -> Id<{type_}, Shared>") + return write!(f, "Id<{ty}, Shared>"); } else { - write!(f, " -> Option>") + return write!(f, "Option>"); } } - RustType::Class { nullability } => { - // SAFETY: TODO + + if let RustType::Class { nullability } = &self.ty { if *nullability == Nullability::NonNull { - write!(f, "-> &'static Class") + return write!(f, "&'static Class"); } else { - write!(f, "-> Option<&'static Class>") + return write!(f, "Option<&'static Class>"); } } - type_ => write!(f, " -> {type_}"), } - } -} - -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct RustTypeStatic { - inner: RustType, -} - -impl RustTypeStatic { - pub fn parse(ty: Type<'_>) -> Self { - let inner = RustType::parse(ty, false, Nullability::Unspecified, false); - - inner.visit_lifetime(|lifetime| { - if lifetime != Lifetime::Strong && lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime in var {inner:?}"); - } - }); - - Self { inner } - } -} -impl fmt::Display for RustTypeStatic { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match &self.inner { - RustType::Id { - type_, - is_const: false, - lifetime: Lifetime::Strong | Lifetime::Unspecified, - nullability, - } => { - if *nullability == Nullability::NonNull { - write!(f, "&'static {type_}") - } else { - write!(f, "Option<&'static {type_}>") + if self.in_static { + match &self.ty { + RustType::Id { + type_: ty, + is_const: false, + lifetime: Lifetime::Strong | Lifetime::Unspecified, + nullability, + } => { + if *nullability == Nullability::NonNull { + return write!(f, "&'static {ty}"); + } else { + return write!(f, "Option<&'static {ty}>"); + } } + ty @ RustType::Id { .. } => panic!("invalid static {ty:?}"), + _ => {} } - ty @ RustType::Id { .. } => panic!("invalid static {ty:?}"), - ty => write!(f, "{ty}"), } + + write!(f, "{}", self.ty) } } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index ac99613de..250238c93 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -8,7 +8,7 @@ use crate::config::{ClassData, Config}; use crate::expr::Expr; use crate::method::Method; use crate::property::Property; -use crate::rust_type::{RustType, RustTypeReturn, RustTypeStatic}; +use crate::rust_type::Ty; use crate::unexposed_macro::UnexposedMacro; #[derive(Debug, Clone)] @@ -199,7 +199,7 @@ pub enum Stmt { StructDecl { name: String, boxable: bool, - fields: Vec<(String, RustType)>, + fields: Vec<(String, Ty)>, }, /// typedef NS_OPTIONS(type, name) { /// variants* @@ -218,7 +218,7 @@ pub enum Stmt { /// }; EnumDecl { name: Option, - ty: RustType, + ty: Ty, kind: Option, variants: Vec<(String, Expr)>, }, @@ -226,7 +226,7 @@ pub enum Stmt { /// extern const ty name; VarDecl { name: String, - ty: RustTypeStatic, + ty: Ty, value: Option, }, /// extern ret name(args*); @@ -236,13 +236,13 @@ pub enum Stmt { /// } FnDecl { name: String, - arguments: Vec<(String, RustType)>, - result_type: RustTypeReturn, + arguments: Vec<(String, Ty)>, + result_type: Ty, // Some -> inline function. body: Option<()>, }, /// typedef Type TypedefName; - AliasDecl { name: String, type_: RustType }, + AliasDecl { name: String, ty: Ty }, } fn parse_struct(entity: &Entity<'_>, name: String) -> Stmt { @@ -259,7 +259,7 @@ fn parse_struct(entity: &Entity<'_>, name: String) -> Stmt { EntityKind::FieldDecl => { let name = entity.get_name().expect("struct field name"); let ty = entity.get_type().expect("struct field type"); - let ty = RustType::parse_struct_field(ty); + let ty = Ty::parse_struct_field(ty); if entity.is_bit_field() { println!("[UNSOUND] struct bitfield {name}: {entity:?}"); @@ -444,36 +444,9 @@ impl Stmt { let ty = entity .get_typedef_underlying_type() .expect("typedef underlying type"); - let ty = RustType::parse_typedef(ty); - - match ty { - // Handled by Stmt::EnumDecl - RustType::Enum { .. } => None, - // Handled above and in Stmt::StructDecl - // The rest is only `NSZone` - RustType::Struct { name } => { - assert_eq!(name, "_NSZone", "invalid struct in typedef"); - None - } - // Opaque structs - RustType::Pointer { - nullability, - is_const, - mut pointee, - } if matches!(*pointee, RustType::Struct { .. }) => { - *pointee = RustType::Void; - let type_ = RustType::Pointer { - nullability, - is_const, - pointee, - }; - Some(Self::AliasDecl { name, type_ }) - } - RustType::IncompleteArray { .. } => { - unimplemented!("incomplete array in struct") - } - type_ => Some(Self::AliasDecl { name, type_ }), - } + Ty::parse_typedef(ty) + .typedef_type() + .map(|ty| Self::AliasDecl { name, ty }) } EntityKind::StructDecl => { if let Some(name) = entity.get_name() { @@ -511,7 +484,7 @@ impl Stmt { let ty = entity.get_enum_underlying_type().expect("enum type"); let is_signed = ty.is_signed_integer(); - let ty = RustType::parse_enum(ty); + let ty = Ty::parse_enum(ty); let mut kind = None; let mut variants = Vec::new(); @@ -579,7 +552,7 @@ impl Stmt { EntityKind::VarDecl => { let name = entity.get_name().expect("var decl name"); let ty = entity.get_type().expect("var type"); - let ty = RustTypeStatic::parse(ty); + let ty = Ty::parse_static(ty); let mut value = None; entity.visit_children(|entity, _parent| { @@ -623,7 +596,7 @@ impl Stmt { } let result_type = entity.get_result_type().expect("function result type"); - let result_type = RustTypeReturn::parse(result_type); + let result_type = Ty::parse_function_return(result_type); let mut arguments = Vec::new(); assert!( @@ -643,7 +616,7 @@ impl Stmt { // Could also be retrieved via. `get_arguments` let name = entity.get_name().unwrap_or_else(|| "_".into()); let ty = entity.get_type().expect("function argument type"); - let ty = RustType::parse_argument(ty, false); + let ty = Ty::parse_function_argument(ty); arguments.push((name, ty)) } _ => panic!("unknown function child in {name}: {entity:?}"), @@ -707,7 +680,7 @@ impl fmt::Display for Stmt { format!("<{}: Message>", generics.join(": Message,")) }; - let type_ = if generics.is_empty() { + let ty = if generics.is_empty() { name.clone() } else { format!("{name}<{}>", generics.join(",")) @@ -737,16 +710,13 @@ impl fmt::Display for Stmt { writeln!(f, "}}")?; } writeln!(f, "")?; - writeln!( - f, - " unsafe impl{generic_params} ClassType for {type_} {{" - )?; + writeln!(f, " unsafe impl{generic_params} ClassType for {ty} {{")?; writeln!(f, " type Super = {superclass_name};")?; writeln!(f, " }}")?; writeln!(f, ");")?; writeln!(f, "")?; writeln!(f, "extern_methods!(")?; - writeln!(f, " unsafe impl{generic_params} {type_} {{")?; + writeln!(f, " unsafe impl{generic_params} {ty} {{")?; for method in methods { writeln!(f, "{method}")?; } @@ -767,7 +737,7 @@ impl fmt::Display for Stmt { format!("<{}: Message>", generics.join(": Message,")) }; - let type_ = if generics.is_empty() { + let ty = if generics.is_empty() { class_name.clone() } else { format!("{class_name}<{}>", generics.join(",")) @@ -777,7 +747,7 @@ impl fmt::Display for Stmt { if let Some(name) = name { writeln!(f, " /// {name}")?; } - writeln!(f, " unsafe impl{generic_params} {type_} {{")?; + writeln!(f, " unsafe impl{generic_params} {ty} {{")?; for method in methods { writeln!(f, "{method}")?; } @@ -895,8 +865,8 @@ impl fmt::Display for Stmt { // writeln!(f, " todo!()")?; // writeln!(f, "}}")?; } - Self::AliasDecl { name, type_ } => { - writeln!(f, "pub type {name} = {type_};")?; + Self::AliasDecl { name, ty } => { + writeln!(f, "pub type {name} = {ty};")?; } }; Ok(()) From b2815b448f49bf26d43c55657e863b8edc9518aa Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 3 Nov 2022 04:12:53 +0100 Subject: [PATCH 120/131] Make NSError** handling happen in all the places that it does with Swift --- crates/header-translator/src/method.rs | 60 +++++---- crates/header-translator/src/rust_type.rs | 118 ++++++++++-------- .../src/generated/CoreData/NSAtomicStore.rs | 4 +- .../src/generated/CoreData/NSFetchRequest.rs | 3 +- .../CoreData/NSFetchedResultsController.rs | 2 +- .../generated/CoreData/NSIncrementalStore.rs | 2 +- .../src/generated/CoreData/NSManagedObject.rs | 6 +- .../CoreData/NSManagedObjectContext.rs | 2 +- .../generated/CoreData/NSPersistentStore.rs | 2 +- 9 files changed, 106 insertions(+), 93 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 69897992d..188f253b3 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -212,7 +212,7 @@ impl<'tu> PartialMethod<'tu> { .expect("method availability"), ); - let arguments: Vec<_> = entity + let mut arguments: Vec<_> = entity .get_arguments() .expect("method arguments") .into_iter() @@ -254,6 +254,21 @@ impl<'tu> PartialMethod<'tu> { }) .collect(); + let is_error = if let Some((_, _, ty)) = arguments.last() { + ty.argument_is_error_out() + } else { + false + }; + + // TODO: Strip these from function name? + // selector.ends_with("error:") + // || selector.ends_with("AndReturnError:") + // || selector.ends_with("WithError:") + + if is_error { + arguments.pop(); + } + if let Some(qualifiers) = entity.get_objc_qualifiers() { let qualifier = Qualifier::parse(qualifiers); panic!( @@ -264,8 +279,17 @@ impl<'tu> PartialMethod<'tu> { let result_type = entity.get_result_type().expect("method return type"); let mut result_type = Ty::parse_method_return(result_type); + result_type.fix_related_result_type(is_class, &selector); + if is_class && MemoryManagement::is_alloc(&selector) { + result_type.set_is_alloc(); + } + + if is_error { + result_type.set_is_error(); + } + let mut designated_initializer = false; let mut consumes_self = false; let mut memory_management = MemoryManagement::Normal; @@ -349,20 +373,6 @@ impl<'tu> PartialMethod<'tu> { impl fmt::Display for Method { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut arguments = self.arguments.clone(); - - let is_error = - if self.selector.ends_with("error:") || self.selector.ends_with("AndReturnError:") { - let (_, _, ty) = arguments.last().expect("arguments last"); - ty.is_error_out() - } else { - false - }; - - if is_error { - arguments.pop(); - } - if self.result_type.is_id() { writeln!( f, @@ -386,26 +396,12 @@ impl fmt::Display for Method { write!(f, "&self, ")?; } } - for (param, _qualifier, arg_ty) in arguments { - write!(f, "{}: {arg_ty},", handle_reserved(¶m))?; + for (param, _qualifier, arg_ty) in &self.arguments { + write!(f, "{}: {arg_ty},", handle_reserved(param))?; } write!(f, ")")?; - if is_error { - writeln!(f, "{};", self.result_type.as_error())?; - } else { - if MemoryManagement::is_alloc(&self.selector) { - assert!( - self.result_type.is_alloc(), - "{:?}, {:?}", - self.result_type, - self.fn_name - ); - writeln!(f, "-> Option>;")?; - } else { - writeln!(f, "{};", self.result_type)?; - } - }; + writeln!(f, "{};", self.result_type)?; Ok(()) } diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 8ed70cebf..8defa5d13 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -688,6 +688,7 @@ pub struct Ty { ty: RustType, in_return: bool, in_static: bool, + result_wrapped: bool, } impl Ty { @@ -695,6 +696,7 @@ impl Ty { ty: RustType::Void, in_return: true, in_static: false, + result_wrapped: false, }; pub fn parse_method_argument(ty: Type<'_>, is_consumed: bool) -> Self { @@ -722,6 +724,7 @@ impl Ty { ty, in_return: false, in_static: false, + result_wrapped: false, } } @@ -738,6 +741,7 @@ impl Ty { ty, in_return: true, in_static: false, + result_wrapped: false, } } @@ -796,6 +800,7 @@ impl Ty { ty, in_return: false, in_static: false, + result_wrapped: false, } } @@ -812,6 +817,7 @@ impl Ty { ty, in_return: false, in_static: false, + result_wrapped: false, } } @@ -828,6 +834,7 @@ impl Ty { ty, in_return: true, in_static: false, + result_wrapped: false, } } @@ -844,6 +851,7 @@ impl Ty { ty, in_return: false, in_static: false, + result_wrapped: false, } } @@ -858,6 +866,7 @@ impl Ty { ty, in_return: false, in_static: false, + result_wrapped: false, } } @@ -874,93 +883,61 @@ impl Ty { ty, in_return: false, in_static: true, + result_wrapped: false, } } } impl Ty { - pub fn is_error_out(&self) -> bool { + pub fn argument_is_error_out(&self) -> bool { if let RustType::Pointer { nullability, is_const, pointee, } = &self.ty { - assert_eq!( - *nullability, - Nullability::Nullable, - "invalid error nullability {self:?}" - ); - assert!(!is_const, "expected error not const {self:?}"); if let RustType::Id { - type_, - is_const, + type_: ty, + is_const: id_is_const, lifetime, - nullability, + nullability: id_nullability, } = &**pointee { - if type_.name != "NSError" { + if ty.name != "NSError" { return false; } + assert_eq!( + *nullability, + Nullability::Nullable, + "invalid error nullability {self:?}" + ); + assert!(!is_const, "expected error not const {self:?}"); + assert!( - type_.generics.is_empty(), + ty.generics.is_empty(), "expected error generics to be empty {self:?}" ); assert_eq!( - *nullability, + *id_nullability, Nullability::Nullable, "invalid inner error nullability {self:?}" ); - assert!(!is_const, "expected inner error not const {self:?}"); + assert!(!id_is_const, "expected inner error not const {self:?}"); assert_eq!( *lifetime, Lifetime::Unspecified, "invalid error lifetime {self:?}" ); - true - } else { - panic!("invalid error parameter {self:?}") + return true; } - } else { - false } + false } pub fn is_id(&self) -> bool { matches!(self.ty, RustType::Id { .. }) } - pub fn as_error(&self) -> String { - match &self.ty { - RustType::Id { - type_, - lifetime: Lifetime::Unspecified, - is_const: false, - nullability: Nullability::Nullable, - } => { - // NULL -> error - format!(" -> Result, Id>") - } - RustType::ObjcBool => { - // NO -> error - format!(" -> Result<(), Id>") - } - _ => panic!("unknown error result type {self:?}"), - } - } - - pub fn is_alloc(&self) -> bool { - match &self.ty { - RustType::Id { - type_, - lifetime: Lifetime::Unspecified, - is_const: false, - nullability: Nullability::NonNull, - } => type_.name == "Self" && type_.generics.is_empty(), - _ => false, - } - } - pub fn typedef_type(mut self) -> Option { match &mut self.ty { // Handled by Stmt::EnumDecl @@ -983,6 +960,28 @@ impl Ty { } } + pub fn set_is_alloc(&mut self) { + match &mut self.ty { + RustType::Id { + type_: ty, + lifetime: Lifetime::Unspecified, + is_const: false, + nullability: Nullability::NonNull, + } if ty.name == "Self" && ty.generics.is_empty() => { + ty.name = "Allocated".into(); + ty.generics = vec![GenericType { + name: "Self".into(), + generics: vec![], + }]; + } + _ => panic!("invalid alloc return type {self:?}"), + } + } + + pub fn set_is_error(&mut self) { + self.result_wrapped = true; + } + /// Related result types /// https://clang.llvm.org/docs/AutomaticReferenceCounting.html#related-result-types pub fn fix_related_result_type(&mut self, is_class: bool, selector: &str) { @@ -1004,6 +1003,25 @@ impl Ty { impl fmt::Display for Ty { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if self.in_return { + if self.result_wrapped { + return match &self.ty { + RustType::Id { + type_: ty, + lifetime: Lifetime::Unspecified, + is_const: false, + nullability: Nullability::Nullable, + } => { + // NULL -> error + write!(f, " -> Result, Id>") + } + RustType::ObjcBool => { + // NO -> error + write!(f, " -> Result<(), Id>") + } + _ => panic!("unknown error result type {self:?}"), + }; + } + if let RustType::Void = &self.ty { // Don't output anything return Ok(()); diff --git a/crates/icrate/src/generated/CoreData/NSAtomicStore.rs b/crates/icrate/src/generated/CoreData/NSAtomicStore.rs index 5944fafdd..6973abd7a 100644 --- a/crates/icrate/src/generated/CoreData/NSAtomicStore.rs +++ b/crates/icrate/src/generated/CoreData/NSAtomicStore.rs @@ -25,10 +25,10 @@ extern_methods!( ) -> Id; #[method(load:)] - pub unsafe fn load(&self, error: *mut *mut NSError) -> bool; + pub unsafe fn load(&self) -> Result<(), Id>; #[method(save:)] - pub unsafe fn save(&self, error: *mut *mut NSError) -> bool; + pub unsafe fn save(&self) -> Result<(), Id>; #[method_id(@__retain_semantics New newCacheNodeForManagedObject:)] pub unsafe fn newCacheNodeForManagedObject( diff --git a/crates/icrate/src/generated/CoreData/NSFetchRequest.rs b/crates/icrate/src/generated/CoreData/NSFetchRequest.rs index 7d4426c44..96db155c7 100644 --- a/crates/icrate/src/generated/CoreData/NSFetchRequest.rs +++ b/crates/icrate/src/generated/CoreData/NSFetchRequest.rs @@ -64,8 +64,7 @@ extern_methods!( #[method_id(@__retain_semantics Other execute:)] pub unsafe fn execute( &self, - error: *mut *mut NSError, - ) -> Option, Shared>>; + ) -> Result, Shared>, Id>; #[method_id(@__retain_semantics Other entity)] pub unsafe fn entity(&self) -> Option>; diff --git a/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs b/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs index 7f004649b..855e67070 100644 --- a/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs +++ b/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs @@ -27,7 +27,7 @@ extern_methods!( ) -> Id; #[method(performFetch:)] - pub unsafe fn performFetch(&self, error: *mut *mut NSError) -> bool; + pub unsafe fn performFetch(&self) -> Result<(), Id>; #[method_id(@__retain_semantics Other fetchRequest)] pub unsafe fn fetchRequest(&self) -> Id, Shared>; diff --git a/crates/icrate/src/generated/CoreData/NSIncrementalStore.rs b/crates/icrate/src/generated/CoreData/NSIncrementalStore.rs index d368dbd74..3adeecb15 100644 --- a/crates/icrate/src/generated/CoreData/NSIncrementalStore.rs +++ b/crates/icrate/src/generated/CoreData/NSIncrementalStore.rs @@ -16,7 +16,7 @@ extern_class!( extern_methods!( unsafe impl NSIncrementalStore { #[method(loadMetadata:)] - pub unsafe fn loadMetadata(&self, error: *mut *mut NSError) -> bool; + pub unsafe fn loadMetadata(&self) -> Result<(), Id>; #[method_id(@__retain_semantics Other executeRequest:withContext:error:)] pub unsafe fn executeRequest_withContext_error( diff --git a/crates/icrate/src/generated/CoreData/NSManagedObject.rs b/crates/icrate/src/generated/CoreData/NSManagedObject.rs index 2b87acbf3..4f92c390f 100644 --- a/crates/icrate/src/generated/CoreData/NSManagedObject.rs +++ b/crates/icrate/src/generated/CoreData/NSManagedObject.rs @@ -174,13 +174,13 @@ extern_methods!( ) -> Result<(), Id>; #[method(validateForDelete:)] - pub unsafe fn validateForDelete(&self, error: *mut *mut NSError) -> bool; + pub unsafe fn validateForDelete(&self) -> Result<(), Id>; #[method(validateForInsert:)] - pub unsafe fn validateForInsert(&self, error: *mut *mut NSError) -> bool; + pub unsafe fn validateForInsert(&self) -> Result<(), Id>; #[method(validateForUpdate:)] - pub unsafe fn validateForUpdate(&self, error: *mut *mut NSError) -> bool; + pub unsafe fn validateForUpdate(&self) -> Result<(), Id>; #[method(setObservationInfo:)] pub unsafe fn setObservationInfo(&self, inObservationInfo: *mut c_void); diff --git a/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs b/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs index f8b0fec04..7a3e60c48 100644 --- a/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs +++ b/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs @@ -210,7 +210,7 @@ extern_methods!( pub unsafe fn rollback(&self); #[method(save:)] - pub unsafe fn save(&self, error: *mut *mut NSError) -> bool; + pub unsafe fn save(&self) -> Result<(), Id>; #[method(refreshAllObjects)] pub unsafe fn refreshAllObjects(&self); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentStore.rs b/crates/icrate/src/generated/CoreData/NSPersistentStore.rs index ce1cd827e..f6202602f 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentStore.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentStore.rs @@ -42,7 +42,7 @@ extern_methods!( pub unsafe fn init(this: Option>) -> Id; #[method(loadMetadata:)] - pub unsafe fn loadMetadata(&self, error: *mut *mut NSError) -> bool; + pub unsafe fn loadMetadata(&self) -> Result<(), Id>; #[method_id(@__retain_semantics Other persistentStoreCoordinator)] pub unsafe fn persistentStoreCoordinator( From 7f619295fa9fcaf61407b87c8455b60a66454a9f Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 3 Nov 2022 04:25:34 +0100 Subject: [PATCH 121/131] Refactor Ty a bit more --- crates/header-translator/src/rust_type.rs | 263 ++++++++++------------ crates/header-translator/src/stmt.rs | 4 +- 2 files changed, 126 insertions(+), 141 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 8defa5d13..8a4b3abf5 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -683,20 +683,25 @@ impl fmt::Display for RustType { } } +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +enum TyKind { + InReturn, + InReturnWithError, + InStatic, + InTypedef, + Normal, +} + #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct Ty { ty: RustType, - in_return: bool, - in_static: bool, - result_wrapped: bool, + kind: TyKind, } impl Ty { pub const VOID_RESULT: Self = Self { ty: RustType::Void, - in_return: true, - in_static: false, - result_wrapped: false, + kind: TyKind::InReturn, }; pub fn parse_method_argument(ty: Type<'_>, is_consumed: bool) -> Self { @@ -722,9 +727,7 @@ impl Ty { Self { ty, - in_return: false, - in_static: false, - result_wrapped: false, + kind: TyKind::Normal, } } @@ -739,9 +742,7 @@ impl Ty { Self { ty, - in_return: true, - in_static: false, - result_wrapped: false, + kind: TyKind::InReturn, } } @@ -753,54 +754,39 @@ impl Ty { Self::parse_method_return(ty) } - pub fn parse_typedef(ty: Type<'_>) -> Self { - let ty = match ty.get_kind() { - // When we encounter a typedef declaration like this: - // typedef NSString* NSAbc; - // - // We parse it as one of: - // type NSAbc = NSString; - // struct NSAbc(NSString); - // - // Instead of: - // type NSAbc = *const NSString; - // - // Because that means we can later on use ordinary Id<...> handling. - TypeKind::ObjCObjectPointer => { - let ty = ty.get_pointee_type().expect("pointer type to have pointee"); - let ty = GenericType::parse_objc_pointer(ty); - - match &*ty.name { - "NSString" => {} - "NSUnit" => {} // TODO: Handle this differently - "TodoProtocols" => {} // TODO - _ => panic!("typedef declaration was not NSString: {ty:?}"), - } - - if !ty.generics.is_empty() { - panic!("typedef declaration generics not empty"); - } + pub fn parse_typedef(ty: Type<'_>) -> Option { + let mut ty = RustType::parse(ty, false, Nullability::Unspecified, false); - RustType::TypeDef { name: ty.name } + ty.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime in typedef {ty:?}"); } - _ => { - let ty = RustType::parse(ty, false, Nullability::Unspecified, false); - - ty.visit_lifetime(|lifetime| { - if lifetime != Lifetime::Unspecified { - panic!("unexpected lifetime in typedef {ty:?}"); - } - }); + }); - ty + match &mut ty { + // Handled by Stmt::EnumDecl + RustType::Enum { .. } => None, + // Handled above and in Stmt::StructDecl + // The rest is only `NSZone` + RustType::Struct { name } => { + assert_eq!(name, "_NSZone", "invalid struct in typedef"); + None } - }; - - Self { - ty, - in_return: false, - in_static: false, - result_wrapped: false, + // Opaque structs + RustType::Pointer { pointee, .. } if matches!(&**pointee, RustType::Struct { .. }) => { + **pointee = RustType::Void; + Some(Self { + ty, + kind: TyKind::InTypedef, + }) + } + RustType::IncompleteArray { .. } => { + unimplemented!("incomplete array in struct") + } + _ => Some(Self { + ty, + kind: TyKind::InTypedef, + }), } } @@ -815,9 +801,7 @@ impl Ty { Self { ty, - in_return: false, - in_static: false, - result_wrapped: false, + kind: TyKind::Normal, } } @@ -832,9 +816,7 @@ impl Ty { Self { ty, - in_return: true, - in_static: false, - result_wrapped: false, + kind: TyKind::InReturn, } } @@ -849,9 +831,7 @@ impl Ty { Self { ty, - in_return: false, - in_static: false, - result_wrapped: false, + kind: TyKind::Normal, } } @@ -864,9 +844,7 @@ impl Ty { Self { ty, - in_return: false, - in_static: false, - result_wrapped: false, + kind: TyKind::Normal, } } @@ -881,9 +859,7 @@ impl Ty { Self { ty, - in_return: false, - in_static: true, - result_wrapped: false, + kind: TyKind::InStatic, } } } @@ -938,28 +914,6 @@ impl Ty { matches!(self.ty, RustType::Id { .. }) } - pub fn typedef_type(mut self) -> Option { - match &mut self.ty { - // Handled by Stmt::EnumDecl - RustType::Enum { .. } => None, - // Handled above and in Stmt::StructDecl - // The rest is only `NSZone` - RustType::Struct { name } => { - assert_eq!(name, "_NSZone", "invalid struct in typedef"); - None - } - // Opaque structs - RustType::Pointer { pointee, .. } if matches!(&**pointee, RustType::Struct { .. }) => { - **pointee = RustType::Void; - Some(self) - } - RustType::IncompleteArray { .. } => { - unimplemented!("incomplete array in struct") - } - _ => Some(self), - } - } - pub fn set_is_alloc(&mut self) { match &mut self.ty { RustType::Id { @@ -979,7 +933,8 @@ impl Ty { } pub fn set_is_error(&mut self) { - self.result_wrapped = true; + assert_eq!(self.kind, TyKind::InReturn); + self.kind = TyKind::InReturnWithError; } /// Related result types @@ -1002,9 +957,42 @@ impl Ty { impl fmt::Display for Ty { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - if self.in_return { - if self.result_wrapped { - return match &self.ty { + match &self.kind { + TyKind::InReturn => { + if let RustType::Void = &self.ty { + // Don't output anything + return Ok(()); + } + + write!(f, " -> ")?; + + match &self.ty { + RustType::Id { + type_: ty, + // Ignore + is_const: _, + // Ignore + lifetime: _, + nullability, + } => { + if *nullability == Nullability::NonNull { + write!(f, "Id<{ty}, Shared>") + } else { + write!(f, "Option>") + } + } + RustType::Class { nullability } => { + if *nullability == Nullability::NonNull { + write!(f, "&'static Class") + } else { + write!(f, "Option<&'static Class>") + } + } + ty => write!(f, "{ty}"), + } + } + TyKind::InReturnWithError => { + match &self.ty { RustType::Id { type_: ty, lifetime: Lifetime::Unspecified, @@ -1019,43 +1007,9 @@ impl fmt::Display for Ty { write!(f, " -> Result<(), Id>") } _ => panic!("unknown error result type {self:?}"), - }; - } - - if let RustType::Void = &self.ty { - // Don't output anything - return Ok(()); - } - - write!(f, " -> ")?; - - if let RustType::Id { - type_: ty, - // Ignore - is_const: _, - // Ignore - lifetime: _, - nullability, - } = &self.ty - { - if *nullability == Nullability::NonNull { - return write!(f, "Id<{ty}, Shared>"); - } else { - return write!(f, "Option>"); - } - } - - if let RustType::Class { nullability } = &self.ty { - if *nullability == Nullability::NonNull { - return write!(f, "&'static Class"); - } else { - return write!(f, "Option<&'static Class>"); } } - } - - if self.in_static { - match &self.ty { + TyKind::InStatic => match &self.ty { RustType::Id { type_: ty, is_const: false, @@ -1063,16 +1017,49 @@ impl fmt::Display for Ty { nullability, } => { if *nullability == Nullability::NonNull { - return write!(f, "&'static {ty}"); + write!(f, "&'static {ty}") } else { - return write!(f, "Option<&'static {ty}>"); + write!(f, "Option<&'static {ty}>") } } ty @ RustType::Id { .. } => panic!("invalid static {ty:?}"), - _ => {} - } - } + ty => write!(f, "{ty}"), + }, + TyKind::InTypedef => match &self.ty { + // When we encounter a typedef declaration like this: + // typedef NSString* NSAbc; + // + // We parse it as one of: + // type NSAbc = NSString; + // struct NSAbc(NSString); + // + // Instead of: + // type NSAbc = *const NSString; + // + // Because that means we can use ordinary Id elsewhere. + RustType::Id { + type_: ty, + is_const: _, + lifetime: _, + nullability, + } => { + match &*ty.name { + "NSString" => {} + "NSUnit" => {} // TODO: Handle this differently + "TodoProtocols" => {} // TODO + _ => panic!("typedef declaration was not NSString: {ty:?}"), + } + + if !ty.generics.is_empty() { + panic!("typedef declaration generics not empty"); + } - write!(f, "{}", self.ty) + assert_ne!(*nullability, Nullability::NonNull); + write!(f, "{ty}") + } + ty => write!(f, "{ty}"), + }, + TyKind::Normal => write!(f, "{}", self.ty), + } } } diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 250238c93..1949cf0b5 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -444,9 +444,7 @@ impl Stmt { let ty = entity .get_typedef_underlying_type() .expect("typedef underlying type"); - Ty::parse_typedef(ty) - .typedef_type() - .map(|ty| Self::AliasDecl { name, ty }) + Ty::parse_typedef(ty).map(|ty| Self::AliasDecl { name, ty }) } EntityKind::StructDecl => { if let Some(name) = entity.get_name() { From 78fcdd15ee1858c11b36b9447c2dac32ba4708db Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 3 Nov 2022 04:44:40 +0100 Subject: [PATCH 122/131] Make Display for RustType always sound --- crates/header-translator/src/rust_type.rs | 192 +++++++++++----------- 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 8a4b3abf5..7eb2921d1 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -536,6 +536,9 @@ impl RustType { } } +/// This is sound to output in (almost, c_void is not a valid return type) any +/// context. `Ty` is then used to change these types into something nicer when +/// requires. impl fmt::Display for RustType { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use RustType::*; @@ -569,24 +572,25 @@ impl fmt::Display for RustType { // Objective-C Id { - type_, - // Ignore - is_const: _, + type_: ty, + is_const, // Ignore lifetime: _, nullability, } => { if *nullability == Nullability::NonNull { - write!(f, "&{type_}") + write!(f, "NonNull<{ty}>") + } else if *is_const { + write!(f, "*const {ty}") } else { - write!(f, "Option<&{type_}>") + write!(f, "*mut {ty}") } } Class { nullability } => { if *nullability == Nullability::NonNull { - write!(f, "&Class") + write!(f, "NonNull") } else { - write!(f, "Option<&Class>") + write!(f, "*const Class") } } Sel { nullability } => { @@ -596,7 +600,7 @@ impl fmt::Display for RustType { write!(f, "OptionSel") } } - ObjcBool => write!(f, "bool"), + ObjcBool => write!(f, "Bool"), // Others Pointer { @@ -608,72 +612,15 @@ impl fmt::Display for RustType { nullability, is_const, pointee, - } => match &**pointee { - // Self::Id { - // type_, - // is_const: false, - // lifetime: Lifetime::Autoreleasing, - // nullability: inner_nullability, - // } => { - // let tokens = format!("Id<{type_}, Shared>"); - // let tokens = if *inner_nullability == Nullability::NonNull { - // tokens - // } else { - // format!("Option<{tokens}>") - // }; - // - // let tokens = if *is_const { - // format!("&{tokens}") - // } else { - // format!("&mut {tokens}") - // }; - // if *nullability == Nullability::NonNull { - // write!(f, "{tokens}") - // } else { - // write!(f, "Option<{tokens}>") - // } - // } - Self::Id { - type_: tokens, - is_const: false, - lifetime: _, - nullability: inner_nullability, - } => { - let tokens = if *inner_nullability == Nullability::NonNull { - format!("NonNull<{tokens}>") - } else { - format!("*mut {tokens}") - }; - if *nullability == Nullability::NonNull { - write!(f, "NonNull<{tokens}>") - } else if *is_const { - write!(f, "*const {tokens}") - } else { - write!(f, "*mut {tokens}") - } - } - Self::Id { .. } => { - unreachable!("there should be no id with other values: {self:?}") - } - Self::ObjcBool => { - if *nullability == Nullability::NonNull { - write!(f, "NonNull") - } else if *is_const { - write!(f, "*const Bool") - } else { - write!(f, "*mut Bool") - } - } - pointee => { - if *nullability == Nullability::NonNull { - write!(f, "NonNull<{pointee}>") - } else if *is_const { - write!(f, "*const {pointee}") - } else { - write!(f, "*mut {pointee}") - } + } => { + if *nullability == Nullability::NonNull { + write!(f, "NonNull<{pointee}>") + } else if *is_const { + write!(f, "*const {pointee}") + } else { + write!(f, "*mut {pointee}") } - }, + } Array { element_type, num_elements, @@ -689,7 +636,8 @@ enum TyKind { InReturnWithError, InStatic, InTypedef, - Normal, + InArgument, + InStructEnum, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -727,7 +675,7 @@ impl Ty { Self { ty, - kind: TyKind::Normal, + kind: TyKind::InArgument, } } @@ -801,7 +749,7 @@ impl Ty { Self { ty, - kind: TyKind::Normal, + kind: TyKind::InArgument, } } @@ -831,7 +779,7 @@ impl Ty { Self { ty, - kind: TyKind::Normal, + kind: TyKind::InStructEnum, } } @@ -844,7 +792,7 @@ impl Ty { Self { ty, - kind: TyKind::Normal, + kind: TyKind::InStructEnum, } } @@ -988,27 +936,26 @@ impl fmt::Display for Ty { write!(f, "Option<&'static Class>") } } + RustType::ObjcBool => write!(f, "bool"), ty => write!(f, "{ty}"), } } - TyKind::InReturnWithError => { - match &self.ty { - RustType::Id { - type_: ty, - lifetime: Lifetime::Unspecified, - is_const: false, - nullability: Nullability::Nullable, - } => { - // NULL -> error - write!(f, " -> Result, Id>") - } - RustType::ObjcBool => { - // NO -> error - write!(f, " -> Result<(), Id>") - } - _ => panic!("unknown error result type {self:?}"), + TyKind::InReturnWithError => match &self.ty { + RustType::Id { + type_: ty, + lifetime: Lifetime::Unspecified, + is_const: false, + nullability: Nullability::Nullable, + } => { + // NULL -> error + write!(f, " -> Result, Id>") } - } + RustType::ObjcBool => { + // NO -> error + write!(f, " -> Result<(), Id>") + } + _ => panic!("unknown error result type {self:?}"), + }, TyKind::InStatic => match &self.ty { RustType::Id { type_: ty, @@ -1059,7 +1006,60 @@ impl fmt::Display for Ty { } ty => write!(f, "{ty}"), }, - TyKind::Normal => write!(f, "{}", self.ty), + TyKind::InArgument => match &self.ty { + RustType::Id { + type_: ty, + // Ignore + is_const: _, + // Ignore + lifetime: _, + nullability, + } => { + if *nullability == Nullability::NonNull { + write!(f, "&{ty}") + } else { + write!(f, "Option<&{ty}>") + } + } + RustType::Class { nullability } => { + if *nullability == Nullability::NonNull { + write!(f, "&Class") + } else { + write!(f, "Option<&Class>") + } + } + RustType::ObjcBool => write!(f, "bool"), + // TODO: Re-enable once we can support it + // ty @ RustType::Pointer { + // nullability, + // is_const: false, + // pointee, + // } => match &**pointee { + // RustType::Id { + // type_: ty, + // is_const: false, + // lifetime: Lifetime::Autoreleasing, + // nullability: inner_nullability, + // } => { + // let tokens = if *inner_nullability == Nullability::NonNull { + // format!("Id<{ty}, Shared>") + // } else { + // format!("Option>") + // }; + // if *nullability == Nullability::NonNull { + // write!(f, "&mut {tokens}") + // } else { + // write!(f, "Option<&mut {tokens}>") + // } + // } + // RustType::Id { .. } => { + // unreachable!("there should be no id with other values: {self:?}") + // } + // _ => write!(f, "{ty}"), + // }, + ty => write!(f, "{ty}"), + }, + TyKind::InStructEnum => write!(f, "{}", self.ty), } } } From d78b975e9e4d8794b096bcbbcf81ac94d37f7b77 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 3 Nov 2022 05:23:33 +0100 Subject: [PATCH 123/131] Add support for function pointers --- crates/header-translator/src/rust_type.rs | 116 +++++++++++++++++- .../icrate/src/generated/AppKit/NSMatrix.rs | 6 +- crates/icrate/src/generated/AppKit/NSView.rs | 6 +- .../src/generated/Foundation/NSArray.rs | 18 ++- .../src/generated/Foundation/NSHashTable.rs | 13 +- .../src/generated/Foundation/NSMapTable.rs | 20 +-- .../Foundation/NSPointerFunctions.rs | 98 +++++++++++++-- 7 files changed, 241 insertions(+), 36 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 7eb2921d1..ac9c5576d 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -1,6 +1,6 @@ use std::fmt; -use clang::{Nullability, Type, TypeKind}; +use clang::{CallingConvention, Nullability, Type, TypeKind}; use crate::method::MemoryManagement; @@ -317,6 +317,12 @@ enum RustType { Struct { name: String, }, + Fn { + is_block: bool, + is_variadic: bool, + arguments: Vec, + result_type: Box, + }, TypeDef { name: String, @@ -489,9 +495,31 @@ impl RustType { BlockPointer => Self::TypeDef { name: "TodoBlock".to_string(), }, - FunctionPrototype => Self::TypeDef { - name: "TodoFunction".to_string(), - }, + FunctionPrototype => { + let call_conv = ty.get_calling_convention().expect("fn calling convention"); + assert_eq!( + call_conv, + CallingConvention::Cdecl, + "fn calling convention is C" + ); + + let arguments = ty + .get_argument_types() + .expect("fn type to have argument types") + .into_iter() + .map(Ty::parse_fn_argument) + .collect(); + + let result_type = ty.get_result_type().expect("fn type to have result type"); + let result_type = Ty::parse_fn_result(result_type); + + Self::Fn { + is_block: false, + is_variadic: ty.is_variadic(), + arguments, + result_type: Box::new(result_type), + } + } IncompleteArray => { let is_const = ty.is_const_qualified(); let ty = ty @@ -607,8 +635,42 @@ impl fmt::Display for RustType { nullability, is_const, pointee, - } - | IncompleteArray { + } => match &**pointee { + Self::Fn { + // TODO + is_block: _, + is_variadic, + arguments, + result_type, + } => { + if *nullability != Nullability::NonNull { + write!(f, "Option<")?; + } + write!(f, "unsafe extern \"C\" fn(")?; + for arg in arguments { + write!(f, "{arg},")?; + } + if *is_variadic { + write!(f, "...")?; + } + write!(f, "){result_type}")?; + + if *nullability != Nullability::NonNull { + write!(f, ">")?; + } + Ok(()) + } + pointee => { + if *nullability == Nullability::NonNull { + write!(f, "NonNull<{pointee}>") + } else if *is_const { + write!(f, "*const {pointee}") + } else { + write!(f, "*mut {pointee}") + } + } + }, + IncompleteArray { nullability, is_const, pointee, @@ -626,6 +688,7 @@ impl fmt::Display for RustType { num_elements, } => write!(f, "[{element_type}; {num_elements}]"), Enum { name } | Struct { name } | TypeDef { name } => write!(f, "{name}"), + Self::Fn { .. } => write!(f, "TodoFunction"), } } } @@ -638,6 +701,8 @@ enum TyKind { InTypedef, InArgument, InStructEnum, + InFnArgument, + InFnReturn, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -810,6 +875,36 @@ impl Ty { kind: TyKind::InStatic, } } + + fn parse_fn_argument(ty: Type<'_>) -> Self { + let ty = RustType::parse(ty, false, Nullability::Unspecified, false); + + ty.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Strong { + panic!("unexpected lifetime {lifetime:?} in fn argument {ty:?}"); + } + }); + + Self { + ty, + kind: TyKind::InFnArgument, + } + } + + fn parse_fn_result(ty: Type<'_>) -> Self { + let ty = RustType::parse(ty, false, Nullability::Unspecified, false); + + ty.visit_lifetime(|lifetime| { + if lifetime != Lifetime::Unspecified { + panic!("unexpected lifetime {lifetime:?} in fn result {ty:?}"); + } + }); + + Self { + ty, + kind: TyKind::InFnReturn, + } + } } impl Ty { @@ -1060,6 +1155,15 @@ impl fmt::Display for Ty { ty => write!(f, "{ty}"), }, TyKind::InStructEnum => write!(f, "{}", self.ty), + TyKind::InFnArgument => write!(f, "{}", self.ty), + TyKind::InFnReturn => { + if let RustType::Void = &self.ty { + // Don't output anything + return Ok(()); + } + + write!(f, " -> {}", self.ty) + } } } } diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index 7a80e42be..ec437660d 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -95,7 +95,11 @@ extern_methods!( #[method(sortUsingFunction:context:)] pub unsafe fn sortUsingFunction_context( &self, - compare: NonNull, + compare: unsafe extern "C" fn( + NonNull, + NonNull, + *mut c_void, + ) -> NSInteger, context: *mut c_void, ); diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index c091f56ad..0147323e1 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -147,7 +147,11 @@ extern_methods!( #[method(sortSubviewsUsingFunction:context:)] pub unsafe fn sortSubviewsUsingFunction_context( &self, - compare: NonNull, + compare: unsafe extern "C" fn( + NonNull, + NonNull, + *mut c_void, + ) -> NSComparisonResult, context: *mut c_void, ); diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 839fb05b9..03d0ef701 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -139,14 +139,22 @@ extern_methods!( #[method_id(@__retain_semantics Other sortedArrayUsingFunction:context:)] pub unsafe fn sortedArrayUsingFunction_context( &self, - comparator: NonNull, + comparator: unsafe extern "C" fn( + NonNull, + NonNull, + *mut c_void, + ) -> NSInteger, context: *mut c_void, ) -> Id, Shared>; #[method_id(@__retain_semantics Other sortedArrayUsingFunction:context:hint:)] pub unsafe fn sortedArrayUsingFunction_context_hint( &self, - comparator: NonNull, + comparator: unsafe extern "C" fn( + NonNull, + NonNull, + *mut c_void, + ) -> NSInteger, context: *mut c_void, hint: Option<&NSData>, ) -> Id, Shared>; @@ -490,7 +498,11 @@ extern_methods!( #[method(sortUsingFunction:context:)] pub unsafe fn sortUsingFunction_context( &self, - compare: NonNull, + compare: unsafe extern "C" fn( + NonNull, + NonNull, + *mut c_void, + ) -> NSInteger, context: *mut c_void, ); diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 1222b7d7e..90a4ce07c 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -121,11 +121,14 @@ extern_struct!( extern_struct!( pub struct NSHashTableCallBacks { - pub hash: *mut TodoFunction, - pub isEqual: *mut TodoFunction, - pub retain: *mut TodoFunction, - pub release: *mut TodoFunction, - pub describe: *mut TodoFunction, + pub hash: Option, NonNull) -> NSUInteger>, + pub isEqual: Option< + unsafe extern "C" fn(NonNull, NonNull, NonNull) -> Bool, + >, + pub retain: Option, NonNull)>, + pub release: Option, NonNull)>, + pub describe: + Option, NonNull) -> *mut NSString>, } ); diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 47d4d8e7a..621828bd7 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -129,20 +129,24 @@ extern_struct!( extern_struct!( pub struct NSMapTableKeyCallBacks { - pub hash: *mut TodoFunction, - pub isEqual: *mut TodoFunction, - pub retain: *mut TodoFunction, - pub release: *mut TodoFunction, - pub describe: *mut TodoFunction, + pub hash: Option, NonNull) -> NSUInteger>, + pub isEqual: Option< + unsafe extern "C" fn(NonNull, NonNull, NonNull) -> Bool, + >, + pub retain: Option, NonNull)>, + pub release: Option, NonNull)>, + pub describe: + Option, NonNull) -> *mut NSString>, pub notAKeyMarker: *mut c_void, } ); extern_struct!( pub struct NSMapTableValueCallBacks { - pub retain: *mut TodoFunction, - pub release: *mut TodoFunction, - pub describe: *mut TodoFunction, + pub retain: Option, NonNull)>, + pub release: Option, NonNull)>, + pub describe: + Option, NonNull) -> *mut NSString>, } ); diff --git a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs index ea1171485..7d675f0c2 100644 --- a/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs +++ b/crates/icrate/src/generated/Foundation/NSPointerFunctions.rs @@ -45,40 +45,114 @@ extern_methods!( ) -> Id; #[method(hashFunction)] - pub unsafe fn hashFunction(&self) -> *mut TodoFunction; + pub unsafe fn hashFunction( + &self, + ) -> Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + ) -> NSUInteger, + >; #[method(setHashFunction:)] - pub unsafe fn setHashFunction(&self, hashFunction: *mut TodoFunction); + pub unsafe fn setHashFunction( + &self, + hashFunction: Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + ) -> NSUInteger, + >, + ); #[method(isEqualFunction)] - pub unsafe fn isEqualFunction(&self) -> *mut TodoFunction; + pub unsafe fn isEqualFunction( + &self, + ) -> Option< + unsafe extern "C" fn( + NonNull, + NonNull, + Option) -> NSUInteger>, + ) -> Bool, + >; #[method(setIsEqualFunction:)] - pub unsafe fn setIsEqualFunction(&self, isEqualFunction: *mut TodoFunction); + pub unsafe fn setIsEqualFunction( + &self, + isEqualFunction: Option< + unsafe extern "C" fn( + NonNull, + NonNull, + Option) -> NSUInteger>, + ) -> Bool, + >, + ); #[method(sizeFunction)] - pub unsafe fn sizeFunction(&self) -> *mut TodoFunction; + pub unsafe fn sizeFunction( + &self, + ) -> Option) -> NSUInteger>; #[method(setSizeFunction:)] - pub unsafe fn setSizeFunction(&self, sizeFunction: *mut TodoFunction); + pub unsafe fn setSizeFunction( + &self, + sizeFunction: Option) -> NSUInteger>, + ); #[method(descriptionFunction)] - pub unsafe fn descriptionFunction(&self) -> *mut TodoFunction; + pub unsafe fn descriptionFunction( + &self, + ) -> Option) -> *mut NSString>; #[method(setDescriptionFunction:)] - pub unsafe fn setDescriptionFunction(&self, descriptionFunction: *mut TodoFunction); + pub unsafe fn setDescriptionFunction( + &self, + descriptionFunction: Option) -> *mut NSString>, + ); #[method(relinquishFunction)] - pub unsafe fn relinquishFunction(&self) -> *mut TodoFunction; + pub unsafe fn relinquishFunction( + &self, + ) -> Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + ), + >; #[method(setRelinquishFunction:)] - pub unsafe fn setRelinquishFunction(&self, relinquishFunction: *mut TodoFunction); + pub unsafe fn setRelinquishFunction( + &self, + relinquishFunction: Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + ), + >, + ); #[method(acquireFunction)] - pub unsafe fn acquireFunction(&self) -> *mut TodoFunction; + pub unsafe fn acquireFunction( + &self, + ) -> Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + Bool, + ) -> NonNull, + >; #[method(setAcquireFunction:)] - pub unsafe fn setAcquireFunction(&self, acquireFunction: *mut TodoFunction); + pub unsafe fn setAcquireFunction( + &self, + acquireFunction: Option< + unsafe extern "C" fn( + NonNull, + Option) -> NSUInteger>, + Bool, + ) -> NonNull, + >, + ); #[method(usesStrongWriteBarrier)] pub unsafe fn usesStrongWriteBarrier(&self) -> bool; From 2d25da2f357be48989732b07f51bb9852ae1832c Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 3 Nov 2022 06:25:30 +0100 Subject: [PATCH 124/131] Add support for block pointers --- crates/header-translator/src/rust_type.rs | 164 +++++++++++------- crates/icrate/Cargo.toml | 8 +- .../AppKit/NSAccessibilityCustomAction.rs | 6 +- crates/icrate/src/generated/AppKit/NSAlert.rs | 2 +- .../generated/AppKit/NSAnimationContext.rs | 10 +- .../src/generated/AppKit/NSAppearance.rs | 2 +- .../src/generated/AppKit/NSApplication.rs | 2 +- .../AppKit/NSCandidateListTouchBarItem.rs | 8 +- .../src/generated/AppKit/NSCollectionView.rs | 6 +- .../NSCollectionViewCompositionalLayout.rs | 17 +- crates/icrate/src/generated/AppKit/NSColor.rs | 2 +- .../src/generated/AppKit/NSColorSampler.rs | 5 +- .../src/generated/AppKit/NSCustomImageRep.rs | 4 +- .../generated/AppKit/NSDiffableDataSource.rs | 20 ++- .../icrate/src/generated/AppKit/NSDocument.rs | 52 ++++-- .../generated/AppKit/NSDocumentController.rs | 11 +- .../src/generated/AppKit/NSDraggingItem.rs | 9 +- .../src/generated/AppKit/NSDraggingSession.rs | 2 +- crates/icrate/src/generated/AppKit/NSEvent.rs | 6 +- .../generated/AppKit/NSFilePromiseReceiver.rs | 2 +- .../generated/AppKit/NSFontAssetRequest.rs | 5 +- crates/icrate/src/generated/AppKit/NSImage.rs | 2 +- .../src/generated/AppKit/NSLayoutManager.rs | 13 +- .../icrate/src/generated/AppKit/NSPDFPanel.rs | 2 +- .../src/generated/AppKit/NSSavePanel.rs | 4 +- .../icrate/src/generated/AppKit/NSScrubber.rs | 2 +- .../src/generated/AppKit/NSSharingService.rs | 7 +- .../src/generated/AppKit/NSSliderAccessory.rs | 2 +- .../src/generated/AppKit/NSSpellChecker.rs | 18 +- .../generated/AppKit/NSStepperTouchBarItem.rs | 2 +- .../src/generated/AppKit/NSStoryboard.rs | 2 +- .../src/generated/AppKit/NSStoryboardSegue.rs | 2 +- .../src/generated/AppKit/NSTableView.rs | 5 +- .../AppKit/NSTableViewDiffableDataSource.rs | 22 ++- .../generated/AppKit/NSTableViewRowAction.rs | 2 +- .../generated/AppKit/NSTextContentManager.rs | 7 +- .../generated/AppKit/NSTextLayoutManager.rs | 21 ++- crates/icrate/src/generated/AppKit/NSView.rs | 2 +- .../src/generated/AppKit/NSViewController.rs | 2 +- .../icrate/src/generated/AppKit/NSWindow.rs | 6 +- .../generated/AppKit/NSWindowRestoration.rs | 4 +- .../src/generated/AppKit/NSWorkspace.rs | 20 +-- .../CoreData/NSBatchInsertRequest.rs | 30 ++-- .../NSCoreDataCoreSpotlightDelegate.rs | 6 +- .../src/generated/CoreData/NSFetchRequest.rs | 5 +- .../CoreData/NSManagedObjectContext.rs | 4 +- .../CoreData/NSPersistentContainer.rs | 10 +- .../CoreData/NSPersistentStoreCoordinator.rs | 6 +- .../src/generated/Foundation/NSArray.rs | 26 +-- .../Foundation/NSAttributedString.rs | 11 +- .../NSBackgroundActivityScheduler.rs | 7 +- .../src/generated/Foundation/NSBundle.rs | 4 +- .../src/generated/Foundation/NSCalendar.rs | 2 +- .../icrate/src/generated/Foundation/NSData.rs | 7 +- .../src/generated/Foundation/NSDictionary.rs | 11 +- .../src/generated/Foundation/NSError.rs | 6 +- .../src/generated/Foundation/NSExpression.rs | 22 ++- .../Foundation/NSExtensionContext.rs | 8 +- .../generated/Foundation/NSFileCoordinator.rs | 12 +- .../src/generated/Foundation/NSFileHandle.rs | 14 +- .../src/generated/Foundation/NSFileManager.rs | 14 +- .../src/generated/Foundation/NSFileVersion.rs | 2 +- .../Foundation/NSHTTPCookieStorage.rs | 2 +- .../src/generated/Foundation/NSIndexSet.rs | 33 ++-- .../generated/Foundation/NSItemProvider.rs | 27 ++- .../Foundation/NSLinguisticTagger.rs | 8 +- .../src/generated/Foundation/NSMetadata.rs | 7 +- .../generated/Foundation/NSNotification.rs | 2 +- .../src/generated/Foundation/NSObjCRuntime.rs | 2 +- .../src/generated/Foundation/NSOperation.rs | 12 +- .../NSOrderedCollectionDifference.rs | 5 +- .../src/generated/Foundation/NSOrderedSet.rs | 26 +-- .../src/generated/Foundation/NSPredicate.rs | 4 +- .../src/generated/Foundation/NSProcessInfo.rs | 4 +- .../src/generated/Foundation/NSProgress.rs | 19 +- .../Foundation/NSRegularExpression.rs | 2 +- .../src/generated/Foundation/NSRunLoop.rs | 8 +- .../icrate/src/generated/Foundation/NSSet.rs | 11 +- .../src/generated/Foundation/NSString.rs | 11 +- .../icrate/src/generated/Foundation/NSTask.rs | 9 +- .../src/generated/Foundation/NSThread.rs | 4 +- .../src/generated/Foundation/NSTimer.rs | 6 +- .../src/generated/Foundation/NSURLCache.rs | 2 +- .../generated/Foundation/NSURLConnection.rs | 2 +- .../Foundation/NSURLCredentialStorage.rs | 4 +- .../src/generated/Foundation/NSURLSession.rs | 56 ++++-- .../src/generated/Foundation/NSUndoManager.rs | 2 +- .../generated/Foundation/NSUserActivity.rs | 6 +- .../generated/Foundation/NSUserScriptTask.rs | 9 +- .../generated/Foundation/NSXPCConnection.rs | 14 +- crates/icrate/src/lib.rs | 7 +- 91 files changed, 655 insertions(+), 346 deletions(-) diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index ac9c5576d..d0694cd28 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -113,7 +113,7 @@ fn parse_attributed<'a>( ty: Type<'a>, nullability: &mut Nullability, lifetime: &mut Lifetime, - kindof: Option<&mut bool>, + kindof: &mut bool, inside_partial_array: bool, ) -> Type<'a> { let mut modified_ty = ty.clone(); @@ -172,13 +172,6 @@ fn parse_attributed<'a>( _ => {} } - if let Some(kindof) = kindof { - if let Some(rest) = name.strip_prefix("__kindof") { - name = rest.trim(); - *kindof = true; - } - } - if ty.is_const_qualified() { if let Some(rest) = name.strip_suffix("const") { name = rest.trim(); @@ -242,11 +235,18 @@ fn parse_attributed<'a>( } if name != modified_name { - let original_name = ty.get_display_name(); - println!("attributes: {original_name:?} -> {name:?} != {modified_name:?}"); - panic!( - "could not extract all attributes from attributed type. Inner: {ty:?}, {modified_ty:?}" - ); + if let Some(rest) = name.strip_prefix("__kindof") { + name = rest.trim(); + *kindof = true; + } + + if name != modified_name { + let original_name = ty.get_display_name(); + println!("attributes: {original_name:?} -> {name:?} != {modified_name:?}"); + panic!( + "could not extract all attributes from attributed type. Inner: {ty:?}, {modified_ty:?}" + ); + } } modified_ty @@ -318,11 +318,14 @@ enum RustType { name: String, }, Fn { - is_block: bool, is_variadic: bool, arguments: Vec, result_type: Box, }, + Block { + arguments: Vec, + result_type: Box, + }, TypeDef { name: String, @@ -340,12 +343,13 @@ impl RustType { // println!("{:?}, {:?}", ty, ty.get_class_type()); + let mut kindof = false; let mut lifetime = Lifetime::Unspecified; let ty = parse_attributed( ty, &mut nullability, &mut lifetime, - None, + &mut kindof, inside_partial_array, ); @@ -381,8 +385,6 @@ impl RustType { Pointer => { let is_const = ty.is_const_qualified(); let ty = ty.get_pointee_type().expect("pointer type to have pointee"); - // Note: Can't handle const id pointers - // assert!(!ty.is_const_qualified(), "expected pointee to not be const"); let pointee = Self::parse(ty, is_consumed, Nullability::Unspecified, false); Self::Pointer { nullability, @@ -390,16 +392,35 @@ impl RustType { pointee: Box::new(pointee), } } + BlockPointer => { + let is_const = ty.is_const_qualified(); + let ty = ty.get_pointee_type().expect("pointer type to have pointee"); + match Self::parse(ty, is_consumed, Nullability::Unspecified, false) { + Self::Fn { + is_variadic: false, + mut arguments, + mut result_type, + } => { + for arg in &mut arguments { + arg.set_block(); + } + result_type.set_block(); + Self::Pointer { + nullability, + is_const, + pointee: Box::new(Self::Block { + arguments, + result_type, + }), + } + } + pointee => panic!("unexpected pointee in block: {pointee:?}"), + } + } ObjCObjectPointer => { let ty = ty.get_pointee_type().expect("pointer type to have pointee"); let mut kindof = false; - let ty = parse_attributed( - ty, - &mut nullability, - &mut lifetime, - Some(&mut kindof), - false, - ); + let ty = parse_attributed(ty, &mut nullability, &mut lifetime, &mut kindof, false); let type_ = GenericType::parse_objc_pointer(ty); Self::Id { @@ -492,9 +513,6 @@ impl RustType { _ => panic!("unknown elaborated type {ty:?}"), } } - BlockPointer => Self::TypeDef { - name: "TodoBlock".to_string(), - }, FunctionPrototype => { let call_conv = ty.get_calling_convention().expect("fn calling convention"); assert_eq!( @@ -514,7 +532,6 @@ impl RustType { let result_type = Ty::parse_fn_result(result_type); Self::Fn { - is_block: false, is_variadic: ty.is_variadic(), arguments, result_type: Box::new(result_type), @@ -637,8 +654,6 @@ impl fmt::Display for RustType { pointee, } => match &**pointee { Self::Fn { - // TODO - is_block: _, is_variadic, arguments, result_type, @@ -689,6 +704,16 @@ impl fmt::Display for RustType { } => write!(f, "[{element_type}; {num_elements}]"), Enum { name } | Struct { name } | TypeDef { name } => write!(f, "{name}"), Self::Fn { .. } => write!(f, "TodoFunction"), + Block { + arguments, + result_type, + } => { + write!(f, "Block<(")?; + for arg in arguments { + write!(f, "{arg}, ")?; + } + write!(f, "), {result_type}>") + } } } } @@ -703,6 +728,8 @@ enum TyKind { InStructEnum, InFnArgument, InFnReturn, + InBlockArgument, + InBlockReturn, } #[derive(Debug, Clone, PartialEq, Eq, Hash)] @@ -905,6 +932,14 @@ impl Ty { kind: TyKind::InFnReturn, } } + + fn set_block(&mut self) { + self.kind = match self.kind { + TyKind::InFnArgument => TyKind::InBlockArgument, + TyKind::InFnReturn => TyKind::InBlockReturn, + _ => unreachable!("set block kind"), + } + } } impl Ty { @@ -1124,38 +1159,45 @@ impl fmt::Display for Ty { } } RustType::ObjcBool => write!(f, "bool"), - // TODO: Re-enable once we can support it - // ty @ RustType::Pointer { - // nullability, - // is_const: false, - // pointee, - // } => match &**pointee { - // RustType::Id { - // type_: ty, - // is_const: false, - // lifetime: Lifetime::Autoreleasing, - // nullability: inner_nullability, - // } => { - // let tokens = if *inner_nullability == Nullability::NonNull { - // format!("Id<{ty}, Shared>") - // } else { - // format!("Option>") - // }; - // if *nullability == Nullability::NonNull { - // write!(f, "&mut {tokens}") - // } else { - // write!(f, "Option<&mut {tokens}>") - // } - // } - // RustType::Id { .. } => { - // unreachable!("there should be no id with other values: {self:?}") - // } - // _ => write!(f, "{ty}"), - // }, + ty @ RustType::Pointer { + nullability, + is_const: false, + pointee, + } => match &**pointee { + // TODO: Re-enable once we can support it + // RustType::Id { + // type_: ty, + // is_const: false, + // lifetime: Lifetime::Autoreleasing, + // nullability: inner_nullability, + // } => { + // let tokens = if *inner_nullability == Nullability::NonNull { + // format!("Id<{ty}, Shared>") + // } else { + // format!("Option>") + // }; + // if *nullability == Nullability::NonNull { + // write!(f, "&mut {tokens}") + // } else { + // write!(f, "Option<&mut {tokens}>") + // } + // } + // RustType::Id { .. } => { + // unreachable!("there should be no id with other values: {self:?}") + // } + block @ RustType::Block { .. } => { + if *nullability == Nullability::NonNull { + write!(f, "&{block}") + } else { + write!(f, "Option<&{block}>") + } + } + _ => write!(f, "{ty}"), + }, ty => write!(f, "{ty}"), }, TyKind::InStructEnum => write!(f, "{}", self.ty), - TyKind::InFnArgument => write!(f, "{}", self.ty), + TyKind::InFnArgument | TyKind::InBlockArgument => write!(f, "{}", self.ty), TyKind::InFnReturn => { if let RustType::Void = &self.ty { // Don't output anything @@ -1164,6 +1206,10 @@ impl fmt::Display for Ty { write!(f, " -> {}", self.ty) } + TyKind::InBlockReturn => match &self.ty { + RustType::Void => write!(f, "()"), + ty => write!(f, "{ty}"), + }, } } } diff --git a/crates/icrate/Cargo.toml b/crates/icrate/Cargo.toml index 0cb109986..f446f53d5 100644 --- a/crates/icrate/Cargo.toml +++ b/crates/icrate/Cargo.toml @@ -55,7 +55,7 @@ alloc = ["objc2?/alloc"] objective-c = ["objc2"] # Expose features that requires creating blocks. -block = ["objc2?/block", "block2"] +blocks = ["objc2?/block", "block2"] # For better documentation on docs.rs unstable-docsrs = [] @@ -76,7 +76,7 @@ unstable-docsrs = [] # AppClip = [] # AppIntents = [] # AppTrackingTransparency = [] -AppKit = ["objective-c", "Foundation", "CoreData"] +AppKit = ["Foundation", "CoreData"] # AppleScriptKit = [] # AppleScriptObjC = [] # ApplicationServices = [] @@ -116,7 +116,7 @@ AppKit = ["objective-c", "Foundation", "CoreData"] # CoreAudioKit = [] # CoreAudioTypes = [] # CoreBluetooth = [] -CoreData = ["objective-c", "Foundation"] +CoreData = ["Foundation"] # CoreFoundation = [] # CoreGraphics = [] # CoreHaptics = [] @@ -170,7 +170,7 @@ CoreData = ["objective-c", "Foundation"] # FileProviderUI = [] # FinderSync = [] # ForceFeedback = [] -Foundation = ["objective-c", "objc2/foundation"] +Foundation = ["objective-c", "blocks", "objc2/foundation"] # FWAUserLib = [] # GameController = [] # GameKit = [] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs index b84a76d3f..6393a1572 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomAction.rs @@ -20,7 +20,7 @@ extern_methods!( pub unsafe fn initWithName_handler( this: Option>, name: &NSString, - handler: TodoBlock, + handler: Option<&Block<(), Bool>>, ) -> Id; #[method_id(@__retain_semantics Init initWithName:target:selector:)] @@ -38,10 +38,10 @@ extern_methods!( pub unsafe fn setName(&self, name: &NSString); #[method(handler)] - pub unsafe fn handler(&self) -> TodoBlock; + pub unsafe fn handler(&self) -> *mut Block<(), Bool>; #[method(setHandler:)] - pub unsafe fn setHandler(&self, handler: TodoBlock); + pub unsafe fn setHandler(&self, handler: Option<&Block<(), Bool>>); #[method_id(@__retain_semantics Other target)] pub unsafe fn target(&self) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index 04ab2d3f3..95b3a9896 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -107,7 +107,7 @@ extern_methods!( pub unsafe fn beginSheetModalForWindow_completionHandler( &self, sheetWindow: &NSWindow, - handler: TodoBlock, + handler: Option<&Block<(NSModalResponse,), ()>>, ); #[method_id(@__retain_semantics Other window)] diff --git a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs index ad6ad9f33..4e2aa8590 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs @@ -18,12 +18,12 @@ extern_methods!( unsafe impl NSAnimationContext { #[method(runAnimationGroup:completionHandler:)] pub unsafe fn runAnimationGroup_completionHandler( - changes: TodoBlock, - completionHandler: TodoBlock, + changes: &Block<(NonNull,), ()>, + completionHandler: Option<&Block<(), ()>>, ); #[method(runAnimationGroup:)] - pub unsafe fn runAnimationGroup(changes: TodoBlock); + pub unsafe fn runAnimationGroup(changes: &Block<(NonNull,), ()>); #[method(beginGrouping)] pub unsafe fn beginGrouping(); @@ -47,10 +47,10 @@ extern_methods!( pub unsafe fn setTimingFunction(&self, timingFunction: Option<&CAMediaTimingFunction>); #[method(completionHandler)] - pub unsafe fn completionHandler(&self) -> TodoBlock; + pub unsafe fn completionHandler(&self) -> *mut Block<(), ()>; #[method(setCompletionHandler:)] - pub unsafe fn setCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn setCompletionHandler(&self, completionHandler: Option<&Block<(), ()>>); #[method(allowsImplicitAnimation)] pub unsafe fn allowsImplicitAnimation(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index 75acd1fa5..5a095d3ae 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -31,7 +31,7 @@ extern_methods!( pub unsafe fn currentDrawingAppearance() -> Id; #[method(performAsCurrentDrawingAppearance:)] - pub unsafe fn performAsCurrentDrawingAppearance(&self, block: TodoBlock); + pub unsafe fn performAsCurrentDrawingAppearance(&self, block: &Block<(), ()>); #[method_id(@__retain_semantics Other appearanceNamed:)] pub unsafe fn appearanceNamed(name: &NSAppearanceName) -> Option>; diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 115076496..941167aee 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -314,7 +314,7 @@ extern_methods!( pub unsafe fn enumerateWindowsWithOptions_usingBlock( &self, options: NSWindowListOptions, - block: TodoBlock, + block: &Block<(NonNull, NonNull), ()>, ); #[method(preventWindowOrdering)] diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index b839fb763..aabfc719c 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -58,12 +58,16 @@ extern_methods!( ); #[method(attributedStringForCandidate)] - pub unsafe fn attributedStringForCandidate(&self) -> TodoBlock; + pub unsafe fn attributedStringForCandidate( + &self, + ) -> *mut Block<(NonNull, NSInteger), NonNull>; #[method(setAttributedStringForCandidate:)] pub unsafe fn setAttributedStringForCandidate( &self, - attributedStringForCandidate: TodoBlock, + attributedStringForCandidate: Option< + &Block<(NonNull, NSInteger), NonNull>, + >, ); #[method_id(@__retain_semantics Other candidates)] diff --git a/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs index f787ca4c2..6868999b1 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionView.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionView.rs @@ -365,8 +365,8 @@ extern_methods!( #[method(performBatchUpdates:completionHandler:)] pub unsafe fn performBatchUpdates_completionHandler( &self, - updates: TodoBlock, - completionHandler: TodoBlock, + updates: Option<&Block<(), ()>>, + completionHandler: Option<&Block<(Bool,), ()>>, ); #[method(toggleSectionCollapse:)] @@ -442,7 +442,7 @@ extern_methods!( pub unsafe fn enumerateIndexPathsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NonNull, NonNull), ()>, ); } ); diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index a377896a0..bbe27ca46 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -82,7 +82,8 @@ extern_methods!( } ); -pub type NSCollectionViewCompositionalLayoutSectionProvider = TodoBlock; +pub type NSCollectionViewCompositionalLayoutSectionProvider = + *mut Block<(NSInteger, NonNull), *mut NSCollectionLayoutSection>; extern_class!( #[derive(Debug)] @@ -152,7 +153,14 @@ ns_enum!( } ); -pub type NSCollectionLayoutSectionVisibleItemsInvalidationHandler = TodoBlock; +pub type NSCollectionLayoutSectionVisibleItemsInvalidationHandler = *mut Block< + ( + NonNull>, + NSPoint, + NonNull, + ), + (), +>; extern_class!( #[derive(Debug)] @@ -323,7 +331,10 @@ extern_methods!( } ); -pub type NSCollectionLayoutGroupCustomItemProvider = TodoBlock; +pub type NSCollectionLayoutGroupCustomItemProvider = *mut Block< + (NonNull,), + NonNull>, +>; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index 85ed3e932..d6538cbce 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -122,7 +122,7 @@ extern_methods!( #[method_id(@__retain_semantics Other colorWithName:dynamicProvider:)] pub unsafe fn colorWithName_dynamicProvider( colorName: Option<&NSColorName>, - dynamicProvider: TodoBlock, + dynamicProvider: &Block<(NonNull,), NonNull>, ) -> Id; #[method_id(@__retain_semantics Other colorWithDeviceWhite:alpha:)] diff --git a/crates/icrate/src/generated/AppKit/NSColorSampler.rs b/crates/icrate/src/generated/AppKit/NSColorSampler.rs index e87fdd2a1..b3b8fb337 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSampler.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSampler.rs @@ -17,6 +17,9 @@ extern_class!( extern_methods!( unsafe impl NSColorSampler { #[method(showSamplerWithSelectionHandler:)] - pub unsafe fn showSamplerWithSelectionHandler(&self, selectionHandler: TodoBlock); + pub unsafe fn showSamplerWithSelectionHandler( + &self, + selectionHandler: &Block<(*mut NSColor,), ()>, + ); } ); diff --git a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs index 634446c33..46a458ff3 100644 --- a/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCustomImageRep.rs @@ -21,11 +21,11 @@ extern_methods!( this: Option>, size: NSSize, drawingHandlerShouldBeCalledWithFlippedContext: bool, - drawingHandler: TodoBlock, + drawingHandler: &Block<(NSRect,), Bool>, ) -> Id; #[method(drawingHandler)] - pub unsafe fn drawingHandler(&self) -> TodoBlock; + pub unsafe fn drawingHandler(&self) -> *mut Block<(NSRect,), Bool>; #[method_id(@__retain_semantics Init initWithDrawSelector:delegate:)] pub unsafe fn initWithDrawSelector_delegate( diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index 29a1a848f..fd585bfc9 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -160,9 +160,23 @@ extern_methods!( } ); -pub type NSCollectionViewDiffableDataSourceItemProvider = TodoBlock; - -pub type NSCollectionViewDiffableDataSourceSupplementaryViewProvider = TodoBlock; +pub type NSCollectionViewDiffableDataSourceItemProvider = *mut Block< + ( + NonNull, + NonNull, + NonNull, + ), + *mut NSCollectionViewItem, +>; + +pub type NSCollectionViewDiffableDataSourceSupplementaryViewProvider = *mut Block< + ( + NonNull, + NonNull, + NonNull, + ), + *mut NSView, +>; __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSDocument.rs b/crates/icrate/src/generated/AppKit/NSDocument.rs index a85ca7301..8c75fd927 100644 --- a/crates/icrate/src/generated/AppKit/NSDocument.rs +++ b/crates/icrate/src/generated/AppKit/NSDocument.rs @@ -97,20 +97,23 @@ extern_methods!( pub unsafe fn performActivityWithSynchronousWaiting_usingBlock( &self, waitSynchronously: bool, - block: TodoBlock, + block: &Block<(NonNull>,), ()>, ); #[method(continueActivityUsingBlock:)] - pub unsafe fn continueActivityUsingBlock(&self, block: TodoBlock); + pub unsafe fn continueActivityUsingBlock(&self, block: &Block<(), ()>); #[method(continueAsynchronousWorkOnMainThreadUsingBlock:)] - pub unsafe fn continueAsynchronousWorkOnMainThreadUsingBlock(&self, block: TodoBlock); + pub unsafe fn continueAsynchronousWorkOnMainThreadUsingBlock(&self, block: &Block<(), ()>); #[method(performSynchronousFileAccessUsingBlock:)] - pub unsafe fn performSynchronousFileAccessUsingBlock(&self, block: TodoBlock); + pub unsafe fn performSynchronousFileAccessUsingBlock(&self, block: &Block<(), ()>); #[method(performAsynchronousFileAccessUsingBlock:)] - pub unsafe fn performAsynchronousFileAccessUsingBlock(&self, block: TodoBlock); + pub unsafe fn performAsynchronousFileAccessUsingBlock( + &self, + block: &Block<(NonNull>,), ()>, + ); #[method(revertDocumentToSaved:)] pub unsafe fn revertDocumentToSaved(&self, sender: Option<&Object>); @@ -258,7 +261,7 @@ extern_methods!( url: &NSURL, typeName: &NSString, saveOperation: NSSaveOperationType, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSError,), ()>, ); #[method(canAsynchronouslyWriteToURL:ofType:forSaveOperation:)] @@ -291,7 +294,7 @@ extern_methods!( pub unsafe fn autosaveWithImplicitCancellability_completionHandler( &self, autosavingIsImplicitlyCancellable: bool, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSError,), ()>, ); #[method(autosavesInPlace)] @@ -309,7 +312,7 @@ extern_methods!( #[method(stopBrowsingVersionsWithCompletionHandler:)] pub unsafe fn stopBrowsingVersionsWithCompletionHandler( &self, - completionHandler: TodoBlock, + completionHandler: Option<&Block<(), ()>>, ); #[method(autosavesDrafts)] @@ -361,10 +364,17 @@ extern_methods!( pub unsafe fn moveDocument(&self, sender: Option<&Object>); #[method(moveDocumentWithCompletionHandler:)] - pub unsafe fn moveDocumentWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn moveDocumentWithCompletionHandler( + &self, + completionHandler: Option<&Block<(Bool,), ()>>, + ); #[method(moveToURL:completionHandler:)] - pub unsafe fn moveToURL_completionHandler(&self, url: &NSURL, completionHandler: TodoBlock); + pub unsafe fn moveToURL_completionHandler( + &self, + url: &NSURL, + completionHandler: Option<&Block<(*mut NSError,), ()>>, + ); #[method(lockDocument:)] pub unsafe fn lockDocument(&self, sender: Option<&Object>); @@ -373,16 +383,28 @@ extern_methods!( pub unsafe fn unlockDocument(&self, sender: Option<&Object>); #[method(lockDocumentWithCompletionHandler:)] - pub unsafe fn lockDocumentWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn lockDocumentWithCompletionHandler( + &self, + completionHandler: Option<&Block<(Bool,), ()>>, + ); #[method(lockWithCompletionHandler:)] - pub unsafe fn lockWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn lockWithCompletionHandler( + &self, + completionHandler: Option<&Block<(*mut NSError,), ()>>, + ); #[method(unlockDocumentWithCompletionHandler:)] - pub unsafe fn unlockDocumentWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn unlockDocumentWithCompletionHandler( + &self, + completionHandler: Option<&Block<(Bool,), ()>>, + ); #[method(unlockWithCompletionHandler:)] - pub unsafe fn unlockWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn unlockWithCompletionHandler( + &self, + completionHandler: Option<&Block<(*mut NSError,), ()>>, + ); #[method(isLocked)] pub unsafe fn isLocked(&self) -> bool; @@ -452,7 +474,7 @@ extern_methods!( pub unsafe fn shareDocumentWithSharingService_completionHandler( &self, sharingService: &NSSharingService, - completionHandler: TodoBlock, + completionHandler: Option<&Block<(Bool,), ()>>, ); #[method(prepareSharingServicePicker:)] diff --git a/crates/icrate/src/generated/AppKit/NSDocumentController.rs b/crates/icrate/src/generated/AppKit/NSDocumentController.rs index 4dd8c6a97..adc505ec0 100644 --- a/crates/icrate/src/generated/AppKit/NSDocumentController.rs +++ b/crates/icrate/src/generated/AppKit/NSDocumentController.rs @@ -79,14 +79,17 @@ extern_methods!( ) -> NSInteger; #[method(beginOpenPanelWithCompletionHandler:)] - pub unsafe fn beginOpenPanelWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn beginOpenPanelWithCompletionHandler( + &self, + completionHandler: &Block<(*mut NSArray,), ()>, + ); #[method(beginOpenPanel:forTypes:completionHandler:)] pub unsafe fn beginOpenPanel_forTypes_completionHandler( &self, openPanel: &NSOpenPanel, inTypes: Option<&NSArray>, - completionHandler: TodoBlock, + completionHandler: &Block<(NSInteger,), ()>, ); #[method(openDocumentWithContentsOfURL:display:completionHandler:)] @@ -94,7 +97,7 @@ extern_methods!( &self, url: &NSURL, displayDocument: bool, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSDocument, Bool, *mut NSError), ()>, ); #[method_id(@__retain_semantics Other makeDocumentWithContentsOfURL:ofType:error:)] @@ -110,7 +113,7 @@ extern_methods!( urlOrNil: Option<&NSURL>, contentsURL: &NSURL, displayDocument: bool, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSDocument, Bool, *mut NSError), ()>, ); #[method_id(@__retain_semantics Other makeDocumentForURL:withContentsOfURL:ofType:error:)] diff --git a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs index ceb8bcc58..c69a67fe1 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingItem.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingItem.rs @@ -86,10 +86,15 @@ extern_methods!( pub unsafe fn setDraggingFrame(&self, draggingFrame: NSRect); #[method(imageComponentsProvider)] - pub unsafe fn imageComponentsProvider(&self) -> TodoBlock; + pub unsafe fn imageComponentsProvider( + &self, + ) -> *mut Block<(), NonNull>>; #[method(setImageComponentsProvider:)] - pub unsafe fn setImageComponentsProvider(&self, imageComponentsProvider: TodoBlock); + pub unsafe fn setImageComponentsProvider( + &self, + imageComponentsProvider: Option<&Block<(), NonNull>>>, + ); #[method(setDraggingFrame:contents:)] pub unsafe fn setDraggingFrame_contents(&self, frame: NSRect, contents: Option<&Object>); diff --git a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs index c278fdd69..a7a5cfa7f 100644 --- a/crates/icrate/src/generated/AppKit/NSDraggingSession.rs +++ b/crates/icrate/src/generated/AppKit/NSDraggingSession.rs @@ -53,7 +53,7 @@ extern_methods!( view: Option<&NSView>, classArray: &NSArray, searchOptions: &NSDictionary, - block: TodoBlock, + block: &Block<(NonNull, NSInteger, NonNull), ()>, ); } ); diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index e26233c35..72b6738d6 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -553,7 +553,7 @@ extern_methods!( options: NSEventSwipeTrackingOptions, minDampenThreshold: CGFloat, maxDampenThreshold: CGFloat, - trackingHandler: TodoBlock, + trackingHandler: &Block<(CGFloat, NSEventPhase, Bool, NonNull), ()>, ); #[method(startPeriodicEventsAfterDelay:withPeriod:)] @@ -636,13 +636,13 @@ extern_methods!( #[method_id(@__retain_semantics Other addGlobalMonitorForEventsMatchingMask:handler:)] pub unsafe fn addGlobalMonitorForEventsMatchingMask_handler( mask: NSEventMask, - block: TodoBlock, + block: &Block<(NonNull,), ()>, ) -> Option>; #[method_id(@__retain_semantics Other addLocalMonitorForEventsMatchingMask:handler:)] pub unsafe fn addLocalMonitorForEventsMatchingMask_handler( mask: NSEventMask, - block: TodoBlock, + block: &Block<(NonNull,), *mut NSEvent>, ) -> Option>; #[method(removeMonitor:)] diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs index 5e1a0c2a8..d16186265 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseReceiver.rs @@ -31,7 +31,7 @@ extern_methods!( destinationDir: &NSURL, options: &NSDictionary, operationQueue: &NSOperationQueue, - reader: TodoBlock, + reader: &Block<(NonNull, *mut NSError), ()>, ); } ); diff --git a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs index 322287d41..6972416d8 100644 --- a/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs +++ b/crates/icrate/src/generated/AppKit/NSFontAssetRequest.rs @@ -40,6 +40,9 @@ extern_methods!( pub unsafe fn progress(&self) -> Id; #[method(downloadFontAssetsWithCompletionHandler:)] - pub unsafe fn downloadFontAssetsWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn downloadFontAssetsWithCompletionHandler( + &self, + completionHandler: &Block<(*mut NSError,), Bool>, + ); } ); diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index 47957486d..20e42b7a9 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -118,7 +118,7 @@ extern_methods!( pub unsafe fn imageWithSize_flipped_drawingHandler( size: NSSize, drawingHandlerShouldBeCalledWithFlippedContext: bool, - drawingHandler: TodoBlock, + drawingHandler: &Block<(NSRect,), Bool>, ) -> Id; #[method(size)] diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index c6002de40..552f5bb41 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -500,7 +500,16 @@ extern_methods!( pub unsafe fn enumerateLineFragmentsForGlyphRange_usingBlock( &self, glyphRange: NSRange, - block: TodoBlock, + block: &Block< + ( + NSRect, + NSRect, + NonNull, + NSRange, + NonNull, + ), + (), + >, ); #[method(enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:)] @@ -509,7 +518,7 @@ extern_methods!( glyphRange: NSRange, selectedRange: NSRange, textContainer: &NSTextContainer, - block: TodoBlock, + block: &Block<(NSRect, NonNull), ()>, ); #[method(drawBackgroundForGlyphRange:atPoint:)] diff --git a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs index 7d6702c73..5d05763ca 100644 --- a/crates/icrate/src/generated/AppKit/NSPDFPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPDFPanel.rs @@ -51,7 +51,7 @@ extern_methods!( &self, pdfInfo: &NSPDFInfo, docWindow: Option<&NSWindow>, - completionHandler: TodoBlock, + completionHandler: &Block<(NSInteger,), ()>, ); } ); diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index 59a2fbdaf..0dbff9df4 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -151,11 +151,11 @@ extern_methods!( pub unsafe fn beginSheetModalForWindow_completionHandler( &self, window: &NSWindow, - handler: TodoBlock, + handler: &Block<(NSModalResponse,), ()>, ); #[method(beginWithCompletionHandler:)] - pub unsafe fn beginWithCompletionHandler(&self, handler: TodoBlock); + pub unsafe fn beginWithCompletionHandler(&self, handler: &Block<(NSModalResponse,), ()>); #[method(runModal)] pub unsafe fn runModal(&self) -> NSModalResponse; diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs index 58bddd4ad..2fe1aed12 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubber.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -186,7 +186,7 @@ extern_methods!( pub unsafe fn reloadData(&self); #[method(performSequentialBatchUpdates:)] - pub unsafe fn performSequentialBatchUpdates(&self, updateBlock: TodoBlock); + pub unsafe fn performSequentialBatchUpdates(&self, updateBlock: &Block<(), ()>); #[method(insertItemsAtIndexes:)] pub unsafe fn insertItemsAtIndexes(&self, indexes: &NSIndexSet); diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index 6e3bc02c5..cc941ba83 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -119,7 +119,7 @@ extern_methods!( title: &NSString, image: &NSImage, alternateImage: Option<&NSImage>, - block: TodoBlock, + block: &Block<(), ()>, ) -> Id; #[method_id(@__retain_semantics Init init)] @@ -163,7 +163,10 @@ extern_methods!( #[method(registerCloudKitShareWithPreparationHandler:)] pub unsafe fn registerCloudKitShareWithPreparationHandler( &self, - preparationHandler: TodoBlock, + preparationHandler: &Block< + (NonNull>,), + (), + >, ); #[method(registerCloudKitShare:container:)] diff --git a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs index e1ee7bc19..974914bf7 100644 --- a/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs +++ b/crates/icrate/src/generated/AppKit/NSSliderAccessory.rs @@ -65,7 +65,7 @@ extern_methods!( #[method_id(@__retain_semantics Other behaviorWithHandler:)] pub unsafe fn behaviorWithHandler( - handler: TodoBlock, + handler: &Block<(NonNull,), ()>, ) -> Id; #[method(handleAction:)] diff --git a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs index e04b0de58..48fbf9dc5 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellChecker.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellChecker.rs @@ -124,7 +124,17 @@ extern_methods!( checkingTypes: NSTextCheckingTypes, options: Option<&NSDictionary>, tag: NSInteger, - completionHandler: TodoBlock, + completionHandler: Option< + &Block< + ( + NSInteger, + NonNull>, + NonNull, + NSInteger, + ), + (), + >, + >, ) -> NSInteger; #[method(requestCandidatesForSelectedRange:inString:types:options:inSpellDocumentWithTag:completionHandler:)] @@ -135,7 +145,9 @@ extern_methods!( checkingTypes: NSTextCheckingTypes, options: Option<&NSDictionary>, tag: NSInteger, - completionHandler: TodoBlock, + completionHandler: Option< + &Block<(NSInteger, NonNull>), ()>, + >, ) -> NSInteger; #[method_id(@__retain_semantics Other menuForResult:string:options:atLocation:inView:)] @@ -271,7 +283,7 @@ extern_methods!( alternativeStrings: &NSArray, rectOfTypedString: NSRect, view: &NSView, - completionBlock: TodoBlock, + completionBlock: Option<&Block<(*mut NSString,), ()>>, ); #[method(dismissCorrectionIndicatorForView:)] diff --git a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs index e144053b8..43bbdadeb 100644 --- a/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSStepperTouchBarItem.rs @@ -25,7 +25,7 @@ extern_methods!( #[method_id(@__retain_semantics Other stepperTouchBarItemWithIdentifier:drawingHandler:)] pub unsafe fn stepperTouchBarItemWithIdentifier_drawingHandler( identifier: &NSTouchBarItemIdentifier, - drawingHandler: TodoBlock, + drawingHandler: &Block<(NSRect, c_double), ()>, ) -> Id; #[method(maxValue)] diff --git a/crates/icrate/src/generated/AppKit/NSStoryboard.rs b/crates/icrate/src/generated/AppKit/NSStoryboard.rs index e2347ea1d..8693d4a1d 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboard.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboard.rs @@ -9,7 +9,7 @@ pub type NSStoryboardName = NSString; pub type NSStoryboardSceneIdentifier = NSString; -pub type NSStoryboardControllerCreator = TodoBlock; +pub type NSStoryboardControllerCreator = *mut Block<(NonNull,), *mut Object>; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs index 20011b779..ec3086096 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs @@ -23,7 +23,7 @@ extern_methods!( identifier: &NSStoryboardSegueIdentifier, sourceController: &Object, destinationController: &Object, - performHandler: TodoBlock, + performHandler: &Block<(), ()>, ) -> Id; #[method_id(@__retain_semantics Init initWithIdentifier:source:destination:)] diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index 6e2454edd..4e8e505ea 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -544,7 +544,10 @@ extern_methods!( ) -> Option>; #[method(enumerateAvailableRowViewsUsingBlock:)] - pub unsafe fn enumerateAvailableRowViewsUsingBlock(&self, handler: TodoBlock); + pub unsafe fn enumerateAvailableRowViewsUsingBlock( + &self, + handler: &Block<(NonNull, NSInteger), ()>, + ); #[method(floatsGroupRows)] pub unsafe fn floatsGroupRows(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs index ce5c3a429..26302f455 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewDiffableDataSource.rs @@ -5,11 +5,21 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTableViewDiffableDataSourceCellProvider = TodoBlock; - -pub type NSTableViewDiffableDataSourceRowProvider = TodoBlock; - -pub type NSTableViewDiffableDataSourceSectionHeaderViewProvider = TodoBlock; +pub type NSTableViewDiffableDataSourceCellProvider = *mut Block< + ( + NonNull, + NonNull, + NSInteger, + NonNull, + ), + NonNull, +>; + +pub type NSTableViewDiffableDataSourceRowProvider = + *mut Block<(NonNull, NSInteger, NonNull), NonNull>; + +pub type NSTableViewDiffableDataSourceSectionHeaderViewProvider = + *mut Block<(NonNull, NSInteger, NonNull), NonNull>; __inner_extern_class!( #[derive(Debug)] @@ -62,7 +72,7 @@ extern_methods!( &self, snapshot: &NSDiffableDataSourceSnapshot, animatingDifferences: bool, - completion: TodoBlock, + completion: Option<&Block<(), ()>>, ); #[method_id(@__retain_semantics Other itemIdentifierForRow:)] diff --git a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs index 66c856d0b..7359d6b15 100644 --- a/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs +++ b/crates/icrate/src/generated/AppKit/NSTableViewRowAction.rs @@ -28,7 +28,7 @@ extern_methods!( pub unsafe fn rowActionWithStyle_title_handler( style: NSTableViewRowActionStyle, title: &NSString, - handler: TodoBlock, + handler: &Block<(NonNull, NSInteger), ()>, ) -> Id; #[method(style)] diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index 4dcc181bf..9e48df1cf 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -60,7 +60,10 @@ extern_methods!( ); #[method(synchronizeTextLayoutManagers:)] - pub unsafe fn synchronizeTextLayoutManagers(&self, completionHandler: TodoBlock); + pub unsafe fn synchronizeTextLayoutManagers( + &self, + completionHandler: Option<&Block<(*mut NSError,), ()>>, + ); #[method_id(@__retain_semantics Other textElementsForRange:)] pub unsafe fn textElementsForRange( @@ -72,7 +75,7 @@ extern_methods!( pub unsafe fn hasEditingTransaction(&self) -> bool; #[method(performEditingTransactionUsingBlock:)] - pub unsafe fn performEditingTransactionUsingBlock(&self, transaction: TodoBlock); + pub unsafe fn performEditingTransactionUsingBlock(&self, transaction: &Block<(), ()>); #[method(recordEditActionInRange:newTextRange:)] pub unsafe fn recordEditActionInRange_newTextRange( diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index 608e6454d..9cbbadc06 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -125,7 +125,7 @@ extern_methods!( &self, location: Option<&NSTextLocation>, options: NSTextLayoutFragmentEnumerationOptions, - block: TodoBlock, + block: &Block<(NonNull,), Bool>, ) -> Option>; #[method_id(@__retain_semantics Other textSelections)] @@ -148,7 +148,14 @@ extern_methods!( &self, location: &NSTextLocation, reverse: bool, - block: TodoBlock, + block: &Block< + ( + NonNull, + NonNull>, + NonNull, + ), + Bool, + >, ); #[method(setRenderingAttributes:forTextRange:)] @@ -177,12 +184,16 @@ extern_methods!( pub unsafe fn invalidateRenderingAttributesForTextRange(&self, textRange: &NSTextRange); #[method(renderingAttributesValidator)] - pub unsafe fn renderingAttributesValidator(&self) -> TodoBlock; + pub unsafe fn renderingAttributesValidator( + &self, + ) -> *mut Block<(NonNull, NonNull), ()>; #[method(setRenderingAttributesValidator:)] pub unsafe fn setRenderingAttributesValidator( &self, - renderingAttributesValidator: TodoBlock, + renderingAttributesValidator: Option< + &Block<(NonNull, NonNull), ()>, + >, ); #[method_id(@__retain_semantics Other linkRenderingAttributes)] @@ -202,7 +213,7 @@ extern_methods!( textRange: &NSTextRange, type_: NSTextLayoutManagerSegmentType, options: NSTextLayoutManagerSegmentOptions, - block: TodoBlock, + block: &Block<(*mut NSTextRange, CGRect, CGFloat, NonNull), Bool>, ); #[method(replaceContentsInRange:withTextElements:)] diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 0147323e1..ebb9a6980 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -966,7 +966,7 @@ extern_methods!( attrString: Option<&NSAttributedString>, targetRange: NSRange, options: Option<&NSDictionary>, - originProvider: TodoBlock, + originProvider: Option<&Block<(NSRange,), NSPoint>>, ); } ); diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index 160fa9791..aac84fbfe 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -171,7 +171,7 @@ extern_methods!( fromViewController: &NSViewController, toViewController: &NSViewController, options: NSViewControllerTransitionOptions, - completion: TodoBlock, + completion: Option<&Block<(), ()>>, ); } ); diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index eaabcc774..636a8d3eb 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -862,14 +862,14 @@ extern_methods!( pub unsafe fn beginSheet_completionHandler( &self, sheetWindow: &NSWindow, - handler: TodoBlock, + handler: Option<&Block<(NSModalResponse,), ()>>, ); #[method(beginCriticalSheet:completionHandler:)] pub unsafe fn beginCriticalSheet_completionHandler( &self, sheetWindow: &NSWindow, - handler: TodoBlock, + handler: Option<&Block<(NSModalResponse,), ()>>, ); #[method(endSheet:)] @@ -1109,7 +1109,7 @@ extern_methods!( mask: NSEventMask, timeout: NSTimeInterval, mode: &NSRunLoopMode, - trackingHandler: TodoBlock, + trackingHandler: &Block<(*mut NSEvent, NonNull), ()>, ); #[method_id(@__retain_semantics Other nextEventMatchingMask:)] diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs index 9380a685b..811693dc5 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -20,7 +20,7 @@ extern_methods!( &self, identifier: &NSUserInterfaceItemIdentifier, state: &NSCoder, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSWindow, *mut NSError), ()>, ) -> bool; } ); @@ -98,7 +98,7 @@ extern_methods!( &self, identifier: &NSUserInterfaceItemIdentifier, state: &NSCoder, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSWindow, *mut NSError), ()>, ); #[method(encodeRestorableStateWithCoder:)] diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index fd2da0579..a52bd43be 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -38,7 +38,7 @@ extern_methods!( &self, url: &NSURL, configuration: &NSWorkspaceOpenConfiguration, - completionHandler: TodoBlock, + completionHandler: Option<&Block<(*mut NSRunningApplication, *mut NSError), ()>>, ); #[method(openURLs:withApplicationAtURL:configuration:completionHandler:)] @@ -47,7 +47,7 @@ extern_methods!( urls: &NSArray, applicationURL: &NSURL, configuration: &NSWorkspaceOpenConfiguration, - completionHandler: TodoBlock, + completionHandler: Option<&Block<(*mut NSRunningApplication, *mut NSError), ()>>, ); #[method(openApplicationAtURL:configuration:completionHandler:)] @@ -55,7 +55,7 @@ extern_methods!( &self, applicationURL: &NSURL, configuration: &NSWorkspaceOpenConfiguration, - completionHandler: TodoBlock, + completionHandler: Option<&Block<(*mut NSRunningApplication, *mut NSError), ()>>, ); #[method(selectFile:inFileViewerRootedAtPath:)] @@ -104,14 +104,14 @@ extern_methods!( pub unsafe fn recycleURLs_completionHandler( &self, URLs: &NSArray, - handler: TodoBlock, + handler: Option<&Block<(NonNull>, *mut NSError), ()>>, ); #[method(duplicateURLs:completionHandler:)] pub unsafe fn duplicateURLs_completionHandler( &self, URLs: &NSArray, - handler: TodoBlock, + handler: Option<&Block<(NonNull>, *mut NSError), ()>>, ); #[method(getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:)] @@ -166,7 +166,7 @@ extern_methods!( &self, applicationURL: &NSURL, url: &NSURL, - completionHandler: TodoBlock, + completionHandler: Option<&Block<(*mut NSError,), ()>>, ); #[method(setDefaultApplicationAtURL:toOpenURLsWithScheme:completionHandler:)] @@ -174,7 +174,7 @@ extern_methods!( &self, applicationURL: &NSURL, urlScheme: &NSString, - completionHandler: TodoBlock, + completionHandler: Option<&Block<(*mut NSError,), ()>>, ); #[method(setDefaultApplicationAtURL:toOpenFileAtURL:completionHandler:)] @@ -182,7 +182,7 @@ extern_methods!( &self, applicationURL: &NSURL, url: &NSURL, - completionHandler: TodoBlock, + completionHandler: Option<&Block<(*mut NSError,), ()>>, ); #[method_id(@__retain_semantics Other URLForApplicationToOpenContentType:)] @@ -202,7 +202,7 @@ extern_methods!( &self, applicationURL: &NSURL, contentType: &UTType, - completionHandler: TodoBlock, + completionHandler: Option<&Block<(*mut NSError,), ()>>, ); #[method_id(@__retain_semantics Other frontmostApplication)] @@ -372,7 +372,7 @@ extern_methods!( pub unsafe fn requestAuthorizationOfType_completionHandler( &self, type_: NSWorkspaceAuthorizationType, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSWorkspaceAuthorization, *mut NSError), ()>, ); } ); diff --git a/crates/icrate/src/generated/CoreData/NSBatchInsertRequest.rs b/crates/icrate/src/generated/CoreData/NSBatchInsertRequest.rs index 34637eb94..ef755587d 100644 --- a/crates/icrate/src/generated/CoreData/NSBatchInsertRequest.rs +++ b/crates/icrate/src/generated/CoreData/NSBatchInsertRequest.rs @@ -33,16 +33,26 @@ extern_methods!( ); #[method(dictionaryHandler)] - pub unsafe fn dictionaryHandler(&self) -> TodoBlock; + pub unsafe fn dictionaryHandler( + &self, + ) -> *mut Block<(NonNull>,), Bool>; #[method(setDictionaryHandler:)] - pub unsafe fn setDictionaryHandler(&self, dictionaryHandler: TodoBlock); + pub unsafe fn setDictionaryHandler( + &self, + dictionaryHandler: Option< + &Block<(NonNull>,), Bool>, + >, + ); #[method(managedObjectHandler)] - pub unsafe fn managedObjectHandler(&self) -> TodoBlock; + pub unsafe fn managedObjectHandler(&self) -> *mut Block<(NonNull,), Bool>; #[method(setManagedObjectHandler:)] - pub unsafe fn setManagedObjectHandler(&self, managedObjectHandler: TodoBlock); + pub unsafe fn setManagedObjectHandler( + &self, + managedObjectHandler: Option<&Block<(NonNull,), Bool>>, + ); #[method(resultType)] pub unsafe fn resultType(&self) -> NSBatchInsertRequestResultType; @@ -59,13 +69,13 @@ extern_methods!( #[method_id(@__retain_semantics Other batchInsertRequestWithEntityName:dictionaryHandler:)] pub unsafe fn batchInsertRequestWithEntityName_dictionaryHandler( entityName: &NSString, - handler: TodoBlock, + handler: &Block<(NonNull>,), Bool>, ) -> Id; #[method_id(@__retain_semantics Other batchInsertRequestWithEntityName:managedObjectHandler:)] pub unsafe fn batchInsertRequestWithEntityName_managedObjectHandler( entityName: &NSString, - handler: TodoBlock, + handler: &Block<(NonNull,), Bool>, ) -> Id; #[method_id(@__retain_semantics Init init)] @@ -89,28 +99,28 @@ extern_methods!( pub unsafe fn initWithEntity_dictionaryHandler( this: Option>, entity: &NSEntityDescription, - handler: TodoBlock, + handler: &Block<(NonNull>,), Bool>, ) -> Id; #[method_id(@__retain_semantics Init initWithEntity:managedObjectHandler:)] pub unsafe fn initWithEntity_managedObjectHandler( this: Option>, entity: &NSEntityDescription, - handler: TodoBlock, + handler: &Block<(NonNull,), Bool>, ) -> Id; #[method_id(@__retain_semantics Init initWithEntityName:dictionaryHandler:)] pub unsafe fn initWithEntityName_dictionaryHandler( this: Option>, entityName: &NSString, - handler: TodoBlock, + handler: &Block<(NonNull>,), Bool>, ) -> Id; #[method_id(@__retain_semantics Init initWithEntityName:managedObjectHandler:)] pub unsafe fn initWithEntityName_managedObjectHandler( this: Option>, entityName: &NSString, - handler: TodoBlock, + handler: &Block<(NonNull,), Bool>, ) -> Id; } ); diff --git a/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs b/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs index d81c55d16..0bdcc20a6 100644 --- a/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs +++ b/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs @@ -54,7 +54,7 @@ extern_methods!( #[method(deleteSpotlightIndexWithCompletionHandler:)] pub unsafe fn deleteSpotlightIndexWithCompletionHandler( &self, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSError,), ()>, ); #[method_id(@__retain_semantics Other attributeSetForObject:)] @@ -67,7 +67,7 @@ extern_methods!( pub unsafe fn searchableIndex_reindexAllSearchableItemsWithAcknowledgementHandler( &self, searchableIndex: &CSSearchableIndex, - acknowledgementHandler: TodoBlock, + acknowledgementHandler: &Block<(), ()>, ); #[method(searchableIndex:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:)] @@ -75,7 +75,7 @@ extern_methods!( &self, searchableIndex: &CSSearchableIndex, identifiers: &NSArray, - acknowledgementHandler: TodoBlock, + acknowledgementHandler: &Block<(), ()>, ); } ); diff --git a/crates/icrate/src/generated/CoreData/NSFetchRequest.rs b/crates/icrate/src/generated/CoreData/NSFetchRequest.rs index 96db155c7..58c544da2 100644 --- a/crates/icrate/src/generated/CoreData/NSFetchRequest.rs +++ b/crates/icrate/src/generated/CoreData/NSFetchRequest.rs @@ -187,7 +187,8 @@ extern_methods!( } ); -pub type NSPersistentStoreAsynchronousFetchResultCompletionBlock = TodoBlock; +pub type NSPersistentStoreAsynchronousFetchResultCompletionBlock = + *mut Block<(NonNull,), ()>; __inner_extern_class!( #[derive(Debug)] @@ -220,7 +221,7 @@ extern_methods!( pub unsafe fn initWithFetchRequest_completionBlock( this: Option>, request: &NSFetchRequest, - blk: TodoBlock, + blk: Option<&Block<(NonNull>,), ()>>, ) -> Id; } ); diff --git a/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs b/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs index 7a3e60c48..dfce5f1d6 100644 --- a/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs +++ b/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs @@ -81,10 +81,10 @@ extern_methods!( ) -> Id; #[method(performBlock:)] - pub unsafe fn performBlock(&self, block: TodoBlock); + pub unsafe fn performBlock(&self, block: &Block<(), ()>); #[method(performBlockAndWait:)] - pub unsafe fn performBlockAndWait(&self, block: TodoBlock); + pub unsafe fn performBlockAndWait(&self, block: &Block<(), ()>); #[method_id(@__retain_semantics Other persistentStoreCoordinator)] pub unsafe fn persistentStoreCoordinator( diff --git a/crates/icrate/src/generated/CoreData/NSPersistentContainer.rs b/crates/icrate/src/generated/CoreData/NSPersistentContainer.rs index 547a8e577..f6196b4d9 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentContainer.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentContainer.rs @@ -65,12 +65,18 @@ extern_methods!( ) -> Id; #[method(loadPersistentStoresWithCompletionHandler:)] - pub unsafe fn loadPersistentStoresWithCompletionHandler(&self, block: TodoBlock); + pub unsafe fn loadPersistentStoresWithCompletionHandler( + &self, + block: &Block<(NonNull, *mut NSError), ()>, + ); #[method_id(@__retain_semantics New newBackgroundContext)] pub unsafe fn newBackgroundContext(&self) -> Id; #[method(performBackgroundTask:)] - pub unsafe fn performBackgroundTask(&self, block: TodoBlock); + pub unsafe fn performBackgroundTask( + &self, + block: &Block<(NonNull,), ()>, + ); } ); diff --git a/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs b/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs index 286239715..43cc5eb03 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentStoreCoordinator.rs @@ -152,7 +152,7 @@ extern_methods!( pub unsafe fn addPersistentStoreWithDescription_completionHandler( &self, storeDescription: &NSPersistentStoreDescription, - block: TodoBlock, + block: &Block<(NonNull, *mut NSError), ()>, ); #[method(removePersistentStore:error:)] @@ -254,10 +254,10 @@ extern_methods!( ) -> Result<(), Id>; #[method(performBlock:)] - pub unsafe fn performBlock(&self, block: TodoBlock); + pub unsafe fn performBlock(&self, block: &Block<(), ()>); #[method(performBlockAndWait:)] - pub unsafe fn performBlockAndWait(&self, block: TodoBlock); + pub unsafe fn performBlockAndWait(&self, block: &Block<(), ()>); #[method_id(@__retain_semantics Other currentPersistentHistoryTokenFromStores:)] pub unsafe fn currentPersistentHistoryTokenFromStores( diff --git a/crates/icrate/src/generated/Foundation/NSArray.rs b/crates/icrate/src/generated/Foundation/NSArray.rs index 03d0ef701..2ff4e4607 100644 --- a/crates/icrate/src/generated/Foundation/NSArray.rs +++ b/crates/icrate/src/generated/Foundation/NSArray.rs @@ -191,13 +191,16 @@ extern_methods!( pub unsafe fn objectAtIndexedSubscript(&self, idx: NSUInteger) -> Id; #[method(enumerateObjectsUsingBlock:)] - pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); + pub unsafe fn enumerateObjectsUsingBlock( + &self, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); #[method(enumerateObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, ); #[method(enumerateObjectsAtIndexes:options:usingBlock:)] @@ -205,17 +208,20 @@ extern_methods!( &self, s: &NSIndexSet, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, ); #[method(indexOfObjectPassingTest:)] - pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger; + pub unsafe fn indexOfObjectPassingTest( + &self, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> NSUInteger; #[method(indexOfObjectWithOptions:passingTest:)] pub unsafe fn indexOfObjectWithOptions_passingTest( &self, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, ) -> NSUInteger; #[method(indexOfObjectAtIndexes:options:passingTest:)] @@ -223,20 +229,20 @@ extern_methods!( &self, s: &NSIndexSet, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, ) -> NSUInteger; #[method_id(@__retain_semantics Other indexesOfObjectsPassingTest:)] pub unsafe fn indexesOfObjectsPassingTest( &self, - predicate: TodoBlock, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, ) -> Id; #[method_id(@__retain_semantics Other indexesOfObjectsWithOptions:passingTest:)] pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, ) -> Id; #[method_id(@__retain_semantics Other indexesOfObjectsAtIndexes:options:passingTest:)] @@ -244,7 +250,7 @@ extern_methods!( &self, s: &NSIndexSet, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, ) -> Id; #[method_id(@__retain_semantics Other sortedArrayUsingComparator:)] @@ -323,7 +329,7 @@ extern_methods!( &self, other: &NSArray, options: NSOrderedCollectionDifferenceCalculationOptions, - block: TodoBlock, + block: &Block<(NonNull, NonNull), Bool>, ) -> Id, Shared>; #[method_id(@__retain_semantics Other differenceFromArray:withOptions:)] diff --git a/crates/icrate/src/generated/Foundation/NSAttributedString.rs b/crates/icrate/src/generated/Foundation/NSAttributedString.rs index 076e56c24..4201bc342 100644 --- a/crates/icrate/src/generated/Foundation/NSAttributedString.rs +++ b/crates/icrate/src/generated/Foundation/NSAttributedString.rs @@ -100,7 +100,14 @@ extern_methods!( &self, enumerationRange: NSRange, opts: NSAttributedStringEnumerationOptions, - block: TodoBlock, + block: &Block< + ( + NonNull>, + NSRange, + NonNull, + ), + (), + >, ); #[method(enumerateAttribute:inRange:options:usingBlock:)] @@ -109,7 +116,7 @@ extern_methods!( attrName: &NSAttributedStringKey, enumerationRange: NSRange, opts: NSAttributedStringEnumerationOptions, - block: TodoBlock, + block: &Block<(*mut Object, NSRange, NonNull), ()>, ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs index 9aa90b8ce..5a4a447be 100644 --- a/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs +++ b/crates/icrate/src/generated/Foundation/NSBackgroundActivityScheduler.rs @@ -11,7 +11,7 @@ ns_enum!( } ); -pub type NSBackgroundActivityCompletionHandler = TodoBlock; +pub type NSBackgroundActivityCompletionHandler = *mut Block<(NSBackgroundActivityResult,), ()>; extern_class!( #[derive(Debug)] @@ -58,7 +58,10 @@ extern_methods!( pub unsafe fn setTolerance(&self, tolerance: NSTimeInterval); #[method(scheduleWithBlock:)] - pub unsafe fn scheduleWithBlock(&self, block: TodoBlock); + pub unsafe fn scheduleWithBlock( + &self, + block: &Block<(NSBackgroundActivityCompletionHandler,), ()>, + ); #[method(invalidate)] pub unsafe fn invalidate(&self); diff --git a/crates/icrate/src/generated/Foundation/NSBundle.rs b/crates/icrate/src/generated/Foundation/NSBundle.rs index 0b2c06962..45464fe36 100644 --- a/crates/icrate/src/generated/Foundation/NSBundle.rs +++ b/crates/icrate/src/generated/Foundation/NSBundle.rs @@ -321,13 +321,13 @@ extern_methods!( #[method(beginAccessingResourcesWithCompletionHandler:)] pub unsafe fn beginAccessingResourcesWithCompletionHandler( &self, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSError,), ()>, ); #[method(conditionallyBeginAccessingResourcesWithCompletionHandler:)] pub unsafe fn conditionallyBeginAccessingResourcesWithCompletionHandler( &self, - completionHandler: TodoBlock, + completionHandler: &Block<(Bool,), ()>, ); #[method(endAccessingResources)] diff --git a/crates/icrate/src/generated/Foundation/NSCalendar.rs b/crates/icrate/src/generated/Foundation/NSCalendar.rs index 67fe7b38e..dfeeaff96 100644 --- a/crates/icrate/src/generated/Foundation/NSCalendar.rs +++ b/crates/icrate/src/generated/Foundation/NSCalendar.rs @@ -415,7 +415,7 @@ extern_methods!( start: &NSDate, comps: &NSDateComponents, opts: NSCalendarOptions, - block: TodoBlock, + block: &Block<(*mut NSDate, Bool, NonNull), ()>, ); #[method_id(@__retain_semantics Other nextDateAfterDate:matchingComponents:options:)] diff --git a/crates/icrate/src/generated/Foundation/NSData.rs b/crates/icrate/src/generated/Foundation/NSData.rs index b3bd6c713..b398b2e40 100644 --- a/crates/icrate/src/generated/Foundation/NSData.rs +++ b/crates/icrate/src/generated/Foundation/NSData.rs @@ -124,7 +124,10 @@ extern_methods!( ) -> NSRange; #[method(enumerateByteRangesUsingBlock:)] - pub unsafe fn enumerateByteRangesUsingBlock(&self, block: TodoBlock); + pub unsafe fn enumerateByteRangesUsingBlock( + &self, + block: &Block<(NonNull, NSRange, NonNull), ()>, + ); } ); @@ -198,7 +201,7 @@ extern_methods!( this: Option>, bytes: NonNull, length: NSUInteger, - deallocator: TodoBlock, + deallocator: Option<&Block<(NonNull, NSUInteger), ()>>, ) -> Id; #[method_id(@__retain_semantics Init initWithContentsOfFile:options:error:)] diff --git a/crates/icrate/src/generated/Foundation/NSDictionary.rs b/crates/icrate/src/generated/Foundation/NSDictionary.rs index 509ab7409..7e1bce19c 100644 --- a/crates/icrate/src/generated/Foundation/NSDictionary.rs +++ b/crates/icrate/src/generated/Foundation/NSDictionary.rs @@ -117,13 +117,16 @@ extern_methods!( ) -> Option>; #[method(enumerateKeysAndObjectsUsingBlock:)] - pub unsafe fn enumerateKeysAndObjectsUsingBlock(&self, block: TodoBlock); + pub unsafe fn enumerateKeysAndObjectsUsingBlock( + &self, + block: &Block<(NonNull, NonNull, NonNull), ()>, + ); #[method(enumerateKeysAndObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateKeysAndObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NonNull, NonNull, NonNull), ()>, ); #[method_id(@__retain_semantics Other keysSortedByValueUsingComparator:)] @@ -142,14 +145,14 @@ extern_methods!( #[method_id(@__retain_semantics Other keysOfEntriesPassingTest:)] pub unsafe fn keysOfEntriesPassingTest( &self, - predicate: TodoBlock, + predicate: &Block<(NonNull, NonNull, NonNull), Bool>, ) -> Id, Shared>; #[method_id(@__retain_semantics Other keysOfEntriesWithOptions:passingTest:)] pub unsafe fn keysOfEntriesWithOptions_passingTest( &self, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NonNull, NonNull, NonNull), Bool>, ) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSError.rs b/crates/icrate/src/generated/Foundation/NSError.rs index b821f1d60..d352509c2 100644 --- a/crates/icrate/src/generated/Foundation/NSError.rs +++ b/crates/icrate/src/generated/Foundation/NSError.rs @@ -100,11 +100,13 @@ extern_methods!( #[method(setUserInfoValueProviderForDomain:provider:)] pub unsafe fn setUserInfoValueProviderForDomain_provider( errorDomain: &NSErrorDomain, - provider: TodoBlock, + provider: Option<&Block<(NonNull, NonNull), *mut Object>>, ); #[method(userInfoValueProviderForDomain:)] - pub unsafe fn userInfoValueProviderForDomain(errorDomain: &NSErrorDomain) -> TodoBlock; + pub unsafe fn userInfoValueProviderForDomain( + errorDomain: &NSErrorDomain, + ) -> *mut Block<(NonNull, NonNull), *mut Object>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSExpression.rs b/crates/icrate/src/generated/Foundation/NSExpression.rs index fdad3ece1..7e9b215ee 100644 --- a/crates/icrate/src/generated/Foundation/NSExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSExpression.rs @@ -99,7 +99,14 @@ extern_methods!( #[method_id(@__retain_semantics Other expressionForBlock:arguments:)] pub unsafe fn expressionForBlock_arguments( - block: TodoBlock, + block: &Block< + ( + *mut Object, + NonNull>, + *mut NSMutableDictionary, + ), + NonNull, + >, arguments: Option<&NSArray>, ) -> Id; @@ -162,7 +169,18 @@ extern_methods!( pub unsafe fn falseExpression(&self) -> Id; #[method(expressionBlock)] - pub unsafe fn expressionBlock(&self) -> TodoBlock; + pub unsafe fn expressionBlock( + &self, + ) -> NonNull< + Block< + ( + *mut Object, + NonNull>, + *mut NSMutableDictionary, + ), + NonNull, + >, + >; #[method_id(@__retain_semantics Other expressionValueWithObject:context:)] pub unsafe fn expressionValueWithObject_context( diff --git a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs index 37423038d..d7eb76c8e 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionContext.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionContext.rs @@ -21,14 +21,18 @@ extern_methods!( pub unsafe fn completeRequestReturningItems_completionHandler( &self, items: Option<&NSArray>, - completionHandler: TodoBlock, + completionHandler: Option<&Block<(Bool,), ()>>, ); #[method(cancelRequestWithError:)] pub unsafe fn cancelRequestWithError(&self, error: &NSError); #[method(openURL:completionHandler:)] - pub unsafe fn openURL_completionHandler(&self, URL: &NSURL, completionHandler: TodoBlock); + pub unsafe fn openURL_completionHandler( + &self, + URL: &NSURL, + completionHandler: Option<&Block<(Bool,), ()>>, + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs index f45310fb5..005a49170 100644 --- a/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs +++ b/crates/icrate/src/generated/Foundation/NSFileCoordinator.rs @@ -89,7 +89,7 @@ extern_methods!( &self, intents: &NSArray, queue: &NSOperationQueue, - accessor: TodoBlock, + accessor: &Block<(*mut NSError,), ()>, ); #[method(coordinateReadingItemAtURL:options:error:byAccessor:)] @@ -98,7 +98,7 @@ extern_methods!( url: &NSURL, options: NSFileCoordinatorReadingOptions, outError: *mut *mut NSError, - reader: TodoBlock, + reader: &Block<(NonNull,), ()>, ); #[method(coordinateWritingItemAtURL:options:error:byAccessor:)] @@ -107,7 +107,7 @@ extern_methods!( url: &NSURL, options: NSFileCoordinatorWritingOptions, outError: *mut *mut NSError, - writer: TodoBlock, + writer: &Block<(NonNull,), ()>, ); #[method(coordinateReadingItemAtURL:options:writingItemAtURL:options:error:byAccessor:)] @@ -118,7 +118,7 @@ extern_methods!( writingURL: &NSURL, writingOptions: NSFileCoordinatorWritingOptions, outError: *mut *mut NSError, - readerWriter: TodoBlock, + readerWriter: &Block<(NonNull, NonNull), ()>, ); #[method(coordinateWritingItemAtURL:options:writingItemAtURL:options:error:byAccessor:)] @@ -129,7 +129,7 @@ extern_methods!( url2: &NSURL, options2: NSFileCoordinatorWritingOptions, outError: *mut *mut NSError, - writer: TodoBlock, + writer: &Block<(NonNull, NonNull), ()>, ); #[method(prepareForReadingItemsAtURLs:options:writingItemsAtURLs:options:error:byAccessor:)] @@ -140,7 +140,7 @@ extern_methods!( writingURLs: &NSArray, writingOptions: NSFileCoordinatorWritingOptions, outError: *mut *mut NSError, - batchAccessor: TodoBlock, + batchAccessor: &Block<(NonNull>,), ()>, ); #[method(itemAtURL:willMoveToURL:)] diff --git a/crates/icrate/src/generated/Foundation/NSFileHandle.rs b/crates/icrate/src/generated/Foundation/NSFileHandle.rs index 97043e7f7..55661d793 100644 --- a/crates/icrate/src/generated/Foundation/NSFileHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSFileHandle.rs @@ -173,16 +173,22 @@ extern_methods!( pub unsafe fn waitForDataInBackgroundAndNotify(&self); #[method(readabilityHandler)] - pub unsafe fn readabilityHandler(&self) -> TodoBlock; + pub unsafe fn readabilityHandler(&self) -> *mut Block<(NonNull,), ()>; #[method(setReadabilityHandler:)] - pub unsafe fn setReadabilityHandler(&self, readabilityHandler: TodoBlock); + pub unsafe fn setReadabilityHandler( + &self, + readabilityHandler: Option<&Block<(NonNull,), ()>>, + ); #[method(writeabilityHandler)] - pub unsafe fn writeabilityHandler(&self) -> TodoBlock; + pub unsafe fn writeabilityHandler(&self) -> *mut Block<(NonNull,), ()>; #[method(setWriteabilityHandler:)] - pub unsafe fn setWriteabilityHandler(&self, writeabilityHandler: TodoBlock); + pub unsafe fn setWriteabilityHandler( + &self, + writeabilityHandler: Option<&Block<(NonNull,), ()>>, + ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 459dcb1ee..816b36371 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -85,7 +85,7 @@ extern_methods!( &self, url: &NSURL, mask: NSFileManagerUnmountOptions, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSError,), ()>, ); #[method_id(@__retain_semantics Other contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:)] @@ -393,7 +393,7 @@ extern_methods!( url: &NSURL, keys: Option<&NSArray>, mask: NSDirectoryEnumerationOptions, - handler: TodoBlock, + handler: Option<&Block<(NonNull, NonNull), Bool>>, ) -> Option, Shared>>; #[method_id(@__retain_semantics Other subpathsAtPath:)] @@ -476,7 +476,13 @@ extern_methods!( pub unsafe fn getFileProviderServicesForItemAtURL_completionHandler( &self, url: &NSURL, - completionHandler: TodoBlock, + completionHandler: &Block< + ( + *mut NSDictionary, + *mut NSError, + ), + (), + >, ); #[method_id(@__retain_semantics Other containerURLForSecurityApplicationGroupIdentifier:)] @@ -570,7 +576,7 @@ extern_methods!( #[method(getFileProviderConnectionWithCompletionHandler:)] pub unsafe fn getFileProviderConnectionWithCompletionHandler( &self, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSXPCConnection, *mut NSError), ()>, ); #[method_id(@__retain_semantics Other name)] diff --git a/crates/icrate/src/generated/Foundation/NSFileVersion.rs b/crates/icrate/src/generated/Foundation/NSFileVersion.rs index a124c989e..c0f4be513 100644 --- a/crates/icrate/src/generated/Foundation/NSFileVersion.rs +++ b/crates/icrate/src/generated/Foundation/NSFileVersion.rs @@ -44,7 +44,7 @@ extern_methods!( #[method(getNonlocalVersionsOfItemAtURL:completionHandler:)] pub unsafe fn getNonlocalVersionsOfItemAtURL_completionHandler( url: &NSURL, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSArray, *mut NSError), ()>, ); #[method_id(@__retain_semantics Other versionOfItemAtURL:forPersistentIdentifier:)] diff --git a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs index ffbbae168..4535a1971 100644 --- a/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSHTTPCookieStorage.rs @@ -85,7 +85,7 @@ extern_methods!( pub unsafe fn getCookiesForTask_completionHandler( &self, task: &NSURLSessionTask, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSArray,), ()>, ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSIndexSet.rs b/crates/icrate/src/generated/Foundation/NSIndexSet.rs index 460c2db23..f1ea134ff 100644 --- a/crates/icrate/src/generated/Foundation/NSIndexSet.rs +++ b/crates/icrate/src/generated/Foundation/NSIndexSet.rs @@ -89,13 +89,16 @@ extern_methods!( pub unsafe fn intersectsIndexesInRange(&self, range: NSRange) -> bool; #[method(enumerateIndexesUsingBlock:)] - pub unsafe fn enumerateIndexesUsingBlock(&self, block: TodoBlock); + pub unsafe fn enumerateIndexesUsingBlock( + &self, + block: &Block<(NSUInteger, NonNull), ()>, + ); #[method(enumerateIndexesWithOptions:usingBlock:)] pub unsafe fn enumerateIndexesWithOptions_usingBlock( &self, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NSUInteger, NonNull), ()>, ); #[method(enumerateIndexesInRange:options:usingBlock:)] @@ -103,17 +106,20 @@ extern_methods!( &self, range: NSRange, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NSUInteger, NonNull), ()>, ); #[method(indexPassingTest:)] - pub unsafe fn indexPassingTest(&self, predicate: TodoBlock) -> NSUInteger; + pub unsafe fn indexPassingTest( + &self, + predicate: &Block<(NSUInteger, NonNull), Bool>, + ) -> NSUInteger; #[method(indexWithOptions:passingTest:)] pub unsafe fn indexWithOptions_passingTest( &self, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NSUInteger, NonNull), Bool>, ) -> NSUInteger; #[method(indexInRange:options:passingTest:)] @@ -121,17 +127,20 @@ extern_methods!( &self, range: NSRange, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NSUInteger, NonNull), Bool>, ) -> NSUInteger; #[method_id(@__retain_semantics Other indexesPassingTest:)] - pub unsafe fn indexesPassingTest(&self, predicate: TodoBlock) -> Id; + pub unsafe fn indexesPassingTest( + &self, + predicate: &Block<(NSUInteger, NonNull), Bool>, + ) -> Id; #[method_id(@__retain_semantics Other indexesWithOptions:passingTest:)] pub unsafe fn indexesWithOptions_passingTest( &self, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NSUInteger, NonNull), Bool>, ) -> Id; #[method_id(@__retain_semantics Other indexesInRange:options:passingTest:)] @@ -139,17 +148,17 @@ extern_methods!( &self, range: NSRange, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NSUInteger, NonNull), Bool>, ) -> Id; #[method(enumerateRangesUsingBlock:)] - pub unsafe fn enumerateRangesUsingBlock(&self, block: TodoBlock); + pub unsafe fn enumerateRangesUsingBlock(&self, block: &Block<(NSRange, NonNull), ()>); #[method(enumerateRangesWithOptions:usingBlock:)] pub unsafe fn enumerateRangesWithOptions_usingBlock( &self, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NSRange, NonNull), ()>, ); #[method(enumerateRangesInRange:options:usingBlock:)] @@ -157,7 +166,7 @@ extern_methods!( &self, range: NSRange, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NSRange, NonNull), ()>, ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index c51ce597e..53d302cee 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -24,9 +24,16 @@ pub type NSItemProviderWriting = NSObject; pub type NSItemProviderReading = NSObject; -pub type NSItemProviderCompletionHandler = TodoBlock; +pub type NSItemProviderCompletionHandler = *mut Block<(*mut NSSecureCoding, *mut NSError), ()>; -pub type NSItemProviderLoadHandler = TodoBlock; +pub type NSItemProviderLoadHandler = *mut Block< + ( + NSItemProviderCompletionHandler, + *const Class, + *mut NSDictionary, + ), + (), +>; extern_class!( #[derive(Debug)] @@ -47,7 +54,10 @@ extern_methods!( &self, typeIdentifier: &NSString, visibility: NSItemProviderRepresentationVisibility, - loadHandler: TodoBlock, + loadHandler: &Block< + (NonNull>,), + *mut NSProgress, + >, ); #[method(registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:)] @@ -56,7 +66,10 @@ extern_methods!( typeIdentifier: &NSString, fileOptions: NSItemProviderFileOptions, visibility: NSItemProviderRepresentationVisibility, - loadHandler: TodoBlock, + loadHandler: &Block< + (NonNull>,), + *mut NSProgress, + >, ); #[method_id(@__retain_semantics Other registeredTypeIdentifiers)] @@ -82,21 +95,21 @@ extern_methods!( pub unsafe fn loadDataRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSData, *mut NSError), ()>, ) -> Id; #[method_id(@__retain_semantics Other loadFileRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadFileRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSURL, *mut NSError), ()>, ) -> Id; #[method_id(@__retain_semantics Other loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:)] pub unsafe fn loadInPlaceFileRepresentationForTypeIdentifier_completionHandler( &self, typeIdentifier: &NSString, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSURL, Bool, *mut NSError), ()>, ) -> Id; #[method_id(@__retain_semantics Other suggestedName)] diff --git a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs index 8fde2dfe7..05b83f1ff 100644 --- a/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs +++ b/crates/icrate/src/generated/Foundation/NSLinguisticTagger.rs @@ -180,7 +180,7 @@ extern_methods!( unit: NSLinguisticTaggerUnit, scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, - block: TodoBlock, + block: &Block<(*mut NSLinguisticTag, NSRange, NonNull), ()>, ); #[method_id(@__retain_semantics Other tagAtIndex:unit:scheme:tokenRange:)] @@ -208,7 +208,7 @@ extern_methods!( range: NSRange, tagScheme: &NSLinguisticTagScheme, opts: NSLinguisticTaggerOptions, - block: TodoBlock, + block: &Block<(*mut NSLinguisticTag, NSRange, NSRange, NonNull), ()>, ); #[method_id(@__retain_semantics Other tagAtIndex:scheme:tokenRange:sentenceRange:)] @@ -264,7 +264,7 @@ extern_methods!( scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, - block: TodoBlock, + block: &Block<(*mut NSLinguisticTag, NSRange, NonNull), ()>, ); #[method_id(@__retain_semantics Other possibleTagsAtIndex:scheme:tokenRange:sentenceRange:scores:)] @@ -299,7 +299,7 @@ extern_methods!( scheme: &NSLinguisticTagScheme, options: NSLinguisticTaggerOptions, orthography: Option<&NSOrthography>, - block: TodoBlock, + block: &Block<(*mut NSLinguisticTag, NSRange, NSRange, NonNull), ()>, ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index bd825c0b6..6fe1281c8 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -99,13 +99,16 @@ extern_methods!( pub unsafe fn resultAtIndex(&self, idx: NSUInteger) -> Id; #[method(enumerateResultsUsingBlock:)] - pub unsafe fn enumerateResultsUsingBlock(&self, block: TodoBlock); + pub unsafe fn enumerateResultsUsingBlock( + &self, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); #[method(enumerateResultsWithOptions:usingBlock:)] pub unsafe fn enumerateResultsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, ); #[method_id(@__retain_semantics Other results)] diff --git a/crates/icrate/src/generated/Foundation/NSNotification.rs b/crates/icrate/src/generated/Foundation/NSNotification.rs index 8b94588c0..727cf4e89 100644 --- a/crates/icrate/src/generated/Foundation/NSNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSNotification.rs @@ -120,7 +120,7 @@ extern_methods!( name: Option<&NSNotificationName>, obj: Option<&Object>, queue: Option<&NSOperationQueue>, - block: TodoBlock, + block: &Block<(NonNull,), ()>, ) -> Id; } ); diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 95e0bc0ef..1549bcae3 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -18,7 +18,7 @@ ns_closed_enum!( } ); -pub type NSComparator = TodoBlock; +pub type NSComparator = *mut Block<(NonNull, NonNull), NSComparisonResult>; ns_options!( #[underlying(NSUInteger)] diff --git a/crates/icrate/src/generated/Foundation/NSOperation.rs b/crates/icrate/src/generated/Foundation/NSOperation.rs index 2c285ce44..db1294609 100644 --- a/crates/icrate/src/generated/Foundation/NSOperation.rs +++ b/crates/icrate/src/generated/Foundation/NSOperation.rs @@ -68,10 +68,10 @@ extern_methods!( pub unsafe fn setQueuePriority(&self, queuePriority: NSOperationQueuePriority); #[method(completionBlock)] - pub unsafe fn completionBlock(&self) -> TodoBlock; + pub unsafe fn completionBlock(&self) -> *mut Block<(), ()>; #[method(setCompletionBlock:)] - pub unsafe fn setCompletionBlock(&self, completionBlock: TodoBlock); + pub unsafe fn setCompletionBlock(&self, completionBlock: Option<&Block<(), ()>>); #[method(waitUntilFinished)] pub unsafe fn waitUntilFinished(&self); @@ -108,10 +108,10 @@ extern_class!( extern_methods!( unsafe impl NSBlockOperation { #[method_id(@__retain_semantics Other blockOperationWithBlock:)] - pub unsafe fn blockOperationWithBlock(block: TodoBlock) -> Id; + pub unsafe fn blockOperationWithBlock(block: &Block<(), ()>) -> Id; #[method(addExecutionBlock:)] - pub unsafe fn addExecutionBlock(&self, block: TodoBlock); + pub unsafe fn addExecutionBlock(&self, block: &Block<(), ()>); } ); @@ -179,10 +179,10 @@ extern_methods!( ); #[method(addOperationWithBlock:)] - pub unsafe fn addOperationWithBlock(&self, block: TodoBlock); + pub unsafe fn addOperationWithBlock(&self, block: &Block<(), ()>); #[method(addBarrierBlock:)] - pub unsafe fn addBarrierBlock(&self, barrier: TodoBlock); + pub unsafe fn addBarrierBlock(&self, barrier: &Block<(), ()>); #[method(maxConcurrentOperationCount)] pub unsafe fn maxConcurrentOperationCount(&self) -> NSInteger; diff --git a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs index cebee6c49..b5345764a 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedCollectionDifference.rs @@ -65,7 +65,10 @@ extern_methods!( #[method_id(@__retain_semantics Other differenceByTransformingChangesWithBlock:)] pub unsafe fn differenceByTransformingChangesWithBlock( &self, - block: TodoBlock, + block: &Block< + (NonNull>,), + NonNull>, + >, ) -> Id, Shared>; #[method_id(@__retain_semantics Other inverseDifference)] diff --git a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs index e71c5dd96..101409162 100644 --- a/crates/icrate/src/generated/Foundation/NSOrderedSet.rs +++ b/crates/icrate/src/generated/Foundation/NSOrderedSet.rs @@ -98,13 +98,16 @@ extern_methods!( pub unsafe fn set(&self) -> Id, Shared>; #[method(enumerateObjectsUsingBlock:)] - pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); + pub unsafe fn enumerateObjectsUsingBlock( + &self, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, + ); #[method(enumerateObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, ); #[method(enumerateObjectsAtIndexes:options:usingBlock:)] @@ -112,17 +115,20 @@ extern_methods!( &self, s: &NSIndexSet, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NonNull, NSUInteger, NonNull), ()>, ); #[method(indexOfObjectPassingTest:)] - pub unsafe fn indexOfObjectPassingTest(&self, predicate: TodoBlock) -> NSUInteger; + pub unsafe fn indexOfObjectPassingTest( + &self, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, + ) -> NSUInteger; #[method(indexOfObjectWithOptions:passingTest:)] pub unsafe fn indexOfObjectWithOptions_passingTest( &self, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, ) -> NSUInteger; #[method(indexOfObjectAtIndexes:options:passingTest:)] @@ -130,20 +136,20 @@ extern_methods!( &self, s: &NSIndexSet, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, ) -> NSUInteger; #[method_id(@__retain_semantics Other indexesOfObjectsPassingTest:)] pub unsafe fn indexesOfObjectsPassingTest( &self, - predicate: TodoBlock, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, ) -> Id; #[method_id(@__retain_semantics Other indexesOfObjectsWithOptions:passingTest:)] pub unsafe fn indexesOfObjectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, ) -> Id; #[method_id(@__retain_semantics Other indexesOfObjectsAtIndexes:options:passingTest:)] @@ -151,7 +157,7 @@ extern_methods!( &self, s: &NSIndexSet, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NonNull, NSUInteger, NonNull), Bool>, ) -> Id; #[method(indexOfObject:inSortedRange:options:usingComparator:)] @@ -307,7 +313,7 @@ extern_methods!( &self, other: &NSOrderedSet, options: NSOrderedCollectionDifferenceCalculationOptions, - block: TodoBlock, + block: &Block<(NonNull, NonNull), Bool>, ) -> Id, Shared>; #[method_id(@__retain_semantics Other differenceFromOrderedSet:withOptions:)] diff --git a/crates/icrate/src/generated/Foundation/NSPredicate.rs b/crates/icrate/src/generated/Foundation/NSPredicate.rs index 63125326a..7e9cccf79 100644 --- a/crates/icrate/src/generated/Foundation/NSPredicate.rs +++ b/crates/icrate/src/generated/Foundation/NSPredicate.rs @@ -29,7 +29,9 @@ extern_methods!( pub unsafe fn predicateWithValue(value: bool) -> Id; #[method_id(@__retain_semantics Other predicateWithBlock:)] - pub unsafe fn predicateWithBlock(block: TodoBlock) -> Id; + pub unsafe fn predicateWithBlock( + block: &Block<(*mut Object, *mut NSDictionary), Bool>, + ) -> Id; #[method_id(@__retain_semantics Other predicateFormat)] pub unsafe fn predicateFormat(&self) -> Id; diff --git a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs index fa680957b..287036b7a 100644 --- a/crates/icrate/src/generated/Foundation/NSProcessInfo.rs +++ b/crates/icrate/src/generated/Foundation/NSProcessInfo.rs @@ -145,14 +145,14 @@ extern_methods!( &self, options: NSActivityOptions, reason: &NSString, - block: TodoBlock, + block: &Block<(), ()>, ); #[method(performExpiringActivityWithReason:usingBlock:)] pub unsafe fn performExpiringActivityWithReason_usingBlock( &self, reason: &NSString, - block: TodoBlock, + block: &Block<(Bool,), ()>, ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index 401646ecd..d752df3a6 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -9,9 +9,10 @@ pub type NSProgressUserInfoKey = NSString; pub type NSProgressFileOperationKind = NSString; -pub type NSProgressUnpublishingHandler = TodoBlock; +pub type NSProgressUnpublishingHandler = *mut Block<(), ()>; -pub type NSProgressPublishingHandler = TodoBlock; +pub type NSProgressPublishingHandler = + *mut Block<(NonNull,), NSProgressUnpublishingHandler>; extern_class!( #[derive(Debug)] @@ -54,7 +55,7 @@ extern_methods!( pub unsafe fn performAsCurrentWithPendingUnitCount_usingBlock( &self, unitCount: i64, - work: TodoBlock, + work: &Block<(), ()>, ); #[method(resignCurrent)] @@ -109,22 +110,22 @@ extern_methods!( pub unsafe fn isPaused(&self) -> bool; #[method(cancellationHandler)] - pub unsafe fn cancellationHandler(&self) -> TodoBlock; + pub unsafe fn cancellationHandler(&self) -> *mut Block<(), ()>; #[method(setCancellationHandler:)] - pub unsafe fn setCancellationHandler(&self, cancellationHandler: TodoBlock); + pub unsafe fn setCancellationHandler(&self, cancellationHandler: Option<&Block<(), ()>>); #[method(pausingHandler)] - pub unsafe fn pausingHandler(&self) -> TodoBlock; + pub unsafe fn pausingHandler(&self) -> *mut Block<(), ()>; #[method(setPausingHandler:)] - pub unsafe fn setPausingHandler(&self, pausingHandler: TodoBlock); + pub unsafe fn setPausingHandler(&self, pausingHandler: Option<&Block<(), ()>>); #[method(resumingHandler)] - pub unsafe fn resumingHandler(&self) -> TodoBlock; + pub unsafe fn resumingHandler(&self) -> *mut Block<(), ()>; #[method(setResumingHandler:)] - pub unsafe fn setResumingHandler(&self, resumingHandler: TodoBlock); + pub unsafe fn setResumingHandler(&self, resumingHandler: Option<&Block<(), ()>>); #[method(setUserInfoObject:forKey:)] pub unsafe fn setUserInfoObject_forKey( diff --git a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs index 9f1f51428..a51085f85 100644 --- a/crates/icrate/src/generated/Foundation/NSRegularExpression.rs +++ b/crates/icrate/src/generated/Foundation/NSRegularExpression.rs @@ -85,7 +85,7 @@ extern_methods!( string: &NSString, options: NSMatchingOptions, range: NSRange, - block: TodoBlock, + block: &Block<(*mut NSTextCheckingResult, NSMatchingFlags, NonNull), ()>, ); #[method_id(@__retain_semantics Other matchesInString:options:range:)] diff --git a/crates/icrate/src/generated/Foundation/NSRunLoop.rs b/crates/icrate/src/generated/Foundation/NSRunLoop.rs index 848c8c5e5..4cd07cdd0 100644 --- a/crates/icrate/src/generated/Foundation/NSRunLoop.rs +++ b/crates/icrate/src/generated/Foundation/NSRunLoop.rs @@ -64,10 +64,14 @@ extern_methods!( pub unsafe fn configureAsServer(&self); #[method(performInModes:block:)] - pub unsafe fn performInModes_block(&self, modes: &NSArray, block: TodoBlock); + pub unsafe fn performInModes_block( + &self, + modes: &NSArray, + block: &Block<(), ()>, + ); #[method(performBlock:)] - pub unsafe fn performBlock(&self, block: TodoBlock); + pub unsafe fn performBlock(&self, block: &Block<(), ()>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSSet.rs b/crates/icrate/src/generated/Foundation/NSSet.rs index d7321836c..a97fb9074 100644 --- a/crates/icrate/src/generated/Foundation/NSSet.rs +++ b/crates/icrate/src/generated/Foundation/NSSet.rs @@ -100,26 +100,29 @@ extern_methods!( ) -> Id, Shared>; #[method(enumerateObjectsUsingBlock:)] - pub unsafe fn enumerateObjectsUsingBlock(&self, block: TodoBlock); + pub unsafe fn enumerateObjectsUsingBlock( + &self, + block: &Block<(NonNull, NonNull), ()>, + ); #[method(enumerateObjectsWithOptions:usingBlock:)] pub unsafe fn enumerateObjectsWithOptions_usingBlock( &self, opts: NSEnumerationOptions, - block: TodoBlock, + block: &Block<(NonNull, NonNull), ()>, ); #[method_id(@__retain_semantics Other objectsPassingTest:)] pub unsafe fn objectsPassingTest( &self, - predicate: TodoBlock, + predicate: &Block<(NonNull, NonNull), Bool>, ) -> Id, Shared>; #[method_id(@__retain_semantics Other objectsWithOptions:passingTest:)] pub unsafe fn objectsWithOptions_passingTest( &self, opts: NSEnumerationOptions, - predicate: TodoBlock, + predicate: &Block<(NonNull, NonNull), Bool>, ) -> Id, Shared>; } ); diff --git a/crates/icrate/src/generated/Foundation/NSString.rs b/crates/icrate/src/generated/Foundation/NSString.rs index 161b86949..a9c5a3492 100644 --- a/crates/icrate/src/generated/Foundation/NSString.rs +++ b/crates/icrate/src/generated/Foundation/NSString.rs @@ -359,11 +359,14 @@ extern_methods!( &self, range: NSRange, opts: NSStringEnumerationOptions, - block: TodoBlock, + block: &Block<(*mut NSString, NSRange, NSRange, NonNull), ()>, ); #[method(enumerateLinesUsingBlock:)] - pub unsafe fn enumerateLinesUsingBlock(&self, block: TodoBlock); + pub unsafe fn enumerateLinesUsingBlock( + &self, + block: &Block<(NonNull, NonNull), ()>, + ); #[method(UTF8String)] pub fn UTF8String(&self) -> *mut c_char; @@ -541,7 +544,7 @@ extern_methods!( this: Option>, chars: NonNull, len: NSUInteger, - deallocator: TodoBlock, + deallocator: Option<&Block<(NonNull, NSUInteger), ()>>, ) -> Id; #[method_id(@__retain_semantics Init initWithCharacters:length:)] @@ -593,7 +596,7 @@ extern_methods!( bytes: NonNull, len: NSUInteger, encoding: NSStringEncoding, - deallocator: TodoBlock, + deallocator: Option<&Block<(NonNull, NSUInteger), ()>>, ) -> Option>; #[method_id(@__retain_semantics Other string)] diff --git a/crates/icrate/src/generated/Foundation/NSTask.rs b/crates/icrate/src/generated/Foundation/NSTask.rs index 09ba8c4d3..e7e95c755 100644 --- a/crates/icrate/src/generated/Foundation/NSTask.rs +++ b/crates/icrate/src/generated/Foundation/NSTask.rs @@ -95,10 +95,13 @@ extern_methods!( pub unsafe fn terminationReason(&self) -> NSTaskTerminationReason; #[method(terminationHandler)] - pub unsafe fn terminationHandler(&self) -> TodoBlock; + pub unsafe fn terminationHandler(&self) -> *mut Block<(NonNull,), ()>; #[method(setTerminationHandler:)] - pub unsafe fn setTerminationHandler(&self, terminationHandler: TodoBlock); + pub unsafe fn setTerminationHandler( + &self, + terminationHandler: Option<&Block<(NonNull,), ()>>, + ); #[method(qualityOfService)] pub unsafe fn qualityOfService(&self) -> NSQualityOfService; @@ -116,7 +119,7 @@ extern_methods!( url: &NSURL, arguments: &NSArray, error: *mut *mut NSError, - terminationHandler: TodoBlock, + terminationHandler: Option<&Block<(NonNull,), ()>>, ) -> Option>; #[method(waitUntilExit)] diff --git a/crates/icrate/src/generated/Foundation/NSThread.rs b/crates/icrate/src/generated/Foundation/NSThread.rs index 2e7a3a2b9..e0ae7da79 100644 --- a/crates/icrate/src/generated/Foundation/NSThread.rs +++ b/crates/icrate/src/generated/Foundation/NSThread.rs @@ -18,7 +18,7 @@ extern_methods!( pub unsafe fn currentThread() -> Id; #[method(detachNewThreadWithBlock:)] - pub unsafe fn detachNewThreadWithBlock(block: TodoBlock); + pub unsafe fn detachNewThreadWithBlock(block: &Block<(), ()>); #[method(detachNewThreadSelector:toTarget:withObject:)] pub unsafe fn detachNewThreadSelector_toTarget_withObject( @@ -89,7 +89,7 @@ extern_methods!( #[method_id(@__retain_semantics Init initWithBlock:)] pub unsafe fn initWithBlock( this: Option>, - block: TodoBlock, + block: &Block<(), ()>, ) -> Id; #[method(isExecuting)] diff --git a/crates/icrate/src/generated/Foundation/NSTimer.rs b/crates/icrate/src/generated/Foundation/NSTimer.rs index 24b938a0d..cbd071fd6 100644 --- a/crates/icrate/src/generated/Foundation/NSTimer.rs +++ b/crates/icrate/src/generated/Foundation/NSTimer.rs @@ -50,14 +50,14 @@ extern_methods!( pub unsafe fn timerWithTimeInterval_repeats_block( interval: NSTimeInterval, repeats: bool, - block: TodoBlock, + block: &Block<(NonNull,), ()>, ) -> Id; #[method_id(@__retain_semantics Other scheduledTimerWithTimeInterval:repeats:block:)] pub unsafe fn scheduledTimerWithTimeInterval_repeats_block( interval: NSTimeInterval, repeats: bool, - block: TodoBlock, + block: &Block<(NonNull,), ()>, ) -> Id; #[method_id(@__retain_semantics Init initWithFireDate:interval:repeats:block:)] @@ -66,7 +66,7 @@ extern_methods!( date: &NSDate, interval: NSTimeInterval, repeats: bool, - block: TodoBlock, + block: &Block<(NonNull,), ()>, ) -> Id; #[method_id(@__retain_semantics Init initWithFireDate:interval:target:selector:userInfo:repeats:)] diff --git a/crates/icrate/src/generated/Foundation/NSURLCache.rs b/crates/icrate/src/generated/Foundation/NSURLCache.rs index 6c3ecfefd..9a7e2986f 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCache.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCache.rs @@ -142,7 +142,7 @@ extern_methods!( pub unsafe fn getCachedResponseForDataTask_completionHandler( &self, dataTask: &NSURLSessionDataTask, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSCachedURLResponse,), ()>, ); #[method(removeCachedResponseForDataTask:)] diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index 26bd38816..fe0d38bab 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -89,7 +89,7 @@ extern_methods!( pub unsafe fn sendAsynchronousRequest_queue_completionHandler( request: &NSURLRequest, queue: &NSOperationQueue, - handler: TodoBlock, + handler: &Block<(*mut NSURLResponse, *mut NSData, *mut NSError), ()>, ); } ); diff --git a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs index a637f609b..99b6389cb 100644 --- a/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs +++ b/crates/icrate/src/generated/Foundation/NSURLCredentialStorage.rs @@ -73,7 +73,7 @@ extern_methods!( &self, protectionSpace: &NSURLProtectionSpace, task: &NSURLSessionTask, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSDictionary,), ()>, ); #[method(setCredential:forProtectionSpace:task:)] @@ -98,7 +98,7 @@ extern_methods!( &self, space: &NSURLProtectionSpace, task: &NSURLSessionTask, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSURLCredential,), ()>, ); #[method(setDefaultCredential:forProtectionSpace:task:)] diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index 2ac2a37af..ffdfa2aa4 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -53,16 +53,29 @@ extern_methods!( pub unsafe fn invalidateAndCancel(&self); #[method(resetWithCompletionHandler:)] - pub unsafe fn resetWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn resetWithCompletionHandler(&self, completionHandler: &Block<(), ()>); #[method(flushWithCompletionHandler:)] - pub unsafe fn flushWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn flushWithCompletionHandler(&self, completionHandler: &Block<(), ()>); #[method(getTasksWithCompletionHandler:)] - pub unsafe fn getTasksWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn getTasksWithCompletionHandler( + &self, + completionHandler: &Block< + ( + NonNull>, + NonNull>, + NonNull>, + ), + (), + >, + ); #[method(getAllTasksWithCompletionHandler:)] - pub unsafe fn getAllTasksWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn getAllTasksWithCompletionHandler( + &self, + completionHandler: &Block<(NonNull>,), ()>, + ); #[method_id(@__retain_semantics Other dataTaskWithRequest:)] pub unsafe fn dataTaskWithRequest( @@ -158,14 +171,14 @@ extern_methods!( pub unsafe fn dataTaskWithRequest_completionHandler( &self, request: &NSURLRequest, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSData, *mut NSURLResponse, *mut NSError), ()>, ) -> Id; #[method_id(@__retain_semantics Other dataTaskWithURL:completionHandler:)] pub unsafe fn dataTaskWithURL_completionHandler( &self, url: &NSURL, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSData, *mut NSURLResponse, *mut NSError), ()>, ) -> Id; #[method_id(@__retain_semantics Other uploadTaskWithRequest:fromFile:completionHandler:)] @@ -173,7 +186,7 @@ extern_methods!( &self, request: &NSURLRequest, fileURL: &NSURL, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSData, *mut NSURLResponse, *mut NSError), ()>, ) -> Id; #[method_id(@__retain_semantics Other uploadTaskWithRequest:fromData:completionHandler:)] @@ -181,28 +194,28 @@ extern_methods!( &self, request: &NSURLRequest, bodyData: Option<&NSData>, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSData, *mut NSURLResponse, *mut NSError), ()>, ) -> Id; #[method_id(@__retain_semantics Other downloadTaskWithRequest:completionHandler:)] pub unsafe fn downloadTaskWithRequest_completionHandler( &self, request: &NSURLRequest, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSURL, *mut NSURLResponse, *mut NSError), ()>, ) -> Id; #[method_id(@__retain_semantics Other downloadTaskWithURL:completionHandler:)] pub unsafe fn downloadTaskWithURL_completionHandler( &self, url: &NSURL, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSURL, *mut NSURLResponse, *mut NSError), ()>, ) -> Id; #[method_id(@__retain_semantics Other downloadTaskWithResumeData:completionHandler:)] pub unsafe fn downloadTaskWithResumeData_completionHandler( &self, resumeData: &NSData, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSURL, *mut NSURLResponse, *mut NSError), ()>, ) -> Id; } ); @@ -382,7 +395,10 @@ extern_class!( extern_methods!( unsafe impl NSURLSessionDownloadTask { #[method(cancelByProducingResumeData:)] - pub unsafe fn cancelByProducingResumeData(&self, completionHandler: TodoBlock); + pub unsafe fn cancelByProducingResumeData( + &self, + completionHandler: &Block<(*mut NSData,), ()>, + ); #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; @@ -409,7 +425,7 @@ extern_methods!( minBytes: NSUInteger, maxBytes: NSUInteger, timeout: NSTimeInterval, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSData, Bool, *mut NSError), ()>, ); #[method(writeData:timeout:completionHandler:)] @@ -417,7 +433,7 @@ extern_methods!( &self, data: &NSData, timeout: NSTimeInterval, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSError,), ()>, ); #[method(captureStreams)] @@ -525,14 +541,20 @@ extern_methods!( pub unsafe fn sendMessage_completionHandler( &self, message: &NSURLSessionWebSocketMessage, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSError,), ()>, ); #[method(receiveMessageWithCompletionHandler:)] - pub unsafe fn receiveMessageWithCompletionHandler(&self, completionHandler: TodoBlock); + pub unsafe fn receiveMessageWithCompletionHandler( + &self, + completionHandler: &Block<(*mut NSURLSessionWebSocketMessage, *mut NSError), ()>, + ); #[method(sendPingWithPongReceiveHandler:)] - pub unsafe fn sendPingWithPongReceiveHandler(&self, pongReceiveHandler: TodoBlock); + pub unsafe fn sendPingWithPongReceiveHandler( + &self, + pongReceiveHandler: &Block<(*mut NSError,), ()>, + ); #[method(cancelWithCloseCode:reason:)] pub unsafe fn cancelWithCloseCode_reason( diff --git a/crates/icrate/src/generated/Foundation/NSUndoManager.rs b/crates/icrate/src/generated/Foundation/NSUndoManager.rs index 213dd161a..02ea1c6d7 100644 --- a/crates/icrate/src/generated/Foundation/NSUndoManager.rs +++ b/crates/icrate/src/generated/Foundation/NSUndoManager.rs @@ -96,7 +96,7 @@ extern_methods!( pub unsafe fn registerUndoWithTarget_handler( &self, target: &Object, - undoHandler: TodoBlock, + undoHandler: &Block<(NonNull,), ()>, ); #[method(setActionIsDiscardable:)] diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 3ac6601c0..157b1afd3 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -112,7 +112,7 @@ extern_methods!( #[method(getContinuationStreamsWithCompletionHandler:)] pub unsafe fn getContinuationStreamsWithCompletionHandler( &self, - completionHandler: TodoBlock, + completionHandler: &Block<(*mut NSInputStream, *mut NSOutputStream, *mut NSError), ()>, ); #[method(isEligibleForHandoff)] @@ -153,11 +153,11 @@ extern_methods!( #[method(deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:)] pub unsafe fn deleteSavedUserActivitiesWithPersistentIdentifiers_completionHandler( persistentIdentifiers: &NSArray, - handler: TodoBlock, + handler: &Block<(), ()>, ); #[method(deleteAllSavedUserActivitiesWithCompletionHandler:)] - pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: TodoBlock); + pub unsafe fn deleteAllSavedUserActivitiesWithCompletionHandler(handler: &Block<(), ()>); } ); diff --git a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs index dcede4b13..b6b2a2748 100644 --- a/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs +++ b/crates/icrate/src/generated/Foundation/NSUserScriptTask.rs @@ -3,7 +3,7 @@ use crate::common::*; use crate::Foundation::*; -pub type NSUserScriptTaskCompletionHandler = TodoBlock; +pub type NSUserScriptTaskCompletionHandler = *mut Block<(*mut NSError,), ()>; extern_class!( #[derive(Debug)] @@ -33,7 +33,7 @@ extern_methods!( } ); -pub type NSUserUnixTaskCompletionHandler = TodoBlock; +pub type NSUserUnixTaskCompletionHandler = *mut Block<(*mut NSError,), ()>; extern_class!( #[derive(Debug)] @@ -73,7 +73,8 @@ extern_methods!( } ); -pub type NSUserAppleScriptTaskCompletionHandler = TodoBlock; +pub type NSUserAppleScriptTaskCompletionHandler = + *mut Block<(*mut NSAppleEventDescriptor, *mut NSError), ()>; extern_class!( #[derive(Debug)] @@ -95,7 +96,7 @@ extern_methods!( } ); -pub type NSUserAutomatorTaskCompletionHandler = TodoBlock; +pub type NSUserAutomatorTaskCompletionHandler = *mut Block<(*mut Object, *mut NSError), ()>; extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index 4f2389797..b38bdde32 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -75,26 +75,26 @@ extern_methods!( #[method_id(@__retain_semantics Other remoteObjectProxyWithErrorHandler:)] pub unsafe fn remoteObjectProxyWithErrorHandler( &self, - handler: TodoBlock, + handler: &Block<(NonNull,), ()>, ) -> Id; #[method_id(@__retain_semantics Other synchronousRemoteObjectProxyWithErrorHandler:)] pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( &self, - handler: TodoBlock, + handler: &Block<(NonNull,), ()>, ) -> Id; #[method(interruptionHandler)] - pub unsafe fn interruptionHandler(&self) -> TodoBlock; + pub unsafe fn interruptionHandler(&self) -> *mut Block<(), ()>; #[method(setInterruptionHandler:)] - pub unsafe fn setInterruptionHandler(&self, interruptionHandler: TodoBlock); + pub unsafe fn setInterruptionHandler(&self, interruptionHandler: Option<&Block<(), ()>>); #[method(invalidationHandler)] - pub unsafe fn invalidationHandler(&self) -> TodoBlock; + pub unsafe fn invalidationHandler(&self) -> *mut Block<(), ()>; #[method(setInvalidationHandler:)] - pub unsafe fn setInvalidationHandler(&self, invalidationHandler: TodoBlock); + pub unsafe fn setInvalidationHandler(&self, invalidationHandler: Option<&Block<(), ()>>); #[method(resume)] pub unsafe fn resume(&self); @@ -109,7 +109,7 @@ extern_methods!( pub unsafe fn currentConnection() -> Option>; #[method(scheduleSendBarrierBlock:)] - pub unsafe fn scheduleSendBarrierBlock(&self, block: TodoBlock); + pub unsafe fn scheduleSendBarrierBlock(&self, block: &Block<(), ()>); } ); diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 3e5226781..1f44abb09 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -16,9 +16,6 @@ #[cfg(feature = "std")] extern crate std; -#[cfg(feature = "objective-c")] -pub use objc2; - macro_rules! extern_struct { ( $v:vis struct $name:ident { @@ -232,9 +229,11 @@ mod common { const ENCODING: objc2::Encoding = objc2::Encoding::Sel; } + #[cfg(feature = "blocks")] + pub(crate) use block2::Block; + // TODO pub(crate) type Protocol = Object; - pub(crate) type TodoBlock = *const c_void; pub(crate) type TodoFunction = *const c_void; pub(crate) type TodoClass = Object; pub(crate) type TodoProtocols = Object; From 0bcf7d01c9c819947b6653170c7c78279f1b6bbd Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 3 Nov 2022 07:11:02 +0100 Subject: [PATCH 125/131] Add extern functions --- crates/header-translator/src/config.rs | 5 + crates/header-translator/src/lib.rs | 9 +- crates/header-translator/src/rust_type.rs | 48 ++-- crates/header-translator/src/stmt.rs | 55 ++-- .../src/Foundation/translation-config.toml | 2 + .../src/generated/AppKit/NSAccessibility.rs | 62 +++++ .../AppKit/NSAccessibilityConstants.rs | 8 + .../src/generated/AppKit/NSApplication.rs | 35 +++ crates/icrate/src/generated/AppKit/NSCell.rs | 31 +++ .../NSCollectionViewCompositionalLayout.rs | 11 + crates/icrate/src/generated/AppKit/NSEvent.rs | 6 + crates/icrate/src/generated/AppKit/NSFont.rs | 9 + .../icrate/src/generated/AppKit/NSGraphics.rs | 243 ++++++++++++++++++ .../src/generated/AppKit/NSInterfaceStyle.rs | 7 + .../src/generated/AppKit/NSKeyValueBinding.rs | 4 + .../icrate/src/generated/AppKit/NSOpenGL.rs | 12 + crates/icrate/src/generated/AppKit/NSPanel.rs | 4 + .../src/generated/AppKit/NSPasteboard.rs | 17 ++ crates/icrate/src/generated/AppKit/NSTouch.rs | 6 + crates/icrate/src/generated/AppKit/mod.rs | 141 +++++----- .../src/generated/Foundation/NSByteOrder.rs | 210 +++++++++++++++ .../src/generated/Foundation/NSCoder.rs | 4 + .../src/generated/Foundation/NSDecimal.rs | 99 +++++++ .../src/generated/Foundation/NSException.rs | 8 + .../src/generated/Foundation/NSGeometry.rs | 207 +++++++++++++++ .../generated/Foundation/NSHFSFileTypes.rs | 12 + .../src/generated/Foundation/NSHashTable.rs | 78 ++++++ .../src/generated/Foundation/NSMapTable.rs | 101 ++++++++ .../src/generated/Foundation/NSObjCRuntime.rs | 32 +++ .../src/generated/Foundation/NSObject.rs | 48 ++++ .../generated/Foundation/NSPathUtilities.rs | 32 +++ .../src/generated/Foundation/NSRange.rs | 40 +++ .../icrate/src/generated/Foundation/NSZone.rs | 112 ++++++++ crates/icrate/src/generated/Foundation/mod.rs | 100 ++++--- crates/icrate/src/lib.rs | 18 ++ 35 files changed, 1675 insertions(+), 141 deletions(-) diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index d2a2f933d..b7c20a5c4 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -20,6 +20,9 @@ pub struct Config { #[serde(rename = "enum")] #[serde(default)] pub enum_data: HashMap, + #[serde(rename = "fn")] + #[serde(default)] + pub fns: HashMap, #[serde(default)] pub imports: Vec, } @@ -65,6 +68,8 @@ pub struct MethodData { // TODO: mutating } +type FnData = StructData; + fn unsafe_default() -> bool { true } diff --git a/crates/header-translator/src/lib.rs b/crates/header-translator/src/lib.rs index 3218300f0..c4cabf92b 100644 --- a/crates/header-translator/src/lib.rs +++ b/crates/header-translator/src/lib.rs @@ -57,9 +57,12 @@ impl RustFile { Stmt::VarDecl { name, .. } => { self.declared_types.insert(name.clone()); } - Stmt::FnDecl { .. } => { - // TODO - // self.declared_types.insert(name.clone()); + Stmt::FnDecl { name, body, .. } => { + if body.is_none() { + self.declared_types.insert(name.clone()); + } else { + // TODO + } } Stmt::AliasDecl { name, .. } => { self.declared_types.insert(name.clone()); diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index d0694cd28..a1990e7b3 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -720,11 +720,13 @@ impl fmt::Display for RustType { #[derive(Debug, Clone, PartialEq, Eq, Hash)] enum TyKind { - InReturn, - InReturnWithError, + InMethodReturn, + InFnDeclReturn, + InMethodReturnWithError, InStatic, InTypedef, - InArgument, + InMethodArgument, + InFnDeclArgument, InStructEnum, InFnArgument, InFnReturn, @@ -741,7 +743,7 @@ pub struct Ty { impl Ty { pub const VOID_RESULT: Self = Self { ty: RustType::Void, - kind: TyKind::InReturn, + kind: TyKind::InMethodReturn, }; pub fn parse_method_argument(ty: Type<'_>, is_consumed: bool) -> Self { @@ -767,7 +769,7 @@ impl Ty { Self { ty, - kind: TyKind::InArgument, + kind: TyKind::InMethodArgument, } } @@ -782,16 +784,20 @@ impl Ty { Self { ty, - kind: TyKind::InReturn, + kind: TyKind::InMethodReturn, } } pub fn parse_function_argument(ty: Type<'_>) -> Self { - Self::parse_method_argument(ty, false) + let mut this = Self::parse_method_argument(ty, false); + this.kind = TyKind::InFnDeclArgument; + this } pub fn parse_function_return(ty: Type<'_>) -> Self { - Self::parse_method_return(ty) + let mut this = Self::parse_method_return(ty); + this.kind = TyKind::InFnDeclReturn; + this } pub fn parse_typedef(ty: Type<'_>) -> Option { @@ -841,7 +847,7 @@ impl Ty { Self { ty, - kind: TyKind::InArgument, + kind: TyKind::InMethodArgument, } } @@ -856,7 +862,7 @@ impl Ty { Self { ty, - kind: TyKind::InReturn, + kind: TyKind::InMethodReturn, } } @@ -1011,8 +1017,8 @@ impl Ty { } pub fn set_is_error(&mut self) { - assert_eq!(self.kind, TyKind::InReturn); - self.kind = TyKind::InReturnWithError; + assert_eq!(self.kind, TyKind::InMethodReturn); + self.kind = TyKind::InMethodReturnWithError; } /// Related result types @@ -1036,7 +1042,7 @@ impl Ty { impl fmt::Display for Ty { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match &self.kind { - TyKind::InReturn => { + TyKind::InMethodReturn => { if let RustType::Void = &self.ty { // Don't output anything return Ok(()); @@ -1070,7 +1076,7 @@ impl fmt::Display for Ty { ty => write!(f, "{ty}"), } } - TyKind::InReturnWithError => match &self.ty { + TyKind::InMethodReturnWithError => match &self.ty { RustType::Id { type_: ty, lifetime: Lifetime::Unspecified, @@ -1136,13 +1142,11 @@ impl fmt::Display for Ty { } ty => write!(f, "{ty}"), }, - TyKind::InArgument => match &self.ty { + TyKind::InMethodArgument | TyKind::InFnDeclArgument => match &self.ty { RustType::Id { type_: ty, - // Ignore - is_const: _, - // Ignore - lifetime: _, + is_const: false, + lifetime: Lifetime::Unspecified | Lifetime::Strong, nullability, } => { if *nullability == Nullability::NonNull { @@ -1158,7 +1162,7 @@ impl fmt::Display for Ty { write!(f, "Option<&Class>") } } - RustType::ObjcBool => write!(f, "bool"), + RustType::ObjcBool if self.kind == TyKind::InMethodArgument => write!(f, "bool"), ty @ RustType::Pointer { nullability, is_const: false, @@ -1170,7 +1174,7 @@ impl fmt::Display for Ty { // is_const: false, // lifetime: Lifetime::Autoreleasing, // nullability: inner_nullability, - // } => { + // } if self.kind == TyKind::InMethodArgument => { // let tokens = if *inner_nullability == Nullability::NonNull { // format!("Id<{ty}, Shared>") // } else { @@ -1198,7 +1202,7 @@ impl fmt::Display for Ty { }, TyKind::InStructEnum => write!(f, "{}", self.ty), TyKind::InFnArgument | TyKind::InBlockArgument => write!(f, "{}", self.ty), - TyKind::InFnReturn => { + TyKind::InFnDeclReturn | TyKind::InFnReturn => { if let RustType::Void = &self.ty { // Don't output anything return Ok(()); diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 1949cf0b5..af0f7d169 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -6,7 +6,7 @@ use clang::{Entity, EntityKind, EntityVisitResult}; use crate::availability::Availability; use crate::config::{ClassData, Config}; use crate::expr::Expr; -use crate::method::Method; +use crate::method::{handle_reserved, Method}; use crate::property::Property; use crate::rust_type::Ty; use crate::unexposed_macro::UnexposedMacro; @@ -588,6 +588,15 @@ impl Stmt { EntityKind::FunctionDecl => { let name = entity.get_name().expect("function name"); + if config + .fns + .get(&name) + .map(|data| data.skipped) + .unwrap_or_default() + { + return None; + } + if entity.is_variadic() { println!("can't handle variadic function {name}"); return None; @@ -834,34 +843,34 @@ impl fmt::Display for Stmt { writeln!(f, "extern_static!({name}: {ty} = {expr});")?; } Self::FnDecl { - name: _, - arguments: _, - result_type: _, + name, + arguments, + result_type, body: None, } => { - // TODO - // writeln!(f, r#"extern "C" {{"#)?; - // write!(f, " fn {name}(")?; - // for (param, arg_ty) in arguments { - // write!(f, "{}: {arg_ty},", handle_reserved(¶m))?; - // } - // writeln!(f, "){result_type};")?; - // writeln!(f, "}}")?; + writeln!(f, "extern_fn!(")?; + write!(f, " pub unsafe fn {name}(")?; + for (param, arg_ty) in arguments { + write!(f, "{}: {arg_ty},", handle_reserved(¶m))?; + } + writeln!(f, "){result_type};")?; + writeln!(f, ");")?; } Self::FnDecl { - name: _, - arguments: _, - result_type: _, + name, + arguments, + result_type, body: Some(_body), } => { - // TODO - // write!(f, "unsafe fn {name}(")?; - // for (param, arg_ty) in arguments { - // write!(f, "{}: {arg_ty},", handle_reserved(¶m))?; - // } - // writeln!(f, "){result_type} {{")?; - // writeln!(f, " todo!()")?; - // writeln!(f, "}}")?; + writeln!(f, "inline_fn!(")?; + write!(f, " pub unsafe fn {name}(")?; + for (param, arg_ty) in arguments { + write!(f, "{}: {arg_ty},", handle_reserved(¶m))?; + } + writeln!(f, "){result_type} {{")?; + writeln!(f, " todo!()")?; + writeln!(f, " }}")?; + writeln!(f, ");")?; } Self::AliasDecl { name, ty } => { writeln!(f, "pub type {name} = {ty};")?; diff --git a/crates/icrate/src/Foundation/translation-config.toml b/crates/icrate/src/Foundation/translation-config.toml index e11bfd537..2fad301d7 100644 --- a/crates/icrate/src/Foundation/translation-config.toml +++ b/crates/icrate/src/Foundation/translation-config.toml @@ -196,6 +196,8 @@ skipped = true skipped = true [class.NSString.methods.initWithFormat_locale_arguments] skipped = true +[fn.NSLogv] +skipped = true # Wrong type compared to value [enum.anonymous.constants.NSWrapCalendarComponents] diff --git a/crates/icrate/src/generated/AppKit/NSAccessibility.rs b/crates/icrate/src/generated/AppKit/NSAccessibility.rs index 514bc43a9..29ae23754 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibility.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibility.rs @@ -135,3 +135,65 @@ extern_methods!( ) -> bool; } ); + +extern_fn!( + pub unsafe fn NSAccessibilityFrameInView(parentView: &NSView, frame: NSRect) -> NSRect; +); + +extern_fn!( + pub unsafe fn NSAccessibilityPointInView(parentView: &NSView, point: NSPoint) -> NSPoint; +); + +extern_fn!( + pub unsafe fn NSAccessibilitySetMayContainProtectedContent(flag: Bool) -> Bool; +); + +extern_fn!( + pub unsafe fn NSAccessibilityRoleDescription( + role: &NSAccessibilityRole, + subrole: Option<&NSAccessibilitySubrole>, + ) -> *mut NSString; +); + +extern_fn!( + pub unsafe fn NSAccessibilityRoleDescriptionForUIElement(element: &Object) -> *mut NSString; +); + +extern_fn!( + pub unsafe fn NSAccessibilityActionDescription( + action: &NSAccessibilityActionName, + ) -> *mut NSString; +); + +extern_fn!( + pub unsafe fn NSAccessibilityRaiseBadArgumentException( + element: Option<&Object>, + attribute: Option<&NSAccessibilityAttributeName>, + value: Option<&Object>, + ); +); + +extern_fn!( + pub unsafe fn NSAccessibilityUnignoredAncestor(element: &Object) -> *mut Object; +); + +extern_fn!( + pub unsafe fn NSAccessibilityUnignoredDescendant(element: &Object) -> *mut Object; +); + +extern_fn!( + pub unsafe fn NSAccessibilityUnignoredChildren(originalChildren: &NSArray) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSAccessibilityUnignoredChildrenForOnlyChild( + originalChild: &Object, + ) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSAccessibilityPostNotification( + element: &Object, + notification: &NSAccessibilityNotificationName, + ); +); diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs index 2655e5fa4..8cee6be9e 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityConstants.rs @@ -835,6 +835,14 @@ extern_static!(NSAccessibilityPriorityKey: &'static NSAccessibilityNotificationU extern_static!(NSAccessibilityAnnouncementKey: &'static NSAccessibilityNotificationUserInfoKey); +extern_fn!( + pub unsafe fn NSAccessibilityPostNotificationWithUserInfo( + element: &Object, + notification: &NSAccessibilityNotificationName, + userInfo: Option<&NSDictionary>, + ); +); + ns_enum!( #[underlying(NSInteger)] pub enum NSAccessibilityPriorityLevel { diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 941167aee..2b555a216 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -650,8 +650,43 @@ extern_methods!( } ); +extern_fn!( + pub unsafe fn NSApplicationMain(argc: c_int, argv: NonNull>) -> c_int; +); + +extern_fn!( + pub unsafe fn NSApplicationLoad() -> Bool; +); + +extern_fn!( + pub unsafe fn NSShowsServicesMenuItem(itemName: &NSString) -> Bool; +); + +extern_fn!( + pub unsafe fn NSSetShowsServicesMenuItem(itemName: &NSString, enabled: Bool) -> NSInteger; +); + +extern_fn!( + pub unsafe fn NSUpdateDynamicServices(); +); + +extern_fn!( + pub unsafe fn NSPerformService(itemName: &NSString, pboard: Option<&NSPasteboard>) -> Bool; +); + pub type NSServiceProviderName = NSString; +extern_fn!( + pub unsafe fn NSRegisterServicesProvider( + provider: Option<&Object>, + name: &NSServiceProviderName, + ); +); + +extern_fn!( + pub unsafe fn NSUnregisterServicesProvider(name: &NSServiceProviderName); +); + extern_static!(NSApplicationDidBecomeActiveNotification: &'static NSNotificationName); extern_static!(NSApplicationDidHideNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSCell.rs b/crates/icrate/src/generated/AppKit/NSCell.rs index 1dfdc0446..d6f7fc9e1 100644 --- a/crates/icrate/src/generated/AppKit/NSCell.rs +++ b/crates/icrate/src/generated/AppKit/NSCell.rs @@ -686,6 +686,37 @@ extern_methods!( } ); +extern_fn!( + pub unsafe fn NSDrawThreePartImage( + frame: NSRect, + startCap: Option<&NSImage>, + centerFill: Option<&NSImage>, + endCap: Option<&NSImage>, + vertical: Bool, + op: NSCompositingOperation, + alphaFraction: CGFloat, + flipped: Bool, + ); +); + +extern_fn!( + pub unsafe fn NSDrawNinePartImage( + frame: NSRect, + topLeftCorner: Option<&NSImage>, + topEdgeFill: Option<&NSImage>, + topRightCorner: Option<&NSImage>, + leftEdgeFill: Option<&NSImage>, + centerFill: Option<&NSImage>, + rightEdgeFill: Option<&NSImage>, + bottomLeftCorner: Option<&NSImage>, + bottomEdgeFill: Option<&NSImage>, + bottomRightCorner: Option<&NSImage>, + op: NSCompositingOperation, + alphaFraction: CGFloat, + flipped: Bool, + ); +); + extern_methods!( /// NSDeprecated unsafe impl NSCell { diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index bbe27ca46..24df6c8c7 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -46,6 +46,17 @@ ns_enum!( } ); +inline_fn!( + pub unsafe fn NSDirectionalEdgeInsetsMake( + top: CGFloat, + leading: CGFloat, + bottom: CGFloat, + trailing: CGFloat, + ) -> NSDirectionalEdgeInsets { + todo!() + } +); + extern_class!( #[derive(Debug)] pub struct NSCollectionViewCompositionalLayoutConfiguration; diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index 72b6738d6..d718d9d32 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -177,6 +177,12 @@ extern_static!(NSOtherMouseUpMask: NSEventMask = NSEventMaskOtherMouseUp); extern_static!(NSOtherMouseDraggedMask: NSEventMask = NSEventMaskOtherMouseDragged); +inline_fn!( + pub unsafe fn NSEventMaskFromType(type_: NSEventType) -> NSEventMask { + todo!() + } +); + ns_options!( #[underlying(NSUInteger)] pub enum NSEventModifierFlags { diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 782b53a80..518013557 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -247,6 +247,15 @@ ns_enum!( } ); +extern_fn!( + pub unsafe fn NSConvertGlyphsToPackedGlyphs( + glBuf: NonNull, + count: NSInteger, + packing: NSMultibyteGlyphPacking, + packedGlyphs: NonNull, + ) -> NSInteger; +); + extern_methods!( /// NSFont_Deprecated unsafe impl NSFont { diff --git a/crates/icrate/src/generated/AppKit/NSGraphics.rs b/crates/icrate/src/generated/AppKit/NSGraphics.rs index e4b2d4238..007bc8efd 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphics.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphics.rs @@ -184,6 +184,40 @@ ns_enum!( } ); +extern_fn!( + pub unsafe fn NSBestDepth( + colorSpace: &NSColorSpaceName, + bps: NSInteger, + bpp: NSInteger, + planar: Bool, + exactMatch: *mut Bool, + ) -> NSWindowDepth; +); + +extern_fn!( + pub unsafe fn NSPlanarFromDepth(depth: NSWindowDepth) -> Bool; +); + +extern_fn!( + pub unsafe fn NSColorSpaceFromDepth(depth: NSWindowDepth) -> *mut NSColorSpaceName; +); + +extern_fn!( + pub unsafe fn NSBitsPerSampleFromDepth(depth: NSWindowDepth) -> NSInteger; +); + +extern_fn!( + pub unsafe fn NSBitsPerPixelFromDepth(depth: NSWindowDepth) -> NSInteger; +); + +extern_fn!( + pub unsafe fn NSNumberOfColorComponents(colorSpaceName: &NSColorSpaceName) -> NSInteger; +); + +extern_fn!( + pub unsafe fn NSAvailableWindowDepths() -> NonNull; +); + extern_static!(NSWhite: CGFloat); extern_static!(NSLightGray: CGFloat); @@ -214,6 +248,180 @@ extern_static!(NSDeviceIsPrinter: &'static NSDeviceDescriptionKey); extern_static!(NSDeviceSize: &'static NSDeviceDescriptionKey); +extern_fn!( + pub unsafe fn NSRectFill(rect: NSRect); +); + +extern_fn!( + pub unsafe fn NSRectFillList(rects: NonNull, count: NSInteger); +); + +extern_fn!( + pub unsafe fn NSRectFillListWithGrays( + rects: NonNull, + grays: NonNull, + num: NSInteger, + ); +); + +extern_fn!( + pub unsafe fn NSRectFillListWithColors( + rects: NonNull, + colors: NonNull>, + num: NSInteger, + ); +); + +extern_fn!( + pub unsafe fn NSRectFillUsingOperation(rect: NSRect, op: NSCompositingOperation); +); + +extern_fn!( + pub unsafe fn NSRectFillListUsingOperation( + rects: NonNull, + count: NSInteger, + op: NSCompositingOperation, + ); +); + +extern_fn!( + pub unsafe fn NSRectFillListWithColorsUsingOperation( + rects: NonNull, + colors: NonNull>, + num: NSInteger, + op: NSCompositingOperation, + ); +); + +extern_fn!( + pub unsafe fn NSFrameRect(rect: NSRect); +); + +extern_fn!( + pub unsafe fn NSFrameRectWithWidth(rect: NSRect, frameWidth: CGFloat); +); + +extern_fn!( + pub unsafe fn NSFrameRectWithWidthUsingOperation( + rect: NSRect, + frameWidth: CGFloat, + op: NSCompositingOperation, + ); +); + +extern_fn!( + pub unsafe fn NSRectClip(rect: NSRect); +); + +extern_fn!( + pub unsafe fn NSRectClipList(rects: NonNull, count: NSInteger); +); + +extern_fn!( + pub unsafe fn NSDrawTiledRects( + boundsRect: NSRect, + clipRect: NSRect, + sides: NonNull, + grays: NonNull, + count: NSInteger, + ) -> NSRect; +); + +extern_fn!( + pub unsafe fn NSDrawGrayBezel(rect: NSRect, clipRect: NSRect); +); + +extern_fn!( + pub unsafe fn NSDrawGroove(rect: NSRect, clipRect: NSRect); +); + +extern_fn!( + pub unsafe fn NSDrawWhiteBezel(rect: NSRect, clipRect: NSRect); +); + +extern_fn!( + pub unsafe fn NSDrawButton(rect: NSRect, clipRect: NSRect); +); + +extern_fn!( + pub unsafe fn NSEraseRect(rect: NSRect); +); + +extern_fn!( + pub unsafe fn NSReadPixel(passedPoint: NSPoint) -> *mut NSColor; +); + +extern_fn!( + pub unsafe fn NSDrawBitmap( + rect: NSRect, + width: NSInteger, + height: NSInteger, + bps: NSInteger, + spp: NSInteger, + bpp: NSInteger, + bpr: NSInteger, + isPlanar: Bool, + hasAlpha: Bool, + colorSpaceName: &NSColorSpaceName, + data: [*const c_uchar; 5], + ); +); + +extern_fn!( + pub unsafe fn NSHighlightRect(rect: NSRect); +); + +extern_fn!( + pub unsafe fn NSBeep(); +); + +extern_fn!( + pub unsafe fn NSGetWindowServerMemory( + context: NSInteger, + virtualMemory: NonNull, + windowBackingMemory: NonNull, + windowDumpString: NonNull>, + ) -> NSInteger; +); + +extern_fn!( + pub unsafe fn NSDrawColorTiledRects( + boundsRect: NSRect, + clipRect: NSRect, + sides: NonNull, + colors: NonNull>, + count: NSInteger, + ) -> NSRect; +); + +extern_fn!( + pub unsafe fn NSDrawDarkBezel(rect: NSRect, clipRect: NSRect); +); + +extern_fn!( + pub unsafe fn NSDrawLightBezel(rect: NSRect, clipRect: NSRect); +); + +extern_fn!( + pub unsafe fn NSDottedFrameRect(rect: NSRect); +); + +extern_fn!( + pub unsafe fn NSDrawWindowBackground(rect: NSRect); +); + +extern_fn!( + pub unsafe fn NSSetFocusRingStyle(placement: NSFocusRingPlacement); +); + +extern_fn!( + pub unsafe fn NSDisableScreenUpdates(); +); + +extern_fn!( + pub unsafe fn NSEnableScreenUpdates(); +); + ns_enum!( #[underlying(NSUInteger)] pub enum NSAnimationEffect { @@ -221,3 +429,38 @@ ns_enum!( NSAnimationEffectPoof = 10, } ); + +extern_fn!( + pub unsafe fn NSShowAnimationEffect( + animationEffect: NSAnimationEffect, + centerLocation: NSPoint, + size: NSSize, + animationDelegate: Option<&Object>, + didEndSelector: OptionSel, + contextInfo: *mut c_void, + ); +); + +extern_fn!( + pub unsafe fn NSCountWindows(count: NonNull); +); + +extern_fn!( + pub unsafe fn NSWindowList(size: NSInteger, list: NonNull); +); + +extern_fn!( + pub unsafe fn NSCountWindowsForContext(context: NSInteger, count: NonNull); +); + +extern_fn!( + pub unsafe fn NSWindowListForContext( + context: NSInteger, + size: NSInteger, + list: NonNull, + ); +); + +extern_fn!( + pub unsafe fn NSCopyBits(srcGState: NSInteger, srcRect: NSRect, destPoint: NSPoint); +); diff --git a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs index 5cb759ffd..0f952c07c 100644 --- a/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs +++ b/crates/icrate/src/generated/AppKit/NSInterfaceStyle.rs @@ -17,6 +17,13 @@ extern_enum!( pub type NSInterfaceStyle = NSUInteger; +extern_fn!( + pub unsafe fn NSInterfaceStyleForKey( + key: Option<&NSString>, + responder: Option<&NSResponder>, + ) -> NSInterfaceStyle; +); + extern_methods!( /// NSInterfaceStyle unsafe impl NSResponder { diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index a86ee2950..26c828893 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -55,6 +55,10 @@ extern_static!(NSNoSelectionMarker: &'static Object); extern_static!(NSNotApplicableMarker: &'static Object); +extern_fn!( + pub unsafe fn NSIsControllerMarker(object: Option<&Object>) -> Bool; +); + pub type NSBindingInfoKey = NSString; extern_static!(NSObservedObjectKey: &'static NSBindingInfoKey); diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index befc8a865..6eaed9a50 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -16,6 +16,18 @@ ns_enum!( } ); +extern_fn!( + pub unsafe fn NSOpenGLSetOption(pname: NSOpenGLGlobalOption, param: GLint); +); + +extern_fn!( + pub unsafe fn NSOpenGLGetOption(pname: NSOpenGLGlobalOption, param: NonNull); +); + +extern_fn!( + pub unsafe fn NSOpenGLGetVersion(major: *mut GLint, minor: *mut GLint); +); + extern_enum!( #[underlying(c_uint)] pub enum { diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index 9fe5ae7a2..f71303b2f 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -36,6 +36,10 @@ extern_methods!( } ); +extern_fn!( + pub unsafe fn NSReleaseAlertPanel(panel: Option<&Object>); +); + extern_enum!( #[underlying(c_int)] pub enum { diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index f98c0fbbd..ebcbe36e1 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -294,6 +294,23 @@ extern_methods!( extern_static!(NSFileContentsPboardType: &'static NSPasteboardType); +extern_fn!( + pub unsafe fn NSCreateFilenamePboardType(fileType: &NSString) -> *mut NSPasteboardType; +); + +extern_fn!( + pub unsafe fn NSCreateFileContentsPboardType(fileType: &NSString) -> *mut NSPasteboardType; +); + +extern_fn!( + pub unsafe fn NSGetFileType(pboardType: &NSPasteboardType) -> *mut NSString; +); + +extern_fn!( + pub unsafe fn NSGetFileTypes(pboardTypes: &NSArray) + -> *mut NSArray; +); + extern_static!(NSStringPboardType: &'static NSPasteboardType); extern_static!(NSFilenamesPboardType: &'static NSPasteboardType); diff --git a/crates/icrate/src/generated/AppKit/NSTouch.rs b/crates/icrate/src/generated/AppKit/NSTouch.rs index d1bffa749..7bca0fd13 100644 --- a/crates/icrate/src/generated/AppKit/NSTouch.rs +++ b/crates/icrate/src/generated/AppKit/NSTouch.rs @@ -34,6 +34,12 @@ ns_options!( } ); +inline_fn!( + pub unsafe fn NSTouchTypeMaskFromType(type_: NSTouchType) -> NSTouchTypeMask { + todo!() + } +); + extern_class!( #[derive(Debug)] pub struct NSTouch; diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index a98f54ac4..b387b2ca6 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -555,7 +555,15 @@ pub use self::__AppKitErrors::{ NSWorkspaceErrorMaximum, NSWorkspaceErrorMinimum, }; pub use self::__NSATSTypesetter::NSATSTypesetter; -pub use self::__NSAccessibility::NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification; +pub use self::__NSAccessibility::{ + NSAccessibilityActionDescription, NSAccessibilityFrameInView, NSAccessibilityPointInView, + NSAccessibilityPostNotification, NSAccessibilityRaiseBadArgumentException, + NSAccessibilityRoleDescription, NSAccessibilityRoleDescriptionForUIElement, + NSAccessibilitySetMayContainProtectedContent, NSAccessibilityUnignoredAncestor, + NSAccessibilityUnignoredChildren, NSAccessibilityUnignoredChildrenForOnlyChild, + NSAccessibilityUnignoredDescendant, + NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification, +}; pub use self::__NSAccessibilityConstants::{ NSAccessibilityActionName, NSAccessibilityActivationPointAttribute, NSAccessibilityAllowedValuesAttribute, NSAccessibilityAlternateUIVisibleAttribute, @@ -652,12 +660,12 @@ pub use self::__NSAccessibilityConstants::{ NSAccessibilityPicasUnitValue, NSAccessibilityPickAction, NSAccessibilityPlaceholderValueAttribute, NSAccessibilityPointsUnitValue, NSAccessibilityPopUpButtonRole, NSAccessibilityPopoverRole, NSAccessibilityPositionAttribute, - NSAccessibilityPressAction, NSAccessibilityPreviousContentsAttribute, - NSAccessibilityPriorityHigh, NSAccessibilityPriorityKey, NSAccessibilityPriorityLevel, - NSAccessibilityPriorityLow, NSAccessibilityPriorityMedium, - NSAccessibilityProgressIndicatorRole, NSAccessibilityProxyAttribute, - NSAccessibilityRTFForRangeParameterizedAttribute, NSAccessibilityRadioButtonRole, - NSAccessibilityRadioGroupRole, NSAccessibilityRaiseAction, + NSAccessibilityPostNotificationWithUserInfo, NSAccessibilityPressAction, + NSAccessibilityPreviousContentsAttribute, NSAccessibilityPriorityHigh, + NSAccessibilityPriorityKey, NSAccessibilityPriorityLevel, NSAccessibilityPriorityLow, + NSAccessibilityPriorityMedium, NSAccessibilityProgressIndicatorRole, + NSAccessibilityProxyAttribute, NSAccessibilityRTFForRangeParameterizedAttribute, + NSAccessibilityRadioButtonRole, NSAccessibilityRadioGroupRole, NSAccessibilityRaiseAction, NSAccessibilityRangeForIndexParameterizedAttribute, NSAccessibilityRangeForLineParameterizedAttribute, NSAccessibilityRangeForPositionParameterizedAttribute, NSAccessibilityRatingIndicatorSubrole, @@ -823,10 +831,10 @@ pub use self::__NSApplication::{ NSApplicationDidResignActiveNotification, NSApplicationDidUnhideNotification, NSApplicationDidUpdateNotification, NSApplicationLaunchIsDefaultLaunchKey, NSApplicationLaunchRemoteNotificationKey, NSApplicationLaunchUserNotificationKey, - NSApplicationOcclusionState, NSApplicationOcclusionStateVisible, - NSApplicationPresentationAutoHideDock, NSApplicationPresentationAutoHideMenuBar, - NSApplicationPresentationAutoHideToolbar, NSApplicationPresentationDefault, - NSApplicationPresentationDisableAppleMenu, + NSApplicationLoad, NSApplicationMain, NSApplicationOcclusionState, + NSApplicationOcclusionStateVisible, NSApplicationPresentationAutoHideDock, + NSApplicationPresentationAutoHideMenuBar, NSApplicationPresentationAutoHideToolbar, + NSApplicationPresentationDefault, NSApplicationPresentationDisableAppleMenu, NSApplicationPresentationDisableCursorLocationAssistance, NSApplicationPresentationDisableForceQuit, NSApplicationPresentationDisableHideApplication, NSApplicationPresentationDisableMenuBarTransparency, @@ -841,12 +849,14 @@ pub use self::__NSApplication::{ NSApplicationWillTerminateNotification, NSApplicationWillUnhideNotification, NSApplicationWillUpdateNotification, NSCriticalRequest, NSEventTrackingRunLoopMode, NSInformationalRequest, NSModalPanelRunLoopMode, NSModalResponse, NSModalResponseAbort, - NSModalResponseContinue, NSModalResponseStop, NSModalSession, NSPrintingCancelled, - NSPrintingFailure, NSPrintingReplyLater, NSPrintingSuccess, NSRemoteNotificationType, - NSRemoteNotificationTypeAlert, NSRemoteNotificationTypeBadge, NSRemoteNotificationTypeNone, - NSRemoteNotificationTypeSound, NSRequestUserAttentionType, NSRunAbortedResponse, - NSRunContinuesResponse, NSRunStoppedResponse, NSServiceProviderName, NSServicesMenuRequestor, - NSTerminateCancel, NSTerminateLater, NSTerminateNow, NSUpdateWindowsRunLoopOrdering, + NSModalResponseContinue, NSModalResponseStop, NSModalSession, NSPerformService, + NSPrintingCancelled, NSPrintingFailure, NSPrintingReplyLater, NSPrintingSuccess, + NSRegisterServicesProvider, NSRemoteNotificationType, NSRemoteNotificationTypeAlert, + NSRemoteNotificationTypeBadge, NSRemoteNotificationTypeNone, NSRemoteNotificationTypeSound, + NSRequestUserAttentionType, NSRunAbortedResponse, NSRunContinuesResponse, NSRunStoppedResponse, + NSServiceProviderName, NSServicesMenuRequestor, NSSetShowsServicesMenuItem, + NSShowsServicesMenuItem, NSTerminateCancel, NSTerminateLater, NSTerminateNow, + NSUnregisterServicesProvider, NSUpdateDynamicServices, NSUpdateWindowsRunLoopOrdering, NSWindowListOptions, NSWindowListOrderedFrontToBack, }; pub use self::__NSArrayController::NSArrayController; @@ -982,14 +992,14 @@ pub use self::__NSCell::{ NSContentsCellMask, NSControlSize, NSControlSizeLarge, NSControlSizeMini, NSControlSizeRegular, NSControlSizeSmall, NSControlStateValue, NSControlStateValueMixed, NSControlStateValueOff, NSControlStateValueOn, NSControlTint, NSControlTintDidChangeNotification, NSDefaultControlTint, - NSDoubleType, NSFloatType, NSGraphiteControlTint, NSImageAbove, NSImageBelow, NSImageCellType, - NSImageLeading, NSImageLeft, NSImageOnly, NSImageOverlaps, NSImageRight, - NSImageScaleAxesIndependently, NSImageScaleNone, NSImageScaleProportionallyDown, - NSImageScaleProportionallyUpOrDown, NSImageScaling, NSImageTrailing, NSIntType, - NSMiniControlSize, NSMixedState, NSNoCellMask, NSNoImage, NSNullCellType, NSOffState, - NSOnState, NSPositiveDoubleType, NSPositiveFloatType, NSPositiveIntType, NSPushInCell, - NSPushInCellMask, NSRegularControlSize, NSScaleNone, NSScaleProportionally, NSScaleToFit, - NSSmallControlSize, NSTextCellType, + NSDoubleType, NSDrawNinePartImage, NSDrawThreePartImage, NSFloatType, NSGraphiteControlTint, + NSImageAbove, NSImageBelow, NSImageCellType, NSImageLeading, NSImageLeft, NSImageOnly, + NSImageOverlaps, NSImageRight, NSImageScaleAxesIndependently, NSImageScaleNone, + NSImageScaleProportionallyDown, NSImageScaleProportionallyUpOrDown, NSImageScaling, + NSImageTrailing, NSIntType, NSMiniControlSize, NSMixedState, NSNoCellMask, NSNoImage, + NSNullCellType, NSOffState, NSOnState, NSPositiveDoubleType, NSPositiveFloatType, + NSPositiveIntType, NSPushInCell, NSPushInCellMask, NSRegularControlSize, NSScaleNone, + NSScaleProportionally, NSScaleToFit, NSSmallControlSize, NSTextCellType, }; pub use self::__NSClickGestureRecognizer::NSClickGestureRecognizer; pub use self::__NSClipView::NSClipView; @@ -1247,7 +1257,7 @@ pub use self::__NSEvent::{ pub use self::__NSFilePromiseProvider::{NSFilePromiseProvider, NSFilePromiseProviderDelegate}; pub use self::__NSFilePromiseReceiver::NSFilePromiseReceiver; pub use self::__NSFont::{ - NSAntialiasThresholdChangedNotification, NSControlGlyph, NSFont, + NSAntialiasThresholdChangedNotification, NSControlGlyph, NSConvertGlyphsToPackedGlyphs, NSFont, NSFontAntialiasedIntegerAdvancementsRenderingMode, NSFontAntialiasedRenderingMode, NSFontDefaultRenderingMode, NSFontIdentityMatrix, NSFontIntegerAdvancementsRenderingMode, NSFontRenderingMode, NSFontSetChangedNotification, NSGlyph, NSMultibyteGlyphPacking, @@ -1348,13 +1358,15 @@ pub use self::__NSGradient::{ }; pub use self::__NSGraphics::{ NSAnimationEffect, NSAnimationEffectDisappearingItemDefault, NSAnimationEffectPoof, - NSBackingStoreBuffered, NSBackingStoreNonretained, NSBackingStoreRetained, NSBackingStoreType, - NSBlack, NSCalibratedBlackColorSpace, NSCalibratedRGBColorSpace, NSCalibratedWhiteColorSpace, - NSColorRenderingIntent, NSColorRenderingIntentAbsoluteColorimetric, - NSColorRenderingIntentDefault, NSColorRenderingIntentPerceptual, - NSColorRenderingIntentRelativeColorimetric, NSColorRenderingIntentSaturation, NSColorSpaceName, - NSCompositeClear, NSCompositeColor, NSCompositeColorBurn, NSCompositeColorDodge, - NSCompositeCopy, NSCompositeDarken, NSCompositeDestinationAtop, NSCompositeDestinationIn, + NSAvailableWindowDepths, NSBackingStoreBuffered, NSBackingStoreNonretained, + NSBackingStoreRetained, NSBackingStoreType, NSBeep, NSBestDepth, NSBitsPerPixelFromDepth, + NSBitsPerSampleFromDepth, NSBlack, NSCalibratedBlackColorSpace, NSCalibratedRGBColorSpace, + NSCalibratedWhiteColorSpace, NSColorRenderingIntent, + NSColorRenderingIntentAbsoluteColorimetric, NSColorRenderingIntentDefault, + NSColorRenderingIntentPerceptual, NSColorRenderingIntentRelativeColorimetric, + NSColorRenderingIntentSaturation, NSColorSpaceFromDepth, NSColorSpaceName, NSCompositeClear, + NSCompositeColor, NSCompositeColorBurn, NSCompositeColorDodge, NSCompositeCopy, + NSCompositeDarken, NSCompositeDestinationAtop, NSCompositeDestinationIn, NSCompositeDestinationOut, NSCompositeDestinationOver, NSCompositeDifference, NSCompositeExclusion, NSCompositeHardLight, NSCompositeHighlight, NSCompositeHue, NSCompositeLighten, NSCompositeLuminosity, NSCompositeMultiply, NSCompositeOverlay, @@ -1373,15 +1385,25 @@ pub use self::__NSGraphics::{ NSCompositingOperationSaturation, NSCompositingOperationScreen, NSCompositingOperationSoftLight, NSCompositingOperationSourceAtop, NSCompositingOperationSourceIn, NSCompositingOperationSourceOut, - NSCompositingOperationSourceOver, NSCompositingOperationXOR, NSCustomColorSpace, NSDarkGray, - NSDeviceBitsPerSample, NSDeviceBlackColorSpace, NSDeviceCMYKColorSpace, NSDeviceColorSpaceName, + NSCompositingOperationSourceOver, NSCompositingOperationXOR, NSCopyBits, NSCountWindows, + NSCountWindowsForContext, NSCustomColorSpace, NSDarkGray, NSDeviceBitsPerSample, + NSDeviceBlackColorSpace, NSDeviceCMYKColorSpace, NSDeviceColorSpaceName, NSDeviceDescriptionKey, NSDeviceIsPrinter, NSDeviceIsScreen, NSDeviceRGBColorSpace, - NSDeviceResolution, NSDeviceSize, NSDeviceWhiteColorSpace, NSDisplayGamut, NSDisplayGamutP3, - NSDisplayGamutSRGB, NSFocusRingAbove, NSFocusRingBelow, NSFocusRingOnly, NSFocusRingPlacement, - NSFocusRingType, NSFocusRingTypeDefault, NSFocusRingTypeExterior, NSFocusRingTypeNone, - NSLightGray, NSNamedColorSpace, NSPatternColorSpace, NSWhite, NSWindowAbove, NSWindowBelow, - NSWindowDepth, NSWindowDepthOnehundredtwentyeightBitRGB, NSWindowDepthSixtyfourBitRGB, - NSWindowDepthTwentyfourBitRGB, NSWindowOrderingMode, NSWindowOut, + NSDeviceResolution, NSDeviceSize, NSDeviceWhiteColorSpace, NSDisableScreenUpdates, + NSDisplayGamut, NSDisplayGamutP3, NSDisplayGamutSRGB, NSDottedFrameRect, NSDrawBitmap, + NSDrawButton, NSDrawColorTiledRects, NSDrawDarkBezel, NSDrawGrayBezel, NSDrawGroove, + NSDrawLightBezel, NSDrawTiledRects, NSDrawWhiteBezel, NSDrawWindowBackground, + NSEnableScreenUpdates, NSEraseRect, NSFocusRingAbove, NSFocusRingBelow, NSFocusRingOnly, + NSFocusRingPlacement, NSFocusRingType, NSFocusRingTypeDefault, NSFocusRingTypeExterior, + NSFocusRingTypeNone, NSFrameRect, NSFrameRectWithWidth, NSFrameRectWithWidthUsingOperation, + NSGetWindowServerMemory, NSHighlightRect, NSLightGray, NSNamedColorSpace, + NSNumberOfColorComponents, NSPatternColorSpace, NSPlanarFromDepth, NSReadPixel, NSRectClip, + NSRectClipList, NSRectFill, NSRectFillList, NSRectFillListUsingOperation, + NSRectFillListWithColors, NSRectFillListWithColorsUsingOperation, NSRectFillListWithGrays, + NSRectFillUsingOperation, NSSetFocusRingStyle, NSShowAnimationEffect, NSWhite, NSWindowAbove, + NSWindowBelow, NSWindowDepth, NSWindowDepthOnehundredtwentyeightBitRGB, + NSWindowDepthSixtyfourBitRGB, NSWindowDepthTwentyfourBitRGB, NSWindowList, + NSWindowListForContext, NSWindowOrderingMode, NSWindowOut, }; pub use self::__NSGraphicsContext::{ NSGraphicsContext, NSGraphicsContextAttributeKey, NSGraphicsContextDestinationAttributeName, @@ -1494,8 +1516,8 @@ pub use self::__NSImageView::NSImageView; pub use self::__NSInputManager::{NSInputManager, NSTextInput}; pub use self::__NSInputServer::{NSInputServer, NSInputServerMouseTracker, NSInputServiceProvider}; pub use self::__NSInterfaceStyle::{ - NSInterfaceStyle, NSInterfaceStyleDefault, NSMacintoshInterfaceStyle, NSNextStepInterfaceStyle, - NSNoInterfaceStyle, NSWindows95InterfaceStyle, + NSInterfaceStyle, NSInterfaceStyleDefault, NSInterfaceStyleForKey, NSMacintoshInterfaceStyle, + NSNextStepInterfaceStyle, NSNoInterfaceStyle, NSWindows95InterfaceStyle, }; pub use self::__NSItemProvider::{ NSTypeIdentifierAddressText, NSTypeIdentifierDateText, NSTypeIdentifierPhoneNumberText, @@ -1522,11 +1544,11 @@ pub use self::__NSKeyValueBinding::{ NSHandlesContentAsCompoundValueBindingOption, NSHeaderTitleBinding, NSHiddenBinding, NSImageBinding, NSIncludedKeysBinding, NSInitialKeyBinding, NSInitialValueBinding, NSInsertsNullPlaceholderBindingOption, NSInvokesSeparatelyWithArrayObjectsBindingOption, - NSIsIndeterminateBinding, NSLabelBinding, NSLocalizedKeyDictionaryBinding, - NSManagedObjectContextBinding, NSMaxValueBinding, NSMaxWidthBinding, NSMaximumRecentsBinding, - NSMinValueBinding, NSMinWidthBinding, NSMixedStateImageBinding, NSMultipleValuesMarker, - NSMultipleValuesPlaceholderBindingOption, NSNoSelectionMarker, - NSNoSelectionPlaceholderBindingOption, NSNotApplicableMarker, + NSIsControllerMarker, NSIsIndeterminateBinding, NSLabelBinding, + NSLocalizedKeyDictionaryBinding, NSManagedObjectContextBinding, NSMaxValueBinding, + NSMaxWidthBinding, NSMaximumRecentsBinding, NSMinValueBinding, NSMinWidthBinding, + NSMixedStateImageBinding, NSMultipleValuesMarker, NSMultipleValuesPlaceholderBindingOption, + NSNoSelectionMarker, NSNoSelectionPlaceholderBindingOption, NSNotApplicableMarker, NSNotApplicablePlaceholderBindingOption, NSNullPlaceholderBindingOption, NSObservedKeyPathKey, NSObservedObjectKey, NSOffStateImageBinding, NSOnStateImageBinding, NSOptionsKey, NSPositioningRectBinding, NSPredicateBinding, NSPredicateFormatBindingOption, @@ -1629,20 +1651,20 @@ pub use self::__NSOpenGL::{ NSOpenGLContextParameterSurfaceSurfaceVolatile, NSOpenGLContextParameterSwapInterval, NSOpenGLContextParameterSwapRectangle, NSOpenGLContextParameterSwapRectangleEnable, NSOpenGLGOClearFormatCache, NSOpenGLGOFormatCacheSize, NSOpenGLGOResetLibrary, - NSOpenGLGORetainRenderers, NSOpenGLGOUseBuildCache, NSOpenGLGlobalOption, - NSOpenGLPFAAccelerated, NSOpenGLPFAAcceleratedCompute, NSOpenGLPFAAccumSize, - NSOpenGLPFAAllRenderers, NSOpenGLPFAAllowOfflineRenderers, NSOpenGLPFAAlphaSize, - NSOpenGLPFAAuxBuffers, NSOpenGLPFAAuxDepthStencil, NSOpenGLPFABackingStore, - NSOpenGLPFAClosestPolicy, NSOpenGLPFAColorFloat, NSOpenGLPFAColorSize, NSOpenGLPFACompliant, - NSOpenGLPFADepthSize, NSOpenGLPFADoubleBuffer, NSOpenGLPFAFullScreen, NSOpenGLPFAMPSafe, - NSOpenGLPFAMaximumPolicy, NSOpenGLPFAMinimumPolicy, NSOpenGLPFAMultiScreen, + NSOpenGLGORetainRenderers, NSOpenGLGOUseBuildCache, NSOpenGLGetOption, NSOpenGLGetVersion, + NSOpenGLGlobalOption, NSOpenGLPFAAccelerated, NSOpenGLPFAAcceleratedCompute, + NSOpenGLPFAAccumSize, NSOpenGLPFAAllRenderers, NSOpenGLPFAAllowOfflineRenderers, + NSOpenGLPFAAlphaSize, NSOpenGLPFAAuxBuffers, NSOpenGLPFAAuxDepthStencil, + NSOpenGLPFABackingStore, NSOpenGLPFAClosestPolicy, NSOpenGLPFAColorFloat, NSOpenGLPFAColorSize, + NSOpenGLPFACompliant, NSOpenGLPFADepthSize, NSOpenGLPFADoubleBuffer, NSOpenGLPFAFullScreen, + NSOpenGLPFAMPSafe, NSOpenGLPFAMaximumPolicy, NSOpenGLPFAMinimumPolicy, NSOpenGLPFAMultiScreen, NSOpenGLPFAMultisample, NSOpenGLPFANoRecovery, NSOpenGLPFAOffScreen, NSOpenGLPFAOpenGLProfile, NSOpenGLPFAPixelBuffer, NSOpenGLPFARemotePixelBuffer, NSOpenGLPFARendererID, NSOpenGLPFARobust, NSOpenGLPFASampleAlpha, NSOpenGLPFASampleBuffers, NSOpenGLPFASamples, NSOpenGLPFAScreenMask, NSOpenGLPFASingleRenderer, NSOpenGLPFAStencilSize, NSOpenGLPFAStereo, NSOpenGLPFASupersample, NSOpenGLPFATripleBuffer, NSOpenGLPFAVirtualScreenCount, NSOpenGLPFAWindow, NSOpenGLPixelBuffer, NSOpenGLPixelFormat, NSOpenGLPixelFormatAttribute, NSOpenGLProfileVersion3_2Core, - NSOpenGLProfileVersion4_1Core, NSOpenGLProfileVersionLegacy, + NSOpenGLProfileVersion4_1Core, NSOpenGLProfileVersionLegacy, NSOpenGLSetOption, }; pub use self::__NSOpenGLLayer::NSOpenGLLayer; pub use self::__NSOpenGLView::NSOpenGLView; @@ -1672,7 +1694,7 @@ pub use self::__NSPageLayout::NSPageLayout; pub use self::__NSPanGestureRecognizer::NSPanGestureRecognizer; pub use self::__NSPanel::{ NSAlertAlternateReturn, NSAlertDefaultReturn, NSAlertErrorReturn, NSAlertOtherReturn, - NSCancelButton, NSOKButton, NSPanel, + NSCancelButton, NSOKButton, NSPanel, NSReleaseAlertPanel, }; pub use self::__NSParagraphStyle::{ NSCenterTabStopType, NSDecimalTabStopType, NSLeftTabStopType, NSLineBreakByCharWrapping, @@ -1683,8 +1705,9 @@ pub use self::__NSParagraphStyle::{ NSTabColumnTerminatorsAttributeName, NSTextTab, NSTextTabOptionKey, NSTextTabType, }; pub use self::__NSPasteboard::{ - NSColorPboardType, NSDragPboard, NSFileContentsPboardType, NSFilenamesPboardType, - NSFilesPromisePboardType, NSFindPboard, NSFontPboard, NSFontPboardType, NSGeneralPboard, + NSColorPboardType, NSCreateFileContentsPboardType, NSCreateFilenamePboardType, NSDragPboard, + NSFileContentsPboardType, NSFilenamesPboardType, NSFilesPromisePboardType, NSFindPboard, + NSFontPboard, NSFontPboardType, NSGeneralPboard, NSGetFileType, NSGetFileTypes, NSHTMLPboardType, NSInkTextPboardType, NSMultipleTextSelectionPboardType, NSPDFPboardType, NSPICTPboardType, NSPasteboard, NSPasteboardContentsCurrentHostOnly, NSPasteboardContentsOptions, NSPasteboardName, NSPasteboardNameDrag, NSPasteboardNameFind, diff --git a/crates/icrate/src/generated/Foundation/NSByteOrder.rs b/crates/icrate/src/generated/Foundation/NSByteOrder.rs index d7d52474e..c0f5ecf18 100644 --- a/crates/icrate/src/generated/Foundation/NSByteOrder.rs +++ b/crates/icrate/src/generated/Foundation/NSByteOrder.rs @@ -9,6 +9,132 @@ extern_enum!( } ); +inline_fn!( + pub unsafe fn NSHostByteOrder() -> c_long { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapShort(inv: c_ushort) -> c_ushort { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapInt(inv: c_uint) -> c_uint { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapLong(inv: c_ulong) -> c_ulong { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapLongLong(inv: c_ulonglong) -> c_ulonglong { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapBigShortToHost(x: c_ushort) -> c_ushort { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapBigIntToHost(x: c_uint) -> c_uint { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapBigLongToHost(x: c_ulong) -> c_ulong { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapBigLongLongToHost(x: c_ulonglong) -> c_ulonglong { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostShortToBig(x: c_ushort) -> c_ushort { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostIntToBig(x: c_uint) -> c_uint { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostLongToBig(x: c_ulong) -> c_ulong { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostLongLongToBig(x: c_ulonglong) -> c_ulonglong { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapLittleShortToHost(x: c_ushort) -> c_ushort { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapLittleIntToHost(x: c_uint) -> c_uint { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapLittleLongToHost(x: c_ulong) -> c_ulong { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapLittleLongLongToHost(x: c_ulonglong) -> c_ulonglong { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostShortToLittle(x: c_ushort) -> c_ushort { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostIntToLittle(x: c_uint) -> c_uint { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostLongToLittle(x: c_ulong) -> c_ulong { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostLongLongToLittle(x: c_ulonglong) -> c_ulonglong { + todo!() + } +); + extern_struct!( pub struct NSSwappedFloat { pub v: c_uint, @@ -20,3 +146,87 @@ extern_struct!( pub v: c_ulonglong, } ); + +inline_fn!( + pub unsafe fn NSConvertHostFloatToSwapped(x: c_float) -> NSSwappedFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSConvertSwappedFloatToHost(x: NSSwappedFloat) -> c_float { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSConvertHostDoubleToSwapped(x: c_double) -> NSSwappedDouble { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSConvertSwappedDoubleToHost(x: NSSwappedDouble) -> c_double { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapFloat(x: NSSwappedFloat) -> NSSwappedFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapDouble(x: NSSwappedDouble) -> NSSwappedDouble { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapBigDoubleToHost(x: NSSwappedDouble) -> c_double { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapBigFloatToHost(x: NSSwappedFloat) -> c_float { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostDoubleToBig(x: c_double) -> NSSwappedDouble { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostFloatToBig(x: c_float) -> NSSwappedFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapLittleDoubleToHost(x: NSSwappedDouble) -> c_double { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapLittleFloatToHost(x: NSSwappedFloat) -> c_float { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostDoubleToLittle(x: c_double) -> NSSwappedDouble { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSwapHostFloatToLittle(x: c_float) -> NSSwappedFloat { + todo!() + } +); diff --git a/crates/icrate/src/generated/Foundation/NSCoder.rs b/crates/icrate/src/generated/Foundation/NSCoder.rs index 16c441141..2ef8cff65 100644 --- a/crates/icrate/src/generated/Foundation/NSCoder.rs +++ b/crates/icrate/src/generated/Foundation/NSCoder.rs @@ -275,6 +275,10 @@ extern_methods!( } ); +extern_fn!( + pub unsafe fn NXReadNSObjectFromCoder(decoder: &NSCoder) -> *mut NSObject; +); + extern_methods!( /// NSTypedstreamCompatibility unsafe impl NSCoder { diff --git a/crates/icrate/src/generated/Foundation/NSDecimal.rs b/crates/icrate/src/generated/Foundation/NSDecimal.rs index b3df4a76d..9c1b9ae88 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimal.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimal.rs @@ -23,3 +23,102 @@ ns_enum!( NSCalculationDivideByZero = 4, } ); + +inline_fn!( + pub unsafe fn NSDecimalIsNotANumber(dcm: NonNull) -> Bool { + todo!() + } +); + +extern_fn!( + pub unsafe fn NSDecimalCopy(destination: NonNull, source: NonNull); +); + +extern_fn!( + pub unsafe fn NSDecimalCompact(number: NonNull); +); + +extern_fn!( + pub unsafe fn NSDecimalCompare( + leftOperand: NonNull, + rightOperand: NonNull, + ) -> NSComparisonResult; +); + +extern_fn!( + pub unsafe fn NSDecimalRound( + result: NonNull, + number: NonNull, + scale: NSInteger, + roundingMode: NSRoundingMode, + ); +); + +extern_fn!( + pub unsafe fn NSDecimalNormalize( + number1: NonNull, + number2: NonNull, + roundingMode: NSRoundingMode, + ) -> NSCalculationError; +); + +extern_fn!( + pub unsafe fn NSDecimalAdd( + result: NonNull, + leftOperand: NonNull, + rightOperand: NonNull, + roundingMode: NSRoundingMode, + ) -> NSCalculationError; +); + +extern_fn!( + pub unsafe fn NSDecimalSubtract( + result: NonNull, + leftOperand: NonNull, + rightOperand: NonNull, + roundingMode: NSRoundingMode, + ) -> NSCalculationError; +); + +extern_fn!( + pub unsafe fn NSDecimalMultiply( + result: NonNull, + leftOperand: NonNull, + rightOperand: NonNull, + roundingMode: NSRoundingMode, + ) -> NSCalculationError; +); + +extern_fn!( + pub unsafe fn NSDecimalDivide( + result: NonNull, + leftOperand: NonNull, + rightOperand: NonNull, + roundingMode: NSRoundingMode, + ) -> NSCalculationError; +); + +extern_fn!( + pub unsafe fn NSDecimalPower( + result: NonNull, + number: NonNull, + power: NSUInteger, + roundingMode: NSRoundingMode, + ) -> NSCalculationError; +); + +extern_fn!( + pub unsafe fn NSDecimalMultiplyByPowerOf10( + result: NonNull, + number: NonNull, + power: c_short, + roundingMode: NSRoundingMode, + ) -> NSCalculationError; +); + +extern_fn!( + pub unsafe fn NSDecimalString( + dcm: NonNull, + locale: Option<&Object>, + ) -> NonNull; +); diff --git a/crates/icrate/src/generated/Foundation/NSException.rs b/crates/icrate/src/generated/Foundation/NSException.rs index e41ed226c..cc61104b3 100644 --- a/crates/icrate/src/generated/Foundation/NSException.rs +++ b/crates/icrate/src/generated/Foundation/NSException.rs @@ -86,6 +86,14 @@ extern_methods!( pub type NSUncaughtExceptionHandler = TodoFunction; +extern_fn!( + pub unsafe fn NSGetUncaughtExceptionHandler() -> *mut NSUncaughtExceptionHandler; +); + +extern_fn!( + pub unsafe fn NSSetUncaughtExceptionHandler(_: *mut NSUncaughtExceptionHandler); +); + extern_static!(NSAssertionHandlerKey: &'static NSString); extern_class!( diff --git a/crates/icrate/src/generated/Foundation/NSGeometry.rs b/crates/icrate/src/generated/Foundation/NSGeometry.rs index 5063ce905..0e6aa2048 100644 --- a/crates/icrate/src/generated/Foundation/NSGeometry.rs +++ b/crates/icrate/src/generated/Foundation/NSGeometry.rs @@ -83,6 +83,213 @@ extern_static!(NSZeroRect: NSRect); extern_static!(NSEdgeInsetsZero: NSEdgeInsets); +inline_fn!( + pub unsafe fn NSMakePoint(x: CGFloat, y: CGFloat) -> NSPoint { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSMakeSize(w: CGFloat, h: CGFloat) -> NSSize { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSMakeRect(x: CGFloat, y: CGFloat, w: CGFloat, h: CGFloat) -> NSRect { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSMaxX(aRect: NSRect) -> CGFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSMaxY(aRect: NSRect) -> CGFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSMidX(aRect: NSRect) -> CGFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSMidY(aRect: NSRect) -> CGFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSMinX(aRect: NSRect) -> CGFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSMinY(aRect: NSRect) -> CGFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSWidth(aRect: NSRect) -> CGFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSHeight(aRect: NSRect) -> CGFloat { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSRectFromCGRect(cgrect: CGRect) -> NSRect { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSRectToCGRect(nsrect: NSRect) -> CGRect { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSPointFromCGPoint(cgpoint: CGPoint) -> NSPoint { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSPointToCGPoint(nspoint: NSPoint) -> CGPoint { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSizeFromCGSize(cgsize: CGSize) -> NSSize { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSSizeToCGSize(nssize: NSSize) -> CGSize { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSEdgeInsetsMake( + top: CGFloat, + left: CGFloat, + bottom: CGFloat, + right: CGFloat, + ) -> NSEdgeInsets { + todo!() + } +); + +extern_fn!( + pub unsafe fn NSEqualPoints(aPoint: NSPoint, bPoint: NSPoint) -> Bool; +); + +extern_fn!( + pub unsafe fn NSEqualSizes(aSize: NSSize, bSize: NSSize) -> Bool; +); + +extern_fn!( + pub unsafe fn NSEqualRects(aRect: NSRect, bRect: NSRect) -> Bool; +); + +extern_fn!( + pub unsafe fn NSIsEmptyRect(aRect: NSRect) -> Bool; +); + +extern_fn!( + pub unsafe fn NSEdgeInsetsEqual(aInsets: NSEdgeInsets, bInsets: NSEdgeInsets) -> Bool; +); + +extern_fn!( + pub unsafe fn NSInsetRect(aRect: NSRect, dX: CGFloat, dY: CGFloat) -> NSRect; +); + +extern_fn!( + pub unsafe fn NSIntegralRect(aRect: NSRect) -> NSRect; +); + +extern_fn!( + pub unsafe fn NSIntegralRectWithOptions(aRect: NSRect, opts: NSAlignmentOptions) -> NSRect; +); + +extern_fn!( + pub unsafe fn NSUnionRect(aRect: NSRect, bRect: NSRect) -> NSRect; +); + +extern_fn!( + pub unsafe fn NSIntersectionRect(aRect: NSRect, bRect: NSRect) -> NSRect; +); + +extern_fn!( + pub unsafe fn NSOffsetRect(aRect: NSRect, dX: CGFloat, dY: CGFloat) -> NSRect; +); + +extern_fn!( + pub unsafe fn NSDivideRect( + inRect: NSRect, + slice: NonNull, + rem: NonNull, + amount: CGFloat, + edge: NSRectEdge, + ); +); + +extern_fn!( + pub unsafe fn NSPointInRect(aPoint: NSPoint, aRect: NSRect) -> Bool; +); + +extern_fn!( + pub unsafe fn NSMouseInRect(aPoint: NSPoint, aRect: NSRect, flipped: Bool) -> Bool; +); + +extern_fn!( + pub unsafe fn NSContainsRect(aRect: NSRect, bRect: NSRect) -> Bool; +); + +extern_fn!( + pub unsafe fn NSIntersectsRect(aRect: NSRect, bRect: NSRect) -> Bool; +); + +extern_fn!( + pub unsafe fn NSStringFromPoint(aPoint: NSPoint) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSStringFromSize(aSize: NSSize) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSStringFromRect(aRect: NSRect) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSPointFromString(aString: &NSString) -> NSPoint; +); + +extern_fn!( + pub unsafe fn NSSizeFromString(aString: &NSString) -> NSSize; +); + +extern_fn!( + pub unsafe fn NSRectFromString(aString: &NSString) -> NSRect; +); + extern_methods!( /// NSValueGeometryExtensions unsafe impl NSValue { diff --git a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs index bbc1e79ac..2bf576628 100644 --- a/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs +++ b/crates/icrate/src/generated/Foundation/NSHFSFileTypes.rs @@ -2,3 +2,15 @@ //! DO NOT EDIT use crate::common::*; use crate::Foundation::*; + +extern_fn!( + pub unsafe fn NSFileTypeForHFSTypeCode(hfsFileTypeCode: OSType) -> *mut NSString; +); + +extern_fn!( + pub unsafe fn NSHFSTypeCodeFromFileType(fileTypeString: Option<&NSString>) -> OSType; +); + +extern_fn!( + pub unsafe fn NSHFSTypeOfFile(fullFilePath: Option<&NSString>) -> *mut NSString; +); diff --git a/crates/icrate/src/generated/Foundation/NSHashTable.rs b/crates/icrate/src/generated/Foundation/NSHashTable.rs index 90a4ce07c..e47065a63 100644 --- a/crates/icrate/src/generated/Foundation/NSHashTable.rs +++ b/crates/icrate/src/generated/Foundation/NSHashTable.rs @@ -119,6 +119,69 @@ extern_struct!( } ); +extern_fn!( + pub unsafe fn NSFreeHashTable(table: &NSHashTable); +); + +extern_fn!( + pub unsafe fn NSResetHashTable(table: &NSHashTable); +); + +extern_fn!( + pub unsafe fn NSCompareHashTables(table1: &NSHashTable, table2: &NSHashTable) -> Bool; +); + +extern_fn!( + pub unsafe fn NSCopyHashTableWithZone( + table: &NSHashTable, + zone: *mut NSZone, + ) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSHashGet(table: &NSHashTable, pointer: *mut c_void) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSHashInsert(table: &NSHashTable, pointer: *mut c_void); +); + +extern_fn!( + pub unsafe fn NSHashInsertKnownAbsent(table: &NSHashTable, pointer: *mut c_void); +); + +extern_fn!( + pub unsafe fn NSHashInsertIfAbsent(table: &NSHashTable, pointer: *mut c_void) -> *mut c_void; +); + +extern_fn!( + pub unsafe fn NSHashRemove(table: &NSHashTable, pointer: *mut c_void); +); + +extern_fn!( + pub unsafe fn NSEnumerateHashTable(table: &NSHashTable) -> NSHashEnumerator; +); + +extern_fn!( + pub unsafe fn NSNextHashEnumeratorItem(enumerator: NonNull) -> *mut c_void; +); + +extern_fn!( + pub unsafe fn NSEndHashTableEnumeration(enumerator: NonNull); +); + +extern_fn!( + pub unsafe fn NSCountHashTable(table: &NSHashTable) -> NSUInteger; +); + +extern_fn!( + pub unsafe fn NSStringFromHashTable(table: &NSHashTable) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSAllHashTableObjects(table: &NSHashTable) -> NonNull; +); + extern_struct!( pub struct NSHashTableCallBacks { pub hash: Option, NonNull) -> NSUInteger>, @@ -132,6 +195,21 @@ extern_struct!( } ); +extern_fn!( + pub unsafe fn NSCreateHashTableWithZone( + callBacks: NSHashTableCallBacks, + capacity: NSUInteger, + zone: *mut NSZone, + ) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSCreateHashTable( + callBacks: NSHashTableCallBacks, + capacity: NSUInteger, + ) -> NonNull; +); + extern_static!(NSIntegerHashCallBacks: NSHashTableCallBacks); extern_static!(NSNonOwnedPointerHashCallBacks: NSHashTableCallBacks); diff --git a/crates/icrate/src/generated/Foundation/NSMapTable.rs b/crates/icrate/src/generated/Foundation/NSMapTable.rs index 621828bd7..a8c502857 100644 --- a/crates/icrate/src/generated/Foundation/NSMapTable.rs +++ b/crates/icrate/src/generated/Foundation/NSMapTable.rs @@ -127,6 +127,90 @@ extern_struct!( } ); +extern_fn!( + pub unsafe fn NSFreeMapTable(table: &NSMapTable); +); + +extern_fn!( + pub unsafe fn NSResetMapTable(table: &NSMapTable); +); + +extern_fn!( + pub unsafe fn NSCompareMapTables(table1: &NSMapTable, table2: &NSMapTable) -> Bool; +); + +extern_fn!( + pub unsafe fn NSCopyMapTableWithZone( + table: &NSMapTable, + zone: *mut NSZone, + ) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSMapMember( + table: &NSMapTable, + key: NonNull, + originalKey: *mut *mut c_void, + value: *mut *mut c_void, + ) -> Bool; +); + +extern_fn!( + pub unsafe fn NSMapGet(table: &NSMapTable, key: *mut c_void) -> *mut c_void; +); + +extern_fn!( + pub unsafe fn NSMapInsert(table: &NSMapTable, key: *mut c_void, value: *mut c_void); +); + +extern_fn!( + pub unsafe fn NSMapInsertKnownAbsent(table: &NSMapTable, key: *mut c_void, value: *mut c_void); +); + +extern_fn!( + pub unsafe fn NSMapInsertIfAbsent( + table: &NSMapTable, + key: *mut c_void, + value: *mut c_void, + ) -> *mut c_void; +); + +extern_fn!( + pub unsafe fn NSMapRemove(table: &NSMapTable, key: *mut c_void); +); + +extern_fn!( + pub unsafe fn NSEnumerateMapTable(table: &NSMapTable) -> NSMapEnumerator; +); + +extern_fn!( + pub unsafe fn NSNextMapEnumeratorPair( + enumerator: NonNull, + key: *mut *mut c_void, + value: *mut *mut c_void, + ) -> Bool; +); + +extern_fn!( + pub unsafe fn NSEndMapTableEnumeration(enumerator: NonNull); +); + +extern_fn!( + pub unsafe fn NSCountMapTable(table: &NSMapTable) -> NSUInteger; +); + +extern_fn!( + pub unsafe fn NSStringFromMapTable(table: &NSMapTable) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSAllMapTableKeys(table: &NSMapTable) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSAllMapTableValues(table: &NSMapTable) -> NonNull; +); + extern_struct!( pub struct NSMapTableKeyCallBacks { pub hash: Option, NonNull) -> NSUInteger>, @@ -150,6 +234,23 @@ extern_struct!( } ); +extern_fn!( + pub unsafe fn NSCreateMapTableWithZone( + keyCallBacks: NSMapTableKeyCallBacks, + valueCallBacks: NSMapTableValueCallBacks, + capacity: NSUInteger, + zone: *mut NSZone, + ) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSCreateMapTable( + keyCallBacks: NSMapTableKeyCallBacks, + valueCallBacks: NSMapTableValueCallBacks, + capacity: NSUInteger, + ) -> NonNull; +); + extern_static!(NSIntegerMapKeyCallBacks: NSMapTableKeyCallBacks); extern_static!(NSNonOwnedPointerMapKeyCallBacks: NSMapTableKeyCallBacks); diff --git a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs index 1549bcae3..4a235cac6 100644 --- a/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs +++ b/crates/icrate/src/generated/Foundation/NSObjCRuntime.rs @@ -9,6 +9,38 @@ pub type NSExceptionName = NSString; pub type NSRunLoopMode = NSString; +extern_fn!( + pub unsafe fn NSStringFromSelector(aSelector: Sel) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSSelectorFromString(aSelectorName: &NSString) -> Sel; +); + +extern_fn!( + pub unsafe fn NSStringFromClass(aClass: &Class) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSClassFromString(aClassName: &NSString) -> *const Class; +); + +extern_fn!( + pub unsafe fn NSStringFromProtocol(proto: &Protocol) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSProtocolFromString(namestr: &NSString) -> *mut Protocol; +); + +extern_fn!( + pub unsafe fn NSGetSizeAndAlignment( + typePtr: NonNull, + sizep: *mut NSUInteger, + alignp: *mut NSUInteger, + ) -> NonNull; +); + ns_closed_enum!( #[underlying(NSInteger)] pub enum NSComparisonResult { diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index 1ce8be2b4..0b76f1ae4 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -48,3 +48,51 @@ extern_methods!( pub unsafe fn autoContentAccessingProxy(&self) -> Id; } ); + +extern_fn!( + pub unsafe fn NSAllocateObject( + aClass: &Class, + extraBytes: NSUInteger, + zone: *mut NSZone, + ) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSDeallocateObject(object: &Object); +); + +extern_fn!( + pub unsafe fn NSCopyObject( + object: &Object, + extraBytes: NSUInteger, + zone: *mut NSZone, + ) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSShouldRetainWithZone(anObject: &Object, requestedZone: *mut NSZone) -> Bool; +); + +extern_fn!( + pub unsafe fn NSIncrementExtraRefCount(object: &Object); +); + +extern_fn!( + pub unsafe fn NSDecrementExtraRefCountWasZero(object: &Object) -> Bool; +); + +extern_fn!( + pub unsafe fn NSExtraRefCount(object: &Object) -> NSUInteger; +); + +inline_fn!( + pub unsafe fn CFBridgingRetain(X: Option<&Object>) -> CFTypeRef { + todo!() + } +); + +inline_fn!( + pub unsafe fn CFBridgingRelease(X: CFTypeRef) -> *mut Object { + todo!() + } +); diff --git a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs index cb81845f0..909bd0bf4 100644 --- a/crates/icrate/src/generated/Foundation/NSPathUtilities.rs +++ b/crates/icrate/src/generated/Foundation/NSPathUtilities.rs @@ -86,6 +86,30 @@ extern_methods!( } ); +extern_fn!( + pub unsafe fn NSUserName() -> NonNull; +); + +extern_fn!( + pub unsafe fn NSFullUserName() -> NonNull; +); + +extern_fn!( + pub unsafe fn NSHomeDirectory() -> NonNull; +); + +extern_fn!( + pub unsafe fn NSHomeDirectoryForUser(userName: Option<&NSString>) -> *mut NSString; +); + +extern_fn!( + pub unsafe fn NSTemporaryDirectory() -> NonNull; +); + +extern_fn!( + pub unsafe fn NSOpenStepRootDirectory() -> NonNull; +); + ns_enum!( #[underlying(NSUInteger)] pub enum NSSearchPathDirectory { @@ -129,3 +153,11 @@ ns_options!( NSAllDomainsMask = 0x0ffff, } ); + +extern_fn!( + pub unsafe fn NSSearchPathForDirectoriesInDomains( + directory: NSSearchPathDirectory, + domainMask: NSSearchPathDomainMask, + expandTilde: Bool, + ) -> NonNull>; +); diff --git a/crates/icrate/src/generated/Foundation/NSRange.rs b/crates/icrate/src/generated/Foundation/NSRange.rs index 64ef7147f..bfc77ba3f 100644 --- a/crates/icrate/src/generated/Foundation/NSRange.rs +++ b/crates/icrate/src/generated/Foundation/NSRange.rs @@ -12,6 +12,46 @@ extern_struct!( pub type NSRangePointer = *mut NSRange; +inline_fn!( + pub unsafe fn NSMakeRange(loc: NSUInteger, len: NSUInteger) -> NSRange { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSMaxRange(range: NSRange) -> NSUInteger { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSLocationInRange(loc: NSUInteger, range: NSRange) -> Bool { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSEqualRanges(range1: NSRange, range2: NSRange) -> Bool { + todo!() + } +); + +extern_fn!( + pub unsafe fn NSUnionRange(range1: NSRange, range2: NSRange) -> NSRange; +); + +extern_fn!( + pub unsafe fn NSIntersectionRange(range1: NSRange, range2: NSRange) -> NSRange; +); + +extern_fn!( + pub unsafe fn NSStringFromRange(range: NSRange) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSRangeFromString(aString: &NSString) -> NSRange; +); + extern_methods!( /// NSValueRangeExtensions unsafe impl NSValue { diff --git a/crates/icrate/src/generated/Foundation/NSZone.rs b/crates/icrate/src/generated/Foundation/NSZone.rs index 25dc3556e..c63eee97f 100644 --- a/crates/icrate/src/generated/Foundation/NSZone.rs +++ b/crates/icrate/src/generated/Foundation/NSZone.rs @@ -3,6 +3,58 @@ use crate::common::*; use crate::Foundation::*; +extern_fn!( + pub unsafe fn NSDefaultMallocZone() -> NonNull; +); + +extern_fn!( + pub unsafe fn NSCreateZone( + startSize: NSUInteger, + granularity: NSUInteger, + canFree: Bool, + ) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSRecycleZone(zone: NonNull); +); + +extern_fn!( + pub unsafe fn NSSetZoneName(zone: *mut NSZone, name: &NSString); +); + +extern_fn!( + pub unsafe fn NSZoneName(zone: *mut NSZone) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSZoneFromPointer(ptr: NonNull) -> *mut NSZone; +); + +extern_fn!( + pub unsafe fn NSZoneMalloc(zone: *mut NSZone, size: NSUInteger) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSZoneCalloc( + zone: *mut NSZone, + numElems: NSUInteger, + byteSize: NSUInteger, + ) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSZoneRealloc( + zone: *mut NSZone, + ptr: *mut c_void, + size: NSUInteger, + ) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSZoneFree(zone: *mut NSZone, ptr: NonNull); +); + ns_enum!( #[underlying(NSUInteger)] pub enum { @@ -10,3 +62,63 @@ ns_enum!( NSCollectorDisabledOption = 1<<1, } ); + +extern_fn!( + pub unsafe fn NSAllocateCollectable(size: NSUInteger, options: NSUInteger) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSReallocateCollectable( + ptr: *mut c_void, + size: NSUInteger, + options: NSUInteger, + ) -> NonNull; +); + +inline_fn!( + pub unsafe fn NSMakeCollectable(cf: CFTypeRef) -> *mut Object { + todo!() + } +); + +inline_fn!( + pub unsafe fn NSMakeCollectable(cf: CFTypeRef) -> *mut Object { + todo!() + } +); + +extern_fn!( + pub unsafe fn NSPageSize() -> NSUInteger; +); + +extern_fn!( + pub unsafe fn NSLogPageSize() -> NSUInteger; +); + +extern_fn!( + pub unsafe fn NSRoundUpToMultipleOfPageSize(bytes: NSUInteger) -> NSUInteger; +); + +extern_fn!( + pub unsafe fn NSRoundDownToMultipleOfPageSize(bytes: NSUInteger) -> NSUInteger; +); + +extern_fn!( + pub unsafe fn NSAllocateMemoryPages(bytes: NSUInteger) -> NonNull; +); + +extern_fn!( + pub unsafe fn NSDeallocateMemoryPages(ptr: NonNull, bytes: NSUInteger); +); + +extern_fn!( + pub unsafe fn NSCopyMemoryPages( + source: NonNull, + dest: NonNull, + bytes: NSUInteger, + ); +); + +extern_fn!( + pub unsafe fn NSRealMemoryAvailable() -> NSUInteger; +); diff --git a/crates/icrate/src/generated/Foundation/mod.rs b/crates/icrate/src/generated/Foundation/mod.rs index b1ea6cda1..983dde972 100644 --- a/crates/icrate/src/generated/Foundation/mod.rs +++ b/crates/icrate/src/generated/Foundation/mod.rs @@ -473,7 +473,7 @@ pub use self::__NSClassDescription::{ }; pub use self::__NSCoder::{ NSCoder, NSDecodingFailurePolicy, NSDecodingFailurePolicyRaiseException, - NSDecodingFailurePolicySetErrorAndReturn, + NSDecodingFailurePolicySetErrorAndReturn, NXReadNSObjectFromCoder, }; pub use self::__NSComparisonPredicate::{ NSAllPredicateModifier, NSAnyPredicateModifier, NSBeginsWithPredicateOperatorType, @@ -539,8 +539,11 @@ pub use self::__NSDateIntervalFormatter::{ }; pub use self::__NSDecimal::{ NSCalculationDivideByZero, NSCalculationError, NSCalculationLossOfPrecision, - NSCalculationNoError, NSCalculationOverflow, NSCalculationUnderflow, NSRoundBankers, - NSRoundDown, NSRoundPlain, NSRoundUp, NSRoundingMode, + NSCalculationNoError, NSCalculationOverflow, NSCalculationUnderflow, NSDecimalAdd, + NSDecimalCompact, NSDecimalCompare, NSDecimalCopy, NSDecimalDivide, NSDecimalMultiply, + NSDecimalMultiplyByPowerOf10, NSDecimalNormalize, NSDecimalPower, NSDecimalRound, + NSDecimalString, NSDecimalSubtract, NSRoundBankers, NSRoundDown, NSRoundPlain, NSRoundUp, + NSRoundingMode, }; pub use self::__NSDecimalNumber::{ NSDecimalNumber, NSDecimalNumberBehaviors, NSDecimalNumberDivideByZeroException, @@ -574,11 +577,12 @@ pub use self::__NSError::{ }; pub use self::__NSException::{ NSAssertionHandler, NSAssertionHandlerKey, NSDestinationInvalidException, NSException, - NSGenericException, NSInconsistentArchiveException, NSInternalInconsistencyException, - NSInvalidArgumentException, NSInvalidReceivePortException, NSInvalidSendPortException, - NSMallocException, NSObjectInaccessibleException, NSObjectNotAvailableException, - NSOldStyleException, NSPortReceiveException, NSPortSendException, NSPortTimeoutException, - NSRangeException, NSUncaughtExceptionHandler, + NSGenericException, NSGetUncaughtExceptionHandler, NSInconsistentArchiveException, + NSInternalInconsistencyException, NSInvalidArgumentException, NSInvalidReceivePortException, + NSInvalidSendPortException, NSMallocException, NSObjectInaccessibleException, + NSObjectNotAvailableException, NSOldStyleException, NSPortReceiveException, + NSPortSendException, NSPortTimeoutException, NSRangeException, NSSetUncaughtExceptionHandler, + NSUncaughtExceptionHandler, }; pub use self::__NSExpression::{ NSAggregateExpressionType, NSAnyKeyExpressionType, NSBlockExpressionType, @@ -660,10 +664,17 @@ pub use self::__NSGeometry::{ NSAlignMaxXOutward, NSAlignMaxYInward, NSAlignMaxYNearest, NSAlignMaxYOutward, NSAlignMinXInward, NSAlignMinXNearest, NSAlignMinXOutward, NSAlignMinYInward, NSAlignMinYNearest, NSAlignMinYOutward, NSAlignRectFlipped, NSAlignWidthInward, - NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSEdgeInsets, NSEdgeInsetsZero, - NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSPoint, NSPointArray, NSPointPointer, NSRect, - NSRectArray, NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, - NSRectPointer, NSSize, NSSizeArray, NSSizePointer, NSZeroPoint, NSZeroRect, NSZeroSize, + NSAlignWidthNearest, NSAlignWidthOutward, NSAlignmentOptions, NSContainsRect, NSDivideRect, + NSEdgeInsets, NSEdgeInsetsEqual, NSEdgeInsetsZero, NSEqualPoints, NSEqualRects, NSEqualSizes, + NSInsetRect, NSIntegralRect, NSIntegralRectWithOptions, NSIntersectionRect, NSIntersectsRect, + NSIsEmptyRect, NSMaxXEdge, NSMaxYEdge, NSMinXEdge, NSMinYEdge, NSMouseInRect, NSOffsetRect, + NSPoint, NSPointArray, NSPointFromString, NSPointInRect, NSPointPointer, NSRect, NSRectArray, + NSRectEdge, NSRectEdgeMaxX, NSRectEdgeMaxY, NSRectEdgeMinX, NSRectEdgeMinY, NSRectFromString, + NSRectPointer, NSSize, NSSizeArray, NSSizeFromString, NSSizePointer, NSStringFromPoint, + NSStringFromRect, NSStringFromSize, NSUnionRect, NSZeroPoint, NSZeroRect, NSZeroSize, +}; +pub use self::__NSHFSFileTypes::{ + NSFileTypeForHFSTypeCode, NSHFSTypeCodeFromFileType, NSHFSTypeOfFile, }; pub use self::__NSHTTPCookie::{ NSHTTPCookie, NSHTTPCookieComment, NSHTTPCookieCommentURL, NSHTTPCookieDiscard, @@ -679,12 +690,16 @@ pub use self::__NSHTTPCookieStorage::{ NSHTTPCookieManagerCookiesChangedNotification, NSHTTPCookieStorage, }; pub use self::__NSHashTable::{ - NSHashEnumerator, NSHashTable, NSHashTableCallBacks, NSHashTableCopyIn, + NSAllHashTableObjects, NSCompareHashTables, NSCopyHashTableWithZone, NSCountHashTable, + NSCreateHashTable, NSCreateHashTableWithZone, NSEndHashTableEnumeration, NSEnumerateHashTable, + NSFreeHashTable, NSHashEnumerator, NSHashGet, NSHashInsert, NSHashInsertIfAbsent, + NSHashInsertKnownAbsent, NSHashRemove, NSHashTable, NSHashTableCallBacks, NSHashTableCopyIn, NSHashTableObjectPointerPersonality, NSHashTableOptions, NSHashTableStrongMemory, NSHashTableWeakMemory, NSHashTableZeroingWeakMemory, NSIntHashCallBacks, - NSIntegerHashCallBacks, NSNonOwnedPointerHashCallBacks, NSNonRetainedObjectHashCallBacks, - NSObjectHashCallBacks, NSOwnedObjectIdentityHashCallBacks, NSOwnedPointerHashCallBacks, - NSPointerToStructHashCallBacks, + NSIntegerHashCallBacks, NSNextHashEnumeratorItem, NSNonOwnedPointerHashCallBacks, + NSNonRetainedObjectHashCallBacks, NSObjectHashCallBacks, NSOwnedObjectIdentityHashCallBacks, + NSOwnedPointerHashCallBacks, NSPointerToStructHashCallBacks, NSResetHashTable, + NSStringFromHashTable, }; pub use self::__NSHost::NSHost; pub use self::__NSISO8601DateFormatter::{ @@ -784,15 +799,18 @@ pub use self::__NSLocale::{ }; pub use self::__NSLock::{NSCondition, NSConditionLock, NSLock, NSLocking, NSRecursiveLock}; pub use self::__NSMapTable::{ - NSIntMapKeyCallBacks, NSIntMapValueCallBacks, NSIntegerMapKeyCallBacks, - NSIntegerMapValueCallBacks, NSMapEnumerator, NSMapTable, NSMapTableCopyIn, - NSMapTableKeyCallBacks, NSMapTableObjectPointerPersonality, NSMapTableOptions, - NSMapTableStrongMemory, NSMapTableValueCallBacks, NSMapTableWeakMemory, - NSMapTableZeroingWeakMemory, NSNonOwnedPointerMapKeyCallBacks, + NSAllMapTableKeys, NSAllMapTableValues, NSCompareMapTables, NSCopyMapTableWithZone, + NSCountMapTable, NSCreateMapTable, NSCreateMapTableWithZone, NSEndMapTableEnumeration, + NSEnumerateMapTable, NSFreeMapTable, NSIntMapKeyCallBacks, NSIntMapValueCallBacks, + NSIntegerMapKeyCallBacks, NSIntegerMapValueCallBacks, NSMapEnumerator, NSMapGet, NSMapInsert, + NSMapInsertIfAbsent, NSMapInsertKnownAbsent, NSMapMember, NSMapRemove, NSMapTable, + NSMapTableCopyIn, NSMapTableKeyCallBacks, NSMapTableObjectPointerPersonality, + NSMapTableOptions, NSMapTableStrongMemory, NSMapTableValueCallBacks, NSMapTableWeakMemory, + NSMapTableZeroingWeakMemory, NSNextMapEnumeratorPair, NSNonOwnedPointerMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, NSNonOwnedPointerOrNullMapKeyCallBacks, NSNonRetainedObjectMapKeyCallBacks, NSNonRetainedObjectMapValueCallBacks, NSObjectMapKeyCallBacks, NSObjectMapValueCallBacks, NSOwnedPointerMapKeyCallBacks, - NSOwnedPointerMapValueCallBacks, + NSOwnedPointerMapValueCallBacks, NSResetMapTable, NSStringFromMapTable, }; pub use self::__NSMassFormatter::{ NSMassFormatter, NSMassFormatterUnit, NSMassFormatterUnitGram, NSMassFormatterUnitKilogram, @@ -943,14 +961,18 @@ pub use self::__NSNumberFormatter::{ NSNumberFormatterSpellOutStyle, NSNumberFormatterStyle, }; pub use self::__NSObjCRuntime::{ - NSComparator, NSComparisonResult, NSEnumerationConcurrent, NSEnumerationOptions, - NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, NSOrderedAscending, - NSOrderedDescending, NSOrderedSame, NSQualityOfService, NSQualityOfServiceBackground, + NSClassFromString, NSComparator, NSComparisonResult, NSEnumerationConcurrent, + NSEnumerationOptions, NSEnumerationReverse, NSExceptionName, NSFoundationVersionNumber, + NSGetSizeAndAlignment, NSOrderedAscending, NSOrderedDescending, NSOrderedSame, + NSProtocolFromString, NSQualityOfService, NSQualityOfServiceBackground, NSQualityOfServiceDefault, NSQualityOfServiceUserInitiated, NSQualityOfServiceUserInteractive, - NSQualityOfServiceUtility, NSRunLoopMode, NSSortConcurrent, NSSortOptions, NSSortStable, + NSQualityOfServiceUtility, NSRunLoopMode, NSSelectorFromString, NSSortConcurrent, + NSSortOptions, NSSortStable, NSStringFromClass, NSStringFromProtocol, NSStringFromSelector, }; pub use self::__NSObject::{ - NSCoding, NSCopying, NSDiscardableContent, NSMutableCopying, NSSecureCoding, + NSAllocateObject, NSCoding, NSCopyObject, NSCopying, NSDeallocateObject, + NSDecrementExtraRefCountWasZero, NSDiscardableContent, NSExtraRefCount, + NSIncrementExtraRefCount, NSMutableCopying, NSSecureCoding, NSShouldRetainWithZone, }; pub use self::__NSOperation::{ NSBlockOperation, NSInvocationOperation, NSInvocationOperationCancelledException, @@ -977,12 +999,13 @@ pub use self::__NSPathUtilities::{ NSApplicationSupportDirectory, NSAutosavedInformationDirectory, NSCachesDirectory, NSCoreServiceDirectory, NSDemoApplicationDirectory, NSDesktopDirectory, NSDeveloperApplicationDirectory, NSDeveloperDirectory, NSDocumentDirectory, - NSDocumentationDirectory, NSDownloadsDirectory, NSInputMethodsDirectory, - NSItemReplacementDirectory, NSLibraryDirectory, NSLocalDomainMask, NSMoviesDirectory, - NSMusicDirectory, NSNetworkDomainMask, NSPicturesDirectory, NSPreferencePanesDirectory, + NSDocumentationDirectory, NSDownloadsDirectory, NSFullUserName, NSHomeDirectory, + NSHomeDirectoryForUser, NSInputMethodsDirectory, NSItemReplacementDirectory, + NSLibraryDirectory, NSLocalDomainMask, NSMoviesDirectory, NSMusicDirectory, + NSNetworkDomainMask, NSOpenStepRootDirectory, NSPicturesDirectory, NSPreferencePanesDirectory, NSPrinterDescriptionDirectory, NSSearchPathDirectory, NSSearchPathDomainMask, - NSSharedPublicDirectory, NSSystemDomainMask, NSTrashDirectory, NSUserDirectory, - NSUserDomainMask, + NSSearchPathForDirectoriesInDomains, NSSharedPublicDirectory, NSSystemDomainMask, + NSTemporaryDirectory, NSTrashDirectory, NSUserDirectory, NSUserDomainMask, NSUserName, }; pub use self::__NSPersonNameComponents::NSPersonNameComponents; pub use self::__NSPersonNameComponentsFormatter::{ @@ -1047,7 +1070,10 @@ pub use self::__NSPropertyList::{ NSPropertyListXMLFormat_v1_0, }; pub use self::__NSProtocolChecker::NSProtocolChecker; -pub use self::__NSRange::{NSRange, NSRangePointer}; +pub use self::__NSRange::{ + NSIntersectionRange, NSRange, NSRangeFromString, NSRangePointer, NSStringFromRange, + NSUnionRange, +}; pub use self::__NSRegularExpression::{ NSDataDetector, NSMatchingAnchored, NSMatchingCompleted, NSMatchingFlags, NSMatchingHitEnd, NSMatchingInternalError, NSMatchingOptions, NSMatchingProgress, NSMatchingReportCompletion, @@ -1456,7 +1482,13 @@ pub use self::__NSXPCConnection::{ NSXPCCoder, NSXPCConnection, NSXPCConnectionOptions, NSXPCConnectionPrivileged, NSXPCInterface, NSXPCListener, NSXPCListenerDelegate, NSXPCListenerEndpoint, NSXPCProxyCreating, }; -pub use self::__NSZone::{NSCollectorDisabledOption, NSScannedOption}; +pub use self::__NSZone::{ + NSAllocateCollectable, NSAllocateMemoryPages, NSCollectorDisabledOption, NSCopyMemoryPages, + NSCreateZone, NSDeallocateMemoryPages, NSDefaultMallocZone, NSLogPageSize, NSPageSize, + NSRealMemoryAvailable, NSReallocateCollectable, NSRecycleZone, NSRoundDownToMultipleOfPageSize, + NSRoundUpToMultipleOfPageSize, NSScannedOption, NSSetZoneName, NSZoneCalloc, NSZoneFree, + NSZoneFromPointer, NSZoneMalloc, NSZoneName, NSZoneRealloc, +}; pub use self::__NSURL::{ NSFileSecurity, NSThumbnail1024x1024SizeKey, NSURLAddedToDirectoryDateKey, NSURLApplicationIsScriptableKey, NSURLAttributeModificationDateKey, diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 1f44abb09..395caa0b0 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -199,6 +199,24 @@ macro_rules! extern_static { }; } +macro_rules! extern_fn { + ( + $v:vis unsafe fn $name:ident($($args:tt)*) $(-> $res:ty)?; + ) => { + extern "C" { + $v fn $name($($args)*) $(-> $res)?; + } + }; +} + +macro_rules! inline_fn { + ( + $v:vis unsafe fn $name:ident($($args:tt)*) $(-> $res:ty)? $body:block + ) => { + // TODO + }; +} + // Frameworks #[cfg(feature = "AppKit")] pub mod AppKit; From 35988ba6b044d1624a7e10006bcdfa91892a8a3f Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 3 Nov 2022 07:35:05 +0100 Subject: [PATCH 126/131] Emit protocol information We can't parse it yet though, see https://github.com/madsmtm/objc2/pull/250 --- crates/header-translator/src/method.rs | 4 + crates/header-translator/src/stmt.rs | 28 +- .../AppKit/NSAccessibilityCustomRotor.rs | 13 +- .../AppKit/NSAccessibilityProtocols.rs | 1341 ++++++++++++++++- crates/icrate/src/generated/AppKit/NSAlert.rs | 10 +- .../AppKit/NSAlignmentFeedbackFilter.rs | 6 +- .../src/generated/AppKit/NSAnimation.rs | 65 +- .../src/generated/AppKit/NSAppearance.rs | 15 +- .../src/generated/AppKit/NSApplication.rs | 310 +++- .../icrate/src/generated/AppKit/NSBrowser.rs | 288 +++- .../AppKit/NSCandidateListTouchBarItem.rs | 39 +- .../src/generated/AppKit/NSCollectionView.rs | 382 ++++- .../NSCollectionViewCompositionalLayout.rs | 75 +- .../AppKit/NSCollectionViewFlowLayout.rs | 60 +- .../src/generated/AppKit/NSColorPanel.rs | 9 +- .../src/generated/AppKit/NSColorPicking.rs | 62 +- .../icrate/src/generated/AppKit/NSComboBox.rs | 56 +- .../src/generated/AppKit/NSComboBoxCell.rs | 37 +- .../icrate/src/generated/AppKit/NSControl.rs | 80 +- .../src/generated/AppKit/NSDatePickerCell.rs | 15 +- .../icrate/src/generated/AppKit/NSDockTile.rs | 13 +- .../icrate/src/generated/AppKit/NSDragging.rs | 198 ++- .../icrate/src/generated/AppKit/NSDrawer.rs | 38 +- .../generated/AppKit/NSFilePromiseProvider.rs | 28 +- .../src/generated/AppKit/NSFontPanel.rs | 15 +- .../generated/AppKit/NSGestureRecognizer.rs | 53 +- .../src/generated/AppKit/NSGlyphGenerator.rs | 29 +- .../src/generated/AppKit/NSHapticFeedback.rs | 13 +- crates/icrate/src/generated/AppKit/NSImage.rs | 40 +- .../src/generated/AppKit/NSInputManager.rs | 49 +- .../src/generated/AppKit/NSInputServer.rs | 100 +- .../src/generated/AppKit/NSKeyValueBinding.rs | 37 +- .../src/generated/AppKit/NSLayoutManager.rs | 136 +- .../icrate/src/generated/AppKit/NSMatrix.rs | 6 +- crates/icrate/src/generated/AppKit/NSMenu.rs | 63 +- .../src/generated/AppKit/NSOutlineView.rs | 438 +++++- .../src/generated/AppKit/NSPageController.rs | 58 +- .../src/generated/AppKit/NSPasteboard.rs | 69 +- .../src/generated/AppKit/NSPasteboardItem.rs | 18 +- .../icrate/src/generated/AppKit/NSPathCell.rs | 18 +- .../src/generated/AppKit/NSPathControl.rs | 52 +- .../icrate/src/generated/AppKit/NSPopover.rs | 41 +- .../src/generated/AppKit/NSPrintPanel.rs | 15 +- .../src/generated/AppKit/NSResponder.rs | 386 ++++- .../src/generated/AppKit/NSRuleEditor.rs | 45 +- .../src/generated/AppKit/NSSavePanel.rs | 39 +- .../icrate/src/generated/AppKit/NSScrubber.rs | 58 +- .../src/generated/AppKit/NSScrubberLayout.rs | 15 +- .../src/generated/AppKit/NSSearchField.rs | 14 +- .../src/generated/AppKit/NSSharingService.rs | 136 +- .../NSSharingServicePickerToolbarItem.rs | 12 +- .../NSSharingServicePickerTouchBarItem.rs | 12 +- crates/icrate/src/generated/AppKit/NSSound.rs | 10 +- .../generated/AppKit/NSSpeechRecognizer.rs | 14 +- .../generated/AppKit/NSSpeechSynthesizer.rs | 49 +- .../src/generated/AppKit/NSSpellProtocol.rs | 18 +- .../src/generated/AppKit/NSSplitView.rs | 100 +- .../src/generated/AppKit/NSStackView.rs | 22 +- .../src/generated/AppKit/NSStoryboardSegue.rs | 30 +- .../icrate/src/generated/AppKit/NSTabView.rs | 34 +- .../src/generated/AppKit/NSTableView.rs | 345 ++++- crates/icrate/src/generated/AppKit/NSText.rs | 26 +- .../src/generated/AppKit/NSTextAttachment.rs | 56 +- .../generated/AppKit/NSTextCheckingClient.rs | 143 +- .../src/generated/AppKit/NSTextContent.rs | 12 +- .../generated/AppKit/NSTextContentManager.rs | 91 +- .../src/generated/AppKit/NSTextField.rs | 34 +- .../src/generated/AppKit/NSTextFinder.rs | 115 +- .../src/generated/AppKit/NSTextInputClient.rs | 78 +- .../generated/AppKit/NSTextLayoutManager.rs | 34 +- .../src/generated/AppKit/NSTextRange.rs | 9 +- .../AppKit/NSTextSelectionNavigation.rs | 82 +- .../src/generated/AppKit/NSTextStorage.rs | 55 +- .../icrate/src/generated/AppKit/NSTextView.rs | 282 +++- .../AppKit/NSTextViewportLayoutController.rs | 33 +- .../src/generated/AppKit/NSTokenField.rs | 90 +- .../src/generated/AppKit/NSTokenFieldCell.rs | 90 +- .../icrate/src/generated/AppKit/NSToolbar.rs | 44 +- .../src/generated/AppKit/NSToolbarItem.rs | 21 +- .../icrate/src/generated/AppKit/NSTouchBar.rs | 23 +- .../src/generated/AppKit/NSUserActivity.rs | 9 +- .../AppKit/NSUserInterfaceCompression.rs | 23 +- .../NSUserInterfaceItemIdentification.rs | 12 +- .../AppKit/NSUserInterfaceItemSearching.rs | 26 +- .../AppKit/NSUserInterfaceValidation.rs | 22 +- crates/icrate/src/generated/AppKit/NSView.rs | 30 +- .../src/generated/AppKit/NSViewController.rs | 20 +- .../icrate/src/generated/AppKit/NSWindow.rs | 276 +++- .../generated/AppKit/NSWindowRestoration.rs | 13 +- .../src/generated/CoreData/NSFetchRequest.rs | 6 +- .../CoreData/NSFetchedResultsController.rs | 77 +- .../src/generated/Foundation/NSCache.rs | 10 +- .../src/generated/Foundation/NSConnection.rs | 52 +- .../generated/Foundation/NSDecimalNumber.rs | 21 +- .../src/generated/Foundation/NSEnumerator.rs | 14 +- .../Foundation/NSExtensionRequestHandling.rs | 9 +- .../src/generated/Foundation/NSFileManager.rs | 154 +- .../generated/Foundation/NSFilePresenter.rs | 121 +- .../generated/Foundation/NSItemProvider.rs | 50 +- .../generated/Foundation/NSKeyedArchiver.rs | 71 +- .../icrate/src/generated/Foundation/NSLock.rs | 12 +- .../src/generated/Foundation/NSMetadata.rs | 23 +- .../src/generated/Foundation/NSNetServices.rs | 117 +- .../src/generated/Foundation/NSObject.rs | 60 +- .../icrate/src/generated/Foundation/NSPort.rs | 20 +- .../src/generated/Foundation/NSProgress.rs | 9 +- .../src/generated/Foundation/NSSpellServer.rs | 88 +- .../src/generated/Foundation/NSStream.rs | 10 +- .../NSURLAuthenticationChallenge.rs | 39 +- .../generated/Foundation/NSURLConnection.rs | 142 +- .../src/generated/Foundation/NSURLDownload.rs | 104 +- .../src/generated/Foundation/NSURLHandle.rs | 29 +- .../src/generated/Foundation/NSURLProtocol.rs | 56 +- .../src/generated/Foundation/NSURLSession.rs | 275 +++- .../generated/Foundation/NSUserActivity.rs | 23 +- .../Foundation/NSUserNotification.rs | 30 +- .../src/generated/Foundation/NSXMLParser.rs | 158 +- .../generated/Foundation/NSXPCConnection.rs | 36 +- crates/icrate/src/lib.rs | 11 + 119 files changed, 9132 insertions(+), 205 deletions(-) diff --git a/crates/header-translator/src/method.rs b/crates/header-translator/src/method.rs index 188f253b3..d8199b880 100644 --- a/crates/header-translator/src/method.rs +++ b/crates/header-translator/src/method.rs @@ -373,6 +373,10 @@ impl<'tu> PartialMethod<'tu> { impl fmt::Display for Method { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + if self.is_optional_protocol { + writeln!(f, " #[optional]")?; + } + if self.result_type.is_id() { writeln!( f, diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index af0f7d169..bc57f0f6f 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -765,25 +765,17 @@ impl fmt::Display for Stmt { name, availability: _, protocols: _, - methods: _, + methods, } => { - // TODO - - // quote! { - // extern_protocol!( - // #[derive(Debug)] - // struct #name; - // - // unsafe impl ProtocolType for #name { - // type Super = todo!(); - // } - // ); - // - // impl #name { - // #(#methods)* - // } - // } - writeln!(f, "pub type {name} = NSObject;")?; + writeln!(f, "extern_protocol!(")?; + writeln!(f, " pub struct {name};")?; + writeln!(f, "")?; + writeln!(f, " unsafe impl {name} {{")?; + for method in methods { + writeln!(f, "{method}")?; + } + writeln!(f, " }}")?; + writeln!(f, ");")?; } Self::StructDecl { name, diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs index 25f10db6d..3d82bc376 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityCustomRotor.rs @@ -191,4 +191,15 @@ extern_methods!( } ); -pub type NSAccessibilityCustomRotorItemSearchDelegate = NSObject; +extern_protocol!( + pub struct NSAccessibilityCustomRotorItemSearchDelegate; + + unsafe impl NSAccessibilityCustomRotorItemSearchDelegate { + #[method_id(@__retain_semantics Other rotor:resultForSearchParameters:)] + pub unsafe fn rotor_resultForSearchParameters( + &self, + rotor: &NSAccessibilityCustomRotor, + searchParameters: &NSAccessibilityCustomRotorSearchParameters, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs index f53729d0b..52cbc66b4 100644 --- a/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs +++ b/crates/icrate/src/generated/AppKit/NSAccessibilityProtocols.rs @@ -5,42 +5,1343 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSAccessibilityGroup = NSObject; +extern_protocol!( + pub struct NSAccessibilityGroup; -pub type NSAccessibilityButton = NSObject; + unsafe impl NSAccessibilityGroup {} +); -pub type NSAccessibilitySwitch = NSObject; +extern_protocol!( + pub struct NSAccessibilityButton; -pub type NSAccessibilityRadioButton = NSObject; + unsafe impl NSAccessibilityButton { + #[method_id(@__retain_semantics Other accessibilityLabel)] + pub unsafe fn accessibilityLabel(&self) -> Option>; -pub type NSAccessibilityCheckBox = NSObject; + #[method(accessibilityPerformPress)] + pub unsafe fn accessibilityPerformPress(&self) -> bool; + } +); -pub type NSAccessibilityStaticText = NSObject; +extern_protocol!( + pub struct NSAccessibilitySwitch; -pub type NSAccessibilityNavigableStaticText = NSObject; + unsafe impl NSAccessibilitySwitch { + #[method_id(@__retain_semantics Other accessibilityValue)] + pub unsafe fn accessibilityValue(&self) -> Option>; -pub type NSAccessibilityProgressIndicator = NSObject; + #[optional] + #[method(accessibilityPerformIncrement)] + pub unsafe fn accessibilityPerformIncrement(&self) -> bool; -pub type NSAccessibilityStepper = NSObject; + #[optional] + #[method(accessibilityPerformDecrement)] + pub unsafe fn accessibilityPerformDecrement(&self) -> bool; + } +); -pub type NSAccessibilitySlider = NSObject; +extern_protocol!( + pub struct NSAccessibilityRadioButton; -pub type NSAccessibilityImage = NSObject; + unsafe impl NSAccessibilityRadioButton { + #[method_id(@__retain_semantics Other accessibilityValue)] + pub unsafe fn accessibilityValue(&self) -> Option>; + } +); -pub type NSAccessibilityContainsTransientUI = NSObject; +extern_protocol!( + pub struct NSAccessibilityCheckBox; -pub type NSAccessibilityTable = NSObject; + unsafe impl NSAccessibilityCheckBox { + #[method_id(@__retain_semantics Other accessibilityValue)] + pub unsafe fn accessibilityValue(&self) -> Option>; + } +); -pub type NSAccessibilityOutline = NSObject; +extern_protocol!( + pub struct NSAccessibilityStaticText; -pub type NSAccessibilityList = NSObject; + unsafe impl NSAccessibilityStaticText { + #[method_id(@__retain_semantics Other accessibilityValue)] + pub unsafe fn accessibilityValue(&self) -> Option>; -pub type NSAccessibilityRow = NSObject; + #[optional] + #[method_id(@__retain_semantics Other accessibilityAttributedStringForRange:)] + pub unsafe fn accessibilityAttributedStringForRange( + &self, + range: NSRange, + ) -> Option>; -pub type NSAccessibilityLayoutArea = NSObject; + #[optional] + #[method(accessibilityVisibleCharacterRange)] + pub unsafe fn accessibilityVisibleCharacterRange(&self) -> NSRange; + } +); -pub type NSAccessibilityLayoutItem = NSObject; +extern_protocol!( + pub struct NSAccessibilityNavigableStaticText; -pub type NSAccessibilityElementLoading = NSObject; + unsafe impl NSAccessibilityNavigableStaticText { + #[method_id(@__retain_semantics Other accessibilityStringForRange:)] + pub unsafe fn accessibilityStringForRange( + &self, + range: NSRange, + ) -> Option>; -pub type NSAccessibility = NSObject; + #[method(accessibilityLineForIndex:)] + pub unsafe fn accessibilityLineForIndex(&self, index: NSInteger) -> NSInteger; + + #[method(accessibilityRangeForLine:)] + pub unsafe fn accessibilityRangeForLine(&self, lineNumber: NSInteger) -> NSRange; + + #[method(accessibilityFrameForRange:)] + pub unsafe fn accessibilityFrameForRange(&self, range: NSRange) -> NSRect; + } +); + +extern_protocol!( + pub struct NSAccessibilityProgressIndicator; + + unsafe impl NSAccessibilityProgressIndicator { + #[method_id(@__retain_semantics Other accessibilityValue)] + pub unsafe fn accessibilityValue(&self) -> Option>; + } +); + +extern_protocol!( + pub struct NSAccessibilityStepper; + + unsafe impl NSAccessibilityStepper { + #[method_id(@__retain_semantics Other accessibilityLabel)] + pub unsafe fn accessibilityLabel(&self) -> Option>; + + #[method(accessibilityPerformIncrement)] + pub unsafe fn accessibilityPerformIncrement(&self) -> bool; + + #[method(accessibilityPerformDecrement)] + pub unsafe fn accessibilityPerformDecrement(&self) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityValue)] + pub unsafe fn accessibilityValue(&self) -> Option>; + } +); + +extern_protocol!( + pub struct NSAccessibilitySlider; + + unsafe impl NSAccessibilitySlider { + #[method_id(@__retain_semantics Other accessibilityLabel)] + pub unsafe fn accessibilityLabel(&self) -> Option>; + + #[method_id(@__retain_semantics Other accessibilityValue)] + pub unsafe fn accessibilityValue(&self) -> Option>; + + #[method(accessibilityPerformIncrement)] + pub unsafe fn accessibilityPerformIncrement(&self) -> bool; + + #[method(accessibilityPerformDecrement)] + pub unsafe fn accessibilityPerformDecrement(&self) -> bool; + } +); + +extern_protocol!( + pub struct NSAccessibilityImage; + + unsafe impl NSAccessibilityImage { + #[method_id(@__retain_semantics Other accessibilityLabel)] + pub unsafe fn accessibilityLabel(&self) -> Option>; + } +); + +extern_protocol!( + pub struct NSAccessibilityContainsTransientUI; + + unsafe impl NSAccessibilityContainsTransientUI { + #[method(accessibilityPerformShowAlternateUI)] + pub unsafe fn accessibilityPerformShowAlternateUI(&self) -> bool; + + #[method(accessibilityPerformShowDefaultUI)] + pub unsafe fn accessibilityPerformShowDefaultUI(&self) -> bool; + + #[method(isAccessibilityAlternateUIVisible)] + pub unsafe fn isAccessibilityAlternateUIVisible(&self) -> bool; + } +); + +extern_protocol!( + pub struct NSAccessibilityTable; + + unsafe impl NSAccessibilityTable { + #[method_id(@__retain_semantics Other accessibilityLabel)] + pub unsafe fn accessibilityLabel(&self) -> Option>; + + #[method_id(@__retain_semantics Other accessibilityRows)] + pub unsafe fn accessibilityRows(&self) -> Option, Shared>>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilitySelectedRows)] + pub unsafe fn accessibilitySelectedRows( + &self, + ) -> Option, Shared>>; + + #[optional] + #[method(setAccessibilitySelectedRows:)] + pub unsafe fn setAccessibilitySelectedRows( + &self, + selectedRows: &NSArray, + ); + + #[optional] + #[method_id(@__retain_semantics Other accessibilityVisibleRows)] + pub unsafe fn accessibilityVisibleRows( + &self, + ) -> Option, Shared>>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityColumns)] + pub unsafe fn accessibilityColumns(&self) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityVisibleColumns)] + pub unsafe fn accessibilityVisibleColumns(&self) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilitySelectedColumns)] + pub unsafe fn accessibilitySelectedColumns(&self) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityHeaderGroup)] + pub unsafe fn accessibilityHeaderGroup(&self) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilitySelectedCells)] + pub unsafe fn accessibilitySelectedCells(&self) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityVisibleCells)] + pub unsafe fn accessibilityVisibleCells(&self) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityRowHeaderUIElements)] + pub unsafe fn accessibilityRowHeaderUIElements(&self) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other accessibilityColumnHeaderUIElements)] + pub unsafe fn accessibilityColumnHeaderUIElements(&self) -> Option>; + } +); + +extern_protocol!( + pub struct NSAccessibilityOutline; + + unsafe impl NSAccessibilityOutline {} +); + +extern_protocol!( + pub struct NSAccessibilityList; + + unsafe impl NSAccessibilityList {} +); + +extern_protocol!( + pub struct NSAccessibilityRow; + + unsafe impl NSAccessibilityRow { + #[method(accessibilityIndex)] + pub unsafe fn accessibilityIndex(&self) -> NSInteger; + + #[optional] + #[method(accessibilityDisclosureLevel)] + pub unsafe fn accessibilityDisclosureLevel(&self) -> NSInteger; + } +); + +extern_protocol!( + pub struct NSAccessibilityLayoutArea; + + unsafe impl NSAccessibilityLayoutArea { + #[method_id(@__retain_semantics Other accessibilityLabel)] + pub unsafe fn accessibilityLabel(&self) -> Id; + + #[method_id(@__retain_semantics Other accessibilityChildren)] + pub unsafe fn accessibilityChildren(&self) -> Option>; + + #[method_id(@__retain_semantics Other accessibilitySelectedChildren)] + pub unsafe fn accessibilitySelectedChildren(&self) -> Option>; + + #[method_id(@__retain_semantics Other accessibilityFocusedUIElement)] + pub unsafe fn accessibilityFocusedUIElement(&self) -> Id; + } +); + +extern_protocol!( + pub struct NSAccessibilityLayoutItem; + + unsafe impl NSAccessibilityLayoutItem { + #[optional] + #[method(setAccessibilityFrame:)] + pub unsafe fn setAccessibilityFrame(&self, frame: NSRect); + } +); + +extern_protocol!( + pub struct NSAccessibilityElementLoading; + + unsafe impl NSAccessibilityElementLoading { + #[method_id(@__retain_semantics Other accessibilityElementWithToken:)] + pub unsafe fn accessibilityElementWithToken( + &self, + token: &NSAccessibilityLoadingToken, + ) -> Option>; + + #[optional] + #[method(accessibilityRangeInTargetElementWithToken:)] + pub unsafe fn accessibilityRangeInTargetElementWithToken( + &self, + token: &NSAccessibilityLoadingToken, + ) -> NSRange; + } +); + +extern_protocol!( + pub struct NSAccessibility; + + unsafe impl NSAccessibility { + #[method(isAccessibilityElement)] + pub unsafe fn isAccessibilityElement(&self) -> bool; + + #[method(setAccessibilityElement:)] + pub unsafe fn setAccessibilityElement(&self, accessibilityElement: bool); + + #[method(accessibilityFrame)] + pub unsafe fn accessibilityFrame(&self) -> NSRect; + + #[method(setAccessibilityFrame:)] + pub unsafe fn setAccessibilityFrame(&self, accessibilityFrame: NSRect); + + #[method(isAccessibilityFocused)] + pub unsafe fn isAccessibilityFocused(&self) -> bool; + + #[method(setAccessibilityFocused:)] + pub unsafe fn setAccessibilityFocused(&self, accessibilityFocused: bool); + + #[method(accessibilityActivationPoint)] + pub unsafe fn accessibilityActivationPoint(&self) -> NSPoint; + + #[method(setAccessibilityActivationPoint:)] + pub unsafe fn setAccessibilityActivationPoint(&self, accessibilityActivationPoint: NSPoint); + + #[method_id(@__retain_semantics Other accessibilityTopLevelUIElement)] + pub unsafe fn accessibilityTopLevelUIElement(&self) -> Option>; + + #[method(setAccessibilityTopLevelUIElement:)] + pub unsafe fn setAccessibilityTopLevelUIElement( + &self, + accessibilityTopLevelUIElement: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityURL)] + pub unsafe fn accessibilityURL(&self) -> Option>; + + #[method(setAccessibilityURL:)] + pub unsafe fn setAccessibilityURL(&self, accessibilityURL: Option<&NSURL>); + + #[method_id(@__retain_semantics Other accessibilityValue)] + pub unsafe fn accessibilityValue(&self) -> Option>; + + #[method(setAccessibilityValue:)] + pub unsafe fn setAccessibilityValue(&self, accessibilityValue: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityValueDescription)] + pub unsafe fn accessibilityValueDescription(&self) -> Option>; + + #[method(setAccessibilityValueDescription:)] + pub unsafe fn setAccessibilityValueDescription( + &self, + accessibilityValueDescription: Option<&NSString>, + ); + + #[method_id(@__retain_semantics Other accessibilityVisibleChildren)] + pub unsafe fn accessibilityVisibleChildren(&self) -> Option>; + + #[method(setAccessibilityVisibleChildren:)] + pub unsafe fn setAccessibilityVisibleChildren( + &self, + accessibilityVisibleChildren: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilitySubrole)] + pub unsafe fn accessibilitySubrole(&self) -> Option>; + + #[method(setAccessibilitySubrole:)] + pub unsafe fn setAccessibilitySubrole( + &self, + accessibilitySubrole: Option<&NSAccessibilitySubrole>, + ); + + #[method_id(@__retain_semantics Other accessibilityTitle)] + pub unsafe fn accessibilityTitle(&self) -> Option>; + + #[method(setAccessibilityTitle:)] + pub unsafe fn setAccessibilityTitle(&self, accessibilityTitle: Option<&NSString>); + + #[method_id(@__retain_semantics Other accessibilityTitleUIElement)] + pub unsafe fn accessibilityTitleUIElement(&self) -> Option>; + + #[method(setAccessibilityTitleUIElement:)] + pub unsafe fn setAccessibilityTitleUIElement( + &self, + accessibilityTitleUIElement: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityNextContents)] + pub unsafe fn accessibilityNextContents(&self) -> Option>; + + #[method(setAccessibilityNextContents:)] + pub unsafe fn setAccessibilityNextContents( + &self, + accessibilityNextContents: Option<&NSArray>, + ); + + #[method(accessibilityOrientation)] + pub unsafe fn accessibilityOrientation(&self) -> NSAccessibilityOrientation; + + #[method(setAccessibilityOrientation:)] + pub unsafe fn setAccessibilityOrientation( + &self, + accessibilityOrientation: NSAccessibilityOrientation, + ); + + #[method_id(@__retain_semantics Other accessibilityOverflowButton)] + pub unsafe fn accessibilityOverflowButton(&self) -> Option>; + + #[method(setAccessibilityOverflowButton:)] + pub unsafe fn setAccessibilityOverflowButton( + &self, + accessibilityOverflowButton: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityParent)] + pub unsafe fn accessibilityParent(&self) -> Option>; + + #[method(setAccessibilityParent:)] + pub unsafe fn setAccessibilityParent(&self, accessibilityParent: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityPlaceholderValue)] + pub unsafe fn accessibilityPlaceholderValue(&self) -> Option>; + + #[method(setAccessibilityPlaceholderValue:)] + pub unsafe fn setAccessibilityPlaceholderValue( + &self, + accessibilityPlaceholderValue: Option<&NSString>, + ); + + #[method_id(@__retain_semantics Other accessibilityPreviousContents)] + pub unsafe fn accessibilityPreviousContents(&self) -> Option>; + + #[method(setAccessibilityPreviousContents:)] + pub unsafe fn setAccessibilityPreviousContents( + &self, + accessibilityPreviousContents: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityRole)] + pub unsafe fn accessibilityRole(&self) -> Option>; + + #[method(setAccessibilityRole:)] + pub unsafe fn setAccessibilityRole(&self, accessibilityRole: Option<&NSAccessibilityRole>); + + #[method_id(@__retain_semantics Other accessibilityRoleDescription)] + pub unsafe fn accessibilityRoleDescription(&self) -> Option>; + + #[method(setAccessibilityRoleDescription:)] + pub unsafe fn setAccessibilityRoleDescription( + &self, + accessibilityRoleDescription: Option<&NSString>, + ); + + #[method_id(@__retain_semantics Other accessibilitySearchButton)] + pub unsafe fn accessibilitySearchButton(&self) -> Option>; + + #[method(setAccessibilitySearchButton:)] + pub unsafe fn setAccessibilitySearchButton( + &self, + accessibilitySearchButton: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilitySearchMenu)] + pub unsafe fn accessibilitySearchMenu(&self) -> Option>; + + #[method(setAccessibilitySearchMenu:)] + pub unsafe fn setAccessibilitySearchMenu(&self, accessibilitySearchMenu: Option<&Object>); + + #[method(isAccessibilitySelected)] + pub unsafe fn isAccessibilitySelected(&self) -> bool; + + #[method(setAccessibilitySelected:)] + pub unsafe fn setAccessibilitySelected(&self, accessibilitySelected: bool); + + #[method_id(@__retain_semantics Other accessibilitySelectedChildren)] + pub unsafe fn accessibilitySelectedChildren(&self) -> Option>; + + #[method(setAccessibilitySelectedChildren:)] + pub unsafe fn setAccessibilitySelectedChildren( + &self, + accessibilitySelectedChildren: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityServesAsTitleForUIElements)] + pub unsafe fn accessibilityServesAsTitleForUIElements(&self) + -> Option>; + + #[method(setAccessibilityServesAsTitleForUIElements:)] + pub unsafe fn setAccessibilityServesAsTitleForUIElements( + &self, + accessibilityServesAsTitleForUIElements: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityShownMenu)] + pub unsafe fn accessibilityShownMenu(&self) -> Option>; + + #[method(setAccessibilityShownMenu:)] + pub unsafe fn setAccessibilityShownMenu(&self, accessibilityShownMenu: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityMinValue)] + pub unsafe fn accessibilityMinValue(&self) -> Option>; + + #[method(setAccessibilityMinValue:)] + pub unsafe fn setAccessibilityMinValue(&self, accessibilityMinValue: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityMaxValue)] + pub unsafe fn accessibilityMaxValue(&self) -> Option>; + + #[method(setAccessibilityMaxValue:)] + pub unsafe fn setAccessibilityMaxValue(&self, accessibilityMaxValue: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityLinkedUIElements)] + pub unsafe fn accessibilityLinkedUIElements(&self) -> Option>; + + #[method(setAccessibilityLinkedUIElements:)] + pub unsafe fn setAccessibilityLinkedUIElements( + &self, + accessibilityLinkedUIElements: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityWindow)] + pub unsafe fn accessibilityWindow(&self) -> Option>; + + #[method(setAccessibilityWindow:)] + pub unsafe fn setAccessibilityWindow(&self, accessibilityWindow: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityIdentifier)] + pub unsafe fn accessibilityIdentifier(&self) -> Option>; + + #[method(setAccessibilityIdentifier:)] + pub unsafe fn setAccessibilityIdentifier(&self, accessibilityIdentifier: Option<&NSString>); + + #[method_id(@__retain_semantics Other accessibilityHelp)] + pub unsafe fn accessibilityHelp(&self) -> Option>; + + #[method(setAccessibilityHelp:)] + pub unsafe fn setAccessibilityHelp(&self, accessibilityHelp: Option<&NSString>); + + #[method_id(@__retain_semantics Other accessibilityFilename)] + pub unsafe fn accessibilityFilename(&self) -> Option>; + + #[method(setAccessibilityFilename:)] + pub unsafe fn setAccessibilityFilename(&self, accessibilityFilename: Option<&NSString>); + + #[method(isAccessibilityExpanded)] + pub unsafe fn isAccessibilityExpanded(&self) -> bool; + + #[method(setAccessibilityExpanded:)] + pub unsafe fn setAccessibilityExpanded(&self, accessibilityExpanded: bool); + + #[method(isAccessibilityEdited)] + pub unsafe fn isAccessibilityEdited(&self) -> bool; + + #[method(setAccessibilityEdited:)] + pub unsafe fn setAccessibilityEdited(&self, accessibilityEdited: bool); + + #[method(isAccessibilityEnabled)] + pub unsafe fn isAccessibilityEnabled(&self) -> bool; + + #[method(setAccessibilityEnabled:)] + pub unsafe fn setAccessibilityEnabled(&self, accessibilityEnabled: bool); + + #[method_id(@__retain_semantics Other accessibilityChildren)] + pub unsafe fn accessibilityChildren(&self) -> Option>; + + #[method(setAccessibilityChildren:)] + pub unsafe fn setAccessibilityChildren(&self, accessibilityChildren: Option<&NSArray>); + + #[method_id(@__retain_semantics Other accessibilityChildrenInNavigationOrder)] + pub unsafe fn accessibilityChildrenInNavigationOrder( + &self, + ) -> Option, Shared>>; + + #[method(setAccessibilityChildrenInNavigationOrder:)] + pub unsafe fn setAccessibilityChildrenInNavigationOrder( + &self, + accessibilityChildrenInNavigationOrder: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityClearButton)] + pub unsafe fn accessibilityClearButton(&self) -> Option>; + + #[method(setAccessibilityClearButton:)] + pub unsafe fn setAccessibilityClearButton(&self, accessibilityClearButton: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityCancelButton)] + pub unsafe fn accessibilityCancelButton(&self) -> Option>; + + #[method(setAccessibilityCancelButton:)] + pub unsafe fn setAccessibilityCancelButton( + &self, + accessibilityCancelButton: Option<&Object>, + ); + + #[method(isAccessibilityProtectedContent)] + pub unsafe fn isAccessibilityProtectedContent(&self) -> bool; + + #[method(setAccessibilityProtectedContent:)] + pub unsafe fn setAccessibilityProtectedContent(&self, accessibilityProtectedContent: bool); + + #[method_id(@__retain_semantics Other accessibilityContents)] + pub unsafe fn accessibilityContents(&self) -> Option>; + + #[method(setAccessibilityContents:)] + pub unsafe fn setAccessibilityContents(&self, accessibilityContents: Option<&NSArray>); + + #[method_id(@__retain_semantics Other accessibilityLabel)] + pub unsafe fn accessibilityLabel(&self) -> Option>; + + #[method(setAccessibilityLabel:)] + pub unsafe fn setAccessibilityLabel(&self, accessibilityLabel: Option<&NSString>); + + #[method(isAccessibilityAlternateUIVisible)] + pub unsafe fn isAccessibilityAlternateUIVisible(&self) -> bool; + + #[method(setAccessibilityAlternateUIVisible:)] + pub unsafe fn setAccessibilityAlternateUIVisible( + &self, + accessibilityAlternateUIVisible: bool, + ); + + #[method_id(@__retain_semantics Other accessibilitySharedFocusElements)] + pub unsafe fn accessibilitySharedFocusElements(&self) -> Option>; + + #[method(setAccessibilitySharedFocusElements:)] + pub unsafe fn setAccessibilitySharedFocusElements( + &self, + accessibilitySharedFocusElements: Option<&NSArray>, + ); + + #[method(isAccessibilityRequired)] + pub unsafe fn isAccessibilityRequired(&self) -> bool; + + #[method(setAccessibilityRequired:)] + pub unsafe fn setAccessibilityRequired(&self, accessibilityRequired: bool); + + #[method_id(@__retain_semantics Other accessibilityCustomRotors)] + pub unsafe fn accessibilityCustomRotors( + &self, + ) -> Id, Shared>; + + #[method(setAccessibilityCustomRotors:)] + pub unsafe fn setAccessibilityCustomRotors( + &self, + accessibilityCustomRotors: &NSArray, + ); + + #[method_id(@__retain_semantics Other accessibilityApplicationFocusedUIElement)] + pub unsafe fn accessibilityApplicationFocusedUIElement(&self) + -> Option>; + + #[method(setAccessibilityApplicationFocusedUIElement:)] + pub unsafe fn setAccessibilityApplicationFocusedUIElement( + &self, + accessibilityApplicationFocusedUIElement: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityMainWindow)] + pub unsafe fn accessibilityMainWindow(&self) -> Option>; + + #[method(setAccessibilityMainWindow:)] + pub unsafe fn setAccessibilityMainWindow(&self, accessibilityMainWindow: Option<&Object>); + + #[method(isAccessibilityHidden)] + pub unsafe fn isAccessibilityHidden(&self) -> bool; + + #[method(setAccessibilityHidden:)] + pub unsafe fn setAccessibilityHidden(&self, accessibilityHidden: bool); + + #[method(isAccessibilityFrontmost)] + pub unsafe fn isAccessibilityFrontmost(&self) -> bool; + + #[method(setAccessibilityFrontmost:)] + pub unsafe fn setAccessibilityFrontmost(&self, accessibilityFrontmost: bool); + + #[method_id(@__retain_semantics Other accessibilityFocusedWindow)] + pub unsafe fn accessibilityFocusedWindow(&self) -> Option>; + + #[method(setAccessibilityFocusedWindow:)] + pub unsafe fn setAccessibilityFocusedWindow( + &self, + accessibilityFocusedWindow: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityWindows)] + pub unsafe fn accessibilityWindows(&self) -> Option>; + + #[method(setAccessibilityWindows:)] + pub unsafe fn setAccessibilityWindows(&self, accessibilityWindows: Option<&NSArray>); + + #[method_id(@__retain_semantics Other accessibilityExtrasMenuBar)] + pub unsafe fn accessibilityExtrasMenuBar(&self) -> Option>; + + #[method(setAccessibilityExtrasMenuBar:)] + pub unsafe fn setAccessibilityExtrasMenuBar( + &self, + accessibilityExtrasMenuBar: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityMenuBar)] + pub unsafe fn accessibilityMenuBar(&self) -> Option>; + + #[method(setAccessibilityMenuBar:)] + pub unsafe fn setAccessibilityMenuBar(&self, accessibilityMenuBar: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityColumnTitles)] + pub unsafe fn accessibilityColumnTitles(&self) -> Option>; + + #[method(setAccessibilityColumnTitles:)] + pub unsafe fn setAccessibilityColumnTitles( + &self, + accessibilityColumnTitles: Option<&NSArray>, + ); + + #[method(isAccessibilityOrderedByRow)] + pub unsafe fn isAccessibilityOrderedByRow(&self) -> bool; + + #[method(setAccessibilityOrderedByRow:)] + pub unsafe fn setAccessibilityOrderedByRow(&self, accessibilityOrderedByRow: bool); + + #[method(accessibilityHorizontalUnits)] + pub unsafe fn accessibilityHorizontalUnits(&self) -> NSAccessibilityUnits; + + #[method(setAccessibilityHorizontalUnits:)] + pub unsafe fn setAccessibilityHorizontalUnits( + &self, + accessibilityHorizontalUnits: NSAccessibilityUnits, + ); + + #[method(accessibilityVerticalUnits)] + pub unsafe fn accessibilityVerticalUnits(&self) -> NSAccessibilityUnits; + + #[method(setAccessibilityVerticalUnits:)] + pub unsafe fn setAccessibilityVerticalUnits( + &self, + accessibilityVerticalUnits: NSAccessibilityUnits, + ); + + #[method_id(@__retain_semantics Other accessibilityHorizontalUnitDescription)] + pub unsafe fn accessibilityHorizontalUnitDescription(&self) + -> Option>; + + #[method(setAccessibilityHorizontalUnitDescription:)] + pub unsafe fn setAccessibilityHorizontalUnitDescription( + &self, + accessibilityHorizontalUnitDescription: Option<&NSString>, + ); + + #[method_id(@__retain_semantics Other accessibilityVerticalUnitDescription)] + pub unsafe fn accessibilityVerticalUnitDescription(&self) -> Option>; + + #[method(setAccessibilityVerticalUnitDescription:)] + pub unsafe fn setAccessibilityVerticalUnitDescription( + &self, + accessibilityVerticalUnitDescription: Option<&NSString>, + ); + + #[method(accessibilityLayoutPointForScreenPoint:)] + pub unsafe fn accessibilityLayoutPointForScreenPoint(&self, point: NSPoint) -> NSPoint; + + #[method(accessibilityLayoutSizeForScreenSize:)] + pub unsafe fn accessibilityLayoutSizeForScreenSize(&self, size: NSSize) -> NSSize; + + #[method(accessibilityScreenPointForLayoutPoint:)] + pub unsafe fn accessibilityScreenPointForLayoutPoint(&self, point: NSPoint) -> NSPoint; + + #[method(accessibilityScreenSizeForLayoutSize:)] + pub unsafe fn accessibilityScreenSizeForLayoutSize(&self, size: NSSize) -> NSSize; + + #[method_id(@__retain_semantics Other accessibilityHandles)] + pub unsafe fn accessibilityHandles(&self) -> Option>; + + #[method(setAccessibilityHandles:)] + pub unsafe fn setAccessibilityHandles(&self, accessibilityHandles: Option<&NSArray>); + + #[method_id(@__retain_semantics Other accessibilityWarningValue)] + pub unsafe fn accessibilityWarningValue(&self) -> Option>; + + #[method(setAccessibilityWarningValue:)] + pub unsafe fn setAccessibilityWarningValue( + &self, + accessibilityWarningValue: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityCriticalValue)] + pub unsafe fn accessibilityCriticalValue(&self) -> Option>; + + #[method(setAccessibilityCriticalValue:)] + pub unsafe fn setAccessibilityCriticalValue( + &self, + accessibilityCriticalValue: Option<&Object>, + ); + + #[method(isAccessibilityDisclosed)] + pub unsafe fn isAccessibilityDisclosed(&self) -> bool; + + #[method(setAccessibilityDisclosed:)] + pub unsafe fn setAccessibilityDisclosed(&self, accessibilityDisclosed: bool); + + #[method_id(@__retain_semantics Other accessibilityDisclosedByRow)] + pub unsafe fn accessibilityDisclosedByRow(&self) -> Option>; + + #[method(setAccessibilityDisclosedByRow:)] + pub unsafe fn setAccessibilityDisclosedByRow( + &self, + accessibilityDisclosedByRow: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityDisclosedRows)] + pub unsafe fn accessibilityDisclosedRows(&self) -> Option>; + + #[method(setAccessibilityDisclosedRows:)] + pub unsafe fn setAccessibilityDisclosedRows( + &self, + accessibilityDisclosedRows: Option<&Object>, + ); + + #[method(accessibilityDisclosureLevel)] + pub unsafe fn accessibilityDisclosureLevel(&self) -> NSInteger; + + #[method(setAccessibilityDisclosureLevel:)] + pub unsafe fn setAccessibilityDisclosureLevel( + &self, + accessibilityDisclosureLevel: NSInteger, + ); + + #[method_id(@__retain_semantics Other accessibilityMarkerUIElements)] + pub unsafe fn accessibilityMarkerUIElements(&self) -> Option>; + + #[method(setAccessibilityMarkerUIElements:)] + pub unsafe fn setAccessibilityMarkerUIElements( + &self, + accessibilityMarkerUIElements: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityMarkerValues)] + pub unsafe fn accessibilityMarkerValues(&self) -> Option>; + + #[method(setAccessibilityMarkerValues:)] + pub unsafe fn setAccessibilityMarkerValues( + &self, + accessibilityMarkerValues: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityMarkerGroupUIElement)] + pub unsafe fn accessibilityMarkerGroupUIElement(&self) -> Option>; + + #[method(setAccessibilityMarkerGroupUIElement:)] + pub unsafe fn setAccessibilityMarkerGroupUIElement( + &self, + accessibilityMarkerGroupUIElement: Option<&Object>, + ); + + #[method(accessibilityUnits)] + pub unsafe fn accessibilityUnits(&self) -> NSAccessibilityUnits; + + #[method(setAccessibilityUnits:)] + pub unsafe fn setAccessibilityUnits(&self, accessibilityUnits: NSAccessibilityUnits); + + #[method_id(@__retain_semantics Other accessibilityUnitDescription)] + pub unsafe fn accessibilityUnitDescription(&self) -> Option>; + + #[method(setAccessibilityUnitDescription:)] + pub unsafe fn setAccessibilityUnitDescription( + &self, + accessibilityUnitDescription: Option<&NSString>, + ); + + #[method(accessibilityRulerMarkerType)] + pub unsafe fn accessibilityRulerMarkerType(&self) -> NSAccessibilityRulerMarkerType; + + #[method(setAccessibilityRulerMarkerType:)] + pub unsafe fn setAccessibilityRulerMarkerType( + &self, + accessibilityRulerMarkerType: NSAccessibilityRulerMarkerType, + ); + + #[method_id(@__retain_semantics Other accessibilityMarkerTypeDescription)] + pub unsafe fn accessibilityMarkerTypeDescription(&self) -> Option>; + + #[method(setAccessibilityMarkerTypeDescription:)] + pub unsafe fn setAccessibilityMarkerTypeDescription( + &self, + accessibilityMarkerTypeDescription: Option<&NSString>, + ); + + #[method_id(@__retain_semantics Other accessibilityHorizontalScrollBar)] + pub unsafe fn accessibilityHorizontalScrollBar(&self) -> Option>; + + #[method(setAccessibilityHorizontalScrollBar:)] + pub unsafe fn setAccessibilityHorizontalScrollBar( + &self, + accessibilityHorizontalScrollBar: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityVerticalScrollBar)] + pub unsafe fn accessibilityVerticalScrollBar(&self) -> Option>; + + #[method(setAccessibilityVerticalScrollBar:)] + pub unsafe fn setAccessibilityVerticalScrollBar( + &self, + accessibilityVerticalScrollBar: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityAllowedValues)] + pub unsafe fn accessibilityAllowedValues(&self) -> Option, Shared>>; + + #[method(setAccessibilityAllowedValues:)] + pub unsafe fn setAccessibilityAllowedValues( + &self, + accessibilityAllowedValues: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityLabelUIElements)] + pub unsafe fn accessibilityLabelUIElements(&self) -> Option>; + + #[method(setAccessibilityLabelUIElements:)] + pub unsafe fn setAccessibilityLabelUIElements( + &self, + accessibilityLabelUIElements: Option<&NSArray>, + ); + + #[method(accessibilityLabelValue)] + pub unsafe fn accessibilityLabelValue(&self) -> c_float; + + #[method(setAccessibilityLabelValue:)] + pub unsafe fn setAccessibilityLabelValue(&self, accessibilityLabelValue: c_float); + + #[method_id(@__retain_semantics Other accessibilitySplitters)] + pub unsafe fn accessibilitySplitters(&self) -> Option>; + + #[method(setAccessibilitySplitters:)] + pub unsafe fn setAccessibilitySplitters(&self, accessibilitySplitters: Option<&NSArray>); + + #[method_id(@__retain_semantics Other accessibilityDecrementButton)] + pub unsafe fn accessibilityDecrementButton(&self) -> Option>; + + #[method(setAccessibilityDecrementButton:)] + pub unsafe fn setAccessibilityDecrementButton( + &self, + accessibilityDecrementButton: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityIncrementButton)] + pub unsafe fn accessibilityIncrementButton(&self) -> Option>; + + #[method(setAccessibilityIncrementButton:)] + pub unsafe fn setAccessibilityIncrementButton( + &self, + accessibilityIncrementButton: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityTabs)] + pub unsafe fn accessibilityTabs(&self) -> Option>; + + #[method(setAccessibilityTabs:)] + pub unsafe fn setAccessibilityTabs(&self, accessibilityTabs: Option<&NSArray>); + + #[method_id(@__retain_semantics Other accessibilityHeader)] + pub unsafe fn accessibilityHeader(&self) -> Option>; + + #[method(setAccessibilityHeader:)] + pub unsafe fn setAccessibilityHeader(&self, accessibilityHeader: Option<&Object>); + + #[method(accessibilityColumnCount)] + pub unsafe fn accessibilityColumnCount(&self) -> NSInteger; + + #[method(setAccessibilityColumnCount:)] + pub unsafe fn setAccessibilityColumnCount(&self, accessibilityColumnCount: NSInteger); + + #[method(accessibilityRowCount)] + pub unsafe fn accessibilityRowCount(&self) -> NSInteger; + + #[method(setAccessibilityRowCount:)] + pub unsafe fn setAccessibilityRowCount(&self, accessibilityRowCount: NSInteger); + + #[method(accessibilityIndex)] + pub unsafe fn accessibilityIndex(&self) -> NSInteger; + + #[method(setAccessibilityIndex:)] + pub unsafe fn setAccessibilityIndex(&self, accessibilityIndex: NSInteger); + + #[method_id(@__retain_semantics Other accessibilityColumns)] + pub unsafe fn accessibilityColumns(&self) -> Option>; + + #[method(setAccessibilityColumns:)] + pub unsafe fn setAccessibilityColumns(&self, accessibilityColumns: Option<&NSArray>); + + #[method_id(@__retain_semantics Other accessibilityRows)] + pub unsafe fn accessibilityRows(&self) -> Option>; + + #[method(setAccessibilityRows:)] + pub unsafe fn setAccessibilityRows(&self, accessibilityRows: Option<&NSArray>); + + #[method_id(@__retain_semantics Other accessibilityVisibleRows)] + pub unsafe fn accessibilityVisibleRows(&self) -> Option>; + + #[method(setAccessibilityVisibleRows:)] + pub unsafe fn setAccessibilityVisibleRows( + &self, + accessibilityVisibleRows: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilitySelectedRows)] + pub unsafe fn accessibilitySelectedRows(&self) -> Option>; + + #[method(setAccessibilitySelectedRows:)] + pub unsafe fn setAccessibilitySelectedRows( + &self, + accessibilitySelectedRows: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityVisibleColumns)] + pub unsafe fn accessibilityVisibleColumns(&self) -> Option>; + + #[method(setAccessibilityVisibleColumns:)] + pub unsafe fn setAccessibilityVisibleColumns( + &self, + accessibilityVisibleColumns: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilitySelectedColumns)] + pub unsafe fn accessibilitySelectedColumns(&self) -> Option>; + + #[method(setAccessibilitySelectedColumns:)] + pub unsafe fn setAccessibilitySelectedColumns( + &self, + accessibilitySelectedColumns: Option<&NSArray>, + ); + + #[method(accessibilitySortDirection)] + pub unsafe fn accessibilitySortDirection(&self) -> NSAccessibilitySortDirection; + + #[method(setAccessibilitySortDirection:)] + pub unsafe fn setAccessibilitySortDirection( + &self, + accessibilitySortDirection: NSAccessibilitySortDirection, + ); + + #[method_id(@__retain_semantics Other accessibilityRowHeaderUIElements)] + pub unsafe fn accessibilityRowHeaderUIElements(&self) -> Option>; + + #[method(setAccessibilityRowHeaderUIElements:)] + pub unsafe fn setAccessibilityRowHeaderUIElements( + &self, + accessibilityRowHeaderUIElements: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilitySelectedCells)] + pub unsafe fn accessibilitySelectedCells(&self) -> Option>; + + #[method(setAccessibilitySelectedCells:)] + pub unsafe fn setAccessibilitySelectedCells( + &self, + accessibilitySelectedCells: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityVisibleCells)] + pub unsafe fn accessibilityVisibleCells(&self) -> Option>; + + #[method(setAccessibilityVisibleCells:)] + pub unsafe fn setAccessibilityVisibleCells( + &self, + accessibilityVisibleCells: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityColumnHeaderUIElements)] + pub unsafe fn accessibilityColumnHeaderUIElements(&self) -> Option>; + + #[method(setAccessibilityColumnHeaderUIElements:)] + pub unsafe fn setAccessibilityColumnHeaderUIElements( + &self, + accessibilityColumnHeaderUIElements: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityCellForColumn:row:)] + pub unsafe fn accessibilityCellForColumn_row( + &self, + column: NSInteger, + row: NSInteger, + ) -> Option>; + + #[method(accessibilityRowIndexRange)] + pub unsafe fn accessibilityRowIndexRange(&self) -> NSRange; + + #[method(setAccessibilityRowIndexRange:)] + pub unsafe fn setAccessibilityRowIndexRange(&self, accessibilityRowIndexRange: NSRange); + + #[method(accessibilityColumnIndexRange)] + pub unsafe fn accessibilityColumnIndexRange(&self) -> NSRange; + + #[method(setAccessibilityColumnIndexRange:)] + pub unsafe fn setAccessibilityColumnIndexRange( + &self, + accessibilityColumnIndexRange: NSRange, + ); + + #[method(accessibilityInsertionPointLineNumber)] + pub unsafe fn accessibilityInsertionPointLineNumber(&self) -> NSInteger; + + #[method(setAccessibilityInsertionPointLineNumber:)] + pub unsafe fn setAccessibilityInsertionPointLineNumber( + &self, + accessibilityInsertionPointLineNumber: NSInteger, + ); + + #[method(accessibilitySharedCharacterRange)] + pub unsafe fn accessibilitySharedCharacterRange(&self) -> NSRange; + + #[method(setAccessibilitySharedCharacterRange:)] + pub unsafe fn setAccessibilitySharedCharacterRange( + &self, + accessibilitySharedCharacterRange: NSRange, + ); + + #[method_id(@__retain_semantics Other accessibilitySharedTextUIElements)] + pub unsafe fn accessibilitySharedTextUIElements(&self) -> Option>; + + #[method(setAccessibilitySharedTextUIElements:)] + pub unsafe fn setAccessibilitySharedTextUIElements( + &self, + accessibilitySharedTextUIElements: Option<&NSArray>, + ); + + #[method(accessibilityVisibleCharacterRange)] + pub unsafe fn accessibilityVisibleCharacterRange(&self) -> NSRange; + + #[method(setAccessibilityVisibleCharacterRange:)] + pub unsafe fn setAccessibilityVisibleCharacterRange( + &self, + accessibilityVisibleCharacterRange: NSRange, + ); + + #[method(accessibilityNumberOfCharacters)] + pub unsafe fn accessibilityNumberOfCharacters(&self) -> NSInteger; + + #[method(setAccessibilityNumberOfCharacters:)] + pub unsafe fn setAccessibilityNumberOfCharacters( + &self, + accessibilityNumberOfCharacters: NSInteger, + ); + + #[method_id(@__retain_semantics Other accessibilitySelectedText)] + pub unsafe fn accessibilitySelectedText(&self) -> Option>; + + #[method(setAccessibilitySelectedText:)] + pub unsafe fn setAccessibilitySelectedText( + &self, + accessibilitySelectedText: Option<&NSString>, + ); + + #[method(accessibilitySelectedTextRange)] + pub unsafe fn accessibilitySelectedTextRange(&self) -> NSRange; + + #[method(setAccessibilitySelectedTextRange:)] + pub unsafe fn setAccessibilitySelectedTextRange( + &self, + accessibilitySelectedTextRange: NSRange, + ); + + #[method_id(@__retain_semantics Other accessibilitySelectedTextRanges)] + pub unsafe fn accessibilitySelectedTextRanges( + &self, + ) -> Option, Shared>>; + + #[method(setAccessibilitySelectedTextRanges:)] + pub unsafe fn setAccessibilitySelectedTextRanges( + &self, + accessibilitySelectedTextRanges: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other accessibilityAttributedStringForRange:)] + pub unsafe fn accessibilityAttributedStringForRange( + &self, + range: NSRange, + ) -> Option>; + + #[method(accessibilityRangeForLine:)] + pub unsafe fn accessibilityRangeForLine(&self, line: NSInteger) -> NSRange; + + #[method_id(@__retain_semantics Other accessibilityStringForRange:)] + pub unsafe fn accessibilityStringForRange( + &self, + range: NSRange, + ) -> Option>; + + #[method(accessibilityRangeForPosition:)] + pub unsafe fn accessibilityRangeForPosition(&self, point: NSPoint) -> NSRange; + + #[method(accessibilityRangeForIndex:)] + pub unsafe fn accessibilityRangeForIndex(&self, index: NSInteger) -> NSRange; + + #[method(accessibilityFrameForRange:)] + pub unsafe fn accessibilityFrameForRange(&self, range: NSRange) -> NSRect; + + #[method_id(@__retain_semantics Other accessibilityRTFForRange:)] + pub unsafe fn accessibilityRTFForRange(&self, range: NSRange) + -> Option>; + + #[method(accessibilityStyleRangeForIndex:)] + pub unsafe fn accessibilityStyleRangeForIndex(&self, index: NSInteger) -> NSRange; + + #[method(accessibilityLineForIndex:)] + pub unsafe fn accessibilityLineForIndex(&self, index: NSInteger) -> NSInteger; + + #[method_id(@__retain_semantics Other accessibilityToolbarButton)] + pub unsafe fn accessibilityToolbarButton(&self) -> Option>; + + #[method(setAccessibilityToolbarButton:)] + pub unsafe fn setAccessibilityToolbarButton( + &self, + accessibilityToolbarButton: Option<&Object>, + ); + + #[method(isAccessibilityModal)] + pub unsafe fn isAccessibilityModal(&self) -> bool; + + #[method(setAccessibilityModal:)] + pub unsafe fn setAccessibilityModal(&self, accessibilityModal: bool); + + #[method_id(@__retain_semantics Other accessibilityProxy)] + pub unsafe fn accessibilityProxy(&self) -> Option>; + + #[method(setAccessibilityProxy:)] + pub unsafe fn setAccessibilityProxy(&self, accessibilityProxy: Option<&Object>); + + #[method(isAccessibilityMain)] + pub unsafe fn isAccessibilityMain(&self) -> bool; + + #[method(setAccessibilityMain:)] + pub unsafe fn setAccessibilityMain(&self, accessibilityMain: bool); + + #[method_id(@__retain_semantics Other accessibilityFullScreenButton)] + pub unsafe fn accessibilityFullScreenButton(&self) -> Option>; + + #[method(setAccessibilityFullScreenButton:)] + pub unsafe fn setAccessibilityFullScreenButton( + &self, + accessibilityFullScreenButton: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityGrowArea)] + pub unsafe fn accessibilityGrowArea(&self) -> Option>; + + #[method(setAccessibilityGrowArea:)] + pub unsafe fn setAccessibilityGrowArea(&self, accessibilityGrowArea: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityDocument)] + pub unsafe fn accessibilityDocument(&self) -> Option>; + + #[method(setAccessibilityDocument:)] + pub unsafe fn setAccessibilityDocument(&self, accessibilityDocument: Option<&NSString>); + + #[method_id(@__retain_semantics Other accessibilityDefaultButton)] + pub unsafe fn accessibilityDefaultButton(&self) -> Option>; + + #[method(setAccessibilityDefaultButton:)] + pub unsafe fn setAccessibilityDefaultButton( + &self, + accessibilityDefaultButton: Option<&Object>, + ); + + #[method_id(@__retain_semantics Other accessibilityCloseButton)] + pub unsafe fn accessibilityCloseButton(&self) -> Option>; + + #[method(setAccessibilityCloseButton:)] + pub unsafe fn setAccessibilityCloseButton(&self, accessibilityCloseButton: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityZoomButton)] + pub unsafe fn accessibilityZoomButton(&self) -> Option>; + + #[method(setAccessibilityZoomButton:)] + pub unsafe fn setAccessibilityZoomButton(&self, accessibilityZoomButton: Option<&Object>); + + #[method_id(@__retain_semantics Other accessibilityMinimizeButton)] + pub unsafe fn accessibilityMinimizeButton(&self) -> Option>; + + #[method(setAccessibilityMinimizeButton:)] + pub unsafe fn setAccessibilityMinimizeButton( + &self, + accessibilityMinimizeButton: Option<&Object>, + ); + + #[method(isAccessibilityMinimized)] + pub unsafe fn isAccessibilityMinimized(&self) -> bool; + + #[method(setAccessibilityMinimized:)] + pub unsafe fn setAccessibilityMinimized(&self, accessibilityMinimized: bool); + + #[method_id(@__retain_semantics Other accessibilityCustomActions)] + pub unsafe fn accessibilityCustomActions( + &self, + ) -> Option, Shared>>; + + #[method(setAccessibilityCustomActions:)] + pub unsafe fn setAccessibilityCustomActions( + &self, + accessibilityCustomActions: Option<&NSArray>, + ); + + #[method(accessibilityPerformCancel)] + pub unsafe fn accessibilityPerformCancel(&self) -> bool; + + #[method(accessibilityPerformConfirm)] + pub unsafe fn accessibilityPerformConfirm(&self) -> bool; + + #[method(accessibilityPerformDecrement)] + pub unsafe fn accessibilityPerformDecrement(&self) -> bool; + + #[method(accessibilityPerformDelete)] + pub unsafe fn accessibilityPerformDelete(&self) -> bool; + + #[method(accessibilityPerformIncrement)] + pub unsafe fn accessibilityPerformIncrement(&self) -> bool; + + #[method(accessibilityPerformPick)] + pub unsafe fn accessibilityPerformPick(&self) -> bool; + + #[method(accessibilityPerformPress)] + pub unsafe fn accessibilityPerformPress(&self) -> bool; + + #[method(accessibilityPerformRaise)] + pub unsafe fn accessibilityPerformRaise(&self) -> bool; + + #[method(accessibilityPerformShowAlternateUI)] + pub unsafe fn accessibilityPerformShowAlternateUI(&self) -> bool; + + #[method(accessibilityPerformShowDefaultUI)] + pub unsafe fn accessibilityPerformShowDefaultUI(&self) -> bool; + + #[method(accessibilityPerformShowMenu)] + pub unsafe fn accessibilityPerformShowMenu(&self) -> bool; + + #[method(isAccessibilitySelectorAllowed:)] + pub unsafe fn isAccessibilitySelectorAllowed(&self, selector: Sel) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSAlert.rs b/crates/icrate/src/generated/AppKit/NSAlert.rs index 95b3a9896..5ccc709a4 100644 --- a/crates/icrate/src/generated/AppKit/NSAlert.rs +++ b/crates/icrate/src/generated/AppKit/NSAlert.rs @@ -115,7 +115,15 @@ extern_methods!( } ); -pub type NSAlertDelegate = NSObject; +extern_protocol!( + pub struct NSAlertDelegate; + + unsafe impl NSAlertDelegate { + #[optional] + #[method(alertShowHelp:)] + pub unsafe fn alertShowHelp(&self, alert: &NSAlert) -> bool; + } +); extern_methods!( /// NSAlertDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs index 64bad9a5e..b60f56368 100644 --- a/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs +++ b/crates/icrate/src/generated/AppKit/NSAlignmentFeedbackFilter.rs @@ -5,7 +5,11 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSAlignmentFeedbackToken = NSObject; +extern_protocol!( + pub struct NSAlignmentFeedbackToken; + + unsafe impl NSAlignmentFeedbackToken {} +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSAnimation.rs b/crates/icrate/src/generated/AppKit/NSAnimation.rs index d0259a76d..52f470258 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimation.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimation.rs @@ -143,7 +143,39 @@ extern_methods!( } ); -pub type NSAnimationDelegate = NSObject; +extern_protocol!( + pub struct NSAnimationDelegate; + + unsafe impl NSAnimationDelegate { + #[optional] + #[method(animationShouldStart:)] + pub unsafe fn animationShouldStart(&self, animation: &NSAnimation) -> bool; + + #[optional] + #[method(animationDidStop:)] + pub unsafe fn animationDidStop(&self, animation: &NSAnimation); + + #[optional] + #[method(animationDidEnd:)] + pub unsafe fn animationDidEnd(&self, animation: &NSAnimation); + + #[optional] + #[method(animation:valueForProgress:)] + pub unsafe fn animation_valueForProgress( + &self, + animation: &NSAnimation, + progress: NSAnimationProgress, + ) -> c_float; + + #[optional] + #[method(animation:didReachProgressMark:)] + pub unsafe fn animation_didReachProgressMark( + &self, + animation: &NSAnimation, + progress: NSAnimationProgress, + ); + } +); pub type NSViewAnimationKey = NSString; @@ -193,7 +225,36 @@ extern_methods!( pub type NSAnimatablePropertyKey = NSString; -pub type NSAnimatablePropertyContainer = NSObject; +extern_protocol!( + pub struct NSAnimatablePropertyContainer; + + unsafe impl NSAnimatablePropertyContainer { + #[method_id(@__retain_semantics Other animator)] + pub unsafe fn animator(&self) -> Id; + + #[method_id(@__retain_semantics Other animations)] + pub unsafe fn animations( + &self, + ) -> Id, Shared>; + + #[method(setAnimations:)] + pub unsafe fn setAnimations( + &self, + animations: &NSDictionary, + ); + + #[method_id(@__retain_semantics Other animationForKey:)] + pub unsafe fn animationForKey( + &self, + key: &NSAnimatablePropertyKey, + ) -> Option>; + + #[method_id(@__retain_semantics Other defaultAnimationForKey:)] + pub unsafe fn defaultAnimationForKey( + key: &NSAnimatablePropertyKey, + ) -> Option>; + } +); extern_static!(NSAnimationTriggerOrderIn: &'static NSAnimatablePropertyKey); diff --git a/crates/icrate/src/generated/AppKit/NSAppearance.rs b/crates/icrate/src/generated/AppKit/NSAppearance.rs index 5a095d3ae..d7fb4a81d 100644 --- a/crates/icrate/src/generated/AppKit/NSAppearance.rs +++ b/crates/icrate/src/generated/AppKit/NSAppearance.rs @@ -78,4 +78,17 @@ extern_static!(NSAppearanceNameAccessibilityHighContrastVibrantLight: &'static N extern_static!(NSAppearanceNameAccessibilityHighContrastVibrantDark: &'static NSAppearanceName); -pub type NSAppearanceCustomization = NSObject; +extern_protocol!( + pub struct NSAppearanceCustomization; + + unsafe impl NSAppearanceCustomization { + #[method_id(@__retain_semantics Other appearance)] + pub unsafe fn appearance(&self) -> Option>; + + #[method(setAppearance:)] + pub unsafe fn setAppearance(&self, appearance: Option<&NSAppearance>); + + #[method_id(@__retain_semantics Other effectiveAppearance)] + pub unsafe fn effectiveAppearance(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSApplication.rs b/crates/icrate/src/generated/AppKit/NSApplication.rs index 2b555a216..75f1fdcce 100644 --- a/crates/icrate/src/generated/AppKit/NSApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSApplication.rs @@ -542,7 +542,297 @@ ns_enum!( } ); -pub type NSApplicationDelegate = NSObject; +extern_protocol!( + pub struct NSApplicationDelegate; + + unsafe impl NSApplicationDelegate { + #[optional] + #[method(applicationShouldTerminate:)] + pub unsafe fn applicationShouldTerminate( + &self, + sender: &NSApplication, + ) -> NSApplicationTerminateReply; + + #[optional] + #[method(application:openURLs:)] + pub unsafe fn application_openURLs( + &self, + application: &NSApplication, + urls: &NSArray, + ); + + #[optional] + #[method(application:openFile:)] + pub unsafe fn application_openFile( + &self, + sender: &NSApplication, + filename: &NSString, + ) -> bool; + + #[optional] + #[method(application:openFiles:)] + pub unsafe fn application_openFiles( + &self, + sender: &NSApplication, + filenames: &NSArray, + ); + + #[optional] + #[method(application:openTempFile:)] + pub unsafe fn application_openTempFile( + &self, + sender: &NSApplication, + filename: &NSString, + ) -> bool; + + #[optional] + #[method(applicationShouldOpenUntitledFile:)] + pub unsafe fn applicationShouldOpenUntitledFile(&self, sender: &NSApplication) -> bool; + + #[optional] + #[method(applicationOpenUntitledFile:)] + pub unsafe fn applicationOpenUntitledFile(&self, sender: &NSApplication) -> bool; + + #[optional] + #[method(application:openFileWithoutUI:)] + pub unsafe fn application_openFileWithoutUI( + &self, + sender: &Object, + filename: &NSString, + ) -> bool; + + #[optional] + #[method(application:printFile:)] + pub unsafe fn application_printFile( + &self, + sender: &NSApplication, + filename: &NSString, + ) -> bool; + + #[optional] + #[method(application:printFiles:withSettings:showPrintPanels:)] + pub unsafe fn application_printFiles_withSettings_showPrintPanels( + &self, + application: &NSApplication, + fileNames: &NSArray, + printSettings: &NSDictionary, + showPrintPanels: bool, + ) -> NSApplicationPrintReply; + + #[optional] + #[method(applicationShouldTerminateAfterLastWindowClosed:)] + pub unsafe fn applicationShouldTerminateAfterLastWindowClosed( + &self, + sender: &NSApplication, + ) -> bool; + + #[optional] + #[method(applicationShouldHandleReopen:hasVisibleWindows:)] + pub unsafe fn applicationShouldHandleReopen_hasVisibleWindows( + &self, + sender: &NSApplication, + flag: bool, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other applicationDockMenu:)] + pub unsafe fn applicationDockMenu( + &self, + sender: &NSApplication, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other application:willPresentError:)] + pub unsafe fn application_willPresentError( + &self, + application: &NSApplication, + error: &NSError, + ) -> Id; + + #[optional] + #[method(application:didRegisterForRemoteNotificationsWithDeviceToken:)] + pub unsafe fn application_didRegisterForRemoteNotificationsWithDeviceToken( + &self, + application: &NSApplication, + deviceToken: &NSData, + ); + + #[optional] + #[method(application:didFailToRegisterForRemoteNotificationsWithError:)] + pub unsafe fn application_didFailToRegisterForRemoteNotificationsWithError( + &self, + application: &NSApplication, + error: &NSError, + ); + + #[optional] + #[method(application:didReceiveRemoteNotification:)] + pub unsafe fn application_didReceiveRemoteNotification( + &self, + application: &NSApplication, + userInfo: &NSDictionary, + ); + + #[optional] + #[method(applicationSupportsSecureRestorableState:)] + pub unsafe fn applicationSupportsSecureRestorableState(&self, app: &NSApplication) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other application:handlerForIntent:)] + pub unsafe fn application_handlerForIntent( + &self, + application: &NSApplication, + intent: &INIntent, + ) -> Option>; + + #[optional] + #[method(application:willEncodeRestorableState:)] + pub unsafe fn application_willEncodeRestorableState( + &self, + app: &NSApplication, + coder: &NSCoder, + ); + + #[optional] + #[method(application:didDecodeRestorableState:)] + pub unsafe fn application_didDecodeRestorableState( + &self, + app: &NSApplication, + coder: &NSCoder, + ); + + #[optional] + #[method(application:willContinueUserActivityWithType:)] + pub unsafe fn application_willContinueUserActivityWithType( + &self, + application: &NSApplication, + userActivityType: &NSString, + ) -> bool; + + #[optional] + #[method(application:continueUserActivity:restorationHandler:)] + pub unsafe fn application_continueUserActivity_restorationHandler( + &self, + application: &NSApplication, + userActivity: &NSUserActivity, + restorationHandler: &Block<(NonNull>,), ()>, + ) -> bool; + + #[optional] + #[method(application:didFailToContinueUserActivityWithType:error:)] + pub unsafe fn application_didFailToContinueUserActivityWithType_error( + &self, + application: &NSApplication, + userActivityType: &NSString, + error: &NSError, + ); + + #[optional] + #[method(application:didUpdateUserActivity:)] + pub unsafe fn application_didUpdateUserActivity( + &self, + application: &NSApplication, + userActivity: &NSUserActivity, + ); + + #[optional] + #[method(application:userDidAcceptCloudKitShareWithMetadata:)] + pub unsafe fn application_userDidAcceptCloudKitShareWithMetadata( + &self, + application: &NSApplication, + metadata: &CKShareMetadata, + ); + + #[optional] + #[method(application:delegateHandlesKey:)] + pub unsafe fn application_delegateHandlesKey( + &self, + sender: &NSApplication, + key: &NSString, + ) -> bool; + + #[optional] + #[method(applicationShouldAutomaticallyLocalizeKeyEquivalents:)] + pub unsafe fn applicationShouldAutomaticallyLocalizeKeyEquivalents( + &self, + application: &NSApplication, + ) -> bool; + + #[optional] + #[method(applicationWillFinishLaunching:)] + pub unsafe fn applicationWillFinishLaunching(&self, notification: &NSNotification); + + #[optional] + #[method(applicationDidFinishLaunching:)] + pub unsafe fn applicationDidFinishLaunching(&self, notification: &NSNotification); + + #[optional] + #[method(applicationWillHide:)] + pub unsafe fn applicationWillHide(&self, notification: &NSNotification); + + #[optional] + #[method(applicationDidHide:)] + pub unsafe fn applicationDidHide(&self, notification: &NSNotification); + + #[optional] + #[method(applicationWillUnhide:)] + pub unsafe fn applicationWillUnhide(&self, notification: &NSNotification); + + #[optional] + #[method(applicationDidUnhide:)] + pub unsafe fn applicationDidUnhide(&self, notification: &NSNotification); + + #[optional] + #[method(applicationWillBecomeActive:)] + pub unsafe fn applicationWillBecomeActive(&self, notification: &NSNotification); + + #[optional] + #[method(applicationDidBecomeActive:)] + pub unsafe fn applicationDidBecomeActive(&self, notification: &NSNotification); + + #[optional] + #[method(applicationWillResignActive:)] + pub unsafe fn applicationWillResignActive(&self, notification: &NSNotification); + + #[optional] + #[method(applicationDidResignActive:)] + pub unsafe fn applicationDidResignActive(&self, notification: &NSNotification); + + #[optional] + #[method(applicationWillUpdate:)] + pub unsafe fn applicationWillUpdate(&self, notification: &NSNotification); + + #[optional] + #[method(applicationDidUpdate:)] + pub unsafe fn applicationDidUpdate(&self, notification: &NSNotification); + + #[optional] + #[method(applicationWillTerminate:)] + pub unsafe fn applicationWillTerminate(&self, notification: &NSNotification); + + #[optional] + #[method(applicationDidChangeScreenParameters:)] + pub unsafe fn applicationDidChangeScreenParameters(&self, notification: &NSNotification); + + #[optional] + #[method(applicationDidChangeOcclusionState:)] + pub unsafe fn applicationDidChangeOcclusionState(&self, notification: &NSNotification); + + #[optional] + #[method(applicationProtectedDataWillBecomeUnavailable:)] + pub unsafe fn applicationProtectedDataWillBecomeUnavailable( + &self, + notification: &NSNotification, + ); + + #[optional] + #[method(applicationProtectedDataDidBecomeAvailable:)] + pub unsafe fn applicationProtectedDataDidBecomeAvailable( + &self, + notification: &NSNotification, + ); + } +); extern_methods!( /// NSServicesMenu @@ -562,7 +852,23 @@ extern_methods!( } ); -pub type NSServicesMenuRequestor = NSObject; +extern_protocol!( + pub struct NSServicesMenuRequestor; + + unsafe impl NSServicesMenuRequestor { + #[optional] + #[method(writeSelectionToPasteboard:types:)] + pub unsafe fn writeSelectionToPasteboard_types( + &self, + pboard: &NSPasteboard, + types: &NSArray, + ) -> bool; + + #[optional] + #[method(readSelectionFromPasteboard:)] + pub unsafe fn readSelectionFromPasteboard(&self, pboard: &NSPasteboard) -> bool; + } +); extern_methods!( /// NSServicesHandling diff --git a/crates/icrate/src/generated/AppKit/NSBrowser.rs b/crates/icrate/src/generated/AppKit/NSBrowser.rs index ed087af63..c7d8dd8de 100644 --- a/crates/icrate/src/generated/AppKit/NSBrowser.rs +++ b/crates/icrate/src/generated/AppKit/NSBrowser.rs @@ -427,7 +427,293 @@ extern_methods!( extern_static!(NSBrowserColumnConfigurationDidChangeNotification: &'static NSNotificationName); -pub type NSBrowserDelegate = NSObject; +extern_protocol!( + pub struct NSBrowserDelegate; + + unsafe impl NSBrowserDelegate { + #[optional] + #[method(browser:numberOfRowsInColumn:)] + pub unsafe fn browser_numberOfRowsInColumn( + &self, + sender: &NSBrowser, + column: NSInteger, + ) -> NSInteger; + + #[optional] + #[method(browser:createRowsForColumn:inMatrix:)] + pub unsafe fn browser_createRowsForColumn_inMatrix( + &self, + sender: &NSBrowser, + column: NSInteger, + matrix: &NSMatrix, + ); + + #[optional] + #[method(browser:numberOfChildrenOfItem:)] + pub unsafe fn browser_numberOfChildrenOfItem( + &self, + browser: &NSBrowser, + item: Option<&Object>, + ) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other browser:child:ofItem:)] + pub unsafe fn browser_child_ofItem( + &self, + browser: &NSBrowser, + index: NSInteger, + item: Option<&Object>, + ) -> Id; + + #[optional] + #[method(browser:isLeafItem:)] + pub unsafe fn browser_isLeafItem(&self, browser: &NSBrowser, item: Option<&Object>) + -> bool; + + #[optional] + #[method_id(@__retain_semantics Other browser:objectValueForItem:)] + pub unsafe fn browser_objectValueForItem( + &self, + browser: &NSBrowser, + item: Option<&Object>, + ) -> Option>; + + #[optional] + #[method(browser:heightOfRow:inColumn:)] + pub unsafe fn browser_heightOfRow_inColumn( + &self, + browser: &NSBrowser, + row: NSInteger, + columnIndex: NSInteger, + ) -> CGFloat; + + #[optional] + #[method_id(@__retain_semantics Other rootItemForBrowser:)] + pub unsafe fn rootItemForBrowser(&self, browser: &NSBrowser) -> Option>; + + #[optional] + #[method(browser:setObjectValue:forItem:)] + pub unsafe fn browser_setObjectValue_forItem( + &self, + browser: &NSBrowser, + object: Option<&Object>, + item: Option<&Object>, + ); + + #[optional] + #[method(browser:shouldEditItem:)] + pub unsafe fn browser_shouldEditItem( + &self, + browser: &NSBrowser, + item: Option<&Object>, + ) -> bool; + + #[optional] + #[method(browser:willDisplayCell:atRow:column:)] + pub unsafe fn browser_willDisplayCell_atRow_column( + &self, + sender: &NSBrowser, + cell: &Object, + row: NSInteger, + column: NSInteger, + ); + + #[optional] + #[method_id(@__retain_semantics Other browser:titleOfColumn:)] + pub unsafe fn browser_titleOfColumn( + &self, + sender: &NSBrowser, + column: NSInteger, + ) -> Option>; + + #[optional] + #[method(browser:selectCellWithString:inColumn:)] + pub unsafe fn browser_selectCellWithString_inColumn( + &self, + sender: &NSBrowser, + title: &NSString, + column: NSInteger, + ) -> bool; + + #[optional] + #[method(browser:selectRow:inColumn:)] + pub unsafe fn browser_selectRow_inColumn( + &self, + sender: &NSBrowser, + row: NSInteger, + column: NSInteger, + ) -> bool; + + #[optional] + #[method(browser:isColumnValid:)] + pub unsafe fn browser_isColumnValid(&self, sender: &NSBrowser, column: NSInteger) -> bool; + + #[optional] + #[method(browserWillScroll:)] + pub unsafe fn browserWillScroll(&self, sender: &NSBrowser); + + #[optional] + #[method(browserDidScroll:)] + pub unsafe fn browserDidScroll(&self, sender: &NSBrowser); + + #[optional] + #[method(browser:shouldSizeColumn:forUserResize:toWidth:)] + pub unsafe fn browser_shouldSizeColumn_forUserResize_toWidth( + &self, + browser: &NSBrowser, + columnIndex: NSInteger, + forUserResize: bool, + suggestedWidth: CGFloat, + ) -> CGFloat; + + #[optional] + #[method(browser:sizeToFitWidthOfColumn:)] + pub unsafe fn browser_sizeToFitWidthOfColumn( + &self, + browser: &NSBrowser, + columnIndex: NSInteger, + ) -> CGFloat; + + #[optional] + #[method(browserColumnConfigurationDidChange:)] + pub unsafe fn browserColumnConfigurationDidChange(&self, notification: &NSNotification); + + #[optional] + #[method(browser:shouldShowCellExpansionForRow:column:)] + pub unsafe fn browser_shouldShowCellExpansionForRow_column( + &self, + browser: &NSBrowser, + row: NSInteger, + column: NSInteger, + ) -> bool; + + #[optional] + #[method(browser:writeRowsWithIndexes:inColumn:toPasteboard:)] + pub unsafe fn browser_writeRowsWithIndexes_inColumn_toPasteboard( + &self, + browser: &NSBrowser, + rowIndexes: &NSIndexSet, + column: NSInteger, + pasteboard: &NSPasteboard, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other browser:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:inColumn:)] + pub unsafe fn browser_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_inColumn( + &self, + browser: &NSBrowser, + dropDestination: &NSURL, + rowIndexes: &NSIndexSet, + column: NSInteger, + ) -> Id, Shared>; + + #[optional] + #[method(browser:canDragRowsWithIndexes:inColumn:withEvent:)] + pub unsafe fn browser_canDragRowsWithIndexes_inColumn_withEvent( + &self, + browser: &NSBrowser, + rowIndexes: &NSIndexSet, + column: NSInteger, + event: &NSEvent, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other browser:draggingImageForRowsWithIndexes:inColumn:withEvent:offset:)] + pub unsafe fn browser_draggingImageForRowsWithIndexes_inColumn_withEvent_offset( + &self, + browser: &NSBrowser, + rowIndexes: &NSIndexSet, + column: NSInteger, + event: &NSEvent, + dragImageOffset: NSPointPointer, + ) -> Option>; + + #[optional] + #[method(browser:validateDrop:proposedRow:column:dropOperation:)] + pub unsafe fn browser_validateDrop_proposedRow_column_dropOperation( + &self, + browser: &NSBrowser, + info: &NSDraggingInfo, + row: NonNull, + column: NonNull, + dropOperation: NonNull, + ) -> NSDragOperation; + + #[optional] + #[method(browser:acceptDrop:atRow:column:dropOperation:)] + pub unsafe fn browser_acceptDrop_atRow_column_dropOperation( + &self, + browser: &NSBrowser, + info: &NSDraggingInfo, + row: NSInteger, + column: NSInteger, + dropOperation: NSBrowserDropOperation, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other browser:typeSelectStringForRow:inColumn:)] + pub unsafe fn browser_typeSelectStringForRow_inColumn( + &self, + browser: &NSBrowser, + row: NSInteger, + column: NSInteger, + ) -> Option>; + + #[optional] + #[method(browser:shouldTypeSelectForEvent:withCurrentSearchString:)] + pub unsafe fn browser_shouldTypeSelectForEvent_withCurrentSearchString( + &self, + browser: &NSBrowser, + event: &NSEvent, + searchString: Option<&NSString>, + ) -> bool; + + #[optional] + #[method(browser:nextTypeSelectMatchFromRow:toRow:inColumn:forString:)] + pub unsafe fn browser_nextTypeSelectMatchFromRow_toRow_inColumn_forString( + &self, + browser: &NSBrowser, + startRow: NSInteger, + endRow: NSInteger, + column: NSInteger, + searchString: Option<&NSString>, + ) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other browser:previewViewControllerForLeafItem:)] + pub unsafe fn browser_previewViewControllerForLeafItem( + &self, + browser: &NSBrowser, + item: &Object, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other browser:headerViewControllerForItem:)] + pub unsafe fn browser_headerViewControllerForItem( + &self, + browser: &NSBrowser, + item: Option<&Object>, + ) -> Option>; + + #[optional] + #[method(browser:didChangeLastColumn:toColumn:)] + pub unsafe fn browser_didChangeLastColumn_toColumn( + &self, + browser: &NSBrowser, + oldLastColumn: NSInteger, + column: NSInteger, + ); + + #[optional] + #[method_id(@__retain_semantics Other browser:selectionIndexesForProposedSelection:inColumn:)] + pub unsafe fn browser_selectionIndexesForProposedSelection_inColumn( + &self, + browser: &NSBrowser, + proposedSelectionIndexes: &NSIndexSet, + column: NSInteger, + ) -> Id; + } +); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs index aabfc719c..36a7044b7 100644 --- a/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSCandidateListTouchBarItem.rs @@ -89,7 +89,44 @@ extern_methods!( } ); -pub type NSCandidateListTouchBarItemDelegate = NSObject; +extern_protocol!( + pub struct NSCandidateListTouchBarItemDelegate; + + unsafe impl NSCandidateListTouchBarItemDelegate { + #[optional] + #[method(candidateListTouchBarItem:beginSelectingCandidateAtIndex:)] + pub unsafe fn candidateListTouchBarItem_beginSelectingCandidateAtIndex( + &self, + anItem: &NSCandidateListTouchBarItem, + index: NSInteger, + ); + + #[optional] + #[method(candidateListTouchBarItem:changeSelectionFromCandidateAtIndex:toIndex:)] + pub unsafe fn candidateListTouchBarItem_changeSelectionFromCandidateAtIndex_toIndex( + &self, + anItem: &NSCandidateListTouchBarItem, + previousIndex: NSInteger, + index: NSInteger, + ); + + #[optional] + #[method(candidateListTouchBarItem:endSelectingCandidateAtIndex:)] + pub unsafe fn candidateListTouchBarItem_endSelectingCandidateAtIndex( + &self, + anItem: &NSCandidateListTouchBarItem, + index: NSInteger, + ); + + #[optional] + #[method(candidateListTouchBarItem:changedCandidateListVisibility:)] + pub unsafe fn candidateListTouchBarItem_changedCandidateListVisibility( + &self, + anItem: &NSCandidateListTouchBarItem, + isVisible: bool, + ); + } +); extern_methods!( /// NSCandidateListTouchBarItem diff --git a/crates/icrate/src/generated/AppKit/NSCollectionView.rs b/crates/icrate/src/generated/AppKit/NSCollectionView.rs index 6868999b1..816e42117 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionView.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionView.rs @@ -42,9 +42,59 @@ ns_options!( pub type NSCollectionViewSupplementaryElementKind = NSString; -pub type NSCollectionViewElement = NSObject; +extern_protocol!( + pub struct NSCollectionViewElement; -pub type NSCollectionViewSectionHeaderView = NSObject; + unsafe impl NSCollectionViewElement { + #[optional] + #[method(prepareForReuse)] + pub unsafe fn prepareForReuse(&self); + + #[optional] + #[method(applyLayoutAttributes:)] + pub unsafe fn applyLayoutAttributes( + &self, + layoutAttributes: &NSCollectionViewLayoutAttributes, + ); + + #[optional] + #[method(willTransitionFromLayout:toLayout:)] + pub unsafe fn willTransitionFromLayout_toLayout( + &self, + oldLayout: &NSCollectionViewLayout, + newLayout: &NSCollectionViewLayout, + ); + + #[optional] + #[method(didTransitionFromLayout:toLayout:)] + pub unsafe fn didTransitionFromLayout_toLayout( + &self, + oldLayout: &NSCollectionViewLayout, + newLayout: &NSCollectionViewLayout, + ); + + #[optional] + #[method_id(@__retain_semantics Other preferredLayoutAttributesFittingAttributes:)] + pub unsafe fn preferredLayoutAttributesFittingAttributes( + &self, + layoutAttributes: &NSCollectionViewLayoutAttributes, + ) -> Id; + } +); + +extern_protocol!( + pub struct NSCollectionViewSectionHeaderView; + + unsafe impl NSCollectionViewSectionHeaderView { + #[optional] + #[method_id(@__retain_semantics Other sectionCollapseButton)] + pub unsafe fn sectionCollapseButton(&self) -> Option>; + + #[optional] + #[method(setSectionCollapseButton:)] + pub unsafe fn setSectionCollapseButton(&self, sectionCollapseButton: Option<&NSButton>); + } +); extern_class!( #[derive(Debug)] @@ -404,11 +454,333 @@ extern_methods!( } ); -pub type NSCollectionViewDataSource = NSObject; +extern_protocol!( + pub struct NSCollectionViewDataSource; + + unsafe impl NSCollectionViewDataSource { + #[method(collectionView:numberOfItemsInSection:)] + pub unsafe fn collectionView_numberOfItemsInSection( + &self, + collectionView: &NSCollectionView, + section: NSInteger, + ) -> NSInteger; + + #[method_id(@__retain_semantics Other collectionView:itemForRepresentedObjectAtIndexPath:)] + pub unsafe fn collectionView_itemForRepresentedObjectAtIndexPath( + &self, + collectionView: &NSCollectionView, + indexPath: &NSIndexPath, + ) -> Id; + + #[optional] + #[method(numberOfSectionsInCollectionView:)] + pub unsafe fn numberOfSectionsInCollectionView( + &self, + collectionView: &NSCollectionView, + ) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:viewForSupplementaryElementOfKind:atIndexPath:)] + pub unsafe fn collectionView_viewForSupplementaryElementOfKind_atIndexPath( + &self, + collectionView: &NSCollectionView, + kind: &NSCollectionViewSupplementaryElementKind, + indexPath: &NSIndexPath, + ) -> Id; + } +); + +extern_protocol!( + pub struct NSCollectionViewPrefetching; + + unsafe impl NSCollectionViewPrefetching { + #[method(collectionView:prefetchItemsAtIndexPaths:)] + pub unsafe fn collectionView_prefetchItemsAtIndexPaths( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSArray, + ); + + #[optional] + #[method(collectionView:cancelPrefetchingForItemsAtIndexPaths:)] + pub unsafe fn collectionView_cancelPrefetchingForItemsAtIndexPaths( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSArray, + ); + } +); + +extern_protocol!( + pub struct NSCollectionViewDelegate; + + unsafe impl NSCollectionViewDelegate { + #[optional] + #[method(collectionView:canDragItemsAtIndexPaths:withEvent:)] + pub unsafe fn collectionView_canDragItemsAtIndexPaths_withEvent( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSSet, + event: &NSEvent, + ) -> bool; + + #[optional] + #[method(collectionView:canDragItemsAtIndexes:withEvent:)] + pub unsafe fn collectionView_canDragItemsAtIndexes_withEvent( + &self, + collectionView: &NSCollectionView, + indexes: &NSIndexSet, + event: &NSEvent, + ) -> bool; + + #[optional] + #[method(collectionView:writeItemsAtIndexPaths:toPasteboard:)] + pub unsafe fn collectionView_writeItemsAtIndexPaths_toPasteboard( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSSet, + pasteboard: &NSPasteboard, + ) -> bool; + + #[optional] + #[method(collectionView:writeItemsAtIndexes:toPasteboard:)] + pub unsafe fn collectionView_writeItemsAtIndexes_toPasteboard( + &self, + collectionView: &NSCollectionView, + indexes: &NSIndexSet, + pasteboard: &NSPasteboard, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexPaths:)] + pub unsafe fn collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexPaths( + &self, + collectionView: &NSCollectionView, + dropURL: &NSURL, + indexPaths: &NSSet, + ) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:namesOfPromisedFilesDroppedAtDestination:forDraggedItemsAtIndexes:)] + pub unsafe fn collectionView_namesOfPromisedFilesDroppedAtDestination_forDraggedItemsAtIndexes( + &self, + collectionView: &NSCollectionView, + dropURL: &NSURL, + indexes: &NSIndexSet, + ) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:draggingImageForItemsAtIndexPaths:withEvent:offset:)] + pub unsafe fn collectionView_draggingImageForItemsAtIndexPaths_withEvent_offset( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSSet, + event: &NSEvent, + dragImageOffset: NSPointPointer, + ) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:draggingImageForItemsAtIndexes:withEvent:offset:)] + pub unsafe fn collectionView_draggingImageForItemsAtIndexes_withEvent_offset( + &self, + collectionView: &NSCollectionView, + indexes: &NSIndexSet, + event: &NSEvent, + dragImageOffset: NSPointPointer, + ) -> Id; + + #[optional] + #[method(collectionView:validateDrop:proposedIndexPath:dropOperation:)] + pub unsafe fn collectionView_validateDrop_proposedIndexPath_dropOperation( + &self, + collectionView: &NSCollectionView, + draggingInfo: &NSDraggingInfo, + proposedDropIndexPath: NonNull>, + proposedDropOperation: NonNull, + ) -> NSDragOperation; + + #[optional] + #[method(collectionView:validateDrop:proposedIndex:dropOperation:)] + pub unsafe fn collectionView_validateDrop_proposedIndex_dropOperation( + &self, + collectionView: &NSCollectionView, + draggingInfo: &NSDraggingInfo, + proposedDropIndex: NonNull, + proposedDropOperation: NonNull, + ) -> NSDragOperation; + + #[optional] + #[method(collectionView:acceptDrop:indexPath:dropOperation:)] + pub unsafe fn collectionView_acceptDrop_indexPath_dropOperation( + &self, + collectionView: &NSCollectionView, + draggingInfo: &NSDraggingInfo, + indexPath: &NSIndexPath, + dropOperation: NSCollectionViewDropOperation, + ) -> bool; + + #[optional] + #[method(collectionView:acceptDrop:index:dropOperation:)] + pub unsafe fn collectionView_acceptDrop_index_dropOperation( + &self, + collectionView: &NSCollectionView, + draggingInfo: &NSDraggingInfo, + index: NSInteger, + dropOperation: NSCollectionViewDropOperation, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:pasteboardWriterForItemAtIndexPath:)] + pub unsafe fn collectionView_pasteboardWriterForItemAtIndexPath( + &self, + collectionView: &NSCollectionView, + indexPath: &NSIndexPath, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:pasteboardWriterForItemAtIndex:)] + pub unsafe fn collectionView_pasteboardWriterForItemAtIndex( + &self, + collectionView: &NSCollectionView, + index: NSUInteger, + ) -> Option>; + + #[optional] + #[method(collectionView:draggingSession:willBeginAtPoint:forItemsAtIndexPaths:)] + pub unsafe fn collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexPaths( + &self, + collectionView: &NSCollectionView, + session: &NSDraggingSession, + screenPoint: NSPoint, + indexPaths: &NSSet, + ); + + #[optional] + #[method(collectionView:draggingSession:willBeginAtPoint:forItemsAtIndexes:)] + pub unsafe fn collectionView_draggingSession_willBeginAtPoint_forItemsAtIndexes( + &self, + collectionView: &NSCollectionView, + session: &NSDraggingSession, + screenPoint: NSPoint, + indexes: &NSIndexSet, + ); + + #[optional] + #[method(collectionView:draggingSession:endedAtPoint:dragOperation:)] + pub unsafe fn collectionView_draggingSession_endedAtPoint_dragOperation( + &self, + collectionView: &NSCollectionView, + session: &NSDraggingSession, + screenPoint: NSPoint, + operation: NSDragOperation, + ); -pub type NSCollectionViewPrefetching = NSObject; + #[optional] + #[method(collectionView:updateDraggingItemsForDrag:)] + pub unsafe fn collectionView_updateDraggingItemsForDrag( + &self, + collectionView: &NSCollectionView, + draggingInfo: &NSDraggingInfo, + ); -pub type NSCollectionViewDelegate = NSObject; + #[optional] + #[method_id(@__retain_semantics Other collectionView:shouldChangeItemsAtIndexPaths:toHighlightState:)] + pub unsafe fn collectionView_shouldChangeItemsAtIndexPaths_toHighlightState( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSSet, + highlightState: NSCollectionViewItemHighlightState, + ) -> Id, Shared>; + + #[optional] + #[method(collectionView:didChangeItemsAtIndexPaths:toHighlightState:)] + pub unsafe fn collectionView_didChangeItemsAtIndexPaths_toHighlightState( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSSet, + highlightState: NSCollectionViewItemHighlightState, + ); + + #[optional] + #[method_id(@__retain_semantics Other collectionView:shouldSelectItemsAtIndexPaths:)] + pub unsafe fn collectionView_shouldSelectItemsAtIndexPaths( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSSet, + ) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other collectionView:shouldDeselectItemsAtIndexPaths:)] + pub unsafe fn collectionView_shouldDeselectItemsAtIndexPaths( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSSet, + ) -> Id, Shared>; + + #[optional] + #[method(collectionView:didSelectItemsAtIndexPaths:)] + pub unsafe fn collectionView_didSelectItemsAtIndexPaths( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSSet, + ); + + #[optional] + #[method(collectionView:didDeselectItemsAtIndexPaths:)] + pub unsafe fn collectionView_didDeselectItemsAtIndexPaths( + &self, + collectionView: &NSCollectionView, + indexPaths: &NSSet, + ); + + #[optional] + #[method(collectionView:willDisplayItem:forRepresentedObjectAtIndexPath:)] + pub unsafe fn collectionView_willDisplayItem_forRepresentedObjectAtIndexPath( + &self, + collectionView: &NSCollectionView, + item: &NSCollectionViewItem, + indexPath: &NSIndexPath, + ); + + #[optional] + #[method(collectionView:willDisplaySupplementaryView:forElementKind:atIndexPath:)] + pub unsafe fn collectionView_willDisplaySupplementaryView_forElementKind_atIndexPath( + &self, + collectionView: &NSCollectionView, + view: &NSView, + elementKind: &NSCollectionViewSupplementaryElementKind, + indexPath: &NSIndexPath, + ); + + #[optional] + #[method(collectionView:didEndDisplayingItem:forRepresentedObjectAtIndexPath:)] + pub unsafe fn collectionView_didEndDisplayingItem_forRepresentedObjectAtIndexPath( + &self, + collectionView: &NSCollectionView, + item: &NSCollectionViewItem, + indexPath: &NSIndexPath, + ); + + #[optional] + #[method(collectionView:didEndDisplayingSupplementaryView:forElementOfKind:atIndexPath:)] + pub unsafe fn collectionView_didEndDisplayingSupplementaryView_forElementOfKind_atIndexPath( + &self, + collectionView: &NSCollectionView, + view: &NSView, + elementKind: &NSCollectionViewSupplementaryElementKind, + indexPath: &NSIndexPath, + ); + + #[optional] + #[method_id(@__retain_semantics Other collectionView:transitionLayoutForOldLayout:newLayout:)] + pub unsafe fn collectionView_transitionLayoutForOldLayout_newLayout( + &self, + collectionView: &NSCollectionView, + fromLayout: &NSCollectionViewLayout, + toLayout: &NSCollectionViewLayout, + ) -> Id; + } +); extern_methods!( /// NSCollectionViewAdditions diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs index 24df6c8c7..da78e2795 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewCompositionalLayout.rs @@ -754,8 +754,77 @@ extern_methods!( } ); -pub type NSCollectionLayoutContainer = NSObject; +extern_protocol!( + pub struct NSCollectionLayoutContainer; -pub type NSCollectionLayoutEnvironment = NSObject; + unsafe impl NSCollectionLayoutContainer { + #[method(contentSize)] + pub unsafe fn contentSize(&self) -> NSSize; -pub type NSCollectionLayoutVisibleItem = NSObject; + #[method(effectiveContentSize)] + pub unsafe fn effectiveContentSize(&self) -> NSSize; + + #[method(contentInsets)] + pub unsafe fn contentInsets(&self) -> NSDirectionalEdgeInsets; + + #[method(effectiveContentInsets)] + pub unsafe fn effectiveContentInsets(&self) -> NSDirectionalEdgeInsets; + } +); + +extern_protocol!( + pub struct NSCollectionLayoutEnvironment; + + unsafe impl NSCollectionLayoutEnvironment { + #[method_id(@__retain_semantics Other container)] + pub unsafe fn container(&self) -> Id; + } +); + +extern_protocol!( + pub struct NSCollectionLayoutVisibleItem; + + unsafe impl NSCollectionLayoutVisibleItem { + #[method(alpha)] + pub unsafe fn alpha(&self) -> CGFloat; + + #[method(setAlpha:)] + pub unsafe fn setAlpha(&self, alpha: CGFloat); + + #[method(zIndex)] + pub unsafe fn zIndex(&self) -> NSInteger; + + #[method(setZIndex:)] + pub unsafe fn setZIndex(&self, zIndex: NSInteger); + + #[method(isHidden)] + pub unsafe fn isHidden(&self) -> bool; + + #[method(setHidden:)] + pub unsafe fn setHidden(&self, hidden: bool); + + #[method(center)] + pub unsafe fn center(&self) -> NSPoint; + + #[method(setCenter:)] + pub unsafe fn setCenter(&self, center: NSPoint); + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method_id(@__retain_semantics Other indexPath)] + pub unsafe fn indexPath(&self) -> Id; + + #[method(frame)] + pub unsafe fn frame(&self) -> NSRect; + + #[method(bounds)] + pub unsafe fn bounds(&self) -> NSRect; + + #[method(representedElementCategory)] + pub unsafe fn representedElementCategory(&self) -> NSCollectionElementCategory; + + #[method_id(@__retain_semantics Other representedElementKind)] + pub unsafe fn representedElementKind(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs index 50dbf2ba9..94f68bc3b 100644 --- a/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSCollectionViewFlowLayout.rs @@ -52,7 +52,65 @@ extern_methods!( } ); -pub type NSCollectionViewDelegateFlowLayout = NSObject; +extern_protocol!( + pub struct NSCollectionViewDelegateFlowLayout; + + unsafe impl NSCollectionViewDelegateFlowLayout { + #[optional] + #[method(collectionView:layout:sizeForItemAtIndexPath:)] + pub unsafe fn collectionView_layout_sizeForItemAtIndexPath( + &self, + collectionView: &NSCollectionView, + collectionViewLayout: &NSCollectionViewLayout, + indexPath: &NSIndexPath, + ) -> NSSize; + + #[optional] + #[method(collectionView:layout:insetForSectionAtIndex:)] + pub unsafe fn collectionView_layout_insetForSectionAtIndex( + &self, + collectionView: &NSCollectionView, + collectionViewLayout: &NSCollectionViewLayout, + section: NSInteger, + ) -> NSEdgeInsets; + + #[optional] + #[method(collectionView:layout:minimumLineSpacingForSectionAtIndex:)] + pub unsafe fn collectionView_layout_minimumLineSpacingForSectionAtIndex( + &self, + collectionView: &NSCollectionView, + collectionViewLayout: &NSCollectionViewLayout, + section: NSInteger, + ) -> CGFloat; + + #[optional] + #[method(collectionView:layout:minimumInteritemSpacingForSectionAtIndex:)] + pub unsafe fn collectionView_layout_minimumInteritemSpacingForSectionAtIndex( + &self, + collectionView: &NSCollectionView, + collectionViewLayout: &NSCollectionViewLayout, + section: NSInteger, + ) -> CGFloat; + + #[optional] + #[method(collectionView:layout:referenceSizeForHeaderInSection:)] + pub unsafe fn collectionView_layout_referenceSizeForHeaderInSection( + &self, + collectionView: &NSCollectionView, + collectionViewLayout: &NSCollectionViewLayout, + section: NSInteger, + ) -> NSSize; + + #[optional] + #[method(collectionView:layout:referenceSizeForFooterInSection:)] + pub unsafe fn collectionView_layout_referenceSizeForFooterInSection( + &self, + collectionView: &NSCollectionView, + collectionViewLayout: &NSCollectionViewLayout, + section: NSInteger, + ) -> NSSize; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSColorPanel.rs b/crates/icrate/src/generated/AppKit/NSColorPanel.rs index b9b24a483..4b1419986 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPanel.rs @@ -120,7 +120,14 @@ extern_methods!( } ); -pub type NSColorChanging = NSObject; +extern_protocol!( + pub struct NSColorChanging; + + unsafe impl NSColorChanging { + #[method(changeColor:)] + pub unsafe fn changeColor(&self, sender: Option<&NSColorPanel>); + } +); extern_methods!( /// NSColorPanelResponderMethod diff --git a/crates/icrate/src/generated/AppKit/NSColorPicking.rs b/crates/icrate/src/generated/AppKit/NSColorPicking.rs index 7d7018e48..6aaf4aba7 100644 --- a/crates/icrate/src/generated/AppKit/NSColorPicking.rs +++ b/crates/icrate/src/generated/AppKit/NSColorPicking.rs @@ -5,6 +5,64 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSColorPickingDefault = NSObject; +extern_protocol!( + pub struct NSColorPickingDefault; -pub type NSColorPickingCustom = NSObject; + unsafe impl NSColorPickingDefault { + #[method_id(@__retain_semantics Init initWithPickerMask:colorPanel:)] + pub unsafe fn initWithPickerMask_colorPanel( + this: Option>, + mask: NSUInteger, + owningColorPanel: &NSColorPanel, + ) -> Option>; + + #[method_id(@__retain_semantics Other provideNewButtonImage)] + pub unsafe fn provideNewButtonImage(&self) -> Id; + + #[method(insertNewButtonImage:in:)] + pub unsafe fn insertNewButtonImage_in( + &self, + newButtonImage: &NSImage, + buttonCell: &NSButtonCell, + ); + + #[method(viewSizeChanged:)] + pub unsafe fn viewSizeChanged(&self, sender: Option<&Object>); + + #[method(alphaControlAddedOrRemoved:)] + pub unsafe fn alphaControlAddedOrRemoved(&self, sender: Option<&Object>); + + #[method(attachColorList:)] + pub unsafe fn attachColorList(&self, colorList: &NSColorList); + + #[method(detachColorList:)] + pub unsafe fn detachColorList(&self, colorList: &NSColorList); + + #[method(setMode:)] + pub unsafe fn setMode(&self, mode: NSColorPanelMode); + + #[method_id(@__retain_semantics Other buttonToolTip)] + pub unsafe fn buttonToolTip(&self) -> Id; + + #[method(minContentSize)] + pub unsafe fn minContentSize(&self) -> NSSize; + } +); + +extern_protocol!( + pub struct NSColorPickingCustom; + + unsafe impl NSColorPickingCustom { + #[method(supportsMode:)] + pub unsafe fn supportsMode(&self, mode: NSColorPanelMode) -> bool; + + #[method(currentMode)] + pub unsafe fn currentMode(&self) -> NSColorPanelMode; + + #[method_id(@__retain_semantics Other provideNewView:)] + pub unsafe fn provideNewView(&self, initialRequest: bool) -> Id; + + #[method(setColor:)] + pub unsafe fn setColor(&self, newColor: &NSColor); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSComboBox.rs b/crates/icrate/src/generated/AppKit/NSComboBox.rs index af6495fdd..966416496 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBox.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBox.rs @@ -13,9 +13,61 @@ extern_static!(NSComboBoxSelectionDidChangeNotification: &'static NSNotification extern_static!(NSComboBoxSelectionIsChangingNotification: &'static NSNotificationName); -pub type NSComboBoxDataSource = NSObject; +extern_protocol!( + pub struct NSComboBoxDataSource; + + unsafe impl NSComboBoxDataSource { + #[optional] + #[method(numberOfItemsInComboBox:)] + pub unsafe fn numberOfItemsInComboBox(&self, comboBox: &NSComboBox) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other comboBox:objectValueForItemAtIndex:)] + pub unsafe fn comboBox_objectValueForItemAtIndex( + &self, + comboBox: &NSComboBox, + index: NSInteger, + ) -> Option>; + + #[optional] + #[method(comboBox:indexOfItemWithStringValue:)] + pub unsafe fn comboBox_indexOfItemWithStringValue( + &self, + comboBox: &NSComboBox, + string: &NSString, + ) -> NSUInteger; + + #[optional] + #[method_id(@__retain_semantics Other comboBox:completedString:)] + pub unsafe fn comboBox_completedString( + &self, + comboBox: &NSComboBox, + string: &NSString, + ) -> Option>; + } +); + +extern_protocol!( + pub struct NSComboBoxDelegate; + + unsafe impl NSComboBoxDelegate { + #[optional] + #[method(comboBoxWillPopUp:)] + pub unsafe fn comboBoxWillPopUp(&self, notification: &NSNotification); -pub type NSComboBoxDelegate = NSObject; + #[optional] + #[method(comboBoxWillDismiss:)] + pub unsafe fn comboBoxWillDismiss(&self, notification: &NSNotification); + + #[optional] + #[method(comboBoxSelectionDidChange:)] + pub unsafe fn comboBoxSelectionDidChange(&self, notification: &NSNotification); + + #[optional] + #[method(comboBoxSelectionIsChanging:)] + pub unsafe fn comboBoxSelectionIsChanging(&self, notification: &NSNotification); + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs index d772e6629..3c203cf36 100644 --- a/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs +++ b/crates/icrate/src/generated/AppKit/NSComboBoxCell.rs @@ -126,4 +126,39 @@ extern_methods!( } ); -pub type NSComboBoxCellDataSource = NSObject; +extern_protocol!( + pub struct NSComboBoxCellDataSource; + + unsafe impl NSComboBoxCellDataSource { + #[optional] + #[method(numberOfItemsInComboBoxCell:)] + pub unsafe fn numberOfItemsInComboBoxCell( + &self, + comboBoxCell: &NSComboBoxCell, + ) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other comboBoxCell:objectValueForItemAtIndex:)] + pub unsafe fn comboBoxCell_objectValueForItemAtIndex( + &self, + comboBoxCell: &NSComboBoxCell, + index: NSInteger, + ) -> Id; + + #[optional] + #[method(comboBoxCell:indexOfItemWithStringValue:)] + pub unsafe fn comboBoxCell_indexOfItemWithStringValue( + &self, + comboBoxCell: &NSComboBoxCell, + string: &NSString, + ) -> NSUInteger; + + #[optional] + #[method_id(@__retain_semantics Other comboBoxCell:completedString:)] + pub unsafe fn comboBoxCell_completedString( + &self, + comboBoxCell: &NSComboBoxCell, + uncompletedString: &NSString, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSControl.rs b/crates/icrate/src/generated/AppKit/NSControl.rs index ee78285c4..3287b7411 100644 --- a/crates/icrate/src/generated/AppKit/NSControl.rs +++ b/crates/icrate/src/generated/AppKit/NSControl.rs @@ -246,7 +246,85 @@ extern_methods!( } ); -pub type NSControlTextEditingDelegate = NSObject; +extern_protocol!( + pub struct NSControlTextEditingDelegate; + + unsafe impl NSControlTextEditingDelegate { + #[optional] + #[method(controlTextDidBeginEditing:)] + pub unsafe fn controlTextDidBeginEditing(&self, obj: &NSNotification); + + #[optional] + #[method(controlTextDidEndEditing:)] + pub unsafe fn controlTextDidEndEditing(&self, obj: &NSNotification); + + #[optional] + #[method(controlTextDidChange:)] + pub unsafe fn controlTextDidChange(&self, obj: &NSNotification); + + #[optional] + #[method(control:textShouldBeginEditing:)] + pub unsafe fn control_textShouldBeginEditing( + &self, + control: &NSControl, + fieldEditor: &NSText, + ) -> bool; + + #[optional] + #[method(control:textShouldEndEditing:)] + pub unsafe fn control_textShouldEndEditing( + &self, + control: &NSControl, + fieldEditor: &NSText, + ) -> bool; + + #[optional] + #[method(control:didFailToFormatString:errorDescription:)] + pub unsafe fn control_didFailToFormatString_errorDescription( + &self, + control: &NSControl, + string: &NSString, + error: Option<&NSString>, + ) -> bool; + + #[optional] + #[method(control:didFailToValidatePartialString:errorDescription:)] + pub unsafe fn control_didFailToValidatePartialString_errorDescription( + &self, + control: &NSControl, + string: &NSString, + error: Option<&NSString>, + ); + + #[optional] + #[method(control:isValidObject:)] + pub unsafe fn control_isValidObject( + &self, + control: &NSControl, + obj: Option<&Object>, + ) -> bool; + + #[optional] + #[method(control:textView:doCommandBySelector:)] + pub unsafe fn control_textView_doCommandBySelector( + &self, + control: &NSControl, + textView: &NSTextView, + commandSelector: Sel, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other control:textView:completions:forPartialWordRange:indexOfSelectedItem:)] + pub unsafe fn control_textView_completions_forPartialWordRange_indexOfSelectedItem( + &self, + control: &NSControl, + textView: &NSTextView, + words: &NSArray, + charRange: NSRange, + index: NonNull, + ) -> Id, Shared>; + } +); extern_static!(NSControlTextDidBeginEditingNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs index 559f2a096..c6fe13b1e 100644 --- a/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs +++ b/crates/icrate/src/generated/AppKit/NSDatePickerCell.rs @@ -149,7 +149,20 @@ extern_methods!( } ); -pub type NSDatePickerCellDelegate = NSObject; +extern_protocol!( + pub struct NSDatePickerCellDelegate; + + unsafe impl NSDatePickerCellDelegate { + #[optional] + #[method(datePickerCell:validateProposedDateValue:timeInterval:)] + pub unsafe fn datePickerCell_validateProposedDateValue_timeInterval( + &self, + datePickerCell: &NSDatePickerCell, + proposedDateValue: NonNull>, + proposedTimeInterval: *mut NSTimeInterval, + ); + } +); extern_static!( NSTextFieldAndStepperDatePickerStyle: NSDatePickerStyle = NSDatePickerStyleTextFieldAndStepper diff --git a/crates/icrate/src/generated/AppKit/NSDockTile.rs b/crates/icrate/src/generated/AppKit/NSDockTile.rs index dcb53b53a..c29d905b7 100644 --- a/crates/icrate/src/generated/AppKit/NSDockTile.rs +++ b/crates/icrate/src/generated/AppKit/NSDockTile.rs @@ -47,4 +47,15 @@ extern_methods!( } ); -pub type NSDockTilePlugIn = NSObject; +extern_protocol!( + pub struct NSDockTilePlugIn; + + unsafe impl NSDockTilePlugIn { + #[method(setDockTile:)] + pub unsafe fn setDockTile(&self, dockTile: Option<&NSDockTile>); + + #[optional] + #[method_id(@__retain_semantics Other dockMenu)] + pub unsafe fn dockMenu(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSDragging.rs b/crates/icrate/src/generated/AppKit/NSDragging.rs index f8d77498a..77dd3190a 100644 --- a/crates/icrate/src/generated/AppKit/NSDragging.rs +++ b/crates/icrate/src/generated/AppKit/NSDragging.rs @@ -57,11 +57,165 @@ ns_enum!( } ); -pub type NSDraggingInfo = NSObject; +extern_protocol!( + pub struct NSDraggingInfo; -pub type NSDraggingDestination = NSObject; + unsafe impl NSDraggingInfo { + #[method_id(@__retain_semantics Other draggingDestinationWindow)] + pub unsafe fn draggingDestinationWindow(&self) -> Option>; -pub type NSDraggingSource = NSObject; + #[method(draggingSourceOperationMask)] + pub unsafe fn draggingSourceOperationMask(&self) -> NSDragOperation; + + #[method(draggingLocation)] + pub unsafe fn draggingLocation(&self) -> NSPoint; + + #[method(draggedImageLocation)] + pub unsafe fn draggedImageLocation(&self) -> NSPoint; + + #[method_id(@__retain_semantics Other draggedImage)] + pub unsafe fn draggedImage(&self) -> Option>; + + #[method_id(@__retain_semantics Other draggingPasteboard)] + pub unsafe fn draggingPasteboard(&self) -> Id; + + #[method_id(@__retain_semantics Other draggingSource)] + pub unsafe fn draggingSource(&self) -> Option>; + + #[method(draggingSequenceNumber)] + pub unsafe fn draggingSequenceNumber(&self) -> NSInteger; + + #[method(slideDraggedImageTo:)] + pub unsafe fn slideDraggedImageTo(&self, screenPoint: NSPoint); + + #[method_id(@__retain_semantics Other namesOfPromisedFilesDroppedAtDestination:)] + pub unsafe fn namesOfPromisedFilesDroppedAtDestination( + &self, + dropDestination: &NSURL, + ) -> Option, Shared>>; + + #[method(draggingFormation)] + pub unsafe fn draggingFormation(&self) -> NSDraggingFormation; + + #[method(setDraggingFormation:)] + pub unsafe fn setDraggingFormation(&self, draggingFormation: NSDraggingFormation); + + #[method(animatesToDestination)] + pub unsafe fn animatesToDestination(&self) -> bool; + + #[method(setAnimatesToDestination:)] + pub unsafe fn setAnimatesToDestination(&self, animatesToDestination: bool); + + #[method(numberOfValidItemsForDrop)] + pub unsafe fn numberOfValidItemsForDrop(&self) -> NSInteger; + + #[method(setNumberOfValidItemsForDrop:)] + pub unsafe fn setNumberOfValidItemsForDrop(&self, numberOfValidItemsForDrop: NSInteger); + + #[method(enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:)] + pub unsafe fn enumerateDraggingItemsWithOptions_forView_classes_searchOptions_usingBlock( + &self, + enumOpts: NSDraggingItemEnumerationOptions, + view: Option<&NSView>, + classArray: &NSArray, + searchOptions: &NSDictionary, + block: &Block<(NonNull, NSInteger, NonNull), ()>, + ); + + #[method(springLoadingHighlight)] + pub unsafe fn springLoadingHighlight(&self) -> NSSpringLoadingHighlight; + + #[method(resetSpringLoading)] + pub unsafe fn resetSpringLoading(&self); + } +); + +extern_protocol!( + pub struct NSDraggingDestination; + + unsafe impl NSDraggingDestination { + #[optional] + #[method(draggingEntered:)] + pub unsafe fn draggingEntered(&self, sender: &NSDraggingInfo) -> NSDragOperation; + + #[optional] + #[method(draggingUpdated:)] + pub unsafe fn draggingUpdated(&self, sender: &NSDraggingInfo) -> NSDragOperation; + + #[optional] + #[method(draggingExited:)] + pub unsafe fn draggingExited(&self, sender: Option<&NSDraggingInfo>); + + #[optional] + #[method(prepareForDragOperation:)] + pub unsafe fn prepareForDragOperation(&self, sender: &NSDraggingInfo) -> bool; + + #[optional] + #[method(performDragOperation:)] + pub unsafe fn performDragOperation(&self, sender: &NSDraggingInfo) -> bool; + + #[optional] + #[method(concludeDragOperation:)] + pub unsafe fn concludeDragOperation(&self, sender: Option<&NSDraggingInfo>); + + #[optional] + #[method(draggingEnded:)] + pub unsafe fn draggingEnded(&self, sender: &NSDraggingInfo); + + #[optional] + #[method(wantsPeriodicDraggingUpdates)] + pub unsafe fn wantsPeriodicDraggingUpdates(&self) -> bool; + + #[optional] + #[method(updateDraggingItemsForDrag:)] + pub unsafe fn updateDraggingItemsForDrag(&self, sender: Option<&NSDraggingInfo>); + } +); + +extern_protocol!( + pub struct NSDraggingSource; + + unsafe impl NSDraggingSource { + #[method(draggingSession:sourceOperationMaskForDraggingContext:)] + pub unsafe fn draggingSession_sourceOperationMaskForDraggingContext( + &self, + session: &NSDraggingSession, + context: NSDraggingContext, + ) -> NSDragOperation; + + #[optional] + #[method(draggingSession:willBeginAtPoint:)] + pub unsafe fn draggingSession_willBeginAtPoint( + &self, + session: &NSDraggingSession, + screenPoint: NSPoint, + ); + + #[optional] + #[method(draggingSession:movedToPoint:)] + pub unsafe fn draggingSession_movedToPoint( + &self, + session: &NSDraggingSession, + screenPoint: NSPoint, + ); + + #[optional] + #[method(draggingSession:endedAtPoint:operation:)] + pub unsafe fn draggingSession_endedAtPoint_operation( + &self, + session: &NSDraggingSession, + screenPoint: NSPoint, + operation: NSDragOperation, + ); + + #[optional] + #[method(ignoreModifierKeysForDraggingSession:)] + pub unsafe fn ignoreModifierKeysForDraggingSession( + &self, + session: &NSDraggingSession, + ) -> bool; + } +); ns_options!( #[underlying(NSUInteger)] @@ -73,7 +227,43 @@ ns_options!( } ); -pub type NSSpringLoadingDestination = NSObject; +extern_protocol!( + pub struct NSSpringLoadingDestination; + + unsafe impl NSSpringLoadingDestination { + #[method(springLoadingActivated:draggingInfo:)] + pub unsafe fn springLoadingActivated_draggingInfo( + &self, + activated: bool, + draggingInfo: &NSDraggingInfo, + ); + + #[method(springLoadingHighlightChanged:)] + pub unsafe fn springLoadingHighlightChanged(&self, draggingInfo: &NSDraggingInfo); + + #[optional] + #[method(springLoadingEntered:)] + pub unsafe fn springLoadingEntered( + &self, + draggingInfo: &NSDraggingInfo, + ) -> NSSpringLoadingOptions; + + #[optional] + #[method(springLoadingUpdated:)] + pub unsafe fn springLoadingUpdated( + &self, + draggingInfo: &NSDraggingInfo, + ) -> NSSpringLoadingOptions; + + #[optional] + #[method(springLoadingExited:)] + pub unsafe fn springLoadingExited(&self, draggingInfo: &NSDraggingInfo); + + #[optional] + #[method(draggingEnded:)] + pub unsafe fn draggingEnded(&self, draggingInfo: &NSDraggingInfo); + } +); extern_methods!( /// NSDraggingSourceDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSDrawer.rs b/crates/icrate/src/generated/AppKit/NSDrawer.rs index 68a0376e1..de7913131 100644 --- a/crates/icrate/src/generated/AppKit/NSDrawer.rs +++ b/crates/icrate/src/generated/AppKit/NSDrawer.rs @@ -109,7 +109,43 @@ extern_methods!( } ); -pub type NSDrawerDelegate = NSObject; +extern_protocol!( + pub struct NSDrawerDelegate; + + unsafe impl NSDrawerDelegate { + #[optional] + #[method(drawerShouldOpen:)] + pub unsafe fn drawerShouldOpen(&self, sender: &NSDrawer) -> bool; + + #[optional] + #[method(drawerShouldClose:)] + pub unsafe fn drawerShouldClose(&self, sender: &NSDrawer) -> bool; + + #[optional] + #[method(drawerWillResizeContents:toSize:)] + pub unsafe fn drawerWillResizeContents_toSize( + &self, + sender: &NSDrawer, + contentSize: NSSize, + ) -> NSSize; + + #[optional] + #[method(drawerWillOpen:)] + pub unsafe fn drawerWillOpen(&self, notification: &NSNotification); + + #[optional] + #[method(drawerDidOpen:)] + pub unsafe fn drawerDidOpen(&self, notification: &NSNotification); + + #[optional] + #[method(drawerWillClose:)] + pub unsafe fn drawerWillClose(&self, notification: &NSNotification); + + #[optional] + #[method(drawerDidClose:)] + pub unsafe fn drawerDidClose(&self, notification: &NSNotification); + } +); extern_static!(NSDrawerWillOpenNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs index 3e03b5f5d..a63fbd176 100644 --- a/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs +++ b/crates/icrate/src/generated/AppKit/NSFilePromiseProvider.rs @@ -46,4 +46,30 @@ extern_methods!( } ); -pub type NSFilePromiseProviderDelegate = NSObject; +extern_protocol!( + pub struct NSFilePromiseProviderDelegate; + + unsafe impl NSFilePromiseProviderDelegate { + #[method_id(@__retain_semantics Other filePromiseProvider:fileNameForType:)] + pub unsafe fn filePromiseProvider_fileNameForType( + &self, + filePromiseProvider: &NSFilePromiseProvider, + fileType: &NSString, + ) -> Id; + + #[method(filePromiseProvider:writePromiseToURL:completionHandler:)] + pub unsafe fn filePromiseProvider_writePromiseToURL_completionHandler( + &self, + filePromiseProvider: &NSFilePromiseProvider, + url: &NSURL, + completionHandler: &Block<(*mut NSError,), ()>, + ); + + #[optional] + #[method_id(@__retain_semantics Other operationQueueForFilePromiseProvider:)] + pub unsafe fn operationQueueForFilePromiseProvider( + &self, + filePromiseProvider: &NSFilePromiseProvider, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSFontPanel.rs b/crates/icrate/src/generated/AppKit/NSFontPanel.rs index 1debce2df..de6e86d54 100644 --- a/crates/icrate/src/generated/AppKit/NSFontPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSFontPanel.rs @@ -22,7 +22,20 @@ ns_options!( } ); -pub type NSFontChanging = NSObject; +extern_protocol!( + pub struct NSFontChanging; + + unsafe impl NSFontChanging { + #[optional] + #[method(changeFont:)] + pub unsafe fn changeFont(&self, sender: Option<&NSFontManager>); + + #[optional] + #[method(validModesForFontPanel:)] + pub unsafe fn validModesForFontPanel(&self, fontPanel: &NSFontPanel) + -> NSFontPanelModeMask; + } +); extern_methods!( /// NSFontPanelValidationAdditions diff --git a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs index 50ea4de39..9045d9717 100644 --- a/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSGestureRecognizer.rs @@ -136,7 +136,58 @@ extern_methods!( } ); -pub type NSGestureRecognizerDelegate = NSObject; +extern_protocol!( + pub struct NSGestureRecognizerDelegate; + + unsafe impl NSGestureRecognizerDelegate { + #[optional] + #[method(gestureRecognizer:shouldAttemptToRecognizeWithEvent:)] + pub unsafe fn gestureRecognizer_shouldAttemptToRecognizeWithEvent( + &self, + gestureRecognizer: &NSGestureRecognizer, + event: &NSEvent, + ) -> bool; + + #[optional] + #[method(gestureRecognizerShouldBegin:)] + pub unsafe fn gestureRecognizerShouldBegin( + &self, + gestureRecognizer: &NSGestureRecognizer, + ) -> bool; + + #[optional] + #[method(gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:)] + pub unsafe fn gestureRecognizer_shouldRecognizeSimultaneouslyWithGestureRecognizer( + &self, + gestureRecognizer: &NSGestureRecognizer, + otherGestureRecognizer: &NSGestureRecognizer, + ) -> bool; + + #[optional] + #[method(gestureRecognizer:shouldRequireFailureOfGestureRecognizer:)] + pub unsafe fn gestureRecognizer_shouldRequireFailureOfGestureRecognizer( + &self, + gestureRecognizer: &NSGestureRecognizer, + otherGestureRecognizer: &NSGestureRecognizer, + ) -> bool; + + #[optional] + #[method(gestureRecognizer:shouldBeRequiredToFailByGestureRecognizer:)] + pub unsafe fn gestureRecognizer_shouldBeRequiredToFailByGestureRecognizer( + &self, + gestureRecognizer: &NSGestureRecognizer, + otherGestureRecognizer: &NSGestureRecognizer, + ) -> bool; + + #[optional] + #[method(gestureRecognizer:shouldReceiveTouch:)] + pub unsafe fn gestureRecognizer_shouldReceiveTouch( + &self, + gestureRecognizer: &NSGestureRecognizer, + touch: &NSTouch, + ) -> bool; + } +); extern_methods!( /// NSSubclassUse diff --git a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs index 3f7a86972..45be3bd00 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphGenerator.rs @@ -14,7 +14,34 @@ extern_enum!( } ); -pub type NSGlyphStorage = NSObject; +extern_protocol!( + pub struct NSGlyphStorage; + + unsafe impl NSGlyphStorage { + #[method(insertGlyphs:length:forStartingGlyphAtIndex:characterIndex:)] + pub unsafe fn insertGlyphs_length_forStartingGlyphAtIndex_characterIndex( + &self, + glyphs: NonNull, + length: NSUInteger, + glyphIndex: NSUInteger, + charIndex: NSUInteger, + ); + + #[method(setIntAttribute:value:forGlyphAtIndex:)] + pub unsafe fn setIntAttribute_value_forGlyphAtIndex( + &self, + attributeTag: NSInteger, + val: NSInteger, + glyphIndex: NSUInteger, + ); + + #[method_id(@__retain_semantics Other attributedString)] + pub unsafe fn attributedString(&self) -> Id; + + #[method(layoutOptions)] + pub unsafe fn layoutOptions(&self) -> NSUInteger; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs index 56999d5f2..099437a54 100644 --- a/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs +++ b/crates/icrate/src/generated/AppKit/NSHapticFeedback.rs @@ -23,7 +23,18 @@ ns_enum!( } ); -pub type NSHapticFeedbackPerformer = NSObject; +extern_protocol!( + pub struct NSHapticFeedbackPerformer; + + unsafe impl NSHapticFeedbackPerformer { + #[method(performFeedbackPattern:performanceTime:)] + pub unsafe fn performFeedbackPattern_performanceTime( + &self, + pattern: NSHapticFeedbackPattern, + performanceTime: NSHapticFeedbackPerformanceTime, + ); + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index 20e42b7a9..86141ddbc 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -353,7 +353,45 @@ extern_methods!( unsafe impl NSImage {} ); -pub type NSImageDelegate = NSObject; +extern_protocol!( + pub struct NSImageDelegate; + + unsafe impl NSImageDelegate { + #[optional] + #[method_id(@__retain_semantics Other imageDidNotDraw:inRect:)] + pub unsafe fn imageDidNotDraw_inRect( + &self, + sender: &NSImage, + rect: NSRect, + ) -> Option>; + + #[optional] + #[method(image:willLoadRepresentation:)] + pub unsafe fn image_willLoadRepresentation(&self, image: &NSImage, rep: &NSImageRep); + + #[optional] + #[method(image:didLoadRepresentationHeader:)] + pub unsafe fn image_didLoadRepresentationHeader(&self, image: &NSImage, rep: &NSImageRep); + + #[optional] + #[method(image:didLoadPartOfRepresentation:withValidRows:)] + pub unsafe fn image_didLoadPartOfRepresentation_withValidRows( + &self, + image: &NSImage, + rep: &NSImageRep, + rows: NSInteger, + ); + + #[optional] + #[method(image:didLoadRepresentation:withStatus:)] + pub unsafe fn image_didLoadRepresentation_withStatus( + &self, + image: &NSImage, + rep: &NSImageRep, + status: NSImageLoadStatus, + ); + } +); extern_methods!( /// NSBundleImageExtension diff --git a/crates/icrate/src/generated/AppKit/NSInputManager.rs b/crates/icrate/src/generated/AppKit/NSInputManager.rs index 89abe2584..518fd3d9c 100644 --- a/crates/icrate/src/generated/AppKit/NSInputManager.rs +++ b/crates/icrate/src/generated/AppKit/NSInputManager.rs @@ -5,7 +5,54 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextInput = NSObject; +extern_protocol!( + pub struct NSTextInput; + + unsafe impl NSTextInput { + #[method(insertText:)] + pub unsafe fn insertText(&self, string: Option<&Object>); + + #[method(doCommandBySelector:)] + pub unsafe fn doCommandBySelector(&self, selector: OptionSel); + + #[method(setMarkedText:selectedRange:)] + pub unsafe fn setMarkedText_selectedRange( + &self, + string: Option<&Object>, + selRange: NSRange, + ); + + #[method(unmarkText)] + pub unsafe fn unmarkText(&self); + + #[method(hasMarkedText)] + pub unsafe fn hasMarkedText(&self) -> bool; + + #[method(conversationIdentifier)] + pub unsafe fn conversationIdentifier(&self) -> NSInteger; + + #[method_id(@__retain_semantics Other attributedSubstringFromRange:)] + pub unsafe fn attributedSubstringFromRange( + &self, + range: NSRange, + ) -> Option>; + + #[method(markedRange)] + pub unsafe fn markedRange(&self) -> NSRange; + + #[method(selectedRange)] + pub unsafe fn selectedRange(&self) -> NSRange; + + #[method(firstRectForCharacterRange:)] + pub unsafe fn firstRectForCharacterRange(&self, range: NSRange) -> NSRect; + + #[method(characterIndexForPoint:)] + pub unsafe fn characterIndexForPoint(&self, point: NSPoint) -> NSUInteger; + + #[method_id(@__retain_semantics Other validAttributesForMarkedText)] + pub unsafe fn validAttributesForMarkedText(&self) -> Option>; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSInputServer.rs b/crates/icrate/src/generated/AppKit/NSInputServer.rs index f6d63deeb..035c641a6 100644 --- a/crates/icrate/src/generated/AppKit/NSInputServer.rs +++ b/crates/icrate/src/generated/AppKit/NSInputServer.rs @@ -5,9 +5,105 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSInputServiceProvider = NSObject; +extern_protocol!( + pub struct NSInputServiceProvider; -pub type NSInputServerMouseTracker = NSObject; + unsafe impl NSInputServiceProvider { + #[method(insertText:client:)] + pub unsafe fn insertText_client(&self, string: Option<&Object>, sender: Option<&Object>); + + #[method(doCommandBySelector:client:)] + pub unsafe fn doCommandBySelector_client( + &self, + selector: OptionSel, + sender: Option<&Object>, + ); + + #[method(markedTextAbandoned:)] + pub unsafe fn markedTextAbandoned(&self, sender: Option<&Object>); + + #[method(markedTextSelectionChanged:client:)] + pub unsafe fn markedTextSelectionChanged_client( + &self, + newSel: NSRange, + sender: Option<&Object>, + ); + + #[method(terminate:)] + pub unsafe fn terminate(&self, sender: Option<&Object>); + + #[method(canBeDisabled)] + pub unsafe fn canBeDisabled(&self) -> bool; + + #[method(wantsToInterpretAllKeystrokes)] + pub unsafe fn wantsToInterpretAllKeystrokes(&self) -> bool; + + #[method(wantsToHandleMouseEvents)] + pub unsafe fn wantsToHandleMouseEvents(&self) -> bool; + + #[method(wantsToDelayTextChangeNotifications)] + pub unsafe fn wantsToDelayTextChangeNotifications(&self) -> bool; + + #[method(inputClientBecomeActive:)] + pub unsafe fn inputClientBecomeActive(&self, sender: Option<&Object>); + + #[method(inputClientResignActive:)] + pub unsafe fn inputClientResignActive(&self, sender: Option<&Object>); + + #[method(inputClientEnabled:)] + pub unsafe fn inputClientEnabled(&self, sender: Option<&Object>); + + #[method(inputClientDisabled:)] + pub unsafe fn inputClientDisabled(&self, sender: Option<&Object>); + + #[method(activeConversationWillChange:fromOldConversation:)] + pub unsafe fn activeConversationWillChange_fromOldConversation( + &self, + sender: Option<&Object>, + oldConversation: NSInteger, + ); + + #[method(activeConversationChanged:toNewConversation:)] + pub unsafe fn activeConversationChanged_toNewConversation( + &self, + sender: Option<&Object>, + newConversation: NSInteger, + ); + } +); + +extern_protocol!( + pub struct NSInputServerMouseTracker; + + unsafe impl NSInputServerMouseTracker { + #[method(mouseDownOnCharacterIndex:atCoordinate:withModifier:client:)] + pub unsafe fn mouseDownOnCharacterIndex_atCoordinate_withModifier_client( + &self, + index: NSUInteger, + point: NSPoint, + flags: NSUInteger, + sender: Option<&Object>, + ) -> bool; + + #[method(mouseDraggedOnCharacterIndex:atCoordinate:withModifier:client:)] + pub unsafe fn mouseDraggedOnCharacterIndex_atCoordinate_withModifier_client( + &self, + index: NSUInteger, + point: NSPoint, + flags: NSUInteger, + sender: Option<&Object>, + ) -> bool; + + #[method(mouseUpOnCharacterIndex:atCoordinate:withModifier:client:)] + pub unsafe fn mouseUpOnCharacterIndex_atCoordinate_withModifier_client( + &self, + index: NSUInteger, + point: NSPoint, + flags: NSUInteger, + sender: Option<&Object>, + ); + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs index 26c828893..1a7016a0d 100644 --- a/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs +++ b/crates/icrate/src/generated/AppKit/NSKeyValueBinding.rs @@ -126,9 +126,42 @@ extern_methods!( } ); -pub type NSEditor = NSObject; +extern_protocol!( + pub struct NSEditor; -pub type NSEditorRegistration = NSObject; + unsafe impl NSEditor { + #[method(discardEditing)] + pub unsafe fn discardEditing(&self); + + #[method(commitEditing)] + pub unsafe fn commitEditing(&self) -> bool; + + #[method(commitEditingWithDelegate:didCommitSelector:contextInfo:)] + pub unsafe fn commitEditingWithDelegate_didCommitSelector_contextInfo( + &self, + delegate: Option<&Object>, + didCommitSelector: OptionSel, + contextInfo: *mut c_void, + ); + + #[method(commitEditingAndReturnError:)] + pub unsafe fn commitEditingAndReturnError(&self) -> Result<(), Id>; + } +); + +extern_protocol!( + pub struct NSEditorRegistration; + + unsafe impl NSEditorRegistration { + #[optional] + #[method(objectDidBeginEditing:)] + pub unsafe fn objectDidBeginEditing(&self, editor: &NSEditor); + + #[optional] + #[method(objectDidEndEditing:)] + pub unsafe fn objectDidEndEditing(&self, editor: &NSEditor); + } +); extern_methods!( /// NSEditor diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index 552f5bb41..bd6ba0595 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -35,7 +35,14 @@ ns_options!( } ); -pub type NSTextLayoutOrientationProvider = NSObject; +extern_protocol!( + pub struct NSTextLayoutOrientationProvider; + + unsafe impl NSTextLayoutOrientationProvider { + #[method(layoutOrientation)] + pub unsafe fn layoutOrientation(&self) -> NSTextLayoutOrientation; + } +); ns_enum!( #[underlying(NSInteger)] @@ -752,7 +759,132 @@ extern_methods!( } ); -pub type NSLayoutManagerDelegate = NSObject; +extern_protocol!( + pub struct NSLayoutManagerDelegate; + + unsafe impl NSLayoutManagerDelegate { + #[optional] + #[method(layoutManager:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:)] + pub unsafe fn layoutManager_shouldGenerateGlyphs_properties_characterIndexes_font_forGlyphRange( + &self, + layoutManager: &NSLayoutManager, + glyphs: NonNull, + props: NonNull, + charIndexes: NonNull, + aFont: &NSFont, + glyphRange: NSRange, + ) -> NSUInteger; + + #[optional] + #[method(layoutManager:lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn layoutManager_lineSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( + &self, + layoutManager: &NSLayoutManager, + glyphIndex: NSUInteger, + rect: NSRect, + ) -> CGFloat; + + #[optional] + #[method(layoutManager:paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn layoutManager_paragraphSpacingBeforeGlyphAtIndex_withProposedLineFragmentRect( + &self, + layoutManager: &NSLayoutManager, + glyphIndex: NSUInteger, + rect: NSRect, + ) -> CGFloat; + + #[optional] + #[method(layoutManager:paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:)] + pub unsafe fn layoutManager_paragraphSpacingAfterGlyphAtIndex_withProposedLineFragmentRect( + &self, + layoutManager: &NSLayoutManager, + glyphIndex: NSUInteger, + rect: NSRect, + ) -> CGFloat; + + #[optional] + #[method(layoutManager:shouldUseAction:forControlCharacterAtIndex:)] + pub unsafe fn layoutManager_shouldUseAction_forControlCharacterAtIndex( + &self, + layoutManager: &NSLayoutManager, + action: NSControlCharacterAction, + charIndex: NSUInteger, + ) -> NSControlCharacterAction; + + #[optional] + #[method(layoutManager:shouldBreakLineByWordBeforeCharacterAtIndex:)] + pub unsafe fn layoutManager_shouldBreakLineByWordBeforeCharacterAtIndex( + &self, + layoutManager: &NSLayoutManager, + charIndex: NSUInteger, + ) -> bool; + + #[optional] + #[method(layoutManager:shouldBreakLineByHyphenatingBeforeCharacterAtIndex:)] + pub unsafe fn layoutManager_shouldBreakLineByHyphenatingBeforeCharacterAtIndex( + &self, + layoutManager: &NSLayoutManager, + charIndex: NSUInteger, + ) -> bool; + + #[optional] + #[method(layoutManager:boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:)] + pub unsafe fn layoutManager_boundingBoxForControlGlyphAtIndex_forTextContainer_proposedLineFragment_glyphPosition_characterIndex( + &self, + layoutManager: &NSLayoutManager, + glyphIndex: NSUInteger, + textContainer: &NSTextContainer, + proposedRect: NSRect, + glyphPosition: NSPoint, + charIndex: NSUInteger, + ) -> NSRect; + + #[optional] + #[method(layoutManager:shouldSetLineFragmentRect:lineFragmentUsedRect:baselineOffset:inTextContainer:forGlyphRange:)] + pub unsafe fn layoutManager_shouldSetLineFragmentRect_lineFragmentUsedRect_baselineOffset_inTextContainer_forGlyphRange( + &self, + layoutManager: &NSLayoutManager, + lineFragmentRect: NonNull, + lineFragmentUsedRect: NonNull, + baselineOffset: NonNull, + textContainer: &NSTextContainer, + glyphRange: NSRange, + ) -> bool; + + #[optional] + #[method(layoutManagerDidInvalidateLayout:)] + pub unsafe fn layoutManagerDidInvalidateLayout(&self, sender: &NSLayoutManager); + + #[optional] + #[method(layoutManager:didCompleteLayoutForTextContainer:atEnd:)] + pub unsafe fn layoutManager_didCompleteLayoutForTextContainer_atEnd( + &self, + layoutManager: &NSLayoutManager, + textContainer: Option<&NSTextContainer>, + layoutFinishedFlag: bool, + ); + + #[optional] + #[method(layoutManager:textContainer:didChangeGeometryFromSize:)] + pub unsafe fn layoutManager_textContainer_didChangeGeometryFromSize( + &self, + layoutManager: &NSLayoutManager, + textContainer: &NSTextContainer, + oldSize: NSSize, + ); + + #[optional] + #[method_id(@__retain_semantics Other layoutManager:shouldUseTemporaryAttributes:forDrawingToScreen:atCharacterIndex:effectiveRange:)] + pub unsafe fn layoutManager_shouldUseTemporaryAttributes_forDrawingToScreen_atCharacterIndex_effectiveRange( + &self, + layoutManager: &NSLayoutManager, + attrs: &NSDictionary, + toScreen: bool, + charIndex: NSUInteger, + effectiveCharRange: NSRangePointer, + ) -> Option, Shared>>; + } +); extern_enum!( #[underlying(c_uint)] diff --git a/crates/icrate/src/generated/AppKit/NSMatrix.rs b/crates/icrate/src/generated/AppKit/NSMatrix.rs index ec437660d..e07fca6a0 100644 --- a/crates/icrate/src/generated/AppKit/NSMatrix.rs +++ b/crates/icrate/src/generated/AppKit/NSMatrix.rs @@ -394,4 +394,8 @@ extern_methods!( } ); -pub type NSMatrixDelegate = NSObject; +extern_protocol!( + pub struct NSMatrixDelegate; + + unsafe impl NSMatrixDelegate {} +); diff --git a/crates/icrate/src/generated/AppKit/NSMenu.rs b/crates/icrate/src/generated/AppKit/NSMenu.rs index 7ba9d4fd6..967080203 100644 --- a/crates/icrate/src/generated/AppKit/NSMenu.rs +++ b/crates/icrate/src/generated/AppKit/NSMenu.rs @@ -227,7 +227,14 @@ extern_methods!( } ); -pub type NSMenuItemValidation = NSObject; +extern_protocol!( + pub struct NSMenuItemValidation; + + unsafe impl NSMenuItemValidation { + #[method(validateMenuItem:)] + pub unsafe fn validateMenuItem(&self, menuItem: &NSMenuItem) -> bool; + } +); extern_methods!( /// NSMenuValidation @@ -237,7 +244,59 @@ extern_methods!( } ); -pub type NSMenuDelegate = NSObject; +extern_protocol!( + pub struct NSMenuDelegate; + + unsafe impl NSMenuDelegate { + #[optional] + #[method(menuNeedsUpdate:)] + pub unsafe fn menuNeedsUpdate(&self, menu: &NSMenu); + + #[optional] + #[method(numberOfItemsInMenu:)] + pub unsafe fn numberOfItemsInMenu(&self, menu: &NSMenu) -> NSInteger; + + #[optional] + #[method(menu:updateItem:atIndex:shouldCancel:)] + pub unsafe fn menu_updateItem_atIndex_shouldCancel( + &self, + menu: &NSMenu, + item: &NSMenuItem, + index: NSInteger, + shouldCancel: bool, + ) -> bool; + + #[optional] + #[method(menuHasKeyEquivalent:forEvent:target:action:)] + pub unsafe fn menuHasKeyEquivalent_forEvent_target_action( + &self, + menu: &NSMenu, + event: &NSEvent, + target: NonNull<*mut Object>, + action: NonNull, + ) -> bool; + + #[optional] + #[method(menuWillOpen:)] + pub unsafe fn menuWillOpen(&self, menu: &NSMenu); + + #[optional] + #[method(menuDidClose:)] + pub unsafe fn menuDidClose(&self, menu: &NSMenu); + + #[optional] + #[method(menu:willHighlightItem:)] + pub unsafe fn menu_willHighlightItem(&self, menu: &NSMenu, item: Option<&NSMenuItem>); + + #[optional] + #[method(confinementRectForMenu:onScreen:)] + pub unsafe fn confinementRectForMenu_onScreen( + &self, + menu: &NSMenu, + screen: Option<&NSScreen>, + ) -> NSRect; + } +); ns_options!( #[underlying(NSUInteger)] diff --git a/crates/icrate/src/generated/AppKit/NSOutlineView.rs b/crates/icrate/src/generated/AppKit/NSOutlineView.rs index 2db7e0335..d8a2169d1 100644 --- a/crates/icrate/src/generated/AppKit/NSOutlineView.rs +++ b/crates/icrate/src/generated/AppKit/NSOutlineView.rs @@ -189,9 +189,443 @@ extern_methods!( } ); -pub type NSOutlineViewDataSource = NSObject; +extern_protocol!( + pub struct NSOutlineViewDataSource; -pub type NSOutlineViewDelegate = NSObject; + unsafe impl NSOutlineViewDataSource { + #[optional] + #[method(outlineView:numberOfChildrenOfItem:)] + pub unsafe fn outlineView_numberOfChildrenOfItem( + &self, + outlineView: &NSOutlineView, + item: Option<&Object>, + ) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other outlineView:child:ofItem:)] + pub unsafe fn outlineView_child_ofItem( + &self, + outlineView: &NSOutlineView, + index: NSInteger, + item: Option<&Object>, + ) -> Id; + + #[optional] + #[method(outlineView:isItemExpandable:)] + pub unsafe fn outlineView_isItemExpandable( + &self, + outlineView: &NSOutlineView, + item: &Object, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other outlineView:objectValueForTableColumn:byItem:)] + pub unsafe fn outlineView_objectValueForTableColumn_byItem( + &self, + outlineView: &NSOutlineView, + tableColumn: Option<&NSTableColumn>, + item: Option<&Object>, + ) -> Option>; + + #[optional] + #[method(outlineView:setObjectValue:forTableColumn:byItem:)] + pub unsafe fn outlineView_setObjectValue_forTableColumn_byItem( + &self, + outlineView: &NSOutlineView, + object: Option<&Object>, + tableColumn: Option<&NSTableColumn>, + item: Option<&Object>, + ); + + #[optional] + #[method_id(@__retain_semantics Other outlineView:itemForPersistentObject:)] + pub unsafe fn outlineView_itemForPersistentObject( + &self, + outlineView: &NSOutlineView, + object: &Object, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other outlineView:persistentObjectForItem:)] + pub unsafe fn outlineView_persistentObjectForItem( + &self, + outlineView: &NSOutlineView, + item: Option<&Object>, + ) -> Option>; + + #[optional] + #[method(outlineView:sortDescriptorsDidChange:)] + pub unsafe fn outlineView_sortDescriptorsDidChange( + &self, + outlineView: &NSOutlineView, + oldDescriptors: &NSArray, + ); + + #[optional] + #[method_id(@__retain_semantics Other outlineView:pasteboardWriterForItem:)] + pub unsafe fn outlineView_pasteboardWriterForItem( + &self, + outlineView: &NSOutlineView, + item: &Object, + ) -> Option>; + + #[optional] + #[method(outlineView:draggingSession:willBeginAtPoint:forItems:)] + pub unsafe fn outlineView_draggingSession_willBeginAtPoint_forItems( + &self, + outlineView: &NSOutlineView, + session: &NSDraggingSession, + screenPoint: NSPoint, + draggedItems: &NSArray, + ); + + #[optional] + #[method(outlineView:draggingSession:endedAtPoint:operation:)] + pub unsafe fn outlineView_draggingSession_endedAtPoint_operation( + &self, + outlineView: &NSOutlineView, + session: &NSDraggingSession, + screenPoint: NSPoint, + operation: NSDragOperation, + ); + + #[optional] + #[method(outlineView:writeItems:toPasteboard:)] + pub unsafe fn outlineView_writeItems_toPasteboard( + &self, + outlineView: &NSOutlineView, + items: &NSArray, + pasteboard: &NSPasteboard, + ) -> bool; + + #[optional] + #[method(outlineView:updateDraggingItemsForDrag:)] + pub unsafe fn outlineView_updateDraggingItemsForDrag( + &self, + outlineView: &NSOutlineView, + draggingInfo: &NSDraggingInfo, + ); + + #[optional] + #[method(outlineView:validateDrop:proposedItem:proposedChildIndex:)] + pub unsafe fn outlineView_validateDrop_proposedItem_proposedChildIndex( + &self, + outlineView: &NSOutlineView, + info: &NSDraggingInfo, + item: Option<&Object>, + index: NSInteger, + ) -> NSDragOperation; + + #[optional] + #[method(outlineView:acceptDrop:item:childIndex:)] + pub unsafe fn outlineView_acceptDrop_item_childIndex( + &self, + outlineView: &NSOutlineView, + info: &NSDraggingInfo, + item: Option<&Object>, + index: NSInteger, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other outlineView:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)] + pub unsafe fn outlineView_namesOfPromisedFilesDroppedAtDestination_forDraggedItems( + &self, + outlineView: &NSOutlineView, + dropDestination: &NSURL, + items: &NSArray, + ) -> Id, Shared>; + } +); + +extern_protocol!( + pub struct NSOutlineViewDelegate; + + unsafe impl NSOutlineViewDelegate { + #[optional] + #[method_id(@__retain_semantics Other outlineView:viewForTableColumn:item:)] + pub unsafe fn outlineView_viewForTableColumn_item( + &self, + outlineView: &NSOutlineView, + tableColumn: Option<&NSTableColumn>, + item: &Object, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other outlineView:rowViewForItem:)] + pub unsafe fn outlineView_rowViewForItem( + &self, + outlineView: &NSOutlineView, + item: &Object, + ) -> Option>; + + #[optional] + #[method(outlineView:didAddRowView:forRow:)] + pub unsafe fn outlineView_didAddRowView_forRow( + &self, + outlineView: &NSOutlineView, + rowView: &NSTableRowView, + row: NSInteger, + ); + + #[optional] + #[method(outlineView:didRemoveRowView:forRow:)] + pub unsafe fn outlineView_didRemoveRowView_forRow( + &self, + outlineView: &NSOutlineView, + rowView: &NSTableRowView, + row: NSInteger, + ); + + #[optional] + #[method(outlineView:willDisplayCell:forTableColumn:item:)] + pub unsafe fn outlineView_willDisplayCell_forTableColumn_item( + &self, + outlineView: &NSOutlineView, + cell: &Object, + tableColumn: Option<&NSTableColumn>, + item: &Object, + ); + + #[optional] + #[method(outlineView:shouldEditTableColumn:item:)] + pub unsafe fn outlineView_shouldEditTableColumn_item( + &self, + outlineView: &NSOutlineView, + tableColumn: Option<&NSTableColumn>, + item: &Object, + ) -> bool; + + #[optional] + #[method(selectionShouldChangeInOutlineView:)] + pub unsafe fn selectionShouldChangeInOutlineView( + &self, + outlineView: &NSOutlineView, + ) -> bool; + + #[optional] + #[method(outlineView:shouldSelectItem:)] + pub unsafe fn outlineView_shouldSelectItem( + &self, + outlineView: &NSOutlineView, + item: &Object, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other outlineView:selectionIndexesForProposedSelection:)] + pub unsafe fn outlineView_selectionIndexesForProposedSelection( + &self, + outlineView: &NSOutlineView, + proposedSelectionIndexes: &NSIndexSet, + ) -> Id; + + #[optional] + #[method(outlineView:shouldSelectTableColumn:)] + pub unsafe fn outlineView_shouldSelectTableColumn( + &self, + outlineView: &NSOutlineView, + tableColumn: Option<&NSTableColumn>, + ) -> bool; + + #[optional] + #[method(outlineView:mouseDownInHeaderOfTableColumn:)] + pub unsafe fn outlineView_mouseDownInHeaderOfTableColumn( + &self, + outlineView: &NSOutlineView, + tableColumn: &NSTableColumn, + ); + + #[optional] + #[method(outlineView:didClickTableColumn:)] + pub unsafe fn outlineView_didClickTableColumn( + &self, + outlineView: &NSOutlineView, + tableColumn: &NSTableColumn, + ); + + #[optional] + #[method(outlineView:didDragTableColumn:)] + pub unsafe fn outlineView_didDragTableColumn( + &self, + outlineView: &NSOutlineView, + tableColumn: &NSTableColumn, + ); + + #[optional] + #[method_id(@__retain_semantics Other outlineView:toolTipForCell:rect:tableColumn:item:mouseLocation:)] + pub unsafe fn outlineView_toolTipForCell_rect_tableColumn_item_mouseLocation( + &self, + outlineView: &NSOutlineView, + cell: &NSCell, + rect: NSRectPointer, + tableColumn: Option<&NSTableColumn>, + item: &Object, + mouseLocation: NSPoint, + ) -> Id; + + #[optional] + #[method(outlineView:heightOfRowByItem:)] + pub unsafe fn outlineView_heightOfRowByItem( + &self, + outlineView: &NSOutlineView, + item: &Object, + ) -> CGFloat; + + #[optional] + #[method_id(@__retain_semantics Other outlineView:tintConfigurationForItem:)] + pub unsafe fn outlineView_tintConfigurationForItem( + &self, + outlineView: &NSOutlineView, + item: &Object, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other outlineView:typeSelectStringForTableColumn:item:)] + pub unsafe fn outlineView_typeSelectStringForTableColumn_item( + &self, + outlineView: &NSOutlineView, + tableColumn: Option<&NSTableColumn>, + item: &Object, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other outlineView:nextTypeSelectMatchFromItem:toItem:forString:)] + pub unsafe fn outlineView_nextTypeSelectMatchFromItem_toItem_forString( + &self, + outlineView: &NSOutlineView, + startItem: &Object, + endItem: &Object, + searchString: &NSString, + ) -> Option>; + + #[optional] + #[method(outlineView:shouldTypeSelectForEvent:withCurrentSearchString:)] + pub unsafe fn outlineView_shouldTypeSelectForEvent_withCurrentSearchString( + &self, + outlineView: &NSOutlineView, + event: &NSEvent, + searchString: Option<&NSString>, + ) -> bool; + + #[optional] + #[method(outlineView:shouldShowCellExpansionForTableColumn:item:)] + pub unsafe fn outlineView_shouldShowCellExpansionForTableColumn_item( + &self, + outlineView: &NSOutlineView, + tableColumn: Option<&NSTableColumn>, + item: &Object, + ) -> bool; + + #[optional] + #[method(outlineView:shouldTrackCell:forTableColumn:item:)] + pub unsafe fn outlineView_shouldTrackCell_forTableColumn_item( + &self, + outlineView: &NSOutlineView, + cell: &NSCell, + tableColumn: Option<&NSTableColumn>, + item: &Object, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other outlineView:dataCellForTableColumn:item:)] + pub unsafe fn outlineView_dataCellForTableColumn_item( + &self, + outlineView: &NSOutlineView, + tableColumn: Option<&NSTableColumn>, + item: &Object, + ) -> Option>; + + #[optional] + #[method(outlineView:isGroupItem:)] + pub unsafe fn outlineView_isGroupItem( + &self, + outlineView: &NSOutlineView, + item: &Object, + ) -> bool; + + #[optional] + #[method(outlineView:shouldExpandItem:)] + pub unsafe fn outlineView_shouldExpandItem( + &self, + outlineView: &NSOutlineView, + item: &Object, + ) -> bool; + + #[optional] + #[method(outlineView:shouldCollapseItem:)] + pub unsafe fn outlineView_shouldCollapseItem( + &self, + outlineView: &NSOutlineView, + item: &Object, + ) -> bool; + + #[optional] + #[method(outlineView:willDisplayOutlineCell:forTableColumn:item:)] + pub unsafe fn outlineView_willDisplayOutlineCell_forTableColumn_item( + &self, + outlineView: &NSOutlineView, + cell: &Object, + tableColumn: Option<&NSTableColumn>, + item: &Object, + ); + + #[optional] + #[method(outlineView:sizeToFitWidthOfColumn:)] + pub unsafe fn outlineView_sizeToFitWidthOfColumn( + &self, + outlineView: &NSOutlineView, + column: NSInteger, + ) -> CGFloat; + + #[optional] + #[method(outlineView:shouldReorderColumn:toColumn:)] + pub unsafe fn outlineView_shouldReorderColumn_toColumn( + &self, + outlineView: &NSOutlineView, + columnIndex: NSInteger, + newColumnIndex: NSInteger, + ) -> bool; + + #[optional] + #[method(outlineView:shouldShowOutlineCellForItem:)] + pub unsafe fn outlineView_shouldShowOutlineCellForItem( + &self, + outlineView: &NSOutlineView, + item: &Object, + ) -> bool; + + #[optional] + #[method(outlineViewSelectionDidChange:)] + pub unsafe fn outlineViewSelectionDidChange(&self, notification: &NSNotification); + + #[optional] + #[method(outlineViewColumnDidMove:)] + pub unsafe fn outlineViewColumnDidMove(&self, notification: &NSNotification); + + #[optional] + #[method(outlineViewColumnDidResize:)] + pub unsafe fn outlineViewColumnDidResize(&self, notification: &NSNotification); + + #[optional] + #[method(outlineViewSelectionIsChanging:)] + pub unsafe fn outlineViewSelectionIsChanging(&self, notification: &NSNotification); + + #[optional] + #[method(outlineViewItemWillExpand:)] + pub unsafe fn outlineViewItemWillExpand(&self, notification: &NSNotification); + + #[optional] + #[method(outlineViewItemDidExpand:)] + pub unsafe fn outlineViewItemDidExpand(&self, notification: &NSNotification); + + #[optional] + #[method(outlineViewItemWillCollapse:)] + pub unsafe fn outlineViewItemWillCollapse(&self, notification: &NSNotification); + + #[optional] + #[method(outlineViewItemDidCollapse:)] + pub unsafe fn outlineViewItemDidCollapse(&self, notification: &NSNotification); + } +); extern_static!(NSOutlineViewDisclosureButtonKey: &'static NSUserInterfaceItemIdentifier); diff --git a/crates/icrate/src/generated/AppKit/NSPageController.rs b/crates/icrate/src/generated/AppKit/NSPageController.rs index 159c6a5d3..184482485 100644 --- a/crates/icrate/src/generated/AppKit/NSPageController.rs +++ b/crates/icrate/src/generated/AppKit/NSPageController.rs @@ -71,4 +71,60 @@ extern_methods!( } ); -pub type NSPageControllerDelegate = NSObject; +extern_protocol!( + pub struct NSPageControllerDelegate; + + unsafe impl NSPageControllerDelegate { + #[optional] + #[method_id(@__retain_semantics Other pageController:identifierForObject:)] + pub unsafe fn pageController_identifierForObject( + &self, + pageController: &NSPageController, + object: &Object, + ) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other pageController:viewControllerForIdentifier:)] + pub unsafe fn pageController_viewControllerForIdentifier( + &self, + pageController: &NSPageController, + identifier: &NSPageControllerObjectIdentifier, + ) -> Id; + + #[optional] + #[method(pageController:frameForObject:)] + pub unsafe fn pageController_frameForObject( + &self, + pageController: &NSPageController, + object: Option<&Object>, + ) -> NSRect; + + #[optional] + #[method(pageController:prepareViewController:withObject:)] + pub unsafe fn pageController_prepareViewController_withObject( + &self, + pageController: &NSPageController, + viewController: &NSViewController, + object: Option<&Object>, + ); + + #[optional] + #[method(pageController:didTransitionToObject:)] + pub unsafe fn pageController_didTransitionToObject( + &self, + pageController: &NSPageController, + object: &Object, + ); + + #[optional] + #[method(pageControllerWillStartLiveTransition:)] + pub unsafe fn pageControllerWillStartLiveTransition( + &self, + pageController: &NSPageController, + ); + + #[optional] + #[method(pageControllerDidEndLiveTransition:)] + pub unsafe fn pageControllerDidEndLiveTransition(&self, pageController: &NSPageController); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPasteboard.rs b/crates/icrate/src/generated/AppKit/NSPasteboard.rs index ebcbe36e1..9349b6f7e 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboard.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboard.rs @@ -217,7 +217,22 @@ extern_methods!( } ); -pub type NSPasteboardTypeOwner = NSObject; +extern_protocol!( + pub struct NSPasteboardTypeOwner; + + unsafe impl NSPasteboardTypeOwner { + #[method(pasteboard:provideDataForType:)] + pub unsafe fn pasteboard_provideDataForType( + &self, + sender: &NSPasteboard, + type_: &NSPasteboardType, + ); + + #[optional] + #[method(pasteboardChangedOwner:)] + pub unsafe fn pasteboardChangedOwner(&self, sender: &NSPasteboard); + } +); extern_methods!( /// NSPasteboardOwner @@ -241,7 +256,31 @@ ns_options!( } ); -pub type NSPasteboardWriting = NSObject; +extern_protocol!( + pub struct NSPasteboardWriting; + + unsafe impl NSPasteboardWriting { + #[method_id(@__retain_semantics Other writableTypesForPasteboard:)] + pub unsafe fn writableTypesForPasteboard( + &self, + pasteboard: &NSPasteboard, + ) -> Id, Shared>; + + #[optional] + #[method(writingOptionsForType:pasteboard:)] + pub unsafe fn writingOptionsForType_pasteboard( + &self, + type_: &NSPasteboardType, + pasteboard: &NSPasteboard, + ) -> NSPasteboardWritingOptions; + + #[method_id(@__retain_semantics Other pasteboardPropertyListForType:)] + pub unsafe fn pasteboardPropertyListForType( + &self, + type_: &NSPasteboardType, + ) -> Option>; + } +); ns_options!( #[underlying(NSUInteger)] @@ -253,7 +292,31 @@ ns_options!( } ); -pub type NSPasteboardReading = NSObject; +extern_protocol!( + pub struct NSPasteboardReading; + + unsafe impl NSPasteboardReading { + #[method_id(@__retain_semantics Other readableTypesForPasteboard:)] + pub unsafe fn readableTypesForPasteboard( + pasteboard: &NSPasteboard, + ) -> Id, Shared>; + + #[optional] + #[method(readingOptionsForType:pasteboard:)] + pub unsafe fn readingOptionsForType_pasteboard( + type_: &NSPasteboardType, + pasteboard: &NSPasteboard, + ) -> NSPasteboardReadingOptions; + + #[optional] + #[method_id(@__retain_semantics Init initWithPasteboardPropertyList:ofType:)] + pub unsafe fn initWithPasteboardPropertyList_ofType( + this: Option>, + propertyList: &Object, + type_: &NSPasteboardType, + ) -> Option>; + } +); extern_methods!( /// NSPasteboardSupport diff --git a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs index 6cd170a7c..8e3e8e19c 100644 --- a/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs +++ b/crates/icrate/src/generated/AppKit/NSPasteboardItem.rs @@ -63,4 +63,20 @@ extern_methods!( } ); -pub type NSPasteboardItemDataProvider = NSObject; +extern_protocol!( + pub struct NSPasteboardItemDataProvider; + + unsafe impl NSPasteboardItemDataProvider { + #[method(pasteboard:item:provideDataForType:)] + pub unsafe fn pasteboard_item_provideDataForType( + &self, + pasteboard: Option<&NSPasteboard>, + item: &NSPasteboardItem, + type_: &NSPasteboardType, + ); + + #[optional] + #[method(pasteboardFinishedWithDataProvider:)] + pub unsafe fn pasteboardFinishedWithDataProvider(&self, pasteboard: &NSPasteboard); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPathCell.rs b/crates/icrate/src/generated/AppKit/NSPathCell.rs index d8f4b4a45..451b44216 100644 --- a/crates/icrate/src/generated/AppKit/NSPathCell.rs +++ b/crates/icrate/src/generated/AppKit/NSPathCell.rs @@ -128,4 +128,20 @@ extern_methods!( } ); -pub type NSPathCellDelegate = NSObject; +extern_protocol!( + pub struct NSPathCellDelegate; + + unsafe impl NSPathCellDelegate { + #[optional] + #[method(pathCell:willDisplayOpenPanel:)] + pub unsafe fn pathCell_willDisplayOpenPanel( + &self, + pathCell: &NSPathCell, + openPanel: &NSOpenPanel, + ); + + #[optional] + #[method(pathCell:willPopUpMenu:)] + pub unsafe fn pathCell_willPopUpMenu(&self, pathCell: &NSPathCell, menu: &NSMenu); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPathControl.rs b/crates/icrate/src/generated/AppKit/NSPathControl.rs index f4031d969..f7316c0eb 100644 --- a/crates/icrate/src/generated/AppKit/NSPathControl.rs +++ b/crates/icrate/src/generated/AppKit/NSPathControl.rs @@ -97,7 +97,57 @@ extern_methods!( } ); -pub type NSPathControlDelegate = NSObject; +extern_protocol!( + pub struct NSPathControlDelegate; + + unsafe impl NSPathControlDelegate { + #[optional] + #[method(pathControl:shouldDragItem:withPasteboard:)] + pub unsafe fn pathControl_shouldDragItem_withPasteboard( + &self, + pathControl: &NSPathControl, + pathItem: &NSPathControlItem, + pasteboard: &NSPasteboard, + ) -> bool; + + #[optional] + #[method(pathControl:shouldDragPathComponentCell:withPasteboard:)] + pub unsafe fn pathControl_shouldDragPathComponentCell_withPasteboard( + &self, + pathControl: &NSPathControl, + pathComponentCell: &NSPathComponentCell, + pasteboard: &NSPasteboard, + ) -> bool; + + #[optional] + #[method(pathControl:validateDrop:)] + pub unsafe fn pathControl_validateDrop( + &self, + pathControl: &NSPathControl, + info: &NSDraggingInfo, + ) -> NSDragOperation; + + #[optional] + #[method(pathControl:acceptDrop:)] + pub unsafe fn pathControl_acceptDrop( + &self, + pathControl: &NSPathControl, + info: &NSDraggingInfo, + ) -> bool; + + #[optional] + #[method(pathControl:willDisplayOpenPanel:)] + pub unsafe fn pathControl_willDisplayOpenPanel( + &self, + pathControl: &NSPathControl, + openPanel: &NSOpenPanel, + ); + + #[optional] + #[method(pathControl:willPopUpMenu:)] + pub unsafe fn pathControl_willPopUpMenu(&self, pathControl: &NSPathControl, menu: &NSMenu); + } +); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSPopover.rs b/crates/icrate/src/generated/AppKit/NSPopover.rs index b49b87a37..740611f89 100644 --- a/crates/icrate/src/generated/AppKit/NSPopover.rs +++ b/crates/icrate/src/generated/AppKit/NSPopover.rs @@ -125,4 +125,43 @@ extern_static!(NSPopoverWillCloseNotification: &'static NSNotificationName); extern_static!(NSPopoverDidCloseNotification: &'static NSNotificationName); -pub type NSPopoverDelegate = NSObject; +extern_protocol!( + pub struct NSPopoverDelegate; + + unsafe impl NSPopoverDelegate { + #[optional] + #[method(popoverShouldClose:)] + pub unsafe fn popoverShouldClose(&self, popover: &NSPopover) -> bool; + + #[optional] + #[method(popoverShouldDetach:)] + pub unsafe fn popoverShouldDetach(&self, popover: &NSPopover) -> bool; + + #[optional] + #[method(popoverDidDetach:)] + pub unsafe fn popoverDidDetach(&self, popover: &NSPopover); + + #[optional] + #[method_id(@__retain_semantics Other detachableWindowForPopover:)] + pub unsafe fn detachableWindowForPopover( + &self, + popover: &NSPopover, + ) -> Option>; + + #[optional] + #[method(popoverWillShow:)] + pub unsafe fn popoverWillShow(&self, notification: &NSNotification); + + #[optional] + #[method(popoverDidShow:)] + pub unsafe fn popoverDidShow(&self, notification: &NSNotification); + + #[optional] + #[method(popoverWillClose:)] + pub unsafe fn popoverWillClose(&self, notification: &NSNotification); + + #[optional] + #[method(popoverDidClose:)] + pub unsafe fn popoverDidClose(&self, notification: &NSNotification); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs index f1c7dd0d5..48497c3d7 100644 --- a/crates/icrate/src/generated/AppKit/NSPrintPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPrintPanel.rs @@ -35,7 +35,20 @@ extern_static!( NSPrintPanelAccessorySummaryItemDescriptionKey: &'static NSPrintPanelAccessorySummaryKey ); -pub type NSPrintPanelAccessorizing = NSObject; +extern_protocol!( + pub struct NSPrintPanelAccessorizing; + + unsafe impl NSPrintPanelAccessorizing { + #[method_id(@__retain_semantics Other localizedSummaryItems)] + pub unsafe fn localizedSummaryItems( + &self, + ) -> Id>, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other keyPathsForValuesAffectingPreview)] + pub unsafe fn keyPathsForValuesAffectingPreview(&self) -> Id, Shared>; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSResponder.rs b/crates/icrate/src/generated/AppKit/NSResponder.rs index 9108c7c10..246c4e5dd 100644 --- a/crates/icrate/src/generated/AppKit/NSResponder.rs +++ b/crates/icrate/src/generated/AppKit/NSResponder.rs @@ -191,7 +191,391 @@ extern_methods!( } ); -pub type NSStandardKeyBindingResponding = NSObject; +extern_protocol!( + pub struct NSStandardKeyBindingResponding; + + unsafe impl NSStandardKeyBindingResponding { + #[optional] + #[method(insertText:)] + pub unsafe fn insertText(&self, insertString: &Object); + + #[optional] + #[method(doCommandBySelector:)] + pub unsafe fn doCommandBySelector(&self, selector: Sel); + + #[optional] + #[method(moveForward:)] + pub unsafe fn moveForward(&self, sender: Option<&Object>); + + #[optional] + #[method(moveRight:)] + pub unsafe fn moveRight(&self, sender: Option<&Object>); + + #[optional] + #[method(moveBackward:)] + pub unsafe fn moveBackward(&self, sender: Option<&Object>); + + #[optional] + #[method(moveLeft:)] + pub unsafe fn moveLeft(&self, sender: Option<&Object>); + + #[optional] + #[method(moveUp:)] + pub unsafe fn moveUp(&self, sender: Option<&Object>); + + #[optional] + #[method(moveDown:)] + pub unsafe fn moveDown(&self, sender: Option<&Object>); + + #[optional] + #[method(moveWordForward:)] + pub unsafe fn moveWordForward(&self, sender: Option<&Object>); + + #[optional] + #[method(moveWordBackward:)] + pub unsafe fn moveWordBackward(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToBeginningOfLine:)] + pub unsafe fn moveToBeginningOfLine(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToEndOfLine:)] + pub unsafe fn moveToEndOfLine(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToBeginningOfParagraph:)] + pub unsafe fn moveToBeginningOfParagraph(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToEndOfParagraph:)] + pub unsafe fn moveToEndOfParagraph(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToEndOfDocument:)] + pub unsafe fn moveToEndOfDocument(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToBeginningOfDocument:)] + pub unsafe fn moveToBeginningOfDocument(&self, sender: Option<&Object>); + + #[optional] + #[method(pageDown:)] + pub unsafe fn pageDown(&self, sender: Option<&Object>); + + #[optional] + #[method(pageUp:)] + pub unsafe fn pageUp(&self, sender: Option<&Object>); + + #[optional] + #[method(centerSelectionInVisibleArea:)] + pub unsafe fn centerSelectionInVisibleArea(&self, sender: Option<&Object>); + + #[optional] + #[method(moveBackwardAndModifySelection:)] + pub unsafe fn moveBackwardAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveForwardAndModifySelection:)] + pub unsafe fn moveForwardAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveWordForwardAndModifySelection:)] + pub unsafe fn moveWordForwardAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveWordBackwardAndModifySelection:)] + pub unsafe fn moveWordBackwardAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveUpAndModifySelection:)] + pub unsafe fn moveUpAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveDownAndModifySelection:)] + pub unsafe fn moveDownAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToBeginningOfLineAndModifySelection:)] + pub unsafe fn moveToBeginningOfLineAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToEndOfLineAndModifySelection:)] + pub unsafe fn moveToEndOfLineAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToBeginningOfParagraphAndModifySelection:)] + pub unsafe fn moveToBeginningOfParagraphAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToEndOfParagraphAndModifySelection:)] + pub unsafe fn moveToEndOfParagraphAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToEndOfDocumentAndModifySelection:)] + pub unsafe fn moveToEndOfDocumentAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToBeginningOfDocumentAndModifySelection:)] + pub unsafe fn moveToBeginningOfDocumentAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(pageDownAndModifySelection:)] + pub unsafe fn pageDownAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(pageUpAndModifySelection:)] + pub unsafe fn pageUpAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveParagraphForwardAndModifySelection:)] + pub unsafe fn moveParagraphForwardAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveParagraphBackwardAndModifySelection:)] + pub unsafe fn moveParagraphBackwardAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveWordRight:)] + pub unsafe fn moveWordRight(&self, sender: Option<&Object>); + + #[optional] + #[method(moveWordLeft:)] + pub unsafe fn moveWordLeft(&self, sender: Option<&Object>); + + #[optional] + #[method(moveRightAndModifySelection:)] + pub unsafe fn moveRightAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveLeftAndModifySelection:)] + pub unsafe fn moveLeftAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveWordRightAndModifySelection:)] + pub unsafe fn moveWordRightAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveWordLeftAndModifySelection:)] + pub unsafe fn moveWordLeftAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToLeftEndOfLine:)] + pub unsafe fn moveToLeftEndOfLine(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToRightEndOfLine:)] + pub unsafe fn moveToRightEndOfLine(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToLeftEndOfLineAndModifySelection:)] + pub unsafe fn moveToLeftEndOfLineAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(moveToRightEndOfLineAndModifySelection:)] + pub unsafe fn moveToRightEndOfLineAndModifySelection(&self, sender: Option<&Object>); + + #[optional] + #[method(scrollPageUp:)] + pub unsafe fn scrollPageUp(&self, sender: Option<&Object>); + + #[optional] + #[method(scrollPageDown:)] + pub unsafe fn scrollPageDown(&self, sender: Option<&Object>); + + #[optional] + #[method(scrollLineUp:)] + pub unsafe fn scrollLineUp(&self, sender: Option<&Object>); + + #[optional] + #[method(scrollLineDown:)] + pub unsafe fn scrollLineDown(&self, sender: Option<&Object>); + + #[optional] + #[method(scrollToBeginningOfDocument:)] + pub unsafe fn scrollToBeginningOfDocument(&self, sender: Option<&Object>); + + #[optional] + #[method(scrollToEndOfDocument:)] + pub unsafe fn scrollToEndOfDocument(&self, sender: Option<&Object>); + + #[optional] + #[method(transpose:)] + pub unsafe fn transpose(&self, sender: Option<&Object>); + + #[optional] + #[method(transposeWords:)] + pub unsafe fn transposeWords(&self, sender: Option<&Object>); + + #[optional] + #[method(selectAll:)] + pub unsafe fn selectAll(&self, sender: Option<&Object>); + + #[optional] + #[method(selectParagraph:)] + pub unsafe fn selectParagraph(&self, sender: Option<&Object>); + + #[optional] + #[method(selectLine:)] + pub unsafe fn selectLine(&self, sender: Option<&Object>); + + #[optional] + #[method(selectWord:)] + pub unsafe fn selectWord(&self, sender: Option<&Object>); + + #[optional] + #[method(indent:)] + pub unsafe fn indent(&self, sender: Option<&Object>); + + #[optional] + #[method(insertTab:)] + pub unsafe fn insertTab(&self, sender: Option<&Object>); + + #[optional] + #[method(insertBacktab:)] + pub unsafe fn insertBacktab(&self, sender: Option<&Object>); + + #[optional] + #[method(insertNewline:)] + pub unsafe fn insertNewline(&self, sender: Option<&Object>); + + #[optional] + #[method(insertParagraphSeparator:)] + pub unsafe fn insertParagraphSeparator(&self, sender: Option<&Object>); + + #[optional] + #[method(insertNewlineIgnoringFieldEditor:)] + pub unsafe fn insertNewlineIgnoringFieldEditor(&self, sender: Option<&Object>); + + #[optional] + #[method(insertTabIgnoringFieldEditor:)] + pub unsafe fn insertTabIgnoringFieldEditor(&self, sender: Option<&Object>); + + #[optional] + #[method(insertLineBreak:)] + pub unsafe fn insertLineBreak(&self, sender: Option<&Object>); + + #[optional] + #[method(insertContainerBreak:)] + pub unsafe fn insertContainerBreak(&self, sender: Option<&Object>); + + #[optional] + #[method(insertSingleQuoteIgnoringSubstitution:)] + pub unsafe fn insertSingleQuoteIgnoringSubstitution(&self, sender: Option<&Object>); + + #[optional] + #[method(insertDoubleQuoteIgnoringSubstitution:)] + pub unsafe fn insertDoubleQuoteIgnoringSubstitution(&self, sender: Option<&Object>); + + #[optional] + #[method(changeCaseOfLetter:)] + pub unsafe fn changeCaseOfLetter(&self, sender: Option<&Object>); + + #[optional] + #[method(uppercaseWord:)] + pub unsafe fn uppercaseWord(&self, sender: Option<&Object>); + + #[optional] + #[method(lowercaseWord:)] + pub unsafe fn lowercaseWord(&self, sender: Option<&Object>); + + #[optional] + #[method(capitalizeWord:)] + pub unsafe fn capitalizeWord(&self, sender: Option<&Object>); + + #[optional] + #[method(deleteForward:)] + pub unsafe fn deleteForward(&self, sender: Option<&Object>); + + #[optional] + #[method(deleteBackward:)] + pub unsafe fn deleteBackward(&self, sender: Option<&Object>); + + #[optional] + #[method(deleteBackwardByDecomposingPreviousCharacter:)] + pub unsafe fn deleteBackwardByDecomposingPreviousCharacter(&self, sender: Option<&Object>); + + #[optional] + #[method(deleteWordForward:)] + pub unsafe fn deleteWordForward(&self, sender: Option<&Object>); + + #[optional] + #[method(deleteWordBackward:)] + pub unsafe fn deleteWordBackward(&self, sender: Option<&Object>); + + #[optional] + #[method(deleteToBeginningOfLine:)] + pub unsafe fn deleteToBeginningOfLine(&self, sender: Option<&Object>); + + #[optional] + #[method(deleteToEndOfLine:)] + pub unsafe fn deleteToEndOfLine(&self, sender: Option<&Object>); + + #[optional] + #[method(deleteToBeginningOfParagraph:)] + pub unsafe fn deleteToBeginningOfParagraph(&self, sender: Option<&Object>); + + #[optional] + #[method(deleteToEndOfParagraph:)] + pub unsafe fn deleteToEndOfParagraph(&self, sender: Option<&Object>); + + #[optional] + #[method(yank:)] + pub unsafe fn yank(&self, sender: Option<&Object>); + + #[optional] + #[method(complete:)] + pub unsafe fn complete(&self, sender: Option<&Object>); + + #[optional] + #[method(setMark:)] + pub unsafe fn setMark(&self, sender: Option<&Object>); + + #[optional] + #[method(deleteToMark:)] + pub unsafe fn deleteToMark(&self, sender: Option<&Object>); + + #[optional] + #[method(selectToMark:)] + pub unsafe fn selectToMark(&self, sender: Option<&Object>); + + #[optional] + #[method(swapWithMark:)] + pub unsafe fn swapWithMark(&self, sender: Option<&Object>); + + #[optional] + #[method(cancelOperation:)] + pub unsafe fn cancelOperation(&self, sender: Option<&Object>); + + #[optional] + #[method(makeBaseWritingDirectionNatural:)] + pub unsafe fn makeBaseWritingDirectionNatural(&self, sender: Option<&Object>); + + #[optional] + #[method(makeBaseWritingDirectionLeftToRight:)] + pub unsafe fn makeBaseWritingDirectionLeftToRight(&self, sender: Option<&Object>); + + #[optional] + #[method(makeBaseWritingDirectionRightToLeft:)] + pub unsafe fn makeBaseWritingDirectionRightToLeft(&self, sender: Option<&Object>); + + #[optional] + #[method(makeTextWritingDirectionNatural:)] + pub unsafe fn makeTextWritingDirectionNatural(&self, sender: Option<&Object>); + + #[optional] + #[method(makeTextWritingDirectionLeftToRight:)] + pub unsafe fn makeTextWritingDirectionLeftToRight(&self, sender: Option<&Object>); + + #[optional] + #[method(makeTextWritingDirectionRightToLeft:)] + pub unsafe fn makeTextWritingDirectionRightToLeft(&self, sender: Option<&Object>); + + #[optional] + #[method(quickLookPreviewItems:)] + pub unsafe fn quickLookPreviewItems(&self, sender: Option<&Object>); + } +); extern_methods!( /// NSStandardKeyBindingMethods diff --git a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs index ef54530c1..159b5e5b7 100644 --- a/crates/icrate/src/generated/AppKit/NSRuleEditor.rs +++ b/crates/icrate/src/generated/AppKit/NSRuleEditor.rs @@ -205,6 +205,49 @@ extern_methods!( } ); -pub type NSRuleEditorDelegate = NSObject; +extern_protocol!( + pub struct NSRuleEditorDelegate; + + unsafe impl NSRuleEditorDelegate { + #[method(ruleEditor:numberOfChildrenForCriterion:withRowType:)] + pub unsafe fn ruleEditor_numberOfChildrenForCriterion_withRowType( + &self, + editor: &NSRuleEditor, + criterion: Option<&Object>, + rowType: NSRuleEditorRowType, + ) -> NSInteger; + + #[method_id(@__retain_semantics Other ruleEditor:child:forCriterion:withRowType:)] + pub unsafe fn ruleEditor_child_forCriterion_withRowType( + &self, + editor: &NSRuleEditor, + index: NSInteger, + criterion: Option<&Object>, + rowType: NSRuleEditorRowType, + ) -> Id; + + #[method_id(@__retain_semantics Other ruleEditor:displayValueForCriterion:inRow:)] + pub unsafe fn ruleEditor_displayValueForCriterion_inRow( + &self, + editor: &NSRuleEditor, + criterion: &Object, + row: NSInteger, + ) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other ruleEditor:predicatePartsForCriterion:withDisplayValue:inRow:)] + pub unsafe fn ruleEditor_predicatePartsForCriterion_withDisplayValue_inRow( + &self, + editor: &NSRuleEditor, + criterion: &Object, + value: &Object, + row: NSInteger, + ) -> Option, Shared>>; + + #[optional] + #[method(ruleEditorRowsDidChange:)] + pub unsafe fn ruleEditorRowsDidChange(&self, notification: &NSNotification); + } +); extern_static!(NSRuleEditorRowsDidChangeNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index 0dbff9df4..4e9cd65e9 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -162,7 +162,44 @@ extern_methods!( } ); -pub type NSOpenSavePanelDelegate = NSObject; +extern_protocol!( + pub struct NSOpenSavePanelDelegate; + + unsafe impl NSOpenSavePanelDelegate { + #[optional] + #[method(panel:shouldEnableURL:)] + pub unsafe fn panel_shouldEnableURL(&self, sender: &Object, url: &NSURL) -> bool; + + #[optional] + #[method(panel:validateURL:error:)] + pub unsafe fn panel_validateURL_error( + &self, + sender: &Object, + url: &NSURL, + ) -> Result<(), Id>; + + #[optional] + #[method(panel:didChangeToDirectoryURL:)] + pub unsafe fn panel_didChangeToDirectoryURL(&self, sender: &Object, url: Option<&NSURL>); + + #[optional] + #[method_id(@__retain_semantics Other panel:userEnteredFilename:confirmed:)] + pub unsafe fn panel_userEnteredFilename_confirmed( + &self, + sender: &Object, + filename: &NSString, + okFlag: bool, + ) -> Option>; + + #[optional] + #[method(panel:willExpand:)] + pub unsafe fn panel_willExpand(&self, sender: &Object, expanding: bool); + + #[optional] + #[method(panelSelectionDidChange:)] + pub unsafe fn panelSelectionDidChange(&self, sender: Option<&Object>); + } +); extern_methods!( /// NSSavePanelDelegateDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSScrubber.rs b/crates/icrate/src/generated/AppKit/NSScrubber.rs index 2fe1aed12..2ee5c0293 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubber.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubber.rs @@ -5,9 +5,63 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSScrubberDataSource = NSObject; +extern_protocol!( + pub struct NSScrubberDataSource; -pub type NSScrubberDelegate = NSObject; + unsafe impl NSScrubberDataSource { + #[method(numberOfItemsForScrubber:)] + pub unsafe fn numberOfItemsForScrubber(&self, scrubber: &NSScrubber) -> NSInteger; + + #[method_id(@__retain_semantics Other scrubber:viewForItemAtIndex:)] + pub unsafe fn scrubber_viewForItemAtIndex( + &self, + scrubber: &NSScrubber, + index: NSInteger, + ) -> Id; + } +); + +extern_protocol!( + pub struct NSScrubberDelegate; + + unsafe impl NSScrubberDelegate { + #[optional] + #[method(scrubber:didSelectItemAtIndex:)] + pub unsafe fn scrubber_didSelectItemAtIndex( + &self, + scrubber: &NSScrubber, + selectedIndex: NSInteger, + ); + + #[optional] + #[method(scrubber:didHighlightItemAtIndex:)] + pub unsafe fn scrubber_didHighlightItemAtIndex( + &self, + scrubber: &NSScrubber, + highlightedIndex: NSInteger, + ); + + #[optional] + #[method(scrubber:didChangeVisibleRange:)] + pub unsafe fn scrubber_didChangeVisibleRange( + &self, + scrubber: &NSScrubber, + visibleRange: NSRange, + ); + + #[optional] + #[method(didBeginInteractingWithScrubber:)] + pub unsafe fn didBeginInteractingWithScrubber(&self, scrubber: &NSScrubber); + + #[optional] + #[method(didFinishInteractingWithScrubber:)] + pub unsafe fn didFinishInteractingWithScrubber(&self, scrubber: &NSScrubber); + + #[optional] + #[method(didCancelInteractingWithScrubber:)] + pub unsafe fn didCancelInteractingWithScrubber(&self, scrubber: &NSScrubber); + } +); ns_enum!( #[underlying(NSInteger)] diff --git a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs index 9e7e06912..b18140968 100644 --- a/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs +++ b/crates/icrate/src/generated/AppKit/NSScrubberLayout.rs @@ -107,7 +107,20 @@ extern_methods!( } ); -pub type NSScrubberFlowLayoutDelegate = NSObject; +extern_protocol!( + pub struct NSScrubberFlowLayoutDelegate; + + unsafe impl NSScrubberFlowLayoutDelegate { + #[optional] + #[method(scrubber:layout:sizeForItemAtIndex:)] + pub unsafe fn scrubber_layout_sizeForItemAtIndex( + &self, + scrubber: &NSScrubber, + layout: &NSScrubberFlowLayout, + itemIndex: NSInteger, + ) -> NSSize; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSearchField.rs b/crates/icrate/src/generated/AppKit/NSSearchField.rs index 7f8eb8ecf..f20629fbe 100644 --- a/crates/icrate/src/generated/AppKit/NSSearchField.rs +++ b/crates/icrate/src/generated/AppKit/NSSearchField.rs @@ -7,7 +7,19 @@ use crate::Foundation::*; pub type NSSearchFieldRecentsAutosaveName = NSString; -pub type NSSearchFieldDelegate = NSObject; +extern_protocol!( + pub struct NSSearchFieldDelegate; + + unsafe impl NSSearchFieldDelegate { + #[optional] + #[method(searchFieldDidStartSearching:)] + pub unsafe fn searchFieldDidStartSearching(&self, sender: &NSSearchField); + + #[optional] + #[method(searchFieldDidEndSearching:)] + pub unsafe fn searchFieldDidEndSearching(&self, sender: &NSSearchField); + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index cc941ba83..fee141358 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -142,7 +142,71 @@ ns_enum!( } ); -pub type NSSharingServiceDelegate = NSObject; +extern_protocol!( + pub struct NSSharingServiceDelegate; + + unsafe impl NSSharingServiceDelegate { + #[optional] + #[method(sharingService:willShareItems:)] + pub unsafe fn sharingService_willShareItems( + &self, + sharingService: &NSSharingService, + items: &NSArray, + ); + + #[optional] + #[method(sharingService:didFailToShareItems:error:)] + pub unsafe fn sharingService_didFailToShareItems_error( + &self, + sharingService: &NSSharingService, + items: &NSArray, + error: &NSError, + ); + + #[optional] + #[method(sharingService:didShareItems:)] + pub unsafe fn sharingService_didShareItems( + &self, + sharingService: &NSSharingService, + items: &NSArray, + ); + + #[optional] + #[method(sharingService:sourceFrameOnScreenForShareItem:)] + pub unsafe fn sharingService_sourceFrameOnScreenForShareItem( + &self, + sharingService: &NSSharingService, + item: &Object, + ) -> NSRect; + + #[optional] + #[method_id(@__retain_semantics Other sharingService:transitionImageForShareItem:contentRect:)] + pub unsafe fn sharingService_transitionImageForShareItem_contentRect( + &self, + sharingService: &NSSharingService, + item: &Object, + contentRect: NonNull, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other sharingService:sourceWindowForShareItems:sharingContentScope:)] + pub unsafe fn sharingService_sourceWindowForShareItems_sharingContentScope( + &self, + sharingService: &NSSharingService, + items: &NSArray, + sharingContentScope: NonNull, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other anchoringViewForSharingService:showRelativeToRect:preferredEdge:)] + pub unsafe fn anchoringViewForSharingService_showRelativeToRect_preferredEdge( + &self, + sharingService: &NSSharingService, + positioningRect: NonNull, + preferredEdge: NonNull, + ) -> Option>; + } +); ns_options!( #[underlying(NSUInteger)] @@ -155,7 +219,44 @@ ns_options!( } ); -pub type NSCloudSharingServiceDelegate = NSObject; +extern_protocol!( + pub struct NSCloudSharingServiceDelegate; + + unsafe impl NSCloudSharingServiceDelegate { + #[optional] + #[method(sharingService:didCompleteForItems:error:)] + pub unsafe fn sharingService_didCompleteForItems_error( + &self, + sharingService: &NSSharingService, + items: &NSArray, + error: Option<&NSError>, + ); + + #[optional] + #[method(optionsForSharingService:shareProvider:)] + pub unsafe fn optionsForSharingService_shareProvider( + &self, + cloudKitSharingService: &NSSharingService, + provider: &NSItemProvider, + ) -> NSCloudKitSharingServiceOptions; + + #[optional] + #[method(sharingService:didSaveShare:)] + pub unsafe fn sharingService_didSaveShare( + &self, + sharingService: &NSSharingService, + share: &CKShare, + ); + + #[optional] + #[method(sharingService:didStopSharing:)] + pub unsafe fn sharingService_didStopSharing( + &self, + sharingService: &NSSharingService, + share: &CKShare, + ); + } +); extern_methods!( /// NSCloudKitSharing @@ -214,4 +315,33 @@ extern_methods!( } ); -pub type NSSharingServicePickerDelegate = NSObject; +extern_protocol!( + pub struct NSSharingServicePickerDelegate; + + unsafe impl NSSharingServicePickerDelegate { + #[optional] + #[method_id(@__retain_semantics Other sharingServicePicker:sharingServicesForItems:proposedSharingServices:)] + pub unsafe fn sharingServicePicker_sharingServicesForItems_proposedSharingServices( + &self, + sharingServicePicker: &NSSharingServicePicker, + items: &NSArray, + proposedServices: &NSArray, + ) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other sharingServicePicker:delegateForSharingService:)] + pub unsafe fn sharingServicePicker_delegateForSharingService( + &self, + sharingServicePicker: &NSSharingServicePicker, + sharingService: &NSSharingService, + ) -> Option>; + + #[optional] + #[method(sharingServicePicker:didChooseSharingService:)] + pub unsafe fn sharingServicePicker_didChooseSharingService( + &self, + sharingServicePicker: &NSSharingServicePicker, + service: Option<&NSSharingService>, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs index 8d6c8808e..b4e33008f 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerToolbarItem.rs @@ -29,4 +29,14 @@ extern_methods!( } ); -pub type NSSharingServicePickerToolbarItemDelegate = NSObject; +extern_protocol!( + pub struct NSSharingServicePickerToolbarItemDelegate; + + unsafe impl NSSharingServicePickerToolbarItemDelegate { + #[method_id(@__retain_semantics Other itemsForSharingServicePickerToolbarItem:)] + pub unsafe fn itemsForSharingServicePickerToolbarItem( + &self, + pickerToolbarItem: &NSSharingServicePickerToolbarItem, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs index 6b7e3c7d6..feb23989f 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingServicePickerTouchBarItem.rs @@ -47,4 +47,14 @@ extern_methods!( } ); -pub type NSSharingServicePickerTouchBarItemDelegate = NSObject; +extern_protocol!( + pub struct NSSharingServicePickerTouchBarItemDelegate; + + unsafe impl NSSharingServicePickerTouchBarItemDelegate { + #[method_id(@__retain_semantics Other itemsForSharingServicePickerTouchBarItem:)] + pub unsafe fn itemsForSharingServicePickerTouchBarItem( + &self, + pickerTouchBarItem: &NSSharingServicePickerTouchBarItem, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSound.rs b/crates/icrate/src/generated/AppKit/NSSound.rs index 3a0a7557a..1642ed71d 100644 --- a/crates/icrate/src/generated/AppKit/NSSound.rs +++ b/crates/icrate/src/generated/AppKit/NSSound.rs @@ -138,7 +138,15 @@ extern_methods!( } ); -pub type NSSoundDelegate = NSObject; +extern_protocol!( + pub struct NSSoundDelegate; + + unsafe impl NSSoundDelegate { + #[optional] + #[method(sound:didFinishPlaying:)] + pub unsafe fn sound_didFinishPlaying(&self, sound: &NSSound, flag: bool); + } +); extern_methods!( /// NSBundleSoundExtensions diff --git a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs index d62896bd7..269e994eb 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechRecognizer.rs @@ -57,4 +57,16 @@ extern_methods!( } ); -pub type NSSpeechRecognizerDelegate = NSObject; +extern_protocol!( + pub struct NSSpeechRecognizerDelegate; + + unsafe impl NSSpeechRecognizerDelegate { + #[optional] + #[method(speechRecognizer:didRecognizeCommand:)] + pub unsafe fn speechRecognizer_didRecognizeCommand( + &self, + sender: &NSSpeechRecognizer, + command: &NSString, + ); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs index cffadb637..ae9ab5794 100644 --- a/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs +++ b/crates/icrate/src/generated/AppKit/NSSpeechSynthesizer.rs @@ -200,7 +200,54 @@ extern_methods!( } ); -pub type NSSpeechSynthesizerDelegate = NSObject; +extern_protocol!( + pub struct NSSpeechSynthesizerDelegate; + + unsafe impl NSSpeechSynthesizerDelegate { + #[optional] + #[method(speechSynthesizer:didFinishSpeaking:)] + pub unsafe fn speechSynthesizer_didFinishSpeaking( + &self, + sender: &NSSpeechSynthesizer, + finishedSpeaking: bool, + ); + + #[optional] + #[method(speechSynthesizer:willSpeakWord:ofString:)] + pub unsafe fn speechSynthesizer_willSpeakWord_ofString( + &self, + sender: &NSSpeechSynthesizer, + characterRange: NSRange, + string: &NSString, + ); + + #[optional] + #[method(speechSynthesizer:willSpeakPhoneme:)] + pub unsafe fn speechSynthesizer_willSpeakPhoneme( + &self, + sender: &NSSpeechSynthesizer, + phonemeOpcode: c_short, + ); + + #[optional] + #[method(speechSynthesizer:didEncounterErrorAtIndex:ofString:message:)] + pub unsafe fn speechSynthesizer_didEncounterErrorAtIndex_ofString_message( + &self, + sender: &NSSpeechSynthesizer, + characterIndex: NSUInteger, + string: &NSString, + message: &NSString, + ); + + #[optional] + #[method(speechSynthesizer:didEncounterSyncMessage:)] + pub unsafe fn speechSynthesizer_didEncounterSyncMessage( + &self, + sender: &NSSpeechSynthesizer, + message: &NSString, + ); + } +); pub type NSSpeechMode = NSString; diff --git a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs index 700ea835f..b77857ff6 100644 --- a/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs +++ b/crates/icrate/src/generated/AppKit/NSSpellProtocol.rs @@ -5,6 +5,20 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSChangeSpelling = NSObject; +extern_protocol!( + pub struct NSChangeSpelling; -pub type NSIgnoreMisspelledWords = NSObject; + unsafe impl NSChangeSpelling { + #[method(changeSpelling:)] + pub unsafe fn changeSpelling(&self, sender: Option<&Object>); + } +); + +extern_protocol!( + pub struct NSIgnoreMisspelledWords; + + unsafe impl NSIgnoreMisspelledWords { + #[method(ignoreSpelling:)] + pub unsafe fn ignoreSpelling(&self, sender: Option<&Object>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSSplitView.rs b/crates/icrate/src/generated/AppKit/NSSplitView.rs index efea60cee..4d06318b9 100644 --- a/crates/icrate/src/generated/AppKit/NSSplitView.rs +++ b/crates/icrate/src/generated/AppKit/NSSplitView.rs @@ -123,7 +123,105 @@ extern_methods!( } ); -pub type NSSplitViewDelegate = NSObject; +extern_protocol!( + pub struct NSSplitViewDelegate; + + unsafe impl NSSplitViewDelegate { + #[optional] + #[method(splitView:canCollapseSubview:)] + pub unsafe fn splitView_canCollapseSubview( + &self, + splitView: &NSSplitView, + subview: &NSView, + ) -> bool; + + #[optional] + #[method(splitView:shouldCollapseSubview:forDoubleClickOnDividerAtIndex:)] + pub unsafe fn splitView_shouldCollapseSubview_forDoubleClickOnDividerAtIndex( + &self, + splitView: &NSSplitView, + subview: &NSView, + dividerIndex: NSInteger, + ) -> bool; + + #[optional] + #[method(splitView:constrainMinCoordinate:ofSubviewAt:)] + pub unsafe fn splitView_constrainMinCoordinate_ofSubviewAt( + &self, + splitView: &NSSplitView, + proposedMinimumPosition: CGFloat, + dividerIndex: NSInteger, + ) -> CGFloat; + + #[optional] + #[method(splitView:constrainMaxCoordinate:ofSubviewAt:)] + pub unsafe fn splitView_constrainMaxCoordinate_ofSubviewAt( + &self, + splitView: &NSSplitView, + proposedMaximumPosition: CGFloat, + dividerIndex: NSInteger, + ) -> CGFloat; + + #[optional] + #[method(splitView:constrainSplitPosition:ofSubviewAt:)] + pub unsafe fn splitView_constrainSplitPosition_ofSubviewAt( + &self, + splitView: &NSSplitView, + proposedPosition: CGFloat, + dividerIndex: NSInteger, + ) -> CGFloat; + + #[optional] + #[method(splitView:resizeSubviewsWithOldSize:)] + pub unsafe fn splitView_resizeSubviewsWithOldSize( + &self, + splitView: &NSSplitView, + oldSize: NSSize, + ); + + #[optional] + #[method(splitView:shouldAdjustSizeOfSubview:)] + pub unsafe fn splitView_shouldAdjustSizeOfSubview( + &self, + splitView: &NSSplitView, + view: &NSView, + ) -> bool; + + #[optional] + #[method(splitView:shouldHideDividerAtIndex:)] + pub unsafe fn splitView_shouldHideDividerAtIndex( + &self, + splitView: &NSSplitView, + dividerIndex: NSInteger, + ) -> bool; + + #[optional] + #[method(splitView:effectiveRect:forDrawnRect:ofDividerAtIndex:)] + pub unsafe fn splitView_effectiveRect_forDrawnRect_ofDividerAtIndex( + &self, + splitView: &NSSplitView, + proposedEffectiveRect: NSRect, + drawnRect: NSRect, + dividerIndex: NSInteger, + ) -> NSRect; + + #[optional] + #[method(splitView:additionalEffectiveRectOfDividerAtIndex:)] + pub unsafe fn splitView_additionalEffectiveRectOfDividerAtIndex( + &self, + splitView: &NSSplitView, + dividerIndex: NSInteger, + ) -> NSRect; + + #[optional] + #[method(splitViewWillResizeSubviews:)] + pub unsafe fn splitViewWillResizeSubviews(&self, notification: &NSNotification); + + #[optional] + #[method(splitViewDidResizeSubviews:)] + pub unsafe fn splitViewDidResizeSubviews(&self, notification: &NSNotification); + } +); extern_static!(NSSplitViewWillResizeSubviewsNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSStackView.rs b/crates/icrate/src/generated/AppKit/NSStackView.rs index 0113ec0e1..086d39f54 100644 --- a/crates/icrate/src/generated/AppKit/NSStackView.rs +++ b/crates/icrate/src/generated/AppKit/NSStackView.rs @@ -156,7 +156,27 @@ extern_methods!( } ); -pub type NSStackViewDelegate = NSObject; +extern_protocol!( + pub struct NSStackViewDelegate; + + unsafe impl NSStackViewDelegate { + #[optional] + #[method(stackView:willDetachViews:)] + pub unsafe fn stackView_willDetachViews( + &self, + stackView: &NSStackView, + views: &NSArray, + ); + + #[optional] + #[method(stackView:didReattachViews:)] + pub unsafe fn stackView_didReattachViews( + &self, + stackView: &NSStackView, + views: &NSArray, + ); + } +); extern_methods!( /// NSStackViewGravityAreas diff --git a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs index ec3086096..12ca14226 100644 --- a/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs +++ b/crates/icrate/src/generated/AppKit/NSStoryboardSegue.rs @@ -48,4 +48,32 @@ extern_methods!( } ); -pub type NSSeguePerforming = NSObject; +extern_protocol!( + pub struct NSSeguePerforming; + + unsafe impl NSSeguePerforming { + #[optional] + #[method(prepareForSegue:sender:)] + pub unsafe fn prepareForSegue_sender( + &self, + segue: &NSStoryboardSegue, + sender: Option<&Object>, + ); + + #[optional] + #[method(performSegueWithIdentifier:sender:)] + pub unsafe fn performSegueWithIdentifier_sender( + &self, + identifier: &NSStoryboardSegueIdentifier, + sender: Option<&Object>, + ); + + #[optional] + #[method(shouldPerformSegueWithIdentifier:sender:)] + pub unsafe fn shouldPerformSegueWithIdentifier_sender( + &self, + identifier: &NSStoryboardSegueIdentifier, + sender: Option<&Object>, + ) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTabView.rs b/crates/icrate/src/generated/AppKit/NSTabView.rs index 1ff1e8503..7b3fe2fb1 100644 --- a/crates/icrate/src/generated/AppKit/NSTabView.rs +++ b/crates/icrate/src/generated/AppKit/NSTabView.rs @@ -177,4 +177,36 @@ extern_methods!( } ); -pub type NSTabViewDelegate = NSObject; +extern_protocol!( + pub struct NSTabViewDelegate; + + unsafe impl NSTabViewDelegate { + #[optional] + #[method(tabView:shouldSelectTabViewItem:)] + pub unsafe fn tabView_shouldSelectTabViewItem( + &self, + tabView: &NSTabView, + tabViewItem: Option<&NSTabViewItem>, + ) -> bool; + + #[optional] + #[method(tabView:willSelectTabViewItem:)] + pub unsafe fn tabView_willSelectTabViewItem( + &self, + tabView: &NSTabView, + tabViewItem: Option<&NSTabViewItem>, + ); + + #[optional] + #[method(tabView:didSelectTabViewItem:)] + pub unsafe fn tabView_didSelectTabViewItem( + &self, + tabView: &NSTabView, + tabViewItem: Option<&NSTabViewItem>, + ); + + #[optional] + #[method(tabViewDidChangeNumberOfTabViewItems:)] + pub unsafe fn tabViewDidChangeNumberOfTabViewItems(&self, tabView: &NSTabView); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTableView.rs b/crates/icrate/src/generated/AppKit/NSTableView.rs index 4e8e505ea..07d008ba1 100644 --- a/crates/icrate/src/generated/AppKit/NSTableView.rs +++ b/crates/icrate/src/generated/AppKit/NSTableView.rs @@ -642,7 +642,239 @@ extern_methods!( } ); -pub type NSTableViewDelegate = NSObject; +extern_protocol!( + pub struct NSTableViewDelegate; + + unsafe impl NSTableViewDelegate { + #[optional] + #[method_id(@__retain_semantics Other tableView:viewForTableColumn:row:)] + pub unsafe fn tableView_viewForTableColumn_row( + &self, + tableView: &NSTableView, + tableColumn: Option<&NSTableColumn>, + row: NSInteger, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tableView:rowViewForRow:)] + pub unsafe fn tableView_rowViewForRow( + &self, + tableView: &NSTableView, + row: NSInteger, + ) -> Option>; + + #[optional] + #[method(tableView:didAddRowView:forRow:)] + pub unsafe fn tableView_didAddRowView_forRow( + &self, + tableView: &NSTableView, + rowView: &NSTableRowView, + row: NSInteger, + ); + + #[optional] + #[method(tableView:didRemoveRowView:forRow:)] + pub unsafe fn tableView_didRemoveRowView_forRow( + &self, + tableView: &NSTableView, + rowView: &NSTableRowView, + row: NSInteger, + ); + + #[optional] + #[method(tableView:willDisplayCell:forTableColumn:row:)] + pub unsafe fn tableView_willDisplayCell_forTableColumn_row( + &self, + tableView: &NSTableView, + cell: &Object, + tableColumn: Option<&NSTableColumn>, + row: NSInteger, + ); + + #[optional] + #[method(tableView:shouldEditTableColumn:row:)] + pub unsafe fn tableView_shouldEditTableColumn_row( + &self, + tableView: &NSTableView, + tableColumn: Option<&NSTableColumn>, + row: NSInteger, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other tableView:toolTipForCell:rect:tableColumn:row:mouseLocation:)] + pub unsafe fn tableView_toolTipForCell_rect_tableColumn_row_mouseLocation( + &self, + tableView: &NSTableView, + cell: &NSCell, + rect: NSRectPointer, + tableColumn: Option<&NSTableColumn>, + row: NSInteger, + mouseLocation: NSPoint, + ) -> Id; + + #[optional] + #[method(tableView:shouldShowCellExpansionForTableColumn:row:)] + pub unsafe fn tableView_shouldShowCellExpansionForTableColumn_row( + &self, + tableView: &NSTableView, + tableColumn: Option<&NSTableColumn>, + row: NSInteger, + ) -> bool; + + #[optional] + #[method(tableView:shouldTrackCell:forTableColumn:row:)] + pub unsafe fn tableView_shouldTrackCell_forTableColumn_row( + &self, + tableView: &NSTableView, + cell: &NSCell, + tableColumn: Option<&NSTableColumn>, + row: NSInteger, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other tableView:dataCellForTableColumn:row:)] + pub unsafe fn tableView_dataCellForTableColumn_row( + &self, + tableView: &NSTableView, + tableColumn: Option<&NSTableColumn>, + row: NSInteger, + ) -> Option>; + + #[optional] + #[method(selectionShouldChangeInTableView:)] + pub unsafe fn selectionShouldChangeInTableView(&self, tableView: &NSTableView) -> bool; + + #[optional] + #[method(tableView:shouldSelectRow:)] + pub unsafe fn tableView_shouldSelectRow( + &self, + tableView: &NSTableView, + row: NSInteger, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other tableView:selectionIndexesForProposedSelection:)] + pub unsafe fn tableView_selectionIndexesForProposedSelection( + &self, + tableView: &NSTableView, + proposedSelectionIndexes: &NSIndexSet, + ) -> Id; + + #[optional] + #[method(tableView:shouldSelectTableColumn:)] + pub unsafe fn tableView_shouldSelectTableColumn( + &self, + tableView: &NSTableView, + tableColumn: Option<&NSTableColumn>, + ) -> bool; + + #[optional] + #[method(tableView:mouseDownInHeaderOfTableColumn:)] + pub unsafe fn tableView_mouseDownInHeaderOfTableColumn( + &self, + tableView: &NSTableView, + tableColumn: &NSTableColumn, + ); + + #[optional] + #[method(tableView:didClickTableColumn:)] + pub unsafe fn tableView_didClickTableColumn( + &self, + tableView: &NSTableView, + tableColumn: &NSTableColumn, + ); + + #[optional] + #[method(tableView:didDragTableColumn:)] + pub unsafe fn tableView_didDragTableColumn( + &self, + tableView: &NSTableView, + tableColumn: &NSTableColumn, + ); + + #[optional] + #[method(tableView:heightOfRow:)] + pub unsafe fn tableView_heightOfRow( + &self, + tableView: &NSTableView, + row: NSInteger, + ) -> CGFloat; + + #[optional] + #[method_id(@__retain_semantics Other tableView:typeSelectStringForTableColumn:row:)] + pub unsafe fn tableView_typeSelectStringForTableColumn_row( + &self, + tableView: &NSTableView, + tableColumn: Option<&NSTableColumn>, + row: NSInteger, + ) -> Option>; + + #[optional] + #[method(tableView:nextTypeSelectMatchFromRow:toRow:forString:)] + pub unsafe fn tableView_nextTypeSelectMatchFromRow_toRow_forString( + &self, + tableView: &NSTableView, + startRow: NSInteger, + endRow: NSInteger, + searchString: &NSString, + ) -> NSInteger; + + #[optional] + #[method(tableView:shouldTypeSelectForEvent:withCurrentSearchString:)] + pub unsafe fn tableView_shouldTypeSelectForEvent_withCurrentSearchString( + &self, + tableView: &NSTableView, + event: &NSEvent, + searchString: Option<&NSString>, + ) -> bool; + + #[optional] + #[method(tableView:isGroupRow:)] + pub unsafe fn tableView_isGroupRow(&self, tableView: &NSTableView, row: NSInteger) -> bool; + + #[optional] + #[method(tableView:sizeToFitWidthOfColumn:)] + pub unsafe fn tableView_sizeToFitWidthOfColumn( + &self, + tableView: &NSTableView, + column: NSInteger, + ) -> CGFloat; + + #[optional] + #[method(tableView:shouldReorderColumn:toColumn:)] + pub unsafe fn tableView_shouldReorderColumn_toColumn( + &self, + tableView: &NSTableView, + columnIndex: NSInteger, + newColumnIndex: NSInteger, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other tableView:rowActionsForRow:edge:)] + pub unsafe fn tableView_rowActionsForRow_edge( + &self, + tableView: &NSTableView, + row: NSInteger, + edge: NSTableRowActionEdge, + ) -> Id, Shared>; + + #[optional] + #[method(tableViewSelectionDidChange:)] + pub unsafe fn tableViewSelectionDidChange(&self, notification: &NSNotification); + + #[optional] + #[method(tableViewColumnDidMove:)] + pub unsafe fn tableViewColumnDidMove(&self, notification: &NSNotification); + + #[optional] + #[method(tableViewColumnDidResize:)] + pub unsafe fn tableViewColumnDidResize(&self, notification: &NSNotification); + + #[optional] + #[method(tableViewSelectionIsChanging:)] + pub unsafe fn tableViewSelectionIsChanging(&self, notification: &NSNotification); + } +); extern_static!(NSTableViewSelectionDidChangeNotification: &'static NSNotificationName); @@ -654,7 +886,116 @@ extern_static!(NSTableViewSelectionIsChangingNotification: &'static NSNotificati extern_static!(NSTableViewRowViewKey: &'static NSUserInterfaceItemIdentifier); -pub type NSTableViewDataSource = NSObject; +extern_protocol!( + pub struct NSTableViewDataSource; + + unsafe impl NSTableViewDataSource { + #[optional] + #[method(numberOfRowsInTableView:)] + pub unsafe fn numberOfRowsInTableView(&self, tableView: &NSTableView) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other tableView:objectValueForTableColumn:row:)] + pub unsafe fn tableView_objectValueForTableColumn_row( + &self, + tableView: &NSTableView, + tableColumn: Option<&NSTableColumn>, + row: NSInteger, + ) -> Option>; + + #[optional] + #[method(tableView:setObjectValue:forTableColumn:row:)] + pub unsafe fn tableView_setObjectValue_forTableColumn_row( + &self, + tableView: &NSTableView, + object: Option<&Object>, + tableColumn: Option<&NSTableColumn>, + row: NSInteger, + ); + + #[optional] + #[method(tableView:sortDescriptorsDidChange:)] + pub unsafe fn tableView_sortDescriptorsDidChange( + &self, + tableView: &NSTableView, + oldDescriptors: &NSArray, + ); + + #[optional] + #[method_id(@__retain_semantics Other tableView:pasteboardWriterForRow:)] + pub unsafe fn tableView_pasteboardWriterForRow( + &self, + tableView: &NSTableView, + row: NSInteger, + ) -> Option>; + + #[optional] + #[method(tableView:draggingSession:willBeginAtPoint:forRowIndexes:)] + pub unsafe fn tableView_draggingSession_willBeginAtPoint_forRowIndexes( + &self, + tableView: &NSTableView, + session: &NSDraggingSession, + screenPoint: NSPoint, + rowIndexes: &NSIndexSet, + ); + + #[optional] + #[method(tableView:draggingSession:endedAtPoint:operation:)] + pub unsafe fn tableView_draggingSession_endedAtPoint_operation( + &self, + tableView: &NSTableView, + session: &NSDraggingSession, + screenPoint: NSPoint, + operation: NSDragOperation, + ); + + #[optional] + #[method(tableView:updateDraggingItemsForDrag:)] + pub unsafe fn tableView_updateDraggingItemsForDrag( + &self, + tableView: &NSTableView, + draggingInfo: &NSDraggingInfo, + ); + + #[optional] + #[method(tableView:writeRowsWithIndexes:toPasteboard:)] + pub unsafe fn tableView_writeRowsWithIndexes_toPasteboard( + &self, + tableView: &NSTableView, + rowIndexes: &NSIndexSet, + pboard: &NSPasteboard, + ) -> bool; + + #[optional] + #[method(tableView:validateDrop:proposedRow:proposedDropOperation:)] + pub unsafe fn tableView_validateDrop_proposedRow_proposedDropOperation( + &self, + tableView: &NSTableView, + info: &NSDraggingInfo, + row: NSInteger, + dropOperation: NSTableViewDropOperation, + ) -> NSDragOperation; + + #[optional] + #[method(tableView:acceptDrop:row:dropOperation:)] + pub unsafe fn tableView_acceptDrop_row_dropOperation( + &self, + tableView: &NSTableView, + info: &NSDraggingInfo, + row: NSInteger, + dropOperation: NSTableViewDropOperation, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:)] + pub unsafe fn tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes( + &self, + tableView: &NSTableView, + dropDestination: &NSURL, + indexSet: &NSIndexSet, + ) -> Id, Shared>; + } +); extern_methods!( /// NSTableViewDataSourceDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSText.rs b/crates/icrate/src/generated/AppKit/NSText.rs index a8705beb9..dd149af47 100644 --- a/crates/icrate/src/generated/AppKit/NSText.rs +++ b/crates/icrate/src/generated/AppKit/NSText.rs @@ -315,7 +315,31 @@ extern_enum!( } ); -pub type NSTextDelegate = NSObject; +extern_protocol!( + pub struct NSTextDelegate; + + unsafe impl NSTextDelegate { + #[optional] + #[method(textShouldBeginEditing:)] + pub unsafe fn textShouldBeginEditing(&self, textObject: &NSText) -> bool; + + #[optional] + #[method(textShouldEndEditing:)] + pub unsafe fn textShouldEndEditing(&self, textObject: &NSText) -> bool; + + #[optional] + #[method(textDidBeginEditing:)] + pub unsafe fn textDidBeginEditing(&self, notification: &NSNotification); + + #[optional] + #[method(textDidEndEditing:)] + pub unsafe fn textDidEndEditing(&self, notification: &NSNotification); + + #[optional] + #[method(textDidChange:)] + pub unsafe fn textDidChange(&self, notification: &NSNotification); + } +); extern_enum!( #[underlying(c_uint)] diff --git a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs index 7163e03d6..21fdb4122 100644 --- a/crates/icrate/src/generated/AppKit/NSTextAttachment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextAttachment.rs @@ -12,9 +12,61 @@ extern_enum!( } ); -pub type NSTextAttachmentContainer = NSObject; +extern_protocol!( + pub struct NSTextAttachmentContainer; -pub type NSTextAttachmentLayout = NSObject; + unsafe impl NSTextAttachmentContainer { + #[method_id(@__retain_semantics Other imageForBounds:textContainer:characterIndex:)] + pub unsafe fn imageForBounds_textContainer_characterIndex( + &self, + imageBounds: CGRect, + textContainer: Option<&NSTextContainer>, + charIndex: NSUInteger, + ) -> Option>; + + #[method(attachmentBoundsForTextContainer:proposedLineFragment:glyphPosition:characterIndex:)] + pub unsafe fn attachmentBoundsForTextContainer_proposedLineFragment_glyphPosition_characterIndex( + &self, + textContainer: Option<&NSTextContainer>, + lineFrag: CGRect, + position: CGPoint, + charIndex: NSUInteger, + ) -> CGRect; + } +); + +extern_protocol!( + pub struct NSTextAttachmentLayout; + + unsafe impl NSTextAttachmentLayout { + #[method_id(@__retain_semantics Other imageForBounds:attributes:location:textContainer:)] + pub unsafe fn imageForBounds_attributes_location_textContainer( + &self, + bounds: CGRect, + attributes: &NSDictionary, + location: &NSTextLocation, + textContainer: Option<&NSTextContainer>, + ) -> Option>; + + #[method(attachmentBoundsForAttributes:location:textContainer:proposedLineFragment:position:)] + pub unsafe fn attachmentBoundsForAttributes_location_textContainer_proposedLineFragment_position( + &self, + attributes: &NSDictionary, + location: &NSTextLocation, + textContainer: Option<&NSTextContainer>, + proposedLineFragment: CGRect, + position: CGPoint, + ) -> CGRect; + + #[method_id(@__retain_semantics Other viewProviderForParentView:location:textContainer:)] + pub unsafe fn viewProviderForParentView_location_textContainer( + &self, + parentView: Option<&NSView>, + location: &NSTextLocation, + textContainer: Option<&NSTextContainer>, + ) -> Option>; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs index cfc1162c7..91fe063e0 100644 --- a/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextCheckingClient.rs @@ -14,6 +14,145 @@ ns_enum!( } ); -pub type NSTextInputTraits = NSObject; +extern_protocol!( + pub struct NSTextInputTraits; -pub type NSTextCheckingClient = NSObject; + unsafe impl NSTextInputTraits { + #[optional] + #[method(autocorrectionType)] + pub unsafe fn autocorrectionType(&self) -> NSTextInputTraitType; + + #[optional] + #[method(setAutocorrectionType:)] + pub unsafe fn setAutocorrectionType(&self, autocorrectionType: NSTextInputTraitType); + + #[optional] + #[method(spellCheckingType)] + pub unsafe fn spellCheckingType(&self) -> NSTextInputTraitType; + + #[optional] + #[method(setSpellCheckingType:)] + pub unsafe fn setSpellCheckingType(&self, spellCheckingType: NSTextInputTraitType); + + #[optional] + #[method(grammarCheckingType)] + pub unsafe fn grammarCheckingType(&self) -> NSTextInputTraitType; + + #[optional] + #[method(setGrammarCheckingType:)] + pub unsafe fn setGrammarCheckingType(&self, grammarCheckingType: NSTextInputTraitType); + + #[optional] + #[method(smartQuotesType)] + pub unsafe fn smartQuotesType(&self) -> NSTextInputTraitType; + + #[optional] + #[method(setSmartQuotesType:)] + pub unsafe fn setSmartQuotesType(&self, smartQuotesType: NSTextInputTraitType); + + #[optional] + #[method(smartDashesType)] + pub unsafe fn smartDashesType(&self) -> NSTextInputTraitType; + + #[optional] + #[method(setSmartDashesType:)] + pub unsafe fn setSmartDashesType(&self, smartDashesType: NSTextInputTraitType); + + #[optional] + #[method(smartInsertDeleteType)] + pub unsafe fn smartInsertDeleteType(&self) -> NSTextInputTraitType; + + #[optional] + #[method(setSmartInsertDeleteType:)] + pub unsafe fn setSmartInsertDeleteType(&self, smartInsertDeleteType: NSTextInputTraitType); + + #[optional] + #[method(textReplacementType)] + pub unsafe fn textReplacementType(&self) -> NSTextInputTraitType; + + #[optional] + #[method(setTextReplacementType:)] + pub unsafe fn setTextReplacementType(&self, textReplacementType: NSTextInputTraitType); + + #[optional] + #[method(dataDetectionType)] + pub unsafe fn dataDetectionType(&self) -> NSTextInputTraitType; + + #[optional] + #[method(setDataDetectionType:)] + pub unsafe fn setDataDetectionType(&self, dataDetectionType: NSTextInputTraitType); + + #[optional] + #[method(linkDetectionType)] + pub unsafe fn linkDetectionType(&self) -> NSTextInputTraitType; + + #[optional] + #[method(setLinkDetectionType:)] + pub unsafe fn setLinkDetectionType(&self, linkDetectionType: NSTextInputTraitType); + + #[optional] + #[method(textCompletionType)] + pub unsafe fn textCompletionType(&self) -> NSTextInputTraitType; + + #[optional] + #[method(setTextCompletionType:)] + pub unsafe fn setTextCompletionType(&self, textCompletionType: NSTextInputTraitType); + } +); + +extern_protocol!( + pub struct NSTextCheckingClient; + + unsafe impl NSTextCheckingClient { + #[method_id(@__retain_semantics Other annotatedSubstringForProposedRange:actualRange:)] + pub unsafe fn annotatedSubstringForProposedRange_actualRange( + &self, + range: NSRange, + actualRange: NSRangePointer, + ) -> Option>; + + #[method(setAnnotations:range:)] + pub unsafe fn setAnnotations_range( + &self, + annotations: &NSDictionary, + range: NSRange, + ); + + #[method(addAnnotations:range:)] + pub unsafe fn addAnnotations_range( + &self, + annotations: &NSDictionary, + range: NSRange, + ); + + #[method(removeAnnotation:range:)] + pub unsafe fn removeAnnotation_range( + &self, + annotationName: &NSAttributedStringKey, + range: NSRange, + ); + + #[method(replaceCharactersInRange:withAnnotatedString:)] + pub unsafe fn replaceCharactersInRange_withAnnotatedString( + &self, + range: NSRange, + annotatedString: &NSAttributedString, + ); + + #[method(selectAndShowRange:)] + pub unsafe fn selectAndShowRange(&self, range: NSRange); + + #[method_id(@__retain_semantics Other viewForRange:firstRect:actualRange:)] + pub unsafe fn viewForRange_firstRect_actualRange( + &self, + range: NSRange, + firstRect: NSRectPointer, + actualRange: NSRangePointer, + ) -> Option>; + + #[method_id(@__retain_semantics Other candidateListTouchBarItem)] + pub unsafe fn candidateListTouchBarItem( + &self, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextContent.rs b/crates/icrate/src/generated/AppKit/NSTextContent.rs index 59dffe76d..6bdc4bafa 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContent.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContent.rs @@ -13,4 +13,14 @@ extern_static!(NSTextContentTypePassword: &'static NSTextContentType); extern_static!(NSTextContentTypeOneTimeCode: &'static NSTextContentType); -pub type NSTextContent = NSObject; +extern_protocol!( + pub struct NSTextContent; + + unsafe impl NSTextContent { + #[method_id(@__retain_semantics Other contentType)] + pub unsafe fn contentType(&self) -> Option>; + + #[method(setContentType:)] + pub unsafe fn setContentType(&self, contentType: Option<&NSTextContentType>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs index 9e48df1cf..d9c684133 100644 --- a/crates/icrate/src/generated/AppKit/NSTextContentManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextContentManager.rs @@ -13,7 +13,59 @@ ns_options!( } ); -pub type NSTextElementProvider = NSObject; +extern_protocol!( + pub struct NSTextElementProvider; + + unsafe impl NSTextElementProvider { + #[method_id(@__retain_semantics Other documentRange)] + pub unsafe fn documentRange(&self) -> Id; + + #[method_id(@__retain_semantics Other enumerateTextElementsFromLocation:options:usingBlock:)] + pub unsafe fn enumerateTextElementsFromLocation_options_usingBlock( + &self, + textLocation: Option<&NSTextLocation>, + options: NSTextContentManagerEnumerationOptions, + block: &Block<(NonNull,), Bool>, + ) -> Option>; + + #[method(replaceContentsInRange:withTextElements:)] + pub unsafe fn replaceContentsInRange_withTextElements( + &self, + range: &NSTextRange, + textElements: Option<&NSArray>, + ); + + #[method(synchronizeToBackingStore:)] + pub unsafe fn synchronizeToBackingStore( + &self, + completionHandler: Option<&Block<(*mut NSError,), ()>>, + ); + + #[optional] + #[method_id(@__retain_semantics Other locationFromLocation:withOffset:)] + pub unsafe fn locationFromLocation_withOffset( + &self, + location: &NSTextLocation, + offset: NSInteger, + ) -> Option>; + + #[optional] + #[method(offsetFromLocation:toLocation:)] + pub unsafe fn offsetFromLocation_toLocation( + &self, + from: &NSTextLocation, + to: &NSTextLocation, + ) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other adjustedRangeFromRange:forEditingTextSelection:)] + pub unsafe fn adjustedRangeFromRange_forEditingTextSelection( + &self, + textRange: &NSTextRange, + forEditingTextSelection: bool, + ) -> Option>; + } +); extern_class!( #[derive(Debug)] @@ -104,9 +156,42 @@ extern_methods!( } ); -pub type NSTextContentManagerDelegate = NSObject; +extern_protocol!( + pub struct NSTextContentManagerDelegate; + + unsafe impl NSTextContentManagerDelegate { + #[optional] + #[method_id(@__retain_semantics Other textContentManager:textElementAtLocation:)] + pub unsafe fn textContentManager_textElementAtLocation( + &self, + textContentManager: &NSTextContentManager, + location: &NSTextLocation, + ) -> Option>; + + #[optional] + #[method(textContentManager:shouldEnumerateTextElement:options:)] + pub unsafe fn textContentManager_shouldEnumerateTextElement_options( + &self, + textContentManager: &NSTextContentManager, + textElement: &NSTextElement, + options: NSTextContentManagerEnumerationOptions, + ) -> bool; + } +); + +extern_protocol!( + pub struct NSTextContentStorageDelegate; -pub type NSTextContentStorageDelegate = NSObject; + unsafe impl NSTextContentStorageDelegate { + #[optional] + #[method_id(@__retain_semantics Other textContentStorage:textParagraphWithRange:)] + pub unsafe fn textContentStorage_textParagraphWithRange( + &self, + textContentStorage: &NSTextContentStorage, + range: NSRange, + ) -> Option>; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextField.rs b/crates/icrate/src/generated/AppKit/NSTextField.rs index ff22419ac..2f48f4014 100644 --- a/crates/icrate/src/generated/AppKit/NSTextField.rs +++ b/crates/icrate/src/generated/AppKit/NSTextField.rs @@ -194,7 +194,39 @@ extern_methods!( } ); -pub type NSTextFieldDelegate = NSObject; +extern_protocol!( + pub struct NSTextFieldDelegate; + + unsafe impl NSTextFieldDelegate { + #[optional] + #[method_id(@__retain_semantics Other textField:textView:candidatesForSelectedRange:)] + pub unsafe fn textField_textView_candidatesForSelectedRange( + &self, + textField: &NSTextField, + textView: &NSTextView, + selectedRange: NSRange, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other textField:textView:candidates:forSelectedRange:)] + pub unsafe fn textField_textView_candidates_forSelectedRange( + &self, + textField: &NSTextField, + textView: &NSTextView, + candidates: &NSArray, + selectedRange: NSRange, + ) -> Id, Shared>; + + #[optional] + #[method(textField:textView:shouldSelectCandidateAtIndex:)] + pub unsafe fn textField_textView_shouldSelectCandidateAtIndex( + &self, + textField: &NSTextField, + textView: &NSTextView, + index: NSUInteger, + ) -> bool; + } +); extern_methods!( /// NSDeprecated diff --git a/crates/icrate/src/generated/AppKit/NSTextFinder.rs b/crates/icrate/src/generated/AppKit/NSTextFinder.rs index b4aeb4ae5..f9e0b4025 100644 --- a/crates/icrate/src/generated/AppKit/NSTextFinder.rs +++ b/crates/icrate/src/generated/AppKit/NSTextFinder.rs @@ -116,6 +116,117 @@ extern_methods!( } ); -pub type NSTextFinderClient = NSObject; +extern_protocol!( + pub struct NSTextFinderClient; -pub type NSTextFinderBarContainer = NSObject; + unsafe impl NSTextFinderClient { + #[optional] + #[method(isSelectable)] + pub unsafe fn isSelectable(&self) -> bool; + + #[optional] + #[method(allowsMultipleSelection)] + pub unsafe fn allowsMultipleSelection(&self) -> bool; + + #[optional] + #[method(isEditable)] + pub unsafe fn isEditable(&self) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other string)] + pub unsafe fn string(&self) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other stringAtIndex:effectiveRange:endsWithSearchBoundary:)] + pub unsafe fn stringAtIndex_effectiveRange_endsWithSearchBoundary( + &self, + characterIndex: NSUInteger, + outRange: NSRangePointer, + outFlag: NonNull, + ) -> Id; + + #[optional] + #[method(stringLength)] + pub unsafe fn stringLength(&self) -> NSUInteger; + + #[optional] + #[method(firstSelectedRange)] + pub unsafe fn firstSelectedRange(&self) -> NSRange; + + #[optional] + #[method_id(@__retain_semantics Other selectedRanges)] + pub unsafe fn selectedRanges(&self) -> Id, Shared>; + + #[optional] + #[method(setSelectedRanges:)] + pub unsafe fn setSelectedRanges(&self, selectedRanges: &NSArray); + + #[optional] + #[method(scrollRangeToVisible:)] + pub unsafe fn scrollRangeToVisible(&self, range: NSRange); + + #[optional] + #[method(shouldReplaceCharactersInRanges:withStrings:)] + pub unsafe fn shouldReplaceCharactersInRanges_withStrings( + &self, + ranges: &NSArray, + strings: &NSArray, + ) -> bool; + + #[optional] + #[method(replaceCharactersInRange:withString:)] + pub unsafe fn replaceCharactersInRange_withString(&self, range: NSRange, string: &NSString); + + #[optional] + #[method(didReplaceCharacters)] + pub unsafe fn didReplaceCharacters(&self); + + #[optional] + #[method_id(@__retain_semantics Other contentViewAtIndex:effectiveCharacterRange:)] + pub unsafe fn contentViewAtIndex_effectiveCharacterRange( + &self, + index: NSUInteger, + outRange: NSRangePointer, + ) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other rectsForCharacterRange:)] + pub unsafe fn rectsForCharacterRange( + &self, + range: NSRange, + ) -> Option, Shared>>; + + #[optional] + #[method_id(@__retain_semantics Other visibleCharacterRanges)] + pub unsafe fn visibleCharacterRanges(&self) -> Id, Shared>; + + #[optional] + #[method(drawCharactersInRange:forContentView:)] + pub unsafe fn drawCharactersInRange_forContentView(&self, range: NSRange, view: &NSView); + } +); + +extern_protocol!( + pub struct NSTextFinderBarContainer; + + unsafe impl NSTextFinderBarContainer { + #[method_id(@__retain_semantics Other findBarView)] + pub unsafe fn findBarView(&self) -> Option>; + + #[method(setFindBarView:)] + pub unsafe fn setFindBarView(&self, findBarView: Option<&NSView>); + + #[method(isFindBarVisible)] + pub unsafe fn isFindBarVisible(&self) -> bool; + + #[method(setFindBarVisible:)] + pub unsafe fn setFindBarVisible(&self, findBarVisible: bool); + + #[method(findBarViewDidChangeHeight)] + pub unsafe fn findBarViewDidChangeHeight(&self); + + #[optional] + #[method_id(@__retain_semantics Other contentView)] + pub unsafe fn contentView(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs index e12675e10..491bf31a8 100644 --- a/crates/icrate/src/generated/AppKit/NSTextInputClient.rs +++ b/crates/icrate/src/generated/AppKit/NSTextInputClient.rs @@ -5,4 +5,80 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextInputClient = NSObject; +extern_protocol!( + pub struct NSTextInputClient; + + unsafe impl NSTextInputClient { + #[method(insertText:replacementRange:)] + pub unsafe fn insertText_replacementRange( + &self, + string: &Object, + replacementRange: NSRange, + ); + + #[method(doCommandBySelector:)] + pub unsafe fn doCommandBySelector(&self, selector: Sel); + + #[method(setMarkedText:selectedRange:replacementRange:)] + pub unsafe fn setMarkedText_selectedRange_replacementRange( + &self, + string: &Object, + selectedRange: NSRange, + replacementRange: NSRange, + ); + + #[method(unmarkText)] + pub unsafe fn unmarkText(&self); + + #[method(selectedRange)] + pub unsafe fn selectedRange(&self) -> NSRange; + + #[method(markedRange)] + pub unsafe fn markedRange(&self) -> NSRange; + + #[method(hasMarkedText)] + pub unsafe fn hasMarkedText(&self) -> bool; + + #[method_id(@__retain_semantics Other attributedSubstringForProposedRange:actualRange:)] + pub unsafe fn attributedSubstringForProposedRange_actualRange( + &self, + range: NSRange, + actualRange: NSRangePointer, + ) -> Option>; + + #[method_id(@__retain_semantics Other validAttributesForMarkedText)] + pub unsafe fn validAttributesForMarkedText( + &self, + ) -> Id, Shared>; + + #[method(firstRectForCharacterRange:actualRange:)] + pub unsafe fn firstRectForCharacterRange_actualRange( + &self, + range: NSRange, + actualRange: NSRangePointer, + ) -> NSRect; + + #[method(characterIndexForPoint:)] + pub unsafe fn characterIndexForPoint(&self, point: NSPoint) -> NSUInteger; + + #[optional] + #[method_id(@__retain_semantics Other attributedString)] + pub unsafe fn attributedString(&self) -> Id; + + #[optional] + #[method(fractionOfDistanceThroughGlyphForPoint:)] + pub unsafe fn fractionOfDistanceThroughGlyphForPoint(&self, point: NSPoint) -> CGFloat; + + #[optional] + #[method(baselineDeltaForCharacterAtIndex:)] + pub unsafe fn baselineDeltaForCharacterAtIndex(&self, anIndex: NSUInteger) -> CGFloat; + + #[optional] + #[method(windowLevel)] + pub unsafe fn windowLevel(&self) -> NSInteger; + + #[optional] + #[method(drawsVerticallyForCharacterAtIndex:)] + pub unsafe fn drawsVerticallyForCharacterAtIndex(&self, charIndex: NSUInteger) -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs index 9cbbadc06..e950f50a2 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutManager.rs @@ -232,4 +232,36 @@ extern_methods!( } ); -pub type NSTextLayoutManagerDelegate = NSObject; +extern_protocol!( + pub struct NSTextLayoutManagerDelegate; + + unsafe impl NSTextLayoutManagerDelegate { + #[optional] + #[method_id(@__retain_semantics Other textLayoutManager:textLayoutFragmentForLocation:inTextElement:)] + pub unsafe fn textLayoutManager_textLayoutFragmentForLocation_inTextElement( + &self, + textLayoutManager: &NSTextLayoutManager, + location: &NSTextLocation, + textElement: &NSTextElement, + ) -> Id; + + #[optional] + #[method(textLayoutManager:shouldBreakLineBeforeLocation:hyphenating:)] + pub unsafe fn textLayoutManager_shouldBreakLineBeforeLocation_hyphenating( + &self, + textLayoutManager: &NSTextLayoutManager, + location: &NSTextLocation, + hyphenating: bool, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other textLayoutManager:renderingAttributesForLink:atLocation:defaultAttributes:)] + pub unsafe fn textLayoutManager_renderingAttributesForLink_atLocation_defaultAttributes( + &self, + textLayoutManager: &NSTextLayoutManager, + link: &Object, + location: &NSTextLocation, + renderingAttributes: &NSDictionary, + ) -> Option, Shared>>; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextRange.rs b/crates/icrate/src/generated/AppKit/NSTextRange.rs index f19d6638f..f01615ef7 100644 --- a/crates/icrate/src/generated/AppKit/NSTextRange.rs +++ b/crates/icrate/src/generated/AppKit/NSTextRange.rs @@ -5,7 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextLocation = NSObject; +extern_protocol!( + pub struct NSTextLocation; + + unsafe impl NSTextLocation { + #[method(compare:)] + pub unsafe fn compare(&self, location: &NSTextLocation) -> NSComparisonResult; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs index 23bb72150..aa0934004 100644 --- a/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs +++ b/crates/icrate/src/generated/AppKit/NSTextSelectionNavigation.rs @@ -155,4 +155,84 @@ extern_methods!( } ); -pub type NSTextSelectionDataSource = NSObject; +extern_protocol!( + pub struct NSTextSelectionDataSource; + + unsafe impl NSTextSelectionDataSource { + #[method_id(@__retain_semantics Other documentRange)] + pub unsafe fn documentRange(&self) -> Id; + + #[method(enumerateSubstringsFromLocation:options:usingBlock:)] + pub unsafe fn enumerateSubstringsFromLocation_options_usingBlock( + &self, + location: &NSTextLocation, + options: NSStringEnumerationOptions, + block: &Block< + ( + *mut NSString, + NonNull, + *mut NSTextRange, + NonNull, + ), + (), + >, + ); + + #[method_id(@__retain_semantics Other textRangeForSelectionGranularity:enclosingLocation:)] + pub unsafe fn textRangeForSelectionGranularity_enclosingLocation( + &self, + selectionGranularity: NSTextSelectionGranularity, + location: &NSTextLocation, + ) -> Option>; + + #[method_id(@__retain_semantics Other locationFromLocation:withOffset:)] + pub unsafe fn locationFromLocation_withOffset( + &self, + location: &NSTextLocation, + offset: NSInteger, + ) -> Option>; + + #[method(offsetFromLocation:toLocation:)] + pub unsafe fn offsetFromLocation_toLocation( + &self, + from: &NSTextLocation, + to: &NSTextLocation, + ) -> NSInteger; + + #[method(baseWritingDirectionAtLocation:)] + pub unsafe fn baseWritingDirectionAtLocation( + &self, + location: &NSTextLocation, + ) -> NSTextSelectionNavigationWritingDirection; + + #[method(enumerateCaretOffsetsInLineFragmentAtLocation:usingBlock:)] + pub unsafe fn enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock( + &self, + location: &NSTextLocation, + block: &Block<(CGFloat, NonNull, Bool, NonNull), ()>, + ); + + #[method_id(@__retain_semantics Other lineFragmentRangeForPoint:inContainerAtLocation:)] + pub unsafe fn lineFragmentRangeForPoint_inContainerAtLocation( + &self, + point: CGPoint, + location: &NSTextLocation, + ) -> Option>; + + #[optional] + #[method(enumerateContainerBoundariesFromLocation:reverse:usingBlock:)] + pub unsafe fn enumerateContainerBoundariesFromLocation_reverse_usingBlock( + &self, + location: &NSTextLocation, + reverse: bool, + block: &Block<(NonNull, NonNull), ()>, + ); + + #[optional] + #[method(textLayoutOrientationAtLocation:)] + pub unsafe fn textLayoutOrientationAtLocation( + &self, + location: &NSTextLocation, + ) -> NSTextSelectionNavigationLayoutOrientation; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSTextStorage.rs b/crates/icrate/src/generated/AppKit/NSTextStorage.rs index ceb67db1f..b7f65ebee 100644 --- a/crates/icrate/src/generated/AppKit/NSTextStorage.rs +++ b/crates/icrate/src/generated/AppKit/NSTextStorage.rs @@ -79,13 +79,64 @@ extern_methods!( } ); -pub type NSTextStorageDelegate = NSObject; +extern_protocol!( + pub struct NSTextStorageDelegate; + + unsafe impl NSTextStorageDelegate { + #[optional] + #[method(textStorage:willProcessEditing:range:changeInLength:)] + pub unsafe fn textStorage_willProcessEditing_range_changeInLength( + &self, + textStorage: &NSTextStorage, + editedMask: NSTextStorageEditActions, + editedRange: NSRange, + delta: NSInteger, + ); + + #[optional] + #[method(textStorage:didProcessEditing:range:changeInLength:)] + pub unsafe fn textStorage_didProcessEditing_range_changeInLength( + &self, + textStorage: &NSTextStorage, + editedMask: NSTextStorageEditActions, + editedRange: NSRange, + delta: NSInteger, + ); + } +); extern_static!(NSTextStorageWillProcessEditingNotification: &'static NSNotificationName); extern_static!(NSTextStorageDidProcessEditingNotification: &'static NSNotificationName); -pub type NSTextStorageObserving = NSObject; +extern_protocol!( + pub struct NSTextStorageObserving; + + unsafe impl NSTextStorageObserving { + #[method_id(@__retain_semantics Other textStorage)] + pub unsafe fn textStorage(&self) -> Option>; + + #[method(setTextStorage:)] + pub unsafe fn setTextStorage(&self, textStorage: Option<&NSTextStorage>); + + #[method(processEditingForTextStorage:edited:range:changeInLength:invalidatedRange:)] + pub unsafe fn processEditingForTextStorage_edited_range_changeInLength_invalidatedRange( + &self, + textStorage: &NSTextStorage, + editMask: NSTextStorageEditActions, + newCharRange: NSRange, + delta: NSInteger, + invalidatedCharRange: NSRange, + ); + + #[method(performEditingTransactionForTextStorage:usingBlock:)] + pub unsafe fn performEditingTransactionForTextStorage_usingBlock( + &self, + textStorage: &NSTextStorage, + transaction: &Block<(), ()>, + ); + } +); pub type NSTextStorageEditedOptions = NSUInteger; diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index 6bd48ba11..52647d064 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -955,7 +955,287 @@ extern_methods!( } ); -pub type NSTextViewDelegate = NSObject; +extern_protocol!( + pub struct NSTextViewDelegate; + + unsafe impl NSTextViewDelegate { + #[optional] + #[method(textView:clickedOnLink:atIndex:)] + pub unsafe fn textView_clickedOnLink_atIndex( + &self, + textView: &NSTextView, + link: &Object, + charIndex: NSUInteger, + ) -> bool; + + #[optional] + #[method(textView:clickedOnCell:inRect:atIndex:)] + pub unsafe fn textView_clickedOnCell_inRect_atIndex( + &self, + textView: &NSTextView, + cell: &NSTextAttachmentCell, + cellFrame: NSRect, + charIndex: NSUInteger, + ); + + #[optional] + #[method(textView:doubleClickedOnCell:inRect:atIndex:)] + pub unsafe fn textView_doubleClickedOnCell_inRect_atIndex( + &self, + textView: &NSTextView, + cell: &NSTextAttachmentCell, + cellFrame: NSRect, + charIndex: NSUInteger, + ); + + #[optional] + #[method(textView:draggedCell:inRect:event:atIndex:)] + pub unsafe fn textView_draggedCell_inRect_event_atIndex( + &self, + view: &NSTextView, + cell: &NSTextAttachmentCell, + rect: NSRect, + event: &NSEvent, + charIndex: NSUInteger, + ); + + #[optional] + #[method_id(@__retain_semantics Other textView:writablePasteboardTypesForCell:atIndex:)] + pub unsafe fn textView_writablePasteboardTypesForCell_atIndex( + &self, + view: &NSTextView, + cell: &NSTextAttachmentCell, + charIndex: NSUInteger, + ) -> Id, Shared>; + + #[optional] + #[method(textView:writeCell:atIndex:toPasteboard:type:)] + pub unsafe fn textView_writeCell_atIndex_toPasteboard_type( + &self, + view: &NSTextView, + cell: &NSTextAttachmentCell, + charIndex: NSUInteger, + pboard: &NSPasteboard, + type_: &NSPasteboardType, + ) -> bool; + + #[optional] + #[method(textView:willChangeSelectionFromCharacterRange:toCharacterRange:)] + pub unsafe fn textView_willChangeSelectionFromCharacterRange_toCharacterRange( + &self, + textView: &NSTextView, + oldSelectedCharRange: NSRange, + newSelectedCharRange: NSRange, + ) -> NSRange; + + #[optional] + #[method_id(@__retain_semantics Other textView:willChangeSelectionFromCharacterRanges:toCharacterRanges:)] + pub unsafe fn textView_willChangeSelectionFromCharacterRanges_toCharacterRanges( + &self, + textView: &NSTextView, + oldSelectedCharRanges: &NSArray, + newSelectedCharRanges: &NSArray, + ) -> Id, Shared>; + + #[optional] + #[method(textView:shouldChangeTextInRanges:replacementStrings:)] + pub unsafe fn textView_shouldChangeTextInRanges_replacementStrings( + &self, + textView: &NSTextView, + affectedRanges: &NSArray, + replacementStrings: Option<&NSArray>, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other textView:shouldChangeTypingAttributes:toAttributes:)] + pub unsafe fn textView_shouldChangeTypingAttributes_toAttributes( + &self, + textView: &NSTextView, + oldTypingAttributes: &NSDictionary, + newTypingAttributes: &NSDictionary, + ) -> Id, Shared>; + + #[optional] + #[method(textViewDidChangeSelection:)] + pub unsafe fn textViewDidChangeSelection(&self, notification: &NSNotification); + + #[optional] + #[method(textViewDidChangeTypingAttributes:)] + pub unsafe fn textViewDidChangeTypingAttributes(&self, notification: &NSNotification); + + #[optional] + #[method_id(@__retain_semantics Other textView:willDisplayToolTip:forCharacterAtIndex:)] + pub unsafe fn textView_willDisplayToolTip_forCharacterAtIndex( + &self, + textView: &NSTextView, + tooltip: &NSString, + characterIndex: NSUInteger, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other textView:completions:forPartialWordRange:indexOfSelectedItem:)] + pub unsafe fn textView_completions_forPartialWordRange_indexOfSelectedItem( + &self, + textView: &NSTextView, + words: &NSArray, + charRange: NSRange, + index: *mut NSInteger, + ) -> Id, Shared>; + + #[optional] + #[method(textView:shouldChangeTextInRange:replacementString:)] + pub unsafe fn textView_shouldChangeTextInRange_replacementString( + &self, + textView: &NSTextView, + affectedCharRange: NSRange, + replacementString: Option<&NSString>, + ) -> bool; + + #[optional] + #[method(textView:doCommandBySelector:)] + pub unsafe fn textView_doCommandBySelector( + &self, + textView: &NSTextView, + commandSelector: Sel, + ) -> bool; + + #[optional] + #[method(textView:shouldSetSpellingState:range:)] + pub unsafe fn textView_shouldSetSpellingState_range( + &self, + textView: &NSTextView, + value: NSInteger, + affectedCharRange: NSRange, + ) -> NSInteger; + + #[optional] + #[method_id(@__retain_semantics Other textView:menu:forEvent:atIndex:)] + pub unsafe fn textView_menu_forEvent_atIndex( + &self, + view: &NSTextView, + menu: &NSMenu, + event: &NSEvent, + charIndex: NSUInteger, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other textView:willCheckTextInRange:options:types:)] + pub unsafe fn textView_willCheckTextInRange_options_types( + &self, + view: &NSTextView, + range: NSRange, + options: &NSDictionary, + checkingTypes: NonNull, + ) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other textView:didCheckTextInRange:types:options:results:orthography:wordCount:)] + pub unsafe fn textView_didCheckTextInRange_types_options_results_orthography_wordCount( + &self, + view: &NSTextView, + range: NSRange, + checkingTypes: NSTextCheckingTypes, + options: &NSDictionary, + results: &NSArray, + orthography: &NSOrthography, + wordCount: NSInteger, + ) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other textView:URLForContentsOfTextAttachment:atIndex:)] + pub unsafe fn textView_URLForContentsOfTextAttachment_atIndex( + &self, + textView: &NSTextView, + textAttachment: &NSTextAttachment, + charIndex: NSUInteger, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other textView:willShowSharingServicePicker:forItems:)] + pub unsafe fn textView_willShowSharingServicePicker_forItems( + &self, + textView: &NSTextView, + servicePicker: &NSSharingServicePicker, + items: &NSArray, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other undoManagerForTextView:)] + pub unsafe fn undoManagerForTextView( + &self, + view: &NSTextView, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other textView:shouldUpdateTouchBarItemIdentifiers:)] + pub unsafe fn textView_shouldUpdateTouchBarItemIdentifiers( + &self, + textView: &NSTextView, + identifiers: &NSArray, + ) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other textView:candidatesForSelectedRange:)] + pub unsafe fn textView_candidatesForSelectedRange( + &self, + textView: &NSTextView, + selectedRange: NSRange, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other textView:candidates:forSelectedRange:)] + pub unsafe fn textView_candidates_forSelectedRange( + &self, + textView: &NSTextView, + candidates: &NSArray, + selectedRange: NSRange, + ) -> Id, Shared>; + + #[optional] + #[method(textView:shouldSelectCandidateAtIndex:)] + pub unsafe fn textView_shouldSelectCandidateAtIndex( + &self, + textView: &NSTextView, + index: NSUInteger, + ) -> bool; + + #[optional] + #[method(textView:clickedOnLink:)] + pub unsafe fn textView_clickedOnLink( + &self, + textView: &NSTextView, + link: Option<&Object>, + ) -> bool; + + #[optional] + #[method(textView:clickedOnCell:inRect:)] + pub unsafe fn textView_clickedOnCell_inRect( + &self, + textView: &NSTextView, + cell: Option<&NSTextAttachmentCell>, + cellFrame: NSRect, + ); + + #[optional] + #[method(textView:doubleClickedOnCell:inRect:)] + pub unsafe fn textView_doubleClickedOnCell_inRect( + &self, + textView: &NSTextView, + cell: Option<&NSTextAttachmentCell>, + cellFrame: NSRect, + ); + + #[optional] + #[method(textView:draggedCell:inRect:event:)] + pub unsafe fn textView_draggedCell_inRect_event( + &self, + view: &NSTextView, + cell: Option<&NSTextAttachmentCell>, + rect: NSRect, + event: Option<&NSEvent>, + ); + } +); extern_static!(NSTouchBarItemIdentifierCharacterPicker: &'static NSTouchBarItemIdentifier); diff --git a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs index f07f57343..2b057889e 100644 --- a/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs +++ b/crates/icrate/src/generated/AppKit/NSTextViewportLayoutController.rs @@ -5,7 +5,38 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTextViewportLayoutControllerDelegate = NSObject; +extern_protocol!( + pub struct NSTextViewportLayoutControllerDelegate; + + unsafe impl NSTextViewportLayoutControllerDelegate { + #[method(viewportBoundsForTextViewportLayoutController:)] + pub unsafe fn viewportBoundsForTextViewportLayoutController( + &self, + textViewportLayoutController: &NSTextViewportLayoutController, + ) -> CGRect; + + #[method(textViewportLayoutController:configureRenderingSurfaceForTextLayoutFragment:)] + pub unsafe fn textViewportLayoutController_configureRenderingSurfaceForTextLayoutFragment( + &self, + textViewportLayoutController: &NSTextViewportLayoutController, + textLayoutFragment: &NSTextLayoutFragment, + ); + + #[optional] + #[method(textViewportLayoutControllerWillLayout:)] + pub unsafe fn textViewportLayoutControllerWillLayout( + &self, + textViewportLayoutController: &NSTextViewportLayoutController, + ); + + #[optional] + #[method(textViewportLayoutControllerDidLayout:)] + pub unsafe fn textViewportLayoutControllerDidLayout( + &self, + textViewportLayoutController: &NSTextViewportLayoutController, + ); + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTokenField.rs b/crates/icrate/src/generated/AppKit/NSTokenField.rs index 544f23a64..b28ffd71e 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenField.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenField.rs @@ -5,7 +5,95 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSTokenFieldDelegate = NSObject; +extern_protocol!( + pub struct NSTokenFieldDelegate; + + unsafe impl NSTokenFieldDelegate { + #[optional] + #[method_id(@__retain_semantics Other tokenField:completionsForSubstring:indexOfToken:indexOfSelectedItem:)] + pub unsafe fn tokenField_completionsForSubstring_indexOfToken_indexOfSelectedItem( + &self, + tokenField: &NSTokenField, + substring: &NSString, + tokenIndex: NSInteger, + selectedIndex: *mut NSInteger, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tokenField:shouldAddObjects:atIndex:)] + pub unsafe fn tokenField_shouldAddObjects_atIndex( + &self, + tokenField: &NSTokenField, + tokens: &NSArray, + index: NSUInteger, + ) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other tokenField:displayStringForRepresentedObject:)] + pub unsafe fn tokenField_displayStringForRepresentedObject( + &self, + tokenField: &NSTokenField, + representedObject: &Object, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tokenField:editingStringForRepresentedObject:)] + pub unsafe fn tokenField_editingStringForRepresentedObject( + &self, + tokenField: &NSTokenField, + representedObject: &Object, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tokenField:representedObjectForEditingString:)] + pub unsafe fn tokenField_representedObjectForEditingString( + &self, + tokenField: &NSTokenField, + editingString: &NSString, + ) -> Option>; + + #[optional] + #[method(tokenField:writeRepresentedObjects:toPasteboard:)] + pub unsafe fn tokenField_writeRepresentedObjects_toPasteboard( + &self, + tokenField: &NSTokenField, + objects: &NSArray, + pboard: &NSPasteboard, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other tokenField:readFromPasteboard:)] + pub unsafe fn tokenField_readFromPasteboard( + &self, + tokenField: &NSTokenField, + pboard: &NSPasteboard, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tokenField:menuForRepresentedObject:)] + pub unsafe fn tokenField_menuForRepresentedObject( + &self, + tokenField: &NSTokenField, + representedObject: &Object, + ) -> Option>; + + #[optional] + #[method(tokenField:hasMenuForRepresentedObject:)] + pub unsafe fn tokenField_hasMenuForRepresentedObject( + &self, + tokenField: &NSTokenField, + representedObject: &Object, + ) -> bool; + + #[optional] + #[method(tokenField:styleForRepresentedObject:)] + pub unsafe fn tokenField_styleForRepresentedObject( + &self, + tokenField: &NSTokenField, + representedObject: &Object, + ) -> NSTokenStyle; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs index 5f119d72b..e8735e916 100644 --- a/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs +++ b/crates/icrate/src/generated/AppKit/NSTokenFieldCell.rs @@ -62,7 +62,95 @@ extern_methods!( } ); -pub type NSTokenFieldCellDelegate = NSObject; +extern_protocol!( + pub struct NSTokenFieldCellDelegate; + + unsafe impl NSTokenFieldCellDelegate { + #[optional] + #[method_id(@__retain_semantics Other tokenFieldCell:completionsForSubstring:indexOfToken:indexOfSelectedItem:)] + pub unsafe fn tokenFieldCell_completionsForSubstring_indexOfToken_indexOfSelectedItem( + &self, + tokenFieldCell: &NSTokenFieldCell, + substring: &NSString, + tokenIndex: NSInteger, + selectedIndex: NonNull, + ) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other tokenFieldCell:shouldAddObjects:atIndex:)] + pub unsafe fn tokenFieldCell_shouldAddObjects_atIndex( + &self, + tokenFieldCell: &NSTokenFieldCell, + tokens: &NSArray, + index: NSUInteger, + ) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other tokenFieldCell:displayStringForRepresentedObject:)] + pub unsafe fn tokenFieldCell_displayStringForRepresentedObject( + &self, + tokenFieldCell: &NSTokenFieldCell, + representedObject: &Object, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tokenFieldCell:editingStringForRepresentedObject:)] + pub unsafe fn tokenFieldCell_editingStringForRepresentedObject( + &self, + tokenFieldCell: &NSTokenFieldCell, + representedObject: &Object, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tokenFieldCell:representedObjectForEditingString:)] + pub unsafe fn tokenFieldCell_representedObjectForEditingString( + &self, + tokenFieldCell: &NSTokenFieldCell, + editingString: &NSString, + ) -> Option>; + + #[optional] + #[method(tokenFieldCell:writeRepresentedObjects:toPasteboard:)] + pub unsafe fn tokenFieldCell_writeRepresentedObjects_toPasteboard( + &self, + tokenFieldCell: &NSTokenFieldCell, + objects: &NSArray, + pboard: &NSPasteboard, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other tokenFieldCell:readFromPasteboard:)] + pub unsafe fn tokenFieldCell_readFromPasteboard( + &self, + tokenFieldCell: &NSTokenFieldCell, + pboard: &NSPasteboard, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other tokenFieldCell:menuForRepresentedObject:)] + pub unsafe fn tokenFieldCell_menuForRepresentedObject( + &self, + tokenFieldCell: &NSTokenFieldCell, + representedObject: &Object, + ) -> Option>; + + #[optional] + #[method(tokenFieldCell:hasMenuForRepresentedObject:)] + pub unsafe fn tokenFieldCell_hasMenuForRepresentedObject( + &self, + tokenFieldCell: &NSTokenFieldCell, + representedObject: &Object, + ) -> bool; + + #[optional] + #[method(tokenFieldCell:styleForRepresentedObject:)] + pub unsafe fn tokenFieldCell_styleForRepresentedObject( + &self, + tokenFieldCell: &NSTokenFieldCell, + representedObject: &Object, + ) -> NSTokenStyle; + } +); extern_static!(NSDefaultTokenStyle: NSTokenStyle = NSTokenStyleDefault); diff --git a/crates/icrate/src/generated/AppKit/NSToolbar.rs b/crates/icrate/src/generated/AppKit/NSToolbar.rs index d43b5fd87..85d60d04e 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbar.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbar.rs @@ -153,7 +153,49 @@ extern_methods!( } ); -pub type NSToolbarDelegate = NSObject; +extern_protocol!( + pub struct NSToolbarDelegate; + + unsafe impl NSToolbarDelegate { + #[optional] + #[method_id(@__retain_semantics Other toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:)] + pub unsafe fn toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar( + &self, + toolbar: &NSToolbar, + itemIdentifier: &NSToolbarItemIdentifier, + flag: bool, + ) -> Option>; + + #[optional] + #[method_id(@__retain_semantics Other toolbarDefaultItemIdentifiers:)] + pub unsafe fn toolbarDefaultItemIdentifiers( + &self, + toolbar: &NSToolbar, + ) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other toolbarAllowedItemIdentifiers:)] + pub unsafe fn toolbarAllowedItemIdentifiers( + &self, + toolbar: &NSToolbar, + ) -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other toolbarSelectableItemIdentifiers:)] + pub unsafe fn toolbarSelectableItemIdentifiers( + &self, + toolbar: &NSToolbar, + ) -> Id, Shared>; + + #[optional] + #[method(toolbarWillAddItem:)] + pub unsafe fn toolbarWillAddItem(&self, notification: &NSNotification); + + #[optional] + #[method(toolbarDidRemoveItem:)] + pub unsafe fn toolbarDidRemoveItem(&self, notification: &NSNotification); + } +); extern_static!(NSToolbarWillAddItemNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs index 6ad63caf0..bc67d0287 100644 --- a/crates/icrate/src/generated/AppKit/NSToolbarItem.rs +++ b/crates/icrate/src/generated/AppKit/NSToolbarItem.rs @@ -155,7 +155,14 @@ extern_methods!( unsafe impl NSToolbarItem {} ); -pub type NSToolbarItemValidation = NSObject; +extern_protocol!( + pub struct NSToolbarItemValidation; + + unsafe impl NSToolbarItemValidation { + #[method(validateToolbarItem:)] + pub unsafe fn validateToolbarItem(&self, item: &NSToolbarItem) -> bool; + } +); extern_methods!( /// NSToolbarItemValidation @@ -165,7 +172,17 @@ extern_methods!( } ); -pub type NSCloudSharingValidation = NSObject; +extern_protocol!( + pub struct NSCloudSharingValidation; + + unsafe impl NSCloudSharingValidation { + #[method_id(@__retain_semantics Other cloudShareForUserInterfaceItem:)] + pub unsafe fn cloudShareForUserInterfaceItem( + &self, + item: &NSValidatedUserInterfaceItem, + ) -> Option>; + } +); extern_static!(NSToolbarSeparatorItemIdentifier: &'static NSToolbarItemIdentifier); diff --git a/crates/icrate/src/generated/AppKit/NSTouchBar.rs b/crates/icrate/src/generated/AppKit/NSTouchBar.rs index d383d4382..231a523c4 100644 --- a/crates/icrate/src/generated/AppKit/NSTouchBar.rs +++ b/crates/icrate/src/generated/AppKit/NSTouchBar.rs @@ -127,9 +127,28 @@ extern_methods!( } ); -pub type NSTouchBarDelegate = NSObject; +extern_protocol!( + pub struct NSTouchBarDelegate; -pub type NSTouchBarProvider = NSObject; + unsafe impl NSTouchBarDelegate { + #[optional] + #[method_id(@__retain_semantics Other touchBar:makeItemForIdentifier:)] + pub unsafe fn touchBar_makeItemForIdentifier( + &self, + touchBar: &NSTouchBar, + identifier: &NSTouchBarItemIdentifier, + ) -> Option>; + } +); + +extern_protocol!( + pub struct NSTouchBarProvider; + + unsafe impl NSTouchBarProvider { + #[method_id(@__retain_semantics Other touchBar)] + pub unsafe fn touchBar(&self) -> Option>; + } +); extern_methods!( /// NSTouchBarProvider diff --git a/crates/icrate/src/generated/AppKit/NSUserActivity.rs b/crates/icrate/src/generated/AppKit/NSUserActivity.rs index 673e96f38..4279b3475 100644 --- a/crates/icrate/src/generated/AppKit/NSUserActivity.rs +++ b/crates/icrate/src/generated/AppKit/NSUserActivity.rs @@ -5,7 +5,14 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSUserActivityRestoring = NSObject; +extern_protocol!( + pub struct NSUserActivityRestoring; + + unsafe impl NSUserActivityRestoring { + #[method(restoreUserActivityState:)] + pub unsafe fn restoreUserActivityState(&self, userActivity: &NSUserActivity); + } +); extern_methods!( /// NSUserActivity diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs index 7124c6a66..8c5a4511d 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceCompression.rs @@ -76,4 +76,25 @@ extern_methods!( } ); -pub type NSUserInterfaceCompression = NSObject; +extern_protocol!( + pub struct NSUserInterfaceCompression; + + unsafe impl NSUserInterfaceCompression { + #[method(compressWithPrioritizedCompressionOptions:)] + pub unsafe fn compressWithPrioritizedCompressionOptions( + &self, + prioritizedOptions: &NSArray, + ); + + #[method(minimumSizeWithPrioritizedCompressionOptions:)] + pub unsafe fn minimumSizeWithPrioritizedCompressionOptions( + &self, + prioritizedOptions: &NSArray, + ) -> NSSize; + + #[method_id(@__retain_semantics Other activeCompressionOptions)] + pub unsafe fn activeCompressionOptions( + &self, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs index eceba9f29..3be79bfbd 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemIdentification.rs @@ -7,4 +7,14 @@ use crate::Foundation::*; pub type NSUserInterfaceItemIdentifier = NSString; -pub type NSUserInterfaceItemIdentification = NSObject; +extern_protocol!( + pub struct NSUserInterfaceItemIdentification; + + unsafe impl NSUserInterfaceItemIdentification { + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self) -> Option>; + + #[method(setIdentifier:)] + pub unsafe fn setIdentifier(&self, identifier: Option<&NSUserInterfaceItemIdentifier>); + } +); diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs index 7ac714381..667712a37 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceItemSearching.rs @@ -5,7 +5,31 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSUserInterfaceItemSearching = NSObject; +extern_protocol!( + pub struct NSUserInterfaceItemSearching; + + unsafe impl NSUserInterfaceItemSearching { + #[method(searchForItemsWithSearchString:resultLimit:matchedItemHandler:)] + pub unsafe fn searchForItemsWithSearchString_resultLimit_matchedItemHandler( + &self, + searchString: &NSString, + resultLimit: NSInteger, + handleMatchedItems: &Block<(NonNull,), ()>, + ); + + #[method_id(@__retain_semantics Other localizedTitlesForItem:)] + pub unsafe fn localizedTitlesForItem(&self, item: &Object) + -> Id, Shared>; + + #[optional] + #[method(performActionForItem:)] + pub unsafe fn performActionForItem(&self, item: &Object); + + #[optional] + #[method(showAllHelpTopicsForSearchString:)] + pub unsafe fn showAllHelpTopicsForSearchString(&self, searchString: &NSString); + } +); extern_methods!( /// NSUserInterfaceItemSearching diff --git a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs index b8e983ea8..6fb05997b 100644 --- a/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs +++ b/crates/icrate/src/generated/AppKit/NSUserInterfaceValidation.rs @@ -5,6 +5,24 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSValidatedUserInterfaceItem = NSObject; +extern_protocol!( + pub struct NSValidatedUserInterfaceItem; -pub type NSUserInterfaceValidations = NSObject; + unsafe impl NSValidatedUserInterfaceItem { + #[method(action)] + pub unsafe fn action(&self) -> OptionSel; + + #[method(tag)] + pub unsafe fn tag(&self) -> NSInteger; + } +); + +extern_protocol!( + pub struct NSUserInterfaceValidations; + + unsafe impl NSUserInterfaceValidations { + #[method(validateUserInterfaceItem:)] + pub unsafe fn validateUserInterfaceItem(&self, item: &NSValidatedUserInterfaceItem) + -> bool; + } +); diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index ebb9a6980..7e4ab7338 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -720,7 +720,20 @@ extern_methods!( } ); -pub type NSViewLayerContentScaleDelegate = NSObject; +extern_protocol!( + pub struct NSViewLayerContentScaleDelegate; + + unsafe impl NSViewLayerContentScaleDelegate { + #[optional] + #[method(layer:shouldInheritContentsScale:fromWindow:)] + pub unsafe fn layer_shouldInheritContentsScale_fromWindow( + &self, + layer: &CALayer, + newScale: CGFloat, + window: &NSWindow, + ) -> bool; + } +); extern_methods!( /// NSLayerDelegateContentsScaleUpdating @@ -735,7 +748,20 @@ extern_methods!( } ); -pub type NSViewToolTipOwner = NSObject; +extern_protocol!( + pub struct NSViewToolTipOwner; + + unsafe impl NSViewToolTipOwner { + #[method_id(@__retain_semantics Other view:stringForToolTip:point:userData:)] + pub unsafe fn view_stringForToolTip_point_userData( + &self, + view: &NSView, + tag: NSToolTipTag, + point: NSPoint, + data: *mut c_void, + ) -> Id; + } +); extern_methods!( /// NSToolTipOwner diff --git a/crates/icrate/src/generated/AppKit/NSViewController.rs b/crates/icrate/src/generated/AppKit/NSViewController.rs index aac84fbfe..9b17bd169 100644 --- a/crates/icrate/src/generated/AppKit/NSViewController.rs +++ b/crates/icrate/src/generated/AppKit/NSViewController.rs @@ -218,7 +218,25 @@ extern_methods!( } ); -pub type NSViewControllerPresentationAnimator = NSObject; +extern_protocol!( + pub struct NSViewControllerPresentationAnimator; + + unsafe impl NSViewControllerPresentationAnimator { + #[method(animatePresentationOfViewController:fromViewController:)] + pub unsafe fn animatePresentationOfViewController_fromViewController( + &self, + viewController: &NSViewController, + fromViewController: &NSViewController, + ); + + #[method(animateDismissalOfViewController:fromViewController:)] + pub unsafe fn animateDismissalOfViewController_fromViewController( + &self, + viewController: &NSViewController, + fromViewController: &NSViewController, + ); + } +); extern_methods!( /// NSViewControllerStoryboardingMethods diff --git a/crates/icrate/src/generated/AppKit/NSWindow.rs b/crates/icrate/src/generated/AppKit/NSWindow.rs index 636a8d3eb..1abe9bdaa 100644 --- a/crates/icrate/src/generated/AppKit/NSWindow.rs +++ b/crates/icrate/src/generated/AppKit/NSWindow.rs @@ -1220,7 +1220,281 @@ extern_methods!( } ); -pub type NSWindowDelegate = NSObject; +extern_protocol!( + pub struct NSWindowDelegate; + + unsafe impl NSWindowDelegate { + #[optional] + #[method(windowShouldClose:)] + pub unsafe fn windowShouldClose(&self, sender: &NSWindow) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other windowWillReturnFieldEditor:toObject:)] + pub unsafe fn windowWillReturnFieldEditor_toObject( + &self, + sender: &NSWindow, + client: Option<&Object>, + ) -> Option>; + + #[optional] + #[method(windowWillResize:toSize:)] + pub unsafe fn windowWillResize_toSize( + &self, + sender: &NSWindow, + frameSize: NSSize, + ) -> NSSize; + + #[optional] + #[method(windowWillUseStandardFrame:defaultFrame:)] + pub unsafe fn windowWillUseStandardFrame_defaultFrame( + &self, + window: &NSWindow, + newFrame: NSRect, + ) -> NSRect; + + #[optional] + #[method(windowShouldZoom:toFrame:)] + pub unsafe fn windowShouldZoom_toFrame(&self, window: &NSWindow, newFrame: NSRect) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other windowWillReturnUndoManager:)] + pub unsafe fn windowWillReturnUndoManager( + &self, + window: &NSWindow, + ) -> Option>; + + #[optional] + #[method(window:willPositionSheet:usingRect:)] + pub unsafe fn window_willPositionSheet_usingRect( + &self, + window: &NSWindow, + sheet: &NSWindow, + rect: NSRect, + ) -> NSRect; + + #[optional] + #[method(window:shouldPopUpDocumentPathMenu:)] + pub unsafe fn window_shouldPopUpDocumentPathMenu( + &self, + window: &NSWindow, + menu: &NSMenu, + ) -> bool; + + #[optional] + #[method(window:shouldDragDocumentWithEvent:from:withPasteboard:)] + pub unsafe fn window_shouldDragDocumentWithEvent_from_withPasteboard( + &self, + window: &NSWindow, + event: &NSEvent, + dragImageLocation: NSPoint, + pasteboard: &NSPasteboard, + ) -> bool; + + #[optional] + #[method(window:willUseFullScreenContentSize:)] + pub unsafe fn window_willUseFullScreenContentSize( + &self, + window: &NSWindow, + proposedSize: NSSize, + ) -> NSSize; + + #[optional] + #[method(window:willUseFullScreenPresentationOptions:)] + pub unsafe fn window_willUseFullScreenPresentationOptions( + &self, + window: &NSWindow, + proposedOptions: NSApplicationPresentationOptions, + ) -> NSApplicationPresentationOptions; + + #[optional] + #[method_id(@__retain_semantics Other customWindowsToEnterFullScreenForWindow:)] + pub unsafe fn customWindowsToEnterFullScreenForWindow( + &self, + window: &NSWindow, + ) -> Option, Shared>>; + + #[optional] + #[method(window:startCustomAnimationToEnterFullScreenWithDuration:)] + pub unsafe fn window_startCustomAnimationToEnterFullScreenWithDuration( + &self, + window: &NSWindow, + duration: NSTimeInterval, + ); + + #[optional] + #[method(windowDidFailToEnterFullScreen:)] + pub unsafe fn windowDidFailToEnterFullScreen(&self, window: &NSWindow); + + #[optional] + #[method_id(@__retain_semantics Other customWindowsToExitFullScreenForWindow:)] + pub unsafe fn customWindowsToExitFullScreenForWindow( + &self, + window: &NSWindow, + ) -> Option, Shared>>; + + #[optional] + #[method(window:startCustomAnimationToExitFullScreenWithDuration:)] + pub unsafe fn window_startCustomAnimationToExitFullScreenWithDuration( + &self, + window: &NSWindow, + duration: NSTimeInterval, + ); + + #[optional] + #[method_id(@__retain_semantics Other customWindowsToEnterFullScreenForWindow:onScreen:)] + pub unsafe fn customWindowsToEnterFullScreenForWindow_onScreen( + &self, + window: &NSWindow, + screen: &NSScreen, + ) -> Option, Shared>>; + + #[optional] + #[method(window:startCustomAnimationToEnterFullScreenOnScreen:withDuration:)] + pub unsafe fn window_startCustomAnimationToEnterFullScreenOnScreen_withDuration( + &self, + window: &NSWindow, + screen: &NSScreen, + duration: NSTimeInterval, + ); + + #[optional] + #[method(windowDidFailToExitFullScreen:)] + pub unsafe fn windowDidFailToExitFullScreen(&self, window: &NSWindow); + + #[optional] + #[method(window:willResizeForVersionBrowserWithMaxPreferredSize:maxAllowedSize:)] + pub unsafe fn window_willResizeForVersionBrowserWithMaxPreferredSize_maxAllowedSize( + &self, + window: &NSWindow, + maxPreferredFrameSize: NSSize, + maxAllowedFrameSize: NSSize, + ) -> NSSize; + + #[optional] + #[method(window:willEncodeRestorableState:)] + pub unsafe fn window_willEncodeRestorableState(&self, window: &NSWindow, state: &NSCoder); + + #[optional] + #[method(window:didDecodeRestorableState:)] + pub unsafe fn window_didDecodeRestorableState(&self, window: &NSWindow, state: &NSCoder); + + #[optional] + #[method(windowDidResize:)] + pub unsafe fn windowDidResize(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidExpose:)] + pub unsafe fn windowDidExpose(&self, notification: &NSNotification); + + #[optional] + #[method(windowWillMove:)] + pub unsafe fn windowWillMove(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidMove:)] + pub unsafe fn windowDidMove(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidBecomeKey:)] + pub unsafe fn windowDidBecomeKey(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidResignKey:)] + pub unsafe fn windowDidResignKey(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidBecomeMain:)] + pub unsafe fn windowDidBecomeMain(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidResignMain:)] + pub unsafe fn windowDidResignMain(&self, notification: &NSNotification); + + #[optional] + #[method(windowWillClose:)] + pub unsafe fn windowWillClose(&self, notification: &NSNotification); + + #[optional] + #[method(windowWillMiniaturize:)] + pub unsafe fn windowWillMiniaturize(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidMiniaturize:)] + pub unsafe fn windowDidMiniaturize(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidDeminiaturize:)] + pub unsafe fn windowDidDeminiaturize(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidUpdate:)] + pub unsafe fn windowDidUpdate(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidChangeScreen:)] + pub unsafe fn windowDidChangeScreen(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidChangeScreenProfile:)] + pub unsafe fn windowDidChangeScreenProfile(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidChangeBackingProperties:)] + pub unsafe fn windowDidChangeBackingProperties(&self, notification: &NSNotification); + + #[optional] + #[method(windowWillBeginSheet:)] + pub unsafe fn windowWillBeginSheet(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidEndSheet:)] + pub unsafe fn windowDidEndSheet(&self, notification: &NSNotification); + + #[optional] + #[method(windowWillStartLiveResize:)] + pub unsafe fn windowWillStartLiveResize(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidEndLiveResize:)] + pub unsafe fn windowDidEndLiveResize(&self, notification: &NSNotification); + + #[optional] + #[method(windowWillEnterFullScreen:)] + pub unsafe fn windowWillEnterFullScreen(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidEnterFullScreen:)] + pub unsafe fn windowDidEnterFullScreen(&self, notification: &NSNotification); + + #[optional] + #[method(windowWillExitFullScreen:)] + pub unsafe fn windowWillExitFullScreen(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidExitFullScreen:)] + pub unsafe fn windowDidExitFullScreen(&self, notification: &NSNotification); + + #[optional] + #[method(windowWillEnterVersionBrowser:)] + pub unsafe fn windowWillEnterVersionBrowser(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidEnterVersionBrowser:)] + pub unsafe fn windowDidEnterVersionBrowser(&self, notification: &NSNotification); + + #[optional] + #[method(windowWillExitVersionBrowser:)] + pub unsafe fn windowWillExitVersionBrowser(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidExitVersionBrowser:)] + pub unsafe fn windowDidExitVersionBrowser(&self, notification: &NSNotification); + + #[optional] + #[method(windowDidChangeOcclusionState:)] + pub unsafe fn windowDidChangeOcclusionState(&self, notification: &NSNotification); + } +); extern_static!(NSWindowDidBecomeKeyNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs index 811693dc5..5e573e1e7 100644 --- a/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs +++ b/crates/icrate/src/generated/AppKit/NSWindowRestoration.rs @@ -5,7 +5,18 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -pub type NSWindowRestoration = NSObject; +extern_protocol!( + pub struct NSWindowRestoration; + + unsafe impl NSWindowRestoration { + #[method(restoreWindowWithIdentifier:state:completionHandler:)] + pub unsafe fn restoreWindowWithIdentifier_state_completionHandler( + identifier: &NSUserInterfaceItemIdentifier, + state: &NSCoder, + completionHandler: &Block<(*mut NSWindow, *mut NSError), ()>, + ); + } +); extern_methods!( /// NSWindowRestoration diff --git a/crates/icrate/src/generated/CoreData/NSFetchRequest.rs b/crates/icrate/src/generated/CoreData/NSFetchRequest.rs index 58c544da2..a1f072d78 100644 --- a/crates/icrate/src/generated/CoreData/NSFetchRequest.rs +++ b/crates/icrate/src/generated/CoreData/NSFetchRequest.rs @@ -14,7 +14,11 @@ ns_options!( } ); -pub type NSFetchRequestResult = NSObject; +extern_protocol!( + pub struct NSFetchRequestResult; + + unsafe impl NSFetchRequestResult {} +); extern_methods!( /// NSFetchedResultSupport diff --git a/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs b/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs index 855e67070..443f53abf 100644 --- a/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs +++ b/crates/icrate/src/generated/CoreData/NSFetchedResultsController.rs @@ -83,7 +83,23 @@ extern_methods!( } ); -pub type NSFetchedResultsSectionInfo = NSObject; +extern_protocol!( + pub struct NSFetchedResultsSectionInfo; + + unsafe impl NSFetchedResultsSectionInfo { + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method_id(@__retain_semantics Other indexTitle)] + pub unsafe fn indexTitle(&self) -> Option>; + + #[method(numberOfObjects)] + pub unsafe fn numberOfObjects(&self) -> NSUInteger; + + #[method_id(@__retain_semantics Other objects)] + pub unsafe fn objects(&self) -> Option>; + } +); ns_enum!( #[underlying(NSUInteger)] @@ -95,4 +111,61 @@ ns_enum!( } ); -pub type NSFetchedResultsControllerDelegate = NSObject; +extern_protocol!( + pub struct NSFetchedResultsControllerDelegate; + + unsafe impl NSFetchedResultsControllerDelegate { + #[optional] + #[method(controller:didChangeContentWithSnapshot:)] + pub unsafe fn controller_didChangeContentWithSnapshot( + &self, + controller: &NSFetchedResultsController, + snapshot: &NSDiffableDataSourceSnapshot, + ); + + #[optional] + #[method(controller:didChangeContentWithDifference:)] + pub unsafe fn controller_didChangeContentWithDifference( + &self, + controller: &NSFetchedResultsController, + diff: &NSOrderedCollectionDifference, + ); + + #[optional] + #[method(controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:)] + pub unsafe fn controller_didChangeObject_atIndexPath_forChangeType_newIndexPath( + &self, + controller: &NSFetchedResultsController, + anObject: &Object, + indexPath: Option<&NSIndexPath>, + type_: NSFetchedResultsChangeType, + newIndexPath: Option<&NSIndexPath>, + ); + + #[optional] + #[method(controller:didChangeSection:atIndex:forChangeType:)] + pub unsafe fn controller_didChangeSection_atIndex_forChangeType( + &self, + controller: &NSFetchedResultsController, + sectionInfo: &NSFetchedResultsSectionInfo, + sectionIndex: NSUInteger, + type_: NSFetchedResultsChangeType, + ); + + #[optional] + #[method(controllerWillChangeContent:)] + pub unsafe fn controllerWillChangeContent(&self, controller: &NSFetchedResultsController); + + #[optional] + #[method(controllerDidChangeContent:)] + pub unsafe fn controllerDidChangeContent(&self, controller: &NSFetchedResultsController); + + #[optional] + #[method_id(@__retain_semantics Other controller:sectionIndexTitleForSectionName:)] + pub unsafe fn controller_sectionIndexTitleForSectionName( + &self, + controller: &NSFetchedResultsController, + sectionName: &NSString, + ) -> Option>; + } +); diff --git a/crates/icrate/src/generated/Foundation/NSCache.rs b/crates/icrate/src/generated/Foundation/NSCache.rs index 485e144b5..f5a17279a 100644 --- a/crates/icrate/src/generated/Foundation/NSCache.rs +++ b/crates/icrate/src/generated/Foundation/NSCache.rs @@ -67,4 +67,12 @@ extern_methods!( } ); -pub type NSCacheDelegate = NSObject; +extern_protocol!( + pub struct NSCacheDelegate; + + unsafe impl NSCacheDelegate { + #[optional] + #[method(cache:willEvictObject:)] + pub unsafe fn cache_willEvictObject(&self, cache: &NSCache, obj: &Object); + } +); diff --git a/crates/icrate/src/generated/Foundation/NSConnection.rs b/crates/icrate/src/generated/Foundation/NSConnection.rs index 88ad69ced..615d69391 100644 --- a/crates/icrate/src/generated/Foundation/NSConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSConnection.rs @@ -175,7 +175,57 @@ extern_static!(NSConnectionReplyMode: &'static NSString); extern_static!(NSConnectionDidDieNotification: &'static NSString); -pub type NSConnectionDelegate = NSObject; +extern_protocol!( + pub struct NSConnectionDelegate; + + unsafe impl NSConnectionDelegate { + #[optional] + #[method(makeNewConnection:sender:)] + pub unsafe fn makeNewConnection_sender( + &self, + conn: &NSConnection, + ancestor: &NSConnection, + ) -> bool; + + #[optional] + #[method(connection:shouldMakeNewConnection:)] + pub unsafe fn connection_shouldMakeNewConnection( + &self, + ancestor: &NSConnection, + conn: &NSConnection, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other authenticationDataForComponents:)] + pub unsafe fn authenticationDataForComponents( + &self, + components: &NSArray, + ) -> Id; + + #[optional] + #[method(authenticateComponents:withData:)] + pub unsafe fn authenticateComponents_withData( + &self, + components: &NSArray, + signature: &NSData, + ) -> bool; + + #[optional] + #[method_id(@__retain_semantics Other createConversationForConnection:)] + pub unsafe fn createConversationForConnection( + &self, + conn: &NSConnection, + ) -> Id; + + #[optional] + #[method(connection:handleRequest:)] + pub unsafe fn connection_handleRequest( + &self, + connection: &NSConnection, + doreq: &NSDistantObjectRequest, + ) -> bool; + } +); extern_static!(NSFailedAuthenticationException: &'static NSString); diff --git a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs index e0f685e3e..828e84bcb 100644 --- a/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs +++ b/crates/icrate/src/generated/Foundation/NSDecimalNumber.rs @@ -11,7 +11,26 @@ extern_static!(NSDecimalNumberUnderflowException: &'static NSExceptionName); extern_static!(NSDecimalNumberDivideByZeroException: &'static NSExceptionName); -pub type NSDecimalNumberBehaviors = NSObject; +extern_protocol!( + pub struct NSDecimalNumberBehaviors; + + unsafe impl NSDecimalNumberBehaviors { + #[method(roundingMode)] + pub unsafe fn roundingMode(&self) -> NSRoundingMode; + + #[method(scale)] + pub unsafe fn scale(&self) -> c_short; + + #[method_id(@__retain_semantics Other exceptionDuringOperation:error:leftOperand:rightOperand:)] + pub unsafe fn exceptionDuringOperation_error_leftOperand_rightOperand( + &self, + operation: Sel, + error: NSCalculationError, + leftOperand: &NSDecimalNumber, + rightOperand: Option<&NSDecimalNumber>, + ) -> Option>; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSEnumerator.rs b/crates/icrate/src/generated/Foundation/NSEnumerator.rs index acb302090..70bf3d636 100644 --- a/crates/icrate/src/generated/Foundation/NSEnumerator.rs +++ b/crates/icrate/src/generated/Foundation/NSEnumerator.rs @@ -12,7 +12,19 @@ extern_struct!( } ); -pub type NSFastEnumeration = NSObject; +extern_protocol!( + pub struct NSFastEnumeration; + + unsafe impl NSFastEnumeration { + #[method(countByEnumeratingWithState:objects:count:)] + pub unsafe fn countByEnumeratingWithState_objects_count( + &self, + state: NonNull, + buffer: NonNull<*mut Object>, + len: NSUInteger, + ) -> NSUInteger; + } +); __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs index 7ad2c8793..2efdff0b6 100644 --- a/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs +++ b/crates/icrate/src/generated/Foundation/NSExtensionRequestHandling.rs @@ -3,4 +3,11 @@ use crate::common::*; use crate::Foundation::*; -pub type NSExtensionRequestHandling = NSObject; +extern_protocol!( + pub struct NSExtensionRequestHandling; + + unsafe impl NSExtensionRequestHandling { + #[method(beginRequestWithExtensionContext:)] + pub unsafe fn beginRequestWithExtensionContext(&self, context: &NSExtensionContext); + } +); diff --git a/crates/icrate/src/generated/Foundation/NSFileManager.rs b/crates/icrate/src/generated/Foundation/NSFileManager.rs index 816b36371..cd6dd0bfe 100644 --- a/crates/icrate/src/generated/Foundation/NSFileManager.rs +++ b/crates/icrate/src/generated/Foundation/NSFileManager.rs @@ -523,7 +523,159 @@ extern_methods!( } ); -pub type NSFileManagerDelegate = NSObject; +extern_protocol!( + pub struct NSFileManagerDelegate; + + unsafe impl NSFileManagerDelegate { + #[optional] + #[method(fileManager:shouldCopyItemAtPath:toPath:)] + pub unsafe fn fileManager_shouldCopyItemAtPath_toPath( + &self, + fileManager: &NSFileManager, + srcPath: &NSString, + dstPath: &NSString, + ) -> bool; + + #[optional] + #[method(fileManager:shouldCopyItemAtURL:toURL:)] + pub unsafe fn fileManager_shouldCopyItemAtURL_toURL( + &self, + fileManager: &NSFileManager, + srcURL: &NSURL, + dstURL: &NSURL, + ) -> bool; + + #[optional] + #[method(fileManager:shouldProceedAfterError:copyingItemAtPath:toPath:)] + pub unsafe fn fileManager_shouldProceedAfterError_copyingItemAtPath_toPath( + &self, + fileManager: &NSFileManager, + error: &NSError, + srcPath: &NSString, + dstPath: &NSString, + ) -> bool; + + #[optional] + #[method(fileManager:shouldProceedAfterError:copyingItemAtURL:toURL:)] + pub unsafe fn fileManager_shouldProceedAfterError_copyingItemAtURL_toURL( + &self, + fileManager: &NSFileManager, + error: &NSError, + srcURL: &NSURL, + dstURL: &NSURL, + ) -> bool; + + #[optional] + #[method(fileManager:shouldMoveItemAtPath:toPath:)] + pub unsafe fn fileManager_shouldMoveItemAtPath_toPath( + &self, + fileManager: &NSFileManager, + srcPath: &NSString, + dstPath: &NSString, + ) -> bool; + + #[optional] + #[method(fileManager:shouldMoveItemAtURL:toURL:)] + pub unsafe fn fileManager_shouldMoveItemAtURL_toURL( + &self, + fileManager: &NSFileManager, + srcURL: &NSURL, + dstURL: &NSURL, + ) -> bool; + + #[optional] + #[method(fileManager:shouldProceedAfterError:movingItemAtPath:toPath:)] + pub unsafe fn fileManager_shouldProceedAfterError_movingItemAtPath_toPath( + &self, + fileManager: &NSFileManager, + error: &NSError, + srcPath: &NSString, + dstPath: &NSString, + ) -> bool; + + #[optional] + #[method(fileManager:shouldProceedAfterError:movingItemAtURL:toURL:)] + pub unsafe fn fileManager_shouldProceedAfterError_movingItemAtURL_toURL( + &self, + fileManager: &NSFileManager, + error: &NSError, + srcURL: &NSURL, + dstURL: &NSURL, + ) -> bool; + + #[optional] + #[method(fileManager:shouldLinkItemAtPath:toPath:)] + pub unsafe fn fileManager_shouldLinkItemAtPath_toPath( + &self, + fileManager: &NSFileManager, + srcPath: &NSString, + dstPath: &NSString, + ) -> bool; + + #[optional] + #[method(fileManager:shouldLinkItemAtURL:toURL:)] + pub unsafe fn fileManager_shouldLinkItemAtURL_toURL( + &self, + fileManager: &NSFileManager, + srcURL: &NSURL, + dstURL: &NSURL, + ) -> bool; + + #[optional] + #[method(fileManager:shouldProceedAfterError:linkingItemAtPath:toPath:)] + pub unsafe fn fileManager_shouldProceedAfterError_linkingItemAtPath_toPath( + &self, + fileManager: &NSFileManager, + error: &NSError, + srcPath: &NSString, + dstPath: &NSString, + ) -> bool; + + #[optional] + #[method(fileManager:shouldProceedAfterError:linkingItemAtURL:toURL:)] + pub unsafe fn fileManager_shouldProceedAfterError_linkingItemAtURL_toURL( + &self, + fileManager: &NSFileManager, + error: &NSError, + srcURL: &NSURL, + dstURL: &NSURL, + ) -> bool; + + #[optional] + #[method(fileManager:shouldRemoveItemAtPath:)] + pub unsafe fn fileManager_shouldRemoveItemAtPath( + &self, + fileManager: &NSFileManager, + path: &NSString, + ) -> bool; + + #[optional] + #[method(fileManager:shouldRemoveItemAtURL:)] + pub unsafe fn fileManager_shouldRemoveItemAtURL( + &self, + fileManager: &NSFileManager, + URL: &NSURL, + ) -> bool; + + #[optional] + #[method(fileManager:shouldProceedAfterError:removingItemAtPath:)] + pub unsafe fn fileManager_shouldProceedAfterError_removingItemAtPath( + &self, + fileManager: &NSFileManager, + error: &NSError, + path: &NSString, + ) -> bool; + + #[optional] + #[method(fileManager:shouldProceedAfterError:removingItemAtURL:)] + pub unsafe fn fileManager_shouldProceedAfterError_removingItemAtURL( + &self, + fileManager: &NSFileManager, + error: &NSError, + URL: &NSURL, + ) -> bool; + } +); __inner_extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs index 925fe94ec..692cac802 100644 --- a/crates/icrate/src/generated/Foundation/NSFilePresenter.rs +++ b/crates/icrate/src/generated/Foundation/NSFilePresenter.rs @@ -3,4 +3,123 @@ use crate::common::*; use crate::Foundation::*; -pub type NSFilePresenter = NSObject; +extern_protocol!( + pub struct NSFilePresenter; + + unsafe impl NSFilePresenter { + #[method_id(@__retain_semantics Other presentedItemURL)] + pub unsafe fn presentedItemURL(&self) -> Option>; + + #[method_id(@__retain_semantics Other presentedItemOperationQueue)] + pub unsafe fn presentedItemOperationQueue(&self) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other primaryPresentedItemURL)] + pub unsafe fn primaryPresentedItemURL(&self) -> Option>; + + #[optional] + #[method(relinquishPresentedItemToReader:)] + pub unsafe fn relinquishPresentedItemToReader( + &self, + reader: &Block<(*mut Block<(), ()>,), ()>, + ); + + #[optional] + #[method(relinquishPresentedItemToWriter:)] + pub unsafe fn relinquishPresentedItemToWriter( + &self, + writer: &Block<(*mut Block<(), ()>,), ()>, + ); + + #[optional] + #[method(savePresentedItemChangesWithCompletionHandler:)] + pub unsafe fn savePresentedItemChangesWithCompletionHandler( + &self, + completionHandler: &Block<(*mut NSError,), ()>, + ); + + #[optional] + #[method(accommodatePresentedItemDeletionWithCompletionHandler:)] + pub unsafe fn accommodatePresentedItemDeletionWithCompletionHandler( + &self, + completionHandler: &Block<(*mut NSError,), ()>, + ); + + #[optional] + #[method(presentedItemDidMoveToURL:)] + pub unsafe fn presentedItemDidMoveToURL(&self, newURL: &NSURL); + + #[optional] + #[method(presentedItemDidChange)] + pub unsafe fn presentedItemDidChange(&self); + + #[optional] + #[method(presentedItemDidChangeUbiquityAttributes:)] + pub unsafe fn presentedItemDidChangeUbiquityAttributes( + &self, + attributes: &NSSet, + ); + + #[optional] + #[method_id(@__retain_semantics Other observedPresentedItemUbiquityAttributes)] + pub unsafe fn observedPresentedItemUbiquityAttributes( + &self, + ) -> Id, Shared>; + + #[optional] + #[method(presentedItemDidGainVersion:)] + pub unsafe fn presentedItemDidGainVersion(&self, version: &NSFileVersion); + + #[optional] + #[method(presentedItemDidLoseVersion:)] + pub unsafe fn presentedItemDidLoseVersion(&self, version: &NSFileVersion); + + #[optional] + #[method(presentedItemDidResolveConflictVersion:)] + pub unsafe fn presentedItemDidResolveConflictVersion(&self, version: &NSFileVersion); + + #[optional] + #[method(accommodatePresentedSubitemDeletionAtURL:completionHandler:)] + pub unsafe fn accommodatePresentedSubitemDeletionAtURL_completionHandler( + &self, + url: &NSURL, + completionHandler: &Block<(*mut NSError,), ()>, + ); + + #[optional] + #[method(presentedSubitemDidAppearAtURL:)] + pub unsafe fn presentedSubitemDidAppearAtURL(&self, url: &NSURL); + + #[optional] + #[method(presentedSubitemAtURL:didMoveToURL:)] + pub unsafe fn presentedSubitemAtURL_didMoveToURL(&self, oldURL: &NSURL, newURL: &NSURL); + + #[optional] + #[method(presentedSubitemDidChangeAtURL:)] + pub unsafe fn presentedSubitemDidChangeAtURL(&self, url: &NSURL); + + #[optional] + #[method(presentedSubitemAtURL:didGainVersion:)] + pub unsafe fn presentedSubitemAtURL_didGainVersion( + &self, + url: &NSURL, + version: &NSFileVersion, + ); + + #[optional] + #[method(presentedSubitemAtURL:didLoseVersion:)] + pub unsafe fn presentedSubitemAtURL_didLoseVersion( + &self, + url: &NSURL, + version: &NSFileVersion, + ); + + #[optional] + #[method(presentedSubitemAtURL:didResolveConflictVersion:)] + pub unsafe fn presentedSubitemAtURL_didResolveConflictVersion( + &self, + url: &NSURL, + version: &NSFileVersion, + ); + } +); diff --git a/crates/icrate/src/generated/Foundation/NSItemProvider.rs b/crates/icrate/src/generated/Foundation/NSItemProvider.rs index 53d302cee..20d6584b6 100644 --- a/crates/icrate/src/generated/Foundation/NSItemProvider.rs +++ b/crates/icrate/src/generated/Foundation/NSItemProvider.rs @@ -20,9 +20,55 @@ ns_options!( } ); -pub type NSItemProviderWriting = NSObject; +extern_protocol!( + pub struct NSItemProviderWriting; -pub type NSItemProviderReading = NSObject; + unsafe impl NSItemProviderWriting { + #[method_id(@__retain_semantics Other writableTypeIdentifiersForItemProvider)] + pub unsafe fn writableTypeIdentifiersForItemProvider() -> Id, Shared>; + + #[optional] + #[method_id(@__retain_semantics Other writableTypeIdentifiersForItemProvider)] + pub unsafe fn writableTypeIdentifiersForItemProvider( + &self, + ) -> Id, Shared>; + + #[optional] + #[method(itemProviderVisibilityForRepresentationWithTypeIdentifier:)] + pub unsafe fn itemProviderVisibilityForRepresentationWithTypeIdentifier( + typeIdentifier: &NSString, + ) -> NSItemProviderRepresentationVisibility; + + #[optional] + #[method(itemProviderVisibilityForRepresentationWithTypeIdentifier:)] + pub unsafe fn itemProviderVisibilityForRepresentationWithTypeIdentifier( + &self, + typeIdentifier: &NSString, + ) -> NSItemProviderRepresentationVisibility; + + #[method_id(@__retain_semantics Other loadDataWithTypeIdentifier:forItemProviderCompletionHandler:)] + pub unsafe fn loadDataWithTypeIdentifier_forItemProviderCompletionHandler( + &self, + typeIdentifier: &NSString, + completionHandler: &Block<(*mut NSData, *mut NSError), ()>, + ) -> Option>; + } +); + +extern_protocol!( + pub struct NSItemProviderReading; + + unsafe impl NSItemProviderReading { + #[method_id(@__retain_semantics Other readableTypeIdentifiersForItemProvider)] + pub unsafe fn readableTypeIdentifiersForItemProvider() -> Id, Shared>; + + #[method_id(@__retain_semantics Other objectWithItemProviderData:typeIdentifier:error:)] + pub unsafe fn objectWithItemProviderData_typeIdentifier_error( + data: &NSData, + typeIdentifier: &NSString, + ) -> Result, Id>; + } +); pub type NSItemProviderCompletionHandler = *mut Block<(*mut NSSecureCoding, *mut NSError), ()>; diff --git a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs index 5b4371fe4..97eeb3bcf 100644 --- a/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs +++ b/crates/icrate/src/generated/Foundation/NSKeyedArchiver.rs @@ -241,9 +241,76 @@ extern_methods!( } ); -pub type NSKeyedArchiverDelegate = NSObject; +extern_protocol!( + pub struct NSKeyedArchiverDelegate; -pub type NSKeyedUnarchiverDelegate = NSObject; + unsafe impl NSKeyedArchiverDelegate { + #[optional] + #[method_id(@__retain_semantics Other archiver:willEncodeObject:)] + pub unsafe fn archiver_willEncodeObject( + &self, + archiver: &NSKeyedArchiver, + object: &Object, + ) -> Option>; + + #[optional] + #[method(archiver:didEncodeObject:)] + pub unsafe fn archiver_didEncodeObject( + &self, + archiver: &NSKeyedArchiver, + object: Option<&Object>, + ); + + #[optional] + #[method(archiver:willReplaceObject:withObject:)] + pub unsafe fn archiver_willReplaceObject_withObject( + &self, + archiver: &NSKeyedArchiver, + object: Option<&Object>, + newObject: Option<&Object>, + ); + + #[optional] + #[method(archiverWillFinish:)] + pub unsafe fn archiverWillFinish(&self, archiver: &NSKeyedArchiver); + + #[optional] + #[method(archiverDidFinish:)] + pub unsafe fn archiverDidFinish(&self, archiver: &NSKeyedArchiver); + } +); + +extern_protocol!( + pub struct NSKeyedUnarchiverDelegate; + + unsafe impl NSKeyedUnarchiverDelegate { + #[optional] + #[method(unarchiver:cannotDecodeObjectOfClassName:originalClasses:)] + pub unsafe fn unarchiver_cannotDecodeObjectOfClassName_originalClasses( + &self, + unarchiver: &NSKeyedUnarchiver, + name: &NSString, + classNames: &NSArray, + ) -> Option<&'static Class>; + + #[optional] + #[method(unarchiver:willReplaceObject:withObject:)] + pub unsafe fn unarchiver_willReplaceObject_withObject( + &self, + unarchiver: &NSKeyedUnarchiver, + object: &Object, + newObject: &Object, + ); + + #[optional] + #[method(unarchiverWillFinish:)] + pub unsafe fn unarchiverWillFinish(&self, unarchiver: &NSKeyedUnarchiver); + + #[optional] + #[method(unarchiverDidFinish:)] + pub unsafe fn unarchiverDidFinish(&self, unarchiver: &NSKeyedUnarchiver); + } +); extern_methods!( /// NSKeyedArchiverObjectSubstitution diff --git a/crates/icrate/src/generated/Foundation/NSLock.rs b/crates/icrate/src/generated/Foundation/NSLock.rs index 8d1d74974..53644be43 100644 --- a/crates/icrate/src/generated/Foundation/NSLock.rs +++ b/crates/icrate/src/generated/Foundation/NSLock.rs @@ -3,7 +3,17 @@ use crate::common::*; use crate::Foundation::*; -pub type NSLocking = NSObject; +extern_protocol!( + pub struct NSLocking; + + unsafe impl NSLocking { + #[method(lock)] + pub unsafe fn lock(&self); + + #[method(unlock)] + pub unsafe fn unlock(&self); + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSMetadata.rs b/crates/icrate/src/generated/Foundation/NSMetadata.rs index 6fe1281c8..358d1022c 100644 --- a/crates/icrate/src/generated/Foundation/NSMetadata.rs +++ b/crates/icrate/src/generated/Foundation/NSMetadata.rs @@ -134,7 +134,28 @@ extern_methods!( } ); -pub type NSMetadataQueryDelegate = NSObject; +extern_protocol!( + pub struct NSMetadataQueryDelegate; + + unsafe impl NSMetadataQueryDelegate { + #[optional] + #[method_id(@__retain_semantics Other metadataQuery:replacementObjectForResultObject:)] + pub unsafe fn metadataQuery_replacementObjectForResultObject( + &self, + query: &NSMetadataQuery, + result: &NSMetadataItem, + ) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other metadataQuery:replacementValueForAttribute:value:)] + pub unsafe fn metadataQuery_replacementValueForAttribute_value( + &self, + query: &NSMetadataQuery, + attrName: &NSString, + attrValue: &Object, + ) -> Id; + } +); extern_static!(NSMetadataQueryDidStartGatheringNotification: &'static NSNotificationName); diff --git a/crates/icrate/src/generated/Foundation/NSNetServices.rs b/crates/icrate/src/generated/Foundation/NSNetServices.rs index 559db9ef8..73027c999 100644 --- a/crates/icrate/src/generated/Foundation/NSNetServices.rs +++ b/crates/icrate/src/generated/Foundation/NSNetServices.rs @@ -183,6 +183,119 @@ extern_methods!( } ); -pub type NSNetServiceDelegate = NSObject; +extern_protocol!( + pub struct NSNetServiceDelegate; -pub type NSNetServiceBrowserDelegate = NSObject; + unsafe impl NSNetServiceDelegate { + #[optional] + #[method(netServiceWillPublish:)] + pub unsafe fn netServiceWillPublish(&self, sender: &NSNetService); + + #[optional] + #[method(netServiceDidPublish:)] + pub unsafe fn netServiceDidPublish(&self, sender: &NSNetService); + + #[optional] + #[method(netService:didNotPublish:)] + pub unsafe fn netService_didNotPublish( + &self, + sender: &NSNetService, + errorDict: &NSDictionary, + ); + + #[optional] + #[method(netServiceWillResolve:)] + pub unsafe fn netServiceWillResolve(&self, sender: &NSNetService); + + #[optional] + #[method(netServiceDidResolveAddress:)] + pub unsafe fn netServiceDidResolveAddress(&self, sender: &NSNetService); + + #[optional] + #[method(netService:didNotResolve:)] + pub unsafe fn netService_didNotResolve( + &self, + sender: &NSNetService, + errorDict: &NSDictionary, + ); + + #[optional] + #[method(netServiceDidStop:)] + pub unsafe fn netServiceDidStop(&self, sender: &NSNetService); + + #[optional] + #[method(netService:didUpdateTXTRecordData:)] + pub unsafe fn netService_didUpdateTXTRecordData( + &self, + sender: &NSNetService, + data: &NSData, + ); + + #[optional] + #[method(netService:didAcceptConnectionWithInputStream:outputStream:)] + pub unsafe fn netService_didAcceptConnectionWithInputStream_outputStream( + &self, + sender: &NSNetService, + inputStream: &NSInputStream, + outputStream: &NSOutputStream, + ); + } +); + +extern_protocol!( + pub struct NSNetServiceBrowserDelegate; + + unsafe impl NSNetServiceBrowserDelegate { + #[optional] + #[method(netServiceBrowserWillSearch:)] + pub unsafe fn netServiceBrowserWillSearch(&self, browser: &NSNetServiceBrowser); + + #[optional] + #[method(netServiceBrowserDidStopSearch:)] + pub unsafe fn netServiceBrowserDidStopSearch(&self, browser: &NSNetServiceBrowser); + + #[optional] + #[method(netServiceBrowser:didNotSearch:)] + pub unsafe fn netServiceBrowser_didNotSearch( + &self, + browser: &NSNetServiceBrowser, + errorDict: &NSDictionary, + ); + + #[optional] + #[method(netServiceBrowser:didFindDomain:moreComing:)] + pub unsafe fn netServiceBrowser_didFindDomain_moreComing( + &self, + browser: &NSNetServiceBrowser, + domainString: &NSString, + moreComing: bool, + ); + + #[optional] + #[method(netServiceBrowser:didFindService:moreComing:)] + pub unsafe fn netServiceBrowser_didFindService_moreComing( + &self, + browser: &NSNetServiceBrowser, + service: &NSNetService, + moreComing: bool, + ); + + #[optional] + #[method(netServiceBrowser:didRemoveDomain:moreComing:)] + pub unsafe fn netServiceBrowser_didRemoveDomain_moreComing( + &self, + browser: &NSNetServiceBrowser, + domainString: &NSString, + moreComing: bool, + ); + + #[optional] + #[method(netServiceBrowser:didRemoveService:moreComing:)] + pub unsafe fn netServiceBrowser_didRemoveService_moreComing( + &self, + browser: &NSNetServiceBrowser, + service: &NSNetService, + moreComing: bool, + ); + } +); diff --git a/crates/icrate/src/generated/Foundation/NSObject.rs b/crates/icrate/src/generated/Foundation/NSObject.rs index 0b76f1ae4..193669cc1 100644 --- a/crates/icrate/src/generated/Foundation/NSObject.rs +++ b/crates/icrate/src/generated/Foundation/NSObject.rs @@ -3,13 +3,47 @@ use crate::common::*; use crate::Foundation::*; -pub type NSCopying = NSObject; +extern_protocol!( + pub struct NSCopying; -pub type NSMutableCopying = NSObject; + unsafe impl NSCopying { + #[method_id(@__retain_semantics CopyOrMutCopy copyWithZone:)] + pub unsafe fn copyWithZone(&self, zone: *mut NSZone) -> Id; + } +); + +extern_protocol!( + pub struct NSMutableCopying; + + unsafe impl NSMutableCopying { + #[method_id(@__retain_semantics CopyOrMutCopy mutableCopyWithZone:)] + pub unsafe fn mutableCopyWithZone(&self, zone: *mut NSZone) -> Id; + } +); + +extern_protocol!( + pub struct NSCoding; + + unsafe impl NSCoding { + #[method(encodeWithCoder:)] + pub unsafe fn encodeWithCoder(&self, coder: &NSCoder); + + #[method_id(@__retain_semantics Init initWithCoder:)] + pub unsafe fn initWithCoder( + this: Option>, + coder: &NSCoder, + ) -> Option>; + } +); -pub type NSCoding = NSObject; +extern_protocol!( + pub struct NSSecureCoding; -pub type NSSecureCoding = NSObject; + unsafe impl NSSecureCoding { + #[method(supportsSecureCoding)] + pub unsafe fn supportsSecureCoding() -> bool; + } +); extern_methods!( /// NSCoderMethods @@ -39,7 +73,23 @@ extern_methods!( } ); -pub type NSDiscardableContent = NSObject; +extern_protocol!( + pub struct NSDiscardableContent; + + unsafe impl NSDiscardableContent { + #[method(beginContentAccess)] + pub unsafe fn beginContentAccess(&self) -> bool; + + #[method(endContentAccess)] + pub unsafe fn endContentAccess(&self); + + #[method(discardContentIfPossible)] + pub unsafe fn discardContentIfPossible(&self); + + #[method(isContentDiscarded)] + pub unsafe fn isContentDiscarded(&self) -> bool; + } +); extern_methods!( /// NSDiscardableContentProxy diff --git a/crates/icrate/src/generated/Foundation/NSPort.rs b/crates/icrate/src/generated/Foundation/NSPort.rs index dd1a5aeaf..6fbe45a52 100644 --- a/crates/icrate/src/generated/Foundation/NSPort.rs +++ b/crates/icrate/src/generated/Foundation/NSPort.rs @@ -79,7 +79,15 @@ extern_methods!( } ); -pub type NSPortDelegate = NSObject; +extern_protocol!( + pub struct NSPortDelegate; + + unsafe impl NSPortDelegate { + #[optional] + #[method(handlePortMessage:)] + pub unsafe fn handlePortMessage(&self, message: &NSPortMessage); + } +); ns_options!( #[underlying(NSUInteger)] @@ -140,7 +148,15 @@ extern_methods!( } ); -pub type NSMachPortDelegate = NSObject; +extern_protocol!( + pub struct NSMachPortDelegate; + + unsafe impl NSMachPortDelegate { + #[optional] + #[method(handleMachMessage:)] + pub unsafe fn handleMachMessage(&self, msg: NonNull); + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSProgress.rs b/crates/icrate/src/generated/Foundation/NSProgress.rs index d752df3a6..6fe8835f9 100644 --- a/crates/icrate/src/generated/Foundation/NSProgress.rs +++ b/crates/icrate/src/generated/Foundation/NSProgress.rs @@ -220,7 +220,14 @@ extern_methods!( } ); -pub type NSProgressReporting = NSObject; +extern_protocol!( + pub struct NSProgressReporting; + + unsafe impl NSProgressReporting { + #[method_id(@__retain_semantics Other progress)] + pub unsafe fn progress(&self) -> Id; + } +); extern_static!(NSProgressEstimatedTimeRemainingKey: &'static NSProgressUserInfoKey); diff --git a/crates/icrate/src/generated/Foundation/NSSpellServer.rs b/crates/icrate/src/generated/Foundation/NSSpellServer.rs index 0a032e8f3..66e78dd96 100644 --- a/crates/icrate/src/generated/Foundation/NSSpellServer.rs +++ b/crates/icrate/src/generated/Foundation/NSSpellServer.rs @@ -45,4 +45,90 @@ extern_static!(NSGrammarUserDescription: &'static NSString); extern_static!(NSGrammarCorrections: &'static NSString); -pub type NSSpellServerDelegate = NSObject; +extern_protocol!( + pub struct NSSpellServerDelegate; + + unsafe impl NSSpellServerDelegate { + #[optional] + #[method(spellServer:findMisspelledWordInString:language:wordCount:countOnly:)] + pub unsafe fn spellServer_findMisspelledWordInString_language_wordCount_countOnly( + &self, + sender: &NSSpellServer, + stringToCheck: &NSString, + language: &NSString, + wordCount: NonNull, + countOnly: bool, + ) -> NSRange; + + #[optional] + #[method_id(@__retain_semantics Other spellServer:suggestGuessesForWord:inLanguage:)] + pub unsafe fn spellServer_suggestGuessesForWord_inLanguage( + &self, + sender: &NSSpellServer, + word: &NSString, + language: &NSString, + ) -> Option, Shared>>; + + #[optional] + #[method(spellServer:didLearnWord:inLanguage:)] + pub unsafe fn spellServer_didLearnWord_inLanguage( + &self, + sender: &NSSpellServer, + word: &NSString, + language: &NSString, + ); + + #[optional] + #[method(spellServer:didForgetWord:inLanguage:)] + pub unsafe fn spellServer_didForgetWord_inLanguage( + &self, + sender: &NSSpellServer, + word: &NSString, + language: &NSString, + ); + + #[optional] + #[method_id(@__retain_semantics Other spellServer:suggestCompletionsForPartialWordRange:inString:language:)] + pub unsafe fn spellServer_suggestCompletionsForPartialWordRange_inString_language( + &self, + sender: &NSSpellServer, + range: NSRange, + string: &NSString, + language: &NSString, + ) -> Option, Shared>>; + + #[optional] + #[method(spellServer:checkGrammarInString:language:details:)] + pub unsafe fn spellServer_checkGrammarInString_language_details( + &self, + sender: &NSSpellServer, + stringToCheck: &NSString, + language: Option<&NSString>, + details: *mut *mut NSArray>, + ) -> NSRange; + + #[optional] + #[method_id(@__retain_semantics Other spellServer:checkString:offset:types:options:orthography:wordCount:)] + pub unsafe fn spellServer_checkString_offset_types_options_orthography_wordCount( + &self, + sender: &NSSpellServer, + stringToCheck: &NSString, + offset: NSUInteger, + checkingTypes: NSTextCheckingTypes, + options: Option<&NSDictionary>, + orthography: Option<&NSOrthography>, + wordCount: NonNull, + ) -> Option, Shared>>; + + #[optional] + #[method(spellServer:recordResponse:toCorrection:forWord:language:)] + pub unsafe fn spellServer_recordResponse_toCorrection_forWord_language( + &self, + sender: &NSSpellServer, + response: NSUInteger, + correction: &NSString, + word: &NSString, + language: &NSString, + ); + } +); diff --git a/crates/icrate/src/generated/Foundation/NSStream.rs b/crates/icrate/src/generated/Foundation/NSStream.rs index adfecf53d..0e1b45bd6 100644 --- a/crates/icrate/src/generated/Foundation/NSStream.rs +++ b/crates/icrate/src/generated/Foundation/NSStream.rs @@ -241,7 +241,15 @@ extern_methods!( } ); -pub type NSStreamDelegate = NSObject; +extern_protocol!( + pub struct NSStreamDelegate; + + unsafe impl NSStreamDelegate { + #[optional] + #[method(stream:handleEvent:)] + pub unsafe fn stream_handleEvent(&self, aStream: &NSStream, eventCode: NSStreamEvent); + } +); extern_static!(NSStreamSocketSecurityLevelKey: &'static NSStreamPropertyKey); diff --git a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs index af8ef29a8..898d61a9e 100644 --- a/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs +++ b/crates/icrate/src/generated/Foundation/NSURLAuthenticationChallenge.rs @@ -3,7 +3,44 @@ use crate::common::*; use crate::Foundation::*; -pub type NSURLAuthenticationChallengeSender = NSObject; +extern_protocol!( + pub struct NSURLAuthenticationChallengeSender; + + unsafe impl NSURLAuthenticationChallengeSender { + #[method(useCredential:forAuthenticationChallenge:)] + pub unsafe fn useCredential_forAuthenticationChallenge( + &self, + credential: &NSURLCredential, + challenge: &NSURLAuthenticationChallenge, + ); + + #[method(continueWithoutCredentialForAuthenticationChallenge:)] + pub unsafe fn continueWithoutCredentialForAuthenticationChallenge( + &self, + challenge: &NSURLAuthenticationChallenge, + ); + + #[method(cancelAuthenticationChallenge:)] + pub unsafe fn cancelAuthenticationChallenge( + &self, + challenge: &NSURLAuthenticationChallenge, + ); + + #[optional] + #[method(performDefaultHandlingForAuthenticationChallenge:)] + pub unsafe fn performDefaultHandlingForAuthenticationChallenge( + &self, + challenge: &NSURLAuthenticationChallenge, + ); + + #[optional] + #[method(rejectProtectionSpaceAndContinueWithChallenge:)] + pub unsafe fn rejectProtectionSpaceAndContinueWithChallenge( + &self, + challenge: &NSURLAuthenticationChallenge, + ); + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLConnection.rs b/crates/icrate/src/generated/Foundation/NSURLConnection.rs index fe0d38bab..095d6f06c 100644 --- a/crates/icrate/src/generated/Foundation/NSURLConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSURLConnection.rs @@ -65,11 +65,147 @@ extern_methods!( } ); -pub type NSURLConnectionDelegate = NSObject; +extern_protocol!( + pub struct NSURLConnectionDelegate; -pub type NSURLConnectionDataDelegate = NSObject; + unsafe impl NSURLConnectionDelegate { + #[optional] + #[method(connection:didFailWithError:)] + pub unsafe fn connection_didFailWithError( + &self, + connection: &NSURLConnection, + error: &NSError, + ); + + #[optional] + #[method(connectionShouldUseCredentialStorage:)] + pub unsafe fn connectionShouldUseCredentialStorage( + &self, + connection: &NSURLConnection, + ) -> bool; + + #[optional] + #[method(connection:willSendRequestForAuthenticationChallenge:)] + pub unsafe fn connection_willSendRequestForAuthenticationChallenge( + &self, + connection: &NSURLConnection, + challenge: &NSURLAuthenticationChallenge, + ); + + #[optional] + #[method(connection:canAuthenticateAgainstProtectionSpace:)] + pub unsafe fn connection_canAuthenticateAgainstProtectionSpace( + &self, + connection: &NSURLConnection, + protectionSpace: &NSURLProtectionSpace, + ) -> bool; + + #[optional] + #[method(connection:didReceiveAuthenticationChallenge:)] + pub unsafe fn connection_didReceiveAuthenticationChallenge( + &self, + connection: &NSURLConnection, + challenge: &NSURLAuthenticationChallenge, + ); + + #[optional] + #[method(connection:didCancelAuthenticationChallenge:)] + pub unsafe fn connection_didCancelAuthenticationChallenge( + &self, + connection: &NSURLConnection, + challenge: &NSURLAuthenticationChallenge, + ); + } +); + +extern_protocol!( + pub struct NSURLConnectionDataDelegate; + + unsafe impl NSURLConnectionDataDelegate { + #[optional] + #[method_id(@__retain_semantics Other connection:willSendRequest:redirectResponse:)] + pub unsafe fn connection_willSendRequest_redirectResponse( + &self, + connection: &NSURLConnection, + request: &NSURLRequest, + response: Option<&NSURLResponse>, + ) -> Option>; + + #[optional] + #[method(connection:didReceiveResponse:)] + pub unsafe fn connection_didReceiveResponse( + &self, + connection: &NSURLConnection, + response: &NSURLResponse, + ); -pub type NSURLConnectionDownloadDelegate = NSObject; + #[optional] + #[method(connection:didReceiveData:)] + pub unsafe fn connection_didReceiveData(&self, connection: &NSURLConnection, data: &NSData); + + #[optional] + #[method_id(@__retain_semantics Other connection:needNewBodyStream:)] + pub unsafe fn connection_needNewBodyStream( + &self, + connection: &NSURLConnection, + request: &NSURLRequest, + ) -> Option>; + + #[optional] + #[method(connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:)] + pub unsafe fn connection_didSendBodyData_totalBytesWritten_totalBytesExpectedToWrite( + &self, + connection: &NSURLConnection, + bytesWritten: NSInteger, + totalBytesWritten: NSInteger, + totalBytesExpectedToWrite: NSInteger, + ); + + #[optional] + #[method_id(@__retain_semantics Other connection:willCacheResponse:)] + pub unsafe fn connection_willCacheResponse( + &self, + connection: &NSURLConnection, + cachedResponse: &NSCachedURLResponse, + ) -> Option>; + + #[optional] + #[method(connectionDidFinishLoading:)] + pub unsafe fn connectionDidFinishLoading(&self, connection: &NSURLConnection); + } +); + +extern_protocol!( + pub struct NSURLConnectionDownloadDelegate; + + unsafe impl NSURLConnectionDownloadDelegate { + #[optional] + #[method(connection:didWriteData:totalBytesWritten:expectedTotalBytes:)] + pub unsafe fn connection_didWriteData_totalBytesWritten_expectedTotalBytes( + &self, + connection: &NSURLConnection, + bytesWritten: c_longlong, + totalBytesWritten: c_longlong, + expectedTotalBytes: c_longlong, + ); + + #[optional] + #[method(connectionDidResumeDownloading:totalBytesWritten:expectedTotalBytes:)] + pub unsafe fn connectionDidResumeDownloading_totalBytesWritten_expectedTotalBytes( + &self, + connection: &NSURLConnection, + totalBytesWritten: c_longlong, + expectedTotalBytes: c_longlong, + ); + + #[method(connectionDidFinishDownloading:destinationURL:)] + pub unsafe fn connectionDidFinishDownloading_destinationURL( + &self, + connection: &NSURLConnection, + destinationURL: &NSURL, + ); + } +); extern_methods!( /// NSURLConnectionSynchronousLoading diff --git a/crates/icrate/src/generated/Foundation/NSURLDownload.rs b/crates/icrate/src/generated/Foundation/NSURLDownload.rs index 88331e9e0..6a50d330d 100644 --- a/crates/icrate/src/generated/Foundation/NSURLDownload.rs +++ b/crates/icrate/src/generated/Foundation/NSURLDownload.rs @@ -52,4 +52,106 @@ extern_methods!( } ); -pub type NSURLDownloadDelegate = NSObject; +extern_protocol!( + pub struct NSURLDownloadDelegate; + + unsafe impl NSURLDownloadDelegate { + #[optional] + #[method(downloadDidBegin:)] + pub unsafe fn downloadDidBegin(&self, download: &NSURLDownload); + + #[optional] + #[method_id(@__retain_semantics Other download:willSendRequest:redirectResponse:)] + pub unsafe fn download_willSendRequest_redirectResponse( + &self, + download: &NSURLDownload, + request: &NSURLRequest, + redirectResponse: Option<&NSURLResponse>, + ) -> Option>; + + #[optional] + #[method(download:canAuthenticateAgainstProtectionSpace:)] + pub unsafe fn download_canAuthenticateAgainstProtectionSpace( + &self, + connection: &NSURLDownload, + protectionSpace: &NSURLProtectionSpace, + ) -> bool; + + #[optional] + #[method(download:didReceiveAuthenticationChallenge:)] + pub unsafe fn download_didReceiveAuthenticationChallenge( + &self, + download: &NSURLDownload, + challenge: &NSURLAuthenticationChallenge, + ); + + #[optional] + #[method(download:didCancelAuthenticationChallenge:)] + pub unsafe fn download_didCancelAuthenticationChallenge( + &self, + download: &NSURLDownload, + challenge: &NSURLAuthenticationChallenge, + ); + + #[optional] + #[method(downloadShouldUseCredentialStorage:)] + pub unsafe fn downloadShouldUseCredentialStorage(&self, download: &NSURLDownload) -> bool; + + #[optional] + #[method(download:didReceiveResponse:)] + pub unsafe fn download_didReceiveResponse( + &self, + download: &NSURLDownload, + response: &NSURLResponse, + ); + + #[optional] + #[method(download:willResumeWithResponse:fromByte:)] + pub unsafe fn download_willResumeWithResponse_fromByte( + &self, + download: &NSURLDownload, + response: &NSURLResponse, + startingByte: c_longlong, + ); + + #[optional] + #[method(download:didReceiveDataOfLength:)] + pub unsafe fn download_didReceiveDataOfLength( + &self, + download: &NSURLDownload, + length: NSUInteger, + ); + + #[optional] + #[method(download:shouldDecodeSourceDataOfMIMEType:)] + pub unsafe fn download_shouldDecodeSourceDataOfMIMEType( + &self, + download: &NSURLDownload, + encodingType: &NSString, + ) -> bool; + + #[optional] + #[method(download:decideDestinationWithSuggestedFilename:)] + pub unsafe fn download_decideDestinationWithSuggestedFilename( + &self, + download: &NSURLDownload, + filename: &NSString, + ); + + #[optional] + #[method(download:didCreateDestination:)] + pub unsafe fn download_didCreateDestination( + &self, + download: &NSURLDownload, + path: &NSString, + ); + + #[optional] + #[method(downloadDidFinish:)] + pub unsafe fn downloadDidFinish(&self, download: &NSURLDownload); + + #[optional] + #[method(download:didFailWithError:)] + pub unsafe fn download_didFailWithError(&self, download: &NSURLDownload, error: &NSError); + } +); diff --git a/crates/icrate/src/generated/Foundation/NSURLHandle.rs b/crates/icrate/src/generated/Foundation/NSURLHandle.rs index 80e9c9207..c0e638e07 100644 --- a/crates/icrate/src/generated/Foundation/NSURLHandle.rs +++ b/crates/icrate/src/generated/Foundation/NSURLHandle.rs @@ -35,7 +35,34 @@ ns_enum!( } ); -pub type NSURLHandleClient = NSObject; +extern_protocol!( + pub struct NSURLHandleClient; + + unsafe impl NSURLHandleClient { + #[method(URLHandle:resourceDataDidBecomeAvailable:)] + pub unsafe fn URLHandle_resourceDataDidBecomeAvailable( + &self, + sender: Option<&NSURLHandle>, + newBytes: Option<&NSData>, + ); + + #[method(URLHandleResourceDidBeginLoading:)] + pub unsafe fn URLHandleResourceDidBeginLoading(&self, sender: Option<&NSURLHandle>); + + #[method(URLHandleResourceDidFinishLoading:)] + pub unsafe fn URLHandleResourceDidFinishLoading(&self, sender: Option<&NSURLHandle>); + + #[method(URLHandleResourceDidCancelLoading:)] + pub unsafe fn URLHandleResourceDidCancelLoading(&self, sender: Option<&NSURLHandle>); + + #[method(URLHandle:resourceDidFailLoadingWithReason:)] + pub unsafe fn URLHandle_resourceDidFailLoadingWithReason( + &self, + sender: Option<&NSURLHandle>, + reason: Option<&NSString>, + ); + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs index f7c96d4f4..2479082f8 100644 --- a/crates/icrate/src/generated/Foundation/NSURLProtocol.rs +++ b/crates/icrate/src/generated/Foundation/NSURLProtocol.rs @@ -3,7 +3,61 @@ use crate::common::*; use crate::Foundation::*; -pub type NSURLProtocolClient = NSObject; +extern_protocol!( + pub struct NSURLProtocolClient; + + unsafe impl NSURLProtocolClient { + #[method(URLProtocol:wasRedirectedToRequest:redirectResponse:)] + pub unsafe fn URLProtocol_wasRedirectedToRequest_redirectResponse( + &self, + protocol: &NSURLProtocol, + request: &NSURLRequest, + redirectResponse: &NSURLResponse, + ); + + #[method(URLProtocol:cachedResponseIsValid:)] + pub unsafe fn URLProtocol_cachedResponseIsValid( + &self, + protocol: &NSURLProtocol, + cachedResponse: &NSCachedURLResponse, + ); + + #[method(URLProtocol:didReceiveResponse:cacheStoragePolicy:)] + pub unsafe fn URLProtocol_didReceiveResponse_cacheStoragePolicy( + &self, + protocol: &NSURLProtocol, + response: &NSURLResponse, + policy: NSURLCacheStoragePolicy, + ); + + #[method(URLProtocol:didLoadData:)] + pub unsafe fn URLProtocol_didLoadData(&self, protocol: &NSURLProtocol, data: &NSData); + + #[method(URLProtocolDidFinishLoading:)] + pub unsafe fn URLProtocolDidFinishLoading(&self, protocol: &NSURLProtocol); + + #[method(URLProtocol:didFailWithError:)] + pub unsafe fn URLProtocol_didFailWithError( + &self, + protocol: &NSURLProtocol, + error: &NSError, + ); + + #[method(URLProtocol:didReceiveAuthenticationChallenge:)] + pub unsafe fn URLProtocol_didReceiveAuthenticationChallenge( + &self, + protocol: &NSURLProtocol, + challenge: &NSURLAuthenticationChallenge, + ); + + #[method(URLProtocol:didCancelAuthenticationChallenge:)] + pub unsafe fn URLProtocol_didCancelAuthenticationChallenge( + &self, + protocol: &NSURLProtocol, + challenge: &NSURLAuthenticationChallenge, + ); + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/generated/Foundation/NSURLSession.rs b/crates/icrate/src/generated/Foundation/NSURLSession.rs index ffdfa2aa4..773d2455e 100644 --- a/crates/icrate/src/generated/Foundation/NSURLSession.rs +++ b/crates/icrate/src/generated/Foundation/NSURLSession.rs @@ -826,17 +826,280 @@ ns_enum!( } ); -pub type NSURLSessionDelegate = NSObject; +extern_protocol!( + pub struct NSURLSessionDelegate; -pub type NSURLSessionTaskDelegate = NSObject; + unsafe impl NSURLSessionDelegate { + #[optional] + #[method(URLSession:didBecomeInvalidWithError:)] + pub unsafe fn URLSession_didBecomeInvalidWithError( + &self, + session: &NSURLSession, + error: Option<&NSError>, + ); + + #[optional] + #[method(URLSession:didReceiveChallenge:completionHandler:)] + pub unsafe fn URLSession_didReceiveChallenge_completionHandler( + &self, + session: &NSURLSession, + challenge: &NSURLAuthenticationChallenge, + completionHandler: &Block< + (NSURLSessionAuthChallengeDisposition, *mut NSURLCredential), + (), + >, + ); + + #[optional] + #[method(URLSessionDidFinishEventsForBackgroundURLSession:)] + pub unsafe fn URLSessionDidFinishEventsForBackgroundURLSession( + &self, + session: &NSURLSession, + ); + } +); -pub type NSURLSessionDataDelegate = NSObject; +extern_protocol!( + pub struct NSURLSessionTaskDelegate; -pub type NSURLSessionDownloadDelegate = NSObject; + unsafe impl NSURLSessionTaskDelegate { + #[optional] + #[method(URLSession:task:willBeginDelayedRequest:completionHandler:)] + pub unsafe fn URLSession_task_willBeginDelayedRequest_completionHandler( + &self, + session: &NSURLSession, + task: &NSURLSessionTask, + request: &NSURLRequest, + completionHandler: &Block< + (NSURLSessionDelayedRequestDisposition, *mut NSURLRequest), + (), + >, + ); -pub type NSURLSessionStreamDelegate = NSObject; + #[optional] + #[method(URLSession:taskIsWaitingForConnectivity:)] + pub unsafe fn URLSession_taskIsWaitingForConnectivity( + &self, + session: &NSURLSession, + task: &NSURLSessionTask, + ); + + #[optional] + #[method(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:)] + pub unsafe fn URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler( + &self, + session: &NSURLSession, + task: &NSURLSessionTask, + response: &NSHTTPURLResponse, + request: &NSURLRequest, + completionHandler: &Block<(*mut NSURLRequest,), ()>, + ); -pub type NSURLSessionWebSocketDelegate = NSObject; + #[optional] + #[method(URLSession:task:didReceiveChallenge:completionHandler:)] + pub unsafe fn URLSession_task_didReceiveChallenge_completionHandler( + &self, + session: &NSURLSession, + task: &NSURLSessionTask, + challenge: &NSURLAuthenticationChallenge, + completionHandler: &Block< + (NSURLSessionAuthChallengeDisposition, *mut NSURLCredential), + (), + >, + ); + + #[optional] + #[method(URLSession:task:needNewBodyStream:)] + pub unsafe fn URLSession_task_needNewBodyStream( + &self, + session: &NSURLSession, + task: &NSURLSessionTask, + completionHandler: &Block<(*mut NSInputStream,), ()>, + ); + + #[optional] + #[method(URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)] + pub unsafe fn URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend( + &self, + session: &NSURLSession, + task: &NSURLSessionTask, + bytesSent: i64, + totalBytesSent: i64, + totalBytesExpectedToSend: i64, + ); + + #[optional] + #[method(URLSession:task:didFinishCollectingMetrics:)] + pub unsafe fn URLSession_task_didFinishCollectingMetrics( + &self, + session: &NSURLSession, + task: &NSURLSessionTask, + metrics: &NSURLSessionTaskMetrics, + ); + + #[optional] + #[method(URLSession:task:didCompleteWithError:)] + pub unsafe fn URLSession_task_didCompleteWithError( + &self, + session: &NSURLSession, + task: &NSURLSessionTask, + error: Option<&NSError>, + ); + } +); + +extern_protocol!( + pub struct NSURLSessionDataDelegate; + + unsafe impl NSURLSessionDataDelegate { + #[optional] + #[method(URLSession:dataTask:didReceiveResponse:completionHandler:)] + pub unsafe fn URLSession_dataTask_didReceiveResponse_completionHandler( + &self, + session: &NSURLSession, + dataTask: &NSURLSessionDataTask, + response: &NSURLResponse, + completionHandler: &Block<(NSURLSessionResponseDisposition,), ()>, + ); + + #[optional] + #[method(URLSession:dataTask:didBecomeDownloadTask:)] + pub unsafe fn URLSession_dataTask_didBecomeDownloadTask( + &self, + session: &NSURLSession, + dataTask: &NSURLSessionDataTask, + downloadTask: &NSURLSessionDownloadTask, + ); + + #[optional] + #[method(URLSession:dataTask:didBecomeStreamTask:)] + pub unsafe fn URLSession_dataTask_didBecomeStreamTask( + &self, + session: &NSURLSession, + dataTask: &NSURLSessionDataTask, + streamTask: &NSURLSessionStreamTask, + ); + + #[optional] + #[method(URLSession:dataTask:didReceiveData:)] + pub unsafe fn URLSession_dataTask_didReceiveData( + &self, + session: &NSURLSession, + dataTask: &NSURLSessionDataTask, + data: &NSData, + ); + + #[optional] + #[method(URLSession:dataTask:willCacheResponse:completionHandler:)] + pub unsafe fn URLSession_dataTask_willCacheResponse_completionHandler( + &self, + session: &NSURLSession, + dataTask: &NSURLSessionDataTask, + proposedResponse: &NSCachedURLResponse, + completionHandler: &Block<(*mut NSCachedURLResponse,), ()>, + ); + } +); + +extern_protocol!( + pub struct NSURLSessionDownloadDelegate; + + unsafe impl NSURLSessionDownloadDelegate { + #[method(URLSession:downloadTask:didFinishDownloadingToURL:)] + pub unsafe fn URLSession_downloadTask_didFinishDownloadingToURL( + &self, + session: &NSURLSession, + downloadTask: &NSURLSessionDownloadTask, + location: &NSURL, + ); + + #[optional] + #[method(URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)] + pub unsafe fn URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite( + &self, + session: &NSURLSession, + downloadTask: &NSURLSessionDownloadTask, + bytesWritten: i64, + totalBytesWritten: i64, + totalBytesExpectedToWrite: i64, + ); + + #[optional] + #[method(URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:)] + pub unsafe fn URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes( + &self, + session: &NSURLSession, + downloadTask: &NSURLSessionDownloadTask, + fileOffset: i64, + expectedTotalBytes: i64, + ); + } +); + +extern_protocol!( + pub struct NSURLSessionStreamDelegate; + + unsafe impl NSURLSessionStreamDelegate { + #[optional] + #[method(URLSession:readClosedForStreamTask:)] + pub unsafe fn URLSession_readClosedForStreamTask( + &self, + session: &NSURLSession, + streamTask: &NSURLSessionStreamTask, + ); + + #[optional] + #[method(URLSession:writeClosedForStreamTask:)] + pub unsafe fn URLSession_writeClosedForStreamTask( + &self, + session: &NSURLSession, + streamTask: &NSURLSessionStreamTask, + ); + + #[optional] + #[method(URLSession:betterRouteDiscoveredForStreamTask:)] + pub unsafe fn URLSession_betterRouteDiscoveredForStreamTask( + &self, + session: &NSURLSession, + streamTask: &NSURLSessionStreamTask, + ); + + #[optional] + #[method(URLSession:streamTask:didBecomeInputStream:outputStream:)] + pub unsafe fn URLSession_streamTask_didBecomeInputStream_outputStream( + &self, + session: &NSURLSession, + streamTask: &NSURLSessionStreamTask, + inputStream: &NSInputStream, + outputStream: &NSOutputStream, + ); + } +); + +extern_protocol!( + pub struct NSURLSessionWebSocketDelegate; + + unsafe impl NSURLSessionWebSocketDelegate { + #[optional] + #[method(URLSession:webSocketTask:didOpenWithProtocol:)] + pub unsafe fn URLSession_webSocketTask_didOpenWithProtocol( + &self, + session: &NSURLSession, + webSocketTask: &NSURLSessionWebSocketTask, + protocol: Option<&NSString>, + ); + + #[optional] + #[method(URLSession:webSocketTask:didCloseWithCode:reason:)] + pub unsafe fn URLSession_webSocketTask_didCloseWithCode_reason( + &self, + session: &NSURLSession, + webSocketTask: &NSURLSessionWebSocketTask, + closeCode: NSURLSessionWebSocketCloseCode, + reason: Option<&NSData>, + ); + } +); extern_static!(NSURLSessionDownloadTaskResumeData: &'static NSString); diff --git a/crates/icrate/src/generated/Foundation/NSUserActivity.rs b/crates/icrate/src/generated/Foundation/NSUserActivity.rs index 157b1afd3..a6d16a8eb 100644 --- a/crates/icrate/src/generated/Foundation/NSUserActivity.rs +++ b/crates/icrate/src/generated/Foundation/NSUserActivity.rs @@ -163,4 +163,25 @@ extern_methods!( extern_static!(NSUserActivityTypeBrowsingWeb: &'static NSString); -pub type NSUserActivityDelegate = NSObject; +extern_protocol!( + pub struct NSUserActivityDelegate; + + unsafe impl NSUserActivityDelegate { + #[optional] + #[method(userActivityWillSave:)] + pub unsafe fn userActivityWillSave(&self, userActivity: &NSUserActivity); + + #[optional] + #[method(userActivityWasContinued:)] + pub unsafe fn userActivityWasContinued(&self, userActivity: &NSUserActivity); + + #[optional] + #[method(userActivity:didReceiveInputStream:outputStream:)] + pub unsafe fn userActivity_didReceiveInputStream_outputStream( + &self, + userActivity: &NSUserActivity, + inputStream: &NSInputStream, + outputStream: &NSOutputStream, + ); + } +); diff --git a/crates/icrate/src/generated/Foundation/NSUserNotification.rs b/crates/icrate/src/generated/Foundation/NSUserNotification.rs index 26f27c2b7..9fa2a152e 100644 --- a/crates/icrate/src/generated/Foundation/NSUserNotification.rs +++ b/crates/icrate/src/generated/Foundation/NSUserNotification.rs @@ -224,4 +224,32 @@ extern_methods!( } ); -pub type NSUserNotificationCenterDelegate = NSObject; +extern_protocol!( + pub struct NSUserNotificationCenterDelegate; + + unsafe impl NSUserNotificationCenterDelegate { + #[optional] + #[method(userNotificationCenter:didDeliverNotification:)] + pub unsafe fn userNotificationCenter_didDeliverNotification( + &self, + center: &NSUserNotificationCenter, + notification: &NSUserNotification, + ); + + #[optional] + #[method(userNotificationCenter:didActivateNotification:)] + pub unsafe fn userNotificationCenter_didActivateNotification( + &self, + center: &NSUserNotificationCenter, + notification: &NSUserNotification, + ); + + #[optional] + #[method(userNotificationCenter:shouldPresentNotification:)] + pub unsafe fn userNotificationCenter_shouldPresentNotification( + &self, + center: &NSUserNotificationCenter, + notification: &NSUserNotification, + ) -> bool; + } +); diff --git a/crates/icrate/src/generated/Foundation/NSXMLParser.rs b/crates/icrate/src/generated/Foundation/NSXMLParser.rs index 5bcf2cbfc..0b93134c2 100644 --- a/crates/icrate/src/generated/Foundation/NSXMLParser.rs +++ b/crates/icrate/src/generated/Foundation/NSXMLParser.rs @@ -114,7 +114,163 @@ extern_methods!( } ); -pub type NSXMLParserDelegate = NSObject; +extern_protocol!( + pub struct NSXMLParserDelegate; + + unsafe impl NSXMLParserDelegate { + #[optional] + #[method(parserDidStartDocument:)] + pub unsafe fn parserDidStartDocument(&self, parser: &NSXMLParser); + + #[optional] + #[method(parserDidEndDocument:)] + pub unsafe fn parserDidEndDocument(&self, parser: &NSXMLParser); + + #[optional] + #[method(parser:foundNotationDeclarationWithName:publicID:systemID:)] + pub unsafe fn parser_foundNotationDeclarationWithName_publicID_systemID( + &self, + parser: &NSXMLParser, + name: &NSString, + publicID: Option<&NSString>, + systemID: Option<&NSString>, + ); + + #[optional] + #[method(parser:foundUnparsedEntityDeclarationWithName:publicID:systemID:notationName:)] + pub unsafe fn parser_foundUnparsedEntityDeclarationWithName_publicID_systemID_notationName( + &self, + parser: &NSXMLParser, + name: &NSString, + publicID: Option<&NSString>, + systemID: Option<&NSString>, + notationName: Option<&NSString>, + ); + + #[optional] + #[method(parser:foundAttributeDeclarationWithName:forElement:type:defaultValue:)] + pub unsafe fn parser_foundAttributeDeclarationWithName_forElement_type_defaultValue( + &self, + parser: &NSXMLParser, + attributeName: &NSString, + elementName: &NSString, + type_: Option<&NSString>, + defaultValue: Option<&NSString>, + ); + + #[optional] + #[method(parser:foundElementDeclarationWithName:model:)] + pub unsafe fn parser_foundElementDeclarationWithName_model( + &self, + parser: &NSXMLParser, + elementName: &NSString, + model: &NSString, + ); + + #[optional] + #[method(parser:foundInternalEntityDeclarationWithName:value:)] + pub unsafe fn parser_foundInternalEntityDeclarationWithName_value( + &self, + parser: &NSXMLParser, + name: &NSString, + value: Option<&NSString>, + ); + + #[optional] + #[method(parser:foundExternalEntityDeclarationWithName:publicID:systemID:)] + pub unsafe fn parser_foundExternalEntityDeclarationWithName_publicID_systemID( + &self, + parser: &NSXMLParser, + name: &NSString, + publicID: Option<&NSString>, + systemID: Option<&NSString>, + ); + + #[optional] + #[method(parser:didStartElement:namespaceURI:qualifiedName:attributes:)] + pub unsafe fn parser_didStartElement_namespaceURI_qualifiedName_attributes( + &self, + parser: &NSXMLParser, + elementName: &NSString, + namespaceURI: Option<&NSString>, + qName: Option<&NSString>, + attributeDict: &NSDictionary, + ); + + #[optional] + #[method(parser:didEndElement:namespaceURI:qualifiedName:)] + pub unsafe fn parser_didEndElement_namespaceURI_qualifiedName( + &self, + parser: &NSXMLParser, + elementName: &NSString, + namespaceURI: Option<&NSString>, + qName: Option<&NSString>, + ); + + #[optional] + #[method(parser:didStartMappingPrefix:toURI:)] + pub unsafe fn parser_didStartMappingPrefix_toURI( + &self, + parser: &NSXMLParser, + prefix: &NSString, + namespaceURI: &NSString, + ); + + #[optional] + #[method(parser:didEndMappingPrefix:)] + pub unsafe fn parser_didEndMappingPrefix(&self, parser: &NSXMLParser, prefix: &NSString); + + #[optional] + #[method(parser:foundCharacters:)] + pub unsafe fn parser_foundCharacters(&self, parser: &NSXMLParser, string: &NSString); + + #[optional] + #[method(parser:foundIgnorableWhitespace:)] + pub unsafe fn parser_foundIgnorableWhitespace( + &self, + parser: &NSXMLParser, + whitespaceString: &NSString, + ); + + #[optional] + #[method(parser:foundProcessingInstructionWithTarget:data:)] + pub unsafe fn parser_foundProcessingInstructionWithTarget_data( + &self, + parser: &NSXMLParser, + target: &NSString, + data: Option<&NSString>, + ); + + #[optional] + #[method(parser:foundComment:)] + pub unsafe fn parser_foundComment(&self, parser: &NSXMLParser, comment: &NSString); + + #[optional] + #[method(parser:foundCDATA:)] + pub unsafe fn parser_foundCDATA(&self, parser: &NSXMLParser, CDATABlock: &NSData); + + #[optional] + #[method_id(@__retain_semantics Other parser:resolveExternalEntityName:systemID:)] + pub unsafe fn parser_resolveExternalEntityName_systemID( + &self, + parser: &NSXMLParser, + name: &NSString, + systemID: Option<&NSString>, + ) -> Option>; + + #[optional] + #[method(parser:parseErrorOccurred:)] + pub unsafe fn parser_parseErrorOccurred(&self, parser: &NSXMLParser, parseError: &NSError); + + #[optional] + #[method(parser:validationErrorOccurred:)] + pub unsafe fn parser_validationErrorOccurred( + &self, + parser: &NSXMLParser, + validationError: &NSError, + ); + } +); extern_static!(NSXMLParserErrorDomain: &'static NSErrorDomain); diff --git a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs index b38bdde32..6e8fd9f9b 100644 --- a/crates/icrate/src/generated/Foundation/NSXPCConnection.rs +++ b/crates/icrate/src/generated/Foundation/NSXPCConnection.rs @@ -3,7 +3,27 @@ use crate::common::*; use crate::Foundation::*; -pub type NSXPCProxyCreating = NSObject; +extern_protocol!( + pub struct NSXPCProxyCreating; + + unsafe impl NSXPCProxyCreating { + #[method_id(@__retain_semantics Other remoteObjectProxy)] + pub unsafe fn remoteObjectProxy(&self) -> Id; + + #[method_id(@__retain_semantics Other remoteObjectProxyWithErrorHandler:)] + pub unsafe fn remoteObjectProxyWithErrorHandler( + &self, + handler: &Block<(NonNull,), ()>, + ) -> Id; + + #[optional] + #[method_id(@__retain_semantics Other synchronousRemoteObjectProxyWithErrorHandler:)] + pub unsafe fn synchronousRemoteObjectProxyWithErrorHandler( + &self, + handler: &Block<(NonNull,), ()>, + ) -> Id; + } +); ns_options!( #[underlying(NSUInteger)] @@ -156,7 +176,19 @@ extern_methods!( } ); -pub type NSXPCListenerDelegate = NSObject; +extern_protocol!( + pub struct NSXPCListenerDelegate; + + unsafe impl NSXPCListenerDelegate { + #[optional] + #[method(listener:shouldAcceptNewConnection:)] + pub unsafe fn listener_shouldAcceptNewConnection( + &self, + listener: &NSXPCListener, + newConnection: &NSXPCConnection, + ) -> bool; + } +); extern_class!( #[derive(Debug)] diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 395caa0b0..30069c6d5 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -16,6 +16,17 @@ #[cfg(feature = "std")] extern crate std; +macro_rules! extern_protocol { + ( + $v:vis struct $name:ident; + + $($rest:tt)* + ) => { + // TODO + $v type $name = NSObject; + }; +} + macro_rules! extern_struct { ( $v:vis struct $name:ident { From 2080c5edcb8b73bf88ce301d815e9401ae6a9e59 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 4 Nov 2022 02:09:40 +0100 Subject: [PATCH 127/131] Make CoreData compile --- crates/header-translator/Cargo.toml | 2 +- crates/header-translator/src/config.rs | 7 ++++- crates/header-translator/src/stmt.rs | 10 +++++++ .../src/CoreData/translation-config.toml | 29 +++++++++++++++++++ .../NSCoreDataCoreSpotlightDelegate.rs | 21 -------------- .../src/generated/CoreData/NSManagedObject.rs | 3 -- .../CoreData/NSManagedObjectContext.rs | 10 ------- .../src/generated/CoreData/NSMergePolicy.rs | 10 ------- .../CoreData/NSPersistentCloudKitContainer.rs | 24 --------------- .../NSPersistentCloudKitContainerOptions.rs | 6 ---- crates/icrate/src/generated/CoreData/mod.rs | 16 ++++------ 11 files changed, 52 insertions(+), 86 deletions(-) diff --git a/crates/header-translator/Cargo.toml b/crates/header-translator/Cargo.toml index c34771e4c..e768f3e54 100644 --- a/crates/header-translator/Cargo.toml +++ b/crates/header-translator/Cargo.toml @@ -11,4 +11,4 @@ license = "Zlib OR Apache-2.0 OR MIT" 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" } +apple-sdk = { version = "0.2.0", default-features = false } diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index b7c20a5c4..a32f01a76 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -23,6 +23,9 @@ pub struct Config { #[serde(rename = "fn")] #[serde(default)] pub fns: HashMap, + #[serde(rename = "static")] + #[serde(default)] + pub statics: HashMap, #[serde(default)] pub imports: Vec, } @@ -68,7 +71,9 @@ pub struct MethodData { // TODO: mutating } -type FnData = StructData; +// TODO +pub type FnData = StructData; +pub type StaticData = StructData; fn unsafe_default() -> bool { true diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index bc57f0f6f..5f382a467 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -549,6 +549,16 @@ impl Stmt { } EntityKind::VarDecl => { let name = entity.get_name().expect("var decl name"); + + if config + .statics + .get(&name) + .map(|data| data.skipped) + .unwrap_or_default() + { + return None; + } + let ty = entity.get_type().expect("var type"); let ty = Ty::parse_static(ty); let mut value = None; diff --git a/crates/icrate/src/CoreData/translation-config.toml b/crates/icrate/src/CoreData/translation-config.toml index 816a62f38..72e235c2d 100644 --- a/crates/icrate/src/CoreData/translation-config.toml +++ b/crates/icrate/src/CoreData/translation-config.toml @@ -3,3 +3,32 @@ imports = ["CoreData", "Foundation"] # Has `error:` parameter, but returns NSInteger (where 0 means error) [class.NSManagedObjectContext.methods] countForFetchRequest_error = { skipped = true } + +# Defined in multiple files +[static.NSErrorMergePolicy] +skipped = true +[static.NSMergeByPropertyObjectTrumpMergePolicy] +skipped = true +[static.NSMergeByPropertyStoreTrumpMergePolicy] +skipped = true +[static.NSOverwriteMergePolicy] +skipped = true +[static.NSRollbackMergePolicy] +skipped = true + +# Both instance and class methods +[class.NSManagedObject.methods.entity] +skipped = true + +# References classes from other frameworks +[class.NSCoreDataCoreSpotlightDelegate.methods] +attributeSetForObject = { skipped = true } +searchableIndex_reindexAllSearchableItemsWithAcknowledgementHandler = { skipped = true } +searchableIndex_reindexSearchableItemsWithIdentifiers_acknowledgementHandler = { skipped = true } +[class.NSPersistentCloudKitContainer.methods] +recordForManagedObjectID = { skipped = true } +recordsForManagedObjectIDs = { skipped = true } +recordIDForManagedObjectID = { skipped = true } +recordIDsForManagedObjectIDs = { skipped = true } +[class.NSPersistentCloudKitContainerOptions.properties.databaseScope] +skipped = true diff --git a/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs b/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs index 0bdcc20a6..d56370c23 100644 --- a/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs +++ b/crates/icrate/src/generated/CoreData/NSCoreDataCoreSpotlightDelegate.rs @@ -56,26 +56,5 @@ extern_methods!( &self, completionHandler: &Block<(*mut NSError,), ()>, ); - - #[method_id(@__retain_semantics Other attributeSetForObject:)] - pub unsafe fn attributeSetForObject( - &self, - object: &NSManagedObject, - ) -> Option>; - - #[method(searchableIndex:reindexAllSearchableItemsWithAcknowledgementHandler:)] - pub unsafe fn searchableIndex_reindexAllSearchableItemsWithAcknowledgementHandler( - &self, - searchableIndex: &CSSearchableIndex, - acknowledgementHandler: &Block<(), ()>, - ); - - #[method(searchableIndex:reindexSearchableItemsWithIdentifiers:acknowledgementHandler:)] - pub unsafe fn searchableIndex_reindexSearchableItemsWithIdentifiers_acknowledgementHandler( - &self, - searchableIndex: &CSSearchableIndex, - identifiers: &NSArray, - acknowledgementHandler: &Block<(), ()>, - ); } ); diff --git a/crates/icrate/src/generated/CoreData/NSManagedObject.rs b/crates/icrate/src/generated/CoreData/NSManagedObject.rs index 4f92c390f..2cc33af74 100644 --- a/crates/icrate/src/generated/CoreData/NSManagedObject.rs +++ b/crates/icrate/src/generated/CoreData/NSManagedObject.rs @@ -30,9 +30,6 @@ extern_methods!( #[method(contextShouldIgnoreUnmodeledPropertyChanges)] pub unsafe fn contextShouldIgnoreUnmodeledPropertyChanges() -> bool; - #[method_id(@__retain_semantics Other entity)] - pub unsafe fn entity() -> Id; - #[method_id(@__retain_semantics Other fetchRequest)] pub unsafe fn fetchRequest() -> Id; diff --git a/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs b/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs index dfce5f1d6..2e7d1f3b2 100644 --- a/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs +++ b/crates/icrate/src/generated/CoreData/NSManagedObjectContext.rs @@ -38,16 +38,6 @@ extern_static!(NSRefreshedObjectIDsKey: &'static NSString); extern_static!(NSInvalidatedObjectIDsKey: &'static NSString); -extern_static!(NSErrorMergePolicy: &'static Object); - -extern_static!(NSMergeByPropertyStoreTrumpMergePolicy: &'static Object); - -extern_static!(NSMergeByPropertyObjectTrumpMergePolicy: &'static Object); - -extern_static!(NSOverwriteMergePolicy: &'static Object); - -extern_static!(NSRollbackMergePolicy: &'static Object); - ns_enum!( #[underlying(NSUInteger)] pub enum NSManagedObjectContextConcurrencyType { diff --git a/crates/icrate/src/generated/CoreData/NSMergePolicy.rs b/crates/icrate/src/generated/CoreData/NSMergePolicy.rs index 567e6b5ed..3e228063e 100644 --- a/crates/icrate/src/generated/CoreData/NSMergePolicy.rs +++ b/crates/icrate/src/generated/CoreData/NSMergePolicy.rs @@ -4,16 +4,6 @@ use crate::common::*; use crate::CoreData::*; use crate::Foundation::*; -extern_static!(NSErrorMergePolicy: &'static Object); - -extern_static!(NSMergeByPropertyStoreTrumpMergePolicy: &'static Object); - -extern_static!(NSMergeByPropertyObjectTrumpMergePolicy: &'static Object); - -extern_static!(NSOverwriteMergePolicy: &'static Object); - -extern_static!(NSRollbackMergePolicy: &'static Object); - ns_enum!( #[underlying(NSUInteger)] pub enum NSMergePolicyType { diff --git a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs index b37c59b97..41ece3901 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainer.rs @@ -30,30 +30,6 @@ extern_methods!( options: NSPersistentCloudKitContainerSchemaInitializationOptions, ) -> Result<(), Id>; - #[method_id(@__retain_semantics Other recordForManagedObjectID:)] - pub unsafe fn recordForManagedObjectID( - &self, - managedObjectID: &NSManagedObjectID, - ) -> Option>; - - #[method_id(@__retain_semantics Other recordsForManagedObjectIDs:)] - pub unsafe fn recordsForManagedObjectIDs( - &self, - managedObjectIDs: &NSArray, - ) -> Id, Shared>; - - #[method_id(@__retain_semantics Other recordIDForManagedObjectID:)] - pub unsafe fn recordIDForManagedObjectID( - &self, - managedObjectID: &NSManagedObjectID, - ) -> Option>; - - #[method_id(@__retain_semantics Other recordIDsForManagedObjectIDs:)] - pub unsafe fn recordIDsForManagedObjectIDs( - &self, - managedObjectIDs: &NSArray, - ) -> Id, Shared>; - #[method(canUpdateRecordForManagedObjectWithID:)] pub unsafe fn canUpdateRecordForManagedObjectWithID( &self, diff --git a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerOptions.rs b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerOptions.rs index 224e108fa..78f2d5a68 100644 --- a/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerOptions.rs +++ b/crates/icrate/src/generated/CoreData/NSPersistentCloudKitContainerOptions.rs @@ -18,12 +18,6 @@ extern_methods!( #[method_id(@__retain_semantics Other containerIdentifier)] pub unsafe fn containerIdentifier(&self) -> Id; - #[method(databaseScope)] - pub unsafe fn databaseScope(&self) -> CKDatabaseScope; - - #[method(setDatabaseScope:)] - pub unsafe fn setDatabaseScope(&self, databaseScope: CKDatabaseScope); - #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; diff --git a/crates/icrate/src/generated/CoreData/mod.rs b/crates/icrate/src/generated/CoreData/mod.rs index ac0f1dca6..33638b61b 100644 --- a/crates/icrate/src/generated/CoreData/mod.rs +++ b/crates/icrate/src/generated/CoreData/mod.rs @@ -176,27 +176,23 @@ pub use self::__NSManagedObject::{ NSSnapshotEventUndoUpdate, }; pub use self::__NSManagedObjectContext::{ - NSConfinementConcurrencyType, NSDeletedObjectIDsKey, NSDeletedObjectsKey, NSErrorMergePolicy, + NSConfinementConcurrencyType, NSDeletedObjectIDsKey, NSDeletedObjectsKey, NSInsertedObjectIDsKey, NSInsertedObjectsKey, NSInvalidatedAllObjectsKey, NSInvalidatedObjectIDsKey, NSInvalidatedObjectsKey, NSMainQueueConcurrencyType, NSManagedObjectContext, NSManagedObjectContextConcurrencyType, NSManagedObjectContextDidMergeChangesObjectIDsNotification, NSManagedObjectContextDidSaveNotification, NSManagedObjectContextDidSaveObjectIDsNotification, NSManagedObjectContextObjectsDidChangeNotification, NSManagedObjectContextQueryGenerationKey, - NSManagedObjectContextWillSaveNotification, NSMergeByPropertyObjectTrumpMergePolicy, - NSMergeByPropertyStoreTrumpMergePolicy, NSOverwriteMergePolicy, NSPrivateQueueConcurrencyType, - NSRefreshedObjectIDsKey, NSRefreshedObjectsKey, NSRollbackMergePolicy, NSUpdatedObjectIDsKey, - NSUpdatedObjectsKey, + NSManagedObjectContextWillSaveNotification, NSPrivateQueueConcurrencyType, + NSRefreshedObjectIDsKey, NSRefreshedObjectsKey, NSUpdatedObjectIDsKey, NSUpdatedObjectsKey, }; pub use self::__NSManagedObjectID::NSManagedObjectID; pub use self::__NSManagedObjectModel::NSManagedObjectModel; pub use self::__NSMappingModel::NSMappingModel; pub use self::__NSMergePolicy::{ - NSConstraintConflict, NSErrorMergePolicy, NSErrorMergePolicyType, - NSMergeByPropertyObjectTrumpMergePolicy, NSMergeByPropertyObjectTrumpMergePolicyType, - NSMergeByPropertyStoreTrumpMergePolicy, NSMergeByPropertyStoreTrumpMergePolicyType, - NSMergeConflict, NSMergePolicy, NSMergePolicyType, NSOverwriteMergePolicy, - NSOverwriteMergePolicyType, NSRollbackMergePolicy, NSRollbackMergePolicyType, + NSConstraintConflict, NSErrorMergePolicyType, NSMergeByPropertyObjectTrumpMergePolicyType, + NSMergeByPropertyStoreTrumpMergePolicyType, NSMergeConflict, NSMergePolicy, NSMergePolicyType, + NSOverwriteMergePolicyType, NSRollbackMergePolicyType, }; pub use self::__NSMigrationManager::NSMigrationManager; pub use self::__NSPersistentCloudKitContainer::{ From baff1985f81f6a7c790f8d6703785d01e2b43727 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 4 Nov 2022 03:26:21 +0100 Subject: [PATCH 128/131] Make AppKit compile --- crates/header-translator/src/config.rs | 4 + crates/header-translator/src/stmt.rs | 9 + .../icrate/src/AppKit/translation-config.toml | 132 ++++++++++ .../generated/AppKit/NSAnimationContext.rs | 6 - .../src/generated/AppKit/NSBezierPath.rs | 11 - .../src/generated/AppKit/NSBitmapImageRep.rs | 15 -- .../src/generated/AppKit/NSCIImageRep.rs | 54 ---- crates/icrate/src/generated/AppKit/NSColor.rs | 22 +- .../src/generated/AppKit/NSColorSpace.rs | 9 - .../generated/AppKit/NSDiffableDataSource.rs | 16 -- crates/icrate/src/generated/AppKit/NSEvent.rs | 6 - crates/icrate/src/generated/AppKit/NSFont.rs | 22 -- .../src/generated/AppKit/NSGlyphInfo.rs | 10 - .../src/generated/AppKit/NSGraphicsContext.rs | 14 +- crates/icrate/src/generated/AppKit/NSImage.rs | 21 -- .../icrate/src/generated/AppKit/NSImageRep.rs | 8 - .../src/generated/AppKit/NSLayoutManager.rs | 62 ----- crates/icrate/src/generated/AppKit/NSMovie.rs | 9 - .../icrate/src/generated/AppKit/NSOpenGL.rs | 243 ------------------ .../src/generated/AppKit/NSOpenGLLayer.rs | 61 ----- .../src/generated/AppKit/NSOpenGLView.rs | 65 ----- crates/icrate/src/generated/AppKit/NSPanel.rs | 2 - .../generated/AppKit/NSRunningApplication.rs | 8 - .../src/generated/AppKit/NSSavePanel.rs | 8 - .../src/generated/AppKit/NSSharingService.rs | 18 +- .../generated/AppKit/NSTextLayoutFragment.rs | 3 - .../generated/AppKit/NSTextLineFragment.rs | 3 - .../icrate/src/generated/AppKit/NSTextView.rs | 6 - crates/icrate/src/generated/AppKit/NSView.rs | 37 +-- .../src/generated/AppKit/NSWorkspace.rs | 29 --- crates/icrate/src/generated/AppKit/mod.rs | 36 ++- crates/icrate/src/lib.rs | 14 + 32 files changed, 178 insertions(+), 785 deletions(-) diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index a32f01a76..6c109101c 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -26,6 +26,9 @@ pub struct Config { #[serde(rename = "static")] #[serde(default)] pub statics: HashMap, + #[serde(rename = "typedef")] + #[serde(default)] + pub typedef_data: HashMap, #[serde(default)] pub imports: Vec, } @@ -74,6 +77,7 @@ pub struct MethodData { // TODO pub type FnData = StructData; pub type StaticData = StructData; +pub type TypedefData = StructData; fn unsafe_default() -> bool { true diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 5f382a467..51b1d3678 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -441,6 +441,15 @@ impl Stmt { return None; } + if config + .typedef_data + .get(&name) + .map(|data| data.skipped) + .unwrap_or_default() + { + return None; + } + let ty = entity .get_typedef_underlying_type() .expect("typedef underlying type"); diff --git a/crates/icrate/src/AppKit/translation-config.toml b/crates/icrate/src/AppKit/translation-config.toml index 437cde9d2..d457a9139 100644 --- a/crates/icrate/src/AppKit/translation-config.toml +++ b/crates/icrate/src/AppKit/translation-config.toml @@ -10,6 +10,12 @@ skipped = true [class.NSDocument.methods.setDisplayName] skipped = true +# Typedef that uses a generic from a class +[typedef.NSCollectionViewDiffableDataSourceItemProvider] +skipped = true +[class.NSCollectionViewDiffableDataSource.methods.initWithCollectionView_itemProvider] +skipped = true + # Both protocols and classes [protocol.NSTextAttachmentCell] skipped = true @@ -43,3 +49,129 @@ skipped = true skipped = true [class.NSBundle.methods.loadNibFile_externalNameTable_withZone] skipped = true + +# Uses stuff from different frameworks / system libraries +[class.NSAnimationContext.properties.timingFunction] +skipped = true +[class.NSBezierPath.methods.appendBezierPathWithCGGlyph_inFont] +skipped = true +[class.NSBezierPath.methods.appendBezierPathWithCGGlyphs_count_inFont] +skipped = true +[class.NSBitmapImageRep.methods.initWithCGImage] +skipped = true +[class.NSBitmapImageRep.methods.initWithCIImage] +skipped = true +[class.NSBitmapImageRep.properties.CGImage] +skipped = true +[class.NSColor.properties.CGColor] +skipped = true +[class.NSColor.methods.colorWithCGColor] +skipped = true +[class.NSColor.methods.colorWithCIColor] +skipped = true +[class.NSColorSpace.methods.initWithCGColorSpace] +skipped = true +[class.NSColorSpace.properties.CGColorSpace] +skipped = true +[class.NSCIImageRep] +skipped = true +[class.NSEvent.properties.CGEvent] +skipped = true +[class.NSEvent.methods.eventWithCGEvent] +skipped = true +[class.NSFont.methods] +boundingRectForCGGlyph = { skipped = true } +advancementForCGGlyph = { skipped = true } +getBoundingRects_forCGGlyphs_count = { skipped = true } +getAdvancements_forCGGlyphs_count = { skipped = true } +[class.NSGlyphInfo.methods.glyphInfoWithCGGlyph_forFont_baseString] +skipped = true +[class.NSGlyphInfo.properties.glyphID] +skipped = true +[class.NSGraphicsContext.methods.graphicsContextWithCGContext_flipped] +skipped = true +[class.NSGraphicsContext.properties.CGContext] +skipped = true +[class.NSGraphicsContext.properties.CIContext] +skipped = true +[class.NSImage.methods] +initWithCGImage_size = { skipped = true } +CGImageForProposedRect_context_hints = { skipped = true } +initWithIconRef = { skipped = true } +[class.NSImageRep.methods.CGImageForProposedRect_context_hints] +skipped = true +[class.NSItemProvider.methods.registerCloudKitShareWithPreparationHandler] +skipped = true +[class.NSItemProvider.methods.registerCloudKitShare_container] +skipped = true +[class.NSLayoutManager.methods] +setGlyphs_properties_characterIndexes_font_forGlyphRange = { skipped = true } +CGGlyphAtIndex_isValidIndex = { skipped = true } +CGGlyphAtIndex = { skipped = true } +getGlyphsInRange_glyphs_properties_characterIndexes_bidiLevels = { skipped = true } +glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph = { skipped = true } +showCGGlyphs_positions_count_font_textMatrix_attributes_inContext = { skipped = true } +showCGGlyphs_positions_count_font_matrix_attributes_inContext = { skipped = true } +[class.NSLayoutManagerDelegate.methods.layoutManager_shouldGenerateGlyphs_properties_characterIndexes_font_forGlyphRange] +skipped = true +[class.NSMovie.methods.initWithMovie] +skipped = true +[class.NSMovie.methods.QTMovie] +skipped = true +[class.NSOpenGLContext] +skipped = true +[class.NSOpenGLLayer] +skipped = true +[class.NSOpenGLPixelFormat] +skipped = true +[class.NSOpenGLPixelBuffer] +skipped = true +[class.NSOpenGLView] +skipped = true +[fn.NSOpenGLSetOption] +skipped = true +[fn.NSOpenGLGetOption] +skipped = true +[fn.NSOpenGLGetVersion] +skipped = true +[class.NSTextLayoutFragment.methods.drawAtPoint_inContext] +skipped = true +[class.NSTextLineFragment.methods.drawAtPoint_inContext] +skipped = true +[class.NSTextView.methods.quickLookPreviewableItemsInRanges] +skipped = true +[class.NSRunningApplication.properties.processIdentifier] +skipped = true +[class.NSRunningApplication.methods.runningApplicationWithProcessIdentifier] +skipped = true +[class.NSSavePanel.properties.allowedContentTypes] +skipped = true +[class.NSView.properties] +layer = { skipped = true } +backgroundFilters = { skipped = true } +compositingFilter = { skipped = true } +contentFilters = { skipped = true } +[class.NSView.methods] +makeBackingLayer = { skipped = true } +[class.NSObject.methods] +layer_shouldInheritContentsScale_fromWindow = { skipped = true } +[class.NSWorkspace.methods] +iconForContentType = { skipped = true } +URLForApplicationToOpenContentType = { skipped = true } +URLsForApplicationsToOpenContentType = { skipped = true } +setDefaultApplicationAtURL_toOpenContentType_completionHandler = { skipped = true } +[class.NSWorkspaceOpenConfiguration.properties.architecture] +skipped = true + +# Wrong type for enum +[enum.anonymous.constants] +NSOKButton = { skipped = true } +NSCancelButton = { skipped = true } +NSFileHandlingPanelCancelButton = { skipped = true } +NSFileHandlingPanelOKButton = { skipped = true } + +# Categories for classes defined in other frameworks +[class.CIImage] +skipped = true +[class.CIColor] +skipped = true diff --git a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs index 4e2aa8590..61616be31 100644 --- a/crates/icrate/src/generated/AppKit/NSAnimationContext.rs +++ b/crates/icrate/src/generated/AppKit/NSAnimationContext.rs @@ -40,12 +40,6 @@ extern_methods!( #[method(setDuration:)] pub unsafe fn setDuration(&self, duration: NSTimeInterval); - #[method_id(@__retain_semantics Other timingFunction)] - pub unsafe fn timingFunction(&self) -> Option>; - - #[method(setTimingFunction:)] - pub unsafe fn setTimingFunction(&self, timingFunction: Option<&CAMediaTimingFunction>); - #[method(completionHandler)] pub unsafe fn completionHandler(&self) -> *mut Block<(), ()>; diff --git a/crates/icrate/src/generated/AppKit/NSBezierPath.rs b/crates/icrate/src/generated/AppKit/NSBezierPath.rs index 768c87062..e3c3009da 100644 --- a/crates/icrate/src/generated/AppKit/NSBezierPath.rs +++ b/crates/icrate/src/generated/AppKit/NSBezierPath.rs @@ -297,17 +297,6 @@ extern_methods!( radius: CGFloat, ); - #[method(appendBezierPathWithCGGlyph:inFont:)] - pub unsafe fn appendBezierPathWithCGGlyph_inFont(&self, glyph: CGGlyph, font: &NSFont); - - #[method(appendBezierPathWithCGGlyphs:count:inFont:)] - pub unsafe fn appendBezierPathWithCGGlyphs_count_inFont( - &self, - glyphs: NonNull, - count: NSInteger, - font: &NSFont, - ); - #[method(appendBezierPathWithRoundedRect:xRadius:yRadius:)] pub unsafe fn appendBezierPathWithRoundedRect_xRadius_yRadius( &self, diff --git a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs index 261acc077..d25834cc2 100644 --- a/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSBitmapImageRep.rs @@ -136,18 +136,6 @@ extern_methods!( pBits: NSInteger, ) -> Option>; - #[method_id(@__retain_semantics Init initWithCGImage:)] - pub unsafe fn initWithCGImage( - this: Option>, - cgImage: CGImageRef, - ) -> Id; - - #[method_id(@__retain_semantics Init initWithCIImage:)] - pub unsafe fn initWithCIImage( - this: Option>, - ciImage: &CIImage, - ) -> Id; - #[method_id(@__retain_semantics Other imageRepsWithData:)] pub unsafe fn imageRepsWithData(data: &NSData) -> Id, Shared>; @@ -264,9 +252,6 @@ extern_methods!( #[method(setPixel:atX:y:)] pub unsafe fn setPixel_atX_y(&self, p: NonNull, x: NSInteger, y: NSInteger); - #[method(CGImage)] - pub unsafe fn CGImage(&self) -> CGImageRef; - #[method_id(@__retain_semantics Other colorSpace)] pub unsafe fn colorSpace(&self) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs index 454ce50e7..661a20881 100644 --- a/crates/icrate/src/generated/AppKit/NSCIImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSCIImageRep.rs @@ -4,57 +4,3 @@ use crate::common::*; use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; - -extern_class!( - #[derive(Debug)] - pub struct NSCIImageRep; - - unsafe impl ClassType for NSCIImageRep { - type Super = NSImageRep; - } -); - -extern_methods!( - unsafe impl NSCIImageRep { - #[method_id(@__retain_semantics Other imageRepWithCIImage:)] - pub unsafe fn imageRepWithCIImage(image: &CIImage) -> Id; - - #[method_id(@__retain_semantics Init initWithCIImage:)] - pub unsafe fn initWithCIImage( - this: Option>, - image: &CIImage, - ) -> Id; - - #[method_id(@__retain_semantics Other CIImage)] - pub unsafe fn CIImage(&self) -> Id; - } -); - -extern_methods!( - /// NSAppKitAdditions - unsafe impl CIImage { - #[method_id(@__retain_semantics Init initWithBitmapImageRep:)] - pub unsafe fn initWithBitmapImageRep( - this: Option>, - bitmapImageRep: &NSBitmapImageRep, - ) -> Option>; - - #[method(drawInRect:fromRect:operation:fraction:)] - pub unsafe fn drawInRect_fromRect_operation_fraction( - &self, - rect: NSRect, - fromRect: NSRect, - op: NSCompositingOperation, - delta: CGFloat, - ); - - #[method(drawAtPoint:fromRect:operation:fraction:)] - pub unsafe fn drawAtPoint_fromRect_operation_fraction( - &self, - point: NSPoint, - fromRect: NSRect, - op: NSCompositingOperation, - delta: CGFloat, - ); - } -); diff --git a/crates/icrate/src/generated/AppKit/NSColor.rs b/crates/icrate/src/generated/AppKit/NSColor.rs index d6538cbce..afe99195c 100644 --- a/crates/icrate/src/generated/AppKit/NSColor.rs +++ b/crates/icrate/src/generated/AppKit/NSColor.rs @@ -520,12 +520,6 @@ extern_methods!( #[method(drawSwatchInRect:)] pub unsafe fn drawSwatchInRect(&self, rect: NSRect); - #[method_id(@__retain_semantics Other colorWithCGColor:)] - pub unsafe fn colorWithCGColor(cgColor: CGColorRef) -> Option>; - - #[method(CGColor)] - pub unsafe fn CGColor(&self) -> CGColorRef; - #[method(ignoresAlpha)] pub unsafe fn ignoresAlpha() -> bool; @@ -596,21 +590,7 @@ extern_methods!( extern_methods!( /// NSQuartzCoreAdditions - unsafe impl NSColor { - #[method_id(@__retain_semantics Other colorWithCIColor:)] - pub unsafe fn colorWithCIColor(color: &CIColor) -> Id; - } -); - -extern_methods!( - /// NSAppKitAdditions - unsafe impl CIColor { - #[method_id(@__retain_semantics Init initWithColor:)] - pub unsafe fn initWithColor( - this: Option>, - color: &NSColor, - ) -> Option>; - } + unsafe impl NSColor {} ); extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSColorSpace.rs b/crates/icrate/src/generated/AppKit/NSColorSpace.rs index 0ae0523da..9b481e5ee 100644 --- a/crates/icrate/src/generated/AppKit/NSColorSpace.rs +++ b/crates/icrate/src/generated/AppKit/NSColorSpace.rs @@ -48,15 +48,6 @@ extern_methods!( #[method(colorSyncProfile)] pub unsafe fn colorSyncProfile(&self) -> *mut c_void; - #[method_id(@__retain_semantics Init initWithCGColorSpace:)] - pub unsafe fn initWithCGColorSpace( - this: Option>, - cgColorSpace: CGColorSpaceRef, - ) -> Option>; - - #[method(CGColorSpace)] - pub unsafe fn CGColorSpace(&self) -> CGColorSpaceRef; - #[method(numberOfColorComponents)] pub unsafe fn numberOfColorComponents(&self) -> NSInteger; diff --git a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs index fd585bfc9..58e6d5f48 100644 --- a/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs +++ b/crates/icrate/src/generated/AppKit/NSDiffableDataSource.rs @@ -160,15 +160,6 @@ extern_methods!( } ); -pub type NSCollectionViewDiffableDataSourceItemProvider = *mut Block< - ( - NonNull, - NonNull, - NonNull, - ), - *mut NSCollectionViewItem, ->; - pub type NSCollectionViewDiffableDataSourceSupplementaryViewProvider = *mut Block< ( NonNull, @@ -199,13 +190,6 @@ extern_methods!( unsafe impl NSCollectionViewDiffableDataSource { - #[method_id(@__retain_semantics Init initWithCollectionView:itemProvider:)] - pub unsafe fn initWithCollectionView_itemProvider( - this: Option>, - collectionView: &NSCollectionView, - itemProvider: NSCollectionViewDiffableDataSourceItemProvider, - ) -> Id; - #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSEvent.rs b/crates/icrate/src/generated/AppKit/NSEvent.rs index d718d9d32..c57a7113a 100644 --- a/crates/icrate/src/generated/AppKit/NSEvent.rs +++ b/crates/icrate/src/generated/AppKit/NSEvent.rs @@ -444,12 +444,6 @@ extern_methods!( #[method_id(@__retain_semantics Other eventWithEventRef:)] pub unsafe fn eventWithEventRef(eventRef: NonNull) -> Option>; - #[method(CGEvent)] - pub unsafe fn CGEvent(&self) -> CGEventRef; - - #[method_id(@__retain_semantics Other eventWithCGEvent:)] - pub unsafe fn eventWithCGEvent(cgEvent: CGEventRef) -> Option>; - #[method(isMouseCoalescingEnabled)] pub unsafe fn isMouseCoalescingEnabled() -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSFont.rs b/crates/icrate/src/generated/AppKit/NSFont.rs index 518013557..781793478 100644 --- a/crates/icrate/src/generated/AppKit/NSFont.rs +++ b/crates/icrate/src/generated/AppKit/NSFont.rs @@ -180,28 +180,6 @@ extern_methods!( #[method(isFixedPitch)] pub unsafe fn isFixedPitch(&self) -> bool; - #[method(boundingRectForCGGlyph:)] - pub unsafe fn boundingRectForCGGlyph(&self, glyph: CGGlyph) -> NSRect; - - #[method(advancementForCGGlyph:)] - pub unsafe fn advancementForCGGlyph(&self, glyph: CGGlyph) -> NSSize; - - #[method(getBoundingRects:forCGGlyphs:count:)] - pub unsafe fn getBoundingRects_forCGGlyphs_count( - &self, - bounds: NSRectArray, - glyphs: NonNull, - glyphCount: NSUInteger, - ); - - #[method(getAdvancements:forCGGlyphs:count:)] - pub unsafe fn getAdvancements_forCGGlyphs_count( - &self, - advancements: NSSizeArray, - glyphs: NonNull, - glyphCount: NSUInteger, - ); - #[method(set)] pub unsafe fn set(&self); diff --git a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs index b2754505c..336f5cf28 100644 --- a/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs +++ b/crates/icrate/src/generated/AppKit/NSGlyphInfo.rs @@ -16,16 +16,6 @@ extern_class!( extern_methods!( unsafe impl NSGlyphInfo { - #[method_id(@__retain_semantics Other glyphInfoWithCGGlyph:forFont:baseString:)] - pub unsafe fn glyphInfoWithCGGlyph_forFont_baseString( - glyph: CGGlyph, - font: &NSFont, - string: &NSString, - ) -> Option>; - - #[method(glyphID)] - pub unsafe fn glyphID(&self) -> CGGlyph; - #[method_id(@__retain_semantics Other baseString)] pub unsafe fn baseString(&self) -> Id; } diff --git a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs index b951af41e..c442b204a 100644 --- a/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs +++ b/crates/icrate/src/generated/AppKit/NSGraphicsContext.rs @@ -55,12 +55,6 @@ extern_methods!( bitmapRep: &NSBitmapImageRep, ) -> Option>; - #[method_id(@__retain_semantics Other graphicsContextWithCGContext:flipped:)] - pub unsafe fn graphicsContextWithCGContext_flipped( - graphicsPort: CGContextRef, - initialFlippedState: bool, - ) -> Id; - #[method_id(@__retain_semantics Other currentContext)] pub unsafe fn currentContext() -> Option>; @@ -81,9 +75,6 @@ extern_methods!( #[method(flushGraphics)] pub unsafe fn flushGraphics(&self); - #[method(CGContext)] - pub unsafe fn CGContext(&self) -> CGContextRef; - #[method(isFlipped)] pub unsafe fn isFlipped(&self) -> bool; } @@ -126,10 +117,7 @@ extern_methods!( extern_methods!( /// NSQuartzCoreAdditions - unsafe impl NSGraphicsContext { - #[method_id(@__retain_semantics Other CIContext)] - pub unsafe fn CIContext(&self) -> Option>; - } + unsafe impl NSGraphicsContext {} ); extern_methods!( diff --git a/crates/icrate/src/generated/AppKit/NSImage.rs b/crates/icrate/src/generated/AppKit/NSImage.rs index 86141ddbc..6abe46015 100644 --- a/crates/icrate/src/generated/AppKit/NSImage.rs +++ b/crates/icrate/src/generated/AppKit/NSImage.rs @@ -281,21 +281,6 @@ extern_methods!( accessibilityDescription: Option<&NSString>, ); - #[method_id(@__retain_semantics Init initWithCGImage:size:)] - pub unsafe fn initWithCGImage_size( - this: Option>, - cgImage: CGImageRef, - size: NSSize, - ) -> Id; - - #[method(CGImageForProposedRect:context:hints:)] - pub unsafe fn CGImageForProposedRect_context_hints( - &self, - proposedDestRect: *mut NSRect, - referenceContext: Option<&NSGraphicsContext>, - hints: Option<&NSDictionary>, - ) -> CGImageRef; - #[method_id(@__retain_semantics Other bestRepresentationForRect:context:hints:)] pub unsafe fn bestRepresentationForRect_context_hints( &self, @@ -430,12 +415,6 @@ extern_methods!( #[method_id(@__retain_semantics Other imagePasteboardTypes)] pub unsafe fn imagePasteboardTypes() -> Id, Shared>; - #[method_id(@__retain_semantics Init initWithIconRef:)] - pub unsafe fn initWithIconRef( - this: Option>, - iconRef: IconRef, - ) -> Id; - #[method(setFlipped:)] pub unsafe fn setFlipped(&self, flag: bool); diff --git a/crates/icrate/src/generated/AppKit/NSImageRep.rs b/crates/icrate/src/generated/AppKit/NSImageRep.rs index 1be8e9f9e..2bce2abad 100644 --- a/crates/icrate/src/generated/AppKit/NSImageRep.rs +++ b/crates/icrate/src/generated/AppKit/NSImageRep.rs @@ -185,14 +185,6 @@ extern_methods!( pub unsafe fn imageRepWithPasteboard( pasteboard: &NSPasteboard, ) -> Option>; - - #[method(CGImageForProposedRect:context:hints:)] - pub unsafe fn CGImageForProposedRect_context_hints( - &self, - proposedDestRect: *mut NSRect, - context: Option<&NSGraphicsContext>, - hints: Option<&NSDictionary>, - ) -> CGImageRef; } ); diff --git a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs index bd6ba0595..e32802d43 100644 --- a/crates/icrate/src/generated/AppKit/NSLayoutManager.rs +++ b/crates/icrate/src/generated/AppKit/NSLayoutManager.rs @@ -232,29 +232,9 @@ extern_methods!( container: &NSTextContainer, ); - #[method(setGlyphs:properties:characterIndexes:font:forGlyphRange:)] - pub unsafe fn setGlyphs_properties_characterIndexes_font_forGlyphRange( - &self, - glyphs: NonNull, - props: NonNull, - charIndexes: NonNull, - aFont: &NSFont, - glyphRange: NSRange, - ); - #[method(numberOfGlyphs)] pub unsafe fn numberOfGlyphs(&self) -> NSUInteger; - #[method(CGGlyphAtIndex:isValidIndex:)] - pub unsafe fn CGGlyphAtIndex_isValidIndex( - &self, - glyphIndex: NSUInteger, - isValidIndex: *mut Bool, - ) -> CGGlyph; - - #[method(CGGlyphAtIndex:)] - pub unsafe fn CGGlyphAtIndex(&self, glyphIndex: NSUInteger) -> CGGlyph; - #[method(isValidGlyphIndex:)] pub unsafe fn isValidGlyphIndex(&self, glyphIndex: NSUInteger) -> bool; @@ -267,16 +247,6 @@ extern_methods!( #[method(glyphIndexForCharacterAtIndex:)] pub unsafe fn glyphIndexForCharacterAtIndex(&self, charIndex: NSUInteger) -> NSUInteger; - #[method(getGlyphsInRange:glyphs:properties:characterIndexes:bidiLevels:)] - pub unsafe fn getGlyphsInRange_glyphs_properties_characterIndexes_bidiLevels( - &self, - glyphRange: NSRange, - glyphBuffer: *mut CGGlyph, - props: *mut NSGlyphProperty, - charIndexBuffer: *mut NSUInteger, - bidiLevelBuffer: *mut c_uchar, - ) -> NSUInteger; - #[method(setTextContainer:forGlyphRange:)] pub unsafe fn setTextContainer_forGlyphRange( &self, @@ -463,14 +433,6 @@ extern_methods!( container: &NSTextContainer, ) -> NSRange; - #[method(glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:)] - pub unsafe fn glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph( - &self, - point: NSPoint, - container: &NSTextContainer, - partialFraction: *mut CGFloat, - ) -> NSUInteger; - #[method(glyphIndexForPoint:inTextContainer:)] pub unsafe fn glyphIndexForPoint_inTextContainer( &self, @@ -542,18 +504,6 @@ extern_methods!( origin: NSPoint, ); - #[method(showCGGlyphs:positions:count:font:textMatrix:attributes:inContext:)] - pub unsafe fn showCGGlyphs_positions_count_font_textMatrix_attributes_inContext( - &self, - glyphs: NonNull, - positions: NonNull, - glyphCount: NSInteger, - font: &NSFont, - textMatrix: CGAffineTransform, - attributes: &NSDictionary, - CGContext: CGContextRef, - ); - #[method(fillBackgroundRectArray:count:forCharacterRange:color:)] pub unsafe fn fillBackgroundRectArray_count_forCharacterRange_color( &self, @@ -1066,18 +1016,6 @@ extern_methods!( printingAdjustment: NSSize, ); - #[method(showCGGlyphs:positions:count:font:matrix:attributes:inContext:)] - pub unsafe fn showCGGlyphs_positions_count_font_matrix_attributes_inContext( - &self, - glyphs: NonNull, - positions: NonNull, - glyphCount: NSUInteger, - font: &NSFont, - textMatrix: &NSAffineTransform, - attributes: &NSDictionary, - graphicsContext: &NSGraphicsContext, - ); - #[method(hyphenationFactor)] pub unsafe fn hyphenationFactor(&self) -> c_float; diff --git a/crates/icrate/src/generated/AppKit/NSMovie.rs b/crates/icrate/src/generated/AppKit/NSMovie.rs index d921d91d7..6a36b9cf2 100644 --- a/crates/icrate/src/generated/AppKit/NSMovie.rs +++ b/crates/icrate/src/generated/AppKit/NSMovie.rs @@ -24,14 +24,5 @@ extern_methods!( #[method_id(@__retain_semantics Init init)] pub unsafe fn init(this: Option>) -> Option>; - - #[method_id(@__retain_semantics Init initWithMovie:)] - pub unsafe fn initWithMovie( - this: Option>, - movie: &QTMovie, - ) -> Option>; - - #[method_id(@__retain_semantics Other QTMovie)] - pub unsafe fn QTMovie(&self) -> Option>; } ); diff --git a/crates/icrate/src/generated/AppKit/NSOpenGL.rs b/crates/icrate/src/generated/AppKit/NSOpenGL.rs index 6eaed9a50..cc4cf402a 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGL.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGL.rs @@ -16,18 +16,6 @@ ns_enum!( } ); -extern_fn!( - pub unsafe fn NSOpenGLSetOption(pname: NSOpenGLGlobalOption, param: GLint); -); - -extern_fn!( - pub unsafe fn NSOpenGLGetOption(pname: NSOpenGLGlobalOption, param: NonNull); -); - -extern_fn!( - pub unsafe fn NSOpenGLGetVersion(major: *mut GLint, minor: *mut GLint); -); - extern_enum!( #[underlying(c_uint)] pub enum { @@ -84,104 +72,6 @@ extern_enum!( } ); -extern_class!( - #[derive(Debug)] - pub struct NSOpenGLPixelFormat; - - unsafe impl ClassType for NSOpenGLPixelFormat { - type Super = NSObject; - } -); - -extern_methods!( - unsafe impl NSOpenGLPixelFormat { - #[method_id(@__retain_semantics Init initWithCGLPixelFormatObj:)] - pub unsafe fn initWithCGLPixelFormatObj( - this: Option>, - format: CGLPixelFormatObj, - ) -> Option>; - - #[method_id(@__retain_semantics Init initWithAttributes:)] - pub unsafe fn initWithAttributes( - this: Option>, - attribs: NonNull, - ) -> Option>; - - #[method_id(@__retain_semantics Init initWithData:)] - pub unsafe fn initWithData( - this: Option>, - attribs: Option<&NSData>, - ) -> Option>; - - #[method_id(@__retain_semantics Other attributes)] - pub unsafe fn attributes(&self) -> Option>; - - #[method(setAttributes:)] - pub unsafe fn setAttributes(&self, attribs: Option<&NSData>); - - #[method(getValues:forAttribute:forVirtualScreen:)] - pub unsafe fn getValues_forAttribute_forVirtualScreen( - &self, - vals: NonNull, - attrib: NSOpenGLPixelFormatAttribute, - screen: GLint, - ); - - #[method(numberOfVirtualScreens)] - pub unsafe fn numberOfVirtualScreens(&self) -> GLint; - - #[method(CGLPixelFormatObj)] - pub unsafe fn CGLPixelFormatObj(&self) -> CGLPixelFormatObj; - } -); - -extern_class!( - #[derive(Debug)] - pub struct NSOpenGLPixelBuffer; - - unsafe impl ClassType for NSOpenGLPixelBuffer { - type Super = NSObject; - } -); - -extern_methods!( - unsafe impl NSOpenGLPixelBuffer { - #[method_id(@__retain_semantics Init initWithTextureTarget:textureInternalFormat:textureMaxMipMapLevel:pixelsWide:pixelsHigh:)] - pub unsafe fn initWithTextureTarget_textureInternalFormat_textureMaxMipMapLevel_pixelsWide_pixelsHigh( - this: Option>, - target: GLenum, - format: GLenum, - maxLevel: GLint, - pixelsWide: GLsizei, - pixelsHigh: GLsizei, - ) -> Option>; - - #[method_id(@__retain_semantics Init initWithCGLPBufferObj:)] - pub unsafe fn initWithCGLPBufferObj( - this: Option>, - pbuffer: CGLPBufferObj, - ) -> Option>; - - #[method(CGLPBufferObj)] - pub unsafe fn CGLPBufferObj(&self) -> CGLPBufferObj; - - #[method(pixelsWide)] - pub unsafe fn pixelsWide(&self) -> GLsizei; - - #[method(pixelsHigh)] - pub unsafe fn pixelsHigh(&self) -> GLsizei; - - #[method(textureTarget)] - pub unsafe fn textureTarget(&self) -> GLenum; - - #[method(textureInternalFormat)] - pub unsafe fn textureInternalFormat(&self) -> GLenum; - - #[method(textureMaxMipMapLevel)] - pub unsafe fn textureMaxMipMapLevel(&self) -> GLint; - } -); - ns_enum!( #[underlying(NSInteger)] pub enum NSOpenGLContextParameter { @@ -203,139 +93,6 @@ ns_enum!( } ); -extern_class!( - #[derive(Debug)] - pub struct NSOpenGLContext; - - unsafe impl ClassType for NSOpenGLContext { - type Super = NSObject; - } -); - -extern_methods!( - unsafe impl NSOpenGLContext { - #[method_id(@__retain_semantics Init initWithFormat:shareContext:)] - pub unsafe fn initWithFormat_shareContext( - this: Option>, - format: &NSOpenGLPixelFormat, - share: Option<&NSOpenGLContext>, - ) -> Option>; - - #[method_id(@__retain_semantics Init initWithCGLContextObj:)] - pub unsafe fn initWithCGLContextObj( - this: Option>, - context: CGLContextObj, - ) -> Option>; - - #[method_id(@__retain_semantics Other pixelFormat)] - pub unsafe fn pixelFormat(&self) -> Id; - - #[method_id(@__retain_semantics Other view)] - pub unsafe fn view(&self) -> Option>; - - #[method(setView:)] - pub unsafe fn setView(&self, view: Option<&NSView>); - - #[method(setFullScreen)] - pub unsafe fn setFullScreen(&self); - - #[method(setOffScreen:width:height:rowbytes:)] - pub unsafe fn setOffScreen_width_height_rowbytes( - &self, - baseaddr: NonNull, - width: GLsizei, - height: GLsizei, - rowbytes: GLint, - ); - - #[method(clearDrawable)] - pub unsafe fn clearDrawable(&self); - - #[method(update)] - pub unsafe fn update(&self); - - #[method(flushBuffer)] - pub unsafe fn flushBuffer(&self); - - #[method(makeCurrentContext)] - pub unsafe fn makeCurrentContext(&self); - - #[method(clearCurrentContext)] - pub unsafe fn clearCurrentContext(); - - #[method_id(@__retain_semantics Other currentContext)] - pub unsafe fn currentContext() -> Option>; - - #[method(copyAttributesFromContext:withMask:)] - pub unsafe fn copyAttributesFromContext_withMask( - &self, - context: &NSOpenGLContext, - mask: GLbitfield, - ); - - #[method(setValues:forParameter:)] - pub unsafe fn setValues_forParameter( - &self, - vals: NonNull, - param: NSOpenGLContextParameter, - ); - - #[method(getValues:forParameter:)] - pub unsafe fn getValues_forParameter( - &self, - vals: NonNull, - param: NSOpenGLContextParameter, - ); - - #[method(currentVirtualScreen)] - pub unsafe fn currentVirtualScreen(&self) -> GLint; - - #[method(setCurrentVirtualScreen:)] - pub unsafe fn setCurrentVirtualScreen(&self, currentVirtualScreen: GLint); - - #[method(createTexture:fromView:internalFormat:)] - pub unsafe fn createTexture_fromView_internalFormat( - &self, - target: GLenum, - view: &NSView, - format: GLenum, - ); - - #[method(CGLContextObj)] - pub unsafe fn CGLContextObj(&self) -> CGLContextObj; - } -); - -extern_methods!( - /// NSOpenGLPixelBuffer - unsafe impl NSOpenGLContext { - #[method(setPixelBuffer:cubeMapFace:mipMapLevel:currentVirtualScreen:)] - pub unsafe fn setPixelBuffer_cubeMapFace_mipMapLevel_currentVirtualScreen( - &self, - pixelBuffer: &NSOpenGLPixelBuffer, - face: GLenum, - level: GLint, - screen: GLint, - ); - - #[method_id(@__retain_semantics Other pixelBuffer)] - pub unsafe fn pixelBuffer(&self) -> Option>; - - #[method(pixelBufferCubeMapFace)] - pub unsafe fn pixelBufferCubeMapFace(&self) -> GLenum; - - #[method(pixelBufferMipMapLevel)] - pub unsafe fn pixelBufferMipMapLevel(&self) -> GLint; - - #[method(setTextureImageToPixelBuffer:colorBuffer:)] - pub unsafe fn setTextureImageToPixelBuffer_colorBuffer( - &self, - pixelBuffer: &NSOpenGLPixelBuffer, - source: GLenum, - ); - } -); - extern_static!( NSOpenGLCPSwapInterval: NSOpenGLContextParameter = NSOpenGLContextParameterSwapInterval ); diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs index ce985c8c0..661a20881 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLLayer.rs @@ -4,64 +4,3 @@ use crate::common::*; use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; - -extern_class!( - #[derive(Debug)] - pub struct NSOpenGLLayer; - - unsafe impl ClassType for NSOpenGLLayer { - type Super = CAOpenGLLayer; - } -); - -extern_methods!( - unsafe impl NSOpenGLLayer { - #[method_id(@__retain_semantics Other view)] - pub unsafe fn view(&self) -> Option>; - - #[method(setView:)] - pub unsafe fn setView(&self, view: Option<&NSView>); - - #[method_id(@__retain_semantics Other openGLPixelFormat)] - pub unsafe fn openGLPixelFormat(&self) -> Option>; - - #[method(setOpenGLPixelFormat:)] - pub unsafe fn setOpenGLPixelFormat(&self, openGLPixelFormat: Option<&NSOpenGLPixelFormat>); - - #[method_id(@__retain_semantics Other openGLContext)] - pub unsafe fn openGLContext(&self) -> Option>; - - #[method(setOpenGLContext:)] - pub unsafe fn setOpenGLContext(&self, openGLContext: Option<&NSOpenGLContext>); - - #[method_id(@__retain_semantics Other openGLPixelFormatForDisplayMask:)] - pub unsafe fn openGLPixelFormatForDisplayMask( - &self, - mask: u32, - ) -> Id; - - #[method_id(@__retain_semantics Other openGLContextForPixelFormat:)] - pub unsafe fn openGLContextForPixelFormat( - &self, - pixelFormat: &NSOpenGLPixelFormat, - ) -> Id; - - #[method(canDrawInOpenGLContext:pixelFormat:forLayerTime:displayTime:)] - pub unsafe fn canDrawInOpenGLContext_pixelFormat_forLayerTime_displayTime( - &self, - context: &NSOpenGLContext, - pixelFormat: &NSOpenGLPixelFormat, - t: CFTimeInterval, - ts: NonNull, - ) -> bool; - - #[method(drawInOpenGLContext:pixelFormat:forLayerTime:displayTime:)] - pub unsafe fn drawInOpenGLContext_pixelFormat_forLayerTime_displayTime( - &self, - context: &NSOpenGLContext, - pixelFormat: &NSOpenGLPixelFormat, - t: CFTimeInterval, - ts: NonNull, - ); - } -); diff --git a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs index 4f2fd885d..fa1534506 100644 --- a/crates/icrate/src/generated/AppKit/NSOpenGLView.rs +++ b/crates/icrate/src/generated/AppKit/NSOpenGLView.rs @@ -5,71 +5,6 @@ use crate::AppKit::*; use crate::CoreData::*; use crate::Foundation::*; -extern_class!( - #[derive(Debug)] - pub struct NSOpenGLView; - - unsafe impl ClassType for NSOpenGLView { - type Super = NSView; - } -); - -extern_methods!( - unsafe impl NSOpenGLView { - #[method_id(@__retain_semantics Other defaultPixelFormat)] - pub unsafe fn defaultPixelFormat() -> Id; - - #[method_id(@__retain_semantics Init initWithFrame:pixelFormat:)] - pub unsafe fn initWithFrame_pixelFormat( - this: Option>, - frameRect: NSRect, - format: Option<&NSOpenGLPixelFormat>, - ) -> Option>; - - #[method_id(@__retain_semantics Other openGLContext)] - pub unsafe fn openGLContext(&self) -> Option>; - - #[method(setOpenGLContext:)] - pub unsafe fn setOpenGLContext(&self, openGLContext: Option<&NSOpenGLContext>); - - #[method(clearGLContext)] - pub unsafe fn clearGLContext(&self); - - #[method(update)] - pub unsafe fn update(&self); - - #[method(reshape)] - pub unsafe fn reshape(&self); - - #[method_id(@__retain_semantics Other pixelFormat)] - pub unsafe fn pixelFormat(&self) -> Option>; - - #[method(setPixelFormat:)] - pub unsafe fn setPixelFormat(&self, pixelFormat: Option<&NSOpenGLPixelFormat>); - - #[method(prepareOpenGL)] - pub unsafe fn prepareOpenGL(&self); - - #[method(wantsBestResolutionOpenGLSurface)] - pub unsafe fn wantsBestResolutionOpenGLSurface(&self) -> bool; - - #[method(setWantsBestResolutionOpenGLSurface:)] - pub unsafe fn setWantsBestResolutionOpenGLSurface( - &self, - wantsBestResolutionOpenGLSurface: bool, - ); - - #[method(wantsExtendedDynamicRangeOpenGLSurface)] - pub unsafe fn wantsExtendedDynamicRangeOpenGLSurface(&self) -> bool; - - #[method(setWantsExtendedDynamicRangeOpenGLSurface:)] - pub unsafe fn setWantsExtendedDynamicRangeOpenGLSurface( - &self, - wantsExtendedDynamicRangeOpenGLSurface: bool, - ); - } -); - extern_methods!( /// NSOpenGLSurfaceResolution unsafe impl NSView { diff --git a/crates/icrate/src/generated/AppKit/NSPanel.rs b/crates/icrate/src/generated/AppKit/NSPanel.rs index f71303b2f..9e25e84b1 100644 --- a/crates/icrate/src/generated/AppKit/NSPanel.rs +++ b/crates/icrate/src/generated/AppKit/NSPanel.rs @@ -53,7 +53,5 @@ extern_enum!( extern_enum!( #[underlying(c_uint)] pub enum { - NSOKButton = NSModalResponseOK, - NSCancelButton = NSModalResponseCancel, } ); diff --git a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs index ae923e6b8..d3f13384d 100644 --- a/crates/icrate/src/generated/AppKit/NSRunningApplication.rs +++ b/crates/icrate/src/generated/AppKit/NSRunningApplication.rs @@ -63,9 +63,6 @@ extern_methods!( #[method_id(@__retain_semantics Other executableURL)] pub unsafe fn executableURL(&self) -> Option>; - #[method(processIdentifier)] - pub unsafe fn processIdentifier(&self) -> pid_t; - #[method_id(@__retain_semantics Other launchDate)] pub unsafe fn launchDate(&self) -> Option>; @@ -95,11 +92,6 @@ extern_methods!( bundleIdentifier: &NSString, ) -> Id, Shared>; - #[method_id(@__retain_semantics Other runningApplicationWithProcessIdentifier:)] - pub unsafe fn runningApplicationWithProcessIdentifier( - pid: pid_t, - ) -> Option>; - #[method_id(@__retain_semantics Other currentApplication)] pub unsafe fn currentApplication() -> Id; diff --git a/crates/icrate/src/generated/AppKit/NSSavePanel.rs b/crates/icrate/src/generated/AppKit/NSSavePanel.rs index 4e9cd65e9..102a6cc77 100644 --- a/crates/icrate/src/generated/AppKit/NSSavePanel.rs +++ b/crates/icrate/src/generated/AppKit/NSSavePanel.rs @@ -8,8 +8,6 @@ use crate::Foundation::*; extern_enum!( #[underlying(c_uint)] pub enum { - NSFileHandlingPanelCancelButton = NSModalResponseCancel, - NSFileHandlingPanelOKButton = NSModalResponseOK, } ); @@ -36,12 +34,6 @@ extern_methods!( #[method(setDirectoryURL:)] pub unsafe fn setDirectoryURL(&self, directoryURL: Option<&NSURL>); - #[method_id(@__retain_semantics Other allowedContentTypes)] - pub unsafe fn allowedContentTypes(&self) -> Id, Shared>; - - #[method(setAllowedContentTypes:)] - pub unsafe fn setAllowedContentTypes(&self, allowedContentTypes: &NSArray); - #[method(allowsOtherFileTypes)] pub unsafe fn allowsOtherFileTypes(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/NSSharingService.rs b/crates/icrate/src/generated/AppKit/NSSharingService.rs index fee141358..a85ae5741 100644 --- a/crates/icrate/src/generated/AppKit/NSSharingService.rs +++ b/crates/icrate/src/generated/AppKit/NSSharingService.rs @@ -260,23 +260,7 @@ extern_protocol!( extern_methods!( /// NSCloudKitSharing - unsafe impl NSItemProvider { - #[method(registerCloudKitShareWithPreparationHandler:)] - pub unsafe fn registerCloudKitShareWithPreparationHandler( - &self, - preparationHandler: &Block< - (NonNull>,), - (), - >, - ); - - #[method(registerCloudKitShare:container:)] - pub unsafe fn registerCloudKitShare_container( - &self, - share: &CKShare, - container: &CKContainer, - ); - } + unsafe impl NSItemProvider {} ); extern_class!( diff --git a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs index 3907cc6c3..a91bb3b0e 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLayoutFragment.rs @@ -95,9 +95,6 @@ extern_methods!( #[method(bottomMargin)] pub unsafe fn bottomMargin(&self) -> CGFloat; - #[method(drawAtPoint:inContext:)] - pub unsafe fn drawAtPoint_inContext(&self, point: CGPoint, context: CGContextRef); - #[method_id(@__retain_semantics Other textAttachmentViewProviders)] pub unsafe fn textAttachmentViewProviders( &self, diff --git a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs index b20497021..206db640a 100644 --- a/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs +++ b/crates/icrate/src/generated/AppKit/NSTextLineFragment.rs @@ -52,9 +52,6 @@ extern_methods!( #[method(glyphOrigin)] pub unsafe fn glyphOrigin(&self) -> CGPoint; - #[method(drawAtPoint:inContext:)] - pub unsafe fn drawAtPoint_inContext(&self, point: CGPoint, context: CGContextRef); - #[method(locationForCharacterAtIndex:)] pub unsafe fn locationForCharacterAtIndex(&self, index: NSInteger) -> CGPoint; diff --git a/crates/icrate/src/generated/AppKit/NSTextView.rs b/crates/icrate/src/generated/AppKit/NSTextView.rs index 52647d064..b043fe6a5 100644 --- a/crates/icrate/src/generated/AppKit/NSTextView.rs +++ b/crates/icrate/src/generated/AppKit/NSTextView.rs @@ -871,12 +871,6 @@ extern_methods!( #[method(toggleQuickLookPreviewPanel:)] pub unsafe fn toggleQuickLookPreviewPanel(&self, sender: Option<&Object>); - #[method_id(@__retain_semantics Other quickLookPreviewableItemsInRanges:)] - pub unsafe fn quickLookPreviewableItemsInRanges( - &self, - ranges: &NSArray, - ) -> Id, Shared>; - #[method(updateQuickLookPreviewPanel)] pub unsafe fn updateQuickLookPreviewPanel(&self); } diff --git a/crates/icrate/src/generated/AppKit/NSView.rs b/crates/icrate/src/generated/AppKit/NSView.rs index 7e4ab7338..82df4b0f6 100644 --- a/crates/icrate/src/generated/AppKit/NSView.rs +++ b/crates/icrate/src/generated/AppKit/NSView.rs @@ -507,9 +507,6 @@ extern_methods!( #[method(removeTrackingRect:)] pub unsafe fn removeTrackingRect(&self, tag: NSTrackingRectTag); - #[method_id(@__retain_semantics Other makeBackingLayer)] - pub unsafe fn makeBackingLayer(&self) -> Id; - #[method(layerContentsRedrawPolicy)] pub unsafe fn layerContentsRedrawPolicy(&self) -> NSViewLayerContentsRedrawPolicy; @@ -534,12 +531,6 @@ extern_methods!( #[method(setWantsLayer:)] pub unsafe fn setWantsLayer(&self, wantsLayer: bool); - #[method_id(@__retain_semantics Other layer)] - pub unsafe fn layer(&self) -> Option>; - - #[method(setLayer:)] - pub unsafe fn setLayer(&self, layer: Option<&CALayer>); - #[method(wantsUpdateLayer)] pub unsafe fn wantsUpdateLayer(&self) -> bool; @@ -576,24 +567,6 @@ extern_methods!( #[method(setLayerUsesCoreImageFilters:)] pub unsafe fn setLayerUsesCoreImageFilters(&self, layerUsesCoreImageFilters: bool); - #[method_id(@__retain_semantics Other backgroundFilters)] - pub unsafe fn backgroundFilters(&self) -> Id, Shared>; - - #[method(setBackgroundFilters:)] - pub unsafe fn setBackgroundFilters(&self, backgroundFilters: &NSArray); - - #[method_id(@__retain_semantics Other compositingFilter)] - pub unsafe fn compositingFilter(&self) -> Option>; - - #[method(setCompositingFilter:)] - pub unsafe fn setCompositingFilter(&self, compositingFilter: Option<&CIFilter>); - - #[method_id(@__retain_semantics Other contentFilters)] - pub unsafe fn contentFilters(&self) -> Id, Shared>; - - #[method(setContentFilters:)] - pub unsafe fn setContentFilters(&self, contentFilters: &NSArray); - #[method_id(@__retain_semantics Other shadow)] pub unsafe fn shadow(&self) -> Option>; @@ -737,15 +710,7 @@ extern_protocol!( extern_methods!( /// NSLayerDelegateContentsScaleUpdating - unsafe impl NSObject { - #[method(layer:shouldInheritContentsScale:fromWindow:)] - pub unsafe fn layer_shouldInheritContentsScale_fromWindow( - &self, - layer: &CALayer, - newScale: CGFloat, - window: &NSWindow, - ) -> bool; - } + unsafe impl NSObject {} ); extern_protocol!( diff --git a/crates/icrate/src/generated/AppKit/NSWorkspace.rs b/crates/icrate/src/generated/AppKit/NSWorkspace.rs index a52bd43be..3001783a3 100644 --- a/crates/icrate/src/generated/AppKit/NSWorkspace.rs +++ b/crates/icrate/src/generated/AppKit/NSWorkspace.rs @@ -83,9 +83,6 @@ extern_methods!( fullPaths: &NSArray, ) -> Option>; - #[method_id(@__retain_semantics Other iconForContentType:)] - pub unsafe fn iconForContentType(&self, contentType: &UTType) -> Id; - #[method(setIcon:forFile:options:)] pub unsafe fn setIcon_forFile_options( &self, @@ -185,26 +182,6 @@ extern_methods!( completionHandler: Option<&Block<(*mut NSError,), ()>>, ); - #[method_id(@__retain_semantics Other URLForApplicationToOpenContentType:)] - pub unsafe fn URLForApplicationToOpenContentType( - &self, - contentType: &UTType, - ) -> Option>; - - #[method_id(@__retain_semantics Other URLsForApplicationsToOpenContentType:)] - pub unsafe fn URLsForApplicationsToOpenContentType( - &self, - contentType: &UTType, - ) -> Id, Shared>; - - #[method(setDefaultApplicationAtURL:toOpenContentType:completionHandler:)] - pub unsafe fn setDefaultApplicationAtURL_toOpenContentType_completionHandler( - &self, - applicationURL: &NSURL, - contentType: &UTType, - completionHandler: Option<&Block<(*mut NSError,), ()>>, - ); - #[method_id(@__retain_semantics Other frontmostApplication)] pub unsafe fn frontmostApplication(&self) -> Option>; @@ -296,12 +273,6 @@ extern_methods!( #[method(setAppleEvent:)] pub unsafe fn setAppleEvent(&self, appleEvent: Option<&NSAppleEventDescriptor>); - #[method(architecture)] - pub unsafe fn architecture(&self) -> cpu_type_t; - - #[method(setArchitecture:)] - pub unsafe fn setArchitecture(&self, architecture: cpu_type_t); - #[method(requiresUniversalLinks)] pub unsafe fn requiresUniversalLinks(&self) -> bool; diff --git a/crates/icrate/src/generated/AppKit/mod.rs b/crates/icrate/src/generated/AppKit/mod.rs index b387b2ca6..48634c8d4 100644 --- a/crates/icrate/src/generated/AppKit/mod.rs +++ b/crates/icrate/src/generated/AppKit/mod.rs @@ -972,7 +972,6 @@ pub use self::__NSButtonCell::{ NSThickSquareBezelStyle, NSThickerSquareBezelStyle, NSToggleButton, }; pub use self::__NSButtonTouchBarItem::NSButtonTouchBarItem; -pub use self::__NSCIImageRep::NSCIImageRep; pub use self::__NSCachedImageRep::NSCachedImageRep; pub use self::__NSCandidateListTouchBarItem::{ NSCandidateListTouchBarItem, NSCandidateListTouchBarItemDelegate, @@ -1128,7 +1127,7 @@ pub use self::__NSDictionaryController::{ NSDictionaryController, NSDictionaryControllerKeyValuePair, }; pub use self::__NSDiffableDataSource::{ - NSCollectionViewDiffableDataSource, NSCollectionViewDiffableDataSourceItemProvider, + NSCollectionViewDiffableDataSource, NSCollectionViewDiffableDataSourceSupplementaryViewProvider, NSDiffableDataSourceSnapshot, }; pub use self::__NSDockTile::{ @@ -1642,7 +1641,7 @@ pub use self::__NSOpenGL::{ NSOpenGLCPReclaimResources, NSOpenGLCPStateValidation, NSOpenGLCPSurfaceBackingSize, NSOpenGLCPSurfaceOpacity, NSOpenGLCPSurfaceOrder, NSOpenGLCPSurfaceSurfaceVolatile, NSOpenGLCPSwapInterval, NSOpenGLCPSwapRectangle, NSOpenGLCPSwapRectangleEnable, - NSOpenGLContext, NSOpenGLContextParameter, NSOpenGLContextParameterCurrentRendererID, + NSOpenGLContextParameter, NSOpenGLContextParameterCurrentRendererID, NSOpenGLContextParameterGPUFragmentProcessing, NSOpenGLContextParameterGPUVertexProcessing, NSOpenGLContextParameterHasDrawable, NSOpenGLContextParameterMPSwapsInFlight, NSOpenGLContextParameterRasterizationEnable, NSOpenGLContextParameterReclaimResources, @@ -1651,23 +1650,21 @@ pub use self::__NSOpenGL::{ NSOpenGLContextParameterSurfaceSurfaceVolatile, NSOpenGLContextParameterSwapInterval, NSOpenGLContextParameterSwapRectangle, NSOpenGLContextParameterSwapRectangleEnable, NSOpenGLGOClearFormatCache, NSOpenGLGOFormatCacheSize, NSOpenGLGOResetLibrary, - NSOpenGLGORetainRenderers, NSOpenGLGOUseBuildCache, NSOpenGLGetOption, NSOpenGLGetVersion, - NSOpenGLGlobalOption, NSOpenGLPFAAccelerated, NSOpenGLPFAAcceleratedCompute, - NSOpenGLPFAAccumSize, NSOpenGLPFAAllRenderers, NSOpenGLPFAAllowOfflineRenderers, - NSOpenGLPFAAlphaSize, NSOpenGLPFAAuxBuffers, NSOpenGLPFAAuxDepthStencil, - NSOpenGLPFABackingStore, NSOpenGLPFAClosestPolicy, NSOpenGLPFAColorFloat, NSOpenGLPFAColorSize, - NSOpenGLPFACompliant, NSOpenGLPFADepthSize, NSOpenGLPFADoubleBuffer, NSOpenGLPFAFullScreen, - NSOpenGLPFAMPSafe, NSOpenGLPFAMaximumPolicy, NSOpenGLPFAMinimumPolicy, NSOpenGLPFAMultiScreen, + NSOpenGLGORetainRenderers, NSOpenGLGOUseBuildCache, NSOpenGLGlobalOption, + NSOpenGLPFAAccelerated, NSOpenGLPFAAcceleratedCompute, NSOpenGLPFAAccumSize, + NSOpenGLPFAAllRenderers, NSOpenGLPFAAllowOfflineRenderers, NSOpenGLPFAAlphaSize, + NSOpenGLPFAAuxBuffers, NSOpenGLPFAAuxDepthStencil, NSOpenGLPFABackingStore, + NSOpenGLPFAClosestPolicy, NSOpenGLPFAColorFloat, NSOpenGLPFAColorSize, NSOpenGLPFACompliant, + NSOpenGLPFADepthSize, NSOpenGLPFADoubleBuffer, NSOpenGLPFAFullScreen, NSOpenGLPFAMPSafe, + NSOpenGLPFAMaximumPolicy, NSOpenGLPFAMinimumPolicy, NSOpenGLPFAMultiScreen, NSOpenGLPFAMultisample, NSOpenGLPFANoRecovery, NSOpenGLPFAOffScreen, NSOpenGLPFAOpenGLProfile, NSOpenGLPFAPixelBuffer, NSOpenGLPFARemotePixelBuffer, NSOpenGLPFARendererID, NSOpenGLPFARobust, NSOpenGLPFASampleAlpha, NSOpenGLPFASampleBuffers, NSOpenGLPFASamples, NSOpenGLPFAScreenMask, NSOpenGLPFASingleRenderer, NSOpenGLPFAStencilSize, NSOpenGLPFAStereo, NSOpenGLPFASupersample, - NSOpenGLPFATripleBuffer, NSOpenGLPFAVirtualScreenCount, NSOpenGLPFAWindow, NSOpenGLPixelBuffer, - NSOpenGLPixelFormat, NSOpenGLPixelFormatAttribute, NSOpenGLProfileVersion3_2Core, - NSOpenGLProfileVersion4_1Core, NSOpenGLProfileVersionLegacy, NSOpenGLSetOption, + NSOpenGLPFATripleBuffer, NSOpenGLPFAVirtualScreenCount, NSOpenGLPFAWindow, + NSOpenGLPixelFormatAttribute, NSOpenGLProfileVersion3_2Core, NSOpenGLProfileVersion4_1Core, + NSOpenGLProfileVersionLegacy, }; -pub use self::__NSOpenGLLayer::NSOpenGLLayer; -pub use self::__NSOpenGLView::NSOpenGLView; pub use self::__NSOpenPanel::NSOpenPanel; pub use self::__NSOutlineView::{ NSOutlineView, NSOutlineViewColumnDidMoveNotification, @@ -1693,8 +1690,8 @@ pub use self::__NSPageController::{ pub use self::__NSPageLayout::NSPageLayout; pub use self::__NSPanGestureRecognizer::NSPanGestureRecognizer; pub use self::__NSPanel::{ - NSAlertAlternateReturn, NSAlertDefaultReturn, NSAlertErrorReturn, NSAlertOtherReturn, - NSCancelButton, NSOKButton, NSPanel, NSReleaseAlertPanel, + NSAlertAlternateReturn, NSAlertDefaultReturn, NSAlertErrorReturn, NSAlertOtherReturn, NSPanel, + NSReleaseAlertPanel, }; pub use self::__NSParagraphStyle::{ NSCenterTabStopType, NSDecimalTabStopType, NSLeftTabStopType, NSLineBreakByCharWrapping, @@ -1826,10 +1823,7 @@ pub use self::__NSRunningApplication::{ NSApplicationActivationPolicyAccessory, NSApplicationActivationPolicyProhibited, NSApplicationActivationPolicyRegular, NSRunningApplication, }; -pub use self::__NSSavePanel::{ - NSFileHandlingPanelCancelButton, NSFileHandlingPanelOKButton, NSOpenSavePanelDelegate, - NSSavePanel, -}; +pub use self::__NSSavePanel::{NSOpenSavePanelDelegate, NSSavePanel}; pub use self::__NSScreen::{NSScreen, NSScreenColorSpaceDidChangeNotification}; pub use self::__NSScrollView::{ NSScrollElasticity, NSScrollElasticityAllowed, NSScrollElasticityAutomatic, diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index 30069c6d5..e01f53795 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -205,6 +205,19 @@ macro_rules! extern_static { pub static $name: $ty; } }; + // Floats in statics are broken + ($name:ident: NSAppKitVersion = $($value:tt)*) => { + pub static $name: NSAppKitVersion = $($value)* as _; + }; + ($name:ident: NSLayoutPriority = $($value:tt)*) => { + pub static $name: NSLayoutPriority = $($value)* as _; + }; + ($name:ident: NSStackViewVisibilityPriority = $($value:tt)*) => { + pub static $name: NSStackViewVisibilityPriority = $($value)* as _; + }; + ($name:ident: NSTouchBarItemPriority = $($value:tt)*) => { + pub static $name: NSTouchBarItemPriority = $($value)* as _; + }; ($name:ident: $ty:ty = $value:expr) => { pub static $name: $ty = $value; }; @@ -253,6 +266,7 @@ mod common { }; // TODO + #[repr(C)] pub struct OptionSel(*const objc2::ffi::objc_selector); unsafe impl objc2::Encode for OptionSel { const ENCODING: objc2::Encoding = objc2::Encoding::Sel; From cb00d95ed67ca55b1bddef0389cac202ee140816 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 8 Dec 2022 11:16:48 +0100 Subject: [PATCH 129/131] Add support for the AuthenticationServices framework --- crates/header-translator/framework-includes.h | 2 + crates/header-translator/src/config.rs | 3 + crates/header-translator/src/stmt.rs | 14 +- crates/icrate/Cargo.toml | 2 +- .../src/AuthenticationServices/fixes/mod.rs | 11 + .../icrate/src/AuthenticationServices/mod.rs | 7 + .../translation-config.toml | 20 ++ ...untAuthenticationModificationController.rs | 83 ++++++ ...henticationModificationExtensionContext.rs | 42 +++ ...placePasswordWithSignInWithAppleRequest.rs | 37 +++ ...ccountAuthenticationModificationRequest.rs | 18 ++ ...nUpgradePasswordToStrongPasswordRequest.rs | 37 +++ ...uthenticationModificationViewController.rs | 60 ++++ .../AuthenticationServices/ASAuthorization.rs | 36 +++ .../ASAuthorizationAppleIDButton.rs | 56 ++++ .../ASAuthorizationAppleIDCredential.rs | 57 ++++ .../ASAuthorizationAppleIDProvider.rs | 42 +++ .../ASAuthorizationAppleIDRequest.rs | 24 ++ .../ASAuthorizationController.rs | 108 +++++++ .../ASAuthorizationCredential.rs | 11 + .../ASAuthorizationCustomMethod.rs | 15 + .../ASAuthorizationError.rs | 19 ++ .../ASAuthorizationOpenIDRequest.rs | 58 ++++ .../ASAuthorizationPasswordProvider.rs | 21 ++ .../ASAuthorizationPasswordRequest.rs | 18 ++ ...ionPlatformPublicKeyCredentialAssertion.rs | 24 ++ ...formPublicKeyCredentialAssertionRequest.rs | 35 +++ ...onPlatformPublicKeyCredentialDescriptor.rs | 30 ++ ...tionPlatformPublicKeyCredentialProvider.rs | 47 ++++ ...PlatformPublicKeyCredentialRegistration.rs | 24 ++ ...mPublicKeyCredentialRegistrationRequest.rs | 24 ++ .../ASAuthorizationProvider.rs | 11 + ...onProviderExtensionAuthorizationRequest.rs | 119 ++++++++ ...ionProviderExtensionAuthorizationResult.rs | 60 ++++ ...thorizationPublicKeyCredentialAssertion.rs | 20 ++ ...tionPublicKeyCredentialAssertionRequest.rs | 45 +++ ...thorizationPublicKeyCredentialConstants.rs | 61 ++++ ...horizationPublicKeyCredentialDescriptor.rs | 17 ++ ...horizationPublicKeyCredentialParameters.rs | 33 +++ ...rizationPublicKeyCredentialRegistration.rs | 14 + ...nPublicKeyCredentialRegistrationRequest.rs | 60 ++++ .../ASAuthorizationRequest.rs | 27 ++ ...SecurityKeyPublicKeyCredentialAssertion.rs | 24 ++ ...yKeyPublicKeyCredentialAssertionRequest.rs | 29 ++ ...ecurityKeyPublicKeyCredentialDescriptor.rs | 66 +++++ ...nSecurityKeyPublicKeyCredentialProvider.rs | 48 ++++ ...urityKeyPublicKeyCredentialRegistration.rs | 18 ++ ...yPublicKeyCredentialRegistrationRequest.rs | 57 ++++ .../ASAuthorizationSingleSignOnCredential.rs | 42 +++ .../ASAuthorizationSingleSignOnProvider.rs | 37 +++ .../ASAuthorizationSingleSignOnRequest.rs | 33 +++ .../AuthenticationServices/ASCOSEConstants.rs | 13 + .../ASCredentialIdentityStore.rs | 68 +++++ .../ASCredentialIdentityStoreState.rs | 24 ++ .../ASCredentialProviderExtensionContext.rs | 38 +++ .../ASCredentialProviderViewController.rs | 42 +++ .../ASCredentialServiceIdentifier.rs | 39 +++ .../ASExtensionErrors.rs | 19 ++ .../AuthenticationServices/ASFoundation.rs | 5 + .../ASPasswordCredential.rs | 37 +++ .../ASPasswordCredentialIdentity.rs | 51 ++++ .../ASPublicKeyCredential.rs | 17 ++ .../ASWebAuthenticationSession.rs | 86 ++++++ .../ASWebAuthenticationSessionRequest.rs | 75 +++++ ...icationSessionWebBrowserSessionHandling.rs | 23 ++ ...ticationSessionWebBrowserSessionManager.rs | 39 +++ .../generated/AuthenticationServices/mod.rs | 263 ++++++++++++++++++ crates/icrate/src/lib.rs | 2 + 68 files changed, 2642 insertions(+), 5 deletions(-) create mode 100644 crates/icrate/src/AuthenticationServices/fixes/mod.rs create mode 100644 crates/icrate/src/AuthenticationServices/mod.rs create mode 100644 crates/icrate/src/AuthenticationServices/translation-config.toml create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationController.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationExtensionContext.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationViewController.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorization.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDButton.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDCredential.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDProvider.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationController.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationCredential.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationCustomMethod.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationError.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationOpenIDRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPasswordProvider.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPasswordRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertion.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialProvider.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistration.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProvider.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationResult.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertion.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertionRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialConstants.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialDescriptor.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialParameters.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistration.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistrationRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnCredential.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnProvider.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASCOSEConstants.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASCredentialIdentityStore.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASCredentialIdentityStoreState.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASCredentialProviderExtensionContext.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASCredentialProviderViewController.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASCredentialServiceIdentifier.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASExtensionErrors.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASFoundation.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASPasswordCredential.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASPasswordCredentialIdentity.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASPublicKeyCredential.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSession.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionRequest.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionHandling.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionManager.rs create mode 100644 crates/icrate/src/generated/AuthenticationServices/mod.rs diff --git a/crates/header-translator/framework-includes.h b/crates/header-translator/framework-includes.h index a9455fdcf..c818f37e7 100644 --- a/crates/header-translator/framework-includes.h +++ b/crates/header-translator/framework-includes.h @@ -7,3 +7,5 @@ #if TARGET_OS_OSX #import #endif + +#import diff --git a/crates/header-translator/src/config.rs b/crates/header-translator/src/config.rs index 6c109101c..d03ddfa2f 100644 --- a/crates/header-translator/src/config.rs +++ b/crates/header-translator/src/config.rs @@ -38,6 +38,9 @@ pub struct Config { pub struct ClassData { #[serde(default)] pub skipped: bool, + #[serde(rename = "superclass-name")] + #[serde(default)] + pub new_superclass_name: Option, #[serde(default)] pub methods: HashMap, #[serde(default)] diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 51b1d3678..2f0b6f3cd 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -124,9 +124,8 @@ fn parse_objc_decl( methods.push(MethodOrProperty::Property(property)); } } - EntityKind::VisibilityAttr if superclass.is_some() => { - // NS_CLASS_AVAILABLE_MAC?? - println!("TODO: VisibilityAttr") + EntityKind::VisibilityAttr => { + // Already exposed as entity.get_visibility() } EntityKind::TypeRef if superclass.is_some() => { // TODO @@ -312,6 +311,12 @@ impl Stmt { class_data, ); + if let Some(new_name) = + class_data.and_then(|data| data.new_superclass_name.as_ref()) + { + superclass = Some(Some(new_name.clone())); + } + let superclass = superclass.expect("no superclass found"); Some(Self::ClassDecl { @@ -579,6 +584,7 @@ impl Stmt { panic!("unexpected attribute: {macro_:?}"); } } + EntityKind::VisibilityAttr => {} EntityKind::ObjCClassRef => {} EntityKind::TypeRef => {} _ if entity.is_expression() => { @@ -588,7 +594,7 @@ impl Stmt { panic!("got variable value twice") } } - _ => panic!("unknown typedef child in {name}: {entity:?}"), + _ => panic!("unknown vardecl child in {name}: {entity:?}"), }; EntityVisitResult::Continue }); diff --git a/crates/icrate/Cargo.toml b/crates/icrate/Cargo.toml index f446f53d5..28b8726ac 100644 --- a/crates/icrate/Cargo.toml +++ b/crates/icrate/Cargo.toml @@ -87,7 +87,7 @@ AppKit = ["Foundation", "CoreData"] # AudioUnit = [] # AudioDriverKit = [] # AudioVideoBridging = [] -# AuthenticationServices = [] +AuthenticationServices = ["Foundation"] # AutomaticAssessmentConfiguration = [] # Automator = [] # AVFAudio = [] diff --git a/crates/icrate/src/AuthenticationServices/fixes/mod.rs b/crates/icrate/src/AuthenticationServices/fixes/mod.rs new file mode 100644 index 000000000..a7a41b048 --- /dev/null +++ b/crates/icrate/src/AuthenticationServices/fixes/mod.rs @@ -0,0 +1,11 @@ +use crate::Foundation::NSObject; + +// TODO: UIViewController on iOS, NSViewController on macOS +pub type ASViewController = NSObject; +// TODO: UIWindow on iOS, NSWindow on macOS +pub type ASPresentationAnchor = NSObject; +// TODO: UIImage on iOS, NSImage on macOS +pub type ASImage = NSObject; + +// TODO: UIControl on iOS, NSControl on macOS +pub(crate) type ASControl = NSObject; diff --git a/crates/icrate/src/AuthenticationServices/mod.rs b/crates/icrate/src/AuthenticationServices/mod.rs new file mode 100644 index 000000000..3267474c3 --- /dev/null +++ b/crates/icrate/src/AuthenticationServices/mod.rs @@ -0,0 +1,7 @@ +mod fixes; +#[allow(unused_imports)] +#[path = "../generated/AuthenticationServices/mod.rs"] +mod generated; + +pub use self::fixes::*; +pub use self::generated::*; diff --git a/crates/icrate/src/AuthenticationServices/translation-config.toml b/crates/icrate/src/AuthenticationServices/translation-config.toml new file mode 100644 index 000000000..0aa61f27f --- /dev/null +++ b/crates/icrate/src/AuthenticationServices/translation-config.toml @@ -0,0 +1,20 @@ +imports = ["AuthenticationServices", "Foundation"] + +# Uses a bit of complex feature testing setup, see ASFoundation.h +[typedef.ASPresentationAnchor] +skipped = true +[typedef.ASViewController] +skipped = true +[typedef.ASImage] +skipped = true + +# It is a bit difficult to extract the original typedef name from the +# superclass name, so let's just overwrite it here. +[class.ASCredentialProviderViewController] +superclass-name = "ASViewController" +[class.ASAccountAuthenticationModificationViewController] +superclass-name = "ASViewController" + +# Specifies UIControl or NSControl conditionally +[class.ASAuthorizationAppleIDButton] +superclass-name = "ASControl" diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationController.rs b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationController.rs new file mode 100644 index 000000000..31032a76f --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationController.rs @@ -0,0 +1,83 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASAccountAuthenticationModificationControllerDelegate; + + unsafe impl ASAccountAuthenticationModificationControllerDelegate { + #[optional] + #[method(accountAuthenticationModificationController:didSuccessfullyCompleteRequest:withUserInfo:)] + pub unsafe fn accountAuthenticationModificationController_didSuccessfullyCompleteRequest_withUserInfo( + &self, + controller: &ASAccountAuthenticationModificationController, + request: &ASAccountAuthenticationModificationRequest, + userInfo: Option<&NSDictionary>, + ); + + #[optional] + #[method(accountAuthenticationModificationController:didFailRequest:withError:)] + pub unsafe fn accountAuthenticationModificationController_didFailRequest_withError( + &self, + controller: &ASAccountAuthenticationModificationController, + request: &ASAccountAuthenticationModificationRequest, + error: &NSError, + ); + } +); + +extern_protocol!( + pub struct ASAccountAuthenticationModificationControllerPresentationContextProviding; + + unsafe impl ASAccountAuthenticationModificationControllerPresentationContextProviding { + #[method_id(@__retain_semantics Other presentationAnchorForAccountAuthenticationModificationController:)] + pub unsafe fn presentationAnchorForAccountAuthenticationModificationController( + &self, + controller: &ASAccountAuthenticationModificationController, + ) -> Id; + } +); + +extern_class!( + #[derive(Debug)] + pub struct ASAccountAuthenticationModificationController; + + unsafe impl ClassType for ASAccountAuthenticationModificationController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAccountAuthenticationModificationController { + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate( + &self, + ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate( + &self, + delegate: Option<&ASAccountAuthenticationModificationControllerDelegate>, + ); + + #[method_id(@__retain_semantics Other presentationContextProvider)] + pub unsafe fn presentationContextProvider( + &self, + ) -> Option< + Id, + >; + + #[method(setPresentationContextProvider:)] + pub unsafe fn setPresentationContextProvider( + &self, + presentationContextProvider: Option< + &ASAccountAuthenticationModificationControllerPresentationContextProviding, + >, + ); + + #[method(performRequest:)] + pub unsafe fn performRequest(&self, request: &ASAccountAuthenticationModificationRequest); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationExtensionContext.rs b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationExtensionContext.rs new file mode 100644 index 000000000..1946781ec --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationExtensionContext.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAccountAuthenticationModificationExtensionContext; + + unsafe impl ClassType for ASAccountAuthenticationModificationExtensionContext { + type Super = NSExtensionContext; + } +); + +extern_methods!( + unsafe impl ASAccountAuthenticationModificationExtensionContext { + #[method(getSignInWithAppleUpgradeAuthorizationWithState:nonce:completionHandler:)] + pub unsafe fn getSignInWithAppleUpgradeAuthorizationWithState_nonce_completionHandler( + &self, + state: Option<&NSString>, + nonce: Option<&NSString>, + completionHandler: &Block<(*mut ASAuthorizationAppleIDCredential, *mut NSError), ()>, + ); + + #[method(completeUpgradeToSignInWithAppleWithUserInfo:)] + pub unsafe fn completeUpgradeToSignInWithAppleWithUserInfo( + &self, + userInfo: Option<&NSDictionary>, + ); + + #[method(completeChangePasswordRequestWithUpdatedCredential:userInfo:)] + pub unsafe fn completeChangePasswordRequestWithUpdatedCredential_userInfo( + &self, + updatedCredential: &ASPasswordCredential, + userInfo: Option<&NSDictionary>, + ); + + #[method(cancelRequestWithError:)] + pub unsafe fn cancelRequestWithError(&self, error: &NSError); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs new file mode 100644 index 000000000..88453596b --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs @@ -0,0 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest; + + unsafe impl ClassType + for ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest + { + type Super = ASAccountAuthenticationModificationRequest; + } +); + +extern_methods!( + unsafe impl ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest { + #[method_id(@__retain_semantics Init initWithUser:serviceIdentifier:userInfo:)] + pub unsafe fn initWithUser_serviceIdentifier_userInfo( + this: Option>, + user: &NSString, + serviceIdentifier: &ASCredentialServiceIdentifier, + userInfo: Option<&NSDictionary>, + ) -> Id; + + #[method_id(@__retain_semantics Other user)] + pub unsafe fn user(&self) -> Id; + + #[method_id(@__retain_semantics Other serviceIdentifier)] + pub unsafe fn serviceIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationRequest.rs new file mode 100644 index 000000000..93508f6ad --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationRequest.rs @@ -0,0 +1,18 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAccountAuthenticationModificationRequest; + + unsafe impl ClassType for ASAccountAuthenticationModificationRequest { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAccountAuthenticationModificationRequest {} +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs new file mode 100644 index 000000000..572a20816 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs @@ -0,0 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest; + + unsafe impl ClassType + for ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest + { + type Super = ASAccountAuthenticationModificationRequest; + } +); + +extern_methods!( + unsafe impl ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest { + #[method_id(@__retain_semantics Init initWithUser:serviceIdentifier:userInfo:)] + pub unsafe fn initWithUser_serviceIdentifier_userInfo( + this: Option>, + user: &NSString, + serviceIdentifier: &ASCredentialServiceIdentifier, + userInfo: Option<&NSDictionary>, + ) -> Id; + + #[method_id(@__retain_semantics Other user)] + pub unsafe fn user(&self) -> Id; + + #[method_id(@__retain_semantics Other serviceIdentifier)] + pub unsafe fn serviceIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other userInfo)] + pub unsafe fn userInfo(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationViewController.rs b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationViewController.rs new file mode 100644 index 000000000..c78a0f383 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAccountAuthenticationModificationViewController.rs @@ -0,0 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAccountAuthenticationModificationViewController; + + unsafe impl ClassType for ASAccountAuthenticationModificationViewController { + type Super = ASViewController; + } +); + +extern_methods!( + unsafe impl ASAccountAuthenticationModificationViewController { + #[method_id(@__retain_semantics Other extensionContext)] + pub unsafe fn extensionContext( + &self, + ) -> Id; + + #[method(convertAccountToSignInWithAppleWithoutUserInteractionForServiceIdentifier:existingCredential:userInfo:)] + pub unsafe fn convertAccountToSignInWithAppleWithoutUserInteractionForServiceIdentifier_existingCredential_userInfo( + &self, + serviceIdentifier: &ASCredentialServiceIdentifier, + existingCredential: &ASPasswordCredential, + userInfo: Option<&NSDictionary>, + ); + + #[method(prepareInterfaceToConvertAccountToSignInWithAppleForServiceIdentifier:existingCredential:userInfo:)] + pub unsafe fn prepareInterfaceToConvertAccountToSignInWithAppleForServiceIdentifier_existingCredential_userInfo( + &self, + serviceIdentifier: &ASCredentialServiceIdentifier, + existingCredential: &ASPasswordCredential, + userInfo: Option<&NSDictionary>, + ); + + #[method(changePasswordWithoutUserInteractionForServiceIdentifier:existingCredential:newPassword:userInfo:)] + pub unsafe fn changePasswordWithoutUserInteractionForServiceIdentifier_existingCredential_newPassword_userInfo( + &self, + serviceIdentifier: &ASCredentialServiceIdentifier, + existingCredential: &ASPasswordCredential, + newPassword: &NSString, + userInfo: Option<&NSDictionary>, + ); + + #[method(prepareInterfaceToChangePasswordForServiceIdentifier:existingCredential:newPassword:userInfo:)] + pub unsafe fn prepareInterfaceToChangePasswordForServiceIdentifier_existingCredential_newPassword_userInfo( + &self, + serviceIdentifier: &ASCredentialServiceIdentifier, + existingCredential: &ASPasswordCredential, + newPassword: &NSString, + userInfo: Option<&NSDictionary>, + ); + + #[method(cancelRequest)] + pub unsafe fn cancelRequest(&self); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorization.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorization.rs new file mode 100644 index 000000000..4d6e1f4dd --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorization.rs @@ -0,0 +1,36 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +pub type ASAuthorizationScope = NSString; + +extern_static!(ASAuthorizationScopeFullName: &'static ASAuthorizationScope); + +extern_static!(ASAuthorizationScopeEmail: &'static ASAuthorizationScope); + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorization; + + unsafe impl ClassType for ASAuthorization { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorization { + #[method_id(@__retain_semantics Other provider)] + pub unsafe fn provider(&self) -> Id; + + #[method_id(@__retain_semantics Other credential)] + pub unsafe fn credential(&self) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDButton.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDButton.rs new file mode 100644 index 000000000..296ea137d --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDButton.rs @@ -0,0 +1,56 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum ASAuthorizationAppleIDButtonType { + ASAuthorizationAppleIDButtonTypeSignIn = 0, + ASAuthorizationAppleIDButtonTypeContinue = 1, + ASAuthorizationAppleIDButtonTypeSignUp = 2, + ASAuthorizationAppleIDButtonTypeDefault = ASAuthorizationAppleIDButtonTypeSignIn, + } +); + +ns_enum!( + #[underlying(NSInteger)] + pub enum ASAuthorizationAppleIDButtonStyle { + ASAuthorizationAppleIDButtonStyleWhite = 0, + ASAuthorizationAppleIDButtonStyleWhiteOutline = 1, + ASAuthorizationAppleIDButtonStyleBlack = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationAppleIDButton; + + unsafe impl ClassType for ASAuthorizationAppleIDButton { + type Super = ASControl; + } +); + +extern_methods!( + unsafe impl ASAuthorizationAppleIDButton { + #[method_id(@__retain_semantics Other buttonWithType:style:)] + pub unsafe fn buttonWithType_style( + type_: ASAuthorizationAppleIDButtonType, + style: ASAuthorizationAppleIDButtonStyle, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithAuthorizationButtonType:authorizationButtonStyle:)] + pub unsafe fn initWithAuthorizationButtonType_authorizationButtonStyle( + this: Option>, + type_: ASAuthorizationAppleIDButtonType, + style: ASAuthorizationAppleIDButtonStyle, + ) -> Id; + + #[method(cornerRadius)] + pub unsafe fn cornerRadius(&self) -> CGFloat; + + #[method(setCornerRadius:)] + pub unsafe fn setCornerRadius(&self, cornerRadius: CGFloat); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDCredential.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDCredential.rs new file mode 100644 index 000000000..9f55537a8 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDCredential.rs @@ -0,0 +1,57 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum ASUserDetectionStatus { + ASUserDetectionStatusUnsupported = 0, + ASUserDetectionStatusUnknown = 1, + ASUserDetectionStatusLikelyReal = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationAppleIDCredential; + + unsafe impl ClassType for ASAuthorizationAppleIDCredential { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationAppleIDCredential { + #[method_id(@__retain_semantics Other user)] + pub unsafe fn user(&self) -> Id; + + #[method_id(@__retain_semantics Other state)] + pub unsafe fn state(&self) -> Option>; + + #[method_id(@__retain_semantics Other authorizedScopes)] + pub unsafe fn authorizedScopes(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other authorizationCode)] + pub unsafe fn authorizationCode(&self) -> Option>; + + #[method_id(@__retain_semantics Other identityToken)] + pub unsafe fn identityToken(&self) -> Option>; + + #[method_id(@__retain_semantics Other email)] + pub unsafe fn email(&self) -> Option>; + + #[method_id(@__retain_semantics Other fullName)] + pub unsafe fn fullName(&self) -> Option>; + + #[method(realUserStatus)] + pub unsafe fn realUserStatus(&self) -> ASUserDetectionStatus; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDProvider.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDProvider.rs new file mode 100644 index 000000000..4823c960a --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDProvider.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum ASAuthorizationAppleIDProviderCredentialState { + ASAuthorizationAppleIDProviderCredentialRevoked = 0, + ASAuthorizationAppleIDProviderCredentialAuthorized = 1, + ASAuthorizationAppleIDProviderCredentialNotFound = 2, + ASAuthorizationAppleIDProviderCredentialTransferred = 3, + } +); + +extern_static!( + ASAuthorizationAppleIDProviderCredentialRevokedNotification: &'static NSNotificationName +); + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationAppleIDProvider; + + unsafe impl ClassType for ASAuthorizationAppleIDProvider { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationAppleIDProvider { + #[method_id(@__retain_semantics Other createRequest)] + pub unsafe fn createRequest(&self) -> Id; + + #[method(getCredentialStateForUserID:completion:)] + pub unsafe fn getCredentialStateForUserID_completion( + &self, + userID: &NSString, + completion: &Block<(ASAuthorizationAppleIDProviderCredentialState, *mut NSError), ()>, + ); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDRequest.rs new file mode 100644 index 000000000..67d38b40b --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationAppleIDRequest.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationAppleIDRequest; + + unsafe impl ClassType for ASAuthorizationAppleIDRequest { + type Super = ASAuthorizationOpenIDRequest; + } +); + +extern_methods!( + unsafe impl ASAuthorizationAppleIDRequest { + #[method_id(@__retain_semantics Other user)] + pub unsafe fn user(&self) -> Option>; + + #[method(setUser:)] + pub unsafe fn setUser(&self, user: Option<&NSString>); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationController.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationController.rs new file mode 100644 index 000000000..003700eeb --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationController.rs @@ -0,0 +1,108 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASAuthorizationControllerDelegate; + + unsafe impl ASAuthorizationControllerDelegate { + #[optional] + #[method(authorizationController:didCompleteWithAuthorization:)] + pub unsafe fn authorizationController_didCompleteWithAuthorization( + &self, + controller: &ASAuthorizationController, + authorization: &ASAuthorization, + ); + + #[optional] + #[method(authorizationController:didCompleteWithError:)] + pub unsafe fn authorizationController_didCompleteWithError( + &self, + controller: &ASAuthorizationController, + error: &NSError, + ); + + #[optional] + #[method(authorizationController:didCompleteWithCustomMethod:)] + pub unsafe fn authorizationController_didCompleteWithCustomMethod( + &self, + controller: &ASAuthorizationController, + method: &ASAuthorizationCustomMethod, + ); + } +); + +extern_protocol!( + pub struct ASAuthorizationControllerPresentationContextProviding; + + unsafe impl ASAuthorizationControllerPresentationContextProviding { + #[method_id(@__retain_semantics Other presentationAnchorForAuthorizationController:)] + pub unsafe fn presentationAnchorForAuthorizationController( + &self, + controller: &ASAuthorizationController, + ) -> Id; + } +); + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationController; + + unsafe impl ClassType for ASAuthorizationController { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationController { + #[method_id(@__retain_semantics Other authorizationRequests)] + pub unsafe fn authorizationRequests(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate(&self) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate(&self, delegate: Option<&ASAuthorizationControllerDelegate>); + + #[method_id(@__retain_semantics Other presentationContextProvider)] + pub unsafe fn presentationContextProvider( + &self, + ) -> Option>; + + #[method(setPresentationContextProvider:)] + pub unsafe fn setPresentationContextProvider( + &self, + presentationContextProvider: Option< + &ASAuthorizationControllerPresentationContextProviding, + >, + ); + + #[method_id(@__retain_semantics Other customAuthorizationMethods)] + pub unsafe fn customAuthorizationMethods( + &self, + ) -> Id, Shared>; + + #[method(setCustomAuthorizationMethods:)] + pub unsafe fn setCustomAuthorizationMethods( + &self, + customAuthorizationMethods: &NSArray, + ); + + #[method_id(@__retain_semantics Init initWithAuthorizationRequests:)] + pub unsafe fn initWithAuthorizationRequests( + this: Option>, + authorizationRequests: &NSArray, + ) -> Id; + + #[method(performRequests)] + pub unsafe fn performRequests(&self); + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationCredential.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationCredential.rs new file mode 100644 index 000000000..3d5b5fde2 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationCredential.rs @@ -0,0 +1,11 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASAuthorizationCredential; + + unsafe impl ASAuthorizationCredential {} +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationCustomMethod.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationCustomMethod.rs new file mode 100644 index 000000000..e940e81a5 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationCustomMethod.rs @@ -0,0 +1,15 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +pub type ASAuthorizationCustomMethod = NSString; + +extern_static!( + ASAuthorizationCustomMethodVideoSubscriberAccount: &'static ASAuthorizationCustomMethod +); + +extern_static!(ASAuthorizationCustomMethodRestorePurchase: &'static ASAuthorizationCustomMethod); + +extern_static!(ASAuthorizationCustomMethodOther: &'static ASAuthorizationCustomMethod); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationError.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationError.rs new file mode 100644 index 000000000..9666b3d24 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationError.rs @@ -0,0 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_static!(ASAuthorizationErrorDomain: &'static NSErrorDomain); + +ns_error_enum!( + #[underlying(NSInteger)] + pub enum ASAuthorizationError { + ASAuthorizationErrorUnknown = 1000, + ASAuthorizationErrorCanceled = 1001, + ASAuthorizationErrorInvalidResponse = 1002, + ASAuthorizationErrorNotHandled = 1003, + ASAuthorizationErrorFailed = 1004, + ASAuthorizationErrorNotInteractive = 1005, + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationOpenIDRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationOpenIDRequest.rs new file mode 100644 index 000000000..de5f37cc7 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationOpenIDRequest.rs @@ -0,0 +1,58 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +pub type ASAuthorizationOpenIDOperation = NSString; + +extern_static!(ASAuthorizationOperationImplicit: &'static ASAuthorizationOpenIDOperation); + +extern_static!(ASAuthorizationOperationLogin: &'static ASAuthorizationOpenIDOperation); + +extern_static!(ASAuthorizationOperationRefresh: &'static ASAuthorizationOpenIDOperation); + +extern_static!(ASAuthorizationOperationLogout: &'static ASAuthorizationOpenIDOperation); + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationOpenIDRequest; + + unsafe impl ClassType for ASAuthorizationOpenIDRequest { + type Super = ASAuthorizationRequest; + } +); + +extern_methods!( + unsafe impl ASAuthorizationOpenIDRequest { + #[method_id(@__retain_semantics Other requestedScopes)] + pub unsafe fn requestedScopes(&self) -> Option, Shared>>; + + #[method(setRequestedScopes:)] + pub unsafe fn setRequestedScopes( + &self, + requestedScopes: Option<&NSArray>, + ); + + #[method_id(@__retain_semantics Other state)] + pub unsafe fn state(&self) -> Option>; + + #[method(setState:)] + pub unsafe fn setState(&self, state: Option<&NSString>); + + #[method_id(@__retain_semantics Other nonce)] + pub unsafe fn nonce(&self) -> Option>; + + #[method(setNonce:)] + pub unsafe fn setNonce(&self, nonce: Option<&NSString>); + + #[method_id(@__retain_semantics Other requestedOperation)] + pub unsafe fn requestedOperation(&self) -> Id; + + #[method(setRequestedOperation:)] + pub unsafe fn setRequestedOperation( + &self, + requestedOperation: &ASAuthorizationOpenIDOperation, + ); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPasswordProvider.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPasswordProvider.rs new file mode 100644 index 000000000..9304710ce --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPasswordProvider.rs @@ -0,0 +1,21 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationPasswordProvider; + + unsafe impl ClassType for ASAuthorizationPasswordProvider { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationPasswordProvider { + #[method_id(@__retain_semantics Other createRequest)] + pub unsafe fn createRequest(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPasswordRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPasswordRequest.rs new file mode 100644 index 000000000..85188c110 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPasswordRequest.rs @@ -0,0 +1,18 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationPasswordRequest; + + unsafe impl ClassType for ASAuthorizationPasswordRequest { + type Super = ASAuthorizationRequest; + } +); + +extern_methods!( + unsafe impl ASAuthorizationPasswordRequest {} +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertion.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertion.rs new file mode 100644 index 000000000..78b1c65f0 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertion.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationPlatformPublicKeyCredentialAssertion; + + unsafe impl ClassType for ASAuthorizationPlatformPublicKeyCredentialAssertion { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationPlatformPublicKeyCredentialAssertion { + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs new file mode 100644 index 000000000..6a91930f8 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs @@ -0,0 +1,35 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationPlatformPublicKeyCredentialAssertionRequest; + + unsafe impl ClassType for ASAuthorizationPlatformPublicKeyCredentialAssertionRequest { + type Super = ASAuthorizationRequest; + } +); + +extern_methods!( + unsafe impl ASAuthorizationPlatformPublicKeyCredentialAssertionRequest { + #[method_id(@__retain_semantics Other allowedCredentials)] + pub unsafe fn allowedCredentials( + &self, + ) -> Id, Shared>; + + #[method(setAllowedCredentials:)] + pub unsafe fn setAllowedCredentials( + &self, + allowedCredentials: &NSArray, + ); + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs new file mode 100644 index 000000000..ee159e199 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs @@ -0,0 +1,30 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationPlatformPublicKeyCredentialDescriptor; + + unsafe impl ClassType for ASAuthorizationPlatformPublicKeyCredentialDescriptor { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationPlatformPublicKeyCredentialDescriptor { + #[method_id(@__retain_semantics Init initWithCredentialID:)] + pub unsafe fn initWithCredentialID( + this: Option>, + credentialID: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialProvider.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialProvider.rs new file mode 100644 index 000000000..da2428577 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialProvider.rs @@ -0,0 +1,47 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationPlatformPublicKeyCredentialProvider; + + unsafe impl ClassType for ASAuthorizationPlatformPublicKeyCredentialProvider { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationPlatformPublicKeyCredentialProvider { + #[method_id(@__retain_semantics Init initWithRelyingPartyIdentifier:)] + pub unsafe fn initWithRelyingPartyIdentifier( + this: Option>, + relyingPartyIdentifier: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other createCredentialRegistrationRequestWithChallenge:name:userID:)] + pub unsafe fn createCredentialRegistrationRequestWithChallenge_name_userID( + &self, + challenge: &NSData, + name: &NSString, + userID: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Other createCredentialAssertionRequestWithChallenge:)] + pub unsafe fn createCredentialAssertionRequestWithChallenge( + &self, + challenge: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Other relyingPartyIdentifier)] + pub unsafe fn relyingPartyIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistration.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistration.rs new file mode 100644 index 000000000..284f9d989 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistration.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationPlatformPublicKeyCredentialRegistration; + + unsafe impl ClassType for ASAuthorizationPlatformPublicKeyCredentialRegistration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationPlatformPublicKeyCredentialRegistration { + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs new file mode 100644 index 000000000..8b133f923 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest; + + unsafe impl ClassType for ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest { + type Super = ASAuthorizationRequest; + } +); + +extern_methods!( + unsafe impl ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest { + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProvider.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProvider.rs new file mode 100644 index 000000000..fcee83286 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProvider.rs @@ -0,0 +1,11 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASAuthorizationProvider; + + unsafe impl ASAuthorizationProvider {} +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationRequest.rs new file mode 100644 index 000000000..bf3deb8b6 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationRequest.rs @@ -0,0 +1,119 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +pub type ASAuthorizationProviderAuthorizationOperation = NSString; + +extern_static!( + ASAuthorizationProviderAuthorizationOperationConfigurationRemoved: + &'static ASAuthorizationProviderAuthorizationOperation +); + +extern_protocol!( + pub struct ASAuthorizationProviderExtensionAuthorizationRequestHandler; + + unsafe impl ASAuthorizationProviderExtensionAuthorizationRequestHandler { + #[method(beginAuthorizationWithRequest:)] + pub unsafe fn beginAuthorizationWithRequest( + &self, + request: &ASAuthorizationProviderExtensionAuthorizationRequest, + ); + + #[optional] + #[method(cancelAuthorizationWithRequest:)] + pub unsafe fn cancelAuthorizationWithRequest( + &self, + request: &ASAuthorizationProviderExtensionAuthorizationRequest, + ); + } +); + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationProviderExtensionAuthorizationRequest; + + unsafe impl ClassType for ASAuthorizationProviderExtensionAuthorizationRequest { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationProviderExtensionAuthorizationRequest { + #[method(doNotHandle)] + pub unsafe fn doNotHandle(&self); + + #[method(cancel)] + pub unsafe fn cancel(&self); + + #[method(complete)] + pub unsafe fn complete(&self); + + #[method(completeWithHTTPAuthorizationHeaders:)] + pub unsafe fn completeWithHTTPAuthorizationHeaders( + &self, + httpAuthorizationHeaders: &NSDictionary, + ); + + #[method(completeWithHTTPResponse:httpBody:)] + pub unsafe fn completeWithHTTPResponse_httpBody( + &self, + httpResponse: &NSHTTPURLResponse, + httpBody: Option<&NSData>, + ); + + #[method(completeWithAuthorizationResult:)] + pub unsafe fn completeWithAuthorizationResult( + &self, + authorizationResult: &ASAuthorizationProviderExtensionAuthorizationResult, + ); + + #[method(completeWithError:)] + pub unsafe fn completeWithError(&self, error: &NSError); + + #[method(presentAuthorizationViewControllerWithCompletion:)] + pub unsafe fn presentAuthorizationViewControllerWithCompletion( + &self, + completion: &Block<(Bool, *mut NSError), ()>, + ); + + #[method_id(@__retain_semantics Other url)] + pub unsafe fn url(&self) -> Id; + + #[method_id(@__retain_semantics Other requestedOperation)] + pub unsafe fn requestedOperation( + &self, + ) -> Id; + + #[method_id(@__retain_semantics Other httpHeaders)] + pub unsafe fn httpHeaders(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other httpBody)] + pub unsafe fn httpBody(&self) -> Id; + + #[method_id(@__retain_semantics Other realm)] + pub unsafe fn realm(&self) -> Id; + + #[method_id(@__retain_semantics Other extensionData)] + pub unsafe fn extensionData(&self) -> Id; + + #[method_id(@__retain_semantics Other callerBundleIdentifier)] + pub unsafe fn callerBundleIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other authorizationOptions)] + pub unsafe fn authorizationOptions(&self) -> Id; + + #[method(isCallerManaged)] + pub unsafe fn isCallerManaged(&self) -> bool; + + #[method_id(@__retain_semantics Other callerTeamIdentifier)] + pub unsafe fn callerTeamIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other localizedCallerDisplayName)] + pub unsafe fn localizedCallerDisplayName(&self) -> Id; + + #[method(isUserInterfaceEnabled)] + pub unsafe fn isUserInterfaceEnabled(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationResult.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationResult.rs new file mode 100644 index 000000000..15e7ba0ce --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationProviderExtensionAuthorizationResult.rs @@ -0,0 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationProviderExtensionAuthorizationResult; + + unsafe impl ClassType for ASAuthorizationProviderExtensionAuthorizationResult { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationProviderExtensionAuthorizationResult { + #[method_id(@__retain_semantics Init initWithHTTPAuthorizationHeaders:)] + pub unsafe fn initWithHTTPAuthorizationHeaders( + this: Option>, + httpAuthorizationHeaders: &NSDictionary, + ) -> Id; + + #[method_id(@__retain_semantics Init initWithHTTPResponse:httpBody:)] + pub unsafe fn initWithHTTPResponse_httpBody( + this: Option>, + httpResponse: &NSHTTPURLResponse, + httpBody: Option<&NSData>, + ) -> Id; + + #[method_id(@__retain_semantics Other httpAuthorizationHeaders)] + pub unsafe fn httpAuthorizationHeaders( + &self, + ) -> Option, Shared>>; + + #[method(setHttpAuthorizationHeaders:)] + pub unsafe fn setHttpAuthorizationHeaders( + &self, + httpAuthorizationHeaders: Option<&NSDictionary>, + ); + + #[method_id(@__retain_semantics Other httpResponse)] + pub unsafe fn httpResponse(&self) -> Option>; + + #[method(setHttpResponse:)] + pub unsafe fn setHttpResponse(&self, httpResponse: Option<&NSHTTPURLResponse>); + + #[method_id(@__retain_semantics Other httpBody)] + pub unsafe fn httpBody(&self) -> Option>; + + #[method(setHttpBody:)] + pub unsafe fn setHttpBody(&self, httpBody: Option<&NSData>); + + #[method_id(@__retain_semantics Other privateKeys)] + pub unsafe fn privateKeys(&self) -> Id; + + #[method(setPrivateKeys:)] + pub unsafe fn setPrivateKeys(&self, privateKeys: &NSArray); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertion.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertion.rs new file mode 100644 index 000000000..c9432a36d --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertion.rs @@ -0,0 +1,20 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASAuthorizationPublicKeyCredentialAssertion; + + unsafe impl ASAuthorizationPublicKeyCredentialAssertion { + #[method_id(@__retain_semantics Other rawAuthenticatorData)] + pub unsafe fn rawAuthenticatorData(&self) -> Id; + + #[method_id(@__retain_semantics Other userID)] + pub unsafe fn userID(&self) -> Id; + + #[method_id(@__retain_semantics Other signature)] + pub unsafe fn signature(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertionRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertionRequest.rs new file mode 100644 index 000000000..df37957d9 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialAssertionRequest.rs @@ -0,0 +1,45 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASAuthorizationPublicKeyCredentialAssertionRequest; + + unsafe impl ASAuthorizationPublicKeyCredentialAssertionRequest { + #[method_id(@__retain_semantics Other challenge)] + pub unsafe fn challenge(&self) -> Id; + + #[method(setChallenge:)] + pub unsafe fn setChallenge(&self, challenge: &NSData); + + #[method_id(@__retain_semantics Other relyingPartyIdentifier)] + pub unsafe fn relyingPartyIdentifier(&self) -> Id; + + #[method(setRelyingPartyIdentifier:)] + pub unsafe fn setRelyingPartyIdentifier(&self, relyingPartyIdentifier: &NSString); + + #[method_id(@__retain_semantics Other allowedCredentials)] + pub unsafe fn allowedCredentials( + &self, + ) -> Id, Shared>; + + #[method(setAllowedCredentials:)] + pub unsafe fn setAllowedCredentials( + &self, + allowedCredentials: &NSArray, + ); + + #[method_id(@__retain_semantics Other userVerificationPreference)] + pub unsafe fn userVerificationPreference( + &self, + ) -> Id; + + #[method(setUserVerificationPreference:)] + pub unsafe fn setUserVerificationPreference( + &self, + userVerificationPreference: &ASAuthorizationPublicKeyCredentialUserVerificationPreference, + ); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialConstants.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialConstants.rs new file mode 100644 index 000000000..39bbadd63 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialConstants.rs @@ -0,0 +1,61 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +pub type ASAuthorizationPublicKeyCredentialUserVerificationPreference = NSString; + +extern_static!( + ASAuthorizationPublicKeyCredentialUserVerificationPreferencePreferred: + Option<&'static ASAuthorizationPublicKeyCredentialUserVerificationPreference> +); + +extern_static!( + ASAuthorizationPublicKeyCredentialUserVerificationPreferenceRequired: + Option<&'static ASAuthorizationPublicKeyCredentialUserVerificationPreference> +); + +extern_static!( + ASAuthorizationPublicKeyCredentialUserVerificationPreferenceDiscouraged: + Option<&'static ASAuthorizationPublicKeyCredentialUserVerificationPreference> +); + +pub type ASAuthorizationPublicKeyCredentialAttestationKind = NSString; + +extern_static!( + ASAuthorizationPublicKeyCredentialAttestationKindNone: + Option<&'static ASAuthorizationPublicKeyCredentialAttestationKind> +); + +extern_static!( + ASAuthorizationPublicKeyCredentialAttestationKindDirect: + Option<&'static ASAuthorizationPublicKeyCredentialAttestationKind> +); + +extern_static!( + ASAuthorizationPublicKeyCredentialAttestationKindIndirect: + Option<&'static ASAuthorizationPublicKeyCredentialAttestationKind> +); + +extern_static!( + ASAuthorizationPublicKeyCredentialAttestationKindEnterprise: + Option<&'static ASAuthorizationPublicKeyCredentialAttestationKind> +); + +pub type ASAuthorizationPublicKeyCredentialResidentKeyPreference = NSString; + +extern_static!( + ASAuthorizationPublicKeyCredentialResidentKeyPreferenceDiscouraged: + Option<&'static ASAuthorizationPublicKeyCredentialResidentKeyPreference> +); + +extern_static!( + ASAuthorizationPublicKeyCredentialResidentKeyPreferencePreferred: + Option<&'static ASAuthorizationPublicKeyCredentialResidentKeyPreference> +); + +extern_static!( + ASAuthorizationPublicKeyCredentialResidentKeyPreferenceRequired: + Option<&'static ASAuthorizationPublicKeyCredentialResidentKeyPreference> +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialDescriptor.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialDescriptor.rs new file mode 100644 index 000000000..347d8e57d --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialDescriptor.rs @@ -0,0 +1,17 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASAuthorizationPublicKeyCredentialDescriptor; + + unsafe impl ASAuthorizationPublicKeyCredentialDescriptor { + #[method_id(@__retain_semantics Other credentialID)] + pub unsafe fn credentialID(&self) -> Id; + + #[method(setCredentialID:)] + pub unsafe fn setCredentialID(&self, credentialID: &NSData); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialParameters.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialParameters.rs new file mode 100644 index 000000000..33c638e1f --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialParameters.rs @@ -0,0 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationPublicKeyCredentialParameters; + + unsafe impl ClassType for ASAuthorizationPublicKeyCredentialParameters { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationPublicKeyCredentialParameters { + #[method_id(@__retain_semantics Init initWithAlgorithm:)] + pub unsafe fn initWithAlgorithm( + this: Option>, + algorithm: ASCOSEAlgorithmIdentifier, + ) -> Id; + + #[method(algorithm)] + pub unsafe fn algorithm(&self) -> ASCOSEAlgorithmIdentifier; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistration.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistration.rs new file mode 100644 index 000000000..418a81256 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistration.rs @@ -0,0 +1,14 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASAuthorizationPublicKeyCredentialRegistration; + + unsafe impl ASAuthorizationPublicKeyCredentialRegistration { + #[method_id(@__retain_semantics Other rawAttestationObject)] + pub unsafe fn rawAttestationObject(&self) -> Option>; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistrationRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistrationRequest.rs new file mode 100644 index 000000000..d6676f129 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationPublicKeyCredentialRegistrationRequest.rs @@ -0,0 +1,60 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASAuthorizationPublicKeyCredentialRegistrationRequest; + + unsafe impl ASAuthorizationPublicKeyCredentialRegistrationRequest { + #[method_id(@__retain_semantics Other relyingPartyIdentifier)] + pub unsafe fn relyingPartyIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other userID)] + pub unsafe fn userID(&self) -> Id; + + #[method(setUserID:)] + pub unsafe fn setUserID(&self, userID: &NSData); + + #[method_id(@__retain_semantics Other name)] + pub unsafe fn name(&self) -> Id; + + #[method(setName:)] + pub unsafe fn setName(&self, name: &NSString); + + #[method_id(@__retain_semantics Other displayName)] + pub unsafe fn displayName(&self) -> Option>; + + #[method(setDisplayName:)] + pub unsafe fn setDisplayName(&self, displayName: Option<&NSString>); + + #[method_id(@__retain_semantics Other challenge)] + pub unsafe fn challenge(&self) -> Id; + + #[method(setChallenge:)] + pub unsafe fn setChallenge(&self, challenge: &NSData); + + #[method_id(@__retain_semantics Other userVerificationPreference)] + pub unsafe fn userVerificationPreference( + &self, + ) -> Id; + + #[method(setUserVerificationPreference:)] + pub unsafe fn setUserVerificationPreference( + &self, + userVerificationPreference: &ASAuthorizationPublicKeyCredentialUserVerificationPreference, + ); + + #[method_id(@__retain_semantics Other attestationPreference)] + pub unsafe fn attestationPreference( + &self, + ) -> Id; + + #[method(setAttestationPreference:)] + pub unsafe fn setAttestationPreference( + &self, + attestationPreference: &ASAuthorizationPublicKeyCredentialAttestationKind, + ); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationRequest.rs new file mode 100644 index 000000000..3b45581ca --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationRequest.rs @@ -0,0 +1,27 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationRequest; + + unsafe impl ClassType for ASAuthorizationRequest { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationRequest { + #[method_id(@__retain_semantics Other provider)] + pub unsafe fn provider(&self) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs new file mode 100644 index 000000000..39773924c --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationSecurityKeyPublicKeyCredentialAssertion; + + unsafe impl ClassType for ASAuthorizationSecurityKeyPublicKeyCredentialAssertion { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationSecurityKeyPublicKeyCredentialAssertion { + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs new file mode 100644 index 000000000..66a2dc2fe --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs @@ -0,0 +1,29 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest; + + unsafe impl ClassType for ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest { + type Super = ASAuthorizationRequest; + } +); + +extern_methods!( + unsafe impl ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest { + #[method_id(@__retain_semantics Other allowedCredentials)] + pub unsafe fn allowedCredentials( + &self, + ) -> Id, Shared>; + + #[method(setAllowedCredentials:)] + pub unsafe fn setAllowedCredentials( + &self, + allowedCredentials: &NSArray, + ); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs new file mode 100644 index 000000000..5cab21995 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs @@ -0,0 +1,66 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +pub type ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport = NSString; + +extern_static!( + ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransportUSB: + &'static ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport +); + +extern_static!( + ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransportNFC: + &'static ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport +); + +extern_static!( + ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransportBluetooth: + &'static ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport +); + +extern_fn!( + pub unsafe fn ASAuthorizationAllSupportedPublicKeyCredentialDescriptorTransports( + ) -> NonNull>; +); + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor; + + unsafe impl ClassType for ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor { + #[method_id(@__retain_semantics Init initWithCredentialID:transports:)] + pub unsafe fn initWithCredentialID_transports( + this: Option>, + credentialID: &NSData, + allowedTransports: &NSArray< + ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport, + >, + ) -> Id; + + #[method_id(@__retain_semantics Other transports)] + pub unsafe fn transports( + &self, + ) -> Id, Shared>; + + #[method(setTransports:)] + pub unsafe fn setTransports( + &self, + transports: &NSArray, + ); + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs new file mode 100644 index 000000000..6227b1233 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs @@ -0,0 +1,48 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationSecurityKeyPublicKeyCredentialProvider; + + unsafe impl ClassType for ASAuthorizationSecurityKeyPublicKeyCredentialProvider { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationSecurityKeyPublicKeyCredentialProvider { + #[method_id(@__retain_semantics Init initWithRelyingPartyIdentifier:)] + pub unsafe fn initWithRelyingPartyIdentifier( + this: Option>, + relyingPartyIdentifier: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other createCredentialRegistrationRequestWithChallenge:displayName:name:userID:)] + pub unsafe fn createCredentialRegistrationRequestWithChallenge_displayName_name_userID( + &self, + challenge: &NSData, + displayName: &NSString, + name: &NSString, + userID: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Other createCredentialAssertionRequestWithChallenge:)] + pub unsafe fn createCredentialAssertionRequestWithChallenge( + &self, + challenge: &NSData, + ) -> Id; + + #[method_id(@__retain_semantics Other relyingPartyIdentifier)] + pub unsafe fn relyingPartyIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs new file mode 100644 index 000000000..213e7462c --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs @@ -0,0 +1,18 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationSecurityKeyPublicKeyCredentialRegistration; + + unsafe impl ClassType for ASAuthorizationSecurityKeyPublicKeyCredentialRegistration { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationSecurityKeyPublicKeyCredentialRegistration {} +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs new file mode 100644 index 000000000..1abbffaf5 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs @@ -0,0 +1,57 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest; + + unsafe impl ClassType for ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest { + type Super = ASAuthorizationRequest; + } +); + +extern_methods!( + unsafe impl ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest { + #[method_id(@__retain_semantics Other credentialParameters)] + pub unsafe fn credentialParameters( + &self, + ) -> Id, Shared>; + + #[method(setCredentialParameters:)] + pub unsafe fn setCredentialParameters( + &self, + credentialParameters: &NSArray, + ); + + #[method_id(@__retain_semantics Other excludedCredentials)] + pub unsafe fn excludedCredentials( + &self, + ) -> Id, Shared>; + + #[method(setExcludedCredentials:)] + pub unsafe fn setExcludedCredentials( + &self, + excludedCredentials: &NSArray, + ); + + #[method_id(@__retain_semantics Other residentKeyPreference)] + pub unsafe fn residentKeyPreference( + &self, + ) -> Id; + + #[method(setResidentKeyPreference:)] + pub unsafe fn setResidentKeyPreference( + &self, + residentKeyPreference: &ASAuthorizationPublicKeyCredentialResidentKeyPreference, + ); + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnCredential.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnCredential.rs new file mode 100644 index 000000000..fb9ef22fa --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnCredential.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationSingleSignOnCredential; + + unsafe impl ClassType for ASAuthorizationSingleSignOnCredential { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationSingleSignOnCredential { + #[method_id(@__retain_semantics Other state)] + pub unsafe fn state(&self) -> Option>; + + #[method_id(@__retain_semantics Other accessToken)] + pub unsafe fn accessToken(&self) -> Option>; + + #[method_id(@__retain_semantics Other identityToken)] + pub unsafe fn identityToken(&self) -> Option>; + + #[method_id(@__retain_semantics Other authorizedScopes)] + pub unsafe fn authorizedScopes(&self) -> Id, Shared>; + + #[method_id(@__retain_semantics Other authenticatedResponse)] + pub unsafe fn authenticatedResponse(&self) -> Option>; + + #[method_id(@__retain_semantics Other privateKeys)] + pub unsafe fn privateKeys(&self) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnProvider.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnProvider.rs new file mode 100644 index 000000000..19eec85ad --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnProvider.rs @@ -0,0 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationSingleSignOnProvider; + + unsafe impl ClassType for ASAuthorizationSingleSignOnProvider { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASAuthorizationSingleSignOnProvider { + #[method_id(@__retain_semantics Other authorizationProviderWithIdentityProviderURL:)] + pub unsafe fn authorizationProviderWithIdentityProviderURL(url: &NSURL) + -> Id; + + #[method_id(@__retain_semantics Other createRequest)] + pub unsafe fn createRequest(&self) -> Id; + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Other url)] + pub unsafe fn url(&self) -> Id; + + #[method(canPerformAuthorization)] + pub unsafe fn canPerformAuthorization(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnRequest.rs new file mode 100644 index 000000000..551afded9 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASAuthorizationSingleSignOnRequest.rs @@ -0,0 +1,33 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASAuthorizationSingleSignOnRequest; + + unsafe impl ClassType for ASAuthorizationSingleSignOnRequest { + type Super = ASAuthorizationOpenIDRequest; + } +); + +extern_methods!( + unsafe impl ASAuthorizationSingleSignOnRequest { + #[method_id(@__retain_semantics Other authorizationOptions)] + pub unsafe fn authorizationOptions(&self) -> Id, Shared>; + + #[method(setAuthorizationOptions:)] + pub unsafe fn setAuthorizationOptions( + &self, + authorizationOptions: &NSArray, + ); + + #[method(isUserInterfaceEnabled)] + pub unsafe fn isUserInterfaceEnabled(&self) -> bool; + + #[method(setUserInterfaceEnabled:)] + pub unsafe fn setUserInterfaceEnabled(&self, userInterfaceEnabled: bool); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASCOSEConstants.rs b/crates/icrate/src/generated/AuthenticationServices/ASCOSEConstants.rs new file mode 100644 index 000000000..a2a8a2eef --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASCOSEConstants.rs @@ -0,0 +1,13 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +pub type ASCOSEAlgorithmIdentifier = NSInteger; + +extern_static!(ASCOSEAlgorithmIdentifierES256: ASCOSEAlgorithmIdentifier = -7); + +pub type ASCOSEEllipticCurveIdentifier = NSInteger; + +extern_static!(ASCOSEEllipticCurveIdentifierP256: ASCOSEEllipticCurveIdentifier = 1); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASCredentialIdentityStore.rs b/crates/icrate/src/generated/AuthenticationServices/ASCredentialIdentityStore.rs new file mode 100644 index 000000000..bea058d50 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASCredentialIdentityStore.rs @@ -0,0 +1,68 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_static!(ASCredentialIdentityStoreErrorDomain: &'static NSErrorDomain); + +ns_error_enum!( + #[underlying(NSInteger)] + pub enum ASCredentialIdentityStoreErrorCode { + ASCredentialIdentityStoreErrorCodeInternalError = 0, + ASCredentialIdentityStoreErrorCodeStoreDisabled = 1, + ASCredentialIdentityStoreErrorCodeStoreBusy = 2, + } +); + +extern_class!( + #[derive(Debug)] + pub struct ASCredentialIdentityStore; + + unsafe impl ClassType for ASCredentialIdentityStore { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASCredentialIdentityStore { + #[method_id(@__retain_semantics Other sharedStore)] + pub unsafe fn sharedStore() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method(getCredentialIdentityStoreStateWithCompletion:)] + pub unsafe fn getCredentialIdentityStoreStateWithCompletion( + &self, + completion: &Block<(NonNull,), ()>, + ); + + #[method(saveCredentialIdentities:completion:)] + pub unsafe fn saveCredentialIdentities_completion( + &self, + credentialIdentities: &NSArray, + completion: Option<&Block<(Bool, *mut NSError), ()>>, + ); + + #[method(removeCredentialIdentities:completion:)] + pub unsafe fn removeCredentialIdentities_completion( + &self, + credentialIdentities: &NSArray, + completion: Option<&Block<(Bool, *mut NSError), ()>>, + ); + + #[method(removeAllCredentialIdentitiesWithCompletion:)] + pub unsafe fn removeAllCredentialIdentitiesWithCompletion( + &self, + completion: Option<&Block<(Bool, *mut NSError), ()>>, + ); + + #[method(replaceCredentialIdentitiesWithIdentities:completion:)] + pub unsafe fn replaceCredentialIdentitiesWithIdentities_completion( + &self, + newCredentialIdentities: &NSArray, + completion: Option<&Block<(Bool, *mut NSError), ()>>, + ); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASCredentialIdentityStoreState.rs b/crates/icrate/src/generated/AuthenticationServices/ASCredentialIdentityStoreState.rs new file mode 100644 index 000000000..662441f23 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASCredentialIdentityStoreState.rs @@ -0,0 +1,24 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASCredentialIdentityStoreState; + + unsafe impl ClassType for ASCredentialIdentityStoreState { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASCredentialIdentityStoreState { + #[method(isEnabled)] + pub unsafe fn isEnabled(&self) -> bool; + + #[method(supportsIncrementalUpdates)] + pub unsafe fn supportsIncrementalUpdates(&self) -> bool; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASCredentialProviderExtensionContext.rs b/crates/icrate/src/generated/AuthenticationServices/ASCredentialProviderExtensionContext.rs new file mode 100644 index 000000000..8b0ef0f5f --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASCredentialProviderExtensionContext.rs @@ -0,0 +1,38 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASCredentialProviderExtensionContext; + + unsafe impl ClassType for ASCredentialProviderExtensionContext { + type Super = NSExtensionContext; + } +); + +extern_methods!( + unsafe impl ASCredentialProviderExtensionContext { + #[method(completeRequestWithSelectedCredential:completionHandler:)] + pub unsafe fn completeRequestWithSelectedCredential_completionHandler( + &self, + credential: &ASPasswordCredential, + completionHandler: Option<&Block<(Bool,), ()>>, + ); + + #[method(completeExtensionConfigurationRequest)] + pub unsafe fn completeExtensionConfigurationRequest(&self); + + #[method(completeRequestReturningItems:completionHandler:)] + pub unsafe fn completeRequestReturningItems_completionHandler( + &self, + items: Option<&NSArray>, + completionHandler: Option<&Block<(Bool,), ()>>, + ); + + #[method(cancelRequestWithError:)] + pub unsafe fn cancelRequestWithError(&self, error: &NSError); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASCredentialProviderViewController.rs b/crates/icrate/src/generated/AuthenticationServices/ASCredentialProviderViewController.rs new file mode 100644 index 000000000..fc48fa9f5 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASCredentialProviderViewController.rs @@ -0,0 +1,42 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASCredentialProviderViewController; + + unsafe impl ClassType for ASCredentialProviderViewController { + type Super = ASViewController; + } +); + +extern_methods!( + unsafe impl ASCredentialProviderViewController { + #[method_id(@__retain_semantics Other extensionContext)] + pub unsafe fn extensionContext(&self) -> Id; + + #[method(prepareCredentialListForServiceIdentifiers:)] + pub unsafe fn prepareCredentialListForServiceIdentifiers( + &self, + serviceIdentifiers: &NSArray, + ); + + #[method(provideCredentialWithoutUserInteractionForIdentity:)] + pub unsafe fn provideCredentialWithoutUserInteractionForIdentity( + &self, + credentialIdentity: &ASPasswordCredentialIdentity, + ); + + #[method(prepareInterfaceToProvideCredentialForIdentity:)] + pub unsafe fn prepareInterfaceToProvideCredentialForIdentity( + &self, + credentialIdentity: &ASPasswordCredentialIdentity, + ); + + #[method(prepareInterfaceForExtensionConfiguration)] + pub unsafe fn prepareInterfaceForExtensionConfiguration(&self); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASCredentialServiceIdentifier.rs b/crates/icrate/src/generated/AuthenticationServices/ASCredentialServiceIdentifier.rs new file mode 100644 index 000000000..0c276217c --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASCredentialServiceIdentifier.rs @@ -0,0 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +ns_enum!( + #[underlying(NSInteger)] + pub enum ASCredentialServiceIdentifierType { + ASCredentialServiceIdentifierTypeDomain = 0, + ASCredentialServiceIdentifierTypeURL = 1, + } +); + +extern_class!( + #[derive(Debug)] + pub struct ASCredentialServiceIdentifier; + + unsafe impl ClassType for ASCredentialServiceIdentifier { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASCredentialServiceIdentifier { + #[method_id(@__retain_semantics Init initWithIdentifier:type:)] + pub unsafe fn initWithIdentifier_type( + this: Option>, + identifier: &NSString, + type_: ASCredentialServiceIdentifierType, + ) -> Id; + + #[method_id(@__retain_semantics Other identifier)] + pub unsafe fn identifier(&self) -> Id; + + #[method(type)] + pub unsafe fn type_(&self) -> ASCredentialServiceIdentifierType; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASExtensionErrors.rs b/crates/icrate/src/generated/AuthenticationServices/ASExtensionErrors.rs new file mode 100644 index 000000000..744f634c7 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASExtensionErrors.rs @@ -0,0 +1,19 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_static!(ASExtensionErrorDomain: Option<&'static NSErrorDomain>); + +ns_error_enum!( + #[underlying(NSInteger)] + pub enum ASExtensionErrorCode { + ASExtensionErrorCodeFailed = 0, + ASExtensionErrorCodeUserCanceled = 1, + ASExtensionErrorCodeUserInteractionRequired = 100, + ASExtensionErrorCodeCredentialIdentityNotFound = 101, + } +); + +extern_static!(ASExtensionLocalizedFailureReasonErrorKey: Option<&'static NSErrorUserInfoKey>); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASFoundation.rs b/crates/icrate/src/generated/AuthenticationServices/ASFoundation.rs new file mode 100644 index 000000000..d378a60b0 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASFoundation.rs @@ -0,0 +1,5 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; diff --git a/crates/icrate/src/generated/AuthenticationServices/ASPasswordCredential.rs b/crates/icrate/src/generated/AuthenticationServices/ASPasswordCredential.rs new file mode 100644 index 000000000..c6478e37d --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASPasswordCredential.rs @@ -0,0 +1,37 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASPasswordCredential; + + unsafe impl ClassType for ASPasswordCredential { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASPasswordCredential { + #[method_id(@__retain_semantics Init initWithUser:password:)] + pub unsafe fn initWithUser_password( + this: Option>, + user: &NSString, + password: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other credentialWithUser:password:)] + pub unsafe fn credentialWithUser_password( + user: &NSString, + password: &NSString, + ) -> Id; + + #[method_id(@__retain_semantics Other user)] + pub unsafe fn user(&self) -> Id; + + #[method_id(@__retain_semantics Other password)] + pub unsafe fn password(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASPasswordCredentialIdentity.rs b/crates/icrate/src/generated/AuthenticationServices/ASPasswordCredentialIdentity.rs new file mode 100644 index 000000000..27191748e --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASPasswordCredentialIdentity.rs @@ -0,0 +1,51 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASPasswordCredentialIdentity; + + unsafe impl ClassType for ASPasswordCredentialIdentity { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASPasswordCredentialIdentity { + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method_id(@__retain_semantics Init initWithServiceIdentifier:user:recordIdentifier:)] + pub unsafe fn initWithServiceIdentifier_user_recordIdentifier( + this: Option>, + serviceIdentifier: &ASCredentialServiceIdentifier, + user: &NSString, + recordIdentifier: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Other identityWithServiceIdentifier:user:recordIdentifier:)] + pub unsafe fn identityWithServiceIdentifier_user_recordIdentifier( + serviceIdentifier: &ASCredentialServiceIdentifier, + user: &NSString, + recordIdentifier: Option<&NSString>, + ) -> Id; + + #[method_id(@__retain_semantics Other serviceIdentifier)] + pub unsafe fn serviceIdentifier(&self) -> Id; + + #[method_id(@__retain_semantics Other user)] + pub unsafe fn user(&self) -> Id; + + #[method_id(@__retain_semantics Other recordIdentifier)] + pub unsafe fn recordIdentifier(&self) -> Option>; + + #[method(rank)] + pub unsafe fn rank(&self) -> NSInteger; + + #[method(setRank:)] + pub unsafe fn setRank(&self, rank: NSInteger); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASPublicKeyCredential.rs b/crates/icrate/src/generated/AuthenticationServices/ASPublicKeyCredential.rs new file mode 100644 index 000000000..d5e05029a --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASPublicKeyCredential.rs @@ -0,0 +1,17 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASPublicKeyCredential; + + unsafe impl ASPublicKeyCredential { + #[method_id(@__retain_semantics Other rawClientDataJSON)] + pub unsafe fn rawClientDataJSON(&self) -> Id; + + #[method_id(@__retain_semantics Other credentialID)] + pub unsafe fn credentialID(&self) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSession.rs b/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSession.rs new file mode 100644 index 000000000..e0b0af9b9 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSession.rs @@ -0,0 +1,86 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_static!(ASWebAuthenticationSessionErrorDomain: &'static NSErrorDomain); + +ns_error_enum!( + #[underlying(NSInteger)] + pub enum ASWebAuthenticationSessionErrorCode { + ASWebAuthenticationSessionErrorCodeCanceledLogin = 1, + ASWebAuthenticationSessionErrorCodePresentationContextNotProvided = 2, + ASWebAuthenticationSessionErrorCodePresentationContextInvalid = 3, + } +); + +pub type ASWebAuthenticationSessionCompletionHandler = *mut Block<(*mut NSURL, *mut NSError), ()>; + +extern_class!( + #[derive(Debug)] + pub struct ASWebAuthenticationSession; + + unsafe impl ClassType for ASWebAuthenticationSession { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASWebAuthenticationSession { + #[method_id(@__retain_semantics Init initWithURL:callbackURLScheme:completionHandler:)] + pub unsafe fn initWithURL_callbackURLScheme_completionHandler( + this: Option>, + URL: &NSURL, + callbackURLScheme: Option<&NSString>, + completionHandler: ASWebAuthenticationSessionCompletionHandler, + ) -> Id; + + #[method_id(@__retain_semantics Other presentationContextProvider)] + pub unsafe fn presentationContextProvider( + &self, + ) -> Option>; + + #[method(setPresentationContextProvider:)] + pub unsafe fn setPresentationContextProvider( + &self, + presentationContextProvider: Option<&ASWebAuthenticationPresentationContextProviding>, + ); + + #[method(prefersEphemeralWebBrowserSession)] + pub unsafe fn prefersEphemeralWebBrowserSession(&self) -> bool; + + #[method(setPrefersEphemeralWebBrowserSession:)] + pub unsafe fn setPrefersEphemeralWebBrowserSession( + &self, + prefersEphemeralWebBrowserSession: bool, + ); + + #[method(canStart)] + pub unsafe fn canStart(&self) -> bool; + + #[method(start)] + pub unsafe fn start(&self) -> bool; + + #[method(cancel)] + pub unsafe fn cancel(&self); + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + } +); + +extern_protocol!( + pub struct ASWebAuthenticationPresentationContextProviding; + + unsafe impl ASWebAuthenticationPresentationContextProviding { + #[method_id(@__retain_semantics Other presentationAnchorForWebAuthenticationSession:)] + pub unsafe fn presentationAnchorForWebAuthenticationSession( + &self, + session: &ASWebAuthenticationSession, + ) -> Id; + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionRequest.rs b/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionRequest.rs new file mode 100644 index 000000000..63b75bfcc --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionRequest.rs @@ -0,0 +1,75 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASWebAuthenticationSessionRequestDelegate; + + unsafe impl ASWebAuthenticationSessionRequestDelegate { + #[optional] + #[method(authenticationSessionRequest:didCompleteWithCallbackURL:)] + pub unsafe fn authenticationSessionRequest_didCompleteWithCallbackURL( + &self, + authenticationSessionRequest: &ASWebAuthenticationSessionRequest, + callbackURL: &NSURL, + ); + + #[optional] + #[method(authenticationSessionRequest:didCancelWithError:)] + pub unsafe fn authenticationSessionRequest_didCancelWithError( + &self, + authenticationSessionRequest: &ASWebAuthenticationSessionRequest, + error: &NSError, + ); + } +); + +extern_class!( + #[derive(Debug)] + pub struct ASWebAuthenticationSessionRequest; + + unsafe impl ClassType for ASWebAuthenticationSessionRequest { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASWebAuthenticationSessionRequest { + #[method_id(@__retain_semantics Other UUID)] + pub unsafe fn UUID(&self) -> Id; + + #[method_id(@__retain_semantics Other URL)] + pub unsafe fn URL(&self) -> Id; + + #[method_id(@__retain_semantics Other callbackURLScheme)] + pub unsafe fn callbackURLScheme(&self) -> Option>; + + #[method(shouldUseEphemeralSession)] + pub unsafe fn shouldUseEphemeralSession(&self) -> bool; + + #[method_id(@__retain_semantics Other delegate)] + pub unsafe fn delegate( + &self, + ) -> Option>; + + #[method(setDelegate:)] + pub unsafe fn setDelegate( + &self, + delegate: Option<&ASWebAuthenticationSessionRequestDelegate>, + ); + + #[method_id(@__retain_semantics New new)] + pub unsafe fn new() -> Id; + + #[method_id(@__retain_semantics Init init)] + pub unsafe fn init(this: Option>) -> Id; + + #[method(cancelWithError:)] + pub unsafe fn cancelWithError(&self, error: &NSError); + + #[method(completeWithCallbackURL:)] + pub unsafe fn completeWithCallbackURL(&self, url: &NSURL); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionHandling.rs b/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionHandling.rs new file mode 100644 index 000000000..8a48a14f7 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionHandling.rs @@ -0,0 +1,23 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_protocol!( + pub struct ASWebAuthenticationSessionWebBrowserSessionHandling; + + unsafe impl ASWebAuthenticationSessionWebBrowserSessionHandling { + #[method(beginHandlingWebAuthenticationSessionRequest:)] + pub unsafe fn beginHandlingWebAuthenticationSessionRequest( + &self, + request: Option<&ASWebAuthenticationSessionRequest>, + ); + + #[method(cancelWebAuthenticationSessionRequest:)] + pub unsafe fn cancelWebAuthenticationSessionRequest( + &self, + request: Option<&ASWebAuthenticationSessionRequest>, + ); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionManager.rs b/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionManager.rs new file mode 100644 index 000000000..f70bd5296 --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/ASWebAuthenticationSessionWebBrowserSessionManager.rs @@ -0,0 +1,39 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use crate::common::*; +use crate::AuthenticationServices::*; +use crate::Foundation::*; + +extern_class!( + #[derive(Debug)] + pub struct ASWebAuthenticationSessionWebBrowserSessionManager; + + unsafe impl ClassType for ASWebAuthenticationSessionWebBrowserSessionManager { + type Super = NSObject; + } +); + +extern_methods!( + unsafe impl ASWebAuthenticationSessionWebBrowserSessionManager { + #[method_id(@__retain_semantics Other sharedManager)] + pub unsafe fn sharedManager( + ) -> Id; + + #[method_id(@__retain_semantics Other sessionHandler)] + pub unsafe fn sessionHandler( + &self, + ) -> Id; + + #[method(setSessionHandler:)] + pub unsafe fn setSessionHandler( + &self, + sessionHandler: &ASWebAuthenticationSessionWebBrowserSessionHandling, + ); + + #[method(wasLaunchedByAuthenticationServices)] + pub unsafe fn wasLaunchedByAuthenticationServices(&self) -> bool; + + #[method(registerDefaultsForASWASInSetupAssistantIfNeeded)] + pub unsafe fn registerDefaultsForASWASInSetupAssistantIfNeeded(); + } +); diff --git a/crates/icrate/src/generated/AuthenticationServices/mod.rs b/crates/icrate/src/generated/AuthenticationServices/mod.rs new file mode 100644 index 000000000..4c612f87e --- /dev/null +++ b/crates/icrate/src/generated/AuthenticationServices/mod.rs @@ -0,0 +1,263 @@ +#[path = "ASAccountAuthenticationModificationController.rs"] +mod __ASAccountAuthenticationModificationController; +#[path = "ASAccountAuthenticationModificationExtensionContext.rs"] +mod __ASAccountAuthenticationModificationExtensionContext; +#[path = "ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest.rs"] +mod __ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest; +#[path = "ASAccountAuthenticationModificationRequest.rs"] +mod __ASAccountAuthenticationModificationRequest; +#[path = "ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest.rs"] +mod __ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest; +#[path = "ASAccountAuthenticationModificationViewController.rs"] +mod __ASAccountAuthenticationModificationViewController; +#[path = "ASAuthorization.rs"] +mod __ASAuthorization; +#[path = "ASAuthorizationAppleIDButton.rs"] +mod __ASAuthorizationAppleIDButton; +#[path = "ASAuthorizationAppleIDCredential.rs"] +mod __ASAuthorizationAppleIDCredential; +#[path = "ASAuthorizationAppleIDProvider.rs"] +mod __ASAuthorizationAppleIDProvider; +#[path = "ASAuthorizationAppleIDRequest.rs"] +mod __ASAuthorizationAppleIDRequest; +#[path = "ASAuthorizationController.rs"] +mod __ASAuthorizationController; +#[path = "ASAuthorizationCredential.rs"] +mod __ASAuthorizationCredential; +#[path = "ASAuthorizationCustomMethod.rs"] +mod __ASAuthorizationCustomMethod; +#[path = "ASAuthorizationError.rs"] +mod __ASAuthorizationError; +#[path = "ASAuthorizationOpenIDRequest.rs"] +mod __ASAuthorizationOpenIDRequest; +#[path = "ASAuthorizationPasswordProvider.rs"] +mod __ASAuthorizationPasswordProvider; +#[path = "ASAuthorizationPasswordRequest.rs"] +mod __ASAuthorizationPasswordRequest; +#[path = "ASAuthorizationPlatformPublicKeyCredentialAssertion.rs"] +mod __ASAuthorizationPlatformPublicKeyCredentialAssertion; +#[path = "ASAuthorizationPlatformPublicKeyCredentialAssertionRequest.rs"] +mod __ASAuthorizationPlatformPublicKeyCredentialAssertionRequest; +#[path = "ASAuthorizationPlatformPublicKeyCredentialDescriptor.rs"] +mod __ASAuthorizationPlatformPublicKeyCredentialDescriptor; +#[path = "ASAuthorizationPlatformPublicKeyCredentialProvider.rs"] +mod __ASAuthorizationPlatformPublicKeyCredentialProvider; +#[path = "ASAuthorizationPlatformPublicKeyCredentialRegistration.rs"] +mod __ASAuthorizationPlatformPublicKeyCredentialRegistration; +#[path = "ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest.rs"] +mod __ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest; +#[path = "ASAuthorizationProvider.rs"] +mod __ASAuthorizationProvider; +#[path = "ASAuthorizationProviderExtensionAuthorizationRequest.rs"] +mod __ASAuthorizationProviderExtensionAuthorizationRequest; +#[path = "ASAuthorizationProviderExtensionAuthorizationResult.rs"] +mod __ASAuthorizationProviderExtensionAuthorizationResult; +#[path = "ASAuthorizationPublicKeyCredentialAssertion.rs"] +mod __ASAuthorizationPublicKeyCredentialAssertion; +#[path = "ASAuthorizationPublicKeyCredentialAssertionRequest.rs"] +mod __ASAuthorizationPublicKeyCredentialAssertionRequest; +#[path = "ASAuthorizationPublicKeyCredentialConstants.rs"] +mod __ASAuthorizationPublicKeyCredentialConstants; +#[path = "ASAuthorizationPublicKeyCredentialDescriptor.rs"] +mod __ASAuthorizationPublicKeyCredentialDescriptor; +#[path = "ASAuthorizationPublicKeyCredentialParameters.rs"] +mod __ASAuthorizationPublicKeyCredentialParameters; +#[path = "ASAuthorizationPublicKeyCredentialRegistration.rs"] +mod __ASAuthorizationPublicKeyCredentialRegistration; +#[path = "ASAuthorizationPublicKeyCredentialRegistrationRequest.rs"] +mod __ASAuthorizationPublicKeyCredentialRegistrationRequest; +#[path = "ASAuthorizationRequest.rs"] +mod __ASAuthorizationRequest; +#[path = "ASAuthorizationSecurityKeyPublicKeyCredentialAssertion.rs"] +mod __ASAuthorizationSecurityKeyPublicKeyCredentialAssertion; +#[path = "ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest.rs"] +mod __ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest; +#[path = "ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor.rs"] +mod __ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor; +#[path = "ASAuthorizationSecurityKeyPublicKeyCredentialProvider.rs"] +mod __ASAuthorizationSecurityKeyPublicKeyCredentialProvider; +#[path = "ASAuthorizationSecurityKeyPublicKeyCredentialRegistration.rs"] +mod __ASAuthorizationSecurityKeyPublicKeyCredentialRegistration; +#[path = "ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest.rs"] +mod __ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest; +#[path = "ASAuthorizationSingleSignOnCredential.rs"] +mod __ASAuthorizationSingleSignOnCredential; +#[path = "ASAuthorizationSingleSignOnProvider.rs"] +mod __ASAuthorizationSingleSignOnProvider; +#[path = "ASAuthorizationSingleSignOnRequest.rs"] +mod __ASAuthorizationSingleSignOnRequest; +#[path = "ASCOSEConstants.rs"] +mod __ASCOSEConstants; +#[path = "ASCredentialIdentityStore.rs"] +mod __ASCredentialIdentityStore; +#[path = "ASCredentialIdentityStoreState.rs"] +mod __ASCredentialIdentityStoreState; +#[path = "ASCredentialProviderExtensionContext.rs"] +mod __ASCredentialProviderExtensionContext; +#[path = "ASCredentialProviderViewController.rs"] +mod __ASCredentialProviderViewController; +#[path = "ASCredentialServiceIdentifier.rs"] +mod __ASCredentialServiceIdentifier; +#[path = "ASExtensionErrors.rs"] +mod __ASExtensionErrors; +#[path = "ASFoundation.rs"] +mod __ASFoundation; +#[path = "ASPasswordCredential.rs"] +mod __ASPasswordCredential; +#[path = "ASPasswordCredentialIdentity.rs"] +mod __ASPasswordCredentialIdentity; +#[path = "ASPublicKeyCredential.rs"] +mod __ASPublicKeyCredential; +#[path = "ASWebAuthenticationSession.rs"] +mod __ASWebAuthenticationSession; +#[path = "ASWebAuthenticationSessionRequest.rs"] +mod __ASWebAuthenticationSessionRequest; +#[path = "ASWebAuthenticationSessionWebBrowserSessionHandling.rs"] +mod __ASWebAuthenticationSessionWebBrowserSessionHandling; +#[path = "ASWebAuthenticationSessionWebBrowserSessionManager.rs"] +mod __ASWebAuthenticationSessionWebBrowserSessionManager; + +pub use self::__ASAccountAuthenticationModificationController::{ + ASAccountAuthenticationModificationController, + ASAccountAuthenticationModificationControllerDelegate, + ASAccountAuthenticationModificationControllerPresentationContextProviding, +}; +pub use self::__ASAccountAuthenticationModificationExtensionContext::ASAccountAuthenticationModificationExtensionContext; +pub use self::__ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest::ASAccountAuthenticationModificationReplacePasswordWithSignInWithAppleRequest; +pub use self::__ASAccountAuthenticationModificationRequest::ASAccountAuthenticationModificationRequest; +pub use self::__ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest::ASAccountAuthenticationModificationUpgradePasswordToStrongPasswordRequest; +pub use self::__ASAccountAuthenticationModificationViewController::ASAccountAuthenticationModificationViewController; +pub use self::__ASAuthorization::{ + ASAuthorization, ASAuthorizationScope, ASAuthorizationScopeEmail, ASAuthorizationScopeFullName, +}; +pub use self::__ASAuthorizationAppleIDButton::{ + ASAuthorizationAppleIDButton, ASAuthorizationAppleIDButtonStyle, + ASAuthorizationAppleIDButtonStyleBlack, ASAuthorizationAppleIDButtonStyleWhite, + ASAuthorizationAppleIDButtonStyleWhiteOutline, ASAuthorizationAppleIDButtonType, + ASAuthorizationAppleIDButtonTypeContinue, ASAuthorizationAppleIDButtonTypeDefault, + ASAuthorizationAppleIDButtonTypeSignIn, ASAuthorizationAppleIDButtonTypeSignUp, +}; +pub use self::__ASAuthorizationAppleIDCredential::{ + ASAuthorizationAppleIDCredential, ASUserDetectionStatus, ASUserDetectionStatusLikelyReal, + ASUserDetectionStatusUnknown, ASUserDetectionStatusUnsupported, +}; +pub use self::__ASAuthorizationAppleIDProvider::{ + ASAuthorizationAppleIDProvider, ASAuthorizationAppleIDProviderCredentialAuthorized, + ASAuthorizationAppleIDProviderCredentialNotFound, + ASAuthorizationAppleIDProviderCredentialRevoked, + ASAuthorizationAppleIDProviderCredentialRevokedNotification, + ASAuthorizationAppleIDProviderCredentialState, + ASAuthorizationAppleIDProviderCredentialTransferred, +}; +pub use self::__ASAuthorizationAppleIDRequest::ASAuthorizationAppleIDRequest; +pub use self::__ASAuthorizationController::{ + ASAuthorizationController, ASAuthorizationControllerDelegate, + ASAuthorizationControllerPresentationContextProviding, +}; +pub use self::__ASAuthorizationCredential::ASAuthorizationCredential; +pub use self::__ASAuthorizationCustomMethod::{ + ASAuthorizationCustomMethod, ASAuthorizationCustomMethodOther, + ASAuthorizationCustomMethodRestorePurchase, ASAuthorizationCustomMethodVideoSubscriberAccount, +}; +pub use self::__ASAuthorizationError::{ + ASAuthorizationError, ASAuthorizationErrorCanceled, ASAuthorizationErrorDomain, + ASAuthorizationErrorFailed, ASAuthorizationErrorInvalidResponse, + ASAuthorizationErrorNotHandled, ASAuthorizationErrorNotInteractive, + ASAuthorizationErrorUnknown, +}; +pub use self::__ASAuthorizationOpenIDRequest::{ + ASAuthorizationOpenIDOperation, ASAuthorizationOpenIDRequest, ASAuthorizationOperationImplicit, + ASAuthorizationOperationLogin, ASAuthorizationOperationLogout, ASAuthorizationOperationRefresh, +}; +pub use self::__ASAuthorizationPasswordProvider::ASAuthorizationPasswordProvider; +pub use self::__ASAuthorizationPasswordRequest::ASAuthorizationPasswordRequest; +pub use self::__ASAuthorizationPlatformPublicKeyCredentialAssertion::ASAuthorizationPlatformPublicKeyCredentialAssertion; +pub use self::__ASAuthorizationPlatformPublicKeyCredentialAssertionRequest::ASAuthorizationPlatformPublicKeyCredentialAssertionRequest; +pub use self::__ASAuthorizationPlatformPublicKeyCredentialDescriptor::ASAuthorizationPlatformPublicKeyCredentialDescriptor; +pub use self::__ASAuthorizationPlatformPublicKeyCredentialProvider::ASAuthorizationPlatformPublicKeyCredentialProvider; +pub use self::__ASAuthorizationPlatformPublicKeyCredentialRegistration::ASAuthorizationPlatformPublicKeyCredentialRegistration; +pub use self::__ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest::ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest; +pub use self::__ASAuthorizationProvider::ASAuthorizationProvider; +pub use self::__ASAuthorizationProviderExtensionAuthorizationRequest::{ + ASAuthorizationProviderAuthorizationOperation, + ASAuthorizationProviderAuthorizationOperationConfigurationRemoved, + ASAuthorizationProviderExtensionAuthorizationRequest, + ASAuthorizationProviderExtensionAuthorizationRequestHandler, +}; +pub use self::__ASAuthorizationProviderExtensionAuthorizationResult::ASAuthorizationProviderExtensionAuthorizationResult; +pub use self::__ASAuthorizationPublicKeyCredentialAssertion::ASAuthorizationPublicKeyCredentialAssertion; +pub use self::__ASAuthorizationPublicKeyCredentialAssertionRequest::ASAuthorizationPublicKeyCredentialAssertionRequest; +pub use self::__ASAuthorizationPublicKeyCredentialConstants::{ + ASAuthorizationPublicKeyCredentialAttestationKind, + ASAuthorizationPublicKeyCredentialAttestationKindDirect, + ASAuthorizationPublicKeyCredentialAttestationKindEnterprise, + ASAuthorizationPublicKeyCredentialAttestationKindIndirect, + ASAuthorizationPublicKeyCredentialAttestationKindNone, + ASAuthorizationPublicKeyCredentialResidentKeyPreference, + ASAuthorizationPublicKeyCredentialResidentKeyPreferenceDiscouraged, + ASAuthorizationPublicKeyCredentialResidentKeyPreferencePreferred, + ASAuthorizationPublicKeyCredentialResidentKeyPreferenceRequired, + ASAuthorizationPublicKeyCredentialUserVerificationPreference, + ASAuthorizationPublicKeyCredentialUserVerificationPreferenceDiscouraged, + ASAuthorizationPublicKeyCredentialUserVerificationPreferencePreferred, + ASAuthorizationPublicKeyCredentialUserVerificationPreferenceRequired, +}; +pub use self::__ASAuthorizationPublicKeyCredentialDescriptor::ASAuthorizationPublicKeyCredentialDescriptor; +pub use self::__ASAuthorizationPublicKeyCredentialParameters::ASAuthorizationPublicKeyCredentialParameters; +pub use self::__ASAuthorizationPublicKeyCredentialRegistration::ASAuthorizationPublicKeyCredentialRegistration; +pub use self::__ASAuthorizationPublicKeyCredentialRegistrationRequest::ASAuthorizationPublicKeyCredentialRegistrationRequest; +pub use self::__ASAuthorizationRequest::ASAuthorizationRequest; +pub use self::__ASAuthorizationSecurityKeyPublicKeyCredentialAssertion::ASAuthorizationSecurityKeyPublicKeyCredentialAssertion; +pub use self::__ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest::ASAuthorizationSecurityKeyPublicKeyCredentialAssertionRequest; +pub use self::__ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor::{ + ASAuthorizationAllSupportedPublicKeyCredentialDescriptorTransports, + ASAuthorizationSecurityKeyPublicKeyCredentialDescriptor, + ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransport, + ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransportBluetooth, + ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransportNFC, + ASAuthorizationSecurityKeyPublicKeyCredentialDescriptorTransportUSB, +}; +pub use self::__ASAuthorizationSecurityKeyPublicKeyCredentialProvider::ASAuthorizationSecurityKeyPublicKeyCredentialProvider; +pub use self::__ASAuthorizationSecurityKeyPublicKeyCredentialRegistration::ASAuthorizationSecurityKeyPublicKeyCredentialRegistration; +pub use self::__ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest::ASAuthorizationSecurityKeyPublicKeyCredentialRegistrationRequest; +pub use self::__ASAuthorizationSingleSignOnCredential::ASAuthorizationSingleSignOnCredential; +pub use self::__ASAuthorizationSingleSignOnProvider::ASAuthorizationSingleSignOnProvider; +pub use self::__ASAuthorizationSingleSignOnRequest::ASAuthorizationSingleSignOnRequest; +pub use self::__ASCOSEConstants::{ + ASCOSEAlgorithmIdentifier, ASCOSEAlgorithmIdentifierES256, ASCOSEEllipticCurveIdentifier, + ASCOSEEllipticCurveIdentifierP256, +}; +pub use self::__ASCredentialIdentityStore::{ + ASCredentialIdentityStore, ASCredentialIdentityStoreErrorCode, + ASCredentialIdentityStoreErrorCodeInternalError, ASCredentialIdentityStoreErrorCodeStoreBusy, + ASCredentialIdentityStoreErrorCodeStoreDisabled, ASCredentialIdentityStoreErrorDomain, +}; +pub use self::__ASCredentialIdentityStoreState::ASCredentialIdentityStoreState; +pub use self::__ASCredentialProviderExtensionContext::ASCredentialProviderExtensionContext; +pub use self::__ASCredentialProviderViewController::ASCredentialProviderViewController; +pub use self::__ASCredentialServiceIdentifier::{ + ASCredentialServiceIdentifier, ASCredentialServiceIdentifierType, + ASCredentialServiceIdentifierTypeDomain, ASCredentialServiceIdentifierTypeURL, +}; +pub use self::__ASExtensionErrors::{ + ASExtensionErrorCode, ASExtensionErrorCodeCredentialIdentityNotFound, + ASExtensionErrorCodeFailed, ASExtensionErrorCodeUserCanceled, + ASExtensionErrorCodeUserInteractionRequired, ASExtensionErrorDomain, + ASExtensionLocalizedFailureReasonErrorKey, +}; +pub use self::__ASPasswordCredential::ASPasswordCredential; +pub use self::__ASPasswordCredentialIdentity::ASPasswordCredentialIdentity; +pub use self::__ASPublicKeyCredential::ASPublicKeyCredential; +pub use self::__ASWebAuthenticationSession::{ + ASWebAuthenticationPresentationContextProviding, ASWebAuthenticationSession, + ASWebAuthenticationSessionCompletionHandler, ASWebAuthenticationSessionErrorCode, + ASWebAuthenticationSessionErrorCodeCanceledLogin, + ASWebAuthenticationSessionErrorCodePresentationContextInvalid, + ASWebAuthenticationSessionErrorCodePresentationContextNotProvided, + ASWebAuthenticationSessionErrorDomain, +}; +pub use self::__ASWebAuthenticationSessionRequest::{ + ASWebAuthenticationSessionRequest, ASWebAuthenticationSessionRequestDelegate, +}; +pub use self::__ASWebAuthenticationSessionWebBrowserSessionHandling::ASWebAuthenticationSessionWebBrowserSessionHandling; +pub use self::__ASWebAuthenticationSessionWebBrowserSessionManager::ASWebAuthenticationSessionWebBrowserSessionManager; diff --git a/crates/icrate/src/lib.rs b/crates/icrate/src/lib.rs index e01f53795..cab69e8d4 100644 --- a/crates/icrate/src/lib.rs +++ b/crates/icrate/src/lib.rs @@ -244,6 +244,8 @@ macro_rules! inline_fn { // Frameworks #[cfg(feature = "AppKit")] pub mod AppKit; +#[cfg(feature = "AuthenticationServices")] +pub mod AuthenticationServices; #[cfg(feature = "CoreData")] pub mod CoreData; #[cfg(feature = "Foundation")] From d1ae5215cea7b1e45c9e4bc5f60519f71db8bcbe Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 25 Nov 2022 00:16:33 +0100 Subject: [PATCH 130/131] Do clang < v13 workarounds without modifying sources --- crates/header-translator/README.md | 27 ------------------- crates/header-translator/framework-includes.h | 6 +++++ 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/crates/header-translator/README.md b/crates/header-translator/README.md index 0a18956e7..2bc84d6e5 100644 --- a/crates/header-translator/README.md +++ b/crates/header-translator/README.md @@ -9,30 +9,3 @@ cargo run --bin header-translator -- /Applications/Xcode.app/Contents/Developer ## SDKs We do not redistribute the relevant SDKs, to hopefully avoid a license violation. You can download the SDKs yourself (they're bundled in XCode) from [Apple's website](https://developer.apple.com/download/all/?q=xcode) (requires an Apple ID). - -The following diffs are applied to silence warnings when compiling the headers using `clang 11.0.0`: - -```diff ---- a/XYZ.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSBundle.h -+++ b/XYZ.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSBundle.h -@@ -88,7 +88,7 @@ NS_ASSUME_NONNULL_BEGIN - - /* Methods for retrieving localized strings. */ - - (NSString *)localizedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1); --- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); -+- (NSString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0)); - - /* Methods for obtaining various information about a bundle. */ - @property (nullable, readonly, copy) NSString *bundleIdentifier; ---- a/XYZ.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h -+++ b/XYZ.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h -@@ -497,7 +497,7 @@ API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) - * If an error occurs, any outstanding reads will also fail, and new - * read requests will error out immediately. - */ --- (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler; -+- (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable data, BOOL atEOF, NSError * _Nullable error))completionHandler; - - /* Write the data completely to the underlying socket. If all the - * bytes have not been written by the timeout, a timeout error will -``` diff --git a/crates/header-translator/framework-includes.h b/crates/header-translator/framework-includes.h index c818f37e7..eb29fad17 100644 --- a/crates/header-translator/framework-includes.h +++ b/crates/header-translator/framework-includes.h @@ -1,3 +1,9 @@ +// Workaround for clang < 13, only used in NSBundle.h +#define NS_FORMAT_ARGUMENT(A) + +// Workaround for clang < 13 +#define _Nullable_result _Nullable + #include #import From 1c4c8754b71045a39f8eb6c5ba67f559a219bb94 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Thu, 8 Dec 2022 14:04:08 +0100 Subject: [PATCH 131/131] Refactor Foundation fixes --- .../icrate/src/Foundation/fixes/NSDecimal.rs | 13 +++ .../icrate/src/Foundation/fixes/NSObject.rs | 47 ++++++++ crates/icrate/src/Foundation/fixes/NSProxy.rs | 53 +++++++++ crates/icrate/src/Foundation/fixes/mod.rs | 7 ++ crates/icrate/src/Foundation/mod.rs | 101 +----------------- 5 files changed, 122 insertions(+), 99 deletions(-) create mode 100644 crates/icrate/src/Foundation/fixes/NSDecimal.rs create mode 100644 crates/icrate/src/Foundation/fixes/NSObject.rs create mode 100644 crates/icrate/src/Foundation/fixes/NSProxy.rs create mode 100644 crates/icrate/src/Foundation/fixes/mod.rs diff --git a/crates/icrate/src/Foundation/fixes/NSDecimal.rs b/crates/icrate/src/Foundation/fixes/NSDecimal.rs new file mode 100644 index 000000000..17b9b3f73 --- /dev/null +++ b/crates/icrate/src/Foundation/fixes/NSDecimal.rs @@ -0,0 +1,13 @@ +use std::ffi::c_ushort; + +extern_struct!( + pub struct NSDecimal { + // signed int _exponent:8; + // unsigned int _length:4; + // unsigned int _isNegative:1; + // unsigned int _isCompact:1; + // unsigned int _reserved:18; + _inner: i32, + _mantissa: [c_ushort; 8], + } +); diff --git a/crates/icrate/src/Foundation/fixes/NSObject.rs b/crates/icrate/src/Foundation/fixes/NSObject.rs new file mode 100644 index 000000000..b94792f3b --- /dev/null +++ b/crates/icrate/src/Foundation/fixes/NSObject.rs @@ -0,0 +1,47 @@ +objc2::__inner_extern_class! { + @__inner + pub struct (NSObject) {} + + unsafe impl () for NSObject { + INHERITS = [objc2::runtime::Object]; + } +} + +unsafe impl objc2::ClassType for NSObject { + type Super = objc2::runtime::Object; + const NAME: &'static str = "NSObject"; + + #[inline] + fn class() -> &'static objc2::runtime::Class { + objc2::class!(NSObject) + } + + fn as_super(&self) -> &Self::Super { + &self.__inner + } + + fn as_super_mut(&mut self) -> &mut Self::Super { + &mut self.__inner + } +} + +impl PartialEq for NSObject { + fn eq(&self, _other: &Self) -> bool { + todo!() + } +} + +impl Eq for NSObject {} + +impl std::hash::Hash for NSObject { + #[inline] + fn hash(&self, _state: &mut H) { + todo!() + } +} + +impl std::fmt::Debug for NSObject { + fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} diff --git a/crates/icrate/src/Foundation/fixes/NSProxy.rs b/crates/icrate/src/Foundation/fixes/NSProxy.rs new file mode 100644 index 000000000..7d3fd6803 --- /dev/null +++ b/crates/icrate/src/Foundation/fixes/NSProxy.rs @@ -0,0 +1,53 @@ +use core::fmt; +use core::hash; + +use objc2::runtime::{Class, Object}; +use objc2::{ClassType, __inner_extern_class}; + +__inner_extern_class! { + @__inner + pub struct (NSProxy) {} + + unsafe impl () for NSProxy { + INHERITS = [Object]; + } +} + +unsafe impl ClassType for NSProxy { + type Super = Object; + const NAME: &'static str = "NSProxy"; + + #[inline] + fn class() -> &'static Class { + objc2::class!(NSProxy) + } + + fn as_super(&self) -> &Self::Super { + &self.__inner + } + + fn as_super_mut(&mut self) -> &mut Self::Super { + &mut self.__inner + } +} + +impl PartialEq for NSProxy { + fn eq(&self, _other: &Self) -> bool { + todo!() + } +} + +impl Eq for NSProxy {} + +impl hash::Hash for NSProxy { + #[inline] + fn hash(&self, _state: &mut H) { + todo!() + } +} + +impl fmt::Debug for NSProxy { + fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result { + todo!() + } +} diff --git a/crates/icrate/src/Foundation/fixes/mod.rs b/crates/icrate/src/Foundation/fixes/mod.rs new file mode 100644 index 000000000..6b58210b0 --- /dev/null +++ b/crates/icrate/src/Foundation/fixes/mod.rs @@ -0,0 +1,7 @@ +mod NSDecimal; +mod NSObject; +mod NSProxy; + +pub use self::NSDecimal::*; +pub use self::NSObject::*; +pub use self::NSProxy::*; diff --git a/crates/icrate/src/Foundation/mod.rs b/crates/icrate/src/Foundation/mod.rs index a32a47974..9a2499284 100644 --- a/crates/icrate/src/Foundation/mod.rs +++ b/crates/icrate/src/Foundation/mod.rs @@ -1,3 +1,4 @@ +mod fixes; #[allow(unused_imports)] #[path = "../generated/Foundation/mod.rs"] mod generated; @@ -6,103 +7,5 @@ pub use objc2::ffi::NSIntegerMax; pub use objc2::foundation::{CGFloat, CGPoint, CGRect, CGSize, NSZone}; pub use objc2::ns_string; -objc2::__inner_extern_class! { - @__inner - pub struct (NSObject) {} - - unsafe impl () for NSObject { - INHERITS = [objc2::runtime::Object]; - } -} - -unsafe impl objc2::ClassType for NSObject { - type Super = objc2::runtime::Object; - const NAME: &'static str = "NSObject"; - - #[inline] - fn class() -> &'static objc2::runtime::Class { - objc2::class!(NSObject) - } - - fn as_super(&self) -> &Self::Super { - &self.__inner - } - - fn as_super_mut(&mut self) -> &mut Self::Super { - &mut self.__inner - } -} -impl PartialEq for NSObject { - fn eq(&self, _other: &Self) -> bool { - todo!() - } -} -impl Eq for NSObject {} -impl std::hash::Hash for NSObject { - #[inline] - fn hash(&self, _state: &mut H) { - todo!() - } -} -impl std::fmt::Debug for NSObject { - fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - todo!() - } -} - -objc2::__inner_extern_class! { - @__inner - pub struct (NSProxy) {} - - unsafe impl () for NSProxy { - INHERITS = [objc2::runtime::Object]; - } -} -unsafe impl objc2::ClassType for NSProxy { - type Super = objc2::runtime::Object; - const NAME: &'static str = "NSProxy"; - - #[inline] - fn class() -> &'static objc2::runtime::Class { - objc2::class!(NSProxy) - } - - fn as_super(&self) -> &Self::Super { - &self.__inner - } - - fn as_super_mut(&mut self) -> &mut Self::Super { - &mut self.__inner - } -} -impl PartialEq for NSProxy { - fn eq(&self, _other: &Self) -> bool { - todo!() - } -} -impl Eq for NSProxy {} -impl std::hash::Hash for NSProxy { - #[inline] - fn hash(&self, _state: &mut H) { - todo!() - } -} -impl std::fmt::Debug for NSProxy { - fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - todo!() - } -} - -extern_struct!( - pub struct NSDecimal { - // signed int _exponent:8; - // unsigned int _length:4; - // unsigned int _isNegative:1; - // unsigned int _isCompact:1; - // unsigned int _reserved:18; - _inner: i32, - _mantissa: [std::ffi::c_ushort; 8], - } -); - +pub use self::fixes::*; pub use self::generated::*;